From c21ae6efcaa06f2bbbe49d3b74dd401282c398da Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 28 Nov 2013 15:19:50 +0100 Subject: [PATCH 001/741] Double click support for the Tool Framework. --- common/drawpanel_gal.cpp | 27 +++++++++-------- common/gal/cairo/cairo_gal.cpp | 19 +++++++----- common/gal/opengl/opengl_gal.cpp | 19 +++++++----- common/tool/tool_dispatcher.cpp | 25 +++++++++++---- common/tool/tool_event.cpp | 3 +- include/tool/tool_event.h | 52 +++++++++++++++++++------------- 6 files changed, 89 insertions(+), 56 deletions(-) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index 3ec9568fde..bbfefd3c10 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -78,18 +78,21 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin Connect( wxEVT_SIZE, wxSizeEventHandler( EDA_DRAW_PANEL_GAL::onSize ), NULL, this ); /* Generic events for the Tool Dispatcher */ - Connect( wxEVT_MOTION, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_LEFT_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_LEFT_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_RIGHT_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_RIGHT_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_MIDDLE_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_MIDDLE_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_MOUSEWHEEL, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_CHAR_HOOK, wxEventHandler( EDA_DRAW_PANEL_GAL::skipEvent ) ); - Connect( wxEVT_KEY_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_KEY_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_ENTER_WINDOW, wxEventHandler( EDA_DRAW_PANEL_GAL::onEnter ), NULL, this ); + Connect( wxEVT_MOTION, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_LEFT_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_LEFT_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_LEFT_DCLICK, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_RIGHT_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_RIGHT_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_RIGHT_DCLICK, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_MIDDLE_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_MIDDLE_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_MIDDLE_DCLICK, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_MOUSEWHEEL, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_CHAR_HOOK, wxEventHandler( EDA_DRAW_PANEL_GAL::skipEvent ) ); + Connect( wxEVT_KEY_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_KEY_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_ENTER_WINDOW, wxEventHandler( EDA_DRAW_PANEL_GAL::onEnter ), NULL, this ); Connect( KIGFX::WX_VIEW_CONTROLS::EVT_REFRESH_MOUSE, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index 110f647146..5f180d7338 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -57,15 +57,18 @@ CAIRO_GAL::CAIRO_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, Connect( wxEVT_PAINT, wxPaintEventHandler( CAIRO_GAL::onPaint ) ); // Mouse events are skipped to the parent - Connect( wxEVT_MOTION, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); - Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); - Connect( wxEVT_LEFT_UP, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); - Connect( wxEVT_MIDDLE_DOWN, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); - Connect( wxEVT_MIDDLE_UP, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); - Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); - Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); + Connect( wxEVT_MOTION, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); + Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); + Connect( wxEVT_LEFT_UP, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); + Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); + Connect( wxEVT_MIDDLE_DOWN, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); + Connect( wxEVT_MIDDLE_UP, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); + Connect( wxEVT_MIDDLE_DCLICK, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); + Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); + Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); + Connect( wxEVT_RIGHT_DCLICK, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); #if defined _WIN32 || defined _WIN64 - Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); + Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); #endif SetSize( aParent->GetSize() ); diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 970cc32d16..f9cccbd365 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -70,15 +70,18 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, Connect( wxEVT_PAINT, wxPaintEventHandler( OPENGL_GAL::onPaint ) ); // Mouse events are skipped to the parent - Connect( wxEVT_MOTION, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); - Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); - Connect( wxEVT_LEFT_UP, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); - Connect( wxEVT_MIDDLE_DOWN, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); - Connect( wxEVT_MIDDLE_UP, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); - Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); - Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); + Connect( wxEVT_MOTION, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); + Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); + Connect( wxEVT_LEFT_UP, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); + Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); + Connect( wxEVT_MIDDLE_DOWN, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); + Connect( wxEVT_MIDDLE_UP, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); + Connect( wxEVT_MIDDLE_DCLICK, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); + Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); + Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); + Connect( wxEVT_RIGHT_DCLICK, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); #if defined _WIN32 || defined _WIN64 - Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); + Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); #endif SetSize( aParent->GetSize() ); diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index 49ab4382ac..b655113b38 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -43,10 +43,11 @@ using boost::optional; struct TOOL_DISPATCHER::BUTTON_STATE { BUTTON_STATE( TOOL_MOUSE_BUTTONS aButton, const wxEventType& aDownEvent, - const wxEventType& aUpEvent ) : + const wxEventType& aUpEvent, const wxEventType& aDblClickEvent ) : button( aButton ), downEvent( aDownEvent ), - upEvent( aUpEvent ) + upEvent( aUpEvent ), + dblClickEvent( aDblClickEvent ) {}; ///> Flag indicating that dragging is active for the given button. @@ -74,6 +75,9 @@ struct TOOL_DISPATCHER::BUTTON_STATE ///> The type of wxEvent that determines mouse button release. wxEventType upEvent; + ///> The type of wxEvent that determines mouse button double click. + wxEventType dblClickEvent; + ///> Time stamp for the last mouse button press event. wxLongLong downTimestamp; @@ -89,9 +93,12 @@ struct TOOL_DISPATCHER::BUTTON_STATE TOOL_DISPATCHER::TOOL_DISPATCHER( TOOL_MANAGER* aToolMgr, PCB_BASE_FRAME* aEditFrame ) : m_toolMgr( aToolMgr ), m_editFrame( aEditFrame ) { - m_buttons.push_back( new BUTTON_STATE( BUT_LEFT, wxEVT_LEFT_DOWN, wxEVT_LEFT_UP ) ); - m_buttons.push_back( new BUTTON_STATE( BUT_RIGHT, wxEVT_RIGHT_DOWN, wxEVT_RIGHT_UP ) ); - m_buttons.push_back( new BUTTON_STATE( BUT_MIDDLE, wxEVT_MIDDLE_DOWN, wxEVT_MIDDLE_UP ) ); + m_buttons.push_back( new BUTTON_STATE( BUT_LEFT, wxEVT_LEFT_DOWN, + wxEVT_LEFT_UP, wxEVT_LEFT_DCLICK ) ); + m_buttons.push_back( new BUTTON_STATE( BUT_RIGHT, wxEVT_RIGHT_DOWN, + wxEVT_RIGHT_UP, wxEVT_RIGHT_DCLICK ) ); + m_buttons.push_back( new BUTTON_STATE( BUT_MIDDLE, wxEVT_MIDDLE_DOWN, + wxEVT_MIDDLE_UP, wxEVT_MIDDLE_DCLICK ) ); ResetState(); } @@ -126,6 +133,7 @@ bool TOOL_DISPATCHER::handleMouseButton( wxEvent& aEvent, int aIndex, bool aMoti bool up = type == st->upEvent; bool down = type == st->downEvent; + bool dblClick = type == st->dblClickEvent; int mods = decodeModifiers( static_cast( &aEvent ) ); int args = st->button | mods; @@ -162,6 +170,10 @@ bool TOOL_DISPATCHER::handleMouseButton( wxEvent& aEvent, int aIndex, bool aMoti st->dragging = false; } + else if( dblClick ) + { + evt = TOOL_EVENT( TC_MOUSE, TA_MOUSE_DBLCLICK, args ); + } if( st->pressed && aMotion ) { @@ -204,8 +216,9 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) type == wxEVT_LEFT_DOWN || type == wxEVT_LEFT_UP || type == wxEVT_MIDDLE_DOWN || type == wxEVT_MIDDLE_UP || type == wxEVT_RIGHT_DOWN || type == wxEVT_RIGHT_UP || + type == wxEVT_LEFT_DCLICK || type == wxEVT_MIDDLE_DCLICK || type == wxEVT_RIGHT_DCLICK || // Event issued whem mouse retains position in screen coordinates, - // but changes in world coordinates (eg. autopanning) + // but changes in world coordinates (e.g. autopanning) type == KIGFX::WX_VIEW_CONTROLS::EVT_REFRESH_MOUSE ) { VECTOR2D screenPos = m_toolMgr->GetViewControls()->GetCursorPosition(); diff --git a/common/tool/tool_event.cpp b/common/tool/tool_event.cpp index 15ae3314e7..978550406b 100644 --- a/common/tool/tool_event.cpp +++ b/common/tool/tool_event.cpp @@ -77,6 +77,7 @@ const std::string TOOL_EVENT::Format() const const FlagString actions[] = { { TA_MOUSE_CLICK, "click" }, + { TA_MOUSE_DBLCLICK, "double click" }, { TA_MOUSE_UP, "button-up" }, { TA_MOUSE_DOWN, "button-down" }, { TA_MOUSE_DRAG, "drag" }, @@ -102,7 +103,7 @@ const std::string TOOL_EVENT::Format() const { BUT_LEFT, "left" }, { BUT_RIGHT, "right" }, { BUT_MIDDLE, "middle" }, - { 0, "" } + { 0, "" } }; const FlagString modifiers[] = diff --git a/include/tool/tool_event.h b/include/tool/tool_event.h index 44cb4379cd..1ec5b1414d 100644 --- a/include/tool/tool_event.h +++ b/include/tool/tool_event.h @@ -54,39 +54,43 @@ enum TOOL_EVENT_CATEGORY enum TOOL_ACTIONS { // UI input events - TA_NONE = 0x0000, - TA_MOUSE_CLICK = 0x0001, - TA_MOUSE_UP = 0x0002, - TA_MOUSE_DOWN = 0x0004, - TA_MOUSE_DRAG = 0x0008, - TA_MOUSE_MOTION = 0x0010, - TA_MOUSE_WHEEL = 0x0020, - TA_MOUSE = 0x003f, - TA_KEY_UP = 0x0040, - TA_KEY_DOWN = 0x0080, - TA_KEYBOARD = TA_KEY_UP | TA_KEY_DOWN, + TA_NONE = 0x0000, + TA_MOUSE_CLICK = 0x0001, + TA_MOUSE_DBLCLICK = 0x0002, + TA_MOUSE_UP = 0x0004, + TA_MOUSE_DOWN = 0x0008, + TA_MOUSE_DRAG = 0x0010, + TA_MOUSE_MOTION = 0x0020, + TA_MOUSE_WHEEL = 0x0040, + TA_MOUSE = 0x007f, + + TA_KEY_UP = 0x0080, + TA_KEY_DOWN = 0x0100, + TA_KEYBOARD = TA_KEY_UP | TA_KEY_DOWN, // View related events - TA_VIEW_REFRESH = 0x0100, - TA_VIEW_ZOOM = 0x0200, - TA_VIEW_PAN = 0x0400, - TA_VIEW_DIRTY = 0x0800, - TA_CHANGE_LAYER = 0x1000, + TA_VIEW_REFRESH = 0x0200, + TA_VIEW_ZOOM = 0x0400, + TA_VIEW_PAN = 0x0800, + TA_VIEW_DIRTY = 0x1000, + TA_VIEW = 0x1e00, + + TA_CHANGE_LAYER = 0x2000, // Tool cancel event. Issued automagically when the user hits escape or selects End Tool from // the context menu. - TA_CANCEL_TOOL = 0x2000, + TA_CANCEL_TOOL = 0x4000, // Context menu update. Issued whenever context menu is open and the user hovers the mouse // over one of choices. Used in dynamic highligting in disambiguation menu - TA_CONTEXT_MENU_UPDATE = 0x4000, + TA_CONTEXT_MENU_UPDATE = 0x8000, // Context menu choice. Sent if the user picked something from the context menu or // closed it without selecting anything. - TA_CONTEXT_MENU_CHOICE = 0x8000, + TA_CONTEXT_MENU_CHOICE = 0x10000, // Tool action (allows to control tools) - TA_ACTION = 0x10000, + TA_ACTION = 0x20000, TA_ANY = 0xffffffff }; @@ -233,6 +237,12 @@ public: && ( ( m_mouseButtons & aButtonMask ) == aButtonMask ); } + bool IsDblClick( int aButtonMask = BUT_ANY ) const + { + return ( m_actions == TA_MOUSE_DBLCLICK ) + && ( ( m_mouseButtons & aButtonMask ) == aButtonMask ); + } + bool IsDrag( int aButtonMask = BUT_ANY ) const { return ( m_actions == TA_MOUSE_DRAG ) && ( ( m_mouseButtons & aButtonMask ) == aButtonMask ); @@ -277,7 +287,7 @@ public: void SetMouseDragOrigin( const VECTOR2D& aP ) { m_mouseDragOrigin = aP; - } + } void SetMousePosition( const VECTOR2D& aP ) { From af976b2d36e0b4bd323c3b6da3081bb794f50d7b Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 28 Nov 2013 15:24:19 +0100 Subject: [PATCH 002/741] Automatic unregistration of tool actions during ACTION_MANAGER destruction. --- common/tool/action_manager.cpp | 7 +++++++ include/tool/action_manager.h | 6 ++++++ pcbnew/tools/pcb_tools.cpp | 7 +------ 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/common/tool/action_manager.cpp b/common/tool/action_manager.cpp index be90ef055f..63aa99f8d8 100644 --- a/common/tool/action_manager.cpp +++ b/common/tool/action_manager.cpp @@ -34,6 +34,13 @@ ACTION_MANAGER::ACTION_MANAGER( TOOL_MANAGER* aToolManager ) : } +ACTION_MANAGER::~ACTION_MANAGER() +{ + while( !m_actionIdIndex.empty() ) + UnregisterAction( m_actionIdIndex.begin()->second ); +} + + void ACTION_MANAGER::RegisterAction( TOOL_ACTION* aAction ) { assert( aAction->GetId() == -1 ); // Check if the TOOL_ACTION was not registered before diff --git a/include/tool/action_manager.h b/include/tool/action_manager.h index 239ad606b7..dbcb7b33b6 100644 --- a/include/tool/action_manager.h +++ b/include/tool/action_manager.h @@ -47,6 +47,12 @@ public: */ ACTION_MANAGER( TOOL_MANAGER* aToolManager ); + /** + * Destructor. + * Unregisters every registered action. + */ + ~ACTION_MANAGER(); + /** * Function RegisterAction() * Adds a tool action to the manager and sets it up. After that is is possible to invoke diff --git a/pcbnew/tools/pcb_tools.cpp b/pcbnew/tools/pcb_tools.cpp index f3749a0c94..2f9676cb94 100644 --- a/pcbnew/tools/pcb_tools.cpp +++ b/pcbnew/tools/pcb_tools.cpp @@ -61,13 +61,8 @@ void PCB_EDIT_FRAME::setupTools() void PCB_EDIT_FRAME::destroyTools() { - m_toolManager->UnregisterAction( &COMMON_ACTIONS::moveActivate ); - m_toolManager->UnregisterAction( &COMMON_ACTIONS::selectionActivate ); - m_toolManager->UnregisterAction( &COMMON_ACTIONS::rotate ); - m_toolManager->UnregisterAction( &COMMON_ACTIONS::flip ); - - delete m_toolDispatcher; delete m_toolManager; + delete m_toolDispatcher; } From 3ce3d22b974d6ee5a11ab357f15e590571d3b99c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 29 Nov 2013 09:37:23 +0100 Subject: [PATCH 003/741] Moved the SELECTION_TOOL out of the KIGFX namespace. --- pcbnew/tools/selection_tool.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 262d93ac45..decd7fe9e5 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -47,7 +47,6 @@ #include "bright_box.h" #include "common_actions.h" -using namespace KIGFX; using boost::optional; SELECTION_TOOL::SELECTION_TOOL() : @@ -81,7 +80,7 @@ void SELECTION_TOOL::Reset() int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) { - VIEW* view = getView(); + KIGFX::VIEW* view = getView(); assert( getModel( PCB_T ) != NULL ); @@ -176,7 +175,7 @@ void SELECTION_TOOL::toggleSelection( BOARD_ITEM* aItem ) void SELECTION_TOOL::clearSelection() { - VIEW_GROUP::const_iter it, it_end; + KIGFX::VIEW_GROUP::const_iter it, it_end; for( it = m_selection.group->Begin(), it_end = m_selection.group->End(); it != it_end; ++it ) { @@ -286,7 +285,7 @@ bool SELECTION_TOOL::selectMultiple() { bool cancelled = false; // Was the tool cancelled while it was running? m_multiple = true; // Multiple selection mode is active - VIEW* view = getView(); + KIGFX::VIEW* view = getView(); getViewControls()->SetAutoPan( true ); view->Add( m_selArea ); @@ -308,7 +307,7 @@ bool SELECTION_TOOL::selectMultiple() m_selArea->SetOrigin( evt->DragOrigin() ); m_selArea->SetEnd( evt->Position() ); m_selArea->ViewSetVisible( true ); - m_selArea->ViewUpdate( VIEW_ITEM::GEOMETRY ); + m_selArea->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); } if( evt->IsMouseUp( BUT_LEFT ) ) @@ -317,11 +316,11 @@ bool SELECTION_TOOL::selectMultiple() m_selArea->ViewSetVisible( false ); // Mark items within the selection box as selected - std::vector selectedItems; + std::vector selectedItems; BOX2I selectionBox = m_selArea->ViewBBox(); view->Query( selectionBox, selectedItems ); // Get the list of selected items - std::vector::iterator it, it_end; + std::vector::iterator it, it_end; for( it = selectedItems.begin(), it_end = selectedItems.end(); it != it_end; ++it ) { @@ -405,7 +404,7 @@ BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector ) } // Removes possible brighten mark - getView()->MarkTargetDirty( TARGET_OVERLAY ); + getView()->MarkTargetDirty( KIGFX::TARGET_OVERLAY ); // Restore the original menu SetContextMenu( &m_menu, CMENU_BUTTON ); From 4876dbea249b84b62969f60160ac178452f092d7 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 29 Nov 2013 16:45:39 +0100 Subject: [PATCH 004/741] Storing the selected item position from a context menu. --- common/tool/context_menu.cpp | 7 +++++-- common/tool/tool_dispatcher.cpp | 2 +- common/tool/tool_manager.cpp | 9 ++++++--- include/tool/context_menu.h | 14 ++++++++++++++ 4 files changed, 26 insertions(+), 6 deletions(-) diff --git a/common/tool/context_menu.cpp b/common/tool/context_menu.cpp index e20dfdf115..6dfab27e58 100644 --- a/common/tool/context_menu.cpp +++ b/common/tool/context_menu.cpp @@ -29,7 +29,7 @@ #include CONTEXT_MENU::CONTEXT_MENU() : - m_titleSet( false ), m_handler( this ), m_tool( NULL ) + m_titleSet( false ), m_selected( -1 ), m_handler( this ), m_tool( NULL ) { m_menu.Connect( wxEVT_MENU_HIGHLIGHT, wxEventHandler( CMEventHandler::onEvent ), NULL, &m_handler ); @@ -43,7 +43,7 @@ CONTEXT_MENU::CONTEXT_MENU() : CONTEXT_MENU::CONTEXT_MENU( const CONTEXT_MENU& aMenu ) : - m_titleSet( aMenu.m_titleSet ), m_handler( this ), m_tool( aMenu.m_tool ) + m_titleSet( aMenu.m_titleSet ), m_selected( -1 ), m_handler( this ), m_tool( aMenu.m_tool ) { m_menu.Connect( wxEVT_MENU_HIGHLIGHT, wxEventHandler( CMEventHandler::onEvent ), NULL, &m_handler ); @@ -164,6 +164,9 @@ void CONTEXT_MENU::CMEventHandler::onEvent( wxEvent& aEvent ) // One of menu entries was selected.. else if( type == wxEVT_COMMAND_MENU_SELECTED ) { + // Store the selected position + m_menu->m_selected = aEvent.GetId(); + // Check if there is a TOOL_ACTION for the given ID if( m_menu->m_toolActions.count( aEvent.GetId() ) == 1 ) { diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index b655113b38..35cefd81a2 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -147,7 +147,7 @@ bool TOOL_DISPATCHER::handleMouseButton( wxEvent& aEvent, int aIndex, bool aMoti st->pressed = true; evt = TOOL_EVENT( TC_MOUSE, TA_MOUSE_DOWN, args ); } - else if( up ) // Handle mouse button release + else if( up ) // Handle mouse button release { st->pressed = false; diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 75ac02574e..2644076508 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -446,9 +446,12 @@ bool TOOL_MANAGER::ProcessEvent( TOOL_EVENT& aEvent ) boost::scoped_ptr menu( new CONTEXT_MENU( *st->contextMenu ) ); GetEditFrame()->PopupMenu( menu->GetMenu() ); - // - TOOL_EVENT evt( TC_COMMAND, TA_CONTEXT_MENU_CHOICE ); - dispatchInternal( evt ); + // If nothing was chosen from the context menu, we must notify the tool as well + if( menu->GetSelected() < 0 ) + { + TOOL_EVENT evt( TC_COMMAND, TA_CONTEXT_MENU_CHOICE ); + dispatchInternal( evt ); + } break; } diff --git a/include/tool/context_menu.h b/include/tool/context_menu.h index 90a5e106e8..df6f7cb0b7 100644 --- a/include/tool/context_menu.h +++ b/include/tool/context_menu.h @@ -78,6 +78,17 @@ public: */ void Clear(); + /** + * Function GetSelected() + * Returns the position of selected item. If the returned value is negative, that means that + * menu was dismissed. + * @return The position of selected item in the context menu. + */ + int GetSelected() const + { + return m_selected; + } + /** * Function GetMenu() * Returns the instance of wxMenu object used to display the menu. @@ -131,6 +142,9 @@ private: ///> Instance of wxMenu used for display of the context menu. wxMenu m_menu; + ///> Stores the id number of selected item. + int m_selected; + ///> Instance of menu event handler. CMEventHandler m_handler; From 08fd9d8cbdd3e8586f567e0bf4d8113312b96d4f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 2 Dec 2013 14:35:05 +0100 Subject: [PATCH 005/741] Overridden ViewUpdate() for MODULE class, so it handles its pads, drawings and texts. --- common/view/view.cpp | 2 +- common/view/view_item.cpp | 2 +- include/view/view.h | 13 ++++++++----- pcbnew/class_module.cpp | 22 ++++++++++++++++++++++ pcbnew/class_module.h | 3 +++ 5 files changed, 35 insertions(+), 7 deletions(-) diff --git a/common/view/view.cpp b/common/view/view.cpp index 078fa0b907..ebc0b1c1b9 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -819,7 +819,7 @@ void VIEW::clearGroupCache() } -void VIEW::invalidateItem( VIEW_ITEM* aItem, int aUpdateFlags ) +void VIEW::InvalidateItem( VIEW_ITEM* aItem, int aUpdateFlags ) { // updateLayers updates geometry too, so we do not have to update both of them at the same time if( aUpdateFlags & VIEW_ITEM::LAYERS ) diff --git a/common/view/view_item.cpp b/common/view/view_item.cpp index 1521c88a9e..e2ddd6a01d 100644 --- a/common/view/view_item.cpp +++ b/common/view/view_item.cpp @@ -53,7 +53,7 @@ void VIEW_ITEM::ViewUpdate( int aUpdateFlags ) if( !m_view ) return; - m_view->invalidateItem( this, aUpdateFlags ); + m_view->InvalidateItem( this, aUpdateFlags ); } diff --git a/include/view/view.h b/include/view/view.h index a5e0756219..f7a7e90984 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -493,6 +493,14 @@ public: m_scaleLimits = VECTOR2D( aMaximum, aMinimum ); } + /** + * Function InvalidateItem() + * Manages dirty flags & redraw queueing when updating an item. + * @param aItem is the item to be updated. + * @param aUpdateFlags determines the way an item is refreshed. + */ + void InvalidateItem( VIEW_ITEM* aItem, int aUpdateFlags ); + static const int VIEW_MAX_LAYERS = 128; ///* maximum number of layers that may be shown private: @@ -563,11 +571,6 @@ private: */ void draw( VIEW_GROUP* aGroup, bool aImmediate = false ) const; - - ///* Manages dirty flags & redraw queueing when updating an item. Called internally - /// via VIEW_ITEM::ViewUpdate() - void invalidateItem( VIEW_ITEM* aItem, int aUpdateFlags ); - ///* Sorts m_orderedLayers when layer rendering order has changed void sortLayers(); diff --git a/pcbnew/class_module.cpp b/pcbnew/class_module.cpp index dd1aca96e5..9694607a39 100644 --- a/pcbnew/class_module.cpp +++ b/pcbnew/class_module.cpp @@ -728,6 +728,28 @@ EDA_ITEM* MODULE::Clone() const } +void MODULE::ViewUpdate( int aUpdateFlags ) +{ + if( !m_view ) + return; + + // Update pads + for( D_PAD* pad = m_Pads.GetFirst(); pad; pad = pad->Next() ) + m_view->InvalidateItem( pad, aUpdateFlags ); + + // Update module's drawing (mostly silkscreen) + for( BOARD_ITEM* drawing = m_Drawings.GetFirst(); drawing; drawing = drawing->Next() ) + m_view->InvalidateItem( drawing, aUpdateFlags ); + + // Update module's texts + m_view->InvalidateItem( m_Reference, aUpdateFlags ); + m_view->InvalidateItem( m_Value, aUpdateFlags ); + + // Update the module itself + m_view->InvalidateItem( this, aUpdateFlags ); +} + + /* Test for validity of the name in a library of the footprint * ( no spaces, dir separators ... ) * return true if the given name is valid diff --git a/pcbnew/class_module.h b/pcbnew/class_module.h index 184e9e7288..a1564db05e 100644 --- a/pcbnew/class_module.h +++ b/pcbnew/class_module.h @@ -447,6 +447,9 @@ public: EDA_ITEM* Clone() const; + /// @copydoc VIEW_ITEM::ViewUpdate() + void ViewUpdate( int aUpdateFlags ); + /** * Function CopyNetlistSettings * copies the netlist settings to \a aModule. From bec2e9b17850c9965185c73a76d5f072670b2c22 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 3 Dec 2013 15:17:43 +0100 Subject: [PATCH 006/741] Added some comments & asserts. --- common/tool/action_manager.cpp | 2 ++ common/tool/tool_manager.cpp | 16 +++++++++++++--- include/tool/tool_event.h | 3 +++ pcbnew/basepcbframe.cpp | 2 +- pcbnew/tools/selection_tool.h | 11 ++++++++++- 5 files changed, 29 insertions(+), 5 deletions(-) diff --git a/common/tool/action_manager.cpp b/common/tool/action_manager.cpp index 63aa99f8d8..d38ad1eccf 100644 --- a/common/tool/action_manager.cpp +++ b/common/tool/action_manager.cpp @@ -44,6 +44,8 @@ ACTION_MANAGER::~ACTION_MANAGER() void ACTION_MANAGER::RegisterAction( TOOL_ACTION* aAction ) { assert( aAction->GetId() == -1 ); // Check if the TOOL_ACTION was not registered before + assert( m_actionNameIndex.find( aAction->m_name ) == m_actionNameIndex.end() ); + assert( m_actionIdIndex.find( aAction->m_id ) == m_actionIdIndex.end() ); aAction->setId( MakeActionId( aAction->m_name ) ); diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 2644076508..9fe8715604 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -120,6 +120,11 @@ TOOL_MANAGER::~TOOL_MANAGER() void TOOL_MANAGER::RegisterTool( TOOL_BASE* aTool ) { + wxASSERT_MSG( m_toolNameIndex.find( aTool->GetName() ) == m_toolNameIndex.end(), + wxT( "Adding two tools with the same name may result in unexpected behaviour.") ); + wxASSERT_MSG( m_toolIdIndex.find( aTool->GetId() ) == m_toolIdIndex.end(), + wxT( "Adding two tools with the same ID may result in unexpected behaviour.") ); + TOOL_STATE* st = new TOOL_STATE; st->theTool = aTool; @@ -227,7 +232,10 @@ bool TOOL_MANAGER::runTool( TOOL_BASE* aTool ) wxASSERT( aTool != NULL ); if( !isRegistered( aTool ) ) + { + wxASSERT_MSG( false, wxT( "You cannot run unregistered tools" ) ); return false; + } TOOL_STATE* state = m_toolState[aTool]; @@ -334,10 +342,11 @@ void TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent ) // Go() method that match the event. if( st->transitions.size() ) { - BOOST_FOREACH( TRANSITION tr, st->transitions ) + BOOST_FOREACH( TRANSITION& tr, st->transitions ) { if( tr.first.Matches( aEvent ) ) { + // as the state changes, the transition table has to be set up again st->transitions.clear(); // no tool context allocated yet? Create one. @@ -351,6 +360,9 @@ void TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent ) if( !st->cofunc->Running() ) finishTool( st ); // The couroutine has finished immediately? + + // there is no point in further checking, as transitions got cleared + break; } } } @@ -406,8 +418,6 @@ void TOOL_MANAGER::finishTool( TOOL_STATE* aState ) if( it != m_activeTools.end() ) m_activeTools.erase( it ); - else - wxLogWarning( wxT( "Tried to finish inactive tool" ) ); aState->idle = true; delete aState->cofunc; diff --git a/include/tool/tool_event.h b/include/tool/tool_event.h index 1ec5b1414d..a2815035d2 100644 --- a/include/tool/tool_event.h +++ b/include/tool/tool_event.h @@ -321,6 +321,9 @@ public: if( m_commandId && aEvent.m_commandId ) return *m_commandId == *aEvent.m_commandId; + + // Command-type event has to contain either id or string + assert( false ); } return true; diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 89c5a8866e..dd235976c3 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -609,7 +609,7 @@ void PCB_BASE_FRAME::UseGalCanvas( bool aEnable ) EDA_DRAW_FRAME::UseGalCanvas( aEnable ); m_toolManager->SetEnvironment( m_Pcb, m_galCanvas->GetView(), - m_galCanvas->GetViewControls(), this ); + m_galCanvas->GetViewControls(), this ); ViewReloadBoard( m_Pcb ); } diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index ee8cf45003..faf48ef8db 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -68,7 +68,16 @@ public: KIGFX::VIEW_GROUP* group; /// Checks if there is anything selected - bool Empty() const { return items.empty(); } + bool Empty() const + { + return items.empty(); + } + + /// Returns the number of selected parts + int Size() const + { + return items.size(); + } }; /// @copydoc TOOL_INTERACTIVE::Reset() From ad3cb1f36adbd3938f0ab9e7e013374a46119db7 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 3 Dec 2013 15:41:41 +0100 Subject: [PATCH 007/741] Added TOOL_MANAGER::RunAction() function. --- common/tool/tool_manager.cpp | 6 ++++++ include/tool/tool_manager.h | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 9fe8715604..9e56e61545 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -194,6 +194,12 @@ void TOOL_MANAGER::UnregisterAction( TOOL_ACTION* aAction ) } +bool TOOL_MANAGER::RunAction( const std::string& aActionName ) +{ + return m_actionMgr->RunAction( aActionName ); +} + + bool TOOL_MANAGER::invokeTool( TOOL_BASE* aTool ) { wxASSERT( aTool != NULL ); diff --git a/include/tool/tool_manager.h b/include/tool/tool_manager.h index 38a2879ccd..57026c2712 100644 --- a/include/tool/tool_manager.h +++ b/include/tool/tool_manager.h @@ -99,6 +99,15 @@ public: */ void UnregisterAction( TOOL_ACTION* aAction ); + /** + * Function RunAction() + * Runs the specified action. The common format is "application.ToolName.Action". + * + * @param aActionName is the name of action to be invoked. + * @return True if the action finished successfully, false otherwise. + */ + bool RunAction( const std::string& aActionName ); + /** * Function FindTool() * Searches for a tool with given ID. From b582162cb5f3d480002b3ad03d1645a3cd9d1260 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 3 Dec 2013 15:57:09 +0100 Subject: [PATCH 008/741] Split rotate and flip operations into separate functions. Added Properties action (display properties windows) --- pcbnew/tools/common_actions.cpp | 6 +- pcbnew/tools/common_actions.h | 5 +- pcbnew/tools/move_tool.cpp | 144 ++++++++++++++++++++++++-------- pcbnew/tools/move_tool.h | 35 +++++++- pcbnew/tools/pcb_tools.cpp | 1 + pcbnew/tools/selection_tool.cpp | 18 +++- 6 files changed, 164 insertions(+), 45 deletions(-) diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index a61ebc52b0..e1b95141c6 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -36,9 +36,13 @@ TOOL_ACTION COMMON_ACTIONS::moveActivate( "pcbnew.InteractiveMove", "Move", "Moves the selected item(s)" ); TOOL_ACTION COMMON_ACTIONS::rotate( "pcbnew.InteractiveMove.rotate", - AS_CONTEXT, ' ', + AS_CONTEXT, 'R', "Rotate", "Rotates selected item(s)" ); TOOL_ACTION COMMON_ACTIONS::flip( "pcbnew.InteractiveMove.flip", AS_CONTEXT, 'F', "Flip", "Flips selected item(s)" ); + +TOOL_ACTION COMMON_ACTIONS::properties( "pcbnew.InteractiveMove.properties", + AS_GLOBAL, 'E', + "Properties...", "Displays properties window" ); diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index 547b86f814..c93dd29220 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -24,7 +24,7 @@ #include -class ACTION_MANAGER; +//class ACTION_MANAGER; /** * Class COMMON_ACTIONS @@ -46,4 +46,7 @@ public: /// Flipping of selected objects static TOOL_ACTION flip; + + /// Activation of the edit tool + static TOOL_ACTION properties; }; diff --git a/pcbnew/tools/move_tool.cpp b/pcbnew/tools/move_tool.cpp index 6750d3e8fd..ccafa2c835 100644 --- a/pcbnew/tools/move_tool.cpp +++ b/pcbnew/tools/move_tool.cpp @@ -24,6 +24,7 @@ #include #include +#include #include #include #include @@ -41,38 +42,26 @@ MOVE_TOOL::MOVE_TOOL() : } -MOVE_TOOL::~MOVE_TOOL() -{ -} - - -void MOVE_TOOL::Reset() -{ - // The tool launches upon reception of action event ("pcbnew.InteractiveMove") - Go( &MOVE_TOOL::Main, COMMON_ACTIONS::moveActivate.MakeEvent() ); -} - - bool MOVE_TOOL::Init() { // Find the selection tool, so they can cooperate TOOL_BASE* selectionTool = m_toolMgr->FindTool( "pcbnew.InteractiveSelection" ); - if( selectionTool ) - { - m_selectionTool = static_cast( selectionTool ); - - // Add context menu entries that are displayed when selection tool is active - m_selectionTool->AddMenuItem( COMMON_ACTIONS::moveActivate ); - m_selectionTool->AddMenuItem( COMMON_ACTIONS::rotate ); - m_selectionTool->AddMenuItem( COMMON_ACTIONS::flip ); - } - else + m_selectionTool = static_cast( selectionTool ); + if( !selectionTool ) { DisplayError( NULL, wxT( "pcbnew.InteractiveSelection tool is not available" ) ); return false; } + // Add context menu entries that are displayed when selection tool is active + m_selectionTool->AddMenuItem( COMMON_ACTIONS::moveActivate ); + m_selectionTool->AddMenuItem( COMMON_ACTIONS::rotate ); + m_selectionTool->AddMenuItem( COMMON_ACTIONS::flip ); + m_selectionTool->AddMenuItem( COMMON_ACTIONS::properties ); + + setTransitions(); + return true; } @@ -85,7 +74,7 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) return 0; // there are no items to operate on VECTOR2D dragPosition; - bool dragging = false; + m_dragging = false; bool restore = false; // Should items' state be restored when finishing the tool? VIEW_CONTROLS* controls = getViewControls(); @@ -105,23 +94,15 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) // Dispatch TOOL_ACTIONs else if( evt->Category() == TC_COMMAND ) { - VECTOR2D cursorPos = getView()->ToWorld( getViewControls()->GetCursorPosition() ); - - if( evt->IsAction( &COMMON_ACTIONS::rotate ) ) // got rotation event? - { - m_state.Rotate( cursorPos, 900.0 ); - selection.group->ViewUpdate( VIEW_ITEM::GEOMETRY ); - } - else if( evt->IsAction( &COMMON_ACTIONS::flip ) ) // got flip event? - { - m_state.Flip( cursorPos ); - selection.group->ViewUpdate( VIEW_ITEM::GEOMETRY ); - } + if( evt->IsAction( &COMMON_ACTIONS::rotate ) ) + Rotate( aEvent ); + else if( evt->IsAction( &COMMON_ACTIONS::flip ) ) + Flip( aEvent ); } else if( evt->IsMotion() || evt->IsDrag( BUT_LEFT ) ) { - if( dragging ) + if( m_dragging ) { // Drag items to the current cursor position VECTOR2D movement = ( evt->Position() - dragPosition ); @@ -138,16 +119,19 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) m_state.Save( *it ); } - dragging = true; + m_dragging = true; } selection.group->ViewUpdate( VIEW_ITEM::GEOMETRY ); dragPosition = evt->Position(); } + else if( evt->IsMouseUp( BUT_LEFT ) || evt->IsClick( BUT_LEFT ) ) break; // Finish } + m_dragging = false; + if( restore ) { // Modifications has to be rollbacked, so restore the previous state of items @@ -165,5 +149,91 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) controls->SetSnapping( false ); controls->SetAutoPan( false ); + setTransitions(); + return 0; } + + +int MOVE_TOOL::Properties( TOOL_EVENT& aEvent ) +{ + const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); + + // Properties are displayed when there is only one item selected + if( selection.items.size() == 1 ) + { + // Display properties dialog + PCB_EDIT_FRAME* editFrame = static_cast( m_toolMgr->GetEditFrame() ); + BOARD_ITEM* item = *selection.items.begin(); + editFrame->OnEditItemRequest( NULL, item ); + + item->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + + setTransitions(); + + return 0; +} + + +int MOVE_TOOL::Rotate( TOOL_EVENT& aEvent ) +{ + const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); + VECTOR2D cursorPos = getView()->ToWorld( getViewControls()->GetCursorPosition() ); + + if( m_dragging ) + { + m_state.Rotate( cursorPos, 900.0 ); + selection.group->ViewUpdate( VIEW_ITEM::GEOMETRY ); + } + else + { + std::set::iterator it; + + for( it = selection.items.begin(); it != selection.items.end(); ++it ) + { + (*it)->Rotate( wxPoint( cursorPos.x, cursorPos.y ), 900.0 ); + (*it)->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + + setTransitions(); + } + + return 0; +} + + +int MOVE_TOOL::Flip( TOOL_EVENT& aEvent ) +{ + const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); + VECTOR2D cursorPos = getView()->ToWorld( getViewControls()->GetCursorPosition() ); + + if( m_dragging ) + { + m_state.Flip( cursorPos ); + selection.group->ViewUpdate( VIEW_ITEM::GEOMETRY ); + } + else + { + std::set::iterator it; + + for( it = selection.items.begin(); it != selection.items.end(); ++it ) + { + (*it)->Flip( wxPoint( cursorPos.x, cursorPos.y ) ); + (*it)->ViewUpdate( KIGFX::VIEW_ITEM::LAYERS ); + } + + setTransitions(); + } + + return 0; +} + + +void MOVE_TOOL::setTransitions() +{ + Go( &MOVE_TOOL::Main, COMMON_ACTIONS::moveActivate.MakeEvent() ); + Go( &MOVE_TOOL::Rotate, COMMON_ACTIONS::rotate.MakeEvent() ); + Go( &MOVE_TOOL::Flip, COMMON_ACTIONS::flip.MakeEvent() ); + Go( &MOVE_TOOL::Properties, COMMON_ACTIONS::properties.MakeEvent() ); +} diff --git a/pcbnew/tools/move_tool.h b/pcbnew/tools/move_tool.h index 1140d0067e..9b7a88012d 100644 --- a/pcbnew/tools/move_tool.h +++ b/pcbnew/tools/move_tool.h @@ -49,10 +49,9 @@ class MOVE_TOOL : public TOOL_INTERACTIVE { public: MOVE_TOOL(); - ~MOVE_TOOL(); /// @copydoc TOOL_INTERACTIVE::Reset() - void Reset(); + void Reset() {}; /// @copydoc TOOL_INTERACTIVE::Init() bool Init(); @@ -61,15 +60,43 @@ public: * Function Main() * * Main loop in which events are handled. + * @param aEvent is the handled event. */ int Main( TOOL_EVENT& aEvent ); + /** + * Function Edit() + * + * Displays properties window for the selected object. + */ + int Properties( TOOL_EVENT& aEvent ); + + /** + * Function Rotate() + * + * Rotates currently selected items. + */ + int Rotate( TOOL_EVENT& aEvent ); + + /** + * Function Flip() + * + * Rotates currently selected items. The rotation point is the current cursor position. + */ + int Flip( TOOL_EVENT& aEvent ); + private: - /// Saves the state of items and allows to restore them + ///> Saves the state of items and allows to restore them ITEM_STATE m_state; - /// Selection tool used for obtaining selected items + ///> Selection tool used for obtaining selected items SELECTION_TOOL* m_selectionTool; + + ///> Flag determining if anything is being dragged right now + bool m_dragging; + + ///> Sets up handlers for various events + void setTransitions(); }; #endif diff --git a/pcbnew/tools/pcb_tools.cpp b/pcbnew/tools/pcb_tools.cpp index 2f9676cb94..aaccb18978 100644 --- a/pcbnew/tools/pcb_tools.cpp +++ b/pcbnew/tools/pcb_tools.cpp @@ -51,6 +51,7 @@ void PCB_EDIT_FRAME::setupTools() m_toolManager->RegisterAction( &COMMON_ACTIONS::selectionActivate ); m_toolManager->RegisterAction( &COMMON_ACTIONS::rotate ); m_toolManager->RegisterAction( &COMMON_ACTIONS::flip ); + m_toolManager->RegisterAction( &COMMON_ACTIONS::properties ); // Register tools m_toolManager->RegisterTool( new SELECTION_TOOL ); diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index decd7fe9e5..e7d56cd291 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -102,11 +102,25 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) } // single click? Select single object - if( evt->IsClick( BUT_LEFT ) ) + else if( evt->IsClick( BUT_LEFT ) ) + { + if( !m_additive && m_selection.Size() > 1 ) + clearSelection(); + selectSingle( evt->Position() ); + } + + else if( evt->IsDblClick( BUT_LEFT ) ) + { + if( m_selection.Empty() ) + selectSingle( evt->Position() ); + + // Display properties window + m_toolMgr->RunAction( "pcbnew.InteractiveMove.properties" ); + } // drag with LMB? Select multiple objects (or at least draw a selection box) or drag them - if( evt->IsDrag( BUT_LEFT ) ) + else if( evt->IsDrag( BUT_LEFT ) ) { if( m_selection.Empty() || m_additive ) { From 07a5774a1ef2c3aeba27074c69820f35ccf8357c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 3 Dec 2013 16:09:03 +0100 Subject: [PATCH 009/741] Renamed MOVE_TOOL to EDIT_TOOL. --- pcbnew/CMakeLists.txt | 2 +- pcbnew/tools/common_actions.cpp | 10 +- pcbnew/tools/common_actions.h | 2 +- pcbnew/tools/move_tool.cpp | 239 -------------------------------- pcbnew/tools/move_tool.h | 102 -------------- pcbnew/tools/pcb_tools.cpp | 6 +- pcbnew/tools/selection_tool.cpp | 4 +- pcbnew/tools/selection_tool.h | 2 +- 8 files changed, 13 insertions(+), 354 deletions(-) delete mode 100644 pcbnew/tools/move_tool.cpp delete mode 100644 pcbnew/tools/move_tool.h diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 360f98a5c3..770554f2c0 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -241,7 +241,7 @@ set( PCBNEW_CLASS_SRCS tools/selection_tool.cpp tools/selection_area.cpp tools/bright_box.cpp - tools/move_tool.cpp + tools/edit_tool.cpp tools/pcb_tools.cpp tools/common_actions.cpp ) diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index e1b95141c6..12aa52cb8f 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -30,19 +30,19 @@ TOOL_ACTION COMMON_ACTIONS::selectionActivate( "pcbnew.InteractiveSelection", AS_GLOBAL, 'S', "Selection tool", "Allows to select items" ); -// Move tool actions -TOOL_ACTION COMMON_ACTIONS::moveActivate( "pcbnew.InteractiveMove", +// Edit tool actions +TOOL_ACTION COMMON_ACTIONS::editActivate( "pcbnew.InteractiveEdit", AS_GLOBAL, 'M', "Move", "Moves the selected item(s)" ); -TOOL_ACTION COMMON_ACTIONS::rotate( "pcbnew.InteractiveMove.rotate", +TOOL_ACTION COMMON_ACTIONS::rotate( "pcbnew.InteractiveEdit.rotate", AS_CONTEXT, 'R', "Rotate", "Rotates selected item(s)" ); -TOOL_ACTION COMMON_ACTIONS::flip( "pcbnew.InteractiveMove.flip", +TOOL_ACTION COMMON_ACTIONS::flip( "pcbnew.InteractiveEdit.flip", AS_CONTEXT, 'F', "Flip", "Flips selected item(s)" ); -TOOL_ACTION COMMON_ACTIONS::properties( "pcbnew.InteractiveMove.properties", +TOOL_ACTION COMMON_ACTIONS::properties( "pcbnew.InteractiveEdit.properties", AS_GLOBAL, 'E', "Properties...", "Displays properties window" ); diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index c93dd29220..5e8bbd7efc 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -36,7 +36,7 @@ class COMMON_ACTIONS { public: /// Activation of the move tool - static TOOL_ACTION moveActivate; + static TOOL_ACTION editActivate; /// Activation of the selection tool static TOOL_ACTION selectionActivate; diff --git a/pcbnew/tools/move_tool.cpp b/pcbnew/tools/move_tool.cpp deleted file mode 100644 index ccafa2c835..0000000000 --- a/pcbnew/tools/move_tool.cpp +++ /dev/null @@ -1,239 +0,0 @@ -/* - * This program source code file is part of KiCad, a free EDA CAD application. - * - * Copyright (C) 2013 CERN - * @author Maciej Suminski - * - * 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 -#include -#include -#include -#include - -#include "common_actions.h" -#include "selection_tool.h" -#include "move_tool.h" - -using namespace KIGFX; -using boost::optional; - -MOVE_TOOL::MOVE_TOOL() : - TOOL_INTERACTIVE( "pcbnew.InteractiveMove" ), m_selectionTool( NULL ) -{ -} - - -bool MOVE_TOOL::Init() -{ - // Find the selection tool, so they can cooperate - TOOL_BASE* selectionTool = m_toolMgr->FindTool( "pcbnew.InteractiveSelection" ); - - m_selectionTool = static_cast( selectionTool ); - if( !selectionTool ) - { - DisplayError( NULL, wxT( "pcbnew.InteractiveSelection tool is not available" ) ); - return false; - } - - // Add context menu entries that are displayed when selection tool is active - m_selectionTool->AddMenuItem( COMMON_ACTIONS::moveActivate ); - m_selectionTool->AddMenuItem( COMMON_ACTIONS::rotate ); - m_selectionTool->AddMenuItem( COMMON_ACTIONS::flip ); - m_selectionTool->AddMenuItem( COMMON_ACTIONS::properties ); - - setTransitions(); - - return true; -} - - -int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) -{ - const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); - - if( selection.Empty() ) - return 0; // there are no items to operate on - - VECTOR2D dragPosition; - m_dragging = false; - bool restore = false; // Should items' state be restored when finishing the tool? - - VIEW_CONTROLS* controls = getViewControls(); - controls->ShowCursor( true ); - controls->SetSnapping( true ); - controls->SetAutoPan( true ); - - // Main loop: keep receiving events - while( OPT_TOOL_EVENT evt = Wait() ) - { - if( evt->IsCancel() ) - { - restore = true; // Cancelling the tool means that items have to be restored - break; // Finish - } - - // Dispatch TOOL_ACTIONs - else if( evt->Category() == TC_COMMAND ) - { - if( evt->IsAction( &COMMON_ACTIONS::rotate ) ) - Rotate( aEvent ); - else if( evt->IsAction( &COMMON_ACTIONS::flip ) ) - Flip( aEvent ); - } - - else if( evt->IsMotion() || evt->IsDrag( BUT_LEFT ) ) - { - if( m_dragging ) - { - // Drag items to the current cursor position - VECTOR2D movement = ( evt->Position() - dragPosition ); - m_state.Move( movement ); - } - else - { - // Prepare to drag - std::set::iterator it; - - for( it = selection.items.begin(); it != selection.items.end(); ++it ) - { - // Save the state of the selected items, in case it has to be restored - m_state.Save( *it ); - } - - m_dragging = true; - } - - selection.group->ViewUpdate( VIEW_ITEM::GEOMETRY ); - dragPosition = evt->Position(); - } - - else if( evt->IsMouseUp( BUT_LEFT ) || evt->IsClick( BUT_LEFT ) ) - break; // Finish - } - - m_dragging = false; - - if( restore ) - { - // Modifications has to be rollbacked, so restore the previous state of items - selection.group->ItemsViewUpdate( VIEW_ITEM::APPEARANCE ); - m_state.RestoreAll(); - } - else - { - // Changes are applied, so update the items - selection.group->ItemsViewUpdate( m_state.GetUpdateFlag() ); - m_state.Apply(); - } - - controls->ShowCursor( false ); - controls->SetSnapping( false ); - controls->SetAutoPan( false ); - - setTransitions(); - - return 0; -} - - -int MOVE_TOOL::Properties( TOOL_EVENT& aEvent ) -{ - const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); - - // Properties are displayed when there is only one item selected - if( selection.items.size() == 1 ) - { - // Display properties dialog - PCB_EDIT_FRAME* editFrame = static_cast( m_toolMgr->GetEditFrame() ); - BOARD_ITEM* item = *selection.items.begin(); - editFrame->OnEditItemRequest( NULL, item ); - - item->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - } - - setTransitions(); - - return 0; -} - - -int MOVE_TOOL::Rotate( TOOL_EVENT& aEvent ) -{ - const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); - VECTOR2D cursorPos = getView()->ToWorld( getViewControls()->GetCursorPosition() ); - - if( m_dragging ) - { - m_state.Rotate( cursorPos, 900.0 ); - selection.group->ViewUpdate( VIEW_ITEM::GEOMETRY ); - } - else - { - std::set::iterator it; - - for( it = selection.items.begin(); it != selection.items.end(); ++it ) - { - (*it)->Rotate( wxPoint( cursorPos.x, cursorPos.y ), 900.0 ); - (*it)->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - } - - setTransitions(); - } - - return 0; -} - - -int MOVE_TOOL::Flip( TOOL_EVENT& aEvent ) -{ - const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); - VECTOR2D cursorPos = getView()->ToWorld( getViewControls()->GetCursorPosition() ); - - if( m_dragging ) - { - m_state.Flip( cursorPos ); - selection.group->ViewUpdate( VIEW_ITEM::GEOMETRY ); - } - else - { - std::set::iterator it; - - for( it = selection.items.begin(); it != selection.items.end(); ++it ) - { - (*it)->Flip( wxPoint( cursorPos.x, cursorPos.y ) ); - (*it)->ViewUpdate( KIGFX::VIEW_ITEM::LAYERS ); - } - - setTransitions(); - } - - return 0; -} - - -void MOVE_TOOL::setTransitions() -{ - Go( &MOVE_TOOL::Main, COMMON_ACTIONS::moveActivate.MakeEvent() ); - Go( &MOVE_TOOL::Rotate, COMMON_ACTIONS::rotate.MakeEvent() ); - Go( &MOVE_TOOL::Flip, COMMON_ACTIONS::flip.MakeEvent() ); - Go( &MOVE_TOOL::Properties, COMMON_ACTIONS::properties.MakeEvent() ); -} diff --git a/pcbnew/tools/move_tool.h b/pcbnew/tools/move_tool.h deleted file mode 100644 index 9b7a88012d..0000000000 --- a/pcbnew/tools/move_tool.h +++ /dev/null @@ -1,102 +0,0 @@ -/* - * This program source code file is part of KiCad, a free EDA CAD application. - * - * Copyright (C) 2013 CERN - * @author Maciej Suminski - * - * 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 __MOVE_TOOL_H -#define __MOVE_TOOL_H - -#include -#include -#include -#include "item_state.h" - -class BOARD_ITEM; -class SELECTION_TOOL; - -namespace KIGFX -{ -class VIEW_GROUP; -} - -/** - * Class MOVE_TOOL - * - * Our sample move tool. Allows to move, rotate and flip items selected by - * pcbnew.InteractiveSelection tool. - */ - -class MOVE_TOOL : public TOOL_INTERACTIVE -{ -public: - MOVE_TOOL(); - - /// @copydoc TOOL_INTERACTIVE::Reset() - void Reset() {}; - - /// @copydoc TOOL_INTERACTIVE::Init() - bool Init(); - - /** - * Function Main() - * - * Main loop in which events are handled. - * @param aEvent is the handled event. - */ - int Main( TOOL_EVENT& aEvent ); - - /** - * Function Edit() - * - * Displays properties window for the selected object. - */ - int Properties( TOOL_EVENT& aEvent ); - - /** - * Function Rotate() - * - * Rotates currently selected items. - */ - int Rotate( TOOL_EVENT& aEvent ); - - /** - * Function Flip() - * - * Rotates currently selected items. The rotation point is the current cursor position. - */ - int Flip( TOOL_EVENT& aEvent ); - -private: - ///> Saves the state of items and allows to restore them - ITEM_STATE m_state; - - ///> Selection tool used for obtaining selected items - SELECTION_TOOL* m_selectionTool; - - ///> Flag determining if anything is being dragged right now - bool m_dragging; - - ///> Sets up handlers for various events - void setTransitions(); -}; - -#endif diff --git a/pcbnew/tools/pcb_tools.cpp b/pcbnew/tools/pcb_tools.cpp index aaccb18978..f6903f6420 100644 --- a/pcbnew/tools/pcb_tools.cpp +++ b/pcbnew/tools/pcb_tools.cpp @@ -35,7 +35,7 @@ #include #include "selection_tool.h" -#include "move_tool.h" +#include "edit_tool.h" #include "common_actions.h" #include @@ -47,7 +47,7 @@ void PCB_EDIT_FRAME::setupTools() m_galCanvas->SetEventDispatcher( m_toolDispatcher ); // Register tool actions - m_toolManager->RegisterAction( &COMMON_ACTIONS::moveActivate ); + m_toolManager->RegisterAction( &COMMON_ACTIONS::editActivate ); m_toolManager->RegisterAction( &COMMON_ACTIONS::selectionActivate ); m_toolManager->RegisterAction( &COMMON_ACTIONS::rotate ); m_toolManager->RegisterAction( &COMMON_ACTIONS::flip ); @@ -56,7 +56,7 @@ void PCB_EDIT_FRAME::setupTools() // Register tools m_toolManager->RegisterTool( new SELECTION_TOOL ); m_toolManager->RegisterTool( new ROUTER_TOOL ); - m_toolManager->RegisterTool( new MOVE_TOOL ); + m_toolManager->RegisterTool( new EDIT_TOOL ); } diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index e7d56cd291..23033b02f4 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -116,7 +116,7 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) selectSingle( evt->Position() ); // Display properties window - m_toolMgr->RunAction( "pcbnew.InteractiveMove.properties" ); + m_toolMgr->RunAction( "pcbnew.InteractiveEdit.properties" ); } // drag with LMB? Select multiple objects (or at least draw a selection box) or drag them @@ -134,7 +134,7 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) if( containsSelected( evt->Position() ) ) { // Yes -> run the move tool and wait till it finishes - m_toolMgr->InvokeTool( "pcbnew.InteractiveMove" ); + m_toolMgr->InvokeTool( "pcbnew.InteractiveEdit" ); } else { diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index faf48ef8db..6b3d62ba28 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -50,7 +50,7 @@ class VIEW_GROUP; * - draw selection box (drag LMB) * - handles MODULEs properly (ie. selects either MODULE or its PADs, TEXTs, etc.) * - takes into account high-contrast & layer visibility settings - * - invokes InteractiveMove tool when user starts to drag selected items + * - invokes InteractiveEdit tool when user starts to drag selected items */ class SELECTION_TOOL : public TOOL_INTERACTIVE From 24a317ce28aa552e239d71590b2360279e900240 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 3 Dec 2013 17:11:22 +0100 Subject: [PATCH 010/741] The Selection Tool is always active. Removed entries for toolbar menu and hotkeys for the tool. --- common/tool/tool_dispatcher.cpp | 5 ----- common/tool/tool_manager.cpp | 5 +++-- pcbnew/menubar_pcbframe.cpp | 5 ----- pcbnew/pcbframe.cpp | 2 -- pcbnew/pcbnew_id.h | 1 - pcbnew/tools/common_actions.cpp | 3 +-- pcbnew/tools/common_actions.h | 6 +++--- pcbnew/tools/pcb_tools.cpp | 7 ++++++- pcbnew/tools/selection_tool.cpp | 27 +++++++++++++++------------ pcbnew/tools/selection_tool.h | 4 ++++ 10 files changed, 32 insertions(+), 33 deletions(-) diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index 35cefd81a2..6fb5d5f500 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -280,11 +280,6 @@ void TOOL_DISPATCHER::DispatchWxCommand( const wxCommandEvent& aEvent ) toolName = "pcbnew.InteractiveRouter"; activateTool = true; break; - - case ID_SELECTION_TOOL: - toolName = "pcbnew.InteractiveSelection"; - activateTool = true; - break; } // do nothing if the legacy view is active diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 9e56e61545..695203f447 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -97,7 +97,7 @@ struct TOOL_MANAGER::TOOL_STATE TOOL_MANAGER::TOOL_MANAGER() : - m_model( NULL ), m_view( NULL ) + m_model( NULL ), m_view( NULL ), m_viewControls( NULL ), m_editFrame( NULL ) { m_actionMgr = new ACTION_MANAGER( this ); } @@ -476,7 +476,8 @@ bool TOOL_MANAGER::ProcessEvent( TOOL_EVENT& aEvent ) if( m_view->IsDirty() ) { PCB_EDIT_FRAME* f = static_cast( GetEditFrame() ); - f->GetGalCanvas()->Refresh(); // fixme: ugly hack, provide a method in TOOL_DISPATCHER. + if( f->IsGalCanvasActive() ) + f->GetGalCanvas()->Refresh(); // fixme: ugly hack, provide a method in TOOL_DISPATCHER. } return false; diff --git a/pcbnew/menubar_pcbframe.cpp b/pcbnew/menubar_pcbframe.cpp index 766b563833..9db3c5e309 100644 --- a/pcbnew/menubar_pcbframe.cpp +++ b/pcbnew/menubar_pcbframe.cpp @@ -310,11 +310,6 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() editMenu->AppendSeparator(); - AddMenuItem( editMenu, ID_SELECTION_TOOL, - _( "Select Tool" ), - _( "Interactive selection and drag&drop tool." ), - KiBitmap( tools_xpm ) ); - AddMenuItem( editMenu, ID_PNS_ROUTER_TOOL, _( "Interactive router" ), _( "Interactive router drag&drop tool." ), diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index b6a2a2c2d5..963581d197 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -121,8 +121,6 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME ) // menu Config /* Tom's hacks start */ - EVT_MENU ( ID_SELECTION_TOOL, PCB_EDIT_FRAME::onGenericCommand ) - EVT_TOOL ( ID_SELECTION_TOOL, PCB_EDIT_FRAME::onGenericCommand ) EVT_MENU ( ID_PNS_ROUTER_TOOL, PCB_EDIT_FRAME::onGenericCommand ) EVT_TOOL ( ID_PNS_ROUTER_TOOL, PCB_EDIT_FRAME::onGenericCommand ) /* Tom's hacks end */ diff --git a/pcbnew/pcbnew_id.h b/pcbnew/pcbnew_id.h index 1a03a3764c..d5a836b93a 100644 --- a/pcbnew/pcbnew_id.h +++ b/pcbnew/pcbnew_id.h @@ -370,7 +370,6 @@ enum pcbnew_ids ID_FOOTPRINT_WIZARD_SELECT_WIZARD, ID_FOOTPRINT_WIZARD_EXPORT_TO_BOARD, - ID_SELECTION_TOOL, ID_PNS_ROUTER_TOOL }; diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 12aa52cb8f..7a7aef37b1 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -27,8 +27,7 @@ // Selection tool actions TOOL_ACTION COMMON_ACTIONS::selectionActivate( "pcbnew.InteractiveSelection", - AS_GLOBAL, 'S', - "Selection tool", "Allows to select items" ); + AS_GLOBAL, 0, "", "" ); // No description, it is not supposed to be shown anywhere // Edit tool actions TOOL_ACTION COMMON_ACTIONS::editActivate( "pcbnew.InteractiveEdit", diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index 5e8bbd7efc..ae12439870 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -35,12 +35,12 @@ class COMMON_ACTIONS { public: - /// Activation of the move tool - static TOOL_ACTION editActivate; - /// Activation of the selection tool static TOOL_ACTION selectionActivate; + /// Activation of the edit tool + static TOOL_ACTION editActivate; + /// Rotation of selected objects static TOOL_ACTION rotate; diff --git a/pcbnew/tools/pcb_tools.cpp b/pcbnew/tools/pcb_tools.cpp index f6903f6420..db347e8c4b 100644 --- a/pcbnew/tools/pcb_tools.cpp +++ b/pcbnew/tools/pcb_tools.cpp @@ -48,7 +48,6 @@ void PCB_EDIT_FRAME::setupTools() // Register tool actions m_toolManager->RegisterAction( &COMMON_ACTIONS::editActivate ); - m_toolManager->RegisterAction( &COMMON_ACTIONS::selectionActivate ); m_toolManager->RegisterAction( &COMMON_ACTIONS::rotate ); m_toolManager->RegisterAction( &COMMON_ACTIONS::flip ); m_toolManager->RegisterAction( &COMMON_ACTIONS::properties ); @@ -57,6 +56,12 @@ void PCB_EDIT_FRAME::setupTools() m_toolManager->RegisterTool( new SELECTION_TOOL ); m_toolManager->RegisterTool( new ROUTER_TOOL ); m_toolManager->RegisterTool( new EDIT_TOOL ); + + m_toolManager->SetEnvironment( NULL, m_galCanvas->GetView(), + m_galCanvas->GetViewControls(), this ); + + // Run the selection tool, it is supposed to be always active + m_toolManager->InvokeTool( "pcbnew.InteractiveSelection" ); } diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index b175e85b09..918fb8f2aa 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -66,6 +66,8 @@ SELECTION_TOOL::~SELECTION_TOOL() void SELECTION_TOOL::Reset() { + clearSelection(); + // Reinsert the VIEW_GROUP, in case it was removed from the VIEW getView()->Remove( m_selection.group ); getView()->Add( m_selection.group ); @@ -77,12 +79,6 @@ void SELECTION_TOOL::Reset() int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) { - KIGFX::VIEW* view = getView(); - - assert( getModel( PCB_T ) != NULL ); - - view->Add( m_selection.group ); - // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { @@ -94,8 +90,8 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) { if( !m_selection.Empty() ) // Cancel event deselects items... clearSelection(); - else // ...unless there is nothing selected - break; // then exit the tool + + // This tool never exits } // single click? Select single object @@ -142,8 +138,8 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) } } - m_selection.group->Clear(); - view->Remove( m_selection.group ); + // This tool is supposed to be active forever + assert( false ); return 0; } @@ -188,6 +184,7 @@ void SELECTION_TOOL::clearSelection() { KIGFX::VIEW_GROUP::const_iter it, it_end; + // Restore the initial properties for( it = m_selection.group->Begin(), it_end = m_selection.group->End(); it != it_end; ++it ) { BOARD_ITEM* item = static_cast( *it ); @@ -196,8 +193,7 @@ void SELECTION_TOOL::clearSelection() item->ClearSelected(); } - m_selection.group->Clear(); - m_selection.items.clear(); + m_selection.Clear(); // Do not show the context menu when there is nothing selected SetContextMenu( &m_menu, CMENU_OFF ); @@ -609,3 +605,10 @@ bool SELECTION_TOOL::containsSelected( const VECTOR2I& aPoint ) const return false; } + + +void SELECTION_TOOL::SELECTION::Clear() +{ + items.clear(); + group->Clear(); +} diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index 6b3d62ba28..40806c3b94 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -78,6 +78,10 @@ public: { return items.size(); } + + /// Clears both the VIEW_GROUP and set of selected items. Please note that it does not + /// change properties of selected items (e.g. selection flag). + void Clear(); }; /// @copydoc TOOL_INTERACTIVE::Reset() From 27c7eb5dcec71aa66708b8672843396291b74951 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 4 Dec 2013 10:58:51 +0100 Subject: [PATCH 011/741] The Selection Tool displays information about selected items. ClearSelection() made public. --- pcbnew/tools/selection_tool.cpp | 110 ++++++++++++++++++-------------- pcbnew/tools/selection_tool.h | 15 ++++- 2 files changed, 73 insertions(+), 52 deletions(-) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 918fb8f2aa..9538f27c4b 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -66,7 +66,7 @@ SELECTION_TOOL::~SELECTION_TOOL() void SELECTION_TOOL::Reset() { - clearSelection(); + ClearSelection(); // Reinsert the VIEW_GROUP, in case it was removed from the VIEW getView()->Remove( m_selection.group ); @@ -89,7 +89,7 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) if( evt->IsCancel() ) { if( !m_selection.Empty() ) // Cancel event deselects items... - clearSelection(); + ClearSelection(); // This tool never exits } @@ -98,7 +98,7 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) else if( evt->IsClick( BUT_LEFT ) ) { if( !m_additive && m_selection.Size() > 1 ) - clearSelection(); + ClearSelection(); selectSingle( evt->Position() ); } @@ -132,7 +132,7 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) else { // No -> clear the selection list - clearSelection(); + ClearSelection(); } } } @@ -145,42 +145,7 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) } -void SELECTION_TOOL::AddMenuItem( const TOOL_ACTION& aAction ) -{ - assert( aAction.GetId() > 0 ); // Check if the action was registered before in ACTION_MANAGER - - m_menu.Add( aAction ); -} - - -void SELECTION_TOOL::toggleSelection( BOARD_ITEM* aItem ) -{ - if( m_selection.items.find( aItem ) != m_selection.items.end() ) - { - deselectItem( aItem ); - - // If there is nothing selected, disable the context menu - if( m_selection.Empty() ) - SetContextMenu( &m_menu, CMENU_OFF ); - } - else - { - if( !m_additive ) - clearSelection(); - - // Prevent selection of invisible or inactive items - if( selectable( aItem ) ) - { - selectItem( aItem ); - - // Now the context menu should be enabled - SetContextMenu( &m_menu, CMENU_BUTTON ); - } - } -} - - -void SELECTION_TOOL::clearSelection() +void SELECTION_TOOL::ClearSelection() { KIGFX::VIEW_GROUP::const_iter it, it_end; @@ -195,11 +160,45 @@ void SELECTION_TOOL::clearSelection() m_selection.Clear(); + getEditFrame()->SetCurItem( NULL ); + // Do not show the context menu when there is nothing selected SetContextMenu( &m_menu, CMENU_OFF ); } +void SELECTION_TOOL::AddMenuItem( const TOOL_ACTION& aAction ) +{ + assert( aAction.GetId() > 0 ); // Check if the action was registered before in ACTION_MANAGER + + m_menu.Add( aAction ); +} + + +void SELECTION_TOOL::toggleSelection( BOARD_ITEM* aItem ) +{ + if( isSelected( aItem ) ) + { + deselectItem( aItem ); + } + else + { + if( !m_additive ) + ClearSelection(); + + // Prevent selection of invisible or inactive items + if( selectable( aItem ) ) + selectItem( aItem ); + } +} + + +bool SELECTION_TOOL::isSelected( const BOARD_ITEM* aItem ) const +{ + return ( m_selection.items.find( const_cast( aItem ) ) != m_selection.items.end() ); +} + + void SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere ) { BOARD* pcb = getModel( PCB_T ); @@ -214,7 +213,7 @@ void SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere ) { case 0: if( !m_additive ) - clearSelection(); + ClearSelection(); break; @@ -308,7 +307,7 @@ bool SELECTION_TOOL::selectMultiple() if( evt->IsDrag( BUT_LEFT ) ) { if( !m_additive ) - clearSelection(); + ClearSelection(); // Start drawing a selection box m_selArea->SetOrigin( evt->DragOrigin() ); @@ -338,11 +337,10 @@ bool SELECTION_TOOL::selectMultiple() selectItem( item ); } - // Now the context menu should be enabled - if( !m_selection.Empty() ) - SetContextMenu( &m_menu, CMENU_BUTTON ); + // Do not display information about selected item,as there is more than one + getEditFrame()->SetCurItem( NULL ); - break; + break; // Stop waiting for events } } @@ -413,9 +411,6 @@ BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector ) // Removes possible brighten mark getView()->MarkTargetDirty( KIGFX::TARGET_OVERLAY ); - // Restore the original menu - SetContextMenu( &m_menu, CMENU_BUTTON ); - return current; } @@ -542,6 +537,16 @@ void SELECTION_TOOL::selectItem( BOARD_ITEM* aItem ) // Add items to the VIEW_GROUP, so they will be displayed on the overlay selectBase( aItem ); m_selection.items.insert( aItem ); + + // It is enough to do it only for the first selected item + if( m_selection.items.size() == 1 ) + { + // Set as the current item, so the information about selection is displayed + getEditFrame()->SetCurItem( aItem, true ); + + // Now the context menu should be enabled + SetContextMenu( &m_menu, CMENU_BUTTON ); + } } @@ -584,6 +589,13 @@ void SELECTION_TOOL::deselectItem( BOARD_ITEM* aItem ) deselectBase( aItem ); m_selection.items.erase( aItem ); + + // If there is nothing selected, disable the context menu + if( m_selection.Empty() ) + { + SetContextMenu( &m_menu, CMENU_OFF ); + getEditFrame()->SetCurItem( NULL ); + } } diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index 40806c3b94..fa6ed0f545 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -104,6 +104,12 @@ public: return m_selection; } + /** + * Function ClearSelection() + * Clears the current selection. + */ + void ClearSelection(); + /** * Function AddAction() * @@ -156,10 +162,13 @@ private: void toggleSelection( BOARD_ITEM* aItem ); /** - * Function clearSelection() - * Clears selections of currently selected items. + * Function isSelected() + * Tests if an item is currently selected. + * + * @param aItem is the item to be checked. + * @return True if the item is selected, false otherwise. */ - void clearSelection(); + bool isSelected( const BOARD_ITEM* aItem ) const; /** * Function selectable() From c5a1df62164080e39e4efa6d066ab26e649fb0a7 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 5 Dec 2013 14:48:44 +0100 Subject: [PATCH 012/741] ClearHotKey() function. --- common/tool/action_manager.cpp | 12 ++++++++++++ include/tool/action_manager.h | 13 ++++++++----- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/common/tool/action_manager.cpp b/common/tool/action_manager.cpp index d38ad1eccf..fde03fb510 100644 --- a/common/tool/action_manager.cpp +++ b/common/tool/action_manager.cpp @@ -53,7 +53,13 @@ void ACTION_MANAGER::RegisterAction( TOOL_ACTION* aAction ) m_actionIdIndex[aAction->m_id] = aAction; if( aAction->HasHotKey() ) + { + // Duplication of hot keys leads to unexpected behaviour + // The right way to change a hotkey is to use ACTION_MANAGER::ClearHotKey() first + assert( m_actionHotKeys.find( aAction->m_currentHotKey ) == m_actionHotKeys.end() ); + m_actionHotKeys[aAction->m_currentHotKey] = aAction; + } aAction->setActionMgr( this ); } @@ -107,6 +113,12 @@ bool ACTION_MANAGER::RunHotKey( int aHotKey ) const } +void ACTION_MANAGER::ClearHotKey( int aHotKey ) +{ + m_actionHotKeys.erase( aHotKey ); +} + + void ACTION_MANAGER::runAction( const TOOL_ACTION* aAction ) const { TOOL_EVENT event = aAction->MakeEvent(); diff --git a/include/tool/action_manager.h b/include/tool/action_manager.h index dbcb7b33b6..fa66a23eba 100644 --- a/include/tool/action_manager.h +++ b/include/tool/action_manager.h @@ -81,18 +81,21 @@ public: */ bool RunAction( const std::string& aActionName ) const; - // TODO to be considered - // bool RunAction( int aActionId ) const; - // bool RunAction( TOOL_ACTION* aAction ) const; - /** * Function RunHotKey() * Runs an action associated with a hotkey (if there is one available). - * @param aHotKey is the hotkey to be served. + * @param aHotKey is the hotkey to be handled. * @return True if there was an action associated with the hotkey, false otherwise. */ bool RunHotKey( int aHotKey ) const; + /** + * Function ClearHotKey() + * Removes an action associated with a hotkey. + * @param aHotKey is the hotkey to be cleared. + */ + void ClearHotKey( int aHotKey ); + private: ///> Tool manager needed to run actions TOOL_MANAGER* m_toolMgr; From fc2d8e91c926d85abad0407c3790d631c2813607 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 5 Dec 2013 14:52:08 +0100 Subject: [PATCH 013/741] Changed selection rules (pads&modules can be selected depending on the 'modules front/back' visibility instead of corresponding copper layers). Fixed comments. --- pcbnew/tools/selection_tool.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 9538f27c4b..f24dbaffd9 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -458,21 +458,21 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) const break; case PCB_PAD_T: - { // Pads are not selectable in multiple selection mode if( m_multiple ) return false; + /* no break */ - // Pads are supposed to be on top, bottom or both at the same time (THT) - if( aItem->IsOnLayer( LAYER_N_FRONT ) && board->IsLayerVisible( LAYER_N_FRONT ) ) + case PCB_MODULE_T: + if( aItem->IsOnLayer( LAYER_N_FRONT ) && board->IsElementVisible( MOD_FR_VISIBLE ) ) return true; - if( aItem->IsOnLayer( LAYER_N_BACK ) && board->IsLayerVisible( LAYER_N_BACK ) ) + if( aItem->IsOnLayer( LAYER_N_BACK ) && board->IsLayerVisible( MOD_BK_VISIBLE ) ) return true; return false; - } - break; + + break; case PCB_MODULE_TEXT_T: // Module texts are not selectable in multiple selection mode @@ -483,7 +483,7 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) const // These are not selectable, otherwise silkscreen drawings would be easily destroyed case PCB_MODULE_EDGE_T: - // and some other stuff that should be selected + // and some other stuff that should not be selected case NOT_USED: case TYPE_NOT_INIT: return false; @@ -516,8 +516,8 @@ void SELECTION_TOOL::selectItem( BOARD_ITEM* aItem ) } } selectBase( m_selection ); - // Modules are treated in a special way - when they are moved, we have to - // move all the parts that make the module, not the module itself + // Modules are treated in a special way - when they are selected, we have to + // select all the parts that make the module, not the module itself if( aItem->Type() == PCB_MODULE_T ) { MODULE* module = static_cast( aItem ); @@ -569,8 +569,8 @@ void SELECTION_TOOL::deselectItem( BOARD_ITEM* aItem ) } } deselectBase( m_selection ); - // Modules are treated in a special way - when they are moved, we have to - // move all the parts that make the module, not the module itself + // Modules are treated in a special way - when they are selected, we have to + // select all the parts that make the module, not the module itself if( aItem->Type() == PCB_MODULE_T ) { MODULE* module = static_cast( aItem ); From aebb8b3ff9c7f10e383e5f1e331d1c3d60312570 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 6 Dec 2013 13:57:56 +0100 Subject: [PATCH 014/741] Fixed an infinite loop in the destructor of ACTION_MANAGER; --- common/tool/action_manager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/tool/action_manager.cpp b/common/tool/action_manager.cpp index fde03fb510..a00d4d08cc 100644 --- a/common/tool/action_manager.cpp +++ b/common/tool/action_manager.cpp @@ -67,13 +67,13 @@ void ACTION_MANAGER::RegisterAction( TOOL_ACTION* aAction ) void ACTION_MANAGER::UnregisterAction( TOOL_ACTION* aAction ) { + m_actionNameIndex.erase( aAction->m_name ); + m_actionIdIndex.erase( aAction->m_id ); + // Indicate that the ACTION_MANAGER no longer care about the object aAction->setActionMgr( NULL ); aAction->setId( -1 ); - m_actionNameIndex.erase( aAction->m_name ); - m_actionIdIndex.erase( aAction->m_id ); - if( aAction->HasHotKey() ) m_actionHotKeys.erase( aAction->m_currentHotKey ); } From d8acd1c7187a6591802a10022c81a5a595bd924f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 9 Dec 2013 10:42:38 +0100 Subject: [PATCH 015/741] Moved Init() & Reset() from TOOL_INTERACTIVE to TOOL_BASE. Added REASON enum for Reset() function, so tools will know why a reset occured. Fixed SELECTION_TOOL (it was bailing out, when a new board was loaded and some items were still selected). Added removal of VIEW_ITEM groups after changing layers and removing items. --- common/tool/tool_manager.cpp | 40 +++++++++++++++------------------ common/view/view.cpp | 12 ++++++++++ common/view/view_item.cpp | 6 ----- include/tool/tool_base.h | 27 ++++++++++++++++++++++ include/tool/tool_interactive.h | 18 --------------- include/tool/tool_manager.h | 6 ++--- pcbnew/basepcbframe.cpp | 11 +++++++-- pcbnew/router/router_tool.cpp | 2 +- pcbnew/router/router_tool.h | 2 +- pcbnew/tools/selection_tool.cpp | 11 ++++++--- pcbnew/tools/selection_tool.h | 2 +- 11 files changed, 80 insertions(+), 57 deletions(-) diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 695203f447..ffc5a2d44b 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -140,22 +140,20 @@ void TOOL_MANAGER::RegisterTool( TOOL_BASE* aTool ) aTool->m_toolMgr = this; - if( aTool->GetType() == INTERACTIVE ) + if( !aTool->Init() ) { - if( !static_cast( aTool )->Init() ) - { - std::string msg = StrPrintf( "Initialization of the %s tool failed", aTool->GetName().c_str() ); + std::string msg = StrPrintf( "Initialization of the %s tool failed", + aTool->GetName().c_str() ); - DisplayError( NULL, wxString::FromUTF8( msg.c_str() ) ); + DisplayError( NULL, wxString::FromUTF8( msg.c_str() ) ); - // Unregister the tool - m_toolState.erase( aTool ); - m_toolNameIndex.erase( aTool->GetName() ); - m_toolIdIndex.erase( aTool->GetId() ); + // Unregister the tool + m_toolState.erase( aTool ); + m_toolNameIndex.erase( aTool->GetName() ); + m_toolIdIndex.erase( aTool->GetId() ); - delete st; - delete aTool; - } + delete st; + delete aTool; } } @@ -251,7 +249,7 @@ bool TOOL_MANAGER::runTool( TOOL_BASE* aTool ) state->idle = false; - static_cast( aTool )->Reset(); + aTool->Reset( TOOL_INTERACTIVE::RUN ); // Add the tool on the front of the processing queue (it gets events first) m_activeTools.push_front( aTool->GetId() ); @@ -282,6 +280,13 @@ TOOL_BASE* TOOL_MANAGER::FindTool( const std::string& aName ) const } +void TOOL_MANAGER::ResetTools( TOOL_BASE::RESET_REASON aReason ) +{ + BOOST_FOREACH( TOOL_BASE* tool, m_toolState | boost::adaptors::map_keys ) + tool->Reset( aReason ); +} + + void TOOL_MANAGER::ScheduleNextState( TOOL_BASE* aTool, TOOL_STATE_FUNC& aHandler, const TOOL_EVENT_LIST& aConditions ) { @@ -513,15 +518,6 @@ void TOOL_MANAGER::SetEnvironment( EDA_ITEM* aModel, KIGFX::VIEW* aView, m_view = aView; m_viewControls = aViewControls; m_editFrame = aFrame; - - // Reset state of the registered tools - BOOST_FOREACH( TOOL_ID toolId, m_activeTools ) - { - TOOL_BASE* tool = m_toolIdIndex[toolId]->theTool; - - if( tool->GetType() == INTERACTIVE ) - static_cast( tool )->Reset(); - } } diff --git a/common/view/view.cpp b/common/view/view.cpp index a68fbc7f71..a607c6112b 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -122,6 +122,12 @@ void VIEW::Remove( VIEW_ITEM* aItem ) { VIEW_LAYER& l = m_layers[layers[i]]; l.items->Remove( aItem ); + MarkTargetDirty( l.target ); + + // Clear the GAL cache + int prevGroup = aItem->getGroup( layers[i] ); + if( prevGroup >= 0 ) + m_gal->DeleteGroup( prevGroup ); } } @@ -930,6 +936,12 @@ void VIEW::updateLayers( VIEW_ITEM* aItem ) VIEW_LAYER& l = m_layers[layers[i]]; l.items->Remove( aItem ); MarkTargetDirty( l.target ); + + // Redraw the item from scratch + int prevGroup = aItem->getGroup( layers[i] ); + + if( prevGroup >= 0 ) + m_gal->DeleteGroup( prevGroup ); } // Add the item to new layer set diff --git a/common/view/view_item.cpp b/common/view/view_item.cpp index e2ddd6a01d..305ab68579 100644 --- a/common/view/view_item.cpp +++ b/common/view/view_item.cpp @@ -34,17 +34,13 @@ void VIEW_ITEM::ViewSetVisible( bool aIsVisible ) bool update = false; if( m_visible != aIsVisible ) - { update = true; - } m_visible = aIsVisible; // update only if the visibility has really changed if( update ) - { ViewUpdate( APPEARANCE ); - } } @@ -60,9 +56,7 @@ void VIEW_ITEM::ViewUpdate( int aUpdateFlags ) void VIEW_ITEM::ViewRelease() { if( m_view && m_view->IsDynamic() ) - { m_view->Remove( this ); - } } diff --git a/include/tool/tool_base.h b/include/tool/tool_base.h index 7425ea8801..681e3099d9 100644 --- a/include/tool/tool_base.h +++ b/include/tool/tool_base.h @@ -70,6 +70,33 @@ public: virtual ~TOOL_BASE() {}; + ///> Determines the reason of reset for a tool + enum RESET_REASON + { + RUN, ///< Tool is invoked after being inactive + MODEL_RELOAD, ///< Model changes + GAL_SWITCH ///< Rendering engine changes + }; + + /** + * Function Init() + * Init() is called once upon a registration of the tool. + * + * @return True if the initialization went fine, false - otherwise. + */ + virtual bool Init() + { + return true; + } + + /** + * Function Reset() + * Brings the tool to a known, initial state. If the tool claimed anything from + * the model or the view, it must release it when its reset. + * @param aReason contains information about the reason of tool reset. + */ + virtual void Reset( RESET_REASON aReason ) = 0; + /** * Function GetType() * Returns the type of the tool. diff --git a/include/tool/tool_interactive.h b/include/tool/tool_interactive.h index 855f84af5c..7e816bd3a4 100644 --- a/include/tool/tool_interactive.h +++ b/include/tool/tool_interactive.h @@ -48,24 +48,6 @@ public: TOOL_INTERACTIVE( const std::string& aName ); virtual ~TOOL_INTERACTIVE(); - /** - * Function Reset() - * Brings the tool to a known, initial state. If the tool claimed anything from - * the model or the view, it must release it when its reset. - */ - virtual void Reset() = 0; - - /** - * Function Init() - * Init() is called once upon a registration of the tool. - * - * @return True if the initialization went fine, false - otherwise. - */ - virtual bool Init() - { - return true; - } - /** * Function SetContextMenu() * diff --git a/include/tool/tool_manager.h b/include/tool/tool_manager.h index 57026c2712..6e9c18acb0 100644 --- a/include/tool/tool_manager.h +++ b/include/tool/tool_manager.h @@ -127,10 +127,10 @@ public: TOOL_BASE* FindTool( const std::string& aName ) const; /** - * Resets the state of a given tool by clearing its wait and - * transition lists and calling tool's internal Reset() method. + * Function ResetTools() + * Resets all tools (i.e. calls their Reset() method). */ - void ResetTool( TOOL_BASE* aTool ); + void ResetTools( TOOL_BASE::RESET_REASON aReason ); /** * Takes an event from the TOOL_DISPATCHER and propagates it to diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index aeda80468a..22983f9063 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -187,7 +187,10 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard ) // update the tool manager with the new board and its view. if( m_toolManager ) + { m_toolManager->SetEnvironment( m_Pcb, view, m_galCanvas->GetViewControls(), this ); + m_toolManager->ResetTools( TOOL_BASE::MODEL_RELOAD ); + } } } @@ -610,8 +613,12 @@ void PCB_BASE_FRAME::UseGalCanvas( bool aEnable ) ViewReloadBoard( m_Pcb ); - m_toolManager->SetEnvironment( m_Pcb, m_galCanvas->GetView(), - m_galCanvas->GetViewControls(), this ); + if( aEnable ) + { + m_toolManager->SetEnvironment( m_Pcb, m_galCanvas->GetView(), + m_galCanvas->GetViewControls(), this ); + m_toolManager->ResetTools( TOOL_BASE::GAL_SWITCH ); + } } diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index d85b1470ae..19b92a42cf 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -72,7 +72,7 @@ ROUTER_TOOL::~ROUTER_TOOL() } -void ROUTER_TOOL::Reset() +void ROUTER_TOOL::Reset( RESET_REASON aReason ) { if( m_router ) delete m_router; diff --git a/pcbnew/router/router_tool.h b/pcbnew/router/router_tool.h index da2a36601d..c43283a051 100644 --- a/pcbnew/router/router_tool.h +++ b/pcbnew/router/router_tool.h @@ -41,7 +41,7 @@ public: ROUTER_TOOL(); ~ROUTER_TOOL(); - void Reset(); + void Reset( RESET_REASON aReason ); int Main( TOOL_EVENT& aEvent ); private: diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index f24dbaffd9..bf78405612 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -64,9 +64,15 @@ SELECTION_TOOL::~SELECTION_TOOL() } -void SELECTION_TOOL::Reset() +void SELECTION_TOOL::Reset( RESET_REASON aReason ) { - ClearSelection(); + if( aReason == TOOL_BASE::MODEL_RELOAD ) + // Remove pointers to the selected items from containers + // without changing their properties (as they are already deleted) + m_selection.Clear(); + else + // Restore previous properties of selected items and remove them from containers + ClearSelection(); // Reinsert the VIEW_GROUP, in case it was removed from the VIEW getView()->Remove( m_selection.group ); @@ -157,7 +163,6 @@ void SELECTION_TOOL::ClearSelection() item->ViewSetVisible( true ); item->ClearSelected(); } - m_selection.Clear(); getEditFrame()->SetCurItem( NULL ); diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index fa6ed0f545..33fc4b2494 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -85,7 +85,7 @@ public: }; /// @copydoc TOOL_INTERACTIVE::Reset() - void Reset(); + void Reset( RESET_REASON aReason ); /** * Function Main() From a3909d4f71852c82fe95cdd33b39d575886d5231 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 9 Dec 2013 11:01:05 +0100 Subject: [PATCH 016/741] Added removal of BOARD_ITEMs for the TOOL_FRAMEWORK. --- pcbnew/tools/common_actions.cpp | 4 + pcbnew/tools/common_actions.h | 3 + pcbnew/tools/edit_tool.cpp | 328 ++++++++++++++++++++++++++++++++ pcbnew/tools/edit_tool.h | 111 +++++++++++ pcbnew/tools/pcb_tools.cpp | 2 + 5 files changed, 448 insertions(+) create mode 100644 pcbnew/tools/edit_tool.cpp create mode 100644 pcbnew/tools/edit_tool.h diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 7a7aef37b1..1a80bd5a9c 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -42,6 +42,10 @@ TOOL_ACTION COMMON_ACTIONS::flip( "pcbnew.InteractiveEdit.flip", AS_CONTEXT, 'F', "Flip", "Flips selected item(s)" ); +TOOL_ACTION COMMON_ACTIONS::remove( "pcbnew.InteractiveEdit.delete", + AS_GLOBAL, 127, // 127 stands for DELETE key + "Remove", "Deletes selected item(s)" ); + TOOL_ACTION COMMON_ACTIONS::properties( "pcbnew.InteractiveEdit.properties", AS_GLOBAL, 'E', "Properties...", "Displays properties window" ); diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index ae12439870..19b0004182 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -49,4 +49,7 @@ public: /// Activation of the edit tool static TOOL_ACTION properties; + + /// Deleting a BOARD_ITEM + static TOOL_ACTION remove; }; diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp new file mode 100644 index 0000000000..c6f46071d5 --- /dev/null +++ b/pcbnew/tools/edit_tool.cpp @@ -0,0 +1,328 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Maciej Suminski + * + * 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 +#include +#include +#include +#include +#include +#include + +#include "common_actions.h" +#include "selection_tool.h" +#include "edit_tool.h" + +using namespace KIGFX; +using boost::optional; + +EDIT_TOOL::EDIT_TOOL() : + TOOL_INTERACTIVE( "pcbnew.InteractiveEdit" ), m_selectionTool( NULL ) +{ +} + + +bool EDIT_TOOL::Init() +{ + // Find the selection tool, so they can cooperate + TOOL_BASE* selectionTool = m_toolMgr->FindTool( "pcbnew.InteractiveSelection" ); + + m_selectionTool = static_cast( selectionTool ); + if( !selectionTool ) + { + DisplayError( NULL, wxT( "pcbnew.InteractiveSelection tool is not available" ) ); + return false; + } + + // Add context menu entries that are displayed when selection tool is active + m_selectionTool->AddMenuItem( COMMON_ACTIONS::editActivate ); + m_selectionTool->AddMenuItem( COMMON_ACTIONS::rotate ); + m_selectionTool->AddMenuItem( COMMON_ACTIONS::flip ); + m_selectionTool->AddMenuItem( COMMON_ACTIONS::remove ); + m_selectionTool->AddMenuItem( COMMON_ACTIONS::properties ); + + setTransitions(); + + return true; +} + + +int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) +{ + const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); + + if( selection.Empty() ) + return 0; // there are no items to operate on + + VECTOR2D dragPosition; + m_dragging = false; + bool restore = false; // Should items' state be restored when finishing the tool? + + VIEW_CONTROLS* controls = getViewControls(); + controls->ShowCursor( true ); + controls->SetSnapping( true ); + controls->SetAutoPan( true ); + + // Main loop: keep receiving events + while( OPT_TOOL_EVENT evt = Wait() ) + { + if( evt->IsCancel() ) + { + restore = true; // Cancelling the tool means that items have to be restored + break; // Finish + } + + // Dispatch TOOL_ACTIONs + else if( evt->Category() == TC_COMMAND ) + { + if( evt->IsAction( &COMMON_ACTIONS::rotate ) ) + Rotate( aEvent ); + else if( evt->IsAction( &COMMON_ACTIONS::flip ) ) + Flip( aEvent ); + } + + else if( evt->IsMotion() || evt->IsDrag( BUT_LEFT ) ) + { + if( m_dragging ) + { + // Drag items to the current cursor position + VECTOR2D movement = ( evt->Position() - dragPosition ); + m_state.Move( movement ); + } + else + { + // Prepare to drag + std::set::iterator it; + + for( it = selection.items.begin(); it != selection.items.end(); ++it ) + { + // Save the state of the selected items, in case it has to be restored + m_state.Save( *it ); + } + + m_dragging = true; + } + + selection.group->ViewUpdate( VIEW_ITEM::GEOMETRY ); + dragPosition = evt->Position(); + } + + else if( evt->IsMouseUp( BUT_LEFT ) || evt->IsClick( BUT_LEFT ) ) + break; // Finish + } + + m_dragging = false; + + if( restore ) + { + // Modifications has to be rollbacked, so restore the previous state of items + selection.group->ItemsViewUpdate( VIEW_ITEM::APPEARANCE ); + m_state.RestoreAll(); + } + else + { + // Changes are applied, so update the items + selection.group->ItemsViewUpdate( m_state.GetUpdateFlag() ); + m_state.Apply(); + } + + controls->ShowCursor( false ); + controls->SetSnapping( false ); + controls->SetAutoPan( false ); + + setTransitions(); + + return 0; +} + + +int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) +{ + const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); + + // Properties are displayed when there is only one item selected + if( selection.items.size() == 1 ) + { + // Display properties dialog + PCB_EDIT_FRAME* editFrame = static_cast( m_toolMgr->GetEditFrame() ); + BOARD_ITEM* item = *selection.items.begin(); + editFrame->OnEditItemRequest( NULL, item ); + + item->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + + setTransitions(); + + return 0; +} + + +int EDIT_TOOL::Rotate( TOOL_EVENT& aEvent ) +{ + const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); + VECTOR2D cursorPos = getView()->ToWorld( getViewControls()->GetCursorPosition() ); + + if( m_dragging ) + { + m_state.Rotate( cursorPos, 900.0 ); + selection.group->ViewUpdate( VIEW_ITEM::GEOMETRY ); + } + else + { + std::set::iterator it; + + for( it = selection.items.begin(); it != selection.items.end(); ++it ) + { + (*it)->Rotate( wxPoint( cursorPos.x, cursorPos.y ), 900.0 ); + (*it)->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + + setTransitions(); + } + + return 0; +} + + +int EDIT_TOOL::Flip( TOOL_EVENT& aEvent ) +{ + const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); + VECTOR2D cursorPos = getView()->ToWorld( getViewControls()->GetCursorPosition() ); + + if( m_dragging ) + { + m_state.Flip( cursorPos ); + selection.group->ViewUpdate( VIEW_ITEM::GEOMETRY ); + } + else + { + std::set::iterator it; + + for( it = selection.items.begin(); it != selection.items.end(); ++it ) + { + (*it)->Flip( wxPoint( cursorPos.x, cursorPos.y ) ); + (*it)->ViewUpdate( KIGFX::VIEW_ITEM::LAYERS ); + } + + setTransitions(); + } + + return 0; +} + + +int EDIT_TOOL::Remove( TOOL_EVENT& aEvent ) +{ + // Get a copy of the selected items set + std::set selectedItems = m_selectionTool->GetSelection().items; + + // As we are about to remove items, they have to be removed from the selection + m_selectionTool->ClearSelection(); + + std::set::iterator it; + for( it = selectedItems.begin(); it != selectedItems.end(); ++it ) + remove( *it ); + + BOARD* board = getModel( PCB_T ); + // Rebuild list of pads and nets if necessary + if( !( board->GetStatus() & NET_CODES_OK ) ) + board->BuildListOfNets(); + + setTransitions(); + + return 0; +} + + +void EDIT_TOOL::remove( BOARD_ITEM* aItem ) +{ + BOARD* board = getModel( PCB_T ); + + switch( aItem->Type() ) + { + case PCB_MODULE_T: + { + MODULE* module = static_cast( aItem ); + + for( D_PAD* pad = module->Pads().GetFirst(); pad; pad = pad->Next() ) + getView()->Remove( pad ); + + for( BOARD_ITEM* drawing = module->GraphicalItems().GetFirst(); drawing; + drawing = drawing->Next() ) + getView()->Remove( drawing ); + + getView()->Remove( &module->Reference() ); + getView()->Remove( &module->Value() ); + + // Module itself is deleted after the switch scope + // list of pads is rebuild by BOARD::BuildListOfNets() + +// module->ClearFlags(); // TODO is it necessary? clearing ratsnest/list of pads? + // Clear flags to indicate, that the ratsnest, list of nets & pads are not valid anymore + board->m_Status_Pcb = 0; + } + break; + + case PCB_ZONE_AREA_T: + getView()->Remove( aItem ); + getModel( PCB_T )->Delete( aItem ); + return; + + // These are not supposed to be removed + case PCB_PAD_T: + case PCB_MODULE_TEXT_T: + case PCB_MODULE_EDGE_T: + return; + + case PCB_LINE_T: // a segment not on copper layers + case PCB_TEXT_T: // a text on a layer + 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) + case PCB_DIMENSION_T: // a dimension (graphic item) + case PCB_TARGET_T: // a target (graphic item) + case PCB_MARKER_T: // a marker used to show something + case PCB_ZONE_T: // SEG_ZONE items are now deprecated + break; + + // TODO + default: // other types do not need to (or should not) be handled + assert( false ); + return; + break; + } + + getView()->Remove( aItem ); + board->Delete( aItem ); +} + + +void EDIT_TOOL::setTransitions() +{ + Go( &EDIT_TOOL::Main, COMMON_ACTIONS::editActivate.MakeEvent() ); + Go( &EDIT_TOOL::Rotate, COMMON_ACTIONS::rotate.MakeEvent() ); + Go( &EDIT_TOOL::Flip, COMMON_ACTIONS::flip.MakeEvent() ); + Go( &EDIT_TOOL::Remove, COMMON_ACTIONS::remove.MakeEvent() ); + Go( &EDIT_TOOL::Properties, COMMON_ACTIONS::properties.MakeEvent() ); +} diff --git a/pcbnew/tools/edit_tool.h b/pcbnew/tools/edit_tool.h new file mode 100644 index 0000000000..3f823eff7d --- /dev/null +++ b/pcbnew/tools/edit_tool.h @@ -0,0 +1,111 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Maciej Suminski + * + * 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 __EDIT_TOOL_H +#define __EDIT_TOOL_H + +#include +#include +#include +#include "item_state.h" + +class BOARD_ITEM; +class SELECTION_TOOL; + +namespace KIGFX +{ +class VIEW_GROUP; +} + +/** + * Class EDIT_TOOL + * + * The interactive edit tool. Allows to move, rotate, flip and change properties of items selected + * using the pcbnew.InteractiveSelection tool. + */ + +class EDIT_TOOL : public TOOL_INTERACTIVE +{ +public: + EDIT_TOOL(); + + /// @copydoc TOOL_INTERACTIVE::Reset() + void Reset( RESET_REASON aReason ) {}; + + /// @copydoc TOOL_INTERACTIVE::Init() + bool Init(); + + /** + * Function Main() + * + * Main loop in which events are handled. + * @param aEvent is the handled event. + */ + int Main( TOOL_EVENT& aEvent ); + + /** + * Function Edit() + * + * Displays properties window for the selected object. + */ + int Properties( TOOL_EVENT& aEvent ); + + /** + * Function Rotate() + * + * Rotates currently selected items. + */ + int Rotate( TOOL_EVENT& aEvent ); + + /** + * Function Flip() + * + * Rotates currently selected items. The rotation point is the current cursor position. + */ + int Flip( TOOL_EVENT& aEvent ); + + /** + * Function Remove() + * + * Deletes currently selected items. The rotation point is the current cursor position. + */ + int Remove( TOOL_EVENT& aEvent ); + +private: + ///> Saves the state of items and allows to restore them + ITEM_STATE m_state; + + ///> Selection tool used for obtaining selected items + SELECTION_TOOL* m_selectionTool; + + ///> Flag determining if anything is being dragged right now + bool m_dragging; + + void remove( BOARD_ITEM* aItem ); + + ///> Sets up handlers for various events + void setTransitions(); +}; + +#endif diff --git a/pcbnew/tools/pcb_tools.cpp b/pcbnew/tools/pcb_tools.cpp index db347e8c4b..bef26764c5 100644 --- a/pcbnew/tools/pcb_tools.cpp +++ b/pcbnew/tools/pcb_tools.cpp @@ -50,6 +50,7 @@ void PCB_EDIT_FRAME::setupTools() m_toolManager->RegisterAction( &COMMON_ACTIONS::editActivate ); m_toolManager->RegisterAction( &COMMON_ACTIONS::rotate ); m_toolManager->RegisterAction( &COMMON_ACTIONS::flip ); + m_toolManager->RegisterAction( &COMMON_ACTIONS::remove ); m_toolManager->RegisterAction( &COMMON_ACTIONS::properties ); // Register tools @@ -59,6 +60,7 @@ void PCB_EDIT_FRAME::setupTools() m_toolManager->SetEnvironment( NULL, m_galCanvas->GetView(), m_galCanvas->GetViewControls(), this ); + m_toolManager->ResetTools( TOOL_BASE::RUN ); // Run the selection tool, it is supposed to be always active m_toolManager->InvokeTool( "pcbnew.InteractiveSelection" ); From 7e60cc530af90502c61d3c38331b7544b834bc47 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 9 Dec 2013 11:07:30 +0100 Subject: [PATCH 017/741] Comments. --- pcbnew/tools/edit_tool.cpp | 7 +++---- pcbnew/tools/edit_tool.h | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index c6f46071d5..f790ca1679 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -238,15 +238,15 @@ int EDIT_TOOL::Remove( TOOL_EVENT& aEvent ) // Get a copy of the selected items set std::set selectedItems = m_selectionTool->GetSelection().items; - // As we are about to remove items, they have to be removed from the selection + // As we are about to remove items, they have to be removed from the selection first m_selectionTool->ClearSelection(); std::set::iterator it; for( it = selectedItems.begin(); it != selectedItems.end(); ++it ) remove( *it ); - BOARD* board = getModel( PCB_T ); // Rebuild list of pads and nets if necessary + BOARD* board = getModel( PCB_T ); if( !( board->GetStatus() & NET_CODES_OK ) ) board->BuildListOfNets(); @@ -276,10 +276,9 @@ void EDIT_TOOL::remove( BOARD_ITEM* aItem ) getView()->Remove( &module->Reference() ); getView()->Remove( &module->Value() ); - // Module itself is deleted after the switch scope + // Module itself is deleted after the switch scope is finished // list of pads is rebuild by BOARD::BuildListOfNets() -// module->ClearFlags(); // TODO is it necessary? clearing ratsnest/list of pads? // Clear flags to indicate, that the ratsnest, list of nets & pads are not valid anymore board->m_Status_Pcb = 0; } diff --git a/pcbnew/tools/edit_tool.h b/pcbnew/tools/edit_tool.h index 3f823eff7d..2e60a21fa3 100644 --- a/pcbnew/tools/edit_tool.h +++ b/pcbnew/tools/edit_tool.h @@ -102,6 +102,7 @@ private: ///> Flag determining if anything is being dragged right now bool m_dragging; + ///> Removes and frees a single BOARD_ITEM. void remove( BOARD_ITEM* aItem ); ///> Sets up handlers for various events From 4a0407fb69c46def2c85b3697e1070c44c19d3a2 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 18 Dec 2013 12:46:18 +0100 Subject: [PATCH 018/741] Removed some debug logs. --- common/gal/opengl/gpu_manager.cpp | 14 ++++++-------- common/view/view.cpp | 12 ++++++------ pcbnew/router/trace.h | 3 ++- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/common/gal/opengl/gpu_manager.cpp b/common/gal/opengl/gpu_manager.cpp index 8b556b32ce..25cd5fa418 100644 --- a/common/gal/opengl/gpu_manager.cpp +++ b/common/gal/opengl/gpu_manager.cpp @@ -34,11 +34,11 @@ #include #include #include -#ifdef __WXDEBUG__ +#ifdef PROFILE #include #include #include -#endif +#endif /* PROFILE */ using namespace KIGFX; @@ -187,10 +187,10 @@ void GPU_CACHED_MANAGER::EndDrawing() void GPU_CACHED_MANAGER::uploadToGpu() { -#ifdef __WXDEBUG__ +#ifdef PROFILE prof_counter totalTime; prof_start( &totalTime ); -#endif /* __WXDEBUG__ */ +#endif /* PROFILE */ if( !m_buffersInitialized ) Initialize(); @@ -207,15 +207,13 @@ void GPU_CACHED_MANAGER::uploadToGpu() m_indices.reset( new GLuint[bufferSize] ); if( glGetError() != GL_NO_ERROR ) - { DisplayError( NULL, wxT( "Error during data upload to the GPU memory" ) ); - } -#ifdef __WXDEBUG__ +#ifdef PROFILE prof_end( &totalTime ); wxLogDebug( wxT( "Uploading %d vertices to GPU / %.1f ms" ), bufferSize, totalTime.msecs() ); -#endif /* __WXDEBUG__ */ +#endif /* PROFILE */ } diff --git a/common/view/view.cpp b/common/view/view.cpp index a607c6112b..0ff8708ed0 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -34,9 +34,9 @@ #include #include -#ifdef __WXDEBUG__ +#ifdef PROFILE #include -#endif /* __WXDEBUG__ */ +#endif /* PROFILE */ using namespace KIGFX; @@ -981,10 +981,10 @@ void VIEW::RecacheAllItems( bool aImmediately ) r.SetMaximum(); -#ifdef __WXDEBUG__ +#ifdef PROFILE prof_counter totalRealTime; prof_start( &totalRealTime ); -#endif /* __WXDEBUG__ */ +#endif /* PROFILE */ for( LAYER_MAP_ITER i = m_layers.begin(); i != m_layers.end(); ++i ) { @@ -1000,12 +1000,12 @@ void VIEW::RecacheAllItems( bool aImmediately ) } } -#ifdef __WXDEBUG__ +#ifdef PROFILE prof_end( &totalRealTime ); wxLogDebug( wxT( "RecacheAllItems::immediately: %u %.1f ms" ), aImmediately, totalRealTime.msecs() ); -#endif /* __WXDEBUG__ */ +#endif /* PROFILE */ } diff --git a/pcbnew/router/trace.h b/pcbnew/router/trace.h index b1acfd688f..1f8a3e32c9 100644 --- a/pcbnew/router/trace.h +++ b/pcbnew/router/trace.h @@ -21,7 +21,8 @@ #ifndef __TRACE_H #define __TRACE_H -#ifdef DEBUG +// #ifdef DEBUG +#if 0 #include #include From 32065b339a2764a336f80fdffd726fb30337ddce Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 18 Dec 2013 13:27:18 +0100 Subject: [PATCH 019/741] Added const modifiers where applicable (PICKED_ITEMS_LIST). Added PICKED_ITEMS_LIST::FindItem(). --- common/class_undoredo_container.cpp | 26 +++++++++++++++++++------- cvpcb/class_DisplayFootprintsFrame.h | 2 +- eeschema/schematic_undo_redo.cpp | 2 +- gerbview/gerbview_frame.h | 2 +- include/class_undoredo_container.h | 23 +++++++++++++++-------- include/wxBasePcbFrame.h | 2 +- include/wxEeschemaStruct.h | 2 +- include/wxPcbStruct.h | 2 +- pcbnew/board_undo_redo.cpp | 2 +- pcbnew/footprint_wizard_frame.h | 2 +- pcbnew/modedit_undo_redo.cpp | 2 +- pcbnew/module_editor_frame.h | 2 +- pcbnew/modview_frame.h | 2 +- 13 files changed, 45 insertions(+), 26 deletions(-) diff --git a/common/class_undoredo_container.cpp b/common/class_undoredo_container.cpp index e56d765139..2dd862ef01 100644 --- a/common/class_undoredo_container.cpp +++ b/common/class_undoredo_container.cpp @@ -50,7 +50,7 @@ PICKED_ITEMS_LIST::~PICKED_ITEMS_LIST() } -void PICKED_ITEMS_LIST::PushItem( ITEM_PICKER& aItem ) +void PICKED_ITEMS_LIST::PushItem( const ITEM_PICKER& aItem ) { m_ItemsList.push_back( aItem ); } @@ -70,7 +70,7 @@ ITEM_PICKER PICKED_ITEMS_LIST::PopItem() } -bool PICKED_ITEMS_LIST::ContainsItem( EDA_ITEM* aItem ) const +bool PICKED_ITEMS_LIST::ContainsItem( const EDA_ITEM* aItem ) const { for( size_t i = 0; i < m_ItemsList.size(); i++ ) { @@ -82,6 +82,18 @@ bool PICKED_ITEMS_LIST::ContainsItem( EDA_ITEM* aItem ) const } +int PICKED_ITEMS_LIST::FindItem( const EDA_ITEM* aItem ) const +{ + for( size_t i = 0; i < m_ItemsList.size(); i++ ) + { + if( m_ItemsList[i].GetItem() == aItem ) + return i; + } + + return -1; +} + + void PICKED_ITEMS_LIST::ClearItemsList() { m_ItemsList.clear(); @@ -157,7 +169,7 @@ void PICKED_ITEMS_LIST::ClearListAndDeleteItems() } -ITEM_PICKER PICKED_ITEMS_LIST::GetItemWrapper( unsigned int aIdx ) +ITEM_PICKER PICKED_ITEMS_LIST::GetItemWrapper( unsigned int aIdx ) const { ITEM_PICKER picker; @@ -168,7 +180,7 @@ ITEM_PICKER PICKED_ITEMS_LIST::GetItemWrapper( unsigned int aIdx ) } -EDA_ITEM* PICKED_ITEMS_LIST::GetPickedItem( unsigned int aIdx ) +EDA_ITEM* PICKED_ITEMS_LIST::GetPickedItem( unsigned int aIdx ) const { if( aIdx < m_ItemsList.size() ) return m_ItemsList[aIdx].GetItem(); @@ -177,7 +189,7 @@ EDA_ITEM* PICKED_ITEMS_LIST::GetPickedItem( unsigned int aIdx ) } -EDA_ITEM* PICKED_ITEMS_LIST::GetPickedItemLink( unsigned int aIdx ) +EDA_ITEM* PICKED_ITEMS_LIST::GetPickedItemLink( unsigned int aIdx ) const { if( aIdx < m_ItemsList.size() ) return m_ItemsList[aIdx].GetLink(); @@ -186,7 +198,7 @@ EDA_ITEM* PICKED_ITEMS_LIST::GetPickedItemLink( unsigned int aIdx ) } -UNDO_REDO_T PICKED_ITEMS_LIST::GetPickedItemStatus( unsigned int aIdx ) +UNDO_REDO_T PICKED_ITEMS_LIST::GetPickedItemStatus( unsigned int aIdx ) const { if( aIdx < m_ItemsList.size() ) return m_ItemsList[aIdx].GetStatus(); @@ -195,7 +207,7 @@ UNDO_REDO_T PICKED_ITEMS_LIST::GetPickedItemStatus( unsigned int aIdx ) } -STATUS_FLAGS PICKED_ITEMS_LIST::GetPickerFlags( unsigned aIdx ) +STATUS_FLAGS PICKED_ITEMS_LIST::GetPickerFlags( unsigned aIdx ) const { if( aIdx < m_ItemsList.size() ) return m_ItemsList[aIdx].GetFlags(); diff --git a/cvpcb/class_DisplayFootprintsFrame.h b/cvpcb/class_DisplayFootprintsFrame.h index 52b1366813..3244d62325 100644 --- a/cvpcb/class_DisplayFootprintsFrame.h +++ b/cvpcb/class_DisplayFootprintsFrame.h @@ -124,7 +124,7 @@ public: * @param aTransformPoint = the reference point of the transformation, * for commands like move */ - virtual void SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList, + virtual void SaveCopyInUndoList( const PICKED_ITEMS_LIST& aItemsList, UNDO_REDO_T aTypeCommand, const wxPoint& aTransformPoint = wxPoint( 0, 0 ) ) { diff --git a/eeschema/schematic_undo_redo.cpp b/eeschema/schematic_undo_redo.cpp index 4481e8cce0..1ab8948d78 100644 --- a/eeschema/schematic_undo_redo.cpp +++ b/eeschema/schematic_undo_redo.cpp @@ -160,7 +160,7 @@ void SCH_EDIT_FRAME::SaveCopyInUndoList( SCH_ITEM* aItem, } -void SCH_EDIT_FRAME::SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList, +void SCH_EDIT_FRAME::SaveCopyInUndoList( const PICKED_ITEMS_LIST& aItemsList, UNDO_REDO_T aTypeCommand, const wxPoint& aTransformPoint ) { diff --git a/gerbview/gerbview_frame.h b/gerbview/gerbview_frame.h index 6a69191706..9cabd38b16 100644 --- a/gerbview/gerbview_frame.h +++ b/gerbview/gerbview_frame.h @@ -676,7 +676,7 @@ public: * @param aTransformPoint = the reference point of the transformation, * for commands like move */ - void SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList, + void SaveCopyInUndoList( const PICKED_ITEMS_LIST& aItemsList, UNDO_REDO_T aTypeCommand, const wxPoint& aTransformPoint = wxPoint( 0, 0 ) ) { diff --git a/include/class_undoredo_container.h b/include/class_undoredo_container.h index 6c95bae24d..13c9e85b23 100644 --- a/include/class_undoredo_container.h +++ b/include/class_undoredo_container.h @@ -111,7 +111,7 @@ public: void SetStatus( UNDO_REDO_T aStatus ) { m_undoRedoStatus = aStatus; } - UNDO_REDO_T GetStatus() { return m_undoRedoStatus; } + UNDO_REDO_T GetStatus() const { return m_undoRedoStatus; } void SetFlags( STATUS_FLAGS aFlags ) { m_pickerFlags = aFlags; } @@ -148,7 +148,7 @@ public: * pushes \a aItem to the top of the list * @param aItem Picker to push on to the list. */ - void PushItem( ITEM_PICKER& aItem ); + void PushItem( const ITEM_PICKER& aItem ); /** * Function PopItem @@ -160,7 +160,14 @@ public: * Function IsItemInList * @return True if \a aItem is found in the pick list. */ - bool ContainsItem( EDA_ITEM* aItem ) const; + bool ContainsItem( const EDA_ITEM* aItem ) const; + + /** + * Function FindItem + * @return Index of the searched item. If the item is not stored in the list, negative value + * is returned. + */ + int FindItem( const EDA_ITEM* aItem ) const; /** * Function ClearItemsList @@ -201,21 +208,21 @@ public: * if this picker does not exist, a picker is returned, * with its members set to 0 or NULL */ - ITEM_PICKER GetItemWrapper( unsigned int aIdx ); + ITEM_PICKER GetItemWrapper( unsigned int aIdx ) const; /** * Function GetPickedItem * @return A pointer to the picked item * @param aIdx Index of the picked item in the picked list */ - EDA_ITEM* GetPickedItem( unsigned int aIdx ); + EDA_ITEM* GetPickedItem( unsigned int aIdx ) const; /** * Function GetPickedItemLink * @return link of the picked item, or null if does not exist * @param aIdx Index of the picked item in the picked list */ - EDA_ITEM* GetPickedItemLink( unsigned int aIdx ); + EDA_ITEM* GetPickedItemLink( unsigned int aIdx ) const; /** * Function GetPickedItemStatus @@ -223,7 +230,7 @@ public: * or UR_UNSPECIFIED if does not exist * @param aIdx Index of the picked item in the picked list */ - UNDO_REDO_T GetPickedItemStatus( unsigned int aIdx ); + UNDO_REDO_T GetPickedItemStatus( unsigned int aIdx ) const; /** * Function GetPickerFlags @@ -231,7 +238,7 @@ public: * @param aIdx Index of the picker in the picked list * @return The value stored in the picker, if the picker exists, or 0 if does not exist */ - STATUS_FLAGS GetPickerFlags( unsigned aIdx ); + STATUS_FLAGS GetPickerFlags( unsigned aIdx ) const; /** * Function SetPickedItem diff --git a/include/wxBasePcbFrame.h b/include/wxBasePcbFrame.h index ff0db2f2c2..cbc96f31df 100644 --- a/include/wxBasePcbFrame.h +++ b/include/wxBasePcbFrame.h @@ -669,7 +669,7 @@ public: * @param aTransformPoint = the reference point of the transformation, * for commands like move */ - virtual void SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList, + virtual void SaveCopyInUndoList( const PICKED_ITEMS_LIST& aItemsList, UNDO_REDO_T aTypeCommand, const wxPoint& aTransformPoint = wxPoint( 0, 0 ) ) = 0; diff --git a/include/wxEeschemaStruct.h b/include/wxEeschemaStruct.h index b3f60bac0f..30a5b3827a 100644 --- a/include/wxEeschemaStruct.h +++ b/include/wxEeschemaStruct.h @@ -1080,7 +1080,7 @@ public: * @param aTransformPoint = the reference point of the transformation, * for commands like move */ - void SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList, + void SaveCopyInUndoList( const PICKED_ITEMS_LIST& aItemsList, UNDO_REDO_T aTypeCommand, const wxPoint& aTransformPoint = wxPoint( 0, 0 ) ); diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index fc7d379a07..33ab87d567 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -659,7 +659,7 @@ public: * @param aTransformPoint = the reference point of the transformation, for * commands like move */ - virtual void SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList, + virtual void SaveCopyInUndoList( const PICKED_ITEMS_LIST& aItemsList, UNDO_REDO_T aTypeCommand, const wxPoint& aTransformPoint = wxPoint( 0, 0 ) ); diff --git a/pcbnew/board_undo_redo.cpp b/pcbnew/board_undo_redo.cpp index e58e734320..36a073d065 100644 --- a/pcbnew/board_undo_redo.cpp +++ b/pcbnew/board_undo_redo.cpp @@ -346,7 +346,7 @@ void PCB_EDIT_FRAME::SaveCopyInUndoList( BOARD_ITEM* aItem, } -void PCB_EDIT_FRAME::SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList, +void PCB_EDIT_FRAME::SaveCopyInUndoList( const PICKED_ITEMS_LIST& aItemsList, UNDO_REDO_T aTypeCommand, const wxPoint& aTransformPoint ) { diff --git a/pcbnew/footprint_wizard_frame.h b/pcbnew/footprint_wizard_frame.h index f65ee1d62d..9027e29e73 100644 --- a/pcbnew/footprint_wizard_frame.h +++ b/pcbnew/footprint_wizard_frame.h @@ -198,7 +198,7 @@ private: */ void OnLeftDClick( wxDC*, const wxPoint& ) {} void SaveCopyInUndoList( BOARD_ITEM*, UNDO_REDO_T, const wxPoint& ) {} - void SaveCopyInUndoList( PICKED_ITEMS_LIST&, UNDO_REDO_T, const wxPoint& ) {} + void SaveCopyInUndoList( const PICKED_ITEMS_LIST&, UNDO_REDO_T, const wxPoint& ) {} DECLARE_EVENT_TABLE() diff --git a/pcbnew/modedit_undo_redo.cpp b/pcbnew/modedit_undo_redo.cpp index 4f273eb3c7..613f4d8d2b 100644 --- a/pcbnew/modedit_undo_redo.cpp +++ b/pcbnew/modedit_undo_redo.cpp @@ -46,7 +46,7 @@ void FOOTPRINT_EDIT_FRAME::SaveCopyInUndoList( BOARD_ITEM* aItem, } -void FOOTPRINT_EDIT_FRAME::SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList, +void FOOTPRINT_EDIT_FRAME::SaveCopyInUndoList( const PICKED_ITEMS_LIST& aItemsList, UNDO_REDO_T aTypeCommand, const wxPoint& aTransformPoint ) { diff --git a/pcbnew/module_editor_frame.h b/pcbnew/module_editor_frame.h index 01e9a304ca..49682348e5 100644 --- a/pcbnew/module_editor_frame.h +++ b/pcbnew/module_editor_frame.h @@ -245,7 +245,7 @@ public: * @param aTransformPoint = the reference point of the transformation, for * commands like move */ - virtual void SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList, + virtual void SaveCopyInUndoList( const PICKED_ITEMS_LIST& aItemsList, UNDO_REDO_T aTypeCommand, const wxPoint& aTransformPoint = wxPoint( 0, 0 ) ); diff --git a/pcbnew/modview_frame.h b/pcbnew/modview_frame.h index c833e5c10c..0e099e4fea 100644 --- a/pcbnew/modview_frame.h +++ b/pcbnew/modview_frame.h @@ -202,7 +202,7 @@ private: */ void OnLeftDClick( wxDC*, const wxPoint& ) {} void SaveCopyInUndoList( BOARD_ITEM*, UNDO_REDO_T, const wxPoint& ) {} - void SaveCopyInUndoList( PICKED_ITEMS_LIST&, UNDO_REDO_T, const wxPoint &) {} + void SaveCopyInUndoList( const PICKED_ITEMS_LIST&, UNDO_REDO_T, const wxPoint &) {} DECLARE_EVENT_TABLE() From e4efe212d6f9f017107a97a0d536e0612f2bedc6 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 18 Dec 2013 13:39:11 +0100 Subject: [PATCH 020/741] Added MODULE::RunOnChildren(). --- pcbnew/basepcbframe.cpp | 29 +++-------------------------- pcbnew/class_module.cpp | 13 +++++++++++++ pcbnew/class_module.h | 9 +++++++++ 3 files changed, 25 insertions(+), 26 deletions(-) diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 22983f9063..95b356d915 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -200,46 +200,25 @@ void PCB_BASE_FRAME::ViewReloadBoard( const BOARD* aBoard ) const KIGFX::VIEW* view = m_galCanvas->GetView(); view->Clear(); - // All of PCB drawing elements should be added to the VIEW - // in order to be displayed + // All the PCB drawable items should be added to the VIEW in order to be displayed // Load zones for( int i = 0; i < aBoard->GetAreaCount(); ++i ) - { view->Add( (KIGFX::VIEW_ITEM*) ( aBoard->GetArea( i ) ) ); - } // Load drawings for( BOARD_ITEM* drawing = aBoard->m_Drawings; drawing; drawing = drawing->Next() ) - { view->Add( drawing ); - } // Load tracks for( TRACK* track = aBoard->m_Track; track; track = track->Next() ) - { view->Add( track ); - } // Load modules and its additional elements for( MODULE* module = aBoard->m_Modules; module; module = module->Next() ) { - // Load module's pads - for( D_PAD* pad = module->Pads().GetFirst(); pad; pad = pad->Next() ) - { - view->Add( pad ); - } - - // Load module's drawing (mostly silkscreen) - for( BOARD_ITEM* drawing = module->GraphicalItems().GetFirst(); drawing; - drawing = drawing->Next() ) - { - view->Add( drawing ); - } - - // Load module's texts (name and value) - view->Add( &module->Reference() ); - view->Add( &module->Value() ); + // Load items that belong to a module + module->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Add ), view ) ); // Add the module itself view->Add( module ); @@ -247,9 +226,7 @@ void PCB_BASE_FRAME::ViewReloadBoard( const BOARD* aBoard ) const // Segzones (equivalent of ZONE_CONTAINER for legacy boards) for( SEGZONE* zone = aBoard->m_Zone; zone; zone = zone->Next() ) - { view->Add( zone ); - } // Add an entry for the worksheet layout KIGFX::WORKSHEET_VIEWITEM* worksheet = new KIGFX::WORKSHEET_VIEWITEM( diff --git a/pcbnew/class_module.cpp b/pcbnew/class_module.cpp index 9694607a39..1885eb16c9 100644 --- a/pcbnew/class_module.cpp +++ b/pcbnew/class_module.cpp @@ -728,6 +728,19 @@ EDA_ITEM* MODULE::Clone() const } +void MODULE::RunOnChildren( boost::function aFunction ) +{ + for( D_PAD* pad = m_Pads.GetFirst(); pad; pad = pad->Next() ) + aFunction( static_cast( pad ) ); + + for( BOARD_ITEM* drawing = m_Drawings.GetFirst(); drawing; drawing = drawing->Next() ) + aFunction( drawing ); + + aFunction( static_cast( m_Reference ) ); + aFunction( static_cast( m_Value ) ); +} + + void MODULE::ViewUpdate( int aUpdateFlags ) { if( !m_view ) diff --git a/pcbnew/class_module.h b/pcbnew/class_module.h index a1564db05e..dbea0179d9 100644 --- a/pcbnew/class_module.h +++ b/pcbnew/class_module.h @@ -41,6 +41,7 @@ #include #include "zones.h" +#include class LINE_READER; class EDA_3D_CANVAS; @@ -447,6 +448,14 @@ public: EDA_ITEM* Clone() const; + /** + * Function RunOnChildren + * + * Invokes a function on all BOARD_ITEMs that belong to the module (pads, drawings, texts). + * @param aFunction is the function to be invoked. + */ + void RunOnChildren( boost::function aFunction ); + /// @copydoc VIEW_ITEM::ViewUpdate() void ViewUpdate( int aUpdateFlags ); From 873235304e4781c190861d128c771e2da8e582b3 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 18 Dec 2013 14:33:34 +0100 Subject: [PATCH 021/741] SELECTION_TOOL uses ITEMS_PICKED_LIST to store selected items. Modifications done using the EDIT_TOOL are saved using the default KiCad's undo buffer. If there is only one item selected, info about the item is displayed in the bottom status bar. --- pcbnew/board_undo_redo.cpp | 58 +++++++ pcbnew/tools/edit_tool.cpp | 144 ++++++++++------ pcbnew/tools/edit_tool.h | 14 +- pcbnew/tools/item_state.h | 284 -------------------------------- pcbnew/tools/selection_tool.cpp | 132 ++++++--------- pcbnew/tools/selection_tool.h | 38 +++-- 6 files changed, 231 insertions(+), 439 deletions(-) delete mode 100644 pcbnew/tools/item_state.h diff --git a/pcbnew/board_undo_redo.cpp b/pcbnew/board_undo_redo.cpp index 36a073d065..fb8578fa4f 100644 --- a/pcbnew/board_undo_redo.cpp +++ b/pcbnew/board_undo_redo.cpp @@ -25,6 +25,7 @@ #include #include +#include #include #include @@ -40,6 +41,8 @@ #include #include +#include +#include /* Functions to undo and redo edit commands. * commands to undo are stored in CurrentScreen->m_UndoList @@ -424,6 +427,7 @@ void PCB_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRed BOARD_ITEM* item; bool not_found = false; bool reBuild_ratsnest = false; + KIGFX::VIEW* view = m_galCanvas->GetView(); // Undo in the reverse order of list creation: (this can allow stacked changes // like the same item can be changes and deleted in the same complex command @@ -484,35 +488,80 @@ void PCB_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRed case UR_CHANGED: /* Exchange old and new data for each item */ { BOARD_ITEM* image = (BOARD_ITEM*) aList->GetPickedItemLink( ii ); + + // Remove all pads/drawings/texts, as they become invalid + // for the VIEW after SwapData() called for modules + if( item->Type() == PCB_MODULE_T ) + { + MODULE* oldModule = static_cast( item ); + oldModule->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Remove ), + view ) ); + } + item->SwapData( image ); + + // Update all pads/drawings/texts, as they become invalid + // for the VIEW after SwapData() called for modules + if( item->Type() == PCB_MODULE_T ) + { + MODULE* newModule = static_cast( item ); + newModule->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Add ), + view ) ); + } + + item->ViewUpdate( KIGFX::VIEW_ITEM::LAYERS ); } break; case UR_NEW: /* new items are deleted */ aList->SetPickedItemStatus( UR_DELETED, ii ); GetBoard()->Remove( item ); + + if( item->Type() == PCB_MODULE_T ) + { + MODULE* module = static_cast( item ); + module->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Remove ), + view ) ); + } + view->Remove( item ); + + item->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); break; case UR_DELETED: /* deleted items are put in List, as new items */ aList->SetPickedItemStatus( UR_NEW, ii ); GetBoard()->Add( item ); + + if( item->Type() == PCB_MODULE_T ) + { + MODULE* module = static_cast( item ); + module->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Add ), + view ) ); + } + view->Add( item ); + + item->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); build_item_list = true; break; case UR_MOVED: item->Move( aRedoCommand ? aList->m_TransformPoint : -aList->m_TransformPoint ); + item->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); break; case UR_ROTATED: item->Rotate( aList->m_TransformPoint, aRedoCommand ? 900 : -900 ); + item->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); break; case UR_ROTATED_CLOCKWISE: item->Rotate( aList->m_TransformPoint, aRedoCommand ? -900 : 900 ); + item->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); break; case UR_FLIPPED: item->Flip( aList->m_TransformPoint ); + item->ViewUpdate( KIGFX::VIEW_ITEM::LAYERS ); break; default: @@ -540,6 +589,11 @@ void PCB_EDIT_FRAME::GetBoardFromUndoList( wxCommandEvent& event ) if( GetScreen()->GetUndoCommandCount() <= 0 ) return; + // Clear the selection, as it may be altered with undone items + SELECTION_TOOL* selectionTool = static_cast( m_toolManager->FindTool( + "pcbnew.InteractiveSelection" ) ); + selectionTool->ClearSelection(); + /* Get the old list */ PICKED_ITEMS_LIST* List = GetScreen()->PopCommandFromUndoList(); /* Undo the command */ @@ -559,6 +613,10 @@ void PCB_EDIT_FRAME::GetBoardFromRedoList( wxCommandEvent& event ) if( GetScreen()->GetRedoCommandCount() == 0 ) return; + // Clear the selection, as it may be altered with redone items + SELECTION_TOOL* selectionTool = static_cast( m_toolManager->FindTool( + "pcbnew.InteractiveSelection" ) ); + selectionTool->ClearSelection(); /* Get the old list */ PICKED_ITEMS_LIST* List = GetScreen()->PopCommandFromRedoList(); diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index f790ca1679..e8accb4ca7 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -72,11 +72,15 @@ bool EDIT_TOOL::Init() int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); + PCB_EDIT_FRAME* editFrame = static_cast( m_toolMgr->GetEditFrame() ); + + // By default, modified items need to update their geometry + m_updateFlag = KIGFX::VIEW_ITEM::GEOMETRY; if( selection.Empty() ) return 0; // there are no items to operate on - VECTOR2D dragPosition; + VECTOR2D dragPosition; // The last position of the cursor while dragging m_dragging = false; bool restore = false; // Should items' state be restored when finishing the tool? @@ -98,9 +102,16 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) else if( evt->Category() == TC_COMMAND ) { if( evt->IsAction( &COMMON_ACTIONS::rotate ) ) + { Rotate( aEvent ); + } else if( evt->IsAction( &COMMON_ACTIONS::flip ) ) + { Flip( aEvent ); + + // Flip causes change of layers + enableUpdateFlag( KIGFX::VIEW_ITEM::LAYERS ); + } } else if( evt->IsMotion() || evt->IsDrag( BUT_LEFT ) ) @@ -109,19 +120,24 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) { // Drag items to the current cursor position VECTOR2D movement = ( evt->Position() - dragPosition ); - m_state.Move( movement ); + for( unsigned int i = 0; i < selection.items.GetCount(); ++i ) + { + BOARD_ITEM* item = static_cast( selection.items.GetPickedItem( i ) ); + item->Move( wxPoint( movement.x, movement.y ) ); + } } else { - // Prepare to drag - std::set::iterator it; - - for( it = selection.items.begin(); it != selection.items.end(); ++it ) + // Prepare to drag - save items, so changes can be undone + for( unsigned int i = 0; i < selection.items.GetCount(); ++i ) { - // Save the state of the selected items, in case it has to be restored - m_state.Save( *it ); + BOARD_ITEM* item = static_cast( selection.items.GetPickedItem( i ) ); + std::cout << "saved " << (unsigned long) item << std::endl; } + editFrame->OnModify(); + editFrame->SaveCopyInUndoList( selection.items, UR_CHANGED ); + m_dragging = true; } @@ -138,14 +154,13 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) if( restore ) { // Modifications has to be rollbacked, so restore the previous state of items - selection.group->ItemsViewUpdate( VIEW_ITEM::APPEARANCE ); - m_state.RestoreAll(); + wxCommandEvent dummy; + editFrame->GetBoardFromUndoList( dummy ); } else { // Changes are applied, so update the items - selection.group->ItemsViewUpdate( m_state.GetUpdateFlag() ); - m_state.Apply(); + selection.group->ItemsViewUpdate( m_updateFlag ); } controls->ShowCursor( false ); @@ -161,13 +176,20 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); + PCB_EDIT_FRAME* editFrame = static_cast( m_toolMgr->GetEditFrame() ); // Properties are displayed when there is only one item selected - if( selection.items.size() == 1 ) + if( selection.Size() == 1 ) { // Display properties dialog - PCB_EDIT_FRAME* editFrame = static_cast( m_toolMgr->GetEditFrame() ); - BOARD_ITEM* item = *selection.items.begin(); + BOARD_ITEM* item = static_cast( selection.items.GetPickedItem( 0 ) ); + + if( !m_dragging ) // If it is being dragged, then it is already saved with UR_CHANGED flag + { + editFrame->SaveCopyInUndoList( item, UR_CHANGED ); + editFrame->OnModify(); + } + editFrame->OnEditItemRequest( NULL, item ); item->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); @@ -182,25 +204,28 @@ int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) int EDIT_TOOL::Rotate( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); - VECTOR2D cursorPos = getView()->ToWorld( getViewControls()->GetCursorPosition() ); + VECTOR2D cursor = getView()->ToWorld( getViewControls()->GetCursorPosition() ); + PCB_EDIT_FRAME* editFrame = static_cast( m_toolMgr->GetEditFrame() ); + + if( !m_dragging ) // If it is being dragged, then it is already saved with UR_CHANGED flag + { + editFrame->OnModify(); + editFrame->SaveCopyInUndoList( selection.items, UR_ROTATED, wxPoint( cursor.x, cursor.y ) ); + } + + for( unsigned int i = 0; i < selection.items.GetCount(); ++i ) + { + BOARD_ITEM* item = static_cast( selection.items.GetPickedItem( i ) ); + + item->Rotate( wxPoint( cursor.x, cursor.y ), 900.0 ); + if( !m_dragging ) + item->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } if( m_dragging ) - { - m_state.Rotate( cursorPos, 900.0 ); - selection.group->ViewUpdate( VIEW_ITEM::GEOMETRY ); - } - else - { - std::set::iterator it; + selection.group->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - for( it = selection.items.begin(); it != selection.items.end(); ++it ) - { - (*it)->Rotate( wxPoint( cursorPos.x, cursorPos.y ), 900.0 ); - (*it)->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - } - - setTransitions(); - } + setTransitions(); return 0; } @@ -209,25 +234,28 @@ int EDIT_TOOL::Rotate( TOOL_EVENT& aEvent ) int EDIT_TOOL::Flip( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); - VECTOR2D cursorPos = getView()->ToWorld( getViewControls()->GetCursorPosition() ); + VECTOR2D cursor = getView()->ToWorld( getViewControls()->GetCursorPosition() ); + PCB_EDIT_FRAME* editFrame = static_cast( m_toolMgr->GetEditFrame() ); + + if( !m_dragging ) // If it is being dragged, then it is already saved with UR_CHANGED flag + { + editFrame->OnModify(); + editFrame->SaveCopyInUndoList( selection.items, UR_FLIPPED, wxPoint( cursor.x, cursor.y ) ); + } + + for( unsigned int i = 0; i < selection.items.GetCount(); ++i ) + { + BOARD_ITEM* item = static_cast( selection.items.GetPickedItem( i ) ); + + item->Flip( wxPoint( cursor.x, cursor.y ) ); + if( !m_dragging ) + item->ViewUpdate( KIGFX::VIEW_ITEM::LAYERS ); + } if( m_dragging ) - { - m_state.Flip( cursorPos ); - selection.group->ViewUpdate( VIEW_ITEM::GEOMETRY ); - } - else - { - std::set::iterator it; + selection.group->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - for( it = selection.items.begin(); it != selection.items.end(); ++it ) - { - (*it)->Flip( wxPoint( cursorPos.x, cursorPos.y ) ); - (*it)->ViewUpdate( KIGFX::VIEW_ITEM::LAYERS ); - } - - setTransitions(); - } + setTransitions(); return 0; } @@ -236,14 +264,24 @@ int EDIT_TOOL::Flip( TOOL_EVENT& aEvent ) int EDIT_TOOL::Remove( TOOL_EVENT& aEvent ) { // Get a copy of the selected items set - std::set selectedItems = m_selectionTool->GetSelection().items; + PICKED_ITEMS_LIST selectedItems = m_selectionTool->GetSelection().items; + PCB_EDIT_FRAME* editFrame = static_cast( m_toolMgr->GetEditFrame() ); // As we are about to remove items, they have to be removed from the selection first m_selectionTool->ClearSelection(); - std::set::iterator it; - for( it = selectedItems.begin(); it != selectedItems.end(); ++it ) - remove( *it ); + // Save them + for( unsigned int i = 0; i < selectedItems.GetCount(); ++i ) + selectedItems.SetPickedItemStatus( UR_DELETED, i ); + editFrame->OnModify(); + editFrame->SaveCopyInUndoList( selectedItems, UR_DELETED ); + + // And now remove + for( unsigned int i = 0; i < selectedItems.GetCount(); ++i ) + { + BOARD_ITEM* item = static_cast( selectedItems.GetPickedItem( i ) ); + remove( item ); + } // Rebuild list of pads and nets if necessary BOARD* board = getModel( PCB_T ); @@ -265,6 +303,7 @@ void EDIT_TOOL::remove( BOARD_ITEM* aItem ) case PCB_MODULE_T: { MODULE* module = static_cast( aItem ); + module->ClearFlags(); for( D_PAD* pad = module->Pads().GetFirst(); pad; pad = pad->Next() ) getView()->Remove( pad ); @@ -305,7 +344,6 @@ void EDIT_TOOL::remove( BOARD_ITEM* aItem ) case PCB_ZONE_T: // SEG_ZONE items are now deprecated break; - // TODO default: // other types do not need to (or should not) be handled assert( false ); return; @@ -313,7 +351,7 @@ void EDIT_TOOL::remove( BOARD_ITEM* aItem ) } getView()->Remove( aItem ); - board->Delete( aItem ); + board->Remove( aItem ); } diff --git a/pcbnew/tools/edit_tool.h b/pcbnew/tools/edit_tool.h index 2e60a21fa3..5ddcb84f5d 100644 --- a/pcbnew/tools/edit_tool.h +++ b/pcbnew/tools/edit_tool.h @@ -28,7 +28,6 @@ #include #include #include -#include "item_state.h" class BOARD_ITEM; class SELECTION_TOOL; @@ -93,9 +92,6 @@ public: int Remove( TOOL_EVENT& aEvent ); private: - ///> Saves the state of items and allows to restore them - ITEM_STATE m_state; - ///> Selection tool used for obtaining selected items SELECTION_TOOL* m_selectionTool; @@ -107,6 +103,16 @@ private: ///> Sets up handlers for various events void setTransitions(); + + ///> The required update flag for modified items + KIGFX::VIEW_ITEM::VIEW_UPDATE_FLAGS m_updateFlag; + + ///> Enables higher order update flag + void enableUpdateFlag( KIGFX::VIEW_ITEM::VIEW_UPDATE_FLAGS aFlag ) + { + if( m_updateFlag < aFlag ) + m_updateFlag = aFlag; + } }; #endif diff --git a/pcbnew/tools/item_state.h b/pcbnew/tools/item_state.h deleted file mode 100644 index ed562c623d..0000000000 --- a/pcbnew/tools/item_state.h +++ /dev/null @@ -1,284 +0,0 @@ -/* - * This program source code file is part of KiCad, a free EDA CAD application. - * - * Copyright (C) 2013 CERN - * @author Maciej Suminski - * - * 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 ITEM_STATE_H_ -#define ITEM_STATE_H_ - -#include -#include - -/** - * Class ITEM_STATE - * - * Provides means for modifying properties of groups of items and gives possibility of rolling back - * the introduced changes. Does not take ownership of modified items, neither takes care of - * refreshing. - */ -class ITEM_STATE -{ -public: - ITEM_STATE() : - m_movement( 0.0, 0.0 ), m_flips( 0 ), m_rotation( 0.0 ) - { -#ifdef __WXDEBUG__ - m_canSave = true; -#endif - } - - /** - * Function Save() - * - * Adds an item and saves it's state. - * @param aItem is the item to be added. - */ - void Save( BOARD_ITEM* aItem ) - { -#ifdef __WXDEBUG__ - wxASSERT_MSG( m_canSave, wxT( "You cannot save items after issuing commands. You have " - "either RestoreAll() or Apply() before adding items!" ) ); -#endif - m_items.push_back( aItem ); - } - - /** - * Function RestoreAll() - * - * Rollbacks all the changes to the initial state. - */ - void RestoreAll() - { - // Check if there is a not saved movement command - saveMovement(); - - std::deque::iterator it, it_end; - std::deque::iterator cmd, cmd_end; - - for( it = m_items.begin(), it_end = m_items.end(); it != it_end; ++it ) - { - for( cmd = m_commands.begin(), cmd_end = m_commands.end(); cmd != cmd_end; ++cmd ) - cmd->Revert( *it ); - } - - reset(); - } - - /** - * Function Apply() - * - * Resets the state, clears the list of items & changes, so the object can be reused for - * other items. - */ - void Apply() - { - reset(); - } - - /** - * Function Move() - * - * Moves stored items by a given vector. - * @param aMovement is the movement vector. - */ - void Move( const VECTOR2D& aMovement ) - { -#ifdef __WXDEBUG__ - m_canSave = false; -#endif - std::deque::iterator it, it_end; - - for( it = m_items.begin(), it_end = m_items.end(); it != it_end; ++it ) - (*it)->Move( wxPoint( aMovement.x, aMovement.y ) ); - - m_movement += aMovement; - } - - /** - * Function Rotate() - * - * Rotates stored items by a given angle. - * @param aAngle is the angle (in decidegrees). - */ - void Rotate( const VECTOR2D& aPoint, double aAngle ) - { -#ifdef __WXDEBUG__ - m_canSave = false; -#endif - saveMovement(); - m_commands.push_front( COMMAND( COMMAND::ROTATE, aPoint, aAngle ) ); - - std::deque::iterator it, it_end; - - for( it = m_items.begin(), it_end = m_items.end(); it != it_end; ++it ) - (*it)->Rotate( wxPoint( aPoint.x, aPoint.y ), aAngle ); - - m_rotation += aAngle; - } - - /** - * Function Flip() - * - * Changes the board side for stored items. - * @param aPoint is the rotation point. - */ - void Flip( const VECTOR2D& aPoint ) - { -#ifdef __WXDEBUG__ - m_canSave = false; -#endif - saveMovement(); - m_commands.push_front( COMMAND( COMMAND::FLIP, aPoint ) ); - - std::deque::iterator it, it_end; - - for( it = m_items.begin(), it_end = m_items.end(); it != it_end; ++it ) - (*it)->Flip( wxPoint( aPoint.x, aPoint.y ) ); - - m_flips++; - } - - /** - * Function ToggleVisibility() - * - * Switches the visibility property of stored items. - */ - void ToggleVisibility() - { -#ifdef __WXDEBUG__ - m_canSave = false; -#endif - m_commands.push_front( COMMAND( COMMAND::VISIBILITY ) ); - - std::deque::iterator it, it_end; - - for( it = m_items.begin(), it_end = m_items.end(); it != it_end; ++it ) - (*it)->ViewSetVisible( !(*it)->ViewIsVisible() ); - } - - /** - * Function GetUpdateFlag() - * - * Returns information on what kind of update should be applied to items in order to display - * them properly. - * @return Flag required to refresh items. - */ - KIGFX::VIEW_ITEM::VIEW_UPDATE_FLAGS GetUpdateFlag() const - { - if( m_flips % 2 == 1 ) // If number of flips is odd, then we need to change layers - return KIGFX::VIEW_ITEM::LAYERS; - else if( m_movement.x != 0.0 || m_movement.y != 0.0 || m_rotation != 0.0 ) - return KIGFX::VIEW_ITEM::GEOMETRY; - - return KIGFX::VIEW_ITEM::APPEARANCE; - } - -private: - /// COMMAND stores modifications that were done to items - struct COMMAND - { - /// Type of command - enum TYPE { MOVE, ROTATE, FLIP, VISIBILITY }; - TYPE m_type; - - /// Point where flip/rotation occurred or movement vector - VECTOR2D m_point; - - /// Used only for rotation - double m_angle; - - COMMAND( TYPE aType, VECTOR2D aPoint = VECTOR2D( 0.0, 0.0 ), double aAngle = 0.0 ) : - m_type( aType ), m_point( aPoint ), m_angle( aAngle ) {}; - - void Revert( BOARD_ITEM* aItem ) - { - switch( m_type ) - { - case MOVE: - aItem->Move( wxPoint( -m_point.x, -m_point.y ) ); - break; - - case ROTATE: - aItem->Rotate( wxPoint( m_point.x, m_point.y ), -m_angle ); - break; - - case FLIP: - aItem->Flip( wxPoint( m_point.x, m_point.y ) ); - break; - - case VISIBILITY: - aItem->ViewSetVisible( !aItem->ViewIsVisible() ); - break; - } - } - }; - - /// Adds a MOVEMENT command basing on the current movement vector - void saveMovement() - { - if( m_movement.x != 0.0 || m_movement.y != 0.0 ) - { - m_commands.push_front( COMMAND( COMMAND::MOVE, m_movement ) ); - - m_movement.x = 0.0; - m_movement.y = 0.0; - } - } - - /// Restores the initial state - void reset() - { - m_movement.x = 0.0; - m_movement.y = 0.0; - m_flips = 0; - m_rotation = 0.0; - - m_items.clear(); - m_commands.clear(); - -#ifdef __WXDEBUG__ - m_canSave = true; -#endif - } - - /// List of issued commands - std::deque m_items; - - /// List of items that are affected by commands - std::deque m_commands; - - /// Current movement vector (updated by Move() command) - VECTOR2D m_movement; - - /// Number of flips applied to items - unsigned int m_flips; - - /// Total rotation applied to items - double m_rotation; - -#ifdef __WXDEBUG__ - /// Debug flag assuring that functions are called in proper order - bool m_canSave; -#endif -}; - -#endif /* ITEM_STATE_H_ */ diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index bf78405612..dabf03dda8 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -182,9 +182,9 @@ void SELECTION_TOOL::AddMenuItem( const TOOL_ACTION& aAction ) void SELECTION_TOOL::toggleSelection( BOARD_ITEM* aItem ) { - if( isSelected( aItem ) ) + if( aItem->IsSelected() ) { - deselectItem( aItem ); + deselect( aItem ); } else { @@ -193,17 +193,11 @@ void SELECTION_TOOL::toggleSelection( BOARD_ITEM* aItem ) // Prevent selection of invisible or inactive items if( selectable( aItem ) ) - selectItem( aItem ); + select( aItem ); } } -bool SELECTION_TOOL::isSelected( const BOARD_ITEM* aItem ) const -{ - return ( m_selection.items.find( const_cast( aItem ) ) != m_selection.items.end() ); -} - - void SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere ) { BOARD* pcb = getModel( PCB_T ); @@ -219,7 +213,6 @@ void SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere ) case 0: if( !m_additive ) ClearSelection(); - break; case 1: @@ -231,7 +224,7 @@ void SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere ) // contain anything but module footprint and not selectable items for( int i = collector.GetCount() - 1; i >= 0 ; --i ) { - BOARD_ITEM* boardItem = ( collector )[i]; + BOARD_ITEM* boardItem = collector[i]; if( boardItem->Type() == PCB_MODULE_T || !selectable( boardItem ) ) collector.Remove( i ); @@ -338,8 +331,8 @@ bool SELECTION_TOOL::selectMultiple() BOARD_ITEM* item = static_cast( it->first ); // Add only those items that are visible and fully within the selection box - if( selectable( item ) && selectionBox.Contains( item->ViewBBox() ) ) - selectItem( item ); + if( !item->IsSelected() && selectable( item ) && selectionBox.Contains( item->ViewBBox() ) ) + select( item ); } // Do not display information about selected item,as there is more than one @@ -502,49 +495,23 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) const } -void SELECTION_TOOL::selectItem( BOARD_ITEM* aItem ) +void SELECTION_TOOL::select( BOARD_ITEM* aItem ) { - /// Selecting an item needs a few operations, so they are wrapped in a functor - class selectBase_ - { - SELECTION& s; - - public: - selectBase_( SELECTION& s_ ) : s( s_ ) {} - - void operator()( BOARD_ITEM* item ) - { - s.group->Add( item ); - // Hide the original item, so it is shown only on overlay - item->ViewSetVisible( false ); - item->SetSelected(); - } - } selectBase( m_selection ); - - // Modules are treated in a special way - when they are selected, we have to - // select all the parts that make the module, not the module itself + // Modules are treated in a special way - when they are selected, we have to mark + // all the parts that make the module as selected if( aItem->Type() == PCB_MODULE_T ) { MODULE* module = static_cast( aItem ); + module->RunOnChildren( std::bind1st( std::mem_fun( &SELECTION_TOOL::selectVisually ), this ) ); - // Add everything that belongs to the module (besides the module itself) - for( D_PAD* pad = module->Pads().GetFirst(); pad; pad = pad->Next() ) - selectBase( pad ); - - for( BOARD_ITEM* drawing = module->GraphicalItems().GetFirst(); drawing; - drawing = drawing->Next() ) - selectBase( drawing ); - - selectBase( &module->Reference() ); - selectBase( &module->Value() ); } - // Add items to the VIEW_GROUP, so they will be displayed on the overlay - selectBase( aItem ); - m_selection.items.insert( aItem ); + selectVisually( aItem ); + ITEM_PICKER picker( aItem ); + m_selection.items.PushItem( picker ); // It is enough to do it only for the first selected item - if( m_selection.items.size() == 1 ) + if( m_selection.Size() == 1 ) { // Set as the current item, so the information about selection is displayed getEditFrame()->SetCurItem( aItem, true ); @@ -552,48 +519,30 @@ void SELECTION_TOOL::selectItem( BOARD_ITEM* aItem ) // Now the context menu should be enabled SetContextMenu( &m_menu, CMENU_BUTTON ); } + else + { + // If multiple items are selected, do not show the information about the selected item + getEditFrame()->SetCurItem( NULL, true ); + } } -void SELECTION_TOOL::deselectItem( BOARD_ITEM* aItem ) +void SELECTION_TOOL::deselect( BOARD_ITEM* aItem ) { - /// Deselecting an item needs a few operations, so they are wrapped in a functor - class deselectBase_ - { - SELECTION& s; - - public: - deselectBase_( SELECTION& s_ ) : s( s_ ) {} - - void operator()( BOARD_ITEM* item ) - { - s.group->Remove( item ); - // Restore original item visibility - item->ViewSetVisible( true ); - item->ClearSelected(); - } - } deselectBase( m_selection ); - // Modules are treated in a special way - when they are selected, we have to - // select all the parts that make the module, not the module itself + // deselect all the parts that make the module, not the module itself if( aItem->Type() == PCB_MODULE_T ) { MODULE* module = static_cast( aItem ); + module->RunOnChildren( std::bind1st( std::mem_fun( &SELECTION_TOOL::deselectVisually ), this ) ); - // Add everything that belongs to the module (besides the module itself) - for( D_PAD* pad = module->Pads().GetFirst(); pad; pad = pad->Next() ) - deselectBase( pad ); - - for( BOARD_ITEM* drawing = module->GraphicalItems().GetFirst(); drawing; - drawing = drawing->Next() ) - deselectBase( drawing ); - - deselectBase( &module->Reference() ); - deselectBase( &module->Value() ); } - deselectBase( aItem ); - m_selection.items.erase( aItem ); + deselectVisually( aItem ); + + int itemIdx = m_selection.items.FindItem( aItem ); + if( itemIdx >= 0 ) + m_selection.items.RemovePicker( itemIdx ); // If there is nothing selected, disable the context menu if( m_selection.Empty() ) @@ -604,6 +553,26 @@ void SELECTION_TOOL::deselectItem( BOARD_ITEM* aItem ) } +void SELECTION_TOOL::selectVisually( BOARD_ITEM* aItem ) const +{ + m_selection.group->Add( aItem ); + + // Hide the original item, so it is shown only on overlay + aItem->ViewSetVisible( false ); + aItem->SetSelected(); +} + + +void SELECTION_TOOL::deselectVisually( BOARD_ITEM* aItem ) const +{ + m_selection.group->Remove( aItem ); + + // Restore original item visibility + aItem->ViewSetVisible( true ); + aItem->ClearSelected(); +} + + bool SELECTION_TOOL::containsSelected( const VECTOR2I& aPoint ) const { const unsigned GRIP_MARGIN = 500000; @@ -611,9 +580,10 @@ bool SELECTION_TOOL::containsSelected( const VECTOR2I& aPoint ) const // Check if the point is located within any of the currently selected items bounding boxes std::set::iterator it, it_end; - for( it = m_selection.items.begin(), it_end = m_selection.items.end(); it != it_end; ++it ) + for( unsigned int i = 0; i < m_selection.items.GetCount(); ++i ) { - BOX2I itemBox = (*it)->ViewBBox(); + BOARD_ITEM* item = static_cast( m_selection.items.GetPickedItem( i ) ); + BOX2I itemBox = item->ViewBBox(); itemBox.Inflate( GRIP_MARGIN ); // Give some margin for gripping an item if( itemBox.Contains( aPoint ) ) @@ -626,6 +596,6 @@ bool SELECTION_TOOL::containsSelected( const VECTOR2I& aPoint ) const void SELECTION_TOOL::SELECTION::Clear() { - items.clear(); + items.ClearItemsList(); group->Clear(); } diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index 33fc4b2494..168f2288da 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -26,11 +26,10 @@ #ifndef __SELECTION_TOOL_H #define __SELECTION_TOOL_H -#include - #include #include #include +#include class SELECTION_AREA; class BOARD_ITEM; @@ -62,7 +61,7 @@ public: struct SELECTION { /// Set of selected items - std::set items; + PICKED_ITEMS_LIST items; /// VIEW_GROUP that holds currently selected items KIGFX::VIEW_GROUP* group; @@ -70,13 +69,13 @@ public: /// Checks if there is anything selected bool Empty() const { - return items.empty(); + return ( items.GetCount() == 0 ); } /// Returns the number of selected parts int Size() const { - return items.size(); + return items.GetCount(); } /// Clears both the VIEW_GROUP and set of selected items. Please note that it does not @@ -111,7 +110,7 @@ public: void ClearSelection(); /** - * Function AddAction() + * Function AddMenuItem() * * Adds a menu entry to run a TOOL_ACTION on selected items. * @param aAction is a menu entry to be added. @@ -161,15 +160,6 @@ private: */ void toggleSelection( BOARD_ITEM* aItem ); - /** - * Function isSelected() - * Tests if an item is currently selected. - * - * @param aItem is the item to be checked. - * @return True if the item is selected, false otherwise. - */ - bool isSelected( const BOARD_ITEM* aItem ) const; - /** * Function selectable() * Checks conditions for an item to be selected. @@ -184,7 +174,7 @@ private: * * @param aItem is an item to be selected. */ - void selectItem( BOARD_ITEM* aItem ); + void select( BOARD_ITEM* aItem ); /** * Function deselectItem() @@ -192,7 +182,21 @@ private: * * @param aItem is an item to be deselected. */ - void deselectItem( BOARD_ITEM* aItem ); + void deselect( BOARD_ITEM* aItem ); + + /** + * Function deselectVisually() + * Marks item as selected, but does not add it to the ITEMS_PICKED_LIST. + * @param aItem is an item to be be marked. + */ + void selectVisually( BOARD_ITEM* aItem ) const; + + /** + * Function deselectVisually() + * Marks item as selected, but does not add it to the ITEMS_PICKED_LIST. + * @param aItem is an item to be be marked. + */ + void deselectVisually( BOARD_ITEM* aItem ) const; /** * Function containsSelected() From c1d6e44413809fdb1616beabc859b42f2032ef5c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 18 Dec 2013 15:09:09 +0100 Subject: [PATCH 022/741] Speed optimization during selection of multiple items. Removed debug output. --- pcbnew/tools/edit_tool.cpp | 6 ------ pcbnew/tools/selection_tool.cpp | 6 ++---- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index e8accb4ca7..a51d9dccf9 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -129,12 +129,6 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) else { // Prepare to drag - save items, so changes can be undone - for( unsigned int i = 0; i < selection.items.GetCount(); ++i ) - { - BOARD_ITEM* item = static_cast( selection.items.GetPickedItem( i ) ); - std::cout << "saved " << (unsigned long) item << std::endl; - } - editFrame->OnModify(); editFrame->SaveCopyInUndoList( selection.items, UR_CHANGED ); diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index dabf03dda8..540ea5cb3d 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -503,7 +503,6 @@ void SELECTION_TOOL::select( BOARD_ITEM* aItem ) { MODULE* module = static_cast( aItem ); module->RunOnChildren( std::bind1st( std::mem_fun( &SELECTION_TOOL::selectVisually ), this ) ); - } selectVisually( aItem ); @@ -519,8 +518,8 @@ void SELECTION_TOOL::select( BOARD_ITEM* aItem ) // Now the context menu should be enabled SetContextMenu( &m_menu, CMENU_BUTTON ); } - else - { + else if( m_selection.Size() == 2 ) // Check only for 2, so it will not be + { // called for every next selected item // If multiple items are selected, do not show the information about the selected item getEditFrame()->SetCurItem( NULL, true ); } @@ -535,7 +534,6 @@ void SELECTION_TOOL::deselect( BOARD_ITEM* aItem ) { MODULE* module = static_cast( aItem ); module->RunOnChildren( std::bind1st( std::mem_fun( &SELECTION_TOOL::deselectVisually ), this ) ); - } deselectVisually( aItem ); From fd0a3348ea00b5c05a6a2eef8230d18139a1adb6 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 18 Dec 2013 15:11:12 +0100 Subject: [PATCH 023/741] More elegant way of handling interruption of current modifications. --- pcbnew/tools/edit_tool.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index a51d9dccf9..f1f7c75f0b 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -148,8 +148,8 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) if( restore ) { // Modifications has to be rollbacked, so restore the previous state of items - wxCommandEvent dummy; - editFrame->GetBoardFromUndoList( dummy ); + wxCommandEvent undoEvent( wxEVT_TOOL, wxID_UNDO ); + wxPostEvent( editFrame, undoEvent ); } else { From f4de2877f3fc16522bd017a19016dc3cb3849d65 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 18 Dec 2013 15:38:38 +0100 Subject: [PATCH 024/741] Added possibility of removing selected items while dragging. --- pcbnew/tools/common_actions.cpp | 5 +++-- pcbnew/tools/edit_tool.cpp | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 1a80bd5a9c..6756e10a9d 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -24,6 +24,7 @@ #include "common_actions.h" #include +#include // Selection tool actions TOOL_ACTION COMMON_ACTIONS::selectionActivate( "pcbnew.InteractiveSelection", @@ -42,8 +43,8 @@ TOOL_ACTION COMMON_ACTIONS::flip( "pcbnew.InteractiveEdit.flip", AS_CONTEXT, 'F', "Flip", "Flips selected item(s)" ); -TOOL_ACTION COMMON_ACTIONS::remove( "pcbnew.InteractiveEdit.delete", - AS_GLOBAL, 127, // 127 stands for DELETE key +TOOL_ACTION COMMON_ACTIONS::remove( "pcbnew.InteractiveEdit.remove", + AS_GLOBAL, WXK_DELETE, "Remove", "Deletes selected item(s)" ); TOOL_ACTION COMMON_ACTIONS::properties( "pcbnew.InteractiveEdit.properties", diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index f1f7c75f0b..99f44b9dfb 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -112,6 +112,11 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) // Flip causes change of layers enableUpdateFlag( KIGFX::VIEW_ITEM::LAYERS ); } + else if( evt->IsAction( &COMMON_ACTIONS::remove ) ) + { + Remove( aEvent ); + break; + } } else if( evt->IsMotion() || evt->IsDrag( BUT_LEFT ) ) From fb78432367c44582009cf621262685cc008d85ad Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 18 Dec 2013 16:26:21 +0100 Subject: [PATCH 025/741] Made pads & module texts unselectable --- pcbnew/tools/selection_tool.cpp | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 540ea5cb3d..fe7568c873 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -220,13 +220,10 @@ void SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere ) break; default: - // Remove modules, they have to be selected by clicking on area that does not - // contain anything but module footprint and not selectable items + // Remove unselectable items for( int i = collector.GetCount() - 1; i >= 0 ; --i ) { - BOARD_ITEM* boardItem = collector[i]; - - if( boardItem->Type() == PCB_MODULE_T || !selectable( boardItem ) ) + if( !selectable( collector[i] ) ) collector.Remove( i ); } @@ -455,12 +452,6 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) const } break; - case PCB_PAD_T: - // Pads are not selectable in multiple selection mode - if( m_multiple ) - return false; - /* no break */ - case PCB_MODULE_T: if( aItem->IsOnLayer( LAYER_N_FRONT ) && board->IsElementVisible( MOD_FR_VISIBLE ) ) return true; @@ -472,16 +463,10 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) const break; - case PCB_MODULE_TEXT_T: - // Module texts are not selectable in multiple selection mode - if( m_multiple ) - return false; - - break; - - // These are not selectable, otherwise silkscreen drawings would be easily destroyed + // These are not selectable case PCB_MODULE_EDGE_T: - // and some other stuff that should not be selected + case PCB_MODULE_TEXT_T: + case PCB_PAD_T: case NOT_USED: case TYPE_NOT_INIT: return false; From 7ce91d4e38c59c7ec8fe287c14a9584cccd85246 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 18 Dec 2013 17:16:15 +0100 Subject: [PATCH 026/741] Fixed zone area removal (& undoing) using the EDIT_TOOL. --- pcbnew/tools/edit_tool.cpp | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 99f44b9dfb..3d2191f5a8 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -303,16 +303,7 @@ void EDIT_TOOL::remove( BOARD_ITEM* aItem ) { MODULE* module = static_cast( aItem ); module->ClearFlags(); - - for( D_PAD* pad = module->Pads().GetFirst(); pad; pad = pad->Next() ) - getView()->Remove( pad ); - - for( BOARD_ITEM* drawing = module->GraphicalItems().GetFirst(); drawing; - drawing = drawing->Next() ) - getView()->Remove( drawing ); - - getView()->Remove( &module->Reference() ); - getView()->Remove( &module->Value() ); + module->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Remove ), getView() ) ); // Module itself is deleted after the switch scope is finished // list of pads is rebuild by BOARD::BuildListOfNets() @@ -322,11 +313,6 @@ void EDIT_TOOL::remove( BOARD_ITEM* aItem ) } break; - case PCB_ZONE_AREA_T: - getView()->Remove( aItem ); - getModel( PCB_T )->Delete( aItem ); - return; - // These are not supposed to be removed case PCB_PAD_T: case PCB_MODULE_TEXT_T: @@ -341,6 +327,7 @@ void EDIT_TOOL::remove( BOARD_ITEM* aItem ) case PCB_TARGET_T: // a target (graphic item) case PCB_MARKER_T: // a marker used to show something case PCB_ZONE_T: // SEG_ZONE items are now deprecated + case PCB_ZONE_AREA_T: break; default: // other types do not need to (or should not) be handled From d613da8b8d98c7e6c13e888036881f40f90dc860 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 19 Dec 2013 10:10:42 +0100 Subject: [PATCH 027/741] Module texts are undo/redoable. --- pcbnew/board_undo_redo.cpp | 25 +++++++++++++++++++++++++ pcbnew/tools/selection_tool.cpp | 6 +++++- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/pcbnew/board_undo_redo.cpp b/pcbnew/board_undo_redo.cpp index fb8578fa4f..85b8e5b194 100644 --- a/pcbnew/board_undo_redo.cpp +++ b/pcbnew/board_undo_redo.cpp @@ -295,6 +295,17 @@ void PCB_EDIT_FRAME::SaveCopyInUndoList( BOARD_ITEM* aItem, if( aItem == NULL ) // Nothing to save return; + // For texts belonging to modules, we need to save state of the parent module + if( aItem->Type() == PCB_MODULE_TEXT_T ) + { + aItem = aItem->GetParent(); + wxASSERT( aItem->Type() == PCB_MODULE_T ); + aCommandType = UR_CHANGED; + + if( aItem == NULL ) + return; + } + PICKED_ITEMS_LIST* commandToUndo = new PICKED_ITEMS_LIST(); commandToUndo->m_TransformPoint = aTransformPoint; @@ -364,6 +375,20 @@ void PCB_EDIT_FRAME::SaveCopyInUndoList( const PICKED_ITEMS_LIST& aItemsList, for( unsigned ii = 0; ii < commandToUndo->GetCount(); ii++ ) { BOARD_ITEM* item = (BOARD_ITEM*) commandToUndo->GetPickedItem( ii ); + + // For texts belonging to modules, we need to save state of the parent module + if( item->Type() == PCB_MODULE_TEXT_T ) + { + item = item->GetParent(); + wxASSERT( item->Type() == PCB_MODULE_T ); + + if( item == NULL ) + continue; + + commandToUndo->SetPickedItem( item, ii ); + commandToUndo->SetPickedItemStatus( UR_CHANGED, ii ); + } + UNDO_REDO_T command = commandToUndo->GetPickedItemStatus( ii ); if( command == UR_UNSPECIFIED ) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index fe7568c873..4d4d8e5404 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -463,9 +463,13 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) const break; + case PCB_MODULE_TEXT_T: + if( m_multiple ) + return false; + break; + // These are not selectable case PCB_MODULE_EDGE_T: - case PCB_MODULE_TEXT_T: case PCB_PAD_T: case NOT_USED: case TYPE_NOT_INIT: From 3dc9f295a4b509b3eb9154254617f1c9986ab226 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 20 Dec 2013 16:07:58 +0100 Subject: [PATCH 028/741] Fixed cursor force position option. --- common/tool/tool_dispatcher.cpp | 2 +- common/view/wx_view_controls.cpp | 11 ----------- include/view/wx_view_controls.h | 5 ++++- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index 6fb5d5f500..66efcc2581 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -221,7 +221,7 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) // but changes in world coordinates (e.g. autopanning) type == KIGFX::WX_VIEW_CONTROLS::EVT_REFRESH_MOUSE ) { - VECTOR2D screenPos = m_toolMgr->GetViewControls()->GetCursorPosition(); + VECTOR2D screenPos = m_toolMgr->GetViewControls()->GetMousePosition(); VECTOR2D pos = getView()->ToWorld( screenPos ); if( pos != m_lastMousePos || type == KIGFX::WX_VIEW_CONTROLS::EVT_REFRESH_MOUSE ) diff --git a/common/view/wx_view_controls.cpp b/common/view/wx_view_controls.cpp index 7f7308d935..20778c7d3e 100644 --- a/common/view/wx_view_controls.cpp +++ b/common/view/wx_view_controls.cpp @@ -83,9 +83,7 @@ void WX_VIEW_CONTROLS::onMotion( wxMouseEvent& aEvent ) bool isAutoPanning = false; if( m_autoPanEnabled ) - { isAutoPanning = handleAutoPanning( aEvent ); - } if( !isAutoPanning && aEvent.Dragging() ) { @@ -243,15 +241,6 @@ const VECTOR2D WX_VIEW_CONTROLS::GetMousePosition() const } -const VECTOR2D WX_VIEW_CONTROLS::GetCursorPosition() const -{ - if( m_snappingEnabled ) - return m_view->GetGAL()->GetGridPoint( GetMousePosition() ); - else - return GetMousePosition(); -} - - bool WX_VIEW_CONTROLS::handleAutoPanning( const wxMouseEvent& aEvent ) { VECTOR2D p( aEvent.GetX(), aEvent.GetY() ); diff --git a/include/view/wx_view_controls.h b/include/view/wx_view_controls.h index f5561f7d2d..cfec3eac9b 100644 --- a/include/view/wx_view_controls.h +++ b/include/view/wx_view_controls.h @@ -84,7 +84,10 @@ public: const VECTOR2D GetMousePosition() const; /// @copydoc VIEW_CONTROLS::GetCursorPosition() - const VECTOR2D GetCursorPosition() const; + const VECTOR2D GetCursorPosition() const + { + return m_cursorPosition; + } /// Event that forces mouse move event in the dispatcher (eg. used in autopanning, when mouse /// cursor does not move in screen coordinates, but does in world coordinates) From 7784365b39b4c2375b211c5446a181303512f2c1 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 7 Jan 2014 14:09:27 +0100 Subject: [PATCH 029/741] Fixed bounding box for module texts. --- pcbnew/class_text_mod.cpp | 12 ++++++++++++ pcbnew/class_text_mod.h | 3 +++ 2 files changed, 15 insertions(+) diff --git a/pcbnew/class_text_mod.cpp b/pcbnew/class_text_mod.cpp index fbebde39bd..71deb4a462 100644 --- a/pcbnew/class_text_mod.cpp +++ b/pcbnew/class_text_mod.cpp @@ -415,6 +415,18 @@ EDA_ITEM* TEXTE_MODULE::Clone() const } +const BOX2I TEXTE_MODULE::ViewBBox() const +{ + double angle = GetDrawRotation(); + EDA_RECT text_area = GetTextBox( -1, -1 ); + + if( angle ) + text_area = text_area.GetBoundingBoxRotated( m_Pos, angle ); + + return BOX2I( text_area.GetPosition(), text_area.GetSize() ); +} + + void TEXTE_MODULE::ViewGetLayers( int aLayers[], int& aCount ) const { switch( m_Type ) diff --git a/pcbnew/class_text_mod.h b/pcbnew/class_text_mod.h index 3452d4f316..97e15ab202 100644 --- a/pcbnew/class_text_mod.h +++ b/pcbnew/class_text_mod.h @@ -165,6 +165,9 @@ public: EDA_ITEM* Clone() const; + /// @copydoc VIEW_ITEM::ViewBBox() + virtual const BOX2I ViewBBox() const; + /// @copydoc VIEW_ITEM::ViewGetLayers() virtual void ViewGetLayers( int aLayers[], int& aCount ) const; From bc71a2c007d74e7b340b1ce6d5e52941131b876a Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 7 Jan 2014 14:11:53 +0100 Subject: [PATCH 030/741] Removed TOOL_STATE.idle field, as it was redundant. --- common/tool/tool_manager.cpp | 23 ++-- pcbnew/tools/move_tool.cpp | 204 ----------------------------------- pcbnew/tools/move_tool.h | 76 ------------- 3 files changed, 9 insertions(+), 294 deletions(-) delete mode 100644 pcbnew/tools/move_tool.cpp delete mode 100644 pcbnew/tools/move_tool.h diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 937a178653..f36d0cb343 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -127,7 +127,6 @@ void TOOL_MANAGER::RegisterTool( TOOL_BASE* aTool ) TOOL_STATE* st = new TOOL_STATE; st->theTool = aTool; - st->idle = true; st->pendingWait = false; st->pendingContextMenu = false; st->cofunc = NULL; @@ -240,14 +239,10 @@ bool TOOL_MANAGER::runTool( TOOL_BASE* aTool ) return false; } - TOOL_STATE* state = m_toolState[aTool]; - // If the tool is already active, do not invoke it again - if( state->idle == false ) + if( isActive( aTool ) ) return false; - state->idle = false; - aTool->Reset( TOOL_INTERACTIVE::RUN ); // Add the tool on the front of the processing queue (it gets events first) @@ -417,19 +412,18 @@ bool TOOL_MANAGER::dispatchActivation( TOOL_EVENT& aEvent ) void TOOL_MANAGER::finishTool( TOOL_STATE* aState ) { - // Find the tool to be deactivated - std::deque::iterator it, it_end; + std::deque::iterator it, itEnd; - for( it = m_activeTools.begin(), it_end = m_activeTools.end(); it != it_end; ++it ) + // Find the tool and deactivate it + for( it = m_activeTools.begin(), itEnd = m_activeTools.end(); it != itEnd; ++it ) { if( aState == m_toolIdIndex[*it] ) + { + m_activeTools.erase( it ); break; + } } - if( it != m_activeTools.end() ) - m_activeTools.erase( it ); - - aState->idle = true; delete aState->cofunc; aState->cofunc = NULL; } @@ -525,5 +519,6 @@ bool TOOL_MANAGER::isActive( TOOL_BASE* aTool ) if( !isRegistered( aTool ) ) return false; - return !m_toolState[aTool]->idle; + // Just check if the tool is on the active tools stack + return std::find( m_activeTools.begin(), m_activeTools.end(), aTool->GetId() ) != m_activeTools.end(); } diff --git a/pcbnew/tools/move_tool.cpp b/pcbnew/tools/move_tool.cpp deleted file mode 100644 index 2cc3b0752e..0000000000 --- a/pcbnew/tools/move_tool.cpp +++ /dev/null @@ -1,204 +0,0 @@ -/* - * This program source code file is part of KiCad, a free EDA CAD application. - * - * Copyright (C) 2013 CERN - * @author Maciej Suminski - * - * 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 -#include -#include -#include -#include - -#include - -#include "common_actions.h" -#include "selection_tool.h" -#include "move_tool.h" - -using namespace KIGFX; -using boost::optional; - -MOVE_TOOL::MOVE_TOOL() : - TOOL_INTERACTIVE( "pcbnew.InteractiveMove" ), m_selectionTool( NULL ) -{ -} - - -void MOVE_TOOL::Reset() -{ - // The tool launches upon reception of action event ("pcbnew.InteractiveMove") - Go( &MOVE_TOOL::Main, COMMON_ACTIONS::moveActivate.MakeEvent() ); -} - - -bool MOVE_TOOL::Init() -{ - // Find the selection tool, so they can cooperate - TOOL_BASE* selectionTool = m_toolMgr->FindTool( "pcbnew.InteractiveSelection" ); - - if( selectionTool ) - { - m_selectionTool = static_cast( selectionTool ); - - // Add context menu entries that are displayed when selection tool is active - m_selectionTool->AddMenuItem( COMMON_ACTIONS::moveActivate ); - m_selectionTool->AddMenuItem( COMMON_ACTIONS::rotate ); - m_selectionTool->AddMenuItem( COMMON_ACTIONS::flip ); - } - else - { - DisplayError( NULL, wxT( "pcbnew.InteractiveSelection tool is not available" ) ); - return false; - } - - return true; -} - - -int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) -{ - const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); - - if( selection.Empty() ) - return 0; // there are no items to operate on - - VECTOR2D dragPosition; - bool dragging = false; - bool restore = false; // Should items' state be restored when finishing the tool? - - VIEW_CONTROLS* controls = getViewControls(); - controls->ShowCursor( true ); - controls->SetSnapping( true ); - controls->SetAutoPan( true ); - - // Main loop: keep receiving events - while( OPT_TOOL_EVENT evt = Wait() ) - { - if( evt->IsCancel() ) - { - restore = true; // Cancelling the tool means that items have to be restored - break; // Finish - } - - // Dispatch TOOL_ACTIONs - else if( evt->Category() == TC_COMMAND ) - { - VECTOR2D cursorPos = getView()->ToWorld( getViewControls()->GetCursorPosition() ); - - if( evt->IsAction( &COMMON_ACTIONS::rotate ) ) // got rotation event? - { - m_state.Rotate( cursorPos, 900.0 ); - selection.group->ViewUpdate( VIEW_ITEM::GEOMETRY ); - updateRatsnest( true ); - } - else if( evt->IsAction( &COMMON_ACTIONS::flip ) ) // got flip event? - { - m_state.Flip( cursorPos ); - selection.group->ViewUpdate( VIEW_ITEM::GEOMETRY ); - updateRatsnest( true ); - } - } - - else if( evt->IsMotion() || evt->IsDrag( BUT_LEFT ) ) - { - if( dragging ) - { - // Drag items to the current cursor position - VECTOR2D movement = ( evt->Position() - dragPosition ); - m_state.Move( movement ); - - updateRatsnest( true ); - } - else - { - // Prepare to drag - std::set::iterator it; - - for( it = selection.items.begin(); it != selection.items.end(); ++it ) - { - // Save the state of the selected items, in case it has to be restored - m_state.Save( *it ); - } - - dragging = true; - } - - selection.group->ViewUpdate( VIEW_ITEM::GEOMETRY ); - dragPosition = evt->Position(); - } - else if( evt->IsMouseUp( BUT_LEFT ) || evt->IsClick( BUT_LEFT ) ) - break; // Finish - } - - if( restore ) - { - // Modifications has to be rollbacked, so restore the previous state of items - selection.group->ItemsViewUpdate( VIEW_ITEM::APPEARANCE ); - m_state.RestoreAll(); - - updateRatsnest( false ); - } - else - { - // Changes are applied, so update the items - selection.group->ItemsViewUpdate( m_state.GetUpdateFlag() ); - m_state.Apply(); - - } - - RN_DATA* ratsnest = static_cast( m_toolMgr->GetModel() )->GetRatsnest(); - ratsnest->Recalculate(); - - controls->ShowCursor( false ); - controls->SetSnapping( false ); - controls->SetAutoPan( false ); - - return 0; -} - - -void MOVE_TOOL::updateRatsnest( bool aRedraw ) -{ - const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); - RN_DATA* ratsnest = static_cast( m_toolMgr->GetModel() )->GetRatsnest(); - - ratsnest->ClearSimple(); - BOOST_FOREACH( BOARD_ITEM* item, selection.items ) - { - if( item->Type() == PCB_PAD_T || item->Type() == PCB_TRACE_T || - item->Type() == PCB_VIA_T || item->Type() == PCB_ZONE_AREA_T ) - { - ratsnest->Update( static_cast( item ) ); - - if( aRedraw ) - ratsnest->AddSimple( static_cast( item ) ); - } - else if( item->Type() == PCB_MODULE_T ) - { - ratsnest->Update( static_cast( item ) ); - - if( aRedraw ) - ratsnest->AddSimple( static_cast( item ) ); - } - } -} diff --git a/pcbnew/tools/move_tool.h b/pcbnew/tools/move_tool.h deleted file mode 100644 index 10783a5ed4..0000000000 --- a/pcbnew/tools/move_tool.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * This program source code file is part of KiCad, a free EDA CAD application. - * - * Copyright (C) 2013 CERN - * @author Maciej Suminski - * - * 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 __MOVE_TOOL_H -#define __MOVE_TOOL_H - -#include -#include -#include -#include "item_state.h" - -class BOARD_ITEM; -class SELECTION_TOOL; - -namespace KIGFX -{ -class VIEW_GROUP; -} - -/** - * Class MOVE_TOOL - * - * Our sample move tool. Allows to move, rotate and flip items selected by - * pcbnew.InteractiveSelection tool. - */ - -class MOVE_TOOL : public TOOL_INTERACTIVE -{ -public: - MOVE_TOOL(); - - /// @copydoc TOOL_INTERACTIVE::Reset() - void Reset(); - - /// @copydoc TOOL_INTERACTIVE::Init() - bool Init(); - - /** - * Function Main() - * - * Main loop in which events are handled. - */ - int Main( TOOL_EVENT& aEvent ); - -private: - void updateRatsnest( bool aRedraw ); - - /// Saves the state of items and allows to restore them - ITEM_STATE m_state; - - /// Selection tool used for obtaining selected items - SELECTION_TOOL* m_selectionTool; -}; - -#endif From aaf857e8946e512a4ec6aeaacd1fab913ca8afae Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 7 Jan 2014 14:15:40 +0100 Subject: [PATCH 031/741] Items removed from board are removed from ratsnest as well. Corrected the way of items removal from ratsnest. --- pcbnew/class_board.cpp | 27 +++++++--- pcbnew/ratsnest_data.cpp | 113 ++++++++++++++++++++++++--------------- pcbnew/ratsnest_data.h | 5 +- 3 files changed, 94 insertions(+), 51 deletions(-) diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index a56c226d63..c046fb70fd 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -867,26 +867,41 @@ BOARD_ITEM* BOARD::Remove( BOARD_ITEM* aBoardItem ) break; case PCB_ZONE_AREA_T: // this one uses a vector + { + ZONE_CONTAINER* zone = static_cast( aBoardItem ); + // find the item in the vector, then delete then erase it. - for( unsigned i = 0; iGetNets()[zone->GetNet()].RemoveItem( zone ); + } + break; case PCB_MODULE_T: + { + MODULE* module = static_cast( aBoardItem ); m_Modules.Remove( (MODULE*) aBoardItem ); - break; + + for( D_PAD* pad = module->Pads().GetFirst(); pad; pad = pad->Next() ) + m_ratsnest->GetNets()[pad->GetNet()].RemoveItem( pad ); + } + break; case PCB_TRACE_T: case PCB_VIA_T: - m_Track.Remove( (TRACK*) aBoardItem ); - break; + { + TRACK* track = static_cast( aBoardItem ); + m_Track.Remove( track ); + m_ratsnest->GetNets()[track->GetNet()].RemoveItem( track ); + } + break; case PCB_ZONE_T: m_Zone.Remove( (SEGZONE*) aBoardItem ); diff --git a/pcbnew/ratsnest_data.cpp b/pcbnew/ratsnest_data.cpp index e66451b86b..a5f708e0fe 100644 --- a/pcbnew/ratsnest_data.cpp +++ b/pcbnew/ratsnest_data.cpp @@ -201,12 +201,18 @@ const RN_NODE_PTR& RN_LINKS::AddNode( int aX, int aY ) } -void RN_LINKS::RemoveNode( const RN_NODE_PTR& aNode ) +bool RN_LINKS::RemoveNode( const RN_NODE_PTR& aNode ) { aNode->DecRefCount(); // TODO use the shared_ptr use_count if( aNode->GetRefCount() == 0 ) + { m_nodes.erase( aNode ); + + return true; + } + + return false; } @@ -270,6 +276,9 @@ void RN_NET::compute() void RN_NET::clearNode( const RN_NODE_PTR& aNode ) { + if( !m_rnEdges ) + return; + std::vector::iterator newEnd; // Remove all ratsnest edges for associated with the node @@ -430,75 +439,92 @@ void RN_NET::AddItem( const ZONE_CONTAINER* aZone ) void RN_NET::RemoveItem( const D_PAD* aPad ) { - RN_NODE_PTR& node = m_pads[aPad]; - if( !node ) - return; + try + { + RN_NODE_PTR node = m_pads.at( aPad ); - // Remove edges associated with the node - clearNode( node ); - m_links.RemoveNode( node ); + if( m_links.RemoveNode( node ) ) + clearNode( node ); - m_pads.erase( aPad ); + m_pads.erase( aPad ); - m_dirty = true; + m_dirty = true; + } + catch( ... ) + { + } } void RN_NET::RemoveItem( const SEGVIA* aVia ) { - RN_NODE_PTR& node = m_vias[aVia]; - if( !node ) - return; + try + { + RN_NODE_PTR node = m_vias.at( aVia ); - // Remove edges associated with the node - clearNode( node ); - m_links.RemoveNode( node ); + if( m_links.RemoveNode( node ) ) + clearNode( node ); - m_vias.erase( aVia ); + m_vias.erase( aVia ); - m_dirty = true; + m_dirty = true; + } + catch( ... ) + { + } } void RN_NET::RemoveItem( const TRACK* aTrack ) { - RN_EDGE_PTR& edge = m_tracks[aTrack]; - if( !edge ) - return; + try + { + RN_EDGE_PTR& edge = m_tracks.at( aTrack ); - // Save nodes, so they can be cleared later - const RN_NODE_PTR& aBegin = edge->getSourceNode(); - const RN_NODE_PTR& aEnd = edge->getTargetNode(); - m_links.RemoveConnection( edge ); + // Save nodes, so they can be cleared later + RN_NODE_PTR aBegin = edge->getSourceNode(); + RN_NODE_PTR aEnd = edge->getTargetNode(); + m_links.RemoveConnection( edge ); - // Remove nodes associated with the edge. It is done in a safe way, there is a check - // if nodes are not used by other edges. - clearNode( aBegin ); - clearNode( aEnd ); - m_links.RemoveNode( aBegin ); - m_links.RemoveNode( aEnd ); + // Remove nodes associated with the edge. It is done in a safe way, there is a check + // if nodes are not used by other edges. + if( m_links.RemoveNode( aBegin ) ) + clearNode( aBegin ); - m_tracks.erase( aTrack ); + if( m_links.RemoveNode( aEnd ) ) + clearNode( aEnd ); - m_dirty = true; + m_tracks.erase( aTrack ); + + m_dirty = true; + } + catch( ... ) + { + } } void RN_NET::RemoveItem( const ZONE_CONTAINER* aZone ) { - // Remove all subpolygons that make the zone - std::deque& polygons = m_zonePolygons[aZone]; - BOOST_FOREACH( RN_POLY& polygon, polygons ) - m_links.RemoveNode( polygon.GetNode() ); - polygons.clear(); + try + { + // Remove all subpolygons that make the zone + std::deque& polygons = m_zonePolygons.at( aZone ); + BOOST_FOREACH( RN_POLY& polygon, polygons ) + m_links.RemoveNode( polygon.GetNode() ); + polygons.clear(); - // Remove all connections added by the zone - std::deque& edges = m_zoneConnections[aZone]; - BOOST_FOREACH( RN_EDGE_PTR& edge, edges ) - m_links.RemoveConnection( edge ); - edges.clear(); + // Remove all connections added by the zone + std::deque& edges = m_zoneConnections.at( aZone ); + BOOST_FOREACH( RN_EDGE_PTR& edge, edges ) + m_links.RemoveConnection( edge ); + edges.clear(); - m_dirty = true; + m_dirty = true; + } + catch( ... ) + { + } } @@ -832,6 +858,7 @@ void RN_DATA::Recalculate( int aNet ) // Start with net number 1, as 0 stand for not connected for( unsigned int i = 1; i < m_board->GetNetCount(); ++i ) { + // Recompute only nets that require it if( m_nets[i].IsDirty() ) updateNet( i ); } diff --git a/pcbnew/ratsnest_data.h b/pcbnew/ratsnest_data.h index 6d0e7ee896..f8ffbf2406 100644 --- a/pcbnew/ratsnest_data.h +++ b/pcbnew/ratsnest_data.h @@ -129,8 +129,9 @@ public: * Function RemoveNode() * Removes a node described by a given node pointer. * @param aNode is a pointer to node to be removed. + * @return True if node was removed, false if there were other references, so it was kept. */ - void RemoveNode( const RN_NODE_PTR& aNode ); + bool RemoveNode( const RN_NODE_PTR& aNode ); /** * Function GetNodes() @@ -577,7 +578,7 @@ public: * Returns ratsnest grouped by net numbers. * @return Vector of ratsnest grouped by net numbers. */ - const std::vector& GetNets() const + std::vector& GetNets() { return m_nets; } From 3fe183c472729d9b28a11a48a12b67c4e2911dc8 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 7 Jan 2014 14:16:47 +0100 Subject: [PATCH 032/741] Tools have possibility to react to GAL switching or model (board) reload. --- pcbnew/pcbframe.cpp | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 56e80d84bc..32e8c27ba7 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -334,16 +334,6 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( wxWindow* parent, const wxString& title, SetBoard( new BOARD() ); - if( GetGalCanvas() ) - { - ViewReloadBoard( m_Pcb ); - - // update the tool manager with the new board and its view. - if( m_toolManager ) - m_toolManager->SetEnvironment( m_Pcb, GetGalCanvas()->GetView(), - GetGalCanvas()->GetViewControls(), this ); - } - // Create the PCB_LAYER_WIDGET *after* SetBoard(): wxFont font = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT ); @@ -543,8 +533,11 @@ void PCB_EDIT_FRAME::SetBoard( BOARD* aBoard ) // update the tool manager with the new board and its view. if( m_toolManager ) + { m_toolManager->SetEnvironment( aBoard, GetGalCanvas()->GetView(), GetGalCanvas()->GetViewControls(), this ); + m_toolManager->ResetTools( TOOL_BASE::MODEL_RELOAD ); + } } } @@ -749,10 +742,14 @@ void PCB_EDIT_FRAME::UseGalCanvas( bool aEnable ) { EDA_DRAW_FRAME::UseGalCanvas( aEnable ); - m_toolManager->SetEnvironment( m_Pcb, GetGalCanvas()->GetView(), - GetGalCanvas()->GetViewControls(), this ); - ViewReloadBoard( m_Pcb ); + + if( aEnable ) + { + m_toolManager->SetEnvironment( m_Pcb, GetGalCanvas()->GetView(), + GetGalCanvas()->GetViewControls(), this ); + m_toolManager->ResetTools( TOOL_BASE::GAL_SWITCH ); + } } From 69cf8aa325c690cbd65aee8907c24483dd47a581 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 7 Jan 2014 14:21:37 +0100 Subject: [PATCH 033/741] Fixed snapping for Push and Shove router. --- pcbnew/router/router_tool.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index d43ea3ece4..6e8d732040 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -278,7 +278,7 @@ void ROUTER_TOOL::updateEndItem( TOOL_EVENT& aEvent ) else { m_endItem = NULL; - m_endSnapPoint = p; + m_endSnapPoint = getView()->ToWorld( ctls->GetCursorPosition() ); ctls->ForceCursorPosition( false ); } @@ -407,6 +407,7 @@ int ROUTER_TOOL::Main( TOOL_EVENT& aEvent ) // Restore the default settings ctls->SetAutoPan( false ); ctls->ShowCursor( false ); + ctls->ForceCursorPosition( false ); return 0; } From 75db0cebb7458b22c5f9a0e6c65ea5aa61e2dcdd Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 7 Jan 2014 14:22:37 +0100 Subject: [PATCH 034/741] Fixed Push and Shove and ratsnest cooperation (tracks added by PNS are taken into account while calculating ratsnest). --- pcbnew/router/pns_router.cpp | 9 ++++----- pcbnew/router/router_tool.cpp | 3 +-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index 151b28ffa1..33a512b451 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -263,7 +263,7 @@ void PNS_ROUTER::SyncWorld() if( type == PCB_TRACE_T ) item = syncTrack( t ); else if( type == PCB_VIA_T ) - item = syncVia( static_cast (t) ); + item = syncVia( static_cast( t ) ); if( item ) m_world->Add( item ); @@ -754,13 +754,12 @@ bool PNS_ROUTER::FixRoute( const VECTOR2I& aP, PNS_ITEM* aEndItem ) void PNS_ROUTER::StopRouting() { + // Update the ratsnest with new changes + m_board->GetRatsnest()->Recalculate( m_currentNet ); + if( !RoutingInProgress() ) return; - // highlightCurrent(false); - - // Update the ratsnest - m_board->GetRatsnest()->Recalculate( m_currentNet ); EraseView(); m_state = IDLE; diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index 6e8d732040..b301901048 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -369,8 +369,7 @@ void ROUTER_TOOL::startRouting() } } - if( m_router->RoutingInProgress() ) - m_router->StopRouting(); + m_router->StopRouting(); ctls->SetAutoPan( false ); ctls->ForceCursorPosition( false ); From 6ad9d013e2eef6fbaf41b7eb7f5279cebf8c29e8 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 7 Jan 2014 14:23:46 +0100 Subject: [PATCH 035/741] Safer way for syncing pads in Push and Shover router. --- pcbnew/router/pns_router.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index 33a512b451..e70fe550bf 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -47,7 +47,7 @@ #include #include -#include +#include #include #include #include @@ -248,11 +248,15 @@ void PNS_ROUTER::SyncWorld() m_world->SetMaxClearance( 1000000 ); // m_board->GetBiggestClearanceValue()); pads = m_board->GetPads(); - BOOST_FOREACH( D_PAD * pad, pads ) { - PNS_ITEM* solid = syncPad( pad ); + for( MODULE* module = m_board->m_Modules; module; module = module->Next() ) + { + for( D_PAD* pad = module->Pads(); pad; pad = pad->Next() ) + { + PNS_ITEM* solid = syncPad( pad ); - if( solid ) - m_world->Add( solid ); + if( solid ) + m_world->Add( solid ); + } } for( TRACK* t = m_board->m_Track; t; t = t->Next() ) From 84412ce13592449b17864840a5a0271922e2e3d4 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 7 Jan 2014 15:52:10 +0100 Subject: [PATCH 036/741] Delaunau triangulation algorithm was bailing out if run on an emprty container. --- pcbnew/ratsnest_data.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/ratsnest_data.cpp b/pcbnew/ratsnest_data.cpp index a5f708e0fe..f33d5e96e6 100644 --- a/pcbnew/ratsnest_data.cpp +++ b/pcbnew/ratsnest_data.cpp @@ -246,7 +246,7 @@ void RN_NET::compute() return; } - else if( boardNodes.size() == 1 ) // This case is even simpler + else if( boardNodes.size() == 1 || boardNodes.empty() ) // This case is even simpler { m_rnEdges.reset( new std::vector( 0 ) ); From 8f054a606f4e46111e5f05a5e1df80f6c9b06f35 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 7 Jan 2014 17:23:17 +0100 Subject: [PATCH 037/741] Fixed snapping and ratsnest update for EDIT_TOOL. --- pcbnew/tools/edit_tool.cpp | 50 +++++++++++++++++++++++++++++++++++--- pcbnew/tools/edit_tool.h | 2 ++ 2 files changed, 49 insertions(+), 3 deletions(-) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 7f35d8a01e..277fefa8c1 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -28,8 +28,10 @@ #include #include #include +#include #include #include +#include #include "common_actions.h" #include "selection_tool.h" @@ -88,6 +90,7 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) controls->ShowCursor( true ); controls->SetSnapping( true ); controls->SetAutoPan( true ); + controls->ForceCursorPosition( false ); // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) @@ -115,6 +118,7 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) else if( evt->IsAction( &COMMON_ACTIONS::remove ) ) { Remove( aEvent ); + break; } } @@ -124,12 +128,15 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) if( m_dragging ) { // Drag items to the current cursor position - VECTOR2D movement = ( evt->Position() - dragPosition ); + VECTOR2D movement = ( getView()->ToWorld( controls->GetCursorPosition() ) - + dragPosition ); for( unsigned int i = 0; i < selection.items.GetCount(); ++i ) { BOARD_ITEM* item = static_cast( selection.items.GetPickedItem( i ) ); item->Move( wxPoint( movement.x, movement.y ) ); } + + updateRatsnest( true ); } else { @@ -141,7 +148,7 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) } selection.group->ViewUpdate( VIEW_ITEM::GEOMETRY ); - dragPosition = evt->Position(); + dragPosition = getView()->ToWorld( controls->GetCursorPosition() ); } else if( evt->IsMouseUp( BUT_LEFT ) || evt->IsClick( BUT_LEFT ) ) @@ -162,6 +169,10 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) selection.group->ItemsViewUpdate( m_updateFlag ); } + RN_DATA* ratsnest = getModel( PCB_T )->GetRatsnest(); + ratsnest->ClearSimple(); + ratsnest->Recalculate(); + controls->ShowCursor( false ); controls->SetSnapping( false ); controls->SetAutoPan( false ); @@ -195,6 +206,7 @@ int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) } setTransitions(); + updateRatsnest( true ); return 0; } @@ -225,6 +237,7 @@ int EDIT_TOOL::Rotate( TOOL_EVENT& aEvent ) selection.group->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); setTransitions(); + updateRatsnest( true ); return 0; } @@ -255,6 +268,7 @@ int EDIT_TOOL::Flip( TOOL_EVENT& aEvent ) selection.group->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); setTransitions(); + updateRatsnest( true ); return 0; } @@ -284,10 +298,11 @@ int EDIT_TOOL::Remove( TOOL_EVENT& aEvent ) // Rebuild list of pads and nets if necessary BOARD* board = getModel( PCB_T ); - if( !( board->GetStatus() & NET_CODES_OK ) ) + if( !( board->m_Status_Pcb & NET_CODES_OK ) ) board->BuildListOfNets(); setTransitions(); + board->GetRatsnest()->Recalculate(); return 0; } @@ -349,3 +364,32 @@ void EDIT_TOOL::setTransitions() Go( &EDIT_TOOL::Remove, COMMON_ACTIONS::remove.MakeEvent() ); Go( &EDIT_TOOL::Properties, COMMON_ACTIONS::properties.MakeEvent() ); } + + +void EDIT_TOOL::updateRatsnest( bool aRedraw ) +{ + const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); + RN_DATA* ratsnest = getModel( PCB_T )->GetRatsnest(); + + ratsnest->ClearSimple(); + for( unsigned int i = 0; i < selection.items.GetCount(); ++i ) + { + BOARD_ITEM* item = static_cast( selection.items.GetPickedItem( i ) ); + + if( item->Type() == PCB_PAD_T || item->Type() == PCB_TRACE_T || + item->Type() == PCB_VIA_T || item->Type() == PCB_ZONE_AREA_T ) + { + ratsnest->Update( static_cast( item ) ); + + if( aRedraw ) + ratsnest->AddSimple( static_cast( item ) ); + } + else if( item->Type() == PCB_MODULE_T ) + { + ratsnest->Update( static_cast( item ) ); + + if( aRedraw ) + ratsnest->AddSimple( static_cast( item ) ); + } + } +} diff --git a/pcbnew/tools/edit_tool.h b/pcbnew/tools/edit_tool.h index 5ddcb84f5d..0079d332b3 100644 --- a/pcbnew/tools/edit_tool.h +++ b/pcbnew/tools/edit_tool.h @@ -113,6 +113,8 @@ private: if( m_updateFlag < aFlag ) m_updateFlag = aFlag; } + + void updateRatsnest( bool aRedraw ); }; #endif From 487b609e7604ee008167b9ed30b8bd764d78ce96 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 9 Jan 2014 15:51:47 +0100 Subject: [PATCH 038/741] Removed NETINFO_ITEM::SetNet() and NETINFO_ITEM::SetNetname() methods. NETINFO_ITEM::m_Net and NETINFO_ITEM::m_Netname are const. Changes to be verified: - pcbnew/minimun_spanning_tree.cpp: It segfaults is m_Size == 0 - pcbnew/exporters/export_gencad.cpp: I removed the SetNetname() call, as it changes only the unconnected net and in the next line it returns if the net is unconnected. Still, I wonder if name for the unconnected net matters. What about tests that check if a net name is empty to decide if it is unconnected net or not. --- pcbnew/class_netinfo.h | 39 ++++++++++++++++++-------- pcbnew/class_netinfo_item.cpp | 19 ++----------- pcbnew/class_netinfolist.cpp | 45 ++++++++---------------------- pcbnew/exporters/export_gencad.cpp | 1 - pcbnew/legacy_plugin.cpp | 7 ++--- pcbnew/minimun_spanning_tree.cpp | 2 +- pcbnew/pcb_parser.cpp | 4 +-- 7 files changed, 45 insertions(+), 72 deletions(-) diff --git a/pcbnew/class_netinfo.h b/pcbnew/class_netinfo.h index 427a7b5685..a3c1807e14 100644 --- a/pcbnew/class_netinfo.h +++ b/pcbnew/class_netinfo.h @@ -228,14 +228,14 @@ private: class NETINFO_ITEM { private: - int m_NetCode; ///< A number equivalent to the net name. + const int m_NetCode; ///< A number equivalent to the net name. ///< Used for fast comparisons in ratsnest and DRC computations. - wxString m_Netname; ///< Full net name like /mysheet/mysubsheet/vout + const wxString m_Netname; ///< Full net name like /mysheet/mysubsheet/vout ///< used by Eeschema - wxString m_ShortNetname; // short net name, like vout from - // /mysheet/mysubsheet/vout + const wxString m_ShortNetname; // short net name, like vout from + // /mysheet/mysubsheet/vout wxString m_NetClassName; // Net Class name. if void this is equivalent // to "default" (the first @@ -386,8 +386,10 @@ public: */ int GetNet() const { return m_NetCode; } - void SetNet( int aNetCode ) { m_NetCode = aNetCode; } - + /** + * Function GetNodesCount + * @return int - number of nodes in the net + */ int GetNodesCount() const { return m_PadInNetList.size(); } /** @@ -402,12 +404,6 @@ public: */ wxString GetShortNetname() const { return m_ShortNetname; } - /** - * Function SetNetname - * @param aNetname : the new netname - */ - void SetNetname( const wxString& aNetname ); - /** * Function GetMsgPanelInfo * returns the information about the #NETINFO_ITEM in \a aList to display in the @@ -416,6 +412,25 @@ public: * @param aList is the list in which to place the status information. */ void GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ); + + /** + * Function Clear + * sets all fields to their defaults values. + */ + void Clear() + { + m_PadInNetList.clear(); + + m_NbNodes = 0; + m_NbLink = 0; + m_NbNoconn = 0; + m_Flag = 0; + m_RatsnestStartIdx = 0; // Starting point of ratsnests of this net in a + // general buffer of ratsnest + m_RatsnestEndIdx = 0; // Ending point of ratsnests of this net + + SetClass( NULL ); + } }; diff --git a/pcbnew/class_netinfo_item.cpp b/pcbnew/class_netinfo_item.cpp index f96132dfc1..05bcabb1bc 100644 --- a/pcbnew/class_netinfo_item.cpp +++ b/pcbnew/class_netinfo_item.cpp @@ -49,13 +49,9 @@ /* class NETINFO_ITEM: handle data relative to a given net */ /*********************************************************/ -NETINFO_ITEM::NETINFO_ITEM( BOARD_ITEM* aParent, const wxString& aNetName, int aNetCode ) +NETINFO_ITEM::NETINFO_ITEM( BOARD_ITEM* aParent, const wxString& aNetName, int aNetCode ) : + m_NetCode( aNetCode ), m_Netname( aNetName ), m_ShortNetname( m_Netname.AfterLast( '/' ) ) { - SetNet( aNetCode ); - - if( aNetName.size() ) - SetNetname( aNetName ); - m_parent = aParent; m_NbNodes = 0; m_NbLink = 0; @@ -77,17 +73,6 @@ NETINFO_ITEM::~NETINFO_ITEM() } -/** - * Function SetNetname - * @param aNetname : the new netname - */ -void NETINFO_ITEM::SetNetname( const wxString& aNetname ) -{ - m_Netname = aNetname; - m_ShortNetname = m_Netname.AfterLast( '/' ); -} - - /** * Function Draw (TODO) */ diff --git a/pcbnew/class_netinfolist.cpp b/pcbnew/class_netinfolist.cpp index df5f8039de..75bad023a2 100644 --- a/pcbnew/class_netinfolist.cpp +++ b/pcbnew/class_netinfolist.cpp @@ -37,10 +37,6 @@ void NETINFO_LIST::clear() } -/** - * Function Append - * adds \a aNewElement to the end of the list. - */ void NETINFO_LIST::AppendNet( NETINFO_ITEM* aNewElement ) { m_NetBuffer.push_back( aNewElement ); @@ -80,46 +76,29 @@ void NETINFO_LIST::buildListOfNets() int nodes_count = 0; NETINFO_ITEM* net_item; - clear(); // Remove all nets info and free memory - - // Create and add the "unconnected net", always existing, - // used to handle pads and tracks that are not member of a "real" net - net_item = new NETINFO_ITEM( m_Parent ); - AppendNet( net_item ); - // Build the PAD list, sorted by net buildPadsFullList(); - // Build netnames list, and create a netcode for each netname - D_PAD* last_pad = NULL; - int netcode = 0; + // Restore the initial state of NETINFO_ITEMs + for( unsigned i = 0; i < GetNetCount(); ++i ) + { + GetNetItem( i )->Clear(); + } + std::cout << m_PadsFullList.size() << std::endl; + + // Assign pads to appropriate NETINFO_ITEMs for( unsigned ii = 0; ii < m_PadsFullList.size(); ii++ ) { pad = m_PadsFullList[ii]; - if( pad->GetNetname().IsEmpty() ) // pad not connected - { - pad->SetNet( 0 ); + if( pad->GetNet() == 0 ) // pad not connected continue; - } - /* if the current netname was already found: add pad to the current net_item , - * else create a new net_code and a new net_item - */ - if( last_pad == NULL || ( pad->GetNetname() != last_pad->GetNetname() ) ) - { - netcode++; - net_item = new NETINFO_ITEM( m_Parent, pad->GetNetname(), netcode ); - AppendNet( net_item ); - } - - pad->SetNet( netcode ); + net_item = GetNetItem( pad->GetNet() ); net_item->m_PadInNetList.push_back( pad ); - nodes_count++; - - last_pad = pad; + ++nodes_count; } m_Parent->SetNodeCount( nodes_count ); @@ -129,8 +108,6 @@ void NETINFO_LIST::buildListOfNets() m_Parent->m_Status_Pcb |= NET_CODES_OK; m_Parent->SetAreasNetCodesFromNetNames(); - - // D( Show(); ) } #if defined(DEBUG) diff --git a/pcbnew/exporters/export_gencad.cpp b/pcbnew/exporters/export_gencad.cpp index f04496ff7c..394a39f808 100644 --- a/pcbnew/exporters/export_gencad.cpp +++ b/pcbnew/exporters/export_gencad.cpp @@ -647,7 +647,6 @@ static void CreateSignalsSection( FILE* aFile, BOARD* aPcb ) if( net->GetNetname() == wxEmptyString ) // dummy netlist (no connection) { wxString msg; msg << wxT( "NoConnection" ) << NbNoConn++; - net->SetNetname( msg ); } if( net->GetNet() <= 0 ) // dummy netlist (no connection) diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index 4bc6e4550a..ab5a4fe34f 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -1811,7 +1811,7 @@ void LEGACY_PLUGIN::loadNETINFO_ITEM() { char buf[1024]; - NETINFO_ITEM* net = new NETINFO_ITEM( m_board ); + NETINFO_ITEM* net; char* line; while( ( line = READLINE( m_reader ) ) != NULL ) @@ -1822,11 +1822,10 @@ void LEGACY_PLUGIN::loadNETINFO_ITEM() { // e.g. "Na 58 "/cpu.sch/PAD7"\r\n" - int tmp = intParse( line + SZ( "Na" ), &data ); - net->SetNet( tmp ); + int netCode = intParse( line + SZ( "Na" ), &data ); ReadDelimitedText( buf, data, sizeof(buf) ); - net->SetNetname( FROM_UTF8( buf ) ); + net = new NETINFO_ITEM( m_board, FROM_UTF8( buf ), netCode ); } else if( TESTLINE( "$EndEQUIPOT" ) ) diff --git a/pcbnew/minimun_spanning_tree.cpp b/pcbnew/minimun_spanning_tree.cpp index f107590d6c..8d683f7786 100644 --- a/pcbnew/minimun_spanning_tree.cpp +++ b/pcbnew/minimun_spanning_tree.cpp @@ -69,7 +69,7 @@ MIN_SPAN_TREE::MIN_SPAN_TREE() void MIN_SPAN_TREE::MSP_Init( int aNodesCount ) { - m_Size = aNodesCount; + m_Size = std::max( aNodesCount, 1 ); inTree.clear(); linkedTo.clear(); distTo.clear(); diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index 1b47c69158..f1eaa3026c 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -1066,9 +1066,7 @@ void PCB_PARSER::parseNETINFO_ITEM() throw( IO_ERROR, PARSE_ERROR ) // (TODO: a better test.) if( number > 0 || m_board->FindNet( 0 ) == NULL ) { - NETINFO_ITEM* net = new NETINFO_ITEM( m_board ); - net->SetNet( number ); - net->SetNetname( name ); + NETINFO_ITEM* net = new NETINFO_ITEM( m_board, name, number ); m_board->AppendNet( net ); } } From 386d1fc2578e7a78b8c921c6a83ba6bf57874764 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 10 Jan 2014 17:19:33 +0100 Subject: [PATCH 039/741] Made two functions immune to empty containers. --- pcbnew/ratsnest.cpp | 5 ++++- pcbnew/ratsnest_data.cpp | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pcbnew/ratsnest.cpp b/pcbnew/ratsnest.cpp index 00cec1cea0..b5347d3e85 100644 --- a/pcbnew/ratsnest.cpp +++ b/pcbnew/ratsnest.cpp @@ -70,7 +70,10 @@ public: void MIN_SPAN_TREE_PADS::AddTreeToRatsnest( std::vector &aRatsnestList ) { - std::vector & padsBuffer = *m_PadsList; + std::vector& padsBuffer = *m_PadsList; + if( padsBuffer.empty() ) + return; + int netcode = padsBuffer[0]->GetNet(); // Note: to get edges in minimum spanning tree, // the index value 0 is not used: it is just diff --git a/pcbnew/ratsnest_data.cpp b/pcbnew/ratsnest_data.cpp index e66451b86b..6ed72cfbe0 100644 --- a/pcbnew/ratsnest_data.cpp +++ b/pcbnew/ratsnest_data.cpp @@ -240,7 +240,7 @@ void RN_NET::compute() return; } - else if( boardNodes.size() == 1 ) // This case is even simpler + else if( boardNodes.size() == 1 || boardNodes.empty() ) // This case is even simpler { m_rnEdges.reset( new std::vector( 0 ) ); From bf80cc770ecaf7c8cb14d759b3d201c11438ba65 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 10 Jan 2014 18:04:07 +0100 Subject: [PATCH 040/741] Changed the way of looking up NETINFO_ITEM using net names (using boost::unordered_map). Added a hash function (wxString) for that. Introduced NETINFO_ITEM::GetNetItem( wxString ). BOARD::FindNet() uses the map. Net codes are updated upon net list update. (BOARD::ReplaceNetlist()) Added in some places (mostly class_board.cpp) pad->SetNet() calls to synchronize net codes. On creation of NETINFO_LIST, the first NETINFO_ITEM is added (the unconnected items net). Removed COMPONENT_NET::m_netNumber, as it was not used anywhere. Added an assert to D_PAD::GetNetname(), checking if net code and net name is consistent for unconnected pads. Added an assert for NETINFO_LIST::AppendNet() to assure that appended nets are unique. It seems that at this point: - Updating net lists works fine. The only difference between the file ouput is that after changes it contains empty nets as well. - Nets are not saved in the lexical order. Still, net names and net codes are properly assigned to all items in the .kicad_pcb file. It is going to be addressed in the next commit. I believe it should not create any problems, as pads are sorted by their net names anyway (NETINFO_LIST::buildPadsFullList()) Performed tests: - Created a blank PCB, saved as pic_programmer.kicad_pcb (from demos folder). Updated net lists. .kicad_pcb file (comparing to the results from master branch) differ with net order (as mentioned before), net codes and timestamps. - Removed some of components from the above .kicad_pcb file and updated net lists. Modules reappeared. .kicad_pcb file differs in the same way as described above. - Trying to change a pad net name (via properties dialog) results in assert being fired. It is done on purpose (as there is a call to GetNetname() and net name and net code do not match). This will not happen after the next commit. - Prepared a simple project (starting with schematics). Imported net list, changed schematic, reimported net list - changes are applied. - Eagle & KiCad legacy boards seem to load without any problem. --- include/hashtables.h | 18 +++++++ pcbnew/class_board.cpp | 93 +++++++------------------------- pcbnew/class_netinfo.h | 28 ++++++++-- pcbnew/class_netinfolist.cpp | 22 ++++---- pcbnew/class_pad.cpp | 1 + pcbnew/class_pad.h | 8 ++- pcbnew/pad_edition_functions.cpp | 1 + pcbnew/pcb_netlist.h | 6 +-- 8 files changed, 84 insertions(+), 93 deletions(-) diff --git a/include/hashtables.h b/include/hashtables.h index edb3f798e0..ed319ec64c 100644 --- a/include/hashtables.h +++ b/include/hashtables.h @@ -98,6 +98,24 @@ struct fnv_1a }; +/// Hash function for wxString, counterpart of std::string hash +struct WXSTRING_HASH : std::unary_function +{ + std::size_t operator()( const wxString& aString ) const + { + std::size_t hash = 2166136261u; + + for( wxString::const_iterator it = aString.begin(); it != aString.end(); ++it ) + { + hash ^= (unsigned char) *it; + hash *= 16777619; + } + + return hash; + } +}; + + /** * Type KEYWORD_MAP * is a hashtable made of a const char* and an int. Note that use of this diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index a56c226d63..214e78f5de 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -1355,79 +1355,7 @@ NETINFO_ITEM* BOARD::FindNet( int aNetcode ) const NETINFO_ITEM* BOARD::FindNet( const wxString& aNetname ) const { - // the first valid netcode is 1. - // zero is reserved for "no connection" and is not used. - if( aNetname.IsEmpty() ) - return NULL; - - int ncount = m_NetInfo.GetNetCount(); - - // Search for a netname = aNetname -#if 0 - - // Use a sequential search: easy to understand, but slow - for( int ii = 1; ii < ncount; ii++ ) - { - NETINFO_ITEM* item = m_NetInfo.GetNetItem( ii ); - - if( item && item->GetNetname() == aNetname ) - { - return item; - } - } - -#else - - // Use a fast binary search, - // this is possible because Nets are alphabetically ordered in list - // see NETINFO_LIST::BuildListOfNets() and - // NETINFO_LIST::Build_Pads_Full_List() - int imax = ncount - 1; - int index = imax; - - while( ncount > 0 ) - { - int ii = ncount; - ncount >>= 1; - - if( (ii & 1) && ( ii > 1 ) ) - ncount++; - - NETINFO_ITEM* item = m_NetInfo.GetNetItem( index ); - - if( item == NULL ) - return NULL; - - int icmp = item->GetNetname().Cmp( aNetname ); - - if( icmp == 0 ) // found ! - { - return item; - } - - if( icmp < 0 ) // must search after item - { - index += ncount; - - if( index > imax ) - index = imax; - - continue; - } - - if( icmp > 0 ) // must search before item - { - index -= ncount; - - if( index < 1 ) - index = 1; - - continue; - } - } - -#endif - return NULL; + return m_NetInfo.GetNetItem( aNetname ); } @@ -2618,7 +2546,10 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets, } if( !aNetlist.IsDryRun() ) + { pad->SetNetname( wxEmptyString ); + pad->SetNet( 0 ); + } } } else // Footprint pad has a net. @@ -2638,7 +2569,19 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets, } if( !aNetlist.IsDryRun() ) + { pad->SetNetname( net.GetNetName() ); + + NETINFO_ITEM* netinfo = FindNet( net.GetNetName() ); + if( netinfo == NULL ) + { + // It is a new net, we have to add it + netinfo = new NETINFO_ITEM( this, net.GetNetName(), m_NetInfo.GetNetCount() ); + m_NetInfo.AppendNet( netinfo ); + } + + pad->SetNet( netinfo->GetNet() ); + } } } } @@ -2711,6 +2654,7 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets, aReporter->Report( msg ); } previouspad->SetNetname( wxEmptyString ); + previouspad->SetNet( 0 ); } netname = pad->GetNetname(); count = 1; @@ -2723,7 +2667,10 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets, // Examine last pad if( pad && count == 1 ) + { pad->SetNetname( wxEmptyString ); + pad->SetNet( 0 ); + } } // Last step: Some tests: diff --git a/pcbnew/class_netinfo.h b/pcbnew/class_netinfo.h index a3c1807e14..c0e81a684e 100644 --- a/pcbnew/class_netinfo.h +++ b/pcbnew/class_netinfo.h @@ -37,6 +37,8 @@ #include #include #include +#include +#include class wxDC; @@ -115,7 +117,6 @@ public: }; - /** * Class NETINFO * is a container class for NETINFO_ITEM elements, which are the nets. That makes @@ -141,6 +142,20 @@ public: return m_NetBuffer[aNetcode]; } + /** + * Function GetItem + * @param aNetName = net name to identify a given NETINFO_ITEM + * @return NETINFO_ITEM* - by \a aNetName, or NULL if not found + */ + NETINFO_ITEM* GetNetItem( const wxString& aNetName ) const + { + NETNAMES_MAP::const_iterator result = m_netNames.find( aNetName ); + if( result != m_netNames.end() ) + return (*result).second; + + return NULL; + } + /** * Function GetNetCount * @return the number of nets ( always >= 1 ) @@ -188,6 +203,8 @@ public: void Show() const; #endif + typedef boost::unordered_map NETNAMES_MAP; + private: /** @@ -214,6 +231,7 @@ private: void buildPadsFullList(); BOARD* m_Parent; + NETNAMES_MAP m_netNames; ///< map for a fast look up by net names std::vector m_NetBuffer; ///< net list (name, design constraints ..) std::vector m_PadsFullList; ///< contains all pads, sorted by pad's netname. @@ -394,15 +412,15 @@ public: /** * Function GetNetname - * @return const wxString * , a pointer to the full netname + * @return const wxString&, a reference to the full netname */ - wxString GetNetname() const { return m_Netname; } + const wxString& GetNetname() const { return m_Netname; } /** * Function GetShortNetname - * @return const wxString * , a pointer to the short netname + * @return const wxString &, a reference to the short netname */ - wxString GetShortNetname() const { return m_ShortNetname; } + const wxString& GetShortNetname() const { return m_ShortNetname; } /** * Function GetMsgPanelInfo diff --git a/pcbnew/class_netinfolist.cpp b/pcbnew/class_netinfolist.cpp index 75bad023a2..561e845e21 100644 --- a/pcbnew/class_netinfolist.cpp +++ b/pcbnew/class_netinfolist.cpp @@ -15,9 +15,10 @@ // Constructor and destructor -NETINFO_LIST::NETINFO_LIST( BOARD* aParent ) +NETINFO_LIST::NETINFO_LIST( BOARD* aParent ) : m_Parent( aParent ) { - m_Parent = aParent; + // Make sure that the unconnected net has number 0 + AppendNet( new NETINFO_ITEM( aParent, wxEmptyString, 0 ) ); } @@ -34,14 +35,20 @@ void NETINFO_LIST::clear() m_NetBuffer.clear(); m_PadsFullList.clear(); + m_netNames.clear(); } void NETINFO_LIST::AppendNet( NETINFO_ITEM* aNewElement ) { + // net names & codes are supposed to be unique + assert( GetNetItem( aNewElement->GetNetname() ) == NULL ); + assert( GetNetItem( aNewElement->GetNet() ) == NULL ); + m_NetBuffer.push_back( aNewElement ); - // D(Show();) + // add an entry for fast look up by a net name using a map + m_netNames.insert( std::make_pair( aNewElement->GetNetname(), aNewElement ) ); } @@ -74,18 +81,13 @@ void NETINFO_LIST::buildListOfNets() { D_PAD* pad; int nodes_count = 0; - NETINFO_ITEM* net_item; // Build the PAD list, sorted by net buildPadsFullList(); // Restore the initial state of NETINFO_ITEMs for( unsigned i = 0; i < GetNetCount(); ++i ) - { GetNetItem( i )->Clear(); - } - - std::cout << m_PadsFullList.size() << std::endl; // Assign pads to appropriate NETINFO_ITEMs for( unsigned ii = 0; ii < m_PadsFullList.size(); ii++ ) @@ -95,8 +97,8 @@ void NETINFO_LIST::buildListOfNets() if( pad->GetNet() == 0 ) // pad not connected continue; - net_item = GetNetItem( pad->GetNet() ); - net_item->m_PadInNetList.push_back( pad ); + // Add pad to the appropriate list of pads + GetNetItem( pad->GetNet() )->m_PadInNetList.push_back( pad ); ++nodes_count; } diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index f984e4aa9b..2b707ead14 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -413,6 +413,7 @@ void D_PAD::CopyNetlistSettings( D_PAD* aPad ) wxCHECK_RET( aPad != NULL && aPad != this, wxT( "Cannot copy to NULL or yourself." ) ); aPad->SetNetname( GetNetname() ); + aPad->SetNet( GetNet() ); aPad->SetLocalClearance( m_LocalClearance ); aPad->SetLocalSolderMaskMargin( m_LocalSolderMaskMargin ); diff --git a/pcbnew/class_pad.h b/pcbnew/class_pad.h index 5a385ea917..3c0b567c28 100644 --- a/pcbnew/class_pad.h +++ b/pcbnew/class_pad.h @@ -128,7 +128,13 @@ public: * Function GetNetname * @return const wxString& - the full netname */ - const wxString& GetNetname() const { return m_Netname; } + const wxString& GetNetname() const + { + assert( ( GetNet() == 0 ) == m_Netname.IsEmpty() ); + // assert( GetBoard()->FindNet( GetNet() ) == GetBoard()->FindNet( m_Netname ) ); + + return m_Netname; + } /** * Function GetShortNetname diff --git a/pcbnew/pad_edition_functions.cpp b/pcbnew/pad_edition_functions.cpp index b99bd1580a..3e890af710 100644 --- a/pcbnew/pad_edition_functions.cpp +++ b/pcbnew/pad_edition_functions.cpp @@ -142,6 +142,7 @@ void PCB_BASE_FRAME::AddPad( MODULE* aModule, bool draw ) // Update the pad properties. Import_Pad_Settings( pad, false ); pad->SetNetname( wxEmptyString ); + pad->SetNet( 0 ); pad->SetPosition( GetCrossHairPosition() ); diff --git a/pcbnew/pcb_netlist.h b/pcbnew/pcb_netlist.h index ff9544e10f..58ab9bf17d 100644 --- a/pcbnew/pcb_netlist.h +++ b/pcbnew/pcb_netlist.h @@ -47,16 +47,14 @@ class REPORTER; class COMPONENT_NET { wxString m_pinName; - wxString m_netNumber; wxString m_netName; public: COMPONENT_NET() {} - COMPONENT_NET( const wxString& aPinName, const wxString& aNetName ) + COMPONENT_NET( const wxString& aPinName, const wxString& aNetName ) : + m_pinName( aPinName ), m_netName( aNetName ) { - m_pinName = aPinName; - m_netName = aNetName; } const wxString& GetPinName() const { return m_pinName; } From 654e7e556e61b9848eb4443256c973f85d682442 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 14 Jan 2014 10:41:52 +0100 Subject: [PATCH 041/741] Removed D_PAD::SetNetname() function and D_PAD::m_Netname, D_PAD::m_ShortNetname fields. D_PAD::GetNetname() and D_PAD::GetShortNetname() were moved to BOARD_CONNECTED_ITEM. Now they use the net name stored in NETINFO_ITEM. Moved some one-line functions from class_board_connected_item.cpp to class_board_connected_item.h. Added a copyright notice, moved Doxygen comments from class_board_connected_item.cpp to class_board_connected_item.h. I have some doubts if changes introduced pcbnew/dialogs/dialog_pad_properties.cpp do not break anything, but I could not find a test case that breaks the pcbnew. Performed tests: - changed pad's net name from empty to existent - ok, name was changed - changed pad's net name from empty to nonexistent - ok, error message is displayed, net name stays empty - changed pad's net name from existent to empty - ok, net name became empty - changed pad's net name from existent to nonexistent - ok, error message is displayed, net name is not changed - (re)reading netlists, including net changes - fine, changes are applied, but empty nets are still kept - loaded pcbnew/pcad2kicadpcb_plugin/examples/CK1202_V1.pcb to test P-CAD import plugin - ok, net names are correct - imported an Eagle 6.0 board (Arduino Uno; http://arduino.cc/en/uploads/Main/arduino_Uno_Rev3-02-TH.zip) then saved in .kicad_pcb format and reloaded - ok, net names are correct - saved demos/video/video.kicad_pcb in legacy format and then loaded it again - ok, net names are correct --- pcbnew/class_board.cpp | 10 +-- pcbnew/class_board_connected_item.cpp | 78 ++++++------------------ pcbnew/class_board_connected_item.h | 75 ++++++++++++++++++++--- pcbnew/class_pad.cpp | 12 +--- pcbnew/class_pad.h | 28 --------- pcbnew/class_pad_draw_functions.cpp | 6 +- pcbnew/dialogs/dialog_pad_properties.cpp | 32 +++++----- pcbnew/eagle_plugin.cpp | 1 - pcbnew/legacy_plugin.cpp | 2 +- pcbnew/pad_edition_functions.cpp | 1 - pcbnew/pcad2kicadpcb_plugin/pcb.cpp | 10 +-- pcbnew/pcad2kicadpcb_plugin/pcb_pad.cpp | 12 +++- pcbnew/pcb_parser.cpp | 2 +- pcbnew/xchgmod.cpp | 4 -- 14 files changed, 122 insertions(+), 151 deletions(-) diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index 214e78f5de..dfcebd69e8 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -2546,10 +2546,7 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets, } if( !aNetlist.IsDryRun() ) - { - pad->SetNetname( wxEmptyString ); pad->SetNet( 0 ); - } } } else // Footprint pad has a net. @@ -2570,8 +2567,6 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets, if( !aNetlist.IsDryRun() ) { - pad->SetNetname( net.GetNetName() ); - NETINFO_ITEM* netinfo = FindNet( net.GetNetName() ); if( netinfo == NULL ) { @@ -2653,7 +2648,7 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets, GetChars( previouspad->GetPadName() ) ); aReporter->Report( msg ); } - previouspad->SetNetname( wxEmptyString ); + previouspad->SetNet( 0 ); } netname = pad->GetNetname(); @@ -2667,10 +2662,7 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets, // Examine last pad if( pad && count == 1 ) - { - pad->SetNetname( wxEmptyString ); pad->SetNet( 0 ); - } } // Last step: Some tests: diff --git a/pcbnew/class_board_connected_item.cpp b/pcbnew/class_board_connected_item.cpp index eaf793f9b7..cf44e1dc7a 100644 --- a/pcbnew/class_board_connected_item.cpp +++ b/pcbnew/class_board_connected_item.cpp @@ -1,8 +1,3 @@ -/** - * @file class_board_connected_item.cpp - * @brief BOARD_CONNECTED_ITEM class functions. - */ - /* * This program source code file is part of KiCad, a free EDA CAD application. * @@ -28,6 +23,11 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ +/** + * @file class_board_connected_item.cpp + * @brief BOARD_CONNECTED_ITEM class functions. + */ + #include #include @@ -36,68 +36,32 @@ BOARD_CONNECTED_ITEM::BOARD_CONNECTED_ITEM( BOARD_ITEM* aParent, KICAD_T idtype ) : - BOARD_ITEM( aParent, idtype ) + BOARD_ITEM( aParent, idtype ), m_NetCode( 0 ), m_Subnet( 0 ), m_ZoneSubnet( 0 ) { - m_NetCode = 0; - m_Subnet = 0; - m_ZoneSubnet = 0; } BOARD_CONNECTED_ITEM::BOARD_CONNECTED_ITEM( const BOARD_CONNECTED_ITEM& aItem ) : - BOARD_ITEM( aItem ) + BOARD_ITEM( aItem ), m_NetCode( aItem.m_NetCode ), m_Subnet( aItem.m_Subnet ), + m_ZoneSubnet( aItem.m_ZoneSubnet ) { - m_NetCode = aItem.m_NetCode; - m_Subnet = aItem.m_Subnet; - m_ZoneSubnet = aItem.m_ZoneSubnet; } -/** - * Function GetNet - * @return int - the net code. - */ -int BOARD_CONNECTED_ITEM::GetNet() const +const wxString& BOARD_CONNECTED_ITEM::GetNetname() const { - return m_NetCode; + BOARD* board = GetBoard(); + NETINFO_ITEM* netinfo = board->FindNet( m_NetCode ); + + return netinfo->GetNetname(); } -void BOARD_CONNECTED_ITEM::SetNet( int aNetCode ) +const wxString& BOARD_CONNECTED_ITEM::GetShortNetname() const { - m_NetCode = aNetCode; -} + NETINFO_ITEM* netinfo = GetBoard()->FindNet( m_NetCode ); - -/** - * Function GetSubNet - * @return int - the sub net code. - */ -int BOARD_CONNECTED_ITEM::GetSubNet() const -{ - return m_Subnet; -} - - -void BOARD_CONNECTED_ITEM::SetSubNet( int aSubNetCode ) -{ - m_Subnet = aSubNetCode; -} - - -/** - * Function GetZoneSubNet - * @return int - the sub net code in zone connections. - */ -int BOARD_CONNECTED_ITEM::GetZoneSubNet() const -{ - return m_ZoneSubnet; -} - - -void BOARD_CONNECTED_ITEM::SetZoneSubNet( int aSubNetCode ) -{ - m_ZoneSubnet = aSubNetCode; + return netinfo->GetShortNetname(); } @@ -132,11 +96,6 @@ int BOARD_CONNECTED_ITEM::GetClearance( BOARD_CONNECTED_ITEM* aItem ) const } -/** return a pointer to the netclass of the zone - * if the net is not found (can happen when a netlist is reread, - * and the net name is not existant, return the default net class - * So should not return a null pointer - */ NETCLASS* BOARD_CONNECTED_ITEM::GetNetClass() const { // It is important that this be implemented without any sequential searching. @@ -176,10 +135,7 @@ NETCLASS* BOARD_CONNECTED_ITEM::GetNetClass() const return board->m_NetClasses.GetDefault(); } -/** - * Function GetNetClassName - * @return the Net Class name of this item - */ + wxString BOARD_CONNECTED_ITEM::GetNetClassName() const { wxString name; diff --git a/pcbnew/class_board_connected_item.h b/pcbnew/class_board_connected_item.h index 67cd457398..9b2f5df7b8 100644 --- a/pcbnew/class_board_connected_item.h +++ b/pcbnew/class_board_connected_item.h @@ -1,3 +1,28 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 1992-2012 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 + */ + /** * @file class_board_connected_item.h * @brief Class BOARD_CONNECTED_ITEM. @@ -6,7 +31,6 @@ #ifndef BOARD_CONNECTED_ITEM_H #define BOARD_CONNECTED_ITEM_H - #include class NETCLASS; @@ -48,22 +72,55 @@ public: * Function GetNet * @return int - the net code. */ - int GetNet() const; - virtual void SetNet( int aNetCode ); + int GetNet() const + { + return m_NetCode; + } + + virtual void SetNet( int aNetCode ) + { + m_NetCode = aNetCode; + } /** * Function GetSubNet * @return int - the sub net code. */ - int GetSubNet() const; - void SetSubNet( int aSubNetCode ); + int GetSubNet() const + { + return m_Subnet; + } + + void SetSubNet( int aSubNetCode ) + { + m_Subnet = aSubNetCode; + } /** * Function GetZoneSubNet * @return int - the sub net code in zone connections. */ - int GetZoneSubNet() const; - void SetZoneSubNet( int aSubNetCode ); + int GetZoneSubNet() const + { + return m_ZoneSubnet; + } + + void SetZoneSubNet( int aSubNetCode ) + { + m_ZoneSubnet = aSubNetCode; + } + + /** + * Function GetNetname + * @return const wxString& - the full netname + */ + const wxString& GetNetname() const; + + /** + * Function GetShortNetname + * @return const wxString& - the short netname + */ + const wxString& GetShortNetname() const; /** * Function GetClearance @@ -84,6 +141,10 @@ public: /** * Function GetNetClassName + * returns a pointer to the netclass of the zone. + * If the net is not found (can happen when a netlist is reread, + * and the net name does not exist, return the default net class + * (should not return a null pointer). * @return the Net Class name of this item */ wxString GetNetClassName() const; diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index 2b707ead14..b9877c4a56 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -364,13 +364,6 @@ void D_PAD::SetPadName( const wxString& name ) } -void D_PAD::SetNetname( const wxString& aNetname ) -{ - m_Netname = aNetname; - m_ShortNetname = m_Netname.AfterLast( '/' ); -} - - void D_PAD::Copy( D_PAD* source ) { if( source == NULL ) @@ -402,8 +395,6 @@ void D_PAD::Copy( D_PAD* source ) SetSubRatsnest( 0 ); SetSubNet( 0 ); - m_Netname = source->m_Netname; - m_ShortNetname = source->m_ShortNetname; } @@ -412,7 +403,6 @@ void D_PAD::CopyNetlistSettings( D_PAD* aPad ) // Don't do anything foolish like trying to copy to yourself. wxCHECK_RET( aPad != NULL && aPad != this, wxT( "Cannot copy to NULL or yourself." ) ); - aPad->SetNetname( GetNetname() ); aPad->SetNet( GetNet() ); aPad->SetLocalClearance( m_LocalClearance ); @@ -578,7 +568,7 @@ void D_PAD::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM>& aList ) aList.push_back( MSG_PANEL_ITEM( _( "Pad" ), Line, BROWN ) ); } - aList.push_back( MSG_PANEL_ITEM( _( "Net" ), m_Netname, DARKCYAN ) ); + aList.push_back( MSG_PANEL_ITEM( _( "Net" ), GetNetname(), DARKCYAN ) ); /* For test and debug only: display m_physical_connexion and * m_logical_connexion */ diff --git a/pcbnew/class_pad.h b/pcbnew/class_pad.h index 3c0b567c28..579b4bbeef 100644 --- a/pcbnew/class_pad.h +++ b/pcbnew/class_pad.h @@ -118,30 +118,6 @@ public: return m_NumPadName == other->m_NumPadName; // hide tricks behind sensible API } - /** - * Function SetNetname - * @param aNetname: the new netname - */ - void SetNetname( const wxString& aNetname ); - - /** - * Function GetNetname - * @return const wxString& - the full netname - */ - const wxString& GetNetname() const - { - assert( ( GetNet() == 0 ) == m_Netname.IsEmpty() ); - // assert( GetBoard()->FindNet( GetNet() ) == GetBoard()->FindNet( m_Netname ) ); - - return m_Netname; - } - - /** - * Function GetShortNetname - * @return const wxString& - the short netname - */ - const wxString& GetShortNetname() const { return m_ShortNetname; } - /** * Function GetShape * @return the shape of this pad. @@ -475,10 +451,6 @@ private: int m_boundingRadius; ///< radius of the circle containing the pad shape - - wxString m_Netname; ///< Full net name like /mysheet/mysubsheet/vout used by Eeschema - wxString m_ShortNetname; ///< short net name, like vout from /mysheet/mysubsheet/vout - /// Pad name (4 char) or a long identifier (used in pad name /// comparisons because this is faster than string comparison) union diff --git a/pcbnew/class_pad_draw_functions.cpp b/pcbnew/class_pad_draw_functions.cpp index c590d55e99..346a4980e6 100644 --- a/pcbnew/class_pad_draw_functions.cpp +++ b/pcbnew/class_pad_draw_functions.cpp @@ -473,7 +473,7 @@ void D_PAD::DrawShape( EDA_RECT* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo ) GRSetDrawMode( aDC, aDrawInfo.m_DrawMode ); // Draw "No connect" ( / or \ or cross X ) if necessary - if( m_Netname.IsEmpty() && aDrawInfo.m_ShowNCMark ) + if( GetNet() == 0 && aDrawInfo.m_ShowNCMark ) { int dx0 = std::min( halfsize.x, halfsize.y ); EDA_COLOR_T nc_color = BLUE; @@ -499,7 +499,7 @@ void D_PAD::DrawShape( EDA_RECT* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo ) wxPoint tpos0 = shape_pos; // Position of the centre of text wxPoint tpos = tpos0; wxSize AreaSize; // size of text area, normalized to AreaSize.y < AreaSize.x - int shortname_len = m_ShortNetname.Len(); + int shortname_len = GetShortNetname().Len(); if( !aDrawInfo.m_Display_netname ) shortname_len = 0; @@ -583,7 +583,7 @@ void D_PAD::DrawShape( EDA_RECT* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo ) tsize = ( tsize * 7 ) / 10; DrawGraphicHaloText( clipBox, aDC, tpos, aDrawInfo.m_Color, BLACK, WHITE, - m_ShortNetname, t_angle, + GetShortNetname(), t_angle, wxSize( tsize, tsize ), GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER, tsize / 7, false, false ); } diff --git a/pcbnew/dialogs/dialog_pad_properties.cpp b/pcbnew/dialogs/dialog_pad_properties.cpp index 7dc306a063..ae1e93036f 100644 --- a/pcbnew/dialogs/dialog_pad_properties.cpp +++ b/pcbnew/dialogs/dialog_pad_properties.cpp @@ -151,7 +151,8 @@ DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, D_PAD* aP m_parent = aParent; m_currentPad = aPad; m_board = m_parent->GetBoard(); - m_dummyPad = new D_PAD( (MODULE*) NULL ); + m_dummyPad = new D_PAD( aPad->GetParent() ); + m_padMaster.SetParent( aPad->GetParent() ); if( aPad ) m_dummyPad->Copy( aPad ); @@ -809,25 +810,16 @@ void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event ) m_currentPad->SetPadName( m_padMaster.GetPadName() ); - if( m_currentPad->GetNetname() != m_padMaster.GetNetname() ) + if( m_currentPad->GetNetname() != m_PadNetNameCtrl->GetValue() ) { - if( m_padMaster.GetNetname().IsEmpty() ) + if( !m_PadNetNameCtrl->GetValue().IsEmpty() && m_padMaster.GetNet() == 0 ) { - rastnestIsChanged = true; - m_currentPad->SetNet( 0 ); - m_currentPad->SetNetname( wxEmptyString ); + DisplayError( NULL, _( "Unknown netname, netname not changed" ) ); } else { - const NETINFO_ITEM* net = m_board->FindNet( m_padMaster.GetNetname() ); - if( net ) - { - rastnestIsChanged = true; - m_currentPad->SetNetname( m_padMaster.GetNetname() ); - m_currentPad->SetNet( net->GetNet() ); - } - else - DisplayError( NULL, _( "Unknown netname, netname not changed" ) ); + rastnestIsChanged = true; + m_currentPad->SetNet( m_padMaster.GetNet() ); } } @@ -986,7 +978,13 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( D_PAD* aPad ) msg = m_PadNumCtrl->GetValue().Left( 4 ); aPad->SetPadName( msg ); - aPad->SetNetname( m_PadNetNameCtrl->GetValue() ); + + // Check if user has set an existing net name + const NETINFO_ITEM* netinfo = m_board->FindNet( m_PadNetNameCtrl->GetValue() ); + if( netinfo != NULL ) + aPad->SetNet( netinfo->GetNet() ); + else + aPad->SetNet( 0 ); // Clear some values, according to the pad type and shape switch( aPad->GetShape() ) @@ -1034,7 +1032,7 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( D_PAD* aPad ) // no offset, no net name, no pad name allowed aPad->SetOffset( wxPoint( 0, 0 ) ); aPad->SetPadName( wxEmptyString ); - aPad->SetNetname( wxEmptyString ); + aPad->SetNet( 0 ); break; default: diff --git a/pcbnew/eagle_plugin.cpp b/pcbnew/eagle_plugin.cpp index 80b2fe78c5..6fec2fbdb2 100644 --- a/pcbnew/eagle_plugin.cpp +++ b/pcbnew/eagle_plugin.cpp @@ -1696,7 +1696,6 @@ void EAGLE_PLUGIN::loadElements( CPTREE& aElements ) if( ni != m_pads_to_nets.end() ) { const ENET* enet = &ni->second; - pad->SetNetname( FROM_UTF8( enet->netname.c_str() ) ); pad->SetNet( enet->netcode ); } } diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index ab5a4fe34f..532750329c 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -1303,7 +1303,7 @@ void LEGACY_PLUGIN::loadPAD( MODULE* aModule ) // read Netname ReadDelimitedText( buf, data, sizeof(buf) ); - pad->SetNetname( FROM_UTF8( StrPurge( buf ) ) ); + assert( m_board->FindNet( netcode )->GetNetname() == FROM_UTF8( StrPurge( buf ) ) ); } else if( TESTLINE( "Po" ) ) // (Po)sition diff --git a/pcbnew/pad_edition_functions.cpp b/pcbnew/pad_edition_functions.cpp index 3e890af710..839d1f39fc 100644 --- a/pcbnew/pad_edition_functions.cpp +++ b/pcbnew/pad_edition_functions.cpp @@ -141,7 +141,6 @@ void PCB_BASE_FRAME::AddPad( MODULE* aModule, bool draw ) // Update the pad properties. Import_Pad_Settings( pad, false ); - pad->SetNetname( wxEmptyString ); pad->SetNet( 0 ); pad->SetPosition( GetCrossHairPosition() ); diff --git a/pcbnew/pcad2kicadpcb_plugin/pcb.cpp b/pcbnew/pcad2kicadpcb_plugin/pcb.cpp index 39a65ebf33..6afde99801 100644 --- a/pcbnew/pcad2kicadpcb_plugin/pcb.cpp +++ b/pcbnew/pcad2kicadpcb_plugin/pcb.cpp @@ -914,17 +914,17 @@ void PCB::AddToBoard() m_board->SetCopperLayerCount( m_layersStackup.GetCount() ); - for( i = 0; i < (int) m_pcbComponents.GetCount(); i++ ) - { - m_pcbComponents[i]->AddToBoard(); - } - for( i = 0; i < (int) m_pcbNetlist.GetCount(); i++ ) { net = m_pcbNetlist[i]; m_board->AppendNet( new NETINFO_ITEM( m_board, net->m_name, net->m_netCode ) ); } + + for( i = 0; i < (int) m_pcbComponents.GetCount(); i++ ) + { + m_pcbComponents[i]->AddToBoard(); + } } } // namespace PCAD2KICAD diff --git a/pcbnew/pcad2kicadpcb_plugin/pcb_pad.cpp b/pcbnew/pcad2kicadpcb_plugin/pcb_pad.cpp index 4ec4338efa..c3cd2e34af 100644 --- a/pcbnew/pcad2kicadpcb_plugin/pcb_pad.cpp +++ b/pcbnew/pcad2kicadpcb_plugin/pcb_pad.cpp @@ -273,8 +273,16 @@ void PCB_PAD::AddToModule( MODULE* aModule, int aRotation, bool aEncapsulatedPad pad->SetAttribute( padType ); - pad->SetNet( 0 ); - pad->SetNetname( m_net ); + // Set the proper net code + NETINFO_ITEM* netinfo = m_board->FindNet( m_net ); + if( netinfo == NULL ) // I believe this should not happen, but just in case + { + // It is a new net + netinfo = new NETINFO_ITEM( m_board, m_net, m_board->GetNetCount() ); + m_board->AppendNet( netinfo ); + } + + pad->SetNet( netinfo->GetNet() ); } if( !aEncapsulatedPad ) diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index f1eaa3026c..b25251a5db 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -2191,7 +2191,7 @@ D_PAD* PCB_PARSER::parseD_PAD() throw( IO_ERROR, PARSE_ERROR ) case T_net: pad->SetNet( parseInt( "net number" ) ); NeedSYMBOLorNUMBER(); - pad->SetNetname( FromUTF8() ); + assert( FromUTF8() == m_board->FindNet( pad->GetNet() )->GetNetname() ); NeedRIGHT(); break; diff --git a/pcbnew/xchgmod.cpp b/pcbnew/xchgmod.cpp index a4ce86869f..e983a0d6ee 100644 --- a/pcbnew/xchgmod.cpp +++ b/pcbnew/xchgmod.cpp @@ -455,17 +455,13 @@ void PCB_EDIT_FRAME::Exchange_Module( MODULE* aOldModule, // Update pad netnames ( when possible) for( D_PAD* pad = aNewModule->Pads(); pad != NULL; pad = pad->Next() ) { - pad->SetNetname( wxEmptyString ); pad->SetNet( 0 ); D_PAD* old_pad = aOldModule->Pads(); for( ; old_pad != NULL; old_pad = old_pad->Next() ) { if( pad->PadNameEqual( old_pad ) ) - { - pad->SetNetname( old_pad->GetNetname() ); pad->SetNet( old_pad->GetNet() ); - } } } From 78732f13f7d2f670fd16dbe12382b9c6d7260036 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 14 Jan 2014 11:41:06 +0100 Subject: [PATCH 042/741] Removed: - ZONE_CONTAINER::m_Netname field - ZONE_CONTAINER::SetNetName() - ZONE_CONTAINER::SetNet() [it uses the one in BOARD_CONNECTED_ITEM] - ZONE_CONTAINER::GetNetName() [instead BOARD_CONNECTED_ITEM::GetNetname is used] - ZONE_CONTAINER::SetNetNameFromNetCode() Performed tests: - Drawn a zone that belongs to a net, then modified schematics so the net does not exist anymore. After reloading the net list, all pads/tracks are updated. Zones still belongs to the net that does not exist in the schematic (but still exists in .kicad_pcb file). After running DRC, the zone becomes not filled. - Undo & redo affects assignment of a polygon to a specific net (you may change net of a polygon, refill it and undo/redo the changes). --- pcbnew/class_board.cpp | 4 +- pcbnew/class_zone.cpp | 43 +-------------------- pcbnew/class_zone.h | 26 ------------- pcbnew/eagle_plugin.cpp | 5 --- pcbnew/kicad_plugin.cpp | 2 +- pcbnew/legacy_plugin.cpp | 16 +++----- pcbnew/pcad2kicadpcb_plugin/pcb_polygon.cpp | 1 - pcbnew/pcb_parser.cpp | 7 +--- pcbnew/specctra_export.cpp | 2 +- pcbnew/zones_by_polygon.cpp | 4 +- pcbnew/zones_by_polygon_fill_functions.cpp | 4 +- pcbnew/zones_functions_for_undo_redo.cpp | 2 +- 12 files changed, 18 insertions(+), 98 deletions(-) diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index dfcebd69e8..af7cc3e4f0 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -1535,7 +1535,7 @@ int BOARD::SetAreasNetCodesFromNetNames( void ) if( GetArea( ii )->GetNet() != 0 ) // i.e. if this zone is connected to a net { - const NETINFO_ITEM* net = FindNet( GetArea( ii )->GetNetName() ); + const NETINFO_ITEM* net = FindNet( GetArea( ii )->GetNetname() ); if( net ) { @@ -2720,7 +2720,7 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets, " has non-existent net name \"%s\" **\n" ), GetChars( coord ), GetChars( zone->GetLayerName() ), - GetChars( zone->GetNetName() ) ); + GetChars( zone->GetNetname() ) ); aReporter->Report( msg ); } } diff --git a/pcbnew/class_zone.cpp b/pcbnew/class_zone.cpp index b1d8405c81..941f95f3b5 100644 --- a/pcbnew/class_zone.cpp +++ b/pcbnew/class_zone.cpp @@ -138,31 +138,6 @@ const wxPoint& ZONE_CONTAINER::GetPosition() const } -void ZONE_CONTAINER::SetNet( int aNetCode ) -{ - BOARD_CONNECTED_ITEM::SetNet( aNetCode ); - - if( aNetCode < 0 ) - return; - - BOARD* board = GetBoard(); - - if( board ) - { - NETINFO_ITEM* net = board->FindNet( aNetCode ); - - if( net ) - m_Netname = net->GetNetname(); - else - m_Netname.Empty(); - } - else - { - m_Netname.Empty(); - } -} - - void ZONE_CONTAINER::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE aDrawMode, const wxPoint& offset ) { @@ -658,7 +633,7 @@ void ZONE_CONTAINER::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) else // a netcode < 0 is an error { msg = wxT( " [" ); - msg << m_Netname + wxT( "]" ); + msg << GetNetname() + wxT( "]" ); msg << wxT( " <" ) << _( "Not Found" ) << wxT( ">" ); } @@ -849,20 +824,6 @@ void ZONE_CONTAINER::Copy( ZONE_CONTAINER* src ) } -bool ZONE_CONTAINER::SetNetNameFromNetCode( void ) -{ - NETINFO_ITEM* net; - - if( m_Parent && ( net = ( (BOARD*) m_Parent )->FindNet( GetNet() ) ) ) - { - m_Netname = net->GetNetname(); - return true; - } - - return false; -} - - ZoneConnection ZONE_CONTAINER::GetPadConnection( D_PAD* aPad ) const { if( aPad == NULL || aPad->GetZoneConnection() == UNDEFINED_CONNECTION ) @@ -928,7 +889,7 @@ wxString ZONE_CONTAINER::GetSelectMenuText() const else { // A netcode < 0 is an error: // Netname not found or area not initialised - text << wxT( " [" ) << m_Netname << wxT( "]" ); + text << wxT( " [" ) << GetNetname() << wxT( "]" ); text << wxT( " <" ) << _( "Not Found" ) << wxT( ">" ); } } diff --git a/pcbnew/class_zone.h b/pcbnew/class_zone.h index 513859b9d8..6423d85396 100644 --- a/pcbnew/class_zone.h +++ b/pcbnew/class_zone.h @@ -186,31 +186,6 @@ public: return ( GetLayer() < FIRST_NON_COPPER_LAYER ) ? true : false; } - /** - * Function SetNet - * sets the netcode and the netname. - * - * @param aNetCode The net code of the zone container if greater than or equal to - * zero. Otherwise the current net code is kept and set the net - * code error flag. - */ - virtual void SetNet( int aNetCode ); - - /** - * Function SetNetNameFromNetCode - * Find the net name corresponding to the net code. - * @return bool - true if net found, else false - */ - bool SetNetNameFromNetCode( void ); - - /** - * Function GetNetName - * returns the net name. - * @return const wxString& - The net name. - */ - const wxString& GetNetName() const { return m_Netname; }; - void SetNetName( const wxString& aName ) { m_Netname = aName; } - /// How to fill areas: 0 = use filled polygons, 1 => fill with segments. void SetFillMode( int aFillMode ) { m_FillMode = aFillMode; } int GetFillMode() const { return m_FillMode; } @@ -607,7 +582,6 @@ public: private: CPolyLine* m_Poly; ///< Outline of the zone. - wxString m_Netname; ///< Name of the net assigned to the zone. CPolyLine* m_smoothedPoly; // Corner-smoothed version of m_Poly int m_cornerSmoothingType; unsigned int m_cornerRadius; diff --git a/pcbnew/eagle_plugin.cpp b/pcbnew/eagle_plugin.cpp index 6fec2fbdb2..14405e9753 100644 --- a/pcbnew/eagle_plugin.cpp +++ b/pcbnew/eagle_plugin.cpp @@ -2259,7 +2259,6 @@ void EAGLE_PLUGIN::packageHole( MODULE* aModule, CPTREE& aTree ) const // no offset, no net name, no pad name allowed // pad->SetOffset( wxPoint( 0, 0 ) ); // pad->SetPadName( wxEmptyString ); - // pad->SetNetname( wxEmptyString ); wxPoint padpos( kicad_x( e.x ), kicad_y( e.y ) ); @@ -2496,7 +2495,6 @@ void EAGLE_PLUGIN::loadSignals( CPTREE& aSignals ) zone->SetTimeStamp( timeStamp( it->second ) ); zone->SetLayer( layer ); zone->SetNet( netCode ); - zone->SetNetName( netName ); CPolyLine::HATCH_STYLE outline_hatch = CPolyLine::DIAGONAL_EDGE; @@ -2552,10 +2550,7 @@ void EAGLE_PLUGIN::loadSignals( CPTREE& aSignals ) // KiCad does not support an unconnected zone with its own non-zero netcode, // but only when assigned netcode = 0 w/o a name... for( ZONES::iterator it = zones.begin(); it != zones.end(); ++it ) - { (*it)->SetNet( 0 ); - (*it)->SetNetName( wxEmptyString ); - } // therefore omit this signal/net. } diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index d18c32edaa..ed6d7c062e 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -1406,7 +1406,7 @@ void PCB_IO::format( ZONE_CONTAINER* aZone, int aNestLevel ) const // (perhaps netcode and netname should be not stored) m_out->Print( aNestLevel, "(zone (net %d) (net_name %s)", aZone->GetIsKeepout() ? 0 : aZone->GetNet(), - m_out->Quotew( aZone->GetIsKeepout() ? wxT("") : aZone->GetNetName() ).c_str() ); + m_out->Quotew( aZone->GetIsKeepout() ? wxT("") : aZone->GetNetname() ).c_str() ); formatLayer( aZone ); diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index 532750329c..ade83543f1 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -2238,7 +2238,6 @@ void LEGACY_PLUGIN::loadZONE_CONTAINER() // the zone net name is the name read in file. // (When mismatch, the user will be prompted in DRC, to fix the actual name) zc->BOARD_CONNECTED_ITEM::SetNet( netcode ); - zc->SetNetName( FROM_UTF8( buf ) ); // init the net name here } else if( TESTLINE( "ZLayer" ) ) // layer found @@ -2255,7 +2254,7 @@ void LEGACY_PLUGIN::loadZONE_CONTAINER() if( !hopt ) { - m_error.Printf( wxT( "Bad ZAux for CZONE_CONTAINER '%s'" ), zc->GetNetName().GetData() ); + m_error.Printf( wxT( "Bad ZAux for CZONE_CONTAINER '%s'" ), zc->GetNetname().GetData() ); THROW_IO_ERROR( m_error ); } @@ -2266,7 +2265,7 @@ void LEGACY_PLUGIN::loadZONE_CONTAINER() case 'F': outline_hatch = CPolyLine::DIAGONAL_FULL; break; default: - m_error.Printf( wxT( "Bad ZAux for CZONE_CONTAINER '%s'" ), zc->GetNetName().GetData() ); + m_error.Printf( wxT( "Bad ZAux for CZONE_CONTAINER '%s'" ), zc->GetNetname().GetData() ); THROW_IO_ERROR( m_error ); } @@ -2283,7 +2282,7 @@ void LEGACY_PLUGIN::loadZONE_CONTAINER() if( smoothing >= ZONE_SETTINGS::SMOOTHING_LAST || smoothing < 0 ) { - m_error.Printf( wxT( "Bad ZSmoothing for CZONE_CONTAINER '%s'" ), zc->GetNetName().GetData() ); + m_error.Printf( wxT( "Bad ZSmoothing for CZONE_CONTAINER '%s'" ), zc->GetNetname().GetData() ); THROW_IO_ERROR( m_error ); } @@ -2358,7 +2357,7 @@ void LEGACY_PLUGIN::loadZONE_CONTAINER() default: m_error.Printf( wxT( "Bad ZClearance padoption for CZONE_CONTAINER '%s'" ), - zc->GetNetName().GetData() ); + zc->GetNetname().GetData() ); THROW_IO_ERROR( m_error ); } @@ -2422,10 +2421,7 @@ void LEGACY_PLUGIN::loadZONE_CONTAINER() // Ensure keepout does not have a net // (which have no sense for a keepout zone) if( zc->GetIsKeepout() ) - { - zc->SetNet(0); - zc->SetNetName( wxEmptyString ); - } + zc->SetNet( 0 ); // should always occur, but who knows, a zone without two corners // is no zone at all, it's a spot? @@ -3644,7 +3640,7 @@ void LEGACY_PLUGIN::saveZONE_CONTAINER( const ZONE_CONTAINER* me ) const fprintf( m_fp, "ZInfo %lX %d %s\n", me->GetTimeStamp(), me->GetIsKeepout() ? 0 : me->GetNet(), - EscapedUTF8( me->GetIsKeepout() ? wxT("") : me->GetNetName() ).c_str() ); + EscapedUTF8( me->GetIsKeepout() ? wxT("") : me->GetNetname() ).c_str() ); // Save the outline layer info fprintf( m_fp, "ZLayer %d\n", me->GetLayer() ); diff --git a/pcbnew/pcad2kicadpcb_plugin/pcb_polygon.cpp b/pcbnew/pcad2kicadpcb_plugin/pcb_polygon.cpp index d64f626bf9..5fab0055e8 100644 --- a/pcbnew/pcad2kicadpcb_plugin/pcb_polygon.cpp +++ b/pcbnew/pcad2kicadpcb_plugin/pcb_polygon.cpp @@ -172,7 +172,6 @@ void PCB_POLYGON::AddToBoard() zone->SetTimeStamp( m_timestamp ); zone->SetLayer( m_KiCadLayer ); zone->SetNet( m_netCode ); - zone->SetNetName( m_net ); // add outline int outline_hatch = CPolyLine::DIAGONAL_EDGE; diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index b25251a5db..0fd7f55b64 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -2423,7 +2423,7 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER() throw( IO_ERROR, PARSE_ERROR ) case T_net_name: NeedSYMBOLorNUMBER(); - zone->SetNetName( FromUTF8() ); + assert( m_board->FindNet( zone->GetNet() )->GetNetname() == FromUTF8() ); NeedRIGHT(); break; @@ -2699,10 +2699,7 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER() throw( IO_ERROR, PARSE_ERROR ) // Ensure keepout does not have a net (which have no sense for a keepout zone) if( zone->GetIsKeepout() ) - { - zone->SetNet(0); - zone->SetNetName( wxEmptyString ); - } + zone->SetNet( 0 ); return zone.release(); } diff --git a/pcbnew/specctra_export.cpp b/pcbnew/specctra_export.cpp index 535d6834fa..dee6c8be03 100644 --- a/pcbnew/specctra_export.cpp +++ b/pcbnew/specctra_export.cpp @@ -1557,7 +1557,7 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IO_ERROR ) plane->SetShape( mainPolygon ); - plane->name = TO_UTF8( item->GetNetName() ); + plane->name = TO_UTF8( item->GetNetname() ); if( plane->name.size() == 0 ) { diff --git a/pcbnew/zones_by_polygon.cpp b/pcbnew/zones_by_polygon.cpp index 19dcfe5f2a..977fef6e29 100644 --- a/pcbnew/zones_by_polygon.cpp +++ b/pcbnew/zones_by_polygon.cpp @@ -550,7 +550,6 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC ) zoneInfo.m_NetcodeSelection = GetBoard()->GetHighLightNetCode(); zone->SetNet( zoneInfo.m_NetcodeSelection ); - zone->SetNetNameFromNetCode( ); } double tmp = ZONE_THERMAL_RELIEF_GAP_MIL; wxGetApp().GetSettings()->Read( ZONE_THERMAL_RELIEF_GAP_STRING_KEY, &tmp ); @@ -579,7 +578,6 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC ) // Netcode and netname are irrelevant, // so ensure they are cleared zone->SetNet( 0 ); - zone->SetNetName( wxEmptyString ); edited = InvokeKeepoutAreaEditor( this, &zoneInfo ); } else @@ -904,7 +902,7 @@ void PCB_EDIT_FRAME::Edit_Zone_Params( wxDC* DC, ZONE_CONTAINER* aZone ) NETINFO_ITEM* net = GetBoard()->FindNet( zoneInfo.m_NetcodeSelection ); if( net ) // net == NULL should not occur - aZone->SetNetName( net->GetNetname() ); + aZone->SetNet( net->GetNet() ); // Combine zones if possible GetBoard()->OnAreaPolygonModified( &s_AuxiliaryList, aZone ); diff --git a/pcbnew/zones_by_polygon_fill_functions.cpp b/pcbnew/zones_by_polygon_fill_functions.cpp index 61324cb6c7..73ca2a8217 100644 --- a/pcbnew/zones_by_polygon_fill_functions.cpp +++ b/pcbnew/zones_by_polygon_fill_functions.cpp @@ -103,7 +103,7 @@ int PCB_EDIT_FRAME::Fill_Zone( ZONE_CONTAINER* aZone ) zoneInfo.m_NetcodeSelection = aZone->GetNet(); SetZoneSettings( zoneInfo ); - msg = aZone->GetNetName(); + msg = aZone->GetNetname(); if( msg.IsEmpty() ) msg = wxT( "No net" ); @@ -150,7 +150,7 @@ int PCB_EDIT_FRAME::Fill_All_Zones( wxWindow * aActiveWindow, bool aVerbose ) if( zoneContainer->GetIsKeepout() ) continue; - msg.Printf( FORMAT_STRING, ii+1, areaCount, GetChars( zoneContainer->GetNetName() ) ); + msg.Printf( FORMAT_STRING, ii + 1, areaCount, GetChars( zoneContainer->GetNetname() ) ); if( progressDialog ) { diff --git a/pcbnew/zones_functions_for_undo_redo.cpp b/pcbnew/zones_functions_for_undo_redo.cpp index 52166bc5db..8abd5b6306 100644 --- a/pcbnew/zones_functions_for_undo_redo.cpp +++ b/pcbnew/zones_functions_for_undo_redo.cpp @@ -67,7 +67,7 @@ bool ZONE_CONTAINER::IsSame( const ZONE_CONTAINER& aZoneToCompare ) if( GetLayer() != aZoneToCompare.GetLayer() ) return false; - if( m_Netname != aZoneToCompare.m_Netname ) + if( GetNet() != aZoneToCompare.GetNet() ) return false; if( GetPriority() != aZoneToCompare.GetPriority() ) From 3017b617118a4fccc7e59763af3f279a647333fa Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 15 Jan 2014 09:34:16 +0100 Subject: [PATCH 043/741] Added NETINFO_LIST::UNCONNECTED constant. --- pcbnew/class_board.cpp | 8 ++++---- pcbnew/class_netinfo.h | 3 +++ pcbnew/class_netinfolist.cpp | 3 +++ pcbnew/class_track.cpp | 4 ++-- pcbnew/connect.cpp | 2 +- pcbnew/eagle_plugin.cpp | 4 ++-- pcbnew/legacy_plugin.cpp | 4 ++-- pcbnew/pad_edition_functions.cpp | 2 +- pcbnew/pcb_parser.cpp | 4 ++-- pcbnew/ratsnest.cpp | 2 +- pcbnew/xchgmod.cpp | 2 +- pcbnew/zones_by_polygon.cpp | 2 +- 12 files changed, 23 insertions(+), 17 deletions(-) diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index af7cc3e4f0..416044cc5d 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -1529,7 +1529,7 @@ int BOARD::SetAreasNetCodesFromNetNames( void ) { if( !GetArea( ii )->IsOnCopperLayer() ) { - GetArea( ii )->SetNet( 0 ); + GetArea( ii )->SetNet( NETINFO_LIST::UNCONNECTED ); continue; } @@ -2546,7 +2546,7 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets, } if( !aNetlist.IsDryRun() ) - pad->SetNet( 0 ); + pad->SetNet( NETINFO_LIST::UNCONNECTED ); } } else // Footprint pad has a net. @@ -2649,7 +2649,7 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets, aReporter->Report( msg ); } - previouspad->SetNet( 0 ); + previouspad->SetNet( NETINFO_LIST::UNCONNECTED ); } netname = pad->GetNetname(); count = 1; @@ -2662,7 +2662,7 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets, // Examine last pad if( pad && count == 1 ) - pad->SetNet( 0 ); + pad->SetNet( NETINFO_LIST::UNCONNECTED ); } // Last step: Some tests: diff --git a/pcbnew/class_netinfo.h b/pcbnew/class_netinfo.h index c0e81a684e..8ea47c3676 100644 --- a/pcbnew/class_netinfo.h +++ b/pcbnew/class_netinfo.h @@ -199,6 +199,9 @@ public: return NULL; } + ///> Constant that holds the unconnected net number + static const int UNCONNECTED; + #if defined(DEBUG) void Show() const; #endif diff --git a/pcbnew/class_netinfolist.cpp b/pcbnew/class_netinfolist.cpp index 561e845e21..590cd352ce 100644 --- a/pcbnew/class_netinfolist.cpp +++ b/pcbnew/class_netinfolist.cpp @@ -162,3 +162,6 @@ void NETINFO_LIST::buildPadsFullList() m_Parent->m_Status_Pcb = LISTE_PAD_OK; } + + +const int NETINFO_LIST::UNCONNECTED = 0; diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index 21cca65517..89c52bb9f9 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -690,7 +690,7 @@ void TRACK::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, if( aDC->LogicalToDeviceXRel( m_Width ) < MIN_TEXT_SIZE ) return; - if( GetNet() == 0 ) + if( GetNet() == NETINFO_LIST::UNCONNECTED ) return; NETINFO_ITEM* net = ( (BOARD*) GetParent() )->FindNet( GetNet() ); @@ -952,7 +952,7 @@ void SEGVIA::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, } // Display the short netname: - if( GetNet() == 0 ) + if( GetNet() == NETINFO_LIST::UNCONNECTED ) return; if( DisplayOpt.DisplayNetNamesMode == 0 || DisplayOpt.DisplayNetNamesMode == 1 ) diff --git a/pcbnew/connect.cpp b/pcbnew/connect.cpp index aa8d4867e6..1833bd0d65 100644 --- a/pcbnew/connect.cpp +++ b/pcbnew/connect.cpp @@ -842,7 +842,7 @@ void PCB_BASE_FRAME::RecalculateAllTracksNetcode() curr_track->end = NULL; curr_track->SetState( BUSY | IN_EDIT | BEGIN_ONPAD | END_ONPAD, false ); curr_track->SetZoneSubNet( 0 ); - curr_track->SetNet( 0 ); // net code = 0 means not connected + curr_track->SetNet( NETINFO_LIST::UNCONNECTED ); } // If no pad, reset pointers and netcode, and do nothing else diff --git a/pcbnew/eagle_plugin.cpp b/pcbnew/eagle_plugin.cpp index 14405e9753..cc60db125f 100644 --- a/pcbnew/eagle_plugin.cpp +++ b/pcbnew/eagle_plugin.cpp @@ -1493,7 +1493,7 @@ void EAGLE_PLUGIN::loadPlain( CPTREE& aGraphics ) zone->SetTimeStamp( timeStamp( gr->second ) ); zone->SetLayer( layer ); - zone->SetNet( 0 ); + zone->SetNet( NETINFO_LIST::UNCONNECTED ); CPolyLine::HATCH_STYLE outline_hatch = CPolyLine::DIAGONAL_EDGE; @@ -2550,7 +2550,7 @@ void EAGLE_PLUGIN::loadSignals( CPTREE& aSignals ) // KiCad does not support an unconnected zone with its own non-zero netcode, // but only when assigned netcode = 0 w/o a name... for( ZONES::iterator it = zones.begin(); it != zones.end(); ++it ) - (*it)->SetNet( 0 ); + (*it)->SetNet( NETINFO_LIST::UNCONNECTED ); // therefore omit this signal/net. } diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index ade83543f1..8b09403302 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -2421,7 +2421,7 @@ void LEGACY_PLUGIN::loadZONE_CONTAINER() // Ensure keepout does not have a net // (which have no sense for a keepout zone) if( zc->GetIsKeepout() ) - zc->SetNet( 0 ); + zc->SetNet( NETINFO_LIST::UNCONNECTED ); // should always occur, but who knows, a zone without two corners // is no zone at all, it's a spot? @@ -2431,7 +2431,7 @@ void LEGACY_PLUGIN::loadZONE_CONTAINER() if( !zc->IsOnCopperLayer() ) { zc->SetFillMode( 0 ); - zc->SetNet( 0 ); + zc->SetNet( NETINFO_LIST::UNCONNECTED ); } // Hatch here, after outlines corners are read diff --git a/pcbnew/pad_edition_functions.cpp b/pcbnew/pad_edition_functions.cpp index 839d1f39fc..e73e8d829a 100644 --- a/pcbnew/pad_edition_functions.cpp +++ b/pcbnew/pad_edition_functions.cpp @@ -141,7 +141,7 @@ void PCB_BASE_FRAME::AddPad( MODULE* aModule, bool draw ) // Update the pad properties. Import_Pad_Settings( pad, false ); - pad->SetNet( 0 ); + pad->SetNet( NETINFO_LIST::UNCONNECTED ); pad->SetPosition( GetCrossHairPosition() ); diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index 0fd7f55b64..b05ce179f2 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -2687,7 +2687,7 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER() throw( IO_ERROR, PARSE_ERROR ) if( !zone->IsOnCopperLayer() ) { zone->SetFillMode( 0 ); - zone->SetNet( 0 ); + zone->SetNet( NETINFO_LIST::UNCONNECTED ); } // Set hatch here, after outlines corners are read @@ -2699,7 +2699,7 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER() throw( IO_ERROR, PARSE_ERROR ) // Ensure keepout does not have a net (which have no sense for a keepout zone) if( zone->GetIsKeepout() ) - zone->SetNet( 0 ); + zone->SetNet( NETINFO_LIST::UNCONNECTED ); return zone.release(); } diff --git a/pcbnew/ratsnest.cpp b/pcbnew/ratsnest.cpp index b5347d3e85..32dba7213d 100644 --- a/pcbnew/ratsnest.cpp +++ b/pcbnew/ratsnest.cpp @@ -540,7 +540,7 @@ void PCB_BASE_FRAME::build_ratsnest_module( MODULE* aModule ) // collect active pads of the module: for( pad_ref = aModule->Pads(); pad_ref != NULL; pad_ref = pad_ref->Next() ) { - if( pad_ref->GetNet() == 0 ) + if( pad_ref->GetNet() == NETINFO_LIST::UNCONNECTED ) continue; localPadList.push_back( pad_ref ); diff --git a/pcbnew/xchgmod.cpp b/pcbnew/xchgmod.cpp index e983a0d6ee..af46b91592 100644 --- a/pcbnew/xchgmod.cpp +++ b/pcbnew/xchgmod.cpp @@ -455,7 +455,7 @@ void PCB_EDIT_FRAME::Exchange_Module( MODULE* aOldModule, // Update pad netnames ( when possible) for( D_PAD* pad = aNewModule->Pads(); pad != NULL; pad = pad->Next() ) { - pad->SetNet( 0 ); + pad->SetNet( NETINFO_LIST::UNCONNECTED ); D_PAD* old_pad = aOldModule->Pads(); for( ; old_pad != NULL; old_pad = old_pad->Next() ) diff --git a/pcbnew/zones_by_polygon.cpp b/pcbnew/zones_by_polygon.cpp index 977fef6e29..9eddd5f7bb 100644 --- a/pcbnew/zones_by_polygon.cpp +++ b/pcbnew/zones_by_polygon.cpp @@ -577,7 +577,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC ) zoneInfo.SetIsKeepout( true ); // Netcode and netname are irrelevant, // so ensure they are cleared - zone->SetNet( 0 ); + zone->SetNet( NETINFO_LIST::UNCONNECTED ); edited = InvokeKeepoutAreaEditor( this, &zoneInfo ); } else From d62b47a0dfe59bfe0e5722c8375a1e8fbf0d37ea Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 15 Jan 2014 18:03:06 +0100 Subject: [PATCH 044/741] BOARD_CONNECTED_ITEMs do not store net code anymore (m_NetCode field), instead net info is stored using a pointer to NETINFO_ITEM. GetNet() refers to the net code stored in the NETINFO_ITEM. SetNet() finds an appropriate NETINFO_ITEM and uses it. Removing GetNet() & SetNet() (and the whole net code idea) requires too many changes in the code (~250 references to the mentioned functions). BOARD_CONNECTED_ITEMs by default get a pointer to NETINFO_ITEM that stores unconnected items. This requires for all BOARD_CONNECTED_ITEMs to have a parent (so BOARD* is accessible). The only orphaned item is BOARD_DESIGN_SETTINGS::m_Pad_Master, but it does not cause any issues so far. Items that do not have access to a BOARD (do not have set parents) and therefore cannot get net assigned, by default get const static NETINFO_LIST::ORPHANED. Performed tests: - loaded .kicad_pcb, KiCad legacy board, Eagle 6.0 board, P-CAD board - all ok - load a simple project, reload netlist after changing connections in eeschema - ok - save & reload a board - ok, but still contain empty nets - remove everything, restore with undo - ok - remove everything, reload netlist - ok - changing net names (all possibilites: empty->existing, empty->not existing, existing->empty, existing->not existing) - all ok - zones: when net is changed to a net that does not have any nodes besides the zone itself, it does not get filled --- include/class_board_item.h | 3 +- pcbnew/class_board.cpp | 3 +- pcbnew/class_board_connected_item.cpp | 38 ++++++++++++++++++-------- pcbnew/class_board_connected_item.h | 26 ++++++++++-------- pcbnew/class_board_design_settings.cpp | 2 +- pcbnew/class_netinfo.h | 4 +++ pcbnew/class_netinfolist.cpp | 1 + pcbnew/class_zone.cpp | 1 - pcbnew/eagle_plugin.cpp | 5 ++-- pcbnew/pcb_parser.cpp | 6 ++-- pcbnew/pcb_parser.h | 2 +- 11 files changed, 57 insertions(+), 34 deletions(-) diff --git a/include/class_board_item.h b/include/class_board_item.h index 6f6bf201d6..b6e5e905a6 100644 --- a/include/class_board_item.h +++ b/include/class_board_item.h @@ -83,8 +83,7 @@ protected: public: BOARD_ITEM( BOARD_ITEM* aParent, KICAD_T idtype ) : - EDA_ITEM( aParent, idtype ) - , m_Layer( FIRST_LAYER ) + EDA_ITEM( aParent, idtype ), m_Layer( FIRST_LAYER ) { } diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index 416044cc5d..691e379cc7 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -2571,7 +2571,8 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets, if( netinfo == NULL ) { // It is a new net, we have to add it - netinfo = new NETINFO_ITEM( this, net.GetNetName(), m_NetInfo.GetNetCount() ); + netinfo = new NETINFO_ITEM( this, net.GetNetName(), + m_NetInfo.GetNetCount() ); m_NetInfo.AppendNet( netinfo ); } diff --git a/pcbnew/class_board_connected_item.cpp b/pcbnew/class_board_connected_item.cpp index cf44e1dc7a..69bcfacb7e 100644 --- a/pcbnew/class_board_connected_item.cpp +++ b/pcbnew/class_board_connected_item.cpp @@ -34,34 +34,50 @@ #include #include - BOARD_CONNECTED_ITEM::BOARD_CONNECTED_ITEM( BOARD_ITEM* aParent, KICAD_T idtype ) : - BOARD_ITEM( aParent, idtype ), m_NetCode( 0 ), m_Subnet( 0 ), m_ZoneSubnet( 0 ) + BOARD_ITEM( aParent, idtype ), m_Subnet( 0 ), m_ZoneSubnet( 0 ), + m_netinfo( &NETINFO_LIST::ORPHANED ) { + // The unconnected is set only in case the item belongs to a BOARD + SetNet( NETINFO_LIST::UNCONNECTED ); } BOARD_CONNECTED_ITEM::BOARD_CONNECTED_ITEM( const BOARD_CONNECTED_ITEM& aItem ) : - BOARD_ITEM( aItem ), m_NetCode( aItem.m_NetCode ), m_Subnet( aItem.m_Subnet ), - m_ZoneSubnet( aItem.m_ZoneSubnet ) + BOARD_ITEM( aItem ), m_Subnet( aItem.m_Subnet ), m_ZoneSubnet( aItem.m_ZoneSubnet ), + m_netinfo( aItem.m_netinfo ) { } +int BOARD_CONNECTED_ITEM::GetNet() const +{ + return m_netinfo->GetNet(); +} + + +void BOARD_CONNECTED_ITEM::SetNet( int aNetCode ) +{ + BOARD* board = GetBoard(); + if( board ) + { + m_netinfo = board->FindNet( aNetCode ); + + if( m_netinfo == NULL ) + m_netinfo = board->FindNet( NETINFO_LIST::UNCONNECTED ); + } +} + + const wxString& BOARD_CONNECTED_ITEM::GetNetname() const { - BOARD* board = GetBoard(); - NETINFO_ITEM* netinfo = board->FindNet( m_NetCode ); - - return netinfo->GetNetname(); + return m_netinfo->GetNetname(); } const wxString& BOARD_CONNECTED_ITEM::GetShortNetname() const { - NETINFO_ITEM* netinfo = GetBoard()->FindNet( m_NetCode ); - - return netinfo->GetShortNetname(); + return m_netinfo->GetShortNetname(); } diff --git a/pcbnew/class_board_connected_item.h b/pcbnew/class_board_connected_item.h index 9b2f5df7b8..b7a059c9f4 100644 --- a/pcbnew/class_board_connected_item.h +++ b/pcbnew/class_board_connected_item.h @@ -33,6 +33,7 @@ #include +class NETINFO_ITEM; class NETCLASS; class TRACK; class D_PAD; @@ -54,8 +55,6 @@ public: std::vector m_PadsConnected; // list of other pads connected to me private: - int m_NetCode; // Net number - int m_Subnet; /* In rastnest routines : for the current net, block number * (number common to the current connected items found) */ @@ -63,6 +62,9 @@ private: int m_ZoneSubnet; // used in rastnest computations : for the current net, // handle cluster number in zone connection + /// Stores all informations about the net that item belongs to + const NETINFO_ITEM* m_netinfo; + public: BOARD_CONNECTED_ITEM( BOARD_ITEM* aParent, KICAD_T idtype ); @@ -72,15 +74,15 @@ public: * Function GetNet * @return int - the net code. */ - int GetNet() const - { - return m_NetCode; - } + int GetNet() const; - virtual void SetNet( int aNetCode ) - { - m_NetCode = aNetCode; - } + /** + * Function SetNet + * sets net using a net code. + * @param aNetCode is a net code for the new net. It has to exist in NETINFO_LIST held by BOARD. + * Otherwise, item is assigned to the unconnected net. + */ + void SetNet( int aNetCode ); /** * Function GetSubNet @@ -112,13 +114,13 @@ public: /** * Function GetNetname - * @return const wxString& - the full netname + * @return wxString - the full netname */ const wxString& GetNetname() const; /** * Function GetShortNetname - * @return const wxString& - the short netname + * @return wxString - the short netname */ const wxString& GetShortNetname() const; diff --git a/pcbnew/class_board_design_settings.cpp b/pcbnew/class_board_design_settings.cpp index e98dc81ef1..a24e6bf94e 100644 --- a/pcbnew/class_board_design_settings.cpp +++ b/pcbnew/class_board_design_settings.cpp @@ -52,7 +52,7 @@ BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS() : - m_Pad_Master( 0 ) + m_Pad_Master( NULL ) { m_EnabledLayers = ALL_LAYERS; // All layers enabled at first. // SetCopperLayerCount() will adjust this. diff --git a/pcbnew/class_netinfo.h b/pcbnew/class_netinfo.h index 8ea47c3676..3e836d0b95 100644 --- a/pcbnew/class_netinfo.h +++ b/pcbnew/class_netinfo.h @@ -202,6 +202,10 @@ public: ///> Constant that holds the unconnected net number static const int UNCONNECTED; + ///> NETINFO_ITEM meaning that there was no net assigned for an item, as there was no + ///> board storing net list available. + static const NETINFO_ITEM ORPHANED; + #if defined(DEBUG) void Show() const; #endif diff --git a/pcbnew/class_netinfolist.cpp b/pcbnew/class_netinfolist.cpp index 590cd352ce..e2f16a014b 100644 --- a/pcbnew/class_netinfolist.cpp +++ b/pcbnew/class_netinfolist.cpp @@ -164,4 +164,5 @@ void NETINFO_LIST::buildPadsFullList() } +const NETINFO_ITEM NETINFO_LIST::ORPHANED = NETINFO_ITEM( NULL, wxString( "orphaned" ), -1 ); const int NETINFO_LIST::UNCONNECTED = 0; diff --git a/pcbnew/class_zone.cpp b/pcbnew/class_zone.cpp index 941f95f3b5..cf5ab48ff7 100644 --- a/pcbnew/class_zone.cpp +++ b/pcbnew/class_zone.cpp @@ -53,7 +53,6 @@ ZONE_CONTAINER::ZONE_CONTAINER( BOARD* aBoard ) : BOARD_CONNECTED_ITEM( aBoard, PCB_ZONE_AREA_T ) { - SetNet( -1 ); // Net number for fast comparisons m_CornerSelection = -1; m_IsFilled = false; // fill status : true when the zone is filled m_FillMode = 0; // How to fill areas: 0 = use filled polygons, != 0 fill with segments diff --git a/pcbnew/eagle_plugin.cpp b/pcbnew/eagle_plugin.cpp index cc60db125f..078600f081 100644 --- a/pcbnew/eagle_plugin.cpp +++ b/pcbnew/eagle_plugin.cpp @@ -1879,7 +1879,7 @@ void EAGLE_PLUGIN::orientModuleText( MODULE* m, const EELEMENT& e, MODULE* EAGLE_PLUGIN::makeModule( CPTREE& aPackage, const string& aPkgName ) const { - std::auto_ptr m( new MODULE( NULL ) ); + std::auto_ptr m( new MODULE( m_board ) ); m->SetFPID( FPID( aPkgName ) ); @@ -2351,6 +2351,7 @@ void EAGLE_PLUGIN::loadSignals( CPTREE& aSignals ) const string& nname = net->second.get( ".name" ); wxString netName = FROM_UTF8( nname.c_str() ); + m_board->AppendNet( new NETINFO_ITEM( m_board, netName, netCode ) ); m_xpath->Value( nname.c_str() ); @@ -2555,7 +2556,7 @@ void EAGLE_PLUGIN::loadSignals( CPTREE& aSignals ) // therefore omit this signal/net. } else - m_board->AppendNet( new NETINFO_ITEM( m_board, netName, netCode++ ) ); + netCode++; } m_xpath->pop(); // "signals.signal" diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index b05ce179f2..db9ed25acf 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -1731,7 +1731,7 @@ MODULE* PCB_PARSER::parseMODULE( wxArrayString* aInitialComments ) throw( IO_ERR case T_pad: { - D_PAD* pad = parseD_PAD(); + D_PAD* pad = parseD_PAD( module.get() ); wxPoint pt = pad->GetPos0(); RotatePoint( &pt, module->GetOrientation() ); pad->SetPosition( pt + module->GetPosition() ); @@ -2011,14 +2011,14 @@ EDGE_MODULE* PCB_PARSER::parseEDGE_MODULE() throw( IO_ERROR, PARSE_ERROR ) } -D_PAD* PCB_PARSER::parseD_PAD() throw( IO_ERROR, PARSE_ERROR ) +D_PAD* PCB_PARSER::parseD_PAD( MODULE* aParent ) throw( IO_ERROR, PARSE_ERROR ) { wxCHECK_MSG( CurTok() == T_pad, NULL, wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as D_PAD." ) ); wxSize sz; wxPoint pt; - std::auto_ptr< D_PAD > pad( new D_PAD( NULL ) ); + std::auto_ptr< D_PAD > pad( new D_PAD( aParent ) ); NeedSYMBOLorNUMBER(); pad->SetPadName( FromUTF8() ); diff --git a/pcbnew/pcb_parser.h b/pcbnew/pcb_parser.h index 233acb1291..0dfb0bbdc5 100644 --- a/pcbnew/pcb_parser.h +++ b/pcbnew/pcb_parser.h @@ -99,7 +99,7 @@ class PCB_PARSER : public PCB_LEXER MODULE* parseMODULE( wxArrayString* aInitialComments = 0 ) throw( IO_ERROR, PARSE_ERROR ); TEXTE_MODULE* parseTEXTE_MODULE() throw( IO_ERROR, PARSE_ERROR ); EDGE_MODULE* parseEDGE_MODULE() throw( IO_ERROR, PARSE_ERROR ); - D_PAD* parseD_PAD() throw( IO_ERROR, PARSE_ERROR ); + D_PAD* parseD_PAD( MODULE* aParent = NULL ) throw( IO_ERROR, PARSE_ERROR ); TRACK* parseTRACK() throw( IO_ERROR, PARSE_ERROR ); SEGVIA* parseSEGVIA() throw( IO_ERROR, PARSE_ERROR ); ZONE_CONTAINER* parseZONE_CONTAINER() throw( IO_ERROR, PARSE_ERROR ); From 8a4e7235049cd5a7f16058dbd4c5afb5b730eb5d Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 16 Jan 2014 14:20:51 +0100 Subject: [PATCH 045/741] NETINFO_ITEMs are not stored in a vector anymore, instead they are held in a unordered_map. Now, the net codes may be not consecutive. There is another way for assigning net codes (using a static int that holds a possible empty net code and a function that makes sure it is not used [getFreeNetCode()]). Removed some unused fields (NETINFO_ITEM::m_NbNodes, m_NbLink, m_NbNoconn, m_Flag). --- pcbnew/class_board.cpp | 3 +- pcbnew/class_netinfo.h | 46 ++++++++++++++----------- pcbnew/class_netinfo_item.cpp | 4 --- pcbnew/class_netinfolist.cpp | 34 +++++++++++++----- pcbnew/pcad2kicadpcb_plugin/pcb_pad.cpp | 2 +- 5 files changed, 53 insertions(+), 36 deletions(-) diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index 691e379cc7..acde874db3 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -2571,8 +2571,7 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets, if( netinfo == NULL ) { // It is a new net, we have to add it - netinfo = new NETINFO_ITEM( this, net.GetNetName(), - m_NetInfo.GetNetCount() ); + netinfo = new NETINFO_ITEM( this, net.GetNetName() ); m_NetInfo.AppendNet( netinfo ); } diff --git a/pcbnew/class_netinfo.h b/pcbnew/class_netinfo.h index 3e836d0b95..34f38188ae 100644 --- a/pcbnew/class_netinfo.h +++ b/pcbnew/class_netinfo.h @@ -34,7 +34,6 @@ #define __CLASSES_NETINFO__ -#include #include #include #include @@ -132,14 +131,16 @@ public: /** * Function GetItem - * @param aNetcode = netcode to identify a given NETINFO_ITEM - * @return NETINFO_ITEM* - by \a aNetcode, or NULL if not found + * @param aNetCode = netcode to identify a given NETINFO_ITEM + * @return NETINFO_ITEM* - by \a aNetCode, or NULL if not found */ - NETINFO_ITEM* GetNetItem( int aNetcode ) const + NETINFO_ITEM* GetNetItem( int aNetCode ) const { - if( unsigned( aNetcode ) >= GetNetCount() ) // catches < 0 too - return NULL; - return m_NetBuffer[aNetcode]; + NETCODES_MAP::const_iterator result = m_netCodes.find( aNetCode ); + if( result != m_netCodes.end() ) + return (*result).second; + + return NULL; } /** @@ -161,7 +162,7 @@ public: * @return the number of nets ( always >= 1 ) * because the first net is the "not connected" net and always exists */ - unsigned GetNetCount() const { return m_NetBuffer.size(); } + unsigned GetNetCount() const { return m_netNames.size(); } /** * Function Append @@ -211,9 +212,9 @@ public: #endif typedef boost::unordered_map NETNAMES_MAP; + typedef boost::unordered_map NETCODES_MAP; private: - /** * Function DeleteData * deletes the list of nets (and free memory) @@ -237,9 +238,20 @@ private: */ void buildPadsFullList(); + /** + * Function getFreeNetCode + * returns the first available net code that is not used by any other net. + */ + int getFreeNetCode() const; + BOARD* m_Parent; + NETNAMES_MAP m_netNames; ///< map for a fast look up by net names - std::vector m_NetBuffer; ///< net list (name, design constraints ..) + NETCODES_MAP m_netCodes; ///< map for a fast look up by net codes + + static int m_newNetCode; ///< number that has a *high* chance to be unused + ///< (to be sure, it is advised to use + ///< getFreeNetCode() function) std::vector m_PadsFullList; ///< contains all pads, sorted by pad's netname. ///< can be used in ratsnest calculations. @@ -252,6 +264,8 @@ private: */ class NETINFO_ITEM { + friend class NETINFO_LIST; + private: const int m_NetCode; ///< A number equivalent to the net name. ///< Used for fast comparisons in ratsnest and DRC computations. @@ -271,12 +285,6 @@ private: BOARD_ITEM* m_parent; ///< The parent board item object the net belongs to. public: - int m_NbNodes; // Pads count for this net - int m_NbLink; // Ratsnets count for this net - int m_NbNoconn; // Ratsnets remaining to route count - int m_Flag; // used in some calculations. Had no - // special meaning - std::vector m_PadInNetList; // List of pads connected to this net unsigned m_RatsnestStartIdx; /* Starting point of ratsnests of this @@ -287,7 +295,7 @@ public: unsigned m_RatsnestEndIdx; // Ending point of ratsnests of this net // (excluded) in this buffer - NETINFO_ITEM( BOARD_ITEM* aParent, const wxString& aNetName = wxEmptyString, int aNetCode = 0 ); + NETINFO_ITEM( BOARD_ITEM* aParent, const wxString& aNetName = wxEmptyString, int aNetCode = -1 ); ~NETINFO_ITEM(); /** @@ -446,10 +454,6 @@ public: { m_PadInNetList.clear(); - m_NbNodes = 0; - m_NbLink = 0; - m_NbNoconn = 0; - m_Flag = 0; m_RatsnestStartIdx = 0; // Starting point of ratsnests of this net in a // general buffer of ratsnest m_RatsnestEndIdx = 0; // Ending point of ratsnests of this net diff --git a/pcbnew/class_netinfo_item.cpp b/pcbnew/class_netinfo_item.cpp index 05bcabb1bc..1ca37ec3a1 100644 --- a/pcbnew/class_netinfo_item.cpp +++ b/pcbnew/class_netinfo_item.cpp @@ -53,10 +53,6 @@ NETINFO_ITEM::NETINFO_ITEM( BOARD_ITEM* aParent, const wxString& aNetName, int a m_NetCode( aNetCode ), m_Netname( aNetName ), m_ShortNetname( m_Netname.AfterLast( '/' ) ) { m_parent = aParent; - m_NbNodes = 0; - m_NbLink = 0; - m_NbNoconn = 0; - m_Flag = 0; m_RatsnestStartIdx = 0; // Starting point of ratsnests of this net in a // general buffer of ratsnest m_RatsnestEndIdx = 0; // Ending point of ratsnests of this net diff --git a/pcbnew/class_netinfolist.cpp b/pcbnew/class_netinfolist.cpp index e2f16a014b..4c5221f372 100644 --- a/pcbnew/class_netinfolist.cpp +++ b/pcbnew/class_netinfolist.cpp @@ -30,25 +30,29 @@ NETINFO_LIST::~NETINFO_LIST() void NETINFO_LIST::clear() { - for( unsigned ii = 0; ii < GetNetCount(); ii++ ) - delete m_NetBuffer[ii]; + NETNAMES_MAP::iterator it, itEnd; + for( it = m_netNames.begin(), itEnd = m_netNames.end(); it != itEnd; ++it ) + delete it->second; - m_NetBuffer.clear(); m_PadsFullList.clear(); m_netNames.clear(); + m_netCodes.clear(); } void NETINFO_LIST::AppendNet( NETINFO_ITEM* aNewElement ) { + // negative net code means that it has to be auto assigned + if( aNewElement->m_NetCode < 0 ) + const_cast( aNewElement->m_NetCode ) = getFreeNetCode(); + // net names & codes are supposed to be unique assert( GetNetItem( aNewElement->GetNetname() ) == NULL ); assert( GetNetItem( aNewElement->GetNet() ) == NULL ); - m_NetBuffer.push_back( aNewElement ); - // add an entry for fast look up by a net name using a map m_netNames.insert( std::make_pair( aNewElement->GetNetname(), aNewElement ) ); + m_netCodes.insert( std::make_pair( aNewElement->GetNet(), aNewElement ) ); } @@ -115,11 +119,13 @@ void NETINFO_LIST::buildListOfNets() #if defined(DEBUG) void NETINFO_LIST::Show() const { - for( unsigned i=0; i < m_NetBuffer.size(); ++i ) + int i = 0; + NETNAMES_MAP::const_iterator it, itEnd; + for( it = m_netNames.begin(), itEnd = m_netNames.end(); it != itEnd; ++it ) { printf( "[%d]: netcode:%d netname:<%s>\n", - i, m_NetBuffer[i]->GetNet(), - TO_UTF8( m_NetBuffer[i]->GetNetname() ) ); + i++, it->second->GetNet(), + TO_UTF8( it->second->GetNetname() ) ); } } #endif @@ -164,5 +170,17 @@ void NETINFO_LIST::buildPadsFullList() } +int NETINFO_LIST::getFreeNetCode() const +{ + do { + if( m_newNetCode < 0 ) + m_newNetCode = 0; + } while( m_netCodes.count( ++NETINFO_LIST::m_newNetCode ) != 0 ); + + return m_newNetCode; +} + + const NETINFO_ITEM NETINFO_LIST::ORPHANED = NETINFO_ITEM( NULL, wxString( "orphaned" ), -1 ); const int NETINFO_LIST::UNCONNECTED = 0; +int NETINFO_LIST::m_newNetCode = 0; diff --git a/pcbnew/pcad2kicadpcb_plugin/pcb_pad.cpp b/pcbnew/pcad2kicadpcb_plugin/pcb_pad.cpp index c3cd2e34af..c5c05d849b 100644 --- a/pcbnew/pcad2kicadpcb_plugin/pcb_pad.cpp +++ b/pcbnew/pcad2kicadpcb_plugin/pcb_pad.cpp @@ -278,7 +278,7 @@ void PCB_PAD::AddToModule( MODULE* aModule, int aRotation, bool aEncapsulatedPad if( netinfo == NULL ) // I believe this should not happen, but just in case { // It is a new net - netinfo = new NETINFO_ITEM( m_board, m_net, m_board->GetNetCount() ); + netinfo = new NETINFO_ITEM( m_board, m_net ); m_board->AppendNet( netinfo ); } From af7520ccb9804234b5bab6dbb7c919afe160c396 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 16 Jan 2014 14:36:09 +0100 Subject: [PATCH 046/741] wxWidgets 2.8 fix --- pcbnew/class_netinfolist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/class_netinfolist.cpp b/pcbnew/class_netinfolist.cpp index 4c5221f372..556ed1d3d7 100644 --- a/pcbnew/class_netinfolist.cpp +++ b/pcbnew/class_netinfolist.cpp @@ -181,6 +181,6 @@ int NETINFO_LIST::getFreeNetCode() const } -const NETINFO_ITEM NETINFO_LIST::ORPHANED = NETINFO_ITEM( NULL, wxString( "orphaned" ), -1 ); +const NETINFO_ITEM NETINFO_LIST::ORPHANED = NETINFO_ITEM( NULL, wxString::FromUTF8( "orphaned" ), -1 ); const int NETINFO_LIST::UNCONNECTED = 0; int NETINFO_LIST::m_newNetCode = 0; From 441e03172c58a7ebf1292fa5ef4a9e10637112d1 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 16 Jan 2014 16:47:31 +0100 Subject: [PATCH 047/741] Added iterators for NETINFO_LIST (as net codes for existing net codes may be not consecutive). --- pcbnew/class_board.cpp | 7 +++-- pcbnew/class_board.h | 18 +++++++++++ pcbnew/class_netclass.cpp | 38 ++++++++++++----------- pcbnew/class_netinfo.h | 60 ++++++++++++++++++++++++++++++++++++ pcbnew/class_netinfolist.cpp | 4 +-- pcbnew/kicad_plugin.cpp | 17 ++++++---- 6 files changed, 115 insertions(+), 29 deletions(-) diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index acde874db3..5c435f634a 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -1440,10 +1440,11 @@ int BOARD::ReturnSortedNetnamesList( wxArrayString& aNames, bool aSortbyPadsCoun netBuffer.reserve( m_NetInfo.GetNetCount() ); - for( unsigned ii = 1; ii < m_NetInfo.GetNetCount(); ii++ ) + for( NETINFO_LIST::iterator net( m_NetInfo.begin() ), netEnd( m_NetInfo.end() ); + net != netEnd; ++net ) { - if( m_NetInfo.GetNetItem( ii )->GetNet() > 0 ) - netBuffer.push_back( m_NetInfo.GetNetItem( ii ) ); + if( net->GetNet() > 0 ) + netBuffer.push_back( *net ); } // sort the list diff --git a/pcbnew/class_board.h b/pcbnew/class_board.h index cd20413baa..c32d1d90e7 100644 --- a/pcbnew/class_board.h +++ b/pcbnew/class_board.h @@ -845,6 +845,24 @@ public: m_NetInfo.AppendNet( aNewNet ); } + /** + * Function BeginNets + * @return iterator to the first element of the NETINFO_ITEMs list + */ + NETINFO_LIST::iterator BeginNets() const + { + return m_NetInfo.begin(); + } + + /** + * Function EndNets + * @return iterator to the last element of the NETINFO_ITEMs list + */ + NETINFO_LIST::iterator EndNets() const + { + return m_NetInfo.end(); + } + /** * Function GetNetCount * @return the number of nets (NETINFO_ITEM) diff --git a/pcbnew/class_netclass.cpp b/pcbnew/class_netclass.cpp index f945963a95..655595a41d 100644 --- a/pcbnew/class_netclass.cpp +++ b/pcbnew/class_netclass.cpp @@ -203,12 +203,10 @@ void BOARD::SynchronizeNetsAndNetClasses() // set all NETs to the default NETCLASS, then later override some // as we go through the NETCLASSes. - int count = m_NetInfo.GetNetCount(); - for( int i=0; iSetClass( m_NetClasses.GetDefault() ); + net->SetClass( m_NetClasses.GetDefault() ); } // Add netclass name and pointer to nets. If a net is in more than one netclass, @@ -248,21 +246,18 @@ void BOARD::SynchronizeNetsAndNetClasses() m_NetClasses.GetDefault()->Clear(); - for( int i=0; iGetClassName(); + const wxString& classname = net->GetClassName(); - // because of the std:map<> this should be fast, and because of - // prior logic, netclass should not be NULL. - NETCLASS* netclass = m_NetClasses.Find( classname ); + // because of the std:map<> this should be fast, and because of + // prior logic, netclass should not be NULL. + NETCLASS* netclass = m_NetClasses.Find( classname ); - wxASSERT( netclass ); + wxASSERT( netclass ); - netclass->Add( net->GetNetname() ); - } + netclass->Add( net->GetNetname() ); } // D(printf("stop\n");) @@ -337,8 +332,15 @@ void NETCLASS::Format( OUTPUTFORMATTER* aFormatter, int aNestLevel, int aControl aFormatter->Print( aNestLevel+1, "(uvia_dia %s)\n", FMT_IU( GetuViaDiameter() ).c_str() ); aFormatter->Print( aNestLevel+1, "(uvia_drill %s)\n", FMT_IU( GetuViaDrill() ).c_str() ); - for( NETCLASS::const_iterator it = begin(); it!= end(); ++it ) - aFormatter->Print( aNestLevel+1, "(add_net %s)\n", aFormatter->Quotew( *it ).c_str() ); + for( NETCLASS::const_iterator it = begin(); it != end(); ++it ) + { + NETINFO_ITEM* netinfo = m_Parent->FindNet( *it ); + + if( netinfo && netinfo->GetNodesCount() > 0 ) + { + aFormatter->Print( aNestLevel+1, "(add_net %s)\n", aFormatter->Quotew( *it ).c_str() ); + } + } aFormatter->Print( aNestLevel, ")\n\n" ); } diff --git a/pcbnew/class_netinfo.h b/pcbnew/class_netinfo.h index 34f38188ae..326a0fa3b4 100644 --- a/pcbnew/class_netinfo.h +++ b/pcbnew/class_netinfo.h @@ -214,6 +214,66 @@ public: typedef boost::unordered_map NETNAMES_MAP; typedef boost::unordered_map NETCODES_MAP; + ///> Wrapper class, so you can iterate through NETINFO_ITEM*s, not + ///> std::pair + class iterator + { + public: + iterator( NETNAMES_MAP::const_iterator aIter ) : m_iterator( aIter ) + { + } + + /// pre-increment operator + const iterator& operator++() + { + ++m_iterator; + + return *this; + } + + /// post-increment operator + iterator operator++( int ) + { + iterator ret = *this; + ++m_iterator; + + return ret; + } + + NETINFO_ITEM* operator*() const + { + return m_iterator->second; + } + + NETINFO_ITEM* operator->() const + { + return m_iterator->second; + } + + bool operator!=( const iterator& aOther ) const + { + return m_iterator != aOther.m_iterator; + } + + bool operator==( const iterator& aOther ) const + { + return m_iterator == aOther.m_iterator; + } + + private: + NETNAMES_MAP::const_iterator m_iterator; + }; + + iterator begin() const + { + return iterator( m_netNames.begin() ); + } + + iterator end() const + { + return iterator( m_netNames.end() ); + } + private: /** * Function DeleteData diff --git a/pcbnew/class_netinfolist.cpp b/pcbnew/class_netinfolist.cpp index 556ed1d3d7..e57bbfed8b 100644 --- a/pcbnew/class_netinfolist.cpp +++ b/pcbnew/class_netinfolist.cpp @@ -90,8 +90,8 @@ void NETINFO_LIST::buildListOfNets() buildPadsFullList(); // Restore the initial state of NETINFO_ITEMs - for( unsigned i = 0; i < GetNetCount(); ++i ) - GetNetItem( i )->Clear(); + for( NETINFO_LIST::iterator net( begin() ), netEnd( end() ); net != netEnd; ++net ) + net->Clear(); // Assign pads to appropriate NETINFO_ITEMs for( unsigned ii = 0; ii < m_PadsFullList.size(); ii++ ) diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index ed6d7c062e..3cda985754 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -654,14 +654,19 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const m_out->Print( aNestLevel, ")\n\n" ); - int netcount = aBoard->GetNetCount(); + // Unconditionally save the unconnected net + m_out->Print( aNestLevel, "(net 0 \"\")\n" ); - for( int i = 0; i < netcount; ++i ) + // and now the rest of nets + for( NETINFO_LIST::iterator net( aBoard->BeginNet() ), netEnd( aBoard->EndNet() ); + net != netEnd; ++net ) { - NETINFO_ITEM* net = aBoard->FindNet( i ); - m_out->Print( aNestLevel, "(net %d %s)\n", - net->GetNet(), - m_out->Quotew( net->GetNetname() ).c_str() ); + if( net->GetNodesCount() > 0 ) // save only not empty nets + { + m_out->Print( aNestLevel, "(net %d %s)\n", + net->GetNet(), + m_out->Quotew( net->GetNetname() ).c_str() ); + } } m_out->Print( 0, "\n" ); From a10d918cac1ec48ceccfe5a4dd38e312ddedeae4 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 27 Jan 2014 11:42:47 +0100 Subject: [PATCH 048/741] Thread-safe version of Delaunay triangulation. --- common/geometry/hetriang.cpp | 72 ++++++-- include/ttl/halfedge/hetraits.h | 124 ------------- include/ttl/halfedge/hetriang.h | 78 +++++++-- include/ttl/ttl.h | 297 +++++++++++++++++--------------- include/ttl/ttl_constr.h | 65 +++---- pcbnew/ratsnest_data.cpp | 2 +- 6 files changed, 317 insertions(+), 321 deletions(-) diff --git a/common/geometry/hetriang.cpp b/common/geometry/hetriang.cpp index c1523ac347..175e80dbd5 100644 --- a/common/geometry/hetriang.cpp +++ b/common/geometry/hetriang.cpp @@ -51,8 +51,6 @@ using namespace hed; using namespace std; -Triangulation* TTLtraits::triang_ = NULL; - #ifdef TTL_USE_NODE_ID int Node::id_count = 0; #endif @@ -164,11 +162,30 @@ EdgePtr Triangulation::initTwoEnclosingTriangles(NodesContainer::iterator first, } +//-------------------------------------------------------------------------------------------------- +Triangulation::Triangulation() { + helper = new ttl::TriangulationHelper( *this ); +} + + +//-------------------------------------------------------------------------------------------------- +Triangulation::Triangulation(const Triangulation& tr) { + std::cout << "Triangulation: Copy constructor not present - EXIT."; + exit(-1); +} + + +//-------------------------------------------------------------------------------------------------- +Triangulation::~Triangulation() { + cleanAll(); + delete helper; +} + + //-------------------------------------------------------------------------------------------------- void Triangulation::createDelaunay(NodesContainer::iterator first, NodesContainer::iterator last) { - - TTLtraits::triang_ = this; + cleanAll(); EdgePtr bedge = initTwoEnclosingTriangles(first, last); @@ -178,7 +195,7 @@ void Triangulation::createDelaunay(NodesContainer::iterator first, NodesContainer::iterator it; for (it = first; it != last; ++it) { - ttl::insertNode(d_iter, *it); + helper->insertNode(d_iter, *it); } // In general (e.g. for the triangle based data structure), the initial dart @@ -189,7 +206,7 @@ void Triangulation::createDelaunay(NodesContainer::iterator first, // triangle "outside" the triangulation.) // Assumes rectangular domain - ttl::removeRectangularBoundary(dc); + helper->removeRectangularBoundary(dc); } @@ -269,7 +286,7 @@ cout << "Iterate boundary 2" << endl; Dart dart_iter = dart; do { - if (ttl::isBoundaryEdge(dart_iter)) + if (helper->isBoundaryEdge(dart_iter)) dart_iter.alpha0().alpha1(); else dart_iter.alpha2().alpha1(); @@ -322,6 +339,31 @@ void Triangulation::cleanAll() { } +//-------------------------------------------------------------------------------------------------- +void Triangulation::swapEdge(Dart& dart) { + if (!dart.getEdge()->isConstrained()) swapEdge(dart.getEdge()); +} + + +//-------------------------------------------------------------------------------------------------- +void Triangulation::splitTriangle(Dart& dart, NodePtr point) { + EdgePtr edge = splitTriangle(dart.getEdge(), point); + dart.init(edge); +} + + +//-------------------------------------------------------------------------------------------------- +void Triangulation::reverse_splitTriangle(Dart& dart) { + reverse_splitTriangle(dart.getEdge()); +} + + +//-------------------------------------------------------------------------------------------------- +void Triangulation::removeBoundaryTriangle(Dart& d) { + removeTriangle(d.getEdge()); +} + + #ifdef TTL_USE_NODE_FLAG //-------------------------------------------------------------------------------------------------- // This is a "template" for accessing all nodes (but multiple tests) @@ -486,7 +528,7 @@ void Triangulation::swapEdge(EdgePtr& diagonal) { // Note that diagonal is both input and output and it is always // kept in counterclockwise direction (this is not required by all - // finctions in ttl:: now) + // functions in TriangulationHelper now) // Swap by rotating counterclockwise // Use the same objects - no deletion or new objects @@ -567,7 +609,7 @@ bool Triangulation::checkDelaunay() const { // only one of the half-edges if (!twinedge || (size_t)edge.get() > (size_t)twinedge.get()) { Dart dart(edge); - if (ttl::swapTestDelaunay(dart)) { + if (helper->swapTestDelaunay(dart)) { noNotDelaunay++; //printEdge(dart,os); os << "\n"; @@ -610,7 +652,7 @@ void Triangulation::optimizeDelaunay() { Dart dart(edge); // Constrained edges should not be swapped - if (!edge->isConstrained() && ttl::swapTestDelaunay(dart, cycling_check)) { + if (!edge->isConstrained() && helper->swapTestDelaunay(dart, cycling_check)) { optimal = false; swapEdge(edge); } @@ -632,7 +674,7 @@ EdgePtr Triangulation::getInteriorNode() const { for (int i = 0; i < 3; ++i) { if (edge->getTwinEdge()) { - if (!ttl::isBoundaryNode(Dart(edge))) + if (!helper->isBoundaryNode(Dart(edge))) return edge; } edge = edge->getNextEdgeInFace(); @@ -643,18 +685,18 @@ EdgePtr Triangulation::getInteriorNode() const { //-------------------------------------------------------------------------------------------------- -static EdgePtr getBoundaryEdgeInTriangle(const EdgePtr& e) { +EdgePtr Triangulation::getBoundaryEdgeInTriangle(const EdgePtr& e) const { EdgePtr edge = e; - if (ttl::isBoundaryEdge(Dart(edge))) + if (helper->isBoundaryEdge(Dart(edge))) return edge; edge = edge->getNextEdgeInFace(); - if (ttl::isBoundaryEdge(Dart(edge))) + if (helper->isBoundaryEdge(Dart(edge))) return edge; edge = edge->getNextEdgeInFace(); - if (ttl::isBoundaryEdge(Dart(edge))) + if (helper->isBoundaryEdge(Dart(edge))) return edge; return EdgePtr(); diff --git a/include/ttl/halfedge/hetraits.h b/include/ttl/halfedge/hetraits.h index e25e993e0e..e24cd0697d 100644 --- a/include/ttl/halfedge/hetraits.h +++ b/include/ttl/halfedge/hetraits.h @@ -69,9 +69,6 @@ namespace hed { struct TTLtraits { - // The actual triangulation object - static Triangulation* triang_; - /** The floating point type used in calculations * involving scalar products and cross products. */ @@ -172,127 +169,6 @@ namespace hed { } //@} // End of Geometric Predicates Group - - - // A rationale for directing these functions to traits is: - // e.g., constraints - - //---------------------------------------------------------------------------------------------- - /* Checks if the edge associated with \e dart should be swapped - * according to the Delaunay criterion.
- * - * \note - * This function is also present in the TTL as ttl::swapTestDelaunay.
- * Thus, the function can be implemented simply as: - * \code - * { return ttl::swapTestDelaunay(dart); } - * \endcode - */ - //static bool swapTestDelaunay(const Dart& dart) { - // return ttl::swapTestDelaunay(dart); - //} - - - //---------------------------------------------------------------------------------------------- - /* Checks if the edge associated with \e dart can be swapped, i.e., - * if the edge is a diagonal in a (strictly) convex quadrilateral. - * This function is also present as ttl::swappableEdge. - */ - //static bool swappableEdge(const Dart& dart) { - // return ttl::swappableEdge(dart); - //} - - - //---------------------------------------------------------------------------------------------- - /* Checks if the edge associated with \e dart should be \e fixed, meaning - * that it should never be swapped. ??? Use when constraints. - */ - //static bool fixedEdge(const Dart& dart) { - // return dart.getEdge()->isConstrained(); - //} - - - //---------------------------------------------------------------------------------------------- - // ----------------------- Functions for Delaunay Triangulation Group ------------------------- - //---------------------------------------------------------------------------------------------- - - /** @name Functions for Delaunay Triangulation */ - //@{ - - //---------------------------------------------------------------------------------------------- - /** Swaps the edge associated with \e dart in the actual data structure. - * - *
- * \image html swapEdge.gif - *
- * - * \param dart - * Some of the functions require a dart as output. - * If this is required by the actual function, the dart should be delivered - * back in a position as seen if it was glued to the edge when swapping (rotating) - * the edge CCW; see the figure. - * - * \note - * - If the edge is \e constrained, or if it should not be swapped for - * some other reason, this function need not do the actual swap of the edge. - * - Some functions in TTL require that \c swapEdge is implemented such that - * darts outside the quadrilateral are not affected by the swap. - */ - static void swapEdge(Dart& dart) { - if (!dart.getEdge()->isConstrained()) triang_->swapEdge(dart.getEdge()); - } - - - //---------------------------------------------------------------------------------------------- - /** Splits the triangle associated with \e dart in the actual data structure into - * three new triangles joining at \e point. - * - *
- * \image html splitTriangle.gif - *
- * - * \param dart - * Output: A CCW dart incident with the new node; see the figure. - */ - static void splitTriangle(Dart& dart, NodePtr point) { - EdgePtr edge = triang_->splitTriangle(dart.getEdge(), point); - dart.init(edge); - } - - //@} // End of Functions for Delaunay Triangulation group - - - //---------------------------------------------------------------------------------------------- - // --------------------------- Functions for removing nodes Group ----------------------------- - //---------------------------------------------------------------------------------------------- - - /** @name Functions for removing nodes */ - //@{ - - //---------------------------------------------------------------------------------------------- - /** The reverse operation of TTLtraits::splitTriangle. - * This function is only required for functions that involve - * removal of interior nodes; see for example ttl::removeInteriorNode. - * - *
- * \image html reverse_splitTriangle.gif - *
- */ - static void reverse_splitTriangle(Dart& dart) { - triang_->reverse_splitTriangle(dart.getEdge()); - } - - - //---------------------------------------------------------------------------------------------- - /** Removes a triangle with an edge at the boundary of the triangulation - * in the actual data structure - */ - static void removeBoundaryTriangle(Dart& d) { - triang_->removeTriangle(d.getEdge()); - } - - //@} // End of Functions for removing nodes Group - }; }; // End of hed namespace diff --git a/include/ttl/halfedge/hetriang.h b/include/ttl/halfedge/hetriang.h index ccee31bc0c..c8326a417d 100644 --- a/include/ttl/halfedge/hetriang.h +++ b/include/ttl/halfedge/hetriang.h @@ -51,10 +51,13 @@ #include #include #include -#include #include #include +namespace ttl { + class TriangulationHelper; +}; + //-------------------------------------------------------------------------------------------------- // The half-edge data structure //-------------------------------------------------------------------------------------------------- @@ -242,26 +245,75 @@ public: class Triangulation { protected: - list leadingEdges_; // one half-edge for each arc + std::list leadingEdges_; // one half-edge for each arc + + ttl::TriangulationHelper* helper; + void addLeadingEdge(EdgePtr& edge) { edge->setAsLeadingEdge(); leadingEdges_.push_front( edge ); } + bool removeLeadingEdgeFromList(EdgePtr& leadingEdge); + void cleanAll(); + /** Swaps the edge associated with \e dart in the actual data structure. + * + *
+ * \image html swapEdge.gif + *
+ * + * \param dart + * Some of the functions require a dart as output. + * If this is required by the actual function, the dart should be delivered + * back in a position as seen if it was glued to the edge when swapping (rotating) + * the edge CCW; see the figure. + * + * \note + * - If the edge is \e constrained, or if it should not be swapped for + * some other reason, this function need not do the actual swap of the edge. + * - Some functions in TTL require that \c swapEdge is implemented such that + * darts outside the quadrilateral are not affected by the swap. + */ + void swapEdge(Dart& dart); + + /** Splits the triangle associated with \e dart in the actual data structure into + * three new triangles joining at \e point. + * + *
+ * \image html splitTriangle.gif + *
+ * + * \param dart + * Output: A CCW dart incident with the new node; see the figure. + */ + void splitTriangle(Dart& dart, NodePtr point); + + /** The reverse operation of TTLtraits::splitTriangle. + * This function is only required for functions that involve + * removal of interior nodes; see for example TrinagulationHelper::removeInteriorNode. + * + *
+ * \image html reverse_splitTriangle.gif + *
+ */ + void reverse_splitTriangle(Dart& dart); + + /** Removes a triangle with an edge at the boundary of the triangulation + * in the actual data structure + */ + void removeBoundaryTriangle(Dart& d); + public: /// Default constructor - Triangulation() {} + Triangulation(); /// Copy constructor - Triangulation(const Triangulation& tr) { - std::cout << "Triangulation: Copy constructor not present - EXIT."; - exit(-1); - } + Triangulation(const Triangulation& tr); /// Destructor - ~Triangulation() { cleanAll(); } + ~Triangulation(); /// Creates a Delaunay triangulation from a set of points void createDelaunay(NodesContainer::iterator first, @@ -295,20 +347,20 @@ public: Dart createDart(); /// Returns a list of "triangles" (one leading half-edge for each triangle) - const list& getLeadingEdges() const { return leadingEdges_; } + const std::list& getLeadingEdges() const { return leadingEdges_; } /// Returns the number of triangles int noTriangles() const { return (int)leadingEdges_.size(); } /// Returns a list of half-edges (one half-edge for each arc) - list* getEdges(bool skip_boundary_edges = false) const; + std::list* getEdges(bool skip_boundary_edges = false) const; #ifdef TTL_USE_NODE_FLAG /// Sets flag in all the nodes void flagNodes(bool flag) const; /// Returns a list of nodes. This function requires TTL_USE_NODE_FLAG to be defined. \see Node. - list* getNodes() const; + std::list* getNodes() const; #endif /// Swaps edges until the triangulation is Delaunay (constrained edges are not swapped) @@ -320,12 +372,16 @@ public: /// Returns an arbitrary interior node (as the source node of the returned edge) EdgePtr getInteriorNode() const; + EdgePtr getBoundaryEdgeInTriangle(const EdgePtr& e) const; + /// Returns an arbitrary boundary edge EdgePtr getBoundaryEdge() const; /// Print edges for plotting with, e.g., gnuplot void printEdges(std::ofstream& os) const; + friend class ttl::TriangulationHelper; + }; // End of class Triangulation diff --git a/include/ttl/ttl.h b/include/ttl/ttl.h index 003e0d81c6..7d7c655843 100644 --- a/include/ttl/ttl.h +++ b/include/ttl/ttl.h @@ -52,8 +52,6 @@ } #endif - using std::list; - // Next on TOPOLOGY: // - get triangle strips @@ -102,7 +100,7 @@ * - \e CW - clockwise * - \e 0_orbit, \e 1_orbit and \e 2_orbit: A sequence of darts around * a node, around an edge and in a triangle respectively; -* see ttl::get_0_orbit_interior and ttl::get_0_orbit_boundary +* see get_0_orbit_interior and get_0_orbit_boundary * - \e arc - In a triangulation an arc is equivalent with an edge * * \see @@ -115,15 +113,15 @@ namespace ttl { - +class TriangulationHelper +{ #ifndef DOXYGEN_SHOULD_SKIP_THIS - //------------------------------------------------------------------------------------------------ - // ----------------------------------- Forward declarations ------------------------------------- - //------------------------------------------------------------------------------------------------ -#if ((_MSC_VER > 0) && (_MSC_VER < 1300)) -#else - +public: + TriangulationHelper(hed::Triangulation& triang) : triangulation(triang) + { + } + // Delaunay Triangulation // ---------------------- template @@ -145,55 +143,55 @@ namespace ttl { // Topological and Geometric Queries // --------------------------------- template - bool locateFaceSimplest(const PointType& point, DartType& dart); + static bool locateFaceSimplest(const PointType& point, DartType& dart); template - bool locateTriangle(const PointType& point, DartType& dart); + static bool locateTriangle(const PointType& point, DartType& dart); template - bool inTriangleSimplest(const PointType& point, const DartType& dart); + static bool inTriangleSimplest(const PointType& point, const DartType& dart); template - bool inTriangle(const PointType& point, const DartType& dart); + static bool inTriangle(const PointType& point, const DartType& dart); template - void getBoundary(const DartType& dart, DartListType& boundary); + static void getBoundary(const DartType& dart, DartListType& boundary); template - bool isBoundaryEdge(const DartType& dart); + static bool isBoundaryEdge(const DartType& dart); template - bool isBoundaryFace(const DartType& dart); + static bool isBoundaryFace(const DartType& dart); template - bool isBoundaryNode(const DartType& dart); + static bool isBoundaryNode(const DartType& dart); template - int getDegreeOfNode(const DartType& dart); + static int getDegreeOfNode(const DartType& dart); template - void get_0_orbit_interior(const DartType& dart, DartListType& orbit); + static void get_0_orbit_interior(const DartType& dart, DartListType& orbit); template - void get_0_orbit_boundary(const DartType& dart, DartListType& orbit); + static void get_0_orbit_boundary(const DartType& dart, DartListType& orbit); template - bool same_0_orbit(const DartType& d1, const DartType& d2); + static bool same_0_orbit(const DartType& d1, const DartType& d2); template - bool same_1_orbit(const DartType& d1, const DartType& d2); + static bool same_1_orbit(const DartType& d1, const DartType& d2); template - bool same_2_orbit(const DartType& d1, const DartType& d2); + static bool same_2_orbit(const DartType& d1, const DartType& d2); template - bool swappableEdge(const DartType& dart, bool allowDegeneracy = false); + static bool swappableEdge(const DartType& dart, bool allowDegeneracy = false); template - void positionAtNextBoundaryEdge(DartType& dart); + static void positionAtNextBoundaryEdge(DartType& dart); template - bool convexBoundary(const DartType& dart); + static bool convexBoundary(const DartType& dart); // Utilities for Delaunay Triangulation @@ -205,7 +203,7 @@ namespace ttl { void optimizeDelaunay(DartListType& elist, const typename DartListType::iterator end); template - bool swapTestDelaunay(const DartType& dart, bool cycling_check = false); + bool swapTestDelaunay(const DartType& dart, bool cycling_check = false) const; template void recSwapDelaunay(DartType& diagonal); @@ -223,9 +221,29 @@ namespace ttl { // Constrained Triangulation // ------------------------- template - DartType insertConstraint(DartType& dstart, DartType& dend, bool optimize_delaunay); - -#endif + static DartType insertConstraint(DartType& dstart, DartType& dend, bool optimize_delaunay); + +private: + hed::Triangulation& triangulation; + + template + void insertNodes(ForwardIterator first, ForwardIterator last, DartType& dart); + + template + static bool isMemberOfFace(const TopologyElementType& topologyElement, const DartType& dart); + + template + static bool locateFaceWithNode(const NodeType& node, DartType& dart_iter); + + template + static void getAdjacentTriangles(const DartType& dart, DartType& t1, DartType& t2, DartType& t3); + + template + static void getNeighborNodes(const DartType& dart, std::list& node_list, bool& boundary); + + template + static bool degenerateTriangle(const DartType& dart); +}; #endif // DOXYGEN_SHOULD_SKIP_THIS @@ -245,7 +263,7 @@ namespace ttl { * can be created as two triangles forming a rectangle that contains * all the points. * After \c insertNode has been called repeatedly with all the points, - * ttl::removeRectangularBoundary can be called to remove triangles + * removeRectangularBoundary can be called to remove triangles * at the boundary of the triangulation so that the boundary * form the convex hull of the points. * @@ -268,19 +286,19 @@ namespace ttl { * - \ref hed::TTLtraits::splitTriangle "TraitsType::splitTriangle" (DartType&, const PointType&) * * \using - * - ttl::locateTriangle - * - ttl::recSwapDelaunay + * - locateTriangle + * - recSwapDelaunay * * \note * - For efficiency reasons \e dart should be close to the insertion \e point. * * \see - * ttl::removeRectangularBoundary + * removeRectangularBoundary */ template - bool insertNode(DartType& dart, PointType& point) { + bool TriangulationHelper::insertNode(DartType& dart, PointType& point) { - bool found = ttl::locateTriangle(point, dart); + bool found = locateTriangle(point, dart); if (!found) { #ifdef DEBUG_TTL cout << "ERROR: Triangulation::insertNode: NO triangle found. /n"; @@ -289,7 +307,7 @@ namespace ttl { } // ??? can we hide the dart? this is not possible if one triangle only - TraitsType::splitTriangle(dart, point); + triangulation.splitTriangle(dart, point); DartType d1 = dart; d1.alpha2().alpha1().alpha2().alpha0().alpha1(); @@ -304,14 +322,14 @@ namespace ttl { //DartType dsav = d3; d3.alpha0().alpha1(); - //if (!TraitsType::fixedEdge(d1) && !ttl::isBoundaryEdge(d1)) { - if (!ttl::isBoundaryEdge(d1)) { + //if (!TraitsType::fixedEdge(d1) && !isBoundaryEdge(d1)) { + if (!isBoundaryEdge(d1)) { d1.alpha2(); recSwapDelaunay(d1); } - //if (!TraitsType::fixedEdge(d2) && !ttl::isBoundaryEdge(d2)) { - if (!ttl::isBoundaryEdge(d2)) { + //if (!TraitsType::fixedEdge(d2) && !isBoundaryEdge(d2)) { + if (!isBoundaryEdge(d2)) { d2.alpha2(); recSwapDelaunay(d2); } @@ -319,8 +337,8 @@ namespace ttl { // Preserve the incoming dart as output incident to the node and CCW //d = dsav.alpha2(); dart.alpha2(); - //if (!TraitsType::fixedEdge(d3) && !ttl::isBoundaryEdge(d3)) { - if (!ttl::isBoundaryEdge(d3)) { + //if (!TraitsType::fixedEdge(d3) && !isBoundaryEdge(d3)) { + if (!isBoundaryEdge(d3)) { d3.alpha2(); recSwapDelaunay(d3); } @@ -332,7 +350,7 @@ namespace ttl { //------------------------------------------------------------------------------------------------ // Private/Hidden function (might change later) template - void insertNodes(ForwardIterator first, ForwardIterator last, DartType& dart) { + void TriangulationHelper::insertNodes(ForwardIterator first, ForwardIterator last, DartType& dart) { // Assumes that the dereferenced point objects are pointers. // References to the point objects are then passed to TTL. @@ -355,14 +373,14 @@ namespace ttl { * Output: A CCW dart at the new boundary * * \using - * - ttl::removeBoundaryNode + * - removeBoundaryNode * * \note * - This function requires that the boundary of the triangulation is * a rectangle with four nodes (one in each corner). */ template - void removeRectangularBoundary(DartType& dart) { + void TriangulationHelper::removeRectangularBoundary(DartType& dart) { DartType d_next = dart; DartType d_iter; @@ -370,8 +388,8 @@ namespace ttl { for (int i = 0; i < 4; i++) { d_iter = d_next; d_next.alpha0(); - ttl::positionAtNextBoundaryEdge(d_next); - ttl::removeBoundaryNode(d_iter); + positionAtNextBoundaryEdge(d_next); + removeBoundaryNode(d_iter); } dart = d_next; // Return a dart at the new boundary @@ -383,20 +401,20 @@ namespace ttl { * updates the triangulation to be Delaunay. * * \using - * - ttl::removeBoundaryNode if \e dart represents a node at the boundary - * - ttl::removeInteriorNode if \e dart represents an interior node + * - removeBoundaryNode if \e dart represents a node at the boundary + * - removeInteriorNode if \e dart represents an interior node * * \note * - The node cannot belong to a fixed (constrained) edge that is not * swappable. (An endless loop is likely to occur in this case). */ template - void removeNode(DartType& dart) { + void TriangulationHelper::removeNode(DartType& dart) { - if (ttl::isBoundaryNode(dart)) - ttl::removeBoundaryNode(dart); + if (isBoundaryNode(dart)) + removeBoundaryNode(dart); else - ttl::removeInteriorNode(dart); + removeInteriorNode(dart); } @@ -405,14 +423,14 @@ namespace ttl { * updates the triangulation to be Delaunay. * * \using - * - ttl::swapEdgesAwayFromBoundaryNode - * - ttl::optimizeDelaunay + * - swapEdgesAwayFromBoundaryNode + * - optimizeDelaunay * * \require * - \ref hed::TTLtraits::removeBoundaryTriangle "TraitsType::removeBoundaryTriangle" (Dart&) */ template - void removeBoundaryNode(DartType& dart) { + void TriangulationHelper::removeBoundaryNode(DartType& dart) { // ... and update Delaunay // - CCW dart must be given (for remove) @@ -420,13 +438,13 @@ namespace ttl { // we assume that there is not only one triangle left in the triangulation. // Position at boundary edge and CCW - if (!ttl::isBoundaryEdge(dart)) { + if (!isBoundaryEdge(dart)) { dart.alpha1(); // ensures that next function delivers back a CCW dart (if the given dart is CCW) - ttl::positionAtNextBoundaryEdge(dart); + positionAtNextBoundaryEdge(dart); } - list swapped_edges; - ttl::swapEdgesAwayFromBoundaryNode(dart, swapped_edges); + std::list swapped_edges; + swapEdgesAwayFromBoundaryNode(dart, swapped_edges); // Remove boundary triangles and remove the new boundary from the list // of swapped edges, see below. @@ -435,7 +453,7 @@ namespace ttl { bool bend = false; while (bend == false) { dnext.alpha1().alpha2(); - if (ttl::isBoundaryEdge(dnext)) + if (isBoundaryEdge(dnext)) bend = true; // Stop when boundary // Generic: Also remove the new boundary from the list of swapped edges @@ -443,20 +461,20 @@ namespace ttl { n_bedge.alpha1().alpha0().alpha1().alpha2(); // new boundary edge // ??? can we avoid find if we do this in swap away? - typename list::iterator it; + typename std::list::iterator it; it = find(swapped_edges.begin(), swapped_edges.end(), n_bedge); if (it != swapped_edges.end()) swapped_edges.erase(it); // Remove the boundary triangle - TraitsType::removeBoundaryTriangle(d_iter); + triangulation.removeBoundaryTriangle(d_iter); d_iter = dnext; } // Optimize Delaunay - typedef list DartListType; - ttl::optimizeDelaunay(swapped_edges); + typedef std::list DartListType; + optimizeDelaunay(swapped_edges); } @@ -465,8 +483,8 @@ namespace ttl { * updates the triangulation to be Delaunay. * * \using - * - ttl::swapEdgesAwayFromInteriorNode - * - ttl::optimizeDelaunay + * - swapEdgesAwayFromInteriorNode + * - optimizeDelaunay * * \require * - \ref hed::TTLtraits::reverse_splitTriangle "TraitsType::reverse_splitTriangle" (Dart&) @@ -476,7 +494,7 @@ namespace ttl { * swappable. (An endless loop is likely to occur in this case). */ template - void removeInteriorNode(DartType& dart) { + void TriangulationHelper::removeInteriorNode(DartType& dart) { // ... and update to Delaunay. // Must allow degeneracy temporarily, see comments in swap edges away @@ -492,13 +510,13 @@ namespace ttl { // Assumes dart is counterclockwise - list swapped_edges; - ttl::swapEdgesAwayFromInteriorNode(dart, swapped_edges); + std::list swapped_edges; + swapEdgesAwayFromInteriorNode(dart, swapped_edges); // The reverse operation of split triangle: // Make one triangle of the three triangles at the node associated with dart // TraitsType:: - TraitsType::reverse_splitTriangle(dart); + triangulation.reverse_splitTriangle(dart); // ???? Not generic yet if we are very strict: // When calling unsplit triangle, darts at the three opposite sides may @@ -511,7 +529,7 @@ namespace ttl { // Note the theoretical result: if there are no edges in the list, // the triangulation is Delaunay already - ttl::optimizeDelaunay(swapped_edges); + optimizeDelaunay(swapped_edges); } //@} // End of Delaunay Triangulation Group @@ -527,7 +545,7 @@ namespace ttl { //------------------------------------------------------------------------------------------------ // Private/Hidden function (might change later) template - bool isMemberOfFace(const TopologyElementType& topologyElement, const DartType& dart) { + bool TriangulationHelper::isMemberOfFace(const TopologyElementType& topologyElement, const DartType& dart) { // Check if the given topology element (node, edge or face) is a member of the face // Assumes: @@ -547,7 +565,7 @@ namespace ttl { //------------------------------------------------------------------------------------------------ // Private/Hidden function (might change later) template - bool locateFaceWithNode(const NodeType& node, DartType& dart_iter) { + bool TriangulationHelper::locateFaceWithNode(const NodeType& node, DartType& dart_iter) { // Locate a face in the topology structure with the given node as a member // Assumes: // - TraitsType::orient2d(DartType, DartType, NodeType) @@ -594,10 +612,10 @@ namespace ttl { * \e regular as explained above. * * \see - * ttl::locateTriangle + * locateTriangle */ template - bool locateFaceSimplest(const PointType& point, DartType& dart) { + bool TriangulationHelper::locateFaceSimplest(const PointType& point, DartType& dart) { // Not degenerate triangles if point is on the extension of the edges // But inTriangle may be called in case of true (may update to inFace2) // Convex boundary @@ -660,11 +678,11 @@ namespace ttl { * then the edge associated with \e dart will be at the boundary of the triangulation. * * \using - * - ttl::locateFaceSimplest - * - ttl::inTriangle + * - locateFaceSimplest + * - inTriangle */ template - bool locateTriangle(const PointType& point, DartType& dart) { + bool TriangulationHelper::locateTriangle(const PointType& point, DartType& dart) { // The purpose is to have a fast and stable procedure that // i) avoids concluding that a point is inside a triangle if it is not inside // ii) avoids infinite loops @@ -713,10 +731,10 @@ namespace ttl { * - \ref hed::TTLtraits::orient2d "TraitsType::orient2d" (DartType&, DartType&, PointType&) * * \see - * ttl::inTriangle for a more robust function + * inTriangle for a more robust function */ template - bool inTriangleSimplest(const PointType& point, const DartType& dart) { + bool TriangulationHelper::inTriangleSimplest(const PointType& point, const DartType& dart) { // Fast and simple: Do not deal with degenerate faces, i.e., if there is // degeneracy, true will be returned if the point is on the extension of the @@ -757,10 +775,10 @@ namespace ttl { * - \ref hed::TTLtraits::scalarProduct2d "TraitsType::scalarProduct2d" (DartType&, PointType&) * * \see - * ttl::inTriangleSimplest + * inTriangleSimplest */ template - bool inTriangle(const PointType& point, const DartType& dart) { + bool TriangulationHelper::inTriangle(const PointType& point, const DartType& dart) { // SHOULD WE INCLUDE A STRATEGY WITH EDGE X e_1 ETC? TO GUARANTEE THAT // ONLY ON ONE EDGE? BUT THIS DOES NOT SOLVE PROBLEMS WITH @@ -841,7 +859,7 @@ namespace ttl { //------------------------------------------------------------------------------------------------ // Private/Hidden function (might change later) template - void getAdjacentTriangles(const DartType& dart, DartType& t1, DartType& t2, DartType& t3) { + void TriangulationHelper::getAdjacentTriangles(const DartType& dart, DartType& t1, DartType& t2, DartType& t3) { DartType dart_iter = dart; @@ -886,7 +904,7 @@ namespace ttl { * - DartListType::push_back (DartType&) */ template - void getBoundary(const DartType& dart, DartListType& boundary) { + void TriangulationHelper::getBoundary(const DartType& dart, DartListType& boundary) { // assumes the given dart is at the boundary (by edge) DartType dart_iter(dart); @@ -932,7 +950,7 @@ namespace ttl { * \endcode */ template - bool isBoundaryEdge(const DartType& dart) { + bool TriangulationHelper::isBoundaryEdge(const DartType& dart) { DartType dart_iter = dart; if (dart_iter.alpha2() == dart) @@ -947,7 +965,7 @@ namespace ttl { * the boundary of the triangulation. */ template - bool isBoundaryFace(const DartType& dart) { + bool TriangulationHelper::isBoundaryFace(const DartType& dart) { // Strategy: boundary if alpha2(d)=d @@ -976,7 +994,7 @@ namespace ttl { * the boundary of the triangulation. */ template - bool isBoundaryNode(const DartType& dart) { + bool TriangulationHelper::isBoundaryNode(const DartType& dart) { // Strategy: boundary if alpha2(d)=d @@ -1009,7 +1027,7 @@ namespace ttl { * the number of edges joining \e V with another node in the triangulation. */ template - int getDegreeOfNode(const DartType& dart) { + int TriangulationHelper::getDegreeOfNode(const DartType& dart) { DartType dart_iter(dart); DartType dart_prev; @@ -1069,7 +1087,8 @@ namespace ttl { // Private/Hidden function template - void getNeighborNodes(const DartType& dart, std::list& node_list, bool& boundary) { + void TriangulationHelper::getNeighborNodes(const DartType& dart, + std::list& node_list, bool& boundary) { DartType dart_iter(dart); @@ -1131,10 +1150,10 @@ namespace ttl { * - DartListType::push_back (DartType&) * * \see - * ttl::get_0_orbit_boundary + * get_0_orbit_boundary */ template - void get_0_orbit_interior(const DartType& dart, DartListType& orbit) { + void TriangulationHelper::get_0_orbit_interior(const DartType& dart, DartListType& orbit) { DartType d_iter = dart; orbit.push_back(d_iter); @@ -1165,10 +1184,10 @@ namespace ttl { * - The last dart in the sequence have opposite orientation compared to the others! * * \see - * ttl::get_0_orbit_interior + * get_0_orbit_interior */ template - void get_0_orbit_boundary(const DartType& dart, DartListType& orbit) { + void TriangulationHelper::get_0_orbit_boundary(const DartType& dart, DartListType& orbit) { DartType dart_prev; DartType d_iter = dart; @@ -1195,17 +1214,17 @@ namespace ttl { * own version.) */ template - bool same_0_orbit(const DartType& d1, const DartType& d2) { + bool TriangulationHelper::same_0_orbit(const DartType& d1, const DartType& d2) { // Two copies of the same dart DartType d_iter = d2; DartType d_end = d2; - if (ttl::isBoundaryNode(d_iter)) { + if (isBoundaryNode(d_iter)) { // position at both boundary edges - ttl::positionAtNextBoundaryEdge(d_iter); + positionAtNextBoundaryEdge(d_iter); d_end.alpha1(); - ttl::positionAtNextBoundaryEdge(d_end); + positionAtNextBoundaryEdge(d_end); } for (;;) { @@ -1229,7 +1248,7 @@ namespace ttl { * \e d1 and/or \e d2 can be CCW or CW. */ template - bool same_1_orbit(const DartType& d1, const DartType& d2) { + bool TriangulationHelper::same_1_orbit(const DartType& d1, const DartType& d2) { DartType d_iter = d2; // (Also works at the boundary) @@ -1245,7 +1264,7 @@ namespace ttl { * \e d1 and/or \e d2 can be CCW or CW */ template - bool same_2_orbit(const DartType& d1, const DartType& d2) { + bool TriangulationHelper::same_2_orbit(const DartType& d1, const DartType& d2) { DartType d_iter = d2; if (d_iter == d1 || d_iter.alpha0() == d1 || @@ -1259,7 +1278,7 @@ namespace ttl { //------------------------------------------------------------------------------------------------ // Private/Hidden function template - bool degenerateTriangle(const DartType& dart) { + bool TriangulationHelper::degenerateTriangle(const DartType& dart) { // Check if triangle is degenerate // Assumes CCW dart @@ -1287,7 +1306,7 @@ namespace ttl { * - \ref hed::TTLtraits::crossProduct2d "TraitsType::crossProduct2d" (Dart&, Dart&) */ template - bool swappableEdge(const DartType& dart, bool allowDegeneracy) { + bool TriangulationHelper::swappableEdge(const DartType& dart, bool allowDegeneracy) { // How "safe" is it? @@ -1340,7 +1359,7 @@ namespace ttl { * infinit loop occurs. */ template - void positionAtNextBoundaryEdge(DartType& dart) { + void TriangulationHelper::positionAtNextBoundaryEdge(DartType& dart) { DartType dart_prev; @@ -1365,14 +1384,14 @@ namespace ttl { * - \ref hed::TTLtraits::crossProduct2d "TraitsType::crossProduct2d" (const Dart&, const Dart&) */ template - bool convexBoundary(const DartType& dart) { + bool TriangulationHelper::convexBoundary(const DartType& dart) { - list blist; - ttl::getBoundary(dart, blist); + std::list blist; + getBoundary(dart, blist); int no; no = (int)blist.size(); - typename list::const_iterator bit = blist.begin(); + typename std::list::const_iterator bit = blist.begin(); DartType d1 = *bit; ++bit; DartType d2; @@ -1428,17 +1447,17 @@ namespace ttl { * seen if it was glued to the edge when swapping (rotating) the edge CCW * * \using - * - ttl::swapTestDelaunay + * - swapTestDelaunay */ template - void optimizeDelaunay(DartListType& elist) { + void TriangulationHelper::optimizeDelaunay(DartListType& elist) { optimizeDelaunay(elist, elist.end()); } //------------------------------------------------------------------------------------------------ template - void optimizeDelaunay(DartListType& elist, const typename DartListType::iterator end) { + void TriangulationHelper::optimizeDelaunay(DartListType& elist, const typename DartListType::iterator end) { // CCW darts // Optimize here means Delaunay, but could be any criterion by @@ -1481,14 +1500,14 @@ namespace ttl { while(!optimal) { optimal = true; for (it = elist.begin(); it != end_opt; ++it) { - if (ttl::swapTestDelaunay(*it, cycling_check)) { + if (swapTestDelaunay(*it, cycling_check)) { // Preserve darts. Potential darts in the list are: // - The current dart // - the four CCW darts on the boundary of the quadrilateral // (the current arc has only one dart) - ttl::swapEdgeInList(it, elist); + swapEdgeInList(it, elist); optimal = false; } // end if should swap @@ -1513,9 +1532,9 @@ namespace ttl { */ template #if ((_MSC_VER > 0) && (_MSC_VER < 1300))//#ifdef _MSC_VER - bool swapTestDelaunay(const DartType& dart, bool cycling_check = false) { + bool TriangulationHelper::swapTestDelaunay(const DartType& dart, bool cycling_check = false) const { #else - bool swapTestDelaunay(const DartType& dart, bool cycling_check) { + bool TriangulationHelper::swapTestDelaunay(const DartType& dart, bool cycling_check) const { #endif // The general strategy is taken from Cline & Renka. They claim that @@ -1627,17 +1646,17 @@ namespace ttl { * - Calls itself recursively */ template - void recSwapDelaunay(DartType& diagonal) { + void TriangulationHelper::recSwapDelaunay(DartType& diagonal) { - if (!ttl::swapTestDelaunay(diagonal)) - // ??? ttl::swapTestDelaunay also checks if boundary, so this can be optimized + if (!swapTestDelaunay(diagonal)) + // ??? swapTestDelaunay also checks if boundary, so this can be optimized return; // Get the other "edges" of the current triangle; see illustration above. DartType oppEdge1 = diagonal; oppEdge1.alpha1(); bool b1; - if (ttl::isBoundaryEdge(oppEdge1)) + if (isBoundaryEdge(oppEdge1)) b1 = true; else { b1 = false; @@ -1648,7 +1667,7 @@ namespace ttl { DartType oppEdge2 = diagonal; oppEdge2.alpha0().alpha1().alpha0(); bool b2; - if (ttl::isBoundaryEdge(oppEdge2)) + if (isBoundaryEdge(oppEdge2)) b2 = true; else { b2 = false; @@ -1656,7 +1675,7 @@ namespace ttl { } // Swap the given diagonal - TraitsType::swapEdge(diagonal); + triangulation.swapEdge(diagonal); if (!b1) recSwapDelaunay(oppEdge1); @@ -1669,7 +1688,7 @@ namespace ttl { /** Swaps edges away from the (interior) node associated with * \e dart such that that exactly three edges remain incident * with the node. - * This function is used as a first step in ttl::removeInteriorNode + * This function is used as a first step in removeInteriorNode * * \retval dart * A CCW dart incident with the node @@ -1689,10 +1708,10 @@ namespace ttl { * at the node that is given as input. * * \see - * ttl::swapEdgesAwayFromBoundaryNode + * swapEdgesAwayFromBoundaryNode */ template - void swapEdgesAwayFromInteriorNode(DartType& dart, ListType& swapped_edges) { + void TriangulationHelper::swapEdgesAwayFromInteriorNode(DartType& dart, ListType& swapped_edges) { // Same iteration as in fixEdgesAtCorner, but not boundary DartType dnext = dart; @@ -1706,14 +1725,14 @@ namespace ttl { // infinite loop with degree > 3. bool allowDegeneracy = true; - int degree = ttl::getDegreeOfNode(dart); + int degree = getDegreeOfNode(dart); DartType d_iter; while (degree > 3) { d_iter = dnext; dnext.alpha1().alpha2(); - if (ttl::swappableEdge(d_iter, allowDegeneracy)) { - TraitsType::swapEdge(d_iter); // swap the edge away + if (swappableEdge(d_iter, allowDegeneracy)) { + triangulation.swapEdge(d_iter); // swap the edge away // Collect swapped edges in the list // "Hide" the dart on the other side of the edge to avoid it being changed for // other swaps @@ -1733,7 +1752,7 @@ namespace ttl { /** Swaps edges away from the (boundary) node associated with * \e dart in such a way that when removing the edges that remain incident * with the node, the boundary of the triangulation will be convex. - * This function is used as a first step in ttl::removeBoundaryNode + * This function is used as a first step in removeBoundaryNode * * \retval dart * A CCW dart incident with the node @@ -1747,10 +1766,10 @@ namespace ttl { * - The node associated with \e dart is at the boundary of the triangulation. * * \see - * ttl::swapEdgesAwayFromInteriorNode + * swapEdgesAwayFromInteriorNode */ template - void swapEdgesAwayFromBoundaryNode(DartType& dart, ListType& swapped_edges) { + void TriangulationHelper::swapEdgesAwayFromBoundaryNode(DartType& dart, ListType& swapped_edges) { // All darts that are swappable. // To treat collinear nodes at an existing boundary, we must allow degeneracy @@ -1762,7 +1781,7 @@ namespace ttl { // - A dart on the swapped edge is delivered back in a position as // seen if it was glued to the edge when swapping (rotating) the edge CCW - //int degree = ttl::getDegreeOfNode(dart); + //int degree = getDegreeOfNode(dart); passes: @@ -1780,7 +1799,7 @@ passes: while (!bend) { d_next.alpha1().alpha2(); - if (ttl::isBoundaryEdge(d_next)) + if (isBoundaryEdge(d_next)) bend = true; // then it is CW since alpha2 // To allow removing among collinear nodes at the boundary, @@ -1789,13 +1808,13 @@ passes: tmp1 = d_iter; tmp1.alpha1(); tmp2 = d_iter; tmp2.alpha2().alpha1(); // don't bother with boundary (checked later) - if (ttl::isBoundaryEdge(tmp1) && ttl::isBoundaryEdge(tmp2)) + if (isBoundaryEdge(tmp1) && isBoundaryEdge(tmp2)) allowDegeneracy = true; else allowDegeneracy = false; - if (ttl::swappableEdge(d_iter, allowDegeneracy)) { - TraitsType::swapEdge(d_iter); + if (swappableEdge(d_iter, allowDegeneracy)) { + triangulation.swapEdge(d_iter); // Collect swapped edges in the list // "Hide" the dart on the other side of the edge to avoid it being changed for @@ -1821,7 +1840,7 @@ passes: else { d_iter.alpha1(); // CW and see below } - ttl::positionAtNextBoundaryEdge(d_iter); // CCW + positionAtNextBoundaryEdge(d_iter); // CCW dart = d_iter; // for next pass or output @@ -1839,7 +1858,7 @@ passes: * keep them in \e elist. */ template - void swapEdgeInList(const typename DartListType::iterator& it, DartListType& elist) { + void TriangulationHelper::swapEdgeInList(const typename DartListType::iterator& it, DartListType& elist) { typename DartListType::iterator it1, it2, it3, it4; DartType dart(*it); @@ -1867,7 +1886,7 @@ passes: it3 = find(elist.begin(), elist.end(), d3); it4 = find(elist.begin(), elist.end(), d4); - TraitsType::swapEdge(dart); + triangulation.swapEdge(dart); // Update the current dart which may have changed *it = dart; diff --git a/include/ttl/ttl_constr.h b/include/ttl/ttl_constr.h index 67b46fcbf0..125bddeb23 100644 --- a/include/ttl/ttl_constr.h +++ b/include/ttl/ttl_constr.h @@ -51,9 +51,6 @@ static ofstream ofile_constr("qweCons.dat"); #endif - -//using namespace std; - /** \brief Constrained Delaunay triangulation * * Basic generic algorithms in TTL for inserting a constrained edge between two existing nodes.\n @@ -61,7 +58,7 @@ * See documentation for the namespace ttl for general requirements and assumptions. * * \author -* Øyvind Hjelle, oyvindhj@ifi.uio.no +* �yvind Hjelle, oyvindhj@ifi.uio.no */ namespace ttl_constr { @@ -73,6 +70,9 @@ namespace ttl_constr { #endif +class ConstrainedTriangulation +{ + public: //------------------------------------------------------------------------------------------------ /* Checks if \e dart has start and end points in \e dstart and \e dend. * @@ -89,14 +89,14 @@ namespace ttl_constr { * A bool confirming that it's the constraint or not * * \using - * ttl::same_0_orbit + * same_0_orbit */ template - bool isTheConstraint(const DartType& dart, const DartType& dstart, const DartType& dend) { + static bool isTheConstraint(const DartType& dart, const DartType& dstart, const DartType& dend) { DartType d0 = dart; d0.alpha0(); // CW - if ((ttl::same_0_orbit(dstart, dart) && ttl::same_0_orbit(dend, d0)) || - (ttl::same_0_orbit(dstart, d0) && ttl::same_0_orbit(dend, dart))) { + if ((ttl::TriangulationHelper::same_0_orbit(dstart, dart) && ttl::TriangulationHelper::same_0_orbit(dend, d0)) || + (ttl::TriangulationHelper::same_0_orbit(dstart, d0) && ttl::TriangulationHelper::same_0_orbit(dend, dart))) { return true; } return false; @@ -123,7 +123,7 @@ namespace ttl_constr { * TraitsType::orient2d */ template - bool crossesConstraint(DartType& dstart, DartType& dend, DartType& d1, DartType& d2) { + static bool crossesConstraint(DartType& dstart, DartType& dend, DartType& d1, DartType& d2) { typename TraitsType::real_type orient_1 = TraitsType::orient2d(dstart,d1,dend); typename TraitsType::real_type orient_2 = TraitsType::orient2d(dstart,d2,dend); @@ -156,12 +156,12 @@ namespace ttl_constr { * The dart \e d making the smallest positive (or == 0) angle * * \using - * ttl::isBoundaryNode - * ttl::positionAtNextBoundaryEdge + * isBoundaryNode + * positionAtNextBoundaryEdge * TraitsType::orient2d */ template - DartType getAtSmallestAngle(const DartType& dstart, const DartType& dend) { + static DartType getAtSmallestAngle(const DartType& dstart, const DartType& dend) { // - Must boundary be convex??? // - Handle the case where the constraint is already present??? @@ -169,9 +169,9 @@ namespace ttl_constr { // (dstart and dend may define a boundary edge) DartType d_iter = dstart; - if (ttl::isBoundaryNode(d_iter)) { + if (ttl::TriangulationHelper::isBoundaryNode(d_iter)) { d_iter.alpha1(); // CW - ttl::positionAtNextBoundaryEdge(d_iter); // CCW (was rotated CW to the boundary) + ttl::TriangulationHelper::positionAtNextBoundaryEdge(d_iter); // CCW (was rotated CW to the boundary) } // assume convex boundary; see comments @@ -273,7 +273,7 @@ namespace ttl_constr { * Returns the next "collinear" starting node such that dend is returned when done. */ template - DartType findCrossingEdges(const DartType& dstart, const DartType& dend, ListType& elist) { + static DartType findCrossingEdges(const DartType& dstart, const DartType& dend, ListType& elist) { const DartType my_start = getAtSmallestAngle(dstart, dend); DartType my_end = getAtSmallestAngle(dend, dstart); @@ -387,15 +387,16 @@ namespace ttl_constr { * A list containing all the edges crossing the spesified constraint * * \using - * ttl::swappableEdge - * ttl::swapEdgeInList - * ttl::crossesConstraint - * ttl::isTheConstraint + * swappableEdge + * swapEdgeInList + * crossesConstraint + * isTheConstraint */ template - void transformToConstraint(DartType& dstart, DartType& dend, std::list& elist) { + void transformToConstraint(ttl::TriangulationHelper helper, DartType& dstart, DartType& dend, + std::list& elist) const { - typename list::iterator it, used; + typename std::list::iterator it, used; // We may enter in a situation where dstart and dend are altered because of a swap. // (The general rule is that darts inside the actual quadrilateral can be changed, @@ -423,7 +424,7 @@ namespace ttl_constr { if (counter > dartsInList) break; - if (ttl::swappableEdge(*it, true)) { + if (ttl::TriangulationHelper::swappableEdge(*it, true)) { // Dyn & Goren & Rippa 's notation: // The node assosiated with dart *it is denoted u_m. u_m has edges crossing the constraint // named w_1, ... , w_r . The other node to the edge assosiated with dart *it is w_s. @@ -456,7 +457,7 @@ namespace ttl_constr { end = true; // This is the only place swapping is called when inserting a constraint - ttl::swapEdgeInList(it,elist); + helper.swapEdgeInList(it,elist); // If we, during look-ahead, found that dstart and/or dend were in the quadrilateral, // we update them. @@ -512,6 +513,8 @@ namespace ttl_constr { } +}; // End of ConstrainedTriangulation class + }; // End of ttl_constr namespace scope @@ -546,14 +549,14 @@ namespace ttl { // (extension) * - \ref hed::TTLtraits::swapEdge "TraitsType::swapEdge" (DartType&) * * \using - * - ttl::optimizeDelaunay if \e optimize_delaunay is set to \c true + * - optimizeDelaunay if \e optimize_delaunay is set to \c true * * \par Assumes: * - The constrained edge must be inside the existing triangulation (and it cannot * cross the boundary of the triangulation). */ template - DartType insertConstraint(DartType& dstart, DartType& dend, bool optimize_delaunay) { + DartType TriangulationHelper::insertConstraint(DartType& dstart, DartType& dend, bool optimize_delaunay) { // Assumes: // - It is the users responsibility to avoid crossing constraints @@ -567,8 +570,8 @@ namespace ttl { // (extension) // calls itself recursively. // RECURSION - list elist; - DartType next_start = ttl_constr::findCrossingEdges(dstart, dend, elist); + std::list elist; + DartType next_start = ttl_constr::ConstrainedTriangulation::findCrossingEdges(dstart, dend, elist); // If there are no crossing edges (elist is empty), we assume that the constraint // is an existing edge. @@ -583,7 +586,7 @@ namespace ttl { // (extension) // findCrossingEdges stops if it finds a node lying on the constraint. // A dart with this node as start node is returned // We call insertConstraint recursivly until the received dart is dend - if (!ttl::same_0_orbit(next_start, dend)) { + if (!same_0_orbit(next_start, dend)) { #ifdef DEBUG_TTL_CONSTR_PLOT cout << "RECURSION due to collinearity along constraint" << endl; @@ -594,7 +597,7 @@ namespace ttl { // (extension) // Swap edges such that the constraint edge is present in the transformed triangulation. if (elist.size() > 0) // by Thomas Sevaldrud - ttl_constr::transformToConstraint(dstart, next_start, elist); + ttl_constr::ConstrainedTriangulation::transformToConstraint(dstart, next_start, elist); #ifdef DEBUG_TTL_CONSTR_PLOT cout << "size of elist = " << elist.size() << endl; @@ -607,13 +610,13 @@ namespace ttl { // (extension) #endif // Optimize to constrained Delaunay triangulation if required. - typename list::iterator end_opt = elist.end(); + typename std::list::iterator end_opt = elist.end(); if (optimize_delaunay) { // Indicate that the constrained edge, which is the last element in the list, // should not be swapped --end_opt; - ttl::optimizeDelaunay(elist, end_opt); + optimizeDelaunay(elist, end_opt); } if(elist.size() == 0) // by Thomas Sevaldrud diff --git a/pcbnew/ratsnest_data.cpp b/pcbnew/ratsnest_data.cpp index e66451b86b..af5f6932fd 100644 --- a/pcbnew/ratsnest_data.cpp +++ b/pcbnew/ratsnest_data.cpp @@ -240,7 +240,7 @@ void RN_NET::compute() return; } - else if( boardNodes.size() == 1 ) // This case is even simpler + else if( boardNodes.size() <= 1 ) // This case is even simpler { m_rnEdges.reset( new std::vector( 0 ) ); From 15b8d3d20ac797800b3c617b0731cda833e66b56 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 28 Jan 2014 10:19:51 +0100 Subject: [PATCH 049/741] Added NETINFO_MAPPING, to ease saving nets with consecutive net codes (without modifying the net codes during the run time). Now, nets are saved with consecutive net codes (both modern & legacy plugins). Zones are saved together with their nets, without depending on the fact if there are any pads with such net. Therefore validation of zone net names was removed (pcbnew/class_board.cpp). Performed tests: - Changed a pad's net name from empty to existent - ok, name was changed. - Changed a pad's net name from empty to nonexistent - ok, error message is displayed, net name stays empty. - Changed a pad's net name from existent to empty - ok, net name became empty - Changed a pad's net name from existent to nonexistent - ok, error message is displayed, net name is not changed. - Drawn a zone that belongs to a net, then modified schematics so the net does not exist anymore. After reloading the net list, all pads/tracks are updated. Zones still belongs to the net that does not exist in the schematic (but still exists in .kicad_pcb file). After running DRC, the zone becomes not filled. - Undo & redo affects assignment of a polygon to a specific net (you may change net of a polygon, refill it and undo/redo the changes). - KiCad s-expr & legacy, Eagle, P-CAD boards seem to load without any problem (they also contain correct net names assigned to the appropriate pads). All types of board file formats were loaded, then saved in sexpr format and reopened with a KiCad built from the master branch (without my modifications). - A few boards were also saved using the legacy format and were opened with the master KiCad without any issues. - Change a net name for a pad, restore with undo/redo - ok - Remove everything, restore with undo - ok - Remove everything, reload netlist - ok Differences observed between files saved by the master branch KiCad and this one: - list of nets are not saved in any particular order, so net codes may differ - the default net class does not contain the unconnected net --- pcbnew/class_board.cpp | 25 ------ pcbnew/class_board_connected_item.cpp | 6 ++ pcbnew/class_netinfo.h | 123 ++++++++++++++++++++++++-- pcbnew/class_netinfolist.cpp | 73 ++++++++++++++- pcbnew/kicad_plugin.cpp | 44 ++++----- pcbnew/kicad_plugin.h | 7 +- pcbnew/legacy_plugin.cpp | 19 ++-- pcbnew/legacy_plugin.h | 4 + pcbnew/pcb_parser.cpp | 11 ++- 9 files changed, 240 insertions(+), 72 deletions(-) diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index 5c435f634a..b32e48ae22 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -2700,31 +2700,6 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets, } } } - - // 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 ); - } - } } /* Extracts the board outlines and build a closed polygon diff --git a/pcbnew/class_board_connected_item.cpp b/pcbnew/class_board_connected_item.cpp index 69bcfacb7e..26cca19772 100644 --- a/pcbnew/class_board_connected_item.cpp +++ b/pcbnew/class_board_connected_item.cpp @@ -63,9 +63,15 @@ void BOARD_CONNECTED_ITEM::SetNet( int aNetCode ) { m_netinfo = board->FindNet( aNetCode ); + // The requested net does not exist, mark it as unconnected if( m_netinfo == NULL ) m_netinfo = board->FindNet( NETINFO_LIST::UNCONNECTED ); } + else + { + // There is no board that contains list of nets, the item is orphaned + m_netinfo = &NETINFO_LIST::ORPHANED; + } } diff --git a/pcbnew/class_netinfo.h b/pcbnew/class_netinfo.h index 326a0fa3b4..50bb30457d 100644 --- a/pcbnew/class_netinfo.h +++ b/pcbnew/class_netinfo.h @@ -116,6 +116,121 @@ public: }; +class NETINFO_MAPPING +{ +public: + /** + * Function SetBoard + * Sets a BOARD object that is used to prepare the net code map. + */ + void SetBoard( const BOARD* aBoard ) + { + m_board = aBoard; + Update(); + } + + /** + * Function Update + * Prepares a mapping for net codes so they can be saved as consecutive numbers. + * To retrieve a mapped net code, use translateNet() function after calling this. + */ + void Update(); + + /** + * Function Translate + * Translates net number according to the map prepared by Update() function. It + * allows to have items stored with consecutive net codes. + * @param aNetCode is an old net code. + * @return Net code that follows the mapping. + */ + int Translate( int aNetCode ) const; + + ///> Wrapper class, so you can iterate through NETINFO_ITEM*s, not + ///> std::pair + class iterator + { + public: + iterator( std::map::const_iterator aIter, const NETINFO_MAPPING* aMapping ) : + m_iterator( aIter ), m_mapping( aMapping ) + { + } + + /// pre-increment operator + const iterator& operator++() + { + ++m_iterator; + + return *this; + } + + /// post-increment operator + iterator operator++( int ) + { + iterator ret = *this; + ++m_iterator; + + return ret; + } + + NETINFO_ITEM* operator*() const; + + NETINFO_ITEM* operator->() const; + + bool operator!=( const iterator& aOther ) const + { + return m_iterator != aOther.m_iterator; + } + + bool operator==( const iterator& aOther ) const + { + return m_iterator == aOther.m_iterator; + } + + private: + std::map::const_iterator m_iterator; + const NETINFO_MAPPING* m_mapping; + }; + + /** + * Function begin() + * Returns iterator to the first entry in the mapping. + * NOTE: The entry is a pointer to the original NETINFO_ITEM object, this it contains + * not mapped net code. + */ + iterator begin() const + { + return iterator( m_netMapping.begin(), this ); + } + + /** + * Function end() + * Returns iterator to the last entry in the mapping. + * NOTE: The entry is a pointer to the original NETINFO_ITEM object, this it contains + * not mapped net code. + */ + iterator end() const + { + return iterator( m_netMapping.end(), this ); + } + + /** + * Function GetSize + * @return Number of mapped nets (i.e. not empty nets for a given BOARD object). + */ + int GetSize() const + { + return m_netMapping.size(); + } + +private: + ///> Board for which mapping is prepared + const BOARD* m_board; + + ///> Map that allows saving net codes with consecutive numbers (for compatibility reasons) + std::map m_netMapping; +}; + + /** * Class NETINFO * is a container class for NETINFO_ITEM elements, which are the nets. That makes @@ -304,16 +419,12 @@ private: */ int getFreeNetCode() const; - BOARD* m_Parent; + BOARD* m_Parent; NETNAMES_MAP m_netNames; ///< map for a fast look up by net names NETCODES_MAP m_netCodes; ///< map for a fast look up by net codes - static int m_newNetCode; ///< number that has a *high* chance to be unused - ///< (to be sure, it is advised to use - ///< getFreeNetCode() function) - - std::vector m_PadsFullList; ///< contains all pads, sorted by pad's netname. + std::vector m_PadsFullList; ///< contains all pads, sorted by pad's netname. ///< can be used in ratsnest calculations. }; diff --git a/pcbnew/class_netinfolist.cpp b/pcbnew/class_netinfolist.cpp index e57bbfed8b..34b2eded9a 100644 --- a/pcbnew/class_netinfolist.cpp +++ b/pcbnew/class_netinfolist.cpp @@ -11,6 +11,9 @@ #include #include +#include +#include +#include #include @@ -98,7 +101,7 @@ void NETINFO_LIST::buildListOfNets() { pad = m_PadsFullList[ii]; - if( pad->GetNet() == 0 ) // pad not connected + if( pad->GetNet() == NETINFO_LIST::UNCONNECTED ) // pad not connected continue; // Add pad to the appropriate list of pads @@ -172,15 +175,79 @@ void NETINFO_LIST::buildPadsFullList() int NETINFO_LIST::getFreeNetCode() const { + static int m_newNetCode = 0; + do { if( m_newNetCode < 0 ) m_newNetCode = 0; - } while( m_netCodes.count( ++NETINFO_LIST::m_newNetCode ) != 0 ); + } while( m_netCodes.count( ++m_newNetCode ) != 0 ); return m_newNetCode; } +int NETINFO_MAPPING::Translate( int aNetCode ) const +{ + std::map::const_iterator value = m_netMapping.find( aNetCode ); + + if( value != m_netMapping.end() ) + return value->second; + + // There was no entry for the given net code + return aNetCode; +} + + +void NETINFO_MAPPING::Update() +{ + // Collect all the used nets + std::set nets; + + // Be sure that the unconnected gets 0 and is mapped as 0 + nets.insert( 0 ); + + // Zones + for( int i = 0; i < m_board->GetAreaCount(); ++i ) + nets.insert( m_board->GetArea( i )->GetNet() ); + + // Tracks + for( TRACK* track = m_board->m_Track; track; track = track->Next() ) + nets.insert( track->GetNet() ); + + // Modules/pads + for( MODULE* module = m_board->m_Modules; module; module = module->Next() ) + { + for( D_PAD* pad = module->Pads().GetFirst(); pad; pad = pad->Next() ) + { + nets.insert( pad->GetNet() ); + } + } + + // Segzones + for( SEGZONE* zone = m_board->m_Zone; zone; zone = zone->Next() ) + nets.insert( zone->GetNet() ); + + // Prepare the new mapping + m_netMapping.clear(); + + // Now the nets variable stores all the used net codes (not only for pads) + int newNetCode = 0; + for( std::set::const_iterator it = nets.begin(), itEnd = nets.end(); it != itEnd; ++it ) + m_netMapping[*it] = newNetCode++; +} + + +NETINFO_ITEM* NETINFO_MAPPING::iterator::operator*() const +{ + return m_mapping->m_board->FindNet( m_iterator->first ); +} + + +NETINFO_ITEM* NETINFO_MAPPING::iterator::operator->() const +{ + return m_mapping->m_board->FindNet( m_iterator->first ); +} + + const NETINFO_ITEM NETINFO_LIST::ORPHANED = NETINFO_ITEM( NULL, wxString::FromUTF8( "orphaned" ), -1 ); const int NETINFO_LIST::UNCONNECTED = 0; -int NETINFO_LIST::m_newNetCode = 0; diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index 3cda985754..fbdcf0fd3e 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -380,6 +380,9 @@ void PCB_IO::Save( const wxString& aFileName, BOARD* aBoard, const PROPERTIES* a m_board = aBoard; // after init() + // Prepare net mapping that assures that net codes saved in a file are consecutive integers + m_mapping->SetBoard( aBoard ); + FILE_OUTPUTFORMATTER formatter( aFileName ); m_out = &formatter; // no ownership @@ -499,7 +502,7 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const m_out->Print( aNestLevel+1, "(tracks %d)\n", aBoard->GetNumSegmTrack() ); m_out->Print( aNestLevel+1, "(zones %d)\n", aBoard->GetNumSegmZone() ); m_out->Print( aNestLevel+1, "(modules %d)\n", aBoard->m_Modules.GetCount() ); - m_out->Print( aNestLevel+1, "(nets %d)\n", aBoard->GetNetCount() ); + m_out->Print( aNestLevel+1, "(nets %d)\n", (int) m_mapping->GetSize() ); m_out->Print( aNestLevel, ")\n\n" ); aBoard->GetPageSettings().Format( m_out, aNestLevel, m_ctl ); @@ -654,20 +657,14 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const m_out->Print( aNestLevel, ")\n\n" ); - // Unconditionally save the unconnected net - m_out->Print( aNestLevel, "(net 0 \"\")\n" ); - - // and now the rest of nets - for( NETINFO_LIST::iterator net( aBoard->BeginNet() ), netEnd( aBoard->EndNet() ); + // Save net codes and names + for( NETINFO_MAPPING::iterator net = m_mapping->begin(), netEnd = m_mapping->end(); net != netEnd; ++net ) { - if( net->GetNodesCount() > 0 ) // save only not empty nets - { - m_out->Print( aNestLevel, "(net %d %s)\n", - net->GetNet(), - m_out->Quotew( net->GetNetname() ).c_str() ); - } - } + m_out->Print( aNestLevel, "(net %d %s)\n", + m_mapping->Translate( net->GetNet() ), + m_out->Quotew( net->GetNetname() ).c_str() ); + } m_out->Print( 0, "\n" ); @@ -1234,7 +1231,8 @@ void PCB_IO::format( D_PAD* aPad, int aNestLevel ) const // Unconnected pad is default net so don't save it. if( !(m_ctl & CTL_OMIT_NETS) && aPad->GetNet() != 0 ) - StrPrintf( &output, " (net %d %s)", aPad->GetNet(), m_out->Quotew( aPad->GetNetname() ).c_str() ); + StrPrintf( &output, " (net %d %s)", m_mapping->Translate( aPad->GetNet() ), + m_out->Quotew( aPad->GetNetname() ).c_str() ); if( aPad->GetPadToDieLength() != 0 ) StrPrintf( &output, " (die_length %s)", FMT_IU( aPad->GetPadToDieLength() ).c_str() ); @@ -1391,7 +1389,7 @@ void PCB_IO::format( TRACK* aTrack, int aNestLevel ) const m_out->Print( 0, " (layer %s)", m_out->Quotew( aTrack->GetLayerName() ).c_str() ); } - m_out->Print( 0, " (net %d)", aTrack->GetNet() ); + m_out->Print( 0, " (net %d)", m_mapping->Translate( aTrack->GetNet() ) ); if( aTrack->GetTimeStamp() != 0 ) m_out->Print( 0, " (tstamp %lX)", aTrack->GetTimeStamp() ); @@ -1410,7 +1408,7 @@ void PCB_IO::format( ZONE_CONTAINER* aZone, int aNestLevel ) const // so be sure a dummy value is stored, just for ZONE_CONTAINER compatibility // (perhaps netcode and netname should be not stored) m_out->Print( aNestLevel, "(zone (net %d) (net_name %s)", - aZone->GetIsKeepout() ? 0 : aZone->GetNet(), + aZone->GetIsKeepout() ? 0 : m_mapping->Translate( aZone->GetNet() ), m_out->Quotew( aZone->GetIsKeepout() ? wxT("") : aZone->GetNetname() ).c_str() ); formatLayer( aZone ); @@ -1627,20 +1625,11 @@ void PCB_IO::format( ZONE_CONTAINER* aZone, int aNestLevel ) const } -PCB_IO::PCB_IO() : - m_cache( 0 ), - m_ctl( CTL_FOR_BOARD ), // expecting to OUTPUTFORMAT into BOARD files. - m_parser( new PCB_PARSER() ) -{ - init( 0 ); - m_out = &m_sf; -} - - PCB_IO::PCB_IO( int aControlFlags ) : m_cache( 0 ), m_ctl( aControlFlags ), - m_parser( new PCB_PARSER() ) + m_parser( new PCB_PARSER() ), + m_mapping( new NETINFO_MAPPING() ) { init( 0 ); m_out = &m_sf; @@ -1651,6 +1640,7 @@ PCB_IO::~PCB_IO() { delete m_cache; delete m_parser; + delete m_mapping; } diff --git a/pcbnew/kicad_plugin.h b/pcbnew/kicad_plugin.h index ce7c40ef38..95986e7531 100644 --- a/pcbnew/kicad_plugin.h +++ b/pcbnew/kicad_plugin.h @@ -32,6 +32,7 @@ class BOARD; class BOARD_ITEM; class FP_CACHE; class PCB_PARSER; +class NETINFO_MAPPING; /// Current s-expression file format version. 2 was the last legacy format version. @@ -122,9 +123,7 @@ public: //------------------------------------------------------------- - PCB_IO(); - - PCB_IO( int aControlFlags ); + PCB_IO( int aControlFlags = CTL_FOR_BOARD ); ~PCB_IO(); @@ -171,6 +170,8 @@ protected: OUTPUTFORMATTER* m_out; ///< output any Format()s to this, no ownership int m_ctl; PCB_PARSER* m_parser; + NETINFO_MAPPING* m_mapping; ///< mapping for net codes, so only not empty net codes + ///< are stored with consecutive integers as net codes /// we only cache one footprint library, this determines which one. void cacheLib( const wxString& aLibraryPath, const wxString& aFootprintName = wxEmptyString ); diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index 8b09403302..6e08682234 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -2899,6 +2899,8 @@ do { \ void LEGACY_PLUGIN::SaveBOARD( const BOARD* aBoard ) const { + m_mapping->SetBoard( aBoard ); + saveGENERAL( aBoard ); saveSHEET( aBoard ); @@ -2947,7 +2949,7 @@ void LEGACY_PLUGIN::saveGENERAL( const BOARD* aBoard ) const fprintf( m_fp, "Nzone %d\n", aBoard->GetNumSegmZone() ); fprintf( m_fp, "BoardThickness %s\n", fmtBIU( aBoard->GetDesignSettings().GetBoardThickness() ).c_str() ); fprintf( m_fp, "Nmodule %d\n", aBoard->m_Modules.GetCount() ); - fprintf( m_fp, "Nnets %d\n", aBoard->GetNetCount() ); + fprintf( m_fp, "Nnets %d\n", m_mapping->GetSize() ); fprintf( m_fp, "$EndGENERAL\n\n" ); } @@ -3088,9 +3090,11 @@ void LEGACY_PLUGIN::saveSETUP( const BOARD* aBoard ) const void LEGACY_PLUGIN::saveBOARD_ITEMS( const BOARD* aBoard ) const { // save the nets - int netcount = aBoard->GetNetCount(); - for( int i = 0; i < netcount; ++i ) - saveNETINFO_ITEM( aBoard->FindNet( i ) ); + for( NETINFO_MAPPING::iterator net = m_mapping->begin(), netEnd = m_mapping->end(); + net != netEnd; ++net ) + { + saveNETINFO_ITEM( *net ); + } // Saved nets do not include netclass names, so save netclasses after nets. saveNETCLASSES( &aBoard->m_NetClasses ); @@ -3148,7 +3152,8 @@ void LEGACY_PLUGIN::saveBOARD_ITEMS( const BOARD* aBoard ) const void LEGACY_PLUGIN::saveNETINFO_ITEM( const NETINFO_ITEM* aNet ) const { fprintf( m_fp, "$EQUIPOT\n" ); - fprintf( m_fp, "Na %d %s\n", aNet->GetNet(), EscapedUTF8( aNet->GetNetname() ).c_str() ); + fprintf( m_fp, "Na %d %s\n", m_mapping->Translate( aNet->GetNet() ), + EscapedUTF8( aNet->GetNetname() ).c_str() ); fprintf( m_fp, "St %s\n", "~" ); fprintf( m_fp, "$EndEQUIPOT\n" ); @@ -4417,7 +4422,8 @@ LEGACY_PLUGIN::LEGACY_PLUGIN() : m_props( 0 ), m_reader( 0 ), m_fp( 0 ), - m_cache( 0 ) + m_cache( 0 ), + m_mapping( new NETINFO_MAPPING() ) { init( NULL ); } @@ -4426,4 +4432,5 @@ LEGACY_PLUGIN::LEGACY_PLUGIN() : LEGACY_PLUGIN::~LEGACY_PLUGIN() { delete m_cache; + delete m_mapping; } diff --git a/pcbnew/legacy_plugin.h b/pcbnew/legacy_plugin.h index c5eba40083..dec3bfcbac 100644 --- a/pcbnew/legacy_plugin.h +++ b/pcbnew/legacy_plugin.h @@ -44,6 +44,7 @@ class NETCLASSES; class ZONE_CONTAINER; class DIMENSION; class NETINFO_ITEM; +class NETINFO_MAPPING; class TEXTE_MODULE; class EDGE_MODULE; class TRACK; @@ -124,6 +125,9 @@ protected: int m_loading_format_version; ///< which BOARD_FORMAT_VERSION am I Load()ing? LP_CACHE* m_cache; + NETINFO_MAPPING* m_mapping; ///< mapping for net codes, so only not empty net codes + ///< are stored with consecutive integers as net codes + /// initialize PLUGIN like a constructor would, and futz with fresh BOARD if needed. void init( const PROPERTIES* aProperties ); diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index db9ed25acf..d7456b06ea 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -29,6 +29,7 @@ #include #include +#include #include #include #include @@ -2417,13 +2418,19 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER() throw( IO_ERROR, PARSE_ERROR ) // Init the net code only, not the netname, to be sure // the zone net name is the name read in file. // (When mismatch, the user will be prompted in DRC, to fix the actual name) - zone->BOARD_CONNECTED_ITEM::SetNet( parseInt( "net number" ) ); + zone->SetNet( parseInt( "net number" ) ); NeedRIGHT(); break; case T_net_name: NeedSYMBOLorNUMBER(); - assert( m_board->FindNet( zone->GetNet() )->GetNetname() == FromUTF8() ); + if( m_board->FindNet( zone->GetNet() )->GetNetname() != FromUTF8() ) + { + DisplayError( NULL, wxString::Format( _( "There is a zone that belongs to a not " + "existing net (%s), you should verify it." ), + FromUTF8() ) ); + zone->SetNet( NETINFO_LIST::UNCONNECTED ); + } NeedRIGHT(); break; From 2b8f9fc62158369a2bf55ed4b417a864206d4704 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 28 Jan 2014 16:23:08 +0100 Subject: [PATCH 050/741] Added BOARD_[CONNECTED_]ITEM::IsConnected() for checking if a BOARD_ITEM is BOARD_CONNECTED_ITEM as well. --- include/class_board_item.h | 10 ++++++++++ pcbnew/class_board_connected_item.h | 6 ++++++ 2 files changed, 16 insertions(+) diff --git a/include/class_board_item.h b/include/class_board_item.h index b6e5e905a6..ceb428af5e 100644 --- a/include/class_board_item.h +++ b/include/class_board_item.h @@ -93,6 +93,16 @@ public: virtual void SetPosition( const wxPoint& aPos ) = 0; + /** + * Function IsConnected() + * Returns information if the object is derived from BOARD_CONNECTED_ITEM. + * @return True if the object is of BOARD_CONNECTED_ITEM type, false otherwise. + */ + virtual bool IsConnected() const + { + return false; + } + /** * A value of wxPoint(0,0) which can be passed to the Draw() functions. */ diff --git a/pcbnew/class_board_connected_item.h b/pcbnew/class_board_connected_item.h index b7a059c9f4..eab6d310fd 100644 --- a/pcbnew/class_board_connected_item.h +++ b/pcbnew/class_board_connected_item.h @@ -70,6 +70,12 @@ public: BOARD_CONNECTED_ITEM( const BOARD_CONNECTED_ITEM& aItem ); + ///> @copydoc BOARD_ITEM::IsConnected() + bool IsConnected() const + { + return true; + } + /** * Function GetNet * @return int - the net code. From 83f7c7e35e8bf16f9317fc957c03593039b76ae5 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 28 Jan 2014 16:30:58 +0100 Subject: [PATCH 051/741] Added RN_DATA::Add()/Remove() methods. RN_DATA::Update()/AddSimple() take BOARD_ITEM* as the parameter (instead of being split to versions with BOARD_CONNECTED_ITEM* and MODULE*), to make the code look clearer. --- pcbnew/ratsnest_data.cpp | 177 +++++++++++++++++++++++------------ pcbnew/ratsnest_data.h | 35 ++++--- pcbnew/router/pns_router.cpp | 2 +- pcbnew/tools/edit_tool.cpp | 17 +--- 4 files changed, 140 insertions(+), 91 deletions(-) diff --git a/pcbnew/ratsnest_data.cpp b/pcbnew/ratsnest_data.cpp index f33d5e96e6..ea9d8a7c57 100644 --- a/pcbnew/ratsnest_data.cpp +++ b/pcbnew/ratsnest_data.cpp @@ -673,6 +673,39 @@ std::list RN_NET::GetNodes( const BOARD_CONNECTED_ITEM* aItem ) con } +void RN_DATA::AddSimple( const BOARD_ITEM* aItem ) +{ + int net; + + if( aItem->IsConnected() ) + { + const BOARD_CONNECTED_ITEM* item = static_cast( aItem ); + net = item->GetNet(); + + if( net < 1 ) // do not process unconnected items + return; + + // Get list of nodes responding to the item + std::list nodes = m_nets[net].GetNodes( item ); + std::list::iterator it, itEnd; + + for( it = nodes.begin(), itEnd = nodes.end(); it != itEnd; ++it ) + m_nets[net].AddSimpleNode( *it ); + } + else if( aItem->Type() == PCB_MODULE_T ) + { + const MODULE* module = static_cast( aItem ); + + for( const D_PAD* pad = module->Pads().GetFirst(); pad; pad = pad->Next() ) + AddSimple( pad ); + + return; + } + else + return; +} + + void RN_NET::ClearSimple() { BOOST_FOREACH( const RN_NODE_PTR& node, m_simpleNodes ) @@ -682,28 +715,6 @@ void RN_NET::ClearSimple() } -void RN_DATA::AddSimple( const BOARD_CONNECTED_ITEM* aItem ) -{ - int net = aItem->GetNet(); - if( net < 1 ) // do not process unconnected items - return; - - // Get list of nodes responding to the item - std::list nodes = m_nets[net].GetNodes( aItem ); - std::list::iterator it, itEnd; - - for( it = nodes.begin(), itEnd = nodes.end(); it != itEnd; ++it ) - m_nets[net].AddSimpleNode( *it ); -} - - -void RN_DATA::AddSimple( const MODULE* aModule ) -{ - for( const D_PAD* pad = aModule->Pads().GetFirst(); pad; pad = pad->Next() ) - AddSimple( pad ); -} - - void RN_NET::processZones() { BOOST_FOREACH( std::deque& edges, m_zoneConnections | boost::adaptors::map_values ) @@ -762,45 +773,51 @@ void RN_DATA::updateNet( int aNetCode ) } -void RN_DATA::Update( const BOARD_CONNECTED_ITEM* aItem ) +void RN_DATA::Add( const BOARD_ITEM* aItem ) { - int net = aItem->GetNet(); - if( net < 1 ) // do not process unconnected items + int net; + + if( aItem->IsConnected() ) + { + net = static_cast( aItem )->GetNet(); + if( net < 1 ) // do not process unconnected items + return; + } + else if( aItem->Type() == PCB_MODULE_T ) + { + const MODULE* module = static_cast( aItem ); + for( const D_PAD* pad = module->Pads().GetFirst(); pad; pad = pad->Next() ) + { + net = pad->GetNet(); + + if( net < 1 ) // do not process unconnected items + continue; + + m_nets[net].AddItem( pad ); + } + + return; + } + else return; switch( aItem->Type() ) { case PCB_PAD_T: - { - const D_PAD* pad = static_cast( aItem ); - m_nets[net].RemoveItem( pad ); - m_nets[net].AddItem( pad ); - } - break; + m_nets[net].AddItem( static_cast( aItem ) ); + break; case PCB_TRACE_T: - { - const TRACK* track = static_cast( aItem ); - m_nets[net].RemoveItem( track ); - m_nets[net].AddItem( track ); - } - break; + m_nets[net].AddItem( static_cast( aItem ) ); + break; case PCB_VIA_T: - { - const SEGVIA* via = static_cast( aItem ); - m_nets[net].RemoveItem( via ); - m_nets[net].AddItem( via ); - } - break; + m_nets[net].AddItem( static_cast( aItem ) ); + break; case PCB_ZONE_AREA_T: - { - const ZONE_CONTAINER* zone = static_cast( aItem ); - m_nets[net].RemoveItem( zone); - m_nets[net].AddItem( zone ); - } - break; + m_nets[net].AddItem( static_cast( aItem ) ); + break; default: break; @@ -808,18 +825,62 @@ void RN_DATA::Update( const BOARD_CONNECTED_ITEM* aItem ) } -void RN_DATA::Update( const MODULE* aModule ) +void RN_DATA::Remove( const BOARD_ITEM* aItem ) { - for( const D_PAD* pad = aModule->Pads().GetFirst(); pad; pad = pad->Next() ) - { - int net = pad->GetNet(); + int net; - if( net > 0 ) // do not process unconnected items - { - m_nets[net].RemoveItem( pad ); - m_nets[net].AddItem( pad ); - } + if( aItem->IsConnected() ) + { + net = static_cast( aItem )->GetNet(); + if( net < 1 ) // do not process unconnected items + return; } + else if( aItem->Type() == PCB_MODULE_T ) + { + const MODULE* module = static_cast( aItem ); + for( const D_PAD* pad = module->Pads().GetFirst(); pad; pad = pad->Next() ) + { + net = pad->GetNet(); + + if( net < 1 ) // do not process unconnected items + continue; + + m_nets[net].RemoveItem( pad ); + } + + return; + } + else + return; + + switch( aItem->Type() ) + { + case PCB_PAD_T: + m_nets[net].RemoveItem( static_cast( aItem ) ); + break; + + case PCB_TRACE_T: + m_nets[net].RemoveItem( static_cast( aItem ) ); + break; + + case PCB_VIA_T: + m_nets[net].RemoveItem( static_cast( aItem ) ); + break; + + case PCB_ZONE_AREA_T: + m_nets[net].RemoveItem( static_cast( aItem ) ); + break; + + default: + break; + } +} + + +void RN_DATA::Update( const BOARD_ITEM* aItem ) +{ + Remove( aItem ); + Add( aItem ); } diff --git a/pcbnew/ratsnest_data.h b/pcbnew/ratsnest_data.h index f8ffbf2406..860fffa5fa 100644 --- a/pcbnew/ratsnest_data.h +++ b/pcbnew/ratsnest_data.h @@ -524,34 +524,33 @@ public: RN_DATA( const BOARD* aBoard ) : m_board( aBoard ) {} /** - * Function UpdateItem() - * Updates ratsnest data for an item. - * @param aItem is an item to be updated. + * Function Add() + * Adds an item to the ratsnest data. + * @param aItem is an item to be added. */ - void Update( const BOARD_CONNECTED_ITEM* aItem ); + void Add( const BOARD_ITEM* aItem ); /** - * Function UpdateItem() - * Updates ratsnest data for a module. - * @param aItem is a module to be updated. + * Function Remove() + * Removes an item from the ratsnest data. + * @param aItem is an item to be updated. */ - void Update( const MODULE* aModule ); + void Remove( const BOARD_ITEM* aItem ); + + /** + * Function Update() + * Updates the ratsnest data for an item. + * @param aItem is an item to be updated. + */ + void Update( const BOARD_ITEM* aItem ); /** * Function AddSimple() * Sets an item to be drawn in simple mode (ie. one line per node, instead of full ratsnest). - * It is used for drawing temporary ratsnest, eg. while moving an item. + * It is used for drawing quick, temporary ratsnest, eg. while moving an item. * @param aItem is an item to be drawn in simple node. */ - void AddSimple( const BOARD_CONNECTED_ITEM* aItem ); - - /** - * Function AddSimple() - * Sets a module to be drawn in simple mode (ie. one line per node, instead of full ratsnest). - * It is used for drawing temporary ratsnest, eg. while moving a module. - * @param aModule is a module to be drawn in simple node. - */ - void AddSimple( const MODULE* aModule ); + void AddSimple( const BOARD_ITEM* aItem ); /** * Function ClearSimple() diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index e70fe550bf..9373ff985f 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -631,7 +631,7 @@ void PNS_ROUTER::commitRouting( PNS_NODE* aNode ) newBI->ClearFlags(); m_view->Add( newBI ); m_board->Add( newBI ); - m_board->GetRatsnest()->Update( static_cast( newBI ) ); + m_board->GetRatsnest()->Update( newBI ); newBI->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); } } diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 277fefa8c1..706134d1bc 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -376,20 +376,9 @@ void EDIT_TOOL::updateRatsnest( bool aRedraw ) { BOARD_ITEM* item = static_cast( selection.items.GetPickedItem( i ) ); - if( item->Type() == PCB_PAD_T || item->Type() == PCB_TRACE_T || - item->Type() == PCB_VIA_T || item->Type() == PCB_ZONE_AREA_T ) - { - ratsnest->Update( static_cast( item ) ); + ratsnest->Update( static_cast( item ) ); - if( aRedraw ) - ratsnest->AddSimple( static_cast( item ) ); - } - else if( item->Type() == PCB_MODULE_T ) - { - ratsnest->Update( static_cast( item ) ); - - if( aRedraw ) - ratsnest->AddSimple( static_cast( item ) ); - } + if( aRedraw ) + ratsnest->AddSimple( item ); } } From bec24b6c7fd090a0ef50a40629699d732a451f66 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 29 Jan 2014 10:17:14 +0100 Subject: [PATCH 052/741] Ratsnest is updated after rotation, flip, undo/redo operations. Fixed crashes of ratsnest when a pointer for an item has changed after undo/redo operations. Vias are properly removed from ratsnest (pcbnew/class_board.cpp). --- pcbnew/board_undo_redo.cpp | 24 ++++++++++++++++++------ pcbnew/class_board.cpp | 9 ++++++++- pcbnew/tools/edit_tool.cpp | 19 ++++++++++++------- 3 files changed, 38 insertions(+), 14 deletions(-) diff --git a/pcbnew/board_undo_redo.cpp b/pcbnew/board_undo_redo.cpp index a0bb32575c..484b76fa05 100644 --- a/pcbnew/board_undo_redo.cpp +++ b/pcbnew/board_undo_redo.cpp @@ -41,6 +41,8 @@ #include #include +#include + #include #include @@ -453,13 +455,14 @@ void PCB_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRed bool not_found = false; bool reBuild_ratsnest = false; KIGFX::VIEW* view = GetGalCanvas()->GetView(); + RN_DATA* ratsnest = GetBoard()->GetRatsnest(); // Undo in the reverse order of list creation: (this can allow stacked changes // like the same item can be changes and deleted in the same complex command bool build_item_list = true; // if true the list of existing items must be rebuilt - for( int ii = aList->GetCount()-1; ii >= 0 ; ii-- ) + for( int ii = aList->GetCount() - 1; ii >= 0 ; ii-- ) { item = (BOARD_ITEM*) aList->GetPickedItem( ii ); wxASSERT( item ); @@ -519,8 +522,8 @@ void PCB_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRed if( item->Type() == PCB_MODULE_T ) { MODULE* oldModule = static_cast( item ); - oldModule->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Remove ), - view ) ); + oldModule->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Remove ), view ) ); + oldModule->RunOnChildren( std::bind1st( std::mem_fun( &RN_DATA::Remove ), ratsnest ) ); } item->SwapData( image ); @@ -530,8 +533,8 @@ void PCB_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRed if( item->Type() == PCB_MODULE_T ) { MODULE* newModule = static_cast( item ); - newModule->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Add ), - view ) ); + newModule->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Add ), view ) ); + newModule->RunOnChildren( std::bind1st( std::mem_fun( &RN_DATA::Add ), ratsnest ) ); } item->ViewUpdate( KIGFX::VIEW_ITEM::LAYERS ); @@ -577,11 +580,13 @@ void PCB_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRed case UR_ROTATED: item->Rotate( aList->m_TransformPoint, aRedoCommand ? m_rotationAngle : -m_rotationAngle ); + item->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); break; case UR_ROTATED_CLOCKWISE: item->Rotate( aList->m_TransformPoint, aRedoCommand ? -m_rotationAngle : m_rotationAngle ); + item->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); break; case UR_FLIPPED: @@ -598,6 +603,8 @@ void PCB_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRed } break; } + + ratsnest->Update( item ); } if( not_found ) @@ -605,7 +612,12 @@ void PCB_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRed // Rebuild pointers and ratsnest that can be changed. if( reBuild_ratsnest && aRebuildRatsnet ) - Compile_Ratsnest( NULL, true ); + { + if( IsGalCanvasActive() ) + ratsnest->Recalculate(); + else + Compile_Ratsnest( NULL, true ); + } } diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index 446f1f5bf3..5c32b53881 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -895,7 +895,6 @@ BOARD_ITEM* BOARD::Remove( BOARD_ITEM* aBoardItem ) break; case PCB_TRACE_T: - case PCB_VIA_T: { TRACK* track = static_cast( aBoardItem ); m_Track.Remove( track ); @@ -903,6 +902,14 @@ BOARD_ITEM* BOARD::Remove( BOARD_ITEM* aBoardItem ) } break; + case PCB_VIA_T: + { + SEGVIA* via = static_cast( aBoardItem ); + m_Track.Remove( via ); + m_ratsnest->GetNets()[via->GetNet()].RemoveItem( via ); + } + break; + case PCB_ZONE_T: m_Zone.Remove( (SEGZONE*) aBoardItem ); break; diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 706134d1bc..451164bf23 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -119,7 +119,7 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) { Remove( aEvent ); - break; + break; // exit the loop, as there is no further processing for removed items } } @@ -207,6 +207,7 @@ int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) setTransitions(); updateRatsnest( true ); + getModel( PCB_T )->GetRatsnest()->Recalculate(); return 0; } @@ -233,12 +234,14 @@ int EDIT_TOOL::Rotate( TOOL_EVENT& aEvent ) item->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); } - if( m_dragging ) - selection.group->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - setTransitions(); updateRatsnest( true ); + if( m_dragging ) + selection.group->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + else + getModel( PCB_T )->GetRatsnest()->Recalculate(); + return 0; } @@ -264,12 +267,14 @@ int EDIT_TOOL::Flip( TOOL_EVENT& aEvent ) item->ViewUpdate( KIGFX::VIEW_ITEM::LAYERS ); } - if( m_dragging ) - selection.group->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - setTransitions(); updateRatsnest( true ); + if( m_dragging ) + selection.group->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + else + getModel( PCB_T )->GetRatsnest()->Recalculate(); + return 0; } From b52e5fabdaff267d395cab1cd078e04d7a4f3b9a Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 29 Jan 2014 14:51:50 +0100 Subject: [PATCH 053/741] Ratsnest lines are drawn using a more transparent color. BOARD::chainMarkedSegments() uses a safer method for gettings pads. --- pcbnew/class_board.cpp | 2 +- pcbnew/ratsnest_viewitem.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index 5c32b53881..90d8ad7b20 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -206,7 +206,7 @@ void BOARD::chainMarkedSegments( wxPoint aPosition, LAYER_MSK aLayerMask, TRACK_ */ for( ; ; ) { - if( GetPadFast( aPosition, aLayerMask ) != NULL ) + if( GetPad( aPosition, aLayerMask ) != NULL ) return; /* Test for a via: a via changes the layer mask and can connect a lot diff --git a/pcbnew/ratsnest_viewitem.cpp b/pcbnew/ratsnest_viewitem.cpp index 282c0998a0..634a0d57c9 100644 --- a/pcbnew/ratsnest_viewitem.cpp +++ b/pcbnew/ratsnest_viewitem.cpp @@ -57,7 +57,7 @@ void RATSNEST_VIEWITEM::ViewDraw( int aLayer, GAL* aGal ) const aGal->SetIsStroke( true ); aGal->SetIsFill( false ); aGal->SetLineWidth( 1.0 ); - aGal->SetStrokeColor( COLOR4D( 1.0, 1.0, 1.0, 0.4 ) ); + aGal->SetStrokeColor( COLOR4D( 0.8, 0.8, 0.8, 0.2 ) ); // Draw the temporary ratsnest BOOST_FOREACH( const RN_NET& net, m_data->GetNets() ) From af350eb1e61a4250bfe828cfa73545a4fd8fefaf Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 29 Jan 2014 15:24:19 +0100 Subject: [PATCH 054/741] RN_DATA::GetNets() -> RN_DATA::GetNet() with an assert to check if someone calls it for the unconnected net. Only items that belong to a net are removed from ratsnest. --- pcbnew/class_board.cpp | 16 ++++++++++++---- pcbnew/ratsnest_data.h | 23 ++++++++++++++++++----- pcbnew/ratsnest_viewitem.cpp | 6 ++++-- 3 files changed, 34 insertions(+), 11 deletions(-) diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index 90d8ad7b20..896e44b8f6 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -880,7 +880,8 @@ BOARD_ITEM* BOARD::Remove( BOARD_ITEM* aBoardItem ) } } - m_ratsnest->GetNets()[zone->GetNet()].RemoveItem( zone ); + if( zone->GetNet() > 0 ) + m_ratsnest->GetNet( zone->GetNet() ).RemoveItem( zone ); } break; @@ -890,7 +891,10 @@ BOARD_ITEM* BOARD::Remove( BOARD_ITEM* aBoardItem ) m_Modules.Remove( (MODULE*) aBoardItem ); for( D_PAD* pad = module->Pads().GetFirst(); pad; pad = pad->Next() ) - m_ratsnest->GetNets()[pad->GetNet()].RemoveItem( pad ); + { + if( pad->GetNet() > 0 ) + m_ratsnest->GetNet( pad->GetNet() ).RemoveItem( pad ); + } } break; @@ -898,7 +902,9 @@ BOARD_ITEM* BOARD::Remove( BOARD_ITEM* aBoardItem ) { TRACK* track = static_cast( aBoardItem ); m_Track.Remove( track ); - m_ratsnest->GetNets()[track->GetNet()].RemoveItem( track ); + + if( track->GetNet() > 0 ) + m_ratsnest->GetNet( track->GetNet() ).RemoveItem( track ); } break; @@ -906,7 +912,9 @@ BOARD_ITEM* BOARD::Remove( BOARD_ITEM* aBoardItem ) { SEGVIA* via = static_cast( aBoardItem ); m_Track.Remove( via ); - m_ratsnest->GetNets()[via->GetNet()].RemoveItem( via ); + + if( via->GetNet() > 0 ) + m_ratsnest->GetNet( via->GetNet() ).RemoveItem( via ); } break; diff --git a/pcbnew/ratsnest_data.h b/pcbnew/ratsnest_data.h index 860fffa5fa..4340c74e78 100644 --- a/pcbnew/ratsnest_data.h +++ b/pcbnew/ratsnest_data.h @@ -573,13 +573,26 @@ public: void Recalculate( int aNet = -1 ); /** - * Function GetNets() - * Returns ratsnest grouped by net numbers. - * @return Vector of ratsnest grouped by net numbers. + * Function GetNetCount() + * Returns the number of nets handled by the ratsnest. + * @return Number of the nets. */ - std::vector& GetNets() + int GetNetCount() const { - return m_nets; + return m_nets.size(); + } + + /** + * Function GetNet() + * Returns ratsnest grouped by net numbers. + * @param aNetCode is the net code. + * @return Ratsnest data for a specified net. + */ + RN_NET& GetNet( int aNetCode ) + { + assert( aNetCode > 0 ); // ratsnest does not handle the unconnected net + + return m_nets[aNetCode]; } protected: diff --git a/pcbnew/ratsnest_viewitem.cpp b/pcbnew/ratsnest_viewitem.cpp index 634a0d57c9..0e23b00306 100644 --- a/pcbnew/ratsnest_viewitem.cpp +++ b/pcbnew/ratsnest_viewitem.cpp @@ -59,9 +59,11 @@ void RATSNEST_VIEWITEM::ViewDraw( int aLayer, GAL* aGal ) const aGal->SetLineWidth( 1.0 ); aGal->SetStrokeColor( COLOR4D( 0.8, 0.8, 0.8, 0.2 ) ); - // Draw the temporary ratsnest - BOOST_FOREACH( const RN_NET& net, m_data->GetNets() ) + // Draw the temporary ratsnest (skip the unconnected net [net code == 0]) + for( int i = 1; i < m_data->GetNetCount(); ++i ) { + const RN_NET& net = m_data->GetNet( i ); + if( !net.IsVisible() ) continue; From 57bfaca13133438240fa114651184ab746f59d82 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 29 Jan 2014 15:35:25 +0100 Subject: [PATCH 055/741] PNS_ITEM::m_parent: BOARD_ITEM->BOARD_CONNECTED_ITEM --- pcbnew/router/pns_item.h | 8 ++++---- pcbnew/router/pns_router.cpp | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pcbnew/router/pns_item.h b/pcbnew/router/pns_item.h index e9c856e086..c375a7ada5 100644 --- a/pcbnew/router/pns_item.h +++ b/pcbnew/router/pns_item.h @@ -28,7 +28,7 @@ #include "pns_layerset.h" -class BOARD_ITEM; +class BOARD_CONNECTED_ITEM; class PNS_NODE; /** @@ -94,8 +94,8 @@ public: const std::string GetKindStr() const; ///> Gets/Sets the corresponding parent object in the host application's model (pcbnew) - void SetParent( BOARD_ITEM* aParent ) { m_parent = aParent; } - BOARD_ITEM* GetParent() const { return m_parent; } + void SetParent( BOARD_CONNECTED_ITEM* aParent ) { m_parent = aParent; } + BOARD_CONNECTED_ITEM* GetParent() const { return m_parent; } ///> Net accessors int GetNet() const { return m_net; } @@ -145,7 +145,7 @@ private: protected: PnsKind m_kind; - BOARD_ITEM* m_parent; + BOARD_CONNECTED_ITEM* m_parent; PNS_NODE* m_world; PNS_NODE* m_owner; PNS_LAYERSET m_layers; diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index 9373ff985f..991dd71e84 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -580,7 +580,7 @@ void PNS_ROUTER::commitRouting( PNS_NODE* aNode ) for( unsigned int i = 0; i < removed.size(); i++ ) { - BOARD_ITEM* parent = removed[i]->GetParent(); + BOARD_CONNECTED_ITEM* parent = removed[i]->GetParent(); if( parent ) { @@ -591,7 +591,7 @@ void PNS_ROUTER::commitRouting( PNS_NODE* aNode ) BOOST_FOREACH( PNS_ITEM* item, added ) { - BOARD_ITEM* newBI = NULL; + BOARD_CONNECTED_ITEM* newBI = NULL; switch( item->GetKind() ) { From a73e3865055ebb7b8339815628ce8c993b1a7763 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 30 Jan 2014 11:18:58 +0100 Subject: [PATCH 056/741] Added a new tool event: TA_UNDO_REDO, sent after undo/redo operation is issued. --- common/tool/tool_event.cpp | 1 + include/tool/tool_event.h | 5 ++++- include/wxPcbStruct.h | 4 ++-- pcbnew/board_undo_redo.cpp | 22 ++++++++++------------ pcbnew/tools/selection_tool.cpp | 6 ++++++ 5 files changed, 23 insertions(+), 15 deletions(-) diff --git a/common/tool/tool_event.cpp b/common/tool/tool_event.cpp index 481b8c1b95..07460f3571 100644 --- a/common/tool/tool_event.cpp +++ b/common/tool/tool_event.cpp @@ -91,6 +91,7 @@ const std::string TOOL_EVENT::Format() const { TA_CANCEL_TOOL, "cancel-tool" }, { TA_CONTEXT_MENU_UPDATE, "context-menu-update" }, { TA_CONTEXT_MENU_CHOICE, "context-menu-choice" }, + { TA_UNDO_REDO, "undo-redo" }, { TA_ACTION, "action" }, { 0, "" } }; diff --git a/include/tool/tool_event.h b/include/tool/tool_event.h index a2815035d2..9acc1f8f87 100644 --- a/include/tool/tool_event.h +++ b/include/tool/tool_event.h @@ -89,8 +89,11 @@ enum TOOL_ACTIONS // closed it without selecting anything. TA_CONTEXT_MENU_CHOICE = 0x10000, + // This event is sent *after* undo/redo command is finished. + TA_UNDO_REDO = 0x20000, + // Tool action (allows to control tools) - TA_ACTION = 0x20000, + TA_ACTION = 0x40000, TA_ANY = 0xffffffff }; diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index 0ce0ef4ac4..1b5bc4b299 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -704,7 +704,7 @@ public: * - Get an old version of the board from Redo list * @return none */ - void GetBoardFromRedoList( wxCommandEvent& event ); + void GetBoardFromRedoList( wxCommandEvent& aEvent ); /** * Function GetBoardFromUndoList @@ -713,7 +713,7 @@ public: * - Get an old version of the board from Undo list * @return none */ - void GetBoardFromUndoList( wxCommandEvent& event ); + void GetBoardFromUndoList( wxCommandEvent& aEvent ); /* Block operations: */ diff --git a/pcbnew/board_undo_redo.cpp b/pcbnew/board_undo_redo.cpp index 484b76fa05..3112bc5e27 100644 --- a/pcbnew/board_undo_redo.cpp +++ b/pcbnew/board_undo_redo.cpp @@ -621,16 +621,11 @@ void PCB_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRed } -void PCB_EDIT_FRAME::GetBoardFromUndoList( wxCommandEvent& event ) +void PCB_EDIT_FRAME::GetBoardFromUndoList( wxCommandEvent& aEvent ) { if( GetScreen()->GetUndoCommandCount() <= 0 ) return; - // Clear the selection, as it may be altered with undone items - SELECTION_TOOL* selectionTool = static_cast( m_toolManager->FindTool( - "pcbnew.InteractiveSelection" ) ); - selectionTool->ClearSelection(); - /* Get the old list */ PICKED_ITEMS_LIST* List = GetScreen()->PopCommandFromUndoList(); /* Undo the command */ @@ -640,21 +635,20 @@ void PCB_EDIT_FRAME::GetBoardFromUndoList( wxCommandEvent& event ) List->ReversePickersListOrder(); GetScreen()->PushCommandToRedoList( List ); + // Inform tools that undo has just occurred + TOOL_EVENT event( TC_MESSAGE, TA_UNDO_REDO, AS_GLOBAL ); + m_toolManager->ProcessEvent( event ); + OnModify(); m_canvas->Refresh(); } -void PCB_EDIT_FRAME::GetBoardFromRedoList( wxCommandEvent& event ) +void PCB_EDIT_FRAME::GetBoardFromRedoList( wxCommandEvent& aEvent ) { if( GetScreen()->GetRedoCommandCount() == 0 ) return; - // Clear the selection, as it may be altered with redone items - SELECTION_TOOL* selectionTool = static_cast( m_toolManager->FindTool( - "pcbnew.InteractiveSelection" ) ); - selectionTool->ClearSelection(); - /* Get the old list */ PICKED_ITEMS_LIST* List = GetScreen()->PopCommandFromRedoList(); @@ -665,6 +659,10 @@ void PCB_EDIT_FRAME::GetBoardFromRedoList( wxCommandEvent& event ) List->ReversePickersListOrder(); GetScreen()->PushCommandToUndoList( List ); + // Inform tools that redo has just occurred + TOOL_EVENT event( TC_MESSAGE, TA_UNDO_REDO, AS_GLOBAL ); + m_toolManager->ProcessEvent( event ); + OnModify(); m_canvas->Refresh(); } diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 4d4d8e5404..324bb50032 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -100,6 +100,12 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) // This tool never exits } + else if( evt->Action() == TA_UNDO_REDO ) + { + // Clear the selection, as it may be altered with undone items + ClearSelection(); + } + // single click? Select single object else if( evt->IsClick( BUT_LEFT ) ) { From bbb3972fb7b4e01232d831d91ad3deae84441a29 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 30 Jan 2014 11:32:08 +0100 Subject: [PATCH 057/741] Undo buffer for the PNS router. Still, it has a bug - it crashes when an undo/redo operation is performed while routing a track. --- pcbnew/router/pns_router.cpp | 5 +++-- pcbnew/router/pns_router.h | 16 ++++++++++++++++ pcbnew/router/router_tool.cpp | 11 +++++++++++ 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index 991dd71e84..3046c13f6e 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -241,7 +241,6 @@ void PNS_ROUTER::SyncWorld() ClearWorld(); - m_clearanceFunc = new PCBNEW_CLEARANCE_FUNC( m_board ); m_world = new PNS_NODE(); m_world->SetClearanceFunctor( m_clearanceFunc ); @@ -584,8 +583,9 @@ void PNS_ROUTER::commitRouting( PNS_NODE* aNode ) if( parent ) { - m_view->Remove( parent ); + m_undoBuffer.PushItem( ITEM_PICKER( parent, UR_DELETED ) ); m_board->Remove( parent ); + m_view->Remove( parent ); } } @@ -632,6 +632,7 @@ void PNS_ROUTER::commitRouting( PNS_NODE* aNode ) m_view->Add( newBI ); m_board->Add( newBI ); m_board->GetRatsnest()->Update( newBI ); + m_undoBuffer.PushItem( ITEM_PICKER( newBI, UR_NEW ) ); newBI->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); } } diff --git a/pcbnew/router/pns_router.h b/pcbnew/router/pns_router.h index 0bb882fa25..3ba7be0125 100644 --- a/pcbnew/router/pns_router.h +++ b/pcbnew/router/pns_router.h @@ -27,6 +27,7 @@ #include #include +#include #include "pns_routing_settings.h" #include "pns_item.h" @@ -137,6 +138,18 @@ public: const PNS_ITEMSET QueryHoverItems( const VECTOR2I& aP ); const VECTOR2I SnapToItem( PNS_ITEM* item, VECTOR2I aP, bool& aSplitsSegment ); + /** + * Returns the last changes introduced by the router. After calling the method the list of + * changes is cleared, so only the latest changes are stored. + */ + PICKED_ITEMS_LIST GetLastChanges() + { + PICKED_ITEMS_LIST copy = m_undoBuffer; + m_undoBuffer.ClearItemsList(); // TODO and delete? + + return copy; + } + private: void clearViewFlags(); @@ -188,6 +201,9 @@ private: PNS_CLEARANCE_FUNC* m_clearanceFunc; boost::unordered_set m_hiddenItems; + + ///> Stores list of modified items in the current operation + PICKED_ITEMS_LIST m_undoBuffer; }; #endif diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index b301901048..ed3eb18092 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -322,6 +322,11 @@ void ROUTER_TOOL::startRouting() updateEndItem( *evt ); m_router->Move( m_endSnapPoint, m_endItem ); } + else if( evt->Action() == TA_UNDO_REDO ) + { + std::cout << "syncing the world while routing, I am going to craaaaaaaaaaaash!" << std::endl; + m_router->SyncWorld(); + } else if( evt->IsClick( BUT_LEFT ) ) { updateEndItem( *evt ); @@ -371,6 +376,10 @@ void ROUTER_TOOL::startRouting() m_router->StopRouting(); + // Save the recent changes in the undo buffer + getEditFrame()->SaveCopyInUndoList( m_router->GetLastChanges(), UR_UNSPECIFIED ); + getEditFrame()->OnModify(); + ctls->SetAutoPan( false ); ctls->ForceCursorPosition( false ); highlightNet( false ); @@ -392,6 +401,8 @@ int ROUTER_TOOL::Main( TOOL_EVENT& aEvent ) { if( evt->IsCancel() ) break; // Finish + else if( evt->Action() == TA_UNDO_REDO ) + m_router->SyncWorld(); else if( evt->IsMotion() ) updateStartItem( *evt ); else if( evt->IsClick( BUT_LEFT ) ) From 510fee13587862e66c0059ec53c2200cdbb08981 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 30 Jan 2014 15:46:39 +0100 Subject: [PATCH 058/741] Another way of handling items for the ratsnest (clearer and now finally supports undo/redo of the PNS created tracks). --- pcbnew/board_undo_redo.cpp | 12 +++++----- pcbnew/class_board.cpp | 46 +++++++++----------------------------- pcbnew/pcb_parser.cpp | 4 ++-- pcbnew/pcbframe.cpp | 1 - pcbnew/ratsnest_data.cpp | 14 ++++++++---- 5 files changed, 28 insertions(+), 49 deletions(-) diff --git a/pcbnew/board_undo_redo.cpp b/pcbnew/board_undo_redo.cpp index 3112bc5e27..68d008bebb 100644 --- a/pcbnew/board_undo_redo.cpp +++ b/pcbnew/board_undo_redo.cpp @@ -548,8 +548,7 @@ void PCB_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRed if( item->Type() == PCB_MODULE_T ) { MODULE* module = static_cast( item ); - module->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Remove ), - view ) ); + module->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Remove ), view ) ); } view->Remove( item ); @@ -563,8 +562,7 @@ void PCB_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRed if( item->Type() == PCB_MODULE_T ) { MODULE* module = static_cast( item ); - module->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Add ), - view ) ); + module->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Add ), view ) ); } view->Add( item ); @@ -575,23 +573,27 @@ void PCB_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRed case UR_MOVED: item->Move( aRedoCommand ? aList->m_TransformPoint : -aList->m_TransformPoint ); item->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + ratsnest->Update( item ); break; case UR_ROTATED: item->Rotate( aList->m_TransformPoint, aRedoCommand ? m_rotationAngle : -m_rotationAngle ); item->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + ratsnest->Update( item ); break; case UR_ROTATED_CLOCKWISE: item->Rotate( aList->m_TransformPoint, aRedoCommand ? -m_rotationAngle : m_rotationAngle ); item->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + ratsnest->Update( item ); break; case UR_FLIPPED: item->Flip( aList->m_TransformPoint ); item->ViewUpdate( KIGFX::VIEW_ITEM::LAYERS ); + ratsnest->Update( item ); break; default: @@ -603,8 +605,6 @@ void PCB_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRed } break; } - - ratsnest->Update( item ); } if( not_found ) diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index 896e44b8f6..da3bd81fa9 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -842,6 +842,8 @@ void BOARD::Add( BOARD_ITEM* aBoardItem, int aControl ) } break; } + + m_ratsnest->Add( aBoardItem ); } @@ -867,56 +869,26 @@ BOARD_ITEM* BOARD::Remove( BOARD_ITEM* aBoardItem ) break; case PCB_ZONE_AREA_T: // this one uses a vector - { - ZONE_CONTAINER* zone = static_cast( aBoardItem ); - // find the item in the vector, then delete then erase it. - for( unsigned i = 0; i < m_ZoneDescriptorList.size(); ++i ) + for( unsigned i = 0; iGetNet() > 0 ) - m_ratsnest->GetNet( zone->GetNet() ).RemoveItem( zone ); - } - break; + break; case PCB_MODULE_T: - { - MODULE* module = static_cast( aBoardItem ); m_Modules.Remove( (MODULE*) aBoardItem ); - - for( D_PAD* pad = module->Pads().GetFirst(); pad; pad = pad->Next() ) - { - if( pad->GetNet() > 0 ) - m_ratsnest->GetNet( pad->GetNet() ).RemoveItem( pad ); - } - } - break; + break; case PCB_TRACE_T: - { - TRACK* track = static_cast( aBoardItem ); - m_Track.Remove( track ); - - if( track->GetNet() > 0 ) - m_ratsnest->GetNet( track->GetNet() ).RemoveItem( track ); - } - break; - case PCB_VIA_T: - { - SEGVIA* via = static_cast( aBoardItem ); - m_Track.Remove( via ); - - if( via->GetNet() > 0 ) - m_ratsnest->GetNet( via->GetNet() ).RemoveItem( via ); - } - break; + m_Track.Remove( (TRACK*) aBoardItem ); + break; case PCB_ZONE_T: m_Zone.Remove( (SEGZONE*) aBoardItem ); @@ -935,6 +907,8 @@ BOARD_ITEM* BOARD::Remove( BOARD_ITEM* aBoardItem ) wxFAIL_MSG( wxT( "BOARD::Remove() needs more ::Type() support" ) ); } + m_ratsnest->Remove( aBoardItem ); + return aBoardItem; } diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index 41fb0037e5..1f06ac2ed1 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -428,11 +428,11 @@ BOARD* PCB_PARSER::parseBOARD() throw( IO_ERROR, PARSE_ERROR ) break; case T_segment: - m_board->m_Track.Append( parseTRACK() ); + m_board->Add( parseTRACK(), ADD_APPEND ); break; case T_via: - m_board->m_Track.Append( parseSEGVIA() ); + m_board->Add( parseSEGVIA(), ADD_APPEND ); break; case T_zone: diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 8823dcf4c3..72930927ca 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -612,7 +612,6 @@ void PCB_EDIT_FRAME::ViewReloadBoard( const BOARD* aBoard ) const // Add an entry for the ratsnest RN_DATA* ratsnest = aBoard->GetRatsnest(); - ratsnest->ProcessBoard(); ratsnest->Recalculate(); view->Add( new KIGFX::RATSNEST_VIEWITEM( ratsnest ) ); diff --git a/pcbnew/ratsnest_data.cpp b/pcbnew/ratsnest_data.cpp index ea9d8a7c57..99c84d05eb 100644 --- a/pcbnew/ratsnest_data.cpp +++ b/pcbnew/ratsnest_data.cpp @@ -782,6 +782,10 @@ void RN_DATA::Add( const BOARD_ITEM* aItem ) net = static_cast( aItem )->GetNet(); if( net < 1 ) // do not process unconnected items return; + + // Autoresize + if( net >= (int) m_nets.size() ) + m_nets.resize( net + 1 ); } else if( aItem->Type() == PCB_MODULE_T ) { @@ -789,10 +793,13 @@ void RN_DATA::Add( const BOARD_ITEM* aItem ) for( const D_PAD* pad = module->Pads().GetFirst(); pad; pad = pad->Next() ) { net = pad->GetNet(); - if( net < 1 ) // do not process unconnected items continue; + // Autoresize + if( net >= (int) m_nets.size() ) + m_nets.resize( net + 1 ); + m_nets[net].AddItem( pad ); } @@ -841,7 +848,6 @@ void RN_DATA::Remove( const BOARD_ITEM* aItem ) for( const D_PAD* pad = module->Pads().GetFirst(); pad; pad = pad->Next() ) { net = pad->GetNet(); - if( net < 1 ) // do not process unconnected items continue; @@ -916,8 +922,8 @@ void RN_DATA::Recalculate( int aNet ) { if( aNet < 0 ) // Recompute everything { - // Start with net number 1, as 0 stand for not connected - for( unsigned int i = 1; i < m_board->GetNetCount(); ++i ) + // Start with net number 1, as 0 stands for not connected + for( unsigned int i = 1; i < m_nets.size(); ++i ) { // Recompute only nets that require it if( m_nets[i].IsDirty() ) From 5fea60d20f3312e21ba0546654b03e24da5a2463 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 30 Jan 2014 17:11:40 +0100 Subject: [PATCH 059/741] Fixed undo/redo while routing with the PNS error. --- pcbnew/router/router_tool.cpp | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index ed3eb18092..d7c29d10ff 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -290,6 +290,7 @@ void ROUTER_TOOL::updateEndItem( TOOL_EVENT& aEvent ) void ROUTER_TOOL::startRouting() { + bool saveUndoBuffer = true; VIEW_CONTROLS* ctls = getViewControls(); int width = getDefaultWidth( m_startItem ? m_startItem->GetNet() : -1 ); @@ -317,16 +318,16 @@ void ROUTER_TOOL::startRouting() { if( evt->IsCancel() ) break; + else if( evt->Action() == TA_UNDO_REDO ) + { + saveUndoBuffer = false; + break; + } else if( evt->IsMotion() ) { updateEndItem( *evt ); m_router->Move( m_endSnapPoint, m_endItem ); } - else if( evt->Action() == TA_UNDO_REDO ) - { - std::cout << "syncing the world while routing, I am going to craaaaaaaaaaaash!" << std::endl; - m_router->SyncWorld(); - } else if( evt->IsClick( BUT_LEFT ) ) { updateEndItem( *evt ); @@ -376,9 +377,17 @@ void ROUTER_TOOL::startRouting() m_router->StopRouting(); - // Save the recent changes in the undo buffer - getEditFrame()->SaveCopyInUndoList( m_router->GetLastChanges(), UR_UNSPECIFIED ); - getEditFrame()->OnModify(); + if( saveUndoBuffer ) + { + // Save the recent changes in the undo buffer + getEditFrame()->SaveCopyInUndoList( m_router->GetLastChanges(), UR_UNSPECIFIED ); + getEditFrame()->OnModify(); + } + else + { + // It was interrupted by TA_UNDO_REDO event, so we have to sync the world now + m_router->SyncWorld(); + } ctls->SetAutoPan( false ); ctls->ForceCursorPosition( false ); From 3827f495ca0da2b019f13b5b65e1c35d96327e57 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 31 Jan 2014 11:16:01 +0100 Subject: [PATCH 060/741] Ratsnest color is saved in RENDER_SETTINGS. Temporary ratsnest is drawn using a brightened color. --- include/gal/color4d.h | 2 +- pcbnew/pcb_painter.cpp | 1 + pcbnew/ratsnest_viewitem.cpp | 10 ++++++++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/include/gal/color4d.h b/include/gal/color4d.h index c476f10e0e..fb4d9d9cf3 100644 --- a/include/gal/color4d.h +++ b/include/gal/color4d.h @@ -136,7 +136,7 @@ public: * Function Brightened * Returns a color that is brighter by a given factor, without modifying object. * @param aFactor Specifies how bright the color should become (valid values: 0.0 .. 1.0). - * @return COLOR4D Highlightedd color. + * @return COLOR4D Highlighted color. */ COLOR4D Brightened( double aFactor ) const { diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 105362f83c..4ffdfa4667 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -75,6 +75,7 @@ void PCB_RENDER_SETTINGS::ImportLegacyColors( COLORS_DESIGN_SETTINGS* aSettings m_layerColors[ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE )] = COLOR4D( 0.8, 0.8, 0.8, 0.7 ); m_layerColors[ITEM_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE )] = COLOR4D( 0.8, 0.8, 0.8, 0.7 ); m_layerColors[ITEM_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE )] = COLOR4D( 0.8, 0.8, 0.8, 0.7 ); + m_layerColors[ITEM_GAL_LAYER( RATSNEST_VISIBLE )] = COLOR4D( 0.4, 0.4, 0.4, 0.7 ); m_layerColors[ITEM_GAL_LAYER( WORKSHEET )] = COLOR4D( 0.5, 0.0, 0.0, 1.0 ); // Netnames for copper layers diff --git a/pcbnew/ratsnest_viewitem.cpp b/pcbnew/ratsnest_viewitem.cpp index 0e23b00306..7bf9d79568 100644 --- a/pcbnew/ratsnest_viewitem.cpp +++ b/pcbnew/ratsnest_viewitem.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -57,9 +58,9 @@ void RATSNEST_VIEWITEM::ViewDraw( int aLayer, GAL* aGal ) const aGal->SetIsStroke( true ); aGal->SetIsFill( false ); aGal->SetLineWidth( 1.0 ); - aGal->SetStrokeColor( COLOR4D( 0.8, 0.8, 0.8, 0.2 ) ); + RENDER_SETTINGS* rs = m_view->GetPainter()->GetSettings(); + COLOR4D color = rs->GetColor( NULL, ITEM_GAL_LAYER( RATSNEST_VISIBLE ) ); - // Draw the temporary ratsnest (skip the unconnected net [net code == 0]) for( int i = 1; i < m_data->GetNetCount(); ++i ) { const RN_NET& net = m_data->GetNet( i ); @@ -70,6 +71,9 @@ void RATSNEST_VIEWITEM::ViewDraw( int aLayer, GAL* aGal ) const // Avoid duplicate destinations for ratsnest lines by storing already used nodes boost::unordered_set usedDestinations; + // Set brighter color for the temporary ratsnest + aGal->SetStrokeColor( color.Brightened( 0.8 ) ); + // Draw the "dynamic" ratsnest (ie. for objects that may be currently being moved) BOOST_FOREACH( const RN_NODE_PTR& node, net.GetSimpleNodes() ) { @@ -86,6 +90,8 @@ void RATSNEST_VIEWITEM::ViewDraw( int aLayer, GAL* aGal ) const } // Draw the "static" ratsnest + aGal->SetStrokeColor( color ); // using the default ratsnest color + const std::vector* edges = net.GetUnconnected(); if( edges == NULL ) continue; From 7f4648149bb04c68dfa3e34e63dd644cc01ee327 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 31 Jan 2014 13:14:18 +0100 Subject: [PATCH 061/741] Ratsnest is updated after backend switch. --- pcbnew/pcbframe.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 72930927ca..15822a9b17 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -742,6 +742,9 @@ void PCB_EDIT_FRAME::UseGalCanvas( bool aEnable ) if( aEnable ) { + // Update potential changes in the ratsnest + m_Pcb->GetRatsnest()->Recalculate(); + m_toolManager->SetEnvironment( m_Pcb, GetGalCanvas()->GetView(), GetGalCanvas()->GetViewControls(), this ); m_toolManager->ResetTools( TOOL_BASE::GAL_SWITCH ); From 7f3bf1bef7490ce05c832c0c363b5d020dfb5245 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 31 Jan 2014 13:19:59 +0100 Subject: [PATCH 062/741] Added missing operators==/!= for RN_NODE_PTR. Moved ClearSimple() functions back to the header file. --- pcbnew/ratsnest_data.cpp | 43 ++++++++++++++++++---------------------- pcbnew/ratsnest_data.h | 20 ++++++++++++++++--- 2 files changed, 36 insertions(+), 27 deletions(-) diff --git a/pcbnew/ratsnest_data.cpp b/pcbnew/ratsnest_data.cpp index 99c84d05eb..95ca62e59b 100644 --- a/pcbnew/ratsnest_data.cpp +++ b/pcbnew/ratsnest_data.cpp @@ -35,7 +35,6 @@ #include #include -#include #include #include #include @@ -75,10 +74,21 @@ bool sortArea( const RN_POLY& aP1, const RN_POLY& aP2 ) } +bool operator==( const RN_NODE_PTR& aFirst, const RN_NODE_PTR& aSecond ) +{ + return aFirst->GetX() == aSecond->GetX() && aFirst->GetY() == aSecond->GetY(); +} + + +bool operator!=( const RN_NODE_PTR& aFirst, const RN_NODE_PTR& aSecond ) +{ + return aFirst->GetX() != aSecond->GetX() || aFirst->GetY() != aSecond->GetY(); +} + + bool isEdgeConnectingNode( const RN_EDGE_PTR& aEdge, const RN_NODE_PTR& aNode ) { - return ( aEdge->getSourceNode().get() == aNode.get() ) || - ( aEdge->getTargetNode().get() == aNode.get() ); + return aEdge->getSourceNode() == aNode || aEdge->getTargetNode() == aNode; } @@ -246,7 +256,7 @@ void RN_NET::compute() return; } - else if( boardNodes.size() == 1 || boardNodes.empty() ) // This case is even simpler + else if( boardNodes.size() <= 1 ) // This case is even simpler { m_rnEdges.reset( new std::vector( 0 ) ); @@ -566,17 +576,18 @@ const RN_NODE_PTR RN_NET::GetClosestNode( const RN_NODE_PTR& aNode, for( it = nodes.begin(), itEnd = nodes.end(); it != itEnd; ++it ) { - RN_NODE_PTR baseNode = *it; + RN_NODE_PTR node = *it; // Obviously the distance between node and itself is the shortest, // that's why we have to skip it - if( *it != aNode && aFilter( baseNode ) ) + if( node != aNode && aFilter( node ) ) { - unsigned int distance = getDistance( *it, aNode ); + unsigned int distance = getDistance( node, aNode ); + if( distance < minDistance ) { minDistance = distance; - closest = *it; + closest = node; } } } @@ -706,15 +717,6 @@ void RN_DATA::AddSimple( const BOARD_ITEM* aItem ) } -void RN_NET::ClearSimple() -{ - BOOST_FOREACH( const RN_NODE_PTR& node, m_simpleNodes ) - node->SetFlag( false ); - - m_simpleNodes.clear(); -} - - void RN_NET::processZones() { BOOST_FOREACH( std::deque& edges, m_zoneConnections | boost::adaptors::map_values ) @@ -935,10 +937,3 @@ void RN_DATA::Recalculate( int aNet ) updateNet( aNet ); } } - - -void RN_DATA::ClearSimple() -{ - BOOST_FOREACH( RN_NET& net, m_nets ) - net.ClearSimple(); -} diff --git a/pcbnew/ratsnest_data.h b/pcbnew/ratsnest_data.h index 4340c74e78..d51c070ee8 100644 --- a/pcbnew/ratsnest_data.h +++ b/pcbnew/ratsnest_data.h @@ -37,6 +37,7 @@ #include #include +#include class BOARD; class BOARD_ITEM; @@ -57,6 +58,9 @@ typedef hed::EdgeMST RN_EDGE_MST; typedef boost::shared_ptr RN_EDGE_MST_PTR; typedef hed::Triangulation TRIANGULATOR; +bool operator==( const RN_NODE_PTR& aFirst, const RN_NODE_PTR& aSecond ); +bool operator!=( const RN_NODE_PTR& aFirst, const RN_NODE_PTR& aSecond ); + ///> General interface for filtering out nodes in search functions. struct RN_NODE_FILTER : public std::unary_function { @@ -83,7 +87,7 @@ struct RN_NODE_COMPARE : std::binary_function { bool operator()( const RN_NODE_PTR& aNode1, const RN_NODE_PTR& aNode2 ) const { - return ( aNode1->GetX() == aNode2->GetX() && aNode1->GetY() == aNode2->GetY() ); + return aNode1 == aNode2; } }; @@ -461,7 +465,13 @@ public: * Function ClearSimple() * Removes all nodes and edges that are used for displaying ratsnest in simple mode. */ - void ClearSimple(); + void ClearSimple() + { + BOOST_FOREACH( const RN_NODE_PTR& node, m_simpleNodes ) + node->SetFlag( false ); + + m_simpleNodes.clear(); + } protected: ///> Validates edge, ie. modifies source and target nodes for an edge @@ -556,7 +566,11 @@ public: * Function ClearSimple() * Clears the list of nodes for which ratsnest is drawn in simple mode (one line per node). */ - void ClearSimple(); + void ClearSimple() + { + BOOST_FOREACH( RN_NET& net, m_nets ) + net.ClearSimple(); + } /** * Function ProcessBoard() From 630a3fb1b93b8dc32b11e06208a5f6fa827350a3 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 31 Jan 2014 14:41:15 +0100 Subject: [PATCH 063/741] Safer RN_NET::GetNodes() --- pcbnew/ratsnest_data.cpp | 67 +++++++++++++++++++++++----------------- 1 file changed, 38 insertions(+), 29 deletions(-) diff --git a/pcbnew/ratsnest_data.cpp b/pcbnew/ratsnest_data.cpp index 95ca62e59b..948362317f 100644 --- a/pcbnew/ratsnest_data.cpp +++ b/pcbnew/ratsnest_data.cpp @@ -548,15 +548,17 @@ const RN_NODE_PTR RN_NET::GetClosestNode( const RN_NODE_PTR& aNode ) const for( it = nodes.begin(), itEnd = nodes.end(); it != itEnd; ++it ) { + RN_NODE_PTR node = *it; + // Obviously the distance between node and itself is the shortest, // that's why we have to skip it - if( *it != aNode ) + if( node != aNode ) { - unsigned int distance = getDistance( *it, aNode ); + unsigned int distance = getDistance( node, aNode ); if( distance < minDistance ) { minDistance = distance; - closest = *it; + closest = node; } } } @@ -650,34 +652,41 @@ std::list RN_NET::GetNodes( const BOARD_CONNECTED_ITEM* aItem ) con { std::list nodes; - switch( aItem->Type() ) + try { - case PCB_PAD_T: - { - const D_PAD* pad = static_cast( aItem ); - nodes.push_back( m_pads.at( pad ) ); - } - break; - - case PCB_VIA_T: - { - const SEGVIA* via = static_cast( aItem ); - nodes.push_back( m_vias.at( via ) ); - } - break; - - case PCB_TRACE_T: - { - const TRACK* track = static_cast( aItem ); - RN_EDGE_PTR edge = m_tracks.at( track ); - - nodes.push_back( edge->getSourceNode() ); - nodes.push_back( edge->getTargetNode() ); - } - break; - - default: + switch( aItem->Type() ) + { + case PCB_PAD_T: + { + const D_PAD* pad = static_cast( aItem ); + nodes.push_back( m_pads.at( pad ) ); + } break; + + case PCB_VIA_T: + { + const SEGVIA* via = static_cast( aItem ); + nodes.push_back( m_vias.at( via ) ); + } + break; + + case PCB_TRACE_T: + { + const TRACK* track = static_cast( aItem ); + RN_EDGE_PTR edge = m_tracks.at( track ); + + nodes.push_back( edge->getSourceNode() ); + nodes.push_back( edge->getTargetNode() ); + } + break; + + default: + break; + } + } + catch ( ... ) + { + return nodes; } return nodes; From 24ba75ba9207bd610d7b7f830ee7541a1f9ca3f3 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 31 Jan 2014 14:52:01 +0100 Subject: [PATCH 064/741] Minor change to clearing selection handling. --- pcbnew/tools/selection_tool.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 324bb50032..f226709a86 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -94,8 +94,8 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) if( evt->IsCancel() ) { - if( !m_selection.Empty() ) // Cancel event deselects items... - ClearSelection(); + // Cancel event deselects items... + ClearSelection(); // This tool never exits } @@ -109,7 +109,7 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) // single click? Select single object else if( evt->IsClick( BUT_LEFT ) ) { - if( !m_additive && m_selection.Size() > 1 ) + if( !m_additive ) ClearSelection(); selectSingle( evt->Position() ); @@ -159,6 +159,9 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) void SELECTION_TOOL::ClearSelection() { + if( m_selection.Empty() ) + return; + KIGFX::VIEW_GROUP::const_iter it, it_end; // Restore the initial properties From 3e2e11fb42277051093e5fd8d1fd58c53ae0c8d1 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 31 Jan 2014 16:08:20 +0100 Subject: [PATCH 065/741] Undo/redo buffer fixed once again.. --- include/tool/tool_event.h | 2 +- pcbnew/board_undo_redo.cpp | 20 ++++++++++---------- pcbnew/router/router_tool.cpp | 15 +++++++++++---- pcbnew/router/router_tool.h | 3 +++ 4 files changed, 25 insertions(+), 15 deletions(-) diff --git a/include/tool/tool_event.h b/include/tool/tool_event.h index 9acc1f8f87..46b06e1eed 100644 --- a/include/tool/tool_event.h +++ b/include/tool/tool_event.h @@ -89,7 +89,7 @@ enum TOOL_ACTIONS // closed it without selecting anything. TA_CONTEXT_MENU_CHOICE = 0x10000, - // This event is sent *after* undo/redo command is finished. + // This event is sent *before* undo/redo command is performed. TA_UNDO_REDO = 0x20000, // Tool action (allows to control tools) diff --git a/pcbnew/board_undo_redo.cpp b/pcbnew/board_undo_redo.cpp index 68d008bebb..970ea3167d 100644 --- a/pcbnew/board_undo_redo.cpp +++ b/pcbnew/board_undo_redo.cpp @@ -523,8 +523,8 @@ void PCB_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRed { MODULE* oldModule = static_cast( item ); oldModule->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Remove ), view ) ); - oldModule->RunOnChildren( std::bind1st( std::mem_fun( &RN_DATA::Remove ), ratsnest ) ); } + ratsnest->Remove( item ); item->SwapData( image ); @@ -534,8 +534,8 @@ void PCB_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRed { MODULE* newModule = static_cast( item ); newModule->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Add ), view ) ); - newModule->RunOnChildren( std::bind1st( std::mem_fun( &RN_DATA::Add ), ratsnest ) ); } + ratsnest->Add( item ); item->ViewUpdate( KIGFX::VIEW_ITEM::LAYERS ); } @@ -626,6 +626,10 @@ void PCB_EDIT_FRAME::GetBoardFromUndoList( wxCommandEvent& aEvent ) if( GetScreen()->GetUndoCommandCount() <= 0 ) return; + // Inform tools that undo command was issued + TOOL_EVENT event( TC_MESSAGE, TA_UNDO_REDO, AS_GLOBAL ); + m_toolManager->ProcessEvent( event ); + /* Get the old list */ PICKED_ITEMS_LIST* List = GetScreen()->PopCommandFromUndoList(); /* Undo the command */ @@ -635,10 +639,6 @@ void PCB_EDIT_FRAME::GetBoardFromUndoList( wxCommandEvent& aEvent ) List->ReversePickersListOrder(); GetScreen()->PushCommandToRedoList( List ); - // Inform tools that undo has just occurred - TOOL_EVENT event( TC_MESSAGE, TA_UNDO_REDO, AS_GLOBAL ); - m_toolManager->ProcessEvent( event ); - OnModify(); m_canvas->Refresh(); } @@ -649,6 +649,10 @@ void PCB_EDIT_FRAME::GetBoardFromRedoList( wxCommandEvent& aEvent ) if( GetScreen()->GetRedoCommandCount() == 0 ) return; + // Inform tools that redo command was issued + TOOL_EVENT event( TC_MESSAGE, TA_UNDO_REDO, AS_GLOBAL ); + m_toolManager->ProcessEvent( event ); + /* Get the old list */ PICKED_ITEMS_LIST* List = GetScreen()->PopCommandFromRedoList(); @@ -659,10 +663,6 @@ void PCB_EDIT_FRAME::GetBoardFromRedoList( wxCommandEvent& aEvent ) List->ReversePickersListOrder(); GetScreen()->PushCommandToUndoList( List ); - // Inform tools that redo has just occurred - TOOL_EVENT event( TC_MESSAGE, TA_UNDO_REDO, AS_GLOBAL ); - m_toolManager->ProcessEvent( event ); - OnModify(); m_canvas->Refresh(); } diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index d7c29d10ff..94475132e2 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -31,7 +31,6 @@ #include #include -#include #include "router_tool.h" #include "pns_segment.h" @@ -82,6 +81,7 @@ void ROUTER_TOOL::Reset( RESET_REASON aReason ) m_router->ClearWorld(); m_router->SetBoard( getModel( PCB_T ) ); m_router->SyncWorld(); + m_needsSync = false; if( getView() ) m_router->SetView( getView() ); @@ -380,13 +380,14 @@ void ROUTER_TOOL::startRouting() if( saveUndoBuffer ) { // Save the recent changes in the undo buffer - getEditFrame()->SaveCopyInUndoList( m_router->GetLastChanges(), UR_UNSPECIFIED ); + getEditFrame()->SaveCopyInUndoList( m_router->GetLastChanges(), + UR_UNSPECIFIED ); getEditFrame()->OnModify(); } else { // It was interrupted by TA_UNDO_REDO event, so we have to sync the world now - m_router->SyncWorld(); + m_needsSync = true; } ctls->SetAutoPan( false ); @@ -408,10 +409,16 @@ int ROUTER_TOOL::Main( TOOL_EVENT& aEvent ) // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { + if( m_needsSync ) + { + m_router->SyncWorld(); + m_needsSync = false; + } + if( evt->IsCancel() ) break; // Finish else if( evt->Action() == TA_UNDO_REDO ) - m_router->SyncWorld(); + m_needsSync = true; else if( evt->IsMotion() ) updateStartItem( *evt ); else if( evt->IsClick( BUT_LEFT ) ) diff --git a/pcbnew/router/router_tool.h b/pcbnew/router/router_tool.h index c43283a051..42bbceb19c 100644 --- a/pcbnew/router/router_tool.h +++ b/pcbnew/router/router_tool.h @@ -72,6 +72,9 @@ private: PNS_ITEM* m_endItem; VECTOR2I m_endSnapPoint; + ///> Flag marking that the router's world needs syncing. + bool m_needsSync; + /*boost::shared_ptr m_menu;*/ CONTEXT_MENU* m_menu; }; From 0c67e26e9c4fd841a03923fd52f61ace949b3845 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 31 Jan 2014 18:05:11 +0100 Subject: [PATCH 066/741] Added the dynamic ratsnest for the tracks that are currently routed with the PNS router. --- pcbnew/ratsnest_data.cpp | 71 ++++++++++++++++++++++++++--------- pcbnew/ratsnest_data.h | 51 +++++++++++++++++++++---- pcbnew/ratsnest_viewitem.cpp | 11 +++--- pcbnew/router/pns_router.h | 17 ++++++--- pcbnew/router/router_tool.cpp | 27 +++++++++++++ 5 files changed, 141 insertions(+), 36 deletions(-) diff --git a/pcbnew/ratsnest_data.cpp b/pcbnew/ratsnest_data.cpp index 948362317f..bf58ea31b2 100644 --- a/pcbnew/ratsnest_data.cpp +++ b/pcbnew/ratsnest_data.cpp @@ -705,12 +705,9 @@ void RN_DATA::AddSimple( const BOARD_ITEM* aItem ) if( net < 1 ) // do not process unconnected items return; - // Get list of nodes responding to the item - std::list nodes = m_nets[net].GetNodes( item ); - std::list::iterator it, itEnd; - - for( it = nodes.begin(), itEnd = nodes.end(); it != itEnd; ++it ) - m_nets[net].AddSimpleNode( *it ); + // Add all nodes belonging to the item + BOOST_FOREACH( RN_NODE_PTR node, m_nets[net].GetNodes( item ) ) + m_nets[net].AddSimpleNode( node ); } else if( aItem->Type() == PCB_MODULE_T ) { @@ -726,6 +723,46 @@ void RN_DATA::AddSimple( const BOARD_ITEM* aItem ) } +void RN_DATA::AddBlocked( const BOARD_ITEM* aItem ) +{ + int net; + + if( aItem->IsConnected() ) + { + const BOARD_CONNECTED_ITEM* item = static_cast( aItem ); + net = item->GetNet(); + + if( net < 1 ) // do not process unconnected items + return; + + // Block all nodes belonging to the item + BOOST_FOREACH( RN_NODE_PTR node, m_nets[net].GetNodes( item ) ) + m_nets[net].AddBlockedNode( node ); + } + else if( aItem->Type() == PCB_MODULE_T ) + { + const MODULE* module = static_cast( aItem ); + + for( const D_PAD* pad = module->Pads().GetFirst(); pad; pad = pad->Next() ) + AddBlocked( pad ); + + return; + } + else + return; +} + + +void RN_DATA::AddSimple( const VECTOR2I& aPosition, int aNetCode ) +{ + assert( aNetCode > 0 ); + + RN_NODE_PTR newNode = boost::make_shared( aPosition.x, aPosition.y ); + + m_nets[aNetCode].AddSimpleNode( newNode ); +} + + void RN_NET::processZones() { BOOST_FOREACH( std::deque& edges, m_zoneConnections | boost::adaptors::map_values ) @@ -773,17 +810,6 @@ void RN_NET::processZones() } -void RN_DATA::updateNet( int aNetCode ) -{ - assert( aNetCode < (int) m_nets.size() ); - if( aNetCode < 1 ) - return; - - m_nets[aNetCode].ClearSimple(); - m_nets[aNetCode].Update(); -} - - void RN_DATA::Add( const BOARD_ITEM* aItem ) { int net; @@ -946,3 +972,14 @@ void RN_DATA::Recalculate( int aNet ) updateNet( aNet ); } } + + +void RN_DATA::updateNet( int aNetCode ) +{ + assert( aNetCode < (int) m_nets.size() ); + if( aNetCode < 1 ) + return; + + m_nets[aNetCode].ClearSimple(); + m_nets[aNetCode].Update(); +} diff --git a/pcbnew/ratsnest_data.h b/pcbnew/ratsnest_data.h index d51c070ee8..712909f2fa 100644 --- a/pcbnew/ratsnest_data.h +++ b/pcbnew/ratsnest_data.h @@ -284,7 +284,7 @@ public: /** * Function MarkDirty() - * Marks ratsnest for given net as 'dirty', ie. requiring recomputation. + * Marks ratsnest for given net as 'dirty', i.e. requiring recomputation. */ void MarkDirty() { @@ -432,7 +432,7 @@ public: /** * Function GetEdges() * Returns pointer to the vector of edges that makes ratsnest for a given net. - * @return Pointer to the vector of edges that makes ratsnest for a given net + * @return Pointer to the vector of edges that makes ratsnest for a given net. */ const std::vector* GetEdges() const { @@ -441,8 +441,8 @@ public: /** * Function AddSimpleNode() - * Changes drawing mode for a node to simple (ie. one ratsnest line per node). - * @param aNode is a node that changes its drawing mode.. + * Changes drawing mode for a node to simple (i.e. one ratsnest line per node). + * @param aNode is a node that changes its drawing mode. */ void AddSimpleNode( RN_NODE_PTR& aNode ) { @@ -450,9 +450,21 @@ public: aNode->SetFlag( true ); } + /** + * Function AddBlockedNode() + * Specifies a node as not suitable as a ratsnest line target (i.e. ratsnest lines will not + * target the node). The status is cleared after calling ClearSimple(). + * @param aNode is the node that is not going to be used as a ratsnest line target. + */ + void AddBlockedNode( RN_NODE_PTR& aNode ) + { + m_blockedNodes.push_back( aNode ); + aNode->SetFlag( true ); + } + /** * Function GetSimpleNodes() - * Returns list of nodes for which ratsnest is drawn in simple mode (ie. one + * Returns list of nodes for which ratsnest is drawn in simple mode (i.e. one * ratsnest line per node). * @return list of nodes for which ratsnest is drawn in simple mode. */ @@ -470,11 +482,15 @@ public: BOOST_FOREACH( const RN_NODE_PTR& node, m_simpleNodes ) node->SetFlag( false ); + BOOST_FOREACH( const RN_NODE_PTR& node, m_blockedNodes ) + node->SetFlag( false ); + m_simpleNodes.clear(); + m_blockedNodes.clear(); } protected: - ///> Validates edge, ie. modifies source and target nodes for an edge + ///> Validates edge, i.e. modifies source and target nodes for an edge ///> to make sure that they are not ones with the flag set. void validateEdge( RN_EDGE_PTR& aEdge ); @@ -496,6 +512,9 @@ protected: ///> List of nodes for which ratsnest is drawn in simple mode. std::deque m_simpleNodes; + ///> List of nodes which should be used as ratsnest target nodes.. + std::deque m_blockedNodes; + ///> Flag indicating necessity of recalculation of ratsnest for a net. bool m_dirty; @@ -556,12 +575,30 @@ public: /** * Function AddSimple() - * Sets an item to be drawn in simple mode (ie. one line per node, instead of full ratsnest). + * Sets an item to be drawn in simple mode (i.e. one line per node, instead of full ratsnest). * It is used for drawing quick, temporary ratsnest, eg. while moving an item. * @param aItem is an item to be drawn in simple node. */ void AddSimple( const BOARD_ITEM* aItem ); + /** + * Function AddSimple() + * Allows to draw a ratsnest line using a position expressed in world coordinates and a + * net code (so there is no need to have a real BOARD_ITEM to draw ratsnest line). + * It is used for drawing quick, temporary ratsnest, eg. while moving an item. + * @param aPosition is the point for which ratsnest line are going to be drawn. + * @param aNetCode determines the net code for which the ratsnest line are going to be drawn. + */ + void AddSimple( const VECTOR2I& aPosition, int aNetCode ); + + /** + * Function AddBlocked() + * Specifies an item as not suitable as a ratsnest line target (i.e. ratsnest lines will not + * target its node(s)). The status is cleared after calling ClearSimple(). + * @param aItem is the item of which node(s) are not going to be used as a ratsnest line target. + */ + void AddBlocked( const BOARD_ITEM* aItem ); + /** * Function ClearSimple() * Clears the list of nodes for which ratsnest is drawn in simple mode (one line per node). diff --git a/pcbnew/ratsnest_viewitem.cpp b/pcbnew/ratsnest_viewitem.cpp index 7bf9d79568..5de2527111 100644 --- a/pcbnew/ratsnest_viewitem.cpp +++ b/pcbnew/ratsnest_viewitem.cpp @@ -63,14 +63,11 @@ void RATSNEST_VIEWITEM::ViewDraw( int aLayer, GAL* aGal ) const for( int i = 1; i < m_data->GetNetCount(); ++i ) { - const RN_NET& net = m_data->GetNet( i ); + RN_NET& net = m_data->GetNet( i ); if( !net.IsVisible() ) continue; - // Avoid duplicate destinations for ratsnest lines by storing already used nodes - boost::unordered_set usedDestinations; - // Set brighter color for the temporary ratsnest aGal->SetStrokeColor( color.Brightened( 0.8 ) ); @@ -79,13 +76,15 @@ void RATSNEST_VIEWITEM::ViewDraw( int aLayer, GAL* aGal ) const { RN_NODE_PTR dest = net.GetClosestNode( node, WITHOUT_FLAG() ); - if( dest && usedDestinations.find( dest ) == usedDestinations.end() ) + if( dest ) { VECTOR2D origin( node->GetX(), node->GetY() ); VECTOR2D end( dest->GetX(), dest->GetY() ); aGal->DrawLine( origin, end ); - usedDestinations.insert( dest ); + + // Avoid duplicate destinations for ratsnest lines by storing already used nodes + net.AddBlockedNode( dest ); } } diff --git a/pcbnew/router/pns_router.h b/pcbnew/router/pns_router.h index 3ba7be0125..430f950a37 100644 --- a/pcbnew/router/pns_router.h +++ b/pcbnew/router/pns_router.h @@ -139,15 +139,20 @@ public: const VECTOR2I SnapToItem( PNS_ITEM* item, VECTOR2I aP, bool& aSplitsSegment ); /** - * Returns the last changes introduced by the router. After calling the method the list of - * changes is cleared, so only the latest changes are stored. + * Returns the last changes introduced by the router (since the last time ClearLastChanges() + * was called or a new track has been started). */ - PICKED_ITEMS_LIST GetLastChanges() + const PICKED_ITEMS_LIST& GetLastChanges() const { - PICKED_ITEMS_LIST copy = m_undoBuffer; - m_undoBuffer.ClearItemsList(); // TODO and delete? + return m_undoBuffer; + } - return copy; + /** + * Clears the list of recent changes, saved to be stored in the undo buffer. + */ + void ClearLastChanges() + { + m_undoBuffer.ClearItemsList(); } private: diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index 94475132e2..9a8528d23a 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -32,6 +32,8 @@ #include +#include + #include "router_tool.h" #include "pns_segment.h" #include "pns_router.h" @@ -282,6 +284,30 @@ void ROUTER_TOOL::updateEndItem( TOOL_EVENT& aEvent ) ctls->ForceCursorPosition( false ); } + // Draw ratsnest for the currently routed track + RN_DATA* ratsnest = getModel( PCB_T )->GetRatsnest(); + ratsnest->ClearSimple(); + + if( ( m_endItem == NULL || m_endItem == m_startItem ) && m_startItem->GetNet() > 0 ) + { + // The ending node has to be first, so the line for the track is drawn first + ratsnest->AddSimple( m_endSnapPoint, m_startItem->GetNet() ); + + // Those nodes are added just to force ratsnest not to drawn + // lines to already routed parts of the track + const PICKED_ITEMS_LIST& changes = m_router->GetLastChanges(); + for( unsigned int i = 0; i < changes.GetCount(); ++i ) + { + // Block the new tracks, do not handle tracks that were moved + // (moved tracks are saved in the undo buffer with UR_DELETED status instead) + if( changes.GetPickedItemStatus( i ) == UR_NEW ) + ratsnest->AddBlocked( static_cast( changes.GetPickedItem( i ) ) ); + } + + // Also the origin of the new track should be skipped in the ratsnest shown for the routed track + ratsnest->AddBlocked( static_cast( m_startItem->GetParent() ) ); + } + if( m_endItem ) TRACE( 0, "%s, layer : %d", m_endItem->GetKindStr().c_str() % m_endItem->GetLayers().Start() ); @@ -382,6 +408,7 @@ void ROUTER_TOOL::startRouting() // Save the recent changes in the undo buffer getEditFrame()->SaveCopyInUndoList( m_router->GetLastChanges(), UR_UNSPECIFIED ); + m_router->ClearLastChanges(); getEditFrame()->OnModify(); } else From 1490099ddd10dffebcd6d9020b3a4f3c0624b69c Mon Sep 17 00:00:00 2001 From: Carl Poirier Date: Fri, 31 Jan 2014 18:27:06 +0100 Subject: [PATCH 067/741] Parallelized the RN_DATA::Recalculate() function. --- CMakeLists.txt | 7 +++++++ pcbnew/CMakeLists.txt | 2 ++ pcbnew/ratsnest_data.cpp | 28 +++++++++++++++++++++++----- 3 files changed, 32 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d72d54d6de..c3fc56208b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -125,6 +125,13 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden" ) endif() + find_package( OpenMP QUIET ) + if( OPENMP_FOUND ) + set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}" ) + set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}" ) + add_definitions( -DUSE_OPENMP ) + endif() + if( MINGW ) set( CMAKE_EXE_LINKER_FLAGS_RELEASE "-s" ) diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 11663c684f..86e8dd296d 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -1,6 +1,8 @@ set( MAKE_LINK_MAPS false ) +set( CMAKE_CXX_FLAGS "-fopenmp" ) + add_definitions( -DPCBNEW ) add_subdirectory(router) diff --git a/pcbnew/ratsnest_data.cpp b/pcbnew/ratsnest_data.cpp index af5f6932fd..977e3bcc9e 100644 --- a/pcbnew/ratsnest_data.cpp +++ b/pcbnew/ratsnest_data.cpp @@ -27,6 +27,10 @@ * @brief Class that computes missing connections on a PCB. */ +#ifdef USE_OPENMP +#include +#endif /* USE_OPENMP */ + #include #include @@ -829,12 +833,25 @@ void RN_DATA::Recalculate( int aNet ) { if( aNet < 0 ) // Recompute everything { - // Start with net number 1, as 0 stand for not connected - for( unsigned int i = 1; i < m_board->GetNetCount(); ++i ) + unsigned int tid, i, chunk, netCount; + netCount = m_board->GetNetCount(); + chunk = 1; + +#ifdef USE_OPENMP + #pragma omp parallel shared(chunk, netCount) private(i, tid) { - if( m_nets[i].IsDirty() ) - updateNet( i ); - } + tid = omp_get_thread_num(); + #pragma omp for schedule(guided, chunk) +#else /* USE_OPENMP */ + { +#endif + // Start with net number 1, as 0 stand for not connected + for( i = 1; i < netCount; ++i ) + { + if( m_nets[i].IsDirty() ) + updateNet( i ); + } + } /* end of parallel section */ } else if( aNet > 0 ) // Recompute only specific net { @@ -848,3 +865,4 @@ void RN_DATA::ClearSimple() BOOST_FOREACH( RN_NET& net, m_nets ) net.ClearSimple(); } + From 3f5c3d434900320955b28b101124d23637e0fa23 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 3 Feb 2014 16:02:54 +0100 Subject: [PATCH 068/741] Minor changes (fix cvpcb build issue, wx2.8 compatibility, some other stuff). --- common/CMakeLists.txt | 1 + pcbnew/CMakeLists.txt | 1 - pcbnew/pcb_painter.cpp | 3 +-- pcbnew/pcb_parser.cpp | 6 +++--- pcbnew/router/pns_router.cpp | 1 - 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 44569f29e2..cd3ae84acc 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -219,6 +219,7 @@ set( PCB_COMMON_SRCS ../pcbnew/class_zone.cpp ../pcbnew/class_zone_settings.cpp ../pcbnew/classpcb.cpp + ../pcbnew/ratsnest_data.cpp ../pcbnew/collectors.cpp ../pcbnew/netlist_reader.cpp ../pcbnew/legacy_netlist_reader.cpp diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 1ff4550e43..7a715d181c 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -221,7 +221,6 @@ set( PCBNEW_CLASS_SRCS print_board_functions.cpp printout_controler.cpp ratsnest.cpp - ratsnest_data.cpp ratsnest_viewitem.cpp # specctra.cpp #moved in pcbcommon lib # specctra_export.cpp diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 4ffdfa4667..b7f9ff0cc3 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -34,7 +34,6 @@ #include #include #include -#include #include #include @@ -281,7 +280,7 @@ void PCB_PAINTER::draw( const TRACK* aTrack, int aLayer ) if( !net ) return; - std::wstring netName = std::wstring( net->GetShortNetname().wc_str() ); + const wxString& netName = aTrack->GetShortNetname(); VECTOR2D textPosition = start + line / 2.0; // center of the track double textOrientation = -atan( line.y / line.x ); double textSize = std::min( static_cast( width ), length / netName.length() ); diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index 1f06ac2ed1..f68743b741 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -2426,9 +2426,9 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER() throw( IO_ERROR, PARSE_ERROR ) NeedSYMBOLorNUMBER(); if( m_board->FindNet( zone->GetNet() )->GetNetname() != FromUTF8() ) { - DisplayError( NULL, wxString::Format( _( "There is a zone that belongs to a not " - "existing net (%s), you should verify it." ), - FromUTF8() ) ); + wxString msg = _( "There is a zone that belongs to a not " + "existing net (" ) + FromUTF8() + _("), you should verify it." ); + DisplayError( NULL, msg ); zone->SetNet( NETINFO_LIST::UNCONNECTED ); } NeedRIGHT(); diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index 3046c13f6e..1babefa598 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -631,7 +631,6 @@ void PNS_ROUTER::commitRouting( PNS_NODE* aNode ) newBI->ClearFlags(); m_view->Add( newBI ); m_board->Add( newBI ); - m_board->GetRatsnest()->Update( newBI ); m_undoBuffer.PushItem( ITEM_PICKER( newBI, UR_NEW ) ); newBI->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); } From f6aa4470360ed87530ed9353d846c7874af0d9c5 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 3 Feb 2014 17:40:39 +0100 Subject: [PATCH 069/741] Ratsnest lines for zones are removed when a zone is dragged. --- pcbnew/ratsnest_data.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pcbnew/ratsnest_data.cpp b/pcbnew/ratsnest_data.cpp index bf58ea31b2..4f49e6bed4 100644 --- a/pcbnew/ratsnest_data.cpp +++ b/pcbnew/ratsnest_data.cpp @@ -521,7 +521,12 @@ void RN_NET::RemoveItem( const ZONE_CONTAINER* aZone ) // Remove all subpolygons that make the zone std::deque& polygons = m_zonePolygons.at( aZone ); BOOST_FOREACH( RN_POLY& polygon, polygons ) - m_links.RemoveNode( polygon.GetNode() ); + { + const RN_NODE_PTR node = polygon.GetNode(); + + if( m_links.RemoveNode( node ) ) + clearNode( node ); + } polygons.clear(); // Remove all connections added by the zone From f87b6962e00f33136a495ec049ccc959d6f013bb Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 3 Feb 2014 18:09:17 +0100 Subject: [PATCH 070/741] Enabled PNS for selected items. --- pcbnew/router/router_tool.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index 9a8528d23a..558b4dfab6 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -140,7 +140,8 @@ PNS_ITEM* ROUTER_TOOL::pickSingleItem( const VECTOR2I& aWhere, int aNet, int aLa if( !IsCopperLayer( item->GetLayers().Start() ) ) continue; - if( item->GetParent() && !item->GetParent()->ViewIsVisible() ) + if( item->GetParent() && !item->GetParent()->ViewIsVisible() && + !item->GetParent()->IsSelected() ) continue; if( aNet < 0 || item->GetNet() == aNet ) From b317894ea0167d14adcad04eec7c0872c607c6f1 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 4 Feb 2014 09:44:16 +0100 Subject: [PATCH 071/741] Snapping settings are valid while autopanning. --- common/tool/tool_dispatcher.cpp | 2 +- common/view/wx_view_controls.cpp | 24 ++++++++++++++---------- include/view/wx_view_controls.h | 6 ++++++ 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index 66efcc2581..f35689c97f 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -224,7 +224,7 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) VECTOR2D screenPos = m_toolMgr->GetViewControls()->GetMousePosition(); VECTOR2D pos = getView()->ToWorld( screenPos ); - if( pos != m_lastMousePos || type == KIGFX::WX_VIEW_CONTROLS::EVT_REFRESH_MOUSE ) + if( pos != m_lastMousePos ) { motion = true; m_lastMousePos = pos; diff --git a/common/view/wx_view_controls.cpp b/common/view/wx_view_controls.cpp index 20778c7d3e..3aeabd6d7d 100644 --- a/common/view/wx_view_controls.cpp +++ b/common/view/wx_view_controls.cpp @@ -73,12 +73,7 @@ void WX_VIEW_CONTROLS::onMotion( wxMouseEvent& aEvent ) m_mousePosition.x = aEvent.GetX(); m_mousePosition.y = aEvent.GetY(); - if( m_forceCursorPosition ) - m_cursorPosition = m_view->ToScreen( m_forcedPosition ); - else if( m_snappingEnabled ) - m_cursorPosition = m_view->GetGAL()->GetGridPoint( m_mousePosition ); - else - m_cursorPosition = m_mousePosition; + updateCursor(); bool isAutoPanning = false; @@ -166,17 +161,13 @@ void WX_VIEW_CONTROLS::onButton( wxMouseEvent& aEvent ) } if( aEvent.LeftUp() ) - { m_state = IDLE; // Stop autopanning when user release left mouse button - } break; case DRAG_PANNING: if( aEvent.MiddleUp() ) - { m_state = IDLE; - } break; } @@ -208,6 +199,8 @@ void WX_VIEW_CONTROLS::onTimer( wxTimerEvent& aEvent ) dir = m_view->ToWorld( dir, false ); m_view->SetCenter( m_view->GetCenter() + dir * m_autoPanSpeed ); + updateCursor(); + // Notify tools that the cursor position has changed in the world coordinates wxCommandEvent moveEvent( EVT_REFRESH_MOUSE ); wxPostEvent( m_parentPanel, moveEvent ); @@ -298,3 +291,14 @@ bool WX_VIEW_CONTROLS::handleAutoPanning( const wxMouseEvent& aEvent ) wxASSERT_MSG( false, wxT( "This line should never be reached" ) ); return false; // Should not be reached, just avoid the compiler warnings.. } + + +void WX_VIEW_CONTROLS::updateCursor() +{ + if( m_forceCursorPosition ) + m_cursorPosition = m_view->ToScreen( m_forcedPosition ); + else if( m_snappingEnabled ) + m_cursorPosition = m_view->GetGAL()->GetGridPoint( m_mousePosition ); + else + m_cursorPosition = m_mousePosition; +} diff --git a/include/view/wx_view_controls.h b/include/view/wx_view_controls.h index cfec3eac9b..5df48f3de3 100644 --- a/include/view/wx_view_controls.h +++ b/include/view/wx_view_controls.h @@ -112,6 +112,12 @@ private: */ bool handleAutoPanning( const wxMouseEvent& aEvent ); + /** + * Function updateCursor() + * Recomputes the cursor coordinates basing on the current snapping settings and mouse position. + */ + void updateCursor(); + /// Current state of VIEW_CONTROLS STATE m_state; From 82ca611ed32b5d6a4e396ceaa9c406b553945d80 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 4 Feb 2014 11:37:54 +0100 Subject: [PATCH 072/741] SELECTION_TOOL::SELECTION::Clear made private, as there was no chance to call it outside the SELECTION_TOOL class. --- pcbnew/tools/selection_tool.cpp | 8 ++++---- pcbnew/tools/selection_tool.h | 5 ++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index f226709a86..9cdd5fc072 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -69,7 +69,7 @@ void SELECTION_TOOL::Reset( RESET_REASON aReason ) if( aReason == TOOL_BASE::MODEL_RELOAD ) // Remove pointers to the selected items from containers // without changing their properties (as they are already deleted) - m_selection.Clear(); + m_selection.clear(); else // Restore previous properties of selected items and remove them from containers ClearSelection(); @@ -172,7 +172,7 @@ void SELECTION_TOOL::ClearSelection() item->ViewSetVisible( true ); item->ClearSelected(); } - m_selection.Clear(); + m_selection.clear(); getEditFrame()->SetCurItem( NULL ); @@ -465,7 +465,7 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) const if( aItem->IsOnLayer( LAYER_N_FRONT ) && board->IsElementVisible( MOD_FR_VISIBLE ) ) return true; - if( aItem->IsOnLayer( LAYER_N_BACK ) && board->IsLayerVisible( MOD_BK_VISIBLE ) ) + if( aItem->IsOnLayer( LAYER_N_BACK ) && board->IsElementVisible( MOD_BK_VISIBLE ) ) return true; return false; @@ -590,7 +590,7 @@ bool SELECTION_TOOL::containsSelected( const VECTOR2I& aPoint ) const } -void SELECTION_TOOL::SELECTION::Clear() +void SELECTION_TOOL::SELECTION::clear() { items.ClearItemsList(); group->Clear(); diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index 168f2288da..93b25083c6 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -78,9 +78,12 @@ public: return items.GetCount(); } + private: /// Clears both the VIEW_GROUP and set of selected items. Please note that it does not /// change properties of selected items (e.g. selection flag). - void Clear(); + void clear(); + + friend class SELECTION_TOOL; }; /// @copydoc TOOL_INTERACTIVE::Reset() From 0b9a8709f82c5d5cdf41066b61702c8786f903db Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 4 Feb 2014 13:38:18 +0100 Subject: [PATCH 073/741] Modifiers (Alt/Shift/Control) are properly set for events when autopanning is active. --- common/view/wx_view_controls.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/common/view/wx_view_controls.cpp b/common/view/wx_view_controls.cpp index 3aeabd6d7d..f9a17fa86a 100644 --- a/common/view/wx_view_controls.cpp +++ b/common/view/wx_view_controls.cpp @@ -202,7 +202,20 @@ void WX_VIEW_CONTROLS::onTimer( wxTimerEvent& aEvent ) updateCursor(); // Notify tools that the cursor position has changed in the world coordinates - wxCommandEvent moveEvent( EVT_REFRESH_MOUSE ); + wxMouseEvent moveEvent( EVT_REFRESH_MOUSE ); + + // Set the modifiers state +#if wxCHECK_VERSION( 3, 0, 0 ) + moveEvent.SetControlDown( wxGetKeyState( WXK_CONTROL ) ); + moveEvent.SetShiftDown( wxGetKeyState( WXK_SHIFT ) ); + moveEvent.SetAltDown( wxGetKeyState( WXK_ALT) ); +#else + // wx <3.0 do not have accessors, but the fields are exposed + moveEvent.m_controlDown = wxGetKeyState( WXK_CONTROL ); + moveEvent.m_shiftDown = wxGetKeyState( WXK_SHIFT ); + moveEvent.m_altDown = wxGetKeyState( WXK_ALT ); +#endif + wxPostEvent( m_parentPanel, moveEvent ); } break; From 347649e855da809b1cca92528045349d4f8647bb Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 4 Feb 2014 13:40:39 +0100 Subject: [PATCH 074/741] Protection against non consecutive net codes. --- pcbnew/router/pns_router.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index 1babefa598..b655ac363f 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -66,6 +66,9 @@ public: for( unsigned int i = 0; i < aBoard->GetNetCount(); i++ ) { NETINFO_ITEM* ni = aBoard->FindNet( i ); + if( ni == NULL ) + continue; + wxString netClassName = ni->GetClassName(); NETCLASS* nc = aBoard->m_NetClasses.Find( netClassName ); int clearance = nc->GetClearance(); From 106fa9bbd8076002978b23e4784074226df8062c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 4 Feb 2014 14:21:29 +0100 Subject: [PATCH 075/741] Edit tool may still be activated if it was invoked with no selected items. --- pcbnew/tools/edit_tool.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 451164bf23..812d7732dd 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -80,7 +80,11 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) m_updateFlag = KIGFX::VIEW_ITEM::GEOMETRY; if( selection.Empty() ) - return 0; // there are no items to operate on + { + setTransitions(); // this is necessary, so later the tool may + // be activated upon reception of the activation event + return 0; // there are no items to operate on, so we can end now + } VECTOR2D dragPosition; // The last position of the cursor while dragging m_dragging = false; From 625dcddb2714f03220b3c881cf726d10c3d87c73 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 4 Feb 2014 16:03:56 +0100 Subject: [PATCH 076/741] Added 2 tool actions: - pcbnew.InteractiveSelection.Single for selecting a single item - pcbnew.InteractiveSelection.Clear for clearing the selection Made SELECTION_TOOL::clearSelection private. --- pcbnew/tools/common_actions.cpp | 6 ++ pcbnew/tools/common_actions.h | 12 ++- pcbnew/tools/edit_tool.cpp | 12 +-- pcbnew/tools/pcb_tools.cpp | 2 + pcbnew/tools/selection_tool.cpp | 147 ++++++++++++++++---------------- pcbnew/tools/selection_tool.h | 12 +-- 6 files changed, 100 insertions(+), 91 deletions(-) diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 6756e10a9d..f1fb3befd6 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -30,6 +30,12 @@ TOOL_ACTION COMMON_ACTIONS::selectionActivate( "pcbnew.InteractiveSelection", AS_GLOBAL, 0, "", "" ); // No description, it is not supposed to be shown anywhere +TOOL_ACTION COMMON_ACTIONS::selectionSingle( "pcbnew.InteractiveSelection.Single", + AS_GLOBAL, 0, "", "" ); // No description, it is not supposed to be shown anywhere + +TOOL_ACTION COMMON_ACTIONS::selectionClear( "pcbnew.InteractiveSelection.Clear", + AS_GLOBAL, 0, "", "" ); // No description, it is not supposed to be shown anywhere + // Edit tool actions TOOL_ACTION COMMON_ACTIONS::editActivate( "pcbnew.InteractiveEdit", AS_GLOBAL, 'M', diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index 19b0004182..86aafe5894 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -24,13 +24,11 @@ #include -//class ACTION_MANAGER; - /** * Class COMMON_ACTIONS * - * Gathers all the actions that are shared by tools. The instance of COMMON_ACTIOSN is created - * inside of ACTION_MANAGER object and registers them. + * Gathers all the actions that are shared by tools. The instance of COMMON_ACTION is created + * inside of ACTION_MANAGER object that registers the actions. */ class COMMON_ACTIONS { @@ -38,6 +36,12 @@ public: /// Activation of the selection tool static TOOL_ACTION selectionActivate; + /// Select a single item under the cursor position + static TOOL_ACTION selectionSingle; + + /// Clears the current selection + static TOOL_ACTION selectionClear; + /// Activation of the edit tool static TOOL_ACTION editActivate; diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 812d7732dd..008305193d 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -74,10 +74,6 @@ bool EDIT_TOOL::Init() int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); - PCB_EDIT_FRAME* editFrame = static_cast( m_toolMgr->GetEditFrame() ); - - // By default, modified items need to update their geometry - m_updateFlag = KIGFX::VIEW_ITEM::GEOMETRY; if( selection.Empty() ) { @@ -90,7 +86,11 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) m_dragging = false; bool restore = false; // Should items' state be restored when finishing the tool? + // By default, modified items need to update their geometry + m_updateFlag = KIGFX::VIEW_ITEM::GEOMETRY; + VIEW_CONTROLS* controls = getViewControls(); + PCB_EDIT_FRAME* editFrame = static_cast( m_toolMgr->GetEditFrame() ); controls->ShowCursor( true ); controls->SetSnapping( true ); controls->SetAutoPan( true ); @@ -163,7 +163,7 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) if( restore ) { - // Modifications has to be rollbacked, so restore the previous state of items + // Modifications have to be rollbacked, so restore the previous state of items wxCommandEvent dummy; editFrame->GetBoardFromUndoList( dummy ); } @@ -290,7 +290,7 @@ int EDIT_TOOL::Remove( TOOL_EVENT& aEvent ) PCB_EDIT_FRAME* editFrame = static_cast( m_toolMgr->GetEditFrame() ); // As we are about to remove items, they have to be removed from the selection first - m_selectionTool->ClearSelection(); + m_toolMgr->RunAction( "pcbnew.InteractiveSelection.Clear" ); // Save them for( unsigned int i = 0; i < selectedItems.GetCount(); ++i ) diff --git a/pcbnew/tools/pcb_tools.cpp b/pcbnew/tools/pcb_tools.cpp index 9908012f6b..a4b4f21a24 100644 --- a/pcbnew/tools/pcb_tools.cpp +++ b/pcbnew/tools/pcb_tools.cpp @@ -47,6 +47,8 @@ void PCB_EDIT_FRAME::setupTools() GetGalCanvas()->SetEventDispatcher( m_toolDispatcher ); // Register tool actions + m_toolManager->RegisterAction( &COMMON_ACTIONS::selectionSingle ); + m_toolManager->RegisterAction( &COMMON_ACTIONS::selectionClear ); m_toolManager->RegisterAction( &COMMON_ACTIONS::editActivate ); m_toolManager->RegisterAction( &COMMON_ACTIONS::rotate ); m_toolManager->RegisterAction( &COMMON_ACTIONS::flip ); diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 9cdd5fc072..ce59adbb1f 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -72,7 +72,7 @@ void SELECTION_TOOL::Reset( RESET_REASON aReason ) m_selection.clear(); else // Restore previous properties of selected items and remove them from containers - ClearSelection(); + clearSelection(); // Reinsert the VIEW_GROUP, in case it was removed from the VIEW getView()->Remove( m_selection.group ); @@ -92,25 +92,22 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) // become the new selection (discarding previously selected items) m_additive = evt->Modifier( MD_SHIFT ); - if( evt->IsCancel() ) + if( evt->IsAction( &COMMON_ACTIONS::selectionSingle ) ) { - // Cancel event deselects items... - ClearSelection(); - - // This tool never exits + selectSingle( getView()->ToWorld( getViewControls()->GetMousePosition() ) ); } - else if( evt->Action() == TA_UNDO_REDO ) + else if( evt->IsCancel() || evt->Action() == TA_UNDO_REDO || + evt->IsAction( &COMMON_ACTIONS::selectionClear ) ) { - // Clear the selection, as it may be altered with undone items - ClearSelection(); + clearSelection(); } // single click? Select single object else if( evt->IsClick( BUT_LEFT ) ) { if( !m_additive ) - ClearSelection(); + clearSelection(); selectSingle( evt->Position() ); } @@ -144,7 +141,7 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) else { // No -> clear the selection list - ClearSelection(); + clearSelection(); } } } @@ -157,30 +154,6 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) } -void SELECTION_TOOL::ClearSelection() -{ - if( m_selection.Empty() ) - return; - - KIGFX::VIEW_GROUP::const_iter it, it_end; - - // Restore the initial properties - for( it = m_selection.group->Begin(), it_end = m_selection.group->End(); it != it_end; ++it ) - { - BOARD_ITEM* item = static_cast( *it ); - - item->ViewSetVisible( true ); - item->ClearSelected(); - } - m_selection.clear(); - - getEditFrame()->SetCurItem( NULL ); - - // Do not show the context menu when there is nothing selected - SetContextMenu( &m_menu, CMENU_OFF ); -} - - void SELECTION_TOOL::AddMenuItem( const TOOL_ACTION& aAction ) { assert( aAction.GetId() > 0 ); // Check if the action was registered before in ACTION_MANAGER @@ -198,7 +171,7 @@ void SELECTION_TOOL::toggleSelection( BOARD_ITEM* aItem ) else { if( !m_additive ) - ClearSelection(); + clearSelection(); // Prevent selection of invisible or inactive items if( selectable( aItem ) ) @@ -221,7 +194,7 @@ void SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere ) { case 0: if( !m_additive ) - ClearSelection(); + clearSelection(); break; case 1: @@ -254,43 +227,6 @@ void SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere ) } -BOARD_ITEM* SELECTION_TOOL::pickSmallestComponent( GENERAL_COLLECTOR* aCollector ) -{ - int count = aCollector->GetPrimaryCount(); // try to use preferred layer - - if( 0 == count ) - count = aCollector->GetCount(); - - for( int i = 0; i < count; ++i ) - { - if( ( *aCollector )[i]->Type() != PCB_MODULE_T ) - return NULL; - } - - // All are modules, now find smallest MODULE - int minDim = 0x7FFFFFFF; - int minNdx = 0; - - for( int i = 0; i < count; ++i ) - { - MODULE* module = (MODULE*) ( *aCollector )[i]; - - int lx = module->GetBoundingBox().GetWidth(); - int ly = module->GetBoundingBox().GetHeight(); - - int lmin = std::min( lx, ly ); - - if( lmin < minDim ) - { - minDim = lmin; - minNdx = i; - } - } - - return (*aCollector)[minNdx]; -} - - bool SELECTION_TOOL::selectMultiple() { bool cancelled = false; // Was the tool cancelled while it was running? @@ -311,7 +247,7 @@ bool SELECTION_TOOL::selectMultiple() if( evt->IsDrag( BUT_LEFT ) ) { if( !m_additive ) - ClearSelection(); + clearSelection(); // Start drawing a selection box m_selArea->SetOrigin( evt->DragOrigin() ); @@ -356,6 +292,30 @@ bool SELECTION_TOOL::selectMultiple() } +void SELECTION_TOOL::clearSelection() +{ + if( m_selection.Empty() ) + return; + + KIGFX::VIEW_GROUP::const_iter it, it_end; + + // Restore the initial properties + for( it = m_selection.group->Begin(), it_end = m_selection.group->End(); it != it_end; ++it ) + { + BOARD_ITEM* item = static_cast( *it ); + + item->ViewSetVisible( true ); + item->ClearSelected(); + } + m_selection.clear(); + + getEditFrame()->SetCurItem( NULL ); + + // Do not show the context menu when there is nothing selected + SetContextMenu( &m_menu, CMENU_OFF ); +} + + BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector ) { BOARD_ITEM* current = NULL; @@ -419,6 +379,43 @@ BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector ) } +BOARD_ITEM* SELECTION_TOOL::pickSmallestComponent( GENERAL_COLLECTOR* aCollector ) +{ + int count = aCollector->GetPrimaryCount(); // try to use preferred layer + + if( 0 == count ) + count = aCollector->GetCount(); + + for( int i = 0; i < count; ++i ) + { + if( ( *aCollector )[i]->Type() != PCB_MODULE_T ) + return NULL; + } + + // All are modules, now find smallest MODULE + int minDim = 0x7FFFFFFF; + int minNdx = 0; + + for( int i = 0; i < count; ++i ) + { + MODULE* module = (MODULE*) ( *aCollector )[i]; + + int lx = module->GetBoundingBox().GetWidth(); + int ly = module->GetBoundingBox().GetHeight(); + + int lmin = std::min( lx, ly ); + + if( lmin < minDim ) + { + minDim = lmin; + minNdx = i; + } + } + + return (*aCollector)[minNdx]; +} + + bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) const { // Is high contrast mode enabled? diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index 93b25083c6..4c5e4b2d9a 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -106,12 +106,6 @@ public: return m_selection; } - /** - * Function ClearSelection() - * Clears the current selection. - */ - void ClearSelection(); - /** * Function AddMenuItem() * @@ -138,6 +132,12 @@ private: */ bool selectMultiple(); + /** + * Function ClearSelection() + * Clears the current selection. + */ + void clearSelection(); + /** * Function disambiguationMenu() * Handles the menu that allows to select one of many items in case there is more than one From 8df0f769f7ccbb5a0f5c65c368935a1876e56ecd Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 4 Feb 2014 17:27:00 +0100 Subject: [PATCH 077/741] Added KiCad-style modification methods (hover over an item and press a hot key, without selecting first). Modification point is selected basing on the number of selected items. Rotation angle setting (Preferences->General) is taken into account while rotating. --- pcbnew/tools/edit_tool.cpp | 122 +++++++++++++++++++++++++------- pcbnew/tools/edit_tool.h | 8 +++ pcbnew/tools/selection_tool.cpp | 2 +- 3 files changed, 105 insertions(+), 27 deletions(-) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 008305193d..9d99f3275c 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -49,10 +49,9 @@ EDIT_TOOL::EDIT_TOOL() : bool EDIT_TOOL::Init() { // Find the selection tool, so they can cooperate - TOOL_BASE* selectionTool = m_toolMgr->FindTool( "pcbnew.InteractiveSelection" ); + m_selectionTool = static_cast( m_toolMgr->FindTool( "pcbnew.InteractiveSelection" ) ); - m_selectionTool = static_cast( selectionTool ); - if( !selectionTool ) + if( !m_selectionTool ) { DisplayError( NULL, wxT( "pcbnew.InteractiveSelection tool is not available" ) ); return false; @@ -75,15 +74,15 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); - if( selection.Empty() ) - { - setTransitions(); // this is necessary, so later the tool may - // be activated upon reception of the activation event - return 0; // there are no items to operate on, so we can end now - } + // Shall the selection be cleared at the end? + bool unselect = selection.Empty(); + + // Be sure that there is at least one item that we can modify + if( !makeSelection( selection ) ) + return 0; VECTOR2D dragPosition; // The last position of the cursor while dragging - m_dragging = false; + m_dragging = false; // Are selected items being dragged? bool restore = false; // Should items' state be restored when finishing the tool? // By default, modified items need to update their geometry @@ -173,6 +172,9 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) selection.group->ItemsViewUpdate( m_updateFlag ); } + if( unselect ) + m_toolMgr->RunAction( "pcbnew.InteractiveSelection.Clear" ); + RN_DATA* ratsnest = getModel( PCB_T )->GetRatsnest(); ratsnest->ClearSimple(); ratsnest->Recalculate(); @@ -192,26 +194,32 @@ int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); PCB_EDIT_FRAME* editFrame = static_cast( m_toolMgr->GetEditFrame() ); + // Shall the selection be cleared at the end? + bool unselect = selection.Empty(); + + if( !makeSelection( selection ) ) + return 0; + // Properties are displayed when there is only one item selected if( selection.Size() == 1 ) { // Display properties dialog BOARD_ITEM* item = static_cast( selection.items.GetPickedItem( 0 ) ); - if( !m_dragging ) // If it is being dragged, then it is already saved with UR_CHANGED flag - { - editFrame->SaveCopyInUndoList( item, UR_CHANGED ); - editFrame->OnModify(); - } - + editFrame->SaveCopyInUndoList( item, UR_CHANGED ); + editFrame->OnModify(); editFrame->OnEditItemRequest( NULL, item ); item->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + + updateRatsnest( true ); + getModel( PCB_T )->GetRatsnest()->Recalculate(); + + if( unselect ) + m_toolMgr->RunAction( "pcbnew.InteractiveSelection.Clear" ); } setTransitions(); - updateRatsnest( true ); - getModel( PCB_T )->GetRatsnest()->Recalculate(); return 0; } @@ -220,20 +228,28 @@ int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) int EDIT_TOOL::Rotate( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); - VECTOR2D cursor = getView()->ToWorld( getViewControls()->GetCursorPosition() ); PCB_EDIT_FRAME* editFrame = static_cast( m_toolMgr->GetEditFrame() ); + // Shall the selection be cleared at the end? + bool unselect = selection.Empty(); + + if( !makeSelection( selection ) ) + return 0; + + wxPoint rotatePoint = getModificationPoint( selection ); + if( !m_dragging ) // If it is being dragged, then it is already saved with UR_CHANGED flag { editFrame->OnModify(); - editFrame->SaveCopyInUndoList( selection.items, UR_ROTATED, wxPoint( cursor.x, cursor.y ) ); + editFrame->SaveCopyInUndoList( selection.items, UR_ROTATED, rotatePoint ); } for( unsigned int i = 0; i < selection.items.GetCount(); ++i ) { BOARD_ITEM* item = static_cast( selection.items.GetPickedItem( i ) ); - item->Rotate( wxPoint( cursor.x, cursor.y ), 900.0 ); + item->Rotate( rotatePoint, editFrame->GetRotationAngle() ); + if( !m_dragging ) item->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); } @@ -246,6 +262,9 @@ int EDIT_TOOL::Rotate( TOOL_EVENT& aEvent ) else getModel( PCB_T )->GetRatsnest()->Recalculate(); + if( unselect ) + m_toolMgr->RunAction( "pcbnew.InteractiveSelection.Clear" ); + return 0; } @@ -253,20 +272,28 @@ int EDIT_TOOL::Rotate( TOOL_EVENT& aEvent ) int EDIT_TOOL::Flip( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); - VECTOR2D cursor = getView()->ToWorld( getViewControls()->GetCursorPosition() ); PCB_EDIT_FRAME* editFrame = static_cast( m_toolMgr->GetEditFrame() ); + // Shall the selection be cleared at the end? + bool unselect = selection.Empty(); + + if( !makeSelection( selection ) ) + return 0; + + wxPoint flipPoint = getModificationPoint( selection ); + if( !m_dragging ) // If it is being dragged, then it is already saved with UR_CHANGED flag { editFrame->OnModify(); - editFrame->SaveCopyInUndoList( selection.items, UR_FLIPPED, wxPoint( cursor.x, cursor.y ) ); + editFrame->SaveCopyInUndoList( selection.items, UR_FLIPPED, flipPoint ); } for( unsigned int i = 0; i < selection.items.GetCount(); ++i ) { BOARD_ITEM* item = static_cast( selection.items.GetPickedItem( i ) ); - item->Flip( wxPoint( cursor.x, cursor.y ) ); + item->Flip( flipPoint ); + if( !m_dragging ) item->ViewUpdate( KIGFX::VIEW_ITEM::LAYERS ); } @@ -279,14 +306,22 @@ int EDIT_TOOL::Flip( TOOL_EVENT& aEvent ) else getModel( PCB_T )->GetRatsnest()->Recalculate(); + if( unselect ) + m_toolMgr->RunAction( "pcbnew.InteractiveSelection.Clear" ); + return 0; } int EDIT_TOOL::Remove( TOOL_EVENT& aEvent ) { + const SELECTION_TOOL::SELECTION selection = m_selectionTool->GetSelection(); + + if( !makeSelection( selection ) ) + return 0; + // Get a copy of the selected items set - PICKED_ITEMS_LIST selectedItems = m_selectionTool->GetSelection().items; + PICKED_ITEMS_LIST selectedItems = selection.items; PCB_EDIT_FRAME* editFrame = static_cast( m_toolMgr->GetEditFrame() ); // As we are about to remove items, they have to be removed from the selection first @@ -385,9 +420,44 @@ void EDIT_TOOL::updateRatsnest( bool aRedraw ) { BOARD_ITEM* item = static_cast( selection.items.GetPickedItem( i ) ); - ratsnest->Update( static_cast( item ) ); + ratsnest->Update( item ); if( aRedraw ) ratsnest->AddSimple( item ); } } + + +wxPoint EDIT_TOOL::getModificationPoint( const SELECTION_TOOL::SELECTION& aSelection ) +{ + if( aSelection.Size() == 1 ) + { + return static_cast( aSelection.items.GetPickedItem( 0 ) )->GetPosition(); + } + else + { + VECTOR2I cursor = getView()->ToWorld( getViewControls()->GetCursorPosition() ); + return wxPoint( cursor.x, cursor.y ); + } +} + + +bool EDIT_TOOL::makeSelection( const SELECTION_TOOL::SELECTION& aSelection ) +{ + if( aSelection.Empty() ) + { + // Try to find an item that could be modified + m_toolMgr->RunAction( "pcbnew.InteractiveSelection.Single" ); + + if( aSelection.Empty() ) + { + // This is necessary, so later the tool may be activated upon + // reception of the activation event + setTransitions(); + + return false; // Still no items to work with + } + } + + return true; +} diff --git a/pcbnew/tools/edit_tool.h b/pcbnew/tools/edit_tool.h index 0079d332b3..d31b159aa5 100644 --- a/pcbnew/tools/edit_tool.h +++ b/pcbnew/tools/edit_tool.h @@ -115,6 +115,14 @@ private: } void updateRatsnest( bool aRedraw ); + + ///> Returns the right modification point (e.g. for rotation), depending on the number of + ///> selected items. + wxPoint getModificationPoint( const SELECTION_TOOL::SELECTION& aSelection ); + + ///> If there are no items currently selected, it tries to choose the item that is under + ///> the cursor or displays a disambiguation menu if there are multpile items. + bool makeSelection( const SELECTION_TOOL::SELECTION& aSelection ); }; #endif diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index ce59adbb1f..17fcd05ee7 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -112,12 +112,12 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) selectSingle( evt->Position() ); } + // double click? Display the properties window else if( evt->IsDblClick( BUT_LEFT ) ) { if( m_selection.Empty() ) selectSingle( evt->Position() ); - // Display properties window m_toolMgr->RunAction( "pcbnew.InteractiveEdit.properties" ); } From f92253397882b6eb120f87f5e6db3cf9fd679b09 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 5 Feb 2014 09:05:27 +0100 Subject: [PATCH 078/741] Added possibility for editing pads properties. --- pcbnew/tools/edit_tool.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 9d99f3275c..2fa4108047 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -205,6 +205,21 @@ int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) { // Display properties dialog BOARD_ITEM* item = static_cast( selection.items.GetPickedItem( 0 ) ); + VECTOR2I cursor = getView()->ToWorld( getViewControls()->GetCursorPosition() ); + + // Check if user wants to edit pad or module properties + if( item->Type() == PCB_MODULE_T ) + { + for( D_PAD* pad = static_cast( item )->Pads(); pad; pad = pad->Next() ) + { + if( pad->ViewBBox().Contains( cursor ) ) + { + // Turns out that user wants to edit a pad properties + item = pad; + break; + } + } + } editFrame->SaveCopyInUndoList( item, UR_CHANGED ); editFrame->OnModify(); From a9031edc0ddc53f1eb37028aa9662add4938cc40 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 5 Feb 2014 10:17:14 +0100 Subject: [PATCH 079/741] Grip margin is relative to the world's zoom. --- pcbnew/tools/selection_tool.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 17fcd05ee7..4f2489e81c 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -568,16 +568,15 @@ void SELECTION_TOOL::deselectVisually( BOARD_ITEM* aItem ) const bool SELECTION_TOOL::containsSelected( const VECTOR2I& aPoint ) const { - const unsigned GRIP_MARGIN = 500000; + const unsigned GRIP_MARGIN = 20; + VECTOR2D margin = getView()->ToWorld( VECTOR2D( GRIP_MARGIN, GRIP_MARGIN ), false ); // Check if the point is located within any of the currently selected items bounding boxes - std::set::iterator it, it_end; - for( unsigned int i = 0; i < m_selection.items.GetCount(); ++i ) { BOARD_ITEM* item = static_cast( m_selection.items.GetPickedItem( i ) ); BOX2I itemBox = item->ViewBBox(); - itemBox.Inflate( GRIP_MARGIN ); // Give some margin for gripping an item + itemBox.Inflate( margin.x, margin.y ); // Give some margin for gripping an item if( itemBox.Contains( aPoint ) ) return true; From d7517e472b7e7480b5c8508d1de55db1db0fedc9 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 5 Feb 2014 10:30:50 +0100 Subject: [PATCH 080/741] Some items were still marked as selected after undoing an operation. --- pcbnew/board_undo_redo.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/pcbnew/board_undo_redo.cpp b/pcbnew/board_undo_redo.cpp index 970ea3167d..9931b6c1e6 100644 --- a/pcbnew/board_undo_redo.cpp +++ b/pcbnew/board_undo_redo.cpp @@ -537,6 +537,7 @@ void PCB_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRed } ratsnest->Add( item ); + item->ClearSelected(); // TODO or ClearFlags? item->ViewUpdate( KIGFX::VIEW_ITEM::LAYERS ); } break; From 857956e42e4fd93ab80c5ac113a2a1f50db0f3b6 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 5 Feb 2014 10:47:55 +0100 Subject: [PATCH 081/741] Fixed bug introduced in the last commit. --- pcbnew/board_undo_redo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/board_undo_redo.cpp b/pcbnew/board_undo_redo.cpp index 9931b6c1e6..a5a3ad314e 100644 --- a/pcbnew/board_undo_redo.cpp +++ b/pcbnew/board_undo_redo.cpp @@ -537,7 +537,7 @@ void PCB_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRed } ratsnest->Add( item ); - item->ClearSelected(); // TODO or ClearFlags? + item->ClearFlags( SELECTED ); item->ViewUpdate( KIGFX::VIEW_ITEM::LAYERS ); } break; From 17c030aa98033b549b57ad5940ccc3996cc42dc2 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 5 Feb 2014 11:08:34 +0100 Subject: [PATCH 082/741] Fixed removal of items in the KiCad-default style. --- pcbnew/tools/edit_tool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 2fa4108047..f5f1c3b0ff 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -330,7 +330,7 @@ int EDIT_TOOL::Flip( TOOL_EVENT& aEvent ) int EDIT_TOOL::Remove( TOOL_EVENT& aEvent ) { - const SELECTION_TOOL::SELECTION selection = m_selectionTool->GetSelection(); + const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); if( !makeSelection( selection ) ) return 0; From 3a15f5ad289ca1ce57a6a0c3781b5b2adfef062e Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 5 Feb 2014 11:33:45 +0100 Subject: [PATCH 083/741] Initialized value to suppress Valgrind warnings. --- pcbnew/tools/selection_tool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 4f2489e81c..366c81659a 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -50,7 +50,7 @@ using boost::optional; SELECTION_TOOL::SELECTION_TOOL() : - TOOL_INTERACTIVE( "pcbnew.InteractiveSelection" ), m_multiple( false ) + TOOL_INTERACTIVE( "pcbnew.InteractiveSelection" ), m_additive( false ), m_multiple( false ) { m_selArea = new SELECTION_AREA; m_selection.group = new KIGFX::VIEW_GROUP; From 1d4c6ad40e1907c039932cc9fe33aba00caf3bad Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 5 Feb 2014 14:51:19 +0100 Subject: [PATCH 084/741] Minor optimizations. --- common/geometry/hetriang.cpp | 74 +++++++++++++++--------------------- 1 file changed, 31 insertions(+), 43 deletions(-) diff --git a/common/geometry/hetriang.cpp b/common/geometry/hetriang.cpp index 175e80dbd5..b69255cdbf 100644 --- a/common/geometry/hetriang.cpp +++ b/common/geometry/hetriang.cpp @@ -223,8 +223,8 @@ void Triangulation::removeTriangle(EdgePtr& edge) { removeLeadingEdgeFromList(e1); // cout << "No leading edges = " << leadingEdges_.size() << endl; // Remove the triangle - EdgePtr e2 = e1->getNextEdgeInFace(); - EdgePtr e3 = e2->getNextEdgeInFace(); + EdgePtr e2(e1->getNextEdgeInFace()); + EdgePtr e3(e2->getNextEdgeInFace()); if (e1->getTwinEdge()) e1->getTwinEdge()->setTwinEdge(EdgePtr()); @@ -240,15 +240,15 @@ void Triangulation::reverse_splitTriangle(EdgePtr& edge) { // Reverse operation of splitTriangle - EdgePtr e1 = edge->getNextEdgeInFace(); - EdgePtr le = getLeadingEdgeInTriangle(e1); + EdgePtr e1(edge->getNextEdgeInFace()); + EdgePtr le(getLeadingEdgeInTriangle(e1)); #ifdef DEBUG_HE if (!le) errorAndExit("Triangulation::removeTriangle: could not find leading edge"); #endif removeLeadingEdgeFromList(le); - EdgePtr e2 = e1->getNextEdgeInFace()->getTwinEdge()->getNextEdgeInFace(); + EdgePtr e2(e1->getNextEdgeInFace()->getTwinEdge()->getNextEdgeInFace()); le = getLeadingEdgeInTriangle(e2); #ifdef DEBUG_HE if (!le) @@ -256,7 +256,7 @@ void Triangulation::reverse_splitTriangle(EdgePtr& edge) { #endif removeLeadingEdgeFromList(le); - EdgePtr e3 = edge->getTwinEdge()->getNextEdgeInFace()->getNextEdgeInFace(); + EdgePtr e3(edge->getTwinEdge()->getNextEdgeInFace()->getNextEdgeInFace()); le = getLeadingEdgeInTriangle(e3); #ifdef DEBUG_HE if (!le) @@ -322,14 +322,11 @@ bool Triangulation::removeLeadingEdgeFromList(EdgePtr& leadingEdge) { edge->setAsLeadingEdge(false); it = leadingEdges_.erase(it); - break; + return true; } } - if (it == leadingEdges_.end()) - return false; - - return true; + return false; } @@ -451,14 +448,14 @@ EdgePtr Triangulation::splitTriangle(EdgePtr& edge, NodePtr& point) { // Add the node to the structure //NodePtr new_node(new Node(x,y,z)); - NodePtr n1 = edge->getSourceNode(); - EdgePtr e1 = edge; + NodePtr n1(edge->getSourceNode()); + EdgePtr e1(edge); - EdgePtr e2 = edge->getNextEdgeInFace(); - NodePtr n2 = e2->getSourceNode(); + EdgePtr e2(edge->getNextEdgeInFace()); + NodePtr n2(e2->getSourceNode()); - EdgePtr e3 = e2->getNextEdgeInFace(); - NodePtr n3 = e3->getSourceNode(); + EdgePtr e3(e2->getNextEdgeInFace()); + NodePtr n3(e3->getSourceNode()); EdgePtr e1_n(new Edge); EdgePtr e11_n(new Edge); @@ -489,7 +486,6 @@ EdgePtr Triangulation::splitTriangle(EdgePtr& edge, NodePtr& point) { e22_n->setNextEdgeInFace(e2); e33_n->setNextEdgeInFace(e3); - // and update old's next edge e1->setNextEdgeInFace(e2_n); e2->setNextEdgeInFace(e3_n); @@ -500,19 +496,15 @@ EdgePtr Triangulation::splitTriangle(EdgePtr& edge, NodePtr& point) { // Use the field telling if an edge is a leading edge // NOTE: Must search in the list!!! - - EdgePtr leadingEdge; if (e1->isLeadingEdge()) - leadingEdge = e1; + removeLeadingEdgeFromList(e1); else if (e2->isLeadingEdge()) - leadingEdge = e2; + removeLeadingEdgeFromList(e2); else if(e3->isLeadingEdge()) - leadingEdge = e3; + removeLeadingEdgeFromList(e3); else return EdgePtr(); - removeLeadingEdgeFromList(leadingEdge); - addLeadingEdge(e1_n); addLeadingEdge(e2_n); addLeadingEdge(e3_n); @@ -532,16 +524,16 @@ void Triangulation::swapEdge(EdgePtr& diagonal) { // Swap by rotating counterclockwise // Use the same objects - no deletion or new objects - EdgePtr eL = diagonal; - EdgePtr eR = eL->getTwinEdge(); - EdgePtr eL_1 = eL->getNextEdgeInFace(); - EdgePtr eL_2 = eL_1->getNextEdgeInFace(); - EdgePtr eR_1 = eR->getNextEdgeInFace(); - EdgePtr eR_2 = eR_1->getNextEdgeInFace(); + EdgePtr eL(diagonal); + EdgePtr eR(eL->getTwinEdge()); + EdgePtr eL_1(eL->getNextEdgeInFace()); + EdgePtr eL_2(eL_1->getNextEdgeInFace()); + EdgePtr eR_1(eR->getNextEdgeInFace()); + EdgePtr eR_2(eR_1->getNextEdgeInFace()); // avoid node to be dereferenced to zero and deleted - NodePtr nR = eR_2->getSourceNode(); - NodePtr nL = eL_2->getSourceNode(); + NodePtr nR(eR_2->getSourceNode()); + NodePtr nL(eL_2->getSourceNode()); eL->setSourceNode(nR); eR->setSourceNode(nL); @@ -555,24 +547,20 @@ void Triangulation::swapEdge(EdgePtr& diagonal) { eR_2->setNextEdgeInFace(eL_1); eL_1->setNextEdgeInFace(eR); - EdgePtr leL; if (eL->isLeadingEdge()) - leL = eL; + removeLeadingEdgeFromList(eL); else if (eL_1->isLeadingEdge()) - leL = eL_1; + removeLeadingEdgeFromList(eL_1); else if (eL_2->isLeadingEdge()) - leL = eL_2; + removeLeadingEdgeFromList(eL_2); - EdgePtr leR; if (eR->isLeadingEdge()) - leR = eR; + removeLeadingEdgeFromList(eR); else if (eR_1->isLeadingEdge()) - leR = eR_1; + removeLeadingEdgeFromList(eR_1); else if (eR_2->isLeadingEdge()) - leR = eR_2; + removeLeadingEdgeFromList(eR_2); - removeLeadingEdgeFromList(leL); - removeLeadingEdgeFromList(leR); addLeadingEdge(eL); addLeadingEdge(eR); } From 81f84748b3c79d7e6fc21b6aa9e9e1ea5fc102d8 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 6 Feb 2014 10:43:19 +0100 Subject: [PATCH 085/741] Modifiers (Shift/Ctrl/Alt) are set also while moving the mouse cursor. --- common/tool/tool_dispatcher.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index 49ab4382ac..916730d042 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -208,6 +208,9 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) // but changes in world coordinates (eg. autopanning) type == KIGFX::WX_VIEW_CONTROLS::EVT_REFRESH_MOUSE ) { + wxMouseEvent* me = static_cast( &aEvent ); + int mods = decodeModifiers( me ); + VECTOR2D screenPos = m_toolMgr->GetViewControls()->GetCursorPosition(); VECTOR2D pos = getView()->ToWorld( screenPos ); @@ -222,7 +225,7 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) if( !buttonEvents && motion ) { - evt = TOOL_EVENT( TC_MOUSE, TA_MOUSE_MOTION ); + evt = TOOL_EVENT( TC_MOUSE, TA_MOUSE_MOTION, mods ); evt->SetMousePosition( pos ); } } From b9df36eca58331ca17fda2c0389716f6026bf457 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 6 Feb 2014 12:38:06 +0100 Subject: [PATCH 086/741] GAL::GetGridPoint() takes a const reference. --- common/gal/graphics_abstraction_layer.cpp | 2 +- include/gal/graphics_abstraction_layer.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/gal/graphics_abstraction_layer.cpp b/common/gal/graphics_abstraction_layer.cpp index 6fa929b062..2a3d9a089c 100644 --- a/common/gal/graphics_abstraction_layer.cpp +++ b/common/gal/graphics_abstraction_layer.cpp @@ -232,7 +232,7 @@ void GAL::DrawGrid() } -VECTOR2D GAL::GetGridPoint( VECTOR2D aPoint ) const +VECTOR2D GAL::GetGridPoint( const VECTOR2D& aPoint ) const { VECTOR2D pointWorld = ToWorld( aPoint ); diff --git a/include/gal/graphics_abstraction_layer.h b/include/gal/graphics_abstraction_layer.h index 7745dfa172..118faf38ac 100644 --- a/include/gal/graphics_abstraction_layer.h +++ b/include/gal/graphics_abstraction_layer.h @@ -720,7 +720,7 @@ public: * @param aPoint is the point for which the grid point is searched. * @return The nearest grid point. */ - VECTOR2D GetGridPoint( VECTOR2D aPoint ) const; + VECTOR2D GetGridPoint( const VECTOR2D& aPoint ) const; /** From 8944e924560d2e3882f7909cc93b1d038208bc0d Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 6 Feb 2014 12:38:47 +0100 Subject: [PATCH 087/741] Fixed included headers. --- include/class_board_item.h | 1 - pcbnew/class_drawsegment.h | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/include/class_board_item.h b/include/class_board_item.h index 6f6bf201d6..a2f032b877 100644 --- a/include/class_board_item.h +++ b/include/class_board_item.h @@ -34,7 +34,6 @@ #include #include #include -#include #include /// Abbrevation for fomatting internal units to a string. diff --git a/pcbnew/class_drawsegment.h b/pcbnew/class_drawsegment.h index dacd8061d2..cc8f5ff80e 100644 --- a/pcbnew/class_drawsegment.h +++ b/pcbnew/class_drawsegment.h @@ -30,7 +30,7 @@ #ifndef CLASS_DRAWSEGMENT_H_ #define CLASS_DRAWSEGMENT_H_ - +#include #include #include #include From 363709e7a930ba925df26964da5a50586e3de6b2 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 6 Feb 2014 14:45:33 +0100 Subject: [PATCH 088/741] Added TOOL_INTERACTIVE::Activate(). Removed an unnecessary header from class_board_item.h. --- common/tool/tool_interactive.cpp | 6 ++++++ include/class_board_item.h | 1 - include/tool/tool_interactive.h | 6 ++++++ pcbnew/ratsnest_data.cpp | 4 ++-- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/common/tool/tool_interactive.cpp b/common/tool/tool_interactive.cpp index 33756cf3d8..14ea61a86a 100644 --- a/common/tool/tool_interactive.cpp +++ b/common/tool/tool_interactive.cpp @@ -46,6 +46,12 @@ TOOL_INTERACTIVE::~TOOL_INTERACTIVE() } +void TOOL_INTERACTIVE::Activate() +{ + m_toolMgr->InvokeTool( m_toolId ); +} + + OPT_TOOL_EVENT TOOL_INTERACTIVE::Wait( const TOOL_EVENT_LIST& aEventList ) { return m_toolMgr->ScheduleWait( this, aEventList ); diff --git a/include/class_board_item.h b/include/class_board_item.h index 8a49d87b0c..d438483502 100644 --- a/include/class_board_item.h +++ b/include/class_board_item.h @@ -33,7 +33,6 @@ #include #include -#include #include /// Abbrevation for fomatting internal units to a string. diff --git a/include/tool/tool_interactive.h b/include/tool/tool_interactive.h index 7e816bd3a4..1888011b5f 100644 --- a/include/tool/tool_interactive.h +++ b/include/tool/tool_interactive.h @@ -48,6 +48,12 @@ public: TOOL_INTERACTIVE( const std::string& aName ); virtual ~TOOL_INTERACTIVE(); + /** + * Function Activate() + * Runs the tool. After activation, the tool starts receiving events until it is finished. + */ + void Activate(); + /** * Function SetContextMenu() * diff --git a/pcbnew/ratsnest_data.cpp b/pcbnew/ratsnest_data.cpp index 430674887c..80d082a9b3 100644 --- a/pcbnew/ratsnest_data.cpp +++ b/pcbnew/ratsnest_data.cpp @@ -968,11 +968,11 @@ void RN_DATA::Recalculate( int aNet ) { if( aNet < 0 ) // Recompute everything { - unsigned int tid, i, chunk, netCount; + unsigned int i, netCount; netCount = m_board->GetNetCount(); - chunk = 1; #ifdef USE_OPENMP + unsigned int chunk = 1, tid; #pragma omp parallel shared(chunk, netCount) private(i, tid) { tid = omp_get_thread_num(); From b21ce73c371d1e61e1817a1962e56ef530c824f5 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 6 Feb 2014 15:09:38 +0100 Subject: [PATCH 089/741] Initial version of the drawing tool. --- pcbnew/CMakeLists.txt | 1 + pcbnew/tools/common_actions.cpp | 4 ++++ pcbnew/tools/common_actions.h | 3 +++ pcbnew/tools/edit_tool.h | 3 +++ pcbnew/tools/pcb_tools.cpp | 3 +++ 5 files changed, 14 insertions(+) diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 8d7a842f55..e697375ec2 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -251,6 +251,7 @@ set( PCBNEW_CLASS_SRCS tools/selection_tool.cpp tools/selection_area.cpp tools/bright_box.cpp + tools/drawing_tool.cpp tools/edit_tool.cpp tools/pcb_tools.cpp tools/common_actions.cpp diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index f1fb3befd6..464a8ab505 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -56,3 +56,7 @@ TOOL_ACTION COMMON_ACTIONS::remove( "pcbnew.InteractiveEdit.remove", TOOL_ACTION COMMON_ACTIONS::properties( "pcbnew.InteractiveEdit.properties", AS_GLOBAL, 'E', "Properties...", "Displays properties window" ); + +TOOL_ACTION COMMON_ACTIONS::drawingLine( "pcbnew.InteractiveDrawing.line", + AS_GLOBAL, 'D', + "Draw a line", "Draw a line" ); diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index 86aafe5894..42a03b3cb3 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -56,4 +56,7 @@ public: /// Deleting a BOARD_ITEM static TOOL_ACTION remove; + + /// Activation of the drawing tool (line) + static TOOL_ACTION drawingLine; }; diff --git a/pcbnew/tools/edit_tool.h b/pcbnew/tools/edit_tool.h index d31b159aa5..49fbe48450 100644 --- a/pcbnew/tools/edit_tool.h +++ b/pcbnew/tools/edit_tool.h @@ -114,6 +114,9 @@ private: m_updateFlag = aFlag; } + ///> Updates ratsnest for selected items. + ///> @param aRedraw says if selected items should be drawn using the simple mode (e.g. one line + ///> per item). void updateRatsnest( bool aRedraw ); ///> Returns the right modification point (e.g. for rotation), depending on the number of diff --git a/pcbnew/tools/pcb_tools.cpp b/pcbnew/tools/pcb_tools.cpp index a4b4f21a24..63c98d5009 100644 --- a/pcbnew/tools/pcb_tools.cpp +++ b/pcbnew/tools/pcb_tools.cpp @@ -36,6 +36,7 @@ #include "selection_tool.h" #include "edit_tool.h" +#include "drawing_tool.h" #include "common_actions.h" #include @@ -54,11 +55,13 @@ void PCB_EDIT_FRAME::setupTools() m_toolManager->RegisterAction( &COMMON_ACTIONS::flip ); m_toolManager->RegisterAction( &COMMON_ACTIONS::remove ); m_toolManager->RegisterAction( &COMMON_ACTIONS::properties ); + m_toolManager->RegisterAction( &COMMON_ACTIONS::drawingLine ); // Register tools m_toolManager->RegisterTool( new SELECTION_TOOL ); m_toolManager->RegisterTool( new ROUTER_TOOL ); m_toolManager->RegisterTool( new EDIT_TOOL ); + m_toolManager->RegisterTool( new DRAWING_TOOL ); m_toolManager->SetEnvironment( NULL, GetGalCanvas()->GetView(), GetGalCanvas()->GetViewControls(), this ); From 45f55fb8c5b7fa592327ab9b1d8b8fa05c24889e Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 6 Feb 2014 17:12:37 +0100 Subject: [PATCH 090/741] Actually added files for drawing tools. Added possibility of drawing circles. --- pcbnew/tools/common_actions.cpp | 6 +- pcbnew/tools/common_actions.h | 5 +- pcbnew/tools/drawing_tool.cpp | 196 ++++++++++++++++++++++++++++++++ pcbnew/tools/drawing_tool.h | 72 ++++++++++++ pcbnew/tools/pcb_tools.cpp | 3 +- 5 files changed, 279 insertions(+), 3 deletions(-) create mode 100644 pcbnew/tools/drawing_tool.cpp create mode 100644 pcbnew/tools/drawing_tool.h diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 464a8ab505..22b0c10e2f 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -57,6 +57,10 @@ TOOL_ACTION COMMON_ACTIONS::properties( "pcbnew.InteractiveEdit.properties", AS_GLOBAL, 'E', "Properties...", "Displays properties window" ); -TOOL_ACTION COMMON_ACTIONS::drawingLine( "pcbnew.InteractiveDrawing.line", +TOOL_ACTION COMMON_ACTIONS::drawLine( "pcbnew.InteractiveDrawing.line", AS_GLOBAL, 'D', "Draw a line", "Draw a line" ); + +TOOL_ACTION COMMON_ACTIONS::drawCircle( "pcbnew.InteractiveDrawing.circle", + AS_GLOBAL, 'S', + "Draw a circle", "Draw a circle" ); diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index 42a03b3cb3..d573a8a96c 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -58,5 +58,8 @@ public: static TOOL_ACTION remove; /// Activation of the drawing tool (line) - static TOOL_ACTION drawingLine; + static TOOL_ACTION drawLine; + + /// Activation of the drawing tool (circle) + static TOOL_ACTION drawCircle; }; diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp new file mode 100644 index 0000000000..8f03336bdc --- /dev/null +++ b/pcbnew/tools/drawing_tool.cpp @@ -0,0 +1,196 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 CERN + * @author Maciej Suminski + * + * 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 "drawing_tool.h" +#include "common_actions.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +DRAWING_TOOL::DRAWING_TOOL() : + TOOL_INTERACTIVE( "pcbnew.InteractiveDrawing" ) +{ +} + + +DRAWING_TOOL::~DRAWING_TOOL() +{ +} + + +void DRAWING_TOOL::Reset( RESET_REASON aReason ) +{ + setTransitions(); +} + + +int DRAWING_TOOL::DrawLine( TOOL_EVENT& aEvent ) +{ + m_continous = true; + + return draw( S_SEGMENT ); +} + + +int DRAWING_TOOL::DrawCircle( TOOL_EVENT& aEvent ) +{ + m_continous = false; + + return draw( S_CIRCLE ); +} + + +int DRAWING_TOOL::draw( STROKE_T aShape ) +{ + bool started = false; + KIGFX::VIEW* view = getView(); + KIGFX::VIEW_CONTROLS* controls = getViewControls(); + BOARD* board = getModel( PCB_T ); + DRAWSEGMENT graphic; + + // Init the new item attributes + graphic.SetShape( aShape ); + graphic.SetWidth( board->GetDesignSettings().m_DrawSegmentWidth ); + + // Add a VIEW_GROUP that serves as a preview for the new item + KIGFX::VIEW_GROUP preview( view ); + view->Add( &preview ); + + controls->ShowCursor( true ); + controls->SetSnapping( true ); + + Activate(); + + // Main loop: keep receiving events + while( OPT_TOOL_EVENT evt = Wait() ) + { + // Enable 45 degrees lines only mode by holding shift + bool linesAngle45 = evt->Modifier( MD_SHIFT ); + VECTOR2D cursorPos = view->ToWorld( controls->GetCursorPosition() ); + + if( evt->IsCancel() ) + break; + + else if( evt->IsKeyUp() ) + { + int width = graphic.GetWidth(); + + // Modify the new item width + if( evt->KeyCode() == '-' && width > WIDTH_STEP ) + graphic.SetWidth( width - WIDTH_STEP ); + else if( evt->KeyCode() == '=' ) + graphic.SetWidth( width + WIDTH_STEP ); + + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + + else if( evt->IsClick( BUT_LEFT ) ) + { + if( !started ) + { + LAYER_NUM layer = getEditFrame()->GetScreen()->m_Active_Layer; + + if( IsCopperLayer( layer ) ) + { + DisplayInfoMessage( NULL, _( "Graphic not allowed on Copper layers" ) ); + } + else + { + controls->SetAutoPan( true ); + + graphic.SetStart( wxPoint( cursorPos.x, cursorPos.y ) ); + graphic.SetLayer( layer ); + preview.Add( &graphic ); + + started = true; + } + } + else + { + if( wxPoint( cursorPos.x, cursorPos.y ) != graphic.GetStart() ) + { + DRAWSEGMENT* newItem = new DRAWSEGMENT( graphic ); + view->Add( newItem ); + getModel( PCB_T )->Add( newItem ); + newItem->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + + if( m_continous ) + graphic.SetStart( graphic.GetEnd() ); // This is the origin point for a new item + else + break; + } + else // User has clicked twice in the same spot + break; // seems like a clear sign that the drawing is finished + } + } + + else if( evt->IsMotion() && started ) + { + // 45 degree lines + if( linesAngle45 && aShape == S_SEGMENT ) + { + VECTOR2D lineVector( wxPoint( cursorPos.x, cursorPos.y ) - graphic.GetStart() ); + double angle = atan2( lineVector.y, lineVector.x ); + + double newAngle = round( angle / ( M_PI / 4.0 ) ) * M_PI / 4.0; + VECTOR2D newLineVector = lineVector.Rotate( newAngle - angle ); + + // Snap the new line to the grid // TODO fix it, does not work good.. + VECTOR2D newLineEnd = VECTOR2D( graphic.GetStart() ) + newLineVector; + VECTOR2D snapped = view->GetGAL()->GetGridPoint( newLineEnd ); + + graphic.SetEnd( wxPoint( snapped.x, snapped.y ) ); + } + else + { + graphic.SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); + } + + // Show a preview of the item + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + } + + controls->ShowCursor( false ); + controls->SetSnapping( false ); + controls->SetAutoPan( false ); + view->Remove( &preview ); + + setTransitions(); + + return 0; +} + + +void DRAWING_TOOL::setTransitions() +{ + Go( &DRAWING_TOOL::DrawLine, COMMON_ACTIONS::drawLine.MakeEvent() ); + Go( &DRAWING_TOOL::DrawCircle, COMMON_ACTIONS::drawCircle.MakeEvent() ); +} diff --git a/pcbnew/tools/drawing_tool.h b/pcbnew/tools/drawing_tool.h new file mode 100644 index 0000000000..4cef5744cd --- /dev/null +++ b/pcbnew/tools/drawing_tool.h @@ -0,0 +1,72 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 CERN + * @author Maciej Suminski + * + * 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 __DRAWING_TOOL_H +#define __DRAWING_TOOL_H + +#include +#include + +/** + * Class DRAWING_TOOL + * + * Tool responsible for drawing graphical elements like lines, arcs, circles, etc. + */ + +class DRAWING_TOOL : public TOOL_INTERACTIVE +{ +public: + DRAWING_TOOL(); + ~DRAWING_TOOL(); + + /// @copydoc TOOL_INTERACTIVE::Reset() + void Reset( RESET_REASON aReason ); + + /** + * Function DrawLine() + * Starts interactively drawing a line. After invoking the function it expects the user + * to click at least twice to determine the origin and the end for a line. If there are + * more clicks, the line is drawn as a continous polyline. + */ + int DrawLine( TOOL_EVENT& aEvent ); + + int DrawCircle( TOOL_EVENT& aEvent ); + + int DrawArc( TOOL_EVENT& aEvent ); + +private: + ///> Starts drawing a selected shape. + int draw( STROKE_T aShape ); + + ///> Sets up handlers for various events. + void setTransitions(); + + ///> Should drawing be stopped after drawing one object or should it continue with another one. + bool m_continous; + + // How does line width change after one -/+ key press. + static const int WIDTH_STEP = 100000; +}; + +#endif /* __DRAWING_TOOL_H */ diff --git a/pcbnew/tools/pcb_tools.cpp b/pcbnew/tools/pcb_tools.cpp index 63c98d5009..5dff5788a9 100644 --- a/pcbnew/tools/pcb_tools.cpp +++ b/pcbnew/tools/pcb_tools.cpp @@ -55,7 +55,8 @@ void PCB_EDIT_FRAME::setupTools() m_toolManager->RegisterAction( &COMMON_ACTIONS::flip ); m_toolManager->RegisterAction( &COMMON_ACTIONS::remove ); m_toolManager->RegisterAction( &COMMON_ACTIONS::properties ); - m_toolManager->RegisterAction( &COMMON_ACTIONS::drawingLine ); + m_toolManager->RegisterAction( &COMMON_ACTIONS::drawLine ); + m_toolManager->RegisterAction( &COMMON_ACTIONS::drawCircle ); // Register tools m_toolManager->RegisterTool( new SELECTION_TOOL ); From 0f026bbe1dcc2e0228411646038eeebcb9952af9 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 6 Feb 2014 17:29:13 +0100 Subject: [PATCH 091/741] Fixed snapping item in a wrong spot bug. --- common/view/wx_view_controls.cpp | 2 +- include/view/view_controls.h | 2 +- include/view/wx_view_controls.h | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/common/view/wx_view_controls.cpp b/common/view/wx_view_controls.cpp index f9a17fa86a..48107911d2 100644 --- a/common/view/wx_view_controls.cpp +++ b/common/view/wx_view_controls.cpp @@ -229,7 +229,7 @@ void WX_VIEW_CONTROLS::onTimer( wxTimerEvent& aEvent ) void WX_VIEW_CONTROLS::SetGrabMouse( bool aEnabled ) { - m_grabMouse = aEnabled; + VIEW_CONTROLS::SetGrabMouse( aEnabled ); if( aEnabled ) m_parentPanel->CaptureMouse(); diff --git a/include/view/view_controls.h b/include/view/view_controls.h index a51048dca3..5ec1a037a4 100644 --- a/include/view/view_controls.h +++ b/include/view/view_controls.h @@ -60,7 +60,7 @@ public: * * @param aEnabled says whether the opion should be enabled or disabled. */ - void SetSnapping( bool aEnabled ) + virtual void SetSnapping( bool aEnabled ) { m_snappingEnabled = aEnabled; } diff --git a/include/view/wx_view_controls.h b/include/view/wx_view_controls.h index 5df48f3de3..41540e951b 100644 --- a/include/view/wx_view_controls.h +++ b/include/view/wx_view_controls.h @@ -58,6 +58,13 @@ public: void onEnter( wxMouseEvent& WXUNUSED( aEvent ) ); void onTimer( wxTimerEvent& WXUNUSED( aEvent ) ); + ///> @copydoc VIEW_CONTROLS::SetSnapping() + void SetSnapping( bool aEnabled ) + { + VIEW_CONTROLS::SetSnapping( aEnabled ); + updateCursor(); + } + /** * Function SetGrabMouse() * Enables/disables mouse cursor grabbing (limits the movement field only to the panel area). From 0dadf3bc7c2be8cc4c77b88be7ba79dbfc64e603 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 7 Feb 2014 19:51:04 +0100 Subject: [PATCH 092/741] Corrected bounding box for arcs (DRAWSEGMENT). --- pcbnew/class_drawsegment.cpp | 56 +++++++++++++++++++++++++++++++++++- pcbnew/class_drawsegment.h | 5 ++-- 2 files changed, 57 insertions(+), 4 deletions(-) diff --git a/pcbnew/class_drawsegment.cpp b/pcbnew/class_drawsegment.cpp index 4f2376de74..d1e9799258 100644 --- a/pcbnew/class_drawsegment.cpp +++ b/pcbnew/class_drawsegment.cpp @@ -134,7 +134,7 @@ const wxPoint DRAWSEGMENT::GetArcEnd() const return endPoint; // after rotation, the end of the arc. } -const double DRAWSEGMENT::GetArcAngleStart() const +double DRAWSEGMENT::GetArcAngleStart() const { // due to the Y axis orient atan2 needs - y value double angleStart = ArcTangente( GetArcStart().y - GetCenter().y, @@ -148,6 +148,7 @@ const double DRAWSEGMENT::GetArcAngleStart() const return angleStart; } + void DRAWSEGMENT::SetAngle( double aAngle ) { NORMALIZE_ANGLE_360( aAngle ); @@ -379,6 +380,59 @@ const EDA_RECT DRAWSEGMENT::GetBoundingBox() const wxPoint end = m_End; RotatePoint( &end, m_Start, -m_Angle ); bbox.Merge( end ); + + // Determine the starting quarter + // 0 right-bottom + // 1 left-bottom + // 2 left-top + // 3 right-top + unsigned int quarter = 0; // assume right-bottom + + if( m_End.y < m_Start.y ) // change to left-top + quarter |= 3; + + if( m_End.x < m_Start.x ) // for left side, the LSB is 2nd bit negated + quarter ^= 1; + + int radius = GetRadius(); + int angle = (int) GetArcAngleStart() % 900 + m_Angle; + bool directionCW = ( m_Angle > 0 ); // Is the direction of arc clockwise? + + if( !directionCW ) + { + angle = 900 - angle; + quarter = ( quarter + 3 ) % 4; // -1 modulo arithmetic + } + + while( angle > 900 ) + { + switch( quarter ) + { + case 0: + bbox.Merge( wxPoint( m_Start.x, m_Start.y + radius ) ); // down + break; + + case 1: + bbox.Merge( wxPoint( m_Start.x - radius, m_Start.y ) ); // left + break; + + case 2: + bbox.Merge( wxPoint( m_Start.x, m_Start.y - radius ) ); // up + break; + + case 3: + bbox.Merge( wxPoint( m_Start.x + radius, m_Start.y ) ); // right + break; + } + + if( directionCW ) + ++quarter; + else + quarter += 3; // -1 modulo arithmetic + + quarter %= 4; + angle -= 900; + } } break; diff --git a/pcbnew/class_drawsegment.h b/pcbnew/class_drawsegment.h index cc8f5ff80e..635a3235d7 100644 --- a/pcbnew/class_drawsegment.h +++ b/pcbnew/class_drawsegment.h @@ -30,7 +30,6 @@ #ifndef CLASS_DRAWSEGMENT_H_ #define CLASS_DRAWSEGMENT_H_ -#include #include #include #include @@ -126,9 +125,9 @@ public: /** * function GetArcAngleStart() - * @return the angle of the stating point of this arc, between 0 and 3600 in 0.1 deg + * @return the angle of the starting point of this arc, between 0 and 3600 in 0.1 deg */ - const double GetArcAngleStart() const; + double GetArcAngleStart() const; /** * Function GetRadius From 63e4defd2aca736ab8bb9d265cdce4b185472d39 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 7 Feb 2014 19:55:40 +0100 Subject: [PATCH 093/741] Corrected bounding box for arcs (DRAWSEGMENT). --- pcbnew/class_drawsegment.cpp | 56 +++++++++++++++++++++++++++++++++++- pcbnew/class_drawsegment.h | 5 ++-- 2 files changed, 57 insertions(+), 4 deletions(-) diff --git a/pcbnew/class_drawsegment.cpp b/pcbnew/class_drawsegment.cpp index 4f2376de74..d1e9799258 100644 --- a/pcbnew/class_drawsegment.cpp +++ b/pcbnew/class_drawsegment.cpp @@ -134,7 +134,7 @@ const wxPoint DRAWSEGMENT::GetArcEnd() const return endPoint; // after rotation, the end of the arc. } -const double DRAWSEGMENT::GetArcAngleStart() const +double DRAWSEGMENT::GetArcAngleStart() const { // due to the Y axis orient atan2 needs - y value double angleStart = ArcTangente( GetArcStart().y - GetCenter().y, @@ -148,6 +148,7 @@ const double DRAWSEGMENT::GetArcAngleStart() const return angleStart; } + void DRAWSEGMENT::SetAngle( double aAngle ) { NORMALIZE_ANGLE_360( aAngle ); @@ -379,6 +380,59 @@ const EDA_RECT DRAWSEGMENT::GetBoundingBox() const wxPoint end = m_End; RotatePoint( &end, m_Start, -m_Angle ); bbox.Merge( end ); + + // Determine the starting quarter + // 0 right-bottom + // 1 left-bottom + // 2 left-top + // 3 right-top + unsigned int quarter = 0; // assume right-bottom + + if( m_End.y < m_Start.y ) // change to left-top + quarter |= 3; + + if( m_End.x < m_Start.x ) // for left side, the LSB is 2nd bit negated + quarter ^= 1; + + int radius = GetRadius(); + int angle = (int) GetArcAngleStart() % 900 + m_Angle; + bool directionCW = ( m_Angle > 0 ); // Is the direction of arc clockwise? + + if( !directionCW ) + { + angle = 900 - angle; + quarter = ( quarter + 3 ) % 4; // -1 modulo arithmetic + } + + while( angle > 900 ) + { + switch( quarter ) + { + case 0: + bbox.Merge( wxPoint( m_Start.x, m_Start.y + radius ) ); // down + break; + + case 1: + bbox.Merge( wxPoint( m_Start.x - radius, m_Start.y ) ); // left + break; + + case 2: + bbox.Merge( wxPoint( m_Start.x, m_Start.y - radius ) ); // up + break; + + case 3: + bbox.Merge( wxPoint( m_Start.x + radius, m_Start.y ) ); // right + break; + } + + if( directionCW ) + ++quarter; + else + quarter += 3; // -1 modulo arithmetic + + quarter %= 4; + angle -= 900; + } } break; diff --git a/pcbnew/class_drawsegment.h b/pcbnew/class_drawsegment.h index dacd8061d2..635a3235d7 100644 --- a/pcbnew/class_drawsegment.h +++ b/pcbnew/class_drawsegment.h @@ -30,7 +30,6 @@ #ifndef CLASS_DRAWSEGMENT_H_ #define CLASS_DRAWSEGMENT_H_ - #include #include #include @@ -126,9 +125,9 @@ public: /** * function GetArcAngleStart() - * @return the angle of the stating point of this arc, between 0 and 3600 in 0.1 deg + * @return the angle of the starting point of this arc, between 0 and 3600 in 0.1 deg */ - const double GetArcAngleStart() const; + double GetArcAngleStart() const; /** * Function GetRadius From 9ef713dfa87201bcdf87cbe0fa9549db5e2c9507 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 7 Feb 2014 20:44:34 +0100 Subject: [PATCH 094/741] Right click on an item when there is nothing selected - enables the context menu. --- pcbnew/tools/selection_tool.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 366c81659a..2a4f167671 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -112,6 +112,16 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) selectSingle( evt->Position() ); } + // right click? if there is any object - show the context menu + else if( evt->IsClick( BUT_RIGHT ) ) + { + if( m_selection.Empty() ) + selectSingle( evt->Position() ); + + if( !m_selection.Empty() ) + SetContextMenu( &m_menu, CMENU_NOW ); + } + // double click? Display the properties window else if( evt->IsDblClick( BUT_LEFT ) ) { @@ -310,9 +320,6 @@ void SELECTION_TOOL::clearSelection() m_selection.clear(); getEditFrame()->SetCurItem( NULL ); - - // Do not show the context menu when there is nothing selected - SetContextMenu( &m_menu, CMENU_OFF ); } @@ -509,9 +516,6 @@ void SELECTION_TOOL::select( BOARD_ITEM* aItem ) { // Set as the current item, so the information about selection is displayed getEditFrame()->SetCurItem( aItem, true ); - - // Now the context menu should be enabled - SetContextMenu( &m_menu, CMENU_BUTTON ); } else if( m_selection.Size() == 2 ) // Check only for 2, so it will not be { // called for every next selected item @@ -539,10 +543,7 @@ void SELECTION_TOOL::deselect( BOARD_ITEM* aItem ) // If there is nothing selected, disable the context menu if( m_selection.Empty() ) - { - SetContextMenu( &m_menu, CMENU_OFF ); getEditFrame()->SetCurItem( NULL ); - } } From 02316e02c312d9316fa0964e8dca40a06caf3d3b Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 10 Feb 2014 10:58:58 +0100 Subject: [PATCH 095/741] Drawing arcs - version 1 --- pcbnew/tools/common_actions.cpp | 4 + pcbnew/tools/common_actions.h | 3 + pcbnew/tools/drawing_tool.cpp | 156 +++++++++++++++++++++++++++++++- pcbnew/tools/pcb_tools.cpp | 1 + 4 files changed, 163 insertions(+), 1 deletion(-) diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 22b0c10e2f..d7368b96c6 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -64,3 +64,7 @@ TOOL_ACTION COMMON_ACTIONS::drawLine( "pcbnew.InteractiveDrawing.line", TOOL_ACTION COMMON_ACTIONS::drawCircle( "pcbnew.InteractiveDrawing.circle", AS_GLOBAL, 'S', "Draw a circle", "Draw a circle" ); + +TOOL_ACTION COMMON_ACTIONS::drawArc( "pcbnew.InteractiveDrawing.arc", + AS_GLOBAL, 'A', + "Draw an arc", "Draw an arc" ); diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index d573a8a96c..3542490c24 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -62,4 +62,7 @@ public: /// Activation of the drawing tool (circle) static TOOL_ACTION drawCircle; + + /// Activation of the drawing tool (arc) + static TOOL_ACTION drawArc; }; diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index 8f03336bdc..1f2a64ec1a 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -67,6 +67,159 @@ int DRAWING_TOOL::DrawCircle( TOOL_EVENT& aEvent ) } +int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) +{ + m_continous = false; + + int step = 0; + + KIGFX::VIEW* view = getView(); + KIGFX::VIEW_CONTROLS* controls = getViewControls(); + BOARD* board = getModel( PCB_T ); + DRAWSEGMENT graphic; + DRAWSEGMENT helperLine; + bool positive = true; + + // Init the new item attributes + graphic.SetShape( S_ARC ); + graphic.SetAngle( 0.0 ); + graphic.SetWidth( board->GetDesignSettings().m_DrawSegmentWidth ); + + helperLine.SetShape( S_SEGMENT ); + helperLine.SetLayer( DRAW_N ); + helperLine.SetWidth( 1 ); + + // Add a VIEW_GROUP that serves as a preview for the new item + KIGFX::VIEW_GROUP preview( view ); + view->Add( &preview ); + + controls->ShowCursor( true ); + controls->SetSnapping( true ); + + Activate(); + + // Main loop: keep receiving events + while( OPT_TOOL_EVENT evt = Wait() ) + { + VECTOR2D cursorPos = view->ToWorld( controls->GetCursorPosition() ); + + if( evt->IsCancel() ) + break; + + else if( evt->IsKeyUp() ) + { + int width = graphic.GetWidth(); + + // Modify the new item width + if( evt->KeyCode() == '-' && width > WIDTH_STEP ) + graphic.SetWidth( width - WIDTH_STEP ); + else if( evt->KeyCode() == '=' ) + graphic.SetWidth( width + WIDTH_STEP ); + else if( evt->KeyCode() == ' ' ) + { + if( positive ) + graphic.SetAngle( graphic.GetAngle() - 3600.0 ); + else + graphic.SetAngle( graphic.GetAngle() + 3600.0 ); + + positive = !positive; + } + + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + + else if( evt->IsClick( BUT_LEFT ) ) + { + switch( step ) + { + case 0: + { + LAYER_NUM layer = getEditFrame()->GetScreen()->m_Active_Layer; + + if( IsCopperLayer( layer ) ) + { + DisplayInfoMessage( NULL, _( "Graphic not allowed on Copper layers" ) ); + --step; + } + else + { + controls->SetAutoPan( true ); + + helperLine.SetStart( graphic.GetCenter() ); + graphic.SetLayer( layer ); + preview.Add( &graphic ); + preview.Add( &helperLine ); + } + } + break; + + case 2: + { + if( wxPoint( cursorPos.x, cursorPos.y ) != graphic.GetCenter() ) + { + DRAWSEGMENT* newItem = new DRAWSEGMENT( graphic ); + view->Add( newItem ); + getModel( PCB_T )->Add( newItem ); + newItem->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + } + break; + + } + + if( ++step == 3 ) + break; + } + + else if( evt->IsMotion() ) + { + switch( step ) + { + case 0: + graphic.SetCenter( wxPoint( cursorPos.x, cursorPos.y ) ); + break; + + case 1: + helperLine.SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); + graphic.SetArcStart( wxPoint( cursorPos.x, cursorPos.y ) ); + break; + + case 2: + { + VECTOR2D firstLine( graphic.GetArcStart() - graphic.GetCenter() ); + double firstAngle = firstLine.Angle(); + + VECTOR2D secondLine( wxPoint( cursorPos.x, cursorPos.y ) - graphic.GetCenter() ); + double secondAngle = secondLine.Angle(); + + double angle = RAD2DECIDEG( secondAngle - firstAngle ); + + if( positive && angle < 0.0 ) + angle += 3600.0; + else if( !positive && angle > 0.0 ) + angle -= 3600.0; + + graphic.SetAngle( angle ); + } + break; + } + + // Show a preview of the item + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + } + + controls->ShowCursor( false ); + controls->SetSnapping( false ); + controls->SetAutoPan( false ); + view->Remove( &preview ); + + setTransitions(); + + return 0; +} + + int DRAWING_TOOL::draw( STROKE_T aShape ) { bool started = false; @@ -157,7 +310,7 @@ int DRAWING_TOOL::draw( STROKE_T aShape ) if( linesAngle45 && aShape == S_SEGMENT ) { VECTOR2D lineVector( wxPoint( cursorPos.x, cursorPos.y ) - graphic.GetStart() ); - double angle = atan2( lineVector.y, lineVector.x ); + double angle = lineVector.Angle(); double newAngle = round( angle / ( M_PI / 4.0 ) ) * M_PI / 4.0; VECTOR2D newLineVector = lineVector.Rotate( newAngle - angle ); @@ -193,4 +346,5 @@ void DRAWING_TOOL::setTransitions() { Go( &DRAWING_TOOL::DrawLine, COMMON_ACTIONS::drawLine.MakeEvent() ); Go( &DRAWING_TOOL::DrawCircle, COMMON_ACTIONS::drawCircle.MakeEvent() ); + Go( &DRAWING_TOOL::DrawArc, COMMON_ACTIONS::drawArc.MakeEvent() ); } diff --git a/pcbnew/tools/pcb_tools.cpp b/pcbnew/tools/pcb_tools.cpp index 5dff5788a9..2f893cf509 100644 --- a/pcbnew/tools/pcb_tools.cpp +++ b/pcbnew/tools/pcb_tools.cpp @@ -57,6 +57,7 @@ void PCB_EDIT_FRAME::setupTools() m_toolManager->RegisterAction( &COMMON_ACTIONS::properties ); m_toolManager->RegisterAction( &COMMON_ACTIONS::drawLine ); m_toolManager->RegisterAction( &COMMON_ACTIONS::drawCircle ); + m_toolManager->RegisterAction( &COMMON_ACTIONS::drawArc ); // Register tools m_toolManager->RegisterTool( new SELECTION_TOOL ); From 4b277784515652f42dd0440649489e34789086b5 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 10 Feb 2014 15:40:25 +0100 Subject: [PATCH 096/741] Basic text placing tool. --- pcbnew/edit_pcb_text.cpp | 5 ++- pcbnew/tools/common_actions.cpp | 4 ++ pcbnew/tools/common_actions.h | 3 ++ pcbnew/tools/drawing_tool.cpp | 66 ++++++++++++++++++++++++++++++++- pcbnew/tools/drawing_tool.h | 2 + pcbnew/tools/pcb_tools.cpp | 1 + 6 files changed, 77 insertions(+), 4 deletions(-) diff --git a/pcbnew/edit_pcb_text.cpp b/pcbnew/edit_pcb_text.cpp index e4ecfcb5a2..277159a5ee 100644 --- a/pcbnew/edit_pcb_text.cpp +++ b/pcbnew/edit_pcb_text.cpp @@ -195,7 +195,8 @@ TEXTE_PCB* PCB_EDIT_FRAME::CreateTextePcb( wxDC* aDC, TEXTE_PCB* aText ) textePcb->Copy( aText ); GetBoard()->Add( textePcb ); textePcb->SetFlags( IS_NEW ); - StartMoveTextePcb( textePcb, aDC, false ); // Don't erase aText when copying + if( aDC ) + StartMoveTextePcb( textePcb, aDC, false ); // Don't erase aText when copying } else { @@ -222,7 +223,7 @@ TEXTE_PCB* PCB_EDIT_FRAME::CreateTextePcb( wxDC* aDC, TEXTE_PCB* aText ) textePcb->DeleteStructure(); textePcb = NULL; } - else + else if( aDC ) { StartMoveTextePcb( textePcb, aDC ); } diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index d7368b96c6..44217508bc 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -68,3 +68,7 @@ TOOL_ACTION COMMON_ACTIONS::drawCircle( "pcbnew.InteractiveDrawing.circle", TOOL_ACTION COMMON_ACTIONS::drawArc( "pcbnew.InteractiveDrawing.arc", AS_GLOBAL, 'A', "Draw an arc", "Draw an arc" ); + +TOOL_ACTION COMMON_ACTIONS::drawText( "pcbnew.InteractiveDrawing.text", + AS_GLOBAL, 'T', + "Add a text", "Add a text" ); diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index 3542490c24..992d9cbdf8 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -65,4 +65,7 @@ public: /// Activation of the drawing tool (arc) static TOOL_ACTION drawArc; + + /// Activation of the drawing tool (text) + static TOOL_ACTION drawText; }; diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index 1f2a64ec1a..d658f3c23d 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -159,7 +160,7 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) { DRAWSEGMENT* newItem = new DRAWSEGMENT( graphic ); view->Add( newItem ); - getModel( PCB_T )->Add( newItem ); + board->Add( newItem ); newItem->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); } } @@ -291,7 +292,7 @@ int DRAWING_TOOL::draw( STROKE_T aShape ) { DRAWSEGMENT* newItem = new DRAWSEGMENT( graphic ); view->Add( newItem ); - getModel( PCB_T )->Add( newItem ); + board->Add( newItem ); newItem->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); if( m_continous ) @@ -342,9 +343,70 @@ int DRAWING_TOOL::draw( STROKE_T aShape ) } +int DRAWING_TOOL::DrawText( TOOL_EVENT& aEvent ) +{ + KIGFX::VIEW* view = getView(); + KIGFX::VIEW_CONTROLS* controls = getViewControls(); + + // Init the new item attributes + TEXTE_PCB* newText = getEditFrame()->CreateTextePcb( NULL ); + + // Add a VIEW_GROUP that serves as a preview for the new item + KIGFX::VIEW_GROUP preview( view ); + preview.Add( newText ); + view->Add( &preview ); + + controls->ShowCursor( true ); + controls->SetSnapping( true ); + controls->SetAutoPan( true ); + + Activate(); + + // Main loop: keep receiving events + while( OPT_TOOL_EVENT evt = Wait() ) + { + VECTOR2D cursorPos = view->ToWorld( controls->GetCursorPosition() ); + + if( evt->IsCancel() ) + { + // it was already added by CreateTextPcb() + getModel( PCB_T )->Delete( newText ); + break; + } + + else if( evt->IsClick( BUT_LEFT ) ) + { + newText->ClearFlags(); + view->Add( newText ); + // board->Add( newText ); // it is already added by CreateTextePcb() + newText->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + break; + } + + else if( evt->IsMotion() ) + { + newText->SetTextPosition( wxPoint( cursorPos.x, cursorPos.y ) ); + + // Show a preview of the item + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + } + + controls->ShowCursor( false ); + controls->SetSnapping( false ); + controls->SetAutoPan( false ); + view->Remove( &preview ); + + setTransitions(); + + return 0; +} + + void DRAWING_TOOL::setTransitions() { Go( &DRAWING_TOOL::DrawLine, COMMON_ACTIONS::drawLine.MakeEvent() ); Go( &DRAWING_TOOL::DrawCircle, COMMON_ACTIONS::drawCircle.MakeEvent() ); Go( &DRAWING_TOOL::DrawArc, COMMON_ACTIONS::drawArc.MakeEvent() ); + Go( &DRAWING_TOOL::DrawText, COMMON_ACTIONS::drawText.MakeEvent() ); } diff --git a/pcbnew/tools/drawing_tool.h b/pcbnew/tools/drawing_tool.h index 4cef5744cd..4e969860db 100644 --- a/pcbnew/tools/drawing_tool.h +++ b/pcbnew/tools/drawing_tool.h @@ -55,6 +55,8 @@ public: int DrawArc( TOOL_EVENT& aEvent ); + int DrawText( TOOL_EVENT& aEvent ); + private: ///> Starts drawing a selected shape. int draw( STROKE_T aShape ); diff --git a/pcbnew/tools/pcb_tools.cpp b/pcbnew/tools/pcb_tools.cpp index 2f893cf509..73f9f14a5f 100644 --- a/pcbnew/tools/pcb_tools.cpp +++ b/pcbnew/tools/pcb_tools.cpp @@ -58,6 +58,7 @@ void PCB_EDIT_FRAME::setupTools() m_toolManager->RegisterAction( &COMMON_ACTIONS::drawLine ); m_toolManager->RegisterAction( &COMMON_ACTIONS::drawCircle ); m_toolManager->RegisterAction( &COMMON_ACTIONS::drawArc ); + m_toolManager->RegisterAction( &COMMON_ACTIONS::drawText ); // Register tools m_toolManager->RegisterTool( new SELECTION_TOOL ); From 2aef11a5fc8716d5dd6dd4418e0ce702cd71f686 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 10 Feb 2014 17:08:55 +0100 Subject: [PATCH 097/741] Made rotate & flip tool actions generic. Drawing tool reacts to rotate & flip events while placing a text. --- pcbnew/tools/common_actions.cpp | 4 ++-- pcbnew/tools/drawing_tool.cpp | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 44217508bc..0878657b1f 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -41,11 +41,11 @@ TOOL_ACTION COMMON_ACTIONS::editActivate( "pcbnew.InteractiveEdit", AS_GLOBAL, 'M', "Move", "Moves the selected item(s)" ); -TOOL_ACTION COMMON_ACTIONS::rotate( "pcbnew.InteractiveEdit.rotate", +TOOL_ACTION COMMON_ACTIONS::rotate( "pcbnew.rotate", AS_CONTEXT, 'R', "Rotate", "Rotates selected item(s)" ); -TOOL_ACTION COMMON_ACTIONS::flip( "pcbnew.InteractiveEdit.flip", +TOOL_ACTION COMMON_ACTIONS::flip( "pcbnew.flip", AS_CONTEXT, 'F', "Flip", "Flips selected item(s)" ); diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index d658f3c23d..9950ea65e9 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -374,6 +374,20 @@ int DRAWING_TOOL::DrawText( TOOL_EVENT& aEvent ) break; } + else if( evt->Category() == TC_COMMAND ) + { + if( evt->IsAction( &COMMON_ACTIONS::rotate ) ) + { + newText->Rotate( newText->GetPosition(), getEditFrame()->GetRotationAngle() ); + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + else if( evt->IsAction( &COMMON_ACTIONS::flip ) ) + { + newText->Flip( newText->GetPosition() ); + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + } + else if( evt->IsClick( BUT_LEFT ) ) { newText->ClearFlags(); From 46db6ac182d52e7ef322b8637da1c8e67cfcf20f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 11 Feb 2014 13:22:30 +0100 Subject: [PATCH 098/741] Removed redundant fields DIMENSION::m_arrowD1O, m_arrowD2O, m_arrowG1O, m_arrowG2O (==m_crossBarO/F). Added DIMENSION::SetOrigin(), DIMENSION::SetEnd(), DIMENSION::GetOrigin(), DIMENSION::GetEnd(), DIMENSION::GetHeight(). Fixed flipping for DIMENSION class. Added an information that helps to understand roles of the points in the DIMENSION class. Some minor changes to PCB_PAINTER (mainly using const COLOR4D& for taking the result of GetColor() function). --- pcbnew/class_dimension.cpp | 93 ++++++++++++++++---------------- pcbnew/class_dimension.h | 77 ++++++++++++++++++++++++-- pcbnew/dimension.cpp | 31 +++-------- pcbnew/kicad_plugin.cpp | 16 +++--- pcbnew/legacy_plugin.cpp | 24 ++++----- pcbnew/pcb_painter.cpp | 45 +++++++--------- pcbnew/pcb_parser.cpp | 8 +-- pcbnew/plot_brditems_plotter.cpp | 8 +-- 8 files changed, 172 insertions(+), 130 deletions(-) diff --git a/pcbnew/class_dimension.cpp b/pcbnew/class_dimension.cpp index e49ca7e5dd..3a56797468 100644 --- a/pcbnew/class_dimension.cpp +++ b/pcbnew/class_dimension.cpp @@ -109,13 +109,9 @@ void DIMENSION::Copy( DIMENSION* source ) m_featureLineGF = source->m_featureLineGF; m_featureLineDO = source->m_featureLineDO; m_featureLineDF = source->m_featureLineDF; - m_arrowD1O = source->m_arrowD1O; m_arrowD1F = source->m_arrowD1F; - m_arrowD2O = source->m_arrowD2O; m_arrowD2F = source->m_arrowD2F; - m_arrowG1O = source->m_arrowG1O; m_arrowG1F = source->m_arrowG1F; - m_arrowG2O = source->m_arrowG2O; m_arrowG2F = source->m_arrowG2F; } @@ -129,13 +125,9 @@ void DIMENSION::Move( const wxPoint& offset ) m_featureLineGF += offset; m_featureLineDO += offset; m_featureLineDF += offset; - m_arrowG1O += offset; m_arrowG1F += offset; - m_arrowG2O += offset; m_arrowG2F += offset; - m_arrowD1O += offset; m_arrowD1F += offset; - m_arrowD2O += offset; m_arrowD2F += offset; } @@ -162,13 +154,9 @@ void DIMENSION::Rotate( const wxPoint& aRotCentre, double aAngle ) RotatePoint( &m_featureLineGF, aRotCentre, aAngle ); RotatePoint( &m_featureLineDO, aRotCentre, aAngle ); RotatePoint( &m_featureLineDF, aRotCentre, aAngle ); - RotatePoint( &m_arrowG1O, aRotCentre, aAngle ); RotatePoint( &m_arrowG1F, aRotCentre, aAngle ); - RotatePoint( &m_arrowG2O, aRotCentre, aAngle ); RotatePoint( &m_arrowG2F, aRotCentre, aAngle ); - RotatePoint( &m_arrowD1O, aRotCentre, aAngle ); RotatePoint( &m_arrowD1F, aRotCentre, aAngle ); - RotatePoint( &m_arrowD2O, aRotCentre, aAngle ); RotatePoint( &m_arrowD2F, aRotCentre, aAngle ); } @@ -190,15 +178,7 @@ void DIMENSION::Mirror( const wxPoint& axis_pos ) m_Text.SetTextPosition( newPos ); // invert angle - double newAngle = m_Text.GetOrientation(); - - if( newAngle >= 3600 ) - newAngle -= 3600; - - if( newAngle > 900 && newAngle < 2700 ) - newAngle -= 1800; - - m_Text.SetOrientation( newAngle ); + m_Text.SetOrientation( -m_Text.GetOrientation() ); INVERT( m_crossBarO.y ); INVERT( m_crossBarF.y ); @@ -206,17 +186,47 @@ void DIMENSION::Mirror( const wxPoint& axis_pos ) INVERT( m_featureLineGF.y ); INVERT( m_featureLineDO.y ); INVERT( m_featureLineDF.y ); - INVERT( m_arrowG1O.y ); INVERT( m_arrowG1F.y ); - INVERT( m_arrowG2O.y ); INVERT( m_arrowG2F.y ); - INVERT( m_arrowD1O.y ); INVERT( m_arrowD1F.y ); - INVERT( m_arrowD2O.y ); INVERT( m_arrowD2F.y ); } +void DIMENSION::SetOrigin( const wxPoint& aOrigin ) +{ + m_crossBarO = aOrigin; + m_featureLineGO = aOrigin; + + AdjustDimensionDetails(); +} + + +void DIMENSION::SetEnd( const wxPoint& aEnd ) +{ + m_crossBarF = aEnd; + m_featureLineDO = aEnd; + + AdjustDimensionDetails(); +} + + +void DIMENSION::SetHeight( double aHeight ) +{ + /* Calculating the direction of travel perpendicular to the selected axis. */ + double angle = GetAngle() + ( M_PI / 2 ); + + int dx = KiROUND( aHeight * cos( angle ) ); + int dy = KiROUND( aHeight * sin( angle ) ); + m_crossBarO.x = m_featureLineGO.x + dx; + m_crossBarO.y = m_featureLineGO.y + dy; + m_crossBarF.x = m_featureLineDO.x + dx; + m_crossBarF.y = m_featureLineDO.y + dy; + + AdjustDimensionDetails(); +} + + void DIMENSION::AdjustDimensionDetails( bool aDoNotChangeText ) { const int arrowz = DMils2iu( 500 ); // size of arrows @@ -271,30 +281,21 @@ void DIMENSION::AdjustDimensionDetails( bool aDoNotChangeText ) arrow_dw_Y = wxRound( arrowz * sin( angle_f ) ); } - m_arrowG1O.x = m_crossBarO.x; - m_arrowG1O.y = m_crossBarO.y; m_arrowG1F.x = m_crossBarO.x + arrow_up_X; m_arrowG1F.y = m_crossBarO.y + arrow_up_Y; - m_arrowG2O.x = m_crossBarO.x; - m_arrowG2O.y = m_crossBarO.y; m_arrowG2F.x = m_crossBarO.x + arrow_dw_X; m_arrowG2F.y = m_crossBarO.y + arrow_dw_Y; /* The right arrow is symmetrical to the left. * / = -\ and \ = -/ */ - m_arrowD1O.x = m_crossBarF.x; - m_arrowD1O.y = m_crossBarF.y; m_arrowD1F.x = m_crossBarF.x - arrow_dw_X; m_arrowD1F.y = m_crossBarF.y - arrow_dw_Y; - m_arrowD2O.x = m_crossBarF.x; - m_arrowD2O.y = m_crossBarF.y; m_arrowD2F.x = m_crossBarF.x - arrow_up_X; m_arrowD2F.y = m_crossBarF.y - arrow_up_Y; - m_featureLineGF.x = m_crossBarO.x + hx; m_featureLineGF.y = m_crossBarO.y + hy; @@ -358,13 +359,13 @@ void DIMENSION::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE mode_color, m_featureLineGF + offset, width, gcolor ); GRLine( panel->GetClipBox(), DC, m_featureLineDO + offset, m_featureLineDF + offset, width, gcolor ); - GRLine( panel->GetClipBox(), DC, m_arrowD1O + offset, + GRLine( panel->GetClipBox(), DC, m_crossBarF + offset, m_arrowD1F + offset, width, gcolor ); - GRLine( panel->GetClipBox(), DC, m_arrowD2O + offset, + GRLine( panel->GetClipBox(), DC, m_crossBarF + offset, m_arrowD2F + offset, width, gcolor ); - GRLine( panel->GetClipBox(), DC, m_arrowG1O + offset, + GRLine( panel->GetClipBox(), DC, m_crossBarO + offset, m_arrowG1F + offset, width, gcolor ); - GRLine( panel->GetClipBox(), DC, m_arrowG2O + offset, + GRLine( panel->GetClipBox(), DC, m_crossBarO + offset, m_arrowG2F + offset, width, gcolor ); break; @@ -375,13 +376,13 @@ void DIMENSION::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE mode_color, m_featureLineGF + offset, width, gcolor ); GRCSegm( panel->GetClipBox(), DC, m_featureLineDO + offset, m_featureLineDF + offset, width, gcolor ); - GRCSegm( panel->GetClipBox(), DC, m_arrowD1O + offset, + GRCSegm( panel->GetClipBox(), DC, m_crossBarF + offset, m_arrowD1F + offset, width, gcolor ); - GRCSegm( panel->GetClipBox(), DC, m_arrowD2O + offset, + GRCSegm( panel->GetClipBox(), DC, m_crossBarF + offset, m_arrowD2F + offset, width, gcolor ); - GRCSegm( panel->GetClipBox(), DC, m_arrowG1O + offset, + GRCSegm( panel->GetClipBox(), DC, m_crossBarO + offset, m_arrowG1F + offset, width, gcolor ); - GRCSegm( panel->GetClipBox(), DC, m_arrowG2O + offset, + GRCSegm( panel->GetClipBox(), DC, m_crossBarO + offset, m_arrowG2F + offset, width, gcolor ); break; } @@ -414,16 +415,16 @@ bool DIMENSION::HitTest( const wxPoint& aPosition ) if( TestSegmentHit( aPosition, m_featureLineDO, m_featureLineDF, dist_max ) ) return true; - if( TestSegmentHit( aPosition, m_arrowD1O, m_arrowD1F, dist_max ) ) + if( TestSegmentHit( aPosition, m_crossBarF, m_arrowD1F, dist_max ) ) return true; - if( TestSegmentHit( aPosition, m_arrowD2O, m_arrowD2F, dist_max ) ) + if( TestSegmentHit( aPosition, m_crossBarF, m_arrowD2F, dist_max ) ) return true; - if( TestSegmentHit( aPosition, m_arrowG1O, m_arrowG1F, dist_max ) ) + if( TestSegmentHit( aPosition, m_crossBarO, m_arrowG1F, dist_max ) ) return true; - if( TestSegmentHit( aPosition, m_arrowG2O, m_arrowG2F, dist_max ) ) + if( TestSegmentHit( aPosition, m_crossBarO, m_arrowG2F, dist_max ) ) return true; return false; diff --git a/pcbnew/class_dimension.h b/pcbnew/class_dimension.h index 1ea29bd8dc..2992991505 100644 --- a/pcbnew/class_dimension.h +++ b/pcbnew/class_dimension.h @@ -41,6 +41,24 @@ class TEXTE_PCB; class MSG_PANEL_ITEM; +/** + * Class DIMENSION + * + * For better understanding of the points that make a dimension: + * + * m_featureLineGO m_featureLineDO + * | | + * | | + * | | + * | m_arrowG2F m_arrowD2F | + * | / \ | + * m_crossBarO|/____________________________\|m_crossBarF + * |\ m_Text /| + * | \ / | + * | m_arrowG1F m_arrowD1F | + * | | + * m_featureLineGF m_featureLineDF + */ class DIMENSION : public BOARD_ITEM { int m_Width; @@ -52,14 +70,12 @@ class DIMENSION : public BOARD_ITEM public: -// private: These member should be private. they are public only due to legacy code +// TODO private: These member should be private. they are public only due to legacy code wxPoint m_crossBarO, m_crossBarF; wxPoint m_featureLineGO, m_featureLineGF; wxPoint m_featureLineDO, m_featureLineDF; - wxPoint m_arrowD1O, m_arrowD1F; - wxPoint m_arrowD2O, m_arrowD2F; - wxPoint m_arrowG1O, m_arrowG1F; - wxPoint m_arrowG2O, m_arrowG2F; + wxPoint m_arrowD1F, m_arrowD2F; + wxPoint m_arrowG1F, m_arrowG2F; DIMENSION( BOARD_ITEM* aParent ); @@ -88,6 +104,57 @@ public: int GetWidth() const { return m_Width; } void SetWidth( int aWidth ) { m_Width = aWidth; } + /** + * Function SetOrigin + * Sets a new origin of the crossbar line. All remaining lines are adjusted after that. + * @param aOrigin is the new point to be used as the new origin of the crossbar line. + */ + void SetOrigin( const wxPoint& aOrigin ); + + /** + * Function GetOrigin + * @return Origin of the crossbar line. + */ + const wxPoint& GetOrigin() const + { + return m_crossBarO; + } + + /** + * Function SetEnd + * Sets a new end of the crossbar line. All remaining lines are adjusted after that. + * @param aEnd is the new point to be used as the new end of the crossbar line. + */ + void SetEnd( const wxPoint& aEnd ); + + /** + * Function GetEnd + * @return End of the crossbar line. + */ + const wxPoint& GetEnd() + { + return m_crossBarF; + } + + /** + * Function SetHeight + * Sets the length of feature lines. + * @param aHeight is the new height. + */ + void SetHeight( double aHeight ); + + /** + * Function GetAngle + * Returns angle of the crossbar. + * @return Angle of the crossbar line. + */ + double GetAngle() const + { + wxPoint delta( m_featureLineDO - m_featureLineGO ); + + return atan2( delta.y, delta.x ); + } + /** * Function AdjustDimensionDetails * Calculate coordinates of segments used to draw the dimension. diff --git a/pcbnew/dimension.cpp b/pcbnew/dimension.cpp index 819c1a3110..71c1a14393 100644 --- a/pcbnew/dimension.cpp +++ b/pcbnew/dimension.cpp @@ -251,16 +251,9 @@ DIMENSION* PCB_EDIT_FRAME::EditDimension( DIMENSION* aDimension, wxDC* aDC ) aDimension = new DIMENSION( GetBoard() ); aDimension->SetFlags( IS_NEW ); - aDimension->SetLayer( getActiveLayer() ); - - aDimension->m_crossBarO = aDimension->m_crossBarF = pos; - aDimension->m_featureLineDO = aDimension->m_featureLineDF = pos; - aDimension->m_featureLineGO = aDimension->m_featureLineGF = pos; - aDimension->m_arrowG1O = aDimension->m_arrowG1F = pos; - aDimension->m_arrowG2O = aDimension->m_arrowG2F = pos; - aDimension->m_arrowD1O = aDimension->m_arrowD1F = pos; - aDimension->m_arrowD2O = aDimension->m_arrowD2F = pos; + aDimension->SetOrigin( pos ); + aDimension->SetEnd( pos ); aDimension->Text().SetSize( GetBoard()->GetDesignSettings().m_PcbTextSize ); int width = GetBoard()->GetDesignSettings().m_PcbTextWidth; @@ -330,24 +323,12 @@ static void BuildDimension( EDA_DRAW_PANEL* aPanel, wxDC* aDC, } else { - wxPoint delta; - int dx, dy; - double angle, depl; - delta = Dimension->m_featureLineDO - Dimension->m_featureLineGO; - /* Calculating the direction of travel perpendicular to the selected axis. */ - angle = atan2( delta.y, delta.x ) + (M_PI / 2); + double angle = Dimension->GetAngle() + (M_PI / 2); - delta = pos - Dimension->m_featureLineDO; - depl = ( delta.x * cos( angle ) ) + ( delta.y * sin( angle ) ); - dx = KiROUND( depl * cos( angle ) ); - dy = KiROUND( depl * sin( angle ) ); - Dimension->m_crossBarO.x = Dimension->m_featureLineGO.x + dx; - Dimension->m_crossBarO.y = Dimension->m_featureLineGO.y + dy; - Dimension->m_crossBarF.x = Dimension->m_featureLineDO.x + dx; - Dimension->m_crossBarF.y = Dimension->m_featureLineDO.y + dy; - - Dimension->AdjustDimensionDetails( ); + wxPoint delta = pos - Dimension->m_featureLineDO; + double depl = ( delta.x * cos( angle ) ) + ( delta.y * sin( angle ) ); + Dimension->SetHeight( depl ); } Dimension->Draw( aPanel, aDC, GR_XOR ); diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index 981b4644db..36342dcd47 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -747,26 +747,26 @@ void PCB_IO::format( DIMENSION* aDimension, int aNestLevel ) const FMT_IU( aDimension->m_crossBarF.y ).c_str() ); m_out->Print( aNestLevel+1, "(arrow1a (pts (xy %s %s) (xy %s %s)))\n", - FMT_IU( aDimension->m_arrowD1O.x ).c_str(), - FMT_IU( aDimension->m_arrowD1O.y ).c_str(), + FMT_IU( aDimension->m_crossBarF.x ).c_str(), + FMT_IU( aDimension->m_crossBarF.y ).c_str(), FMT_IU( aDimension->m_arrowD1F.x ).c_str(), FMT_IU( aDimension->m_arrowD1F.y ).c_str() ); m_out->Print( aNestLevel+1, "(arrow1b (pts (xy %s %s) (xy %s %s)))\n", - FMT_IU( aDimension->m_arrowD2O.x ).c_str(), - FMT_IU( aDimension->m_arrowD2O.y ).c_str(), + FMT_IU( aDimension->m_crossBarF.x ).c_str(), + FMT_IU( aDimension->m_crossBarF.y ).c_str(), FMT_IU( aDimension->m_arrowD2F.x ).c_str(), FMT_IU( aDimension->m_arrowD2F.y ).c_str() ); m_out->Print( aNestLevel+1, "(arrow2a (pts (xy %s %s) (xy %s %s)))\n", - FMT_IU( aDimension->m_arrowG1O.x ).c_str(), - FMT_IU( aDimension->m_arrowG1O.y ).c_str(), + FMT_IU( aDimension->m_crossBarO.x ).c_str(), + FMT_IU( aDimension->m_crossBarO.y ).c_str(), FMT_IU( aDimension->m_arrowG1F.x ).c_str(), FMT_IU( aDimension->m_arrowG1F.y ).c_str() ); m_out->Print( aNestLevel+1, "(arrow2b (pts (xy %s %s) (xy %s %s)))\n", - FMT_IU( aDimension->m_arrowG2O.x ).c_str(), - FMT_IU( aDimension->m_arrowG2O.y ).c_str(), + FMT_IU( aDimension->m_crossBarO.x ).c_str(), + FMT_IU( aDimension->m_crossBarO.y ).c_str(), FMT_IU( aDimension->m_arrowG2F.x ).c_str(), FMT_IU( aDimension->m_arrowG2F.y ).c_str() ); diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index 0ab7069d3d..cdb598ad27 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -2588,8 +2588,8 @@ void LEGACY_PLUGIN::loadDIMENSION() BIU arrowD1Fx = biuParse( data, &data ); BIU arrowD1Fy = biuParse( data ); - dim->m_arrowD1O.x = arrowD10x; - dim->m_arrowD1O.y = arrowD10y; + dim->m_crossBarF.x = arrowD10x; + dim->m_crossBarF.y = arrowD10y; dim->m_arrowD1F.x = arrowD1Fx; dim->m_arrowD1F.y = arrowD1Fy; (void) ignore; @@ -2605,8 +2605,8 @@ void LEGACY_PLUGIN::loadDIMENSION() BIU arrowD2Fx = biuParse( data, &data ); BIU arrowD2Fy = biuParse( data, &data ); - dim->m_arrowD2O.x = arrowD2Ox; - dim->m_arrowD2O.y = arrowD2Oy; + dim->m_crossBarF.x = arrowD2Ox; + dim->m_crossBarF.y = arrowD2Oy; dim->m_arrowD2F.x = arrowD2Fx; dim->m_arrowD2F.y = arrowD2Fy; (void) ignore; @@ -2621,8 +2621,8 @@ void LEGACY_PLUGIN::loadDIMENSION() BIU arrowG1Fx = biuParse( data, &data ); BIU arrowG1Fy = biuParse( data, &data ); - dim->m_arrowG1O.x = arrowG1Ox; - dim->m_arrowG1O.y = arrowG1Oy; + dim->m_crossBarO.x = arrowG1Ox; + dim->m_crossBarO.y = arrowG1Oy; dim->m_arrowG1F.x = arrowG1Fx; dim->m_arrowG1F.y = arrowG1Fy; (void) ignore; @@ -2637,8 +2637,8 @@ void LEGACY_PLUGIN::loadDIMENSION() BIU arrowG2Fx = biuParse( data, &data ); BIU arrowG2Fy = biuParse( data, &data ); - dim->m_arrowG2O.x = arrowG2Ox; - dim->m_arrowG2O.y = arrowG2Oy; + dim->m_crossBarO.x = arrowG2Ox; + dim->m_crossBarO.y = arrowG2Oy; dim->m_arrowG2F.x = arrowG2Fx; dim->m_arrowG2F.y = arrowG2Fy; (void) ignore; @@ -3794,22 +3794,22 @@ void LEGACY_PLUGIN::saveDIMENTION( const DIMENSION* me ) const fmtBIU( me->GetWidth() ).c_str() ); fprintf( m_fp, "S1 %d %s %s %s\n", S_SEGMENT, - fmtBIUPair( me->m_arrowD1O.x, me->m_arrowD1O.y ).c_str(), + fmtBIUPair( me->m_crossBarF.x, me->m_crossBarF.y ).c_str(), fmtBIUPair( me->m_arrowD1F.x, me->m_arrowD1F.y ).c_str(), fmtBIU( me->GetWidth() ).c_str() ); fprintf( m_fp, "S2 %d %s %s %s\n", S_SEGMENT, - fmtBIUPair( me->m_arrowD2O.x, me->m_arrowD2O.y ).c_str(), + fmtBIUPair( me->m_crossBarF.x, me->m_crossBarF.y ).c_str(), fmtBIUPair( me->m_arrowD2F.x, me->m_arrowD2F.y ).c_str(), fmtBIU( me->GetWidth() ).c_str() ); fprintf( m_fp, "S3 %d %s %s %s\n", S_SEGMENT, - fmtBIUPair( me->m_arrowG1O.x, me->m_arrowG1O.y ).c_str(), + fmtBIUPair( me->m_crossBarO.x, me->m_crossBarO.y ).c_str(), fmtBIUPair( me->m_arrowG1F.x, me->m_arrowG1F.y ).c_str(), fmtBIU( me->GetWidth() ).c_str() ); fprintf( m_fp, "S4 %d %s %s %s\n", S_SEGMENT, - fmtBIUPair( me->m_arrowG2O.x, me->m_arrowG2O.y ).c_str(), + fmtBIUPair( me->m_crossBarO.x, me->m_crossBarO.y ).c_str(), fmtBIUPair( me->m_arrowG2F.x, me->m_arrowG2F.y ).c_str(), fmtBIU( me->GetWidth() ).c_str() ); diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index b7f9ff0cc3..93414fc3e0 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -262,7 +262,6 @@ void PCB_PAINTER::draw( const TRACK* aTrack, int aLayer ) VECTOR2D end( aTrack->GetEnd() ); int width = aTrack->GetWidth(); int netNumber = aTrack->GetNet(); - COLOR4D color; if( m_pcbSettings->m_netNamesOnTracks && IsNetnameLayer( aLayer ) ) { @@ -286,7 +285,7 @@ void PCB_PAINTER::draw( const TRACK* aTrack, int aLayer ) double textSize = std::min( static_cast( width ), length / netName.length() ); // Set a proper color for the label - color = m_pcbSettings->GetColor( aTrack, aTrack->GetLayer() ); + const COLOR4D& color = m_pcbSettings->GetColor( aTrack, aTrack->GetLayer() ); COLOR4D labelColor = m_pcbSettings->GetColor( NULL, aLayer ); if( color.GetBrightness() > 0.5 ) @@ -307,7 +306,7 @@ void PCB_PAINTER::draw( const TRACK* aTrack, int aLayer ) else if( IsCopperLayer( aLayer )) { // Draw a regular track - color = m_pcbSettings->GetColor( aTrack, aLayer ); + const COLOR4D& color = m_pcbSettings->GetColor( aTrack, aLayer ); m_gal->SetStrokeColor( color ); m_gal->SetIsStroke( true ); @@ -332,7 +331,6 @@ void PCB_PAINTER::draw( const SEGVIA* aVia, int aLayer ) { VECTOR2D center( aVia->GetStart() ); double radius; - COLOR4D color; // Choose drawing settings depending on if we are drawing via's pad or hole if( aLayer == ITEM_GAL_LAYER( VIAS_VISIBLE ) ) @@ -346,7 +344,7 @@ void PCB_PAINTER::draw( const SEGVIA* aVia, int aLayer ) else return; - color = m_pcbSettings->GetColor( aVia, aLayer ); + const COLOR4D& color = m_pcbSettings->GetColor( aVia, aLayer ); if( m_pcbSettings->m_sketchModeSelect[VIAS_VISIBLE] ) { @@ -370,7 +368,6 @@ void PCB_PAINTER::draw( const SEGVIA* aVia, int aLayer ) void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) { - COLOR4D color; VECTOR2D size; VECTOR2D position( aPad->GetPosition() ); PAD_SHAPE_T shape; @@ -385,7 +382,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) if( m_pcbSettings->m_netNamesOnPads || m_pcbSettings->m_padNumbers ) { // Min char count to calculate string size - #define MIN_CHAR_COUNT 3 + const int MIN_CHAR_COUNT = 3; bool displayNetname = ( m_pcbSettings->m_netNamesOnPads && !aPad->GetNetname().empty() ); @@ -405,9 +402,6 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) // If the text is displayed on a symmetrical pad, do not rotate it orientation = 0.0; } - else - { - } // Font size limits if( size > maxSize ) @@ -428,7 +422,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) m_gal->SetMirrored( false ); // Set a proper color for the label - color = m_pcbSettings->GetColor( aPad, aPad->GetLayer() ); + const COLOR4D& color = m_pcbSettings->GetColor( aPad, aPad->GetLayer() ); COLOR4D labelColor = m_pcbSettings->GetColor( NULL, aLayer ); if( color.GetBrightness() > 0.5 ) @@ -456,8 +450,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) VECTOR2D namesize( tsize, tsize ); m_gal->SetGlyphSize( namesize ); m_gal->SetLineWidth( namesize.x / 12.0 ); - m_gal->StrokeText( std::wstring( aPad->GetShortNetname().wc_str() ), - textpos, 0.0 ); + m_gal->StrokeText( aPad->GetShortNetname(), textpos, 0.0 ); } if( m_pcbSettings->m_padNumbers ) @@ -474,7 +467,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) m_gal->SetGlyphSize( numsize ); m_gal->SetLineWidth( numsize.x / 12.0 ); - m_gal->StrokeText( std::wstring( aPad->GetPadName().wc_str() ), textpos, 0.0 ); + m_gal->StrokeText( aPad->GetPadName(), textpos, 0.0 ); } m_gal->Restore(); @@ -483,7 +476,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) } // Pad drawing - color = m_pcbSettings->GetColor( aPad, aLayer ); + const COLOR4D& color = m_pcbSettings->GetColor( aPad, aLayer ); if( m_pcbSettings->m_sketchModeSelect[PADS_VISIBLE] ) { // Outline mode @@ -628,7 +621,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) void PCB_PAINTER::draw( const DRAWSEGMENT* aSegment ) { - COLOR4D color = m_pcbSettings->GetColor( aSegment, aSegment->GetLayer() ); + const COLOR4D& color = m_pcbSettings->GetColor( aSegment, aSegment->GetLayer() ); m_gal->SetIsFill( false ); m_gal->SetIsStroke( true ); @@ -708,7 +701,7 @@ void PCB_PAINTER::draw( const TEXTE_PCB* aText, int aLayer ) if( aText->GetText().Length() == 0 ) return; - COLOR4D strokeColor = m_pcbSettings->GetColor( aText, aText->GetLayer() ); + const COLOR4D& strokeColor = m_pcbSettings->GetColor( aText, aText->GetLayer() ); VECTOR2D position( aText->GetTextPosition().x, aText->GetTextPosition().y ); double orientation = aText->GetOrientation() * M_PI / 1800.0; @@ -724,7 +717,7 @@ void PCB_PAINTER::draw( const TEXTE_MODULE* aText, int aLayer ) if( aText->GetLength() == 0 ) return; - COLOR4D strokeColor = m_pcbSettings->GetColor( aText, aLayer ); + const COLOR4D& strokeColor = m_pcbSettings->GetColor( aText, aLayer ); VECTOR2D position( aText->GetTextPosition().x, aText->GetTextPosition().y ); double orientation = aText->GetDrawRotation() * M_PI / 1800.0; @@ -737,7 +730,7 @@ void PCB_PAINTER::draw( const TEXTE_MODULE* aText, int aLayer ) void PCB_PAINTER::draw( const ZONE_CONTAINER* aZone ) { - COLOR4D color = m_pcbSettings->GetColor( aZone, aZone->GetLayer() ); + const COLOR4D& color = m_pcbSettings->GetColor( aZone, aZone->GetLayer() ); std::deque corners; PCB_RENDER_SETTINGS::DisplayZonesMode displayMode = m_pcbSettings->m_displayZoneMode; @@ -810,7 +803,7 @@ void PCB_PAINTER::draw( const ZONE_CONTAINER* aZone ) void PCB_PAINTER::draw( const DIMENSION* aDimension, int aLayer ) { - COLOR4D strokeColor = m_pcbSettings->GetColor( aDimension, aLayer ); + const COLOR4D& strokeColor = m_pcbSettings->GetColor( aDimension, aLayer ); m_gal->SetStrokeColor( strokeColor ); m_gal->SetIsFill( false ); @@ -823,10 +816,10 @@ void PCB_PAINTER::draw( const DIMENSION* aDimension, int aLayer ) VECTOR2D( aDimension->m_featureLineGF ) ); m_gal->DrawLine( VECTOR2D( aDimension->m_featureLineDO ), VECTOR2D( aDimension->m_featureLineDF ) ); - m_gal->DrawLine( VECTOR2D( aDimension->m_arrowD1O ), VECTOR2D( aDimension->m_arrowD1F ) ); - m_gal->DrawLine( VECTOR2D( aDimension->m_arrowD2O ), VECTOR2D( aDimension->m_arrowD2F ) ); - m_gal->DrawLine( VECTOR2D( aDimension->m_arrowG1O ), VECTOR2D( aDimension->m_arrowG1F ) ); - m_gal->DrawLine( VECTOR2D( aDimension->m_arrowG2O ), VECTOR2D( aDimension->m_arrowG2F ) ); + m_gal->DrawLine( VECTOR2D( aDimension->m_crossBarF ), VECTOR2D( aDimension->m_arrowD1F ) ); + m_gal->DrawLine( VECTOR2D( aDimension->m_crossBarF ), VECTOR2D( aDimension->m_arrowD2F ) ); + m_gal->DrawLine( VECTOR2D( aDimension->m_crossBarO ), VECTOR2D( aDimension->m_arrowG1F ) ); + m_gal->DrawLine( VECTOR2D( aDimension->m_crossBarO ), VECTOR2D( aDimension->m_arrowG2F ) ); // Draw text TEXTE_PCB& text = aDimension->Text(); @@ -835,13 +828,13 @@ void PCB_PAINTER::draw( const DIMENSION* aDimension, int aLayer ) m_gal->SetLineWidth( text.GetThickness() ); m_gal->SetTextAttributes( &text ); - m_gal->StrokeText( std::wstring( text.GetText().wc_str() ), position, orientation ); + m_gal->StrokeText( text.GetText(), position, orientation ); } void PCB_PAINTER::draw( const PCB_TARGET* aTarget ) { - COLOR4D strokeColor = m_pcbSettings->GetColor( aTarget, aTarget->GetLayer() ); + const COLOR4D& strokeColor = m_pcbSettings->GetColor( aTarget, aTarget->GetLayer() ); VECTOR2D position( aTarget->GetPosition() ); double size, radius; diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index f68743b741..33bfd5e587 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -1476,7 +1476,7 @@ DIMENSION* PCB_PARSER::parseDIMENSION() throw( IO_ERROR, PARSE_ERROR ) if( token != T_pts ) Expecting( T_pts ); - parseXY( &dimension->m_arrowD1O.x, &dimension->m_arrowD1O.y ); + parseXY( &dimension->m_crossBarF.x, &dimension->m_crossBarF.y ); parseXY( &dimension->m_arrowD1F.x, &dimension->m_arrowD1F.y ); NeedRIGHT(); NeedRIGHT(); @@ -1489,7 +1489,7 @@ DIMENSION* PCB_PARSER::parseDIMENSION() throw( IO_ERROR, PARSE_ERROR ) if( token != T_pts ) Expecting( T_pts ); - parseXY( &dimension->m_arrowD2O.x, &dimension->m_arrowD2O.y ); + parseXY( &dimension->m_crossBarF.x, &dimension->m_crossBarF.y ); parseXY( &dimension->m_arrowD2F.x, &dimension->m_arrowD2F.y ); NeedRIGHT(); NeedRIGHT(); @@ -1502,7 +1502,7 @@ DIMENSION* PCB_PARSER::parseDIMENSION() throw( IO_ERROR, PARSE_ERROR ) if( token != T_pts ) Expecting( T_pts ); - parseXY( &dimension->m_arrowG1O.x, &dimension->m_arrowG1O.y ); + parseXY( &dimension->m_crossBarO.x, &dimension->m_crossBarO.y ); parseXY( &dimension->m_arrowG1F.x, &dimension->m_arrowG1F.y ); NeedRIGHT(); NeedRIGHT(); @@ -1515,7 +1515,7 @@ DIMENSION* PCB_PARSER::parseDIMENSION() throw( IO_ERROR, PARSE_ERROR ) if( token != T_pts ) Expecting( T_pts ); - parseXY( &dimension->m_arrowG2O.x, &dimension->m_arrowG2O.y ); + parseXY( &dimension->m_crossBarO.x, &dimension->m_crossBarO.y ); parseXY( &dimension->m_arrowG2F.x, &dimension->m_arrowG2F.y ); NeedRIGHT(); NeedRIGHT(); diff --git a/pcbnew/plot_brditems_plotter.cpp b/pcbnew/plot_brditems_plotter.cpp index 5cc2e4fd5c..8e891fbe8e 100644 --- a/pcbnew/plot_brditems_plotter.cpp +++ b/pcbnew/plot_brditems_plotter.cpp @@ -274,19 +274,19 @@ void BRDITEMS_PLOTTER::PlotDimension( DIMENSION* aDim ) draw.SetEnd( aDim->m_featureLineDF ); PlotDrawSegment( &draw ); - draw.SetStart( aDim->m_arrowD1O ); + draw.SetStart( aDim->m_crossBarF ); draw.SetEnd( aDim->m_arrowD1F ); PlotDrawSegment( &draw ); - draw.SetStart( aDim->m_arrowD2O ); + draw.SetStart( aDim->m_crossBarF ); draw.SetEnd( aDim->m_arrowD2F ); PlotDrawSegment( &draw ); - draw.SetStart( aDim->m_arrowG1O ); + draw.SetStart( aDim->m_crossBarO ); draw.SetEnd( aDim->m_arrowG1F ); PlotDrawSegment( &draw ); - draw.SetStart( aDim->m_arrowG2O ); + draw.SetStart( aDim->m_crossBarO ); draw.SetEnd( aDim->m_arrowG2F ); PlotDrawSegment( &draw ); } From e6a01e5a412b297ef825f294296fa6b479377380 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 11 Feb 2014 14:26:33 +0100 Subject: [PATCH 099/741] Fixed ratsnest related segfaults on BOARD destruction. --- pcbnew/class_board.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index da3bd81fa9..7f7bbb5a43 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -110,14 +110,14 @@ BOARD::BOARD() : BOARD::~BOARD() { - delete m_ratsnest; - while( m_ZoneDescriptorList.size() ) { ZONE_CONTAINER* area_to_remove = m_ZoneDescriptorList[0]; Delete( area_to_remove ); } + delete m_ratsnest; + m_FullRatsnest.clear(); m_LocalRatsnest.clear(); From ae5fa232853145599fe69296a7730bc0bc3f5d3f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 11 Feb 2014 14:38:44 +0100 Subject: [PATCH 100/741] Added DIMENSION drawing tool. --- pcbnew/tools/common_actions.cpp | 4 + pcbnew/tools/common_actions.h | 3 + pcbnew/tools/drawing_tool.cpp | 142 ++++++++++++++++++++++++++++++++ pcbnew/tools/drawing_tool.h | 2 + pcbnew/tools/pcb_tools.cpp | 1 + 5 files changed, 152 insertions(+) diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 0878657b1f..4649123d24 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -72,3 +72,7 @@ TOOL_ACTION COMMON_ACTIONS::drawArc( "pcbnew.InteractiveDrawing.arc", TOOL_ACTION COMMON_ACTIONS::drawText( "pcbnew.InteractiveDrawing.text", AS_GLOBAL, 'T', "Add a text", "Add a text" ); + +TOOL_ACTION COMMON_ACTIONS::drawDimension( "pcbnew.InteractiveDrawing.dimension", + AS_GLOBAL, 'X', + "Add a dimension", "Add a dimension" ); diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index 992d9cbdf8..c2e350a67d 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -68,4 +68,7 @@ public: /// Activation of the drawing tool (text) static TOOL_ACTION drawText; + + /// Activation of the drawing tool (dimension) + static TOOL_ACTION drawDimension; }; diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index 9950ea65e9..bfe59af214 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -350,6 +351,11 @@ int DRAWING_TOOL::DrawText( TOOL_EVENT& aEvent ) // Init the new item attributes TEXTE_PCB* newText = getEditFrame()->CreateTextePcb( NULL ); + if( newText == NULL ) + { + setTransitions(); + return 0; + } // Add a VIEW_GROUP that serves as a preview for the new item KIGFX::VIEW_GROUP preview( view ); @@ -417,10 +423,146 @@ int DRAWING_TOOL::DrawText( TOOL_EVENT& aEvent ) } +int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent ) +{ + m_continous = false; + + int step = 0; + + KIGFX::VIEW* view = getView(); + KIGFX::VIEW_CONTROLS* controls = getViewControls(); + BOARD* board = getModel( PCB_T ); + DIMENSION* dimension = new DIMENSION( board ); + + // Init the new item attributes + dimension->Text().SetSize( board->GetDesignSettings().m_PcbTextSize ); + int width = board->GetDesignSettings().m_PcbTextWidth; + int maxthickness = Clamp_Text_PenSize( width, dimension->Text().GetSize() ); + + if( width > maxthickness ) + width = maxthickness; + + dimension->Text().SetThickness( width ); + dimension->SetWidth( width ); + dimension->SetFlags( IS_NEW ); + dimension->AdjustDimensionDetails(); + + // Add a VIEW_GROUP that serves as a preview for the new item + KIGFX::VIEW_GROUP preview( view ); + view->Add( &preview ); + + controls->ShowCursor( true ); + controls->SetSnapping( true ); + + Activate(); + + // Main loop: keep receiving events + while( OPT_TOOL_EVENT evt = Wait() ) + { + VECTOR2D cursorPos = view->ToWorld( controls->GetCursorPosition() ); + + if( evt->IsCancel() ) + { + delete dimension; + break; + } + + else if( evt->IsKeyUp() ) + { + int width = dimension->GetWidth(); + + // Modify the new item width + if( evt->KeyCode() == '-' && width > WIDTH_STEP ) + dimension->SetWidth( width - WIDTH_STEP ); + else if( evt->KeyCode() == '=' ) + dimension->SetWidth( width + WIDTH_STEP ); + + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + + else if( evt->IsClick( BUT_LEFT ) ) + { + switch( step ) + { + case 0: + { + LAYER_NUM layer = getEditFrame()->GetScreen()->m_Active_Layer; + + if( IsCopperLayer( layer ) ) + { + DisplayInfoMessage( NULL, _( "Graphic not allowed on Copper layers" ) ); + --step; + } + else + { + controls->SetAutoPan( true ); + + dimension->SetLayer( layer ); + dimension->SetOrigin( wxPoint( cursorPos.x, cursorPos.y ) ); + + preview.Add( dimension ); + } + } + break; + + case 2: + { + if( wxPoint( cursorPos.x, cursorPos.y ) != dimension->GetPosition() ) + { + view->Add( dimension ); + board->Add( dimension ); + dimension->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + } + break; + } + + if( ++step == 3 ) + break; + } + + else if( evt->IsMotion() ) + { + switch( step ) + { + case 1: + dimension->SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); + break; + + case 2: + { + /* Calculating the direction of travel perpendicular to the selected axis. */ + double angle = dimension->GetAngle() + ( M_PI / 2 ); + + wxPoint pos( cursorPos.x, cursorPos.y ); + wxPoint delta( pos - dimension->m_featureLineDO ); + double height = ( delta.x * cos( angle ) ) + ( delta.y * sin( angle ) ); + dimension->SetHeight( height ); + } + break; + } + + // Show a preview of the item + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + } + + controls->ShowCursor( false ); + controls->SetSnapping( false ); + controls->SetAutoPan( false ); + view->Remove( &preview ); + + setTransitions(); + + return 0; +} + + void DRAWING_TOOL::setTransitions() { Go( &DRAWING_TOOL::DrawLine, COMMON_ACTIONS::drawLine.MakeEvent() ); Go( &DRAWING_TOOL::DrawCircle, COMMON_ACTIONS::drawCircle.MakeEvent() ); Go( &DRAWING_TOOL::DrawArc, COMMON_ACTIONS::drawArc.MakeEvent() ); Go( &DRAWING_TOOL::DrawText, COMMON_ACTIONS::drawText.MakeEvent() ); + Go( &DRAWING_TOOL::DrawDimension, COMMON_ACTIONS::drawDimension.MakeEvent() ); } diff --git a/pcbnew/tools/drawing_tool.h b/pcbnew/tools/drawing_tool.h index 4e969860db..3af4c4fee7 100644 --- a/pcbnew/tools/drawing_tool.h +++ b/pcbnew/tools/drawing_tool.h @@ -57,6 +57,8 @@ public: int DrawText( TOOL_EVENT& aEvent ); + int DrawDimension( TOOL_EVENT& aEvent ); + private: ///> Starts drawing a selected shape. int draw( STROKE_T aShape ); diff --git a/pcbnew/tools/pcb_tools.cpp b/pcbnew/tools/pcb_tools.cpp index 73f9f14a5f..e05d294a11 100644 --- a/pcbnew/tools/pcb_tools.cpp +++ b/pcbnew/tools/pcb_tools.cpp @@ -59,6 +59,7 @@ void PCB_EDIT_FRAME::setupTools() m_toolManager->RegisterAction( &COMMON_ACTIONS::drawCircle ); m_toolManager->RegisterAction( &COMMON_ACTIONS::drawArc ); m_toolManager->RegisterAction( &COMMON_ACTIONS::drawText ); + m_toolManager->RegisterAction( &COMMON_ACTIONS::drawDimension ); // Register tools m_toolManager->RegisterTool( new SELECTION_TOOL ); From c09e8ade2a729ec43f845da015c65f08f2058b9f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 11 Feb 2014 14:39:14 +0100 Subject: [PATCH 101/741] Fixed ratsnest related segfaults on BOARD destruction. --- pcbnew/class_board.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index da3bd81fa9..7f7bbb5a43 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -110,14 +110,14 @@ BOARD::BOARD() : BOARD::~BOARD() { - delete m_ratsnest; - while( m_ZoneDescriptorList.size() ) { ZONE_CONTAINER* area_to_remove = m_ZoneDescriptorList[0]; Delete( area_to_remove ); } + delete m_ratsnest; + m_FullRatsnest.clear(); m_LocalRatsnest.clear(); From e43b5f7c0fb78c1d3a8b64442bbc38694eb29d03 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 11 Feb 2014 15:01:49 +0100 Subject: [PATCH 102/741] Small fix for crippled polylines containing 0 points. --- common/gal/opengl/opengl_gal.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index f9cccbd365..a665377e73 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -466,10 +466,13 @@ void OPENGL_GAL::DrawRectangle( const VECTOR2D& aStartPoint, const VECTOR2D& aEn void OPENGL_GAL::DrawPolyline( std::deque& aPointList ) { + if( aPointList.empty() ) + return; + std::deque::const_iterator it = aPointList.begin(); // Start from the second point - for( it++; it != aPointList.end(); it++ ) + for( ++it; it != aPointList.end(); ++it ) { const VECTOR2D startEndVector = ( *it - *( it - 1 ) ); double lineAngle = startEndVector.Angle(); From 87d3458ea9c6bf8d5807b4b6276faced82c4f382 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 11 Feb 2014 17:15:33 +0100 Subject: [PATCH 103/741] Added PCB_TARGET placing tool. --- pcbnew/target_edit.cpp | 6 ++- pcbnew/tools/common_actions.cpp | 4 ++ pcbnew/tools/common_actions.h | 3 ++ pcbnew/tools/drawing_tool.cpp | 73 +++++++++++++++++++++++++++++++++ pcbnew/tools/drawing_tool.h | 2 + pcbnew/tools/pcb_tools.cpp | 1 + 6 files changed, 87 insertions(+), 2 deletions(-) diff --git a/pcbnew/target_edit.cpp b/pcbnew/target_edit.cpp index dba25a86d2..75989719c9 100644 --- a/pcbnew/target_edit.cpp +++ b/pcbnew/target_edit.cpp @@ -127,7 +127,8 @@ void TARGET_PROPERTIES_DIALOG_EDITOR::OnCancelClick( wxCommandEvent& event ) */ void TARGET_PROPERTIES_DIALOG_EDITOR::OnOkClick( wxCommandEvent& event ) { - m_Target->Draw( m_Parent->GetCanvas(), m_DC, GR_XOR ); + if( m_DC ) + m_Target->Draw( m_Parent->GetCanvas(), m_DC, GR_XOR ); // Save old item in undo list, if is is not currently edited (will be later if so) if( m_Target->GetFlags() == 0 ) @@ -145,7 +146,8 @@ void TARGET_PROPERTIES_DIALOG_EDITOR::OnOkClick( wxCommandEvent& event ) m_Target->SetShape( m_TargetShape->GetSelection() ? 1 : 0 ); - m_Target->Draw( m_Parent->GetCanvas(), m_DC, ( m_Target->IsMoving() ) ? GR_XOR : GR_OR ); + if( m_DC ) + m_Target->Draw( m_Parent->GetCanvas(), m_DC, ( m_Target->IsMoving() ) ? GR_XOR : GR_OR ); m_Parent->OnModify(); EndModal( 1 ); diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 4649123d24..de860ccc06 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -76,3 +76,7 @@ TOOL_ACTION COMMON_ACTIONS::drawText( "pcbnew.InteractiveDrawing.text", TOOL_ACTION COMMON_ACTIONS::drawDimension( "pcbnew.InteractiveDrawing.dimension", AS_GLOBAL, 'X', "Add a dimension", "Add a dimension" ); + +TOOL_ACTION COMMON_ACTIONS::placeTarget( "pcbnew.InteractiveDrawing.placeTarget", + AS_GLOBAL, 'C', + "Add layer alignment target", "Add layer alignment target" ); diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index c2e350a67d..732aa22e7d 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -71,4 +71,7 @@ public: /// Activation of the drawing tool (dimension) static TOOL_ACTION drawDimension; + + /// Activation of the drawing tool (placing a TARGET) + static TOOL_ACTION placeTarget; }; diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index bfe59af214..28c287ea7a 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -558,6 +559,77 @@ int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent ) } +int DRAWING_TOOL::PlaceTarget( TOOL_EVENT& aEvent ) +{ + KIGFX::VIEW* view = getView(); + KIGFX::VIEW_CONTROLS* controls = getViewControls(); + BOARD* board = getModel( PCB_T ); + PCB_TARGET* target = new PCB_TARGET( board ); + + // Init the new item attributes + target->SetLayer( EDGE_N ); + target->SetWidth( board->GetDesignSettings().m_EdgeSegmentWidth ); + target->SetSize( Millimeter2iu( 5 ) ); + + // Add a VIEW_GROUP that serves as a preview for the new item + KIGFX::VIEW_GROUP preview( view ); + preview.Add( target ); + view->Add( &preview ); + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + + controls->SetSnapping( true ); + + Activate(); + + // Main loop: keep receiving events + while( OPT_TOOL_EVENT evt = Wait() ) + { + VECTOR2D cursorPos = view->ToWorld( controls->GetCursorPosition() ); + + if( evt->IsCancel() ) + { + delete target; + break; + } + + else if( evt->IsKeyUp() ) + { + int width = target->GetWidth(); + + // Modify the new item width + if( evt->KeyCode() == '-' && width > WIDTH_STEP ) + target->SetWidth( width - WIDTH_STEP ); + else if( evt->KeyCode() == '=' ) + target->SetWidth( width + WIDTH_STEP ); + + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + + else if( evt->IsClick( BUT_LEFT ) ) + { + view->Add( target ); + board->Add( target ); + target->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + break; + } + + else if( evt->IsMotion() ) + { + target->SetPosition( wxPoint( cursorPos.x, cursorPos.y ) ); + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + } + + controls->SetSnapping( false ); + controls->SetAutoPan( false ); + view->Remove( &preview ); + + setTransitions(); + + return 0; +} + + void DRAWING_TOOL::setTransitions() { Go( &DRAWING_TOOL::DrawLine, COMMON_ACTIONS::drawLine.MakeEvent() ); @@ -565,4 +637,5 @@ void DRAWING_TOOL::setTransitions() Go( &DRAWING_TOOL::DrawArc, COMMON_ACTIONS::drawArc.MakeEvent() ); Go( &DRAWING_TOOL::DrawText, COMMON_ACTIONS::drawText.MakeEvent() ); Go( &DRAWING_TOOL::DrawDimension, COMMON_ACTIONS::drawDimension.MakeEvent() ); + Go( &DRAWING_TOOL::PlaceTarget, COMMON_ACTIONS::placeTarget.MakeEvent() ); } diff --git a/pcbnew/tools/drawing_tool.h b/pcbnew/tools/drawing_tool.h index 3af4c4fee7..c34109a2cf 100644 --- a/pcbnew/tools/drawing_tool.h +++ b/pcbnew/tools/drawing_tool.h @@ -59,6 +59,8 @@ public: int DrawDimension( TOOL_EVENT& aEvent ); + int PlaceTarget( TOOL_EVENT& aEvent ); + private: ///> Starts drawing a selected shape. int draw( STROKE_T aShape ); diff --git a/pcbnew/tools/pcb_tools.cpp b/pcbnew/tools/pcb_tools.cpp index e05d294a11..9202ddb4b5 100644 --- a/pcbnew/tools/pcb_tools.cpp +++ b/pcbnew/tools/pcb_tools.cpp @@ -60,6 +60,7 @@ void PCB_EDIT_FRAME::setupTools() m_toolManager->RegisterAction( &COMMON_ACTIONS::drawArc ); m_toolManager->RegisterAction( &COMMON_ACTIONS::drawText ); m_toolManager->RegisterAction( &COMMON_ACTIONS::drawDimension ); + m_toolManager->RegisterAction( &COMMON_ACTIONS::placeTarget ); // Register tools m_toolManager->RegisterTool( new SELECTION_TOOL ); From ec763dfedec1c614b0a35f643d10dfa01e3615e8 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 12 Feb 2014 18:01:03 +0100 Subject: [PATCH 104/741] NETINFO_ITEM for orphaned items now have empty netname and net code = 0 (to avoid problems). Fixed case for the footprint legacy plugin when added module's do not have set parent (BOARD). Added copyright notice for pcbnew/class_netinfolist.cpp (feel free to correct, it is just copied from corresponding header file). --- pcbnew/class_netinfolist.cpp | 30 ++++++++++++++++++++++++++++-- pcbnew/legacy_plugin.cpp | 5 ++++- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/pcbnew/class_netinfolist.cpp b/pcbnew/class_netinfolist.cpp index 34b2eded9a..ac8962958e 100644 --- a/pcbnew/class_netinfolist.cpp +++ b/pcbnew/class_netinfolist.cpp @@ -1,3 +1,27 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2009 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com + * Copyright (C) 1992-2012 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 + */ + /** * @file class_netinfolist.cpp */ @@ -230,7 +254,8 @@ void NETINFO_MAPPING::Update() // Prepare the new mapping m_netMapping.clear(); - // Now the nets variable stores all the used net codes (not only for pads) + // Now the nets variable stores all the used net codes (not only for pads) and we are ready to + // assign new consecutive net numbers int newNetCode = 0; for( std::set::const_iterator it = nets.begin(), itEnd = nets.end(); it != itEnd; ++it ) m_netMapping[*it] = newNetCode++; @@ -249,5 +274,6 @@ NETINFO_ITEM* NETINFO_MAPPING::iterator::operator->() const } -const NETINFO_ITEM NETINFO_LIST::ORPHANED = NETINFO_ITEM( NULL, wxString::FromUTF8( "orphaned" ), -1 ); const int NETINFO_LIST::UNCONNECTED = 0; +const NETINFO_ITEM NETINFO_LIST::ORPHANED = NETINFO_ITEM( NULL, wxEmptyString, + NETINFO_LIST::UNCONNECTED ); diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index 0ab7069d3d..727f635dfd 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -1303,7 +1303,10 @@ void LEGACY_PLUGIN::loadPAD( MODULE* aModule ) // read Netname ReadDelimitedText( buf, data, sizeof(buf) ); - assert( m_board->FindNet( netcode )->GetNetname() == FROM_UTF8( StrPurge( buf ) ) ); +#ifndef NDEBUG + if( m_board ) + assert( m_board->FindNet( netcode )->GetNetname() == FROM_UTF8( StrPurge( buf ) ) ); +#endif /* NDEBUG */ } else if( TESTLINE( "Po" ) ) // (Po)sition From ba1867fe0e96be4c380c30f214399ca7c32a640d Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 12 Feb 2014 18:04:27 +0100 Subject: [PATCH 105/741] Merged fix from the selection_tool branch. --- pcbnew/class_netinfolist.cpp | 30 ++++++++++++++++++++++++++++-- pcbnew/legacy_plugin.cpp | 5 ++++- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/pcbnew/class_netinfolist.cpp b/pcbnew/class_netinfolist.cpp index 34b2eded9a..ac8962958e 100644 --- a/pcbnew/class_netinfolist.cpp +++ b/pcbnew/class_netinfolist.cpp @@ -1,3 +1,27 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2009 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com + * Copyright (C) 1992-2012 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 + */ + /** * @file class_netinfolist.cpp */ @@ -230,7 +254,8 @@ void NETINFO_MAPPING::Update() // Prepare the new mapping m_netMapping.clear(); - // Now the nets variable stores all the used net codes (not only for pads) + // Now the nets variable stores all the used net codes (not only for pads) and we are ready to + // assign new consecutive net numbers int newNetCode = 0; for( std::set::const_iterator it = nets.begin(), itEnd = nets.end(); it != itEnd; ++it ) m_netMapping[*it] = newNetCode++; @@ -249,5 +274,6 @@ NETINFO_ITEM* NETINFO_MAPPING::iterator::operator->() const } -const NETINFO_ITEM NETINFO_LIST::ORPHANED = NETINFO_ITEM( NULL, wxString::FromUTF8( "orphaned" ), -1 ); const int NETINFO_LIST::UNCONNECTED = 0; +const NETINFO_ITEM NETINFO_LIST::ORPHANED = NETINFO_ITEM( NULL, wxEmptyString, + NETINFO_LIST::UNCONNECTED ); diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index cdb598ad27..97777200ea 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -1303,7 +1303,10 @@ void LEGACY_PLUGIN::loadPAD( MODULE* aModule ) // read Netname ReadDelimitedText( buf, data, sizeof(buf) ); - assert( m_board->FindNet( netcode )->GetNetname() == FROM_UTF8( StrPurge( buf ) ) ); +#ifndef NDEBUG + if( m_board ) + assert( m_board->FindNet( netcode )->GetNetname() == FROM_UTF8( StrPurge( buf ) ) ); +#endif /* NDEBUG */ } else if( TESTLINE( "Po" ) ) // (Po)sition From 45c5a3de7feb9e64659baff0884c35df16d92e2d Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 13 Feb 2014 12:46:39 +0100 Subject: [PATCH 106/741] Placing modules with a minor bug. --- pcbnew/pcbframe.cpp | 19 +------ pcbnew/tools/common_actions.cpp | 4 ++ pcbnew/tools/common_actions.h | 3 ++ pcbnew/tools/drawing_tool.cpp | 92 +++++++++++++++++++++++++++++++-- pcbnew/tools/drawing_tool.h | 2 + pcbnew/tools/pcb_tools.cpp | 1 + 6 files changed, 100 insertions(+), 21 deletions(-) diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 15822a9b17..0331d6b326 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -569,24 +569,7 @@ void PCB_EDIT_FRAME::ViewReloadBoard( const BOARD* aBoard ) const // Load modules and its additional elements for( MODULE* module = aBoard->m_Modules; module; module = module->Next() ) { - // Load module's pads - for( D_PAD* pad = module->Pads().GetFirst(); pad; pad = pad->Next() ) - { - view->Add( pad ); - } - - // Load module's drawing (mostly silkscreen) - for( BOARD_ITEM* drawing = module->GraphicalItems().GetFirst(); drawing; - drawing = drawing->Next() ) - { - view->Add( drawing ); - } - - // Load module's texts (name and value) - view->Add( &module->Reference() ); - view->Add( &module->Value() ); - - // Add the module itself + module->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Add ), view ) ); view->Add( module ); } diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index de860ccc06..f3ea912d31 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -80,3 +80,7 @@ TOOL_ACTION COMMON_ACTIONS::drawDimension( "pcbnew.InteractiveDrawing.dimension" TOOL_ACTION COMMON_ACTIONS::placeTarget( "pcbnew.InteractiveDrawing.placeTarget", AS_GLOBAL, 'C', "Add layer alignment target", "Add layer alignment target" ); + +TOOL_ACTION COMMON_ACTIONS::placeModule( "pcbnew.InteractiveDrawing.placeModule", + AS_GLOBAL, 'V', + "Add modules", "Add modules" ); diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index 732aa22e7d..fa07c45ce4 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -74,4 +74,7 @@ public: /// Activation of the drawing tool (placing a TARGET) static TOOL_ACTION placeTarget; + + /// Activation of the drawing tool (placing a MODULE) + static TOOL_ACTION placeModule; }; diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index 28c287ea7a..b9433db085 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -26,16 +26,20 @@ #include "common_actions.h" #include +#include + #include #include +#include +#include + #include #include #include #include #include -#include -#include -#include +#include +#include // TODO to be removed if we do not need the flags DRAWING_TOOL::DRAWING_TOOL() : TOOL_INTERACTIVE( "pcbnew.InteractiveDrawing" ) @@ -570,6 +574,8 @@ int DRAWING_TOOL::PlaceTarget( TOOL_EVENT& aEvent ) target->SetLayer( EDGE_N ); target->SetWidth( board->GetDesignSettings().m_EdgeSegmentWidth ); target->SetSize( Millimeter2iu( 5 ) ); + VECTOR2D cursorPos = view->ToWorld( controls->GetCursorPosition() ); + target->SetPosition( wxPoint( cursorPos.x, cursorPos.y ) ); // Add a VIEW_GROUP that serves as a preview for the new item KIGFX::VIEW_GROUP preview( view ); @@ -630,6 +636,85 @@ int DRAWING_TOOL::PlaceTarget( TOOL_EVENT& aEvent ) } +int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent ) +{ + KIGFX::VIEW* view = getView(); + KIGFX::VIEW_CONTROLS* controls = getViewControls(); + BOARD* board = getModel( PCB_T ); + PCB_EDIT_FRAME* editFrame = getEditFrame(); + MODULE* module = editFrame->LoadModuleFromLibrary( wxEmptyString, + editFrame->GetFootprintLibraryTable(), true, NULL ); + if( module == NULL ) + { + setTransitions(); + return 0; + } + + // Init the new item attributes + VECTOR2D cursorPos = view->ToWorld( controls->GetCursorPosition() ); + module->SetPosition( wxPoint( cursorPos.x, cursorPos.y ) ); + + // Add a VIEW_GROUP that serves as a preview for the new item + KIGFX::VIEW_GROUP preview( view ); + preview.Add( module ); + module->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW_GROUP::Add ), &preview ) ); + view->Add( &preview ); + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + + controls->SetSnapping( true ); + + Activate(); + + // Main loop: keep receiving events + while( OPT_TOOL_EVENT evt = Wait() ) + { + cursorPos = view->ToWorld( controls->GetCursorPosition() ); + + if( evt->IsCancel() ) + { + board->Delete( module ); + break; + } + + else if( evt->Category() == TC_COMMAND ) + { + if( evt->IsAction( &COMMON_ACTIONS::rotate ) ) + { + module->Rotate( module->GetPosition(), getEditFrame()->GetRotationAngle() ); + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + else if( evt->IsAction( &COMMON_ACTIONS::flip ) ) + { + module->Flip( module->GetPosition() ); + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + } + + else if( evt->IsClick( BUT_LEFT ) ) + { + module->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Add ), view ) ); + view->Add( module ); + module->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + break; + } + + else if( evt->IsMotion() ) + { + module->SetPosition( wxPoint( cursorPos.x, cursorPos.y ) ); + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + } + + controls->SetSnapping( false ); + controls->SetAutoPan( false ); + view->Remove( &preview ); + + setTransitions(); + + return 0; +} + + void DRAWING_TOOL::setTransitions() { Go( &DRAWING_TOOL::DrawLine, COMMON_ACTIONS::drawLine.MakeEvent() ); @@ -638,4 +723,5 @@ void DRAWING_TOOL::setTransitions() Go( &DRAWING_TOOL::DrawText, COMMON_ACTIONS::drawText.MakeEvent() ); Go( &DRAWING_TOOL::DrawDimension, COMMON_ACTIONS::drawDimension.MakeEvent() ); Go( &DRAWING_TOOL::PlaceTarget, COMMON_ACTIONS::placeTarget.MakeEvent() ); + Go( &DRAWING_TOOL::PlaceModule, COMMON_ACTIONS::placeModule.MakeEvent() ); } diff --git a/pcbnew/tools/drawing_tool.h b/pcbnew/tools/drawing_tool.h index c34109a2cf..1a33d4f7f8 100644 --- a/pcbnew/tools/drawing_tool.h +++ b/pcbnew/tools/drawing_tool.h @@ -61,6 +61,8 @@ public: int PlaceTarget( TOOL_EVENT& aEvent ); + int PlaceModule( TOOL_EVENT& aEvent ); + private: ///> Starts drawing a selected shape. int draw( STROKE_T aShape ); diff --git a/pcbnew/tools/pcb_tools.cpp b/pcbnew/tools/pcb_tools.cpp index 9202ddb4b5..7d2ed216be 100644 --- a/pcbnew/tools/pcb_tools.cpp +++ b/pcbnew/tools/pcb_tools.cpp @@ -61,6 +61,7 @@ void PCB_EDIT_FRAME::setupTools() m_toolManager->RegisterAction( &COMMON_ACTIONS::drawText ); m_toolManager->RegisterAction( &COMMON_ACTIONS::drawDimension ); m_toolManager->RegisterAction( &COMMON_ACTIONS::placeTarget ); + m_toolManager->RegisterAction( &COMMON_ACTIONS::placeModule ); // Register tools m_toolManager->RegisterTool( new SELECTION_TOOL ); From 042b6a100293e4ef88468d36f5da8faa43b91c5a Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 13 Feb 2014 15:57:57 +0100 Subject: [PATCH 107/741] Changed PCB_EDIT_FRAME::setTopLayer() to PCB_EDIT_FRAME::SetTopLayer() and changed to public (as it had exactly the same functionality). --- include/wxPcbStruct.h | 18 ++++++------------ pcbnew/pcbframe.cpp | 4 ++-- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index 1b5bc4b299..18f208b04f 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -156,12 +156,6 @@ protected: */ void setHighContrastLayer( LAYER_NUM aLayer ); - /** - * Function setTopLayer - * moves the selected layer to the top, so it is displayed above all others. - */ - void setTopLayer( LAYER_NUM aLayer ); - /** * Function syncLayerWidgetLayer * updates the currently layer "selection" within the PCB_LAYER_WIDGET. @@ -578,6 +572,12 @@ public: */ virtual void OnModify(); + /** + * Function SetTopLayer + * moves the selected layer to the top, so it is displayed above all others. + */ + void SetTopLayer( LAYER_NUM aLayer ); + /** * Function IsElementVisible * tests whether a given element category is visible. Keep this as an @@ -1694,12 +1694,6 @@ public: */ void UpdateTitle(); - void SetTopLayer( LAYER_NUM aLayer ) - { - setTopLayer( aLayer ); - } - - DECLARE_EVENT_TABLE() }; diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 0331d6b326..967f8dde9c 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -883,7 +883,7 @@ void PCB_EDIT_FRAME::setHighContrastLayer( LAYER_NUM aLayer ) KIGFX::VIEW* view = GetGalCanvas()->GetView(); KIGFX::RENDER_SETTINGS* rSettings = view->GetPainter()->GetSettings(); - setTopLayer( aLayer ); + SetTopLayer( aLayer ); rSettings->ClearActiveLayers(); rSettings->SetActiveLayer( aLayer ); @@ -920,7 +920,7 @@ void PCB_EDIT_FRAME::setHighContrastLayer( LAYER_NUM aLayer ) } -void PCB_EDIT_FRAME::setTopLayer( LAYER_NUM aLayer ) +void PCB_EDIT_FRAME::SetTopLayer( LAYER_NUM aLayer ) { // Set display settings for high contrast mode KIGFX::VIEW* view = GetGalCanvas()->GetView(); From fce753ba24ddccd6a474d83549491382cb2de7f4 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 13 Feb 2014 16:10:32 +0100 Subject: [PATCH 108/741] Added zone drawing tool. --- pcbnew/tools/common_actions.cpp | 4 + pcbnew/tools/common_actions.h | 3 + pcbnew/tools/drawing_tool.cpp | 153 ++++++++++++++++++++++++++++++++ pcbnew/tools/drawing_tool.h | 2 + pcbnew/tools/pcb_tools.cpp | 1 + 5 files changed, 163 insertions(+) diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index f3ea912d31..0a6cceaa7b 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -77,6 +77,10 @@ TOOL_ACTION COMMON_ACTIONS::drawDimension( "pcbnew.InteractiveDrawing.dimension" AS_GLOBAL, 'X', "Add a dimension", "Add a dimension" ); +TOOL_ACTION COMMON_ACTIONS::drawZone( "pcbnew.InteractiveDrawing.zone", + AS_GLOBAL, 'B', + "Add a filled zone", "Add a filled zone" ); + TOOL_ACTION COMMON_ACTIONS::placeTarget( "pcbnew.InteractiveDrawing.placeTarget", AS_GLOBAL, 'C', "Add layer alignment target", "Add layer alignment target" ); diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index fa07c45ce4..76f3d9f2f7 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -72,6 +72,9 @@ public: /// Activation of the drawing tool (dimension) static TOOL_ACTION drawDimension; + /// Activation of the drawing tool (drawing a ZONE) + static TOOL_ACTION drawZone; + /// Activation of the drawing tool (placing a TARGET) static TOOL_ACTION placeTarget; diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index b9433db085..4100be4e3a 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -38,6 +38,7 @@ #include #include #include +#include #include #include // TODO to be removed if we do not need the flags @@ -563,6 +564,157 @@ int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent ) } +int DRAWING_TOOL::DrawZone( TOOL_EVENT& aEvent ) +{ + KIGFX::VIEW* view = getView(); + KIGFX::VIEW_CONTROLS* controls = getViewControls(); + BOARD* board = getModel( PCB_T ); + ZONE_CONTAINER* zone = new ZONE_CONTAINER( board ); + PCB_EDIT_FRAME* editFrame = getEditFrame(); + + // Get the current, default settings for zones + ZONE_SETTINGS zoneInfo = editFrame->GetZoneSettings(); + + ZONE_EDIT_T dialogResult; + if( IsCopperLayer( editFrame->GetScreen()->m_Active_Layer ) ) + dialogResult = InvokeCopperZonesEditor( editFrame, &zoneInfo ); + else + dialogResult = InvokeNonCopperZonesEditor( editFrame, zone, &zoneInfo ); + + if( dialogResult == ZONE_ABORT ) + { + delete zone; + setTransitions(); + return 0; + } + + zoneInfo.ExportSetting( *zone ); + editFrame->SetTopLayer( zoneInfo.m_CurrentZone_Layer ); + + DRAWSEGMENT* helperLine = new DRAWSEGMENT; + helperLine->SetShape( S_SEGMENT ); + helperLine->SetLayer( zoneInfo.m_CurrentZone_Layer ); + helperLine->SetWidth( 1 ); + + // Add a VIEW_GROUP that serves as a preview for the new item + KIGFX::VIEW_GROUP preview( view ); +// preview.Add( zone ); + view->Add( &preview ); + + controls->ShowCursor( true ); + controls->SetSnapping( true ); + controls->SetAutoPan( true ); + + Activate(); + + VECTOR2D lastCursorPos = view->ToWorld( controls->GetCursorPosition() ); + + // Main loop: keep receiving events + while( OPT_TOOL_EVENT evt = Wait() ) + { + // Enable 45 degrees lines only mode by holding shift + bool linesAngle45 = evt->Modifier( MD_SHIFT ); + VECTOR2D cursorPos = view->ToWorld( controls->GetCursorPosition() ); + + if( evt->IsCancel() ) + { + delete zone; + break; + } + + else if( evt->IsClick( BUT_LEFT ) ) + { + if( lastCursorPos == cursorPos || + ( zone->GetNumCorners() > 0 && wxPoint( cursorPos.x, cursorPos.y ) == zone->Outline()->GetPos( 0 ) ) ) // TODO better conditions + { + if( zone->GetNumCorners() > 2 ) + { + // Finish the zone + zone->Outline()->CloseLastContour(); + zone->Outline()->RemoveNullSegments(); + + board->Add( zone ); + view->Add( zone ); + + editFrame->Fill_Zone( zone ); + zone->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + else + { + // That is not a valid zone + delete zone; + } + + break; + } + else + { + if( zone->GetNumCorners() == 0 ) + { + zone->Outline()->Start( zoneInfo.m_CurrentZone_Layer, + cursorPos.x, + cursorPos.y, + zone->GetHatchStyle() ); + helperLine->SetStart( wxPoint( cursorPos.x, cursorPos.y ) ); + preview.Add( helperLine ); + } + else + { + zone->AppendCorner( helperLine->GetEnd() ); + helperLine = new DRAWSEGMENT( *helperLine ); + preview.Add( helperLine ); + helperLine->SetStart( helperLine->GetEnd() ); + } + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + + lastCursorPos = cursorPos; + } + + else if( evt->IsMotion() ) + { + helperLine->SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); + + // 45 degree lines + if( linesAngle45 ) + { + VECTOR2D lineVector( wxPoint( cursorPos.x, cursorPos.y ) - helperLine->GetStart() ); + double angle = lineVector.Angle(); + + double newAngle = round( angle / ( M_PI / 4.0 ) ) * M_PI / 4.0; + VECTOR2D newLineVector = lineVector.Rotate( newAngle - angle ); + + // Snap the new line to the grid // TODO fix it, does not work good.. + VECTOR2D newLineEnd = VECTOR2D( helperLine->GetStart() ) + newLineVector; + VECTOR2D snapped = view->GetGAL()->GetGridPoint( newLineEnd ); + + helperLine->SetEnd( wxPoint( snapped.x, snapped.y ) ); + } + else + { + helperLine->SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); + } + + // Show a preview of the item + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + } + + controls->ShowCursor( false ); + controls->SetSnapping( false ); + controls->SetAutoPan( false ); + view->Remove( &preview ); + + // remove helper lines only +// preview.Remove( zone ); + preview.FreeItems(); + + setTransitions(); + + return 0; +} + + int DRAWING_TOOL::PlaceTarget( TOOL_EVENT& aEvent ) { KIGFX::VIEW* view = getView(); @@ -722,6 +874,7 @@ void DRAWING_TOOL::setTransitions() Go( &DRAWING_TOOL::DrawArc, COMMON_ACTIONS::drawArc.MakeEvent() ); Go( &DRAWING_TOOL::DrawText, COMMON_ACTIONS::drawText.MakeEvent() ); Go( &DRAWING_TOOL::DrawDimension, COMMON_ACTIONS::drawDimension.MakeEvent() ); + Go( &DRAWING_TOOL::DrawZone, COMMON_ACTIONS::drawZone.MakeEvent() ); Go( &DRAWING_TOOL::PlaceTarget, COMMON_ACTIONS::placeTarget.MakeEvent() ); Go( &DRAWING_TOOL::PlaceModule, COMMON_ACTIONS::placeModule.MakeEvent() ); } diff --git a/pcbnew/tools/drawing_tool.h b/pcbnew/tools/drawing_tool.h index 1a33d4f7f8..419604345f 100644 --- a/pcbnew/tools/drawing_tool.h +++ b/pcbnew/tools/drawing_tool.h @@ -59,6 +59,8 @@ public: int DrawDimension( TOOL_EVENT& aEvent ); + int DrawZone( TOOL_EVENT& aEvent ); + int PlaceTarget( TOOL_EVENT& aEvent ); int PlaceModule( TOOL_EVENT& aEvent ); diff --git a/pcbnew/tools/pcb_tools.cpp b/pcbnew/tools/pcb_tools.cpp index 7d2ed216be..bceee5f8d7 100644 --- a/pcbnew/tools/pcb_tools.cpp +++ b/pcbnew/tools/pcb_tools.cpp @@ -60,6 +60,7 @@ void PCB_EDIT_FRAME::setupTools() m_toolManager->RegisterAction( &COMMON_ACTIONS::drawArc ); m_toolManager->RegisterAction( &COMMON_ACTIONS::drawText ); m_toolManager->RegisterAction( &COMMON_ACTIONS::drawDimension ); + m_toolManager->RegisterAction( &COMMON_ACTIONS::drawZone ); m_toolManager->RegisterAction( &COMMON_ACTIONS::placeTarget ); m_toolManager->RegisterAction( &COMMON_ACTIONS::placeModule ); From 3106d25361204cbddfcf27195ce3bb6f771cd593 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 13 Feb 2014 16:24:33 +0100 Subject: [PATCH 109/741] Added keepout areas drawing tool. --- pcbnew/tools/common_actions.cpp | 4 + pcbnew/tools/common_actions.h | 3 + pcbnew/tools/drawing_tool.cpp | 148 +++++++++++++++++++++++++++++++- pcbnew/tools/drawing_tool.h | 2 + pcbnew/tools/pcb_tools.cpp | 1 + 5 files changed, 155 insertions(+), 3 deletions(-) diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 0a6cceaa7b..339087bdb8 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -81,6 +81,10 @@ TOOL_ACTION COMMON_ACTIONS::drawZone( "pcbnew.InteractiveDrawing.zone", AS_GLOBAL, 'B', "Add a filled zone", "Add a filled zone" ); +TOOL_ACTION COMMON_ACTIONS::drawKeepout( "pcbnew.InteractiveDrawing.keepout", + AS_GLOBAL, 'N', + "Add a keepout area", "Add a keepout area" ); + TOOL_ACTION COMMON_ACTIONS::placeTarget( "pcbnew.InteractiveDrawing.placeTarget", AS_GLOBAL, 'C', "Add layer alignment target", "Add layer alignment target" ); diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index 76f3d9f2f7..fc66573988 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -75,6 +75,9 @@ public: /// Activation of the drawing tool (drawing a ZONE) static TOOL_ACTION drawZone; + /// Activation of the drawing tool (drawing a keepout area) + static TOOL_ACTION drawKeepout; + /// Activation of the drawing tool (placing a TARGET) static TOOL_ACTION placeTarget; diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index 4100be4e3a..2c08379718 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -598,7 +598,6 @@ int DRAWING_TOOL::DrawZone( TOOL_EVENT& aEvent ) // Add a VIEW_GROUP that serves as a preview for the new item KIGFX::VIEW_GROUP preview( view ); -// preview.Add( zone ); view->Add( &preview ); controls->ShowCursor( true ); @@ -705,8 +704,150 @@ int DRAWING_TOOL::DrawZone( TOOL_EVENT& aEvent ) controls->SetAutoPan( false ); view->Remove( &preview ); - // remove helper lines only -// preview.Remove( zone ); + // delete helper lines + preview.FreeItems(); + + setTransitions(); + + return 0; +} + + +int DRAWING_TOOL::DrawKeepout( TOOL_EVENT& aEvent ) +{ + KIGFX::VIEW* view = getView(); + KIGFX::VIEW_CONTROLS* controls = getViewControls(); + BOARD* board = getModel( PCB_T ); + ZONE_CONTAINER* keepout = new ZONE_CONTAINER( board ); + PCB_EDIT_FRAME* editFrame = getEditFrame(); + + // Get the current, default settings for zones + ZONE_SETTINGS zoneInfo = editFrame->GetZoneSettings(); + + ZONE_EDIT_T dialogResult = InvokeKeepoutAreaEditor( editFrame, &zoneInfo ); + if( dialogResult == ZONE_ABORT ) + { + delete keepout; + setTransitions(); + return 0; + } + + zoneInfo.ExportSetting( *keepout ); + editFrame->SetTopLayer( zoneInfo.m_CurrentZone_Layer ); + + DRAWSEGMENT* helperLine = new DRAWSEGMENT; + helperLine->SetShape( S_SEGMENT ); + helperLine->SetLayer( zoneInfo.m_CurrentZone_Layer ); + helperLine->SetWidth( 1 ); + + // Add a VIEW_GROUP that serves as a preview for the new item + KIGFX::VIEW_GROUP preview( view ); + view->Add( &preview ); + + controls->ShowCursor( true ); + controls->SetSnapping( true ); + controls->SetAutoPan( true ); + + Activate(); + + VECTOR2D lastCursorPos = view->ToWorld( controls->GetCursorPosition() ); + + // Main loop: keep receiving events + while( OPT_TOOL_EVENT evt = Wait() ) + { + // Enable 45 degrees lines only mode by holding shift + bool linesAngle45 = evt->Modifier( MD_SHIFT ); + VECTOR2D cursorPos = view->ToWorld( controls->GetCursorPosition() ); + + if( evt->IsCancel() ) + { + delete keepout; + break; + } + + else if( evt->IsClick( BUT_LEFT ) ) + { + if( lastCursorPos == cursorPos || + ( keepout->GetNumCorners() > 0 && wxPoint( cursorPos.x, cursorPos.y ) == keepout->Outline()->GetPos( 0 ) ) ) // TODO better conditions + { + if( keepout->GetNumCorners() > 2 ) + { + // Finish the zone + keepout->Outline()->CloseLastContour(); + keepout->Outline()->RemoveNullSegments(); + + board->Add( keepout ); + view->Add( keepout ); + + keepout->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + else + { + // That is not a valid zone + delete keepout; + } + + break; + } + else + { + if( keepout->GetNumCorners() == 0 ) + { + keepout->Outline()->Start( zoneInfo.m_CurrentZone_Layer, + cursorPos.x, + cursorPos.y, + keepout->GetHatchStyle() ); + helperLine->SetStart( wxPoint( cursorPos.x, cursorPos.y ) ); + preview.Add( helperLine ); + } + else + { + keepout->AppendCorner( helperLine->GetEnd() ); + helperLine = new DRAWSEGMENT( *helperLine ); + preview.Add( helperLine ); + helperLine->SetStart( helperLine->GetEnd() ); + } + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + + lastCursorPos = cursorPos; + } + + else if( evt->IsMotion() ) + { + helperLine->SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); + + // 45 degree lines + if( linesAngle45 ) + { + VECTOR2D lineVector( wxPoint( cursorPos.x, cursorPos.y ) - helperLine->GetStart() ); + double angle = lineVector.Angle(); + + double newAngle = round( angle / ( M_PI / 4.0 ) ) * M_PI / 4.0; + VECTOR2D newLineVector = lineVector.Rotate( newAngle - angle ); + + // Snap the new line to the grid // TODO fix it, does not work good.. + VECTOR2D newLineEnd = VECTOR2D( helperLine->GetStart() ) + newLineVector; + VECTOR2D snapped = view->GetGAL()->GetGridPoint( newLineEnd ); + + helperLine->SetEnd( wxPoint( snapped.x, snapped.y ) ); + } + else + { + helperLine->SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); + } + + // Show a preview of the item + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + } + + controls->ShowCursor( false ); + controls->SetSnapping( false ); + controls->SetAutoPan( false ); + view->Remove( &preview ); + + // delete helper lines preview.FreeItems(); setTransitions(); @@ -875,6 +1016,7 @@ void DRAWING_TOOL::setTransitions() Go( &DRAWING_TOOL::DrawText, COMMON_ACTIONS::drawText.MakeEvent() ); Go( &DRAWING_TOOL::DrawDimension, COMMON_ACTIONS::drawDimension.MakeEvent() ); Go( &DRAWING_TOOL::DrawZone, COMMON_ACTIONS::drawZone.MakeEvent() ); + Go( &DRAWING_TOOL::DrawKeepout, COMMON_ACTIONS::drawKeepout.MakeEvent() ); Go( &DRAWING_TOOL::PlaceTarget, COMMON_ACTIONS::placeTarget.MakeEvent() ); Go( &DRAWING_TOOL::PlaceModule, COMMON_ACTIONS::placeModule.MakeEvent() ); } diff --git a/pcbnew/tools/drawing_tool.h b/pcbnew/tools/drawing_tool.h index 419604345f..149eccda6a 100644 --- a/pcbnew/tools/drawing_tool.h +++ b/pcbnew/tools/drawing_tool.h @@ -61,6 +61,8 @@ public: int DrawZone( TOOL_EVENT& aEvent ); + int DrawKeepout( TOOL_EVENT& aEvent ); + int PlaceTarget( TOOL_EVENT& aEvent ); int PlaceModule( TOOL_EVENT& aEvent ); diff --git a/pcbnew/tools/pcb_tools.cpp b/pcbnew/tools/pcb_tools.cpp index bceee5f8d7..23c899b2fa 100644 --- a/pcbnew/tools/pcb_tools.cpp +++ b/pcbnew/tools/pcb_tools.cpp @@ -61,6 +61,7 @@ void PCB_EDIT_FRAME::setupTools() m_toolManager->RegisterAction( &COMMON_ACTIONS::drawText ); m_toolManager->RegisterAction( &COMMON_ACTIONS::drawDimension ); m_toolManager->RegisterAction( &COMMON_ACTIONS::drawZone ); + m_toolManager->RegisterAction( &COMMON_ACTIONS::drawKeepout ); m_toolManager->RegisterAction( &COMMON_ACTIONS::placeTarget ); m_toolManager->RegisterAction( &COMMON_ACTIONS::placeModule ); From f9f0b46b63e3d0589aaa144cc784d7e2dd0345ab Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 13 Feb 2014 19:31:27 +0100 Subject: [PATCH 110/741] Small GAL refactorization, mostly correcting constness. --- common/gal/cairo/cairo_gal.cpp | 5 +-- common/gal/graphics_abstraction_layer.cpp | 12 +++---- common/gal/opengl/opengl_gal.cpp | 2 +- common/view/view.cpp | 4 +-- common/view/wx_view_controls.cpp | 4 +-- include/gal/cairo/cairo_gal.h | 5 ++- include/gal/graphics_abstraction_layer.h | 42 ++++++++++++++--------- include/gal/opengl/opengl_gal.h | 2 +- 8 files changed, 41 insertions(+), 35 deletions(-) diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index 5f180d7338..2c172d0400 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -35,9 +35,6 @@ using namespace KIGFX; -///> Opacity of a single layer -const float LAYER_ALPHA = 0.8; - CAIRO_GAL::CAIRO_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, wxEvtHandler* aPaintListener, const wxString& aName ) : wxWindow( aParent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxEXPAND, aName ) @@ -430,7 +427,7 @@ void CAIRO_GAL::SetLayerDepth( double aLayerDepth ) } -void CAIRO_GAL::Transform( MATRIX3x3D aTransformation ) +void CAIRO_GAL::Transform( const MATRIX3x3D& aTransformation ) { cairo_matrix_t cairoTransformation; diff --git a/common/gal/graphics_abstraction_layer.cpp b/common/gal/graphics_abstraction_layer.cpp index 2a3d9a089c..67794a89c1 100644 --- a/common/gal/graphics_abstraction_layer.cpp +++ b/common/gal/graphics_abstraction_layer.cpp @@ -112,17 +112,17 @@ void GAL::DrawGrid() SetTarget( TARGET_NONCACHED ); // Draw the origin marker - double origSize = static_cast( gridOriginMarkerSize ) / worldScale; + double originSize = gridOriginMarkerSize / worldScale; SetLayerDepth( GAL::GRID_DEPTH ); SetIsFill( false ); SetIsStroke( true ); SetStrokeColor( COLOR4D( 1.0, 1.0, 1.0, 1.0 ) ); SetLineWidth( gridLineWidth / worldScale ); - DrawLine( gridOrigin + VECTOR2D( -origSize, -origSize ), - gridOrigin + VECTOR2D( origSize, origSize ) ); - DrawLine( gridOrigin + VECTOR2D( -origSize, origSize ), - gridOrigin + VECTOR2D( origSize, -origSize ) ); - DrawCircle( gridOrigin, origSize * 0.7 ); + DrawLine( gridOrigin + VECTOR2D( -originSize, -originSize ), + gridOrigin + VECTOR2D( originSize, originSize ) ); + DrawLine( gridOrigin + VECTOR2D( -originSize, originSize ), + gridOrigin + VECTOR2D( originSize, -originSize ) ); + DrawCircle( gridOrigin, originSize * 0.7 ); // Draw the grid // For the drawing the start points, end points and increments have diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index a665377e73..873fff51fd 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -600,7 +600,7 @@ void OPENGL_GAL::SetStrokeColor( const COLOR4D& aColor ) } -void OPENGL_GAL::Transform( MATRIX3x3D aTransformation ) +void OPENGL_GAL::Transform( const MATRIX3x3D& aTransformation ) { GLdouble matrixData[16] = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 }; diff --git a/common/view/view.cpp b/common/view/view.cpp index e27751bb76..e9c6324012 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -197,7 +197,7 @@ int VIEW::Query( const BOX2I& aRect, std::vector& aResult ) VECTOR2D VIEW::ToWorld( const VECTOR2D& aCoord, bool aAbsolute ) const { - MATRIX3x3D matrix = m_gal->GetWorldScreenMatrix().Inverse(); + const MATRIX3x3D& matrix = m_gal->GetScreenWorldMatrix(); if( aAbsolute ) { @@ -212,7 +212,7 @@ VECTOR2D VIEW::ToWorld( const VECTOR2D& aCoord, bool aAbsolute ) const VECTOR2D VIEW::ToScreen( const VECTOR2D& aCoord, bool aAbsolute ) const { - MATRIX3x3D matrix = m_gal->GetWorldScreenMatrix(); + const MATRIX3x3D& matrix = m_gal->GetWorldScreenMatrix(); if( aAbsolute ) { diff --git a/common/view/wx_view_controls.cpp b/common/view/wx_view_controls.cpp index 48107911d2..ef919c68e6 100644 --- a/common/view/wx_view_controls.cpp +++ b/common/view/wx_view_controls.cpp @@ -35,9 +35,7 @@ using namespace KIGFX; const wxEventType WX_VIEW_CONTROLS::EVT_REFRESH_MOUSE = wxNewEventType(); WX_VIEW_CONTROLS::WX_VIEW_CONTROLS( VIEW* aView, wxWindow* aParentPanel ) : - VIEW_CONTROLS( aView ), - m_state( IDLE ), - m_parentPanel( aParentPanel ) + VIEW_CONTROLS( aView ), m_state( IDLE ), m_parentPanel( aParentPanel ) { m_parentPanel->Connect( wxEVT_MOTION, wxMouseEventHandler( WX_VIEW_CONTROLS::onMotion ), NULL, this ); diff --git a/include/gal/cairo/cairo_gal.h b/include/gal/cairo/cairo_gal.h index 20477db08a..8da314560e 100644 --- a/include/gal/cairo/cairo_gal.h +++ b/include/gal/cairo/cairo_gal.h @@ -164,7 +164,7 @@ public: // -------------- /// @copydoc GAL::Transform() - virtual void Transform( MATRIX3x3D aTransformation ); + virtual void Transform( const MATRIX3x3D& aTransformation ); /// @copydoc GAL::Rotate() virtual void Rotate( double aAngle ); @@ -386,6 +386,9 @@ private: /// Format used to store pixels static const cairo_format_t GAL_FORMAT = CAIRO_FORMAT_RGB24; + + ///> Opacity of a single layer + static const float LAYER_ALPHA = 0.8; }; } // namespace KIGFX diff --git a/include/gal/graphics_abstraction_layer.h b/include/gal/graphics_abstraction_layer.h index 118faf38ac..a6fad9b6fc 100644 --- a/include/gal/graphics_abstraction_layer.h +++ b/include/gal/graphics_abstraction_layer.h @@ -31,8 +31,6 @@ #include #include -#include - #include #include @@ -162,7 +160,7 @@ public: virtual bool Show( bool aShow ) = 0; /// @brief Returns GAL canvas size in pixels - VECTOR2D GetScreenPixelSize() const + const VECTOR2D& GetScreenPixelSize() const { return screenSize; } @@ -222,7 +220,7 @@ public: * * @return the color for stroking the outline. */ - inline COLOR4D GetStrokeColor() + inline const COLOR4D& GetStrokeColor() const { return strokeColor; } @@ -252,7 +250,7 @@ public: * * @return the actual line width. */ - inline double GetLineWidth() + inline double GetLineWidth() const { return lineWidth; } @@ -335,7 +333,7 @@ public: * * @param aTransformation is the ransformation matrix. */ - virtual void Transform( MATRIX3x3D aTransformation ) = 0; + virtual void Transform( const MATRIX3x3D& aTransformation ) = 0; /** * @brief Rotate the context. @@ -428,11 +426,21 @@ public: * * @return the transformation matrix. */ - MATRIX3x3D GetWorldScreenMatrix() + const MATRIX3x3D& GetWorldScreenMatrix() const { return worldScreenMatrix; } + /** + * @brief Get the screen <-> world transformation matrix. + * + * @return the transformation matrix. + */ + const MATRIX3x3D& GetScreenWorldMatrix() const + { + return screenWorldMatrix; + } + /** * @brief Set the world <-> screen transformation matrix. * @@ -487,7 +495,7 @@ public: * * @return the look at point. */ - inline VECTOR2D GetLookAtPoint() + inline const VECTOR2D& GetLookAtPoint() const { return lookAtPoint; } @@ -507,7 +515,7 @@ public: * * @return the zoom factor. */ - inline double GetZoomFactor() + inline double GetZoomFactor() const { return zoomFactor; } @@ -528,7 +536,7 @@ public: /** * @brief Returns the minimum depth in the currently used range (the top). */ - inline double GetMinDepth() + inline double GetMinDepth() const { return depthRange.x; } @@ -536,7 +544,7 @@ public: /** * @brief Returns the maximum depth in the currently used range (the bottom). */ - inline double GetMaxDepth() + inline double GetMaxDepth() const { return depthRange.y; } @@ -546,7 +554,7 @@ public: * * @return the actual world scale factor. */ - inline double GetWorldScale() + inline double GetWorldScale() const { return worldScale; } @@ -694,7 +702,7 @@ public: * * @return the grid line width */ - inline double GetGridLineWidth() + inline double GetGridLineWidth() const { return gridLineWidth; } @@ -739,7 +747,7 @@ public: * @param aPoint the pointposition in screen coordinates. * @return the point position in world coordinates. */ - inline virtual VECTOR2D ToWorld( const VECTOR2D& aPoint ) const + inline VECTOR2D ToWorld( const VECTOR2D& aPoint ) const { return VECTOR2D( screenWorldMatrix * aPoint ); } @@ -750,15 +758,15 @@ public: * @param aPoint the pointposition in world coordinates. * @return the point position in screen coordinates. */ - inline virtual VECTOR2D ToScreen( const VECTOR2D& aPoint ) const + inline VECTOR2D ToScreen( const VECTOR2D& aPoint ) const { return VECTOR2D( worldScreenMatrix * aPoint ); } /** - * @brief Enable/Disable cursor. + * @brief Enable/disable cursor. * - * @param aIsCursorEnabled is true if the cursor should be enabled, else false. + * @param aCursorEnabled is true if the cursor should be drawn, else false. */ inline void SetCursorEnabled( bool aCursorEnabled ) { diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index 401f0a4411..792205c91d 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -157,7 +157,7 @@ public: // -------------- /// @copydoc GAL::Transform() - virtual void Transform( MATRIX3x3D aTransformation ); + virtual void Transform( const MATRIX3x3D& aTransformation ); /// @copydoc GAL::Rotate() virtual void Rotate( double aAngle ); From 597e98dbf476c9dc0ca0ed3e6aa61082d4668b8c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 13 Feb 2014 20:23:28 +0100 Subject: [PATCH 111/741] Cursor is in world coordinates. --- common/drawpanel_gal.cpp | 11 ------ common/gal/cairo/cairo_gal.cpp | 22 ++++++------ common/gal/graphics_abstraction_layer.cpp | 3 ++ common/gal/opengl/opengl_gal.cpp | 23 +++--------- common/view/wx_view_controls.cpp | 44 +++++++++++------------ include/gal/cairo/cairo_gal.h | 8 ++--- include/gal/graphics_abstraction_layer.h | 20 ++++------- include/gal/opengl/opengl_gal.h | 5 --- include/view/view_controls.h | 17 ++++----- include/view/wx_view_controls.h | 20 ++--------- pcbnew/router/router_tool.cpp | 2 +- pcbnew/tools/drawing_tool.cpp | 25 +++++++------ pcbnew/tools/edit_tool.cpp | 11 +++--- 13 files changed, 81 insertions(+), 130 deletions(-) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index e0d9dcdf89..2a03dcc571 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -45,8 +45,6 @@ #include #endif /* __WXDEBUG__ */ -#define METRIC_UNIT_LENGTH (1e9) - EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWindowId, const wxPoint& aPosition, const wxSize& aSize, GalType aGalType ) : @@ -61,11 +59,6 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin SwitchBackend( aGalType ); SetBackgroundStyle( wxBG_STYLE_CUSTOM ); - // Initial display settings - m_gal->SetLookAtPoint( VECTOR2D( 0, 0 ) ); - m_gal->SetZoomFactor( 1.0 ); - m_gal->ComputeWorldScreenMatrix(); - m_painter = new KIGFX::PCB_PAINTER( m_gal ); m_view = new KIGFX::VIEW( true ); @@ -220,10 +213,6 @@ void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType ) return; } - m_gal->SetWorldUnitLength( 1.0 / METRIC_UNIT_LENGTH * 2.54 ); // 1 inch in nanometers - m_gal->SetScreenDPI( 106 ); // Display resolution setting - m_gal->ComputeWorldScreenMatrix(); - wxSize size = GetClientSize(); m_gal->ResizeScreen( size.GetX(), size.GetY() ); diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index 2c172d0400..5d1d4f6cd7 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -70,7 +70,7 @@ CAIRO_GAL::CAIRO_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, SetSize( aParent->GetSize() ); screenSize = VECTOR2D( aParent->GetSize() ); - initCursor( 20 ); + initCursor(); // Grid color settings are different in Cairo and OpenGL SetGridColor( COLOR4D( 0.1, 0.1, 0.1, 0.8 ) ); @@ -881,11 +881,10 @@ void CAIRO_GAL::skipMouseEvent( wxMouseEvent& aEvent ) } -void CAIRO_GAL::initCursor( int aCursorSize ) +void CAIRO_GAL::initCursor() { - cursorPixels = new wxBitmap( aCursorSize, aCursorSize ); - cursorPixelsSaved = new wxBitmap( aCursorSize, aCursorSize ); - cursorSize = aCursorSize; + cursorPixels = new wxBitmap( cursorSize, cursorSize ); + cursorPixelsSaved = new wxBitmap( cursorSize, cursorSize ); wxMemoryDC cursorShape( *cursorPixels ); @@ -896,8 +895,8 @@ void CAIRO_GAL::initCursor( int aCursorSize ) cursorShape.SetPen( pen ); cursorShape.Clear(); - cursorShape.DrawLine( 0, aCursorSize / 2, aCursorSize, aCursorSize / 2 ); - cursorShape.DrawLine( aCursorSize / 2, 0, aCursorSize / 2, aCursorSize ); + cursorShape.DrawLine( 0, cursorSize / 2, cursorSize, cursorSize / 2 ); + cursorShape.DrawLine( cursorSize / 2, 0, cursorSize / 2, cursorSize ); } @@ -921,14 +920,15 @@ void CAIRO_GAL::blitCursor( wxBufferedDC& clientDC ) } // Store pixels that are going to be overpainted - cursorSave.Blit( 0, 0, cursorSize, cursorSize, &clientDC, cursorPosition.x, cursorPosition.y ); + VECTOR2D cursorScreen = ToScreen( cursorPosition ) - cursorSize / 2; + cursorSave.Blit( 0, 0, cursorSize, cursorSize, &clientDC, cursorScreen.x, cursorScreen.y ); // Draw the cursor - clientDC.Blit( cursorPosition.x, cursorPosition.y, cursorSize, cursorSize, + clientDC.Blit( cursorScreen.x, cursorScreen.y, cursorSize, cursorSize, &cursorShape, 0, 0, wxOR ); - savedCursorPosition.x = (wxCoord) cursorPosition.x; - savedCursorPosition.y = (wxCoord) cursorPosition.y; + savedCursorPosition.x = (wxCoord) cursorScreen.x; + savedCursorPosition.y = (wxCoord) cursorScreen.y; } diff --git a/common/gal/graphics_abstraction_layer.cpp b/common/gal/graphics_abstraction_layer.cpp index 67794a89c1..9bc79b5ab7 100644 --- a/common/gal/graphics_abstraction_layer.cpp +++ b/common/gal/graphics_abstraction_layer.cpp @@ -39,7 +39,10 @@ GAL::GAL() : SetIsStroke( true ); SetFillColor( COLOR4D( 0.0, 0.0, 0.0, 0.0 ) ); SetStrokeColor( COLOR4D( 1.0, 1.0, 1.0, 1.0 ) ); + SetLookAtPoint( VECTOR2D( 0, 0 ) ); SetZoomFactor( 1.0 ); + SetWorldUnitLength( 1.0 / METRIC_UNIT_LENGTH * 2.54 ); // 1 inch in nanometers + SetScreenDPI( 106 ); // Display resolution setting SetDepthRange( VECTOR2D( GAL::MIN_DEPTH, GAL::MAX_DEPTH ) ); SetFlip( false, false ); SetLineWidth( 1.0 ); diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 873fff51fd..84b8225ac3 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -86,7 +86,6 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, SetSize( aParent->GetSize() ); screenSize = VECTOR2D( aParent->GetSize() ); - initCursor( 80 ); // Grid color settings are different in Cairo and OpenGL SetGridColor( COLOR4D( 0.8, 0.8, 0.8, 0.1 ) ); @@ -769,8 +768,8 @@ void OPENGL_GAL::DrawCursor( const VECTOR2D& aCursorPosition ) { // Now we should only store the position of the mouse cursor // The real drawing routines are in blitCursor() - cursorPosition = VECTOR2D( aCursorPosition.x, - screenSize.y - aCursorPosition.y ); // invert Y axis + VECTOR2D screenCursor = worldScreenMatrix * aCursorPosition; + cursorPosition = screenWorldMatrix * VECTOR2D( screenCursor.x, screenSize.y - screenCursor.y ); } @@ -780,13 +779,9 @@ void OPENGL_GAL::drawGridLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEnd // We do not need a very precise comparison here (the lineWidth is set by GAL::DrawGrid()) if( fabs( lineWidth - 2.0 * gridLineWidth / worldScale ) < 0.1 ) - { glLineWidth( 1.0 ); - } else - { glLineWidth( 2.0 ); - } glColor4d( gridColor.r, gridColor.g, gridColor.b, gridColor.a ); @@ -970,12 +965,6 @@ void OPENGL_GAL::initGlew() } -void OPENGL_GAL::initCursor( int aCursorSize ) -{ - cursorSize = aCursorSize; -} - - void OPENGL_GAL::blitCursor() { if( !isCursorEnabled ) @@ -983,11 +972,9 @@ void OPENGL_GAL::blitCursor() compositor.SetBuffer( OPENGL_COMPOSITOR::DIRECT_RENDERING ); - VECTOR2D cursorBegin = ToWorld( cursorPosition - - VECTOR2D( cursorSize / 2, cursorSize / 2 ) ); - VECTOR2D cursorEnd = ToWorld( cursorPosition + - VECTOR2D( cursorSize / 2, cursorSize / 2 ) ); - VECTOR2D cursorCenter = ( cursorBegin + cursorEnd ) / 2.0; + VECTOR2D cursorBegin = cursorPosition - cursorSize / ( 2 * worldScale ); + VECTOR2D cursorEnd = cursorPosition + cursorSize / ( 2 * worldScale ); + VECTOR2D cursorCenter = ( cursorBegin + cursorEnd ) / 2; glDisable( GL_TEXTURE_2D ); glLineWidth( 1.0 ); diff --git a/common/view/wx_view_controls.cpp b/common/view/wx_view_controls.cpp index ef919c68e6..df8b9849c3 100644 --- a/common/view/wx_view_controls.cpp +++ b/common/view/wx_view_controls.cpp @@ -68,11 +68,6 @@ void VIEW_CONTROLS::ShowCursor( bool aEnabled ) void WX_VIEW_CONTROLS::onMotion( wxMouseEvent& aEvent ) { - m_mousePosition.x = aEvent.GetX(); - m_mousePosition.y = aEvent.GetY(); - - updateCursor(); - bool isAutoPanning = false; if( m_autoPanEnabled ) @@ -82,7 +77,7 @@ void WX_VIEW_CONTROLS::onMotion( wxMouseEvent& aEvent ) { if( m_state == DRAG_PANNING ) { - VECTOR2D d = m_dragStartPoint - m_mousePosition; + VECTOR2D d = m_dragStartPoint - VECTOR2D( aEvent.GetX(), aEvent.GetY() ); VECTOR2D delta = m_view->ToWorld( d, false ); m_view->SetCenter( m_lookStartPoint + delta ); @@ -197,8 +192,6 @@ void WX_VIEW_CONTROLS::onTimer( wxTimerEvent& aEvent ) dir = m_view->ToWorld( dir, false ); m_view->SetCenter( m_view->GetCenter() + dir * m_autoPanSpeed ); - updateCursor(); - // Notify tools that the cursor position has changed in the world coordinates wxMouseEvent moveEvent( EVT_REFRESH_MOUSE ); @@ -236,7 +229,7 @@ void WX_VIEW_CONTROLS::SetGrabMouse( bool aEnabled ) } -const VECTOR2D WX_VIEW_CONTROLS::GetMousePosition() const +VECTOR2D WX_VIEW_CONTROLS::GetMousePosition() const { wxPoint msp = wxGetMousePosition(); wxPoint winp = m_parentPanel->GetScreenPosition(); @@ -245,6 +238,22 @@ const VECTOR2D WX_VIEW_CONTROLS::GetMousePosition() const } +VECTOR2D WX_VIEW_CONTROLS::GetCursorPosition() const +{ + if( m_forceCursorPosition ) + return m_forcedPosition; + else + { + VECTOR2D mousePosition = GetMousePosition(); + + if( m_snappingEnabled ) + return m_view->ToWorld( m_view->GetGAL()->GetGridPoint( mousePosition ) ); + else + return m_view->ToWorld( mousePosition ); + } +} + + bool WX_VIEW_CONTROLS::handleAutoPanning( const wxMouseEvent& aEvent ) { VECTOR2D p( aEvent.GetX(), aEvent.GetY() ); @@ -255,17 +264,19 @@ bool WX_VIEW_CONTROLS::handleAutoPanning( const wxMouseEvent& aEvent ) double borderEndX = m_view->GetScreenPixelSize().x - borderStart; double borderEndY = m_view->GetScreenPixelSize().y - borderStart; - m_panDirection = VECTOR2D(); - if( p.x < borderStart ) m_panDirection.x = -( borderStart - p.x ); else if( p.x > borderEndX ) m_panDirection.x = ( p.x - borderEndX ); + else + m_panDirection.x = 0; if( p.y < borderStart ) m_panDirection.y = -( borderStart - p.y ); else if( p.y > borderEndY ) m_panDirection.y = ( p.y - borderEndY ); + else + m_panDirection.y = 0; bool borderHit = ( m_panDirection.x != 0 || m_panDirection.y != 0 ); @@ -302,14 +313,3 @@ bool WX_VIEW_CONTROLS::handleAutoPanning( const wxMouseEvent& aEvent ) wxASSERT_MSG( false, wxT( "This line should never be reached" ) ); return false; // Should not be reached, just avoid the compiler warnings.. } - - -void WX_VIEW_CONTROLS::updateCursor() -{ - if( m_forceCursorPosition ) - m_cursorPosition = m_view->ToScreen( m_forcedPosition ); - else if( m_snappingEnabled ) - m_cursorPosition = m_view->GetGAL()->GetGridPoint( m_mousePosition ); - else - m_cursorPosition = m_mousePosition; -} diff --git a/include/gal/cairo/cairo_gal.h b/include/gal/cairo/cairo_gal.h index 8da314560e..352e262931 100644 --- a/include/gal/cairo/cairo_gal.h +++ b/include/gal/cairo/cairo_gal.h @@ -283,8 +283,6 @@ private: wxPoint savedCursorPosition; ///< The last cursor position wxBitmap* cursorPixels; ///< Cursor pixels wxBitmap* cursorPixelsSaved; ///< Saved cursor pixels - int cursorSize; ///< Cursor size - VECTOR2D cursorPosition; ///< Current cursor position /// Maximum number of arguments for one command static const int MAX_CAIRO_ARGUMENTS = 6; @@ -354,8 +352,10 @@ private: */ void skipMouseEvent( wxMouseEvent& aEvent ); - /// @copydoc GAL::initCursor() - virtual void initCursor( int aCursorSize ); + /** + * @brief Prepares cursor bitmap. + */ + virtual void initCursor(); /** * @brief Blits cursor into the current screen. diff --git a/include/gal/graphics_abstraction_layer.h b/include/gal/graphics_abstraction_layer.h index a6fad9b6fc..5b6c656e32 100644 --- a/include/gal/graphics_abstraction_layer.h +++ b/include/gal/graphics_abstraction_layer.h @@ -720,17 +720,15 @@ public: /// @brief Draw the grid void DrawGrid(); - /** * Function GetGridPoint() - * For a given point it returns the nearest point belonging to the grid. + * For a given point it returns the nearest point belonging to the grid in screen coordinates. * * @param aPoint is the point for which the grid point is searched. - * @return The nearest grid point. + * @return The nearest grid point in screen coordinates. */ VECTOR2D GetGridPoint( const VECTOR2D& aPoint ) const; - /** * @brief Change the grid display style. * @@ -786,7 +784,7 @@ public: /** * @brief Set the cursor size. * - * @param aCursorSize is the size of the cursor. + * @param aCursorSize is the size of the cursor expressed in pixels. */ inline void SetCursorSize( unsigned int aCursorSize ) { @@ -829,6 +827,8 @@ public: /// Depth level on which the grid is drawn static const int GRID_DEPTH = 1024; + static const double METRIC_UNIT_LENGTH = 1e9; + protected: std::stack depthStack; ///< Stored depth values VECTOR2D screenSize; ///< Screen size in screen coordinates @@ -870,7 +870,8 @@ protected: bool isCursorEnabled; ///< Is the cursor enabled? COLOR4D cursorColor; ///< Cursor color - int cursorSize; ///< Size of the cursor in pixels + unsigned int cursorSize; ///< Size of the cursor in pixels + VECTOR2D cursorPosition; ///< Current cursor position (world coordinates) /// Instance of object that stores information about how to draw texts STROKE_FONT strokeFont; @@ -889,13 +890,6 @@ protected: */ virtual void drawGridLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) = 0; - /** - * @brief Initialize the cursor. - * - * @param aCursorSize is the size of the cursor. - */ - virtual void initCursor( int aCursorSize ) = 0; - static const int MIN_DEPTH = -2048; static const int MAX_DEPTH = 2047; }; diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index 792205c91d..7a1879d085 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -299,8 +299,6 @@ private: bool isShaderInitialized; ///< Was the shader initialized? bool isGrouping; ///< Was a group started? - VECTOR2D cursorPosition; ///< Current cursor position - // Polygon tesselation /// The tessellator GLUtesselator* tesselator; @@ -364,9 +362,6 @@ private: /// Initialize GLEW void initGlew(); - /// @copydoc GAL::initCursor() - virtual void initCursor( int aCursorSize ); - /** * @brief Blits cursor into the current screen. */ diff --git a/include/view/view_controls.h b/include/view/view_controls.h index 5ec1a037a4..35e6709f18 100644 --- a/include/view/view_controls.h +++ b/include/view/view_controls.h @@ -108,21 +108,22 @@ public: /** * Function GetMousePosition() - * Returns the current mouse pointer position in the screen coordinates. Note, that it may be + * Returns the current mouse pointer position in screen coordinates. Note, that it may be * different from the cursor position if snapping is enabled (@see GetCursorPosition()). * - * @return The current mouse pointer position. + * @return The current mouse pointer position in screen coordinates. */ - virtual const VECTOR2D GetMousePosition() const = 0; + virtual VECTOR2D GetMousePosition() const = 0; /** * Function GetCursorPosition() - * Returns the current cursor position in the screen coordinates. Note, that it may be - * different from the mouse pointer position if snapping is enabled (@see GetMousePosition()). + * Returns the current cursor position in world coordinates. Note, that it may be + * different from the mouse pointer position if snapping is enabled or cursor position + * is forced to specific point. * - * @return The current cursor position in screen coordinates. + * @return The current cursor position in world coordinates. */ - virtual const VECTOR2D GetCursorPosition() const = 0; + virtual VECTOR2D GetCursorPosition() const = 0; /** @@ -131,7 +132,7 @@ public: * @param aEnabled enable forced cursor position * @param aPosition the position */ - virtual void ForceCursorPosition( bool aEnabled, const VECTOR2D& aPosition = VECTOR2D(0, 0) ) + virtual void ForceCursorPosition( bool aEnabled, const VECTOR2D& aPosition = VECTOR2D( 0, 0 ) ) { m_forcedPosition = aPosition; m_forceCursorPosition = aEnabled; diff --git a/include/view/wx_view_controls.h b/include/view/wx_view_controls.h index 41540e951b..d8722d5b78 100644 --- a/include/view/wx_view_controls.h +++ b/include/view/wx_view_controls.h @@ -58,13 +58,6 @@ public: void onEnter( wxMouseEvent& WXUNUSED( aEvent ) ); void onTimer( wxTimerEvent& WXUNUSED( aEvent ) ); - ///> @copydoc VIEW_CONTROLS::SetSnapping() - void SetSnapping( bool aEnabled ) - { - VIEW_CONTROLS::SetSnapping( aEnabled ); - updateCursor(); - } - /** * Function SetGrabMouse() * Enables/disables mouse cursor grabbing (limits the movement field only to the panel area). @@ -88,13 +81,10 @@ public: } /// @copydoc VIEW_CONTROLS::GetMousePosition() - const VECTOR2D GetMousePosition() const; + VECTOR2D GetMousePosition() const; /// @copydoc VIEW_CONTROLS::GetCursorPosition() - const VECTOR2D GetCursorPosition() const - { - return m_cursorPosition; - } + VECTOR2D GetCursorPosition() const; /// Event that forces mouse move event in the dispatcher (eg. used in autopanning, when mouse /// cursor does not move in screen coordinates, but does in world coordinates) @@ -119,12 +109,6 @@ private: */ bool handleAutoPanning( const wxMouseEvent& aEvent ); - /** - * Function updateCursor() - * Recomputes the cursor coordinates basing on the current snapping settings and mouse position. - */ - void updateCursor(); - /// Current state of VIEW_CONTROLS STATE m_state; diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index 558b4dfab6..6896bb5a15 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -281,7 +281,7 @@ void ROUTER_TOOL::updateEndItem( TOOL_EVENT& aEvent ) else { m_endItem = NULL; - m_endSnapPoint = getView()->ToWorld( ctls->GetCursorPosition() ); + m_endSnapPoint = ctls->GetCursorPosition(); ctls->ForceCursorPosition( false ); } diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index 2c08379718..0e4ea58424 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -109,7 +109,7 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { - VECTOR2D cursorPos = view->ToWorld( controls->GetCursorPosition() ); + VECTOR2I cursorPos = controls->GetCursorPosition(); if( evt->IsCancel() ) break; @@ -254,7 +254,7 @@ int DRAWING_TOOL::draw( STROKE_T aShape ) { // Enable 45 degrees lines only mode by holding shift bool linesAngle45 = evt->Modifier( MD_SHIFT ); - VECTOR2D cursorPos = view->ToWorld( controls->GetCursorPosition() ); + VECTOR2I cursorPos = controls->GetCursorPosition(); if( evt->IsCancel() ) break; @@ -343,7 +343,6 @@ int DRAWING_TOOL::draw( STROKE_T aShape ) controls->SetSnapping( false ); controls->SetAutoPan( false ); view->Remove( &preview ); - setTransitions(); return 0; @@ -377,7 +376,7 @@ int DRAWING_TOOL::DrawText( TOOL_EVENT& aEvent ) // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { - VECTOR2D cursorPos = view->ToWorld( controls->GetCursorPosition() ); + VECTOR2I cursorPos = controls->GetCursorPosition(); if( evt->IsCancel() ) { @@ -465,7 +464,7 @@ int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent ) // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { - VECTOR2D cursorPos = view->ToWorld( controls->GetCursorPosition() ); + VECTOR2I cursorPos = controls->GetCursorPosition(); if( evt->IsCancel() ) { @@ -606,14 +605,14 @@ int DRAWING_TOOL::DrawZone( TOOL_EVENT& aEvent ) Activate(); - VECTOR2D lastCursorPos = view->ToWorld( controls->GetCursorPosition() ); + VECTOR2I lastCursorPos = controls->GetCursorPosition(); // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { // Enable 45 degrees lines only mode by holding shift bool linesAngle45 = evt->Modifier( MD_SHIFT ); - VECTOR2D cursorPos = view->ToWorld( controls->GetCursorPosition() ); + VECTOR2I cursorPos = controls->GetCursorPosition(); if( evt->IsCancel() ) { @@ -750,14 +749,14 @@ int DRAWING_TOOL::DrawKeepout( TOOL_EVENT& aEvent ) Activate(); - VECTOR2D lastCursorPos = view->ToWorld( controls->GetCursorPosition() ); + VECTOR2I lastCursorPos = controls->GetCursorPosition(); // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { // Enable 45 degrees lines only mode by holding shift bool linesAngle45 = evt->Modifier( MD_SHIFT ); - VECTOR2D cursorPos = view->ToWorld( controls->GetCursorPosition() ); + VECTOR2I cursorPos = controls->GetCursorPosition(); if( evt->IsCancel() ) { @@ -867,7 +866,7 @@ int DRAWING_TOOL::PlaceTarget( TOOL_EVENT& aEvent ) target->SetLayer( EDGE_N ); target->SetWidth( board->GetDesignSettings().m_EdgeSegmentWidth ); target->SetSize( Millimeter2iu( 5 ) ); - VECTOR2D cursorPos = view->ToWorld( controls->GetCursorPosition() ); + VECTOR2I cursorPos = controls->GetCursorPosition(); target->SetPosition( wxPoint( cursorPos.x, cursorPos.y ) ); // Add a VIEW_GROUP that serves as a preview for the new item @@ -883,7 +882,7 @@ int DRAWING_TOOL::PlaceTarget( TOOL_EVENT& aEvent ) // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { - VECTOR2D cursorPos = view->ToWorld( controls->GetCursorPosition() ); + VECTOR2I cursorPos = controls->GetCursorPosition(); if( evt->IsCancel() ) { @@ -944,7 +943,7 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent ) } // Init the new item attributes - VECTOR2D cursorPos = view->ToWorld( controls->GetCursorPosition() ); + VECTOR2I cursorPos = controls->GetCursorPosition(); module->SetPosition( wxPoint( cursorPos.x, cursorPos.y ) ); // Add a VIEW_GROUP that serves as a preview for the new item @@ -961,7 +960,7 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent ) // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { - cursorPos = view->ToWorld( controls->GetCursorPosition() ); + cursorPos = controls->GetCursorPosition(); if( evt->IsCancel() ) { diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index f5f1c3b0ff..ab79ba8e84 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -81,7 +81,7 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) if( !makeSelection( selection ) ) return 0; - VECTOR2D dragPosition; // The last position of the cursor while dragging + VECTOR2I dragPosition; // The last position of the cursor while dragging m_dragging = false; // Are selected items being dragged? bool restore = false; // Should items' state be restored when finishing the tool? @@ -131,8 +131,7 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) if( m_dragging ) { // Drag items to the current cursor position - VECTOR2D movement = ( getView()->ToWorld( controls->GetCursorPosition() ) - - dragPosition ); + VECTOR2I movement = ( controls->GetCursorPosition() - dragPosition ); for( unsigned int i = 0; i < selection.items.GetCount(); ++i ) { BOARD_ITEM* item = static_cast( selection.items.GetPickedItem( i ) ); @@ -151,7 +150,7 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) } selection.group->ViewUpdate( VIEW_ITEM::GEOMETRY ); - dragPosition = getView()->ToWorld( controls->GetCursorPosition() ); + dragPosition = controls->GetCursorPosition(); } else if( evt->IsMouseUp( BUT_LEFT ) || evt->IsClick( BUT_LEFT ) ) @@ -205,7 +204,7 @@ int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) { // Display properties dialog BOARD_ITEM* item = static_cast( selection.items.GetPickedItem( 0 ) ); - VECTOR2I cursor = getView()->ToWorld( getViewControls()->GetCursorPosition() ); + VECTOR2I cursor = getViewControls()->GetCursorPosition(); // Check if user wants to edit pad or module properties if( item->Type() == PCB_MODULE_T ) @@ -451,7 +450,7 @@ wxPoint EDIT_TOOL::getModificationPoint( const SELECTION_TOOL::SELECTION& aSelec } else { - VECTOR2I cursor = getView()->ToWorld( getViewControls()->GetCursorPosition() ); + VECTOR2I cursor = getViewControls()->GetCursorPosition(); return wxPoint( cursor.x, cursor.y ); } } From 2b62a85263d8461ee832249392a5a23b69908efe Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 14 Feb 2014 09:49:49 +0100 Subject: [PATCH 112/741] Refactoring: made VIEW, VIEW_CONTROLS, BOARD and PCB_EDIT_FRAME fields in DRAWING_TOOL. --- pcbnew/tools/drawing_tool.cpp | 285 ++++++++++++++++------------------ pcbnew/tools/drawing_tool.h | 16 +- 2 files changed, 146 insertions(+), 155 deletions(-) diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index 0e4ea58424..f98372d8fa 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -55,6 +55,12 @@ DRAWING_TOOL::~DRAWING_TOOL() void DRAWING_TOOL::Reset( RESET_REASON aReason ) { + // Init variables used by every drawing tool + m_view = getView(); + m_controls = getViewControls(); + m_board = getModel( PCB_T ); + m_frame = getEditFrame(); + setTransitions(); } @@ -81,9 +87,6 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) int step = 0; - KIGFX::VIEW* view = getView(); - KIGFX::VIEW_CONTROLS* controls = getViewControls(); - BOARD* board = getModel( PCB_T ); DRAWSEGMENT graphic; DRAWSEGMENT helperLine; bool positive = true; @@ -91,25 +94,25 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) // Init the new item attributes graphic.SetShape( S_ARC ); graphic.SetAngle( 0.0 ); - graphic.SetWidth( board->GetDesignSettings().m_DrawSegmentWidth ); + graphic.SetWidth( m_board->GetDesignSettings().m_DrawSegmentWidth ); helperLine.SetShape( S_SEGMENT ); helperLine.SetLayer( DRAW_N ); helperLine.SetWidth( 1 ); // Add a VIEW_GROUP that serves as a preview for the new item - KIGFX::VIEW_GROUP preview( view ); - view->Add( &preview ); + KIGFX::VIEW_GROUP preview( m_view ); + m_view->Add( &preview ); - controls->ShowCursor( true ); - controls->SetSnapping( true ); + m_controls->ShowCursor( true ); + m_controls->SetSnapping( true ); Activate(); // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { - VECTOR2I cursorPos = controls->GetCursorPosition(); + VECTOR2I cursorPos = m_controls->GetCursorPosition(); if( evt->IsCancel() ) break; @@ -151,7 +154,7 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) } else { - controls->SetAutoPan( true ); + m_controls->SetAutoPan( true ); helperLine.SetStart( graphic.GetCenter() ); graphic.SetLayer( layer ); @@ -166,8 +169,8 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) if( wxPoint( cursorPos.x, cursorPos.y ) != graphic.GetCenter() ) { DRAWSEGMENT* newItem = new DRAWSEGMENT( graphic ); - view->Add( newItem ); - board->Add( newItem ); + m_view->Add( newItem ); + m_board->Add( newItem ); newItem->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); } } @@ -217,10 +220,10 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) } } - controls->ShowCursor( false ); - controls->SetSnapping( false ); - controls->SetAutoPan( false ); - view->Remove( &preview ); + m_controls->ShowCursor( false ); + m_controls->SetSnapping( false ); + m_controls->SetAutoPan( false ); + m_view->Remove( &preview ); setTransitions(); @@ -228,24 +231,21 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) } -int DRAWING_TOOL::draw( STROKE_T aShape ) +int DRAWING_TOOL::draw( int aShape ) { bool started = false; - KIGFX::VIEW* view = getView(); - KIGFX::VIEW_CONTROLS* controls = getViewControls(); - BOARD* board = getModel( PCB_T ); DRAWSEGMENT graphic; // Init the new item attributes - graphic.SetShape( aShape ); - graphic.SetWidth( board->GetDesignSettings().m_DrawSegmentWidth ); + graphic.SetShape( (STROKE_T) aShape ); + graphic.SetWidth( m_board->GetDesignSettings().m_DrawSegmentWidth ); // Add a VIEW_GROUP that serves as a preview for the new item - KIGFX::VIEW_GROUP preview( view ); - view->Add( &preview ); + KIGFX::VIEW_GROUP preview( m_view ); + m_view->Add( &preview ); - controls->ShowCursor( true ); - controls->SetSnapping( true ); + m_controls->ShowCursor( true ); + m_controls->SetSnapping( true ); Activate(); @@ -254,7 +254,7 @@ int DRAWING_TOOL::draw( STROKE_T aShape ) { // Enable 45 degrees lines only mode by holding shift bool linesAngle45 = evt->Modifier( MD_SHIFT ); - VECTOR2I cursorPos = controls->GetCursorPosition(); + VECTOR2I cursorPos = m_controls->GetCursorPosition(); if( evt->IsCancel() ) break; @@ -276,7 +276,7 @@ int DRAWING_TOOL::draw( STROKE_T aShape ) { if( !started ) { - LAYER_NUM layer = getEditFrame()->GetScreen()->m_Active_Layer; + LAYER_NUM layer = m_frame->GetScreen()->m_Active_Layer; if( IsCopperLayer( layer ) ) { @@ -284,7 +284,7 @@ int DRAWING_TOOL::draw( STROKE_T aShape ) } else { - controls->SetAutoPan( true ); + m_controls->SetAutoPan( true ); graphic.SetStart( wxPoint( cursorPos.x, cursorPos.y ) ); graphic.SetLayer( layer ); @@ -298,8 +298,8 @@ int DRAWING_TOOL::draw( STROKE_T aShape ) if( wxPoint( cursorPos.x, cursorPos.y ) != graphic.GetStart() ) { DRAWSEGMENT* newItem = new DRAWSEGMENT( graphic ); - view->Add( newItem ); - board->Add( newItem ); + m_view->Add( newItem ); + m_board->Add( newItem ); newItem->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); if( m_continous ) @@ -325,7 +325,7 @@ int DRAWING_TOOL::draw( STROKE_T aShape ) // Snap the new line to the grid // TODO fix it, does not work good.. VECTOR2D newLineEnd = VECTOR2D( graphic.GetStart() ) + newLineVector; - VECTOR2D snapped = view->GetGAL()->GetGridPoint( newLineEnd ); + VECTOR2D snapped = m_view->GetGAL()->GetGridPoint( newLineEnd ); graphic.SetEnd( wxPoint( snapped.x, snapped.y ) ); } @@ -339,10 +339,10 @@ int DRAWING_TOOL::draw( STROKE_T aShape ) } } - controls->ShowCursor( false ); - controls->SetSnapping( false ); - controls->SetAutoPan( false ); - view->Remove( &preview ); + m_controls->ShowCursor( false ); + m_controls->SetSnapping( false ); + m_controls->SetAutoPan( false ); + m_view->Remove( &preview ); setTransitions(); return 0; @@ -351,11 +351,8 @@ int DRAWING_TOOL::draw( STROKE_T aShape ) int DRAWING_TOOL::DrawText( TOOL_EVENT& aEvent ) { - KIGFX::VIEW* view = getView(); - KIGFX::VIEW_CONTROLS* controls = getViewControls(); - // Init the new item attributes - TEXTE_PCB* newText = getEditFrame()->CreateTextePcb( NULL ); + TEXTE_PCB* newText = m_frame->CreateTextePcb( NULL ); if( newText == NULL ) { setTransitions(); @@ -363,25 +360,25 @@ int DRAWING_TOOL::DrawText( TOOL_EVENT& aEvent ) } // Add a VIEW_GROUP that serves as a preview for the new item - KIGFX::VIEW_GROUP preview( view ); + KIGFX::VIEW_GROUP preview( m_view ); preview.Add( newText ); - view->Add( &preview ); + m_view->Add( &preview ); - controls->ShowCursor( true ); - controls->SetSnapping( true ); - controls->SetAutoPan( true ); + m_controls->ShowCursor( true ); + m_controls->SetSnapping( true ); + m_controls->SetAutoPan( true ); Activate(); // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { - VECTOR2I cursorPos = controls->GetCursorPosition(); + VECTOR2I cursorPos = m_controls->GetCursorPosition(); if( evt->IsCancel() ) { // it was already added by CreateTextPcb() - getModel( PCB_T )->Delete( newText ); + m_board->Delete( newText ); break; } @@ -389,7 +386,7 @@ int DRAWING_TOOL::DrawText( TOOL_EVENT& aEvent ) { if( evt->IsAction( &COMMON_ACTIONS::rotate ) ) { - newText->Rotate( newText->GetPosition(), getEditFrame()->GetRotationAngle() ); + newText->Rotate( newText->GetPosition(), m_frame->GetRotationAngle() ); preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); } else if( evt->IsAction( &COMMON_ACTIONS::flip ) ) @@ -402,8 +399,8 @@ int DRAWING_TOOL::DrawText( TOOL_EVENT& aEvent ) else if( evt->IsClick( BUT_LEFT ) ) { newText->ClearFlags(); - view->Add( newText ); - // board->Add( newText ); // it is already added by CreateTextePcb() + m_view->Add( newText ); + // m_board->Add( newText ); // it is already added by CreateTextePcb() newText->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); break; } @@ -417,10 +414,10 @@ int DRAWING_TOOL::DrawText( TOOL_EVENT& aEvent ) } } - controls->ShowCursor( false ); - controls->SetSnapping( false ); - controls->SetAutoPan( false ); - view->Remove( &preview ); + m_controls->ShowCursor( false ); + m_controls->SetSnapping( false ); + m_controls->SetAutoPan( false ); + m_view->Remove( &preview ); setTransitions(); @@ -434,14 +431,11 @@ int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent ) int step = 0; - KIGFX::VIEW* view = getView(); - KIGFX::VIEW_CONTROLS* controls = getViewControls(); - BOARD* board = getModel( PCB_T ); - DIMENSION* dimension = new DIMENSION( board ); + DIMENSION* dimension = new DIMENSION( m_board ); // Init the new item attributes - dimension->Text().SetSize( board->GetDesignSettings().m_PcbTextSize ); - int width = board->GetDesignSettings().m_PcbTextWidth; + dimension->Text().SetSize( m_board->GetDesignSettings().m_PcbTextSize ); + int width = m_board->GetDesignSettings().m_PcbTextWidth; int maxthickness = Clamp_Text_PenSize( width, dimension->Text().GetSize() ); if( width > maxthickness ) @@ -453,18 +447,18 @@ int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent ) dimension->AdjustDimensionDetails(); // Add a VIEW_GROUP that serves as a preview for the new item - KIGFX::VIEW_GROUP preview( view ); - view->Add( &preview ); + KIGFX::VIEW_GROUP preview( m_view ); + m_view->Add( &preview ); - controls->ShowCursor( true ); - controls->SetSnapping( true ); + m_controls->ShowCursor( true ); + m_controls->SetSnapping( true ); Activate(); // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { - VECTOR2I cursorPos = controls->GetCursorPosition(); + VECTOR2I cursorPos = m_controls->GetCursorPosition(); if( evt->IsCancel() ) { @@ -491,7 +485,7 @@ int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent ) { case 0: { - LAYER_NUM layer = getEditFrame()->GetScreen()->m_Active_Layer; + LAYER_NUM layer = m_frame->GetScreen()->m_Active_Layer; if( IsCopperLayer( layer ) ) { @@ -500,7 +494,7 @@ int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent ) } else { - controls->SetAutoPan( true ); + m_controls->SetAutoPan( true ); dimension->SetLayer( layer ); dimension->SetOrigin( wxPoint( cursorPos.x, cursorPos.y ) ); @@ -514,8 +508,8 @@ int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent ) { if( wxPoint( cursorPos.x, cursorPos.y ) != dimension->GetPosition() ) { - view->Add( dimension ); - board->Add( dimension ); + m_view->Add( dimension ); + m_board->Add( dimension ); dimension->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); } } @@ -552,10 +546,10 @@ int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent ) } } - controls->ShowCursor( false ); - controls->SetSnapping( false ); - controls->SetAutoPan( false ); - view->Remove( &preview ); + m_controls->ShowCursor( false ); + m_controls->SetSnapping( false ); + m_controls->SetAutoPan( false ); + m_view->Remove( &preview ); setTransitions(); @@ -565,20 +559,16 @@ int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent ) int DRAWING_TOOL::DrawZone( TOOL_EVENT& aEvent ) { - KIGFX::VIEW* view = getView(); - KIGFX::VIEW_CONTROLS* controls = getViewControls(); - BOARD* board = getModel( PCB_T ); - ZONE_CONTAINER* zone = new ZONE_CONTAINER( board ); - PCB_EDIT_FRAME* editFrame = getEditFrame(); + ZONE_CONTAINER* zone = new ZONE_CONTAINER( m_board ); // Get the current, default settings for zones - ZONE_SETTINGS zoneInfo = editFrame->GetZoneSettings(); + ZONE_SETTINGS zoneInfo = m_frame->GetZoneSettings(); ZONE_EDIT_T dialogResult; - if( IsCopperLayer( editFrame->GetScreen()->m_Active_Layer ) ) - dialogResult = InvokeCopperZonesEditor( editFrame, &zoneInfo ); + if( IsCopperLayer( m_frame->GetScreen()->m_Active_Layer ) ) + dialogResult = InvokeCopperZonesEditor( m_frame, &zoneInfo ); else - dialogResult = InvokeNonCopperZonesEditor( editFrame, zone, &zoneInfo ); + dialogResult = InvokeNonCopperZonesEditor( m_frame, zone, &zoneInfo ); if( dialogResult == ZONE_ABORT ) { @@ -588,7 +578,7 @@ int DRAWING_TOOL::DrawZone( TOOL_EVENT& aEvent ) } zoneInfo.ExportSetting( *zone ); - editFrame->SetTopLayer( zoneInfo.m_CurrentZone_Layer ); + m_frame->SetTopLayer( zoneInfo.m_CurrentZone_Layer ); DRAWSEGMENT* helperLine = new DRAWSEGMENT; helperLine->SetShape( S_SEGMENT ); @@ -596,23 +586,23 @@ int DRAWING_TOOL::DrawZone( TOOL_EVENT& aEvent ) helperLine->SetWidth( 1 ); // Add a VIEW_GROUP that serves as a preview for the new item - KIGFX::VIEW_GROUP preview( view ); - view->Add( &preview ); + KIGFX::VIEW_GROUP preview( m_view ); + m_view->Add( &preview ); - controls->ShowCursor( true ); - controls->SetSnapping( true ); - controls->SetAutoPan( true ); + m_controls->ShowCursor( true ); + m_controls->SetSnapping( true ); + m_controls->SetAutoPan( true ); Activate(); - VECTOR2I lastCursorPos = controls->GetCursorPosition(); + VECTOR2I lastCursorPos = m_controls->GetCursorPosition(); // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { // Enable 45 degrees lines only mode by holding shift bool linesAngle45 = evt->Modifier( MD_SHIFT ); - VECTOR2I cursorPos = controls->GetCursorPosition(); + VECTOR2I cursorPos = m_controls->GetCursorPosition(); if( evt->IsCancel() ) { @@ -631,10 +621,10 @@ int DRAWING_TOOL::DrawZone( TOOL_EVENT& aEvent ) zone->Outline()->CloseLastContour(); zone->Outline()->RemoveNullSegments(); - board->Add( zone ); - view->Add( zone ); + m_board->Add( zone ); + m_view->Add( zone ); - editFrame->Fill_Zone( zone ); + m_frame->Fill_Zone( zone ); zone->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); } else @@ -684,7 +674,7 @@ int DRAWING_TOOL::DrawZone( TOOL_EVENT& aEvent ) // Snap the new line to the grid // TODO fix it, does not work good.. VECTOR2D newLineEnd = VECTOR2D( helperLine->GetStart() ) + newLineVector; - VECTOR2D snapped = view->GetGAL()->GetGridPoint( newLineEnd ); + VECTOR2D snapped = m_view->GetGAL()->GetGridPoint( newLineEnd ); helperLine->SetEnd( wxPoint( snapped.x, snapped.y ) ); } @@ -698,10 +688,10 @@ int DRAWING_TOOL::DrawZone( TOOL_EVENT& aEvent ) } } - controls->ShowCursor( false ); - controls->SetSnapping( false ); - controls->SetAutoPan( false ); - view->Remove( &preview ); + m_controls->ShowCursor( false ); + m_controls->SetSnapping( false ); + m_controls->SetAutoPan( false ); + m_view->Remove( &preview ); // delete helper lines preview.FreeItems(); @@ -714,16 +704,12 @@ int DRAWING_TOOL::DrawZone( TOOL_EVENT& aEvent ) int DRAWING_TOOL::DrawKeepout( TOOL_EVENT& aEvent ) { - KIGFX::VIEW* view = getView(); - KIGFX::VIEW_CONTROLS* controls = getViewControls(); - BOARD* board = getModel( PCB_T ); - ZONE_CONTAINER* keepout = new ZONE_CONTAINER( board ); - PCB_EDIT_FRAME* editFrame = getEditFrame(); + ZONE_CONTAINER* keepout = new ZONE_CONTAINER( m_board ); // Get the current, default settings for zones - ZONE_SETTINGS zoneInfo = editFrame->GetZoneSettings(); + ZONE_SETTINGS zoneInfo = m_frame->GetZoneSettings(); - ZONE_EDIT_T dialogResult = InvokeKeepoutAreaEditor( editFrame, &zoneInfo ); + ZONE_EDIT_T dialogResult = InvokeKeepoutAreaEditor( m_frame, &zoneInfo ); if( dialogResult == ZONE_ABORT ) { delete keepout; @@ -732,7 +718,7 @@ int DRAWING_TOOL::DrawKeepout( TOOL_EVENT& aEvent ) } zoneInfo.ExportSetting( *keepout ); - editFrame->SetTopLayer( zoneInfo.m_CurrentZone_Layer ); + m_frame->SetTopLayer( zoneInfo.m_CurrentZone_Layer ); DRAWSEGMENT* helperLine = new DRAWSEGMENT; helperLine->SetShape( S_SEGMENT ); @@ -740,23 +726,23 @@ int DRAWING_TOOL::DrawKeepout( TOOL_EVENT& aEvent ) helperLine->SetWidth( 1 ); // Add a VIEW_GROUP that serves as a preview for the new item - KIGFX::VIEW_GROUP preview( view ); - view->Add( &preview ); + KIGFX::VIEW_GROUP preview( m_view ); + m_view->Add( &preview ); - controls->ShowCursor( true ); - controls->SetSnapping( true ); - controls->SetAutoPan( true ); + m_controls->ShowCursor( true ); + m_controls->SetSnapping( true ); + m_controls->SetAutoPan( true ); Activate(); - VECTOR2I lastCursorPos = controls->GetCursorPosition(); + VECTOR2I lastCursorPos = m_controls->GetCursorPosition(); // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { // Enable 45 degrees lines only mode by holding shift bool linesAngle45 = evt->Modifier( MD_SHIFT ); - VECTOR2I cursorPos = controls->GetCursorPosition(); + VECTOR2I cursorPos = m_controls->GetCursorPosition(); if( evt->IsCancel() ) { @@ -775,8 +761,8 @@ int DRAWING_TOOL::DrawKeepout( TOOL_EVENT& aEvent ) keepout->Outline()->CloseLastContour(); keepout->Outline()->RemoveNullSegments(); - board->Add( keepout ); - view->Add( keepout ); + m_board->Add( keepout ); + m_view->Add( keepout ); keepout->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); } @@ -827,7 +813,7 @@ int DRAWING_TOOL::DrawKeepout( TOOL_EVENT& aEvent ) // Snap the new line to the grid // TODO fix it, does not work good.. VECTOR2D newLineEnd = VECTOR2D( helperLine->GetStart() ) + newLineVector; - VECTOR2D snapped = view->GetGAL()->GetGridPoint( newLineEnd ); + VECTOR2D snapped = m_view->GetGAL()->GetGridPoint( newLineEnd ); helperLine->SetEnd( wxPoint( snapped.x, snapped.y ) ); } @@ -841,10 +827,10 @@ int DRAWING_TOOL::DrawKeepout( TOOL_EVENT& aEvent ) } } - controls->ShowCursor( false ); - controls->SetSnapping( false ); - controls->SetAutoPan( false ); - view->Remove( &preview ); + m_controls->ShowCursor( false ); + m_controls->SetSnapping( false ); + m_controls->SetAutoPan( false ); + m_view->Remove( &preview ); // delete helper lines preview.FreeItems(); @@ -857,32 +843,29 @@ int DRAWING_TOOL::DrawKeepout( TOOL_EVENT& aEvent ) int DRAWING_TOOL::PlaceTarget( TOOL_EVENT& aEvent ) { - KIGFX::VIEW* view = getView(); - KIGFX::VIEW_CONTROLS* controls = getViewControls(); - BOARD* board = getModel( PCB_T ); - PCB_TARGET* target = new PCB_TARGET( board ); + PCB_TARGET* target = new PCB_TARGET( m_board ); // Init the new item attributes target->SetLayer( EDGE_N ); - target->SetWidth( board->GetDesignSettings().m_EdgeSegmentWidth ); + target->SetWidth( m_board->GetDesignSettings().m_EdgeSegmentWidth ); target->SetSize( Millimeter2iu( 5 ) ); - VECTOR2I cursorPos = controls->GetCursorPosition(); + VECTOR2I cursorPos = m_controls->GetCursorPosition(); target->SetPosition( wxPoint( cursorPos.x, cursorPos.y ) ); // Add a VIEW_GROUP that serves as a preview for the new item - KIGFX::VIEW_GROUP preview( view ); + KIGFX::VIEW_GROUP preview( m_view ); preview.Add( target ); - view->Add( &preview ); + m_view->Add( &preview ); preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - controls->SetSnapping( true ); + m_controls->SetSnapping( true ); Activate(); // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { - VECTOR2I cursorPos = controls->GetCursorPosition(); + VECTOR2I cursorPos = m_controls->GetCursorPosition(); if( evt->IsCancel() ) { @@ -905,8 +888,8 @@ int DRAWING_TOOL::PlaceTarget( TOOL_EVENT& aEvent ) else if( evt->IsClick( BUT_LEFT ) ) { - view->Add( target ); - board->Add( target ); + m_view->Add( target ); + m_board->Add( target ); target->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); break; } @@ -918,9 +901,9 @@ int DRAWING_TOOL::PlaceTarget( TOOL_EVENT& aEvent ) } } - controls->SetSnapping( false ); - controls->SetAutoPan( false ); - view->Remove( &preview ); + m_controls->SetSnapping( false ); + m_controls->SetAutoPan( false ); + m_view->Remove( &preview ); setTransitions(); @@ -930,12 +913,8 @@ int DRAWING_TOOL::PlaceTarget( TOOL_EVENT& aEvent ) int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent ) { - KIGFX::VIEW* view = getView(); - KIGFX::VIEW_CONTROLS* controls = getViewControls(); - BOARD* board = getModel( PCB_T ); - PCB_EDIT_FRAME* editFrame = getEditFrame(); - MODULE* module = editFrame->LoadModuleFromLibrary( wxEmptyString, - editFrame->GetFootprintLibraryTable(), true, NULL ); + MODULE* module = m_frame->LoadModuleFromLibrary( wxEmptyString, + m_frame->GetFootprintLibraryTable(), true, NULL ); if( module == NULL ) { setTransitions(); @@ -943,28 +922,28 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent ) } // Init the new item attributes - VECTOR2I cursorPos = controls->GetCursorPosition(); + VECTOR2I cursorPos = m_controls->GetCursorPosition(); module->SetPosition( wxPoint( cursorPos.x, cursorPos.y ) ); // Add a VIEW_GROUP that serves as a preview for the new item - KIGFX::VIEW_GROUP preview( view ); + KIGFX::VIEW_GROUP preview( m_view ); preview.Add( module ); module->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW_GROUP::Add ), &preview ) ); - view->Add( &preview ); + m_view->Add( &preview ); preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - controls->SetSnapping( true ); + m_controls->SetSnapping( true ); Activate(); // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { - cursorPos = controls->GetCursorPosition(); + cursorPos = m_controls->GetCursorPosition(); if( evt->IsCancel() ) { - board->Delete( module ); + m_board->Delete( module ); break; } @@ -972,7 +951,7 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent ) { if( evt->IsAction( &COMMON_ACTIONS::rotate ) ) { - module->Rotate( module->GetPosition(), getEditFrame()->GetRotationAngle() ); + module->Rotate( module->GetPosition(), m_frame->GetRotationAngle() ); preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); } else if( evt->IsAction( &COMMON_ACTIONS::flip ) ) @@ -984,8 +963,8 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent ) else if( evt->IsClick( BUT_LEFT ) ) { - module->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Add ), view ) ); - view->Add( module ); + module->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Add ), m_view ) ); + m_view->Add( module ); module->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); break; } @@ -997,9 +976,9 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent ) } } - controls->SetSnapping( false ); - controls->SetAutoPan( false ); - view->Remove( &preview ); + m_controls->SetSnapping( false ); + m_controls->SetAutoPan( false ); + m_view->Remove( &preview ); setTransitions(); diff --git a/pcbnew/tools/drawing_tool.h b/pcbnew/tools/drawing_tool.h index 149eccda6a..9881e353c9 100644 --- a/pcbnew/tools/drawing_tool.h +++ b/pcbnew/tools/drawing_tool.h @@ -26,7 +26,14 @@ #define __DRAWING_TOOL_H #include -#include + +namespace KIGFX +{ + class VIEW; + class VIEW_CONTROLS; +} +class BOARD; +class PCB_EDIT_FRAME; /** * Class DRAWING_TOOL @@ -69,7 +76,7 @@ public: private: ///> Starts drawing a selected shape. - int draw( STROKE_T aShape ); + int draw( int aShape ); ///> Sets up handlers for various events. void setTransitions(); @@ -77,6 +84,11 @@ private: ///> Should drawing be stopped after drawing one object or should it continue with another one. bool m_continous; + KIGFX::VIEW* m_view; + KIGFX::VIEW_CONTROLS* m_controls; + BOARD* m_board; + PCB_EDIT_FRAME* m_frame; + // How does line width change after one -/+ key press. static const int WIDTH_STEP = 100000; }; From b7d43776218ec255ef4738b400362eb8485b8160 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 14 Feb 2014 10:47:43 +0100 Subject: [PATCH 113/741] Refactoring: zones and keepout areas are drawn using the same function. --- pcbnew/tools/drawing_tool.cpp | 677 ++++++++++++++-------------------- pcbnew/tools/drawing_tool.h | 7 +- 2 files changed, 291 insertions(+), 393 deletions(-) diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index f98372d8fa..af5b6f6a49 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -231,124 +231,6 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) } -int DRAWING_TOOL::draw( int aShape ) -{ - bool started = false; - DRAWSEGMENT graphic; - - // Init the new item attributes - graphic.SetShape( (STROKE_T) aShape ); - graphic.SetWidth( m_board->GetDesignSettings().m_DrawSegmentWidth ); - - // Add a VIEW_GROUP that serves as a preview for the new item - KIGFX::VIEW_GROUP preview( m_view ); - m_view->Add( &preview ); - - m_controls->ShowCursor( true ); - m_controls->SetSnapping( true ); - - Activate(); - - // Main loop: keep receiving events - while( OPT_TOOL_EVENT evt = Wait() ) - { - // Enable 45 degrees lines only mode by holding shift - bool linesAngle45 = evt->Modifier( MD_SHIFT ); - VECTOR2I cursorPos = m_controls->GetCursorPosition(); - - if( evt->IsCancel() ) - break; - - else if( evt->IsKeyUp() ) - { - int width = graphic.GetWidth(); - - // Modify the new item width - if( evt->KeyCode() == '-' && width > WIDTH_STEP ) - graphic.SetWidth( width - WIDTH_STEP ); - else if( evt->KeyCode() == '=' ) - graphic.SetWidth( width + WIDTH_STEP ); - - preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - } - - else if( evt->IsClick( BUT_LEFT ) ) - { - if( !started ) - { - LAYER_NUM layer = m_frame->GetScreen()->m_Active_Layer; - - if( IsCopperLayer( layer ) ) - { - DisplayInfoMessage( NULL, _( "Graphic not allowed on Copper layers" ) ); - } - else - { - m_controls->SetAutoPan( true ); - - graphic.SetStart( wxPoint( cursorPos.x, cursorPos.y ) ); - graphic.SetLayer( layer ); - preview.Add( &graphic ); - - started = true; - } - } - else - { - if( wxPoint( cursorPos.x, cursorPos.y ) != graphic.GetStart() ) - { - DRAWSEGMENT* newItem = new DRAWSEGMENT( graphic ); - m_view->Add( newItem ); - m_board->Add( newItem ); - newItem->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - - if( m_continous ) - graphic.SetStart( graphic.GetEnd() ); // This is the origin point for a new item - else - break; - } - else // User has clicked twice in the same spot - break; // seems like a clear sign that the drawing is finished - } - } - - else if( evt->IsMotion() && started ) - { - // 45 degree lines - if( linesAngle45 && aShape == S_SEGMENT ) - { - VECTOR2D lineVector( wxPoint( cursorPos.x, cursorPos.y ) - graphic.GetStart() ); - double angle = lineVector.Angle(); - - double newAngle = round( angle / ( M_PI / 4.0 ) ) * M_PI / 4.0; - VECTOR2D newLineVector = lineVector.Rotate( newAngle - angle ); - - // Snap the new line to the grid // TODO fix it, does not work good.. - VECTOR2D newLineEnd = VECTOR2D( graphic.GetStart() ) + newLineVector; - VECTOR2D snapped = m_view->GetGAL()->GetGridPoint( newLineEnd ); - - graphic.SetEnd( wxPoint( snapped.x, snapped.y ) ); - } - else - { - graphic.SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); - } - - // Show a preview of the item - preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - } - } - - m_controls->ShowCursor( false ); - m_controls->SetSnapping( false ); - m_controls->SetAutoPan( false ); - m_view->Remove( &preview ); - setTransitions(); - - return 0; -} - - int DRAWING_TOOL::DrawText( TOOL_EVENT& aEvent ) { // Init the new item attributes @@ -559,285 +441,13 @@ int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent ) int DRAWING_TOOL::DrawZone( TOOL_EVENT& aEvent ) { - ZONE_CONTAINER* zone = new ZONE_CONTAINER( m_board ); - - // Get the current, default settings for zones - ZONE_SETTINGS zoneInfo = m_frame->GetZoneSettings(); - - ZONE_EDIT_T dialogResult; - if( IsCopperLayer( m_frame->GetScreen()->m_Active_Layer ) ) - dialogResult = InvokeCopperZonesEditor( m_frame, &zoneInfo ); - else - dialogResult = InvokeNonCopperZonesEditor( m_frame, zone, &zoneInfo ); - - if( dialogResult == ZONE_ABORT ) - { - delete zone; - setTransitions(); - return 0; - } - - zoneInfo.ExportSetting( *zone ); - m_frame->SetTopLayer( zoneInfo.m_CurrentZone_Layer ); - - DRAWSEGMENT* helperLine = new DRAWSEGMENT; - helperLine->SetShape( S_SEGMENT ); - helperLine->SetLayer( zoneInfo.m_CurrentZone_Layer ); - helperLine->SetWidth( 1 ); - - // Add a VIEW_GROUP that serves as a preview for the new item - KIGFX::VIEW_GROUP preview( m_view ); - m_view->Add( &preview ); - - m_controls->ShowCursor( true ); - m_controls->SetSnapping( true ); - m_controls->SetAutoPan( true ); - - Activate(); - - VECTOR2I lastCursorPos = m_controls->GetCursorPosition(); - - // Main loop: keep receiving events - while( OPT_TOOL_EVENT evt = Wait() ) - { - // Enable 45 degrees lines only mode by holding shift - bool linesAngle45 = evt->Modifier( MD_SHIFT ); - VECTOR2I cursorPos = m_controls->GetCursorPosition(); - - if( evt->IsCancel() ) - { - delete zone; - break; - } - - else if( evt->IsClick( BUT_LEFT ) ) - { - if( lastCursorPos == cursorPos || - ( zone->GetNumCorners() > 0 && wxPoint( cursorPos.x, cursorPos.y ) == zone->Outline()->GetPos( 0 ) ) ) // TODO better conditions - { - if( zone->GetNumCorners() > 2 ) - { - // Finish the zone - zone->Outline()->CloseLastContour(); - zone->Outline()->RemoveNullSegments(); - - m_board->Add( zone ); - m_view->Add( zone ); - - m_frame->Fill_Zone( zone ); - zone->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - } - else - { - // That is not a valid zone - delete zone; - } - - break; - } - else - { - if( zone->GetNumCorners() == 0 ) - { - zone->Outline()->Start( zoneInfo.m_CurrentZone_Layer, - cursorPos.x, - cursorPos.y, - zone->GetHatchStyle() ); - helperLine->SetStart( wxPoint( cursorPos.x, cursorPos.y ) ); - preview.Add( helperLine ); - } - else - { - zone->AppendCorner( helperLine->GetEnd() ); - helperLine = new DRAWSEGMENT( *helperLine ); - preview.Add( helperLine ); - helperLine->SetStart( helperLine->GetEnd() ); - } - preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - } - - lastCursorPos = cursorPos; - } - - else if( evt->IsMotion() ) - { - helperLine->SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); - - // 45 degree lines - if( linesAngle45 ) - { - VECTOR2D lineVector( wxPoint( cursorPos.x, cursorPos.y ) - helperLine->GetStart() ); - double angle = lineVector.Angle(); - - double newAngle = round( angle / ( M_PI / 4.0 ) ) * M_PI / 4.0; - VECTOR2D newLineVector = lineVector.Rotate( newAngle - angle ); - - // Snap the new line to the grid // TODO fix it, does not work good.. - VECTOR2D newLineEnd = VECTOR2D( helperLine->GetStart() ) + newLineVector; - VECTOR2D snapped = m_view->GetGAL()->GetGridPoint( newLineEnd ); - - helperLine->SetEnd( wxPoint( snapped.x, snapped.y ) ); - } - else - { - helperLine->SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); - } - - // Show a preview of the item - preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - } - } - - m_controls->ShowCursor( false ); - m_controls->SetSnapping( false ); - m_controls->SetAutoPan( false ); - m_view->Remove( &preview ); - - // delete helper lines - preview.FreeItems(); - - setTransitions(); - - return 0; + return drawZone( false ); } int DRAWING_TOOL::DrawKeepout( TOOL_EVENT& aEvent ) { - ZONE_CONTAINER* keepout = new ZONE_CONTAINER( m_board ); - - // Get the current, default settings for zones - ZONE_SETTINGS zoneInfo = m_frame->GetZoneSettings(); - - ZONE_EDIT_T dialogResult = InvokeKeepoutAreaEditor( m_frame, &zoneInfo ); - if( dialogResult == ZONE_ABORT ) - { - delete keepout; - setTransitions(); - return 0; - } - - zoneInfo.ExportSetting( *keepout ); - m_frame->SetTopLayer( zoneInfo.m_CurrentZone_Layer ); - - DRAWSEGMENT* helperLine = new DRAWSEGMENT; - helperLine->SetShape( S_SEGMENT ); - helperLine->SetLayer( zoneInfo.m_CurrentZone_Layer ); - helperLine->SetWidth( 1 ); - - // Add a VIEW_GROUP that serves as a preview for the new item - KIGFX::VIEW_GROUP preview( m_view ); - m_view->Add( &preview ); - - m_controls->ShowCursor( true ); - m_controls->SetSnapping( true ); - m_controls->SetAutoPan( true ); - - Activate(); - - VECTOR2I lastCursorPos = m_controls->GetCursorPosition(); - - // Main loop: keep receiving events - while( OPT_TOOL_EVENT evt = Wait() ) - { - // Enable 45 degrees lines only mode by holding shift - bool linesAngle45 = evt->Modifier( MD_SHIFT ); - VECTOR2I cursorPos = m_controls->GetCursorPosition(); - - if( evt->IsCancel() ) - { - delete keepout; - break; - } - - else if( evt->IsClick( BUT_LEFT ) ) - { - if( lastCursorPos == cursorPos || - ( keepout->GetNumCorners() > 0 && wxPoint( cursorPos.x, cursorPos.y ) == keepout->Outline()->GetPos( 0 ) ) ) // TODO better conditions - { - if( keepout->GetNumCorners() > 2 ) - { - // Finish the zone - keepout->Outline()->CloseLastContour(); - keepout->Outline()->RemoveNullSegments(); - - m_board->Add( keepout ); - m_view->Add( keepout ); - - keepout->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - } - else - { - // That is not a valid zone - delete keepout; - } - - break; - } - else - { - if( keepout->GetNumCorners() == 0 ) - { - keepout->Outline()->Start( zoneInfo.m_CurrentZone_Layer, - cursorPos.x, - cursorPos.y, - keepout->GetHatchStyle() ); - helperLine->SetStart( wxPoint( cursorPos.x, cursorPos.y ) ); - preview.Add( helperLine ); - } - else - { - keepout->AppendCorner( helperLine->GetEnd() ); - helperLine = new DRAWSEGMENT( *helperLine ); - preview.Add( helperLine ); - helperLine->SetStart( helperLine->GetEnd() ); - } - preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - } - - lastCursorPos = cursorPos; - } - - else if( evt->IsMotion() ) - { - helperLine->SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); - - // 45 degree lines - if( linesAngle45 ) - { - VECTOR2D lineVector( wxPoint( cursorPos.x, cursorPos.y ) - helperLine->GetStart() ); - double angle = lineVector.Angle(); - - double newAngle = round( angle / ( M_PI / 4.0 ) ) * M_PI / 4.0; - VECTOR2D newLineVector = lineVector.Rotate( newAngle - angle ); - - // Snap the new line to the grid // TODO fix it, does not work good.. - VECTOR2D newLineEnd = VECTOR2D( helperLine->GetStart() ) + newLineVector; - VECTOR2D snapped = m_view->GetGAL()->GetGridPoint( newLineEnd ); - - helperLine->SetEnd( wxPoint( snapped.x, snapped.y ) ); - } - else - { - helperLine->SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); - } - - // Show a preview of the item - preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - } - } - - m_controls->ShowCursor( false ); - m_controls->SetSnapping( false ); - m_controls->SetAutoPan( false ); - m_view->Remove( &preview ); - - // delete helper lines - preview.FreeItems(); - - setTransitions(); - - return 0; + return drawZone( true ); } @@ -986,6 +596,289 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent ) } +int DRAWING_TOOL::draw( int aShape ) +{ + // Only two shapes are currently supported + assert( aShape == S_SEGMENT || aShape == S_CIRCLE ); + + bool started = false; + DRAWSEGMENT graphic; + + // Init the new item attributes + graphic.SetShape( (STROKE_T) aShape ); + graphic.SetWidth( m_board->GetDesignSettings().m_DrawSegmentWidth ); + + // Add a VIEW_GROUP that serves as a preview for the new item + KIGFX::VIEW_GROUP preview( m_view ); + m_view->Add( &preview ); + + m_controls->ShowCursor( true ); + m_controls->SetSnapping( true ); + + Activate(); + + // Main loop: keep receiving events + while( OPT_TOOL_EVENT evt = Wait() ) + { + // Enable 45 degrees lines only mode by holding shift + bool linesAngle45 = evt->Modifier( MD_SHIFT ); + VECTOR2I cursorPos = m_controls->GetCursorPosition(); + + if( evt->IsCancel() ) + break; + + else if( evt->IsKeyUp() ) + { + int width = graphic.GetWidth(); + + // Modify the new item width + if( evt->KeyCode() == '-' && width > WIDTH_STEP ) + graphic.SetWidth( width - WIDTH_STEP ); + else if( evt->KeyCode() == '=' ) + graphic.SetWidth( width + WIDTH_STEP ); + + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + + else if( evt->IsClick( BUT_LEFT ) ) + { + if( !started ) + { + LAYER_NUM layer = m_frame->GetScreen()->m_Active_Layer; + + if( IsCopperLayer( layer ) ) + { + DisplayInfoMessage( NULL, _( "Graphic not allowed on Copper layers" ) ); + } + else + { + m_controls->SetAutoPan( true ); + + graphic.SetStart( wxPoint( cursorPos.x, cursorPos.y ) ); + graphic.SetLayer( layer ); + preview.Add( &graphic ); + + started = true; + } + } + else + { + if( wxPoint( cursorPos.x, cursorPos.y ) != graphic.GetStart() ) + { + DRAWSEGMENT* newItem = new DRAWSEGMENT( graphic ); + m_view->Add( newItem ); + m_board->Add( newItem ); + newItem->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + + if( m_continous ) + graphic.SetStart( graphic.GetEnd() ); // This is the origin point for a new item + else + break; + } + else // User has clicked twice in the same spot + break; // seems like a clear sign that the drawing is finished + } + } + + else if( evt->IsMotion() && started ) + { + // 45 degree lines + if( linesAngle45 && aShape == S_SEGMENT ) + { + VECTOR2D lineVector( wxPoint( cursorPos.x, cursorPos.y ) - graphic.GetStart() ); + double angle = lineVector.Angle(); + + double newAngle = round( angle / ( M_PI / 4.0 ) ) * M_PI / 4.0; + VECTOR2D newLineVector = lineVector.Rotate( newAngle - angle ); + + // Snap the new line to the grid // TODO fix it, does not work good.. + VECTOR2D newLineEnd = VECTOR2D( graphic.GetStart() ) + newLineVector; + VECTOR2D snapped = m_view->GetGAL()->GetGridPoint( newLineEnd ); + + graphic.SetEnd( wxPoint( snapped.x, snapped.y ) ); + } + else + { + graphic.SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); + } + + // Show a preview of the item + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + } + + m_controls->ShowCursor( false ); + m_controls->SetSnapping( false ); + m_controls->SetAutoPan( false ); + m_view->Remove( &preview ); + setTransitions(); + + return 0; +} + + +int DRAWING_TOOL::drawZone( bool aKeepout ) +{ + ZONE_CONTAINER* zone = new ZONE_CONTAINER( m_board ); + + // Get the current, default settings for zones + ZONE_SETTINGS zoneInfo = m_frame->GetZoneSettings(); + zoneInfo.m_CurrentZone_Layer = m_frame->GetScreen()->m_Active_Layer; + + // Show options dialog + ZONE_EDIT_T dialogResult; + if( aKeepout ) + dialogResult = InvokeKeepoutAreaEditor( m_frame, &zoneInfo ); + else + { + if( IsCopperLayer( zoneInfo.m_CurrentZone_Layer ) ) + dialogResult = InvokeCopperZonesEditor( m_frame, &zoneInfo ); + else + dialogResult = InvokeNonCopperZonesEditor( m_frame, NULL, &zoneInfo ); + } + + if( dialogResult == ZONE_ABORT ) + { + delete zone; + setTransitions(); + + return 0; + } + + // Apply the selected settings + zoneInfo.ExportSetting( *zone ); + m_frame->SetTopLayer( zoneInfo.m_CurrentZone_Layer ); + + // Helper line represents the currently drawn line of the zone polygon + DRAWSEGMENT* helperLine = new DRAWSEGMENT; + helperLine->SetShape( S_SEGMENT ); + helperLine->SetLayer( zoneInfo.m_CurrentZone_Layer ); + helperLine->SetWidth( 1 ); + + // Add a VIEW_GROUP that serves as a preview for the new item + KIGFX::VIEW_GROUP preview( m_view ); + m_view->Add( &preview ); + + m_controls->ShowCursor( true ); + m_controls->SetSnapping( true ); + m_controls->SetAutoPan( true ); + + Activate(); + + VECTOR2I lastCursorPos = m_controls->GetCursorPosition(); + VECTOR2I origin; + int numPoints = 0; + + // Main loop: keep receiving events + while( OPT_TOOL_EVENT evt = Wait() ) + { + // Enable 45 degrees lines only mode by holding shift + bool linesAngle45 = evt->Modifier( MD_SHIFT ); + VECTOR2I cursorPos = m_controls->GetCursorPosition(); + + if( evt->IsCancel() ) + { + delete zone; + break; + } + + else if( evt->IsClick( BUT_LEFT ) ) + { + if( lastCursorPos == cursorPos || ( numPoints > 0 && cursorPos == origin ) ) + { + if( numPoints > 2 ) + { + // Finish the zone + zone->Outline()->CloseLastContour(); + zone->Outline()->RemoveNullSegments(); + + m_board->Add( zone ); + m_view->Add( zone ); + + if( !aKeepout ) + m_frame->Fill_Zone( zone ); + + zone->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + else + { + // If there are less than 3 points, then it is not a valid zone + delete zone; + } + + break; + } + else + { + if( numPoints == 0 ) + { + // Add the first point + zone->Outline()->Start( zoneInfo.m_CurrentZone_Layer, + cursorPos.x, + cursorPos.y, + zone->GetHatchStyle() ); + helperLine->SetStart( wxPoint( cursorPos.x, cursorPos.y ) ); + origin = cursorPos; + preview.Add( helperLine ); + } + else + { + zone->AppendCorner( helperLine->GetEnd() ); + helperLine = new DRAWSEGMENT( *helperLine ); + helperLine->SetStart( helperLine->GetEnd() ); + preview.Add( helperLine ); + } + ++numPoints; + + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + + lastCursorPos = cursorPos; + } + + else if( evt->IsMotion() ) + { + helperLine->SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); + + // 45 degree lines + if( linesAngle45 ) + { + VECTOR2D lineVector( wxPoint( cursorPos.x, cursorPos.y ) - helperLine->GetStart() ); + double angle = lineVector.Angle(); + + double newAngle = round( angle / ( M_PI / 4.0 ) ) * M_PI / 4.0; + VECTOR2D newLineVector = lineVector.Rotate( newAngle - angle ); + + // Snap the new line to the grid // TODO fix it, does not work good.. + VECTOR2D newLineEnd = VECTOR2D( helperLine->GetStart() ) + newLineVector; + VECTOR2D snapped = m_view->GetGAL()->GetGridPoint( newLineEnd ); + + helperLine->SetEnd( wxPoint( snapped.x, snapped.y ) ); + } + else + { + helperLine->SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); + } + + // Show a preview of the item + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + } + + m_controls->ShowCursor( false ); + m_controls->SetSnapping( false ); + m_controls->SetAutoPan( false ); + m_view->Remove( &preview ); + + // Delete helper lines + preview.FreeItems(); + + setTransitions(); + + return 0; +} + + void DRAWING_TOOL::setTransitions() { Go( &DRAWING_TOOL::DrawLine, COMMON_ACTIONS::drawLine.MakeEvent() ); diff --git a/pcbnew/tools/drawing_tool.h b/pcbnew/tools/drawing_tool.h index 9881e353c9..e9555d658c 100644 --- a/pcbnew/tools/drawing_tool.h +++ b/pcbnew/tools/drawing_tool.h @@ -75,9 +75,14 @@ public: int PlaceModule( TOOL_EVENT& aEvent ); private: - ///> Starts drawing a selected shape. + ///> Starts drawing a selected shape (i.e. DRAWSEGMENT). + ///> @param aShape is the type of created shape (@see STROKE_T). int draw( int aShape ); + ///> Draws a polygon, that is added as a zone or a keepout area. + ///> @param aKeepout decides if the drawn polygon is a zone or a keepout area. + int drawZone( bool aKeepout ); + ///> Sets up handlers for various events. void setTransitions(); From a7cb90deb8baefad7cc0403d49ed9c55824ced1d Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 14 Feb 2014 11:35:48 +0100 Subject: [PATCH 114/741] Some more minor refactorization. --- pcbnew/tools/drawing_tool.cpp | 123 ++++++++++++++++++---------------- pcbnew/tools/drawing_tool.h | 6 +- 2 files changed, 68 insertions(+), 61 deletions(-) diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index af5b6f6a49..fd00149b8d 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -67,35 +67,30 @@ void DRAWING_TOOL::Reset( RESET_REASON aReason ) int DRAWING_TOOL::DrawLine( TOOL_EVENT& aEvent ) { - m_continous = true; - - return draw( S_SEGMENT ); + return drawSegment( S_SEGMENT, true ); } int DRAWING_TOOL::DrawCircle( TOOL_EVENT& aEvent ) { - m_continous = false; - - return draw( S_CIRCLE ); + return drawSegment( S_CIRCLE, false ); } int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) { - m_continous = false; - - int step = 0; - - DRAWSEGMENT graphic; - DRAWSEGMENT helperLine; - bool positive = true; + bool clockwise = true; + double startAngle; // angle of the first arc line + VECTOR2I cursorPos = m_controls->GetCursorPosition(); // Init the new item attributes + DRAWSEGMENT graphic; graphic.SetShape( S_ARC ); graphic.SetAngle( 0.0 ); graphic.SetWidth( m_board->GetDesignSettings().m_DrawSegmentWidth ); + graphic.SetCenter( wxPoint( cursorPos.x, cursorPos.y ) ); + DRAWSEGMENT helperLine; helperLine.SetShape( S_SEGMENT ); helperLine.SetLayer( DRAW_N ); helperLine.SetWidth( 1 ); @@ -106,13 +101,23 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); + m_controls->SetAutoPan( true ); Activate(); + enum ARC_STEPS + { + SET_ORIGIN = 0, + SET_END, + SET_ANGLE, + FINISHED + }; + int step = SET_ORIGIN; + // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { - VECTOR2I cursorPos = m_controls->GetCursorPosition(); + cursorPos = m_controls->GetCursorPosition(); if( evt->IsCancel() ) break; @@ -126,14 +131,14 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) graphic.SetWidth( width - WIDTH_STEP ); else if( evt->KeyCode() == '=' ) graphic.SetWidth( width + WIDTH_STEP ); - else if( evt->KeyCode() == ' ' ) + else if( evt->KeyCode() == '/' ) { - if( positive ) + if( clockwise ) graphic.SetAngle( graphic.GetAngle() - 3600.0 ); else graphic.SetAngle( graphic.GetAngle() + 3600.0 ); - positive = !positive; + clockwise = !clockwise; } preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); @@ -143,9 +148,9 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) { switch( step ) { - case 0: + case SET_ORIGIN: { - LAYER_NUM layer = getEditFrame()->GetScreen()->m_Active_Layer; + LAYER_NUM layer = m_frame->GetScreen()->m_Active_Layer; if( IsCopperLayer( layer ) ) { @@ -154,8 +159,6 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) } else { - m_controls->SetAutoPan( true ); - helperLine.SetStart( graphic.GetCenter() ); graphic.SetLayer( layer ); preview.Add( &graphic ); @@ -164,7 +167,14 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) } break; - case 2: + case SET_END: + { + VECTOR2D startLine( graphic.GetArcStart() - graphic.GetCenter() ); + startAngle = startLine.Angle(); + } + break; + + case SET_ANGLE: { if( wxPoint( cursorPos.x, cursorPos.y ) != graphic.GetCenter() ) { @@ -175,10 +185,9 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) } } break; - } - if( ++step == 3 ) + if( ++step == FINISHED ) break; } @@ -186,31 +195,27 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) { switch( step ) { - case 0: + case SET_ORIGIN: graphic.SetCenter( wxPoint( cursorPos.x, cursorPos.y ) ); break; - case 1: + case SET_END: helperLine.SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); graphic.SetArcStart( wxPoint( cursorPos.x, cursorPos.y ) ); break; - case 2: + case SET_ANGLE: { - VECTOR2D firstLine( graphic.GetArcStart() - graphic.GetCenter() ); - double firstAngle = firstLine.Angle(); + // Compute the current angle + VECTOR2D endLine( wxPoint( cursorPos.x, cursorPos.y ) - graphic.GetCenter() ); + double newAngle = RAD2DECIDEG( endLine.Angle() - startAngle ); - VECTOR2D secondLine( wxPoint( cursorPos.x, cursorPos.y ) - graphic.GetCenter() ); - double secondAngle = secondLine.Angle(); + if( clockwise && newAngle < 0.0 ) + newAngle += 3600.0; + else if( !clockwise && newAngle > 0.0 ) + newAngle -= 3600.0; - double angle = RAD2DECIDEG( secondAngle - firstAngle ); - - if( positive && angle < 0.0 ) - angle += 3600.0; - else if( !positive && angle > 0.0 ) - angle -= 3600.0; - - graphic.SetAngle( angle ); + graphic.SetAngle( newAngle ); } break; } @@ -309,23 +314,18 @@ int DRAWING_TOOL::DrawText( TOOL_EVENT& aEvent ) int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent ) { - m_continous = false; - - int step = 0; - DIMENSION* dimension = new DIMENSION( m_board ); // Init the new item attributes dimension->Text().SetSize( m_board->GetDesignSettings().m_PcbTextSize ); int width = m_board->GetDesignSettings().m_PcbTextWidth; - int maxthickness = Clamp_Text_PenSize( width, dimension->Text().GetSize() ); + int maxThickness = Clamp_Text_PenSize( width, dimension->Text().GetSize() ); - if( width > maxthickness ) - width = maxthickness; + if( width > maxThickness ) + width = maxThickness; dimension->Text().SetThickness( width ); dimension->SetWidth( width ); - dimension->SetFlags( IS_NEW ); dimension->AdjustDimensionDetails(); // Add a VIEW_GROUP that serves as a preview for the new item @@ -337,6 +337,15 @@ int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent ) Activate(); + enum DIMENSION_STEPS + { + SET_ORIGIN = 0, + SET_END, + SET_HEIGHT, + FINISHED + }; + int step = SET_ORIGIN; + // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { @@ -350,7 +359,7 @@ int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent ) else if( evt->IsKeyUp() ) { - int width = dimension->GetWidth(); + width = dimension->GetWidth(); // Modify the new item width if( evt->KeyCode() == '-' && width > WIDTH_STEP ) @@ -365,7 +374,7 @@ int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent ) { switch( step ) { - case 0: + case SET_ORIGIN: { LAYER_NUM layer = m_frame->GetScreen()->m_Active_Layer; @@ -386,7 +395,7 @@ int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent ) } break; - case 2: + case SET_HEIGHT: { if( wxPoint( cursorPos.x, cursorPos.y ) != dimension->GetPosition() ) { @@ -398,7 +407,7 @@ int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent ) break; } - if( ++step == 3 ) + if( ++step == FINISHED ) break; } @@ -406,13 +415,13 @@ int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent ) { switch( step ) { - case 1: + case SET_END: dimension->SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); break; - case 2: + case SET_HEIGHT: { - /* Calculating the direction of travel perpendicular to the selected axis. */ + // Calculating the direction of travel perpendicular to the selected axis double angle = dimension->GetAngle() + ( M_PI / 2 ); wxPoint pos( cursorPos.x, cursorPos.y ); @@ -475,7 +484,7 @@ int DRAWING_TOOL::PlaceTarget( TOOL_EVENT& aEvent ) // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { - VECTOR2I cursorPos = m_controls->GetCursorPosition(); + cursorPos = m_controls->GetCursorPosition(); if( evt->IsCancel() ) { @@ -596,7 +605,7 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent ) } -int DRAWING_TOOL::draw( int aShape ) +int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) { // Only two shapes are currently supported assert( aShape == S_SEGMENT || aShape == S_CIRCLE ); @@ -670,7 +679,7 @@ int DRAWING_TOOL::draw( int aShape ) m_board->Add( newItem ); newItem->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - if( m_continous ) + if( aContinous ) graphic.SetStart( graphic.GetEnd() ); // This is the origin point for a new item else break; diff --git a/pcbnew/tools/drawing_tool.h b/pcbnew/tools/drawing_tool.h index e9555d658c..baafa9dbc9 100644 --- a/pcbnew/tools/drawing_tool.h +++ b/pcbnew/tools/drawing_tool.h @@ -77,7 +77,8 @@ public: private: ///> Starts drawing a selected shape (i.e. DRAWSEGMENT). ///> @param aShape is the type of created shape (@see STROKE_T). - int draw( int aShape ); + ///> @param aContinous decides if there is only one or multiple shapes to draw. + int drawSegment( int aShape, bool aContinous ); ///> Draws a polygon, that is added as a zone or a keepout area. ///> @param aKeepout decides if the drawn polygon is a zone or a keepout area. @@ -86,9 +87,6 @@ private: ///> Sets up handlers for various events. void setTransitions(); - ///> Should drawing be stopped after drawing one object or should it continue with another one. - bool m_continous; - KIGFX::VIEW* m_view; KIGFX::VIEW_CONTROLS* m_controls; BOARD* m_board; From 3ecae4fa52a507a536568249cf383754b37dc2d5 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 14 Feb 2014 14:16:08 +0100 Subject: [PATCH 115/741] GAL::GetGridPoint() returns point in world coordinates. --- common/gal/graphics_abstraction_layer.cpp | 8 ++++---- common/view/wx_view_controls.cpp | 2 +- include/gal/graphics_abstraction_layer.h | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/common/gal/graphics_abstraction_layer.cpp b/common/gal/graphics_abstraction_layer.cpp index 9bc79b5ab7..7f57d652c4 100644 --- a/common/gal/graphics_abstraction_layer.cpp +++ b/common/gal/graphics_abstraction_layer.cpp @@ -237,10 +237,10 @@ void GAL::DrawGrid() VECTOR2D GAL::GetGridPoint( const VECTOR2D& aPoint ) const { - VECTOR2D pointWorld = ToWorld( aPoint ); + VECTOR2D gridPoint; - pointWorld.x = round( pointWorld.x / gridSize.x ) * gridSize.x; - pointWorld.y = round( pointWorld.y / gridSize.y ) * gridSize.y; + gridPoint.x = round( aPoint.x / gridSize.x ) * gridSize.x; + gridPoint.y = round( aPoint.y / gridSize.y ) * gridSize.y; - return ToScreen( pointWorld ); + return gridPoint; } diff --git a/common/view/wx_view_controls.cpp b/common/view/wx_view_controls.cpp index df8b9849c3..4ecfa953fd 100644 --- a/common/view/wx_view_controls.cpp +++ b/common/view/wx_view_controls.cpp @@ -247,7 +247,7 @@ VECTOR2D WX_VIEW_CONTROLS::GetCursorPosition() const VECTOR2D mousePosition = GetMousePosition(); if( m_snappingEnabled ) - return m_view->ToWorld( m_view->GetGAL()->GetGridPoint( mousePosition ) ); + return m_view->GetGAL()->GetGridPoint( m_view->ToWorld( mousePosition ) ); else return m_view->ToWorld( mousePosition ); } diff --git a/include/gal/graphics_abstraction_layer.h b/include/gal/graphics_abstraction_layer.h index 5b6c656e32..d49e5e2fad 100644 --- a/include/gal/graphics_abstraction_layer.h +++ b/include/gal/graphics_abstraction_layer.h @@ -717,15 +717,15 @@ public: gridLineWidth = aGridLineWidth; } - /// @brief Draw the grid + ///> @brief Draw the grid void DrawGrid(); /** * Function GetGridPoint() - * For a given point it returns the nearest point belonging to the grid in screen coordinates. + * For a given point it returns the nearest point belonging to the grid in world coordinates. * * @param aPoint is the point for which the grid point is searched. - * @return The nearest grid point in screen coordinates. + * @return The nearest grid point in world coordinates. */ VECTOR2D GetGridPoint( const VECTOR2D& aPoint ) const; From b1fb59ad13154aca29c2a3e023ef3c7a99efbe2f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 14 Feb 2014 14:24:12 +0100 Subject: [PATCH 116/741] Refactorization: moved drawing 45 degree multiple line to a function. --- pcbnew/tools/drawing_tool.cpp | 55 +++++++++++++++-------------------- pcbnew/tools/drawing_tool.h | 6 ++++ 2 files changed, 29 insertions(+), 32 deletions(-) diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index fd00149b8d..a059366663 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -693,23 +693,9 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) { // 45 degree lines if( linesAngle45 && aShape == S_SEGMENT ) - { - VECTOR2D lineVector( wxPoint( cursorPos.x, cursorPos.y ) - graphic.GetStart() ); - double angle = lineVector.Angle(); - - double newAngle = round( angle / ( M_PI / 4.0 ) ) * M_PI / 4.0; - VECTOR2D newLineVector = lineVector.Rotate( newAngle - angle ); - - // Snap the new line to the grid // TODO fix it, does not work good.. - VECTOR2D newLineEnd = VECTOR2D( graphic.GetStart() ) + newLineVector; - VECTOR2D snapped = m_view->GetGAL()->GetGridPoint( newLineEnd ); - - graphic.SetEnd( wxPoint( snapped.x, snapped.y ) ); - } + make45DegLine( &graphic ); else - { graphic.SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); - } // Show a preview of the item preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); @@ -847,27 +833,11 @@ int DRAWING_TOOL::drawZone( bool aKeepout ) else if( evt->IsMotion() ) { - helperLine->SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); - // 45 degree lines if( linesAngle45 ) - { - VECTOR2D lineVector( wxPoint( cursorPos.x, cursorPos.y ) - helperLine->GetStart() ); - double angle = lineVector.Angle(); - - double newAngle = round( angle / ( M_PI / 4.0 ) ) * M_PI / 4.0; - VECTOR2D newLineVector = lineVector.Rotate( newAngle - angle ); - - // Snap the new line to the grid // TODO fix it, does not work good.. - VECTOR2D newLineEnd = VECTOR2D( helperLine->GetStart() ) + newLineVector; - VECTOR2D snapped = m_view->GetGAL()->GetGridPoint( newLineEnd ); - - helperLine->SetEnd( wxPoint( snapped.x, snapped.y ) ); - } + make45DegLine( helperLine ); else - { helperLine->SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); - } // Show a preview of the item preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); @@ -888,6 +858,27 @@ int DRAWING_TOOL::drawZone( bool aKeepout ) } +void DRAWING_TOOL::make45DegLine( DRAWSEGMENT* aSegment ) const +{ + VECTOR2I cursorPos = m_controls->GetCursorPosition(); + + // Current line vector + VECTOR2D lineVector( wxPoint( cursorPos.x, cursorPos.y ) - aSegment->GetStart() ); + double angle = lineVector.Angle(); + + // Find the closest angle, which is a multiple of 45 degrees + double newAngle = round( angle / ( M_PI / 4.0 ) ) * M_PI / 4.0; + + VECTOR2D newLineVector = lineVector.Rotate( newAngle - angle ); + VECTOR2D newLineEnd = VECTOR2D( aSegment->GetStart() ) + newLineVector; + + // Snap the new line to the grid + newLineEnd = m_view->GetGAL()->GetGridPoint( newLineEnd ); + + aSegment->SetEnd( wxPoint( newLineEnd.x, newLineEnd.y ) ); +} + + void DRAWING_TOOL::setTransitions() { Go( &DRAWING_TOOL::DrawLine, COMMON_ACTIONS::drawLine.MakeEvent() ); diff --git a/pcbnew/tools/drawing_tool.h b/pcbnew/tools/drawing_tool.h index baafa9dbc9..d34113e126 100644 --- a/pcbnew/tools/drawing_tool.h +++ b/pcbnew/tools/drawing_tool.h @@ -34,6 +34,7 @@ namespace KIGFX } class BOARD; class PCB_EDIT_FRAME; +class DRAWSEGMENT; /** * Class DRAWING_TOOL @@ -84,6 +85,11 @@ private: ///> @param aKeepout decides if the drawn polygon is a zone or a keepout area. int drawZone( bool aKeepout ); + ///> Forces a DRAWSEGMENT to be drawn at multiple of 45 degrees. The origin + ///> stays the same, the end of the aSegment is modified according to the + ///> current cursor position. + void make45DegLine( DRAWSEGMENT* aSegment ) const; + ///> Sets up handlers for various events. void setTransitions(); From 9d3f7230ee9d8adcfa841512206e4d850c150ea9 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 14 Feb 2014 15:13:42 +0100 Subject: [PATCH 117/741] New items are created using pointers (instead of copying automatic variables when drawing is finished). --- pcbnew/tools/drawing_tool.cpp | 118 ++++++++++++++++++++-------------- pcbnew/tools/drawing_tool.h | 47 +++++++++++++- 2 files changed, 117 insertions(+), 48 deletions(-) diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index a059366663..b4c6485d6f 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -40,7 +40,6 @@ #include #include #include -#include // TODO to be removed if we do not need the flags DRAWING_TOOL::DRAWING_TOOL() : TOOL_INTERACTIVE( "pcbnew.InteractiveDrawing" ) @@ -79,16 +78,16 @@ int DRAWING_TOOL::DrawCircle( TOOL_EVENT& aEvent ) int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) { - bool clockwise = true; + bool clockwise = true; // drawing direction of the arc double startAngle; // angle of the first arc line VECTOR2I cursorPos = m_controls->GetCursorPosition(); // Init the new item attributes - DRAWSEGMENT graphic; - graphic.SetShape( S_ARC ); - graphic.SetAngle( 0.0 ); - graphic.SetWidth( m_board->GetDesignSettings().m_DrawSegmentWidth ); - graphic.SetCenter( wxPoint( cursorPos.x, cursorPos.y ) ); + DRAWSEGMENT* graphic = new DRAWSEGMENT( m_board ); + graphic->SetShape( S_ARC ); + graphic->SetAngle( 0.0 ); + graphic->SetWidth( m_board->GetDesignSettings().m_DrawSegmentWidth ); + graphic->SetCenter( wxPoint( cursorPos.x, cursorPos.y ) ); DRAWSEGMENT helperLine; helperLine.SetShape( S_SEGMENT ); @@ -120,23 +119,26 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) cursorPos = m_controls->GetCursorPosition(); if( evt->IsCancel() ) + { + delete graphic; break; + } else if( evt->IsKeyUp() ) { - int width = graphic.GetWidth(); + int width = graphic->GetWidth(); // Modify the new item width if( evt->KeyCode() == '-' && width > WIDTH_STEP ) - graphic.SetWidth( width - WIDTH_STEP ); + graphic->SetWidth( width - WIDTH_STEP ); else if( evt->KeyCode() == '=' ) - graphic.SetWidth( width + WIDTH_STEP ); + graphic->SetWidth( width + WIDTH_STEP ); else if( evt->KeyCode() == '/' ) { if( clockwise ) - graphic.SetAngle( graphic.GetAngle() - 3600.0 ); + graphic->SetAngle( graphic->GetAngle() - 3600.0 ); else - graphic.SetAngle( graphic.GetAngle() + 3600.0 ); + graphic->SetAngle( graphic->GetAngle() + 3600.0 ); clockwise = !clockwise; } @@ -159,9 +161,9 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) } else { - helperLine.SetStart( graphic.GetCenter() ); - graphic.SetLayer( layer ); - preview.Add( &graphic ); + helperLine.SetStart( graphic->GetCenter() ); + graphic->SetLayer( layer ); + preview.Add( graphic ); preview.Add( &helperLine ); } } @@ -169,19 +171,23 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) case SET_END: { - VECTOR2D startLine( graphic.GetArcStart() - graphic.GetCenter() ); + VECTOR2D startLine( graphic->GetArcStart() - graphic->GetCenter() ); startAngle = startLine.Angle(); } break; case SET_ANGLE: { - if( wxPoint( cursorPos.x, cursorPos.y ) != graphic.GetCenter() ) + if( wxPoint( cursorPos.x, cursorPos.y ) != graphic->GetCenter() ) { - DRAWSEGMENT* newItem = new DRAWSEGMENT( graphic ); - m_view->Add( newItem ); - m_board->Add( newItem ); - newItem->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + m_view->Add( graphic ); + m_board->Add( graphic ); + graphic->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + else + { + // Let's give the user another chance of drawing a proper arc (i.e. angle > 0) + --step; } } break; @@ -196,18 +202,18 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) switch( step ) { case SET_ORIGIN: - graphic.SetCenter( wxPoint( cursorPos.x, cursorPos.y ) ); + graphic->SetCenter( wxPoint( cursorPos.x, cursorPos.y ) ); break; case SET_END: helperLine.SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); - graphic.SetArcStart( wxPoint( cursorPos.x, cursorPos.y ) ); + graphic->SetArcStart( wxPoint( cursorPos.x, cursorPos.y ) ); break; case SET_ANGLE: { // Compute the current angle - VECTOR2D endLine( wxPoint( cursorPos.x, cursorPos.y ) - graphic.GetCenter() ); + VECTOR2D endLine( wxPoint( cursorPos.x, cursorPos.y ) - graphic->GetCenter() ); double newAngle = RAD2DECIDEG( endLine.Angle() - startAngle ); if( clockwise && newAngle < 0.0 ) @@ -215,7 +221,7 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) else if( !clockwise && newAngle > 0.0 ) newAngle -= 3600.0; - graphic.SetAngle( newAngle ); + graphic->SetAngle( newAngle ); } break; } @@ -395,6 +401,12 @@ int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent ) } break; + case SET_END: + // Dimensions that have origin and end in the same spot are not valid + if( dimension->GetOrigin() == wxPoint( cursorPos.x, cursorPos.y ) ) + --step; + break; + case SET_HEIGHT: { if( wxPoint( cursorPos.x, cursorPos.y ) != dimension->GetPosition() ) @@ -610,12 +622,11 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) // Only two shapes are currently supported assert( aShape == S_SEGMENT || aShape == S_CIRCLE ); - bool started = false; - DRAWSEGMENT graphic; + DRAWSEGMENT* graphic = new DRAWSEGMENT( m_board ); // Init the new item attributes - graphic.SetShape( (STROKE_T) aShape ); - graphic.SetWidth( m_board->GetDesignSettings().m_DrawSegmentWidth ); + graphic->SetShape( (STROKE_T) aShape ); + graphic->SetWidth( m_board->GetDesignSettings().m_DrawSegmentWidth ); // Add a VIEW_GROUP that serves as a preview for the new item KIGFX::VIEW_GROUP preview( m_view ); @@ -626,6 +637,7 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) Activate(); + bool started = false; // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { @@ -634,17 +646,22 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) VECTOR2I cursorPos = m_controls->GetCursorPosition(); if( evt->IsCancel() ) + { + preview.FreeItems(); + if( !started ) + delete graphic; break; + } else if( evt->IsKeyUp() ) { - int width = graphic.GetWidth(); + int width = graphic->GetWidth(); // Modify the new item width if( evt->KeyCode() == '-' && width > WIDTH_STEP ) - graphic.SetWidth( width - WIDTH_STEP ); + graphic->SetWidth( width - WIDTH_STEP ); else if( evt->KeyCode() == '=' ) - graphic.SetWidth( width + WIDTH_STEP ); + graphic->SetWidth( width + WIDTH_STEP ); preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); } @@ -663,29 +680,37 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) { m_controls->SetAutoPan( true ); - graphic.SetStart( wxPoint( cursorPos.x, cursorPos.y ) ); - graphic.SetLayer( layer ); - preview.Add( &graphic ); + graphic->SetStart( wxPoint( cursorPos.x, cursorPos.y ) ); + graphic->SetLayer( layer ); + preview.Add( graphic ); started = true; } } else { - if( wxPoint( cursorPos.x, cursorPos.y ) != graphic.GetStart() ) + if( wxPoint( cursorPos.x, cursorPos.y ) != graphic->GetStart() ) { - DRAWSEGMENT* newItem = new DRAWSEGMENT( graphic ); - m_view->Add( newItem ); - m_board->Add( newItem ); - newItem->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + m_view->Add( graphic ); + m_board->Add( graphic ); + graphic->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + preview.Remove( graphic ); if( aContinous ) - graphic.SetStart( graphic.GetEnd() ); // This is the origin point for a new item + { + graphic = new DRAWSEGMENT( *graphic ); + // Start the new line in the same spot where the previous one has ended + graphic->SetStart( graphic->GetEnd() ); + preview.Add( graphic ); + } else break; } - else // User has clicked twice in the same spot - break; // seems like a clear sign that the drawing is finished + else + { // User has clicked twice in the same spot + delete graphic; // seems like a clear sign that the drawing is finished + break; // and we should remove the latest DRAWSEGMENT we have created + } } } @@ -693,9 +718,9 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) { // 45 degree lines if( linesAngle45 && aShape == S_SEGMENT ) - make45DegLine( &graphic ); + make45DegLine( graphic ); else - graphic.SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); + graphic->SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); // Show a preview of the item preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); @@ -809,8 +834,7 @@ int DRAWING_TOOL::drawZone( bool aKeepout ) { // Add the first point zone->Outline()->Start( zoneInfo.m_CurrentZone_Layer, - cursorPos.x, - cursorPos.y, + cursorPos.x, cursorPos.y, zone->GetHatchStyle() ); helperLine->SetStart( wxPoint( cursorPos.x, cursorPos.y ) ); origin = cursorPos; diff --git a/pcbnew/tools/drawing_tool.h b/pcbnew/tools/drawing_tool.h index d34113e126..2b759670c8 100644 --- a/pcbnew/tools/drawing_tool.h +++ b/pcbnew/tools/drawing_tool.h @@ -54,25 +54,70 @@ public: /** * Function DrawLine() * Starts interactively drawing a line. After invoking the function it expects the user - * to click at least twice to determine the origin and the end for a line. If there are + * to click at least two times to determine the origin and the end for a line. If there are * more clicks, the line is drawn as a continous polyline. */ int DrawLine( TOOL_EVENT& aEvent ); + /** + * Function DrawCircle() + * Starts interactively drawing a circle. After invoking the function it expects the user + * to first click on a point that is going to be used as the center of the circle. The second + * click determines the circle radius. + */ int DrawCircle( TOOL_EVENT& aEvent ); + /** + * Function DrawArc() + * Starts interactively drawing an arc. After invoking the function it expects the user + * to first click on a point that is going to be used as the center of the arc. The second + * click determines the origin and radius, the third one - the angle. + */ int DrawArc( TOOL_EVENT& aEvent ); + /** + * Function DrawText() + * Displays a dialog that allows to input text and its settings and then lets the user decide + * where to place the text. + */ int DrawText( TOOL_EVENT& aEvent ); + /** + * Function DrawDimension() + * Starts interactively drawing a dimension. After invoking the function it expects the user + * to first click on a point that is going to be used as the origin of the dimension. + * The second click determines the end and the third click modifies its height. + */ int DrawDimension( TOOL_EVENT& aEvent ); + /** + * Function DrawZone() + * Starts interactively drawing a zone. After invoking the function a zone settings dialog + * is displayed. After confirmation it allows the user to set points that are going to be used + * as a boundary polygon of the zone. Double click or clicking on the origin of the boundary + * polyline finishes the drawing. + */ int DrawZone( TOOL_EVENT& aEvent ); + /** + * Function DrawKeepout() + * Starts interactively drawing a keepout area. After invoking the function an area settings + * dialog is displayed. After confirmation it allows the user to set points that are going to + * be used as a boundary polygon of the area. Double click or clicking on the origin of the + * boundary polyline finishes the drawing. + */ int DrawKeepout( TOOL_EVENT& aEvent ); + /** + * Function PlaceTarget() + * Allows user to place a layer alignment target. + */ int PlaceTarget( TOOL_EVENT& aEvent ); + /** + * Function PlaceModule() + * Displays a dialog to selected a module to be added and then allows user to set its position.. + */ int PlaceModule( TOOL_EVENT& aEvent ); private: From c1c8f54e8b41517647fcb9d3281ca83caf1ac74a Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 14 Feb 2014 15:52:13 +0100 Subject: [PATCH 118/741] Added a few asserts. Made some steps idiotproof. --- pcbnew/tools/drawing_tool.cpp | 116 +++++++++++++++++++++------------- 1 file changed, 72 insertions(+), 44 deletions(-) diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index b4c6485d6f..aefc7e3a3d 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -83,11 +83,11 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) VECTOR2I cursorPos = m_controls->GetCursorPosition(); // Init the new item attributes - DRAWSEGMENT* graphic = new DRAWSEGMENT( m_board ); - graphic->SetShape( S_ARC ); - graphic->SetAngle( 0.0 ); - graphic->SetWidth( m_board->GetDesignSettings().m_DrawSegmentWidth ); - graphic->SetCenter( wxPoint( cursorPos.x, cursorPos.y ) ); + DRAWSEGMENT* arc = new DRAWSEGMENT( m_board ); + arc->SetShape( S_ARC ); + arc->SetAngle( 0.0 ); + arc->SetWidth( m_board->GetDesignSettings().m_DrawSegmentWidth ); + arc->SetCenter( wxPoint( cursorPos.x, cursorPos.y ) ); DRAWSEGMENT helperLine; helperLine.SetShape( S_SEGMENT ); @@ -100,7 +100,6 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); - m_controls->SetAutoPan( true ); Activate(); @@ -120,25 +119,25 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) if( evt->IsCancel() ) { - delete graphic; + delete arc; break; } else if( evt->IsKeyUp() ) { - int width = graphic->GetWidth(); + int width = arc->GetWidth(); // Modify the new item width if( evt->KeyCode() == '-' && width > WIDTH_STEP ) - graphic->SetWidth( width - WIDTH_STEP ); + arc->SetWidth( width - WIDTH_STEP ); else if( evt->KeyCode() == '=' ) - graphic->SetWidth( width + WIDTH_STEP ); + arc->SetWidth( width + WIDTH_STEP ); else if( evt->KeyCode() == '/' ) { if( clockwise ) - graphic->SetAngle( graphic->GetAngle() - 3600.0 ); + arc->SetAngle( arc->GetAngle() - 3600.0 ); else - graphic->SetAngle( graphic->GetAngle() + 3600.0 ); + arc->SetAngle( arc->GetAngle() + 3600.0 ); clockwise = !clockwise; } @@ -161,34 +160,45 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) } else { - helperLine.SetStart( graphic->GetCenter() ); - graphic->SetLayer( layer ); - preview.Add( graphic ); + helperLine.SetStart( arc->GetCenter() ); + arc->SetCenter( wxPoint( cursorPos.x, cursorPos.y ) ); + arc->SetLayer( layer ); + preview.Add( arc ); preview.Add( &helperLine ); + + m_controls->SetAutoPan( true ); } } break; case SET_END: { - VECTOR2D startLine( graphic->GetArcStart() - graphic->GetCenter() ); - startAngle = startLine.Angle(); + if( wxPoint( cursorPos.x, cursorPos.y ) != arc->GetCenter() ) + { + VECTOR2D startLine( arc->GetArcStart() - arc->GetCenter() ); + startAngle = startLine.Angle(); + arc->SetArcStart( wxPoint( cursorPos.x, cursorPos.y ) ); + } + else + --step; // one another chance to draw a proper arc + } break; case SET_ANGLE: { - if( wxPoint( cursorPos.x, cursorPos.y ) != graphic->GetCenter() ) + if( wxPoint( cursorPos.x, cursorPos.y ) != arc->GetArcStart() ) { - m_view->Add( graphic ); - m_board->Add( graphic ); - graphic->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + assert( arc->GetAngle() > 0 ); + assert( arc->GetArcStart() != arc->GetArcEnd() ); + assert( arc->GetWidth() > 0 ); + + m_view->Add( arc ); + m_board->Add( arc ); + arc->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); } else - { - // Let's give the user another chance of drawing a proper arc (i.e. angle > 0) - --step; - } + --step; // one another chance to draw a proper arc } break; } @@ -202,18 +212,18 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) switch( step ) { case SET_ORIGIN: - graphic->SetCenter( wxPoint( cursorPos.x, cursorPos.y ) ); + arc->SetCenter( wxPoint( cursorPos.x, cursorPos.y ) ); break; case SET_END: helperLine.SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); - graphic->SetArcStart( wxPoint( cursorPos.x, cursorPos.y ) ); + arc->SetArcStart( wxPoint( cursorPos.x, cursorPos.y ) ); break; case SET_ANGLE: { // Compute the current angle - VECTOR2D endLine( wxPoint( cursorPos.x, cursorPos.y ) - graphic->GetCenter() ); + VECTOR2D endLine( wxPoint( cursorPos.x, cursorPos.y ) - arc->GetCenter() ); double newAngle = RAD2DECIDEG( endLine.Angle() - startAngle ); if( clockwise && newAngle < 0.0 ) @@ -221,7 +231,7 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) else if( !clockwise && newAngle > 0.0 ) newAngle -= 3600.0; - graphic->SetAngle( newAngle ); + arc->SetAngle( newAngle ); } break; } @@ -245,8 +255,8 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) int DRAWING_TOOL::DrawText( TOOL_EVENT& aEvent ) { // Init the new item attributes - TEXTE_PCB* newText = m_frame->CreateTextePcb( NULL ); - if( newText == NULL ) + TEXTE_PCB* text = m_frame->CreateTextePcb( NULL ); + if( text == NULL ) { setTransitions(); return 0; @@ -254,7 +264,7 @@ int DRAWING_TOOL::DrawText( TOOL_EVENT& aEvent ) // Add a VIEW_GROUP that serves as a preview for the new item KIGFX::VIEW_GROUP preview( m_view ); - preview.Add( newText ); + preview.Add( text ); m_view->Add( &preview ); m_controls->ShowCursor( true ); @@ -271,7 +281,7 @@ int DRAWING_TOOL::DrawText( TOOL_EVENT& aEvent ) if( evt->IsCancel() ) { // it was already added by CreateTextPcb() - m_board->Delete( newText ); + m_board->Delete( text ); break; } @@ -279,28 +289,31 @@ int DRAWING_TOOL::DrawText( TOOL_EVENT& aEvent ) { if( evt->IsAction( &COMMON_ACTIONS::rotate ) ) { - newText->Rotate( newText->GetPosition(), m_frame->GetRotationAngle() ); + text->Rotate( text->GetPosition(), m_frame->GetRotationAngle() ); preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); } else if( evt->IsAction( &COMMON_ACTIONS::flip ) ) { - newText->Flip( newText->GetPosition() ); + text->Flip( text->GetPosition() ); preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); } } else if( evt->IsClick( BUT_LEFT ) ) { - newText->ClearFlags(); - m_view->Add( newText ); - // m_board->Add( newText ); // it is already added by CreateTextePcb() - newText->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + assert( text->GetText().Length() > 0 ); + assert( text->GetSize().x > 0 && text->GetSize().y > 0 ); + + text->ClearFlags(); + m_view->Add( text ); + // m_board->Add( text ); // it is already added by CreateTextePcb() + text->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); break; } else if( evt->IsMotion() ) { - newText->SetTextPosition( wxPoint( cursorPos.x, cursorPos.y ) ); + text->SetTextPosition( wxPoint( cursorPos.x, cursorPos.y ) ); // Show a preview of the item preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); @@ -411,6 +424,9 @@ int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent ) { if( wxPoint( cursorPos.x, cursorPos.y ) != dimension->GetPosition() ) { + assert( dimension->GetOrigin() != dimension->GetEnd() ); + assert( dimension->GetWidth() > 0 ); + m_view->Add( dimension ); m_board->Add( dimension ); dimension->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); @@ -519,6 +535,9 @@ int DRAWING_TOOL::PlaceTarget( TOOL_EVENT& aEvent ) else if( evt->IsClick( BUT_LEFT ) ) { + assert( target->GetSize() > 0 ); + assert( target->GetWidth() > 0 ); + m_view->Add( target ); m_board->Add( target ); target->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); @@ -638,6 +657,7 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) Activate(); bool started = false; + int addedSegments = 0; // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { @@ -648,7 +668,7 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) if( evt->IsCancel() ) { preview.FreeItems(); - if( !started ) + if( !started ) // TODO check it delete graphic; break; } @@ -691,10 +711,14 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) { if( wxPoint( cursorPos.x, cursorPos.y ) != graphic->GetStart() ) { + assert( graphic->GetLength() > 0 ); + assert( graphic->GetWidth() > 0 ); + m_view->Add( graphic ); - m_board->Add( graphic ); + m_board->Add( graphic ); graphic->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); preview.Remove( graphic ); + ++addedSegments; if( aContinous ) { @@ -704,10 +728,12 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) preview.Add( graphic ); } else + { break; + } } - else - { // User has clicked twice in the same spot + else if( addedSegments > 0 ) // User has clicked twice in the same spot + { delete graphic; // seems like a clear sign that the drawing is finished break; // and we should remove the latest DRAWSEGMENT we have created } @@ -808,6 +834,8 @@ int DRAWING_TOOL::drawZone( bool aKeepout ) { if( numPoints > 2 ) { + assert( zone->GetNumCorners() > 2 ); + // Finish the zone zone->Outline()->CloseLastContour(); zone->Outline()->RemoveNullSegments(); From f82e07849ba3f6779cb22c3543e17f7dbcbf0d93 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 17 Feb 2014 11:33:03 +0100 Subject: [PATCH 119/741] Improved way of drawing 45-degree lines. --- include/geometry/shape_line_chain.h | 2 +- pcbnew/router/direction.h | 5 +- pcbnew/tools/drawing_tool.cpp | 133 ++++++++++++++++++++-------- pcbnew/tools/drawing_tool.h | 4 +- 4 files changed, 103 insertions(+), 41 deletions(-) diff --git a/include/geometry/shape_line_chain.h b/include/geometry/shape_line_chain.h index 5108191bb7..da6494e91a 100644 --- a/include/geometry/shape_line_chain.h +++ b/include/geometry/shape_line_chain.h @@ -415,7 +415,7 @@ public: * @param aP the point to be looked for * @return index of the correspoinding point in the line chain or negative when not found. */ - int Find ( const VECTOR2I& aP ) const; + int Find( const VECTOR2I& aP ) const; /** * Function Slice() diff --git a/pcbnew/router/direction.h b/pcbnew/router/direction.h index 0b7d8cb62d..ad38fcbdef 100644 --- a/pcbnew/router/direction.h +++ b/pcbnew/router/direction.h @@ -133,10 +133,7 @@ public: */ DIRECTION_45 Opposite() const { - if( m_dir == UNDEFINED ) - return UNDEFINED; - - const Directions OppositeMap[] = { S, SW, W, NW, N, NE, E, SE }; + const Directions OppositeMap[] = { S, SW, W, NW, N, NE, E, SE, UNDEFINED }; return OppositeMap[m_dir]; } diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index aefc7e3a3d..a80b605da4 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -641,12 +642,13 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) // Only two shapes are currently supported assert( aShape == S_SEGMENT || aShape == S_CIRCLE ); - DRAWSEGMENT* graphic = new DRAWSEGMENT( m_board ); - // Init the new item attributes + DRAWSEGMENT* graphic = new DRAWSEGMENT( m_board ); graphic->SetShape( (STROKE_T) aShape ); graphic->SetWidth( m_board->GetDesignSettings().m_DrawSegmentWidth ); + DRAWSEGMENT line45( *graphic ); // used only for direction 45 mode with lines + // Add a VIEW_GROUP that serves as a preview for the new item KIGFX::VIEW_GROUP preview( m_view ); m_view->Add( &preview ); @@ -657,19 +659,43 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) Activate(); bool started = false; + bool direction45 = false; // 45 degrees only mode int addedSegments = 0; + // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { - // Enable 45 degrees lines only mode by holding shift - bool linesAngle45 = evt->Modifier( MD_SHIFT ); + bool updatePreview = false; // should preview be updated VECTOR2I cursorPos = m_controls->GetCursorPosition(); + // Enable 45 degrees lines only mode by holding control + if( direction45 != ( evt->Modifier( MD_CTRL ) && aShape == S_SEGMENT && started ) ) + { + direction45 = evt->Modifier( MD_CTRL ); + + if( direction45 ) + { + preview.Add( &line45 ); + make45DegLine( graphic, &line45 ); + } + else + { + preview.Remove( &line45 ); + graphic->SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); + } + + updatePreview = true; + } + if( evt->IsCancel() ) { + if( direction45 ) + preview.Remove( &line45 ); + preview.FreeItems(); - if( !started ) // TODO check it + if( !started ) delete graphic; + break; } @@ -683,7 +709,7 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) else if( evt->KeyCode() == '=' ) graphic->SetWidth( width + WIDTH_STEP ); - preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + updatePreview = true; } else if( evt->IsClick( BUT_LEFT ) ) @@ -701,7 +727,9 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) m_controls->SetAutoPan( true ); graphic->SetStart( wxPoint( cursorPos.x, cursorPos.y ) ); + graphic->SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); graphic->SetLayer( layer ); + line45.SetLayer( layer ); preview.Add( graphic ); started = true; @@ -709,7 +737,7 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) } else { - if( wxPoint( cursorPos.x, cursorPos.y ) != graphic->GetStart() ) + if( graphic->GetEnd() != graphic->GetStart() ) { assert( graphic->GetLength() > 0 ); assert( graphic->GetWidth() > 0 ); @@ -725,6 +753,10 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) graphic = new DRAWSEGMENT( *graphic ); // Start the new line in the same spot where the previous one has ended graphic->SetStart( graphic->GetEnd() ); + + if( direction45 ) + graphic->SetEnd( line45.GetEnd() ); + preview.Add( graphic ); } else @@ -743,14 +775,16 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) else if( evt->IsMotion() && started ) { // 45 degree lines - if( linesAngle45 && aShape == S_SEGMENT ) - make45DegLine( graphic ); + if( direction45 && aShape == S_SEGMENT ) + make45DegLine( graphic, &line45 ); else graphic->SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); - // Show a preview of the item - preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + updatePreview = true; } + + if( updatePreview ) + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); } m_controls->ShowCursor( false ); @@ -800,6 +834,7 @@ int DRAWING_TOOL::drawZone( bool aKeepout ) helperLine->SetShape( S_SEGMENT ); helperLine->SetLayer( zoneInfo.m_CurrentZone_Layer ); helperLine->SetWidth( 1 ); + DRAWSEGMENT line45( *helperLine ); // Add a VIEW_GROUP that serves as a preview for the new item KIGFX::VIEW_GROUP preview( m_view ); @@ -814,17 +849,37 @@ int DRAWING_TOOL::drawZone( bool aKeepout ) VECTOR2I lastCursorPos = m_controls->GetCursorPosition(); VECTOR2I origin; int numPoints = 0; + bool direction45 = false; // 45 degrees only mode + bool cancelled = false; // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { - // Enable 45 degrees lines only mode by holding shift - bool linesAngle45 = evt->Modifier( MD_SHIFT ); + bool updatePreview = false; // should preview be updated VECTOR2I cursorPos = m_controls->GetCursorPosition(); + // Enable 45 degrees lines only mode by holding control + if( direction45 != ( evt->Modifier( MD_CTRL ) && numPoints > 0 ) ) + { + direction45 = evt->Modifier( MD_CTRL ); + + if( direction45 ) + { + preview.Add( &line45 ); + make45DegLine( helperLine, &line45 ); + } + else + { + preview.Remove( &line45 ); + helperLine->SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); + } + + updatePreview = true; + } + if( evt->IsCancel() ) { - delete zone; + cancelled = true; break; } @@ -851,7 +906,7 @@ int DRAWING_TOOL::drawZone( bool aKeepout ) else { // If there are less than 3 points, then it is not a valid zone - delete zone; + cancelled = true; } break; @@ -877,7 +932,7 @@ int DRAWING_TOOL::drawZone( bool aKeepout ) } ++numPoints; - preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + updatePreview = true; } lastCursorPos = cursorPos; @@ -886,14 +941,17 @@ int DRAWING_TOOL::drawZone( bool aKeepout ) else if( evt->IsMotion() ) { // 45 degree lines - if( linesAngle45 ) - make45DegLine( helperLine ); + if( direction45 ) + make45DegLine( helperLine, &line45 ); else helperLine->SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); // Show a preview of the item - preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + updatePreview = true; } + + if( updatePreview ) + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); } m_controls->ShowCursor( false ); @@ -901,7 +959,11 @@ int DRAWING_TOOL::drawZone( bool aKeepout ) m_controls->SetAutoPan( false ); m_view->Remove( &preview ); - // Delete helper lines + // Clean + if( cancelled ) + delete zone; + if( direction45 ) + preview.Remove( &line45 ); preview.FreeItems(); setTransitions(); @@ -910,24 +972,25 @@ int DRAWING_TOOL::drawZone( bool aKeepout ) } -void DRAWING_TOOL::make45DegLine( DRAWSEGMENT* aSegment ) const +void DRAWING_TOOL::make45DegLine( DRAWSEGMENT* aSegment, DRAWSEGMENT* aHelper ) const { VECTOR2I cursorPos = m_controls->GetCursorPosition(); + VECTOR2I origin( aSegment->GetStart() ); + DIRECTION_45 direction( origin - cursorPos ); + SHAPE_LINE_CHAIN newChain = direction.BuildInitialTrace( origin, cursorPos ); - // Current line vector - VECTOR2D lineVector( wxPoint( cursorPos.x, cursorPos.y ) - aSegment->GetStart() ); - double angle = lineVector.Angle(); - - // Find the closest angle, which is a multiple of 45 degrees - double newAngle = round( angle / ( M_PI / 4.0 ) ) * M_PI / 4.0; - - VECTOR2D newLineVector = lineVector.Rotate( newAngle - angle ); - VECTOR2D newLineEnd = VECTOR2D( aSegment->GetStart() ) + newLineVector; - - // Snap the new line to the grid - newLineEnd = m_view->GetGAL()->GetGridPoint( newLineEnd ); - - aSegment->SetEnd( wxPoint( newLineEnd.x, newLineEnd.y ) ); + if( newChain.PointCount() > 2 ) + { + aSegment->SetEnd( wxPoint( newChain.Point( -2 ).x, newChain.Point( -2 ).y ) ); + aHelper->SetStart( wxPoint( newChain.Point( -2 ).x, newChain.Point( -2 ).y ) ); + aHelper->SetEnd( wxPoint( newChain.Point( -1 ).x, newChain.Point( -1 ).y ) ); + } + else + { + aSegment->SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); + aHelper->SetStart( wxPoint( cursorPos.x, cursorPos.y ) ); + aHelper->SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); + } } diff --git a/pcbnew/tools/drawing_tool.h b/pcbnew/tools/drawing_tool.h index 2b759670c8..775351efaf 100644 --- a/pcbnew/tools/drawing_tool.h +++ b/pcbnew/tools/drawing_tool.h @@ -133,7 +133,9 @@ private: ///> Forces a DRAWSEGMENT to be drawn at multiple of 45 degrees. The origin ///> stays the same, the end of the aSegment is modified according to the ///> current cursor position. - void make45DegLine( DRAWSEGMENT* aSegment ) const; + ///> @param aSegment is the segment that is currently drawn. + ///> @param aHelper is a helper line that shows the next possible segment. + void make45DegLine( DRAWSEGMENT* aSegment, DRAWSEGMENT* aHelper ) const; ///> Sets up handlers for various events. void setTransitions(); From 6e52e193672ca4a1386770c4237d83907515d172 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 17 Feb 2014 14:36:51 +0100 Subject: [PATCH 120/741] Small leak fix. --- pcbnew/router/pns_router.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index b655ac363f..8ab4fb2fc9 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -339,9 +339,13 @@ void PNS_ROUTER::ClearWorld() if( m_placer ) delete m_placer; + if( m_previewItems ) + delete m_previewItems; + m_clearanceFunc = NULL; m_world = NULL; m_placer = NULL; + m_previewItems = NULL; } From 05de84d5425f10515126f0ab9afc6f627df92dd3 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 17 Feb 2014 14:53:01 +0100 Subject: [PATCH 121/741] Undo/redo support. --- pcbnew/tools/drawing_tool.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index a80b605da4..aefcdd76ab 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -197,6 +197,9 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) m_view->Add( arc ); m_board->Add( arc ); arc->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + + m_frame->OnModify(); + m_frame->SaveCopyInUndoList( arc, UR_NEW ); } else --step; // one another chance to draw a proper arc @@ -309,6 +312,10 @@ int DRAWING_TOOL::DrawText( TOOL_EVENT& aEvent ) m_view->Add( text ); // m_board->Add( text ); // it is already added by CreateTextePcb() text->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + + m_frame->OnModify(); + m_frame->SaveCopyInUndoList( text, UR_NEW ); + break; } @@ -431,6 +438,9 @@ int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent ) m_view->Add( dimension ); m_board->Add( dimension ); dimension->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + + m_frame->OnModify(); + m_frame->SaveCopyInUndoList( dimension, UR_NEW ); } } break; @@ -507,6 +517,7 @@ int DRAWING_TOOL::PlaceTarget( TOOL_EVENT& aEvent ) preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); m_controls->SetSnapping( true ); + m_controls->SetAutoPan( true ); Activate(); @@ -542,6 +553,10 @@ int DRAWING_TOOL::PlaceTarget( TOOL_EVENT& aEvent ) m_view->Add( target ); m_board->Add( target ); target->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + + m_frame->OnModify(); + m_frame->SaveCopyInUndoList( target, UR_NEW ); + break; } @@ -584,6 +599,7 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent ) preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); m_controls->SetSnapping( true ); + m_controls->SetAutoPan( true ); Activate(); @@ -617,6 +633,10 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent ) module->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Add ), m_view ) ); m_view->Add( module ); module->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + + m_frame->OnModify(); + m_frame->SaveCopyInUndoList( module, UR_NEW ); + break; } @@ -748,6 +768,9 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) preview.Remove( graphic ); ++addedSegments; + m_frame->OnModify(); + m_frame->SaveCopyInUndoList( graphic, UR_NEW ); + if( aContinous ) { graphic = new DRAWSEGMENT( *graphic ); @@ -902,6 +925,9 @@ int DRAWING_TOOL::drawZone( bool aKeepout ) m_frame->Fill_Zone( zone ); zone->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + + m_frame->OnModify(); + m_frame->SaveCopyInUndoList( zone, UR_NEW ); } else { From e14d9aaf8fe5b11bc9034385b1245d17b5923f01 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 17 Feb 2014 17:20:44 +0100 Subject: [PATCH 122/741] Fixed wrongly formulated assert. --- pcbnew/tools/drawing_tool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index aefcdd76ab..1397ce9664 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -190,7 +190,7 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) { if( wxPoint( cursorPos.x, cursorPos.y ) != arc->GetArcStart() ) { - assert( arc->GetAngle() > 0 ); + assert( arc->GetAngle() != 0 ); assert( arc->GetArcStart() != arc->GetArcEnd() ); assert( arc->GetWidth() > 0 ); From a802ca87e0b3176ba223c7bbd9b024a0e3c94e85 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 17 Feb 2014 18:21:00 +0100 Subject: [PATCH 123/741] Added TOOL_ACTION for PNS router activation. Most of the GAL tools are activated by corresponding buttons on the right toolbar. Removed menu entry for PNS router (as it is activated as the usual "Add track" tool). --- common/tool/tool_dispatcher.cpp | 18 +--------- pcbnew/edit.cpp | 12 +++++++ pcbnew/menubar_pcbframe.cpp | 7 ---- pcbnew/pcbframe.cpp | 6 ---- pcbnew/pcbnew_id.h | 4 +-- pcbnew/router/router_tool.cpp | 3 +- pcbnew/tools/common_actions.cpp | 63 ++++++++++++++++++++++++++++----- pcbnew/tools/common_actions.h | 12 +++++++ pcbnew/tools/pcb_tools.cpp | 1 + 9 files changed, 83 insertions(+), 43 deletions(-) diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index 83e9e20d41..b19da891e2 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -32,8 +32,6 @@ #include -#include - #include #include @@ -273,19 +271,5 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) void TOOL_DISPATCHER::DispatchWxCommand( const wxCommandEvent& aEvent ) { - bool activateTool = false; - std::string toolName; - - // fixme: use TOOL_ACTIONs here - switch( aEvent.GetId() ) - { - case ID_PNS_ROUTER_TOOL: - toolName = "pcbnew.InteractiveRouter"; - activateTool = true; - break; - } - - // do nothing if the legacy view is active - if( activateTool && m_editFrame->IsGalCanvasActive() ) - m_toolMgr->InvokeTool( toolName ); + // no events to dispatch currently } diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index 7b3ddc2846..6846dda597 100644 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -54,6 +54,9 @@ #include #include +#include +#include + // Handles the selection of command events. void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) { @@ -1451,4 +1454,13 @@ void PCB_EDIT_FRAME::OnSelectTool( wxCommandEvent& aEvent ) break; } + + if( IsGalCanvasActive() ) + { + std::string actionName = COMMON_ACTIONS::TranslateLegacyId( id ); + if( !actionName.empty() ) + m_toolManager->RunAction( actionName ); + + return; + } } diff --git a/pcbnew/menubar_pcbframe.cpp b/pcbnew/menubar_pcbframe.cpp index 3bb2763081..4d88d95ff3 100644 --- a/pcbnew/menubar_pcbframe.cpp +++ b/pcbnew/menubar_pcbframe.cpp @@ -312,13 +312,6 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() _( "Reset text size and width of all module fields to current defaults" ), KiBitmap( reset_text_xpm ) ); - editMenu->AppendSeparator(); - - AddMenuItem( editMenu, ID_PNS_ROUTER_TOOL, - _( "Interactive router" ), - _( "Interactive router drag&drop tool." ), - KiBitmap( tools_xpm ) ); - /** Create View menu **/ wxMenu* viewMenu = new wxMenu; diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 967f8dde9c..f87ae2e959 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -126,12 +126,6 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME ) EVT_MENU( wxID_EXIT, PCB_EDIT_FRAME::OnQuit ) // menu Config - - /* Tom's hacks start */ - EVT_MENU ( ID_PNS_ROUTER_TOOL, PCB_EDIT_FRAME::onGenericCommand ) - EVT_TOOL ( ID_PNS_ROUTER_TOOL, PCB_EDIT_FRAME::onGenericCommand ) - /* Tom's hacks end */ - EVT_MENU( ID_PCB_DRAWINGS_WIDTHS_SETUP, PCB_EDIT_FRAME::OnConfigurePcbOptions ) EVT_MENU( ID_PCB_LIB_TABLE_EDIT, PCB_EDIT_FRAME::Process_Config ) EVT_MENU( ID_CONFIG_SAVE, PCB_EDIT_FRAME::Process_Config ) diff --git a/pcbnew/pcbnew_id.h b/pcbnew/pcbnew_id.h index 3dad96290a..83a620c256 100644 --- a/pcbnew/pcbnew_id.h +++ b/pcbnew/pcbnew_id.h @@ -369,9 +369,7 @@ enum pcbnew_ids ID_FOOTPRINT_WIZARD_PAGES_WINDOW, ID_FOOTPRINT_WIZARD_PARAMETERS_WINDOW, ID_FOOTPRINT_WIZARD_SELECT_WIZARD, - ID_FOOTPRINT_WIZARD_EXPORT_TO_BOARD, - - ID_PNS_ROUTER_TOOL + ID_FOOTPRINT_WIZARD_EXPORT_TO_BOARD }; #endif // PCBNEW_ID_H_ diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index 6896bb5a15..24073dc6cd 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -31,6 +31,7 @@ #include #include +#include #include @@ -88,7 +89,7 @@ void ROUTER_TOOL::Reset( RESET_REASON aReason ) if( getView() ) m_router->SetView( getView() ); - Go( &ROUTER_TOOL::Main, TOOL_EVENT( TC_COMMAND, TA_ACTION, GetName() ) ); + Go( &ROUTER_TOOL::Main, COMMON_ACTIONS::routerActivate.MakeEvent() ); } diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 339087bdb8..64dc5f760d 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -24,6 +24,7 @@ #include "common_actions.h" #include +#include #include // Selection tool actions @@ -57,38 +58,82 @@ TOOL_ACTION COMMON_ACTIONS::properties( "pcbnew.InteractiveEdit.properties", AS_GLOBAL, 'E', "Properties...", "Displays properties window" ); +// Drawing tool actions TOOL_ACTION COMMON_ACTIONS::drawLine( "pcbnew.InteractiveDrawing.line", - AS_GLOBAL, 'D', + AS_GLOBAL, 0, "Draw a line", "Draw a line" ); TOOL_ACTION COMMON_ACTIONS::drawCircle( "pcbnew.InteractiveDrawing.circle", - AS_GLOBAL, 'S', + AS_GLOBAL, 0, "Draw a circle", "Draw a circle" ); TOOL_ACTION COMMON_ACTIONS::drawArc( "pcbnew.InteractiveDrawing.arc", - AS_GLOBAL, 'A', + AS_GLOBAL, 0, "Draw an arc", "Draw an arc" ); TOOL_ACTION COMMON_ACTIONS::drawText( "pcbnew.InteractiveDrawing.text", - AS_GLOBAL, 'T', + AS_GLOBAL, 0, "Add a text", "Add a text" ); TOOL_ACTION COMMON_ACTIONS::drawDimension( "pcbnew.InteractiveDrawing.dimension", - AS_GLOBAL, 'X', + AS_GLOBAL, 0, "Add a dimension", "Add a dimension" ); TOOL_ACTION COMMON_ACTIONS::drawZone( "pcbnew.InteractiveDrawing.zone", - AS_GLOBAL, 'B', + AS_GLOBAL, 0, "Add a filled zone", "Add a filled zone" ); TOOL_ACTION COMMON_ACTIONS::drawKeepout( "pcbnew.InteractiveDrawing.keepout", - AS_GLOBAL, 'N', + AS_GLOBAL, 0, "Add a keepout area", "Add a keepout area" ); TOOL_ACTION COMMON_ACTIONS::placeTarget( "pcbnew.InteractiveDrawing.placeTarget", - AS_GLOBAL, 'C', + AS_GLOBAL, 0, "Add layer alignment target", "Add layer alignment target" ); TOOL_ACTION COMMON_ACTIONS::placeModule( "pcbnew.InteractiveDrawing.placeModule", - AS_GLOBAL, 'V', + AS_GLOBAL, 0, "Add modules", "Add modules" ); + +TOOL_ACTION COMMON_ACTIONS::routerActivate( "pcbnew.InteractiveRouter", + AS_GLOBAL, 0, + "Run push & shove router", "Run push & shove router" ); + + +std::string COMMON_ACTIONS::TranslateLegacyId( int aId ) +{ + switch( aId ) + { + case ID_PCB_MODULE_BUTT: + return COMMON_ACTIONS::placeModule.GetName(); + + case ID_TRACK_BUTT: + return COMMON_ACTIONS::routerActivate.GetName(); + + case ID_PCB_ZONES_BUTT: + return COMMON_ACTIONS::drawZone.GetName(); + + case ID_PCB_KEEPOUT_AREA_BUTT: + return COMMON_ACTIONS::drawKeepout.GetName(); + + case ID_PCB_ADD_LINE_BUTT: + return COMMON_ACTIONS::drawLine.GetName(); + + case ID_PCB_CIRCLE_BUTT: + return COMMON_ACTIONS::drawCircle.GetName(); + + case ID_PCB_ARC_BUTT: + return COMMON_ACTIONS::drawArc.GetName(); + + case ID_PCB_ADD_TEXT_BUTT: + return COMMON_ACTIONS::drawText.GetName(); + + case ID_PCB_DIMENSION_BUTT: + return COMMON_ACTIONS::drawDimension.GetName(); + + case ID_PCB_MIRE_BUTT: + return COMMON_ACTIONS::placeTarget.GetName(); + } + + return ""; +} diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index fc66573988..5d4908ac59 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -83,4 +83,16 @@ public: /// Activation of the drawing tool (placing a MODULE) static TOOL_ACTION placeModule; + + /// Activation of the Push and Shove router + static TOOL_ACTION routerActivate; + + /** + * Function TranslateLegacyId() + * Translates legacy tool ids to the corresponding TOOL_ACTION name. + * @param aId is legacy tool id to be translated. + * @return std::string is name of the corresponding TOOL_ACTION. It may be empty, if there is + * no corresponding TOOL_ACTION. + */ + static std::string TranslateLegacyId( int aId ); }; diff --git a/pcbnew/tools/pcb_tools.cpp b/pcbnew/tools/pcb_tools.cpp index 23c899b2fa..9ddfccc34d 100644 --- a/pcbnew/tools/pcb_tools.cpp +++ b/pcbnew/tools/pcb_tools.cpp @@ -64,6 +64,7 @@ void PCB_EDIT_FRAME::setupTools() m_toolManager->RegisterAction( &COMMON_ACTIONS::drawKeepout ); m_toolManager->RegisterAction( &COMMON_ACTIONS::placeTarget ); m_toolManager->RegisterAction( &COMMON_ACTIONS::placeModule ); + m_toolManager->RegisterAction( &COMMON_ACTIONS::routerActivate ); // Register tools m_toolManager->RegisterTool( new SELECTION_TOOL ); From 57c69b41dbc9d516bed698af14f25d042c0b1416 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 19 Feb 2014 13:51:32 +0100 Subject: [PATCH 124/741] Continous mode for drawing tools (i.e. they do not finish after adding a single object). --- include/tool/tool_event.h | 2 +- pcbnew/router/router_tool.cpp | 3 + pcbnew/tools/drawing_tool.cpp | 455 +++++++++++++++++++++------------- pcbnew/tools/drawing_tool.h | 2 +- 4 files changed, 287 insertions(+), 175 deletions(-) diff --git a/include/tool/tool_event.h b/include/tool/tool_event.h index 46b06e1eed..3f7971ed77 100644 --- a/include/tool/tool_event.h +++ b/include/tool/tool_event.h @@ -207,7 +207,7 @@ public: ///> Returns information about difference between current mouse cursor position and the place ///> where dragging has started. - const VECTOR2D Delta() const + const VECTOR2D& Delta() const { assert( m_category == TC_MOUSE ); // this should be used only with mouse events return m_mouseDelta; diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index 24073dc6cd..adb3490de3 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -26,6 +26,7 @@ #include "class_board.h" #include +#include #include #include #include @@ -464,6 +465,8 @@ int ROUTER_TOOL::Main( TOOL_EVENT& aEvent ) ctls->ShowCursor( false ); ctls->ForceCursorPosition( false ); + getEditFrame()->SetToolID( ID_NO_TOOL_SELECTED, wxCURSOR_DEFAULT, wxEmptyString ); + return 0; } diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index 1397ce9664..c120c4ac12 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -26,6 +26,7 @@ #include "common_actions.h" #include +#include #include #include @@ -83,13 +84,7 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) double startAngle; // angle of the first arc line VECTOR2I cursorPos = m_controls->GetCursorPosition(); - // Init the new item attributes - DRAWSEGMENT* arc = new DRAWSEGMENT( m_board ); - arc->SetShape( S_ARC ); - arc->SetAngle( 0.0 ); - arc->SetWidth( m_board->GetDesignSettings().m_DrawSegmentWidth ); - arc->SetCenter( wxPoint( cursorPos.x, cursorPos.y ) ); - + DRAWSEGMENT* arc; DRAWSEGMENT helperLine; helperLine.SetShape( S_SEGMENT ); helperLine.SetLayer( DRAW_N ); @@ -120,11 +115,19 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) if( evt->IsCancel() ) { - delete arc; - break; + if( step != SET_ORIGIN ) // start from the beginning + { + preview.Clear(); + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + + delete arc; + step = SET_ORIGIN; + } + else + break; } - else if( evt->IsKeyUp() ) + else if( evt->IsKeyUp() && step != SET_ORIGIN ) { int width = arc->GetWidth(); @@ -161,9 +164,17 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) } else { - helperLine.SetStart( arc->GetCenter() ); + // Init the new item attributes + arc = new DRAWSEGMENT( m_board ); + arc->SetShape( S_ARC ); + arc->SetAngle( 0.0 ); + arc->SetWidth( m_board->GetDesignSettings().m_DrawSegmentWidth ); arc->SetCenter( wxPoint( cursorPos.x, cursorPos.y ) ); arc->SetLayer( layer ); + + helperLine.SetStart( arc->GetCenter() ); + helperLine.SetEnd( arc->GetCenter() ); + preview.Add( arc ); preview.Add( &helperLine ); @@ -200,6 +211,9 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) m_frame->OnModify(); m_frame->SaveCopyInUndoList( arc, UR_NEW ); + + preview.Remove( arc ); + preview.Remove( &helperLine ); } else --step; // one another chance to draw a proper arc @@ -208,17 +222,16 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) } if( ++step == FINISHED ) - break; + { + step = SET_ORIGIN; + m_controls->SetAutoPan( false ); + } } else if( evt->IsMotion() ) { switch( step ) { - case SET_ORIGIN: - arc->SetCenter( wxPoint( cursorPos.x, cursorPos.y ) ); - break; - case SET_END: helperLine.SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); arc->SetArcStart( wxPoint( cursorPos.x, cursorPos.y ) ); @@ -226,10 +239,10 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) case SET_ANGLE: { - // Compute the current angle VECTOR2D endLine( wxPoint( cursorPos.x, cursorPos.y ) - arc->GetCenter() ); double newAngle = RAD2DECIDEG( endLine.Angle() - startAngle ); + // Adjust the new angle to (counter)clockwise setting if( clockwise && newAngle < 0.0 ) newAngle += 3600.0; else if( !clockwise && newAngle > 0.0 ) @@ -251,6 +264,7 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) m_view->Remove( &preview ); setTransitions(); + m_frame->SetToolID( ID_NO_TOOL_SELECTED, wxCURSOR_DEFAULT, wxEmptyString ); return 0; } @@ -258,17 +272,10 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) int DRAWING_TOOL::DrawText( TOOL_EVENT& aEvent ) { - // Init the new item attributes - TEXTE_PCB* text = m_frame->CreateTextePcb( NULL ); - if( text == NULL ) - { - setTransitions(); - return 0; - } + TEXTE_PCB* text; // Add a VIEW_GROUP that serves as a preview for the new item KIGFX::VIEW_GROUP preview( m_view ); - preview.Add( text ); m_view->Add( &preview ); m_controls->ShowCursor( true ); @@ -276,6 +283,7 @@ int DRAWING_TOOL::DrawText( TOOL_EVENT& aEvent ) m_controls->SetAutoPan( true ); Activate(); + bool created = false; // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) @@ -284,12 +292,20 @@ int DRAWING_TOOL::DrawText( TOOL_EVENT& aEvent ) if( evt->IsCancel() ) { - // it was already added by CreateTextPcb() - m_board->Delete( text ); - break; + if( created ) + { + // Delete the old text and have another try + m_board->Delete( text ); // it was already added by CreateTextPcb() + preview.Clear(); + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + created = false; + m_controls->ShowCursor( true ); + } + else + break; } - else if( evt->Category() == TC_COMMAND ) + else if( created && evt->Category() == TC_COMMAND ) { if( evt->IsAction( &COMMON_ACTIONS::rotate ) ) { @@ -305,21 +321,37 @@ int DRAWING_TOOL::DrawText( TOOL_EVENT& aEvent ) else if( evt->IsClick( BUT_LEFT ) ) { - assert( text->GetText().Length() > 0 ); - assert( text->GetSize().x > 0 && text->GetSize().y > 0 ); + if( !created ) + { + // Init the new item attributes + text = m_frame->CreateTextePcb( NULL ); + if( text == NULL ) + continue; - text->ClearFlags(); - m_view->Add( text ); - // m_board->Add( text ); // it is already added by CreateTextePcb() - text->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + m_controls->ShowCursor( false ); + preview.Add( text ); + } + else + { + assert( text->GetText().Length() > 0 ); + assert( text->GetSize().x > 0 && text->GetSize().y > 0 ); - m_frame->OnModify(); - m_frame->SaveCopyInUndoList( text, UR_NEW ); + text->ClearFlags(); + m_view->Add( text ); + // m_board->Add( text ); // it is already added by CreateTextePcb() + text->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - break; + m_frame->OnModify(); + m_frame->SaveCopyInUndoList( text, UR_NEW ); + + preview.Remove( text ); + m_controls->ShowCursor( true ); + } + + created = !created; } - else if( evt->IsMotion() ) + else if( created && evt->IsMotion() ) { text->SetTextPosition( wxPoint( cursorPos.x, cursorPos.y ) ); @@ -334,6 +366,7 @@ int DRAWING_TOOL::DrawText( TOOL_EVENT& aEvent ) m_view->Remove( &preview ); setTransitions(); + m_frame->SetToolID( ID_NO_TOOL_SELECTED, wxCURSOR_DEFAULT, wxEmptyString ); return 0; } @@ -341,19 +374,8 @@ int DRAWING_TOOL::DrawText( TOOL_EVENT& aEvent ) int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent ) { - DIMENSION* dimension = new DIMENSION( m_board ); - - // Init the new item attributes - dimension->Text().SetSize( m_board->GetDesignSettings().m_PcbTextSize ); - int width = m_board->GetDesignSettings().m_PcbTextWidth; - int maxThickness = Clamp_Text_PenSize( width, dimension->Text().GetSize() ); - - if( width > maxThickness ) - width = maxThickness; - - dimension->Text().SetThickness( width ); - dimension->SetWidth( width ); - dimension->AdjustDimensionDetails(); + DIMENSION* dimension; + int width, maxThickness; // Add a VIEW_GROUP that serves as a preview for the new item KIGFX::VIEW_GROUP preview( m_view ); @@ -380,11 +402,19 @@ int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent ) if( evt->IsCancel() ) { - delete dimension; - break; + if( step != SET_ORIGIN ) // start from the beginning + { + preview.Clear(); + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + + delete dimension; + step = SET_ORIGIN; + } + else + break; } - else if( evt->IsKeyUp() ) + else if( evt->IsKeyUp() && step != SET_ORIGIN ) { width = dimension->GetWidth(); @@ -405,19 +435,33 @@ int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent ) { LAYER_NUM layer = m_frame->GetScreen()->m_Active_Layer; - if( IsCopperLayer( layer ) ) + if( IsCopperLayer( layer ) || layer == EDGE_N ) { - DisplayInfoMessage( NULL, _( "Graphic not allowed on Copper layers" ) ); + DisplayInfoMessage( NULL, _( "Dimension not allowed on Copper or Edge Cut layers" ) ); --step; } else { - m_controls->SetAutoPan( true ); - + // Init the new item attributes + dimension = new DIMENSION( m_board ); dimension->SetLayer( layer ); dimension->SetOrigin( wxPoint( cursorPos.x, cursorPos.y ) ); + dimension->SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); + dimension->Text().SetSize( m_board->GetDesignSettings().m_PcbTextSize ); + + width = m_board->GetDesignSettings().m_PcbTextWidth; + maxThickness = Clamp_Text_PenSize( width, dimension->Text().GetSize() ); + + if( width > maxThickness ) + width = maxThickness; + + dimension->Text().SetThickness( width ); + dimension->SetWidth( width ); + dimension->AdjustDimensionDetails(); preview.Add( dimension ); + + m_controls->SetAutoPan( true ); } } break; @@ -441,13 +485,18 @@ int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent ) m_frame->OnModify(); m_frame->SaveCopyInUndoList( dimension, UR_NEW ); + + preview.Remove( dimension ); } } break; } if( ++step == FINISHED ) - break; + { + step = SET_ORIGIN; + m_controls->SetAutoPan( false ); + } } else if( evt->IsMotion() ) @@ -476,12 +525,16 @@ int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent ) } } + if( step != SET_ORIGIN ) + delete dimension; + m_controls->ShowCursor( false ); m_controls->SetSnapping( false ); m_controls->SetAutoPan( false ); m_view->Remove( &preview ); setTransitions(); + m_frame->SetToolID( ID_NO_TOOL_SELECTED, wxCURSOR_DEFAULT, wxEmptyString ); return 0; } @@ -527,10 +580,7 @@ int DRAWING_TOOL::PlaceTarget( TOOL_EVENT& aEvent ) cursorPos = m_controls->GetCursorPosition(); if( evt->IsCancel() ) - { - delete target; break; - } else if( evt->IsKeyUp() ) { @@ -557,7 +607,11 @@ int DRAWING_TOOL::PlaceTarget( TOOL_EVENT& aEvent ) m_frame->OnModify(); m_frame->SaveCopyInUndoList( target, UR_NEW ); - break; + preview.Remove( target ); + + // Create next PCB_TARGET + target = new PCB_TARGET( *target ); + preview.Add( target ); } else if( evt->IsMotion() ) @@ -567,11 +621,14 @@ int DRAWING_TOOL::PlaceTarget( TOOL_EVENT& aEvent ) } } + delete target; + m_controls->SetSnapping( false ); m_controls->SetAutoPan( false ); m_view->Remove( &preview ); setTransitions(); + m_frame->SetToolID( ID_NO_TOOL_SELECTED, wxCURSOR_DEFAULT, wxEmptyString ); return 0; } @@ -579,42 +636,42 @@ int DRAWING_TOOL::PlaceTarget( TOOL_EVENT& aEvent ) int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent ) { - MODULE* module = m_frame->LoadModuleFromLibrary( wxEmptyString, - m_frame->GetFootprintLibraryTable(), true, NULL ); - if( module == NULL ) - { - setTransitions(); - return 0; - } - - // Init the new item attributes - VECTOR2I cursorPos = m_controls->GetCursorPosition(); - module->SetPosition( wxPoint( cursorPos.x, cursorPos.y ) ); + MODULE* module; // Add a VIEW_GROUP that serves as a preview for the new item KIGFX::VIEW_GROUP preview( m_view ); - preview.Add( module ); - module->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW_GROUP::Add ), &preview ) ); m_view->Add( &preview ); - preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); m_controls->SetAutoPan( true ); Activate(); + bool created = false; + // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { - cursorPos = m_controls->GetCursorPosition(); + VECTOR2I cursorPos = m_controls->GetCursorPosition(); if( evt->IsCancel() ) { - m_board->Delete( module ); - break; + if( created ) + { + m_board->Delete( module ); // it was added by LoadModuleFromLibrary + m_controls->ShowCursor( true ); + + preview.Clear(); + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + + created = false; + } + else + break; } - else if( evt->Category() == TC_COMMAND ) + else if( created && evt->Category() == TC_COMMAND ) { if( evt->IsAction( &COMMON_ACTIONS::rotate ) ) { @@ -630,28 +687,59 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent ) else if( evt->IsClick( BUT_LEFT ) ) { - module->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Add ), m_view ) ); - m_view->Add( module ); - module->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + if( !created ) + { + // Init the new item attributes + module = m_frame->LoadModuleFromLibrary( wxEmptyString, + m_frame->GetFootprintLibraryTable(), + true, NULL ); + if( module == NULL ) + continue; - m_frame->OnModify(); - m_frame->SaveCopyInUndoList( module, UR_NEW ); + m_controls->ShowCursor( false ); + module->SetPosition( wxPoint( cursorPos.x, cursorPos.y ) ); - break; + // Add all the drawable parts to preview + preview.Add( module ); + module->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW_GROUP::Add ), + &preview ) ); + + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + else + { + module->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Add ), m_view ) ); + m_view->Add( module ); + module->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + + m_frame->OnModify(); + m_frame->SaveCopyInUndoList( module, UR_NEW ); + + // Remove from preview + preview.Remove( module ); + module->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW_GROUP::Remove ), + &preview ) ); + + m_controls->ShowCursor( true ); + } + + created = !created; } - else if( evt->IsMotion() ) + else if( created && evt->IsMotion() ) { module->SetPosition( wxPoint( cursorPos.x, cursorPos.y ) ); preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); } } + m_controls->ShowCursor( false ); m_controls->SetSnapping( false ); m_controls->SetAutoPan( false ); m_view->Remove( &preview ); setTransitions(); + m_frame->SetToolID( ID_NO_TOOL_SELECTED, wxCURSOR_DEFAULT, wxEmptyString ); return 0; } @@ -662,12 +750,8 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) // Only two shapes are currently supported assert( aShape == S_SEGMENT || aShape == S_CIRCLE ); - // Init the new item attributes - DRAWSEGMENT* graphic = new DRAWSEGMENT( m_board ); - graphic->SetShape( (STROKE_T) aShape ); - graphic->SetWidth( m_board->GetDesignSettings().m_DrawSegmentWidth ); - - DRAWSEGMENT line45( *graphic ); // used only for direction 45 mode with lines + DRAWSEGMENT* graphic = NULL; + DRAWSEGMENT line45; // Add a VIEW_GROUP that serves as a preview for the new item KIGFX::VIEW_GROUP preview( m_view ); @@ -678,9 +762,9 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) Activate(); - bool started = false; bool direction45 = false; // 45 degrees only mode int addedSegments = 0; + bool created = false; // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) @@ -689,7 +773,7 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) VECTOR2I cursorPos = m_controls->GetCursorPosition(); // Enable 45 degrees lines only mode by holding control - if( direction45 != ( evt->Modifier( MD_CTRL ) && aShape == S_SEGMENT && started ) ) + if( direction45 != evt->Modifier( MD_CTRL ) && created && aShape == S_SEGMENT ) { direction45 = evt->Modifier( MD_CTRL ); @@ -710,16 +794,20 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) if( evt->IsCancel() ) { if( direction45 ) - preview.Remove( &line45 ); + preview.Remove( &line45 ); // prevent line45 from being deleted preview.FreeItems(); - if( !started ) - delete graphic; + updatePreview = true; - break; + if( !created ) + break; + + // We did not exit the loop? So go once again + created = false; + m_controls->SetAutoPan( false ); } - else if( evt->IsKeyUp() ) + else if( created && evt->IsKeyUp() ) { int width = graphic->GetWidth(); @@ -734,7 +822,7 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) else if( evt->IsClick( BUT_LEFT ) ) { - if( !started ) + if( !created ) { LAYER_NUM layer = m_frame->GetScreen()->m_Active_Layer; @@ -744,15 +832,23 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) } else { - m_controls->SetAutoPan( true ); - + // Init the new item attributes + graphic = new DRAWSEGMENT( m_board ); + graphic->SetShape( (STROKE_T) aShape ); + graphic->SetWidth( m_board->GetDesignSettings().m_DrawSegmentWidth ); graphic->SetStart( wxPoint( cursorPos.x, cursorPos.y ) ); graphic->SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); graphic->SetLayer( layer ); - line45.SetLayer( layer ); - preview.Add( graphic ); - started = true; + if( aShape == S_SEGMENT ) + { + line45 = *graphic; // used only for direction 45 mode with lines + line45.SetLayer( layer ); + } + + preview.Add( graphic ); + created = true; + m_controls->SetAutoPan( true ); } } else @@ -765,15 +861,17 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) m_view->Add( graphic ); m_board->Add( graphic ); graphic->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - preview.Remove( graphic ); - ++addedSegments; m_frame->OnModify(); m_frame->SaveCopyInUndoList( graphic, UR_NEW ); + preview.Remove( graphic ); + ++addedSegments; + if( aContinous ) { graphic = new DRAWSEGMENT( *graphic ); + // Start the new line in the same spot where the previous one has ended graphic->SetStart( graphic->GetEnd() ); @@ -782,20 +880,24 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) preview.Add( graphic ); } - else + else // start a new graphic { - break; + addedSegments = 0; + created = false; + m_controls->SetAutoPan( false ); } } else if( addedSegments > 0 ) // User has clicked twice in the same spot - { - delete graphic; // seems like a clear sign that the drawing is finished - break; // and we should remove the latest DRAWSEGMENT we have created + { // a clear sign that the current drawing is finished + created = false; // but only if at least one graphic was created + preview.Remove( graphic ); // otherwise - force user to draw or cancel + delete graphic; + m_controls->SetAutoPan( false ); } } } - else if( evt->IsMotion() && started ) + else if( created && evt->IsMotion() ) { // 45 degree lines if( direction45 && aShape == S_SEGMENT ) @@ -814,7 +916,9 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) m_controls->SetSnapping( false ); m_controls->SetAutoPan( false ); m_view->Remove( &preview ); + setTransitions(); + m_frame->SetToolID( ID_NO_TOOL_SELECTED, wxCURSOR_DEFAULT, wxEmptyString ); return 0; } @@ -822,42 +926,9 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) int DRAWING_TOOL::drawZone( bool aKeepout ) { - ZONE_CONTAINER* zone = new ZONE_CONTAINER( m_board ); - - // Get the current, default settings for zones - ZONE_SETTINGS zoneInfo = m_frame->GetZoneSettings(); - zoneInfo.m_CurrentZone_Layer = m_frame->GetScreen()->m_Active_Layer; - - // Show options dialog - ZONE_EDIT_T dialogResult; - if( aKeepout ) - dialogResult = InvokeKeepoutAreaEditor( m_frame, &zoneInfo ); - else - { - if( IsCopperLayer( zoneInfo.m_CurrentZone_Layer ) ) - dialogResult = InvokeCopperZonesEditor( m_frame, &zoneInfo ); - else - dialogResult = InvokeNonCopperZonesEditor( m_frame, NULL, &zoneInfo ); - } - - if( dialogResult == ZONE_ABORT ) - { - delete zone; - setTransitions(); - - return 0; - } - - // Apply the selected settings - zoneInfo.ExportSetting( *zone ); - m_frame->SetTopLayer( zoneInfo.m_CurrentZone_Layer ); - - // Helper line represents the currently drawn line of the zone polygon - DRAWSEGMENT* helperLine = new DRAWSEGMENT; - helperLine->SetShape( S_SEGMENT ); - helperLine->SetLayer( zoneInfo.m_CurrentZone_Layer ); - helperLine->SetWidth( 1 ); - DRAWSEGMENT line45( *helperLine ); + ZONE_CONTAINER* zone; + DRAWSEGMENT line45; + DRAWSEGMENT* helperLine; // we will need more than one helper line // Add a VIEW_GROUP that serves as a preview for the new item KIGFX::VIEW_GROUP preview( m_view ); @@ -865,7 +936,6 @@ int DRAWING_TOOL::drawZone( bool aKeepout ) m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); - m_controls->SetAutoPan( true ); Activate(); @@ -873,7 +943,6 @@ int DRAWING_TOOL::drawZone( bool aKeepout ) VECTOR2I origin; int numPoints = 0; bool direction45 = false; // 45 degrees only mode - bool cancelled = false; // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) @@ -902,15 +971,28 @@ int DRAWING_TOOL::drawZone( bool aKeepout ) if( evt->IsCancel() ) { - cancelled = true; - break; + if( numPoints > 0 ) // cancel the current zone + { + delete zone; + m_controls->SetAutoPan( false ); + + if( direction45 ) + preview.Remove( &line45 ); + preview.FreeItems(); + updatePreview = true; + + numPoints = 0; + } + else // there is no zone currently drawn - just stop the tool + break; } else if( evt->IsClick( BUT_LEFT ) ) { + // Check if it is double click / closing line (so we have to finish the zone) if( lastCursorPos == cursorPos || ( numPoints > 0 && cursorPos == origin ) ) { - if( numPoints > 2 ) + if( numPoints > 2 ) // valid zone consists of more than 2 points { assert( zone->GetNumCorners() > 2 ); @@ -930,23 +1012,56 @@ int DRAWING_TOOL::drawZone( bool aKeepout ) m_frame->SaveCopyInUndoList( zone, UR_NEW ); } else - { - // If there are less than 3 points, then it is not a valid zone - cancelled = true; - } + delete zone; - break; + numPoints = 0; + m_controls->SetAutoPan( false ); + preview.FreeItems(); + updatePreview = true; } else { - if( numPoints == 0 ) + if( numPoints == 0 ) // it's the first click { + // Get the current default settings for zones + ZONE_SETTINGS zoneInfo = m_frame->GetZoneSettings(); + zoneInfo.m_CurrentZone_Layer = m_frame->GetScreen()->m_Active_Layer; + + // Show options dialog + ZONE_EDIT_T dialogResult; + if( aKeepout ) + dialogResult = InvokeKeepoutAreaEditor( m_frame, &zoneInfo ); + else + { + if( IsCopperLayer( zoneInfo.m_CurrentZone_Layer ) ) + dialogResult = InvokeCopperZonesEditor( m_frame, &zoneInfo ); + else + dialogResult = InvokeNonCopperZonesEditor( m_frame, NULL, &zoneInfo ); + } + + if( dialogResult == ZONE_ABORT ) + continue; + + // Apply the selected settings + zone = new ZONE_CONTAINER( m_board ); + zoneInfo.ExportSetting( *zone ); + m_frame->SetTopLayer( zoneInfo.m_CurrentZone_Layer ); + // Add the first point zone->Outline()->Start( zoneInfo.m_CurrentZone_Layer, cursorPos.x, cursorPos.y, zone->GetHatchStyle() ); - helperLine->SetStart( wxPoint( cursorPos.x, cursorPos.y ) ); origin = cursorPos; + + // Helper line represents the currently drawn line of the zone polygon + helperLine = new DRAWSEGMENT; + helperLine->SetShape( S_SEGMENT ); + helperLine->SetWidth( 1 ); + helperLine->SetLayer( zoneInfo.m_CurrentZone_Layer ); + helperLine->SetStart( wxPoint( cursorPos.x, cursorPos.y ) ); + helperLine->SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); + line45 = *helperLine; + preview.Add( helperLine ); } else @@ -956,15 +1071,15 @@ int DRAWING_TOOL::drawZone( bool aKeepout ) helperLine->SetStart( helperLine->GetEnd() ); preview.Add( helperLine ); } - ++numPoints; + ++numPoints; updatePreview = true; } lastCursorPos = cursorPos; } - else if( evt->IsMotion() ) + else if( evt->IsMotion() && numPoints > 0 ) { // 45 degree lines if( direction45 ) @@ -985,14 +1100,8 @@ int DRAWING_TOOL::drawZone( bool aKeepout ) m_controls->SetAutoPan( false ); m_view->Remove( &preview ); - // Clean - if( cancelled ) - delete zone; - if( direction45 ) - preview.Remove( &line45 ); - preview.FreeItems(); - setTransitions(); + m_frame->SetToolID( ID_NO_TOOL_SELECTED, wxCURSOR_DEFAULT, wxEmptyString ); return 0; } diff --git a/pcbnew/tools/drawing_tool.h b/pcbnew/tools/drawing_tool.h index 775351efaf..2339cb3a9c 100644 --- a/pcbnew/tools/drawing_tool.h +++ b/pcbnew/tools/drawing_tool.h @@ -116,7 +116,7 @@ public: /** * Function PlaceModule() - * Displays a dialog to selected a module to be added and then allows user to set its position.. + * Displays a dialog to selected a module to be added and then allows user to set its position. */ int PlaceModule( TOOL_EVENT& aEvent ); From 87785441bc62474aedcf469f37379c56b995e7d3 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 19 Feb 2014 15:20:42 +0100 Subject: [PATCH 125/741] Removed some excessive variables. --- pcbnew/tools/drawing_tool.cpp | 80 +++++++++++++++++------------------ 1 file changed, 38 insertions(+), 42 deletions(-) diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index c120c4ac12..b3ea0c6a3a 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -272,7 +272,7 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) int DRAWING_TOOL::DrawText( TOOL_EVENT& aEvent ) { - TEXTE_PCB* text; + TEXTE_PCB* text = NULL; // Add a VIEW_GROUP that serves as a preview for the new item KIGFX::VIEW_GROUP preview( m_view ); @@ -283,7 +283,6 @@ int DRAWING_TOOL::DrawText( TOOL_EVENT& aEvent ) m_controls->SetAutoPan( true ); Activate(); - bool created = false; // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) @@ -292,20 +291,21 @@ int DRAWING_TOOL::DrawText( TOOL_EVENT& aEvent ) if( evt->IsCancel() ) { - if( created ) + if( text ) { // Delete the old text and have another try m_board->Delete( text ); // it was already added by CreateTextPcb() + text = NULL; + preview.Clear(); preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - created = false; m_controls->ShowCursor( true ); } else break; } - else if( created && evt->Category() == TC_COMMAND ) + else if( text && evt->Category() == TC_COMMAND ) { if( evt->IsAction( &COMMON_ACTIONS::rotate ) ) { @@ -321,7 +321,7 @@ int DRAWING_TOOL::DrawText( TOOL_EVENT& aEvent ) else if( evt->IsClick( BUT_LEFT ) ) { - if( !created ) + if( !text ) { // Init the new item attributes text = m_frame->CreateTextePcb( NULL ); @@ -346,12 +346,12 @@ int DRAWING_TOOL::DrawText( TOOL_EVENT& aEvent ) preview.Remove( text ); m_controls->ShowCursor( true ); - } - created = !created; + text = NULL; + } } - else if( created && evt->IsMotion() ) + else if( text && evt->IsMotion() ) { text->SetTextPosition( wxPoint( cursorPos.x, cursorPos.y ) ); @@ -467,8 +467,10 @@ int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent ) break; case SET_END: + dimension->SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); + // Dimensions that have origin and end in the same spot are not valid - if( dimension->GetOrigin() == wxPoint( cursorPos.x, cursorPos.y ) ) + if( dimension->GetOrigin() == dimension->GetEnd() ) --step; break; @@ -636,7 +638,7 @@ int DRAWING_TOOL::PlaceTarget( TOOL_EVENT& aEvent ) int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent ) { - MODULE* module; + MODULE* module = NULL; // Add a VIEW_GROUP that serves as a preview for the new item KIGFX::VIEW_GROUP preview( m_view ); @@ -648,8 +650,6 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent ) Activate(); - bool created = false; - // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { @@ -657,21 +657,20 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent ) if( evt->IsCancel() ) { - if( created ) + if( module ) { m_board->Delete( module ); // it was added by LoadModuleFromLibrary - m_controls->ShowCursor( true ); + module = NULL; preview.Clear(); preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - - created = false; + m_controls->ShowCursor( true ); } else break; } - else if( created && evt->Category() == TC_COMMAND ) + else if( module && evt->Category() == TC_COMMAND ) { if( evt->IsAction( &COMMON_ACTIONS::rotate ) ) { @@ -687,7 +686,7 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent ) else if( evt->IsClick( BUT_LEFT ) ) { - if( !created ) + if( !module ) { // Init the new item attributes module = m_frame->LoadModuleFromLibrary( wxEmptyString, @@ -719,14 +718,13 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent ) preview.Remove( module ); module->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW_GROUP::Remove ), &preview ) ); + module = NULL; // to indicate that there is no module that we currently modify m_controls->ShowCursor( true ); } - - created = !created; } - else if( created && evt->IsMotion() ) + else if( module && evt->IsMotion() ) { module->SetPosition( wxPoint( cursorPos.x, cursorPos.y ) ); preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); @@ -764,7 +762,6 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) bool direction45 = false; // 45 degrees only mode int addedSegments = 0; - bool created = false; // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) @@ -773,7 +770,7 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) VECTOR2I cursorPos = m_controls->GetCursorPosition(); // Enable 45 degrees lines only mode by holding control - if( direction45 != evt->Modifier( MD_CTRL ) && created && aShape == S_SEGMENT ) + if( direction45 != evt->Modifier( MD_CTRL ) && graphic && aShape == S_SEGMENT ) { direction45 = evt->Modifier( MD_CTRL ); @@ -793,21 +790,19 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) if( evt->IsCancel() ) { - if( direction45 ) - preview.Remove( &line45 ); // prevent line45 from being deleted - - preview.FreeItems(); - updatePreview = true; - - if( !created ) + if( !graphic ) break; - // We did not exit the loop? So go once again - created = false; + preview.Clear(); + updatePreview = true; + + delete graphic; + graphic = NULL; + m_controls->SetAutoPan( false ); } - else if( created && evt->IsKeyUp() ) + else if( graphic && evt->IsKeyUp() ) { int width = graphic->GetWidth(); @@ -822,7 +817,7 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) else if( evt->IsClick( BUT_LEFT ) ) { - if( !created ) + if( !graphic ) { LAYER_NUM layer = m_frame->GetScreen()->m_Active_Layer; @@ -847,7 +842,6 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) } preview.Add( graphic ); - created = true; m_controls->SetAutoPan( true ); } } @@ -883,21 +877,23 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) else // start a new graphic { addedSegments = 0; - created = false; m_controls->SetAutoPan( false ); + graphic = NULL; } } - else if( addedSegments > 0 ) // User has clicked twice in the same spot - { // a clear sign that the current drawing is finished - created = false; // but only if at least one graphic was created - preview.Remove( graphic ); // otherwise - force user to draw or cancel + else if( addedSegments > 0 ) // User has clicked twice in the same spot + { // a clear sign that the current drawing is finished + preview.Clear(); // but only if at least one graphic was created + // otherwise - force user to draw more or cancel delete graphic; + graphic = NULL; + m_controls->SetAutoPan( false ); } } } - else if( created && evt->IsMotion() ) + else if( graphic && evt->IsMotion() ) { // 45 degree lines if( direction45 && aShape == S_SEGMENT ) From 8a8e5d8d14bcdb6d7f52c97ff96c26f445430776 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 21 Feb 2014 09:53:10 +0100 Subject: [PATCH 126/741] Quick fix for unsupported pad types in PNS router. --- pcbnew/router/pns_router.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index b655ac363f..b2fed52601 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -97,12 +97,11 @@ private: PNS_ITEM* PNS_ROUTER::syncPad( D_PAD* aPad ) { - PNS_LAYERSET layers; + PNS_LAYERSET layers( 0, 15 ); switch( aPad->GetAttribute() ) { case PAD_STANDARD: - layers = PNS_LAYERSET( 0, 15 ); break; case PAD_SMD: From 5ac699776deecf118bc6bd065a630129c6880700 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 21 Feb 2014 16:57:18 +0100 Subject: [PATCH 127/741] Revisiting GAL: - VIEW_ITEM::ViewUpdate() does not update items immediately. Now it marks them to be updated and the real update occurs on the next rendering frame. - VIEW::InvalidateItem() made private. - VIEW_LAYER::enabled -> visible - Some functions moved to header files. --- common/drawpanel_gal.cpp | 20 ++++-- common/view/view.cpp | 136 ++++++++++++++++---------------------- common/view/view_item.cpp | 21 ++---- include/view/view.h | 106 ++++++++++++++++++----------- include/view/view_item.h | 42 ++++++++++-- pcbnew/class_module.cpp | 14 ++-- 6 files changed, 187 insertions(+), 152 deletions(-) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index 2a03dcc571..6a7e4f9d6a 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -124,17 +124,22 @@ void EDA_DRAW_PANEL_GAL::onPaint( wxPaintEvent& WXUNUSED( aEvent ) ) { m_drawing = true; + m_view->UpdateItems(); m_gal->BeginDrawing(); - m_gal->SetBackgroundColor( KIGFX::COLOR4D( 0.0, 0.0, 0.0, 1.0 ) ); m_gal->ClearScreen(); - m_view->ClearTargets(); - // Grid has to be redrawn only when the NONCACHED target is redrawn - if( m_view->IsTargetDirty( KIGFX::TARGET_NONCACHED ) ) - m_gal->DrawGrid(); - m_view->Redraw(); - m_gal->DrawCursor( m_viewControls->GetCursorPosition() ); + if( m_view->IsDirty() ) + { + m_view->ClearTargets(); + // Grid has to be redrawn only when the NONCACHED target is redrawn + if( m_view->IsTargetDirty( KIGFX::TARGET_NONCACHED ) ) + m_gal->DrawGrid(); + + m_view->Redraw(); + } + + m_gal->DrawCursor( m_viewControls->GetCursorPosition() ); m_gal->EndDrawing(); m_drawing = false; @@ -215,6 +220,7 @@ void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType ) wxSize size = GetClientSize(); m_gal->ResizeScreen( size.GetX(), size.GetY() ); + m_gal->SetBackgroundColor( KIGFX::COLOR4D( 0.0, 0.0, 0.0, 1.0 ) ); if( m_painter ) m_painter->SetGAL( m_gal ); diff --git a/common/view/view.cpp b/common/view/view.cpp index e9c6324012..0a18d42711 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -49,28 +49,24 @@ VIEW::VIEW( bool aIsDynamic ) : m_scaleLimits( 15000.0, 1.0 ) { m_panBoundary.SetMaximum(); + m_needsUpdate.reserve( 32768 ); // Redraw everything at the beginning - for( int i = 0; i < TARGETS_NUMBER; ++i ) - MarkTargetDirty( i ); + MarkDirty(); // View uses layers to display EDA_ITEMs (item may be displayed on several layers, for example // pad may be shown on pad, pad hole and solder paste layers). There are usual copper layers // (eg. F.Cu, B.Cu, internal and so on) and layers for displaying objects such as texts, // silkscreen, pads, vias, etc. for( int i = 0; i < VIEW_MAX_LAYERS; i++ ) - { AddLayer( i ); - } } VIEW::~VIEW() { BOOST_FOREACH( LAYER_MAP::value_type& l, m_layers ) - { delete l.second.items; - } } @@ -82,7 +78,7 @@ void VIEW::AddLayer( int aLayer, bool aDisplayOnly ) m_layers[aLayer].id = aLayer; m_layers[aLayer].items = new VIEW_RTREE(); m_layers[aLayer].renderingOrder = aLayer; - m_layers[aLayer].enabled = true; + m_layers[aLayer].visible = true; m_layers[aLayer].displayOnly = aDisplayOnly; m_layers[aLayer].target = TARGET_CACHED; } @@ -172,12 +168,12 @@ struct queryVisitor }; -int VIEW::Query( const BOX2I& aRect, std::vector& aResult ) +int VIEW::Query( const BOX2I& aRect, std::vector& aResult ) const { if( m_orderedLayers.empty() ) return 0; - std::vector::reverse_iterator i; + std::vector::const_reverse_iterator i; // execute queries in reverse direction, so that items that are on the top of // the rendering stack are returned first. @@ -257,12 +253,6 @@ void VIEW::SetGAL( GAL* aGal ) } -void VIEW::SetPainter( PAINTER* aPainter ) -{ - m_painter = aPainter; -} - - BOX2D VIEW::GetViewport() const { BOX2D rect; @@ -293,12 +283,6 @@ void VIEW::SetMirror( bool aMirrorX, bool aMirrorY ) } -void VIEW::SetScale( double aScale ) -{ - SetScale( aScale, m_center ); -} - - void VIEW::SetScale( double aScale, const VECTOR2D& aAnchor ) { if( aScale > m_scaleLimits.x ) @@ -578,8 +562,8 @@ void VIEW::UpdateAllLayersOrder() struct VIEW::drawItem { - drawItem( VIEW* aView, const VIEW_LAYER* aCurrentLayer ) : - currentLayer( aCurrentLayer ), view( aView ) + drawItem( VIEW* aView, int aLayer ) : + view( aView ), layer( aLayer ) { } @@ -587,18 +571,17 @@ struct VIEW::drawItem { // Conditions that have te be fulfilled for an item to be drawn bool drawCondition = aItem->ViewIsVisible() && - aItem->ViewGetLOD( currentLayer->id ) < view->m_scale; + aItem->ViewGetLOD( layer ) < view->m_scale; if( !drawCondition ) return true; - view->draw( aItem, currentLayer->id ); + view->draw( aItem, layer ); return true; } - const VIEW_LAYER* currentLayer; VIEW* view; - int layersCount, layers[VIEW_MAX_LAYERS]; + int layer, layersCount, layers[VIEW_MAX_LAYERS]; }; @@ -606,9 +589,9 @@ void VIEW::redrawRect( const BOX2I& aRect ) { BOOST_FOREACH( VIEW_LAYER* l, m_orderedLayers ) { - if( l->enabled && IsTargetDirty( l->target ) && areRequiredLayersEnabled( l->id ) ) + if( l->visible && IsTargetDirty( l->target ) && areRequiredLayersEnabled( l->id ) ) { - drawItem drawFunc( this, l ); + drawItem drawFunc( this, l->id ); m_gal->SetTarget( l->target ); m_gal->SetLayerDepth( l->renderingOrder ); @@ -618,7 +601,7 @@ void VIEW::redrawRect( const BOX2I& aRect ) } -void VIEW::draw( VIEW_ITEM* aItem, int aLayer, bool aImmediate ) const +void VIEW::draw( VIEW_ITEM* aItem, int aLayer, bool aImmediate ) { if( IsCached( aLayer ) && !aImmediate ) { @@ -649,11 +632,12 @@ void VIEW::draw( VIEW_ITEM* aItem, int aLayer, bool aImmediate ) const } -void VIEW::draw( VIEW_ITEM* aItem, bool aImmediate ) const +void VIEW::draw( VIEW_ITEM* aItem, bool aImmediate ) { int layers[VIEW_MAX_LAYERS], layers_count; aItem->ViewGetLayers( layers, layers_count ); + // Sorting is needed for drawing order dependent GALs (like Cairo) SortLayers( layers, layers_count ); @@ -665,26 +649,12 @@ void VIEW::draw( VIEW_ITEM* aItem, bool aImmediate ) const } -void VIEW::draw( VIEW_GROUP* aGroup, bool aImmediate ) const +void VIEW::draw( VIEW_GROUP* aGroup, bool aImmediate ) { std::set::const_iterator it; for( it = aGroup->Begin(); it != aGroup->End(); ++it ) - { draw( *it, aImmediate ); - } -} - - -bool VIEW::IsDirty() const -{ - for( int i = 0; i < TARGETS_NUMBER; ++i ) - { - if( IsTargetDirty( i ) ) - return true; - } - - return false; } @@ -709,14 +679,14 @@ struct VIEW::recacheItem bool operator()( VIEW_ITEM* aItem ) { // Remove previously cached group - int prevGroup = aItem->getGroup( layer ); + int group = aItem->getGroup( layer ); - if( prevGroup >= 0 ) - gal->DeleteGroup( prevGroup ); + if( group >= 0 ) + gal->DeleteGroup( group ); if( immediately ) { - int group = gal->BeginGroup(); + group = gal->BeginGroup(); aItem->setGroup( layer, group ); if( !view->m_painter->Draw( aItem, layer ) ) @@ -791,13 +761,13 @@ void VIEW::Redraw() redrawRect( rect ); // All targets were redrawn, so nothing is dirty - clearTargetDirty( TARGET_CACHED ); - clearTargetDirty( TARGET_NONCACHED ); - clearTargetDirty( TARGET_OVERLAY ); + markTargetClean( TARGET_CACHED ); + markTargetClean( TARGET_NONCACHED ); + markTargetClean( TARGET_OVERLAY ); } -VECTOR2D VIEW::GetScreenPixelSize() const +const VECTOR2D& VIEW::GetScreenPixelSize() const { return m_gal->GetScreenPixelSize(); } @@ -839,7 +809,7 @@ void VIEW::clearGroupCache() } -void VIEW::InvalidateItem( VIEW_ITEM* aItem, int aUpdateFlags ) +void VIEW::invalidateItem( VIEW_ITEM* aItem, int aUpdateFlags ) { // updateLayers updates geometry too, so we do not have to update both of them at the same time if( aUpdateFlags & VIEW_ITEM::LAYERS ) @@ -851,24 +821,23 @@ void VIEW::InvalidateItem( VIEW_ITEM* aItem, int aUpdateFlags ) aItem->ViewGetLayers( layers, layers_count ); // Iterate through layers used by the item and recache it immediately - for( int i = 0; i < layers_count; i++ ) + for( int i = 0; i < layers_count; ++i ) { int layerId = layers[i]; - if( aUpdateFlags & ( VIEW_ITEM::GEOMETRY | VIEW_ITEM::LAYERS ) ) + if( IsCached( layerId ) ) { - // Redraw - if( IsCached( layerId ) ) + if( aUpdateFlags & ( VIEW_ITEM::GEOMETRY | VIEW_ITEM::LAYERS ) ) updateItemGeometry( aItem, layerId ); - } - else if( aUpdateFlags & VIEW_ITEM::COLOR ) - { - updateItemColor( aItem, layerId ); + else if( aUpdateFlags & VIEW_ITEM::COLOR ) + updateItemColor( aItem, layerId ); } // Mark those layers as dirty, so the VIEW will be refreshed MarkTargetDirty( m_layers[layerId].target ); } + + aItem->clearUpdateFlags(); } @@ -890,6 +859,7 @@ void VIEW::sortLayers() void VIEW::updateItemColor( VIEW_ITEM* aItem, int aLayer ) { wxASSERT( (unsigned) aLayer < m_layers.size() ); + wxASSERT( IsCached( aLayer ) ); // Obtain the color that should be used for coloring the item on the specific layerId const COLOR4D color = m_painter->GetSettings()->GetColor( aItem, aLayer ); @@ -904,18 +874,20 @@ void VIEW::updateItemColor( VIEW_ITEM* aItem, int aLayer ) void VIEW::updateItemGeometry( VIEW_ITEM* aItem, int aLayer ) { wxASSERT( (unsigned) aLayer < m_layers.size() ); + wxASSERT( IsCached( aLayer ) ); + VIEW_LAYER& l = m_layers.at( aLayer ); m_gal->SetTarget( l.target ); m_gal->SetLayerDepth( l.renderingOrder ); // Redraw the item from scratch - int prevGroup = aItem->getGroup( aLayer ); + int group = aItem->getGroup( aLayer ); - if( prevGroup >= 0 ) - m_gal->DeleteGroup( prevGroup ); + if( group >= 0 ) + m_gal->DeleteGroup( group ); - int group = m_gal->BeginGroup(); + group = m_gal->BeginGroup(); aItem->setGroup( aLayer, group ); m_painter->Draw( static_cast( aItem ), aLayer ); m_gal->EndGroup(); @@ -951,11 +923,17 @@ void VIEW::updateLayers( VIEW_ITEM* aItem ) l.items->Remove( aItem ); MarkTargetDirty( l.target ); - // Redraw the item from scratch - int prevGroup = aItem->getGroup( layers[i] ); + if( IsCached( l.id ) ) + { + // Redraw the item from scratch + int prevGroup = aItem->getGroup( layers[i] ); - if( prevGroup >= 0 ) - m_gal->DeleteGroup( prevGroup ); + if( prevGroup >= 0 ) + { + m_gal->DeleteGroup( prevGroup ); + aItem->setGroup( l.id, -1 ); + } + } } // Add the item to new layer set @@ -981,7 +959,7 @@ bool VIEW::areRequiredLayersEnabled( int aLayerId ) const it_end = m_layers.at( aLayerId ).requiredLayers.end(); it != it_end; ++it ) { // That is enough if just one layer is not enabled - if( !m_layers.at( *it ).enabled ) + if( !m_layers.at( *it ).visible ) return false; } @@ -1023,13 +1001,15 @@ void VIEW::RecacheAllItems( bool aImmediately ) } -bool VIEW::IsTargetDirty( int aTarget ) const +void VIEW::UpdateItems() { - wxASSERT( aTarget < TARGETS_NUMBER ); + // Update items that need this + BOOST_FOREACH( VIEW_ITEM* item, m_needsUpdate ) + { + assert( item->viewRequiredUpdate() != VIEW_ITEM::NONE ); - // Check the target status - if( m_dirtyTargets[aTarget] ) - return true; + invalidateItem( item, item->viewRequiredUpdate() ); + } - return false; + m_needsUpdate.clear(); } diff --git a/common/view/view_item.cpp b/common/view/view_item.cpp index 305ab68579..900e030e61 100644 --- a/common/view/view_item.cpp +++ b/common/view/view_item.cpp @@ -31,25 +31,12 @@ using namespace KIGFX; void VIEW_ITEM::ViewSetVisible( bool aIsVisible ) { - bool update = false; - - if( m_visible != aIsVisible ) - update = true; - - m_visible = aIsVisible; - // update only if the visibility has really changed - if( update ) + if( m_visible != aIsVisible ) + { + m_visible = aIsVisible; ViewUpdate( APPEARANCE ); -} - - -void VIEW_ITEM::ViewUpdate( int aUpdateFlags ) -{ - if( !m_view ) - return; - - m_view->InvalidateItem( this, aUpdateFlags ); + } } diff --git a/include/view/view.h b/include/view/view.h index f7a7e90984..4a7965bb94 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -94,7 +94,7 @@ public: * first). * @return Number of found items. */ - int Query( const BOX2I& aRect, std::vector& aResult ); + int Query( const BOX2I& aRect, std::vector& aResult ) const; /** * Function SetRequired() @@ -140,7 +140,10 @@ public: * Function SetPainter() * Sets the painter object used by the view for drawing VIEW_ITEMS. */ - void SetPainter( PAINTER* aPainter ); + void SetPainter( PAINTER* aPainter ) + { + m_painter = aPainter; + } /** * Function GetPainter() @@ -181,7 +184,10 @@ public: * (depending on correct GAL unit length & DPI settings). * @param aScale: the scalefactor */ - void SetScale( double aScale ); + void SetScale( double aScale ) + { + SetScale( aScale, m_center ); + } /** * Function SetScale() @@ -247,7 +253,7 @@ public: * Returns the size of the our rendering area, in pixels. * @return viewport screen size */ - VECTOR2D GetScreenPixelSize() const; + const VECTOR2D& GetScreenPixelSize() const; /** * Function AddLayer() @@ -279,11 +285,11 @@ public: */ inline void SetLayerVisible( int aLayer, bool aVisible = true ) { - if( m_layers[aLayer].enabled != aVisible ) + if( m_layers[aLayer].visible != aVisible ) { // Target has to be redrawn after changing its visibility MarkTargetDirty( m_layers[aLayer].target ); - m_layers[aLayer].enabled = aVisible; + m_layers[aLayer].visible = aVisible; } } @@ -294,7 +300,7 @@ public: */ inline bool IsLayerVisible( int aLayer ) const { - return m_layers.at( aLayer ).enabled; + return m_layers.at( aLayer ).visible; } /** @@ -402,18 +408,11 @@ public: */ void Redraw(); - /** - * Function PartialRedraw() - * Redraws only the parts of the view that have been affected by items - * for which ViewUpdate() function has been called since last redraw. - */ - void PartialRedraw(); - /** * Function RecacheAllItems() * Rebuilds GAL display lists. * @param aForceNow decides if every item should be instantly recached. Otherwise items are - * going to be recached when they become visible. + * going to be recached when they become visible. */ void RecacheAllItems( bool aForceNow = false ); @@ -432,7 +431,16 @@ public: * Returns true if any of the VIEW layers needs to be refreshened. * @return True in case if any of layers is marked as dirty. */ - bool IsDirty() const; + bool IsDirty() const + { + for( int i = 0; i < TARGETS_NUMBER; ++i ) + { + if( IsTargetDirty( i ) ) + return true; + } + + return false; + } /** * Function IsTargetDirty() @@ -440,7 +448,12 @@ public: * redrawn. * @return True if the above condition is fulfilled. */ - bool IsTargetDirty( int aTarget ) const; + bool IsTargetDirty( int aTarget ) const + { + wxASSERT( aTarget < TARGETS_NUMBER ); + + return m_dirtyTargets[aTarget]; + } /** * Function MarkTargetDirty() @@ -470,6 +483,22 @@ public: m_dirtyTargets[i] = true; } + /** + * Function MarkForUpdate() + * Adds an item to a list of items that are going to be refreshed upon the next frame rendering. + * @param aItem is the item to be refreshed. + */ + void MarkForUpdate( VIEW_ITEM* aItem ) + { + m_needsUpdate.push_back( aItem ); + } + + /** + * Function UpdateItems() + * Iterates through the list of items that asked for updating and updates them. + */ + void UpdateItems(); + /** * Function SetPanBoundary() * Sets limits for panning area. @@ -493,26 +522,18 @@ public: m_scaleLimits = VECTOR2D( aMaximum, aMinimum ); } - /** - * Function InvalidateItem() - * Manages dirty flags & redraw queueing when updating an item. - * @param aItem is the item to be updated. - * @param aUpdateFlags determines the way an item is refreshed. - */ - void InvalidateItem( VIEW_ITEM* aItem, int aUpdateFlags ); - - static const int VIEW_MAX_LAYERS = 128; ///* maximum number of layers that may be shown + static const int VIEW_MAX_LAYERS = 128; ///< maximum number of layers that may be shown private: struct VIEW_LAYER { - bool enabled; ///* is the layer to be rendered? - bool displayOnly; ///* is the layer display only? - VIEW_RTREE* items; ///* R-tree indexing all items on this layer. - int renderingOrder; ///* rendering order of this layer - int id; ///* layer ID - RENDER_TARGET target; ///* where the layer should be rendered - std::set requiredLayers; ///* layers that have to be enabled to show the layer + bool visible; ///< is the layer to be rendered? + bool displayOnly; ///< is the layer display only? + VIEW_RTREE* items; ///< R-tree indexing all items on this layer. + int renderingOrder; ///< rendering order of this layer + int id; ///< layer ID + RENDER_TARGET target; ///< where the layer should be rendered + std::set requiredLayers; ///< layers that have to be enabled to show the layer }; // Convenience typedefs @@ -532,7 +553,7 @@ private: ///* Redraws contents within rect aRect void redrawRect( const BOX2I& aRect ); - inline void clearTargetDirty( int aTarget ) + inline void markTargetClean( int aTarget ) { wxASSERT( aTarget < TARGETS_NUMBER ); @@ -549,7 +570,7 @@ private: * @param aImmediate dictates the way of drawing - it allows to force immediate drawing mode * for cached items. */ - void draw( VIEW_ITEM* aItem, int aLayer, bool aImmediate = false ) const; + void draw( VIEW_ITEM* aItem, int aLayer, bool aImmediate = false ); /** * Function draw() @@ -559,7 +580,7 @@ private: * @param aImmediate dictates the way of drawing - it allows to force immediate drawing mode * for cached items. */ - void draw( VIEW_ITEM* aItem, bool aImmediate = false ) const; + void draw( VIEW_ITEM* aItem, bool aImmediate = false ); /** * Function draw() @@ -569,7 +590,7 @@ private: * @param aImmediate dictates the way of drawing - it allows to force immediate drawing mode * for cached items. */ - void draw( VIEW_GROUP* aGroup, bool aImmediate = false ) const; + void draw( VIEW_GROUP* aGroup, bool aImmediate = false ); ///* Sorts m_orderedLayers when layer rendering order has changed void sortLayers(); @@ -578,6 +599,14 @@ private: ///* used by GAL) void clearGroupCache(); + /** + * Function InvalidateItem() + * Manages dirty flags & redraw queueing when updating an item. + * @param aItem is the item to be updated. + * @param aUpdateFlags determines the way an item is refreshed. + */ + void invalidateItem( VIEW_ITEM* aItem, int aUpdateFlags ); + /// Updates colors that are used for an item to be drawn void updateItemColor( VIEW_ITEM* aItem, int aLayer ); @@ -638,6 +667,9 @@ private: /// Zoom limits VECTOR2D m_scaleLimits; + + /// Items to be updated + std::vector m_needsUpdate; }; } // namespace KIGFX diff --git a/include/view/view_item.h b/include/view/view_item.h index c06538b224..a64b1b22db 100644 --- a/include/view/view_item.h +++ b/include/view/view_item.h @@ -157,12 +157,16 @@ public: /** * Enum VIEW_UPDATE_FLAGS. * Defines the how severely the shape/appearance of the item has been changed: + * - NONE: TODO * - APPEARANCE: shape or layer set of the item have not been affected, * only colors or visibility. + * - COLOR: * - GEOMETRY: shape or layer set of the item have changed, VIEW may need to reindex it. - * - ALL: all flags above */ + * - LAYERS: TODO + * - ALL: all the flags above */ enum VIEW_UPDATE_FLAGS { + NONE = 0x00, /// No updates are required APPEARANCE = 0x01, /// Visibility flag has changed COLOR = 0x02, /// Color has changed GEOMETRY = 0x04, /// Position or shape has changed @@ -170,7 +174,8 @@ public: ALL = 0xff }; - VIEW_ITEM() : m_view( NULL ), m_visible( true ), m_groups( NULL ), m_groupsSize( 0 ) {} + VIEW_ITEM() : m_view( NULL ), m_visible( true ), m_requiredUpdate( NONE ), + m_groups( NULL ), m_groupsSize( 0 ) {} /** * Destructor. For dynamic views, removes the item from the view. @@ -262,9 +267,15 @@ public: * For dynamic VIEWs, informs the associated VIEW that the graphical representation of * this item has changed. For static views calling has no effect. * - * @param aUpdateFlags: how much the object has changed + * @param aUpdateFlags: how much the object has changed. */ - virtual void ViewUpdate( int aUpdateFlags = ALL ); + virtual void ViewUpdate( int aUpdateFlags = ALL ) + { + if( m_view && m_requiredUpdate == NONE ) + m_view->MarkForUpdate( this ); + + m_requiredUpdate |= aUpdateFlags; + } /** * Function ViewRelease() @@ -298,8 +309,9 @@ protected: deleteGroups(); } - VIEW* m_view; ///* Current dynamic view the item is assigned to. - bool m_visible; ///* Are we visible in the current dynamic VIEW. + VIEW* m_view; ///< Current dynamic view the item is assigned to. + bool m_visible; ///< Are we visible in the current dynamic VIEW. + int m_requiredUpdate; ///< Flag required for updating ///* Helper for storing cached items group ids typedef std::pair GroupPair; @@ -374,6 +386,24 @@ protected: m_layers.set( aLayers[i] ); } } + + /** + * Function viewRequiredUpdate() + * Returns current update flag for an item. + */ + virtual int viewRequiredUpdate() const + { + return m_requiredUpdate; + } + + /** + * Function clearUpdateFlags() + * Marks an item as already updated, so it is not going to be redrawn. + */ + void clearUpdateFlags() + { + m_requiredUpdate = NONE; + } }; } // namespace KIGFX diff --git a/pcbnew/class_module.cpp b/pcbnew/class_module.cpp index 60b59d8501..e12f3bcf3a 100644 --- a/pcbnew/class_module.cpp +++ b/pcbnew/class_module.cpp @@ -746,20 +746,20 @@ void MODULE::ViewUpdate( int aUpdateFlags ) if( !m_view ) return; + // Update the module itself + VIEW_ITEM::ViewUpdate( aUpdateFlags ); + // Update pads for( D_PAD* pad = m_Pads.GetFirst(); pad; pad = pad->Next() ) - m_view->InvalidateItem( pad, aUpdateFlags ); + pad->ViewUpdate( aUpdateFlags ); // Update module's drawing (mostly silkscreen) for( BOARD_ITEM* drawing = m_Drawings.GetFirst(); drawing; drawing = drawing->Next() ) - m_view->InvalidateItem( drawing, aUpdateFlags ); + drawing->ViewUpdate( aUpdateFlags ); // Update module's texts - m_view->InvalidateItem( m_Reference, aUpdateFlags ); - m_view->InvalidateItem( m_Value, aUpdateFlags ); - - // Update the module itself - m_view->InvalidateItem( this, aUpdateFlags ); + m_Reference->ViewUpdate( aUpdateFlags ); + m_Value->ViewUpdate( aUpdateFlags ); } From 1c253bfba0dd3998c8d13c1d93def2092825251f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 24 Feb 2014 11:17:49 +0100 Subject: [PATCH 128/741] Some variables initialized to NULL. --- common/gal/opengl/opengl_compositor.cpp | 2 +- pcbnew/tools/drawing_tool.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common/gal/opengl/opengl_compositor.cpp b/common/gal/opengl/opengl_compositor.cpp index af7b52ba5b..3a6721e5c9 100644 --- a/common/gal/opengl/opengl_compositor.cpp +++ b/common/gal/opengl/opengl_compositor.cpp @@ -17,7 +17,7 @@ * 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:O//www.gnu.org website for the version 2 license, + * 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 */ diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index b3ea0c6a3a..a1eddfca16 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -84,7 +84,7 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) double startAngle; // angle of the first arc line VECTOR2I cursorPos = m_controls->GetCursorPosition(); - DRAWSEGMENT* arc; + DRAWSEGMENT* arc = NULL; DRAWSEGMENT helperLine; helperLine.SetShape( S_SEGMENT ); helperLine.SetLayer( DRAW_N ); @@ -374,7 +374,7 @@ int DRAWING_TOOL::DrawText( TOOL_EVENT& aEvent ) int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent ) { - DIMENSION* dimension; + DIMENSION* dimension = NULL; int width, maxThickness; // Add a VIEW_GROUP that serves as a preview for the new item @@ -922,9 +922,9 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) int DRAWING_TOOL::drawZone( bool aKeepout ) { - ZONE_CONTAINER* zone; + ZONE_CONTAINER* zone = NULL; DRAWSEGMENT line45; - DRAWSEGMENT* helperLine; // we will need more than one helper line + DRAWSEGMENT* helperLine = NULL; // we will need more than one helper line // Add a VIEW_GROUP that serves as a preview for the new item KIGFX::VIEW_GROUP preview( m_view ); From de637d2b8d014539e950eca5f8195921198ddd54 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 24 Feb 2014 12:56:47 +0100 Subject: [PATCH 129/741] Fixed a missing group clearing and update for restored VIEW_ITEMs.Fixed a missing group clearing and update for restored VIEW_ITEMs. --- common/view/view.cpp | 18 +++++++++--------- pcbnew/pcb_painter.cpp | 6 +----- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/common/view/view.cpp b/common/view/view.cpp index 0a18d42711..38051b094e 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -94,13 +94,16 @@ void VIEW::Add( VIEW_ITEM* aItem ) aItem->ViewGetLayers( layers, layers_count ); aItem->saveLayers( layers, layers_count ); - for( int i = 0; i < layers_count; i++ ) + for( int i = 0; i < layers_count; ++i ) { VIEW_LAYER& l = m_layers[layers[i]]; l.items->Insert( aItem ); MarkTargetDirty( l.target ); } + if( aItem->viewRequiredUpdate() != VIEW_ITEM::NONE ) + MarkForUpdate( aItem ); + if( m_dynamic ) aItem->viewAssign( this ); } @@ -122,8 +125,12 @@ void VIEW::Remove( VIEW_ITEM* aItem ) // Clear the GAL cache int prevGroup = aItem->getGroup( layers[i] ); + if( prevGroup >= 0 ) + { m_gal->DeleteGroup( prevGroup ); + aItem->setGroup( layers[i], -1 ); + } } } @@ -134,13 +141,9 @@ void VIEW::SetRequired( int aLayerId, int aRequiredId, bool aRequired ) wxASSERT( (unsigned) aRequiredId < m_layers.size() ); if( aRequired ) - { m_layers[aLayerId].requiredLayers.insert( aRequiredId ); - } else - { m_layers[aLayerId].requiredLayers.erase( aRequired ); - } } @@ -782,10 +785,7 @@ struct VIEW::clearLayerCache bool operator()( VIEW_ITEM* aItem ) { - if( aItem->storesGroups() ) - { - aItem->deleteGroups(); - } + aItem->deleteGroups(); return true; } diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 93414fc3e0..72fd6dd0c3 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -275,10 +275,6 @@ void PCB_PAINTER::draw( const TRACK* aTrack, int aLayer ) if( length < 10 * width ) return; - NETINFO_ITEM* net = ( (BOARD*) aTrack->GetParent() )->FindNet( netNumber ); - if( !net ) - return; - const wxString& netName = aTrack->GetShortNetname(); VECTOR2D textPosition = start + line / 2.0; // center of the track double textOrientation = -atan( line.y / line.x ); @@ -303,7 +299,7 @@ void PCB_PAINTER::draw( const TRACK* aTrack, int aLayer ) m_gal->StrokeText( netName, textPosition, textOrientation ); } } - else if( IsCopperLayer( aLayer )) + else if( IsCopperLayer( aLayer ) ) { // Draw a regular track const COLOR4D& color = m_pcbSettings->GetColor( aTrack, aLayer ); From d583280bb07b6637649418f0a848c07c25deeb6d Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 24 Feb 2014 14:31:55 +0100 Subject: [PATCH 130/741] Minor code cleaning and optimizations. --- common/view/view.cpp | 24 ++++++++++-------------- pcbnew/pcbframe.cpp | 12 +++--------- 2 files changed, 13 insertions(+), 23 deletions(-) diff --git a/common/view/view.cpp b/common/view/view.cpp index 38051b094e..428dd7e594 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -127,11 +127,10 @@ void VIEW::Remove( VIEW_ITEM* aItem ) int prevGroup = aItem->getGroup( layers[i] ); if( prevGroup >= 0 ) - { m_gal->DeleteGroup( prevGroup ); - aItem->setGroup( layers[i], -1 ); - } } + + aItem->deleteGroups(); } @@ -199,13 +198,9 @@ VECTOR2D VIEW::ToWorld( const VECTOR2D& aCoord, bool aAbsolute ) const const MATRIX3x3D& matrix = m_gal->GetScreenWorldMatrix(); if( aAbsolute ) - { return VECTOR2D( matrix * aCoord ); - } else - { return VECTOR2D( matrix.GetScale().x * aCoord.x, matrix.GetScale().y * aCoord.y ); - } } @@ -214,13 +209,9 @@ VECTOR2D VIEW::ToScreen( const VECTOR2D& aCoord, bool aAbsolute ) const const MATRIX3x3D& matrix = m_gal->GetWorldScreenMatrix(); if( aAbsolute ) - { return VECTOR2D( matrix * aCoord ); - } else - { return VECTOR2D( matrix.GetScale().x * aCoord.x, matrix.GetScale().y * aCoord.y ); - } } @@ -699,6 +690,7 @@ struct VIEW::recacheItem } else { + aItem->ViewUpdate( VIEW_ITEM::ALL ); aItem->setGroup( layer, -1 ); } @@ -730,6 +722,7 @@ void VIEW::Clear() } m_gal->ClearCache(); + m_needsUpdate.clear(); } @@ -889,7 +882,10 @@ void VIEW::updateItemGeometry( VIEW_ITEM* aItem, int aLayer ) group = m_gal->BeginGroup(); aItem->setGroup( aLayer, group ); - m_painter->Draw( static_cast( aItem ), aLayer ); + + if( !m_painter->Draw( static_cast( aItem ), aLayer ) ); + aItem->ViewDraw( aLayer, m_gal ); // Alternative drawing method + m_gal->EndGroup(); } @@ -900,7 +896,7 @@ void VIEW::updateBbox( VIEW_ITEM* aItem ) aItem->ViewGetLayers( layers, layers_count ); - for( int i = 0; i < layers_count; i++ ) + for( int i = 0; i < layers_count; ++i ) { VIEW_LAYER& l = m_layers[layers[i]]; l.items->Remove( aItem ); @@ -917,7 +913,7 @@ void VIEW::updateLayers( VIEW_ITEM* aItem ) // Remove the item from previous layer set aItem->getLayers( layers, layers_count ); - for( int i = 0; i < layers_count; i++ ) + for( int i = 0; i < layers_count; ++i ) { VIEW_LAYER& l = m_layers[layers[i]]; l.items->Remove( aItem ); diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index f87ae2e959..4ec121c99e 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -578,13 +578,7 @@ void PCB_EDIT_FRAME::ViewReloadBoard( const BOARD* aBoard ) const std::string( aBoard->GetFileName().mb_str() ), std::string( GetScreenDesc().mb_str() ), &GetPageSettings(), &GetTitleBlock() ); - BASE_SCREEN* screen = GetScreen(); - if( screen != NULL ) - { - worksheet->SetSheetNumber( GetScreen()->m_ScreenNumber ); - worksheet->SetSheetCount( GetScreen()->m_NumberOfScreens ); - } - + worksheet->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); view->Add( worksheet ); // Add an entry for the ratsnest @@ -715,10 +709,10 @@ void PCB_EDIT_FRAME::UseGalCanvas( bool aEnable ) { EDA_DRAW_FRAME::UseGalCanvas( aEnable ); - ViewReloadBoard( m_Pcb ); - if( aEnable ) { + ViewReloadBoard( m_Pcb ); + // Update potential changes in the ratsnest m_Pcb->GetRatsnest()->Recalculate(); From 75026d8754d5d94898e1fb42276a5654bcc1500b Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 25 Feb 2014 11:40:34 +0100 Subject: [PATCH 131/741] Renamed BOARD_CONNECTED_ITEM::GetNet() -> GetNetCode() Renamed BOARD_CONNECTED_ITEM::SetNet() -> SetNetCode() Added BOARD_CONNECTED_ITEM::GetNet() for accessing NETINFO_ITEM* of a given item. Fixed module editor crash when launched to edit a module from a PCB. Replaced some BOARD::FindNet( item->GetNet() ) calls with BOARD_CONNECTED_ITEM::GetNet(). --- pcbnew/attribut.cpp | 4 +- pcbnew/autorouter/auto_place_footprints.cpp | 2 +- pcbnew/autorouter/autorout.cpp | 2 +- pcbnew/autorouter/routing_matrix.cpp | 10 ++--- pcbnew/autorouter/solve.cpp | 6 +-- pcbnew/class_board.cpp | 32 +++++-------- pcbnew/class_board_connected_item.cpp | 19 ++++---- pcbnew/class_board_connected_item.h | 41 ++++++++++------- pcbnew/class_netinfo.h | 2 +- pcbnew/class_netinfo_item.cpp | 9 ++-- pcbnew/class_netinfolist.cpp | 20 +++++---- pcbnew/class_pad.cpp | 4 +- pcbnew/class_pad_draw_functions.cpp | 2 +- pcbnew/class_track.cpp | 45 ++++++++----------- pcbnew/class_zone.cpp | 14 +++--- pcbnew/class_zone_settings.cpp | 4 +- pcbnew/clean.cpp | 22 ++++----- pcbnew/connect.cpp | 24 +++++----- pcbnew/cross-probing.cpp | 2 +- pcbnew/deltrack.cpp | 10 ++--- pcbnew/dialogs/dialog_pad_properties.cpp | 10 ++--- pcbnew/dragsegm.cpp | 2 +- pcbnew/drc.cpp | 4 +- pcbnew/drc_clearance_test_functions.cpp | 8 ++-- pcbnew/eagle_plugin.cpp | 12 ++--- pcbnew/edit.cpp | 18 ++++---- pcbnew/edit_track_width.cpp | 4 +- pcbnew/editrack-part2.cpp | 6 +-- pcbnew/editrack.cpp | 16 +++---- pcbnew/exporters/export_d356.cpp | 2 +- pcbnew/exporters/export_gencad.cpp | 10 ++--- pcbnew/highlight.cpp | 6 +-- pcbnew/kicad_plugin.cpp | 8 ++-- pcbnew/legacy_plugin.cpp | 16 +++---- pcbnew/magnetic_tracks_functions.cpp | 6 +-- pcbnew/move_or_drag_track.cpp | 14 +++--- pcbnew/pad_edition_functions.cpp | 2 +- pcbnew/pcad2kicadpcb_plugin/pcb_line.cpp | 2 +- pcbnew/pcad2kicadpcb_plugin/pcb_pad.cpp | 4 +- pcbnew/pcad2kicadpcb_plugin/pcb_polygon.cpp | 2 +- pcbnew/pcb_painter.cpp | 6 +-- pcbnew/pcb_parser.cpp | 18 ++++---- pcbnew/ratsnest.cpp | 34 +++++++------- pcbnew/ratsnest_data.cpp | 20 ++++----- pcbnew/router/pns_router.cpp | 10 ++--- pcbnew/specctra_export.cpp | 6 +-- pcbnew/specctra_import.cpp | 4 +- pcbnew/tr_modif.cpp | 2 +- pcbnew/tracepcb.cpp | 6 +-- pcbnew/xchgmod.cpp | 4 +- pcbnew/zones_by_polygon.cpp | 31 ++++++------- pcbnew/zones_by_polygon_fill_functions.cpp | 2 +- ...nvert_brd_items_to_polygons_with_Boost.cpp | 16 +++---- ...ones_convert_to_polygons_aux_functions.cpp | 2 +- pcbnew/zones_functions_for_undo_redo.cpp | 4 +- ...ones_polygons_insulated_copper_islands.cpp | 4 +- pcbnew/zones_polygons_test_connections.cpp | 22 ++++----- pcbnew/zones_test_and_combine_areas.cpp | 12 ++--- 58 files changed, 310 insertions(+), 319 deletions(-) diff --git a/pcbnew/attribut.cpp b/pcbnew/attribut.cpp index 2bc380abf1..c56f09da24 100644 --- a/pcbnew/attribut.cpp +++ b/pcbnew/attribut.cpp @@ -103,7 +103,7 @@ void PCB_EDIT_FRAME::Attribut_net( wxDC* DC, int net_code, bool Flag_On ) { for( ; Track != NULL; Track = Track->Next() ) { - if( net_code == Track->GetNet() ) + if( net_code == Track->GetNetCode() ) break; } } @@ -112,7 +112,7 @@ void PCB_EDIT_FRAME::Attribut_net( wxDC* DC, int net_code, bool Flag_On ) while( Track ) /* Flag change */ { - if( (net_code >= 0 ) && (net_code != Track->GetNet()) ) + if( ( net_code >= 0 ) && ( net_code != Track->GetNetCode() ) ) break; OnModify(); diff --git a/pcbnew/autorouter/auto_place_footprints.cpp b/pcbnew/autorouter/auto_place_footprints.cpp index 7322f5690b..0351c43bd1 100644 --- a/pcbnew/autorouter/auto_place_footprints.cpp +++ b/pcbnew/autorouter/auto_place_footprints.cpp @@ -499,7 +499,7 @@ int genPlacementRoutingMatrix( BOARD* aBrd, EDA_MSG_PANEL* messagePanel ) TRACK TmpSegm( NULL ); TmpSegm.SetLayer( UNDEFINED_LAYER ); - TmpSegm.SetNet( -1 ); + TmpSegm.SetNetCode( -1 ); TmpSegm.SetWidth( RoutingMatrix.m_GridRouting / 2 ); EDA_ITEM* PtStruct = aBrd->m_Drawings; diff --git a/pcbnew/autorouter/autorout.cpp b/pcbnew/autorouter/autorout.cpp index b0dc59b0b7..88f2e12e6e 100644 --- a/pcbnew/autorouter/autorout.cpp +++ b/pcbnew/autorouter/autorout.cpp @@ -78,7 +78,7 @@ void PCB_EDIT_FRAME::Autoroute( wxDC* DC, int mode ) { case PCB_PAD_T: Pad = (D_PAD*) GetScreen()->GetCurItem(); - autoroute_net_code = Pad->GetNet(); + autoroute_net_code = Pad->GetNetCode(); break; default: diff --git a/pcbnew/autorouter/routing_matrix.cpp b/pcbnew/autorouter/routing_matrix.cpp index 1e57b80293..b5d02e926a 100644 --- a/pcbnew/autorouter/routing_matrix.cpp +++ b/pcbnew/autorouter/routing_matrix.cpp @@ -215,7 +215,7 @@ void PlaceCells( BOARD* aPcb, int net_code, int flag ) { D_PAD* pad = aPcb->GetPad( i ); - if( net_code != pad->GetNet() || (flag & FORCE_PADS) ) + if( net_code != pad->GetNetCode() || (flag & FORCE_PADS) ) { ::PlacePad( pad, HOLE, marge, WRITE_CELL ); } @@ -247,7 +247,7 @@ void PlaceCells( BOARD* aPcb, int net_code, int flag ) tmpSegm.SetShape( edge->GetShape() ); tmpSegm.SetWidth( edge->GetWidth() ); tmpSegm.m_Param = edge->GetAngle(); - tmpSegm.SetNet( -1 ); + tmpSegm.SetNetCode( -1 ); TraceSegmentPcb( &tmpSegm, HOLE, marge, WRITE_CELL ); TraceSegmentPcb( &tmpSegm, VIA_IMPOSSIBLE, via_marge, WRITE_OR_CELL ); @@ -284,7 +284,7 @@ void PlaceCells( BOARD* aPcb, int net_code, int flag ) tmpSegm.SetShape( DrawSegm->GetShape() ); tmpSegm.SetWidth( DrawSegm->GetWidth() ); tmpSegm.m_Param = DrawSegm->GetAngle(); - tmpSegm.SetNet( -1 ); + tmpSegm.SetNetCode( -1 ); TraceSegmentPcb( &tmpSegm, type_cell, marge, WRITE_CELL ); } @@ -335,7 +335,7 @@ void PlaceCells( BOARD* aPcb, int net_code, int flag ) /* Put tracks and vias on matrix */ for( TRACK* track = aPcb->m_Track; track; track = track->Next() ) { - if( net_code == track->GetNet() ) + if( net_code == track->GetNetCode() ) continue; TraceSegmentPcb( track, HOLE, marge, WRITE_CELL ); @@ -374,7 +374,7 @@ int Build_Work( BOARD* Pcb ) pt_pad = pt_rats->m_PadStart; - current_net_code = pt_pad->GetNet(); + current_net_code = pt_pad->GetNetCode(); pt_ch = pt_rats; r1 = ( pt_pad->GetPosition().y - RoutingMatrix.m_BrdBox.GetY() + demi_pas ) diff --git a/pcbnew/autorouter/solve.cpp b/pcbnew/autorouter/solve.cpp index c06d8545eb..063d56c702 100644 --- a/pcbnew/autorouter/solve.cpp +++ b/pcbnew/autorouter/solve.cpp @@ -1180,7 +1180,7 @@ static void OrCell_Trace( BOARD* pcb, int col, int row, g_CurrentTrackSegment->SetWidth( pcb->GetCurrentViaSize() ); g_CurrentTrackSegment->SetShape( pcb->GetDesignSettings().m_CurrentViaType ); - g_CurrentTrackSegment->SetNet( current_net_code ); + g_CurrentTrackSegment->SetNetCode( current_net_code ); } else // placement of a standard segment { @@ -1198,7 +1198,7 @@ static void OrCell_Trace( BOARD* pcb, int col, int row, ( RoutingMatrix.m_GridRouting * row ), pcb->GetBoundingBox().GetY() + ( RoutingMatrix.m_GridRouting * col ))); - g_CurrentTrackSegment->SetNet( current_net_code ); + g_CurrentTrackSegment->SetNetCode( current_net_code ); if( g_CurrentTrackSegment->Back() == NULL ) /* Start trace. */ { @@ -1319,7 +1319,7 @@ static void AddNewTrace( PCB_EDIT_FRAME* pcbframe, wxDC* DC ) } // Insert new segments in real board - int netcode = g_FirstTrackSegment->GetNet(); + int netcode = g_FirstTrackSegment->GetNetCode(); TRACK* firstTrack = g_FirstTrackSegment; int newCount = g_CurrentTrackList.GetCount(); diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index 7f7bbb5a43..ab0272f8b4 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -1345,14 +1345,6 @@ NETINFO_ITEM* BOARD::FindNet( int aNetcode ) const // NULL is returned for non valid netcodes NETINFO_ITEM* net = m_NetInfo.GetNetItem( aNetcode ); -#if defined(DEBUG) - if( net && aNetcode != net->GetNet()) // item can be NULL if anetcode is not valid - { - wxLogError( wxT( "FindNet() anetcode %d != GetNet() %d (net: %s)\n" ), - aNetcode, net->GetNet(), TO_UTF8( net->GetNetname() ) ); - } -#endif - return net; } @@ -1515,7 +1507,7 @@ ZONE_CONTAINER* BOARD::HitTestForAnyFilledArea( const wxPoint& aRefPos, if( area->GetState( BUSY ) ) continue; - if( aNetCode >= 0 && area->GetNet() != aNetCode ) + if( aNetCode >= 0 && area->GetNetCode() != aNetCode ) continue; if( area->HitTestFilledArea( aRefPos ) ) @@ -1534,24 +1526,24 @@ int BOARD::SetAreasNetCodesFromNetNames( void ) { if( !GetArea( ii )->IsOnCopperLayer() ) { - GetArea( ii )->SetNet( NETINFO_LIST::UNCONNECTED ); + GetArea( ii )->SetNetCode( NETINFO_LIST::UNCONNECTED ); continue; } - if( GetArea( ii )->GetNet() != 0 ) // i.e. if this zone is connected to a net + if( GetArea( ii )->GetNetCode() != 0 ) // i.e. if this zone is connected to a net { - const NETINFO_ITEM* net = FindNet( GetArea( ii )->GetNetname() ); + const NETINFO_ITEM* net = GetArea( ii )->GetNet(); if( net ) { - GetArea( ii )->SetNet( net->GetNet() ); + GetArea( ii )->SetNetCode( net->GetNet() ); } else { error_count++; // keep Net Name and set m_NetCode to -1 : error flag. - GetArea( ii )->SetNet( -1 ); + GetArea( ii )->SetNetCode( -1 ); } } } @@ -2271,7 +2263,7 @@ ZONE_CONTAINER* BOARD::InsertArea( int netcode, int iarea, LAYER_NUM layer, int { ZONE_CONTAINER* new_area = new ZONE_CONTAINER( this ); - new_area->SetNet( netcode ); + new_area->SetNetCode( netcode ); new_area->SetLayer( layer ); new_area->SetTimeStamp( GetNewTimeStamp() ); @@ -2310,7 +2302,7 @@ bool BOARD::NormalizeAreaPolygon( PICKED_ITEMS_LIST * aNewZonesList, ZONE_CONTAI { // create new copper area and copy poly into it CPolyLine* new_p = (*pa)[ip - 1]; - NewArea = AddArea( aNewZonesList, aCurrArea->GetNet(), aCurrArea->GetLayer(), + NewArea = AddArea( aNewZonesList, aCurrArea->GetNetCode(), aCurrArea->GetLayer(), wxPoint(0, 0), CPolyLine::NO_HATCH ); // remove the poly that was automatically created for the new area @@ -2551,7 +2543,7 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets, } if( !aNetlist.IsDryRun() ) - pad->SetNet( NETINFO_LIST::UNCONNECTED ); + pad->SetNetCode( NETINFO_LIST::UNCONNECTED ); } } else // Footprint pad has a net. @@ -2580,7 +2572,7 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets, m_NetInfo.AppendNet( netinfo ); } - pad->SetNet( netinfo->GetNet() ); + pad->SetNetCode( netinfo->GetNet() ); } } } @@ -2654,7 +2646,7 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets, aReporter->Report( msg ); } - previouspad->SetNet( NETINFO_LIST::UNCONNECTED ); + previouspad->SetNetCode( NETINFO_LIST::UNCONNECTED ); } netname = pad->GetNetname(); count = 1; @@ -2667,7 +2659,7 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets, // Examine last pad if( pad && count == 1 ) - pad->SetNet( NETINFO_LIST::UNCONNECTED ); + pad->SetNetCode( NETINFO_LIST::UNCONNECTED ); } // Last step: Some tests: diff --git a/pcbnew/class_board_connected_item.cpp b/pcbnew/class_board_connected_item.cpp index 26cca19772..73bdced99a 100644 --- a/pcbnew/class_board_connected_item.cpp +++ b/pcbnew/class_board_connected_item.cpp @@ -35,28 +35,28 @@ #include BOARD_CONNECTED_ITEM::BOARD_CONNECTED_ITEM( BOARD_ITEM* aParent, KICAD_T idtype ) : - BOARD_ITEM( aParent, idtype ), m_Subnet( 0 ), m_ZoneSubnet( 0 ), - m_netinfo( &NETINFO_LIST::ORPHANED ) + BOARD_ITEM( aParent, idtype ), m_netinfo( &NETINFO_LIST::ORPHANED ), + m_Subnet( 0 ), m_ZoneSubnet( 0 ) { - // The unconnected is set only in case the item belongs to a BOARD - SetNet( NETINFO_LIST::UNCONNECTED ); + // The unconnected net is set only in case the item belongs to a BOARD + SetNetCode( NETINFO_LIST::UNCONNECTED ); } BOARD_CONNECTED_ITEM::BOARD_CONNECTED_ITEM( const BOARD_CONNECTED_ITEM& aItem ) : - BOARD_ITEM( aItem ), m_Subnet( aItem.m_Subnet ), m_ZoneSubnet( aItem.m_ZoneSubnet ), - m_netinfo( aItem.m_netinfo ) + BOARD_ITEM( aItem ), m_netinfo( aItem.m_netinfo ), m_Subnet( aItem.m_Subnet ), + m_ZoneSubnet( aItem.m_ZoneSubnet ) { } -int BOARD_CONNECTED_ITEM::GetNet() const +int BOARD_CONNECTED_ITEM::GetNetCode() const { return m_netinfo->GetNet(); } -void BOARD_CONNECTED_ITEM::SetNet( int aNetCode ) +void BOARD_CONNECTED_ITEM::SetNetCode( int aNetCode ) { BOARD* board = GetBoard(); if( board ) @@ -136,8 +136,7 @@ NETCLASS* BOARD_CONNECTED_ITEM::GetNetClass() const } NETCLASS* netclass = NULL; - int netcode = GetNet(); - NETINFO_ITEM* net = board->FindNet( netcode ); + NETINFO_ITEM* net = board->FindNet( GetNetCode() ); if( net ) { diff --git a/pcbnew/class_board_connected_item.h b/pcbnew/class_board_connected_item.h index eab6d310fd..2742fa3106 100644 --- a/pcbnew/class_board_connected_item.h +++ b/pcbnew/class_board_connected_item.h @@ -54,18 +54,6 @@ public: std::vector m_TracksConnected; // list of other tracks connected to me std::vector m_PadsConnected; // list of other pads connected to me -private: - int m_Subnet; /* In rastnest routines : for the current net, block number - * (number common to the current connected items found) - */ - - int m_ZoneSubnet; // used in rastnest computations : for the current net, - // handle cluster number in zone connection - - /// Stores all informations about the net that item belongs to - const NETINFO_ITEM* m_netinfo; - -public: BOARD_CONNECTED_ITEM( BOARD_ITEM* aParent, KICAD_T idtype ); BOARD_CONNECTED_ITEM( const BOARD_CONNECTED_ITEM& aItem ); @@ -78,17 +66,26 @@ public: /** * Function GetNet - * @return int - the net code. + * Returns NET_INFO object for a given item. */ - int GetNet() const; + NETINFO_ITEM* GetNet() const + { + return m_netinfo; + } /** - * Function SetNet + * Function GetNetCode + * @return int - the net code. + */ + int GetNetCode() const; + + /** + * Function SetNetCode * sets net using a net code. * @param aNetCode is a net code for the new net. It has to exist in NETINFO_LIST held by BOARD. * Otherwise, item is assigned to the unconnected net. */ - void SetNet( int aNetCode ); + void SetNetCode( int aNetCode ); /** * Function GetSubNet @@ -156,6 +153,18 @@ public: * @return the Net Class name of this item */ wxString GetNetClassName() const; + +protected: + /// Stores all informations about the net that item belongs to + NETINFO_ITEM* m_netinfo; + +private: + int m_Subnet; /* In rastnest routines : for the current net, block number + * (number common to the current connected items found) + */ + + int m_ZoneSubnet; // used in rastnest computations : for the current net, + // handle cluster number in zone connection }; diff --git a/pcbnew/class_netinfo.h b/pcbnew/class_netinfo.h index 50bb30457d..f566926fcc 100644 --- a/pcbnew/class_netinfo.h +++ b/pcbnew/class_netinfo.h @@ -320,7 +320,7 @@ public: ///> NETINFO_ITEM meaning that there was no net assigned for an item, as there was no ///> board storing net list available. - static const NETINFO_ITEM ORPHANED; + static NETINFO_ITEM ORPHANED; #if defined(DEBUG) void Show() const; diff --git a/pcbnew/class_netinfo_item.cpp b/pcbnew/class_netinfo_item.cpp index 1ca37ec3a1..f61705385f 100644 --- a/pcbnew/class_netinfo_item.cpp +++ b/pcbnew/class_netinfo_item.cpp @@ -58,8 +58,7 @@ NETINFO_ITEM::NETINFO_ITEM( BOARD_ITEM* aParent, const wxString& aNetName, int a m_RatsnestEndIdx = 0; // Ending point of ratsnests of this net m_NetClassName = NETCLASS::Default; - - m_NetClass = 0; + m_NetClass = NULL; } @@ -102,7 +101,7 @@ void NETINFO_ITEM::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) { for( pad = module->Pads(); pad != 0; pad = pad->Next() ) { - if( pad->GetNet() == GetNet() ) + if( pad->GetNetCode() == GetNet() ) { count++; lengthPadToDie += pad->GetPadToDieLength(); @@ -120,13 +119,13 @@ void NETINFO_ITEM::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) { if( Struct->Type() == PCB_VIA_T ) { - if( ( (SEGVIA*) Struct )->GetNet() == GetNet() ) + if( ( (SEGVIA*) Struct )->GetNetCode() == GetNet() ) count++; } if( Struct->Type() == PCB_TRACE_T ) { - if( ( (TRACK*) Struct )->GetNet() == GetNet() ) + if( ( (TRACK*) Struct )->GetNetCode() == GetNet() ) lengthnet += ( (TRACK*) Struct )->GetLength(); } } diff --git a/pcbnew/class_netinfolist.cpp b/pcbnew/class_netinfolist.cpp index ac8962958e..da3bd875d1 100644 --- a/pcbnew/class_netinfolist.cpp +++ b/pcbnew/class_netinfolist.cpp @@ -125,11 +125,16 @@ void NETINFO_LIST::buildListOfNets() { pad = m_PadsFullList[ii]; - if( pad->GetNet() == NETINFO_LIST::UNCONNECTED ) // pad not connected + if( pad->GetNetCode() == NETINFO_LIST::UNCONNECTED ) // pad not connected continue; // Add pad to the appropriate list of pads - GetNetItem( pad->GetNet() )->m_PadInNetList.push_back( pad ); + NETINFO_ITEM* net = pad->GetNet(); + // it should not be possible for BOARD_CONNECTED_ITEM to return NULL as a result of GetNet() + wxASSERT( net ); + + if( net ) + net->m_PadInNetList.push_back( pad ); ++nodes_count; } @@ -232,24 +237,24 @@ void NETINFO_MAPPING::Update() // Zones for( int i = 0; i < m_board->GetAreaCount(); ++i ) - nets.insert( m_board->GetArea( i )->GetNet() ); + nets.insert( m_board->GetArea( i )->GetNetCode() ); // Tracks for( TRACK* track = m_board->m_Track; track; track = track->Next() ) - nets.insert( track->GetNet() ); + nets.insert( track->GetNetCode() ); // Modules/pads for( MODULE* module = m_board->m_Modules; module; module = module->Next() ) { for( D_PAD* pad = module->Pads().GetFirst(); pad; pad = pad->Next() ) { - nets.insert( pad->GetNet() ); + nets.insert( pad->GetNetCode() ); } } // Segzones for( SEGZONE* zone = m_board->m_Zone; zone; zone = zone->Next() ) - nets.insert( zone->GetNet() ); + nets.insert( zone->GetNetCode() ); // Prepare the new mapping m_netMapping.clear(); @@ -275,5 +280,4 @@ NETINFO_ITEM* NETINFO_MAPPING::iterator::operator->() const const int NETINFO_LIST::UNCONNECTED = 0; -const NETINFO_ITEM NETINFO_LIST::ORPHANED = NETINFO_ITEM( NULL, wxEmptyString, - NETINFO_LIST::UNCONNECTED ); +NETINFO_ITEM NETINFO_LIST::ORPHANED = NETINFO_ITEM( NULL, wxEmptyString, NETINFO_LIST::UNCONNECTED ); diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index a3b87e06c6..c4a83d2441 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -373,7 +373,7 @@ void D_PAD::Copy( D_PAD* source ) m_layerMask = source->m_layerMask; m_NumPadName = source->m_NumPadName; - SetNet( source->GetNet() ); + m_netinfo = source->m_netinfo; m_Drill = source->m_Drill; m_drillShape = source->m_drillShape; m_Offset = source->m_Offset; @@ -403,7 +403,7 @@ void D_PAD::CopyNetlistSettings( D_PAD* aPad ) // Don't do anything foolish like trying to copy to yourself. wxCHECK_RET( aPad != NULL && aPad != this, wxT( "Cannot copy to NULL or yourself." ) ); - aPad->SetNet( GetNet() ); + aPad->SetNetCode( GetNetCode() ); aPad->SetLocalClearance( m_LocalClearance ); aPad->SetLocalSolderMaskMargin( m_LocalSolderMaskMargin ); diff --git a/pcbnew/class_pad_draw_functions.cpp b/pcbnew/class_pad_draw_functions.cpp index b61fc4de32..7c21d9c4b2 100644 --- a/pcbnew/class_pad_draw_functions.cpp +++ b/pcbnew/class_pad_draw_functions.cpp @@ -473,7 +473,7 @@ void D_PAD::DrawShape( EDA_RECT* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo ) GRSetDrawMode( aDC, aDrawInfo.m_DrawMode ); // Draw "No connect" ( / or \ or cross X ) if necessary - if( GetNet() == 0 && aDrawInfo.m_ShowNCMark ) + if( GetNetCode() == 0 && aDrawInfo.m_ShowNCMark ) { int dx0 = std::min( halfsize.x, halfsize.y ); EDA_COLOR_T nc_color = BLUE; diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index 0e554a2a4e..6221756253 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -160,15 +160,11 @@ EDA_ITEM* SEGZONE::Clone() const wxString SEGZONE::GetSelectMenuText() const { wxString text, nettxt; - NETINFO_ITEM* net; BOARD* board = GetBoard(); if( board ) { - net = board->FindNet( GetNet() ); - - if( net ) - nettxt = net->GetNetname(); + nettxt = GetNetname(); } else { @@ -201,7 +197,6 @@ wxString SEGVIA::GetSelectMenuText() const { wxString text; wxString format; - NETINFO_ITEM* net; BOARD* board = GetBoard(); int shape = GetShape(); @@ -215,18 +210,14 @@ wxString SEGVIA::GetSelectMenuText() const if( board ) { - net = board->FindNet( GetNet() ); - wxString netname; - - if( net ) - netname = net->GetNetname(); + wxString netname = GetNetname(); // say which layers, only two for now LAYER_NUM topLayer; LAYER_NUM botLayer; ReturnLayerPair( &topLayer, &botLayer ); text.Printf( format.GetData(), GetChars( ShowWidth() ), - GetChars( netname ), GetNet(), + GetChars( netname ), GetNetCode(), GetChars( board->GetLayerName( topLayer ) ), GetChars( board->GetLayerName( botLayer ) ) ); @@ -496,7 +487,7 @@ TRACK* TRACK::GetBestInsertPoint( BOARD* aPcb ) for( ; track; track = track->Next() ) { - if( GetNet() <= track->GetNet() ) + if( GetNetCode() <= track->GetNetCode() ) return track; } @@ -510,14 +501,14 @@ TRACK* TRACK::GetStartNetCode( int NetCode ) int ii = 0; if( NetCode == -1 ) - NetCode = GetNet(); + NetCode = GetNetCode(); while( Track != NULL ) { - if( Track->GetNet() > NetCode ) + if( Track->GetNetCode() > NetCode ) break; - if( Track->GetNet() == NetCode ) + if( Track->GetNetCode() == NetCode ) { ii++; break; @@ -542,19 +533,19 @@ TRACK* TRACK::GetEndNetCode( int NetCode ) return NULL; if( NetCode == -1 ) - NetCode = GetNet(); + NetCode = GetNetCode(); while( Track != NULL ) { NextS = (TRACK*) Track->Pnext; - if( Track->GetNet() == NetCode ) + if( Track->GetNetCode() == NetCode ) ii++; if( NextS == NULL ) break; - if( NextS->GetNet() > NetCode ) + if( NextS->GetNetCode() > NetCode ) break; Track = NextS; @@ -690,10 +681,10 @@ void TRACK::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, if( aDC->LogicalToDeviceXRel( m_Width ) < MIN_TEXT_SIZE ) return; - if( GetNet() == NETINFO_LIST::UNCONNECTED ) + if( GetNetCode() == NETINFO_LIST::UNCONNECTED ) return; - NETINFO_ITEM* net = ( (BOARD*) GetParent() )->FindNet( GetNet() ); + NETINFO_ITEM* net = GetNet(); if( net == NULL ) return; @@ -952,13 +943,13 @@ void SEGVIA::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, } // Display the short netname: - if( GetNet() == NETINFO_LIST::UNCONNECTED ) + if( GetNetCode() == NETINFO_LIST::UNCONNECTED ) return; if( DisplayOpt.DisplayNetNamesMode == 0 || DisplayOpt.DisplayNetNamesMode == 1 ) return; - NETINFO_ITEM* net = ( (BOARD*) GetParent() )->FindNet( GetNet() ); + NETINFO_ITEM* net = GetNet(); if( net == NULL ) return; @@ -1095,7 +1086,7 @@ void TRACK::GetMsgPanelInfoBase( std::vector< MSG_PANEL_ITEM >& aList ) // Display Net Name (in Pcbnew) if( board ) { - NETINFO_ITEM* net = board->FindNet( GetNet() ); + NETINFO_ITEM* net = GetNet(); if( net ) msg = net->GetNetname(); @@ -1105,7 +1096,7 @@ void TRACK::GetMsgPanelInfoBase( std::vector< MSG_PANEL_ITEM >& aList ) aList.push_back( MSG_PANEL_ITEM( _( "NetName" ), msg, RED ) ); /* Display net code : (useful in test or debug) */ - msg.Printf( wxT( "%d.%d" ), GetNet(), GetSubNet() ); + msg.Printf( wxT( "%d.%d" ), GetNetCode(), GetSubNet() ); aList.push_back( MSG_PANEL_ITEM( _( "NetCode" ), msg, RED ) ); } @@ -1576,7 +1567,7 @@ wxString TRACK::GetSelectMenuText() const // disambiguate all the choices under the cursor! if( board ) { - net = board->FindNet( GetNet() ); + net = GetNet(); if( net ) netname = net->GetNetname(); @@ -1591,7 +1582,7 @@ wxString TRACK::GetSelectMenuText() const text.Printf( _("Track %s, net [%s] (%d) on layer %s, length: %s" ), GetChars( ShowWidth() ), GetChars( netname ), - GetNet(), GetChars( GetLayerName() ), + GetNetCode(), GetChars( GetLayerName() ), GetChars( ::LengthDoubleToString( GetLength() ) ) ); return text; diff --git a/pcbnew/class_zone.cpp b/pcbnew/class_zone.cpp index cf5ab48ff7..627d98ac87 100644 --- a/pcbnew/class_zone.cpp +++ b/pcbnew/class_zone.cpp @@ -74,7 +74,7 @@ ZONE_CONTAINER::ZONE_CONTAINER( const ZONE_CONTAINER& aZone ) : BOARD_CONNECTED_ITEM( aZone ) { // Should the copy be on the same net? - SetNet( aZone.GetNet() ); + SetNetCode( aZone.GetNetCode() ); m_Poly = new CPolyLine( *aZone.m_Poly ); // For corner moving, corner index to drag, or -1 if no selection @@ -620,9 +620,9 @@ void ZONE_CONTAINER::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) } else if( IsOnCopperLayer() ) { - if( GetNet() >= 0 ) + if( GetNetCode() >= 0 ) { - NETINFO_ITEM* equipot = board->FindNet( GetNet() ); + NETINFO_ITEM* equipot = GetNet(); if( equipot ) msg = equipot->GetNetname(); @@ -640,7 +640,7 @@ void ZONE_CONTAINER::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) #if 1 // Display net code : (useful in test or debug) - msg.Printf( wxT( "%d" ), GetNet() ); + msg.Printf( wxT( "%d" ), GetNetCode() ); aList.push_back( MSG_PANEL_ITEM( _( "NetCode" ), msg, RED ) ); #endif @@ -801,7 +801,7 @@ void ZONE_CONTAINER::Copy( ZONE_CONTAINER* src ) { m_Parent = src->m_Parent; m_Layer = src->m_Layer; - SetNet( src->GetNet() ); + SetNetCode( src->GetNetCode() ); SetTimeStamp( src->m_TimeStamp ); m_Poly->RemoveAllContours(); m_Poly->Copy( src->m_Poly ); // copy outlines @@ -869,11 +869,11 @@ wxString ZONE_CONTAINER::GetSelectMenuText() const // Display net name for copper zones if( !GetIsKeepout() ) { - if( GetNet() >= 0 ) + if( GetNetCode() >= 0 ) { if( board ) { - net = board->FindNet( GetNet() ); + net = GetNet(); if( net ) { diff --git a/pcbnew/class_zone_settings.cpp b/pcbnew/class_zone_settings.cpp index bdf85dbbd6..b17968123f 100644 --- a/pcbnew/class_zone_settings.cpp +++ b/pcbnew/class_zone_settings.cpp @@ -76,7 +76,7 @@ ZONE_SETTINGS& ZONE_SETTINGS::operator << ( const ZONE_CONTAINER& aSource ) m_FillMode = aSource.GetFillMode(); m_ZoneClearance = aSource.GetClearance(); m_ZoneMinThickness = aSource.GetMinThickness(); - m_NetcodeSelection = aSource.GetNet(); + m_NetcodeSelection = aSource.GetNetCode(); m_CurrentZone_Layer = aSource.GetLayer(); m_Zone_HatchingStyle = aSource.GetHatchStyle(); m_ArcToSegmentsCount = aSource.GetArcSegmentCount(); @@ -113,7 +113,7 @@ void ZONE_SETTINGS::ExportSetting( ZONE_CONTAINER& aTarget, bool aFullExport ) c if( aFullExport ) { aTarget.SetPriority( m_ZonePriority ); - aTarget.SetNet( m_NetcodeSelection ); + aTarget.SetNetCode( m_NetcodeSelection ); aTarget.SetLayer( m_CurrentZone_Layer ); aTarget.Outline()->SetLayer( m_CurrentZone_Layer ); } diff --git a/pcbnew/clean.cpp b/pcbnew/clean.cpp index 2fdd6e9975..8e2f77d506 100644 --- a/pcbnew/clean.cpp +++ b/pcbnew/clean.cpp @@ -323,14 +323,14 @@ bool TRACKS_CLEANER::deleteUnconnectedTracks() zone = m_Brd->HitTestForAnyFilledArea( track->GetStart(), track->GetLayer(), track->GetLayer(), - track->GetNet() ); + track->GetNetCode() ); } else { ((SEGVIA*)track)->ReturnLayerPair( &top_layer, &bottom_layer ); zone = m_Brd->HitTestForAnyFilledArea( track->GetStart(), top_layer, bottom_layer, - track->GetNet() ); + track->GetNetCode() ); } } @@ -359,7 +359,7 @@ bool TRACKS_CLEANER::deleteUnconnectedTracks() zone = m_Brd->HitTestForAnyFilledArea( via->GetStart(), bottom_layer, top_layer, - via->GetNet() ); + via->GetNetCode() ); } if( (other == NULL) && (zone == NULL) ) @@ -383,14 +383,14 @@ bool TRACKS_CLEANER::deleteUnconnectedTracks() zone = m_Brd->HitTestForAnyFilledArea( track->GetEnd(), track->GetLayer(), track->GetLayer(), - track->GetNet() ); + track->GetNetCode() ); } else { ((SEGVIA*)track)->ReturnLayerPair( &top_layer, &bottom_layer ); zone = m_Brd->HitTestForAnyFilledArea( track->GetEnd(), top_layer, bottom_layer, - track->GetNet() ); + track->GetNetCode() ); } } @@ -419,7 +419,7 @@ bool TRACKS_CLEANER::deleteUnconnectedTracks() via->ReturnLayerPair( &top_layer, &bottom_layer ); zone = m_Brd->HitTestForAnyFilledArea( via->GetEnd(), bottom_layer, top_layer, - via->GetNet() ); + via->GetNetCode() ); } if( (other == NULL) && (zone == NULL) ) @@ -479,7 +479,7 @@ bool TRACKS_CLEANER::clean_segments() if( segment->GetLayer() != other->GetLayer() ) continue; - if( segment->GetNet() != other->GetNet() ) + if( segment->GetNetCode() != other->GetNetCode() ) break; if( ( segment->GetStart() == other->GetStart() ) && @@ -748,14 +748,14 @@ bool PCB_EDIT_FRAME::RemoveMisConnectedTracks() if( segment->start && segment->start->Type()==PCB_PAD_T ) { // get the netcode of the pad to propagate. - net_code_s = ((D_PAD*)(segment->start))->GetNet(); + net_code_s = ((D_PAD*)(segment->start))->GetNetCode(); } else { other = segment->GetTrace( GetBoard()->m_Track, NULL, FLG_START ); if( other ) - net_code_s = other->GetNet(); + net_code_s = other->GetNetCode(); } if( net_code_s < 0 ) @@ -766,14 +766,14 @@ bool PCB_EDIT_FRAME::RemoveMisConnectedTracks() if( segment->end && segment->end->Type()==PCB_PAD_T ) { - net_code_e = ((D_PAD*)(segment->end))->GetNet(); + net_code_e = ((D_PAD*)(segment->end))->GetNetCode(); } else { other = segment->GetTrace( GetBoard()->m_Track, NULL, FLG_END ); if( other ) - net_code_e = other->GetNet(); + net_code_e = other->GetNetCode(); } if( net_code_e < 0 ) diff --git a/pcbnew/connect.cpp b/pcbnew/connect.cpp index 1833bd0d65..9fd2c7ad47 100644 --- a/pcbnew/connect.cpp +++ b/pcbnew/connect.cpp @@ -718,7 +718,7 @@ void PCB_BASE_FRAME::TestConnections() for( TRACK* track = m_Pcb->m_Track; track; ) { // At this point, track is the first track of a given net - current_net_code = track->GetNet(); + current_net_code = track->GetNetCode(); // Get last track of the current net TRACK* lastTrack = track->GetEndNetCode( current_net_code ); @@ -760,7 +760,7 @@ void PCB_BASE_FRAME::TestNetConnection( wxDC* aDC, int aNetCode ) for( unsigned i = 0; i < m_Pcb->GetPadCount(); ++i ) { D_PAD* pad = m_Pcb->GetPad(i); - int pad_net_code = pad->GetNet(); + int pad_net_code = pad->GetNetCode(); if( pad_net_code < aNetCode ) continue; @@ -786,7 +786,7 @@ void PCB_BASE_FRAME::TestNetConnection( wxDC* aDC, int aNetCode ) if( firstTrack && lastTrack ) // i.e. if there are segments { - connections.Build_CurrNet_SubNets_Connections( firstTrack, lastTrack, firstTrack->GetNet() ); + connections.Build_CurrNet_SubNets_Connections( firstTrack, lastTrack, firstTrack->GetNetCode() ); } } @@ -842,7 +842,7 @@ void PCB_BASE_FRAME::RecalculateAllTracksNetcode() curr_track->end = NULL; curr_track->SetState( BUSY | IN_EDIT | BEGIN_ONPAD | END_ONPAD, false ); curr_track->SetZoneSubNet( 0 ); - curr_track->SetNet( NETINFO_LIST::UNCONNECTED ); + curr_track->SetNetCode( NETINFO_LIST::UNCONNECTED ); } // If no pad, reset pointers and netcode, and do nothing else @@ -863,7 +863,7 @@ void PCB_BASE_FRAME::RecalculateAllTracksNetcode() for( ; curr_track != NULL; curr_track = curr_track->Next() ) { if( curr_track->m_PadsConnected.size() ) - curr_track->SetNet( curr_track->m_PadsConnected[0]->GetNet() ); + curr_track->SetNetCode( curr_track->m_PadsConnected[0]->GetNetCode() ); } // Pass 2: build connections between track ends @@ -883,17 +883,17 @@ void PCB_BASE_FRAME::RecalculateAllTracksNetcode() for( curr_track = m_Pcb->m_Track; curr_track; curr_track = curr_track->Next() ) { - int netcode = curr_track->GetNet(); + int netcode = curr_track->GetNetCode(); if( netcode == 0 ) { // try to find a connected item having a netcode for( unsigned kk = 0; kk < curr_track->m_TracksConnected.size(); kk++ ) { - int altnetcode = curr_track->m_TracksConnected[kk]->GetNet(); + int altnetcode = curr_track->m_TracksConnected[kk]->GetNetCode(); if( altnetcode ) { new_pass_request = true; netcode = altnetcode; - curr_track->SetNet(netcode); + curr_track->SetNetCode(netcode); break; } } @@ -902,10 +902,10 @@ void PCB_BASE_FRAME::RecalculateAllTracksNetcode() { // propagate this netcode to connected tracks having no netcode for( unsigned kk = 0; kk < curr_track->m_TracksConnected.size(); kk++ ) { - int altnetcode = curr_track->m_TracksConnected[kk]->GetNet(); + int altnetcode = curr_track->m_TracksConnected[kk]->GetNetCode(); if( altnetcode == 0 ) { - curr_track->m_TracksConnected[kk]->SetNet(netcode); + curr_track->m_TracksConnected[kk]->SetNetCode(netcode); new_pass_request = true; } } @@ -926,10 +926,10 @@ void PCB_BASE_FRAME::RecalculateAllTracksNetcode() static bool SortTracksByNetCode( const TRACK* const & ref, const TRACK* const & compare ) { // For items having the same Net, keep the order in list - if( ref->GetNet() == compare->GetNet()) + if( ref->GetNetCode() == compare->GetNetCode()) return ref->m_Param < compare->m_Param; - return ref->GetNet() < compare->GetNet(); + return ref->GetNetCode() < compare->GetNetCode(); } /** diff --git a/pcbnew/cross-probing.cpp b/pcbnew/cross-probing.cpp index d1f41b791f..8042a892a0 100644 --- a/pcbnew/cross-probing.cpp +++ b/pcbnew/cross-probing.cpp @@ -87,7 +87,7 @@ void PCB_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline ) if( pad ) { - netcode = pad->GetNet(); + netcode = pad->GetNetCode(); // put cursor on the pad: pos = pad->GetPosition(); diff --git a/pcbnew/deltrack.cpp b/pcbnew/deltrack.cpp index 2a77f9faec..331fbd22ab 100644 --- a/pcbnew/deltrack.cpp +++ b/pcbnew/deltrack.cpp @@ -120,7 +120,7 @@ TRACK* PCB_EDIT_FRAME::Delete_Segment( wxDC* DC, TRACK* aTrack ) return NULL; } - current_net_code = aTrack->GetNet(); + current_net_code = aTrack->GetNetCode(); DLIST* container = (DLIST*)aTrack->GetList(); wxASSERT( container ); @@ -142,7 +142,7 @@ void PCB_EDIT_FRAME::Delete_Track( wxDC* DC, TRACK* aTrack ) { if( aTrack != NULL ) { - int current_net_code = aTrack->GetNet(); + int current_net_code = aTrack->GetNetCode(); Remove_One_Track( DC, aTrack ); OnModify(); TestNetConnection( DC, current_net_code ); @@ -160,7 +160,7 @@ void PCB_EDIT_FRAME::Delete_net( wxDC* DC, TRACK* aTrack ) PICKED_ITEMS_LIST itemsList; ITEM_PICKER picker( NULL, UR_DELETED ); - int net_code_delete = aTrack->GetNet(); + int net_code_delete = aTrack->GetNetCode(); /* Search the first item for the given net code */ TRACK* trackList = GetBoard()->m_Track->GetStartNetCode( net_code_delete ); @@ -171,7 +171,7 @@ void PCB_EDIT_FRAME::Delete_net( wxDC* DC, TRACK* aTrack ) for( TRACK* segm = trackList; segm; segm = next_track, ++ii ) { next_track = segm->Next(); - if( segm->GetNet() != net_code_delete ) + if( segm->GetNetCode() != net_code_delete ) break; GetBoard()->m_Track.Remove( segm ); @@ -202,7 +202,7 @@ void PCB_EDIT_FRAME::Remove_One_Track( wxDC* DC, TRACK* pt_segm ) if( segments_to_delete_count == 0 ) return; - int net_code = pt_segm->GetNet(); + int net_code = pt_segm->GetNetCode(); PICKED_ITEMS_LIST itemsList; ITEM_PICKER picker( NULL, UR_DELETED ); diff --git a/pcbnew/dialogs/dialog_pad_properties.cpp b/pcbnew/dialogs/dialog_pad_properties.cpp index b280eaf099..73cbbd446b 100644 --- a/pcbnew/dialogs/dialog_pad_properties.cpp +++ b/pcbnew/dialogs/dialog_pad_properties.cpp @@ -812,14 +812,14 @@ void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event ) if( m_currentPad->GetNetname() != m_PadNetNameCtrl->GetValue() ) { - if( !m_PadNetNameCtrl->GetValue().IsEmpty() && m_padMaster.GetNet() == 0 ) + if( !m_PadNetNameCtrl->GetValue().IsEmpty() && m_padMaster.GetNetCode() == 0 ) { DisplayError( NULL, _( "Unknown netname, netname not changed" ) ); } else { rastnestIsChanged = true; - m_currentPad->SetNet( m_padMaster.GetNet() ); + m_currentPad->SetNetCode( m_padMaster.GetNetCode() ); } } @@ -982,9 +982,9 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( D_PAD* aPad ) // Check if user has set an existing net name const NETINFO_ITEM* netinfo = m_board->FindNet( m_PadNetNameCtrl->GetValue() ); if( netinfo != NULL ) - aPad->SetNet( netinfo->GetNet() ); + aPad->SetNetCode( netinfo->GetNet() ); else - aPad->SetNet( 0 ); + aPad->SetNetCode( NETINFO_LIST::UNCONNECTED ); // Clear some values, according to the pad type and shape switch( aPad->GetShape() ) @@ -1032,7 +1032,7 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( D_PAD* aPad ) // no offset, no net name, no pad name allowed aPad->SetOffset( wxPoint( 0, 0 ) ); aPad->SetPadName( wxEmptyString ); - aPad->SetNet( 0 ); + aPad->SetNetCode( NETINFO_LIST::UNCONNECTED ); break; default: diff --git a/pcbnew/dragsegm.cpp b/pcbnew/dragsegm.cpp index 0e0303f860..122d1ea110 100644 --- a/pcbnew/dragsegm.cpp +++ b/pcbnew/dragsegm.cpp @@ -342,7 +342,7 @@ void Collect_TrackSegmentsToDrag( BOARD* aPcb, const wxPoint& aRefPos, LAYER_MSK for( ; track; track = track->Next() ) { - if( track->GetNet() != aNetCode ) // not the same netcodenet code: all candidates tested + if( track->GetNetCode() != aNetCode ) // not the same netcode: all candidates tested break; if( ( aLayerMask & track->GetLayerMask() ) == 0 ) diff --git a/pcbnew/drc.cpp b/pcbnew/drc.cpp index bad9f65fd7..c10f0537b0 100644 --- a/pcbnew/drc.cpp +++ b/pcbnew/drc.cpp @@ -549,7 +549,7 @@ void DRC::testZones() if( !test_area->IsOnCopperLayer() ) continue; - if( test_area->GetNet() < 0 ) + if( test_area->GetNetCode() < 0 ) { m_currentMarker = fillMarker( test_area, DRCE_NON_EXISTANT_NET_FOR_ZONE_OUTLINE, m_currentMarker ); @@ -756,7 +756,7 @@ bool DRC::doPadToPadsDrc( D_PAD* aRefPad, D_PAD** aStart, D_PAD** aEnd, int x_li // The pad must be in a net (i.e pt_pad->GetNet() != 0 ), // But no problem if pads have the same netcode (same net) - if( pad->GetNet() && ( aRefPad->GetNet() == pad->GetNet() ) ) + if( pad->GetNetCode() && ( aRefPad->GetNetCode() == pad->GetNetCode() ) ) continue; // if pads are from the same footprint diff --git a/pcbnew/drc_clearance_test_functions.cpp b/pcbnew/drc_clearance_test_functions.cpp index 1fd8a94ccd..06bc935cd1 100644 --- a/pcbnew/drc_clearance_test_functions.cpp +++ b/pcbnew/drc_clearance_test_functions.cpp @@ -164,7 +164,7 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads ) m_segmAngle = 0; layerMask = aRefSeg->GetLayerMask(); - net_code_ref = aRefSeg->GetNet(); + net_code_ref = aRefSeg->GetNetCode(); // Phase 0 : Test vias if( aRefSeg->Type() == PCB_VIA_T ) @@ -310,8 +310,8 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads ) // The pad must be in a net (i.e pt_pad->GetNet() != 0 ) // but no problem if the pad netcode is the current netcode (same net) - if( pad->GetNet() // the pad must be connected - && net_code_ref == pad->GetNet() ) // the pad net is the same as current net -> Ok + if( pad->GetNetCode() // the pad must be connected + && net_code_ref == pad->GetNetCode() ) // the pad net is the same as current net -> Ok continue; // DRC for the pad @@ -339,7 +339,7 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads ) for( track = aStart; track; track = track->Next() ) { // No problem if segments have the same net code: - if( net_code_ref == track->GetNet() ) + if( net_code_ref == track->GetNetCode() ) continue; // No problem if segment are on different layers : diff --git a/pcbnew/eagle_plugin.cpp b/pcbnew/eagle_plugin.cpp index 078600f081..f8e31fddec 100644 --- a/pcbnew/eagle_plugin.cpp +++ b/pcbnew/eagle_plugin.cpp @@ -1493,7 +1493,7 @@ void EAGLE_PLUGIN::loadPlain( CPTREE& aGraphics ) zone->SetTimeStamp( timeStamp( gr->second ) ); zone->SetLayer( layer ); - zone->SetNet( NETINFO_LIST::UNCONNECTED ); + zone->SetNetCode( NETINFO_LIST::UNCONNECTED ); CPolyLine::HATCH_STYLE outline_hatch = CPolyLine::DIAGONAL_EDGE; @@ -1696,7 +1696,7 @@ void EAGLE_PLUGIN::loadElements( CPTREE& aElements ) if( ni != m_pads_to_nets.end() ) { const ENET* enet = &ni->second; - pad->SetNet( enet->netcode ); + pad->SetNetCode( enet->netcode ); } } @@ -2387,7 +2387,7 @@ void EAGLE_PLUGIN::loadSignals( CPTREE& aSignals ) t->SetWidth( width ); t->SetLayer( layer ); - t->SetNet( netCode ); + t->SetNetCode( netCode ); m_board->m_Track.Insert( t, NULL ); } @@ -2452,7 +2452,7 @@ void EAGLE_PLUGIN::loadSignals( CPTREE& aSignals ) via->SetPosition( pos ); via->SetEnd( pos ); - via->SetNet( netCode ); + via->SetNetCode( netCode ); via->SetShape( S_CIRCLE ); // @todo should be in SEGVIA constructor } @@ -2495,7 +2495,7 @@ void EAGLE_PLUGIN::loadSignals( CPTREE& aSignals ) zone->SetTimeStamp( timeStamp( it->second ) ); zone->SetLayer( layer ); - zone->SetNet( netCode ); + zone->SetNetCode( netCode ); CPolyLine::HATCH_STYLE outline_hatch = CPolyLine::DIAGONAL_EDGE; @@ -2551,7 +2551,7 @@ void EAGLE_PLUGIN::loadSignals( CPTREE& aSignals ) // KiCad does not support an unconnected zone with its own non-zero netcode, // but only when assigned netcode = 0 w/o a name... for( ZONES::iterator it = zones.begin(); it != zones.end(); ++it ) - (*it)->SetNet( NETINFO_LIST::UNCONNECTED ); + (*it)->SetNetCode( NETINFO_LIST::UNCONNECTED ); // therefore omit this signal/net. } diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index e2ccdd8a8f..9356d9787a 100644 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -328,7 +328,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) if( type == PCB_TRACE_T || type == PCB_VIA_T ) { BOARD_CONNECTED_ITEM*item = (BOARD_CONNECTED_ITEM*) GetCurItem(); - DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS dlg( this, item->GetNet() ); + DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS dlg( this, item->GetNetCode() ); dlg.ShowModal(); } @@ -468,11 +468,11 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) break; case ID_POPUP_PCB_LOCK_ON_NET: - Attribut_net( &dc, ( (TRACK*) GetCurItem() )->GetNet(), true ); + Attribut_net( &dc, ( (TRACK*) GetCurItem() )->GetNetCode(), true ); break; case ID_POPUP_PCB_LOCK_OFF_NET: - Attribut_net( &dc, ( (TRACK*) GetCurItem() )->GetNet(), false ); + Attribut_net( &dc, ( (TRACK*) GetCurItem() )->GetNetCode(), false ); break; case ID_POPUP_PCB_SETFLAGS_TRACK_MNU: @@ -486,7 +486,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) { SEGZONE* zsegm = (SEGZONE*) GetCurItem(); - int netcode = zsegm->GetNet(); + int netcode = zsegm->GetNetCode(); Delete_OldZone_Fill( zsegm ); SetCurItem( NULL ); TestNetConnection( NULL, netcode ); @@ -523,7 +523,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) case ID_POPUP_PCB_DELETE_ZONE_CUTOUT: m_canvas->MoveCursorToCrossHair(); { - int netcode = ( (ZONE_CONTAINER*) GetCurItem() )->GetNet(); + int netcode = ( (ZONE_CONTAINER*) GetCurItem() )->GetNetCode(); Delete_Zone_Contour( &dc, (ZONE_CONTAINER*) GetCurItem() ); SetCurItem( NULL ); TestNetConnection( NULL, netcode ); @@ -604,7 +604,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) { ZONE_CONTAINER* zone_container = (ZONE_CONTAINER*) GetCurItem(); zone_container->UnFill(); - TestNetConnection( NULL, zone_container->GetNet() ); + TestNetConnection( NULL, zone_container->GetNetCode() ); OnModify(); SetMsgPanel( GetBoard() ); m_canvas->Refresh(); @@ -633,7 +633,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) case ID_POPUP_PCB_FILL_ZONE: m_canvas->MoveCursorToCrossHair(); Fill_Zone( (ZONE_CONTAINER*) GetCurItem() ); - TestNetConnection( NULL, ( (ZONE_CONTAINER*) GetCurItem() )->GetNet() ); + TestNetConnection( NULL, ( (ZONE_CONTAINER*) GetCurItem() )->GetNetCode() ); SetMsgPanel( GetBoard() ); m_canvas->Refresh(); break; @@ -1156,7 +1156,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) newtrack->Draw( m_canvas, &dc, GR_XOR ); // compute the new ratsnest, because connectivity could change - TestNetConnection( &dc, track->GetNet() ); + TestNetConnection( &dc, track->GetNetCode() ); } break; @@ -1248,7 +1248,7 @@ void PCB_EDIT_FRAME::RemoveStruct( BOARD_ITEM* Item, wxDC* DC ) case PCB_ZONE_AREA_T: { SetCurItem( NULL ); - int netcode = ( (ZONE_CONTAINER*) Item )->GetNet(); + int netcode = ( (ZONE_CONTAINER*) Item )->GetNetCode(); Delete_Zone_Contour( DC, (ZONE_CONTAINER*) Item ); TestNetConnection( NULL, netcode ); SetMsgPanel( GetBoard() ); diff --git a/pcbnew/edit_track_width.cpp b/pcbnew/edit_track_width.cpp index 6698f2be1a..4c2d5e8327 100644 --- a/pcbnew/edit_track_width.cpp +++ b/pcbnew/edit_track_width.cpp @@ -36,7 +36,7 @@ bool PCB_EDIT_FRAME::SetTrackSegmentWidth( TRACK* aTrackItem, NETINFO_ITEM* net = NULL; if( aUseNetclassValue ) - net = GetBoard()->FindNet( aTrackItem->GetNet() ); + net = aTrackItem->GetNet(); initial_width = aTrackItem->GetWidth(); @@ -224,7 +224,7 @@ bool PCB_EDIT_FRAME::Change_Net_Tracks_And_Vias_Sizes( int aNetcode, bool aUseNe for( pt_segm = GetBoard()->m_Track; pt_segm != NULL; pt_segm = pt_segm->Next() ) { - if( aNetcode != pt_segm->GetNet() ) // not in net + if( aNetcode != pt_segm->GetNetCode() ) // not in net continue; // we have found a item member of the net diff --git a/pcbnew/editrack-part2.cpp b/pcbnew/editrack-part2.cpp index 81ba0cbd8b..e394ad1ca3 100644 --- a/pcbnew/editrack-part2.cpp +++ b/pcbnew/editrack-part2.cpp @@ -99,7 +99,7 @@ bool PCB_EDIT_FRAME::Other_Layer_Route( TRACK* aTrack, wxDC* DC ) via->SetFlags( IS_NEW ); via->SetShape( GetDesignSettings().m_CurrentViaType ); via->SetWidth( GetBoard()->GetCurrentViaSize()); - via->SetNet( GetBoard()->GetHighLightNetCode() ); + via->SetNetCode( GetBoard()->GetHighLightNetCode() ); via->SetEnd( g_CurrentTrackSegment->GetEnd() ); via->SetStart( g_CurrentTrackSegment->GetEnd() ); @@ -139,7 +139,7 @@ bool PCB_EDIT_FRAME::Other_Layer_Route( TRACK* aTrack, wxDC* DC ) // else error: will be removed later via->SetLayerPair( first_layer, last_layer ); { - NETINFO_ITEM* net = GetBoard()->FindNet( via->GetNet() ); + NETINFO_ITEM* net = via->GetNet(); via->SetWidth( net->GetMicroViaSize() ); } } @@ -244,7 +244,7 @@ void PCB_EDIT_FRAME::Show_1_Ratsnest( EDA_ITEM* item, wxDC* DC ) { RATSNEST_ITEM* net = &GetBoard()->m_FullRatsnest[ii]; - if( net->GetNet() == pt_pad->GetNet() ) + if( net->GetNet() == pt_pad->GetNetCode() ) { if( ( net->m_Status & CH_VISIBLE ) != 0 ) continue; diff --git a/pcbnew/editrack.cpp b/pcbnew/editrack.cpp index 24223bc8f4..41cc2d7e30 100644 --- a/pcbnew/editrack.cpp +++ b/pcbnew/editrack.cpp @@ -133,12 +133,12 @@ TRACK* PCB_EDIT_FRAME::Begin_Route( TRACK* aTrack, wxDC* aDC ) // A pad is found: put the starting point on pad center pos = pad->GetPosition(); - GetBoard()->SetHighLightNet( pad->GetNet() ); + GetBoard()->SetHighLightNet( pad->GetNetCode() ); } else // A track segment is found { TrackOnStartPoint = (TRACK*) LockPoint; - GetBoard()->SetHighLightNet( TrackOnStartPoint->GetNet() ); + GetBoard()->SetHighLightNet( TrackOnStartPoint->GetNetCode() ); GetBoard()->CreateLockPoint( pos, TrackOnStartPoint, &s_ItemsListPicker ); } } @@ -153,7 +153,7 @@ TRACK* PCB_EDIT_FRAME::Begin_Route( TRACK* aTrack, wxDC* aDC ) -1 ); if( zone ) - GetBoard()->SetHighLightNet( zone->GetNet() ); + GetBoard()->SetHighLightNet( zone->GetNetCode() ); } DBG( g_CurrentTrackList.VerifyListIntegrity() ); @@ -166,7 +166,7 @@ TRACK* PCB_EDIT_FRAME::Begin_Route( TRACK* aTrack, wxDC* aDC ) GetBoard()->DrawHighLight( m_canvas, aDC, GetBoard()->GetHighLightNetCode() ); // Display info about track Net class, and init track and vias sizes: - g_CurrentTrackSegment->SetNet( GetBoard()->GetHighLightNetCode() ); + g_CurrentTrackSegment->SetNetCode( GetBoard()->GetHighLightNetCode() ); GetBoard()->SetCurrentNetClass( g_CurrentTrackSegment->GetNetClassName() ); g_CurrentTrackSegment->SetLayer( GetScreen()->m_Active_Layer ); @@ -476,7 +476,7 @@ bool PCB_EDIT_FRAME::End_Route( TRACK* aTrack, wxDC* aDC ) // g_FirstTrackSegment can be NULL on a double click on the starting point if( g_FirstTrackSegment != NULL ) { - int netcode = g_FirstTrackSegment->GetNet(); + int netcode = g_FirstTrackSegment->GetNetCode(); TRACK* firstTrack = g_FirstTrackSegment; int newCount = g_CurrentTrackList.GetCount(); @@ -540,7 +540,7 @@ bool PCB_EDIT_FRAME::End_Route( TRACK* aTrack, wxDC* aDC ) TRACK* LocateIntrusion( TRACK* listStart, TRACK* aTrack, LAYER_NUM aLayer, const wxPoint& aRef ) { - int net = aTrack->GetNet(); + int net = aTrack->GetNetCode(); int width = aTrack->GetWidth(); TRACK* found = NULL; @@ -555,7 +555,7 @@ TRACK* LocateIntrusion( TRACK* listStart, TRACK* aTrack, LAYER_NUM aLayer, const if( aLayer != track->GetLayer() ) continue; - if( track->GetNet() == net ) + if( track->GetNetCode() == net ) continue; // TRACK::HitTest @@ -614,7 +614,7 @@ static void PushTrack( EDA_DRAW_PANEL* panel ) if( !other ) return; - if( other->GetNet() == track->GetNet() ) + if( other->GetNetCode() == track->GetNetCode() ) return; cv = cursor - other->GetStart(); diff --git a/pcbnew/exporters/export_d356.cpp b/pcbnew/exporters/export_d356.cpp index e8ef8f3fbf..1c64ff64bd 100644 --- a/pcbnew/exporters/export_d356.cpp +++ b/pcbnew/exporters/export_d356.cpp @@ -199,7 +199,7 @@ static void build_via_testpoints( BOARD *aPcb, if( track->Type() == PCB_VIA_T ) { SEGVIA *via = (SEGVIA*) track; - NETINFO_ITEM *net = aPcb->FindNet( track->GetNet() ); + NETINFO_ITEM *net = track->GetNet(); D356_RECORD rk; rk.smd = false; diff --git a/pcbnew/exporters/export_gencad.cpp b/pcbnew/exporters/export_gencad.cpp index 394a39f808..638d22f55d 100644 --- a/pcbnew/exporters/export_gencad.cpp +++ b/pcbnew/exporters/export_gencad.cpp @@ -663,7 +663,7 @@ static void CreateSignalsSection( FILE* aFile, BOARD* aPcb ) { wxString padname; - if( pad->GetNet() != net->GetNet() ) + if( pad->GetNetCode() != net->GetNet() ) continue; pad->ReturnStringPadName( padname ); @@ -730,7 +730,7 @@ static int TrackListSortByNetcode( const void* refptr, const void* objptr ) ref = *( (TRACK**) refptr ); cmp = *( (TRACK**) objptr ); - if( ( diff = ref->GetNet() - cmp->GetNet() ) ) + if( ( diff = ref->GetNetCode() - cmp->GetNetCode() ) ) return diff; if( ( diff = ref->GetWidth() - cmp->GetWidth() ) ) @@ -797,10 +797,10 @@ static void CreateRoutesSection( FILE* aFile, BOARD* aPcb ) { track = tracklist[ii]; - if( old_netcode != track->GetNet() ) + if( old_netcode != track->GetNetCode() ) { - old_netcode = track->GetNet(); - NETINFO_ITEM* net = aPcb->FindNet( track->GetNet() ); + old_netcode = track->GetNetCode(); + NETINFO_ITEM* net = track->GetNet(); wxString netname; if( net && (net->GetNetname() != wxEmptyString) ) diff --git a/pcbnew/highlight.cpp b/pcbnew/highlight.cpp index fc8e805ed1..d4188bdb4d 100644 --- a/pcbnew/highlight.cpp +++ b/pcbnew/highlight.cpp @@ -142,7 +142,7 @@ int PCB_EDIT_FRAME::SelectHighLight( wxDC* DC ) switch( item->Type() ) { case PCB_PAD_T: - netcode = ( (D_PAD*) item )->GetNet(); + netcode = ( (D_PAD*) item )->GetNetCode(); SendMessageToEESCHEMA( item ); break; @@ -151,11 +151,11 @@ int PCB_EDIT_FRAME::SelectHighLight( wxDC* DC ) case PCB_ZONE_T: // since these classes are all derived from TRACK, use a common // GetNet() function: - netcode = ( (TRACK*) item )->GetNet(); + netcode = ( (TRACK*) item )->GetNetCode(); break; case PCB_ZONE_AREA_T: - netcode = ( (ZONE_CONTAINER*) item )->GetNet(); + netcode = ( (ZONE_CONTAINER*) item )->GetNetCode(); break; default: diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index 981b4644db..f8ef4c8d13 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -1230,8 +1230,8 @@ void PCB_IO::format( D_PAD* aPad, int aNestLevel ) const std::string output; // Unconnected pad is default net so don't save it. - if( !(m_ctl & CTL_OMIT_NETS) && aPad->GetNet() != 0 ) - StrPrintf( &output, " (net %d %s)", m_mapping->Translate( aPad->GetNet() ), + if( !(m_ctl & CTL_OMIT_NETS) && aPad->GetNetCode() != 0 ) + StrPrintf( &output, " (net %d %s)", m_mapping->Translate( aPad->GetNetCode() ), m_out->Quotew( aPad->GetNetname() ).c_str() ); if( aPad->GetPadToDieLength() != 0 ) @@ -1389,7 +1389,7 @@ void PCB_IO::format( TRACK* aTrack, int aNestLevel ) const m_out->Print( 0, " (layer %s)", m_out->Quotew( aTrack->GetLayerName() ).c_str() ); } - m_out->Print( 0, " (net %d)", m_mapping->Translate( aTrack->GetNet() ) ); + m_out->Print( 0, " (net %d)", m_mapping->Translate( aTrack->GetNetCode() ) ); if( aTrack->GetTimeStamp() != 0 ) m_out->Print( 0, " (tstamp %lX)", aTrack->GetTimeStamp() ); @@ -1408,7 +1408,7 @@ void PCB_IO::format( ZONE_CONTAINER* aZone, int aNestLevel ) const // so be sure a dummy value is stored, just for ZONE_CONTAINER compatibility // (perhaps netcode and netname should be not stored) m_out->Print( aNestLevel, "(zone (net %d) (net_name %s)", - aZone->GetIsKeepout() ? 0 : m_mapping->Translate( aZone->GetNet() ), + aZone->GetIsKeepout() ? 0 : m_mapping->Translate( aZone->GetNetCode() ), m_out->Quotew( aZone->GetIsKeepout() ? wxT("") : aZone->GetNetname() ).c_str() ); formatLayer( aZone ); diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index 727f635dfd..96c7a75a8f 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -1299,7 +1299,7 @@ void LEGACY_PLUGIN::loadPAD( MODULE* aModule ) char buf[1024]; // can be fairly long int netcode = intParse( line + SZ( "Ne" ), &data ); - pad->SetNet( netcode ); + pad->SetNetCode( netcode ); // read Netname ReadDelimitedText( buf, data, sizeof(buf) ); @@ -2090,7 +2090,7 @@ void LEGACY_PLUGIN::loadTrackList( int aStructType ) ( (SEGVIA*) newTrack )->SetLayerPair( LAYER_N_FRONT, LAYER_N_BACK ); } - newTrack->SetNet( net_code ); + newTrack->SetNetCode( net_code ); newTrack->SetState( flags, true ); } @@ -2240,7 +2240,7 @@ void LEGACY_PLUGIN::loadZONE_CONTAINER() // Init the net code only, not the netname, to be sure // the zone net name is the name read in file. // (When mismatch, the user will be prompted in DRC, to fix the actual name) - zc->BOARD_CONNECTED_ITEM::SetNet( netcode ); + zc->BOARD_CONNECTED_ITEM::SetNetCode( netcode ); } else if( TESTLINE( "ZLayer" ) ) // layer found @@ -2424,7 +2424,7 @@ void LEGACY_PLUGIN::loadZONE_CONTAINER() // Ensure keepout does not have a net // (which have no sense for a keepout zone) if( zc->GetIsKeepout() ) - zc->SetNet( NETINFO_LIST::UNCONNECTED ); + zc->SetNetCode( NETINFO_LIST::UNCONNECTED ); // should always occur, but who knows, a zone without two corners // is no zone at all, it's a spot? @@ -2434,7 +2434,7 @@ void LEGACY_PLUGIN::loadZONE_CONTAINER() if( !zc->IsOnCopperLayer() ) { zc->SetFillMode( 0 ); - zc->SetNet( NETINFO_LIST::UNCONNECTED ); + zc->SetNetCode( NETINFO_LIST::UNCONNECTED ); } // Hatch here, after outlines corners are read @@ -3373,7 +3373,7 @@ void LEGACY_PLUGIN::savePAD( const D_PAD* me ) const fprintf( m_fp, "At %s N %08X\n", texttype, me->GetLayerMask() ); - fprintf( m_fp, "Ne %d %s\n", me->GetNet(), EscapedUTF8( me->GetNetname() ).c_str() ); + fprintf( m_fp, "Ne %d %s\n", me->GetNetCode(), EscapedUTF8( me->GetNetname() ).c_str() ); fprintf( m_fp, "Po %s\n", fmtBIUPoint( me->GetPos0() ).c_str() ); @@ -3633,7 +3633,7 @@ void LEGACY_PLUGIN::saveTRACK( const TRACK* me ) const "-1" : fmtBIU( me->GetDrill() ).c_str() ); fprintf(m_fp, "De %d %d %d %lX %X\n", - me->GetLayer(), type, me->GetNet(), + me->GetLayer(), type, me->GetNetCode(), me->GetTimeStamp(), me->GetStatus() ); } @@ -3647,7 +3647,7 @@ void LEGACY_PLUGIN::saveZONE_CONTAINER( const ZONE_CONTAINER* me ) const // just for ZONE_CONTAINER compatibility fprintf( m_fp, "ZInfo %lX %d %s\n", me->GetTimeStamp(), - me->GetIsKeepout() ? 0 : me->GetNet(), + me->GetIsKeepout() ? 0 : me->GetNetCode(), EscapedUTF8( me->GetIsKeepout() ? wxT("") : me->GetNetname() ).c_str() ); // Save the outline layer info diff --git a/pcbnew/magnetic_tracks_functions.cpp b/pcbnew/magnetic_tracks_functions.cpp index 8f7a8e5064..5c84d0d6d8 100644 --- a/pcbnew/magnetic_tracks_functions.cpp +++ b/pcbnew/magnetic_tracks_functions.cpp @@ -161,7 +161,7 @@ bool Magnetize( PCB_EDIT_FRAME* frame, int aCurrentTool, wxSize aGridSize, if( pad ) { - if( doCheckNet && currTrack && currTrack->GetNet() != pad->GetNet() ) + if( doCheckNet && currTrack && currTrack->GetNetCode() != pad->GetNetCode() ) return false; *curpos = pad->GetPosition(); @@ -180,7 +180,7 @@ bool Magnetize( PCB_EDIT_FRAME* frame, int aCurrentTool, wxSize aGridSize, { if( via != currTrack ) // a via cannot influence itself { - if( !doCheckNet || !currTrack || currTrack->GetNet() == via->GetNet() ) + if( !doCheckNet || !currTrack || currTrack->GetNetCode() == via->GetNetCode() ) { *curpos = via->GetStart(); // D(printf("via hit\n");) @@ -223,7 +223,7 @@ bool Magnetize( PCB_EDIT_FRAME* frame, int aCurrentTool, wxSize aGridSize, if( track->Type() != PCB_TRACE_T ) continue; - if( doCheckNet && currTrack && currTrack->GetNet() != track->GetNet() ) + if( doCheckNet && currTrack && currTrack->GetNetCode() != track->GetNetCode() ) continue; if( m_Pcb->IsLayerVisible( track->GetLayer() ) == false ) diff --git a/pcbnew/move_or_drag_track.cpp b/pcbnew/move_or_drag_track.cpp index 968ea993ec..6525d7abd7 100644 --- a/pcbnew/move_or_drag_track.cpp +++ b/pcbnew/move_or_drag_track.cpp @@ -627,7 +627,7 @@ void PCB_EDIT_FRAME::StartMoveOneNodeOrSegment( TRACK* aTrack, wxDC* aDC, int aC { Collect_TrackSegmentsToDrag( GetBoard(), aTrack->GetStart(), aTrack->GetLayerMask(), - aTrack->GetNet(), aTrack->GetWidth() / 2 ); + aTrack->GetNetCode(), aTrack->GetWidth() / 2 ); } PosInit = aTrack->GetStart(); @@ -647,17 +647,17 @@ void PCB_EDIT_FRAME::StartMoveOneNodeOrSegment( TRACK* aTrack, wxDC* aDC, int aC case ID_POPUP_PCB_DRAG_TRACK_SEGMENT: // drag a segment pos = aTrack->GetStart(); Collect_TrackSegmentsToDrag( GetBoard(), pos, aTrack->GetLayerMask(), - aTrack->GetNet(), aTrack->GetWidth() / 2 ); + aTrack->GetNetCode(), aTrack->GetWidth() / 2 ); pos = aTrack->GetEnd(); aTrack->SetFlags( IS_DRAGGED | ENDPOINT | STARTPOINT ); Collect_TrackSegmentsToDrag( GetBoard(), pos, aTrack->GetLayerMask(), - aTrack->GetNet(), aTrack->GetWidth() / 2 ); + aTrack->GetNetCode(), aTrack->GetWidth() / 2 ); break; case ID_POPUP_PCB_MOVE_TRACK_NODE: // Drag via or move node pos = (diag & STARTPOINT) ? aTrack->GetStart() : aTrack->GetEnd(); Collect_TrackSegmentsToDrag( GetBoard(), pos, aTrack->GetLayerMask(), - aTrack->GetNet(), aTrack->GetWidth() / 2 ); + aTrack->GetNetCode(), aTrack->GetWidth() / 2 ); PosInit = pos; break; } @@ -684,7 +684,7 @@ void PCB_EDIT_FRAME::StartMoveOneNodeOrSegment( TRACK* aTrack, wxDC* aDC, int aC s_LastPos = PosInit; m_canvas->SetMouseCapture( Show_MoveNode, Abort_MoveTrack ); - GetBoard()->SetHighLightNet( aTrack->GetNet() ); + GetBoard()->SetHighLightNet( aTrack->GetNetCode() ); GetBoard()->HighLightON(); GetBoard()->DrawHighLight( m_canvas, aDC, GetBoard()->GetHighLightNetCode() ); @@ -792,7 +792,7 @@ void PCB_EDIT_FRAME::Start_DragTrackSegmentAndKeepSlope( TRACK* track, wxDC* DC s_LastPos = GetCrossHairPosition(); m_canvas->SetMouseCapture( Show_Drag_Track_Segment_With_Cte_Slope, Abort_MoveTrack ); - GetBoard()->SetHighLightNet( track->GetNet() ); + GetBoard()->SetHighLightNet( track->GetNetCode() ); GetBoard()->HighLightON(); GetBoard()->DrawHighLight( m_canvas, DC, GetBoard()->GetHighLightNetCode() ); @@ -828,7 +828,7 @@ bool PCB_EDIT_FRAME::PlaceDraggedOrMovedTrackSegment( TRACK* Track, wxDC* DC ) if( Track == NULL ) return false; - int current_net_code = Track->GetNet(); + int current_net_code = Track->GetNetCode(); // DRC control: if( g_Drc_On ) diff --git a/pcbnew/pad_edition_functions.cpp b/pcbnew/pad_edition_functions.cpp index 3295312f29..50fae272bf 100644 --- a/pcbnew/pad_edition_functions.cpp +++ b/pcbnew/pad_edition_functions.cpp @@ -161,7 +161,7 @@ void PCB_BASE_FRAME::AddPad( MODULE* aModule, bool draw ) // Update the pad properties. Import_Pad_Settings( pad, false ); - pad->SetNet( NETINFO_LIST::UNCONNECTED ); + pad->SetNetCode( NETINFO_LIST::UNCONNECTED ); pad->SetPosition( GetCrossHairPosition() ); diff --git a/pcbnew/pcad2kicadpcb_plugin/pcb_line.cpp b/pcbnew/pcad2kicadpcb_plugin/pcb_line.cpp index ad18b26748..28112177f9 100644 --- a/pcbnew/pcad2kicadpcb_plugin/pcb_line.cpp +++ b/pcbnew/pcad2kicadpcb_plugin/pcb_line.cpp @@ -147,7 +147,7 @@ void PCB_LINE::AddToBoard() track->SetWidth( m_width ); track->SetLayer( m_KiCadLayer ); - track->SetNet( m_netCode ); + track->SetNetCode( m_netCode ); } else { diff --git a/pcbnew/pcad2kicadpcb_plugin/pcb_pad.cpp b/pcbnew/pcad2kicadpcb_plugin/pcb_pad.cpp index 55b50c49a5..4985958fc9 100644 --- a/pcbnew/pcad2kicadpcb_plugin/pcb_pad.cpp +++ b/pcbnew/pcad2kicadpcb_plugin/pcb_pad.cpp @@ -282,7 +282,7 @@ void PCB_PAD::AddToModule( MODULE* aModule, int aRotation, bool aEncapsulatedPad m_board->AppendNet( netinfo ); } - pad->SetNet( netinfo->GetNet() ); + pad->SetNetCode( netinfo->GetNet() ); } if( !aEncapsulatedPad ) @@ -343,7 +343,7 @@ void PCB_PAD::AddToBoard() via->SetDrill( m_hole ); via->SetLayer( m_KiCadLayer ); - via->SetNet( m_netCode ); + via->SetNetCode( m_netCode ); } } else // pad diff --git a/pcbnew/pcad2kicadpcb_plugin/pcb_polygon.cpp b/pcbnew/pcad2kicadpcb_plugin/pcb_polygon.cpp index 5fab0055e8..6d7045fb94 100644 --- a/pcbnew/pcad2kicadpcb_plugin/pcb_polygon.cpp +++ b/pcbnew/pcad2kicadpcb_plugin/pcb_polygon.cpp @@ -171,7 +171,7 @@ void PCB_POLYGON::AddToBoard() zone->SetTimeStamp( m_timestamp ); zone->SetLayer( m_KiCadLayer ); - zone->SetNet( m_netCode ); + zone->SetNetCode( m_netCode ); // add outline int outline_hatch = CPolyLine::DIAGONAL_EDGE; diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index ce9a2cb18b..e3f7c7f7c3 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -152,7 +152,7 @@ const COLOR4D& PCB_RENDER_SETTINGS::GetColor( const VIEW_ITEM* aItem, int aLayer // Try to obtain the netcode for the item const BOARD_CONNECTED_ITEM* item = dynamic_cast( aItem ); if( item ) - netCode = item->GetNet(); + netCode = item->GetNetCode(); } // Return grayish color for non-highlighted layers in the high contrast mode @@ -265,7 +265,7 @@ void PCB_PAINTER::draw( const TRACK* aTrack, int aLayer ) if( m_pcbSettings->m_netNamesOnTracks && IsNetnameLayer( aLayer ) ) { - int netCode = aTrack->GetNet(); + int netCode = aTrack->GetNetCode(); // If there is a net name - display it on the track if( netCode > 0 ) @@ -277,7 +277,7 @@ void PCB_PAINTER::draw( const TRACK* aTrack, int aLayer ) if( length < 10 * width ) return; - NETINFO_ITEM* net = ( (BOARD*) aTrack->GetParent() )->FindNet( netCode ); + NETINFO_ITEM* net = aTrack->GetNet(); if( !net ) return; diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index f68743b741..8ca4bd4cdc 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -2190,9 +2190,9 @@ D_PAD* PCB_PARSER::parseD_PAD( MODULE* aParent ) throw( IO_ERROR, PARSE_ERROR ) break; case T_net: - pad->SetNet( parseInt( "net number" ) ); + pad->SetNetCode( parseInt( "net number" ) ); NeedSYMBOLorNUMBER(); - assert( FromUTF8() == m_board->FindNet( pad->GetNet() )->GetNetname() ); + assert( FromUTF8() == m_board->FindNet( pad->GetNetCode() )->GetNetname() ); NeedRIGHT(); break; @@ -2288,7 +2288,7 @@ TRACK* PCB_PARSER::parseTRACK() throw( IO_ERROR, PARSE_ERROR ) break; case T_net: - track->SetNet( parseInt( "net number" ) ); + track->SetNetCode( parseInt( "net number" ) ); break; case T_tstamp: @@ -2366,7 +2366,7 @@ SEGVIA* PCB_PARSER::parseSEGVIA() throw( IO_ERROR, PARSE_ERROR ) break; case T_net: - via->SetNet( parseInt( "net number" ) ); + via->SetNetCode( parseInt( "net number" ) ); NeedRIGHT(); break; @@ -2418,18 +2418,18 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER() throw( IO_ERROR, PARSE_ERROR ) // Init the net code only, not the netname, to be sure // the zone net name is the name read in file. // (When mismatch, the user will be prompted in DRC, to fix the actual name) - zone->SetNet( parseInt( "net number" ) ); + zone->SetNetCode( parseInt( "net number" ) ); NeedRIGHT(); break; case T_net_name: NeedSYMBOLorNUMBER(); - if( m_board->FindNet( zone->GetNet() )->GetNetname() != FromUTF8() ) + if( zone->GetNet()->GetNetname() != FromUTF8() ) { wxString msg = _( "There is a zone that belongs to a not " "existing net (" ) + FromUTF8() + _("), you should verify it." ); DisplayError( NULL, msg ); - zone->SetNet( NETINFO_LIST::UNCONNECTED ); + zone->SetNetCode( NETINFO_LIST::UNCONNECTED ); } NeedRIGHT(); break; @@ -2694,7 +2694,7 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER() throw( IO_ERROR, PARSE_ERROR ) if( !zone->IsOnCopperLayer() ) { zone->SetFillMode( 0 ); - zone->SetNet( NETINFO_LIST::UNCONNECTED ); + zone->SetNetCode( NETINFO_LIST::UNCONNECTED ); } // Set hatch here, after outlines corners are read @@ -2706,7 +2706,7 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER() throw( IO_ERROR, PARSE_ERROR ) // Ensure keepout does not have a net (which have no sense for a keepout zone) if( zone->GetIsKeepout() ) - zone->SetNet( NETINFO_LIST::UNCONNECTED ); + zone->SetNetCode( NETINFO_LIST::UNCONNECTED ); return zone.release(); } diff --git a/pcbnew/ratsnest.cpp b/pcbnew/ratsnest.cpp index 32dba7213d..028c632568 100644 --- a/pcbnew/ratsnest.cpp +++ b/pcbnew/ratsnest.cpp @@ -74,7 +74,7 @@ void MIN_SPAN_TREE_PADS::AddTreeToRatsnest( std::vector &aRatsnes if( padsBuffer.empty() ) return; - int netcode = padsBuffer[0]->GetNet(); + int netcode = padsBuffer[0]->GetNetCode(); // Note: to get edges in minimum spanning tree, // the index value 0 is not used: it is just // the entry point of the minimum spanning tree. @@ -182,7 +182,7 @@ void PCB_BASE_FRAME::Compile_Ratsnest( wxDC* aDC, bool aDisplayStatus ) */ static bool sortByNetcode( const D_PAD* const & ref, const D_PAD* const & item ) { - return ref->GetNet() < item->GetNet(); + return ref->GetNetCode() < item->GetNetCode(); } @@ -540,7 +540,7 @@ void PCB_BASE_FRAME::build_ratsnest_module( MODULE* aModule ) // collect active pads of the module: for( pad_ref = aModule->Pads(); pad_ref != NULL; pad_ref = pad_ref->Next() ) { - if( pad_ref->GetNet() == NETINFO_LIST::UNCONNECTED ) + if( pad_ref->GetNetCode() == NETINFO_LIST::UNCONNECTED ) continue; localPadList.push_back( pad_ref ); @@ -562,11 +562,11 @@ void PCB_BASE_FRAME::build_ratsnest_module( MODULE* aModule ) { pad_ref = localPadList[ii]; - if( pad_ref->GetNet() == current_net_code ) + if( pad_ref->GetNetCode() == current_net_code ) continue; // A new net was found, load all pads of others modules members of this net: - NETINFO_ITEM* net = m_Pcb->FindNet( pad_ref->GetNet() ); + NETINFO_ITEM* net = pad_ref->GetNet(); if( net == NULL ) //Should not occur { @@ -597,7 +597,7 @@ void PCB_BASE_FRAME::build_ratsnest_module( MODULE* aModule ) * footprint pads it is therefore not time consuming, and it is made only * once */ - current_net_code = localPadList[0]->GetNet(); + current_net_code = localPadList[0]->GetNetCode(); MIN_SPAN_TREE_PADS min_spanning_tree; std::vector padsBuffer; // contains pads of only one net @@ -611,7 +611,7 @@ void PCB_BASE_FRAME::build_ratsnest_module( MODULE* aModule ) if( jj >= pads_module_count ) break; - if( localPadList[jj]->GetNet() != current_net_code ) + if( localPadList[jj]->GetNetCode() != current_net_code ) break; } @@ -623,7 +623,7 @@ void PCB_BASE_FRAME::build_ratsnest_module( MODULE* aModule ) padsBuffer.clear(); ii = jj; if( ii < localPadList.size() ) - current_net_code = localPadList[ii]->GetNet(); + current_net_code = localPadList[ii]->GetNetCode(); } internalRatsCount = m_Pcb->m_LocalRatsnest.size(); @@ -655,13 +655,13 @@ void PCB_BASE_FRAME::build_ratsnest_module( MODULE* aModule ) m_Pcb->m_LocalRatsnest.erase( m_Pcb->m_LocalRatsnest.begin() + internalRatsCount, m_Pcb->m_LocalRatsnest.end() ); - current_net_code = localPadList[0]->GetNet(); + current_net_code = localPadList[0]->GetNetCode(); for( unsigned ii = 0; ii < pads_module_count; ii++ ) { pad_ref = localPadList[ii]; - if( pad_ref->GetNet() != current_net_code ) + if( pad_ref->GetNetCode() != current_net_code ) { // if needed, creates a new ratsnest for the old net if( addRats ) @@ -670,7 +670,7 @@ void PCB_BASE_FRAME::build_ratsnest_module( MODULE* aModule ) } addRats = false; - current_net_code = pad_ref->GetNet(); + current_net_code = pad_ref->GetNetCode(); local_rats.m_Lenght = INT_MAX; } @@ -682,10 +682,10 @@ void PCB_BASE_FRAME::build_ratsnest_module( MODULE* aModule ) pad_externe = localPadList[jj]; // we search pads having the same net code - if( pad_externe->GetNet() < pad_ref->GetNet() ) + if( pad_externe->GetNetCode() < pad_ref->GetNetCode() ) continue; - if( pad_externe->GetNet() > pad_ref->GetNet() ) // pads are sorted by net code + if( pad_externe->GetNetCode() > pad_ref->GetNetCode() ) // pads are sorted by net code break; distance = abs( pad_externe->GetPosition().x - pad_pos.x ) + @@ -695,7 +695,7 @@ void PCB_BASE_FRAME::build_ratsnest_module( MODULE* aModule ) { local_rats.m_PadStart = pad_ref; local_rats.m_PadEnd = pad_externe; - local_rats.SetNet( pad_ref->GetNet() ); + local_rats.SetNet( pad_ref->GetNetCode() ); local_rats.m_Lenght = distance; local_rats.m_Status = 0; @@ -813,7 +813,7 @@ void PCB_BASE_FRAME::BuildAirWiresTargetsList( BOARD_CONNECTED_ITEM* aItemRef, if( aItemRef == NULL ) return; - int net_code = aItemRef->GetNet(); + int net_code = aItemRef->GetNetCode(); int subnet = aItemRef->GetSubNet(); if( net_code <= 0 ) @@ -844,9 +844,9 @@ void PCB_BASE_FRAME::BuildAirWiresTargetsList( BOARD_CONNECTED_ITEM* aItemRef, // current track: for( TRACK* track = m_Pcb->m_Track; track; track = track->Next() ) { - if( track->GetNet() < net_code ) + if( track->GetNetCode() < net_code ) continue; - if( track->GetNet() > net_code ) + if( track->GetNetCode() > net_code ) break;; if( !track->GetSubNet() || (track->GetSubNet() != subnet) ) diff --git a/pcbnew/ratsnest_data.cpp b/pcbnew/ratsnest_data.cpp index 430674887c..201f6b6041 100644 --- a/pcbnew/ratsnest_data.cpp +++ b/pcbnew/ratsnest_data.cpp @@ -709,7 +709,7 @@ void RN_DATA::AddSimple( const BOARD_ITEM* aItem ) if( aItem->IsConnected() ) { const BOARD_CONNECTED_ITEM* item = static_cast( aItem ); - net = item->GetNet(); + net = item->GetNetCode(); if( net < 1 ) // do not process unconnected items return; @@ -739,7 +739,7 @@ void RN_DATA::AddBlocked( const BOARD_ITEM* aItem ) if( aItem->IsConnected() ) { const BOARD_CONNECTED_ITEM* item = static_cast( aItem ); - net = item->GetNet(); + net = item->GetNetCode(); if( net < 1 ) // do not process unconnected items return; @@ -825,7 +825,7 @@ void RN_DATA::Add( const BOARD_ITEM* aItem ) if( aItem->IsConnected() ) { - net = static_cast( aItem )->GetNet(); + net = static_cast( aItem )->GetNetCode(); if( net < 1 ) // do not process unconnected items return; @@ -838,7 +838,7 @@ void RN_DATA::Add( const BOARD_ITEM* aItem ) const MODULE* module = static_cast( aItem ); for( const D_PAD* pad = module->Pads().GetFirst(); pad; pad = pad->Next() ) { - net = pad->GetNet(); + net = pad->GetNetCode(); if( net < 1 ) // do not process unconnected items continue; @@ -884,7 +884,7 @@ void RN_DATA::Remove( const BOARD_ITEM* aItem ) if( aItem->IsConnected() ) { - net = static_cast( aItem )->GetNet(); + net = static_cast( aItem )->GetNetCode(); if( net < 1 ) // do not process unconnected items return; } @@ -893,7 +893,7 @@ void RN_DATA::Remove( const BOARD_ITEM* aItem ) const MODULE* module = static_cast( aItem ); for( const D_PAD* pad = module->Pads().GetFirst(); pad; pad = pad->Next() ) { - net = pad->GetNet(); + net = pad->GetNetCode(); if( net < 1 ) // do not process unconnected items continue; @@ -945,21 +945,21 @@ void RN_DATA::ProcessBoard() for( MODULE* module = m_board->m_Modules; module; module = module->Next() ) { for( D_PAD* pad = module->Pads().GetFirst(); pad; pad = pad->Next() ) - m_nets[pad->GetNet()].AddItem( pad ); + m_nets[pad->GetNetCode()].AddItem( pad ); } for( TRACK* track = m_board->m_Track; track; track = track->Next() ) { if( track->Type() == PCB_VIA_T ) - m_nets[track->GetNet()].AddItem( static_cast( track ) ); + m_nets[track->GetNetCode()].AddItem( static_cast( track ) ); else if( track->Type() == PCB_TRACE_T ) - m_nets[track->GetNet()].AddItem( track ); + m_nets[track->GetNetCode()].AddItem( track ); } for( int i = 0; i < m_board->GetAreaCount(); ++i ) { ZONE_CONTAINER* zone = m_board->GetArea( i ); - m_nets[zone->GetNet()].AddItem( zone ); + m_nets[zone->GetNetCode()].AddItem( zone ); } } diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index b2fed52601..0aef34f903 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -129,7 +129,7 @@ PNS_ITEM* PNS_ROUTER::syncPad( D_PAD* aPad ) PNS_SOLID* solid = new PNS_SOLID; solid->SetLayers( layers ); - solid->SetNet( aPad->GetNet() ); + solid->SetNet( aPad->GetNetCode() ); wxPoint wx_c = aPad->GetPosition(); wxSize wx_sz = aPad->GetSize(); @@ -180,7 +180,7 @@ PNS_ITEM* PNS_ROUTER::syncPad( D_PAD* aPad ) PNS_ITEM* PNS_ROUTER::syncTrack( TRACK* aTrack ) { PNS_SEGMENT* s = - new PNS_SEGMENT( SEG( aTrack->GetStart(), aTrack->GetEnd() ), aTrack->GetNet() ); + new PNS_SEGMENT( SEG( aTrack->GetStart(), aTrack->GetEnd() ), aTrack->GetNetCode() ); s->SetWidth( aTrack->GetWidth() ); s->SetLayers( PNS_LAYERSET( aTrack->GetLayer() ) ); @@ -195,7 +195,7 @@ PNS_ITEM* PNS_ROUTER::syncVia( SEGVIA* aVia ) aVia->GetPosition(), PNS_LAYERSET( 0, 15 ), aVia->GetWidth(), - aVia->GetNet() ); + aVia->GetNetCode() ); v->SetParent( aVia ); return v; @@ -607,7 +607,7 @@ void PNS_ROUTER::commitRouting( PNS_NODE* aNode ) track->SetEnd( wxPoint( s.B.x, s.B.y ) ); track->SetWidth( seg->GetWidth() ); track->SetLayer( seg->GetLayers().Start() ); - track->SetNet( seg->GetNet() ); + track->SetNetCode( seg->GetNet() ); newBI = track; break; } @@ -618,7 +618,7 @@ void PNS_ROUTER::commitRouting( PNS_NODE* aNode ) PNS_VIA* via = static_cast( item ); via_board->SetPosition( wxPoint( via->GetPos().x, via->GetPos().y ) ); via_board->SetWidth( via->GetDiameter() ); - via_board->SetNet( via->GetNet() ); + via_board->SetNetCode( via->GetNet() ); newBI = via_board; break; } diff --git a/pcbnew/specctra_export.cpp b/pcbnew/specctra_export.cpp index 5d1140a181..2ac40ef5af 100644 --- a/pcbnew/specctra_export.cpp +++ b/pcbnew/specctra_export.cpp @@ -692,7 +692,7 @@ IMAGE* SPECCTRA_DB::makeIMAGE( BOARD* aBoard, MODULE* aModule ) pin->pin_id += buf; // append "@1" or "@2", etc. to pin name } - pin->kiNetCode = pad->GetNet(); + pin->kiNetCode = pad->GetNetCode(); image->pins.push_back( pin ); @@ -1922,7 +1922,7 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IO_ERROR ) { TRACK* track = (TRACK*) items[i]; - int netcode = track->GetNet(); + int netcode = track->GetNetCode(); if( netcode == 0 ) continue; @@ -1981,7 +1981,7 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IO_ERROR ) SEGVIA* via = (SEGVIA*) items[i]; wxASSERT( via->Type() == PCB_VIA_T ); - int netcode = via->GetNet(); + int netcode = via->GetNetCode(); if( netcode == 0 ) continue; diff --git a/pcbnew/specctra_import.cpp b/pcbnew/specctra_import.cpp index 9b541d1ed8..06d9a61843 100644 --- a/pcbnew/specctra_import.cpp +++ b/pcbnew/specctra_import.cpp @@ -207,7 +207,7 @@ TRACK* SPECCTRA_DB::makeTRACK( PATH* aPath, int aPointIndex, int aNetcode ) thro track->SetEnd( mapPt( aPath->points[aPointIndex+1], routeResolution ) ); track->SetLayer( pcbLayer2kicad[layerNdx] ); track->SetWidth( scale( aPath->aperture_width, routeResolution ) ); - track->SetNet( aNetcode ); + track->SetNetCode( aNetcode ); return track; } @@ -339,7 +339,7 @@ SEGVIA* SPECCTRA_DB::makeVIA( PADSTACK* aPadstack, const POINT& aPoint, int aNet } if( via ) - via->SetNet( aNetCode ); + via->SetNetCode( aNetCode ); return via; } diff --git a/pcbnew/tr_modif.cpp b/pcbnew/tr_modif.cpp index d4aa7eb5a6..59c0f042fb 100644 --- a/pcbnew/tr_modif.cpp +++ b/pcbnew/tr_modif.cpp @@ -72,7 +72,7 @@ int PCB_EDIT_FRAME::EraseRedundantTrack( wxDC* aDC, wxPoint end; LAYER_MSK startmasklayer, endmasklayer; - int netcode = aNewTrack->GetNet(); + int netcode = aNewTrack->GetNetCode(); /* Reconstruct the complete track (the new track has to start on a segment of track). */ diff --git a/pcbnew/tracepcb.cpp b/pcbnew/tracepcb.cpp index ccd092fcca..06ffe75859 100644 --- a/pcbnew/tracepcb.cpp +++ b/pcbnew/tracepcb.cpp @@ -250,7 +250,7 @@ void BOARD::DrawHighLight( EDA_DRAW_PANEL* am_canvas, wxDC* DC, int aNetCode ) for( BOARD::ZONE_CONTAINERS::iterator zc = zones.begin(); zc!=zones.end(); ++zc ) { - if( (*zc)->GetNet() == aNetCode ) + if( (*zc)->GetNetCode() == aNetCode ) { (*zc)->Draw( am_canvas, DC, draw_mode ); } @@ -261,7 +261,7 @@ void BOARD::DrawHighLight( EDA_DRAW_PANEL* am_canvas, wxDC* DC, int aNetCode ) { for( D_PAD* pad = module->Pads(); pad; pad = pad->Next() ) { - if( pad->GetNet() == aNetCode ) + if( pad->GetNetCode() == aNetCode ) { pad->Draw( am_canvas, DC, draw_mode ); } @@ -271,7 +271,7 @@ void BOARD::DrawHighLight( EDA_DRAW_PANEL* am_canvas, wxDC* DC, int aNetCode ) // Redraw track and vias that have aNetCode for( TRACK* seg = m_Track; seg; seg = seg->Next() ) { - if( seg->GetNet() == aNetCode ) + if( seg->GetNetCode() == aNetCode ) { seg->Draw( am_canvas, DC, draw_mode ); } diff --git a/pcbnew/xchgmod.cpp b/pcbnew/xchgmod.cpp index 40fde81e06..74b5a58e0c 100644 --- a/pcbnew/xchgmod.cpp +++ b/pcbnew/xchgmod.cpp @@ -455,13 +455,13 @@ void PCB_EDIT_FRAME::Exchange_Module( MODULE* aOldModule, // Update pad netnames ( when possible) for( D_PAD* pad = aNewModule->Pads(); pad != NULL; pad = pad->Next() ) { - pad->SetNet( NETINFO_LIST::UNCONNECTED ); + pad->SetNetCode( NETINFO_LIST::UNCONNECTED ); D_PAD* old_pad = aOldModule->Pads(); for( ; old_pad != NULL; old_pad = old_pad->Next() ) { if( pad->PadNameEqual( old_pad ) ) - pad->SetNet( old_pad->GetNet() ); + pad->SetNetCode( old_pad->GetNetCode() ); } } diff --git a/pcbnew/zones_by_polygon.cpp b/pcbnew/zones_by_polygon.cpp index 9eddd5f7bb..838bf67bb7 100644 --- a/pcbnew/zones_by_polygon.cpp +++ b/pcbnew/zones_by_polygon.cpp @@ -130,7 +130,7 @@ void PCB_EDIT_FRAME::duplicateZone( wxDC* aDC, ZONE_CONTAINER* aZone ) s_AuxiliaryList.ClearListAndDeleteItems(); s_PickedList.ClearListAndDeleteItems(); - SaveCopyOfZones( s_PickedList, GetBoard(), newZone->GetNet(), newZone->GetLayer() ); + SaveCopyOfZones( s_PickedList, GetBoard(), newZone->GetNetCode(), newZone->GetLayer() ); GetBoard()->Add( newZone ); ITEM_PICKER picker( newZone, UR_NEW ); @@ -227,10 +227,10 @@ void PCB_EDIT_FRAME::Start_Move_Zone_Corner( wxDC* DC, ZONE_CONTAINER* aZone, } ZONE_SETTINGS zoneInfo = GetZoneSettings(); - zoneInfo.m_NetcodeSelection = aZone->GetNet(); + zoneInfo.m_NetcodeSelection = aZone->GetNetCode(); SetZoneSettings( zoneInfo ); - GetBoard()->SetHighLightNet( aZone->GetNet() ); + GetBoard()->SetHighLightNet( aZone->GetNetCode() ); if( DC ) HighLight( DC ); @@ -248,8 +248,7 @@ void PCB_EDIT_FRAME::Start_Move_Zone_Corner( wxDC* DC, ZONE_CONTAINER* aZone, s_AuxiliaryList.ClearListAndDeleteItems(); s_PickedList.ClearListAndDeleteItems(); - SaveCopyOfZones( s_PickedList, GetBoard(), aZone->GetNet(), - aZone->GetLayer() ); + SaveCopyOfZones( s_PickedList, GetBoard(), aZone->GetNetCode(), aZone->GetLayer() ); if ( IsNewCorner ) aZone->Outline()->InsertCorner(corner_id-1, cx, cy ); @@ -278,8 +277,7 @@ void PCB_EDIT_FRAME::Start_Move_Zone_Drag_Outline_Edge( wxDC* DC, s_PickedList.ClearListAndDeleteItems(); s_AuxiliaryList.ClearListAndDeleteItems(); - SaveCopyOfZones( s_PickedList, GetBoard(), aZone->GetNet(), - aZone->GetLayer() ); + SaveCopyOfZones( s_PickedList, GetBoard(), aZone->GetNetCode(), aZone->GetLayer() ); } @@ -294,17 +292,16 @@ void PCB_EDIT_FRAME::Start_Move_Zone_Outlines( wxDC* DC, ZONE_CONTAINER* aZone ) } ZONE_SETTINGS zoneInfo = GetZoneSettings(); - zoneInfo.m_NetcodeSelection = aZone->GetNet(); + zoneInfo.m_NetcodeSelection = aZone->GetNetCode(); SetZoneSettings( zoneInfo ); - GetBoard()->SetHighLightNet( aZone->GetNet() ); + GetBoard()->SetHighLightNet( aZone->GetNetCode() ); HighLight( DC ); } s_PickedList.ClearListAndDeleteItems(); s_AuxiliaryList.ClearListAndDeleteItems(); - SaveCopyOfZones( s_PickedList, GetBoard(), aZone->GetNet(), - aZone->GetLayer() ); + SaveCopyOfZones( s_PickedList, GetBoard(), aZone->GetNetCode(), aZone->GetLayer() ); aZone->SetFlags( IS_MOVED ); m_canvas->SetMouseCapture( Show_Zone_Corner_Or_Outline_While_Move_Mouse, @@ -382,7 +379,7 @@ void PCB_EDIT_FRAME::Remove_Zone_Corner( wxDC* DC, ZONE_CONTAINER* aZone ) s_AuxiliaryList.ClearListAndDeleteItems(); s_PickedList. ClearListAndDeleteItems(); - SaveCopyOfZones( s_PickedList, GetBoard(), aZone->GetNet(), aZone->GetLayer() ); + SaveCopyOfZones( s_PickedList, GetBoard(), aZone->GetNetCode(), aZone->GetLayer() ); aZone->Outline()->DeleteCorner( aZone->GetSelectedCorner() ); // modify zones outlines according to the new aZone shape @@ -549,7 +546,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC ) { zoneInfo.m_NetcodeSelection = GetBoard()->GetHighLightNetCode(); - zone->SetNet( zoneInfo.m_NetcodeSelection ); + zone->SetNetCode( zoneInfo.m_NetcodeSelection ); } double tmp = ZONE_THERMAL_RELIEF_GAP_MIL; wxGetApp().GetSettings()->Read( ZONE_THERMAL_RELIEF_GAP_STRING_KEY, &tmp ); @@ -577,7 +574,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC ) zoneInfo.SetIsKeepout( true ); // Netcode and netname are irrelevant, // so ensure they are cleared - zone->SetNet( NETINFO_LIST::UNCONNECTED ); + zone->SetNetCode( NETINFO_LIST::UNCONNECTED ); edited = InvokeKeepoutAreaEditor( this, &zoneInfo ); } else @@ -623,7 +620,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC ) { if( s_CurrentZone ) { - zoneInfo.m_NetcodeSelection = s_CurrentZone->GetNet(); + zoneInfo.m_NetcodeSelection = s_CurrentZone->GetNetCode(); GetBoard()->SetZoneSettings( zoneInfo ); } @@ -744,7 +741,7 @@ bool PCB_EDIT_FRAME::End_Zone( wxDC* DC ) // Save initial zones configuration, for undo/redo, before adding new zone s_AuxiliaryList.ClearListAndDeleteItems(); s_PickedList.ClearListAndDeleteItems(); - SaveCopyOfZones(s_PickedList, GetBoard(), zone->GetNet(), zone->GetLayer() ); + SaveCopyOfZones(s_PickedList, GetBoard(), zone->GetNetCode(), zone->GetLayer() ); // Put new zone in list if( !s_CurrentZone ) @@ -902,7 +899,7 @@ void PCB_EDIT_FRAME::Edit_Zone_Params( wxDC* DC, ZONE_CONTAINER* aZone ) NETINFO_ITEM* net = GetBoard()->FindNet( zoneInfo.m_NetcodeSelection ); if( net ) // net == NULL should not occur - aZone->SetNet( net->GetNet() ); + aZone->SetNetCode( net->GetNet() ); // Combine zones if possible GetBoard()->OnAreaPolygonModified( &s_AuxiliaryList, aZone ); diff --git a/pcbnew/zones_by_polygon_fill_functions.cpp b/pcbnew/zones_by_polygon_fill_functions.cpp index 73ca2a8217..3146786a6b 100644 --- a/pcbnew/zones_by_polygon_fill_functions.cpp +++ b/pcbnew/zones_by_polygon_fill_functions.cpp @@ -100,7 +100,7 @@ int PCB_EDIT_FRAME::Fill_Zone( ZONE_CONTAINER* aZone ) // Shows the net ZONE_SETTINGS zoneInfo = GetZoneSettings(); - zoneInfo.m_NetcodeSelection = aZone->GetNet(); + zoneInfo.m_NetcodeSelection = aZone->GetNetCode(); SetZoneSettings( zoneInfo ); msg = aZone->GetNetname(); diff --git a/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp b/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp index eaef234893..c51da1fc1c 100644 --- a/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp +++ b/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp @@ -228,7 +228,7 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb ) pad = &dummypad; } - if( pad->GetNet() != GetNet() ) + if( pad->GetNetCode() != GetNetCode() ) { item_clearance = pad->GetClearance() + margin; item_boundingbox = pad->GetBoundingBox(); @@ -249,7 +249,7 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb ) int gap = zone_clearance; if( ( GetPadConnection( pad ) == PAD_NOT_IN_ZONE ) - || ( GetNet() == 0 ) || ( pad->GetShape() == PAD_TRAPEZOID ) ) + || ( GetNetCode() == 0 ) || ( pad->GetShape() == PAD_TRAPEZOID ) ) // PAD_TRAPEZOID shapes are not in zones because they are used in microwave apps // and i think it is good that shapes are not changed by thermal pads or others @@ -275,7 +275,7 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb ) if( !track->IsOnLayer( GetLayer() ) ) continue; - if( track->GetNet() == GetNet() && (GetNet() != 0) ) + if( track->GetNetCode() == GetNetCode() && (GetNetCode() != 0) ) continue; item_clearance = track->GetClearance() + margin; @@ -363,7 +363,7 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb ) // do not add clearance. // the zone will be connected to the current zone, but filled areas // will use different parameters (clearance, thermal shapes ) - bool addclearance = GetNet() != zone->GetNet(); + bool addclearance = GetNetCode() != zone->GetNetCode(); int clearance = zone_clearance; if( zone->GetIsKeepout() ) @@ -394,7 +394,7 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb ) if( !pad->IsOnLayer( GetLayer() ) ) continue; - if( pad->GetNet() != GetNet() ) + if( pad->GetNetCode() != GetNetCode() ) continue; item_boundingbox = pad->GetBoundingBox(); int thermalGap = GetThermalReliefGap( pad ); @@ -428,7 +428,7 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb ) CopyPolygonsFromKiPolygonListToFilledPolysList( polyset_zone_solid_areas ); // Remove insulated islands: - if( GetNet() > 0 ) + if( GetNetCode() > 0 ) TestForCopperIslandAndRemoveInsulatedIslands( aPcb ); // Now we remove all unused thermal stubs. @@ -436,7 +436,7 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb ) // Test thermal stubs connections and add polygons to remove unconnected stubs. // (this is a refinement for thermal relief shapes) - if( GetNet() > 0 ) + if( GetNetCode() > 0 ) BuildUnconnectedThermalStubsPolygonList( cornerBufferPolysToSubstract, aPcb, this, s_Correction, s_thermalRot ); @@ -453,7 +453,7 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb ) m_FilledPolysList.RemoveAllContours(); CopyPolygonsFromKiPolygonListToFilledPolysList( polyset_zone_solid_areas ); - if( GetNet() > 0 ) + if( GetNetCode() > 0 ) TestForCopperIslandAndRemoveInsulatedIslands( aPcb ); } diff --git a/pcbnew/zones_convert_to_polygons_aux_functions.cpp b/pcbnew/zones_convert_to_polygons_aux_functions.cpp index f570ebdd4b..16549b2ed4 100644 --- a/pcbnew/zones_convert_to_polygons_aux_functions.cpp +++ b/pcbnew/zones_convert_to_polygons_aux_functions.cpp @@ -162,7 +162,7 @@ void BuildUnconnectedThermalStubsPolygonList( CPOLYGONS_LIST& aCornerBuffer, if( !pad->IsOnLayer( aZone->GetLayer() ) ) continue; - if( pad->GetNet() != aZone->GetNet() ) + if( pad->GetNetCode() != aZone->GetNetCode() ) continue; // Calculate thermal bridge half width diff --git a/pcbnew/zones_functions_for_undo_redo.cpp b/pcbnew/zones_functions_for_undo_redo.cpp index 8abd5b6306..5710937208 100644 --- a/pcbnew/zones_functions_for_undo_redo.cpp +++ b/pcbnew/zones_functions_for_undo_redo.cpp @@ -67,7 +67,7 @@ bool ZONE_CONTAINER::IsSame( const ZONE_CONTAINER& aZoneToCompare ) if( GetLayer() != aZoneToCompare.GetLayer() ) return false; - if( GetNet() != aZoneToCompare.GetNet() ) + if( GetNetCode() != aZoneToCompare.GetNetCode() ) return false; if( GetPriority() != aZoneToCompare.GetPriority() ) @@ -146,7 +146,7 @@ int SaveCopyOfZones( PICKED_ITEMS_LIST& aPickList, BOARD* aPcb, int aNetCode, LA if( zone == NULL ) // End of list break; - if( aNetCode >= 0 && aNetCode != zone->GetNet() ) + if( aNetCode >= 0 && aNetCode != zone->GetNetCode() ) continue; if( aLayer >= 0 && aLayer != zone->GetLayer() ) diff --git a/pcbnew/zones_polygons_insulated_copper_islands.cpp b/pcbnew/zones_polygons_insulated_copper_islands.cpp index c2154ae5dc..5e72a64497 100644 --- a/pcbnew/zones_polygons_insulated_copper_islands.cpp +++ b/pcbnew/zones_polygons_insulated_copper_islands.cpp @@ -54,7 +54,7 @@ void ZONE_CONTAINER::TestForCopperIslandAndRemoveInsulatedIslands( BOARD* aPcb ) if( !pad->IsOnLayer( GetLayer() ) ) continue; - if( pad->GetNet() != GetNet() ) + if( pad->GetNetCode() != GetNetCode() ) continue; listPointsCandidates.push_back( pad->GetPosition() ); @@ -66,7 +66,7 @@ void ZONE_CONTAINER::TestForCopperIslandAndRemoveInsulatedIslands( BOARD* aPcb ) if( !track->IsOnLayer( GetLayer() ) ) continue; - if( track->GetNet() != GetNet() ) + if( track->GetNetCode() != GetNetCode() ) continue; listPointsCandidates.push_back( track->GetStart() ); diff --git a/pcbnew/zones_polygons_test_connections.cpp b/pcbnew/zones_polygons_test_connections.cpp index ccc91634e2..fd277f2a63 100644 --- a/pcbnew/zones_polygons_test_connections.cpp +++ b/pcbnew/zones_polygons_test_connections.cpp @@ -50,11 +50,11 @@ void Merge_SubNets_Connected_By_CopperAreas( BOARD* aPcb, int aNetcode ); // zone size = size of the m_FilledPolysList buffer bool sort_areas( const ZONE_CONTAINER* ref, const ZONE_CONTAINER* tst ) { - if( ref->GetNet() == tst->GetNet() ) + if( ref->GetNetCode() == tst->GetNetCode() ) return ref->GetFilledPolysList().GetCornersCount() < tst->GetFilledPolysList().GetCornersCount(); else - return ref->GetNet() < tst->GetNet(); + return ref->GetNetCode() < tst->GetNetCode(); } /** @@ -72,14 +72,14 @@ void BOARD::Test_Connections_To_Copper_Areas( int aNetcode ) for( MODULE* module = m_Modules; module; module = module->Next() ) { for( D_PAD* pad = module->Pads(); pad != NULL; pad = pad->Next() ) - if( (aNetcode < 0) || ( aNetcode == pad->GetNet() ) ) + if( (aNetcode < 0) || ( aNetcode == pad->GetNetCode() ) ) pad->SetZoneSubNet( 0 ); } // clear .m_ZoneSubnet parameter for tracks and vias for( TRACK* track = m_Track; track; track = track->Next() ) { - if( (aNetcode < 0) || ( aNetcode == track->GetNet() ) ) + if( (aNetcode < 0) || ( aNetcode == track->GetNetCode() ) ) track->SetZoneSubNet( 0 ); } @@ -93,7 +93,7 @@ void BOARD::Test_Connections_To_Copper_Areas( int aNetcode ) ZONE_CONTAINER* curr_zone = GetArea( index ); if( !curr_zone->IsOnCopperLayer() ) continue; - if( (aNetcode >= 0) && ( aNetcode != curr_zone->GetNet() ) ) + if( (aNetcode >= 0) && ( aNetcode != curr_zone->GetNetCode() ) ) continue; if( curr_zone->GetFilledPolysList().GetCornersCount() == 0 ) continue; @@ -112,7 +112,7 @@ void BOARD::Test_Connections_To_Copper_Areas( int aNetcode ) { ZONE_CONTAINER* curr_zone = zones_candidates[idx]; - int netcode = curr_zone->GetNet(); + int netcode = curr_zone->GetNetCode(); // Build a list of candidates connected to the net: // At this point, layers are not considered, because areas on different layers can @@ -136,7 +136,7 @@ void BOARD::Test_Connections_To_Copper_Areas( int aNetcode ) TRACK* track = m_Track.GetFirst()->GetStartNetCode( netcode ); for( ; track; track = track->Next() ) { - if( track->GetNet() != netcode ) + if( track->GetNetCode() != netcode ) break; candidates.push_back( track ); } @@ -255,10 +255,10 @@ void Merge_SubNets_Connected_By_CopperAreas( BOARD* aPcb ) if ( ! curr_zone->IsOnCopperLayer() ) continue; - if ( curr_zone->GetNet() <= 0 ) + if ( curr_zone->GetNetCode() <= 0 ) continue; - Merge_SubNets_Connected_By_CopperAreas( aPcb, curr_zone->GetNet() ); + Merge_SubNets_Connected_By_CopperAreas( aPcb, curr_zone->GetNetCode() ); } } @@ -284,7 +284,7 @@ void Merge_SubNets_Connected_By_CopperAreas( BOARD* aPcb, int aNetcode ) { ZONE_CONTAINER* curr_zone = aPcb->GetArea( index ); - if( aNetcode == curr_zone->GetNet() ) + if( aNetcode == curr_zone->GetNetCode() ) { found = true; break; @@ -311,7 +311,7 @@ void Merge_SubNets_Connected_By_CopperAreas( BOARD* aPcb, int aNetcode ) track = aPcb->m_Track.GetFirst()->GetStartNetCode( aNetcode ); for( ; track; track = track->Next() ) { - if( track->GetNet() != aNetcode ) + if( track->GetNetCode() != aNetcode ) break; Candidates.push_back( track ); } diff --git a/pcbnew/zones_test_and_combine_areas.cpp b/pcbnew/zones_test_and_combine_areas.cpp index 362d469daa..b35c1be122 100644 --- a/pcbnew/zones_test_and_combine_areas.cpp +++ b/pcbnew/zones_test_and_combine_areas.cpp @@ -59,7 +59,7 @@ bool BOARD::OnAreaPolygonModified( PICKED_ITEMS_LIST* aModifiedZonesList, if( bCheckAllAreas ) { modified = true; - CombineAllAreasInNet( aModifiedZonesList, modified_area->GetNet(), true ); + CombineAllAreasInNet( aModifiedZonesList, modified_area->GetNetCode(), true ); } if( !IsCopperLayer( layer ) ) // Refill non copper zones on this layer @@ -98,7 +98,7 @@ bool BOARD::CombineAllAreasInNet( PICKED_ITEMS_LIST* aDeletedList, int aNetCode, { ZONE_CONTAINER* curr_area = m_ZoneDescriptorList[ia1]; - if( curr_area->GetNet() != aNetCode ) + if( curr_area->GetNetCode() != aNetCode ) continue; // legal polygon @@ -109,7 +109,7 @@ bool BOARD::CombineAllAreasInNet( PICKED_ITEMS_LIST* aDeletedList, int aNetCode, { ZONE_CONTAINER* area2 = m_ZoneDescriptorList[ia2]; - if( area2->GetNet() != aNetCode ) + if( area2->GetNetCode() != aNetCode ) continue; if( curr_area->GetPriority() != area2->GetPriority() ) @@ -158,7 +158,7 @@ bool BOARD::TestAreaIntersections( ZONE_CONTAINER* area_to_test ) { ZONE_CONTAINER* area2 = m_ZoneDescriptorList[ia2]; - if( area_to_test->GetNet() != area2->GetNet() ) + if( area_to_test->GetNetCode() != area2->GetNetCode() ) continue; if( area_to_test == area2 ) @@ -390,7 +390,7 @@ int BOARD::Test_Drc_Areas_Outlines_To_Areas_Outlines( ZONE_CONTAINER* aArea_To_E continue; // Test for same net - if( Area_Ref->GetNet() == area_to_test->GetNet() && Area_Ref->GetNet() >= 0 ) + if( Area_Ref->GetNetCode() == area_to_test->GetNetCode() && Area_Ref->GetNetCode() >= 0 ) continue; // test for different priorities @@ -586,7 +586,7 @@ bool DRC::doEdgeZoneDrc( ZONE_CONTAINER* aArea, int aCornerIndex ) continue; // Test for same net - if( ( aArea->GetNet() == area_to_test->GetNet() ) && (aArea->GetNet() >= 0) ) + if( ( aArea->GetNetCode() == area_to_test->GetNetCode() ) && (aArea->GetNetCode() >= 0) ) continue; // test for same priority From f7d00a393bb848ef1ab67b67ad6e18d160cb4002 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 25 Feb 2014 11:47:27 +0100 Subject: [PATCH 132/741] Renamed BOARD_CONNECTED_ITEM::GetNet() -> GetNetCode() Renamed BOARD_CONNECTED_ITEM::SetNet() -> SetNetCode() Added BOARD_CONNECTED_ITEM::GetNet() for accessing NETINFO_ITEM* of a given item. Fixed module editor crash when launched to edit a module from a PCB. Replaced some BOARD::FindNet( item->GetNet() ) calls with BOARD_CONNECTED_ITEM::GetNet(). --- pcbnew/attribut.cpp | 4 +- pcbnew/autorouter/auto_place_footprints.cpp | 2 +- pcbnew/autorouter/autorout.cpp | 2 +- pcbnew/autorouter/routing_matrix.cpp | 10 ++--- pcbnew/autorouter/solve.cpp | 6 +-- pcbnew/class_board.cpp | 32 +++++-------- pcbnew/class_board_connected_item.cpp | 19 ++++---- pcbnew/class_board_connected_item.h | 41 ++++++++++------- pcbnew/class_netinfo.h | 2 +- pcbnew/class_netinfo_item.cpp | 9 ++-- pcbnew/class_netinfolist.cpp | 20 +++++---- pcbnew/class_pad.cpp | 4 +- pcbnew/class_pad_draw_functions.cpp | 2 +- pcbnew/class_track.cpp | 45 ++++++++----------- pcbnew/class_zone.cpp | 14 +++--- pcbnew/class_zone_settings.cpp | 4 +- pcbnew/clean.cpp | 22 ++++----- pcbnew/connect.cpp | 24 +++++----- pcbnew/cross-probing.cpp | 2 +- pcbnew/deltrack.cpp | 10 ++--- pcbnew/dialogs/dialog_pad_properties.cpp | 10 ++--- pcbnew/dragsegm.cpp | 2 +- pcbnew/drc.cpp | 4 +- pcbnew/drc_clearance_test_functions.cpp | 8 ++-- pcbnew/eagle_plugin.cpp | 12 ++--- pcbnew/edit.cpp | 18 ++++---- pcbnew/edit_track_width.cpp | 4 +- pcbnew/editrack-part2.cpp | 6 +-- pcbnew/editrack.cpp | 16 +++---- pcbnew/exporters/export_d356.cpp | 2 +- pcbnew/exporters/export_gencad.cpp | 10 ++--- pcbnew/highlight.cpp | 6 +-- pcbnew/kicad_plugin.cpp | 8 ++-- pcbnew/legacy_plugin.cpp | 16 +++---- pcbnew/magnetic_tracks_functions.cpp | 6 +-- pcbnew/move_or_drag_track.cpp | 14 +++--- pcbnew/pad_edition_functions.cpp | 2 +- pcbnew/pcad2kicadpcb_plugin/pcb_line.cpp | 2 +- pcbnew/pcad2kicadpcb_plugin/pcb_pad.cpp | 4 +- pcbnew/pcad2kicadpcb_plugin/pcb_polygon.cpp | 2 +- pcbnew/pcb_painter.cpp | 5 +-- pcbnew/pcb_parser.cpp | 18 ++++---- pcbnew/ratsnest.cpp | 34 +++++++------- pcbnew/ratsnest_data.cpp | 20 ++++----- pcbnew/router/pns_router.cpp | 10 ++--- pcbnew/specctra_export.cpp | 6 +-- pcbnew/specctra_import.cpp | 4 +- pcbnew/tr_modif.cpp | 2 +- pcbnew/tracepcb.cpp | 6 +-- pcbnew/xchgmod.cpp | 4 +- pcbnew/zones_by_polygon.cpp | 31 ++++++------- pcbnew/zones_by_polygon_fill_functions.cpp | 2 +- ...nvert_brd_items_to_polygons_with_Boost.cpp | 16 +++---- ...ones_convert_to_polygons_aux_functions.cpp | 2 +- pcbnew/zones_functions_for_undo_redo.cpp | 4 +- ...ones_polygons_insulated_copper_islands.cpp | 4 +- pcbnew/zones_polygons_test_connections.cpp | 22 ++++----- pcbnew/zones_test_and_combine_areas.cpp | 12 ++--- 58 files changed, 309 insertions(+), 319 deletions(-) diff --git a/pcbnew/attribut.cpp b/pcbnew/attribut.cpp index 2bc380abf1..c56f09da24 100644 --- a/pcbnew/attribut.cpp +++ b/pcbnew/attribut.cpp @@ -103,7 +103,7 @@ void PCB_EDIT_FRAME::Attribut_net( wxDC* DC, int net_code, bool Flag_On ) { for( ; Track != NULL; Track = Track->Next() ) { - if( net_code == Track->GetNet() ) + if( net_code == Track->GetNetCode() ) break; } } @@ -112,7 +112,7 @@ void PCB_EDIT_FRAME::Attribut_net( wxDC* DC, int net_code, bool Flag_On ) while( Track ) /* Flag change */ { - if( (net_code >= 0 ) && (net_code != Track->GetNet()) ) + if( ( net_code >= 0 ) && ( net_code != Track->GetNetCode() ) ) break; OnModify(); diff --git a/pcbnew/autorouter/auto_place_footprints.cpp b/pcbnew/autorouter/auto_place_footprints.cpp index 7322f5690b..0351c43bd1 100644 --- a/pcbnew/autorouter/auto_place_footprints.cpp +++ b/pcbnew/autorouter/auto_place_footprints.cpp @@ -499,7 +499,7 @@ int genPlacementRoutingMatrix( BOARD* aBrd, EDA_MSG_PANEL* messagePanel ) TRACK TmpSegm( NULL ); TmpSegm.SetLayer( UNDEFINED_LAYER ); - TmpSegm.SetNet( -1 ); + TmpSegm.SetNetCode( -1 ); TmpSegm.SetWidth( RoutingMatrix.m_GridRouting / 2 ); EDA_ITEM* PtStruct = aBrd->m_Drawings; diff --git a/pcbnew/autorouter/autorout.cpp b/pcbnew/autorouter/autorout.cpp index b0dc59b0b7..88f2e12e6e 100644 --- a/pcbnew/autorouter/autorout.cpp +++ b/pcbnew/autorouter/autorout.cpp @@ -78,7 +78,7 @@ void PCB_EDIT_FRAME::Autoroute( wxDC* DC, int mode ) { case PCB_PAD_T: Pad = (D_PAD*) GetScreen()->GetCurItem(); - autoroute_net_code = Pad->GetNet(); + autoroute_net_code = Pad->GetNetCode(); break; default: diff --git a/pcbnew/autorouter/routing_matrix.cpp b/pcbnew/autorouter/routing_matrix.cpp index 1e57b80293..b5d02e926a 100644 --- a/pcbnew/autorouter/routing_matrix.cpp +++ b/pcbnew/autorouter/routing_matrix.cpp @@ -215,7 +215,7 @@ void PlaceCells( BOARD* aPcb, int net_code, int flag ) { D_PAD* pad = aPcb->GetPad( i ); - if( net_code != pad->GetNet() || (flag & FORCE_PADS) ) + if( net_code != pad->GetNetCode() || (flag & FORCE_PADS) ) { ::PlacePad( pad, HOLE, marge, WRITE_CELL ); } @@ -247,7 +247,7 @@ void PlaceCells( BOARD* aPcb, int net_code, int flag ) tmpSegm.SetShape( edge->GetShape() ); tmpSegm.SetWidth( edge->GetWidth() ); tmpSegm.m_Param = edge->GetAngle(); - tmpSegm.SetNet( -1 ); + tmpSegm.SetNetCode( -1 ); TraceSegmentPcb( &tmpSegm, HOLE, marge, WRITE_CELL ); TraceSegmentPcb( &tmpSegm, VIA_IMPOSSIBLE, via_marge, WRITE_OR_CELL ); @@ -284,7 +284,7 @@ void PlaceCells( BOARD* aPcb, int net_code, int flag ) tmpSegm.SetShape( DrawSegm->GetShape() ); tmpSegm.SetWidth( DrawSegm->GetWidth() ); tmpSegm.m_Param = DrawSegm->GetAngle(); - tmpSegm.SetNet( -1 ); + tmpSegm.SetNetCode( -1 ); TraceSegmentPcb( &tmpSegm, type_cell, marge, WRITE_CELL ); } @@ -335,7 +335,7 @@ void PlaceCells( BOARD* aPcb, int net_code, int flag ) /* Put tracks and vias on matrix */ for( TRACK* track = aPcb->m_Track; track; track = track->Next() ) { - if( net_code == track->GetNet() ) + if( net_code == track->GetNetCode() ) continue; TraceSegmentPcb( track, HOLE, marge, WRITE_CELL ); @@ -374,7 +374,7 @@ int Build_Work( BOARD* Pcb ) pt_pad = pt_rats->m_PadStart; - current_net_code = pt_pad->GetNet(); + current_net_code = pt_pad->GetNetCode(); pt_ch = pt_rats; r1 = ( pt_pad->GetPosition().y - RoutingMatrix.m_BrdBox.GetY() + demi_pas ) diff --git a/pcbnew/autorouter/solve.cpp b/pcbnew/autorouter/solve.cpp index c06d8545eb..063d56c702 100644 --- a/pcbnew/autorouter/solve.cpp +++ b/pcbnew/autorouter/solve.cpp @@ -1180,7 +1180,7 @@ static void OrCell_Trace( BOARD* pcb, int col, int row, g_CurrentTrackSegment->SetWidth( pcb->GetCurrentViaSize() ); g_CurrentTrackSegment->SetShape( pcb->GetDesignSettings().m_CurrentViaType ); - g_CurrentTrackSegment->SetNet( current_net_code ); + g_CurrentTrackSegment->SetNetCode( current_net_code ); } else // placement of a standard segment { @@ -1198,7 +1198,7 @@ static void OrCell_Trace( BOARD* pcb, int col, int row, ( RoutingMatrix.m_GridRouting * row ), pcb->GetBoundingBox().GetY() + ( RoutingMatrix.m_GridRouting * col ))); - g_CurrentTrackSegment->SetNet( current_net_code ); + g_CurrentTrackSegment->SetNetCode( current_net_code ); if( g_CurrentTrackSegment->Back() == NULL ) /* Start trace. */ { @@ -1319,7 +1319,7 @@ static void AddNewTrace( PCB_EDIT_FRAME* pcbframe, wxDC* DC ) } // Insert new segments in real board - int netcode = g_FirstTrackSegment->GetNet(); + int netcode = g_FirstTrackSegment->GetNetCode(); TRACK* firstTrack = g_FirstTrackSegment; int newCount = g_CurrentTrackList.GetCount(); diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index 7f7bbb5a43..ab0272f8b4 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -1345,14 +1345,6 @@ NETINFO_ITEM* BOARD::FindNet( int aNetcode ) const // NULL is returned for non valid netcodes NETINFO_ITEM* net = m_NetInfo.GetNetItem( aNetcode ); -#if defined(DEBUG) - if( net && aNetcode != net->GetNet()) // item can be NULL if anetcode is not valid - { - wxLogError( wxT( "FindNet() anetcode %d != GetNet() %d (net: %s)\n" ), - aNetcode, net->GetNet(), TO_UTF8( net->GetNetname() ) ); - } -#endif - return net; } @@ -1515,7 +1507,7 @@ ZONE_CONTAINER* BOARD::HitTestForAnyFilledArea( const wxPoint& aRefPos, if( area->GetState( BUSY ) ) continue; - if( aNetCode >= 0 && area->GetNet() != aNetCode ) + if( aNetCode >= 0 && area->GetNetCode() != aNetCode ) continue; if( area->HitTestFilledArea( aRefPos ) ) @@ -1534,24 +1526,24 @@ int BOARD::SetAreasNetCodesFromNetNames( void ) { if( !GetArea( ii )->IsOnCopperLayer() ) { - GetArea( ii )->SetNet( NETINFO_LIST::UNCONNECTED ); + GetArea( ii )->SetNetCode( NETINFO_LIST::UNCONNECTED ); continue; } - if( GetArea( ii )->GetNet() != 0 ) // i.e. if this zone is connected to a net + if( GetArea( ii )->GetNetCode() != 0 ) // i.e. if this zone is connected to a net { - const NETINFO_ITEM* net = FindNet( GetArea( ii )->GetNetname() ); + const NETINFO_ITEM* net = GetArea( ii )->GetNet(); if( net ) { - GetArea( ii )->SetNet( net->GetNet() ); + GetArea( ii )->SetNetCode( net->GetNet() ); } else { error_count++; // keep Net Name and set m_NetCode to -1 : error flag. - GetArea( ii )->SetNet( -1 ); + GetArea( ii )->SetNetCode( -1 ); } } } @@ -2271,7 +2263,7 @@ ZONE_CONTAINER* BOARD::InsertArea( int netcode, int iarea, LAYER_NUM layer, int { ZONE_CONTAINER* new_area = new ZONE_CONTAINER( this ); - new_area->SetNet( netcode ); + new_area->SetNetCode( netcode ); new_area->SetLayer( layer ); new_area->SetTimeStamp( GetNewTimeStamp() ); @@ -2310,7 +2302,7 @@ bool BOARD::NormalizeAreaPolygon( PICKED_ITEMS_LIST * aNewZonesList, ZONE_CONTAI { // create new copper area and copy poly into it CPolyLine* new_p = (*pa)[ip - 1]; - NewArea = AddArea( aNewZonesList, aCurrArea->GetNet(), aCurrArea->GetLayer(), + NewArea = AddArea( aNewZonesList, aCurrArea->GetNetCode(), aCurrArea->GetLayer(), wxPoint(0, 0), CPolyLine::NO_HATCH ); // remove the poly that was automatically created for the new area @@ -2551,7 +2543,7 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets, } if( !aNetlist.IsDryRun() ) - pad->SetNet( NETINFO_LIST::UNCONNECTED ); + pad->SetNetCode( NETINFO_LIST::UNCONNECTED ); } } else // Footprint pad has a net. @@ -2580,7 +2572,7 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets, m_NetInfo.AppendNet( netinfo ); } - pad->SetNet( netinfo->GetNet() ); + pad->SetNetCode( netinfo->GetNet() ); } } } @@ -2654,7 +2646,7 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets, aReporter->Report( msg ); } - previouspad->SetNet( NETINFO_LIST::UNCONNECTED ); + previouspad->SetNetCode( NETINFO_LIST::UNCONNECTED ); } netname = pad->GetNetname(); count = 1; @@ -2667,7 +2659,7 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets, // Examine last pad if( pad && count == 1 ) - pad->SetNet( NETINFO_LIST::UNCONNECTED ); + pad->SetNetCode( NETINFO_LIST::UNCONNECTED ); } // Last step: Some tests: diff --git a/pcbnew/class_board_connected_item.cpp b/pcbnew/class_board_connected_item.cpp index 26cca19772..73bdced99a 100644 --- a/pcbnew/class_board_connected_item.cpp +++ b/pcbnew/class_board_connected_item.cpp @@ -35,28 +35,28 @@ #include BOARD_CONNECTED_ITEM::BOARD_CONNECTED_ITEM( BOARD_ITEM* aParent, KICAD_T idtype ) : - BOARD_ITEM( aParent, idtype ), m_Subnet( 0 ), m_ZoneSubnet( 0 ), - m_netinfo( &NETINFO_LIST::ORPHANED ) + BOARD_ITEM( aParent, idtype ), m_netinfo( &NETINFO_LIST::ORPHANED ), + m_Subnet( 0 ), m_ZoneSubnet( 0 ) { - // The unconnected is set only in case the item belongs to a BOARD - SetNet( NETINFO_LIST::UNCONNECTED ); + // The unconnected net is set only in case the item belongs to a BOARD + SetNetCode( NETINFO_LIST::UNCONNECTED ); } BOARD_CONNECTED_ITEM::BOARD_CONNECTED_ITEM( const BOARD_CONNECTED_ITEM& aItem ) : - BOARD_ITEM( aItem ), m_Subnet( aItem.m_Subnet ), m_ZoneSubnet( aItem.m_ZoneSubnet ), - m_netinfo( aItem.m_netinfo ) + BOARD_ITEM( aItem ), m_netinfo( aItem.m_netinfo ), m_Subnet( aItem.m_Subnet ), + m_ZoneSubnet( aItem.m_ZoneSubnet ) { } -int BOARD_CONNECTED_ITEM::GetNet() const +int BOARD_CONNECTED_ITEM::GetNetCode() const { return m_netinfo->GetNet(); } -void BOARD_CONNECTED_ITEM::SetNet( int aNetCode ) +void BOARD_CONNECTED_ITEM::SetNetCode( int aNetCode ) { BOARD* board = GetBoard(); if( board ) @@ -136,8 +136,7 @@ NETCLASS* BOARD_CONNECTED_ITEM::GetNetClass() const } NETCLASS* netclass = NULL; - int netcode = GetNet(); - NETINFO_ITEM* net = board->FindNet( netcode ); + NETINFO_ITEM* net = board->FindNet( GetNetCode() ); if( net ) { diff --git a/pcbnew/class_board_connected_item.h b/pcbnew/class_board_connected_item.h index eab6d310fd..2742fa3106 100644 --- a/pcbnew/class_board_connected_item.h +++ b/pcbnew/class_board_connected_item.h @@ -54,18 +54,6 @@ public: std::vector m_TracksConnected; // list of other tracks connected to me std::vector m_PadsConnected; // list of other pads connected to me -private: - int m_Subnet; /* In rastnest routines : for the current net, block number - * (number common to the current connected items found) - */ - - int m_ZoneSubnet; // used in rastnest computations : for the current net, - // handle cluster number in zone connection - - /// Stores all informations about the net that item belongs to - const NETINFO_ITEM* m_netinfo; - -public: BOARD_CONNECTED_ITEM( BOARD_ITEM* aParent, KICAD_T idtype ); BOARD_CONNECTED_ITEM( const BOARD_CONNECTED_ITEM& aItem ); @@ -78,17 +66,26 @@ public: /** * Function GetNet - * @return int - the net code. + * Returns NET_INFO object for a given item. */ - int GetNet() const; + NETINFO_ITEM* GetNet() const + { + return m_netinfo; + } /** - * Function SetNet + * Function GetNetCode + * @return int - the net code. + */ + int GetNetCode() const; + + /** + * Function SetNetCode * sets net using a net code. * @param aNetCode is a net code for the new net. It has to exist in NETINFO_LIST held by BOARD. * Otherwise, item is assigned to the unconnected net. */ - void SetNet( int aNetCode ); + void SetNetCode( int aNetCode ); /** * Function GetSubNet @@ -156,6 +153,18 @@ public: * @return the Net Class name of this item */ wxString GetNetClassName() const; + +protected: + /// Stores all informations about the net that item belongs to + NETINFO_ITEM* m_netinfo; + +private: + int m_Subnet; /* In rastnest routines : for the current net, block number + * (number common to the current connected items found) + */ + + int m_ZoneSubnet; // used in rastnest computations : for the current net, + // handle cluster number in zone connection }; diff --git a/pcbnew/class_netinfo.h b/pcbnew/class_netinfo.h index 50bb30457d..f566926fcc 100644 --- a/pcbnew/class_netinfo.h +++ b/pcbnew/class_netinfo.h @@ -320,7 +320,7 @@ public: ///> NETINFO_ITEM meaning that there was no net assigned for an item, as there was no ///> board storing net list available. - static const NETINFO_ITEM ORPHANED; + static NETINFO_ITEM ORPHANED; #if defined(DEBUG) void Show() const; diff --git a/pcbnew/class_netinfo_item.cpp b/pcbnew/class_netinfo_item.cpp index 1ca37ec3a1..f61705385f 100644 --- a/pcbnew/class_netinfo_item.cpp +++ b/pcbnew/class_netinfo_item.cpp @@ -58,8 +58,7 @@ NETINFO_ITEM::NETINFO_ITEM( BOARD_ITEM* aParent, const wxString& aNetName, int a m_RatsnestEndIdx = 0; // Ending point of ratsnests of this net m_NetClassName = NETCLASS::Default; - - m_NetClass = 0; + m_NetClass = NULL; } @@ -102,7 +101,7 @@ void NETINFO_ITEM::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) { for( pad = module->Pads(); pad != 0; pad = pad->Next() ) { - if( pad->GetNet() == GetNet() ) + if( pad->GetNetCode() == GetNet() ) { count++; lengthPadToDie += pad->GetPadToDieLength(); @@ -120,13 +119,13 @@ void NETINFO_ITEM::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) { if( Struct->Type() == PCB_VIA_T ) { - if( ( (SEGVIA*) Struct )->GetNet() == GetNet() ) + if( ( (SEGVIA*) Struct )->GetNetCode() == GetNet() ) count++; } if( Struct->Type() == PCB_TRACE_T ) { - if( ( (TRACK*) Struct )->GetNet() == GetNet() ) + if( ( (TRACK*) Struct )->GetNetCode() == GetNet() ) lengthnet += ( (TRACK*) Struct )->GetLength(); } } diff --git a/pcbnew/class_netinfolist.cpp b/pcbnew/class_netinfolist.cpp index ac8962958e..da3bd875d1 100644 --- a/pcbnew/class_netinfolist.cpp +++ b/pcbnew/class_netinfolist.cpp @@ -125,11 +125,16 @@ void NETINFO_LIST::buildListOfNets() { pad = m_PadsFullList[ii]; - if( pad->GetNet() == NETINFO_LIST::UNCONNECTED ) // pad not connected + if( pad->GetNetCode() == NETINFO_LIST::UNCONNECTED ) // pad not connected continue; // Add pad to the appropriate list of pads - GetNetItem( pad->GetNet() )->m_PadInNetList.push_back( pad ); + NETINFO_ITEM* net = pad->GetNet(); + // it should not be possible for BOARD_CONNECTED_ITEM to return NULL as a result of GetNet() + wxASSERT( net ); + + if( net ) + net->m_PadInNetList.push_back( pad ); ++nodes_count; } @@ -232,24 +237,24 @@ void NETINFO_MAPPING::Update() // Zones for( int i = 0; i < m_board->GetAreaCount(); ++i ) - nets.insert( m_board->GetArea( i )->GetNet() ); + nets.insert( m_board->GetArea( i )->GetNetCode() ); // Tracks for( TRACK* track = m_board->m_Track; track; track = track->Next() ) - nets.insert( track->GetNet() ); + nets.insert( track->GetNetCode() ); // Modules/pads for( MODULE* module = m_board->m_Modules; module; module = module->Next() ) { for( D_PAD* pad = module->Pads().GetFirst(); pad; pad = pad->Next() ) { - nets.insert( pad->GetNet() ); + nets.insert( pad->GetNetCode() ); } } // Segzones for( SEGZONE* zone = m_board->m_Zone; zone; zone = zone->Next() ) - nets.insert( zone->GetNet() ); + nets.insert( zone->GetNetCode() ); // Prepare the new mapping m_netMapping.clear(); @@ -275,5 +280,4 @@ NETINFO_ITEM* NETINFO_MAPPING::iterator::operator->() const const int NETINFO_LIST::UNCONNECTED = 0; -const NETINFO_ITEM NETINFO_LIST::ORPHANED = NETINFO_ITEM( NULL, wxEmptyString, - NETINFO_LIST::UNCONNECTED ); +NETINFO_ITEM NETINFO_LIST::ORPHANED = NETINFO_ITEM( NULL, wxEmptyString, NETINFO_LIST::UNCONNECTED ); diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index 4f991f8853..093f511570 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -373,7 +373,7 @@ void D_PAD::Copy( D_PAD* source ) m_layerMask = source->m_layerMask; m_NumPadName = source->m_NumPadName; - SetNet( source->GetNet() ); + m_netinfo = source->m_netinfo; m_Drill = source->m_Drill; m_drillShape = source->m_drillShape; m_Offset = source->m_Offset; @@ -403,7 +403,7 @@ void D_PAD::CopyNetlistSettings( D_PAD* aPad ) // Don't do anything foolish like trying to copy to yourself. wxCHECK_RET( aPad != NULL && aPad != this, wxT( "Cannot copy to NULL or yourself." ) ); - aPad->SetNet( GetNet() ); + aPad->SetNetCode( GetNetCode() ); aPad->SetLocalClearance( m_LocalClearance ); aPad->SetLocalSolderMaskMargin( m_LocalSolderMaskMargin ); diff --git a/pcbnew/class_pad_draw_functions.cpp b/pcbnew/class_pad_draw_functions.cpp index b61fc4de32..7c21d9c4b2 100644 --- a/pcbnew/class_pad_draw_functions.cpp +++ b/pcbnew/class_pad_draw_functions.cpp @@ -473,7 +473,7 @@ void D_PAD::DrawShape( EDA_RECT* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo ) GRSetDrawMode( aDC, aDrawInfo.m_DrawMode ); // Draw "No connect" ( / or \ or cross X ) if necessary - if( GetNet() == 0 && aDrawInfo.m_ShowNCMark ) + if( GetNetCode() == 0 && aDrawInfo.m_ShowNCMark ) { int dx0 = std::min( halfsize.x, halfsize.y ); EDA_COLOR_T nc_color = BLUE; diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index 89c52bb9f9..dcd1a2a23a 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -160,15 +160,11 @@ EDA_ITEM* SEGZONE::Clone() const wxString SEGZONE::GetSelectMenuText() const { wxString text, nettxt; - NETINFO_ITEM* net; BOARD* board = GetBoard(); if( board ) { - net = board->FindNet( GetNet() ); - - if( net ) - nettxt = net->GetNetname(); + nettxt = GetNetname(); } else { @@ -201,7 +197,6 @@ wxString SEGVIA::GetSelectMenuText() const { wxString text; wxString format; - NETINFO_ITEM* net; BOARD* board = GetBoard(); int shape = GetShape(); @@ -215,18 +210,14 @@ wxString SEGVIA::GetSelectMenuText() const if( board ) { - net = board->FindNet( GetNet() ); - wxString netname; - - if( net ) - netname = net->GetNetname(); + wxString netname = GetNetname(); // say which layers, only two for now LAYER_NUM topLayer; LAYER_NUM botLayer; ReturnLayerPair( &topLayer, &botLayer ); text.Printf( format.GetData(), GetChars( ShowWidth() ), - GetChars( netname ), GetNet(), + GetChars( netname ), GetNetCode(), GetChars( board->GetLayerName( topLayer ) ), GetChars( board->GetLayerName( botLayer ) ) ); @@ -496,7 +487,7 @@ TRACK* TRACK::GetBestInsertPoint( BOARD* aPcb ) for( ; track; track = track->Next() ) { - if( GetNet() <= track->GetNet() ) + if( GetNetCode() <= track->GetNetCode() ) return track; } @@ -510,14 +501,14 @@ TRACK* TRACK::GetStartNetCode( int NetCode ) int ii = 0; if( NetCode == -1 ) - NetCode = GetNet(); + NetCode = GetNetCode(); while( Track != NULL ) { - if( Track->GetNet() > NetCode ) + if( Track->GetNetCode() > NetCode ) break; - if( Track->GetNet() == NetCode ) + if( Track->GetNetCode() == NetCode ) { ii++; break; @@ -542,19 +533,19 @@ TRACK* TRACK::GetEndNetCode( int NetCode ) return NULL; if( NetCode == -1 ) - NetCode = GetNet(); + NetCode = GetNetCode(); while( Track != NULL ) { NextS = (TRACK*) Track->Pnext; - if( Track->GetNet() == NetCode ) + if( Track->GetNetCode() == NetCode ) ii++; if( NextS == NULL ) break; - if( NextS->GetNet() > NetCode ) + if( NextS->GetNetCode() > NetCode ) break; Track = NextS; @@ -690,10 +681,10 @@ void TRACK::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, if( aDC->LogicalToDeviceXRel( m_Width ) < MIN_TEXT_SIZE ) return; - if( GetNet() == NETINFO_LIST::UNCONNECTED ) + if( GetNetCode() == NETINFO_LIST::UNCONNECTED ) return; - NETINFO_ITEM* net = ( (BOARD*) GetParent() )->FindNet( GetNet() ); + NETINFO_ITEM* net = GetNet(); if( net == NULL ) return; @@ -952,13 +943,13 @@ void SEGVIA::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, } // Display the short netname: - if( GetNet() == NETINFO_LIST::UNCONNECTED ) + if( GetNetCode() == NETINFO_LIST::UNCONNECTED ) return; if( DisplayOpt.DisplayNetNamesMode == 0 || DisplayOpt.DisplayNetNamesMode == 1 ) return; - NETINFO_ITEM* net = ( (BOARD*) GetParent() )->FindNet( GetNet() ); + NETINFO_ITEM* net = GetNet(); if( net == NULL ) return; @@ -1095,7 +1086,7 @@ void TRACK::GetMsgPanelInfoBase( std::vector< MSG_PANEL_ITEM >& aList ) // Display Net Name (in Pcbnew) if( board ) { - NETINFO_ITEM* net = board->FindNet( GetNet() ); + NETINFO_ITEM* net = GetNet(); if( net ) msg = net->GetNetname(); @@ -1105,7 +1096,7 @@ void TRACK::GetMsgPanelInfoBase( std::vector< MSG_PANEL_ITEM >& aList ) aList.push_back( MSG_PANEL_ITEM( _( "NetName" ), msg, RED ) ); /* Display net code : (useful in test or debug) */ - msg.Printf( wxT( "%d.%d" ), GetNet(), GetSubNet() ); + msg.Printf( wxT( "%d.%d" ), GetNetCode(), GetSubNet() ); aList.push_back( MSG_PANEL_ITEM( _( "NetCode" ), msg, RED ) ); } @@ -1576,7 +1567,7 @@ wxString TRACK::GetSelectMenuText() const // disambiguate all the choices under the cursor! if( board ) { - net = board->FindNet( GetNet() ); + net = GetNet(); if( net ) netname = net->GetNetname(); @@ -1591,7 +1582,7 @@ wxString TRACK::GetSelectMenuText() const text.Printf( _("Track %s, net [%s] (%d) on layer %s, length: %s" ), GetChars( ShowWidth() ), GetChars( netname ), - GetNet(), GetChars( GetLayerName() ), + GetNetCode(), GetChars( GetLayerName() ), GetChars( ::LengthDoubleToString( GetLength() ) ) ); return text; diff --git a/pcbnew/class_zone.cpp b/pcbnew/class_zone.cpp index cf5ab48ff7..627d98ac87 100644 --- a/pcbnew/class_zone.cpp +++ b/pcbnew/class_zone.cpp @@ -74,7 +74,7 @@ ZONE_CONTAINER::ZONE_CONTAINER( const ZONE_CONTAINER& aZone ) : BOARD_CONNECTED_ITEM( aZone ) { // Should the copy be on the same net? - SetNet( aZone.GetNet() ); + SetNetCode( aZone.GetNetCode() ); m_Poly = new CPolyLine( *aZone.m_Poly ); // For corner moving, corner index to drag, or -1 if no selection @@ -620,9 +620,9 @@ void ZONE_CONTAINER::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) } else if( IsOnCopperLayer() ) { - if( GetNet() >= 0 ) + if( GetNetCode() >= 0 ) { - NETINFO_ITEM* equipot = board->FindNet( GetNet() ); + NETINFO_ITEM* equipot = GetNet(); if( equipot ) msg = equipot->GetNetname(); @@ -640,7 +640,7 @@ void ZONE_CONTAINER::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) #if 1 // Display net code : (useful in test or debug) - msg.Printf( wxT( "%d" ), GetNet() ); + msg.Printf( wxT( "%d" ), GetNetCode() ); aList.push_back( MSG_PANEL_ITEM( _( "NetCode" ), msg, RED ) ); #endif @@ -801,7 +801,7 @@ void ZONE_CONTAINER::Copy( ZONE_CONTAINER* src ) { m_Parent = src->m_Parent; m_Layer = src->m_Layer; - SetNet( src->GetNet() ); + SetNetCode( src->GetNetCode() ); SetTimeStamp( src->m_TimeStamp ); m_Poly->RemoveAllContours(); m_Poly->Copy( src->m_Poly ); // copy outlines @@ -869,11 +869,11 @@ wxString ZONE_CONTAINER::GetSelectMenuText() const // Display net name for copper zones if( !GetIsKeepout() ) { - if( GetNet() >= 0 ) + if( GetNetCode() >= 0 ) { if( board ) { - net = board->FindNet( GetNet() ); + net = GetNet(); if( net ) { diff --git a/pcbnew/class_zone_settings.cpp b/pcbnew/class_zone_settings.cpp index bdf85dbbd6..b17968123f 100644 --- a/pcbnew/class_zone_settings.cpp +++ b/pcbnew/class_zone_settings.cpp @@ -76,7 +76,7 @@ ZONE_SETTINGS& ZONE_SETTINGS::operator << ( const ZONE_CONTAINER& aSource ) m_FillMode = aSource.GetFillMode(); m_ZoneClearance = aSource.GetClearance(); m_ZoneMinThickness = aSource.GetMinThickness(); - m_NetcodeSelection = aSource.GetNet(); + m_NetcodeSelection = aSource.GetNetCode(); m_CurrentZone_Layer = aSource.GetLayer(); m_Zone_HatchingStyle = aSource.GetHatchStyle(); m_ArcToSegmentsCount = aSource.GetArcSegmentCount(); @@ -113,7 +113,7 @@ void ZONE_SETTINGS::ExportSetting( ZONE_CONTAINER& aTarget, bool aFullExport ) c if( aFullExport ) { aTarget.SetPriority( m_ZonePriority ); - aTarget.SetNet( m_NetcodeSelection ); + aTarget.SetNetCode( m_NetcodeSelection ); aTarget.SetLayer( m_CurrentZone_Layer ); aTarget.Outline()->SetLayer( m_CurrentZone_Layer ); } diff --git a/pcbnew/clean.cpp b/pcbnew/clean.cpp index 2fdd6e9975..8e2f77d506 100644 --- a/pcbnew/clean.cpp +++ b/pcbnew/clean.cpp @@ -323,14 +323,14 @@ bool TRACKS_CLEANER::deleteUnconnectedTracks() zone = m_Brd->HitTestForAnyFilledArea( track->GetStart(), track->GetLayer(), track->GetLayer(), - track->GetNet() ); + track->GetNetCode() ); } else { ((SEGVIA*)track)->ReturnLayerPair( &top_layer, &bottom_layer ); zone = m_Brd->HitTestForAnyFilledArea( track->GetStart(), top_layer, bottom_layer, - track->GetNet() ); + track->GetNetCode() ); } } @@ -359,7 +359,7 @@ bool TRACKS_CLEANER::deleteUnconnectedTracks() zone = m_Brd->HitTestForAnyFilledArea( via->GetStart(), bottom_layer, top_layer, - via->GetNet() ); + via->GetNetCode() ); } if( (other == NULL) && (zone == NULL) ) @@ -383,14 +383,14 @@ bool TRACKS_CLEANER::deleteUnconnectedTracks() zone = m_Brd->HitTestForAnyFilledArea( track->GetEnd(), track->GetLayer(), track->GetLayer(), - track->GetNet() ); + track->GetNetCode() ); } else { ((SEGVIA*)track)->ReturnLayerPair( &top_layer, &bottom_layer ); zone = m_Brd->HitTestForAnyFilledArea( track->GetEnd(), top_layer, bottom_layer, - track->GetNet() ); + track->GetNetCode() ); } } @@ -419,7 +419,7 @@ bool TRACKS_CLEANER::deleteUnconnectedTracks() via->ReturnLayerPair( &top_layer, &bottom_layer ); zone = m_Brd->HitTestForAnyFilledArea( via->GetEnd(), bottom_layer, top_layer, - via->GetNet() ); + via->GetNetCode() ); } if( (other == NULL) && (zone == NULL) ) @@ -479,7 +479,7 @@ bool TRACKS_CLEANER::clean_segments() if( segment->GetLayer() != other->GetLayer() ) continue; - if( segment->GetNet() != other->GetNet() ) + if( segment->GetNetCode() != other->GetNetCode() ) break; if( ( segment->GetStart() == other->GetStart() ) && @@ -748,14 +748,14 @@ bool PCB_EDIT_FRAME::RemoveMisConnectedTracks() if( segment->start && segment->start->Type()==PCB_PAD_T ) { // get the netcode of the pad to propagate. - net_code_s = ((D_PAD*)(segment->start))->GetNet(); + net_code_s = ((D_PAD*)(segment->start))->GetNetCode(); } else { other = segment->GetTrace( GetBoard()->m_Track, NULL, FLG_START ); if( other ) - net_code_s = other->GetNet(); + net_code_s = other->GetNetCode(); } if( net_code_s < 0 ) @@ -766,14 +766,14 @@ bool PCB_EDIT_FRAME::RemoveMisConnectedTracks() if( segment->end && segment->end->Type()==PCB_PAD_T ) { - net_code_e = ((D_PAD*)(segment->end))->GetNet(); + net_code_e = ((D_PAD*)(segment->end))->GetNetCode(); } else { other = segment->GetTrace( GetBoard()->m_Track, NULL, FLG_END ); if( other ) - net_code_e = other->GetNet(); + net_code_e = other->GetNetCode(); } if( net_code_e < 0 ) diff --git a/pcbnew/connect.cpp b/pcbnew/connect.cpp index 1833bd0d65..9fd2c7ad47 100644 --- a/pcbnew/connect.cpp +++ b/pcbnew/connect.cpp @@ -718,7 +718,7 @@ void PCB_BASE_FRAME::TestConnections() for( TRACK* track = m_Pcb->m_Track; track; ) { // At this point, track is the first track of a given net - current_net_code = track->GetNet(); + current_net_code = track->GetNetCode(); // Get last track of the current net TRACK* lastTrack = track->GetEndNetCode( current_net_code ); @@ -760,7 +760,7 @@ void PCB_BASE_FRAME::TestNetConnection( wxDC* aDC, int aNetCode ) for( unsigned i = 0; i < m_Pcb->GetPadCount(); ++i ) { D_PAD* pad = m_Pcb->GetPad(i); - int pad_net_code = pad->GetNet(); + int pad_net_code = pad->GetNetCode(); if( pad_net_code < aNetCode ) continue; @@ -786,7 +786,7 @@ void PCB_BASE_FRAME::TestNetConnection( wxDC* aDC, int aNetCode ) if( firstTrack && lastTrack ) // i.e. if there are segments { - connections.Build_CurrNet_SubNets_Connections( firstTrack, lastTrack, firstTrack->GetNet() ); + connections.Build_CurrNet_SubNets_Connections( firstTrack, lastTrack, firstTrack->GetNetCode() ); } } @@ -842,7 +842,7 @@ void PCB_BASE_FRAME::RecalculateAllTracksNetcode() curr_track->end = NULL; curr_track->SetState( BUSY | IN_EDIT | BEGIN_ONPAD | END_ONPAD, false ); curr_track->SetZoneSubNet( 0 ); - curr_track->SetNet( NETINFO_LIST::UNCONNECTED ); + curr_track->SetNetCode( NETINFO_LIST::UNCONNECTED ); } // If no pad, reset pointers and netcode, and do nothing else @@ -863,7 +863,7 @@ void PCB_BASE_FRAME::RecalculateAllTracksNetcode() for( ; curr_track != NULL; curr_track = curr_track->Next() ) { if( curr_track->m_PadsConnected.size() ) - curr_track->SetNet( curr_track->m_PadsConnected[0]->GetNet() ); + curr_track->SetNetCode( curr_track->m_PadsConnected[0]->GetNetCode() ); } // Pass 2: build connections between track ends @@ -883,17 +883,17 @@ void PCB_BASE_FRAME::RecalculateAllTracksNetcode() for( curr_track = m_Pcb->m_Track; curr_track; curr_track = curr_track->Next() ) { - int netcode = curr_track->GetNet(); + int netcode = curr_track->GetNetCode(); if( netcode == 0 ) { // try to find a connected item having a netcode for( unsigned kk = 0; kk < curr_track->m_TracksConnected.size(); kk++ ) { - int altnetcode = curr_track->m_TracksConnected[kk]->GetNet(); + int altnetcode = curr_track->m_TracksConnected[kk]->GetNetCode(); if( altnetcode ) { new_pass_request = true; netcode = altnetcode; - curr_track->SetNet(netcode); + curr_track->SetNetCode(netcode); break; } } @@ -902,10 +902,10 @@ void PCB_BASE_FRAME::RecalculateAllTracksNetcode() { // propagate this netcode to connected tracks having no netcode for( unsigned kk = 0; kk < curr_track->m_TracksConnected.size(); kk++ ) { - int altnetcode = curr_track->m_TracksConnected[kk]->GetNet(); + int altnetcode = curr_track->m_TracksConnected[kk]->GetNetCode(); if( altnetcode == 0 ) { - curr_track->m_TracksConnected[kk]->SetNet(netcode); + curr_track->m_TracksConnected[kk]->SetNetCode(netcode); new_pass_request = true; } } @@ -926,10 +926,10 @@ void PCB_BASE_FRAME::RecalculateAllTracksNetcode() static bool SortTracksByNetCode( const TRACK* const & ref, const TRACK* const & compare ) { // For items having the same Net, keep the order in list - if( ref->GetNet() == compare->GetNet()) + if( ref->GetNetCode() == compare->GetNetCode()) return ref->m_Param < compare->m_Param; - return ref->GetNet() < compare->GetNet(); + return ref->GetNetCode() < compare->GetNetCode(); } /** diff --git a/pcbnew/cross-probing.cpp b/pcbnew/cross-probing.cpp index d1f41b791f..8042a892a0 100644 --- a/pcbnew/cross-probing.cpp +++ b/pcbnew/cross-probing.cpp @@ -87,7 +87,7 @@ void PCB_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline ) if( pad ) { - netcode = pad->GetNet(); + netcode = pad->GetNetCode(); // put cursor on the pad: pos = pad->GetPosition(); diff --git a/pcbnew/deltrack.cpp b/pcbnew/deltrack.cpp index 2a77f9faec..331fbd22ab 100644 --- a/pcbnew/deltrack.cpp +++ b/pcbnew/deltrack.cpp @@ -120,7 +120,7 @@ TRACK* PCB_EDIT_FRAME::Delete_Segment( wxDC* DC, TRACK* aTrack ) return NULL; } - current_net_code = aTrack->GetNet(); + current_net_code = aTrack->GetNetCode(); DLIST* container = (DLIST*)aTrack->GetList(); wxASSERT( container ); @@ -142,7 +142,7 @@ void PCB_EDIT_FRAME::Delete_Track( wxDC* DC, TRACK* aTrack ) { if( aTrack != NULL ) { - int current_net_code = aTrack->GetNet(); + int current_net_code = aTrack->GetNetCode(); Remove_One_Track( DC, aTrack ); OnModify(); TestNetConnection( DC, current_net_code ); @@ -160,7 +160,7 @@ void PCB_EDIT_FRAME::Delete_net( wxDC* DC, TRACK* aTrack ) PICKED_ITEMS_LIST itemsList; ITEM_PICKER picker( NULL, UR_DELETED ); - int net_code_delete = aTrack->GetNet(); + int net_code_delete = aTrack->GetNetCode(); /* Search the first item for the given net code */ TRACK* trackList = GetBoard()->m_Track->GetStartNetCode( net_code_delete ); @@ -171,7 +171,7 @@ void PCB_EDIT_FRAME::Delete_net( wxDC* DC, TRACK* aTrack ) for( TRACK* segm = trackList; segm; segm = next_track, ++ii ) { next_track = segm->Next(); - if( segm->GetNet() != net_code_delete ) + if( segm->GetNetCode() != net_code_delete ) break; GetBoard()->m_Track.Remove( segm ); @@ -202,7 +202,7 @@ void PCB_EDIT_FRAME::Remove_One_Track( wxDC* DC, TRACK* pt_segm ) if( segments_to_delete_count == 0 ) return; - int net_code = pt_segm->GetNet(); + int net_code = pt_segm->GetNetCode(); PICKED_ITEMS_LIST itemsList; ITEM_PICKER picker( NULL, UR_DELETED ); diff --git a/pcbnew/dialogs/dialog_pad_properties.cpp b/pcbnew/dialogs/dialog_pad_properties.cpp index b280eaf099..73cbbd446b 100644 --- a/pcbnew/dialogs/dialog_pad_properties.cpp +++ b/pcbnew/dialogs/dialog_pad_properties.cpp @@ -812,14 +812,14 @@ void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event ) if( m_currentPad->GetNetname() != m_PadNetNameCtrl->GetValue() ) { - if( !m_PadNetNameCtrl->GetValue().IsEmpty() && m_padMaster.GetNet() == 0 ) + if( !m_PadNetNameCtrl->GetValue().IsEmpty() && m_padMaster.GetNetCode() == 0 ) { DisplayError( NULL, _( "Unknown netname, netname not changed" ) ); } else { rastnestIsChanged = true; - m_currentPad->SetNet( m_padMaster.GetNet() ); + m_currentPad->SetNetCode( m_padMaster.GetNetCode() ); } } @@ -982,9 +982,9 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( D_PAD* aPad ) // Check if user has set an existing net name const NETINFO_ITEM* netinfo = m_board->FindNet( m_PadNetNameCtrl->GetValue() ); if( netinfo != NULL ) - aPad->SetNet( netinfo->GetNet() ); + aPad->SetNetCode( netinfo->GetNet() ); else - aPad->SetNet( 0 ); + aPad->SetNetCode( NETINFO_LIST::UNCONNECTED ); // Clear some values, according to the pad type and shape switch( aPad->GetShape() ) @@ -1032,7 +1032,7 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( D_PAD* aPad ) // no offset, no net name, no pad name allowed aPad->SetOffset( wxPoint( 0, 0 ) ); aPad->SetPadName( wxEmptyString ); - aPad->SetNet( 0 ); + aPad->SetNetCode( NETINFO_LIST::UNCONNECTED ); break; default: diff --git a/pcbnew/dragsegm.cpp b/pcbnew/dragsegm.cpp index 0e0303f860..122d1ea110 100644 --- a/pcbnew/dragsegm.cpp +++ b/pcbnew/dragsegm.cpp @@ -342,7 +342,7 @@ void Collect_TrackSegmentsToDrag( BOARD* aPcb, const wxPoint& aRefPos, LAYER_MSK for( ; track; track = track->Next() ) { - if( track->GetNet() != aNetCode ) // not the same netcodenet code: all candidates tested + if( track->GetNetCode() != aNetCode ) // not the same netcode: all candidates tested break; if( ( aLayerMask & track->GetLayerMask() ) == 0 ) diff --git a/pcbnew/drc.cpp b/pcbnew/drc.cpp index bad9f65fd7..c10f0537b0 100644 --- a/pcbnew/drc.cpp +++ b/pcbnew/drc.cpp @@ -549,7 +549,7 @@ void DRC::testZones() if( !test_area->IsOnCopperLayer() ) continue; - if( test_area->GetNet() < 0 ) + if( test_area->GetNetCode() < 0 ) { m_currentMarker = fillMarker( test_area, DRCE_NON_EXISTANT_NET_FOR_ZONE_OUTLINE, m_currentMarker ); @@ -756,7 +756,7 @@ bool DRC::doPadToPadsDrc( D_PAD* aRefPad, D_PAD** aStart, D_PAD** aEnd, int x_li // The pad must be in a net (i.e pt_pad->GetNet() != 0 ), // But no problem if pads have the same netcode (same net) - if( pad->GetNet() && ( aRefPad->GetNet() == pad->GetNet() ) ) + if( pad->GetNetCode() && ( aRefPad->GetNetCode() == pad->GetNetCode() ) ) continue; // if pads are from the same footprint diff --git a/pcbnew/drc_clearance_test_functions.cpp b/pcbnew/drc_clearance_test_functions.cpp index 1fd8a94ccd..06bc935cd1 100644 --- a/pcbnew/drc_clearance_test_functions.cpp +++ b/pcbnew/drc_clearance_test_functions.cpp @@ -164,7 +164,7 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads ) m_segmAngle = 0; layerMask = aRefSeg->GetLayerMask(); - net_code_ref = aRefSeg->GetNet(); + net_code_ref = aRefSeg->GetNetCode(); // Phase 0 : Test vias if( aRefSeg->Type() == PCB_VIA_T ) @@ -310,8 +310,8 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads ) // The pad must be in a net (i.e pt_pad->GetNet() != 0 ) // but no problem if the pad netcode is the current netcode (same net) - if( pad->GetNet() // the pad must be connected - && net_code_ref == pad->GetNet() ) // the pad net is the same as current net -> Ok + if( pad->GetNetCode() // the pad must be connected + && net_code_ref == pad->GetNetCode() ) // the pad net is the same as current net -> Ok continue; // DRC for the pad @@ -339,7 +339,7 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads ) for( track = aStart; track; track = track->Next() ) { // No problem if segments have the same net code: - if( net_code_ref == track->GetNet() ) + if( net_code_ref == track->GetNetCode() ) continue; // No problem if segment are on different layers : diff --git a/pcbnew/eagle_plugin.cpp b/pcbnew/eagle_plugin.cpp index 078600f081..f8e31fddec 100644 --- a/pcbnew/eagle_plugin.cpp +++ b/pcbnew/eagle_plugin.cpp @@ -1493,7 +1493,7 @@ void EAGLE_PLUGIN::loadPlain( CPTREE& aGraphics ) zone->SetTimeStamp( timeStamp( gr->second ) ); zone->SetLayer( layer ); - zone->SetNet( NETINFO_LIST::UNCONNECTED ); + zone->SetNetCode( NETINFO_LIST::UNCONNECTED ); CPolyLine::HATCH_STYLE outline_hatch = CPolyLine::DIAGONAL_EDGE; @@ -1696,7 +1696,7 @@ void EAGLE_PLUGIN::loadElements( CPTREE& aElements ) if( ni != m_pads_to_nets.end() ) { const ENET* enet = &ni->second; - pad->SetNet( enet->netcode ); + pad->SetNetCode( enet->netcode ); } } @@ -2387,7 +2387,7 @@ void EAGLE_PLUGIN::loadSignals( CPTREE& aSignals ) t->SetWidth( width ); t->SetLayer( layer ); - t->SetNet( netCode ); + t->SetNetCode( netCode ); m_board->m_Track.Insert( t, NULL ); } @@ -2452,7 +2452,7 @@ void EAGLE_PLUGIN::loadSignals( CPTREE& aSignals ) via->SetPosition( pos ); via->SetEnd( pos ); - via->SetNet( netCode ); + via->SetNetCode( netCode ); via->SetShape( S_CIRCLE ); // @todo should be in SEGVIA constructor } @@ -2495,7 +2495,7 @@ void EAGLE_PLUGIN::loadSignals( CPTREE& aSignals ) zone->SetTimeStamp( timeStamp( it->second ) ); zone->SetLayer( layer ); - zone->SetNet( netCode ); + zone->SetNetCode( netCode ); CPolyLine::HATCH_STYLE outline_hatch = CPolyLine::DIAGONAL_EDGE; @@ -2551,7 +2551,7 @@ void EAGLE_PLUGIN::loadSignals( CPTREE& aSignals ) // KiCad does not support an unconnected zone with its own non-zero netcode, // but only when assigned netcode = 0 w/o a name... for( ZONES::iterator it = zones.begin(); it != zones.end(); ++it ) - (*it)->SetNet( NETINFO_LIST::UNCONNECTED ); + (*it)->SetNetCode( NETINFO_LIST::UNCONNECTED ); // therefore omit this signal/net. } diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index 6846dda597..be15d90c64 100644 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -331,7 +331,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) if( type == PCB_TRACE_T || type == PCB_VIA_T ) { BOARD_CONNECTED_ITEM*item = (BOARD_CONNECTED_ITEM*) GetCurItem(); - DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS dlg( this, item->GetNet() ); + DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS dlg( this, item->GetNetCode() ); dlg.ShowModal(); } @@ -471,11 +471,11 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) break; case ID_POPUP_PCB_LOCK_ON_NET: - Attribut_net( &dc, ( (TRACK*) GetCurItem() )->GetNet(), true ); + Attribut_net( &dc, ( (TRACK*) GetCurItem() )->GetNetCode(), true ); break; case ID_POPUP_PCB_LOCK_OFF_NET: - Attribut_net( &dc, ( (TRACK*) GetCurItem() )->GetNet(), false ); + Attribut_net( &dc, ( (TRACK*) GetCurItem() )->GetNetCode(), false ); break; case ID_POPUP_PCB_SETFLAGS_TRACK_MNU: @@ -489,7 +489,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) { SEGZONE* zsegm = (SEGZONE*) GetCurItem(); - int netcode = zsegm->GetNet(); + int netcode = zsegm->GetNetCode(); Delete_OldZone_Fill( zsegm ); SetCurItem( NULL ); TestNetConnection( NULL, netcode ); @@ -526,7 +526,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) case ID_POPUP_PCB_DELETE_ZONE_CUTOUT: m_canvas->MoveCursorToCrossHair(); { - int netcode = ( (ZONE_CONTAINER*) GetCurItem() )->GetNet(); + int netcode = ( (ZONE_CONTAINER*) GetCurItem() )->GetNetCode(); Delete_Zone_Contour( &dc, (ZONE_CONTAINER*) GetCurItem() ); SetCurItem( NULL ); TestNetConnection( NULL, netcode ); @@ -607,7 +607,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) { ZONE_CONTAINER* zone_container = (ZONE_CONTAINER*) GetCurItem(); zone_container->UnFill(); - TestNetConnection( NULL, zone_container->GetNet() ); + TestNetConnection( NULL, zone_container->GetNetCode() ); OnModify(); SetMsgPanel( GetBoard() ); m_canvas->Refresh(); @@ -636,7 +636,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) case ID_POPUP_PCB_FILL_ZONE: m_canvas->MoveCursorToCrossHair(); Fill_Zone( (ZONE_CONTAINER*) GetCurItem() ); - TestNetConnection( NULL, ( (ZONE_CONTAINER*) GetCurItem() )->GetNet() ); + TestNetConnection( NULL, ( (ZONE_CONTAINER*) GetCurItem() )->GetNetCode() ); SetMsgPanel( GetBoard() ); m_canvas->Refresh(); break; @@ -1153,7 +1153,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) newtrack->Draw( m_canvas, &dc, GR_XOR ); // compute the new ratsnest, because connectivity could change - TestNetConnection( &dc, track->GetNet() ); + TestNetConnection( &dc, track->GetNetCode() ); } break; @@ -1245,7 +1245,7 @@ void PCB_EDIT_FRAME::RemoveStruct( BOARD_ITEM* Item, wxDC* DC ) case PCB_ZONE_AREA_T: { SetCurItem( NULL ); - int netcode = ( (ZONE_CONTAINER*) Item )->GetNet(); + int netcode = ( (ZONE_CONTAINER*) Item )->GetNetCode(); Delete_Zone_Contour( DC, (ZONE_CONTAINER*) Item ); TestNetConnection( NULL, netcode ); SetMsgPanel( GetBoard() ); diff --git a/pcbnew/edit_track_width.cpp b/pcbnew/edit_track_width.cpp index 6698f2be1a..4c2d5e8327 100644 --- a/pcbnew/edit_track_width.cpp +++ b/pcbnew/edit_track_width.cpp @@ -36,7 +36,7 @@ bool PCB_EDIT_FRAME::SetTrackSegmentWidth( TRACK* aTrackItem, NETINFO_ITEM* net = NULL; if( aUseNetclassValue ) - net = GetBoard()->FindNet( aTrackItem->GetNet() ); + net = aTrackItem->GetNet(); initial_width = aTrackItem->GetWidth(); @@ -224,7 +224,7 @@ bool PCB_EDIT_FRAME::Change_Net_Tracks_And_Vias_Sizes( int aNetcode, bool aUseNe for( pt_segm = GetBoard()->m_Track; pt_segm != NULL; pt_segm = pt_segm->Next() ) { - if( aNetcode != pt_segm->GetNet() ) // not in net + if( aNetcode != pt_segm->GetNetCode() ) // not in net continue; // we have found a item member of the net diff --git a/pcbnew/editrack-part2.cpp b/pcbnew/editrack-part2.cpp index 81ba0cbd8b..e394ad1ca3 100644 --- a/pcbnew/editrack-part2.cpp +++ b/pcbnew/editrack-part2.cpp @@ -99,7 +99,7 @@ bool PCB_EDIT_FRAME::Other_Layer_Route( TRACK* aTrack, wxDC* DC ) via->SetFlags( IS_NEW ); via->SetShape( GetDesignSettings().m_CurrentViaType ); via->SetWidth( GetBoard()->GetCurrentViaSize()); - via->SetNet( GetBoard()->GetHighLightNetCode() ); + via->SetNetCode( GetBoard()->GetHighLightNetCode() ); via->SetEnd( g_CurrentTrackSegment->GetEnd() ); via->SetStart( g_CurrentTrackSegment->GetEnd() ); @@ -139,7 +139,7 @@ bool PCB_EDIT_FRAME::Other_Layer_Route( TRACK* aTrack, wxDC* DC ) // else error: will be removed later via->SetLayerPair( first_layer, last_layer ); { - NETINFO_ITEM* net = GetBoard()->FindNet( via->GetNet() ); + NETINFO_ITEM* net = via->GetNet(); via->SetWidth( net->GetMicroViaSize() ); } } @@ -244,7 +244,7 @@ void PCB_EDIT_FRAME::Show_1_Ratsnest( EDA_ITEM* item, wxDC* DC ) { RATSNEST_ITEM* net = &GetBoard()->m_FullRatsnest[ii]; - if( net->GetNet() == pt_pad->GetNet() ) + if( net->GetNet() == pt_pad->GetNetCode() ) { if( ( net->m_Status & CH_VISIBLE ) != 0 ) continue; diff --git a/pcbnew/editrack.cpp b/pcbnew/editrack.cpp index 24223bc8f4..41cc2d7e30 100644 --- a/pcbnew/editrack.cpp +++ b/pcbnew/editrack.cpp @@ -133,12 +133,12 @@ TRACK* PCB_EDIT_FRAME::Begin_Route( TRACK* aTrack, wxDC* aDC ) // A pad is found: put the starting point on pad center pos = pad->GetPosition(); - GetBoard()->SetHighLightNet( pad->GetNet() ); + GetBoard()->SetHighLightNet( pad->GetNetCode() ); } else // A track segment is found { TrackOnStartPoint = (TRACK*) LockPoint; - GetBoard()->SetHighLightNet( TrackOnStartPoint->GetNet() ); + GetBoard()->SetHighLightNet( TrackOnStartPoint->GetNetCode() ); GetBoard()->CreateLockPoint( pos, TrackOnStartPoint, &s_ItemsListPicker ); } } @@ -153,7 +153,7 @@ TRACK* PCB_EDIT_FRAME::Begin_Route( TRACK* aTrack, wxDC* aDC ) -1 ); if( zone ) - GetBoard()->SetHighLightNet( zone->GetNet() ); + GetBoard()->SetHighLightNet( zone->GetNetCode() ); } DBG( g_CurrentTrackList.VerifyListIntegrity() ); @@ -166,7 +166,7 @@ TRACK* PCB_EDIT_FRAME::Begin_Route( TRACK* aTrack, wxDC* aDC ) GetBoard()->DrawHighLight( m_canvas, aDC, GetBoard()->GetHighLightNetCode() ); // Display info about track Net class, and init track and vias sizes: - g_CurrentTrackSegment->SetNet( GetBoard()->GetHighLightNetCode() ); + g_CurrentTrackSegment->SetNetCode( GetBoard()->GetHighLightNetCode() ); GetBoard()->SetCurrentNetClass( g_CurrentTrackSegment->GetNetClassName() ); g_CurrentTrackSegment->SetLayer( GetScreen()->m_Active_Layer ); @@ -476,7 +476,7 @@ bool PCB_EDIT_FRAME::End_Route( TRACK* aTrack, wxDC* aDC ) // g_FirstTrackSegment can be NULL on a double click on the starting point if( g_FirstTrackSegment != NULL ) { - int netcode = g_FirstTrackSegment->GetNet(); + int netcode = g_FirstTrackSegment->GetNetCode(); TRACK* firstTrack = g_FirstTrackSegment; int newCount = g_CurrentTrackList.GetCount(); @@ -540,7 +540,7 @@ bool PCB_EDIT_FRAME::End_Route( TRACK* aTrack, wxDC* aDC ) TRACK* LocateIntrusion( TRACK* listStart, TRACK* aTrack, LAYER_NUM aLayer, const wxPoint& aRef ) { - int net = aTrack->GetNet(); + int net = aTrack->GetNetCode(); int width = aTrack->GetWidth(); TRACK* found = NULL; @@ -555,7 +555,7 @@ TRACK* LocateIntrusion( TRACK* listStart, TRACK* aTrack, LAYER_NUM aLayer, const if( aLayer != track->GetLayer() ) continue; - if( track->GetNet() == net ) + if( track->GetNetCode() == net ) continue; // TRACK::HitTest @@ -614,7 +614,7 @@ static void PushTrack( EDA_DRAW_PANEL* panel ) if( !other ) return; - if( other->GetNet() == track->GetNet() ) + if( other->GetNetCode() == track->GetNetCode() ) return; cv = cursor - other->GetStart(); diff --git a/pcbnew/exporters/export_d356.cpp b/pcbnew/exporters/export_d356.cpp index e8ef8f3fbf..1c64ff64bd 100644 --- a/pcbnew/exporters/export_d356.cpp +++ b/pcbnew/exporters/export_d356.cpp @@ -199,7 +199,7 @@ static void build_via_testpoints( BOARD *aPcb, if( track->Type() == PCB_VIA_T ) { SEGVIA *via = (SEGVIA*) track; - NETINFO_ITEM *net = aPcb->FindNet( track->GetNet() ); + NETINFO_ITEM *net = track->GetNet(); D356_RECORD rk; rk.smd = false; diff --git a/pcbnew/exporters/export_gencad.cpp b/pcbnew/exporters/export_gencad.cpp index 394a39f808..638d22f55d 100644 --- a/pcbnew/exporters/export_gencad.cpp +++ b/pcbnew/exporters/export_gencad.cpp @@ -663,7 +663,7 @@ static void CreateSignalsSection( FILE* aFile, BOARD* aPcb ) { wxString padname; - if( pad->GetNet() != net->GetNet() ) + if( pad->GetNetCode() != net->GetNet() ) continue; pad->ReturnStringPadName( padname ); @@ -730,7 +730,7 @@ static int TrackListSortByNetcode( const void* refptr, const void* objptr ) ref = *( (TRACK**) refptr ); cmp = *( (TRACK**) objptr ); - if( ( diff = ref->GetNet() - cmp->GetNet() ) ) + if( ( diff = ref->GetNetCode() - cmp->GetNetCode() ) ) return diff; if( ( diff = ref->GetWidth() - cmp->GetWidth() ) ) @@ -797,10 +797,10 @@ static void CreateRoutesSection( FILE* aFile, BOARD* aPcb ) { track = tracklist[ii]; - if( old_netcode != track->GetNet() ) + if( old_netcode != track->GetNetCode() ) { - old_netcode = track->GetNet(); - NETINFO_ITEM* net = aPcb->FindNet( track->GetNet() ); + old_netcode = track->GetNetCode(); + NETINFO_ITEM* net = track->GetNet(); wxString netname; if( net && (net->GetNetname() != wxEmptyString) ) diff --git a/pcbnew/highlight.cpp b/pcbnew/highlight.cpp index fc8e805ed1..d4188bdb4d 100644 --- a/pcbnew/highlight.cpp +++ b/pcbnew/highlight.cpp @@ -142,7 +142,7 @@ int PCB_EDIT_FRAME::SelectHighLight( wxDC* DC ) switch( item->Type() ) { case PCB_PAD_T: - netcode = ( (D_PAD*) item )->GetNet(); + netcode = ( (D_PAD*) item )->GetNetCode(); SendMessageToEESCHEMA( item ); break; @@ -151,11 +151,11 @@ int PCB_EDIT_FRAME::SelectHighLight( wxDC* DC ) case PCB_ZONE_T: // since these classes are all derived from TRACK, use a common // GetNet() function: - netcode = ( (TRACK*) item )->GetNet(); + netcode = ( (TRACK*) item )->GetNetCode(); break; case PCB_ZONE_AREA_T: - netcode = ( (ZONE_CONTAINER*) item )->GetNet(); + netcode = ( (ZONE_CONTAINER*) item )->GetNetCode(); break; default: diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index 36342dcd47..90bd3d8772 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -1230,8 +1230,8 @@ void PCB_IO::format( D_PAD* aPad, int aNestLevel ) const std::string output; // Unconnected pad is default net so don't save it. - if( !(m_ctl & CTL_OMIT_NETS) && aPad->GetNet() != 0 ) - StrPrintf( &output, " (net %d %s)", m_mapping->Translate( aPad->GetNet() ), + if( !(m_ctl & CTL_OMIT_NETS) && aPad->GetNetCode() != 0 ) + StrPrintf( &output, " (net %d %s)", m_mapping->Translate( aPad->GetNetCode() ), m_out->Quotew( aPad->GetNetname() ).c_str() ); if( aPad->GetPadToDieLength() != 0 ) @@ -1389,7 +1389,7 @@ void PCB_IO::format( TRACK* aTrack, int aNestLevel ) const m_out->Print( 0, " (layer %s)", m_out->Quotew( aTrack->GetLayerName() ).c_str() ); } - m_out->Print( 0, " (net %d)", m_mapping->Translate( aTrack->GetNet() ) ); + m_out->Print( 0, " (net %d)", m_mapping->Translate( aTrack->GetNetCode() ) ); if( aTrack->GetTimeStamp() != 0 ) m_out->Print( 0, " (tstamp %lX)", aTrack->GetTimeStamp() ); @@ -1408,7 +1408,7 @@ void PCB_IO::format( ZONE_CONTAINER* aZone, int aNestLevel ) const // so be sure a dummy value is stored, just for ZONE_CONTAINER compatibility // (perhaps netcode and netname should be not stored) m_out->Print( aNestLevel, "(zone (net %d) (net_name %s)", - aZone->GetIsKeepout() ? 0 : m_mapping->Translate( aZone->GetNet() ), + aZone->GetIsKeepout() ? 0 : m_mapping->Translate( aZone->GetNetCode() ), m_out->Quotew( aZone->GetIsKeepout() ? wxT("") : aZone->GetNetname() ).c_str() ); formatLayer( aZone ); diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index 97777200ea..c4594c9264 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -1299,7 +1299,7 @@ void LEGACY_PLUGIN::loadPAD( MODULE* aModule ) char buf[1024]; // can be fairly long int netcode = intParse( line + SZ( "Ne" ), &data ); - pad->SetNet( netcode ); + pad->SetNetCode( netcode ); // read Netname ReadDelimitedText( buf, data, sizeof(buf) ); @@ -2090,7 +2090,7 @@ void LEGACY_PLUGIN::loadTrackList( int aStructType ) ( (SEGVIA*) newTrack )->SetLayerPair( LAYER_N_FRONT, LAYER_N_BACK ); } - newTrack->SetNet( net_code ); + newTrack->SetNetCode( net_code ); newTrack->SetState( flags, true ); } @@ -2240,7 +2240,7 @@ void LEGACY_PLUGIN::loadZONE_CONTAINER() // Init the net code only, not the netname, to be sure // the zone net name is the name read in file. // (When mismatch, the user will be prompted in DRC, to fix the actual name) - zc->BOARD_CONNECTED_ITEM::SetNet( netcode ); + zc->BOARD_CONNECTED_ITEM::SetNetCode( netcode ); } else if( TESTLINE( "ZLayer" ) ) // layer found @@ -2424,7 +2424,7 @@ void LEGACY_PLUGIN::loadZONE_CONTAINER() // Ensure keepout does not have a net // (which have no sense for a keepout zone) if( zc->GetIsKeepout() ) - zc->SetNet( NETINFO_LIST::UNCONNECTED ); + zc->SetNetCode( NETINFO_LIST::UNCONNECTED ); // should always occur, but who knows, a zone without two corners // is no zone at all, it's a spot? @@ -2434,7 +2434,7 @@ void LEGACY_PLUGIN::loadZONE_CONTAINER() if( !zc->IsOnCopperLayer() ) { zc->SetFillMode( 0 ); - zc->SetNet( NETINFO_LIST::UNCONNECTED ); + zc->SetNetCode( NETINFO_LIST::UNCONNECTED ); } // Hatch here, after outlines corners are read @@ -3373,7 +3373,7 @@ void LEGACY_PLUGIN::savePAD( const D_PAD* me ) const fprintf( m_fp, "At %s N %08X\n", texttype, me->GetLayerMask() ); - fprintf( m_fp, "Ne %d %s\n", me->GetNet(), EscapedUTF8( me->GetNetname() ).c_str() ); + fprintf( m_fp, "Ne %d %s\n", me->GetNetCode(), EscapedUTF8( me->GetNetname() ).c_str() ); fprintf( m_fp, "Po %s\n", fmtBIUPoint( me->GetPos0() ).c_str() ); @@ -3633,7 +3633,7 @@ void LEGACY_PLUGIN::saveTRACK( const TRACK* me ) const "-1" : fmtBIU( me->GetDrill() ).c_str() ); fprintf(m_fp, "De %d %d %d %lX %X\n", - me->GetLayer(), type, me->GetNet(), + me->GetLayer(), type, me->GetNetCode(), me->GetTimeStamp(), me->GetStatus() ); } @@ -3647,7 +3647,7 @@ void LEGACY_PLUGIN::saveZONE_CONTAINER( const ZONE_CONTAINER* me ) const // just for ZONE_CONTAINER compatibility fprintf( m_fp, "ZInfo %lX %d %s\n", me->GetTimeStamp(), - me->GetIsKeepout() ? 0 : me->GetNet(), + me->GetIsKeepout() ? 0 : me->GetNetCode(), EscapedUTF8( me->GetIsKeepout() ? wxT("") : me->GetNetname() ).c_str() ); // Save the outline layer info diff --git a/pcbnew/magnetic_tracks_functions.cpp b/pcbnew/magnetic_tracks_functions.cpp index 8f7a8e5064..5c84d0d6d8 100644 --- a/pcbnew/magnetic_tracks_functions.cpp +++ b/pcbnew/magnetic_tracks_functions.cpp @@ -161,7 +161,7 @@ bool Magnetize( PCB_EDIT_FRAME* frame, int aCurrentTool, wxSize aGridSize, if( pad ) { - if( doCheckNet && currTrack && currTrack->GetNet() != pad->GetNet() ) + if( doCheckNet && currTrack && currTrack->GetNetCode() != pad->GetNetCode() ) return false; *curpos = pad->GetPosition(); @@ -180,7 +180,7 @@ bool Magnetize( PCB_EDIT_FRAME* frame, int aCurrentTool, wxSize aGridSize, { if( via != currTrack ) // a via cannot influence itself { - if( !doCheckNet || !currTrack || currTrack->GetNet() == via->GetNet() ) + if( !doCheckNet || !currTrack || currTrack->GetNetCode() == via->GetNetCode() ) { *curpos = via->GetStart(); // D(printf("via hit\n");) @@ -223,7 +223,7 @@ bool Magnetize( PCB_EDIT_FRAME* frame, int aCurrentTool, wxSize aGridSize, if( track->Type() != PCB_TRACE_T ) continue; - if( doCheckNet && currTrack && currTrack->GetNet() != track->GetNet() ) + if( doCheckNet && currTrack && currTrack->GetNetCode() != track->GetNetCode() ) continue; if( m_Pcb->IsLayerVisible( track->GetLayer() ) == false ) diff --git a/pcbnew/move_or_drag_track.cpp b/pcbnew/move_or_drag_track.cpp index 968ea993ec..6525d7abd7 100644 --- a/pcbnew/move_or_drag_track.cpp +++ b/pcbnew/move_or_drag_track.cpp @@ -627,7 +627,7 @@ void PCB_EDIT_FRAME::StartMoveOneNodeOrSegment( TRACK* aTrack, wxDC* aDC, int aC { Collect_TrackSegmentsToDrag( GetBoard(), aTrack->GetStart(), aTrack->GetLayerMask(), - aTrack->GetNet(), aTrack->GetWidth() / 2 ); + aTrack->GetNetCode(), aTrack->GetWidth() / 2 ); } PosInit = aTrack->GetStart(); @@ -647,17 +647,17 @@ void PCB_EDIT_FRAME::StartMoveOneNodeOrSegment( TRACK* aTrack, wxDC* aDC, int aC case ID_POPUP_PCB_DRAG_TRACK_SEGMENT: // drag a segment pos = aTrack->GetStart(); Collect_TrackSegmentsToDrag( GetBoard(), pos, aTrack->GetLayerMask(), - aTrack->GetNet(), aTrack->GetWidth() / 2 ); + aTrack->GetNetCode(), aTrack->GetWidth() / 2 ); pos = aTrack->GetEnd(); aTrack->SetFlags( IS_DRAGGED | ENDPOINT | STARTPOINT ); Collect_TrackSegmentsToDrag( GetBoard(), pos, aTrack->GetLayerMask(), - aTrack->GetNet(), aTrack->GetWidth() / 2 ); + aTrack->GetNetCode(), aTrack->GetWidth() / 2 ); break; case ID_POPUP_PCB_MOVE_TRACK_NODE: // Drag via or move node pos = (diag & STARTPOINT) ? aTrack->GetStart() : aTrack->GetEnd(); Collect_TrackSegmentsToDrag( GetBoard(), pos, aTrack->GetLayerMask(), - aTrack->GetNet(), aTrack->GetWidth() / 2 ); + aTrack->GetNetCode(), aTrack->GetWidth() / 2 ); PosInit = pos; break; } @@ -684,7 +684,7 @@ void PCB_EDIT_FRAME::StartMoveOneNodeOrSegment( TRACK* aTrack, wxDC* aDC, int aC s_LastPos = PosInit; m_canvas->SetMouseCapture( Show_MoveNode, Abort_MoveTrack ); - GetBoard()->SetHighLightNet( aTrack->GetNet() ); + GetBoard()->SetHighLightNet( aTrack->GetNetCode() ); GetBoard()->HighLightON(); GetBoard()->DrawHighLight( m_canvas, aDC, GetBoard()->GetHighLightNetCode() ); @@ -792,7 +792,7 @@ void PCB_EDIT_FRAME::Start_DragTrackSegmentAndKeepSlope( TRACK* track, wxDC* DC s_LastPos = GetCrossHairPosition(); m_canvas->SetMouseCapture( Show_Drag_Track_Segment_With_Cte_Slope, Abort_MoveTrack ); - GetBoard()->SetHighLightNet( track->GetNet() ); + GetBoard()->SetHighLightNet( track->GetNetCode() ); GetBoard()->HighLightON(); GetBoard()->DrawHighLight( m_canvas, DC, GetBoard()->GetHighLightNetCode() ); @@ -828,7 +828,7 @@ bool PCB_EDIT_FRAME::PlaceDraggedOrMovedTrackSegment( TRACK* Track, wxDC* DC ) if( Track == NULL ) return false; - int current_net_code = Track->GetNet(); + int current_net_code = Track->GetNetCode(); // DRC control: if( g_Drc_On ) diff --git a/pcbnew/pad_edition_functions.cpp b/pcbnew/pad_edition_functions.cpp index e73e8d829a..89cb8717a5 100644 --- a/pcbnew/pad_edition_functions.cpp +++ b/pcbnew/pad_edition_functions.cpp @@ -141,7 +141,7 @@ void PCB_BASE_FRAME::AddPad( MODULE* aModule, bool draw ) // Update the pad properties. Import_Pad_Settings( pad, false ); - pad->SetNet( NETINFO_LIST::UNCONNECTED ); + pad->SetNetCode( NETINFO_LIST::UNCONNECTED ); pad->SetPosition( GetCrossHairPosition() ); diff --git a/pcbnew/pcad2kicadpcb_plugin/pcb_line.cpp b/pcbnew/pcad2kicadpcb_plugin/pcb_line.cpp index ad18b26748..28112177f9 100644 --- a/pcbnew/pcad2kicadpcb_plugin/pcb_line.cpp +++ b/pcbnew/pcad2kicadpcb_plugin/pcb_line.cpp @@ -147,7 +147,7 @@ void PCB_LINE::AddToBoard() track->SetWidth( m_width ); track->SetLayer( m_KiCadLayer ); - track->SetNet( m_netCode ); + track->SetNetCode( m_netCode ); } else { diff --git a/pcbnew/pcad2kicadpcb_plugin/pcb_pad.cpp b/pcbnew/pcad2kicadpcb_plugin/pcb_pad.cpp index 55b50c49a5..4985958fc9 100644 --- a/pcbnew/pcad2kicadpcb_plugin/pcb_pad.cpp +++ b/pcbnew/pcad2kicadpcb_plugin/pcb_pad.cpp @@ -282,7 +282,7 @@ void PCB_PAD::AddToModule( MODULE* aModule, int aRotation, bool aEncapsulatedPad m_board->AppendNet( netinfo ); } - pad->SetNet( netinfo->GetNet() ); + pad->SetNetCode( netinfo->GetNet() ); } if( !aEncapsulatedPad ) @@ -343,7 +343,7 @@ void PCB_PAD::AddToBoard() via->SetDrill( m_hole ); via->SetLayer( m_KiCadLayer ); - via->SetNet( m_netCode ); + via->SetNetCode( m_netCode ); } } else // pad diff --git a/pcbnew/pcad2kicadpcb_plugin/pcb_polygon.cpp b/pcbnew/pcad2kicadpcb_plugin/pcb_polygon.cpp index 5fab0055e8..6d7045fb94 100644 --- a/pcbnew/pcad2kicadpcb_plugin/pcb_polygon.cpp +++ b/pcbnew/pcad2kicadpcb_plugin/pcb_polygon.cpp @@ -171,7 +171,7 @@ void PCB_POLYGON::AddToBoard() zone->SetTimeStamp( m_timestamp ); zone->SetLayer( m_KiCadLayer ); - zone->SetNet( m_netCode ); + zone->SetNetCode( m_netCode ); // add outline int outline_hatch = CPolyLine::DIAGONAL_EDGE; diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 72fd6dd0c3..1a492ad47d 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -152,7 +152,7 @@ const COLOR4D& PCB_RENDER_SETTINGS::GetColor( const VIEW_ITEM* aItem, int aLayer // Try to obtain the netcode for the item const BOARD_CONNECTED_ITEM* item = dynamic_cast( aItem ); if( item ) - netCode = item->GetNet(); + netCode = item->GetNetCode(); } // Return grayish color for non-highlighted layers in the high contrast mode @@ -261,12 +261,11 @@ void PCB_PAINTER::draw( const TRACK* aTrack, int aLayer ) VECTOR2D start( aTrack->GetStart() ); VECTOR2D end( aTrack->GetEnd() ); int width = aTrack->GetWidth(); - int netNumber = aTrack->GetNet(); if( m_pcbSettings->m_netNamesOnTracks && IsNetnameLayer( aLayer ) ) { // If there is a net name - display it on the track - if( netNumber > 0 ) + if( aTrack->GetNetCode() > NETINFO_LIST::UNCONNECTED ) { VECTOR2D line = ( end - start ); double length = line.EuclideanNorm(); diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index 33bfd5e587..f82814311e 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -2190,9 +2190,9 @@ D_PAD* PCB_PARSER::parseD_PAD( MODULE* aParent ) throw( IO_ERROR, PARSE_ERROR ) break; case T_net: - pad->SetNet( parseInt( "net number" ) ); + pad->SetNetCode( parseInt( "net number" ) ); NeedSYMBOLorNUMBER(); - assert( FromUTF8() == m_board->FindNet( pad->GetNet() )->GetNetname() ); + assert( FromUTF8() == m_board->FindNet( pad->GetNetCode() )->GetNetname() ); NeedRIGHT(); break; @@ -2288,7 +2288,7 @@ TRACK* PCB_PARSER::parseTRACK() throw( IO_ERROR, PARSE_ERROR ) break; case T_net: - track->SetNet( parseInt( "net number" ) ); + track->SetNetCode( parseInt( "net number" ) ); break; case T_tstamp: @@ -2366,7 +2366,7 @@ SEGVIA* PCB_PARSER::parseSEGVIA() throw( IO_ERROR, PARSE_ERROR ) break; case T_net: - via->SetNet( parseInt( "net number" ) ); + via->SetNetCode( parseInt( "net number" ) ); NeedRIGHT(); break; @@ -2418,18 +2418,18 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER() throw( IO_ERROR, PARSE_ERROR ) // Init the net code only, not the netname, to be sure // the zone net name is the name read in file. // (When mismatch, the user will be prompted in DRC, to fix the actual name) - zone->SetNet( parseInt( "net number" ) ); + zone->SetNetCode( parseInt( "net number" ) ); NeedRIGHT(); break; case T_net_name: NeedSYMBOLorNUMBER(); - if( m_board->FindNet( zone->GetNet() )->GetNetname() != FromUTF8() ) + if( zone->GetNet()->GetNetname() != FromUTF8() ) { wxString msg = _( "There is a zone that belongs to a not " "existing net (" ) + FromUTF8() + _("), you should verify it." ); DisplayError( NULL, msg ); - zone->SetNet( NETINFO_LIST::UNCONNECTED ); + zone->SetNetCode( NETINFO_LIST::UNCONNECTED ); } NeedRIGHT(); break; @@ -2694,7 +2694,7 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER() throw( IO_ERROR, PARSE_ERROR ) if( !zone->IsOnCopperLayer() ) { zone->SetFillMode( 0 ); - zone->SetNet( NETINFO_LIST::UNCONNECTED ); + zone->SetNetCode( NETINFO_LIST::UNCONNECTED ); } // Set hatch here, after outlines corners are read @@ -2706,7 +2706,7 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER() throw( IO_ERROR, PARSE_ERROR ) // Ensure keepout does not have a net (which have no sense for a keepout zone) if( zone->GetIsKeepout() ) - zone->SetNet( NETINFO_LIST::UNCONNECTED ); + zone->SetNetCode( NETINFO_LIST::UNCONNECTED ); return zone.release(); } diff --git a/pcbnew/ratsnest.cpp b/pcbnew/ratsnest.cpp index 32dba7213d..028c632568 100644 --- a/pcbnew/ratsnest.cpp +++ b/pcbnew/ratsnest.cpp @@ -74,7 +74,7 @@ void MIN_SPAN_TREE_PADS::AddTreeToRatsnest( std::vector &aRatsnes if( padsBuffer.empty() ) return; - int netcode = padsBuffer[0]->GetNet(); + int netcode = padsBuffer[0]->GetNetCode(); // Note: to get edges in minimum spanning tree, // the index value 0 is not used: it is just // the entry point of the minimum spanning tree. @@ -182,7 +182,7 @@ void PCB_BASE_FRAME::Compile_Ratsnest( wxDC* aDC, bool aDisplayStatus ) */ static bool sortByNetcode( const D_PAD* const & ref, const D_PAD* const & item ) { - return ref->GetNet() < item->GetNet(); + return ref->GetNetCode() < item->GetNetCode(); } @@ -540,7 +540,7 @@ void PCB_BASE_FRAME::build_ratsnest_module( MODULE* aModule ) // collect active pads of the module: for( pad_ref = aModule->Pads(); pad_ref != NULL; pad_ref = pad_ref->Next() ) { - if( pad_ref->GetNet() == NETINFO_LIST::UNCONNECTED ) + if( pad_ref->GetNetCode() == NETINFO_LIST::UNCONNECTED ) continue; localPadList.push_back( pad_ref ); @@ -562,11 +562,11 @@ void PCB_BASE_FRAME::build_ratsnest_module( MODULE* aModule ) { pad_ref = localPadList[ii]; - if( pad_ref->GetNet() == current_net_code ) + if( pad_ref->GetNetCode() == current_net_code ) continue; // A new net was found, load all pads of others modules members of this net: - NETINFO_ITEM* net = m_Pcb->FindNet( pad_ref->GetNet() ); + NETINFO_ITEM* net = pad_ref->GetNet(); if( net == NULL ) //Should not occur { @@ -597,7 +597,7 @@ void PCB_BASE_FRAME::build_ratsnest_module( MODULE* aModule ) * footprint pads it is therefore not time consuming, and it is made only * once */ - current_net_code = localPadList[0]->GetNet(); + current_net_code = localPadList[0]->GetNetCode(); MIN_SPAN_TREE_PADS min_spanning_tree; std::vector padsBuffer; // contains pads of only one net @@ -611,7 +611,7 @@ void PCB_BASE_FRAME::build_ratsnest_module( MODULE* aModule ) if( jj >= pads_module_count ) break; - if( localPadList[jj]->GetNet() != current_net_code ) + if( localPadList[jj]->GetNetCode() != current_net_code ) break; } @@ -623,7 +623,7 @@ void PCB_BASE_FRAME::build_ratsnest_module( MODULE* aModule ) padsBuffer.clear(); ii = jj; if( ii < localPadList.size() ) - current_net_code = localPadList[ii]->GetNet(); + current_net_code = localPadList[ii]->GetNetCode(); } internalRatsCount = m_Pcb->m_LocalRatsnest.size(); @@ -655,13 +655,13 @@ void PCB_BASE_FRAME::build_ratsnest_module( MODULE* aModule ) m_Pcb->m_LocalRatsnest.erase( m_Pcb->m_LocalRatsnest.begin() + internalRatsCount, m_Pcb->m_LocalRatsnest.end() ); - current_net_code = localPadList[0]->GetNet(); + current_net_code = localPadList[0]->GetNetCode(); for( unsigned ii = 0; ii < pads_module_count; ii++ ) { pad_ref = localPadList[ii]; - if( pad_ref->GetNet() != current_net_code ) + if( pad_ref->GetNetCode() != current_net_code ) { // if needed, creates a new ratsnest for the old net if( addRats ) @@ -670,7 +670,7 @@ void PCB_BASE_FRAME::build_ratsnest_module( MODULE* aModule ) } addRats = false; - current_net_code = pad_ref->GetNet(); + current_net_code = pad_ref->GetNetCode(); local_rats.m_Lenght = INT_MAX; } @@ -682,10 +682,10 @@ void PCB_BASE_FRAME::build_ratsnest_module( MODULE* aModule ) pad_externe = localPadList[jj]; // we search pads having the same net code - if( pad_externe->GetNet() < pad_ref->GetNet() ) + if( pad_externe->GetNetCode() < pad_ref->GetNetCode() ) continue; - if( pad_externe->GetNet() > pad_ref->GetNet() ) // pads are sorted by net code + if( pad_externe->GetNetCode() > pad_ref->GetNetCode() ) // pads are sorted by net code break; distance = abs( pad_externe->GetPosition().x - pad_pos.x ) + @@ -695,7 +695,7 @@ void PCB_BASE_FRAME::build_ratsnest_module( MODULE* aModule ) { local_rats.m_PadStart = pad_ref; local_rats.m_PadEnd = pad_externe; - local_rats.SetNet( pad_ref->GetNet() ); + local_rats.SetNet( pad_ref->GetNetCode() ); local_rats.m_Lenght = distance; local_rats.m_Status = 0; @@ -813,7 +813,7 @@ void PCB_BASE_FRAME::BuildAirWiresTargetsList( BOARD_CONNECTED_ITEM* aItemRef, if( aItemRef == NULL ) return; - int net_code = aItemRef->GetNet(); + int net_code = aItemRef->GetNetCode(); int subnet = aItemRef->GetSubNet(); if( net_code <= 0 ) @@ -844,9 +844,9 @@ void PCB_BASE_FRAME::BuildAirWiresTargetsList( BOARD_CONNECTED_ITEM* aItemRef, // current track: for( TRACK* track = m_Pcb->m_Track; track; track = track->Next() ) { - if( track->GetNet() < net_code ) + if( track->GetNetCode() < net_code ) continue; - if( track->GetNet() > net_code ) + if( track->GetNetCode() > net_code ) break;; if( !track->GetSubNet() || (track->GetSubNet() != subnet) ) diff --git a/pcbnew/ratsnest_data.cpp b/pcbnew/ratsnest_data.cpp index 80d082a9b3..b3061cc19b 100644 --- a/pcbnew/ratsnest_data.cpp +++ b/pcbnew/ratsnest_data.cpp @@ -709,7 +709,7 @@ void RN_DATA::AddSimple( const BOARD_ITEM* aItem ) if( aItem->IsConnected() ) { const BOARD_CONNECTED_ITEM* item = static_cast( aItem ); - net = item->GetNet(); + net = item->GetNetCode(); if( net < 1 ) // do not process unconnected items return; @@ -739,7 +739,7 @@ void RN_DATA::AddBlocked( const BOARD_ITEM* aItem ) if( aItem->IsConnected() ) { const BOARD_CONNECTED_ITEM* item = static_cast( aItem ); - net = item->GetNet(); + net = item->GetNetCode(); if( net < 1 ) // do not process unconnected items return; @@ -825,7 +825,7 @@ void RN_DATA::Add( const BOARD_ITEM* aItem ) if( aItem->IsConnected() ) { - net = static_cast( aItem )->GetNet(); + net = static_cast( aItem )->GetNetCode(); if( net < 1 ) // do not process unconnected items return; @@ -838,7 +838,7 @@ void RN_DATA::Add( const BOARD_ITEM* aItem ) const MODULE* module = static_cast( aItem ); for( const D_PAD* pad = module->Pads().GetFirst(); pad; pad = pad->Next() ) { - net = pad->GetNet(); + net = pad->GetNetCode(); if( net < 1 ) // do not process unconnected items continue; @@ -884,7 +884,7 @@ void RN_DATA::Remove( const BOARD_ITEM* aItem ) if( aItem->IsConnected() ) { - net = static_cast( aItem )->GetNet(); + net = static_cast( aItem )->GetNetCode(); if( net < 1 ) // do not process unconnected items return; } @@ -893,7 +893,7 @@ void RN_DATA::Remove( const BOARD_ITEM* aItem ) const MODULE* module = static_cast( aItem ); for( const D_PAD* pad = module->Pads().GetFirst(); pad; pad = pad->Next() ) { - net = pad->GetNet(); + net = pad->GetNetCode(); if( net < 1 ) // do not process unconnected items continue; @@ -945,21 +945,21 @@ void RN_DATA::ProcessBoard() for( MODULE* module = m_board->m_Modules; module; module = module->Next() ) { for( D_PAD* pad = module->Pads().GetFirst(); pad; pad = pad->Next() ) - m_nets[pad->GetNet()].AddItem( pad ); + m_nets[pad->GetNetCode()].AddItem( pad ); } for( TRACK* track = m_board->m_Track; track; track = track->Next() ) { if( track->Type() == PCB_VIA_T ) - m_nets[track->GetNet()].AddItem( static_cast( track ) ); + m_nets[track->GetNetCode()].AddItem( static_cast( track ) ); else if( track->Type() == PCB_TRACE_T ) - m_nets[track->GetNet()].AddItem( track ); + m_nets[track->GetNetCode()].AddItem( track ); } for( int i = 0; i < m_board->GetAreaCount(); ++i ) { ZONE_CONTAINER* zone = m_board->GetArea( i ); - m_nets[zone->GetNet()].AddItem( zone ); + m_nets[zone->GetNetCode()].AddItem( zone ); } } diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index 8ab4fb2fc9..f483d1c428 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -130,7 +130,7 @@ PNS_ITEM* PNS_ROUTER::syncPad( D_PAD* aPad ) PNS_SOLID* solid = new PNS_SOLID; solid->SetLayers( layers ); - solid->SetNet( aPad->GetNet() ); + solid->SetNet( aPad->GetNetCode() ); wxPoint wx_c = aPad->GetPosition(); wxSize wx_sz = aPad->GetSize(); @@ -181,7 +181,7 @@ PNS_ITEM* PNS_ROUTER::syncPad( D_PAD* aPad ) PNS_ITEM* PNS_ROUTER::syncTrack( TRACK* aTrack ) { PNS_SEGMENT* s = - new PNS_SEGMENT( SEG( aTrack->GetStart(), aTrack->GetEnd() ), aTrack->GetNet() ); + new PNS_SEGMENT( SEG( aTrack->GetStart(), aTrack->GetEnd() ), aTrack->GetNetCode() ); s->SetWidth( aTrack->GetWidth() ); s->SetLayers( PNS_LAYERSET( aTrack->GetLayer() ) ); @@ -196,7 +196,7 @@ PNS_ITEM* PNS_ROUTER::syncVia( SEGVIA* aVia ) aVia->GetPosition(), PNS_LAYERSET( 0, 15 ), aVia->GetWidth(), - aVia->GetNet() ); + aVia->GetNetCode() ); v->SetParent( aVia ); return v; @@ -612,7 +612,7 @@ void PNS_ROUTER::commitRouting( PNS_NODE* aNode ) track->SetEnd( wxPoint( s.B.x, s.B.y ) ); track->SetWidth( seg->GetWidth() ); track->SetLayer( seg->GetLayers().Start() ); - track->SetNet( seg->GetNet() ); + track->SetNetCode( seg->GetNet() ); newBI = track; break; } @@ -623,7 +623,7 @@ void PNS_ROUTER::commitRouting( PNS_NODE* aNode ) PNS_VIA* via = static_cast( item ); via_board->SetPosition( wxPoint( via->GetPos().x, via->GetPos().y ) ); via_board->SetWidth( via->GetDiameter() ); - via_board->SetNet( via->GetNet() ); + via_board->SetNetCode( via->GetNet() ); newBI = via_board; break; } diff --git a/pcbnew/specctra_export.cpp b/pcbnew/specctra_export.cpp index 5d1140a181..2ac40ef5af 100644 --- a/pcbnew/specctra_export.cpp +++ b/pcbnew/specctra_export.cpp @@ -692,7 +692,7 @@ IMAGE* SPECCTRA_DB::makeIMAGE( BOARD* aBoard, MODULE* aModule ) pin->pin_id += buf; // append "@1" or "@2", etc. to pin name } - pin->kiNetCode = pad->GetNet(); + pin->kiNetCode = pad->GetNetCode(); image->pins.push_back( pin ); @@ -1922,7 +1922,7 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IO_ERROR ) { TRACK* track = (TRACK*) items[i]; - int netcode = track->GetNet(); + int netcode = track->GetNetCode(); if( netcode == 0 ) continue; @@ -1981,7 +1981,7 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IO_ERROR ) SEGVIA* via = (SEGVIA*) items[i]; wxASSERT( via->Type() == PCB_VIA_T ); - int netcode = via->GetNet(); + int netcode = via->GetNetCode(); if( netcode == 0 ) continue; diff --git a/pcbnew/specctra_import.cpp b/pcbnew/specctra_import.cpp index 9b541d1ed8..06d9a61843 100644 --- a/pcbnew/specctra_import.cpp +++ b/pcbnew/specctra_import.cpp @@ -207,7 +207,7 @@ TRACK* SPECCTRA_DB::makeTRACK( PATH* aPath, int aPointIndex, int aNetcode ) thro track->SetEnd( mapPt( aPath->points[aPointIndex+1], routeResolution ) ); track->SetLayer( pcbLayer2kicad[layerNdx] ); track->SetWidth( scale( aPath->aperture_width, routeResolution ) ); - track->SetNet( aNetcode ); + track->SetNetCode( aNetcode ); return track; } @@ -339,7 +339,7 @@ SEGVIA* SPECCTRA_DB::makeVIA( PADSTACK* aPadstack, const POINT& aPoint, int aNet } if( via ) - via->SetNet( aNetCode ); + via->SetNetCode( aNetCode ); return via; } diff --git a/pcbnew/tr_modif.cpp b/pcbnew/tr_modif.cpp index d4aa7eb5a6..59c0f042fb 100644 --- a/pcbnew/tr_modif.cpp +++ b/pcbnew/tr_modif.cpp @@ -72,7 +72,7 @@ int PCB_EDIT_FRAME::EraseRedundantTrack( wxDC* aDC, wxPoint end; LAYER_MSK startmasklayer, endmasklayer; - int netcode = aNewTrack->GetNet(); + int netcode = aNewTrack->GetNetCode(); /* Reconstruct the complete track (the new track has to start on a segment of track). */ diff --git a/pcbnew/tracepcb.cpp b/pcbnew/tracepcb.cpp index ccd092fcca..06ffe75859 100644 --- a/pcbnew/tracepcb.cpp +++ b/pcbnew/tracepcb.cpp @@ -250,7 +250,7 @@ void BOARD::DrawHighLight( EDA_DRAW_PANEL* am_canvas, wxDC* DC, int aNetCode ) for( BOARD::ZONE_CONTAINERS::iterator zc = zones.begin(); zc!=zones.end(); ++zc ) { - if( (*zc)->GetNet() == aNetCode ) + if( (*zc)->GetNetCode() == aNetCode ) { (*zc)->Draw( am_canvas, DC, draw_mode ); } @@ -261,7 +261,7 @@ void BOARD::DrawHighLight( EDA_DRAW_PANEL* am_canvas, wxDC* DC, int aNetCode ) { for( D_PAD* pad = module->Pads(); pad; pad = pad->Next() ) { - if( pad->GetNet() == aNetCode ) + if( pad->GetNetCode() == aNetCode ) { pad->Draw( am_canvas, DC, draw_mode ); } @@ -271,7 +271,7 @@ void BOARD::DrawHighLight( EDA_DRAW_PANEL* am_canvas, wxDC* DC, int aNetCode ) // Redraw track and vias that have aNetCode for( TRACK* seg = m_Track; seg; seg = seg->Next() ) { - if( seg->GetNet() == aNetCode ) + if( seg->GetNetCode() == aNetCode ) { seg->Draw( am_canvas, DC, draw_mode ); } diff --git a/pcbnew/xchgmod.cpp b/pcbnew/xchgmod.cpp index 40fde81e06..74b5a58e0c 100644 --- a/pcbnew/xchgmod.cpp +++ b/pcbnew/xchgmod.cpp @@ -455,13 +455,13 @@ void PCB_EDIT_FRAME::Exchange_Module( MODULE* aOldModule, // Update pad netnames ( when possible) for( D_PAD* pad = aNewModule->Pads(); pad != NULL; pad = pad->Next() ) { - pad->SetNet( NETINFO_LIST::UNCONNECTED ); + pad->SetNetCode( NETINFO_LIST::UNCONNECTED ); D_PAD* old_pad = aOldModule->Pads(); for( ; old_pad != NULL; old_pad = old_pad->Next() ) { if( pad->PadNameEqual( old_pad ) ) - pad->SetNet( old_pad->GetNet() ); + pad->SetNetCode( old_pad->GetNetCode() ); } } diff --git a/pcbnew/zones_by_polygon.cpp b/pcbnew/zones_by_polygon.cpp index 9eddd5f7bb..838bf67bb7 100644 --- a/pcbnew/zones_by_polygon.cpp +++ b/pcbnew/zones_by_polygon.cpp @@ -130,7 +130,7 @@ void PCB_EDIT_FRAME::duplicateZone( wxDC* aDC, ZONE_CONTAINER* aZone ) s_AuxiliaryList.ClearListAndDeleteItems(); s_PickedList.ClearListAndDeleteItems(); - SaveCopyOfZones( s_PickedList, GetBoard(), newZone->GetNet(), newZone->GetLayer() ); + SaveCopyOfZones( s_PickedList, GetBoard(), newZone->GetNetCode(), newZone->GetLayer() ); GetBoard()->Add( newZone ); ITEM_PICKER picker( newZone, UR_NEW ); @@ -227,10 +227,10 @@ void PCB_EDIT_FRAME::Start_Move_Zone_Corner( wxDC* DC, ZONE_CONTAINER* aZone, } ZONE_SETTINGS zoneInfo = GetZoneSettings(); - zoneInfo.m_NetcodeSelection = aZone->GetNet(); + zoneInfo.m_NetcodeSelection = aZone->GetNetCode(); SetZoneSettings( zoneInfo ); - GetBoard()->SetHighLightNet( aZone->GetNet() ); + GetBoard()->SetHighLightNet( aZone->GetNetCode() ); if( DC ) HighLight( DC ); @@ -248,8 +248,7 @@ void PCB_EDIT_FRAME::Start_Move_Zone_Corner( wxDC* DC, ZONE_CONTAINER* aZone, s_AuxiliaryList.ClearListAndDeleteItems(); s_PickedList.ClearListAndDeleteItems(); - SaveCopyOfZones( s_PickedList, GetBoard(), aZone->GetNet(), - aZone->GetLayer() ); + SaveCopyOfZones( s_PickedList, GetBoard(), aZone->GetNetCode(), aZone->GetLayer() ); if ( IsNewCorner ) aZone->Outline()->InsertCorner(corner_id-1, cx, cy ); @@ -278,8 +277,7 @@ void PCB_EDIT_FRAME::Start_Move_Zone_Drag_Outline_Edge( wxDC* DC, s_PickedList.ClearListAndDeleteItems(); s_AuxiliaryList.ClearListAndDeleteItems(); - SaveCopyOfZones( s_PickedList, GetBoard(), aZone->GetNet(), - aZone->GetLayer() ); + SaveCopyOfZones( s_PickedList, GetBoard(), aZone->GetNetCode(), aZone->GetLayer() ); } @@ -294,17 +292,16 @@ void PCB_EDIT_FRAME::Start_Move_Zone_Outlines( wxDC* DC, ZONE_CONTAINER* aZone ) } ZONE_SETTINGS zoneInfo = GetZoneSettings(); - zoneInfo.m_NetcodeSelection = aZone->GetNet(); + zoneInfo.m_NetcodeSelection = aZone->GetNetCode(); SetZoneSettings( zoneInfo ); - GetBoard()->SetHighLightNet( aZone->GetNet() ); + GetBoard()->SetHighLightNet( aZone->GetNetCode() ); HighLight( DC ); } s_PickedList.ClearListAndDeleteItems(); s_AuxiliaryList.ClearListAndDeleteItems(); - SaveCopyOfZones( s_PickedList, GetBoard(), aZone->GetNet(), - aZone->GetLayer() ); + SaveCopyOfZones( s_PickedList, GetBoard(), aZone->GetNetCode(), aZone->GetLayer() ); aZone->SetFlags( IS_MOVED ); m_canvas->SetMouseCapture( Show_Zone_Corner_Or_Outline_While_Move_Mouse, @@ -382,7 +379,7 @@ void PCB_EDIT_FRAME::Remove_Zone_Corner( wxDC* DC, ZONE_CONTAINER* aZone ) s_AuxiliaryList.ClearListAndDeleteItems(); s_PickedList. ClearListAndDeleteItems(); - SaveCopyOfZones( s_PickedList, GetBoard(), aZone->GetNet(), aZone->GetLayer() ); + SaveCopyOfZones( s_PickedList, GetBoard(), aZone->GetNetCode(), aZone->GetLayer() ); aZone->Outline()->DeleteCorner( aZone->GetSelectedCorner() ); // modify zones outlines according to the new aZone shape @@ -549,7 +546,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC ) { zoneInfo.m_NetcodeSelection = GetBoard()->GetHighLightNetCode(); - zone->SetNet( zoneInfo.m_NetcodeSelection ); + zone->SetNetCode( zoneInfo.m_NetcodeSelection ); } double tmp = ZONE_THERMAL_RELIEF_GAP_MIL; wxGetApp().GetSettings()->Read( ZONE_THERMAL_RELIEF_GAP_STRING_KEY, &tmp ); @@ -577,7 +574,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC ) zoneInfo.SetIsKeepout( true ); // Netcode and netname are irrelevant, // so ensure they are cleared - zone->SetNet( NETINFO_LIST::UNCONNECTED ); + zone->SetNetCode( NETINFO_LIST::UNCONNECTED ); edited = InvokeKeepoutAreaEditor( this, &zoneInfo ); } else @@ -623,7 +620,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC ) { if( s_CurrentZone ) { - zoneInfo.m_NetcodeSelection = s_CurrentZone->GetNet(); + zoneInfo.m_NetcodeSelection = s_CurrentZone->GetNetCode(); GetBoard()->SetZoneSettings( zoneInfo ); } @@ -744,7 +741,7 @@ bool PCB_EDIT_FRAME::End_Zone( wxDC* DC ) // Save initial zones configuration, for undo/redo, before adding new zone s_AuxiliaryList.ClearListAndDeleteItems(); s_PickedList.ClearListAndDeleteItems(); - SaveCopyOfZones(s_PickedList, GetBoard(), zone->GetNet(), zone->GetLayer() ); + SaveCopyOfZones(s_PickedList, GetBoard(), zone->GetNetCode(), zone->GetLayer() ); // Put new zone in list if( !s_CurrentZone ) @@ -902,7 +899,7 @@ void PCB_EDIT_FRAME::Edit_Zone_Params( wxDC* DC, ZONE_CONTAINER* aZone ) NETINFO_ITEM* net = GetBoard()->FindNet( zoneInfo.m_NetcodeSelection ); if( net ) // net == NULL should not occur - aZone->SetNet( net->GetNet() ); + aZone->SetNetCode( net->GetNet() ); // Combine zones if possible GetBoard()->OnAreaPolygonModified( &s_AuxiliaryList, aZone ); diff --git a/pcbnew/zones_by_polygon_fill_functions.cpp b/pcbnew/zones_by_polygon_fill_functions.cpp index 73ca2a8217..3146786a6b 100644 --- a/pcbnew/zones_by_polygon_fill_functions.cpp +++ b/pcbnew/zones_by_polygon_fill_functions.cpp @@ -100,7 +100,7 @@ int PCB_EDIT_FRAME::Fill_Zone( ZONE_CONTAINER* aZone ) // Shows the net ZONE_SETTINGS zoneInfo = GetZoneSettings(); - zoneInfo.m_NetcodeSelection = aZone->GetNet(); + zoneInfo.m_NetcodeSelection = aZone->GetNetCode(); SetZoneSettings( zoneInfo ); msg = aZone->GetNetname(); diff --git a/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp b/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp index eaef234893..c51da1fc1c 100644 --- a/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp +++ b/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp @@ -228,7 +228,7 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb ) pad = &dummypad; } - if( pad->GetNet() != GetNet() ) + if( pad->GetNetCode() != GetNetCode() ) { item_clearance = pad->GetClearance() + margin; item_boundingbox = pad->GetBoundingBox(); @@ -249,7 +249,7 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb ) int gap = zone_clearance; if( ( GetPadConnection( pad ) == PAD_NOT_IN_ZONE ) - || ( GetNet() == 0 ) || ( pad->GetShape() == PAD_TRAPEZOID ) ) + || ( GetNetCode() == 0 ) || ( pad->GetShape() == PAD_TRAPEZOID ) ) // PAD_TRAPEZOID shapes are not in zones because they are used in microwave apps // and i think it is good that shapes are not changed by thermal pads or others @@ -275,7 +275,7 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb ) if( !track->IsOnLayer( GetLayer() ) ) continue; - if( track->GetNet() == GetNet() && (GetNet() != 0) ) + if( track->GetNetCode() == GetNetCode() && (GetNetCode() != 0) ) continue; item_clearance = track->GetClearance() + margin; @@ -363,7 +363,7 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb ) // do not add clearance. // the zone will be connected to the current zone, but filled areas // will use different parameters (clearance, thermal shapes ) - bool addclearance = GetNet() != zone->GetNet(); + bool addclearance = GetNetCode() != zone->GetNetCode(); int clearance = zone_clearance; if( zone->GetIsKeepout() ) @@ -394,7 +394,7 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb ) if( !pad->IsOnLayer( GetLayer() ) ) continue; - if( pad->GetNet() != GetNet() ) + if( pad->GetNetCode() != GetNetCode() ) continue; item_boundingbox = pad->GetBoundingBox(); int thermalGap = GetThermalReliefGap( pad ); @@ -428,7 +428,7 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb ) CopyPolygonsFromKiPolygonListToFilledPolysList( polyset_zone_solid_areas ); // Remove insulated islands: - if( GetNet() > 0 ) + if( GetNetCode() > 0 ) TestForCopperIslandAndRemoveInsulatedIslands( aPcb ); // Now we remove all unused thermal stubs. @@ -436,7 +436,7 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb ) // Test thermal stubs connections and add polygons to remove unconnected stubs. // (this is a refinement for thermal relief shapes) - if( GetNet() > 0 ) + if( GetNetCode() > 0 ) BuildUnconnectedThermalStubsPolygonList( cornerBufferPolysToSubstract, aPcb, this, s_Correction, s_thermalRot ); @@ -453,7 +453,7 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb ) m_FilledPolysList.RemoveAllContours(); CopyPolygonsFromKiPolygonListToFilledPolysList( polyset_zone_solid_areas ); - if( GetNet() > 0 ) + if( GetNetCode() > 0 ) TestForCopperIslandAndRemoveInsulatedIslands( aPcb ); } diff --git a/pcbnew/zones_convert_to_polygons_aux_functions.cpp b/pcbnew/zones_convert_to_polygons_aux_functions.cpp index f570ebdd4b..16549b2ed4 100644 --- a/pcbnew/zones_convert_to_polygons_aux_functions.cpp +++ b/pcbnew/zones_convert_to_polygons_aux_functions.cpp @@ -162,7 +162,7 @@ void BuildUnconnectedThermalStubsPolygonList( CPOLYGONS_LIST& aCornerBuffer, if( !pad->IsOnLayer( aZone->GetLayer() ) ) continue; - if( pad->GetNet() != aZone->GetNet() ) + if( pad->GetNetCode() != aZone->GetNetCode() ) continue; // Calculate thermal bridge half width diff --git a/pcbnew/zones_functions_for_undo_redo.cpp b/pcbnew/zones_functions_for_undo_redo.cpp index 8abd5b6306..5710937208 100644 --- a/pcbnew/zones_functions_for_undo_redo.cpp +++ b/pcbnew/zones_functions_for_undo_redo.cpp @@ -67,7 +67,7 @@ bool ZONE_CONTAINER::IsSame( const ZONE_CONTAINER& aZoneToCompare ) if( GetLayer() != aZoneToCompare.GetLayer() ) return false; - if( GetNet() != aZoneToCompare.GetNet() ) + if( GetNetCode() != aZoneToCompare.GetNetCode() ) return false; if( GetPriority() != aZoneToCompare.GetPriority() ) @@ -146,7 +146,7 @@ int SaveCopyOfZones( PICKED_ITEMS_LIST& aPickList, BOARD* aPcb, int aNetCode, LA if( zone == NULL ) // End of list break; - if( aNetCode >= 0 && aNetCode != zone->GetNet() ) + if( aNetCode >= 0 && aNetCode != zone->GetNetCode() ) continue; if( aLayer >= 0 && aLayer != zone->GetLayer() ) diff --git a/pcbnew/zones_polygons_insulated_copper_islands.cpp b/pcbnew/zones_polygons_insulated_copper_islands.cpp index c2154ae5dc..5e72a64497 100644 --- a/pcbnew/zones_polygons_insulated_copper_islands.cpp +++ b/pcbnew/zones_polygons_insulated_copper_islands.cpp @@ -54,7 +54,7 @@ void ZONE_CONTAINER::TestForCopperIslandAndRemoveInsulatedIslands( BOARD* aPcb ) if( !pad->IsOnLayer( GetLayer() ) ) continue; - if( pad->GetNet() != GetNet() ) + if( pad->GetNetCode() != GetNetCode() ) continue; listPointsCandidates.push_back( pad->GetPosition() ); @@ -66,7 +66,7 @@ void ZONE_CONTAINER::TestForCopperIslandAndRemoveInsulatedIslands( BOARD* aPcb ) if( !track->IsOnLayer( GetLayer() ) ) continue; - if( track->GetNet() != GetNet() ) + if( track->GetNetCode() != GetNetCode() ) continue; listPointsCandidates.push_back( track->GetStart() ); diff --git a/pcbnew/zones_polygons_test_connections.cpp b/pcbnew/zones_polygons_test_connections.cpp index ccc91634e2..fd277f2a63 100644 --- a/pcbnew/zones_polygons_test_connections.cpp +++ b/pcbnew/zones_polygons_test_connections.cpp @@ -50,11 +50,11 @@ void Merge_SubNets_Connected_By_CopperAreas( BOARD* aPcb, int aNetcode ); // zone size = size of the m_FilledPolysList buffer bool sort_areas( const ZONE_CONTAINER* ref, const ZONE_CONTAINER* tst ) { - if( ref->GetNet() == tst->GetNet() ) + if( ref->GetNetCode() == tst->GetNetCode() ) return ref->GetFilledPolysList().GetCornersCount() < tst->GetFilledPolysList().GetCornersCount(); else - return ref->GetNet() < tst->GetNet(); + return ref->GetNetCode() < tst->GetNetCode(); } /** @@ -72,14 +72,14 @@ void BOARD::Test_Connections_To_Copper_Areas( int aNetcode ) for( MODULE* module = m_Modules; module; module = module->Next() ) { for( D_PAD* pad = module->Pads(); pad != NULL; pad = pad->Next() ) - if( (aNetcode < 0) || ( aNetcode == pad->GetNet() ) ) + if( (aNetcode < 0) || ( aNetcode == pad->GetNetCode() ) ) pad->SetZoneSubNet( 0 ); } // clear .m_ZoneSubnet parameter for tracks and vias for( TRACK* track = m_Track; track; track = track->Next() ) { - if( (aNetcode < 0) || ( aNetcode == track->GetNet() ) ) + if( (aNetcode < 0) || ( aNetcode == track->GetNetCode() ) ) track->SetZoneSubNet( 0 ); } @@ -93,7 +93,7 @@ void BOARD::Test_Connections_To_Copper_Areas( int aNetcode ) ZONE_CONTAINER* curr_zone = GetArea( index ); if( !curr_zone->IsOnCopperLayer() ) continue; - if( (aNetcode >= 0) && ( aNetcode != curr_zone->GetNet() ) ) + if( (aNetcode >= 0) && ( aNetcode != curr_zone->GetNetCode() ) ) continue; if( curr_zone->GetFilledPolysList().GetCornersCount() == 0 ) continue; @@ -112,7 +112,7 @@ void BOARD::Test_Connections_To_Copper_Areas( int aNetcode ) { ZONE_CONTAINER* curr_zone = zones_candidates[idx]; - int netcode = curr_zone->GetNet(); + int netcode = curr_zone->GetNetCode(); // Build a list of candidates connected to the net: // At this point, layers are not considered, because areas on different layers can @@ -136,7 +136,7 @@ void BOARD::Test_Connections_To_Copper_Areas( int aNetcode ) TRACK* track = m_Track.GetFirst()->GetStartNetCode( netcode ); for( ; track; track = track->Next() ) { - if( track->GetNet() != netcode ) + if( track->GetNetCode() != netcode ) break; candidates.push_back( track ); } @@ -255,10 +255,10 @@ void Merge_SubNets_Connected_By_CopperAreas( BOARD* aPcb ) if ( ! curr_zone->IsOnCopperLayer() ) continue; - if ( curr_zone->GetNet() <= 0 ) + if ( curr_zone->GetNetCode() <= 0 ) continue; - Merge_SubNets_Connected_By_CopperAreas( aPcb, curr_zone->GetNet() ); + Merge_SubNets_Connected_By_CopperAreas( aPcb, curr_zone->GetNetCode() ); } } @@ -284,7 +284,7 @@ void Merge_SubNets_Connected_By_CopperAreas( BOARD* aPcb, int aNetcode ) { ZONE_CONTAINER* curr_zone = aPcb->GetArea( index ); - if( aNetcode == curr_zone->GetNet() ) + if( aNetcode == curr_zone->GetNetCode() ) { found = true; break; @@ -311,7 +311,7 @@ void Merge_SubNets_Connected_By_CopperAreas( BOARD* aPcb, int aNetcode ) track = aPcb->m_Track.GetFirst()->GetStartNetCode( aNetcode ); for( ; track; track = track->Next() ) { - if( track->GetNet() != aNetcode ) + if( track->GetNetCode() != aNetcode ) break; Candidates.push_back( track ); } diff --git a/pcbnew/zones_test_and_combine_areas.cpp b/pcbnew/zones_test_and_combine_areas.cpp index 362d469daa..b35c1be122 100644 --- a/pcbnew/zones_test_and_combine_areas.cpp +++ b/pcbnew/zones_test_and_combine_areas.cpp @@ -59,7 +59,7 @@ bool BOARD::OnAreaPolygonModified( PICKED_ITEMS_LIST* aModifiedZonesList, if( bCheckAllAreas ) { modified = true; - CombineAllAreasInNet( aModifiedZonesList, modified_area->GetNet(), true ); + CombineAllAreasInNet( aModifiedZonesList, modified_area->GetNetCode(), true ); } if( !IsCopperLayer( layer ) ) // Refill non copper zones on this layer @@ -98,7 +98,7 @@ bool BOARD::CombineAllAreasInNet( PICKED_ITEMS_LIST* aDeletedList, int aNetCode, { ZONE_CONTAINER* curr_area = m_ZoneDescriptorList[ia1]; - if( curr_area->GetNet() != aNetCode ) + if( curr_area->GetNetCode() != aNetCode ) continue; // legal polygon @@ -109,7 +109,7 @@ bool BOARD::CombineAllAreasInNet( PICKED_ITEMS_LIST* aDeletedList, int aNetCode, { ZONE_CONTAINER* area2 = m_ZoneDescriptorList[ia2]; - if( area2->GetNet() != aNetCode ) + if( area2->GetNetCode() != aNetCode ) continue; if( curr_area->GetPriority() != area2->GetPriority() ) @@ -158,7 +158,7 @@ bool BOARD::TestAreaIntersections( ZONE_CONTAINER* area_to_test ) { ZONE_CONTAINER* area2 = m_ZoneDescriptorList[ia2]; - if( area_to_test->GetNet() != area2->GetNet() ) + if( area_to_test->GetNetCode() != area2->GetNetCode() ) continue; if( area_to_test == area2 ) @@ -390,7 +390,7 @@ int BOARD::Test_Drc_Areas_Outlines_To_Areas_Outlines( ZONE_CONTAINER* aArea_To_E continue; // Test for same net - if( Area_Ref->GetNet() == area_to_test->GetNet() && Area_Ref->GetNet() >= 0 ) + if( Area_Ref->GetNetCode() == area_to_test->GetNetCode() && Area_Ref->GetNetCode() >= 0 ) continue; // test for different priorities @@ -586,7 +586,7 @@ bool DRC::doEdgeZoneDrc( ZONE_CONTAINER* aArea, int aCornerIndex ) continue; // Test for same net - if( ( aArea->GetNet() == area_to_test->GetNet() ) && (aArea->GetNet() >= 0) ) + if( ( aArea->GetNetCode() == area_to_test->GetNetCode() ) && (aArea->GetNetCode() >= 0) ) continue; // test for same priority From c5a3c1082a5d8518cda8a1d02331414f60aa90be Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 25 Feb 2014 14:28:09 +0100 Subject: [PATCH 133/741] Removed a few RecacheAllItems() calls, some of them changed to specific type recaching (using TYPE_COLLECTOR & VIEW_ITEM::ViewUpdate() ). Removed OPENGL_GAL::SetStrokeColor(). --- common/drawpanel_gal.cpp | 3 -- common/gal/cairo/cairo_gal.cpp | 5 ++- common/gal/opengl/opengl_gal.cpp | 42 +++++++++++++++-------- include/gal/opengl/opengl_gal.h | 9 +---- pcbnew/basepcbframe.cpp | 9 ++++- pcbnew/dialogs/dialog_display_options.cpp | 5 +-- pcbnew/dialogs/dialog_general_options.cpp | 24 ++++++++----- pcbnew/pcbframe.cpp | 10 +----- 8 files changed, 58 insertions(+), 49 deletions(-) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index 6a7e4f9d6a..947e854fa6 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -226,10 +226,7 @@ void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType ) m_painter->SetGAL( m_gal ); if( m_view ) - { m_view->SetGAL( m_gal ); - m_view->RecacheAllItems( true ); - } m_currentGal = aGalType; m_pendingRefresh = false; diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index 5d1d4f6cd7..790fb06049 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -77,6 +77,8 @@ CAIRO_GAL::CAIRO_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, // Allocate memory for pixel storage allocateBitmaps(); + + initSurface(); } @@ -954,7 +956,8 @@ void CAIRO_GAL::deleteBitmaps() void CAIRO_GAL::initSurface() { - wxASSERT( !isInitialized ); + if( isInitialized ) + return; // Create the Cairo surface surface = cairo_image_surface_create_for_data( (unsigned char*) bitmapBuffer, GAL_FORMAT, diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 84b8225ac3..5eb63c31c4 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -101,6 +101,8 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, } gluTessProperty( tesselator, GLU_TESS_WINDING_RULE, GLU_TESS_WINDING_POSITIVE ); + + currentManager = &nonCachedManager; } @@ -248,6 +250,8 @@ void OPENGL_GAL::DrawLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoin const VECTOR2D startEndVector = aEndPoint - aStartPoint; double lineAngle = startEndVector.Angle(); + currentManager->Color( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); + drawLineQuad( aStartPoint, aEndPoint ); // Line caps @@ -468,6 +472,8 @@ void OPENGL_GAL::DrawPolyline( std::deque& aPointList ) if( aPointList.empty() ) return; + currentManager->Color( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); + std::deque::const_iterator it = aPointList.begin(); // Start from the second point @@ -590,15 +596,6 @@ void OPENGL_GAL::ClearScreen() } -void OPENGL_GAL::SetStrokeColor( const COLOR4D& aColor ) -{ - strokeColor = aColor; - - // This is the default drawing color - currentManager->Color( aColor.r, aColor.g, aColor.b, aColor.a ); -} - - void OPENGL_GAL::Transform( const MATRIX3x3D& aTransformation ) { GLdouble matrixData[16] = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 }; @@ -795,8 +792,23 @@ void OPENGL_GAL::drawGridLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEnd } -inline void OPENGL_GAL::drawLineQuad( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) +void OPENGL_GAL::drawLineQuad( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) { + /* Helper drawing: ____--- v3 ^ + * ____---- ... \ \ + * ____---- ... \ end \ + * v1 ____---- ... ____---- \ width + * ---- ...___---- \ \ + * \ ___...-- \ v + * \ ____----... ____---- v2 + * ---- ... ____---- + * start \ ... ____---- + * \... ____---- + * ---- + * v0 + * dots mark triangles' hypotenuses + */ + VECTOR2D startEndVector = aEndPoint - aStartPoint; double lineLength = startEndVector.EuclideanNorm(); double scale = 0.5 * lineWidth / lineLength; @@ -854,8 +866,8 @@ void OPENGL_GAL::drawFilledSemiCircle( const VECTOR2D& aCenterPoint, double aRad /* Draw a triangle that contains the semicircle, then shade it to leave only * the semicircle. Parameters given to setShader are indices of the triangle's vertices - * (if you want to understand more, check the vertex shader source [shader.vert]). - * Shader uses this coordinates to determine if fragments are inside the semicircle or not. + * (if you want to understand more, check the vertex shader source [shader.vert]). + * Shader uses these coordinates to determine if fragments are inside the semicircle or not. * v2 * /\ * /__\ @@ -885,9 +897,9 @@ void OPENGL_GAL::drawStrokedSemiCircle( const VECTOR2D& aCenterPoint, double aRa /* Draw a triangle that contains the semicircle, then shade it to leave only * the semicircle. Parameters given to setShader are indices of the triangle's vertices - * (if you want to understand more, check the vertex shader source [shader.vert]), the - * radius and the line width. Shader uses this coordinates to determine if fragments are - * inside the semicircle or not. + * (if you want to understand more, check the vertex shader source [shader.vert]), the + * radius and the line width. Shader uses these coordinates to determine if fragments are + * inside the semicircle or not. * v2 * /\ * /__\ diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index 7a1879d085..d5c97aada9 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -145,13 +145,6 @@ public: /// @copydoc GAL::ClearScreen() virtual void ClearScreen(); - // ----------------- - // Attribute setting - // ----------------- - - /// @copydoc GAL::SetStrokeColor() - virtual void SetStrokeColor( const COLOR4D& aColor ); - // -------------- // Transformation // -------------- @@ -311,7 +304,7 @@ private: * @param aStartPoint is the start point of the line. * @param aEndPoint is the end point of the line. */ - inline void drawLineQuad( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ); + void drawLineQuad( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ); /** * @brief Draw a semicircle. Depending on settings (isStrokeEnabled & isFilledEnabled) it runs diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 858aa40c0e..8b670883f9 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -443,7 +443,14 @@ void PCB_BASE_FRAME::OnTogglePadDrawMode( wxCommandEvent& aEvent ) KIGFX::PCB_RENDER_SETTINGS* settings = static_cast ( painter->GetSettings() ); settings->LoadDisplayOptions( DisplayOpt ); - GetGalCanvas()->GetView()->RecacheAllItems( true ); + + // Update pads + BOARD* board = GetBoard(); + for( MODULE* module = board->m_Modules; module; module = module->Next() ) + { + for( D_PAD* pad = module->Pads(); pad; pad = pad->Next() ) + pad->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } m_canvas->Refresh(); } diff --git a/pcbnew/dialogs/dialog_display_options.cpp b/pcbnew/dialogs/dialog_display_options.cpp index 0aa91d1302..1e140d94d9 100644 --- a/pcbnew/dialogs/dialog_display_options.cpp +++ b/pcbnew/dialogs/dialog_display_options.cpp @@ -177,10 +177,7 @@ void DIALOG_DISPLAY_OPTIONS::OnOkClick(wxCommandEvent& event) settings->LoadDisplayOptions( DisplayOpt ); view->RecacheAllItems( true ); - if( m_Parent->IsGalCanvasActive() ) - m_Parent->GetGalCanvas()->Refresh(); - else - m_Parent->GetCanvas()->Refresh(); + m_Parent->GetCanvas()->Refresh(); EndModal( 1 ); } diff --git a/pcbnew/dialogs/dialog_general_options.cpp b/pcbnew/dialogs/dialog_general_options.cpp index c01e433f3e..c4ccd1ddbf 100644 --- a/pcbnew/dialogs/dialog_general_options.cpp +++ b/pcbnew/dialogs/dialog_general_options.cpp @@ -40,6 +40,7 @@ #include #include #include +#include #include #include @@ -157,7 +158,7 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) static_cast ( GetGalCanvas()->GetView()->GetPainter() ); KIGFX::PCB_RENDER_SETTINGS* settings = static_cast ( painter->GetSettings() ); - bool recache = false; + KICAD_T updateType = EOT; switch( id ) { @@ -192,31 +193,31 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) case ID_TB_OPTIONS_SHOW_ZONES: DisplayOpt.DisplayZonesMode = 0; - recache = true; + updateType = PCB_ZONE_T; m_canvas->Refresh(); break; case ID_TB_OPTIONS_SHOW_ZONES_DISABLE: DisplayOpt.DisplayZonesMode = 1; - recache = true; + updateType = PCB_ZONE_T; m_canvas->Refresh(); break; case ID_TB_OPTIONS_SHOW_ZONES_OUTLINES_ONLY: DisplayOpt.DisplayZonesMode = 2; - recache = true; + updateType = PCB_ZONE_T; m_canvas->Refresh(); break; case ID_TB_OPTIONS_SHOW_VIAS_SKETCH: m_DisplayViaFill = DisplayOpt.DisplayViaFill = !state; - recache = true; + updateType = PCB_VIA_T; m_canvas->Refresh(); break; case ID_TB_OPTIONS_SHOW_TRACKS_SKETCH: m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill = !state; - recache = true; + updateType = PCB_TRACE_T; m_canvas->Refresh(); break; @@ -256,11 +257,18 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) break; } - if( recache ) + if( updateType != EOT ) { // Apply new display options to the GAL canvas settings->LoadDisplayOptions( DisplayOpt ); - GetGalCanvas()->GetView()->RecacheAllItems( true ); + + // Find items that require update + KICAD_T scanList[] = { updateType, EOT }; + TYPE_COLLECTOR collector; + collector.Collect( GetBoard(), scanList ); + + for( int i = 0; i < collector.GetCount(); ++i ) + collector[i]->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); } if( IsGalCanvasActive() ) diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 4ec121c99e..9f1df9b5f5 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -544,21 +544,15 @@ void PCB_EDIT_FRAME::ViewReloadBoard( const BOARD* aBoard ) const // Load zones for( int i = 0; i < aBoard->GetAreaCount(); ++i ) - { view->Add( (KIGFX::VIEW_ITEM*) ( aBoard->GetArea( i ) ) ); - } // Load drawings for( BOARD_ITEM* drawing = aBoard->m_Drawings; drawing; drawing = drawing->Next() ) - { view->Add( drawing ); - } // Load tracks for( TRACK* track = aBoard->m_Track; track; track = track->Next() ) - { view->Add( track ); - } // Load modules and its additional elements for( MODULE* module = aBoard->m_Modules; module; module = module->Next() ) @@ -569,9 +563,7 @@ void PCB_EDIT_FRAME::ViewReloadBoard( const BOARD* aBoard ) const // Segzones (equivalent of ZONE_CONTAINER for legacy boards) for( SEGZONE* zone = aBoard->m_Zone; zone; zone = zone->Next() ) - { view->Add( zone ); - } // Add an entry for the worksheet layout KIGFX::WORKSHEET_VIEWITEM* worksheet = new KIGFX::WORKSHEET_VIEWITEM( @@ -587,7 +579,7 @@ void PCB_EDIT_FRAME::ViewReloadBoard( const BOARD* aBoard ) const view->Add( new KIGFX::RATSNEST_VIEWITEM( ratsnest ) ); view->SetPanBoundary( worksheet->ViewBBox() ); - view->RecacheAllItems( true ); + view->RecacheAllItems( false ); if( IsGalCanvasActive() ) GetGalCanvas()->Refresh(); From a42a83a3947deddca693ba6e31ab6614d8056c1c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 25 Feb 2014 18:08:33 +0100 Subject: [PATCH 134/741] Minor changes to BRIGHT_BOX class. --- pcbnew/tools/bright_box.cpp | 27 +++++++-------------------- pcbnew/tools/bright_box.h | 19 +++++++++++++------ 2 files changed, 20 insertions(+), 26 deletions(-) diff --git a/pcbnew/tools/bright_box.cpp b/pcbnew/tools/bright_box.cpp index b0fd4aec81..689b6169b5 100644 --- a/pcbnew/tools/bright_box.cpp +++ b/pcbnew/tools/bright_box.cpp @@ -30,44 +30,31 @@ using namespace KIGFX; BRIGHT_BOX::BRIGHT_BOX( BOARD_ITEM* aItem ) : EDA_ITEM( NOT_USED ), // this item is never added to a BOARD so it needs no type - item( aItem ) + m_item( aItem ) { } -const BOX2I BRIGHT_BOX::ViewBBox() const -{ - return item->ViewBBox(); -} - - -void BRIGHT_BOX::ViewGetLayers( int aLayers[], int& aCount ) const -{ - aLayers[0] = BrightBoxLayer; - aCount = 1; -} - - void BRIGHT_BOX::ViewDraw( int aLayer, GAL* aGal ) const { aGal->SetIsStroke( true ); aGal->SetIsFill( false ); - aGal->SetLineWidth( LineWidth ); - aGal->SetStrokeColor( BrightColor ); + aGal->SetLineWidth( LINE_WIDTH ); + aGal->SetStrokeColor( BOX_COLOR ); - if( item->Type() == PCB_TRACE_T ) + if( m_item->Type() == PCB_TRACE_T ) { - const TRACK* track = static_cast( item ); + const TRACK* track = static_cast( m_item ); aGal->DrawSegment( track->GetStart(), track->GetEnd(), track->GetWidth() ); } else { - BOX2I box = item->ViewBBox(); + BOX2I box = m_item->ViewBBox(); aGal->DrawRectangle( box.GetOrigin(), box.GetOrigin() + box.GetSize() ); } } -const COLOR4D BRIGHT_BOX::BrightColor = KIGFX::COLOR4D( 0.0, 1.0, 0.0, 1.0 ); +const COLOR4D BRIGHT_BOX::BOX_COLOR = KIGFX::COLOR4D( 0.0, 1.0, 0.0, 1.0 ); diff --git a/pcbnew/tools/bright_box.h b/pcbnew/tools/bright_box.h index 14966db9ac..8a6a583335 100644 --- a/pcbnew/tools/bright_box.h +++ b/pcbnew/tools/bright_box.h @@ -42,21 +42,28 @@ public: BRIGHT_BOX( BOARD_ITEM* aItem ); ~BRIGHT_BOX() {}; - virtual const BOX2I ViewBBox() const; + virtual const BOX2I ViewBBox() const + { + return m_item->ViewBBox(); + } void ViewDraw( int aLayer, KIGFX::GAL* aGal ) const; - void ViewGetLayers( int aLayers[], int& aCount ) const; + + void ViewGetLayers( int aLayers[], int& aCount ) const + { + aLayers[0] = ITEM_GAL_LAYER( GP_OVERLAY ); + aCount = 1; + } void Show( int x, std::ostream& st ) const { } private: - static const int BrightBoxLayer = ITEM_GAL_LAYER( GP_OVERLAY ); - static const KIGFX::COLOR4D BrightColor; - static const double LineWidth = 100000.0; + static const KIGFX::COLOR4D BOX_COLOR; + static const double LINE_WIDTH = 100000.0; - BOARD_ITEM* item; + BOARD_ITEM* m_item; }; #endif From e6598e9d41434c2389da642eea5c0993ab00dd09 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 27 Feb 2014 16:13:27 +0100 Subject: [PATCH 135/741] Added VIEW::ToWorld( double ). TOOL_EVENT message is supposed to contain string as parameter. Added missing header for class_drawsegment.h (KiROUND). Renamed SELECTION_TOOL::containsSelected() to SELECTION_TOOL::selectionContains(). --- common/view/view.cpp | 8 ++++++++ include/tool/tool_event.h | 4 ++-- include/view/view.h | 8 ++++++++ pcbnew/class_drawsegment.h | 1 + pcbnew/tools/edit_tool.h | 2 +- pcbnew/tools/selection_tool.cpp | 4 ++-- pcbnew/tools/selection_tool.h | 2 +- 7 files changed, 23 insertions(+), 6 deletions(-) diff --git a/common/view/view.cpp b/common/view/view.cpp index 428dd7e594..1baa2599fc 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -204,6 +204,14 @@ VECTOR2D VIEW::ToWorld( const VECTOR2D& aCoord, bool aAbsolute ) const } +double VIEW::ToWorld( double aSize ) const +{ + const MATRIX3x3D& matrix = m_gal->GetScreenWorldMatrix(); + + return matrix.GetScale().x * aSize; +} + + VECTOR2D VIEW::ToScreen( const VECTOR2D& aCoord, bool aAbsolute ) const { const MATRIX3x3D& matrix = m_gal->GetWorldScreenMatrix(); diff --git a/include/tool/tool_event.h b/include/tool/tool_event.h index 3f7971ed77..4571b5a9f8 100644 --- a/include/tool/tool_event.h +++ b/include/tool/tool_event.h @@ -189,7 +189,7 @@ public: m_scope( aScope ), m_mouseButtons( 0 ) { - if( aCategory == TC_COMMAND ) + if( aCategory == TC_COMMAND || aCategory == TC_MESSAGE ) m_commandStr = aExtraParam; } @@ -317,7 +317,7 @@ public: if( !( m_actions & aEvent.m_actions ) ) return false; - if( m_category == TC_COMMAND ) + if( m_category == TC_COMMAND || m_category == TC_MESSAGE ) { if( m_commandStr && aEvent.m_commandStr ) return *m_commandStr == *aEvent.m_commandStr; diff --git a/include/view/view.h b/include/view/view.h index 4a7965bb94..dbb82954a0 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -232,6 +232,14 @@ public: */ VECTOR2D ToWorld( const VECTOR2D& aCoord, bool aAbsolute = true ) const; + /** + * Function ToWorld() + * Converts a screen space one dimensional size to a one dimensional size in world + * space coordinates. + * @param aCoord: the size to be converted + */ + double ToWorld( double aSize ) const; + /** * Function ToScreen() * Converts a world space point/vector to a point/vector in screen space coordinates. diff --git a/pcbnew/class_drawsegment.h b/pcbnew/class_drawsegment.h index 635a3235d7..56862aa7db 100644 --- a/pcbnew/class_drawsegment.h +++ b/pcbnew/class_drawsegment.h @@ -34,6 +34,7 @@ #include #include #include +#include class LINE_READER; diff --git a/pcbnew/tools/edit_tool.h b/pcbnew/tools/edit_tool.h index 49fbe48450..b5f6f1fc0d 100644 --- a/pcbnew/tools/edit_tool.h +++ b/pcbnew/tools/edit_tool.h @@ -101,7 +101,7 @@ private: ///> Removes and frees a single BOARD_ITEM. void remove( BOARD_ITEM* aItem ); - ///> Sets up handlers for various events + ///> Sets up handlers for various events. void setTransitions(); ///> The required update flag for modified items diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 366c81659a..0e1a241868 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -133,7 +133,7 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) else { // Check if dragging has started within any of selected items bounding box - if( containsSelected( evt->Position() ) ) + if( selectionContains( evt->Position() ) ) { // Yes -> run the move tool and wait till it finishes m_toolMgr->InvokeTool( "pcbnew.InteractiveEdit" ); @@ -566,7 +566,7 @@ void SELECTION_TOOL::deselectVisually( BOARD_ITEM* aItem ) const } -bool SELECTION_TOOL::containsSelected( const VECTOR2I& aPoint ) const +bool SELECTION_TOOL::selectionContains( const VECTOR2I& aPoint ) const { const unsigned GRIP_MARGIN = 20; VECTOR2D margin = getView()->ToWorld( VECTOR2D( GRIP_MARGIN, GRIP_MARGIN ), false ); diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index 4c5e4b2d9a..ab320b1d5e 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -207,7 +207,7 @@ private: * * @return True if the given point is contained in any of selected items' bouding box. */ - bool containsSelected( const VECTOR2I& aPoint ) const; + bool selectionContains( const VECTOR2I& aPoint ) const; /// Visual representation of selection box SELECTION_AREA* m_selArea; From 235da6084b2ad36fd122f6cb8e8976a518088609 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 27 Feb 2014 17:27:58 +0100 Subject: [PATCH 136/741] SELECTION_TOOL emits event notifying about selecting/deselecting/clearing selection. --- pcbnew/tools/selection_tool.cpp | 41 +++++++++++++++++++++++++++++---- pcbnew/tools/selection_tool.h | 5 ++++ 2 files changed, 42 insertions(+), 4 deletions(-) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 0e1a241868..24d00f2439 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -50,7 +50,11 @@ using boost::optional; SELECTION_TOOL::SELECTION_TOOL() : - TOOL_INTERACTIVE( "pcbnew.InteractiveSelection" ), m_additive( false ), m_multiple( false ) + TOOL_INTERACTIVE( "pcbnew.InteractiveSelection" ), + SelectedEvent( TC_MESSAGE, TA_ACTION, "pcbnew.InteractiveSelection.selected" ), + DeselectedEvent( TC_MESSAGE, TA_ACTION, "pcbnew.InteractiveSelection.deselected" ), + ClearedEvent( TC_MESSAGE, TA_ACTION, "pcbnew.InteractiveSelection.cleared" ), + m_additive( false ), m_multiple( false ) { m_selArea = new SELECTION_AREA; m_selection.group = new KIGFX::VIEW_GROUP; @@ -94,6 +98,7 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) if( evt->IsAction( &COMMON_ACTIONS::selectionSingle ) ) { + // GetMousePosition() is used to be independent of snapping settings selectSingle( getView()->ToWorld( getViewControls()->GetMousePosition() ) ); } @@ -167,6 +172,10 @@ void SELECTION_TOOL::toggleSelection( BOARD_ITEM* aItem ) if( aItem->IsSelected() ) { deselect( aItem ); + + // Inform other potentially interested tools + TOOL_EVENT deselectEvent( DeselectedEvent ); + m_toolMgr->ProcessEvent( deselectEvent ); } else { @@ -175,7 +184,13 @@ void SELECTION_TOOL::toggleSelection( BOARD_ITEM* aItem ) // Prevent selection of invisible or inactive items if( selectable( aItem ) ) + { select( aItem ); + + // Inform other potentially interested tools + TOOL_EVENT selectEvent( SelectedEvent ); + m_toolMgr->ProcessEvent( selectEvent ); + } } } @@ -203,7 +218,7 @@ void SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere ) default: // Remove unselectable items - for( int i = collector.GetCount() - 1; i >= 0 ; --i ) + for( int i = collector.GetCount() - 1; i >= 0; --i ) { if( !selectable( collector[i] ) ) collector.Remove( i ); @@ -273,13 +288,21 @@ bool SELECTION_TOOL::selectMultiple() BOARD_ITEM* item = static_cast( it->first ); // Add only those items that are visible and fully within the selection box - if( !item->IsSelected() && selectable( item ) && selectionBox.Contains( item->ViewBBox() ) ) + if( !item->IsSelected() && selectable( item ) + && selectionBox.Contains( item->ViewBBox() ) ) select( item ); } // Do not display information about selected item,as there is more than one getEditFrame()->SetCurItem( NULL ); + if( !m_selection.Empty() ) + { + // Inform other potentially interested tools + TOOL_EVENT selectEvent( SelectedEvent ); + m_toolMgr->ProcessEvent( selectEvent ); + } + break; // Stop waiting for events } } @@ -313,6 +336,10 @@ void SELECTION_TOOL::clearSelection() // Do not show the context menu when there is nothing selected SetContextMenu( &m_menu, CMENU_OFF ); + + // Inform other potentially interested tools + TOOL_EVENT clearEvent( ClearedEvent ); + m_toolMgr->ProcessEvent( clearEvent ); } @@ -351,7 +378,9 @@ BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector ) current->SetBrightened(); } else + { current = NULL; + } } else if( evt->Action() == TA_CONTEXT_MENU_CHOICE ) { @@ -412,7 +441,7 @@ BOARD_ITEM* SELECTION_TOOL::pickSmallestComponent( GENERAL_COLLECTOR* aCollector } } - return (*aCollector)[minNdx]; + return ( *aCollector )[minNdx]; } @@ -543,6 +572,10 @@ void SELECTION_TOOL::deselect( BOARD_ITEM* aItem ) SetContextMenu( &m_menu, CMENU_OFF ); getEditFrame()->SetCurItem( NULL ); } + + // Inform other potentially interested tools + TOOL_EVENT dupa( DeselectedEvent ); + m_toolMgr->ProcessEvent( dupa ); } diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index ab320b1d5e..9ef61fbd4b 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -114,6 +114,11 @@ public: */ void AddMenuItem( const TOOL_ACTION& aAction ); + // TODO comments + const TOOL_EVENT SelectedEvent; + const TOOL_EVENT DeselectedEvent; + const TOOL_EVENT ClearedEvent; + private: /** * Function selectSingle() From 94cfed4b9e3e359868360f332a56da2bc6cd9686 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 27 Feb 2014 17:29:08 +0100 Subject: [PATCH 137/741] Initial version of POINT_EDITOR. --- pcbnew/CMakeLists.txt | 4 +- pcbnew/tools/edit_points.cpp | 74 +++++++++ pcbnew/tools/edit_points.h | 247 +++++++++++++++++++++++++++ pcbnew/tools/pcb_tools.cpp | 4 +- pcbnew/tools/point_editor.cpp | 304 ++++++++++++++++++++++++++++++++++ pcbnew/tools/point_editor.h | 74 +++++++++ 6 files changed, 705 insertions(+), 2 deletions(-) create mode 100644 pcbnew/tools/edit_points.cpp create mode 100644 pcbnew/tools/edit_points.h create mode 100644 pcbnew/tools/point_editor.cpp create mode 100644 pcbnew/tools/point_editor.h diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index e697375ec2..43ce8ba3f3 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -251,7 +251,9 @@ set( PCBNEW_CLASS_SRCS tools/selection_tool.cpp tools/selection_area.cpp tools/bright_box.cpp - tools/drawing_tool.cpp + tools/edit_points.cpp + tools/point_editor.cpp + tools/drawing_tool.cpp tools/edit_tool.cpp tools/pcb_tools.cpp tools/common_actions.cpp diff --git a/pcbnew/tools/edit_points.cpp b/pcbnew/tools/edit_points.cpp new file mode 100644 index 0000000000..5efe90bae0 --- /dev/null +++ b/pcbnew/tools/edit_points.cpp @@ -0,0 +1,74 @@ +/* + * This program source code file is part of KICAD, a free EDA CAD application. + * + * Copyright (C) 2014 CERN + * @author Maciej Suminski + * + * 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 "edit_points.h" +#include + +#include + +EDIT_POINTS::EDIT_POINTS( EDA_ITEM* aParent ) : + EDA_ITEM( NOT_USED ), m_parent( aParent ) +{ +} + + +EDIT_POINTS::~EDIT_POINTS() +{ +} + + +EDIT_POINT* EDIT_POINTS::FindPoint( const VECTOR2I& aLocation ) +{ + float size = m_view->ToWorld( EDIT_POINT::POINT_SIZE ); + + std::deque::iterator it, itEnd; + for( it = m_points.begin(), itEnd = m_points.end(); it != itEnd; ++it ) + { + EDIT_POINT& point = *it; + + if( point.WithinPoint( aLocation, size ) ) + return &point; + } + + return NULL; +} + + +void EDIT_POINTS::ViewDraw( int aLayer, KIGFX::GAL* aGal ) const +{ + aGal->SetFillColor( KIGFX::COLOR4D( 1.0, 1.0, 1.0, 1.0 ) ); // TODO dynamic color depending on parent's color + aGal->SetIsFill( true ); + aGal->SetIsStroke( false ); + aGal->PushDepth(); + aGal->SetLayerDepth( -512.0 ); // TODO no hardcoded depths? + + float size = m_view->ToWorld( EDIT_POINT::POINT_SIZE ); + + BOOST_FOREACH( const EDIT_POINT& point, m_points ) + aGal->DrawRectangle( point.GetPosition() - size / 2, point.GetPosition() + size / 2 ); + + aGal->PopDepth(); +} diff --git a/pcbnew/tools/edit_points.h b/pcbnew/tools/edit_points.h new file mode 100644 index 0000000000..7ddfa2fcf9 --- /dev/null +++ b/pcbnew/tools/edit_points.h @@ -0,0 +1,247 @@ +/* + * This program source code file is part of KICAD, a free EDA CAD application. + * + * Copyright (C) 2014 CERN + * @author Maciej Suminski + * + * 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 EDIT_POINTS_H_ +#define EDIT_POINTS_H_ + +#include +#include +#include + +#include +#include + +class EDIT_POINT; + +class EDIT_POINT_CONSTRAINT +{ +public: + EDIT_POINT_CONSTRAINT( EDIT_POINT* aConstrained ) : m_constrained( aConstrained ) {}; + virtual ~EDIT_POINT_CONSTRAINT() {}; + + virtual void Apply() = 0; + +protected: + EDIT_POINT* m_constrained; +}; + + +// TODO docs +class EDIT_POINT +{ +public: + EDIT_POINT( const VECTOR2I& aPoint ) : + m_point( aPoint ), m_constraint( NULL ) {}; + ~EDIT_POINT() + { + delete m_constraint; + } + + const VECTOR2I& GetPosition() const + { + return m_point; + } + + void SetPosition( const VECTOR2I& aPosition ) + { + m_point = aPosition; + } + + bool WithinPoint( const VECTOR2I& aPoint, unsigned int aSize ) const + { + VECTOR2I topLeft = GetPosition() - aSize; + VECTOR2I bottomRight = GetPosition() + aSize; + + return ( aPoint.x > topLeft.x && aPoint.y > topLeft.y && + aPoint.x < bottomRight.x && aPoint.y < bottomRight.y ); + } + + void SetConstraint( EDIT_POINT_CONSTRAINT* aConstraint ) + { + m_constraint = aConstraint; + } + + void ClearConstraint( EDIT_POINT_CONSTRAINT* aConstraint ) + { + delete m_constraint; + m_constraint = NULL; + } + + EDIT_POINT_CONSTRAINT* GetConstraint() const + { + return m_constraint; + } + + void ApplyConstraint() + { + if( m_constraint ) + m_constraint->Apply(); + } + + ///> Single point size in pixels + static const int POINT_SIZE = 10; + +private: + VECTOR2I m_point; + EDIT_POINT_CONSTRAINT* m_constraint; +}; + + +class EDIT_POINTS : public EDA_ITEM +{ +public: + EDIT_POINTS( EDA_ITEM* aParent ); + ~EDIT_POINTS(); + + /** + * Function FindPoint + * Returns a point that is at given coordinates or NULL if there is no such point. + * @param aLocation is the location for searched point. + */ + EDIT_POINT* FindPoint( const VECTOR2I& aLocation ); + + void Add( const EDIT_POINT& aPoint ) + { + m_points.push_back( aPoint ); + } + + void Add( const VECTOR2I& aPoint ) + { + m_points.push_back( EDIT_POINT( aPoint ) ); + } + + EDIT_POINT& operator[]( unsigned int aIndex ) + { + return m_points[aIndex]; + } + + const EDIT_POINT& operator[]( unsigned int aIndex ) const + { + return m_points[aIndex]; + } + + unsigned int Size() const + { + return m_points.size(); + } + + virtual const BOX2I ViewBBox() const + { + return m_parent->ViewBBox(); + } + + virtual void ViewDraw( int aLayer, KIGFX::GAL* aGal ) const; + + virtual void ViewGetLayers( int aLayers[], int& aCount ) const + { + aCount = 1; + aLayers[0] = ITEM_GAL_LAYER( GP_OVERLAY ); + } + + void Show( int x, std::ostream& st ) const + { + } + +private: + EDA_ITEM* m_parent; + std::deque m_points; +}; + + +class EPC_VERTICAL : public EDIT_POINT_CONSTRAINT +{ +public: + EPC_VERTICAL( EDIT_POINT* aConstrained, EDIT_POINT& aConstrainer ) : + EDIT_POINT_CONSTRAINT( aConstrained ), m_constrainer( aConstrainer ) + {} + + virtual ~EPC_VERTICAL() {}; + + virtual void Apply() + { + VECTOR2I point = m_constrained->GetPosition(); + point.x = m_constrainer.GetPosition().x; + m_constrained->SetPosition( point ); + } + + virtual std::list GetConstrainers() const + { + return std::list( 1, &m_constrainer ); + } + +private: + EDIT_POINT& m_constrainer; +}; + + +class EPC_HORIZONTAL : public EDIT_POINT_CONSTRAINT +{ +public: + EPC_HORIZONTAL( EDIT_POINT* aConstrained, EDIT_POINT& aConstrainer ) : + EDIT_POINT_CONSTRAINT( aConstrained ), m_constrainer( aConstrainer ) + {} + + virtual ~EPC_HORIZONTAL() {}; + + virtual void Apply() + { + VECTOR2I point = m_constrained->GetPosition(); + point.y = m_constrainer.GetPosition().y; + m_constrained->SetPosition( point ); + } + +private: + EDIT_POINT& m_constrainer; +}; + + +class EPC_CIRCLE : public EDIT_POINT_CONSTRAINT +{ +public: + EPC_CIRCLE( EDIT_POINT* aConstrained, EDIT_POINT& aCenter, EDIT_POINT& aEnd ) : + EDIT_POINT_CONSTRAINT( aConstrained ), m_center( aCenter ), m_end( aEnd ) + {} + + virtual ~EPC_CIRCLE() {}; + + virtual void Apply() + { + VECTOR2I centerToEnd = m_end.GetPosition() - m_center.GetPosition(); + VECTOR2I centerToPoint = m_constrained->GetPosition() - m_center.GetPosition(); + + int radius = centerToEnd.EuclideanNorm(); + double angle = centerToPoint.Angle(); + + VECTOR2I newLine( radius, 0 ); + newLine = newLine.Rotate( angle ); + + m_constrained->SetPosition( m_center.GetPosition() + newLine ); + } + +private: + EDIT_POINT& m_center; + EDIT_POINT& m_end; +}; + +#endif /* EDIT_POINTS_H_ */ diff --git a/pcbnew/tools/pcb_tools.cpp b/pcbnew/tools/pcb_tools.cpp index 9ddfccc34d..53683e1a55 100644 --- a/pcbnew/tools/pcb_tools.cpp +++ b/pcbnew/tools/pcb_tools.cpp @@ -37,6 +37,7 @@ #include "selection_tool.h" #include "edit_tool.h" #include "drawing_tool.h" +#include "point_editor.h" #include "common_actions.h" #include @@ -70,7 +71,8 @@ void PCB_EDIT_FRAME::setupTools() m_toolManager->RegisterTool( new SELECTION_TOOL ); m_toolManager->RegisterTool( new ROUTER_TOOL ); m_toolManager->RegisterTool( new EDIT_TOOL ); - m_toolManager->RegisterTool( new DRAWING_TOOL ); + m_toolManager->RegisterTool( new DRAWING_TOOL ); + m_toolManager->RegisterTool( new POINT_EDITOR ); m_toolManager->SetEnvironment( NULL, GetGalCanvas()->GetView(), GetGalCanvas()->GetViewControls(), this ); diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp new file mode 100644 index 0000000000..efd1c35094 --- /dev/null +++ b/pcbnew/tools/point_editor.cpp @@ -0,0 +1,304 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Maciej Suminski + * + * 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 +#include + +#include "common_actions.h" +#include "selection_tool.h" +#include "point_editor.h" + +#include + +/** + * Class POINT_EDITOR + * + * Tool that displays edit points allowing to modify items by dragging the points. + */ + +class EDIT_POINTS_FACTORY +{ +public: + static EDIT_POINTS Make( EDA_ITEM* aItem ) + { + // TODO generate list of points basing on the type + EDIT_POINTS points( aItem ); + + switch( aItem->Type() ) + { + case PCB_LINE_T: + { + DRAWSEGMENT* segment = static_cast( aItem ); + + switch( segment->GetShape() ) + { + case S_SEGMENT: + points.Add( segment->GetStart() ); + points.Add( segment->GetEnd() ); + + break; + + case S_ARC: + points.Add( segment->GetCenter() ); // points[0] + points.Add( segment->GetArcStart() ); // points[1] + points.Add( segment->GetArcEnd() ); // points[2] + + // Set constraints + // Arc end has to stay at the same radius as the start + points[2].SetConstraint( new EPC_CIRCLE( &points[2], points[0], points[1] ) ); + break; + + default: // suppress warnings + break; + } + } + break; + + default: + break; + } + + return points; + } + +private: + EDIT_POINTS_FACTORY() {}; +}; + + +POINT_EDITOR::POINT_EDITOR() : + TOOL_INTERACTIVE( "pcbnew.PointEditor" ), m_selectionTool( NULL ) +{ +} + + +bool POINT_EDITOR::Init() +{ + // Find the selection tool, so they can cooperate + m_selectionTool = static_cast( m_toolMgr->FindTool( "pcbnew.InteractiveSelection" ) ); + + if( !m_selectionTool ) + { + DisplayError( NULL, wxT( "pcbnew.InteractiveSelection tool is not available" ) ); + return false; + } + + setTransitions(); + + return true; +} + + +int POINT_EDITOR::OnSelected( TOOL_EVENT& aEvent ) +{ + std::cout << "point editor activated" << std::endl; + std::cout << aEvent.Format() << std::endl; + + const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); + KIGFX::VIEW_CONTROLS* controls = getViewControls(); + m_dragPoint = NULL; + + if( selection.Size() == 1 ) + { + Activate(); + + EDA_ITEM* item = selection.items.GetPickedItem( 0 ); + EDIT_POINTS editPoints = EDIT_POINTS_FACTORY::Make( item ); + m_toolMgr->GetView()->Add( &editPoints ); + + // Main loop: keep receiving events + while( OPT_TOOL_EVENT evt = Wait() ) + { + if( evt->IsCancel() || + evt->Matches( m_selectionTool->ClearedEvent ) || + evt->Matches( m_selectionTool->DeselectedEvent ) || + evt->Matches( m_selectionTool->SelectedEvent ) ) + { + m_toolMgr->PassEvent(); + break; + } + + else if( evt->IsMotion() ) + { + EDIT_POINT* point = editPoints.FindPoint( evt->Position() ); + + if( m_dragPoint != point ) + { + if( point ) + { + controls->ShowCursor( true ); + controls->SetAutoPan( true ); + controls->SetSnapping( true ); + } + else + { + controls->ShowCursor( false ); + controls->SetAutoPan( false ); + controls->SetSnapping( false ); + } + } + + m_dragPoint = point; + } + + else if( evt->IsDrag( BUT_LEFT ) ) + { + if( m_dragPoint ) + { + m_dragPoint->SetPosition( controls->GetCursorPosition() ); + m_dragPoint->ApplyConstraint(); + updateItem( item, editPoints ); + updatePoints( item, editPoints ); + + editPoints.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + else + { + m_toolMgr->PassEvent(); + } + } + + else if( evt->IsClick( BUT_LEFT ) ) + { + m_toolMgr->PassEvent(); + } + } + + m_toolMgr->GetView()->Remove( &editPoints ); + item->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + + controls->ShowCursor( false ); + controls->SetAutoPan( false ); + controls->SetSnapping( false ); + + setTransitions(); + + return 0; +} + + +void POINT_EDITOR::setTransitions() +{ + Go( &POINT_EDITOR::OnSelected, m_selectionTool->SelectedEvent ); +} + + +void POINT_EDITOR::updateItem( EDA_ITEM* aItem, EDIT_POINTS& aPoints ) const +{ + switch( aItem->Type() ) + { + case PCB_LINE_T: + { + DRAWSEGMENT* segment = static_cast( aItem ); + switch( segment->GetShape() ) + { + case S_SEGMENT: + if( &aPoints[0] == m_dragPoint ) + segment->SetStart( wxPoint( aPoints[0].GetPosition().x, aPoints[0].GetPosition().y ) ); + else if( &aPoints[1] == m_dragPoint ) + segment->SetEnd( wxPoint( aPoints[1].GetPosition().x, aPoints[1].GetPosition().y ) ); + + break; + + case S_ARC: + { + const VECTOR2I& center = aPoints[0].GetPosition(); + const VECTOR2I& start = aPoints[1].GetPosition(); + const VECTOR2I& end = aPoints[2].GetPosition(); + + if( center != segment->GetCenter() ) + { + wxPoint moveVector = wxPoint( center.x, center.y ) - segment->GetCenter(); + segment->Move( moveVector ); + + aPoints[1].SetPosition( segment->GetArcStart() ); + aPoints[2].SetPosition( segment->GetArcEnd() ); + } + + else + { + segment->SetArcStart( wxPoint( start.x, start.y ) ); + + VECTOR2D startLine = start - center; + VECTOR2I endLine = end - center; + double newAngle = RAD2DECIDEG( endLine.Angle() - startLine.Angle() ); + + // Adjust the new angle to (counter)clockwise setting + bool clockwise = ( segment->GetAngle() > 0 ); + if( clockwise && newAngle < 0.0 ) + newAngle += 3600.0; + else if( !clockwise && newAngle > 0.0 ) + newAngle -= 3600.0; + + segment->SetAngle( newAngle ); + } + } + break; + + default: // suppress warnings + break; + } + break; + } + + default: + break; + } +} + + +void POINT_EDITOR::updatePoints( const EDA_ITEM* aItem, EDIT_POINTS& aPoints ) const +{ + switch( aItem->Type() ) + { + case PCB_LINE_T: + { + const DRAWSEGMENT* segment = static_cast( aItem ); + { + switch( segment->GetShape() ) + { + case S_SEGMENT: + aPoints[0].SetPosition( segment->GetStart() ); + aPoints[1].SetPosition( segment->GetEnd() ); + break; + + case S_ARC: + aPoints[0].SetPosition( segment->GetCenter() ); + aPoints[1].SetPosition( segment->GetArcStart() ); + aPoints[2].SetPosition( segment->GetArcEnd() ); + break; + + default: // suppress warnings + break; + } + } + break; + } + + default: + break; + } +} diff --git a/pcbnew/tools/point_editor.h b/pcbnew/tools/point_editor.h new file mode 100644 index 0000000000..a44ac07a00 --- /dev/null +++ b/pcbnew/tools/point_editor.h @@ -0,0 +1,74 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Maciej Suminski + * + * 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 __POINT_EDITOR_H +#define __POINT_EDITOR_H + +#include +#include "edit_points.h" + +class SELECTION_TOOL; + +/** + * Class POINT_EDITOR + * + * Tool that displays edit points allowing to modify items by dragging the points. + */ + +class POINT_EDITOR : public TOOL_INTERACTIVE +{ +public: + POINT_EDITOR(); + + /// @copydoc TOOL_INTERACTIVE::Reset() + void Reset( RESET_REASON aReason ) {}; + + /// @copydoc TOOL_INTERACTIVE::Init() + bool Init(); + + /** + * Function OnSelected() + * + * Change selection event handler. + */ + int OnSelected( TOOL_EVENT& aEvent ); + +private: + ///> Selection tool used for obtaining selected items + SELECTION_TOOL* m_selectionTool; + + ///> Currently edited point, NULL if there is none. + EDIT_POINT* m_dragPoint; + + ///> Updates item's points with edit points. + void updateItem( EDA_ITEM* aItem, EDIT_POINTS& aPoints ) const; + + ///> Updates edit points with item's points. + void updatePoints( const EDA_ITEM* aItem, EDIT_POINTS& aPoints ) const; + + ///> Sets up handlers for various events. + void setTransitions(); +}; + +#endif From c5c83bd271bd7a9dde8099b0e14519da25a7e9cb Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 28 Feb 2014 15:46:05 +0100 Subject: [PATCH 138/741] Added TOOL_MANAGER & ACTION_MANAGER::RunAction( const TOOL_ACTION aAction ). Selection clearing is invoked using TOOL_ACTION object rather than its name. --- common/tool/action_manager.cpp | 20 ++++++++++---------- common/tool/tool_manager.cpp | 6 ++++++ include/tool/action_manager.h | 16 ++++++++-------- include/tool/tool_manager.h | 10 +++++++++- pcbnew/edit.cpp | 1 + pcbnew/tools/edit_tool.cpp | 12 ++++++------ pcbnew/tools/selection_tool.cpp | 2 +- 7 files changed, 41 insertions(+), 26 deletions(-) diff --git a/common/tool/action_manager.cpp b/common/tool/action_manager.cpp index a00d4d08cc..ce0c403e43 100644 --- a/common/tool/action_manager.cpp +++ b/common/tool/action_manager.cpp @@ -94,12 +94,20 @@ bool ACTION_MANAGER::RunAction( const std::string& aActionName ) const if( it == m_actionNameIndex.end() ) return false; // no action with given name found - runAction( it->second ); + RunAction( it->second ); return true; } +void ACTION_MANAGER::RunAction( const TOOL_ACTION* aAction ) const +{ + TOOL_EVENT event = aAction->MakeEvent(); + + m_toolMgr->ProcessEvent( event ); +} + + bool ACTION_MANAGER::RunHotKey( int aHotKey ) const { std::map::const_iterator it = m_actionHotKeys.find( aHotKey ); @@ -107,7 +115,7 @@ bool ACTION_MANAGER::RunHotKey( int aHotKey ) const if( it == m_actionHotKeys.end() ) return false; // no appropriate action found for the hotkey - runAction( it->second ); + RunAction( it->second ); return true; } @@ -117,11 +125,3 @@ void ACTION_MANAGER::ClearHotKey( int aHotKey ) { m_actionHotKeys.erase( aHotKey ); } - - -void ACTION_MANAGER::runAction( const TOOL_ACTION* aAction ) const -{ - TOOL_EVENT event = aAction->MakeEvent(); - - m_toolMgr->ProcessEvent( event ); -} diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index f36d0cb343..57a98779f6 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -196,6 +196,12 @@ bool TOOL_MANAGER::RunAction( const std::string& aActionName ) } +void TOOL_MANAGER::RunAction( const TOOL_ACTION& aAction ) +{ + m_actionMgr->RunAction( &aAction ); +} + + bool TOOL_MANAGER::invokeTool( TOOL_BASE* aTool ) { wxASSERT( aTool != NULL ); diff --git a/include/tool/action_manager.h b/include/tool/action_manager.h index fa66a23eba..b38b329abc 100644 --- a/include/tool/action_manager.h +++ b/include/tool/action_manager.h @@ -81,6 +81,14 @@ public: */ bool RunAction( const std::string& aActionName ) const; + /** + * Function RunAction() + * Prepares an appropriate event and sends it to the destination specified in a TOOL_ACTION + * object. + * @param aAction is the action to be run. + */ + void RunAction( const TOOL_ACTION* aAction ) const; + /** * Function RunHotKey() * Runs an action associated with a hotkey (if there is one available). @@ -108,14 +116,6 @@ private: ///> Map for indexing actions by their hotkeys std::map m_actionHotKeys; - - /** - * Function runAction() - * Prepares an appropriate event and sends it to the destination specified in a TOOL_ACTION - * object. - * @param aAction is the action to be run. - */ - void runAction( const TOOL_ACTION* aAction ) const; }; #endif /* ACTION_MANAGER_H_ */ diff --git a/include/tool/tool_manager.h b/include/tool/tool_manager.h index 6e9c18acb0..c07dcfe94e 100644 --- a/include/tool/tool_manager.h +++ b/include/tool/tool_manager.h @@ -101,13 +101,21 @@ public: /** * Function RunAction() - * Runs the specified action. The common format is "application.ToolName.Action". + * Runs the specified action. The common format for action names is "application.ToolName.Action". * * @param aActionName is the name of action to be invoked. * @return True if the action finished successfully, false otherwise. */ bool RunAction( const std::string& aActionName ); + /** + * Function RunAction() + * Runs the specified action. + * + * @param aAction is the action to be invoked. + */ + void RunAction( const TOOL_ACTION& aAction ); + /** * Function FindTool() * Searches for a tool with given ID. diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index be15d90c64..18e0d0a0bb 100644 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -1458,6 +1458,7 @@ void PCB_EDIT_FRAME::OnSelectTool( wxCommandEvent& aEvent ) if( IsGalCanvasActive() ) { std::string actionName = COMMON_ACTIONS::TranslateLegacyId( id ); + if( !actionName.empty() ) m_toolManager->RunAction( actionName ); diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index ab79ba8e84..06692910e2 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -172,7 +172,7 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) } if( unselect ) - m_toolMgr->RunAction( "pcbnew.InteractiveSelection.Clear" ); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); RN_DATA* ratsnest = getModel( PCB_T )->GetRatsnest(); ratsnest->ClearSimple(); @@ -230,7 +230,7 @@ int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) getModel( PCB_T )->GetRatsnest()->Recalculate(); if( unselect ) - m_toolMgr->RunAction( "pcbnew.InteractiveSelection.Clear" ); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); } setTransitions(); @@ -277,7 +277,7 @@ int EDIT_TOOL::Rotate( TOOL_EVENT& aEvent ) getModel( PCB_T )->GetRatsnest()->Recalculate(); if( unselect ) - m_toolMgr->RunAction( "pcbnew.InteractiveSelection.Clear" ); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); return 0; } @@ -321,7 +321,7 @@ int EDIT_TOOL::Flip( TOOL_EVENT& aEvent ) getModel( PCB_T )->GetRatsnest()->Recalculate(); if( unselect ) - m_toolMgr->RunAction( "pcbnew.InteractiveSelection.Clear" ); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); return 0; } @@ -339,7 +339,7 @@ int EDIT_TOOL::Remove( TOOL_EVENT& aEvent ) PCB_EDIT_FRAME* editFrame = static_cast( m_toolMgr->GetEditFrame() ); // As we are about to remove items, they have to be removed from the selection first - m_toolMgr->RunAction( "pcbnew.InteractiveSelection.Clear" ); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); // Save them for( unsigned int i = 0; i < selectedItems.GetCount(); ++i ) @@ -461,7 +461,7 @@ bool EDIT_TOOL::makeSelection( const SELECTION_TOOL::SELECTION& aSelection ) if( aSelection.Empty() ) { // Try to find an item that could be modified - m_toolMgr->RunAction( "pcbnew.InteractiveSelection.Single" ); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionSingle ); if( aSelection.Empty() ) { diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 24d00f2439..20f88508df 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -123,7 +123,7 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) if( m_selection.Empty() ) selectSingle( evt->Position() ); - m_toolMgr->RunAction( "pcbnew.InteractiveEdit.properties" ); + m_toolMgr->RunAction( COMMON_ACTIONS::properties ); } // drag with LMB? Select multiple objects (or at least draw a selection box) or drag them From f87f12e222bbda86fd1009e51d61a5f499884c86 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 28 Feb 2014 16:53:28 +0100 Subject: [PATCH 139/741] Added TOOL_ACTION for updating EDIT_POINTS. EDIT_POINTs show up when there is only one item selected (now after deselection as well). --- pcbnew/tools/common_actions.cpp | 3 + pcbnew/tools/common_actions.h | 3 + pcbnew/tools/edit_points.h | 34 +++++---- pcbnew/tools/edit_tool.cpp | 20 +++-- pcbnew/tools/point_editor.cpp | 128 ++++++++++++++++---------------- pcbnew/tools/point_editor.h | 17 ++++- 6 files changed, 115 insertions(+), 90 deletions(-) diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 64dc5f760d..d5a996c284 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -99,6 +99,9 @@ TOOL_ACTION COMMON_ACTIONS::routerActivate( "pcbnew.InteractiveRouter", AS_GLOBAL, 0, "Run push & shove router", "Run push & shove router" ); +TOOL_ACTION COMMON_ACTIONS::pointEditorUpdate( "pcbnew.PointEditor.update", + AS_GLOBAL, 0, "", "" ); // No description, it is not supposed to be shown anywhere + std::string COMMON_ACTIONS::TranslateLegacyId( int aId ) { diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index 5d4908ac59..321c372436 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -87,6 +87,9 @@ public: /// Activation of the Push and Shove router static TOOL_ACTION routerActivate; + /// Update edit points + static TOOL_ACTION pointEditorUpdate; + /** * Function TranslateLegacyId() * Translates legacy tool ids to the corresponding TOOL_ACTION name. diff --git a/pcbnew/tools/edit_points.h b/pcbnew/tools/edit_points.h index 7ddfa2fcf9..e9a444286d 100644 --- a/pcbnew/tools/edit_points.h +++ b/pcbnew/tools/edit_points.h @@ -37,13 +37,13 @@ class EDIT_POINT; class EDIT_POINT_CONSTRAINT { public: - EDIT_POINT_CONSTRAINT( EDIT_POINT* aConstrained ) : m_constrained( aConstrained ) {}; + EDIT_POINT_CONSTRAINT( EDIT_POINT& aConstrained ) : m_constrained( aConstrained ) {}; virtual ~EDIT_POINT_CONSTRAINT() {}; virtual void Apply() = 0; protected: - EDIT_POINT* m_constrained; + EDIT_POINT& m_constrained; }; @@ -53,6 +53,7 @@ class EDIT_POINT public: EDIT_POINT( const VECTOR2I& aPoint ) : m_point( aPoint ), m_constraint( NULL ) {}; + ~EDIT_POINT() { delete m_constraint; @@ -121,6 +122,11 @@ public: */ EDIT_POINT* FindPoint( const VECTOR2I& aLocation ); + EDA_ITEM* GetParent() const + { + return m_parent; + } + void Add( const EDIT_POINT& aPoint ) { m_points.push_back( aPoint ); @@ -172,7 +178,7 @@ private: class EPC_VERTICAL : public EDIT_POINT_CONSTRAINT { public: - EPC_VERTICAL( EDIT_POINT* aConstrained, EDIT_POINT& aConstrainer ) : + EPC_VERTICAL( EDIT_POINT& aConstrained, EDIT_POINT& aConstrainer ) : EDIT_POINT_CONSTRAINT( aConstrained ), m_constrainer( aConstrainer ) {} @@ -180,9 +186,9 @@ public: virtual void Apply() { - VECTOR2I point = m_constrained->GetPosition(); + VECTOR2I point = m_constrained.GetPosition(); point.x = m_constrainer.GetPosition().x; - m_constrained->SetPosition( point ); + m_constrained.SetPosition( point ); } virtual std::list GetConstrainers() const @@ -198,7 +204,7 @@ private: class EPC_HORIZONTAL : public EDIT_POINT_CONSTRAINT { public: - EPC_HORIZONTAL( EDIT_POINT* aConstrained, EDIT_POINT& aConstrainer ) : + EPC_HORIZONTAL( EDIT_POINT& aConstrained, const EDIT_POINT& aConstrainer ) : EDIT_POINT_CONSTRAINT( aConstrained ), m_constrainer( aConstrainer ) {} @@ -206,20 +212,20 @@ public: virtual void Apply() { - VECTOR2I point = m_constrained->GetPosition(); + VECTOR2I point = m_constrained.GetPosition(); point.y = m_constrainer.GetPosition().y; - m_constrained->SetPosition( point ); + m_constrained.SetPosition( point ); } private: - EDIT_POINT& m_constrainer; + const EDIT_POINT& m_constrainer; }; class EPC_CIRCLE : public EDIT_POINT_CONSTRAINT { public: - EPC_CIRCLE( EDIT_POINT* aConstrained, EDIT_POINT& aCenter, EDIT_POINT& aEnd ) : + EPC_CIRCLE( EDIT_POINT& aConstrained, const EDIT_POINT& aCenter, const EDIT_POINT& aEnd ) : EDIT_POINT_CONSTRAINT( aConstrained ), m_center( aCenter ), m_end( aEnd ) {} @@ -228,7 +234,7 @@ public: virtual void Apply() { VECTOR2I centerToEnd = m_end.GetPosition() - m_center.GetPosition(); - VECTOR2I centerToPoint = m_constrained->GetPosition() - m_center.GetPosition(); + VECTOR2I centerToPoint = m_constrained.GetPosition() - m_center.GetPosition(); int radius = centerToEnd.EuclideanNorm(); double angle = centerToPoint.Angle(); @@ -236,12 +242,12 @@ public: VECTOR2I newLine( radius, 0 ); newLine = newLine.Rotate( angle ); - m_constrained->SetPosition( m_center.GetPosition() + newLine ); + m_constrained.SetPosition( m_center.GetPosition() + newLine ); } private: - EDIT_POINT& m_center; - EDIT_POINT& m_end; + const EDIT_POINT& m_center; + const EDIT_POINT& m_end; }; #endif /* EDIT_POINTS_H_ */ diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 06692910e2..53a72f25e3 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -151,6 +151,7 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) selection.group->ViewUpdate( VIEW_ITEM::GEOMETRY ); dragPosition = controls->GetCursorPosition(); + m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate ); } else if( evt->IsMouseUp( BUT_LEFT ) || evt->IsClick( BUT_LEFT ) ) @@ -233,6 +234,7 @@ int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); } + m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate ); setTransitions(); return 0; @@ -268,9 +270,6 @@ int EDIT_TOOL::Rotate( TOOL_EVENT& aEvent ) item->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); } - setTransitions(); - updateRatsnest( true ); - if( m_dragging ) selection.group->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); else @@ -279,6 +278,11 @@ int EDIT_TOOL::Rotate( TOOL_EVENT& aEvent ) if( unselect ) m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate ); + + updateRatsnest( true ); + setTransitions(); + return 0; } @@ -312,9 +316,6 @@ int EDIT_TOOL::Flip( TOOL_EVENT& aEvent ) item->ViewUpdate( KIGFX::VIEW_ITEM::LAYERS ); } - setTransitions(); - updateRatsnest( true ); - if( m_dragging ) selection.group->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); else @@ -323,6 +324,11 @@ int EDIT_TOOL::Flip( TOOL_EVENT& aEvent ) if( unselect ) m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate ); + + updateRatsnest( true ); + setTransitions(); + return 0; } @@ -359,8 +365,8 @@ int EDIT_TOOL::Remove( TOOL_EVENT& aEvent ) if( !( board->m_Status_Pcb & NET_CODES_OK ) ) board->BuildListOfNets(); + board->GetRatsnest()->Recalculate(); // TODO is it necessary? setTransitions(); - board->GetRatsnest()->Recalculate(); return 0; } diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp index efd1c35094..99a64a40a8 100644 --- a/pcbnew/tools/point_editor.cpp +++ b/pcbnew/tools/point_editor.cpp @@ -22,6 +22,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ +#include + #include #include #include @@ -41,10 +43,10 @@ class EDIT_POINTS_FACTORY { public: - static EDIT_POINTS Make( EDA_ITEM* aItem ) + static boost::shared_ptr Make( EDA_ITEM* aItem ) { // TODO generate list of points basing on the type - EDIT_POINTS points( aItem ); + boost::shared_ptr points = boost::make_shared( aItem ); switch( aItem->Type() ) { @@ -55,19 +57,19 @@ public: switch( segment->GetShape() ) { case S_SEGMENT: - points.Add( segment->GetStart() ); - points.Add( segment->GetEnd() ); + points->Add( segment->GetStart() ); + points->Add( segment->GetEnd() ); break; case S_ARC: - points.Add( segment->GetCenter() ); // points[0] - points.Add( segment->GetArcStart() ); // points[1] - points.Add( segment->GetArcEnd() ); // points[2] + points->Add( segment->GetCenter() ); // points[0] + points->Add( segment->GetArcStart() ); // points[1] + points->Add( segment->GetArcEnd() ); // points[2] // Set constraints // Arc end has to stay at the same radius as the start - points[2].SetConstraint( new EPC_CIRCLE( &points[2], points[0], points[1] ) ); + (*points)[2].SetConstraint( new EPC_CIRCLE( (*points)[2], (*points)[0], (*points)[1] ) ); break; default: // suppress warnings @@ -111,11 +113,8 @@ bool POINT_EDITOR::Init() } -int POINT_EDITOR::OnSelected( TOOL_EVENT& aEvent ) +int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) { - std::cout << "point editor activated" << std::endl; - std::cout << aEvent.Format() << std::endl; - const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); KIGFX::VIEW_CONTROLS* controls = getViewControls(); m_dragPoint = NULL; @@ -125,24 +124,15 @@ int POINT_EDITOR::OnSelected( TOOL_EVENT& aEvent ) Activate(); EDA_ITEM* item = selection.items.GetPickedItem( 0 ); - EDIT_POINTS editPoints = EDIT_POINTS_FACTORY::Make( item ); - m_toolMgr->GetView()->Add( &editPoints ); + m_editPoints = EDIT_POINTS_FACTORY::Make( item ); + m_toolMgr->GetView()->Add( m_editPoints.get() ); // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { - if( evt->IsCancel() || - evt->Matches( m_selectionTool->ClearedEvent ) || - evt->Matches( m_selectionTool->DeselectedEvent ) || - evt->Matches( m_selectionTool->SelectedEvent ) ) + if( evt->IsMotion() ) { - m_toolMgr->PassEvent(); - break; - } - - else if( evt->IsMotion() ) - { - EDIT_POINT* point = editPoints.FindPoint( evt->Position() ); + EDIT_POINT* point = m_editPoints->FindPoint( evt->Position() ); if( m_dragPoint != point ) { @@ -163,30 +153,37 @@ int POINT_EDITOR::OnSelected( TOOL_EVENT& aEvent ) m_dragPoint = point; } - else if( evt->IsDrag( BUT_LEFT ) ) + else if( evt->IsDrag( BUT_LEFT ) && m_dragPoint ) { - if( m_dragPoint ) - { - m_dragPoint->SetPosition( controls->GetCursorPosition() ); - m_dragPoint->ApplyConstraint(); - updateItem( item, editPoints ); - updatePoints( item, editPoints ); + m_dragPoint->SetPosition( controls->GetCursorPosition() ); + m_dragPoint->ApplyConstraint(); + updateItem(); + updatePoints(); - editPoints.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - } - else - { - m_toolMgr->PassEvent(); - } + m_editPoints->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); } - else if( evt->IsClick( BUT_LEFT ) ) + else if( evt->IsAction( &COMMON_ACTIONS::pointEditorUpdate ) ) + { + updatePoints(); + } + + else if( evt->IsCancel() || + evt->Matches( m_selectionTool->ClearedEvent ) || + evt->Matches( m_selectionTool->DeselectedEvent ) || + evt->Matches( m_selectionTool->SelectedEvent ) ) + { + break; + } + + else { m_toolMgr->PassEvent(); } } - m_toolMgr->GetView()->Remove( &editPoints ); + m_toolMgr->GetView()->Remove( m_editPoints.get() ); + m_editPoints.reset(); item->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); } @@ -200,42 +197,38 @@ int POINT_EDITOR::OnSelected( TOOL_EVENT& aEvent ) } -void POINT_EDITOR::setTransitions() +void POINT_EDITOR::updateItem() const { - Go( &POINT_EDITOR::OnSelected, m_selectionTool->SelectedEvent ); -} + EDA_ITEM* item = m_editPoints->GetParent(); - -void POINT_EDITOR::updateItem( EDA_ITEM* aItem, EDIT_POINTS& aPoints ) const -{ - switch( aItem->Type() ) + switch( item->Type() ) { case PCB_LINE_T: { - DRAWSEGMENT* segment = static_cast( aItem ); + DRAWSEGMENT* segment = static_cast( item ); switch( segment->GetShape() ) { case S_SEGMENT: - if( &aPoints[0] == m_dragPoint ) - segment->SetStart( wxPoint( aPoints[0].GetPosition().x, aPoints[0].GetPosition().y ) ); - else if( &aPoints[1] == m_dragPoint ) - segment->SetEnd( wxPoint( aPoints[1].GetPosition().x, aPoints[1].GetPosition().y ) ); + if( &(*m_editPoints)[0] == m_dragPoint ) + segment->SetStart( wxPoint( (*m_editPoints)[0].GetPosition().x, (*m_editPoints)[0].GetPosition().y ) ); + else if( &(*m_editPoints)[1] == m_dragPoint ) + segment->SetEnd( wxPoint( (*m_editPoints)[1].GetPosition().x, (*m_editPoints)[1].GetPosition().y ) ); break; case S_ARC: { - const VECTOR2I& center = aPoints[0].GetPosition(); - const VECTOR2I& start = aPoints[1].GetPosition(); - const VECTOR2I& end = aPoints[2].GetPosition(); + const VECTOR2I& center = (*m_editPoints)[0].GetPosition(); + const VECTOR2I& start = (*m_editPoints)[1].GetPosition(); + const VECTOR2I& end = (*m_editPoints)[2].GetPosition(); if( center != segment->GetCenter() ) { wxPoint moveVector = wxPoint( center.x, center.y ) - segment->GetCenter(); segment->Move( moveVector ); - aPoints[1].SetPosition( segment->GetArcStart() ); - aPoints[2].SetPosition( segment->GetArcEnd() ); + (*m_editPoints)[1].SetPosition( segment->GetArcStart() ); + (*m_editPoints)[2].SetPosition( segment->GetArcEnd() ); } else @@ -270,25 +263,30 @@ void POINT_EDITOR::updateItem( EDA_ITEM* aItem, EDIT_POINTS& aPoints ) const } -void POINT_EDITOR::updatePoints( const EDA_ITEM* aItem, EDIT_POINTS& aPoints ) const +void POINT_EDITOR::updatePoints() const { - switch( aItem->Type() ) + if( !m_editPoints ) + return; + + EDA_ITEM* item = m_editPoints->GetParent(); + + switch( item->Type() ) { case PCB_LINE_T: { - const DRAWSEGMENT* segment = static_cast( aItem ); + const DRAWSEGMENT* segment = static_cast( item ); { switch( segment->GetShape() ) { case S_SEGMENT: - aPoints[0].SetPosition( segment->GetStart() ); - aPoints[1].SetPosition( segment->GetEnd() ); + (*m_editPoints)[0].SetPosition( segment->GetStart() ); + (*m_editPoints)[1].SetPosition( segment->GetEnd() ); break; case S_ARC: - aPoints[0].SetPosition( segment->GetCenter() ); - aPoints[1].SetPosition( segment->GetArcStart() ); - aPoints[2].SetPosition( segment->GetArcEnd() ); + (*m_editPoints)[0].SetPosition( segment->GetCenter() ); + (*m_editPoints)[1].SetPosition( segment->GetArcStart() ); + (*m_editPoints)[2].SetPosition( segment->GetArcEnd() ); break; default: // suppress warnings diff --git a/pcbnew/tools/point_editor.h b/pcbnew/tools/point_editor.h index a44ac07a00..ca6b4abde8 100644 --- a/pcbnew/tools/point_editor.h +++ b/pcbnew/tools/point_editor.h @@ -25,6 +25,8 @@ #ifndef __POINT_EDITOR_H #define __POINT_EDITOR_H +#include + #include #include "edit_points.h" @@ -52,7 +54,7 @@ public: * * Change selection event handler. */ - int OnSelected( TOOL_EVENT& aEvent ); + int OnSelectionChange( TOOL_EVENT& aEvent ); private: ///> Selection tool used for obtaining selected items @@ -61,14 +63,21 @@ private: ///> Currently edited point, NULL if there is none. EDIT_POINT* m_dragPoint; + ///> Currently available edit points. + boost::shared_ptr m_editPoints; + ///> Updates item's points with edit points. - void updateItem( EDA_ITEM* aItem, EDIT_POINTS& aPoints ) const; + void updateItem() const; ///> Updates edit points with item's points. - void updatePoints( const EDA_ITEM* aItem, EDIT_POINTS& aPoints ) const; + void updatePoints() const; ///> Sets up handlers for various events. - void setTransitions(); + void setTransitions() + { + Go( &POINT_EDITOR::OnSelectionChange, m_selectionTool->SelectedEvent ); + Go( &POINT_EDITOR::OnSelectionChange, m_selectionTool->DeselectedEvent ); + } }; #endif From 3c656691cf304b27d359f47225a0257a1c4159f0 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 28 Feb 2014 17:20:10 +0100 Subject: [PATCH 140/741] Fixed POINT_EDITOR crash on GAL change / board reload. --- pcbnew/tools/point_editor.cpp | 34 ++++++++++++++++++++-------------- pcbnew/tools/point_editor.h | 2 +- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp index 99a64a40a8..0ce7035523 100644 --- a/pcbnew/tools/point_editor.cpp +++ b/pcbnew/tools/point_editor.cpp @@ -96,6 +96,12 @@ POINT_EDITOR::POINT_EDITOR() : } +void POINT_EDITOR::Reset( RESET_REASON aReason ) +{ + m_editPoints.reset(); +} + + bool POINT_EDITOR::Init() { // Find the selection tool, so they can cooperate @@ -130,6 +136,14 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { + if( !m_editPoints || evt->IsCancel() || + evt->Matches( m_selectionTool->ClearedEvent ) || + evt->Matches( m_selectionTool->DeselectedEvent ) || + evt->Matches( m_selectionTool->SelectedEvent ) ) + { + break; + } + if( evt->IsMotion() ) { EDIT_POINT* point = m_editPoints->FindPoint( evt->Position() ); @@ -168,23 +182,18 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) updatePoints(); } - else if( evt->IsCancel() || - evt->Matches( m_selectionTool->ClearedEvent ) || - evt->Matches( m_selectionTool->DeselectedEvent ) || - evt->Matches( m_selectionTool->SelectedEvent ) ) - { - break; - } - else { m_toolMgr->PassEvent(); } } - m_toolMgr->GetView()->Remove( m_editPoints.get() ); - m_editPoints.reset(); - item->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + if( m_editPoints ) + { + item->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + m_toolMgr->GetView()->Remove( m_editPoints.get() ); + m_editPoints.reset(); + } } controls->ShowCursor( false ); @@ -265,9 +274,6 @@ void POINT_EDITOR::updateItem() const void POINT_EDITOR::updatePoints() const { - if( !m_editPoints ) - return; - EDA_ITEM* item = m_editPoints->GetParent(); switch( item->Type() ) diff --git a/pcbnew/tools/point_editor.h b/pcbnew/tools/point_editor.h index ca6b4abde8..d43a09dda0 100644 --- a/pcbnew/tools/point_editor.h +++ b/pcbnew/tools/point_editor.h @@ -44,7 +44,7 @@ public: POINT_EDITOR(); /// @copydoc TOOL_INTERACTIVE::Reset() - void Reset( RESET_REASON aReason ) {}; + void Reset( RESET_REASON aReason ); /// @copydoc TOOL_INTERACTIVE::Init() bool Init(); From d1ffaf0deb1d9db14c0fdd9b2d6db63044c69293 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 28 Feb 2014 18:24:13 +0100 Subject: [PATCH 141/741] Circles are supported by POINT_EDITOR. --- pcbnew/tools/point_editor.cpp | 38 ++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp index 0ce7035523..cf464dc436 100644 --- a/pcbnew/tools/point_editor.cpp +++ b/pcbnew/tools/point_editor.cpp @@ -72,6 +72,10 @@ public: (*points)[2].SetConstraint( new EPC_CIRCLE( (*points)[2], (*points)[0], (*points)[1] ) ); break; + case S_CIRCLE: + points->Add( segment->GetCenter() ); + points->Add( segment->GetEnd() ); + default: // suppress warnings break; } @@ -219,9 +223,12 @@ void POINT_EDITOR::updateItem() const { case S_SEGMENT: if( &(*m_editPoints)[0] == m_dragPoint ) - segment->SetStart( wxPoint( (*m_editPoints)[0].GetPosition().x, (*m_editPoints)[0].GetPosition().y ) ); + segment->SetStart( wxPoint( (*m_editPoints)[0].GetPosition().x, + (*m_editPoints)[0].GetPosition().y ) ); + else if( &(*m_editPoints)[1] == m_dragPoint ) - segment->SetEnd( wxPoint( (*m_editPoints)[1].GetPosition().x, (*m_editPoints)[1].GetPosition().y ) ); + segment->SetEnd( wxPoint( (*m_editPoints)[1].GetPosition().x, + (*m_editPoints)[1].GetPosition().y ) ); break; @@ -250,6 +257,7 @@ void POINT_EDITOR::updateItem() const // Adjust the new angle to (counter)clockwise setting bool clockwise = ( segment->GetAngle() > 0 ); + if( clockwise && newAngle < 0.0 ) newAngle += 3600.0; else if( !clockwise && newAngle > 0.0 ) @@ -257,8 +265,27 @@ void POINT_EDITOR::updateItem() const segment->SetAngle( newAngle ); } + + break; + } + + case S_CIRCLE: + { + const VECTOR2I& center = (*m_editPoints)[0].GetPosition(); + const VECTOR2I& end = (*m_editPoints)[1].GetPosition(); + + if( m_dragPoint == &(*m_editPoints)[0] ) + { + wxPoint moveVector = wxPoint( center.x, center.y ) - segment->GetCenter(); + segment->Move( moveVector ); + } + else + { + segment->SetEnd( wxPoint( end.x, end.y ) ); + } + + break; } - break; default: // suppress warnings break; @@ -295,6 +322,11 @@ void POINT_EDITOR::updatePoints() const (*m_editPoints)[2].SetPosition( segment->GetArcEnd() ); break; + case S_CIRCLE: + (*m_editPoints)[0].SetPosition( segment->GetCenter() ); + (*m_editPoints)[1].SetPosition( segment->GetEnd() ); + break; + default: // suppress warnings break; } From 24c9b705a32e7764573fd9f56d06b216ab698da9 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 28 Feb 2014 18:24:29 +0100 Subject: [PATCH 142/741] Zones are supported by POINT_EDITOR. --- pcbnew/tools/point_editor.cpp | 43 +++++++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp index cf464dc436..59e67ff732 100644 --- a/pcbnew/tools/point_editor.cpp +++ b/pcbnew/tools/point_editor.cpp @@ -33,6 +33,7 @@ #include "point_editor.h" #include +#include /** * Class POINT_EDITOR @@ -52,7 +53,7 @@ public: { case PCB_LINE_T: { - DRAWSEGMENT* segment = static_cast( aItem ); + const DRAWSEGMENT* segment = static_cast( aItem ); switch( segment->GetShape() ) { @@ -79,8 +80,19 @@ public: default: // suppress warnings break; } + + break; + } + + case PCB_ZONE_AREA_T: + { + const CPolyLine* outline = static_cast( aItem )->Outline(); + + for( int i = 0; i < outline->GetCornersCount(); ++i ) + points->Add( outline->GetPos( i ) ); + + break; } - break; default: break; @@ -290,6 +302,21 @@ void POINT_EDITOR::updateItem() const default: // suppress warnings break; } + + break; + } + + case PCB_ZONE_AREA_T: + { + ZONE_CONTAINER* zone = static_cast( item ); + CPolyLine* outline = zone->Outline(); + + for( int i = 0; i < outline->GetCornersCount(); ++i ) + { + outline->SetX( i, (*m_editPoints)[i].GetPosition().x ); + outline->SetY( i, (*m_editPoints)[i].GetPosition().y ); + } + break; } @@ -330,7 +357,19 @@ void POINT_EDITOR::updatePoints() const default: // suppress warnings break; } + + break; } + } + + case PCB_ZONE_AREA_T: + { + const ZONE_CONTAINER* zone = static_cast( item ); + const CPolyLine* outline = zone->Outline(); + + for( int i = 0; i < outline->GetCornersCount(); ++i ) + (*m_editPoints)[i].SetPosition( outline->GetPos( i ) ); + break; } From 505b38416d201bc9289ec881d6a6e47536c2a47c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 3 Mar 2014 17:15:41 +0100 Subject: [PATCH 143/741] Removed a few memory leaks. --- common/CMakeLists.txt | 1 + common/worksheet_viewitem.cpp | 4 +--- include/math/vector2d.h | 1 + include/worksheet_viewitem.h | 3 +-- pcbnew/class_board.cpp | 11 ++++++++++- pcbnew/class_board.h | 26 ++++++++++++++++++++++++++ pcbnew/pcbframe.cpp | 22 +++++++++------------- pcbnew/router/pns_router.cpp | 4 ++++ pcbnew/router/pns_solid.h | 8 ++++++-- 9 files changed, 59 insertions(+), 21 deletions(-) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 7bc4b9ed88..ea5c2b3144 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -220,6 +220,7 @@ set( PCB_COMMON_SRCS ../pcbnew/class_zone_settings.cpp ../pcbnew/classpcb.cpp ../pcbnew/ratsnest_data.cpp + ../pcbnew/ratsnest_viewitem.cpp ../pcbnew/collectors.cpp ../pcbnew/netlist_reader.cpp ../pcbnew/legacy_netlist_reader.cpp diff --git a/common/worksheet_viewitem.cpp b/common/worksheet_viewitem.cpp index 7ecf6de8d7..ba4185f8af 100644 --- a/common/worksheet_viewitem.cpp +++ b/common/worksheet_viewitem.cpp @@ -36,10 +36,8 @@ using namespace KIGFX; -WORKSHEET_VIEWITEM::WORKSHEET_VIEWITEM( const std::string& aFileName, const std::string& aSheetName, - const PAGE_INFO* aPageInfo, const TITLE_BLOCK* aTitleBlock ) : +WORKSHEET_VIEWITEM::WORKSHEET_VIEWITEM( const PAGE_INFO* aPageInfo, const TITLE_BLOCK* aTitleBlock ) : EDA_ITEM( NOT_USED ), // this item is never added to a BOARD so it needs no type - m_fileName( aFileName ), m_sheetName( aSheetName ), m_titleBlock( aTitleBlock ), m_pageInfo( aPageInfo ), m_sheetNumber( 1 ), m_sheetCount( 1 ) {} diff --git a/include/math/vector2d.h b/include/math/vector2d.h index 09cae7b31f..feee5ff060 100644 --- a/include/math/vector2d.h +++ b/include/math/vector2d.h @@ -31,6 +31,7 @@ #include #include #include +#include #include diff --git a/include/worksheet_viewitem.h b/include/worksheet_viewitem.h index 6380af9fd8..ca506c8577 100644 --- a/include/worksheet_viewitem.h +++ b/include/worksheet_viewitem.h @@ -47,8 +47,7 @@ class GAL; class WORKSHEET_VIEWITEM : public EDA_ITEM { public: - WORKSHEET_VIEWITEM( const std::string& aFileName, const std::string& aSheetName, - const PAGE_INFO* aPageInfo, const TITLE_BLOCK* aTitleBlock ); + WORKSHEET_VIEWITEM( const PAGE_INFO* aPageInfo, const TITLE_BLOCK* aTitleBlock ); /** * Function SetFileName() diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index ab0272f8b4..ff2a89a0d5 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -43,6 +43,8 @@ #include #include #include +#include +#include #include #include @@ -104,7 +106,13 @@ BOARD::BOARD() : SetCurrentNetClass( m_NetClasses.GetDefault()->GetName() ); + // Initialize ratsnest m_ratsnest = new RN_DATA( this ); + m_ratsnestViewItem = new KIGFX::RATSNEST_VIEWITEM( m_ratsnest ); + + // Initialize view item for displaying worksheet frame + m_worksheetViewItem = new KIGFX::WORKSHEET_VIEWITEM( &m_paper, &m_titles ); + m_worksheetViewItem->SetFileName( std::string( m_fileName.mb_str() ) ); } @@ -116,10 +124,11 @@ BOARD::~BOARD() Delete( area_to_remove ); } + delete m_worksheetViewItem; + delete m_ratsnestViewItem; delete m_ratsnest; m_FullRatsnest.clear(); - m_LocalRatsnest.clear(); DeleteMARKERs(); diff --git a/pcbnew/class_board.h b/pcbnew/class_board.h index c32d1d90e7..cac0f66ffd 100644 --- a/pcbnew/class_board.h +++ b/pcbnew/class_board.h @@ -58,6 +58,12 @@ class NETLIST; class REPORTER; class RN_DATA; +namespace KIGFX +{ + class RATSNEST_VIEWITEM; + class WORKSHEET_VIEWITEM; +} + // non-owning container of item candidates when searching for items on the same track. typedef std::vector< TRACK* > TRACK_PTRS; @@ -227,6 +233,8 @@ private: EDA_RECT m_BoundingBox; NETINFO_LIST m_NetInfo; ///< net info list (name, design constraints .. RN_DATA* m_ratsnest; + KIGFX::RATSNEST_VIEWITEM* m_ratsnestViewItem; ///< VIEW_ITEM that draws ratsnest + KIGFX::WORKSHEET_VIEWITEM* m_worksheetViewItem; ///< VIEW_ITEM that draws worksheet frame BOARD_DESIGN_SETTINGS m_designSettings; ZONE_SETTINGS m_zoneSettings; @@ -367,6 +375,24 @@ public: return m_ratsnest; } + /** + * Function GetRatsnestViewItem() + * returns VIEW_ITEM responsible for drawing the ratsnest for the board. + */ + KIGFX::RATSNEST_VIEWITEM* GetRatsnestViewItem() const + { + return m_ratsnestViewItem; + } + + /** + * Function GetWorksheetViewItem() + * returns VIEW_ITEM responsible for drawing the worksheet frame. + */ + KIGFX::WORKSHEET_VIEWITEM* GetWorksheetViewItem() const + { + return m_worksheetViewItem; + } + /** * Function DeleteMARKERs * deletes ALL MARKERS from the board. diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index ac4debcc70..64abab4807 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -596,26 +596,22 @@ void PCB_EDIT_FRAME::ViewReloadBoard( const BOARD* aBoard ) const view->Add( zone ); } - // Add an entry for the worksheet layout - KIGFX::WORKSHEET_VIEWITEM* worksheet = new KIGFX::WORKSHEET_VIEWITEM( - std::string( aBoard->GetFileName().mb_str() ), - std::string( GetScreenDesc().mb_str() ), - &GetPageSettings(), &GetTitleBlock() ); + KIGFX::WORKSHEET_VIEWITEM* worksheet = aBoard->GetWorksheetViewItem(); + worksheet->SetSheetName( std::string( GetScreenDesc().mb_str() ) ); + BASE_SCREEN* screen = GetScreen(); + if( screen != NULL ) { - worksheet->SetSheetNumber( GetScreen()->m_ScreenNumber ); - worksheet->SetSheetCount( GetScreen()->m_NumberOfScreens ); + worksheet->SetSheetNumber( screen->m_ScreenNumber ); + worksheet->SetSheetCount( screen->m_NumberOfScreens ); } view->Add( worksheet ); + view->Add( aBoard->GetRatsnestViewItem() ); - // Add an entry for the ratsnest - RN_DATA* ratsnest = aBoard->GetRatsnest(); - ratsnest->Recalculate(); - view->Add( new KIGFX::RATSNEST_VIEWITEM( ratsnest ) ); - - view->SetPanBoundary( worksheet->ViewBBox() ); + // Limit panning to the size of worksheet frame + view->SetPanBoundary( aBoard->GetWorksheetViewItem()->ViewBBox() ); view->RecacheAllItems( true ); if( IsGalCanvasActive() ) diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index 0aef34f903..646d011404 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -338,9 +338,13 @@ void PNS_ROUTER::ClearWorld() if( m_placer ) delete m_placer; + if( m_previewItems ) + delete m_previewItems; + m_clearanceFunc = NULL; m_world = NULL; m_placer = NULL; + m_previewItems = NULL; } diff --git a/pcbnew/router/pns_solid.h b/pcbnew/router/pns_solid.h index db52c808c4..b6f38a2851 100644 --- a/pcbnew/router/pns_solid.h +++ b/pcbnew/router/pns_solid.h @@ -32,10 +32,14 @@ class PNS_SOLID : public PNS_ITEM { public: - PNS_SOLID() : PNS_ITEM( SOLID ) + PNS_SOLID() : PNS_ITEM( SOLID ), m_shape( NULL ) { m_movable = false; - m_shape = NULL; + } + + ~PNS_SOLID() + { + delete m_shape; } PNS_ITEM* Clone() const; From c557e52dabce4ff501a61e281ac9083640a4aa52 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 5 Mar 2014 14:57:14 +0100 Subject: [PATCH 144/741] Squashed memory leaks. --- common/geometry/hetriang.cpp | 92 +++++++++++++++------------------ include/ttl/halfedge/hetriang.h | 61 +++++++++++++--------- pcbnew/ratsnest_data.cpp | 37 ++++++++----- 3 files changed, 102 insertions(+), 88 deletions(-) diff --git a/common/geometry/hetriang.cpp b/common/geometry/hetriang.cpp index b69255cdbf..eb5e59ecf7 100644 --- a/common/geometry/hetriang.cpp +++ b/common/geometry/hetriang.cpp @@ -45,6 +45,8 @@ #include #include #include +#include +#include using namespace hed; @@ -115,28 +117,27 @@ EdgePtr Triangulation::initTwoEnclosingTriangles(NodesContainer::iterator first, double dx = (xmax-xmin)/fac; double dy = (ymax-ymin)/fac; - NodePtr n1(new Node(xmin-dx,ymin-dy)); - NodePtr n2(new Node(xmax+dx,ymin-dy)); - NodePtr n3(new Node(xmax+dx,ymax+dy)); - NodePtr n4(new Node(xmin-dx,ymax+dy)); + NodePtr n1 = boost::make_shared(xmin-dx, ymin-dy); + NodePtr n2 = boost::make_shared(xmax+dx, ymin-dy); + NodePtr n3 = boost::make_shared(xmax+dx, ymax+dy); + NodePtr n4 = boost::make_shared(xmin-dx, ymax+dy); // diagonal - EdgePtr e1d(new Edge); // lower - EdgePtr e2d(new Edge); // upper, the twin edge + EdgePtr e1d = boost::make_shared(); + EdgePtr e2d = boost::make_shared(); // lower triangle - EdgePtr e11(new Edge); - EdgePtr e12(new Edge); + EdgePtr e11 = boost::make_shared(); + EdgePtr e12 = boost::make_shared(); // upper triangle - EdgePtr e21(new Edge); // upper upper - EdgePtr e22(new Edge); + EdgePtr e21 = boost::make_shared(); + EdgePtr e22 = boost::make_shared(); // lower triangle e1d->setSourceNode(n3); e1d->setNextEdgeInFace(e11); e1d->setTwinEdge(e2d); - e1d->setAsLeadingEdge(); addLeadingEdge(e1d); e11->setSourceNode(n1); @@ -149,7 +150,6 @@ EdgePtr Triangulation::initTwoEnclosingTriangles(NodesContainer::iterator first, e2d->setSourceNode(n1); e2d->setNextEdgeInFace(e21); e2d->setTwinEdge(e1d); - e2d->setAsLeadingEdge(); addLeadingEdge(e2d); e21->setSourceNode(n3); @@ -225,13 +225,10 @@ void Triangulation::removeTriangle(EdgePtr& edge) { // Remove the triangle EdgePtr e2(e1->getNextEdgeInFace()); EdgePtr e3(e2->getNextEdgeInFace()); - - if (e1->getTwinEdge()) - e1->getTwinEdge()->setTwinEdge(EdgePtr()); - if (e2->getTwinEdge()) - e2->getTwinEdge()->setTwinEdge(EdgePtr()); - if (e3->getTwinEdge()) - e3->getTwinEdge()->setTwinEdge(EdgePtr()); + + e1->clear(); + e2->clear(); + e3->clear(); } @@ -268,6 +265,19 @@ void Triangulation::reverse_splitTriangle(EdgePtr& edge) { // from the triangulation, but the arcs have not been deleted. // Next delete the 6 half edges radiating from the node // The node is maintained by handle and need not be deleted explicitly + EdgePtr estar = edge; + EdgePtr enext = estar->getTwinEdge()->getNextEdgeInFace(); + estar->getTwinEdge()->clear(); + estar->clear(); + + estar = enext; + enext = estar->getTwinEdge()->getNextEdgeInFace(); + estar->getTwinEdge()->clear(); + estar->clear(); + + enext->getTwinEdge()->clear(); + enext->clear(); + // Create the new triangle e1->setNextEdgeInFace(e2); @@ -277,25 +287,6 @@ void Triangulation::reverse_splitTriangle(EdgePtr& edge) { } -//-------------------------------------------------------------------------------------------------- -// This is a "template" for iterating the boundary -/* -static void iterateBoundary(const Dart& dart) { -cout << "Iterate boundary 2" << endl; -// input is a dart at the boundary - - Dart dart_iter = dart; - do { - if (helper->isBoundaryEdge(dart_iter)) - dart_iter.alpha0().alpha1(); - else - dart_iter.alpha2().alpha1(); - - } while(dart_iter != dart); -} -*/ - - //-------------------------------------------------------------------------------------------------- Dart Triangulation::createDart() { @@ -332,18 +323,19 @@ bool Triangulation::removeLeadingEdgeFromList(EdgePtr& leadingEdge) { //-------------------------------------------------------------------------------------------------- void Triangulation::cleanAll() { - leadingEdges_.clear(); + BOOST_FOREACH(EdgePtr& edge, leadingEdges_) + edge->setNextEdgeInFace(EdgePtr()); } //-------------------------------------------------------------------------------------------------- void Triangulation::swapEdge(Dart& dart) { - if (!dart.getEdge()->isConstrained()) swapEdge(dart.getEdge()); + swapEdge(dart.getEdge()); } //-------------------------------------------------------------------------------------------------- -void Triangulation::splitTriangle(Dart& dart, NodePtr point) { +void Triangulation::splitTriangle(Dart& dart, const NodePtr& point) { EdgePtr edge = splitTriangle(dart.getEdge(), point); dart.init(edge); } @@ -429,7 +421,7 @@ list* Triangulation::getEdges(bool skip_boundary_edges) const { //-------------------------------------------------------------------------------------------------- -EdgePtr Triangulation::splitTriangle(EdgePtr& edge, NodePtr& point) { +EdgePtr Triangulation::splitTriangle(EdgePtr& edge, const NodePtr& point) { // Add a node by just splitting a triangle into three triangles // Assumes the half edge is located in the triangle @@ -457,12 +449,12 @@ EdgePtr Triangulation::splitTriangle(EdgePtr& edge, NodePtr& point) { EdgePtr e3(e2->getNextEdgeInFace()); NodePtr n3(e3->getSourceNode()); - EdgePtr e1_n(new Edge); - EdgePtr e11_n(new Edge); - EdgePtr e2_n(new Edge); - EdgePtr e22_n(new Edge); - EdgePtr e3_n(new Edge); - EdgePtr e33_n(new Edge); + EdgePtr e1_n = boost::make_shared(); + EdgePtr e11_n = boost::make_shared(); + EdgePtr e2_n = boost::make_shared(); + EdgePtr e22_n = boost::make_shared(); + EdgePtr e3_n = boost::make_shared(); + EdgePtr e33_n = boost::make_shared(); e1_n->setSourceNode(n1); e11_n->setSourceNode(point); @@ -503,7 +495,7 @@ EdgePtr Triangulation::splitTriangle(EdgePtr& edge, NodePtr& point) { else if(e3->isLeadingEdge()) removeLeadingEdgeFromList(e3); else - return EdgePtr(); + assert( false ); // one of the edges should be leading addLeadingEdge(e1_n); addLeadingEdge(e2_n); @@ -640,7 +632,7 @@ void Triangulation::optimizeDelaunay() { Dart dart(edge); // Constrained edges should not be swapped - if (!edge->isConstrained() && helper->swapTestDelaunay(dart, cycling_check)) { + if (helper->swapTestDelaunay(dart, cycling_check)) { optimal = false; swapEdge(edge); } diff --git a/include/ttl/halfedge/hetriang.h b/include/ttl/halfedge/hetriang.h index c8326a417d..2c5380864e 100644 --- a/include/ttl/halfedge/hetriang.h +++ b/include/ttl/halfedge/hetriang.h @@ -53,6 +53,7 @@ #include #include #include +#include namespace ttl { class TriangulationHelper; @@ -68,6 +69,7 @@ namespace hed { class Edge; typedef boost::shared_ptr NodePtr; typedef boost::shared_ptr EdgePtr; + typedef boost::weak_ptr EdgeWeakPtr; typedef std::vector NodesContainer; //------------------------------------------------------------------------------------------------ @@ -154,8 +156,7 @@ public: class Edge { public: /// Constructor - Edge() : weight_(0) - { flags_.isLeadingEdge_ = false; flags_.isConstrained_ = false; } + Edge() : weight_(0), isLeadingEdge_(false) {} /// Destructor virtual ~Edge() {} @@ -170,49 +171,52 @@ public: void setTwinEdge(const EdgePtr& edge) { twinEdge_ = edge; } /// Sets the edge as a leading edge - void setAsLeadingEdge(bool val=true) { flags_.isLeadingEdge_ = val; } + void setAsLeadingEdge(bool val=true) { isLeadingEdge_ = val; } /// Checks if an edge is a leading edge - bool isLeadingEdge() const { return flags_.isLeadingEdge_; } - - /// Sets the edge as a constrained edge - void setConstrained(bool val=true) { flags_.isConstrained_ = val; - if (twinEdge_) twinEdge_->flags_.isConstrained_ = val; } - - /// Checks if an edge is constrained - bool isConstrained() const { return flags_.isConstrained_; } + bool isLeadingEdge() const { return isLeadingEdge_; } /// Returns the twin edge - const EdgePtr& getTwinEdge() const { return twinEdge_; }; + EdgePtr getTwinEdge() const { return twinEdge_.lock(); }; + + void clearTwinEdge() { twinEdge_.reset(); } /// Returns the next edge in face const EdgePtr& getNextEdgeInFace() const { return nextEdgeInFace_; } /// Retuns the source node - virtual const NodePtr& getSourceNode() const { return sourceNode_; } + const NodePtr& getSourceNode() const { return sourceNode_; } /// Returns the target node - virtual const NodePtr& getTargetNode() const { return getNextEdgeInFace()->getSourceNode(); } + virtual const NodePtr& getTargetNode() const { return nextEdgeInFace_->getSourceNode(); } void setWeight( unsigned int weight ) { weight_ = weight; } unsigned int getWeight() const { return weight_; } + void clear() + { + sourceNode_.reset(); + nextEdgeInFace_.reset(); + + if( !twinEdge_.expired() ) + { + twinEdge_.lock()->clearTwinEdge(); + twinEdge_.reset(); + } + } + protected: NodePtr sourceNode_; - EdgePtr twinEdge_; + EdgeWeakPtr twinEdge_; EdgePtr nextEdgeInFace_; unsigned int weight_; - - struct { - bool isLeadingEdge_; - bool isConstrained_; - } flags_; + bool isLeadingEdge_; }; // End of class Edge /** \class EdgeMST - * \brief \b %Specialization of Edge class to be used for Minimum Spanning Tree algorithm. + * \brief \b Specialization of %Edge class to be used for Minimum Spanning Tree algorithm. */ class EdgeMST : public Edge { @@ -224,10 +228,17 @@ public: target_(target) { sourceNode_ = source; weight_ = weight; } + EdgeMST( const Edge& edge ) + { + sourceNode_ = edge.getSourceNode(); + target_ = edge.getTargetNode(); + weight_ = edge.getWeight(); + } + ~EdgeMST() {}; /// @copydoc Edge::setSourceNode() - const NodePtr& getTargetNode() const { return target_; } + virtual const NodePtr& getTargetNode() const { return target_; } }; @@ -288,7 +299,7 @@ public: * \param dart * Output: A CCW dart incident with the new node; see the figure. */ - void splitTriangle(Dart& dart, NodePtr point); + void splitTriangle(Dart& dart, const NodePtr& point); /** The reverse operation of TTLtraits::splitTriangle. * This function is only required for functions that involve @@ -332,7 +343,7 @@ public: void swapEdge(EdgePtr& diagonal); /// Splits the triangle associated with edge into three new triangles joining at point - EdgePtr splitTriangle(EdgePtr& edge, NodePtr& point); + EdgePtr splitTriangle(EdgePtr& edge, const NodePtr& point); // Functions required by TTL for removing nodes in a Delaunay triangulation @@ -350,7 +361,7 @@ public: const std::list& getLeadingEdges() const { return leadingEdges_; } /// Returns the number of triangles - int noTriangles() const { return (int)leadingEdges_.size(); } + int noTriangles() const { return (int)leadingEdges_.size(); } /// Returns a list of half-edges (one half-edge for each arc) std::list* getEdges(bool skip_boundary_edges = false) const; diff --git a/pcbnew/ratsnest_data.cpp b/pcbnew/ratsnest_data.cpp index 201f6b6041..234326c132 100644 --- a/pcbnew/ratsnest_data.cpp +++ b/pcbnew/ratsnest_data.cpp @@ -40,6 +40,7 @@ #include #include +#include #include #include #include @@ -140,10 +141,18 @@ std::vector* kruskalMST( RN_LINKS::RN_EDGE_LIST& aEdges, cycles[srcTag].splice( cycles[srcTag].end(), cycles[trgTag] ); if( dt->getWeight() == 0 ) // Skip already existing connections (weight == 0) + { mstExpectedSize--; + } else { - mst->push_back( dt ); + // Do a copy of edge, but make it RN_EDGE_MST. In contrary to RN_EDGE, + // RN_EDGE_MST saves both source and target node and does not require any other + // edges to exist for getting source/target nodes + RN_EDGE_MST_PTR newEdge = boost::make_shared( dt->getSourceNode(), + dt->getTargetNode(), + dt->getWeight() ); + mst->push_back( newEdge ); ++mstSize; } } @@ -414,7 +423,7 @@ void RN_NET::AddItem( const ZONE_CONTAINER* aZone ) // Origin and end of bounding box for a polygon VECTOR2I origin( polyPoints[0].x, polyPoints[0].y ); VECTOR2I end( polyPoints[0].x, polyPoints[0].y ); - int idxStart = 0; + unsigned int idxStart = 0; // Extract polygons from zones for( unsigned int i = 0; i < polyPoints.size(); ++i ) @@ -440,10 +449,14 @@ void RN_NET::AddItem( const ZONE_CONTAINER* aZone ) m_links, BOX2I( origin, end - origin ) ) ); idxStart = i + 1; - origin.x = polyPoints[idxStart].x; - origin.y = polyPoints[idxStart].y; - end.x = polyPoints[idxStart].x; - end.y = polyPoints[idxStart].y; + + if( idxStart < polyPoints.size() ) + { + origin.x = polyPoints[idxStart].x; + origin.y = polyPoints[idxStart].y; + end.x = polyPoints[idxStart].x; + end.y = polyPoints[idxStart].y; + } } } @@ -968,25 +981,23 @@ void RN_DATA::Recalculate( int aNet ) { if( aNet < 0 ) // Recompute everything { - unsigned int tid, i, chunk, netCount; + unsigned int i, netCount; netCount = m_board->GetNetCount(); - chunk = 1; #ifdef USE_OPENMP - #pragma omp parallel shared(chunk, netCount) private(i, tid) + #pragma omp parallel shared(netCount) private(i) { - tid = omp_get_thread_num(); - #pragma omp for schedule(guided, chunk) + #pragma omp for schedule(guided, 1) #else /* USE_OPENMP */ { #endif - // Start with net number 1, as 0 stand for not connected + // Start with net number 1, as 0 stands for not connected for( i = 1; i < netCount; ++i ) { if( m_nets[i].IsDirty() ) updateNet( i ); } - } /* end of parallel section */ + } /* end of parallel section */ } else if( aNet > 0 ) // Recompute only specific net { From b8e3ff8ca3d19f317fd9fe790cc30b146c029d0c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 5 Mar 2014 16:44:08 +0100 Subject: [PATCH 145/741] Fixed undo while PNS is active. --- pcbnew/router/pns_router.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index 646d011404..e3cf287596 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -324,6 +324,9 @@ PNS_ROUTER::~PNS_ROUTER() { ClearWorld(); theRouter = NULL; + + if( m_previewItems ) + delete m_previewItems; } @@ -338,13 +341,9 @@ void PNS_ROUTER::ClearWorld() if( m_placer ) delete m_placer; - if( m_previewItems ) - delete m_previewItems; - m_clearanceFunc = NULL; m_world = NULL; m_placer = NULL; - m_previewItems = NULL; } @@ -468,9 +467,10 @@ void PNS_ROUTER::EraseView() } if( m_previewItems ) + { m_previewItems->FreeItems(); - - m_previewItems->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + m_previewItems->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } } From 3cb168be5a943b00b12894f262aace11ba8449fd Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 6 Mar 2014 09:14:06 +0100 Subject: [PATCH 146/741] Removed warnings. --- pcbnew/class_zone.cpp | 4 ---- pcbnew/legacy_plugin.cpp | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/pcbnew/class_zone.cpp b/pcbnew/class_zone.cpp index 627d98ac87..6679fee49a 100644 --- a/pcbnew/class_zone.cpp +++ b/pcbnew/class_zone.cpp @@ -588,10 +588,6 @@ void ZONE_CONTAINER::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) { wxString msg; - BOARD* board = (BOARD*) m_Parent; - - wxASSERT( board ); - msg = _( "Zone Outline" ); // Display Cutout instead of Outline for holes inside a zone diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index 96c7a75a8f..f548c2b997 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -1814,7 +1814,7 @@ void LEGACY_PLUGIN::loadNETINFO_ITEM() { char buf[1024]; - NETINFO_ITEM* net; + NETINFO_ITEM* net = NULL; char* line; while( ( line = READLINE( m_reader ) ) != NULL ) @@ -1835,7 +1835,7 @@ void LEGACY_PLUGIN::loadNETINFO_ITEM() { // net 0 should be already in list, so store this net // if it is not the net 0, or if the net 0 does not exists. - if( net->GetNet() > 0 || m_board->FindNet( 0 ) == NULL ) + if( net != NULL && ( net->GetNet() > 0 || m_board->FindNet( 0 ) == NULL ) ) m_board->AppendNet( net ); else delete net; From f72aec25c02784725765d716daf7ce24f323ef83 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 6 Mar 2014 11:49:08 +0100 Subject: [PATCH 147/741] Auto zone refilling after using the POINT_EDITOR. Minor code cleaning. --- pcbnew/class_zone.h | 13 ------- pcbnew/legacy_plugin.cpp | 2 +- pcbnew/tools/point_editor.cpp | 16 +++++++++ pcbnew/tools/point_editor.h | 3 ++ pcbnew/zone_filling_algorithm.cpp | 58 +++++++++++++++---------------- 5 files changed, 49 insertions(+), 43 deletions(-) diff --git a/pcbnew/class_zone.h b/pcbnew/class_zone.h index 6423d85396..016875e82c 100644 --- a/pcbnew/class_zone.h +++ b/pcbnew/class_zone.h @@ -358,19 +358,6 @@ public: */ bool HitTest( const EDA_RECT& aRect, bool aContained = true, int aAccuracy = 0 ) const; - /** - * Function Fill_Zone - * Calculate the zone filling - * The zone outline is a frontier, and can be complex (with holes) - * The filling starts from starting points like pads, tracks. - * If exists the old filling is removed - * @param frame = reference to the main frame - * @param DC = current Device Context - * @param verbose = true to show error messages - * @return error level (0 = no error) - */ - int Fill_Zone( PCB_EDIT_FRAME* frame, wxDC* DC, bool verbose = true ); - /** * Function FillZoneAreasWithSegments * Fill sub areas in a zone with segments with m_ZoneMinThickness width diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index abed5085e7..d0a6460563 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -2339,7 +2339,7 @@ void LEGACY_PLUGIN::loadZONE_CONTAINER() arcsegcount = 32; zc->SetArcSegmentCount( arcsegcount ); - zc->SetIsFilled( fillstate == 'S' ? true : false ); + zc->SetIsFilled( fillstate == 'S' ); zc->SetThermalReliefGap( thermalReliefGap ); zc->SetThermalReliefCopperBridge( thermalReliefCopperBridge ); } diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp index 59e67ff732..0894fedfd9 100644 --- a/pcbnew/tools/point_editor.cpp +++ b/pcbnew/tools/point_editor.cpp @@ -32,6 +32,7 @@ #include "selection_tool.h" #include "point_editor.h" +#include #include #include @@ -206,6 +207,7 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) if( m_editPoints ) { + finishItem(); item->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); m_toolMgr->GetView()->Remove( m_editPoints.get() ); m_editPoints.reset(); @@ -326,6 +328,20 @@ void POINT_EDITOR::updateItem() const } +void POINT_EDITOR::finishItem() const +{ + EDA_ITEM* item = m_editPoints->GetParent(); + + if( item->Type() == PCB_ZONE_AREA_T ) + { + ZONE_CONTAINER* zone = static_cast( item ); + + if( zone->IsFilled() ) + getEditFrame()->Fill_Zone( zone ); + } +} + + void POINT_EDITOR::updatePoints() const { EDA_ITEM* item = m_editPoints->GetParent(); diff --git a/pcbnew/tools/point_editor.h b/pcbnew/tools/point_editor.h index d43a09dda0..81b55131ba 100644 --- a/pcbnew/tools/point_editor.h +++ b/pcbnew/tools/point_editor.h @@ -69,6 +69,9 @@ private: ///> Updates item's points with edit points. void updateItem() const; + ///> Applies the last changes to the edited item. + void finishItem() const; + ///> Updates edit points with item's points. void updatePoints() const; diff --git a/pcbnew/zone_filling_algorithm.cpp b/pcbnew/zone_filling_algorithm.cpp index 04da8e2fdc..aadcc66c2a 100644 --- a/pcbnew/zone_filling_algorithm.cpp +++ b/pcbnew/zone_filling_algorithm.cpp @@ -54,8 +54,7 @@ * to add holes for pads and tracks and other items not in net. */ -bool ZONE_CONTAINER::BuildFilledSolidAreasPolygons( BOARD* aPcb, - CPOLYGONS_LIST* aCornerBuffer ) +bool ZONE_CONTAINER::BuildFilledSolidAreasPolygons( BOARD* aPcb, CPOLYGONS_LIST* aCornerBuffer ) { if( aCornerBuffer == NULL ) m_FilledPolysList.RemoveAllContours(); @@ -80,9 +79,11 @@ bool ZONE_CONTAINER::BuildFilledSolidAreasPolygons( BOARD* aPcb, case ZONE_SETTINGS::SMOOTHING_CHAMFER: m_smoothedPoly = m_Poly->Chamfer( m_cornerRadius ); break; + case ZONE_SETTINGS::SMOOTHING_FILLET: m_smoothedPoly = m_Poly->Fillet( m_cornerRadius, m_ArcToSegmentsCount ); break; + default: m_smoothedPoly = new CPolyLine; m_smoothedPoly->Copy( m_Poly ); @@ -90,18 +91,16 @@ bool ZONE_CONTAINER::BuildFilledSolidAreasPolygons( BOARD* aPcb, } if( aCornerBuffer ) - ConvertPolysListWithHolesToOnePolygon( m_smoothedPoly->m_CornersList, - *aCornerBuffer ); + ConvertPolysListWithHolesToOnePolygon( m_smoothedPoly->m_CornersList, *aCornerBuffer ); else - ConvertPolysListWithHolesToOnePolygon( m_smoothedPoly->m_CornersList, - m_FilledPolysList ); + ConvertPolysListWithHolesToOnePolygon( m_smoothedPoly->m_CornersList, m_FilledPolysList ); /* For copper layers, we now must add holes in the Polygon list. * holes are pads and tracks with their clearance area * for non copper layers just recalculate the m_FilledPolysList * with m_ZoneMinThickness taken in account */ - if( ! aCornerBuffer ) + if( !aCornerBuffer ) { if( IsOnCopperLayer() ) AddClearanceAreasPolygonsToPolysList( aPcb ); @@ -124,16 +123,19 @@ bool ZONE_CONTAINER::BuildFilledSolidAreasPolygons( BOARD* aPcb, m_FilledPolysList.RemoveAllContours(); CopyPolygonsFromKiPolygonListToFilledPolysList( polyset_zone_solid_areas ); } - if ( m_FillMode ) // if fill mode uses segments, create them: - FillZoneAreasWithSegments( ); + + if( m_FillMode ) // if fill mode uses segments, create them: + FillZoneAreasWithSegments(); } + m_IsFilled = true; + return 1; } // Sort function to build filled zones -static bool SortByXValues( const int& a, const int &b) +static bool SortByXValues( const int& a, const int &b ) { return a < b; } @@ -141,13 +143,11 @@ static bool SortByXValues( const int& a, const int &b) int ZONE_CONTAINER::FillZoneAreasWithSegments() { - int ics, ice; + int ics, ice; int count = 0; std::vector x_coordinates; bool error = false; - - int istart, iend; // index of the starting and the endif corner of one filled area in m_FilledPolysList - + int istart, iend; // index of the starting and the endif corner of one filled area in m_FilledPolysList int margin = m_ZoneMinThickness * 2 / 10; int minwidth = Mils2iu( 2 ); margin = std::max ( minwidth, margin ); @@ -157,28 +157,25 @@ int ZONE_CONTAINER::FillZoneAreasWithSegments() // Read all filled areas in m_FilledPolysList m_FillSegmList.clear(); istart = 0; - int end_list = m_FilledPolysList.GetCornersCount()-1; + int end_list = m_FilledPolysList.GetCornersCount() - 1; for( int ic = 0; ic <= end_list; ic++ ) { CPolyPt* corner = &m_FilledPolysList[ic]; - if ( corner->end_contour || (ic == end_list) ) + if ( corner->end_contour || ( ic == end_list ) ) { iend = ic; EDA_RECT rect = CalculateSubAreaBoundaryBox( istart, iend ); // Calculate the y limits of the zone - int refy = rect.GetY(); - int endy = rect.GetBottom(); - - for( ; refy < endy; refy += step ) + for( int refy = rect.GetY(), endy = rect.GetBottom(); refy < endy; refy += step ) { // find all intersection points of an infinite line with polyline sides x_coordinates.clear(); for( ics = istart, ice = iend; ics <= iend; ice = ics, ics++ ) { - if ( m_FilledPolysList[ice].m_utility ) + if( m_FilledPolysList[ice].m_utility ) continue; int seg_startX = m_FilledPolysList[ics].x; @@ -203,7 +200,7 @@ int ZONE_CONTAINER::FillZoneAreasWithSegments() // the segment start point: seg_endX -= seg_startX; seg_endY -= seg_startY; - double newrefy = (double) (refy - seg_startY); + double newrefy = (double) ( refy - seg_startY ); double intersec_x; if ( seg_endY == 0 ) // horizontal segment on the same line: skip @@ -217,9 +214,9 @@ int ZONE_CONTAINER::FillZoneAreasWithSegments() // intersec_x = refy/slope = refy * inv_slope // Note: because horizontal segments are already tested and skipped, slope // exists (seg_end_y not O) - double inv_slope = (double)seg_endX / seg_endY; + double inv_slope = (double) seg_endX / seg_endY; intersec_x = newrefy * inv_slope; - x_coordinates.push_back((int) intersec_x + seg_startX); + x_coordinates.push_back( (int) intersec_x + seg_startX ); } // A line scan is finished: build list of segments @@ -239,12 +236,12 @@ int ZONE_CONTAINER::FillZoneAreasWithSegments() error = true; } - if ( error ) + if( error ) break; - int iimax = x_coordinates.size()-1; + int iimax = x_coordinates.size() - 1; - for (int ii = 0; ii < iimax; ii +=2 ) + for( int ii = 0; ii < iimax; ii +=2 ) { wxPoint seg_start, seg_end; count++; @@ -257,16 +254,19 @@ int ZONE_CONTAINER::FillZoneAreasWithSegments() } } //End examine segments in one area - if ( error ) + if( error ) break; istart = iend + 1; // istart points the first corner of the next area } // End find one end of outline - if ( error ) + if( error ) break; } // End examine all areas + if( !error ) + m_IsFilled = true; + return count; } From 2889a7a13ac8c053860b1257bfa3b80039f7cb14 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 6 Mar 2014 12:36:20 +0100 Subject: [PATCH 148/741] Undo/redo support for POINT_EDITOR. --- pcbnew/tools/point_editor.cpp | 39 ++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp index 0894fedfd9..cf78c7d89d 100644 --- a/pcbnew/tools/point_editor.cpp +++ b/pcbnew/tools/point_editor.cpp @@ -47,9 +47,9 @@ class EDIT_POINTS_FACTORY public: static boost::shared_ptr Make( EDA_ITEM* aItem ) { - // TODO generate list of points basing on the type boost::shared_ptr points = boost::make_shared( aItem ); + // Generate list of edit points basing on the item type switch( aItem->Type() ) { case PCB_LINE_T: @@ -140,20 +140,22 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); KIGFX::VIEW_CONTROLS* controls = getViewControls(); - m_dragPoint = NULL; if( selection.Size() == 1 ) { - Activate(); - + PCB_EDIT_FRAME* editFrame = getEditFrame(); EDA_ITEM* item = selection.items.GetPickedItem( 0 ); m_editPoints = EDIT_POINTS_FACTORY::Make( item ); m_toolMgr->GetView()->Add( m_editPoints.get() ); + m_dragPoint = NULL; + bool modified = false; + + Activate(); // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { - if( !m_editPoints || evt->IsCancel() || + if( !m_editPoints || evt->Matches( m_selectionTool->ClearedEvent ) || evt->Matches( m_selectionTool->DeselectedEvent ) || evt->Matches( m_selectionTool->SelectedEvent ) ) @@ -186,6 +188,14 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) else if( evt->IsDrag( BUT_LEFT ) && m_dragPoint ) { + if( !modified ) + { + // Save items, so changes can be undone + editFrame->OnModify(); + editFrame->SaveCopyInUndoList( selection.items, UR_CHANGED ); + modified = true; + } + m_dragPoint->SetPosition( controls->GetCursorPosition() ); m_dragPoint->ApplyConstraint(); updateItem(); @@ -199,6 +209,25 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) updatePoints(); } + else if( evt->IsMouseUp( BUT_LEFT ) ) + { + modified = false; + } + + else if( evt->IsCancel() ) + { + if( modified ) // Restore the last change + { + wxCommandEvent dummy; + editFrame->GetBoardFromUndoList( dummy ); + + updatePoints(); + modified = false; + } + + break; + } + else { m_toolMgr->PassEvent(); From 8c43c216bb6b9b1bbd8b7c04a9e180960ad05a39 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 6 Mar 2014 14:41:25 +0100 Subject: [PATCH 149/741] 45 degrees mode for POINT_EDITOR. --- pcbnew/tools/edit_points.cpp | 7 +--- pcbnew/tools/edit_points.h | 79 +++++++++++++++++++++++++++++++---- pcbnew/tools/point_editor.cpp | 42 +++++++++++++++---- 3 files changed, 106 insertions(+), 22 deletions(-) diff --git a/pcbnew/tools/edit_points.cpp b/pcbnew/tools/edit_points.cpp index 5efe90bae0..5e7174e5be 100644 --- a/pcbnew/tools/edit_points.cpp +++ b/pcbnew/tools/edit_points.cpp @@ -35,11 +35,6 @@ EDIT_POINTS::EDIT_POINTS( EDA_ITEM* aParent ) : } -EDIT_POINTS::~EDIT_POINTS() -{ -} - - EDIT_POINT* EDIT_POINTS::FindPoint( const VECTOR2I& aLocation ) { float size = m_view->ToWorld( EDIT_POINT::POINT_SIZE ); @@ -59,7 +54,7 @@ EDIT_POINT* EDIT_POINTS::FindPoint( const VECTOR2I& aLocation ) void EDIT_POINTS::ViewDraw( int aLayer, KIGFX::GAL* aGal ) const { - aGal->SetFillColor( KIGFX::COLOR4D( 1.0, 1.0, 1.0, 1.0 ) ); // TODO dynamic color depending on parent's color + aGal->SetFillColor( KIGFX::COLOR4D( 1.0, 1.0, 1.0, 1.0 ) ); aGal->SetIsFill( true ); aGal->SetIsStroke( false ); aGal->PushDepth(); diff --git a/pcbnew/tools/edit_points.h b/pcbnew/tools/edit_points.h index e9a444286d..c91bede8ec 100644 --- a/pcbnew/tools/edit_points.h +++ b/pcbnew/tools/edit_points.h @@ -80,10 +80,13 @@ public: void SetConstraint( EDIT_POINT_CONSTRAINT* aConstraint ) { + if( m_constraint ) + delete m_constraint; + m_constraint = aConstraint; } - void ClearConstraint( EDIT_POINT_CONSTRAINT* aConstraint ) + void ClearConstraint() { delete m_constraint; m_constraint = NULL; @@ -94,12 +97,22 @@ public: return m_constraint; } + bool IsConstrained() const + { + return m_constraint != NULL; + } + void ApplyConstraint() { if( m_constraint ) m_constraint->Apply(); } + bool operator==( const EDIT_POINT& aOther ) const + { + return m_point == aOther.m_point; + } + ///> Single point size in pixels static const int POINT_SIZE = 10; @@ -113,7 +126,6 @@ class EDIT_POINTS : public EDA_ITEM { public: EDIT_POINTS( EDA_ITEM* aParent ); - ~EDIT_POINTS(); /** * Function FindPoint @@ -134,7 +146,39 @@ public: void Add( const VECTOR2I& aPoint ) { - m_points.push_back( EDIT_POINT( aPoint ) ); + Add( EDIT_POINT( aPoint ) ); + } + + EDIT_POINT* Previous( const EDIT_POINT& aPoint ) + { + for( unsigned int i = 0; i < m_points.size(); ++i ) + { + if( m_points[i] == aPoint ) + { + if( i == 0 ) + return &m_points[m_points.size() - 1]; + else + return &m_points[i - 1]; + } + } + + return NULL; + } + + EDIT_POINT* Next( const EDIT_POINT& aPoint ) + { + for( unsigned int i = 0; i < m_points.size(); ++i ) + { + if( m_points[i] == aPoint ) + { + if( i == m_points.size() - 1 ) + return &m_points[0]; + else + return &m_points[i + 1]; + } + } + + return NULL; } EDIT_POINT& operator[]( unsigned int aIndex ) @@ -182,8 +226,6 @@ public: EDIT_POINT_CONSTRAINT( aConstrained ), m_constrainer( aConstrainer ) {} - virtual ~EPC_VERTICAL() {}; - virtual void Apply() { VECTOR2I point = m_constrained.GetPosition(); @@ -208,8 +250,6 @@ public: EDIT_POINT_CONSTRAINT( aConstrained ), m_constrainer( aConstrainer ) {} - virtual ~EPC_HORIZONTAL() {}; - virtual void Apply() { VECTOR2I point = m_constrained.GetPosition(); @@ -222,6 +262,31 @@ private: }; +class EPC_45DEGREE : public EDIT_POINT_CONSTRAINT +{ +public: + EPC_45DEGREE ( EDIT_POINT& aConstrained, const EDIT_POINT& aConstrainer ) : + EDIT_POINT_CONSTRAINT( aConstrained ), m_constrainer( aConstrainer ) + {} + + virtual void Apply() + { + // Current line vector + VECTOR2I lineVector( m_constrained.GetPosition() - m_constrainer.GetPosition() ); + double angle = lineVector.Angle(); + + // Find the closest angle, which is a multiple of 45 degrees + double newAngle = round( angle / ( M_PI / 4.0 ) ) * M_PI / 4.0; + VECTOR2I newLineVector = lineVector.Rotate( newAngle - angle ); + + m_constrained.SetPosition( m_constrainer.GetPosition() + newLineVector ); + } + +private: + const EDIT_POINT& m_constrainer; +}; + + class EPC_CIRCLE : public EDIT_POINT_CONSTRAINT { public: diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp index cf78c7d89d..e00d72fe1a 100644 --- a/pcbnew/tools/point_editor.cpp +++ b/pcbnew/tools/point_editor.cpp @@ -26,6 +26,7 @@ #include #include +#include #include #include "common_actions.h" @@ -96,6 +97,7 @@ public: } default: + points.reset(); break; } @@ -139,19 +141,27 @@ bool POINT_EDITOR::Init() int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); - KIGFX::VIEW_CONTROLS* controls = getViewControls(); if( selection.Size() == 1 ) { + Activate(); + + KIGFX::VIEW_CONTROLS* controls = getViewControls(); + KIGFX::VIEW* view = getView(); // TODO should be updated on canvas switch? PCB_EDIT_FRAME* editFrame = getEditFrame(); EDA_ITEM* item = selection.items.GetPickedItem( 0 ); + m_editPoints = EDIT_POINTS_FACTORY::Make( item ); - m_toolMgr->GetView()->Add( m_editPoints.get() ); + if( !m_editPoints ) + { + setTransitions(); + return 0; + } + + view->Add( m_editPoints.get() ); m_dragPoint = NULL; bool modified = false; - Activate(); - // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { @@ -196,6 +206,20 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) modified = true; } + if( evt->Modifier( MD_CTRL ) ) // 45 degrees mode + { + if( !m_dragPoint->IsConstrained() ) + { + // Find the previous point to be used as constrainer + EDIT_POINT* constrainer = m_editPoints->Previous( *m_dragPoint ); + m_dragPoint->SetConstraint( new EPC_45DEGREE( *m_dragPoint, *constrainer ) ); + } + } + else + { + m_dragPoint->ClearConstraint(); + } + m_dragPoint->SetPosition( controls->GetCursorPosition() ); m_dragPoint->ApplyConstraint(); updateItem(); @@ -238,14 +262,14 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) { finishItem(); item->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - m_toolMgr->GetView()->Remove( m_editPoints.get() ); + view->Remove( m_editPoints.get() ); m_editPoints.reset(); } - } - controls->ShowCursor( false ); - controls->SetAutoPan( false ); - controls->SetSnapping( false ); + controls->ShowCursor( false ); + controls->SetAutoPan( false ); + controls->SetSnapping( false ); + } setTransitions(); From 88a0311afe530ae3ca1264e2eb09a17560eea3c5 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 6 Mar 2014 17:34:04 +0100 Subject: [PATCH 150/741] Added EDIT_LINEs for dragging zone outlines. --- pcbnew/tools/edit_points.cpp | 18 +++++-- pcbnew/tools/edit_points.h | 95 ++++++++++++++++++++++++++++++----- pcbnew/tools/point_editor.cpp | 63 ++++++++++++++++++----- pcbnew/tools/point_editor.h | 3 ++ 4 files changed, 151 insertions(+), 28 deletions(-) diff --git a/pcbnew/tools/edit_points.cpp b/pcbnew/tools/edit_points.cpp index 5e7174e5be..73550418f1 100644 --- a/pcbnew/tools/edit_points.cpp +++ b/pcbnew/tools/edit_points.cpp @@ -39,10 +39,19 @@ EDIT_POINT* EDIT_POINTS::FindPoint( const VECTOR2I& aLocation ) { float size = m_view->ToWorld( EDIT_POINT::POINT_SIZE ); - std::deque::iterator it, itEnd; - for( it = m_points.begin(), itEnd = m_points.end(); it != itEnd; ++it ) + std::deque::iterator pit, pitEnd; + for( pit = m_points.begin(), pitEnd = m_points.end(); pit != pitEnd; ++pit ) { - EDIT_POINT& point = *it; + EDIT_POINT& point = *pit; + + if( point.WithinPoint( aLocation, size ) ) + return &point; + } + + std::deque::iterator lit, litEnd; + for( lit = m_lines.begin(), litEnd = m_lines.end(); lit != litEnd; ++lit ) + { + EDIT_LINE& point = *lit; if( point.WithinPoint( aLocation, size ) ) return &point; @@ -65,5 +74,8 @@ void EDIT_POINTS::ViewDraw( int aLayer, KIGFX::GAL* aGal ) const BOOST_FOREACH( const EDIT_POINT& point, m_points ) aGal->DrawRectangle( point.GetPosition() - size / 2, point.GetPosition() + size / 2 ); + BOOST_FOREACH( const EDIT_LINE& line, m_lines ) + aGal->DrawRectangle( line.GetPosition() - size / 2, line.GetPosition() + size / 2 ); + aGal->PopDepth(); } diff --git a/pcbnew/tools/edit_points.h b/pcbnew/tools/edit_points.h index c91bede8ec..3e5d8ecc9b 100644 --- a/pcbnew/tools/edit_points.h +++ b/pcbnew/tools/edit_points.h @@ -52,21 +52,21 @@ class EDIT_POINT { public: EDIT_POINT( const VECTOR2I& aPoint ) : - m_point( aPoint ), m_constraint( NULL ) {}; + m_position( aPoint ), m_constraint( NULL ) {}; - ~EDIT_POINT() + virtual ~EDIT_POINT() { delete m_constraint; } - const VECTOR2I& GetPosition() const + virtual VECTOR2I GetPosition() const { - return m_point; + return m_position; } - void SetPosition( const VECTOR2I& aPosition ) + virtual void SetPosition( const VECTOR2I& aPosition ) { - m_point = aPosition; + m_position = aPosition; } bool WithinPoint( const VECTOR2I& aPoint, unsigned int aSize ) const @@ -110,18 +110,56 @@ public: bool operator==( const EDIT_POINT& aOther ) const { - return m_point == aOther.m_point; + return m_position == aOther.m_position; } ///> Single point size in pixels static const int POINT_SIZE = 10; -private: - VECTOR2I m_point; +protected: + VECTOR2I m_position; EDIT_POINT_CONSTRAINT* m_constraint; }; +class EDIT_LINE : public EDIT_POINT +{ +public: + EDIT_LINE( EDIT_POINT& aOrigin, EDIT_POINT& aEnd ) : + EDIT_POINT( aOrigin.GetPosition() + ( aEnd.GetPosition() - aOrigin.GetPosition() ) / 2 ), + m_origin( aOrigin ), m_end( aEnd ) + { + } + + virtual VECTOR2I GetPosition() const + { + return m_origin.GetPosition() + ( m_end.GetPosition() - m_origin.GetPosition() ) / 2; + } + + virtual void SetPosition( const VECTOR2I& aPosition ) + { + VECTOR2I difference = aPosition - GetPosition(); + + m_origin.SetPosition( m_origin.GetPosition() + difference ); + m_end.SetPosition( m_end.GetPosition() + difference ); + } + + bool operator==( const EDIT_POINT& aOther ) const + { + return GetPosition() == aOther.GetPosition(); + } + + bool operator==( const EDIT_LINE& aOther ) const + { + return m_origin == aOther.m_origin && m_end == aOther.m_end; + } + +private: + EDIT_POINT& m_origin; + EDIT_POINT& m_end; +}; + + class EDIT_POINTS : public EDA_ITEM { public: @@ -139,14 +177,24 @@ public: return m_parent; } - void Add( const EDIT_POINT& aPoint ) + void AddPoint( const EDIT_POINT& aPoint ) { m_points.push_back( aPoint ); } - void Add( const VECTOR2I& aPoint ) + void AddPoint( const VECTOR2I& aPoint ) { - Add( EDIT_POINT( aPoint ) ); + AddPoint( EDIT_POINT( aPoint ) ); + } + + void AddLine( const EDIT_LINE& aLine ) + { + m_lines.push_back( aLine ); + } + + void AddLine( EDIT_POINT& aOrigin, EDIT_POINT& aEnd ) + { + m_lines.push_back( EDIT_LINE( aOrigin, aEnd ) ); } EDIT_POINT* Previous( const EDIT_POINT& aPoint ) @@ -162,6 +210,17 @@ public: } } + for( unsigned int i = 0; i < m_lines.size(); ++i ) + { + if( m_lines[i] == aPoint ) + { + if( i == 0 ) + return &m_lines[m_lines.size() - 1]; + else + return &m_lines[i - 1]; + } + } + return NULL; } @@ -178,6 +237,17 @@ public: } } + for( unsigned int i = 0; i < m_lines.size(); ++i ) + { + if( m_lines[i] == aPoint ) + { + if( i == m_lines.size() - 1 ) + return &m_lines[0]; + else + return &m_lines[i + 1]; + } + } + return NULL; } @@ -216,6 +286,7 @@ public: private: EDA_ITEM* m_parent; std::deque m_points; + std::deque m_lines; }; diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp index e00d72fe1a..6a29061669 100644 --- a/pcbnew/tools/point_editor.cpp +++ b/pcbnew/tools/point_editor.cpp @@ -60,15 +60,15 @@ public: switch( segment->GetShape() ) { case S_SEGMENT: - points->Add( segment->GetStart() ); - points->Add( segment->GetEnd() ); + points->AddPoint( segment->GetStart() ); + points->AddPoint( segment->GetEnd() ); break; case S_ARC: - points->Add( segment->GetCenter() ); // points[0] - points->Add( segment->GetArcStart() ); // points[1] - points->Add( segment->GetArcEnd() ); // points[2] + points->AddPoint( segment->GetCenter() ); // points[0] + points->AddPoint( segment->GetArcStart() ); // points[1] + points->AddPoint( segment->GetArcEnd() ); // points[2] // Set constraints // Arc end has to stay at the same radius as the start @@ -76,8 +76,9 @@ public: break; case S_CIRCLE: - points->Add( segment->GetCenter() ); - points->Add( segment->GetEnd() ); + points->AddPoint( segment->GetCenter() ); + points->AddPoint( segment->GetEnd() ); + break; default: // suppress warnings break; @@ -89,9 +90,17 @@ public: case PCB_ZONE_AREA_T: { const CPolyLine* outline = static_cast( aItem )->Outline(); + int cornersCount = outline->GetCornersCount(); - for( int i = 0; i < outline->GetCornersCount(); ++i ) - points->Add( outline->GetPos( i ) ); + for( int i = 0; i < cornersCount; ++i ) + points->AddPoint( outline->GetPos( i ) ); + + // Lines have to be added after creating edit points, so they use EDIT_POINT references + for( int i = 0; i < cornersCount - 1; ++i ) + points->AddLine( (*points)[i], (*points)[i + 1] ); + + // The one missing line + points->AddLine( (*points)[cornersCount - 1], (*points)[0] ); break; } @@ -147,7 +156,7 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) Activate(); KIGFX::VIEW_CONTROLS* controls = getViewControls(); - KIGFX::VIEW* view = getView(); // TODO should be updated on canvas switch? + KIGFX::VIEW* view = getView(); PCB_EDIT_FRAME* editFrame = getEditFrame(); EDA_ITEM* item = selection.items.GetPickedItem( 0 ); @@ -210,9 +219,9 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) { if( !m_dragPoint->IsConstrained() ) { - // Find the previous point to be used as constrainer - EDIT_POINT* constrainer = m_editPoints->Previous( *m_dragPoint ); - m_dragPoint->SetConstraint( new EPC_45DEGREE( *m_dragPoint, *constrainer ) ); + // Find a proper constraining point for 45 degrees mode + EDIT_POINT constrainer = get45DegConstrainer(); + m_dragPoint->SetConstraint( new EPC_45DEGREE( *m_dragPoint, constrainer ) ); } } else @@ -446,3 +455,31 @@ void POINT_EDITOR::updatePoints() const break; } } + + +EDIT_POINT POINT_EDITOR::get45DegConstrainer() const +{ + EDA_ITEM* item = m_editPoints->GetParent(); + + if( item->Type() == PCB_LINE_T ) + { + const DRAWSEGMENT* segment = static_cast( item ); + { + switch( segment->GetShape() ) + { + case S_SEGMENT: + return *( m_editPoints->Next( *m_dragPoint ) ); // select the other end of line + + case S_ARC: + case S_CIRCLE: + return (*m_editPoints)[0]; // center + + default: // suppress warnings + break; + } + } + } + + // In any other case we may align item to the current cursor position. + return EDIT_POINT( getViewControls()->GetCursorPosition() ); +} diff --git a/pcbnew/tools/point_editor.h b/pcbnew/tools/point_editor.h index 81b55131ba..b465966873 100644 --- a/pcbnew/tools/point_editor.h +++ b/pcbnew/tools/point_editor.h @@ -75,6 +75,9 @@ private: ///> Updates edit points with item's points. void updatePoints() const; + ///> Returns a point that should be used as a constrainer for 45 degrees mode. + EDIT_POINT get45DegConstrainer() const; + ///> Sets up handlers for various events. void setTransitions() { From 3927c667cc5fee24912d83e9f5e142648c20b19e Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 7 Mar 2014 10:26:33 +0100 Subject: [PATCH 151/741] Added documentation. Moved some functions from .h to .cpp files. --- pcbnew/tools/edit_points.cpp | 96 ++++++++++ pcbnew/tools/edit_points.h | 334 +++++++++++++++++++++++----------- pcbnew/tools/point_editor.cpp | 3 +- pcbnew/tools/point_editor.h | 1 - 4 files changed, 321 insertions(+), 113 deletions(-) diff --git a/pcbnew/tools/edit_points.cpp b/pcbnew/tools/edit_points.cpp index 73550418f1..39102b470a 100644 --- a/pcbnew/tools/edit_points.cpp +++ b/pcbnew/tools/edit_points.cpp @@ -29,6 +29,17 @@ #include +bool EDIT_POINT::WithinPoint( const VECTOR2I& aPoint, unsigned int aSize ) const +{ + // Corners of the square + VECTOR2I topLeft = GetPosition() - aSize; + VECTOR2I bottomRight = GetPosition() + aSize; + + return ( aPoint.x > topLeft.x && aPoint.y > topLeft.y && + aPoint.x < bottomRight.x && aPoint.y < bottomRight.y ); +} + + EDIT_POINTS::EDIT_POINTS( EDA_ITEM* aParent ) : EDA_ITEM( NOT_USED ), m_parent( aParent ) { @@ -61,6 +72,62 @@ EDIT_POINT* EDIT_POINTS::FindPoint( const VECTOR2I& aLocation ) } +EDIT_POINT* EDIT_POINTS::Previous( const EDIT_POINT& aPoint ) +{ + for( unsigned int i = 0; i < m_points.size(); ++i ) + { + if( m_points[i] == aPoint ) + { + if( i == 0 ) + return &m_points[m_points.size() - 1]; + else + return &m_points[i - 1]; + } + } + + for( unsigned int i = 0; i < m_lines.size(); ++i ) + { + if( m_lines[i] == aPoint ) + { + if( i == 0 ) + return &m_lines[m_lines.size() - 1]; + else + return &m_lines[i - 1]; + } + } + + return NULL; +} + + +EDIT_POINT* EDIT_POINTS::Next( const EDIT_POINT& aPoint ) +{ + for( unsigned int i = 0; i < m_points.size(); ++i ) + { + if( m_points[i] == aPoint ) + { + if( i == m_points.size() - 1 ) + return &m_points[0]; + else + return &m_points[i + 1]; + } + } + + for( unsigned int i = 0; i < m_lines.size(); ++i ) + { + if( m_lines[i] == aPoint ) + { + if( i == m_lines.size() - 1 ) + return &m_lines[0]; + else + return &m_lines[i + 1]; + } + } + + return NULL; +} + + void EDIT_POINTS::ViewDraw( int aLayer, KIGFX::GAL* aGal ) const { aGal->SetFillColor( KIGFX::COLOR4D( 1.0, 1.0, 1.0, 1.0 ) ); @@ -79,3 +146,32 @@ void EDIT_POINTS::ViewDraw( int aLayer, KIGFX::GAL* aGal ) const aGal->PopDepth(); } + + +void EPC_45DEGREE::Apply() +{ + // Current line vector + VECTOR2I lineVector( m_constrained.GetPosition() - m_constrainer.GetPosition() ); + double angle = lineVector.Angle(); + + // Find the closest angle, which is a multiple of 45 degrees + double newAngle = round( angle / ( M_PI / 4.0 ) ) * M_PI / 4.0; + VECTOR2I newLineVector = lineVector.Rotate( newAngle - angle ); + + m_constrained.SetPosition( m_constrainer.GetPosition() + newLineVector ); +} + + +void EPC_CIRCLE::Apply() +{ + VECTOR2I centerToEnd = m_end.GetPosition() - m_center.GetPosition(); + VECTOR2I centerToPoint = m_constrained.GetPosition() - m_center.GetPosition(); + + int radius = centerToEnd.EuclideanNorm(); + double angle = centerToPoint.Angle(); + + VECTOR2I newLine( radius, 0 ); + newLine = newLine.Rotate( angle ); + + m_constrained.SetPosition( m_center.GetPosition() + newLine ); +} diff --git a/pcbnew/tools/edit_points.h b/pcbnew/tools/edit_points.h index 3e5d8ecc9b..5aabb41117 100644 --- a/pcbnew/tools/edit_points.h +++ b/pcbnew/tools/edit_points.h @@ -34,23 +34,50 @@ class EDIT_POINT; +/** + * Class EDIT_POINT_CONSTRAINT + * + * Allows to describe constraints between two points. After the constrained point is changed, + * Apply() has to be called to fix its coordinates according to the implemented constraint. + */ class EDIT_POINT_CONSTRAINT { public: + /** + * Constructor + * + * @param aConstrained is EDIT_POINT to which the constraint is applied. + */ EDIT_POINT_CONSTRAINT( EDIT_POINT& aConstrained ) : m_constrained( aConstrained ) {}; + virtual ~EDIT_POINT_CONSTRAINT() {}; + /** + * Function Apply() + * + * Corrects coordinates of the constrained point. + */ virtual void Apply() = 0; protected: - EDIT_POINT& m_constrained; + EDIT_POINT& m_constrained; ///< Point that is constrained by rules implemented by Apply() }; -// TODO docs +/** + * Class EDIT_POINT + * + * Represents a single point that can be used for modifying items. It is directly related to one + * of points in a graphical item (e.g. vertex of a zone or center of a circle). + */ class EDIT_POINT { public: + /** + * Constructor + * + * @param aPoint stores coordinates for EDIT_POINT. + */ EDIT_POINT( const VECTOR2I& aPoint ) : m_position( aPoint ), m_constraint( NULL ) {}; @@ -59,25 +86,44 @@ public: delete m_constraint; } + /** + * Function GetPosition() + * + * Returns coordinates of an EDIT_POINT. Note that it may be different than coordinates of + * a graphical item that is bound to the EDIT_POINT. + */ virtual VECTOR2I GetPosition() const { return m_position; } + /** + * Function SetPosition() + * + * Sets new coordinates for an EDIT_POINT. It does not change the coordinates of a graphical + * item. + * @param aPosition are new coordinates. + */ virtual void SetPosition( const VECTOR2I& aPosition ) { m_position = aPosition; } - bool WithinPoint( const VECTOR2I& aPoint, unsigned int aSize ) const - { - VECTOR2I topLeft = GetPosition() - aSize; - VECTOR2I bottomRight = GetPosition() + aSize; - - return ( aPoint.x > topLeft.x && aPoint.y > topLeft.y && - aPoint.x < bottomRight.x && aPoint.y < bottomRight.y ); - } + /** + * Function WithinPoint() + * + * Checks if given point is within a square centered in the EDIT_POINT position. + * @param aPoint is point to be checked. + * @param aSize is length of the square side. + */ + bool WithinPoint( const VECTOR2I& aPoint, unsigned int aSize ) const; + /** + * Function SetConstraint() + * + * Sets a constraint for and EDIT_POINT. + * @param aConstraint is the constraint to be set. + */ void SetConstraint( EDIT_POINT_CONSTRAINT* aConstraint ) { if( m_constraint ) @@ -86,22 +132,33 @@ public: m_constraint = aConstraint; } + /** + * Function ClearConstraint() + * + * Removes previously set constraint. + */ void ClearConstraint() { delete m_constraint; m_constraint = NULL; } - EDIT_POINT_CONSTRAINT* GetConstraint() const - { - return m_constraint; - } - + /** + * Function IsConstrained() + * + * Checks if point is constrained. + * @return True is point is constrained, false otherwise. + */ bool IsConstrained() const { return m_constraint != NULL; } + /** + * Function ApplyConstraint() + * + * Corrects coordinates of an EDIT_POINT by applying previously set constraint. + */ void ApplyConstraint() { if( m_constraint ) @@ -117,25 +174,40 @@ public: static const int POINT_SIZE = 10; protected: - VECTOR2I m_position; - EDIT_POINT_CONSTRAINT* m_constraint; + VECTOR2I m_position; ///< Position of EDIT_POINT + EDIT_POINT_CONSTRAINT* m_constraint; ///< Constraint for the point, NULL if none }; +/** + * Class EDIT_LINE + * + * Represents a line connecting two EDIT_POINTs. That allows to move them both by dragging the + * EDIT_POINT in the middle. As it uses references to EDIT_POINTs, all coordinates are + * automatically synchronized. + */ class EDIT_LINE : public EDIT_POINT { public: + /** + * Constructor + * + * @param aOrigin is the origin of EDIT_LINE. + * @param aEnd is the end of EDIT_LINE. + */ EDIT_LINE( EDIT_POINT& aOrigin, EDIT_POINT& aEnd ) : EDIT_POINT( aOrigin.GetPosition() + ( aEnd.GetPosition() - aOrigin.GetPosition() ) / 2 ), m_origin( aOrigin ), m_end( aEnd ) { } + ///> @copydoc EDIT_POINT::GetPosition() virtual VECTOR2I GetPosition() const { return m_origin.GetPosition() + ( m_end.GetPosition() - m_origin.GetPosition() ) / 2; } + ///> @copydoc EDIT_POINT::GetPosition() virtual void SetPosition( const VECTOR2I& aPosition ) { VECTOR2I difference = aPosition - GetPosition(); @@ -155,101 +227,110 @@ public: } private: - EDIT_POINT& m_origin; - EDIT_POINT& m_end; + EDIT_POINT& m_origin; ///< Origin point for a line + EDIT_POINT& m_end; ///< End point for a line }; +/** + * Class EDIT_POINTS + * + * EDIT_POINTS is a VIEW_ITEM that manages EDIT_POINTs and EDIT_LINEs and draws them. + */ class EDIT_POINTS : public EDA_ITEM { public: + /** + * Constructor. + * + * @param aParent is the item to which EDIT_POINTs are related. + */ EDIT_POINTS( EDA_ITEM* aParent ); /** - * Function FindPoint + * Function FindPoint() + * * Returns a point that is at given coordinates or NULL if there is no such point. * @param aLocation is the location for searched point. */ EDIT_POINT* FindPoint( const VECTOR2I& aLocation ); + /** + * Function GetParent() + * + * Returns parent of the EDIT_POINTS. + */ EDA_ITEM* GetParent() const { return m_parent; } + /** + * Function AddPoint() + * + * Adds an EDIT_POINT. + * @param aPoint is the new point. + */ void AddPoint( const EDIT_POINT& aPoint ) { m_points.push_back( aPoint ); } + /** + * Function AddPoint() + * + * Adds an EDIT_POINT. + * @param aPoint are coordinates of the new point. + */ void AddPoint( const VECTOR2I& aPoint ) { AddPoint( EDIT_POINT( aPoint ) ); } + /** + * Function AddLine() + * + * Adds an EDIT_LINE. + * @param aLine is the new line. + */ void AddLine( const EDIT_LINE& aLine ) { m_lines.push_back( aLine ); } + /** + * Function AddLine() + * + * Adds an EDIT_LINE. + * @param aOrigin is the origin for a new line. + * @param aEnd is the end for a new line. + */ void AddLine( EDIT_POINT& aOrigin, EDIT_POINT& aEnd ) { m_lines.push_back( EDIT_LINE( aOrigin, aEnd ) ); } - EDIT_POINT* Previous( const EDIT_POINT& aPoint ) - { - for( unsigned int i = 0; i < m_points.size(); ++i ) - { - if( m_points[i] == aPoint ) - { - if( i == 0 ) - return &m_points[m_points.size() - 1]; - else - return &m_points[i - 1]; - } - } + /** + * Function Previous() + * + * Returns the point that is after the given point in the list. + * @param aPoint is the point that is supposed to be preceding the searched point. + * @return The point following aPoint in the list. If aPoint is the first in + * the list, the last from the list will be returned. If there are no points at all, NULL + * is returned. + */ + EDIT_POINT* Previous( const EDIT_POINT& aPoint ); - for( unsigned int i = 0; i < m_lines.size(); ++i ) - { - if( m_lines[i] == aPoint ) - { - if( i == 0 ) - return &m_lines[m_lines.size() - 1]; - else - return &m_lines[i - 1]; - } - } - - return NULL; - } - - EDIT_POINT* Next( const EDIT_POINT& aPoint ) - { - for( unsigned int i = 0; i < m_points.size(); ++i ) - { - if( m_points[i] == aPoint ) - { - if( i == m_points.size() - 1 ) - return &m_points[0]; - else - return &m_points[i + 1]; - } - } - - for( unsigned int i = 0; i < m_lines.size(); ++i ) - { - if( m_lines[i] == aPoint ) - { - if( i == m_lines.size() - 1 ) - return &m_lines[0]; - else - return &m_lines[i + 1]; - } - } - - return NULL; - } + /** + * Function Next() + * + * Returns the point that is before the given point in the list. + * @param aPoint is the point that is supposed to be following the searched point. + * @return The point preceding aPoint in the list. If aPoint is the last in + * the list, the first point from the list will be returned. If there are no points at all, + * NULL is returned. + */ + EDIT_POINT* Next( const EDIT_POINT& aPoint ); EDIT_POINT& operator[]( unsigned int aIndex ) { @@ -261,18 +342,26 @@ public: return m_points[aIndex]; } + /** + * Function Size() + * + * Returns number of stored points. + */ unsigned int Size() const { return m_points.size(); } + ///> @copydoc VIEW_ITEM::ViewBBox() virtual const BOX2I ViewBBox() const { return m_parent->ViewBBox(); } + ///> @copydoc VIEW_ITEM::ViewDraw() virtual void ViewDraw( int aLayer, KIGFX::GAL* aGal ) const; + ///> @copydoc VIEW_ITEM::ViewGetLayers() virtual void ViewGetLayers( int aLayers[], int& aCount ) const { aCount = 1; @@ -284,19 +373,31 @@ public: } private: - EDA_ITEM* m_parent; - std::deque m_points; - std::deque m_lines; + EDA_ITEM* m_parent; ///< Parent of the EDIT_POINTs + std::deque m_points; ///< EDIT_POINTs for modifying m_parent + std::deque m_lines; ///< EDIT_LINEs for modifying m_parent }; +/** + * Class EPC_VERTICAL. + * + * EDIT_POINT_CONSTRAINT that imposes a constraint that two points have to have the same X coordinate. + */ class EPC_VERTICAL : public EDIT_POINT_CONSTRAINT { public: - EPC_VERTICAL( EDIT_POINT& aConstrained, EDIT_POINT& aConstrainer ) : + /** + * Constructor. + * + * @param aConstrained is the point that is put under constrain. + * @param aConstrainer is the point that is the source of the constrain. + */ + EPC_VERTICAL( EDIT_POINT& aConstrained, const EDIT_POINT& aConstrainer ) : EDIT_POINT_CONSTRAINT( aConstrained ), m_constrainer( aConstrainer ) {} + ///> @copydoc EDIT_POINT_CONSTRAINT::Apply() virtual void Apply() { VECTOR2I point = m_constrained.GetPosition(); @@ -304,23 +405,30 @@ public: m_constrained.SetPosition( point ); } - virtual std::list GetConstrainers() const - { - return std::list( 1, &m_constrainer ); - } - private: - EDIT_POINT& m_constrainer; + const EDIT_POINT& m_constrainer; ///< Point that imposes the constraint. }; +/** + * Class EPC_HORIZONTAL. + * + * EDIT_POINT_CONSTRAINT that imposes a constraint that two points have to have the same Y coordinate. + */ class EPC_HORIZONTAL : public EDIT_POINT_CONSTRAINT { public: + /** + * Constructor. + * + * @param aConstrained is the point that is put under constrain. + * @param aConstrainer is the point that is the source of the constrain. + */ EPC_HORIZONTAL( EDIT_POINT& aConstrained, const EDIT_POINT& aConstrainer ) : EDIT_POINT_CONSTRAINT( aConstrained ), m_constrainer( aConstrainer ) {} + ///> @copydoc EDIT_POINT_CONSTRAINT::Apply() virtual void Apply() { VECTOR2I point = m_constrained.GetPosition(); @@ -329,60 +437,64 @@ public: } private: - const EDIT_POINT& m_constrainer; + const EDIT_POINT& m_constrainer; ///< Point that imposes the constraint. }; +/** + * Class EPC_45DEGREE + * + * EDIT_POINT_CONSTRAINT that imposes a constraint that two to be located at angle of 45 degree + * multiplicity. + */ class EPC_45DEGREE : public EDIT_POINT_CONSTRAINT { public: + /** + * Constructor. + * + * @param aConstrained is the point that is put under constrain. + * @param aConstrainer is the point that is the source of the constrain. + */ EPC_45DEGREE ( EDIT_POINT& aConstrained, const EDIT_POINT& aConstrainer ) : EDIT_POINT_CONSTRAINT( aConstrained ), m_constrainer( aConstrainer ) {} - virtual void Apply() - { - // Current line vector - VECTOR2I lineVector( m_constrained.GetPosition() - m_constrainer.GetPosition() ); - double angle = lineVector.Angle(); - - // Find the closest angle, which is a multiple of 45 degrees - double newAngle = round( angle / ( M_PI / 4.0 ) ) * M_PI / 4.0; - VECTOR2I newLineVector = lineVector.Rotate( newAngle - angle ); - - m_constrained.SetPosition( m_constrainer.GetPosition() + newLineVector ); - } + ///> @copydoc EDIT_POINT_CONSTRAINT::Apply() + virtual void Apply(); private: - const EDIT_POINT& m_constrainer; + const EDIT_POINT& m_constrainer; ///< Point that imposes the constraint. }; +/** + * Class EPC_CIRCLE. + * + * EDIT_POINT_CONSTRAINT that imposes a constraint that a point has to lie on a circle. + */ class EPC_CIRCLE : public EDIT_POINT_CONSTRAINT { public: + /** + * Constructor. + * + * @param aConstrained is the point that is put under constrain. + * @parama aCenter is the point that is the center of the circle. + * @parama aEnd is the point that decides on the radius of the circle. + */ EPC_CIRCLE( EDIT_POINT& aConstrained, const EDIT_POINT& aCenter, const EDIT_POINT& aEnd ) : EDIT_POINT_CONSTRAINT( aConstrained ), m_center( aCenter ), m_end( aEnd ) {} - virtual ~EPC_CIRCLE() {}; - - virtual void Apply() - { - VECTOR2I centerToEnd = m_end.GetPosition() - m_center.GetPosition(); - VECTOR2I centerToPoint = m_constrained.GetPosition() - m_center.GetPosition(); - - int radius = centerToEnd.EuclideanNorm(); - double angle = centerToPoint.Angle(); - - VECTOR2I newLine( radius, 0 ); - newLine = newLine.Rotate( angle ); - - m_constrained.SetPosition( m_center.GetPosition() + newLine ); - } + ///> @copydoc EDIT_POINT_CONSTRAINT::Apply() + virtual void Apply(); private: + ///> Point that imposes the constraint (center of the circle). const EDIT_POINT& m_center; + + ///> Point that imposes the constraint (decides on the radius of the circle). const EDIT_POINT& m_end; }; diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp index 6a29061669..2e87717411 100644 --- a/pcbnew/tools/point_editor.cpp +++ b/pcbnew/tools/point_editor.cpp @@ -159,6 +159,7 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) KIGFX::VIEW* view = getView(); PCB_EDIT_FRAME* editFrame = getEditFrame(); EDA_ITEM* item = selection.items.GetPickedItem( 0 ); + EDIT_POINT constrainer( VECTOR2I( 0, 0 ) ); m_editPoints = EDIT_POINTS_FACTORY::Make( item ); if( !m_editPoints ) @@ -220,7 +221,7 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) if( !m_dragPoint->IsConstrained() ) { // Find a proper constraining point for 45 degrees mode - EDIT_POINT constrainer = get45DegConstrainer(); + constrainer = get45DegConstrainer(); m_dragPoint->SetConstraint( new EPC_45DEGREE( *m_dragPoint, constrainer ) ); } } diff --git a/pcbnew/tools/point_editor.h b/pcbnew/tools/point_editor.h index b465966873..f0a9405e01 100644 --- a/pcbnew/tools/point_editor.h +++ b/pcbnew/tools/point_editor.h @@ -37,7 +37,6 @@ class SELECTION_TOOL; * * Tool that displays edit points allowing to modify items by dragging the points. */ - class POINT_EDITOR : public TOOL_INTERACTIVE { public: From c89d52ee1a00ed92bd989eb1fe8f30d349689bf2 Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Fri, 7 Mar 2014 17:34:54 -0500 Subject: [PATCH 152/741] Pcbnew: make block rotate honor the rotation angle setting. (fixes lp:1281605) * Make block rotate command honor the rotation angle setting. Thank you Umesh Mohan for the patch. * Change block rotate undo command from UR_ROTATE to UR_CHANGED so consecutive rotations do not lead to round errors and for proper undo in case the user changes the rotation angle setting between block rotations. --- pcbnew/block.cpp | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/pcbnew/block.cpp b/pcbnew/block.cpp index bb86e61cfa..d9286c05dc 100644 --- a/pcbnew/block.cpp +++ b/pcbnew/block.cpp @@ -656,8 +656,8 @@ void PCB_EDIT_FRAME::Block_Delete() void PCB_EDIT_FRAME::Block_Rotate() { wxPoint oldpos; - wxPoint centre; // rotation cent-re for the rotation transform - int rotAngle = 900; // rotation angle in 0.1 deg. + wxPoint centre; // rotation cent-re for the rotation transform + int rotAngle = m_rotationAngle; // rotation angle in 0.1 deg. oldpos = GetCrossHairPosition(); centre = GetScreen()->m_BlockLocate.Centre(); @@ -665,14 +665,13 @@ void PCB_EDIT_FRAME::Block_Rotate() OnModify(); PICKED_ITEMS_LIST* itemsList = &GetScreen()->m_BlockLocate.GetItems(); - itemsList->m_Status = UR_ROTATED; + itemsList->m_Status = UR_CHANGED; for( unsigned ii = 0; ii < itemsList->GetCount(); ii++ ) { BOARD_ITEM* item = (BOARD_ITEM*) itemsList->GetPickedItem( ii ); wxASSERT( item ); - itemsList->SetPickedItemStatus( UR_ROTATED, ii ); - item->Rotate( centre, rotAngle ); + itemsList->SetPickedItemStatus( UR_CHANGED, ii ); switch( item->Type() ) { @@ -706,7 +705,16 @@ void PCB_EDIT_FRAME::Block_Rotate() } } - SaveCopyInUndoList( *itemsList, UR_ROTATED, centre ); + // Save all the block items in there current state before applying the rotation. + SaveCopyInUndoList( *itemsList, UR_CHANGED, centre ); + + // Now perform the rotation. + for( unsigned ii = 0; ii < itemsList->GetCount(); ii++ ) + { + BOARD_ITEM* item = (BOARD_ITEM*) itemsList->GetPickedItem( ii ); + wxASSERT( item ); + item->Rotate( centre, rotAngle ); + } Compile_Ratsnest( NULL, true ); m_canvas->Refresh( true ); From 63401f3d953e675fa9cd0f2e935ee353a10de364 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 8 Mar 2014 20:04:23 +0100 Subject: [PATCH 153/741] Rework on 3D viewer (work in progress): Disable or enable layers, grid or 3D footprint shapes should be now faster. --- 3d-viewer/3d_canvas.cpp | 27 +- 3d-viewer/3d_canvas.h | 64 +++- 3d-viewer/3d_draw.cpp | 349 ++++++++++++++++++---- 3d-viewer/3d_frame.cpp | 58 ++-- 3d-viewer/3d_toolbar.cpp | 21 +- 3d-viewer/3d_viewer.h | 6 +- 3d-viewer/info3d_visu.h | 1 - include/layers_id_colors_and_visibility.h | 31 +- pcbnew/dialogs/dialog_layers_setup.cpp | 10 +- pcbnew/dialogs/dialog_plot.cpp | 2 +- 10 files changed, 456 insertions(+), 113 deletions(-) diff --git a/3d-viewer/3d_canvas.cpp b/3d-viewer/3d_canvas.cpp index 1764d6faa0..db1ace2851 100644 --- a/3d-viewer/3d_canvas.cpp +++ b/3d-viewer/3d_canvas.cpp @@ -78,7 +78,11 @@ EDA_3D_CANVAS::EDA_3D_CANVAS( EDA_3D_FRAME* parent, int* attribList ) : wxFULL_REPAINT_ON_RESIZE ) { m_init = false; - m_gllist = 0; + + // Clear all gl list identifiers: + for( int ii = GL_ID_BEGIN; ii < GL_ID_END; ii++ ) + m_glLists[ii] = 0; + // Explicitly create a new rendering context instance for this canvas. m_glRC = new wxGLContext( this ); @@ -94,12 +98,25 @@ EDA_3D_CANVAS::~EDA_3D_CANVAS() } -void EDA_3D_CANVAS::ClearLists() +void EDA_3D_CANVAS::ClearLists( GLuint aGlList ) { - if( m_gllist > 0 ) - glDeleteLists( m_gllist, 1 ); + if( aGlList ) + { + if( m_glLists[aGlList] > 0 ) + glDeleteLists( m_glLists[aGlList], 1 ); - m_gllist = 0; + m_glLists[aGlList] = 0; + + return; + } + + for( int ii = GL_ID_BEGIN; ii < GL_ID_END; ii++ ) + { + if( m_glLists[ii] > 0 ) + glDeleteLists( m_glLists[ii], 1 ); + + m_glLists[ii] = 0; + } } diff --git a/3d-viewer/3d_canvas.h b/3d-viewer/3d_canvas.h index cb931c991f..fa84fec602 100644 --- a/3d-viewer/3d_canvas.h +++ b/3d-viewer/3d_canvas.h @@ -50,14 +50,29 @@ class S3D_VERTEX; class SEGVIA; class D_PAD; +// We are using GL lists to store layers and other items +// to draw or not +// GL_LIST_ID are the GL lists indexes in m_glLists +enum GL_LIST_ID +{ + GL_ID_BEGIN = 0, + GL_ID_AXIS = GL_ID_BEGIN, // list id for 3D axis + GL_ID_GRID, // list id for 3D grid + GL_ID_BOARD, // List id for copper layers + GL_ID_TECH_LAYERS, // List id for non copper layers (masks...) + GL_ID_AUX_LAYERS, // List id for user layers (draw, eco, comment) + GL_ID_3DSHAPES_SOLID, // List id for 3D shapes, non transparent entities + GL_ID_3DSHAPES_TRANSP, // List id for 3D shapes, transparent entities + GL_ID_END +}; class EDA_3D_CANVAS : public wxGLCanvas { private: bool m_init; - GLuint m_gllist; + GLuint m_glLists[GL_ID_END]; // GL lists wxGLContext* m_glRC; - wxRealPoint m_draw3dOffset; // offset to draw the 3 mesh. + wxRealPoint m_draw3dOffset; // offset to draw the 3D mesh. double m_ZBottom; // position of the back layer double m_ZTop; // position of the front layer @@ -67,7 +82,15 @@ public: EDA_3D_FRAME* Parent() { return (EDA_3D_FRAME*)GetParent(); } - void ClearLists(); + BOARD* GetBoard() { return Parent()->GetBoard(); } + + /** + * Function ClearLists + * Clear the display list. + * @param aGlList = the list to clear. + * if 0 (default) all lists are cleared + */ + void ClearLists( GLuint aGlList = 0 ); // Event functions: void OnPaint( wxPaintEvent& event ); @@ -92,7 +115,7 @@ public: * Prepares the parameters of the OpenGL draw list * creates the OpenGL draw list items (board, grid ... */ - GLuint CreateDrawGL_List(); + void CreateDrawGL_List(); void InitGL(); void SetLights(); void SetOffset(double aPosX, double aPosY) @@ -104,11 +127,40 @@ public: /** * Function BuildBoard3DView * Called by CreateDrawGL_List() - * Fills the OpenGL draw list with board items draw list. + * Populates the OpenGL GL_ID_BOARD draw list with board items only on copper layers. + * 3D footprint shapes, tech layers and aux layers are not on this list */ void BuildBoard3DView(); - void DrawGrid( double aGriSizeMM ); + /** + * Function BuildTechLayers3DView + * Called by CreateDrawGL_List() + * Populates the OpenGL GL_ID_BOARD draw list with items on tech layers + */ + void BuildTechLayers3DView(); + + /** + * Function BuildFootprintShape3DList + * Called by CreateDrawGL_List() + * Fills the OpenGL GL_ID_3DSHAPES_SOLID and GL_ID_3DSHAPES_TRANSP + * draw lists with 3D footprint shapes + * @param aOpaqueList is the gl list for non transparent items + * @param aTransparentList is the gl list for non transparent items, + * which need to be drawn after all other items + */ + void BuildFootprintShape3DList( GLuint aOpaqueList, + GLuint aTransparentList); + /** + * Function BuildBoard3DAuxLayers + * Called by CreateDrawGL_List() + * Fills the OpenGL GL_ID_AUX_LAYERS draw list + * with items on aux layers only + */ + void BuildBoard3DAuxLayers(); + + void Draw3DGrid( double aGriSizeMM ); + void Draw3DAxis(); + void Draw3DViaHole( SEGVIA * aVia ); void Draw3DPadHole( D_PAD * aPad ); diff --git a/3d-viewer/3d_draw.cpp b/3d-viewer/3d_draw.cpp index 909d15a4aa..991916294b 100644 --- a/3d-viewer/3d_draw.cpp +++ b/3d-viewer/3d_draw.cpp @@ -133,11 +133,45 @@ void EDA_3D_CANVAS::Redraw() glRotatef( g_Parm_3D_Visu.m_Rot[1], 0.0, 1.0, 0.0 ); glRotatef( g_Parm_3D_Visu.m_Rot[2], 0.0, 0.0, 1.0 ); - if( m_gllist ) - glCallList( m_gllist ); - else + if( ! m_glLists[GL_ID_BOARD] || ! m_glLists[GL_ID_TECH_LAYERS] ) CreateDrawGL_List(); + if( g_Parm_3D_Visu.GetFlag( FL_AXIS ) && m_glLists[GL_ID_AXIS] ) + glCallList( m_glLists[GL_ID_AXIS] ); + + // move the board in order to draw it with its center at 0,0 3D coordinates + glTranslatef( -g_Parm_3D_Visu.m_BoardPos.x * g_Parm_3D_Visu.m_BiuTo3Dunits, + -g_Parm_3D_Visu.m_BoardPos.y * g_Parm_3D_Visu.m_BiuTo3Dunits, + 0.0F ); + + + glCallList( m_glLists[GL_ID_BOARD] ); + glCallList( m_glLists[GL_ID_TECH_LAYERS] ); + + if( g_Parm_3D_Visu.GetFlag( FL_COMMENTS ) || g_Parm_3D_Visu.GetFlag( FL_COMMENTS ) ) + { + if( ! m_glLists[GL_ID_AUX_LAYERS] ) + CreateDrawGL_List(); + + glCallList( m_glLists[GL_ID_AUX_LAYERS] ); + } + + if( g_Parm_3D_Visu.GetFlag( FL_GRID ) && m_glLists[GL_ID_GRID] ) + glCallList( m_glLists[GL_ID_GRID] ); + + if( g_Parm_3D_Visu.GetFlag( FL_MODULE ) ) + { + if( ! m_glLists[GL_ID_3DSHAPES_SOLID] ) + CreateDrawGL_List(); + + glCallList( m_glLists[GL_ID_3DSHAPES_SOLID] ); + + // This list must be drawn last, because it contains the + // transparent gl objects, which should be drawn after all + // non tyransparent objects + glCallList( m_glLists[GL_ID_3DSHAPES_TRANSP] ); + } + SwapBuffers(); } @@ -198,8 +232,7 @@ static inline void SetGLTechLayersColor( LAYER_NUM aLayer ) void EDA_3D_CANVAS::BuildBoard3DView() { - PCB_BASE_FRAME* pcbframe = Parent()->Parent(); - BOARD* pcb = pcbframe->GetBoard(); + BOARD* pcb = GetBoard(); bool realistic_mode = g_Parm_3D_Visu.IsRealisticMode(); // Number of segments to draw a circle using segments @@ -456,14 +489,74 @@ void EDA_3D_CANVAS::BuildBoard3DView() Draw3D_SolidHorizontalPolyPolygons( bufferPcbOutlines, zpos + board_thickness/2, board_thickness, g_Parm_3D_Visu.m_BiuTo3Dunits ); } +} + + +void EDA_3D_CANVAS::BuildTechLayers3DView() +{ + BOARD* pcb = GetBoard(); + + // Number of segments to draw a circle using segments + const int segcountforcircle = 16; + double correctionFactor = 1.0 / cos( M_PI / (segcountforcircle * 2) ); + const int segcountLowQuality = 12; // segments to draw a circle with low quality + // to reduce time calculations + // for holes and items which do not need + // a fine representation + + CPOLYGONS_LIST bufferPolys; + bufferPolys.reserve( 200000 ); // Reserve for large board (tracks mainly) + + CPOLYGONS_LIST allLayerHoles; // Contains through holes, calculated only once + allLayerHoles.reserve( 20000 ); + + CPOLYGONS_LIST bufferPcbOutlines; // stores the board main outlines + // Build a polygon from edge cut items + wxString msg; + if( ! pcb->GetBoardPolygonOutlines( bufferPcbOutlines, + allLayerHoles, &msg ) ) + { + msg << wxT("\n\n") << + _("Unable to calculate the board outlines.\n" + "Therefore use the board boundary box."); + wxMessageBox( msg ); + } + + CPOLYGONS_LIST bufferZonesPolys; + bufferZonesPolys.reserve( 500000 ); // Reserve for large board ( copper zones mainly ) + + CPOLYGONS_LIST currLayerHoles; // Contains holes for the current layer + + int thickness = g_Parm_3D_Visu.GetCopperThicknessBIU(); + for( TRACK* track = pcb->m_Track; track != NULL; track = track->Next() ) + { + // Add via hole + if( track->Type() == PCB_VIA_T ) + { + int shape = track->GetShape(); + int holediameter = track->GetDrillValue(); + int hole_outer_radius = (holediameter + thickness) / 2; + + if( shape == VIA_THROUGH ) + TransformCircleToPolygon( allLayerHoles, + track->GetStart(), hole_outer_radius, + segcountLowQuality ); + } + } + + + // draw graphic items, on technical layers - // draw graphic items, not on copper layers KI_POLYGON_SET brdpolysetHoles; allLayerHoles.ExportTo( brdpolysetHoles ); for( LAYER_NUM layer = FIRST_NON_COPPER_LAYER; layer <= LAST_NON_COPPER_LAYER; layer++ ) { + // Skip user layers, which are not drawn here + if( IsUserLayer( layer) ) + continue; + if( !Is3DLayerEnabled( layer ) ) continue; @@ -481,9 +574,7 @@ void EDA_3D_CANVAS::BuildBoard3DView() { case PCB_LINE_T: ( (DRAWSEGMENT*) item )->TransformShapeWithClearanceToPolygon( - bufferPolys, 0, - segcountforcircle, - correctionFactor ); + bufferPolys, 0, segcountforcircle, correctionFactor ); break; case PCB_TEXT_T: @@ -556,10 +647,8 @@ void EDA_3D_CANVAS::BuildBoard3DView() currLayerPolyset += polyset; } - SetGLTechLayersColor( layer ); int thickness = g_Parm_3D_Visu.GetLayerObjectThicknessBIU( layer ); int zpos = g_Parm_3D_Visu.GetLayerZcoordBIU( layer ); - glNormal3f( 0.0, 0.0, Get3DLayer_Z_Orientation( layer ) ); if( layer == EDGE_N ) { @@ -582,38 +671,210 @@ void EDA_3D_CANVAS::BuildBoard3DView() bufferPolys.RemoveAllContours(); bufferPolys.ImportFrom( currLayerPolyset ); + + SetGLTechLayersColor( layer ); + glNormal3f( 0.0, 0.0, Get3DLayer_Z_Orientation( layer ) ); Draw3D_SolidHorizontalPolyPolygons( bufferPolys, zpos, thickness, g_Parm_3D_Visu.m_BiuTo3Dunits ); } +} - // draw modules 3D shapes - if( g_Parm_3D_Visu.GetFlag( FL_MODULE ) ) +/** + * Function BuildBoard3DAuxLayers + * Called by CreateDrawGL_List() + * Fills the OpenGL GL_ID_BOARD draw list with items + * on aux layers only + */ +void EDA_3D_CANVAS::BuildBoard3DAuxLayers() +{ + const int segcountforcircle = 16; + double correctionFactor = 1.0 / cos( M_PI / (segcountforcircle * 2) ); + BOARD* pcb = GetBoard(); + CPOLYGONS_LIST bufferPolys; + bufferPolys.reserve( 5000 ); // Reserve for items not on board + + for( LAYER_NUM layer = FIRST_USER_LAYER; layer <= LAST_USER_LAYER; + layer++ ) { - for( MODULE* module = pcb->m_Modules; module; module = module->Next() ) - module->ReadAndInsert3DComponentShape( this ); + if( !Is3DLayerEnabled( layer ) ) + continue; + + bufferPolys.RemoveAllContours(); + + for( BOARD_ITEM* item = pcb->m_Drawings; item; item = item->Next() ) + { + if( !item->IsOnLayer( layer ) ) + continue; + + switch( item->Type() ) + { + case PCB_LINE_T: + ( (DRAWSEGMENT*) item )->TransformShapeWithClearanceToPolygon( + bufferPolys, 0, segcountforcircle, correctionFactor ); + break; + + case PCB_TEXT_T: + ( (TEXTE_PCB*) item )->TransformShapeWithClearanceToPolygonSet( + bufferPolys, 0, segcountforcircle, correctionFactor ); + break; + + default: + break; + } + } + + for( MODULE* module = pcb->m_Modules; module != NULL; module = module->Next() ) + { + module->TransformPadsShapesWithClearanceToPolygon( layer, + bufferPolys, + 0, + segcountforcircle, + correctionFactor ); + + module->TransformGraphicShapesWithClearanceToPolygonSet( layer, + bufferPolys, + 0, + segcountforcircle, + correctionFactor ); + } + + // bufferPolys contains polygons to merge. Many overlaps . + // Calculate merged polygons and remove pads and vias holes + if( bufferPolys.GetCornersCount() == 0 ) + continue; + KI_POLYGON_SET currLayerPolyset; + KI_POLYGON_SET polyset; + bufferPolys.ExportTo( polyset ); + currLayerPolyset += polyset; + + int thickness = g_Parm_3D_Visu.GetLayerObjectThicknessBIU( layer ); + int zpos = g_Parm_3D_Visu.GetLayerZcoordBIU( layer ); + // for Draw3D_SolidHorizontalPolyPolygons, + // zpos it the middle between bottom and top sides. + // However for top layers, zpos should be the bottom layer pos, + // and for bottom layers, zpos should be the top layer pos. + if( Get3DLayer_Z_Orientation( layer ) > 0 ) + zpos += thickness/2; + else + zpos -= thickness/2 ; + + bufferPolys.RemoveAllContours(); + bufferPolys.ImportFrom( currLayerPolyset ); + + SetGLTechLayersColor( layer ); + glNormal3f( 0.0, 0.0, Get3DLayer_Z_Orientation( layer ) ); + Draw3D_SolidHorizontalPolyPolygons( bufferPolys, zpos, + thickness, g_Parm_3D_Visu.m_BiuTo3Dunits ); } } - -GLuint EDA_3D_CANVAS::CreateDrawGL_List() +void EDA_3D_CANVAS::CreateDrawGL_List() { - PCB_BASE_FRAME* pcbframe = Parent()->Parent(); - BOARD* pcb = pcbframe->GetBoard(); + BOARD* pcb = GetBoard(); wxBusyCursor dummy; - m_gllist = glGenLists( 1 ); - // Build 3D board parameters: g_Parm_3D_Visu.InitSettings( pcb ); - glNewList( m_gllist, GL_COMPILE_AND_EXECUTE ); - glColorMaterial( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE ); - // draw axis - if( g_Parm_3D_Visu.GetFlag( FL_AXIS ) ) + // Create axis gl list (if it is not shown, the list will be not called + Draw3DAxis(); + + // Create grid gl list + if( ! m_glLists[GL_ID_GRID] ) { + m_glLists[GL_ID_GRID] = glGenLists( 1 ); + glNewList( m_glLists[GL_ID_GRID], GL_COMPILE ); + + Draw3DGrid( g_Parm_3D_Visu.m_3D_Grid ); + glEndList(); + } + + // Create Board full gl lists: + +// For testing purpose only, display calculation time to generate 3D data +// #define PRINT_CALCULATION_TIME + +#ifdef PRINT_CALCULATION_TIME + unsigned strtime = GetRunningMicroSecs(); +#endif + + if( ! m_glLists[GL_ID_BOARD] ) + { + m_glLists[GL_ID_BOARD] = glGenLists( 1 ); + glNewList( m_glLists[GL_ID_BOARD], GL_COMPILE ); + BuildBoard3DView(); + glEndList(); + } + + if( ! m_glLists[GL_ID_TECH_LAYERS] ) + { + m_glLists[GL_ID_TECH_LAYERS] = glGenLists( 1 ); + glNewList( m_glLists[GL_ID_TECH_LAYERS], GL_COMPILE ); + BuildTechLayers3DView(); + glEndList(); + } + + if( ! m_glLists[GL_ID_AUX_LAYERS] ) + { + m_glLists[GL_ID_AUX_LAYERS] = glGenLists( 1 ); + glNewList( m_glLists[GL_ID_AUX_LAYERS], GL_COMPILE ); + BuildBoard3DAuxLayers(); + glEndList(); + } + + + // draw modules 3D shapes + if( ! m_glLists[GL_ID_3DSHAPES_SOLID] && g_Parm_3D_Visu.GetFlag( FL_MODULE ) ) + { + m_glLists[GL_ID_3DSHAPES_SOLID] = glGenLists( 1 ); + + // GL_ID_3DSHAPES_TRANSP is an auxiliary list for 3D shapes; + // Ensure it is cleared before rebuilding it + if( m_glLists[GL_ID_3DSHAPES_TRANSP] ) + glDeleteLists( m_glLists[GL_ID_3DSHAPES_TRANSP], 1 ); + + m_glLists[GL_ID_3DSHAPES_TRANSP] = glGenLists( 1 ); + BuildFootprintShape3DList( m_glLists[GL_ID_3DSHAPES_SOLID], + m_glLists[GL_ID_3DSHAPES_TRANSP] ); + } + + // Test for errors + CheckGLError(); + +#ifdef PRINT_CALCULATION_TIME + unsigned endtime = GetRunningMicroSecs(); + wxString msg; + msg.Printf( "Built data %.1f ms", (double) (endtime - strtime) / 1000 ); + Parent()->SetStatusText( msg, 0 ); +#endif +} + +void EDA_3D_CANVAS::BuildFootprintShape3DList( GLuint aOpaqueList, + GLuint aTransparentList) +{ + // aOpaqueList is the gl list for non transparent items + // aTransparentList is the gl list for non transparent items, + // which need to be drawn after all other items + + BOARD* pcb = GetBoard(); + glNewList( m_glLists[GL_ID_3DSHAPES_SOLID], GL_COMPILE ); + + for( MODULE* module = pcb->m_Modules; module; module = module->Next() ) + module->ReadAndInsert3DComponentShape( this ); + + glEndList(); +} + +void EDA_3D_CANVAS::Draw3DAxis() +{ + if( ! m_glLists[GL_ID_AXIS] ) + { + m_glLists[GL_ID_AXIS] = glGenLists( 1 ); + glNewList( m_glLists[GL_ID_AXIS], GL_COMPILE ); + glEnable( GL_COLOR_MATERIAL ); SetGLColor( WHITE ); glBegin( GL_LINES ); @@ -626,46 +887,14 @@ GLuint EDA_3D_CANVAS::CreateDrawGL_List() glVertex3f( 0.0f, 0.0f, 0.0f ); glVertex3f( 0.0f, 0.0f, 0.3f ); // Z axis glEnd(); + + glEndList(); } - - // move the board in order to draw it with its center at 0,0 3D coordinates - glTranslatef( -g_Parm_3D_Visu.m_BoardPos.x * g_Parm_3D_Visu.m_BiuTo3Dunits, - -g_Parm_3D_Visu.m_BoardPos.y * g_Parm_3D_Visu.m_BiuTo3Dunits, - 0.0F ); - - // Draw Board: -// For testing purpose only, display calculation time to generate 3D data -// #define PRINT_CALCULATION_TIME - -#ifdef PRINT_CALCULATION_TIME - unsigned strtime = GetRunningMicroSecs(); -#endif - - BuildBoard3DView(); - - // Draw grid - if( g_Parm_3D_Visu.GetFlag( FL_GRID ) ) - DrawGrid( g_Parm_3D_Visu.m_3D_Grid ); - - glEndList(); - - // Test for errors - CheckGLError(); - -#ifdef PRINT_CALCULATION_TIME - unsigned endtime = GetRunningMicroSecs(); - wxString msg; - msg.Printf( "Built data %.1f ms", (double) (endtime - strtime) / 1000 ); - Parent()->SetStatusText( msg, 0 ); -#endif - - return m_gllist; } - // draw a 3D grid: an horizontal grid (XY plane and Z = 0, // and a vertical grid (XZ plane and Y = 0) -void EDA_3D_CANVAS::DrawGrid( double aGriSizeMM ) +void EDA_3D_CANVAS::Draw3DGrid( double aGriSizeMM ) { double zpos = 0.0; EDA_COLOR_T gridcolor = DARKGRAY; // Color of grid lines diff --git a/3d-viewer/3d_frame.cpp b/3d-viewer/3d_frame.cpp index 1b0561bb16..1afa6cb64e 100644 --- a/3d-viewer/3d_frame.cpp +++ b/3d-viewer/3d_frame.cpp @@ -45,6 +45,8 @@ static const wxString keyBgColor_Green( wxT( "BgColor_Green" ) ); static const wxString keyBgColor_Blue( wxT( "BgColor_Blue" ) ); static const wxString keyShowRealisticMode( wxT( "ShowRealisticMode" ) ); static const wxString keyShowAxis( wxT( "ShowAxis" ) ); +static const wxString keyShowGrid( wxT( "ShowGrid3D" ) ); +static const wxString keyShowGridSize( wxT( "Grid3DSize" ) ); static const wxString keyShowZones( wxT( "ShowZones" ) ); static const wxString keyShowFootprints( wxT( "ShowFootprints" ) ); static const wxString keyShowCopperThickness( wxT( "ShowCopperThickness" ) ); @@ -148,9 +150,9 @@ void EDA_3D_FRAME::GetSettings() { EDA_BASE_FRAME::LoadSettings(); - config->Read( keyBgColor_Red, &g_Parm_3D_Visu.m_BgColor.m_Red, 0.0 ); - config->Read( keyBgColor_Green, &g_Parm_3D_Visu.m_BgColor.m_Green, 0.0 ); - config->Read( keyBgColor_Blue, &g_Parm_3D_Visu.m_BgColor.m_Blue, 0.0 ); + config->Read( keyBgColor_Red, &prms.m_BgColor.m_Red, 0.0 ); + config->Read( keyBgColor_Green, &prms.m_BgColor.m_Green, 0.0 ); + config->Read( keyBgColor_Blue, &prms.m_BgColor.m_Blue, 0.0 ); bool tmp; config->Read( keyShowRealisticMode, &tmp, false ); @@ -159,6 +161,12 @@ void EDA_3D_FRAME::GetSettings() config->Read( keyShowAxis, &tmp, true ); prms.SetFlag( FL_AXIS, tmp ); + config->Read( keyShowGrid, &tmp, true ); + prms.SetFlag( FL_GRID, tmp ); + + config->Read( keyShowGridSize, &prms.m_3D_Grid, 10.0 ); + prms.SetFlag( FL_MODULE, tmp ); + config->Read( keyShowFootprints, &tmp, true ); prms.SetFlag( FL_MODULE, tmp ); @@ -201,12 +209,14 @@ void EDA_3D_FRAME::SaveSettings() EDA_BASE_FRAME::SaveSettings(); - config->Write( keyBgColor_Red, g_Parm_3D_Visu.m_BgColor.m_Red ); - config->Write( keyBgColor_Green, g_Parm_3D_Visu.m_BgColor.m_Green ); - config->Write( keyBgColor_Blue, g_Parm_3D_Visu.m_BgColor.m_Blue ); class INFO3D_VISU& prms = g_Parm_3D_Visu; + config->Write( keyBgColor_Red, prms.m_BgColor.m_Red ); + config->Write( keyBgColor_Green, prms.m_BgColor.m_Green ); + config->Write( keyBgColor_Blue, prms.m_BgColor.m_Blue ); config->Write( keyShowRealisticMode, prms.GetFlag( FL_USE_REALISTIC_MODE ) ); config->Write( keyShowAxis, prms.GetFlag( FL_AXIS ) ); + config->Write( keyShowGrid, prms.GetFlag( FL_GRID ) ); + config->Write( keyShowGridSize, prms.m_3D_Grid ); config->Write( keyShowFootprints, prms.GetFlag( FL_MODULE ) ); config->Write( keyShowCopperThickness, prms.GetFlag( FL_USE_COPPER_THICKNESS ) ); config->Write( keyShowZones, prms.GetFlag( FL_ZONE ) ); @@ -364,52 +374,52 @@ void EDA_3D_FRAME::Process_Special_Functions( wxCommandEvent& event ) case ID_MENU3D_AXIS_ONOFF: g_Parm_3D_Visu.SetFlag( FL_AXIS, isChecked ); - NewDisplay(); + m_canvas->Refresh(); return; case ID_MENU3D_MODULE_ONOFF: g_Parm_3D_Visu.SetFlag( FL_MODULE, isChecked ); - NewDisplay(); + m_canvas->Refresh(); return; case ID_MENU3D_USE_COPPER_THICKNESS: g_Parm_3D_Visu.SetFlag( FL_USE_COPPER_THICKNESS, isChecked ); - NewDisplay(); + NewDisplay(GL_ID_BOARD); return; case ID_MENU3D_ZONE_ONOFF: g_Parm_3D_Visu.SetFlag( FL_ZONE, isChecked ); - NewDisplay(); + NewDisplay(GL_ID_BOARD); return; case ID_MENU3D_ADHESIVE_ONOFF: g_Parm_3D_Visu.SetFlag( FL_ADHESIVE, isChecked ); - NewDisplay(); + NewDisplay(GL_ID_TECH_LAYERS); return; case ID_MENU3D_SILKSCREEN_ONOFF: g_Parm_3D_Visu.SetFlag( FL_SILKSCREEN, isChecked ); - NewDisplay(); + NewDisplay(GL_ID_TECH_LAYERS); return; case ID_MENU3D_SOLDER_MASK_ONOFF: g_Parm_3D_Visu.SetFlag( FL_SOLDERMASK, isChecked ); - NewDisplay(); + NewDisplay(GL_ID_TECH_LAYERS); return; case ID_MENU3D_SOLDER_PASTE_ONOFF: g_Parm_3D_Visu.SetFlag( FL_SOLDERPASTE, isChecked ); - NewDisplay(); + NewDisplay(GL_ID_TECH_LAYERS); return; case ID_MENU3D_COMMENTS_ONOFF: g_Parm_3D_Visu.SetFlag( FL_COMMENTS, isChecked ); - NewDisplay(); + NewDisplay(GL_ID_AUX_LAYERS); return; case ID_MENU3D_ECO_ONOFF: g_Parm_3D_Visu.SetFlag( FL_ECO, isChecked ); - NewDisplay(); + NewDisplay(GL_ID_AUX_LAYERS); return; default: @@ -434,7 +444,6 @@ void EDA_3D_FRAME::On3DGridSelection( wxCommandEvent& event ) GetMenuBar()->Check( ii, false ); } - switch( id ) { case ID_MENU3D_GRID_NOGRID: @@ -466,18 +475,17 @@ void EDA_3D_FRAME::On3DGridSelection( wxCommandEvent& event ) return; } - NewDisplay(); + NewDisplay( GL_ID_GRID ); } -void EDA_3D_FRAME::NewDisplay() +void EDA_3D_FRAME::NewDisplay( GLuint aGlList ) { m_reloadRequest = false; - m_canvas->ClearLists(); + m_canvas->ClearLists( aGlList ); m_canvas->CreateDrawGL_List(); -// m_canvas->InitGL(); m_canvas->Refresh( true ); m_canvas->DisplayStatus(); } @@ -507,6 +515,9 @@ void EDA_3D_FRAME::Set3DBgColor() newcolor = wxGetColourFromUser( this, oldcolor ); + if( ! newcolor.IsOk() ) // Happens on cancel dialog + return; + if( newcolor != oldcolor ) { g_Parm_3D_Visu.m_BgColor.m_Red = (double) newcolor.Red() / 255.0; @@ -515,3 +526,8 @@ void EDA_3D_FRAME::Set3DBgColor() NewDisplay(); } } + +BOARD* EDA_3D_FRAME::GetBoard() +{ + return Parent()->GetBoard(); +} diff --git a/3d-viewer/3d_toolbar.cpp b/3d-viewer/3d_toolbar.cpp index ed0e3eefbe..a1c7d2c90a 100644 --- a/3d-viewer/3d_toolbar.cpp +++ b/3d-viewer/3d_toolbar.cpp @@ -166,13 +166,22 @@ void EDA_3D_FRAME::CreateMenuBar() wxMenu * gridlistMenu = new wxMenu; AddMenuItem( prefsMenu, gridlistMenu, ID_MENU3D_GRID, _( "3D Grid" ), KiBitmap( grid_xpm ) ); - gridlistMenu->Append( ID_MENU3D_GRID_NOGRID, _( "No 3D Grid" ), wxEmptyString, true ); - gridlistMenu->Check( ID_MENU3D_GRID_NOGRID, true ); + gridlistMenu->Append( ID_MENU3D_GRID_NOGRID, _( "No 3D Grid" ), wxEmptyString, true ); + gridlistMenu->Append( ID_MENU3D_GRID_10_MM, _( "3D Grid 10 mm" ), wxEmptyString, true ); + gridlistMenu->Append( ID_MENU3D_GRID_5_MM, _( "3D Grid 5 mm" ), wxEmptyString, true ); + gridlistMenu->Append( ID_MENU3D_GRID_2P5_MM, _( "3D Grid 2.5 mm" ), wxEmptyString, true ); + gridlistMenu->Append( ID_MENU3D_GRID_1_MM, _( "3D Grid 1 mm" ), wxEmptyString, true ); - gridlistMenu->Append( ID_MENU3D_GRID_10_MM, _( "3D Grid 10 mm" ), wxEmptyString, true ); - gridlistMenu->Append( ID_MENU3D_GRID_5_MM, _( "3D Grid 5 mm" ), wxEmptyString, true ); - gridlistMenu->Append( ID_MENU3D_GRID_2P5_MM, _( "3D Grid 2.5 mm" ), wxEmptyString, true ); - gridlistMenu->Append( ID_MENU3D_GRID_1_MM, _( "3D Grid 1 mm" ), wxEmptyString, true ); + // If the grid is on, check the corresponding menuitem showing the grid size + if( g_Parm_3D_Visu.GetFlag( FL_GRID ) ) + { + gridlistMenu->Check( ID_MENU3D_GRID_10_MM, g_Parm_3D_Visu.m_3D_Grid == 10.0 ); + gridlistMenu->Check( ID_MENU3D_GRID_5_MM, g_Parm_3D_Visu.m_3D_Grid == 5.0 ); + gridlistMenu->Check( ID_MENU3D_GRID_2P5_MM, g_Parm_3D_Visu.m_3D_Grid == 2.5 ); + gridlistMenu->Check( ID_MENU3D_GRID_1_MM, g_Parm_3D_Visu.m_3D_Grid == 1.0 ); + } + else + gridlistMenu->Check( ID_MENU3D_GRID_NOGRID, true ); prefsMenu->AppendSeparator(); diff --git a/3d-viewer/3d_viewer.h b/3d-viewer/3d_viewer.h index dc94f933ef..a1645c1e81 100644 --- a/3d-viewer/3d_viewer.h +++ b/3d-viewer/3d_viewer.h @@ -78,6 +78,8 @@ public: PCB_BASE_FRAME* Parent() { return (PCB_BASE_FRAME*)GetParent(); } + BOARD* GetBoard(); + /** * Function ReloadRequest * must be called when reloading data from Pcbnew is needed @@ -93,8 +95,10 @@ public: * Function NewDisplay * Rebuild the display list. * must be called when 3D opengl data is modified + * @param aGlList = the list to rebuild. + * if 0 (default) all lists are rebuilt */ - void NewDisplay(); + void NewDisplay( GLuint aGlList = 0 ); void SetDefaultFileName(const wxString &aFn) { m_defaultFileName = aFn; } const wxString &GetDefaultFileName() const { return m_defaultFileName; } diff --git a/3d-viewer/info3d_visu.h b/3d-viewer/info3d_visu.h index 00acbbd226..7c7fe02918 100644 --- a/3d-viewer/info3d_visu.h +++ b/3d-viewer/info3d_visu.h @@ -74,7 +74,6 @@ enum DISPLAY3D_FLG { FL_LAST }; - class INFO3D_VISU { public: diff --git a/include/layers_id_colors_and_visibility.h b/include/layers_id_colors_and_visibility.h index 5df67215be..2137c5a1f0 100644 --- a/include/layers_id_colors_and_visibility.h +++ b/include/layers_id_colors_and_visibility.h @@ -63,6 +63,8 @@ typedef int LAYER_NUM; #define NB_COPPER_LAYERS (LAST_COPPER_LAYER - FIRST_COPPER_LAYER + 1) #define FIRST_NON_COPPER_LAYER 16 +#define FIRST_TECHNICAL_LAYER 16 +#define FIRST_USER_LAYER 24 #define ADHESIVE_N_BACK 16 #define ADHESIVE_N_FRONT 17 #define SOLDERPASTE_N_BACK 18 @@ -77,6 +79,8 @@ typedef int LAYER_NUM; #define ECO2_N 27 #define EDGE_N 28 #define LAST_NON_COPPER_LAYER 28 +#define LAST_TECHNICAL_LAYER 23 +#define LAST_USER_LAYER 27 #define NB_PCB_LAYERS (LAST_NON_COPPER_LAYER + 1) #define UNUSED_LAYER_29 29 #define UNUSED_LAYER_30 30 @@ -128,13 +132,16 @@ typedef unsigned LAYER_MSK; #define ALL_CU_LAYERS 0x0000FFFF #define INTERNAL_CU_LAYERS 0x00007FFE #define EXTERNAL_CU_LAYERS 0x00008001 -#define FRONT_AUX_LAYERS (SILKSCREEN_LAYER_FRONT | SOLDERMASK_LAYER_FRONT \ +#define FRONT_TECH_LAYERS (SILKSCREEN_LAYER_FRONT | SOLDERMASK_LAYER_FRONT \ | ADHESIVE_LAYER_FRONT | SOLDERPASTE_LAYER_FRONT) -#define BACK_AUX_LAYERS (SILKSCREEN_LAYER_BACK | SOLDERMASK_LAYER_BACK \ +#define BACK_TECH_LAYERS (SILKSCREEN_LAYER_BACK | SOLDERMASK_LAYER_BACK \ | ADHESIVE_LAYER_BACK | SOLDERPASTE_LAYER_BACK) -#define ALL_AUX_LAYERS (FRONT_AUX_LAYERS | BACK_AUX_LAYERS) -#define BACK_LAYERS (LAYER_BACK | BACK_AUX_LAYERS) -#define FRONT_LAYERS (LAYER_FRONT | FRONT_AUX_LAYERS) +#define ALL_TECH_LAYERS (FRONT_TECH_LAYERS | BACK_TECH_LAYERS) +#define BACK_LAYERS (LAYER_BACK | BACK_TECH_LAYERS) +#define FRONT_LAYERS (LAYER_FRONT | FRONT_TECH_LAYERS) + +#define ALL_USER_LAYERS (DRAW_LAYER | COMMENT_LAYER |\ + ECO1_LAYER | ECO2_LAYER ) #define NO_LAYERS 0x00000000 @@ -329,8 +336,18 @@ inline bool IsCopperLayer( LAYER_NUM aLayer ) */ inline bool IsNonCopperLayer( LAYER_NUM aLayer ) { - return aLayer >= FIRST_NON_COPPER_LAYER - && aLayer <= LAST_NON_COPPER_LAYER; + return aLayer >= FIRST_NON_COPPER_LAYER && aLayer <= LAST_NON_COPPER_LAYER; +} + +/** + * Function IsUserLayer + * tests whether a layer is a non copper and a non tech layer + * @param aLayer = Layer to test + * @return true if aLayer is a user layer + */ +inline bool IsUserLayer( LAYER_NUM aLayer ) +{ + return aLayer >= FIRST_USER_LAYER && aLayer <= LAST_USER_LAYER; } /* IMPORTANT: If a layer is not a front layer not necessarily is true diff --git a/pcbnew/dialogs/dialog_layers_setup.cpp b/pcbnew/dialogs/dialog_layers_setup.cpp index fc26fe399e..82b76e6c63 100644 --- a/pcbnew/dialogs/dialog_layers_setup.cpp +++ b/pcbnew/dialogs/dialog_layers_setup.cpp @@ -176,19 +176,19 @@ static const LAYER_MSK presets[] = NO_LAYERS, // shift the array index up by one, matches with "Custom". // "Two layers, parts on Front only" - EDGE_LAYER | LAYER_FRONT | LAYER_BACK | FRONT_AUX_LAYERS, + EDGE_LAYER | LAYER_FRONT | LAYER_BACK | FRONT_TECH_LAYERS, // "Two layers, parts on Back only", - EDGE_LAYER | LAYER_FRONT | LAYER_BACK | BACK_AUX_LAYERS, + EDGE_LAYER | LAYER_FRONT | LAYER_BACK | BACK_TECH_LAYERS, // "Two layers, parts on Front and Back", - EDGE_LAYER | LAYER_FRONT | LAYER_BACK | ALL_AUX_LAYERS, + EDGE_LAYER | LAYER_FRONT | LAYER_BACK | ALL_TECH_LAYERS, // "Four layers, parts on Front only" - EDGE_LAYER | LAYER_FRONT | LAYER_BACK | LAYER_2 | LAYER_3 | FRONT_AUX_LAYERS, + EDGE_LAYER | LAYER_FRONT | LAYER_BACK | LAYER_2 | LAYER_3 | FRONT_TECH_LAYERS, // "Four layers, parts on Front and Back" - EDGE_LAYER | LAYER_FRONT | LAYER_BACK | LAYER_2 | LAYER_3 | ALL_AUX_LAYERS, + EDGE_LAYER | LAYER_FRONT | LAYER_BACK | LAYER_2 | LAYER_3 | ALL_TECH_LAYERS, // "All layers on", ALL_LAYERS, diff --git a/pcbnew/dialogs/dialog_plot.cpp b/pcbnew/dialogs/dialog_plot.cpp index bc13af8558..4da92e068d 100644 --- a/pcbnew/dialogs/dialog_plot.cpp +++ b/pcbnew/dialogs/dialog_plot.cpp @@ -246,7 +246,7 @@ void DIALOG_PLOT::OnPopUpLayers( wxCommandEvent& event ) for( i = 0; i < m_layerList.size(); i++ ) { LAYER_MSK layermask = GetLayerMask( m_layerList[ i ] ); - if( layermask & ( ALL_CU_LAYERS | ALL_AUX_LAYERS ) ) + if( layermask & ( ALL_CU_LAYERS | ALL_TECH_LAYERS ) ) m_layerCheckListBox->Check( i, true ); else m_layerCheckListBox->Check( i, false ); From f24bc87a842648b562f45081604f0edf972acaff Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 8 Mar 2014 20:07:35 +0100 Subject: [PATCH 154/741] Pcbnew: fix Bug #1289416 (Broken setting of layer list in D_PAD:: ViewGetLayers() for GAL). --- pcbnew/class_pad.cpp | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index d024290e74..405c398db0 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -842,29 +842,40 @@ void D_PAD::ViewGetLayers( int aLayers[], int& aCount ) const // Multi layer pad aLayers[aCount++] = ITEM_GAL_LAYER( PADS_VISIBLE ); aLayers[aCount++] = NETNAMES_GAL_LAYER( PADS_NETNAMES_VISIBLE ); - aLayers[aCount++] = SOLDERMASK_N_FRONT; - aLayers[aCount++] = SOLDERMASK_N_BACK; - aLayers[aCount++] = SOLDERPASTE_N_FRONT; - aLayers[aCount++] = SOLDERPASTE_N_BACK; } else if( IsOnLayer( LAYER_N_FRONT ) ) { aLayers[aCount++] = ITEM_GAL_LAYER( PAD_FR_VISIBLE ); aLayers[aCount++] = NETNAMES_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ); - aLayers[aCount++] = SOLDERMASK_N_FRONT; - aLayers[aCount++] = SOLDERPASTE_N_FRONT; } else if( IsOnLayer( LAYER_N_BACK ) ) { aLayers[aCount++] = ITEM_GAL_LAYER( PAD_BK_VISIBLE ); aLayers[aCount++] = NETNAMES_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ); - aLayers[aCount++] = SOLDERMASK_N_BACK; - aLayers[aCount++] = SOLDERPASTE_N_BACK; } + + if( IsOnLayer( SOLDERMASK_N_FRONT ) ) + aLayers[aCount++] = SOLDERMASK_N_FRONT; + + if( IsOnLayer( SOLDERMASK_N_BACK ) ) + aLayers[aCount++] = SOLDERMASK_N_BACK; + + if( IsOnLayer( SOLDERPASTE_N_FRONT ) ) + aLayers[aCount++] = SOLDERPASTE_N_FRONT; + + if( IsOnLayer( SOLDERPASTE_N_BACK ) ) + aLayers[aCount++] = SOLDERPASTE_N_BACK; + + if( IsOnLayer( ADHESIVE_N_BACK ) ) + aLayers[aCount++] = ADHESIVE_N_BACK; + + if( IsOnLayer( ADHESIVE_N_FRONT ) ) + aLayers[aCount++] = ADHESIVE_N_FRONT; + #ifdef __WXDEBUG__ - else // Should not occur + if( aCount == 0 ) // Should not occur { - wxLogWarning( wxT("D_PAD::ViewGetLayers():PAD on layer different than FRONT/BACK") ); + wxLogWarning( wxT("D_PAD::ViewGetLayers():PAD has no layer") ); } #endif } From 4fd3dbb5a5ca160198b9eab12450bca8c33e7c39 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sun, 9 Mar 2014 19:43:53 +0100 Subject: [PATCH 155/741] Finishing work on a better 3D viewer. this also fix bugs like Bug #1129630 . --- 3d-viewer/3d_aux.cpp | 49 ++------------------------ 3d-viewer/3d_canvas.h | 1 - 3d-viewer/3d_class.cpp | 22 +++++++++++- 3d-viewer/3d_draw.cpp | 50 +++++++++++++++++++-------- 3d-viewer/3d_draw_basic_functions.cpp | 4 +-- 3d-viewer/3d_struct.h | 43 ++++++++++++++++++++++- 3d-viewer/modelparsers.h | 2 +- 3d-viewer/vrmlmodelparser.cpp | 8 +++-- 3d-viewer/x3dmodelparser.cpp | 7 ++-- pcbnew/class_module.h | 8 ++++- 10 files changed, 122 insertions(+), 72 deletions(-) diff --git a/3d-viewer/3d_aux.cpp b/3d-viewer/3d_aux.cpp index 0878053869..a8ccab2b8d 100644 --- a/3d-viewer/3d_aux.cpp +++ b/3d-viewer/3d_aux.cpp @@ -45,16 +45,11 @@ #include #include -// Exported function: -void Set_Object_Data( std::vector< S3D_VERTEX >& aVertices, double aBiuTo3DUnits ); - -void S3D_MASTER::Set_Object_Coords( std::vector< S3D_VERTEX >& aVertices ) +void S3D_MASTER::ObjectCoordsTo3DUnits( std::vector< S3D_VERTEX >& aVertices ) { - unsigned ii; - /* adjust object scale, rotation and offset position */ - for( ii = 0; ii < aVertices.size(); ii++ ) + for( unsigned ii = 0; ii < aVertices.size(); ii++ ) { aVertices[ii].x *= m_MatScale.x; aVertices[ii].y *= m_MatScale.y; @@ -79,7 +74,7 @@ void S3D_MASTER::Set_Object_Coords( std::vector< S3D_VERTEX >& aVertices ) } -void Set_Object_Data( std::vector< S3D_VERTEX >& aVertices, double aBiuTo3DUnits ) +void TransfertToGLlist( std::vector< S3D_VERTEX >& aVertices, double aBiuTo3DUnits ) { unsigned ii; GLfloat ax, ay, az, bx, by, bz, nx, ny, nz, r; @@ -138,44 +133,6 @@ void Set_Object_Data( std::vector< S3D_VERTEX >& aVertices, double aBiuTo3DUnits glEnd(); } - -GLuint EDA_3D_CANVAS::DisplayCubeforTest() -{ - GLuint gllist = glGenLists( 1 ); - - glNewList( gllist, GL_COMPILE_AND_EXECUTE ); - /* draw six faces of a cube */ - glBegin( GL_QUADS ); - glNormal3f( 0.0F, 0.0F, 1.0F ); - glVertex3f( 0.5F, 0.5F, 0.5F ); glVertex3f( -0.5F, 0.5F, 0.5F ); - glVertex3f( -0.5F, -0.5F, 0.5F ); glVertex3f( 0.5F, -0.5F, 0.5F ); - - glNormal3f( 0.0F, 0.0F, -1.0F ); - glVertex3f( -0.5F, -0.5F, -0.5F ); glVertex3f( -0.5F, 0.5F, -0.5F ); - glVertex3f( 0.5F, 0.5F, -0.5F ); glVertex3f( 0.5F, -0.5F, -0.5F ); - - glNormal3f( 0.0F, 1.0F, 0.0F ); - glVertex3f( 0.5F, 0.5F, 0.5F ); glVertex3f( 0.5F, 0.5F, -0.5F ); - glVertex3f( -0.5F, 0.5F, -0.5F ); glVertex3f( -0.5F, 0.5F, 0.5F ); - - glNormal3f( 0.0F, -1.0F, 0.0F ); - glVertex3f( -0.5F, -0.5F, -0.5F ); glVertex3f( 0.5F, -0.5F, -0.5F ); - glVertex3f( 0.5F, -0.5F, 0.5F ); glVertex3f( -0.5F, -0.5F, 0.5F ); - - glNormal3f( 1.0F, 0.0F, 0.0F ); - glVertex3f( 0.5F, 0.5F, 0.5F ); glVertex3f( 0.5F, -0.5F, 0.5F ); - glVertex3f( 0.5F, -0.5F, -0.5F ); glVertex3f( 0.5F, 0.5F, -0.5F ); - - glNormal3f( -1.0F, 0.0F, 0.0F ); - glVertex3f( -0.5F, -0.5F, -0.5F ); glVertex3f( -0.5F, -0.5F, 0.5F ); - glVertex3f( -0.5F, 0.5F, 0.5F ); glVertex3f( -0.5F, 0.5F, -0.5F ); - glEnd(); - - glEndList(); - - return gllist; -} - VERTEX_VALUE_CTRL::VERTEX_VALUE_CTRL( wxWindow* aParent, wxBoxSizer* aBoxSizer ) { wxString text; diff --git a/3d-viewer/3d_canvas.h b/3d-viewer/3d_canvas.h index fa84fec602..43a1f7ed85 100644 --- a/3d-viewer/3d_canvas.h +++ b/3d-viewer/3d_canvas.h @@ -104,7 +104,6 @@ public: void OnEnterWindow( wxMouseEvent& event ); // Display functions - GLuint DisplayCubeforTest(); // Just a test function void SetView3D( int keycode ); void DisplayStatus(); void Redraw(); diff --git a/3d-viewer/3d_class.cpp b/3d-viewer/3d_class.cpp index 79ea755b2f..b364d23e5b 100644 --- a/3d-viewer/3d_class.cpp +++ b/3d-viewer/3d_class.cpp @@ -41,9 +41,14 @@ S3D_MATERIAL::S3D_MATERIAL( S3D_MASTER* father, const wxString& name ) : m_Name = name; } - void S3D_MATERIAL::SetMaterial() { + S3D_MASTER * s3dParent = (S3D_MASTER *) GetParent(); + s3dParent->SetLastTransparency( m_Transparency ); + + if( ! s3dParent->IsOpenGlAllowed() ) + return; + glColorMaterial( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE ); glColor4f( m_DiffuseColor.x * m_AmbientIntensity, m_DiffuseColor.y * m_AmbientIntensity, @@ -56,6 +61,20 @@ void S3D_MATERIAL::SetMaterial() #endif } +bool S3D_MASTER::IsOpenGlAllowed() +{ + if( m_loadNonTransparentObjects ) // return true for non transparent objects only + { + if( m_lastTransparency == 0.0 ) + return true; + } + if( m_loadTransparentObjects ) // return true for transparent objects only + if( m_lastTransparency != 0.0 ) + return true; + + return false; +} + void S3D_MASTER::Insert( S3D_MATERIAL* aMaterial ) { @@ -79,6 +98,7 @@ S3D_MASTER::S3D_MASTER( EDA_ITEM* aParent ) : EDA_ITEM( aParent, NOT_USED ) { m_MatScale.x = m_MatScale.y = m_MatScale.z = 1.0; + m_lastTransparency = 0.0; m_3D_Drawings = NULL; m_Materials = NULL; m_ShapeType = FILE3D_NONE; diff --git a/3d-viewer/3d_draw.cpp b/3d-viewer/3d_draw.cpp index 991916294b..dffd7e17cc 100644 --- a/3d-viewer/3d_draw.cpp +++ b/3d-viewer/3d_draw.cpp @@ -356,7 +356,7 @@ void EDA_3D_CANVAS::BuildBoard3DView() } } - // draw graphic items + // draw graphic items on copper layers (texts) for( BOARD_ITEM* item = pcb->m_Drawings; item; item = item->Next() ) { if( !item->IsOnLayer( layer ) ) @@ -364,11 +364,9 @@ void EDA_3D_CANVAS::BuildBoard3DView() switch( item->Type() ) { - case PCB_LINE_T: + case PCB_LINE_T: // should not exist on copper layers ( (DRAWSEGMENT*) item )->TransformShapeWithClearanceToPolygon( - bufferPolys, 0, - segcountforcircle, - correctionFactor ); + bufferPolys, 0, segcountforcircle, correctionFactor ); break; case PCB_TEXT_T: @@ -505,8 +503,7 @@ void EDA_3D_CANVAS::BuildTechLayers3DView() // a fine representation CPOLYGONS_LIST bufferPolys; - bufferPolys.reserve( 200000 ); // Reserve for large board (tracks mainly) - + bufferPolys.reserve( 100000 ); // Reserve for large board CPOLYGONS_LIST allLayerHoles; // Contains through holes, calculated only once allLayerHoles.reserve( 20000 ); @@ -522,11 +519,6 @@ void EDA_3D_CANVAS::BuildTechLayers3DView() wxMessageBox( msg ); } - CPOLYGONS_LIST bufferZonesPolys; - bufferZonesPolys.reserve( 500000 ); // Reserve for large board ( copper zones mainly ) - - CPOLYGONS_LIST currLayerHoles; // Contains holes for the current layer - int thickness = g_Parm_3D_Visu.GetCopperThicknessBIU(); for( TRACK* track = pcb->m_Track; track != NULL; track = track->Next() ) { @@ -544,6 +536,16 @@ void EDA_3D_CANVAS::BuildTechLayers3DView() } } + // draw pads holes + for( MODULE* module = pcb->m_Modules; module != NULL; module = module->Next() ) + { + // Add pad hole, if any + D_PAD* pad = module->Pads(); + + for( ; pad != NULL; pad = pad->Next() ) + pad->BuildPadDrillShapePolygon( allLayerHoles, 0, + segcountLowQuality ); + } // draw graphic items, on technical layers @@ -852,6 +854,7 @@ void EDA_3D_CANVAS::CreateDrawGL_List() #endif } + void EDA_3D_CANVAS::BuildFootprintShape3DList( GLuint aOpaqueList, GLuint aTransparentList) { @@ -860,10 +863,21 @@ void EDA_3D_CANVAS::BuildFootprintShape3DList( GLuint aOpaqueList, // which need to be drawn after all other items BOARD* pcb = GetBoard(); - glNewList( m_glLists[GL_ID_3DSHAPES_SOLID], GL_COMPILE ); + glNewList( aOpaqueList, GL_COMPILE ); + bool loadTransparentObjects = false; for( MODULE* module = pcb->m_Modules; module; module = module->Next() ) - module->ReadAndInsert3DComponentShape( this ); + module->ReadAndInsert3DComponentShape( this, !loadTransparentObjects, + loadTransparentObjects ); + + glEndList(); + + glNewList( aTransparentList, GL_COMPILE ); + loadTransparentObjects = true; + + for( MODULE* module = pcb->m_Modules; module; module = module->Next() ) + module->ReadAndInsert3DComponentShape( this, !loadTransparentObjects, + loadTransparentObjects ); glEndList(); } @@ -1055,8 +1069,11 @@ void EDA_3D_CANVAS::Draw3DViaHole( SEGVIA* aVia ) } -void MODULE::ReadAndInsert3DComponentShape( EDA_3D_CANVAS* glcanvas ) +void MODULE::ReadAndInsert3DComponentShape( EDA_3D_CANVAS* glcanvas, + bool aAllowNonTransparentObjects, + bool aAllowTransparentObjects ) { + // Read from disk and draws the footprint 3D shapes if exists S3D_MASTER* shape3D = m_3D_Drawings; double zpos = g_Parm_3D_Visu.GetModulesZcoord3DIU( IsFlipped() ); @@ -1078,6 +1095,9 @@ void MODULE::ReadAndInsert3DComponentShape( EDA_3D_CANVAS* glcanvas ) for( ; shape3D != NULL; shape3D = shape3D->Next() ) { + shape3D->SetLoadNonTransparentObjects( aAllowNonTransparentObjects ); + shape3D->SetLoadTransparentObjects( aAllowTransparentObjects ); + if( shape3D->Is3DType( S3D_MASTER::FILE3D_VRML ) ) shape3D->ReadData(); } diff --git a/3d-viewer/3d_draw_basic_functions.cpp b/3d-viewer/3d_draw_basic_functions.cpp index ef49a3e4bb..81654c4af7 100644 --- a/3d-viewer/3d_draw_basic_functions.cpp +++ b/3d-viewer/3d_draw_basic_functions.cpp @@ -35,7 +35,7 @@ #include <3d_draw_basic_functions.h> // Imported function: -extern void Set_Object_Data( std::vector& aVertices, double aBiuTo3DUnits ); +extern void TransfertToGLlist( std::vector& aVertices, double aBiuTo3DUnits ); extern void CheckGLError(); // Number of segments to approximate a circle by segments @@ -116,7 +116,7 @@ static void Draw3D_VerticalPolygonalCylinder( const CPOLYGONS_LIST& aPolysList, coords[3].y = coords[2].y; // only z change // Creates the GL_QUAD - Set_Object_Data( coords, aBiuTo3DUnits ); + TransfertToGLlist( coords, aBiuTo3DUnits ); } } diff --git a/3d-viewer/3d_struct.h b/3d-viewer/3d_struct.h index 56a083f8c9..2a82effd93 100644 --- a/3d-viewer/3d_struct.h +++ b/3d-viewer/3d_struct.h @@ -109,6 +109,10 @@ public: private: wxString m_Shape3DName; /* 3D shape name in 3D library */ FILE3D_TYPE m_ShapeType; + double m_lastTransparency; // last transparency value from + // last material in use + bool m_loadTransparentObjects; + bool m_loadNonTransparentObjects; public: S3D_MASTER( EDA_ITEM* aParent ); @@ -117,11 +121,41 @@ public: S3D_MASTER* Next() const { return (S3D_MASTER*) Pnext; } S3D_MASTER* Back() const { return (S3D_MASTER*) Pback; } + // Accessors + void SetLastTransparency( double aValue ) { m_lastTransparency = aValue; } + + void SetLoadTransparentObjects( bool aLoad ) + { m_loadTransparentObjects = aLoad; } + + void SetLoadNonTransparentObjects( bool aLoad ) + { m_loadNonTransparentObjects = aLoad; } + void Insert( S3D_MATERIAL* aMaterial ); + /** + * Function IsOpenGlAllowed + * @return true if opengl current list accepts a gl data + * used to filter transparent objects, which are drawn after + * non transparent objects + */ + bool IsOpenGlAllowed(); + void Copy( S3D_MASTER* pattern ); + + /** + * Function ReadData + * Select the parser to read the 3D data file (vrml, x3d ...) + * and build the description objects list + */ int ReadData(); - void Set_Object_Coords( std::vector< S3D_VERTEX >& aVertices ); + + /** + * Function ObjectCoordsTo3DUnits + * @param aVertices = a list of 3D coordinates in shape units + * to convert to 3D canvas units, according to the + * footprint 3Dshape rotation, offset and scale parameters + */ + void ObjectCoordsTo3DUnits( std::vector< S3D_VERTEX >& aVertices ); #if defined(DEBUG) void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override @@ -147,6 +181,13 @@ public: */ const wxString GetShape3DFullFilename(); + /** + * Function SetShape3DName + * @param aShapeName = file name of the data file relative to the 3D shape + * + * Set the filename of the 3D shape, and depending on the file extention + * (vrl, x3d, idf ) the type of file. + */ void SetShape3DName( const wxString& aShapeName ); }; diff --git a/3d-viewer/modelparsers.h b/3d-viewer/modelparsers.h index 147a0fda16..d1c5f23461 100644 --- a/3d-viewer/modelparsers.h +++ b/3d-viewer/modelparsers.h @@ -37,7 +37,7 @@ class S3D_MASTER; class S3D_VERTEX; -extern void Set_Object_Data( std::vector< S3D_VERTEX >& aVertices, double aBiuTo3DUnits ); +extern void TransfertToGLlist( std::vector< S3D_VERTEX >& aVertices, double aBiuTo3DUnits ); class S3D_MODEL_PARSER; class X3D_MODEL_PARSER; diff --git a/3d-viewer/vrmlmodelparser.cpp b/3d-viewer/vrmlmodelparser.cpp index fa6367793b..8891a424aa 100644 --- a/3d-viewer/vrmlmodelparser.cpp +++ b/3d-viewer/vrmlmodelparser.cpp @@ -519,8 +519,12 @@ int VRML_MODEL_PARSER::readGeometry( FILE* file, int* LineNum ) vertices.push_back( vertex ); } - GetMaster()->Set_Object_Coords( vertices ); - Set_Object_Data( vertices, vrmlunits_to_3Dunits ); + if( GetMaster()->IsOpenGlAllowed() ) + { + GetMaster()->ObjectCoordsTo3DUnits( vertices ); + TransfertToGLlist( vertices, vrmlunits_to_3Dunits ); + } + vertices.clear(); coordIndex.clear(); } diff --git a/3d-viewer/x3dmodelparser.cpp b/3d-viewer/x3dmodelparser.cpp index 012d3df959..e4f7d283b2 100644 --- a/3d-viewer/x3dmodelparser.cpp +++ b/3d-viewer/x3dmodelparser.cpp @@ -479,8 +479,11 @@ void X3D_MODEL_PARSER::readIndexedFaceSet( wxXmlNode* aFaceNode, vertices.push_back( triplets.at( *id ) ); } - GetMaster()->Set_Object_Coords( vertices ); - Set_Object_Data( vertices, vrmlunits_to_3Dunits ); + if( GetMaster()->IsOpenGlAllowed() ) + { + GetMaster()->ObjectCoordsTo3DUnits( vertices ); + TransfertToGLlist( vertices, vrmlunits_to_3Dunits ); + } vertices.clear(); coordIndex.clear(); diff --git a/pcbnew/class_module.h b/pcbnew/class_module.h index 184e9e7288..34a8c11788 100644 --- a/pcbnew/class_module.h +++ b/pcbnew/class_module.h @@ -250,8 +250,14 @@ public: * function ReadandInsert3DComponentShape * read the 3D component shape(s) of the footprint (physical shape) * and insert mesh in gl list + * @param glcanvas = the openGL canvas + * @param aAllowNonTransparentObjects = true to load non transparent objects + * @param aAllowTransparentObjects = true to load non transparent objects + * in openGL, transparent objects should be drawn *after* non transparent objects */ - void ReadAndInsert3DComponentShape( EDA_3D_CANVAS* glcanvas ); + void ReadAndInsert3DComponentShape( EDA_3D_CANVAS* glcanvas, + bool aAllowNonTransparentObjects, + bool aAllowTransparentObjects ); /** * function TransformPadsShapesWithClearanceToPolygon From c4dbdbf9d3a838ebbcc1ff1c3dfa5473749c7051 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 10 Mar 2014 10:18:48 +0100 Subject: [PATCH 156/741] Removed unnecessary casting. --- common/worksheet_viewitem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/worksheet_viewitem.cpp b/common/worksheet_viewitem.cpp index ba4185f8af..e261b3eff9 100644 --- a/common/worksheet_viewitem.cpp +++ b/common/worksheet_viewitem.cpp @@ -189,7 +189,7 @@ void WORKSHEET_VIEWITEM::draw( const WS_DRAW_ITEM_TEXT* aItem, GAL* aGal ) const aGal->SetStrokeColor( COLOR4D( aItem->GetColor() ) ); aGal->SetLineWidth( aItem->GetThickness() ); aGal->SetTextAttributes( aItem ); - aGal->StrokeText( std::wstring( aItem->GetText().wc_str() ), position, 0.0 ); + aGal->StrokeText( aItem->GetText(), position, 0.0 ); } From ecb3aebce366100c3f5c0007cb132810d122cc1e Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 10 Mar 2014 16:01:15 +0100 Subject: [PATCH 157/741] Fixed a bug caused by removed VIEW_ITEMs that were marked for updating. --- common/view/view.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/common/view/view.cpp b/common/view/view.cpp index 1baa2599fc..14792fae0e 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -114,6 +114,14 @@ void VIEW::Remove( VIEW_ITEM* aItem ) if( m_dynamic ) aItem->m_view = NULL; + if( aItem->viewRequiredUpdate() != VIEW_ITEM::NONE ) // prevent from updating a removed item + { + std::vector::iterator item = std::find( m_needsUpdate.begin(), m_needsUpdate.end(), aItem ); + + if( item != m_needsUpdate.end() ) + m_needsUpdate.erase( item ); + } + int layers[VIEW::VIEW_MAX_LAYERS], layers_count; aItem->getLayers( layers, layers_count ); From 5ac6579a87f92faf89283dc55a60ee2a414061a6 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 10 Mar 2014 16:25:40 +0100 Subject: [PATCH 158/741] Cursor snaps to EDIT_POINTs. Added POINT_EDITOR::isModified(). --- pcbnew/tools/edit_points.h | 2 +- pcbnew/tools/point_editor.cpp | 10 ++++++---- pcbnew/tools/point_editor.h | 6 ++++++ 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/pcbnew/tools/edit_points.h b/pcbnew/tools/edit_points.h index 5aabb41117..bdcf5ec55a 100644 --- a/pcbnew/tools/edit_points.h +++ b/pcbnew/tools/edit_points.h @@ -456,7 +456,7 @@ public: * @param aConstrained is the point that is put under constrain. * @param aConstrainer is the point that is the source of the constrain. */ - EPC_45DEGREE ( EDIT_POINT& aConstrained, const EDIT_POINT& aConstrainer ) : + EPC_45DEGREE( EDIT_POINT& aConstrained, const EDIT_POINT& aConstrainer ) : EDIT_POINT_CONSTRAINT( aConstrained ), m_constrainer( aConstrainer ) {} diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp index 2e87717411..4415aae5a0 100644 --- a/pcbnew/tools/point_editor.cpp +++ b/pcbnew/tools/point_editor.cpp @@ -62,7 +62,6 @@ public: case S_SEGMENT: points->AddPoint( segment->GetStart() ); points->AddPoint( segment->GetEnd() ); - break; case S_ARC: @@ -194,12 +193,14 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) controls->ShowCursor( true ); controls->SetAutoPan( true ); controls->SetSnapping( true ); + controls->ForceCursorPosition( true, point->GetPosition() ); } else { controls->ShowCursor( false ); controls->SetAutoPan( false ); controls->SetSnapping( false ); + controls->ForceCursorPosition( false ); } } @@ -213,6 +214,7 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) // Save items, so changes can be undone editFrame->OnModify(); editFrame->SaveCopyInUndoList( selection.items, UR_CHANGED ); + controls->ForceCursorPosition( false ); modified = true; } @@ -299,11 +301,11 @@ void POINT_EDITOR::updateItem() const switch( segment->GetShape() ) { case S_SEGMENT: - if( &(*m_editPoints)[0] == m_dragPoint ) + if( isModified( (*m_editPoints)[0] ) ) segment->SetStart( wxPoint( (*m_editPoints)[0].GetPosition().x, (*m_editPoints)[0].GetPosition().y ) ); - else if( &(*m_editPoints)[1] == m_dragPoint ) + else if( isModified( (*m_editPoints)[1] ) ) segment->SetEnd( wxPoint( (*m_editPoints)[1].GetPosition().x, (*m_editPoints)[1].GetPosition().y ) ); @@ -351,7 +353,7 @@ void POINT_EDITOR::updateItem() const const VECTOR2I& center = (*m_editPoints)[0].GetPosition(); const VECTOR2I& end = (*m_editPoints)[1].GetPosition(); - if( m_dragPoint == &(*m_editPoints)[0] ) + if( isModified( (*m_editPoints)[0] ) ) { wxPoint moveVector = wxPoint( center.x, center.y ) - segment->GetCenter(); segment->Move( moveVector ); diff --git a/pcbnew/tools/point_editor.h b/pcbnew/tools/point_editor.h index f0a9405e01..054d6b444e 100644 --- a/pcbnew/tools/point_editor.h +++ b/pcbnew/tools/point_editor.h @@ -74,6 +74,12 @@ private: ///> Updates edit points with item's points. void updatePoints() const; + ///> Returns true if aPoint is the currently modified point. + inline bool isModified( const EDIT_POINT& aPoint ) const + { + return m_dragPoint == &aPoint; + } + ///> Returns a point that should be used as a constrainer for 45 degrees mode. EDIT_POINT get45DegConstrainer() const; From 5feddb8cac1440c419e52372b123de4981767e6d Mon Sep 17 00:00:00 2001 From: Marco Serantoni Date: Mon, 10 Mar 2014 23:37:59 +0100 Subject: [PATCH 159/741] [MacOSX] fixes some interations with KicadOSXBuilder --- pcbnew/CMakeLists.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 03986fd836..87455ff48e 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -661,9 +661,11 @@ if( KICAD_SCRIPTING_MODULES ) COMMENT "Copying wxPython into pcbnew.app Frameworks" ) - # Tell that we have to run osx_fix_bundles fix after building _pcbnew and migrating wxPython - add_dependencies( osx_fix_bundles pcbnew_copy_wxpython_module ) - add_dependencies( osx_fix_bundles _pcbnew ) + if( KICAD_BUILD_DYNAMIC ) + # Tell that we have to run osx_fix_bundles fix after building _pcbnew and migrating wxPython + add_dependencies( osx_fix_bundles pcbnew_copy_wxpython_module ) + add_dependencies( osx_fix_bundles _pcbnew ) + endif() endif() endif() From 54bf21768cf40748126db24cc076de4135e661e6 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 11 Mar 2014 10:58:58 +0100 Subject: [PATCH 160/741] Added a few settings to make the layer settings more similar to KiCad defaults (moved vias to VIA_THROUGH_VISIBLE, added a few rules for required layers). --- common/view/view.cpp | 13 ++++++++++++- pcbnew/basepcbframe.cpp | 7 +++++-- pcbnew/class_track.cpp | 2 +- pcbnew/pcb_painter.cpp | 12 ++++++------ pcbnew/pcbframe.cpp | 4 ++-- pcbnew/tools/drawing_tool.cpp | 4 ++-- 6 files changed, 28 insertions(+), 14 deletions(-) diff --git a/common/view/view.cpp b/common/view/view.cpp index 14792fae0e..3cf57a210b 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -765,6 +765,11 @@ void VIEW::ClearTargets() void VIEW::Redraw() { +#ifdef PROFILE + prof_counter totalRealTime; + prof_start( &totalRealTime ); +#endif /* PROFILE */ + VECTOR2D screenSize = m_gal->GetScreenPixelSize(); BOX2I rect( ToWorld( VECTOR2D( 0, 0 ) ), ToWorld( screenSize ) - ToWorld( VECTOR2D( 0, 0 ) ) ); @@ -776,6 +781,12 @@ void VIEW::Redraw() markTargetClean( TARGET_CACHED ); markTargetClean( TARGET_NONCACHED ); markTargetClean( TARGET_OVERLAY ); + +#ifdef PROFILE + prof_end( &totalRealTime ); + + wxLogDebug( wxT( "Redraw: %.1f ms" ), totalRealTime.msecs() ); +#endif /* PROFILE */ } @@ -971,7 +982,7 @@ bool VIEW::areRequiredLayersEnabled( int aLayerId ) const it_end = m_layers.at( aLayerId ).requiredLayers.end(); it != it_end; ++it ) { // That is enough if just one layer is not enabled - if( !m_layers.at( *it ).visible ) + if( !m_layers.at( *it ).visible || !areRequiredLayersEnabled( *it ) ) return false; } diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 957ac978ab..7adc4ca473 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -83,7 +83,7 @@ const LAYER_NUM PCB_BASE_FRAME::GAL_LAYER_ORDER[] = ITEM_GAL_LAYER( RATSNEST_VISIBLE ), ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), - ITEM_GAL_LAYER( VIAS_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), + ITEM_GAL_LAYER( VIA_THROUGH_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), NETNAMES_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_FR_VISIBLE ), SOLDERMASK_N_FRONT, NETNAMES_GAL_LAYER( LAYER_16_NETNAMES_VISIBLE ), LAYER_N_FRONT, @@ -798,7 +798,7 @@ void PCB_BASE_FRAME::LoadSettings() } // Some more required layers settings - view->SetRequired( ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( VIAS_VISIBLE ) ); + view->SetRequired( ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( VIA_THROUGH_VISIBLE ) ); view->SetRequired( ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ) ); view->SetRequired( NETNAMES_GAL_LAYER( PADS_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ) ); @@ -812,6 +812,9 @@ void PCB_BASE_FRAME::LoadSettings() view->SetRequired( SOLDERPASTE_N_BACK, ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); view->SetRequired( SOLDERMASK_N_BACK, ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); + view->SetRequired( ITEM_GAL_LAYER( PAD_FR_VISIBLE ), ITEM_GAL_LAYER( MOD_FR_VISIBLE ) ); + view->SetRequired( ITEM_GAL_LAYER( PAD_BK_VISIBLE ), ITEM_GAL_LAYER( MOD_BK_VISIBLE ) ); + view->SetLayerTarget( ITEM_GAL_LAYER( GP_OVERLAY ), KIGFX::TARGET_OVERLAY ); view->SetLayerTarget( ITEM_GAL_LAYER( RATSNEST_VISIBLE ), KIGFX::TARGET_OVERLAY ); diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index 6221756253..93288465c2 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -981,7 +981,7 @@ void SEGVIA::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, void SEGVIA::ViewGetLayers( int aLayers[], int& aCount ) const { // Just show it on common via & via holes layers - aLayers[0] = ITEM_GAL_LAYER( VIAS_VISIBLE ); + aLayers[0] = ITEM_GAL_LAYER( VIA_THROUGH_VISIBLE ); aLayers[1] = ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ); aCount = 2; } diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 2587f7f65e..40576eba42 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -69,7 +69,7 @@ void PCB_RENDER_SETTINGS::ImportLegacyColors( COLORS_DESIGN_SETTINGS* aSettings // Default colors for specific layers m_layerColors[ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE )] = COLOR4D( 0.5, 0.4, 0.0, 1.0 ); m_layerColors[ITEM_GAL_LAYER( PADS_HOLES_VISIBLE )] = COLOR4D( 0.0, 0.5, 0.5, 1.0 ); - m_layerColors[ITEM_GAL_LAYER( VIAS_VISIBLE )] = COLOR4D( 0.7, 0.7, 0.7, 1.0 ); + m_layerColors[ITEM_GAL_LAYER( VIA_THROUGH_VISIBLE )] = COLOR4D( 0.7, 0.7, 0.7, 1.0 ); m_layerColors[ITEM_GAL_LAYER( PADS_VISIBLE )] = COLOR4D( 0.7, 0.7, 0.7, 1.0 ); m_layerColors[NETNAMES_GAL_LAYER( PADS_NETNAMES_VISIBLE )] = COLOR4D( 0.8, 0.8, 0.8, 0.7 ); m_layerColors[NETNAMES_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE )] = COLOR4D( 0.8, 0.8, 0.8, 0.7 ); @@ -94,9 +94,9 @@ void PCB_RENDER_SETTINGS::LoadDisplayOptions( const DISPLAY_OPTIONS& aOptions ) m_padNumbers = aOptions.DisplayPadNum; // Whether to draw tracks, vias & pads filled or as outlines - m_sketchModeSelect[PADS_VISIBLE] = !aOptions.DisplayPadFill; - m_sketchModeSelect[VIAS_VISIBLE] = !aOptions.DisplayViaFill; - m_sketchModeSelect[TRACKS_VISIBLE] = !aOptions.DisplayPcbTrackFill; + m_sketchModeSelect[PADS_VISIBLE] = !aOptions.DisplayPadFill; + m_sketchModeSelect[VIA_THROUGH_VISIBLE] = !aOptions.DisplayViaFill; + m_sketchModeSelect[TRACKS_VISIBLE] = !aOptions.DisplayPcbTrackFill; switch( aOptions.DisplayNetNamesMode ) { @@ -328,7 +328,7 @@ void PCB_PAINTER::draw( const SEGVIA* aVia, int aLayer ) double radius; // Choose drawing settings depending on if we are drawing via's pad or hole - if( aLayer == ITEM_GAL_LAYER( VIAS_VISIBLE ) ) + if( aLayer == ITEM_GAL_LAYER( VIA_THROUGH_VISIBLE ) ) { radius = aVia->GetWidth() / 2.0; } @@ -341,7 +341,7 @@ void PCB_PAINTER::draw( const SEGVIA* aVia, int aLayer ) const COLOR4D& color = m_pcbSettings->GetColor( aVia, aLayer ); - if( m_pcbSettings->m_sketchModeSelect[VIAS_VISIBLE] ) + if( m_pcbSettings->m_sketchModeSelect[VIA_THROUGH_VISIBLE] ) { // Outline mode m_gal->SetIsFill( false ); diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 9758f82f6f..0d56f1a634 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -879,7 +879,7 @@ void PCB_EDIT_FRAME::setHighContrastLayer( LAYER_NUM aLayer ) // fixme do not like the idea of storing the list of layers here, // should be done in some other way I guess.. LAYER_NUM layers[] = { - GetNetnameLayer( aLayer ), ITEM_GAL_LAYER( VIAS_VISIBLE ), + GetNetnameLayer( aLayer ), ITEM_GAL_LAYER( VIA_THROUGH_VISIBLE ), ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), NETNAMES_GAL_LAYER( PADS_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( GP_OVERLAY ), ITEM_GAL_LAYER( RATSNEST_VISIBLE ) @@ -919,7 +919,7 @@ void PCB_EDIT_FRAME::SetTopLayer( LAYER_NUM aLayer ) // fixme do not like the idea of storing the list of layers here, // should be done in some other way I guess.. LAYER_NUM layers[] = { - GetNetnameLayer( aLayer ), ITEM_GAL_LAYER( VIAS_VISIBLE ), + GetNetnameLayer( aLayer ), ITEM_GAL_LAYER( VIA_THROUGH_VISIBLE ), ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), NETNAMES_GAL_LAYER( PADS_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( GP_OVERLAY ), ITEM_GAL_LAYER( RATSNEST_VISIBLE ), DRAW_N diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index a1eddfca16..41bb93340a 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -80,8 +80,8 @@ int DRAWING_TOOL::DrawCircle( TOOL_EVENT& aEvent ) int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) { - bool clockwise = true; // drawing direction of the arc - double startAngle; // angle of the first arc line + bool clockwise = true; // drawing direction of the arc + double startAngle = 0.0f; // angle of the first arc line VECTOR2I cursorPos = m_controls->GetCursorPosition(); DRAWSEGMENT* arc = NULL; From d2ed2efc85f7b48c459670ecd32a4b32f331edf5 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 11 Mar 2014 14:50:53 +0100 Subject: [PATCH 161/741] Workarounded SWIG problems (does not support nested C++ classes, more on the subject: http://www.swig.org/Doc1.3/SWIGPlus.html#SWIGPlus_nested_classes). --- pcbnew/class_board.h | 2 ++ pcbnew/class_netinfo.h | 15 ++++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/pcbnew/class_board.h b/pcbnew/class_board.h index cac0f66ffd..92058d0af6 100644 --- a/pcbnew/class_board.h +++ b/pcbnew/class_board.h @@ -871,6 +871,7 @@ public: m_NetInfo.AppendNet( aNewNet ); } +#ifndef SWIG /** * Function BeginNets * @return iterator to the first element of the NETINFO_ITEMs list @@ -888,6 +889,7 @@ public: { return m_NetInfo.end(); } +#endif /** * Function GetNetCount diff --git a/pcbnew/class_netinfo.h b/pcbnew/class_netinfo.h index f566926fcc..64e6e9f8b8 100644 --- a/pcbnew/class_netinfo.h +++ b/pcbnew/class_netinfo.h @@ -145,6 +145,7 @@ public: */ int Translate( int aNetCode ) const; +#ifndef SWIG ///> Wrapper class, so you can iterate through NETINFO_ITEM*s, not ///> std::pair class iterator @@ -212,6 +213,7 @@ public: { return iterator( m_netMapping.end(), this ); } +#endif /** * Function GetSize @@ -329,6 +331,7 @@ public: typedef boost::unordered_map NETNAMES_MAP; typedef boost::unordered_map NETCODES_MAP; +#ifndef SWIG ///> Wrapper class, so you can iterate through NETINFO_ITEM*s, not ///> std::pair class iterator @@ -388,6 +391,7 @@ public: { return iterator( m_netNames.end() ); } +#endif private: /** @@ -438,25 +442,22 @@ class NETINFO_ITEM friend class NETINFO_LIST; private: - const int m_NetCode; ///< A number equivalent to the net name. + int m_NetCode; ///< A number equivalent to the net name. ///< Used for fast comparisons in ratsnest and DRC computations. - const wxString m_Netname; ///< Full net name like /mysheet/mysubsheet/vout - ///< used by Eeschema + wxString m_Netname; ///< Full net name like /mysheet/mysubsheet/vout used by Eeschema - const wxString m_ShortNetname; // short net name, like vout from - // /mysheet/mysubsheet/vout + wxString m_ShortNetname; ///< short net name, like vout from /mysheet/mysubsheet/vout wxString m_NetClassName; // Net Class name. if void this is equivalent // to "default" (the first // item of the net classes list - NETCLASS* m_NetClass; BOARD_ITEM* m_parent; ///< The parent board item object the net belongs to. public: - std::vector m_PadInNetList; // List of pads connected to this net + std::vector m_PadInNetList; ///< List of pads connected to this net unsigned m_RatsnestStartIdx; /* Starting point of ratsnests of this * net (included) in a general buffer of From 66fcb84f9240fa6e26054cb5877d51ccac16565d Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 12 Mar 2014 10:05:09 +0100 Subject: [PATCH 162/741] Minor fix to SEG class. --- include/geometry/seg.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/include/geometry/seg.h b/include/geometry/seg.h index b400930ef2..7e789f9d21 100644 --- a/include/geometry/seg.h +++ b/include/geometry/seg.h @@ -46,7 +46,8 @@ public: * to an object the segment belongs to (e.g. a line chain) or references to locally stored * points (m_a, m_b). */ - VECTOR2I& A, B; + VECTOR2I& A; + VECTOR2I& B; /** Default constructor * Creates an empty (0, 0) segment, locally-referenced @@ -203,6 +204,8 @@ public: bool Collide( const SEG& aSeg, int aClearance ) const; + ecoord SquaredDistance( const SEG& aSeg ) const; + /** * Function Distance() * @@ -210,14 +213,16 @@ public: * @param aSeg other segment * @return minimum distance */ - - ecoord SquaredDistance( const SEG& aSeg ) const; - int Distance( const SEG& aSeg ) const { return sqrt( SquaredDistance( aSeg ) ); } + ecoord SquaredDistance( const VECTOR2I& aP ) const + { + return ( NearestPoint( aP ) - aP ).SquaredEuclideanNorm(); + } + /** * Function Distance() * @@ -225,11 +230,6 @@ public: * @param aP the point * @return minimum distance */ - ecoord SquaredDistance( const VECTOR2I& aP ) const - { - return ( NearestPoint( aP ) - aP ).SquaredEuclideanNorm(); - } - int Distance( const VECTOR2I& aP ) const { return sqrt( SquaredDistance( aP ) ); From e6571f686204086584be1a37afb0f75c0995128f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 12 Mar 2014 10:46:11 +0100 Subject: [PATCH 163/741] Added new constraint for EDIT_POINTs (EPC_LINE). Dimensions have EDIT_POINTs. Different handling of 45 degree mode in POINT_EDITOR. --- pcbnew/class_dimension.cpp | 40 +++++++------ pcbnew/class_dimension.h | 34 +++++++---- pcbnew/pcb_parser.cpp | 3 + pcbnew/tools/edit_points.cpp | 38 ++++++++++++- pcbnew/tools/edit_points.h | 57 +++++++++++++++++++ pcbnew/tools/point_editor.cpp | 103 ++++++++++++++++++++++++++++++---- 6 files changed, 235 insertions(+), 40 deletions(-) diff --git a/pcbnew/class_dimension.cpp b/pcbnew/class_dimension.cpp index 3a56797468..47cb98b4e4 100644 --- a/pcbnew/class_dimension.cpp +++ b/pcbnew/class_dimension.cpp @@ -47,13 +47,9 @@ DIMENSION::DIMENSION( BOARD_ITEM* aParent ) : BOARD_ITEM( aParent, PCB_DIMENSION_T ), - m_Text( this ) + m_Width( Millimeter2iu( 0.2 ) ), m_Unit( INCHES ), m_Value( 0 ), m_Height( 0 ), m_Text( this ) { m_Layer = DRAW_N; - m_Width = Millimeter2iu( 0.2 ); - m_Value = 0; - m_Shape = 0; - m_Unit = INCHES; } @@ -99,6 +95,7 @@ void DIMENSION::Copy( DIMENSION* source ) SetLayer( source->GetLayer() ); m_Width = source->m_Width; m_Shape = source->m_Shape; + m_Height = source->m_Height; m_Unit = source->m_Unit; SetTimeStamp( GetNewTimeStamp() ); m_Text.Copy( &source->m_Text ); @@ -195,7 +192,6 @@ void DIMENSION::Mirror( const wxPoint& axis_pos ) void DIMENSION::SetOrigin( const wxPoint& aOrigin ) { - m_crossBarO = aOrigin; m_featureLineGO = aOrigin; AdjustDimensionDetails(); @@ -204,29 +200,32 @@ void DIMENSION::SetOrigin( const wxPoint& aOrigin ) void DIMENSION::SetEnd( const wxPoint& aEnd ) { - m_crossBarF = aEnd; m_featureLineDO = aEnd; AdjustDimensionDetails(); } -void DIMENSION::SetHeight( double aHeight ) +void DIMENSION::SetHeight( int aHeight ) { - /* Calculating the direction of travel perpendicular to the selected axis. */ - double angle = GetAngle() + ( M_PI / 2 ); - - int dx = KiROUND( aHeight * cos( angle ) ); - int dy = KiROUND( aHeight * sin( angle ) ); - m_crossBarO.x = m_featureLineGO.x + dx; - m_crossBarO.y = m_featureLineGO.y + dy; - m_crossBarF.x = m_featureLineDO.x + dx; - m_crossBarF.y = m_featureLineDO.y + dy; + m_Height = aHeight; AdjustDimensionDetails(); } +void DIMENSION::UpdateHeight() +{ + VECTOR2D featureLine( m_crossBarO - m_featureLineGO ); + VECTOR2D crossBar( m_featureLineDO - m_featureLineGO ); + + if( featureLine.Cross( crossBar ) > 0 ) + m_Height = -featureLine.EuclideanNorm(); + else + m_Height = featureLine.EuclideanNorm(); +} + + void DIMENSION::AdjustDimensionDetails( bool aDoNotChangeText ) { const int arrowz = DMils2iu( 500 ); // size of arrows @@ -281,6 +280,13 @@ void DIMENSION::AdjustDimensionDetails( bool aDoNotChangeText ) arrow_dw_Y = wxRound( arrowz * sin( angle_f ) ); } + int dx = KiROUND( m_Height * cos( angle + M_PI / 2 ) ); + int dy = KiROUND( m_Height * sin( angle + M_PI / 2 ) ); + m_crossBarO.x = m_featureLineGO.x + dx; + m_crossBarO.y = m_featureLineGO.y + dy; + m_crossBarF.x = m_featureLineDO.x + dx; + m_crossBarF.y = m_featureLineDO.y + dy; + m_arrowG1F.x = m_crossBarO.x + arrow_up_X; m_arrowG1F.y = m_crossBarO.y + arrow_up_Y; diff --git a/pcbnew/class_dimension.h b/pcbnew/class_dimension.h index 2992991505..956c7e4480 100644 --- a/pcbnew/class_dimension.h +++ b/pcbnew/class_dimension.h @@ -61,14 +61,13 @@ class MSG_PANEL_ITEM; */ class DIMENSION : public BOARD_ITEM { - int m_Width; - int m_Shape; // / Currently always 0. - int m_Unit; // / 0 = inches, 1 = mm - int m_Value; // / value of PCB dimensions. - + int m_Width; ///< Line width + int m_Shape; ///< Currently always 0. + EDA_UNITS_T m_Unit; ///< 0 = inches, 1 = mm + int m_Value; ///< value of PCB dimensions. + int m_Height; ///< length of feature lines TEXTE_PCB m_Text; - public: // TODO private: These member should be private. they are public only due to legacy code wxPoint m_crossBarO, m_crossBarF; @@ -117,7 +116,7 @@ public: */ const wxPoint& GetOrigin() const { - return m_crossBarO; + return m_featureLineGO; } /** @@ -133,7 +132,7 @@ public: */ const wxPoint& GetEnd() { - return m_crossBarF; + return m_featureLineDO; } /** @@ -141,12 +140,27 @@ public: * Sets the length of feature lines. * @param aHeight is the new height. */ - void SetHeight( double aHeight ); + void SetHeight( int aHeight ); + + /** + * Function GetHeight + * Returns the length of feature lines. + */ + int GetHeight() const + { + return m_Height; + } + + /** + * Function UpdateHeight + * Updates stored height basing on points coordinates. + */ + void UpdateHeight(); /** * Function GetAngle * Returns angle of the crossbar. - * @return Angle of the crossbar line. + * @return Angle of the crossbar line expressed in radians. */ double GetAngle() const { diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index f82814311e..70e3295f17 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -1438,6 +1438,7 @@ DIMENSION* PCB_PARSER::parseDIMENSION() throw( IO_ERROR, PARSE_ERROR ) parseXY( &dimension->m_featureLineDO.x, &dimension->m_featureLineDO.y ); parseXY( &dimension->m_featureLineDF.x, &dimension->m_featureLineDF.y ); + dimension->UpdateHeight(); NeedRIGHT(); NeedRIGHT(); break; @@ -1451,6 +1452,7 @@ DIMENSION* PCB_PARSER::parseDIMENSION() throw( IO_ERROR, PARSE_ERROR ) parseXY( &dimension->m_featureLineGO.x, &dimension->m_featureLineGO.y ); parseXY( &dimension->m_featureLineGF.x, &dimension->m_featureLineGF.y ); + dimension->UpdateHeight(); NeedRIGHT(); NeedRIGHT(); break; @@ -1465,6 +1467,7 @@ DIMENSION* PCB_PARSER::parseDIMENSION() throw( IO_ERROR, PARSE_ERROR ) parseXY( &dimension->m_crossBarO.x, &dimension->m_crossBarO.y ); parseXY( &dimension->m_crossBarF.x, &dimension->m_crossBarF.y ); + dimension->UpdateHeight(); NeedRIGHT(); NeedRIGHT(); break; diff --git a/pcbnew/tools/edit_points.cpp b/pcbnew/tools/edit_points.cpp index 39102b470a..000da9cb83 100644 --- a/pcbnew/tools/edit_points.cpp +++ b/pcbnew/tools/edit_points.cpp @@ -31,7 +31,7 @@ bool EDIT_POINT::WithinPoint( const VECTOR2I& aPoint, unsigned int aSize ) const { - // Corners of the square + // Corners of the EDIT_POINT square VECTOR2I topLeft = GetPosition() - aSize; VECTOR2I bottomRight = GetPosition() + aSize; @@ -162,6 +162,42 @@ void EPC_45DEGREE::Apply() } +EPC_LINE::EPC_LINE( EDIT_POINT& aConstrained, EDIT_POINT& aConstrainer ) : + EDIT_POINT_CONSTRAINT( aConstrained ), m_constrainer( aConstrainer ) +{ + Update(); +} + + +void EPC_LINE::Apply() +{ + VECTOR2I position = m_constrained.GetPosition(); + + if( std::isfinite( m_coefA ) ) + { + if( abs( m_coefA ) < 1 ) + position.y = m_coefA * position.x + m_coefB; + else + position.x = ( position.y - m_coefB ) / m_coefA; + } + else // vertical line + { + position.x = m_constrainer.GetX(); + } + + m_constrained.SetPosition( position ); +} + + +void EPC_LINE::Update() +{ + // Compute line coefficients + VECTOR2D delta = m_constrainer.GetPosition() - m_constrained.GetPosition(); + m_coefA = delta.y / delta.x; + m_coefB = m_constrainer.GetY() - m_coefA * m_constrainer.GetX(); +} + + void EPC_CIRCLE::Apply() { VECTOR2I centerToEnd = m_end.GetPosition() - m_center.GetPosition(); diff --git a/pcbnew/tools/edit_points.h b/pcbnew/tools/edit_points.h index bdcf5ec55a..1dd0f17014 100644 --- a/pcbnew/tools/edit_points.h +++ b/pcbnew/tools/edit_points.h @@ -97,6 +97,26 @@ public: return m_position; } + /** + * Function GetX() + * + * Returns X coordinate of an EDIT_POINT. + */ + int GetX() const + { + return GetPosition().x; + } + + /** + * Function GetX() + * + * Returns Y coordinate of an EDIT_POINT. + */ + int GetY() const + { + return GetPosition().y; + } + /** * Function SetPosition() * @@ -132,6 +152,17 @@ public: m_constraint = aConstraint; } + /** + * Function GetConstraint() + * + * Returns the constraint imposed on an EDIT_POINT. If there are no constraints, NULL is + * returned. + */ + EDIT_POINT_CONSTRAINT* GetConstraint() const + { + return m_constraint; + } + /** * Function ClearConstraint() * @@ -468,6 +499,32 @@ private: }; +/** + * Class EPC_LINE + * + * EDIT_POINT_CONSTRAINT that imposes a constraint that a point has to lie on a line (determined + * by 2 points). + */ +class EPC_LINE : public EDIT_POINT_CONSTRAINT +{ +public: + EPC_LINE( EDIT_POINT& aConstrained, EDIT_POINT& aConstrainer ); + + ///> @copydoc EDIT_POINT_CONSTRAINT::Apply() + virtual void Apply(); + + /** + * Function Update() + * Updates line coefficients that make the constraining line. + */ + void Update(); + +private: + EDIT_POINT& m_constrainer; ///< Point that imposes the constraint. + double m_coefA, m_coefB; +}; + + /** * Class EPC_CIRCLE. * diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp index 4415aae5a0..bd06e2306c 100644 --- a/pcbnew/tools/point_editor.cpp +++ b/pcbnew/tools/point_editor.cpp @@ -35,6 +35,7 @@ #include #include +#include #include /** @@ -60,8 +61,8 @@ public: switch( segment->GetShape() ) { case S_SEGMENT: - points->AddPoint( segment->GetStart() ); - points->AddPoint( segment->GetEnd() ); + points->AddPoint( segment->GetStart() ); // points[0] + points->AddPoint( segment->GetEnd() ); // points[1] break; case S_ARC: @@ -75,8 +76,8 @@ public: break; case S_CIRCLE: - points->AddPoint( segment->GetCenter() ); - points->AddPoint( segment->GetEnd() ); + points->AddPoint( segment->GetCenter() ); // points[0] + points->AddPoint( segment->GetEnd() ); // points[1] break; default: // suppress warnings @@ -98,8 +99,23 @@ public: for( int i = 0; i < cornersCount - 1; ++i ) points->AddLine( (*points)[i], (*points)[i + 1] ); - // The one missing line + // The last missing line, connecting the last and the first polygon point points->AddLine( (*points)[cornersCount - 1], (*points)[0] ); + break; + } + + case PCB_DIMENSION_T: + { + const DIMENSION* dimension = static_cast( aItem ); + + points->AddPoint( dimension->m_featureLineGO ); + points->AddPoint( dimension->m_featureLineDO ); + points->AddPoint( dimension->m_crossBarO ); + points->AddPoint( dimension->m_crossBarF ); + + // Dimension height setting - edit points should move only along the feature lines + (*points)[2].SetConstraint( new EPC_LINE( (*points)[2], (*points)[0] ) ); + (*points)[3].SetConstraint( new EPC_LINE( (*points)[3], (*points)[1] ) ); break; } @@ -118,7 +134,7 @@ private: POINT_EDITOR::POINT_EDITOR() : - TOOL_INTERACTIVE( "pcbnew.PointEditor" ), m_selectionTool( NULL ) + TOOL_INTERACTIVE( "pcbnew.PointEditor" ), m_selectionTool( NULL ), m_dragPoint( NULL ) { } @@ -159,6 +175,7 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) PCB_EDIT_FRAME* editFrame = getEditFrame(); EDA_ITEM* item = selection.items.GetPickedItem( 0 ); EDIT_POINT constrainer( VECTOR2I( 0, 0 ) ); + bool degree45 = false; // 45 degree mode m_editPoints = EDIT_POINTS_FACTORY::Make( item ); if( !m_editPoints ) @@ -218,18 +235,20 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) modified = true; } - if( evt->Modifier( MD_CTRL ) ) // 45 degrees mode + if( evt->Modifier( MD_CTRL ) != degree45 ) // 45 degrees mode { - if( !m_dragPoint->IsConstrained() ) + degree45 = evt->Modifier( MD_CTRL ); + + if( degree45 ) { // Find a proper constraining point for 45 degrees mode constrainer = get45DegConstrainer(); m_dragPoint->SetConstraint( new EPC_45DEGREE( *m_dragPoint, constrainer ) ); } - } - else - { - m_dragPoint->ClearConstraint(); + else + { + m_dragPoint->ClearConstraint(); + } } m_dragPoint->SetPosition( controls->GetCursorPosition() ); @@ -387,6 +406,47 @@ void POINT_EDITOR::updateItem() const break; } + case PCB_DIMENSION_T: + { + DIMENSION* dimension = static_cast( item ); + + // Check which point is currently modified and updated dimension's points respectively + if( isModified( (*m_editPoints)[0] ) ) + { + dimension->SetOrigin( wxPoint( m_dragPoint->GetPosition().x, m_dragPoint->GetPosition().y ) ); + static_cast( (*m_editPoints)[2].GetConstraint() )->Update(); + static_cast( (*m_editPoints)[3].GetConstraint() )->Update(); + } + else if( isModified( (*m_editPoints)[1] ) ) + { + dimension->SetEnd( wxPoint( m_dragPoint->GetPosition().x, m_dragPoint->GetPosition().y ) ); + static_cast( (*m_editPoints)[2].GetConstraint() )->Update(); + static_cast( (*m_editPoints)[3].GetConstraint() )->Update(); + } + else if( isModified( (*m_editPoints)[2] ) ) + { + VECTOR2D featureLine( m_dragPoint->GetPosition() - dimension->GetOrigin() ); + VECTOR2D crossBar( dimension->GetEnd() - dimension->GetOrigin() ); + + if( featureLine.Cross( crossBar ) > 0 ) + dimension->SetHeight( -featureLine.EuclideanNorm() ); + else + dimension->SetHeight( featureLine.EuclideanNorm() ); + } + else if( isModified( (*m_editPoints)[3] ) ) + { + VECTOR2D featureLine( m_dragPoint->GetPosition() - dimension->GetEnd() ); + VECTOR2D crossBar( dimension->GetEnd() - dimension->GetOrigin() ); + + if( featureLine.Cross( crossBar ) > 0 ) + dimension->SetHeight( -featureLine.EuclideanNorm() ); + else + dimension->SetHeight( featureLine.EuclideanNorm() ); + } + + break; + } + default: break; } @@ -454,6 +514,17 @@ void POINT_EDITOR::updatePoints() const break; } + case PCB_DIMENSION_T: + { + const DIMENSION* dimension = static_cast( item ); + + (*m_editPoints)[0].SetPosition( dimension->m_featureLineGO ); + (*m_editPoints)[1].SetPosition( dimension->m_featureLineDO ); + (*m_editPoints)[2].SetPosition( dimension->m_crossBarO ); + (*m_editPoints)[3].SetPosition( dimension->m_crossBarF ); + break; + } + default: break; } @@ -482,6 +553,14 @@ EDIT_POINT POINT_EDITOR::get45DegConstrainer() const } } } + else if( item->Type() == PCB_DIMENSION_T ) + { + // Constraint for crossbar + if( isModified( (*m_editPoints)[0] ) ) + return (*m_editPoints)[1]; + else if( isModified( (*m_editPoints)[1] ) ) + return (*m_editPoints)[0]; + } // In any other case we may align item to the current cursor position. return EDIT_POINT( getViewControls()->GetCursorPosition() ); From e5b0c720ed087f6d7cc74d4e4b981d3065daf006 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 12 Mar 2014 10:53:42 +0100 Subject: [PATCH 164/741] Switched order of EDIT_POINTs for DIMENSION, so in case when feature lines are of 0 length, then still can be stretched. --- pcbnew/tools/point_editor.cpp | 54 +++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp index bd06e2306c..f0bb4f5496 100644 --- a/pcbnew/tools/point_editor.cpp +++ b/pcbnew/tools/point_editor.cpp @@ -108,14 +108,14 @@ public: { const DIMENSION* dimension = static_cast( aItem ); - points->AddPoint( dimension->m_featureLineGO ); - points->AddPoint( dimension->m_featureLineDO ); points->AddPoint( dimension->m_crossBarO ); points->AddPoint( dimension->m_crossBarF ); + points->AddPoint( dimension->m_featureLineGO ); + points->AddPoint( dimension->m_featureLineDO ); // Dimension height setting - edit points should move only along the feature lines - (*points)[2].SetConstraint( new EPC_LINE( (*points)[2], (*points)[0] ) ); - (*points)[3].SetConstraint( new EPC_LINE( (*points)[3], (*points)[1] ) ); + (*points)[0].SetConstraint( new EPC_LINE( (*points)[0], (*points)[2] ) ); + (*points)[1].SetConstraint( new EPC_LINE( (*points)[1], (*points)[3] ) ); break; } @@ -412,18 +412,6 @@ void POINT_EDITOR::updateItem() const // Check which point is currently modified and updated dimension's points respectively if( isModified( (*m_editPoints)[0] ) ) - { - dimension->SetOrigin( wxPoint( m_dragPoint->GetPosition().x, m_dragPoint->GetPosition().y ) ); - static_cast( (*m_editPoints)[2].GetConstraint() )->Update(); - static_cast( (*m_editPoints)[3].GetConstraint() )->Update(); - } - else if( isModified( (*m_editPoints)[1] ) ) - { - dimension->SetEnd( wxPoint( m_dragPoint->GetPosition().x, m_dragPoint->GetPosition().y ) ); - static_cast( (*m_editPoints)[2].GetConstraint() )->Update(); - static_cast( (*m_editPoints)[3].GetConstraint() )->Update(); - } - else if( isModified( (*m_editPoints)[2] ) ) { VECTOR2D featureLine( m_dragPoint->GetPosition() - dimension->GetOrigin() ); VECTOR2D crossBar( dimension->GetEnd() - dimension->GetOrigin() ); @@ -433,7 +421,8 @@ void POINT_EDITOR::updateItem() const else dimension->SetHeight( featureLine.EuclideanNorm() ); } - else if( isModified( (*m_editPoints)[3] ) ) + + else if( isModified( (*m_editPoints)[1] ) ) { VECTOR2D featureLine( m_dragPoint->GetPosition() - dimension->GetEnd() ); VECTOR2D crossBar( dimension->GetEnd() - dimension->GetOrigin() ); @@ -444,6 +433,20 @@ void POINT_EDITOR::updateItem() const dimension->SetHeight( featureLine.EuclideanNorm() ); } + else if( isModified( (*m_editPoints)[2] ) ) + { + dimension->SetOrigin( wxPoint( m_dragPoint->GetPosition().x, m_dragPoint->GetPosition().y ) ); + static_cast( (*m_editPoints)[0].GetConstraint() )->Update(); + static_cast( (*m_editPoints)[1].GetConstraint() )->Update(); + } + + else if( isModified( (*m_editPoints)[3] ) ) + { + dimension->SetEnd( wxPoint( m_dragPoint->GetPosition().x, m_dragPoint->GetPosition().y ) ); + static_cast( (*m_editPoints)[0].GetConstraint() )->Update(); + static_cast( (*m_editPoints)[1].GetConstraint() )->Update(); + } + break; } @@ -518,10 +521,10 @@ void POINT_EDITOR::updatePoints() const { const DIMENSION* dimension = static_cast( item ); - (*m_editPoints)[0].SetPosition( dimension->m_featureLineGO ); - (*m_editPoints)[1].SetPosition( dimension->m_featureLineDO ); - (*m_editPoints)[2].SetPosition( dimension->m_crossBarO ); - (*m_editPoints)[3].SetPosition( dimension->m_crossBarF ); + (*m_editPoints)[0].SetPosition( dimension->m_crossBarO ); + (*m_editPoints)[1].SetPosition( dimension->m_crossBarF ); + (*m_editPoints)[2].SetPosition( dimension->m_featureLineGO ); + (*m_editPoints)[3].SetPosition( dimension->m_featureLineDO ); break; } @@ -556,10 +559,11 @@ EDIT_POINT POINT_EDITOR::get45DegConstrainer() const else if( item->Type() == PCB_DIMENSION_T ) { // Constraint for crossbar - if( isModified( (*m_editPoints)[0] ) ) - return (*m_editPoints)[1]; - else if( isModified( (*m_editPoints)[1] ) ) - return (*m_editPoints)[0]; + if( isModified( (*m_editPoints)[2] ) ) + return (*m_editPoints)[3]; + + else if( isModified( (*m_editPoints)[3] ) ) + return (*m_editPoints)[2]; } // In any other case we may align item to the current cursor position. From 55f9aaabd7ff5215b32a91c9175677a6b9512627 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 12 Mar 2014 14:58:49 +0100 Subject: [PATCH 165/741] Workarounded SWIG problems (does not support nested C++ classes, more on the subject: http://www.swig.org/Doc1.3/SWIGPlus.html#SWIGPlus_nested_classes). --- pcbnew/class_board.h | 2 ++ pcbnew/class_netinfo.h | 15 ++++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/pcbnew/class_board.h b/pcbnew/class_board.h index cac0f66ffd..92058d0af6 100644 --- a/pcbnew/class_board.h +++ b/pcbnew/class_board.h @@ -871,6 +871,7 @@ public: m_NetInfo.AppendNet( aNewNet ); } +#ifndef SWIG /** * Function BeginNets * @return iterator to the first element of the NETINFO_ITEMs list @@ -888,6 +889,7 @@ public: { return m_NetInfo.end(); } +#endif /** * Function GetNetCount diff --git a/pcbnew/class_netinfo.h b/pcbnew/class_netinfo.h index f566926fcc..64e6e9f8b8 100644 --- a/pcbnew/class_netinfo.h +++ b/pcbnew/class_netinfo.h @@ -145,6 +145,7 @@ public: */ int Translate( int aNetCode ) const; +#ifndef SWIG ///> Wrapper class, so you can iterate through NETINFO_ITEM*s, not ///> std::pair class iterator @@ -212,6 +213,7 @@ public: { return iterator( m_netMapping.end(), this ); } +#endif /** * Function GetSize @@ -329,6 +331,7 @@ public: typedef boost::unordered_map NETNAMES_MAP; typedef boost::unordered_map NETCODES_MAP; +#ifndef SWIG ///> Wrapper class, so you can iterate through NETINFO_ITEM*s, not ///> std::pair class iterator @@ -388,6 +391,7 @@ public: { return iterator( m_netNames.end() ); } +#endif private: /** @@ -438,25 +442,22 @@ class NETINFO_ITEM friend class NETINFO_LIST; private: - const int m_NetCode; ///< A number equivalent to the net name. + int m_NetCode; ///< A number equivalent to the net name. ///< Used for fast comparisons in ratsnest and DRC computations. - const wxString m_Netname; ///< Full net name like /mysheet/mysubsheet/vout - ///< used by Eeschema + wxString m_Netname; ///< Full net name like /mysheet/mysubsheet/vout used by Eeschema - const wxString m_ShortNetname; // short net name, like vout from - // /mysheet/mysubsheet/vout + wxString m_ShortNetname; ///< short net name, like vout from /mysheet/mysubsheet/vout wxString m_NetClassName; // Net Class name. if void this is equivalent // to "default" (the first // item of the net classes list - NETCLASS* m_NetClass; BOARD_ITEM* m_parent; ///< The parent board item object the net belongs to. public: - std::vector m_PadInNetList; // List of pads connected to this net + std::vector m_PadInNetList; ///< List of pads connected to this net unsigned m_RatsnestStartIdx; /* Starting point of ratsnests of this * net (included) in a general buffer of From c7e3887ba47d2c0b9b863e5631e58d0a59ba160f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 12 Mar 2014 15:00:14 +0100 Subject: [PATCH 166/741] Fixed erroneous hit testing for polygons in ratsnest for GAL. --- pcbnew/ratsnest_data.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pcbnew/ratsnest_data.cpp b/pcbnew/ratsnest_data.cpp index 6b9d2b043a..2845e04475 100644 --- a/pcbnew/ratsnest_data.cpp +++ b/pcbnew/ratsnest_data.cpp @@ -356,8 +356,8 @@ bool RN_POLY::HitTest( const RN_NODE_PTR& aNode ) const x2 = xOld; y2 = yOld; } - if( ( xNew < xt ) == ( xt <= xOld ) /* edge "open" at left end */ - && ( yt - y1 ) * ( x2 - x1 ) < ( y2 - y1 ) * ( xt - x1 ) ) + if( ( xNew < xt ) == ( xt <= xOld ) && /* edge "open" at left end */ + (float)( yt - y1 ) * (float)( x2 - x1 ) < (float)( y2 - y1 ) * (float)( xt - x1 ) ) { inside = !inside; } From 1e04f3b948bef7da3241ff8c966bd59d6e2bc87f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 12 Mar 2014 15:53:20 +0100 Subject: [PATCH 167/741] Removed excessive variable (m_Corners) from MARKER_BASE. --- common/class_marker_base.cpp | 11 +++++------ include/class_marker_base.h | 1 - 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/common/class_marker_base.cpp b/common/class_marker_base.cpp index b8aa30a058..6e54012fd4 100644 --- a/common/class_marker_base.cpp +++ b/common/class_marker_base.cpp @@ -19,8 +19,8 @@ // Default marquer shape: -#define M_SHAPE_SCALE 6 // default scaling factor for MarkerShapeCorners coordinates -#define CORNERS_COUNT 8 +const int M_SHAPE_SCALE = 6; // default scaling factor for MarkerShapeCorners coordinates +const int CORNERS_COUNT = 8; /* corners of the default shape * actual coordinates are these values * .m_ScalingFactor */ @@ -46,10 +46,10 @@ void MARKER_BASE::init() m_Color = RED; wxPoint start = MarkerShapeCorners[0]; wxPoint end = MarkerShapeCorners[0]; + for( unsigned ii = 0; ii < CORNERS_COUNT; ii++ ) { wxPoint corner = MarkerShapeCorners[ii]; - m_Corners.push_back( corner ); start.x = std::min( start.x, corner.x); start.y = std::min( start.y, corner.y); end.x = std::max( end.x, corner.x); @@ -64,7 +64,6 @@ void MARKER_BASE::init() MARKER_BASE::MARKER_BASE( const MARKER_BASE& aMarker ) { m_Pos = aMarker.m_Pos; - m_Corners = aMarker.m_Corners; m_MarkerType = aMarker.m_MarkerType; m_Color = aMarker.m_Color; m_ShapeBoundingBox = aMarker.m_ShapeBoundingBox; @@ -154,9 +153,9 @@ void MARKER_BASE::DrawMarker( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDr GRSetDrawMode( aDC, aDrawMode ); - for( unsigned ii = 0; ii < m_Corners.size(); ii++ ) + for( unsigned ii = 0; ii < CORNERS_COUNT; ii++ ) { - corners[ii] = m_Corners[ii]; + corners[ii] = MarkerShapeCorners[ii]; corners[ii].x *= m_ScalingFactor; corners[ii].y *= m_ScalingFactor; corners[ii] += m_Pos + aOffset; diff --git a/include/class_marker_base.h b/include/class_marker_base.h index bcc1d66337..d76b114b03 100644 --- a/include/class_marker_base.h +++ b/include/class_marker_base.h @@ -13,7 +13,6 @@ class MARKER_BASE public: wxPoint m_Pos; ///< position of the marker protected: - std::vector m_Corners; ///< Corner list for shape definition (a polygon) int m_MarkerType; ///< Can be used as a flag EDA_COLOR_T m_Color; ///< color EDA_RECT m_ShapeBoundingBox; ///< Bounding box of the graphic symbol, relative From c7fa57faf616023f4079dbb790adcf59aa14082b Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 12 Mar 2014 17:09:37 +0100 Subject: [PATCH 168/741] Changed the way of handling BOX2 traits (used std::numeric_limits). --- include/math/box2.h | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/include/math/box2.h b/include/math/box2.h index 8ed1621935..467558e676 100644 --- a/include/math/box2.h +++ b/include/math/box2.h @@ -28,24 +28,9 @@ #define __BOX2_H #include +#include -template -class BOX2_TRAITS -{ -}; - -template <> -class BOX2_TRAITS -{ -public: - enum - { - c_max_size = INT_MAX - 1, - c_min_coord_value = INT_MIN / 2 + 1 - }; -}; - /** * Class BOX2 * handles a 2-D bounding box, built on top of an origin point @@ -59,8 +44,9 @@ private: Vec m_Size; // Rectangle Size public: - typedef typename Vec::coord_type coord_type; - typedef typename Vec::extended_type ecoord_type; + typedef typename Vec::coord_type coord_type; + typedef typename Vec::extended_type ecoord_type; + typedef typename std::numeric_limits coord_limits; BOX2() {}; @@ -73,8 +59,8 @@ public: void SetMaximum() { - m_Pos.x = m_Pos.y = BOX2_TRAITS().c_min_coord_value; - m_Size.x = m_Size.y = BOX2_TRAITS().c_max_size; + m_Pos.x = m_Pos.y = coord_limits::min() / 2 + coord_limits::epsilon(); + m_Size.x = m_Size.y = coord_limits::max() - coord_limits::epsilon(); } Vec Centre() const From afc56d3f6f121f049ceffe611d3b97246636fe14 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 12 Mar 2014 17:09:53 +0100 Subject: [PATCH 169/741] Moved panning boundaries and scale limits from VIEW to VIEW_CONTROL. --- common/view/view.cpp | 22 +------------- common/view/wx_view_controls.cpp | 44 +++++++++++++++++++++++++--- include/view/view.h | 29 ------------------ include/view/view_controls.h | 50 ++++++++++++++++++++++++++++---- pcbnew/pcbframe.cpp | 3 +- 5 files changed, 87 insertions(+), 61 deletions(-) diff --git a/common/view/view.cpp b/common/view/view.cpp index 3cf57a210b..b28b0a1c32 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -45,10 +45,8 @@ VIEW::VIEW( bool aIsDynamic ) : m_scale( 1.0 ), m_painter( NULL ), m_gal( NULL ), - m_dynamic( aIsDynamic ), - m_scaleLimits( 15000.0, 1.0 ) + m_dynamic( aIsDynamic ) { - m_panBoundary.SetMaximum(); m_needsUpdate.reserve( 32768 ); // Redraw everything at the beginning @@ -295,11 +293,6 @@ void VIEW::SetMirror( bool aMirrorX, bool aMirrorY ) void VIEW::SetScale( double aScale, const VECTOR2D& aAnchor ) { - if( aScale > m_scaleLimits.x ) - aScale = m_scaleLimits.x; - else if( aScale < m_scaleLimits.y ) - aScale = m_scaleLimits.y; - VECTOR2D a = ToScreen( aAnchor ); m_gal->SetZoomFactor( aScale ); @@ -319,19 +312,6 @@ void VIEW::SetCenter( const VECTOR2D& aCenter ) { m_center = aCenter; - if( !m_panBoundary.Contains( aCenter ) ) - { - if( aCenter.x < m_panBoundary.GetLeft() ) - m_center.x = m_panBoundary.GetLeft(); - else if( aCenter.x > m_panBoundary.GetRight() ) - m_center.x = m_panBoundary.GetRight(); - - if( aCenter.y < m_panBoundary.GetTop() ) - m_center.y = m_panBoundary.GetTop(); - else if( aCenter.y > m_panBoundary.GetBottom() ) - m_center.y = m_panBoundary.GetBottom(); - } - m_gal->SetLookAtPoint( m_center ); m_gal->ComputeWorldScreenMatrix(); diff --git a/common/view/wx_view_controls.cpp b/common/view/wx_view_controls.cpp index 4ecfa953fd..22eb3ee47e 100644 --- a/common/view/wx_view_controls.cpp +++ b/common/view/wx_view_controls.cpp @@ -66,6 +66,42 @@ void VIEW_CONTROLS::ShowCursor( bool aEnabled ) } +void VIEW_CONTROLS::setCenter( const VECTOR2D& aCenter ) +{ + if( !m_panBoundary.Contains( aCenter ) ) + { + VECTOR2D newCenter( aCenter ); + + if( aCenter.x < m_panBoundary.GetLeft() ) + newCenter.x = m_panBoundary.GetLeft(); + else if( aCenter.x > m_panBoundary.GetRight() ) + newCenter.x = m_panBoundary.GetRight(); + + if( aCenter.y < m_panBoundary.GetTop() ) + newCenter.y = m_panBoundary.GetTop(); + else if( aCenter.y > m_panBoundary.GetBottom() ) + newCenter.y = m_panBoundary.GetBottom(); + + m_view->SetCenter( newCenter ); + } + else + { + m_view->SetCenter( aCenter ); + } +} + + +void VIEW_CONTROLS::setScale( double aScale, const VECTOR2D& aAnchor ) +{ + if( aScale < m_minScale ) + aScale = m_minScale; + else if( aScale > m_maxScale ) + aScale = m_maxScale; + + m_view->SetScale( aScale, aAnchor ); +} + + void WX_VIEW_CONTROLS::onMotion( wxMouseEvent& aEvent ) { bool isAutoPanning = false; @@ -80,7 +116,7 @@ void WX_VIEW_CONTROLS::onMotion( wxMouseEvent& aEvent ) VECTOR2D d = m_dragStartPoint - VECTOR2D( aEvent.GetX(), aEvent.GetY() ); VECTOR2D delta = m_view->ToWorld( d, false ); - m_view->SetCenter( m_lookStartPoint + delta ); + setCenter( m_lookStartPoint + delta ); aEvent.StopPropagation(); } else @@ -110,7 +146,7 @@ void WX_VIEW_CONTROLS::onWheel( wxMouseEvent& aEvent ) VECTOR2D delta( aEvent.ControlDown() ? -scrollSpeed : 0.0, aEvent.ShiftDown() ? -scrollSpeed : 0.0 ); - m_view->SetCenter( m_view->GetCenter() + delta ); + setCenter( m_view->GetCenter() + delta ); } else { @@ -133,7 +169,7 @@ void WX_VIEW_CONTROLS::onWheel( wxMouseEvent& aEvent ) } VECTOR2D anchor = m_view->ToWorld( VECTOR2D( aEvent.GetX(), aEvent.GetY() ) ); - m_view->SetScale( m_view->GetScale() * zoomScale, anchor ); + setScale( m_view->GetScale() * zoomScale, anchor ); } aEvent.Skip(); @@ -190,7 +226,7 @@ void WX_VIEW_CONTROLS::onTimer( wxTimerEvent& aEvent ) dir = dir.Resize( borderSize ); dir = m_view->ToWorld( dir, false ); - m_view->SetCenter( m_view->GetCenter() + dir * m_autoPanSpeed ); + setCenter( m_view->GetCenter() + dir * m_autoPanSpeed ); // Notify tools that the cursor position has changed in the world coordinates wxMouseEvent moveEvent( EVT_REFRESH_MOUSE ); diff --git a/include/view/view.h b/include/view/view.h index 63d6769254..e103089ae0 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -507,29 +507,6 @@ public: */ void UpdateItems(); - /** - * Function SetPanBoundary() - * Sets limits for panning area. - * @param aBoundary is the box that limits panning area. - */ - void SetPanBoundary( const BOX2I& aBoundary ) - { - m_panBoundary = aBoundary; - } - - /** - * Function SetScaleLimits() - * Sets minimum and maximum values for scale. - * @param aMaximum is the maximum value for scale.. - * @param aMinimum is the minimum value for scale. - */ - void SetScaleLimits( double aMaximum, double aMinimum ) - { - wxASSERT_MSG( aMaximum > aMinimum, wxT( "I guess you passed parameters in wrong order" ) ); - - m_scaleLimits = VECTOR2D( aMaximum, aMinimum ); - } - static const int VIEW_MAX_LAYERS = 128; ///< maximum number of layers that may be shown private: @@ -670,12 +647,6 @@ private: /// Rendering order modifier for layers that are marked as top layers static const int TOP_LAYER_MODIFIER = -VIEW_MAX_LAYERS; - /// Panning boundaries - BOX2I m_panBoundary; - - /// Zoom limits - VECTOR2D m_scaleLimits; - /// Items to be updated std::vector m_needsUpdate; }; diff --git a/include/view/view_controls.h b/include/view/view_controls.h index 35e6709f18..90fecd9ef9 100644 --- a/include/view/view_controls.h +++ b/include/view/view_controls.h @@ -46,14 +46,40 @@ class VIEW; class VIEW_CONTROLS { public: - VIEW_CONTROLS( VIEW* aView ) : m_view( aView ), m_forceCursorPosition( false ), - m_snappingEnabled( false ), m_grabMouse( false ), m_autoPanEnabled( false ), - m_autoPanMargin( 0.1 ), m_autoPanSpeed( 0.15 ) - {} + VIEW_CONTROLS( VIEW* aView ) : m_view( aView ), m_minScale( 4.0 ), m_maxScale( 15000 ), + m_forceCursorPosition( false ), m_snappingEnabled( false ), m_grabMouse( false ), + m_autoPanEnabled( false ), m_autoPanMargin( 0.1 ), m_autoPanSpeed( 0.15 ) + { + m_panBoundary.SetMaximum(); + } virtual ~VIEW_CONTROLS() {} + /** + * Function SetPanBoundary() + * Sets limits for panning area. + * @param aBoundary is the box that limits panning area. + */ + void SetPanBoundary( const BOX2I& aBoundary ) + { + m_panBoundary = aBoundary; + } + + /** + * Function SetScaleLimits() + * Sets minimum and maximum values for scale. + * @param aMaximum is the maximum value for scale. + * @param aMinimum is the minimum value for scale. + */ + void SetScaleLimits( double aMaximum, double aMinimum ) + { + wxASSERT_MSG( aMaximum > aMinimum, wxT( "I guess you passed parameters in wrong order" ) ); + + m_minScale = aMinimum; + m_maxScale = aMaximum; + } + /** * Function SetSnapping() * Enables/disables snapping cursor to grid. @@ -146,11 +172,23 @@ public: virtual void ShowCursor( bool aEnabled ); protected: + /// Sets center for VIEW, takes into account panning boundaries. + void setCenter( const VECTOR2D& aCenter ); + + /// Sets scale for VIEW, takes into account scale limits. + void setScale( double aScale, const VECTOR2D& aAnchor ); + /// Pointer to controlled VIEW. VIEW* m_view; - /// Current mouse position - VECTOR2D m_mousePosition; + /// Panning boundaries. + BOX2I m_panBoundary; + + /// Scale lower limit. + double m_minScale; + + /// Scale upper limit. + double m_maxScale; /// Current cursor position VECTOR2D m_cursorPosition; diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 0d56f1a634..1b5c4c5c20 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -56,6 +56,7 @@ #include #include #include +#include #include #include @@ -583,7 +584,7 @@ void PCB_EDIT_FRAME::ViewReloadBoard( const BOARD* aBoard ) const view->Add( aBoard->GetRatsnestViewItem() ); // Limit panning to the size of worksheet frame - view->SetPanBoundary( aBoard->GetWorksheetViewItem()->ViewBBox() ); + GetGalCanvas()->GetViewControls()->SetPanBoundary( aBoard->GetWorksheetViewItem()->ViewBBox() ); view->RecacheAllItems( true ); if( IsGalCanvasActive() ) From a377c9c1bc2f15dfaec5955272c9c7e03f380353 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 12 Mar 2014 17:11:52 +0100 Subject: [PATCH 170/741] Fixed erroneous hit testing for polygons in ratsnest for GAL. --- pcbnew/ratsnest_data.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pcbnew/ratsnest_data.cpp b/pcbnew/ratsnest_data.cpp index 9bf0e837da..ec618c7e9d 100644 --- a/pcbnew/ratsnest_data.cpp +++ b/pcbnew/ratsnest_data.cpp @@ -356,8 +356,8 @@ bool RN_POLY::HitTest( const RN_NODE_PTR& aNode ) const x2 = xOld; y2 = yOld; } - if( ( xNew < xt ) == ( xt <= xOld ) /* edge "open" at left end */ - && ( yt - y1 ) * ( x2 - x1 ) < ( y2 - y1 ) * ( xt - x1 ) ) + if( ( xNew < xt ) == ( xt <= xOld ) && /* edge "open" at left end */ + (float)( yt - y1 ) * (float)( x2 - x1 ) < (float)( y2 - y1 ) * (float)( xt - x1 ) ) { inside = !inside; } From f9d5f584cb41b9b0b944d21b576a4e1a546888be Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 12 Mar 2014 17:50:24 +0100 Subject: [PATCH 171/741] Fixed 45 degree mode toggle. --- pcbnew/tools/point_editor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp index f0bb4f5496..eb07c71ec3 100644 --- a/pcbnew/tools/point_editor.cpp +++ b/pcbnew/tools/point_editor.cpp @@ -235,7 +235,7 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) modified = true; } - if( evt->Modifier( MD_CTRL ) != degree45 ) // 45 degrees mode + if( !!evt->Modifier( MD_CTRL ) != degree45 ) // 45 degrees mode { degree45 = evt->Modifier( MD_CTRL ); From 52791f2375223ab54c9a278ee5d9aa1cfa0019a2 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 12 Mar 2014 22:42:08 +0100 Subject: [PATCH 172/741] Changed cast from float to double in RN_POLY::HitTest. --- pcbnew/ratsnest_data.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/ratsnest_data.cpp b/pcbnew/ratsnest_data.cpp index 2845e04475..97f04e29b0 100644 --- a/pcbnew/ratsnest_data.cpp +++ b/pcbnew/ratsnest_data.cpp @@ -357,7 +357,7 @@ bool RN_POLY::HitTest( const RN_NODE_PTR& aNode ) const } if( ( xNew < xt ) == ( xt <= xOld ) && /* edge "open" at left end */ - (float)( yt - y1 ) * (float)( x2 - x1 ) < (float)( y2 - y1 ) * (float)( xt - x1 ) ) + (double)( yt - y1 ) * (double)( x2 - x1 ) < (double)( y2 - y1 ) * (double)( xt - x1 ) ) { inside = !inside; } From d00fae588a3f8ece309e110623ecf1edf4103c98 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 13 Mar 2014 08:15:19 +0100 Subject: [PATCH 173/741] Footprint Editor: fix a crash when the dialog to set pad properties is called from the main toolbar (i.e. to define the default setting for new pads, and not to edit an existing pad) --- pcbnew/dialogs/dialog_pad_properties.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pcbnew/dialogs/dialog_pad_properties.cpp b/pcbnew/dialogs/dialog_pad_properties.cpp index 42f75d220c..37d10da7e5 100644 --- a/pcbnew/dialogs/dialog_pad_properties.cpp +++ b/pcbnew/dialogs/dialog_pad_properties.cpp @@ -149,10 +149,10 @@ DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, D_PAD* aP { m_canUpdate = false; m_parent = aParent; - m_currentPad = aPad; + m_currentPad = aPad; // aPad can be NULL, if the dialog is calleg + // from the modoule editor to set default pad characteristics m_board = m_parent->GetBoard(); - m_dummyPad = new D_PAD( aPad->GetParent() ); - m_padMaster.SetParent( aPad->GetParent() ); + m_dummyPad = new D_PAD( (MODULE*) NULL ); if( aPad ) m_dummyPad->Copy( aPad ); From 85e8b8bd87dfabcc4d39a79e8d2a45b063640608 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 13 Mar 2014 11:48:19 +0100 Subject: [PATCH 174/741] Yet another approach to 45 degree constraints. --- pcbnew/tools/edit_points.h | 9 ++++++ pcbnew/tools/point_editor.cpp | 53 ++++++++++++++++++++++++----------- pcbnew/tools/point_editor.h | 3 ++ 3 files changed, 48 insertions(+), 17 deletions(-) diff --git a/pcbnew/tools/edit_points.h b/pcbnew/tools/edit_points.h index 1dd0f17014..ecc84a8df6 100644 --- a/pcbnew/tools/edit_points.h +++ b/pcbnew/tools/edit_points.h @@ -59,6 +59,15 @@ public: */ virtual void Apply() = 0; + /** + * Function Update() + * + * Updates contraint's traits. + */ + virtual void Update() + { + } + protected: EDIT_POINT& m_constrained; ///< Point that is constrained by rules implemented by Apply() }; diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp index eb07c71ec3..0d95d4b294 100644 --- a/pcbnew/tools/point_editor.cpp +++ b/pcbnew/tools/point_editor.cpp @@ -134,7 +134,8 @@ private: POINT_EDITOR::POINT_EDITOR() : - TOOL_INTERACTIVE( "pcbnew.PointEditor" ), m_selectionTool( NULL ), m_dragPoint( NULL ) + TOOL_INTERACTIVE( "pcbnew.PointEditor" ), m_selectionTool( NULL ), m_dragPoint( NULL ), + m_original( VECTOR2I( 0, 0 ) ) { } @@ -175,7 +176,7 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) PCB_EDIT_FRAME* editFrame = getEditFrame(); EDA_ITEM* item = selection.items.GetPickedItem( 0 ); EDIT_POINT constrainer( VECTOR2I( 0, 0 ) ); - bool degree45 = false; // 45 degree mode + boost::shared_ptr degree45Constraint; m_editPoints = EDIT_POINTS_FACTORY::Make( item ); if( !m_editPoints ) @@ -232,27 +233,31 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) editFrame->OnModify(); editFrame->SaveCopyInUndoList( selection.items, UR_CHANGED ); controls->ForceCursorPosition( false ); + m_original = *m_dragPoint; // Save the original position modified = true; } - if( !!evt->Modifier( MD_CTRL ) != degree45 ) // 45 degrees mode + if( !!evt->Modifier( MD_CTRL ) != (bool) degree45Constraint ) // 45 degrees mode { - degree45 = evt->Modifier( MD_CTRL ); - - if( degree45 ) + if( !degree45Constraint ) { // Find a proper constraining point for 45 degrees mode constrainer = get45DegConstrainer(); - m_dragPoint->SetConstraint( new EPC_45DEGREE( *m_dragPoint, constrainer ) ); + degree45Constraint.reset( new EPC_45DEGREE( *m_dragPoint, constrainer ) ); } else { - m_dragPoint->ClearConstraint(); + degree45Constraint.reset(); } } m_dragPoint->SetPosition( controls->GetCursorPosition() ); - m_dragPoint->ApplyConstraint(); + + if( degree45Constraint ) + degree45Constraint->Apply(); + else + m_dragPoint->ApplyConstraint(); + updateItem(); updatePoints(); @@ -436,15 +441,15 @@ void POINT_EDITOR::updateItem() const else if( isModified( (*m_editPoints)[2] ) ) { dimension->SetOrigin( wxPoint( m_dragPoint->GetPosition().x, m_dragPoint->GetPosition().y ) ); - static_cast( (*m_editPoints)[0].GetConstraint() )->Update(); - static_cast( (*m_editPoints)[1].GetConstraint() )->Update(); + (*m_editPoints)[0].GetConstraint()->Update(); + (*m_editPoints)[1].GetConstraint()->Update(); } else if( isModified( (*m_editPoints)[3] ) ) { dimension->SetEnd( wxPoint( m_dragPoint->GetPosition().x, m_dragPoint->GetPosition().y ) ); - static_cast( (*m_editPoints)[0].GetConstraint() )->Update(); - static_cast( (*m_editPoints)[1].GetConstraint() )->Update(); + (*m_editPoints)[0].GetConstraint()->Update(); + (*m_editPoints)[1].GetConstraint()->Update(); } break; @@ -538,7 +543,9 @@ EDIT_POINT POINT_EDITOR::get45DegConstrainer() const { EDA_ITEM* item = m_editPoints->GetParent(); - if( item->Type() == PCB_LINE_T ) + switch( item->Type() ) + { + case PCB_LINE_T: { const DRAWSEGMENT* segment = static_cast( item ); { @@ -555,8 +562,11 @@ EDIT_POINT POINT_EDITOR::get45DegConstrainer() const break; } } + + break; } - else if( item->Type() == PCB_DIMENSION_T ) + + case PCB_DIMENSION_T: { // Constraint for crossbar if( isModified( (*m_editPoints)[2] ) ) @@ -564,8 +574,17 @@ EDIT_POINT POINT_EDITOR::get45DegConstrainer() const else if( isModified( (*m_editPoints)[3] ) ) return (*m_editPoints)[2]; + + else + return EDIT_POINT( m_dragPoint->GetPosition() ); // no constraint + + break; } - // In any other case we may align item to the current cursor position. - return EDIT_POINT( getViewControls()->GetCursorPosition() ); + default: + break; + } + + // In any other case we may align item to the current cursor position. TODO wrong desc + return m_original; } diff --git a/pcbnew/tools/point_editor.h b/pcbnew/tools/point_editor.h index 054d6b444e..8e37a142cd 100644 --- a/pcbnew/tools/point_editor.h +++ b/pcbnew/tools/point_editor.h @@ -62,6 +62,9 @@ private: ///> Currently edited point, NULL if there is none. EDIT_POINT* m_dragPoint; + ///> Original position for the current drag point. + EDIT_POINT m_original; + ///> Currently available edit points. boost::shared_ptr m_editPoints; From e76c330aaffd73b53ae9a136bc9d98b34b6f5beb Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 13 Mar 2014 18:50:52 +0100 Subject: [PATCH 175/741] Fixes build error with the choosy CLANG (Thanks to Maciej Suminski) --- include/ttl/ttl.h | 11 +- include/ttl/ttl_constr.h | 635 --------------------------------------- 2 files changed, 1 insertion(+), 645 deletions(-) delete mode 100644 include/ttl/ttl_constr.h diff --git a/include/ttl/ttl.h b/include/ttl/ttl.h index 7d7c655843..7de2e7b08d 100644 --- a/include/ttl/ttl.h +++ b/include/ttl/ttl.h @@ -357,7 +357,7 @@ private: ForwardIterator it; for (it = first; it != last; ++it) { - bool status = insertNode(dart, **it); + insertNode(dart, **it); } } @@ -1914,13 +1914,4 @@ passes: }; // End of ttl namespace scope (but other files may also contain functions for ttl) - - //------------------------------------------------------------------------------------------------ - // ----------------------------- Constrained Triangulation Group -------------------------------- - //------------------------------------------------------------------------------------------------ - - // Still namespace ttl - -#include - #endif // _TTL_H_ diff --git a/include/ttl/ttl_constr.h b/include/ttl/ttl_constr.h deleted file mode 100644 index 125bddeb23..0000000000 --- a/include/ttl/ttl_constr.h +++ /dev/null @@ -1,635 +0,0 @@ -/* - * Copyright (C) 1998, 2000-2007, 2010, 2011, 2012, 2013 SINTEF ICT, - * Applied Mathematics, Norway. - * - * Contact information: E-mail: tor.dokken@sintef.no - * SINTEF ICT, Department of Applied Mathematics, - * P.O. Box 124 Blindern, - * 0314 Oslo, Norway. - * - * This file is part of TTL. - * - * TTL is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * TTL 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 Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with TTL. If not, see - * . - * - * In accordance with Section 7(b) of the GNU Affero General Public - * License, a covered work must retain the producer line in every data - * file that is created or manipulated using TTL. - * - * Other Usage - * You can be released from the requirements of the license by purchasing - * a commercial license. Buying such a license is mandatory as soon as you - * develop commercial activities involving the TTL library without - * disclosing the source code of your own applications. - * - * This file may be used in accordance with the terms contained in a - * written agreement between you and SINTEF ICT. - */ - -#ifndef _TTL_CONSTR_H_ -#define _TTL_CONSTR_H_ - - -#include -#include - - -// Debugging -#ifdef DEBUG_TTL_CONSTR_PLOT - #include - static ofstream ofile_constr("qweCons.dat"); -#endif - -/** \brief Constrained Delaunay triangulation -* -* Basic generic algorithms in TTL for inserting a constrained edge between two existing nodes.\n -* -* See documentation for the namespace ttl for general requirements and assumptions. -* -* \author -* �yvind Hjelle, oyvindhj@ifi.uio.no -*/ - -namespace ttl_constr { - - // ??? A constant used to evluate a numerical expression against a user spesified - // roundoff-zero number -#ifdef DEBUG_TTL_CONSTR - static const double ROUNDOFFZERO = 0.0; // 0.1e-15; -#endif - - -class ConstrainedTriangulation -{ - public: - //------------------------------------------------------------------------------------------------ - /* Checks if \e dart has start and end points in \e dstart and \e dend. - * - * \param dart - * The dart that should be controlled to see if it's the constraint - * - * \param dstart - * A CCW dart with the startnode of the constraint as the startnode - * - * \param dend - * A CCW dart with the endnode of the constraint as the startnode - * - * \retval bool - * A bool confirming that it's the constraint or not - * - * \using - * same_0_orbit - */ - template - static bool isTheConstraint(const DartType& dart, const DartType& dstart, const DartType& dend) { - DartType d0 = dart; - d0.alpha0(); // CW - if ((ttl::TriangulationHelper::same_0_orbit(dstart, dart) && ttl::TriangulationHelper::same_0_orbit(dend, d0)) || - (ttl::TriangulationHelper::same_0_orbit(dstart, d0) && ttl::TriangulationHelper::same_0_orbit(dend, dart))) { - return true; - } - return false; - } - - - //------------------------------------------------------------------------------------------------ - /* Checks if \e d1 and \e d2 are on the same side of the line between \e dstart and \e dend. - * (The start nodes of \e d1 and \e d2 represent an edge). - * - * \param dstart - * A CCW dart with the start node of the constraint as the source node of the dart. - * - * \param dend - * A CCW dart with the end node of the constraint as the source node of the dart. - * - * \param d1 - * A CCW dart with the first node as the start node of the dart. - * - * \param d2 - * A CCW dart with the other node as the start node of the dart. - * - * \using - * TraitsType::orient2d - */ - template - static bool crossesConstraint(DartType& dstart, DartType& dend, DartType& d1, DartType& d2) { - - typename TraitsType::real_type orient_1 = TraitsType::orient2d(dstart,d1,dend); - typename TraitsType::real_type orient_2 = TraitsType::orient2d(dstart,d2,dend); - // ??? Should we refine this? e.g. find if (dstart,dend) (d1,d2) represent the same edge - if ((orient_1 <= 0 && orient_2 <= 0) || (orient_1 >= 0 && orient_2 >= 0)) - return false; - - return true; - } - - - //------------------------------------------------------------------------------------------------ - /* Return the dart \e d making the smallest non-negative angle, - * as calculated with: orient2d(dstart, d.alpha0(), dend), - * at the 0-orbit of dstart. - * If (dstart,dend) is a CCW boundary edge \e d will be CW, otherwise CCW (since CCW in) - * at the 0-orbit of dstart. - * - * \par Assumes: - * - CCW dstart and dend, but returned dart can be CW at the boundary. - * - Boundary is convex? - * - * \param dstart - * A CCW dart dstart - * - * \param dend - * A CCW dart dend - * - * \retval DartType - * The dart \e d making the smallest positive (or == 0) angle - * - * \using - * isBoundaryNode - * positionAtNextBoundaryEdge - * TraitsType::orient2d - */ - template - static DartType getAtSmallestAngle(const DartType& dstart, const DartType& dend) { - - // - Must boundary be convex??? - // - Handle the case where the constraint is already present??? - // - Handle dstart and/or dend at the boundary - // (dstart and dend may define a boundary edge) - - DartType d_iter = dstart; - if (ttl::TriangulationHelper::isBoundaryNode(d_iter)) { - d_iter.alpha1(); // CW - ttl::TriangulationHelper::positionAtNextBoundaryEdge(d_iter); // CCW (was rotated CW to the boundary) - } - - // assume convex boundary; see comments - - DartType d0 = d_iter; - d0.alpha0(); - bool ccw = true; // the rotation later - typename TraitsType::real_type o_iter = TraitsType::orient2d(d_iter, d0, dend); - if (o_iter == 0) { // collinear BUT can be on "back side" - d0.alpha1().alpha0(); // CW - if (TraitsType::orient2d(dstart, dend, d0) > 0) - return d_iter; //(=dstart) collinear - else { - // collinear on "back side" - d_iter.alpha1().alpha2(); // assume convex boundary - ccw = true; - } - } - else if (o_iter < 0) { - // Prepare for rotating CW and with d_iter CW - d_iter.alpha1(); - ccw = false; - } - - // Set first angle - d0 = d_iter; d0.alpha0(); - o_iter = TraitsType::orient2d(dstart, d0, dend); - - typename TraitsType::real_type o_next; - - // Rotate towards the constraint CCW or CW. - // Here we assume that the boundary is convex. - DartType d_next = d_iter; - for (;;) { - d_next.alpha1(); // CW !!! (if ccw == true) - d0 = d_next; d0.alpha0(); - o_next = TraitsType::orient2d(dstart, d0, dend); - - if (ccw && o_next < 0) // and o_iter > 0 - return d_iter; - else if (!ccw && o_next > 0) - return d_next; // CCW - else if (o_next == 0) { - if (ccw) - return d_next.alpha2(); // also ok if boundary - else - return d_next; - } - - // prepare next - d_next.alpha2(); // CCW if ccw - d_iter = d_next; // also ok if boundary CCW if ccw == true - } - } - - - //------------------------------------------------------------------------------------------------ - /* This function finds all the edges in the triangulation crossing - * the spesified constraint and puts them in a list. - * In the case of collinearity, an attempt is made to detect this. - * The first collinear node between dstart and dend is then returned. - * - * Strategy: - * - Iterate such that \e d_iter is always strictly "below" the constraint - * as seen with \e dstart to the left and \e dend to the right. - * - Add CCW darts, whose edges intersect the constrait, to a list. - * These edges are found by the orient2d predicate: - * If two nodes of an edge are on opposite sides of the constraint, - * the edge between them intersect. - * - Must handle collinnear cases, i.e., if a node falls on the constraint, - * and possibly restarting collection of edges. Detecting collinearity - * heavily relies on the orient2d predicate which is provided by the - * traits class. - * - * Action: - * 1) Find cone/opening angle containing \e dstart and \e dend - * 2) Find first edge from the first 0-orbit that intersects - * 3) Check which of the two opposite that intersects - * - * 1) - * Rotate CCW and find the (only) case where \e d_iter and \e d_next satisfy: - * - orient2d(d_iter, d_iter.alpha0(), dend) > 0 - * - orient2d(d_next, d_next.alpha0(), dend) < 0 - * - * - check if we are done, i.e., if (d_next.alpha0() == my_dend) - * - Note also the situation if, e.g., the constraint is a boundary edge in which case - * \e my_dend wil be CW - * - * \param dstart - * A CCW dart with the startnode of the constraint as the startnode - * - * \param dend - * A CCW dart with the endnode of the constraint as the startnode - * - * \param elist - * A list where all the edges crossing the spesified constraint will be put - * - * \retval dartType - * Returns the next "collinear" starting node such that dend is returned when done. - */ - template - static DartType findCrossingEdges(const DartType& dstart, const DartType& dend, ListType& elist) { - - const DartType my_start = getAtSmallestAngle(dstart, dend); - DartType my_end = getAtSmallestAngle(dend, dstart); - - DartType d_iter = my_start; - if (d_iter.alpha0().alpha2() == my_end) - return d_iter; // The constraint is an existing edge and we are done - - // Facts/status so far: - // - my_start and my_end are now both CCW and the constraint is not a boundary edge. - // - Further, the constraint is not one single existing edge, but it might be a collection - // of collinear edges in which case we return the current collinear edge - // and calling this function until all are collected. - - my_end.alpha1(); // CW! // ??? this is probably ok for testing now? - - d_iter = my_start; - d_iter.alpha0().alpha1(); // alpha0 is downwards or along the constraint - - // Facts: - // - d_iter is guaranteed to intersect, but can be in start point. - // - d_iter.alpha0() is not at dend yet - typename TraitsType::real_type orient = TraitsType::orient2d(dstart, d_iter, dend); - - // Use round-off error/tolerance or rely on the orient2d predicate ??? - // Make a warning message if orient != exact 0 - if (orient == 0) - return d_iter; - -#ifdef DEBUG_TTL_CONSTR - else if (fabs(orient) <= ROUNDOFFZERO) { - cout << "The darts are not exactly colinear, but |d1 x d2| <= " << ROUNDOFFZERO << endl; - return d_iter; // collinear, not done (and not collect in the list) - } -#endif - - // Collect intersecting edges - // -------------------------- - elist.push_back(d_iter); // The first with interior intersection point - - // Facts, status so far: - // - The first intersecting edge is now collected - // (- d_iter.alpha0() is still not at dend) - - // d_iter should always be the edge that intersects and be below or on the constraint - // One of the two edges opposite to d_iter must intersect, or we have collinearity - - // Note: Almost collinear cases can be handled on the - // application side with orient2d. We should probably - // return an int and the application will set it to zero - for(;;) { - // assume orient have been calc. and collinearity has been tested, - // above the first time and below later - d_iter.alpha2().alpha1(); // 2a same node - - DartType d0 = d_iter; - d0.alpha0(); // CW - if (d0 == my_end) - return dend; // WE ARE DONE (but can we enter an endless loop???) - - // d_iter or d_iter.alpha0().alpha1() must intersect - orient = TraitsType::orient2d(dstart, d0, dend); - - if (orient == 0) - return d0.alpha1(); - -#ifdef DEBUG_TTL_CONSTR - else if (fabs(orient) <= ROUNDOFFZERO) { - return d0.alpha1(); // CCW, collinear - } -#endif - - else if (orient > 0) { // orient > 0 and still below - // This one must intersect! - d_iter = d0.alpha1(); - } - elist.push_back(d_iter); - } - } - - - //------------------------------------------------------------------------------------------------ - /* This function recives a constrained edge and a list of all the edges crossing a constraint. - * It then swaps the crossing edges away from the constraint. This is done according to a - * scheme suggested by Dyn, Goren & Rippa (slightly modified). - * The resulting triangulation is a constrained one, but not necessarily constrained Delaunay. - * In other to run optimization later to obtain a constrained Delaunay triangulation, - * the swapped edges are maintained in a list. - * - * Strategy : - * - Situation A: Run through the list and swap crossing edges away from the constraint. - * All the swapped edges are moved to the end of the list, and are "invisible" to this procedure. - * - Situation B: We may come in a situation where none of the crossing edges can be swapped away - * from the constraint. - * Then we follow the strategy of Dyn, Goren & Rippa and allow edges to be swapped, - * even if they are not swapped away from the constraint. - * These edges are NOT moved to the end of the list. They are later swapped to none-crossing - * edges when the locked situation is solved. - * - We keep on swapping edges in Situation B until we have iterated trough the list. - * We then resume Situation A. - * - This is done until the list is virtualy empty. The resulting \c elist has the constraint - * as the last element. - * - * \param dstart - * A CCW dart dstart - * - * \param dend - * A CCW dart dend - * - * \param elist - * A list containing all the edges crossing the spesified constraint - * - * \using - * swappableEdge - * swapEdgeInList - * crossesConstraint - * isTheConstraint - */ - template - void transformToConstraint(ttl::TriangulationHelper helper, DartType& dstart, DartType& dend, - std::list& elist) const { - - typename std::list::iterator it, used; - - // We may enter in a situation where dstart and dend are altered because of a swap. - // (The general rule is that darts inside the actual quadrilateral can be changed, - // but not those outside.) - // So, we need some look-ahead strategies for dstart and dend and change these - // after a swap if necessary. - - int dartsInList = (int)elist.size(); - if (dartsInList == 0) - return; - - bool erase; // indicates if an edge is swapped away from the constraint such that it can be - // moved to the back of the list - bool locked = false; - do { - int noswap = 0; - it = elist.begin(); - - // counts how many edges that have been swapped per list-cycle - int counter = 1; - while(it != elist.end()) { // ??? change this test with counter > dartsInList - erase = false; - // Check if our virtual end of the list has been crossed. It breaks the - // while and starts all over again in the do-while loop - if (counter > dartsInList) - break; - - if (ttl::TriangulationHelper::swappableEdge(*it, true)) { - // Dyn & Goren & Rippa 's notation: - // The node assosiated with dart *it is denoted u_m. u_m has edges crossing the constraint - // named w_1, ... , w_r . The other node to the edge assosiated with dart *it is w_s. - // We want to swap from edge u_m<->w_s to edge w_{s-1}<->w_{s+1}. - DartType op1 = *it; - DartType op2 = op1; - op1.alpha1().alpha0(); //finds dart with node w_{s-1} - op2.alpha2().alpha1().alpha0(); // (CW) finds dart with node w_{s+1} - DartType tmp = *it; tmp.alpha0(); // Dart with assosiated node opposite to node of *it allong edge - // If there is a locked situation we swap, even if the result is crossing the constraint - // If there is a looked situation, but we do an ordinary swap, it should be treated as - // if we were not in a locked situation!! - - // The flag swap_away indicates if the edge is swapped away from the constraint such that - // it does not cross the constraint. - bool swap_away = (crossesConstraint(dstart, dend, *it, tmp) && - !crossesConstraint(dstart, dend, op1, op2)); - if (swap_away || locked) { - // Do a look-ahead to see if dstart and/or dend are in the quadrilateral - // If so, we mark it with a flag to make sure we update them after the swap - // (they may have been changed during the swap according to the general rule!) - bool start = false; - bool end = false; - - DartType d = *it; - if (d.alpha1().alpha0() == dstart) - start = true; - d = *it; - if (d.alpha2().alpha1().alpha0().alpha1() == dend) - end = true; - - // This is the only place swapping is called when inserting a constraint - helper.swapEdgeInList(it,elist); - - // If we, during look-ahead, found that dstart and/or dend were in the quadrilateral, - // we update them. - if (end) - dend = *it; - if (start) { - dstart = *it; - dstart.alpha0().alpha2(); - } - - if (swap_away) { // !locked || //it should be sufficient with swap_away ??? - noswap++; - erase = true; - } - - if (isTheConstraint(*it, dstart, dend)) { - // Move the constraint to the end of the list - DartType the_constraint = *it; - elist.erase(it); - elist.push_back(the_constraint); - return; - } //endif - } //endif - } //endif "swappable edge" - - - // Move the edge to the end of the list if it was swapped away from the constraint - if (erase) { - used = it; - elist.push_back(*it); - ++it; - elist.erase(used); - --dartsInList; - } - else { - ++it; - ++counter; - } - - } //end while - - if (noswap == 0) - locked = true; - - } while (dartsInList != 0); - - -#ifdef DEBUG_TTL_CONSTR - // We will never enter here. (If elist is empty, we return above). - cout << "??????? ERROR 2, should never enter here ????????????????????????? SKIP ???? " << endl; - exit(-1); -#endif - - } - -}; // End of ConstrainedTriangulation class - -}; // End of ttl_constr namespace scope - - -namespace ttl { // (extension) - - /** @name Constrained (Delaunay) Triangulation */ - //@{ - - //------------------------------------------------------------------------------------------------ - /** Inserts a constrained edge between two existing nodes in a triangulation. - * If the constraint falls on one or more existing nodes and this is detected by the - * predicate \c TraitsType::orient2d, which should return zero in this case, the - * constraint is split. Otherwise a degenerate triangle will be made along - * the constraint. - * - * \param dstart - * A CCW dart with the start node of the constraint as the source node - * - * \param dend - * A CCW dart with the end node of the constraint as the source node - * - * \param optimize_delaunay - * If set to \c true, the resulting triangulation will be - * a \e constrained \e Delaunay \e triangulation. If set to \c false, the resulting - * triangulation will not necessarily be of constrained Delaunay type. - * - * \retval DartType - * A dart representing the constrained edge. - * - * \require - * - \ref hed::TTLtraits::orient2d "TraitsType::orient2d" (DartType&, DartType&, PointType&) - * - \ref hed::TTLtraits::swapEdge "TraitsType::swapEdge" (DartType&) - * - * \using - * - optimizeDelaunay if \e optimize_delaunay is set to \c true - * - * \par Assumes: - * - The constrained edge must be inside the existing triangulation (and it cannot - * cross the boundary of the triangulation). - */ - template - DartType TriangulationHelper::insertConstraint(DartType& dstart, DartType& dend, bool optimize_delaunay) { - - // Assumes: - // - It is the users responsibility to avoid crossing constraints - // - The constraint cannot cross the boundary, i.e., the boundary must be - // convex in the area of crossing edges. - // - dtart and dend are preserved (same node associated.) - - - // Find edges crossing the constraint and put them in elist. - // If findCrossingEdges reaches a Node lying on the constraint, this function - // calls itself recursively. - - // RECURSION - std::list elist; - DartType next_start = ttl_constr::ConstrainedTriangulation::findCrossingEdges(dstart, dend, elist); - - // If there are no crossing edges (elist is empty), we assume that the constraint - // is an existing edge. - // In this case, findCrossingEdges returns the constraint. - // Put the constraint in the list to fit with the procedures below - // (elist can also be empty in the case of invalid input data (the constraint is in - // a non-convex area) but this is the users responsibility.) - - //by Thomas Sevaldrud if (elist.size() == 0) - //by Thomas Sevaldrud elist.push_back(next_start); - - // findCrossingEdges stops if it finds a node lying on the constraint. - // A dart with this node as start node is returned - // We call insertConstraint recursivly until the received dart is dend - if (!same_0_orbit(next_start, dend)) { - -#ifdef DEBUG_TTL_CONSTR_PLOT - cout << "RECURSION due to collinearity along constraint" << endl; -#endif - - insertConstraint(next_start, dend, optimize_delaunay); - } - - // Swap edges such that the constraint edge is present in the transformed triangulation. - if (elist.size() > 0) // by Thomas Sevaldrud - ttl_constr::ConstrainedTriangulation::transformToConstraint(dstart, next_start, elist); - -#ifdef DEBUG_TTL_CONSTR_PLOT - cout << "size of elist = " << elist.size() << endl; - if (elist.size() > 0) { - DartType the_constraint = elist.back(); - ofile_constr << the_constraint.x() << " " << the_constraint.y() << " " << 0 << endl; - the_constraint.alpha0(); - ofile_constr << the_constraint.x() << " " << the_constraint.y() << " " << 0 << endl << endl; - } -#endif - - // Optimize to constrained Delaunay triangulation if required. - typename std::list::iterator end_opt = elist.end(); - if (optimize_delaunay) { - - // Indicate that the constrained edge, which is the last element in the list, - // should not be swapped - --end_opt; - optimizeDelaunay(elist, end_opt); - } - - if(elist.size() == 0) // by Thomas Sevaldrud - return next_start; // by Thomas Sevaldrud - - // Return the constraint, which is still the last element in the list - end_opt = elist.end(); - --end_opt; - return *end_opt; - } - - //@} // End of Constrained Triangulation Group - -}; // End of ttl namespace scope (extension) - -#endif // _TTL_CONSTR_H_ From ec5a767542627a99125b13a88a7bbad6cb3c3716 Mon Sep 17 00:00:00 2001 From: Marco Serantoni Date: Fri, 14 Mar 2014 00:44:46 +0100 Subject: [PATCH 176/741] [MacOSX] New OSX enviroment seems to be more picky about options, this fixes the linker part --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4a923759cf..f75978e6ea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -199,9 +199,10 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) if( NOT APPLE ) set( CMAKE_SHARED_LINKER_FLAGS "${TO_LINKER},--no-undefined" ) set( CMAKE_MODULE_LINKER_FLAGS "${TO_LINKER},--no-undefined" ) + + set( CMAKE_EXE_LINKER_FLAGS_RELEASE "-s" ) endif() - set( CMAKE_EXE_LINKER_FLAGS_RELEASE "-s" ) endif() # quiet GCC while in boost @@ -215,7 +216,7 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__ASSERTMACROS__ -mmacosx-version-min=10.5" ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__ASSERTMACROS__ -mmacosx-version-min=10.5" ) - # Allows .dylib relocation in the future + # Allows .dylib relocation in the future - needed by fixbundle set( CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -headerpad_max_install_names") if( NOT CMAKE_CXX_COMPILER ) From dcea11e5cb34560abac57d4c814ef0a91ca89755 Mon Sep 17 00:00:00 2001 From: Marco Serantoni Date: Fri, 14 Mar 2014 02:07:44 +0100 Subject: [PATCH 177/741] [MacOSX] New OSX build enviroment now supported --- CMakeModules/download_wxpython.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeModules/download_wxpython.cmake b/CMakeModules/download_wxpython.cmake index 4e1a71f688..112a8de5ff 100644 --- a/CMakeModules/download_wxpython.cmake +++ b/CMakeModules/download_wxpython.cmake @@ -46,6 +46,10 @@ if (APPLE) STRING(REGEX REPLACE " -arch " "," LIBWXPYTHON_ARCHITECTURES ${CMAKE_OSX_ARCHITECTURES}) SET( LIBWXPYTHON_OPTS ${LIBWXPYTHON_OPTS} --mac_arch=${LIBWXPYTHON_ARCHITECTURES}) endif( CMAKE_OSX_ARCHITECTURES ) + + if( CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) + SET( LIBWXPYTHON_PRECMD export CFLAGS=-Qunused-arguments && ) + endif() endif(APPLE) if ( KICAD_BUILD_STATIC ) @@ -74,7 +78,7 @@ ExternalProject_Add( libwxpython UPDATE_COMMAND ${CMAKE_COMMAND} -E remove_directory "${LIBWXPYTHON_ROOT}" COMMAND ${LIBWXPYTHON_EXEC} wxPython/build-wxpython.py --clean - CONFIGURE_COMMAND ${LIBWXPYTHON_EXEC} wxPython/build-wxpython.py --prefix=${LIBWXPYTHON_ROOT} --unicode --install ${LIBWXPYTHON_OPTS} + CONFIGURE_COMMAND ${LIBWXPYTHON_PRECMD} ${LIBWXPYTHON_EXEC} wxPython/build-wxpython.py --prefix=${LIBWXPYTHON_ROOT} --unicode --install ${LIBWXPYTHON_OPTS} #BINARY_DIR "${PREFIX}" From bc707ced5812a9bb69966429bab98308bd0f526b Mon Sep 17 00:00:00 2001 From: Marco Serantoni Date: Fri, 14 Mar 2014 02:10:27 +0100 Subject: [PATCH 178/741] [MacOSX] Pcbnew crash on editing dimension's line width --- pcbnew/dimension.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pcbnew/dimension.cpp b/pcbnew/dimension.cpp index 819c1a3110..fee6c85304 100644 --- a/pcbnew/dimension.cpp +++ b/pcbnew/dimension.cpp @@ -160,10 +160,12 @@ void DIALOG_DIMENSION_EDITOR::OnCancelClick( wxCommandEvent& event ) void DIALOG_DIMENSION_EDITOR::OnOKClick( wxCommandEvent& event ) { +#ifndef USE_WX_OVERLAY if( m_DC ) // Delete old text. { CurrentDimension->Draw( m_Parent->GetCanvas(), m_DC, GR_XOR ); } +#endif m_Parent->SaveCopyInUndoList(CurrentDimension, UR_CHANGED); @@ -207,12 +209,14 @@ void DIALOG_DIMENSION_EDITOR::OnOKClick( wxCommandEvent& event ) CurrentDimension->Text().SetMirrored( ( m_rbMirror->GetSelection() == 1 ) ? true : false ); CurrentDimension->SetLayer( m_SelLayerBox->GetLayerSelection() ); - +#ifndef USE_WX_OVERLAY if( m_DC ) // Display new text { CurrentDimension->Draw( m_Parent->GetCanvas(), m_DC, GR_OR ); } - +#else + m_Parent->Refresh(); +#endif m_Parent->OnModify(); EndModal( 1 ); } From ab27f56cc72695dfbd30999c7f57c2b10d158942 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 14 Mar 2014 08:37:04 +0100 Subject: [PATCH 179/741] Doc update --- Documentation/GUI_Translation_HOWTO.odt | Bin 226795 -> 235937 bytes Documentation/GUI_Translation_HOWTO.pdf | Bin 332687 -> 339069 bytes Documentation/wxWidgets_patch_notes.txt | 21 +++++++++------------ pcbnew/dialogs/dialog_pad_properties.cpp | 4 ++-- 4 files changed, 11 insertions(+), 14 deletions(-) diff --git a/Documentation/GUI_Translation_HOWTO.odt b/Documentation/GUI_Translation_HOWTO.odt index 031e2d682a92965f4db13d3102cc8bee3a575244..163846098d3f8ec3caa6d83fe93b3bfe44272591 100644 GIT binary patch delta 233280 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 z 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 literal 226795 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�*#xlaG_6 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ℜnCzI1TgiG=!4M*4Fr0{UDIup?AX^qp;+A60 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 S85ZEn9|8zS$p%0g1N|Q}3-KEO diff --git a/Documentation/GUI_Translation_HOWTO.pdf b/Documentation/GUI_Translation_HOWTO.pdf index 484c38a277c8713a31fdc394c83fb21b41c59002..6e6e408defa0f8b2cff0b19677f68e1d1863f632 100644 GIT binary patch delta 193759 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 +`zyEgJ<-)%Dw`O|NtZCD%Rpr?ZH~ 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 gjG@E?dDDTn#P?k}vP;!jFU6KRWewlqbj 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�C zNJIy7_yqYu<`QPt>9g$5+Zw`w4R+HP{+}tl>Qt|_~tOitBVm?X`>-C5z|7(7z3xPl8_xvrDsuQ zUpwjw&*UEWkQKJ~`^M3(>PK2OK3zA?@c7;I@gF{t*JMjx+0b*@_KIYYQMcyxcNcn@MIe>eBK=|B9Xb)UqY(yz_?B_%OC2R7He z?+FrSlhI&xevcb)x5Fow=Ur8^fBM}6H1;Q21P-DET=qTsg4*y- zMU^-ZFDOCJO7o$zKG|%{t=!vebh(4ExY;FOJ63w zOMEvfegfusFJLhnyww2OWDJmGNs)A)>{Uj{BNSX|&I&@N&>*x37X*Hd02UVEkW9FD zfUn!Y;^9t#=>zjAMyDaiqlJ9mF2XK0S+_DZfyJ>{tOQ2B1?LMVzO9CF^a88>IE+I= zi;ZZJQh&@B3*(d)WsR~;kwh$z9I$I7Br85&kY6oep&j=&R8a!Q5}ZYXXx72m#(_t; zhHQh?8IU`lN%dVbe(C{Y45+K91*CRXz-4&TuybrIofQ>qJg|gHBc6x@e~_rf11Q}3jN0~6RNf9H>Q5i8pI$Zq0c%+>yJ;F^nx0O;kIP-&6Nw3d~02%wp$~a8cu3hGi=_t791PL@dlvnkAI6X z#w7)j=|22{50CXt_bu{qzCcOykS?CB?YP+5QBNgOER{RQ)*(La9kA*l zF9K^gPZVJ>m&W_|F9QJT(D1V6_H>`Ik>R*bRlCeL%_I!H{7s^R|X3-^XcuVT>Tez|4YO@NhqU>(*0H+a!*!!Nmfu4(dInQ!NDTz`)1!{lN1 zPjx}0NKSW1Hmj&vEWqak=X#M5&W`U#I0=me{gk@itnBzU{~kYS@n7(hFZ|fAT5>fT zF#JKQRiicR@W>twUjW(!e3ca`wqG3U!T5_~mskN49w7cG|1;s=N*O)QguUo-FrF{z zmq9#yUE+N9`0`OpW0dPRzkgo;;Mh!(@l4Zzacd7IGWpzHhpXnU{UMcn#lZJE%(Rfa zWSkNmVpPuaIegKb&YkWZdG{A8lDpbXoX=U0+g^!$6uoS{lqD8eCs~`U_gi*2_huc} zq#;owdsyzAtXaA1o$KA}vhK`Q%5sN`)t1rLvG(f7&@3q{J1@6PD}RlYW|c-uvn5d# z97@D*&C{~7vZ7LUmeFg8w$i=Iv%Fwg;Resz!UsL~7aql^j_ZYsd*Py9xK~D`SjTz^ zj!>BiJ5Y+1jZzU~5qoiNR{uzK zWFoHf&BD#TOW+;*2p^1Ok$jg`Bl*GUJm#zOE#rbXSnZN3JL}=!;q;Yved}98$5B@D zcZc!|VKJxDtoG#DLmAmLfA&yjb}AnTvb+%jV7?Xi&#KPaX@9*h>sMKCWQmb1&C2sZ zI*%iPP#l$DIx}DIN=VxdDe7RB&&r9@)JPAe#St#X1|Em`2D}Dez+jr_kZZs^tLgGW zO^l6N#N+Aw1)k6;cnxUUTjDdIU7rDs`i#=DxR1&*pOI4l7iib+%Vc7M_e}~K!0q-R z9v4goi8=XJDt{o@ADAzYy%eXHx(SO8j8hPY0rlX;NkP5 z)^g3Ql~eGbRt^~Y?0}^l(T6cSk6PYfkTpV^a7s8W ze33F5RttNeKmZ#U3|+$I;uIf7vVjkIbM41^S_!T7i|l9%_RxHEfziDN>6ND#Fu26GIIn-_PaxoRd72?%nSFZmz+-#=Xsb+I_(- zAh+%gyNlhtI}lvCr%PYdw3UG_9t67hIC3XXQGb);O3LEUF9xXk?qIe%R6PfJz)@m{ zKdQ&EC+cuB`uRlDkaI*!OGjzW!KZBdE)(w2;t><4B>_8>NOaP9bZQHszFZTKPf|GL;5pwXz2a1WuH| z^?%^(2pi01<4`>iNEAegSBaF1`7Rpq0r`70g2~jkR&at&1#=h0TtG3Lq8bR`0Dlzo zi7VfY=5xP$7e;sk$lM1(=30S*JN*^gF0pe3XoCUUHX9 z!G=&vh=gnr6bMdD>2vB@v|g(1poTP6A+6v*v{p?ulxBUlbGEnH&*SQ%VnPFOq0 z<3`|EmN9tc=hw2B);B+!`l}wy#M}%3%8T3Em+)?c;$aFpL}x9t|yKOJNI*#;{eaF9Ec>#79X&AFmRSuC}hvc7L2thT;6gna<~h6P+)RA>US$+dHYLT?Zb~dGIUk zD1;t0ChZV*$UC*2HeSY(O}0z^JpW2%g;QGLSm{~EZuh&9H@Y`?HuyI9*9A4n zDZ8bh#~E}7{hpxY>TOj5y(P|@w_gQQLRZ5nuh0k=ryJ=F=`HDN()Xl`;eYfC=_Fmx z+k-H*4T~8Lwj4^k?U&uIV=Xh3Tf0dN4q__;a+Xn3sw9jYI*No5c00QXT36NY=W{k5 z!o%=giQ5t<6UP&`;l3XqIPl^7$BvyPZ=BuPaxgY9u`uyq;^D+1ycN&=CXq}guU!6) z(pEx9+6=S>+tP5xxR@BWlz&)wBw~vZ92ghdlWPt^%JoPO21=FomM=u3&mL_soJ_Z3umrBoLNIaVGz{E~$i!tKf8L!zoc z+Ryj_hqN%_2nl24#z0nJ^?nxBZLz3|C`n;iam%v8TQsd7$GbU>hfX*R5zK3xpjsqF z7G+5i1fD0bLNrxXpnr24_-}TE<@*>0ud{`rn;$lM_;;`?a`?*E3$=Y>>u>$l`ab^eC#I^dhd)zu zGYt%uD2}*r1iK&wm!c{0C@y**YhYjC|HXxgU5S?y?9n$ zN?H%n@IK%mJ4!#M4Xew$?9b9WPe@S*OFMu53&w&m4=4%HP#x} z@X&qI1B$BIV8SR!WuG8XRc5#>7CTaX5johBfiv_1(6V;wUTU}nt%3dm>6JseT+5Em zijTVlVg+3U|yC^9_^LeU9J2ozMF#{~vO_bOVC19u#J zDUs+re&Yed86UN({?4^?n%05XxNu+MeBztLg~Yoz*6kvNkB@EH{q)gC9!4;hAu#tm z&;)LjhJSV(=`iWcXSVp+v+gv=}sp#8hDG-Pcfctkx&E|c_L$N z*cL3xn17zJC}Vd9pJ9*4hSeUI1L>wW8B0aB>cOz4;t6E3;r1K(?n=LrVTTL2uzu?6 zGJCMHlgVr+3<7F6>0qFe({y!dda$eNMUxfT0|;(7%juvG`e?$8VU`^dsbtJrM=j6t zde*(o04&*Pr#9NX%>ZOEhOR5B0OuAARahV;EPq@B9DoJzOT%E9=m?Y}7h%ySSIWHf zk#DiT|EK#Cf4i$0yI=3XPO;PA?r0o3Est9{`3Dsh7~fFz;3G%wc^}I-mUty`^485G z@y)lauBuu>C8-}6;$zS#Ues>%>(AptKCFiwb^IE?AoDNyiO1_8Zl~8_bJ>w@b771dDll$UrZPbga48}O|>PMT8zm{@Dde!Ef+CR`vDegT7r8a>pSFYjmCZ`6-> zl~9kpE9m0!lz>SWaYX&Q${$#^a!GF0;D75%|MaKC`CWYOxOHnMWdBMpA7AtSm1Eo} zI{!(q7Aj#a1knE)zk9rjw6Zn{Qn` zf81;^&SMw<@M+?2*xT{aN96N<6MrV&v+v}t8y6M*;w21rDVA`~UMfdk1qA+;&t*1m zA0xyKz@j*SSC##se8gNF7K#NT?3e%WG>xLu_@7>J$+Qo;Ox0IYrYdKp>6L%dE2YY# z2ywZ>DWssuhBBZ0kZdL#;X$4rnoi@7Iu9T??GKQ8jayI{duvzg9Wf75r-(1_RlUW;c^q_AN=D&Op4F((QU(%*{`mnBN&3$ zlV-99=GM=MP!E>iG8mN3g}Gvm=Y|P73NuS6z(0O7?dDv4t^RR6D(a|D&29+E$LqW1 zvlDF5C}ERkcAw>7gN&+zU%u?@dTQ1K5=;hTm;U`_2UeVujcNOx5<0tgYr2}{1x|_{H_crE|TNi zAP^is;daY=xczb)_kwJZn8gH(ofvSDsKsV2>K7+rdXe0vP_hFYrao~p5iYEDbw(I+ zaFK~5`3dKfdXYS75PvC=#t=jL0huf*ZW5Ae$#CgG>1pYA5W zWCL#ztc(JiH5XIs!fr>wt<>I#fV!Jn(ZktFSs5u`v7 zxZDn>i*plfXQ53_QdHILQN0LR)LdC%p-lxR6|DTH&?a){dOh7SO%J}{!Jcbln*S!C znR3)RzykHLu&`W_3hQG>DwyfGCd7%K-f*&U*Vy#L`G4^E>#7%)B+i40_0jH;EgQCW z-b4EComM(*Fd*pQ?s`8U1wd>mk;A8iE_mhC7gk) zNELUZz0O^iGr3?gsQ>x)%Z|$~=OAl|cTj#wuNvzxZ%zKNUKg}ZpZa4BYZlFFDb%ca zHm}dq+kdM0yu3dfo6$I2!i*=IgBc!&ELtkfFH9L#(VSG;H=Z)C6ilHoX1Ao?Ld$YSaXHLQFSaXp`tznxMK zOMz`oqsUhpakyC*iom#vtO|;(sNg3ZGh&hm0$k*HJ}jtiK>$yR z<3yEHIN1WVse^?HvRGtE=G)1vgThD|62mD4Y21Ny#~g?mahQ2E;t-$)tv_YZb_W~+ z&hnxZI-S&;0>_EJRsR(OWC{Ro;+?1q#+$p#=tyiQ%pt>Yfxz``n17{E zgQZZ3rDnZ@Hdo4GW?@(=j4>6)4(bL*u;h3E=ab3!$DLjBKf(x)*myyk#zrJ!i zY5OWM9FTfHNU6(ADu>VtBS#dDyN~<15dxkgyd@B)Bgbm9p^%;fM6x5Aziokq*Yqq34cAKL#-^TZ@%@U@73x40cw)b5r=(V8XOiSF&YgJ z_F6ffo0l8CAO9KKZn$mVj2&ah!oJk$$3J8-TzX zOn|JEuJ@7jV-2^rH}o!>U3=$@$2wof`S1UzY~=Kcikl}4J|dh*%YS_-asGdf+_`6F zO<^Yg(v?!1bMmkE?K?W#X`_~;f)Lo)xkw{dZl}on5o2Yq5pkeA&%=7QsJs?JLEbC4m4NEev?$8w^Mu|?zM7}? zMPbKdqP$Mt{owTl7mzMZeS{TcwTA z5STnf!8Tw@kt{$K_!@}Aw!>i@u>R^e4yN1<8vQbZU#Zwv{r^GmD`hdGZfO<+1qg;F ztgpis!&(kAzI@P1gU6STTFWhlMoTUn)MyD!Ab0klh33w7y__;-B4QCT7yZW(j>C0{ zHtcxi7`7ky9e?&Do=$vu>@c6(Ig+%~?|1K#r#mMBmz97l(ZK&o$CbwPBmSeopj>;xB`9aSUObk*_s+DR(N~Z_#_KPoj1p>-TxzYL zMhQ5?vDS02Mq~A@bPE%#$XF^ipANFiQBKEj(9ROWrkC@wUM|QENF8RZwa$DOYf(ah z5DB?3-G2d3-y=E8>sef~X8hEXD3m;l(%_q(JUd{(fI6_Z>%p9i^mj6Ig&8DLPXBE1 zw?W`bA}>n3b|p{W^Z74g1Doom&Xp6N1hD+_JC{e)mLx8X@M0nH-F;a3^MT4KlWuC7 z_rtVLe*4+8GY`!ea&cTPl?8W$Uoin>ffwyEe1B6Ma~#_RP7woQ1*veoz2Tk>r~+8zw8=NwxdG--fn^Vl!K9* zOSen8ukM`U#tb~!Jb&NyIFNZm<;cZ_IIw%tjGOjtCwmh9vrU7>E<1-$efKV%XBIf# zZ-2o&bzFPc`6`dW-c1^Pbw^yqaFMXAlCSY)m6TaVs3Wwgcq(be&1AJx{(wKNeZimA zc(sUsM0$=aMKV(HL_<+vnd2hu5r!VSt|N6Tzndp~IJZxnZ^yC2idv%E&6oEyHFD_N zdpoFkd$HZHueOW!py9-)oTr_{Daj>hjeoX{Za<<0J-*pAd|h8?|-<& zMs8tZ-qvMl_|Tv6t1U$wCZE2N==G5FHPyA76F2ia*uJbZ^q|pafNP|SIOANowcHgC z4dX^xN4bWDz6mKbir(erUXs2E$ry<}Bj#R&&gS{AejJ|^Vs|2*)#4~ zH*?MgK6lr+S&6?SIun-??^I9f{FFO>=;?gOKWS{^{X6>@)*8M>P`iB#@E}CqBJd*J&PqK8l~Yv< zcn=GVpim^2XM!cu1dc;4UV|{*DjLu#e`vm>V}1ijL_c^9R0(x2(+cV?P!FNYFQ8NV z%|TG9sOzOmD_UHi+BMi^Uw>}|<7*V2mbf3^mH1=gt2>1gS1#e@i63>|gx}woc!s)_ zXfJ=g07OSO8M-K7N$?5N1rCS71tfH#SO6#!M~H+kB$^iiX9m9*I#jQ9i3I=theL+hSOrV7TNMq*i-Cj@NhKfz+PqK##t=FnU)dv&>fTIoZ%0|SF^Wed4@t* z4lHq+bK-Jjr1g)d?0@cn`&Z_EhFEQ90Iu-w?_@SaEY`ZXR=)_obw_8=1=oc>C% z&@LQ;3{4M0-gK-|#)D+zz}?Pcp<^44B`)J=Vq;ZK)s)ra#($3q3@x2;QveJJ8~O4I zIbJ{Gx-7?g)+Kd_@xc>(EuREFm~H5Gf)x@V;|M2GK47n1t&|UNHGUf`u`-@=f{M#P z{gXSwf=F4xhA8f-lJDk*dddd1AQOUt4&<*4_T+~$UFOeeqS9LoLu2^_+1$OjU& z^rb{?@;n~`%YUW-y<_xS?|Icjewem7jXc3UCG2${`} z;<3-=jbvJNO>M{7hBnrU4eM6$(5=|pj)`HKHYBA)omA%SHa!M|dr5a9Nz~({J1lCkZe2Wn z%8JD|^smWWymIQOk+Us{&d`Eiu6pg(Ij`TgBk}Q{UP*k5?~2S_xVB~9k31i7%~M8C zoz>9mu7BM(uDyA~i%UY!-}PeR!bgBt4J2a&tT7ATX>87ye#4WU(sBGAep9+&6=W&M z`$e!2(ExcQuERgV%Oo`y$E5yvpj3@VOFJ!>#mkbC!{O{Uy zoy9LuSK?dM`}pnB3H43>J@txe<#-8%q8HFysDGC5m1;Gwc=&)iP#vSrSNHPA_*d0S zydqJScKSi7C(j)6_-K08@Mw-W=2eNOWwFdZC$eZJRW@<^xPZvw%*ZwmY;_)E(McFZ2Nk(Dgn%1$9NveC1{|M-79>rV~tw z?k0@?OjPAdj=>W#+BP<4|5WuQ)H6$L9s| zKdk85TxPmc=HA##U{`^=f2p-TR&h0y%sf1>O6aOY?3e^z9HXx%am>Xw$a;Njw=pb0 z8d}cl4lQ4eGT(-|&8KE>FRp&{2Y<^R%}-C9PtO}aXl|dx`Haf`L+18Qoab}zd1~UM zNfW34VA#&iIx_vIeJVz7-ku<&`k`sPs@Fcyc?D=zMI^qN+lAcdc4Htw9lYC3 zLP|(;y9*rUT7S3JpOh=4P|J3cY*MI@V$R?QSLP~K4V9>6t{AZDP9st*8GjOy%51T& zH((Zec7&)wFUVrgy!k23OkeJyqS}u7i|~K0qh6=)z!2T5;iAEGFHd!bgE;|o+EuHc zs+@;ieFxlI-RJSC{ie@(aOxH!VQy1k(eRqYm&FtPy{ljz7LX{@m_!K~9w9$i6qo2l zq!*c9IJ%}GWl}Z_8v8-;{eL-&EUTIYlreE~K_#eWq288PEE-td7YuKDIIbeW;zj{W z4l1<7(Ll?3q?n-v6R7g!s@Smbq};++@?&|9KS7E?6R$DsS}DR|Kz}NS16L(L4Ay-; zuvmQ{6*!=I#$P(yPX-#loNZW*)ze)8j3=pg@1xt*>B2sin27U!Gtej6^xxu00 zD*UJ*S*jGribTAD1L;eGsW+9^#vavw7kjL)xEesEI|05QTigNG-ykxpa~F*(K7P6L z9y;TW#C-nNWCZ3HG&KAif+@lTuZy!+w))4EZTl8;-~qY#ZGVaRM~~9^%ukFba{)^_ zsy1x-_PrdD6<`M)Ipvc$3#N(TipYJ2s{B)XD9jgAO;5HTay&ktz3J}g1PdF`R;inZ zhHx~OlGxf zoBCQU+ySl$Fn=q+YM5`t*9+?{mxN0ez_4g(5}GW_h2<6zfl)15R9OOJo98SSWtl^A zSXYaH2Z00e4-J(IXR_ac;4mGh_IQ;!&iYR3UUoQq<+$q=43%50E{YMZgk2vm#r^tR zq!;c0c3i%k_#$JGA(Jb!7E6j?{`@6;*I5UeJKv%~T~ zg@-gc3giA@6eiO65|j4;_?T}{*Ir* zMQ`-Yl~2c$AYZ8L8m`~bAhrX_1pcacW0^< zQasJ@`Fr!SjUK;wjc;QpL6;Hzp@%_7RYO7wn_OrydiO)XY zPBAw+`7!?`V6GQFZCrQU(Vl)Z|K(mhpvME~@%UrFXZcITmDZ*C?`UsDwK{c@ZBkZU zbbqck+c_uFoIj`6iu85q+asDY$_^7`#%XFa1%mPMS>vNGX1y5YTeDiDw`biR{okzr zjfyd~(3+i<9WA%Uqcv)cby!wabe^>-y2^S>)<)~5tS8jH)+e)E;P6_-EHN5T16FUA zloeI2V24lk8-Z|qksmMe@Aeb_3DSf@Ab)?gV0mT;hkCm?G?JY>7!?f1Q|AsE@HV^$ zx8YM*#((FHV7bm?zIUPG|03zbKEvgU`)Z`T++d%~yghoGPV^f5g~Rm6djH8JQO$&@ z2aqwKjv3=jC|-;$ro>{$49=y}#j$hrWC61mn1_`G_z0yBj?&jwsr18xE_#CCEPo`B zd-b4`=1v=SXSp@(ELYjrPRqbG)1b^+uKMZMRUYg4*AG_r#b(FO#t2+9G z`c#&RXh<^kDx%vF$YUS2Ppa#nrg=1hy?vsbH5!M5yVq~M=eq0T$N%22e)Shmf#2kl z5@%eu-g^6}qFw`V+iT0VB+(0r&wmnc;rG+-*|2JSd{oHUXVBzT&$j$>_Lsl4w$3cg zDv#$B&0cVF^KI|V2X`5;mXaOyzP0;3Rf7QeeD;9Y#pTp-{ zM_O;R?zJAXzHC)6k&z}^B|)`VC8TLqYde0{2&Q(dazx|7swTXOB*S{jdVd-+&*6L| zgGxDk6!APf0LyghVPUI^RqCQSb!oTs0<65Cy^^dZgam9S@b!2k3)!D*rCX=i2}LT0 zE>?8bvk*Ot&C`S`Kl(1!Znt*@f_rP%X|>uPwD&aur9!||C)2}>xWqwspn=OtZtHxK z{OI$eM-vwk`*GeS?q^qS`hPm{4#~h@B`k;}A5DzMPp~rs9<gb*%qbv14~G(FH67x6)H|*k>)#>3J@%*LQ-5gTEjei6Bx})}3nKN~~ zVB2@!{ci6~cKZch$cf*sJ0 z&WI!Gyvr$oZ*5h9x=sg}^m`1i&FZ$d8||kXyfR)tjz^$wS$**w-DyXG3KpBC?-ZaQ*6p3w)5Fu0 zWo*DQxZ6Wdp|+=Mp63F7kx~a9BtUldjo7a(ubq0!s>W3f=YO`5^PPY1b<>RJFyFj2 z@w+6#tJ0@0+PZE1`uP#^UE-T>iV_#zIr8I|=-G}bfbl|DV?Go`Cyhb#EX(Be@{Yh> zVXyp@ZJ+D7?Wp6V>y+a)m(?TmcMQ{S@g5<6(oegk=g@2LIFBX2QxAnhBt%h|0VoPR zVYg;RiXtRJ5q}nWqEf+za#~3$oYIcR9@>vFrpU_5RBr}zQ;LmZ#mRyc<_^W4(Ocf0xS&p~s{5hd zysPcI#O2rilK3kw{QKTNcRq64_%U-^CXR36CuB?nTWN!DZ#IfshaL6Qc;M#gfO3tDLm*2F>u zeIEsKrhhYK(|0h|!CiBw$9Fs;A-;&ySvG}xamA(EapE6R$IJX9Sor<2#OQ?UC0tBa zegg!fzh&?OJF%_eA;*!FJYy(j<=`8^CACd1zcely`D~lq8Dm@|5AMOG02KnCBbe$Zi?F;~C&`?Nc*RcT>0;%m_zehl~CDMg;^<01iGHd;>%uR`hl{njeNX2nY zn}20OO5;hq*_m$t{^U zUH16mbwZsw#X8wl=c@}&PJcpuBJHwr$$$E_TXP^=hz2@%izjt(K(gziKOzS*oCTmU za~%$La6s7#B0iXz+G2I7#~YA~|MCJP)@r^2X%?E**{)_^b6|G5SYL;k$DNm(T0eA$ z6pmlr{>zOjdu;lVWt%W}YTiQ?m`hx^Yu4S(wkY~xE_|NdpsEjUoPY+Bi*kz@l7yn4&sE#akUGbW+bsc11k&-xI* zVX<(za;^m|02-uQV<>3@<7#-|pno{qnPjHMV`+V$6fUA7s~;+#t30o$s*9xYx{|3z zNiROE6oIQUmv2($sVm4z{xM~rdPF&)UQ)hQy}S8s%5L>#Pcbwo&~fJNrO7{EkQ+3BE)${weK>Tywr{zeBa0GU3>=ncJud0A1+Lq7y))sG_p z5@?3gc#=BmBgvWcM>DYX5P$tWs}p1Z`(cV3>r+2S;hQiqF7%TOX|;^ylk}a&NlVzG zk#;h`aDuf*cPAsdI~n!M1SLS5vC=)p`b7};F}>pNdPOjxceZx6Rs{W^I%7}(=2!Oy ziPXlmp67m2YuPmcma$AXH-zcJt!IC!xEzYLvR$}1l6pJkxCcLnRevnu=Mx=?_Y)r` z{sPO_&wcW3HGju*+EY5SDDwms3K zwlj(<%A)F%y=s43wSTSJF3Gy$aNFE=x8C2@-#)^=%(hB@UA3%KRtA=*Z%{S_)}@Pz z*R5!F+XUM(+gjUwwx8JqTiB|(tyayhd8|Hfj!Spr2KOE}al27CLW3<}aeYe^hoi+&5{-Cz&N!>*PD5rgQh%?fOB7!Xz_5_P`aZGx z9(Ino&zK^nAM-3Euti-Ft`CVu9geHJ+oIdaqQAYl=A{=KZk=~1@zb{!PrPY%#h>4t zS21>E_TlrwiLt-E`hbz(ny$gUiFPGvccJq6Orgnv0S73(IsM zpw`_0L%sB&Cd?yMUuePt()5)kECRgNge5dX-)6!xa_L{1u!4p=1QS+C zqkm(x30qKK*VEm7NK19ePF^oa{4}Eute$N``Uzo7QQ5d!HGwj-(|u)^7}IxtWf&;%S;&P8z?nl zXeUrg>!a(1^?|)1f=o|RZgn_=ny(SFw4gSG|fxe+BCJgiq z2TT~~8~&jQ1AW8)Yr;U^y!#ofQe5Tz!-N4>d8s*q_m7bUL1b111dP zDLBU9OjiF@6Q=cFXK*&71VaHlcp3bO=0gGo&}bGjm`JOW9L5KzmEzyBIBp>whe$wHWR< zLd~J9k6GUv=fECy!riq7qRFh4CEcSgfnJN@6Gr*aMl+0UG2B@K-`UVs!M|U+(7FtVr`}R?kZ1Vd#Q<$nI@+$`Ch%H&}I|EN;9OXwr83p z%NV99M_uLVMQr6RW`7vHnLSTOO6j@4e5$L5ne6%HX0OfWOjGNTwr~{-v!Nz!Eme9I zugxZQ7nw6@X7!h`+*PVBVO)AM8{NO>i7wf?q_YP zH?uk|Z0)7EaUpv$HIts)-Q3Mtbmgx!DYJl$hVtfeb8V&M&duH9Sio{uxp(QmXrv|o zGQXK-A2V1B%NV9-UBjDAs1?e)FiUxRX7>zdGu{p}9$3k6yM*!G(r$T@qB&-okij0h60uW9!3o-%_|Y5Oiu0v`asISgoECwhxm|3!uha zww7)NXaPVA8HJiyZV8&scpydbKHW9{zwKcK-DUBIFw9)E9K1*pb3V*d-Lfsk&sX(PPidKw99QLNYW+5wGINQ!rsuF$n!05o zU9ELyZ+~=kFE?fBjBag|>T~IT!AzIzT+uC^n#>i~)Xme2nfzF4uIJe%KmI#>b*(~* zv8EoaTwTTA?{Ai=0VxO0V3IL4>KP_w7Md;pI|}8oSzU{%ltlhMSA4(cF4;zmO>8eQWypW(n__y2&WJn!$_ z(ITZ-7X43FZ7cWM3ME@IC5n+uJI*XpmYlh)Eya=ps%a6OsFO&T>yZb+2L#oO{X|*!@Y2IClaEa1Gx@BDnve*mhzsi2JK9et(z6 zz8yJ7;;v)}qn#M(a@!HyjYT->FzLp<03)XT^PTJd_h-iPSjS`8TR9&NPvzAKC8^TC zq{Atdp4M`jfi8MNE9A9;Vx+Yk&1aJBv`;aV-y_t)l+htAW3nEdp2`8&dGu%~h)uYi z#xfatHa(d#bb40R)xrgJJXT06nSWj_GhWvD9Pgp5>$#WIg3eSw+a3zh1E)#Sy1w+smd;u_7#+3IycF%X{0wu&uU{(eSapMOlcWK zKg6^b(#f9*nRZmam4pAreB&3uy2D4g0 zr71J3SmfCw0W3{{yzCX4K{{wwMecIxB!9$}d|pKwb4e9O zoOGvIvZ(rX1d~-WQxvi3sGSVckxgfKdJXqL(p_wwb8u%(_uwbCZQGdGb}}(0P9~Vx z{>HX#+qP}nww=xMyzg&!t9Gkz*Xh&U_w@aztNM1G^EvL4goDcFr<7EgvJZdB?H6Tg z-{+vPG4 zJ|7TP%AhMJs2FhL0nrv@!`3r7VFH&(y* z!);n}RXM7-MMuwKoXtgPix1VwD~giwj_qbMM00upGAdr7Tmxr+Oe=^oqm)p}dTJKV z{uY+nv#3ACniCy~DcF1*_PR;2u#D~M zp5oSZqb{9=JS^BHsr|ULy`uKT8*qt)O2-M^A+_0-P}?VraKMKOY!%8mJ+-%W2;|~! zYpssp!O4l~+YoPyT3qz#{q!`hs_ZpU>(ozJs1PRYhp;qU z{wNpSplh$xbOgwMD-b^jUZd!s+KBTa-xzYLwDXYt8Z`8a7y`$Mf@8zSvEX4_cCo0w zS=QUD>G}T-Y=7Mt`XyW;%{f&Gj8Ja5B7H%8I~utn z{33c?^g63{Di5d9)ipZ%P)sfrj+Q%EgIBOR%0q4UQ1xe^zY`K*|IbSwPSa@tUhbf18CWV8s?BE6ew8d(K+b28E?Oq7Oxy5tzaa zndhS@f?$-ynb+Wt#LC~U>ZfeREKf;_7qCk&$TNLy)_-vKJ>}EHCY^iF8%tcoo?S}* z%m?Ww#-dkQ3M?{AE714n46h$Xej9pae`cdTu%Ptq@G@fnlngDqmc*Qc@>B6zUd3Zv zNo?&H0LJUPH*MFRXblTi>2?Ox8~Q)_y~(u22dnJ=&J`Sz=p+A4gpWp)5K&~v8StVU zXV4Zt!!A6*ES%QWxP{k>h-Fv6n0D4FCb0<-w;>>N#M3LvhiWhQe}rL5Eq>9Kor^)tz?+Q3*+-d?SbVe zOTg|qoYS!L072MQ^akQb%tkv-2fOsd)Ucy-wmjmO5bL>^t5&(#drmasCyWrwKGB|0 z+Vhc<5{vUyu zhuiax2WAjY0`7weYJeCl82KMT2+sMB_AQ8^MNoq&5r0Jn1AvjhzO{IgTmccEU^@}W zU_?YBLLpovU}DgJ6mfrVNFbzLNN7+nUtmGb@9L8+pb+_82`R;&eXc=vAbO{eya?X~ zz7>1_tf?p{gJ5IAL?3lhkqM=}X>I=%09v5hexh#` zsCGZl>e?unGA%4yI(v*TP#e?)=hvT?Gtvfl_9tUC~1ou^4^xLdcB zj_|HGuQzWupR8IBv>!tqRX|kOORZEks#YD!%v+@LYj_Rlbj54xqpj~Q$SnB5cSwCL z5v(7AwX4?x92;=}t^Jk9i(AuCS^-a50dEz(fC|-}wF;qfO%K8A>jZeUS7KZYW`83Dzw{>V=uLX z?_-lGK`=8)ekZ;f``E{s71qt>e{ojwCYwHEvj=OHU7pNTa(5Iz1Ht-*cu2Ai~c zK=l~mj`sLE_jZ%T3kdAjus*fY)ed7>?IO{sI_V-&ceF-x2RDWnmh1eMsDI*F zL(2=wfMNAkFr|aEwID^ZsaN4g9z+1>%MYII+)P{ApDVXa)gO%>@se*6FljD1p`b19 zX#(NWWE}T5zR}l^Ge!Gb!&@=@!0-Gq0QLBxs*`qz^N%0yac&VF?9V2Mkt0s!fg^kG zj7N51H_itu-6}5-(`2AlV_QjU2WLI51g%?vTWT#(T3&vWVOJteV@U_m7NGpmjxS-g z#90Yl*aBU20MX8|by5-`A&;X*9>{xdHJeBjN6N!W%OWyVij1^Uf&!Q5_XOUY`1Iwgc1CL_0V68Ao zWP-fKtH9L5fK-ew3rq7;v~o*Z05ZX4LuCEHQAgCIW=v!A0iFjZ69wdw`1Icp>q!_R z4kiX318ucO^))%Y=-;mHQ@}|64ByhopLJgM*z9=4$>VG$&hyMdY{POuIt!aREn@L$ zR~YK73R}FK@h^`#ZirSD!b}w@dOuf9W0$qydhfD?K~EgU+3QrTmwe~9|E~do4U_U6 zdT?l zuBdTz98leTag67kiYH61$Xw>?V`5wHvlvLOz^q$9x!7rZoht`iLZI05&5muNOt?yV zl!E`{X*JoBulq{8k)#T{WVj2o_OfFBOJ1n&b z!(l{StleeW%;DYUx&KwV8f8#LBu8y()eYBr3+znSD=-jEcsPdmVc%Acn4)gRw z`Baud_S}f7*&G6}%4S%Ov#pa2RV?N-J3foL>^}6)n{GkAu8w)e_P-sLmc1Pj&>2+2 z$w7j%3~5>dyCeLr2Y1%iu`M(oq^Z>c%d2l=D&OeCdPjzQvNf2w+Efo{ndYyp4T+sA|Ty+%ch z5com1EbHcx#-NRytHbj(R@NcLqN7UdA{(4bC6rmEW(Ut*Qp>hKk!p_{zt5OP5*vnw zEa8`g0r;wAq;H+;Z4+}Oo~!kJR31{bRZ2L8m4L2%dH%+sgI5=VA>AG9SI&vJ2QJG# z*OeoCUayiWqB@nSAg7j%iKrvvkuE5LD5iXarO5a{rhS&>X^aaWWTa(0x*VJbhkJ|mRWQ|7aH7$ytmwN48!h!!rRiplkqa$9+^aFde4ssI zyz*w!+|!tU>%~RWRgb@4(Hx@z>VR}ngAZG$oUYoJ?|~c<{?n?NDBFUrdfRVX)E~Ze zrXGOpU#~Ej@t?DH_j%;lTLkH9c?6Er$4y7GRmEw8uY1n($4xR_+5ZmJ1bc;J%rGp{ z*3e9|9iQ=EB(pu4X==`-Zn+_DEIsU8ef4pKs~cx+y`F#!LmMaEF#{n1b8`HHo2O60 zMF53OYApS3{Xzgm1AHUq|AB_HF){utng0tI|407Q$Ii@5$j;6V&B@C0zvuh|Aphr` z|6Beu@1ObqQ~%Z3zU_Y3Z(Gp+wex@0V*Jls;eRRS9RD%+^MB;GagKjJ?7#Xy2L9&* z|5=oko%P?v|GP-i<~b-<(tH^xIVUIE|3f%u|F`FxVQy??WNly$4bAxvRR5nA4-dnC zw+jN+InK+nP|8L~^h37Z&T(r@K&iU-asVL6DB*%JqmM9}48q`;UUV51r z(aG0H0)-2a$Q?L0lF^EA&-BkdlNHPDAe=33YBuIH(x70ErJe&~Q_(Xxm?NeuOE3%c z##TuyJ5h6o>(VV=?9rAxiTV|Mvc0qQ_x&ND=*Y$f4)%`KiN;Z?>vOC6Cz)LuV8ltYI%el zWg>_IV$`o}{sGlNem%`~s!vGF-5Tw0Kq&!6r7 z=e%PSncX2h|CwU&2feChO%D*=AQ737h#TU4@606<2JEm)(W;%lwDSE?*)hj}re5Ql zFCk|Gg73?z`9MCABA-rR=Fs_pv|pGN!d-pH8HAhoQ{r^TxE)kp{0hW*oQzk<4s@@a z<6P)hBx?i4lyEA!RHoRa!V||t_n2m=@_vVi@qVg67ZB5u@0ea`nfYI+sNequbOui4 z$cMP0V%fi{YspNhPDPr&LFFufY#SgRoGr4%^e?1q5kI6rkV!WOyjH9We^m;nJrN#) zFW=wN@G)J`QNh;z2tcY-nsBVzQC>lr!dcl}`cN3(=PA6+h%X674e8EoP27Pju@+P2 z)ClyvpU2|G5E}t*GjrV&TQMgNz}mujy%fDkH6PhmVcvyhGjjL9T)=jKyKUB3;ZGr! z*QT$Fz{d*L`|1e2 z`Tx!lDMm(zq6whiA+G`Dn;X#Tuh?a~`E^t8B6lmXhMM2*!FTlzXsbc1S*ZC6*4mqV zj&`war~1S~o>Iv61Ri)vdNm;DdVA|Fr#fL%$xBHP|&&wcYm|^{ny^?nUrL@rn6`mPH=_Ea`0& zi>M)_8tr)960$A_xFmLt!w{5*kLlZYw2Mv8rN)yAJEnXN&)GY6X$|3%LVyVoVzzNF zoTmE?h6|8brg)co&bu~23Mow{{1ftG(C}<%o8{tNwLiMr*J*^Q~~Yt?NygZ<7DeSg;sS5HH*A^S9o znd09=yA5$o>5zyIoaO-9tP&cuH)4v-N%=0wQ|$sWLd@T74b2}-+k1EHbQ`b05D$gv z(uOYcA@+&_P>%eR;y$rmMw<{qI3NC7?M+XXl+6;|1<#egYoQoSeWQFj^s^qRsGCb; zi$sqsbr@bTz2TfK;9bWH}> zFos~yNOlE+7rY6gq}?tk{aMsExXcjg5eNs4OH%D;fOI>`kuP|ML}8pQM*z={)-SAA znB!^Ad);ES=8R9$PkK*QwlJQE+WvuKm1V>!IHK92E-0J2d^>Y!a&Y`Q8 zzXEq}fjA#Ps>Y_s`M`5Pf4tN_w)FiK;lQBah0P0d_6AI2%1#ZGwd3F6z~iOrg68tX z(VAj#@6IWRO|$OrMRS=jbh>wRnqbI)XFqZb2>nGeHYOz=56eJLO*@Qm05=AAXk=mx zKQRp~JUgeT^xnCjFJkRGRMDCa-!@_X>l;{3DU+_7z*(Xbb~rB{kUmbO1g*}=0*kgI zi1zRcu9RFm9A)8@Gu4Ty5I#9Vw`U$s#`6bC*(xS$A)#*B=zMOK%=rB4b*=^s(C0`$ zU|f^VEwpcrlXm~w7X%s$Yg)MMwj#M$)V4zvEu-FTps@5cgmDu-%~9ykKe&OA;G%l< zM?Da#?4-q-Pu!3JeDr?l3^$}Au7CCMdEp7EQavOw+PK$`OD&_qNKtrkohw_nba{W4`n8+r`;J$-wtWa+GzNMe*&|?-9U+XHA-GTn zu^fUWnxZ5Km#gUq9#1>&9}sR3HB4DwqK}&0BTpBoGh<8`SXgW<^g-^(T4wT*XV92h zV)+W|v&44U^Kl7%F9t;Wr#Wn-~j@KVvRgFsP%nc@HF!J zlU6DSelGkICP(Yyn0VV&3_R{M>dm1Z6?*2O4jtPVj!yPM)a_R>o7AbsSm$SAziYX% zCtytA=~YHyYsl3j15?Eg{Ig{~-@g^Pf|o|T@9Hgdxol|ZgHpIj#ZQtwt+)G;(QG--o4Im~DS8K%Bvd@S z)@F|p(Sxw!I_q44s%YWTBLMws{fOJIHPY%|X>78i^W>JLTd0>|Rl2DqB`Il6!mJ$n zN?IzOUH5Oh?q2EG84l8Pv<6`KaH+D>&v+>=d*ygsn;a%Hy&Kf&*=&>A%P=#C{;xL; z+_l-3J63Q+8B4J~nyRzvP%4JYXdNOuvL$Vf{)>02K5Ex?!USUNa)6VnzT%uHOh@V} zzbs&X$T`$tHA1}~U(AQLzFG16e77l=!nxO^qN*A$$Ru6FA@a!B4dZMoocwW2nXj#L!?$8Ke{I&_HbFDgJ`20`ytaSf-9}RK8?5by3rT$C zzsEZ^$#!ZqOLk&x&}`Cd7_U)}s13_5I`*pECX8|&!6{cZYST|Cn$y}>&`6>rj48A* z{w}YMtX1JEi%t&<_4g}zpBQubgJT!e_$4MrV1VU;8zS)-7WT_l01`j_HsxnVOfYNfg&%G9kEZNh5c z?V3sEX6#C%<{^_TQ5B|!N4QWRm~i{e=YjYo!AhIBLFz1Do=otRBw|LWeLh$|3!FMEQ*&H{D2qo$mW`Tr>(CJ|!yj0zAXu#f9S`g87gFhOg(4`|;vF z^uSR`w2C~~-{JwsVtNw4U05z+Ad_x>{lDkd1vN#6CIIVj`Mw49@m{4GF?^0L^h%s5HxG6$~>PA#aqX#d$z-ArBb@duv-!b%jl6cU+C~K!FLuNgV2zX`S=j2C< zl!D1k9q_T7R8?9;5Cf*!jAml zk80JVWrl;*tnHW!JC9uB%j+}nGUL%iJ2*DkJb=efL|hm4$IfO7r^=(Tre(fXZZBW+ z-9P(73}=8WN$b3;U(Z2tVDBsk@M~+p9h%L*ngv^C5NcYa=`o7^K4bCor(mpS_k81} zmwHA5dLL0loOB7L(MOU*Vnv$v6IFhWcq(!hdY$vrwQNcA21dbLN%y+nrj5E^vVZh? znE|?9vAwhrGnF4(pY}j}uf1=x4~VuvJ}JGV5*OQ+iZQ&~dz8_>S3ow;&2cv{dC4SwY&2=BRUEycRIH3&8`D0Z zii?+g1nUKU^NnwKEc?x_Nie8Ihp@WIeI=0}hkbP#CK+8<|i&uuYW_=%H8AuupNPzZ)$H9&tjjbaSG z2!*6! z2?u4Is@nMiuSjTo6zj3_R@wL~a82PDhI1mKsi!3i#-QtbpBsTqTO9AaH5_)?`QU&= zYTJcmE*z8t?7#>f%${bX8NmI>hwlSIw^Q-Jznbo(eg1)iGNdMh#oyJ$ErDlAM zbdf!c*WIO*-J63b9Zt|44vJE;T(%oi@2w(`w0C1y+S+?Ke{oZhKJX#CmwhCPbpL_bjKI#1=-!pel6Oya? z+n{BhdxLr7&6|>3eSOtgiM&N8%$&Qf}Hhm}UEPt|B3RQlIPf6=RwfZ9f$ zVqyNc{iGv17k0+j`d^8rx-ri<_bwL&Pret&Tb~ml65UECDJMDJm9C4fd=Cop1YW{Zh_%rOPtT3dxt*S!eSE*}(B6Wlb|oLl-V`h9 z4q1{I!7;T#-vNWaRo38C;7Z;Qm6R)M#@&JoTbV8K!1%|#2@eP2XxJ!Ey%cnmL}dO7 zXV(V)9*m7SAVKLi3ulc0r|m zl0iBUcYZ*0LdM?ppp<7V=Nyv6 zhsWw($kEBv$fslqw=*&LbByrdcL~=N1hufBO9koFap(OEt`~c|MbJ#ph}uCLh!y=B z^MsF;AdTLJ6*l;kzzR6Zkt14A-@7M$Z|>lNrhx#n=XyR%E3FFL!RU{(uK46ogPUl} z`1BHNcFVoAR}=TjwU{)@?(LNukp1`=)fgzsYGdwao2-8zXC01{2g?Oh`KG}R4SW37 z;(qri=imu$PxquD*Ty}g)6u{kg4X%Uz>Ts<#l{Y#6R!1yZ0?gjO5QW$QFTkM&`Bri zFw+8X(l~L|=17S?oV>bTis%op$>eZmQn{lF+yrAiOp-%{c|O8ovhUCkoXC zV|iCHBkXWRFJmIjU41M=+ElFK*tY$Sz4rj#XT^K|eS6uG`}i+Ma{8I=8iDo*jvPI2 zTA;h#az%$i)$%cO#trv7TgT{vgNU8o-(IH8<+|YT)nyj1+ zo8m+*<}%YydMmY5)Nb)>aVUsLl)1g6D!8?lY}0XsNetSyxvOiwlD8C=H_uFu;7I_& z;A%0n_G6Hjz<-zVSKB?$_Y?I#>)Q^GWJ5a`_TP6zwoy#hlo$q_fSoG?GaNx|D9|ou z#S02|dEDtr3TQ^8+X0=SSj%ig;uEbMS1I93UJS@bQ*6xK`$s#XrU+3!k`xUM zsLUK9KsS2BTm>Xl+Z9ll#{ELC?5_YMH{1M(;}{fGNDr~@d)nzx@2w0OF5&t~;aHeY zVJrws^Y_+FBbr|V=a1=43D$M8S1B;Z^sj!_XBTYn{4QH-%+)oKY~u<}{#nrjAM=7G(L(a7=6nZc+)INbnb(q-ttmzB&k7)>>9F z;Iqsb*h~@XGJh{7>~G1 ze)dM;Z$nqkjqgY*$tV3S5t7z?$+IAHjitV5jqHB<3CC5k=I?kg3<+)k3uO`4>J;oU z%1AXuteHINT;?@yILMfLk6h4e1nBYY&8X6N^7C8@lcdQYX$DrD!ylR12OuN%ICmt_ zYCOYgDl0}BM;__}r82$O3N&;!zXl;DW}RA0vanxvx3lmjU`=8lLqh5Lf$%ooqqw0m zdGW^+Y{ayZ=;&DtgMTpq>)^PRpSPP!h9--A!O~t|`sXknqLvr(?=Demb_0&i{+BHf zZJX|Y*Mhzt4nqf^78lB_Tk%;L{C6pyvTs9Gq#xpZKSDJbVrp?~)93t=r?cnh^`P*Jcb1Y0oYMf!#3X@#NW`br-B z9MXBlc@Q&imFJoGvY=DY|3pXV58`6A!5PdkjZfAu-H<#;jMyAQmdgr(AGS^C;Uf9g z%ynY%>)vkDsB=F6UPt9{IoNCMFT>&LDpMRUs<_IAI=cv~zn2#y`Oxz(~bkB0g&R#hEv2 zx^}ou6T+a?FFJh0GYE9&5l$ zzVmSVVrvttufF2bs&B%TK|E2UeDSTa?i}?U+fZwAL-b3P^V-6>U=TAfk07VtQTs)_ zS)W3KKJ6ex$?~2oI~DzTX4YobCb$#aA#%k8WSJ6gB5#y?BAfg({O5aCy+P0te}TYF zm}nUgxV1|G&^}pf7YQtqHkcEA@WI#XIt=sqg#~6O!tEy~!ZtdY=t7$ckR?{mnr?17 z!>Q>e4Sx=8vvwU3B*lqT7Aoq()@|82K{xZF-c_3lCg`Q2isFP%I6kOuwNQnUWlkpc zyhNYSgKRt@zg<%OC5{(8obBA~f^{LTK|+zJaQOj%bltIPRAzdkX7cb~@;A>>0p1t{ z>e(DNc0h1DtNQr5%fc)Crgf=JES1kAIt{&RLo7it1@{B;!imr;DCPl&N-qTy0dS)p z8j82U?-L12u411#jvEzbIEGi&_elvA>F#Ef$nIZ-`=PP9#tS8n z^J0g9FE59u+JK*BY>g4?HePToFVsH)B5&pV{ejVEnk=`Y;&d6A4fKZ~5f(np`d!c1 zBGdXGUK|Ob1kgkK9DH=rK?m%#L(@UZ9O0XU;wLz{Hs1J%@S$%;MATP}=fV&n)p)#t z1P$UbHU$UNZ*-3jR6;>B-H6#|4o<4|^Gfl- zs}09=?qE*Y7$TpAu0{VmfbqFHD( z8lN+nn(}cb0bk}{R`*7uTKmCQj$b43QGQwbTo|u6*X68S{ZwsCqroOS<$URY{Gxoc zq7ySq8yTKN@UEurt@TqTkYzf{O z3)8kuf}GJPu)@pn2{mcyo?@{8=x+8Kb<|o&GSkZ~#vzb(CDD?;Ne}wPB=^V&o4%H? zToj#RF54c?b8@JAKLwdT1Ig+^+$#ic{PY>3=URZr?ymPH09}?v1}(fucD2wRXl(!% z>}>_J3)_kLt6yc3)`r{2k`BRa=UWJ%GJ)1VcNlMM#ad2?>ZdTE2;=tzTqb;6BDr=h zi(BQ~`f#$pzcv8?1*0sMr}vuSN+?%%b4J<=+@SA=qSQ{Kw2V23DYJt^rLQSt6E*V` z_+sdQX{BQRqXN4Do zaD|+1CC((oThxZdG!}6oJp0_{9}DBG?00m>qSWziXB%!8DjTRXj55yE^$JK=jzE^I zo7!kq(_(`?LnjJXv~`NR`LYhhb-D;v&YiNhPDfBu{A^ZYbQ>lBjrNwQzZVUMvR3z; za#s*mLdJBAs_K;{Iw$4M-v>w8-3tlctYvE`-dco{`JM-%bL)M$%cS~XJeD%h+{0U* zp<}RYSY(u%6PzCgw!Fv9mp!h36gek9dUdY?7N*l0J5bBaBDfQEzV5;a1~Z{!VcR%wkdA}H2JcLJwM`_T*H*nfujW|%YM4V#W5k(8!$WyuE45S)~ zVTtM@p*nr7L?uMsUzlFY8L6^{8ixe)qVjTEmHNU~A_gY%_3mGmhIwn`_1ejfiS%0$ zgZ#9ctoW%70`!0e;{*6S8ZxW#cT^o#G;B3_3~VU zx|#is>}kJ+c}-!EXQuWozq7To;T`e=K0Pu{ynC<=_h{j)9P)AMtV8ICrqT)Izg`jL z0+d>C-VEpD>(*kh8Qs4ow^V;HNzC`-+lINQ^N?qv9~1|R79u9eQPLn|Oh4>8-TdGR zMwn*5{^f=Y0LWQxYj>l&tf&#KI9sBY&#wGxOvm>(={;_O4%Rh$>=HO;BpL9E*#7?8 ziF`!j03n`0a*;Sk*v(`hCqn+BZB%ptaf%HM%w~AVl5v)~k&!Bu`gl3B4f)bn1ngvyn%{Iv-uQBnZ*5x0gUu zb~d3dfK}P~C65F{Xc8HeFUC*To(vd#FSEBpH65)5EO&ygCa1@J9CQcT^bY;h=s6za z^PnNaEB>$HyrZrBu*&bO>O~QM7ahM+B)zznOQQsD**sLgGKfQC<+GhmYYR1iReM;# zxQLgc3rNUO6)k9Ln{ z0sIMdiBlB?!0zrEW1A)#<>&*{nia$az%?3lh?9`eKyN0;RA`h)Vxg*4l)$+IrKYv} z3C2*5NftFDp$5XLzoH@EDyvGz;fJ63fKVMsmr{FltiE&Id|o&%Gp4h8$viC+r7O~aN`#*J zt{Y>@_HX>bv*3b$gNIF&DXL2X(z-TZ$4h%UT7Khqck*pMY7b5ts^sm$1l*o21FpOs zZ-VwHOwmLdP-W*(Ru1|_cw!(ujc%IF0BwP@YC$%HNSQh^e6WUENMS;?OSe)R&xSKa2d|fH@Y7K-=oDXizG_ zMcki}Zb1eGxu$h!+zvwq^^gp|0O*>BYvqQ=s9d7vB4a1y4g{@foAeriGr&0l<1uyd zz-5P&6bJRcshUu^OJ|gM0>-l!gc>-sQ;Dal=X1x*DvZg@d!@}fs%6Zp9qX>wS_d1E zw4>P7FNK}Ax#^rWuNodW`0`(rW4j-HCM9xZ!0RIweJvo@K$oEf8sOgf0dxH2!?lo7 z#tkcsz~C*U-VmqcND0dbBrVTF-%I4&Fw$F_EUzGy!j+&kJuBS+u%4QnBxG1tjF zMXY~>y|dn<46};dNWV`1=%N4iC5MDVgsWApja(ONjO*A(bdB+&Bck)4qJx%|!Jm{@dYm0`rfXGqlGf!X8%kq*+@J4#f%EKCudMDpB|!t51-G z4h%dUnK5Q$6#vZSQSG*5Jjeb&P+5MBZZ~bOdz`553bUjKVh8H8W}>hz52SX?JLN87 zuj}L<0({v7kOZs#M}UE&{JecgUgF@kev15~5&L^iL62ywxGch`xgoF{r&pGpqgnZc zw~*${P14O&o4h9{;!5(e6Kq?{UU1??>YtKo+cdP_VV6?Ha>??4W&&!}#l)%55+#j@ z(dr}{qYbG@gbIv>g%EIcL1JBi2F8-DLRaXqdTi_hC#QnLMy} zedu@c45}`*uP$z&sd?btqg=tRn{_6%t~MYl;xf?1sQ{e%j`si{f2>YH{y)i7 zf_hLU@(LZ=nb1s21N2{!ygQ}Wk7+XKrsPJXq-1q!ip!GSXi-KO-ch?mN{T1N1x&v^ zIxST<9>N%|u9M)q^fROFKj)H6w!T35UX6$3+XnwuwE^InwKc+{gl-=oYSM** z!6N6KRtzM2LP#}aV$kIIG{h>S+2h&{x`5RVo**a1`fTX2M9Jq$6eBFbbmY|H%J$QS z#a@n%>DyD*sW$0^QAyu5H%l!Vcp{v}+7futzi*%j+bQ`NIs*7(_{2>{I5|x^;It62 zL(v!pLjfWu3WE30zLa0UF}lI$?)=0^lmimKsws>0y4@dm%9rBxJxAvi%cH2;;0SuJ z^iO+5U7!kK$sxBOG}1eAdncmK*evoq_r=|M`F5%WLcz3)k%}1yLwAgp#Tzf0H+ks2 z(_hNSA3GnlupAj^NbWM;IVB&GKO1R;-n~=RThJmBqBl1Oqf$$O?`$^Q zW(L4K0N|j6w}*Z=*f2X0FFphdGu;rEp z;y&d&qf9N6P+>%q8QN&&V=qpSSporSR>q;SeCmrgxs{IUm&QpuWUTQ>LxVjY?f8o2 z)dC^E93ooeQVt)4^Vmbj;plMgM`N>kybQ1qF3Me%)rG3rU=ORwNghl$RHmKNZAzr=CcLp93$vmD{$mY%XE#rO9Q zJQdADx2>1Ih(zv^AOFk8dCHP?^3%PRJHk)&{y!H3IF|sdEqkNA7{hO$uU%*Mp-4cU z3vSXJo-c}%7JNDpV&V*9J2a85EV8*z$-j9w@d<9OcV}Wy>?=L_hO_nG7A?r|EBFDGp0F)KmQ!! zH^}n+?Rd?k+iOONldx<4F{H`48SUYTL^YMZQ;g3=B0nrSNrxXPrq^>d+GAvQ>oY%h z;Gi_~dOHN&gbwxd;IG}1h(Iw>rGhKR3i z;&6z#_U#;u@3g5PztEhm3xit8vM-&=tAvB$7e2a!<_b_e=8;0^<1{TPwwmHP3wKa6 z^*}ppQU&djwUSaMvG6bI+c>k?x}boQ}h0YyniW>9GGyQWS1t z?rX)D(^dxrd!{x()WL<`=^ib-qUAK_`i)@Mb)v2epy;VGaZhkymUjz)31hCE9R#mp zXgSQ_=M50IGz;VLyc`mDsz@!}=wR`AUaUNGaWs1?EL)@tfXwG(3me~iD-v_&l)wf; zuX@r8gDAV?YgcaSL$CGPsonN&2{?cDw-+p6R3a1#Ekd|j?O_024x8FrkHY_&UKYM^ zgd&OM3DF^zw)@jEq@)Uv`V70ud6DmU7|$8>xM?skQ2RVRP~Uf47Iq=|+;it2Dv{B` z=phM35u9CdW5z_Wk~~(0L(A(>c)`(EEOG?_ZhL6A{jh~#hv7hy@wM$E+#L46cN2P| zaq+1Z;50`<{Z%cHjLRrzjEq|V&j(b*022_mF1R7Z=pqIdsfP$q4&QQA@BIZO?LG`D zGUBqa24VuA8|&#Gi#iebw|fUt-Y=&>)v`@s)vlD}!BSnbyh^qXOV_vT(*izxbK+e*$uo*=48AFrQ@klp+4pyjm*)6Zg)z3@eoYOQX>WH`h_N?2&U+kLjdU8c19yo)-3XgQ)3pgJ!R*gy zw`_Q*jAHM?yqjoUI5W8Us)V^2-?V%nhl%%|R`6BK9)>NmWnV=bKy!UsCgZx9Z^6tFDGb-^o=PM)?oc|vqosYvnVfBsYbi>loXeND>8K^z-l8;e3;b zhdf$kaPmd?5N|q4p*ua?|H#lkgq~oeT6Y_#8N?=~ys&OxBgu+rv^^eKyCI24ok}h_ADA##ma@xFt z(>L<+Y|tmrZ)g?ulLty;Z1o#HN@LCr)DZyOE6v@%soNjVA*N~5Kckp2Wh2bM$JSHg zRuTnWAya<08uEdv)8M-uX^kC3R{Zq3Dx)rtdIb(YCPUx(jfFDWVHs3==D12`#5tl3 zqLb!a_7uFcaoXRoH>g%hyE4{$FP7_z#E>#3s};Y=Y0Hq`7={P+oh` z*AC8H6nOw`Nc<8y!)yU)7#O5w|@hgH^mX*6fN=c9rc`xJ}}LSRLBTc7IDB)AwUcI(e;r>=V+S zmdz#o@4YR~Pam#2w%1<-OQz$F5ZfMhrEyLD$(JXK6s@r+^v@BD>8S+-xW`7p?f)p~ zo7M2kVz2o`@Bkf81rze%=1wcYUn|o+b1AYcWnri0J#=gr)0H6HSzf0>f8G6t;@$ks z{1A@tWnQ2+bLJ=L=cb^o!(aWUnK$jRHH}D@?PAY+Q*&B#b+0=hFCvNE#5)_dJ7uek zE=uK9Cg?R4ikdTJ$YN^uJ`gHb+Yq`QgGzCJG3;+x?*pBtm%TKv$M(DI$<5(hl-!eC zD}>B#D?@KjDjNdcc*_Om_8f0kvKRqlo2iS&tW8t&RAiv~(cF-t=vc6@F>|`oV@b;2<>JOh+ z<(nh&W&-w&J$Wh+KTo^d>79FVVoKU|v$=bOmYV{-O@3nI+p&203rT#kF}Mpce_*y7 zOv`wkYxiCgX8bbhZNYit&vE#>z|>v{Dc-q$ppp~7;%T|U+^ z_ZBP-lxa6(E!Ve}E*-*u$tFWTsOrd22^0I*q3-K<#t(hTFZ(Vk7e>zt?7u&Ddy)zgq;o?NRY>mfa)B#zJQ0(LyS$(F3 zTr!zq)9lQai?+VmUQx3v_1CTM!aASvs5uGpmp!!k>^OKeVK{OjF%L1X9*%gzZBy0h zCJBzKyLsy$&E?g;WdDO06Sm09{*}2cp#gmUes~)>XWZ|hxG#Q?Q`%TQv~)Zd9$f1k zd4J`cwwFi$wT3Jcr55t4_lwW(D#t;$VkxVl;YBF#;VTTC?D=g#V{8g8xCE|t54 zt+Td1A@XK*n1O7L(I+@PF-1#7R|n8-+UK)zxwUz8@H)f%5M2I!2|H=_;!fQj-(}UT zZN%L)O1iX}lq{`1=SI(QlT2iDcajh!nrW*ZDmE zs^uoK(SECOG$b>WIKPW?T#srFt|D0*jJwGyO*^c1Ky&OC%--xk56hcfs0Rw&)Y@2n z#%|3n%%CqFg>>qq^*IMb7fDkzwYZ99;n)$_G*2@!VtcMEl+#7KveP+?EyIhmep7FQ z!Ohm;Az6#MI&y?dsAH>!_6Wf<#8I@gJ_&IP(P6dJnONEeN3{xu5XU9S&8=Z1&{4!5 zzP8saV9OL~81iTpZDNztqXjtevUGIP8@Avf8#@CMAPuc80KMfbNf`|l@Or#&Cs&#} zvTxezI78Di z|FXHP95s|@6uUD0CCZ(Zt<5PeaW0L`4*$U6Iv^VMEuAeiy|wW#8!ZrUycRWD$-X05 z)zW3<7D9SMfU=|x!qapFeN$Uf0WvdSXNO{FA|nD$!L+hDm{B5D8#2Typ(sMp13ew~vTXSmlIouPyDiD8%VkRa%NKNjEFhv>+F z)=8J(gvGiQ6abJBEU)LT=&^A}Z9@szEQR`}{R;&Xp){FhGOe;(xVtKOy3kpFY{1|$ zw|Nw>*M**6to>8#&61sfI3rl%UME42Gj#3lc1CDh>2HpGL}1Wa8gvD1Y7EA^@KxXJ z^P2E@(umMrT-X@I1W$JCVyhvby6LSq>1o)CW2$D_kJ5p@x}PHsPaSAA-x* zmaN0>vhX`RNv7i~VzDqssx^E(ijx(<-0O(vW{qp}2a2;vJ!&m4A+Kjpv^LSTOfstK z=zi`7l93vMr0Fp_f!TmJwi(%-bbL2ysjruE+vh-))6!R0Qs1rjpQwGCo*I=Fqww-2 z>X%|S9#+sZUs$x;qWbk~YzHs%diX+ka|J|cNMfcjsZ}>r-p?+^VZ@rXs4g{FoM7WV zdyO*FgAR94Z+qh$kLg7GRj1?URp>Ed@hsf~^($c0k$e?4m*2e|`1sM8c)cC#`)Pmh z=0UpMgZJ`pbM)z2yc^)S`yVd->+#`WcD$briD7vS`TQGqkj=ypyfJg69@pn;elrD8 zMZmk(6C{wSL%8p{4TQ1%9ob3jCa^($g_fqB)xy3eH37Ewv=rwbQ+-k#2F{4u1zK#x zJ}kEVaeE@;97ggS)}G*UO!Ay=u(xBFLR)K(oF*# z_L+RpJ_oZEE*^Zom6kU9S6%rcs6a!Tgvx}#2)8pz&xFc^S{Hy?3BxX&^mCTe;_xo@ z1n@0)MFKuVe#?HFttN7>4$tp$my6X1NEYmnSV$+kE!4K4A zQ8c?;XmfT6dkNqN%KyIVL6wdgHk+}UVMRDpGtm~h@)O*8FF|6`q2*b0>&Iv^+(sSH#_I%O<2Nst#w zLJ6`!DyB;)WDH_#wAfI*Lw!qLKKRb-h6tSF(;qo9g|i{rP)r9yi)bVG5e6g@3Wo6J zTQG1@5G0T3Th+<7$gG<=|8)H+Yc9=VwwI)9o@=8^K!5~~`=6r<|Bo0KAtyf}U0@Tz z9KWQKBq|Nbp(O!XknRnOEW*1G}R~bA8K$-(Dr8p6vaj(lNGei5PfViHV0etBj-* zY>n`wGVG0Hq%y3`b&2HInIoh4fVepaGv0*zQRW~xf^iTelTdI*zL4z9cM3~nG}Z_h z-2cCOtN=bO7`<^E)bBf3-fv4&2JBU#O-L`7rHo#Q>KKM)uml4zE4HsU9GYi~nB$gg6+*QflBXj@{^r99yWoyabw;JQsg&RH)aSxe z{5#=95U;?j({N**W~BH1pPu0OaZXBZj_`YV;uJ@tmv~y`pMZBbNg@$%j5%CMx&%zY z4){56$#h|wU{+L8q)!%n!oQSyK8!=yT8x2o2|4hPEBopXWq>5=8v>WJi-QVi%%`Zs zm9r*@KmH*sHpGp5SIDu_!r;Ax60(IzH^SXZ!e=GNb^6RD{|x`AKL{?QRxt+$L8IC4 zc3e}0-|a&Qp*}7nO#Dxf01mcAADp715!keZ*R%cT@#E1Z{FFj2h0Hc4SWOd*`hw4w}bY^YiqK1#LEwM3*(u}!EQ&= zo~ZB3Th^}uT4&yc`s`<~w6jXlyI>dSCszla2l7CmAF!_Ir?FMut8g!f16zPQ zZj*n0)+GUE$A~VwjJvZ!hvWBbZ)u0PMHq4LL8V9pgxuBkCUtf72KDpjY~p1g%zxW6 zQ_Sk2RYXWuV57{-`GTB;j8QUj`+)5`zeI4y1UxSEmf(zlrGG;ph5HGca;S%jt?$X3 zkg0)zy#@}(hm&z!&-sJY=hd-PpZ@7Rd}E&YX)@VI`Y?~Aos#V7V3cpw`44hCrQTl} zLNT=*AWE-+CW?eQNEp4?^KEbB!S}CCy1tZICRu%1uTkpve?2L8+k)hp#Fn^sqG*j z2hWAZ;ic%{wK73AYehYDiKgklcZ5TW{ok(hzEtIK0f=&apo^DHXl;Ji&$ z5yzidOok0PU$P48J^Q4|#(GdDqW7G40 z^p1}+*SGAD!^1I*ZS>a{67wrELQ{nb#RbhPCLo~?TH%*mfJ%o&Hky7jgOO-I1eMMU z6mESinz0K&eKmNFjH$EEVjLdZaj(Dv5_->#!4~Xvn z{3FZg%b}o`t9McM%bMinqDo>B3=W+*wVv?&r$qh=nIXNtb>25U7`@v0d2< z+S%C^?5#jiHPSM%^$fA;46*(UvE~f1@(i);Okd#n&TluzP3~tqf}9paLZ1mv+W6y^ z8_z3##BHc67w{$G${FI~nZAPa9j+-iXf)TGY3@NR?lw09P%e-9#CdLDfOc-pa(m)a(mK#Qa~b{}%TjGSUA_T477SWdp(b4{8Ml zU}k0IV*YQe6<;r3ouTHN%yx|`@^k4lyRo!t+A$s9-$R|jXxp9>#;DnY#OykEE%DjmtorGi!}bMZ5Wq%GYn zE_JOTifh+z$8Ua;9V~#wbPkux(Il4z=2%?ZWmEvd-{5c7f2OYz6ZnQ8zHLK%ug%+3 zT5Y#D@(TI$4ZCNVqtWEpb@i$WWRl6Zc8#g6tnOgCQvmY&2gvt(|>+Vi_F*`UFv5 zBk#g*mb>+azjzJr;JuC0iMzL!cv3$>P8@%|CN_+Y-bGf2H|U1lT?*s(armqvvo{BV2);*(XpXS{veHr*6%;-v*4)wnsVsC^h{hh>&QM-se&V@3$3~!X z7bKQZ7#T8vrS%`MMN@`-X>z|?fBIm4oBYO)zmYv0oaX*4Z$!5~`|(2nVpYQs#(B@VPfoU6zS#z?iI}_ zn<}bm&|!Fa&|?sQG*6Kc%1smGst%}9>h^C#`3v-q>}>CXzk}-czq}!gQP5bCosYSh z#>6Bus0br8Me0is6-u0F46P513_48xW4nsf82Up}he2gS;CvPYf<5xIdBflcpBIRw zm}O9;=BfB*XNq@9@{{x@rNMUr40gEi5Du{nF4j)#zdIM#d-EF})aW7@ch-UKZHOI8 z4nDxHdK(l!l0n$@e%n7hw`YqCau8>*RWW{feKLztgL2{4-M4SK#R@Z@`P+p(SnhB{ zX#C{7z*Rj`e0L+Hv=PK3lVm(2P+cyf%C!QVtXGY!-mUn`!FWQNkCjtFU zJ8ER2rsAvjT-4HhAnN@9pWl^4)-Nx41qfP(;F}9NA&Ty(#Q51L93Oehc>M z^2$N1&?c=JNy_)bSLKVH$-*R~OS}}Rx2J!*zn4B_fZc1znu2Z5Qkv1j#qS!S5eGi!@!%yM@? zZl9m1ugQ}>n0w>>CTM>B-u;>CALgItpT{rtvt+yIQ_NuKNlXYi=9wMFoLFlVH7ev# zI8u?O8gmKyJk;Iy3C1UMJtVmQqaSeEW!P&ruERzlLPjcj#76^6JZEm)25iK~ILA$< zC{{W+ofF-uN?t7EJFN)YiJA#W#CGb{2RtPC-%;02_??mL$m(GJBwHvMlXA)ADoPMh z8c=W~r5;3BvbKpuIx%-CloytKd(bh(J#)kq_>oh}kf<@cCm;^@U4yYmt{MpR-UHF% zlxN?$2%p^xfJFJkexcFcov2SM?lb9!JPEWC8v6H>thJZ(H^{#!q3WJ+yMyop!~!t7 zJA}5}4Ox~i9rS-W^|AiR)umbojE^&*bFgY($&CVI^4^qZ_aCN`&)ypfKn$UK4>F@| z%yyj89PvN>_upIwZQ7RkH7o$O!&vF6&JHj{JqMofA*~ah}(+RCBvY1p>`oZsca#kLh;O0H&S=zefOwYyr|fm+Z6DHFk%N(q^;$HGr+TN_|PUxv-Ta_QoF>;sY{ZpVL~TY)d1(nN zQ+sssm<+XA@kM8d@*>rumo&*3o1#hr14r25N<~;buUKtoDL}CMhTBize1RX%;ix%z z1i^zDBxFm>;r)ttfPI>TXCl}6Mv2#no3Nb-ZsXU+Z%j8DPPzmRj)ojn5+)Isu%H$K z#@g&OgaT{MBaI;g$H6+>wF^lhEIVp_aTVLFKfkq-KnU-SelQ~Gr{L)W-|xm0-Y=D( z=YhtuG$PxD2Y3Y_KwTxqANv*cRD2SNU zd%T3gTrP!6j?Dwf#Gs@^8f_R@ZeplKXlyD1^D@-QT3ldT4bj`4XgZ-57Rq?GrCQ4; z*%c2v?NEx->UZ1yH-^{gC_G1DQg5YjW2v3x&Fc?22jCu#wfuEtRL>^7I-Lc;Efnudz1&bKlspNtgk-N0m6HB4A{IxH zC(?ZBSP3)xx*^+QoDW%HM`)dOQj}o8|5+P>*HYHZ^F?!98#w+~k3L^x5~DSj-79F0 ze-9b<2)H=PDj9ouP14Igawbyk)9BMPjBfLZ31AQ=nocVE&8)>uajT;jOa}|GS3SvA z)Dyrpd@MKFnBlaP5kWLdo<_{ltGhVYQh32ttqN$cY+7@Keo7;vqHu)|l-J#yv zCWFHMFrPnaIj5kkkrBiC)z9RDiHn092sJqepA{a%xS(41#$mr2)e8&t)6#Z*X4jYw)_>+V_f}oIs-jKH zNhp4ZElEvh<#&M?WJk$q#C<5H$*cqV2jFM*SmlFby$KEBwefB}Eu0AB<#>|TqbXL< z?#dCbdNy5I5s`I4*RZUXoUAH7XC-=IF_#@@#$;Y0-KBsul6(G|b%blT z<)u=%TQsWZ--Z_6QhEHG)K-_9g&a41(wd6MW*Uu?p&<|t^&gp4Lt_H9FWuI~6M#2q zx?36bMtD7lASckKtK{m4P*+FJacRbh8k?Y<<%QZrGylh&~&cf1*SW@>)s z&Lm-pxqhm@F2u?o8?m^Z!#rwGe83`a0OcgJ5LbSW(-&hWEG`sl!v!o)U+$Zb#Y|=> z3h>*CCC=27Vp>0)nUUG@8At4!*vv73EHIsn$Jwt+qmRxckAQ2%rsY z(K$xnu)OkEw*+W0mSpgyu@1zmj1Hvm3Xd_rstDJFY`~A4!l~Y@UC4Vl1LNqqp4{~m z*yH+XP`I|OT80>e*m6Dk{p%;AfcNS?OQXNP>BIU4*0e-t*8UID~cU zA`tOdcT(L64BDr7c?+tuE!E^HTd4gjm-Y>KIv4CF`Z8;(?*~k+HED;H2h!zoDt=mK zR+X*zbCPT5e(G+$YFn78z=1iZb>tZXrOLsT$pg(Qi&&DX4^5H0*jb2b(s(&tzom3o z#?Krh!nEv~NbC$Qh$aP7Iz=sHyuErdCYR~5wkFwQyse~m5Baj3Qq(`btPJ%JsZ_Ml+Ufe9+U7%;Su z)CLd+7AH-d&|NbMblM`xu1Qf7GxV5rrjffB6BzoXd!XuTqoC(Msw2_%Jve%?{JjDe zOH|1?WJI&{bhVVUw0gZxCVY945~%~_V#g=J`HT3ssR`dJ!yAmBz&mA}p(fR3&0ouXj*uP-yue>y<-gtHzj~wj3H@He57Xs!!P>3x zX>XDpPX}O&g)1a!($Zwel`96!+_;ocKjPqRBuSFcCC6@{n3uL3y)wLpf)A6@)EKKIJ?l3@+033*b0T^ml@%$iMGs9s($=;Y{VHE`@E zXKW{j@!5^v!c_6;d`O>goH4Zw?PPN;w}H$NENjWbriJ&DMFW4>{F+<G&(1Y^rJ&+OEF8A@Ri<7aX5V?nE_0pYEW$5ThDSPu`dQ#3^riI!$IE#b| zX7ZsVq&6fN#sYPk5*u}{F{v!#m`Z6w7Mv(~Nbf>@v*wEa$><5^$*Xns5}0x=>tLy& zJV6?B?md*KG)mj9$Uk*3g(EzIr_2>KsT14hH>6T+3XQVsNX<%ZtMrO^C@X{;U&heg zo9URh`?kkRh<&UK>ve!?3poX*lCG(R{4sIEnMK_MDVBZ)kyAn&jr>pC6!I?LKyDd?pKB?PQv)sJT5?&x{?pXpCN7`r2%@l|q)T5wsC%`wAo0oUwtXz;!#lR;=HT~xa^V=#HO3K@ zL?vsX()&)MJ)lsL97?GFnu4|$oo=WP!I?%_H(w@;(sakaj zP}l}(xot~z;NZTs1Nwin_@rT(R8BGMNv zksAf^g!fdsr!Y+gOYzH$lG78Sr?s)ZKIhPp=_wOK8&N^hXQK7|n{^X7QnrunzL?Q3NbXYw)?fP!%MeSL3uJMy30i{Coy z#VDJFxu1yz5>TMQ4+I&JVMD+&BWryzCpH#OIk$@9tj8g})r8sPRwW|;h!?wN3$*6y zr*~(^QGT$V)=2@6*)AXLFKTU#DJ2>&OUWG%&E5W=gn)2uR-W2$|1Fd2r|MA%CU`YW zq`XGb(XLh|&pgu2qWmzD6lj5cMS2Zrq?_!^g`HQYY0pV+yIS8r2A__R^Xq!PXy)96K zN?MF|O@aEX@Fd(&sAPm=`kWzK_^C%TtD~HLS#;9zF^FG_fiBREQw>5KN-Pry(5`n0 z^JCkvVc6!aMQy_UmKgPBp$zdUcBi?%XcH}=wp*Hc{3W~dt65=Y{GGOo^BnG$*+NaN zGPaKNfMRNrjIg>UI;2HW8UI-9&H4{JZodA;pUH2mKPq-KnI8AXWvcHmcJc0Kqk9?l z8E`=N(hcdf>c+RHU)-tn66<+BLsWV@#wD$qT<4y3PfzFW3>SyMzr z2C~@Hp?CTk)|4mG5(=}jDl4?pIf#pO}GoIK9)G8X<5AcoRMtr1@DD9eZ zYrC3+iyRU?>%GQFQR00b>anIDD)p*)`9u)H0?tj+eW~vUDz-I(Oe^Ec30JDR(rabk z^`y&AVNIp9RHtdC&&F}bxO2=#rFD9E(db$yL}j4r*zq&&)z3l)07(S zVMi(`%Ie0({?y3itZ{ZEUlitD#6USSGchkMd3R1zRveV{3wdg~igMXG%B}oMa#``) zyei=Rz3Tef8T{i9%DU;n4XjQO3m20VplSX5r|(C-ml_pzr75v3Vim zdq>opE2eA=%EkS5o6Wz1S7qgGnUrx=SzRgZ*r;|v3sN_4p7di$4dM|D$v)1%(ESih zCD5!m$&NB&jE4LboH%CYwZ_G+ym2R7Q z9xtX9=TvUkC*~(BY!3%&bmGF>7}MwdKcd&rQsh+vlFYuw?{={K_`Wn$7l^2{*MH|J z-?84C`V=7H4{)TnB*yq2k{_6808Q{cD&wDpB#sBD687IcbZQf_-#$!1$MnWnxmL3? zET`bZ+m%qim$V0D-z!&f&`misbU4v9r5tIKN0%&UC#6<+qB7^cL zz$}DBO0ps;Hx(!l)OIp(kWKu9)F!JZAV5;5_nO%4|iC*i}Xn%dMD!{O>zcM*HNby z2;TNpkPa~C>*@vj^D;Xof$CYPCBU4g5OYrk>ne`E5Td5I<}3;yM#M0VYd|gA)?MQ` zi(v76eGT;Tf@(~eF@cUcJ&%Y8iQ-no5LE!KQEhS}t=JpfF+25ibi6ndCbK1I?ht0e z&P-ZFIQlXx#I7aopxf-tmV?44^h1w=|?aOT0p-;c)NB3uB%4xPo?(S*(`2wt$WDL?R#k zi3ujoy1l6_C2bEB=)kU-h?g0sJ-f#KM!s%EgMDsGXaVZ-y6(NtC4x~NX1 zhfqo?bjclu*tnd!9$8&NEdHfEO`rb!O0DOqwO#ZJgVo6%fRH<&JvqEhMW61?#yVn7 zHu9&82v>y~ULlKVka)NEw<^A|;}aNz=^LlLz6@;_)WOk}<%lOQdp*fDqku1x>d%Va zoZOL6h;Nj|HVBG$Ba(K20_~3z!e=1kfznQ5d3JLV~tkyJucn$p>p>kq~j-8MT=1UV%rQ zt;fq}k6B7gK`xLRq$pwteVpJdU_v##*5pzn@(M&@U)U97S|z9KO!uzD+K2m7?#tgB z%wAUx>MRC;MS$UlXbV1MzF%;#lVu;xz?P#|RnsE@0unrxA~fD9{ixwr7I|X-+?(=w z)h0OEs~0OZpvLvst?yS^@QHm=1qKY%M5BG%|Gmec{CVSh@y zd!dfw4c{AGeropuAy4QTzUO!{@MX^)8hWRn+NF|o=G3LPQSMDU2t)2u5dWT%npfCH1axP934n+OlI;8-EuryjQ!O#ztVq#*DldVi*R2W-_ zYT6CiT`?_6FXT8EVlpt0+Ag1`6Zo$hTnJoaef+~%R8#YzrQ_m~4lQY%Q|`MSY)tBE z#;`t&YJ_Fey())RMOTB4gRKy*rK(k=)ux?R&8cJ5*g?^q(lRP=trJ5Ql~GPIM$r)k zc>SBA^!6g!40y?K3HF|b?hC(@T&gUljl&A1$R{|@mF14kZa+yMI~^LGFKm4tRXq6Z z4P7krnx#(CY7I#t6sa_LV@h$)o1+iiH?~kNKW$pgab4yf4VC9lE_fc@utYt9E_goV zj3Dvl)lXI%sQ&@;wfM)r3?hBJZs=tSNDYqe4U7hHx0=1t_yzsBoOkFR7C&EKL=;op z2$hai+}FR-N^FpB&#J|$b+5{M#GxB+nPE4hYGQCr*rFzUAeiLTe5{z+e{kB~FQ}WT zd+x@~LiD4%H(eULxV8X#?#!NxjvwJ40xMgY&4nG*4n5p|l;9iv=9!Oz})cK&PCIeh}GgRxzL>e8_1h}HA#&~o!?$=M{Q8D{9c$dhg^y+^j zzq+7AJY(#yb3-X5;klW&CROgzEoaC_Mq^63{jA6R5t<-w z^{KY0qQ8cY5}IhU*tS@E@Zqf-^OW1VL_bT%joB4J({)eF|MqH2$bSz9XuP;Gjh3W0 zQ8jfycaTCiiN6ysh(&DQhV;v0i9ew3rRTJfItA^i3KQ39Ia6WsO6p7=9ZHuL9vqgC zQ|oI<$=oYfur5*6>4Wmh%ywqoq6hXCCZhm z*1w-iTQYaHm2*22j`)t-XENPu(Q>l^g4CnFkAV%jJl3b?6nBTIx`?Rh+X=pV485G+ zE01~Z*%R>_$e%EsPKa_t1~d0R>uD7-vU)0p8`IyWl`69IbOp$P-ReCSw(UF0uW<+Y zSEp$b^~y4%>|}YhtD1?=OpyN-LD8LlqyK zp$^X+nWwK(rFOEHAIBU-xXbw+GWfU2==sak-(3DN^O)=Kn8ouS)-^w3`0=sY(kk8L z5Wu+Vo8{}94AcUu!X>L=FFI8gR=XSW{_NrJuCuj-0o@xCJrC>6>-cOAS#;+A&IkUq z@IRkyFrci)joj2h7K26qdvk7~1=%NM`KkF3JoNod-s=_#dq|}oOg}K!5sOuj<2}i< zfVLaY^r+#&gPv80la7#?*VcEF)doiMbL!RQEf%qA7|#}{M|}HA%%2l;BmiZ|r~?f& zX^r#=^oyR-|HX^p*@>=?>Pd^|bYB1MLv+aqg?UVm+qQRV2+M5++Uww)+cqeCjL2;T ze)WNr+ZKd~uV6quO9-eQfMKN4pE1IF!0B*ZvG?u2kt2`~Ik)pUZf^ba*Mxu~!En29 z06pd}Jpm?=Ke<&lK+<-BbXpH$`*A}Dq^%LFQZ92Tx?X{dbd7s-{X{VV7t$VbRL)^ z<&NQ2@JPAsXhx=O>i#YnKzt# z`jdlu^7%7zKnk8ndeLYwypi+5yaSf)obimZ_%VC()M3_09N-97;r!=BVE+8MQ=fkS z5{t;fU+2P^I~$(tihVjDg!qQz=NXGg>gUN44u&sKFaTc{%a?rr67*FsYwE!1{f}G5 zE-OKur#WDR+lY+|7?+1t22An)fA;PO6LdxZRLF*%;>ZV@S6OiZ|!E zGjCa*sOaRXg)y3P_n3TYZi6!4MxpnJuZ1WTnUX$cC2^^BX#`lJ?Cm%Gptq~z9Yf+v zq1;ICUvlsS@cO2`Vi8?pC#QzNKdW%21Wf527_NPgcQ2!hPjpy;fsK2T6$90DTe!0G z!#f0%aa${_W0XU`-@k{$+ttNAJMxp6roA%OM>*5^#?5A*t=5Q^E?wofsFw8v(lA-) zqgDAckNM$32*&CrBdjZ29I450;@U9yM`-KSn(dTc1$B&v9HZ)sj0(8 z+4g-dOH6|!TAbTQpY{f58_KL}qlNnH!f>yn+)d4HmNive8$p^l^AxgmN6+Gew!GBkNIw^$M-3MlZkjM_Kfihb6WX1MY^asqA0ELhJ|L#?;uN;Y2@3Pr^8D#Yl5 zb*^ovtxk4Ax!R$nDRobCgsgvTb-1&aCezXk%>^E~vq65<`zAfUM;T!_pGt!goY(EM zKdMPhcJStj8ap z)dDo3hs6JLG#f@rk+gwrUV{dCQ}!<#WMrF?_dpivTrz zo1vi!mfr9g&!8Vs2Du`ixS@u0cisr{p^0t8wn;aU%S6-=rsl6!gGkv&OyP@p6KGlb zxToFM)te<>%Qiq-{~IIv+TlZTN9wEthyq)TysY?QDY^o@?99AN1O(WGNfMAgu!mt+ zmQUNnG{%z$Qv<=B*yg(W93hu!8X8zwhRVuRb%gjS90(UD@o^K`B>RaCn~7VmyLu*I ziA-K5rp9_rK92boaZgcVY>n#8#vZ1&Ic{pontDHu?XgdA@Cb>nqUk$x9@fNCya77( z7JK>`9;^Ap_;EXv&EJW+noL)Z~O$>Q)aiSl_!9<)DOnXU< z*bgRLiZTTo8zMG%miU;+9JWd8t^fkO6T+nIVZ}}!P1>5kE-q&5Qy~;@Q&nm-(KHQ~ zD=@yzVCU`Lsg>PP!KN~UtHY1u37*XS0TC4Tm`Lbsq;{Wj4ML)et!b@?+gk*rM^W*@ zQQHYl=Lp1!#N1BE&Z5MjAf)T4xQi%fsbP}x>J!gy{L8I4SE_%EXDPR_;(+&ScpKyI z0lrRm@vuVOve1v&lhLTc!pO+T{@ji;Sf4Nt%tr|iM9j;WMj$|`$;DSEzBI02RFt^N zE4_w-Bse1Wh5}D#ZHcX>%3!ml)~sk_j?Cb9ZMW0@k+|1mmRxKs9xg}AYK^;%&Sx(t z5$;cT$RfI!7=-v8-fN?lTY!CjBAg>&smq49-`w)g4gFH1g(pXAlAg%#a?)Waw`P|d zrqi_9R}vA)t=}d;P>sf^Qh4gMfTybn-mctC^!dN2Mj5e11Y!rH-e`ZW{TUQJolnWrC+!00DCJtODw}#o~_aMg-2Tr(2J6n(tW1fEb zC#08NR`{(^bT>{L9;P(NbfCf{r*mpRz^QpuH%PmAus3nU*l zQ;WnAcEbvqULSOetv(&rXuFzO>cqkLp&G=H+0YQ?M4GuMCct2zuO4P)W>uoArKGQ? zZ`Z2dcfK`?qg5e^75_#|Sml12&TRYUQ(}`-qRMeQr_cEmXP2hD*%UFr(>i0BwGHt> zg1cLP6LTZBo8hR-=}i7g&U&qf-|gY_yfw7zgBAWipL{A9-~<0u%G!r0YmDq6I=7}G zZSvfW>T0y!wzp?(ToDd%e~8sd_O$sI{GpAvqF&6&v2A{R^EOod+=+A{+#29JxNe>) z&p`aA^Yb@tyctYt2E|fzWt(<2s!Z*IF^t@OCwDGG$t%=|eAMyrT`BD>LxEMO(cDzg z(hN_G5A`B)d@ulZgBxDEaHL!bZ2bF-w-#z0t)(uP!wWC#}9RjV%Rg|F`1-UC=cT&LC~6lkJU1} z9`_d#pYr5VFa&Smrp_B|{@>}2t0lKfhh>M^>+31U5x?yGJJ@w!+uTm`R zmQ^-TMkC)WZ@}`~s>9B^_drvR-gaoZcF4XpD8>ur2vQNnTF8=!|L5?rQyd*?OTMB` zy*V80B6(9EG(Y-!vk((M4S&t^ z3-ZspJrf{+z60s+zDR>T5kv0aF+4vB`s}(P5&!>U>l~Ogi=r%>th8<0wr$(C%`a7H z+cqn0+cqn0n_V3<-O&?0f8j;kc=w#U*IuZ&=?%&-{F|0x4IXShJN#shF+eehy#&83y6eZv>`!Q z$|_Fudh(4O+zIxjRF;V)r4;}xzUMUW%iZ((e=ni_265drqdo1TJr$$5 zt0sBGH!6!Q8wT6fz2;SZ+v+}7>ORZrK5yziL1n=XM|U6=6s`zPrQ0Fi--!K z#b4!kv?_-^MK<`5yfU?6Y>!OOH|$z>U=={UlDW`b^~V`~f{u}as~;X<+Mkg4aFhU{ z+#_qPbfP?XTdKxnEouZlk(ly!kwdKJ0oT*UQW1`Hc(p8ewM=-lOn5pLya^_}33j{* zX1qi>`^HJy43ug1#${V}oaw@h%>GOBA7M!&ff+X(vQ#Xw@0Ty!RLa|*rAa`UY{b8X zb~qW-bd#40o>gqlW#I9Z^W|*TpbB8fd)kdjq%C$xcY1D1{Ukz-dRnFQwNx`@0k^TK zr|t`qh~T_WIeLdpEWgGtatP}@`0R356o0gR;%(3Gj27?%adUARki6ZTtG!BX;ifXU zNvh}Fak_e(OV-QhV88vK2C2w!PA-Ula8_g;NrlJ)-eU=E%L=}d2|^LoXF(!iz|KQ0q zvEZ1z)cCeJJst@?uyjjzYa%F<`%~(KGRnc`>dJbc>df6CR%EkyR!zMAD^IZ|{$dDzH%4Xz1> zdlTRkw01|?BZxKnt4np)A7nMbPOuQ~H2Ss|7|Sl?`~UI?|7AI5VrF7x{U1C6`+xHY zeraEspwwuL|3_r}{}2Qmt-M*F>cD9cIN(VCDMuzq8^{I?;$i$>o>wNu|0Q~5V*LM@ zUYY*e^a=&e%FM#Wo;HjKN({&>>1=eT2n;DEMAQ-u3L+IIwT*-XZF3+wjV5jjD2#23 zo}y$4E)S6dZDWM5Ek6yvc*Q>*bc-%Tz_TFT-gT+sA&Mxv@$2pF_0M_SK3{R4ZO?1m za``BPq1O+nwj?u-=XMy+HoF9HA^PfzL&7}Jw@XIky6g&35(tesUIDl!XY`ykM!2Ae z7JWlpZ?ZdI?_KySdAdP~d`N_0p6PTME%+ZMwcJDKxq(;9^&sJ19{GwTPWM@tieS=o zUDqi!)*zqU%MCg`&$_tCe;AS!0eLHFQ|-1|C1%LMb7Xpo8vaZc;~;0vz1{^q$npYa z>kBXpnW6hyA=mza_y7a<{vfl>Rfpq(Zz|zqySdQ6asJhcON-n_nmId$tQmAG#9289 z;9;l9y7ub_Pj8??WT>&CCU^UZ3k{;oYWhlAYI;dCODoH9nCo+#l@(ZDKi`A?AiJCK z823Od7~qH#c=WykQ~EgqxmS}%W1Dkc+JCctWP^Konq0ASvjMa7zOImTLal|nf;w>i zXm;Y%4I&>zLw$3tMdD5PdXYP#i!KHtHjsP)J;G9~Aaqk^NO9`I6MhH zjP2>)`Rqv@>H%>eqtE+{Q4PHl+v%MY9t;fy2hqJZ4DFR$$ecFZ=fW68ReMnCg}a3s zju2R4xidAP7S>@Fnt}Kd5RO4&wiw8BXLBE`r}RxYe81rfJ?11ZO?c@0Y3^`d~lrAF;jhYTwwRse;Y2`xftLKV^LJdcb#MIsS&-6}{ewO6(Y69%Daq zJ>RUiIs=Zkw%ey24H)i;z*9iX&gUxxXEo+dZvD+TBeL!cq=HDXrnEmA)-$)L+R@rA zTpWrZsY82;<}^J|#w~yGJ{_HESTcCS&-j6NNAipR1SlE*!Gd8#hmPG_yu*4m_KcLc z)o6>86zuhGNVla3O9y*^<_Y#|a$KV8M4RiOYsEZM`=Bv??Pl4 zo&?-F`;zrQi@UMxM7->`-tOL}g^+pghd4>cdmU;wVj;{=AG?7qHl!@K0|% z%$@NIc`QfHtq0A4nSGV<{JEH?JN4g-3j^$72?+l4_kvFM2G$$?f%4gl2*%#l-fO2A zOq%V(d&Pa#3CHMvtsBz0b^iq03HymQ7=pMpxchje3Hp0B`L_<(yx-LszH4yX6y}Wl zW?;AVFi$pHig{TUZgI%9f3w=yKH%jI?t%XSNk)@GXE?XN)-Z3CspGAK$L;0x`2wIn z=U033$O41OWXJf;$dDw^C^u!?gw%`_`j-8f!n$veNN`IKLGXiheQdFj&b}awjoAOM zfh3J^-Z7597y${%DU{wDt|72E9m_VmzA(zLhsYVdJ=e8BV2@%B!Ial=gKUb%lq6$% zYj9_T{cr0$bQ=Y+*eee!cFc&JU?+fM&N*K(a($vlx~`msnZi{@Qpq0eBO;a&0FH|b zUbs)@i+(+9CmJ+wP1u?bxx}>v^9Gh4cmr~BGs2?C=M&N%AxjDfZW*@Z`)27n&~Hk= z9PWkaSQ_;00&4y1lR@purVn4l1VTsLTEwU&KF~M2I1f0msYfxtMi9)R%M=Fbj?`UA!W%#j-v?@#2T=|M-w;=nlSg4eF- z-ZGQwN1z8>#DYI}C7v#GFz=%|U~y1k8!Kz<(#|rE-jL!aa5A8dD_nPC7;5J6R~&bm z%F}Bms0<`5uV#0vHLyFOJGMK$8`^XcAs}@1?2z{n-#gALSLrU}6tOc?FK|Xsi4~1!Z^liq zgfQDfZeDpr=q8(rIag8J|Qg=c~EajimMz1+&g=buuVTs#SNC*xEWcE-Z*YKccB?-_-_ue zx>D{q(A&1BW12fC^`Kwui<3V-Mp~Iln zX0E%c*|xb_HtD#6s)4bdw_mJrIAgbLRhlVs2)0*k zA$zH5uLu+QmrGoEOL%iJZ}wnu;XdVi1>5qlZM}#rx=vDSYnxl>vA$JeXf)6M;Qg(> zTCG*$>X5y`|7satiihV2$C);y-MP{pRm!+B?k26#9F~ zJ_7N5m3@fW>S)T5>VJG2^m!*`AxbXCSEYy5T3W@}l2i&;aTK?TfJ>9yfk$^0orWqs zG-)XjNM!-%TAJc+!+{eF=pI>m@PQTIldb`$soBAed-x{2KcfFu6k zE!h*ZxUrW667%~U`4-}SIY7Jh432ND14Y}7mX2|(dR6EzQz#LBQeX>TXo79Fa|w?V zwnvwfv%!JYmPbrddyn|i*4nCMuUZNb|IjF5fBtKpV!9uND&9LV)g{06_BFVi7#P6o zQas1nyY@l&q%J#p+tlu)?N0=z+ZAS5Owgv+zZ&=LF;iBO>RVin-#(cpoLadZ!ktbO z-7H)6?HDe*_|~FZb6u6l9>)BtaD|ctP`?i{Tns^5Xcu+?w5*rpH$g zr6z`&P2`m-D{5;@HV6P$90+(`K8J8B>b2ROa!gM2jdnZTb}tSF;%9(Q+rc^tUjJ*W zH2puOH(irAJAWP{M=!VF4rZ{7++n)buctHi$?)mQdOV!igYQaW?Aa?M6iO!} z1=5v0n_SNkqHt=NkS_!1z{8ZFHO(hxt7XWltA@&W!PIQV!)uxL7jr!ao74Laf4iXr{m5`Bvbj6QXd%{m@UK1gdZ%Lvm zSFWhpSCgjPhpQZCXLGYIk|RO@ru{|(CxRil!#i>WRB-$)vvL7VvNpRhj`q9o4y-Xg z&JryTxvbKp+?CWi^crGy3Kp!GPvV6yXS_m}Z12ICWR8WGnKl7*UEuH=_^5xEezuO$ z*iyB6a5X`Da&p$RV08Bq&V#pl0Y1aN5AE`Um<604M!b4br9#BAM=0H)~nX50!1Q~ z;NZ*E4u;H#y#yY`FQew>*ANO0l)m0dWRxGMkC%0oT-DC*Gqa>MR<<;}ZKhKfV%U5@ z*o}+9a-v){HH;R{qDvWt0!34F{^~-{y0rAYSH>I5hs*)q+xpi8A2s7-KB3j8%x9YB zm+V01vW+wCHmtcV7czJ=?&l`PI>tsMJwp7rof(};ooNTe4_()@lNNp74)yI4L3LlA z*+8C*tO>v;2*BA-k4{kum_l+lx?0f78!)_FMiVGJe0?(NJ1Abho&%7c1nI1*i?u46 zL)lA;Cr`orZy7NxU#JIS!7-00GvJM_>>?I?Jy;7A;y_ULd zS4?9>4HUYXG_{|ONd!J`$Fi#6w|pOD7`A;MfbR#klkq9s6>ySxJBN-O+wLk*CdBjB zV(x17FwH2ozwc=-8~{gX>GMe+@aMeikkrCrJa7P(`rkF>f@s}@H1A{~&*7J00=$AZ zBksS<+HVMT=f!#*ztQ7=B?au5ovzi!uNyo3lc4mdBq@6Cy!l^l@00YC6!ebrGq8*1 z3@>P!Iomqlxt6fFtKSiS5WjV;S+7$+9rh?OxQ64!vgDkM&QN{N6fOFg&YV#lN&il_ zfb#$#c$9s>&yt^zpW;Nobm^gYV={?nUAnACAr9)y!TFXi8Ls!A`}KPKCPvo@t~W73 ztb@6RNzA993f-^VUg~0sy}C2>#j_-FHvXXt_5}LFKMS4|_X0Ab;(5b20onrk#xxxW z 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 2.9.3 +use *only* wxWidgets >= 3.0 wxGTK Use wxWidgets 2.8.10 or later @@ -21,15 +20,6 @@ So use a very recent version (>= 2.8.10 (that also solve other bugs) wxWidgets patch: -wxMSW, version 2.8.x -Some zoom values smaller than 3 to 5 create artifacts on screen, mainly values < 1. -(corresponding to draw scale factor > 1 ) - -See http://trac.wxwidgets.org/ticket/9554 (and 11669). - -This is fixed in version 2.9.3 - - wxWidgets 2.9.1 (all platforms) Has a problem when using the built in string to double conversion: In countries using a comm instead of a point as floating number separator @@ -41,7 +31,7 @@ Use a version >= 2.9.3 ************************************************************************************* -wxGTK version: All +wxGTK version: All before wxWidgets 3.0 ************************************************************************************* Patch for printing wide traces that were shown with missing rounded end caps. Without this patch, printing boards and schematics under Linux, and perhaps OSX @@ -57,3 +47,10 @@ Add after this line: PsPrint( "1 setlinecap\n" ); PsPrint("%%EndSetup\n"); + +Known bug on Windows: +Postscript printers print tracks like tin line. +It happens only for PS drivers, and PDF printer. +Other drivers (PCL for instance) work fine, +so it is unlikely a bug inside Kicad/wxWidgets + diff --git a/pcbnew/dialogs/dialog_pad_properties.cpp b/pcbnew/dialogs/dialog_pad_properties.cpp index 37d10da7e5..509fd046d6 100644 --- a/pcbnew/dialogs/dialog_pad_properties.cpp +++ b/pcbnew/dialogs/dialog_pad_properties.cpp @@ -149,8 +149,8 @@ DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, D_PAD* aP { m_canUpdate = false; m_parent = aParent; - m_currentPad = aPad; // aPad can be NULL, if the dialog is calleg - // from the modoule editor to set default pad characteristics + m_currentPad = aPad; // aPad can be NULL, if the dialog is called + // from the module editor to set default pad characteristics m_board = m_parent->GetBoard(); m_dummyPad = new D_PAD( (MODULE*) NULL ); From d6c1670cd78d8f13c5b3c8b5e015e63920aad56c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 14 Mar 2014 15:15:38 +0100 Subject: [PATCH 180/741] Templated EDIT_POINT_CONSTRAINT. Removed EDIT_CONSTRAINT::Update() - replaced with resetting constraints. EDIT_CONSTRAINT is stored in EDIT_POIN using boost::shared_ptr instead of pointer. Added EDIT_LINE::GetEnd() & GetOrigin(). Overridden ApplyConstraint() for EDIT_LINE. Side EDIT_POINTS for zones are drawn as circles. --- pcbnew/tools/edit_points.cpp | 26 +++--- pcbnew/tools/edit_points.h | 153 +++++++++++++++++++--------------- pcbnew/tools/point_editor.cpp | 21 ++--- 3 files changed, 105 insertions(+), 95 deletions(-) diff --git a/pcbnew/tools/edit_points.cpp b/pcbnew/tools/edit_points.cpp index 000da9cb83..00fdb101ae 100644 --- a/pcbnew/tools/edit_points.cpp +++ b/pcbnew/tools/edit_points.cpp @@ -142,13 +142,13 @@ void EDIT_POINTS::ViewDraw( int aLayer, KIGFX::GAL* aGal ) const aGal->DrawRectangle( point.GetPosition() - size / 2, point.GetPosition() + size / 2 ); BOOST_FOREACH( const EDIT_LINE& line, m_lines ) - aGal->DrawRectangle( line.GetPosition() - size / 2, line.GetPosition() + size / 2 ); + aGal->DrawCircle( line.GetPosition(), size / 2 ); aGal->PopDepth(); } -void EPC_45DEGREE::Apply() +void EC_45DEGREE::Apply() { // Current line vector VECTOR2I lineVector( m_constrained.GetPosition() - m_constrainer.GetPosition() ); @@ -162,14 +162,17 @@ void EPC_45DEGREE::Apply() } -EPC_LINE::EPC_LINE( EDIT_POINT& aConstrained, EDIT_POINT& aConstrainer ) : - EDIT_POINT_CONSTRAINT( aConstrained ), m_constrainer( aConstrainer ) +EC_LINE::EC_LINE( EDIT_POINT& aConstrained, const EDIT_POINT& aConstrainer ) : + EDIT_CONSTRAINT( aConstrained ), m_constrainer( aConstrainer ) { - Update(); + // Compute line coefficients + VECTOR2D delta = m_constrainer.GetPosition() - m_constrained.GetPosition(); + m_coefA = delta.y / delta.x; + m_coefB = m_constrainer.GetY() - m_coefA * m_constrainer.GetX(); } -void EPC_LINE::Apply() +void EC_LINE::Apply() { VECTOR2I position = m_constrained.GetPosition(); @@ -189,16 +192,7 @@ void EPC_LINE::Apply() } -void EPC_LINE::Update() -{ - // Compute line coefficients - VECTOR2D delta = m_constrainer.GetPosition() - m_constrained.GetPosition(); - m_coefA = delta.y / delta.x; - m_coefB = m_constrainer.GetY() - m_coefA * m_constrainer.GetX(); -} - - -void EPC_CIRCLE::Apply() +void EC_CIRCLE::Apply() { VECTOR2I centerToEnd = m_end.GetPosition() - m_center.GetPosition(); VECTOR2I centerToPoint = m_constrained.GetPosition() - m_center.GetPosition(); diff --git a/pcbnew/tools/edit_points.h b/pcbnew/tools/edit_points.h index ecc84a8df6..1d10e21a45 100644 --- a/pcbnew/tools/edit_points.h +++ b/pcbnew/tools/edit_points.h @@ -27,6 +27,8 @@ #include #include +#include + #include #include @@ -35,12 +37,13 @@ class EDIT_POINT; /** - * Class EDIT_POINT_CONSTRAINT + * Class EDIT_CONSTRAINT * - * Allows to describe constraints between two points. After the constrained point is changed, + * Allows to describe constraints between two edit handles. After the constrained handle is changed, * Apply() has to be called to fix its coordinates according to the implemented constraint. */ -class EDIT_POINT_CONSTRAINT +template +class EDIT_CONSTRAINT { public: /** @@ -48,9 +51,9 @@ public: * * @param aConstrained is EDIT_POINT to which the constraint is applied. */ - EDIT_POINT_CONSTRAINT( EDIT_POINT& aConstrained ) : m_constrained( aConstrained ) {}; + EDIT_CONSTRAINT( EDIT_TYPE& aConstrained ) : m_constrained( aConstrained ) {}; - virtual ~EDIT_POINT_CONSTRAINT() {}; + virtual ~EDIT_CONSTRAINT() {}; /** * Function Apply() @@ -59,17 +62,8 @@ public: */ virtual void Apply() = 0; - /** - * Function Update() - * - * Updates contraint's traits. - */ - virtual void Update() - { - } - protected: - EDIT_POINT& m_constrained; ///< Point that is constrained by rules implemented by Apply() + EDIT_TYPE& m_constrained; ///< Point that is constrained by rules implemented by Apply() }; @@ -88,12 +82,9 @@ public: * @param aPoint stores coordinates for EDIT_POINT. */ EDIT_POINT( const VECTOR2I& aPoint ) : - m_position( aPoint ), m_constraint( NULL ) {}; + m_position( aPoint ) {}; - virtual ~EDIT_POINT() - { - delete m_constraint; - } + virtual ~EDIT_POINT() {} /** * Function GetPosition() @@ -153,12 +144,9 @@ public: * Sets a constraint for and EDIT_POINT. * @param aConstraint is the constraint to be set. */ - void SetConstraint( EDIT_POINT_CONSTRAINT* aConstraint ) + void SetConstraint( EDIT_CONSTRAINT* aConstraint ) { - if( m_constraint ) - delete m_constraint; - - m_constraint = aConstraint; + m_constraint.reset( aConstraint ); } /** @@ -167,9 +155,9 @@ public: * Returns the constraint imposed on an EDIT_POINT. If there are no constraints, NULL is * returned. */ - EDIT_POINT_CONSTRAINT* GetConstraint() const + EDIT_CONSTRAINT* GetConstraint() const { - return m_constraint; + return m_constraint.get(); } /** @@ -179,8 +167,7 @@ public: */ void ClearConstraint() { - delete m_constraint; - m_constraint = NULL; + m_constraint.reset(); } /** @@ -199,7 +186,7 @@ public: * * Corrects coordinates of an EDIT_POINT by applying previously set constraint. */ - void ApplyConstraint() + virtual void ApplyConstraint() { if( m_constraint ) m_constraint->Apply(); @@ -214,8 +201,11 @@ public: static const int POINT_SIZE = 10; protected: - VECTOR2I m_position; ///< Position of EDIT_POINT - EDIT_POINT_CONSTRAINT* m_constraint; ///< Constraint for the point, NULL if none + ///> Position of EDIT_POINT + VECTOR2I m_position; + + ///> Constraint for the point, NULL if none + boost::shared_ptr > m_constraint; }; @@ -256,6 +246,36 @@ public: m_end.SetPosition( m_end.GetPosition() + difference ); } + ///> @copydoc EDIT_POINT::ApplyConstraint() + virtual void ApplyConstraint() + { + m_origin.ApplyConstraint(); + m_end.ApplyConstraint(); + + if( m_constraint ) + m_constraint->Apply(); + } + + /** + * Function GetOrigin() + * + * Returns the origin EDIT_POINT. + */ + EDIT_POINT& GetOrigin() + { + return m_origin; + } + + /** + * Function GetEnd() + * + * Returns the end EDIT_POINT. + */ + EDIT_POINT& GetEnd() + { + return m_end; + } + bool operator==( const EDIT_POINT& aOther ) const { return GetPosition() == aOther.GetPosition(); @@ -420,11 +440,11 @@ private: /** - * Class EPC_VERTICAL. + * Class EC_VERTICAL. * - * EDIT_POINT_CONSTRAINT that imposes a constraint that two points have to have the same X coordinate. + * EDIT_CONSTRAINT that imposes a constraint that two points have to have the same X coordinate. */ -class EPC_VERTICAL : public EDIT_POINT_CONSTRAINT +class EC_VERTICAL : public EDIT_CONSTRAINT { public: /** @@ -433,11 +453,11 @@ public: * @param aConstrained is the point that is put under constrain. * @param aConstrainer is the point that is the source of the constrain. */ - EPC_VERTICAL( EDIT_POINT& aConstrained, const EDIT_POINT& aConstrainer ) : - EDIT_POINT_CONSTRAINT( aConstrained ), m_constrainer( aConstrainer ) + EC_VERTICAL( EDIT_POINT& aConstrained, const EDIT_POINT& aConstrainer ) : + EDIT_CONSTRAINT( aConstrained ), m_constrainer( aConstrainer ) {} - ///> @copydoc EDIT_POINT_CONSTRAINT::Apply() + ///> @copydoc EDIT_CONSTRAINT::Apply() virtual void Apply() { VECTOR2I point = m_constrained.GetPosition(); @@ -451,11 +471,11 @@ private: /** - * Class EPC_HORIZONTAL. + * Class EC_HORIZONTAL. * - * EDIT_POINT_CONSTRAINT that imposes a constraint that two points have to have the same Y coordinate. + * EDIT_CONSTRAINT that imposes a constraint that two points have to have the same Y coordinate. */ -class EPC_HORIZONTAL : public EDIT_POINT_CONSTRAINT +class EC_HORIZONTAL : public EDIT_CONSTRAINT { public: /** @@ -464,11 +484,11 @@ public: * @param aConstrained is the point that is put under constrain. * @param aConstrainer is the point that is the source of the constrain. */ - EPC_HORIZONTAL( EDIT_POINT& aConstrained, const EDIT_POINT& aConstrainer ) : - EDIT_POINT_CONSTRAINT( aConstrained ), m_constrainer( aConstrainer ) + EC_HORIZONTAL( EDIT_POINT& aConstrained, const EDIT_POINT& aConstrainer ) : + EDIT_CONSTRAINT( aConstrained ), m_constrainer( aConstrainer ) {} - ///> @copydoc EDIT_POINT_CONSTRAINT::Apply() + ///> @copydoc EDIT_CONSTRAINT::Apply() virtual void Apply() { VECTOR2I point = m_constrained.GetPosition(); @@ -482,12 +502,12 @@ private: /** - * Class EPC_45DEGREE + * Class EC_45DEGREE * - * EDIT_POINT_CONSTRAINT that imposes a constraint that two to be located at angle of 45 degree + * EDIT_CONSTRAINT that imposes a constraint that two to be located at angle of 45 degree * multiplicity. */ -class EPC_45DEGREE : public EDIT_POINT_CONSTRAINT +class EC_45DEGREE : public EDIT_CONSTRAINT { public: /** @@ -496,11 +516,11 @@ public: * @param aConstrained is the point that is put under constrain. * @param aConstrainer is the point that is the source of the constrain. */ - EPC_45DEGREE( EDIT_POINT& aConstrained, const EDIT_POINT& aConstrainer ) : - EDIT_POINT_CONSTRAINT( aConstrained ), m_constrainer( aConstrainer ) + EC_45DEGREE( EDIT_POINT& aConstrained, const EDIT_POINT& aConstrainer ) : + EDIT_CONSTRAINT( aConstrained ), m_constrainer( aConstrainer ) {} - ///> @copydoc EDIT_POINT_CONSTRAINT::Apply() + ///> @copydoc EDIT_CONSTRAINT::Apply() virtual void Apply(); private: @@ -509,37 +529,32 @@ private: /** - * Class EPC_LINE + * Class EC_LINE * - * EDIT_POINT_CONSTRAINT that imposes a constraint that a point has to lie on a line (determined + * EDIT_CONSTRAINT that imposes a constraint that a point has to lie on a line (determined * by 2 points). */ -class EPC_LINE : public EDIT_POINT_CONSTRAINT +class EC_LINE : public EDIT_CONSTRAINT { public: - EPC_LINE( EDIT_POINT& aConstrained, EDIT_POINT& aConstrainer ); + EC_LINE( EDIT_POINT& aConstrained, const EDIT_POINT& aConstrainer ); - ///> @copydoc EDIT_POINT_CONSTRAINT::Apply() + ///> @copydoc EDIT_CONSTRAINT::Apply() virtual void Apply(); - /** - * Function Update() - * Updates line coefficients that make the constraining line. - */ - void Update(); - private: - EDIT_POINT& m_constrainer; ///< Point that imposes the constraint. - double m_coefA, m_coefB; + EDIT_POINT m_constrainer; ///< Point that imposes the constraint. + double m_coefA; ///< Line A coefficient (y = Ax + B) + double m_coefB; ///< Line B coefficient (y = Ax + B) }; /** - * Class EPC_CIRCLE. + * Class EC_CIRCLE. * - * EDIT_POINT_CONSTRAINT that imposes a constraint that a point has to lie on a circle. + * EDIT_CONSTRAINT that imposes a constraint that a point has to lie on a circle. */ -class EPC_CIRCLE : public EDIT_POINT_CONSTRAINT +class EC_CIRCLE : public EDIT_CONSTRAINT { public: /** @@ -549,11 +564,11 @@ public: * @parama aCenter is the point that is the center of the circle. * @parama aEnd is the point that decides on the radius of the circle. */ - EPC_CIRCLE( EDIT_POINT& aConstrained, const EDIT_POINT& aCenter, const EDIT_POINT& aEnd ) : - EDIT_POINT_CONSTRAINT( aConstrained ), m_center( aCenter ), m_end( aEnd ) + EC_CIRCLE( EDIT_POINT& aConstrained, const EDIT_POINT& aCenter, const EDIT_POINT& aEnd ) : + EDIT_CONSTRAINT( aConstrained ), m_center( aCenter ), m_end( aEnd ) {} - ///> @copydoc EDIT_POINT_CONSTRAINT::Apply() + ///> @copydoc EDIT_CONSTRAINT::Apply() virtual void Apply(); private: diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp index 0d95d4b294..3caec5eb5e 100644 --- a/pcbnew/tools/point_editor.cpp +++ b/pcbnew/tools/point_editor.cpp @@ -72,7 +72,7 @@ public: // Set constraints // Arc end has to stay at the same radius as the start - (*points)[2].SetConstraint( new EPC_CIRCLE( (*points)[2], (*points)[0], (*points)[1] ) ); + (*points)[2].SetConstraint( new EC_CIRCLE( (*points)[2], (*points)[0], (*points)[1] ) ); break; case S_CIRCLE: @@ -114,8 +114,8 @@ public: points->AddPoint( dimension->m_featureLineDO ); // Dimension height setting - edit points should move only along the feature lines - (*points)[0].SetConstraint( new EPC_LINE( (*points)[0], (*points)[2] ) ); - (*points)[1].SetConstraint( new EPC_LINE( (*points)[1], (*points)[3] ) ); + (*points)[0].SetConstraint( new EC_LINE( (*points)[0], (*points)[2] ) ); + (*points)[1].SetConstraint( new EC_LINE( (*points)[1], (*points)[3] ) ); break; } @@ -176,7 +176,7 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) PCB_EDIT_FRAME* editFrame = getEditFrame(); EDA_ITEM* item = selection.items.GetPickedItem( 0 ); EDIT_POINT constrainer( VECTOR2I( 0, 0 ) ); - boost::shared_ptr degree45Constraint; + boost::shared_ptr > degree45Constraint; m_editPoints = EDIT_POINTS_FACTORY::Make( item ); if( !m_editPoints ) @@ -243,7 +243,7 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) { // Find a proper constraining point for 45 degrees mode constrainer = get45DegConstrainer(); - degree45Constraint.reset( new EPC_45DEGREE( *m_dragPoint, constrainer ) ); + degree45Constraint.reset( new EC_45DEGREE( *m_dragPoint, constrainer ) ); } else { @@ -271,6 +271,7 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) else if( evt->IsMouseUp( BUT_LEFT ) ) { + degree45Constraint.reset(); modified = false; } @@ -441,15 +442,15 @@ void POINT_EDITOR::updateItem() const else if( isModified( (*m_editPoints)[2] ) ) { dimension->SetOrigin( wxPoint( m_dragPoint->GetPosition().x, m_dragPoint->GetPosition().y ) ); - (*m_editPoints)[0].GetConstraint()->Update(); - (*m_editPoints)[1].GetConstraint()->Update(); + (*m_editPoints)[0].SetConstraint( new EC_LINE( (*m_editPoints)[0], (*m_editPoints)[2] ) ); + (*m_editPoints)[1].SetConstraint( new EC_LINE( (*m_editPoints)[1], (*m_editPoints)[3] ) ); } else if( isModified( (*m_editPoints)[3] ) ) { dimension->SetEnd( wxPoint( m_dragPoint->GetPosition().x, m_dragPoint->GetPosition().y ) ); - (*m_editPoints)[0].GetConstraint()->Update(); - (*m_editPoints)[1].GetConstraint()->Update(); + (*m_editPoints)[0].SetConstraint( new EC_LINE( (*m_editPoints)[0], (*m_editPoints)[2] ) ); + (*m_editPoints)[1].SetConstraint( new EC_LINE( (*m_editPoints)[1], (*m_editPoints)[3] ) ); } break; @@ -585,6 +586,6 @@ EDIT_POINT POINT_EDITOR::get45DegConstrainer() const break; } - // In any other case we may align item to the current cursor position. TODO wrong desc + // In any other case we may align item to its original position return m_original; } From 19a87ac7804e14a8b1a69f46deb5b9e5e0495b9f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 14 Mar 2014 15:37:55 +0100 Subject: [PATCH 181/741] Added EC_CONVERGING for zone areas modification. --- pcbnew/tools/edit_points.cpp | 89 ++++++++++++++++++++++++++++++++++- pcbnew/tools/edit_points.h | 25 ++++++++++ pcbnew/tools/point_editor.cpp | 53 +++++++++++++-------- pcbnew/tools/point_editor.h | 9 ++++ 4 files changed, 155 insertions(+), 21 deletions(-) diff --git a/pcbnew/tools/edit_points.cpp b/pcbnew/tools/edit_points.cpp index 00fdb101ae..e98a8dee6b 100644 --- a/pcbnew/tools/edit_points.cpp +++ b/pcbnew/tools/edit_points.cpp @@ -26,8 +26,7 @@ #include "edit_points.h" #include - -#include +#include bool EDIT_POINT::WithinPoint( const VECTOR2I& aPoint, unsigned int aSize ) const { @@ -205,3 +204,89 @@ void EC_CIRCLE::Apply() m_constrained.SetPosition( m_center.GetPosition() + newLine ); } + + +EC_CONVERGING::EC_CONVERGING( EDIT_LINE& aLine, EDIT_POINTS& aPoints ) : + EDIT_CONSTRAINT( aLine.GetEnd() ), + /*m_end( aLine.GetEnd() ), m_origin( aLine.GetOrigin() ),*/ m_line( aLine ), + m_editPoints( aPoints ) +{ + // Dragged segment endings + EDIT_POINT& origin = aLine.GetOrigin(); + EDIT_POINT& end = aLine.GetEnd(); + + // Add constraint to the line origin, so it moves only along it current line + EDIT_POINT& prevOrigin = *aPoints.Previous( origin ); + EDIT_POINT& nextEnd = *aPoints.Next( end ); + + // Constraints for segments adjacent to the dragged one + m_originSideConstraint = new EC_LINE( origin, prevOrigin ); + m_endSideConstraint = new EC_LINE( end, nextEnd ); + + // Compute dragged segment slope + VECTOR2D delta = m_line.GetPosition() - end.GetPosition(); + m_coefA = delta.y / delta.x; +} + + +EC_CONVERGING::~EC_CONVERGING() +{ + delete m_originSideConstraint; + delete m_endSideConstraint; +} + + +void EC_CONVERGING::Apply() +{ + EDIT_POINT& origin = m_line.GetOrigin(); + EDIT_POINT& end = m_line.GetEnd(); + + // Do not allow points on the adjacent segments move freely + m_originSideConstraint->Apply(); + m_endSideConstraint->Apply(); + + // Find points that make adjacent segments + EDIT_POINT& prevOrigin = *m_editPoints.Previous( origin ); // point previous to origin + EDIT_POINT& nextEnd = *m_editPoints.Next( end ); // point next to end + + // Two segments adjacent to the dragged segment + SEG originSide( origin.GetPosition(), prevOrigin.GetPosition() ); + SEG endSide( end.GetPosition(), nextEnd.GetPosition() ); + + VECTOR2I draggedCenter; // center point of the dragged segment + + // Check if adjacent segments intersect (did we dragged the line to the point that it may + // create a selfintersecting polygon?) + if( OPT_VECTOR2I originEndIntersect = endSide.Intersect( originSide ) ) + draggedCenter = *originEndIntersect; + else + draggedCenter = m_line.GetPosition(); + + // Line B coefficient (y=Ax+B) for the dragged segment (A coefficient is computed up on the + // the construction of EC_CONVERGING + double coefB = draggedCenter.y - m_coefA * draggedCenter.x; + VECTOR2D draggedEnd = draggedCenter + 10000; + + if( std::isfinite( m_coefA ) ) + { + if( std::abs( m_coefA ) < 1 ) + draggedEnd.y = m_coefA * draggedEnd.x + coefB; + else + draggedEnd.x = ( draggedEnd.y - coefB ) / m_coefA; + } + else // vertical line + { + draggedEnd.x = draggedCenter.x; + draggedEnd.y = draggedEnd.x + coefB; + } + + SEG dragged( draggedCenter, draggedEnd ); // the dragged segment + + // First intersection point (dragged segment against origin side) + if( OPT_VECTOR2I originIntersect = dragged.IntersectLines( originSide ) ) + origin.SetPosition( *originIntersect ); + + // Second intersection point (dragged segment against end side) + if( OPT_VECTOR2I endIntersect = dragged.IntersectLines( endSide ) ) + end.SetPosition( *endIntersect ); +} diff --git a/pcbnew/tools/edit_points.h b/pcbnew/tools/edit_points.h index 1d10e21a45..49aa2b9383 100644 --- a/pcbnew/tools/edit_points.h +++ b/pcbnew/tools/edit_points.h @@ -579,4 +579,29 @@ private: const EDIT_POINT& m_end; }; + +/** + * Class EC_CONVERGING + * + * EDIT_CONSTRAINT for 3 segment: dragged and two adjacent ones, enforcing to keep their slopes + * and allows only to change ending points. Applied to zones. + */ +class EC_CONVERGING : public EDIT_CONSTRAINT +{ +public: + EC_CONVERGING( EDIT_LINE& aLine, EDIT_POINTS& aPoints ); + + virtual ~EC_CONVERGING(); + + ///> @copydoc EDIT_CONSTRAINT::Apply() + virtual void Apply(); + +private: + EC_LINE* m_originSideConstraint; ///< Constraint for origin side segment + EC_LINE* m_endSideConstraint; ///< Constraint for end side segment + EDIT_LINE& m_line; ///< Dragged segment + EDIT_POINTS& m_editPoints; ///< EDIT_POINT instance storing modified lines + double m_coefA; ///< Original dragged segment A coefficient (y = Ax + B) +}; + #endif /* EDIT_POINTS_H_ */ diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp index 3caec5eb5e..f48f0583dc 100644 --- a/pcbnew/tools/point_editor.cpp +++ b/pcbnew/tools/point_editor.cpp @@ -135,7 +135,7 @@ private: POINT_EDITOR::POINT_EDITOR() : TOOL_INTERACTIVE( "pcbnew.PointEditor" ), m_selectionTool( NULL ), m_dragPoint( NULL ), - m_original( VECTOR2I( 0, 0 ) ) + m_original( VECTOR2I( 0, 0 ) ), m_altConstrainer( VECTOR2I( 0, 0 ) ) { } @@ -143,6 +143,7 @@ POINT_EDITOR::POINT_EDITOR() : void POINT_EDITOR::Reset( RESET_REASON aReason ) { m_editPoints.reset(); + m_altConstraint.reset(); } @@ -175,8 +176,6 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) KIGFX::VIEW* view = getView(); PCB_EDIT_FRAME* editFrame = getEditFrame(); EDA_ITEM* item = selection.items.GetPickedItem( 0 ); - EDIT_POINT constrainer( VECTOR2I( 0, 0 ) ); - boost::shared_ptr > degree45Constraint; m_editPoints = EDIT_POINTS_FACTORY::Make( item ); if( !m_editPoints ) @@ -237,24 +236,14 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) modified = true; } - if( !!evt->Modifier( MD_CTRL ) != (bool) degree45Constraint ) // 45 degrees mode - { - if( !degree45Constraint ) - { - // Find a proper constraining point for 45 degrees mode - constrainer = get45DegConstrainer(); - degree45Constraint.reset( new EC_45DEGREE( *m_dragPoint, constrainer ) ); - } - else - { - degree45Constraint.reset(); - } - } + bool enableAltConstraint = !!evt->Modifier( MD_CTRL ); + if( enableAltConstraint != (bool) m_altConstraint ) // alternative constraint + setAltConstraint( enableAltConstraint ); m_dragPoint->SetPosition( controls->GetCursorPosition() ); - if( degree45Constraint ) - degree45Constraint->Apply(); + if( m_altConstraint ) + m_altConstraint->Apply(); else m_dragPoint->ApplyConstraint(); @@ -271,7 +260,7 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) else if( evt->IsMouseUp( BUT_LEFT ) ) { - degree45Constraint.reset(); + setAltConstraint( false ); modified = false; } @@ -540,6 +529,32 @@ void POINT_EDITOR::updatePoints() const } +void POINT_EDITOR::setAltConstraint( bool aEnabled ) +{ + if( aEnabled ) + { + EDIT_LINE* line = dynamic_cast( m_dragPoint ); + if( line ) + { + if( m_editPoints->GetParent()->Type() == PCB_ZONE_AREA_T ) + { + m_altConstraint.reset( new EC_CONVERGING( *line, *m_editPoints ) ); + } + } + else + { + // Find a proper constraining point for 45 degrees mode + m_altConstrainer = get45DegConstrainer(); + m_altConstraint.reset( new EC_45DEGREE( *m_dragPoint, m_altConstrainer ) ); + } + } + else + { + m_altConstraint.reset(); + } +} + + EDIT_POINT POINT_EDITOR::get45DegConstrainer() const { EDA_ITEM* item = m_editPoints->GetParent(); diff --git a/pcbnew/tools/point_editor.h b/pcbnew/tools/point_editor.h index 8e37a142cd..fe77760c3d 100644 --- a/pcbnew/tools/point_editor.h +++ b/pcbnew/tools/point_editor.h @@ -68,6 +68,12 @@ private: ///> Currently available edit points. boost::shared_ptr m_editPoints; + // Alternative constraint, enabled while a modifier key is held + boost::shared_ptr > m_altConstraint; + + // EDIT_POINT for alternative constraint mode + EDIT_POINT m_altConstrainer; + ///> Updates item's points with edit points. void updateItem() const; @@ -83,6 +89,9 @@ private: return m_dragPoint == &aPoint; } + ///> Sets up an alternative constraint (typically enabled upon a modifier key being pressed). + void setAltConstraint( bool aEnabled ); + ///> Returns a point that should be used as a constrainer for 45 degrees mode. EDIT_POINT get45DegConstrainer() const; From 40ee66f8c51a32cb47deb4de5f20abde5b9a29e0 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 14 Mar 2014 16:05:30 +0100 Subject: [PATCH 182/741] ZONE_CONTAINERs are drawn as outlines while being edited using the POINT_EDITOR. --- pcbnew/tools/point_editor.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp index f48f0583dc..4ae508288c 100644 --- a/pcbnew/tools/point_editor.cpp +++ b/pcbnew/tools/point_editor.cpp @@ -390,6 +390,7 @@ void POINT_EDITOR::updateItem() const case PCB_ZONE_AREA_T: { ZONE_CONTAINER* zone = static_cast( item ); + zone->ClearFilledPolysList(); CPolyLine* outline = zone->Outline(); for( int i = 0; i < outline->GetCornersCount(); ++i ) From 59a0ced0a6853816df3afe4cd65b77c843410d83 Mon Sep 17 00:00:00 2001 From: Orson Date: Fri, 14 Mar 2014 21:32:25 +0100 Subject: [PATCH 183/741] Corrected the error message about required OpenGL version for GAL. Fixed pcb_calculator .desktop file. --- common/gal/opengl/opengl_gal.cpp | 4 ++-- resources/linux/mime/applications/pcbcalculator.desktop | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index f9cccbd365..0884ed2345 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -941,11 +941,11 @@ void OPENGL_GAL::initGlew() // Check the OpenGL version (minimum 2.1 is required) if( GLEW_VERSION_2_1 ) { - wxLogInfo( wxT( "OpenGL Version 2.1 supported." ) ); + wxLogInfo( wxT( "OpenGL 2.1 supported." ) ); } else { - DisplayError( parentWindow, wxT( "OpenGL Version 2.1 is not supported!" ) ); + DisplayError( parentWindow, wxT( "OpenGL 2.1 or higher is required!" ) ); exit( 1 ); } diff --git a/resources/linux/mime/applications/pcbcalculator.desktop b/resources/linux/mime/applications/pcbcalculator.desktop index 7c449f3fef..4ae5e3e841 100644 --- a/resources/linux/mime/applications/pcbcalculator.desktop +++ b/resources/linux/mime/applications/pcbcalculator.desktop @@ -2,7 +2,7 @@ [Desktop Entry] Categories=Development;Electronics Comment=Design a printed circuit board -Exec=pcbcalculator +Exec=pcb_calculator GenericName=EDA Suite Icon=pcbcalculator MimeType=application/x-pcbcalculator-project; From 91c53a947aff2097b8933eda0b48d1df7fb0e9c6 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sun, 16 Mar 2014 15:10:42 +0100 Subject: [PATCH 184/741] bitmap2component: add management of image resolution: Is read from file, when exists, and can be modified in bitmap2component. It also fix issue #747631 --- bitmap2component/bitmap2cmp_gui.cpp | 160 ++-- bitmap2component/bitmap2cmp_gui_base.cpp | 87 ++- bitmap2component/bitmap2cmp_gui_base.fbp | 888 ++++++++++++++++++----- bitmap2component/bitmap2cmp_gui_base.h | 20 +- bitmap2component/bitmap2component.cpp | 20 +- 5 files changed, 911 insertions(+), 264 deletions(-) diff --git a/bitmap2component/bitmap2cmp_gui.cpp b/bitmap2component/bitmap2cmp_gui.cpp index d83a0fce8c..52f5c134b7 100644 --- a/bitmap2component/bitmap2cmp_gui.cpp +++ b/bitmap2component/bitmap2cmp_gui.cpp @@ -27,10 +27,6 @@ #include #include -#include -#include -#include - #include #include @@ -50,7 +46,10 @@ #define KEYWORD_BINARY_THRESHOLD wxT( "Threshold" ) #define KEYWORD_BW_NEGATIVE wxT( "Negative_choice" ) -extern int bitmap2component( potrace_bitmap_t* aPotrace_bitmap, FILE* aOutfile, int aFormat ); +#define DEFAULT_DPI 300 // Default resolution in Bit per inches + +extern int bitmap2component( potrace_bitmap_t* aPotrace_bitmap, FILE* aOutfile, + int aFormat, int aDpi_X, int aDpi_Y ); /* Class BM2CMP_FRAME_BASE This is the main frame for this application @@ -64,11 +63,13 @@ private: wxBitmap m_Greyscale_Bitmap; wxImage m_NB_Image; wxBitmap m_BN_Bitmap; + wxSize m_imageDPI; // The initial image resolution. When unknown, + // set to DEFAULT_DPI x DEFAULT_DPI per Inch wxString m_BitmapFileName; wxString m_ConvertedFileName; - wxSize m_FrameSize; - wxPoint m_FramePos; - wxConfig * m_Config; + wxSize m_frameSize; + wxPoint m_framePos; + wxConfig* m_config; public: BM2CMP_FRAME(); @@ -109,27 +110,43 @@ private: void Binarize( double aThreshold ); // aThreshold = 0.0 (black level) to 1.0 (white level) void OnOptionsSelection( wxCommandEvent& event ); void OnThresholdChange( wxScrollEvent& event ); + void OnResolutionChange( wxCommandEvent& event ); + + // called when texts controls which handle the image resolution + // lose the focus, to ensure the rigyht vaules are displayed + // because the m_imageDPI are clipped to acceptable values, and + // the text displayed could be differ duringa text edition + // We are using ChangeValue here to avoid generating a wxEVT_TEXT event. + void UpdateDPITextValueX( wxMouseEvent& event ) + { + m_DPIValueX->ChangeValue( wxString::Format( wxT( "%d" ), m_imageDPI.x ) ); + } + void UpdateDPITextValueY( wxMouseEvent& event ) + { + m_DPIValueY->ChangeValue( wxString::Format( wxT( "%d" ), m_imageDPI.y ) ); + } + void NegateGreyscaleImage( ); void ExportFile( FILE* aOutfile, int aFormat ); + void updateImageInfo(); }; - BM2CMP_FRAME::BM2CMP_FRAME() : BM2CMP_FRAME_BASE( NULL ) { int tmp; - m_Config = new wxConfig(); - m_Config->Read( KEYWORD_FRAME_POSX, & m_FramePos.x, -1 ); - m_Config->Read( KEYWORD_FRAME_POSY, & m_FramePos.y, -1 ); - m_Config->Read( KEYWORD_FRAME_SIZEX, & m_FrameSize.x, -1 ); - m_Config->Read( KEYWORD_FRAME_SIZEY, & m_FrameSize.y, -1 ); - m_Config->Read( KEYWORD_LAST_INPUT_FILE, &m_BitmapFileName ); - m_Config->Read( KEYWORD_LAST_OUTPUT_FILE, &m_ConvertedFileName ); - if( m_Config->Read( KEYWORD_BINARY_THRESHOLD, &tmp ) ) + m_config = new wxConfig(); + m_config->Read( KEYWORD_FRAME_POSX, & m_framePos.x, -1 ); + m_config->Read( KEYWORD_FRAME_POSY, & m_framePos.y, -1 ); + m_config->Read( KEYWORD_FRAME_SIZEX, & m_frameSize.x, -1 ); + m_config->Read( KEYWORD_FRAME_SIZEY, & m_frameSize.y, -1 ); + m_config->Read( KEYWORD_LAST_INPUT_FILE, &m_BitmapFileName ); + m_config->Read( KEYWORD_LAST_OUTPUT_FILE, &m_ConvertedFileName ); + if( m_config->Read( KEYWORD_BINARY_THRESHOLD, &tmp ) ) m_sliderThreshold->SetValue( tmp ); - if( m_Config->Read( KEYWORD_BW_NEGATIVE, &tmp ) ) + if( m_config->Read( KEYWORD_BW_NEGATIVE, &tmp ) ) m_rbOptions->SetSelection( tmp ? 1 : 0 ); - m_Config->Read( KEYWORD_LAST_FORMAT, &tmp ); + m_config->Read( KEYWORD_LAST_FORMAT, &tmp ); m_radioBoxFormat->SetSelection( tmp ); @@ -140,34 +157,36 @@ BM2CMP_FRAME::BM2CMP_FRAME() : BM2CMP_FRAME_BASE( NULL ) GetSizer()->SetSizeHints( this ); - SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y ); + SetSize( m_framePos.x, m_framePos.y, m_frameSize.x, m_frameSize.y ); m_buttonExport->Enable( false ); - if ( m_FramePos == wxDefaultPosition ) + m_imageDPI.x = m_imageDPI.y = DEFAULT_DPI; // Default resolution in Bit per inches + + if ( m_framePos == wxDefaultPosition ) Centre(); } BM2CMP_FRAME::~BM2CMP_FRAME() { - if( ( m_Config == NULL ) || IsIconized() ) + if( ( m_config == NULL ) || IsIconized() ) return; - m_FrameSize = GetSize(); - m_FramePos = GetPosition(); + m_frameSize = GetSize(); + m_framePos = GetPosition(); - m_Config->Write( KEYWORD_FRAME_POSX, (long) m_FramePos.x ); - m_Config->Write( KEYWORD_FRAME_POSY, (long) m_FramePos.y ); - m_Config->Write( KEYWORD_FRAME_SIZEX, (long) m_FrameSize.x ); - m_Config->Write( KEYWORD_FRAME_SIZEY, (long) m_FrameSize.y ); - m_Config->Write( KEYWORD_LAST_INPUT_FILE, m_BitmapFileName ); - m_Config->Write( KEYWORD_LAST_OUTPUT_FILE, m_ConvertedFileName ); - m_Config->Write( KEYWORD_BINARY_THRESHOLD, m_sliderThreshold->GetValue() ); - m_Config->Write( KEYWORD_BW_NEGATIVE, m_rbOptions->GetSelection() ); - m_Config->Write( KEYWORD_LAST_FORMAT, m_radioBoxFormat->GetSelection() ); + m_config->Write( KEYWORD_FRAME_POSX, (long) m_framePos.x ); + m_config->Write( KEYWORD_FRAME_POSY, (long) m_framePos.y ); + m_config->Write( KEYWORD_FRAME_SIZEX, (long) m_frameSize.x ); + m_config->Write( KEYWORD_FRAME_SIZEY, (long) m_frameSize.y ); + m_config->Write( KEYWORD_LAST_INPUT_FILE, m_BitmapFileName ); + m_config->Write( KEYWORD_LAST_OUTPUT_FILE, m_ConvertedFileName ); + m_config->Write( KEYWORD_BINARY_THRESHOLD, m_sliderThreshold->GetValue() ); + m_config->Write( KEYWORD_BW_NEGATIVE, m_rbOptions->GetSelection() ); + m_config->Write( KEYWORD_LAST_FORMAT, m_radioBoxFormat->GetSelection() ); - delete m_Config; + delete m_config; /* This needed for OSX: avoids further OnDraw processing after this * destructor and before the native window is destroyed @@ -246,15 +265,31 @@ bool BM2CMP_FRAME::LoadFile( wxString& aFullFileName ) int h = m_Pict_Bitmap.GetHeight(); int w = m_Pict_Bitmap.GetWidth(); - int nb = m_Pict_Bitmap.GetDepth(); + // Determine image resolution in DPI (does not existing in all formats). + // the resolution can be given in bit per inches or bit per cm in file + m_imageDPI.x = m_Pict_Image.GetOptionInt( wxIMAGE_OPTION_RESOLUTIONX ); + m_imageDPI.y = m_Pict_Image.GetOptionInt( wxIMAGE_OPTION_RESOLUTIONY ); - wxString msg; - msg.Printf( wxT( "%d" ), w ); - m_SizeXValue->SetLabel(msg); - msg.Printf( wxT( "%d" ), h ); - m_SizeYValue->SetLabel(msg); - msg.Printf( wxT( "%d" ), nb ); - m_BPPValue->SetLabel(msg); + if( m_imageDPI.x > 1 && m_imageDPI.y > 1 ) + { + if( m_Pict_Image.GetOptionInt( wxIMAGE_OPTION_RESOLUTIONUNIT ) == wxIMAGE_RESOLUTION_CM ) + { + // When the initial resolution is given in bits per cm, + // experience shows adding 1.27 to the resolution converted in dpi + // before convert to int value reduce the conversion error + // but it is not perfect + m_imageDPI.x = m_imageDPI.x * 2.54 + 1.27; + m_imageDPI.y = m_imageDPI.y * 2.54 + 1.27; + } + } + else // fallback to the default value + m_imageDPI.x = m_imageDPI.y = DEFAULT_DPI; + + // Display image info: + // We are using ChangeValue here to avoid generating a wxEVT_TEXT event. + m_DPIValueX->ChangeValue( wxString::Format( wxT( "%d" ), m_imageDPI.x ) ); + m_DPIValueY->ChangeValue( wxString::Format( wxT( "%d" ), m_imageDPI.y ) ); + updateImageInfo(); m_InitialPicturePanel->SetVirtualSize( w, h ); m_GreyscalePicturePanel->SetVirtualSize( w, h ); @@ -272,6 +307,43 @@ bool BM2CMP_FRAME::LoadFile( wxString& aFullFileName ) return true; } +void BM2CMP_FRAME::updateImageInfo() +{ + // Note: the image resolution text controls are not modified + // here, to avoid a race between text change when entered by user and + // a text change if it is modifed here. + int h = m_Pict_Bitmap.GetHeight(); + int w = m_Pict_Bitmap.GetWidth(); + int nb = m_Pict_Bitmap.GetDepth(); + + m_SizeXValue->SetLabel( wxString::Format( wxT( "%d" ), w ) ); + m_SizeYValue->SetLabel( wxString::Format( wxT( "%d" ), h ) ); + m_BPPValue->SetLabel( wxString::Format( wxT( "%d" ), nb ) ); + + m_SizeXValue_mm->SetLabel( wxString::Format( wxT( "%.1f" ), + (double) w / m_imageDPI.x * 25.4 ) ); + m_SizeYValue_mm->SetLabel( wxString::Format( wxT( "%.1f" ), + (double) h / m_imageDPI.y * 25.4 ) ); +} + +void BM2CMP_FRAME::OnResolutionChange( wxCommandEvent& event ) +{ + long tmp; + + if( m_DPIValueX->GetValue().ToLong( &tmp ) ) + m_imageDPI.x = tmp; + + if( m_DPIValueY->GetValue().ToLong( &tmp ) ) + m_imageDPI.y = tmp; + + if( m_imageDPI.x < 32 ) + m_imageDPI.x = 32; + + if( m_imageDPI.y < 32 ) + m_imageDPI.y = 32; + + updateImageInfo(); +} void BM2CMP_FRAME::Binarize( double aThreshold ) { @@ -514,14 +586,14 @@ void BM2CMP_FRAME::ExportFile( FILE* aOutfile, int aFormat ) /* fill the bitmap with data */ for( int y = 0; y < h; y++ ) { - for( int x = 0; xAddGrowableCol( 1 ); + fgSizerInfo->AddGrowableCol( 2 ); fgSizerInfo->SetFlexibleDirection( wxBOTH ); fgSizerInfo->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_staticTextSizeX = new wxStaticText( m_panelRight, wxID_ANY, _("Size X:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextSizeX->Wrap( -1 ); - fgSizerInfo->Add( m_staticTextSizeX, 0, wxALIGN_RIGHT|wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + m_staticTextSize = new wxStaticText( m_panelRight, wxID_ANY, _("Size:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextSize->Wrap( -1 ); + fgSizerInfo->Add( m_staticTextSize, 0, wxALIGN_RIGHT|wxALL|wxALIGN_CENTER_VERTICAL, 5 ); m_SizeXValue = new wxStaticText( m_panelRight, wxID_ANY, _("0000"), wxDefaultPosition, wxDefaultSize, 0 ); m_SizeXValue->Wrap( -1 ); - fgSizerInfo->Add( m_SizeXValue, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_SizeXunits = new wxStaticText( m_panelRight, wxID_ANY, _("pixels"), wxDefaultPosition, wxDefaultSize, 0 ); - m_SizeXunits->Wrap( -1 ); - fgSizerInfo->Add( m_SizeXunits, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_staticTextSizeY = new wxStaticText( m_panelRight, wxID_ANY, _("Size Y:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextSizeY->Wrap( -1 ); - fgSizerInfo->Add( m_staticTextSizeY, 0, wxALIGN_RIGHT|wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + fgSizerInfo->Add( m_SizeXValue, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); m_SizeYValue = new wxStaticText( m_panelRight, wxID_ANY, _("0000"), wxDefaultPosition, wxDefaultSize, 0 ); m_SizeYValue->Wrap( -1 ); - fgSizerInfo->Add( m_SizeYValue, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + fgSizerInfo->Add( m_SizeYValue, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - m_SizeYunits = new wxStaticText( m_panelRight, wxID_ANY, _("pixels"), wxDefaultPosition, wxDefaultSize, 0 ); - m_SizeYunits->Wrap( -1 ); - fgSizerInfo->Add( m_SizeYunits, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + m_SizePixUnits = new wxStaticText( m_panelRight, wxID_ANY, _("pixels"), wxDefaultPosition, wxDefaultSize, 0 ); + m_SizePixUnits->Wrap( -1 ); + fgSizerInfo->Add( m_SizePixUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); + + m_staticTextSize1 = new wxStaticText( m_panelRight, wxID_ANY, _("Size:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextSize1->Wrap( -1 ); + fgSizerInfo->Add( m_staticTextSize1, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_RIGHT, 5 ); + + m_SizeXValue_mm = new wxStaticText( m_panelRight, wxID_ANY, _("0000"), wxDefaultPosition, wxDefaultSize, 0 ); + m_SizeXValue_mm->Wrap( -1 ); + fgSizerInfo->Add( m_SizeXValue_mm, 0, wxBOTTOM|wxRIGHT, 5 ); + + m_SizeYValue_mm = new wxStaticText( m_panelRight, wxID_ANY, _("0000"), wxDefaultPosition, wxDefaultSize, 0 ); + m_SizeYValue_mm->Wrap( -1 ); + fgSizerInfo->Add( m_SizeYValue_mm, 0, wxBOTTOM|wxRIGHT, 5 ); + + m_Size_mmxUnits = new wxStaticText( m_panelRight, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 ); + m_Size_mmxUnits->Wrap( -1 ); + fgSizerInfo->Add( m_Size_mmxUnits, 0, wxBOTTOM|wxRIGHT, 5 ); m_staticTextBPP = new wxStaticText( m_panelRight, wxID_ANY, _("BPP:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextBPP->Wrap( -1 ); @@ -75,17 +85,38 @@ BM2CMP_FRAME_BASE::BM2CMP_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxS m_BPPValue = new wxStaticText( m_panelRight, wxID_ANY, _("0000"), wxDefaultPosition, wxDefaultSize, 0 ); m_BPPValue->Wrap( -1 ); - fgSizerInfo->Add( m_BPPValue, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + fgSizerInfo->Add( m_BPPValue, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 ); m_BPPunits = new wxStaticText( m_panelRight, wxID_ANY, _("bits"), wxDefaultPosition, wxDefaultSize, 0 ); m_BPPunits->Wrap( -1 ); fgSizerInfo->Add( m_BPPunits, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + fgSizerInfo->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_staticTextBPI = new wxStaticText( m_panelRight, wxID_ANY, _("Resolution:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextBPI->Wrap( -1 ); + fgSizerInfo->Add( m_staticTextBPI, 0, wxALIGN_RIGHT|wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + + m_DPIValueX = new wxTextCtrl( m_panelRight, wxID_ANY, _("300"), wxDefaultPosition, wxDefaultSize, 0 ); + m_DPIValueX->SetMinSize( wxSize( 40,-1 ) ); + + fgSizerInfo->Add( m_DPIValueX, 0, wxBOTTOM|wxRIGHT, 5 ); + + m_DPIValueY = new wxTextCtrl( m_panelRight, wxID_ANY, _("300"), wxDefaultPosition, wxDefaultSize, 0 ); + m_DPIValueY->SetMinSize( wxSize( 40,-1 ) ); + + fgSizerInfo->Add( m_DPIValueY, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 ); + + m_DPI_Units = new wxStaticText( m_panelRight, wxID_ANY, _("DPI"), wxDefaultPosition, wxDefaultSize, 0 ); + m_DPI_Units->Wrap( -1 ); + fgSizerInfo->Add( m_DPI_Units, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 ); + + sbSizerInfo->Add( fgSizerInfo, 0, wxEXPAND|wxBOTTOM, 5 ); - brightSizer->Add( sbSizerInfo, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + brightSizer->Add( sbSizerInfo, 0, wxEXPAND|wxALL, 5 ); m_buttonLoad = new wxButton( m_panelRight, wxID_ANY, _("Load Bitmap"), wxDefaultPosition, wxDefaultSize, 0 ); brightSizer->Add( m_buttonLoad, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); @@ -98,18 +129,18 @@ BM2CMP_FRAME_BASE::BM2CMP_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxS wxString m_radioBoxFormatChoices[] = { _("Eeschema"), _("Pcbnew old fmt (.emp)"), _("Pcbnew kicad_mod"), _("Postscript"), _("Logo for title block") }; int m_radioBoxFormatNChoices = sizeof( m_radioBoxFormatChoices ) / sizeof( wxString ); m_radioBoxFormat = new wxRadioBox( m_panelRight, wxID_ANY, _("Format"), wxDefaultPosition, wxDefaultSize, m_radioBoxFormatNChoices, m_radioBoxFormatChoices, 1, wxRA_SPECIFY_COLS ); - m_radioBoxFormat->SetSelection( 4 ); - brightSizer->Add( m_radioBoxFormat, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + m_radioBoxFormat->SetSelection( 2 ); + brightSizer->Add( m_radioBoxFormat, 0, wxEXPAND|wxALL, 5 ); wxString m_rbOptionsChoices[] = { _("Normal"), _("Negative") }; int m_rbOptionsNChoices = sizeof( m_rbOptionsChoices ) / sizeof( wxString ); m_rbOptions = new wxRadioBox( m_panelRight, wxID_ANY, _("Options"), wxDefaultPosition, wxDefaultSize, m_rbOptionsNChoices, m_rbOptionsChoices, 1, wxRA_SPECIFY_COLS ); m_rbOptions->SetSelection( 0 ); - brightSizer->Add( m_rbOptions, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + brightSizer->Add( m_rbOptions, 0, wxEXPAND|wxALL, 5 ); m_ThresholdText = new wxStaticText( m_panelRight, wxID_ANY, _("Threshold Value:"), wxDefaultPosition, wxDefaultSize, 0 ); m_ThresholdText->Wrap( -1 ); - brightSizer->Add( m_ThresholdText, 0, wxRIGHT|wxLEFT, 5 ); + brightSizer->Add( m_ThresholdText, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_sliderThreshold = new wxSlider( m_panelRight, wxID_ANY, 50, 0, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS ); m_sliderThreshold->SetToolTip( _("Adjust the level to convert the greyscale picture to a black and white picture.") ); @@ -131,6 +162,10 @@ BM2CMP_FRAME_BASE::BM2CMP_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxS m_InitialPicturePanel->Connect( wxEVT_PAINT, wxPaintEventHandler( BM2CMP_FRAME_BASE::OnPaint ), NULL, this ); m_GreyscalePicturePanel->Connect( wxEVT_PAINT, wxPaintEventHandler( BM2CMP_FRAME_BASE::OnPaint ), NULL, this ); m_BNPicturePanel->Connect( wxEVT_PAINT, wxPaintEventHandler( BM2CMP_FRAME_BASE::OnPaint ), NULL, this ); + m_DPIValueX->Connect( wxEVT_LEAVE_WINDOW, wxMouseEventHandler( BM2CMP_FRAME_BASE::UpdatePPITextValueX ), NULL, this ); + m_DPIValueX->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( BM2CMP_FRAME_BASE::OnResolutionChange ), NULL, this ); + m_DPIValueY->Connect( wxEVT_LEAVE_WINDOW, wxMouseEventHandler( BM2CMP_FRAME_BASE::UpdatePPITextValueY ), NULL, this ); + m_DPIValueY->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( BM2CMP_FRAME_BASE::OnResolutionChange ), NULL, this ); m_buttonLoad->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BM2CMP_FRAME_BASE::OnLoadFile ), NULL, this ); m_buttonExport->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BM2CMP_FRAME_BASE::OnExport ), NULL, this ); m_rbOptions->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( BM2CMP_FRAME_BASE::OnOptionsSelection ), NULL, this ); @@ -143,6 +178,10 @@ BM2CMP_FRAME_BASE::~BM2CMP_FRAME_BASE() m_InitialPicturePanel->Disconnect( wxEVT_PAINT, wxPaintEventHandler( BM2CMP_FRAME_BASE::OnPaint ), NULL, this ); m_GreyscalePicturePanel->Disconnect( wxEVT_PAINT, wxPaintEventHandler( BM2CMP_FRAME_BASE::OnPaint ), NULL, this ); m_BNPicturePanel->Disconnect( wxEVT_PAINT, wxPaintEventHandler( BM2CMP_FRAME_BASE::OnPaint ), NULL, this ); + m_DPIValueX->Disconnect( wxEVT_LEAVE_WINDOW, wxMouseEventHandler( BM2CMP_FRAME_BASE::UpdatePPITextValueX ), NULL, this ); + m_DPIValueX->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( BM2CMP_FRAME_BASE::OnResolutionChange ), NULL, this ); + m_DPIValueY->Disconnect( wxEVT_LEAVE_WINDOW, wxMouseEventHandler( BM2CMP_FRAME_BASE::UpdatePPITextValueY ), NULL, this ); + m_DPIValueY->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( BM2CMP_FRAME_BASE::OnResolutionChange ), NULL, this ); m_buttonLoad->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BM2CMP_FRAME_BASE::OnLoadFile ), NULL, this ); m_buttonExport->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BM2CMP_FRAME_BASE::OnExport ), NULL, this ); m_rbOptions->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( BM2CMP_FRAME_BASE::OnOptionsSelection ), NULL, this ); diff --git a/bitmap2component/bitmap2cmp_gui_base.fbp b/bitmap2component/bitmap2cmp_gui_base.fbp index d848aa0d8c..c53486ff54 100644 --- a/bitmap2component/bitmap2cmp_gui_base.fbp +++ b/bitmap2component/bitmap2cmp_gui_base.fbp @@ -20,8 +20,10 @@ . 1 + 1 1 1 + UI 0 0 @@ -506,7 +508,7 @@ none 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + wxEXPAND|wxALL 0 wxID_ANY @@ -521,16 +523,16 @@ wxEXPAND|wxBOTTOM 0 - 3 + 4 wxBOTH - + 1,2 0 fgSizerInfo wxFLEX_GROWMODE_SPECIFIED none - 3 + 0 0 5 @@ -564,7 +566,7 @@ 0 0 wxID_ANY - Size X: + Size: 0 @@ -572,7 +574,7 @@ 0 1 - m_staticTextSizeX + m_staticTextSize 1 @@ -617,7 +619,7 @@ 5 - wxALL|wxALIGN_CENTER_VERTICAL + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT 0 1 @@ -700,173 +702,7 @@ 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - pixels - - 0 - - - 0 - - 1 - m_SizeXunits - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_RIGHT|wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Size Y: - - 0 - - - 0 - - 1 - m_staticTextSizeY - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT 0 1 @@ -949,7 +785,7 @@ 5 - wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT 0 1 @@ -987,7 +823,339 @@ 0 1 - m_SizeYunits + m_SizePixUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_RIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Size: + + 0 + + + 0 + + 1 + m_staticTextSize1 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + 0000 + + 0 + + + 0 + + 1 + m_SizeXValue_mm + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + 0000 + + 0 + + + 0 + + 1 + m_SizeYValue_mm + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + mm + + 0 + + + 0 + + 1 + m_Size_mmxUnits 1 @@ -1115,7 +1283,7 @@ 5 - wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT 0 1 @@ -1279,6 +1447,364 @@ + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxALIGN_RIGHT|wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Resolution: + + 0 + + + 0 + + 1 + m_staticTextBPI + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + 40,-1 + 1 + m_DPIValueX + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 300 + + + + + + + + + + UpdatePPITextValueX + + + + + + + + + + + + + + + + OnResolutionChange + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + 40,-1 + 1 + m_DPIValueY + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 300 + + + + + + + + + + UpdatePPITextValueY + + + + + + + + + + + + + + + + OnResolutionChange + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + DPI + + 0 + + + 0 + + 1 + m_DPI_Units + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1461,7 +1987,7 @@ 5 - wxBOTTOM|wxRIGHT|wxLEFT + wxEXPAND|wxALL 0 1 @@ -1509,7 +2035,7 @@ 1 Resizable - 4 + 2 1 wxRA_SPECIFY_COLS @@ -1551,7 +2077,7 @@ 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + wxEXPAND|wxALL 0 1 @@ -1641,7 +2167,7 @@ 5 - wxRIGHT|wxLEFT + wxTOP|wxRIGHT|wxLEFT 0 1 diff --git a/bitmap2component/bitmap2cmp_gui_base.h b/bitmap2component/bitmap2cmp_gui_base.h index 301a63398b..0963e547ca 100644 --- a/bitmap2component/bitmap2cmp_gui_base.h +++ b/bitmap2component/bitmap2cmp_gui_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 8 2012) +// C++ code generated with wxFormBuilder (version Nov 6 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -47,15 +48,21 @@ class BM2CMP_FRAME_BASE : public wxFrame wxScrolledWindow* m_GreyscalePicturePanel; wxScrolledWindow* m_BNPicturePanel; wxPanel* m_panelRight; - wxStaticText* m_staticTextSizeX; + wxStaticText* m_staticTextSize; wxStaticText* m_SizeXValue; - wxStaticText* m_SizeXunits; - wxStaticText* m_staticTextSizeY; wxStaticText* m_SizeYValue; - wxStaticText* m_SizeYunits; + wxStaticText* m_SizePixUnits; + wxStaticText* m_staticTextSize1; + wxStaticText* m_SizeXValue_mm; + wxStaticText* m_SizeYValue_mm; + wxStaticText* m_Size_mmxUnits; wxStaticText* m_staticTextBPP; wxStaticText* m_BPPValue; wxStaticText* m_BPPunits; + wxStaticText* m_staticTextBPI; + wxTextCtrl* m_DPIValueX; + wxTextCtrl* m_DPIValueY; + wxStaticText* m_DPI_Units; wxButton* m_buttonLoad; wxButton* m_buttonExport; wxRadioBox* m_radioBoxFormat; @@ -66,6 +73,9 @@ class BM2CMP_FRAME_BASE : public wxFrame // Virtual event handlers, overide them in your derived class virtual void OnPaint( wxPaintEvent& event ) { event.Skip(); } + virtual void UpdatePPITextValueX( wxMouseEvent& event ) { event.Skip(); } + virtual void OnResolutionChange( wxCommandEvent& event ) { event.Skip(); } + virtual void UpdatePPITextValueY( wxMouseEvent& event ) { event.Skip(); } virtual void OnLoadFile( wxCommandEvent& event ) { event.Skip(); } virtual void OnExport( wxCommandEvent& event ) { event.Skip(); } virtual void OnOptionsSelection( wxCommandEvent& event ) { event.Skip(); } diff --git a/bitmap2component/bitmap2component.cpp b/bitmap2component/bitmap2component.cpp index 245cfc3447..83014cfa93 100644 --- a/bitmap2component/bitmap2component.cpp +++ b/bitmap2component/bitmap2component.cpp @@ -138,12 +138,12 @@ BITMAPCONV_INFO::BITMAPCONV_INFO() } -int bitmap2component( potrace_bitmap_t* aPotrace_bitmap, FILE* aOutfile, int aFormat ) +int bitmap2component( potrace_bitmap_t* aPotrace_bitmap, FILE* aOutfile, + int aFormat, int aDpi_X, int aDpi_Y ) { potrace_param_t* param; potrace_state_t* st; - // set tracing parameters, starting from defaults param = potrace_param_default(); if( !param ) @@ -171,8 +171,8 @@ int bitmap2component( potrace_bitmap_t* aPotrace_bitmap, FILE* aOutfile, int aFo { case 4: info.m_Format = KICAD_LOGO; - info.m_ScaleX = 1e3 * 25.4 / 300; // the conversion scale from PPI to micro - info.m_ScaleY = info.m_ScaleX; // Y axis is top to bottom + info.m_ScaleX = 1e3 * 25.4 / aDpi_X; // the conversion scale from PPI to micro + info.m_ScaleY = 1e3 * 25.4 / aDpi_Y; // Y axis is top to bottom info.CreateOutputFile(); break; @@ -186,22 +186,22 @@ int bitmap2component( potrace_bitmap_t* aPotrace_bitmap, FILE* aOutfile, int aFo case 2: info.m_Format = EESCHEMA_FMT; - info.m_ScaleX = 1000.0 / 300; // the conversion scale from PPI to UI - info.m_ScaleY = -info.m_ScaleX; // Y axis is bottom to Top for components in libs + info.m_ScaleX = 1000.0 / aDpi_X; // the conversion scale from PPI to UI + info.m_ScaleY = -1000.0 / aDpi_Y; // Y axis is bottom to Top for components in libs info.CreateOutputFile(); break; case 1: info.m_Format = PCBNEW_KICAD_MOD; - info.m_ScaleX = 1e6 * 25.4 / 300; // the conversion scale from PPI to UI - info.m_ScaleY = info.m_ScaleX; // Y axis is top to bottom in modedit + info.m_ScaleX = 1e6 * 25.4 / aDpi_X; // the conversion scale from PPI to UI + info.m_ScaleY = 1e6 * 25.4 / aDpi_Y; // Y axis is top to bottom in modedit info.CreateOutputFile(); break; case 0: info.m_Format = PCBNEW_LEGACY_EMP; - info.m_ScaleX = 10000.0 / 300; // the conversion scale - info.m_ScaleY = info.m_ScaleX; // Y axis is top to bottom in modedit + info.m_ScaleX = 10000.0 / aDpi_X; // the conversion scale + info.m_ScaleY = 10000.0 / aDpi_Y; // Y axis is top to bottom in modedit info.CreateOutputFile(); break; From b436924380db1ca8a42ab01996f2136084487d0d Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 16 Mar 2014 18:40:23 +0100 Subject: [PATCH 185/741] Warning removal, patches from Camille 019 --- include/class_layer_box_selector.h | 2 +- include/hotkeys_basic.h | 7 ++++--- include/richio.h | 2 +- include/wxPcbStruct.h | 4 ++-- pcbnew/exporters/idf.cpp | 4 ++-- pcbnew/exporters/vrml_board.cpp | 2 +- pcbnew/exporters/vrml_board.h | 2 +- pcbnew/router/pns_line_placer.cpp | 2 ++ pcbnew/router/pns_line_placer.h | 2 +- pcbnew/tools/bright_box.cpp | 2 ++ pcbnew/tools/bright_box.h | 2 +- 11 files changed, 18 insertions(+), 13 deletions(-) diff --git a/include/class_layer_box_selector.h b/include/class_layer_box_selector.h index 27d19b8a18..4a130c8654 100644 --- a/include/class_layer_box_selector.h +++ b/include/class_layer_box_selector.h @@ -5,7 +5,7 @@ #include // EDA_COLOR_T definition #include -class EDA_HOTKEY_CONFIG; +struct EDA_HOTKEY_CONFIG; /* Basic class to build a layer list. * this is an basic abstract class to build a layer list selector. diff --git a/include/hotkeys_basic.h b/include/hotkeys_basic.h index f070441de4..80ffc0ad28 100644 --- a/include/hotkeys_basic.h +++ b/include/hotkeys_basic.h @@ -143,10 +143,11 @@ wxString ReturnKeyNameFromCommandId( EDA_HOTKEY** aList, int aCommandId ); */ int ReturnKeyCodeFromKeyName( const wxString& keyname ); -/* An helper enum for AddHotkeyName function - * In menus we can an a hot key, or an accelerator , or sometimes just a comment +/** + * An helper enum for AddHotkeyName function + * In menus we can add a hot key, or an accelerator , or sometimes just a comment * Hot keys can perform actions using the current mouse cursor position - * Accelerators performs the same action as the associated menu + * Accelerators perform the same action as the associated menu * A comment is used in tool tips for some tools (zoom ..) * to show the hot key that performs this action */ diff --git a/include/richio.h b/include/richio.h index 6440fda7b0..64c842fcb2 100644 --- a/include/richio.h +++ b/include/richio.h @@ -155,7 +155,7 @@ struct IO_ERROR // : std::exception /** - * Class PARSE_ERROR + * Struct PARSE_ERROR * contains a filename or source description, a problem input line, a line number, * a byte offset, and an error message which contains the the caller's report and his * call site information: CPP source file, function, and line number. diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index 219c411523..f3a3367277 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -61,8 +61,8 @@ class BOARD_ITEM; class PCB_LAYER_BOX_SELECTOR; class NETLIST; class REPORTER; -class PARSE_ERROR; -class IO_ERROR; +struct PARSE_ERROR; +struct IO_ERROR; class FP_LIB_TABLE; /** diff --git a/pcbnew/exporters/idf.cpp b/pcbnew/exporters/idf.cpp index 21e4af1c9d..9ccf20eb22 100644 --- a/pcbnew/exporters/idf.cpp +++ b/pcbnew/exporters/idf.cpp @@ -568,8 +568,8 @@ bool IDF_BOARD::WriteDrills( void ) fprintf( layoutFile, ".DRILLED_HOLES\n" ); - std::list::iterator ds = drills.begin(); - std::list::iterator de = drills.end(); + std::list::iterator ds = drills.begin(); + std::list::iterator de = drills.end(); while( ds != de ) { diff --git a/pcbnew/exporters/vrml_board.cpp b/pcbnew/exporters/vrml_board.cpp index 4ef750278b..e8b13de36b 100644 --- a/pcbnew/exporters/vrml_board.cpp +++ b/pcbnew/exporters/vrml_board.cpp @@ -712,7 +712,7 @@ bool VRML_LAYER::Tesselate( VRML_LAYER* holes ) std::ostringstream ostr; ostr << "Tesselate():FAILED: " << holes->GetError(); error = ostr.str(); - return NULL; + return false; } if( Fault ) diff --git a/pcbnew/exporters/vrml_board.h b/pcbnew/exporters/vrml_board.h index aa7e935abe..9cb4a26f4f 100644 --- a/pcbnew/exporters/vrml_board.h +++ b/pcbnew/exporters/vrml_board.h @@ -58,7 +58,7 @@ #define M_PI4 ( M_PI / 4.0 ) #endif -struct GLUtesselator; +class GLUtesselator; struct VERTEX_3D { diff --git a/pcbnew/router/pns_line_placer.cpp b/pcbnew/router/pns_line_placer.cpp index a03183c45c..4b9b616f3e 100644 --- a/pcbnew/router/pns_line_placer.cpp +++ b/pcbnew/router/pns_line_placer.cpp @@ -31,6 +31,8 @@ using boost::optional; +const double PNS_LINE_PLACER::m_shoveLengthThreshold = 1.7; + PNS_LINE_PLACER::PNS_LINE_PLACER( PNS_NODE* aWorld ) { m_initial_direction = DIRECTION_45( DIRECTION_45::N ); diff --git a/pcbnew/router/pns_line_placer.h b/pcbnew/router/pns_line_placer.h index e4ab966e59..625e6451b2 100644 --- a/pcbnew/router/pns_line_placer.h +++ b/pcbnew/router/pns_line_placer.h @@ -111,7 +111,7 @@ public: PNS_NODE* GetCurrentNode() const; private: - static const double m_shoveLengthThreshold = 1.7; + static const double m_shoveLengthThreshold; bool handleViaPlacement( PNS_LINE& aHead ); diff --git a/pcbnew/tools/bright_box.cpp b/pcbnew/tools/bright_box.cpp index b0fd4aec81..ef76a91647 100644 --- a/pcbnew/tools/bright_box.cpp +++ b/pcbnew/tools/bright_box.cpp @@ -28,6 +28,8 @@ using namespace KIGFX; +const double BRIGHT_BOX::LineWidth = 100000.0; + BRIGHT_BOX::BRIGHT_BOX( BOARD_ITEM* aItem ) : EDA_ITEM( NOT_USED ), // this item is never added to a BOARD so it needs no type item( aItem ) diff --git a/pcbnew/tools/bright_box.h b/pcbnew/tools/bright_box.h index 14966db9ac..b963b0409c 100644 --- a/pcbnew/tools/bright_box.h +++ b/pcbnew/tools/bright_box.h @@ -54,7 +54,7 @@ public: private: static const int BrightBoxLayer = ITEM_GAL_LAYER( GP_OVERLAY ); static const KIGFX::COLOR4D BrightColor; - static const double LineWidth = 100000.0; + static const double LineWidth; BOARD_ITEM* item; }; From f6959c039c92cc57204d0700ce2ec2290436bd39 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 18 Mar 2014 11:04:52 +0100 Subject: [PATCH 186/741] Comments. --- common/view/view.cpp | 3 ++- pcbnew/tools/selection_tool.h | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/common/view/view.cpp b/common/view/view.cpp index b28b0a1c32..ba070b2786 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -114,7 +114,8 @@ void VIEW::Remove( VIEW_ITEM* aItem ) if( aItem->viewRequiredUpdate() != VIEW_ITEM::NONE ) // prevent from updating a removed item { - std::vector::iterator item = std::find( m_needsUpdate.begin(), m_needsUpdate.end(), aItem ); + std::vector::iterator item = std::find( m_needsUpdate.begin(), + m_needsUpdate.end(), aItem ); if( item != m_needsUpdate.end() ) m_needsUpdate.erase( item ); diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index 9ef61fbd4b..7072c89655 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -114,9 +114,13 @@ public: */ void AddMenuItem( const TOOL_ACTION& aAction ); - // TODO comments + ///> Event sent after an item is selected. const TOOL_EVENT SelectedEvent; + + ///> Event sent after an item is deselected. const TOOL_EVENT DeselectedEvent; + + ///> Event sent after selection is cleared. const TOOL_EVENT ClearedEvent; private: From 48161dcc4a1b1e53288355bbf741aa01bacef7d6 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 18 Mar 2014 11:05:24 +0100 Subject: [PATCH 187/741] Yet another approach to EC_LINE and EC_CONVERGING edit constraints. --- pcbnew/tools/edit_points.cpp | 103 ++++++++++++----------------------- pcbnew/tools/edit_points.h | 68 ++++++++++++++++------- 2 files changed, 84 insertions(+), 87 deletions(-) diff --git a/pcbnew/tools/edit_points.cpp b/pcbnew/tools/edit_points.cpp index e98a8dee6b..23c8f1dbf4 100644 --- a/pcbnew/tools/edit_points.cpp +++ b/pcbnew/tools/edit_points.cpp @@ -147,54 +147,41 @@ void EDIT_POINTS::ViewDraw( int aLayer, KIGFX::GAL* aGal ) const } -void EC_45DEGREE::Apply() +void EC_45DEGREE::Apply( EDIT_POINT& aHandle ) { // Current line vector - VECTOR2I lineVector( m_constrained.GetPosition() - m_constrainer.GetPosition() ); + VECTOR2I lineVector( aHandle.GetPosition() - m_constrainer.GetPosition() ); double angle = lineVector.Angle(); // Find the closest angle, which is a multiple of 45 degrees double newAngle = round( angle / ( M_PI / 4.0 ) ) * M_PI / 4.0; VECTOR2I newLineVector = lineVector.Rotate( newAngle - angle ); - m_constrained.SetPosition( m_constrainer.GetPosition() + newLineVector ); + aHandle.SetPosition( m_constrainer.GetPosition() + newLineVector ); } EC_LINE::EC_LINE( EDIT_POINT& aConstrained, const EDIT_POINT& aConstrainer ) : EDIT_CONSTRAINT( aConstrained ), m_constrainer( aConstrainer ) { - // Compute line coefficients - VECTOR2D delta = m_constrainer.GetPosition() - m_constrained.GetPosition(); - m_coefA = delta.y / delta.x; - m_coefB = m_constrainer.GetY() - m_coefA * m_constrainer.GetX(); + m_line = m_constrained.GetPosition() - m_constrainer.GetPosition(); } -void EC_LINE::Apply() +void EC_LINE::Apply( EDIT_POINT& aHandle ) { - VECTOR2I position = m_constrained.GetPosition(); + SEG main( m_constrainer.GetPosition(), m_constrainer.GetPosition() + m_line ); + SEG projection( aHandle.GetPosition(), aHandle.GetPosition() + m_line.Perpendicular() ); - if( std::isfinite( m_coefA ) ) - { - if( abs( m_coefA ) < 1 ) - position.y = m_coefA * position.x + m_coefB; - else - position.x = ( position.y - m_coefB ) / m_coefA; - } - else // vertical line - { - position.x = m_constrainer.GetX(); - } - - m_constrained.SetPosition( position ); + if( OPT_VECTOR2I intersect = projection.IntersectLines( main ) ) + aHandle.SetPosition( *intersect ); } -void EC_CIRCLE::Apply() +void EC_CIRCLE::Apply( EDIT_POINT& aHandle ) { VECTOR2I centerToEnd = m_end.GetPosition() - m_center.GetPosition(); - VECTOR2I centerToPoint = m_constrained.GetPosition() - m_center.GetPosition(); + VECTOR2I centerToPoint = aHandle.GetPosition() - m_center.GetPosition(); int radius = centerToEnd.EuclideanNorm(); double angle = centerToPoint.Angle(); @@ -202,20 +189,18 @@ void EC_CIRCLE::Apply() VECTOR2I newLine( radius, 0 ); newLine = newLine.Rotate( angle ); - m_constrained.SetPosition( m_center.GetPosition() + newLine ); + aHandle.SetPosition( m_center.GetPosition() + newLine ); } EC_CONVERGING::EC_CONVERGING( EDIT_LINE& aLine, EDIT_POINTS& aPoints ) : - EDIT_CONSTRAINT( aLine.GetEnd() ), - /*m_end( aLine.GetEnd() ), m_origin( aLine.GetOrigin() ),*/ m_line( aLine ), - m_editPoints( aPoints ) + EDIT_CONSTRAINT( aLine.GetOrigin() ), m_line( aLine ), m_editPoints( aPoints ) { // Dragged segment endings EDIT_POINT& origin = aLine.GetOrigin(); EDIT_POINT& end = aLine.GetEnd(); - // Add constraint to the line origin, so it moves only along it current line + // Previous and next points, to make constraining lines (adjacent to the dragged line) EDIT_POINT& prevOrigin = *aPoints.Previous( origin ); EDIT_POINT& nextEnd = *aPoints.Next( end ); @@ -223,9 +208,8 @@ EC_CONVERGING::EC_CONVERGING( EDIT_LINE& aLine, EDIT_POINTS& aPoints ) : m_originSideConstraint = new EC_LINE( origin, prevOrigin ); m_endSideConstraint = new EC_LINE( end, nextEnd ); - // Compute dragged segment slope - VECTOR2D delta = m_line.GetPosition() - end.GetPosition(); - m_coefA = delta.y / delta.x; + // Store the current vector of the line + m_draggedVector = end.GetPosition() - origin.GetPosition() ; } @@ -236,8 +220,12 @@ EC_CONVERGING::~EC_CONVERGING() } -void EC_CONVERGING::Apply() +void EC_CONVERGING::Apply( EDIT_POINT& aHandle ) { + // The dragged segment + SEG dragged( m_line.GetPosition(), m_line.GetPosition() + m_draggedVector ); + + // The dragged segment endpoints EDIT_POINT& origin = m_line.GetOrigin(); EDIT_POINT& end = m_line.GetEnd(); @@ -245,42 +233,12 @@ void EC_CONVERGING::Apply() m_originSideConstraint->Apply(); m_endSideConstraint->Apply(); - // Find points that make adjacent segments - EDIT_POINT& prevOrigin = *m_editPoints.Previous( origin ); // point previous to origin - EDIT_POINT& nextEnd = *m_editPoints.Next( end ); // point next to end + EDIT_POINT& prevOrigin = *m_editPoints.Previous( origin ); + EDIT_POINT& nextEnd = *m_editPoints.Next( end ); // Two segments adjacent to the dragged segment - SEG originSide( origin.GetPosition(), prevOrigin.GetPosition() ); - SEG endSide( end.GetPosition(), nextEnd.GetPosition() ); - - VECTOR2I draggedCenter; // center point of the dragged segment - - // Check if adjacent segments intersect (did we dragged the line to the point that it may - // create a selfintersecting polygon?) - if( OPT_VECTOR2I originEndIntersect = endSide.Intersect( originSide ) ) - draggedCenter = *originEndIntersect; - else - draggedCenter = m_line.GetPosition(); - - // Line B coefficient (y=Ax+B) for the dragged segment (A coefficient is computed up on the - // the construction of EC_CONVERGING - double coefB = draggedCenter.y - m_coefA * draggedCenter.x; - VECTOR2D draggedEnd = draggedCenter + 10000; - - if( std::isfinite( m_coefA ) ) - { - if( std::abs( m_coefA ) < 1 ) - draggedEnd.y = m_coefA * draggedEnd.x + coefB; - else - draggedEnd.x = ( draggedEnd.y - coefB ) / m_coefA; - } - else // vertical line - { - draggedEnd.x = draggedCenter.x; - draggedEnd.y = draggedEnd.x + coefB; - } - - SEG dragged( draggedCenter, draggedEnd ); // the dragged segment + SEG originSide = SEG( origin.GetPosition(), prevOrigin.GetPosition() ); + SEG endSide = SEG( end.GetPosition(), nextEnd.GetPosition() ); // First intersection point (dragged segment against origin side) if( OPT_VECTOR2I originIntersect = dragged.IntersectLines( originSide ) ) @@ -289,4 +247,15 @@ void EC_CONVERGING::Apply() // Second intersection point (dragged segment against end side) if( OPT_VECTOR2I endIntersect = dragged.IntersectLines( endSide ) ) end.SetPosition( *endIntersect ); + + // Check if adjacent segments intersect (did we dragged the line to the point that it may + // create a selfintersecting polygon?) + originSide = SEG( origin.GetPosition(), prevOrigin.GetPosition() ); + endSide = SEG( end.GetPosition(), nextEnd.GetPosition() ); + + if( OPT_VECTOR2I originEndIntersect = endSide.Intersect( originSide ) ) + { + origin.SetPosition( *originEndIntersect ); + end.SetPosition( *originEndIntersect ); + } } diff --git a/pcbnew/tools/edit_points.h b/pcbnew/tools/edit_points.h index 49aa2b9383..0c1dd343c2 100644 --- a/pcbnew/tools/edit_points.h +++ b/pcbnew/tools/edit_points.h @@ -58,9 +58,19 @@ public: /** * Function Apply() * - * Corrects coordinates of the constrained point. + * Corrects coordinates of the constrained edit handle. */ - virtual void Apply() = 0; + virtual void Apply( EDIT_TYPE& aHandle ) = 0; + + /** + * Function Apply() + * + * Corrects coordinates of the constrained edit handle. + */ + void Apply() + { + Apply( m_constrained ); + } protected: EDIT_TYPE& m_constrained; ///< Point that is constrained by rules implemented by Apply() @@ -234,7 +244,7 @@ public: ///> @copydoc EDIT_POINT::GetPosition() virtual VECTOR2I GetPosition() const { - return m_origin.GetPosition() + ( m_end.GetPosition() - m_origin.GetPosition() ) / 2; + return ( m_origin.GetPosition() + m_end.GetPosition() ) / 2; } ///> @copydoc EDIT_POINT::GetPosition() @@ -266,6 +276,11 @@ public: return m_origin; } + const EDIT_POINT& GetOrigin() const + { + return m_origin; + } + /** * Function GetEnd() * @@ -276,6 +291,11 @@ public: return m_end; } + const EDIT_POINT& GetEnd() const + { + return m_end; + } + bool operator==( const EDIT_POINT& aOther ) const { return GetPosition() == aOther.GetPosition(); @@ -458,11 +478,11 @@ public: {} ///> @copydoc EDIT_CONSTRAINT::Apply() - virtual void Apply() + virtual void Apply( EDIT_POINT& aHandle ) { - VECTOR2I point = m_constrained.GetPosition(); + VECTOR2I point = aHandle.GetPosition(); point.x = m_constrainer.GetPosition().x; - m_constrained.SetPosition( point ); + aHandle.SetPosition( point ); } private: @@ -489,11 +509,11 @@ public: {} ///> @copydoc EDIT_CONSTRAINT::Apply() - virtual void Apply() + virtual void Apply( EDIT_POINT& aHandle ) { - VECTOR2I point = m_constrained.GetPosition(); + VECTOR2I point = aHandle.GetPosition(); point.y = m_constrainer.GetPosition().y; - m_constrained.SetPosition( point ); + aHandle.SetPosition( point ); } private: @@ -521,7 +541,7 @@ public: {} ///> @copydoc EDIT_CONSTRAINT::Apply() - virtual void Apply(); + virtual void Apply( EDIT_POINT& aHandle ); private: const EDIT_POINT& m_constrainer; ///< Point that imposes the constraint. @@ -540,12 +560,11 @@ public: EC_LINE( EDIT_POINT& aConstrained, const EDIT_POINT& aConstrainer ); ///> @copydoc EDIT_CONSTRAINT::Apply() - virtual void Apply(); + virtual void Apply( EDIT_POINT& aHandle ); private: EDIT_POINT m_constrainer; ///< Point that imposes the constraint. - double m_coefA; ///< Line A coefficient (y = Ax + B) - double m_coefB; ///< Line B coefficient (y = Ax + B) + VECTOR2I m_line; ///< Vector representing the constraining line. }; @@ -569,7 +588,7 @@ public: {} ///> @copydoc EDIT_CONSTRAINT::Apply() - virtual void Apply(); + virtual void Apply( EDIT_POINT& aHandle ); private: ///> Point that imposes the constraint (center of the circle). @@ -594,14 +613,23 @@ public: virtual ~EC_CONVERGING(); ///> @copydoc EDIT_CONSTRAINT::Apply() - virtual void Apply(); + virtual void Apply( EDIT_POINT& aHandle ); private: - EC_LINE* m_originSideConstraint; ///< Constraint for origin side segment - EC_LINE* m_endSideConstraint; ///< Constraint for end side segment - EDIT_LINE& m_line; ///< Dragged segment - EDIT_POINTS& m_editPoints; ///< EDIT_POINT instance storing modified lines - double m_coefA; ///< Original dragged segment A coefficient (y = Ax + B) + ///> Constraint for origin side segment. + EDIT_CONSTRAINT* m_originSideConstraint; + + ///> Constraint for end side segment. + EDIT_CONSTRAINT* m_endSideConstraint; + + ///> Dragged segment. + EDIT_LINE& m_line; + + ///> EDIT_POINTS instance that stores currently modified lines. + EDIT_POINTS& m_editPoints; + + ///> Vector that represents the initial direction of the dragged segment. + VECTOR2I m_draggedVector; }; #endif /* EDIT_POINTS_H_ */ From 1ff99b47c8ad5d32e97cef6fee60d98f1ab84953 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 18 Mar 2014 11:09:43 +0100 Subject: [PATCH 188/741] Fixed triple click bug while drawing zones with DRAWING_TOOL. --- pcbnew/tools/drawing_tool.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index 41bb93340a..03be29686b 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -1006,6 +1006,8 @@ int DRAWING_TOOL::drawZone( bool aKeepout ) m_frame->OnModify(); m_frame->SaveCopyInUndoList( zone, UR_NEW ); + + zone = NULL; } else delete zone; From 89be32714b0bddccb7f279afcdafda299c2b24ab Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 18 Mar 2014 11:31:13 +0100 Subject: [PATCH 189/741] 3D viewer: fix 3D grid artifact ( bug 1293873 ) --- 3d-viewer/3d_draw.cpp | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/3d-viewer/3d_draw.cpp b/3d-viewer/3d_draw.cpp index dffd7e17cc..21f2f86211 100644 --- a/3d-viewer/3d_draw.cpp +++ b/3d-viewer/3d_draw.cpp @@ -52,7 +52,8 @@ // Imported function: extern void CheckGLError(); -/* returns true if aLayer should be displayed, false otherwise +/* Helper function + * returns true if aLayer should be displayed, false otherwise */ static bool Is3DLayerEnabled( LAYER_NUM aLayer ); @@ -144,7 +145,8 @@ void EDA_3D_CANVAS::Redraw() -g_Parm_3D_Visu.m_BoardPos.y * g_Parm_3D_Visu.m_BiuTo3Dunits, 0.0F ); - + // draw all objects in lists + // transparent objects should be drawn after opaque objects glCallList( m_glLists[GL_ID_BOARD] ); glCallList( m_glLists[GL_ID_TECH_LAYERS] ); @@ -156,22 +158,24 @@ void EDA_3D_CANVAS::Redraw() glCallList( m_glLists[GL_ID_AUX_LAYERS] ); } - if( g_Parm_3D_Visu.GetFlag( FL_GRID ) && m_glLists[GL_ID_GRID] ) - glCallList( m_glLists[GL_ID_GRID] ); - if( g_Parm_3D_Visu.GetFlag( FL_MODULE ) ) { if( ! m_glLists[GL_ID_3DSHAPES_SOLID] ) CreateDrawGL_List(); glCallList( m_glLists[GL_ID_3DSHAPES_SOLID] ); - - // This list must be drawn last, because it contains the - // transparent gl objects, which should be drawn after all - // non tyransparent objects - glCallList( m_glLists[GL_ID_3DSHAPES_TRANSP] ); } + // Grid uses transparency: draw it after all objects + if( g_Parm_3D_Visu.GetFlag( FL_GRID ) && m_glLists[GL_ID_GRID] ) + glCallList( m_glLists[GL_ID_GRID] ); + + // This list must be drawn last, because it contains the + // transparent gl objects, which should be drawn after all + // non transparent objects + if( g_Parm_3D_Visu.GetFlag( FL_MODULE ) && m_glLists[GL_ID_3DSHAPES_TRANSP] ) + glCallList( m_glLists[GL_ID_3DSHAPES_TRANSP] ); + SwapBuffers(); } @@ -913,8 +917,8 @@ void EDA_3D_CANVAS::Draw3DGrid( double aGriSizeMM ) double zpos = 0.0; EDA_COLOR_T gridcolor = DARKGRAY; // Color of grid lines EDA_COLOR_T gridcolor_marker = LIGHTGRAY; // Color of grid lines every 5 lines - double scale = g_Parm_3D_Visu.m_BiuTo3Dunits; - double transparency = 0.4; + const double scale = g_Parm_3D_Visu.m_BiuTo3Dunits; + const double transparency = 0.3; glNormal3f( 0.0, 0.0, 1.0 ); From 4d6f628a1fcf10656539bfc1a56fdd60d6ea277d Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 18 Mar 2014 11:33:49 +0100 Subject: [PATCH 190/741] Minor fixes to zone drawing tool. --- pcbnew/tools/drawing_tool.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index 03be29686b..67b2b607b1 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -970,10 +970,15 @@ int DRAWING_TOOL::drawZone( bool aKeepout ) if( numPoints > 0 ) // cancel the current zone { delete zone; + zone = NULL; m_controls->SetAutoPan( false ); if( direction45 ) + { preview.Remove( &line45 ); + direction45 = false; + } + preview.FreeItems(); updatePreview = true; @@ -1010,10 +1015,20 @@ int DRAWING_TOOL::drawZone( bool aKeepout ) zone = NULL; } else + { delete zone; + zone = NULL; + } numPoints = 0; m_controls->SetAutoPan( false ); + + if( direction45 ) + { + preview.Remove( &line45 ); + direction45 = false; + } + preview.FreeItems(); updatePreview = true; } From 342fd6e19eaf9a941b15df0696f7ecbe35206de1 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 18 Mar 2014 13:57:10 +0100 Subject: [PATCH 191/741] EC_CONVERGING handles colinear lines properly. --- include/geometry/seg.h | 14 +++++++------- pcbnew/tools/edit_points.cpp | 28 +++++++++++++++++++++++----- pcbnew/tools/edit_points.h | 4 ++++ 3 files changed, 34 insertions(+), 12 deletions(-) diff --git a/include/geometry/seg.h b/include/geometry/seg.h index 7e789f9d21..cf5b8d50c9 100644 --- a/include/geometry/seg.h +++ b/include/geometry/seg.h @@ -244,14 +244,14 @@ public: */ bool Collinear( const SEG& aSeg ) const { - ecoord qa1 = A.y - B.y; - ecoord qb1 = B.x - A.x; - ecoord qc1 = -qa1 * A.x - qb1 * A.y; - ecoord qa2 = aSeg.A.y - aSeg.B.y; - ecoord qb2 = aSeg.B.x - aSeg.A.x; - ecoord qc2 = -qa2 * aSeg.A.x - qb2 * aSeg.A.y; + ecoord qa = A.y - B.y; + ecoord qb = B.x - A.x; + ecoord qc = -qa * A.x - qb * A.y; - return ( qa1 == qa2 ) && ( qb1 == qb2 ) && ( qc1 == qc2 ); + ecoord d1 = std::abs( aSeg.A.x * qa + aSeg.A.y * qb + qc ); + ecoord d2 = std::abs( aSeg.B.x * qa + aSeg.B.y * qb + qc ); + + return ( d1 <= 1 && d2 <= 1 ); } /** diff --git a/pcbnew/tools/edit_points.cpp b/pcbnew/tools/edit_points.cpp index 23c8f1dbf4..291caae818 100644 --- a/pcbnew/tools/edit_points.cpp +++ b/pcbnew/tools/edit_points.cpp @@ -194,7 +194,8 @@ void EC_CIRCLE::Apply( EDIT_POINT& aHandle ) EC_CONVERGING::EC_CONVERGING( EDIT_LINE& aLine, EDIT_POINTS& aPoints ) : - EDIT_CONSTRAINT( aLine.GetOrigin() ), m_line( aLine ), m_editPoints( aPoints ) + EDIT_CONSTRAINT( aLine.GetOrigin() ), + m_colinearConstraint( NULL ), m_line( aLine ), m_editPoints( aPoints ) { // Dragged segment endings EDIT_POINT& origin = aLine.GetOrigin(); @@ -209,7 +210,17 @@ EC_CONVERGING::EC_CONVERGING( EDIT_LINE& aLine, EDIT_POINTS& aPoints ) : m_endSideConstraint = new EC_LINE( end, nextEnd ); // Store the current vector of the line - m_draggedVector = end.GetPosition() - origin.GetPosition() ; + m_draggedVector = end.GetPosition() - origin.GetPosition(); + + // Check for colinearity + SEG originSide( origin.GetPosition(), prevOrigin.GetPosition() ); + SEG endSide( end.GetPosition(), nextEnd.GetPosition() ); + SEG dragged( origin.GetPosition(), end.GetPosition() ); + + if( dragged.Collinear( originSide ) ) + m_colinearConstraint = m_originSideConstraint; + else if( dragged.Collinear( endSide ) ) + m_colinearConstraint = m_endSideConstraint; } @@ -217,18 +228,25 @@ EC_CONVERGING::~EC_CONVERGING() { delete m_originSideConstraint; delete m_endSideConstraint; + // m_colinearConstraint should not be freed, it is a pointer to one of the above } void EC_CONVERGING::Apply( EDIT_POINT& aHandle ) { - // The dragged segment - SEG dragged( m_line.GetPosition(), m_line.GetPosition() + m_draggedVector ); - // The dragged segment endpoints EDIT_POINT& origin = m_line.GetOrigin(); EDIT_POINT& end = m_line.GetEnd(); + if( m_colinearConstraint ) + { + m_colinearConstraint->Apply( origin ); + m_colinearConstraint->Apply( end ); + } + + // The dragged segment + SEG dragged( origin.GetPosition(), origin.GetPosition() + m_draggedVector ); + // Do not allow points on the adjacent segments move freely m_originSideConstraint->Apply(); m_endSideConstraint->Apply(); diff --git a/pcbnew/tools/edit_points.h b/pcbnew/tools/edit_points.h index 0c1dd343c2..b2e99988e6 100644 --- a/pcbnew/tools/edit_points.h +++ b/pcbnew/tools/edit_points.h @@ -622,6 +622,10 @@ private: ///> Constraint for end side segment. EDIT_CONSTRAINT* m_endSideConstraint; + ///> Additional constriant, applied when at least two points are collinear. It is a pointer to + ///> m_[origin/end]SideConstraint, so it should not be freed. + EDIT_CONSTRAINT* m_colinearConstraint; + ///> Dragged segment. EDIT_LINE& m_line; From dbcc18ab31e9bd8ef9abc1911e08d40c7e09cba0 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 18 Mar 2014 14:01:09 +0100 Subject: [PATCH 192/741] Enabled autopanning while drawing zones. --- pcbnew/tools/drawing_tool.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index 67b2b607b1..e35956f213 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -1040,6 +1040,8 @@ int DRAWING_TOOL::drawZone( bool aKeepout ) ZONE_SETTINGS zoneInfo = m_frame->GetZoneSettings(); zoneInfo.m_CurrentZone_Layer = m_frame->GetScreen()->m_Active_Layer; + m_controls->SetAutoPan( true ); + // Show options dialog ZONE_EDIT_T dialogResult; if( aKeepout ) @@ -1053,7 +1055,10 @@ int DRAWING_TOOL::drawZone( bool aKeepout ) } if( dialogResult == ZONE_ABORT ) + { + m_controls->SetAutoPan( false ); continue; + } // Apply the selected settings zone = new ZONE_CONTAINER( m_board ); From 17ec7ace4c14cb0e637c352cd7a661885697d563 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 18 Mar 2014 14:52:22 +0100 Subject: [PATCH 193/741] Breaking outlines for zones using POINT_EDITOR. --- pcbnew/tools/point_editor.cpp | 49 +++++++++++++++++++++++++++++++++++ pcbnew/tools/point_editor.h | 3 +++ 2 files changed, 52 insertions(+) diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp index 4ae508288c..295c90cdd5 100644 --- a/pcbnew/tools/point_editor.cpp +++ b/pcbnew/tools/point_editor.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include "common_actions.h" @@ -224,6 +225,11 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) m_dragPoint = point; } + else if( evt->IsDblClick( BUT_LEFT ) ) + { + breakOutline( controls->GetCursorPosition() ); + } + else if( evt->IsDrag( BUT_LEFT ) && m_dragPoint ) { if( !modified ) @@ -605,3 +611,46 @@ EDIT_POINT POINT_EDITOR::get45DegConstrainer() const // In any other case we may align item to its original position return m_original; } + + + +void POINT_EDITOR::breakOutline( const VECTOR2I& aBreakPoint ) +{ + EDA_ITEM* item = m_editPoints->GetParent(); + const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); + + if( item->Type() == PCB_ZONE_AREA_T ) + { + getEditFrame()->OnModify(); + getEditFrame()->SaveCopyInUndoList( selection.items, UR_CHANGED ); + + ZONE_CONTAINER* zone = static_cast( item ); + CPolyLine* outline = zone->Outline(); + + // Handle the last segment, so other segments can be easily handled in a loop + unsigned int nearestIdx = outline->GetCornersCount() - 1, nextNearestIdx = 0; + SEG side( VECTOR2I( outline->GetPos( nearestIdx ) ), + VECTOR2I( outline->GetPos( nextNearestIdx ) ) ); + unsigned int nearestDist = side.Distance( aBreakPoint ); + + for( int i = 0; i < outline->GetCornersCount() - 2; ++i ) + { + SEG side( VECTOR2I( outline->GetPos( i ) ), VECTOR2I( outline->GetPos( i + 1 ) ) ); + + unsigned int distance = side.Distance( aBreakPoint ); + if( distance < nearestDist ) + { + nearestDist = distance; + nearestIdx = i; + nextNearestIdx = i + 1; + } + } + + // Find the point on the closest segment + SEG nearestSide( VECTOR2I( outline->GetPos( nearestIdx ) ), + VECTOR2I( outline->GetPos( nextNearestIdx ) ) ); + VECTOR2I nearestPoint = nearestSide.NearestPoint( aBreakPoint ); + + outline->InsertCorner( nearestIdx, nearestPoint.x, nearestPoint.y ); + } +} diff --git a/pcbnew/tools/point_editor.h b/pcbnew/tools/point_editor.h index fe77760c3d..7fdf655809 100644 --- a/pcbnew/tools/point_editor.h +++ b/pcbnew/tools/point_editor.h @@ -95,6 +95,9 @@ private: ///> Returns a point that should be used as a constrainer for 45 degrees mode. EDIT_POINT get45DegConstrainer() const; + // TODO docs + void breakOutline( const VECTOR2I& aBreakPoint ); + ///> Sets up handlers for various events. void setTransitions() { From 9783aaf3e66c4dad7c221ddcb6da5d6d77cce726 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 18 Mar 2014 15:46:38 +0100 Subject: [PATCH 194/741] Splitting DRAWSEGMENTs with POINT_EDITOR. --- pcbnew/tools/point_editor.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp index 295c90cdd5..666b385d15 100644 --- a/pcbnew/tools/point_editor.cpp +++ b/pcbnew/tools/point_editor.cpp @@ -38,6 +38,7 @@ #include #include #include +#include /** * Class POINT_EDITOR @@ -653,4 +654,30 @@ void POINT_EDITOR::breakOutline( const VECTOR2I& aBreakPoint ) outline->InsertCorner( nearestIdx, nearestPoint.x, nearestPoint.y ); } + + else if( item->Type() == PCB_LINE_T ) + { + getEditFrame()->OnModify(); + getEditFrame()->SaveCopyInUndoList( selection.items, UR_CHANGED ); + + DRAWSEGMENT* segment = static_cast( item ); + + if( segment->GetShape() == S_SEGMENT ) + { + SEG seg( segment->GetStart(), segment->GetEnd() ); + VECTOR2I nearestPoint = seg.NearestPoint( aBreakPoint ); + + // Move the end of the line to the break point.. + segment->SetEnd( wxPoint( nearestPoint.x, nearestPoint.y ) ); + + // and add another one starting from the break point + DRAWSEGMENT* newSegment = new DRAWSEGMENT( *segment ); + newSegment->ClearSelected(); + newSegment->SetStart( wxPoint( nearestPoint.x, nearestPoint.y ) ); + newSegment->SetEnd( wxPoint( seg.B.x, seg.B.y ) ); + + getModel( PCB_T )->Add( newSegment ); + getView()->Add( newSegment ); + } + } } From 6a1d3445419d1bbb0449b1421343c8c64d6bc091 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 18 Mar 2014 16:25:46 +0100 Subject: [PATCH 195/741] Instant dragging (without prior selection). --- pcbnew/tools/selection_tool.cpp | 34 +++++++++++++++++++++++++-------- pcbnew/tools/selection_tool.h | 5 ++++- 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index de1624ad74..14f430fcca 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -141,10 +141,18 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) { if( m_selection.Empty() || m_additive ) { - // If nothings has been selected or user wants to select more - // draw the selection box - selectMultiple(); + if( !selectSingle( getView()->ToWorld( getViewControls()->GetMousePosition() ), false ) ) + { + // If nothings has been selected or user wants to select more + // draw the selection box + selectMultiple(); + } + else + { + m_toolMgr->InvokeTool( "pcbnew.InteractiveEdit" ); + } } + else { // Check if dragging has started within any of selected items bounding box @@ -205,7 +213,7 @@ void SELECTION_TOOL::toggleSelection( BOARD_ITEM* aItem ) } -void SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere ) +bool SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere, bool aAllowDisambiguation ) { BOARD* pcb = getModel( PCB_T ); BOARD_ITEM* item; @@ -220,11 +228,13 @@ void SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere ) case 0: if( !m_additive ) clearSelection(); - break; + + return false; case 1: toggleSelection( collector[0] ); - break; + + return true; default: // Remove unselectable items @@ -238,17 +248,25 @@ void SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere ) if( collector.GetCount() == 1 ) { toggleSelection( collector[0] ); + + return true; } - else if( collector.GetCount() > 1 ) + + else if( aAllowDisambiguation && collector.GetCount() > 1 ) { item = disambiguationMenu( &collector ); if( item ) + { toggleSelection( item ); - } + return true; + } + } break; } + + return false; } diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index 7072c89655..ca46f8bbdd 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -130,8 +130,11 @@ private: * place, there is a menu displayed that allows to choose the item. * * @param aWhere is the place where the item should be selected. + * @param aAllowDisambiguation decides what to do in case of disambiguation. If true, then + * a menu is shown, otherise function finishes without selecting anything. + * @return True if an item was selected, false otherwise. */ - void selectSingle( const VECTOR2I& aWhere ); + bool selectSingle( const VECTOR2I& aWhere, bool aAllowDisambiguation = true ); /** * Function selectMultiple() From e6a7ff3c34cecaf76cd61b83f2688264a6213fca Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 18 Mar 2014 16:55:06 +0100 Subject: [PATCH 196/741] Isolated EDIT_CONSTRAINTs to different .cpp/.h files. --- pcbnew/CMakeLists.txt | 1 + pcbnew/tools/edit_constraints.cpp | 175 +++++++++++++++++++++ pcbnew/tools/edit_constraints.h | 242 ++++++++++++++++++++++++++++++ pcbnew/tools/edit_points.cpp | 135 +---------------- pcbnew/tools/edit_points.h | 225 +-------------------------- 5 files changed, 420 insertions(+), 358 deletions(-) create mode 100644 pcbnew/tools/edit_constraints.cpp create mode 100644 pcbnew/tools/edit_constraints.h diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 60deda1c4f..dee4a0af07 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -256,6 +256,7 @@ set( PCBNEW_CLASS_SRCS tools/selection_area.cpp tools/bright_box.cpp tools/edit_points.cpp + tools/edit_constraints.cpp tools/point_editor.cpp tools/drawing_tool.cpp tools/edit_tool.cpp diff --git a/pcbnew/tools/edit_constraints.cpp b/pcbnew/tools/edit_constraints.cpp new file mode 100644 index 0000000000..91e14ea82d --- /dev/null +++ b/pcbnew/tools/edit_constraints.cpp @@ -0,0 +1,175 @@ +/* + * This program source code file is part of KICAD, a free EDA CAD application. + * + * Copyright (C) 2014 CERN + * @author Maciej Suminski + * + * 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 "edit_constraints.h" +#include "edit_points.h" + +#include + +void EC_VERTICAL::Apply( EDIT_POINT& aHandle ) +{ + VECTOR2I point = aHandle.GetPosition(); + point.x = m_constrainer.GetPosition().x; + aHandle.SetPosition( point ); +} + + +void EC_HORIZONTAL::Apply( EDIT_POINT& aHandle ) +{ + VECTOR2I point = aHandle.GetPosition(); + point.y = m_constrainer.GetPosition().y; + aHandle.SetPosition( point ); +} + + +void EC_45DEGREE::Apply( EDIT_POINT& aHandle ) +{ + // Current line vector + VECTOR2I lineVector( aHandle.GetPosition() - m_constrainer.GetPosition() ); + double angle = lineVector.Angle(); + + // Find the closest angle, which is a multiple of 45 degrees + double newAngle = round( angle / ( M_PI / 4.0 ) ) * M_PI / 4.0; + VECTOR2I newLineVector = lineVector.Rotate( newAngle - angle ); + + aHandle.SetPosition( m_constrainer.GetPosition() + newLineVector ); +} + + +EC_LINE::EC_LINE( EDIT_POINT& aConstrained, const EDIT_POINT& aConstrainer ) : + EDIT_CONSTRAINT( aConstrained ), m_constrainer( aConstrainer ) +{ + m_line = m_constrained.GetPosition() - m_constrainer.GetPosition(); +} + + +void EC_LINE::Apply( EDIT_POINT& aHandle ) +{ + SEG main( m_constrainer.GetPosition(), m_constrainer.GetPosition() + m_line ); + SEG projection( aHandle.GetPosition(), aHandle.GetPosition() + m_line.Perpendicular() ); + + if( OPT_VECTOR2I intersect = projection.IntersectLines( main ) ) + aHandle.SetPosition( *intersect ); +} + + +void EC_CIRCLE::Apply( EDIT_POINT& aHandle ) +{ + VECTOR2I centerToEnd = m_end.GetPosition() - m_center.GetPosition(); + VECTOR2I centerToPoint = aHandle.GetPosition() - m_center.GetPosition(); + + int radius = centerToEnd.EuclideanNorm(); + double angle = centerToPoint.Angle(); + + VECTOR2I newLine( radius, 0 ); + newLine = newLine.Rotate( angle ); + + aHandle.SetPosition( m_center.GetPosition() + newLine ); +} + + +EC_CONVERGING::EC_CONVERGING( EDIT_LINE& aLine, EDIT_POINTS& aPoints ) : + EDIT_CONSTRAINT( aLine.GetOrigin() ), + m_colinearConstraint( NULL ), m_line( aLine ), m_editPoints( aPoints ) +{ + // Dragged segment endings + EDIT_POINT& origin = aLine.GetOrigin(); + EDIT_POINT& end = aLine.GetEnd(); + + // Previous and next points, to make constraining lines (adjacent to the dragged line) + EDIT_POINT& prevOrigin = *aPoints.Previous( origin ); + EDIT_POINT& nextEnd = *aPoints.Next( end ); + + // Constraints for segments adjacent to the dragged one + m_originSideConstraint = new EC_LINE( origin, prevOrigin ); + m_endSideConstraint = new EC_LINE( end, nextEnd ); + + // Store the current vector of the line + m_draggedVector = end.GetPosition() - origin.GetPosition(); + + // Check for colinearity + SEG originSide( origin.GetPosition(), prevOrigin.GetPosition() ); + SEG endSide( end.GetPosition(), nextEnd.GetPosition() ); + SEG dragged( origin.GetPosition(), end.GetPosition() ); + + if( dragged.Collinear( originSide ) ) + m_colinearConstraint = m_originSideConstraint; + else if( dragged.Collinear( endSide ) ) + m_colinearConstraint = m_endSideConstraint; +} + + +EC_CONVERGING::~EC_CONVERGING() +{ + delete m_originSideConstraint; + delete m_endSideConstraint; + // m_colinearConstraint should not be freed, it is a pointer to one of the above +} + + +void EC_CONVERGING::Apply( EDIT_POINT& aHandle ) +{ + // The dragged segment endpoints + EDIT_POINT& origin = m_line.GetOrigin(); + EDIT_POINT& end = m_line.GetEnd(); + + if( m_colinearConstraint ) + { + m_colinearConstraint->Apply( origin ); + m_colinearConstraint->Apply( end ); + } + + // The dragged segment + SEG dragged( origin.GetPosition(), origin.GetPosition() + m_draggedVector ); + + // Do not allow points on the adjacent segments move freely + m_originSideConstraint->Apply(); + m_endSideConstraint->Apply(); + + EDIT_POINT& prevOrigin = *m_editPoints.Previous( origin ); + EDIT_POINT& nextEnd = *m_editPoints.Next( end ); + + // Two segments adjacent to the dragged segment + SEG originSide = SEG( origin.GetPosition(), prevOrigin.GetPosition() ); + SEG endSide = SEG( end.GetPosition(), nextEnd.GetPosition() ); + + // First intersection point (dragged segment against origin side) + if( OPT_VECTOR2I originIntersect = dragged.IntersectLines( originSide ) ) + origin.SetPosition( *originIntersect ); + + // Second intersection point (dragged segment against end side) + if( OPT_VECTOR2I endIntersect = dragged.IntersectLines( endSide ) ) + end.SetPosition( *endIntersect ); + + // Check if adjacent segments intersect (did we dragged the line to the point that it may + // create a selfintersecting polygon?) + originSide = SEG( origin.GetPosition(), prevOrigin.GetPosition() ); + endSide = SEG( end.GetPosition(), nextEnd.GetPosition() ); + + if( OPT_VECTOR2I originEndIntersect = endSide.Intersect( originSide ) ) + { + origin.SetPosition( *originEndIntersect ); + end.SetPosition( *originEndIntersect ); + } +} diff --git a/pcbnew/tools/edit_constraints.h b/pcbnew/tools/edit_constraints.h new file mode 100644 index 0000000000..b26c4f69f7 --- /dev/null +++ b/pcbnew/tools/edit_constraints.h @@ -0,0 +1,242 @@ +/* + * This program source code file is part of KICAD, a free EDA CAD application. + * + * Copyright (C) 2014 CERN + * @author Maciej Suminski + * + * 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 EDIT_CONSTRAINTS_H_ +#define EDIT_CONSTRAINTS_H_ + +#include + +class EDIT_POINT; +class EDIT_LINE; +class EDIT_POINTS; + +/** + * Class EDIT_CONSTRAINT + * + * Allows to describe constraints between two edit handles. After the constrained handle is changed, + * Apply() has to be called to fix its coordinates according to the implemented constraint. + */ +template +class EDIT_CONSTRAINT +{ +public: + /** + * Constructor + * + * @param aConstrained is EDIT_POINT to which the constraint is applied. + */ + EDIT_CONSTRAINT( EDIT_TYPE& aConstrained ) : m_constrained( aConstrained ) {}; + + virtual ~EDIT_CONSTRAINT() {}; + + /** + * Function Apply() + * + * Corrects coordinates of the constrained edit handle. + */ + virtual void Apply( EDIT_TYPE& aHandle ) = 0; + + /** + * Function Apply() + * + * Corrects coordinates of the constrained edit handle. + */ + void Apply() + { + Apply( m_constrained ); + } + +protected: + EDIT_TYPE& m_constrained; ///< Point that is constrained by rules implemented by Apply() +}; + + +/** + * Class EC_VERTICAL. + * + * EDIT_CONSTRAINT that imposes a constraint that two points have to have the same X coordinate. + */ +class EC_VERTICAL : public EDIT_CONSTRAINT +{ +public: + /** + * Constructor. + * + * @param aConstrained is the point that is put under constrain. + * @param aConstrainer is the point that is the source of the constrain. + */ + EC_VERTICAL( EDIT_POINT& aConstrained, const EDIT_POINT& aConstrainer ) : + EDIT_CONSTRAINT( aConstrained ), m_constrainer( aConstrainer ) + {} + + ///> @copydoc EDIT_CONSTRAINT::Apply() + virtual void Apply( EDIT_POINT& aHandle ); + +private: + const EDIT_POINT& m_constrainer; ///< Point that imposes the constraint. +}; + + +/** + * Class EC_HORIZONTAL. + * + * EDIT_CONSTRAINT that imposes a constraint that two points have to have the same Y coordinate. + */ +class EC_HORIZONTAL : public EDIT_CONSTRAINT +{ +public: + /** + * Constructor. + * + * @param aConstrained is the point that is put under constrain. + * @param aConstrainer is the point that is the source of the constrain. + */ + EC_HORIZONTAL( EDIT_POINT& aConstrained, const EDIT_POINT& aConstrainer ) : + EDIT_CONSTRAINT( aConstrained ), m_constrainer( aConstrainer ) + {} + + ///> @copydoc EDIT_CONSTRAINT::Apply() + virtual void Apply( EDIT_POINT& aHandle ); + +private: + const EDIT_POINT& m_constrainer; ///< Point that imposes the constraint. +}; + + +/** + * Class EC_45DEGREE + * + * EDIT_CONSTRAINT that imposes a constraint that two to be located at angle of 45 degree + * multiplicity. + */ +class EC_45DEGREE : public EDIT_CONSTRAINT +{ +public: + /** + * Constructor. + * + * @param aConstrained is the point that is put under constrain. + * @param aConstrainer is the point that is the source of the constrain. + */ + EC_45DEGREE( EDIT_POINT& aConstrained, const EDIT_POINT& aConstrainer ) : + EDIT_CONSTRAINT( aConstrained ), m_constrainer( aConstrainer ) + {} + + ///> @copydoc EDIT_CONSTRAINT::Apply() + virtual void Apply( EDIT_POINT& aHandle ); + +private: + const EDIT_POINT& m_constrainer; ///< Point that imposes the constraint. +}; + + +/** + * Class EC_LINE + * + * EDIT_CONSTRAINT that imposes a constraint that a point has to lie on a line (determined + * by 2 points). + */ +class EC_LINE : public EDIT_CONSTRAINT +{ +public: + EC_LINE( EDIT_POINT& aConstrained, const EDIT_POINT& aConstrainer ); + + ///> @copydoc EDIT_CONSTRAINT::Apply() + virtual void Apply( EDIT_POINT& aHandle ); + +private: + const EDIT_POINT& m_constrainer; ///< Point that imposes the constraint. + VECTOR2I m_line; ///< Vector representing the constraining line. +}; + + +/** + * Class EC_CIRCLE. + * + * EDIT_CONSTRAINT that imposes a constraint that a point has to lie on a circle. + */ +class EC_CIRCLE : public EDIT_CONSTRAINT +{ +public: + /** + * Constructor. + * + * @param aConstrained is the point that is put under constrain. + * @parama aCenter is the point that is the center of the circle. + * @parama aEnd is the point that decides on the radius of the circle. + */ + EC_CIRCLE( EDIT_POINT& aConstrained, const EDIT_POINT& aCenter, const EDIT_POINT& aEnd ) : + EDIT_CONSTRAINT( aConstrained ), m_center( aCenter ), m_end( aEnd ) + {} + + ///> @copydoc EDIT_CONSTRAINT::Apply() + virtual void Apply( EDIT_POINT& aHandle ); + +private: + ///> Point that imposes the constraint (center of the circle). + const EDIT_POINT& m_center; + + ///> Point that imposes the constraint (decides on the radius of the circle). + const EDIT_POINT& m_end; +}; + + +/** + * Class EC_CONVERGING + * + * EDIT_CONSTRAINT for 3 segment: dragged and two adjacent ones, enforcing to keep their slopes + * and allows only to change ending points. Applied to zones. + */ +class EC_CONVERGING : public EDIT_CONSTRAINT +{ +public: + EC_CONVERGING( EDIT_LINE& aLine, EDIT_POINTS& aPoints ); + + virtual ~EC_CONVERGING(); + + ///> @copydoc EDIT_CONSTRAINT::Apply() + virtual void Apply( EDIT_POINT& aHandle ); + +private: + ///> Constraint for origin side segment. + EDIT_CONSTRAINT* m_originSideConstraint; + + ///> Constraint for end side segment. + EDIT_CONSTRAINT* m_endSideConstraint; + + ///> Additional constriant, applied when at least two points are collinear. It is a pointer to + ///> m_[origin/end]SideConstraint, so it should not be freed. + EDIT_CONSTRAINT* m_colinearConstraint; + + ///> Dragged segment. + EDIT_LINE& m_line; + + ///> EDIT_POINTS instance that stores currently modified lines. + EDIT_POINTS& m_editPoints; + + ///> Vector that represents the initial direction of the dragged segment. + VECTOR2I m_draggedVector; +}; + +#endif /* EDIT_CONSTRAINTS_H_ */ diff --git a/pcbnew/tools/edit_points.cpp b/pcbnew/tools/edit_points.cpp index 291caae818..9f6069d551 100644 --- a/pcbnew/tools/edit_points.cpp +++ b/pcbnew/tools/edit_points.cpp @@ -24,9 +24,8 @@ #include -#include "edit_points.h" #include -#include +#include "edit_points.h" bool EDIT_POINT::WithinPoint( const VECTOR2I& aPoint, unsigned int aSize ) const { @@ -145,135 +144,3 @@ void EDIT_POINTS::ViewDraw( int aLayer, KIGFX::GAL* aGal ) const aGal->PopDepth(); } - - -void EC_45DEGREE::Apply( EDIT_POINT& aHandle ) -{ - // Current line vector - VECTOR2I lineVector( aHandle.GetPosition() - m_constrainer.GetPosition() ); - double angle = lineVector.Angle(); - - // Find the closest angle, which is a multiple of 45 degrees - double newAngle = round( angle / ( M_PI / 4.0 ) ) * M_PI / 4.0; - VECTOR2I newLineVector = lineVector.Rotate( newAngle - angle ); - - aHandle.SetPosition( m_constrainer.GetPosition() + newLineVector ); -} - - -EC_LINE::EC_LINE( EDIT_POINT& aConstrained, const EDIT_POINT& aConstrainer ) : - EDIT_CONSTRAINT( aConstrained ), m_constrainer( aConstrainer ) -{ - m_line = m_constrained.GetPosition() - m_constrainer.GetPosition(); -} - - -void EC_LINE::Apply( EDIT_POINT& aHandle ) -{ - SEG main( m_constrainer.GetPosition(), m_constrainer.GetPosition() + m_line ); - SEG projection( aHandle.GetPosition(), aHandle.GetPosition() + m_line.Perpendicular() ); - - if( OPT_VECTOR2I intersect = projection.IntersectLines( main ) ) - aHandle.SetPosition( *intersect ); -} - - -void EC_CIRCLE::Apply( EDIT_POINT& aHandle ) -{ - VECTOR2I centerToEnd = m_end.GetPosition() - m_center.GetPosition(); - VECTOR2I centerToPoint = aHandle.GetPosition() - m_center.GetPosition(); - - int radius = centerToEnd.EuclideanNorm(); - double angle = centerToPoint.Angle(); - - VECTOR2I newLine( radius, 0 ); - newLine = newLine.Rotate( angle ); - - aHandle.SetPosition( m_center.GetPosition() + newLine ); -} - - -EC_CONVERGING::EC_CONVERGING( EDIT_LINE& aLine, EDIT_POINTS& aPoints ) : - EDIT_CONSTRAINT( aLine.GetOrigin() ), - m_colinearConstraint( NULL ), m_line( aLine ), m_editPoints( aPoints ) -{ - // Dragged segment endings - EDIT_POINT& origin = aLine.GetOrigin(); - EDIT_POINT& end = aLine.GetEnd(); - - // Previous and next points, to make constraining lines (adjacent to the dragged line) - EDIT_POINT& prevOrigin = *aPoints.Previous( origin ); - EDIT_POINT& nextEnd = *aPoints.Next( end ); - - // Constraints for segments adjacent to the dragged one - m_originSideConstraint = new EC_LINE( origin, prevOrigin ); - m_endSideConstraint = new EC_LINE( end, nextEnd ); - - // Store the current vector of the line - m_draggedVector = end.GetPosition() - origin.GetPosition(); - - // Check for colinearity - SEG originSide( origin.GetPosition(), prevOrigin.GetPosition() ); - SEG endSide( end.GetPosition(), nextEnd.GetPosition() ); - SEG dragged( origin.GetPosition(), end.GetPosition() ); - - if( dragged.Collinear( originSide ) ) - m_colinearConstraint = m_originSideConstraint; - else if( dragged.Collinear( endSide ) ) - m_colinearConstraint = m_endSideConstraint; -} - - -EC_CONVERGING::~EC_CONVERGING() -{ - delete m_originSideConstraint; - delete m_endSideConstraint; - // m_colinearConstraint should not be freed, it is a pointer to one of the above -} - - -void EC_CONVERGING::Apply( EDIT_POINT& aHandle ) -{ - // The dragged segment endpoints - EDIT_POINT& origin = m_line.GetOrigin(); - EDIT_POINT& end = m_line.GetEnd(); - - if( m_colinearConstraint ) - { - m_colinearConstraint->Apply( origin ); - m_colinearConstraint->Apply( end ); - } - - // The dragged segment - SEG dragged( origin.GetPosition(), origin.GetPosition() + m_draggedVector ); - - // Do not allow points on the adjacent segments move freely - m_originSideConstraint->Apply(); - m_endSideConstraint->Apply(); - - EDIT_POINT& prevOrigin = *m_editPoints.Previous( origin ); - EDIT_POINT& nextEnd = *m_editPoints.Next( end ); - - // Two segments adjacent to the dragged segment - SEG originSide = SEG( origin.GetPosition(), prevOrigin.GetPosition() ); - SEG endSide = SEG( end.GetPosition(), nextEnd.GetPosition() ); - - // First intersection point (dragged segment against origin side) - if( OPT_VECTOR2I originIntersect = dragged.IntersectLines( originSide ) ) - origin.SetPosition( *originIntersect ); - - // Second intersection point (dragged segment against end side) - if( OPT_VECTOR2I endIntersect = dragged.IntersectLines( endSide ) ) - end.SetPosition( *endIntersect ); - - // Check if adjacent segments intersect (did we dragged the line to the point that it may - // create a selfintersecting polygon?) - originSide = SEG( origin.GetPosition(), prevOrigin.GetPosition() ); - endSide = SEG( end.GetPosition(), nextEnd.GetPosition() ); - - if( OPT_VECTOR2I originEndIntersect = endSide.Intersect( originSide ) ) - { - origin.SetPosition( *originEndIntersect ); - end.SetPosition( *originEndIntersect ); - } -} diff --git a/pcbnew/tools/edit_points.h b/pcbnew/tools/edit_points.h index b2e99988e6..7177bd5241 100644 --- a/pcbnew/tools/edit_points.h +++ b/pcbnew/tools/edit_points.h @@ -25,57 +25,12 @@ #ifndef EDIT_POINTS_H_ #define EDIT_POINTS_H_ -#include -#include #include -#include - #include #include -class EDIT_POINT; - -/** - * Class EDIT_CONSTRAINT - * - * Allows to describe constraints between two edit handles. After the constrained handle is changed, - * Apply() has to be called to fix its coordinates according to the implemented constraint. - */ -template -class EDIT_CONSTRAINT -{ -public: - /** - * Constructor - * - * @param aConstrained is EDIT_POINT to which the constraint is applied. - */ - EDIT_CONSTRAINT( EDIT_TYPE& aConstrained ) : m_constrained( aConstrained ) {}; - - virtual ~EDIT_CONSTRAINT() {}; - - /** - * Function Apply() - * - * Corrects coordinates of the constrained edit handle. - */ - virtual void Apply( EDIT_TYPE& aHandle ) = 0; - - /** - * Function Apply() - * - * Corrects coordinates of the constrained edit handle. - */ - void Apply() - { - Apply( m_constrained ); - } - -protected: - EDIT_TYPE& m_constrained; ///< Point that is constrained by rules implemented by Apply() -}; - +#include "edit_constraints.h" /** * Class EDIT_POINT @@ -458,182 +413,4 @@ private: std::deque m_lines; ///< EDIT_LINEs for modifying m_parent }; - -/** - * Class EC_VERTICAL. - * - * EDIT_CONSTRAINT that imposes a constraint that two points have to have the same X coordinate. - */ -class EC_VERTICAL : public EDIT_CONSTRAINT -{ -public: - /** - * Constructor. - * - * @param aConstrained is the point that is put under constrain. - * @param aConstrainer is the point that is the source of the constrain. - */ - EC_VERTICAL( EDIT_POINT& aConstrained, const EDIT_POINT& aConstrainer ) : - EDIT_CONSTRAINT( aConstrained ), m_constrainer( aConstrainer ) - {} - - ///> @copydoc EDIT_CONSTRAINT::Apply() - virtual void Apply( EDIT_POINT& aHandle ) - { - VECTOR2I point = aHandle.GetPosition(); - point.x = m_constrainer.GetPosition().x; - aHandle.SetPosition( point ); - } - -private: - const EDIT_POINT& m_constrainer; ///< Point that imposes the constraint. -}; - - -/** - * Class EC_HORIZONTAL. - * - * EDIT_CONSTRAINT that imposes a constraint that two points have to have the same Y coordinate. - */ -class EC_HORIZONTAL : public EDIT_CONSTRAINT -{ -public: - /** - * Constructor. - * - * @param aConstrained is the point that is put under constrain. - * @param aConstrainer is the point that is the source of the constrain. - */ - EC_HORIZONTAL( EDIT_POINT& aConstrained, const EDIT_POINT& aConstrainer ) : - EDIT_CONSTRAINT( aConstrained ), m_constrainer( aConstrainer ) - {} - - ///> @copydoc EDIT_CONSTRAINT::Apply() - virtual void Apply( EDIT_POINT& aHandle ) - { - VECTOR2I point = aHandle.GetPosition(); - point.y = m_constrainer.GetPosition().y; - aHandle.SetPosition( point ); - } - -private: - const EDIT_POINT& m_constrainer; ///< Point that imposes the constraint. -}; - - -/** - * Class EC_45DEGREE - * - * EDIT_CONSTRAINT that imposes a constraint that two to be located at angle of 45 degree - * multiplicity. - */ -class EC_45DEGREE : public EDIT_CONSTRAINT -{ -public: - /** - * Constructor. - * - * @param aConstrained is the point that is put under constrain. - * @param aConstrainer is the point that is the source of the constrain. - */ - EC_45DEGREE( EDIT_POINT& aConstrained, const EDIT_POINT& aConstrainer ) : - EDIT_CONSTRAINT( aConstrained ), m_constrainer( aConstrainer ) - {} - - ///> @copydoc EDIT_CONSTRAINT::Apply() - virtual void Apply( EDIT_POINT& aHandle ); - -private: - const EDIT_POINT& m_constrainer; ///< Point that imposes the constraint. -}; - - -/** - * Class EC_LINE - * - * EDIT_CONSTRAINT that imposes a constraint that a point has to lie on a line (determined - * by 2 points). - */ -class EC_LINE : public EDIT_CONSTRAINT -{ -public: - EC_LINE( EDIT_POINT& aConstrained, const EDIT_POINT& aConstrainer ); - - ///> @copydoc EDIT_CONSTRAINT::Apply() - virtual void Apply( EDIT_POINT& aHandle ); - -private: - EDIT_POINT m_constrainer; ///< Point that imposes the constraint. - VECTOR2I m_line; ///< Vector representing the constraining line. -}; - - -/** - * Class EC_CIRCLE. - * - * EDIT_CONSTRAINT that imposes a constraint that a point has to lie on a circle. - */ -class EC_CIRCLE : public EDIT_CONSTRAINT -{ -public: - /** - * Constructor. - * - * @param aConstrained is the point that is put under constrain. - * @parama aCenter is the point that is the center of the circle. - * @parama aEnd is the point that decides on the radius of the circle. - */ - EC_CIRCLE( EDIT_POINT& aConstrained, const EDIT_POINT& aCenter, const EDIT_POINT& aEnd ) : - EDIT_CONSTRAINT( aConstrained ), m_center( aCenter ), m_end( aEnd ) - {} - - ///> @copydoc EDIT_CONSTRAINT::Apply() - virtual void Apply( EDIT_POINT& aHandle ); - -private: - ///> Point that imposes the constraint (center of the circle). - const EDIT_POINT& m_center; - - ///> Point that imposes the constraint (decides on the radius of the circle). - const EDIT_POINT& m_end; -}; - - -/** - * Class EC_CONVERGING - * - * EDIT_CONSTRAINT for 3 segment: dragged and two adjacent ones, enforcing to keep their slopes - * and allows only to change ending points. Applied to zones. - */ -class EC_CONVERGING : public EDIT_CONSTRAINT -{ -public: - EC_CONVERGING( EDIT_LINE& aLine, EDIT_POINTS& aPoints ); - - virtual ~EC_CONVERGING(); - - ///> @copydoc EDIT_CONSTRAINT::Apply() - virtual void Apply( EDIT_POINT& aHandle ); - -private: - ///> Constraint for origin side segment. - EDIT_CONSTRAINT* m_originSideConstraint; - - ///> Constraint for end side segment. - EDIT_CONSTRAINT* m_endSideConstraint; - - ///> Additional constriant, applied when at least two points are collinear. It is a pointer to - ///> m_[origin/end]SideConstraint, so it should not be freed. - EDIT_CONSTRAINT* m_colinearConstraint; - - ///> Dragged segment. - EDIT_LINE& m_line; - - ///> EDIT_POINTS instance that stores currently modified lines. - EDIT_POINTS& m_editPoints; - - ///> Vector that represents the initial direction of the dragged segment. - VECTOR2I m_draggedVector; -}; - #endif /* EDIT_POINTS_H_ */ From c11b0bc8a615428d558afc00294039d38e8a546f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 18 Mar 2014 17:02:10 +0100 Subject: [PATCH 197/741] Break points for zones are not added in the same place as existing points. --- pcbnew/tools/point_editor.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp index 666b385d15..1cfdb0a001 100644 --- a/pcbnew/tools/point_editor.cpp +++ b/pcbnew/tools/point_editor.cpp @@ -648,10 +648,16 @@ void POINT_EDITOR::breakOutline( const VECTOR2I& aBreakPoint ) } // Find the point on the closest segment - SEG nearestSide( VECTOR2I( outline->GetPos( nearestIdx ) ), - VECTOR2I( outline->GetPos( nextNearestIdx ) ) ); + VECTOR2I sideOrigin( outline->GetPos( nearestIdx ) ); + VECTOR2I sideEnd( outline->GetPos( nextNearestIdx ) ); + SEG nearestSide( sideOrigin, sideEnd ); VECTOR2I nearestPoint = nearestSide.NearestPoint( aBreakPoint ); + // Do not add points that have the same coordinates as ones that already belong to polygon + // instead, add a point in the middle of the side + if( nearestPoint == sideOrigin || nearestPoint == sideEnd ) + nearestPoint = ( sideOrigin + sideEnd ) / 2; + outline->InsertCorner( nearestIdx, nearestPoint.x, nearestPoint.y ); } From 152c97a34fa0d0093bd8b6170f0faa812a7902b0 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 18 Mar 2014 19:52:29 +0100 Subject: [PATCH 198/741] kicad-install.sh: fix bad url for legacy libraries. Add the same script hich does not need a bazaar account to download Kicad (using https instead of ssh to create branches) --- scripts/kicad-install-no_launchpad_account.sh | 327 ++++++++++++++++++ scripts/kicad-install.sh | 2 +- 2 files changed, 328 insertions(+), 1 deletion(-) create mode 100644 scripts/kicad-install-no_launchpad_account.sh diff --git a/scripts/kicad-install-no_launchpad_account.sh b/scripts/kicad-install-no_launchpad_account.sh new file mode 100644 index 0000000000..3a0d2d0078 --- /dev/null +++ b/scripts/kicad-install-no_launchpad_account.sh @@ -0,0 +1,327 @@ +#!/bin/bash -e +# Install KiCad from source onto either: +# -> a Ubuntu/Debian/Mint or +# -> a Red Hat +# compatible linux system. +# +# The "install_prerequisites" step is the only "distro dependent" one. That step could be modified +# for other linux distros. +# +# There are 3 package groups in a KiCad install: +# 1) Compiled source code in the form of executable programs. +# 2) User manuals and other documentation typically as *.pdf files. +# 3) a) Schematic parts, b) layout footprints, and c) 3D models for footprints. +# +# To achieve 1) source is checked out from its repo and compiled by this script then executables +# are installed using CMake. +# To achieve 2) documentation is checked out from its repo and installed using CMake. +# TO achieve 3a) and 3c) they are checked out from their repos and installed using CMake. +# To achieve 3b) a global fp-lib-table is put into your home directory which points to +# http://github.com/KiCad. No actual footprints are installed locally, internet access is used +# during program operation to fetch footprints from github as if it was a remote drive in the cloud. +# If you want to install those same KiCad footprints locally, you may run a separate script +# named library-repos-install.sh found in this same directory. That script requires that "git" be on +# your system whereas this script does not. The footprints require some means to download them and +# bzr-git seems not up to the task. wget or curl would also work. + + +# Since bash is invoked with -e by the first line of this script, all the steps in this script +# must succeed otherwise bash will abort at the first non-zero error code. Therefore any script +# functions must be crafted to anticipate numerous conditions, such that no command fails unless it +# is a serious situation. + + +# Set where the 3 source trees will go, use a full path +WORKING_TREES=~/kicad_sources + +# CMake Options +OPTS="$OPTS -DCMAKE_BUILD_TYPE=Release" +OPTS="$OPTS -DBUILD_GITHUB_PLUGIN=ON" + +# Python scripting, uncomment to enable +#OPTS="$OPTS -DKICAD_SCRIPTING=ON -DKICAD_SCRIPTING_MODULES=ON -DKICAD_SCRIPTING_WXPYTHON=ON" + +#a connection to https://code.launchpad.net does not request a launchpad account +#but, obviously, you cannot commit anything +REPOS=https://code.launchpad.net +LEGACY_LIB_REPO=$REPOS/~dickelbeck/kicad/library-read-only +SRCS_REPO=$REPOS/~kicad-product-committers/kicad/product +DOCS_REPO=$REPOS/~kicad-developers/kicad/doc + + +usage() +{ + echo "" + echo " usage:" + echo "" + echo "./kicad-install.sh " + echo " where is one of:" + echo " --install-or-update (does full installation or update.)" + echo " --remove-sources (removes source trees for another attempt.)" + echo " --uninstall-libraries (removes KiCad supplied libraries.)" + echo " --uninstall-kicad (uninstalls all of KiCad but leaves source trees.)" + echo "" + echo "example:" + echo ' $ ./kicad-install.sh --install-or-update' +} + + +install_prerequisites() +{ + # Find a package manager, PM + PM=$( command -v yum || command -v apt-get ) + + # assume all these Debian, Mint, Ubuntu systems have same prerequisites + if [ "$(expr match "$PM" '.*\(apt-get\)')" == "apt-get" ]; then + #echo "debian compatible system" + sudo apt-get install \ + bzr \ + bzrtools \ + build-essential \ + cmake \ + cmake-curses-gui \ + debhelper \ + doxygen \ + grep \ + libbz2-dev \ + libcairo2-dev \ + libglew-dev \ + libssl-dev \ + libwxgtk2.8-dev \ + python-wxgtk2.8 + + # assume all yum systems have same prerequisites + elif [ "$(expr match "$PM" '.*\(yum\)')" == "yum" ]; then + #echo "red hat compatible system" + # Note: if you find this list not to be accurate, please submit a patch: + sudo yum groupinstall "Development Tools" + sudo yum install \ + bzr \ + bzrtools \ + bzip2-libs \ + bzip2-devel \ + cmake \ + cmake-gui \ + doxygen \ + cairo-devel \ + glew-devel \ + grep \ + openssl-devel \ + wxGTK-devel \ + wxPython + else + echo + echo "Incompatible System. Neither 'yum' nor 'apt-get' found. Not possible to continue." + echo + exit 1 + fi + + # ensure bzr name and email are set. No message since bzr prints an excellent diagnostic. + bzr whoami || exit 2 +} + + +rm_build_dir() +{ + local dir="$1" + + echo "removing directory $dir" + + if [ -e "$dir/install_manifest.txt" ]; then + # this file is often created as root, so remove as root + sudo rm "$dir/install_manifest.txt" 2> /dev/null + fi + + if [ -d "$dir" ]; then + rm -rf "$dir" + fi +} + + +cmake_uninstall() +{ + # assume caller set the CWD, and is only telling us about it in $1 + local dir="$1" + + cwd=`pwd` + if [ "$cwd" != "$dir" ]; then + echo "missing dir $dir" + elif [ ! -e install_manifest.txt ]; then + echo + echo "Missing file $dir/install_manifest.txt." + else + echo "uninstalling from $dir" + sudo make uninstall + sudo rm install_manifest.txt + fi +} + + +# Function set_env_var +# sets an environment variable globally. +set_env_var() +{ + local var=$1 + local val=$2 + + if [ -d /etc/profile.d ]; then + if [ ! -e /etc/profile.d/kicad.sh ] || ! grep "$var" /etc/profile.d/kicad.sh >> /dev/null; then + echo + echo "Adding environment variable $var to file /etc/profile.d/kicad.sh" + echo "Please logout and back in after this script completes for environment" + echo "variable to get set into environment." + sudo sh -c "echo export $var=$val >> /etc/profile.d/kicad.sh" + fi + + elif [ -e /etc/environment ]; then + if ! grep "$var" /etc/environment >> /dev/null; then + echo + echo "Adding environment variable $var to file /etc/environment" + echo "Please reboot after this script completes for environment variable to get set into environment." + sudo sh -c "echo $var=$val >> /etc/environment" + fi + fi +} + + +install_or_update() +{ + echo "step 1) installing pre-requisites" + install_prerequisites + + + echo "step 2) make $WORKING_TREES if it does not exist" + if [ ! -d "$WORKING_TREES" ]; then + sudo mkdir -p "$WORKING_TREES" + echo " mark $WORKING_TREES as owned by me" + sudo chown -R `whoami` "$WORKING_TREES" + fi + cd $WORKING_TREES + + + echo "step 3) checking out the source code from launchpad repo..." + if [ ! -d "$WORKING_TREES/kicad.bzr" ]; then + bzr checkout $SRCS_REPO kicad.bzr + echo " source repo to local working tree." + else + cd kicad.bzr + bzr up + echo " local source working tree updated." + cd ../ + fi + + if [ ! -d "$WORKING_TREES/kicad-lib.bzr" ]; then + bzr checkout $LEGACY_LIB_REPO kicad-lib.bzr + echo ' kicad-lib checked out.' + else + cd kicad-lib.bzr + bzr up + echo ' kicad-lib repo updated.' + cd ../ + fi + + echo "step 5) checking out the documentation from launchpad repo..." + if [ ! -d "$WORKING_TREES/kicad-doc.bzr" ]; then + bzr checkout $DOCS_REPO kicad-doc.bzr + echo " docs checked out." + else + cd kicad-doc.bzr + bzr up + echo " docs working tree updated." + cd ../ + fi + + + echo "step 6) compiling source code..." + cd kicad.bzr + if [ ! -d "build" ]; then + mkdir build && cd build + cmake $OPTS ../ + else + cd build + # Although a "make clean" is sometimes needed, more often than not it slows down the update + # more than it is worth. Do it manually if you need to in this directory. + # make clean + fi + make -j4 + echo " kicad compiled." + + + echo "step 7) installing KiCad program files..." + sudo make install + echo " kicad program files installed." + + + echo "step 8) installing libraries..." + cd ../../kicad-lib.bzr + rm_build_dir build + mkdir build && cd build + cmake ../ + sudo make install + echo " kicad-lib.bzr installed." + + + echo "step 9) as non-root, install user configuration files..." + # install ~/fp-lib-table + make install_github_fp-lib-table + echo " kicad user-configuration files installed." + + + echo "step 10) installing documentation..." + cd ../../kicad-doc.bzr + rm_build_dir build + mkdir build && cd build + cmake ../ + sudo make install + echo " kicad-doc.bzr installed." + + echo "step 11) check for environment variables..." + if [ -z "${KIGITHUB}" ]; then + set_env_var KIGITHUB https://github.com/KiCad + fi + + echo + echo 'All KiCad "--install-or-update" steps completed, you are up to date.' + echo +} + + +if [ $# -eq 1 -a "$1" == "--remove-sources" ]; then + echo "deleting $WORKING_TREES" + rm_build_dir "$WORKING_TREES/kicad.bzr/build" + rm_build_dir "$WORKING_TREES/kicad-lib.bzr/build" + rm_build_dir "$WORKING_TREES/kicad-doc.bzr/build" + rm -rf "$WORKING_TREES" + exit +fi + + +if [ $# -eq 1 -a "$1" == "--install-or-update" ]; then + install_or_update + exit +fi + + +if [ $# -eq 1 -a "$1" == "--uninstall-libraries" ]; then + cd "$WORKING_TREES/kicad-lib.bzr/build" + cmake_uninstall "$WORKING_TREES/kicad-lib.bzr/build" + exit +fi + + +if [ $# -eq 1 -a "$1" == "--uninstall-kicad" ]; then + cd "$WORKING_TREES/kicad.bzr/build" + cmake_uninstall "$WORKING_TREES/kicad.bzr/build" + + cd "$WORKING_TREES/kicad-lib.bzr/build" + cmake_uninstall "$WORKING_TREES/kicad-lib.bzr/build" + + # this may fail since "uninstall" support is a recent feature of this repo: + cd "$WORKING_TREES/kicad-doc.bzr/build" + cmake_uninstall "$WORKING_TREES/kicad-doc.bzr/build" + + exit +fi + + +usage diff --git a/scripts/kicad-install.sh b/scripts/kicad-install.sh index 5c6168f520..6dab247203 100755 --- a/scripts/kicad-install.sh +++ b/scripts/kicad-install.sh @@ -41,7 +41,7 @@ OPTS="$OPTS -DBUILD_GITHUB_PLUGIN=ON" # Python scripting, uncomment to enable #OPTS="$OPTS -DKICAD_SCRIPTING=ON -DKICAD_SCRIPTING_MODULES=ON -DKICAD_SCRIPTING_WXPYTHON=ON" -LIB_REPO=~kicad-product-committers/kicad/library +LIB_REPO=~dickelbeck/kicad/library-read-only usage() From 696a8a89fe57c1c45bd990a989f6cf16c4ca947d Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 19 Mar 2014 11:16:01 +0100 Subject: [PATCH 199/741] Changed cast from float to double in RN_POLY::HitTest. --- pcbnew/ratsnest_data.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/ratsnest_data.cpp b/pcbnew/ratsnest_data.cpp index ec618c7e9d..5bff81fe4f 100644 --- a/pcbnew/ratsnest_data.cpp +++ b/pcbnew/ratsnest_data.cpp @@ -357,7 +357,7 @@ bool RN_POLY::HitTest( const RN_NODE_PTR& aNode ) const } if( ( xNew < xt ) == ( xt <= xOld ) && /* edge "open" at left end */ - (float)( yt - y1 ) * (float)( x2 - x1 ) < (float)( y2 - y1 ) * (float)( xt - x1 ) ) + (double)( yt - y1 ) * (double)( x2 - x1 ) < (double)( y2 - y1 ) * (double)( xt - x1 ) ) { inside = !inside; } From e1ce30d89d97f1a8506532feef160b3466965725 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 19 Mar 2014 11:57:59 +0100 Subject: [PATCH 200/741] Fixed mouse wheel handling for GAL canvases with wx3.0. --- common/gal/cairo/cairo_gal.cpp | 1 + common/gal/opengl/opengl_gal.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index 790fb06049..393e851235 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -64,6 +64,7 @@ CAIRO_GAL::CAIRO_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); Connect( wxEVT_RIGHT_DCLICK, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); + Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); #if defined _WIN32 || defined _WIN64 Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); #endif diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 5eb63c31c4..81028d6eea 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -80,6 +80,7 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); Connect( wxEVT_RIGHT_DCLICK, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); + Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); #if defined _WIN32 || defined _WIN64 Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); #endif From ef1ed9646ab7a7f06b88bee5b8102af9e644e92a Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 19 Mar 2014 13:42:46 +0100 Subject: [PATCH 201/741] DRC markers are drawn in GAL canvases. --- include/layers_id_colors_and_visibility.h | 1 + pcbnew/basepcbframe.cpp | 2 ++ pcbnew/class_marker_pcb.cpp | 14 ++++++++---- pcbnew/class_marker_pcb.h | 23 ++++++++++++++++++++ pcbnew/drc.cpp | 13 ++++++++++++ pcbnew/drc_marker_functions.cpp | 20 +++++++++++++++++ pcbnew/pcb_painter.cpp | 26 +++++++++++++++++++++-- pcbnew/pcb_painter.h | 2 ++ pcbnew/pcbframe.cpp | 3 ++- 9 files changed, 97 insertions(+), 7 deletions(-) diff --git a/include/layers_id_colors_and_visibility.h b/include/layers_id_colors_and_visibility.h index 5df67215be..50aa5fa832 100644 --- a/include/layers_id_colors_and_visibility.h +++ b/include/layers_id_colors_and_visibility.h @@ -239,6 +239,7 @@ enum PCB_VISIBLE PADS_HOLES_VISIBLE, VIAS_HOLES_VISIBLE, + DRC_VISIBLE, ///< drc markers WORKSHEET, ///< worksheet frame GP_OVERLAY, ///< general purpose overlay diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 7adc4ca473..d89094a6fd 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -75,6 +75,7 @@ static const wxString FastGrid2Entry( wxT( "FastGrid2" ) ); const LAYER_NUM PCB_BASE_FRAME::GAL_LAYER_ORDER[] = { ITEM_GAL_LAYER( GP_OVERLAY ), + ITEM_GAL_LAYER( DRC_VISIBLE ), NETNAMES_GAL_LAYER( PADS_NETNAMES_VISIBLE ), DRAW_N, COMMENT_N, ECO1_N, ECO2_N, EDGE_N, UNUSED_LAYER_29, UNUSED_LAYER_30, UNUSED_LAYER_31, @@ -817,6 +818,7 @@ void PCB_BASE_FRAME::LoadSettings() view->SetLayerTarget( ITEM_GAL_LAYER( GP_OVERLAY ), KIGFX::TARGET_OVERLAY ); view->SetLayerTarget( ITEM_GAL_LAYER( RATSNEST_VISIBLE ), KIGFX::TARGET_OVERLAY ); + view->SetLayerTarget( ITEM_GAL_LAYER( DRC_VISIBLE ), KIGFX::TARGET_NONCACHED ); // Apply layer coloring scheme & display options if( view->GetPainter() ) diff --git a/pcbnew/class_marker_pcb.cpp b/pcbnew/class_marker_pcb.cpp index 4e947e07cd..9222698696 100644 --- a/pcbnew/class_marker_pcb.cpp +++ b/pcbnew/class_marker_pcb.cpp @@ -46,7 +46,7 @@ MARKER_PCB::MARKER_PCB( BOARD_ITEM* aParent ) : BOARD_ITEM( aParent, PCB_MARKER_T ), - MARKER_BASE( ) + MARKER_BASE(), m_item( NULL ) { m_Color = WHITE; m_ScalingFactor = SCALING_FACTOR; @@ -57,8 +57,7 @@ MARKER_PCB::MARKER_PCB( int aErrorCode, const wxPoint& aMarkerPos, const wxString& aText, const wxPoint& aPos, const wxString& bText, const wxPoint& bPos ) : BOARD_ITEM( NULL, PCB_MARKER_T ), // parent set during BOARD::Add() - MARKER_BASE( aErrorCode, aMarkerPos, aText, aPos, bText, bPos ) - + MARKER_BASE( aErrorCode, aMarkerPos, aText, aPos, bText, bPos ), m_item( NULL ) { m_Color = WHITE; m_ScalingFactor = SCALING_FACTOR; @@ -67,7 +66,7 @@ MARKER_PCB::MARKER_PCB( int aErrorCode, const wxPoint& aMarkerPos, MARKER_PCB::MARKER_PCB( int aErrorCode, const wxPoint& aMarkerPos, const wxString& aText, const wxPoint& aPos ) : BOARD_ITEM( NULL, PCB_MARKER_T ), // parent set during BOARD::Add() - MARKER_BASE( aErrorCode, aMarkerPos, aText, aPos ) + MARKER_BASE( aErrorCode, aMarkerPos, aText, aPos ), m_item( NULL ) { m_Color = WHITE; m_ScalingFactor = SCALING_FACTOR; @@ -136,3 +135,10 @@ wxString MARKER_PCB::GetSelectMenuText() const return text; } + + +void MARKER_PCB::ViewGetLayers( int aLayers[], int& aCount ) const +{ + aCount = 1; + aLayers[0] = ITEM_GAL_LAYER( DRC_VISIBLE ); +} diff --git a/pcbnew/class_marker_pcb.h b/pcbnew/class_marker_pcb.h index 7728b152c0..1e2c0931cd 100644 --- a/pcbnew/class_marker_pcb.h +++ b/pcbnew/class_marker_pcb.h @@ -64,6 +64,16 @@ public: const wxPoint& GetPosition() const { return m_Pos; } void SetPosition( const wxPoint& aPos ) { m_Pos = aPos; } + void SetItem( const BOARD_ITEM* aItem ) + { + m_item = aItem; + } + + const BOARD_ITEM* GetItem() const + { + return m_item; + } + bool HitTest( const wxPoint& aPosition ) { return HitTestMarker( aPosition ); @@ -77,9 +87,22 @@ public: BITMAP_DEF GetMenuImage() const { return drc_xpm; } + ///> @copydoc VIEW_ITEM::ViewBBox() + virtual const BOX2I ViewBBox() const + { + return GetParent()->ViewBBox(); + } + + ///> @copydoc VIEW_ITEM::ViewGetLayers() + virtual void ViewGetLayers( int aLayers[], int& aCount ) const; + #if defined(DEBUG) void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override #endif + +protected: + ///> Pointer to BOARD_ITEM that causes DRC error. + const BOARD_ITEM* m_item; }; #endif // CLASS_MARKER_PCB_H diff --git a/pcbnew/drc.cpp b/pcbnew/drc.cpp index c10f0537b0..1039fc3492 100644 --- a/pcbnew/drc.cpp +++ b/pcbnew/drc.cpp @@ -38,6 +38,8 @@ #include #include #include +#include +#include #include #include @@ -312,6 +314,7 @@ bool DRC::doNetClass( NETCLASS* nc, wxString& msg ) m_currentMarker = fillMarker( DRCE_NETCLASS_CLEARANCE, msg, m_currentMarker ); m_pcb->Add( m_currentMarker ); + m_mainWindow->GetGalCanvas()->GetView()->Add( m_currentMarker ); m_currentMarker = 0; ret = false; } @@ -327,6 +330,7 @@ bool DRC::doNetClass( NETCLASS* nc, wxString& msg ) m_currentMarker = fillMarker( DRCE_NETCLASS_TRACKWIDTH, msg, m_currentMarker ); m_pcb->Add( m_currentMarker ); + m_mainWindow->GetGalCanvas()->GetView()->Add( m_currentMarker ); m_currentMarker = 0; ret = false; } @@ -341,6 +345,7 @@ bool DRC::doNetClass( NETCLASS* nc, wxString& msg ) m_currentMarker = fillMarker( DRCE_NETCLASS_VIASIZE, msg, m_currentMarker ); m_pcb->Add( m_currentMarker ); + m_mainWindow->GetGalCanvas()->GetView()->Add( m_currentMarker ); m_currentMarker = 0; ret = false; } @@ -355,6 +360,7 @@ bool DRC::doNetClass( NETCLASS* nc, wxString& msg ) m_currentMarker = fillMarker( DRCE_NETCLASS_VIADRILLSIZE, msg, m_currentMarker ); m_pcb->Add( m_currentMarker ); + m_mainWindow->GetGalCanvas()->GetView()->Add( m_currentMarker ); m_currentMarker = 0; ret = false; } @@ -369,6 +375,7 @@ bool DRC::doNetClass( NETCLASS* nc, wxString& msg ) m_currentMarker = fillMarker( DRCE_NETCLASS_uVIASIZE, msg, m_currentMarker ); m_pcb->Add( m_currentMarker ); + m_mainWindow->GetGalCanvas()->GetView()->Add( m_currentMarker ); m_currentMarker = 0; ret = false; } @@ -383,6 +390,7 @@ bool DRC::doNetClass( NETCLASS* nc, wxString& msg ) m_currentMarker = fillMarker( DRCE_NETCLASS_uVIADRILLSIZE, msg, m_currentMarker ); m_pcb->Add( m_currentMarker ); + m_mainWindow->GetGalCanvas()->GetView()->Add( m_currentMarker ); m_currentMarker = 0; ret = false; } @@ -447,6 +455,7 @@ void DRC::testPad2Pad() { wxASSERT( m_currentMarker ); m_pcb->Add( m_currentMarker ); + m_mainWindow->GetGalCanvas()->GetView()->Add( m_currentMarker ); m_currentMarker = 0; } } @@ -493,6 +502,7 @@ void DRC::testTracks( bool aShowProgressBar ) { wxASSERT( m_currentMarker ); m_pcb->Add( m_currentMarker ); + m_mainWindow->GetGalCanvas()->GetView()->Add( m_currentMarker ); m_currentMarker = 0; } } @@ -554,6 +564,7 @@ void DRC::testZones() m_currentMarker = fillMarker( test_area, DRCE_NON_EXISTANT_NET_FOR_ZONE_OUTLINE, m_currentMarker ); m_pcb->Add( m_currentMarker ); + m_mainWindow->GetGalCanvas()->GetView()->Add( m_currentMarker ); m_currentMarker = 0; } } @@ -589,6 +600,7 @@ void DRC::testKeepoutAreas() m_currentMarker = fillMarker( segm, NULL, DRCE_TRACK_INSIDE_KEEPOUT, m_currentMarker ); m_pcb->Add( m_currentMarker ); + m_mainWindow->GetGalCanvas()->GetView()->Add( m_currentMarker ); m_currentMarker = 0; } } @@ -605,6 +617,7 @@ void DRC::testKeepoutAreas() m_currentMarker = fillMarker( segm, NULL, DRCE_VIA_INSIDE_KEEPOUT, m_currentMarker ); m_pcb->Add( m_currentMarker ); + m_mainWindow->GetGalCanvas()->GetView()->Add( m_currentMarker ); m_currentMarker = 0; } } diff --git a/pcbnew/drc_marker_functions.cpp b/pcbnew/drc_marker_functions.cpp index 817d7e17d9..a069acaaa4 100644 --- a/pcbnew/drc_marker_functions.cpp +++ b/pcbnew/drc_marker_functions.cpp @@ -100,12 +100,17 @@ MARKER_PCB* DRC::fillMarker( TRACK* aTrack, BOARD_ITEM* aItem, int aErrorCode, M else { if( aItem ) + { fillMe = new MARKER_PCB( aErrorCode, position, textA, aTrack->GetPosition(), textB, posB ); + fillMe->SetItem( aItem ); + } else + { fillMe = new MARKER_PCB( aErrorCode, position, textA, aTrack->GetPosition() ); + } } return fillMe; @@ -121,9 +126,14 @@ MARKER_PCB* DRC::fillMarker( D_PAD* aPad, D_PAD* bPad, int aErrorCode, MARKER_PC wxPoint posB = bPad->GetPosition(); if( fillMe ) + { fillMe->SetData( aErrorCode, posA, textA, posA, textB, posB ); + } else + { fillMe = new MARKER_PCB( aErrorCode, posA, textA, posA, textB, posB ); + fillMe->SetItem( aPad ); // TODO it has to be checked + } return fillMe; } @@ -136,9 +146,14 @@ MARKER_PCB* DRC::fillMarker( ZONE_CONTAINER* aArea, int aErrorCode, MARKER_PCB* wxPoint posA = aArea->GetPosition(); if( fillMe ) + { fillMe->SetData( aErrorCode, posA, textA, posA ); + } else + { fillMe = new MARKER_PCB( aErrorCode, posA, textA, posA ); + fillMe->SetItem( aArea ); + } return fillMe; } @@ -154,9 +169,14 @@ MARKER_PCB* DRC::fillMarker( const ZONE_CONTAINER* aArea, wxPoint posA = aPos; if( fillMe ) + { fillMe->SetData( aErrorCode, posA, textA, posA ); + } else + { fillMe = new MARKER_PCB( aErrorCode, posA, textA, posA ); + fillMe->SetItem( aArea ); + } return fillMe; } diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 40576eba42..6aa9e54929 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -34,9 +34,8 @@ #include #include #include -#include +#include -#include #include #include @@ -76,6 +75,7 @@ void PCB_RENDER_SETTINGS::ImportLegacyColors( COLORS_DESIGN_SETTINGS* aSettings m_layerColors[NETNAMES_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE )] = COLOR4D( 0.8, 0.8, 0.8, 0.7 ); m_layerColors[ITEM_GAL_LAYER( RATSNEST_VISIBLE )] = COLOR4D( 0.4, 0.4, 0.4, 0.7 ); m_layerColors[ITEM_GAL_LAYER( WORKSHEET )] = COLOR4D( 0.5, 0.0, 0.0, 1.0 ); + m_layerColors[ITEM_GAL_LAYER( DRC_VISIBLE )] = COLOR4D( 1.0, 0.0, 0.0, 1.0 ); // Netnames for copper layers for( LAYER_NUM layer = FIRST_COPPER_LAYER; layer <= LAST_COPPER_LAYER; ++layer ) @@ -246,6 +246,9 @@ bool PCB_PAINTER::Draw( const VIEW_ITEM* aItem, int aLayer ) draw( (PCB_TARGET*) aItem ); break; + case PCB_MARKER_T: + draw( (MARKER_PCB*) aItem ); + default: // Painter does not know how to draw the object return false; @@ -863,4 +866,23 @@ void PCB_PAINTER::draw( const PCB_TARGET* aTarget ) } +void PCB_PAINTER::draw( const MARKER_PCB* aMarker ) +{ + const BOARD_ITEM* item = aMarker->GetItem(); + + if( item ) // By default draw an item in a different color + { + Draw( item, ITEM_GAL_LAYER( DRC_VISIBLE ) ); + } + else // If there is no item associated - draw a circle marking the DRC error + { + m_gal->SetStrokeColor( COLOR4D( 1.0, 0.0, 0.0, 1.0 ) ); + m_gal->SetIsFill( false ); + m_gal->SetIsStroke( true ); + m_gal->SetLineWidth( 10000 ); + m_gal->DrawCircle( VECTOR2D( aMarker->GetPosition() ), 200000 ); + } +} + + const double PCB_RENDER_SETTINGS::MAX_FONT_SIZE = Millimeter2iu( 10.0 ); diff --git a/pcbnew/pcb_painter.h b/pcbnew/pcb_painter.h index 10819affdb..efa9cc061b 100644 --- a/pcbnew/pcb_painter.h +++ b/pcbnew/pcb_painter.h @@ -48,6 +48,7 @@ class TEXTE_PCB; class TEXTE_MODULE; class DIMENSION; class PCB_TARGET; +class MARKER_PCB; namespace KIGFX { @@ -169,6 +170,7 @@ protected: void draw( const ZONE_CONTAINER* aZone ); void draw( const DIMENSION* aDimension, int aLayer ); void draw( const PCB_TARGET* aTarget ); + void draw( const MARKER_PCB* aMarker ); }; } // namespace KIGFX diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 1b5c4c5c20..be5896b50e 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -923,7 +923,8 @@ void PCB_EDIT_FRAME::SetTopLayer( LAYER_NUM aLayer ) GetNetnameLayer( aLayer ), ITEM_GAL_LAYER( VIA_THROUGH_VISIBLE ), ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), NETNAMES_GAL_LAYER( PADS_NETNAMES_VISIBLE ), - ITEM_GAL_LAYER( GP_OVERLAY ), ITEM_GAL_LAYER( RATSNEST_VISIBLE ), DRAW_N + ITEM_GAL_LAYER( GP_OVERLAY ), ITEM_GAL_LAYER( RATSNEST_VISIBLE ), DRAW_N, + ITEM_GAL_LAYER( DRC_VISIBLE ) }; for( unsigned int i = 0; i < sizeof( layers ) / sizeof( LAYER_NUM ); ++i ) From 2d8dc04693a59c204e9ee4ef531549774253b9aa Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 19 Mar 2014 13:46:52 +0100 Subject: [PATCH 202/741] Fixed undo for MARKER_PCBs. --- pcbnew/basepcbframe.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index d89094a6fd..1467773da6 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -818,7 +818,6 @@ void PCB_BASE_FRAME::LoadSettings() view->SetLayerTarget( ITEM_GAL_LAYER( GP_OVERLAY ), KIGFX::TARGET_OVERLAY ); view->SetLayerTarget( ITEM_GAL_LAYER( RATSNEST_VISIBLE ), KIGFX::TARGET_OVERLAY ); - view->SetLayerTarget( ITEM_GAL_LAYER( DRC_VISIBLE ), KIGFX::TARGET_NONCACHED ); // Apply layer coloring scheme & display options if( view->GetPainter() ) From bf418eb1eeee317b7155247941e426f260d477f3 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 19 Mar 2014 14:26:02 +0100 Subject: [PATCH 203/741] Cursor coordinates are updated in GAL canvases. --- common/drawframe.cpp | 14 ++++++++++++-- common/tool/tool_dispatcher.cpp | 1 + 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/common/drawframe.cpp b/common/drawframe.cpp index 5820bed89b..152152fe1a 100644 --- a/common/drawframe.cpp +++ b/common/drawframe.cpp @@ -47,6 +47,7 @@ #include #include +#include #include /** @@ -1019,9 +1020,18 @@ void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable ) wxPoint EDA_DRAW_FRAME::GetCrossHairPosition( bool aInvertY ) const { // subject to change, borrow from old BASE_SCREEN for now. + if( IsGalCanvasActive() ) + { + VECTOR2I cursor = GetGalCanvas()->GetViewControls()->GetCursorPosition(); + cursor = GetGalCanvas()->GetGAL()->GetGridPoint( cursor ); - BASE_SCREEN* screen = GetScreen(); // virtual call - return screen->getCrossHairPosition( aInvertY ); + return wxPoint( cursor.x, cursor.y ); + } + else + { + BASE_SCREEN* screen = GetScreen(); // virtual call + return screen->getCrossHairPosition( aInvertY ); + } } diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index b19da891e2..1085534eec 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -229,6 +229,7 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) { motion = true; m_lastMousePos = pos; + m_editFrame->UpdateStatusBar(); } for( unsigned int i = 0; i < m_buttons.size(); i++ ) From 093e311a8d7914819d6821ac6cbe5660caa8edfc Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 19 Mar 2014 15:33:13 +0100 Subject: [PATCH 204/741] Fixed a few ratsnest glitches in GAL. --- pcbnew/tools/edit_tool.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 53a72f25e3..6965042775 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -270,6 +270,8 @@ int EDIT_TOOL::Rotate( TOOL_EVENT& aEvent ) item->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); } + updateRatsnest( m_dragging ); + if( m_dragging ) selection.group->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); else @@ -279,8 +281,6 @@ int EDIT_TOOL::Rotate( TOOL_EVENT& aEvent ) m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate ); - - updateRatsnest( true ); setTransitions(); return 0; @@ -316,6 +316,8 @@ int EDIT_TOOL::Flip( TOOL_EVENT& aEvent ) item->ViewUpdate( KIGFX::VIEW_ITEM::LAYERS ); } + updateRatsnest( m_dragging ); + if( m_dragging ) selection.group->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); else @@ -325,8 +327,6 @@ int EDIT_TOOL::Flip( TOOL_EVENT& aEvent ) m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate ); - - updateRatsnest( true ); setTransitions(); return 0; @@ -365,7 +365,6 @@ int EDIT_TOOL::Remove( TOOL_EVENT& aEvent ) if( !( board->m_Status_Pcb & NET_CODES_OK ) ) board->BuildListOfNets(); - board->GetRatsnest()->Recalculate(); // TODO is it necessary? setTransitions(); return 0; From 0f09c15f110629926751184249fcaf011e521d89 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 19 Mar 2014 21:06:09 +0100 Subject: [PATCH 205/741] Pad editor dialog: Better tests and error messages about issues in pad settings. Fis also an other hard to translate error messge. --- pcbnew/dialogs/dialog_pad_properties.cpp | 32 +++++++++++++----------- pcbnew/pcb_parser.cpp | 5 ++-- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/pcbnew/dialogs/dialog_pad_properties.cpp b/pcbnew/dialogs/dialog_pad_properties.cpp index 509fd046d6..0703edd1ee 100644 --- a/pcbnew/dialogs/dialog_pad_properties.cpp +++ b/pcbnew/dialogs/dialog_pad_properties.cpp @@ -95,8 +95,8 @@ public: private: PCB_BASE_FRAME* m_parent; - D_PAD* m_currentPad; // pad currently being edited - D_PAD* m_dummyPad; // a working copy used to show changes + D_PAD* m_currentPad; // pad currently being edited + D_PAD* m_dummyPad; // a working copy used to show changes BOARD* m_board; D_PAD& m_padMaster; bool m_isFlipped; // true if the parent footprint (therefore pads) is flipped (mirrored) @@ -673,11 +673,11 @@ bool DIALOG_PAD_PROPERTIES::padValuesOK() } LAYER_MSK padlayers_mask = m_dummyPad->GetLayerMask(); - if( ( padlayers_mask == 0 ) && ( m_dummyPad->GetAttribute() != PAD_HOLE_NOT_PLATED ) ) - error_msgs.Add( _( "Error: pad has no layer and is not a mechanical pad" ) ); - padlayers_mask &= (LAYER_BACK | LAYER_FRONT); if( padlayers_mask == 0 ) + error_msgs.Add( _( "Error: pad has no layer" ) ); + + if( ( padlayers_mask & (LAYER_BACK | LAYER_FRONT) ) == 0 ) { if( m_dummyPad->GetDrillSize().x || m_dummyPad->GetDrillSize().y ) { @@ -715,20 +715,21 @@ bool DIALOG_PAD_PROPERTIES::padValuesOK() switch( m_dummyPad->GetAttribute() ) { - case PAD_STANDARD : // Pad through hole, a hole is expected + case PAD_HOLE_NOT_PLATED: // Not plated, but through hole, a hole is expected + case PAD_STANDARD : // Pad through hole, a hole is also expected if( m_dummyPad->GetDrillSize().x <= 0 ) - error_msgs.Add( _( "Incorrect value for pad drill (too small value)" ) ); + error_msgs.Add( _( "Error: Through hole pad: drill diameter set to 0" ) ); break; - case PAD_SMD: // SMD and Connector pads (One external copper layer only) + case PAD_CONN: // Connector pads are smd pads, just they do not have solder paste. + if( (padlayers_mask & SOLDERPASTE_LAYER_BACK) || + (padlayers_mask & SOLDERPASTE_LAYER_FRONT) ) + error_msgs.Add( _( "Error: Connector pads are not on the solder paste layer\n" + "Use SMD pads instead" ) ); + // Fall trough + case PAD_SMD: // SMD and Connector pads (One external copper layer only) if( (padlayers_mask & LAYER_BACK) && (padlayers_mask & LAYER_FRONT) ) - error_msgs.Add( _( "Error: only one copper layer allowed for this pad" ) ); - break; - - case PAD_CONN: // connectors can have pads on "All" Cu layers. - break; - - case PAD_HOLE_NOT_PLATED: // Not plated + error_msgs.Add( _( "Error: only one copper layer allowed for SMD or Connector pads" ) ); break; } @@ -738,6 +739,7 @@ bool DIALOG_PAD_PROPERTIES::padValuesOK() dlg.ListSet( error_msgs ); dlg.ShowModal(); } + return error_msgs.GetCount() == 0; } diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index 8ca4bd4cdc..11b4035090 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -2426,8 +2426,9 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER() throw( IO_ERROR, PARSE_ERROR ) NeedSYMBOLorNUMBER(); if( zone->GetNet()->GetNetname() != FromUTF8() ) { - wxString msg = _( "There is a zone that belongs to a not " - "existing net (" ) + FromUTF8() + _("), you should verify it." ); + wxString msg; + msg.Printf( _( "There is a zone that belongs to a not existing net" + "(%s), you should verify it." ), GetChars( FromUTF8() ) ); DisplayError( NULL, msg ); zone->SetNetCode( NETINFO_LIST::UNCONNECTED ); } From 898ed7445f200ddf73e4a1aec48d6a31b77a2ed0 Mon Sep 17 00:00:00 2001 From: "maciej." Date: Wed, 19 Mar 2014 21:07:49 +0100 Subject: [PATCH 206/741] GAL: fix zooming using mouse wheel with wxWidgets 3.0. --- common/gal/cairo/cairo_gal.cpp | 1 + common/gal/opengl/opengl_gal.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index 5f180d7338..4b3d0bf6ff 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -67,6 +67,7 @@ CAIRO_GAL::CAIRO_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); Connect( wxEVT_RIGHT_DCLICK, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); + Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); #if defined _WIN32 || defined _WIN64 Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); #endif diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 0884ed2345..8e603d27fb 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -80,6 +80,7 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); Connect( wxEVT_RIGHT_DCLICK, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); + Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); #if defined _WIN32 || defined _WIN64 Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); #endif From 2c67c3ff803b0f19e942b6c5024cbb86bbd4b79c Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Wed, 19 Mar 2014 19:42:08 -0500 Subject: [PATCH 207/741] * KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out. --- 3d-viewer/3d_draw.cpp | 4 +- 3d-viewer/3d_frame.cpp | 155 ++- 3d-viewer/3d_read_mesh.cpp | 2 +- 3d-viewer/3d_viewer.h | 20 +- CMakeLists.txt | 54 +- CMakeModules/download_boost.cmake | 12 +- CMakeModules/download_cairo.cmake | 13 +- CMakeModules/download_glew.cmake | 6 +- CMakeModules/download_pixman.cmake | 6 +- CMakeModules/download_pkgconfig.cmake | 4 +- CMakeModules/download_wxwidgets.cmake | 10 +- Documentation/KIWAY_Build_Symbols_Defined.txt | 29 + TODO.txt | 12 +- bitmap2component/CMakeLists.txt | 83 +- bitmap2component/bitmap2cmp_gui.cpp | 282 ++-- bitmap2component/bitmap2cmp_gui_base.cpp | 4 +- bitmap2component/bitmap2cmp_gui_base.fbp | 4 +- bitmap2component/bitmap2cmp_gui_base.h | 7 +- common/CMakeLists.txt | 67 +- common/base_units.cpp | 14 +- common/basicframe.cpp | 227 ++-- common/bin_mod.cpp | 52 + common/block_commande.cpp | 2 +- common/colors.cpp | 156 +++ common/common.cpp | 42 - common/common_plotPDF_functions.cpp | 2 +- common/common_plotPS_functions.cpp | 162 +-- .../{projet_config.cpp => config_params.cpp} | 369 ++--- common/copy_to_clipboard.cpp | 2 +- common/dialog_about/AboutDialog_main.cpp | 8 +- common/dialog_shim.cpp | 14 +- common/dialogs/dialog_get_component.cpp | 2 +- common/dialogs/dialog_hotkeys_editor.cpp | 6 +- common/dialogs/dialog_page_settings.cpp | 2 +- common/displlst.cpp | 2 +- common/{drawframe.cpp => draw_frame.cpp} | 44 +- common/{drawpanel.cpp => draw_panel.cpp} | 45 +- common/drawtxt.cpp | 4 +- common/eda_dde.cpp | 2 +- common/eda_doc.cpp | 17 +- common/eda_text.cpp | 2 +- common/edaappl.cpp | 1197 ----------------- common/footprint_info.cpp | 2 +- common/fp_lib_table.cpp | 122 +- common/gestfich.cpp | 75 +- common/gr_basic.cpp | 107 -- common/hotkey_grid_table.cpp | 2 +- common/hotkeys_basic.cpp | 89 +- common/kiface_i.cpp | 206 +++ common/kiway.cpp | 4 +- common/kiway_holder.cpp | 29 + common/page_layout/class_worksheet_layout.cpp | 45 +- common/pgm_base.cpp | 742 ++++++++++ common/project.cpp | 302 +++++ common/search_stack.cpp | 196 +++ common/single_top.cpp | 382 ++++-- common/systemdirsappend.cpp | 129 ++ common/worksheet.cpp | 6 +- common/wxwineda.cpp | 18 +- common/zoom.cpp | 2 +- cvpcb/CMakeLists.txt | 262 ++-- cvpcb/autosel.cpp | 10 +- cvpcb/cfg.cpp | 78 +- cvpcb/class_DisplayFootprintsFrame.cpp | 22 +- cvpcb/class_DisplayFootprintsFrame.h | 5 +- cvpcb/class_footprints_listbox.cpp | 2 +- cvpcb/cvframe.cpp | 181 ++- cvpcb/cvpcb.cpp | 171 ++- cvpcb/cvpcb_mainframe.h | 44 +- cvpcb/dialogs/dialog_cvpcb_config.cpp | 50 +- cvpcb/dialogs/dialog_cvpcb_config.h | 5 +- cvpcb/menubar.cpp | 13 +- cvpcb/readwrite_dlgs.cpp | 55 +- cvpcb/tool_cvpcb.cpp | 4 +- eeschema/CMakeLists.txt | 95 +- eeschema/backanno.cpp | 6 +- eeschema/block.cpp | 4 +- eeschema/block_libedit.cpp | 2 +- eeschema/class_libentry.cpp | 4 +- eeschema/class_libentry.h | 4 +- eeschema/class_netlist_object.cpp | 2 +- eeschema/class_netlist_object.h | 4 +- eeschema/component_references_lister.cpp | 4 +- eeschema/cross-probing.cpp | 44 +- eeschema/database.cpp | 16 +- eeschema/dialogs/dialog_annotate.cpp | 19 +- eeschema/dialogs/dialog_bom.cpp | 46 +- eeschema/dialogs/dialog_color_config.cpp | 2 +- .../dialogs/dialog_edit_component_in_lib.cpp | 31 +- .../dialog_edit_component_in_schematic.cpp | 10 +- eeschema/dialogs/dialog_edit_label.cpp | 4 +- .../dialog_edit_libentry_fields_in_lib.cpp | 10 +- eeschema/dialogs/dialog_edit_one_field.cpp | 4 +- eeschema/dialogs/dialog_eeschema_config.cpp | 169 ++- eeschema/dialogs/dialog_eeschema_config.h | 42 - .../dialogs/dialog_eeschema_config_fbp.cpp | 4 +- .../dialogs/dialog_eeschema_config_fbp.fbp | 4 +- eeschema/dialogs/dialog_eeschema_config_fbp.h | 7 +- eeschema/dialogs/dialog_erc.cpp | 4 +- eeschema/dialogs/dialog_lib_edit_pin.cpp | 6 +- eeschema/dialogs/dialog_lib_edit_text.cpp | 6 +- eeschema/dialogs/dialog_netlist.cpp | 27 +- eeschema/dialogs/dialog_plot_schematic.cpp | 7 +- eeschema/dialogs/dialog_plot_schematic.h | 10 +- .../dialogs/dialog_print_using_printer.cpp | 2 +- eeschema/eelibs_read_libraryfiles.cpp | 45 +- eeschema/eeschema.cpp | 195 ++- eeschema/eeschema_config.cpp | 242 ++-- eeschema/eeschema_config.h | 2 +- eeschema/files-io.cpp | 72 +- eeschema/find.cpp | 2 +- eeschema/getpart.cpp | 7 +- eeschema/invoke_sch_dialog.h | 1 + eeschema/lib_arc.cpp | 2 +- eeschema/lib_bezier.cpp | 2 +- eeschema/lib_circle.cpp | 4 +- eeschema/lib_field.cpp | 8 +- eeschema/lib_pin.cpp | 30 +- eeschema/lib_pin.h | 16 +- eeschema/lib_polyline.cpp | 2 +- eeschema/lib_rectangle.cpp | 2 +- eeschema/lib_text.cpp | 2 +- eeschema/libedit.cpp | 15 +- eeschema/libedit_plot_component.cpp | 2 +- eeschema/libeditframe.cpp | 64 +- eeschema/libeditframe.h | 36 +- eeschema/menubar.cpp | 13 +- eeschema/menubar_libedit.cpp | 4 +- eeschema/netform.cpp | 47 +- eeschema/operations_on_items_lists.cpp | 2 +- eeschema/pinedit.cpp | 21 +- eeschema/plot_schematic_HPGL.cpp | 2 +- eeschema/plot_schematic_SVG.cpp | 6 +- eeschema/sch_base_frame.cpp | 17 +- eeschema/sch_component.cpp | 2 +- eeschema/sch_field.cpp | 8 +- eeschema/sch_screen.cpp | 2 +- eeschema/sch_sheet.cpp | 4 +- eeschema/sch_text.cpp | 2 +- eeschema/schedit.cpp | 8 +- eeschema/schframe.cpp | 62 +- eeschema/selpart.cpp | 2 +- eeschema/sheet.cpp | 8 +- eeschema/sheetlab.cpp | 8 +- eeschema/symbdraw.cpp | 4 +- eeschema/symbedit.cpp | 29 +- eeschema/viewlib_frame.cpp | 45 +- eeschema/viewlib_frame.h | 27 +- eeschema/viewlibs.cpp | 10 +- gerbview/CMakeLists.txt | 175 ++- gerbview/block.cpp | 2 +- gerbview/class_DCodeSelectionbox.cpp | 2 +- gerbview/class_GERBER.cpp | 2 +- gerbview/class_GERBER.h | 6 +- gerbview/class_excellon.h | 4 +- .../dialogs/dialog_print_using_printer.cpp | 7 +- gerbview/events_called_functions.cpp | 4 +- gerbview/excellon_read_drill_file.cpp | 2 +- gerbview/gerbview.cpp | 151 ++- gerbview/gerbview_config.cpp | 2 +- gerbview/gerbview_frame.cpp | 89 +- gerbview/gerbview_frame.h | 39 +- gerbview/menubar.cpp | 17 +- gerbview/readgerb.cpp | 4 +- gerbview/rs274d.cpp | 6 +- gerbview/select_layers_to_pcb.cpp | 7 +- include/appl_wxstruct.h | 450 ------- include/base_units.h | 14 +- include/bin_mod.h | 64 + include/class_board_design_settings.h | 2 +- include/colors.h | 6 +- include/common.h | 10 + include/{param_config.h => config_params.h} | 102 +- include/dialog_hotkeys_editor.h | 2 +- include/dialog_shim.h | 6 +- include/draw_frame.h | 652 +++++++++ include/drawtxt.h | 6 +- include/fp_lib_table.h | 57 +- include/gestfich.h | 4 +- include/hotkey_grid_table.h | 2 +- include/hotkeys_basic.h | 12 +- include/import_export.h | 10 +- include/kiface_i.h | 141 ++ include/kiway.h | 159 ++- include/kiway_player.h | 160 +++ include/layers_id_colors_and_visibility.h | 2 +- include/pgm_base.h | 270 ++++ include/project.h | 255 ++++ include/sch_base_frame.h | 4 +- include/search_stack.h | 118 ++ include/wxBasePcbFrame.h | 64 +- include/wxEeschemaStruct.h | 36 +- include/wxPcbStruct.h | 81 +- include/wxstruct.h | 673 +-------- kicad/CMakeLists.txt | 12 +- kicad/class_treeproject_item.cpp | 8 +- kicad/files-io.cpp | 7 +- kicad/kicad.cpp | 327 ++++- kicad/kicad.h | 41 +- kicad/mainframe.cpp | 84 +- kicad/menubar.cpp | 14 +- kicad/pgm_kicad.h | 74 + kicad/preferences.cpp | 18 +- kicad/prjconfig.cpp | 50 +- kicad/tree_project_frame.cpp | 4 +- new/toolchain-mingw32.cmake | 15 +- pagelayout_editor/CMakeLists.txt | 184 ++- pagelayout_editor/events_functions.cpp | 2 +- pagelayout_editor/menubar.cpp | 16 +- pagelayout_editor/pl_editor.cpp | 115 +- pagelayout_editor/pl_editor_config.cpp | 2 +- pagelayout_editor/pl_editor_frame.cpp | 67 +- pagelayout_editor/pl_editor_frame.h | 92 +- pcb_calculator/CMakeLists.txt | 144 +- pcb_calculator/attenuators.cpp | 8 +- .../attenuators/attenuator_classes.cpp | 4 +- .../attenuators/attenuator_classes.h | 4 +- pcb_calculator/datafile_read_write.cpp | 4 +- .../dialogs/pcb_calculator_frame_base.cpp | 4 +- .../dialogs/pcb_calculator_frame_base.fbp | 22 +- .../dialogs/pcb_calculator_frame_base.h | 6 +- pcb_calculator/electrical_spacing_values.cpp | 4 +- pcb_calculator/params_read_write.cpp | 2 +- pcb_calculator/pcb_calculator.cpp | 91 +- pcb_calculator/pcb_calculator.h | 16 +- pcb_calculator/pcb_calculator_frame.cpp | 8 +- pcb_calculator/regulators_funct.cpp | 20 +- .../tracks_width_versus_current.cpp | 10 +- pcb_calculator/transline_dlg_funct.cpp | 4 +- pcb_calculator/transline_ident.cpp | 8 +- pcb_calculator/transline_ident.h | 8 +- pcbnew/CMakeLists.txt | 252 ++-- pcbnew/autorouter/graphpcb.cpp | 4 +- pcbnew/autorouter/queue.cpp | 2 +- pcbnew/autorouter/solve.cpp | 2 +- pcbnew/autorouter/work.cpp | 2 +- pcbnew/basepcbframe.cpp | 84 +- pcbnew/block.cpp | 2 +- pcbnew/block_module_editor.cpp | 6 +- ...board_items_to_polygon_shape_transform.cpp | 8 +- pcbnew/class_board.cpp | 2 +- pcbnew/class_board.h | 4 +- pcbnew/class_module.cpp | 8 +- pcbnew/class_module.h | 4 +- pcbnew/class_pad.cpp | 10 +- pcbnew/class_pad.h | 8 +- pcbnew/class_pad_draw_functions.cpp | 4 +- pcbnew/class_pcb_layer_widget.cpp | 2 +- pcbnew/class_track.cpp | 14 +- pcbnew/class_track.h | 4 +- pcbnew/clean.cpp | 8 +- pcbnew/connect.cpp | 2 +- pcbnew/cross-probing.cpp | 2 +- pcbnew/dialogs/dialog_SVG_print.cpp | 11 +- pcbnew/dialogs/dialog_SVG_print.h | 2 +- pcbnew/dialogs/dialog_copper_zones.cpp | 23 +- pcbnew/dialogs/dialog_design_rules.cpp | 68 +- pcbnew/dialogs/dialog_drc.cpp | 6 +- .../dialog_edit_module_for_BoardEditor.cpp | 49 +- .../dialog_edit_module_for_Modedit.cpp | 36 +- pcbnew/dialogs/dialog_edit_module_text.cpp | 10 +- pcbnew/dialogs/dialog_export_idf.cpp | 6 +- pcbnew/dialogs/dialog_export_vrml.cpp | 7 +- pcbnew/dialogs/dialog_fp_lib_table.cpp | 3 +- pcbnew/dialogs/dialog_freeroute_exchange.cpp | 12 +- pcbnew/dialogs/dialog_gendrill.cpp | 5 +- pcbnew/dialogs/dialog_gendrill.h | 8 +- .../dialog_global_edit_tracks_and_vias.cpp | 20 +- .../dialog_global_modules_fields_edition.cpp | 12 +- .../dialog_graphic_item_properties.cpp | 12 +- ...og_graphic_item_properties_for_Modedit.cpp | 12 +- .../dialogs/dialog_graphic_items_options.cpp | 20 +- .../dialog_keepout_area_properties.cpp | 7 +- pcbnew/dialogs/dialog_mask_clearance.cpp | 6 +- pcbnew/dialogs/dialog_netlist.cpp | 11 +- pcbnew/dialogs/dialog_netlist.h | 2 +- pcbnew/dialogs/dialog_pad_properties.cpp | 32 +- pcbnew/dialogs/dialog_pcb_text_properties.cpp | 10 +- pcbnew/dialogs/dialog_plot.cpp | 31 +- pcbnew/dialogs/dialog_plot.h | 2 +- pcbnew/dialogs/dialog_print_for_modedit.cpp | 7 +- pcbnew/dialogs/dialog_print_using_printer.cpp | 13 +- pcbnew/dialogs/dialog_set_grid.cpp | 4 +- pcbnew/dimension.cpp | 10 +- pcbnew/drc.cpp | 2 +- pcbnew/drc_clearance_test_functions.cpp | 6 +- pcbnew/edgemod.cpp | 4 +- pcbnew/edit.cpp | 51 +- pcbnew/editmod.cpp | 17 +- pcbnew/exporters/export_d356.cpp | 32 +- pcbnew/exporters/export_gencad.cpp | 8 +- pcbnew/exporters/export_vrml.cpp | 6 +- pcbnew/exporters/gen_modules_placefile.cpp | 6 +- pcbnew/exporters/gendrill_Excellon_writer.cpp | 9 +- pcbnew/exporters/idf.cpp | 3 +- pcbnew/files.cpp | 298 ++-- pcbnew/footprint_wizard_frame.cpp | 38 +- pcbnew/footprint_wizard_frame.h | 25 +- pcbnew/import_dxf/dialog_dxf_import.cpp | 9 +- pcbnew/initpcb.cpp | 12 +- pcbnew/kicad_plugin.cpp | 4 +- pcbnew/librairi.cpp | 51 +- pcbnew/loadcmp.cpp | 18 +- pcbnew/menubar_pcbframe.cpp | 16 +- pcbnew/modedit.cpp | 61 +- pcbnew/module_editor_frame.h | 19 +- pcbnew/moduleframe.cpp | 35 +- pcbnew/modview_frame.cpp | 63 +- pcbnew/modview_frame.h | 32 +- pcbnew/muonde.cpp | 12 +- pcbnew/netlist.cpp | 4 +- pcbnew/onleftclick.cpp | 5 +- pcbnew/onrightclick.cpp | 6 +- pcbnew/pcb_painter.cpp | 2 +- pcbnew/pcbframe.cpp | 143 +- pcbnew/pcbnew.cpp | 517 ++++--- pcbnew/pcbnew_config.cpp | 67 +- pcbnew/pcbnew_config.h | 2 +- pcbnew/plot_brditems_plotter.cpp | 2 +- pcbnew/printout_controler.cpp | 2 +- pcbnew/printout_controler.h | 3 +- pcbnew/specctra_export.cpp | 2 +- pcbnew/swap_layers.cpp | 2 +- pcbnew/target_edit.cpp | 8 +- pcbnew/toolbars_update_user_interface.cpp | 2 +- pcbnew/tools/selection_tool.cpp | 2 +- pcbnew/xchgmod.cpp | 2 +- pcbnew/zones_by_polygon.cpp | 15 +- pcbnew/zones_by_polygon_fill_functions.cpp | 2 +- ...ones_convert_to_polygons_aux_functions.cpp | 4 +- pcbnew/zones_functions_for_undo_redo.cpp | 2 +- pcbnew/zones_non_copper_type_functions.cpp | 16 +- pcbnew/zones_polygons_test_connections.cpp | 2 +- tools/CMakeLists.txt | 54 - tools/kiface_test.cpp | 60 - 335 files changed, 9281 insertions(+), 6943 deletions(-) create mode 100644 Documentation/KIWAY_Build_Symbols_Defined.txt create mode 100644 common/bin_mod.cpp create mode 100644 common/colors.cpp rename common/{projet_config.cpp => config_params.cpp} (62%) rename common/{drawframe.cpp => draw_frame.cpp} (96%) rename common/{drawpanel.cpp => draw_panel.cpp} (97%) delete mode 100644 common/edaappl.cpp create mode 100644 common/kiface_i.cpp create mode 100644 common/kiway_holder.cpp create mode 100644 common/pgm_base.cpp create mode 100644 common/project.cpp create mode 100644 common/search_stack.cpp create mode 100644 common/systemdirsappend.cpp delete mode 100644 eeschema/dialogs/dialog_eeschema_config.h delete mode 100644 include/appl_wxstruct.h create mode 100644 include/bin_mod.h rename include/{param_config.h => config_params.h} (69%) create mode 100644 include/draw_frame.h create mode 100644 include/kiface_i.h create mode 100644 include/kiway_player.h create mode 100644 include/pgm_base.h create mode 100644 include/project.h create mode 100644 include/search_stack.h create mode 100644 kicad/pgm_kicad.h delete mode 100644 tools/kiface_test.cpp diff --git a/3d-viewer/3d_draw.cpp b/3d-viewer/3d_draw.cpp index d721f0a8b4..3aa20977d5 100644 --- a/3d-viewer/3d_draw.cpp +++ b/3d-viewer/3d_draw.cpp @@ -77,7 +77,7 @@ static void BuildPadShapeThickOutlineAsPolygon( D_PAD* aPad, { if( aPad->GetShape() == PAD_CIRCLE ) // Draw a ring { - TransformRingToPolygon( aCornerBuffer, aPad->ReturnShapePos(), + TransformRingToPolygon( aCornerBuffer, aPad->ShapePos(), aPad->GetSize().x / 2, aCircleToSegmentsCount, aWidth ); return; } @@ -809,7 +809,7 @@ void EDA_3D_CANVAS::Draw3DViaHole( SEGVIA* aVia ) int inner_radius = aVia->GetDrillValue() / 2; int thickness = g_Parm_3D_Visu.GetCopperThicknessBIU(); - aVia->ReturnLayerPair( &top_layer, &bottom_layer ); + aVia->LayerPair( &top_layer, &bottom_layer ); // Drawing via hole: if( g_Parm_3D_Visu.IsRealisticMode() ) diff --git a/3d-viewer/3d_frame.cpp b/3d-viewer/3d_frame.cpp index 1b0561bb16..c8e957df01 100644 --- a/3d-viewer/3d_frame.cpp +++ b/3d-viewer/3d_frame.cpp @@ -26,7 +26,8 @@ */ #include -#include +#include +#include #include <3d_viewer.h> #include <3d_canvas.h> @@ -38,23 +39,23 @@ #include INFO3D_VISU g_Parm_3D_Visu; - // Key to store 3D Viewer config: -static const wxString keyBgColor_Red( wxT( "BgColor_Red" ) ); -static const wxString keyBgColor_Green( wxT( "BgColor_Green" ) ); -static const wxString keyBgColor_Blue( wxT( "BgColor_Blue" ) ); -static const wxString keyShowRealisticMode( wxT( "ShowRealisticMode" ) ); -static const wxString keyShowAxis( wxT( "ShowAxis" ) ); -static const wxString keyShowZones( wxT( "ShowZones" ) ); -static const wxString keyShowFootprints( wxT( "ShowFootprints" ) ); -static const wxString keyShowCopperThickness( wxT( "ShowCopperThickness" ) ); -static const wxString keyShowAdhesiveLayers( wxT( "ShowAdhesiveLayers" ) ); -static const wxString keyShowSilkScreenLayers( wxT( "ShowSilkScreenLayers" ) ); -static const wxString keyShowSolderMaskLayers( wxT( "ShowSolderMasLayers" ) ); -static const wxString keyShowSolderPasteLayers( wxT( "ShowSolderPasteLayers" ) ); -static const wxString keyShowCommentsLayer( wxT( "ShowCommentsLayers" ) ); -static const wxString keyShowBoardBody( wxT( "ShowBoardBody" ) ); -static const wxString keyShowEcoLayers( wxT( "ShowEcoLayers" ) ); +static const wxChar keyBgColor_Red[] = wxT( "BgColor_Red" ); +static const wxChar keyBgColor_Green[] = wxT( "BgColor_Green" ); +static const wxChar keyBgColor_Blue[] = wxT( "BgColor_Blue" ); +static const wxChar keyShowRealisticMode[] = wxT( "ShowRealisticMode" ); +static const wxChar keyShowAxis[] = wxT( "ShowAxis" ); +static const wxChar keyShowZones[] = wxT( "ShowZones" ); +static const wxChar keyShowFootprints[] = wxT( "ShowFootprints" ); +static const wxChar keyShowCopperThickness[] = wxT( "ShowCopperThickness" ); +static const wxChar keyShowAdhesiveLayers[] = wxT( "ShowAdhesiveLayers" ); +static const wxChar keyShowSilkScreenLayers[] = wxT( "ShowSilkScreenLayers" ); +static const wxChar keyShowSolderMaskLayers[] = wxT( "ShowSolderMasLayers" ); +static const wxChar keyShowSolderPasteLayers[] =wxT( "ShowSolderPasteLayers" ); +static const wxChar keyShowCommentsLayer[] = wxT( "ShowCommentsLayers" ); +static const wxChar keyShowBoardBody[] = wxT( "ShowBoardBody" ); +static const wxChar keyShowEcoLayers[] = wxT( "ShowEcoLayers" ); + BEGIN_EVENT_TABLE( EDA_3D_FRAME, EDA_BASE_FRAME ) EVT_ACTIVATE( EDA_3D_FRAME::OnActivate ) @@ -72,11 +73,13 @@ EVT_MENU_RANGE( ID_MENU3D_GRID, ID_MENU3D_GRID_END, EVT_CLOSE( EDA_3D_FRAME::OnCloseWindow ) -END_EVENT_TABLE() EDA_3D_FRAME::EDA_3D_FRAME( PCB_BASE_FRAME* parent, - const wxString& title, - long style ) : - EDA_BASE_FRAME( parent, DISPLAY3D_FRAME_TYPE, title, - wxDefaultPosition, wxDefaultSize, style, wxT( "Frame3D" ) ) +END_EVENT_TABLE() + + +EDA_3D_FRAME::EDA_3D_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent, + const wxString& aTitle, long style ) : + KIWAY_PLAYER( aKiway, aParent, DISPLAY3D_FRAME_TYPE, aTitle, + wxDefaultPosition, wxDefaultSize, style, wxT( "Frame3D" ) ) { m_canvas = NULL; m_reloadRequest = false; @@ -87,7 +90,7 @@ END_EVENT_TABLE() EDA_3D_FRAME::EDA_3D_FRAME( PCB_BASE_FRAME* parent, icon.CopyFromBitmap( KiBitmap( icon_3d_xpm ) ); SetIcon( icon ); - GetSettings(); + LoadSettings( config() ); SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y ); // Create the status line @@ -139,84 +142,76 @@ void EDA_3D_FRAME::OnCloseWindow( wxCloseEvent& Event ) } -void EDA_3D_FRAME::GetSettings() +void EDA_3D_FRAME::LoadSettings( wxConfigBase* aCfg ) { - wxConfig* config = wxGetApp().GetSettings(); // Current config used by application - class INFO3D_VISU& prms = g_Parm_3D_Visu; + EDA_BASE_FRAME::LoadSettings( aCfg ); - if( config ) - { - EDA_BASE_FRAME::LoadSettings(); + INFO3D_VISU& prms = g_Parm_3D_Visu; - config->Read( keyBgColor_Red, &g_Parm_3D_Visu.m_BgColor.m_Red, 0.0 ); - config->Read( keyBgColor_Green, &g_Parm_3D_Visu.m_BgColor.m_Green, 0.0 ); - config->Read( keyBgColor_Blue, &g_Parm_3D_Visu.m_BgColor.m_Blue, 0.0 ); + aCfg->Read( keyBgColor_Red, &g_Parm_3D_Visu.m_BgColor.m_Red, 0.0 ); + aCfg->Read( keyBgColor_Green, &g_Parm_3D_Visu.m_BgColor.m_Green, 0.0 ); + aCfg->Read( keyBgColor_Blue, &g_Parm_3D_Visu.m_BgColor.m_Blue, 0.0 ); - bool tmp; - config->Read( keyShowRealisticMode, &tmp, false ); - prms.SetFlag( FL_USE_REALISTIC_MODE, tmp ); + bool tmp; + aCfg->Read( keyShowRealisticMode, &tmp, false ); + prms.SetFlag( FL_USE_REALISTIC_MODE, tmp ); - config->Read( keyShowAxis, &tmp, true ); - prms.SetFlag( FL_AXIS, tmp ); + aCfg->Read( keyShowAxis, &tmp, true ); + prms.SetFlag( FL_AXIS, tmp ); - config->Read( keyShowFootprints, &tmp, true ); - prms.SetFlag( FL_MODULE, tmp ); + aCfg->Read( keyShowFootprints, &tmp, true ); + prms.SetFlag( FL_MODULE, tmp ); - config->Read( keyShowCopperThickness, &tmp, false ); - prms.SetFlag( FL_USE_COPPER_THICKNESS, tmp ); + aCfg->Read( keyShowCopperThickness, &tmp, false ); + prms.SetFlag( FL_USE_COPPER_THICKNESS, tmp ); - config->Read( keyShowZones, &tmp, true ); - prms.SetFlag( FL_ZONE, tmp ); + aCfg->Read( keyShowZones, &tmp, true ); + prms.SetFlag( FL_ZONE, tmp ); - config->Read( keyShowAdhesiveLayers, &tmp, true ); - prms.SetFlag( FL_ADHESIVE, tmp ); + aCfg->Read( keyShowAdhesiveLayers, &tmp, true ); + prms.SetFlag( FL_ADHESIVE, tmp ); - config->Read( keyShowSilkScreenLayers, &tmp, true ); - prms.SetFlag( FL_SILKSCREEN, tmp ); + aCfg->Read( keyShowSilkScreenLayers, &tmp, true ); + prms.SetFlag( FL_SILKSCREEN, tmp ); - config->Read( keyShowSolderMaskLayers, &tmp, true ); - prms.SetFlag( FL_SOLDERMASK, tmp ); + aCfg->Read( keyShowSolderMaskLayers, &tmp, true ); + prms.SetFlag( FL_SOLDERMASK, tmp ); - config->Read( keyShowSolderPasteLayers, &tmp, true ); - prms.SetFlag( FL_SOLDERPASTE, tmp ); + aCfg->Read( keyShowSolderPasteLayers, &tmp, true ); + prms.SetFlag( FL_SOLDERPASTE, tmp ); - config->Read( keyShowCommentsLayer, &tmp, true ); - prms.SetFlag( FL_COMMENTS, tmp ); + aCfg->Read( keyShowCommentsLayer, &tmp, true ); + prms.SetFlag( FL_COMMENTS, tmp ); - config->Read( keyShowEcoLayers, &tmp, true ); - prms.SetFlag( FL_ECO, tmp ); + aCfg->Read( keyShowEcoLayers, &tmp, true ); + prms.SetFlag( FL_ECO, tmp ); - config->Read( keyShowBoardBody, &tmp, true ); - prms.SetFlag( FL_SHOW_BOARD_BODY, tmp ); - } + aCfg->Read( keyShowBoardBody, &tmp, true ); + prms.SetFlag( FL_SHOW_BOARD_BODY, tmp ); } -void EDA_3D_FRAME::SaveSettings() +void EDA_3D_FRAME::SaveSettings( wxConfigBase* aCfg ) { - wxConfig* config = wxGetApp().GetSettings(); // Current config used by application + EDA_BASE_FRAME::SaveSettings( aCfg ); - if( !config ) - return; + INFO3D_VISU& prms = g_Parm_3D_Visu; - EDA_BASE_FRAME::SaveSettings(); - - config->Write( keyBgColor_Red, g_Parm_3D_Visu.m_BgColor.m_Red ); - config->Write( keyBgColor_Green, g_Parm_3D_Visu.m_BgColor.m_Green ); - config->Write( keyBgColor_Blue, g_Parm_3D_Visu.m_BgColor.m_Blue ); - class INFO3D_VISU& prms = g_Parm_3D_Visu; - config->Write( keyShowRealisticMode, prms.GetFlag( FL_USE_REALISTIC_MODE ) ); - config->Write( keyShowAxis, prms.GetFlag( FL_AXIS ) ); - config->Write( keyShowFootprints, prms.GetFlag( FL_MODULE ) ); - config->Write( keyShowCopperThickness, prms.GetFlag( FL_USE_COPPER_THICKNESS ) ); - config->Write( keyShowZones, prms.GetFlag( FL_ZONE ) ); - config->Write( keyShowAdhesiveLayers, prms.GetFlag( FL_ADHESIVE ) ); - config->Write( keyShowSilkScreenLayers, prms.GetFlag( FL_SILKSCREEN ) ); - config->Write( keyShowSolderMaskLayers, prms.GetFlag( FL_SOLDERMASK ) ); - config->Write( keyShowSolderPasteLayers, prms.GetFlag( FL_SOLDERPASTE ) ); - config->Write( keyShowCommentsLayer, prms.GetFlag( FL_COMMENTS ) ); - config->Write( keyShowEcoLayers, prms.GetFlag( FL_ECO ) ); - config->Write( keyShowBoardBody, prms.GetFlag( FL_SHOW_BOARD_BODY ) ); + aCfg->Write( keyBgColor_Red, g_Parm_3D_Visu.m_BgColor.m_Red ); + aCfg->Write( keyBgColor_Green, g_Parm_3D_Visu.m_BgColor.m_Green ); + aCfg->Write( keyBgColor_Blue, g_Parm_3D_Visu.m_BgColor.m_Blue ); + aCfg->Write( keyShowRealisticMode, prms.GetFlag( FL_USE_REALISTIC_MODE ) ); + aCfg->Write( keyShowAxis, prms.GetFlag( FL_AXIS ) ); + aCfg->Write( keyShowFootprints, prms.GetFlag( FL_MODULE ) ); + aCfg->Write( keyShowCopperThickness, prms.GetFlag( FL_USE_COPPER_THICKNESS ) ); + aCfg->Write( keyShowZones, prms.GetFlag( FL_ZONE ) ); + aCfg->Write( keyShowAdhesiveLayers, prms.GetFlag( FL_ADHESIVE ) ); + aCfg->Write( keyShowSilkScreenLayers, prms.GetFlag( FL_SILKSCREEN ) ); + aCfg->Write( keyShowSolderMaskLayers, prms.GetFlag( FL_SOLDERMASK ) ); + aCfg->Write( keyShowSolderPasteLayers, prms.GetFlag( FL_SOLDERPASTE ) ); + aCfg->Write( keyShowCommentsLayer, prms.GetFlag( FL_COMMENTS ) ); + aCfg->Write( keyShowEcoLayers, prms.GetFlag( FL_ECO ) ); + aCfg->Write( keyShowBoardBody, prms.GetFlag( FL_SHOW_BOARD_BODY ) ); } diff --git a/3d-viewer/3d_read_mesh.cpp b/3d-viewer/3d_read_mesh.cpp index 24046f9e9c..62a725a1ab 100644 --- a/3d-viewer/3d_read_mesh.cpp +++ b/3d-viewer/3d_read_mesh.cpp @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include <3d_viewer.h> #include diff --git a/3d-viewer/3d_viewer.h b/3d-viewer/3d_viewer.h index 24d76d6aa7..96036e1194 100644 --- a/3d-viewer/3d_viewer.h +++ b/3d-viewer/3d_viewer.h @@ -30,7 +30,7 @@ #ifndef __3D_VIEWER_H__ #define __3D_VIEWER_H__ -#include // for EDA_BASE_FRAME. +#include #if !wxUSE_GLCANVAS #error Please build wxWidgets with Opengl support (./configure --with-opengl) @@ -50,24 +50,29 @@ #include <3d_struct.h> +#define KISYS3DMOD "KISYS3DMOD" + class EDA_3D_CANVAS; class PCB_BASE_FRAME; -#define KICAD_DEFAULT_3D_DRAWFRAME_STYLE wxDEFAULT_FRAME_STYLE | wxWANTS_CHARS -#define LIB3D_PATH wxT( "packages3d" ) +#define KICAD_DEFAULT_3D_DRAWFRAME_STYLE (wxDEFAULT_FRAME_STYLE | wxWANTS_CHARS) +#define LIB3D_PATH wxT( "packages3d" ) -class EDA_3D_FRAME : public EDA_BASE_FRAME + +class EDA_3D_FRAME : public KIWAY_PLAYER { private: EDA_3D_CANVAS* m_canvas; bool m_reloadRequest; wxString m_defaultFileName; /// Filename to propose for screenshot + /// Tracks whether to use Orthographic or Perspective projection bool m_ortho; public: - EDA_3D_FRAME( PCB_BASE_FRAME* parent, const wxString& title, + EDA_3D_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent, const wxString& aTitle, long style = KICAD_DEFAULT_3D_DRAWFRAME_STYLE ); + ~EDA_3D_FRAME() { m_auimgr.UnInit(); @@ -118,8 +123,9 @@ private: // to the current display options void ReCreateMainToolbar(); void SetToolbars(); - void GetSettings(); - void SaveSettings(); + + void LoadSettings( wxConfigBase* aCfg ); // overload virtual + void SaveSettings( wxConfigBase* aCfg ); // overload virtual // Other functions void OnLeftClick( wxDC* DC, const wxPoint& MousePos ); diff --git a/CMakeLists.txt b/CMakeLists.txt index 012a06fff4..c5461823e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,7 +24,7 @@ set( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules ) # option( USE_KIWAY_DLLS - "Build the major modules as KIFACE DLLs or DSOs, will soon be the norm." OFF ) + "Build the major modules as KIFACE DLLs or DSOs, will soon be the norm." ON ) # The desire is to migrate designs *away from* case independence, and to create designs which use # literally (case specific) interpreted component names. But for backwards compatibility, @@ -110,6 +110,12 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) OUTPUT_VARIABLE GCC_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE ) + if( CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) + set( TO_LINKER -XLinker ) + else() + set( TO_LINKER -Wl ) + endif() + # Establish -Wall early, so specialized relaxations of this may come # subsequently on the command line, such as in pcbnew/github/CMakeLists.txt set( CMAKE_C_FLAGS "-Wall ${CMAKE_C_FLAGS}" ) @@ -177,12 +183,6 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PIC_FLAG}" ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PIC_FLAG}" ) - if( CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) - set( TO_LINKER -XLinker ) - else() - set( TO_LINKER -Wl ) - endif() - # Thou shalt not link vaporware and tell us it's a valid DSO: set( CMAKE_SHARED_LINKER_FLAGS "${TO_LINKER},--no-undefined" ) set( CMAKE_MODULE_LINKER_FLAGS "${TO_LINKER},--no-undefined" ) @@ -206,11 +206,11 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) if( NOT CMAKE_CXX_COMPILER ) EXEC_PROGRAM( wx-config ARGS --cc OUTPUT_VARIABLE CMAKE_C_COMPILER ) - endif( NOT CMAKE_CXX_COMPILER ) + endif() if( NOT CMAKE_CXX_COMPILER ) EXEC_PROGRAM( wx-config ARGS --cxx OUTPUT_VARIABLE CMAKE_CXX_COMPILER ) - endif( NOT CMAKE_CXX_COMPILER ) + endif() endif() @@ -326,7 +326,7 @@ include( ExternalProject ) include( CheckFindPackageResult ) # Turn on wxWidgets compatibility mode for some classes -add_definitions(-DWX_COMPATIBILITY) +add_definitions( -DWX_COMPATIBILITY ) ####################### # Find OpenGL library # @@ -334,6 +334,11 @@ add_definitions(-DWX_COMPATIBILITY) find_package( OpenGL QUIET ) check_find_package_result( OPENGL_FOUND "OpenGL" ) +# Dick 5-Feb-2014: +# Marco: This is broken. You cannot use both ExternalProject_Add() add and find_package() +# in the same CMake tree and have them both reference the same package: +# http://stackoverflow.com/questions/6351609/cmake-linking-to-library-downloaded-from-externalproject-add +# https://www.mail-archive.com/cmake@cmake.org/msg47501.html if( KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC ) #set(CMAKE_FIND_LIBRARY_SUFFIXES ".a;.so;.dylib;.dll") @@ -351,9 +356,16 @@ if( KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC ) # TODO - Library packaging/relocation endif() - add_custom_target( lib-dependencies - DEPENDS boost cairo glew libpng pixman pkgconfig - ) + if( MINGW ) + include( download_bzip2 ) + add_custom_target( lib-dependencies + DEPENDS boost cairo glew libpng pixman pkgconfig bzip2 + ) + else() + add_custom_target( lib-dependencies + DEPENDS boost cairo glew libpng pixman pkgconfig + ) + endif() include( download_libpng ) @@ -385,14 +397,18 @@ endif( KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC) ##################### # Find GLEW library # ##################### -find_package(GLEW) -check_find_package_result(GLEW_FOUND "GLEW") +if( NOT GLEW_FOUND ) + find_package( GLEW ) + check_find_package_result( GLEW_FOUND "GLEW" ) +endif() ###################### # Find Cairo library # ###################### -find_package(Cairo 1.8.1 QUIET) -check_find_package_result(CAIRO_FOUND "Cairo") +if( NOT CAIRO_FOUND ) + find_package( Cairo 1.8.1 QUIET ) + check_find_package_result( CAIRO_FOUND "Cairo" ) +endif() # Download boost and possibly build parts of it ################################################# @@ -428,8 +444,8 @@ else() endif() if( NOT (KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC) ) -check_find_package_result( wxWidgets_FOUND "wxWidgets" ) -endif( NOT (KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC) ) + check_find_package_result( wxWidgets_FOUND "wxWidgets" ) +endif() # Include wxWidgets macros. include( ${wxWidgets_USE_FILE} ) diff --git a/CMakeModules/download_boost.cmake b/CMakeModules/download_boost.cmake index 9230b334e2..e929a2aae5 100644 --- a/CMakeModules/download_boost.cmake +++ b/CMakeModules/download_boost.cmake @@ -59,7 +59,9 @@ set( BOOST_LIBS_BUILT ) #-------------------------------------------------------------------- -find_package( BZip2 REQUIRED ) +if( NOT BZIP2_FOUND ) + find_package( BZip2 REQUIRED ) +endif() string( REGEX REPLACE "\\." "_" BOOST_VERS "${BOOST_RELEASE}" ) set( PREFIX ${DOWNLOAD_DIR}/boost_${BOOST_VERS} ) @@ -99,7 +101,7 @@ else() endif() -if( MINGW ) +if( MINGW AND NOT CMAKE_HOST_UNIX ) # building for MINGW on windows not UNIX if( MSYS ) # The Boost system does not build properly on MSYS using bootstrap.sh. Running # bootstrap.bat with cmd.exe does. It's ugly but it works. At least for Boost @@ -113,14 +115,16 @@ if( MINGW ) set( b2_libs ${b2_libs} --with-${lib} ) endforeach() unset( BOOST_CFLAGS ) + else() string( REGEX REPLACE "\\;" "," libs_csv "${boost_libs_list}" ) #message( STATUS "libs_csv:${libs_csv}" ) set( bootstrap ./bootstrap.sh --with-libraries=${libs_csv} ) # pass to *both* C and C++ compilers - set( BOOST_CFLAGS "cflags=${PIC_FLAG}" ) - set( BOOST_INCLUDE "${BOOST_ROOT}/include" ) + set( BOOST_CFLAGS "cflags=${PIC_FLAG}" ) + set( BOOST_CXXFLAGS "cxxflags=${PIC_FLAG}" ) + set( BOOST_INCLUDE "${BOOST_ROOT}/include" ) unset( b2_libs ) endif() diff --git a/CMakeModules/download_cairo.cmake b/CMakeModules/download_cairo.cmake index 51d136750b..26ab53e3e9 100644 --- a/CMakeModules/download_cairo.cmake +++ b/CMakeModules/download_cairo.cmake @@ -33,7 +33,9 @@ set( CAIRO_ROOT "${PROJECT_SOURCE_DIR}/cairo_root" ) #-------------------------------------------------------------------- -find_package( BZip2 REQUIRED ) +if( NOT BZIP2_FOUND ) + find_package( BZip2 REQUIRED ) +endif() set( PREFIX ${DOWNLOAD_DIR}/cairo ) @@ -42,7 +44,7 @@ if ( KICAD_BUILD_STATIC ) endif( KICAD_BUILD_STATIC ) -if (APPLE) +if (APPLE) set( CAIRO_CFLAGS "CFLAGS=" ) set( CAIRO_LDFLAGS "LDFLAGS=-framework CoreServices -framework Cocoa" ) @@ -94,8 +96,13 @@ ExternalProject_Add( cairo #BINARY_DIR "${PREFIX}" - BUILD_COMMAND $(MAKE) + BUILD_COMMAND $(MAKE) INSTALL_DIR "${CAIRO_ROOT}" INSTALL_COMMAND $(MAKE) install ) + +# match these with whatever FindCairo.cmake sets +set( CAIRO_FOUND true ) +set( CAIRO_INCLUDE_DIR ${PREFIX}/include ) +set( CAIRO_CAIRO_LIBRARIES ${PREFIX}/lib ) diff --git a/CMakeModules/download_glew.cmake b/CMakeModules/download_glew.cmake index 74e28a98f3..1c7d690809 100644 --- a/CMakeModules/download_glew.cmake +++ b/CMakeModules/download_glew.cmake @@ -33,11 +33,13 @@ set( GLEW_ROOT "${PROJECT_SOURCE_DIR}/glew_root" ) #-------------------------------------------------------------------- -find_package( BZip2 REQUIRED ) +if( NOT BZIP2_FOUND ) + find_package( BZip2 REQUIRED ) +endif() set( PREFIX ${DOWNLOAD_DIR}/glew ) -if (APPLE) +if (APPLE) if( CMAKE_OSX_ARCHITECTURES ) set( GLEW_CFLAGS "CFLAGS.EXTRA=-arch ${CMAKE_OSX_ARCHITECTURES} -mmacosx-version-min=10.5" ) set( GLEW_LDFLAGS "LDFLAGS.EXTRA=-arch ${CMAKE_OSX_ARCHITECTURES} -mmacosx-version-min=10.5" ) diff --git a/CMakeModules/download_pixman.cmake b/CMakeModules/download_pixman.cmake index a925d1bf1a..cba41a13ca 100644 --- a/CMakeModules/download_pixman.cmake +++ b/CMakeModules/download_pixman.cmake @@ -33,13 +33,15 @@ set( PIXMAN_ROOT "${PROJECT_SOURCE_DIR}/pixman_root" ) #-------------------------------------------------------------------- -find_package( BZip2 REQUIRED ) +if( NOT BZIP2_FOUND ) + find_package( BZip2 REQUIRED ) +endif() set( PREFIX ${DOWNLOAD_DIR}/pixman ) set(PIXMAN_CPPFLAGS "CFLAGS=") -if (APPLE) +if (APPLE) if( CMAKE_OSX_ARCHITECTURES ) set(PIXMAN_CPPFLAGS "${PIXMAN_CPPFLAGS} -arch ${CMAKE_OSX_ARCHITECTURES} -fno-common -mmacosx-version-min=10.5") else() diff --git a/CMakeModules/download_pkgconfig.cmake b/CMakeModules/download_pkgconfig.cmake index 1960af317a..a0f6c530c1 100644 --- a/CMakeModules/download_pkgconfig.cmake +++ b/CMakeModules/download_pkgconfig.cmake @@ -33,7 +33,9 @@ set( PKGCONFIG_ROOT "${PROJECT_SOURCE_DIR}/pkgconfig_root" ) #-------------------------------------------------------------------- -find_package( BZip2 REQUIRED ) +if( NOT BZIP2_FOUND ) + find_package( BZip2 REQUIRED ) +endif() set( PREFIX ${DOWNLOAD_DIR}/pkgconfig ) diff --git a/CMakeModules/download_wxwidgets.cmake b/CMakeModules/download_wxwidgets.cmake index 693d490df3..ed7ebe879c 100644 --- a/CMakeModules/download_wxwidgets.cmake +++ b/CMakeModules/download_wxwidgets.cmake @@ -33,11 +33,13 @@ set( LIBWX_ROOT "${PROJECT_SOURCE_DIR}/libwx_root" ) #-------------------------------------------------------------------- -find_package( BZip2 REQUIRED ) +if( NOT BZIP2_FOUND ) + find_package( BZip2 REQUIRED ) +endif() set( PREFIX ${DOWNLOAD_DIR}/libwx ) -if (APPLE) +if (APPLE) if( CMAKE_OSX_ARCHITECTURES ) STRING(REGEX REPLACE " -arch " "," LIBWX_ARCHITECTURES ${CMAKE_OSX_ARCHITECTURES}) SET( LIBWX_ARCHITECTURES --enable-universal_binary=${LIBWX_ARCHITECTURES}) @@ -80,7 +82,7 @@ ExternalProject_Add( libwx #SET directories set(wxWidgets_BIN_DIR ${LIBWX_ROOT}/bin) set(wxWidgets_CONFIG_EXECUTABLE ${LIBWX_ROOT}/bin/wx-config) -set(wxWidgets_INCLUDE_DIRS ${LIBWX_ROOT}/include) +set(wxWidgets_INCLUDE_DIRS ${LIBWX_ROOT}/include) set(wxWidgets_LIBRARY_DIRS ${LIBWX_ROOT}/lib) @@ -110,7 +112,7 @@ ExternalProject_Add_Step( libwx bzr_init_libwx ###### ExternalProject_Add_Step( libwx libwx_recursive_message - COMMAND cmake . + COMMAND cmake . COMMENT "*** RERUN CMAKE - wxWidgets built, now reissue a cmake to build Kicad" DEPENDEES install ) diff --git a/Documentation/KIWAY_Build_Symbols_Defined.txt b/Documentation/KIWAY_Build_Symbols_Defined.txt new file mode 100644 index 0000000000..f10dea9b1c --- /dev/null +++ b/Documentation/KIWAY_Build_Symbols_Defined.txt @@ -0,0 +1,29 @@ + +KIWAY Build Symbols, Definitions and Intentions + + +COMPILING_DLL: + + This is a signal to import_export.h, and when present, toggles the + interpretation of the #defines in that file. Its purpose should not be + extended beyond this. + + +USE_KIWAY_DLLS: + + Comes from CMake as a user configuration variable, settable in the Cmake + user interface. It decides if KiCad will be built with the *.kiface program + modules. + + +BUILD_KIWAY_DLL: + + Comes from CMake, but at the 2nd tier, not the top tier. By 2nd tier, + something like pcbnew/CMakeLists.txt, not /CMakeLists.txt is meant. It is + not a user configuration variable. Instead, the 2nd tier CMakeLists.txt file + looks at the top level USE_KIWAY_DLLS and decides how the object files under + the 2nd tier's control will be built. If it decides it wants to march in + lockstep with USE_KIWAY_DLLS, then this local CMakeLists.txt file may pass a + defined BUILD_KIWAY_DLL (singular) on the compiler command line to the + pertinent set of compilation steps under its control. + diff --git a/TODO.txt b/TODO.txt index 0eeec9f0d9..690c07e01c 100644 --- a/TODO.txt +++ b/TODO.txt @@ -62,7 +62,11 @@ PCBNew Dick's Final TODO List: ====================== -*) Get licensing cleaned up. -*) DLL-ization of pcbnew & eeschema - http://www.eevblog.com/forum/open-source-kicad-geda/seriously-irritated-with-the-library-editor!/ - https://blueprints.launchpad.net/kicad/+spec/modular-kicad +*) Get licensing cleaned up. + +*) DLL-ization of pcbnew & eeschema + http://www.eevblog.com/forum/open-source-kicad-geda/seriously-irritated-with-the-library-editor!/ + https://blueprints.launchpad.net/kicad/+spec/modular-kicad + + Issues as a result of minimal testing: + Kicad project manager will crash when requesting help file. diff --git a/bitmap2component/CMakeLists.txt b/bitmap2component/CMakeLists.txt index 2c5c85eed9..0bd0921309 100644 --- a/bitmap2component/CMakeLists.txt +++ b/bitmap2component/CMakeLists.txt @@ -1,5 +1,5 @@ -include_directories(BEFORE ${INC_BEFORE}) +include_directories( BEFORE ${INC_BEFORE} ) include_directories( ../potrace ../polygon/kbool/include @@ -7,48 +7,63 @@ include_directories( ${INC_AFTER} ) -set(BITMAP2COMPONENT_SRCS +set( BITMAP2COMPONENT_SRCS + ../common/single_top.cpp bitmap2component.cpp bitmap2cmp_gui_base bitmap2cmp_gui ) -if(WIN32) - if(MINGW) - # BITMAP2COMPONENT_RESOURCES variable is set by the macro. - mingw_resource_compiler(bitmap2component) - else(MINGW) - set(BITMAP2COMPONENT_RESOURCES bitmap2component.rc) - endif(MINGW) -endif(WIN32) +set_source_files_properties( ../common/single_top.cpp PROPERTIES + COMPILE_DEFINITIONS "TOP_FRAME=0" + ) +set_source_files_properties( bitmap2cmp_gui.cpp PROPERTIES + COMPILE_DEFINITIONS "COMPILING_DLL" + ) + +add_executable( bitmap2component WIN32 MACOSX_BUNDLE + ${BITMAP2COMPONENT_SRCS} + ${BITMAP2COMPONENT_RESOURCES} + ) + +target_link_libraries( bitmap2component + common + polygon + bitmaps + ${wxWidgets_LIBRARIES} + potrace + ) + +install( TARGETS bitmap2component + DESTINATION ${KICAD_BIN} + COMPONENT binary + ) -if(APPLE) - set(BITMAP2COMPONENT_RESOURCES bitmap2component.icns) - set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/bitmap2component.icns" - PROPERTIES MACOSX_PACKAGE_LOCATION Resources) - set(MACOSX_BUNDLE_ICON_FILE bitmap2component.icns) - set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.bitmap2component) -endif(APPLE) +if( false ) # linker map with cross reference + set_target_properties( bitmap2component PROPERTIES + LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=bitmap2component.map" + ) +endif() - -add_executable(bitmap2component WIN32 MACOSX_BUNDLE - ${BITMAP2COMPONENT_SRCS} - ${BITMAP2COMPONENT_RESOURCES}) +if( MINGW ) + # BITMAP2COMPONENT_RESOURCES variable is set by the macro. + mingw_resource_compiler( bitmap2component ) +else() + set( BITMAP2COMPONENT_RESOURCES bitmap2component.rc ) +endif() -if(APPLE) - set_target_properties(bitmap2component PROPERTIES MACOSX_BUNDLE_INFO_PLIST - ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist) -endif(APPLE) - -target_link_libraries( bitmap2component common polygon bitmaps - ${wxWidgets_LIBRARIES} - potrace - ) - -install(TARGETS bitmap2component - DESTINATION ${KICAD_BIN} - COMPONENT binary) +if( APPLE ) + set( BITMAP2COMPONENT_RESOURCES bitmap2component.icns ) + set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/bitmap2component.icns" PROPERTIES + MACOSX_PACKAGE_LOCATION Resources + ) + set( MACOSX_BUNDLE_ICON_FILE bitmap2component.icns ) + set( MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.bitmap2component ) + set_target_properties( bitmap2component PROPERTIES + MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist + ) +endif() diff --git a/bitmap2component/bitmap2cmp_gui.cpp b/bitmap2component/bitmap2cmp_gui.cpp index d83a0fce8c..f43d5c751c 100644 --- a/bitmap2component/bitmap2cmp_gui.cpp +++ b/bitmap2component/bitmap2cmp_gui.cpp @@ -21,8 +21,11 @@ * or you may write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ + #include -#include +#include + +#include #include #include #include @@ -39,47 +42,53 @@ #include #include #include +#include +#include + +#define KEYWORD_FRAME_POSX wxT( "Bmconverter_Pos_x" ) +#define KEYWORD_FRAME_POSY wxT( "Bmconverter_Pos_y" ) +#define KEYWORD_FRAME_SIZEX wxT( "Bmconverter_Size_x" ) +#define KEYWORD_FRAME_SIZEY wxT( "Bmconverter_Size_y" ) +#define KEYWORD_LAST_INPUT_FILE wxT( "Last_input" ) +#define KEYWORD_LAST_OUTPUT_FILE wxT( "Last_output" ) +#define KEYWORD_LAST_FORMAT wxT( "Last_format" ) +#define KEYWORD_BINARY_THRESHOLD wxT( "Threshold" ) +#define KEYWORD_BW_NEGATIVE wxT( "Negative_choice" ) -#define KEYWORD_FRAME_POSX wxT( "Bmconverter_Pos_x" ) -#define KEYWORD_FRAME_POSY wxT( "Bmconverter_Pos_y" ) -#define KEYWORD_FRAME_SIZEX wxT( "Bmconverter_Size_x" ) -#define KEYWORD_FRAME_SIZEY wxT( "Bmconverter_Size_y" ) -#define KEYWORD_LAST_INPUT_FILE wxT( "Last_input" ) -#define KEYWORD_LAST_OUTPUT_FILE wxT( "Last_output" ) -#define KEYWORD_LAST_FORMAT wxT( "Last_format" ) -#define KEYWORD_BINARY_THRESHOLD wxT( "Threshold" ) -#define KEYWORD_BW_NEGATIVE wxT( "Negative_choice" ) extern int bitmap2component( potrace_bitmap_t* aPotrace_bitmap, FILE* aOutfile, int aFormat ); -/* Class BM2CMP_FRAME_BASE -This is the main frame for this application -*/ +/** + * Class BM2CMP_FRAME_BASE + * is the main frame for this application + */ class BM2CMP_FRAME : public BM2CMP_FRAME_BASE { private: - wxImage m_Pict_Image; - wxBitmap m_Pict_Bitmap; - wxImage m_Greyscale_Image; - wxBitmap m_Greyscale_Bitmap; - wxImage m_NB_Image; - wxBitmap m_BN_Bitmap; - wxString m_BitmapFileName; - wxString m_ConvertedFileName; - wxSize m_FrameSize; - wxPoint m_FramePos; - wxConfig * m_Config; + wxImage m_Pict_Image; + wxBitmap m_Pict_Bitmap; + wxImage m_Greyscale_Image; + wxBitmap m_Greyscale_Bitmap; + wxImage m_NB_Image; + wxBitmap m_BN_Bitmap; + wxString m_BitmapFileName; + wxString m_ConvertedFileName; + wxSize m_FrameSize; + wxPoint m_FramePos; + wxConfig* m_Config; public: - BM2CMP_FRAME(); + BM2CMP_FRAME( KIWAY* aKiway, wxWindow* aParent ); ~BM2CMP_FRAME(); + // overload KIWAY_PLAYER virtual + bool OpenProjectFiles( const std::vector& aFilenames, int aCtl=0 ); + private: // Event handlers void OnPaint( wxPaintEvent& event ); void OnLoadFile( wxCommandEvent& event ); - bool LoadFile( wxString& aFullFileName ); void OnExport( wxCommandEvent& event ); /** @@ -114,8 +123,11 @@ private: }; -BM2CMP_FRAME::BM2CMP_FRAME() : BM2CMP_FRAME_BASE( NULL ) +BM2CMP_FRAME::BM2CMP_FRAME( KIWAY* aKiway, wxWindow* aParent ) : + BM2CMP_FRAME_BASE( aParent ) { + SetKiway( this, aKiway ); + int tmp; m_Config = new wxConfig(); m_Config->Read( KEYWORD_FRAME_POSX, & m_FramePos.x, -1 ); @@ -124,15 +136,16 @@ BM2CMP_FRAME::BM2CMP_FRAME() : BM2CMP_FRAME_BASE( NULL ) m_Config->Read( KEYWORD_FRAME_SIZEY, & m_FrameSize.y, -1 ); m_Config->Read( KEYWORD_LAST_INPUT_FILE, &m_BitmapFileName ); m_Config->Read( KEYWORD_LAST_OUTPUT_FILE, &m_ConvertedFileName ); + if( m_Config->Read( KEYWORD_BINARY_THRESHOLD, &tmp ) ) m_sliderThreshold->SetValue( tmp ); + if( m_Config->Read( KEYWORD_BW_NEGATIVE, &tmp ) ) m_rbOptions->SetSelection( tmp ? 1 : 0 ); m_Config->Read( KEYWORD_LAST_FORMAT, &tmp ); m_radioBoxFormat->SetSelection( tmp ); - // Give an icon wxIcon icon; icon.CopyFromBitmap( KiBitmap( icon_bitmap2component_xpm ) ); @@ -144,14 +157,14 @@ BM2CMP_FRAME::BM2CMP_FRAME() : BM2CMP_FRAME_BASE( NULL ) m_buttonExport->Enable( false ); - if ( m_FramePos == wxDefaultPosition ) + if( m_FramePos == wxDefaultPosition ) Centre(); } BM2CMP_FRAME::~BM2CMP_FRAME() { - if( ( m_Config == NULL ) || IsIconized() ) + if( !m_Config || IsIconized() ) return; m_FrameSize = GetSize(); @@ -207,23 +220,24 @@ void BM2CMP_FRAME::OnPaint( wxPaintEvent& event ) */ void BM2CMP_FRAME::OnLoadFile( wxCommandEvent& event ) { - wxFileName fn(m_BitmapFileName); - wxString path = fn.GetPath(); + wxFileName fn(m_BitmapFileName); + wxString path = fn.GetPath(); if( path.IsEmpty() || !wxDirExists(path) ) path = wxGetCwd(); - wxFileDialog FileDlg( this, _( "Choose Image" ), path, wxEmptyString, + wxFileDialog fileDlg( this, _( "Choose Image" ), path, wxEmptyString, _( "Image Files " ) + wxImage::GetImageExtWildcard(), wxFD_OPEN ); - int diag = FileDlg.ShowModal(); + + int diag = fileDlg.ShowModal(); if( diag != wxID_OK ) return; - wxString fullFilename = FileDlg.GetPath(); + wxString fullFilename = fileDlg.GetPath(); - if( ! LoadFile( fullFilename ) ) + if( !OpenProjectFiles( std::vector( 1, fullFilename ) ) ) return; m_buttonExport->Enable( true ); @@ -232,13 +246,22 @@ void BM2CMP_FRAME::OnLoadFile( wxCommandEvent& event ) } -bool BM2CMP_FRAME::LoadFile( wxString& aFullFileName ) +bool BM2CMP_FRAME::OpenProjectFiles( const std::vector& aFileSet, int aCtl ) { - m_BitmapFileName = aFullFileName; + // Prj().MaybeLoadProjectSettings(); + + m_BitmapFileName = aFileSet[0]; if( !m_Pict_Image.LoadFile( m_BitmapFileName ) ) { - wxMessageBox( _( "Couldn't load image from <%s>" ), m_BitmapFileName.c_str() ); + /* LoadFile has its own UI, no need for further failure notification here + wxString msg = wxString::Format( + _( "Could not load image '%s'" ), + GetChars( aFilename ) + ); + + wxMessageBox( msg ); + */ return false; } @@ -249,6 +272,7 @@ bool BM2CMP_FRAME::LoadFile( wxString& aFullFileName ) int nb = m_Pict_Bitmap.GetDepth(); wxString msg; + msg.Printf( wxT( "%d" ), w ); m_SizeXValue->SetLabel(msg); msg.Printf( wxT( "%d" ), h ); @@ -262,12 +286,14 @@ bool BM2CMP_FRAME::LoadFile( wxString& aFullFileName ) m_Greyscale_Image.Destroy(); m_Greyscale_Image = m_Pict_Image.ConvertToGreyscale( ); + if( m_rbOptions->GetSelection() > 0 ) NegateGreyscaleImage( ); + m_Greyscale_Bitmap = wxBitmap( m_Greyscale_Image ); m_NB_Image = m_Greyscale_Image; - Binarize( (double)m_sliderThreshold->GetValue()/m_sliderThreshold->GetMax() ); + Binarize( (double) m_sliderThreshold->GetValue()/m_sliderThreshold->GetMax() ); return true; } @@ -297,9 +323,10 @@ void BM2CMP_FRAME::Binarize( double aThreshold ) m_BN_Bitmap = wxBitmap( m_NB_Image ); } + void BM2CMP_FRAME::NegateGreyscaleImage( ) { - unsigned char pix; + unsigned char pix; int h = m_Greyscale_Image.GetHeight(); int w = m_Greyscale_Image.GetWidth(); @@ -321,58 +348,61 @@ void BM2CMP_FRAME::OnOptionsSelection( wxCommandEvent& event ) Refresh(); } + void BM2CMP_FRAME::OnThresholdChange( wxScrollEvent& event ) { Binarize( (double)m_sliderThreshold->GetValue()/m_sliderThreshold->GetMax() ); Refresh(); } + void BM2CMP_FRAME::OnExport( wxCommandEvent& event ) { int sel = m_radioBoxFormat->GetSelection(); switch( sel ) { - case 0: - OnExportEeschema(); - break; + case 0: + OnExportEeschema(); + break; - case 1: - OnExportPcbnew( true ); - break; + case 1: + OnExportPcbnew( true ); + break; - case 2: - OnExportPcbnew( false ); - break; + case 2: + OnExportPcbnew( false ); + break; - case 3: - OnExportPostScript(); - break; + case 3: + OnExportPostScript(); + break; - case 4: - OnExportLogo(); - break; + case 4: + OnExportLogo(); + break; } } + void BM2CMP_FRAME::OnExportLogo() { - wxFileName fn(m_ConvertedFileName); - wxString path = fn.GetPath(); + wxFileName fn(m_ConvertedFileName); + wxString path = fn.GetPath(); if( path.IsEmpty() || !wxDirExists(path) ) path = ::wxGetCwd(); wxString msg = _( "Logo file (*.kicad_wks)|*.kicad_wks" ); - wxFileDialog FileDlg( this, _( "Create a logo file" ), path, wxEmptyString, + wxFileDialog fileDlg( this, _( "Create a logo file" ), path, wxEmptyString, msg, wxFD_SAVE | wxFD_OVERWRITE_PROMPT ); - int diag = FileDlg.ShowModal(); + int diag = fileDlg.ShowModal(); if( diag != wxID_OK ) return; - m_ConvertedFileName = FileDlg.GetPath(); + m_ConvertedFileName = fileDlg.GetPath(); FILE* outfile; outfile = wxFopen( m_ConvertedFileName, wxT( "w" ) ); @@ -389,24 +419,26 @@ void BM2CMP_FRAME::OnExportLogo() fclose( outfile ); } + void BM2CMP_FRAME::OnExportPostScript() { - wxFileName fn(m_ConvertedFileName); - wxString path = fn.GetPath(); + wxFileName fn( m_ConvertedFileName ); + wxString path = fn.GetPath(); - if( path.IsEmpty() || !wxDirExists(path) ) + if( path.IsEmpty() || !wxDirExists( path ) ) path = ::wxGetCwd(); wxString msg = _( "Postscript file (*.ps)|*.ps" ); - wxFileDialog FileDlg( this, _( "Create a Postscript file" ), path, wxEmptyString, + wxFileDialog fileDlg( this, _( "Create a Postscript file" ), path, wxEmptyString, msg, wxFD_SAVE | wxFD_OVERWRITE_PROMPT ); - int diag = FileDlg.ShowModal(); + + int diag = fileDlg.ShowModal(); if( diag != wxID_OK ) return; - m_ConvertedFileName = FileDlg.GetPath(); + m_ConvertedFileName = fileDlg.GetPath(); FILE* outfile; outfile = wxFopen( m_ConvertedFileName, wxT( "w" ) ); @@ -423,27 +455,29 @@ void BM2CMP_FRAME::OnExportPostScript() fclose( outfile ); } + void BM2CMP_FRAME::OnExportEeschema() { - wxFileName fn(m_ConvertedFileName); - wxString path = fn.GetPath(); + wxFileName fn( m_ConvertedFileName ); + wxString path = fn.GetPath(); if( path.IsEmpty() || !wxDirExists(path) ) path = ::wxGetCwd(); wxString msg = _( "Schematic lib file (*.lib)|*.lib" ); - wxFileDialog FileDlg( this, _( "Create a lib file for Eeschema" ), path, wxEmptyString, + + wxFileDialog fileDlg( this, _( "Create a lib file for Eeschema" ), path, wxEmptyString, msg, wxFD_SAVE | wxFD_OVERWRITE_PROMPT ); - int diag = FileDlg.ShowModal(); + + int diag = fileDlg.ShowModal(); if( diag != wxID_OK ) return; - m_ConvertedFileName = FileDlg.GetPath(); + m_ConvertedFileName = fileDlg.GetPath(); - FILE* outfile; - outfile = wxFopen( m_ConvertedFileName, wxT( "w" ) ); + FILE* outfile = wxFopen( m_ConvertedFileName, wxT( "w" ) ); if( outfile == NULL ) { @@ -460,29 +494,29 @@ void BM2CMP_FRAME::OnExportEeschema() void BM2CMP_FRAME::OnExportPcbnew( bool aLegacyFormat ) { - wxFileName fn(m_ConvertedFileName); - wxString path = fn.GetPath(); + wxFileName fn( m_ConvertedFileName ); + wxString path = fn.GetPath(); - if( path.IsEmpty() || !wxDirExists(path) ) + if( path.IsEmpty() || !wxDirExists( path ) ) path = ::wxGetCwd(); wxString msg = aLegacyFormat ? _( "Footprint file (*.emp)|*.emp" ) : _( "Footprint file (*.kicad_mod)|*.kicad_mod" ); - wxFileDialog FileDlg( this, _( "Create a footprint file for PcbNew" ), + + wxFileDialog fileDlg( this, _( "Create a footprint file for PcbNew" ), path, wxEmptyString, msg, wxFD_SAVE | wxFD_OVERWRITE_PROMPT ); - int diag = FileDlg.ShowModal(); + + int diag = fileDlg.ShowModal(); if( diag != wxID_OK ) return; - m_ConvertedFileName = FileDlg.GetPath(); + m_ConvertedFileName = fileDlg.GetPath(); - - FILE* outfile; - outfile = wxFopen( m_ConvertedFileName, wxT( "w" ) ); + FILE* outfile = wxFopen( m_ConvertedFileName, wxT( "w" ) ); if( outfile == NULL ) { @@ -496,6 +530,7 @@ void BM2CMP_FRAME::OnExportPcbnew( bool aLegacyFormat ) fclose( outfile ); } + void BM2CMP_FRAME::ExportFile( FILE* aOutfile, int aFormat ) { // Create a potrace bitmap @@ -525,29 +560,82 @@ void BM2CMP_FRAME::ExportFile( FILE* aOutfile, int aFormat ) } -// EDA_APP -IMPLEMENT_APP( EDA_APP ) +//---------------------------------------------------------------------- -///----------------------------------------------------------------------------- -// EDA_APP -// main program -//----------------------------------------------------------------------------- +namespace BMP2CMP { -bool EDA_APP::OnInit() +static struct IFACE : public KIFACE_I { - wxInitAllImageHandlers(); + bool OnKifaceStart( PGM_BASE* aProgram ); - InitEDA_Appl( wxT( "BMP2CMP" ) ); + wxWindow* CreateWindow( wxWindow* aParent, int aClassId, KIWAY* aKiway, int aCtlBits = 0 ) + { + switch( aClassId ) + { - wxFrame* frame = new BM2CMP_FRAME(); - SetTopWindow( frame ); - frame->Show( true ); + default: + { + KIWAY_PLAYER* frame = new BM2CMP_FRAME( aKiway, aParent ); + return frame; + } + } + } - return true; + /** + * Function IfaceOrAddress + * return a pointer to the requested object. The safest way to use this + * is to retrieve a pointer to a static instance of an interface, similar to + * how the KIFACE interface is exported. But if you know what you are doing + * use it to retrieve anything you want. + * + * @param aDataId identifies which object you want the address of. + * + * @return void* - and must be cast into the know type. + */ + void* IfaceOrAddress( int aDataId ) + { + return NULL; + } + + IFACE( const char* aDSOname, KIWAY::FACE_T aType ) : + KIFACE_I( aDSOname, aType ) + {} + +} kiface( "BMP2CMP", KIWAY::FACE_BMP2CMP ); + +} // namespace BMP2CMP + +using namespace BMP2CMP; + +static PGM_BASE* process; + +KIFACE_I& Kiface() +{ + return kiface; } -void EDA_APP::MacOpenFile( const wxString& aFileName ) +// KIFACE_GETTER's actual spelling is a substitution macro found in kiway.h. +// KIFACE_GETTER will not have name mangling due to declaration in kiway.h. +MY_API( KIFACE* ) KIFACE_GETTER( int* aKIFACEversion, int aKIWAYversion, PGM_BASE* aProgram ) { + process = (PGM_BASE*) aProgram; + return &kiface; } + + +#if defined(BUILD_KIWAY_DLLS) +PGM_BASE& Pgm() +{ + wxASSERT( process ); // KIFACE_GETTER has already been called. + return *process; +} +#endif + + +bool IFACE::OnKifaceStart( PGM_BASE* aProgram ) +{ + return start_common(); +} + diff --git a/bitmap2component/bitmap2cmp_gui_base.cpp b/bitmap2component/bitmap2cmp_gui_base.cpp index 92315a9545..ee7f225306 100644 --- a/bitmap2component/bitmap2cmp_gui_base.cpp +++ b/bitmap2component/bitmap2cmp_gui_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 8 2012) +// C++ code generated with wxFormBuilder (version Nov 5 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -9,7 +9,7 @@ /////////////////////////////////////////////////////////////////////////// -BM2CMP_FRAME_BASE::BM2CMP_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style ) +BM2CMP_FRAME_BASE::BM2CMP_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : KIWAY_PLAYER( parent, id, title, pos, size, style ) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); diff --git a/bitmap2component/bitmap2cmp_gui_base.fbp b/bitmap2component/bitmap2cmp_gui_base.fbp index d848aa0d8c..2944581ac6 100644 --- a/bitmap2component/bitmap2cmp_gui_base.fbp +++ b/bitmap2component/bitmap2cmp_gui_base.fbp @@ -20,8 +20,10 @@ . 1 + 1 1 1 + UI 0 0 @@ -44,7 +46,7 @@ 527,470 wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER - + KIWAY_PLAYER; kiway_player.h Bitmap to Component Converter diff --git a/bitmap2component/bitmap2cmp_gui_base.h b/bitmap2component/bitmap2cmp_gui_base.h index 301a63398b..4ed079ce86 100644 --- a/bitmap2component/bitmap2cmp_gui_base.h +++ b/bitmap2component/bitmap2cmp_gui_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 8 2012) +// C++ code generated with wxFormBuilder (version Nov 5 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -11,6 +11,9 @@ #include #include #include +class KIWAY_PLAYER; + +#include "kiway_player.h" #include #include #include @@ -37,7 +40,7 @@ /////////////////////////////////////////////////////////////////////////////// /// Class BM2CMP_FRAME_BASE /////////////////////////////////////////////////////////////////////////////// -class BM2CMP_FRAME_BASE : public wxFrame +class BM2CMP_FRAME_BASE : public KIWAY_PLAYER { private: diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index e69e9ecae7..8a79b34a16 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -62,6 +62,48 @@ if( WIN32 AND MSYS ) add_definitions( -DGLEW_STATIC ) endif() + +# A shared library subsetted from common which restricts what can go into +# a single_top link image. By not linking to common, we control what does +# statically go into single_top link images. My current thinking is that only +# wxWidgets should be a shared link from single top, everything else should be +# statically bound into it. Otherwise you will have DSO loading problems. After it +# sets the LIB PATHS however, we want the *.kiface modules to use shared linking. +add_library( singletop STATIC EXCLUDE_FROM_ALL + confirm.cpp + eda_doc.cpp + kiway.cpp + kiway_holder.cpp + ) + + +# A shared library used by multiple *.kiface files and one or two program +# launchers. Object files can migrate into here over time, but only if they are +# surely needed and certainly used from more than one place without recompilation. +# Functions and data all need to use the #include and be declared +# as APIEXPORT +set( LIB_KICAD_SRCS + colors.cpp + dlist.cpp + string.cpp + ) + +if( future ) +add_library( lib_kicad SHARED + ) +target_link_libraries( lib_kicad + ${wxWidgets_LIBRARIES} + ) +set_target_properties( lib_kicad PROPERTIES + OUTPUT_NAME ki + ) +install( TARGETS lib_kicad + DESTINATION ${KICAD_BIN} + COMPONENT binary + ) +endif() + + set( COMMON_ABOUT_DLG_SRCS dialog_about/AboutDialog_main.cpp dialog_about/dialog_about.cpp @@ -89,11 +131,13 @@ set( COMMON_PAGE_LAYOUT_SRCS ) set( COMMON_SRCS + ${LIB_KICAD_SRCS} ${COMMON_ABOUT_DLG_SRCS} ${COMMON_PAGE_LAYOUT_SRCS} base_struct.cpp basicframe.cpp bezier_curves.cpp + bin_mod.cpp bitmap.cpp block_commande.cpp build_version.cpp @@ -103,6 +147,7 @@ set( COMMON_SRCS class_marker_base.cpp class_plotter.cpp class_undoredo_container.cpp + colors.cpp common.cpp common_plot_functions.cpp common_plotHPGL_functions.cpp @@ -111,13 +156,13 @@ set( COMMON_SRCS common_plotGERBER_functions.cpp common_plotDXF_functions.cpp common_plotSVG_functions.cpp + config_params.cpp confirm.cpp copy_to_clipboard.cpp dialog_shim.cpp displlst.cpp - dlist.cpp - drawframe.cpp - drawpanel.cpp + draw_frame.cpp + draw_panel.cpp drawtxt.cpp dsnlexer.cpp eda_dde.cpp @@ -130,16 +175,19 @@ set( COMMON_SRCS hotkeys_basic.cpp hotkey_grid_table.cpp html_messagebox.cpp + kiface_i.cpp kiway.cpp + kiway_holder.cpp msgpanel.cpp netlist_keywords.cpp newstroke_font.cpp - projet_config.cpp + project.cpp ptree.cpp reporter.cpp richio.cpp + search_stack.cpp selcolor.cpp - string.cpp + systemdirsappend.cpp trigo.cpp utf8.cpp wildcards_and_files_ext.cpp @@ -149,9 +197,11 @@ set( COMMON_SRCS zoom.cpp ) -# We will not want edaappl.cpp linked into the KIFACE, only into the KIWAY. if( TRUE OR NOT USE_KIWAY_DLLS ) - list( APPEND COMMON_SRCS edaappl.cpp ) +#if( NOT USE_KIWAY_DLLS ) + # We DO NOT want pgm_base.cpp linked into the KIFACE, only into the KIWAY. + # Check the map files to verify eda_pgm.o not being linked in. + list( APPEND COMMON_SRCS pgm_base.cpp ) endif() if( NOT HAVE_STRTOKR ) @@ -180,10 +230,9 @@ set( COMMON_SRCS geometry/shape_collisions.cpp geometry/shape_index.cpp ) - - add_library( common STATIC ${COMMON_SRCS} ) + set( PCB_COMMON_SRCS base_screen.cpp eda_text.cpp diff --git a/common/base_units.cpp b/common/base_units.cpp index 38a0279786..5b79ab5746 100644 --- a/common/base_units.cpp +++ b/common/base_units.cpp @@ -197,7 +197,7 @@ void StripTrailingZeros( wxString& aStringValue, unsigned aTrailingZeroAllowed ) * otherwise the actual value is rounded when read from dialog and converted * in internal units, and therefore modified. */ -wxString ReturnStringFromValue( EDA_UNITS_T aUnit, int aValue, bool aAddUnitSymbol ) +wxString StringFromValue( EDA_UNITS_T aUnit, int aValue, bool aAddUnitSymbol ) { double value_to_print = To_User_Unit( aUnit, aValue ); @@ -257,7 +257,7 @@ wxString ReturnStringFromValue( EDA_UNITS_T aUnit, int aValue, bool aAddUnitSymb void PutValueInLocalUnits( wxTextCtrl& aTextCtr, int aValue ) { - wxString msg = ReturnStringFromValue( g_UserUnit, aValue ); + wxString msg = StringFromValue( g_UserUnit, aValue ); aTextCtr.SetValue( msg ); } @@ -286,7 +286,7 @@ double From_User_Unit( EDA_UNITS_T aUnit, double aValue ) } -int ReturnValueFromString( EDA_UNITS_T aUnits, const wxString& aTextValue ) +int ValueFromString( EDA_UNITS_T aUnits, const wxString& aTextValue ) { double value; double dtmp = 0; @@ -348,21 +348,21 @@ int ReturnValueFromString( EDA_UNITS_T aUnits, const wxString& aTextValue ) } -int ReturnValueFromString( const wxString& aTextValue ) +int ValueFromString( const wxString& aTextValue ) { int value; - value = ReturnValueFromString( g_UserUnit, aTextValue); + value = ValueFromString( g_UserUnit, aTextValue); return value; } -int ReturnValueFromTextCtrl( const wxTextCtrl& aTextCtr ) +int ValueFromTextCtrl( const wxTextCtrl& aTextCtr ) { int value; wxString msg = aTextCtr.GetValue(); - value = ReturnValueFromString( g_UserUnit, msg ); + value = ValueFromString( g_UserUnit, msg ); return value; } diff --git a/common/basicframe.cpp b/common/basicframe.cpp index d1616dd722..3efb4af478 100644 --- a/common/basicframe.cpp +++ b/common/basicframe.cpp @@ -36,7 +36,8 @@ #include #include -#include +#include +#include #include #include #include @@ -61,11 +62,9 @@ static const wxChar entryPerspective[] = wxT( "Perspective" ); -EDA_BASE_FRAME::EDA_BASE_FRAME( wxWindow* aParent, - ID_DRAWFRAME_TYPE aFrameType, - const wxString& aTitle, - const wxPoint& aPos, const wxSize& aSize, - long aStyle, const wxString & aFrameName ) : +EDA_BASE_FRAME::EDA_BASE_FRAME( wxWindow* aParent, ID_DRAWFRAME_TYPE aFrameType, + const wxString& aTitle, const wxPoint& aPos, const wxSize& aSize, + long aStyle, const wxString& aFrameName ) : wxFrame( aParent, wxID_ANY, aTitle, aPos, aSize, aStyle, aFrameName ) { wxSize minsize; @@ -108,7 +107,7 @@ EDA_BASE_FRAME::EDA_BASE_FRAME( wxWindow* aParent, void EDA_BASE_FRAME::windowClosing( wxCloseEvent& event ) { - SaveSettings(); // virtual, wxFrame specific + SaveSettings( config() ); // virtual, wxFrame specific event.Skip(); // we did not "handle" the event, only eavesdropped on it. } @@ -116,9 +115,6 @@ void EDA_BASE_FRAME::windowClosing( wxCloseEvent& event ) EDA_BASE_FRAME::~EDA_BASE_FRAME() { - if( wxGetApp().GetHtmlHelpController() ) - wxGetApp().SetHtmlHelpController( NULL ); - delete m_autoSaveTimer; // This is needed for OSX: avoids further OnDraw processing after this @@ -174,54 +170,45 @@ void EDA_BASE_FRAME::SetLanguage( wxCommandEvent& event ) { int id = event.GetId(); - wxGetApp().SetLanguageIdentifier( id ); - wxGetApp().SetLanguage(); + Pgm().SetLanguageIdentifier( id ); + Pgm().SetLanguage(); ReCreateMenuBar(); GetMenuBar()->Refresh(); } -void EDA_BASE_FRAME::LoadSettings() +void EDA_BASE_FRAME::LoadSettings( wxConfigBase* aCfg ) { - wxString text; - int Ypos_min; - wxConfig* config; - - config = wxGetApp().GetSettings(); - int maximized = 0; - if( config ) + wxString text = m_FrameName + wxT( "Pos_x" ); + aCfg->Read( text, &m_FramePos.x ); + + text = m_FrameName + wxT( "Pos_y" ); + aCfg->Read( text, &m_FramePos.y ); + + text = m_FrameName + wxT( "Size_x" ); + aCfg->Read( text, &m_FrameSize.x, 600 ); + + text = m_FrameName + wxT( "Size_y" ); + aCfg->Read( text, &m_FrameSize.y, 400 ); + + text = m_FrameName + wxT( "Maximized" ); + aCfg->Read( text, &maximized, 0 ); + + if( m_hasAutoSave ) { - text = m_FrameName + wxT( "Pos_x" ); - config->Read( text, &m_FramePos.x ); - - text = m_FrameName + wxT( "Pos_y" ); - config->Read( text, &m_FramePos.y ); - - text = m_FrameName + wxT( "Size_x" ); - config->Read( text, &m_FrameSize.x, 600 ); - - text = m_FrameName + wxT( "Size_y" ); - config->Read( text, &m_FrameSize.y, 400 ); - - text = m_FrameName + wxT( "Maximized" ); - config->Read( text, &maximized, 0 ); - - if( m_hasAutoSave ) - { - text = m_FrameName + entryAutoSaveInterval; - config->Read( text, &m_autoSaveInterval, DEFAULT_AUTO_SAVE_INTERVAL ); - } + text = m_FrameName + entryAutoSaveInterval; + aCfg->Read( text, &m_autoSaveInterval, DEFAULT_AUTO_SAVE_INTERVAL ); } // Ensure Window title bar is visible #if defined( __WXMAC__ ) // for macOSX, the window must be below system (macOSX) toolbar -// Ypos_min = GetMBarHeight(); seems no more exist in new API (subject to change) - Ypos_min = 20; + // Ypos_min = GetMBarHeight(); seems no more exist in new API (subject to change) + int Ypos_min = 20; #else - Ypos_min = 0; + int Ypos_min = 0; #endif if( m_FramePos.y < Ypos_min ) m_FramePos.y = Ypos_min; @@ -229,44 +216,39 @@ void EDA_BASE_FRAME::LoadSettings() if( maximized ) Maximize(); - // Once this is fully implemented, wxAuiManager will be used to maintain the persistance of - // the main frame and all it's managed windows and all of the legacy frame persistence - // position code can be removed. - if( config ) - config->Read( m_FrameName + entryPerspective, &m_perspective ); + aCfg->Read( m_FrameName + entryPerspective, &m_perspective ); } -void EDA_BASE_FRAME::SaveSettings() +void EDA_BASE_FRAME::SaveSettings( wxConfigBase* aCfg ) { - wxString text; - wxConfig* config = wxGetApp().GetSettings(); + wxString text; - if( !config || IsIconized() ) + if( IsIconized() ) return; m_FrameSize = GetSize(); m_FramePos = GetPosition(); text = m_FrameName + wxT( "Pos_x" ); - config->Write( text, (long) m_FramePos.x ); + aCfg->Write( text, (long) m_FramePos.x ); text = m_FrameName + wxT( "Pos_y" ); - config->Write( text, (long) m_FramePos.y ); + aCfg->Write( text, (long) m_FramePos.y ); text = m_FrameName + wxT( "Size_x" ); - config->Write( text, (long) m_FrameSize.x ); + aCfg->Write( text, (long) m_FrameSize.x ); text = m_FrameName + wxT( "Size_y" ); - config->Write( text, (long) m_FrameSize.y ); + aCfg->Write( text, (long) m_FrameSize.y ); text = m_FrameName + wxT( "Maximized" ); - config->Write( text, IsMaximized() ); + aCfg->Write( text, IsMaximized() ); if( m_hasAutoSave ) { text = m_FrameName + entryAutoSaveInterval; - config->Write( text, m_autoSaveInterval ); + aCfg->Write( text, m_autoSaveInterval ); } // Once this is fully implemented, wxAuiManager will be used to maintain @@ -276,8 +258,16 @@ void EDA_BASE_FRAME::SaveSettings() // printf( "perspective(%s): %s\n", // TO_UTF8( m_FrameName + entryPerspective ), TO_UTF8( perspective ) ); + aCfg->Write( m_FrameName + entryPerspective, perspective ); +} - config->Write( m_FrameName + entryPerspective, perspective ); + +wxConfigBase* EDA_BASE_FRAME::config() +{ + // KICAD_MANAGER_FRAME overrides this + wxConfigBase* ret = Kiface().KifaceSettings(); + wxASSERT( ret ); + return ret; } @@ -288,12 +278,12 @@ void EDA_BASE_FRAME::PrintMsg( const wxString& text ) void EDA_BASE_FRAME::UpdateFileHistory( const wxString& FullFileName, - wxFileHistory * aFileHistory ) + wxFileHistory* aFileHistory ) { wxFileHistory* fileHistory = aFileHistory; - if( fileHistory == NULL ) - fileHistory = & wxGetApp().GetFileHistory(); + if( !fileHistory ) + fileHistory = &Kiface().GetFileHistory(); fileHistory->AddFileToHistory( FullFileName ); } @@ -302,33 +292,36 @@ void EDA_BASE_FRAME::UpdateFileHistory( const wxString& FullFileName, wxString EDA_BASE_FRAME::GetFileFromHistory( int cmdId, const wxString& type, wxFileHistory* aFileHistory ) { - wxString fn, msg; - size_t i; wxFileHistory* fileHistory = aFileHistory; - if( fileHistory == NULL ) - fileHistory = & wxGetApp().GetFileHistory(); + if( !fileHistory ) + fileHistory = &Kiface().GetFileHistory(); int baseId = fileHistory->GetBaseId(); - wxASSERT( cmdId >= baseId && cmdId < baseId + ( int )fileHistory->GetCount() ); + wxASSERT( cmdId >= baseId && cmdId < baseId + (int) fileHistory->GetCount() ); - i = ( size_t )( cmdId - baseId ); + unsigned i = cmdId - baseId; if( i < fileHistory->GetCount() ) { - fn = fileHistory->GetHistoryFile( i ); + wxString fn = fileHistory->GetHistoryFile( i ); - if( !wxFileName::FileExists( fn ) ) + if( wxFileName::FileExists( fn ) ) + return fn; + else { - msg.Printf( wxT( "file <%s> was not found." ), GetChars( fn ) ); + wxString msg = wxString::Format( + wxT( "file '%s' was not found." ), + GetChars( fn ) ); + wxMessageBox( msg ); + fileHistory->RemoveFileFromHistory( i ); - fn = wxEmptyString; } } - return fn; + return wxEmptyString; } @@ -339,28 +332,28 @@ void EDA_BASE_FRAME::GetKicadHelp( wxCommandEvent& event ) /* We have to get document for beginners, * or the the full specific doc * if event id is wxID_INDEX, we want the document for beginners. - * else the specific doc file (its name is in wxGetApp().GetHelpFileName()) + * else the specific doc file (its name is in Kiface().GetHelpFileName()) * The document for beginners is the same for all KiCad utilities */ if( event.GetId() == wxID_INDEX ) { - // Temporary change the help filename - wxString tmp = wxGetApp().GetHelpFileName(); + // Temporarily change the help filename + wxString tmp = Kiface().GetHelpFileName(); // Search for "getting_started_in_kicad.pdf" or "Getting_Started_in_KiCad.pdf" - wxGetApp().SetHelpFileName( wxT( "getting_started_in_kicad.pdf" ) ); - wxString helpFile = wxGetApp().GetHelpFile(); + Kiface().SetHelpFileName( wxT( "getting_started_in_kicad.pdf" ) ); + wxString helpFile = Kiface().GetHelpFile(); if( !helpFile ) { // Try to find "Getting_Started_in_KiCad.pdf" - wxGetApp().SetHelpFileName( wxT( "Getting_Started_in_KiCad.pdf" ) ); - helpFile = wxGetApp().GetHelpFile(); + Kiface().SetHelpFileName( wxT( "Getting_Started_in_KiCad.pdf" ) ); + helpFile = Kiface().GetHelpFile(); } if( !helpFile ) { msg.Printf( _( "Help file %s could not be found." ), - GetChars( wxGetApp().GetHelpFileName() ) ); + GetChars( Kiface().GetHelpFileName() ) ); wxMessageBox( msg ); } else @@ -368,36 +361,36 @@ void EDA_BASE_FRAME::GetKicadHelp( wxCommandEvent& event ) GetAssociatedDocument( this, helpFile ); } - wxGetApp().SetHelpFileName( tmp ); + Kiface().SetHelpFileName( tmp ); return; } #if defined ONLINE_HELP_FILES_FORMAT_IS_HTML - if( wxGetApp().GetHtmlHelpController() == NULL ) + if( Kiface().GetHtmlHelpController() == NULL ) { - wxGetApp().InitOnLineHelp(); + Kiface().InitOnLineHelp(); } - if( wxGetApp().GetHtmlHelpController() ) + if( Kiface().GetHtmlHelpController() ) { - wxGetApp().GetHtmlHelpController()->DisplayContents(); - wxGetApp().GetHtmlHelpController()->Display( wxGetApp().GetHelpFileName() ); + Kiface().GetHtmlHelpController()->DisplayContents(); + Kiface().GetHtmlHelpController()->Display( Kiface().GetHelpFileName() ); } else { - msg.Printf( _( "Help file %s could not be found." ), GetChars( wxGetApp().GetHelpFileName() ) ); + msg.Printf( _( "Help file %s could not be found." ), GetChars( Kiface().GetHelpFileName() ) ); wxMessageBox( msg ); } #elif defined ONLINE_HELP_FILES_FORMAT_IS_PDF - wxString helpFile = wxGetApp().GetHelpFile(); + wxString helpFile = Kiface().GetHelpFile(); if( !helpFile ) { msg.Printf( _( "Help file %s could not be found." ), - GetChars( wxGetApp().GetHelpFileName() ) ); + GetChars( Kiface().GetHelpFileName() ) ); wxMessageBox( msg ); } else @@ -413,8 +406,8 @@ void EDA_BASE_FRAME::GetKicadHelp( wxCommandEvent& event ) void EDA_BASE_FRAME::OnSelectPreferredEditor( wxCommandEvent& event ) { - wxFileName fn = wxGetApp().GetEditorName(); - wxString wildcard( wxT( "*" ) ); + wxFileName fn = Pgm().GetEditorName(); + wxString wildcard( wxT( "*" ) ); #ifdef __WINDOWS__ wildcard += wxT( ".exe" ); @@ -430,18 +423,16 @@ void EDA_BASE_FRAME::OnSelectPreferredEditor( wxCommandEvent& event ) if( dlg.ShowModal() == wxID_CANCEL ) return; - wxASSERT( wxGetApp().GetCommonSettings() ); + wxString editor = dlg.GetPath(); - wxConfig* cfg = wxGetApp().GetCommonSettings(); - wxGetApp().SetEditorName( dlg.GetPath() ); - cfg->Write( wxT( "Editor" ), wxGetApp().GetEditorName() ); + Pgm().SetEditorName( editor ); } void EDA_BASE_FRAME::GetKicadAbout( wxCommandEvent& event ) { bool ShowAboutDialog(wxWindow * parent); - ShowAboutDialog(this); + ShowAboutDialog( this ); } @@ -535,7 +526,7 @@ void EDA_BASE_FRAME::CopyVersionInfoToClipboard( wxCommandEvent& event ) wxString tmp; wxPlatformInfo info; - tmp = wxT( "Application: " ) + wxGetApp().GetTitle() + wxT( "\n" ); + tmp = wxT( "Application: " ) + Pgm().App().GetAppName() + wxT( "\n" ); tmp << wxT( "Version: " ) << GetBuildVersion() #ifdef DEBUG << wxT( " Debug" ) @@ -666,14 +657,14 @@ void EDA_BASE_FRAME::CheckForAutoSaveFile( const wxFileName& aFileName, if( !autoSaveFileName.FileExists() ) return; - wxString msg; + wxString msg = wxString::Format( _( + "Well this is potentially embarrassing! It appears that the last time " + "you were editing the file '%s' it was not saved properly. Do you wish to restore the last " + "edits you made?" ), + GetChars( aFileName.GetFullName() ) + ); - msg.Printf( _( "Well this is potentially embarrassing! It appears that the last time \ -you were editing the file <%s> it was not saved properly. Do you wish to restore the last \ -edits you made?" ), - GetChars( aFileName.GetFullName() ) ); - - int response = wxMessageBox( msg, wxGetApp().GetAppName(), wxYES_NO | wxICON_QUESTION, this ); + int response = wxMessageBox( msg, Pgm().App().GetAppName(), wxYES_NO | wxICON_QUESTION, this ); // Make a backup of the current file, delete the file, and rename the auto save file to // the file name. @@ -703,7 +694,7 @@ edits you made?" ), if( !wxRenameFile( autoSaveFileName.GetFullPath(), aFileName.GetFullPath() ) ) { wxMessageBox( _( "The auto save file could not be renamed to the board file name." ), - wxGetApp().GetAppName(), wxOK | wxICON_EXCLAMATION, this ); + Pgm().App().GetAppName(), wxOK | wxICON_EXCLAMATION, this ); } } else @@ -716,29 +707,21 @@ edits you made?" ), } } -/** - * Function SetModalMode - * Disable or enable all other windows, to emulate a dialog behavior - * Useful when the frame is used to show and selec items - * (see FOOTPRINT_VIEWER_FRAME and LIB_VIEW_FRAME) - * - * @param aModal = true to disable all other opened windows (i.e. - * this windows is in dialog mode - * = false to enable other windows - * This function is analog to MakeModal( aModal ), deprecated since wxWidgets 2.9.4 - */ + void EDA_BASE_FRAME::SetModalMode( bool aModal ) { // Disable all other windows #if wxCHECK_VERSION(2, 9, 4) - if ( IsTopLevel() ) + if( IsTopLevel() ) { wxWindowList::compatibility_iterator node = wxTopLevelWindows.GetFirst(); - while (node) + + while( node ) { - wxWindow *win = node->GetData(); - if (win != this) - win->Enable(!aModal); + wxWindow* win = node->GetData(); + + if( win != this ) + win->Enable( !aModal ); node = node->GetNext(); } diff --git a/common/bin_mod.cpp b/common/bin_mod.cpp new file mode 100644 index 0000000000..fec950e415 --- /dev/null +++ b/common/bin_mod.cpp @@ -0,0 +1,52 @@ + + +#include +#include +#include + + +BIN_MOD::BIN_MOD( const char* aName ) : + m_name( aName ), + m_config( 0 ) +{ +} + + +void BIN_MOD::Init() +{ + // do an OS specific wxConfig instantiation, using the bin_mod (EXE/DLL/DSO) name. + m_config = new wxConfig( wxString::FromUTF8( m_name ) ); + + m_history.Load( *m_config ); + + // Prepare On Line Help. Use only lower case for help file names, in order to + // avoid problems with upper/lower case file names under windows and unix. +#if defined ONLINE_HELP_FILES_FORMAT_IS_HTML + m_help_file = wxString::FromUTF8( m_name ) + wxT( ".html" ); +#elif defined ONLINE_HELP_FILES_FORMAT_IS_PDF + m_help_file = wxString::FromUTF8( m_name ) + wxT( ".pdf" ); +#else + #error Help files format not defined +#endif +} + + +void BIN_MOD::End() +{ + if( m_config ) + { + m_history.Save( *m_config ); + + // Deleting a wxConfigBase writes its contents to disk if changed. + // Might be NULL if called twice, in which case nothing happens. + delete m_config; + m_config = 0; + } +} + + +BIN_MOD::~BIN_MOD() +{ + End(); +} + diff --git a/common/block_commande.cpp b/common/block_commande.cpp index 19a7a0ccfa..dfc27995b3 100644 --- a/common/block_commande.cpp +++ b/common/block_commande.cpp @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include #include diff --git a/common/colors.cpp b/common/colors.cpp new file mode 100644 index 0000000000..ca12867b6e --- /dev/null +++ b/common/colors.cpp @@ -0,0 +1,156 @@ + +#include + + +/** + * The predefined colors used in KiCad. + * Please: if you change a value, remember these values are carefully chosen + * to have good results in Pcbnew, that uses the ORed value of basic colors + * when displaying superimposed objects + * This list must have exactly NBCOLORS items + */ +const StructColors g_ColorRefs[NBCOLORS] = +{ + { 0, 0, 0, BLACK, wxT( "Black" ), DARKDARKGRAY }, + { 72, 72, 72, DARKDARKGRAY, wxT( "Gray 1" ), DARKGRAY }, + { 132, 132, 132, DARKGRAY, wxT( "Gray 2" ), LIGHTGRAY }, + { 194, 194, 194, LIGHTGRAY, wxT( "Gray 3" ), WHITE }, + { 255, 255, 255, WHITE, wxT( "White" ), WHITE }, + { 194, 255, 255, LIGHTYELLOW, wxT( "L.Yellow" ), WHITE }, + { 72, 0, 0, DARKBLUE, wxT( "Blue 1" ), BLUE }, + { 0, 72, 0, DARKGREEN, wxT( "Green 1" ), GREEN }, + { 72, 72, 0, DARKCYAN, wxT( "Cyan 1" ), CYAN }, + { 0, 0, 72, DARKRED, wxT( "Red 1" ), RED }, + { 72, 0, 72, DARKMAGENTA, wxT( "Magenta 1" ), MAGENTA }, + { 0, 72, 72, DARKBROWN, wxT( "Brown 1" ), BROWN }, + { 132, 0, 0, BLUE, wxT( "Blue 2" ), LIGHTBLUE }, + { 0, 132, 0, GREEN, wxT( "Green 2" ), LIGHTGREEN }, + { 132, 132, 0, CYAN, wxT( "Cyan 2" ), LIGHTCYAN }, + { 0, 0, 132, RED, wxT( "Red 2" ), LIGHTRED }, + { 132, 0, 132, MAGENTA, wxT( "Magenta 2" ), LIGHTMAGENTA }, + { 0, 132, 132, BROWN, wxT( "Brown 2" ), YELLOW }, + { 194, 0, 0, LIGHTBLUE, wxT( "Blue 3" ), PUREBLUE, }, + { 0, 194, 0, LIGHTGREEN, wxT( "Green 3" ), PUREGREEN }, + { 194, 194, 0, LIGHTCYAN, wxT( "Cyan 3" ), PURECYAN }, + { 0, 0, 194, LIGHTRED, wxT( "Red 3" ), PURERED }, + { 194, 0, 194, LIGHTMAGENTA, wxT( "Magenta 3" ), PUREMAGENTA }, + { 0, 194, 194, YELLOW, wxT( "Yellow 3" ), PUREYELLOW }, + { 255, 0, 0, PUREBLUE, wxT( "Blue 4" ), WHITE }, + { 0, 255, 0, PUREGREEN, wxT( "Green 4" ), WHITE }, + { 255, 255, 0, PURECYAN, wxT( "Cyan 4" ), WHITE }, + { 0, 0, 255, PURERED, wxT( "Red 4" ), WHITE }, + { 255, 0, 255, PUREMAGENTA, wxT( "Magenta 4" ), WHITE }, + { 0, 255, 255, PUREYELLOW, wxT( "Yellow 4" ), WHITE }, +}; + + +EDA_COLOR_T ColorByName( const wxString& aName ) +{ + // look for a match in the palette itself + for( EDA_COLOR_T trying = BLACK; trying < NBCOLORS; trying = NextColor(trying) ) + { + if( 0 == aName.CmpNoCase( g_ColorRefs[trying].m_Name ) ) + return trying; + } + + // Not found, no idea... + return UNSPECIFIED_COLOR; +} + + +bool ColorIsLight( EDA_COLOR_T aColor ) +{ + const StructColors &c = g_ColorRefs[ColorGetBase( aColor )]; + int r = c.m_Red; + int g = c.m_Green; + int b = c.m_Blue; + return ((r * r) + (g * g) + (b * b)) > (128 * 128 * 3); +} + + +EDA_COLOR_T ColorFindNearest( const wxColour &aColor ) +{ + return ColorFindNearest( aColor.Red(), aColor.Green(), aColor.Blue() ); +} + + +EDA_COLOR_T ColorFindNearest( int aR, int aG, int aB ) +{ + EDA_COLOR_T candidate = BLACK; + + /* Find the 'nearest' color in the palette. This is fun. There is + a gazilion of metrics for the color space and no one of the + useful one is in the RGB color space. Who cares, this is a CAD, + not a photosomething... + + I hereby declare that the distance is the sum of the square of the + component difference. Think about the RGB color cube. Now get the + euclidean distance, but without the square root... for ordering + purposes it's the same, obviously. Also each component can't be + less of the target one, since I found this currently work better... + */ + int nearest_distance = 255 * 255 * 3 + 1; // Can't beat this + + for( EDA_COLOR_T trying = BLACK; trying < NBCOLORS; trying = NextColor(trying) ) + { + const StructColors &c = g_ColorRefs[trying]; + int distance = (aR - c.m_Red) * (aR - c.m_Red) + + (aG - c.m_Green) * (aG - c.m_Green) + + (aB - c.m_Blue) * (aB - c.m_Blue); + if( distance < nearest_distance && c.m_Red >= aR && + c.m_Green >= aG && c.m_Blue >= aB ) + { + nearest_distance = distance; + candidate = trying; + } + } + + return candidate; +} + + +EDA_COLOR_T ColorMix( EDA_COLOR_T aColor1, EDA_COLOR_T aColor2 ) +{ + /* Memoization storage. This could be potentially called for each + * color merge so a cache is useful (there are few colours anyway) */ + static EDA_COLOR_T mix_cache[NBCOLORS][NBCOLORS]; + + // TODO how is alpha used? it's a mac only thing, I have no idea + aColor1 = ColorGetBase( aColor1 ); + aColor2 = ColorGetBase( aColor2 ); + + // First easy thing: a black gives always the other colour + if( aColor1 == BLACK ) + return aColor2; + if( aColor2 == BLACK) + return aColor1; + + /* Now we are sure that black can't occur, so the rule is: + * BLACK means not computed yet. If we're lucky we already have + * an answer */ + EDA_COLOR_T candidate = mix_cache[aColor1][aColor2]; + if( candidate != BLACK ) + return candidate; + + // Blend the two colors (i.e. OR the RGB values) + const StructColors &c1 = g_ColorRefs[aColor1]; + const StructColors &c2 = g_ColorRefs[aColor2]; + + // Ask the palette for the nearest color to the mix + wxColour mixed( c1.m_Red | c2.m_Red, + c1.m_Green | c2.m_Green, + c1.m_Blue | c2.m_Blue ); + candidate = ColorFindNearest( mixed ); + + /* Here, BLACK is *not* a good answer, since it would recompute the next time. + * Even theorically its not possible (with the current rules), but + * maybe the metric will change in the future */ + if( candidate == BLACK) + candidate = DARKDARKGRAY; + + // Store the result in the cache. The operation is commutative, too + mix_cache[aColor1][aColor2] = candidate; + mix_cache[aColor2][aColor1] = candidate; + return candidate; +} + diff --git a/common/common.cpp b/common/common.cpp index 46d2670fb7..f52e6469b9 100644 --- a/common/common.cpp +++ b/common/common.cpp @@ -65,48 +65,6 @@ EDA_UNITS_T g_UserUnit; EDA_COLOR_T g_GhostColor; -/** - * The predefined colors used in KiCad. - * Please: if you change a value, remember these values are carefully chosen - * to have good results in Pcbnew, that uses the ORed value of basic colors - * when displaying superimposed objects - * This list must have exactly NBCOLORS items - */ -const StructColors g_ColorRefs[NBCOLORS] = -{ - { 0, 0, 0, BLACK, wxT( "Black" ), DARKDARKGRAY }, - { 72, 72, 72, DARKDARKGRAY, wxT( "Gray 1" ), DARKGRAY }, - { 132, 132, 132, DARKGRAY, wxT( "Gray 2" ), LIGHTGRAY }, - { 194, 194, 194, LIGHTGRAY, wxT( "Gray 3" ), WHITE }, - { 255, 255, 255, WHITE, wxT( "White" ), WHITE }, - { 194, 255, 255, LIGHTYELLOW, wxT( "L.Yellow" ), WHITE }, - { 72, 0, 0, DARKBLUE, wxT( "Blue 1" ), BLUE }, - { 0, 72, 0, DARKGREEN, wxT( "Green 1" ), GREEN }, - { 72, 72, 0, DARKCYAN, wxT( "Cyan 1" ), CYAN }, - { 0, 0, 72, DARKRED, wxT( "Red 1" ), RED }, - { 72, 0, 72, DARKMAGENTA, wxT( "Magenta 1" ), MAGENTA }, - { 0, 72, 72, DARKBROWN, wxT( "Brown 1" ), BROWN }, - { 132, 0, 0, BLUE, wxT( "Blue 2" ), LIGHTBLUE }, - { 0, 132, 0, GREEN, wxT( "Green 2" ), LIGHTGREEN }, - { 132, 132, 0, CYAN, wxT( "Cyan 2" ), LIGHTCYAN }, - { 0, 0, 132, RED, wxT( "Red 2" ), LIGHTRED }, - { 132, 0, 132, MAGENTA, wxT( "Magenta 2" ), LIGHTMAGENTA }, - { 0, 132, 132, BROWN, wxT( "Brown 2" ), YELLOW }, - { 194, 0, 0, LIGHTBLUE, wxT( "Blue 3" ), PUREBLUE, }, - { 0, 194, 0, LIGHTGREEN, wxT( "Green 3" ), PUREGREEN }, - { 194, 194, 0, LIGHTCYAN, wxT( "Cyan 3" ), PURECYAN }, - { 0, 0, 194, LIGHTRED, wxT( "Red 3" ), PURERED }, - { 194, 0, 194, LIGHTMAGENTA, wxT( "Magenta 3" ), PUREMAGENTA }, - { 0, 194, 194, YELLOW, wxT( "Yellow 3" ), PUREYELLOW }, - { 255, 0, 0, PUREBLUE, wxT( "Blue 4" ), WHITE }, - { 0, 255, 0, PUREGREEN, wxT( "Green 4" ), WHITE }, - { 255, 255, 0, PURECYAN, wxT( "Cyan 4" ), WHITE }, - { 0, 0, 255, PURERED, wxT( "Red 4" ), WHITE }, - { 255, 0, 255, PUREMAGENTA, wxT( "Magenta 4" ), WHITE }, - { 0, 255, 255, PUREYELLOW, wxT( "Yellow 4" ), WHITE }, -}; - - /** * Function to use local notation or C standard notation for floating point numbers * some countries use 1,5 and others (and C) 1.5 diff --git a/common/common_plotPDF_functions.cpp b/common/common_plotPDF_functions.cpp index 8349c5ff45..ec9cef66d3 100644 --- a/common/common_plotPDF_functions.cpp +++ b/common/common_plotPDF_functions.cpp @@ -28,7 +28,7 @@ */ #include -#include +#include #include #include #include diff --git a/common/common_plotPS_functions.cpp b/common/common_plotPS_functions.cpp index cad37ae694..9e1644485b 100644 --- a/common/common_plotPS_functions.cpp +++ b/common/common_plotPS_functions.cpp @@ -211,34 +211,34 @@ void PSLIKE_PLOTTER::fputsPostscriptString(FILE *fout, const wxString& txt) putc( '(', fout ); for( unsigned i = 0; i < txt.length(); i++ ) { - // Lazyness made me use stdio buffering yet another time... - wchar_t ch = txt[i]; - if( ch < 256 ) - { - switch (ch) - { - // The ~ shouldn't reach the outside - case '~': - break; - // These characters must be escaped - case '(': - case ')': - case '\\': - putc( '\\', fout ); + // Lazyness made me use stdio buffering yet another time... + wchar_t ch = txt[i]; + if( ch < 256 ) + { + switch (ch) + { + // The ~ shouldn't reach the outside + case '~': + break; + // These characters must be escaped + case '(': + case ')': + case '\\': + putc( '\\', fout ); - // FALLTHRU - default: - putc( ch, fout ); - break; - } - } + // FALLTHRU + default: + putc( ch, fout ); + break; + } + } } putc( ')', fout ); } /** - * Sister function for the ReturnGraphicTextWidth in drawtxt.cpp + * Sister function for the GraphicTextWidth in drawtxt.cpp * Does the same processing (i.e. calculates a text string width) but * using postscript metrics for the Helvetica font (optionally used for * PS and PDF plotting @@ -303,7 +303,7 @@ void PSLIKE_PLOTTER::postscriptOverlinePositions( const wxString& aText, int aXS } void PS_PLOTTER::SetViewport( const wxPoint& aOffset, double aIusPerDecimil, - double aScale, bool aMirror ) + double aScale, bool aMirror ) { wxASSERT( !outputFile ); m_plotMirror = aMirror; @@ -354,31 +354,31 @@ void PSLIKE_PLOTTER::computeTextParameters( const wxPoint& aPos, switch( aH_justify ) { case GR_TEXT_HJUSTIFY_CENTER: - dx = -tw / 2; - break; + dx = -tw / 2; + break; case GR_TEXT_HJUSTIFY_RIGHT: - dx = -tw; - break; + dx = -tw; + break; case GR_TEXT_HJUSTIFY_LEFT: - dx = 0; - break; + dx = 0; + break; } switch( aV_justify ) { case GR_TEXT_VJUSTIFY_CENTER: - dy = th / 2; - break; + dy = th / 2; + break; case GR_TEXT_VJUSTIFY_TOP: dy = th; - break; + break; case GR_TEXT_VJUSTIFY_BOTTOM: - dy = 0; - break; + dy = 0; + break; } RotatePoint( &dx, &dy, aOrient ); @@ -620,7 +620,7 @@ void PS_PLOTTER::PenTo( const wxPoint& pos, char plume ) } if( penState != plume || pos != penLastpos ) { - DPOINT pos_dev = userToDeviceCoordinates( pos ); + DPOINT pos_dev = userToDeviceCoordinates( pos ); fprintf( outputFile, "%g %g %sto\n", pos_dev.x, pos_dev.y, ( plume=='D' ) ? "line" : "move" ); @@ -650,39 +650,39 @@ bool PS_PLOTTER::StartPlot() static const char* PSMacro[] = { - "%%BeginProlog\n" - "/line { newpath moveto lineto stroke } bind def\n", - "/cir0 { newpath 0 360 arc stroke } bind def\n", - "/cir1 { newpath 0 360 arc gsave fill grestore stroke } bind def\n", - "/cir2 { newpath 0 360 arc gsave fill grestore stroke } bind def\n", - "/arc0 { newpath arc stroke } bind def\n", - "/arc1 { newpath 4 index 4 index moveto arc closepath gsave fill\n", - " grestore stroke } bind def\n", - "/arc2 { newpath 4 index 4 index moveto arc closepath gsave fill\n", - " grestore stroke } bind def\n", - "/poly0 { stroke } bind def\n", - "/poly1 { closepath gsave fill grestore stroke } bind def\n", - "/poly2 { closepath gsave fill grestore stroke } bind def\n", - "/rect0 { rectstroke } bind def\n", - "/rect1 { rectfill } bind def\n", - "/rect2 { rectfill } bind def\n", - "/linemode0 { 0 setlinecap 0 setlinejoin 0 setlinewidth } bind def\n", - "/linemode1 { 1 setlinecap 1 setlinejoin } bind def\n", - "/dashedline { [200] 100 setdash } bind def\n", - "/solidline { [] 0 setdash } bind def\n", + "%%BeginProlog\n" + "/line { newpath moveto lineto stroke } bind def\n", + "/cir0 { newpath 0 360 arc stroke } bind def\n", + "/cir1 { newpath 0 360 arc gsave fill grestore stroke } bind def\n", + "/cir2 { newpath 0 360 arc gsave fill grestore stroke } bind def\n", + "/arc0 { newpath arc stroke } bind def\n", + "/arc1 { newpath 4 index 4 index moveto arc closepath gsave fill\n", + " grestore stroke } bind def\n", + "/arc2 { newpath 4 index 4 index moveto arc closepath gsave fill\n", + " grestore stroke } bind def\n", + "/poly0 { stroke } bind def\n", + "/poly1 { closepath gsave fill grestore stroke } bind def\n", + "/poly2 { closepath gsave fill grestore stroke } bind def\n", + "/rect0 { rectstroke } bind def\n", + "/rect1 { rectfill } bind def\n", + "/rect2 { rectfill } bind def\n", + "/linemode0 { 0 setlinecap 0 setlinejoin 0 setlinewidth } bind def\n", + "/linemode1 { 1 setlinecap 1 setlinejoin } bind def\n", + "/dashedline { [200] 100 setdash } bind def\n", + "/solidline { [] 0 setdash } bind def\n", - // This is for 'hidden' text (search anchors for PDF) + // This is for 'hidden' text (search anchors for PDF) "/phantomshow { moveto\n", " /KicadFont findfont 0.000001 scalefont setfont\n", - " show } bind def\n", + " show } bind def\n", // This is for regular postscript text "/textshow { gsave\n", " findfont exch scalefont setfont concat 1 scale 0 0 moveto show\n", " } bind def\n", - // Utility for getting Latin1 encoded fonts - "/reencodefont {\n", + // Utility for getting Latin1 encoded fonts + "/reencodefont {\n", " findfont dup length dict begin\n", " { 1 index /FID ne\n", " { def }\n", @@ -692,13 +692,13 @@ bool PS_PLOTTER::StartPlot() " currentdict\n", " end } bind def\n" - // Remap AdobeStandard fonts to Latin1 - "/KicadFont /Helvetica reencodefont definefont pop\n", - "/KicadFont-Bold /Helvetica-Bold reencodefont definefont pop\n", - "/KicadFont-Oblique /Helvetica-Oblique reencodefont definefont pop\n", - "/KicadFont-BoldOblique /Helvetica-BoldOblique reencodefont definefont pop\n", - "%%EndProlog\n", - NULL + // Remap AdobeStandard fonts to Latin1 + "/KicadFont /Helvetica reencodefont definefont pop\n", + "/KicadFont-Bold /Helvetica-Bold reencodefont definefont pop\n", + "/KicadFont-Oblique /Helvetica-Oblique reencodefont definefont pop\n", + "/KicadFont-BoldOblique /Helvetica-BoldOblique reencodefont definefont pop\n", + "%%EndProlog\n", + NULL }; time_t time1970 = time( NULL ); @@ -726,8 +726,8 @@ bool PS_PLOTTER::StartPlot() psPaperSize.Set( pageInfo.GetHeightMils(), pageInfo.GetWidthMils() ); fprintf( outputFile, "%%%%BoundingBox: 0 0 %d %d\n", - (int) ceil( psPaperSize.x * BIGPTsPERMIL ), - (int) ceil( psPaperSize.y * BIGPTsPERMIL ) ); + (int) ceil( psPaperSize.x * BIGPTsPERMIL ), + (int) ceil( psPaperSize.y * BIGPTsPERMIL ) ); // Specify the size of the sheet and the name associated with that size. // (If the "User size" option has been selected for the sheet size, @@ -775,9 +775,9 @@ bool PS_PLOTTER::StartPlot() // within the Document Structuring Convention. fputs( "%%Page: 1 1\n" "%%BeginPageSetup\n" - "gsave\n" - "0.0072 0.0072 scale\n" // Configure postscript for decimils coordinates - "linemode1\n", outputFile ); + "gsave\n" + "0.0072 0.0072 scale\n" // Configure postscript for decimils coordinates + "linemode1\n", outputFile ); // Rototranslate the coordinate to achieve the landscape layout @@ -803,7 +803,7 @@ bool PS_PLOTTER::EndPlot() wxASSERT( outputFile ); fputs( "showpage\n" "grestore\n" - "%%EOF\n", outputFile ); + "%%EOF\n", outputFile ); fclose( outputFile ); outputFile = NULL; @@ -813,15 +813,15 @@ bool PS_PLOTTER::EndPlot() void PS_PLOTTER::Text( const wxPoint& aPos, - enum EDA_COLOR_T aColor, - const wxString& aText, - double aOrient, - const wxSize& aSize, - enum EDA_TEXT_HJUSTIFY_T aH_justify, - enum EDA_TEXT_VJUSTIFY_T aV_justify, - int aWidth, - bool aItalic, - bool aBold ) + enum EDA_COLOR_T aColor, + const wxString& aText, + double aOrient, + const wxSize& aSize, + enum EDA_TEXT_HJUSTIFY_T aH_justify, + enum EDA_TEXT_VJUSTIFY_T aV_justify, + int aWidth, + bool aItalic, + bool aBold ) { SetCurrentLineWidth( aWidth ); SetColor( aColor ); @@ -874,7 +874,7 @@ void PS_PLOTTER::Text( const wxPoint& aPos, if( m_textMode == PLOTTEXTMODE_PHANTOM ) { fputsPostscriptString( outputFile, aText ); - DPOINT pos_dev = userToDeviceCoordinates( aPos ); + DPOINT pos_dev = userToDeviceCoordinates( aPos ); fprintf( outputFile, " %g %g phantomshow\n", pos_dev.x, pos_dev.y ); } diff --git a/common/projet_config.cpp b/common/config_params.cpp similarity index 62% rename from common/projet_config.cpp rename to common/config_params.cpp index 2d50a29b5f..6f7fabcbbc 100644 --- a/common/projet_config.cpp +++ b/common/config_params.cpp @@ -1,15 +1,36 @@ -/*********************/ -/* projet_config.cpp */ -/*********************/ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com + * Copyright (C) 2008-2011 Wayne Stambaugh + * Copyright (C) 1992-2011 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 #include -#include +#include #include #include #include #include -#include +#include #include #include @@ -19,8 +40,89 @@ #include -#define CONFIG_VERSION 1 -#define FORCE_LOCAL_CONFIG true +void wxConfigSaveParams( wxConfigBase* aCfg, + const PARAM_CFG_ARRAY& aList, const wxString& aGroup ) +{ + wxASSERT( aCfg ); + + BOOST_FOREACH( const PARAM_CFG_BASE& param, aList ) + { + if( param.m_Group ) + aCfg->SetPath( param.m_Group ); + else + aCfg->SetPath( aGroup ); + + if( param.m_Setup ) + continue; + + if( param.m_Type == PARAM_COMMAND_ERASE ) // Erase all data + { + if( param.m_Ident ) + aCfg->DeleteGroup( param.m_Ident ); + } + else + { + param.SaveParam( aCfg ); + } + } +} + + +void wxConfigLoadParams( wxConfigBase* aCfg, + const PARAM_CFG_ARRAY& aList, const wxString& aGroup ) +{ + wxASSERT( aCfg ); + + BOOST_FOREACH( const PARAM_CFG_BASE& param, aList ) + { + if( param.m_Group ) + aCfg->SetPath( param.m_Group ); + else + aCfg->SetPath( aGroup ); + + if( param.m_Setup ) + continue; + + param.ReadParam( aCfg ); + } +} + + +void wxConfigSaveSetups( wxConfigBase* aCfg, const PARAM_CFG_ARRAY& aList ) +{ + wxASSERT( aCfg ); + + BOOST_FOREACH( const PARAM_CFG_BASE& param, aList ) + { + if( !param.m_Setup ) + continue; + + if( param.m_Type == PARAM_COMMAND_ERASE ) // Erase all data + { + if( param.m_Ident ) + aCfg->DeleteGroup( param.m_Ident ); + } + else + { + param.SaveParam( aCfg ); + } + } +} + + +void wxConfigLoadSetups( wxConfigBase* aCfg, const PARAM_CFG_ARRAY& aList ) +{ + wxASSERT( aCfg ); + + BOOST_FOREACH( const PARAM_CFG_BASE& param, aList ) + { + if( !param.m_Setup ) + continue; + + param.ReadParam( aCfg ); + } +} + void ConfigBaseWriteDouble( wxConfigBase* aConfig, const wxString& aKey, double aValue ) @@ -35,220 +137,6 @@ void ConfigBaseWriteDouble( wxConfigBase* aConfig, const wxString& aKey, double } -bool EDA_APP::ReCreatePrjConfig( const wxString& fileName, - const wxString& GroupName, - bool ForceUseLocalConfig ) -{ - wxFileName fn = fileName; - - // Free old config file. - if( m_projectSettings ) - { - delete m_projectSettings; - m_projectSettings = NULL; - } - - /* Force the file extension. - * This allows the user to enter a filename without extension - * or use an existing name to create the project file - */ - if( fn.GetExt() != ProjectFileExtension ) - { - fn.SetExt( ProjectFileExtension ); - } - - /* Update the library search path list if a new project file is loaded. */ - if( m_projectFileName != fn ) - { - RemoveLibraryPath( m_projectFileName.GetPath() ); - InsertLibraryPath( fn.GetPath(), 0 ); - m_projectFileName = fn; - } - - // Init local config filename - if( ForceUseLocalConfig || fn.FileExists() ) - { - m_CurrentOptionFile = fn.GetFullPath(); - m_projectSettings = new wxFileConfig( wxEmptyString, wxEmptyString, - m_CurrentOptionFile, wxEmptyString ); - m_projectSettings->DontCreateOnDemand(); - - if( ForceUseLocalConfig ) - return true; - - /* Check the application version against the version saved in the - * project file. - * - * TODO: Push the version test up the stack so that when one of the - * KiCad application version changes, the other applications - * settings do not get updated. Practically, this can go away. - * It isn't used anywhere as far as I know (WLS). - */ - int version = -1; - int def_version = 0; - - m_projectSettings->SetPath( GroupName ); - version = m_projectSettings->Read( wxT( "version" ), def_version ); - m_projectSettings->SetPath( wxCONFIG_PATH_SEPARATOR ); - - if( version > 0 ) - { - return true; - } - else - { - delete m_projectSettings; // Version incorrect - } - } - - wxString defaultFileName; - defaultFileName = m_libSearchPaths.FindValidPath( wxT( "kicad.pro" ) ); - - if( defaultFileName.IsEmpty() ) - { - wxLogDebug( wxT( "Template file not found." ) ); - fn = wxFileName( GetTraits()->GetStandardPaths().GetDocumentsDir(), - wxT( "kicad" ), ProjectFileExtension ); - } - else - { - fn = defaultFileName; - } - - // Create new project file using the default name. - m_CurrentOptionFile = fn.GetFullPath(); - m_projectSettings = new wxFileConfig( wxEmptyString, wxEmptyString, - wxEmptyString, fn.GetFullPath() ); - m_projectSettings->DontCreateOnDemand(); - - return false; -} - - -void EDA_APP::WriteProjectConfig( const wxString& fileName, - const wxString& GroupName, - const PARAM_CFG_ARRAY& params ) -{ - ReCreatePrjConfig( fileName, GroupName, FORCE_LOCAL_CONFIG ); - - /* Write date ( surtout pour eviter bug de wxFileConfig - * qui se trompe de rubrique si declaration [xx] en premiere ligne - * (en fait si groupe vide) */ - m_projectSettings->SetPath( wxCONFIG_PATH_SEPARATOR ); - - m_projectSettings->Write( wxT( "update" ), DateAndTime() ); - m_projectSettings->Write( wxT( "last_client" ), GetAppName() ); - - /* Save parameters */ - m_projectSettings->DeleteGroup( GroupName ); // Erase all data - m_projectSettings->Flush(); - - m_projectSettings->SetPath( GroupName ); - m_projectSettings->Write( wxT( "version" ), CONFIG_VERSION ); - m_projectSettings->SetPath( wxCONFIG_PATH_SEPARATOR ); - - BOOST_FOREACH( const PARAM_CFG_BASE& param, params ) - { - if( param.m_Group ) - m_projectSettings->SetPath( param.m_Group ); - else - m_projectSettings->SetPath( GroupName ); - - if( param.m_Setup ) - continue; - - if ( param.m_Type == PARAM_COMMAND_ERASE ) // Erase all data - { - if( param.m_Ident ) - m_projectSettings->DeleteGroup( param.m_Ident ); - } - else - { - param.SaveParam( m_projectSettings ); - } - } - - m_projectSettings->SetPath( UNIX_STRING_DIR_SEP ); - - delete m_projectSettings; - m_projectSettings = NULL; -} - -void EDA_APP::SaveCurrentSetupValues( const PARAM_CFG_ARRAY& List ) -{ - if( m_settings == NULL ) - return; - - unsigned count = List.size(); - for( unsigned i=0; iDeleteGroup( param.m_Ident ); - } - else - { - param.SaveParam( m_settings ); - } - } -} - -bool EDA_APP::ReadProjectConfig( const wxString& local_config_filename, - const wxString& GroupName, - const PARAM_CFG_ARRAY& params, - bool Load_Only_if_New ) -{ - ReCreatePrjConfig( local_config_filename, GroupName, false ); - - m_projectSettings->SetPath( wxCONFIG_PATH_SEPARATOR ); - wxString timestamp = m_projectSettings->Read( wxT( "update" ) ); - - if( Load_Only_if_New && ( !timestamp.IsEmpty() ) - && (timestamp == m_CurrentOptionFileDateAndTime) ) - { - return false; - } - - m_CurrentOptionFileDateAndTime = timestamp; - - BOOST_FOREACH( const PARAM_CFG_BASE& param, params ) - { - if( param.m_Group ) - m_projectSettings->SetPath( param.m_Group ); - else - m_projectSettings->SetPath( GroupName ); - - if( param.m_Setup ) - continue; - - param.ReadParam( m_projectSettings ); - } - - delete m_projectSettings; - m_projectSettings = NULL; - - return true; -} - - -void EDA_APP::ReadCurrentSetupValues( const PARAM_CFG_ARRAY& List ) -{ - BOOST_FOREACH( const PARAM_CFG_BASE& param, List ) - { - if( param.m_Setup == false ) - continue; - - param.ReadParam( m_settings ); - } -} - - PARAM_CFG_BASE::PARAM_CFG_BASE( const wxChar* ident, const paramcfg_id type, const wxChar* group ) { @@ -286,7 +174,7 @@ PARAM_CFG_INT::PARAM_CFG_INT( bool Insetup, const wxChar* ident, int* ptparam, void PARAM_CFG_INT::ReadParam( wxConfigBase* aConfig ) const { - if( m_Pt_param == NULL || aConfig == NULL ) + if( !m_Pt_param || !aConfig ) return; int itmp = aConfig->Read( m_Ident, m_Default ); @@ -300,7 +188,7 @@ void PARAM_CFG_INT::ReadParam( wxConfigBase* aConfig ) const void PARAM_CFG_INT::SaveParam( wxConfigBase* aConfig ) const { - if( m_Pt_param == NULL || aConfig == NULL ) + if( !m_Pt_param || !aConfig ) return; aConfig->Write( m_Ident, *m_Pt_param ); @@ -330,7 +218,7 @@ PARAM_CFG_INT_WITH_SCALE::PARAM_CFG_INT_WITH_SCALE( bool Insetup, void PARAM_CFG_INT_WITH_SCALE::ReadParam( wxConfigBase* aConfig ) const { - if( m_Pt_param == NULL || aConfig == NULL ) + if( !m_Pt_param || !aConfig ) return; double dtmp = (double) m_Default * m_BIU_to_cfgunit; @@ -347,7 +235,7 @@ void PARAM_CFG_INT_WITH_SCALE::ReadParam( wxConfigBase* aConfig ) const void PARAM_CFG_INT_WITH_SCALE::SaveParam( wxConfigBase* aConfig ) const { - if( m_Pt_param == NULL || aConfig == NULL ) + if( !m_Pt_param || !aConfig ) return; // We cannot use aConfig->Write for a double, because @@ -383,8 +271,9 @@ PARAM_CFG_SETCOLOR::PARAM_CFG_SETCOLOR( bool Insetup, void PARAM_CFG_SETCOLOR::ReadParam( wxConfigBase* aConfig ) const { - if( m_Pt_param == NULL || aConfig == NULL ) + if( !m_Pt_param || !aConfig ) return; + EDA_COLOR_T itmp = ColorByName( aConfig->Read( m_Ident, wxT("NONE") ) ); if( itmp == UNSPECIFIED_COLOR ) @@ -395,7 +284,7 @@ void PARAM_CFG_SETCOLOR::ReadParam( wxConfigBase* aConfig ) const void PARAM_CFG_SETCOLOR::SaveParam( wxConfigBase* aConfig ) const { - if( m_Pt_param == NULL || aConfig == NULL ) + if( !m_Pt_param || !aConfig ) return; aConfig->Write( m_Ident, ColorGetName( *m_Pt_param ) ); @@ -433,7 +322,7 @@ PARAM_CFG_DOUBLE::PARAM_CFG_DOUBLE( bool Insetup, void PARAM_CFG_DOUBLE::ReadParam( wxConfigBase* aConfig ) const { - if( m_Pt_param == NULL || aConfig == NULL ) + if( !m_Pt_param || !aConfig ) return; double dtmp = m_Default; @@ -448,7 +337,7 @@ void PARAM_CFG_DOUBLE::ReadParam( wxConfigBase* aConfig ) const void PARAM_CFG_DOUBLE::SaveParam( wxConfigBase* aConfig ) const { - if( m_Pt_param == NULL || aConfig == NULL ) + if( !m_Pt_param || !aConfig ) return; // We cannot use aConfig->Write for a double, because @@ -483,7 +372,7 @@ PARAM_CFG_BOOL::PARAM_CFG_BOOL( bool Insetup, void PARAM_CFG_BOOL::ReadParam( wxConfigBase* aConfig ) const { - if( m_Pt_param == NULL || aConfig == NULL ) + if( !m_Pt_param || !aConfig ) return; int itmp = aConfig->Read( m_Ident, (int) m_Default ); @@ -494,7 +383,7 @@ void PARAM_CFG_BOOL::ReadParam( wxConfigBase* aConfig ) const void PARAM_CFG_BOOL::SaveParam( wxConfigBase* aConfig ) const { - if( m_Pt_param == NULL || aConfig == NULL ) + if( !m_Pt_param || !aConfig ) return; aConfig->Write( m_Ident, *m_Pt_param ); @@ -524,22 +413,22 @@ PARAM_CFG_WXSTRING::PARAM_CFG_WXSTRING( bool Insetup, const wxChar* ident, void PARAM_CFG_WXSTRING::ReadParam( wxConfigBase* aConfig ) const { - if( m_Pt_param == NULL || aConfig == NULL ) + if( !m_Pt_param || !aConfig ) return; + *m_Pt_param = aConfig->Read( m_Ident, m_default ); } void PARAM_CFG_WXSTRING::SaveParam( wxConfigBase* aConfig ) const { - if( m_Pt_param == NULL || aConfig == NULL ) + if( !m_Pt_param || !aConfig ) return; aConfig->Write( m_Ident, *m_Pt_param ); } - PARAM_CFG_FILENAME::PARAM_CFG_FILENAME( const wxChar* ident, wxString* ptparam, const wxChar* group ) : @@ -551,7 +440,7 @@ PARAM_CFG_FILENAME::PARAM_CFG_FILENAME( const wxChar* ident, void PARAM_CFG_FILENAME::ReadParam( wxConfigBase* aConfig ) const { - if( m_Pt_param == NULL || aConfig == NULL ) + if( !m_Pt_param || !aConfig ) return; wxString prm = aConfig->Read( m_Ident ); @@ -567,7 +456,7 @@ void PARAM_CFG_FILENAME::ReadParam( wxConfigBase* aConfig ) const void PARAM_CFG_FILENAME::SaveParam( wxConfigBase* aConfig ) const { - if( m_Pt_param == NULL || aConfig == NULL ) + if( !m_Pt_param || !aConfig ) return; wxString prm = *m_Pt_param; @@ -588,7 +477,7 @@ PARAM_CFG_LIBNAME_LIST::PARAM_CFG_LIBNAME_LIST( const wxChar* ident, void PARAM_CFG_LIBNAME_LIST::ReadParam( wxConfigBase* aConfig ) const { - if( m_Pt_param == NULL || aConfig == NULL ) + if( !m_Pt_param || !aConfig ) return; int indexlib = 1; // We start indexlib to 1 because first @@ -617,15 +506,15 @@ void PARAM_CFG_LIBNAME_LIST::ReadParam( wxConfigBase* aConfig ) const void PARAM_CFG_LIBNAME_LIST::SaveParam( wxConfigBase* aConfig ) const { - if( m_Pt_param == NULL || aConfig == NULL ) + if( !m_Pt_param || !aConfig ) return; + wxArrayString* libname_list = m_Pt_param; - unsigned indexlib = 0; wxString configkey; wxString libname; - for( ; indexlib < libname_list->GetCount(); indexlib++ ) + for( unsigned indexlib = 0; indexlib < libname_list->GetCount(); indexlib++ ) { configkey = m_Ident; diff --git a/common/copy_to_clipboard.cpp b/common/copy_to_clipboard.cpp index 4f3130b7f7..5e710d81a7 100644 --- a/common/copy_to_clipboard.cpp +++ b/common/copy_to_clipboard.cpp @@ -34,7 +34,7 @@ #include #include #include -#include +#include static bool DrawPageOnClipboard( EDA_DRAW_FRAME* aFrame ); diff --git a/common/dialog_about/AboutDialog_main.cpp b/common/dialog_about/AboutDialog_main.cpp index d66561fe5d..e32b0a4dd5 100644 --- a/common/dialog_about/AboutDialog_main.cpp +++ b/common/dialog_about/AboutDialog_main.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include @@ -41,7 +41,7 @@ static wxString HtmlNewline( const unsigned int amount = 1 ); static void InitKiCadAboutNew( AboutAppInfo& info ) { // Set application specific icon - const wxTopLevelWindow * const tlw = wxDynamicCast(::wxGetApp().GetTopWindow(), wxTopLevelWindow); + const wxTopLevelWindow* const tlw = wxDynamicCast( Pgm().App().GetTopWindow(), wxTopLevelWindow); if( tlw ) info.SetIcon( tlw->GetIcon() ); @@ -56,10 +56,10 @@ static void InitKiCadAboutNew( AboutAppInfo& info ) } /* Set title */ - info.SetAppName( wxT( ".: " ) + wxGetApp().GetTitle() + wxT( " :." ) ); + info.SetAppName( wxT( ".: " ) + Pgm().App().GetAppName() + wxT( " :." ) ); /* Copyright information */ - info.SetCopyright( wxT( "(C) 1992-2013 KiCad Developers Team" ) ); + info.SetCopyright( wxT( "(C) 1992-2014 KiCad Developers Team" ) ); /* KiCad build version */ wxString version; diff --git a/common/dialog_shim.cpp b/common/dialog_shim.cpp index 1d50a08908..354444c4ff 100644 --- a/common/dialog_shim.cpp +++ b/common/dialog_shim.cpp @@ -24,12 +24,22 @@ */ #include - +#include DIALOG_SHIM::DIALOG_SHIM( wxWindow* aParent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : - wxDialog( aParent, id, title, pos, size, style, name ) + wxDialog( aParent, id, title, pos, size, style, name ), + KIWAY_HOLDER( 0 ) { + // pray that aParent is either a KIWAY_PLAYER or DIALOG_SHIM derivation. + KIWAY_HOLDER* h = dynamic_cast( aParent ); + + wxASSERT_MSG( h, + wxT( "DIALOG_SHIM's parent not derived from KIWAY_PLAYER nor DIALOG_SHIM" ) ); + + if( h ) + SetKiway( this, &h->Kiway() ); + #if DLGSHIM_USE_SETFOCUS Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_SHIM::onInit ) ); #endif diff --git a/common/dialogs/dialog_get_component.cpp b/common/dialogs/dialog_get_component.cpp index 0fddd7f992..c0516bb5ba 100644 --- a/common/dialogs/dialog_get_component.cpp +++ b/common/dialogs/dialog_get_component.cpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include diff --git a/common/dialogs/dialog_hotkeys_editor.cpp b/common/dialogs/dialog_hotkeys_editor.cpp index a1457febca..bb3b85f523 100644 --- a/common/dialogs/dialog_hotkeys_editor.cpp +++ b/common/dialogs/dialog_hotkeys_editor.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include @@ -202,7 +202,7 @@ void HOTKEYS_EDITOR_DIALOG::OnRightClickOnCell( wxGridEvent& event ) wxString keyname = wxGetSingleChoice( _( "Special keys only. For others keys, use keyboard" ), _( "Select a key" ), C_COUNT, choices, this ); - int key = ReturnKeyCodeFromKeyName( keyname ); + int key = KeyCodeFromKeyName( keyname ); if( key == 0 ) return; @@ -251,7 +251,7 @@ void HOTKEYS_EDITOR_DIALOG::OnKeyPressed( wxKeyEvent& event ) #endif // See if this key code is handled in hotkeys names list bool exists; - ReturnKeyNameFromKeyCode( key, &exists ); + KeyNameFromKeyCode( key, &exists ); if( !exists ) // not handled, see hotkeys_basic.cpp { diff --git a/common/dialogs/dialog_page_settings.cpp b/common/dialogs/dialog_page_settings.cpp index bbd6cd967f..a56261f048 100644 --- a/common/dialogs/dialog_page_settings.cpp +++ b/common/dialogs/dialog_page_settings.cpp @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/common/displlst.cpp b/common/displlst.cpp index 1717f2a0f8..e78a72eac8 100644 --- a/common/displlst.cpp +++ b/common/displlst.cpp @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include diff --git a/common/drawframe.cpp b/common/draw_frame.cpp similarity index 96% rename from common/drawframe.cpp rename to common/draw_frame.cpp index 5820bed89b..13fc21d68a 100644 --- a/common/drawframe.cpp +++ b/common/draw_frame.cpp @@ -28,7 +28,8 @@ */ #include -#include +#include +#include #include #include #include @@ -38,7 +39,7 @@ #include #include #include -#include +#include #include #include #include @@ -88,12 +89,12 @@ BEGIN_EVENT_TABLE( EDA_DRAW_FRAME, EDA_BASE_FRAME ) END_EVENT_TABLE() -EDA_DRAW_FRAME::EDA_DRAW_FRAME( wxWindow* aParent, +EDA_DRAW_FRAME::EDA_DRAW_FRAME( KIWAY* aKiway, wxWindow* aParent, ID_DRAWFRAME_TYPE aFrameType, const wxString& aTitle, const wxPoint& aPos, const wxSize& aSize, long aStyle, const wxString & aFrameName ) : - EDA_BASE_FRAME( aParent, aFrameType, aTitle, aPos, aSize, aStyle, aFrameName ) + KIWAY_PLAYER( aKiway, aParent, aFrameType, aTitle, aPos, aSize, aStyle, aFrameName ) { m_drawToolBar = NULL; m_optionsToolBar = NULL; @@ -531,7 +532,7 @@ wxPoint EDA_DRAW_FRAME::GetGridPosition( const wxPoint& aPosition ) const } -int EDA_DRAW_FRAME::ReturnBlockCommand( int key ) +int EDA_DRAW_FRAME::BlockCommand( int key ) { return 0; } @@ -582,25 +583,21 @@ void EDA_DRAW_FRAME::UpdateStatusBar() } -void EDA_DRAW_FRAME::LoadSettings() +void EDA_DRAW_FRAME::LoadSettings( wxConfigBase* aCfg ) { - wxASSERT( wxGetApp().GetSettings() != NULL ); + EDA_BASE_FRAME::LoadSettings( aCfg ); - wxConfig* cfg = wxGetApp().GetSettings(); + aCfg->Read( m_FrameName + CursorShapeEntryKeyword, &m_cursorShape, ( long )0 ); - EDA_BASE_FRAME::LoadSettings(); - cfg->Read( m_FrameName + CursorShapeEntryKeyword, &m_cursorShape, ( long )0 ); bool btmp; - - if ( cfg->Read( m_FrameName + ShowGridEntryKeyword, &btmp ) ) + if( aCfg->Read( m_FrameName + ShowGridEntryKeyword, &btmp ) ) SetGridVisibility( btmp ); int itmp; - - if( cfg->Read( m_FrameName + GridColorEntryKeyword, &itmp ) ) + if( aCfg->Read( m_FrameName + GridColorEntryKeyword, &itmp ) ) SetGridColor( ColorFromInt( itmp ) ); - cfg->Read( m_FrameName + LastGridSizeIdKeyword, &m_LastGridSizeId, 0L ); + aCfg->Read( m_FrameName + LastGridSizeIdKeyword, &m_LastGridSizeId, 0L ); // m_LastGridSizeId is an offset, expected to be >= 0 if( m_LastGridSizeId < 0 ) @@ -608,17 +605,14 @@ void EDA_DRAW_FRAME::LoadSettings() } -void EDA_DRAW_FRAME::SaveSettings() +void EDA_DRAW_FRAME::SaveSettings( wxConfigBase* aCfg ) { - wxASSERT( wxGetApp().GetSettings() != NULL ); + EDA_BASE_FRAME::SaveSettings( aCfg ); - wxConfig* cfg = wxGetApp().GetSettings(); - - EDA_BASE_FRAME::SaveSettings(); - cfg->Write( m_FrameName + CursorShapeEntryKeyword, m_cursorShape ); - cfg->Write( m_FrameName + ShowGridEntryKeyword, IsGridVisible() ); - cfg->Write( m_FrameName + GridColorEntryKeyword, ( long ) GetGridColor() ); - cfg->Write( m_FrameName + LastGridSizeIdKeyword, ( long ) m_LastGridSizeId ); + aCfg->Write( m_FrameName + CursorShapeEntryKeyword, m_cursorShape ); + aCfg->Write( m_FrameName + ShowGridEntryKeyword, IsGridVisible() ); + aCfg->Write( m_FrameName + GridColorEntryKeyword, ( long ) GetGridColor() ); + aCfg->Write( m_FrameName + LastGridSizeIdKeyword, ( long ) m_LastGridSizeId ); } @@ -682,7 +676,7 @@ bool EDA_DRAW_FRAME::HandleBlockBegin( wxDC* aDC, int aKey, const wxPoint& aPosi if( ( Block->GetCommand() != BLOCK_IDLE ) || ( Block->GetState() != STATE_NO_BLOCK ) ) return false; - Block->SetCommand( (BLOCK_COMMAND_T) ReturnBlockCommand( aKey ) ); + Block->SetCommand( (BLOCK_COMMAND_T) BlockCommand( aKey ) ); if( Block->GetCommand() == 0 ) return false; diff --git a/common/drawpanel.cpp b/common/draw_panel.cpp similarity index 97% rename from common/drawpanel.cpp rename to common/draw_panel.cpp index a055fb83b8..1e3adb750b 100644 --- a/common/drawpanel.cpp +++ b/common/draw_panel.cpp @@ -28,7 +28,8 @@ */ #include -#include +#include +#include #include #include #include @@ -36,7 +37,7 @@ #include #include #include -#include +#include #include @@ -45,16 +46,17 @@ static const int CURSOR_SIZE = 12; ///< Cursor size in pixels #define CLIP_BOX_PADDING 2 // keys to store options in config: -#define ENBL_ZOOM_NO_CENTER_KEY wxT( "ZoomNoCenter" ) -#define ENBL_MIDDLE_BUTT_PAN_KEY wxT( "MiddleButtonPAN" ) -#define MIDDLE_BUTT_PAN_LIMITED_KEY wxT( "MiddleBtnPANLimited" ) -#define ENBL_AUTO_PAN_KEY wxT( "AutoPAN" ) +#define ENBL_ZOOM_NO_CENTER_KEY wxT( "ZoomNoCenter" ) +#define ENBL_MIDDLE_BUTT_PAN_KEY wxT( "MiddleButtonPAN" ) +#define MIDDLE_BUTT_PAN_LIMITED_KEY wxT( "MiddleBtnPANLimited" ) +#define ENBL_AUTO_PAN_KEY wxT( "AutoPAN" ) -/* Definitions for enabling and disabling debugging features in drawpanel.cpp. - * Please don't forget to turn these off before making any commits to Launchpad. - */ + +// Definitions for enabling and disabling debugging features in drawpanel.cpp. +// Please don't forget to turn these off before making any commits to Launchpad. #define DEBUG_SHOW_CLIP_RECT 0 // Set to 1 to draw clipping rectangle. + /** * Trace mask used to enable or disable the trace output of coordinates during drawing * functions. The coordinate dumping can be turned on by setting the WXTRACE environment @@ -122,12 +124,14 @@ EDA_DRAW_PANEL::EDA_DRAW_PANEL( EDA_DRAW_FRAME* parent, int id, m_mouseCaptureCallback = NULL; m_endMouseCaptureCallback = NULL; - if( wxGetApp().GetSettings() ) + wxConfigBase* cfg = Kiface().KifaceSettings(); + + if( cfg ) { - wxGetApp().GetSettings()->Read( ENBL_MIDDLE_BUTT_PAN_KEY, &m_enableMiddleButtonPan, false ); - wxGetApp().GetSettings()->Read( ENBL_ZOOM_NO_CENTER_KEY, &m_enableZoomNoCenter, false ); - wxGetApp().GetSettings()->Read( MIDDLE_BUTT_PAN_LIMITED_KEY, &m_panScrollbarLimits, false ); - wxGetApp().GetSettings()->Read( ENBL_AUTO_PAN_KEY, &m_enableAutoPan, true ); + cfg->Read( ENBL_MIDDLE_BUTT_PAN_KEY, &m_enableMiddleButtonPan, false ); + cfg->Read( ENBL_ZOOM_NO_CENTER_KEY, &m_enableZoomNoCenter, false ); + cfg->Read( MIDDLE_BUTT_PAN_LIMITED_KEY, &m_panScrollbarLimits, false ); + cfg->Read( ENBL_AUTO_PAN_KEY, &m_enableAutoPan, true ); } m_requestAutoPan = false; @@ -149,10 +153,15 @@ EDA_DRAW_PANEL::EDA_DRAW_PANEL( EDA_DRAW_FRAME* parent, int id, EDA_DRAW_PANEL::~EDA_DRAW_PANEL() { - wxGetApp().GetSettings()->Write( ENBL_MIDDLE_BUTT_PAN_KEY, m_enableMiddleButtonPan ); - wxGetApp().GetSettings()->Write( ENBL_ZOOM_NO_CENTER_KEY, m_enableZoomNoCenter ); - wxGetApp().GetSettings()->Write( MIDDLE_BUTT_PAN_LIMITED_KEY, m_panScrollbarLimits ); - wxGetApp().GetSettings()->Write( ENBL_AUTO_PAN_KEY, m_enableAutoPan ); + wxConfigBase* cfg = Kiface().KifaceSettings(); + + if( cfg ) + { + cfg->Write( ENBL_MIDDLE_BUTT_PAN_KEY, m_enableMiddleButtonPan ); + cfg->Write( ENBL_ZOOM_NO_CENTER_KEY, m_enableZoomNoCenter ); + cfg->Write( MIDDLE_BUTT_PAN_LIMITED_KEY, m_panScrollbarLimits ); + cfg->Write( ENBL_AUTO_PAN_KEY, m_enableAutoPan ); + } } diff --git a/common/drawtxt.cpp b/common/drawtxt.cpp index 29286be5b4..33c79529b0 100644 --- a/common/drawtxt.cpp +++ b/common/drawtxt.cpp @@ -161,7 +161,7 @@ static const char* GetHersheyShapeDescription( int AsciiCode ) } -int ReturnGraphicTextWidth( const wxString& aText, int aXSize, bool aItalic, bool aWidth ) +int GraphicTextWidth( const wxString& aText, int aXSize, bool aItalic, bool aWidth ) { int tally = 0; int char_count = aText.length(); @@ -315,7 +315,7 @@ void DrawGraphicText( EDA_RECT* aClipBox, current_char_pos = aPos; - dx = ReturnGraphicTextWidth( aText, size_h, aItalic, aWidth ); + dx = GraphicTextWidth( aText, size_h, aItalic, aWidth ); dy = size_v; /* Do not draw the text if out of draw area! */ diff --git a/common/eda_dde.cpp b/common/eda_dde.cpp index 8fd540433f..b00cc11cad 100644 --- a/common/eda_dde.cpp +++ b/common/eda_dde.cpp @@ -4,7 +4,7 @@ #include #include -#include +#include #include #include #include diff --git a/common/eda_doc.cpp b/common/eda_doc.cpp index 495359cf06..11374c9dff 100644 --- a/common/eda_doc.cpp +++ b/common/eda_doc.cpp @@ -3,7 +3,7 @@ */ #include -#include +#include #include #include #include @@ -14,19 +14,20 @@ #include -void EDA_APP::ReadPdfBrowserInfos() +void PGM_BASE::ReadPdfBrowserInfos() { - wxASSERT( m_commonSettings != NULL ); + wxASSERT( m_common_settings ); - m_PdfBrowser = m_commonSettings->Read( wxT( "PdfBrowserName" ), wxEmptyString ); + wxString browser = m_common_settings->Read( wxT( "PdfBrowserName" ), wxEmptyString ); + SetPdfBrowserName( browser ); } -void EDA_APP::WritePdfBrowserInfos() +void PGM_BASE::WritePdfBrowserInfos() { - wxASSERT( m_commonSettings != NULL ); + wxASSERT( m_common_settings ); - m_commonSettings->Write( wxT( "PdfBrowserName" ), m_PdfBrowser ); + m_common_settings->Write( wxT( "PdfBrowserName" ), GetPdfBrowserName() ); } @@ -122,7 +123,7 @@ bool GetAssociatedDocument( wxFrame* aFrame, if( !wxFileExists( fullfilename ) ) { - msg.Printf( _( "Doc File <%s> not found" ), GetChars( aDocName ) ); + msg.Printf( _( "Doc File '%s' not found" ), GetChars( aDocName ) ); DisplayError( aFrame, msg ); return false; } diff --git a/common/eda_text.cpp b/common/eda_text.cpp index 35983951af..97da020d55 100644 --- a/common/eda_text.cpp +++ b/common/eda_text.cpp @@ -94,7 +94,7 @@ EDA_TEXT::~EDA_TEXT() int EDA_TEXT::LenSize( const wxString& aLine ) const { - return ReturnGraphicTextWidth( aLine, m_Size.x, m_Italic, m_Bold ); + return GraphicTextWidth( aLine, m_Size.x, m_Italic, m_Bold ); } /** diff --git a/common/edaappl.cpp b/common/edaappl.cpp deleted file mode 100644 index a512c0dc84..0000000000 --- a/common/edaappl.cpp +++ /dev/null @@ -1,1197 +0,0 @@ -/* - * This program source code file is part of KiCad, a free EDA CAD application. - * - * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2008-2011 Wayne Stambaugh - * Copyright (C) 1992-2011 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 - */ - -/** - * @file edaappl.cpp - * - * @brief For the main application: init functions, and language selection - * (locale handling) - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -static const wxChar* CommonConfigPath = wxT( "kicad_common" ); - - -// some key strings used to store parameters in config -static const wxChar backgroundColorKey[] = wxT( "BackgroundColor" ); -static const wxChar showPageLimitsKey[] = wxT( "ShowPageLimits" ); -static const wxChar workingDirKey[] = wxT( "WorkingDir" ); -static const wxChar languageCfgKey[] = wxT( "LanguageID" ); -static const wxChar kicadFpLibPath[] = wxT( "KicadFootprintLibraryPath" ); - - -/** - * A small class to handle the list of existing translations. - * The locale translation is automatic. - * The selection of languages is mainly for maintainer's convenience - * To add a support to a new translation: - * create a new icon (flag of the country) (see Lang_Fr.xpm as an example) - * add a new item to s_Languages[]. - */ -struct LANGUAGE_DESCR -{ - /// wxWidgets locale identifier (See wxWidgets doc) - int m_WX_Lang_Identifier; - - /// KiCad identifier used in menu selection (See id.h) - int m_KI_Lang_Identifier; - - /// The menu language icons - BITMAP_DEF m_Lang_Icon; - - /// Labels used in menus - wxString m_Lang_Label; - - /// Set to true if the m_Lang_Label must not be translated - bool m_DoNotTranslate; -}; - - -/** - * Variable s_Languages - * Note: because this list is not created on the fly, wxTranslation - * must be called when a language name must be displayed after translation. - * Do not change this behavior, because m_Lang_Label is also used as key in config - */ -static LANGUAGE_DESCR s_Languages[] = -{ - // Default language - { - wxLANGUAGE_DEFAULT, - ID_LANGUAGE_DEFAULT, - lang_def_xpm, - _( "Default" ) - }, - - // English language - { - wxLANGUAGE_ENGLISH, - ID_LANGUAGE_ENGLISH, - lang_en_xpm, - wxT( "English" ), - true - }, - - // French language - { - wxLANGUAGE_FRENCH, - ID_LANGUAGE_FRENCH, - lang_fr_xpm, - _( "French" ) - }, - - // Finnish language - { - wxLANGUAGE_FINNISH, - ID_LANGUAGE_FINNISH, - lang_fi_xpm, - _( "Finnish" ) - }, - - // Spanish language - { - wxLANGUAGE_SPANISH, - ID_LANGUAGE_SPANISH, - lang_es_xpm, - _( "Spanish" ) - }, - - // Portuguese language - { - wxLANGUAGE_PORTUGUESE, - ID_LANGUAGE_PORTUGUESE, - lang_pt_xpm, - _( "Portuguese" ) - }, - - // Italian language - { - wxLANGUAGE_ITALIAN, - ID_LANGUAGE_ITALIAN, - lang_it_xpm, - _( "Italian" ) - }, - - // German language - { - wxLANGUAGE_GERMAN, - ID_LANGUAGE_GERMAN, - lang_de_xpm, - _( "German" ) - }, - - // Greek language - { - wxLANGUAGE_GREEK, - ID_LANGUAGE_GREEK, - lang_gr_xpm, - _( "Greek" ) - }, - - // Slovenian language - { - wxLANGUAGE_SLOVENIAN, - ID_LANGUAGE_SLOVENIAN, - lang_sl_xpm, - _( "Slovenian" ) - }, - - // Hungarian language - { - wxLANGUAGE_HUNGARIAN, - ID_LANGUAGE_HUNGARIAN, - lang_hu_xpm, - _( "Hungarian" ) - }, - - // Polish language - { - wxLANGUAGE_POLISH, - ID_LANGUAGE_POLISH, - lang_pl_xpm, - _( "Polish" ) - }, - - // Czech language - { - wxLANGUAGE_CZECH, - ID_LANGUAGE_CZECH, - lang_cs_xpm, - _( "Czech" ) - }, - - // Russian language - { - wxLANGUAGE_RUSSIAN, - ID_LANGUAGE_RUSSIAN, - lang_ru_xpm, - _( "Russian" ) - }, - - // Korean language - { - wxLANGUAGE_KOREAN, - ID_LANGUAGE_KOREAN, - lang_ko_xpm, - _( "Korean" ) - }, - - // Chinese simplified - { - wxLANGUAGE_CHINESE_SIMPLIFIED, - ID_LANGUAGE_CHINESE_SIMPLIFIED, - lang_chinese_xpm, - _( "Chinese simplified" ) - }, - - // Catalan language - { - wxLANGUAGE_CATALAN, - ID_LANGUAGE_CATALAN, - lang_catalan_xpm, - _( "Catalan" ) - }, - - // Dutch language - { - wxLANGUAGE_DUTCH, - ID_LANGUAGE_DUTCH, - lang_nl_xpm, - _( "Dutch" ) - }, - - // Japanese language - { - wxLANGUAGE_JAPANESE, - ID_LANGUAGE_JAPANESE, - lang_jp_xpm, - _( "Japanese" ) - }, - - // Bulgarian language - { - wxLANGUAGE_BULGARIAN, - ID_LANGUAGE_BULGARIAN, - lang_bg_xpm, - _( "Bulgarian" ) - } -}; - - -EDA_APP::EDA_APP() -{ - m_Checker = NULL; - m_oneInstancePerFileChecker = NULL; - m_HtmlCtrl = NULL; - m_settings = NULL; - setLanguageId( wxLANGUAGE_DEFAULT ); - m_Locale = NULL; - m_projectSettings = NULL; - m_commonSettings = NULL; -} - - -EDA_APP::~EDA_APP() -{ - SaveSettings(); - - // delete user datas - delete m_projectSettings; - delete m_commonSettings; - delete m_settings; - delete m_Checker; - delete m_oneInstancePerFileChecker; - delete m_Locale; -} - - -void EDA_APP::InitEDA_Appl( const wxString& aName, EDA_APP_T aId ) -{ - m_Id = aId; - m_Checker = new wxSingleInstanceChecker( aName.Lower() + wxT( "-" ) + wxGetUserId() ); - - // Init KiCad environment - // the environment variable KICAD (if exists) gives the kicad path: - // something like set KICAD=d:\kicad - bool isDefined = wxGetEnv( wxT( "KICAD" ), &m_KicadEnv ); - - if( isDefined ) // ensure m_KicadEnv ends by "/" - { - m_KicadEnv.Replace( WIN_STRING_DIR_SEP, UNIX_STRING_DIR_SEP ); - - if( !m_KicadEnv.IsEmpty() && m_KicadEnv.Last() != '/' ) - m_KicadEnv += UNIX_STRING_DIR_SEP; - } - - // Prepare On Line Help. Use only lower case for help file names, in order to - // avoid problems with upper/lower case file names under windows and unix. -#if defined ONLINE_HELP_FILES_FORMAT_IS_HTML - m_HelpFileName = aName.Lower() + wxT( ".html" ); -#elif defined ONLINE_HELP_FILES_FORMAT_IS_PDF - m_HelpFileName = aName.Lower() + wxT( ".pdf" ); -#else - #error Help files format not defined -#endif - - // Init parameters for configuration - SetVendorName( wxT( "KiCad" ) ); - SetAppName( aName.Lower() ); - SetTitle( aName ); - - m_settings = new wxConfig(); - - wxASSERT( m_settings != NULL ); - - m_commonSettings = new wxConfig( CommonConfigPath ); - wxASSERT( m_commonSettings != NULL ); - - // Install some image handlers, mainly for help - wxImage::AddHandler( new wxPNGHandler ); - wxImage::AddHandler( new wxGIFHandler ); - wxImage::AddHandler( new wxJPEGHandler ); - wxFileSystem::AddHandler( new wxZipFSHandler ); - - // Analyze the command line & init binary path - SetBinDir(); - SetDefaultSearchPaths(); - SetLanguagePath(); - ReadPdfBrowserInfos(); - - // Internationalization: loading the kicad suitable Dictionary - wxString languageSel; - m_commonSettings->Read( languageCfgKey, &languageSel); - - setLanguageId( wxLANGUAGE_DEFAULT ); - - // Search for the current selection - for( unsigned ii = 0; ii < DIM( s_Languages ); ii++ ) - { - if( s_Languages[ii].m_Lang_Label == languageSel ) - { - setLanguageId( s_Languages[ii].m_WX_Lang_Identifier ); - break; - } - } - - bool succes = SetLanguage( true ); - - if( !succes ) - { - } - - // Set locale option for separator used in float numbers - SetLocaleTo_Default(); -} - - -void EDA_APP::SetHtmlHelpController( wxHtmlHelpController* aController ) -{ - delete m_HtmlCtrl; - - m_HtmlCtrl = aController; -} - - -void EDA_APP::InitOnLineHelp() -{ - wxString fullfilename = FindKicadHelpPath(); - -#if defined ONLINE_HELP_FILES_FORMAT_IS_HTML - m_HelpFileName = fullfilename + wxT( ".html" ); - fullfilename += wxT( "kicad.hhp" ); - - if( wxFileExists( fullfilename ) ) - { - m_HtmlCtrl = new wxHtmlHelpController( wxHF_TOOLBAR | wxHF_CONTENTS | - wxHF_PRINT | wxHF_OPEN_FILES - /*| wxHF_SEARCH */ ); - m_HtmlCtrl->UseConfig( m_commonSettings ); - m_HtmlCtrl->SetTitleFormat( wxT( "KiCad Help" ) ); - m_HtmlCtrl->AddBook( fullfilename ); - } - -#elif defined ONLINE_HELP_FILES_FORMAT_IS_PDF - m_HtmlCtrl = NULL; - -#else - #error Help files format not defined -#endif -} - - -bool EDA_APP::SetBinDir() -{ -// Apple MacOSx -#ifdef __APPLE__ - - // Derive path from location of the app bundle - CFBundleRef mainBundle = CFBundleGetMainBundle(); - - if( mainBundle == NULL ) - return false; - - CFURLRef urlref = CFBundleCopyBundleURL( mainBundle ); - - if( urlref == NULL ) - return false; - - CFStringRef str = CFURLCopyFileSystemPath( urlref, kCFURLPOSIXPathStyle ); - - if( str == NULL ) - return false; - - char* native_str = NULL; - int len = CFStringGetMaximumSizeForEncoding( CFStringGetLength( str ), - kCFStringEncodingUTF8 ) + 1; - native_str = new char[len]; - - CFStringGetCString( str, native_str, len, kCFStringEncodingUTF8 ); - m_BinDir = FROM_UTF8( native_str ); - delete[] native_str; - -#elif defined(__UNIX__) // Linux and non-Apple Unix - m_BinDir = wxStandardPaths::Get().GetExecutablePath(); - -#else - m_BinDir = argv[0]; -#endif - - // Use unix notation for paths. I am not sure this is a good idea, - // but it simplifies compatibility between Windows and Unices. - // However it is a potential problem in path handling under Windows. - m_BinDir.Replace( WIN_STRING_DIR_SEP, UNIX_STRING_DIR_SEP ); - - // Remove file name form command line: - while( m_BinDir.Last() != '/' && !m_BinDir.IsEmpty() ) - m_BinDir.RemoveLast(); - - return true; -} - - -void EDA_APP::SetDefaultSearchPaths() -{ - wxString path = m_BinDir; - wxPathList tmp; - - m_searchPaths.Clear(); - -#ifdef __WINDOWS__ - - /* m_BinDir path is in unix notation. - * But wxFileName expect (to work fine) native notation - * specifically when using a path including a server, like - * \\myserver\local_path . - */ - path.Replace( UNIX_STRING_DIR_SEP, WIN_STRING_DIR_SEP ); - -#endif - wxFileName fn( path, wxEmptyString ); - - /* User environment variable path is the first search path. Chances are - * if the user is savvy enough to set an environment variable they know - * what they are doing. */ - if( ::wxGetEnv( wxT( "KICAD" ), NULL ) ) - tmp.AddEnvList( wxT( "KICAD" ) ); - - // Add the user's home path. - tmp.Add( GetTraits()->GetStandardPaths().GetUserDataDir() ); - - // Standard application data path if it is different from the binary path. - if( fn.GetPath() != GetTraits()->GetStandardPaths().GetDataDir() ) - { - tmp.Add( GetTraits()->GetStandardPaths().GetDataDir() ); - } - - // Up one level relative to binary path with "share" appended for Windows. - fn.RemoveLastDir(); - tmp.Add( fn.GetPath() ); - - /* The normal OS program file install paths allow for binary to be - * installed in a different path from the library files. This is - * useful for development purposes so the library and documentation - * files do not need to be installed separately. If someone can - * figure out a way to implement this without #ifdef, please do. - */ -#ifdef __WXMSW__ - tmp.AddEnvList( wxT( "PROGRAMFILES" ) ); -#elif __WXMAC__ - tmp.Add( wxString( wxGetenv( wxT( "HOME" ) ) ) + wxT( "/Library/Application Support" ) ); - tmp.Add( wxT( "/Library/Application Support" ) ); -#else - tmp.AddEnvList( wxT( "PATH" ) ); -#endif - - // This is the equivalent of CMAKE_INSTALL_PREFIX. Useful when installed by `make install`. - tmp.Add( wxT( DEFAULT_INSTALL_PATH ) ); - - // Add kicad, kicad/share, share, and share/kicad to each possible base path. - for( unsigned i = 0; i < tmp.GetCount(); i++ ) - { - fn = wxFileName( tmp[i], wxEmptyString ); - - if( fn.GetPath().AfterLast( fn.GetPathSeparator() ) == wxT( "bin" ) ) - fn.RemoveLastDir(); - - m_searchPaths.Add( fn.GetPath() ); - fn.AppendDir( wxT( "kicad" ) ); - m_searchPaths.Add( fn.GetPath() ); - fn.AppendDir( wxT( "share" ) ); - m_searchPaths.Add( fn.GetPath() ); - fn.RemoveLastDir(); - fn.RemoveLastDir(); - fn.AppendDir( wxT( "share" ) ); - m_searchPaths.Add( fn.GetPath() ); - fn.AppendDir( wxT( "kicad" ) ); - m_searchPaths.Add( fn.GetPath() ); - } - - // Remove all non-existent paths from the list. - for( unsigned i = 0; i < m_searchPaths.GetCount(); i++ ) - { - if( !wxFileName::IsDirReadable( m_searchPaths[i] ) ) - { - m_searchPaths.RemoveAt( i ); - i -= 1; - } - else - { - fn.Clear(); - fn.SetPath( m_searchPaths[i] ); - - /* Add schematic library file path to search path list. - * we must add /library and /library/doc - */ - if( m_Id == APP_EESCHEMA_T ) - { - fn.AppendDir( wxT( "library" ) ); - - if( fn.IsDirReadable() ) - { - m_libSearchPaths.Add( fn.GetPath() ); - } - - // Add schematic doc file path (library/doc)to search path list. - fn.AppendDir( wxT( "doc" ) ); - - if( fn.IsDirReadable() ) - { - m_libSearchPaths.Add( fn.GetPath() ); - } - - fn.RemoveLastDir(); - fn.RemoveLastDir(); // point to - } - - // Add PCB library file path to search path list. - if( m_Id == APP_PCBNEW_T || m_Id == APP_CVPCB_T ) - { - fn.AppendDir( wxT( "modules" ) ); - - if( fn.IsDirReadable() ) - { - m_libSearchPaths.Add( fn.GetPath() ); - } - - // Add 3D module library file path to search path list. - fn.AppendDir( wxT( "packages3d" ) ); - - if( fn.IsDirReadable() ) - { - m_libSearchPaths.Add( fn.GetPath() ); - } - - fn.RemoveLastDir(); - fn.RemoveLastDir(); // point to - } - - // Add KiCad template file path to search path list. - fn.AppendDir( wxT( "template" ) ); - - if( fn.IsDirReadable() ) - { - m_libSearchPaths.Add( fn.GetPath() ); - } - - fn.RemoveLastDir(); - } - } - -#if 0 && defined( DEBUG ) - wxLogDebug( wxT( "Library search paths:" ) ); - - for( unsigned i = 0; i < m_libSearchPaths.GetCount(); i++ ) - wxLogDebug( wxT( " %s" ), GetChars( m_libSearchPaths[i] ) ); -#endif -} - - -void EDA_APP::GetSettings( bool aReopenLastUsedDirectory ) -{ - wxASSERT( m_settings != NULL && m_commonSettings != NULL ); - - m_HelpSize.x = 500; - m_HelpSize.y = 400; - - wxString languageSel; - - m_commonSettings->Read( languageCfgKey, &languageSel ); - setLanguageId( wxLANGUAGE_DEFAULT ); - - // Search for the current selection - for( unsigned ii = 0; ii < DIM( s_Languages ); ii++ ) - { - if( s_Languages[ii].m_Lang_Label == languageSel ) - { - setLanguageId( s_Languages[ii].m_WX_Lang_Identifier ); - break; - } - } - - m_EditorName = m_commonSettings->Read( wxT( "Editor" ) ); - - m_fileHistory.Load( *m_settings ); - - m_settings->Read( showPageLimitsKey, &g_ShowPageLimits ); - - if( aReopenLastUsedDirectory ) - { - wxString dir; - - if( m_settings->Read( workingDirKey, &dir ) && wxDirExists( dir ) ) - { - wxSetWorkingDirectory( dir ); - } - } - - // FIXME OSX Mountain Lion (10.8) - // Seems that Read doesn't found anything and ColorFromInt Asserts - I'm unable to reproduce - // on 10.7 - // In general terms I think is better have a failsafe default than an uninit variable - int draw_bg_color = (int)BLACK; // Default for all apps but Eeschema - - if( m_Id == APP_EESCHEMA_T ) - draw_bg_color = (int)WHITE; // Default for Eeschema - - m_settings->Read( backgroundColorKey, &draw_bg_color ); - g_DrawBgColor = ColorFromInt( draw_bg_color ); - - // Load per-user search paths from settings file - - wxString upath; - int i = 1; - - while( 1 ) - { - upath = m_commonSettings->Read( - wxString::Format( wxT( "LibraryPath%d" ), i ), wxT( "" ) ); - - if( upath.IsSameAs( wxT( "" ) ) ) - break; - - m_libSearchPaths.Add( upath ); - i++; - } -} - - -void EDA_APP::SaveSettings() -{ - wxASSERT( m_settings != NULL ); - - m_settings->Write( showPageLimitsKey, g_ShowPageLimits ); - m_settings->Write( workingDirKey, wxGetCwd() ); - m_settings->Write( backgroundColorKey, (long) g_DrawBgColor ); - - // Save the file history list - m_fileHistory.Save( *m_settings ); -} - - -bool EDA_APP::SetLanguage( bool first_time ) -{ - bool retv = true; - - // dictionary file name without extend (full name is kicad.mo) - wxString DictionaryName( wxT( "kicad" ) ); - - delete m_Locale; - m_Locale = new wxLocale; - -#if wxCHECK_VERSION( 2, 9, 0 ) - if( !m_Locale->Init( m_LanguageId ) ) -#else - if( !m_Locale->Init( m_LanguageId, wxLOCALE_CONV_ENCODING ) ) -#endif - { - wxLogDebug( wxT( "This language is not supported by the system." ) ); - - setLanguageId( wxLANGUAGE_DEFAULT ); - delete m_Locale; - - m_Locale = new wxLocale; - m_Locale->Init(); - retv = false; - } - else if( !first_time ) - { - wxLogDebug( wxT( "Search for dictionary %s.mo in %s" ), - GetChars( DictionaryName ), GetChars( m_Locale->GetName() ) ); - } - - if( !first_time ) - { - wxString languageSel; - - // Search for the current selection - for( unsigned ii = 0; ii < DIM( s_Languages ); ii++ ) - { - if( s_Languages[ii].m_WX_Lang_Identifier == m_LanguageId ) - { - languageSel = s_Languages[ii].m_Lang_Label; - break; - } - } - - m_commonSettings->Write( languageCfgKey, languageSel ); - } - - // Test if floating point notation is working (bug in cross compilation, using wine) - // Make a conversion double <=> string - double dtst = 0.5; - wxString msg; - - extern bool g_DisableFloatingPointLocalNotation; // See common.cpp - - g_DisableFloatingPointLocalNotation = false; - - msg << dtst; - double result; - msg.ToDouble( &result ); - - if( result != dtst ) // string to double encode/decode does not work! Bug detected - { - // Disable floating point localization: - g_DisableFloatingPointLocalNotation = true; - SetLocaleTo_C_standard( ); - } - - if( !m_Locale->IsLoaded( DictionaryName ) ) - m_Locale->AddCatalog( DictionaryName ); - - if( !retv ) - return retv; - - return m_Locale->IsOk(); -} - - -void EDA_APP::SetLanguageIdentifier( int menu_id ) -{ - wxLogDebug( wxT( "Select language ID %d from %zd possible languages." ), - menu_id, DIM( s_Languages ) ); - - for( unsigned ii = 0; ii < DIM( s_Languages ); ii++ ) - { - if( menu_id == s_Languages[ii].m_KI_Lang_Identifier ) - { - setLanguageId( s_Languages[ii].m_WX_Lang_Identifier ); - break; - } - } -} - - -void EDA_APP::SetLanguagePath() -{ - // Add defined search paths to locale paths - if( !m_searchPaths.IsEmpty() ) - { - for( unsigned i = 0; i < m_searchPaths.GetCount(); i++ ) - { - wxFileName fn( m_searchPaths[i], wxEmptyString ); - - // Append path for Windows and unix KiCad pack install - fn.AppendDir( wxT( "share" ) ); - fn.AppendDir( wxT( "internat" ) ); - - if( fn.DirExists() ) - { - wxLogDebug( wxT( "Adding locale lookup path: " ) + fn.GetPath() ); - wxLocale::AddCatalogLookupPathPrefix( fn.GetPath() ); - } - - // Append path for unix standard install - fn.RemoveLastDir(); - - // Append path for unix standard install - fn.AppendDir( wxT( "kicad" ) ); - fn.AppendDir( wxT( "internat" ) ); - - if( fn.DirExists() ) - { - wxLogDebug( wxT( "Adding locale lookup path: " ) + fn.GetPath() ); - wxLocale::AddCatalogLookupPathPrefix( fn.GetPath() ); - } - } - } -} - - -void EDA_APP::AddMenuLanguageList( wxMenu* MasterMenu ) -{ - wxMenu* menu = NULL; - wxMenuItem* item; - - item = MasterMenu->FindItem( ID_LANGUAGE_CHOICE ); - - if( item ) // This menu exists, do nothing - return; - - menu = new wxMenu; - - for( unsigned ii = 0; ii < DIM( s_Languages ); ii++ ) - { - wxString label; - - if( s_Languages[ii].m_DoNotTranslate ) - label = s_Languages[ii].m_Lang_Label; - else - label = wxGetTranslation( s_Languages[ii].m_Lang_Label ); - - AddMenuItem( menu, s_Languages[ii].m_KI_Lang_Identifier, - label, KiBitmap(s_Languages[ii].m_Lang_Icon ), - wxITEM_CHECK ); - } - - AddMenuItem( MasterMenu, menu, - ID_LANGUAGE_CHOICE, - _( "Language" ), - _( "Select application language (only for testing!)" ), - KiBitmap( language_xpm ) ); - - // Set Check mark on current selected language - for( unsigned ii = 0; ii < DIM( s_Languages ); ii++ ) - { - if( m_LanguageId == s_Languages[ii].m_WX_Lang_Identifier ) - menu->Check( s_Languages[ii].m_KI_Lang_Identifier, true ); - else - menu->Check( s_Languages[ii].m_KI_Lang_Identifier, false ); - } -} - - -wxString EDA_APP::FindFileInSearchPaths( - const wxString& filename, const wxArrayString* subdirs ) -{ - size_t i, j; - wxFileName fn; - wxPathList paths; - - for( i = 0; i < m_searchPaths.GetCount(); i++ ) - { - fn = wxFileName( m_searchPaths[i], wxEmptyString ); - if( subdirs ) - { - for( j = 0; j < subdirs->GetCount(); j++ ) - fn.AppendDir( subdirs->Item( j ) ); - } - - if( fn.DirExists() ) - { - paths.Add( fn.GetPath() ); - } - } - - return paths.FindValidPath( filename ); -} - - -wxString EDA_APP::GetHelpFile() -{ - wxString fn; - wxArrayString subdirs, altsubdirs; - - /* FIXME: This is not the ideal way to handle this. Unfortunately, the - * CMake install paths seem to be a moving target so this crude - * hack solve the problem of install path differences between - * Windows and non-Windows platforms. */ - - // Partially fixed, but must be enhanced - - // Create subdir tree for "standard" linux distributions, when KiCad comes - // from a distribution files are in /usr/share/doc/kicad/help and binaries - // in /usr/bin or /usr/local/bin - subdirs.Add( wxT( "share" ) ); - subdirs.Add( _T( "doc" ) ); - subdirs.Add( wxT( "kicad" ) ); - subdirs.Add( _T( "help" ) ); - - // Create subdir tree for linux and Windows KiCad pack. - // Note the pack form under linux is also useful if a user wants to - // install KiCad to a server because there is only one path to mount - // or export (something like /usr/local/kicad). - // files are in /kicad/doc/help - // (often /usr/local/kicad/kicad/doc/help) - // /kicad/ is retrieved from m_BinDir - altsubdirs.Add( _T( "doc" ) ); - altsubdirs.Add( _T( "help" ) ); - - /* Search for a help file. - * we *must* find a help file. - * so help is searched in directories in this order: - * help/ like help/en_GB - * help/ like help/en - * help/en - */ - - // Step 1 : Try to find help file in help/ - subdirs.Add( m_Locale->GetCanonicalName() ); - altsubdirs.Add( m_Locale->GetCanonicalName() ); - - fn = FindFileInSearchPaths( m_HelpFileName, &altsubdirs ); - - if( !fn ) - fn = FindFileInSearchPaths( m_HelpFileName, &subdirs ); - - // Step 2 : if not found Try to find help file in help/ - if( !fn ) - { - subdirs.RemoveAt( subdirs.GetCount() - 1 ); - altsubdirs.RemoveAt( altsubdirs.GetCount() - 1 ); - - // wxLocale::GetName() does not return always the short name - subdirs.Add( m_Locale->GetName().BeforeLast( '_' ) ); - altsubdirs.Add( m_Locale->GetName().BeforeLast( '_' ) ); - - fn = FindFileInSearchPaths( m_HelpFileName, &altsubdirs ); - - if( !fn ) - fn = FindFileInSearchPaths( m_HelpFileName, &subdirs ); - } - - // Step 3 : if not found Try to find help file in help/en - if( !fn ) - { - subdirs.RemoveAt( subdirs.GetCount() - 1 ); - altsubdirs.RemoveAt( altsubdirs.GetCount() - 1 ); - subdirs.Add( _T( "en" ) ); - altsubdirs.Add( _T( "en" ) ); - - fn = FindFileInSearchPaths( m_HelpFileName, &altsubdirs ); - - if( !fn ) - fn = FindFileInSearchPaths( m_HelpFileName, &subdirs ); - } - - return fn; -} - - -wxString EDA_APP::ReturnLastVisitedLibraryPath( const wxString& aSubPathToSearch ) -{ - if( !m_LastVisitedLibPath.IsEmpty() ) - return m_LastVisitedLibPath; - - wxString path; - - /* Initialize default path to the main default lib path - * this is the second path in list (the first is the project path) - */ - unsigned pcount = m_libSearchPaths.GetCount(); - - if( pcount ) - { - unsigned ipath = 0; - - if( m_libSearchPaths[0] == wxGetCwd() ) - ipath = 1; - - // First choice of path: - if( ipath < pcount ) - path = m_libSearchPaths[ipath]; - - // Search a sub path matching aSubPathToSearch - if( !aSubPathToSearch.IsEmpty() ) - { - for( ; ipath < pcount; ipath++ ) - { - if( m_libSearchPaths[ipath].Contains( aSubPathToSearch ) ) - { - path = m_libSearchPaths[ipath]; - break; - } - } - } - } - - if( path.IsEmpty() ) - path = wxGetCwd(); - - return path; -} - - -void EDA_APP::SaveLastVisitedLibraryPath( const wxString& aPath ) -{ - m_LastVisitedLibPath = aPath; -} - - -wxString EDA_APP::ReturnFilenameWithRelativePathInLibPath( const wxString& aFullFilename ) -{ - /* If the library path is already in the library search paths - * list, just add the library name to the list. Otherwise, add - * the library name with the full or relative path. - * the relative path, when possible is preferable, - * because it preserve use of default libraries paths, when the path is a sub path of - * these default paths - * Note we accept only sub paths, - * not relative paths starting by ../ that are not subpaths and are outside kicad libs paths - */ - wxFileName fn = aFullFilename; - wxString filename = aFullFilename; - unsigned pathlen = fn.GetPath().Len(); /* path len, used to find the better (shortest) - * subpath within defaults paths */ - - for( unsigned kk = 0; kk < m_libSearchPaths.GetCount(); kk++ ) - { - fn = aFullFilename; - - // Search for the shortest subpath within m_libSearchPaths: - if( fn.MakeRelativeTo( m_libSearchPaths[kk] ) ) - { - if( fn.GetPathWithSep().StartsWith( wxT("..") ) ) // Path outside kicad libs paths - continue; - - if( pathlen > fn.GetPath().Len() ) // A better (shortest) subpath is found - { - filename = fn.GetPathWithSep() + fn.GetFullName(); - pathlen = fn.GetPath().Len(); - } - } - } - - return filename; -} - - -wxString EDA_APP::FindLibraryPath( const wxString& aFileName ) -{ - if( wxFileName::FileExists( aFileName ) ) - return aFileName; - else - return m_libSearchPaths.FindValidPath( aFileName ); -} - - -void EDA_APP::RemoveLibraryPath( const wxString& aPaths ) -{ - wxStringTokenizer Token( aPaths, wxT( ";\n\r" ) ); - - while( Token.HasMoreTokens() ) - { - wxString path = Token.GetNextToken(); - - if( m_libSearchPaths.Index( path, wxFileName::IsCaseSensitive() ) != wxNOT_FOUND ) - { - m_libSearchPaths.Remove( path ); - } - } -} - - -void EDA_APP::InsertLibraryPath( const wxString& aPaths, size_t aIndex ) -{ - wxStringTokenizer Token( aPaths, wxT( ";\n\r" ) ); - - while( Token.HasMoreTokens() ) - { - wxString path = Token.GetNextToken(); - - if( wxFileName::DirExists( path ) - && m_libSearchPaths.Index( path, wxFileName::IsCaseSensitive() ) == wxNOT_FOUND ) - { - if( aIndex >= m_libSearchPaths.GetCount() ) - { - m_libSearchPaths.Add( path ); - } - else - { - m_libSearchPaths.Insert( path, aIndex ); - } - - aIndex++; - } - } -} - - -bool EDA_APP::LockFile( const wxString& fileName ) -{ - // first make absolute and normalize, to avoid that different lock files - // for the same file can be created - wxFileName fn = fileName; - - fn.MakeAbsolute(); - - // semaphore to protect the edition of the file by more than one instance - if( m_oneInstancePerFileChecker != NULL ) - { - // it means that we had an open file and we are opening a different one - delete m_oneInstancePerFileChecker; - } - - wxString lockFileName = fn.GetFullPath() + wxT( ".lock" ); - - lockFileName.Replace( wxT( "/" ), wxT( "_" ) ); - - // We can have filenames coming from Windows, so also convert Windows separator - lockFileName.Replace( wxT( "\\" ), wxT( "_" ) ); - - m_oneInstancePerFileChecker = new wxSingleInstanceChecker( lockFileName ); - - if( m_oneInstancePerFileChecker && - m_oneInstancePerFileChecker->IsAnotherRunning() ) - { - return false; - } - - return true; -} - - -bool EDA_APP::SetFootprintLibTablePath() -{ - wxString path; - wxString kisysmod( wxT( KISYSMOD ) ); - - // Set the KISYSMOD environment variable for the current process if it is not already - // defined in the user's environment. This is required to expand the global footprint - // library table paths. - if( wxGetEnv( kisysmod, &path ) && wxFileName::DirExists( path ) ) - return true; - - // Set the KISYSMOD environment variable to the path defined in the user's configuration - // if it is defined and the path exists. - if( m_commonSettings->Read( kicadFpLibPath, &path ) && wxFileName::DirExists( path ) ) - { - wxSetEnv( kisysmod, path ); - return true; - } - - // Attempt to determine where the footprint libraries were installed using the legacy - // library search paths. - if( !GetLibraryPathList().IsEmpty() ) - { - unsigned modFileCount = 0; - wxString bestPath; - wxArrayString tmp; - - for( unsigned i = 0; i < GetLibraryPathList().GetCount(); i++ ) - { - unsigned cnt = wxDir::GetAllFiles( GetLibraryPathList()[i], &tmp, wxT( "*.mod" ), - wxDIR_FILES ); - - if( cnt > modFileCount ) - { - modFileCount = cnt; - bestPath = GetLibraryPathList()[i]; - } - } - - if( modFileCount != 0 ) - { - wxSetEnv( kisysmod, bestPath ); - return true; - } - } - - return false; -} - diff --git a/common/footprint_info.cpp b/common/footprint_info.cpp index 99d9cd4a9b..99dde1c4bd 100644 --- a/common/footprint_info.cpp +++ b/common/footprint_info.cpp @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/common/fp_lib_table.cpp b/common/fp_lib_table.cpp index 3df80ec6d1..880109c048 100644 --- a/common/fp_lib_table.cpp +++ b/common/fp_lib_table.cpp @@ -30,7 +30,9 @@ #include -#include +//#include +#include +#include #include #include #include @@ -52,11 +54,11 @@ static const wxString traceFpLibTable( wxT( "KicadFpLibTable" ) ); /// The footprint library table name used when no project file is passed to Pcbnew or CvPcb. /// This is used temporarily to store the project specific library table until the project -/// file being edited is save. It is then moved to the file fp-lib-table in the folder where +/// file being edited is saved. It is then moved to the file fp-lib-table in the folder where /// the project file is saved. -static wxString defaultProjectFileName( wxT( "prj-fp-lib-table" ) ); +static const wxChar templateProjectFileName[] = wxT( "prj-fp-lib-table" ); -static wxString defaultFileName( wxT( "fp-lib-table" ) ); +static const wxChar global_tbl_name[] = wxT( "fp-lib-table" ); void FP_LIB_TABLE::ROW::SetType( const wxString& aType ) @@ -409,7 +411,7 @@ void FP_LIB_TABLE::ROW::Format( OUTPUTFORMATTER* out, int nestLevel ) const void FP_LIB_TABLE::Save( const wxFileName& aPath ) const throw( IO_ERROR ) { - wxFileName fn = GetProjectFileName( aPath ); + wxFileName fn = GetProjectTableFileName( aPath.GetFullPath() ); wxLogTrace( traceFpLibTable, wxT( "Saving footprint libary table <%s>." ), GetChars( fn.GetFullPath() ) ); @@ -680,33 +682,8 @@ bool FP_LIB_TABLE::IsEmpty( bool aIncludeFallback ) } -bool FP_LIB_TABLE::MissingLegacyLibs( const wxArrayString& aLibNames, wxString* aErrorMsg ) -{ - bool retv = false; - - for( unsigned i = 0; i < aLibNames.GetCount(); i++ ) - { - wxFileName fn = wxFileName( wxEmptyString, aLibNames[i], LegacyFootprintLibPathExtension ); - wxString legacyLibPath = wxGetApp().FindLibraryPath( fn ); - - if( legacyLibPath.IsEmpty() ) - continue; - - if( FindRowByURI( legacyLibPath ) == 0 ) - { - retv = true; - - if( aErrorMsg ) - *aErrorMsg += wxT( "\"" ) + legacyLibPath + wxT( "\"\n" ); - } - } - - return retv; -} - - -bool FP_LIB_TABLE::ConvertFromLegacy( NETLIST& aNetList, const wxArrayString& aLibNames, - REPORTER* aReporter ) throw( IO_ERROR ) +bool FP_LIB_TABLE::ConvertFromLegacy( SEARCH_STACK& aSStack, NETLIST& aNetList, + const wxArrayString& aLibNames, REPORTER* aReporter ) throw( IO_ERROR ) { wxString msg; FPID lastFPID; @@ -720,7 +697,6 @@ bool FP_LIB_TABLE::ConvertFromLegacy( NETLIST& aNetList, const wxArrayString& aL aNetList.SortByFPID(); wxString libPath; - wxFileName fn; PLUGIN::RELEASER pi( IO_MGR::PluginFind( IO_MGR::LEGACY ) ); @@ -738,9 +714,9 @@ bool FP_LIB_TABLE::ConvertFromLegacy( NETLIST& aNetList, const wxArrayString& aL for( unsigned ii = 0; ii < aLibNames.GetCount(); ii++ ) { - fn = wxFileName( wxEmptyString, aLibNames[ii], LegacyFootprintLibPathExtension ); + wxFileName fn( wxEmptyString, aLibNames[ii], LegacyFootprintLibPathExtension ); - libPath = wxGetApp().FindLibraryPath( fn ); + libPath = aSStack.FindValidPath( fn ); if( !libPath ) { @@ -766,7 +742,7 @@ bool FP_LIB_TABLE::ConvertFromLegacy( NETLIST& aNetList, const wxArrayString& aL } } - if( module == NULL ) + if( !module ) { if( aReporter ) { @@ -780,6 +756,7 @@ bool FP_LIB_TABLE::ConvertFromLegacy( NETLIST& aNetList, const wxArrayString& aL // Clear the footprint assignment since the old library lookup method is no // longer valid. FPID emptyFPID; + component->SetFPID( emptyFPID ); retv = false; continue; @@ -800,7 +777,9 @@ bool FP_LIB_TABLE::ConvertFromLegacy( NETLIST& aNetList, const wxArrayString& aL if( wxFileName::GetPathSeparator() == wxChar( '\\' ) && uri.Find( wxChar( '/' ) ) >= 0 ) + { uri.Replace( wxT( "/"), wxT( "\\" ) ); + } if( uri == libPath ) { @@ -815,7 +794,7 @@ bool FP_LIB_TABLE::ConvertFromLegacy( NETLIST& aNetList, const wxArrayString& aL { if( aReporter ) { - msg.Printf( _( "Component `%s` footprint '%s' legacy library path <%s > " + msg.Printf( _( "Component '%s' footprint '%s' legacy library path '%s' " "was not found in the footprint library table.\n" ), GetChars( component->GetReference() ), GetChars( component->GetFPID().Format() ) ); @@ -834,7 +813,7 @@ bool FP_LIB_TABLE::ConvertFromLegacy( NETLIST& aNetList, const wxArrayString& aL { if( aReporter ) { - msg.Printf( _( "Component `%s` FPID '%s' is not valid.\n" ), + msg.Printf( _( "Component '%s' FPID '%s' is not valid.\n" ), GetChars( component->GetReference() ), GetChars( newFPID.Format() ) ); aReporter->Report( msg ); @@ -855,55 +834,34 @@ bool FP_LIB_TABLE::ConvertFromLegacy( NETLIST& aNetList, const wxArrayString& aL } -void FP_LIB_TABLE::SetProjectPathEnvVariable( const wxFileName& aPath ) -{ - wxString path; - - if( !aPath.IsOk() || !aPath.DirExists() ) - path = wxEmptyString; - else - path = aPath.GetPath(); - - wxLogTrace( traceFpLibTable, wxT( "Setting env %s to '%s'." ), - GetChars( ProjectPathEnvVariableName() ), GetChars( path ) ); - wxSetEnv( ProjectPathEnvVariableName(), path ); -} - - -const wxString FP_LIB_TABLE::ProjectPathEnvVariableName() -{ - return wxT( "KIPRJMOD" ); -} - - const wxString FP_LIB_TABLE::GlobalPathEnvVariableName() { - return wxT( KISYSMOD ); + return wxT( "KISYSMOD" ); } -wxString FP_LIB_TABLE::GetProjectFileName( const wxFileName& aPath ) +wxString FP_LIB_TABLE::GetProjectTableFileName( const wxString& aProjectFullName ) { - wxFileName fn = aPath; + wxFileName fn = aProjectFullName; + wxString path = fn.GetPath(); // Set $KICAD_PRJ_PATH to user's configuration path if aPath is not set or does not exist. - if( !aPath.IsOk() || !aPath.DirExists() ) + + if( !fn.IsOk() || !wxFileName::IsDirReadable( path ) ) { fn.AssignDir( wxStandardPaths::Get().GetUserConfigDir() ); #if defined( __WINDOWS__ ) fn.AppendDir( wxT( "kicad" ) ); #endif - - fn.SetName( defaultProjectFileName ); + fn.SetName( templateProjectFileName ); } else { - fn.AssignDir( aPath.GetPath() ); - fn.SetName( defaultFileName ); + fn.SetName( global_tbl_name ); } - wxLogTrace( traceFpLibTable, wxT( "Project specific footprint library table file '%s'." ), + wxLogTrace( traceFpLibTable, wxT( "Project footprint lib table file '%s'." ), GetChars( fn.GetFullPath() ) ); return fn.GetFullPath(); @@ -912,8 +870,8 @@ wxString FP_LIB_TABLE::GetProjectFileName( const wxFileName& aPath ) bool FP_LIB_TABLE::LoadGlobalTable( FP_LIB_TABLE& aTable ) throw (IO_ERROR, PARSE_ERROR ) { - bool tableExists = true; - wxFileName fn = GetGlobalTableFileName(); + bool tableExists = true; + wxFileName fn = GetGlobalTableFileName(); if( !fn.FileExists() ) { @@ -925,21 +883,22 @@ bool FP_LIB_TABLE::LoadGlobalTable( FP_LIB_TABLE& aTable ) throw (IO_ERROR, PARS GetChars( fn.GetPath() ) ) ); } - // Attempt to copy the default global file table from the KiCad template folder to - // the users home configuration path. - wxString fileName = wxGetApp().FindLibraryPath( defaultFileName ); + // Attempt to copy the default global file table from the KiCad + // template folder to the user's home configuration path. + wxString fileName = Kiface().KifaceSearch().FindValidPath( global_tbl_name ); // The fallback is to create an empty global footprint table for the user to populate. if( fileName.IsEmpty() || !::wxCopyFile( fileName, fn.GetFullPath(), false ) ) { - FP_LIB_TABLE emptyTable; - FILE_OUTPUTFORMATTER sf( fn.GetFullPath() ); + FP_LIB_TABLE emptyTable; + FILE_OUTPUTFORMATTER sf( fn.GetFullPath() ); + emptyTable.Format( &sf, 0 ); } } - FILE_LINE_READER reader( fn.GetFullPath() ); - FP_LIB_TABLE_LEXER lexer( &reader ); + FILE_LINE_READER reader( fn.GetFullPath() ); + FP_LIB_TABLE_LEXER lexer( &reader ); aTable.Parse( &lexer ); return tableExists; @@ -965,9 +924,9 @@ wxString FP_LIB_TABLE::GetGlobalTableFileName() } -const wxString& FP_LIB_TABLE::GetFileName() +const wxString FP_LIB_TABLE::GetFileName() { - return defaultFileName; + return global_tbl_name; } @@ -979,8 +938,9 @@ void FP_LIB_TABLE::Load( const wxFileName& aFileName, FP_LIB_TABLE* aFallBackTab // Empty footprint library tables are valid. if( aFileName.IsOk() && aFileName.FileExists() ) { - FILE_LINE_READER reader( aFileName.GetFullPath() ); - FP_LIB_TABLE_LEXER lexer( &reader ); + FILE_LINE_READER reader( aFileName.GetFullPath() ); + FP_LIB_TABLE_LEXER lexer( &reader ); + Parse( &lexer ); } } diff --git a/common/gestfich.cpp b/common/gestfich.cpp index 900b5b10a9..a66b396c7f 100644 --- a/common/gestfich.cpp +++ b/common/gestfich.cpp @@ -30,7 +30,7 @@ // For compilers that support precompilation, includes "wx.h". #include -#include +#include #include #include @@ -299,14 +299,14 @@ wxString FindKicadHelpPath() bool PathFound = false; /* find kicad/help/ */ - tmp = wxGetApp().GetExecutablePath(); + tmp = Pgm().GetExecutablePath(); if( tmp.Last() == '/' ) tmp.RemoveLast(); FullPath = tmp.BeforeLast( '/' ); // cd .. FullPath += wxT( "/doc/help/" ); - LocaleString = wxGetApp().GetLocale()->GetCanonicalName(); + LocaleString = Pgm().GetLocale()->GetCanonicalName(); wxString path_tmp = FullPath; #ifdef __WINDOWS__ @@ -319,9 +319,9 @@ wxString FindKicadHelpPath() } /* find kicad/help/ from environment variable KICAD */ - if( !PathFound && wxGetApp().IsKicadEnvVariableDefined() ) + if( !PathFound && Pgm().IsKicadEnvVariableDefined() ) { - FullPath = wxGetApp().GetKicadEnvVariable() + wxT( "/doc/help/" ); + FullPath = Pgm().GetKicadEnvVariable() + wxT( "/doc/help/" ); if( wxDirExists( FullPath ) ) PathFound = true; @@ -379,7 +379,7 @@ wxString FindKicadFile( const wxString& shortname ) /* Test the presence of the file in the directory shortname of * the KiCad binary path. */ - FullFileName = wxGetApp().GetExecutablePath() + shortname; + FullFileName = Pgm().GetExecutablePath() + shortname; if( wxFileExists( FullFileName ) ) return FullFileName; @@ -387,9 +387,9 @@ wxString FindKicadFile( const wxString& shortname ) /* Test the presence of the file in the directory shortname * defined by the environment variable KiCad. */ - if( wxGetApp().IsKicadEnvVariableDefined() ) + if( Pgm().IsKicadEnvVariableDefined() ) { - FullFileName = wxGetApp().GetKicadEnvVariable() + shortname; + FullFileName = Pgm().GetKicadEnvVariable() + shortname; if( wxFileExists( FullFileName ) ) return FullFileName; @@ -426,7 +426,7 @@ int ExecuteFile( wxWindow* frame, const wxString& ExecFile, const wxString& para #ifdef __WXMAC__ if( wxFileExists( FullFileName ) || wxDir::Exists( FullFileName ) ) { - return ProcessExecute( wxGetApp().GetExecutablePath() + wxT( "/" ) + return ProcessExecute( Pgm().GetExecutablePath() + wxT( "/" ) + ExecFile + wxT( " " ) + param, wxEXEC_ASYNC, callback ); } @@ -450,26 +450,26 @@ int ExecuteFile( wxWindow* frame, const wxString& ExecFile, const wxString& para } -wxString ReturnKicadDatasPath() +wxString KicadDatasPath() { bool PathFound = false; wxString data_path; - if( wxGetApp().IsKicadEnvVariableDefined() ) // Path defined by the KICAD environment variable. + if( Pgm().IsKicadEnvVariableDefined() ) // Path defined by the KICAD environment variable. { - data_path = wxGetApp().GetKicadEnvVariable(); + data_path = Pgm().GetKicadEnvVariable(); PathFound = true; } else // Path of executables. { - wxString tmp = wxGetApp().GetExecutablePath(); + wxString tmp = Pgm().GetExecutablePath(); #ifdef __WINDOWS__ tmp.MakeLower(); #endif if( tmp.Contains( wxT( "kicad" ) ) ) { #ifdef __WINDOWS__ - tmp = wxGetApp().GetExecutablePath(); + tmp = Pgm().GetExecutablePath(); #endif if( tmp.Last() == '/' ) tmp.RemoveLast(); @@ -527,47 +527,6 @@ wxString ReturnKicadDatasPath() } -wxString& EDA_APP::GetEditorName() -{ - wxString editorname = m_EditorName; - - // We get the preferred editor name from environment variable first. - if( editorname.IsEmpty() ) - { - // If there is no EDITOR variable set, try the desktop default - if(!wxGetEnv( wxT( "EDITOR" ), &editorname )) - { -#ifdef __WXMAC__ - editorname = "/usr/bin/open"; -#elif __WXX11__ - editorname = "/usr/bin/xdg-open"; -#endif - } - } - if( editorname.IsEmpty() ) // We must get a preferred editor name - { - DisplayInfoMessage( NULL, - _( "No default editor found, you must choose it" ) ); - wxString mask( wxT( "*" ) ); - -#ifdef __WINDOWS__ - mask += wxT( ".exe" ); -#endif - editorname = EDA_FileSelector( _( "Preferred Editor:" ), wxEmptyString, - wxEmptyString, wxEmptyString, mask, - NULL, wxFD_OPEN, true ); - } - - if( !editorname.IsEmpty() ) - { - m_EditorName = editorname; - m_commonSettings->Write( wxT( "Editor" ), m_EditorName ); - } - - return m_EditorName; -} - - bool OpenPDF( const wxString& file ) { wxString command; @@ -575,12 +534,12 @@ bool OpenPDF( const wxString& file ) wxString type; bool success = false; - wxGetApp().ReadPdfBrowserInfos(); + Pgm().ReadPdfBrowserInfos(); - if( !wxGetApp().UseSystemPdfBrowser() ) // Run the preferred PDF Browser + if( !Pgm().UseSystemPdfBrowser() ) // Run the preferred PDF Browser { AddDelimiterString( filename ); - command = wxGetApp().GetPdfBrowserFileName() + wxT( " " ) + filename; + command = Pgm().GetPdfBrowserName() + wxT( " " ) + filename; } else { diff --git a/common/gr_basic.cpp b/common/gr_basic.cpp index 22a58b338a..1baa202443 100644 --- a/common/gr_basic.cpp +++ b/common/gr_basic.cpp @@ -1405,113 +1405,6 @@ void GRBezier( EDA_RECT* ClipBox, } -EDA_COLOR_T ColorMix( EDA_COLOR_T aColor1, EDA_COLOR_T aColor2 ) -{ - /* Memoization storage. This could be potentially called for each - * color merge so a cache is useful (there are few colours anyway) */ - static EDA_COLOR_T mix_cache[NBCOLORS][NBCOLORS]; - - // TODO how is alpha used? it's a mac only thing, I have no idea - aColor1 = ColorGetBase( aColor1 ); - aColor2 = ColorGetBase( aColor2 ); - - // First easy thing: a black gives always the other colour - if( aColor1 == BLACK ) - return aColor2; - if( aColor2 == BLACK) - return aColor1; - - /* Now we are sure that black can't occur, so the rule is: - * BLACK means not computed yet. If we're lucky we already have - * an answer */ - EDA_COLOR_T candidate = mix_cache[aColor1][aColor2]; - if( candidate != BLACK ) - return candidate; - - // Blend the two colors (i.e. OR the RGB values) - const StructColors &c1 = g_ColorRefs[aColor1]; - const StructColors &c2 = g_ColorRefs[aColor2]; - - // Ask the palette for the nearest color to the mix - wxColour mixed( c1.m_Red | c2.m_Red, - c1.m_Green | c2.m_Green, - c1.m_Blue | c2.m_Blue ); - candidate = ColorFindNearest( mixed ); - - /* Here, BLACK is *not* a good answer, since it would recompute the next time. - * Even theorically its not possible (with the current rules), but - * maybe the metric will change in the future */ - if( candidate == BLACK) - candidate = DARKDARKGRAY; - - // Store the result in the cache. The operation is commutative, too - mix_cache[aColor1][aColor2] = candidate; - mix_cache[aColor2][aColor1] = candidate; - return candidate; -} - - -EDA_COLOR_T ColorByName( const wxString& aName ) -{ - // look for a match in the palette itself - for( EDA_COLOR_T trying = BLACK; trying < NBCOLORS; trying = NextColor(trying) ) - { - if( 0 == aName.CmpNoCase( g_ColorRefs[trying].m_Name ) ) - return trying; - } - - // Not found, no idea... - return UNSPECIFIED_COLOR; -} - -bool ColorIsLight( EDA_COLOR_T aColor ) -{ - const StructColors &c = g_ColorRefs[ColorGetBase( aColor )]; - int r = c.m_Red; - int g = c.m_Green; - int b = c.m_Blue; - return ((r * r) + (g * g) + (b * b)) > (128 * 128 * 3); -} - -EDA_COLOR_T ColorFindNearest( const wxColour &aColor ) -{ - return ColorFindNearest( aColor.Red(), aColor.Green(), aColor.Blue() ); -} - -EDA_COLOR_T ColorFindNearest( int aR, int aG, int aB ) -{ - EDA_COLOR_T candidate = BLACK; - - /* Find the 'nearest' color in the palette. This is fun. There is - a gazilion of metrics for the color space and no one of the - useful one is in the RGB color space. Who cares, this is a CAD, - not a photosomething... - - I hereby declare that the distance is the sum of the square of the - component difference. Think about the RGB color cube. Now get the - euclidean distance, but without the square root... for ordering - purposes it's the same, obviously. Also each component can't be - less of the target one, since I found this currently work better... - */ - int nearest_distance = 255 * 255 * 3 + 1; // Can't beat this - - for( EDA_COLOR_T trying = BLACK; trying < NBCOLORS; trying = NextColor(trying) ) - { - const StructColors &c = g_ColorRefs[trying]; - int distance = (aR - c.m_Red) * (aR - c.m_Red) + - (aG - c.m_Green) * (aG - c.m_Green) + - (aB - c.m_Blue) * (aB - c.m_Blue); - if( distance < nearest_distance && c.m_Red >= aR && - c.m_Green >= aG && c.m_Blue >= aB ) - { - nearest_distance = distance; - candidate = trying; - } - } - - return candidate; -} - void GRDrawAnchor( EDA_RECT *aClipBox, wxDC *aDC, int x, int y, int aSize, EDA_COLOR_T aColor ) { diff --git a/common/hotkey_grid_table.cpp b/common/hotkey_grid_table.cpp index ee884f26cf..ecb75182aa 100644 --- a/common/hotkey_grid_table.cpp +++ b/common/hotkey_grid_table.cpp @@ -78,7 +78,7 @@ wxString HOTKEY_EDITOR_GRID_TABLE::GetValue( int row, int col ) } else { - return ReturnKeyNameFromKeyCode( hotkey_descr->m_KeyCode ); + return KeyNameFromKeyCode( hotkey_descr->m_KeyCode ); } } } diff --git a/common/hotkeys_basic.cpp b/common/hotkeys_basic.cpp index 0881c0f96d..968bcb47ca 100644 --- a/common/hotkeys_basic.cpp +++ b/common/hotkeys_basic.cpp @@ -29,7 +29,7 @@ */ #include -#include +#include #include #include #include @@ -61,9 +61,11 @@ wxString g_ModuleEditSectionTag( wxT( "[footprinteditor]" ) ); EDA_HOTKEY::EDA_HOTKEY( const wxChar* infomsg, int idcommand, int keycode, int idmenuevent ) { m_KeyCode = keycode; // Key code (ascii value for ascii keys + // or wxWidgets code for function key m_InfoMsg = infomsg; // info message. m_Idcommand = idcommand; // internal id for the corresponding + // command (see hotkey_id_commnand list) m_IdMenuEvent = idmenuevent; // id to call the corresponding event // (if any) (see id.h) @@ -137,13 +139,13 @@ static struct hotkey_name_descr s_Hotkey_Name_List[] = { wxT( "" ), 0 } }; -#define MODIFIER_CTRL wxT( "Ctrl+" ) -#define MODIFIER_ALT wxT( "Alt+" ) +#define MODIFIER_CTRL wxT( "Ctrl+" ) +#define MODIFIER_ALT wxT( "Alt+" ) #define MODIFIER_SHIFT wxT( "Shift+" ) /** - * Function ReturnKeyNameFromKeyCode + * Function KeyNameFromKeyCode * return the key name from the key code * Only some wxWidgets key values are handled for function key ( see * s_Hotkey_Name_List[] ) @@ -151,7 +153,7 @@ static struct hotkey_name_descr s_Hotkey_Name_List[] = * @param aIsFound = a pointer to a bool to return true if found, or false. an be NULL default) * @return the key name in a wxString */ -wxString ReturnKeyNameFromKeyCode( int aKeycode, bool* aIsFound ) +wxString KeyNameFromKeyCode( int aKeycode, bool* aIsFound ) { wxString keyname, modifier, fullkeyname; int ii; @@ -237,7 +239,7 @@ wxString AddHotkeyName( const wxString& aText, EDA_HOTKEY** aList, wxString keyname; if( aList ) - keyname = ReturnKeyNameFromCommandId( aList, aCommandId ); + keyname = KeyNameFromCommandId( aList, aCommandId ); if( !keyname.IsEmpty() ) { @@ -278,14 +280,14 @@ wxString AddHotkeyName( const wxString& aText, { wxString msg = aText; wxString keyname; - EDA_HOTKEY** List; + EDA_HOTKEY** list; if( aDescList ) { for( ; aDescList->m_HK_InfoList != NULL; aDescList++ ) { - List = aDescList->m_HK_InfoList; - keyname = ReturnKeyNameFromCommandId( List, aCommandId ); + list = aDescList->m_HK_InfoList; + keyname = KeyNameFromCommandId( list, aCommandId ); if( !keyname.IsEmpty() ) { @@ -313,13 +315,13 @@ wxString AddHotkeyName( const wxString& aText, /** - * Function ReturnKeyNameFromCommandId + * Function KeyNameFromCommandId * return the key name from the Command id value ( m_Idcommand member value) * @param aList = pointer to a EDA_HOTKEY list of commands * @param aCommandId = Command Id value * @return the key name in a wxString */ -wxString ReturnKeyNameFromCommandId( EDA_HOTKEY** aList, int aCommandId ) +wxString KeyNameFromCommandId( EDA_HOTKEY** aList, int aCommandId ) { wxString keyname; @@ -329,7 +331,7 @@ wxString ReturnKeyNameFromCommandId( EDA_HOTKEY** aList, int aCommandId ) if( hk_decr->m_Idcommand == aCommandId ) { - keyname = ReturnKeyNameFromKeyCode( hk_decr->m_KeyCode ); + keyname = KeyNameFromKeyCode( hk_decr->m_KeyCode ); break; } } @@ -339,14 +341,14 @@ wxString ReturnKeyNameFromCommandId( EDA_HOTKEY** aList, int aCommandId ) /** - * Function ReturnKeyCodeFromKeyName + * Function KeyCodeFromKeyName * return the key code from its key name * Only some wxWidgets key values are handled for function key * @param keyname = wxString key name to find in s_Hotkey_Name_List[], * like F2 or space or an usual (ascii) char. * @return the key code */ -int ReturnKeyCodeFromKeyName( const wxString& keyname ) +int KeyCodeFromKeyName( const wxString& keyname ) { int ii, keycode = 0; @@ -406,7 +408,7 @@ int ReturnKeyCodeFromKeyName( const wxString& keyname ) void DisplayHotkeyList( EDA_DRAW_FRAME* aFrame, struct EDA_HOTKEY_CONFIG* aDescList ) { wxString keyname; - EDA_HOTKEY** List; + EDA_HOTKEY** list; wxString msg = wxT( "" ); @@ -416,15 +418,16 @@ void DisplayHotkeyList( EDA_DRAW_FRAME* aFrame, struct EDA_HOTKEY_CONFIG* aDescL for( ; aDescList->m_HK_InfoList != NULL; aDescList++ ) { - List = aDescList->m_HK_InfoList; + list = aDescList->m_HK_InfoList; - for( ; *List != NULL; List++ ) + for( ; *list != NULL; list++ ) { - EDA_HOTKEY* hk_decr = *List; + EDA_HOTKEY* hk_decr = *list; if( !hk_decr->m_InfoMsg.Contains( wxT( "Macros" ) ) ) { - keyname = ReturnKeyNameFromKeyCode( hk_decr->m_KeyCode ); + keyname = KeyNameFromKeyCode( hk_decr->m_KeyCode ); + // Some chars should be modified, using html encoding, to be // displayed by DisplayHtmlInfoMessage() keyname.Replace( wxT("<"), wxT("<") ); @@ -480,8 +483,8 @@ int EDA_BASE_FRAME::WriteHotkeyConfig( struct EDA_HOTKEY_CONFIG* aDescList, msg = wxT( "$hotkey list\n" ); - /* Print the current hotkey list */ - EDA_HOTKEY** List; + // Print the current hotkey list + EDA_HOTKEY** list; for( ; aDescList->m_HK_InfoList != NULL; aDescList++ ) { @@ -495,13 +498,13 @@ int EDA_BASE_FRAME::WriteHotkeyConfig( struct EDA_HOTKEY_CONFIG* aDescList, msg += *aDescList->m_SectionTag; msg += wxT( "\n" ); - List = aDescList->m_HK_InfoList; + list = aDescList->m_HK_InfoList; - for( ; *List != NULL; List++ ) + for( ; *list != NULL; list++ ) { - EDA_HOTKEY* hk_decr = *List; + EDA_HOTKEY* hk_decr = *list; msg += wxT( "shortcut " ); - keyname = ReturnKeyNameFromKeyCode( hk_decr->m_KeyCode ); + keyname = KeyNameFromKeyCode( hk_decr->m_KeyCode ); AddDelimiterString( keyname ); infokey = hk_decr->m_InfoMsg; AddDelimiterString( infokey ); @@ -548,21 +551,21 @@ int EDA_BASE_FRAME::ReadHotkeyConfigFile( const wxString& aFilename, { wxFile cfgfile( aFilename ); - /* get length */ + // get length cfgfile.SeekEnd(); wxFileOffset size = cfgfile.Tell(); cfgfile.Seek( 0 ); - /* read data */ + // read data char* buffer = new char[size]; cfgfile.Read( buffer, size ); wxString data( buffer, wxConvUTF8 ); - /* parse */ + // parse ParseHotkeyConfig( data, aDescList ); - /* cleanup */ + // cleanup delete[] buffer; cfgfile.Close(); return 1; @@ -603,7 +606,7 @@ int EDA_BASE_FRAME::ReadHotkeyConfig( struct EDA_HOTKEY_CONFIG* aDescList ) void ParseHotkeyConfig( const wxString& data, struct EDA_HOTKEY_CONFIG* aDescList ) { - /* Read the config */ + // Read the config wxStringTokenizer tokenizer( data, L"\r\n", wxTOKEN_STRTOK ); EDA_HOTKEY** CurrentHotkeyList = 0; @@ -643,23 +646,23 @@ void ParseHotkeyConfig( const wxString& data, if( CurrentHotkeyList == NULL ) continue; - /* Get the key name */ + // Get the key name lineTokenizer.SetString( lineTokenizer.GetString(), L"\"\r\n\t ", wxTOKEN_STRTOK ); wxString keyname = lineTokenizer.GetNextToken(); wxString remainder = lineTokenizer.GetString(); - /* Get the command name */ + // Get the command name wxString fctname = remainder.AfterFirst( '\"' ).BeforeFirst( '\"' ); - /* search the hotkey in current hotkey list */ - for( EDA_HOTKEY** List = CurrentHotkeyList; *List != NULL; List++ ) + // search the hotkey in current hotkey list + for( EDA_HOTKEY** list = CurrentHotkeyList; *list != NULL; list++ ) { - EDA_HOTKEY* hk_decr = *List; + EDA_HOTKEY* hk_decr = *list; if( hk_decr->m_InfoMsg == fctname ) { - int code = ReturnKeyCodeFromKeyName( keyname ); + int code = KeyCodeFromKeyName( keyname ); if( code ) hk_decr->m_KeyCode = code; @@ -681,7 +684,7 @@ void EDA_BASE_FRAME::ImportHotkeyConfigFromFile( struct EDA_HOTKEY_CONFIG* aDesc wxString ext = DEFAULT_HOTKEY_FILENAME_EXT; wxString mask = wxT( "*." ) + ext; wxString path = wxGetCwd(); - wxString filename = wxGetApp().GetAppName() + wxT( "." ) + ext; + wxString filename = Kiface().Name() + wxT( '.' ) + ext; filename = EDA_FileSelector( _( "Read Hotkey Configuration File:" ), path, @@ -709,7 +712,7 @@ void EDA_BASE_FRAME::ExportHotkeyConfigToFile( struct EDA_HOTKEY_CONFIG* aDescLi wxString ext = DEFAULT_HOTKEY_FILENAME_EXT; wxString mask = wxT( "*." ) + ext; wxString path = wxGetCwd(); - wxString filename = wxGetApp().GetAppName() + wxT( "." ) + ext; + wxString filename = Kiface().Name() + wxT( "." ) + ext; filename = EDA_FileSelector( _( "Write Hotkey Configuration File:" ), path, @@ -736,14 +739,14 @@ void AddHotkeyConfigMenu( wxMenu* aMenu ) wxMenu* HotkeySubmenu = new wxMenu(); - /* List existing hotkey menu*/ + // List existing hotkey menu AddMenuItem( HotkeySubmenu, ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST, _( "&List Current Keys" ), _( "Displays the current hotkeys list and corresponding commands" ), KiBitmap( info_xpm ) ); - /* Call hotkeys editor*/ + // Call hotkeys editor AddMenuItem( HotkeySubmenu, ID_PREFERENCES_HOTKEY_SHOW_EDITOR, _( "&Edit Hotkeys" ), _( "Call the hotkeys editor" ), @@ -751,19 +754,19 @@ void AddHotkeyConfigMenu( wxMenu* aMenu ) HotkeySubmenu->AppendSeparator(); - /* create hotkey file to export current hotkeys config */ + // create hotkey file to export current hotkeys config AddMenuItem( HotkeySubmenu, ID_PREFERENCES_HOTKEY_EXPORT_CONFIG, _( "E&xport Hotkeys" ), _( "Create a hotkey configuration file to export the current hotkeys" ), KiBitmap( save_setup_xpm ) ); - /* Reload hotkey file */ + // Reload hotkey file AddMenuItem( HotkeySubmenu, ID_PREFERENCES_HOTKEY_IMPORT_CONFIG, _( "&Import Hotkeys" ), _( "Load an existing hotkey configuration file" ), KiBitmap( reload_xpm ) ); - /* Append HotkeySubmenu to menu */ + // Append HotkeySubmenu to menu AddMenuItem( aMenu, HotkeySubmenu, ID_PREFERENCES_HOTKEY_SUBMENU, _( "&Hotkeys" ), _( "Hotkeys configuration and preferences" ), diff --git a/common/kiface_i.cpp b/common/kiface_i.cpp new file mode 100644 index 0000000000..164195b231 --- /dev/null +++ b/common/kiface_i.cpp @@ -0,0 +1,206 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com + * Copyright (C) 2008-2011 Wayne Stambaugh + * Copyright (C) 1992-2014 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 // FROM_UTF8() +#include +#include + +#include +#include + +#include +#include + + +static const wxChar showPageLimitsKey[] = wxT( "ShowPageLimits" ); +static const wxChar backgroundColorKey[] = wxT( "BackgroundColor" ); + + +/// Initialize aDst SEARCH_STACK with KIFACE (DSO) specific settings. +/// A non-member function so it an be moved easily, plus it's nobody's business. +static void setSearchPaths( SEARCH_STACK* aDst, KIWAY::FACE_T aId ) +{ + SEARCH_STACK bases; + + SystemDirsAppend( &bases ); + aDst->Clear(); + + for( unsigned i = 0; i < bases.GetCount(); ++i ) + { + wxFileName fn( bases[i], wxEmptyString ); + + // Add schematic library file path to search path list. + // we must add /library and /library/doc + if( aId == KIWAY::FACE_SCH ) + { + fn.AppendDir( wxT( "library" ) ); + aDst->AddPaths( fn.GetPath() ); + + // Add schematic doc file path (library/doc)to search path list. + fn.AppendDir( wxT( "doc" ) ); + aDst->AddPaths( fn.GetPath() ); + + fn.RemoveLastDir(); + fn.RemoveLastDir(); // "../../" up twice, removing library/doc/ + } + + // Add PCB library file path to search path list. + if( aId == KIWAY::FACE_PCB || aId == KIWAY::FACE_CVPCB ) + { + fn.AppendDir( wxT( "modules" ) ); + aDst->AddPaths( fn.GetPath() ); + + // Add 3D module library file path to search path list. + fn.AppendDir( wxT( "packages3d" ) ); + aDst->AddPaths( fn.GetPath() ); + + fn.RemoveLastDir(); + fn.RemoveLastDir(); // "../../" up twice, remove modules/packages3d + } + + // Add KiCad template file path to search path list. + fn.AppendDir( wxT( "template" ) ); + aDst->AddPaths( fn.GetPath() ); + } + +#if 1 && defined(DEBUG) + aDst->Show( "kiway" ); +#endif +} + + +bool KIFACE_I::start_common() +{ + m_bm.Init(); + + m_bm.m_config->Read( showPageLimitsKey, &g_ShowPageLimits ); + + // FIXME OSX Mountain Lion (10.8) + // Seems that Read doesn't found anything and ColorFromInt + // Asserts - I'm unable to reproduce on 10.7 + + int draw_bg_color = BLACK; // Default for all apps but Eeschema + + if( m_id == KIWAY::FACE_SCH ) + draw_bg_color = WHITE; // Default for Eeschema + + m_bm.m_config->Read( backgroundColorKey, &draw_bg_color ); + + g_DrawBgColor = ColorFromInt( draw_bg_color ); + + setSearchPaths( &m_bm.m_search, m_id ); + + return true; +} + + +void KIFACE_I::end_common() +{ + m_bm.End(); +} + + +wxString KIFACE_I::GetHelpFile() +{ + wxString fn; + wxArrayString subdirs; + wxArrayString altsubdirs; + + // FIXME: This is not the ideal way to handle this. Unfortunately, the + // CMake install paths seem to be a moving target so this crude + // hack solves the problem of install path differences between + // Windows and non-Windows platforms. + + // Partially fixed, but must be enhanced + + // Create subdir tree for "standard" linux distributions, when KiCad comes + // from a distribution files are in /usr/share/doc/kicad/help and binaries + // in /usr/bin or /usr/local/bin + subdirs.Add( wxT( "share" ) ); + subdirs.Add( wxT( "doc" ) ); + subdirs.Add( wxT( "kicad" ) ); + subdirs.Add( wxT( "help" ) ); + + // Create subdir tree for linux and Windows KiCad pack. + // Note the pack form under linux is also useful if a user wants to + // install KiCad to a server because there is only one path to mount + // or export (something like /usr/local/kicad). + // files are in /kicad/doc/help + // (often /usr/local/kicad/kicad/doc/help) + // /kicad/ is retrieved from m_BinDir + altsubdirs.Add( wxT( "doc" ) ); + altsubdirs.Add( wxT( "help" ) ); + + /* Search for a help file. + * we *must* find a help file. + * so help is searched in directories in this order: + * help/ like help/en_GB + * help/ like help/en + * help/en + */ + + wxLocale* i18n = Pgm().GetLocale(); + + // Step 1 : Try to find help file in help/ + subdirs.Add( i18n->GetCanonicalName() ); + altsubdirs.Add( i18n->GetCanonicalName() ); + + fn = m_bm.m_search.FindFileInSearchPaths( m_bm.m_help_file, &altsubdirs ); + + if( !fn ) + fn = m_bm.m_search.FindFileInSearchPaths( m_bm.m_help_file, &subdirs ); + + // Step 2 : if not found Try to find help file in help/ + if( !fn ) + { + subdirs.RemoveAt( subdirs.GetCount() - 1 ); + altsubdirs.RemoveAt( altsubdirs.GetCount() - 1 ); + + // wxLocale::GetName() does not return always the short name + subdirs.Add( i18n->GetName().BeforeLast( '_' ) ); + altsubdirs.Add( i18n->GetName().BeforeLast( '_' ) ); + + fn = m_bm.m_search.FindFileInSearchPaths( m_bm.m_help_file, &altsubdirs ); + + if( !fn ) + fn = m_bm.m_search.FindFileInSearchPaths( m_bm.m_help_file, &subdirs ); + } + + // Step 3 : if not found Try to find help file in help/en + if( !fn ) + { + subdirs.RemoveAt( subdirs.GetCount() - 1 ); + altsubdirs.RemoveAt( altsubdirs.GetCount() - 1 ); + subdirs.Add( wxT( "en" ) ); + altsubdirs.Add( wxT( "en" ) ); + + fn = m_bm.m_search.FindFileInSearchPaths( m_bm.m_help_file, &altsubdirs ); + + if( !fn ) + fn = m_bm.m_search.FindFileInSearchPaths( m_bm.m_help_file, &subdirs ); + } + + return fn; +} diff --git a/common/kiway.cpp b/common/kiway.cpp index 92086838ca..01197f64c5 100644 --- a/common/kiway.cpp +++ b/common/kiway.cpp @@ -53,9 +53,9 @@ const wxString KIWAY::dso_name( FACE_T aFaceId ) } -PROJECT& KIWAY::Project() +PROJECT& KIWAY::Prj() const { - return m_project; + return *(PROJECT*) &m_project; // strip const-ness, function really is const. } diff --git a/common/kiway_holder.cpp b/common/kiway_holder.cpp new file mode 100644 index 0000000000..8679254d82 --- /dev/null +++ b/common/kiway_holder.cpp @@ -0,0 +1,29 @@ + +#include +#include + + +PROJECT& KIWAY_HOLDER::Prj() const +{ + return Kiway().Prj(); +} + + +// this is not speed critical, hide it out of line. +void KIWAY_HOLDER::SetKiway( wxWindow* aDest, KIWAY* aKiway ) +{ +#if defined(DEBUG) + // offer a trap point for debugging most any window + wxASSERT( aDest ); + if( !strcmp( typeid(aDest).name(), "DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB" ) ) + { + int breakhere=1; + (void) breakhere; + } +#endif + + (void) aDest; + + m_kiway = aKiway; +} + diff --git a/common/page_layout/class_worksheet_layout.cpp b/common/page_layout/class_worksheet_layout.cpp index 67cd12277d..379ba777ab 100644 --- a/common/page_layout/class_worksheet_layout.cpp +++ b/common/page_layout/class_worksheet_layout.cpp @@ -50,13 +50,14 @@ */ #include -#include +#include #include #include #include #include #include + // The layout shape used in the application // It is accessible by WORKSHEET_LAYOUT::GetTheInstance() WORKSHEET_LAYOUT wksTheInstance; @@ -70,21 +71,25 @@ WORKSHEET_LAYOUT::WORKSHEET_LAYOUT() m_bottomMargin = 10.0; // the bottom page margin in mm } + void WORKSHEET_LAYOUT::SetLeftMargin( double aMargin ) { m_leftMargin = aMargin; // the left page margin in mm } + void WORKSHEET_LAYOUT::SetRightMargin( double aMargin ) { m_rightMargin = aMargin; // the right page margin in mm } + void WORKSHEET_LAYOUT::SetTopMargin( double aMargin ) { m_topMargin = aMargin; // the top page margin in mm } + void WORKSHEET_LAYOUT::SetBottomMargin( double aMargin ) { m_bottomMargin = aMargin; // the bottom page margin in mm @@ -98,8 +103,7 @@ void WORKSHEET_LAYOUT::ClearList() m_list.clear(); } -/* Insert an item to the list of items at position aIdx - */ + void WORKSHEET_LAYOUT::Insert( WORKSHEET_DATAITEM* aItem, unsigned aIdx ) { if ( aIdx >= GetCount() ) @@ -108,8 +112,7 @@ void WORKSHEET_LAYOUT::Insert( WORKSHEET_DATAITEM* aItem, unsigned aIdx ) m_list.insert( m_list.begin() + aIdx, aItem ); } -/* Remove the item to the list of items at position aIdx - */ + bool WORKSHEET_LAYOUT::Remove( unsigned aIdx ) { if ( aIdx >= GetCount() ) @@ -118,8 +121,7 @@ bool WORKSHEET_LAYOUT::Remove( unsigned aIdx ) return true; } -/* Remove the item to the list of items at position aIdx - */ + bool WORKSHEET_LAYOUT::Remove( WORKSHEET_DATAITEM* aItem ) { unsigned idx = 0; @@ -135,8 +137,7 @@ bool WORKSHEET_LAYOUT::Remove( WORKSHEET_DATAITEM* aItem ) return Remove( idx ); } -/* return the index of aItem, or -1 if does not exist - */ + int WORKSHEET_LAYOUT::GetItemIndex( WORKSHEET_DATAITEM* aItem ) const { unsigned idx = 0; @@ -161,17 +162,13 @@ WORKSHEET_DATAITEM* WORKSHEET_LAYOUT::GetItem( unsigned aIdx ) const return NULL; } -/* return a short filename from a full filename: - * if the path is the current path,or if the path is the same - * as kicad.pro (in template), returns a shortname - * else do nothing and returns the full filename - */ + const wxString WORKSHEET_LAYOUT::MakeShortFileName( const wxString& aFullFileName ) { - wxFileName fn = aFullFileName; - wxString shortFileName = aFullFileName; + wxFileName fn = aFullFileName; + wxString shortFileName = aFullFileName; + wxString fileName = Kiface().KifaceSearch().FindValidPath( fn.GetFullName() ); - wxString fileName = wxGetApp().GetLibraryPathList().FindValidPath( fn.GetFullName() ); if( !fileName.IsEmpty() ) { fn = fileName; @@ -182,19 +179,15 @@ const wxString WORKSHEET_LAYOUT::MakeShortFileName( const wxString& aFullFileNam return shortFileName; } -/** - * @return a full filename from a short filename, - * if the short filename path is void - * In this case the path is the same as kicad.pro (in template) - * else return the short filename (which have an absolute os relative path - */ + const wxString WORKSHEET_LAYOUT::MakeFullFileName( const wxString& aShortFileName ) { - wxFileName fn = aShortFileName; - wxString fullFileName = aShortFileName; + wxFileName fn = aShortFileName; + wxString fullFileName = aShortFileName; + if( fn.GetPath().IsEmpty() && !fn.GetFullName().IsEmpty() ) { - wxString name = wxGetApp().GetLibraryPathList().FindValidPath( fn.GetFullName() ); + wxString name = Kiface().KifaceSearch().FindValidPath( fn.GetFullName() ); if( !name.IsEmpty() ) fullFileName = name; } diff --git a/common/pgm_base.cpp b/common/pgm_base.cpp new file mode 100644 index 0000000000..736275fcee --- /dev/null +++ b/common/pgm_base.cpp @@ -0,0 +1,742 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com + * Copyright (C) 2008-2011 Wayne Stambaugh + * Copyright (C) 1992-2011 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 + */ + +/** + * @file eda_pgm.cpp + * + * @brief For the main application: init functions, and language selection + * (locale handling) + */ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#define KICAD_COMMON wxT( "kicad_common" ) + +// some key strings used to store parameters in KICAD_COMMON + +const wxChar PGM_BASE::workingDirKey[] = wxT( "WorkingDir" ); // public + +static const wxChar languageCfgKey[] = wxT( "LanguageID" ); +static const wxChar kicadFpLibPath[] = wxT( "KicadFootprintLibraryPath" ); + + +/** + * A small class to handle the list of existing translations. + * The locale translation is automatic. + * The selection of languages is mainly for maintainer's convenience + * To add a support to a new translation: + * create a new icon (flag of the country) (see Lang_Fr.xpm as an example) + * add a new item to s_Languages[]. + */ +struct LANGUAGE_DESCR +{ + /// wxWidgets locale identifier (See wxWidgets doc) + int m_WX_Lang_Identifier; + + /// KiCad identifier used in menu selection (See id.h) + int m_KI_Lang_Identifier; + + /// The menu language icons + BITMAP_DEF m_Lang_Icon; + + /// Labels used in menus + wxString m_Lang_Label; + + /// Set to true if the m_Lang_Label must not be translated + bool m_DoNotTranslate; +}; + + +/** + * Variable s_Languages + * Note: because this list is not created on the fly, wxTranslation + * must be called when a language name must be displayed after translation. + * Do not change this behavior, because m_Lang_Label is also used as key in config + */ +static LANGUAGE_DESCR s_Languages[] = +{ + // Default language + { + wxLANGUAGE_DEFAULT, + ID_LANGUAGE_DEFAULT, + lang_def_xpm, + _( "Default" ) + }, + + // English language + { + wxLANGUAGE_ENGLISH, + ID_LANGUAGE_ENGLISH, + lang_en_xpm, + wxT( "English" ), + true + }, + + // French language + { + wxLANGUAGE_FRENCH, + ID_LANGUAGE_FRENCH, + lang_fr_xpm, + _( "French" ) + }, + + // Finnish language + { + wxLANGUAGE_FINNISH, + ID_LANGUAGE_FINNISH, + lang_fi_xpm, + _( "Finnish" ) + }, + + // Spanish language + { + wxLANGUAGE_SPANISH, + ID_LANGUAGE_SPANISH, + lang_es_xpm, + _( "Spanish" ) + }, + + // Portuguese language + { + wxLANGUAGE_PORTUGUESE, + ID_LANGUAGE_PORTUGUESE, + lang_pt_xpm, + _( "Portuguese" ) + }, + + // Italian language + { + wxLANGUAGE_ITALIAN, + ID_LANGUAGE_ITALIAN, + lang_it_xpm, + _( "Italian" ) + }, + + // German language + { + wxLANGUAGE_GERMAN, + ID_LANGUAGE_GERMAN, + lang_de_xpm, + _( "German" ) + }, + + // Greek language + { + wxLANGUAGE_GREEK, + ID_LANGUAGE_GREEK, + lang_gr_xpm, + _( "Greek" ) + }, + + // Slovenian language + { + wxLANGUAGE_SLOVENIAN, + ID_LANGUAGE_SLOVENIAN, + lang_sl_xpm, + _( "Slovenian" ) + }, + + // Hungarian language + { + wxLANGUAGE_HUNGARIAN, + ID_LANGUAGE_HUNGARIAN, + lang_hu_xpm, + _( "Hungarian" ) + }, + + // Polish language + { + wxLANGUAGE_POLISH, + ID_LANGUAGE_POLISH, + lang_pl_xpm, + _( "Polish" ) + }, + + // Czech language + { + wxLANGUAGE_CZECH, + ID_LANGUAGE_CZECH, + lang_cs_xpm, + _( "Czech" ) + }, + + // Russian language + { + wxLANGUAGE_RUSSIAN, + ID_LANGUAGE_RUSSIAN, + lang_ru_xpm, + _( "Russian" ) + }, + + // Korean language + { + wxLANGUAGE_KOREAN, + ID_LANGUAGE_KOREAN, + lang_ko_xpm, + _( "Korean" ) + }, + + // Chinese simplified + { + wxLANGUAGE_CHINESE_SIMPLIFIED, + ID_LANGUAGE_CHINESE_SIMPLIFIED, + lang_chinese_xpm, + _( "Chinese simplified" ) + }, + + // Catalan language + { + wxLANGUAGE_CATALAN, + ID_LANGUAGE_CATALAN, + lang_catalan_xpm, + _( "Catalan" ) + }, + + // Dutch language + { + wxLANGUAGE_DUTCH, + ID_LANGUAGE_DUTCH, + lang_nl_xpm, + _( "Dutch" ) + }, + + // Japanese language + { + wxLANGUAGE_JAPANESE, + ID_LANGUAGE_JAPANESE, + lang_jp_xpm, + _( "Japanese" ) + }, + + // Bulgarian language + { + wxLANGUAGE_BULGARIAN, + ID_LANGUAGE_BULGARIAN, + lang_bg_xpm, + _( "Bulgarian" ) + } +}; + + +PGM_BASE::PGM_BASE() +{ + m_pgm_checker = NULL; + m_file_checker = NULL; + m_html_ctrl = NULL; + m_locale = NULL; + m_common_settings = NULL; + + m_wx_app = NULL; + + setLanguageId( wxLANGUAGE_DEFAULT ); +} + + +PGM_BASE::~PGM_BASE() +{ + destroy(); +} + + +void PGM_BASE::destroy() +{ + // unlike a normal destructor, this is designed to be called more than once safely: + + delete m_common_settings; + m_common_settings = 0; + + delete m_pgm_checker; + m_pgm_checker = 0; + + delete m_file_checker; + m_file_checker = 0; + + delete m_locale; + m_locale = 0; + + delete m_html_ctrl; + m_html_ctrl = 0; +} + + +void PGM_BASE::SetEditorName( const wxString& aFileName ) +{ + m_editor_name = aFileName; + wxASSERT( m_common_settings ); + m_common_settings->Write( wxT( "Editor" ), aFileName ); +} + + +const wxString& PGM_BASE::GetEditorName() +{ + wxString editorname = m_editor_name; + + if( !editorname ) + { + // Get the preferred editor name from environment variable first. + if(!wxGetEnv( wxT( "EDITOR" ), &editorname )) + { + // If there is no EDITOR variable set, try the desktop default +#ifdef __WXMAC__ + editorname = "/usr/bin/open"; +#elif __WXX11__ + editorname = "/usr/bin/xdg-open"; +#endif + } + } + + if( !editorname ) // We must get a preferred editor name + { + DisplayInfoMessage( NULL, + _( "No default editor found, you must choose it" ) ); + + wxString mask( wxT( "*" ) ); + +#ifdef __WINDOWS__ + mask += wxT( ".exe" ); +#endif + editorname = EDA_FileSelector( _( "Preferred Editor:" ), wxEmptyString, + wxEmptyString, wxEmptyString, mask, + NULL, wxFD_OPEN, true ); + } + + if( !editorname.IsEmpty() ) + { + m_editor_name = editorname; + m_common_settings->Write( wxT( "Editor" ), m_editor_name ); + } + + return m_editor_name; +} + + +bool PGM_BASE::initPgm() +{ + wxFileName pgm_name( App().argv[0] ); + + wxInitAllImageHandlers(); + + m_pgm_checker = new wxSingleInstanceChecker( pgm_name.GetName().Lower() + wxT( "-" ) + wxGetUserId() ); + + if( m_pgm_checker->IsAnotherRunning() ) + { + wxString quiz = wxString::Format( + _( "%s is already running, Continue?" ), + GetChars( pgm_name.GetName() ) + ); + if( !IsOK( NULL, quiz ) ) + return false; + } + + // Init KiCad environment + // the environment variable KICAD (if exists) gives the kicad path: + // something like set KICAD=d:\kicad + bool isDefined = wxGetEnv( wxT( "KICAD" ), &m_kicad_env ); + + if( isDefined ) // ensure m_kicad_env ends by "/" + { + m_kicad_env.Replace( WIN_STRING_DIR_SEP, UNIX_STRING_DIR_SEP ); + + if( !m_kicad_env.IsEmpty() && m_kicad_env.Last() != '/' ) + m_kicad_env += UNIX_STRING_DIR_SEP; + } + + // Init parameters for configuration + App().SetVendorName( wxT( "KiCad" ) ); + App().SetAppName( pgm_name.GetName().Lower() ); + + // Install some image handlers, mainly for help + wxImage::AddHandler( new wxPNGHandler ); + wxImage::AddHandler( new wxGIFHandler ); + wxImage::AddHandler( new wxJPEGHandler ); + wxFileSystem::AddHandler( new wxZipFSHandler ); + + // Analyze the command line & initialize the binary path + setExecutablePath(); + + SetLanguagePath(); + + // OS specific instantiation of wxConfigBase derivative: + m_common_settings = new wxConfig( KICAD_COMMON ); + + ReadPdfBrowserInfos(); // needs m_common_settings + + loadCommonSettings(); + + + bool succes = SetLanguage( true ); + + if( !succes ) + { + } + + // Set locale option for separator used in float numbers + SetLocaleTo_Default(); + + return true; +} + + +void PGM_BASE::SetHtmlHelpController( wxHtmlHelpController* aController ) +{ + delete m_html_ctrl; + m_html_ctrl = aController; +} + + +void PGM_BASE::InitOnLineHelp() +{ + wxString fullfilename = FindKicadHelpPath(); + +#if defined ONLINE_HELP_FILES_FORMAT_IS_HTML + m_HelpFileName = fullfilename + wxT( ".html" ); + fullfilename += wxT( "kicad.hhp" ); + + if( wxFileExists( fullfilename ) ) + { + m_html_ctrl = new wxHtmlHelpController( wxHF_TOOLBAR | wxHF_CONTENTS | + wxHF_PRINT | wxHF_OPEN_FILES + /*| wxHF_SEARCH */ ); + m_html_ctrl->UseConfig( m_common_settings ); + m_html_ctrl->SetTitleFormat( wxT( "KiCad Help" ) ); + m_html_ctrl->AddBook( fullfilename ); + } + +#elif defined ONLINE_HELP_FILES_FORMAT_IS_PDF + m_html_ctrl = NULL; + +#else + #error Help files format not defined +#endif +} + + +bool PGM_BASE::setExecutablePath() +{ +// Apple MacOSx +#ifdef __APPLE__ + + // Derive path from location of the app bundle + CFBundleRef mainBundle = CFBundleGetMainBundle(); + + if( mainBundle == NULL ) + return false; + + CFURLRef urlref = CFBundleCopyBundleURL( mainBundle ); + + if( urlref == NULL ) + return false; + + CFStringRef str = CFURLCopyFileSystemPath( urlref, kCFURLPOSIXPathStyle ); + + if( str == NULL ) + return false; + + char* native_str = NULL; + int len = CFStringGetMaximumSizeForEncoding( CFStringGetLength( str ), + kCFStringEncodingUTF8 ) + 1; + native_str = new char[len]; + + CFStringGetCString( str, native_str, len, kCFStringEncodingUTF8 ); + m_bin_dir = FROM_UTF8( native_str ); + delete[] native_str; + +#else + m_bin_dir = wxStandardPaths::Get().GetExecutablePath(); + +#endif + + // Use unix notation for paths. I am not sure this is a good idea, + // but it simplifies compatibility between Windows and Unices. + // However it is a potential problem in path handling under Windows. + m_bin_dir.Replace( WIN_STRING_DIR_SEP, UNIX_STRING_DIR_SEP ); + + // Remove file name form command line: + while( m_bin_dir.Last() != '/' && !m_bin_dir.IsEmpty() ) + m_bin_dir.RemoveLast(); + + return true; +} + + +void PGM_BASE::loadCommonSettings() +{ + wxASSERT( m_common_settings ); + + m_help_size.x = 500; + m_help_size.y = 400; + + wxString languageSel; + + m_common_settings->Read( languageCfgKey, &languageSel ); + setLanguageId( wxLANGUAGE_DEFAULT ); + + // Search for the current selection + for( unsigned ii = 0; ii < DIM( s_Languages ); ii++ ) + { + if( s_Languages[ii].m_Lang_Label == languageSel ) + { + setLanguageId( s_Languages[ii].m_WX_Lang_Identifier ); + break; + } + } + + m_editor_name = m_common_settings->Read( wxT( "Editor" ) ); +} + + +void PGM_BASE::saveCommonSettings() +{ + // m_common_settings is not initialized until fairly late in the + // process startup: initPgm(), so test before using: + if( m_common_settings ) + { + m_common_settings->Write( workingDirKey, wxGetCwd() ); + } +} + + +bool PGM_BASE::SetLanguage( bool first_time ) +{ + bool retv = true; + + // dictionary file name without extend (full name is kicad.mo) + wxString dictionaryName( wxT( "kicad" ) ); + + delete m_locale; + m_locale = new wxLocale; + +#if wxCHECK_VERSION( 2, 9, 0 ) + if( !m_locale->Init( m_language_id ) ) +#else + if( !m_locale->Init( m_language_id, wxLOCALE_CONV_ENCODING ) ) +#endif + { + wxLogDebug( wxT( "This language is not supported by the system." ) ); + + setLanguageId( wxLANGUAGE_DEFAULT ); + delete m_locale; + + m_locale = new wxLocale; + m_locale->Init(); + retv = false; + } + else if( !first_time ) + { + wxLogDebug( wxT( "Search for dictionary %s.mo in %s" ), + GetChars( dictionaryName ), GetChars( m_locale->GetName() ) ); + } + + // how about a meaningful comment here. + if( !first_time ) + { + wxString languageSel; + + // Search for the current selection + for( unsigned ii = 0; ii < DIM( s_Languages ); ii++ ) + { + if( s_Languages[ii].m_WX_Lang_Identifier == m_language_id ) + { + languageSel = s_Languages[ii].m_Lang_Label; + break; + } + } + + m_common_settings->Write( languageCfgKey, languageSel ); + } + + // Test if floating point notation is working (bug in cross compilation, using wine) + // Make a conversion double <=> string + double dtst = 0.5; + wxString msg; + + extern bool g_DisableFloatingPointLocalNotation; // See common.cpp + + g_DisableFloatingPointLocalNotation = false; + + msg << dtst; + double result; + msg.ToDouble( &result ); + + if( result != dtst ) // string to double encode/decode does not work! Bug detected + { + // Disable floating point localization: + g_DisableFloatingPointLocalNotation = true; + SetLocaleTo_C_standard( ); + } + + if( !m_locale->IsLoaded( dictionaryName ) ) + m_locale->AddCatalog( dictionaryName ); + + if( !retv ) + return retv; + + return m_locale->IsOk(); +} + + +void PGM_BASE::SetLanguageIdentifier( int menu_id ) +{ + wxLogDebug( wxT( "Select language ID %d from %zd possible languages." ), + menu_id, DIM( s_Languages ) ); + + for( unsigned ii = 0; ii < DIM( s_Languages ); ii++ ) + { + if( menu_id == s_Languages[ii].m_KI_Lang_Identifier ) + { + setLanguageId( s_Languages[ii].m_WX_Lang_Identifier ); + break; + } + } +} + + +void PGM_BASE::SetLanguagePath() +{ + SEARCH_STACK guesses; + + SystemDirsAppend( &guesses ); + + // Add our internat dir to the wxLocale catalog of paths + for( unsigned i = 0; i < guesses.GetCount(); i++ ) + { + wxFileName fn( guesses[i], wxEmptyString ); + + // Append path for Windows and unix KiCad package install + fn.AppendDir( wxT( "share" ) ); + fn.AppendDir( wxT( "internat" ) ); + + if( fn.IsDirReadable() ) + { + wxLogDebug( wxT( "Adding locale lookup path: " ) + fn.GetPath() ); + wxLocale::AddCatalogLookupPathPrefix( fn.GetPath() ); + } + + // Append path for unix standard install + fn.RemoveLastDir(); + fn.AppendDir( wxT( "kicad" ) ); + fn.AppendDir( wxT( "internat" ) ); + + if( fn.IsDirReadable() ) + { + wxLogDebug( wxT( "Adding locale lookup path: " ) + fn.GetPath() ); + wxLocale::AddCatalogLookupPathPrefix( fn.GetPath() ); + } + } +} + + +void PGM_BASE::AddMenuLanguageList( wxMenu* MasterMenu ) +{ + wxMenu* menu = NULL; + wxMenuItem* item = MasterMenu->FindItem( ID_LANGUAGE_CHOICE ); + + if( item ) // This menu exists, do nothing + return; + + menu = new wxMenu; + + for( unsigned ii = 0; ii < DIM( s_Languages ); ii++ ) + { + wxString label; + + if( s_Languages[ii].m_DoNotTranslate ) + label = s_Languages[ii].m_Lang_Label; + else + label = wxGetTranslation( s_Languages[ii].m_Lang_Label ); + + AddMenuItem( menu, s_Languages[ii].m_KI_Lang_Identifier, + label, KiBitmap(s_Languages[ii].m_Lang_Icon ), + wxITEM_CHECK ); + } + + AddMenuItem( MasterMenu, menu, + ID_LANGUAGE_CHOICE, + _( "Language" ), + _( "Select application language (only for testing!)" ), + KiBitmap( language_xpm ) ); + + // Set Check mark on current selected language + for( unsigned ii = 0; ii < DIM( s_Languages ); ii++ ) + { + if( m_language_id == s_Languages[ii].m_WX_Lang_Identifier ) + menu->Check( s_Languages[ii].m_KI_Lang_Identifier, true ); + else + menu->Check( s_Languages[ii].m_KI_Lang_Identifier, false ); + } +} + + +bool PGM_BASE::LockFile( const wxString& aFileName ) +{ + // first make absolute and normalize, to avoid that different lock files + // for the same file can be created + wxFileName fn( aFileName ); + + fn.MakeAbsolute(); + + // semaphore to protect the edition of the file by more than one instance + if( m_file_checker != NULL ) + { + // it means that we had an open file and we are opening a different one + delete m_file_checker; + } + + wxString lockFileName = fn.GetFullPath() + wxT( ".lock" ); + + lockFileName.Replace( wxT( "/" ), wxT( "_" ) ); + + // We can have filenames coming from Windows, so also convert Windows separator + lockFileName.Replace( wxT( "\\" ), wxT( "_" ) ); + + m_file_checker = new wxSingleInstanceChecker( lockFileName ); + + if( m_file_checker && + m_file_checker->IsAnotherRunning() ) + { + return false; + } + + return true; +} diff --git a/common/project.cpp b/common/project.cpp new file mode 100644 index 0000000000..48514ffd2a --- /dev/null +++ b/common/project.cpp @@ -0,0 +1,302 @@ + +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 KiCad Developers, see CHANGELOG.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 +#include +#include +#include +#include +#include +#include +#include +#include + + + +PROJECT::PROJECT() +{ + memset( m_elems, 0, sizeof(m_elems) ); +} + +PROJECT::~PROJECT() +{ + /* @todo + careful here, this may work, but the virtual destructor may not + be in the same link image as PROJECT. Won't enable this until + we're more stable and destructor is assuredly in same image, i.e. + libki.so + for( unsigned i = 0; iRead( key, wxEmptyString ); + + if( !upath ) + break; + + aDst->AddPaths( upath, aIndex ); + } +} + + +// non-member so it can be moved easily, and kept REALLY private. +// Do NOT Clear() in here. +static void add_search_paths( SEARCH_STACK* aDst, const SEARCH_STACK& aSrc, int aIndex ) +{ + for( unsigned i=0; iAddPaths( aSrc[i], aIndex ); +} + + +/* +bool PROJECT::MaybeLoadProjectSettings( const std::vector& aFileSet ) +{ + // @todo + return true; +} +*/ + + +wxConfigBase* PROJECT::configCreate( const SEARCH_STACK& aSList, const wxString& aFileName, + const wxString& aGroupName, bool aForceUseLocalConfig ) +{ + wxConfigBase* cfg = 0; + wxFileName fn = aFileName; + + fn.SetExt( ProjectFileExtension ); + + // is there an edge transition, a change in m_project_filename? + if( m_project_name != fn ) + { + m_sch_search.Clear(); + + SetProjectFullName( fn.GetFullPath() ); + + // to the empty list, add project dir as first + m_sch_search.AddPaths( fn.GetPath() ); + + // append all paths from aSList + add_search_paths( &m_sch_search, aSList, -1 ); + + // addLibrarySearchPaths( SEARCH_STACK* aSP, wxConfigBase* aCfg ) + // This is undocumented, but somebody wanted to store !schematic! + // library search paths in the .kicad_common file? + add_search_paths( &m_sch_search, Pgm().CommonSettings(), -1 ); + +#if 1 && defined(DEBUG) + m_sch_search.Show( __func__ ); +#endif + } + + // Init local config filename + if( aForceUseLocalConfig || fn.FileExists() ) + { + wxString cur_pro_fn = fn.GetFullPath(); + + cfg = new wxFileConfig( wxEmptyString, wxEmptyString, cur_pro_fn, wxEmptyString ); + + cfg->DontCreateOnDemand(); + + if( aForceUseLocalConfig ) + { + SetProjectFullName( cur_pro_fn ); + return cfg; + } + + /* Check the application version against the version saved in the + * project file. + * + * TODO: Push the version test up the stack so that when one of the + * KiCad application version changes, the other applications + * settings do not get updated. Practically, this can go away. + * It isn't used anywhere as far as I know (WLS). + */ + + cfg->SetPath( aGroupName ); + + int def_version = 0; + int version = cfg->Read( wxT( "version" ), def_version ); + + if( version > 0 ) + { + cfg->SetPath( wxCONFIG_PATH_SEPARATOR ); + SetProjectFullName( cur_pro_fn ); + return cfg; + } + else // Version incorrect + { + delete cfg; + cfg = 0; + } + } + + // Search for the template kicad.pro file by using caller's SEARCH_STACK. + + wxString kicad_pro_template = aSList.FindValidPath( wxT( "kicad.pro" ) ); + + if( !kicad_pro_template ) + { + wxLogDebug( wxT( "Template file not found." ) ); + + fn = wxFileName( wxStandardPaths::Get().GetDocumentsDir(), + wxT( "kicad" ), ProjectFileExtension ); + } + else + { + fn = kicad_pro_template; + } + + cfg = new wxFileConfig( wxEmptyString, wxEmptyString, wxEmptyString, fn.GetFullPath() ); + cfg->DontCreateOnDemand(); + + SetProjectFullName( fn.GetFullPath() ); + return cfg; +} + + +void PROJECT::ConfigSave( const SEARCH_STACK& aSList, const wxString& aFileName, + const wxString& aGroupName, const PARAM_CFG_ARRAY& aParams ) +{ + std::auto_ptr cfg( configCreate( aSList, aFileName, aGroupName, FORCE_LOCAL_CONFIG ) ); + + cfg->SetPath( wxCONFIG_PATH_SEPARATOR ); + + cfg->Write( wxT( "update" ), DateAndTime() ); + + // @todo: pass in aLastClient wxString: + cfg->Write( wxT( "last_client" ), Pgm().App().GetAppName() ); + + // Save parameters + cfg->DeleteGroup( aGroupName ); // Erase all data + cfg->Flush(); + + cfg->SetPath( aGroupName ); + cfg->Write( wxT( "version" ), CONFIG_VERSION ); + + cfg->SetPath( wxCONFIG_PATH_SEPARATOR ); + + wxConfigSaveParams( cfg.get(), aParams, aGroupName ); + + cfg->SetPath( UNIX_STRING_DIR_SEP ); + + // cfg is deleted here by std::auto_ptr, that saves the *.pro file to disk +} + + +bool PROJECT::ConfigLoad( const SEARCH_STACK& aSList, const wxString& aFileName, + const wxString& aGroupName, const PARAM_CFG_ARRAY& aParams, + bool doLoadOnlyIfNew ) +{ + std::auto_ptr cfg( configCreate( aSList, aFileName, aGroupName, false ) ); + + cfg->SetPath( wxCONFIG_PATH_SEPARATOR ); + + wxString timestamp = cfg->Read( wxT( "update" ) ); + + if( doLoadOnlyIfNew && timestamp.size() && + timestamp == m_pro_date_and_time ) + { + return false; + } + + m_pro_date_and_time = timestamp; + + wxConfigLoadParams( cfg.get(), aParams, aGroupName ); + + return true; +} + diff --git a/common/search_stack.cpp b/common/search_stack.cpp new file mode 100644 index 0000000000..f4792f89c2 --- /dev/null +++ b/common/search_stack.cpp @@ -0,0 +1,196 @@ + +#include +#include +#include + + +#if defined(__MINGW32__) + #define PATH_SEPS wxT(";\r\n") +#else + #define PATH_SEPS wxT(":;\r\n") // unix == linux | mac +#endif + + +wxString SEARCH_STACK::FilenameWithRelativePathInSearchList( const wxString& aFullFilename ) +{ + /* If the library path is already in the library search paths + * list, just add the library name to the list. Otherwise, add + * the library name with the full or relative path. + * the relative path, when possible is preferable, + * because it preserve use of default libraries paths, when the path is a sub path of + * these default paths + * Note we accept only sub paths, + * not relative paths starting by ../ that are not subpaths and are outside kicad libs paths + */ + wxFileName fn = aFullFilename; + wxString filename = aFullFilename; + + unsigned pathlen = fn.GetPath().Len(); // path len, used to find the better (shortest) + // subpath within defaults paths + + for( unsigned kk = 0; kk < GetCount(); kk++ ) + { + fn = aFullFilename; + + // Search for the shortest subpath within 'this': + if( fn.MakeRelativeTo( (*this)[kk] ) ) + { + if( fn.GetPathWithSep().StartsWith( wxT("..") ) ) // Path outside kicad libs paths + continue; + + if( pathlen > fn.GetPath().Len() ) // A better (shortest) subpath is found + { + filename = fn.GetPathWithSep() + fn.GetFullName(); + pathlen = fn.GetPath().Len(); + } + } + } + + return filename; +} + + +void SEARCH_STACK::RemovePaths( const wxString& aPaths ) +{ + wxStringTokenizer tokenizer( aPaths, PATH_SEPS, wxTOKEN_STRTOK ); + + while( tokenizer.HasMoreTokens() ) + { + wxString path = tokenizer.GetNextToken(); + + if( Index( path, wxFileName::IsCaseSensitive() ) != wxNOT_FOUND ) + { + Remove( path ); + } + } +} + + +void SEARCH_STACK::AddPaths( const wxString& aPaths, int aIndex ) +{ + bool isCS = wxFileName::IsCaseSensitive(); + wxStringTokenizer tokenizer( aPaths, PATH_SEPS, wxTOKEN_STRTOK ); + + // appending all of them, on large or negative aIndex + if( unsigned( aIndex ) >= GetCount() ) + { + while( tokenizer.HasMoreTokens() ) + { + wxString path = tokenizer.GetNextToken(); + + if( wxFileName::IsDirReadable( path ) + && Index( path, isCS ) == wxNOT_FOUND ) + { + Add( path ); + } + } + } + + // inserting all of them: + else + { + while( tokenizer.HasMoreTokens() ) + { + wxString path = tokenizer.GetNextToken(); + + if( wxFileName::IsDirReadable( path ) + && Index( path, isCS ) == wxNOT_FOUND ) + { + Insert( path, aIndex ); + aIndex++; + } + } + } +} + + +wxString SEARCH_STACK::FindFileInSearchPaths( + const wxString& aFilename, const wxArrayString* aSubdirs ) +{ + wxPathList paths; + + for( unsigned i = 0; i < GetCount(); ++i ) + { + wxFileName fn( (*this)[i] ); + + if( aSubdirs ) + { + for( unsigned j = 0; j < aSubdirs->GetCount(); j++ ) + fn.AppendDir( (*aSubdirs)[j] ); + } + + if( fn.DirExists() ) + { + paths.Add( fn.GetPath() ); + } + } + + return paths.FindValidPath( aFilename ); +} + + +void RETAINED_PATH::Clear() +{ + m_retained_path.Clear(); +} + + +wxString RETAINED_PATH::LastVisitedPath( const SEARCH_STACK& aSStack, const wxString& aSubPathToSearch ) +{ + if( !!m_retained_path ) + return m_retained_path; + + wxString path; + + // Initialize default path to the main default lib path + // this is the second path in list (the first is the project path) + unsigned pcount = aSStack.GetCount(); + + if( pcount ) + { + unsigned ipath = 0; + + if( aSStack[0] == wxGetCwd() ) + ipath = 1; + + // First choice of path: + if( ipath < pcount ) + path = aSStack[ipath]; + + // Search a sub path matching aSubPathToSearch + if( !aSubPathToSearch.IsEmpty() ) + { + for( ; ipath < pcount; ipath++ ) + { + if( aSStack[ipath].Contains( aSubPathToSearch ) ) + { + path = aSStack[ipath]; + break; + } + } + } + } + + if( path.IsEmpty() ) + path = wxGetCwd(); + + return path; +} + + +void RETAINED_PATH::SaveLastVisitedPath( const wxString& aPath ) +{ + m_retained_path = aPath; +} + + +#if defined(DEBUG) +void SEARCH_STACK::Show( const char* aPrefix ) const +{ + printf( "%s SEARCH_STACK:\n", aPrefix ); + for( unsigned i=0; i #include #include #include -#include #include +#include + +#include +#include +#include +#include -/** - * Class PROCESS - * provides its own OnInit() handler. - */ -class PROCESS : public wxApp -{ -public: - - bool OnInit(); -}; - - -IMPLEMENT_APP( PROCESS ) +// The functions we use will cause the program launcher to pull stuff in +// during linkage, keep the map file in mind to see what's going into it. #if !wxCHECK_VERSION( 3, 0, 0 ) @@ -107,41 +104,6 @@ static wxString wxJoin(const wxArrayString& arr, const wxChar sep, #endif -// POLICY CHOICE: return the full path of the DSO to load from single_top. -static const wxString dso_full_path( const wxString& aAbsoluteArgv0 ) -{ - // Prefix basename with '_' and change extension to DSO_EXT. - - // POLICY CHOICE: Keep same path, and therefore installer must put the major DSO - // in same dir as top process module. Obviously alternatives are possible - // and that is why this is a separate function. One alternative would be to use - // a portion of CMAKE_INSTALL_PREFIX and navigate to a "lib" dir, but that - // would require a recompile any time you chose to install into a different place. - - // It is my decision to treat _eeschema.so and _pcbnew.so as "executables", - // not "libraries" in this regard, since most all program functionality lives - // in them. They are basically spin-offs from what was once a top process module. - // That may not make linux package maintainers happy, but that is not my job. - // Get over it. KiCad is not a trivial suite, and multiple platforms come - // into play, not merely linux. If it freaks you out, we can use a different - // file extension than ".so", but they are not purely libraries, else they - // would begin with "lib" in basename. Like I said, get over it, we're serving - // too many masters here: python, windows, linux, OSX, multiple versions of wx... - - wxFileName fn( aAbsoluteArgv0 ); - wxString basename( KIFACE_PREFIX ); // start with special prefix - - basename += fn.GetName(); // add argv[0]'s basename - fn.SetName( basename ); - - // here a suffix == an extension with a preceding '.', - // so skip the preceding '.' to get an extension - fn.SetExt( KIFACE_SUFFIX + 1 ); // special extension, + 1 => &KIFACE_SUFFIX[1] - - return fn.GetFullPath(); -} - - /// Put aPriorityPath in front of all paths in the value of aEnvVar. const wxString PrePendPath( const wxString& aEnvVar, const wxString& aPriorityPath ) { @@ -157,13 +119,13 @@ const wxString PrePendPath( const wxString& aEnvVar, const wxString& aPriorityPa /// Extend LIB_ENV_VAR list with the directory from which I came, prepending it. void SetLibEnvVar( const wxString& aAbsoluteArgv0 ) { - // POLICY CHOICE: Keep same path, so that installer MAY put the - // "subsidiary shared libraries" in the same directory as the top process module. + // POLICY CHOICE 2: Keep same path, so that installer MAY put the + // "subsidiary DSOs" in the same directory as the kiway top process modules. // A subsidiary shared library is one that is not a top level DSO, but rather // some shared library that a top level DSO needs to even be loaded. It is // a static link to a shared object from a top level DSO. - // This directory POLICY CHOICE is not the only dir in play, since LIB_ENV_VAR + // This directory POLICY CHOICE 2 is not the only dir in play, since LIB_ENV_VAR // has numerous path options in it, as does DSO searching on linux, windows, and OSX. // See "man ldconfig" on linux. What's being done here is for quick installs // into a non-standard place, and especially for Windows users who may not @@ -186,28 +148,119 @@ void SetLibEnvVar( const wxString& aAbsoluteArgv0 ) #endif } +// POLICY CHOICE 1: return the full path of the DSO to load from single_top. +static const wxString dso_full_path( const wxString& aAbsoluteArgv0 ) +{ + // Prefix basename with ${KIFACE_PREFIX} and change extension to ${KIFACE_SUFFIX} -// Only a single KIWAY is supported in this single_top top level component, -// which is dedicated to loading only a single DSO. -static KIWAY standalone; + // POLICY CHOICE 1: Keep same path, and therefore installer must put the kiface DSO + // in same dir as top process module. Obviously alternatives are possible + // and that is why this is a separate function. One alternative would be to use + // a portion of CMAKE_INSTALL_PREFIX and navigate to a "lib" dir, but that + // would require a recompile any time you chose to install into a different place. + + // It is my decision to treat _eeschema.kiface and _pcbnew.kiface as "executables", + // not "libraries" in this regard, since most all program functionality lives + // in them. They are basically spin-offs from what was once a top process module. + // That may not make linux package maintainers happy, but that is not my job. + // Get over it. KiCad is not a trivial suite, and multiple platforms come + // into play, not merely linux. For starters they will use extension ".kicad", + // but later in time morph to ".so". They are not purely libraries, else they + // would begin with "lib" in basename. Like I said, get over it, we're serving + // too many masters here: python, windows, linux, OSX, multiple versions of wx... + + wxFileName fn( aAbsoluteArgv0 ); + wxString basename( KIFACE_PREFIX ); // start with special prefix + + basename += fn.GetName(); // add argv[0]'s basename + fn.SetName( basename ); + + // Here a "suffix" == an extension with a preceding '.', + // so skip the preceding '.' to get an extension + fn.SetExt( KIFACE_SUFFIX + 1 ); // + 1 => &KIFACE_SUFFIX[1] + + return fn.GetFullPath(); +} // Use of this is arbitrary, remember single_top only knows about a single DSO. // Could have used one from the KIWAY also. static wxDynamicLibrary dso; +// Only a single KIWAY is supported in this single_top top level component, +// which is dedicated to loading only a single DSO. +static KIWAY kiway; + + +// implement a PGM_BASE and a wxApp side by side: + +/** + * Struct PGM_SINGLE_TOP + * implements PGM_BASE with its own OnPgmInit() and OnPgmExit(). + */ +static struct PGM_SINGLE_TOP : public PGM_BASE +{ + bool OnPgmInit( wxApp* aWxApp ); // overload PGM_BASE virtual + void OnPgmExit(); // overload PGM_BASE virtual + void MacOpenFile( const wxString& aFileName ); // overload PGM_BASE virtual +} program; + + +PGM_BASE& Pgm() +{ + return program; +} + + +/** + * Struct APP_SINGLE_TOP + * implements a bare naked wxApp (so that we don't become dependent on + * functionality in a wxApp derivative that we cannot deliver under wxPython). + */ +struct APP_SINGLE_TOP : public wxApp +{ + bool OnInit() // overload wxApp virtual + { + return Pgm().OnPgmInit( this ); + } + + int OnExit() // overload wxApp virtual + { + Pgm().OnPgmExit(); + return wxApp::OnExit(); + } + + /** + * Function MacOpenFile + * is specific to MacOSX (not used under Linux or Windows). + * MacOSX requires it for file association. + * @see http://wiki.wxwidgets.org/WxMac-specific_topics + */ + void MacOpenFile( const wxString& aFileName ) // overload wxApp virtual + { + Pgm().MacOpenFile( aFileName ); + } +}; + +IMPLEMENT_APP( APP_SINGLE_TOP ); + + /** * Function get_kiface_getter - * returns a KIFACE_GETTER_FUNC for the current process's main implemation link image. + * returns a KIFACE_GETTER_FUNC for the current process's main implementation + * link image. * - * @param aDSOName is an absolute full path to the DSO to load and find KIFACE_GETTER_FUNC within. + * @param aDSOName is an absolute full path to the DSO to load and find + * KIFACE_GETTER_FUNC within. * - * @return KIFACE_GETTER_FUNC* - a pointer to a function which can be called to get the KIFACE - * or NULL if the getter func was not found. If not found, it is possibly not version compatible - * since the lookup is done by name and the name contains the API version. + * @return KIFACE_GETTER_FUNC* - a pointer to a function which can be called to + * get the KIFACE or NULL if the getter func was not found. If not found, + * it is possibly not version compatible since the lookup is done by name and + * the name contains the API version. */ static KIFACE_GETTER_FUNC* get_kiface_getter( const wxString& aDSOName ) { +#if defined(BUILD_KIWAY_DLL) void* addr = NULL; if( !dso.Load( aDSOName, wxDL_VERBATIM | wxDL_NOW ) ) @@ -223,6 +276,11 @@ static KIFACE_GETTER_FUNC* get_kiface_getter( const wxString& aDSOName ) } return (KIFACE_GETTER_FUNC*) addr; + +#else + return &KIFACE_GETTER; + +#endif } @@ -230,32 +288,13 @@ static KIFACE* kiface; static int kiface_version; -bool PROCESS::OnInit() + +bool PGM_SINGLE_TOP::OnPgmInit( wxApp* aWxApp ) { - // Choose to use argv command line processing in base class's OnInit(). - // That choice is not mandatory, see wx's appbase.cpp OnInit(). - if( !wxApp::OnInit() ) - return false; + // first thing: set m_wx_app + m_wx_app = aWxApp; - wxStandardPathsBase& paths = wxStandardPaths::Get(); - -#if defined(DEBUG) - wxString dir = paths.GetLocalizedResourcesDir( wxT( "de" ), - wxStandardPaths::ResourceCat_None ); - - printf( "LocalizeResourcesDir:'%s'\n", TO_UTF8( dir ) ); - - wxString dummy( _( "translate this" ) ); -#endif - - wxString absoluteArgv0 = paths.GetExecutablePath(); - -#if 0 && defined(DEBUG) - printf( "argv[0]:'%s' absoluteArgv0:'%s'\n", - TO_UTF8( wxString( argv[0] ) ), - TO_UTF8( absoluteArgv0 ) - ); -#endif + wxString absoluteArgv0 = wxStandardPaths::Get().GetExecutablePath(); if( !wxIsAbsolutePath( absoluteArgv0 ) ) { @@ -267,6 +306,9 @@ bool PROCESS::OnInit() // KIFACE has hard dependencies on subsidiary DSOs below it. SetLibEnvVar( absoluteArgv0 ); + if( !initPgm() ) + return false; + wxString dname = dso_full_path( absoluteArgv0 ); // Get the getter. @@ -279,24 +321,170 @@ bool PROCESS::OnInit() return false; } - // Get the KIFACE, and give the DSO a single chance to do its - // "process level" initialization. - kiface = getter( &kiface_version, KIFACE_VERSION, &wxGetApp() ); + // Get the KIFACE. + kiface = getter( &kiface_version, KIFACE_VERSION, this ); - // KIFACE_GETTER_FUNC function comment (API) says the non-NULL is uconditional. + // KIFACE_GETTER_FUNC function comment (API) says the non-NULL is unconditional. wxASSERT_MSG( kiface, wxT( "attempted DSO has a bug, failed to return a KIFACE*" ) ); - // Use KIFACE to create a window that the KIFACE knows about, - // pass classId=0 for now. KIFACE::CreateWindow() is a virtual - // so we don't need to link to it. - wxFrame* frame = (wxFrame*) kiface->CreateWindow( 0, &standalone ); + // Give the DSO a single chance to do its "process level" initialization. + // "Process level" specifically means stay away from any projects in there. + if( !kiface->OnKifaceStart( this ) ) + return false; - SetTopWindow( frame ); + // Use KIFACE to create a top window that the KIFACE knows about. + // TOP_FRAME is passed on compiler command line from CMake, and is one of + // the types in ID_DRAWFRAME_TYPE. + // KIFACE::CreateWindow() is a virtual so we don't need to link to it. + // Remember its in the *.kiface DSO. +#if 0 + // this pulls in EDA_DRAW_FRAME type info, which we don't want in single_top + KIWAY_PLAYER* frame = dynamic_cast( kiface->CreateWindow( + NULL, TOP_FRAME, &kiway, KFCTL_STANDALONE ) ); +#else + KIWAY_PLAYER* frame = (KIWAY_PLAYER*) kiface->CreateWindow( + NULL, TOP_FRAME, &kiway, KFCTL_STANDALONE ); +#endif - frame->Centre(); + App().SetTopWindow( frame ); // wxApp gets a face. + + // Open project or file specified on the command line: + int argc = App().argc; + + if( argc > 1 ) + { + +#if defined(TOP_FRAME) && TOP_FRAME==GERBER_FRAME_TYPE + // gerbview handles multiple project data files, i.e. gerber files on cmd line. + + std::vector fileSet; + + // Load all files specified on the command line. + + for( int i=1; iOpenProjectFiles( fileSet ) ) + { + // OpenProjectFiles() API asks that it report failure to the UI. + // Nothing further to say here. + + // Fail the process startup if the file could not be opened, + // although this is an optional choice, one that can be reversed + // also in the KIFACE specific OpenProjectFiles() return value. + return false; + } + +#else + + wxFileName fn( argv[1] ); + + if( !fn.IsOk() ) + { + return false; + } + +#if defined(PGM_DATA_FILE_EXT) + // PGM_DATA_FILE_EXT is different for each compile, it may come from CMake + // on the compiler command line, or not. + if( !fn.GetExt() ) + fn.SetExt( wxT( PGM_DATA_FILE_EXT ) ); +#endif + + if( !Pgm().LockFile( fn.GetFullPath() ) ) + { + wxLogSysError( _( "This file is already open." ) ); + return false; + } + + if( fn.GetPath().size() ) + { + // wxSetWorkingDirectory does not like empty paths + wxSetWorkingDirectory( fn.GetPath() ); + + // @todo: setting CWD is taboo in a multi-project environment + } + + // Use the KIWAY_PLAYER::OpenProjectFiles() API function: + if( !frame->OpenProjectFiles( std::vector( 1, fn.GetFullPath() ) ) ) + { + // OpenProjectFiles() API asks that it report failure to the UI. + // Nothing further to say here. + + // Fail the process startup if the file could not be opened, + // although this is an optional choice, one that can be reversed + // also in the KIFACE specific OpenProjectFiles() return value. + return false; + } +#endif + } + else + { + /* The lean single_top program launcher has no access program settings, + else it would not be lean. That kind of functionality is in the + KIFACE now, but it cannot assume that it is the only KIFACE in memory. + So this looks like a dead concept here, or an expensive one in terms + of code size. + + wxString dir; + + if( m_pgmSettings->Read( workingDirKey, &dir ) && wxDirExists( dir ) ) + { + wxSetWorkingDirectory( dir ); + } + */ + } frame->Show(); return true; } + +void PGM_SINGLE_TOP::OnPgmExit() +{ + if( kiface ) + kiface->OnKifaceEnd(); + + saveCommonSettings(); + + // write common settings to disk, and destroy everything in PGM_BASE, + // especially wxSingleInstanceCheckerImpl earlier than wxApp and earlier + // than static destruction would. + PGM_BASE::destroy(); +} + + +void PGM_SINGLE_TOP::MacOpenFile( const wxString& aFileName ) +{ + wxFileName filename( aFileName ); + + if( filename.FileExists() ) + { +#if 0 + // this pulls in EDA_DRAW_FRAME type info, which we don't want in single_top + // link image. + KIWAY_PLAYER* frame = dynamic_cast( App().GetTopWindow() ); +#else + KIWAY_PLAYER* frame = (KIWAY_PLAYER*) App().GetTopWindow(); +#endif + if( frame ) + frame->OpenProjectFiles( std::vector( 1, aFileName ) ); + } +} diff --git a/common/systemdirsappend.cpp b/common/systemdirsappend.cpp new file mode 100644 index 0000000000..65f7bfc2c0 --- /dev/null +++ b/common/systemdirsappend.cpp @@ -0,0 +1,129 @@ + +#include + +#include +#include +#include + + +// put your best guesses in here, send the computer on a wild goose chase, its +// got nothing else to do. + +void SystemDirsAppend( SEARCH_STACK* aSearchStack ) +{ + // No clearing is done here, the most general approach is NOT to assume that + // our appends will be the only thing in the stack. This function has no + // knowledge of caller's intentions. + + // wxPathList::AddEnvList() is broken, use SEARCH_STACK::AddPaths(). + // SEARCH_STACK::AddPaths() will verify readability and existence of + // each directory before adding. + SEARCH_STACK maybe; + + // User environment variable path is the first search path. Chances are + // if the user is savvy enough to set an environment variable they know + // what they are doing. It should take precedence over anything else. + // Otherwise don't set it. + maybe.AddPaths( wxGetenv( wxT( "KICAD" ) ) ); + + // This is from CMAKE_INSTALL_PREFIX. + // Useful when KiCad is installed by `make install`. + // Use as second ranked place. + maybe.AddPaths( wxT( DEFAULT_INSTALL_PATH ) ); + + // Add the directory for the user-dependent, program specific, data files: + // Unix: ~/.appname + // Windows: C:\Documents and Settings\username\Application Data\appname + // Mac: ~/Library/Application Support/appname + maybe.AddPaths( wxStandardPaths::Get().GetUserDataDir() ); + + { + // Should be full path to this program executable. + wxString bin_dir = Pgm().GetExecutablePath(); + +#if defined(__MINGW32__) + // bin_dir uses unix path separator. So to parse with wxFileName + // use windows separator, especially important for server inclusion: + // like: \\myserver\local_path . + bin_dir.Replace( UNIX_STRING_DIR_SEP, WIN_STRING_DIR_SEP ); +#endif + + wxFileName bin_fn( bin_dir, wxEmptyString ); + + // Dir of the global (not user-specific), application specific, data files. + // From wx docs: + // Unix: prefix/share/appname + // Windows: the directory where the executable file is located + // Mac: appname.app/Contents/SharedSupport bundle subdirectory + wxString data_dir = wxStandardPaths::Get().GetDataDir(); + + if( bin_fn.GetPath() != data_dir ) + { + // add data_dir if it is different from the bin_dir + maybe.AddPaths( data_dir ); + } + + // Up one level relative to binary path with "share" appended below. + bin_fn.RemoveLastDir(); + maybe.AddPaths( bin_fn.GetPath() ); + } + + /* The normal OS program file install paths allow for a binary to be + * installed in a different path from the library files. This is + * useful for development purposes so the library and documentation + * files do not need to be installed separately. If someone can + * figure out a way to implement this without #ifdef, please do. + */ +#if defined(__MINGW32__) + maybe.AddPaths( wxGetenv( wxT( "PROGRAMFILES" ) ) ); +#elif __WXMAC__ + maybe.AddPaths( wxString( wxGetenv( wxT( "HOME" ) ) ) + wxT( "/Library/Application Support" ) ); + maybe.AddPaths( wxT( "/Library/Application Support" ) ); +#else + maybe.AddPaths( wxGetenv( wxT( "PATH" ) ) ); +#endif + +#if defined(DEBUG) && 0 + maybe.Show( "maybe wish list" ); +#endif + + // Append 1) kicad, 2) kicad/share, 3) share, and 4) share/kicad to each + // possible base path in 'maybe'. Since SEARCH_STACK::AddPaths() will verify + // readability and existence of each directory, not all of these will be + // actually appended. + for( unsigned i = 0; i < maybe.GetCount(); ++i ) + { + wxFileName fn( maybe[i], wxEmptyString ); + + if( fn.GetPath().AfterLast( fn.GetPathSeparator() ) == wxT( "bin" ) ) + { + fn.RemoveLastDir(); + + if( !fn.GetDirCount() ) + continue; // at least on linux + } + + aSearchStack->AddPaths( fn.GetPath() ); + + fn.AppendDir( wxT( "kicad" ) ); + aSearchStack->AddPaths( fn.GetPath() ); // add maybe[i]/kicad + + fn.AppendDir( wxT( "share" ) ); + aSearchStack->AddPaths( fn.GetPath() ); // add maybe[i]/kicad/share + + fn.RemoveLastDir(); // ../ clear share + fn.RemoveLastDir(); // ../ clear kicad + + fn.AppendDir( wxT( "share" ) ); + aSearchStack->AddPaths( fn.GetPath() ); // add maybe[i]/share + + fn.AppendDir( wxT( "kicad" ) ); + aSearchStack->AddPaths( fn.GetPath() ); // add maybe[i]/share/kicad + } + +#if defined(DEBUG) && 0 + // final results: + aSearchStack->Show( __func__ ); +#endif +} + diff --git a/common/worksheet.cpp b/common/worksheet.cpp index db15b8b1db..215b2dd4b7 100644 --- a/common/worksheet.cpp +++ b/common/worksheet.cpp @@ -31,13 +31,13 @@ #include -#include +#include #include #include #include #include #include -#include +#include #include #include #include @@ -170,7 +170,7 @@ wxString WS_DRAW_ITEM_LIST::BuildFullText( const wxString& aTextbase ) break; case 'K': - msg += productName + wxGetApp().GetAppName(); + msg += productName + Pgm().App().GetAppName(); msg += wxT( " " ) + GetBuildVersion(); break; diff --git a/common/wxwineda.cpp b/common/wxwineda.cpp index f68fe9a19c..8ff4c2c3d3 100644 --- a/common/wxwineda.cpp +++ b/common/wxwineda.cpp @@ -90,7 +90,7 @@ wxString EDA_GRAPHIC_TEXT_CTRL::FormatSize( EDA_UNITS_T aUnit, int textSize ) if( textSize > 3000 ) textSize = 3000; - return ReturnStringFromValue( aUnit, textSize ); + return StringFromValue( aUnit, textSize ); } @@ -124,7 +124,7 @@ int EDA_GRAPHIC_TEXT_CTRL::ParseSize( const wxString& sizeText, EDA_UNITS_T aUni { int textsize; - textsize = ReturnValueFromString( aUnit, sizeText ); + textsize = ValueFromString( aUnit, sizeText ); // Limit to reasonable size if( textsize < 10 ) @@ -209,8 +209,8 @@ wxPoint EDA_POSITION_CTRL::GetValue() { wxPoint coord; - coord.x = ReturnValueFromString( m_UserUnit, m_FramePosX->GetValue() ); - coord.y = ReturnValueFromString( m_UserUnit, m_FramePosY->GetValue() ); + coord.x = ValueFromString( m_UserUnit, m_FramePosX->GetValue() ); + coord.y = ValueFromString( m_UserUnit, m_FramePosY->GetValue() ); return coord; } @@ -230,11 +230,11 @@ void EDA_POSITION_CTRL::SetValue( int x_value, int y_value ) m_Pos_To_Edit.x = x_value; m_Pos_To_Edit.y = y_value; - msg = ReturnStringFromValue( m_UserUnit, m_Pos_To_Edit.x ); + msg = StringFromValue( m_UserUnit, m_Pos_To_Edit.x ); m_FramePosX->Clear(); m_FramePosX->SetValue( msg ); - msg = ReturnStringFromValue( m_UserUnit, m_Pos_To_Edit.y ); + msg = StringFromValue( m_UserUnit, m_Pos_To_Edit.y ); m_FramePosY->Clear(); m_FramePosY->SetValue( msg ); } @@ -279,7 +279,7 @@ EDA_VALUE_CTRL::EDA_VALUE_CTRL( wxWindow* parent, const wxString& title, BoxSizer->Add( m_Text, 0, wxGROW | wxLEFT | wxRIGHT | wxTOP, 5 ); - wxString stringvalue = ReturnStringFromValue( m_UserUnit, m_Value ); + wxString stringvalue = StringFromValue( m_UserUnit, m_Value ); m_ValueCtrl = new wxTextCtrl( parent, -1, stringvalue ); BoxSizer->Add( m_ValueCtrl, @@ -301,7 +301,7 @@ int EDA_VALUE_CTRL::GetValue() int coord; wxString txtvalue = m_ValueCtrl->GetValue(); - coord = ReturnValueFromString( m_UserUnit, txtvalue ); + coord = ValueFromString( m_UserUnit, txtvalue ); return coord; } @@ -312,7 +312,7 @@ void EDA_VALUE_CTRL::SetValue( int new_value ) m_Value = new_value; - buffer = ReturnStringFromValue( m_UserUnit, m_Value ); + buffer = StringFromValue( m_UserUnit, m_Value ); m_ValueCtrl->SetValue( buffer ); } diff --git a/common/zoom.cpp b/common/zoom.cpp index 6add6bc2f6..b1652d9fa9 100644 --- a/common/zoom.cpp +++ b/common/zoom.cpp @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cvpcb/CMakeLists.txt b/cvpcb/CMakeLists.txt index 53f39ada5e..a5942f0f5d 100644 --- a/cvpcb/CMakeLists.txt +++ b/cvpcb/CMakeLists.txt @@ -1,8 +1,7 @@ -add_definitions( -DCVPCB ) -### -# Includes -### +set( MAKE_LINK_MAPS true ) + +add_definitions( -DCVPCB ) include_directories( BEFORE ${INC_BEFORE} ) include_directories( @@ -15,12 +14,13 @@ include_directories( ${INC_AFTER} ) -### -# Sources -### + set( CVPCB_DIALOGS - dialogs/dialog_cvpcb_config.cpp - dialogs/dialog_cvpcb_config_fbp.cpp + + # These 2 still use search paths, which don't exist in footprint land. +# dialogs/dialog_cvpcb_config.cpp +# dialogs/dialog_cvpcb_config_fbp.cpp + dialogs/dialog_display_options.cpp dialogs/dialog_display_options_base.cpp ../pcbnew/dialogs/dialog_fp_lib_table.cpp @@ -40,101 +40,187 @@ set( CVPCB_SRCS class_footprints_listbox.cpp class_library_listbox.cpp cvframe.cpp - cvpcb.cpp listboxes.cpp menubar.cpp readwrite_dlgs.cpp tool_cvpcb.cpp ) -### -# Windows resource file -### -if( WIN32 ) - if( MINGW ) - # CVPCB_RESOURCES variable is set by the macro. - mingw_resource_compiler( cvpcb ) - else() - set( CVPCB_RESOURCES cvpcb.rc ) - endif() + +if( MINGW ) + # CVPCB_RESOURCES variable is set by the macro. + mingw_resource_compiler( cvpcb ) 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.icns" PROPERTIES + MACOSX_PACKAGE_LOCATION Resources + ) - set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/cvpcb_doc.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 - ${CVPCB_SRCS} - ${CVPCB_DIALOGS} - ${CVPCB_RESOURCES} - ) -### -# Set properties for APPLE on cvpcb target -### -if( APPLE ) - set_target_properties( cvpcb PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist ) +if( USE_KIWAY_DLLS ) + add_executable( cvpcb WIN32 MACOSX_BUNDLE + ../common/single_top.cpp + ../common/pgm_base.cpp + ) + set_source_files_properties( ../common/single_top.cpp PROPERTIES + COMPILE_DEFINITIONS "TOP_FRAME=CVPCB_FRAME_TYPE;PGM_DATA_FILE_EXT=\"net\";BUILD_KIWAY_DLL" + ) + target_link_libraries( cvpcb + #singletop # replaces common, giving us restrictive control and link warnings. + # There's way too much crap coming in from common yet. + common + bitmaps + ${wxWidgets_LIBRARIES} + ) + if( MAKE_LINK_MAPS ) + set_target_properties( cvpcb PROPERTIES + LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=cvpcb.map" ) + endif() + + # the main cvpcb program, in DSO form. + add_library( cvpcb_kiface MODULE + cvpcb.cpp + ${CVPCB_SRCS} + ${CVPCB_DIALOGS} + ${CVPCB_RESOURCES} + ) + set_target_properties( cvpcb_kiface PROPERTIES + OUTPUT_NAME cvpcb + PREFIX ${KIFACE_PREFIX} + SUFFIX ${KIFACE_SUFFIX} + ) + target_link_libraries( cvpcb_kiface + 3d-viewer + pcbcommon + pcad2kicadpcb + common + bitmaps + polygon + gal + ${wxWidgets_LIBRARIES} + ${OPENGL_LIBRARIES} + ${GDI_PLUS_LIBRARIES} + ${GLEW_LIBRARIES} + ${CAIRO_LIBRARIES} + ${PIXMAN_LIBRARY} + ) + + # Only for win32 cross compilation using MXE + if( WIN32 AND MSYS AND CMAKE_CROSSCOMPILING ) + target_link_libraries( cvpcb_kiface + opengl32 + glu32 + pixman-1 + fontconfig + freetype + bz2 + ) + endif() + + if( BUILD_GITHUB_PLUGIN ) + target_link_libraries( cvpcb_kiface github_plugin ) + endif() + + # Must follow github_plugin + target_link_libraries( cvpcb_kiface ${Boost_LIBRARIES} ) + + if( UNIX AND NOT APPLE ) + # -lrt must follow Boost + target_link_libraries( cvpcb_kiface rt ) + endif() + + if( APPLE ) + set_target_properties( cvpcb PROPERTIES + MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist + ) + endif() + + set_source_files_properties( cvpcb.cpp PROPERTIES + # The KIFACE is in cvpcb.cpp, export it: + COMPILE_DEFINITIONS "BUILD_KIWAY_DLL;COMPILING_DLL" + ) + + if( MAKE_LINK_MAPS ) + set_target_properties( cvpcb_kiface PROPERTIES + LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=_cvpcb.kiface.map" ) + endif() + + # if building cvpcb, then also build cvpcb_kiface if out of date. + add_dependencies( cvpcb cvpcb_kiface ) + + # these 2 binaries are a matched set, keep them together: + install( TARGETS cvpcb + DESTINATION ${KICAD_BIN} + COMPONENT binary + ) + install( TARGETS cvpcb_kiface + DESTINATION ${KICAD_BIN} + COMPONENT binary + ) + +else() + + add_executable( cvpcb WIN32 MACOSX_BUNDLE + ${CVPCB_SRCS} + ${CVPCB_DIALOGS} + ${CVPCB_RESOURCES} + ) + target_link_libraries( cvpcb + 3d-viewer + pcbcommon + pcad2kicadpcb + common + bitmaps + polygon + gal + ${wxWidgets_LIBRARIES} + ${OPENGL_LIBRARIES} + ${GDI_PLUS_LIBRARIES} + ${GLEW_LIBRARIES} + ${CAIRO_LIBRARIES} + ${PIXMAN_LIBRARY} + ) + + # Only for win32 cross compilation using MXE + if( WIN32 AND MSYS AND CMAKE_CROSSCOMPILING ) + target_link_libraries( cvpcb + opengl32 + glu32 + pixman-1 + fontconfig + freetype + bz2 + ) + endif() + + if( BUILD_GITHUB_PLUGIN ) + target_link_libraries( cvpcb github_plugin ) + endif() + + # Must follow github_plugin + target_link_libraries( cvpcb ${Boost_LIBRARIES} ) + + if( APPLE ) + set_target_properties( cvpcb PROPERTIES + MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist + ) + endif() + + install( TARGETS cvpcb + DESTINATION ${KICAD_BIN} + COMPONENT binary + ) + endif() - -### -# Link executable target cvpcb with correct libraries -### -target_link_libraries( cvpcb - 3d-viewer - pcbcommon - pcad2kicadpcb - common - bitmaps - polygon - gal - ${wxWidgets_LIBRARIES} - ${OPENGL_LIBRARIES} - ${GDI_PLUS_LIBRARIES} - ${GLEW_LIBRARIES} - ${CAIRO_LIBRARIES} - ${PIXMAN_LIBRARY} - ) - -# Only for win32 cross compilation using MXE -if( WIN32 AND MSYS AND CMAKE_CROSSCOMPILING ) -target_link_libraries(cvpcb - opengl32 - glu32 - pixman-1 - fontconfig - freetype - bz2 - ) -endif() - - -if( BUILD_GITHUB_PLUGIN ) - target_link_libraries( cvpcb github_plugin ) -endif() - -# Must follow github_plugin -target_link_libraries( cvpcb ${Boost_LIBRARIES} ) - - -### -# Add cvpcb as install target -### -install( TARGETS cvpcb - DESTINATION ${KICAD_BIN} - COMPONENT binary - ) diff --git a/cvpcb/autosel.cpp b/cvpcb/autosel.cpp index f9252eddbd..2b40fa4e40 100644 --- a/cvpcb/autosel.cpp +++ b/cvpcb/autosel.cpp @@ -29,9 +29,10 @@ #include #include +#include #include #include -#include +#include #include #include @@ -87,6 +88,7 @@ void CVPCB_MAINFRAME::AssocieModule( wxCommandEvent& event ) char Line[1024]; FILE* file; size_t ii; + SEARCH_STACK& search = Prj().SchSearchS(); if( m_netlist.IsEmpty() ) return; @@ -99,17 +101,17 @@ void CVPCB_MAINFRAME::AssocieModule( wxCommandEvent& event ) if( !fn.HasExt() ) { fn.SetExt( FootprintAliasFileExtension ); - // above fails if filename have more than one point + // above fails if filename has more than one point } else { fn.SetExt( fn.GetExt() + wxT( "." ) + FootprintAliasFileExtension ); } - tmp = wxGetApp().FindLibraryPath( fn ); + tmp = search.FindValidPath( fn ); if( !tmp ) { - msg.Printf( _( "Footprint alias library file <%s> could not be found in the " + msg.Printf( _( "Footprint alias library file '%s' could not be found in the " "default search paths." ), GetChars( fn.GetFullName() ) ); wxMessageBox( msg, titleLibLoadError, wxOK | wxICON_ERROR ); diff --git a/cvpcb/cfg.cpp b/cvpcb/cfg.cpp index 6823daa777..28c9d9816e 100644 --- a/cvpcb/cfg.cpp +++ b/cvpcb/cfg.cpp @@ -27,11 +27,12 @@ */ #include -#include +#include +#include #include #include #include -#include +#include #include #include #include @@ -46,24 +47,24 @@ #define GROUPEQU wxT("/cvpcb/libraries") -PARAM_CFG_ARRAY& CVPCB_MAINFRAME::GetProjectFileParameters( void ) +PARAM_CFG_ARRAY& CVPCB_MAINFRAME::GetProjectFileParameters() { if( !m_projectFileParams.empty() ) return m_projectFileParams; - m_projectFileParams.push_back( new PARAM_CFG_BASE( GROUPLIB, - PARAM_COMMAND_ERASE ) ); - m_projectFileParams.push_back( new PARAM_CFG_LIBNAME_LIST( wxT( "LibName" ), - &m_ModuleLibNames, - GROUPLIB ) ); - m_projectFileParams.push_back( new PARAM_CFG_LIBNAME_LIST( wxT( "EquName" ), - &m_AliasLibNames, - GROUPEQU ) ); - m_projectFileParams.push_back( new PARAM_CFG_WXSTRING( wxT( "NetIExt" ), - &m_NetlistFileExtension ) ); - m_projectFileParams.push_back( new PARAM_CFG_FILENAME( wxT( "LibDir" ), - &m_UserLibraryPath, - GROUPLIB ) ); + m_projectFileParams.push_back( new PARAM_CFG_BASE( GROUPLIB, PARAM_COMMAND_ERASE ) ); + + m_projectFileParams.push_back( new PARAM_CFG_LIBNAME_LIST( + wxT( "LibName" ), &m_ModuleLibNames, GROUPLIB ) ); + + m_projectFileParams.push_back( new PARAM_CFG_LIBNAME_LIST( + wxT( "EquName" ), &m_AliasLibNames, GROUPEQU ) ); + + m_projectFileParams.push_back( new PARAM_CFG_WXSTRING( + wxT( "NetIExt" ), &m_NetlistFileExtension ) ); + + m_projectFileParams.push_back( new PARAM_CFG_FILENAME( + wxT( "LibDir" ), &m_UserLibraryPath, GROUPLIB ) ); return m_projectFileParams; } @@ -71,42 +72,37 @@ PARAM_CFG_ARRAY& CVPCB_MAINFRAME::GetProjectFileParameters( void ) void CVPCB_MAINFRAME::LoadProjectFile( const wxString& aFileName ) { - wxFileName fn = aFileName; + wxFileName fn( aFileName ); + PROJECT& prj = Prj(); m_ModuleLibNames.Clear(); m_AliasLibNames.Clear(); - if( fn.GetExt() != ProjectFileExtension ) - fn.SetExt( ProjectFileExtension ); + fn.SetExt( ProjectFileExtension ); - wxGetApp().RemoveLibraryPath( m_UserLibraryPath ); - - wxGetApp().ReadProjectConfig( fn.GetFullPath(), GROUP, GetProjectFileParameters(), false ); + // was: Pgm().ReadProjectConfig( fn.GetFullPath(), GROUP, GetProjectFileParameters(), false ); + prj.ConfigLoad( prj.PcbSearchS(), fn.GetFullPath(), GROUP, GetProjectFileParameters(), false ); if( m_NetlistFileExtension.IsEmpty() ) m_NetlistFileExtension = wxT( "net" ); - // User library path takes precedent over default library search paths. - wxGetApp().InsertLibraryPath( m_UserLibraryPath, 1 ); + // empty the table, Load() it again below. + FootprintLibs()->Clear(); - delete m_footprintLibTable; + /* this is done by ConfigLoad(), and that sets the env var too. + prj.SetProjectFullName( fn.GetFullPath() ); + */ - // Attempt to load the project footprint library table if it exists. - m_footprintLibTable = new FP_LIB_TABLE(); - - if( m_DisplayFootprintFrame ) - m_DisplayFootprintFrame->SetFootprintLibTable( m_footprintLibTable ); - - wxFileName projectFpLibTableFileName; - - projectFpLibTableFileName = FP_LIB_TABLE::GetProjectFileName( fn ); - FP_LIB_TABLE::SetProjectPathEnvVariable( projectFpLibTableFileName ); + wxFileName projectFpLibTableFileName = FP_LIB_TABLE::GetProjectTableFileName( fn.GetFullPath() ); try { - m_footprintLibTable->Load( projectFpLibTableFileName, m_globalFootprintTable ); + // Stack the project specific FP_LIB_TABLE overlay on top of the global table. + // ~FP_LIB_TABLE() will not touch the fallback table, so multiple projects may + // stack this way, all using the same global fallback table. + FootprintLibs()->Load( projectFpLibTableFileName, &GFootprintTable ); } - catch( IO_ERROR ioe ) + catch( const IO_ERROR& ioe ) { DisplayError( this, ioe.errorText ); } @@ -136,5 +132,11 @@ void CVPCB_MAINFRAME::SaveProjectFile( wxCommandEvent& aEvent ) if( !IsWritable( fn ) ) return; - wxGetApp().WriteProjectConfig( fn.GetFullPath(), GROUP, GetProjectFileParameters() ); + // was: + // Pgm().WriteProjectConfig( fn.GetFullPath(), GROUP, GetProjectFileParameters() ); + + PROJECT& prj = Prj(); + SEARCH_STACK& search = prj.SchSearchS(); + + prj.ConfigSave( search, fn.GetFullPath(), GROUP, GetProjectFileParameters() ); } diff --git a/cvpcb/class_DisplayFootprintsFrame.cpp b/cvpcb/class_DisplayFootprintsFrame.cpp index 4c0b4e266a..8c3054c6c0 100644 --- a/cvpcb/class_DisplayFootprintsFrame.cpp +++ b/cvpcb/class_DisplayFootprintsFrame.cpp @@ -28,7 +28,7 @@ */ #include -#include +#include #include #include #include @@ -73,25 +73,24 @@ END_EVENT_TABLE() #define DISPLAY_FOOTPRINTS_FRAME_NAME wxT( "CmpFrame" ) -DISPLAY_FOOTPRINTS_FRAME::DISPLAY_FOOTPRINTS_FRAME( CVPCB_MAINFRAME* parent, - const wxString& title, - const wxPoint& pos, - const wxSize& size, long style ) : - PCB_BASE_FRAME( parent, CVPCB_DISPLAY_FRAME_TYPE, title, pos, size, - style, DISPLAY_FOOTPRINTS_FRAME_NAME ) +DISPLAY_FOOTPRINTS_FRAME::DISPLAY_FOOTPRINTS_FRAME( KIWAY* aKiway, CVPCB_MAINFRAME* aParent ) : + PCB_BASE_FRAME( aKiway, aParent, CVPCB_DISPLAY_FRAME_TYPE, _( "Module" ), + wxDefaultPosition, wxDefaultSize, + KICAD_DEFAULT_DRAWFRAME_STYLE, DISPLAY_FOOTPRINTS_FRAME_NAME ) { m_FrameName = DISPLAY_FOOTPRINTS_FRAME_NAME; m_showAxis = true; // true to draw axis. // Give an icon wxIcon icon; + icon.CopyFromBitmap( KiBitmap( icon_cvpcb_xpm ) ); SetIcon( icon ); SetBoard( new BOARD() ); SetScreen( new PCB_SCREEN( GetPageSizeIU() ) ); - LoadSettings(); + LoadSettings( config() ); // Initialize grid id to a default value if not found in config or bad: if( (m_LastGridSizeId <= 0) || @@ -149,7 +148,8 @@ DISPLAY_FOOTPRINTS_FRAME::~DISPLAY_FOOTPRINTS_FRAME() delete GetScreen(); SetScreen( NULL ); // Be sure there is no double deletion - ( (CVPCB_MAINFRAME*) wxGetApp().GetTopWindow() )->m_DisplayFootprintFrame = NULL; + // a crash would be better than this uncommented: + // ( (CVPCB_MAINFRAME*) Pgm().GetTopWindow() )->m_DisplayFootprintFrame = NULL; } @@ -438,7 +438,7 @@ void DISPLAY_FOOTPRINTS_FRAME::Show3D_Frame( wxCommandEvent& event ) return; } - m_Draw3DFrame = new EDA_3D_FRAME( this, _( "3D Viewer" ), KICAD_DEFAULT_3D_DRAWFRAME_STYLE ); + m_Draw3DFrame = new EDA_3D_FRAME( &Kiway(), this, _( "3D Viewer" ), KICAD_DEFAULT_3D_DRAWFRAME_STYLE ); m_Draw3DFrame->Show( true ); } @@ -493,7 +493,7 @@ MODULE* DISPLAY_FOOTPRINTS_FRAME::Get_Module( const wxString& aFootprintName ) wxLogDebug( wxT( "Load footprint <%s> from library <%s>." ), fpname.c_str(), nickname.c_str() ); - footprint = m_footprintLibTable->FootprintLoad( FROM_UTF8( nickname.c_str() ), FROM_UTF8( fpname.c_str() ) ); + footprint = FootprintLibs()->FootprintLoad( FROM_UTF8( nickname.c_str() ), FROM_UTF8( fpname.c_str() ) ); } catch( IO_ERROR ioe ) { diff --git a/cvpcb/class_DisplayFootprintsFrame.h b/cvpcb/class_DisplayFootprintsFrame.h index 52b1366813..71e412fc0c 100644 --- a/cvpcb/class_DisplayFootprintsFrame.h +++ b/cvpcb/class_DisplayFootprintsFrame.h @@ -40,10 +40,7 @@ class CVPCB_MAINFRAME; class DISPLAY_FOOTPRINTS_FRAME : public PCB_BASE_FRAME { public: - DISPLAY_FOOTPRINTS_FRAME( CVPCB_MAINFRAME* father, const wxString& title, - const wxPoint& pos, const wxSize& size, - long style = KICAD_DEFAULT_DRAWFRAME_STYLE ); - + DISPLAY_FOOTPRINTS_FRAME( KIWAY* aKiway, CVPCB_MAINFRAME* aParent ); ~DISPLAY_FOOTPRINTS_FRAME(); void OnCloseWindow( wxCloseEvent& Event ); diff --git a/cvpcb/class_footprints_listbox.cpp b/cvpcb/class_footprints_listbox.cpp index fe3b38e572..7c1ab079e4 100644 --- a/cvpcb/class_footprints_listbox.cpp +++ b/cvpcb/class_footprints_listbox.cpp @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include diff --git a/cvpcb/cvframe.cpp b/cvpcb/cvframe.cpp index 307ee5829b..4c1e922e5e 100644 --- a/cvpcb/cvframe.cpp +++ b/cvpcb/cvframe.cpp @@ -29,7 +29,8 @@ #include #include -#include +#include +#include #include #include #include @@ -104,9 +105,10 @@ END_EVENT_TABLE() #define CVPCB_MAINFRAME_NAME wxT( "CvpcbFrame" ) -CVPCB_MAINFRAME::CVPCB_MAINFRAME( const wxString& title, long style ) : - EDA_BASE_FRAME( NULL, CVPCB_FRAME_TYPE, title, wxDefaultPosition, - wxDefaultSize, style, CVPCB_MAINFRAME_NAME ) + +CVPCB_MAINFRAME::CVPCB_MAINFRAME( KIWAY* aKiway, wxWindow* aParent ) : + KIWAY_PLAYER( aKiway, aParent, CVPCB_FRAME_TYPE, wxT( "CvPCB" ), wxDefaultPosition, + wxDefaultSize, KICAD_DEFAULT_DRAWFRAME_STYLE, CVPCB_MAINFRAME_NAME ) { m_FrameName = CVPCB_MAINFRAME_NAME; m_ListCmp = NULL; @@ -119,9 +121,7 @@ CVPCB_MAINFRAME::CVPCB_MAINFRAME( const wxString& title, long style ) : m_KeepCvpcbOpen = false; m_undefinedComponentCnt = 0; m_skipComponentSelect = false; - - m_globalFootprintTable = NULL; - m_footprintLibTable = NULL; + m_NetlistFileExtension = wxT( "net" ); /* Name of the document footprint list * usually located in share/modules/footprints_doc @@ -137,7 +137,7 @@ CVPCB_MAINFRAME::CVPCB_MAINFRAME( const wxString& title, long style ) : SetAutoLayout( true ); - LoadSettings(); + LoadSettings( config() ); if( m_FrameSize.x < FRAME_MIN_SIZE_X ) m_FrameSize.x = FRAME_MIN_SIZE_X; @@ -194,36 +194,6 @@ CVPCB_MAINFRAME::CVPCB_MAINFRAME( const wxString& title, long style ) : Right().BestSize( (int) ( m_FrameSize.x * 0.30 ), m_FrameSize.y ) ); m_auimgr.Update(); - - if( m_globalFootprintTable == NULL ) - { - try - { - m_globalFootprintTable = new FP_LIB_TABLE(); - - if( !FP_LIB_TABLE::LoadGlobalTable( *m_globalFootprintTable ) ) - { - DisplayInfoMessage( this, wxT( "You have run CvPcb for the first time using the " - "new footprint library table method of finding " - "footprints. CvPcb has either copied the default " - "table or created an empty table in your home " - "folder. You must first configure the library " - "table to include all footprint libraries not " - "included with KiCad. See the \"Footprint Library " - "Table\" section of the CvPcb documentation for " - "more information." ) ); - } - } - catch( IO_ERROR ioe ) - { - wxString msg; - msg.Printf( _( "An error occurred attempting to load the global footprint library " - "table:\n\n%s" ), GetChars( ioe.errorText ) ); - DisplayError( this, msg ); - } - - m_footprintLibTable = new FP_LIB_TABLE( m_globalFootprintTable ); - } } @@ -233,28 +203,37 @@ CVPCB_MAINFRAME::~CVPCB_MAINFRAME() } -void CVPCB_MAINFRAME::LoadSettings() +FP_LIB_TABLE* CVPCB_MAINFRAME::FootprintLibs() const { - wxASSERT( wxGetApp().GetSettings() != NULL ); + PROJECT& prj = Prj(); + FP_LIB_TABLE* tbl = dynamic_cast( prj.Elem( PROJECT::FPTBL ) ); - wxConfig* cfg = wxGetApp().GetSettings(); + if( !tbl ) + { + tbl = new FP_LIB_TABLE( &GFootprintTable ); + prj.Elem( PROJECT::FPTBL, tbl ); + } - EDA_BASE_FRAME::LoadSettings(); - cfg->Read( KeepCvpcbOpenEntry, &m_KeepCvpcbOpen, true ); - cfg->Read( FootprintDocFileEntry, &m_DocModulesFileName, + return tbl; +} + + +void CVPCB_MAINFRAME::LoadSettings( wxConfigBase* aCfg ) +{ + EDA_BASE_FRAME::LoadSettings( aCfg ); + + aCfg->Read( KeepCvpcbOpenEntry, &m_KeepCvpcbOpen, true ); + aCfg->Read( FootprintDocFileEntry, &m_DocModulesFileName, DEFAULT_FOOTPRINTS_LIST_FILENAME ); } -void CVPCB_MAINFRAME::SaveSettings() +void CVPCB_MAINFRAME::SaveSettings( wxConfigBase* aCfg ) { - wxASSERT( wxGetApp().GetSettings() != NULL ); + EDA_BASE_FRAME::SaveSettings( aCfg ); - wxConfig* cfg = wxGetApp().GetSettings(); - - EDA_BASE_FRAME::SaveSettings(); - cfg->Write( KeepCvpcbOpenEntry, m_KeepCvpcbOpen ); - cfg->Write( FootprintDocFileEntry, m_DocModulesFileName ); + aCfg->Write( KeepCvpcbOpenEntry, m_KeepCvpcbOpen ); + aCfg->Write( FootprintDocFileEntry, m_DocModulesFileName ); int state = 0; @@ -267,7 +246,7 @@ void CVPCB_MAINFRAME::SaveSettings() if( m_mainToolBar->GetToolToggled( ID_CVPCB_FOOTPRINT_DISPLAY_BY_LIBRARY_LIST ) ) state |= FOOTPRINTS_LISTBOX::BY_LIBRARY; - cfg->Write( wxT( FILTERFOOTPRINTKEY ), state ); + aCfg->Write( wxT( FILTERFOOTPRINTKEY ), state ); } @@ -321,10 +300,10 @@ void CVPCB_MAINFRAME::OnCloseWindow( wxCloseEvent& Event ) } // Close the help frame - if( wxGetApp().GetHtmlHelpController() ) + if( Pgm().GetHtmlHelpController() ) { - if( wxGetApp().GetHtmlHelpController()->GetFrame() )// returns NULL if no help frame active - wxGetApp().GetHtmlHelpController()->GetFrame()->Close( true ); + if( Pgm().GetHtmlHelpController()->GetFrame() )// returns NULL if no help frame active + Pgm().GetHtmlHelpController()->GetFrame()->Close( true ); } if( m_NetlistFileName.IsOk() ) @@ -460,9 +439,8 @@ void CVPCB_MAINFRAME::DelAssociations( wxCommandEvent& event ) void CVPCB_MAINFRAME::LoadNetList( wxCommandEvent& event ) { - wxString oldPath; - wxFileName newFileName; int id = event.GetId(); + wxFileName newFileName; if( id >= wxID_FILE1 && id <= wxID_FILE9 ) { @@ -483,45 +461,59 @@ void CVPCB_MAINFRAME::LoadNetList( wxCommandEvent& event ) if( newFileName == m_NetlistFileName ) return; - if( m_NetlistFileName.DirExists() ) - oldPath = m_NetlistFileName.GetPath(); + OpenProjectFiles( std::vector( 1, newFileName.GetFullPath() ) ); +} - /* Update the library search path list. */ - if( wxGetApp().GetLibraryPathList().Index( oldPath ) != wxNOT_FOUND ) - wxGetApp().GetLibraryPathList().Remove( oldPath ); - wxGetApp().GetLibraryPathList().Insert( newFileName.GetPath(), 0 ); - m_NetlistFileName = newFileName; - ReadNetListAndLinkFiles(); +bool CVPCB_MAINFRAME::OpenProjectFiles( const std::vector& aFileSet, int aCtl ) +{ + if( aFileSet.size() == 1 ) + { + m_NetlistFileName = aFileSet[0]; + ReadNetListAndLinkFiles(); + + UpdateTitle(); + + return true; + } + + return false; } void CVPCB_MAINFRAME::ConfigCvpcb( wxCommandEvent& event ) { - DIALOG_CVPCB_CONFIG ConfigFrame( this ); + /* This is showing FOOTPRINT search paths, which are obsoleted. + I am removing this for the time being, since cvpcb will soon be part of pcbnew. - ConfigFrame.ShowModal(); + DIALOG_CVPCB_CONFIG dlg( this ); + + dlg.ShowModal(); + */ } void CVPCB_MAINFRAME::OnEditFootprintLibraryTable( wxCommandEvent& aEvent ) { bool tableChanged = false; - int r = InvokePcbLibTableEditor( this, m_globalFootprintTable, m_footprintLibTable ); + int r = InvokePcbLibTableEditor( this, &GFootprintTable, FootprintLibs() ); if( r & 1 ) { try { FILE_OUTPUTFORMATTER sf( FP_LIB_TABLE::GetGlobalTableFileName() ); - m_globalFootprintTable->Format( &sf, 0 ); + + GFootprintTable.Format( &sf, 0 ); tableChanged = true; } - catch( IO_ERROR& ioe ) + catch( const IO_ERROR& ioe ) { - wxString msg; - msg.Printf( _( "Error occurred saving the global footprint library " - "table:\n\n%s" ), ioe.errorText.GetData() ); + wxString msg = wxString::Format( _( + "Error occurred saving the global footprint library " + "table:\n\n%s" ), + GetChars( ioe.errorText ) ); + wxMessageBox( msg, _( "File Save Error" ), wxOK | wxICON_ERROR ); } } @@ -535,7 +527,7 @@ void CVPCB_MAINFRAME::OnEditFootprintLibraryTable( wxCommandEvent& aEvent ) try { FILE_OUTPUTFORMATTER sf( fn.GetFullPath() ); - m_footprintLibTable->Format( &sf, 0 ); + FootprintLibs()->Format( &sf, 0 ); tableChanged = true; } catch( IO_ERROR& ioe ) @@ -550,7 +542,7 @@ void CVPCB_MAINFRAME::OnEditFootprintLibraryTable( wxCommandEvent& aEvent ) if( tableChanged ) { BuildLIBRARY_LISTBOX(); - m_footprints.ReadFootprintFiles( m_footprintLibTable ); + m_footprints.ReadFootprintFiles( FootprintLibs() ); } } @@ -576,7 +568,7 @@ void CVPCB_MAINFRAME::SetLanguage( wxCommandEvent& event ) void CVPCB_MAINFRAME::DisplayDocFile( wxCommandEvent& event ) { - GetAssociatedDocument( this, m_DocModulesFileName, &wxGetApp().GetLibraryPathList() ); + GetAssociatedDocument( this, m_DocModulesFileName, &Kiface().KifaceSearch() ); } @@ -748,16 +740,17 @@ void CVPCB_MAINFRAME::DisplayStatus() bool CVPCB_MAINFRAME::LoadFootprintFiles() { + FP_LIB_TABLE* fptbl = FootprintLibs(); + // Check if there are footprint libraries in the footprint library table. - if( m_footprintLibTable == NULL || !m_footprintLibTable->GetLogicalLibs().size() ) + if( !fptbl || !fptbl->GetLogicalLibs().size() ) { wxMessageBox( _( "No PCB footprint libraries are listed in the current footprint " "library table." ), _( "Configuration Error" ), wxOK | wxICON_ERROR ); return false; } - if( m_footprintLibTable != NULL ) - m_footprints.ReadFootprintFiles( m_footprintLibTable ); + m_footprints.ReadFootprintFiles( fptbl ); if( m_footprints.GetErrorCount() ) { @@ -770,20 +763,18 @@ bool CVPCB_MAINFRAME::LoadFootprintFiles() void CVPCB_MAINFRAME::UpdateTitle() { - wxString title; + wxString title = wxString::Format( wxT( "Cvpcb %s " ), GetChars( GetBuildVersion() ) ); if( m_NetlistFileName.IsOk() && m_NetlistFileName.FileExists() ) { - title = wxGetApp().GetTitle() + wxT( " " ) + GetBuildVersion() + - wxT( " " ) + m_NetlistFileName.GetFullPath(); + title += m_NetlistFileName.GetFullPath(); if( !m_NetlistFileName.IsFileWritable() ) title += _( " [Read Only]" ); } else { - title = wxGetApp().GetTitle() + wxT( " " ) + GetBuildVersion() + - wxT( " " ) + _( " [no file]" ); + title += _( "[no file]" ); } SetTitle( title ); @@ -868,7 +859,7 @@ int CVPCB_MAINFRAME::ReadSchematicNetlist() // File header. -static char HeaderLinkFile[] = { "Cmp-Mod V01" }; +static char headerLinkFile[] = "Cmp-Mod V01"; bool CVPCB_MAINFRAME::WriteComponentLinkFile( const wxString& aFullFileName ) @@ -876,7 +867,7 @@ bool CVPCB_MAINFRAME::WriteComponentLinkFile( const wxString& aFullFileName ) COMPONENT* component; FILE* outputFile; wxFileName fn( aFullFileName ); - wxString Title = wxGetApp().GetTitle() + wxT( " " ) + GetBuildVersion(); + wxString title = wxString::Format( wxT( "Cvpcb %s " ), GetChars( GetBuildVersion() ) ); outputFile = wxFopen( fn.GetFullPath(), wxT( "wt" ) ); @@ -896,8 +887,8 @@ bool CVPCB_MAINFRAME::WriteComponentLinkFile( const wxString& aFullFileName ) * IdModule = BUS_PC; * EndCmp */ - retval |= fprintf( outputFile, "%s", HeaderLinkFile ); - retval |= fprintf( outputFile, " Created by %s", TO_UTF8( Title ) ); + retval |= fprintf( outputFile, "%s", headerLinkFile ); + retval |= fprintf( outputFile, " Created by %s", TO_UTF8( title ) ); retval |= fprintf( outputFile, " date = %s\n", TO_UTF8( DateAndTime() ) ); for( unsigned i = 0; i < m_netlist.GetCount(); i++ ) @@ -919,15 +910,9 @@ bool CVPCB_MAINFRAME::WriteComponentLinkFile( const wxString& aFullFileName ) void CVPCB_MAINFRAME::CreateScreenCmp() { - if( m_DisplayFootprintFrame == NULL ) + if( !m_DisplayFootprintFrame ) { - m_DisplayFootprintFrame = new DISPLAY_FOOTPRINTS_FRAME( this, _( "Module" ), - wxPoint( 0, 0 ), - wxSize( 600, 400 ), - KICAD_DEFAULT_DRAWFRAME_STYLE ); - - m_DisplayFootprintFrame->SetFootprintLibTable( m_footprintLibTable ); - + m_DisplayFootprintFrame = new DISPLAY_FOOTPRINTS_FRAME( &Kiway(), this ); m_DisplayFootprintFrame->Show( true ); } else @@ -1023,11 +1008,11 @@ void CVPCB_MAINFRAME::BuildLIBRARY_LISTBOX() wxFONTWEIGHT_NORMAL ) ); } - if( m_footprintLibTable ) + if( FootprintLibs() ) { wxArrayString libNames; - std::vector< wxString > libNickNames = m_footprintLibTable->GetLogicalLibs(); + std::vector< wxString > libNickNames = FootprintLibs()->GetLogicalLibs(); for( unsigned ii = 0; ii < libNickNames.size(); ii++ ) libNames.Add( libNickNames[ii] ); diff --git a/cvpcb/cvpcb.cpp b/cvpcb/cvpcb.cpp index 84a1ae8b73..6d2a2ce02b 100644 --- a/cvpcb/cvpcb.cpp +++ b/cvpcb/cvpcb.cpp @@ -27,8 +27,11 @@ */ #include +#include +#include #include -#include +#include +#include #include #include #include @@ -56,11 +59,13 @@ const wxString FootprintAliasFileWildcard( _( "KiCad footprint alias files (*.eq const wxString titleLibLoadError( _( "Library Load Error" ) ); +#if 0 // add this logic to OpenProjectFiles() + /* * MacOSX: Needed for file association * http://wiki.wxwidgets.org/WxMac-specific_topics */ -void EDA_APP::MacOpenFile( const wxString& aFileName ) +void PGM_BASE::MacOpenFile( const wxString& aFileName ) { wxFileName filename = aFileName; wxString oldPath; @@ -74,73 +79,153 @@ void EDA_APP::MacOpenFile( const wxString& aFileName ) oldPath = frame->m_NetlistFileName.GetPath(); // Update the library search path list. - if( wxGetApp().GetLibraryPathList().Index( oldPath ) != wxNOT_FOUND ) - wxGetApp().GetLibraryPathList().Remove( oldPath ); + if( Pgm().GetLibraryPathList().Index( oldPath ) != wxNOT_FOUND ) + Pgm().GetLibraryPathList().Remove( oldPath ); - wxGetApp().GetLibraryPathList().Insert( filename.GetPath(), 0 ); + Pgm().GetLibraryPathList().Insert( filename.GetPath(), 0 ); frame->m_NetlistFileName = filename; frame->ReadNetListAndLinkFiles(); } +#endif -// Create a new application object -IMPLEMENT_APP( EDA_APP ) +namespace CV { - -/************************************/ -/* Called to initialize the program */ -/************************************/ - -bool EDA_APP::OnInit() +static struct IFACE : public KIFACE_I { - wxFileName filename; - wxString message; - CVPCB_MAINFRAME* frame = NULL; + // Of course all are virtual overloads, implementations of the KIFACE. - InitEDA_Appl( wxT( "CvPcb" ), APP_CVPCB_T ); + IFACE( const char* aName, KIWAY::FACE_T aType ) : + KIFACE_I( aName, aType ) + {} - SetFootprintLibTablePath(); + bool OnKifaceStart( PGM_BASE* aProgram ); - if( m_Checker && m_Checker->IsAnotherRunning() ) + void OnKifaceEnd(); + + wxWindow* CreateWindow( wxWindow* aParent, int aClassId, KIWAY* aKiway, int aCtlBits = 0 ) { - if( !IsOK( NULL, _( "CvPcb is already running, Continue?" ) ) ) - return false; + switch( aClassId ) + { + case CVPCB_FRAME_TYPE: + { + CVPCB_MAINFRAME* frame = new CVPCB_MAINFRAME( aKiway, aParent ); + return frame; + } + break; + + default: + ; + } + + return NULL; } - if( argc > 1 ) + /** + * Function IfaceOrAddress + * return a pointer to the requested object. The safest way to use this + * is to retrieve a pointer to a static instance of an interface, similar to + * how the KIFACE interface is exported. But if you know what you are doing + * use it to retrieve anything you want. + * + * @param aDataId identifies which object you want the address of. + * + * @return void* - and must be cast into the know type. + */ + void* IfaceOrAddress( int aDataId ) { - filename = argv[1]; - wxSetWorkingDirectory( filename.GetPath() ); + return NULL; } - // read current setup and reopen last directory if no filename to open in command line - bool reopenLastUsedDirectory = argc == 1; - GetSettings( reopenLastUsedDirectory ); +} kiface( "cvpcb", KIWAY::FACE_CVPCB ); + +} // namespace + +using namespace CV; + + +static PGM_BASE* process; + + +KIFACE_I& Kiface() { return kiface; } + + +// KIFACE_GETTER's actual spelling is a substitution macro found in kiway.h. +// KIFACE_GETTER will not have name mangling due to declaration in kiway.h. +MY_API( KIFACE* ) KIFACE_GETTER( int* aKIFACEversion, int aKIWAYversion, PGM_BASE* aProgram ) +{ + process = (PGM_BASE*) aProgram; + return &kiface; +} + + +PGM_BASE& Pgm() +{ + wxASSERT( process ); // KIFACE_GETTER has already been called. + return *process; +} + + +FP_LIB_TABLE GFootprintTable; + + +// A short lived implementation. cvpcb will get combine into pcbnew shortly, so +// we skip setting KISYSMOD here for now. User should set the environment +// variable. + +bool IFACE::OnKifaceStart( PGM_BASE* aProgram ) +{ + // This is process level, not project level, initialization of the DSO. + + // Do nothing in here pertinent to a project! + + start_common(); + + /* Now that there are no *.mod files in the standard library, this function + has no utility. User should simply set the variable manually. + Looking for *.mod files which do not exist is fruitless. + + // SetFootprintLibTablePath(); + */ g_DrawBgColor = BLACK; - wxString Title = GetTitle() + wxT( " " ) + GetBuildVersion(); - frame = new CVPCB_MAINFRAME( Title ); - - // Show the frame - SetTopWindow( frame ); - frame->Show( true ); - frame->m_NetlistFileExtension = wxT( "net" ); - - if( filename.IsOk() && filename.FileExists() ) + try { - frame->m_NetlistFileName = filename; - frame->LoadProjectFile( filename.GetFullPath() ); + // The global table is not related to a specific project. All projects + // will use the same global table. So the KIFACE::OnKifaceStart() contract + // of avoiding anything project specific is not violated here. - if( frame->ReadNetListAndLinkFiles() ) + if( !FP_LIB_TABLE::LoadGlobalTable( GFootprintTable ) ) { - frame->m_NetlistFileExtension = filename.GetExt(); - return true; + DisplayInfoMessage( NULL, wxT( + "You have run CvPcb for the first time using the " + "new footprint library table method for finding " + "footprints. CvPcb has either copied the default " + "table or created an empty table in your home " + "folder. You must first configure the library " + "table to include all footprint libraries not " + "included with KiCad. See the \"Footprint Library " + "Table\" section of the CvPcb documentation for " + "more information." ) ); } } - - frame->UpdateTitle(); + catch( const IO_ERROR& ioe ) + { + wxString msg = wxString::Format( _( + "An error occurred attempting to load the global footprint library " + "table:\n\n%s" ), + GetChars( ioe.errorText ) + ); + DisplayError( NULL, msg ); + return false; + } return true; } + +void IFACE::OnKifaceEnd() +{ + end_common(); +} diff --git a/cvpcb/cvpcb_mainframe.h b/cvpcb/cvpcb_mainframe.h index 01e2962a0d..6a7e00efaa 100644 --- a/cvpcb/cvpcb_mainframe.h +++ b/cvpcb/cvpcb_mainframe.h @@ -35,7 +35,7 @@ #include #include -#include +#include /* Forward declarations of all top-level window classes. */ @@ -47,22 +47,17 @@ class DISPLAY_FOOTPRINTS_FRAME; class COMPONENT; class FP_LIB_TABLE; +namespace CV { struct IFACE; } /** * The CvPcb application main window. */ -class CVPCB_MAINFRAME : public EDA_BASE_FRAME +class CVPCB_MAINFRAME : public KIWAY_PLAYER { + friend struct CV::IFACE; + wxArrayString m_footprintListEntries; - /// The global footprint library table. - FP_LIB_TABLE* m_globalFootprintTable; - - /// The project footprint library table. This is a combination of the project - /// footprint library table and the global footprint table. This is the one to - /// use when finding a #MODULE. - FP_LIB_TABLE* m_footprintLibTable; - public: bool m_KeepCvpcbOpen; FOOTPRINTS_LISTBOX* m_FootprintList; @@ -87,10 +82,19 @@ protected: // (in automatic selection/deletion of associations) PARAM_CFG_ARRAY m_projectFileParams; + CVPCB_MAINFRAME( KIWAY* aKiway, wxWindow* aParent ); + public: - CVPCB_MAINFRAME( const wxString& title, long style = KICAD_DEFAULT_DRAWFRAME_STYLE ); ~CVPCB_MAINFRAME(); + bool OpenProjectFiles( const std::vector& aFileSet, int aCtl=0 ); // overload KIWAY_PLAYER + + /** + * Function FootprintLibs + * @return the project #FP_LIB_TABLE. + */ + FP_LIB_TABLE* FootprintLibs() const; + /** * Function OnSelectComponent * Called when clicking on a component in component list window @@ -226,23 +230,9 @@ public: */ void LoadProjectFile( const wxString& aFileName ); - /** - * Function LoadSettings - * loads the CvPcb main frame specific configuration settings. - * - * Don't forget to call this base method from any derived classes or the - * settings will not get loaded. - */ - virtual void LoadSettings(); + void LoadSettings( wxConfigBase* aCfg ); // override virtual - /** - * Function SaveSettings - * save the CvPcb frame specific configuration settings. - * - * Don't forget to call this base method from any derived classes or the - * settings will not get saved. - */ - virtual void SaveSettings(); + void SaveSettings( wxConfigBase* aCfg ); // override virtual /** * Function DisplayStatus diff --git a/cvpcb/dialogs/dialog_cvpcb_config.cpp b/cvpcb/dialogs/dialog_cvpcb_config.cpp index 44f263d23e..b0836502f4 100644 --- a/cvpcb/dialogs/dialog_cvpcb_config.cpp +++ b/cvpcb/dialogs/dialog_cvpcb_config.cpp @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include #include @@ -43,18 +43,19 @@ #include -DIALOG_CVPCB_CONFIG::DIALOG_CVPCB_CONFIG( CVPCB_MAINFRAME* parent ) : - DIALOG_CVPCB_CONFIG_FBP( parent ) +DIALOG_CVPCB_CONFIG::DIALOG_CVPCB_CONFIG( CVPCB_MAINFRAME* aParent ) : + DIALOG_CVPCB_CONFIG_FBP( aParent ) { - wxString title; - wxFileName fn = parent->m_NetlistFileName; + wxString title; + wxFileName fn = aParent->m_NetlistFileName; + fn.SetExt( ProjectFileExtension ); - m_Parent = parent; - m_Config = wxGetApp().GetCommonSettings(); + m_Parent = aParent; + m_Config = Pgm().CommonSettings(); Init( ); - title.Format( _( "Project file: <%s>" ), GetChars( fn.GetFullPath() ) ); + title.Format( _( "Project file: '%s'" ), GetChars( fn.GetFullPath() ) ); SetTitle( title ); if( GetSizer() ) @@ -93,7 +94,7 @@ void DIALOG_CVPCB_CONFIG::Init() } // Display actual libraries paths: - wxPathList libpaths = wxGetApp().GetLibraryPathList(); + wxPathList libpaths = Pgm().GetLibraryPathList(); for( unsigned ii = 0; ii < libpaths.GetCount(); ii++ ) { @@ -112,9 +113,9 @@ void DIALOG_CVPCB_CONFIG::OnCancelClick( wxCommandEvent& event ) if( m_LibPathChanged ) { for( unsigned ii = 0; ii < m_ListLibr->GetCount(); ii++ ) - wxGetApp().RemoveLibraryPath( m_listUserPaths->GetString( ii ) ); + Pgm().RemoveLibraryPath( m_listUserPaths->GetString( ii ) ); - wxGetApp().InsertLibraryPath( m_Parent->m_UserLibraryPath, 1 ); + Pgm().InsertLibraryPath( m_Parent->m_UserLibraryPath, 1 ); } EndModal( wxID_CANCEL ); @@ -295,7 +296,8 @@ void DIALOG_CVPCB_CONFIG::OnAddOrInsertLibClick( wxCommandEvent& event ) insert = true; wildcard = FootprintAliasFileWildcard; - wxListBox * list = m_ListEquiv; + + wxListBox* list = m_ListEquiv; if( (event.GetId() == ID_ADD_LIB) || (event.GetId() == ID_INSERT_LIB) ) { @@ -317,7 +319,7 @@ void DIALOG_CVPCB_CONFIG::OnAddOrInsertLibClick( wxCommandEvent& event ) libpath = m_DefaultLibraryPathslistBox->GetStringSelection(); if( libpath.IsEmpty() ) - libpath = wxGetApp().ReturnLastVisitedLibraryPath(); + libpath = Pgm().LastVisitedLibraryPath(); wxFileDialog FilesDialog( this, _( "Footprint library files:" ), libpath, wxEmptyString, wildcard, @@ -334,7 +336,7 @@ void DIALOG_CVPCB_CONFIG::OnAddOrInsertLibClick( wxCommandEvent& event ) fn = Filenames[jj]; if( jj == 0 ) - wxGetApp().SaveLastVisitedLibraryPath( fn.GetPath() ); + Pgm().SaveLastVisitedLibraryPath( fn.GetPath() ); /* If the library path is already in the library search paths * list, just add the library name to the list. Otherwise, add @@ -343,7 +345,7 @@ void DIALOG_CVPCB_CONFIG::OnAddOrInsertLibClick( wxCommandEvent& event ) * because it preserve use of default libraries paths, when the path * is a sub path of these default paths */ - libfilename = wxGetApp().ReturnFilenameWithRelativePathInLibPath( fn.GetFullPath() ); + libfilename = Pgm().FilenameWithRelativePathInSearchList( fn.GetFullPath() ); // Remove extension: fn = libfilename; @@ -372,7 +374,7 @@ void DIALOG_CVPCB_CONFIG::OnAddOrInsertLibClick( wxCommandEvent& event ) void DIALOG_CVPCB_CONFIG::OnAddOrInsertPath( wxCommandEvent& event ) { - wxString path = wxGetApp().ReturnLastVisitedLibraryPath(); + wxString path = Pgm().LastVisitedLibraryPath(); bool select = EDA_DirectorySelector( _( "Default Path for Libraries" ), path, @@ -416,10 +418,10 @@ void DIALOG_CVPCB_CONFIG::OnAddOrInsertPath( wxCommandEvent& event ) m_listUserPaths->Insert( path, ipos ); m_LibPathChanged = true; - wxGetApp().InsertLibraryPath( path, ipos + 1 ); + Pgm().InsertLibraryPath( path, ipos + 1 ); // Display actual libraries paths: - wxPathList libpaths = wxGetApp().GetLibraryPathList(); + wxPathList libpaths = Pgm().GetLibraryPathList(); m_DefaultLibraryPathslistBox->Clear(); for( unsigned ii = 0; ii < libpaths.GetCount(); ii++ ) @@ -432,7 +434,7 @@ void DIALOG_CVPCB_CONFIG::OnAddOrInsertPath( wxCommandEvent& event ) DisplayError( this, _( "Path already in use" ) ); } - wxGetApp().SaveLastVisitedLibraryPath( path ); + Pgm().SaveLastVisitedLibraryPath( path ); } @@ -445,13 +447,13 @@ void DIALOG_CVPCB_CONFIG::OnRemoveUserPath( wxCommandEvent& event ) if( ii >= 0 ) { - wxGetApp().RemoveLibraryPath( m_listUserPaths->GetStringSelection() ); + Pgm().RemoveLibraryPath( m_listUserPaths->GetStringSelection() ); m_listUserPaths->Delete( ii ); m_LibPathChanged = true; } // Display actual libraries paths: - wxPathList libpaths = wxGetApp().GetLibraryPathList(); + wxPathList libpaths = Pgm().GetLibraryPathList(); m_DefaultLibraryPathslistBox->Clear(); for( unsigned ii = 0; ii < libpaths.GetCount(); ii++ ) @@ -466,7 +468,7 @@ void DIALOG_CVPCB_CONFIG::OnBrowseModDocFile( wxCommandEvent& event ) wxString FullFileName; wxString docpath, filename; - docpath = wxGetApp().ReturnLastVisitedLibraryPath( wxT( "doc" ) ); + docpath = Pgm().LastVisitedLibraryPath( wxT( "doc" ) ); wxFileDialog FilesDialog( this, _( "Footprint document file:" ), docpath, wxEmptyString, PdfFileWildcard, @@ -485,8 +487,8 @@ void DIALOG_CVPCB_CONFIG::OnBrowseModDocFile( wxCommandEvent& event ) * a sub path of these default paths */ wxFileName fn = FullFileName; - wxGetApp().SaveLastVisitedLibraryPath( fn.GetPath() ); + Pgm().SaveLastVisitedLibraryPath( fn.GetPath() ); - filename = wxGetApp().ReturnFilenameWithRelativePathInLibPath( FullFileName ); + filename = Pgm().FilenameWithRelativePathInSearchList( FullFileName ); m_TextHelpModulesFileName->SetValue( filename ); } diff --git a/cvpcb/dialogs/dialog_cvpcb_config.h b/cvpcb/dialogs/dialog_cvpcb_config.h index a83847d874..fa9b51794c 100644 --- a/cvpcb/dialogs/dialog_cvpcb_config.h +++ b/cvpcb/dialogs/dialog_cvpcb_config.h @@ -14,8 +14,9 @@ class DIALOG_CVPCB_CONFIG : public DIALOG_CVPCB_CONFIG_FBP { private: CVPCB_MAINFRAME* m_Parent; - wxConfig * m_Config; - wxString m_UserLibDirBufferImg; + wxConfigBase* m_Config; + wxString m_UserLibDirBufferImg; + bool m_LibListChanged; bool m_LibPathChanged; diff --git a/cvpcb/menubar.cpp b/cvpcb/menubar.cpp index f20fcd33d9..b34454e22f 100644 --- a/cvpcb/menubar.cpp +++ b/cvpcb/menubar.cpp @@ -27,7 +27,8 @@ * @brief (Re)Create the menubar for CvPcb */ #include -#include +#include +#include #include #include #include @@ -74,11 +75,13 @@ void CVPCB_MAINFRAME::ReCreateMenuBar() // Add this menu to list menu managed by m_fileHistory // (the file history will be updated when adding/removing files in history if( openRecentMenu ) - wxGetApp().GetFileHistory().RemoveMenu( openRecentMenu ); + Kiface().GetFileHistory().RemoveMenu( openRecentMenu ); openRecentMenu = new wxMenu(); - wxGetApp().GetFileHistory().UseMenu( openRecentMenu ); - wxGetApp().GetFileHistory().AddFilesToMenu(); + + Kiface().GetFileHistory().UseMenu( openRecentMenu ); + Kiface().GetFileHistory().AddFilesToMenu(); + AddMenuItem( filesMenu, openRecentMenu, -1, _( "Open &Recent" ), _( "Open a recent opened netlist document" ), @@ -115,7 +118,7 @@ void CVPCB_MAINFRAME::ReCreateMenuBar() KiBitmap( library_table_xpm ) ); // Language submenu - wxGetApp().AddMenuLanguageList( preferencesMenu ); + Pgm().AddMenuLanguageList( preferencesMenu ); // Keep open on save item = new wxMenuItem( preferencesMenu, ID_CVPCB_CONFIG_KEEP_OPEN_ON_SAVE, diff --git a/cvpcb/readwrite_dlgs.cpp b/cvpcb/readwrite_dlgs.cpp index ea28775faf..d55a79df14 100644 --- a/cvpcb/readwrite_dlgs.cpp +++ b/cvpcb/readwrite_dlgs.cpp @@ -119,6 +119,49 @@ void CVPCB_MAINFRAME::SetNewPkg( const wxString& aFootprintName ) } +/** + * Function missingLegacyLibs + * tests the list of \a aLibNames by URI to determine if any of them are missing from + * the #FP_LIB_TABLE. + * + * @note The missing legacy footprint library test is performed by using old library + * file path lookup method. If the library is found, it is compared against all + * of the URIs in the table rather than the nickname. This was done because the + * user could change the nicknames from the default table. Using the full path + * is more reliable. + * + * @param aLibNames is the list of legacy library names. + * @param aErrorMsg is a pointer to a wxString object to store the URIs of any missing + * legacy library paths. Can be NULL. + * @return true if there are missing legacy libraries. Otherwise false. + */ +static bool missingLegacyLibs( FP_LIB_TABLE* aTbl, SEARCH_STACK& aSStack, + const wxArrayString& aLibNames, wxString* aErrorMsg ) +{ + bool retv = false; + + for( unsigned i = 0; i < aLibNames.GetCount(); i++ ) + { + wxFileName fn( wxEmptyString, aLibNames[i], LegacyFootprintLibPathExtension ); + + wxString legacyLibPath = aSStack.FindValidPath( fn ); + + if( legacyLibPath.IsEmpty() ) + continue; + + if( aTbl->FindRowByURI( legacyLibPath ) == 0 ) + { + retv = true; + + if( aErrorMsg ) + *aErrorMsg += wxT( "\"" ) + legacyLibPath + wxT( "\"\n" ); + } + } + + return retv; +} + + bool CVPCB_MAINFRAME::ReadNetListAndLinkFiles() { COMPONENT* component; @@ -164,7 +207,7 @@ bool CVPCB_MAINFRAME::ReadNetListAndLinkFiles() // Check if footprint links were generated before the footprint library table was implemented. if( isLegacy ) { - if( m_footprintLibTable->MissingLegacyLibs( m_ModuleLibNames, &missingLibs ) ) + if( missingLegacyLibs( FootprintLibs(), Prj().PcbSearchS(), m_ModuleLibNames, &missingLibs ) ) { msg = wxT( "The following legacy libraries are defined in the project file " "were not found in the footprint library table:\n\n" ) + missingLibs; @@ -188,7 +231,9 @@ bool CVPCB_MAINFRAME::ReadNetListAndLinkFiles() msg.Clear(); WX_STRING_REPORTER reporter( &msg ); - if( !m_footprintLibTable->ConvertFromLegacy( m_netlist, m_ModuleLibNames, &reporter ) ) + SEARCH_STACK& search = Prj().SchSearchS(); + + if( !FootprintLibs()->ConvertFromLegacy( search, m_netlist, m_ModuleLibNames, &reporter ) ) { HTML_MESSAGE_BOX dlg( this, wxEmptyString ); @@ -270,7 +315,7 @@ int CVPCB_MAINFRAME::SaveCmpLinkFile( const wxString& aFullFileName ) fn.SetExt( ComponentFileExtension ); // Save the project specific footprint library table. - if( !m_footprintLibTable->IsEmpty( false ) ) + if( !FootprintLibs()->IsEmpty( false ) ) { wxFileName fpLibFileName = fn; fpLibFileName.ClearExt(); @@ -282,9 +327,9 @@ int CVPCB_MAINFRAME::SaveCmpLinkFile( const wxString& aFullFileName ) { try { - m_footprintLibTable->Save( fpLibFileName ); + FootprintLibs()->Save( fpLibFileName ); } - catch( IO_ERROR& ioe ) + catch( const IO_ERROR& ioe ) { DisplayError( this, wxString::Format( _( "An error occurred attempting to save the " diff --git a/cvpcb/tool_cvpcb.cpp b/cvpcb/tool_cvpcb.cpp index 700e344c0e..2937670ed3 100644 --- a/cvpcb/tool_cvpcb.cpp +++ b/cvpcb/tool_cvpcb.cpp @@ -28,7 +28,7 @@ */ #include -#include +#include #include #include @@ -41,7 +41,7 @@ void CVPCB_MAINFRAME::ReCreateHToolbar() { - wxConfig* config = wxGetApp().GetSettings(); + wxConfigBase* config = Kiface().KifaceSettings(); if( m_mainToolBar != NULL ) return; diff --git a/eeschema/CMakeLists.txt b/eeschema/CMakeLists.txt index 05dd30bf82..63c6d5cf97 100644 --- a/eeschema/CMakeLists.txt +++ b/eeschema/CMakeLists.txt @@ -1,4 +1,4 @@ -set( MAKE_LINK_MAPS false ) +set( MAKE_LINK_MAPS true ) add_definitions( -DEESCHEMA ) @@ -191,11 +191,11 @@ endif() # auto-generate cmp_library_lexer.h and cmp_library_keywords.cpp for the component # library format. make_lexer( - ${CMAKE_CURRENT_SOURCE_DIR}/cmp_library.keywords - ${CMAKE_CURRENT_SOURCE_DIR}/cmp_library_lexer.h - ${CMAKE_CURRENT_SOURCE_DIR}/cmp_library_keywords.cpp - TLIB_T - ) + ${CMAKE_CURRENT_SOURCE_DIR}/cmp_library.keywords + ${CMAKE_CURRENT_SOURCE_DIR}/cmp_library_lexer.h + ${CMAKE_CURRENT_SOURCE_DIR}/cmp_library_keywords.cpp + TLIB_T + ) make_lexer( ${CMAKE_CURRENT_SOURCE_DIR}/template_fieldnames.keywords @@ -235,22 +235,35 @@ set_source_files_properties( dialogs/dialog_bom.cpp ) -# not ready for even building yet: if( USE_KIWAY_DLLS ) - add_executable( eeschema WIN32 MACOSX_BUNDLE ../common/single_top.cpp + ../common/pgm_base.cpp + ) + set_source_files_properties( ../common/single_top.cpp PROPERTIES + COMPILE_DEFINITIONS "TOP_FRAME=SCHEMATIC_FRAME_TYPE;PGM_DATA_FILE_EXT=\"sch\";BUILD_KIWAY_DLL" ) target_link_libraries( eeschema + #singletop # replaces common, giving us restrictive control and link warnings. + # There's way too much crap coming in from common yet. common + bitmaps ${wxWidgets_LIBRARIES} ) + # the DSO (KIFACE) housing the main eeschema code: add_library( eeschema_kiface MODULE ${EESCHEMA_SRCS} ${EESCHEMA_COMMON_SRCS} ${EESCHEMA_RESOURCES} ) + target_link_libraries( eeschema_kiface + common + bitmaps + polygon + ${wxWidgets_LIBRARIES} + ${GDI_PLUS_LIBRARIES} + ) set_target_properties( eeschema_kiface PROPERTIES # Decorate OUTPUT_NAME with PREFIX and SUFFIX, creating something like # _eeschema.so, _eeschema.dll, or _eeschema.kiface @@ -259,6 +272,14 @@ if( USE_KIWAY_DLLS ) SUFFIX ${KIFACE_SUFFIX} ) + # The KIFACE is in eeschema.cpp, export it: + set_source_files_properties( eeschema.cpp PROPERTIES + COMPILE_DEFINITIONS "BUILD_KIWAY_DLL;COMPILING_DLL" + ) + + # if building eeschema, then also build eeschema_kiface if out of date. + add_dependencies( eeschema eeschema_kiface ) + if( APPLE ) set_target_properties( eeschema_kiface PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist @@ -266,31 +287,46 @@ if( USE_KIWAY_DLLS ) endif() if( MAKE_LINK_MAPS ) - # generate a link map with cross reference + # generate link map with cross reference set_target_properties( eeschema_kiface PROPERTIES - LINK_FLAGS "-Wl,-cref -Wl,-Map=${KIFACE_PRE}eeschema.${KIFACE_EXT}.map" + LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=${KIFACE_PREFIX}eeschema${KIFACE_SUFFIX}.map" + ) + set_target_properties( eeschema PROPERTIES + LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=eeschema.map" ) endif() - target_link_libraries( eeschema_kiface + # these 2 binaries are a matched set, keep them together: + install( TARGETS eeschema + DESTINATION ${KICAD_BIN} + COMPONENT binary + ) + install( TARGETS eeschema_kiface + # actual filename subject to change at milestone C) + # modular-kicad blueprint. + DESTINATION ${KICAD_BIN} + COMPONENT binary + ) + +else() + add_executable( eeschema WIN32 MACOSX_BUNDLE + ../common/single_top.cpp + ${EESCHEMA_SRCS} + ${EESCHEMA_COMMON_SRCS} + ${EESCHEMA_RESOURCES} + ) + + target_link_libraries( eeschema common +# lib_kicad bitmaps polygon ${wxWidgets_LIBRARIES} ${GDI_PLUS_LIBRARIES} ) - # Note that this filename is subject to change at milestone C) of - # modular-kicad blueprint. - install( TARGETS eeschema_kiface - DESTINATION ${KICAD_BIN} - COMPONENT binary - ) -else() - add_executable( eeschema WIN32 MACOSX_BUNDLE - ${EESCHEMA_SRCS} - ${EESCHEMA_COMMON_SRCS} - ${EESCHEMA_RESOURCES} + set_source_files_properties( ../common/single_top.cpp PROPERTIES + COMPILE_DEFINITIONS "TOP_FRAME=SCHEMATIC_FRAME_TYPE;PGM_DATA_FILE_EXT=\"sch\";BUILD_KIWAY_DLL" ) if( APPLE ) @@ -299,19 +335,12 @@ else() ) endif() - target_link_libraries( eeschema - common - bitmaps - polygon - ${wxWidgets_LIBRARIES} - ${GDI_PLUS_LIBRARIES} + install( TARGETS eeschema + DESTINATION ${KICAD_BIN} + COMPONENT binary ) + endif() -install( TARGETS eeschema - DESTINATION ${KICAD_BIN} - COMPONENT binary - ) - add_subdirectory( plugins ) diff --git a/eeschema/backanno.cpp b/eeschema/backanno.cpp index 2292301d6c..b72509d98b 100644 --- a/eeschema/backanno.cpp +++ b/eeschema/backanno.cpp @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include @@ -145,8 +145,8 @@ bool SCH_EDIT_FRAME::LoadCmpToFootprintLinkFile() return false; wxString filename = dlg.GetPath(); - wxString title = wxGetApp().GetAppName() + wxT( " " ) + GetBuildVersion(); - title += wxT( " " ) + filename; + wxString title = wxT( "Eeschema " ) + GetBuildVersion() + wxT( ' ' ) + filename; + SetTitle( title ); int response = wxMessageBox( _( "Do you want to force all the footprint fields visibility?" ), diff --git a/eeschema/block.cpp b/eeschema/block.cpp index f4e47bffb9..98ea9e62a1 100644 --- a/eeschema/block.cpp +++ b/eeschema/block.cpp @@ -28,7 +28,7 @@ */ #include -#include +#include #include #include #include @@ -64,7 +64,7 @@ static void DrawMovingBlockOutlines( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition, bool aErase ); -int SCH_EDIT_FRAME::ReturnBlockCommand( int key ) +int SCH_EDIT_FRAME::BlockCommand( int key ) { int cmd = BLOCK_IDLE; diff --git a/eeschema/block_libedit.cpp b/eeschema/block_libedit.cpp index 2a03cae331..e9c89d14f5 100644 --- a/eeschema/block_libedit.cpp +++ b/eeschema/block_libedit.cpp @@ -41,7 +41,7 @@ static void DrawMovingBlockOutlines( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wx bool aErase ); -int LIB_EDIT_FRAME::ReturnBlockCommand( int key ) +int LIB_EDIT_FRAME::BlockCommand( int key ) { int cmd = BLOCK_IDLE; diff --git a/eeschema/class_libentry.cpp b/eeschema/class_libentry.cpp index 489114efb8..52fc2adaf5 100644 --- a/eeschema/class_libentry.cpp +++ b/eeschema/class_libentry.cpp @@ -258,7 +258,7 @@ wxString LIB_COMPONENT::GetLibraryName() } -wxString LIB_COMPONENT::ReturnSubReference( int aUnit, bool aAddSeparator ) +wxString LIB_COMPONENT::SubReference( int aUnit, bool aAddSeparator ) { wxString subRef; @@ -568,7 +568,7 @@ LIB_PIN* LIB_COMPONENT::GetPin( const wxString& aNumber, int aUnit, int aConvert { wxASSERT( pinList[i]->Type() == LIB_PIN_T ); - pinList[i]->ReturnPinStringNum( pNumber ); + pinList[i]->PinStringNum( pNumber ); if( aNumber == pNumber ) return pinList[i]; diff --git a/eeschema/class_libentry.h b/eeschema/class_libentry.h index 695102bc20..d9097794e7 100644 --- a/eeschema/class_libentry.h +++ b/eeschema/class_libentry.h @@ -664,7 +664,7 @@ public: bool IsMulti() { return m_unitCount > 1; } /** - * Function ReturnSubReference + * Function SubReference * @return the sub reference for component having multiple parts per package. * The sub reference identify the part (or unit) * @param aUnit = the part identifier ( 1 to max count) @@ -672,7 +672,7 @@ public: * by the separator symbol (if any) * Note: this is a static function. */ - static wxString ReturnSubReference( int aUnit, bool aAddSeparator = true ); + static wxString SubReference( int aUnit, bool aAddSeparator = true ); // Accessors to sub ref parameters static int GetSubpartIdSeparator() { return m_subpartIdSeparator; } diff --git a/eeschema/class_netlist_object.cpp b/eeschema/class_netlist_object.cpp index 56de1ef087..0b62b47dab 100644 --- a/eeschema/class_netlist_object.cpp +++ b/eeschema/class_netlist_object.cpp @@ -353,7 +353,7 @@ wxString NETLIST_OBJECT::GetShortNetName() const netName = wxT("Net-("); netName << link->GetRef( &m_netNameCandidate->m_SheetPath ); netName << wxT("-Pad") - << LIB_PIN::ReturnPinStringNum( m_netNameCandidate->m_PinNum ) + << LIB_PIN::PinStringNum( m_netNameCandidate->m_PinNum ) << wxT(")"); } } diff --git a/eeschema/class_netlist_object.h b/eeschema/class_netlist_object.h index d07dcb7291..e3533a51d4 100644 --- a/eeschema/class_netlist_object.h +++ b/eeschema/class_netlist_object.h @@ -33,7 +33,7 @@ #include -#include // LIB_PIN::ReturnPinStringNum( m_PinNum ) +#include // LIB_PIN::PinStringNum( m_PinNum ) class NETLIST_OBJECT_LIST; class SCH_COMPONENT; @@ -179,7 +179,7 @@ public: wxString GetPinNumText() { // hide the ugliness in here, but do it inline. - return LIB_PIN::ReturnPinStringNum( m_PinNum ); + return LIB_PIN::PinStringNum( m_PinNum ); } /** For Pins (NET_PINS): diff --git a/eeschema/component_references_lister.cpp b/eeschema/component_references_lister.cpp index 10b67d3678..d2b553af5a 100644 --- a/eeschema/component_references_lister.cpp +++ b/eeschema/component_references_lister.cpp @@ -592,12 +592,12 @@ int SCH_REFERENCE_LIST::CheckAnnotation( wxArrayString* aMessageList ) msg.Printf( _( "Different values for %s%d%s (%s) and %s%d%s (%s)" ), GetChars( componentFlatList[ii].GetRef() ), componentFlatList[ii].m_NumRef, - GetChars( LIB_COMPONENT::ReturnSubReference( + GetChars( LIB_COMPONENT::SubReference( componentFlatList[ii].m_Unit ) ), GetChars( componentFlatList[ii].m_Value->GetText() ), GetChars( componentFlatList[next].GetRef() ), componentFlatList[next].m_NumRef, - GetChars( LIB_COMPONENT::ReturnSubReference( + GetChars( LIB_COMPONENT::SubReference( componentFlatList[next].m_Unit ) ), GetChars( componentFlatList[next].m_Value->GetText() ) ); diff --git a/eeschema/cross-probing.cpp b/eeschema/cross-probing.cpp index 9ae5e52035..dcb7788c8d 100644 --- a/eeschema/cross-probing.cpp +++ b/eeschema/cross-probing.cpp @@ -28,7 +28,7 @@ */ #include -#include +#include #include #include #include @@ -58,17 +58,11 @@ void SCH_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline ) { char line[1024]; - char* idcmd; - char* text; - wxString part_ref, msg; - SCH_EDIT_FRAME* frame; - - frame = (SCH_EDIT_FRAME*)wxGetApp().GetTopWindow(); strncpy( line, cmdline, sizeof(line) - 1 ); - idcmd = strtok( line, " \n\r" ); - text = strtok( NULL, "\"\n\r" ); + char* idcmd = strtok( line, " \n\r" ); + char* text = strtok( NULL, "\"\n\r" ); if( (idcmd == NULL) || (text == NULL) ) return; @@ -76,14 +70,14 @@ void SCH_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline ) if( strcmp( idcmd, "$PART:" ) != 0 ) return; - part_ref = FROM_UTF8( text ); + wxString part_ref = FROM_UTF8( text ); /* look for a complement */ idcmd = strtok( NULL, " \n\r" ); if( idcmd == NULL ) // component only { - frame->FindComponentAndItem( part_ref, true, FIND_COMPONENT_ONLY, wxEmptyString, false ); + FindComponentAndItem( part_ref, true, FIND_COMPONENT_ONLY, wxEmptyString, false ); return; } @@ -92,23 +86,23 @@ void SCH_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline ) if( text == NULL ) return; - msg = FROM_UTF8( text ); + wxString msg = FROM_UTF8( text ); if( strcmp( idcmd, "$REF:" ) == 0 ) { - frame->FindComponentAndItem( part_ref, true, FIND_REFERENCE, msg, false ); + FindComponentAndItem( part_ref, true, FIND_REFERENCE, msg, false ); } else if( strcmp( idcmd, "$VAL:" ) == 0 ) { - frame->FindComponentAndItem( part_ref, true, FIND_VALUE, msg, false ); + FindComponentAndItem( part_ref, true, FIND_VALUE, msg, false ); } else if( strcmp( idcmd, "$PAD:" ) == 0 ) { - frame->FindComponentAndItem( part_ref, true, FIND_PIN, msg, false ); + FindComponentAndItem( part_ref, true, FIND_PIN, msg, false ); } else { - frame->FindComponentAndItem( part_ref, true, FIND_COMPONENT_ONLY, wxEmptyString, false ); + FindComponentAndItem( part_ref, true, FIND_COMPONENT_ONLY, wxEmptyString, false ); } } @@ -126,14 +120,14 @@ void SCH_EDIT_FRAME::SendMessageToPCBNEW( EDA_ITEM* objectToSync, SCH_COMPONENT* { case SCH_FIELD_T: case LIB_FIELD_T: - { - if( LibItem == NULL ) - break; + { + if( !LibItem ) + break; - sprintf( Line, "$PART: %s", TO_UTF8( LibItem->GetField( REFERENCE )->GetText() ) ); - SendCommand( MSG_TO_PCB, Line ); - } - break; + sprintf( Line, "$PART: %s", TO_UTF8( LibItem->GetField( REFERENCE )->GetText() ) ); + SendCommand( MSG_TO_PCB, Line ); + } + break; case SCH_COMPONENT_T: LibItem = (SCH_COMPONENT*) objectToSync; @@ -142,7 +136,7 @@ void SCH_EDIT_FRAME::SendMessageToPCBNEW( EDA_ITEM* objectToSync, SCH_COMPONENT* break; case LIB_PIN_T: - if( LibItem == NULL ) + if( !LibItem ) break; Pin = (LIB_PIN*) objectToSync; @@ -150,7 +144,7 @@ void SCH_EDIT_FRAME::SendMessageToPCBNEW( EDA_ITEM* objectToSync, SCH_COMPONENT* if( Pin->GetNumber() ) { wxString pinnum; - Pin->ReturnPinStringNum( pinnum ); + Pin->PinStringNum( pinnum ); sprintf( Line, "$PIN: %s $PART: %s", TO_UTF8( pinnum ), TO_UTF8( LibItem->GetField( REFERENCE )->GetText() ) ); } diff --git a/eeschema/database.cpp b/eeschema/database.cpp index 5071a13cdc..4cf8089364 100644 --- a/eeschema/database.cpp +++ b/eeschema/database.cpp @@ -26,15 +26,15 @@ * @file database.cpp */ -#include "fctsys.h" -#include "confirm.h" -#include "eda_doc.h" -#include "kicad_string.h" -#include "wxstruct.h" +#include +#include +#include +#include +#include #include -#include "protos.h" -#include "class_library.h" -#include "dialog_helpers.h" +#include +#include +#include #include diff --git a/eeschema/dialogs/dialog_annotate.cpp b/eeschema/dialogs/dialog_annotate.cpp index c37d8a1e38..8a3c0b6a22 100644 --- a/eeschema/dialogs/dialog_annotate.cpp +++ b/eeschema/dialogs/dialog_annotate.cpp @@ -29,21 +29,20 @@ #include -#include #include #include #include #include +#include + +#define KEY_ANNOTATE_SORT_OPTION wxT( "AnnotateSortOption" ) +#define KEY_ANNOTATE_ALGO_OPTION wxT( "AnnotateAlgoOption" ) +#define KEY_ANNOTATE_AUTOCLOSE_OPTION wxT( "AnnotateAutoCloseOption" ) +#define KEY_ANNOTATE_USE_SILENTMODE wxT( "AnnotateSilentMode" ) -#define KEY_ANNOTATE_SORT_OPTION wxT( "AnnotateSortOption" ) -#define KEY_ANNOTATE_ALGO_OPTION wxT( "AnnotateAlgoOption" ) -#define KEY_ANNOTATE_AUTOCLOSE_OPTION wxT( "AnnotateAutoCloseOption" ) -#define KEY_ANNOTATE_USE_SILENTMODE wxT( "AnnotateSilentMode" ) - - -class wxConfig; +class wxConfigBase; /** @@ -57,7 +56,7 @@ public: private: SCH_EDIT_FRAME* m_Parent; - wxConfig* m_Config; + wxConfigBase* m_Config; /// Initialises member variables void InitValues(); @@ -112,7 +111,7 @@ DIALOG_ANNOTATE::DIALOG_ANNOTATE( SCH_EDIT_FRAME* parent ) void DIALOG_ANNOTATE::InitValues() { - m_Config = wxGetApp().GetSettings(); + m_Config = Kiface().KifaceSettings(); if( m_Config ) { diff --git a/eeschema/dialogs/dialog_bom.cpp b/eeschema/dialogs/dialog_bom.cpp index 105a71fc06..b293a39b17 100644 --- a/eeschema/dialogs/dialog_bom.cpp +++ b/eeschema/dialogs/dialog_bom.cpp @@ -29,7 +29,8 @@ #include -#include +#include +#include #include #include #include @@ -161,7 +162,7 @@ private: // the first is the title // the second is the command line wxArrayString m_plugins; - wxConfig* m_config; // to store the "plugins" + wxConfigBase* m_config; // to store the "plugins" public: // Constructor and destructor @@ -169,7 +170,7 @@ public: ~DIALOG_BOM(); private: - void OnPluginSelected( wxCommandEvent& event ); + void OnPluginSelected( wxCommandEvent& event ); void OnRunPlugin( wxCommandEvent& event ); void OnCancelClick( wxCommandEvent& event ); void OnHelp( wxCommandEvent& event ); @@ -177,10 +178,10 @@ private: void OnChoosePlugin( wxCommandEvent& event ); void OnRemovePlugin( wxCommandEvent& event ); void OnEditPlugin( wxCommandEvent& event ); - void OnCommandLineEdited( wxCommandEvent& event ); - void OnNameEdited( wxCommandEvent& event ); + void OnCommandLineEdited( wxCommandEvent& event ); + void OnNameEdited( wxCommandEvent& event ); - void pluginInit(); + void pluginInit(); void installPluginsList(); }; @@ -195,7 +196,7 @@ DIALOG_BOM::DIALOG_BOM( SCH_EDIT_FRAME* parent ) : DIALOG_BOM_BASE( parent ) { m_parent = parent; - m_config = wxGetApp().GetSettings(); + m_config = Kiface().KifaceSettings(); installPluginsList(); GetSizer()->SetSizeHints( this ); @@ -377,38 +378,37 @@ void DIALOG_BOM::OnAddPlugin( wxCommandEvent& event ) */ void DIALOG_BOM::OnChoosePlugin( wxCommandEvent& event ) { - wxString FullFileName, Mask, Path; + wxString mask = wxT( "*" ); + wxString path = Pgm().GetExecutablePath(); - Mask = wxT( "*" ); - Path = wxGetApp().GetExecutablePath(); - FullFileName = EDA_FileSelector( _( "Plugin files:" ), - Path, - FullFileName, + wxString fullFileName = EDA_FileSelector( _( "Plugin files:" ), + path, wxEmptyString, - Mask, + wxEmptyString, + mask, this, wxFD_OPEN, true ); - if( FullFileName.IsEmpty() ) + if( fullFileName.IsEmpty() ) return; // Creates a default command line, // suitable to run the external tool xslproc or python // The default command line depending on plugin extension, currently // "xsl" or "exe" or "py" - wxString cmdLine; - wxFileName fn( FullFileName ); - wxString ext = fn.GetExt(); + wxString cmdLine; + wxFileName fn( fullFileName ); + wxString ext = fn.GetExt(); if( ext == wxT("xsl" ) ) - cmdLine.Printf(wxT("xsltproc -o \"%%O\" \"%s\" \"%%I\""), GetChars(FullFileName) ); + cmdLine.Printf(wxT("xsltproc -o \"%%O\" \"%s\" \"%%I\""), GetChars( fullFileName ) ); else if( ext == wxT("exe" ) || ext.IsEmpty() ) - cmdLine.Printf(wxT("\"%s\" < \"%%I\" > \"%%O\""), GetChars(FullFileName) ); + cmdLine.Printf(wxT("\"%s\" < \"%%I\" > \"%%O\""), GetChars( fullFileName ) ); else if( ext == wxT("py" ) || ext.IsEmpty() ) - cmdLine.Printf(wxT("python \"%s\" \"%%I\" \"%%O\""), GetChars(FullFileName) ); + cmdLine.Printf(wxT("python \"%s\" \"%%I\" \"%%O\""), GetChars( fullFileName ) ); else - cmdLine.Printf(wxT("\"%s\""), GetChars(FullFileName) ); + cmdLine.Printf(wxT("\"%s\""), GetChars( fullFileName ) ); m_textCtrlCommand->SetValue( cmdLine ); } @@ -449,7 +449,7 @@ void DIALOG_BOM::OnEditPlugin( wxCommandEvent& event ) } } AddDelimiterString( pluginName ); - wxString editorname = wxGetApp().GetEditorName(); + wxString editorname = Pgm().GetEditorName(); if( !editorname.IsEmpty() ) ExecuteFile( this, editorname, pluginName ); diff --git a/eeschema/dialogs/dialog_color_config.cpp b/eeschema/dialogs/dialog_color_config.cpp index 7daa6988e8..1ed7ae72dc 100644 --- a/eeschema/dialogs/dialog_color_config.cpp +++ b/eeschema/dialogs/dialog_color_config.cpp @@ -4,7 +4,7 @@ #include #include -#include +#include #include #include diff --git a/eeschema/dialogs/dialog_edit_component_in_lib.cpp b/eeschema/dialogs/dialog_edit_component_in_lib.cpp index 72b4c4c69a..8866b25c1f 100644 --- a/eeschema/dialogs/dialog_edit_component_in_lib.cpp +++ b/eeschema/dialogs/dialog_edit_component_in_lib.cpp @@ -26,10 +26,11 @@ */ #include +#include #include #include #include -#include +#include #include #include @@ -435,22 +436,22 @@ bool DIALOG_EDIT_COMPONENT_IN_LIBRARY::SetUnsetConvert() void DIALOG_EDIT_COMPONENT_IN_LIBRARY::BrowseAndSelectDocFile( wxCommandEvent& event ) { - wxString FullFileName, mask; - wxString docpath, filename; + PROJECT& prj = Prj(); + SEARCH_STACK& search = prj.SchSearchS(); - docpath = wxGetApp().ReturnLastVisitedLibraryPath( wxT( "doc" ) ); + wxString docpath = prj.RPath(PROJECT::DOC).LastVisitedPath( search, wxT( "doc" ) ); + wxString mask = wxT( "*" ); - mask = wxT( "*" ); - FullFileName = EDA_FileSelector( _( "Doc Files" ), - docpath, /* Chemin par defaut */ - wxEmptyString, /* nom fichier par defaut */ - wxEmptyString, /* extension par defaut */ - mask, /* Masque d'affichage */ + wxString fullFileName = EDA_FileSelector( _( "Doc Files" ), + docpath, + wxEmptyString, + wxEmptyString, + mask, this, wxFD_OPEN, true ); - if( FullFileName.IsEmpty() ) + if( fullFileName.IsEmpty() ) return; /* If the path is already in the library search paths @@ -460,10 +461,12 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::BrowseAndSelectDocFile( wxCommandEvent& e * because it preserve use of default libraries paths, when the path is a sub path of * these default paths */ - wxFileName fn = FullFileName; - wxGetApp().SaveLastVisitedLibraryPath( fn.GetPath() ); + wxFileName fn = fullFileName; + + prj.RPath(PROJECT::DOC).SaveLastVisitedPath( fn.GetPath() ); + + wxString filename = search.FilenameWithRelativePathInSearchList( fullFileName ); - filename = wxGetApp().ReturnFilenameWithRelativePathInLibPath( FullFileName ); // Filenames are always stored in unix like mode, ie separator "\" is stored as "/" // to ensure files are identical under unices and windows #ifdef __WINDOWS__ diff --git a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp index 91449c9399..9a6644d327 100644 --- a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp +++ b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include #include @@ -766,10 +766,10 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copySelectedFieldToPanel() // top of each other. } - wxString coordText = ReturnStringFromValue( g_UserUnit, coord.x ); + wxString coordText = StringFromValue( g_UserUnit, coord.x ); posXTextCtrl->SetValue( coordText ); - coordText = ReturnStringFromValue( g_UserUnit, coord.y ); + coordText = StringFromValue( g_UserUnit, coord.y ); posYTextCtrl->SetValue( coordText ); } @@ -828,8 +828,8 @@ bool DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyPanelToSelectedField() field.SetBold( (style & 2 ) != 0 ); wxPoint pos; - pos.x = ReturnValueFromString( g_UserUnit, posXTextCtrl->GetValue() ); - pos.y = ReturnValueFromString( g_UserUnit, posYTextCtrl->GetValue() ); + pos.x = ValueFromString( g_UserUnit, posXTextCtrl->GetValue() ); + pos.y = ValueFromString( g_UserUnit, posYTextCtrl->GetValue() ); field.SetTextPosition( pos ); return true; diff --git a/eeschema/dialogs/dialog_edit_label.cpp b/eeschema/dialogs/dialog_edit_label.cpp index fb1805e298..91fcc91cda 100644 --- a/eeschema/dialogs/dialog_edit_label.cpp +++ b/eeschema/dialogs/dialog_edit_label.cpp @@ -203,7 +203,7 @@ void DIALOG_LABEL_EDITOR::InitDialog() msg.Printf( _( "H%s x W%s" ), GetChars( units ), GetChars( units ) ); m_staticSizeUnits->SetLabel( msg ); - msg = ReturnStringFromValue( g_UserUnit, m_CurrentText->GetSize().x ); + msg = StringFromValue( g_UserUnit, m_CurrentText->GetSize().x ); m_TextSize->SetValue( msg ); if( m_CurrentText->Type() != SCH_GLOBAL_LABEL_T @@ -272,7 +272,7 @@ void DIALOG_LABEL_EDITOR::TextPropertiesAccept( wxCommandEvent& aEvent ) m_CurrentText->SetOrientation( m_TextOrient->GetSelection() ); text = m_TextSize->GetValue(); - value = ReturnValueFromString( g_UserUnit, text ); + value = ValueFromString( g_UserUnit, text ); m_CurrentText->SetSize( wxSize( value, value ) ); if( m_TextShape ) diff --git a/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp index 1e2ccb6502..4036c36cb5 100644 --- a/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp +++ b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include #include @@ -675,13 +675,13 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::copySelectedFieldToPanel() // top of each other. } - wxString coordText = ReturnStringFromValue( g_UserUnit, coord.x ); + wxString coordText = StringFromValue( g_UserUnit, coord.x ); posXTextCtrl->SetValue( coordText ); // Note: the Y axis for components in lib is from bottom to top // and the screen axis is top to bottom: we must change the y coord sign for editing NEGATE( coord.y ); - coordText = ReturnStringFromValue( g_UserUnit, coord.y ); + coordText = StringFromValue( g_UserUnit, coord.y ); posYTextCtrl->SetValue( coordText ); } @@ -747,8 +747,8 @@ bool DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::copyPanelToSelectedField() field.SetItalic( (style & 1 ) != 0 ); field.SetBold( (style & 2 ) != 0 ); - wxPoint pos( ReturnValueFromString( g_UserUnit, posXTextCtrl->GetValue() ), - ReturnValueFromString( g_UserUnit, posYTextCtrl->GetValue() ) ); + wxPoint pos( ValueFromString( g_UserUnit, posXTextCtrl->GetValue() ), + ValueFromString( g_UserUnit, posYTextCtrl->GetValue() ) ); // Note: the Y axis for components in lib is from bottom to top // and the screen axis is top to bottom: we must change the y coord sign for editing diff --git a/eeschema/dialogs/dialog_edit_one_field.cpp b/eeschema/dialogs/dialog_edit_one_field.cpp index af48030656..055eb77aa1 100644 --- a/eeschema/dialogs/dialog_edit_one_field.cpp +++ b/eeschema/dialogs/dialog_edit_one_field.cpp @@ -53,7 +53,7 @@ void DIALOG_EDIT_ONE_FIELD::initDlg_base() m_CommonConvert->Show(false); m_CommonUnit->Show(false); - msg = ReturnStringFromValue( g_UserUnit, m_textsize ); + msg = StringFromValue( g_UserUnit, m_textsize ); m_TextSize->SetValue( msg ); if( m_textorient == TEXT_ORIENT_VERT ) @@ -132,7 +132,7 @@ void DIALOG_EDIT_ONE_FIELD::TransfertDataToField() { m_textorient = m_Orient->GetValue() ? TEXT_ORIENT_VERT : TEXT_ORIENT_HORIZ; wxString msg = m_TextSize->GetValue(); - m_textsize = ReturnValueFromString( g_UserUnit, msg ); + m_textsize = ValueFromString( g_UserUnit, msg ); switch( m_TextHJustificationOpt->GetSelection() ) { diff --git a/eeschema/dialogs/dialog_eeschema_config.cpp b/eeschema/dialogs/dialog_eeschema_config.cpp index b3f9284067..f4f01e4043 100644 --- a/eeschema/dialogs/dialog_eeschema_config.cpp +++ b/eeschema/dialogs/dialog_eeschema_config.cpp @@ -27,10 +27,12 @@ */ #include -#include +#include +#include #include #include #include +#include #include #include @@ -40,20 +42,50 @@ #include -#include + +#include + +class SCH_EDIT_FRAME; +class EDA_DRAW_FRAME; + +class DIALOG_EESCHEMA_CONFIG : public DIALOG_EESCHEMA_CONFIG_FBP +{ +public: + DIALOG_EESCHEMA_CONFIG( SCH_EDIT_FRAME* parent, wxFrame* activeWindow ); + +private: + SCH_EDIT_FRAME* m_Parent; + bool m_LibListChanged; + bool m_LibPathChanged; + wxString m_UserLibDirBufferImg; // Copy of original g_UserLibDirBuffer + + + // event handlers, overiding the fbp handlers + void Init(); + void OnCloseWindow( wxCloseEvent& event ); + void OnRemoveLibClick( wxCommandEvent& event ); + void OnAddOrInsertLibClick( wxCommandEvent& event ); + void OnAddOrInsertPath( wxCommandEvent& event ); + void OnOkClick( wxCommandEvent& event ); + void OnCancelClick( wxCommandEvent& event ); + void OnRemoveUserPath( wxCommandEvent& event ); + void OnButtonUpClick( wxCommandEvent& event ); + void OnButtonDownClick( wxCommandEvent& event ); +}; DIALOG_EESCHEMA_CONFIG::DIALOG_EESCHEMA_CONFIG( SCH_EDIT_FRAME* aSchFrame, - EDA_DRAW_FRAME* aParent ) - : DIALOG_EESCHEMA_CONFIG_FBP( aParent ) + wxFrame* aParent ) : + DIALOG_EESCHEMA_CONFIG_FBP( aParent ) { - wxString msg; - m_Parent = aSchFrame; Init(); - msg.Printf( _( "from <%s>" ), GetChars( wxGetApp().GetCurrentOptionFile() ) ); + wxString msg = wxString::Format( + _( "from '%s'" ), + GetChars( Prj().GetProjectFullName() ) ); + SetTitle( msg ); if( GetSizer() ) @@ -74,21 +106,22 @@ void DIALOG_EESCHEMA_CONFIG::Init() m_ListLibr->InsertItems( m_Parent->GetComponentLibraries(), 0 ); // Load user libs paths: - wxStringTokenizer Token( m_UserLibDirBufferImg, wxT( ";\n\r" ) ); - while( Token.HasMoreTokens() ) + wxStringTokenizer tokenizer( m_UserLibDirBufferImg, wxT( ";\n\r" ) ); + + while( tokenizer.HasMoreTokens() ) { - wxString path = Token.GetNextToken(); + wxString path = tokenizer.GetNextToken(); if( wxFileName::DirExists( path ) ) m_listUserPaths->Append( path ); } // Display actual libraries paths: - wxPathList libpaths = wxGetApp().GetLibraryPathList(); + SEARCH_STACK& libpaths = Prj().SchSearchS(); for( unsigned ii = 0; ii < libpaths.GetCount(); ii++ ) { - m_DefaultLibraryPathslistBox->Append( libpaths[ii]); + m_DefaultLibraryPathslistBox->Append( libpaths[ii] ); } // select the first path after the current path project @@ -153,7 +186,7 @@ void DIALOG_EESCHEMA_CONFIG::OnButtonDownClick( wxCommandEvent& event ) EXCHG( libnames[jj], libnames[jj+1]); } - m_ListLibr->Set(libnames); + m_ListLibr->Set( libnames ); // Reselect previously selected names for( size_t ii = 0; ii < selections.GetCount(); ii++ ) @@ -168,13 +201,15 @@ void DIALOG_EESCHEMA_CONFIG::OnButtonDownClick( wxCommandEvent& event ) void DIALOG_EESCHEMA_CONFIG::OnCancelClick( wxCommandEvent& event ) { - // Recreate the user lib path - if ( m_LibPathChanged ) - { - for ( unsigned ii = 0; ii < m_ListLibr->GetCount(); ii++ ) - wxGetApp().RemoveLibraryPath( m_listUserPaths->GetString(ii) ); + SEARCH_STACK& lib_search = Prj().SchSearchS(); - wxGetApp().InsertLibraryPath( m_Parent->GetUserLibraryPath(), 1); + // Recreate the user lib path + if( m_LibPathChanged ) + { + for( unsigned ii = 0; ii < m_ListLibr->GetCount(); ii++ ) + lib_search.RemovePaths( m_listUserPaths->GetString(ii) ); + + lib_search.AddPaths( m_Parent->GetUserLibraryPath(), 1 ); } EndModal( wxID_CANCEL ); @@ -184,13 +219,13 @@ void DIALOG_EESCHEMA_CONFIG::OnCancelClick( wxCommandEvent& event ) void DIALOG_EESCHEMA_CONFIG::OnOkClick( wxCommandEvent& event ) { // Recreate the user lib path - if ( m_LibPathChanged ) + if( m_LibPathChanged ) { wxString path; - for ( unsigned ii = 0; ii < m_listUserPaths->GetCount(); ii++ ) + for( unsigned ii = 0; ii < m_listUserPaths->GetCount(); ii++ ) { - if ( ii > 0 ) + if( ii > 0 ) path << wxT( ";" ); path << m_listUserPaths->GetString( ii ); @@ -206,7 +241,7 @@ void DIALOG_EESCHEMA_CONFIG::OnOkClick( wxCommandEvent& event ) { wxArrayString list; - for ( unsigned ii = 0; ii < m_ListLibr->GetCount(); ii ++ ) + for( unsigned ii = 0; ii < m_ListLibr->GetCount(); ii ++ ) list.Add( m_ListLibr->GetString( ii ) ); // Recreate lib list @@ -268,10 +303,13 @@ void DIALOG_EESCHEMA_CONFIG::OnRemoveLibClick( wxCommandEvent& event ) */ void DIALOG_EESCHEMA_CONFIG::OnAddOrInsertLibClick( wxCommandEvent& event ) { - int ii; - wxString libfilename; - wxFileName fn; - wxArrayInt selections; + int ii; + wxString libfilename; + wxFileName fn; + wxArrayInt selections; + + PROJECT& prj = Prj(); + SEARCH_STACK& search = prj.SchSearchS(); m_ListLibr->GetSelections( selections ); @@ -282,28 +320,28 @@ void DIALOG_EESCHEMA_CONFIG::OnAddOrInsertLibClick( wxCommandEvent& event ) else ii = 0; - wxString libpath; - libpath = m_DefaultLibraryPathslistBox->GetStringSelection(); + wxString libpath = m_DefaultLibraryPathslistBox->GetStringSelection(); - if ( libpath.IsEmpty() ) - libpath = wxGetApp().ReturnLastVisitedLibraryPath(); + if( libpath.IsEmpty() ) + libpath = prj.RPath(PROJECT::SCH_LIB).LastVisitedPath( search ); - wxFileDialog FilesDialog( this, _( "Library files:" ), libpath, + wxFileDialog filesDialog( this, _( "Library files:" ), libpath, wxEmptyString, SchematicLibraryFileWildcard, wxFD_DEFAULT_STYLE | wxFD_MULTIPLE ); - if( FilesDialog.ShowModal() != wxID_OK ) + if( filesDialog.ShowModal() != wxID_OK ) return; - wxArrayString Filenames; - FilesDialog.GetPaths( Filenames ); + wxArrayString filenames; - for( unsigned jj = 0; jj < Filenames.GetCount(); jj++ ) + filesDialog.GetPaths( filenames ); + + for( unsigned jj = 0; jj < filenames.GetCount(); jj++ ) { - fn = Filenames[jj]; + fn = filenames[jj]; - if ( jj == 0 ) - wxGetApp().SaveLastVisitedLibraryPath( fn.GetPath() ); + if( jj == 0 ) + prj.RPath(PROJECT::SCH_LIB).SaveLastVisitedPath( fn.GetPath() ); /* If the library path is already in the library search paths * list, just add the library name to the list. Otherwise, add @@ -312,14 +350,14 @@ void DIALOG_EESCHEMA_CONFIG::OnAddOrInsertLibClick( wxCommandEvent& event ) * because it preserve use of default libraries paths, when the path * is a sub path of these default paths */ - libfilename = wxGetApp().ReturnFilenameWithRelativePathInLibPath( fn.GetFullPath() ); + libfilename = search.FilenameWithRelativePathInSearchList( fn.GetFullPath() ); // Remove extension: fn = libfilename; - fn.SetExt(wxEmptyString); + fn.SetExt( wxEmptyString ); libfilename = fn.GetFullPath(); - //Add or insert new library name, if not already in list + // Add or insert new library name, if not already in list if( m_ListLibr->FindString( libfilename, fn.IsCaseSensitive() ) == wxNOT_FOUND ) { m_LibListChanged = true; @@ -342,7 +380,9 @@ void DIALOG_EESCHEMA_CONFIG::OnAddOrInsertLibClick( wxCommandEvent& event ) void DIALOG_EESCHEMA_CONFIG::OnAddOrInsertPath( wxCommandEvent& event ) { - wxString path = wxGetApp().ReturnLastVisitedLibraryPath(); + PROJECT& prj = Prj(); + SEARCH_STACK& search = Prj().SchSearchS(); + wxString path = prj.RPath(PROJECT::SCH_LIB).LastVisitedPath( search ); bool select = EDA_DirectorySelector( _( "Default Path for Libraries" ), path, wxDD_DEFAULT_STYLE, @@ -359,14 +399,14 @@ void DIALOG_EESCHEMA_CONFIG::OnAddOrInsertPath( wxCommandEvent& event ) { int ipos = m_listUserPaths->GetCount(); - if ( event.GetId() == wxID_INSERT_PATH ) + if( event.GetId() == wxID_INSERT_PATH ) { - if ( ipos ) + if( ipos ) ipos--; int jj = m_listUserPaths->GetSelection(); - if ( jj >= 0 ) + if( jj >= 0 ) ipos = jj; } @@ -375,7 +415,8 @@ void DIALOG_EESCHEMA_CONFIG::OnAddOrInsertPath( wxCommandEvent& event ) wxYES_NO | wxICON_QUESTION, this ); if( diag == wxYES ) - { // Make it relative + { + // Make it relative wxFileName fn = path; fn.MakeRelativeTo( wxT(".") ); path = fn.GetPathWithSep() + fn.GetFullName(); @@ -383,15 +424,15 @@ void DIALOG_EESCHEMA_CONFIG::OnAddOrInsertPath( wxCommandEvent& event ) m_listUserPaths->Insert(path, ipos); m_LibPathChanged = true; - wxGetApp().InsertLibraryPath( path, ipos+1 ); + + search.AddPaths( path, ipos+1 ); // Display actual libraries paths: - wxPathList libpaths = wxGetApp().GetLibraryPathList(); m_DefaultLibraryPathslistBox->Clear(); - for( unsigned ii = 0; ii < libpaths.GetCount(); ii++ ) + for( unsigned ii = 0; ii < search.GetCount(); ii++ ) { - m_DefaultLibraryPathslistBox->Append( libpaths[ii]); + m_DefaultLibraryPathslistBox->Append( search[ii] ); } } else @@ -399,30 +440,42 @@ void DIALOG_EESCHEMA_CONFIG::OnAddOrInsertPath( wxCommandEvent& event ) DisplayError( this, _("Path already in use") ); } - wxGetApp().SaveLastVisitedLibraryPath( path ); + prj.RPath(PROJECT::SCH_LIB).SaveLastVisitedPath( path ); } void DIALOG_EESCHEMA_CONFIG::OnRemoveUserPath( wxCommandEvent& event ) { + SEARCH_STACK& lib_search = Prj().SchSearchS(); + int ii = m_listUserPaths->GetSelection(); - if ( ii < 0 ) + if( ii < 0 ) ii = m_listUserPaths->GetCount()-1; - if ( ii >= 0 ) + if( ii >= 0 ) { - wxGetApp().RemoveLibraryPath( m_listUserPaths->GetStringSelection() ); + lib_search.RemovePaths( m_listUserPaths->GetStringSelection() ); + m_listUserPaths->Delete( ii ); m_LibPathChanged = true; } // Display actual libraries paths: - wxPathList libpaths = wxGetApp().GetLibraryPathList(); m_DefaultLibraryPathslistBox->Clear(); - for( unsigned ii = 0; ii < libpaths.GetCount(); ii++ ) + for( unsigned ii = 0; ii < lib_search.GetCount(); ii++ ) { - m_DefaultLibraryPathslistBox->Append( libpaths[ii] ); + m_DefaultLibraryPathslistBox->Append( lib_search[ii] ); } } + + +int InvokeEeschemaConfig( SCH_EDIT_FRAME* aEditFrame, wxFrame* aParent ) +{ + DIALOG_EESCHEMA_CONFIG dlg( aEditFrame, aParent ); + + dlg.ShowModal(); + + return 1; +} diff --git a/eeschema/dialogs/dialog_eeschema_config.h b/eeschema/dialogs/dialog_eeschema_config.h deleted file mode 100644 index 32bc536d9d..0000000000 --- a/eeschema/dialogs/dialog_eeschema_config.h +++ /dev/null @@ -1,42 +0,0 @@ - -#ifndef _DIALOG_EESCHEMA_CONFIG_H_ -#define _DIALOG_EESCHEMA_CONFIG_H_ - - -#include - - -class SCH_EDIT_FRAME; -class EDA_DRAW_FRAME; - - -class DIALOG_EESCHEMA_CONFIG : public DIALOG_EESCHEMA_CONFIG_FBP -{ -private: - SCH_EDIT_FRAME* m_Parent; - bool m_LibListChanged; - bool m_LibPathChanged; - wxString m_UserLibDirBufferImg; // Copy of original g_UserLibDirBuffer - -private: - - // event handlers, overiding the fbp handlers - void Init(); - void OnCloseWindow( wxCloseEvent& event ); - void OnRemoveLibClick( wxCommandEvent& event ); - void OnAddOrInsertLibClick( wxCommandEvent& event ); - void OnAddOrInsertPath( wxCommandEvent& event ); - void OnOkClick( wxCommandEvent& event ); - void OnCancelClick( wxCommandEvent& event ); - void OnRemoveUserPath( wxCommandEvent& event ); - void OnButtonUpClick( wxCommandEvent& event ); - void OnButtonDownClick( wxCommandEvent& event ); - - -public: - DIALOG_EESCHEMA_CONFIG( SCH_EDIT_FRAME* parent, EDA_DRAW_FRAME* activeWindow ); - ~DIALOG_EESCHEMA_CONFIG() {}; -}; - - -#endif // _DIALOG_EESCHEMA_CONFIG_H_ diff --git a/eeschema/dialogs/dialog_eeschema_config_fbp.cpp b/eeschema/dialogs/dialog_eeschema_config_fbp.cpp index 6ef268f328..99297fb844 100644 --- a/eeschema/dialogs/dialog_eeschema_config_fbp.cpp +++ b/eeschema/dialogs/dialog_eeschema_config_fbp.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 8 2012) +// C++ code generated with wxFormBuilder (version Nov 5 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -9,7 +9,7 @@ /////////////////////////////////////////////////////////////////////////// -DIALOG_EESCHEMA_CONFIG_FBP::DIALOG_EESCHEMA_CONFIG_FBP( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +DIALOG_EESCHEMA_CONFIG_FBP::DIALOG_EESCHEMA_CONFIG_FBP( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); diff --git a/eeschema/dialogs/dialog_eeschema_config_fbp.fbp b/eeschema/dialogs/dialog_eeschema_config_fbp.fbp index 0e7f0d960f..2062d5e43c 100644 --- a/eeschema/dialogs/dialog_eeschema_config_fbp.fbp +++ b/eeschema/dialogs/dialog_eeschema_config_fbp.fbp @@ -20,8 +20,10 @@ . 1 + 1 1 1 + UI 1 0 @@ -44,7 +46,7 @@ -1,-1 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER - + DIALOG_SHIM; dialog_shim.h diff --git a/eeschema/dialogs/dialog_eeschema_config_fbp.h b/eeschema/dialogs/dialog_eeschema_config_fbp.h index d0b91eeb14..84b86341c4 100644 --- a/eeschema/dialogs/dialog_eeschema_config_fbp.h +++ b/eeschema/dialogs/dialog_eeschema_config_fbp.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 8 2012) +// C++ code generated with wxFormBuilder (version Nov 5 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -11,6 +11,9 @@ #include #include #include +class DIALOG_SHIM; + +#include "dialog_shim.h" #include #include #include @@ -28,7 +31,7 @@ /////////////////////////////////////////////////////////////////////////////// /// Class DIALOG_EESCHEMA_CONFIG_FBP /////////////////////////////////////////////////////////////////////////////// -class DIALOG_EESCHEMA_CONFIG_FBP : public wxDialog +class DIALOG_EESCHEMA_CONFIG_FBP : public DIALOG_SHIM { private: diff --git a/eeschema/dialogs/dialog_erc.cpp b/eeschema/dialogs/dialog_erc.cpp index 03a6630236..9e4bf1aae4 100644 --- a/eeschema/dialogs/dialog_erc.cpp +++ b/eeschema/dialogs/dialog_erc.cpp @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include @@ -562,7 +562,7 @@ void DIALOG_ERC::TestErc( wxArrayString* aMessagesList ) if( WriteDiagnosticERC( dlg.GetPath() ) ) { Close( true ); - ExecuteFile( this, wxGetApp().GetEditorName(), QuoteFullPath( fn ) ); + ExecuteFile( this, Pgm().GetEditorName(), QuoteFullPath( fn ) ); } } } diff --git a/eeschema/dialogs/dialog_lib_edit_pin.cpp b/eeschema/dialogs/dialog_lib_edit_pin.cpp index 245ebd628b..7f3307ad83 100644 --- a/eeschema/dialogs/dialog_lib_edit_pin.cpp +++ b/eeschema/dialogs/dialog_lib_edit_pin.cpp @@ -94,10 +94,10 @@ void DIALOG_LIB_EDIT_PIN::OnPropertiesChange( wxCommandEvent& event ) if( ! IsShown() ) // do nothing at init time return; - int pinNameSize = ReturnValueFromString( g_UserUnit, GetNameTextSize() ); - int pinNumSize = ReturnValueFromString( g_UserUnit, GetPadNameTextSize()); + int pinNameSize = ValueFromString( g_UserUnit, GetNameTextSize() ); + int pinNumSize = ValueFromString( g_UserUnit, GetPadNameTextSize()); int pinOrient = LIB_PIN::GetOrientationCode( GetOrientation() ); - int pinLength = ReturnValueFromString( g_UserUnit, GetLength() ); + int pinLength = ValueFromString( g_UserUnit, GetLength() ); int pinShape = LIB_PIN::GetStyleCode( GetStyle() ); int pinType = GetElectricalType(); diff --git a/eeschema/dialogs/dialog_lib_edit_text.cpp b/eeschema/dialogs/dialog_lib_edit_text.cpp index 674b5cf820..6530175407 100644 --- a/eeschema/dialogs/dialog_lib_edit_text.cpp +++ b/eeschema/dialogs/dialog_lib_edit_text.cpp @@ -64,7 +64,7 @@ void DIALOG_LIB_EDIT_TEXT::initDlg( ) if ( m_graphicText ) { - msg = ReturnStringFromValue( g_UserUnit, m_graphicText->GetSize().x ); + msg = StringFromValue( g_UserUnit, m_graphicText->GetSize().x ); m_TextSize->SetValue( msg ); m_TextValue->SetValue( m_graphicText->GetText() ); @@ -116,7 +116,7 @@ void DIALOG_LIB_EDIT_TEXT::initDlg( ) } else { - msg = ReturnStringFromValue( g_UserUnit, m_parent->m_textSize ); + msg = StringFromValue( g_UserUnit, m_parent->m_textSize ); m_TextSize->SetValue( msg ); if ( ! m_parent->m_drawSpecificUnit ) @@ -148,7 +148,7 @@ void DIALOG_LIB_EDIT_TEXT::OnOkClick( wxCommandEvent& event ) Line = m_TextValue->GetValue(); m_parent->m_textOrientation = m_Orient->GetValue() ? TEXT_ORIENT_VERT : TEXT_ORIENT_HORIZ; wxString msg = m_TextSize->GetValue(); - m_parent->m_textSize = ReturnValueFromString( g_UserUnit, msg ); + m_parent->m_textSize = ValueFromString( g_UserUnit, msg ); m_parent->m_drawSpecificConvert = m_CommonConvert->GetValue() ? false : true; m_parent->m_drawSpecificUnit = m_CommonUnit->GetValue() ? false : true; diff --git a/eeschema/dialogs/dialog_netlist.cpp b/eeschema/dialogs/dialog_netlist.cpp index 8266c2d0c8..90a6babe90 100644 --- a/eeschema/dialogs/dialog_netlist.cpp +++ b/eeschema/dialogs/dialog_netlist.cpp @@ -39,7 +39,8 @@ */ #include -#include +#include +#include #include #include #include @@ -123,7 +124,7 @@ public: NETLIST_PAGE_DIALOG* m_PanelNetType[4 + CUSTOMPANEL_COUNTMAX]; private: - wxConfig* m_config; + wxConfigBase* m_config; public: @@ -169,17 +170,17 @@ private: } /** - * Function ReturnUserNetlistTypeName + * Function UserNetlistTypeName * to retrieve user netlist type names * @param first_item = true: return first name of the list, false = return next * @return a wxString : name of the type netlist or empty string * this function must be called first with "first_item" = true * and after with "first_item" = false to get all the other existing netlist names */ - const wxString ReturnUserNetlistTypeName( bool first_item ); + const wxString UserNetlistTypeName( bool first_item ); /** - * Function ReturnFilenamePrms + * Function FilenamePrms * returns the filename extension and the wildcard string for this curr * or a void name if there is no default name * @param aNetTypeId = the netlist type ( NET_TYPE_PCBNEW ... ) @@ -187,7 +188,7 @@ private: * @param aWildCard = reference to a wxString to return the default wildcard. * @return true for known netlist type, false for custom formats */ - bool ReturnFilenamePrms( NETLIST_TYPE_ID aNetTypeId, + bool FilenamePrms( NETLIST_TYPE_ID aNetTypeId, wxString * aExt, wxString * aWildCard ); DECLARE_EVENT_TABLE() @@ -347,7 +348,7 @@ NETLIST_DIALOG::NETLIST_DIALOG( SCH_EDIT_FRAME* parent ) : NETLIST_DIALOG_BASE( parent ) { m_Parent = parent; - m_config = wxGetApp().GetSettings(); + m_config = Kiface().KifaceSettings(); long tmp; m_config->Read( NETLIST_USE_DEFAULT_NETNAME, &tmp, 0l ); @@ -388,7 +389,7 @@ NETLIST_DIALOG::NETLIST_DIALOG( SCH_EDIT_FRAME* parent ) : } -const wxString NETLIST_DIALOG::ReturnUserNetlistTypeName( bool first_item ) +const wxString NETLIST_DIALOG::UserNetlistTypeName( bool first_item ) { static int index; wxString name, msg; @@ -448,7 +449,7 @@ void NETLIST_DIALOG::InstallCustomPages() for( ii = 0; ii < CUSTOMPANEL_COUNTMAX; ii++ ) { - title = ReturnUserNetlistTypeName( ii == 0 ? true : false ); + title = UserNetlistTypeName( ii == 0 ? true : false ); if( title.IsEmpty() ) break; // No more panel to install @@ -532,7 +533,7 @@ void NETLIST_DIALOG::OnNetlistTypeSelection( wxNotebookEvent& event ) m_cbUseDefaultNetlistName->Enable( currPage->m_IdNetType < NET_TYPE_CUSTOM1 ); wxString fileExt; - if( ReturnFilenamePrms( currPage->m_IdNetType, &fileExt, NULL ) ) + if( FilenamePrms( currPage->m_IdNetType, &fileExt, NULL ) ) { wxFileName fn = g_RootSheet->GetScreen()->GetFileName(); fn.SetExt( fileExt ); @@ -591,7 +592,7 @@ void NETLIST_DIALOG::GenNetlist( wxCommandEvent& event ) // Calculate the netlist filename fn = g_RootSheet->GetScreen()->GetFileName(); - ReturnFilenamePrms( currPage->m_IdNetType, &fileExt, &fileWildcard ); + FilenamePrms( currPage->m_IdNetType, &fileExt, &fileWildcard ); // Set some parameters switch( currPage->m_IdNetType ) @@ -653,7 +654,7 @@ void NETLIST_DIALOG::GenNetlist( wxCommandEvent& event ) } -bool NETLIST_DIALOG::ReturnFilenamePrms( NETLIST_TYPE_ID aNetTypeId, +bool NETLIST_DIALOG::FilenamePrms( NETLIST_TYPE_ID aNetTypeId, wxString * aExt, wxString * aWildCard ) { wxString fileExt; @@ -913,7 +914,7 @@ void NETLIST_DIALOG_ADD_PLUGIN::OnBrowsePlugins( wxCommandEvent& event ) wxString FullFileName, Mask, Path; Mask = wxT( "*" ); - Path = wxGetApp().GetExecutablePath(); + Path = Pgm().GetExecutablePath(); FullFileName = EDA_FileSelector( _( "Plugin files:" ), Path, FullFileName, diff --git a/eeschema/dialogs/dialog_plot_schematic.cpp b/eeschema/dialogs/dialog_plot_schematic.cpp index 1b175b625d..9390e6d6e1 100644 --- a/eeschema/dialogs/dialog_plot_schematic.cpp +++ b/eeschema/dialogs/dialog_plot_schematic.cpp @@ -29,7 +29,8 @@ */ #include -#include +#include +#include #include #include #include @@ -63,7 +64,7 @@ DIALOG_PLOT_SCHEMATIC::DIALOG_PLOT_SCHEMATIC( SCH_EDIT_FRAME* parent ) : DIALOG_PLOT_SCHEMATIC_BASE( parent ) { m_parent = parent; - m_config = wxGetApp().GetSettings(); + m_config = Kiface().KifaceSettings(); initDlg(); @@ -177,7 +178,7 @@ void DIALOG_PLOT_SCHEMATIC::getPlotOptions() m_config->Write( PLOT_HPGL_PEN_SIZE_KEY, m_HPGLPenSize/IU_PER_MM ); m_pageSizeSelect = m_PaperSizeOption->GetSelection(); - SetDefaultLineThickness( ReturnValueFromTextCtrl( *m_DefaultLineSizeCtrl ) ); + SetDefaultLineThickness( ValueFromTextCtrl( *m_DefaultLineSizeCtrl ) ); } diff --git a/eeschema/dialogs/dialog_plot_schematic.h b/eeschema/dialogs/dialog_plot_schematic.h index baa03bd4d1..df547ffbe6 100644 --- a/eeschema/dialogs/dialog_plot_schematic.h +++ b/eeschema/dialogs/dialog_plot_schematic.h @@ -46,7 +46,7 @@ class DIALOG_PLOT_SCHEMATIC : public DIALOG_PLOT_SCHEMATIC_BASE { private: SCH_EDIT_FRAME* m_parent; - wxConfig* m_config; + wxConfigBase* m_config; static int m_pageSizeSelect; // Static to keep last option for some format: // Static to keep last option: // use default size or force A or A4 size @@ -58,10 +58,10 @@ public: DIALOG_PLOT_SCHEMATIC( SCH_EDIT_FRAME* parent ); private: - void OnPlotFormatSelection( wxCommandEvent& event ); - void OnButtonPlotCurrentClick( wxCommandEvent& event ); - void OnButtonPlotAllClick( wxCommandEvent& event ); - void OnButtonCancelClick( wxCommandEvent& event ); + void OnPlotFormatSelection( wxCommandEvent& event ); + void OnButtonPlotCurrentClick( wxCommandEvent& event ); + void OnButtonPlotAllClick( wxCommandEvent& event ); + void OnButtonCancelClick( wxCommandEvent& event ); void initDlg(); diff --git a/eeschema/dialogs/dialog_print_using_printer.cpp b/eeschema/dialogs/dialog_print_using_printer.cpp index cd6548c2ca..15fbdc8055 100644 --- a/eeschema/dialogs/dialog_print_using_printer.cpp +++ b/eeschema/dialogs/dialog_print_using_printer.cpp @@ -3,7 +3,7 @@ /****************************************/ #include -#include +#include #include #include #include diff --git a/eeschema/eelibs_read_libraryfiles.cpp b/eeschema/eelibs_read_libraryfiles.cpp index 5d623767ed..8eaaafd8de 100644 --- a/eeschema/eelibs_read_libraryfiles.cpp +++ b/eeschema/eelibs_read_libraryfiles.cpp @@ -4,9 +4,10 @@ */ #include +#include #include #include -#include +#include #include #include @@ -16,18 +17,23 @@ #include -void SCH_EDIT_FRAME::LoadLibraries( void ) +void SCH_EDIT_FRAME::LoadLibraries() { - size_t ii; - wxFileName fn; - wxString msg, tmp, errMsg; - wxString libraries_not_found; - wxArrayString sortOrder; + size_t ii; + wxFileName fn; + wxString msg, tmp, errMsg; + wxString libraries_not_found; + wxArrayString sortOrder; + SEARCH_STACK& lib_search = Prj().SchSearchS(); + +#if defined(DEBUG) && 1 + lib_search.Show( __func__ ); +#endif CMP_LIBRARY_LIST::iterator i = CMP_LIBRARY::GetLibraryList().begin(); - /* Free the unwanted libraries but keep the cache library. */ - while ( i < CMP_LIBRARY::GetLibraryList().end() ) + // Free the unwanted libraries but keep the cache library. + while( i < CMP_LIBRARY::GetLibraryList().end() ) { if( i->IsCache() ) { @@ -35,26 +41,28 @@ void SCH_EDIT_FRAME::LoadLibraries( void ) continue; } + DBG(printf( "ll:%s\n", TO_UTF8( i->GetName() ) );) + if( m_componentLibFiles.Index( i->GetName(), false ) == wxNOT_FOUND ) i = CMP_LIBRARY::GetLibraryList().erase( i ); else i++; } - /* Load missing libraries. */ + // Load missing libraries. for( ii = 0; ii < m_componentLibFiles.GetCount(); ii++ ) { fn.Clear(); fn.SetName( m_componentLibFiles[ii] ); fn.SetExt( SchematicLibraryFileExtension ); - /* Skip if the file name is not valid.. */ + // Skip if the file name is not valid.. if( !fn.IsOk() ) continue; if( !fn.FileExists() ) { - tmp = wxGetApp().FindLibraryPath( fn ); + tmp = lib_search.FindValidPath( fn ); if( !tmp ) { @@ -72,24 +80,24 @@ void SCH_EDIT_FRAME::LoadLibraries( void ) if( CMP_LIBRARY::AddLibrary( fn, errMsg ) ) { - msg.Printf( _( "Library <%s> loaded" ), GetChars( tmp ) ); + msg.Printf( _( "Library '%s' loaded" ), GetChars( tmp ) ); sortOrder.Add( fn.GetName() ); } else { wxString prompt; - prompt.Printf( _( "Component library <%s> failed to load.\nError: %s" ), + prompt.Printf( _( "Component library '%s' failed to load.\nError: %s" ), GetChars( fn.GetFullPath() ), GetChars( errMsg ) ); DisplayError( this, prompt ); - msg.Printf( _( "Library <%s> error!" ), GetChars( tmp ) ); + msg.Printf( _( "Library '%s' error!" ), GetChars( tmp ) ); } PrintMsg( msg ); } - /* Print the libraries not found */ + // Print the libraries not found if( !libraries_not_found.IsEmpty() ) { HTML_MESSAGE_BOX dialog( this, _("Files not found") ); @@ -99,11 +107,11 @@ void SCH_EDIT_FRAME::LoadLibraries( void ) dialog.ShowModal(); } - /* Put the libraries in the correct order. */ + // Put the libraries in the correct order. CMP_LIBRARY::SetSortOrder( sortOrder ); CMP_LIBRARY::GetLibraryList().sort(); -#if 0 // #ifdef __WXDEBUG__ +#if 0 && defined(__WXDEBUG__) wxLogDebug( wxT( "LoadLibraries() requested component library sort order:" ) ); for( size_t i = 0; i < sortOrder.GetCount(); i++ ) @@ -118,3 +126,4 @@ void SCH_EDIT_FRAME::LoadLibraries( void ) wxLogDebug( wxT( "end LoadLibraries ()" ) ); #endif } + diff --git a/eeschema/eeschema.cpp b/eeschema/eeschema.cpp index 5efa3e62c8..c7e72dd048 100644 --- a/eeschema/eeschema.cpp +++ b/eeschema/eeschema.cpp @@ -29,12 +29,13 @@ */ #include -#include +#include +#include #include -#include #include #include #include +#include #include #include @@ -45,23 +46,65 @@ #include #include -#include - - -#if defined( USE_KIWAY_DLLS ) - #include -#include -static struct SCH_FACE : public KIFACE + +// Global variables +wxSize g_RepeatStep; +int g_RepeatDeltaLabel; +int g_DefaultBusWidth; +SCH_SHEET* g_RootSheet = NULL; + +TRANSFORM DefaultTransform = TRANSFORM( 1, 0, 0, -1 ); + + +namespace SCH { + +static struct IFACE : public KIFACE_I { - wxWindow* CreateWindow( int aClassId, KIWAY* aKIWAY, int aCtlBits = 0 ) + // Of course all are virtual overloads, implementations of the KIFACE. + + IFACE( const char* aName, KIWAY::FACE_T aType ) : + KIFACE_I( aName, aType ) + {} + + bool OnKifaceStart( PGM_BASE* aProgram ); + + void OnKifaceEnd( PGM_BASE* aProgram ) + { + end_common(); + } + + wxWindow* CreateWindow( wxWindow* aParent, int aClassId, KIWAY* aKiway, int aCtlBits = 0 ) { switch( aClassId ) { + case LIBEDITOR_FRAME_TYPE: + { + LIB_EDIT_FRAME* frame = new LIB_EDIT_FRAME( aKiway, + dynamic_cast( aParent ) ); + return frame; + } + break; + + case SCHEMATIC_FRAME_TYPE: + { + SCH_EDIT_FRAME* frame = new SCH_EDIT_FRAME( aKiway, aParent ); + + frame->Zoom_Automatique( true ); + + // Read a default config file in case no project given on command line. + frame->LoadProjectFile( wxEmptyString, true ); + + // @todo temporary + CreateServer( frame, KICAD_SCH_PORT_SERVICE_NUMBER ); + + return frame; + } + break; + default: - return new SCH_EDIT_FRAME( NULL, wxT( "Eeschema" ), - wxPoint( 0, 0 ), wxSize( 600, 400 ) ); + return NULL; } } @@ -81,139 +124,51 @@ static struct SCH_FACE : public KIFACE return NULL; } -} kiface; +} kiface( "eeschema", KIWAY::FACE_SCH ); + +} // namespace + +using namespace SCH; + +static PGM_BASE* process; + + +KIFACE_I& Kiface() { return kiface; } -static EDA_APP* process; // KIFACE_GETTER's actual spelling is a substitution macro found in kiway.h. // KIFACE_GETTER will not have name mangling due to declaration in kiway.h. -MY_API( KIFACE* ) KIFACE_GETTER( int* aKIFACEversion, int aKIWAYversion, wxApp* aProcess ) +MY_API( KIFACE* ) KIFACE_GETTER( int* aKIFACEversion, int aKiwayVersion, PGM_BASE* aProgram ) { - process = (EDA_APP*) aProcess; + process = (PGM_BASE*) aProgram; return &kiface; } -EDA_APP& wxGetApp() +PGM_BASE& Pgm() { wxASSERT( process ); // KIFACE_GETTER has already been called. return *process; } -#else -// Create a new application object: this macro will allow wxWindows to create -// the application object during program execution (it's better than using a -// static object for many reasons) and also declares the accessor function -// wxGetApp() which will return the reference of the right type (i.e. MyApp and -// not wxApp) -IMPLEMENT_APP( EDA_APP ) - -#endif - - -// Global variables -wxSize g_RepeatStep; -int g_RepeatDeltaLabel; -int g_DefaultBusWidth; -SCH_SHEET* g_RootSheet = NULL; - -TRANSFORM DefaultTransform = TRANSFORM( 1, 0, 0, -1 ); - - -/************************************/ -/* Called to initialize the program */ -/************************************/ - -/* MacOSX: Needed for file association - * http://wiki.wxwidgets.org/WxMac-specific_topics - */ -void EDA_APP::MacOpenFile( const wxString& aFileName ) +bool IFACE::OnKifaceStart( PGM_BASE* aProgram ) { - wxFileName filename = aFileName; - SCH_EDIT_FRAME* frame = ((SCH_EDIT_FRAME*) GetTopWindow()); + // This is process level, not project level, initialization of the DSO. - if( !frame ) - return; + // Do nothing in here pertinent to a project! - if( !filename.FileExists() ) - return; - - frame->LoadOneEEProject( aFileName, false ); -} - - -bool EDA_APP::OnInit() -{ - wxFileName filename; - SCH_EDIT_FRAME* frame = NULL; - bool fileReady = false; - - InitEDA_Appl( wxT( "Eeschema" ), APP_EESCHEMA_T ); - - if( argc > 1 ) - filename = argv[1]; - - if( filename.IsOk() ) - { - if( filename.GetExt() != SchematicFileExtension ) - filename.SetExt( SchematicFileExtension ); - - if( !wxGetApp().LockFile( filename.GetFullPath() ) ) - { - DisplayError( NULL, _( "This file is already open." ) ); - return false; - } - - fileReady = true; - } - - if( m_Checker && m_Checker->IsAnotherRunning() ) - { - if( !IsOK( NULL, _( "Eeschema is already running, Continue?" ) ) ) - return false; - } + start_common(); // Give a default colour for all layers // (actual color will be initialized by config) for( int ii = 0; ii < NB_SCH_LAYERS; ii++ ) SetLayerColor( DARKGRAY, ii ); - // read current setup and reopen last directory if no filename to open in - // command line - bool reopenLastUsedDirectory = argc == 1; - GetSettings( reopenLastUsedDirectory ); - - /* Must be called before creating the main frame in order to - * display the real hotkeys in menus or tool tips */ + // Must be called before creating the main frame in order to + // display the real hotkeys in menus or tool tips ReadHotkeyConfig( wxT("SchematicFrame"), s_Eeschema_Hokeys_Descr ); - // Create main frame (schematic frame) : - frame = new SCH_EDIT_FRAME( NULL, wxT( "Eeschema" ), wxPoint( 0, 0 ), wxSize( 600, 400 ) ); - - SetTopWindow( frame ); - frame->Show( true ); - - CreateServer( frame, KICAD_SCH_PORT_SERVICE_NUMBER ); - - frame->Zoom_Automatique( true ); - - // Load file specified in the command line: - if( fileReady ) - { - if( !filename.GetPath().IsEmpty() ) - // wxSetWorkingDirectory does not like empty paths - wxSetWorkingDirectory( filename.GetPath() ); - - if( frame->LoadOneEEProject( filename.GetFullPath(), false ) ) - frame->GetCanvas()->Refresh( true ); - } - else - { - // Read a default config file if no file to load. - frame->LoadProjectFile( wxEmptyString, true ); - frame->GetCanvas()->Refresh( true ); - } - return true; } + diff --git a/eeschema/eeschema_config.cpp b/eeschema/eeschema_config.cpp index 43e5ec21e3..e335d9d4b6 100644 --- a/eeschema/eeschema_config.cpp +++ b/eeschema/eeschema_config.cpp @@ -26,11 +26,13 @@ */ #include -#include +#include +#include #include #include #include #include +#include #include #include @@ -44,7 +46,6 @@ #include #include -#include #include #include @@ -117,9 +118,7 @@ EDA_COLOR_T GetInvisibleItemColor() void LIB_EDIT_FRAME::InstallConfigFrame( wxCommandEvent& event ) { - DIALOG_EESCHEMA_CONFIG CfgFrame( (SCH_EDIT_FRAME *)GetParent(), this ); - - CfgFrame.ShowModal(); + InvokeEeschemaConfig( (SCH_EDIT_FRAME *)GetParent(), this ); } @@ -194,9 +193,7 @@ void SCH_EDIT_FRAME::OnColorConfig( wxCommandEvent& aEvent ) void SCH_EDIT_FRAME::InstallConfigFrame( wxCommandEvent& event ) { - DIALOG_EESCHEMA_CONFIG CfgFrame( this, this ); - - CfgFrame.ShowModal(); + InvokeEeschemaConfig( this, this ); } @@ -212,21 +209,20 @@ void SCH_EDIT_FRAME::Process_Config( wxCommandEvent& event ) break; case ID_CONFIG_READ: - { - fn = g_RootSheet->GetScreen()->GetFileName(); - fn.SetExt( ProjectFileExtension ); + { + fn = g_RootSheet->GetScreen()->GetFileName(); + fn.SetExt( ProjectFileExtension ); - wxFileDialog dlg( this, _( "Read Project File" ), fn.GetPath(), - fn.GetFullName(), ProjectFileWildcard, - wxFD_OPEN | wxFD_FILE_MUST_EXIST ); + wxFileDialog dlg( this, _( "Read Project File" ), fn.GetPath(), + fn.GetFullName(), ProjectFileWildcard, + wxFD_OPEN | wxFD_FILE_MUST_EXIST ); - if( dlg.ShowModal() == wxID_CANCEL ) - break; - - LoadProjectFile( dlg.GetPath(), true ); - } - break; + if( dlg.ShowModal() == wxID_CANCEL ) + break; + LoadProjectFile( dlg.GetPath(), true ); + } + break; // Hotkey IDs case ID_PREFERENCES_HOTKEY_EXPORT_CONFIG: @@ -398,9 +394,10 @@ PARAM_CFG_ARRAY& SCH_EDIT_FRAME::GetProjectFileParametersList() bool SCH_EDIT_FRAME::LoadProjectFile( const wxString& aFileName, bool aForceReread ) { - wxFileName fn; - bool IsRead = true; - wxArrayString liblist_tmp = m_componentLibFiles; + wxFileName fn; + bool isRead = true; + wxArrayString liblist_tmp = m_componentLibFiles; + PROJECT& prj = Prj(); if( aFileName.IsEmpty() ) fn = g_RootSheet->GetScreen()->GetFileName(); @@ -409,18 +406,15 @@ bool SCH_EDIT_FRAME::LoadProjectFile( const wxString& aFileName, bool aForceRere m_componentLibFiles.Clear(); - /* Change the schematic file extension (.sch) to the project file - * extension (.pro). */ + // Change the schematic file extension (.sch) to the project file + // extension (.pro). fn.SetExt( ProjectFileExtension ); - wxGetApp().RemoveLibraryPath( m_userLibraryPath ); - - if( !wxGetApp().ReadProjectConfig( fn.GetFullPath(), GROUP, - GetProjectFileParametersList(), - !aForceReread ) ) + if( !prj.ConfigLoad( Kiface().KifaceSearch(), fn.GetFullPath(), GROUP, + GetProjectFileParametersList(), !aForceReread ) ) { m_componentLibFiles = liblist_tmp; - IsRead = false; + isRead = false; } // Verify some values, because the config file can be edited by hand, @@ -434,28 +428,26 @@ bool SCH_EDIT_FRAME::LoadProjectFile( const wxString& aFileName, bool aForceRere WORKSHEET_LAYOUT& pglayout = WORKSHEET_LAYOUT::GetTheInstance(); pglayout.SetPageLayout(BASE_SCREEN::m_PageLayoutDescrFileName); - // Load libraries. - // User library path takes precedent over default library search paths. - wxGetApp().InsertLibraryPath( m_userLibraryPath, 1 ); + // libraries in the *.pro file take precedence over standard library search paths, + // but not over the director of the project, which is at index 0. + prj.SchSearchS().AddPaths( m_userLibraryPath, 1 ); - /* If the list is void, force loading the library "power.lib" that is - * the "standard" library for power symbols. - */ + // If the list is empty, force loading the standard power symbol library. if( m_componentLibFiles.GetCount() == 0 ) m_componentLibFiles.Add( wxT( "power" ) ); LoadLibraries(); GetScreen()->SetGrid( ID_POPUP_GRID_LEVEL_1000 + m_LastGridSizeId ); - return IsRead; + return isRead; } void SCH_EDIT_FRAME::SaveProjectSettings( bool aAskForSave ) { - wxFileName fn; + PROJECT& prj = Prj(); + wxFileName fn = g_RootSheet->GetScreen()->GetFileName(); //ConfigFileName - fn = g_RootSheet->GetScreen()->GetFileName(); //ConfigFileName fn.SetExt( ProjectFileExtension ); if( !IsWritable( fn ) ) @@ -470,37 +462,37 @@ void SCH_EDIT_FRAME::SaveProjectSettings( bool aAskForSave ) if( dlg.ShowModal() == wxID_CANCEL ) return; - wxGetApp().WriteProjectConfig( dlg.GetPath(), GROUP, - GetProjectFileParametersList() ); + fn = dlg.GetPath(); } - else - wxGetApp().WriteProjectConfig( fn.GetFullPath(), GROUP, - GetProjectFileParametersList() ); + + prj.ConfigSave( Kiface().KifaceSearch(), + fn.GetFullPath(), GROUP, GetProjectFileParametersList() ); } -static const wxString DefaultBusWidthEntry( wxT( "DefaultBusWidth" ) ); -static const wxString DefaultDrawLineWidthEntry( wxT( "DefaultDrawLineWidth" ) ); -static const wxString ShowHiddenPinsEntry( wxT( "ShowHiddenPins" ) ); -static const wxString HorzVertLinesOnlyEntry( wxT( "HorizVertLinesOnly" ) ); -static const wxString PreviewFramePositionXEntry( wxT( "PreviewFramePositionX" ) ); -static const wxString PreviewFramePositionYEntry( wxT( "PreviewFramePositionY" ) ); -static const wxString PreviewFrameWidthEntry( wxT( "PreviewFrameWidth" ) ); -static const wxString PreviewFrameHeightEntry( wxT( "PreviewFrameHeight" ) ); -static const wxString PrintDialogPositionXEntry( wxT( "PrintDialogPositionX" ) ); -static const wxString PrintDialogPositionYEntry( wxT( "PrintDialogPositionY" ) ); -static const wxString PrintDialogWidthEntry( wxT( "PrintDialogWidth" ) ); -static const wxString PrintDialogHeightEntry( wxT( "PrintDialogHeight" ) ); -static const wxString FindDialogPositionXEntry( wxT( "FindDialogPositionX" ) ); -static const wxString FindDialogPositionYEntry( wxT( "FindDialogPositionY" ) ); -static const wxString FindDialogWidthEntry( wxT( "FindDialogWidth" ) ); -static const wxString FindDialogHeightEntry( wxT( "FindDialogHeight" ) ); -static const wxString FindReplaceFlagsEntry( wxT( "LastFindReplaceFlags" ) ); -static const wxString FindStringEntry( wxT( "LastFindString" ) ); -static const wxString ReplaceStringEntry( wxT( "LastReplaceString" ) ); -static const wxString FindStringHistoryEntry( wxT( "FindStringHistoryList%d" ) ); -static const wxString ReplaceStringHistoryEntry( wxT( "ReplaceStringHistoryList%d" ) ); -static const wxString FieldNamesEntry( wxT( "FieldNames" ) ); -static const wxString SimulatorCommandEntry( wxT( "SimCmdLine" ) ); + +static const wxChar DefaultBusWidthEntry[] = wxT( "DefaultBusWidth" ); +static const wxChar DefaultDrawLineWidthEntry[] = wxT( "DefaultDrawLineWidth" ); +static const wxChar ShowHiddenPinsEntry[] = wxT( "ShowHiddenPins" ); +static const wxChar HorzVertLinesOnlyEntry[] = wxT( "HorizVertLinesOnly" ); +static const wxChar PreviewFramePositionXEntry[] = wxT( "PreviewFramePositionX" ); +static const wxChar PreviewFramePositionYEntry[] = wxT( "PreviewFramePositionY" ); +static const wxChar PreviewFrameWidthEntry[] = wxT( "PreviewFrameWidth" ); +static const wxChar PreviewFrameHeightEntry[] = wxT( "PreviewFrameHeight" ); +static const wxChar PrintDialogPositionXEntry[] = wxT( "PrintDialogPositionX" ); +static const wxChar PrintDialogPositionYEntry[] = wxT( "PrintDialogPositionY" ); +static const wxChar PrintDialogWidthEntry[] = wxT( "PrintDialogWidth" ); +static const wxChar PrintDialogHeightEntry[] = wxT( "PrintDialogHeight" ); +static const wxChar FindDialogPositionXEntry[] = wxT( "FindDialogPositionX" ); +static const wxChar FindDialogPositionYEntry[] = wxT( "FindDialogPositionY" ); +static const wxChar FindDialogWidthEntry[] = wxT( "FindDialogWidth" ); +static const wxChar FindDialogHeightEntry[] = wxT( "FindDialogHeight" ); +static const wxChar FindReplaceFlagsEntry[] = wxT( "LastFindReplaceFlags" ); +static const wxChar FindStringEntry[] = wxT( "LastFindString" ); +static const wxChar ReplaceStringEntry[] = wxT( "LastReplaceString" ); +static const wxChar FindStringHistoryEntry[] = wxT( "FindStringHistoryList%d" ); +static const wxChar ReplaceStringHistoryEntry[] = wxT( "ReplaceStringHistoryList%d" ); +static const wxChar FieldNamesEntry[] = wxT( "FieldNames" ); +static const wxChar SimulatorCommandEntry[] = wxT( "SimCmdLine" ); PARAM_CFG_ARRAY& SCH_EDIT_FRAME::GetConfigurationSettings( void ) @@ -592,64 +584,62 @@ PARAM_CFG_ARRAY& SCH_EDIT_FRAME::GetConfigurationSettings( void ) } -void SCH_EDIT_FRAME::LoadSettings() +void SCH_EDIT_FRAME::LoadSettings( wxConfigBase* aCfg ) { - wxASSERT( wxGetApp().GetSettings() != NULL ); + EDA_DRAW_FRAME::LoadSettings( aCfg ); long tmp; - wxConfig* cfg = wxGetApp().GetSettings(); - - EDA_DRAW_FRAME::LoadSettings(); - - wxGetApp().ReadCurrentSetupValues( GetConfigurationSettings() ); + wxConfigLoadSetups( aCfg, GetConfigurationSettings() ); // This is required until someone gets rid of the global variable s_layerColor. m_GridColor = GetLayerColor( LAYER_GRID ); - SetDefaultBusThickness( cfg->Read( DefaultBusWidthEntry, 12l ) ); - SetDefaultLineThickness( cfg->Read( DefaultDrawLineWidthEntry, 6l ) ); - cfg->Read( ShowHiddenPinsEntry, &m_showAllPins, false ); - cfg->Read( HorzVertLinesOnlyEntry, &m_forceHVLines, true ); + SetDefaultBusThickness( aCfg->Read( DefaultBusWidthEntry, 12l ) ); + SetDefaultLineThickness( aCfg->Read( DefaultDrawLineWidthEntry, 6l ) ); + aCfg->Read( ShowHiddenPinsEntry, &m_showAllPins, false ); + aCfg->Read( HorzVertLinesOnlyEntry, &m_forceHVLines, true ); // Load print preview window session settings. - cfg->Read( PreviewFramePositionXEntry, &tmp, -1 ); + aCfg->Read( PreviewFramePositionXEntry, &tmp, -1 ); m_previewPosition.x = (int) tmp; - cfg->Read( PreviewFramePositionYEntry, &tmp, -1 ); + aCfg->Read( PreviewFramePositionYEntry, &tmp, -1 ); m_previewPosition.y = (int) tmp; - cfg->Read( PreviewFrameWidthEntry, &tmp, -1 ); + aCfg->Read( PreviewFrameWidthEntry, &tmp, -1 ); m_previewSize.SetWidth( (int) tmp ); - cfg->Read( PreviewFrameHeightEntry, &tmp, -1 ); + aCfg->Read( PreviewFrameHeightEntry, &tmp, -1 ); m_previewSize.SetHeight( (int) tmp ); // Load print dialog session settings. - cfg->Read( PrintDialogPositionXEntry, &tmp, -1 ); + aCfg->Read( PrintDialogPositionXEntry, &tmp, -1 ); m_printDialogPosition.x = (int) tmp; - cfg->Read( PrintDialogPositionYEntry, &tmp, -1 ); + aCfg->Read( PrintDialogPositionYEntry, &tmp, -1 ); m_printDialogPosition.y = (int) tmp; - cfg->Read( PrintDialogWidthEntry, &tmp, -1 ); + aCfg->Read( PrintDialogWidthEntry, &tmp, -1 ); m_printDialogSize.SetWidth( (int) tmp ); - cfg->Read( PrintDialogHeightEntry, &tmp, -1 ); + aCfg->Read( PrintDialogHeightEntry, &tmp, -1 ); m_printDialogSize.SetHeight( (int) tmp ); // Load netlists options: - cfg->Read( SimulatorCommandEntry, &m_simulatorCommand ); + aCfg->Read( SimulatorCommandEntry, &m_simulatorCommand ); // Load find dialog session setting. - cfg->Read( FindDialogPositionXEntry, &tmp, -1 ); + aCfg->Read( FindDialogPositionXEntry, &tmp, -1 ); m_findDialogPosition.x = (int) tmp; - cfg->Read( FindDialogPositionYEntry, &tmp, -1 ); + aCfg->Read( FindDialogPositionYEntry, &tmp, -1 ); m_findDialogPosition.y = (int) tmp; - cfg->Read( FindDialogWidthEntry, &tmp, -1 ); + aCfg->Read( FindDialogWidthEntry, &tmp, -1 ); m_findDialogSize.SetWidth( (int) tmp ); - cfg->Read( FindDialogHeightEntry, &tmp, -1 ); + aCfg->Read( FindDialogHeightEntry, &tmp, -1 ); m_findDialogSize.SetHeight( (int) tmp ); + wxASSERT_MSG( m_findReplaceData, wxT( "Find dialog data settings object not created. Bad programmer!" ) ); - cfg->Read( FindReplaceFlagsEntry, &tmp, (long) wxFR_DOWN ); + + aCfg->Read( FindReplaceFlagsEntry, &tmp, (long) wxFR_DOWN ); m_findReplaceData->SetFlags( (wxUint32) tmp & ~FR_REPLACE_ITEM_FOUND ); - m_findReplaceData->SetFindString( cfg->Read( FindStringEntry, wxEmptyString ) ); - m_findReplaceData->SetReplaceString( cfg->Read( ReplaceStringEntry, wxEmptyString ) ); + m_findReplaceData->SetFindString( aCfg->Read( FindStringEntry, wxEmptyString ) ); + m_findReplaceData->SetReplaceString( aCfg->Read( ReplaceStringEntry, wxEmptyString ) ); // Load the find and replace string history list. for( int i = 0; i < FR_HISTORY_LIST_CNT; ++i ) @@ -657,19 +647,19 @@ void SCH_EDIT_FRAME::LoadSettings() wxString tmpHistory; wxString entry; entry.Printf( FindStringHistoryEntry, i ); - tmpHistory = cfg->Read( entry, wxEmptyString ); + tmpHistory = aCfg->Read( entry, wxEmptyString ); if( !tmpHistory.IsEmpty() ) m_findStringHistoryList.Add( tmpHistory ); entry.Printf( ReplaceStringHistoryEntry, i ); - tmpHistory = cfg->Read( entry, wxEmptyString ); + tmpHistory = aCfg->Read( entry, wxEmptyString ); if( !tmpHistory.IsEmpty() ) m_replaceStringHistoryList.Add( tmpHistory ); } - wxString templateFieldNames = cfg->Read( FieldNamesEntry, wxEmptyString ); + wxString templateFieldNames = aCfg->Read( FieldNamesEntry, wxEmptyString ); if( !templateFieldNames.IsEmpty() ) { @@ -688,47 +678,43 @@ void SCH_EDIT_FRAME::LoadSettings() } -void SCH_EDIT_FRAME::SaveSettings() +void SCH_EDIT_FRAME::SaveSettings( wxConfigBase* aCfg ) { - wxASSERT( wxGetApp().GetSettings() != NULL ); + EDA_DRAW_FRAME::SaveSettings( aCfg ); - wxConfig* cfg = wxGetApp().GetSettings(); + wxConfigSaveSetups( aCfg, GetConfigurationSettings() ); - EDA_DRAW_FRAME::SaveSettings(); - - wxGetApp().SaveCurrentSetupValues( GetConfigurationSettings() ); - - cfg->Write( DefaultBusWidthEntry, (long) GetDefaultBusThickness() ); - cfg->Write( DefaultDrawLineWidthEntry, (long) GetDefaultLineThickness() ); - cfg->Write( ShowHiddenPinsEntry, m_showAllPins ); - cfg->Write( HorzVertLinesOnlyEntry, GetForceHVLines() ); + aCfg->Write( DefaultBusWidthEntry, (long) GetDefaultBusThickness() ); + aCfg->Write( DefaultDrawLineWidthEntry, (long) GetDefaultLineThickness() ); + aCfg->Write( ShowHiddenPinsEntry, m_showAllPins ); + aCfg->Write( HorzVertLinesOnlyEntry, GetForceHVLines() ); // Save print preview window session settings. - cfg->Write( PreviewFramePositionXEntry, m_previewPosition.x ); - cfg->Write( PreviewFramePositionYEntry, m_previewPosition.y ); - cfg->Write( PreviewFrameWidthEntry, m_previewSize.GetWidth() ); - cfg->Write( PreviewFrameHeightEntry, m_previewSize.GetHeight() ); + aCfg->Write( PreviewFramePositionXEntry, m_previewPosition.x ); + aCfg->Write( PreviewFramePositionYEntry, m_previewPosition.y ); + aCfg->Write( PreviewFrameWidthEntry, m_previewSize.GetWidth() ); + aCfg->Write( PreviewFrameHeightEntry, m_previewSize.GetHeight() ); // Save print dialog session settings. - cfg->Write( PrintDialogPositionXEntry, m_printDialogPosition.x ); - cfg->Write( PrintDialogPositionYEntry, m_printDialogPosition.y ); - cfg->Write( PrintDialogWidthEntry, m_printDialogSize.GetWidth() ); - cfg->Write( PrintDialogHeightEntry, m_printDialogSize.GetHeight() ); + aCfg->Write( PrintDialogPositionXEntry, m_printDialogPosition.x ); + aCfg->Write( PrintDialogPositionYEntry, m_printDialogPosition.y ); + aCfg->Write( PrintDialogWidthEntry, m_printDialogSize.GetWidth() ); + aCfg->Write( PrintDialogHeightEntry, m_printDialogSize.GetHeight() ); // Save netlists options: - cfg->Write( SimulatorCommandEntry, m_simulatorCommand ); + aCfg->Write( SimulatorCommandEntry, m_simulatorCommand ); // Save find dialog session setting. - cfg->Write( FindDialogPositionXEntry, m_findDialogPosition.x ); - cfg->Write( FindDialogPositionYEntry, m_findDialogPosition.y ); - cfg->Write( FindDialogWidthEntry, m_findDialogSize.GetWidth() ); - cfg->Write( FindDialogHeightEntry, m_findDialogSize.GetHeight() ); + aCfg->Write( FindDialogPositionXEntry, m_findDialogPosition.x ); + aCfg->Write( FindDialogPositionYEntry, m_findDialogPosition.y ); + aCfg->Write( FindDialogWidthEntry, m_findDialogSize.GetWidth() ); + aCfg->Write( FindDialogHeightEntry, m_findDialogSize.GetHeight() ); wxASSERT_MSG( m_findReplaceData, wxT( "Find dialog data settings object not created. Bad programmer!" ) ); - cfg->Write( FindReplaceFlagsEntry, + aCfg->Write( FindReplaceFlagsEntry, (long) m_findReplaceData->GetFlags() & ~FR_REPLACE_ITEM_FOUND ); - cfg->Write( FindStringEntry, m_findReplaceData->GetFindString() ); - cfg->Write( ReplaceStringEntry, m_findReplaceData->GetReplaceString() ); + aCfg->Write( FindStringEntry, m_findReplaceData->GetFindString() ); + aCfg->Write( ReplaceStringEntry, m_findReplaceData->GetReplaceString() ); // Save the find and replace string history list. unsigned i; @@ -738,13 +724,13 @@ void SCH_EDIT_FRAME::SaveSettings() for( i = 0; i < m_findStringHistoryList.GetCount() && i < FR_HISTORY_LIST_CNT; i++ ) { entry.Printf( FindStringHistoryEntry, i ); - cfg->Write( entry, m_findStringHistoryList[ i ] ); + aCfg->Write( entry, m_findStringHistoryList[ i ] ); } for( i = 0; i < m_replaceStringHistoryList.GetCount() && i < FR_HISTORY_LIST_CNT; i++ ) { entry.Printf( ReplaceStringHistoryEntry, i ); - cfg->Write( entry, m_replaceStringHistoryList[ i ] ); + aCfg->Write( entry, m_replaceStringHistoryList[ i ] ); } // Save template fieldnames @@ -758,5 +744,5 @@ void SCH_EDIT_FRAME::SaveSettings() record.Replace( wxT("\n"), wxT(""), true ); // strip all newlines record.Replace( wxT(" "), wxT(" "), true ); // double space to single - cfg->Write( FieldNamesEntry, record ); + aCfg->Write( FieldNamesEntry, record ); } diff --git a/eeschema/eeschema_config.h b/eeschema/eeschema_config.h index 0c9135066c..8bdfa54ec6 100644 --- a/eeschema/eeschema_config.h +++ b/eeschema/eeschema_config.h @@ -2,7 +2,7 @@ * @file eeschema_config.h */ -#include +#include #define GROUP wxT( "/eeschema" ) #define GROUPCOMMON wxT( "/common" ) diff --git a/eeschema/files-io.cpp b/eeschema/files-io.cpp index fa6f17b91e..8e83cdc524 100644 --- a/eeschema/files-io.cpp +++ b/eeschema/files-io.cpp @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include @@ -243,14 +243,15 @@ bool SCH_EDIT_FRAME::LoadCacheLibrary( const wxString& aFilename ) } -bool SCH_EDIT_FRAME::LoadOneEEProject( const wxString& aFileName, bool aIsNew ) +bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector& aFileSet, int aCtl ) { SCH_SCREEN* screen; - wxString FullFileName, msg; - bool LibCacheExist = false; - SCH_SCREENS ScreenList; + wxString fullFileName( aFileSet[0] ); + wxString msg; + bool libCacheExist = false; + SCH_SCREENS screenList; - for( screen = ScreenList.GetFirst(); screen != NULL; screen = ScreenList.GetNext() ) + for( screen = screenList.GetFirst(); screen != NULL; screen = screenList.GetNext() ) { if( screen->IsModify() ) break; @@ -258,10 +259,12 @@ bool SCH_EDIT_FRAME::LoadOneEEProject( const wxString& aFileName, bool aIsNew ) if( screen ) { - int response = YesNoCancelDialog( this, _( "The current schematic has been modified. Do " - "you wish to save the changes?" ), - wxEmptyString, - _( "Save and Load" ), _( "Load Without Saving" ) ); + int response = YesNoCancelDialog( this, + _( "The current schematic has been modified. Do you wish to save the changes?" ), + wxEmptyString, + _( "Save and Load" ), + _( "Load Without Saving" ) + ); if( response == wxID_CANCEL ) { @@ -274,9 +277,8 @@ bool SCH_EDIT_FRAME::LoadOneEEProject( const wxString& aFileName, bool aIsNew ) } } - FullFileName = aFileName; - - if( FullFileName.IsEmpty() && !aIsNew ) +/* + if( fullFileName.IsEmpty() && !aIsNew ) { wxFileDialog dlg( this, _( "Open Schematic" ), wxGetCwd(), wxEmptyString, SchematicFileWildcard, @@ -287,16 +289,17 @@ bool SCH_EDIT_FRAME::LoadOneEEProject( const wxString& aFileName, bool aIsNew ) FullFileName = dlg.GetPath(); } +*/ - wxFileName fn = FullFileName; + wxFileName fn = fullFileName; if( fn.IsRelative() ) { fn.MakeAbsolute(); - FullFileName = fn.GetFullPath(); + fullFileName = fn.GetFullPath(); } - if( !wxGetApp().LockFile( FullFileName ) ) + if( !Pgm().LockFile( fullFileName ) ) { DisplayError( this, _( "This file is already open." ) ); return false; @@ -312,16 +315,19 @@ bool SCH_EDIT_FRAME::LoadOneEEProject( const wxString& aFileName, bool aIsNew ) CreateScreens(); screen = GetScreen(); - wxLogDebug( wxT( "Loading schematic " ) + FullFileName ); + wxLogDebug( wxT( "Loading schematic " ) + fullFileName ); + + // @todo: this is bad: wxSetWorkingDirectory( fn.GetPath() ); - screen->SetFileName( FullFileName ); - g_RootSheet->SetFileName( FullFileName ); + screen->SetFileName( fullFileName ); + g_RootSheet->SetFileName( fullFileName ); SetStatusText( wxEmptyString ); ClearMsgPanel(); screen->ClrModify(); +#if 0 if( aIsNew ) { /* SCH_SCREEN constructor does this now @@ -347,9 +353,10 @@ bool SCH_EDIT_FRAME::LoadOneEEProject( const wxString& aFileName, bool aIsNew ) m_canvas->Refresh(); return true; } +#endif // Reloading configuration. - msg.Printf( _( "Ready\nWorking dir: <%s>\n" ), GetChars( wxGetCwd() ) ); + msg.Printf( _( "Ready\nWorking dir: '%s'\n" ), GetChars( wxGetCwd() ) ); PrintMsg( msg ); LoadProjectFile( wxEmptyString, false ); @@ -361,12 +368,12 @@ bool SCH_EDIT_FRAME::LoadOneEEProject( const wxString& aFileName, bool aIsNew ) // Delete old caches. CMP_LIBRARY::RemoveCacheLibrary(); - LibCacheExist = LoadCacheLibrary( g_RootSheet->GetScreen()->GetFileName() ); + libCacheExist = LoadCacheLibrary( g_RootSheet->GetScreen()->GetFileName() ); - if( !wxFileExists( g_RootSheet->GetScreen()->GetFileName() ) && !LibCacheExist ) + if( !wxFileExists( g_RootSheet->GetScreen()->GetFileName() ) && !libCacheExist ) { Zoom_Automatique( false ); - msg.Printf( _( "File <%s> not found." ), + msg.Printf( _( "File '%s' not found." ), GetChars( g_RootSheet->GetScreen()->GetFileName() ) ); DisplayInfoMessage( this, msg ); return false; @@ -379,11 +386,12 @@ bool SCH_EDIT_FRAME::LoadOneEEProject( const wxString& aFileName, bool aIsNew ) UpdateFileHistory( g_RootSheet->GetScreen()->GetFileName() ); - /* Redraw base screen (ROOT) if necessary. */ + // Redraw base screen (ROOT) if necessary. GetScreen()->SetGrid( ID_POPUP_GRID_LEVEL_1000 + m_LastGridSizeId ); Zoom_Automatique( false ); SetSheetNumberAndCount(); m_canvas->Refresh( true ); + return diag; } @@ -391,8 +399,8 @@ bool SCH_EDIT_FRAME::LoadOneEEProject( const wxString& aFileName, bool aIsNew ) bool SCH_EDIT_FRAME::AppendOneEEProject() { SCH_SCREEN* screen; - wxString FullFileName; - wxString msg; + wxString fullFileName; + wxString msg; screen = GetScreen(); @@ -410,22 +418,22 @@ bool SCH_EDIT_FRAME::AppendOneEEProject() if( dlg.ShowModal() == wxID_CANCEL ) return false; - FullFileName = dlg.GetPath(); + fullFileName = dlg.GetPath(); - wxFileName fn = FullFileName; + wxFileName fn = fullFileName; if( fn.IsRelative() ) { fn.MakeAbsolute(); - FullFileName = fn.GetFullPath(); + fullFileName = fn.GetFullPath(); } - LoadCacheLibrary( FullFileName ); + LoadCacheLibrary( fullFileName ); - wxLogDebug( wxT( "Importing schematic " ) + FullFileName ); + wxLogDebug( wxT( "Importing schematic " ) + fullFileName ); // load the project - bool success = LoadOneEEFile( screen, FullFileName, true ); + bool success = LoadOneEEFile( screen, fullFileName, true ); if( success ) { // load sub-sheets diff --git a/eeschema/find.cpp b/eeschema/find.cpp index ed52efe966..d29cd4aba8 100644 --- a/eeschema/find.cpp +++ b/eeschema/find.cpp @@ -34,7 +34,7 @@ * in current sheet or whole the project */ #include -#include +#include #include #include #include diff --git a/eeschema/getpart.cpp b/eeschema/getpart.cpp index a423d2ea72..f30d6a827b 100644 --- a/eeschema/getpart.cpp +++ b/eeschema/getpart.cpp @@ -29,7 +29,7 @@ */ #include -#include +#include #include #include #include @@ -56,12 +56,13 @@ wxString SCH_BASE_FRAME::SelectComponentFromLibBrowser( void ) wxString cmpname; // Close the current Lib browser, if open, and open a new one, in "modal" mode: - LIB_VIEW_FRAME * viewlibFrame = LIB_VIEW_FRAME::GetActiveLibraryViewer();; + LIB_VIEW_FRAME* viewlibFrame = LIB_VIEW_FRAME::GetActiveLibraryViewer( this ); if( viewlibFrame ) viewlibFrame->Destroy(); - viewlibFrame = new LIB_VIEW_FRAME( this, NULL, &semaphore, + viewlibFrame = new LIB_VIEW_FRAME( &Kiway(), this, NULL, &semaphore, KICAD_DEFAULT_DRAWFRAME_STYLE | wxFRAME_FLOAT_ON_PARENT ); + // Show the library viewer frame until it is closed // Wait for viewer closing event: while( semaphore.TryWait() == wxSEMA_BUSY ) diff --git a/eeschema/invoke_sch_dialog.h b/eeschema/invoke_sch_dialog.h index 4cd27be957..b2a8fba3f8 100644 --- a/eeschema/invoke_sch_dialog.h +++ b/eeschema/invoke_sch_dialog.h @@ -75,5 +75,6 @@ int InvokeDialogCreateBOM( SCH_EDIT_FRAME* aCaller ); #define NET_PLUGIN_CHANGE 1 int InvokeDialogNetList( SCH_EDIT_FRAME* aCaller ); +int InvokeEeschemaConfig( SCH_EDIT_FRAME* aEditFrame, wxFrame* aParent ); #endif // INVOKE_SCH_DIALOG_H_ diff --git a/eeschema/lib_arc.cpp b/eeschema/lib_arc.cpp index c4a3735f8c..66bb12b24d 100644 --- a/eeschema/lib_arc.cpp +++ b/eeschema/lib_arc.cpp @@ -553,7 +553,7 @@ void LIB_ARC::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) LIB_ITEM::GetMsgPanelInfo( aList ); - msg = ReturnStringFromValue( g_UserUnit, m_Width, true ); + msg = StringFromValue( g_UserUnit, m_Width, true ); aList.push_back( MSG_PANEL_ITEM( _( "Line width" ), msg, BLUE ) ); diff --git a/eeschema/lib_bezier.cpp b/eeschema/lib_bezier.cpp index 1d4601950a..b58e11cb6b 100644 --- a/eeschema/lib_bezier.cpp +++ b/eeschema/lib_bezier.cpp @@ -411,7 +411,7 @@ void LIB_BEZIER::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) LIB_ITEM::GetMsgPanelInfo( aList ); - msg = ReturnStringFromValue( g_UserUnit, m_Width, true ); + msg = StringFromValue( g_UserUnit, m_Width, true ); aList.push_back( MSG_PANEL_ITEM( _( "Line width" ), msg, BLUE ) ); diff --git a/eeschema/lib_circle.cpp b/eeschema/lib_circle.cpp index 9dadd713fe..82a19b9585 100644 --- a/eeschema/lib_circle.cpp +++ b/eeschema/lib_circle.cpp @@ -269,11 +269,11 @@ void LIB_CIRCLE::GetMsgPanelInfo( MSG_PANEL_ITEMS& aList ) LIB_ITEM::GetMsgPanelInfo( aList ); - msg = ReturnStringFromValue( g_UserUnit, m_Width, true ); + msg = StringFromValue( g_UserUnit, m_Width, true ); aList.push_back( MSG_PANEL_ITEM( _( "Line width" ), msg, BLUE ) ); - msg = ReturnStringFromValue( g_UserUnit, m_Radius, true ); + msg = StringFromValue( g_UserUnit, m_Radius, true ); aList.push_back( MSG_PANEL_ITEM( _( "Radius" ), msg, RED ) ); msg.Printf( wxT( "(%d, %d, %d, %d)" ), bBox.GetOrigin().x, diff --git a/eeschema/lib_field.cpp b/eeschema/lib_field.cpp index 4e924a5333..392daecc8c 100644 --- a/eeschema/lib_field.cpp +++ b/eeschema/lib_field.cpp @@ -27,7 +27,7 @@ */ #include -#include +#include #include #include #include @@ -517,7 +517,7 @@ wxString LIB_FIELD::GetFullText( int unit ) text << wxT( "?" ); if( GetParent()->IsMulti() ) - text << LIB_COMPONENT::ReturnSubReference( unit ); + text << LIB_COMPONENT::SubReference( unit ); return text; } @@ -763,10 +763,10 @@ void LIB_FIELD::GetMsgPanelInfo( MSG_PANEL_ITEMS& aList ) msg = GetTextStyleName(); aList.push_back( MSG_PANEL_ITEM( _( "Style" ), msg, MAGENTA ) ); - msg = ReturnStringFromValue( g_UserUnit, m_Size.x, true ); + msg = StringFromValue( g_UserUnit, m_Size.x, true ); aList.push_back( MSG_PANEL_ITEM( _( "Size X" ), msg, BLUE ) ); - msg = ReturnStringFromValue( g_UserUnit, m_Size.y, true ); + msg = StringFromValue( g_UserUnit, m_Size.y, true ); aList.push_back( MSG_PANEL_ITEM( _( "Size Y" ), msg, BLUE ) ); // Display field name (ref, value ...) diff --git a/eeschema/lib_pin.cpp b/eeschema/lib_pin.cpp index 481c083c6f..b8e8f7897a 100644 --- a/eeschema/lib_pin.cpp +++ b/eeschema/lib_pin.cpp @@ -27,7 +27,7 @@ */ #include -#include +#include #include #include #include @@ -602,7 +602,7 @@ bool LIB_PIN::Save( OUTPUTFORMATTER& aFormatter ) break; } - ReturnPinStringNum( StringPinNum ); + PinStringNum( StringPinNum ); if( StringPinNum.IsEmpty() ) StringPinNum = wxT( "~" ); @@ -824,7 +824,7 @@ void LIB_PIN::drawGraphic( EDA_DRAW_PANEL* aPanel, DrawPinText = false; /* Calculate pin orient taking in account the component orientation. */ - int orient = ReturnPinDrawOrient( aTransform ); + int orient = PinDrawOrient( aTransform ); /* Calculate the pin position */ wxPoint pos1 = aTransform.TransformCoordinate( m_position ) + aOffset; @@ -1102,7 +1102,7 @@ void LIB_PIN::DrawPinTexts( EDA_DRAW_PANEL* panel, GetLayerColor( LAYER_PINNUM ) : Color ); /* Create the pin num string */ - ReturnPinStringNum( StringPinNum ); + PinStringNum( StringPinNum ); x1 = pin_pos.x; y1 = pin_pos.y; @@ -1396,7 +1396,7 @@ void LIB_PIN::PlotPinTexts( PLOTTER* plotter, NumColor = GetLayerColor( LAYER_PINNUM ); /* Create the pin num string */ - ReturnPinStringNum( StringPinNum ); + PinStringNum( StringPinNum ); x1 = pin_pos.x; y1 = pin_pos.y; @@ -1565,7 +1565,7 @@ void LIB_PIN::PlotPinTexts( PLOTTER* plotter, } -wxPoint LIB_PIN::ReturnPinEndPoint() const +wxPoint LIB_PIN::PinEndPoint() const { wxPoint pos = m_position; @@ -1592,7 +1592,7 @@ wxPoint LIB_PIN::ReturnPinEndPoint() const } -int LIB_PIN::ReturnPinDrawOrient( const TRANSFORM& aTransform ) const +int LIB_PIN::PinDrawOrient( const TRANSFORM& aTransform ) const { int orient; wxPoint end; // position of pin end starting at 0,0 according to its orientation, length = 1 @@ -1637,13 +1637,13 @@ int LIB_PIN::ReturnPinDrawOrient( const TRANSFORM& aTransform ) const } -void LIB_PIN::ReturnPinStringNum( wxString& aStringBuffer ) const +void LIB_PIN::PinStringNum( wxString& aStringBuffer ) const { - aStringBuffer = ReturnPinStringNum( m_number ); + aStringBuffer = PinStringNum( m_number ); } -wxString LIB_PIN::ReturnPinStringNum( long aPinNum ) +wxString LIB_PIN::PinStringNum( long aPinNum ) { char ascii_buf[5]; @@ -1714,7 +1714,7 @@ void LIB_PIN::SetOffset( const wxPoint& aOffset ) bool LIB_PIN::Inside( EDA_RECT& rect ) const { - wxPoint end = ReturnPinEndPoint(); + wxPoint end = PinEndPoint(); return rect.Contains( m_position.x, -m_position.y ) || rect.Contains( end.x, -end.y ); } @@ -1809,7 +1809,7 @@ void LIB_PIN::Plot( PLOTTER* plotter, const wxPoint& offset, bool fill, if( ! IsVisible() ) return; - int orient = ReturnPinDrawOrient( aTransform ); + int orient = PinDrawOrient( aTransform ); wxPoint pos = aTransform.TransformCoordinate( m_position ) + offset; @@ -1842,7 +1842,7 @@ void LIB_PIN::GetMsgPanelInfo( MSG_PANEL_ITEMS& aList ) if( m_number == 0 ) Text = wxT( "?" ); else - ReturnPinStringNum( Text ); + PinStringNum( Text ); aList.push_back( MSG_PANEL_ITEM( _( "Number" ), Text, DARKCYAN ) ); @@ -1860,7 +1860,7 @@ void LIB_PIN::GetMsgPanelInfo( MSG_PANEL_ITEMS& aList ) aList.push_back( MSG_PANEL_ITEM( _( "Visible" ), Text, DARKGREEN ) ); // Display pin length - Text = ReturnStringFromValue( g_UserUnit, m_length, true ); + Text = StringFromValue( g_UserUnit, m_length, true ); aList.push_back( MSG_PANEL_ITEM( _( "Length" ), Text, MAGENTA ) ); Text = wxGetTranslation( pin_orientation_names[ GetOrientationCodeIndex( m_orientation ) ] ); @@ -1937,7 +1937,7 @@ const EDA_RECT LIB_PIN::GetBoundingBox() const } // Now, calculate boundary box corners position for the actual pin orientation - int orient = ReturnPinDrawOrient( DefaultTransform ); + int orient = PinDrawOrient( DefaultTransform ); /* Calculate the pin position */ switch( orient ) diff --git a/eeschema/lib_pin.h b/eeschema/lib_pin.h index c89538a216..bf4c504776 100644 --- a/eeschema/lib_pin.h +++ b/eeschema/lib_pin.h @@ -142,20 +142,20 @@ public: const EDA_RECT GetBoundingBox() const; // Virtual /** - * Function ReturnPinEndPoint + * Function PinEndPoint * * @return The pin end position for a component in the normal orientation. */ - wxPoint ReturnPinEndPoint() const; + wxPoint PinEndPoint() const; /** - * Function ReturnPinDrawOrient + * Function PinDrawOrient * returns the pin real orientation (PIN_UP, PIN_DOWN, PIN_RIGHT, PIN_LEFT), * according to its orientation and the matrix transform (rot, mirror) \a aTransform * * @param aTransform Transform matrix */ - int ReturnPinDrawOrient( const TRANSFORM& aTransform ) const; + int PinDrawOrient( const TRANSFORM& aTransform ) const; /** * Fill a string buffer with pin number. @@ -165,20 +165,20 @@ public: * * @param aStringBuffer - the wxString to store the pin num as an unicode string */ - void ReturnPinStringNum( wxString& aStringBuffer ) const; + void PinStringNum( wxString& aStringBuffer ) const; long GetNumber() const { return m_number; } - wxString GetNumberString() const { return ReturnPinStringNum( m_number ); } + wxString GetNumberString() const { return PinStringNum( m_number ); } /** - * Function ReturnPinStringNum (static function) + * Function PinStringNum (static function) * Pin num is coded as a long or 4 ascii chars * @param aPinNum = a long containing a pin num * @return aStringBuffer = the wxString to store the pin num as an * unicode string */ - static wxString ReturnPinStringNum( long aPinNum ); + static wxString PinStringNum( long aPinNum ); /** * Function SetPinNumFromString diff --git a/eeschema/lib_polyline.cpp b/eeschema/lib_polyline.cpp index 2b3fabc71b..ce0c7e93ef 100644 --- a/eeschema/lib_polyline.cpp +++ b/eeschema/lib_polyline.cpp @@ -399,7 +399,7 @@ void LIB_POLYLINE::GetMsgPanelInfo( MSG_PANEL_ITEMS& aList ) LIB_ITEM::GetMsgPanelInfo( aList ); - msg = ReturnStringFromValue( g_UserUnit, m_Width, true ); + msg = StringFromValue( g_UserUnit, m_Width, true ); aList.push_back( MSG_PANEL_ITEM( _( "Line width" ), msg, BLUE ) ); diff --git a/eeschema/lib_rectangle.cpp b/eeschema/lib_rectangle.cpp index 42c7a1b395..e21bc9054d 100644 --- a/eeschema/lib_rectangle.cpp +++ b/eeschema/lib_rectangle.cpp @@ -249,7 +249,7 @@ void LIB_RECTANGLE::GetMsgPanelInfo( MSG_PANEL_ITEMS& aList ) LIB_ITEM::GetMsgPanelInfo( aList ); - msg = ReturnStringFromValue( g_UserUnit, m_Width, true ); + msg = StringFromValue( g_UserUnit, m_Width, true ); aList.push_back( MSG_PANEL_ITEM( _( "Line width" ), msg, BLUE ) ); } diff --git a/eeschema/lib_text.cpp b/eeschema/lib_text.cpp index a197b9251a..d52acdda97 100644 --- a/eeschema/lib_text.cpp +++ b/eeschema/lib_text.cpp @@ -423,7 +423,7 @@ void LIB_TEXT::GetMsgPanelInfo( MSG_PANEL_ITEMS& aList ) LIB_ITEM::GetMsgPanelInfo( aList ); - msg = ReturnStringFromValue( g_UserUnit, m_Thickness, true ); + msg = StringFromValue( g_UserUnit, m_Thickness, true ); aList.push_back( MSG_PANEL_ITEM( _( "Line width" ), msg, BLUE ) ); } diff --git a/eeschema/libedit.cpp b/eeschema/libedit.cpp index e5f3b6511d..e8d2cf64e7 100644 --- a/eeschema/libedit.cpp +++ b/eeschema/libedit.cpp @@ -29,9 +29,10 @@ */ #include +#include #include #include -#include +#include #include #include #include @@ -318,8 +319,13 @@ bool LIB_EDIT_FRAME::SaveActiveLibrary( bool newFile ) } if( newFile ) - { // Get a new name for the library - wxString default_path = wxGetApp().ReturnLastVisitedLibraryPath(); + { + PROJECT& prj = Prj(); + SEARCH_STACK& search = prj.SchSearchS(); + + // Get a new name for the library + wxString default_path = prj.RPath(PROJECT::SCH_LIB).LastVisitedPath( search ); + wxFileDialog dlg( this, _( "Component Library Name:" ), default_path, wxEmptyString, SchematicLibraryFileExtension, wxFD_SAVE | wxFD_OVERWRITE_PROMPT ); @@ -334,7 +340,7 @@ bool LIB_EDIT_FRAME::SaveActiveLibrary( bool newFile ) if( fn.GetExt().IsEmpty() ) fn.SetExt( SchematicLibraryFileExtension ); - wxGetApp().SaveLastVisitedLibraryPath( fn.GetPath() ); + prj.RPath(PROJECT::SCH_LIB).SaveLastVisitedPath( fn.GetPath() ); } else { @@ -402,6 +408,7 @@ bool LIB_EDIT_FRAME::SaveActiveLibrary( bool newFile ) if( docFileName.FileExists() ) { backupFileName.SetExt( wxT( "bck" ) ); + if( backupFileName.FileExists() ) wxRemoveFile( backupFileName.GetFullPath() ); diff --git a/eeschema/libedit_plot_component.cpp b/eeschema/libedit_plot_component.cpp index 45bf13a412..39d3dbafcb 100644 --- a/eeschema/libedit_plot_component.cpp +++ b/eeschema/libedit_plot_component.cpp @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include #include diff --git a/eeschema/libeditframe.cpp b/eeschema/libeditframe.cpp index 8b7b5a1794..2b26819d7d 100644 --- a/eeschema/libeditframe.cpp +++ b/eeschema/libeditframe.cpp @@ -29,7 +29,8 @@ */ #include -#include +#include +#include #include #include #include @@ -188,15 +189,11 @@ END_EVENT_TABLE() #define LIB_EDIT_FRAME_NAME wxT( "LibeditFrame" ) -LIB_EDIT_FRAME::LIB_EDIT_FRAME( SCH_EDIT_FRAME* aParent, - const wxString& title, - const wxPoint& pos, - const wxSize& size, - long style ) : - SCH_BASE_FRAME( aParent, LIBEDITOR_FRAME_TYPE, title, pos, size, - style, GetLibEditFrameName() ) +LIB_EDIT_FRAME::LIB_EDIT_FRAME( KIWAY* aKiway, SCH_EDIT_FRAME* aParent ) : + SCH_BASE_FRAME( aKiway, aParent, LIBEDITOR_FRAME_TYPE, _( "Library Editor" ), + wxDefaultPosition, wxDefaultSize, KICAD_DEFAULT_DRAWFRAME_STYLE, GetLibEditFrameName() ) { - wxASSERT( aParent ); + wxASSERT( aParent ); // LIB_EDIT_FRAME needs a parent, since it peeks up there. m_FrameName = GetLibEditFrameName(); m_showAxis = true; // true to draw axis @@ -219,7 +216,7 @@ LIB_EDIT_FRAME::LIB_EDIT_FRAME( SCH_EDIT_FRAME* aParent, SetCrossHairPosition( wxPoint( 0, 0 ) ); - LoadSettings(); + LoadSettings( config() ); SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y ); @@ -295,17 +292,29 @@ LIB_EDIT_FRAME* LIB_EDIT_FRAME::GetActiveLibraryEditor() } -void LIB_EDIT_FRAME::LoadSettings() +void LIB_EDIT_FRAME::LoadSettings( wxConfigBase* aCfg ) { - wxConfig* cfg; +#if 0 // original + + wxConfigBase* cfg; EDA_DRAW_FRAME::LoadSettings(); wxConfigPathChanger cpc( wxGetApp().GetSettings(), m_configPath ); - cfg = wxGetApp().GetSettings(); + cfg = Pgm().GetSettings(); +#else - m_lastLibExportPath = cfg->Read( lastLibExportPathEntry, ::wxGetCwd() ); - m_lastLibImportPath = cfg->Read( lastLibImportPathEntry, ::wxGetCwd() ); + EDA_DRAW_FRAME::LoadSettings( aCfg ); + + wxConfigPathChanger cpc( aCfg, m_configPath ); + + m_lastLibExportPath = aCfg->Read( lastLibExportPathEntry, ::wxGetCwd() ); + m_lastLibImportPath = aCfg->Read( lastLibImportPathEntry, ::wxGetCwd() ); + +#endif + + m_lastLibExportPath = aCfg->Read( lastLibExportPathEntry, ::wxGetCwd() ); + m_lastLibImportPath = aCfg->Read( lastLibImportPathEntry, ::wxGetCwd() ); } @@ -316,17 +325,14 @@ void LIB_EDIT_FRAME::SetDrawItem( LIB_ITEM* drawItem ) -void LIB_EDIT_FRAME::SaveSettings() +void LIB_EDIT_FRAME::SaveSettings( wxConfigBase* aCfg ) { - wxConfig* cfg; + EDA_DRAW_FRAME::SaveSettings( aCfg ); - EDA_DRAW_FRAME::SaveSettings(); + wxConfigPathChanger cpc( aCfg, m_configPath ); - wxConfigPathChanger cpc( wxGetApp().GetSettings(), m_configPath ); - cfg = wxGetApp().GetSettings(); - - cfg->Write( lastLibExportPathEntry, m_lastLibExportPath ); - cfg->Write( lastLibImportPathEntry, m_lastLibImportPath ); + aCfg->Write( lastLibExportPathEntry, m_lastLibExportPath ); + aCfg->Write( lastLibImportPathEntry, m_lastLibImportPath ); } @@ -457,7 +463,7 @@ void LIB_EDIT_FRAME::UpdatePartSelectList() { for( int i = 0; i < m_component->GetPartCount(); i++ ) { - wxString sub = LIB_COMPONENT::ReturnSubReference( i+1, false ); + wxString sub = LIB_COMPONENT::SubReference( i+1, false ); wxString part = wxString::Format( _( "Unit %s" ), GetChars( sub ) ); m_partSelectBox->Append( part ); } @@ -606,15 +612,19 @@ void LIB_EDIT_FRAME::OnViewEntryDoc( wxCommandEvent& event ) if( m_component == NULL ) return; - wxString fileName; - LIB_ALIAS* alias = m_component->GetAlias( m_aliasName ); + wxString fileName; + LIB_ALIAS* alias = m_component->GetAlias( m_aliasName ); wxCHECK_RET( alias != NULL, wxT( "Alias not found." ) ); fileName = alias->GetDocFileName(); if( !fileName.IsEmpty() ) - GetAssociatedDocument( this, fileName, &wxGetApp().GetLibraryPathList() ); + { + SEARCH_STACK* lib_search = &Prj().SchSearchS(); + + GetAssociatedDocument( this, fileName, lib_search ); + } } diff --git a/eeschema/libeditframe.h b/eeschema/libeditframe.h index 16802af6b0..45582f34d8 100644 --- a/eeschema/libeditframe.h +++ b/eeschema/libeditframe.h @@ -45,16 +45,15 @@ class LIB_ALIAS; class LIB_FIELD; class DIALOG_LIB_EDIT_TEXT; - /** * The component library editor main window. */ class LIB_EDIT_FRAME : public SCH_BASE_FRAME { - LIB_COMPONENT* m_tempCopyComponent; ///< Temporary copy of current component during edit. - LIB_COLLECTOR m_collectedItems; // Used for hit testing. - wxComboBox* m_partSelectBox; // a Box to select a part to edit (if any) - wxComboBox* m_aliasSelectBox; // a box to select the alias to edit (if any) + LIB_COMPONENT* m_tempCopyComponent; ///< Temporary copy of current component during edit. + LIB_COLLECTOR m_collectedItems; ///< Used for hit testing. + wxComboBox* m_partSelectBox; ///< a Box to select a part to edit (if any) + wxComboBox* m_aliasSelectBox; ///< a box to select the alias to edit (if any) wxString m_configPath; wxString m_lastLibImportPath; @@ -122,9 +121,8 @@ class LIB_EDIT_FRAME : public SCH_BASE_FRAME LIB_ITEM* locateItem( const wxPoint& aPosition, const KICAD_T aFilterList[] ); public: - LIB_EDIT_FRAME( SCH_EDIT_FRAME* aParent, const wxString& aTitle, - const wxPoint& aPosition, const wxSize& aSize, - long aStyle = KICAD_DEFAULT_DRAWFRAME_STYLE ); + + LIB_EDIT_FRAME( KIWAY* aKiway, SCH_EDIT_FRAME* aParent ); ~LIB_EDIT_FRAME(); @@ -294,23 +292,9 @@ public: void GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aHotKey = 0 ); - /** - * Function LoadSettings - * loads the library editor frame specific configuration settings. - * - * Don't forget to call this method from any derived classes or the settings will not - * get loaded. - */ - void LoadSettings(); + void LoadSettings( wxConfigBase* aCfg ); - /** - * Function SaveSettings - * saves the library editor frame specific configuration settings. - * - * Don't forget to call this base method from any derived classes or the settings will - * not get saved. - */ - void SaveSettings(); + void SaveSettings( wxConfigBase* aCfg ); /** * Function CloseWindow @@ -575,11 +559,11 @@ public: /* Block commands: */ /** - * Function ReturnBlockCommand + * Function BlockCommand * returns the block command (BLOCK_MOVE, BLOCK_COPY...) corresponding to * the \a aKey (ALT, SHIFT ALT ..) */ - virtual int ReturnBlockCommand( int aKey ); + virtual int BlockCommand( int aKey ); /** * Function HandleBlockPlace diff --git a/eeschema/menubar.cpp b/eeschema/menubar.cpp index 32d93a5c35..8c20b87633 100644 --- a/eeschema/menubar.cpp +++ b/eeschema/menubar.cpp @@ -32,7 +32,8 @@ #endif #include -#include +#include +#include #include #include @@ -86,11 +87,13 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() // Add this menu to list menu managed by m_fileHistory // (the file history will be updated when adding/removing files in history if( openRecentMenu ) - wxGetApp().GetFileHistory().RemoveMenu( openRecentMenu ); + Kiface().GetFileHistory().RemoveMenu( openRecentMenu ); openRecentMenu = new wxMenu(); - wxGetApp().GetFileHistory().UseMenu( openRecentMenu ); - wxGetApp().GetFileHistory().AddFilesToMenu( openRecentMenu ); + + Kiface().GetFileHistory().UseMenu( openRecentMenu ); + Kiface().GetFileHistory().AddFilesToMenu( openRecentMenu ); + AddMenuItem( fileMenu, openRecentMenu, wxID_ANY, _( "Open &Recent" ), _( "Open a recent opened schematic project" ), @@ -427,7 +430,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() // Language submenu - wxGetApp().AddMenuLanguageList( preferencesMenu ); + Pgm().AddMenuLanguageList( preferencesMenu ); // Hotkey submenu AddHotkeyConfigMenu( preferencesMenu ); diff --git a/eeschema/menubar_libedit.cpp b/eeschema/menubar_libedit.cpp index eba56c6188..1671b0769e 100644 --- a/eeschema/menubar_libedit.cpp +++ b/eeschema/menubar_libedit.cpp @@ -28,7 +28,7 @@ * @brief (Re)Create the main menubar for the component editor frame (LibEdit) */ #include -#include +#include #include #include @@ -239,7 +239,7 @@ void LIB_EDIT_FRAME::ReCreateMenuBar() KiBitmap( palette_xpm ) ); // Language submenu - wxGetApp().AddMenuLanguageList( preferencesMenu ); + Pgm().AddMenuLanguageList( preferencesMenu ); // Hotkey submenu AddHotkeyConfigMenu( preferencesMenu ); diff --git a/eeschema/netform.cpp b/eeschema/netform.cpp index a0665d675f..3a97b08849 100644 --- a/eeschema/netform.cpp +++ b/eeschema/netform.cpp @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include @@ -644,8 +644,7 @@ XNODE* NETLIST_EXPORT_TOOL::makeGenericDesignHeader() xdesign->AddChild( node( wxT( "date" ), DateAndTime() ) ); // which Eeschema tool - xdesign->AddChild( node( wxT( "tool" ), wxGetApp().GetAppName() + wxChar(' ') + - GetBuildVersion() ) ); + xdesign->AddChild( node( wxT( "tool" ), wxT( "Eeschema " ) + GetBuildVersion() ) ); /* @todo might do a list of schematic pages @@ -1727,13 +1726,13 @@ bool NETLIST_EXPORT_TOOL::WriteNetListCADSTAR( FILE* f ) wxString footprint; SCH_SHEET_PATH* sheet; EDA_ITEM* DrawList; - SCH_COMPONENT* Component; - wxString Title = wxGetApp().GetAppName() + wxT( " " ) + GetBuildVersion(); + SCH_COMPONENT* component; + wxString title = wxT( "Eeschema " ) + GetBuildVersion(); ret |= fprintf( f, "%sHEA\n", TO_UTF8( StartLine ) ); ret |= fprintf( f, "%sTIM %s\n", TO_UTF8( StartLine ), TO_UTF8( DateAndTime() ) ); ret |= fprintf( f, "%sAPP ", TO_UTF8( StartLine ) ); - ret |= fprintf( f, "\"%s\"\n", TO_UTF8( Title ) ); + ret |= fprintf( f, "\"%s\"\n", TO_UTF8( title ) ); ret |= fprintf( f, "\n" ); // Prepare list of nets generation @@ -1749,27 +1748,27 @@ bool NETLIST_EXPORT_TOOL::WriteNetListCADSTAR( FILE* f ) { for( DrawList = sheet->LastDrawList(); DrawList != NULL; DrawList = DrawList->Next() ) { - DrawList = Component = findNextComponentAndCreatePinList( DrawList, sheet ); + DrawList = component = findNextComponentAndCreatePinList( DrawList, sheet ); - if( Component == NULL ) + if( component == NULL ) break; /* doing nothing with footprint - if( !Component->GetField( FOOTPRINT )->IsVoid() ) + if( !component->GetField( FOOTPRINT )->IsVoid() ) { - footprint = Component->GetField( FOOTPRINT )->m_Text; + footprint = component->GetField( FOOTPRINT )->m_Text; footprint.Replace( wxT( " " ), wxT( "_" ) ); } else footprint = wxT( "$noname" ); */ - msg = Component->GetRef( sheet ); + msg = component->GetRef( sheet ); ret |= fprintf( f, "%s ", TO_UTF8( StartCmpDesc ) ); ret |= fprintf( f, "%s", TO_UTF8( msg ) ); - msg = Component->GetField( VALUE )->GetText(); + msg = component->GetField( VALUE )->GetText(); msg.Replace( wxT( " " ), wxT( "_" ) ); ret |= fprintf( f, " \"%s\"", TO_UTF8( msg ) ); ret |= fprintf( f, "\n" ); @@ -1836,18 +1835,18 @@ bool NETLIST_EXPORT_TOOL::writeListOfNetsCADSTAR( FILE* f ) switch( print_ter ) { case 0: - { - char buf[5]; - wxString str_pinnum; - strncpy( buf, (char*) &nitem->m_PinNum, 4 ); - buf[4] = 0; - str_pinnum = FROM_UTF8( buf ); - InitNetDescLine.Printf( wxT( "\n%s %s %.4s %s" ), - GetChars( InitNetDesc ), - GetChars( refstr ), - GetChars( str_pinnum ), - GetChars( netcodeName ) ); - } + { + char buf[5]; + wxString str_pinnum; + strncpy( buf, (char*) &nitem->m_PinNum, 4 ); + buf[4] = 0; + str_pinnum = FROM_UTF8( buf ); + InitNetDescLine.Printf( wxT( "\n%s %s %.4s %s" ), + GetChars( InitNetDesc ), + GetChars( refstr ), + GetChars( str_pinnum ), + GetChars( netcodeName ) ); + } print_ter++; break; diff --git a/eeschema/operations_on_items_lists.cpp b/eeschema/operations_on_items_lists.cpp index 2b417e0020..7fa79f879e 100644 --- a/eeschema/operations_on_items_lists.cpp +++ b/eeschema/operations_on_items_lists.cpp @@ -5,7 +5,7 @@ */ #include -#include +#include #include #include diff --git a/eeschema/pinedit.cpp b/eeschema/pinedit.cpp index eee9cf5dca..202a7d691f 100644 --- a/eeschema/pinedit.cpp +++ b/eeschema/pinedit.cpp @@ -86,13 +86,13 @@ void LIB_EDIT_FRAME::OnEditPin( wxCommandEvent& event ) LIB_PIN::GetElectricalTypeSymbols() ); dlg.SetElectricalType( pin->GetType() ); dlg.SetName( pin->GetName() ); - dlg.SetNameTextSize( ReturnStringFromValue( g_UserUnit, pin->GetNameTextSize() ) ); + dlg.SetNameTextSize( StringFromValue( g_UserUnit, pin->GetNameTextSize() ) ); dlg.SetNameTextSizeUnits( units ); dlg.SetPadName( pin->GetNumberString() ); - dlg.SetPadNameTextSize( ReturnStringFromValue( g_UserUnit, pin->GetNumberTextSize() ) ); + dlg.SetPadNameTextSize( StringFromValue( g_UserUnit, pin->GetNumberTextSize() ) ); dlg.SetPadNameTextSizeUnits( units ); - dlg.SetLength( ReturnStringFromValue( g_UserUnit, pin->GetLength() ) ); + dlg.SetLength( StringFromValue( g_UserUnit, pin->GetLength() ) ); dlg.SetLengthUnits( units ); dlg.SetAddToAllParts( pin->GetUnit() == 0 ); dlg.SetAddToAllBodyStyles( pin->GetConvert() == 0 ); @@ -120,10 +120,10 @@ void LIB_EDIT_FRAME::OnEditPin( wxCommandEvent& event ) } // Save the pin properties to use for the next new pin. - LastPinNameSize = ReturnValueFromString( g_UserUnit, dlg.GetNameTextSize() ); - LastPinNumSize = ReturnValueFromString( g_UserUnit, dlg.GetPadNameTextSize() ); + LastPinNameSize = ValueFromString( g_UserUnit, dlg.GetNameTextSize() ); + LastPinNumSize = ValueFromString( g_UserUnit, dlg.GetPadNameTextSize() ); LastPinOrient = LIB_PIN::GetOrientationCode( dlg.GetOrientation() ); - LastPinLength = ReturnValueFromString( g_UserUnit, dlg.GetLength() ); + LastPinLength = ValueFromString( g_UserUnit, dlg.GetLength() ); LastPinShape = LIB_PIN::GetStyleCode( dlg.GetStyle() ); LastPinType = dlg.GetElectricalType(); LastPinCommonConvert = dlg.GetAddToAllBodyStyles(); @@ -546,7 +546,7 @@ void LIB_EDIT_FRAME::RepeatPinItem( wxDC* DC, LIB_PIN* SourcePin ) IncrementLabelMember( nextName ); Pin->SetName( nextName ); - Pin->ReturnPinStringNum( msg ); + Pin->PinStringNum( msg ); IncrementLabelMember( msg ); Pin->SetPinNumFromString( msg ); @@ -644,11 +644,11 @@ void LIB_EDIT_FRAME::OnCheckComponent( wxCommandEvent& event ) continue; dup_error++; - Pin->ReturnPinStringNum( stringPinNum ); + Pin->PinStringNum( stringPinNum ); /* TODO I dare someone to find a way to make happy translators on this thing! Lorenzo */ - curr_pin->ReturnPinStringNum( stringCurrPinNum ); + curr_pin->PinStringNum( stringCurrPinNum ); msg.Printf( _( "Duplicate pin %s \"%s\" at location (%.3f, \ %.3f) conflicts with pin %s \"%s\" at location (%.3f, %.3f)" ), GetChars( stringCurrPinNum ), @@ -692,7 +692,8 @@ void LIB_EDIT_FRAME::OnCheckComponent( wxCommandEvent& event ) // A pin is found here off grid offgrid_error++; wxString stringPinNum; - Pin->ReturnPinStringNum( stringPinNum ); + Pin->PinStringNum( stringPinNum ); + msg.Printf( _( "Off grid pin %s \"%s\" at location (%.3f, %.3f)" ), GetChars( stringPinNum ), GetChars( Pin->GetName() ), diff --git a/eeschema/plot_schematic_HPGL.cpp b/eeschema/plot_schematic_HPGL.cpp index b520cced70..f1a4dff409 100644 --- a/eeschema/plot_schematic_HPGL.cpp +++ b/eeschema/plot_schematic_HPGL.cpp @@ -97,7 +97,7 @@ static const wxChar* plot_sheet_list( int aSize ) void DIALOG_PLOT_SCHEMATIC::SetHPGLPenWidth() { - m_HPGLPenSize = ReturnValueFromTextCtrl( *m_penHPGLWidthCtrl ); + m_HPGLPenSize = ValueFromTextCtrl( *m_penHPGLWidthCtrl ); if( m_HPGLPenSize > Millimeter2iu( 2 ) ) m_HPGLPenSize = Millimeter2iu( 2 ); diff --git a/eeschema/plot_schematic_SVG.cpp b/eeschema/plot_schematic_SVG.cpp index de1ffb0466..050bad1105 100644 --- a/eeschema/plot_schematic_SVG.cpp +++ b/eeschema/plot_schematic_SVG.cpp @@ -28,7 +28,7 @@ */ #include -#include +#include #include #include #include @@ -80,12 +80,12 @@ void DIALOG_PLOT_SCHEMATIC::createSVGFile( bool aPrintAll, bool aPrintFrameRef ) if( !success ) { - msg.Printf( _( "Error creating file <%s>\n" ), + msg.Printf( _( "Error creating file <%s>\n" ), GetChars( fn.GetFullPath() ) ); } else { - msg.Printf( _( "File <%s> OK\n" ), + msg.Printf( _( "File <%s> OK\n" ), GetChars( fn.GetFullPath() ) ); } diff --git a/eeschema/sch_base_frame.cpp b/eeschema/sch_base_frame.cpp index 891a1c1f29..686efce6de 100644 --- a/eeschema/sch_base_frame.cpp +++ b/eeschema/sch_base_frame.cpp @@ -27,24 +27,25 @@ #include #include -SCH_BASE_FRAME::SCH_BASE_FRAME( wxWindow* aParent, - ID_DRAWFRAME_TYPE aWindowType, - const wxString& aTitle, - const wxPoint& aPosition, const wxSize& aSize, - long aStyle, const wxString & aFrameName ) : - EDA_DRAW_FRAME( aParent, aWindowType, aTitle, aPosition, aSize, aStyle, aFrameName ) + +SCH_BASE_FRAME::SCH_BASE_FRAME( KIWAY* aKiway, wxWindow* aParent, + ID_DRAWFRAME_TYPE aWindowType, const wxString& aTitle, + const wxPoint& aPosition, const wxSize& aSize, long aStyle, + const wxString& aFrameName ) : + EDA_DRAW_FRAME( aKiway, aParent, aWindowType, aTitle, aPosition, + aSize, aStyle, aFrameName ) { } void SCH_BASE_FRAME::OnOpenLibraryViewer( wxCommandEvent& event ) { - LIB_VIEW_FRAME * viewlibFrame = LIB_VIEW_FRAME::GetActiveLibraryViewer();; + LIB_VIEW_FRAME* viewlibFrame = LIB_VIEW_FRAME::GetActiveLibraryViewer( this ); if( viewlibFrame ) viewlibFrame->Show( true ); else - new LIB_VIEW_FRAME( this ); + new LIB_VIEW_FRAME( &Kiway(), this ); } diff --git a/eeschema/sch_component.cpp b/eeschema/sch_component.cpp index d83c892591..e25bd51b4e 100644 --- a/eeschema/sch_component.cpp +++ b/eeschema/sch_component.cpp @@ -28,7 +28,7 @@ */ #include -#include +#include #include #include #include diff --git a/eeschema/sch_field.cpp b/eeschema/sch_field.cpp index af21d0add0..8a7d814b3b 100644 --- a/eeschema/sch_field.cpp +++ b/eeschema/sch_field.cpp @@ -104,7 +104,7 @@ const wxString SCH_FIELD::GetFullyQualifiedText() const wxT( "No component associated with field" ) + text ); if( component->GetPartCount() > 1 ) - text << LIB_COMPONENT::ReturnSubReference( component->GetUnit() ); + text << LIB_COMPONENT::SubReference( component->GetUnit() ); } return text; @@ -409,7 +409,7 @@ bool SCH_FIELD::Matches( wxFindReplaceData& aSearchData, void* aAuxData, wxPoint text = component->GetRef( (SCH_SHEET_PATH*) aAuxData ); if( component->GetPartCount() > 1 ) - text << LIB_COMPONENT::ReturnSubReference( component->GetUnit() ); + text << LIB_COMPONENT::SubReference( component->GetUnit() ); } match = SCH_ITEM::Matches( text, aSearchData ); @@ -447,7 +447,7 @@ bool SCH_FIELD::Replace( wxFindReplaceData& aSearchData, void* aAuxData ) text = component->GetRef( (SCH_SHEET_PATH*) aAuxData ); // if( component->GetPartCount() > 1 ) - // text << LIB_COMPONENT::ReturnSubReference( component->GetUnit() ); + // text << LIB_COMPONENT::SubReference( component->GetUnit() ); isReplaced = EDA_ITEM::Replace( aSearchData, text ); @@ -588,7 +588,7 @@ void SCH_FIELD::Plot( PLOTTER* aPlotter ) else /* We plot the reference, for a multiple parts per package */ { /* Adding A, B ... to the reference */ - wxString Text = m_Text + LIB_COMPONENT::ReturnSubReference( parent->GetUnit() ); + wxString Text = m_Text + LIB_COMPONENT::SubReference( parent->GetUnit() ); aPlotter->Text( textpos, color, Text, orient, m_Size, hjustify, vjustify, thickness, m_Italic, m_Bold ); diff --git a/eeschema/sch_screen.cpp b/eeschema/sch_screen.cpp index 52d512a78a..86a8ed9727 100644 --- a/eeschema/sch_screen.cpp +++ b/eeschema/sch_screen.cpp @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/eeschema/sch_sheet.cpp b/eeschema/sch_sheet.cpp index dd54465b99..95c268dcaa 100644 --- a/eeschema/sch_sheet.cpp +++ b/eeschema/sch_sheet.cpp @@ -636,9 +636,9 @@ const EDA_RECT SCH_SHEET::GetBoundingBox() const // Determine length of texts wxString text = wxT( "Sheet: " ) + m_name; - int textlen = ReturnGraphicTextWidth( text, m_sheetNameSize, false, lineWidth ); + int textlen = GraphicTextWidth( text, m_sheetNameSize, false, lineWidth ); text = wxT( "File: " ) + m_fileName; - int textlen2 = ReturnGraphicTextWidth( text, m_fileNameSize, false, lineWidth ); + int textlen2 = GraphicTextWidth( text, m_fileNameSize, false, lineWidth ); // Calculate bounding box X size: textlen = std::max( textlen, textlen2 ); diff --git a/eeschema/sch_text.cpp b/eeschema/sch_text.cpp index 90f932cf2d..7893abfa5f 100644 --- a/eeschema/sch_text.cpp +++ b/eeschema/sch_text.cpp @@ -795,7 +795,7 @@ void SCH_TEXT::GetMsgPanelInfo( MSG_PANEL_ITEMS& aList ) } // Display text size (X or Y value, with are the same value in Eeschema) - msg = ReturnStringFromValue( g_UserUnit, m_Size.x, true ); + msg = StringFromValue( g_UserUnit, m_Size.x, true ); aList.push_back( MSG_PANEL_ITEM( _( "Size" ), msg, RED ) ); } diff --git a/eeschema/schedit.cpp b/eeschema/schedit.cpp index 8f3d425bb1..262d20376a 100644 --- a/eeschema/schedit.cpp +++ b/eeschema/schedit.cpp @@ -28,8 +28,9 @@ */ #include +#include #include -#include +#include #include #include #include @@ -294,8 +295,9 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) if( LibEntry && LibEntry->GetDocFileName() != wxEmptyString ) { - GetAssociatedDocument( this, LibEntry->GetDocFileName(), - &wxGetApp().GetLibraryPathList() ); + SEARCH_STACK* lib_search = &Prj().SchSearchS(); + + GetAssociatedDocument( this, LibEntry->GetDocFileName(), lib_search ); } } break; diff --git a/eeschema/schframe.cpp b/eeschema/schframe.cpp index f69760a292..fd948f4d91 100644 --- a/eeschema/schframe.cpp +++ b/eeschema/schframe.cpp @@ -27,7 +27,9 @@ */ #include -#include +#include +#include +#include #include #include #include @@ -173,11 +175,9 @@ END_EVENT_TABLE() #define SCH_EDIT_FRAME_NAME wxT( "SchematicFrame" ) -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 ), +SCH_EDIT_FRAME::SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ): + SCH_BASE_FRAME( aKiway, aParent, SCHEMATIC_FRAME_TYPE, wxT( "Eeschema" ), + wxDefaultPosition, wxDefaultSize, KICAD_DEFAULT_DRAWFRAME_STYLE, SCH_EDIT_FRAME_NAME ), m_item_to_repeat( 0 ) { m_FrameName = SCH_EDIT_FRAME_NAME; @@ -211,8 +211,7 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( wxWindow* aParent, const wxString& aTitle, // Initialize grid id to the default value (50 mils): m_LastGridSizeId = ID_POPUP_GRID_LEVEL_50 - ID_POPUP_GRID_LEVEL_1000; - /* Get config */ - LoadSettings(); + LoadSettings( config() ); SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y ); @@ -440,7 +439,7 @@ void SCH_EDIT_FRAME::OnCloseWindow( wxCloseEvent& aEvent ) if( libeditFrame && !libeditFrame->Close() ) // Can close component editor? return; - LIB_VIEW_FRAME * viewlibFrame = LIB_VIEW_FRAME::GetActiveLibraryViewer();; + LIB_VIEW_FRAME* viewlibFrame = LIB_VIEW_FRAME::GetActiveLibraryViewer( this ); if( viewlibFrame && !viewlibFrame->Close() ) // Can close component viewer? return; @@ -719,12 +718,10 @@ void SCH_EDIT_FRAME::OnFindDialogClose( wxFindDialogEvent& event ) void SCH_EDIT_FRAME::OnLoadFile( wxCommandEvent& event ) { - wxString fn; + wxString fn = GetFileFromHistory( event.GetId(), _( "Schematic" ) ); - fn = GetFileFromHistory( event.GetId(), _( "Schematic" ) ); - - if( fn != wxEmptyString ) - LoadOneEEProject( fn, false ); + if( fn.size() ) + OpenProjectFiles( std::vector( 1, fn ) ); } @@ -737,13 +734,29 @@ void SCH_EDIT_FRAME::OnLoadCmpToFootprintLinkFile( wxCommandEvent& event ) void SCH_EDIT_FRAME::OnNewProject( wxCommandEvent& event ) { - LoadOneEEProject( wxEmptyString, true ); + wxFileDialog dlg( this, _( "Open Schematic" ), wxGetCwd(), + wxEmptyString, SchematicFileWildcard, + wxFD_OPEN | wxFD_FILE_MUST_EXIST ); + + if( dlg.ShowModal() != wxID_CANCEL ) + { + OpenProjectFiles( std::vector( 1, dlg.GetPath() ) ); + } } void SCH_EDIT_FRAME::OnLoadProject( wxCommandEvent& event ) { - LoadOneEEProject( wxEmptyString, false ); + // LoadOneEEProject( wxEmptyString, false ); + + wxFileDialog dlg( this, _( "Open Schematic" ), wxGetCwd(), + wxEmptyString, SchematicFileWildcard, + wxFD_OPEN | wxFD_FILE_MUST_EXIST ); + + if( dlg.ShowModal() != wxID_CANCEL ) + { + OpenProjectFiles( std::vector( 1, dlg.GetPath() ) ); + } } @@ -798,7 +811,7 @@ void SCH_EDIT_FRAME::OnOpenLibraryEditor( wxCommandEvent& event ) component = (SCH_COMPONENT*) item; } - LIB_EDIT_FRAME * libeditFrame = LIB_EDIT_FRAME::GetActiveLibraryEditor();; + LIB_EDIT_FRAME* libeditFrame = LIB_EDIT_FRAME::GetActiveLibraryEditor();; if( libeditFrame ) { if( libeditFrame->IsIconized() ) @@ -808,10 +821,8 @@ void SCH_EDIT_FRAME::OnOpenLibraryEditor( wxCommandEvent& event ) } else { - libeditFrame = new LIB_EDIT_FRAME( this, - wxT( "Library Editor" ), - wxPoint( -1, -1 ), - wxSize( 600, 400 ) ); + wxWindow* w = Kiface().CreateWindow( this, LIBEDITOR_FRAME_TYPE, &Kiway() ); + libeditFrame = dynamic_cast( w ); } if( component ) @@ -851,16 +862,19 @@ void SCH_EDIT_FRAME::OnPrint( wxCommandEvent& event ) fn = g_RootSheet->GetScreen()->GetFileName(); - wxString default_name = NAMELESS_PROJECT; - default_name += wxT( ".sch" ); + wxString default_name = NAMELESS_PROJECT wxT( ".sch" ); if( fn.GetFullName() != default_name ) { fn.SetExt( ProjectFileExtension ); - wxGetApp().WriteProjectConfig( fn.GetFullPath(), GROUP, GetProjectFileParametersList() ); + + // was: wxGetApp().WriteProjectConfig( fn.GetFullPath(), GROUP, GetProjectFileParametersList() ); + Prj().ConfigSave( Kiface().KifaceSearch(), + fn.GetFullPath(), GROUP, GetProjectFileParametersList() ); } } + void SCH_EDIT_FRAME::PrintPage( wxDC* aDC, LAYER_MSK aPrintMask, bool aPrintMirrorMode, void* aData ) { diff --git a/eeschema/selpart.cpp b/eeschema/selpart.cpp index 6368deedc8..22fa518c9b 100644 --- a/eeschema/selpart.cpp +++ b/eeschema/selpart.cpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include diff --git a/eeschema/sheet.cpp b/eeschema/sheet.cpp index ab9730b3ea..3dbb135fc1 100644 --- a/eeschema/sheet.cpp +++ b/eeschema/sheet.cpp @@ -50,10 +50,10 @@ bool SCH_EDIT_FRAME::EditSheet( SCH_SHEET* aSheet, wxDC* aDC ) wxString units = GetUnitsLabel( g_UserUnit ); dlg.SetFileName( aSheet->GetFileName() ); - dlg.SetFileNameTextSize( ReturnStringFromValue( g_UserUnit, aSheet->GetFileNameSize() ) ); + dlg.SetFileNameTextSize( StringFromValue( g_UserUnit, aSheet->GetFileNameSize() ) ); dlg.SetFileNameTextSizeUnits( units ); dlg.SetSheetName( aSheet->GetName() ); - dlg.SetSheetNameTextSize( ReturnStringFromValue( g_UserUnit, aSheet->GetSheetNameSize() ) ); + dlg.SetSheetNameTextSize( StringFromValue( g_UserUnit, aSheet->GetSheetNameSize() ) ); dlg.SetSheetNameTextSizeUnits( units ); dlg.SetSheetTimeStamp( wxString::Format( wxT("%8.8lX"), (unsigned long) aSheet->GetTimeStamp() ) ); @@ -213,9 +213,9 @@ bool SCH_EDIT_FRAME::EditSheet( SCH_SHEET* aSheet, wxDC* aDC ) else if( loadFromFile ) aSheet->Load( this ); - aSheet->SetFileNameSize( ReturnValueFromString( g_UserUnit, dlg.GetFileNameTextSize() ) ); + aSheet->SetFileNameSize( ValueFromString( g_UserUnit, dlg.GetFileNameTextSize() ) ); aSheet->SetName( dlg.GetSheetName() ); - aSheet->SetSheetNameSize( ReturnValueFromString( g_UserUnit, dlg.GetSheetNameTextSize() ) ); + aSheet->SetSheetNameSize( ValueFromString( g_UserUnit, dlg.GetSheetNameTextSize() ) ); if( aSheet->GetName().IsEmpty() ) aSheet->SetName( wxString::Format( wxT( "Sheet%8.8lX" ), aSheet->GetTimeStamp() ) ); diff --git a/eeschema/sheetlab.cpp b/eeschema/sheetlab.cpp index b644e76849..f9043a226d 100644 --- a/eeschema/sheetlab.cpp +++ b/eeschema/sheetlab.cpp @@ -56,9 +56,9 @@ int SCH_EDIT_FRAME::EditSheetPin( SCH_SHEET_PIN* aSheetPin, wxDC* aDC ) DIALOG_SCH_EDIT_SHEET_PIN dlg( this ); dlg.SetLabelName( aSheetPin->GetText() ); - dlg.SetTextHeight( ReturnStringFromValue( g_UserUnit, aSheetPin->GetSize().y ) ); + dlg.SetTextHeight( StringFromValue( g_UserUnit, aSheetPin->GetSize().y ) ); dlg.SetTextHeightUnits( GetUnitsLabel( g_UserUnit ) ); - dlg.SetTextWidth( ReturnStringFromValue( g_UserUnit, aSheetPin->GetSize().x ) ); + dlg.SetTextWidth( StringFromValue( g_UserUnit, aSheetPin->GetSize().x ) ); dlg.SetTextWidthUnits( GetUnitsLabel( g_UserUnit ) ); dlg.SetConnectionType( aSheetPin->GetShape() ); @@ -84,8 +84,8 @@ int SCH_EDIT_FRAME::EditSheetPin( SCH_SHEET_PIN* aSheetPin, wxDC* aDC ) } aSheetPin->SetText( dlg.GetLabelName() ); - aSheetPin->SetSize( wxSize( ReturnValueFromString( g_UserUnit, dlg.GetTextHeight() ), - ReturnValueFromString( g_UserUnit, dlg.GetTextWidth() ) ) ); + aSheetPin->SetSize( wxSize( ValueFromString( g_UserUnit, dlg.GetTextHeight() ), + ValueFromString( g_UserUnit, dlg.GetTextWidth() ) ) ); aSheetPin->SetShape( dlg.GetConnectionType() ); if( aDC ) diff --git a/eeschema/symbdraw.cpp b/eeschema/symbdraw.cpp index 619db5b46b..79d80f3491 100644 --- a/eeschema/symbdraw.cpp +++ b/eeschema/symbdraw.cpp @@ -69,7 +69,7 @@ void LIB_EDIT_FRAME::EditGraphicSymbol( wxDC* DC, LIB_ITEM* DrawItem ) dialog.SetWidthUnits( ReturnUnitSymbol( g_UserUnit ) ); - wxString val = ReturnStringFromValue( g_UserUnit, DrawItem->GetWidth() ); + wxString val = StringFromValue( g_UserUnit, DrawItem->GetWidth() ); dialog.SetWidth( val ); dialog.SetApplyToAllUnits( DrawItem->GetUnit() == 0 ); dialog.EnableApplyToAllUnits( component && component->GetPartCount() > 1 ); @@ -83,7 +83,7 @@ void LIB_EDIT_FRAME::EditGraphicSymbol( wxDC* DC, LIB_ITEM* DrawItem ) // Init default values (used to create a new draw item) val = dialog.GetWidth(); - m_drawLineWidth = ReturnValueFromString( g_UserUnit, val ); + m_drawLineWidth = ValueFromString( g_UserUnit, val ); m_drawSpecificConvert = !dialog.GetApplyToAllConversions(); m_drawSpecificUnit = !dialog.GetApplyToAllUnits(); diff --git a/eeschema/symbedit.cpp b/eeschema/symbedit.cpp index 95309e6757..a5dc98738d 100644 --- a/eeschema/symbedit.cpp +++ b/eeschema/symbedit.cpp @@ -29,7 +29,8 @@ */ #include -#include +#include +#include #include #include #include @@ -54,9 +55,12 @@ void LIB_EDIT_FRAME::LoadOneSymbol() if( m_component == NULL || ( m_drawItem && m_drawItem->GetFlags() ) ) return; + PROJECT& prj = Prj(); + SEARCH_STACK& search = prj.SchSearchS(); + m_canvas->SetIgnoreMouseEvents( true ); - wxString default_path = wxGetApp().ReturnLastVisitedLibraryPath(); + wxString default_path = prj.RPath(PROJECT::SCH_LIB).LastVisitedPath( search ); wxFileDialog dlg( this, _( "Import Symbol Drawings" ), default_path, wxEmptyString, SchematicSymbolFileWildcard, @@ -70,13 +74,14 @@ void LIB_EDIT_FRAME::LoadOneSymbol() m_canvas->SetIgnoreMouseEvents( false ); wxFileName fn = dlg.GetPath(); - wxGetApp().SaveLastVisitedLibraryPath( fn.GetPath() ); + + prj.RPath(PROJECT::SCH_LIB).SaveLastVisitedPath( fn.GetPath() ); Lib = new CMP_LIBRARY( LIBRARY_TYPE_SYMBOL, fn ); if( !Lib->Load( err ) ) { - msg.Printf( _( "Error <%s> occurred loading symbol library <%s>." ), + msg.Printf( _( "Error '%s' occurred loading symbol library '%s'." ), GetChars( err ), GetChars( fn.GetName() ) ); DisplayError( this, msg ); delete Lib; @@ -85,7 +90,7 @@ void LIB_EDIT_FRAME::LoadOneSymbol() if( Lib->IsEmpty() ) { - msg.Printf( _( "No components found in symbol library <%s>." ), + msg.Printf( _( "No components found in symbol library '%s'." ), GetChars( fn.GetName() ) ); delete Lib; return; @@ -93,7 +98,7 @@ void LIB_EDIT_FRAME::LoadOneSymbol() if( Lib->GetCount() > 1 ) { - msg.Printf( _( "More than one part in symbol file <%s>." ), + msg.Printf( _( "More than one part in symbol file '%s'." ), GetChars( fn.GetName() ) ); wxMessageBox( msg, _( "Warning" ), wxOK | wxICON_EXCLAMATION, this ); } @@ -131,12 +136,14 @@ void LIB_EDIT_FRAME::LoadOneSymbol() void LIB_EDIT_FRAME::SaveOneSymbol() { - wxString msg; + wxString msg; + PROJECT& prj = Prj(); + SEARCH_STACK& search = prj.SchSearchS(); if( m_component->GetDrawItemList().empty() ) return; - wxString default_path = wxGetApp().ReturnLastVisitedLibraryPath(); + wxString default_path = prj.RPath(PROJECT::SCH_LIB).LastVisitedPath( search ); wxFileDialog dlg( this, _( "Export Symbol Drawings" ), default_path, m_component->GetName(), SchematicSymbolFileWildcard, @@ -152,9 +159,9 @@ void LIB_EDIT_FRAME::SaveOneSymbol() if( fn.GetExt().IsEmpty() ) fn.SetExt( SchematicSymbolFileExtension ); - wxGetApp().SaveLastVisitedLibraryPath( fn.GetPath() ); + prj.RPath(PROJECT::SCH_LIB).SaveLastVisitedPath( fn.GetPath() ); - msg.Printf( _( "Saving symbol in <%s>" ), GetChars( fn.GetPath() ) ); + msg.Printf( _( "Saving symbol in '%s'" ), GetChars( fn.GetPath() ) ); SetStatusText( msg ); wxString line; @@ -220,7 +227,7 @@ void LIB_EDIT_FRAME::SaveOneSymbol() } catch( IO_ERROR ioe ) { - msg.Printf( _( "An error occurred attempting to save symbol file <%s>" ), + msg.Printf( _( "An error occurred attempting to save symbol file '%s'" ), GetChars( fn.GetFullPath() ) ); DisplayError( this, msg ); } diff --git a/eeschema/viewlib_frame.cpp b/eeschema/viewlib_frame.cpp index c1b421e76e..76de412c02 100644 --- a/eeschema/viewlib_frame.cpp +++ b/eeschema/viewlib_frame.cpp @@ -28,7 +28,8 @@ */ #include -#include +#include +#include #include #include #include @@ -94,10 +95,10 @@ static wxAcceleratorEntry accels[] = #define ACCEL_TABLE_CNT ( sizeof( accels ) / sizeof( wxAcceleratorEntry ) ) #define LIB_VIEW_FRAME_NAME wxT( "ViewlibFrame" ) -LIB_VIEW_FRAME::LIB_VIEW_FRAME( SCH_BASE_FRAME* aParent, CMP_LIBRARY* aLibrary, - wxSemaphore* aSemaphore, long aStyle ) : - SCH_BASE_FRAME( aParent, VIEWER_FRAME_TYPE, _( "Library Browser" ), - wxDefaultPosition, wxDefaultSize, aStyle, GetLibViewerFrameName() ) +LIB_VIEW_FRAME::LIB_VIEW_FRAME( KIWAY* aKiway, SCH_BASE_FRAME* aParent, + CMP_LIBRARY* aLibrary, wxSemaphore* aSemaphore, long aStyle ) : + SCH_BASE_FRAME( aKiway, aParent, VIEWER_FRAME_TYPE, _( "Library Browser" ), + wxDefaultPosition, wxDefaultSize, aStyle, GetLibViewerFrameName() ) { wxAcceleratorTable table( ACCEL_TABLE_CNT, accels ); @@ -122,7 +123,7 @@ LIB_VIEW_FRAME::LIB_VIEW_FRAME( SCH_BASE_FRAME* aParent, CMP_LIBRARY* aLibrary, SetScreen( new SCH_SCREEN() ); GetScreen()->m_Center = true; // Axis origin centered on screen. - LoadSettings(); + LoadSettings( config() ); SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y ); @@ -242,9 +243,9 @@ const wxChar* LIB_VIEW_FRAME::GetLibViewerFrameName() } -LIB_VIEW_FRAME* LIB_VIEW_FRAME::GetActiveLibraryViewer() +LIB_VIEW_FRAME* LIB_VIEW_FRAME::GetActiveLibraryViewer( const wxWindow* aParent ) { - return (LIB_VIEW_FRAME*) wxWindow::FindWindowByName(GetLibViewerFrameName()); + return (LIB_VIEW_FRAME*) wxWindow::FindWindowByName( GetLibViewerFrameName(), aParent ); } @@ -467,17 +468,14 @@ void LIB_VIEW_FRAME::ExportToSchematicLibraryPart( wxCommandEvent& event ) #define CMPLIST_WIDTH_KEY wxT( "ViewCmplistWidth" ) -void LIB_VIEW_FRAME::LoadSettings( ) +void LIB_VIEW_FRAME::LoadSettings( wxConfigBase* aCfg ) { - wxConfig* cfg ; + EDA_DRAW_FRAME::LoadSettings( aCfg ); - EDA_DRAW_FRAME::LoadSettings(); + wxConfigPathChanger cpc( aCfg, m_configPath ); - wxConfigPathChanger cpc( wxGetApp().GetSettings(), m_configPath ); - cfg = wxGetApp().GetSettings(); - - cfg->Read( LIBLIST_WIDTH_KEY, &m_libListWidth, 100 ); - cfg->Read( CMPLIST_WIDTH_KEY, &m_cmpListWidth, 100 ); + aCfg->Read( LIBLIST_WIDTH_KEY, &m_libListWidth, 100 ); + aCfg->Read( CMPLIST_WIDTH_KEY, &m_cmpListWidth, 100 ); // Set parameters to a reasonable value. if ( m_libListWidth > m_FrameSize.x/2 ) @@ -488,23 +486,20 @@ void LIB_VIEW_FRAME::LoadSettings( ) } -void LIB_VIEW_FRAME::SaveSettings() +void LIB_VIEW_FRAME::SaveSettings( wxConfigBase* aCfg ) { - wxConfig* cfg; + EDA_DRAW_FRAME::SaveSettings( aCfg ); - EDA_DRAW_FRAME::SaveSettings(); + wxConfigPathChanger cpc( aCfg, m_configPath ); - wxConfigPathChanger cpc( wxGetApp().GetSettings(), m_configPath ); - cfg = wxGetApp().GetSettings(); - - if( m_libListWidth && m_libList) + if( m_libListWidth && m_libList ) { m_libListWidth = m_libList->GetSize().x; - cfg->Write( LIBLIST_WIDTH_KEY, m_libListWidth ); + aCfg->Write( LIBLIST_WIDTH_KEY, m_libListWidth ); } m_cmpListWidth = m_cmpList->GetSize().x; - cfg->Write( CMPLIST_WIDTH_KEY, m_cmpListWidth ); + aCfg->Write( CMPLIST_WIDTH_KEY, m_cmpListWidth ); } diff --git a/eeschema/viewlib_frame.h b/eeschema/viewlib_frame.h index 7449dbfd1a..4b5e6827a3 100644 --- a/eeschema/viewlib_frame.h +++ b/eeschema/viewlib_frame.h @@ -71,9 +71,9 @@ protected: static int m_convert; public: - LIB_VIEW_FRAME( SCH_BASE_FRAME* aParent, CMP_LIBRARY* aLibrary = NULL, - wxSemaphore* aSemaphore = NULL, - long aStyle = KICAD_DEFAULT_DRAWFRAME_STYLE ); + LIB_VIEW_FRAME( KIWAY* aKiway, SCH_BASE_FRAME* aParent, + CMP_LIBRARY* aLibrary = NULL, wxSemaphore* aSemaphore = NULL, + long aStyle = KICAD_DEFAULT_DRAWFRAME_STYLE ); ~LIB_VIEW_FRAME(); @@ -89,7 +89,7 @@ public: * @return a reference to the current opened Library viewer * or NULL if no Library viewer currently opened */ - static LIB_VIEW_FRAME* GetActiveLibraryViewer(); + static LIB_VIEW_FRAME* GetActiveLibraryViewer( const wxWindow* aParent ); void OnSize( wxSizeEvent& event ); @@ -116,23 +116,8 @@ public: void GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aHotKey = 0 ); - /** - * Function LoadSettings - * loads the library viewer frame specific configuration settings. - * - * Don't forget to call this base method from any derived classes or the - * settings will not get loaded. - */ - void LoadSettings(); - - /** - * Function SaveSettings - * save library viewer frame specific configuration settings. - * - * Don't forget to call this base method from any derived classes or the - * settings will not get saved. - */ - void SaveSettings(); + void LoadSettings( wxConfigBase* aCfg ); + void SaveSettings( wxConfigBase* aCfg ); wxString& GetEntryName( void ) const { return m_entryName; } wxString& GetSelectedComponent( void ) const { return m_exportToEeschemaCmpName; } diff --git a/eeschema/viewlibs.cpp b/eeschema/viewlibs.cpp index 289b37a1d9..15e76c8941 100644 --- a/eeschema/viewlibs.cpp +++ b/eeschema/viewlibs.cpp @@ -3,8 +3,9 @@ */ #include +#include #include -#include +#include #include #include #include @@ -51,8 +52,11 @@ void LIB_VIEW_FRAME::Process_Special_Functions( wxCommandEvent& event ) LibEntry = CMP_LIBRARY::FindLibraryEntry( m_entryName, m_libraryName ); if( LibEntry && ( !LibEntry->GetDocFileName().IsEmpty() ) ) - GetAssociatedDocument( this, LibEntry->GetDocFileName(), - &wxGetApp().GetLibraryPathList() ); + { + SEARCH_STACK& lib_search = Prj().SchSearchS(); + + GetAssociatedDocument( this, LibEntry->GetDocFileName(), &lib_search ); + } break; case ID_LIBVIEW_DE_MORGAN_NORMAL_BUTT: diff --git a/gerbview/CMakeLists.txt b/gerbview/CMakeLists.txt index c34b979deb..124a8d0c56 100644 --- a/gerbview/CMakeLists.txt +++ b/gerbview/CMakeLists.txt @@ -1,10 +1,8 @@ +set( MAKE_LINK_MAPS true ) + add_definitions(-DGERBVIEW) -### -# Includes -### - -include_directories(BEFORE ${INC_BEFORE}) +include_directories( BEFORE ${INC_BEFORE} ) include_directories( ../pcbnew dialogs @@ -14,11 +12,7 @@ include_directories( ) -### -# Sources -### - -set(DIALOGS_SRCS +set( DIALOGS_SRCS dialogs/gerbview_dialog_display_options_frame_base.cpp dialogs/gerbview_dialog_display_options_frame.cpp dialogs/dialog_layers_select_to_pcb_base.cpp @@ -29,7 +23,7 @@ set(DIALOGS_SRCS dialogs/dialog_show_page_borders_base.cpp ) -set(GERBVIEW_SRCS +set( GERBVIEW_SRCS block.cpp class_am_param.cpp class_aperture_macro.cpp @@ -47,7 +41,6 @@ set(GERBVIEW_SRCS excellon_read_drill_file.cpp export_to_pcbnew.cpp files.cpp - gerbview.cpp gerbview_config.cpp gerbview_frame.cpp hotkeys.cpp @@ -65,10 +58,7 @@ set(GERBVIEW_SRCS toolbars_gerber.cpp ) -### -# We need some extra sources from common and pcbnew -### -set(GERBVIEW_EXTRA_SRCS +set( GERBVIEW_EXTRA_SRCS ../common/base_screen.cpp ../common/base_units.cpp ../common/eda_text.cpp @@ -78,58 +68,115 @@ set(GERBVIEW_EXTRA_SRCS ../pcbnew/printout_controler.cpp ) -### -# Windows resource file -### -if(WIN32) - if(MINGW) - # GERBVIEW_RESOURCES variable is set by the macro. - mingw_resource_compiler(gerbview) - else(MINGW) - set(GERBVIEW_RESOURCES gerbview.rc) - endif(MINGW) -endif(WIN32) +if( MINGW ) + # GERBVIEW_RESOURCES variable is set by the macro. + mingw_resource_compiler( gerbview ) +endif() -### -# Apple resource files -### -if(APPLE) + +if( APPLE ) set(GERBVIEW_RESOURCES gerbview.icns gerbview_doc.icns) - set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/gerbview.icns" - PROPERTIES MACOSX_PACKAGE_LOCATION Resources) - set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/gerbview_doc.icns" - PROPERTIES MACOSX_PACKAGE_LOCATION Resources) - set(MACOSX_BUNDLE_ICON_FILE gerbview.icns) - set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.gerbview) -endif(APPLE) + set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/gerbview.icns" PROPERTIES + MACOSX_PACKAGE_LOCATION Resources + ) + set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/gerbview_doc.icns" PROPERTIES + MACOSX_PACKAGE_LOCATION Resources + ) + set( MACOSX_BUNDLE_ICON_FILE gerbview.icns ) + set( MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.gerbview ) +endif() -### -# Create the gerbview executable -### -add_executable(gerbview WIN32 MACOSX_BUNDLE - ${GERBVIEW_SRCS} - ${DIALOGS_SRCS} - ${GERBVIEW_EXTRA_SRCS} - ${GERBVIEW_RESOURCES}) +if( USE_KIWAY_DLLS ) -### -# Set properties for APPLE on gerbview target -### -if(APPLE) - set_target_properties(gerbview PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist) -endif(APPLE) + add_executable( gerbview WIN32 MACOSX_BUNDLE + ../common/single_top.cpp + ../common/pgm_base.cpp + ) + set_source_files_properties( ../common/single_top.cpp PROPERTIES + COMPILE_DEFINITIONS "TOP_FRAME=GERBER_FRAME_TYPE;BUILD_KIWAY_DLL" + ) + target_link_libraries( gerbview + #singletop # replaces common, giving us restrictive control and link warnings. + # There's way too much crap coming in from common yet. + common + bitmaps + ${wxWidgets_LIBRARIES} + ) + if( MAKE_LINK_MAPS ) + set_target_properties( gerbview PROPERTIES + LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=gerbview.map" ) + endif() -### -# Link executable target gerbview with correct libraries -### -target_link_libraries(gerbview common polygon bitmaps - ${OPENGL_LIBRARIES} - ${wxWidgets_LIBRARIES} - ${GDI_PLUS_LIBRARIES}) + # the main gerbview program, in DSO form. + add_library( gerbview_kiface MODULE + gerbview.cpp + ${GERBVIEW_SRCS} + ${DIALOGS_SRCS} + ${GERBVIEW_EXTRA_SRCS} + ${GERBVIEW_RESOURCES} + ) + set_target_properties( gerbview_kiface PROPERTIES + OUTPUT_NAME gerbview + PREFIX ${KIFACE_PREFIX} + SUFFIX ${KIFACE_SUFFIX} + ) + target_link_libraries( gerbview_kiface + common + polygon + bitmaps + ${OPENGL_LIBRARIES} + ${wxWidgets_LIBRARIES} + ${GDI_PLUS_LIBRARIES} + ) + set_source_files_properties( gerbview.cpp PROPERTIES + # The KIFACE is in gerbview.cpp, export it: + COMPILE_DEFINITIONS "BUILD_KIWAY_DLL;COMPILING_DLL" + ) + if( MAKE_LINK_MAPS ) + set_target_properties( gerbview_kiface PROPERTIES + LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=_gerbview.kiface.map" ) + endif() -### -# Add gerbview as install target -### -install(TARGETS gerbview + # if building gerbview, then also build gerbview_kiface if out of date. + add_dependencies( gerbview gerbview_kiface ) + + # these 2 binaries are a matched set, keep them together + install( TARGETS gerbview DESTINATION ${KICAD_BIN} - COMPONENT binary) + COMPONENT binary + ) + install( TARGETS gerbview_kiface + DESTINATION ${KICAD_BIN} + COMPONENT binary + ) + +else() + + add_executable( gerbview WIN32 MACOSX_BUNDLE + gerbview.cpp + ${GERBVIEW_SRCS} + ${DIALOGS_SRCS} + ${GERBVIEW_EXTRA_SRCS} + ${GERBVIEW_RESOURCES} + ) + target_link_libraries( gerbview + common + polygon + bitmaps + ${OPENGL_LIBRARIES} + ${wxWidgets_LIBRARIES} + ${GDI_PLUS_LIBRARIES} + ) + install( TARGETS gerbview + DESTINATION ${KICAD_BIN} + COMPONENT binary + ) + +endif() + +if( APPLE ) + set_target_properties( gerbview PROPERTIES + MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist) +endif() + + diff --git a/gerbview/block.cpp b/gerbview/block.cpp index d973ac9a03..912113538a 100644 --- a/gerbview/block.cpp +++ b/gerbview/block.cpp @@ -46,7 +46,7 @@ static void DrawMovingBlockOutlines( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wx bool erase ); -int GERBVIEW_FRAME::ReturnBlockCommand( int key ) +int GERBVIEW_FRAME::BlockCommand( int key ) { int cmd = 0; diff --git a/gerbview/class_DCodeSelectionbox.cpp b/gerbview/class_DCodeSelectionbox.cpp index 32969313f6..84cf9cdc54 100644 --- a/gerbview/class_DCodeSelectionbox.cpp +++ b/gerbview/class_DCodeSelectionbox.cpp @@ -3,7 +3,7 @@ /*****************************************************************/ #include -#include +#include #include #include #include diff --git a/gerbview/class_GERBER.cpp b/gerbview/class_GERBER.cpp index 9d7b7302ea..5ae04d5083 100644 --- a/gerbview/class_GERBER.cpp +++ b/gerbview/class_GERBER.cpp @@ -225,7 +225,7 @@ bool GERBER_IMAGE::HasNegativeItems() return m_hasNegativeItems == 1; } -int GERBER_IMAGE::ReturnUsedDcodeNumber() +int GERBER_IMAGE::UsedDcodeNumber() { int count = 0; diff --git a/gerbview/class_GERBER.h b/gerbview/class_GERBER.h index 19fba78fd0..632ac6487c 100644 --- a/gerbview/class_GERBER.h +++ b/gerbview/class_GERBER.h @@ -141,7 +141,7 @@ public: GERBER_IMAGE( GERBVIEW_FRAME* aParent, int layer ); virtual ~GERBER_IMAGE(); void Clear_GERBER_IMAGE(); - int ReturnUsedDcodeNumber(); + int UsedDcodeNumber(); virtual void ResetDefaultValues(); /** @@ -211,8 +211,8 @@ public: wxPoint ReadIJCoord( char*& Text ); // functions to read G commands or D commands: - int ReturnGCodeNumber( char*& Text ); - int ReturnDCodeNumber( char*& Text ); + int GCodeNumber( char*& Text ); + int DCodeNumber( char*& Text ); // functions to execute G commands or D commands: bool Execute_G_Command( char*& text, int G_command ); diff --git a/gerbview/class_excellon.h b/gerbview/class_excellon.h index 86c9f356ca..07d2800b0d 100644 --- a/gerbview/class_excellon.h +++ b/gerbview/class_excellon.h @@ -101,9 +101,9 @@ private: bool Execute_EXCELLON_G_Command( char*& text ); bool Execute_Drill_Command( char*& text ); - int ReturnTCodeNumber( char*& Text ) + int TCodeNumber( char*& Text ) { - return ReturnDCodeNumber( Text ); + return DCodeNumber( Text ); } diff --git a/gerbview/dialogs/dialog_print_using_printer.cpp b/gerbview/dialogs/dialog_print_using_printer.cpp index da67c4989b..3f9f338416 100644 --- a/gerbview/dialogs/dialog_print_using_printer.cpp +++ b/gerbview/dialogs/dialog_print_using_printer.cpp @@ -6,7 +6,8 @@ #define wxTEST_POSTSCRIPT_IN_MSW 1 #include -#include +//#include +#include #include #include #include @@ -40,7 +41,7 @@ class DIALOG_PRINT_USING_PRINTER : public DIALOG_PRINT_USING_PRINTER_BASE { private: GERBVIEW_FRAME* m_Parent; - wxConfig* m_Config; + wxConfigBase* m_Config; wxCheckBox* m_BoxSelectLayer[32]; public: @@ -100,7 +101,7 @@ DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER( GERBVIEW_FRAME* parent ) /*************************************************************************************/ { m_Parent = parent; - m_Config = wxGetApp().GetSettings(); + m_Config = Kiface().KifaceSettings(); InitValues( ); GetSizer()->SetSizeHints( this ); diff --git a/gerbview/events_called_functions.cpp b/gerbview/events_called_functions.cpp index 6efd44786d..a1021c1fab 100644 --- a/gerbview/events_called_functions.cpp +++ b/gerbview/events_called_functions.cpp @@ -4,7 +4,7 @@ */ #include -#include +#include #include #include #include @@ -256,7 +256,7 @@ void GERBVIEW_FRAME::OnShowGerberSourceFile( wxCommandEvent& event ) if( gerber_layer ) { - wxString editorname = wxGetApp().GetEditorName(); + wxString editorname = Pgm().GetEditorName(); if( !editorname.IsEmpty() ) { wxFileName fn( gerber_layer->m_FileName ); diff --git a/gerbview/excellon_read_drill_file.cpp b/gerbview/excellon_read_drill_file.cpp index a16843f1f0..952d89c8d3 100644 --- a/gerbview/excellon_read_drill_file.cpp +++ b/gerbview/excellon_read_drill_file.cpp @@ -543,7 +543,7 @@ bool EXCELLON_IMAGE::Execute_Drill_Command( char*& text ) bool EXCELLON_IMAGE::Select_Tool( char*& text ) { - int tool_id = ReturnTCodeNumber( text ); + int tool_id = TCodeNumber( text ); if( tool_id >= 0 ) { diff --git a/gerbview/gerbview.cpp b/gerbview/gerbview.cpp index b1537bb0d1..4e52f3937a 100644 --- a/gerbview/gerbview.cpp +++ b/gerbview/gerbview.cpp @@ -27,7 +27,8 @@ */ #include -#include +#include +#include #include #include #include @@ -62,83 +63,103 @@ const wxChar* g_GerberPageSizeList[] = { GERBER_IMAGE* g_GERBER_List[32]; -IMPLEMENT_APP( EDA_APP ) +namespace GERBV { -/* MacOSX: Needed for file association - * http://wiki.wxwidgets.org/WxMac-specific_topics - */ -void EDA_APP::MacOpenFile( const wxString& aFileName ) +static struct IFACE : public KIFACE_I { - wxFileName filename = aFileName; - GERBVIEW_FRAME * frame = ((GERBVIEW_FRAME*)GetTopWindow()); + // Of course all are virtual overloads, implementations of the KIFACE. - if( !filename.FileExists() ) - return; + IFACE( const char* aName, KIWAY::FACE_T aType ) : + KIFACE_I( aName, aType ) + {} - frame->LoadGerberFiles( aFileName ); + bool OnKifaceStart( PGM_BASE* aProgram ); + + void OnKifaceEnd(); + + wxWindow* CreateWindow( wxWindow* aParent, int aClassId, KIWAY* aKiway, int aCtlBits = 0 ) + { + switch( aClassId ) + { + case GERBER_FRAME_TYPE: + { + GERBVIEW_FRAME* frame = new GERBVIEW_FRAME( aKiway, aParent ); + + /* Is this really needed since at this point there is no open file? + frame->Zoom_Automatique( true ); // Zoom fit in frame + + if so, why is the constructor not doing it? + */ + + return frame; + } + break; + + default: + ; + } + + return NULL; + } + + /** + * Function IfaceOrAddress + * return a pointer to the requested object. The safest way to use this + * is to retrieve a pointer to a static instance of an interface, similar to + * how the KIFACE interface is exported. But if you know what you are doing + * use it to retrieve anything you want. + * + * @param aDataId identifies which object you want the address of. + * + * @return void* - and must be cast into the know type. + */ + void* IfaceOrAddress( int aDataId ) + { + return NULL; + } + +} kiface( "gerbview", KIWAY::FACE_GERBVIEW ); + +} // namespace + +using namespace GERBV; + +static PGM_BASE* process; + +KIFACE_I& Kiface() { return kiface; } + + +// KIFACE_GETTER's actual spelling is a substitution macro found in kiway.h. +// KIFACE_GETTER will not have name mangling due to declaration in kiway.h. +MY_API( KIFACE* ) KIFACE_GETTER( int* aKIFACEversion, int aKiwayVersion, PGM_BASE* aProgram ) +{ + process = (PGM_BASE*) aProgram; + return &kiface; } -bool EDA_APP::OnInit() +PGM_BASE& Pgm() { - wxFileName fn; - GERBVIEW_FRAME* frame = NULL; + wxASSERT( process ); // KIFACE_GETTER has already been called. + return *process; +} - InitEDA_Appl( wxT( "GerbView" ), APP_GERBVIEW_T ); - if( m_Checker && m_Checker->IsAnotherRunning() ) - { - if( !IsOK( NULL, _( "GerbView is already running. Continue?" ) ) ) - return false; - } +bool IFACE::OnKifaceStart( PGM_BASE* aProgram ) +{ + start_common(); - // read current setup and reopen last directory if no filename to open in - // command line - bool reopenLastUsedDirectory = argc == 1; - GetSettings( reopenLastUsedDirectory ); + // Must be called before creating the main frame in order to + // display the real hotkeys in menus or tool tips + ReadHotkeyConfig( wxT("GerberFrame"), s_Gerbview_Hokeys_Descr ); g_DrawBgColor = BLACK; - /* Must be called before creating the main frame in order to - * display the real hotkeys in menus or tool tips */ - ReadHotkeyConfig( wxT("GerberFrame"), s_Gerbview_Hokeys_Descr ); - - frame = new GERBVIEW_FRAME( NULL, wxT( "GerbView" ), wxPoint( 0, 0 ), wxSize( 600, 400 ) ); - - /* Gerbview mainframe title */ - frame->SetTitle( GetTitle() + wxT( " " ) + GetBuildVersion() ); - - SetTopWindow( frame ); // Set GerbView mainframe on top - frame->Show( true ); // Show GerbView mainframe - frame->Zoom_Automatique( true ); // Zoom fit in frame - frame->GetScreen()->m_FirstRedraw = false; - - - if( argc <= 1 ) - return true; - - fn = argv[1]; - - if( fn.IsOk() ) - { - if( fn.DirExists() ) - wxSetWorkingDirectory( fn.GetPath() ); - - // Load all files specified on the command line. - LAYER_NUM jj = FIRST_LAYER; - - for( LAYER_NUM ii = LAYER_N_2; ii < argc && ii <= NB_GERBER_LAYERS; ++ii ) - { - fn = wxFileName( argv[ii] ); - - if( fn.FileExists() ) - { - frame->setActiveLayer( jj ); - ++jj; - frame->LoadGerberFiles( fn.GetFullPath() ); - } - } - } - return true; } + + +void IFACE::OnKifaceEnd() +{ + end_common(); +} diff --git a/gerbview/gerbview_config.cpp b/gerbview/gerbview_config.cpp index f3a06de0b2..db1ed29f3e 100644 --- a/gerbview/gerbview_config.cpp +++ b/gerbview/gerbview_config.cpp @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include diff --git a/gerbview/gerbview_frame.cpp b/gerbview/gerbview_frame.cpp index 62fdf0c130..1e2b073e8d 100644 --- a/gerbview/gerbview_frame.cpp +++ b/gerbview/gerbview_frame.cpp @@ -27,7 +27,8 @@ */ #include -#include +//#include +#include #include #include #include @@ -63,11 +64,9 @@ static const wxString cfgShowBorderAndTitleBlock( wxT( "ShowBorderAndTitleBloc #define GERBVIEW_FRAME_NAME wxT( "GerberFrame" ) -GERBVIEW_FRAME::GERBVIEW_FRAME( wxWindow* aParent, const wxString& aTitle, - const wxPoint& aPosition, const wxSize& aSize, - long aStyle ) : - EDA_DRAW_FRAME( aParent, GERBER_FRAME_TYPE, aTitle, aPosition, aSize, - aStyle, GERBVIEW_FRAME_NAME ) +GERBVIEW_FRAME::GERBVIEW_FRAME( KIWAY* aKiway, wxWindow* aParent ): + EDA_DRAW_FRAME( aKiway, aParent, GERBER_FRAME_TYPE, wxT( "GerbView" ), + wxDefaultPosition, wxDefaultSize, KICAD_DEFAULT_DRAWFRAME_STYLE, GERBVIEW_FRAME_NAME ) { m_colorsSettings = &g_ColorsSettings; m_gerberLayout = NULL; @@ -109,7 +108,8 @@ GERBVIEW_FRAME::GERBVIEW_FRAME( wxWindow* aParent, const wxString& aTitle, // LoadSettings() *after* creating m_LayersManager, because LoadSettings() // initialize parameters in m_LayersManager - LoadSettings(); + LoadSettings( config() ); + SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y ); if( m_LastGridSizeId < 0 ) @@ -171,7 +171,6 @@ GERBVIEW_FRAME::GERBVIEW_FRAME( wxWindow* aParent, const wxString& aTitle, GERBVIEW_FRAME::~GERBVIEW_FRAME() { - wxGetApp().SaveCurrentSetupValues( m_configSettings ); } @@ -181,6 +180,26 @@ void GERBVIEW_FRAME::OnCloseWindow( wxCloseEvent& Event ) } +bool GERBVIEW_FRAME::OpenProjectFiles( const std::vector& aFileSet, int aCtl ) +{ + const unsigned limit = std::min( unsigned( aFileSet.size() ), unsigned( NB_GERBER_LAYERS ) ); + + LAYER_NUM layer = FIRST_LAYER; + + for( unsigned i=0; im_Drawings; @@ -202,26 +221,22 @@ double GERBVIEW_FRAME::BestZoom() } -void GERBVIEW_FRAME::LoadSettings() +void GERBVIEW_FRAME::LoadSettings( wxConfigBase* aCfg ) { - wxConfig* config = wxGetApp().GetSettings(); + EDA_DRAW_FRAME::LoadSettings( aCfg ); - if( config == NULL ) - return; - - EDA_DRAW_FRAME::LoadSettings(); - - wxGetApp().ReadCurrentSetupValues( GetConfigurationSettings() ); + // was: wxGetApp().ReadCurrentSetupValues( GetConfigurationSettings() ); + wxConfigLoadSetups( aCfg, GetConfigurationSettings() ); PAGE_INFO pageInfo( wxT( "GERBER" ) ); - config->Read( cfgShowBorderAndTitleBlock, &m_showBorderAndTitleBlock, false ); + aCfg->Read( cfgShowBorderAndTitleBlock, &m_showBorderAndTitleBlock, false ); if( m_showBorderAndTitleBlock ) { wxString pageType; - config->Read( cfgShowPageSizeOption, &pageType, wxT( "GERBER" ) ); + aCfg->Read( cfgShowPageSizeOption, &pageType, wxT( "GERBER" ) ); pageInfo.SetType( pageType ); } @@ -231,16 +246,16 @@ void GERBVIEW_FRAME::LoadSettings() GetScreen()->InitDataPoints( pageInfo.GetSizeIU() ); bool tmp; - config->Read( cfgShowDCodes, &tmp, true ); + aCfg->Read( cfgShowDCodes, &tmp, true ); SetElementVisibility( DCODES_VISIBLE, tmp ); - config->Read( cfgShowNegativeObjects, &tmp, false ); + aCfg->Read( cfgShowNegativeObjects, &tmp, false ); SetElementVisibility( NEGATIVE_OBJECTS_VISIBLE, tmp ); // because we have 2 file historues, we must read this one // using a specific path - config->SetPath( wxT( "drl_files" ) ); - m_drillFileHistory.Load( *config ); - config->SetPath( wxT( ".." ) ); + aCfg->SetPath( wxT( "drl_files" ) ); + m_drillFileHistory.Load( *aCfg ); + aCfg->SetPath( wxT( ".." ) ); // WxWidgets 2.9.1 seems call setlocale( LC_NUMERIC, "" ) // when reading doubles in config, @@ -249,29 +264,25 @@ void GERBVIEW_FRAME::LoadSettings() } -void GERBVIEW_FRAME::SaveSettings() +void GERBVIEW_FRAME::SaveSettings( wxConfigBase* aCfg ) { - wxConfig* config = wxGetApp().GetSettings(); + EDA_DRAW_FRAME::SaveSettings( aCfg ); - if( config == NULL ) - return; + // was: wxGetApp().SaveCurrentSetupValues( GetConfigurationSettings() ); + wxConfigSaveSetups( aCfg, GetConfigurationSettings() ); - EDA_DRAW_FRAME::SaveSettings(); - - wxGetApp().SaveCurrentSetupValues( GetConfigurationSettings() ); - - config->Write( cfgShowPageSizeOption, GetPageSettings().GetType() ); - config->Write( cfgShowBorderAndTitleBlock, m_showBorderAndTitleBlock ); - config->Write( cfgShowDCodes, IsElementVisible( DCODES_VISIBLE ) ); - config->Write( cfgShowNegativeObjects, + aCfg->Write( cfgShowPageSizeOption, GetPageSettings().GetType() ); + aCfg->Write( cfgShowBorderAndTitleBlock, m_showBorderAndTitleBlock ); + aCfg->Write( cfgShowDCodes, IsElementVisible( DCODES_VISIBLE ) ); + aCfg->Write( cfgShowNegativeObjects, IsElementVisible( NEGATIVE_OBJECTS_VISIBLE ) ); // Save the drill file history list. // Because we have 2 file histories, we must save this one // in a specific path - config->SetPath( wxT( "drl_files" ) ); - m_drillFileHistory.Save( *config ); - config->SetPath( wxT( ".." ) ); + aCfg->SetPath( wxT( "drl_files" ) ); + m_drillFileHistory.Save( *aCfg ); + aCfg->SetPath( wxT( ".." ) ); } @@ -394,7 +405,7 @@ void GERBVIEW_FRAME::Liste_D_Codes() if( gerber == NULL ) continue; - if( gerber->ReturnUsedDcodeNumber() == 0 ) + if( gerber->UsedDcodeNumber() == 0 ) continue; if( layer == curr_layer ) diff --git a/gerbview/gerbview_frame.h b/gerbview/gerbview_frame.h index 6a69191706..b97a90561f 100644 --- a/gerbview/gerbview_frame.h +++ b/gerbview/gerbview_frame.h @@ -31,8 +31,8 @@ #define WX_GERBER_STRUCT_H -#include -#include +#include +#include #include #include @@ -201,15 +201,15 @@ private: // An array sting to store warning messages when reaging a gerber file. wxArrayString m_Messages; -public: - GERBVIEW_FRAME( wxWindow* aParent, const wxString& aTitle, - const wxPoint& aPosition, const wxSize& aSize, - long aStyle = KICAD_DEFAULT_DRAWFRAME_STYLE ); +public: + GERBVIEW_FRAME( KIWAY* aKiway, wxWindow* aParent ); ~GERBVIEW_FRAME(); void OnCloseWindow( wxCloseEvent& Event ); + bool OpenProjectFiles( const std::vector& aFileSet, int aCtl ); // overload KIWAY_PLAYER + // Virtual basic functions: void RedrawActiveWindow( wxDC* DC, bool EraseBg ); void ReCreateHToolbar(); @@ -458,28 +458,9 @@ public: */ PARAM_CFG_ARRAY& GetConfigurationSettings( void ); - /** - * Load applications settings specific to the Pcbnew. - * - * This overrides the base class EDA_DRAW_FRAME::LoadSettings() to - * handle settings specific common to the PCB layout application. It - * calls down to the base class to load settings common to all - * EDA_DRAW_FRAME type drawing frames. - * Please put your application settings for Pcbnew here - * to avoid having application settings loaded all over the place. - */ - virtual void LoadSettings(); + void LoadSettings( wxConfigBase* aCfg ); // override virtual - /** - * Save applications settings common to PCB draw frame objects. - * - * This overrides the base class EDA_DRAW_FRAME::SaveSettings() to - * save settings specific to the gerbview application main window. It - * calls down to the base class to save settings common to all - * drawing frames. Please put your application settings for Gerbview here - * to avoid having application settings saved all over the place. - */ - virtual void SaveSettings(); + void SaveSettings( wxConfigBase* aCfg ); // override virtual /** * Function SetLanguage @@ -556,11 +537,11 @@ public: void OnUpdateLayerSelectBox( wxUpdateUIEvent& aEvent ); /** - * Function ReturnBlockCommand + * Function BlockCommand * returns the block command (BLOCK_MOVE, BLOCK_COPY...) corresponding to * the \a aKey (ALT, SHIFT ALT ..) */ - virtual int ReturnBlockCommand( int key ); + virtual int BlockCommand( int key ); /** * Function HandleBlockPlace diff --git a/gerbview/menubar.cpp b/gerbview/menubar.cpp index 6ea327a46b..fd2b6c0abf 100644 --- a/gerbview/menubar.cpp +++ b/gerbview/menubar.cpp @@ -29,15 +29,15 @@ */ #include -#include - +#include +#include #include #include #include #include -void GERBVIEW_FRAME::ReCreateMenuBar( void ) +void GERBVIEW_FRAME::ReCreateMenuBar() { // Create and try to get the current menubar wxMenuBar* menuBar = GetMenuBar(); @@ -77,11 +77,13 @@ void GERBVIEW_FRAME::ReCreateMenuBar( void ) // Add this menu to list menu managed by m_fileHistory // (the file history will be updated when adding/removing files in history if( openRecentGbrMenu ) - wxGetApp().GetFileHistory().RemoveMenu( openRecentGbrMenu ); + Kiface().GetFileHistory().RemoveMenu( openRecentGbrMenu ); openRecentGbrMenu = new wxMenu(); - wxGetApp().GetFileHistory().UseMenu( openRecentGbrMenu ); - wxGetApp().GetFileHistory().AddFilesToMenu(); + + Kiface().GetFileHistory().UseMenu( openRecentGbrMenu ); + Kiface().GetFileHistory().AddFilesToMenu(); + AddMenuItem( fileMenu, openRecentGbrMenu, wxID_ANY, _( "Open &Recent Gerber File" ), @@ -166,9 +168,8 @@ void GERBVIEW_FRAME::ReCreateMenuBar( void ) KiBitmap( preference_xpm ) ); #endif // __WXMAC__ - // Language submenu - wxGetApp().AddMenuLanguageList( configMenu ); + Pgm().AddMenuLanguageList( configMenu ); // Hotkey submenu AddHotkeyConfigMenu( configMenu ); diff --git a/gerbview/readgerb.cpp b/gerbview/readgerb.cpp index 01ae04cb4f..ac374bb5c7 100644 --- a/gerbview/readgerb.cpp +++ b/gerbview/readgerb.cpp @@ -97,13 +97,13 @@ bool GERBVIEW_FRAME::Read_GERBER_File( const wxString& GERBER_FullFileName, break; case 'G': /* Line type Gxx : command */ - G_command = gerber->ReturnGCodeNumber( text ); + G_command = gerber->GCodeNumber( text ); gerber->Execute_G_Command( text, G_command ); break; case 'D': /* Line type Dxx : Tool selection (xx > 0) or * command if xx = 0..9 */ - D_commande = gerber->ReturnDCodeNumber( text ); + D_commande = gerber->DCodeNumber( text ); gerber->Execute_DCODE_Command( text, D_commande ); break; diff --git a/gerbview/rs274d.cpp b/gerbview/rs274d.cpp index 838f1a9b39..7023d63930 100644 --- a/gerbview/rs274d.cpp +++ b/gerbview/rs274d.cpp @@ -406,7 +406,7 @@ static void fillArcPOLY( GERBER_DRAW_ITEM* aGbrItem, /* Read the Gnn sequence and returns the value nn. */ -int GERBER_IMAGE::ReturnGCodeNumber( char*& Text ) +int GERBER_IMAGE::GCodeNumber( char*& Text ) { int ii = 0; char* text; @@ -429,7 +429,7 @@ int GERBER_IMAGE::ReturnGCodeNumber( char*& Text ) /* Get the sequence Dnn and returns the value nn */ -int GERBER_IMAGE::ReturnDCodeNumber( char*& Text ) +int GERBER_IMAGE::DCodeNumber( char*& Text ) { int ii = 0; char* text; @@ -491,7 +491,7 @@ bool GERBER_IMAGE::Execute_G_Command( char*& text, int G_command ) case GC_SELECT_TOOL: { - int D_commande = ReturnDCodeNumber( text ); + int D_commande = DCodeNumber( text ); if( D_commande < FIRST_DCODE ) return false; if( D_commande > (TOOLS_MAX_COUNT - 1) ) diff --git a/gerbview/select_layers_to_pcb.cpp b/gerbview/select_layers_to_pcb.cpp index 6583e578ae..058dfd5d54 100644 --- a/gerbview/select_layers_to_pcb.cpp +++ b/gerbview/select_layers_to_pcb.cpp @@ -27,7 +27,8 @@ */ #include -#include +//#include +#include #include #include #include @@ -301,7 +302,7 @@ void LAYERS_MAP_DIALOG::OnResetClick( wxCommandEvent& event ) */ void LAYERS_MAP_DIALOG::OnStoreSetup( wxCommandEvent& event ) { - wxConfig* config = wxGetApp().GetSettings(); + wxConfigBase* config = Kiface().KifaceSettings(); config->Write( wxT("BrdLayersCount"), m_exportBoardCopperLayersCount ); wxString key; @@ -314,7 +315,7 @@ void LAYERS_MAP_DIALOG::OnStoreSetup( wxCommandEvent& event ) void LAYERS_MAP_DIALOG::OnGetSetup( wxCommandEvent& event ) { - wxConfig* config = wxGetApp().GetSettings(); + wxConfigBase* config = Kiface().KifaceSettings(); config->Read( wxT("BrdLayersCount"), &m_exportBoardCopperLayersCount ); normalizeBrdLayersCount(); diff --git a/include/appl_wxstruct.h b/include/appl_wxstruct.h deleted file mode 100644 index e58dd4f6be..0000000000 --- a/include/appl_wxstruct.h +++ /dev/null @@ -1,450 +0,0 @@ -/* - * This program source code file is part of KiCad, a free EDA CAD application. - * - * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2008-2011 Wayne Stambaugh - * Copyright (C) 1992-2011 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 - */ - -/** - * @file appl_wxstruct.h - * @brief Base class implementation for all KiCad applications. - */ - -#ifndef APPL_WXSTRUCT_H -#define APPL_WXSTRUCT_H - -/* Use wxFileHistory for most recently used file handling. */ -#include -#include -#include -#include - - -enum EDA_APP_T { - APP_UNKNOWN_T, - APP_EESCHEMA_T, - APP_PCBNEW_T, - APP_CVPCB_T, - APP_GERBVIEW_T, - APP_KICAD_T, - APP_PL_EDITOR_T -}; - -class wxConfigBase; -class wxFileConfig; -class wxSingleInstanceChecker; -class wxHtmlHelpController; - - -/** - * Class EDA_APP - * is the base class representing all of KiCad applications. - */ -class EDA_APP : public wxApp -{ -protected: - /// Used mainly to handle default paths libs m_Id = APP_EESCHEMA_T, APP_PCBNEW_T ... - EDA_APP_T m_Id; - - /// Used to prevent multiple instances of an application from being run at the same time. - wxSingleInstanceChecker* m_Checker; - - /// Used to prevent opening the same file multiple times. - wxSingleInstanceChecker* m_oneInstancePerFileChecker; - - wxString m_Project; - - /// The application specific configuration settings. - wxConfig* m_settings; - - /// The configuration settings common to all KiCad applications. - wxConfig* m_commonSettings; - - /// The current project specific settings. - wxFileConfig* m_projectSettings; - - /// KiCad executable path. - wxString m_BinDir; - - /// The KICAD system environment variable. - wxString m_KicadEnv; - - /// The current locale. - wxLocale* m_Locale; - - /// The current language setting. - int m_LanguageId; - - void setLanguageId( int aId ) { m_LanguageId = aId; } - - /// The file name of the the program selected for browsing pdf files. - wxString m_PdfBrowser; - wxPathList m_searchPaths; - wxFileHistory m_fileHistory; - wxString m_HelpFileName; - wxString m_EditorName; - wxString m_CurrentOptionFile; - wxString m_CurrentOptionFileDateAndTime; - wxPoint m_HelpPos; - wxSize m_HelpSize; - wxString m_Title; - wxPathList m_libSearchPaths; - wxFileName m_projectFileName; - wxString m_LastVisitedLibPath; - - /// last visited module library in the module editor or viewer - wxString m_module_nickname; - - wxHtmlHelpController* m_HtmlCtrl; - -public: - EDA_APP(); - ~EDA_APP(); - - /** - * Function OnInit - * this is the first executed function (like main() ) - * @return true if the application can be started. - */ - bool OnInit(); // should this be virtual - - wxHtmlHelpController* GetHtmlHelpController() { return m_HtmlCtrl; } - - void SetHtmlHelpController( wxHtmlHelpController* aController ); - - wxString GetHelpFileName() const { return m_HelpFileName; } - void SetHelpFileName( const wxString& aFileName ) { m_HelpFileName = aFileName; } - - wxConfig* GetSettings() { return m_settings; } - - wxConfig* GetCommonSettings() { return m_commonSettings; } - - wxString GetEditorName() const { return m_EditorName; } - void SetEditorName( const wxString& aFileName ) { m_EditorName = aFileName; } - - wxString GetCurrentOptionFile() const { return m_CurrentOptionFile; } - - bool IsKicadEnvVariableDefined() const { return !m_KicadEnv.IsEmpty(); } - - wxString GetKicadEnvVariable() const { return m_KicadEnv; } - - wxString GetExecutablePath() const { return m_BinDir; } - - wxLocale* GetLocale() { return m_Locale; } - - wxString GetPdfBrowserFileName() const { return m_PdfBrowser; } - - void SetPdfBrowserFileName( const wxString& aFileName ) { m_PdfBrowser = aFileName; } - - bool UseSystemPdfBrowser() const { return m_PdfBrowser.IsEmpty(); } - - wxFileHistory& GetFileHistory() { return m_fileHistory; } - - /** - * Function SetBinDir - * finds the path to the executable and store it in EDA_APP::m_BinDir - * - * @return TODO - */ - bool SetBinDir(); - - /** - * Function SetDefaultSearchPaths - * sets search paths for libraries, modules, internationalization files, etc. - */ - void SetDefaultSearchPaths( void ); - - /** - * Function MacOpenFile - * Specific to MacOSX. Not used under Linux or Windows - * MacOSX: Needed for file association - * http://wiki.wxwidgets.org/WxMac-specific_topics - */ - virtual void MacOpenFile( const wxString& aFileName ); - - /** - * Function InitEDA_Appl - * initialize some general parameters - * - Default paths (help, libs, bin)and configuration files names - * - Language and locale - * - fonts - * @param aName : used as paths in configuration files - * @param aId = flag : LIBRARY_TYPE_EESCHEMA or LIBRARY_TYPE_PCBNEW - * used to choose what default library path must be used - */ - void InitEDA_Appl( const wxString& aName, EDA_APP_T aId = APP_UNKNOWN_T ); - - /** - * Function SetLanguage - * sets the dictionary file name for internationalization. - *

- * The files are in kicad/internat/xx or kicad/internat/xx_XX and are named kicad.mo - *

- * @param first_time must be set to true the first time this funct is - * called, false otherwise - * @return true if the language can be set (i.e. if the locale is available) - */ - bool SetLanguage( bool first_time = false ); - - /** - * Function AddMenuLanguageList - * creates a menu list for language choice, and add it as submenu to \a MasterMenu. - * - * @param MasterMenu The main menu. The sub menu list will be accessible from the menu - * item with id ID_LANGUAGE_CHOICE - */ - void AddMenuLanguageList( wxMenu* MasterMenu ); - - /** - * Function SetLanguageIdentifier - * sets in .m_LanguageId member the wxWidgets language identifier Id from - * the KiCad menu id (internal menu identifier). - * - * @param menu_id The KiCad menuitem id (returned by Menu Event, when - * clicking on a menu item) - */ - void SetLanguageIdentifier( int menu_id ); - - void SetLanguagePath( void ); - - /** - * Function InitOnLineHelp - * initializes KiCad's online help. - */ - void InitOnLineHelp(); - - /** - * Function GetSettings - * gets the application settings. - * @param aReopenLastUsedDirectory True to switch to last opened directory, false - * to use current CWD - */ - void GetSettings( bool aReopenLastUsedDirectory ); - - /** - * Function SaveSettings - * saves the application settings. - */ - void SaveSettings(); - - /** - * Function WriteProjectConfig - * Save the current "project" parameters - * saved parameters are parameters that have the .m_Setup member set to false - * saving file is the .pro file project - */ - void WriteProjectConfig( const wxString& fileName, - const wxString& GroupName, - const PARAM_CFG_ARRAY& params ); - - /** - * Function SaveCurrentSetupValues - * saves the current setup values in m_settings. - * Saved parameters are parameters that have the .m_Setup member set to - * true. - * @param aList = array of PARAM_CFG_BASE pointers - */ - void SaveCurrentSetupValues( const PARAM_CFG_ARRAY& aList ); - - /** - * Function ReadCurrentSetupValues - * reads the current setup values previously saved, from m_settings. - * Saved parameters are parameters that have the .m_Setup member set to - * true. - * @param aList = array of PARAM_CFG_BASE pointers - */ - void ReadCurrentSetupValues( const PARAM_CFG_ARRAY& aList ); - - /** - * Function ReadProjectConfig - * Read the current "project" parameters - * Parameters are parameters that have the .m_Setup member set to false - * read file is the .pro file project - * - * if Load_Only_if_New == true, this file is read only if it differs from - * the current config (different dates ) - * - * @return true if read. - * Also set: - * wxGetApp().m_CurrentOptionFileDateAndTime - * wxGetApp().m_CurrentOptionFile - */ - bool ReadProjectConfig( const wxString& local_config_filename, - const wxString& GroupName, - PARAM_CFG_BASE** List, - bool Load_Only_if_New ); - bool ReadProjectConfig( const wxString& local_config_filename, - const wxString& GroupName, - const PARAM_CFG_ARRAY& List, - bool Load_Only_if_New ); - - /** - * Creates or recreates the KiCad project file. (filename.pro) - * Initialize: - * G_Prj_Config - * G_Prj_Config_LocalFilename - * G_Prj_Default_Config_FullFilename - * Return: - * True if local config - * False if default config - */ - bool ReCreatePrjConfig( const wxString& local_config_filename, - const wxString& GroupName, - bool ForceUseLocalConfig ); - - /** - * Function ReadPdfBrowserInfos - * read the PDF browser choice from the common configuration. - */ - void ReadPdfBrowserInfos(); - - /* Function WritePdfBrowserInfos - * save the PDF browser choice to the common configuration. - */ - void WritePdfBrowserInfos(); - - /** - * Function FindFileInSearchPaths - * looks in search paths for \a filename. - */ - wxString FindFileInSearchPaths( const wxString& filename, - const wxArrayString* subdirs = NULL ); - - /** - * Function GetHelpFile - * get the help file path. - *

- * Return the KiCad help file with path. The base paths defined in - * m_searchPaths are tested for a valid file. The path returned can - * be relative depending on the paths added to m_searchPaths. See the - * documentation for wxPathList for more information. If the help file - * for the current locale is not found, an attempt to find the English - * version of the help file is made. - * wxEmptyString is returned if help file not found. - * Help file is searched in directories in this order: - * help/\ like help/en_GB - * help/\ like help/en - * help/en - *

- */ - wxString GetHelpFile( void ); - - /** - * Return the preferred editor name. - */ - wxString& GetEditorName(); - - const wxString& GetTitle() { return m_Title; } - void SetTitle( const wxString& aTitle ) { m_Title = aTitle; } - - wxPathList& GetLibraryPathList() { return m_libSearchPaths; } - wxString FindLibraryPath( const wxString& fileName ); - - /** - * Function FindLibraryPath - * KiCad saves user defined library files that are not in the standard - * library search path list with the full file path. Calling the library - * search path list with a user library file will fail. This helper method - * solves that problem. - * @param fileName - * @return a wxEmptyString if library file is not found. - */ - wxString FindLibraryPath( const wxFileName& fileName ) - { - return FindLibraryPath( fileName.GetFullPath() ); - } - - - /** - * Function ReturnLastVisitedLibraryPath - * returns the last visited library directory, or (if void) the first - * path in lib path list ( but not the CWD ) - * - * @param aSubPathToSearch = Preferred sub path to search in path list - */ - wxString ReturnLastVisitedLibraryPath( const wxString& aSubPathToSearch = wxEmptyString ); - - void SaveLastVisitedLibraryPath( const wxString& aPath ); - - /** - * Function ReturnFilenameWithRelativePathInLibPath - * @return a short filename (with extension) with only a relative path if - * this filename can be found in library paths - * @param aFullFilename The filename with path and extension. - */ - wxString ReturnFilenameWithRelativePathInLibPath( const wxString& aFullFilename ); - - /** - * Function RemoveLibraryPath - * Removes the given path(s) from the library path list - * @param aPaths = path or path list to remove. paths must be separated by - * ";" - */ - void RemoveLibraryPath( const wxString& aPaths ); - - /** - * Function InsertLibraryPath - * insert path(s) int lib paths list. - * @param aPaths = path or path list to add. paths must be separated by ";" - * @param aIndex = insertion point - */ - void InsertLibraryPath( const wxString& aPaths, size_t aIndex ); - - /** - * Function LockFile - * Locks the access to a file. - * @param fileName = full path to the file. - * @return false if the file was already locked, true otherwise. - */ - bool LockFile( const wxString& fileName ); - - /** - * Function SetFootprintLibTableEnv - * attempts set the KISYSMOD environment variable to the best possible path. - * - * The path is determined by attempting to find the path with the most footprint library - * files. This may or may not be the best path but it provides the best solution for - * backwards compatibility with the previous library search path implementation. If the - * KISYSMOD environment variable is already set, then it left as is to respect the wishes - * of the user. - * - * @note This must be called after #SetDefaultSearchPaths() is called. Otherwise, the - * list of library search paths will be empty and KISYSMOD will be undefined making - * it impossible for the footprint libraries to be loaded from the footprint library - * table. - * - * @return false if the KISYSMOD path is not valid. - */ - bool SetFootprintLibTablePath(); - - const wxString& GetModuleLibraryNickname() { return m_module_nickname; } - void SetModuleLibraryNickname( const wxString& aNickname ) { m_module_nickname = aNickname; } -}; - - -/* - * Use wxGetApp() to access EDA_APP. It is not necessary to keep copies - * of the application pointer all over the place or worse yet in a global - * variable. - */ -DECLARE_APP( EDA_APP ) - -#endif // APPL_WXSTRUCT_H diff --git a/include/base_units.h b/include/base_units.h index b8492deafe..2858cc7388 100644 --- a/include/base_units.h +++ b/include/base_units.h @@ -108,7 +108,7 @@ wxString AngleToStringDegrees( double aAngle ); wxString LengthDoubleToString( double aValue, bool aConvertToMils = false ); /** - * Function ReturnStringFromValue + * Function StringFromValue * returns the string from \a aValue according to units (inch, mm ...) for display, * and the initial unit for value. * @@ -126,7 +126,7 @@ wxString LengthDoubleToString( double aValue, bool aConvertToMils = false ); * @param aAddUnitSymbol = true to add symbol unit to the string value * @return A wxString object containing value and optionally the symbol unit (like 2.000 mm) */ -wxString ReturnStringFromValue( EDA_UNITS_T aUnit, int aValue, bool aAddUnitSymbol = false ); +wxString StringFromValue( EDA_UNITS_T aUnit, int aValue, bool aAddUnitSymbol = false ); /** * Operator << overload @@ -153,17 +153,17 @@ void PutValueInLocalUnits( wxTextCtrl& aTextCtr, int aValue ); double From_User_Unit( EDA_UNITS_T aUnit, double aValue ); /** - * Function ReturnValueFromString + * Function ValueFromString * converts \a aTextValue in \a aUnits to internal units used by the application. * * @param aUnits The units of \a aTextValue. * @param aTextValue A reference to a wxString object containing the string to convert. * @return The string from Value, according to units (inch, mm ...) for display, */ -int ReturnValueFromString( EDA_UNITS_T aUnits, const wxString& aTextValue ); +int ValueFromString( EDA_UNITS_T aUnits, const wxString& aTextValue ); /** - * Function ReturnValueFromString + * Function ValueFromString * converts \a aTextValue in \a aUnits to internal units used by the application, * unit type will be obtained from g_UserUnit. @@ -172,12 +172,12 @@ int ReturnValueFromString( EDA_UNITS_T aUnits, const wxString& aTextValue ); * @return The string from Value, according to units (inch, mm ...) for display, */ -int ReturnValueFromString( const wxString& aTextValue ); +int ValueFromString( const wxString& aTextValue ); /** * Convert the number Value in a string according to the internal units * and the selected unit (g_UserUnit) and put it in the wxTextCtrl TextCtrl */ -int ReturnValueFromTextCtrl( const wxTextCtrl& aTextCtr ); +int ValueFromTextCtrl( const wxTextCtrl& aTextCtr ); #endif // _BASE_UNITS_H_ diff --git a/include/bin_mod.h b/include/bin_mod.h new file mode 100644 index 0000000000..c834f2cd7c --- /dev/null +++ b/include/bin_mod.h @@ -0,0 +1,64 @@ +#ifndef BIN_MOD_H_ +#define BIN_MOD_H_ + +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 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 + */ + +#if 0 + #include // wx 3.0: +#else + #include +#endif + +#include + +#include + +class wxConfigBase; + +/** + * Struct BIN_MOD + * pertains to a single program module, either an EXE or a DSO/DLL ("bin_mod"). + * It manages miscellaneous configuration file information pertinent to one bin_mod. + * Because it serves in both DSO/DLLs and in EXEs, its name is neutral. + *

+ * Accessors are in containing (wrapper) classes. + */ +struct BIN_MOD +{ + BIN_MOD( const char* aName ); + ~BIN_MOD(); + + void Init(); + void End(); + + const char* m_name; ///< name of this binary module, static C string. + + wxConfigBase* m_config; ///< maybe from $HOME/. + wxFileHistory m_history; + wxString m_help_file; + + SEARCH_STACK m_search; +}; + +#endif // BIN_MOD_H_ diff --git a/include/class_board_design_settings.h b/include/class_board_design_settings.h index 9b516308b2..826741b8f4 100644 --- a/include/class_board_design_settings.h +++ b/include/class_board_design_settings.h @@ -7,7 +7,7 @@ #include // NB_COLORS #include -#include +#include /** diff --git a/include/colors.h b/include/colors.h index a1bd0c8fdf..c7dfa1fd2d 100644 --- a/include/colors.h +++ b/include/colors.h @@ -2,8 +2,8 @@ /* colors.h */ /************/ -#ifndef _COLORS_H -#define _COLORS_H +#ifndef COLORS_H_ +#define COLORS_H_ #include @@ -195,4 +195,4 @@ inline wxColour MakeColour( EDA_COLOR_T aColor ) ); } -#endif /* ifndef _COLORS_H */ +#endif // COLORS_H_ diff --git a/include/common.h b/include/common.h index ca40fca2b5..a6b282df08 100644 --- a/include/common.h +++ b/include/common.h @@ -44,6 +44,8 @@ class wxAboutDialogInfo; +class SEARCH_STACK; + // Flag for special keys #define GR_KB_RIGHTSHIFT 0x10000000 /* Keybd states: right @@ -579,4 +581,12 @@ unsigned GetRunningMicroSecs(); */ wxString FormatDateLong( const wxDateTime &aDate ); +/** + * Function SystemDirsAppend + * appends system places to aSearchStack in a platform specific way, and pertinent + * to KiCad programs. It seems to be a place to collect bad ideas and keep them + * out of view. + */ +void SystemDirsAppend( SEARCH_STACK* aSearchStack ); + #endif // INCLUDE__COMMON_H_ diff --git a/include/param_config.h b/include/config_params.h similarity index 69% rename from include/param_config.h rename to include/config_params.h index fdb98fc18f..a8002e0a9e 100644 --- a/include/param_config.h +++ b/include/config_params.h @@ -1,10 +1,34 @@ -/** - * The common library - * @file param_config.h +#ifndef CONFIG_PARAMS_H_ +#define CONFIG_PARAMS_H_ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com + * Copyright (C) 2008-2011 Wayne Stambaugh + * Copyright (C) 1992-2011 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 */ -#ifndef PARAM_CONFIG_H_ -#define PARAM_CONFIG_H_ +/** + * The common library + * @file config_params.h + */ #include #include @@ -13,6 +37,9 @@ #include +#define CONFIG_VERSION 1 +#define FORCE_LOCAL_CONFIG true + /** * Function ConfigBaseWriteDouble @@ -258,6 +285,67 @@ public: /** A list of parameters type */ -typedef boost::ptr_vector PARAM_CFG_ARRAY; +//typedef boost::ptr_vector PARAM_CFG_ARRAY; +class PARAM_CFG_ARRAY : public boost::ptr_vector +{ +}; -#endif // PARAM_CONFIG_H_ + +/** + * Function wxConfigSaveSetups + * writes @a aList of PARAM_CFG_ARRAY elements to save configuration values + * to @a aCfg. Only elements with m_Setup set true will be saved, hence the + * function name. + * + * @param aCfg where to save + * @param aList holds some configuration parameters, not all of which will + * necessarily be saved. + */ +void wxConfigSaveSetups( wxConfigBase* aCfg, const PARAM_CFG_ARRAY& aList ); + +/** + * Function wxConfigSaveParams + * writes @a aList of PARAM_CFG_ARRAY elements to save configuration values + * to @a aCfg. Only elements with m_Setup set false will be saved, hence the + * function name. + * + * @param aCfg where to save + * @param aList holds some configuration parameters, not all of which will + * necessarily be saved. + * @param aGroup indicates in which group the value should be saved, + * unless the PARAM_CFG_ARRAY element provides its own group, in which case it will + * take precedence. aGroup may be empty. + */ +void wxConfigSaveParams( wxConfigBase* aCfg, + const PARAM_CFG_ARRAY& aList, const wxString& aGroup ); + +/** + * Function wxConfigLoadSetups + * uses @a aList of PARAM_CFG_ARRAY elements to load configuration values + * from @a aCfg. Only elements whose m_Setup field is true will be loaded. + * + * @param aCfg where to load from. + * @param aList holds some configuration parameters, not all of which will + * necessarily be loaded. + */ +void wxConfigLoadSetups( wxConfigBase* aCfg, const PARAM_CFG_ARRAY& aList ); + +/** + * Function wxConfigLoadParams + * uses @a aList of PARAM_CFG_ARRAY elements to load configuration values + * from @a aCfg. Only elements whose m_Setup field is false will be loaded. + * + * @param aCfg where to load from. + * + * @param aList holds some configuration parameters, not all of which will + * necessarily be loaded. + * + * @param aGroup indicates in which group the value should be saved, + * unless the PARAM_CFG_ARRAY element provides its own group, in which case it will + * take precedence. aGroup may be empty. + */ +void wxConfigLoadParams( wxConfigBase* aCfg, + const PARAM_CFG_ARRAY& aList, const wxString& aGroup ); + + +#endif // CONFIG_PARAMS_H_ diff --git a/include/dialog_hotkeys_editor.h b/include/dialog_hotkeys_editor.h index d8b671cd3d..81c523f935 100644 --- a/include/dialog_hotkeys_editor.h +++ b/include/dialog_hotkeys_editor.h @@ -18,7 +18,7 @@ #include #include -#include +#include #include <../common/dialogs/dialog_hotkeys_editor_base.h> class HOTKEYS_EDITOR_DIALOG : public HOTKEYS_EDITOR_DIALOG_BASE diff --git a/include/dialog_shim.h b/include/dialog_shim.h index 56e30253fb..cab1d5f0f7 100644 --- a/include/dialog_shim.h +++ b/include/dialog_shim.h @@ -27,6 +27,7 @@ #include #include +#include #if wxMINOR_VERSION == 8 && defined(__WXGTK__) #define DLGSHIM_USE_SETFOCUS 1 @@ -44,7 +45,7 @@ *
* in the dialog window's properties. **/ -class DIALOG_SHIM : public wxDialog +class DIALOG_SHIM : public wxDialog, public KIWAY_HOLDER { public: @@ -57,6 +58,7 @@ public: bool Show( bool show ); // overload wxDialog::Show + protected: std::string m_hash_key; // alternate for class_map when classname re-used. @@ -64,8 +66,6 @@ protected: private: void onInit( wxInitDialogEvent& aEvent ); #endif - - }; #endif // DIALOG_SHIM_ diff --git a/include/draw_frame.h b/include/draw_frame.h new file mode 100644 index 0000000000..b533688e55 --- /dev/null +++ b/include/draw_frame.h @@ -0,0 +1,652 @@ +#ifndef EDA_DRAW_FRAME_H_ +#define EDA_DRAW_FRAME_H_ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2009 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com + * Copyright (C) 2011 Wayne Stambaugh + * Copyright (C) 1992-2011 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 +#include + + +/** + * Class EDA_DRAW_FRAME + * is the base class for create windows for drawing purpose. The Eeschema, Pcbnew and + * GerbView main windows are just a few examples of classes derived from EDA_DRAW_FRAME. + */ +class EDA_DRAW_FRAME : public KIWAY_PLAYER +{ + /// Let the #EDA_DRAW_PANEL object have access to the protected data since + /// it is closely tied to the #EDA_DRAW_FRAME. + friend class EDA_DRAW_PANEL; + + ///< Id of active button on the vertical toolbar. + int m_toolId; + + BASE_SCREEN* m_currentScreen; ///< current used SCREEN + + bool m_snapToGrid; ///< Indicates if cursor should be snapped to grid. + bool m_galCanvasActive; ///< whether to use new GAL engine + + EDA_DRAW_PANEL_GAL* m_galCanvas; + +protected: + EDA_HOTKEY_CONFIG* m_HotkeysZoomAndGridList; + int m_LastGridSizeId; // the command id offset (>= 0) of the last selected grid + // 0 is for the grid corresponding to + // a wxCommand ID = ID_POPUP_GRID_LEVEL_1000. + bool m_DrawGrid; // hide/Show grid + EDA_COLOR_T m_GridColor; // Grid color + + /// The area to draw on. + EDA_DRAW_PANEL* m_canvas; + + /// Tool ID of previously active draw tool bar button. + 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; + + /// True shows the X and Y axis indicators. + bool m_showAxis; + + /// True shows the grid axis indicators. + bool m_showGridAxis; + + /// True shows the origin axis used to indicate the coordinate offset for + /// drill, gerber, and component position files. + bool m_showOriginAxis; + + /// True shows the drawing border and title block. + bool m_showBorderAndTitleBlock; + + /// Choice box to choose the grid size. + wxComboBox* m_gridSelectBox; + + /// Choice box to choose the zoom value. + 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; + + /// The options tool bar typcially located on the left edge of the main window. + wxAuiToolBar* m_optionsToolBar; + + /// Panel used to display information at the bottom of the main window. + EDA_MSG_PANEL* m_messagePanel; + + int m_MsgFrameHeight; + +#ifdef USE_WX_OVERLAY + // MAC Uses overlay to workaround the wxINVERT and wxXOR miss + wxOverlay m_overlay; +#endif + + void SetScreen( BASE_SCREEN* aScreen ) { m_currentScreen = aScreen; } + + /** + * Function unitsChangeRefresh + * is called when when the units setting has changed to allow for any derived classes + * to handle refreshing and controls that have units based measurements in them. The + * default version only updates the status bar. Don't forget to call the default + * in your derived class or the status bar will not get updated properly. + */ + virtual void unitsChangeRefresh(); + +public: + EDA_DRAW_FRAME( KIWAY* aKiway, wxWindow* aParent, + ID_DRAWFRAME_TYPE aFrameType, + const wxString& aTitle, + const wxPoint& aPos, const wxSize& aSize, + long aStyle, + const wxString& aFrameName ); + + ~EDA_DRAW_FRAME(); + + virtual void SetPageSettings( const PAGE_INFO& aPageSettings ) = 0; + virtual const PAGE_INFO& GetPageSettings() const = 0; + + /** + * Function GetPageSizeIU + * works off of GetPageSettings() to return the size of the paper page in + * the internal units of this particular view. + */ + virtual const wxSize GetPageSizeIU() const = 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 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 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; + + int GetCursorShape() const { return m_cursorShape; } + + void SetCursorShape( int aCursorShape ) { m_cursorShape = aCursorShape; } + + bool GetShowBorderAndTitleBlock() const { return m_showBorderAndTitleBlock; } + + void SetShowBorderAndTitleBlock( bool aShow ) { m_showBorderAndTitleBlock = aShow; } + + EDA_DRAW_PANEL* GetCanvas() { return m_canvas; } + + virtual wxString GetScreenDesc() const; + + /** + * Function GetScreen + * returns a pointer to a BASE_SCREEN or one of its + * derivatives. It is overloaded by derived classes to return + * SCH_SCREEN or PCB_SCREEN. + */ + virtual BASE_SCREEN* GetScreen() const { return m_currentScreen; } + + /** + * Execute a remote command send via a socket to the application, + * port KICAD_PCB_PORT_SERVICE_NUMBER (currently 4242) + * It called by EDA_DRAW_FRAME::OnSockRequest(). + * this is a virtual function becuse the actual commands depends on the + * application. + * the basic function do nothing + * @param cmdline = received command from socket + */ + virtual void ExecuteRemoteCommand( const char* cmdline ){} + + void OnMenuOpen( wxMenuEvent& event ); + void OnMouseEvent( wxMouseEvent& event ); + + /** function SkipNextLeftButtonReleaseEvent + * after calling this function, if the left mouse button + * is down, the next left mouse button release event will be ignored. + * It is is usefull for instance when closing a dialog on a mouse click, + * to skip the next mouse left button release event + * by the parent window, because the mouse button + * clicked on the dialog is often released in the parent frame, + * and therefore creates a left button released mouse event + * which can be unwanted in some cases + */ + void SkipNextLeftButtonReleaseEvent(); + + virtual void OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition, + EDA_ITEM* aItem = NULL ); + + /** + * Function AddMenuZoomAndGrid (virtual) + * Add standard zoom commands and submenu zoom and grid selection to a popup menu + * uses zoom hotkeys info base to add hotkeys info to menu commands + * @param aMasterMenu = the menu to populate. + */ + virtual void AddMenuZoomAndGrid( wxMenu* aMasterMenu ); + + void EraseMsgBox(); + void Process_PageSettings( wxCommandEvent& event ); + + /** + * Function SetLanguage + * called on a language menu selection + * when using a derived function, do not forget to call this one + */ + virtual void SetLanguage( wxCommandEvent& event ); + + virtual void ReCreateHToolbar() = 0; + virtual void ReCreateVToolbar() = 0; + virtual void ReCreateMenuBar(); + virtual void ReCreateAuxiliaryToolbar(); + + /** + * Function SetToolID + * sets the tool command ID to \a aId and sets the cursor to \a aCursor. The + * command ID must be greater or equal ::ID_NO_TOOL_SELECTED. If the command + * ID is less than ::ID_NO_TOOL_SELECTED, the tool command ID is set to + * ::ID_NO_TOOL_SELECTED. On debug builds, an assertion will be raised when + * \a aId is invalid. + * @param aId New tool command ID if greater than or equal to ::ID_NO_TOOL_SELECTED. + If less than zero, the current tool command ID is retained. + * @param aCursor Sets the cursor shape if greater than or equal to zero. + * @param aToolMsg The tool message to set in the status bar. + */ + virtual void SetToolID( int aId, int aCursor, const wxString& aToolMsg ); + + int GetToolId() const { return m_toolId; } + + /* These 4 functions provide a basic way to show/hide grid + * and /get/set grid color. + * These parameters are saved in KiCad config for each main frame + */ + /** + * Function IsGridVisible() , virtual + * @return true if the grid must be shown + */ + virtual bool IsGridVisible() const + { + return m_DrawGrid; + } + + /** + * Function SetGridVisibility() , virtual + * It may be overloaded by derived classes + * @param aVisible = true if the grid must be shown + */ + virtual void SetGridVisibility( bool aVisible ) + { + m_DrawGrid = aVisible; + } + + /** + * Function GetGridColor() , virtual + * @return the color of the grid + */ + virtual EDA_COLOR_T GetGridColor() const + { + return m_GridColor; + } + + /** + * Function SetGridColor() , virtual + * @param aColor = the new color of the grid + */ + virtual void SetGridColor( EDA_COLOR_T aColor ) + { + m_GridColor = aColor; + } + + /** + * Function GetGridPosition + * returns the nearest grid position to \a aPosition if a screen is defined and snap to + * grid is enabled. Otherwise, the original positions is returned. + * @see m_snapToGrid and m_BaseScreen members. + * @param aPosition The position to test. + * @return The wxPoint of the appropriate cursor position. + */ + wxPoint GetGridPosition( const wxPoint& aPosition ) const; + + /** + * Command event handler for selecting grid sizes. + * + * All commands that set the grid size should eventually end up here. + * This is where the application setting is saved. If you override + * this method, make sure you call down to the base class. + * + * @param event - Command event passed by selecting grid size from the + * grid size combobox on the toolbar. + */ + virtual void OnSelectGrid( wxCommandEvent& event ); + + /** + * Functions OnSelectZoom + * sets the zoom factor when selected by the zoom list box in the main tool bar. + * @note List position 0 is fit to page + * List position >= 1 = zoom (1 to zoom max) + * Last list position is custom zoom not in zoom list. + */ + virtual void OnSelectZoom( wxCommandEvent& event ); + + // Command event handlers shared by all applications derived from EDA_DRAW_FRAME. + void OnToggleGridState( wxCommandEvent& aEvent ); + void OnSelectUnits( wxCommandEvent& aEvent ); + void OnToggleCrossHairStyle( wxCommandEvent& aEvent ); + + // Update user interface event handlers shared by all applications derived from + // EDA_DRAW_FRAME. + void OnUpdateUndo( wxUpdateUIEvent& aEvent ); + void OnUpdateRedo( wxUpdateUIEvent& aEvent ); + void OnUpdateGrid( wxUpdateUIEvent& aEvent ); + void OnUpdateUnits( wxUpdateUIEvent& aEvent ); + void OnUpdateCrossHairStyle( wxUpdateUIEvent& aEvent ); + + /** + * Function GeneralControl + * performs application specific control using \a aDC at \a aPosition in logical units. + *

+ * Override this function for application specific control. This function gets + * called on every mouse and key event. + *

+ * @param aDC A device context. + * @param aPosition The current cursor position in logical (drawing) units. + * @param aHotKey A key event used for application specific control if not zero. + */ + virtual void GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aHotKey = 0 ) { } + + /** + * Function OnSize + * recalculates the size of toolbars and display panel when the frame size changes. + */ + virtual void OnSize( wxSizeEvent& event ); + + void OnEraseBackground( wxEraseEvent& SizeEvent ); + + virtual void OnZoom( wxCommandEvent& event ); + + /** + * Function RedrawScreen + * redraws the entire screen area by updating the scroll bars and mouse pointer in + * order to have \a aCenterPoint at the center of the screen. + * @param aCenterPoint The position in logical units to center the scroll bars. + * @param aWarpPointer Moves the mouse cursor to \a aCenterPoint if true. + */ + void RedrawScreen( const wxPoint& aCenterPoint, bool aWarpPointer ); + + /** + * Function RedrawScreen2 + * puts the crosshair back to the screen position it had before zooming + * @param posBefore screen position of the crosshair before zooming + */ + void RedrawScreen2( const wxPoint& posBefore ); + + /** + * Function Zoom_Automatique + * redraws the screen with best zoom level and the best centering + * that shows all the page or the board + */ + void Zoom_Automatique( bool aWarpPointer ); + + /* Set the zoom level to show the area Rect */ + void Window_Zoom( EDA_RECT& Rect ); + + /** Return the zoom level which displays the full page on screen */ + virtual double BestZoom() = 0; + + /** + * Function GetZoom + * @return The current zoom level. + */ + double GetZoom(); + + /** + * Function DrawWorkSheet + * Draws on screen the page layout with the frame and the basic inscriptions. + * @param aDC The device context. + * @param aScreen screen to draw + * @param aLineWidth The pen width to use to draw the layout. + * @param aScale The mils to Iu conversion factor. + * @param aFilename The filename to display in basic inscriptions. + */ + 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 ); + + /** + * Function OnActivate (virtual) + * is called when activating the frame. + * In derived classes with a overriding OnActivate function, + * do not forget to call this EDA_DRAW_FRAME::OnActivate( event ) basic function. + */ + virtual void OnActivate( wxActivateEvent& event ); + + /** + * Function UpdateStatusBar + * updates the status bar information. + * + * The base method updates the absolute and relative coordinates and the + * zoom information. If you override this virtual method, make sure to call + * this subclassed method. The status bar can draw itself. This is not + * a drawing function per se, but rather updates lines of text held by + * the components within the status bar which is owned by the wxFrame. + *

+ * On a MAC, be careful about calling this function when there is an + * existing wxDC in existence on a sibling window. + */ + virtual void UpdateStatusBar(); + + /** + * Function DisplayUnitsMsg + * displays current unit pane on the status bar. + */ + void DisplayUnitsMsg(); + + /* Handlers for block commands */ + virtual void InitBlockPasteInfos(); + + /** + * Function HandleBlockBegin + * initializes the block command including the command type, initial position, + * and other variables. + */ + virtual bool HandleBlockBegin( wxDC* aDC, int aKey, const wxPoint& aPosition ); + + /** + * Function BlockCommand + * Returns the block command code (BLOCK_MOVE, BLOCK_COPY...) corresponding to the + * keys pressed (ALT, SHIFT, SHIFT ALT ..) when block command is started by dragging + * the mouse. + * + * @param aKey = the key modifiers (Alt, Shift ...) + * @return the block command id (BLOCK_MOVE, BLOCK_COPY...) + */ + virtual int BlockCommand( int aKey ); + + /** + * Function HandleBlockPlace( ) + * Called after HandleBlockEnd, when a block command needs to be + * executed after the block is moved to its new place + * (bloc move, drag, copy .. ) + * Parameters must be initialized in GetScreen()->m_BlockLocate + */ + virtual void HandleBlockPlace( wxDC* DC ); + + /** + * Function HandleBlockEnd( ) + * Handle the "end" of a block command, + * i.e. is called at the end of the definition of the area of a block. + * depending on the current block command, this command is executed + * or parameters are initialized to prepare a call to HandleBlockPlace + * in GetScreen()->m_BlockLocate + * @return false if no item selected, or command finished, + * true if some items found and HandleBlockPlace must be called later + */ + virtual bool HandleBlockEnd( wxDC* DC ); + + /** + * Function CopyToClipboard + * copies the current page or the current block to the clipboard. + */ + void CopyToClipboard( wxCommandEvent& event ); + + /* interprocess communication */ + void OnSockRequest( wxSocketEvent& evt ); + void OnSockRequestServer( wxSocketEvent& evt ); + + void LoadSettings( wxConfigBase* aCfg ); // override virtual + + void SaveSettings( wxConfigBase* aCfg ); // override virtual + + /** + * Append a message to the message panel. + * + * This helper method checks to make sure the message panel exists in + * the frame and appends a message to it using the message panel + * AppendMessage() method. + * + * @param textUpper - The message upper text. + * @param textLower - The message lower text. + * @param color - A color ID from the KiCad color list (see colors.h). + * @param pad - Number of spaces to pad between messages (default = 4). + */ + void AppendMsgPanel( const wxString& textUpper, const wxString& textLower, + EDA_COLOR_T color, int pad = 6 ); + + /** + * Clear all messages from the message panel. + */ + void ClearMsgPanel( void ); + + /** + * Function SetMsgPanel + * clears the message panel and populates it with the contents of \a aList. + * + * @param aList is the list of #MSG_PANEL_ITEM objects to fill the message panel. + */ + void SetMsgPanel( const std::vector< MSG_PANEL_ITEM >& aList ); + + void SetMsgPanel( EDA_ITEM* aItem ); + + /** + * Function PrintPage + * used to print a page + * Print the page pointed by current screen, set by the calling print function + * @param aDC = wxDC given by the calling print function + * @param aPrintMask = not used here + * @param aPrintMirrorMode = not used here (Set when printing in mirror mode) + * @param aData = a pointer on an auxiliary data (not always used, NULL if not used) + */ + virtual void PrintPage( wxDC* aDC, LAYER_MSK aPrintMask, bool aPrintMirrorMode, void* aData = NULL ); + + /** + * Function CoordinateToString + * is a helper to convert the \a integer coordinate \a aValue to a string in inches or mm + * according to the current user units setting. + * @param aValue The coordinate to convert. + * @param aConvertToMils Convert inch values to mils if true. This setting has no effect if + * the current user unit is millimeters. + * @return The converted string for display in user interface elements. + */ + wxString CoordinateToString( int aValue, bool aConvertToMils = false ) const; + + /** + * Function LengthDoubleToString + * is a helper to convert the \a double value \a aValue to a string in inches or mm + * according to the current user units setting. + * @param aValue The coordinate to convert. + * @param aConvertToMils Convert inch values to mils if true. This setting has no effect if + * the current user unit is millimeters. + * @return The converted string for display in user interface elements. + */ + wxString LengthDoubleToString( double aValue, bool aConvertToMils = false ) const; + + /** + * Function UseGalCanvas + * used to switch between standard and GAL-based canvas. + * + * @param aEnable True for GAL-based canvas, false for standard canvas. + */ + virtual void UseGalCanvas( bool aEnable ); + + /** + * Function IsGalCanvasActive + * is used to check which canvas (GAL-based or standard) is currently in use. + * + * @return True for GAL-based canvas, false for standard canvas. + */ + bool IsGalCanvasActive() const { return m_galCanvasActive; } + void SetGalCanvasActive( bool aState ) { m_galCanvasActive = aState; } + + /** + * Function GetGalCanvas + * returns a pointer to GAL-based canvas of given EDA draw frame. + * + * @return Pointer to GAL-based canvas. + */ + EDA_DRAW_PANEL_GAL* GetGalCanvas() const { return m_galCanvas; } + void SetGalCanvas( EDA_DRAW_PANEL_GAL* aPanel ) { m_galCanvas = aPanel; } + + DECLARE_EVENT_TABLE() +}; + +#endif // EDA_DRAW_FRAME_H_ diff --git a/include/drawtxt.h b/include/drawtxt.h index b2d898e99a..d830f164c5 100644 --- a/include/drawtxt.h +++ b/include/drawtxt.h @@ -50,11 +50,11 @@ int Clamp_Text_PenSize( int aPenSize, wxSize aSize, bool aBold = true ); int GetPenSizeForBold( int aTextSize ); /** - * Function ReturnGraphicTextWidth + * Function GraphicTextWidth * @return the X size of the graphic text - * the full X size is ReturnGraphicTextWidth + the thickness of graphic lines + * the full X size is GraphicTextWidth + the thickness of graphic lines */ -int ReturnGraphicTextWidth( const wxString& aText, int size_h, bool italic, bool bold ); +int GraphicTextWidth( const wxString& aText, int size_h, bool italic, bool bold ); /** * Function NegableTextLength diff --git a/include/fp_lib_table.h b/include/fp_lib_table.h index 5ce7d5236f..a4c7c020d7 100644 --- a/include/fp_lib_table.h +++ b/include/fp_lib_table.h @@ -30,11 +30,9 @@ #include #include #include - - +#include #define FP_LATE_ENVVAR 1 ///< late=1/early=0 environment variable expansion -#define KISYSMOD "KISYSMOD" class wxFileName; class OUTPUTFORMATTER; @@ -42,7 +40,7 @@ class MODULE; class FP_LIB_TABLE_LEXER; class NETLIST; class REPORTER; - +class SEARCH_STACK; /** * Class FP_LIB_TABLE @@ -85,7 +83,7 @@ class REPORTER; * * @author Wayne Stambaugh */ -class FP_LIB_TABLE +class FP_LIB_TABLE : public PROJECT::_ELEM { friend class DIALOG_FP_LIB_TABLE; @@ -271,6 +269,13 @@ public: */ FP_LIB_TABLE( FP_LIB_TABLE* aFallBackTable = NULL ); + /// Delete all rows. + void Clear() + { + rows.clear(); + nickIndex.clear(); + } + bool operator==( const FP_LIB_TABLE& r ) const { if( rows.size() == r.rows.size() ) @@ -496,27 +501,9 @@ public: */ bool IsEmpty( bool aIncludeFallback = true ); - /** - * Function MissingLegacyLibs - * tests the list of \a aLibNames by URI to determine if any of them are missing from - * the #FP_LIB_TABLE. - * - * @note The missing legacy footprint library test is performed by using old library - * file path lookup method. If the library is found, it is compared against all - * of the URIs in the table rather than the nickname. This was done because the - * user could change the nicknames from the default table. Using the full path - * is more reliable. - * - * @param aLibNames is the list of legacy library names. - * @param aErrorMsg is a pointer to a wxString object to store the URIs of any missing - * legacy library paths. Can be NULL. - * @return true if there are missing legacy libraries. Otherwise false. - */ - bool MissingLegacyLibs( const wxArrayString& aLibNames, wxString* aErrorMsg = NULL ); - /** * Function ConvertFromLegacy - * converts the footprint names in \a aNetList from the legacy fromat to the #FPID format. + * converts the footprint names in \a aNetList from the legacy format to the #FPID format. * * @param aNetList is the #NETLIST object to convert. * @param aLibNames is the list of legacy footprint library names from the currently loaded @@ -524,11 +511,11 @@ public: * @param aReporter is the #REPORTER object to dump messages into. * @return true if all footprint names were successfully converted to a valid FPID. */ - bool ConvertFromLegacy( NETLIST& aNetList, const wxArrayString& aLibNames, - REPORTER* aReporter = NULL ) throw( IO_ERROR ); + bool ConvertFromLegacy( SEARCH_STACK& aSStack, NETLIST& aNetList, + const wxArrayString& aLibNames, REPORTER* aReporter = NULL ) throw( IO_ERROR ); /** - * Function ExpandEnvSubsitutions + * Function ExpandSubstitutions * replaces any environment variable references with their values and is * here to fully embellish the ROW::uri in a platform independent way. * This enables (fp_lib_table)s to have platform dependent environment @@ -561,16 +548,7 @@ public: * Function GetFileName * @return the footprint library file name. */ - static const wxString& GetFileName(); - - static void SetProjectPathEnvVariable( const wxFileName& aPath ); - - /** - * Function ProjectPathEnvVarVariableName - * returns the name of the environment variable used to hold the directory of - * the current project on program startup. - */ - static const wxString ProjectPathEnvVariableName(); + static const wxString GetFileName(); /** * Function GlobalPathEnvVarVariableName @@ -582,7 +560,7 @@ public: */ static const wxString GlobalPathEnvVariableName(); - static wxString GetProjectFileName( const wxFileName& aPath ); + static wxString GetProjectTableFileName( const wxString& aProjectFullName ); /** * Function Load @@ -640,4 +618,7 @@ protected: FP_LIB_TABLE* fallBack; }; + +extern FP_LIB_TABLE GFootprintTable; // KIFACE scope. + #endif // FP_LIB_TABLE_H_ diff --git a/include/gestfich.h b/include/gestfich.h index 4d6403e29d..324a767eb0 100644 --- a/include/gestfich.h +++ b/include/gestfich.h @@ -112,7 +112,7 @@ void AddDelimiterString( wxString& string ); wxString FindKicadHelpPath(); /** - * Function ReturnKicadDatasPath + * Function KicadDatasPath * returns the data path common to KiCad. * If environment variable KICAD is defined (KICAD = path to kicad) * Returns \ /; @@ -122,7 +122,7 @@ wxString FindKicadHelpPath(); * Note: * The \\ are replaced by / (a la Unix) */ -wxString ReturnKicadDatasPath(); +wxString KicadDatasPath(); /** * Function FindKicadFile diff --git a/include/hotkey_grid_table.h b/include/hotkey_grid_table.h index 8856a18520..27fbbcfb9c 100644 --- a/include/hotkey_grid_table.h +++ b/include/hotkey_grid_table.h @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include diff --git a/include/hotkeys_basic.h b/include/hotkeys_basic.h index f070441de4..fe1715f448 100644 --- a/include/hotkeys_basic.h +++ b/include/hotkeys_basic.h @@ -113,7 +113,7 @@ void AddHotkeyConfigMenu( wxMenu* menu ); void HandleHotkeyConfigMenuSelection( EDA_DRAW_FRAME* frame, int id ); /** - * Function ReturnKeyNameFromKeyCode + * Function KeyNameFromKeyCode * return the key name from the key code * * Only some wxWidgets key values are handled for function key ( see * s_Hotkey_Name_List[] ) @@ -121,27 +121,27 @@ void HandleHotkeyConfigMenuSelection( EDA_DRAW_FRAME* frame, int id ); * @param aIsFound = a pointer to a bool to return true if found, or false. an be NULL default) * @return the key name in a wxString */ -wxString ReturnKeyNameFromKeyCode( int aKeycode, bool * aIsFound = NULL ); +wxString KeyNameFromKeyCode( int aKeycode, bool * aIsFound = NULL ); /** - * Function ReturnKeyNameFromCommandId + * Function KeyNameFromCommandId * return the key name from the Command id value ( m_Idcommand member value) * @param aList = pointer to a EDA_HOTKEY list of commands * @param aCommandId = Command Id value * @return the key name in a wxString */ -wxString ReturnKeyNameFromCommandId( EDA_HOTKEY** aList, int aCommandId ); +wxString KeyNameFromCommandId( EDA_HOTKEY** aList, int aCommandId ); /** - * Function ReturnKeyCodeFromKeyName + * Function KeyCodeFromKeyName * return the key code from its key name * Only some wxWidgets key values are handled for function key * @param keyname = wxString key name to find in s_Hotkey_Name_List[], * like F2 or space or an usual (ascii) char. * @return the key code */ -int ReturnKeyCodeFromKeyName( const wxString& keyname ); +int KeyCodeFromKeyName( const wxString& keyname ); /* An helper enum for AddHotkeyName function * In menus we can an a hot key, or an accelerator , or sometimes just a comment diff --git a/include/import_export.h b/include/import_export.h index eed48fb797..57de9f9ef7 100644 --- a/include/import_export.h +++ b/include/import_export.h @@ -24,7 +24,9 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -// macros which export functions from a DLL/DSO. + +/// Macros which export functions from a DLL/DSO. +/// See: http://gcc.gnu.org/wiki/Visibility #if defined(__MINGW32__) #define APIEXPORT __declspec(dllexport) @@ -32,6 +34,7 @@ #define APILOCAL #elif defined(__GNUC__) && __GNUC__ >= 4 + // On ELF, we compile with hidden visibility, so unwrap that for specific symbols: #define APIEXPORT __attribute__ ((visibility("default"))) #define APIIMPORT __attribute__ ((visibility("default"))) #define APILOCAL __attribute__ ((visibility("hidden"))) @@ -44,8 +47,9 @@ #endif -#if defined(test_EXPORTS) || defined(COMPILING_DLL) - // above defined by CMake magically when compiling implementation. +#if defined(COMPILING_DLL) + // Be sure and define COMPILING_DLL when compiling implementation, and NOT when + // compiling the client. #define MY_API(rettype) APIEXPORT rettype #else #define MY_API(rettype) APIIMPORT rettype diff --git a/include/kiface_i.h b/include/kiface_i.h new file mode 100644 index 0000000000..b0b455f971 --- /dev/null +++ b/include/kiface_i.h @@ -0,0 +1,141 @@ +#ifndef KIFACE_I_H_ +#define KIFACE_I_H_ + +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 1992-2014 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 +#include + + +/** + * Class KIFACE_I + * is a KIFACE (I)mplementation, + * with some features useful for DSOs which implement a KIFACE. + * It is abstract, a few functions must be implemented in derivations. + */ +class KIFACE_I : public KIFACE +{ +public: + + //--------------------------------------------------------------- + + // see base class KIFACE in kiway.h for doxygen docs + + VTBL_ENTRY bool OnKifaceStart( PGM_BASE* aProgram ) = 0; + /* + { + typically call start_common() in your overload + return start_common(); + } + */ + + VTBL_ENTRY void OnKifaceEnd() + { + // overload this if you want, end_common() may be handy. + end_common(); + } + + VTBL_ENTRY wxWindow* CreateWindow( wxWindow* aParent, + int aClassId, KIWAY* aKIWAY, int aCtlBits = 0 ) = 0; + + VTBL_ENTRY void* IfaceOrAddress( int aDataId ) = 0; + + //-------------------------------------------------------------- + + // The remainder are DSO specific helpers, not part of the KIFACE API + + /** + * Constructor + * + * @param aKifaceName should point to a C string in permanent storage, + * which contains the name of the DSO. Examples: "eeschema", "pcbnew", etc. + * This controls the name of the wxConfigBase established in m_kiway_settings, + * so it should be lowercase. + */ + KIFACE_I( const char* aKifaceName, KIWAY::FACE_T aId ) : + m_id( aId ), + m_bm( aKifaceName ) + { + } + + // ~KIFACE_I(); + +protected: + + /// Common things to do for a top program module, during OnKifaceStart(). + bool start_common(); + + /// Common things to do for a top program module, during OnKifaceEnd(); + void end_common(); + + // From here down should probably not be in a KIFACE, even though they + // are DSO specific, they have nothing to do with KIWAY's use of KIFACE, + // so its a questionable choice to put non KIWAY client code in this class. + +public: + + const wxString Name() { return wxString::FromUTF8( m_bm.m_name ); } + + wxConfigBase* KifaceSettings() const { return m_bm.m_config; } + + const wxString& GetHelpFileName() const { return m_bm.m_help_file; } + void SetHelpFileName( const wxString& aFileName ) { m_bm.m_help_file = aFileName; } + + /** + * Function GetHelpFile + * gets the help file path. + *

+ * Return the KiCad help file with path. The base paths defined in + * m_searchPaths are tested for a valid file. The path returned can + * be relative depending on the paths added to m_searchPaths. See the + * documentation for wxPathList for more information. If the help file + * for the current locale is not found, an attempt to find the English + * version of the help file is made. + * wxEmptyString is returned if help file not found. + * Help file is searched in directories in this order: + * help/\ like help/en_GB + * help/\ like help/en + * help/en + *

+ */ + wxString GetHelpFile(); + + wxFileHistory& GetFileHistory() { return m_bm.m_history; } + + /// Only for DSO specific 'non-library' files. + /// (The library search path is in the PROJECT class.) + SEARCH_STACK& KifaceSearch() { return m_bm.m_search; } + +private: + KIWAY::FACE_T m_id; + + BIN_MOD m_bm; +}; + + +/// Global KIFACE_I "get" accessor. +KIFACE_I& Kiface(); + +#endif // KIFACE_I_H_ diff --git a/include/kiway.h b/include/kiway.h index efef894340..dd83cc93f7 100644 --- a/include/kiway.h +++ b/include/kiway.h @@ -99,21 +99,18 @@ as such! As such, it is OK to use UTF8 characters: #include #include #include +#include +#include #define VTBL_ENTRY virtual -#define KIFACE_VERSION 1 -#define KIFACE_GETTER KIFACE_1 +#define KIFACE_VERSION 1 +#define KIFACE_GETTER KIFACE_1 // The KIFACE acquistion function is declared extern "C" so its name should not -// be mangled (much). Windows has leading underscore for our C function. -// Keep the trailing version number in sync with the KIFACE_GETTER define above. -#if defined(__MINGW32__) - #define KIFACE_INSTANCE_NAME_AND_VERSION "_KIFACE_1" -#else - #define KIFACE_INSTANCE_NAME_AND_VERSION "KIFACE_1" -#endif +// be mangled. +#define KIFACE_INSTANCE_NAME_AND_VERSION "KIFACE_1" #if defined(__linux__) @@ -127,40 +124,17 @@ as such! As such, it is OK to use UTF8 characters: #endif -/** - * Class PROJECT - * holds project specific data. Because it is in the neutral program top, which - * is not linked to by subsidiarly DSOs, any functions in this interface must - * be VTBL_ENTRYs. - */ -class PROJECT -{ - -public: - -#if 0 - /// Derive PROJECT elements from this, it has a virtual destructor, and - /// Elem*() functions can work with it. - class ELEM_BASE - { - public: - virtual ~ELEM_BASE() {} - }; - - VTBL_ENTRY int ElemAllocNdx(); - VTBL_ENTRY void ElemSet( int aIndex, ELEMENT_BASE* aBlock ); - VTBL_ENTRY ELEM_BASE* ElemGet( int aIndex ) -#endif -}; +class wxConfigBase; class KIWAY; class wxWindow; -class wxApp; +class PGM_BASE; +class wxConfigBase; /** - * Struct KIFACE + * Class KIFACE * is used by a participant in the KIWAY alchemy. KIWAY is a minimalistic * software bus for communications between various DLLs/DSOs (DSOs) within the same * KiCad process. It makes it possible to call between DSOs without having to link @@ -173,36 +147,72 @@ class wxApp; */ struct KIFACE { - // Do not change the order of functions in this listing, add new ones at - // the end, unless you recompile all of KiCad. + // The order of functions establishes the vtable sequence, do not change the + // order of functions in this listing unless you recompile all clients of + // this interface. + + /** + * Function OnKifaceStart + * is called just once shortly after the DSO is loaded. It is the second + * function called, immediately after the KIFACE_GETTER(). However before + * either of those, static C++ constructors are called. The DSO implementation + * should do process level initialization here, not project specific since there + * will be multiple projects open eventually. + * + * @param aProcess is the process block: PGM_BASE* + * + * @return bool - true if DSO initialized OK, false if not. When returning + * false, the loader may optionally decide to terminate the process or not, + * but will not put out any UI because that is the duty of this function to say + * why it is returning false. Never return false without having reported + * to the UI why. + */ + VTBL_ENTRY bool OnKifaceStart( PGM_BASE* aProgram ) = 0; + + /** + * Function OnKifaceEnd + * is called just once just before the DSO is to be unloaded. It is called + * before static C++ destructors are called. A default implementation is supplied. + * + * @param aProcess is the process block: PGM_BASE* + */ + VTBL_ENTRY void OnKifaceEnd() = 0; #define KFCTL_STANDALONE (1<<0) ///< Am running as a standalone Top. /** * Function CreateWindow - * creates a wxTopLevelWindow for the current project. The caller + * creates a wxWindow for the current project. The caller * must cast the return value into the known type. * - * @param aClassId identifies which wxFrame or wxDialog to retrieve. + * @param aParent may be NULL, or is otherwise the parent to connect under. If NULL + * then caller may want to connect the returned wxWindow into some hierarchy after + * this function returns. + * + * @param aClassId identifies which wxFrame or wxDialog to retrieve, using a value + * known to the implementing KIFACE. * * @param aKIWAY tells the window which KIWAY (and PROJECT) it is a participant in. * - * @param aCtlBits consists of bit flags from the set KFCTL_* #defined above. + * @param aCtlBits consists of bit flags from the set of KFCTL_* #defines above. * - * @return wxWindow* - and if not NULL, should be cast into the known type. + * @return wxWindow* - and if not NULL, should be cast into the known type using + * dynamic_cast<>(). */ - VTBL_ENTRY wxWindow* CreateWindow( int aClassId, KIWAY* aKIWAY, int aCtlBits = 0 ) = 0; + VTBL_ENTRY wxWindow* CreateWindow( wxWindow* aParent, int aClassId, + KIWAY* aKIWAY, int aCtlBits = 0 ) = 0; /** * Function IfaceOrAddress - * return a pointer to the requested object. The safest way to use this + * returns a pointer to the requested object. The safest way to use this * is to retrieve a pointer to a static instance of an interface, similar to * how the KIFACE interface is exported. But if you know what you are doing - * use it to retrieve anything you want. + * use it to retrieve anything you want. Segfaults are your fault. * - * @param aDataId identifies which object you want the address of. + * @param aDataId identifies which object you want the address of, and consists + * of choices known in advance by the implementing KIFACE. * - * @return void* - and must be cast into the know type. + * @return void* - and must be cast into the known type. */ VTBL_ENTRY void* IfaceOrAddress( int aDataId ) = 0; }; @@ -213,17 +223,23 @@ struct KIFACE * is a minimalistic software bus for communications between various * DLLs/DSOs (DSOs) within the same KiCad process. It makes it possible * to call between DSOs without having to link them together, and without - * having to link to the top process module which houses the KIWAY(s). It also - * makes it possible to send custom wxEvents between DSOs and from the top + * having to link to the top process module which houses the KIWAY(s). More importantly + * it makes it possible to send custom wxEvents between DSOs and from the top * process module down into the DSOs. The latter capability is thought useful * for driving the lower DSOs from a python test rig or for demo (automaton) purposes. *

- * Most all calls are via virtual functions which means C++ vtables + * Most all calls are via virtual functions, which means C++ vtables * are used to hold function pointers and eliminate the need to link to specific * object code libraries, speeding development and encouraging clearly defined - * interface design. There is one KIWAY in the launching portion of the process - * for each open KiCad project. Each project has its own KIWAY. Within a KIWAY - * is an actual PROJECT data structure. + * interface design. Unlike Microsoft COM, which is a multi-vendor design supporting + * DLL's built at various points in time. The KIWAY alchemy is single project, with + * all components being built at the same time. So one should expect solid compatibility + * between all KiCad components, as long at they are compiled at the same time. + *

+ * There is one KIWAY in the launching portion of the process + * for each open KiCad project. Each project has its own KIWAY. Available to + * each KIWAY is an actual PROJECT data structure. If you have a KIWAY, you + * can get to the PROJECT using KIWAY::Prj(). *

* In summary, a KIWAY facilitates communicating between DSOs, where the topic * of the communication is project specific. Here a "project" means a BOARD @@ -237,19 +253,38 @@ public: /// DSO players on *this* KIWAY enum FACE_T { - FACE_SCH, ///< _eeschema DSO + FACE_SCH, ///< eeschema DSO // FACE_LIB, - FACE_PCB, ///< _pcbnew DSO + FACE_PCB, ///< pcbnew DSO // FACE_MOD, + FACE_CVPCB, + FACE_BMP2CMP, + FACE_GERBVIEW, + FACE_PL_EDITOR, + FACE_PCB_CALCULATOR, - FACE_COUNT ///< how many KIWAY player types + FACE_COUNT, ///< how many KIWAY player types }; + /* from edaappl.h, now pgm_base.h, obsoleted by above FACE_T enum. + enum PGM_BASE_T + { + APP_UNKNOWN, + APP_EESCHEMA, + APP_PCBNEW, + APP_CVPCB, + APP_GERBVIEW, + APP_KICAD, + APP_PL_EDITOR, + APP_BM2CMP, + }; + */ + // Don't change the order of these VTBL_ENTRYs, add new ones at the end, // unless you recompile all of KiCad. VTBL_ENTRY KIFACE* KiFACE( FACE_T aFaceId, bool doLoad ); - VTBL_ENTRY PROJECT& Project(); + VTBL_ENTRY PROJECT& Prj() const; KIWAY(); @@ -261,11 +296,11 @@ private: // one for each FACE_T static wxDynamicLibrary s_sch_dso; static wxDynamicLibrary s_pcb_dso; - //static wxDynamicLibrary s_cvpcb_dso; // will get merged into pcbnew + //static wxDynamicLibrary s_cvpcb_dso; // will get merged into pcbnew KIFACE* m_dso_players[FACE_COUNT]; - PROJECT m_project; + PROJECT m_project; // do not assume this is here, use Prj(). }; @@ -280,12 +315,12 @@ private: * * @param aKIFACEversion is where to put the API version implemented by the KIFACE. * @param aKIWAYversion tells the KIFACE what KIWAY version will be available. - * @param aProcess is a pointer to the basic wxApp for this process. + * @param aProcess is a pointer to the PGM_BASE for this process. * @return KIFACE* - unconditionally. */ -typedef KIFACE* KIFACE_GETTER_FUNC( int* aKIFACEversion, int aKIWAYversion, wxApp* aProcess ); +typedef KIFACE* KIFACE_GETTER_FUNC( int* aKIFACEversion, int aKIWAYversion, PGM_BASE* aProgram ); /// No name mangling. Each TOPMOD will implement this once. -extern "C" KIFACE* KIFACE_GETTER( int* aKIFACEversion, int aKIWAYversion, wxApp* aProcess ); +extern "C" KIFACE* KIFACE_GETTER( int* aKIFACEversion, int aKIWAYversion, PGM_BASE* aProgram ); #endif // KIWAY_H_ diff --git a/include/kiway_player.h b/include/kiway_player.h new file mode 100644 index 0000000000..1798b1ba56 --- /dev/null +++ b/include/kiway_player.h @@ -0,0 +1,160 @@ +#ifndef KIWAY_PLAYER_H_ +#define KIWAY_PLAYER_H_ + +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2014 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 + */ + +#include +#include +#include + + +class KIWAY; +class PROJECT; +struct KIFACE; +class KIFACE_I; + + +/** + * Class KIWAY_HOLDER + * is a mix in class which holds the location of a wxWindow's KIWAY. It allows + * calls to Kiway() and SetKiway(). + * + * Known to be used in at least DIALOG_SHIM and KIWAY_PLAYER classes. + */ +class KIWAY_HOLDER +{ +public: + KIWAY_HOLDER( KIWAY* aKiway ) : + m_kiway( aKiway ) + {} + + /** + * Function Kiway + * returns a reference to the KIWAY that this object has an opportunity + * to participate in. A KIWAY_HOLDER is not necessarily a KIWAY_PLAYER. + */ + KIWAY& Kiway() const + { + wxASSERT( m_kiway ); // smoke out bugs in Debug build, then Release runs fine. + return *m_kiway; + } + + /** + * Function Prj + * returns a reference to the PROJECT "associated with" this KIWAY. + */ + PROJECT& Prj() const; // coded in kiface_i.cpp for now + + /** + * Function SetKiway + * + * @param aDest is the recipient of aKiway pointer. + * It is only used for debugging, since "this" is not a wxWindow*. "this" is + * a KIWAY_HOLDER mix-in. + * + * @param aKiway is often from a parent window, or from KIFACE::CreateWindow(). + */ + void SetKiway( wxWindow* aDest, KIWAY* aKiway ); // in kiface_i.cpp for now + +private: + // private, all setting is done through SetKiway(). + KIWAY* m_kiway; // no ownership. +}; + + +/** + * Class KIWAY_PLAYER + * is a wxFrame capable of the OpenProjectFiles function, meaning it can load + * a portion of a KiCad project. Because this class provides a dummy implementation, + * it is not a certainty that all classes which inherit from this clas intend to + * participate in a KIWAY. Those that do must actually interact with the provided + * KIWAY*. + *

+ * EDA_BASE_FRAME would not have sufficed because BM2CMP_FRAME_BASE is not + * derived from it. + */ +class KIWAY_PLAYER : public EDA_BASE_FRAME, public KIWAY_HOLDER +{ +public: + KIWAY_PLAYER( KIWAY* aKiway, wxWindow* aParent, ID_DRAWFRAME_TYPE aFrameType, + const wxString& aTitle, const wxPoint& aPos, const wxSize& aSize, + long aStyle, const wxString& aWdoName = wxFrameNameStr ) : + EDA_BASE_FRAME( aParent, aFrameType, aTitle, aPos, aSize, aStyle, aWdoName ), + KIWAY_HOLDER( aKiway ) + {} + + /// Don't use this one, only wxformbuilder uses it, and it must be augmented with + /// a SetKiway() early in derived constructor. + KIWAY_PLAYER( wxWindow* aParent, wxWindowID aId, const wxString& aTitle, + const wxPoint& aPos, const wxSize& aSize, long aStyle, + const wxString& aWdoName = wxFrameNameStr ) : + EDA_BASE_FRAME( aParent, (ID_DRAWFRAME_TYPE) aId, aTitle, aPos, aSize, aStyle, aWdoName ), + KIWAY_HOLDER( 0 ) + {} + + + // For the aCtl argument of OpenProjectFiles() +#define KICTL_OPEN_APPEND (1<<0) ///< append the data file, rather than replace +#define KICTL_EAGLE_BRD (1<<1) ///< chosen *.brd file is Eagle according to user. + + /** + * Function OpenProjectFiles + * is abstract, and opens a project or set of files given by @a aFileList. + * This is generalized in the direction of worst case. In a typical case + * @a aFileList will only hold a single file, like "myboard.kicad_pcb", + * because any KIWAY_PLAYER is only in one KIWAY and the KIWAY owns the + * PROJECT. Therefore opening files from multiple projects into the same + * KIWAY_PLAYER is precluded. + *

+ * Each derived class should handle this in a way specific to its needs. + * No prompting is done inside here for any file or project. There is no + * need to call this with aFileList which is empty. + *

+ * After loading the window should update its Title as part of this operation. + * If the KIWAY_PLAYER needs to, it can load the *.pro file as part of this operation. + *

+ * If the KIWAY_PLAYER cannot load any of the file(s) in the list, then it + * should say why through some GUI interface, and return false. + * + * @param aFileList includes files that this frame should open + * according to the knowledge in the derived wxFrame. In almost every case, + * the list will have only a single file in it. + * + * @return bool - true if all requested files were opened OK, else false. + */ + virtual bool OpenProjectFiles( const std::vector& aFileList, int aCtl = 0 ) + { + // overload me for your wxFrame type. + + // Any overload should probably do this also: + // Prj().MaybeLoadProjectSettings(); + + // Then update the window title. + + return false; + } +}; + +#endif // KIWAY_PLAYER_H_ diff --git a/include/layers_id_colors_and_visibility.h b/include/layers_id_colors_and_visibility.h index d421e6cf4e..196cb54cd1 100644 --- a/include/layers_id_colors_and_visibility.h +++ b/include/layers_id_colors_and_visibility.h @@ -358,7 +358,7 @@ inline bool IsBackLayer( LAYER_NUM aLayer ) } /** - * Function ReturnFlippedLayerNumber + * Function FlippedLayerNumber * @return the layer number after flipping an item * some (not all) layers: external copper, Mask, Paste, and solder * are swapped between front and back sides diff --git a/include/pgm_base.h b/include/pgm_base.h new file mode 100644 index 0000000000..096ff2e3ee --- /dev/null +++ b/include/pgm_base.h @@ -0,0 +1,270 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com + * Copyright (C) 2008-2011 Wayne Stambaugh + * Copyright (C) 1992-2011 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 + */ + +/** + * @file pgm_base.h + * @brief see class PGM_BASE + */ + +#ifndef PGM_BASE_H_ +#define PGM_BASE_H_ + +#include +#include +#include + + +class wxConfigBase; +class wxSingleInstanceChecker; +class wxHtmlHelpController; +class wxApp; +class wxMenu; + +// inter program module calling +#define VTBL_ENTRY virtual + + +/** + * Class PGM_BASE + * keeps program (whole process) data for KiCad programs. + * The VTBL_ENTRY functions are VTBL_ENTRY so we can do cross module calls + * without linking to them. This used to be a wxApp derivative, but that + * is difficult under wxPython which shapes the wxApp. So now this is a "side-car" + * (like a motorcycle side-car) object with a back pointer into the wxApp + * which initializes it. + *

+ * OnPgmStart() is virtual, may be overridden, and parallels + * wxApp::OnInit(), from where it should called. + *

+ * OnPgmEnd() is virtual, may be overridden, and parallels wxApp::OnExit(), + * from where it should be called. + */ +class PGM_BASE +{ +public: + PGM_BASE(); + ~PGM_BASE(); + + /** + * Function OnPgmInit + * this is the first executed function (like main() ) + * @return true if the application can be started. + */ + virtual bool OnPgmInit( wxApp* aWxApp ) = 0; // call this from wxApp::OnInit() + + virtual void OnPgmExit() = 0; // call this from wxApp::OnExit() + + /** + * Function MacOpenFile + * is specific to MacOSX (not used under Linux or Windows). + * MacOSX requires it for file association. + * @see http://wiki.wxwidgets.org/WxMac-specific_topics + */ + virtual void MacOpenFile( const wxString& aFileName ) = 0; + + //--------------------------------------------------------- + + VTBL_ENTRY wxHtmlHelpController* GetHtmlHelpController() { return m_html_ctrl; } + + VTBL_ENTRY void SetHtmlHelpController( wxHtmlHelpController* aController ); + + VTBL_ENTRY wxConfigBase* CommonSettings() const { return m_common_settings; } + + VTBL_ENTRY void SetEditorName( const wxString& aFileName ); + + /** + * Return the preferred editor name. + */ + VTBL_ENTRY const wxString& GetEditorName(); + + VTBL_ENTRY bool IsKicadEnvVariableDefined() const { return !m_kicad_env.IsEmpty(); } + + VTBL_ENTRY const wxString& GetKicadEnvVariable() const { return m_kicad_env; } + + VTBL_ENTRY const wxString& GetExecutablePath() const { return m_bin_dir; } + + VTBL_ENTRY wxLocale* GetLocale() { return m_locale; } + + VTBL_ENTRY const wxString& GetPdfBrowserName() const { return m_pdf_browser; } + + VTBL_ENTRY void SetPdfBrowserName( const wxString& aFileName ) { m_pdf_browser = aFileName; } + + VTBL_ENTRY bool UseSystemPdfBrowser() const { return m_pdf_browser.IsEmpty(); } + + /** + * Function SetLanguage + * sets the dictionary file name for internationalization. + *

+ * The files are in kicad/internat/xx or kicad/internat/xx_XX and are named kicad.mo + *

+ * @param first_time must be set to true the first time this funct is + * called, false otherwise + * @return true if the language can be set (i.e. if the locale is available) + */ + VTBL_ENTRY bool SetLanguage( bool first_time = false ); + + /** + * Function AddMenuLanguageList + * creates a menu list for language choice, and add it as submenu to \a MasterMenu. + * + * @param MasterMenu The main menu. The sub menu list will be accessible from the menu + * item with id ID_LANGUAGE_CHOICE + */ + VTBL_ENTRY void AddMenuLanguageList( wxMenu* MasterMenu ); + + /** + * Function SetLanguageIdentifier + * sets in .m_language_id member the wxWidgets language identifier Id from + * the KiCad menu id (internal menu identifier). + * + * @param menu_id The KiCad menuitem id (returned by Menu Event, when + * clicking on a menu item) + */ + VTBL_ENTRY void SetLanguageIdentifier( int menu_id ); + + VTBL_ENTRY void SetLanguagePath(); + + /** + * Function InitOnLineHelp + * initializes KiCad's online help. + */ + VTBL_ENTRY void InitOnLineHelp(); + + /** + * Function ReadPdfBrowserInfos + * reads the PDF browser choice from the common configuration. + */ + VTBL_ENTRY void ReadPdfBrowserInfos(); + + /** + * Function WritePdfBrowserInfos + * saves the PDF browser choice to the common configuration. + */ + VTBL_ENTRY void WritePdfBrowserInfos(); + + /** + * Function LockFile + * marks a file as being in use. + * @param aFileName = full path to the file. + * @return false if the file was already locked, true otherwise. + */ + VTBL_ENTRY bool LockFile( const wxString& aFileName ); + + /** + * Function App + * returns a bare naked wxApp, which may come from wxPython, SINGLE_TOP, or kicad.exe. + * Use this function instead of wxGetApp(). + */ + VTBL_ENTRY wxApp& App() + { + wxASSERT( m_wx_app ); + return *m_wx_app; + } + + //-------------------------------------------------------- + + static const wxChar workingDirKey[]; + +protected: + + /** + * Function initPgm + * initializes this program (process) in a KiCad standard way, + * using some generalized techniques. + * - Default paths (help, libs, bin) and configuration file names + * - Language and locale + * - fonts + *

+ * But nothing relating to DSOs or projects. + * @return bool - true if success, false if failure and program is to terminate. + */ + bool initPgm(); + + /** + * Function loadCommonSettings + * loads the program (process) settings subset which are stored in .kicad_common + */ + void loadCommonSettings(); + + /** + * Function saveCommonSettings + * saves the program (process) settings subset which are stored .kicad_common + */ + void saveCommonSettings(); + + /// prevents multiple instances of a program from being run at the same time. + wxSingleInstanceChecker* m_pgm_checker; + + /// prevents opening the same file multiple times. + wxSingleInstanceChecker* m_file_checker; + + /// Configuration settings common to all KiCad program modules, + /// like as in $HOME/.kicad_common + wxConfigBase* m_common_settings; + + /// full path to this program + wxString m_bin_dir; + + /// The KICAD system environment variable. + wxString m_kicad_env; + + /// The current locale. + wxLocale* m_locale; + + /// The current language setting. + int m_language_id; + + /// Trap all changes in here, simplifies debugging + void setLanguageId( int aId ) { m_language_id = aId; } + + /** + * Function setExecutablePath + * finds the path to the executable and stores it in PGM_BASE::m_bin_dir + * @return bool - true if success, else false. + */ + bool setExecutablePath(); + + /// The file name of the the program selected for browsing pdf files. + wxString m_pdf_browser; + wxString m_editor_name; + wxSize m_help_size; + + wxHtmlHelpController* m_html_ctrl; + + wxApp* m_wx_app; + + // The PGM_* classes can have difficulties at termination if they + // are not destroyed soon enough. Relying on a static destructor can be + // too late for contained objects like wxSingleInstanceChecker. + void destroy(); +}; + + +#if !defined(PGM_KICAD_H_) // PGM_KICAD has an alternate +/// The global Program "get" accessor. +extern PGM_BASE& Pgm(); +#endif + +#endif // PGM_BASE_H_ diff --git a/include/project.h b/include/project.h new file mode 100644 index 0000000000..a187aa5491 --- /dev/null +++ b/include/project.h @@ -0,0 +1,255 @@ +#ifndef PROJECT_H_ +#define PROJECT_H_ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 KiCad Developers, see CHANGELOG.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 +#include +#include +#include + +/// A variable name whose value holds the current project directory. +/// Currently an environment variable, eventually a project variable. +#define PROJECT_VAR_NAME wxT( "KIPRJMOD" ) + + +class wxConfigBase; +class PARAM_CFG_ARRAY; + + +#define VTBL_ENTRY virtual + +/** + * Class PROJECT + * holds project specific data. Because it is in the neutral program top, which + * is not linked to by subsidiarly DSOs, any functions in this interface must + * be VTBL_ENTRYs. + */ +class PROJECT +{ +public: + + /// Derive PROJECT elements from this, it has a virtual destructor, and + /// Elem*() functions can work with it. Implementation is opaque in + /// class PROJECT. If find you have to include derived class headers in this + /// file, you are doing something wrong. Keep knowledge of derived classes + /// opaque to class PROJECT please. + class _ELEM + { + public: + virtual ~_ELEM() {} + }; + + PROJECT(); + ~PROJECT(); + + // VTBL_ENTRY bool MaybeLoadProjectSettings( const std::vector& aFileSet ); + + /** + * Function SetProjectFullName + * sets the: + * 1) full directory, 2) basename, and 3) extension of the project. This is + * the name of the *.pro file with full absolute path and it also defines + * the name of the project. The project name and the *.pro file names are + * exactly the same, providing the *.pro filename is absolute. + */ + VTBL_ENTRY void SetProjectFullName( const wxString& aFullPathAndName ); + + /** + * Function GetProjectFullName + * returns the full path and name of the project. This is the same as the + * name of the *.pro file and will always be an absolute path. + */ + VTBL_ENTRY const wxString GetProjectFullName() const; + + /** + * Function ConfigSave + * saves the current "project" parameters into the wxConfigBase* derivative. + * Then the wxConfigBase derivative is written to the *.pro file for the project. + * + * @param aSearchS a SEARCH_STACK + * @param aFileName is where to save the *.pro file. + * @param aGroupName + * @param aParams is a ptr vector of PARAM_CFG_BASE derivatives. + * Saved parameters are the subset in this array having the .m_Setup member + * set to false. + */ + VTBL_ENTRY void ConfigSave( const SEARCH_STACK& aSearchS, const wxString& aFileName, + const wxString& aGroupName, const PARAM_CFG_ARRAY& aParams ); + + /** + * Function ConfigLoad + * reads a subset of parameters from the "project" file. Parameters are the + * subset of variables given in @a aParams array which have the .m_Setup member + * set to false. The file which is read in and then extracted from is the + * '*.pro' file for the project. + *

+ * set: + * m_pro_date_and_time + * m_pro_name + * + * @param aSearchS a SEARCH_STACK where a kicad.pro template file may be found. + * @param aLocalConfigFileName + * @param aGroupName + * @param aParams is ptr vector of PARAM_CFG_BASE derivatives. + * @param doLoadOnlyIfNew if true, then this file is read only if it differs from + * the current config on date (different dates), else the *.pro file is read and + * extracted from unconditionally. + * + * @return bool - true if loaded OK. + */ + VTBL_ENTRY bool ConfigLoad( const SEARCH_STACK& aSearchS, const wxString& aLocalConfigFileName, + const wxString& aGroupName, const PARAM_CFG_ARRAY& aParams, bool doLoadOnlyIfNew ); + + /// Accessor for Eeschema search stack. + VTBL_ENTRY SEARCH_STACK& SchSearchS() { return m_sch_search; } + + /** + * Function PcbSearchS + * returns the obsolete footprint library search stack. + * Projects created before the FP_LIB_TABLE support will have footprint + * search paths in the *.pro files. Projects created after the FP_LIB_TABLE + * support will not. This stack is used for conversion from old to new only. + */ + VTBL_ENTRY SEARCH_STACK& PcbSearchS() { return m_pcb_search; } + + VTBL_ENTRY wxString GetModuleLibraryNickname() { return m_module_library_nickname; } + VTBL_ENTRY void SetModuleLibraryNickname( const wxString& aNickName ) { m_module_library_nickname = aNickName; } + + /// Retain a number of paths for user convienience, enumerated here: + enum RETPATH_T + { + DOC, + SCH_LIB, + PCB_LIB, + VIEWER_3D, + + RPATH_COUNT + }; + + /// Give acess to a RETAINED_PATH using enum RETPATH_T + VTBL_ENTRY RETAINED_PATH& RPath( RETPATH_T aPath ); + + /** + * Enum ELEM_T + * is the set of _ELEMs that a PROJECT can hold. + */ + enum ELEM_T + { + FPTBL, + + ELEM_COUNT + }; + + /** + * A PROJECT can hold stuff it knows nothing about, in the form of + * _ELEM derivatives. This function gives access to a PROJECT::_ELEM using + * enum ELEM_T as an index. + *

+ * Acts as setter iff aElem is not NULL, else getter. + *

+ * Typically wrapped somewhere else in a more meaningful function wrapper. + * This is a cross module API, therefore the _ELEM destructor is virtual and + * can point to a destructor function in another link image. Be careful that + * that program module is resident at time of destruction. + *

+ * Summary: 1) cross module API, 2) PROJECT knows nothing about _ELEM objects, + * except how to delete them and set and get pointers to them. + */ + VTBL_ENTRY _ELEM* Elem( ELEM_T aIndex, _ELEM* aElem = NULL ); + +private: + + /** + * Function configCreate + * creates or recreates the KiCad project file and wxConfigBase: + * + * .pro + * + * @param aFilename is a local configuration file path and basename. + * + * Initializes ? + * G_Prj_Config + * G_Prj_Config_LocalFilename + * G_Prj_Default_Config_FullFilename + * : + */ + wxConfigBase* configCreate( const SEARCH_STACK& aSearchS, + const wxString& aFilename, const wxString& aGroupName, + bool aForceUseLocalConfig ); + + SEARCH_STACK m_sch_search; ///< Eeschema's search paths + SEARCH_STACK m_pcb_search; ///< Pcbnew's obsolete footprint search paths, see comment above. + + wxFileName m_project_name; ///< /.pro + wxString m_pro_date_and_time; + + wxString m_module_library_nickname; ///< @todo move this into m_rpaths[] + + /// @see this::RPath() and enum RETPATH_T. + RETAINED_PATH m_rpaths[RPATH_COUNT]; + + /// @see this::Elem() and enum ELEM_T. + _ELEM* m_elems[ELEM_COUNT]; +}; + + +//-------------------------------------------------------------- + +#if 0 + VTBL_ENTRY int ElemAllocNdx(); + VTBL_ENTRY void ElemSet( int aIndex, ELEMENT_BASE* aBlock ); + VTBL_ENTRY ELEM_BASE* ElemGet( int aIndex ) + + /** + * Function Value + * fetches a project variable @a aVariable and returns true if that variable was + * found, else false. If not found, aFetchedValue is not touched. Any environment + * variable is also a project variable. + * + * @param aVariable is the property or option to look for. + * @param aFetchedValue is where to put the value of the property if it exists + * and aFetchedValue is not NULL. + * @return bool - true if variable was found, else false. + */ + VTBL_ENTRY bool Value( const wxString& aVariable, wxString* aFetchedValue = NULL ); + + /** + * Function Substitute + * replaces any project variable references found within @a aString with their + * values. Any referenced variable is first sought in the PROJECT space, and if + * not found, then sought in the environment. + */ + VTBL_ENTRY const wxString Substitute( const wxString& aString ); + + /** + * Function SubstituteAndEvaluate + * replaces any project variable references found within @a aString with their + * values, and evaluates aString as an expression. + * Any referenced variable is first sought in the PROJECT space, and if + * not found, then sought in the environment. + */ + VTBL_ENTRY const wxString SubstituteAndEvaluate( const wxString& aString ); +#endif + +#endif // PROJECT_H_ diff --git a/include/sch_base_frame.h b/include/sch_base_frame.h index e53634a28d..c0b2c32824 100644 --- a/include/sch_base_frame.h +++ b/include/sch_base_frame.h @@ -24,7 +24,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include +#include #include class PAGE_INFO; @@ -46,7 +46,7 @@ class LIB_EDIT_FRAME; class SCH_BASE_FRAME : public EDA_DRAW_FRAME { public: - SCH_BASE_FRAME( wxWindow* aParent, + SCH_BASE_FRAME( KIWAY* aKiway, wxWindow* aParent, ID_DRAWFRAME_TYPE aWindowType, const wxString& aTitle, const wxPoint& aPosition, const wxSize& aSize, diff --git a/include/search_stack.h b/include/search_stack.h new file mode 100644 index 0000000000..29cf8af7b5 --- /dev/null +++ b/include/search_stack.h @@ -0,0 +1,118 @@ +#ifndef SEARCH_STACK_H_ +#define SEARCH_STACK_H_ + +#include +#include + + +/** + * Class SEARCH_STACK + * looks for files in a number of places. Augments wxPathList. + * I chose the name because it sounded like a stack of work, as a reminder + * that anything you put in here means searching work at some point in time. + * (An alternative is to simply know where something is.) + */ +class SEARCH_STACK : public wxPathList +{ +public: + +#if defined(DEBUG) + void Show( const char* aPrefix ) const; +#endif + + /** + * Function FilenameWithRelativePathInSearchList + * @return a short filename (with extension) with only a relative path if + * this filename can be found in library paths + * @param aFullFilename The filename with path and extension. + */ + wxString FilenameWithRelativePathInSearchList( const wxString& aFullFilename ); + + wxString FindValidPath( const wxString& aFileName ) const + { +#if 1 // might not be needed + + if( wxFileName::FileExists( aFileName ) ) + return aFileName; + else +#endif + return wxPathList::FindValidPath( aFileName ); + } + + /** + * Function FindValidPath + * KiCad saves user defined library files that are not in the standard + * library search path list with the full file path. Calling the library + * search path list with a user library file will fail. This helper method + * solves that problem. + * @param fileName + * @return a wxEmptyString if library file is not found. + */ + wxString FindValidPath( const wxFileName& aFileName ) const + { + // call wxPathList::FindValidPath( const wxString& ); + return wxPathList::FindValidPath( aFileName.GetFullPath() ); + } + + /** + * Function AddPaths + * insert or append path(s) + * + * @param aPaths = path or path list to add. paths must be + * separated by ";" on windows, or ":" | ";" on unix. + * + * @param aIndex = insertion point, -1 for append. + */ + void AddPaths( const wxString& aPaths, int aIndex = -1 ); + + /** + * Function RemovePaths + * removes the given path(s) from the library path list + * @param aPaths = path or list of paths to remove. If list, paths must be separated by + * ";" on windows, or ":" | ";" on unix. + */ + void RemovePaths( const wxString& aPaths ); + + /** + * Function FindFileInSearchPaths + * looks in "this" for \a aFilename, but first modifies every search + * path by appending a list of path fragments from aSubdirs. That modification + * is not rentative. + */ + wxString FindFileInSearchPaths( const wxString& aFilename, + const wxArrayString* aSubdirs = NULL ); +}; + + +/** + * Class RETAINED_PATH + * is a glamorous way to save a path you might need in the future. + * It is simply a container for the two functions, if you can figure them out. + * This whole concept is awkward, and the two function might have better been + * non-member functions, simply globals. + */ +class RETAINED_PATH +{ +public: + + /** + * Function LastVisitedPath + * returns the last visited directory, or aSubPathToSearch is empty, the first + * path in lib path list ( but not the CWD ). + * @todo add more here if you can figure it out. + * + * @param aSearchStack gives the set of directories to consider. + * @param aSubPathToSearch is the preferred sub path to search in path list + */ + wxString LastVisitedPath( const SEARCH_STACK& aSStack, + const wxString& aSubPathToSearch = wxEmptyString ); + + void SaveLastVisitedPath( const wxString& aPath ); + + void Clear(); + +private: + wxString m_retained_path; +}; + +#endif // SEARCH_STACK_H_ diff --git a/include/wxBasePcbFrame.h b/include/wxBasePcbFrame.h index 23935428c8..5ec611b025 100644 --- a/include/wxBasePcbFrame.h +++ b/include/wxBasePcbFrame.h @@ -34,7 +34,7 @@ #include -#include +#include #include #include // EDA_DRAW_MODE_T #include @@ -86,11 +86,6 @@ protected: BOARD* m_Pcb; GENERAL_COLLECTOR* m_Collector; - /// The project footprint library table. This is a combination of the project - /// footprint library table and the global footprint table. This is the one to - /// use when finding a #MODULE. - FP_LIB_TABLE* m_footprintLibTable; - /// Auxiliary tool bar typically shown below the main tool bar at the top of the /// main window. wxAuiToolBar* m_auxiliaryToolBar; @@ -108,7 +103,7 @@ protected: * * @param aFootprintId is the #FPID of component footprint to load. * @return the #MODULE if found or NULL if \a aFootprintId not found in any of the - * libraries in #m_footprintLibTable. + * libraries in the table returned from #FootprintLibs(). * @throw IO_ERROR if an I/O error occurs or a #PARSE_ERROR if a file parsing error * occurs while reading footprint library files. */ @@ -120,10 +115,9 @@ protected: static const LAYER_NUM GAL_LAYER_ORDER[]; public: - PCB_BASE_FRAME( wxWindow* aParent, ID_DRAWFRAME_TYPE aFrameType, - const wxString& aTitle, - const wxPoint& aPos, const wxSize& aSize, - long aStyle, const wxString & aFrameName ); + PCB_BASE_FRAME( KIWAY* aKiway, wxWindow* aParent, ID_DRAWFRAME_TYPE aFrameType, + const wxString& aTitle, const wxPoint& aPos, const wxSize& aSize, + long aStyle, const wxString& aFrameName ); ~PCB_BASE_FRAME(); @@ -133,7 +127,7 @@ public: * * @param aFootprintId is the #FPID of component footprint to load. * @return the #MODULE if found or NULL if \a aFootprintId not found in any of the - * libraries in #m_footprintLibTable. + * libraries in table returned from #FootprintLibs(). */ MODULE* LoadFootprint( const FPID& aFootprintId ); @@ -191,17 +185,6 @@ public: return m_Pcb; } - /** - * Function SetFootprintLibTable - * set the footprint library table to \a aFootprintLibTable. - * - * @param aFootprintLibTable is a pointer to the #FP_LIB_TABLE object. - */ - void SetFootprintLibTable( FP_LIB_TABLE* aFootprintLibTable ) - { - m_footprintLibTable = aFootprintLibTable; - } - // General virtual void OnCloseWindow( wxCloseEvent& Event ) = 0; virtual void RedrawActiveWindow( wxDC* DC, bool EraseBg ) { } @@ -484,12 +467,10 @@ public: wxString SelectFootprintFromLibBrowser(); /** - * Function GetFootprintLibraryTable - * @return the project #FP_LIB_TABLE so programs can find footprints. + * Function FootprintLibs + * @return the project #FP_LIB_TABLE. */ - FP_LIB_TABLE* GetFootprintLibraryTable() { return m_footprintLibTable; } - - void SetFootprintLibraryTable( FP_LIB_TABLE* aTable ) { m_footprintLibTable = aTable; } + FP_LIB_TABLE* FootprintLibs() const; // ratsnest functions /** @@ -645,36 +626,15 @@ public: virtual void SwitchLayer( wxDC* DC, LAYER_NUM layer ); - /** - * Load applications settings common to PCB draw frame objects. - * - * This overrides the base class EDA_DRAW_FRAME::LoadSettings() to - * handle settings common to the PCB layout application and footprint - * editor main windows. It calls down to the base class to load - * settings common to all drawing frames. Please put your application - * settings common to all pcb drawing frames here to avoid having - * application settings loaded all over the place. - */ - virtual void LoadSettings(); + void LoadSettings( wxConfigBase* aCfg ); // override virtual + void SaveSettings( wxConfigBase* aCfg ); // override virtual bool InvokeDialogGrid(); - /** - * Save applications settings common to PCB draw frame objects. - * - * This overrides the base class EDA_DRAW_FRAME::SaveSettings() to - * save settings common to the PCB layout application and footprint - * editor main windows. It calls down to the base class to save - * settings common to all drawing frames. Please put your application - * settings common to all pcb drawing frames here to avoid having - * application settings saved all over the place. - */ - virtual void SaveSettings(); - void OnTogglePolarCoords( wxCommandEvent& aEvent ); void OnTogglePadDrawMode( wxCommandEvent& aEvent ); - /* User interface update event handlers. */ + // User interface update event handlers. void OnUpdateCoordType( wxUpdateUIEvent& aEvent ); void OnUpdatePadDrawMode( wxUpdateUIEvent& aEvent ); void OnUpdateSelectGrid( wxUpdateUIEvent& aEvent ); diff --git a/include/wxEeschemaStruct.h b/include/wxEeschemaStruct.h index badc7d0150..16b0f0a338 100644 --- a/include/wxEeschemaStruct.h +++ b/include/wxEeschemaStruct.h @@ -31,7 +31,7 @@ #define WX_EESCHEMA_STRUCT_H #include -#include +#include #include #include #include @@ -66,7 +66,7 @@ class wxFindDialogEvent; class wxFindReplaceData; -/* enum used in RotationMiroir() */ +/// enum used in RotationMiroir() enum COMPONENT_ORIENTATION_T { CMP_NORMAL, // Normal orientation, no rotation or mirror CMP_ROTATE_CLOCKWISE, // Rotate -90 @@ -115,6 +115,7 @@ enum SCH_SEARCH_T { class SCH_EDIT_FRAME : public SCH_BASE_FRAME { private: + SCH_SHEET_PATH* m_CurrentSheet; ///< which sheet we are presently working on. wxString m_DefaultSchematicFileName; int m_TextFieldSize; @@ -197,10 +198,7 @@ protected: void updateFindReplaceView( wxFindDialogEvent& aEvent ); public: - SCH_EDIT_FRAME( wxWindow* aParent, const wxString& aTitle, - const wxPoint& aPosition, const wxSize& aSize, - long aStyle = KICAD_DEFAULT_DRAWFRAME_STYLE ); - + SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ); ~SCH_EDIT_FRAME(); SCH_SCREEN* GetScreen() const; // overload SCH_BASE_FRAME @@ -338,8 +336,8 @@ public: */ PARAM_CFG_ARRAY& GetConfigurationSettings( void ); - void LoadSettings(); - void SaveSettings(); + void LoadSettings( wxConfigBase* aCfg ); + void SaveSettings( wxConfigBase* aCfg ); void RedrawActiveWindow( wxDC* DC, bool EraseBg ); @@ -639,23 +637,23 @@ public: void OnSaveProject( wxCommandEvent& aEvent ); /** - * Function LoadOneEEProject - * load an entire project into the schematic editor. + * Function OpenProjectFiles + * loads an entire project into the schematic editor. * * This function loads schematic root file and it's subhierarchies, the project * configuration, and the component libraries which are not already loaded. * - * @param aFileName The full path an file name to load. - * @param aIsNew True indicates that this is a new project and the default project - * template is loaded. - * @return True if the project loaded properly. + * @param aFileSet is a list of one file, the top level schematic. + * + * @return bool - true if the project loaded properly, else false. */ - bool LoadOneEEProject( const wxString& aFileName, bool aIsNew ); + //bool LoadOneEEProject( const wxString& aFileName, bool aIsNew ); + bool OpenProjectFiles( const std::vector& aFileSet, int aCtl = 0 ); // virtual from KIWAY_PLAYER /** * Function AppendOneEEProject - * read an entire project and loads it into the schematic editor *whitout* replacing the - * existing contents. + * read an entire project and loads it into the schematic editor *without* + * replacing the existing contents. * @return True if the project was imported properly. */ bool AppendOneEEProject(); @@ -1146,14 +1144,14 @@ public: void InitBlockPasteInfos(); /** - * Function ReturnBlockCommand + * Function BlockCommand * Returns the block command internat code (BLOCK_MOVE, BLOCK_COPY...) * corresponding to the keys pressed (ALT, SHIFT, SHIFT ALT ..) when * block command is started by dragging the mouse. * @param aKey = the key modifiers (Alt, Shift ...) * @return the block command id (BLOCK_MOVE, BLOCK_COPY...) */ - virtual int ReturnBlockCommand( int aKey ); + virtual int BlockCommand( int aKey ); /** * Function HandleBlockPlace diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index 394698aa4f..a7f7ac3e11 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -31,7 +31,7 @@ #include -#include +#include #include #include #include @@ -65,14 +65,17 @@ class PARSE_ERROR; class IO_ERROR; class FP_LIB_TABLE; +namespace PCB { struct IFACE; } // KIFACE_I is in pcbnew.cpp + /** - * class PCB_EDIT_FRAME - * the main frame for Pcbnew + * Class PCB_EDIT_FRAME + * is the main frame for Pcbnew. * * See also class PCB_BASE_FRAME(): Basic class for Pcbnew and GerbView. */ class PCB_EDIT_FRAME : public PCB_BASE_FRAME { + friend class PCB::IFACE; friend class PCB_LAYER_WIDGET; void updateTraceWidthSelectBox(); @@ -84,9 +87,6 @@ class PCB_EDIT_FRAME : public PCB_BASE_FRAME /// The auxiliary right vertical tool bar used to access the microwave tools. wxAuiToolBar* m_microWaveToolBar; - /// The global footprint library table. - FP_LIB_TABLE* m_globalFootprintTable; - /// User defined rotation angle (in tenths of a degree). int m_rotationAngle; @@ -214,6 +214,9 @@ protected: */ void duplicateZone( wxDC* aDC, ZONE_CONTAINER* aZone ); + // protected so that PCB::IFACE::CreateWindow() is the only factory. + PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ); + public: PCB_LAYER_BOX_SELECTOR* m_SelLayerBox; // a combo box to display and select active layer wxComboBox* m_SelTrackWidthBox; // a combo box to display and select current track width @@ -224,10 +227,6 @@ public: public: - PCB_EDIT_FRAME( wxWindow* father, const wxString& title, - const wxPoint& pos, const wxSize& size, - long style = KICAD_DEFAULT_DRAWFRAME_STYLE ); - virtual ~PCB_EDIT_FRAME(); void OnQuit( wxCommandEvent& event ); @@ -397,29 +396,9 @@ public: */ PARAM_CFG_ARRAY& GetConfigurationSettings(); - /** - * Function LoadSettings - * loads applications settings specific to Pcbnew. - * - * This overrides the base class PCB_BASE_FRAME::LoadSettings() to - * handle settings specific common to the PCB layout application. It - * calls down to the base class to load settings common to all PCB type - * drawing frames. Please put your application settings for Pcbnew here - * to avoid having application settings loaded all over the place. - */ - virtual void LoadSettings(); + void LoadSettings( wxConfigBase* aCfg ); // override virtual - /** - * Function SaveSettings - * saves applications settings common to Pcbnew. - * - * This overrides the base class PCB_BASE_FRAME::SaveSettings() to - * save settings specific to the PCB layout application main window. It - * calls down to the base class to save settings common to all PCB type - * drawing frames. Please put your application settings for Pcbnew here - * to avoid having application settings saved all over the place. - */ - virtual void SaveSettings(); + void SaveSettings( wxConfigBase* aCfg ); // override virtual /** * Get the last net list read with the net list dialog box. @@ -718,14 +697,14 @@ public: /* Block operations: */ /** - * Function ReturnBlockCommand + * Function BlockCommand * Returns the block command internat code (BLOCK_MOVE, BLOCK_COPY...) * corresponding to the keys pressed (ALT, SHIFT, SHIFT ALT ..) when * block command is started by dragging the mouse. * @param aKey = the key modifiers (Alt, Shift ...) * @return the block command id (BLOCK_MOVE, BLOCK_COPY...) */ - virtual int ReturnBlockCommand( int aKey ); + virtual int BlockCommand( int aKey ); /** * Function HandleBlockPlace() @@ -858,20 +837,20 @@ public: void Files_io( wxCommandEvent& event ); /** - * Function LoadOnePcbFile - * loads a KiCad board (.brd) from \a aFileName. + * Function OpenProjectFiles (was LoadOnePcbFile) + * loads a KiCad board (.kicad_pcb) from \a aFileName. * - * @param aFileName - File name including path. If empty, a file dialog will - * be displayed. - * @param aAppend - Append board file aFileName to the currently loaded file if true. - * Default = false. - * @param aForceFileDialog - Display the file open dialog even if aFullFileName is - * valid if true; Default = false. + * @param aFileSet - hold the BOARD file to load, a vector of one element. * - * @return False if file load fails or is canceled by the user, otherwise true. - */ + * @param aCtl - KICTL_ bits, one to indicate that an append of the board file + * aFileName to the currently loaded file is desired. + * @see #KIWAY_PLAYER for bit defines. + * + * @return bool - false if file load fails, otherwise true. bool LoadOnePcbFile( const wxString& aFileName, bool aAppend = false, bool aForceFileDialog = false ); + */ + bool OpenProjectFiles( const std::vector& aFileSet, int aCtl = 0 ); /** * Function ReadPcbFile @@ -1704,4 +1683,18 @@ public: }; +/** + * Function AskBoardFileName + * puts up a wxFileDialog asking for a BOARD filename to open. + * + * @param aParent is a wxFrame passed to wxFileDialog. + * @param aCtl is where to put the OpenProjectFiles() control bits. + * + * @param aFileName on entry is a probable choice, on return is the chosen filename. + * + * @return bool - true if chosen, else false if user aborted. + */ +bool AskBoardFileName( wxWindow* aParent, int* aCtl, wxString* aFileName ); + + #endif // WXPCB_STRUCT_H_ diff --git a/include/wxstruct.h b/include/wxstruct.h index 69a24fa7a0..fb79aae9a7 100644 --- a/include/wxstruct.h +++ b/include/wxstruct.h @@ -80,6 +80,7 @@ enum id_librarytype { LIBRARY_TYPE_SYMBOL }; + enum ID_DRAWFRAME_TYPE { NOT_INIT_FRAME_TYPE = 0, @@ -108,9 +109,12 @@ extern const wxChar traceAutoSave[]; * Class EDA_BASE_FRAME * is the base frame for deriving all KiCad main window classes. This class is not * intended to be used directly. It provides support for automatic calls to - * a virtual SaveSettings() function. SaveSettings() for a derived class can choose + * a SaveSettings() function. SaveSettings() for a derived class can choose * to do nothing, or rely on basic SaveSettings() support in this base class to do * most of the work by calling it from the derived class's SaveSettings(). + *

+ * This class is not a KIWAY_PLAYER because KICAD_MANAGER_FRAME is derived from it + * and that class is not a player. */ class EDA_BASE_FRAME : public wxFrame { @@ -175,12 +179,17 @@ protected: */ virtual bool doAutoSave(); + /** + * Function config + * returns the wxConfigBase used in SaveSettings(), and is overloaded in + * KICAD_MANAGER_FRAME + */ + virtual wxConfigBase* config(); + public: EDA_BASE_FRAME( wxWindow* aParent, ID_DRAWFRAME_TYPE aFrameType, - const wxString& aTitle, - const wxPoint& aPos, const wxSize& aSize, - long aStyle, - const wxString & aFrameName ); + const wxString& aTitle, const wxPoint& aPos, const wxSize& aSize, + long aStyle, const wxString& aFrameName ); ~EDA_BASE_FRAME(); @@ -223,24 +232,23 @@ public: void AddHelpVersionInfoMenuEntry( wxMenu* aMenu ); /** - * Load common frame parameters from configuration. + * Function LoadSettings + * loads common frame parameters from a configuration file. * - * The method is virtual so you can override it to load frame specific - * parameters. Don't forget to call the base method or your frames won't + * Don't forget to call the base method or your frames won't * remember their positions and sizes. */ - virtual void LoadSettings(); + virtual void LoadSettings( wxConfigBase* aCfg ); /** - * Save common frame parameters to configuration data file. + * Function SaveSettings + * saves common frame parameters to a configuration data file. * - * The method is virtual so you can override it to save frame specific - * parameters. Don't forget to call the base class's SaveSettings() from + * Don't forget to call the base class's SaveSettings() from * your derived SaveSettings() otherwise the frames won't remember their - * positions and sizes. The virtual call to SaveSettings is done safely - * only in EDA_BASE_FRAME::Show( bool ). + * positions and sizes. */ - virtual void SaveSettings(); + virtual void SaveSettings( wxConfigBase* aCfg ); /** * Function SaveProjectSettings @@ -396,641 +404,6 @@ public: }; -/** - * Class EDA_DRAW_FRAME - * is the base class for create windows for drawing purpose. The Eeschema, Pcbnew and - * GerbView main windows are just a few examples of classes derived from EDA_DRAW_FRAME. - */ -class EDA_DRAW_FRAME : public EDA_BASE_FRAME -{ - /// Let the #EDA_DRAW_PANEL object have access to the protected data since - /// it is closely tied to the #EDA_DRAW_FRAME. - friend class EDA_DRAW_PANEL; - - ///< Id of active button on the vertical toolbar. - int m_toolId; - - BASE_SCREEN* m_currentScreen; ///< current used SCREEN - - bool m_snapToGrid; ///< Indicates if cursor should be snapped to grid. - bool m_galCanvasActive; ///< whether to use new GAL engine - - EDA_DRAW_PANEL_GAL* m_galCanvas; - -protected: - EDA_HOTKEY_CONFIG* m_HotkeysZoomAndGridList; - int m_LastGridSizeId; // the command id offset (>= 0) of the last selected grid - // 0 is for the grid corresponding to - // a wxCommand ID = ID_POPUP_GRID_LEVEL_1000. - bool m_DrawGrid; // hide/Show grid - EDA_COLOR_T m_GridColor; // Grid color - - /// The area to draw on. - EDA_DRAW_PANEL* m_canvas; - - /// Tool ID of previously active draw tool bar button. - 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; - - /// True shows the X and Y axis indicators. - bool m_showAxis; - - /// True shows the grid axis indicators. - bool m_showGridAxis; - - /// True shows the origin axis used to indicate the coordinate offset for - /// drill, gerber, and component position files. - bool m_showOriginAxis; - - /// True shows the drawing border and title block. - bool m_showBorderAndTitleBlock; - - /// Choice box to choose the grid size. - wxComboBox* m_gridSelectBox; - - /// Choice box to choose the zoom value. - 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; - - /// The options tool bar typcially located on the left edge of the main window. - wxAuiToolBar* m_optionsToolBar; - - /// Panel used to display information at the bottom of the main window. - EDA_MSG_PANEL* m_messagePanel; - - int m_MsgFrameHeight; - -#ifdef USE_WX_OVERLAY - // MAC Uses overlay to workaround the wxINVERT and wxXOR miss - wxOverlay m_overlay; -#endif - - void SetScreen( BASE_SCREEN* aScreen ) { m_currentScreen = aScreen; } - - /** - * Function unitsChangeRefresh - * is called when when the units setting has changed to allow for any derived classes - * to handle refreshing and controls that have units based measurements in them. The - * default version only updates the status bar. Don't forget to call the default - * in your derived class or the status bar will not get updated properly. - */ - virtual void unitsChangeRefresh(); - -public: - EDA_DRAW_FRAME( wxWindow* aParent, - ID_DRAWFRAME_TYPE aFrameType, - const wxString& aTitle, - const wxPoint& aPos, const wxSize& aSize, - long aStyle, - const wxString & aFrameName ); - - ~EDA_DRAW_FRAME(); - - virtual void SetPageSettings( const PAGE_INFO& aPageSettings ) = 0; - virtual const PAGE_INFO& GetPageSettings() const = 0; - - /** - * Function GetPageSizeIU - * works off of GetPageSettings() to return the size of the paper page in - * the internal units of this particular view. - */ - virtual const wxSize GetPageSizeIU() const = 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 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 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; - - int GetCursorShape() const { return m_cursorShape; } - - void SetCursorShape( int aCursorShape ) { m_cursorShape = aCursorShape; } - - bool GetShowBorderAndTitleBlock() const { return m_showBorderAndTitleBlock; } - - void SetShowBorderAndTitleBlock( bool aShow ) { m_showBorderAndTitleBlock = aShow; } - - EDA_DRAW_PANEL* GetCanvas() { return m_canvas; } - - virtual wxString GetScreenDesc() const; - - /** - * Function GetScreen - * returns a pointer to a BASE_SCREEN or one of its - * derivatives. It is overloaded by derived classes to return - * SCH_SCREEN or PCB_SCREEN. - */ - virtual BASE_SCREEN* GetScreen() const { return m_currentScreen; } - - /** - * Execute a remote command send via a socket to the application, - * port KICAD_PCB_PORT_SERVICE_NUMBER (currently 4242) - * It called by EDA_DRAW_FRAME::OnSockRequest(). - * this is a virtual function becuse the actual commands depends on the - * application. - * the basic function do nothing - * @param cmdline = received command from socket - */ - virtual void ExecuteRemoteCommand( const char* cmdline ){} - - void OnMenuOpen( wxMenuEvent& event ); - void OnMouseEvent( wxMouseEvent& event ); - - /** function SkipNextLeftButtonReleaseEvent - * after calling this function, if the left mouse button - * is down, the next left mouse button release event will be ignored. - * It is is usefull for instance when closing a dialog on a mouse click, - * to skip the next mouse left button release event - * by the parent window, because the mouse button - * clicked on the dialog is often released in the parent frame, - * and therefore creates a left button released mouse event - * which can be unwanted in some cases - */ - void SkipNextLeftButtonReleaseEvent(); - - virtual void OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition, - EDA_ITEM* aItem = NULL ); - - /** - * Function AddMenuZoomAndGrid (virtual) - * Add standard zoom commands and submenu zoom and grid selection to a popup menu - * uses zoom hotkeys info base to add hotkeys info to menu commands - * @param aMasterMenu = the menu to populate. - */ - virtual void AddMenuZoomAndGrid( wxMenu* aMasterMenu ); - - void EraseMsgBox(); - void Process_PageSettings( wxCommandEvent& event ); - - /** - * Function SetLanguage - * called on a language menu selection - * when using a derived function, do not forget to call this one - */ - virtual void SetLanguage( wxCommandEvent& event ); - - virtual void ReCreateHToolbar() = 0; - virtual void ReCreateVToolbar() = 0; - virtual void ReCreateMenuBar(); - virtual void ReCreateAuxiliaryToolbar(); - - /** - * Function SetToolID - * sets the tool command ID to \a aId and sets the cursor to \a aCursor. The - * command ID must be greater or equal ::ID_NO_TOOL_SELECTED. If the command - * ID is less than ::ID_NO_TOOL_SELECTED, the tool command ID is set to - * ::ID_NO_TOOL_SELECTED. On debug builds, an assertion will be raised when - * \a aId is invalid. - * @param aId New tool command ID if greater than or equal to ::ID_NO_TOOL_SELECTED. - If less than zero, the current tool command ID is retained. - * @param aCursor Sets the cursor shape if greater than or equal to zero. - * @param aToolMsg The tool message to set in the status bar. - */ - virtual void SetToolID( int aId, int aCursor, const wxString& aToolMsg ); - - int GetToolId() const { return m_toolId; } - - /* These 4 functions provide a basic way to show/hide grid - * and /get/set grid color. - * These parameters are saved in KiCad config for each main frame - */ - /** - * Function IsGridVisible() , virtual - * @return true if the grid must be shown - */ - virtual bool IsGridVisible() const - { - return m_DrawGrid; - } - - /** - * Function SetGridVisibility() , virtual - * It may be overloaded by derived classes - * @param aVisible = true if the grid must be shown - */ - virtual void SetGridVisibility( bool aVisible ) - { - m_DrawGrid = aVisible; - } - - /** - * Function GetGridColor() , virtual - * @return the color of the grid - */ - virtual EDA_COLOR_T GetGridColor() const - { - return m_GridColor; - } - - /** - * Function SetGridColor() , virtual - * @param aColor = the new color of the grid - */ - virtual void SetGridColor( EDA_COLOR_T aColor ) - { - m_GridColor = aColor; - } - - /** - * Function GetGridPosition - * returns the nearest grid position to \a aPosition if a screen is defined and snap to - * grid is enabled. Otherwise, the original positions is returned. - * @see m_snapToGrid and m_BaseScreen members. - * @param aPosition The position to test. - * @return The wxPoint of the appropriate cursor position. - */ - wxPoint GetGridPosition( const wxPoint& aPosition ) const; - - /** - * Command event handler for selecting grid sizes. - * - * All commands that set the grid size should eventually end up here. - * This is where the application setting is saved. If you override - * this method, make sure you call down to the base class. - * - * @param event - Command event passed by selecting grid size from the - * grid size combobox on the toolbar. - */ - virtual void OnSelectGrid( wxCommandEvent& event ); - - /** - * Functions OnSelectZoom - * sets the zoom factor when selected by the zoom list box in the main tool bar. - * @note List position 0 is fit to page - * List position >= 1 = zoom (1 to zoom max) - * Last list position is custom zoom not in zoom list. - */ - virtual void OnSelectZoom( wxCommandEvent& event ); - - // Command event handlers shared by all applications derived from EDA_DRAW_FRAME. - void OnToggleGridState( wxCommandEvent& aEvent ); - void OnSelectUnits( wxCommandEvent& aEvent ); - void OnToggleCrossHairStyle( wxCommandEvent& aEvent ); - - // Update user interface event handlers shared by all applications derived from - // EDA_DRAW_FRAME. - void OnUpdateUndo( wxUpdateUIEvent& aEvent ); - void OnUpdateRedo( wxUpdateUIEvent& aEvent ); - void OnUpdateGrid( wxUpdateUIEvent& aEvent ); - void OnUpdateUnits( wxUpdateUIEvent& aEvent ); - void OnUpdateCrossHairStyle( wxUpdateUIEvent& aEvent ); - - /** - * Function GeneralControl - * performs application specific control using \a aDC at \a aPosition in logical units. - *

- * Override this function for application specific control. This function gets - * called on every mouse and key event. - *

- * @param aDC A device context. - * @param aPosition The current cursor position in logical (drawing) units. - * @param aHotKey A key event used for application specific control if not zero. - */ - virtual void GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aHotKey = 0 ) { } - - /** - * Function OnSize - * recalculates the size of toolbars and display panel when the frame size changes. - */ - virtual void OnSize( wxSizeEvent& event ); - - void OnEraseBackground( wxEraseEvent& SizeEvent ); - - virtual void OnZoom( wxCommandEvent& event ); - - /** - * Function RedrawScreen - * redraws the entire screen area by updating the scroll bars and mouse pointer in - * order to have \a aCenterPoint at the center of the screen. - * @param aCenterPoint The position in logical units to center the scroll bars. - * @param aWarpPointer Moves the mouse cursor to \a aCenterPoint if true. - */ - void RedrawScreen( const wxPoint& aCenterPoint, bool aWarpPointer ); - - /** - * Function RedrawScreen2 - * puts the crosshair back to the screen position it had before zooming - * @param posBefore screen position of the crosshair before zooming - */ - void RedrawScreen2( const wxPoint& posBefore ); - - /** - * Function Zoom_Automatique - * redraws the screen with best zoom level and the best centering - * that shows all the page or the board - */ - void Zoom_Automatique( bool aWarpPointer ); - - /* Set the zoom level to show the area Rect */ - void Window_Zoom( EDA_RECT& Rect ); - - /** Return the zoom level which displays the full page on screen */ - virtual double BestZoom() = 0; - - /** - * Function GetZoom - * @return The current zoom level. - */ - double GetZoom(); - - /** - * Function DrawWorkSheet - * Draws on screen the page layout with the frame and the basic inscriptions. - * @param aDC The device context. - * @param aScreen screen to draw - * @param aLineWidth The pen width to use to draw the layout. - * @param aScale The mils to Iu conversion factor. - * @param aFilename The filename to display in basic inscriptions. - */ - 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 ); - - /** - * Function OnActivate (virtual) - * is called when activating the frame. - * In derived classes with a overriding OnActivate function, - * do not forget to call this EDA_DRAW_FRAME::OnActivate( event ) basic function. - */ - virtual void OnActivate( wxActivateEvent& event ); - - /** - * Function UpdateStatusBar - * updates the status bar information. - * - * The base method updates the absolute and relative coordinates and the - * zoom information. If you override this virtual method, make sure to call - * this subclassed method. The status bar can draw itself. This is not - * a drawing function per se, but rather updates lines of text held by - * the components within the status bar which is owned by the wxFrame. - *

- * On a MAC, be careful about calling this function when there is an - * existing wxDC in existence on a sibling window. - */ - virtual void UpdateStatusBar(); - - /** - * Function DisplayUnitsMsg - * displays current unit pane on the status bar. - */ - void DisplayUnitsMsg(); - - /* Handlers for block commands */ - virtual void InitBlockPasteInfos(); - - /** - * Function HandleBlockBegin - * initializes the block command including the command type, initial position, - * and other variables. - */ - virtual bool HandleBlockBegin( wxDC* aDC, int aKey, const wxPoint& aPosition ); - - /** - * Function ReturnBlockCommand - * Returns the block command code (BLOCK_MOVE, BLOCK_COPY...) corresponding to the - * keys pressed (ALT, SHIFT, SHIFT ALT ..) when block command is started by dragging - * the mouse. - * - * @param aKey = the key modifiers (Alt, Shift ...) - * @return the block command id (BLOCK_MOVE, BLOCK_COPY...) - */ - virtual int ReturnBlockCommand( int aKey ); - - /** - * Function HandleBlockPlace( ) - * Called after HandleBlockEnd, when a block command needs to be - * executed after the block is moved to its new place - * (bloc move, drag, copy .. ) - * Parameters must be initialized in GetScreen()->m_BlockLocate - */ - virtual void HandleBlockPlace( wxDC* DC ); - - /** - * Function HandleBlockEnd( ) - * Handle the "end" of a block command, - * i.e. is called at the end of the definition of the area of a block. - * depending on the current block command, this command is executed - * or parameters are initialized to prepare a call to HandleBlockPlace - * in GetScreen()->m_BlockLocate - * @return false if no item selected, or command finished, - * true if some items found and HandleBlockPlace must be called later - */ - virtual bool HandleBlockEnd( wxDC* DC ); - - /** - * Function CopyToClipboard - * copies the current page or the current block to the clipboard. - */ - void CopyToClipboard( wxCommandEvent& event ); - - /* interprocess communication */ - void OnSockRequest( wxSocketEvent& evt ); - void OnSockRequestServer( wxSocketEvent& evt ); - - /** - * Function LoadSettings - * loads the draw frame specific configuration settings. - * - * Don't forget to call this base method from any derived classes or the - * settings common to the draw frame will not get loaded. - */ - virtual void LoadSettings(); - - /** - * Funxtion SaveSettings - * saves the draw frame specific configuration settings. - * - * Don't forget to call this base method from any derived classes or the - * settings common to the draw frame will not get saved. - */ - virtual void SaveSettings(); - - /** - * Append a message to the message panel. - * - * This helper method checks to make sure the message panel exists in - * the frame and appends a message to it using the message panel - * AppendMessage() method. - * - * @param textUpper - The message upper text. - * @param textLower - The message lower text. - * @param color - A color ID from the KiCad color list (see colors.h). - * @param pad - Number of spaces to pad between messages (default = 4). - */ - void AppendMsgPanel( const wxString& textUpper, const wxString& textLower, - EDA_COLOR_T color, int pad = 6 ); - - /** - * Clear all messages from the message panel. - */ - void ClearMsgPanel( void ); - - /** - * Function SetMsgPanel - * clears the message panel and populates it with the contents of \a aList. - * - * @param aList is the list of #MSG_PANEL_ITEM objects to fill the message panel. - */ - void SetMsgPanel( const std::vector< MSG_PANEL_ITEM >& aList ); - - void SetMsgPanel( EDA_ITEM* aItem ); - - /** - * Function PrintPage - * used to print a page - * Print the page pointed by current screen, set by the calling print function - * @param aDC = wxDC given by the calling print function - * @param aPrintMask = not used here - * @param aPrintMirrorMode = not used here (Set when printing in mirror mode) - * @param aData = a pointer on an auxiliary data (not always used, NULL if not used) - */ - virtual void PrintPage( wxDC* aDC, LAYER_MSK aPrintMask, bool aPrintMirrorMode, void* aData = NULL ); - - /** - * Function CoordinateToString - * is a helper to convert the \a integer coordinate \a aValue to a string in inches or mm - * according to the current user units setting. - * @param aValue The coordinate to convert. - * @param aConvertToMils Convert inch values to mils if true. This setting has no effect if - * the current user unit is millimeters. - * @return The converted string for display in user interface elements. - */ - wxString CoordinateToString( int aValue, bool aConvertToMils = false ) const; - - /** - * Function LengthDoubleToString - * is a helper to convert the \a double value \a aValue to a string in inches or mm - * according to the current user units setting. - * @param aValue The coordinate to convert. - * @param aConvertToMils Convert inch values to mils if true. This setting has no effect if - * the current user unit is millimeters. - * @return The converted string for display in user interface elements. - */ - wxString LengthDoubleToString( double aValue, bool aConvertToMils = false ) const; - - /** - * Function UseGalCanvas - * used to switch between standard and GAL-based canvas. - * - * @param aEnable True for GAL-based canvas, false for standard canvas. - */ - virtual void UseGalCanvas( bool aEnable ); - - /** - * Function IsGalCanvasActive - * is used to check which canvas (GAL-based or standard) is currently in use. - * - * @return True for GAL-based canvas, false for standard canvas. - */ - bool IsGalCanvasActive() const { return m_galCanvasActive; } - void SetGalCanvasActive( bool aState ) { m_galCanvasActive = aState; } - - /** - * Function GetGalCanvas - * returns a pointer to GAL-based canvas of given EDA draw frame. - * - * @return Pointer to GAL-based canvas. - */ - EDA_DRAW_PANEL_GAL* GetGalCanvas() const { return m_galCanvas; } - void SetGalCanvas( EDA_DRAW_PANEL_GAL* aPanel ) { m_galCanvas = aPanel; } - - DECLARE_EVENT_TABLE() -}; - - /** * Specialization of the wxAuiPaneInfo class for KiCad panels. * diff --git a/kicad/CMakeLists.txt b/kicad/CMakeLists.txt index b86d4b5035..2647e93792 100644 --- a/kicad/CMakeLists.txt +++ b/kicad/CMakeLists.txt @@ -21,14 +21,10 @@ set(KICAD_SRCS project_template.cpp tree_project_frame.cpp) -if(WIN32) - if(MINGW) - # KICAD_RESOURCES variable is set by the macro. - mingw_resource_compiler(kicad) - else(MINGW) - set(KICAD_RESOURCES kicad.rc) - endif(MINGW) -endif(WIN32) +if(MINGW) + # KICAD_RESOURCES variable is set by the macro. + mingw_resource_compiler(kicad) +endif() if(APPLE) set(KICAD_RESOURCES kicad.icns kicad_doc.icns) diff --git a/kicad/class_treeproject_item.cpp b/kicad/class_treeproject_item.cpp index 01b31af817..b43c93bc18 100644 --- a/kicad/class_treeproject_item.cpp +++ b/kicad/class_treeproject_item.cpp @@ -34,7 +34,8 @@ #include #include -#include +#include +#include #include #include #include @@ -189,7 +190,8 @@ void TREEPROJECT_ITEM::Activate( TREE_PROJECT_FRAME* prjframe ) wxString sep = wxFileName().GetPathSeparator(); wxString FullFileName = GetFileName(); wxTreeItemId id = GetId(); - KICAD_MANAGER_FRAME* mainFrame = (KICAD_MANAGER_FRAME*) wxGetApp().GetTopWindow(); + + KICAD_MANAGER_FRAME* mainFrame = (KICAD_MANAGER_FRAME*) Pgm().App().GetTopWindow(); AddDelimiterString( FullFileName ); @@ -225,7 +227,7 @@ void TREEPROJECT_ITEM::Activate( TREE_PROJECT_FRAME* prjframe ) case TREE_TXT: { - wxString editorname = wxGetApp().GetEditorName(); + wxString editorname = Pgm().GetEditorName(); if( !editorname.IsEmpty() ) mainFrame->Execute( m_parent, editorname, FullFileName ); diff --git a/kicad/files-io.cpp b/kicad/files-io.cpp index 41803864dc..4943e359f3 100644 --- a/kicad/files-io.cpp +++ b/kicad/files-io.cpp @@ -27,7 +27,7 @@ */ #include -#include +#include #include #include #include @@ -47,9 +47,8 @@ static const wxString ZipFileWildcard( wxT( "Zip file (*.zip) | *.zip" ) ); void KICAD_MANAGER_FRAME::OnFileHistory( wxCommandEvent& event ) { - wxString fn; - - fn = GetFileFromHistory( event.GetId(), _( "KiCad project file" ) ); + wxString fn = GetFileFromHistory( event.GetId(), + _( "KiCad project file" ), &Pgm().GetFileHistory() ); if( fn != wxEmptyString ) { diff --git a/kicad/kicad.cpp b/kicad/kicad.cpp index b603c06432..4fc1831a5f 100644 --- a/kicad/kicad.cpp +++ b/kicad/kicad.cpp @@ -29,28 +29,131 @@ #include -#include #include +#include +#include #include +#include #include +#include #include -const wxString g_KicadPrjFilenameExtension( wxT( ".pro" ) ); - -/************************************/ -/* Called to initialize the program */ -/************************************/ - -// Create a new application object -IMPLEMENT_APP( EDA_APP ) - -/* MacOSX: Needed for file association - * http://wiki.wxwidgets.org/WxMac-specific_topics - */ -void EDA_APP::MacOpenFile( const wxString& aFileName ) +// a dummy to quiet linking with EDA_BASE_FRAME::config(); +#include +KIFACE_I& Kiface() { + wxASSERT( 0 ); // should never be called, only reference is from EDA_BASE_FRAME::config(); + return (KIFACE_I&) *(KIFACE_I*) 0; +} + +static PGM_KICAD program; + +PGM_KICAD& Pgm() +{ + return program; +} + + +bool PGM_KICAD::OnPgmInit( wxApp* aWxApp ) +{ + m_wx_app = aWxApp; // first thing. + + m_bm.Init(); + +#if 0 // copied from single_top.c, possibly for milestone B) + wxString absoluteArgv0 = wxStandardPaths::Get().GetExecutablePath(); + + if( !wxIsAbsolutePath( absoluteArgv0 ) ) + { + wxLogSysError( wxT( "No meaningful argv[0]" ) ); + return false; + } + + // Set LIB_ENV_VAR *before* loading the DSO, in case the top-level DSO holding the + // KIFACE has hard dependencies on subsidiary DSOs below it. + SetLibEnvVar( absoluteArgv0 ); +#endif + + if( !initPgm() ) + return false; + + // Read current setup and reopen last directory if no filename to open on + // command line. + if( App().argc == 1 ) + { + wxString dir; + + if( PgmSettings()->Read( workingDirKey, &dir ) && wxDirExists( dir ) ) + { + wxSetWorkingDirectory( dir ); + } + } + + KICAD_MANAGER_FRAME* frame = new KICAD_MANAGER_FRAME( NULL, wxT( "KiCad" ), + wxDefaultPosition, wxDefaultSize ); + App().SetTopWindow( frame ); + + bool prjloaded = false; // true when the project is loaded + + if( App().argc > 1 ) + frame->m_ProjectFileName = App().argv[1]; + + else if( GetFileHistory().GetCount() ) + { + // Try to open the last opened project, + // if a project name is not given when starting Kicad + frame->m_ProjectFileName = GetFileHistory().GetHistoryFile( 0 ); + + if( !frame->m_ProjectFileName.FileExists() ) + GetFileHistory().RemoveFileFromHistory( 0 ); + else + { + wxCommandEvent cmd( 0, wxID_FILE1 ); + + frame->OnFileHistory( cmd ); + prjloaded = true; // OnFileHistory() loads the project + } + } + + if( !frame->m_ProjectFileName.FileExists() ) + { + wxFileName namelessProject( wxGetCwd(), NAMELESS_PROJECT, + ProjectFileExtension ); + + frame->m_ProjectFileName = namelessProject; + } + + if( !prjloaded ) + { + wxCommandEvent cmd( 0, wxID_ANY ); + + frame->OnLoadProject( cmd ); + } + + frame->Show( true ); + frame->Raise(); + + return true; +} + + +void PGM_KICAD::OnPgmExit() +{ + saveCommonSettings(); + + // write common settings to disk, and destroy everything in PGM_KICAD, + // especially wxSingleInstanceCheckerImpl earlier than wxApp and earlier + // than static destruction would. + destroy(); +} + + +void PGM_KICAD::MacOpenFile( const wxString& aFileName ) +{ +#if 0 // I'm tired, need a rest. + KICAD_MANAGER_FRAME* frame = (KICAD_MANAGER_FRAME*) GetTopWindow(); wxFileName fn = aFileName; @@ -79,58 +182,192 @@ void EDA_APP::MacOpenFile( const wxString& aFileName ) frame->m_LeftWin->ReCreateTreePrj(); frame->PrintPrjInfo(); +#endif } -bool EDA_APP::OnInit() +void PGM_KICAD::destroy() { - KICAD_MANAGER_FRAME* frame; + // unlike a normal destructor, this is designed to be called more + // than once safely: - InitEDA_Appl( wxT( "KiCad" ), APP_KICAD_T ); + m_bm.End(); - // read current setup and reopen last directory if no filename to open in command line - bool reopenLastUsedDirectory = argc == 1; - GetSettings( reopenLastUsedDirectory ); + PGM_BASE::destroy(); +} - frame = new KICAD_MANAGER_FRAME( NULL, wxT( "KiCad" ), - wxDefaultPosition, wxDefaultSize ); - SetTopWindow( frame ); - bool prjloaded = false; // true when the project is loaded +/** + * Class KIWAY_MGR + * is container for all (KIWAYS and PROJECTS). This class needs to work both for a C++ + * project manager and an a wxPython one (after being moved into a header later). + */ +class KIWAY_MGR +{ +public: + //KIWAY_MGR(); + // ~KIWAY_MGR(); - if( argc > 1 ) - frame->m_ProjectFileName = argv[1]; - else if( m_fileHistory.GetCount() ) + bool OnStart( wxApp* aProcess ); + + void OnEnd(); + + KIWAY& operator[]( int aIndex ) { - // Try to open the last opened project, - // if a project name is not given when starting Kicad - frame->m_ProjectFileName = m_fileHistory.GetHistoryFile( 0 ); + wxASSERT( m_kiways.size() ); // stuffed in OnStart() + return m_kiways[aIndex]; + } - if( !frame->m_ProjectFileName.FileExists() ) - m_fileHistory.RemoveFileFromHistory( 0 ); - else +private: + + // KIWAYs may not be moved once doled out. + // boost_ptr::vector however never moves the object pointed to. + typedef boost::ptr_vector KIWAYS; + + KIWAYS m_kiways; +}; + +static KIWAY_MGR kiways; + + +/** + * Struct APP_KICAD + * is not publicly visible because most of the action is in PGM_KICAD these days. + */ +struct APP_KICAD : public wxApp +{ + bool OnInit() // overload wxApp virtual + { + if( kiways.OnStart( this ) ) { - wxCommandEvent cmd( 0, wxID_FILE1 ); - frame->OnFileHistory( cmd ); - prjloaded = true; // OnFileHistory() loads the project + return Pgm().OnPgmInit( this ); } + return false; } - if( !frame->m_ProjectFileName.FileExists() ) + int OnExit() // overload wxApp virtual { - wxFileName namelessProject( wxGetCwd(), NAMELESS_PROJECT, - ProjectFileExtension ); - frame->m_ProjectFileName = namelessProject; + kiways.OnEnd(); + + Pgm().OnPgmExit(); + + return wxApp::OnExit(); } - if( ! prjloaded ) + /** + * Function MacOpenFile + * is specific to MacOSX (not used under Linux or Windows). + * MacOSX requires it for file association. + * @see http://wiki.wxwidgets.org/WxMac-specific_topics + */ + void MacOpenFile( const wxString& aFileName ) // overload wxApp virtual { - wxCommandEvent cmd( 0, wxID_ANY ); - frame->OnLoadProject( cmd ); + Pgm().MacOpenFile( aFileName ); } +}; - frame->Show( true ); - frame->Raise(); +IMPLEMENT_APP( APP_KICAD ); + + +// The C++ project manager supports one open PROJECT, so Prj() calls within +// this link image need this function. +PROJECT& Prj() +{ + return kiways[0].Prj(); +} + + +bool KIWAY_MGR::OnStart( wxApp* aProcess ) +{ + // The C++ project manager supports only one open PROJECT + m_kiways.push_back( new KIWAY() ); return true; } + + +void KIWAY_MGR::OnEnd() +{ +} + + +/* +static bool init( KICAD_PGM* aProcess, const wxString& aName ) +{ + m_Id = aId; + m_Checker = new wxSingleInstanceChecker( aName.Lower() + wxT( "-" ) + wxGetUserId() ); + + // Init KiCad environment + // the environment variable KICAD (if exists) gives the kicad path: + // something like set KICAD=d:\kicad + bool isDefined = wxGetEnv( wxT( "KICAD" ), &m_KicadEnv ); + + if( isDefined ) // ensure m_KicadEnv ends by "/" + { + m_KicadEnv.Replace( WIN_STRING_DIR_SEP, UNIX_STRING_DIR_SEP ); + + if( !m_KicadEnv.IsEmpty() && m_KicadEnv.Last() != '/' ) + m_KicadEnv += UNIX_STRING_DIR_SEP; + } + + // Prepare On Line Help. Use only lower case for help file names, in order to + // avoid problems with upper/lower case file names under windows and unix. +#if defined ONLINE_HELP_FILES_FORMAT_IS_HTML + m_HelpFileName = aName.Lower() + wxT( ".html" ); +#elif defined ONLINE_HELP_FILES_FORMAT_IS_PDF + m_HelpFileName = aName.Lower() + wxT( ".pdf" ); +#else + #error Help files format not defined +#endif + + // Init parameters for configuration + SetVendorName( wxT( "KiCad" ) ); + SetAppName( aName.Lower() ); + SetTitle( aName ); + + m_settings = new wxConfig(); + + wxASSERT( m_settings != NULL ); + + m_commonSettings = new wxConfig( CommonConfigPath ); + wxASSERT( m_commonSettings != NULL ); + + // Install some image handlers, mainly for help + wxImage::AddHandler( new wxPNGHandler ); + wxImage::AddHandler( new wxGIFHandler ); + wxImage::AddHandler( new wxJPEGHandler ); + wxFileSystem::AddHandler( new wxZipFSHandler ); + + // Analyze the command line & init binary path + SetBinDir(); + SetDefaultSearchPaths(); + SetLanguagePath(); + ReadPdfBrowserInfos(); + + // Internationalization: loading the kicad suitable Dictionary + wxString languageSel; + m_commonSettings->Read( languageCfgKey, &languageSel); + + setLanguageId( wxLANGUAGE_DEFAULT ); + + // Search for the current selection + for( unsigned ii = 0; ii < DIM( s_Languages ); ii++ ) + { + if( s_Languages[ii].m_Lang_Label == languageSel ) + { + setLanguageId( s_Languages[ii].m_WX_Lang_Identifier ); + break; + } + } + + bool succes = SetLanguage( true ); + + if( !succes ) + { + } + + // Set locale option for separator used in float numbers + SetLocaleTo_Default(); +} +*/ + diff --git a/kicad/kicad.h b/kicad/kicad.h index 73ffbe8ebe..129d29dc82 100644 --- a/kicad/kicad.h +++ b/kicad/kicad.h @@ -39,7 +39,7 @@ #include #include -#include +//#include // With a recent wxWidget, we can use the wxFileSystemWatcherEvent // to monitor files add/remove/rename in tree project @@ -47,8 +47,6 @@ #define KICAD_USE_FILES_WATCHER #endif -extern const wxString g_KicadPrjFilenameExtension; - class LAUNCHER_PANEL; class TREEPROJECTFILES; class TREE_PROJECT_FRAME; @@ -116,11 +114,15 @@ enum id_kicad_frm { }; -/* class KICAD_MANAGER_FRAME - * This is the main KiCad frame +/** + * Class KICAD_MANAGER_FRAME + * is the main KiCad project manager frame. It is not a KIWAY_PLAYER. */ class KICAD_MANAGER_FRAME : public EDA_BASE_FRAME { +protected: + wxConfigBase* config(); // override EDA_BASE_FRAME virtual + public: TREE_PROJECT_FRAME* m_LeftWin; LAUNCHER_PANEL* m_Launcher; @@ -133,7 +135,8 @@ public: private: int m_leftWinWidth; -public: KICAD_MANAGER_FRAME( wxWindow* parent, const wxString& title, +public: + KICAD_MANAGER_FRAME( wxWindow* parent, const wxString& title, const wxPoint& pos, const wxSize& size ); ~KICAD_MANAGER_FRAME(); @@ -204,23 +207,9 @@ public: KICAD_MANAGER_FRAME( wxWindow* parent, const wxString& title, void CreateNewProject( const wxString aPrjFullFileName, bool aTemplateSelector ); - /** - * Function LoadSettings - * loads the KiCad main frame specific configuration settings. - * - * Don't forget to call this base method from any derived classes or the - * settings will not get loaded. - */ - void LoadSettings(); + void LoadSettings( wxConfigBase* aCfg ); - /** - * Function SaveSettings - * saves the KiCad main frame specific configuration settings. - * - * Don't forget to call this base method from any derived classes or the - * settings will not get saved. - */ - void SaveSettings(); + void SaveSettings( wxConfigBase* aCfg ); /** * Function Execute @@ -232,13 +221,13 @@ public: KICAD_MANAGER_FRAME( wxWindow* parent, const wxString& title, void Execute( wxWindow* frame, const wxString& execFile, const wxString& param = wxEmptyString ); - class PROCESS_TERMINATE_EVENT_HANDLER : public wxProcess + class TERMINATE_HANDLER : public wxProcess { private: wxString appName; public: - PROCESS_TERMINATE_EVENT_HANDLER( const wxString& appName ) : + TERMINATE_HANDLER( const wxString& appName ) : appName(appName) { } @@ -287,4 +276,8 @@ private: wxBitmapButton* AddBitmapButton( wxWindowID aId, const wxBitmap& aBitmap ); }; +// The C++ project manager includes a single PROJECT in its link image. +class PROJECT; +extern PROJECT& Prj(); + #endif diff --git a/kicad/mainframe.cpp b/kicad/mainframe.cpp index 1dc1e0cade..55f5f1ba0b 100644 --- a/kicad/mainframe.cpp +++ b/kicad/mainframe.cpp @@ -29,7 +29,7 @@ */ #include -#include +#include #include #include #include @@ -40,12 +40,11 @@ #include -static const wxString TreeFrameWidthEntry( wxT( "LeftWinWidth" ) ); +#define TreeFrameWidthEntry wxT( "LeftWinWidth" ) -KICAD_MANAGER_FRAME::KICAD_MANAGER_FRAME( wxWindow* parent, - const wxString& title, - const wxPoint& pos, - const wxSize& size ) : + +KICAD_MANAGER_FRAME::KICAD_MANAGER_FRAME( wxWindow* parent, + const wxString& title, const wxPoint& pos, const wxSize& size ) : EDA_BASE_FRAME( parent, KICAD_MAIN_FRAME_TYPE, title, pos, size, KICAD_DEFAULT_DRAWFRAME_STYLE, wxT( "KicadFrame" ) ) { @@ -63,7 +62,7 @@ KICAD_MANAGER_FRAME::KICAD_MANAGER_FRAME( wxWindow* parent, SetIcon( icon ); // Give the last sise and pos to main window - LoadSettings(); + LoadSettings( config() ); SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y ); // Left window: is the box which display tree project @@ -71,6 +70,7 @@ KICAD_MANAGER_FRAME::KICAD_MANAGER_FRAME( wxWindow* parent, // Right top Window: buttons to launch applications m_Launcher = new LAUNCHER_PANEL( this ); + // Add the wxTextCtrl showing all messages from KiCad: m_MessagesBox = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, @@ -115,6 +115,14 @@ KICAD_MANAGER_FRAME::~KICAD_MANAGER_FRAME() } +wxConfigBase* KICAD_MANAGER_FRAME::config() +{ + wxConfigBase* ret = Pgm().PgmSettings(); + wxASSERT( ret ); + return ret; +} + + void KICAD_MANAGER_FRAME::PrintMsg( const wxString& aText ) { m_MessagesBox->AppendText( aText ); @@ -134,7 +142,7 @@ void KICAD_MANAGER_FRAME::OnCloseWindow( wxCloseEvent& Event ) { int px, py; - UpdateFileHistory( m_ProjectFileName.GetFullPath() ); + UpdateFileHistory( m_ProjectFileName.GetFullPath(), &Pgm().GetFileHistory() ); if( !IsIconized() ) // save main frame position and size { @@ -150,12 +158,12 @@ void KICAD_MANAGER_FRAME::OnCloseWindow( wxCloseEvent& Event ) Event.SetCanVeto( true ); // Close the help frame - if( wxGetApp().GetHtmlHelpController() ) + if( Pgm().GetHtmlHelpController() ) { - if( wxGetApp().GetHtmlHelpController()->GetFrame() ) // returns NULL if no help frame active - wxGetApp().GetHtmlHelpController()->GetFrame()->Close( true ); + if( Pgm().GetHtmlHelpController()->GetFrame() ) // returns NULL if no help frame active + Pgm().GetHtmlHelpController()->GetFrame()->Close( true ); - wxGetApp().SetHtmlHelpController( NULL ); + Pgm().SetHtmlHelpController( NULL ); } m_LeftWin->Show( false ); @@ -170,14 +178,12 @@ void KICAD_MANAGER_FRAME::OnExit( wxCommandEvent& event ) } -void KICAD_MANAGER_FRAME::PROCESS_TERMINATE_EVENT_HANDLER:: - OnTerminate( int pid, int status ) +void KICAD_MANAGER_FRAME::TERMINATE_HANDLER::OnTerminate( int pid, int status ) { + wxString msg = wxString::Format( _( "%s closed [pid=%d]\n" ), + GetChars( appName ), pid ); - wxString msg; - - msg.Printf( appName + _( " closed [pid=%d]\n" ), pid ); - ( (KICAD_MANAGER_FRAME*) wxGetApp().GetTopWindow() )->PrintMsg( msg ); + ( (KICAD_MANAGER_FRAME*) Pgm().App().GetTopWindow() )->PrintMsg( msg ); delete this; } @@ -186,17 +192,15 @@ void KICAD_MANAGER_FRAME::PROCESS_TERMINATE_EVENT_HANDLER:: void KICAD_MANAGER_FRAME::Execute( wxWindow* frame, const wxString& execFile, const wxString& param ) { + TERMINATE_HANDLER* callback = new TERMINATE_HANDLER( execFile ); - PROCESS_TERMINATE_EVENT_HANDLER* callback; - long pid; - wxString msg; - - callback = new PROCESS_TERMINATE_EVENT_HANDLER( execFile ); - pid = ExecuteFile( frame, execFile, param, callback ); + long pid = ExecuteFile( frame, execFile, param, callback ); if( pid > 0 ) { - msg.Printf( execFile + _( " opened [pid=%ld]\n" ), pid ); + wxString msg = wxString::Format( _( "%s opened [pid=%ld]\n" ), + GetChars( execFile ), pid ); + PrintMsg( msg ); } else @@ -267,7 +271,7 @@ void KICAD_MANAGER_FRAME::OnRunGerbview( wxCommandEvent& event ) void KICAD_MANAGER_FRAME::OnOpenTextEditor( wxCommandEvent& event ) { - wxString editorname = wxGetApp().GetEditorName(); + wxString editorname = Pgm().GetEditorName(); if( !editorname.IsEmpty() ) Execute( this, editorname, wxEmptyString ); @@ -294,8 +298,8 @@ void KICAD_MANAGER_FRAME::OnOpenFileInTextEditor( wxCommandEvent& event ) wxString filename = wxT( "\"" ); filename += dlg.GetPath() + wxT( "\"" ); - if( !dlg.GetPath().IsEmpty() && !wxGetApp().GetEditorName().IsEmpty() ) - Execute( this, wxGetApp().GetEditorName(), filename ); + if( !dlg.GetPath().IsEmpty() && !Pgm().GetEditorName().IsEmpty() ) + Execute( this, Pgm().GetEditorName(), filename ); } @@ -311,29 +315,20 @@ void KICAD_MANAGER_FRAME::ClearMsg() } -void KICAD_MANAGER_FRAME::LoadSettings() +void KICAD_MANAGER_FRAME::LoadSettings( wxConfigBase* aCfg ) { - wxConfig* cfg = wxGetApp().GetSettings(); - - if( cfg ) - { - EDA_BASE_FRAME::LoadSettings(); - cfg->Read( TreeFrameWidthEntry, &m_leftWinWidth ); - } + EDA_BASE_FRAME::LoadSettings( aCfg ); + aCfg->Read( TreeFrameWidthEntry, &m_leftWinWidth ); } -void KICAD_MANAGER_FRAME::SaveSettings() +void KICAD_MANAGER_FRAME::SaveSettings( wxConfigBase* aCfg ) { - wxConfig* cfg = wxGetApp().GetSettings(); - - if( cfg ) - { - EDA_BASE_FRAME::SaveSettings(); - cfg->Write( TreeFrameWidthEntry, m_LeftWin->GetSize().x ); - } + EDA_BASE_FRAME::SaveSettings( aCfg ); + aCfg->Write( TreeFrameWidthEntry, m_LeftWin->GetSize().x ); } + /** * a minor helper function: * Prints the Current Working Dir name and the projet name on the text panel. @@ -346,3 +341,4 @@ void KICAD_MANAGER_FRAME::PrintPrjInfo() GetChars( m_ProjectFileName.GetFullPath() ) ); PrintMsg( msg ); } + diff --git a/kicad/menubar.cpp b/kicad/menubar.cpp index 90af49c3ff..4c18881bd3 100644 --- a/kicad/menubar.cpp +++ b/kicad/menubar.cpp @@ -28,7 +28,7 @@ * @brief (Re)Create the project manager menubar for KiCad */ #include -#include +#include #include #include #include @@ -110,7 +110,7 @@ void KICAD_MANAGER_FRAME::ReCreateMenuBar() // Before deleting, remove the menus managed by m_fileHistory // (the file history will be updated when adding/removing files in history) if( openRecentMenu ) - wxGetApp().GetFileHistory().RemoveMenu( openRecentMenu ); + Pgm().GetFileHistory().RemoveMenu( openRecentMenu ); // Delete all existing menus while( menuBar->GetMenuCount() ) @@ -130,8 +130,8 @@ void KICAD_MANAGER_FRAME::ReCreateMenuBar() // File history openRecentMenu = new wxMenu(); - wxGetApp().GetFileHistory().UseMenu( openRecentMenu ); - wxGetApp().GetFileHistory().AddFilesToMenu( ); + Pgm().GetFileHistory().UseMenu( openRecentMenu ); + Pgm().GetFileHistory().AddFilesToMenu( ); AddMenuItem( fileMenu, openRecentMenu, wxID_ANY, _( "Open &Recent" ), @@ -229,7 +229,7 @@ void KICAD_MANAGER_FRAME::ReCreateMenuBar() SubMenuPdfBrowserChoice->Append( item ); SubMenuPdfBrowserChoice->Check( ID_SELECT_DEFAULT_PDF_BROWSER, - wxGetApp().UseSystemPdfBrowser() ); + Pgm().UseSystemPdfBrowser() ); // Favourite item = new wxMenuItem( SubMenuPdfBrowserChoice, @@ -243,7 +243,7 @@ void KICAD_MANAGER_FRAME::ReCreateMenuBar() SubMenuPdfBrowserChoice->Append( item ); SubMenuPdfBrowserChoice->AppendSeparator(); SubMenuPdfBrowserChoice->Check( ID_SELECT_PREFERED_PDF_BROWSER, - !wxGetApp().UseSystemPdfBrowser() ); + !Pgm().UseSystemPdfBrowser() ); // Append PDF Viewer submenu to preferences AddMenuItem( SubMenuPdfBrowserChoice, @@ -261,7 +261,7 @@ void KICAD_MANAGER_FRAME::ReCreateMenuBar() // Language submenu preferencesMenu->AppendSeparator(); - wxGetApp().AddMenuLanguageList( preferencesMenu ); + Pgm().AddMenuLanguageList( preferencesMenu ); // Menu Help: wxMenu* helpMenu = new wxMenu; diff --git a/kicad/pgm_kicad.h b/kicad/pgm_kicad.h new file mode 100644 index 0000000000..5de4cebbb7 --- /dev/null +++ b/kicad/pgm_kicad.h @@ -0,0 +1,74 @@ +#ifndef PGM_KICAD_H_ +#define PGM_KICAD_H_ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2014 KiCad Developers, see CHANGELOG.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 +#include + + +/** + * Class PGM_KICAD + * extends PGM_BASE to bring in FileHistory() and PdfBrowser() which were moved + * from EDA_APP into KIFACE_I. KIFACE_I is not applicable in the project manager + * since it is not a KIFACE. This header is in the kicad directory since nobody + * else needs to know about it. + */ +class PGM_KICAD : public PGM_BASE +{ +public: + PGM_KICAD() : + m_bm( "kicad" ) // indicates a "$HOME/.kicad wxConfig like" config file. + {} + + ~PGM_KICAD() + { + destroy(); + } + + bool OnPgmInit( wxApp* aWxApp ); // overload PGM_BASE virtual + void OnPgmExit(); // overload PGM_BASE virtual + void MacOpenFile( const wxString& aFileName ); // overload PGM_BASE virtual + + wxFileHistory& GetFileHistory() { return m_bm.m_history; } + + wxConfigBase* PgmSettings() { return m_bm.m_config; } + + SEARCH_STACK& SysSearch() { return m_bm.m_search; } + +protected: + + // The PGM_* classes can have difficulties at termination if they + // are not destroyed soon enough. Relying on a static destructor can be + // too late for contained objects like wxSingleInstanceChecker. + void destroy(); + + BIN_MOD m_bm; +}; + + +extern PGM_KICAD& Pgm(); + +#endif // PGM_KICAD_H_ diff --git a/kicad/preferences.cpp b/kicad/preferences.cpp index b7e046c878..cd9ca87223 100644 --- a/kicad/preferences.cpp +++ b/kicad/preferences.cpp @@ -32,7 +32,7 @@ #endif #include -#include +#include #include #include @@ -43,19 +43,19 @@ void KICAD_MANAGER_FRAME::OnUpdateDefaultPdfBrowser( wxUpdateUIEvent& event ) { - event.Check( wxGetApp().UseSystemPdfBrowser() ); + event.Check( Pgm().UseSystemPdfBrowser() ); } void KICAD_MANAGER_FRAME::OnSelectDefaultPdfBrowser( wxCommandEvent& event ) { - wxGetApp().WritePdfBrowserInfos(); + Pgm().WritePdfBrowserInfos(); } void KICAD_MANAGER_FRAME::OnUpdatePreferredPdfBrowser( wxUpdateUIEvent& event ) { - event.Check( !wxGetApp().UseSystemPdfBrowser() ); + event.Check( !Pgm().UseSystemPdfBrowser() ); } @@ -63,7 +63,7 @@ void KICAD_MANAGER_FRAME::OnSelectPreferredPdfBrowser( wxCommandEvent& event ) { bool select = event.GetId() == ID_SELECT_PREFERED_PDF_BROWSER_NAME; - if( !wxGetApp().GetPdfBrowserFileName() && !select ) + if( !Pgm().GetPdfBrowserName() && !select ) { DisplayError( this, _( "You must choose a PDF viewer before using this option." ) ); @@ -77,8 +77,8 @@ void KICAD_MANAGER_FRAME::OnSelectPreferredPdfBrowser( wxCommandEvent& event ) wildcard = _( "Executable files (" ) + wildcard + wxT( ")|" ) + wildcard; - wxGetApp().ReadPdfBrowserInfos(); - wxFileName fn = wxGetApp().GetPdfBrowserFileName(); + Pgm().ReadPdfBrowserInfos(); + wxFileName fn = Pgm().GetPdfBrowserName(); wxFileDialog dlg( this, _( "Select Preferred Pdf Browser" ), fn.GetPath(), fn.GetFullName(), wildcard, wxFD_OPEN | wxFD_FILE_MUST_EXIST ); @@ -86,8 +86,8 @@ void KICAD_MANAGER_FRAME::OnSelectPreferredPdfBrowser( wxCommandEvent& event ) if( dlg.ShowModal() == wxID_CANCEL ) return; - wxGetApp().SetPdfBrowserFileName( dlg.GetPath() ); - wxGetApp().WritePdfBrowserInfos(); + Pgm().SetPdfBrowserName( dlg.GetPath() ); + Pgm().WritePdfBrowserInfos(); } diff --git a/kicad/prjconfig.cpp b/kicad/prjconfig.cpp index 8d19791e24..2f5c67ba2c 100644 --- a/kicad/prjconfig.cpp +++ b/kicad/prjconfig.cpp @@ -28,11 +28,12 @@ */ #include -#include +#include +#include #include #include #include -#include +#include #include #include #include @@ -52,9 +53,9 @@ // (Add them in s_KicadManagerParams if any) // Used also to create new .pro files from the kicad.pro template file // for new projects -static const wxString GeneralGroupName( wxT( "/general" ) ); -PARAM_CFG_ARRAY s_KicadManagerParams; +#define GeneralGroupName wxT( "/general" ) +PARAM_CFG_ARRAY s_KicadManagerParams; void KICAD_MANAGER_FRAME::CreateNewProject( const wxString aPrjFullFileName, bool aTemplateSelector = false ) @@ -65,8 +66,8 @@ void KICAD_MANAGER_FRAME::CreateNewProject( const wxString aPrjFullFileName, ClearMsg(); - // Init default config filename - filename = wxGetApp().FindLibraryPath( wxT( "kicad" ) + g_KicadPrjFilenameExtension ); + // default config filename + filename = Pgm().SysSearch().FindValidPath( wxT( "kicad.pro" ) ); // If we are creating a project from a template, make sure the template directory is sane if( aTemplateSelector ) @@ -85,11 +86,11 @@ void KICAD_MANAGER_FRAME::CreateNewProject( const wxString aPrjFullFileName, if( !envStr.EndsWith( sep ) ) envStr += sep; - templatePath = envStr + wxT("template") + sep; + templatePath = envStr + wxT( "template" ) + sep; } else { - templatePath = wxPathOnly(wxStandardPaths::Get().GetExecutablePath()) + + templatePath = wxPathOnly( wxStandardPaths::Get().GetExecutablePath() ) + sep + wxT( ".." ) + sep + wxT( "share" ) + sep + wxT( "template" ) + sep; } @@ -168,8 +169,8 @@ void KICAD_MANAGER_FRAME::CreateNewProject( const wxString aPrjFullFileName, m_ProjectFileName = newProjectName; // Write settings to project file - wxGetApp().WriteProjectConfig( aPrjFullFileName, - GeneralGroupName, s_KicadManagerParams ); + // was: wxGetApp().WriteProjectConfig( aPrjFullFileName, GeneralGroupName, s_KicadManagerParams ); + Prj().ConfigSave( Pgm().SysSearch(), aPrjFullFileName, GeneralGroupName, s_KicadManagerParams ); } @@ -246,31 +247,33 @@ void KICAD_MANAGER_FRAME::OnLoadProject( wxCommandEvent& event ) /* Check if project file exists and if it is not noname.pro */ wxString filename = m_ProjectFileName.GetFullName(); - wxString nameless_prj = NAMELESS_PROJECT; - nameless_prj += g_KicadPrjFilenameExtension; + wxString nameless_prj = NAMELESS_PROJECT wxT( ".pro" ); if( !m_ProjectFileName.FileExists() && !filename.IsSameAs( nameless_prj ) ) { - wxString msg; - msg.Printf( _( "KiCad project file <%s> not found" ), - GetChars( m_ProjectFileName.GetFullPath() ) ); + wxString msg = wxString::Format( + _( "KiCad project file '%s' not found" ), + GetChars( m_ProjectFileName.GetFullPath() ) ); DisplayError( this, msg ); return; } wxSetWorkingDirectory( m_ProjectFileName.GetPath() ); - wxGetApp().ReadProjectConfig( m_ProjectFileName.GetFullPath(), - GeneralGroupName, s_KicadManagerParams, false ); - title = wxGetApp().GetTitle() + wxT( " " ) + GetBuildVersion() + - wxT( " " ) + m_ProjectFileName.GetFullPath(); + // was wxGetApp().ReadProjectConfig( m_ProjectFileName.GetFullPath(), + // GeneralGroupName, s_KicadManagerParams, false ); + Prj().ConfigLoad( Pgm().SysSearch(), m_ProjectFileName.GetFullPath(), + GeneralGroupName, s_KicadManagerParams, false ); + + title = wxT( "KiCad " ) + GetBuildVersion() + wxT( ' ' ) + m_ProjectFileName.GetFullPath(); if( !m_ProjectFileName.IsDirWritable() ) title += _( " [Read Only]" ); SetTitle( title ); - UpdateFileHistory( m_ProjectFileName.GetFullPath() ); + UpdateFileHistory( m_ProjectFileName.GetFullPath(), &Pgm().GetFileHistory() ); + m_LeftWin->ReCreateTreePrj(); #ifdef KICAD_USE_FILES_WATCHER @@ -290,6 +293,9 @@ void KICAD_MANAGER_FRAME::OnSaveProject( wxCommandEvent& event ) if( !IsWritable( m_ProjectFileName ) ) return; - wxGetApp().WriteProjectConfig( m_ProjectFileName.GetFullPath(), - GeneralGroupName, s_KicadManagerParams ); + // was: wxGetApp().WriteProjectConfig( m_ProjectFileName.GetFullPath(), + // GeneralGroupName, s_KicadManagerParams ); + Prj().ConfigSave( Pgm().SysSearch(), m_ProjectFileName.GetFullPath(), + GeneralGroupName, s_KicadManagerParams ); } + diff --git a/kicad/tree_project_frame.cpp b/kicad/tree_project_frame.cpp index bc7134af42..6e6c706371 100644 --- a/kicad/tree_project_frame.cpp +++ b/kicad/tree_project_frame.cpp @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include @@ -713,7 +713,7 @@ void TREE_PROJECT_FRAME::OnOpenSelectedFileWithTextEditor( wxCommandEvent& event wxString FullFileName = tree_data->GetFileName(); AddDelimiterString( FullFileName ); - wxString editorname = wxGetApp().GetEditorName(); + wxString editorname = Pgm().GetEditorName(); if( !editorname.IsEmpty() ) ExecuteFile( this, editorname, FullFileName ); diff --git a/new/toolchain-mingw32.cmake b/new/toolchain-mingw32.cmake index cbfb7af14e..3e902ac2d1 100644 --- a/new/toolchain-mingw32.cmake +++ b/new/toolchain-mingw32.cmake @@ -13,15 +13,26 @@ set( CMAKE_SYSTEM_PROCESSOR i686 ) # configure only the lines within this block, typically set( TC_PATH /usr/bin ) -set( CROSS_COMPILE i686-w64-mingw32- ) +set( CROSS_COMPILE x86_64-w64-mingw32- ) # specify the cross compiler set( CMAKE_C_COMPILER ${TC_PATH}/${CROSS_COMPILE}gcc ) set( CMAKE_CXX_COMPILER ${TC_PATH}/${CROSS_COMPILE}g++ ) set( CMAKE_RC_COMPILER ${TC_PATH}/${CROSS_COMPILE}windres ) +# One compiler generates either 32 bit or 64 bit code, -m32 says generate 32 bit: +set( CMAKE_CXX_FLAGS_INIT "-m32" CACHE STRING "C++ flag which generates 32 bit code." ) +set( CMAKE_C_FLAGS_INIT "-m32" CACHE STRING "C flag which generates 32 bit code." ) +set( CMAKE_SHARED_LINKER_FLAGS "-m32" CACHE STRING "Linker flag which finds 32 bit code." ) +set( CMAKE_MODULE_LINKER_FLAGS "-m32" CACHE STRING "Linker flag which finds 32 bit code." ) +set( CMAKE_EXE_LINKER_FLAGS "-m32" CACHE STRING "Linker flag which finds 32 bit code." ) + +# Tell the 64 bit toolchain to generate a PE32 object file when running windres: +set( CMAKE_RC_FLAGS "-F pe-i386" CACHE STRING "windres flag which generates 32 bit code." ) + + # where is the target environment -set( CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32 ) +set( CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32 ) #---------------------------------------------------- diff --git a/pagelayout_editor/CMakeLists.txt b/pagelayout_editor/CMakeLists.txt index eecc08abd6..3d25ce7ac3 100644 --- a/pagelayout_editor/CMakeLists.txt +++ b/pagelayout_editor/CMakeLists.txt @@ -1,8 +1,6 @@ -add_definitions(-DPL_EDITOR) +set( MAKE_LINK_MAPS true ) -### -# Includes -### +add_definitions(-DPL_EDITOR) include_directories(BEFORE ${INC_BEFORE}) include_directories( @@ -11,12 +9,7 @@ include_directories( ${INC_AFTER} ) - -### -# Sources -### - -set(PL_EDITOR_SRCS +set( PL_EDITOR_SRCS dialogs/properties_frame_base.cpp dialogs/dialogs_for_printing.cpp dialogs/dialog_new_dataitem_base.cpp @@ -30,7 +23,6 @@ set(PL_EDITOR_SRCS onleftclick.cpp onrightclick.cpp page_layout_writer.cpp - pl_editor.cpp pl_editor_config.cpp pl_editor_frame.cpp pl_editor_undo_redo.cpp @@ -40,10 +32,7 @@ set(PL_EDITOR_SRCS toolbars_pl_editor.cpp ) -### -# We need some extra sources from common -### -set(PL_EDITOR_EXTRA_SRCS +set( PL_EDITOR_EXTRA_SRCS ../common/base_screen.cpp ../common/base_units.cpp ../common/eda_text.cpp @@ -51,58 +40,125 @@ set(PL_EDITOR_EXTRA_SRCS ../common/dialogs/dialog_page_settings.cpp ) -### -# Windows resource file -### -if(WIN32) - if(MINGW) - # PL_EDITOR_RESOURCES variable is set by the macro. - mingw_resource_compiler(pl_editor) - else(MINGW) - set(PL_EDITOR_RESOURCES pl_editor.rc) - endif(MINGW) -endif(WIN32) -### -# Apple resource files -### -if(APPLE) - set(PL_EDITOR_RESOURCES pl_editor.icns pl_editor_doc.icns) - set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/pl_editor.icns" - PROPERTIES MACOSX_PACKAGE_LOCATION Resources) - set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/pl_editor_doc.icns" - PROPERTIES MACOSX_PACKAGE_LOCATION Resources) - set(MACOSX_BUNDLE_ICON_FILE pl_editor.icns) - set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.pl_editor) -endif(APPLE) +if( MINGW ) + # PL_EDITOR_RESOURCES variable is set by the macro. + mingw_resource_compiler(pl_editor) +endif() -### -# Create the pl_editor executable -### -add_executable(pl_editor WIN32 MACOSX_BUNDLE - ${PL_EDITOR_SRCS} - ${DIALOGS_SRCS} - ${PL_EDITOR_EXTRA_SRCS} - ${PL_EDITOR_RESOURCES}) -### -# Set properties for APPLE on pl_editor target -### -if(APPLE) - set_target_properties(pl_editor PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist) -endif(APPLE) +if( USE_KIWAY_DLLS ) -### -# Link executable target pl_editor with correct libraries -### -target_link_libraries(pl_editor common polygon bitmaps - ${OPENGL_LIBRARIES} - ${wxWidgets_LIBRARIES} - ${GDI_PLUS_LIBRARIES}) + # a very small program launcher for pcbnew_kiface + add_executable( pl_editor WIN32 MACOSX_BUNDLE + ../common/single_top.cpp + ../common/pgm_base.cpp + ) + set_source_files_properties( ../common/single_top.cpp PROPERTIES + COMPILE_DEFINITIONS "TOP_FRAME=PL_EDITOR_FRAME_TYPE;PGM_DATA_FILE_EXT=\"kicad_wks\";BUILD_KIWAY_DLL" + ) + target_link_libraries( pl_editor + #singletop # replaces common, giving us restrictive control and link warnings. + # There's way too much crap coming in from common yet. + common + bitmaps + ${wxWidgets_LIBRARIES} + ) + if( MAKE_LINK_MAPS ) + set_target_properties( pl_editor PROPERTIES + LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=pl_editor.map" ) + endif() -### -# Add pl_editor as install target -### -install(TARGETS pl_editor + # the main pcbnew program, in DSO form. + add_library( pl_editor_kiface MODULE + pl_editor.cpp + ${PL_EDITOR_SRCS} + ${DIALOGS_SRCS} + ${PL_EDITOR_EXTRA_SRCS} + ${PL_EDITOR_RESOURCES} + ) + target_link_libraries( pl_editor_kiface + common + polygon + bitmaps + ${OPENGL_LIBRARIES} + ${wxWidgets_LIBRARIES} + ${GDI_PLUS_LIBRARIES} + ) + set_target_properties( pl_editor_kiface PROPERTIES + OUTPUT_NAME pl_editor + PREFIX ${KIFACE_PREFIX} + SUFFIX ${KIFACE_SUFFIX} + ) + set_source_files_properties( pl_editor.cpp PROPERTIES + # The KIFACE is in pcbnew.cpp, export it: + COMPILE_DEFINITIONS "BUILD_KIWAY_DLL;COMPILING_DLL" + ) + if( MAKE_LINK_MAPS ) + set_target_properties( pl_editor_kiface PROPERTIES + LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=_pl_editor.kiface.map" ) + endif() + + # if building pcbnew, then also build pcbnew_kiface if out of date. + add_dependencies( pl_editor pl_editor_kiface ) + + # these 2 binaries are a matched set, keep them together: + install( TARGETS pl_editor DESTINATION ${KICAD_BIN} - COMPONENT binary) + COMPONENT binary + ) + install( TARGETS pl_editor_kiface + DESTINATION ${KICAD_BIN} + COMPONENT binary + ) + + +else() + + add_executable( pl_editor WIN32 MACOSX_BUNDLE + pl_editor.cpp + ${PL_EDITOR_SRCS} + ${DIALOGS_SRCS} + ${PL_EDITOR_EXTRA_SRCS} + ${PL_EDITOR_RESOURCES} + ) + + if( APPLE ) + set_target_properties( pl_editor PROPERTIES + MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist + ) + endif() + + target_link_libraries( pl_editor + common + polygon + bitmaps + ${OPENGL_LIBRARIES} + ${wxWidgets_LIBRARIES} + ${GDI_PLUS_LIBRARIES} + ) + + install( TARGETS pl_editor + DESTINATION ${KICAD_BIN} + COMPONENT binary + ) + +endif() + + +if( APPLE ) + set( PL_EDITOR_RESOURCES pl_editor.icns pl_editor_doc.icns ) + set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/pl_editor.icns" PROPERTIES + MACOSX_PACKAGE_LOCATION Resources + ) + set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/pl_editor_doc.icns" PROPERTIES + MACOSX_PACKAGE_LOCATION Resources + ) + set( MACOSX_BUNDLE_ICON_FILE pl_editor.icns ) + set( MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.pl_editor ) + + set_target_properties( pl_editor PROPERTIES + MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist + ) +endif() + diff --git a/pagelayout_editor/events_functions.cpp b/pagelayout_editor/events_functions.cpp index 0851057923..0473900644 100644 --- a/pagelayout_editor/events_functions.cpp +++ b/pagelayout_editor/events_functions.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include #include diff --git a/pagelayout_editor/menubar.cpp b/pagelayout_editor/menubar.cpp index 77da7936db..7544f66dd8 100644 --- a/pagelayout_editor/menubar.cpp +++ b/pagelayout_editor/menubar.cpp @@ -29,15 +29,15 @@ #include -#include - +#include +#include #include #include #include #include -void PL_EDITOR_FRAME::ReCreateMenuBar( void ) +void PL_EDITOR_FRAME::ReCreateMenuBar() { // Create and try to get the current menubar wxMenuBar* menuBar = GetMenuBar(); @@ -74,11 +74,13 @@ void PL_EDITOR_FRAME::ReCreateMenuBar( void ) // Add this menu to list menu managed by m_fileHistory // (the file history will be updated when adding/removing files in history if( openRecentMenu ) - wxGetApp().GetFileHistory().RemoveMenu( openRecentMenu ); + Kiface().GetFileHistory().RemoveMenu( openRecentMenu ); openRecentMenu = new wxMenu(); - wxGetApp().GetFileHistory().UseMenu( openRecentMenu ); - wxGetApp().GetFileHistory().AddFilesToMenu(); + + Kiface().GetFileHistory().UseMenu( openRecentMenu ); + Kiface().GetFileHistory().AddFilesToMenu(); + AddMenuItem( fileMenu, openRecentMenu, wxID_ANY, _( "Open &Recent Page Layout File" ), wxEmptyString, KiBitmap( pagelayout_recent_xpm ) ); @@ -132,7 +134,7 @@ void PL_EDITOR_FRAME::ReCreateMenuBar( void ) KiBitmap( editor_xpm ) ); // Language submenu - wxGetApp().AddMenuLanguageList( preferencesMenu ); + Pgm().AddMenuLanguageList( preferencesMenu ); // Hotkey submenu AddHotkeyConfigMenu( preferencesMenu ); diff --git a/pagelayout_editor/pl_editor.cpp b/pagelayout_editor/pl_editor.cpp index f8657090dd..b96b07d4aa 100644 --- a/pagelayout_editor/pl_editor.cpp +++ b/pagelayout_editor/pl_editor.cpp @@ -28,7 +28,8 @@ */ #include -#include +//#include +#include #include #include #include @@ -43,24 +44,113 @@ extern EDA_COLOR_T g_DrawBgColor; -IMPLEMENT_APP( EDA_APP ) +namespace PGE { -/* MacOSX: Needed for file association - * http://wiki.wxwidgets.org/WxMac-specific_topics - */ -void EDA_APP::MacOpenFile( const wxString& aFileName ) +static struct IFACE : public KIFACE_I { - PL_EDITOR_FRAME* frame = ((PL_EDITOR_FRAME*)GetTopWindow()); - wxFileName filename = aFileName; + // Of course all are virtual overloads, implementations of the KIFACE. - if( !filename.FileExists() ) - return; + IFACE( const char* aName, KIWAY::FACE_T aType ) : + KIFACE_I( aName, aType ) + {} - frame->LoadPageLayoutDescrFile( aFileName ); + bool OnKifaceStart( PGM_BASE* aProgram ); + + void OnKifaceEnd(); + + wxWindow* CreateWindow( wxWindow* aParent, int aClassId, KIWAY* aKiway, int aCtlBits = 0 ) + { + switch( aClassId ) + { + case PL_EDITOR_FRAME_TYPE: + { + PL_EDITOR_FRAME* frame = new PL_EDITOR_FRAME( aKiway, aParent ); + + /* Is this really needed since at this point there is no open file? + frame->Zoom_Automatique( true ); // Zoom fit in frame + + if so, why is the constructor not doing it? + */ + + return frame; + } + break; + + default: + ; + } + + return NULL; + } + + /** + * Function IfaceOrAddress + * return a pointer to the requested object. The safest way to use this + * is to retrieve a pointer to a static instance of an interface, similar to + * how the KIFACE interface is exported. But if you know what you are doing + * use it to retrieve anything you want. + * + * @param aDataId identifies which object you want the address of. + * + * @return void* - and must be cast into the know type. + */ + void* IfaceOrAddress( int aDataId ) + { + return NULL; + } + +} kiface( "pl_editor", KIWAY::FACE_PL_EDITOR ); + +} // namespace + +using namespace PGE; + +static PGM_BASE* process; + +KIFACE_I& Kiface() { return kiface; } + + +// KIFACE_GETTER's actual spelling is a substitution macro found in kiway.h. +// KIFACE_GETTER will not have name mangling due to declaration in kiway.h. +MY_API( KIFACE* ) KIFACE_GETTER( int* aKIFACEversion, int aKiwayVersion, PGM_BASE* aProgram ) +{ + process = (PGM_BASE*) aProgram; + return &kiface; } -bool EDA_APP::OnInit() +PGM_BASE& Pgm() +{ + wxASSERT( process ); // KIFACE_GETTER has already been called. + return *process; +} + + +bool IFACE::OnKifaceStart( PGM_BASE* aProgram ) +{ + start_common(); + + // Must be called before creating the main frame in order to + // display the real hotkeys in menus or tool tips + ReadHotkeyConfig( wxT("PlEditorFrame"), s_PlEditor_Hokeys_Descr ); + + g_UserUnit = MILLIMETRES; + g_DrawBgColor = WHITE; + g_ShowPageLimits = true; + + return true; +} + + +void IFACE::OnKifaceEnd() +{ + end_common(); +} + + +#if 0 +bool MYFACE::OnKifaceStart( PGM_BASE* aProgram ) + { wxFileName fn; @@ -127,3 +217,4 @@ bool EDA_APP::OnInit() return true; } +#endif diff --git a/pagelayout_editor/pl_editor_config.cpp b/pagelayout_editor/pl_editor_config.cpp index b5b8f12866..1586a5ca2b 100644 --- a/pagelayout_editor/pl_editor_config.cpp +++ b/pagelayout_editor/pl_editor_config.cpp @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include diff --git a/pagelayout_editor/pl_editor_frame.cpp b/pagelayout_editor/pl_editor_frame.cpp index f1f378deee..d5defe8d16 100644 --- a/pagelayout_editor/pl_editor_frame.cpp +++ b/pagelayout_editor/pl_editor_frame.cpp @@ -27,7 +27,8 @@ */ #include -#include +//#include +#include #include #include #include @@ -52,11 +53,9 @@ #define PL_EDITOR_FRAME_NAME wxT( "PlEditorFrame" ) -PL_EDITOR_FRAME::PL_EDITOR_FRAME( wxWindow* aParent, const wxString& aTitle, - const wxPoint& aPosition, const wxSize& aSize, - long aStyle ) : - EDA_DRAW_FRAME( aParent, PL_EDITOR_FRAME_TYPE, aTitle, aPosition, aSize, - aStyle, PL_EDITOR_FRAME_NAME ) +PL_EDITOR_FRAME::PL_EDITOR_FRAME( KIWAY* aKiway, wxWindow* aParent ) : + EDA_DRAW_FRAME( aKiway, aParent, PL_EDITOR_FRAME_TYPE, wxT( "PlEditorFrame" ), + wxDefaultPosition, wxDefaultSize, KICAD_DEFAULT_DRAWFRAME_STYLE, PL_EDITOR_FRAME_NAME ) { m_FrameName = PL_EDITOR_FRAME_NAME; @@ -79,8 +78,7 @@ PL_EDITOR_FRAME::PL_EDITOR_FRAME( wxWindow* aParent, const wxString& aTitle, wxSize pageSizeIU = GetPageLayout().GetPageSettings().GetSizeIU(); SetScreen( new PL_EDITOR_SCREEN( pageSizeIU ) ); - m_config = wxGetApp().GetSettings(); - LoadSettings(); + LoadSettings( config() ); SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y ); if( m_LastGridSizeId < ID_POPUP_GRID_LEVEL_1MM-ID_POPUP_GRID_LEVEL_1000 ) @@ -181,6 +179,28 @@ PL_EDITOR_FRAME::~PL_EDITOR_FRAME() } +bool PL_EDITOR_FRAME::OpenProjectFiles( const std::vector& aFileSet, int aCtl ) +{ + wxString fn = aFileSet[0]; + + if( !LoadPageLayoutDescrFile( fn ) ) + { + wxString msg = wxString::Format( + _( "Error when loading file '%s'" ), + GetChars( fn ) + ); + + wxMessageBox( msg ); + return false; + } + else + { + OnNewPageLayout(); + return true; + } +} + + void PL_EDITOR_FRAME::OnCloseWindow( wxCloseEvent& Event ) { if( GetScreen()->IsModify() ) @@ -232,7 +252,8 @@ void PL_EDITOR_FRAME::OnCloseWindow( wxCloseEvent& Event ) // do not show the window because we do not want any paint event Show( false ); - wxGetApp().SaveCurrentSetupValues( m_configSettings ); + // was: Pgm().SaveCurrentSetupValues( m_configSettings ); + wxConfigSaveSetups( Kiface().KifaceSettings(), m_configSettings ); // On Linux, m_propertiesPagelayout must be destroyed // before deleting the main frame to avoid a crash when closing @@ -268,31 +289,29 @@ double PL_EDITOR_FRAME::BestZoom() #define PROPERTIES_FRAME_WIDTH_KEY wxT("PropertiesFrameWidth") #define CORNER_ORIGIN_CHOICE_KEY wxT("CornerOriginChoice") -void PL_EDITOR_FRAME::LoadSettings() +void PL_EDITOR_FRAME::LoadSettings( wxConfigBase* aCfg ) { - EDA_DRAW_FRAME::LoadSettings(); - m_config->Read( DESIGN_TREE_WIDTH_KEY, &m_designTreeWidth, 100); - m_config->Read( PROPERTIES_FRAME_WIDTH_KEY, &m_propertiesFrameWidth, 150); - m_config->Read( CORNER_ORIGIN_CHOICE_KEY, &m_originSelectChoice ); + EDA_DRAW_FRAME::LoadSettings( aCfg ); + + aCfg->Read( DESIGN_TREE_WIDTH_KEY, &m_designTreeWidth, 100); + aCfg->Read( PROPERTIES_FRAME_WIDTH_KEY, &m_propertiesFrameWidth, 150); + aCfg->Read( CORNER_ORIGIN_CHOICE_KEY, &m_originSelectChoice ); } -void PL_EDITOR_FRAME::SaveSettings() +void PL_EDITOR_FRAME::SaveSettings( wxConfigBase* aCfg ) { - wxConfig* config = wxGetApp().GetSettings(); - - if( config == NULL ) - return; + EDA_DRAW_FRAME::SaveSettings( aCfg ); m_designTreeWidth = m_treePagelayout->GetSize().x; m_propertiesFrameWidth = m_propertiesPagelayout->GetSize().x; - EDA_DRAW_FRAME::SaveSettings(); - m_config->Write( DESIGN_TREE_WIDTH_KEY, m_designTreeWidth); - m_config->Write( PROPERTIES_FRAME_WIDTH_KEY, m_propertiesFrameWidth); - m_config->Write( CORNER_ORIGIN_CHOICE_KEY, m_originSelectChoice ); + aCfg->Write( DESIGN_TREE_WIDTH_KEY, m_designTreeWidth); + aCfg->Write( PROPERTIES_FRAME_WIDTH_KEY, m_propertiesFrameWidth); + aCfg->Write( CORNER_ORIGIN_CHOICE_KEY, m_originSelectChoice ); - wxGetApp().SaveCurrentSetupValues( GetConfigurationSettings() ); + // was: wxGetApp().SaveCurrentSetupValues( GetConfigurationSettings() ); + wxConfigSaveSetups( aCfg, GetConfigurationSettings() ); } diff --git a/pagelayout_editor/pl_editor_frame.h b/pagelayout_editor/pl_editor_frame.h index c88ed638eb..7ba3a8dc15 100644 --- a/pagelayout_editor/pl_editor_frame.h +++ b/pagelayout_editor/pl_editor_frame.h @@ -30,8 +30,8 @@ #define _PL_EDITOR_FRAME_H -#include -#include +#include +#include #include #include #include @@ -40,22 +40,23 @@ class PROPERTIES_FRAME; class DESIGN_TREE_FRAME; class WORKSHEET_DATAITEM; + /** * Class PL_EDITOR_FRAME * is the main window used in the page layout editor. */ - class PL_EDITOR_FRAME : public EDA_DRAW_FRAME { PL_EDITOR_LAYOUT m_pageLayout; - int m_designTreeWidth; // the last width (in pixels) of m_treePagelayout - int m_propertiesFrameWidth; // the last width (in pixels) of m_propertiesPagelayout - wxConfig* m_config; - wxChoice* m_originSelectBox; // Corner origin choice for coordinates - int m_originSelectChoice; // the last choice for m_originSelectBox - wxChoice* m_pageSelectBox; // The page number sel'ector (page 1 or other pages - // usefull when there are some items which are - // only on page 1, not on page 1 + + int m_designTreeWidth; // the last width (in pixels) of m_treePagelayout + int m_propertiesFrameWidth; // the last width (in pixels) of m_propertiesPagelayout + + wxChoice* m_originSelectBox; // Corner origin choice for coordinates + int m_originSelectChoice; // the last choice for m_originSelectBox + wxChoice* m_pageSelectBox; // The page number sel'ector (page 1 or other pages + // usefull when there are some items which are + // only on page 1, not on page 1 wxPoint m_grid_origin; @@ -70,12 +71,33 @@ private: PARAM_CFG_ARRAY m_configSettings; public: - PL_EDITOR_FRAME( wxWindow* aParent, const wxString& aTitle, - const wxPoint& aPosition, const wxSize& aSize, - long aStyle = KICAD_DEFAULT_DRAWFRAME_STYLE ); - + PL_EDITOR_FRAME( KIWAY* aKiway, wxWindow* aParent ); ~PL_EDITOR_FRAME(); + bool OpenProjectFiles( const std::vector& aFileSet, int aCtl ); // overload KIWAY_PLAYER + + /** + * Function LoadPageLayoutDescrFile + * Loads a .kicad_wks page layout descr file + * @param aFullFileName = the filename. + */ + bool LoadPageLayoutDescrFile( const wxString& aFullFileName ); + + /** + * Function SavePageLayoutDescrFile + * Save the current layout in a .kicad_wks page layout descr file + * @param aFullFileName = the filename. + */ + bool SavePageLayoutDescrFile( const wxString& aFullFileName ); + + /** + * Function InsertPageLayoutDescrFile + * Loads a .kicad_wks page layout descr file, and add items + * to the current layout list + * @param aFullFileName = the filename. + */ + bool InsertPageLayoutDescrFile( const wxString& aFullFileName ); + void OnCloseWindow( wxCloseEvent& Event ); // Virtual basic functions: @@ -172,23 +194,9 @@ public: */ PARAM_CFG_ARRAY& GetConfigurationSettings( void ); - /** - * Load applications settings specific to page layout editor. - * - * This overrides the base class EDA_DRAW_FRAME::LoadSettings(). - */ - virtual void LoadSettings(); + void LoadSettings( wxConfigBase* aCfg ); // override virtual - /** - * Save applications settings common to PCB draw frame objects. - * - * This overrides the base class EDA_DRAW_FRAME::SaveSettings() to - * save settings specific to the application main window. It - * calls down to the base class to save settings common to all - * drawing frames. Please put your application settings for pl editor here - * to avoid having application settings saved all over the place. - */ - virtual void SaveSettings(); + void SaveSettings( wxConfigBase* aCfg ); // override virtual /** * Function SetLanguage @@ -266,28 +274,6 @@ public: void OnFileHistory( wxCommandEvent& event ); - /** - * Function LoadPageLayoutDescrFile - * Loads a .kicad_wks page layout descr file - * @param aFullFileName = the filename. - */ - bool LoadPageLayoutDescrFile( const wxString& aFullFileName ); - - /** - * Function SavePageLayoutDescrFile - * Save the current layout in a .kicad_wks page layout descr file - * @param aFullFileName = the filename. - */ - bool SavePageLayoutDescrFile( const wxString& aFullFileName ); - - /** - * Function InsertPageLayoutDescrFile - * Loads a .kicad_wks page layout descr file, and add items - * to the current layout list - * @param aFullFileName = the filename. - */ - bool InsertPageLayoutDescrFile( const wxString& aFullFileName ); - /** * @return the filename of the current layout descr file * If this is the default (no loaded file) returns a emtpy name diff --git a/pcb_calculator/CMakeLists.txt b/pcb_calculator/CMakeLists.txt index 4bbd5be02d..74be8fe1d7 100644 --- a/pcb_calculator/CMakeLists.txt +++ b/pcb_calculator/CMakeLists.txt @@ -1,5 +1,5 @@ -include_directories(BEFORE ${INC_BEFORE}) +include_directories( BEFORE ${INC_BEFORE} ) include_directories( bitmaps dialogs @@ -10,13 +10,12 @@ include_directories( ${INC_AFTER} ) -set(PCB_CALCULATOR_SRCS +set( PCB_CALCULATOR_SRCS attenuators.cpp board_classes_values.cpp colorcode.cpp electrical_spacing_values.cpp params_read_write.cpp - pcb_calculator.cpp pcb_calculator_frame.cpp datafile_read_write.cpp regulators_funct.cpp @@ -38,24 +37,21 @@ set(PCB_CALCULATOR_SRCS dialogs/dialog_regulator_data_base.cpp ) -if(WIN32) - if(MINGW) - # PCB_CALCULATOR_RESOURCES variable is set by the macro. - mingw_resource_compiler(pcb_calculator) - else(MINGW) - set(PCB_CALCULATOR_RESOURCES pcb_calculator.rc) - endif(MINGW) -endif(WIN32) +if( MINGW ) + # PCB_CALCULATOR_RESOURCES variable is set by the macro. + mingw_resource_compiler(pcb_calculator) +endif() -if(APPLE) - set(PCB_CALCULATOR_RESOURCES pcb_calculator.icns) - set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/pcb_calculator.icns" - PROPERTIES MACOSX_PACKAGE_LOCATION Resources) - set(MACOSX_BUNDLE_ICON_FILE pcb_calculator.icns) - set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.pcb_calculator) - set(MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist) -endif(APPLE) +if( APPLE ) + set( PCB_CALCULATOR_RESOURCES pcb_calculator.icns ) + set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/pcb_calculator.icns" PROPERTIES + MACOSX_PACKAGE_LOCATION Resources + ) + set( MACOSX_BUNDLE_ICON_FILE pcb_calculator.icns ) + set( MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.pcb_calculator ) + set( MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist ) +endif() # auto-generate pcb_calculator_datafile.h and pcb_calculator_datafile_keywords.cpp # for the storage data file format. @@ -70,25 +66,103 @@ make_lexer( ) -add_executable(pcb_calculator WIN32 MACOSX_BUNDLE - ${PCB_CALCULATOR_SRCS} - ${PCB_CALCULATOR_RESOURCES} - ) +if( USE_KIWAY_DLLS ) +#if( false ) + add_executable( pcb_calculator WIN32 MACOSX_BUNDLE + ../common/single_top.cpp + ../common/pgm_base.cpp + ) + set_source_files_properties( ../common/single_top.cpp PROPERTIES + COMPILE_DEFINITIONS "TOP_FRAME=0;BUILD_KIWAY_DLL" + ) + target_link_libraries( pcb_calculator + #singletop # replaces common, giving us restrictive control and link warnings. + # There's way too much crap coming in from common yet. + common + bitmaps + ${wxWidgets_LIBRARIES} + ) + if( MAKE_LINK_MAPS ) + set_target_properties( pcb_calculator PROPERTIES + LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=pcb_calculator.map" ) + endif() -if(APPLE) - set_target_properties(pcb_calculator PROPERTIES MACOSX_BUNDLE_INFO_PLIST - ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist) -endif(APPLE) + # the main pcb_calculator program, in DSO form. + add_library( pcb_calculator_kiface MODULE + pcb_calculator.cpp + ${PCB_CALCULATOR_SRCS} + ${PCB_CALCULATOR_RESOURCES} + ) + set_target_properties( pcb_calculator_kiface PROPERTIES + OUTPUT_NAME pcb_calculator + PREFIX ${KIFACE_PREFIX} + SUFFIX ${KIFACE_SUFFIX} + ) + target_link_libraries( pcb_calculator_kiface + common + bitmaps + polygon + ${wxWidgets_LIBRARIES} + ) + set_source_files_properties( pcb_calculator.cpp PROPERTIES + # The KIFACE is in pcb_calculator.cpp, export it: + COMPILE_DEFINITIONS "BUILD_KIWAY_DLL;COMPILING_DLL" + ) + if( MAKE_LINK_MAPS ) + set_target_properties( pcb_calculator_kiface PROPERTIES + LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=_pcb_calculator.kiface.map" ) + endif() -target_link_libraries( pcb_calculator - common - bitmaps - polygon - ${wxWidgets_LIBRARIES} - ) + # if building pcb_calculator, then also build pcb_calculator_kiface if out of date. + add_dependencies( pcb_calculator pcb_calculator_kiface ) -install(TARGETS pcb_calculator + # these 2 binaries are a matched set, keep them together + install( TARGETS pcb_calculator DESTINATION ${KICAD_BIN} - COMPONENT binary) + COMPONENT binary + ) + install( TARGETS pcb_calculator_kiface + DESTINATION ${KICAD_BIN} + COMPONENT binary + ) + if( APPLE ) + set_target_properties( pcb_calculator PROPERTIES + MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist + ) + endif() + +else() + + add_executable( pcb_calculator WIN32 MACOSX_BUNDLE + ../common/single_top.cpp + pcb_calculator.cpp + ${PCB_CALCULATOR_SRCS} + ${PCB_CALCULATOR_RESOURCES} + ) + set_source_files_properties( ../common/single_top.cpp PROPERTIES + COMPILE_DEFINITIONS "TOP_FRAME=0" + ) + set_source_files_properties( pcb_calculator.cpp PROPERTIES + COMPILE_DEFINITIONS "COMPILING_DLL" + ) + + if( APPLE ) + set_target_properties( pcb_calculator PROPERTIES + MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist + ) + endif() + + target_link_libraries( pcb_calculator + common + bitmaps + polygon + ${wxWidgets_LIBRARIES} + ) + install( TARGETS pcb_calculator + DESTINATION ${KICAD_BIN} + COMPONENT binary + ) + +endif() diff --git a/pcb_calculator/attenuators.cpp b/pcb_calculator/attenuators.cpp index 18c02cd448..b2f27a2c58 100644 --- a/pcb_calculator/attenuators.cpp +++ b/pcb_calculator/attenuators.cpp @@ -30,7 +30,7 @@ #include #include -extern double ReturnDoubleFromString( const wxString& TextValue ); +extern double DoubleFromString( const wxString& TextValue ); // Called on a attenuator selection void PCB_CALCULATOR_FRAME::OnAttenuatorSelection( wxCommandEvent& event ) @@ -66,11 +66,11 @@ void PCB_CALCULATOR_FRAME::TransfPanelDataToAttenuator() wxString msg; msg = m_AttValueCtrl->GetValue(); - m_currAttenuator->m_Attenuation = ReturnDoubleFromString(msg); + m_currAttenuator->m_Attenuation = DoubleFromString(msg); msg = m_ZinValueCtrl->GetValue(); - m_currAttenuator->m_Zin = ReturnDoubleFromString(msg); + m_currAttenuator->m_Zin = DoubleFromString(msg); msg = m_ZoutValueCtrl->GetValue(); - m_currAttenuator->m_Zout = ReturnDoubleFromString(msg); + m_currAttenuator->m_Zout = DoubleFromString(msg); } diff --git a/pcb_calculator/attenuators/attenuator_classes.cpp b/pcb_calculator/attenuators/attenuator_classes.cpp index 122480ec39..ebec3d887e 100644 --- a/pcb_calculator/attenuators/attenuator_classes.cpp +++ b/pcb_calculator/attenuators/attenuator_classes.cpp @@ -52,7 +52,7 @@ ATTENUATOR::~ATTENUATOR() #define KEYWORD_ATTENUATOR_ZOUT wxT( "Zout" ) #define KEYWORD_ATTENUATORS wxT( "Attenuators/" ) -void ATTENUATOR::ReadConfig( wxConfig* aConfig ) +void ATTENUATOR::ReadConfig( wxConfigBase* aConfig ) { aConfig->SetPath( KEYWORD_ATTENUATORS + m_Name ); if( m_Attenuation_Enable ) @@ -63,7 +63,7 @@ void ATTENUATOR::ReadConfig( wxConfig* aConfig ) } -void ATTENUATOR::WriteConfig( wxConfig* aConfig ) +void ATTENUATOR::WriteConfig( wxConfigBase* aConfig ) { aConfig->SetPath( KEYWORD_ATTENUATORS + m_Name ); aConfig->Write( KEYWORD_ATTENUATOR_ATT, m_Attenuation ); diff --git a/pcb_calculator/attenuators/attenuator_classes.h b/pcb_calculator/attenuators/attenuator_classes.h index 65a3705ee9..a2014fa4a2 100644 --- a/pcb_calculator/attenuators/attenuator_classes.h +++ b/pcb_calculator/attenuators/attenuator_classes.h @@ -64,14 +64,14 @@ public: * Read values stored in config for this attenuator * @param aConfig = the config to use */ - void ReadConfig( wxConfig* aConfig ); + void ReadConfig( wxConfigBase* aConfig ); /** * Function WriteConfig * Read values stored in config for this attenuator * @param aConfig = the config to use */ - void WriteConfig( wxConfig* aConfig ); + void WriteConfig( wxConfigBase* aConfig ); }; class ATTENUATOR_PI : public ATTENUATOR diff --git a/pcb_calculator/datafile_read_write.cpp b/pcb_calculator/datafile_read_write.cpp index 618e426166..aef8427ca9 100644 --- a/pcb_calculator/datafile_read_write.cpp +++ b/pcb_calculator/datafile_read_write.cpp @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include #include @@ -127,7 +127,7 @@ int PCB_CALCULATOR_DATAFILE::WriteHeader( OUTPUTFORMATTER* aFormatter ) const th aFormatter->Print( nestlevel++, "(date %s)\n", aFormatter->Quotew( DateAndTime() ).c_str() ); aFormatter->Print( nestlevel++, "(tool %s)\n", - aFormatter->Quotew( wxGetApp().GetAppName() + + aFormatter->Quotew( Pgm().App().GetAppName() + wxChar(' ') + GetBuildVersion() ).c_str() ); return nestlevel; diff --git a/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp b/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp index abb5da9576..c20b6b5080 100644 --- a/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp +++ b/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 8 2012) +// C++ code generated with wxFormBuilder (version Nov 5 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -20,7 +20,7 @@ /////////////////////////////////////////////////////////////////////////// -PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style ) +PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : KIWAY_PLAYER( parent, id, title, pos, size, style ) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); diff --git a/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp b/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp index 5970dafbc8..da5cd391c3 100644 --- a/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp +++ b/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp @@ -20,8 +20,10 @@ . 1 + 1 1 1 + UI 0 0 @@ -44,7 +46,7 @@ 670,489 wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER - + KIWAY_PLAYER; kiway_player.h Pcb Calculator @@ -472,7 +474,7 @@ - Load From File; F:\kicad-launchpad\testing\pcb_calculator\bitmaps\regul_3pins.xpm + Load From File; ../bitmaps/regul_3pins.xpm 1 0 @@ -3266,7 +3268,7 @@ Track Width 0 - + 1 1 1 @@ -7332,7 +7334,7 @@ Electrical Spacing 0 - + 1 1 1 @@ -8180,7 +8182,7 @@ TransLine 0 - + 1 1 1 @@ -14621,7 +14623,7 @@ RF Attenuators 0 - + 1 1 1 @@ -16952,11 +16954,11 @@ - + Color Code 0 - + 1 1 1 @@ -18130,11 +18132,11 @@ - + Board Classes 0 - + 1 1 1 diff --git a/pcb_calculator/dialogs/pcb_calculator_frame_base.h b/pcb_calculator/dialogs/pcb_calculator_frame_base.h index 117707e747..4c6c666d59 100644 --- a/pcb_calculator/dialogs/pcb_calculator_frame_base.h +++ b/pcb_calculator/dialogs/pcb_calculator_frame_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 8 2012) +// C++ code generated with wxFormBuilder (version Nov 5 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -11,11 +11,13 @@ #include #include #include +class KIWAY_PLAYER; class UNIT_SELECTOR_ANGLE; class UNIT_SELECTOR_FREQUENCY; class UNIT_SELECTOR_LEN; class UNIT_SELECTOR_RESISTOR; +#include "kiway_player.h" #include #include #include @@ -48,7 +50,7 @@ class UNIT_SELECTOR_RESISTOR; /////////////////////////////////////////////////////////////////////////////// /// Class PCB_CALCULATOR_FRAME_BASE /////////////////////////////////////////////////////////////////////////////// -class PCB_CALCULATOR_FRAME_BASE : public wxFrame +class PCB_CALCULATOR_FRAME_BASE : public KIWAY_PLAYER { private: diff --git a/pcb_calculator/electrical_spacing_values.cpp b/pcb_calculator/electrical_spacing_values.cpp index 66609d3533..5a9213b61f 100644 --- a/pcb_calculator/electrical_spacing_values.cpp +++ b/pcb_calculator/electrical_spacing_values.cpp @@ -30,7 +30,7 @@ #include #include -extern double ReturnDoubleFromString( const wxString& TextValue ); +extern double DoubleFromString( const wxString& TextValue ); #define VALUE_COUNT 7 @@ -122,7 +122,7 @@ void PCB_CALCULATOR_FRAME::ElectricalSpacingUpdateData( double aUnitScale ) double voltage = 500.0; // to calculate values at V > 500V txt = m_ElectricalSpacingVoltage->GetValue(); if( ! txt.IsEmpty() ) - voltage = ReturnDoubleFromString(txt); + voltage = DoubleFromString(txt); if( voltage < 500.0 ) voltage = 500.0; txt.Printf( wxT( "%g" ), voltage ); diff --git a/pcb_calculator/params_read_write.cpp b/pcb_calculator/params_read_write.cpp index b1f787c8ef..2261943f4b 100644 --- a/pcb_calculator/params_read_write.cpp +++ b/pcb_calculator/params_read_write.cpp @@ -39,7 +39,7 @@ * but units are ignored. * notation like 1e+3 is legal */ -double ReturnDoubleFromString( const wxString& TextValue ) +double DoubleFromString( const wxString& TextValue ) { double value = 0; diff --git a/pcb_calculator/pcb_calculator.cpp b/pcb_calculator/pcb_calculator.cpp index adeae6d2a6..cfec7e2135 100644 --- a/pcb_calculator/pcb_calculator.cpp +++ b/pcb_calculator/pcb_calculator.cpp @@ -22,7 +22,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ #include -#include +#include +#include #include #include #include @@ -43,24 +44,88 @@ const wxString PcbCalcDataFileExt( wxT("pcbcalc") ); // PCB_CALCULATOR_APP -void EDA_APP::MacOpenFile( const wxString& aFileName ) + +namespace PCBCALC { + +static struct IFACE : public KIFACE_I { + // Of course all are virtual overloads, implementations of the KIFACE. + + IFACE( const char* aName, KIWAY::FACE_T aType ) : + KIFACE_I( aName, aType ) + {} + + bool OnKifaceStart( PGM_BASE* aProgram ); + + void OnKifaceEnd(); + + wxWindow* CreateWindow( wxWindow* aParent, int aClassId, KIWAY* aKiway, int aCtlBits = 0 ) + { + switch( aClassId ) + { + default: + { + PCB_CALCULATOR_FRAME* frame = new PCB_CALCULATOR_FRAME( aKiway, aParent ); + return frame; + } + break; + } + + return NULL; + } + + /** + * Function IfaceOrAddress + * return a pointer to the requested object. The safest way to use this + * is to retrieve a pointer to a static instance of an interface, similar to + * how the KIFACE interface is exported. But if you know what you are doing + * use it to retrieve anything you want. + * + * @param aDataId identifies which object you want the address of. + * + * @return void* - and must be cast into the know type. + */ + void* IfaceOrAddress( int aDataId ) + { + return NULL; + } + +} kiface( "pcb_calculator", KIWAY::FACE_PCB_CALCULATOR ); + +} // namespace + +using namespace PCBCALC; + +static PGM_BASE* process; + +KIFACE_I& Kiface() { return kiface; } + + +// KIFACE_GETTER's actual spelling is a substitution macro found in kiway.h. +// KIFACE_GETTER will not have name mangling due to declaration in kiway.h. +MY_API( KIFACE* ) KIFACE_GETTER( int* aKIFACEversion, int aKiwayVersion, PGM_BASE* aProgram ) +{ + process = (PGM_BASE*) aProgram; + return &kiface; } -IMPLEMENT_APP( EDA_APP ) -///----------------------------------------------------------------------------- -// PCB_CALCULATOR_APP -// main program -//----------------------------------------------------------------------------- - -bool EDA_APP::OnInit() +PGM_BASE& Pgm() { - InitEDA_Appl( wxT( "pcb_calculator" ) ); + wxASSERT( process ); // KIFACE_GETTER has already been called. + return *process; +} - wxFrame* frame = new PCB_CALCULATOR_FRAME( NULL ); - SetTopWindow( frame ); - frame->Show( true ); + +bool IFACE::OnKifaceStart( PGM_BASE* aProgram ) +{ + start_common(); return true; } + + +void IFACE::OnKifaceEnd() +{ + end_common(); +} diff --git a/pcb_calculator/pcb_calculator.h b/pcb_calculator/pcb_calculator.h index 4c09da39d9..808b5da208 100644 --- a/pcb_calculator/pcb_calculator.h +++ b/pcb_calculator/pcb_calculator.h @@ -40,13 +40,13 @@ private: public: - PCB_CALCULATOR_FRAME( wxWindow * parent = NULL ); + PCB_CALCULATOR_FRAME( KIWAY* aKiway, wxWindow* aParent ); ~PCB_CALCULATOR_FRAME(); private: // Event handlers - void OnClosePcbCalc( wxCloseEvent& event ); + void OnClosePcbCalc( wxCloseEvent& event ); // These 3 functions are called by the OnPaint event, to draw // icons that show the current item on the specific panels @@ -178,12 +178,12 @@ private: // Regulators Panel void OnRegulatorCalcButtonClick( wxCommandEvent& event ); - void OnRegulTypeSelection( wxCommandEvent& event ); - void OnRegulatorSelection( wxCommandEvent& event ); - void OnDataFileSelection( wxCommandEvent& event ); - void OnAddRegulator( wxCommandEvent& event ); - void OnEditRegulator( wxCommandEvent& event ); - void OnRemoveRegulator( wxCommandEvent& event ); + void OnRegulTypeSelection( wxCommandEvent& event ); + void OnRegulatorSelection( wxCommandEvent& event ); + void OnDataFileSelection( wxCommandEvent& event ); + void OnAddRegulator( wxCommandEvent& event ); + void OnEditRegulator( wxCommandEvent& event ); + void OnRemoveRegulator( wxCommandEvent& event ); /** * Function RegulatorPageUpdate: diff --git a/pcb_calculator/pcb_calculator_frame.cpp b/pcb_calculator/pcb_calculator_frame.cpp index ab32faa8bd..9482a6ee83 100644 --- a/pcb_calculator/pcb_calculator_frame.cpp +++ b/pcb_calculator/pcb_calculator_frame.cpp @@ -52,9 +52,11 @@ // extention of pcb_calculator data filename: const wxString DataFileNameExt( wxT("pcbcalc") ); -PCB_CALCULATOR_FRAME::PCB_CALCULATOR_FRAME( wxWindow* parent ) : - PCB_CALCULATOR_FRAME_BASE( parent ) +PCB_CALCULATOR_FRAME::PCB_CALCULATOR_FRAME( KIWAY* aKiway, wxWindow* aParent ) : + PCB_CALCULATOR_FRAME_BASE( aParent ) { + SetKiway( this, aKiway ); + m_currTransLine = NULL; m_currTransLineType = default_type; m_currAttenuator = NULL; @@ -62,7 +64,7 @@ PCB_CALCULATOR_FRAME::PCB_CALCULATOR_FRAME( wxWindow* parent ) : m_Config = new wxConfig(); // Populate transline list ordered like in dialog menu list - transline_type_id tltype_list[8] = + const static transline_type_id tltype_list[8] = { microstrip_type, cpw_type, grounded_cpw_type, rectwaveguide_type, coax_type, c_microstrip_type, diff --git a/pcb_calculator/regulators_funct.cpp b/pcb_calculator/regulators_funct.cpp index 97dd64ee9c..d8995f48ea 100644 --- a/pcb_calculator/regulators_funct.cpp +++ b/pcb_calculator/regulators_funct.cpp @@ -33,7 +33,7 @@ #include -extern double ReturnDoubleFromString( const wxString& TextValue ); +extern double DoubleFromString( const wxString& TextValue ); class DIALOG_EDITOR_DATA: public DIALOG_EDITOR_DATA_BASE { @@ -49,7 +49,7 @@ public: ~DIALOG_EDITOR_DATA() {}; // Event called functions: - void OnOKClick( wxCommandEvent& event ); + void OnOKClick( wxCommandEvent& event ); /** * Function IsOK() @@ -113,7 +113,7 @@ bool DIALOG_EDITOR_DATA::IsOK() ok = false; else { - double vref = ReturnDoubleFromString( m_textCtrlVref->GetValue() ); + double vref = DoubleFromString( m_textCtrlVref->GetValue() ); if( fabs(vref) < 0.01 ) ok = false; } @@ -140,8 +140,8 @@ void DIALOG_EDITOR_DATA::CopyRegulatorDataToDialog( REGULATOR_DATA * aItem ) REGULATOR_DATA * DIALOG_EDITOR_DATA::BuildRegulatorFromData() { - double vref = ReturnDoubleFromString( m_textCtrlVref->GetValue() ); - double iadj = ReturnDoubleFromString( m_RegulIadjValue->GetValue() ); + double vref = DoubleFromString( m_textCtrlVref->GetValue() ); + double iadj = DoubleFromString( m_RegulIadjValue->GetValue() ); int type = m_choiceRegType->GetSelection(); if( type != 1 ) iadj = 0.0; @@ -382,13 +382,13 @@ void PCB_CALCULATOR_FRAME::RegulatorsSolve() // Read values from panel: txt = m_RegulR1Value->GetValue(); - r1 = ReturnDoubleFromString(txt) * r1scale; + r1 = DoubleFromString(txt) * r1scale; txt = m_RegulR2Value->GetValue(); - r2 = ReturnDoubleFromString(txt) * r2scale; + r2 = DoubleFromString(txt) * r2scale; txt = m_RegulVrefValue->GetValue(); - vref = ReturnDoubleFromString(txt); + vref = DoubleFromString(txt); txt = m_RegulVoutValue->GetValue(); - vout = ReturnDoubleFromString(txt); + vout = DoubleFromString(txt); // Some tests: @@ -415,7 +415,7 @@ void PCB_CALCULATOR_FRAME::RegulatorsSolve() { // 3 terminal regulator txt = m_RegulIadjValue->GetValue(); - double iadj = ReturnDoubleFromString(txt); + double iadj = DoubleFromString(txt); // iadj is given in micro amp, so convert it in amp. iadj /= 1000000; diff --git a/pcb_calculator/tracks_width_versus_current.cpp b/pcb_calculator/tracks_width_versus_current.cpp index 331dbac0a0..bdedd47e1f 100644 --- a/pcb_calculator/tracks_width_versus_current.cpp +++ b/pcb_calculator/tracks_width_versus_current.cpp @@ -37,7 +37,7 @@ #include #include -extern double ReturnDoubleFromString( const wxString& TextValue ); +extern double DoubleFromString( const wxString& TextValue ); // Key words to read/write some parameters in config: #define KEYWORD_TW_CURRENT wxT( "TW_Track_Current" ) @@ -67,10 +67,10 @@ void PCB_CALCULATOR_FRAME::TW_WriteConfig() void PCB_CALCULATOR_FRAME::OnTWCalculateButt( wxCommandEvent& event ) { // Prepare parameters: - double current = ReturnDoubleFromString( m_TrackCurrentValue->GetValue() ); - double thickness = ReturnDoubleFromString( m_TrackThicknessValue->GetValue() ); - double deltaT_C = ReturnDoubleFromString( m_TrackDeltaTValue->GetValue() ); - double track_len = ReturnDoubleFromString( m_TrackLengthValue->GetValue() ); + double current = DoubleFromString( m_TrackCurrentValue->GetValue() ); + double thickness = DoubleFromString( m_TrackThicknessValue->GetValue() ); + double deltaT_C = DoubleFromString( m_TrackDeltaTValue->GetValue() ); + double track_len = DoubleFromString( m_TrackLengthValue->GetValue() ); double extTrackWidth; double intTrackWidth; diff --git a/pcb_calculator/transline_dlg_funct.cpp b/pcb_calculator/transline_dlg_funct.cpp index dea6bfde6e..50ee7ea4fa 100644 --- a/pcb_calculator/transline_dlg_funct.cpp +++ b/pcb_calculator/transline_dlg_funct.cpp @@ -30,7 +30,7 @@ #include #include -extern double ReturnDoubleFromString( const wxString& TextValue ); +extern double DoubleFromString( const wxString& TextValue ); /* @@ -359,7 +359,7 @@ void PCB_CALCULATOR_FRAME::TransfDlgDataToTranslineParams() TRANSLINE_PRM* prm = tr_ident->GetPrm( ii ); wxTextCtrl * value_ctrl = (wxTextCtrl * ) prm->m_ValueCtrl; wxString value_txt = value_ctrl->GetValue(); - double value = ReturnDoubleFromString(value_txt); + double value = DoubleFromString(value_txt); prm->m_Value = value; UNIT_SELECTOR * unit_ctrl = (UNIT_SELECTOR * ) prm->m_UnitCtrl; if( unit_ctrl ) diff --git a/pcb_calculator/transline_ident.cpp b/pcb_calculator/transline_ident.cpp index 44e0a4fcca..48369d0c03 100644 --- a/pcb_calculator/transline_ident.cpp +++ b/pcb_calculator/transline_ident.cpp @@ -53,7 +53,7 @@ TRANSLINE_PRM::TRANSLINE_PRM( PRM_TYPE aType, PRMS_ID aId, #define TRANSLINE_PRM_KEY wxT( "translineprm%d" ) -void TRANSLINE_PRM::ReadConfig( wxConfig* aConfig ) +void TRANSLINE_PRM::ReadConfig( wxConfigBase* aConfig ) { if( m_Id == UNKNOWN_ID || m_Id == DUMMY_PRM ) return; @@ -65,7 +65,7 @@ void TRANSLINE_PRM::ReadConfig( wxConfig* aConfig ) } -void TRANSLINE_PRM::WriteConfig( wxConfig* aConfig ) +void TRANSLINE_PRM::WriteConfig( wxConfigBase* aConfig ) { if( m_Id == UNKNOWN_ID || m_Id == DUMMY_PRM ) return; @@ -415,7 +415,7 @@ TRANSLINE_IDENT::~TRANSLINE_IDENT() } -void TRANSLINE_IDENT::ReadConfig( wxConfig* aConfig ) +void TRANSLINE_IDENT::ReadConfig( wxConfigBase* aConfig ) { wxString text = wxString::FromUTF8( m_TLine->m_name ); aConfig->SetPath( text ); @@ -426,7 +426,7 @@ void TRANSLINE_IDENT::ReadConfig( wxConfig* aConfig ) } -void TRANSLINE_IDENT::WriteConfig( wxConfig* aConfig ) +void TRANSLINE_IDENT::WriteConfig( wxConfigBase* aConfig ) { wxString text = wxString::FromUTF8( m_TLine->m_name ); aConfig->SetPath( text ); diff --git a/pcb_calculator/transline_ident.h b/pcb_calculator/transline_ident.h index 4e607ea78c..45854a7877 100644 --- a/pcb_calculator/transline_ident.h +++ b/pcb_calculator/transline_ident.h @@ -54,8 +54,8 @@ public: TRANSLINE_PRM( PRM_TYPE aType, PRMS_ID aId, double aValue = 0.0, bool aConvUnit = false ); - void ReadConfig( wxConfig* aConfig ); - void WriteConfig( wxConfig* aConfig ); + void ReadConfig( wxConfigBase* aConfig ); + void WriteConfig( wxConfigBase* aConfig ); double ToUserUnit(); double FromUserUnit(); }; @@ -100,8 +100,8 @@ public: TRANSLINE_IDENT( enum transline_type_id aType ); } - void ReadConfig( wxConfig* aConfig ); - void WriteConfig( wxConfig* aConfig ); + void ReadConfig( wxConfigBase* aConfig ); + void WriteConfig( wxConfigBase* aConfig ); }; #endif // TRANSLINE_IDENT_H diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 3c7d4f567f..2bff12e75a 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -1,5 +1,4 @@ - -set( MAKE_LINK_MAPS false ) +set( MAKE_LINK_MAPS true ) add_definitions( -DPCBNEW ) add_subdirectory(router) @@ -16,9 +15,6 @@ if( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES ) endif() -### -# Includes -### include_directories( BEFORE ${INC_BEFORE} ) include_directories( ./dialogs @@ -33,9 +29,6 @@ include_directories( ${INC_AFTER} ) -### -# Sources -# set( PCBNEW_DIALOGS dialogs/dialog_block_options_base.cpp dialogs/dialog_cleaning_options_base.cpp @@ -213,7 +206,6 @@ set( PCBNEW_CLASS_SRCS onleftclick.cpp onrightclick.cpp pad_edition_functions.cpp - pcbnew.cpp pcbnew_config.cpp pcbplot.cpp plot_board_layers.cpp @@ -258,23 +250,18 @@ set( PCBNEW_CLASS_SRCS set( PCBNEW_SRCS ${PCBNEW_AUTOROUTER_SRCS} ${PCBNEW_CLASS_SRCS} ${PCBNEW_DIALOGS} ) -### -# We need some extra sources from common -### + +# extra sources from common set( PCBNEW_COMMON_SRCS ../common/dialogs/dialog_page_settings.cpp ../common/base_units.cpp ) -## -# Scripting sources -## set( PCBNEW_SCRIPTING_DIALOGS dialogs/dialog_scripting_base.cpp dialogs/dialog_scripting.cpp ) - set( PCBNEW_SCRIPTING_PYTHON_HELPERS ../scripting/wx_python_helpers.cpp ../scripting/python_scripting.cpp @@ -287,12 +274,9 @@ if( KICAD_SCRIPTING ) ${PCBNEW_SCRIPTING_DIALOGS} pcbnew_wrap.cxx ${PCBNEW_SCRIPTING_PYTHON_HELPERS} - ) + ) endif() -## -# Scripting build -## if( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES ) @@ -359,7 +343,7 @@ if( BUILD_GITHUB_PLUGIN ) set( GITHUB_PLUGIN_LIBRARIES github_plugin ) endif() -if( ( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES ) AND NOT WIN32 AND NOT APPLE ) +if( UNIX AND NOT APPLE ) list( APPEND PCBNEW_EXTRA_LIBS rt ) endif() @@ -394,8 +378,8 @@ if( KICAD_SCRIPTING_MODULES ) ) if( MAKE_LINK_MAPS ) - # generate a link map with cross reference - set_target_properties( _pcbnew PROPERTIES LINK_FLAGS "-Wl,-cref -Wl,-Map=_pcbnew.map" ) + set_target_properties( _pcbnew PROPERTIES + LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=pcbnew.so.map" ) endif() endif() @@ -449,28 +433,19 @@ endif() - -### -# Windows resource file -### -if( WIN32 ) - if( MINGW ) - # PCBNEW_RESOURCES variable is set by the macro. - mingw_resource_compiler( pcbnew ) - else() - set( PCBNEW_RESOURCES pcbnew.rc ) - endif() +if( MINGW ) + # PCBNEW_RESOURCES variable is set by the macro. + mingw_resource_compiler( pcbnew ) 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_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 ) @@ -506,84 +481,159 @@ 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 - ${PCBNEW_SRCS} - ${PCBNEW_COMMON_SRCS} - ${PCBNEW_SCRIPTING_SRCS} - ${PCBNEW_RESOURCES} - ) +if( USE_KIWAY_DLLS ) + + # a very small program launcher for pcbnew_kiface + add_executable( pcbnew WIN32 MACOSX_BUNDLE + ../common/single_top.cpp + ../common/pgm_base.cpp + ) + set_source_files_properties( ../common/single_top.cpp PROPERTIES + COMPILE_DEFINITIONS "TOP_FRAME=PCB_FRAME_TYPE;PGM_DATA_FILE_EXT=\"kicad_pcb\";BUILD_KIWAY_DLL" + ) + target_link_libraries( pcbnew + #singletop # replaces common, giving us restrictive control and link warnings. + # There's way too much crap coming in from common yet. + common + bitmaps + ${wxWidgets_LIBRARIES} + ) + if( MAKE_LINK_MAPS ) + set_target_properties( pcbnew PROPERTIES + LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=pcbnew.map" ) + endif() + + # the main pcbnew program, in DSO form. + add_library( pcbnew_kiface MODULE + pcbnew.cpp + ${PCBNEW_SRCS} + ${PCBNEW_COMMON_SRCS} + ${PCBNEW_SCRIPTING_SRCS} + ${PCBNEW_RESOURCES} + ) + set_target_properties( pcbnew_kiface PROPERTIES + # Decorate OUTPUT_NAME with PREFIX and SUFFIX, creating something like + # _pcbnew.so, _pcbnew.dll, or _pcbnew.kiface + OUTPUT_NAME pcbnew + PREFIX ${KIFACE_PREFIX} + SUFFIX ${KIFACE_SUFFIX} + ) + target_link_libraries( pcbnew_kiface + 3d-viewer + pcbcommon + pnsrouter + common + pcad2kicadpcb + polygon + bitmaps + gal + lib_dxf + ${GITHUB_PLUGIN_LIBRARIES} + ${wxWidgets_LIBRARIES} + ${OPENGL_LIBRARIES} + ${GDI_PLUS_LIBRARIES} + ${PYTHON_LIBRARIES} + ${GLEW_LIBRARIES} + ${CAIRO_LIBRARIES} + ${PIXMAN_LIBRARY} + ${Boost_LIBRARIES} # must follow GITHUB + ${PCBNEW_EXTRA_LIBS} # -lrt must follow Boost + ) + set_source_files_properties( pcbnew.cpp PROPERTIES + # The KIFACE is in pcbnew.cpp, export it: + COMPILE_DEFINITIONS "BUILD_KIWAY_DLL;COMPILING_DLL" + ) + if( MAKE_LINK_MAPS ) + set_target_properties( pcbnew_kiface PROPERTIES + LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=_pcbnew.kiface.map" ) + endif() + + # if building pcbnew, then also build pcbnew_kiface if out of date. + add_dependencies( pcbnew pcbnew_kiface ) + + # these 2 binaries are a matched set, keep them together: + install( TARGETS pcbnew + DESTINATION ${KICAD_BIN} + COMPONENT binary + ) + install( TARGETS pcbnew_kiface + DESTINATION ${KICAD_BIN} + COMPONENT binary + ) + +else() # milestone A) kills this off: + + add_executable( pcbnew WIN32 MACOSX_BUNDLE + pcbnew.cpp + ${PCBNEW_SRCS} + ${PCBNEW_COMMON_SRCS} + ${PCBNEW_SCRIPTING_SRCS} + ${PCBNEW_RESOURCES} + ) + target_link_libraries( pcbnew + 3d-viewer + pcbcommon + pnsrouter + common + pcad2kicadpcb + polygon + bitmaps + gal + lib_dxf + ${GITHUB_PLUGIN_LIBRARIES} + ${wxWidgets_LIBRARIES} + ${OPENGL_LIBRARIES} + ${GDI_PLUS_LIBRARIES} + ${PYTHON_LIBRARIES} + ${GLEW_LIBRARIES} + ${CAIRO_LIBRARIES} + ${PIXMAN_LIBRARY} + ${Boost_LIBRARIES} # must follow GITHUB + ${PCBNEW_EXTRA_LIBS} + ) + + # Only for win32 cross compilation using MXE + if( WIN32 AND MSYS AND CMAKE_CROSSCOMPILING ) + target_link_libraries( pcbnew + opengl32 + glu32 + pixman-1 + fontconfig + freetype + bz2 + ) + endif() + + install( TARGETS pcbnew + DESTINATION ${KICAD_BIN} + COMPONENT binary + ) + +endif() + ### # Set properties for APPLE on pcbnew target ### if( APPLE ) - set_target_properties( pcbnew PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist ) + 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 - 3d-viewer - pcbcommon - pnsrouter - common - pcad2kicadpcb - polygon - bitmaps - gal - lib_dxf - ${GITHUB_PLUGIN_LIBRARIES} - ${wxWidgets_LIBRARIES} - ${OPENGL_LIBRARIES} - ${GDI_PLUS_LIBRARIES} - ${PYTHON_LIBRARIES} - ${PCBNEW_EXTRA_LIBS} - ${GLEW_LIBRARIES} - ${CAIRO_LIBRARIES} - ${PIXMAN_LIBRARY} - ${Boost_LIBRARIES} # must follow GITHUB - ) - -# Only for win32 cross compilation using MXE -if( WIN32 AND MSYS AND CMAKE_CROSSCOMPILING ) -target_link_libraries( pcbnew - opengl32 - glu32 - pixman-1 - fontconfig - freetype - bz2 - ) -endif() if( MAKE_LINK_MAPS ) # generate a link map with cross reference - set_target_properties( pcbnew PROPERTIES LINK_FLAGS "-Wl,-cref -Wl,-Map=pcbnew.map" ) + set_target_properties( pcbnew PROPERTIES + LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=pcbnew.map" ) endif() -### -# Add pcbnew as install target -### -install( TARGETS pcbnew - DESTINATION ${KICAD_BIN} - COMPONENT binary ) - - if( KICAD_SCRIPTING ) add_custom_target( FixSwigImportsScripting ALL COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/scripting/build_tools/fix_swig_imports.py ${CMAKE_CURRENT_BINARY_DIR}/pcbnew.py @@ -603,7 +653,7 @@ if( KICAD_SCRIPTING_MODULES ) install( FILES ${CMAKE_BINARY_DIR}/pcbnew/pcbnew.py DESTINATION ${PYTHON_DEST} ) - if( WIN32 ) + if( MINGW ) install( FILES ${CMAKE_BINARY_DIR}/pcbnew/_pcbnew.pyd DESTINATION ${PYTHON_DEST} ) else() install( FILES ${CMAKE_BINARY_DIR}/pcbnew/_pcbnew.so DESTINATION ${PYTHON_DEST} ) diff --git a/pcbnew/autorouter/graphpcb.cpp b/pcbnew/autorouter/graphpcb.cpp index 294e20e969..28dff7ff32 100644 --- a/pcbnew/autorouter/graphpcb.cpp +++ b/pcbnew/autorouter/graphpcb.cpp @@ -87,7 +87,7 @@ static void TraceCircle( int ux0, int uy0, int ux1, int uy1, int lg, LAYER_NUM l void PlacePad( D_PAD* aPad, int color, int marge, int op_logic ) { int dx, dy; - wxPoint shape_pos = aPad->ReturnShapePos(); + wxPoint shape_pos = aPad->ShapePos(); dx = aPad->GetSize().x / 2; dx += marge; @@ -757,7 +757,7 @@ void TraceCircle( int ux0, int uy0, int ux1, int uy1, int lg, LAYER_NUM layer, int ii; int angle; - radius = KiROUND( Distance( ux0, uy0, ux1, uy1 ) ); + radius = KiROUND( Distance( ux0, uy0, ux1, uy1 ) ); x0 = x1 = radius; y0 = y1 = 0; diff --git a/pcbnew/autorouter/queue.cpp b/pcbnew/autorouter/queue.cpp index cf82a63633..ca251608a2 100644 --- a/pcbnew/autorouter/queue.cpp +++ b/pcbnew/autorouter/queue.cpp @@ -119,7 +119,7 @@ void GetQueue( int* r, int* c, int* s, int* d, int* a ) /* add a search node to the list - * Return: + * : * 1 - OK * 0 - Failed to allocate memory. */ diff --git a/pcbnew/autorouter/solve.cpp b/pcbnew/autorouter/solve.cpp index c06d8545eb..d3a5476339 100644 --- a/pcbnew/autorouter/solve.cpp +++ b/pcbnew/autorouter/solve.cpp @@ -262,7 +262,7 @@ static long newmask[8] = /* Route all traces - * Return: + * : * 1 if OK * -1 if escape (stop being routed) request * -2 if default memory allocation diff --git a/pcbnew/autorouter/work.cpp b/pcbnew/autorouter/work.cpp index 11d0f1841b..68aa48c1ef 100644 --- a/pcbnew/autorouter/work.cpp +++ b/pcbnew/autorouter/work.cpp @@ -73,7 +73,7 @@ void InitWork() /* add a unit of work to the work list - * Return: + * : * 1 if OK * 0 if memory allocation failed */ diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 858aa40c0e..f5d2b6ccd7 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -29,10 +29,12 @@ */ #include +#include #include #include #include -#include +//#include +#include #include #include #include @@ -40,6 +42,7 @@ #include #include +#include #include #include #include @@ -126,11 +129,10 @@ BEGIN_EVENT_TABLE( PCB_BASE_FRAME, EDA_DRAW_FRAME ) END_EVENT_TABLE() -PCB_BASE_FRAME::PCB_BASE_FRAME( wxWindow* aParent, ID_DRAWFRAME_TYPE aFrameType, - const wxString& aTitle, - const wxPoint& aPos, const wxSize& aSize, - long aStyle, const wxString & aFrameName) : - EDA_DRAW_FRAME( aParent, aFrameType, aTitle, aPos, aSize, aStyle, aFrameName ) +PCB_BASE_FRAME::PCB_BASE_FRAME( KIWAY* aKiway, wxWindow* aParent, ID_DRAWFRAME_TYPE aFrameType, + const wxString& aTitle, const wxPoint& aPos, const wxSize& aSize, + long aStyle, const wxString & aFrameName ) : + EDA_DRAW_FRAME( aKiway, aParent, aFrameType, aTitle, aPos, aSize, aStyle, aFrameName ) { m_Pcb = NULL; m_toolManager = NULL; @@ -172,6 +174,21 @@ PCB_BASE_FRAME::~PCB_BASE_FRAME() } +FP_LIB_TABLE* PCB_BASE_FRAME::FootprintLibs() const +{ + PROJECT& prj = Prj(); + FP_LIB_TABLE* tbl = dynamic_cast( prj.Elem( PROJECT::FPTBL ) ); + + if( !tbl ) + { + tbl = new FP_LIB_TABLE( &GFootprintTable ); + prj.Elem( PROJECT::FPTBL, tbl ); + } + + return tbl; +} + + void PCB_BASE_FRAME::SetBoard( BOARD* aBoard ) { delete m_Pcb; @@ -728,39 +745,35 @@ void PCB_BASE_FRAME::unitsChangeRefresh() } -void PCB_BASE_FRAME::LoadSettings() +void PCB_BASE_FRAME::LoadSettings( wxConfigBase* aCfg ) { - wxASSERT( wxGetApp().GetSettings() != NULL ); - - wxConfig* cfg = wxGetApp().GetSettings(); - - EDA_DRAW_FRAME::LoadSettings(); + EDA_DRAW_FRAME::LoadSettings( aCfg ); // Ensure grid id is an existent grid id: if( (m_LastGridSizeId <= 0) || (m_LastGridSizeId > (ID_POPUP_GRID_USER - ID_POPUP_GRID_LEVEL_1000)) ) m_LastGridSizeId = ID_POPUP_GRID_LEVEL_500 - ID_POPUP_GRID_LEVEL_1000; - cfg->Read( m_FrameName + UserGridSizeXEntry, &m_UserGridSize.x, 0.01 ); - cfg->Read( m_FrameName + UserGridSizeYEntry, &m_UserGridSize.y, 0.01 ); + aCfg->Read( m_FrameName + UserGridSizeXEntry, &m_UserGridSize.x, 0.01 ); + aCfg->Read( m_FrameName + UserGridSizeYEntry, &m_UserGridSize.y, 0.01 ); long itmp; - cfg->Read( m_FrameName + UserGridUnitsEntry, &itmp, ( long )INCHES ); + aCfg->Read( m_FrameName + UserGridUnitsEntry, &itmp, ( long )INCHES ); m_UserGridUnit = (EDA_UNITS_T) itmp; - cfg->Read( m_FrameName + DisplayPadFillEntry, &m_DisplayPadFill, true ); - cfg->Read( m_FrameName + DisplayViaFillEntry, &m_DisplayViaFill, true ); - cfg->Read( m_FrameName + DisplayPadNumberEntry, &m_DisplayPadNum, true ); - cfg->Read( m_FrameName + DisplayModuleEdgeEntry, &m_DisplayModEdge, ( long )FILLED ); + aCfg->Read( m_FrameName + DisplayPadFillEntry, &m_DisplayPadFill, true ); + aCfg->Read( m_FrameName + DisplayViaFillEntry, &m_DisplayViaFill, true ); + aCfg->Read( m_FrameName + DisplayPadNumberEntry, &m_DisplayPadNum, true ); + aCfg->Read( m_FrameName + DisplayModuleEdgeEntry, &m_DisplayModEdge, ( long )FILLED ); - cfg->Read( m_FrameName + FastGrid1Entry, &itmp, ( long )0); + aCfg->Read( m_FrameName + FastGrid1Entry, &itmp, ( long )0); m_FastGrid1 = itmp; - cfg->Read( m_FrameName + FastGrid2Entry, &itmp, ( long )0); + aCfg->Read( m_FrameName + FastGrid2Entry, &itmp, ( long )0); m_FastGrid2 = itmp; if( m_DisplayModEdge < LINE || m_DisplayModEdge > SKETCH ) m_DisplayModEdge = FILLED; - cfg->Read( m_FrameName + DisplayModuleTextEntry, &m_DisplayModText, ( long )FILLED ); + aCfg->Read( m_FrameName + DisplayModuleTextEntry, &m_DisplayModText, ( long )FILLED ); if( m_DisplayModText < LINE || m_DisplayModText > SKETCH ) m_DisplayModText = FILLED; @@ -828,23 +841,20 @@ void PCB_BASE_FRAME::LoadSettings() } -void PCB_BASE_FRAME::SaveSettings() +void PCB_BASE_FRAME::SaveSettings( wxConfigBase* aCfg ) { - wxASSERT( wxGetApp().GetSettings() != NULL ); + EDA_DRAW_FRAME::SaveSettings( aCfg ); - wxConfig* cfg = wxGetApp().GetSettings(); - - EDA_DRAW_FRAME::SaveSettings(); - cfg->Write( m_FrameName + UserGridSizeXEntry, m_UserGridSize.x ); - cfg->Write( m_FrameName + UserGridSizeYEntry, m_UserGridSize.y ); - cfg->Write( m_FrameName + UserGridUnitsEntry, ( long )m_UserGridUnit ); - cfg->Write( m_FrameName + DisplayPadFillEntry, m_DisplayPadFill ); - cfg->Write( m_FrameName + DisplayViaFillEntry, m_DisplayViaFill ); - cfg->Write( m_FrameName + DisplayPadNumberEntry, m_DisplayPadNum ); - cfg->Write( m_FrameName + DisplayModuleEdgeEntry, ( long )m_DisplayModEdge ); - cfg->Write( m_FrameName + DisplayModuleTextEntry, ( long )m_DisplayModText ); - cfg->Write( m_FrameName + FastGrid1Entry, ( long )m_FastGrid1 ); - cfg->Write( m_FrameName + FastGrid2Entry, ( long )m_FastGrid2 ); + aCfg->Write( m_FrameName + UserGridSizeXEntry, m_UserGridSize.x ); + aCfg->Write( m_FrameName + UserGridSizeYEntry, m_UserGridSize.y ); + aCfg->Write( m_FrameName + UserGridUnitsEntry, ( long )m_UserGridUnit ); + aCfg->Write( m_FrameName + DisplayPadFillEntry, m_DisplayPadFill ); + aCfg->Write( m_FrameName + DisplayViaFillEntry, m_DisplayViaFill ); + aCfg->Write( m_FrameName + DisplayPadNumberEntry, m_DisplayPadNum ); + aCfg->Write( m_FrameName + DisplayModuleEdgeEntry, ( long )m_DisplayModEdge ); + aCfg->Write( m_FrameName + DisplayModuleTextEntry, ( long )m_DisplayModText ); + aCfg->Write( m_FrameName + FastGrid1Entry, ( long )m_FastGrid1 ); + aCfg->Write( m_FrameName + FastGrid2Entry, ( long )m_FastGrid2 ); } diff --git a/pcbnew/block.cpp b/pcbnew/block.cpp index bb86e61cfa..2cb8648da8 100644 --- a/pcbnew/block.cpp +++ b/pcbnew/block.cpp @@ -179,7 +179,7 @@ void DIALOG_BLOCK_OPTIONS::ExecuteCommand( wxCommandEvent& event ) } -int PCB_EDIT_FRAME::ReturnBlockCommand( int aKey ) +int PCB_EDIT_FRAME::BlockCommand( int aKey ) { int cmd = 0; diff --git a/pcbnew/block_module_editor.cpp b/pcbnew/block_module_editor.cpp index d83c1378e7..9fc22bd1e1 100644 --- a/pcbnew/block_module_editor.cpp +++ b/pcbnew/block_module_editor.cpp @@ -30,7 +30,7 @@ */ #include -#include +#include #include #include #include @@ -73,7 +73,7 @@ static void MoveMarkedItems( MODULE* module, wxPoint offset ); static void DeleteMarkedItems( MODULE* module ); -int FOOTPRINT_EDIT_FRAME::ReturnBlockCommand( int key ) +int FOOTPRINT_EDIT_FRAME::BlockCommand( int key ) { int cmd; @@ -306,7 +306,7 @@ static void DrawMovingBlockOutlines( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wx bool aErase ) { BASE_SCREEN* screen = aPanel->GetScreen(); - FOOTPRINT_EDIT_FRAME* moduleEditFrame = FOOTPRINT_EDIT_FRAME::GetActiveFootprintEditor(); + FOOTPRINT_EDIT_FRAME* moduleEditFrame = FOOTPRINT_EDIT_FRAME::GetActiveFootprintEditor( aPanel->GetParent() ); wxASSERT( moduleEditFrame ); MODULE* currentModule = moduleEditFrame->GetBoard()->m_Modules; diff --git a/pcbnew/board_items_to_polygon_shape_transform.cpp b/pcbnew/board_items_to_polygon_shape_transform.cpp index 68059370d1..301cfc9345 100644 --- a/pcbnew/board_items_to_polygon_shape_transform.cpp +++ b/pcbnew/board_items_to_polygon_shape_transform.cpp @@ -418,7 +418,7 @@ void D_PAD:: TransformShapeWithClearanceToPolygon( CPOLYGONS_LIST& aCornerBuffer int dy = (m_Size.y / 2) + aClearanceValue; double delta = 3600.0 / aCircleToSegmentsCount; // rot angle in 0.1 degree - wxPoint PadShapePos = ReturnShapePos(); /* Note: for pad having a shape offset, + wxPoint PadShapePos = ShapePos(); /* Note: for pad having a shape offset, * the pad position is NOT the shape position */ wxSize psize = m_Size; /* pad size unsed in RECT and TRAPEZOIDAL pads * trapezoidal pads are considered as rect @@ -547,7 +547,7 @@ void D_PAD::BuildPadShapePolygon( CPOLYGONS_LIST& aCornerBuffer, double aCorrectionFactor ) const { wxPoint corners[4]; - wxPoint PadShapePos = ReturnShapePos(); /* Note: for pad having a shape offset, + wxPoint PadShapePos = ShapePos(); /* Note: for pad having a shape offset, * the pad position is NOT the shape position */ switch( GetShape() ) { @@ -662,8 +662,8 @@ void CreateThermalReliefPadPolygon( CPOLYGONS_LIST& aCornerBuffer, double aThermalRot ) { wxPoint corner, corner_end; - wxPoint PadShapePos = aPad.ReturnShapePos(); /* Note: for pad having a shape offset, - * the pad position is NOT the shape position */ + wxPoint PadShapePos = aPad.ShapePos(); // Note: for pad having a shape offset, + // the pad position is NOT the shape position wxSize copper_thickness; int dx = aPad.GetSize().x / 2; diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index e6f1619d18..0c3ca0ecca 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -1502,7 +1502,7 @@ static bool s_SortByNodes( const NETINFO_ITEM* a, const NETINFO_ITEM* b ) } -int BOARD::ReturnSortedNetnamesList( wxArrayString& aNames, bool aSortbyPadsCount ) +int BOARD::SortedNetnamesList( wxArrayString& aNames, bool aSortbyPadsCount ) { if( m_NetInfo.GetNetCount() == 0 ) return 0; diff --git a/pcbnew/class_board.h b/pcbnew/class_board.h index cd20413baa..9796ab8c42 100644 --- a/pcbnew/class_board.h +++ b/pcbnew/class_board.h @@ -969,13 +969,13 @@ public: REPORTER* aReporter = NULL ); /** - * Function ReturnSortedNetnamesList + * Function SortedNetnamesList * @param aNames An array string to fill with net names. * @param aSortbyPadsCount true = sort by active pads count, false = no sort (i.e. * leave the sort by net names) * @return int - net names count. */ - int ReturnSortedNetnamesList( wxArrayString& aNames, bool aSortbyPadsCount ); + int SortedNetnamesList( wxArrayString& aNames, bool aSortbyPadsCount ); /**************************************/ /** diff --git a/pcbnew/class_module.cpp b/pcbnew/class_module.cpp index 11f14217fe..41e871d5bf 100644 --- a/pcbnew/class_module.cpp +++ b/pcbnew/class_module.cpp @@ -573,7 +573,7 @@ D_PAD* MODULE::FindPadByName( const wxString& aPadName ) const for( D_PAD* pad = m_Pads; pad; pad = pad->Next() ) { - pad->ReturnStringPadName( buf ); + pad->StringPadName( buf ); #if 1 if( buf.CmpNoCase( aPadName ) == 0 ) // why case insensitive? #else @@ -588,7 +588,7 @@ D_PAD* MODULE::FindPadByName( const wxString& aPadName ) const D_PAD* MODULE::GetPad( const wxPoint& aPosition, LAYER_MSK aLayerMask ) { - for( D_PAD* pad = m_Pads; pad; pad = pad->Next() ) + for( D_PAD* pad = m_Pads; pad; pad = pad->Next() ) { // ... and on the correct layer. if( ( pad->GetLayerMask() & aLayerMask ) == 0 ) @@ -735,7 +735,7 @@ EDA_ITEM* MODULE::Clone() const */ bool MODULE::IsLibNameValid( const wxString & aName ) { - const wxChar * invalids = ReturnStringLibNameInvalidChars( false ); + const wxChar * invalids = StringLibNameInvalidChars( false ); if( aName.find_first_of( invalids ) != std::string::npos ) return false; @@ -751,7 +751,7 @@ bool MODULE::IsLibNameValid( const wxString & aName ) * return a constant string giving the list of invalid chars in lib name * static function */ -const wxChar* MODULE::ReturnStringLibNameInvalidChars( bool aUserReadable ) +const wxChar* MODULE::StringLibNameInvalidChars( bool aUserReadable ) { static const wxChar invalidChars[] = wxT("%$\t \"\\/"); static const wxChar invalidCharsReadable[] = wxT("% $ 'tab' 'space' \\ \" /"); diff --git a/pcbnew/class_module.h b/pcbnew/class_module.h index 184e9e7288..ebacb7753f 100644 --- a/pcbnew/class_module.h +++ b/pcbnew/class_module.h @@ -470,14 +470,14 @@ public: static bool IsLibNameValid( const wxString & aName ); /** - * static function ReturnStringLibNameInvalidChars + * static function StringLibNameInvalidChars * Test for validity of the name in a library of the footprint * ( no spaces, dir separators ... ) * @param aUserReadable = false to get the list of invalid chars * true to get a readable form (i.e ' ' = 'space' '\\t'= 'tab') * @return a constant std::string giving the list of invalid chars in lib name */ - static const wxChar* ReturnStringLibNameInvalidChars( bool aUserReadable ); + static const wxChar* StringLibNameInvalidChars( bool aUserReadable ); /** * Function SetInitialComments diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index 5a48ac461a..2be9c2466b 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -269,7 +269,7 @@ void D_PAD::AppendConfigs( PARAM_CFG_ARRAY* aResult ) // Returns the position of the pad. -const wxPoint D_PAD::ReturnShapePos() const +const wxPoint D_PAD::ShapePos() const { if( m_Offset.x == 0 && m_Offset.y == 0 ) return m_Pos; @@ -308,13 +308,13 @@ const wxString D_PAD::GetPadName() const wxString name; - ReturnStringPadName( name ); + StringPadName( name ); return name; #endif } -void D_PAD::ReturnStringPadName( wxString& text ) const +void D_PAD::StringPadName( wxString& text ) const { #if 0 // m_Padname is not ASCII and not UTF8, it is LATIN1 basically, whatever // 8 bit font is supported in KiCad plotting and drawing. @@ -573,7 +573,7 @@ void D_PAD::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM>& aList ) { wxString msg = module->GetReference(); aList.push_back( MSG_PANEL_ITEM( _( "Module" ), msg, DARKCYAN ) ); - ReturnStringPadName( Line ); + StringPadName( Line ); aList.push_back( MSG_PANEL_ITEM( _( "Pad" ), Line, BROWN ) ); } @@ -650,7 +650,7 @@ bool D_PAD::HitTest( const wxPoint& aPosition ) { int dx, dy; - wxPoint shape_pos = ReturnShapePos(); + wxPoint shape_pos = ShapePos(); wxPoint delta = aPosition - shape_pos; diff --git a/pcbnew/class_pad.h b/pcbnew/class_pad.h index 0391d92b4b..30386fad04 100644 --- a/pcbnew/class_pad.h +++ b/pcbnew/class_pad.h @@ -35,7 +35,7 @@ #include #include #include -#include // PARAM_CFG_ARRAY +#include // PARAM_CFG_ARRAY #include "zones.h" @@ -353,7 +353,7 @@ public: int BuildSegmentFromOvalShape( wxPoint& aSegStart, wxPoint& aSegEnd, double aRotation, const wxSize& aMargin ) const; - void ReturnStringPadName( wxString& text ) const; // Return pad name as string in a buffer + void StringPadName( wxString& text ) const; // Return pad name as string in a buffer /** * Function GetBoundingRadius @@ -372,7 +372,7 @@ public: return m_boundingRadius; } - const wxPoint ReturnShapePos() const; + const wxPoint ShapePos() const; /** * Function GetSubRatsnest @@ -511,7 +511,7 @@ private: * In all cases the pad position is the pad hole. * The physical shape position (used to draw it for instance) is pad * position (m_Pos) + m_Offset. - * D_PAD::ReturnShapePos() returns the physical shape position according to + * D_PAD::ShapePos() returns the physical shape position according to * the offset and the pad rotation. */ wxPoint m_Offset; diff --git a/pcbnew/class_pad_draw_functions.cpp b/pcbnew/class_pad_draw_functions.cpp index 56f60c2eee..89ce94feec 100644 --- a/pcbnew/class_pad_draw_functions.cpp +++ b/pcbnew/class_pad_draw_functions.cpp @@ -317,7 +317,7 @@ void D_PAD::DrawShape( EDA_RECT* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo ) GRSetDrawMode( aDC, aDrawInfo.m_DrawMode ); // calculate pad shape position : - wxPoint shape_pos = ReturnShapePos() - aDrawInfo.m_Offset; + wxPoint shape_pos = ShapePos() - aDrawInfo.m_Offset; wxSize halfsize = m_Size; halfsize.x >>= 1; @@ -544,7 +544,7 @@ void D_PAD::DrawShape( EDA_RECT* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo ) if( aDrawInfo.m_Display_padnum ) { - ReturnStringPadName( buffer ); + StringPadName( buffer ); int numpad_len = buffer.Len(); numpad_len = std::max( numpad_len, MIN_CHAR_COUNT ); diff --git a/pcbnew/class_pcb_layer_widget.cpp b/pcbnew/class_pcb_layer_widget.cpp index 6dc983babf..82ab8237f7 100644 --- a/pcbnew/class_pcb_layer_widget.cpp +++ b/pcbnew/class_pcb_layer_widget.cpp @@ -29,7 +29,7 @@ /******************************************************/ #include -#include +#include #include #include #include diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index 21cca65517..4f6c65f1be 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -224,7 +224,7 @@ wxString SEGVIA::GetSelectMenuText() const // say which layers, only two for now LAYER_NUM topLayer; LAYER_NUM botLayer; - ReturnLayerPair( &topLayer, &botLayer ); + LayerPair( &topLayer, &botLayer ); text.Printf( format.GetData(), GetChars( ShowWidth() ), GetChars( netname ), GetNet(), GetChars( board->GetLayerName( topLayer ) ), @@ -404,7 +404,7 @@ bool SEGVIA::IsOnLayer( LAYER_NUM layer_number ) const { LAYER_NUM bottom_layer, top_layer; - ReturnLayerPair( &top_layer, &bottom_layer ); + LayerPair( &top_layer, &bottom_layer ); if( bottom_layer <= layer_number && layer_number <= top_layer ) return true; @@ -426,8 +426,8 @@ LAYER_MSK TRACK::GetLayerMask() const LAYER_NUM bottom_layer, top_layer; - // ReturnLayerPair() knows how layers are stored - ( (SEGVIA*) this )->ReturnLayerPair( &top_layer, &bottom_layer ); + // LayerPair() knows how layers are stored + ( (SEGVIA*) this )->LayerPair( &top_layer, &bottom_layer ); LAYER_MSK layermask = NO_LAYERS; @@ -462,7 +462,7 @@ void SEGVIA::SetLayerPair( LAYER_NUM top_layer, LAYER_NUM bottom_layer ) } -void SEGVIA::ReturnLayerPair( LAYER_NUM* top_layer, LAYER_NUM* bottom_layer ) const +void SEGVIA::LayerPair( LAYER_NUM* top_layer, LAYER_NUM* bottom_layer ) const { LAYER_NUM b_layer = LAYER_N_BACK; LAYER_NUM t_layer = LAYER_N_FRONT; @@ -931,7 +931,7 @@ void SEGVIA::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, int ax = 0, ay = radius, bx = 0, by = drill_radius; LAYER_NUM layer_top, layer_bottom; - ( (SEGVIA*) this )->ReturnLayerPair( &layer_top, &layer_bottom ); + ( (SEGVIA*) this )->LayerPair( &layer_top, &layer_bottom ); // lines for the top layer RotatePoint( &ax, &ay, layer_top * 3600.0 / brd->GetCopperLayerCount( ) ); @@ -1153,7 +1153,7 @@ void TRACK::GetMsgPanelInfoBase( std::vector< MSG_PANEL_ITEM >& aList ) SEGVIA* Via = (SEGVIA*) this; LAYER_NUM top_layer, bottom_layer; - Via->ReturnLayerPair( &top_layer, &bottom_layer ); + Via->LayerPair( &top_layer, &bottom_layer ); if( board ) msg = board->GetLayerName( top_layer ) + wxT( "/" ) + board->GetLayerName( bottom_layer ); diff --git a/pcbnew/class_track.h b/pcbnew/class_track.h index 594678bf40..56ac970102 100644 --- a/pcbnew/class_track.h +++ b/pcbnew/class_track.h @@ -400,13 +400,13 @@ public: void SetLayerPair( LAYER_NUM top_layer, LAYER_NUM bottom_layer ); /** - * Function ReturnLayerPair + * Function LayerPair * Return the 2 layers used by the via (the via actually uses * all layers between these 2 layers) * @param top_layer = pointer to the first layer (can be null) * @param bottom_layer = pointer to the last layer (can be null) */ - void ReturnLayerPair( LAYER_NUM* top_layer, LAYER_NUM* bottom_layer ) const; + void LayerPair( LAYER_NUM* top_layer, LAYER_NUM* bottom_layer ) const; const wxPoint& GetPosition() const { return m_Start; } // was overload void SetPosition( const wxPoint& aPoint ) { m_Start = aPoint; m_End = aPoint; } // was overload diff --git a/pcbnew/clean.cpp b/pcbnew/clean.cpp index 2fdd6e9975..55a72d1f7b 100644 --- a/pcbnew/clean.cpp +++ b/pcbnew/clean.cpp @@ -327,7 +327,7 @@ bool TRACKS_CLEANER::deleteUnconnectedTracks() } else { - ((SEGVIA*)track)->ReturnLayerPair( &top_layer, &bottom_layer ); + ((SEGVIA*)track)->LayerPair( &top_layer, &bottom_layer ); zone = m_Brd->HitTestForAnyFilledArea( track->GetStart(), top_layer, bottom_layer, track->GetNet() ); @@ -355,7 +355,7 @@ bool TRACKS_CLEANER::deleteUnconnectedTracks() if( other == NULL ) { - via->ReturnLayerPair( &top_layer, &bottom_layer ); + via->LayerPair( &top_layer, &bottom_layer ); zone = m_Brd->HitTestForAnyFilledArea( via->GetStart(), bottom_layer, top_layer, @@ -387,7 +387,7 @@ bool TRACKS_CLEANER::deleteUnconnectedTracks() } else { - ((SEGVIA*)track)->ReturnLayerPair( &top_layer, &bottom_layer ); + ((SEGVIA*)track)->LayerPair( &top_layer, &bottom_layer ); zone = m_Brd->HitTestForAnyFilledArea( track->GetEnd(), top_layer, bottom_layer, track->GetNet() ); @@ -416,7 +416,7 @@ bool TRACKS_CLEANER::deleteUnconnectedTracks() if( other == NULL ) { - via->ReturnLayerPair( &top_layer, &bottom_layer ); + via->LayerPair( &top_layer, &bottom_layer ); zone = m_Brd->HitTestForAnyFilledArea( via->GetEnd(), bottom_layer, top_layer, via->GetNet() ); diff --git a/pcbnew/connect.cpp b/pcbnew/connect.cpp index aa8d4867e6..9398eaa8b4 100644 --- a/pcbnew/connect.cpp +++ b/pcbnew/connect.cpp @@ -79,7 +79,7 @@ void CONNECTIONS::SearchConnectionsPadsToIntersectingPads() pad->m_PadsConnected.clear(); candidates.clear(); - CollectItemsNearTo( candidates, pad->ReturnShapePos(), pad->GetBoundingRadius() ); + CollectItemsNearTo( candidates, pad->ShapePos(), pad->GetBoundingRadius() ); // add pads to pad.m_PadsConnected, if they are connected for( unsigned jj = 0; jj < candidates.size(); jj++ ) diff --git a/pcbnew/cross-probing.cpp b/pcbnew/cross-probing.cpp index d1f41b791f..08a56ec81c 100644 --- a/pcbnew/cross-probing.cpp +++ b/pcbnew/cross-probing.cpp @@ -11,7 +11,7 @@ */ #include -#include +#include #include #include #include diff --git a/pcbnew/dialogs/dialog_SVG_print.cpp b/pcbnew/dialogs/dialog_SVG_print.cpp index f8eec0ad5b..c5114a1145 100644 --- a/pcbnew/dialogs/dialog_SVG_print.cpp +++ b/pcbnew/dialogs/dialog_SVG_print.cpp @@ -28,7 +28,8 @@ #include -#include +//#include +#include #include #include #include @@ -66,7 +67,7 @@ DIALOG_SVG_PRINT::DIALOG_SVG_PRINT( EDA_DRAW_FRAME* parent ) : DIALOG_SVG_PRINT_base( parent ) { m_parent = (PCB_BASE_FRAME*) parent; - m_config = wxGetApp().GetSettings(); + m_config = Kiface().KifaceSettings(); initDialog(); GetSizer()->SetSizeHints( this ); Centre(); @@ -103,7 +104,7 @@ void DIALOG_SVG_PRINT::initDialog() AddUnitSymbol( *m_TextPenWidth, g_UserUnit ); m_DialogDefaultPenSize->SetValue( - ReturnStringFromValue( g_UserUnit, g_DrawDefaultLineThickness ) ); + StringFromValue( g_UserUnit, g_DrawDefaultLineThickness ) ); // Create layers list LAYER_NUM layer; @@ -206,7 +207,7 @@ void DIALOG_SVG_PRINT::OnOutputDirectoryBrowseClicked( wxCommandEvent& event ) void DIALOG_SVG_PRINT::SetPenWidth() { - int pensize = ReturnValueFromTextCtrl( *m_DialogDefaultPenSize ); + int pensize = ValueFromTextCtrl( *m_DialogDefaultPenSize ); if( pensize > WIDTH_MAX_VALUE ) { @@ -219,7 +220,7 @@ void DIALOG_SVG_PRINT::SetPenWidth() } g_DrawDefaultLineThickness = pensize; - m_DialogDefaultPenSize->SetValue( ReturnStringFromValue( g_UserUnit, pensize ) ); + m_DialogDefaultPenSize->SetValue( StringFromValue( g_UserUnit, pensize ) ); } diff --git a/pcbnew/dialogs/dialog_SVG_print.h b/pcbnew/dialogs/dialog_SVG_print.h index 8fc110286c..bf7309c409 100644 --- a/pcbnew/dialogs/dialog_SVG_print.h +++ b/pcbnew/dialogs/dialog_SVG_print.h @@ -16,7 +16,7 @@ class DIALOG_SVG_PRINT : public DIALOG_SVG_PRINT_base private: PCB_BASE_FRAME* m_parent; BOARD* m_board; - wxConfig* m_config; + wxConfigBase* m_config; LAYER_MSK m_printMaskLayer; wxCheckBox* m_boxSelectLayer[32]; bool m_printBW; diff --git a/pcbnew/dialogs/dialog_copper_zones.cpp b/pcbnew/dialogs/dialog_copper_zones.cpp index 0b07db304f..a343c60198 100644 --- a/pcbnew/dialogs/dialog_copper_zones.cpp +++ b/pcbnew/dialogs/dialog_copper_zones.cpp @@ -29,7 +29,8 @@ #include #include -#include +//#include +#include #include #include #include @@ -57,7 +58,7 @@ public: private: PCB_BASE_FRAME* m_Parent; - wxConfig* m_Config; ///< Current config + wxConfigBase* m_Config; ///< Current config ZONE_EDIT_T m_OnExitCode; ///< exit code: ZONE_ABORT if no change, ///< ZONE_OK if new values accepted @@ -139,7 +140,7 @@ DIALOG_COPPER_ZONE::DIALOG_COPPER_ZONE( PCB_BASE_FRAME* aParent, ZONE_SETTINGS* DIALOG_COPPER_ZONE_BASE( aParent ) { m_Parent = aParent; - m_Config = wxGetApp().GetSettings(); + m_Config = Kiface().KifaceSettings(); m_ptr = aSettings; m_settings = *aSettings; @@ -173,11 +174,11 @@ void DIALOG_COPPER_ZONE::initDialog() m_FillModeCtrl->SetSelection( m_settings.m_FillMode ? 1 : 0 ); AddUnitSymbol( *m_ClearanceValueTitle, g_UserUnit ); - msg = ReturnStringFromValue( g_UserUnit, m_settings.m_ZoneClearance ); + msg = StringFromValue( g_UserUnit, m_settings.m_ZoneClearance ); m_ZoneClearanceCtrl->SetValue( msg ); AddUnitSymbol( *m_MinThicknessValueTitle, g_UserUnit ); - msg = ReturnStringFromValue( g_UserUnit, m_settings.m_ZoneMinThickness ); + msg = StringFromValue( g_UserUnit, m_settings.m_ZoneMinThickness ); m_ZoneMinThicknessCtrl->SetValue( msg ); switch( m_settings.GetPadConnection() ) @@ -388,7 +389,7 @@ bool DIALOG_COPPER_ZONE::AcceptOptions( bool aPromptForErrors, bool aUseExportab m_settings.m_FillMode = (m_FillModeCtrl->GetSelection() == 0) ? 0 : 1; wxString txtvalue = m_ZoneClearanceCtrl->GetValue(); - m_settings.m_ZoneClearance = ReturnValueFromString( g_UserUnit, txtvalue ); + m_settings.m_ZoneClearance = ValueFromString( g_UserUnit, txtvalue ); // Test if this is a reasonable value for this parameter // A too large value can hang Pcbnew @@ -403,7 +404,7 @@ bool DIALOG_COPPER_ZONE::AcceptOptions( bool aPromptForErrors, bool aUseExportab } txtvalue = m_ZoneMinThicknessCtrl->GetValue(); - m_settings.m_ZoneMinThickness = ReturnValueFromString( g_UserUnit, txtvalue ); + m_settings.m_ZoneMinThickness = ValueFromString( g_UserUnit, txtvalue ); if( m_settings.m_ZoneMinThickness < (ZONE_THICKNESS_MIN_VALUE_MIL*IU_PER_MILS) ) { @@ -416,7 +417,7 @@ bool DIALOG_COPPER_ZONE::AcceptOptions( bool aPromptForErrors, bool aUseExportab m_settings.SetCornerSmoothingType( m_cornerSmoothingChoice->GetSelection() ); txtvalue = m_cornerSmoothingCtrl->GetValue(); - m_settings.SetCornerRadius( ReturnValueFromString( g_UserUnit, txtvalue ) ); + m_settings.SetCornerRadius( ValueFromString( g_UserUnit, txtvalue ) ); m_settings.m_ZonePriority = m_PriorityLevelCtrl->GetValue(); @@ -425,8 +426,8 @@ bool DIALOG_COPPER_ZONE::AcceptOptions( bool aPromptForErrors, bool aUseExportab else m_settings.m_Zone_45_Only = true; - m_settings.m_ThermalReliefGap = ReturnValueFromTextCtrl( *m_AntipadSizeValue ); - m_settings.m_ThermalReliefCopperBridge = ReturnValueFromTextCtrl( *m_CopperWidthValue ); + m_settings.m_ThermalReliefGap = ValueFromTextCtrl( *m_AntipadSizeValue ); + m_settings.m_ThermalReliefCopperBridge = ValueFromTextCtrl( *m_CopperWidthValue ); if( m_Config ) { @@ -624,7 +625,7 @@ void DIALOG_COPPER_ZONE::buildAvailableListOfNets() { wxArrayString listNetName; - m_Parent->GetBoard()->ReturnSortedNetnamesList( listNetName, m_NetSortingByPadCount ); + m_Parent->GetBoard()->SortedNetnamesList( listNetName, m_NetSortingByPadCount ); if( m_NetFiltering ) { diff --git a/pcbnew/dialogs/dialog_design_rules.cpp b/pcbnew/dialogs/dialog_design_rules.cpp index e5325943fe..f83be84b9e 100644 --- a/pcbnew/dialogs/dialog_design_rules.cpp +++ b/pcbnew/dialogs/dialog_design_rules.cpp @@ -190,15 +190,15 @@ void DIALOG_DESIGN_RULES::PrintCurrentSettings() m_MessagesList->AppendToPage( _( "Current general settings:
" ) ); // Display min values: - value = ReturnStringFromValue( g_UserUnit, m_BrdSettings.m_TrackMinWidth, true ); + value = StringFromValue( g_UserUnit, m_BrdSettings.m_TrackMinWidth, true ); msg.Printf( _( "Minimum value for tracks width: %s
\n" ), GetChars( value ) ); m_MessagesList->AppendToPage( msg ); - value = ReturnStringFromValue( g_UserUnit, m_BrdSettings.m_ViasMinSize, true ); + value = StringFromValue( g_UserUnit, m_BrdSettings.m_ViasMinSize, true ); msg.Printf( _( "Minimum value for vias diameter: %s
\n" ), GetChars( value ) ); m_MessagesList->AppendToPage( msg ); - value = ReturnStringFromValue( g_UserUnit, m_BrdSettings.m_MicroViasMinSize, true ); + value = StringFromValue( g_UserUnit, m_BrdSettings.m_MicroViasMinSize, true ); msg.Printf( _( "Minimum value for microvias diameter: %s
\n" ), GetChars( value ) ); m_MessagesList->AppendToPage( msg ); } @@ -312,17 +312,17 @@ void DIALOG_DESIGN_RULES::InitDimensionsLists() for( unsigned ii = 0; ii < m_TracksWidthList.size(); ii++ ) { - msg = ReturnStringFromValue( g_UserUnit, m_TracksWidthList[ii], false ); + msg = StringFromValue( g_UserUnit, m_TracksWidthList[ii], false ); m_gridTrackWidthList->SetCellValue( ii, 0, msg ); } for( unsigned ii = 0; ii < m_ViasDimensionsList.size(); ii++ ) { - msg = ReturnStringFromValue( g_UserUnit, m_ViasDimensionsList[ii].m_Diameter, false ); + msg = StringFromValue( g_UserUnit, m_ViasDimensionsList[ii].m_Diameter, false ); m_gridViaSizeList->SetCellValue( ii, 0, msg ); if( m_ViasDimensionsList[ii].m_Drill > 0 ) { - msg = ReturnStringFromValue( g_UserUnit, m_ViasDimensionsList[ii].m_Drill, false ); + msg = StringFromValue( g_UserUnit, m_ViasDimensionsList[ii].m_Drill, false ); m_gridViaSizeList->SetCellValue( ii, 1, msg ); } } @@ -458,22 +458,22 @@ static void class2gridRow( wxGrid* grid, int row, NETCLASS* nc ) // label is netclass name grid->SetRowLabelValue( row, nc->GetName() ); - msg = ReturnStringFromValue( g_UserUnit, nc->GetClearance() ); + msg = StringFromValue( g_UserUnit, nc->GetClearance() ); grid->SetCellValue( row, GRID_CLEARANCE, msg ); - msg = ReturnStringFromValue( g_UserUnit, nc->GetTrackWidth() ); + msg = StringFromValue( g_UserUnit, nc->GetTrackWidth() ); grid->SetCellValue( row, GRID_TRACKSIZE, msg ); - msg = ReturnStringFromValue( g_UserUnit, nc->GetViaDiameter() ); + msg = StringFromValue( g_UserUnit, nc->GetViaDiameter() ); grid->SetCellValue( row, GRID_VIASIZE, msg ); - msg = ReturnStringFromValue( g_UserUnit, nc->GetViaDrill() ); + msg = StringFromValue( g_UserUnit, nc->GetViaDrill() ); grid->SetCellValue( row, GRID_VIADRILL, msg ); - msg = ReturnStringFromValue( g_UserUnit, nc->GetuViaDiameter() ); + msg = StringFromValue( g_UserUnit, nc->GetuViaDiameter() ); grid->SetCellValue( row, GRID_uVIASIZE, msg ); - msg = ReturnStringFromValue( g_UserUnit, nc->GetuViaDrill() ); + msg = StringFromValue( g_UserUnit, nc->GetuViaDrill() ); grid->SetCellValue( row, GRID_uVIADRILL, msg ); } @@ -509,7 +509,7 @@ void DIALOG_DESIGN_RULES::InitRulesList() static void gridRow2class( wxGrid* grid, int row, NETCLASS* nc ) { #define MYCELL( col ) \ - ReturnValueFromString( g_UserUnit, grid->GetCellValue( row, col ) ) + ValueFromString( g_UserUnit, grid->GetCellValue( row, col ) ) nc->SetClearance( MYCELL( GRID_CLEARANCE ) ); nc->SetTrackWidth( MYCELL( GRID_TRACKSIZE ) ); @@ -571,17 +571,17 @@ void DIALOG_DESIGN_RULES::CopyGlobalRulesToBoard() m_BrdSettings.m_BlindBuriedViaAllowed = m_OptViaType->GetSelection() > 0; // Update vias minimum values for DRC - m_BrdSettings.m_ViasMinSize = ReturnValueFromTextCtrl( *m_SetViasMinSizeCtrl ); - m_BrdSettings.m_ViasMinDrill = ReturnValueFromTextCtrl( *m_SetViasMinDrillCtrl ); + m_BrdSettings.m_ViasMinSize = ValueFromTextCtrl( *m_SetViasMinSizeCtrl ); + m_BrdSettings.m_ViasMinDrill = ValueFromTextCtrl( *m_SetViasMinDrillCtrl ); m_BrdSettings.m_MicroViasAllowed = m_AllowMicroViaCtrl->GetSelection() == 1; // Update microvias minimum values for DRC - m_BrdSettings.m_MicroViasMinSize = ReturnValueFromTextCtrl( *m_SetMicroViasMinSizeCtrl ); - m_BrdSettings.m_MicroViasMinDrill = ReturnValueFromTextCtrl( *m_SetMicroViasMinDrillCtrl ); + m_BrdSettings.m_MicroViasMinSize = ValueFromTextCtrl( *m_SetMicroViasMinSizeCtrl ); + m_BrdSettings.m_MicroViasMinDrill = ValueFromTextCtrl( *m_SetMicroViasMinDrillCtrl ); // Update tracks minimum values for DRC - m_BrdSettings.m_TrackMinWidth = ReturnValueFromTextCtrl( *m_SetTrackMinWidthCtrl ); + m_BrdSettings.m_TrackMinWidth = ValueFromTextCtrl( *m_SetTrackMinWidthCtrl ); } @@ -600,7 +600,7 @@ void DIALOG_DESIGN_RULES::CopyDimensionsListsToBoard() if( msg.IsEmpty() ) continue; - int value = ReturnValueFromString( g_UserUnit, msg ); + int value = ValueFromString( g_UserUnit, msg ); m_TracksWidthList.push_back( value ); } @@ -617,14 +617,14 @@ void DIALOG_DESIGN_RULES::CopyDimensionsListsToBoard() if( msg.IsEmpty() ) continue; - int value = ReturnValueFromString( g_UserUnit, msg ); + int value = ValueFromString( g_UserUnit, msg ); VIA_DIMENSION via_dim; via_dim.m_Diameter = value; msg = m_gridViaSizeList->GetCellValue( row, 1 ); if( !msg.IsEmpty() ) { - value = ReturnValueFromString( g_UserUnit, msg ); + value = ValueFromString( g_UserUnit, msg ); via_dim.m_Drill = value; } @@ -949,18 +949,18 @@ bool DIALOG_DESIGN_RULES::TestDataValidity() wxString msg; - int minViaDia = ReturnValueFromTextCtrl( *m_SetViasMinSizeCtrl ); - int minViaDrill = ReturnValueFromTextCtrl( *m_SetViasMinDrillCtrl ); - int minUViaDia = ReturnValueFromTextCtrl( *m_SetMicroViasMinSizeCtrl ); - int minUViaDrill = ReturnValueFromTextCtrl( *m_SetMicroViasMinDrillCtrl ); - int minTrackWidth = ReturnValueFromTextCtrl( *m_SetTrackMinWidthCtrl ); + int minViaDia = ValueFromTextCtrl( *m_SetViasMinSizeCtrl ); + int minViaDrill = ValueFromTextCtrl( *m_SetViasMinDrillCtrl ); + int minUViaDia = ValueFromTextCtrl( *m_SetMicroViasMinSizeCtrl ); + int minUViaDrill = ValueFromTextCtrl( *m_SetMicroViasMinDrillCtrl ); + int minTrackWidth = ValueFromTextCtrl( *m_SetTrackMinWidthCtrl ); int maxval = 1000 * IU_PER_MILS; // a max value for tracks and vias sizes (1 inch) for( int row = 0; row < m_grid->GetNumberRows(); row++ ) { - int tracksize = ReturnValueFromString( g_UserUnit, + int tracksize = ValueFromString( g_UserUnit, m_grid->GetCellValue( row, GRID_TRACKSIZE ) ); if( tracksize < minTrackWidth ) { @@ -972,7 +972,7 @@ bool DIALOG_DESIGN_RULES::TestDataValidity() } // Test vias - int viadia = ReturnValueFromString( g_UserUnit, + int viadia = ValueFromString( g_UserUnit, m_grid->GetCellValue( row, GRID_VIASIZE ) ); if( viadia < minViaDia ) @@ -984,7 +984,7 @@ bool DIALOG_DESIGN_RULES::TestDataValidity() m_MessagesList->AppendToPage( msg ); } - int viadrill = ReturnValueFromString( g_UserUnit, + int viadrill = ValueFromString( g_UserUnit, m_grid->GetCellValue( row, GRID_VIADRILL ) ); if( viadrill >= viadia ) { @@ -1005,7 +1005,7 @@ bool DIALOG_DESIGN_RULES::TestDataValidity() } // Test Micro vias - int muviadia = ReturnValueFromString( g_UserUnit, + int muviadia = ValueFromString( g_UserUnit, m_grid->GetCellValue( row, GRID_uVIASIZE ) ); if( muviadia < minUViaDia ) @@ -1017,7 +1017,7 @@ bool DIALOG_DESIGN_RULES::TestDataValidity() m_MessagesList->AppendToPage( msg ); } - int muviadrill = ReturnValueFromString( g_UserUnit, + int muviadrill = ValueFromString( g_UserUnit, m_grid->GetCellValue( row, GRID_uVIADRILL ) ); if( muviadrill >= muviadia ) { @@ -1046,7 +1046,7 @@ bool DIALOG_DESIGN_RULES::TestDataValidity() if( tvalue.IsEmpty() ) continue; - int tracksize = ReturnValueFromString( g_UserUnit, tvalue ); + int tracksize = ValueFromString( g_UserUnit, tvalue ); if( tracksize < minTrackWidth ) { @@ -1073,12 +1073,12 @@ bool DIALOG_DESIGN_RULES::TestDataValidity() if( tvalue.IsEmpty() ) continue; - int viadia = ReturnValueFromString( g_UserUnit, tvalue ); + int viadia = ValueFromString( g_UserUnit, tvalue ); int viadrill = 0; wxString drlvalue = m_gridViaSizeList->GetCellValue( row, 1 ); if( !drlvalue.IsEmpty() ) - viadrill = ReturnValueFromString( g_UserUnit, drlvalue ); + viadrill = ValueFromString( g_UserUnit, drlvalue ); if( viadia < minViaDia ) { diff --git a/pcbnew/dialogs/dialog_drc.cpp b/pcbnew/dialogs/dialog_drc.cpp index d65d497784..4eafff3832 100644 --- a/pcbnew/dialogs/dialog_drc.cpp +++ b/pcbnew/dialogs/dialog_drc.cpp @@ -99,9 +99,9 @@ void DIALOG_DRC_CONTROL::InitValues() */ void DIALOG_DRC_CONTROL::SetDrcParmeters( ) { - m_BrdSettings.m_TrackMinWidth = ReturnValueFromTextCtrl( *m_SetTrackMinWidthCtrl ); - m_BrdSettings.m_ViasMinSize = ReturnValueFromTextCtrl( *m_SetViaMinSizeCtrl ); - m_BrdSettings.m_MicroViasMinSize = ReturnValueFromTextCtrl( *m_SetMicroViakMinSizeCtrl ); + m_BrdSettings.m_TrackMinWidth = ValueFromTextCtrl( *m_SetTrackMinWidthCtrl ); + m_BrdSettings.m_ViasMinSize = ValueFromTextCtrl( *m_SetViaMinSizeCtrl ); + m_BrdSettings.m_MicroViasMinSize = ValueFromTextCtrl( *m_SetMicroViakMinSizeCtrl ); m_Parent->GetBoard()->SetDesignSettings( m_BrdSettings ); } diff --git a/pcbnew/dialogs/dialog_edit_module_for_BoardEditor.cpp b/pcbnew/dialogs/dialog_edit_module_for_BoardEditor.cpp index 1a66d7e21b..db1817b1f5 100644 --- a/pcbnew/dialogs/dialog_edit_module_for_BoardEditor.cpp +++ b/pcbnew/dialogs/dialog_edit_module_for_BoardEditor.cpp @@ -29,11 +29,12 @@ #include +#include #include #include #include #include -#include +#include #include #include <3d_struct.h> #include <3d_viewer.h> @@ -420,17 +421,30 @@ void DIALOG_MODULE_BOARD_EDITOR::Remove3DShape( wxCommandEvent& event ) void DIALOG_MODULE_BOARD_EDITOR::Browse3DLib( wxCommandEvent& event ) { - wxString fullfilename, shortfilename; - wxString fullpath; + PROJECT& prj = Prj(); + SEARCH_STACK& search = Kiface().KifaceSearch(); + + wxString fullpath; + wxString kisys3dmod = wxGetenv( wxT( KISYS3DMOD ) ); + + if( !kisys3dmod || !wxFileName::IsDirReadable( kisys3dmod ) ) + { + fullpath = search.FindValidPath( LIB3D_PATH ); + } + + if( !fullpath ) + fullpath = prj.RPath(PROJECT::VIEWER_3D).LastVisitedPath( search, LIB3D_PATH ); - fullpath = wxGetApp().ReturnLastVisitedLibraryPath( LIB3D_PATH ); #ifdef __WINDOWS__ fullpath.Replace( wxT( "/" ), wxT( "\\" ) ); #endif - wxString fileFilters; - fileFilters = wxGetTranslation( Shapes3DFileWildcard ); - fileFilters += wxChar( '|' ); + wxString fullfilename; + wxString shortfilename; + + wxString fileFilters = wxGetTranslation( Shapes3DFileWildcard ); + + fileFilters += wxChar( '|' ); fileFilters += wxGetTranslation( IDF3DFileWildcard ); fullfilename = EDA_FileSelector( _( "3D Shape:" ), @@ -447,7 +461,8 @@ void DIALOG_MODULE_BOARD_EDITOR::Browse3DLib( wxCommandEvent& event ) return; wxFileName fn = fullfilename; - wxGetApp().SaveLastVisitedLibraryPath( fn.GetPath() ); + + prj.RPath(PROJECT::VIEWER_3D).SaveLastVisitedPath( fn.GetPath() ); /* If the file path is already in the library search paths * list, just add the library name to the list. Otherwise, add @@ -456,8 +471,7 @@ void DIALOG_MODULE_BOARD_EDITOR::Browse3DLib( wxCommandEvent& event ) * because it preserve use of default libraries paths, when the path is a * sub path of these default paths */ - shortfilename = - wxGetApp().ReturnFilenameWithRelativePathInLibPath( fullfilename ); + shortfilename = search.FilenameWithRelativePathInSearchList( fullfilename ); wxFileName aux = shortfilename; if( aux.IsAbsolute() ) @@ -475,10 +489,12 @@ void DIALOG_MODULE_BOARD_EDITOR::Browse3DLib( wxCommandEvent& event ) } S3D_MASTER* new3DShape = new S3D_MASTER( NULL ); + #ifdef __WINDOWS__ // Store filename in Unix notation shortfilename.Replace( wxT( "\\" ), wxT( "/" ) ); #endif + new3DShape->SetShape3DName( shortfilename ); m_Shapes3D_list.push_back( new3DShape ); m_3D_ShapeNameListBox->Append( shortfilename ); @@ -512,9 +528,9 @@ void DIALOG_MODULE_BOARD_EDITOR::OnOkClick( wxCommandEvent& event ) m_CurrentModule->Value().Copy( m_ValueCopy ); // Initialize masks clearances - m_CurrentModule->SetLocalClearance( ReturnValueFromTextCtrl( *m_NetClearanceValueCtrl ) ); - m_CurrentModule->SetLocalSolderMaskMargin( ReturnValueFromTextCtrl( *m_SolderMaskMarginCtrl ) ); - m_CurrentModule->SetLocalSolderPasteMargin( ReturnValueFromTextCtrl( *m_SolderPasteMarginCtrl ) ); + m_CurrentModule->SetLocalClearance( ValueFromTextCtrl( *m_NetClearanceValueCtrl ) ); + m_CurrentModule->SetLocalSolderMaskMargin( ValueFromTextCtrl( *m_SolderMaskMarginCtrl ) ); + m_CurrentModule->SetLocalSolderPasteMargin( ValueFromTextCtrl( *m_SolderPasteMarginCtrl ) ); double dtmp = 0.0; msg = m_SolderPasteMarginRatioCtrl->GetValue(); @@ -551,8 +567,8 @@ void DIALOG_MODULE_BOARD_EDITOR::OnOkClick( wxCommandEvent& event ) } // Set Module Position - modpos.x = ReturnValueFromTextCtrl( *m_ModPositionX ); - modpos.y = ReturnValueFromTextCtrl( *m_ModPositionY ); + modpos.x = ValueFromTextCtrl( *m_ModPositionX ); + modpos.y = ValueFromTextCtrl( *m_ModPositionY ); m_CurrentModule->SetPosition( modpos ); m_CurrentModule->SetLocked( m_AutoPlaceCtrl->GetSelection() == 1 ); @@ -600,7 +616,7 @@ void DIALOG_MODULE_BOARD_EDITOR::OnOkClick( wxCommandEvent& event ) m_CurrentModule->Flip( m_CurrentModule->GetPosition() ); // Update 3D shape list - int ii = m_3D_ShapeNameListBox->GetSelection(); + int ii = m_3D_ShapeNameListBox->GetSelection(); if( ii >= 0 ) TransfertDisplayTo3DValues( ii ); @@ -678,3 +694,4 @@ void DIALOG_MODULE_BOARD_EDITOR::OnEditValue( wxCommandEvent& event ) 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 0b97c21f0e..3582067ed6 100644 --- a/pcbnew/dialogs/dialog_edit_module_for_Modedit.cpp +++ b/pcbnew/dialogs/dialog_edit_module_for_Modedit.cpp @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include <3d_struct.h> #include <3d_viewer.h> @@ -283,17 +283,27 @@ void DIALOG_MODULE_MODULE_EDITOR::Remove3DShape(wxCommandEvent& event) void DIALOG_MODULE_MODULE_EDITOR::BrowseAndAdd3DLib( wxCommandEvent& event ) { - wxString fullfilename, shortfilename; - wxString fullpath; + PROJECT& prj = Prj(); + SEARCH_STACK& search = Kiface().KifaceSearch(); - fullpath = wxGetApp().ReturnLastVisitedLibraryPath( LIB3D_PATH ); + wxString fullpath; + wxString kisys3dmod = wxGetenv( wxT( KISYS3DMOD ) ); + + if( !kisys3dmod || !wxFileName::IsDirReadable( kisys3dmod ) ) + { + fullpath = search.FindValidPath( LIB3D_PATH ); + } + + if( !fullpath ) + fullpath = prj.RPath(PROJECT::VIEWER_3D).LastVisitedPath( search, LIB3D_PATH ); #ifdef __WINDOWS__ fullpath.Replace( wxT( "/" ), wxT( "\\" ) ); #endif - wxString fileFilters; - fileFilters = wxGetTranslation( Shapes3DFileWildcard ); + wxString fullfilename, shortfilename; + wxString fileFilters = wxGetTranslation( Shapes3DFileWildcard ); + fileFilters += wxChar( '|' ); fileFilters += wxGetTranslation( IDF3DFileWildcard ); @@ -311,7 +321,8 @@ void DIALOG_MODULE_MODULE_EDITOR::BrowseAndAdd3DLib( wxCommandEvent& event ) return; wxFileName fn = fullfilename; - wxGetApp().SaveLastVisitedLibraryPath( fn.GetPath() ); + + prj.RPath(PROJECT::VIEWER_3D).SaveLastVisitedPath( fn.GetPath() ); /* If the file path is already in the library search paths * list, just add the library name to the list. Otherwise, add @@ -319,7 +330,7 @@ void DIALOG_MODULE_MODULE_EDITOR::BrowseAndAdd3DLib( wxCommandEvent& event ) * the relative path, when possible is preferable, * because it preserve use of default libraries paths, when the path is a sub path of these default paths */ - shortfilename = wxGetApp().ReturnFilenameWithRelativePathInLibPath( fullfilename ); + shortfilename = search.FilenameWithRelativePathInSearchList( fullfilename ); wxFileName aux = shortfilename; @@ -354,7 +365,6 @@ void DIALOG_MODULE_MODULE_EDITOR::BrowseAndAdd3DLib( wxCommandEvent& event ) m_lastSelected3DShapeIndex = m_3D_ShapeNameListBox->GetCount() - 1; m_3D_ShapeNameListBox->SetSelection( m_lastSelected3DShapeIndex ); Transfert3DValuesToDisplay( m_shapes3D_list[m_lastSelected3DShapeIndex] ); - } @@ -375,7 +385,7 @@ void DIALOG_MODULE_MODULE_EDITOR::OnOkClick( wxCommandEvent& event ) { wxString msg; msg.Printf( _( "Error:\none of invalid chars <%s> found\nin <%s>" ), - MODULE::ReturnStringLibNameInvalidChars( true ), + MODULE::StringLibNameInvalidChars( true ), GetChars( footprintName ) ); DisplayError( NULL, msg ); @@ -415,9 +425,9 @@ void DIALOG_MODULE_MODULE_EDITOR::OnOkClick( wxCommandEvent& event ) m_currentModule->Value().Copy( m_valueCopy ); // Initialize masks clearances - m_currentModule->SetLocalClearance( ReturnValueFromTextCtrl( *m_NetClearanceValueCtrl ) ); - m_currentModule->SetLocalSolderMaskMargin( ReturnValueFromTextCtrl( *m_SolderMaskMarginCtrl ) ); - m_currentModule->SetLocalSolderPasteMargin( ReturnValueFromTextCtrl( *m_SolderPasteMarginCtrl ) ); + m_currentModule->SetLocalClearance( ValueFromTextCtrl( *m_NetClearanceValueCtrl ) ); + m_currentModule->SetLocalSolderMaskMargin( ValueFromTextCtrl( *m_SolderMaskMarginCtrl ) ); + m_currentModule->SetLocalSolderPasteMargin( ValueFromTextCtrl( *m_SolderPasteMarginCtrl ) ); double dtmp; wxString msg = m_SolderPasteMarginRatioCtrl->GetValue(); msg.ToDouble( &dtmp ); diff --git a/pcbnew/dialogs/dialog_edit_module_text.cpp b/pcbnew/dialogs/dialog_edit_module_text.cpp index 267bc05cd6..928ca8541c 100644 --- a/pcbnew/dialogs/dialog_edit_module_text.cpp +++ b/pcbnew/dialogs/dialog_edit_module_text.cpp @@ -197,15 +197,15 @@ void DialogEditModuleText::OnOkClick( wxCommandEvent& event ) wxPoint tmp; msg = m_TxtPosCtrlX->GetValue(); - tmp.x = ReturnValueFromString( g_UserUnit, msg ); + tmp.x = ValueFromString( g_UserUnit, msg ); msg = m_TxtPosCtrlY->GetValue(); - tmp.y = ReturnValueFromString( g_UserUnit, msg ); + tmp.y = ValueFromString( g_UserUnit, msg ); m_currentText->SetPos0( tmp ); - wxSize textSize( wxSize( ReturnValueFromString( g_UserUnit, m_TxtSizeCtrlX->GetValue() ), - ReturnValueFromString( g_UserUnit, m_TxtSizeCtrlY->GetValue() ) ) ); + wxSize textSize( wxSize( ValueFromString( g_UserUnit, m_TxtSizeCtrlX->GetValue() ), + ValueFromString( g_UserUnit, m_TxtSizeCtrlY->GetValue() ) ) ); // Test for a reasonnable size: if( textSize.x < TEXTS_MIN_SIZE ) @@ -216,7 +216,7 @@ void DialogEditModuleText::OnOkClick( wxCommandEvent& event ) m_currentText->SetSize( textSize ), msg = m_TxtWidthCtlr->GetValue(); - int width = ReturnValueFromString( g_UserUnit, msg ); + int width = ValueFromString( g_UserUnit, msg ); // Test for a reasonnable width: if( width <= 1 ) diff --git a/pcbnew/dialogs/dialog_export_idf.cpp b/pcbnew/dialogs/dialog_export_idf.cpp index 6f7b762d27..955c5e932a 100644 --- a/pcbnew/dialogs/dialog_export_idf.cpp +++ b/pcbnew/dialogs/dialog_export_idf.cpp @@ -26,7 +26,7 @@ */ #include -#include +#include #include #include @@ -43,7 +43,7 @@ class DIALOG_EXPORT_IDF3: public DIALOG_EXPORT_IDF3_BASE { private: PCB_EDIT_FRAME* m_parent; - wxConfig* m_config; + wxConfigBase* m_config; bool m_idfThouOpt; // remember last preference for units in THOU void OnCancelClick( wxCommandEvent& event ) @@ -60,7 +60,7 @@ public: DIALOG_EXPORT_IDF3_BASE( parent ) { m_parent = parent; - m_config = wxGetApp().GetSettings(); + m_config = Kiface().KifaceSettings(); SetFocus(); m_idfThouOpt = false; m_config->Read( OPTKEY_IDF_THOU, &m_idfThouOpt ); diff --git a/pcbnew/dialogs/dialog_export_vrml.cpp b/pcbnew/dialogs/dialog_export_vrml.cpp index 712568e796..acf1cbc2f1 100644 --- a/pcbnew/dialogs/dialog_export_vrml.cpp +++ b/pcbnew/dialogs/dialog_export_vrml.cpp @@ -28,10 +28,11 @@ */ #include #include -#include +#include #include #include + /* the dialog to create VRML files, derived from DIALOG_EXPORT_3DFILE_BASE, * created by wxFormBuilder */ @@ -44,7 +45,7 @@ class DIALOG_EXPORT_3DFILE : public DIALOG_EXPORT_3DFILE_BASE { private: PCB_EDIT_FRAME* m_parent; - wxConfig* m_config; + wxConfigBase* m_config; int m_unitsOpt; // to remember last option int m_3DFilesOpt; // to remember last option @@ -56,7 +57,7 @@ public: DIALOG_EXPORT_3DFILE_BASE( parent ) { m_parent = parent; - m_config = wxGetApp().GetSettings(); + m_config = Kiface().KifaceSettings(); SetFocus(); m_config->Read( OPTKEY_OUTPUT_UNIT, &m_unitsOpt ); m_config->Read( OPTKEY_3DFILES_OPT, &m_3DFilesOpt ); diff --git a/pcbnew/dialogs/dialog_fp_lib_table.cpp b/pcbnew/dialogs/dialog_fp_lib_table.cpp index 0a4d383ea2..a2ed8f5d38 100644 --- a/pcbnew/dialogs/dialog_fp_lib_table.cpp +++ b/pcbnew/dialogs/dialog_fp_lib_table.cpp @@ -35,6 +35,7 @@ #include #include +#include #include #include #include @@ -705,7 +706,7 @@ private: // Make sure this special environment variable shows up even if it was // not used yet. It is automatically set by KiCad to the directory holding // the current project. - unique.insert( FP_LIB_TABLE::ProjectPathEnvVariableName() ); + unique.insert( PROJECT_VAR_NAME ); unique.insert( FP_LIB_TABLE::GlobalPathEnvVariableName() ); m_path_subs_grid->AppendRows( unique.size() ); diff --git a/pcbnew/dialogs/dialog_freeroute_exchange.cpp b/pcbnew/dialogs/dialog_freeroute_exchange.cpp index ca3bef0cde..81608d3276 100644 --- a/pcbnew/dialogs/dialog_freeroute_exchange.cpp +++ b/pcbnew/dialogs/dialog_freeroute_exchange.cpp @@ -27,7 +27,8 @@ */ #include -#include +//#include +#include #include #include #include @@ -77,7 +78,10 @@ void DIALOG_FREEROUTE::MyInit() m_FreeRouteSetupChanged = false; wxString msg; - wxGetApp().GetSettings()->Read( FREEROUTE_URL_KEY, &msg ); + + wxConfigBase* cfg = Kiface().KifaceSettings(); + + cfg->Read( FREEROUTE_URL_KEY, &msg ); if( msg.IsEmpty() ) m_FreerouteURLName->SetValue( wxT( "http://www.freerouting.net/" ) ); @@ -207,8 +211,8 @@ void DIALOG_FREEROUTE::OnOKButtonClick( wxCommandEvent& event ) { if( m_FreeRouteSetupChanged ) // Save new config { - wxGetApp().GetSettings()->Write( FREEROUTE_URL_KEY, - m_FreerouteURLName->GetValue() ); + Kiface().KifaceSettings()->Write( + FREEROUTE_URL_KEY, m_FreerouteURLName->GetValue() ); } EndModal(wxID_OK); diff --git a/pcbnew/dialogs/dialog_gendrill.cpp b/pcbnew/dialogs/dialog_gendrill.cpp index c46e1f8e37..6350bbe8ba 100644 --- a/pcbnew/dialogs/dialog_gendrill.cpp +++ b/pcbnew/dialogs/dialog_gendrill.cpp @@ -27,7 +27,8 @@ */ #include -#include +//#include +#include #include #include #include @@ -74,7 +75,7 @@ DIALOG_GENDRILL::DIALOG_GENDRILL( PCB_EDIT_FRAME* parent ) : { m_parent = parent; m_board = parent->GetBoard(); - m_config = wxGetApp().GetSettings(); + m_config = Kiface().KifaceSettings(); m_plotOpts = m_parent->GetPlotSettings(); SetReturnCode( 1 ); diff --git a/pcbnew/dialogs/dialog_gendrill.h b/pcbnew/dialogs/dialog_gendrill.h index b7c2717886..8d452833ed 100644 --- a/pcbnew/dialogs/dialog_gendrill.h +++ b/pcbnew/dialogs/dialog_gendrill.h @@ -50,7 +50,7 @@ public: private: PCB_EDIT_FRAME* m_parent; - wxConfig* m_config; + wxConfigBase* m_config; BOARD* m_board; PCB_PLOT_PARAMS m_plotOpts; @@ -69,9 +69,9 @@ private: // event functions void OnSelDrillUnitsSelected( wxCommandEvent& event ); void OnSelZerosFmtSelected( wxCommandEvent& event ); - void OnGenDrillFile( wxCommandEvent& event ); - void OnGenMapFile( wxCommandEvent& event ); - void OnGenReportFile( wxCommandEvent& event ); + void OnGenDrillFile( wxCommandEvent& event ); + void OnGenMapFile( wxCommandEvent& event ); + void OnGenReportFile( wxCommandEvent& event ); void OnCancelClick( wxCommandEvent& event ); void OnOutputDirectoryBrowseClicked( wxCommandEvent& event ); diff --git a/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp b/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp index b5114a0ce8..02577075cd 100644 --- a/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp +++ b/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp @@ -74,13 +74,13 @@ void DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::MyInit() // Display current values, and current netclass values: int value = netclass->GetTrackWidth(); // Display track width - msg = ReturnStringFromValue( g_UserUnit, value, true ); + msg = StringFromValue( g_UserUnit, value, true ); m_gridDisplayCurrentSettings->SetCellValue( 0, 0, msg ); if( board->GetTrackWidthIndex() ) { value = board->GetCurrentTrackWidth(); - msg = ReturnStringFromValue( g_UserUnit, value, true ); + msg = StringFromValue( g_UserUnit, value, true ); } else msg = _( "Default" ); @@ -88,45 +88,45 @@ void DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::MyInit() m_gridDisplayCurrentSettings->SetCellValue( 1, 0, msg ); value = netclass->GetViaDiameter(); // Display via diameter - msg = ReturnStringFromValue( g_UserUnit, value, true ); + msg = StringFromValue( g_UserUnit, value, true ); m_gridDisplayCurrentSettings->SetCellValue( 0, 1, msg ); if( board->GetViaSizeIndex() ) { value = board->GetCurrentViaSize(); - msg = ReturnStringFromValue( g_UserUnit, value, true ); + msg = StringFromValue( g_UserUnit, value, true ); } else msg = _( "Default" ); m_gridDisplayCurrentSettings->SetCellValue( 1, 1, msg ); value = netclass->GetViaDrill(); // Display via drill - msg = ReturnStringFromValue( g_UserUnit, value, true ); + msg = StringFromValue( g_UserUnit, value, true ); m_gridDisplayCurrentSettings->SetCellValue( 0, 2, msg ); value = board->GetCurrentViaDrill(); if( value >= 0 ) - msg = ReturnStringFromValue( g_UserUnit, value, true ); + msg = StringFromValue( g_UserUnit, value, true ); else msg = _( "Default" ); m_gridDisplayCurrentSettings->SetCellValue( 1, 2, msg ); value = netclass->GetuViaDiameter(); // Display micro via diameter - msg = ReturnStringFromValue( g_UserUnit, value, true ); + msg = StringFromValue( g_UserUnit, value, true ); m_gridDisplayCurrentSettings->SetCellValue( 0, 3, msg ); #if 0 // Currently we use always the default netclass value value = board->GetCurrentMicroViaSize(); - msg = ReturnStringFromValue( g_UserUnit, value, true ); + msg = StringFromValue( g_UserUnit, value, true ); #endif msg = _( "Default" ); m_gridDisplayCurrentSettings->SetCellValue( 1, 3, msg ); value = netclass->GetuViaDrill(); // Display micro via drill - msg = ReturnStringFromValue( g_UserUnit, value, true ); + msg = StringFromValue( g_UserUnit, value, true ); m_gridDisplayCurrentSettings->SetCellValue( 0, 4, msg ); #if 0 // Currently we use always the default netclass value value = board->GetCurrentMicroViaDrill(); if( value >= 0 ) - msg = ReturnStringFromValue( g_UserUnit, value, true ); + msg = StringFromValue( g_UserUnit, value, true ); else #endif msg = _( "Default" ); diff --git a/pcbnew/dialogs/dialog_global_modules_fields_edition.cpp b/pcbnew/dialogs/dialog_global_modules_fields_edition.cpp index 63b4df2308..9f391c2e24 100644 --- a/pcbnew/dialogs/dialog_global_modules_fields_edition.cpp +++ b/pcbnew/dialogs/dialog_global_modules_fields_edition.cpp @@ -97,11 +97,11 @@ void DIALOG_GLOBAL_MODULES_FIELDS_EDITION::initDialog() m_SizeYunit->SetLabel( GetAbbreviatedUnitsLabel() ); m_Ticknessunit->SetLabel( GetAbbreviatedUnitsLabel() ); m_SizeX_Value->SetValue( - ReturnStringFromValue( g_UserUnit, m_brdSettings->m_ModuleTextSize.x ) ); + StringFromValue( g_UserUnit, m_brdSettings->m_ModuleTextSize.x ) ); m_SizeY_Value->SetValue( - ReturnStringFromValue( g_UserUnit, m_brdSettings->m_ModuleTextSize.y ) ); + StringFromValue( g_UserUnit, m_brdSettings->m_ModuleTextSize.y ) ); m_TicknessValue->SetValue( - ReturnStringFromValue( g_UserUnit, m_brdSettings->m_ModuleTextWidth) ); + StringFromValue( g_UserUnit, m_brdSettings->m_ModuleTextWidth) ); Layout(); GetSizer()->SetSizeHints( this ); @@ -116,9 +116,9 @@ void DIALOG_GLOBAL_MODULES_FIELDS_EDITION::OnOKClick( wxCommandEvent& event ) m_othersSelection = m_OtherFields->GetValue(); m_filterString = m_ModuleFilter->GetValue(); - m_brdSettings->m_ModuleTextSize.x = ReturnValueFromTextCtrl( *m_SizeX_Value ); - m_brdSettings->m_ModuleTextSize.y = ReturnValueFromTextCtrl( *m_SizeY_Value ); - m_brdSettings->m_ModuleTextWidth = ReturnValueFromTextCtrl( *m_TicknessValue ); + m_brdSettings->m_ModuleTextSize.x = ValueFromTextCtrl( *m_SizeX_Value ); + m_brdSettings->m_ModuleTextSize.y = ValueFromTextCtrl( *m_SizeY_Value ); + m_brdSettings->m_ModuleTextWidth = ValueFromTextCtrl( *m_TicknessValue ); // clip m_ModuleTextWidth to the 1/4 of min size, to keep it always readable int minsize = std::min( m_brdSettings->m_ModuleTextSize.x, diff --git a/pcbnew/dialogs/dialog_graphic_item_properties.cpp b/pcbnew/dialogs/dialog_graphic_item_properties.cpp index ddff38dbd8..ea133794b8 100644 --- a/pcbnew/dialogs/dialog_graphic_item_properties.cpp +++ b/pcbnew/dialogs/dialog_graphic_item_properties.cpp @@ -215,22 +215,22 @@ void DIALOG_GRAPHIC_ITEM_PROPERTIES::OnOkClick( wxCommandEvent& event ) m_Item->Draw( m_parent->GetCanvas(), m_DC, GR_XOR ); msg = m_Center_StartXCtrl->GetValue(); - m_Item->SetStartX( ReturnValueFromString( g_UserUnit, msg ) ); + m_Item->SetStartX( ValueFromString( g_UserUnit, msg ) ); msg = m_Center_StartYCtrl->GetValue(); - m_Item->SetStartY( ReturnValueFromString( g_UserUnit, msg ) ); + m_Item->SetStartY( ValueFromString( g_UserUnit, msg ) ); msg = m_EndX_Radius_Ctrl->GetValue(); - m_Item->SetEndX( ReturnValueFromString( g_UserUnit, msg ) ); + m_Item->SetEndX( ValueFromString( g_UserUnit, msg ) ); msg = m_EndY_Ctrl->GetValue(); - m_Item->SetEndY( ReturnValueFromString( g_UserUnit, msg ) ); + m_Item->SetEndY( ValueFromString( g_UserUnit, msg ) ); msg = m_ThicknessCtrl->GetValue(); - m_Item->SetWidth( ReturnValueFromString( g_UserUnit, msg ) ); + m_Item->SetWidth( ValueFromString( g_UserUnit, msg ) ); msg = m_DefaultThicknessCtrl->GetValue(); - int thickness = ReturnValueFromString( g_UserUnit, msg ); + int thickness = ValueFromString( g_UserUnit, msg ); m_Item->SetLayer( m_LayerSelectionCtrl->GetLayerSelection() ); diff --git a/pcbnew/dialogs/dialog_graphic_item_properties_for_Modedit.cpp b/pcbnew/dialogs/dialog_graphic_item_properties_for_Modedit.cpp index 9c4fdd2dfe..c04fb03acd 100644 --- a/pcbnew/dialogs/dialog_graphic_item_properties_for_Modedit.cpp +++ b/pcbnew/dialogs/dialog_graphic_item_properties_for_Modedit.cpp @@ -199,24 +199,24 @@ void DIALOG_MODEDIT_FP_BODY_ITEM_PROPERTIES::OnOkClick( wxCommandEvent& event ) wxPoint coord; msg = m_Center_StartXCtrl->GetValue(); - coord.x = ReturnValueFromString( g_UserUnit, msg ); + coord.x = ValueFromString( g_UserUnit, msg ); msg = m_Center_StartYCtrl->GetValue(); - coord.y = ReturnValueFromString( g_UserUnit, msg ); + coord.y = ValueFromString( g_UserUnit, msg ); m_item->SetStart( coord ); m_item->SetStart0( coord ); msg = m_EndX_Radius_Ctrl->GetValue(); - coord.x = ReturnValueFromString( g_UserUnit, msg ); + coord.x = ValueFromString( g_UserUnit, msg ); msg = m_EndY_Ctrl->GetValue(); - coord.y = ReturnValueFromString( g_UserUnit, msg ); + coord.y = ValueFromString( g_UserUnit, msg ); m_item->SetEnd( coord ); m_item->SetEnd0( coord ); msg = m_ThicknessCtrl->GetValue(); - m_item->SetWidth( ReturnValueFromString( g_UserUnit, msg ) ); + m_item->SetWidth( ValueFromString( g_UserUnit, msg ) ); msg = m_DefaultThicknessCtrl->GetValue(); - int thickness = ReturnValueFromString( g_UserUnit, msg ); + int thickness = ValueFromString( g_UserUnit, msg ); m_brdSettings.m_ModuleSegmentWidth = thickness; m_parent->SetDesignSettings( m_brdSettings ); diff --git a/pcbnew/dialogs/dialog_graphic_items_options.cpp b/pcbnew/dialogs/dialog_graphic_items_options.cpp index 7b39406aa8..b68819810f 100644 --- a/pcbnew/dialogs/dialog_graphic_items_options.cpp +++ b/pcbnew/dialogs/dialog_graphic_items_options.cpp @@ -97,20 +97,20 @@ void DIALOG_GRAPHIC_ITEMS_OPTIONS::initValues() void DIALOG_GRAPHIC_ITEMS_OPTIONS::OnOkClick( wxCommandEvent& event ) { - m_brdSettings.m_DrawSegmentWidth = ReturnValueFromTextCtrl( *m_OptPcbSegmWidth ); - m_brdSettings.m_EdgeSegmentWidth = ReturnValueFromTextCtrl( *m_OptPcbEdgesWidth ); - m_brdSettings.m_PcbTextWidth = ReturnValueFromTextCtrl( *m_OptPcbTextWidth ); - m_brdSettings.m_PcbTextSize.y = ReturnValueFromTextCtrl( *m_OptPcbTextVSize ); - m_brdSettings.m_PcbTextSize.x = ReturnValueFromTextCtrl( *m_OptPcbTextHSize ); + m_brdSettings.m_DrawSegmentWidth = ValueFromTextCtrl( *m_OptPcbSegmWidth ); + m_brdSettings.m_EdgeSegmentWidth = ValueFromTextCtrl( *m_OptPcbEdgesWidth ); + m_brdSettings.m_PcbTextWidth = ValueFromTextCtrl( *m_OptPcbTextWidth ); + m_brdSettings.m_PcbTextSize.y = ValueFromTextCtrl( *m_OptPcbTextVSize ); + m_brdSettings.m_PcbTextSize.x = ValueFromTextCtrl( *m_OptPcbTextHSize ); m_parent->GetBoard()->SetDesignSettings( m_brdSettings ); - m_brdSettings.m_ModuleSegmentWidth = ReturnValueFromTextCtrl( *m_OptModuleEdgesWidth ); - m_brdSettings.m_ModuleTextWidth = ReturnValueFromTextCtrl( *m_OptModuleTextWidth ); - m_brdSettings.m_ModuleTextSize.y = ReturnValueFromTextCtrl( *m_OptModuleTextVSize ); - m_brdSettings.m_ModuleTextSize.x = ReturnValueFromTextCtrl( *m_OptModuleTextHSize ); + m_brdSettings.m_ModuleSegmentWidth = ValueFromTextCtrl( *m_OptModuleEdgesWidth ); + m_brdSettings.m_ModuleTextWidth = ValueFromTextCtrl( *m_OptModuleTextWidth ); + m_brdSettings.m_ModuleTextSize.y = ValueFromTextCtrl( *m_OptModuleTextVSize ); + m_brdSettings.m_ModuleTextSize.x = ValueFromTextCtrl( *m_OptModuleTextHSize ); - g_DrawDefaultLineThickness = ReturnValueFromTextCtrl( *m_DefaultPenSizeCtrl ); + g_DrawDefaultLineThickness = ValueFromTextCtrl( *m_DefaultPenSizeCtrl ); if( g_DrawDefaultLineThickness < 0 ) g_DrawDefaultLineThickness = 0; diff --git a/pcbnew/dialogs/dialog_keepout_area_properties.cpp b/pcbnew/dialogs/dialog_keepout_area_properties.cpp index 17e7843054..af5ba6ff24 100644 --- a/pcbnew/dialogs/dialog_keepout_area_properties.cpp +++ b/pcbnew/dialogs/dialog_keepout_area_properties.cpp @@ -29,7 +29,8 @@ #include #include -#include +//#include +#include #include #include #include @@ -56,7 +57,7 @@ public: private: PCB_BASE_FRAME* m_parent; - wxConfig* m_config; ///< Current config + wxConfigBase* m_config; ///< Current config ZONE_SETTINGS m_zonesettings; ZONE_SETTINGS* m_ptr; @@ -105,7 +106,7 @@ DIALOG_KEEPOUT_AREA_PROPERTIES::DIALOG_KEEPOUT_AREA_PROPERTIES( PCB_BASE_FRAME* DIALOG_KEEPOUT_AREA_PROPERTIES_BASE( aParent ) { m_parent = aParent; - m_config = wxGetApp().GetSettings(); + m_config = Kiface().KifaceSettings(); m_ptr = aSettings; m_zonesettings = *aSettings; diff --git a/pcbnew/dialogs/dialog_mask_clearance.cpp b/pcbnew/dialogs/dialog_mask_clearance.cpp index 07f8948a16..913ba2e8ff 100644 --- a/pcbnew/dialogs/dialog_mask_clearance.cpp +++ b/pcbnew/dialogs/dialog_mask_clearance.cpp @@ -85,10 +85,10 @@ void DIALOG_PADS_MASK_CLEARANCE::myInit() void DIALOG_PADS_MASK_CLEARANCE::OnButtonOkClick( wxCommandEvent& event ) { - m_brdSettings.m_SolderMaskMargin = ReturnValueFromTextCtrl( *m_SolderMaskMarginCtrl ); - m_brdSettings.m_SolderMaskMinWidth = ReturnValueFromTextCtrl( *m_SolderMaskMinWidthCtrl ); + m_brdSettings.m_SolderMaskMargin = ValueFromTextCtrl( *m_SolderMaskMarginCtrl ); + m_brdSettings.m_SolderMaskMinWidth = ValueFromTextCtrl( *m_SolderMaskMinWidthCtrl ); - m_brdSettings.m_SolderPasteMargin = ReturnValueFromTextCtrl( *m_SolderPasteMarginCtrl ); + m_brdSettings.m_SolderPasteMargin = ValueFromTextCtrl( *m_SolderPasteMarginCtrl ); double dtmp = 0; wxString msg = m_SolderPasteMarginRatioCtrl->GetValue(); diff --git a/pcbnew/dialogs/dialog_netlist.cpp b/pcbnew/dialogs/dialog_netlist.cpp index 50ad5f0063..e7cb66c29e 100644 --- a/pcbnew/dialogs/dialog_netlist.cpp +++ b/pcbnew/dialogs/dialog_netlist.cpp @@ -27,7 +27,9 @@ */ #include -#include +//#include +#include +#include #include #include #include @@ -86,7 +88,10 @@ void PCB_EDIT_FRAME::InstallNetlistFrame( wxDC* DC ) { wxFileName fn = GetBoard()->GetFileName(); fn.SetExt( ProjectFileExtension ); - wxGetApp().WriteProjectConfig( fn.GetFullPath(), GROUP, GetProjectFileParameters() ); + + // was: wxGetApp().WriteProjectConfig( fn.GetFullPath(), GROUP, GetProjectFileParameters() ); + Prj().ConfigSave( Kiface().KifaceSearch(), fn.GetFullPath(), + GROUP, GetProjectFileParameters() ); } } @@ -97,7 +102,7 @@ DIALOG_NETLIST::DIALOG_NETLIST( PCB_EDIT_FRAME* aParent, wxDC * aDC, { m_parent = aParent; m_dc = aDC; - m_config = wxGetApp().GetSettings(); + m_config = Kiface().KifaceSettings(); 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 ); diff --git a/pcbnew/dialogs/dialog_netlist.h b/pcbnew/dialogs/dialog_netlist.h index 475588bce0..33910fbbe5 100644 --- a/pcbnew/dialogs/dialog_netlist.h +++ b/pcbnew/dialogs/dialog_netlist.h @@ -43,7 +43,7 @@ private: 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; + wxConfigBase* m_config; public: DIALOG_NETLIST( PCB_EDIT_FRAME* aParent, wxDC* aDC, const wxString & aNetlistFullFilename ); diff --git a/pcbnew/dialogs/dialog_pad_properties.cpp b/pcbnew/dialogs/dialog_pad_properties.cpp index 0ab2b700ca..fbc555232b 100644 --- a/pcbnew/dialogs/dialog_pad_properties.cpp +++ b/pcbnew/dialogs/dialog_pad_properties.cpp @@ -863,11 +863,11 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( D_PAD* aPad ) aPad->SetShape( CodeShape[m_PadShape->GetSelection()] ); // Read pad clearances values: - aPad->SetLocalClearance( ReturnValueFromTextCtrl( *m_NetClearanceValueCtrl ) ); - aPad->SetLocalSolderMaskMargin( ReturnValueFromTextCtrl( *m_SolderMaskMarginCtrl ) ); - aPad->SetLocalSolderPasteMargin( ReturnValueFromTextCtrl( *m_SolderPasteMarginCtrl ) ); - aPad->SetThermalWidth( ReturnValueFromTextCtrl( *m_ThermalWidthCtrl ) ); - aPad->SetThermalGap( ReturnValueFromTextCtrl( *m_ThermalGapCtrl ) ); + aPad->SetLocalClearance( ValueFromTextCtrl( *m_NetClearanceValueCtrl ) ); + aPad->SetLocalSolderMaskMargin( ValueFromTextCtrl( *m_SolderMaskMarginCtrl ) ); + aPad->SetLocalSolderPasteMargin( ValueFromTextCtrl( *m_SolderPasteMarginCtrl ) ); + aPad->SetThermalWidth( ValueFromTextCtrl( *m_ThermalWidthCtrl ) ); + aPad->SetThermalGap( ValueFromTextCtrl( *m_ThermalGapCtrl ) ); double dtmp = 0.0; msg = m_SolderPasteMarginRatioCtrl->GetValue(); msg.ToDouble( &dtmp ); @@ -903,15 +903,15 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( D_PAD* aPad ) } // Read pad position: - x = ReturnValueFromTextCtrl( *m_PadPosition_X_Ctrl ); - y = ReturnValueFromTextCtrl( *m_PadPosition_Y_Ctrl ); + x = ValueFromTextCtrl( *m_PadPosition_X_Ctrl ); + y = ValueFromTextCtrl( *m_PadPosition_Y_Ctrl ); aPad->SetPosition( wxPoint( x, y ) ); aPad->SetPos0( wxPoint( x, y ) ); // Read pad drill: - x = ReturnValueFromTextCtrl( *m_PadDrill_X_Ctrl ); - y = ReturnValueFromTextCtrl( *m_PadDrill_Y_Ctrl ); + x = ValueFromTextCtrl( *m_PadDrill_X_Ctrl ); + y = ValueFromTextCtrl( *m_PadDrill_Y_Ctrl ); if( m_DrillShapeCtrl->GetSelection() == 0 ) { @@ -924,24 +924,24 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( D_PAD* aPad ) aPad->SetDrillSize( wxSize( x, y ) ); // Read pad shape size: - x = ReturnValueFromTextCtrl( *m_ShapeSize_X_Ctrl ); - y = ReturnValueFromTextCtrl( *m_ShapeSize_Y_Ctrl ); + x = ValueFromTextCtrl( *m_ShapeSize_X_Ctrl ); + y = ValueFromTextCtrl( *m_ShapeSize_Y_Ctrl ); if( aPad->GetShape() == PAD_CIRCLE ) y = x; aPad->SetSize( wxSize( x, y ) ); // Read pad length die - aPad->SetPadToDieLength( ReturnValueFromTextCtrl( *m_LengthPadToDieCtrl ) ); + aPad->SetPadToDieLength( ValueFromTextCtrl( *m_LengthPadToDieCtrl ) ); // Read pad shape delta size: // m_DeltaSize.x or m_DeltaSize.y must be NULL. for a trapezoid. wxSize delta; if( m_trapDeltaDirChoice->GetSelection() == 0 ) - delta.x = ReturnValueFromTextCtrl( *m_ShapeDelta_Ctrl ); + delta.x = ValueFromTextCtrl( *m_ShapeDelta_Ctrl ); else - delta.y = ReturnValueFromTextCtrl( *m_ShapeDelta_Ctrl ); + delta.y = ValueFromTextCtrl( *m_ShapeDelta_Ctrl ); // Test bad values (be sure delta values are not too large) // remember DeltaSize.x is the Y size variation @@ -974,8 +974,8 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( D_PAD* aPad ) aPad->SetDelta( delta ); // Read pad shape offset: - x = ReturnValueFromTextCtrl( *m_ShapeOffset_X_Ctrl ); - y = ReturnValueFromTextCtrl( *m_ShapeOffset_Y_Ctrl ); + x = ValueFromTextCtrl( *m_ShapeOffset_X_Ctrl ); + y = ValueFromTextCtrl( *m_ShapeOffset_Y_Ctrl ); aPad->SetOffset( wxPoint( x, y ) ); double orient_value = 0; diff --git a/pcbnew/dialogs/dialog_pcb_text_properties.cpp b/pcbnew/dialogs/dialog_pcb_text_properties.cpp index 4a0f91440e..9f58be5e1d 100644 --- a/pcbnew/dialogs/dialog_pcb_text_properties.cpp +++ b/pcbnew/dialogs/dialog_pcb_text_properties.cpp @@ -211,13 +211,13 @@ void DIALOG_PCB_TEXT_PROPERTIES::OnOkClick( wxCommandEvent& event ) } // Set PCB Text position - newPosition.x = ReturnValueFromString( g_UserUnit, m_PositionXCtrl->GetValue() ); - newPosition.y = ReturnValueFromString( g_UserUnit, m_PositionYCtrl->GetValue() ); + newPosition.x = ValueFromString( g_UserUnit, m_PositionXCtrl->GetValue() ); + newPosition.y = ValueFromString( g_UserUnit, m_PositionYCtrl->GetValue() ); m_SelectedPCBText->SetTextPosition( newPosition ); // Check constraints and set PCB Text size - newSize.x = ReturnValueFromString( g_UserUnit, m_SizeXCtrl->GetValue() ); - newSize.y = ReturnValueFromString( g_UserUnit, m_SizeYCtrl->GetValue() ); + newSize.x = ValueFromString( g_UserUnit, m_SizeXCtrl->GetValue() ); + newSize.y = ValueFromString( g_UserUnit, m_SizeYCtrl->GetValue() ); if( newSize.x < TEXTS_MIN_SIZE ) newSize.x = TEXTS_MIN_SIZE; @@ -234,7 +234,7 @@ void DIALOG_PCB_TEXT_PROPERTIES::OnOkClick( wxCommandEvent& event ) m_SelectedPCBText->SetSize( newSize ); // Set the new thickness - m_SelectedPCBText->SetThickness( ReturnValueFromString( g_UserUnit, + m_SelectedPCBText->SetThickness( ValueFromString( g_UserUnit, m_ThicknessCtrl->GetValue() ) ); // Test for acceptable values for thickness and size and clamp if fails diff --git a/pcbnew/dialogs/dialog_plot.cpp b/pcbnew/dialogs/dialog_plot.cpp index bc13af8558..36b8d3da07 100644 --- a/pcbnew/dialogs/dialog_plot.cpp +++ b/pcbnew/dialogs/dialog_plot.cpp @@ -25,7 +25,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include + +#include #include #include #include @@ -44,7 +45,7 @@ DIALOG_PLOT::DIALOG_PLOT( PCB_EDIT_FRAME* aParent ) : m_board( aParent->GetBoard() ), m_plotOpts( aParent->GetPlotSettings() ) { - m_config = wxGetApp().GetSettings(); + m_config = Kiface().KifaceSettings(); m_brdSettings = m_board->GetDesignSettings(); Init_Dialog(); @@ -100,25 +101,25 @@ void DIALOG_PLOT::Init_Dialog() break; } - msg = ReturnStringFromValue( g_UserUnit, m_brdSettings.m_SolderMaskMargin, true ); + msg = StringFromValue( g_UserUnit, m_brdSettings.m_SolderMaskMargin, true ); m_SolderMaskMarginCurrValue->SetLabel( msg ); - msg = ReturnStringFromValue( g_UserUnit, m_brdSettings.m_SolderMaskMinWidth, true ); + msg = StringFromValue( g_UserUnit, m_brdSettings.m_SolderMaskMinWidth, true ); m_SolderMaskMinWidthCurrValue->SetLabel( msg ); // Set units and value for HPGL pen size (this param in in mils). AddUnitSymbol( *m_textPenSize, g_UserUnit ); - msg = ReturnStringFromValue( g_UserUnit, + msg = StringFromValue( g_UserUnit, m_plotOpts.GetHPGLPenDiameter() * IU_PER_MILS ); m_HPGLPenSizeOpt->AppendText( msg ); // Set units and value for HPGL pen overlay (this param in in mils). AddUnitSymbol( *m_textPenOvr, g_UserUnit ); - msg = ReturnStringFromValue( g_UserUnit, + msg = StringFromValue( g_UserUnit, m_plotOpts.GetHPGLPenOverlay() * IU_PER_MILS ); m_HPGLPenOverlayOpt->AppendText( msg ); AddUnitSymbol( *m_textDefaultPenSize, g_UserUnit ); - msg = ReturnStringFromValue( g_UserUnit, m_plotOpts.GetLineWidth() ); + msg = StringFromValue( g_UserUnit, m_plotOpts.GetLineWidth() ); m_linesWidth->AppendText( msg ); // Set units for PS global width correction. @@ -583,11 +584,11 @@ void DIALOG_PLOT::applyPlotSettings() // read HPLG pen size (this param is stored in mils) wxString msg = m_HPGLPenSizeOpt->GetValue(); - int tmp = ReturnValueFromString( g_UserUnit, msg ) / IU_PER_MILS; + int tmp = ValueFromString( g_UserUnit, msg ) / IU_PER_MILS; if( !tempOptions.SetHPGLPenDiameter( tmp ) ) { - msg = ReturnStringFromValue( g_UserUnit, tempOptions.GetHPGLPenDiameter() * IU_PER_MILS ); + msg = StringFromValue( g_UserUnit, tempOptions.GetHPGLPenDiameter() * IU_PER_MILS ); m_HPGLPenSizeOpt->SetValue( msg ); msg.Printf( _( "HPGL pen size constrained!\n" ) ); m_messagesBox->AppendText( msg ); @@ -595,11 +596,11 @@ void DIALOG_PLOT::applyPlotSettings() // Read HPGL pen overlay (this param is stored in mils) msg = m_HPGLPenOverlayOpt->GetValue(); - tmp = ReturnValueFromString( g_UserUnit, msg ) / IU_PER_MILS; + tmp = ValueFromString( g_UserUnit, msg ) / IU_PER_MILS; if( !tempOptions.SetHPGLPenOverlay( tmp ) ) { - msg = ReturnStringFromValue( g_UserUnit, + msg = StringFromValue( g_UserUnit, tempOptions.GetHPGLPenOverlay() * IU_PER_MILS ); m_HPGLPenOverlayOpt->SetValue( msg ); msg.Printf( _( "HPGL pen overlay constrained!\n" ) ); @@ -608,11 +609,11 @@ void DIALOG_PLOT::applyPlotSettings() // Default linewidth msg = m_linesWidth->GetValue(); - tmp = ReturnValueFromString( g_UserUnit, msg ); + tmp = ValueFromString( g_UserUnit, msg ); if( !tempOptions.SetLineWidth( tmp ) ) { - msg = ReturnStringFromValue( g_UserUnit, tempOptions.GetLineWidth() ); + msg = StringFromValue( g_UserUnit, tempOptions.GetLineWidth() ); m_linesWidth->SetValue( msg ); msg.Printf( _( "Default line width constrained!\n" ) ); m_messagesBox->AppendText( msg ); @@ -649,11 +650,11 @@ void DIALOG_PLOT::applyPlotSettings() // PS Width correction msg = m_PSFineAdjustWidthOpt->GetValue(); - int itmp = ReturnValueFromString( g_UserUnit, msg ); + int itmp = ValueFromString( g_UserUnit, msg ); if( !setInt( &m_PSWidthAdjust, itmp, m_widthAdjustMinValue, m_widthAdjustMaxValue ) ) { - msg = ReturnStringFromValue( g_UserUnit, m_PSWidthAdjust ); + msg = StringFromValue( g_UserUnit, m_PSWidthAdjust ); m_PSFineAdjustWidthOpt->SetValue( msg ); msg.Printf( _( "Width correction constrained!\n" "The reasonable width correction value must be in a range of\n" diff --git a/pcbnew/dialogs/dialog_plot.h b/pcbnew/dialogs/dialog_plot.h index 14bb893fcc..4be5e712d5 100644 --- a/pcbnew/dialogs/dialog_plot.h +++ b/pcbnew/dialogs/dialog_plot.h @@ -42,7 +42,7 @@ private: PCB_EDIT_FRAME* m_parent; BOARD* m_board; BOARD_DESIGN_SETTINGS m_brdSettings; - wxConfig* m_config; + wxConfigBase* m_config; std::vector m_layerList; // List to hold CheckListBox layer numbers double m_XScaleAdjust; // X scale factor adjust to compensate // plotter X scaling error diff --git a/pcbnew/dialogs/dialog_print_for_modedit.cpp b/pcbnew/dialogs/dialog_print_for_modedit.cpp index 9a2b0beda7..12073f5df3 100644 --- a/pcbnew/dialogs/dialog_print_for_modedit.cpp +++ b/pcbnew/dialogs/dialog_print_for_modedit.cpp @@ -2,7 +2,8 @@ /* File: dialog_print_for_modedit.cpp */ #include -#include +//#include +#include #include #include #include @@ -34,7 +35,7 @@ public: private: PCB_BASE_FRAME* m_parent; - wxConfig* m_config; + wxConfigBase* m_config; void OnCloseWindow( wxCloseEvent& event ); @@ -87,7 +88,7 @@ DIALOG_PRINT_FOR_MODEDIT::DIALOG_PRINT_FOR_MODEDIT( PCB_BASE_FRAME* parent ) : { m_parent = parent; s_Parameters.m_ForceCentered = true; - m_config = wxGetApp().GetSettings(); + m_config = Kiface().KifaceSettings(); InitValues(); m_buttonPrint->SetDefault(); diff --git a/pcbnew/dialogs/dialog_print_using_printer.cpp b/pcbnew/dialogs/dialog_print_using_printer.cpp index 33f9a5662a..fae82d0625 100644 --- a/pcbnew/dialogs/dialog_print_using_printer.cpp +++ b/pcbnew/dialogs/dialog_print_using_printer.cpp @@ -6,7 +6,8 @@ //#define wxTEST_POSTSCRIPT_IN_MSW 1 #include -#include +//#include +#include #include #include #include @@ -61,7 +62,7 @@ public: private: PCB_EDIT_FRAME* m_parent; - wxConfig* m_config; + wxConfigBase* m_config; wxCheckBox* m_BoxSelectLayer[32]; static bool m_ExcludeEdgeLayer; @@ -124,7 +125,7 @@ DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER( PCB_EDIT_FRAME* parent ) DIALOG_PRINT_USING_PRINTER_base( parent ) { m_parent = parent; - m_config = wxGetApp().GetSettings(); + m_config = Kiface().KifaceSettings(); InitValues( ); @@ -259,7 +260,7 @@ void DIALOG_PRINT_USING_PRINTER::InitValues( ) s_Parameters.m_PenDefaultSize = g_DrawDefaultLineThickness; AddUnitSymbol( *m_TextPenWidth, g_UserUnit ); m_DialogPenWidth->SetValue( - ReturnStringFromValue( g_UserUnit, s_Parameters.m_PenDefaultSize ) ); + StringFromValue( g_UserUnit, s_Parameters.m_PenDefaultSize ) ); // Create scale adjust option msg.Printf( wxT( "%f" ), s_Parameters.m_XScaleAdjust ); @@ -385,7 +386,7 @@ void DIALOG_PRINT_USING_PRINTER::SetPenWidth() // Get the new pen width value, and verify min et max value // NOTE: s_Parameters.m_PenDefaultSize is in internal units - s_Parameters.m_PenDefaultSize = ReturnValueFromTextCtrl( *m_DialogPenWidth ); + s_Parameters.m_PenDefaultSize = ValueFromTextCtrl( *m_DialogPenWidth ); if( s_Parameters.m_PenDefaultSize > PEN_WIDTH_MAX_VALUE ) { @@ -400,7 +401,7 @@ void DIALOG_PRINT_USING_PRINTER::SetPenWidth() g_DrawDefaultLineThickness = s_Parameters.m_PenDefaultSize; m_DialogPenWidth->SetValue( - ReturnStringFromValue( g_UserUnit, s_Parameters.m_PenDefaultSize ) ); + StringFromValue( g_UserUnit, s_Parameters.m_PenDefaultSize ) ); } void DIALOG_PRINT_USING_PRINTER::OnScaleSelectionClick( wxCommandEvent& event ) diff --git a/pcbnew/dialogs/dialog_set_grid.cpp b/pcbnew/dialogs/dialog_set_grid.cpp index d22890b572..d60e152805 100644 --- a/pcbnew/dialogs/dialog_set_grid.cpp +++ b/pcbnew/dialogs/dialog_set_grid.cpp @@ -141,8 +141,8 @@ wxPoint DIALOG_SET_GRID::getGridOrigin() wxPoint grid; // @todo Some error checking here would be a good thing. - grid.x = ReturnValueFromTextCtrl( *m_GridOriginXCtrl ); - grid.y = ReturnValueFromTextCtrl( *m_GridOriginYCtrl ); + grid.x = ValueFromTextCtrl( *m_GridOriginXCtrl ); + grid.y = ValueFromTextCtrl( *m_GridOriginYCtrl ); return grid; } diff --git a/pcbnew/dimension.cpp b/pcbnew/dimension.cpp index 819c1a3110..09e9b35d24 100644 --- a/pcbnew/dimension.cpp +++ b/pcbnew/dimension.cpp @@ -176,22 +176,22 @@ void DIALOG_DIMENSION_EDITOR::OnOKClick( wxCommandEvent& event ) // Get new size value: msg = m_TxtSizeXCtrl->GetValue(); - CurrentDimension->Text().SetWidth( ReturnValueFromString( g_UserUnit, msg ) ); + CurrentDimension->Text().SetWidth( ValueFromString( g_UserUnit, msg ) ); msg = m_TxtSizeYCtrl->GetValue(); - CurrentDimension->Text().SetHeight( ReturnValueFromString( g_UserUnit, msg ) ); + CurrentDimension->Text().SetHeight( ValueFromString( g_UserUnit, msg ) ); // Get new position value: // It will be copied later in dimension, because msg = m_textCtrlPosX->GetValue(); wxPoint pos; - pos.x = ReturnValueFromString( g_UserUnit, msg ); + pos.x = ValueFromString( g_UserUnit, msg ); msg = m_textCtrlPosY->GetValue(); - pos.y = ReturnValueFromString( g_UserUnit, msg ); + pos.y = ValueFromString( g_UserUnit, msg ); CurrentDimension->Text().SetTextPosition( pos ); // Get new line thickness value: msg = m_TxtWidthCtrl->GetValue(); - int width = ReturnValueFromString( g_UserUnit, msg ); + int width = ValueFromString( g_UserUnit, msg ); int maxthickness = Clamp_Text_PenSize( width, CurrentDimension->Text().GetSize() ); if( width > maxthickness ) diff --git a/pcbnew/drc.cpp b/pcbnew/drc.cpp index bad9f65fd7..0fd5214de5 100644 --- a/pcbnew/drc.cpp +++ b/pcbnew/drc.cpp @@ -299,7 +299,7 @@ bool DRC::doNetClass( NETCLASS* nc, wxString& msg ) const BOARD_DESIGN_SETTINGS& g = m_pcb->GetDesignSettings(); -#define FmtVal( x ) GetChars( ReturnStringFromValue( g_UserUnit, x ) ) +#define FmtVal( x ) GetChars( StringFromValue( g_UserUnit, x ) ) #if 0 // set to 1 when (if...) BOARD_DESIGN_SETTINGS has a m_MinClearance value if( nc->GetClearance() < g.m_MinClearance ) diff --git a/pcbnew/drc_clearance_test_functions.cpp b/pcbnew/drc_clearance_test_functions.cpp index 1fd8a94ccd..c012c2456a 100644 --- a/pcbnew/drc_clearance_test_functions.cpp +++ b/pcbnew/drc_clearance_test_functions.cpp @@ -207,7 +207,7 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads ) LAYER_NUM layer1, layer2; bool err = true; - ( (SEGVIA*) aRefSeg )->ReturnLayerPair( &layer1, &layer2 ); + ( (SEGVIA*) aRefSeg )->LayerPair( &layer1, &layer2 ); if( layer1 > layer2 ) EXCHG( layer1, layer2 ); @@ -315,7 +315,7 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads ) continue; // DRC for the pad - shape_pos = pad->ReturnShapePos(); + shape_pos = pad->ShapePos(); m_padToTestPos = shape_pos - origin; if( !checkClearanceSegmToPad( pad, aRefSeg->GetWidth(), aRefSeg->GetClearance( pad ) ) ) @@ -588,7 +588,7 @@ bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad ) int dist_min = aRefPad->GetClearance( aPad ); // relativePadPos is the aPad shape position relative to the aRefPad shape position - wxPoint relativePadPos = aPad->ReturnShapePos() - aRefPad->ReturnShapePos(); + wxPoint relativePadPos = aPad->ShapePos() - aRefPad->ShapePos(); dist = KiROUND( EuclideanNorm( relativePadPos ) ); diff --git a/pcbnew/edgemod.cpp b/pcbnew/edgemod.cpp index 14843623a1..7239dc37a8 100644 --- a/pcbnew/edgemod.cpp +++ b/pcbnew/edgemod.cpp @@ -251,14 +251,14 @@ void FOOTPRINT_EDIT_FRAME::Enter_Edge_Width( EDGE_MODULE* aEdge ) { wxString buffer; - buffer = ReturnStringFromValue( g_UserUnit, GetDesignSettings().m_ModuleSegmentWidth ); + buffer = StringFromValue( g_UserUnit, GetDesignSettings().m_ModuleSegmentWidth ); wxTextEntryDialog dlg( this, _( "New Width:" ), _( "Edge Width" ), buffer ); if( dlg.ShowModal() != wxID_OK ) return; // canceled by user buffer = dlg.GetValue( ); - GetDesignSettings().m_ModuleSegmentWidth = ReturnValueFromString( g_UserUnit, buffer ); + GetDesignSettings().m_ModuleSegmentWidth = ValueFromString( g_UserUnit, buffer ); if( aEdge ) { diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index 7b3ddc2846..ecfaedbf97 100644 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -30,7 +30,8 @@ */ #include -#include +#include +#include #include #include #include @@ -189,36 +190,38 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) case ID_OPEN_MODULE_EDITOR: { - FOOTPRINT_EDIT_FRAME* editorFrame = FOOTPRINT_EDIT_FRAME::GetActiveFootprintEditor(); + FOOTPRINT_EDIT_FRAME* editor = FOOTPRINT_EDIT_FRAME::GetActiveFootprintEditor( this ); - if( editorFrame == NULL ) + if( !editor ) { - editorFrame = new FOOTPRINT_EDIT_FRAME( this, m_footprintLibTable ); - editorFrame->Show( true ); - editorFrame->Zoom_Automatique( false ); + editor = (FOOTPRINT_EDIT_FRAME*) Kiface().CreateWindow( this, MODULE_EDITOR_FRAME_TYPE, &Kiway() ); + + editor->Show( true ); + editor->Zoom_Automatique( false ); } else { - if( editorFrame->IsIconized() ) - editorFrame->Iconize( false ); + if( editor->IsIconized() ) + editor->Iconize( false ); - editorFrame->Raise(); + editor->Raise(); // Raising the window does not set the focus on Linux. This should work on // any platform. - if( wxWindow::FindFocus() != editorFrame ) - editorFrame->SetFocus(); + if( wxWindow::FindFocus() != editor ) + editor->SetFocus(); } } break; case ID_OPEN_MODULE_VIEWER: { - FOOTPRINT_VIEWER_FRAME * viewer = - FOOTPRINT_VIEWER_FRAME::GetActiveFootprintViewer(); - if( viewer == NULL ) + FOOTPRINT_VIEWER_FRAME* viewer = FOOTPRINT_VIEWER_FRAME::GetActiveFootprintViewer( this ); + + if( !viewer ) { - viewer = new FOOTPRINT_VIEWER_FRAME( this, m_footprintLibTable, NULL ); + viewer = (FOOTPRINT_VIEWER_FRAME*) Kiface().CreateWindow( this, MODULE_VIEWER_FRAME_TYPE, &Kiway() ); + viewer->Show( true ); viewer->Zoom_Automatique( false ); } @@ -832,16 +835,18 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) } { - FOOTPRINT_EDIT_FRAME* editorFrame = FOOTPRINT_EDIT_FRAME::GetActiveFootprintEditor(); + FOOTPRINT_EDIT_FRAME* editor = FOOTPRINT_EDIT_FRAME::GetActiveFootprintEditor( this ); - if( editorFrame == NULL ) - editorFrame = new FOOTPRINT_EDIT_FRAME( this, m_footprintLibTable ); + if( !editor ) + { + editor = (FOOTPRINT_EDIT_FRAME*) Kiface().CreateWindow( this, MODULE_EDITOR_FRAME_TYPE, &Kiway() ); + } - editorFrame->Load_Module_From_BOARD( (MODULE*)GetCurItem() ); + editor->Load_Module_From_BOARD( (MODULE*)GetCurItem() ); SetCurItem( NULL ); // the current module could be deleted by - editorFrame->Show( true ); - editorFrame->Iconize( false ); + editor->Show( true ); + editor->Iconize( false ); } m_canvas->MoveCursorToCrossHair(); break; @@ -1168,9 +1173,9 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) case ID_POPUP_PCB_DISPLAY_FOOTPRINT_DOC: { - wxConfig* cfg = wxGetApp().GetCommonSettings(); + wxConfigBase* cfg = Pgm().CommonSettings(); cfg->Read( wxT( "module_doc_file" ), g_DocModulesFileName ); - GetAssociatedDocument( this, g_DocModulesFileName, &wxGetApp().GetLibraryPathList() ); + GetAssociatedDocument( this, g_DocModulesFileName, &Kiface().KifaceSearch() ); } break; diff --git a/pcbnew/editmod.cpp b/pcbnew/editmod.cpp index 1f217d6194..7eed255d4c 100644 --- a/pcbnew/editmod.cpp +++ b/pcbnew/editmod.cpp @@ -27,6 +27,7 @@ */ #include +#include #include #include #include @@ -67,22 +68,24 @@ void PCB_EDIT_FRAME::InstallModuleOptionsFrame( MODULE* Module, wxDC* DC ) #ifdef __WXMAC__ // If something edited, push a refresh request - if (retvalue == 0 || retvalue == 1) + if( retvalue == 0 || retvalue == 1 ) m_canvas->Refresh(); #endif if( retvalue == 2 ) { - FOOTPRINT_EDIT_FRAME* editorFrame = FOOTPRINT_EDIT_FRAME::GetActiveFootprintEditor(); + FOOTPRINT_EDIT_FRAME* editor = FOOTPRINT_EDIT_FRAME::GetActiveFootprintEditor( this ); - if( editorFrame == NULL ) - editorFrame = new FOOTPRINT_EDIT_FRAME( this, m_footprintLibTable ); + if( !editor ) + { + editor = (FOOTPRINT_EDIT_FRAME*) Kiface().CreateWindow( this, MODULE_EDITOR_FRAME_TYPE, &Kiway() ); + } - editorFrame->Load_Module_From_BOARD( Module ); + editor->Load_Module_From_BOARD( Module ); SetCurItem( NULL ); - editorFrame->Show( true ); - editorFrame->Iconize( false ); + editor->Show( true ); + editor->Iconize( false ); } } diff --git a/pcbnew/exporters/export_d356.cpp b/pcbnew/exporters/export_d356.cpp index e8ef8f3fbf..24e7c576a7 100644 --- a/pcbnew/exporters/export_d356.cpp +++ b/pcbnew/exporters/export_d356.cpp @@ -27,22 +27,22 @@ * @brief Export IPC-D-356 test format */ -#include "fctsys.h" -#include "class_drawpanel.h" -#include "confirm.h" -#include "gestfich.h" -#include "appl_wxstruct.h" -#include "wxPcbStruct.h" -#include "trigo.h" -#include "build_version.h" -#include "macros.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include -#include "pcbnew.h" +#include -#include "class_board.h" -#include "class_module.h" -#include "class_track.h" -#include "class_edge_mod.h" +#include +#include +#include +#include #include #include @@ -131,7 +131,7 @@ static void build_pad_testpoints( BOARD *aPcb, { rk.netname = pad->GetNetname(); rk.refdes = module->GetReference(); - pad->ReturnStringPadName( rk.pin ); + pad->StringPadName( rk.pin ); rk.midpoint = false; // XXX MAYBE need to be computed (how?) const wxSize& drill = pad->GetDrillSize(); rk.drill = std::min( drill.x, drill.y ); @@ -214,7 +214,7 @@ static void build_via_testpoints( BOARD *aPcb, rk.drill = via->GetDrillValue(); rk.mechanical = false; LAYER_NUM top_layer, bottom_layer; - via->ReturnLayerPair( &top_layer, &bottom_layer ); + via->LayerPair( &top_layer, &bottom_layer ); rk.access = via_access_code( aPcb, top_layer, bottom_layer ); rk.x_location = via->GetPosition().x - origin.x; rk.y_location = origin.y - via->GetPosition().y; diff --git a/pcbnew/exporters/export_gencad.cpp b/pcbnew/exporters/export_gencad.cpp index f04496ff7c..192fc0ca8b 100644 --- a/pcbnew/exporters/export_gencad.cpp +++ b/pcbnew/exporters/export_gencad.cpp @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include #include @@ -525,7 +525,7 @@ static void CreateShapesSection( FILE* aFile, BOARD* aPcb ) layer = ( module->GetFlag() ) ? "BOTTOM" : "TOP"; } - pad->ReturnStringPadName( pinname ); + pad->StringPadName( pinname ); if( pinname.IsEmpty() ) pinname = wxT( "none" ); @@ -667,7 +667,7 @@ static void CreateSignalsSection( FILE* aFile, BOARD* aPcb ) if( pad->GetNet() != net->GetNet() ) continue; - pad->ReturnStringPadName( padname ); + pad->StringPadName( padname ); msg.Printf( wxT( "NODE %s %s" ), GetChars( module->GetReference() ), GetChars( padname ) ); @@ -693,7 +693,7 @@ static bool CreateHeaderInfoData( FILE* aFile, PCB_EDIT_FRAME* aFrame ) // Please note: GenCAD syntax requires quoted strings if they can contain spaces msg.Printf( wxT( "USER \"%s %s\"\n" ), - GetChars( wxGetApp().GetAppName() ), + GetChars( Pgm().App().GetAppName() ), GetChars( GetBuildVersion() ) ); fputs( TO_UTF8( msg ), aFile ); diff --git a/pcbnew/exporters/export_vrml.cpp b/pcbnew/exporters/export_vrml.cpp index 9002657d19..54b64d44a0 100644 --- a/pcbnew/exporters/export_vrml.cpp +++ b/pcbnew/exporters/export_vrml.cpp @@ -66,7 +66,7 @@ #include #include #include -#include +#include #include <3d_struct.h> #include @@ -811,7 +811,7 @@ static void export_vrml_via( MODEL_VRML& aModel, BOARD* pcb, SEGVIA* via ) r = via->GetWidth() * aModel.scale / 2.0; x = via->GetStart().x * aModel.scale + aModel.tx; y = via->GetStart().y * aModel.scale + aModel.ty; - via->ReturnLayerPair( &top_layer, &bottom_layer ); + via->LayerPair( &top_layer, &bottom_layer ); // do not render a buried via if( top_layer != LAST_COPPER_LAYER && bottom_layer != FIRST_COPPER_LAYER ) @@ -955,7 +955,7 @@ static void export_vrml_padshape( MODEL_VRML& aModel, VRML_LAYER* aLayer, VRML_LAYER* aTinLayer, D_PAD* aPad ) { // The (maybe offset) pad position - wxPoint pad_pos = aPad->ReturnShapePos(); + wxPoint pad_pos = aPad->ShapePos(); double pad_x = pad_pos.x * aModel.scale + aModel.tx; double pad_y = pad_pos.y * aModel.scale + aModel.ty; wxSize pad_delta = aPad->GetDelta(); diff --git a/pcbnew/exporters/gen_modules_placefile.cpp b/pcbnew/exporters/gen_modules_placefile.cpp index 609b6adebf..b572338064 100644 --- a/pcbnew/exporters/gen_modules_placefile.cpp +++ b/pcbnew/exporters/gen_modules_placefile.cpp @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include @@ -462,7 +462,7 @@ int PCB_EDIT_FRAME::DoGenFootprintsPositionFile( const wxString& aFullFileName, sprintf( line, "### Module positions - created on %s ###\n", TO_UTF8( DateAndTime() ) ); fputs( line, file ); - wxString Title = wxGetApp().GetAppName() + wxT( " " ) + GetBuildVersion(); + wxString Title = Pgm().App().GetAppName() + wxT( " " ) + GetBuildVersion(); sprintf( line, "### Printed by Pcbnew version %s\n", TO_UTF8( Title ) ); fputs( line, file ); @@ -582,7 +582,7 @@ bool PCB_EDIT_FRAME::DoGenFootprintsReport( const wxString& aFullFilename, bool sprintf( line, "## Module report - date %s\n", TO_UTF8( DateAndTime() ) ); fputs( line, rptfile ); - wxString Title = wxGetApp().GetAppName() + wxT( " " ) + GetBuildVersion(); + wxString Title = Pgm().App().GetAppName() + wxT( " " ) + GetBuildVersion(); sprintf( line, "## Created by Pcbnew version %s\n", TO_UTF8( Title ) ); fputs( line, rptfile ); fputs( unit_text, rptfile ); diff --git a/pcbnew/exporters/gendrill_Excellon_writer.cpp b/pcbnew/exporters/gendrill_Excellon_writer.cpp index 7ad2293b95..265ff406ca 100644 --- a/pcbnew/exporters/gendrill_Excellon_writer.cpp +++ b/pcbnew/exporters/gendrill_Excellon_writer.cpp @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include @@ -351,7 +351,8 @@ void EXCELLON_WRITER::WriteEXCELLONHeader() if( !m_minimalHeader ) { // The next 2 lines in EXCELLON files are comments: - wxString msg = wxGetApp().GetTitle() + wxT( " " ) + GetBuildVersion(); + wxString msg = Pgm().App().GetAppName() + wxT( " " ) + GetBuildVersion(); + fprintf( m_file, ";DRILL file {%s} date %s\n", TO_UTF8( msg ), TO_UTF8( DateAndTime() ) ); msg = wxT( ";FORMAT={" ); @@ -482,9 +483,9 @@ void EXCELLON_WRITER::BuildHolesList( int aFirstLayer, new_hole.m_Hole_Shape = 0; // hole shape: round new_hole.m_Hole_Pos = via->GetStart(); - via->ReturnLayerPair( &new_hole.m_Hole_Top_Layer, &new_hole.m_Hole_Bottom_Layer ); + via->LayerPair( &new_hole.m_Hole_Top_Layer, &new_hole.m_Hole_Bottom_Layer ); - // ReturnLayerPair return params with m_Hole_Bottom_Layer < m_Hole_Top_Layer + // LayerPair return params with m_Hole_Bottom_Layer < m_Hole_Top_Layer if( (new_hole.m_Hole_Bottom_Layer > aFirstLayer) && (aFirstLayer >= 0) ) continue; diff --git a/pcbnew/exporters/idf.cpp b/pcbnew/exporters/idf.cpp index 510c0100db..8c848817c9 100644 --- a/pcbnew/exporters/idf.cpp +++ b/pcbnew/exporters/idf.cpp @@ -39,7 +39,8 @@ #include #include #include -#include +#include +#include #include #include #include diff --git a/pcbnew/files.cpp b/pcbnew/files.cpp index 77dfeea698..c62010d22c 100644 --- a/pcbnew/files.cpp +++ b/pcbnew/files.cpp @@ -39,7 +39,7 @@ #include <3d_viewer.h> #include #include -#include +#include #include #include @@ -58,20 +58,29 @@ #define USE_INSTRUMENTATION false -static const wxString backupFileExtensionSuffix( wxT( "-bak" ) ); -static const wxString autosaveFilePrefix( wxT( "_autosave-" ) ); +static const wxChar backupSuffix[] = wxT( "-bak" ); +static const wxChar autosavePrefix[]= wxT( "_autosave-" ); + void PCB_EDIT_FRAME::OnFileHistory( wxCommandEvent& event ) { - wxString fn; + wxString fn = GetFileFromHistory( event.GetId(), _( "Printed circuit board" ) ); - fn = GetFileFromHistory( event.GetId(), _( "Printed circuit board" ) ); - - if( fn != wxEmptyString ) + if( !!fn ) { + int open_ctl = 0; + m_canvas->EndMouseCapture( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor() ); ::wxSetWorkingDirectory( ::wxPathOnly( fn ) ); - LoadOnePcbFile( fn ); + + // LoadOnePcbFile( fn, bool aAppend = false, bool aForceFileDialog = false ); + if( !wxFileName::IsFileReadable( fn ) ) + { + if( !AskBoardFileName( this, &open_ctl, &fn ) ) + return; + } + + OpenProjectFiles( std::vector( 1, fn ), open_ctl ); } } @@ -91,7 +100,17 @@ void PCB_EDIT_FRAME::Files_io( wxCommandEvent& event ) switch( id ) { case ID_LOAD_FILE: - LoadOnePcbFile( GetBoard()->GetFileName(), false, true ); + { + // LoadOnePcbFile( GetBoard()->GetFileName(), append=false, aForceFileDialog=true ); + + int open_ctl; + wxString fileName = GetBoard()->GetFileName(); + + if( !AskBoardFileName( this, &open_ctl, &fileName ) ) + return; + + OpenProjectFiles( std::vector( 1, fileName ), open_ctl ); + } break; case ID_MENU_READ_BOARD_BACKUP_FILE: @@ -99,33 +118,36 @@ void PCB_EDIT_FRAME::Files_io( wxCommandEvent& event ) { wxFileName currfn = GetBoard()->GetFileName(); wxFileName fn = currfn; + if( id == ID_MENU_RECOVER_BOARD_AUTOSAVE ) { - wxString rec_name = autosaveFilePrefix + fn.GetName(); + wxString rec_name = wxString( autosavePrefix ) + fn.GetName(); fn.SetName( rec_name ); } else { - wxString backup_ext = fn.GetExt()+ backupFileExtensionSuffix; + wxString backup_ext = fn.GetExt()+ backupSuffix; fn.SetExt( backup_ext ); } if( !fn.FileExists() ) { - msg.Printf( _( "Recovery file <%s> not found." ), + msg.Printf( _( "Recovery file '%s' not found." ), GetChars( fn.GetFullPath() ) ); DisplayInfoMessage( this, msg ); break; } - msg.Printf( _( "OK to load recovery or backup file <%s>" ), + msg.Printf( _( "OK to load recovery or backup file '%s'" ), GetChars(fn.GetFullPath() ) ); if( !IsOK( this, msg ) ) break; GetScreen()->ClrModify(); // do not prompt the user for changes - LoadOnePcbFile( fn.GetFullPath(), false ); + + // LoadOnePcbFile( fn.GetFullPath(), aAppend=false, aForceFileDialog=false ); + OpenProjectFiles( std::vector( 1, fn.GetFullPath() ) ); // Re-set the name since name or extension was changed GetBoard()->SetFileName( currfn.GetFullPath() ); @@ -134,34 +156,34 @@ void PCB_EDIT_FRAME::Files_io( wxCommandEvent& event ) break; case ID_APPEND_FILE: - LoadOnePcbFile( wxEmptyString, true ); + { + // LoadOnePcbFile( wxEmptyString, aAppend = true, aForceFileDialog=false ); + int open_ctl; + wxString fileName; + + if( !AskBoardFileName( this, &open_ctl, &fileName ) ) + break; + + OpenProjectFiles( std::vector( 1, fileName ), open_ctl | KICTL_OPEN_APPEND ); + } break; case ID_NEW_BOARD: { Clear_Pcb( true ); - // Create a new empty footprint library table for the new board. - delete m_footprintLibTable; - m_footprintLibTable = new FP_LIB_TABLE( m_globalFootprintTable ); - - FOOTPRINT_EDIT_FRAME* editFrame = FOOTPRINT_EDIT_FRAME::GetActiveFootprintEditor(); - - if( editFrame ) - editFrame->SetFootprintLibTable( m_footprintLibTable ); - - FOOTPRINT_VIEWER_FRAME* viewFrame = FOOTPRINT_VIEWER_FRAME::GetActiveFootprintViewer(); - - if( viewFrame ) - viewFrame->SetFootprintLibTable( m_footprintLibTable ); - - wxFileName emptyFileName; - FP_LIB_TABLE::SetProjectPathEnvVariable( emptyFileName ); + // Clear footprint library table for the new board. + FootprintLibs()->Clear(); wxFileName fn; + fn.AssignCwd(); fn.SetName( wxT( "noname" ) ); + + Prj().SetProjectFullName( fn.GetFullPath() ); + fn.SetExt( PcbFileExtension ); + GetBoard()->SetFileName( fn.GetFullPath() ); UpdateTitle(); ReCreateLayerBox(); @@ -182,33 +204,8 @@ void PCB_EDIT_FRAME::Files_io( wxCommandEvent& event ) } -bool PCB_EDIT_FRAME::LoadOnePcbFile( const wxString& aFileName, bool aAppend, - bool aForceFileDialog ) +bool AskBoardFileName( wxWindow* aParent, int* aCtl, wxString* aFileName ) { - if( GetScreen()->IsModify() && !aAppend ) - { - int response = YesNoCancelDialog( this, _( "The current board has been modified. Do " - "you wish to save the changes?" ), - wxEmptyString, - _( "Save and Load" ), _( "Load Without Saving" ) ); - - if( response == wxID_CANCEL ) - return false; - else if( response == wxID_YES ) - SavePcbFile( GetBoard()->GetFileName(), true ); - } - - if( aAppend ) - { - GetBoard()->SetFileName( wxEmptyString ); - OnModify(); - GetBoard()->m_Status_Pcb = 0; - } - - wxFileName fileName = aFileName; - - IO_MGR::PCB_FILE_T pluginType = IO_MGR::LEGACY; - // This is a subset of all PLUGINs which are trusted to be able to // load a BOARD. Order is subject to change as KICAD plugin matures. // User may occasionally use the wrong plugin to load a *.brd file, @@ -226,56 +223,114 @@ bool PCB_EDIT_FRAME::LoadOnePcbFile( const wxString& aFileName, bool aAppend, { PCadPcbFileWildcard, IO_MGR::PCAD }, }; - if( !fileName.IsOk() || !fileName.FileExists() || aForceFileDialog ) + wxFileName fileName( *aFileName ); + wxString fileFilters; + + for( unsigned i=0; i 0 ) + fileFilters += wxChar( '|' ); - for( unsigned i=0; i 0 ) - fileFilters += wxChar( '|' ); + fileFilters += wxGetTranslation( loaders[i].filter ); + } - fileFilters += wxGetTranslation( loaders[i].filter ); - } + wxString path; + wxString name; - if( aForceFileDialog && fileName.FileExists() ) - { - path = fileName.GetPath(); - name = fileName.GetFullName(); - } + if( fileName.FileExists() ) + { + path = fileName.GetPath(); + name = fileName.GetFullName(); + } + else + { + path = wxGetCwd(); + // leave name empty + } - wxFileDialog dlg( this, _( "Open Board File" ), path, name, fileFilters, - wxFD_OPEN | wxFD_FILE_MUST_EXIST ); - - if( dlg.ShowModal() == wxID_CANCEL ) - return false; - - fileName = dlg.GetPath(); + wxFileDialog dlg( aParent, _( "Open Board File" ), path, name, fileFilters, + wxFD_OPEN | wxFD_FILE_MUST_EXIST ); + if( dlg.ShowModal() != wxID_CANCEL ) + { int chosenFilter = dlg.GetFilterIndex(); - pluginType = loaders[chosenFilter].pluginType; + + // if Eagle, tell OpenProjectFiles() to use Eagle plugin. It's the only special + // case because of the duplicate use of the *.brd file extension. Other cases + // are clear because of unique file extensions. + *aCtl = chosenFilter == 2 ? KICTL_EAGLE_BRD : 0; + *aFileName = dlg.GetPath(); + + return true; } - else // if a filename is given, force IO_MGR::KICAD if the file ext is kicad_pcb - // for instance if the filename comes from file history - // or it is a backup file with ext = kicad_pcb-bak + else + return false; +} + + +bool PCB_EDIT_FRAME::OpenProjectFiles( const std::vector& aFileSet, int aCtl ) +{ + wxASSERT( aFileSet.size() == 1 ); + + bool doAppend = aCtl & KICTL_OPEN_APPEND; + wxFileName fileName( aFileSet[0] ); + + // Make filename absolute, to avoid issues when the filename is relative, + // for instance when stored in history list without path, and when building + // the config filename ( which should have a path ) + if( fileName.IsRelative() ) + fileName.MakeAbsolute(); + + if( GetScreen()->IsModify() && !doAppend ) { - wxString backup_ext = IO_MGR::GetFileExtension( IO_MGR::KICAD ) + - backupFileExtensionSuffix; - if( fileName.GetExt() == IO_MGR::GetFileExtension( IO_MGR::KICAD ) || - fileName.GetExt() == backup_ext ) - pluginType = IO_MGR::KICAD; + int response = YesNoCancelDialog( this, _( + "The current board has been modified. Do " + "you wish to save the changes?" ), + wxEmptyString, + _( "Save and Load" ), + _( "Load Without Saving" ) + ); + + if( response == wxID_CANCEL ) + return false; + else if( response == wxID_YES ) + SavePcbFile( GetBoard()->GetFileName(), true ); } + if( doAppend ) + { + GetBoard()->SetFileName( wxEmptyString ); + OnModify(); + GetBoard()->m_Status_Pcb = 0; + } + + // The KIWAY_PLAYER::OpenProjectFiles() API knows nothing about plugins, so + // determine how to load the BOARD here, with minor assistance from KICTL_EAGLE_BRD + // bit flag. + + IO_MGR::PCB_FILE_T pluginType; + + if( fileName.GetExt() == IO_MGR::GetFileExtension( IO_MGR::LEGACY ) ) + { + // both legacy and eagle share a common file extension. + pluginType = ( aCtl & KICTL_EAGLE_BRD ) ? IO_MGR::EAGLE : IO_MGR::LEGACY; + } + else if( fileName.GetExt() == IO_MGR::GetFileExtension( IO_MGR::LEGACY ) + backupSuffix ) + { + pluginType = IO_MGR::LEGACY; + } + else if( fileName.GetExt() == IO_MGR::GetFileExtension( IO_MGR::IO_MGR::PCAD ) ) + { + pluginType = IO_MGR::PCAD; + } + else + pluginType = IO_MGR::KICAD; + PLUGIN::RELEASER pi( IO_MGR::PluginFind( pluginType ) ); - if( !fileName.HasExt() ) - fileName.SetExt( pi->GetFileExtension() ); - - if( !aAppend ) + if( !doAppend ) { - if( !wxGetApp().LockFile( fileName.GetFullPath() ) ) + if( !Pgm().LockFile( fileName.GetFullPath() ) ) { DisplayError( this, _( "This file is already open." ) ); return false; @@ -287,7 +342,7 @@ bool PCB_EDIT_FRAME::LoadOnePcbFile( const wxString& aFileName, bool aAppend, GetBoard()->SetFileName( fileName.GetFullPath() ); - if( !aAppend ) + if( !doAppend ) { // Update the option toolbar m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill; @@ -325,7 +380,7 @@ bool PCB_EDIT_FRAME::LoadOnePcbFile( const wxString& aFileName, bool aAppend, #endif // load or append either: - loadedBoard = pi->Load( GetBoard()->GetFileName(), aAppend ? GetBoard() : NULL, &props ); + loadedBoard = pi->Load( GetBoard()->GetFileName(), doAppend ? GetBoard() : NULL, &props ); #if USE_INSTRUMENTATION unsigned stopTime = GetRunningMicroSecs(); @@ -336,7 +391,7 @@ bool PCB_EDIT_FRAME::LoadOnePcbFile( const wxString& aFileName, bool aAppend, // set its own name GetBoard()->SetFileName( fileName.GetFullPath() ); - if( !aAppend ) + if( !doAppend ) { if( pluginType == IO_MGR::LEGACY && loadedBoard->GetFileFormatVersionAtLoad() < LEGACY_BOARD_FILE_VERSION ) @@ -364,16 +419,19 @@ bool PCB_EDIT_FRAME::LoadOnePcbFile( const wxString& aFileName, bool aAppend, SetStatusText( wxEmptyString ); BestZoom(); + + // update the layer names in the listbox + ReCreateLayerBox( false ); } GetScreen()->ClrModify(); - // If append option: change the initial board name to -append.brd - if( aAppend ) + if( doAppend ) { + // change the initial board name to -append.brd wxString new_filename = GetBoard()->GetFileName().BeforeLast( '.' ); - if ( ! new_filename.EndsWith( wxT( "-append" ) ) ) + if( !new_filename.EndsWith( wxT( "-append" ) ) ) new_filename += wxT( "-append" ); new_filename += wxT( "." ) + PcbFileExtension; @@ -448,8 +506,11 @@ bool PCB_EDIT_FRAME::LoadOnePcbFile( const wxString& aFileName, bool aAppend, Zoom_Automatique( false ); // Compile ratsnest and displays net info - wxBusyCursor dummy; // Displays an Hourglass while building connectivity - Compile_Ratsnest( NULL, true ); + { + wxBusyCursor dummy; // Displays an Hourglass while building connectivity + Compile_Ratsnest( NULL, true ); + } + SetMsgPanel( GetBoard() ); // Refresh the 3D view, if any @@ -457,16 +518,24 @@ bool PCB_EDIT_FRAME::LoadOnePcbFile( const wxString& aFileName, bool aAppend, m_Draw3DFrame->NewDisplay(); #if 0 && defined(DEBUG) - // note this freezes up Pcbnew when run under the KiCad project - // manager. runs fine from command prompt. This is because the KiCad - // project manager redirects stdout of the child Pcbnew process to itself, - // but never reads from that pipe, and that in turn eventually blocks - // the Pcbnew program when the pipe it is writing to gets full. - // Output the board object tree to stdout, but please run from command prompt: GetBoard()->Show( 0, std::cout ); #endif + // from EDA_APPL which was first loaded BOARD only: + { + /* For an obscure reason the focus is lost after loading a board file + * when starting up the process. + * (seems due to the recreation of the layer manager after loading the file) + * Give focus to main window and Drawpanel + * must be done for these 2 windows (for an obscure reason ...) + * Linux specific + * This is more a workaround than a fix. + */ + SetFocus(); + GetCanvas()->SetFocus(); + } + return true; } @@ -528,13 +597,13 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool aCreateBackupF // when multiple wildcards are defined, we have to check it ourselves to prevent an // existing board file from silently being over written. if( pcbFileName.FileExists() - && !IsOK( this, wxString::Format( _( "The file <%s> already exists.\n\nDo you want " + && !IsOK( this, wxString::Format( _( "The file '%s' already exists.\n\nDo you want " "to overwrite it?" ), GetChars( pcbFileName.GetFullPath() ) )) ) return false; // Save the project specific footprint library table. - if( !m_footprintLibTable->IsEmpty( false ) ) + if( !FootprintLibs()->IsEmpty( false ) ) { wxFileName fn = pcbFileName; fn.ClearExt(); @@ -546,13 +615,13 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool aCreateBackupF { try { - m_footprintLibTable->Save( fn ); + FootprintLibs()->Save( fn ); } catch( IO_ERROR& ioe ) { DisplayError( this, wxString::Format( _( "An error occurred attempting to save the " - "footprint library table <%s>\n\n%s" ), + "footprint library table '%s'\n\n%s" ), GetChars( fn.GetFullPath() ), GetChars( ioe.errorText ) ) ); } @@ -579,7 +648,7 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool aCreateBackupF { // Get the backup file name backupFileName = pcbFileName; - backupFileName.SetExt( pcbFileName.GetExt() + backupFileExtensionSuffix ); + backupFileName.SetExt( pcbFileName.GetExt() + backupSuffix ); // If an old backup file exists, delete it. If an old board file exists, rename // it to the backup file name. @@ -656,7 +725,8 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool aCreateBackupF { // Delete auto save file on successful save. wxFileName autoSaveFileName = pcbFileName; - autoSaveFileName.SetName( autosaveFilePrefix + pcbFileName.GetName() ); + + autoSaveFileName.SetName( wxString( autosavePrefix ) + pcbFileName.GetName() ); if( autoSaveFileName.FileExists() ) wxRemoveFile( autoSaveFileName.GetFullPath() ); @@ -687,7 +757,7 @@ bool PCB_EDIT_FRAME::doAutoSave() // Auto save file name is the normal file name prepended with // autosaveFilePrefix string. - fn.SetName( autosaveFilePrefix + fn.GetName() ); + fn.SetName( wxString( autosavePrefix ) + fn.GetName() ); wxLogTrace( traceAutoSave, wxT( "Creating auto save file <" + fn.GetFullPath() ) + wxT( ">" ) ); diff --git a/pcbnew/footprint_wizard_frame.cpp b/pcbnew/footprint_wizard_frame.cpp index 23ee998473..a5d5a5a325 100644 --- a/pcbnew/footprint_wizard_frame.cpp +++ b/pcbnew/footprint_wizard_frame.cpp @@ -29,7 +29,7 @@ */ #include -#include +#include #include #include #include <3d_viewer.h> @@ -119,9 +119,9 @@ static wxAcceleratorEntry accels[] = #define FOOTPRINT_WIZARD_FRAME_NAME wxT( "FootprintWizard" ) -FOOTPRINT_WIZARD_FRAME::FOOTPRINT_WIZARD_FRAME( FOOTPRINT_EDIT_FRAME* parent, - wxSemaphore* semaphore, long style ) : - PCB_BASE_FRAME( parent, FOOTPRINT_WIZARD_FRAME_TYPE, +FOOTPRINT_WIZARD_FRAME::FOOTPRINT_WIZARD_FRAME( KIWAY* aKiway, FOOTPRINT_EDIT_FRAME* aParent, + wxSemaphore* semaphore, long style ) : + PCB_BASE_FRAME( aKiway, aParent, FOOTPRINT_WIZARD_FRAME_TYPE, _( "Footprint Wizard" ), wxDefaultPosition, wxDefaultSize, style, FOOTPRINT_WIZARD_FRAME_NAME ) { @@ -150,7 +150,7 @@ FOOTPRINT_WIZARD_FRAME::FOOTPRINT_WIZARD_FRAME( FOOTPRINT_EDIT_FRAME* parent, SetScreen( new PCB_SCREEN( GetPageSizeIU() ) ); GetScreen()->m_Center = true; // Center coordinate origins on screen. - LoadSettings(); + LoadSettings( config() ); SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y ); GetScreen()->SetGrid( ID_POPUP_GRID_LEVEL_1000 + m_LastGridSizeId ); @@ -429,18 +429,14 @@ void FOOTPRINT_WIZARD_FRAME::ClickOnPageList( wxCommandEvent& event ) #define PARAMLIST_WIDTH_KEY wxT( "Paramlist_width" ) -void FOOTPRINT_WIZARD_FRAME::LoadSettings() +void FOOTPRINT_WIZARD_FRAME::LoadSettings( wxConfigBase* aCfg ) { - wxConfig* cfg; + EDA_DRAW_FRAME::LoadSettings( aCfg ); - EDA_DRAW_FRAME::LoadSettings(); + wxConfigPathChanger cpc( aCfg, m_configPath ); - wxConfigPathChanger cpc( wxGetApp().GetSettings(), m_configPath ); - - cfg = wxGetApp().GetSettings(); - - cfg->Read( PARTLIST_WIDTH_KEY, &m_pageListWidth, 100 ); - cfg->Read( PARAMLIST_WIDTH_KEY, &m_parameterGridWidth, 200 ); + aCfg->Read( PARTLIST_WIDTH_KEY, &m_pageListWidth, 100 ); + aCfg->Read( PARAMLIST_WIDTH_KEY, &m_parameterGridWidth, 200 ); // Set parameters to a reasonable value. if( m_pageListWidth > m_FrameSize.x / 3 ) @@ -451,15 +447,13 @@ void FOOTPRINT_WIZARD_FRAME::LoadSettings() } -void FOOTPRINT_WIZARD_FRAME::SaveSettings() +void FOOTPRINT_WIZARD_FRAME::SaveSettings( wxConfigBase* aCfg ) { - wxConfig* cfg = wxGetApp().GetSettings();; + EDA_DRAW_FRAME::SaveSettings( aCfg ); - EDA_DRAW_FRAME::SaveSettings(); - - wxConfigPathChanger cpc( cfg, m_configPath ); - cfg->Write( PARTLIST_WIDTH_KEY, m_pageList->GetSize().x ); - cfg->Write( PARAMLIST_WIDTH_KEY, m_parameterGrid->GetSize().x ); + wxConfigPathChanger cpc( aCfg, m_configPath ); + aCfg->Write( PARTLIST_WIDTH_KEY, m_pageList->GetSize().x ); + aCfg->Write( PARAMLIST_WIDTH_KEY, m_parameterGrid->GetSize().x ); } @@ -591,7 +585,7 @@ void FOOTPRINT_WIZARD_FRAME::Show3D_Frame( wxCommandEvent& event ) return; } - m_Draw3DFrame = new EDA_3D_FRAME( this, wxEmptyString ); + m_Draw3DFrame = new EDA_3D_FRAME( &Kiway(), this, wxEmptyString ); Update3D_Frame( false ); m_Draw3DFrame->Show( true ); } diff --git a/pcbnew/footprint_wizard_frame.h b/pcbnew/footprint_wizard_frame.h index 653545d698..c44331a88c 100644 --- a/pcbnew/footprint_wizard_frame.h +++ b/pcbnew/footprint_wizard_frame.h @@ -63,9 +63,9 @@ protected: wxString m_wizardStatus; // < current wizard status public: - FOOTPRINT_WIZARD_FRAME( FOOTPRINT_EDIT_FRAME* parent, - wxSemaphore* semaphore = NULL, - long style = KICAD_DEFAULT_DRAWFRAME_STYLE ); + FOOTPRINT_WIZARD_FRAME( KIWAY* aKiway, + FOOTPRINT_EDIT_FRAME* parent, wxSemaphore* semaphore = NULL, + long style = KICAD_DEFAULT_DRAWFRAME_STYLE ); ~FOOTPRINT_WIZARD_FRAME(); @@ -140,23 +140,8 @@ private: void GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aHotKey = 0 ); - /** - * Function LoadSettings - * loads the library viewer frame specific configuration settings. - * - * Don't forget to call this base method from any derived classes or the - * settings will not get loaded. - */ - void LoadSettings(); - - /** - * Function SaveSettings - * save library viewer frame specific configuration settings. - * - * Don't forget to call this base method from any derived classes or the - * settings will not get saved. - */ - void SaveSettings(); + void LoadSettings( wxConfigBase* aCfg ); // override virtual + void SaveSettings( wxConfigBase* aCfg ); // override virtual /** diff --git a/pcbnew/import_dxf/dialog_dxf_import.cpp b/pcbnew/import_dxf/dialog_dxf_import.cpp index d3fe5e4d97..aaeeba403a 100644 --- a/pcbnew/import_dxf/dialog_dxf_import.cpp +++ b/pcbnew/import_dxf/dialog_dxf_import.cpp @@ -27,7 +27,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include +//#include +#include #include #include #include @@ -44,7 +45,7 @@ class DIALOG_DXF_IMPORT : public DIALOG_DXF_IMPORT_BASE { private: PCB_EDIT_FRAME * m_parent; - wxConfig* m_config; // Current config + wxConfigBase* m_config; // Current config static wxString m_dxfFilename; static int m_offsetSelection; @@ -59,7 +60,7 @@ private: // Virtual event handlers void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } void OnOKClick( wxCommandEvent& event ); - void OnBrowseDxfFiles( wxCommandEvent& event ); + void OnBrowseDxfFiles( wxCommandEvent& event ); }; // Static members of DIALOG_DXF_IMPORT, to remember @@ -73,7 +74,7 @@ DIALOG_DXF_IMPORT::DIALOG_DXF_IMPORT( PCB_EDIT_FRAME* aParent ) : DIALOG_DXF_IMPORT_BASE( aParent ) { m_parent = aParent; - m_config = wxGetApp().GetSettings(); + m_config = Kiface().KifaceSettings(); if( m_config ) { diff --git a/pcbnew/initpcb.cpp b/pcbnew/initpcb.cpp index 8b3b398995..80f6fc8135 100644 --- a/pcbnew/initpcb.cpp +++ b/pcbnew/initpcb.cpp @@ -16,11 +16,6 @@ #include -/** - * Function Clear_Pcb - * delete all and reinitialize the current board - * @param aQuery = true to prompt user for confirmation, false to initialize silently - */ bool PCB_EDIT_FRAME::Clear_Pcb( bool aQuery ) { if( GetBoard() == NULL ) @@ -40,11 +35,11 @@ bool PCB_EDIT_FRAME::Clear_Pcb( bool aQuery ) // Clear undo and redo lists because we want a full deletion GetScreen()->ClearUndoRedoList(); - /* Items visibility flags will be set becuse a new board will be created. - * Grid and ratsnest can be left to their previous state - */ + // Items visibility flags will be set becuse a new board will be created. + // Grid and ratsnest can be left to their previous state bool showGrid = IsElementVisible( GRID_VISIBLE ); bool showRats = IsElementVisible( RATSNEST_VISIBLE ); + // delete the old BOARD and create a new BOARD so that the default // layer names are put into the BOARD. SetBoard( new BOARD() ); @@ -84,7 +79,6 @@ bool PCB_EDIT_FRAME::Clear_Pcb( bool aQuery ) } - bool FOOTPRINT_EDIT_FRAME::Clear_Pcb( bool aQuery ) { if( GetBoard() == NULL ) diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index 99211a7e4d..aca016677e 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -1340,14 +1340,14 @@ void PCB_IO::format( TRACK* aTrack, int aNestLevel ) const LAYER_NUM layer1, layer2; SEGVIA* via = (SEGVIA*) aTrack; - BOARD* board = (BOARD*) via->GetParent(); + BOARD* board = (BOARD*) via->GetParent(); wxCHECK_RET( board != 0, wxT( "Via " ) + via->GetSelectMenuText() + wxT( " has no parent." ) ); m_out->Print( aNestLevel, "(via" ); - via->ReturnLayerPair( &layer1, &layer2 ); + via->LayerPair( &layer1, &layer2 ); switch( aTrack->GetShape() ) { diff --git a/pcbnew/librairi.cpp b/pcbnew/librairi.cpp index 7fd65174f3..1b65c89b97 100644 --- a/pcbnew/librairi.cpp +++ b/pcbnew/librairi.cpp @@ -29,7 +29,8 @@ #include #include -#include +#include +#include #include #include #include @@ -96,8 +97,9 @@ MODULE* FOOTPRINT_EDIT_FRAME::Import_Module() // Some day it might be useful save the last library type selected along with the path. static int lastFilterIndex = 0; - wxString lastOpenedPathForLoading; - wxConfig* config = wxGetApp().GetSettings(); + + wxString lastOpenedPathForLoading; + wxConfigBase* config = Kiface().KifaceSettings(); if( config ) config->Read( EXPORT_IMPORT_LASTPATH_KEY, &lastOpenedPathForLoading ); @@ -279,10 +281,10 @@ MODULE* FOOTPRINT_EDIT_FRAME::Import_Module() void FOOTPRINT_EDIT_FRAME::Export_Module( MODULE* aModule ) { - wxFileName fn; - wxConfig* config = wxGetApp().GetSettings(); + wxFileName fn; + wxConfigBase* config = Kiface().KifaceSettings(); - if( aModule == NULL ) + if( !aModule ) return; fn.SetName( aModule->GetFPID().GetFootprintName() ); @@ -366,8 +368,8 @@ bool FOOTPRINT_EDIT_FRAME::SaveCurrentModule( const wxString* aLibPath ) wxString FOOTPRINT_EDIT_FRAME::CreateNewLibrary() { - wxFileName fn; - wxConfig* config = wxGetApp().GetSettings(); + wxFileName fn; + wxConfigBase* config = Kiface().KifaceSettings(); if( config ) { @@ -467,7 +469,7 @@ bool FOOTPRINT_EDIT_FRAME::DeleteModuleFromCurrentLibrary() { wxString nickname = getLibNickName(); - if( !m_footprintLibTable->IsFootprintLibWritable( nickname ) ) + if( !FootprintLibs()->IsFootprintLibWritable( nickname ) ) { wxString msg = wxString::Format( _( "Library '%s' is read only" ), @@ -479,7 +481,7 @@ bool FOOTPRINT_EDIT_FRAME::DeleteModuleFromCurrentLibrary() } wxString fpid_txt = PCB_BASE_FRAME::SelectFootprint( this, nickname, - wxEmptyString, wxEmptyString, m_footprintLibTable ); + wxEmptyString, wxEmptyString, FootprintLibs() ); if( !fpid_txt ) return false; @@ -495,7 +497,7 @@ bool FOOTPRINT_EDIT_FRAME::DeleteModuleFromCurrentLibrary() try { - m_footprintLibTable->FootprintDelete( nickname, fpname ); + FootprintLibs()->FootprintDelete( nickname, fpname ); } catch( IO_ERROR ioe ) { @@ -519,14 +521,17 @@ void PCB_EDIT_FRAME::ArchiveModulesOnBoard( bool aNewModulesOnly ) return; } - wxString last_nickname = wxGetApp().ReturnLastVisitedLibraryPath(); + PROJECT& prj = Prj(); + SEARCH_STACK& search = Kiface().KifaceSearch(); + + wxString last_nickname = prj.RPath(PROJECT::PCB_LIB).LastVisitedPath( search ); wxString nickname = SelectLibrary( last_nickname ); if( !nickname ) return; - wxGetApp().SaveLastVisitedLibraryPath( nickname ); + prj.RPath(PROJECT::PCB_LIB).SaveLastVisitedPath( nickname ); if( !aNewModulesOnly ) { @@ -543,19 +548,19 @@ void PCB_EDIT_FRAME::ArchiveModulesOnBoard( bool aNewModulesOnly ) // Delete old library if we're replacing it entirely. if( !aNewModulesOnly ) { - m_footprintLibTable->FootprintLibDelete( nickname ); - m_footprintLibTable->FootprintLibCreate( nickname ); + FootprintLibs()->FootprintLibDelete( nickname ); + FootprintLibs()->FootprintLibCreate( nickname ); for( MODULE* m = GetBoard()->m_Modules; m; m = m->Next() ) { - m_footprintLibTable->FootprintSave( nickname, m, true ); + FootprintLibs()->FootprintSave( nickname, m, true ); } } else { for( MODULE* m = GetBoard()->m_Modules; m; m = m->Next() ) { - m_footprintLibTable->FootprintSave( nickname, m, false ); + FootprintLibs()->FootprintSave( nickname, m, false ); // Check for request to stop backup (ESCAPE key actuated) if( m_canvas->GetAbortRequest() ) @@ -601,7 +606,7 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibrary, { wxString msg = wxString::Format( _("Error:\none of invalid chars '%s' found\nin '%s'" ), - MODULE::ReturnStringLibNameInvalidChars( true ), + MODULE::StringLibNameInvalidChars( true ), GetChars( footprintName ) ); DisplayError( NULL, msg ); @@ -622,7 +627,7 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibrary, try { - MODULE* m = m_footprintLibTable->FootprintLoad( aLibrary, footprintName ); + MODULE* m = FootprintLibs()->FootprintLoad( aLibrary, footprintName ); if( m ) { @@ -648,7 +653,7 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibrary, // this always overwrites any existing footprint, but should yell on its // own if the library or footprint is not writable. - m_footprintLibTable->FootprintSave( aLibrary, aModule ); + FootprintLibs()->FootprintSave( aLibrary, aModule ); } catch( IO_ERROR ioe ) { @@ -733,15 +738,17 @@ wxString PCB_BASE_FRAME::SelectLibrary( const wxString& aNicknameExisting ) headers.Add( _( "Nickname" ) ); headers.Add( _( "Description" ) ); + FP_LIB_TABLE* fptbl = FootprintLibs(); + std::vector< wxArrayString > itemsToDisplay; - std::vector< wxString > nicknames = m_footprintLibTable->GetLogicalLibs(); + std::vector< wxString > nicknames = fptbl->GetLogicalLibs(); for( unsigned i = 0; i < nicknames.size(); i++ ) { wxArrayString item; item.Add( nicknames[i] ); - item.Add( m_footprintLibTable->GetDescription( nicknames[i] ) ); + item.Add( fptbl->GetDescription( nicknames[i] ) ); itemsToDisplay.push_back( item ); } diff --git a/pcbnew/loadcmp.cpp b/pcbnew/loadcmp.cpp index 059d1f66a4..990198953a 100644 --- a/pcbnew/loadcmp.cpp +++ b/pcbnew/loadcmp.cpp @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include #include @@ -119,13 +119,12 @@ wxString PCB_BASE_FRAME::SelectFootprintFromLibBrowser() wxSemaphore semaphore( 0, 1 ); // Close the current Lib browser, if opened, and open a new one, in "modal" mode: - FOOTPRINT_VIEWER_FRAME * viewer = FOOTPRINT_VIEWER_FRAME::GetActiveFootprintViewer(); + FOOTPRINT_VIEWER_FRAME* viewer = FOOTPRINT_VIEWER_FRAME::GetActiveFootprintViewer( this ); if( viewer ) viewer->Destroy(); - viewer = new FOOTPRINT_VIEWER_FRAME( this, m_footprintLibTable, &semaphore, - KICAD_DEFAULT_DRAWFRAME_STYLE | wxFRAME_FLOAT_ON_PARENT ); + viewer = new FOOTPRINT_VIEWER_FRAME( &Kiway(), this, &semaphore ); // Show the library viewer frame until it is closed while( semaphore.TryWait() == wxSEMA_BUSY ) // Wait for viewer closing event @@ -318,28 +317,29 @@ MODULE* PCB_BASE_FRAME::LoadFootprint( const FPID& aFootprintId ) MODULE* PCB_BASE_FRAME::loadFootprint( const FPID& aFootprintId ) throw( IO_ERROR, PARSE_ERROR ) { - wxCHECK_MSG( m_footprintLibTable != NULL, NULL, - wxT( "Cannot look up FPID in NULL FP_LIB_TABLE." ) ); + FP_LIB_TABLE* fptbl = FootprintLibs(); + + wxCHECK_MSG( fptbl, NULL, wxT( "Cannot look up FPID in NULL FP_LIB_TABLE." ) ); wxString nickname = aFootprintId.GetLibNickname(); wxString fpname = aFootprintId.GetFootprintName(); if( nickname.size() ) { - return m_footprintLibTable->FootprintLoad( nickname, fpname ); + return fptbl->FootprintLoad( nickname, fpname ); } // user did not enter a nickname, just a footprint name, help him out a little: else { - std::vector nicks = m_footprintLibTable->GetLogicalLibs(); + std::vector nicks = fptbl->GetLogicalLibs(); // Search each library going through libraries alphabetically. for( unsigned i = 0; iFootprintLoad( nicks[i], fpname ); + MODULE* ret = fptbl->FootprintLoad( nicks[i], fpname ); if( ret ) return ret; } diff --git a/pcbnew/menubar_pcbframe.cpp b/pcbnew/menubar_pcbframe.cpp index 27dc4e32be..307c895dcd 100644 --- a/pcbnew/menubar_pcbframe.cpp +++ b/pcbnew/menubar_pcbframe.cpp @@ -29,7 +29,8 @@ * Pcbnew editor menu bar */ #include -#include +#include +#include #include #include #include @@ -46,6 +47,8 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() wxString text; wxMenuBar* menuBar = GetMenuBar(); + wxFileHistory& fhist = Kiface().GetFileHistory(); + if( ! menuBar ) menuBar = new wxMenuBar(); @@ -79,17 +82,18 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() // Add this menu to list menu managed by m_fileHistory // (the file history will be updated when adding/removing files in history if( openRecentMenu ) - wxGetApp().GetFileHistory().RemoveMenu( openRecentMenu ); + fhist.RemoveMenu( openRecentMenu ); openRecentMenu = new wxMenu(); - wxGetApp().GetFileHistory().UseMenu( openRecentMenu ); - wxGetApp().GetFileHistory().AddFilesToMenu(); + + fhist.UseMenu( openRecentMenu ); + fhist.AddFilesToMenu(); + AddMenuItem( filesMenu, openRecentMenu, -1, _( "Open &Recent" ), _( "Open a recent opened board" ), KiBitmap( open_project_xpm ) ); - // Pcbnew Board AddMenuItem( filesMenu, ID_APPEND_FILE, _( "&Append Board" ), @@ -530,7 +534,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() // Language submenu - wxGetApp().AddMenuLanguageList( configmenu ); + Pgm().AddMenuLanguageList( configmenu ); // Hotkey submenu AddHotkeyConfigMenu( configmenu ); diff --git a/pcbnew/modedit.cpp b/pcbnew/modedit.cpp index e4d13c9952..2729504ab1 100644 --- a/pcbnew/modedit.cpp +++ b/pcbnew/modedit.cpp @@ -26,11 +26,11 @@ */ #include -#include +#include #include #include #include -#include +#include #include #include <3d_viewer.h> #include @@ -262,11 +262,16 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) case ID_OPEN_MODULE_VIEWER: { - FOOTPRINT_VIEWER_FRAME * viewer = FOOTPRINT_VIEWER_FRAME::GetActiveFootprintViewer(); + // Make a _project specific_ PCB_EDIT_FRAME be the start of the search in + // FOOTPRINT_VIEWER_FRAME::GetActiveFootprintViewer(); - if( viewer == NULL ) + PCB_EDIT_FRAME* top_project = dynamic_cast( GetParent() ); + wxASSERT( top_project ); // dynamic_cast returns NULL if class mismatch. + + FOOTPRINT_VIEWER_FRAME* viewer = FOOTPRINT_VIEWER_FRAME::GetActiveFootprintViewer( top_project ); + if( !viewer ) { - viewer = new FOOTPRINT_VIEWER_FRAME( this, m_footprintLibTable, NULL ); + viewer = (FOOTPRINT_VIEWER_FRAME*) Kiface().CreateWindow( this, MODULE_VIEWER_FRAME_TYPE, &Kiway() ); viewer->Show( true ); viewer->Zoom_Automatique( false ); } @@ -290,36 +295,38 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) break; case ID_MODEDIT_NEW_MODULE: - { - Clear_Pcb( true ); - GetScreen()->ClearUndoRedoList(); - SetCurItem( NULL ); - 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; case ID_MODEDIT_NEW_MODULE_FROM_WIZARD: { wxSemaphore semaphore( 0, 1 ); - FOOTPRINT_WIZARD_FRAME *wizard = new FOOTPRINT_WIZARD_FRAME( this, &semaphore, - KICAD_DEFAULT_DRAWFRAME_STYLE | wxFRAME_FLOAT_ON_PARENT ); + + FOOTPRINT_WIZARD_FRAME* wizard = new FOOTPRINT_WIZARD_FRAME( &Kiway(), this, &semaphore, + KICAD_DEFAULT_DRAWFRAME_STYLE | wxFRAME_FLOAT_ON_PARENT ); + wizard->Show( true ); wizard->Zoom_Automatique( false ); @@ -492,7 +499,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) Clear_Pcb( true ); SetCrossHairPosition( wxPoint( 0, 0 ) ); - LoadModuleFromLibrary( getLibNickName(), m_footprintLibTable, true ); + LoadModuleFromLibrary( getLibNickName(), FootprintLibs(), true ); redraw = true; if( GetBoard()->m_Modules ) diff --git a/pcbnew/module_editor_frame.h b/pcbnew/module_editor_frame.h index 5cb6ea1166..dbf0bcc8c7 100644 --- a/pcbnew/module_editor_frame.h +++ b/pcbnew/module_editor_frame.h @@ -35,11 +35,14 @@ class FP_LIB_TABLE; +namespace PCB { struct IFACE; } // A KIFACE_I coded in pcbnew.c + class FOOTPRINT_EDIT_FRAME : public PCB_BASE_FRAME { + friend struct PCB::IFACE; + public: - FOOTPRINT_EDIT_FRAME( PCB_EDIT_FRAME* aParent, FP_LIB_TABLE* aTable ); ~FOOTPRINT_EDIT_FRAME(); @@ -52,10 +55,14 @@ public: /** * Function GetActiveFootprintEditor (static) + * + * @param aTopOfProject is a PCB_EDIT_FRAME* window which anchors the search in + * a project specific way. + * * @return a reference to the current opened Footprint editor * or NULL if no Footprint editor currently opened */ - static FOOTPRINT_EDIT_FRAME* GetActiveFootprintEditor(); + static FOOTPRINT_EDIT_FRAME* GetActiveFootprintEditor( const wxWindow* aTopOfProject ); BOARD_DESIGN_SETTINGS& GetDesignSettings() const; // overload PCB_BASE_FRAME, get parent's void SetDesignSettings( const BOARD_DESIGN_SETTINGS& aSettings ); // overload @@ -195,7 +202,7 @@ public: bool Clear_Pcb( bool aQuery ); /* handlers for block commands */ - virtual int ReturnBlockCommand( int key ); + virtual int BlockCommand( int key ); /** * Function HandleBlockPlace @@ -406,6 +413,10 @@ public: DECLARE_EVENT_TABLE() protected: + + /// protected so only friend PCB::IFACE::CreateWindow() can act as sole factory. + FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, PCB_EDIT_FRAME* aParent ); + static BOARD* s_Pcb; ///< retain board across invocations of module editor /** @@ -433,7 +444,7 @@ protected: /// The library nickName is a short string, for now the same as the library path /// but without path and without extension. After library table support it becomes /// a lookup key. - const wxString& getLibNickName() const; + const wxString getLibNickName() const; void setLibNickName( const wxString& aNickname ); diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index 02b2f52958..bdbaf7d971 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -30,7 +30,9 @@ */ #include -#include +#include +//#include +#include #include #include #include @@ -150,8 +152,8 @@ END_EVENT_TABLE() #define FOOTPRINT_EDIT_FRAME_NAME wxT( "ModEditFrame" ) -FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( PCB_EDIT_FRAME* aParent, FP_LIB_TABLE* aTable ) : - PCB_BASE_FRAME( aParent, MODULE_EDITOR_FRAME_TYPE, wxEmptyString, +FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, PCB_EDIT_FRAME* aParent ) : + PCB_BASE_FRAME( aKiway, aParent, MODULE_EDITOR_FRAME_TYPE, wxEmptyString, wxDefaultPosition, wxDefaultSize, KICAD_DEFAULT_DRAWFRAME_STYLE, GetFootprintEditorFrameName() ) { @@ -160,7 +162,6 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( PCB_EDIT_FRAME* aParent, FP_LIB_TABL m_showAxis = true; // true to show X and Y axis on screen m_showGridAxis = true; // show the grid origin axis m_HotkeysZoomAndGridList = g_Module_Editor_Hokeys_Descr; - m_footprintLibTable = aTable; // Give an icon wxIcon icon; @@ -186,7 +187,7 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( PCB_EDIT_FRAME* aParent, FP_LIB_TABL SetScreen( s_screenModule ); GetScreen()->SetCurItem( NULL ); - LoadSettings(); + LoadSettings( config() ); GetBoard()->SetVisibleAlls(); @@ -256,15 +257,15 @@ FOOTPRINT_EDIT_FRAME::~FOOTPRINT_EDIT_FRAME() } -const wxString& FOOTPRINT_EDIT_FRAME::getLibNickName() const +const wxString FOOTPRINT_EDIT_FRAME::getLibNickName() const { - return wxGetApp().GetModuleLibraryNickname(); + return Prj().GetModuleLibraryNickname(); } void FOOTPRINT_EDIT_FRAME::setLibNickName( const wxString& aNickname ) { - wxGetApp().SetModuleLibraryNickname( aNickname ); + Prj().SetModuleLibraryNickname( aNickname ); } @@ -274,7 +275,7 @@ wxString FOOTPRINT_EDIT_FRAME::getLibPath() { const wxString& nickname = getLibNickName(); - const FP_LIB_TABLE::ROW* row = GetFootprintLibraryTable()->FindRow( nickname ); + const FP_LIB_TABLE::ROW* row = FootprintLibs()->FindRow( nickname ); return row->GetFullURI( true ); } @@ -294,9 +295,13 @@ const wxChar* FOOTPRINT_EDIT_FRAME::GetFootprintEditorFrameName() /* return a reference to the current opened Footprint editor * or NULL if no Footprint editor currently opened */ -FOOTPRINT_EDIT_FRAME* FOOTPRINT_EDIT_FRAME::GetActiveFootprintEditor() +FOOTPRINT_EDIT_FRAME* FOOTPRINT_EDIT_FRAME::GetActiveFootprintEditor( const wxWindow* aParent ) { - return (FOOTPRINT_EDIT_FRAME*) wxWindow::FindWindowByName( GetFootprintEditorFrameName() ); + // top_of_project! + wxASSERT( dynamic_cast( aParent ) ); + + wxWindow* ret = wxWindow::FindWindowByName( GetFootprintEditorFrameName(), aParent ); + return (FOOTPRINT_EDIT_FRAME*) ret; } @@ -484,7 +489,9 @@ void FOOTPRINT_EDIT_FRAME::OnUpdateReplaceModuleInBoard( wxUpdateUIEvent& aEvent void FOOTPRINT_EDIT_FRAME::OnUpdateSelectCurrentLib( wxUpdateUIEvent& aEvent ) { - aEvent.Enable( m_footprintLibTable && !m_footprintLibTable->IsEmpty() ); + FP_LIB_TABLE* fptbl = FootprintLibs(); + + aEvent.Enable( fptbl && !fptbl->IsEmpty() ); } @@ -506,7 +513,7 @@ void FOOTPRINT_EDIT_FRAME::Show3D_Frame( wxCommandEvent& event ) return; } - m_Draw3DFrame = new EDA_3D_FRAME( this, _( "3D Viewer" ) ); + m_Draw3DFrame = new EDA_3D_FRAME( &Kiway(), this, _( "3D Viewer" ) ); m_Draw3DFrame->Show( true ); } @@ -622,7 +629,7 @@ void FOOTPRINT_EDIT_FRAME::updateTitle() { try { - bool writable = m_footprintLibTable->IsFootprintLibWritable( nickname ); + bool writable = FootprintLibs()->IsFootprintLibWritable( nickname ); // no exception was thrown, this means libPath is valid, but it may be read only. title = _( "Module Editor (active library: " ) + nickname + wxT( ")" ); diff --git a/pcbnew/modview_frame.cpp b/pcbnew/modview_frame.cpp index 99677a34ed..8375336b75 100644 --- a/pcbnew/modview_frame.cpp +++ b/pcbnew/modview_frame.cpp @@ -28,7 +28,7 @@ */ #include -#include +#include #include #include #include @@ -118,17 +118,16 @@ static wxAcceleratorEntry accels[] = #define FOOTPRINT_VIEWER_FRAME_NAME wxT( "ModViewFrame" ) -FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( PCB_BASE_FRAME* aParent, - FP_LIB_TABLE* aTable, - wxSemaphore* aSemaphore, - long aStyle ) : - PCB_BASE_FRAME( aParent, MODULE_VIEWER_FRAME_TYPE, _( "Footprint Library Browser" ), - wxDefaultPosition, wxDefaultSize, aStyle, GetFootprintViewerFrameName() ) +FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent, wxSemaphore* aSemaphore ) : + PCB_BASE_FRAME( aKiway, aParent, MODULE_VIEWER_FRAME_TYPE, _( "Footprint Library Browser" ), + wxDefaultPosition, wxDefaultSize, + !aSemaphore ? + KICAD_DEFAULT_DRAWFRAME_STYLE : + KICAD_DEFAULT_DRAWFRAME_STYLE | wxFRAME_FLOAT_ON_PARENT, + GetFootprintViewerFrameName() ) { wxAcceleratorTable table( DIM( accels ), accels ); - m_footprintLibTable = aTable; - m_FrameName = GetFootprintViewerFrameName(); m_configPath = wxT( "FootprintViewer" ); m_showAxis = true; // true to draw axis. @@ -159,8 +158,7 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( PCB_BASE_FRAME* aParent, SetScreen( new PCB_SCREEN( GetPageSizeIU() ) ); GetScreen()->m_Center = true; // Center coordinate origins on screen. - LoadSettings(); - + LoadSettings( config() ); SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y ); @@ -273,10 +271,13 @@ const wxChar* FOOTPRINT_VIEWER_FRAME::GetFootprintViewerFrameName() } -FOOTPRINT_VIEWER_FRAME* FOOTPRINT_VIEWER_FRAME::GetActiveFootprintViewer() +FOOTPRINT_VIEWER_FRAME* FOOTPRINT_VIEWER_FRAME::GetActiveFootprintViewer( const wxWindow* aParent ) { - return (FOOTPRINT_VIEWER_FRAME*) - wxWindow::FindWindowByName( GetFootprintViewerFrameName() ); + // top_of_project! + wxASSERT( dynamic_cast( aParent ) ); + + return (FOOTPRINT_VIEWER_FRAME*) wxWindow::FindWindowByName( + GetFootprintViewerFrameName(), aParent ); } @@ -314,7 +315,7 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList() { m_libList->Clear(); - std::vector< wxString > nicknames = m_footprintLibTable->GetLogicalLibs(); + std::vector< wxString > nicknames = FootprintLibs()->GetLogicalLibs(); for( unsigned ii = 0; ii < nicknames.size(); ii++ ) m_libList->Append( nicknames[ii] ); @@ -353,7 +354,7 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList() FOOTPRINT_LIST fp_info_list; - fp_info_list.ReadFootprintFiles( m_footprintLibTable, &m_libraryName ); + fp_info_list.ReadFootprintFiles( FootprintLibs(), &m_libraryName ); if( fp_info_list.GetErrorCount() ) { @@ -468,29 +469,15 @@ void FOOTPRINT_VIEWER_FRAME::ExportSelectedFootprint( wxCommandEvent& event ) } -void FOOTPRINT_VIEWER_FRAME::LoadSettings( ) +void FOOTPRINT_VIEWER_FRAME::LoadSettings( wxConfigBase* aCfg ) { - EDA_DRAW_FRAME::LoadSettings(); - -/* - wxConfigPathChanger cpc( wxGetApp().GetSettings(), m_configPath ); - - // wxConfig* cfg = - wxGetApp().GetSettings(); -*/ + EDA_DRAW_FRAME::LoadSettings( aCfg ); } -void FOOTPRINT_VIEWER_FRAME::SaveSettings() +void FOOTPRINT_VIEWER_FRAME::SaveSettings( wxConfigBase* aCfg ) { - EDA_DRAW_FRAME::SaveSettings(); - -/* - wxConfigPathChanger cpc( wxGetApp().GetSettings(), m_configPath ); - - // wxConfig* cfg = - wxGetApp().GetSettings(); -*/ + EDA_DRAW_FRAME::SaveSettings( aCfg ); } @@ -505,7 +492,7 @@ void FOOTPRINT_VIEWER_FRAME::OnActivate( wxActivateEvent& event ) m_selectedFootprintName.Empty(); // Ensure we have the right library list: - std::vector< wxString > libNicknames = m_footprintLibTable->GetLogicalLibs(); + std::vector< wxString > libNicknames = FootprintLibs()->GetLogicalLibs(); if( libNicknames.size() == m_libList->GetCount() ) { @@ -635,7 +622,7 @@ void FOOTPRINT_VIEWER_FRAME::Show3D_Frame( wxCommandEvent& event ) return; } - m_Draw3DFrame = new EDA_3D_FRAME( this, wxEmptyString ); + m_Draw3DFrame = new EDA_3D_FRAME( &Kiway(), this, wxEmptyString ); Update3D_Frame( false ); m_Draw3DFrame->Show( true ); } @@ -741,7 +728,7 @@ void FOOTPRINT_VIEWER_FRAME::SelectCurrentFootprint( wxCommandEvent& event ) PCB_EDIT_FRAME* parent = (PCB_EDIT_FRAME*) GetParent(); wxString libname = m_libraryName + wxT( "." ) + LegacyFootprintLibPathExtension; MODULE* oldmodule = GetBoard()->m_Modules; - MODULE* module = LoadModuleFromLibrary( libname, parent->GetFootprintLibraryTable(), + MODULE* module = LoadModuleFromLibrary( libname, parent->FootprintLibs(), false ); if( module ) @@ -802,7 +789,7 @@ void FOOTPRINT_VIEWER_FRAME::SelectAndViewFootprint( int aMode ) // Delete the current footprint GetBoard()->m_Modules.DeleteAll(); - MODULE* footprint = m_footprintLibTable->FootprintLoad( m_libraryName, m_footprintName ); + MODULE* footprint = FootprintLibs()->FootprintLoad( m_libraryName, m_footprintName ); if( footprint ) GetBoard()->Add( footprint, ADD_APPEND ); diff --git a/pcbnew/modview_frame.h b/pcbnew/modview_frame.h index fd8d017df4..a120ef0177 100644 --- a/pcbnew/modview_frame.h +++ b/pcbnew/modview_frame.h @@ -37,12 +37,15 @@ class wxListBox; class wxSemaphore; class FP_LIB_TABLE; +namespace PCB { struct IFACE; } /** * Component library viewer main window. */ class FOOTPRINT_VIEWER_FRAME : public PCB_BASE_FRAME { + friend struct PCB::IFACE; + private: wxListBox* m_libList; // The list of libs names wxListBox* m_footprintList; // The list of footprint names @@ -58,9 +61,7 @@ protected: // the selected footprint is here public: - FOOTPRINT_VIEWER_FRAME( PCB_BASE_FRAME* aParent, FP_LIB_TABLE* aTable, - wxSemaphore* aSemaphore = NULL, - long aStyle = KICAD_DEFAULT_DRAWFRAME_STYLE ); + FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent, wxSemaphore* aSemaphore = NULL ); ~FOOTPRINT_VIEWER_FRAME(); @@ -76,10 +77,10 @@ public: * @return a reference to the current opened Footprint viewer * or NULL if no Footprint viewer currently opened */ - static FOOTPRINT_VIEWER_FRAME* GetActiveFootprintViewer(); + static FOOTPRINT_VIEWER_FRAME* GetActiveFootprintViewer( const wxWindow* aParent ); wxString& GetSelectedFootprint( void ) const { return m_selectedFootprintName; } - const wxString GetSelectedLibraryFullName( void ); + const wxString GetSelectedLibraryFullName(); /** * Function GetSelectedLibrary @@ -87,7 +88,7 @@ public: */ const wxString& GetSelectedLibrary() { return m_libraryName; } - virtual EDA_COLOR_T GetGridColor( void ) const; + virtual EDA_COLOR_T GetGridColor() const; /** * Function ReCreateLibraryList @@ -128,23 +129,8 @@ private: void GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aHotKey = 0 ); - /** - * Function LoadSettings - * loads the library viewer frame specific configuration settings. - * - * Don't forget to call this base method from any derived classes or the - * settings will not get loaded. - */ - void LoadSettings(); - - /** - * Function SaveSettings - * save library viewer frame specific configuration settings. - * - * Don't forget to call this base method from any derived classes or the - * settings will not get saved. - */ - void SaveSettings(); + void LoadSettings( wxConfigBase* aCfg ); // override virtual + void SaveSettings( wxConfigBase* aCfg ); // override virtual wxString& GetFootprintName( void ) const { return m_footprintName; } diff --git a/pcbnew/muonde.cpp b/pcbnew/muonde.cpp index bd0d6c191a..f943b13c42 100644 --- a/pcbnew/muonde.cpp +++ b/pcbnew/muonde.cpp @@ -198,14 +198,14 @@ MODULE* PCB_EDIT_FRAME::Genere_Self( wxDC* DC ) Mself.lng = min_len; // Enter the desired length. - msg = ReturnStringFromValue( g_UserUnit, Mself.lng ); + msg = StringFromValue( g_UserUnit, Mself.lng ); wxTextEntryDialog dlg( this, _( "Length:" ), _( "Length" ), msg ); if( dlg.ShowModal() != wxID_OK ) return NULL; // canceled by user msg = dlg.GetValue(); - Mself.lng = ReturnValueFromString( g_UserUnit, msg ); + Mself.lng = ValueFromString( g_UserUnit, msg ); // Control values (ii = minimum length) if( Mself.lng < min_len ) @@ -614,7 +614,7 @@ MODULE* PCB_EDIT_FRAME::Create_MuWaveComponent( int shape_type ) break; } - wxString value = ReturnStringFromValue( g_UserUnit, gap_size ); + wxString value = StringFromValue( g_UserUnit, gap_size ); wxTextEntryDialog dlg( this, msg, _( "Create microwave module" ), value ); if( dlg.ShowModal() != wxID_OK ) @@ -624,7 +624,7 @@ MODULE* PCB_EDIT_FRAME::Create_MuWaveComponent( int shape_type ) } value = dlg.GetValue(); - gap_size = ReturnValueFromString( g_UserUnit, value ); + gap_size = ValueFromString( g_UserUnit, value ); bool abort = false; @@ -1094,14 +1094,14 @@ void PCB_EDIT_FRAME::Edit_Gap( wxDC* DC, MODULE* aModule ) gap_size = next_pad->GetPos0().x - pad->GetPos0().x - pad->GetSize().x; // Entrer the desired length of the gap. - msg = ReturnStringFromValue( g_UserUnit, gap_size ); + msg = StringFromValue( g_UserUnit, gap_size ); wxTextEntryDialog dlg( this, _( "Gap:" ), _( "Create Microwave Gap" ), msg ); if( dlg.ShowModal() != wxID_OK ) return; // cancelled by user msg = dlg.GetValue(); - gap_size = ReturnValueFromString( g_UserUnit, msg ); + gap_size = ValueFromString( g_UserUnit, msg ); // Updating sizes of pads forming the gap. int tw = GetBoard()->GetCurrentTrackWidth(); diff --git a/pcbnew/netlist.cpp b/pcbnew/netlist.cpp index 18d60f8cfd..258bea0c8f 100644 --- a/pcbnew/netlist.cpp +++ b/pcbnew/netlist.cpp @@ -28,7 +28,7 @@ */ #include -#include +#include #include #include #include @@ -172,7 +172,7 @@ void PCB_EDIT_FRAME::loadFootprints( NETLIST& aNetlist, REPORTER* aReporter ) MODULE* module = 0; MODULE* fpOnBoard; - if( aNetlist.IsEmpty() || m_footprintLibTable->IsEmpty() ) + if( aNetlist.IsEmpty() || FootprintLibs()->IsEmpty() ) return; aNetlist.SortByFPID(); diff --git a/pcbnew/onleftclick.cpp b/pcbnew/onleftclick.cpp index 00b313d784..78390e52ba 100644 --- a/pcbnew/onleftclick.cpp +++ b/pcbnew/onleftclick.cpp @@ -354,8 +354,9 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition ) if( (DrawStruct == NULL) || (DrawStruct->GetFlags() == 0) ) { m_canvas->MoveCursorToCrossHair(); - DrawStruct = (BOARD_ITEM*) LoadModuleFromLibrary( wxEmptyString, m_footprintLibTable, - true, aDC ); + DrawStruct = (BOARD_ITEM*) LoadModuleFromLibrary( + wxEmptyString, FootprintLibs(), true, aDC ); + SetCurItem( DrawStruct ); if( DrawStruct ) diff --git a/pcbnew/onrightclick.cpp b/pcbnew/onrightclick.cpp index 37d53b3795..7f2a3d51fb 100644 --- a/pcbnew/onrightclick.cpp +++ b/pcbnew/onrightclick.cpp @@ -971,7 +971,7 @@ static wxMenu* Append_Track_Width_List( BOARD* aBoard ) for( unsigned ii = 0; ii < aBoard->m_TrackWidthList.size(); ii++ ) { - value = ReturnStringFromValue( g_UserUnit, aBoard->m_TrackWidthList[ii], true ); + value = StringFromValue( g_UserUnit, aBoard->m_TrackWidthList[ii], true ); msg.Printf( _( "Track %s" ), GetChars( value ) ); if( ii == 0 ) @@ -984,9 +984,9 @@ static wxMenu* Append_Track_Width_List( BOARD* aBoard ) for( unsigned ii = 0; ii < aBoard->m_ViasDimensionsList.size(); ii++ ) { - value = ReturnStringFromValue( g_UserUnit, aBoard->m_ViasDimensionsList[ii].m_Diameter, + value = StringFromValue( g_UserUnit, aBoard->m_ViasDimensionsList[ii].m_Diameter, true ); - wxString drill = ReturnStringFromValue( g_UserUnit, + wxString drill = StringFromValue( g_UserUnit, aBoard->m_ViasDimensionsList[ii].m_Drill, true ); diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 105362f83c..6f79a2c5c3 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -463,7 +463,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) if( m_pcbSettings->m_padNumbers ) { textpos.y = -textpos.y; - aPad->ReturnStringPadName( buffer ); + aPad->StringPadName( buffer ); int len = buffer.Length(); double tsize = padsize.x / std::max( len, MIN_CHAR_COUNT ); tsize = std::min( tsize, size ); diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 62dab6ff16..cf0c61731e 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -30,7 +30,8 @@ */ #include -#include +#include +#include #include #include #include @@ -299,11 +300,9 @@ END_EVENT_TABLE() #define PCB_EDIT_FRAME_NAME wxT( "PcbFrame" ) -PCB_EDIT_FRAME::PCB_EDIT_FRAME( wxWindow* parent, const wxString& title, - const wxPoint& pos, const wxSize& size, - long style ) : - PCB_BASE_FRAME( parent, PCB_FRAME_TYPE, title, pos, size, - style, PCB_EDIT_FRAME_NAME ) +PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : + PCB_BASE_FRAME( aKiway, aParent, PCB_FRAME_TYPE, wxT( "Pcbnew" ), wxDefaultPosition, + wxDefaultSize, KICAD_DEFAULT_DRAWFRAME_STYLE, PCB_EDIT_FRAME_NAME ) { m_FrameName = PCB_EDIT_FRAME_NAME; m_showBorderAndTitleBlock = true; // true to display sheet references @@ -321,8 +320,6 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( wxWindow* parent, const wxString& title, m_microWaveToolBar = NULL; m_useCmpFileForFpNames = true; - m_footprintLibTable = NULL; - m_globalFootprintTable = NULL; m_rotationAngle = 900; #ifdef KICAD_SCRIPTING_WXPYTHON @@ -370,7 +367,7 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( wxWindow* parent, const wxString& title, // LoadSettings() *after* creating m_LayersManager, because LoadSettings() // initialize parameters in m_LayersManager - LoadSettings(); + LoadSettings( config() ); // Be sure options are updated m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill; @@ -486,34 +483,6 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( wxWindow* parent, const wxString& title, m_auimgr.Update(); - if( m_globalFootprintTable == NULL ) - { - try - { - m_globalFootprintTable = new FP_LIB_TABLE(); - - if( !FP_LIB_TABLE::LoadGlobalTable( *m_globalFootprintTable ) ) - { - DisplayInfoMessage( this, wxT( "You have run Pcbnew for the first time using the " - "new footprint library table method for finding " - "footprints. Pcbnew has either copied the default " - "table or created an empty table in your home " - "folder. You must first configure the library " - "table to include all footprint libraries not " - "included with KiCad. See the \"Footprint Library " - "Table\" section of the CvPcb documentation for " - "more information." ) ); - } - } - catch( IO_ERROR ioe ) - { - wxString msg; - msg.Printf( _( "An error occurred attempting to load the global footprint library " - "table:\n\n%s" ), GetChars( ioe.errorText ) ); - DisplayError( this, msg ); - } - } - setupTools(); } @@ -527,9 +496,6 @@ PCB_EDIT_FRAME::~PCB_EDIT_FRAME() m_Macros[i].m_Record.clear(); delete m_drc; - - delete m_footprintLibTable; - delete m_globalFootprintTable; } @@ -705,7 +671,7 @@ void PCB_EDIT_FRAME::OnCloseWindow( wxCloseEvent& Event ) msg.Printf( _( "The auto save file <%s> could not be removed!" ), GetChars( fn.GetFullPath() ) ); - wxMessageBox( msg, wxGetApp().GetAppName(), wxOK | wxICON_ERROR, this ); + wxMessageBox( msg, Pgm().App().GetAppName(), wxOK | wxICON_ERROR, this ); } // Delete board structs and undo/redo lists, to avoid crash on exit @@ -738,7 +704,7 @@ void PCB_EDIT_FRAME::Show3D_Frame( wxCommandEvent& event ) return; } - m_Draw3DFrame = new EDA_3D_FRAME( this, _( "3D Viewer" ) ); + m_Draw3DFrame = new EDA_3D_FRAME( &Kiway(), this, _( "3D Viewer" ) ); m_Draw3DFrame->SetDefaultFileName( GetBoard()->GetFileName() ); m_Draw3DFrame->Show( true ); } @@ -793,62 +759,55 @@ void PCB_EDIT_FRAME::ShowDesignRulesEditor( wxCommandEvent& event ) } -void PCB_EDIT_FRAME::LoadSettings() +void PCB_EDIT_FRAME::LoadSettings( wxConfigBase* aCfg ) { - wxConfig* config = wxGetApp().GetSettings(); + PCB_BASE_FRAME::LoadSettings( aCfg ); - if( config == NULL ) - return; - - // The configuration setting that used to be mixed in with the project file settings. - wxGetApp().ReadCurrentSetupValues( GetConfigurationSettings() ); - - PCB_BASE_FRAME::LoadSettings(); + wxConfigLoadSetups( aCfg, GetConfigurationSettings() ); double dtmp; - config->Read( OPTKEY_DEFAULT_LINEWIDTH_VALUE, &dtmp, 0.1 ); // stored in mm + aCfg->Read( OPTKEY_DEFAULT_LINEWIDTH_VALUE, &dtmp, 0.1 ); // stored in mm + if( dtmp < 0.01 ) dtmp = 0.01; + if( dtmp > 5.0 ) dtmp = 5.0; + g_DrawDefaultLineThickness = Millimeter2iu( dtmp ); + long tmp; - config->Read( PCB_SHOW_FULL_RATSNET_OPT, &tmp ); + + aCfg->Read( PCB_SHOW_FULL_RATSNET_OPT, &tmp ); GetBoard()->SetElementVisibility(RATSNEST_VISIBLE, tmp); - config->Read( PCB_MAGNETIC_PADS_OPT, &g_MagneticPadOption ); - config->Read( PCB_MAGNETIC_TRACKS_OPT, &g_MagneticTrackOption ); - config->Read( SHOW_MICROWAVE_TOOLS, &m_show_microwave_tools ); - config->Read( SHOW_LAYER_MANAGER_TOOLS, &m_show_layer_manager_tools ); + aCfg->Read( PCB_MAGNETIC_PADS_OPT, &g_MagneticPadOption ); + aCfg->Read( PCB_MAGNETIC_TRACKS_OPT, &g_MagneticTrackOption ); + aCfg->Read( SHOW_MICROWAVE_TOOLS, &m_show_microwave_tools ); + aCfg->Read( SHOW_LAYER_MANAGER_TOOLS, &m_show_layer_manager_tools ); // WxWidgets 2.9.1 seems call setlocale( LC_NUMERIC, "" ) - // when reading doubles in config, + // when reading doubles in cfg, // but forget to back to current locale. So we call SetLocaleTo_Default SetLocaleTo_Default( ); } -void PCB_EDIT_FRAME::SaveSettings() +void PCB_EDIT_FRAME::SaveSettings( wxConfigBase* aCfg ) { - wxConfig* config = wxGetApp().GetSettings(); + PCB_BASE_FRAME::SaveSettings( aCfg ); - if( config == NULL ) - return; - - // The configuration setting that used to be mixed in with the project file settings. - wxGetApp().SaveCurrentSetupValues( GetConfigurationSettings() ); - - PCB_BASE_FRAME::SaveSettings(); + wxConfigSaveSetups( aCfg, GetConfigurationSettings() ); // This value is stored in mm ) - config->Write( OPTKEY_DEFAULT_LINEWIDTH_VALUE, + aCfg->Write( OPTKEY_DEFAULT_LINEWIDTH_VALUE, MM_PER_IU * g_DrawDefaultLineThickness ); long tmp = GetBoard()->IsElementVisible(RATSNEST_VISIBLE); - config->Write( PCB_SHOW_FULL_RATSNET_OPT, tmp ); - config->Write( PCB_MAGNETIC_PADS_OPT, (long) g_MagneticPadOption ); - config->Write( PCB_MAGNETIC_TRACKS_OPT, (long) g_MagneticTrackOption ); - config->Write( SHOW_MICROWAVE_TOOLS, (long) m_show_microwave_tools ); - config->Write( SHOW_LAYER_MANAGER_TOOLS, (long)m_show_layer_manager_tools ); + aCfg->Write( PCB_SHOW_FULL_RATSNET_OPT, tmp ); + aCfg->Write( PCB_MAGNETIC_PADS_OPT, (long) g_MagneticPadOption ); + aCfg->Write( PCB_MAGNETIC_TRACKS_OPT, (long) g_MagneticTrackOption ); + aCfg->Write( SHOW_MICROWAVE_TOOLS, (long) m_show_microwave_tools ); + aCfg->Write( SHOW_LAYER_MANAGER_TOOLS, (long)m_show_layer_manager_tools ); } @@ -1070,12 +1029,14 @@ void PCB_EDIT_FRAME::SetLanguage( wxCommandEvent& event ) { EDA_DRAW_FRAME::SetLanguage( event ); m_Layers->SetLayersManagerTabsText(); + wxAuiPaneInfo& pane_info = m_auimgr.GetPane( m_Layers ); + pane_info.Caption( _( "Visibles" ) ); m_auimgr.Update(); ReFillLayerWidget(); - FOOTPRINT_EDIT_FRAME * moduleEditFrame = FOOTPRINT_EDIT_FRAME::GetActiveFootprintEditor(); + FOOTPRINT_EDIT_FRAME* moduleEditFrame = FOOTPRINT_EDIT_FRAME::GetActiveFootprintEditor( this ); if( moduleEditFrame ) moduleEditFrame->EDA_DRAW_FRAME::SetLanguage( event ); } @@ -1128,10 +1089,8 @@ void PCB_EDIT_FRAME::SVG_Print( wxCommandEvent& event ) void PCB_EDIT_FRAME::UpdateTitle() { - wxString title; - wxFileName fileName = GetBoard()->GetFileName(); - - title.Printf( wxT( "Pcbnew %s " ), GetChars( GetBuildVersion() ) ); + wxFileName fileName = GetBoard()->GetFileName(); + wxString title = wxString::Format( wxT( "Pcbnew %s " ), GetChars( GetBuildVersion() ) ); if( fileName.IsOk() && fileName.FileExists() ) { @@ -1179,24 +1138,29 @@ void PCB_EDIT_FRAME::OnSelectAutoPlaceMode( wxCommandEvent& aEvent ) switch( aEvent.GetId() ) { - case ID_TOOLBARH_PCB_MODE_MODULE: - if( aEvent.IsChecked() && - m_mainToolBar->GetToolToggled( ID_TOOLBARH_PCB_MODE_TRACKS ) ) - m_mainToolBar->ToggleTool( ID_TOOLBARH_PCB_MODE_TRACKS, false ); - break; - - case ID_TOOLBARH_PCB_MODE_TRACKS: - if( aEvent.IsChecked() && - m_mainToolBar->GetToolToggled( ID_TOOLBARH_PCB_MODE_MODULE ) ) - m_mainToolBar->ToggleTool( ID_TOOLBARH_PCB_MODE_MODULE, false ); - break; + case ID_TOOLBARH_PCB_MODE_MODULE: + if( aEvent.IsChecked() && + m_mainToolBar->GetToolToggled( ID_TOOLBARH_PCB_MODE_TRACKS ) ) + { + m_mainToolBar->ToggleTool( ID_TOOLBARH_PCB_MODE_TRACKS, false ); } + break; + + case ID_TOOLBARH_PCB_MODE_TRACKS: + if( aEvent.IsChecked() && + m_mainToolBar->GetToolToggled( ID_TOOLBARH_PCB_MODE_MODULE ) ) + { + m_mainToolBar->ToggleTool( ID_TOOLBARH_PCB_MODE_MODULE, false ); + } + break; + } } void PCB_EDIT_FRAME::ToPlotter( wxCommandEvent& event ) { DIALOG_PLOT dlg( this ); + dlg.ShowModal(); } @@ -1208,3 +1172,4 @@ void PCB_EDIT_FRAME::SetRotationAngle( int aRotationAngle ) m_rotationAngle = aRotationAngle; } + diff --git a/pcbnew/pcbnew.cpp b/pcbnew/pcbnew.cpp index 37e0d12057..4d8e06a2cf 100644 --- a/pcbnew/pcbnew.cpp +++ b/pcbnew/pcbnew.cpp @@ -29,11 +29,12 @@ */ #ifdef KICAD_SCRIPTING -#include -#include + #include + #include #endif #include -#include +#include +#include #include #include #include @@ -52,68 +53,327 @@ #include #include #include +#include <3d_viewer.h> +#include +#include +#include // Colors for layers and items COLORS_DESIGN_SETTINGS g_ColorsSettings; -bool g_Drc_On = true; -bool g_AutoDeleteOldTrack = true; -bool g_Show_Module_Ratsnest; -bool g_Raccord_45_Auto = true; -bool g_Alternate_Track_Posture = false; -bool g_Track_45_Only_Allowed = true; // True to allow horiz, vert. and 45deg only tracks -bool g_Segments_45_Only; // True to allow horiz, vert. and 45deg only graphic segments -bool g_TwoSegmentTrackBuild = true; +bool g_Drc_On = true; +bool g_AutoDeleteOldTrack = true; +bool g_Show_Module_Ratsnest; +bool g_Raccord_45_Auto = true; +bool g_Alternate_Track_Posture = false; +bool g_Track_45_Only_Allowed = true; // True to allow horiz, vert. and 45deg only tracks +bool g_Segments_45_Only; // True to allow horiz, vert. and 45deg only graphic segments +bool g_TwoSegmentTrackBuild = true; -LAYER_NUM g_Route_Layer_TOP; -LAYER_NUM g_Route_Layer_BOTTOM; -int g_MaxLinksShowed; -int g_MagneticPadOption = capture_cursor_in_track_tool; -int g_MagneticTrackOption = capture_cursor_in_track_tool; +LAYER_NUM g_Route_Layer_TOP; +LAYER_NUM g_Route_Layer_BOTTOM; +int g_MaxLinksShowed; +int g_MagneticPadOption = capture_cursor_in_track_tool; +int g_MagneticTrackOption = capture_cursor_in_track_tool; -wxPoint g_Offset_Module; /* Distance to offset module trace when moving. */ +wxPoint g_Offset_Module; /* Distance to offset module trace when moving. */ /* Name of the document footprint list * usually located in share/modules/footprints_doc * this is of the responsibility to users to create this file * if they want to have a list of footprints */ -wxString g_DocModulesFileName = wxT( "footprints_doc/footprints.pdf" ); +wxString g_DocModulesFileName = wxT( "footprints_doc/footprints.pdf" ); // wxWindow* DoPythonStuff(wxWindow* parent); // declaration -IMPLEMENT_APP( EDA_APP ) +namespace PCB { -/* MacOSX: Needed for file association - * http://wiki.wxwidgets.org/WxMac-specific_topics - */ -void EDA_APP::MacOpenFile( const wxString& aFileName ) +static struct IFACE : public KIFACE_I { - PCB_EDIT_FRAME* frame = ( (PCB_EDIT_FRAME*) GetTopWindow() ); - wxFileName filename = aFileName; + // Of course all are virtual overloads, implementations of the KIFACE. - if( !filename.FileExists() ) - return; + IFACE( const char* aName, KIWAY::FACE_T aType ) : + KIFACE_I( aName, aType ) + {} - frame->LoadOnePcbFile( aFileName, false ); + bool OnKifaceStart( PGM_BASE* aProgram ); + + void OnKifaceEnd(); + + wxWindow* CreateWindow( wxWindow* aParent, int aClassId, KIWAY* aKiway, int aCtlBits = 0 ) + { + switch( aClassId ) + { + + case PCB_FRAME_TYPE: + { + PCB_EDIT_FRAME* frame = new PCB_EDIT_FRAME( aKiway, aParent ); + + frame->Zoom_Automatique( true ); + +#ifdef KICAD_SCRIPTING + // give the scripting helpers access to our frame + ScriptingSetPcbEditFrame( frame ); +#endif + + // @todo temporarily here + CreateServer( frame, KICAD_PCB_PORT_SERVICE_NUMBER ); + + return frame; + } + break; + + case MODULE_EDITOR_FRAME_TYPE: + { + // yuck: + PCB_EDIT_FRAME* editor = dynamic_cast( aParent ); + wxASSERT( editor ); + + FOOTPRINT_EDIT_FRAME* frame = new FOOTPRINT_EDIT_FRAME( aKiway, editor ); + + frame->Zoom_Automatique( true ); + + /* Read a default config file in case no project given on command line. + frame->LoadProjectFile( wxEmptyString, true ); + */ + + return frame; + } + break; + + case MODULE_VIEWER_FRAME_TYPE: + { + // yuck: + PCB_BASE_FRAME* editor = dynamic_cast( aParent ); + wxASSERT( editor ); + + FOOTPRINT_VIEWER_FRAME* frame = new FOOTPRINT_VIEWER_FRAME( aKiway, editor ); + + frame->Zoom_Automatique( true ); + + /* Read a default config file in case no project given on command line. + frame->LoadProjectFile( wxEmptyString, true ); + */ + + return frame; + } + break; + + default: + ; + } + + return NULL; + } + + /** + * Function IfaceOrAddress + * return a pointer to the requested object. The safest way to use this + * is to retrieve a pointer to a static instance of an interface, similar to + * how the KIFACE interface is exported. But if you know what you are doing + * use it to retrieve anything you want. + * + * @param aDataId identifies which object you want the address of. + * + * @return void* - and must be cast into the know type. + */ + void* IfaceOrAddress( int aDataId ) + { + return NULL; + } + +} kiface( "pcbnew", KIWAY::FACE_PCB ); + +} // namespace + +using namespace PCB; + + +static PGM_BASE* process; + + +KIFACE_I& Kiface() { return kiface; } + + +// KIFACE_GETTER's actual spelling is a substitution macro found in kiway.h. +// KIFACE_GETTER will not have name mangling due to declaration in kiway.h. +MY_API( KIFACE* ) KIFACE_GETTER( int* aKIFACEversion, int aKiwayVersion, PGM_BASE* aProgram ) +{ + process = (PGM_BASE*) aProgram; + return &kiface; } -bool EDA_APP::OnInit() +PGM_BASE& Pgm() { - wxFileName fn; - PCB_EDIT_FRAME* frame = NULL; - wxString msg; + wxASSERT( process ); // KIFACE_GETTER has already been called. + return *process; +} - InitEDA_Appl( wxT( "Pcbnew" ), APP_PCBNEW_T ); + +/** + * Function set3DShapesPath + * attempts to set the environment variable given by aKiSys3Dmod to a valid path. + * (typically "KISYS3DMOD" ) + * If the environment variable is already set, + * then it left as is to respect the wishes of the user. + * + * The path is determined by attempting to find the path modules/packages3d + * files in kicad tree. + * This may or may not be the best path but it provides the best solution for + * backwards compatibility with the previous 3D shapes search path implementation. + * + * @note This must be called after #SetBinDir() is called at least on Windows. + * Otherwise, the kicad path is not known (Windows specific) + * + * @param aKiSys3Dmod = the value of environment variable, typically "KISYS3DMOD" + * @return false if the aKiSys3Dmod path is not valid. + */ +bool set3DShapesPath( const wxString& aKiSys3Dmod ) +{ + wxString path; + + // Set the KISYS3DMOD environment variable for the current process, + // if it is not already defined in the user's environment and valid. + if( wxGetEnv( aKiSys3Dmod, &path ) && wxFileName::DirExists( path ) ) + return true; + + // Attempt to determine where the 3D shape libraries were installed using the + // legacy path: + // on Unix: /usr/local/kicad/share/modules/packages3d + // or /usr/share/kicad/modules/packages3d + // On Windows: bin../share/modules/packages3d + wxString relpath( wxT( "modules/packages3d" ) ); + +// Apple MacOSx +#ifdef __WXMAC__ + path = wxT("/Library/Application Support/kicad/modules/packages3d/"); + + if( wxFileName::DirExists( path ) ) + { + wxSetEnv( aKiSys3Dmod, path ); + return true; + } + + path = wxString( wxGetenv( wxT( "HOME" ) ) ) + wxT("/Library/Application Support/kicad/modules/packages3d/"); + + if( wxFileName::DirExists( path ) ) + { + wxSetEnv( aKiSys3Dmod, path ); + return true; + } + +#elif defined(__UNIX__) // Linux and non-Apple Unix + // Try the home directory: + path.Empty(); + wxGetEnv( wxT("HOME"), &path ); + path += wxT("/kicad/share/") + relpath; + + if( wxFileName::DirExists( path ) ) + { + wxSetEnv( aKiSys3Dmod, path ); + return true; + } + + // Try the standard install path: + path = wxT("/usr/local/kicad/share/") + relpath; + + if( wxFileName::DirExists( path ) ) + { + wxSetEnv( aKiSys3Dmod, path ); + return true; + } + + // Try the official distrib standard install path: + path = wxT("/usr/share/kicad/") + relpath; + + if( wxFileName::DirExists( path ) ) + { + wxSetEnv( aKiSys3Dmod, path ); + return true; + } + +#else // Windows + // On Windows, the install path is given by the path of executables + wxFileName fn; + fn.AssignDir( Pgm().GetExecutablePath() ); + fn.RemoveLastDir(); + path = fn.GetPathWithSep() + wxT("share/") + relpath; + + if( wxFileName::DirExists( path ) ) + { + wxSetEnv( aKiSys3Dmod, path ); + return true; + } +#endif + + return false; +} + + +/// The global footprint library table. This is not dynamically allocated because +/// in a multiple project environment we must keep its address constant (since it is +/// the fallback table for multiple projects). +FP_LIB_TABLE GFootprintTable; + + +bool IFACE::OnKifaceStart( PGM_BASE* aProgram ) +{ + // This is process level, not project level, initialization of the DSO. + + // Do nothing in here pertinent to a project! + + start_common(); + + // Must be called before creating the main frame in order to + // display the real hotkeys in menus or tool tips + ReadHotkeyConfig( wxT( "PcbFrame" ), g_Board_Editor_Hokeys_Descr ); + + // Set 3D shape path from environment variable KISYS3DMOD + set3DShapesPath( wxT(KISYS3DMOD) ); + + g_DrawBgColor = BLACK; + + try + { + // The global table is not related to a specific project. All projects + // will use the same global table. So the KIFACE::OnKifaceStart() contract + // of avoiding anything project specific is not violated here. + + if( !FP_LIB_TABLE::LoadGlobalTable( GFootprintTable ) ) + { + DisplayInfoMessage( NULL, wxT( + "You have run Pcbnew for the first time using the " + "new footprint library table method for finding " + "footprints. Pcbnew has either copied the default " + "table or created an empty table in your home " + "folder. You must first configure the library " + "table to include all footprint libraries not " + "included with KiCad. See the \"Footprint Library " + "Table\" section of the CvPcb documentation for " + "more information." ) ); + } + } + catch( const IO_ERROR& ioe ) + { + wxString msg = wxString::Format( _( + "An error occurred attempting to load the global footprint library " + "table:\n\n%s" ), + GetChars( ioe.errorText ) + ); + DisplayError( NULL, msg ); + return false; + } #ifdef KICAD_SCRIPTING - msg.Empty(); -#ifdef __WINDOWS__ + wxString path_frag; + + #ifdef __MINGW32__ // force python environment under Windows: - const wxString python_us("python27_us"); + const wxString python_us( "python27_us" ); // Build our python path inside kicad wxString kipython = m_BinDir + python_us; @@ -122,6 +382,7 @@ bool EDA_APP::OnInit() if( wxDirExists( kipython ) ) { wxString ppath; + if( !wxGetEnv( wxT( "PYTHONPATH" ), &ppath ) || !ppath.Contains( python_us ) ) { ppath << kipython << wxT("/pylib;"); @@ -149,193 +410,35 @@ bool EDA_APP::OnInit() // which are ( [KICAD_PATH] is an environment variable to define) // [KICAD_PATH]/scripting/plugins // Add this default search path: - msg = wxGetApp().GetExecutablePath() + wxT("scripting/plugins"); -#else + path_frag = Pgm().GetExecutablePath() + wxT( "scripting/plugins" ); + #else // Add this default search path: - msg = wxT("/usr/local/kicad/bin/scripting/plugins"); -#endif + path_fag = wxT( "/usr/local/kicad/bin/scripting/plugins" ); + #endif + // On linux and osx, 2 others paths are // [HOME]/.kicad_plugins/ // [HOME]/.kicad/scripting/plugins/ - if ( !pcbnewInitPythonScripting( TO_UTF8(msg) ) ) + if( !pcbnewInitPythonScripting( TO_UTF8( path_frag ) ) ) { - wxMessageBox( wxT( "pcbnewInitPythonScripting() fails" ) ); + wxLogSysError( wxT( "pcbnewInitPythonScripting() failed." ) ); return false; } #endif - if( argc > 1 ) - { - fn = argv[1]; - - // Be sure the filename is absolute, to avoid issues - // when the filename is relative, - // for instance when stored in history list without path, - // and when building the config filename ( which should have a path ) - if( fn.IsRelative() ) - fn.MakeAbsolute(); - - if( fn.GetExt() != PcbFileExtension && fn.GetExt() != LegacyPcbFileExtension ) - { - msg.Printf( _( "Pcbnew file <%s> has a wrong extension.\n" - "Changing extension to .%s." ), - GetChars( fn.GetFullPath() ), - GetChars( PcbFileExtension ) ); - fn.SetExt( PcbFileExtension ); - wxMessageBox( msg ); - } - - if( !wxGetApp().LockFile( fn.GetFullPath() ) ) - { - DisplayError( NULL, _( "This file is already open." ) ); - return false; - } - } - - if( m_Checker && m_Checker->IsAnotherRunning() ) - { - if( !IsOK( NULL, _( "Pcbnew is already running, Continue?" ) ) ) - return false; - } - - // read current setup and reopen last directory if no filename to open in command line - bool reopenLastUsedDirectory = argc == 1; - GetSettings( reopenLastUsedDirectory ); - - if( fn.IsOk() && fn.DirExists() ) - wxSetWorkingDirectory( fn.GetPath() ); - - g_DrawBgColor = BLACK; - - /* Must be called before creating the main frame in order to - * display the real hotkeys in menus or tool tips */ - ReadHotkeyConfig( wxT( "PcbFrame" ), g_Board_Editor_Hokeys_Descr ); - - // Set any environment variables before loading FP_LIB_TABLE - SetFootprintLibTablePath(); - - frame = new PCB_EDIT_FRAME( NULL, wxT( "Pcbnew" ), wxPoint( 0, 0 ), wxSize( 600, 400 ) ); - -#ifdef KICAD_SCRIPTING - ScriptingSetPcbEditFrame(frame); /* give the scripting helpers access to our frame */ -#endif - - frame->UpdateTitle(); - - SetTopWindow( frame ); - frame->Show( true ); - - CreateServer( frame, KICAD_PCB_PORT_SERVICE_NUMBER ); - - frame->Zoom_Automatique( true ); - - // Load config and default values before loading a board file - // Some will be overwritten after loading the board file - frame->LoadProjectSettings( fn.GetFullPath() ); - - /* Load file specified in the command line. */ - if( fn.IsOk() ) - { - /* Note the first time Pcbnew is called after creating a new project - * the board file may not exist so we load settings only. - * However, because legacy board files are named *.brd, - * and new files are named *.kicad_pcb, - * for all previous projects ( before 2012, december 14 ), - * because KiCad manager ask to load a .kicad_pcb file - * if this file does not exist, it is certainly useful - * to test if a legacy file is existing, - * under the same name, and therefore if the user want to load it - */ - bool file_exists = false; - - if( fn.FileExists() ) - { - file_exists = true; - frame->LoadOnePcbFile( fn.GetFullPath() ); - } - else if( fn.GetExt() == KiCadPcbFileExtension ) - { - // Try to find a legacy file with the same name: - wxFileName fn_legacy = fn; - fn_legacy.SetExt( LegacyPcbFileExtension ); - - if( fn_legacy.FileExists() ) - { - msg.Printf( _( "File <%s> does not exist.\n" - "However a legacy file <%s> exists.\n" - "Do you want to load it?\n" - "It will be saved under the new file format." ), - GetChars( fn.GetFullPath() ), - GetChars( fn_legacy.GetFullPath() ) ); - - if( IsOK( frame, msg ) ) - { - file_exists = true; - frame->LoadOnePcbFile( fn_legacy.GetFullPath() ); - wxString filename = fn.GetFullPath(); - filename.Replace( WIN_STRING_DIR_SEP, UNIX_STRING_DIR_SEP ); - frame->GetBoard()->SetFileName( filename ); - frame->UpdateTitle(); - frame->OnModify(); // Ready to save the board under the new format - } - } - } - - if( ! file_exists ) - { - // File does not exists: prepare an empty board - if( ! fn.GetPath().IsEmpty() ) - wxSetWorkingDirectory( fn.GetPath() ); - - frame->GetBoard()->SetFileName( fn.GetFullPath( wxPATH_UNIX ) ); - frame->UpdateTitle(); - frame->UpdateFileHistory( frame->GetBoard()->GetFileName() ); - frame->OnModify(); // Ready to save the new empty board - - msg.Printf( _( "File <%s> does not exist.\nThis is normal for a new project" ), - GetChars( frame->GetBoard()->GetFileName() ) ); - wxMessageBox( msg ); - } - } - - else - // No file to open: initialize a new empty board - // using default values for design settings: - frame->Clear_Pcb( false ); - - // update the layer names in the listbox - frame->ReCreateLayerBox( false ); - - /* For an obscure reason the focus is lost after loading a board file - * when starting (i.e. only at this point) - * (seems due to the recreation of the layer manager after loading the file) - * give focus to main window and Drawpanel - * must be done for these 2 windows (for an obscure reason ...) - * Linux specific - * This is more a workaround than a fix. - */ - frame->SetFocus(); - frame->GetCanvas()->SetFocus(); - return true; } -#if 0 -// for some reason KiCad classes do not implement OnExit -// if I add it in the declaration, I need to fix it in every application -// so for now make a note TODO TODO -// we need to clean up python when the application exits -int EDA_APP::OnExit() +void IFACE::OnKifaceEnd() { - // Restore the thread state and tell Python to cleanup after itself. - // wxPython will do its own cleanup as part of that process. This is done - // in OnExit instead of ~MyApp because OnExit is only called if OnInit is - // successful. + end_common(); + #if KICAD_SCRIPTING_WXPYTHON + // Restore the thread state and tell Python to cleanup after itself. + // wxPython will do its own cleanup as part of that process. + // This should only be called if python was setup correctly. pcbnewFinishPythonScripting(); #endif - return 0; } -#endif diff --git a/pcbnew/pcbnew_config.cpp b/pcbnew/pcbnew_config.cpp index 50ab5bbc59..48e31a6570 100644 --- a/pcbnew/pcbnew_config.cpp +++ b/pcbnew/pcbnew_config.cpp @@ -29,7 +29,9 @@ */ #include -#include +//#include +#include +#include #include #include #include @@ -84,21 +86,24 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event ) case ID_PCB_LIB_TABLE_EDIT: { bool tableChanged = false; - int r = InvokePcbLibTableEditor( this, m_globalFootprintTable, m_footprintLibTable ); + int r = InvokePcbLibTableEditor( this, &GFootprintTable, FootprintLibs() ); if( r & 1 ) { try { FILE_OUTPUTFORMATTER sf( FP_LIB_TABLE::GetGlobalTableFileName() ); - m_globalFootprintTable->Format( &sf, 0 ); + + GFootprintTable.Format( &sf, 0 ); tableChanged = true; } catch( IO_ERROR& ioe ) { - wxString msg; - msg.Printf( _( "Error occurred saving the global footprint library " - "table:\n\n%s" ), ioe.errorText.GetData() ); + wxString msg = wxString::Format( _( + "Error occurred saving the global footprint library " + "table:\n\n%s" ), + GetChars( ioe.errorText.GetData() ) + ); wxMessageBox( msg, _( "File Save Error" ), wxOK | wxICON_ERROR ); } } @@ -111,7 +116,7 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event ) try { - m_footprintLibTable->Save( fn ); + FootprintLibs()->Save( fn ); tableChanged = true; } catch( IO_ERROR& ioe ) @@ -123,9 +128,11 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event ) } } - if( tableChanged && FOOTPRINT_VIEWER_FRAME::GetActiveFootprintViewer() != NULL ) + FOOTPRINT_VIEWER_FRAME* viewer; + + if( tableChanged && (viewer = FOOTPRINT_VIEWER_FRAME::GetActiveFootprintViewer( this )) != NULL ) { - FOOTPRINT_VIEWER_FRAME::GetActiveFootprintViewer()->ReCreateLibraryList(); + viewer->ReCreateLibraryList(); } } break; @@ -211,19 +218,15 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event ) bool PCB_EDIT_FRAME::LoadProjectSettings( const wxString& aProjectFileName ) { - wxLogDebug( wxT( "Loading project <%s> settings." ), GetChars( aProjectFileName ) ); + wxLogDebug( wxT( "Loading project '%s' settings." ), GetChars( aProjectFileName ) ); - wxFileName fn = aProjectFileName; + wxFileName fn = aProjectFileName; if( fn.GetExt() != ProjectFileExtension ) fn.SetExt( ProjectFileExtension ); - wxGetApp().RemoveLibraryPath( g_UserLibDirBuffer ); - - wxGetApp().ReadProjectConfig( fn.GetFullPath(), GROUP, GetProjectFileParameters(), false ); - - // User library path takes precedent over default library search paths. - wxGetApp().InsertLibraryPath( g_UserLibDirBuffer, 1 ); + // was: wxGetApp().ReadProjectConfig( fn.GetFullPath(), GROUP, GetProjectFileParameters(), false ); + Prj().ConfigLoad( Kiface().KifaceSearch(), fn.GetFullPath(), GROUP, GetProjectFileParameters(), false ); // Dick 5-Feb-2012: I don't agree with this, the BOARD contents should dictate // what is visible or not, even initially. And since PCB_EDIT_FRAME projects settings @@ -246,36 +249,19 @@ bool PCB_EDIT_FRAME::LoadProjectSettings( const wxString& aProjectFileName ) fn = GetBoard()->GetFileName(); - // Check if a project footprint table is defined and load it. If no project footprint - // table is defined, then the global library table is the footprint library table. - FP_LIB_TABLE::SetProjectPathEnvVariable( fn ); + wxFileName projectFpLibTableFileName = FP_LIB_TABLE::GetProjectTableFileName( fn.GetFullPath() ); - delete m_footprintLibTable; - - wxFileName projectFpLibTableFileName; - - projectFpLibTableFileName = FP_LIB_TABLE::GetProjectFileName( fn ); - m_footprintLibTable = new FP_LIB_TABLE(); + FootprintLibs()->Clear(); try { - m_footprintLibTable->Load( projectFpLibTableFileName, m_globalFootprintTable ); + FootprintLibs()->Load( projectFpLibTableFileName, &GFootprintTable ); } catch( IO_ERROR ioe ) { DisplayError( this, ioe.errorText ); } - FOOTPRINT_EDIT_FRAME* editFrame = FOOTPRINT_EDIT_FRAME::GetActiveFootprintEditor(); - - if( editFrame ) - editFrame->SetFootprintLibTable( m_footprintLibTable ); - - FOOTPRINT_VIEWER_FRAME* viewFrame = FOOTPRINT_VIEWER_FRAME::GetActiveFootprintViewer(); - - if( viewFrame ) - viewFrame->SetFootprintLibTable( m_footprintLibTable ); - // Load the page layout decr file, from the filename stored in // BASE_SCREEN::m_PageLayoutDescrFileName, read in config project file // If empty, the default descr is loaded @@ -302,11 +288,12 @@ void PCB_EDIT_FRAME::SaveProjectSettings( bool aAskForSave ) if( dlg.ShowModal() == wxID_CANCEL ) return; - wxGetApp().WriteProjectConfig( dlg.GetPath(), GROUP, GetProjectFileParameters() ); + fn = dlg.GetPath(); } - else - wxGetApp().WriteProjectConfig( fn.GetFullPath(), GROUP, GetProjectFileParameters() ); + SEARCH_STACK& search = Kiface().KifaceSearch(); + + Prj().ConfigSave( search, fn.GetFullPath(), GROUP, GetProjectFileParameters() ); } diff --git a/pcbnew/pcbnew_config.h b/pcbnew/pcbnew_config.h index 7f430b2a88..a0b0006bbd 100644 --- a/pcbnew/pcbnew_config.h +++ b/pcbnew/pcbnew_config.h @@ -6,7 +6,7 @@ #ifndef _PCBNEW_CONFIG_H_ #define _PCBNEW_CONFIG_H_ -#include +#include #include #define GROUP wxT( "/pcbnew" ) diff --git a/pcbnew/plot_brditems_plotter.cpp b/pcbnew/plot_brditems_plotter.cpp index 5cc2e4fd5c..aa4dfc3860 100644 --- a/pcbnew/plot_brditems_plotter.cpp +++ b/pcbnew/plot_brditems_plotter.cpp @@ -66,7 +66,7 @@ EDA_COLOR_T BRDITEMS_PLOTTER::getColor( LAYER_NUM aLayer ) void BRDITEMS_PLOTTER::PlotPad( D_PAD* aPad, EDA_COLOR_T aColor, EDA_DRAW_MODE_T aPlotMode ) { - wxPoint shape_pos = aPad->ReturnShapePos(); + wxPoint shape_pos = aPad->ShapePos(); // Set plot color (change WHITE to LIGHTGRAY because // the white items are not seen on a white paper or screen diff --git a/pcbnew/printout_controler.cpp b/pcbnew/printout_controler.cpp index 7be6b40d3c..80ecd43d86 100644 --- a/pcbnew/printout_controler.cpp +++ b/pcbnew/printout_controler.cpp @@ -32,7 +32,7 @@ #define wxTEST_POSTSCRIPT_IN_MSW 1 #include -#include +#include #include #include #include diff --git a/pcbnew/printout_controler.h b/pcbnew/printout_controler.h index a31ccad559..83745c70e1 100644 --- a/pcbnew/printout_controler.h +++ b/pcbnew/printout_controler.h @@ -34,6 +34,8 @@ #include #include +#include + #define DEFAULT_ORIENTATION_PAPER wxLANDSCAPE // other option is wxPORTRAIT @@ -98,7 +100,6 @@ public: * is a class derived from wxPrintout to handle the necessary information to control a printer * when printing a board */ - class BOARD_PRINTOUT_CONTROLLER : public wxPrintout { private: diff --git a/pcbnew/specctra_export.cpp b/pcbnew/specctra_export.cpp index 7f37c5c89d..ae3916f444 100644 --- a/pcbnew/specctra_export.cpp +++ b/pcbnew/specctra_export.cpp @@ -832,7 +832,7 @@ PADSTACK* SPECCTRA_DB::makeVia( const SEGVIA* aVia ) LAYER_NUM topLayerNum; LAYER_NUM botLayerNum; - aVia->ReturnLayerPair( &topLayerNum, &botLayerNum ); + aVia->LayerPair( &topLayerNum, &botLayerNum ); int topLayer = kicadLayer2pcb[topLayerNum]; int botLayer = kicadLayer2pcb[botLayerNum]; diff --git a/pcbnew/swap_layers.cpp b/pcbnew/swap_layers.cpp index 73d3347efa..11180b107b 100644 --- a/pcbnew/swap_layers.cpp +++ b/pcbnew/swap_layers.cpp @@ -367,7 +367,7 @@ void PCB_EDIT_FRAME::Swap_Layers( wxCommandEvent& event ) LAYER_NUM top_layer, bottom_layer; - Via->ReturnLayerPair( &top_layer, &bottom_layer ); + Via->LayerPair( &top_layer, &bottom_layer ); if( New_Layer[bottom_layer] >= 0 && New_Layer[bottom_layer] < LAYER_NO_CHANGE ) bottom_layer = New_Layer[bottom_layer]; diff --git a/pcbnew/target_edit.cpp b/pcbnew/target_edit.cpp index dba25a86d2..46310d4aae 100644 --- a/pcbnew/target_edit.cpp +++ b/pcbnew/target_edit.cpp @@ -99,11 +99,11 @@ TARGET_PROPERTIES_DIALOG_EDITOR::TARGET_PROPERTIES_DIALOG_EDITOR( PCB_EDIT_FRAME // Size: m_staticTextSizeUnits->SetLabel( GetUnitsLabel( g_UserUnit ) ); - m_TargetSizeCtrl->SetValue( ReturnStringFromValue( g_UserUnit, m_Target->GetSize() ) ); + m_TargetSizeCtrl->SetValue( StringFromValue( g_UserUnit, m_Target->GetSize() ) ); // Thickness: m_staticTextThicknessUnits->SetLabel( GetUnitsLabel( g_UserUnit ) ); - m_TargetThicknessCtrl->SetValue( ReturnStringFromValue( g_UserUnit, m_Target->GetWidth() ) ); + m_TargetThicknessCtrl->SetValue( StringFromValue( g_UserUnit, m_Target->GetWidth() ) ); // Shape m_TargetShape->SetSelection( m_Target->GetShape() ? 1 : 0 ); @@ -137,10 +137,10 @@ void TARGET_PROPERTIES_DIALOG_EDITOR::OnOkClick( wxCommandEvent& event ) m_Target->SetFlags( IN_EDIT ); // set flag in edit to force // undo/redo/abort proper operation - int tmp = ReturnValueFromString( g_UserUnit, m_TargetThicknessCtrl->GetValue() ); + int tmp = ValueFromString( g_UserUnit, m_TargetThicknessCtrl->GetValue() ); m_Target->SetWidth( tmp ); - MireDefaultSize = ReturnValueFromString( g_UserUnit, m_TargetSizeCtrl->GetValue() ); + MireDefaultSize = ValueFromString( g_UserUnit, m_TargetSizeCtrl->GetValue() ); m_Target->SetSize( MireDefaultSize ); m_Target->SetShape( m_TargetShape->GetSelection() ? 1 : 0 ); diff --git a/pcbnew/toolbars_update_user_interface.cpp b/pcbnew/toolbars_update_user_interface.cpp index 23d850d2b1..1c214f4240 100644 --- a/pcbnew/toolbars_update_user_interface.cpp +++ b/pcbnew/toolbars_update_user_interface.cpp @@ -30,7 +30,7 @@ */ #include -#include +#include #include #include #include <3d_viewer.h> diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index fbd2aee6f6..784e54c710 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -447,7 +447,7 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) const { // For vias it is enough if only one of layers is visible LAYER_NUM top, bottom; - static_cast( aItem )->ReturnLayerPair( &top, &bottom ); + static_cast( aItem )->LayerPair( &top, &bottom ); return board->IsLayerVisible( top ) || board->IsLayerVisible( bottom ); } diff --git a/pcbnew/xchgmod.cpp b/pcbnew/xchgmod.cpp index babfc4818f..19f26cd1d9 100644 --- a/pcbnew/xchgmod.cpp +++ b/pcbnew/xchgmod.cpp @@ -496,7 +496,7 @@ void DIALOG_EXCHANGE_MODULE::BrowseAndSelectFootprint( wxCommandEvent& event ) wxString newname; newname = m_parent->SelectFootprint( m_parent, wxEmptyString, wxEmptyString, wxEmptyString, - m_parent->GetFootprintLibraryTable() ); + m_parent->FootprintLibs() ); if( newname != wxEmptyString ) m_NewModule->SetValue( newname ); diff --git a/pcbnew/zones_by_polygon.cpp b/pcbnew/zones_by_polygon.cpp index 19dcfe5f2a..d147aada99 100644 --- a/pcbnew/zones_by_polygon.cpp +++ b/pcbnew/zones_by_polygon.cpp @@ -29,7 +29,8 @@ */ #include -#include +//#include +#include #include #include #include @@ -553,21 +554,25 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC ) zone->SetNetNameFromNetCode( ); } double tmp = ZONE_THERMAL_RELIEF_GAP_MIL; - wxGetApp().GetSettings()->Read( ZONE_THERMAL_RELIEF_GAP_STRING_KEY, &tmp ); + + wxConfigBase* cfg = Kiface().KifaceSettings(); + + cfg->Read( ZONE_THERMAL_RELIEF_GAP_STRING_KEY, &tmp ); + zoneInfo.m_ThermalReliefGap = KiROUND( tmp * IU_PER_MILS); tmp = ZONE_THERMAL_RELIEF_COPPER_WIDTH_MIL; - wxGetApp().GetSettings()->Read( ZONE_THERMAL_RELIEF_COPPER_WIDTH_STRING_KEY, + cfg->Read( ZONE_THERMAL_RELIEF_COPPER_WIDTH_STRING_KEY, &tmp ); zoneInfo.m_ThermalReliefCopperBridge = KiROUND( tmp * IU_PER_MILS ); tmp = ZONE_CLEARANCE_MIL; - wxGetApp().GetSettings()->Read( ZONE_CLEARANCE_WIDTH_STRING_KEY, + cfg->Read( ZONE_CLEARANCE_WIDTH_STRING_KEY, &tmp ); zoneInfo.m_ZoneClearance = KiROUND( tmp * IU_PER_MILS ); tmp = ZONE_THICKNESS_MIL; - wxGetApp().GetSettings()->Read( ZONE_MIN_THICKNESS_WIDTH_STRING_KEY, + cfg->Read( ZONE_MIN_THICKNESS_WIDTH_STRING_KEY, &tmp ); zoneInfo.m_ZoneMinThickness = KiROUND( tmp * IU_PER_MILS ); diff --git a/pcbnew/zones_by_polygon_fill_functions.cpp b/pcbnew/zones_by_polygon_fill_functions.cpp index 61324cb6c7..1b81e200a6 100644 --- a/pcbnew/zones_by_polygon_fill_functions.cpp +++ b/pcbnew/zones_by_polygon_fill_functions.cpp @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include #include diff --git a/pcbnew/zones_convert_to_polygons_aux_functions.cpp b/pcbnew/zones_convert_to_polygons_aux_functions.cpp index f570ebdd4b..b9b5b9389b 100644 --- a/pcbnew/zones_convert_to_polygons_aux_functions.cpp +++ b/pcbnew/zones_convert_to_polygons_aux_functions.cpp @@ -235,7 +235,7 @@ void BuildUnconnectedThermalStubsPolygonList( CPOLYGONS_LIST& aCornerBuffer, RotatePoint( &ptTest[i], fAngle ); // translate point - ptTest[i] += pad->ReturnShapePos(); + ptTest[i] += pad->ShapePos(); if( aZone->HitTestFilledArea( ptTest[i] ) ) continue; @@ -280,7 +280,7 @@ void BuildUnconnectedThermalStubsPolygonList( CPOLYGONS_LIST& aCornerBuffer, { wxPoint cpos = corners_buffer[ic]; RotatePoint( &cpos, fAngle ); // Rotate according to module orientation - cpos += pad->ReturnShapePos(); // Shift origin to position + cpos += pad->ShapePos(); // Shift origin to position CPolyPt corner; corner.x = cpos.x; corner.y = cpos.y; diff --git a/pcbnew/zones_functions_for_undo_redo.cpp b/pcbnew/zones_functions_for_undo_redo.cpp index 52166bc5db..20519f4c45 100644 --- a/pcbnew/zones_functions_for_undo_redo.cpp +++ b/pcbnew/zones_functions_for_undo_redo.cpp @@ -43,7 +43,7 @@ */ #include -#include +#include #include #include diff --git a/pcbnew/zones_non_copper_type_functions.cpp b/pcbnew/zones_non_copper_type_functions.cpp index f6b2594bff..a8420eaaa2 100644 --- a/pcbnew/zones_non_copper_type_functions.cpp +++ b/pcbnew/zones_non_copper_type_functions.cpp @@ -3,7 +3,8 @@ */ #include -#include +//#include +#include #include #include #include @@ -77,7 +78,7 @@ void DIALOG_NON_COPPER_ZONES_EDITOR::Init() SetReturnCode( ZONE_ABORT ); // Will be changed on button click AddUnitSymbol( *m_MinThicknessValueTitle, g_UserUnit ); - wxString msg = ReturnStringFromValue( g_UserUnit, m_settings.m_ZoneMinThickness ); + wxString msg = StringFromValue( g_UserUnit, m_settings.m_ZoneMinThickness ); m_ZoneMinThicknessCtrl->SetValue( msg ); if( m_settings.m_Zone_45_Only ) @@ -127,7 +128,7 @@ void DIALOG_NON_COPPER_ZONES_EDITOR::OnOkClick( wxCommandEvent& event ) { wxString txtvalue = m_ZoneMinThicknessCtrl->GetValue(); - m_settings.m_ZoneMinThickness = ReturnValueFromString( g_UserUnit, txtvalue ); + m_settings.m_ZoneMinThickness = ValueFromString( g_UserUnit, txtvalue ); if( m_settings.m_ZoneMinThickness < 10 ) { @@ -153,11 +154,10 @@ void DIALOG_NON_COPPER_ZONES_EDITOR::OnOkClick( wxCommandEvent& event ) break; } - if( wxGetApp().GetSettings() ) - { - wxGetApp().GetSettings()->Write( ZONE_NET_OUTLINES_HATCH_OPTION_KEY, - (long) m_settings.m_Zone_HatchingStyle ); - } + wxConfigBase* cfg = Kiface().KifaceSettings(); + wxASSERT( cfg ); + + cfg->Write( ZONE_NET_OUTLINES_HATCH_OPTION_KEY, (long) m_settings.m_Zone_HatchingStyle ); if( m_OrientEdgesOpt->GetSelection() == 0 ) m_settings.m_Zone_45_Only = false; diff --git a/pcbnew/zones_polygons_test_connections.cpp b/pcbnew/zones_polygons_test_connections.cpp index ccc91634e2..108a554794 100644 --- a/pcbnew/zones_polygons_test_connections.cpp +++ b/pcbnew/zones_polygons_test_connections.cpp @@ -171,7 +171,7 @@ void BOARD::Test_Connections_To_Copper_Areas( int aNetcode ) // the pad position, because the zones are connected // to the center of the shape, not the pad position // (this is important for pads with thermal relief) - pos1 = pos2 = ( (D_PAD*) item )->ReturnShapePos(); + pos1 = pos2 = ( (D_PAD*) item )->ShapePos(); } else if( item->Type() == PCB_VIA_T ) { diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index eaa8a7f4d5..67c4cc363f 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -77,57 +77,3 @@ target_link_libraries( property_tree ${wxWidgets_LIBRARIES} ) - -#-------------------------------------------------- - -# The small launcher, it sets up wxWidgets library and loads a MODULE by the same name -# but with extension ${KIFACE_SUFFIX}. - -set( PAIR_BASE kiway_test ) - -add_executable( ${PAIR_BASE} WIN32 MACOSX_BUNDLE - EXCLUDE_FROM_ALL - ../common/single_top.cpp - ) -target_link_libraries( ${PAIR_BASE} - common - ${wxWidgets_LIBRARIES} - ) -if( APPLE ) - set_target_properties( ${PAIR_BASE} PROPERTIES - MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist - ) -endif() - - -# make a KIFACE top level DLL/DSO -add_library( ${PAIR_BASE}_kiface MODULE - EXCLUDE_FROM_ALL - kiface_test.cpp - ) -target_link_libraries( ${PAIR_BASE}_kiface - common - ${wxWidgets_LIBRARIES} - ) -set_target_properties( ${PAIR_BASE}_kiface PROPERTIES - OUTPUT_NAME ${PAIR_BASE} - PREFIX ${KIFACE_PREFIX} - SUFFIX ${KIFACE_SUFFIX} - ) - -# if you build ${PAIR_BASE}, then also build ${PAIR_BASE}_kiface if out of date. -add_dependencies( ${PAIR_BASE} ${PAIR_BASE}_kiface ) - -if( MAKE_LINK_MAPS ) - - # generate a link maps with cross reference - - set_target_properties( ${PAIR_BASE}_kiface PROPERTIES - LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=${KIFACE_PREFIX}${PAIR_BASE}${KIFACE_SUFFIX}.map" - ) - - set_target_properties( ${PAIR_BASE} PROPERTIES - LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=${PAIR_BASE}.map" - ) - -endif() diff --git a/tools/kiface_test.cpp b/tools/kiface_test.cpp deleted file mode 100644 index a7a5d89797..0000000000 --- a/tools/kiface_test.cpp +++ /dev/null @@ -1,60 +0,0 @@ - -#include -#include -#include - - -// test static initialization, and translation in the DSO: -wxString GlobalTitle = _( "Some Translatable Window Title Text" ); - -/// Implement a KIFACE, and create a static instance of one. -static struct SCH_FACE : public KIFACE -{ - wxWindow* CreateWindow( int aClassId, KIWAY* aKIWAY, int aCtlBits = 0 ) - { - switch( aClassId ) - { - // for now, I have no class: - default: - return new wxFrame( NULL, 0, GlobalTitle, wxPoint( 0, 0 ), wxSize( 600, 400 ) ); - } - } - - /** - * Function IfaceOrAddress - * return a pointer to the requested object. The safest way to use this - * is to retrieve a pointer to a static instance of an interface, similar to - * how the KIFACE interface is exported. But if you know what you are doing - * use it to retrieve anything you want. - * - * @param aDataId identifies which object you want the address of. - * - * @return void* - and must be cast into the known type. - */ - void* IfaceOrAddress( int aDataId ) - { - return NULL; - } - -} kiface_impl; - - -static wxApp* app; - -extern "C" KIFACE* KIFACE_GETTER( int* aKIFACEversion, int aKIWAYversion, wxApp* aProcess ); - -MY_API( KIFACE* ) KIFACE_GETTER( int* aKIFACEversion, int aKIWAYversion, wxApp* aProcess ) -{ - // record the app's address. - app = aProcess; - - // return a pointer to the KIFACE implementation. - return &kiface_impl; -} - - -wxApp& wxGetApp() -{ - return *app; -} - From dbc4a8f29261ce2739a64455447609b692989b2c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 20 Mar 2014 08:47:31 +0100 Subject: [PATCH 208/741] GAL zooms in and out using the default hot keys (F1/F2). Screen size is saved in VECTOR2I instead of VECTOR2D. --- common/gal/cairo/cairo_gal.cpp | 6 +++--- common/gal/graphics_abstraction_layer.cpp | 4 ++-- common/gal/opengl/opengl_gal.cpp | 4 ++-- common/view/view.cpp | 2 +- common/zoom.cpp | 5 +++-- include/gal/graphics_abstraction_layer.h | 4 ++-- include/view/view.h | 2 +- pcbnew/menubar_pcbframe.cpp | 20 ++++++++++---------- 8 files changed, 24 insertions(+), 23 deletions(-) diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index 393e851235..13055c7aed 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -70,7 +70,7 @@ CAIRO_GAL::CAIRO_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, #endif SetSize( aParent->GetSize() ); - screenSize = VECTOR2D( aParent->GetSize() ); + screenSize = VECTOR2I( aParent->GetSize() ); initCursor(); // Grid color settings are different in Cairo and OpenGL @@ -138,7 +138,7 @@ void CAIRO_GAL::EndDrawing() *wxOutputPtr++ = value & 0xff; // Blue pixel } - wxImage img( (int) screenSize.x, (int) screenSize.y, (unsigned char*) wxOutput, true ); + wxImage img( screenSize.x, screenSize.y, (unsigned char*) wxOutput, true ); wxBitmap bmp( img ); wxClientDC client_dc( this ); wxBufferedDC dc; @@ -283,7 +283,7 @@ void CAIRO_GAL::DrawCurve( const VECTOR2D& aStartPoint, const VECTOR2D& aControl void CAIRO_GAL::ResizeScreen( int aWidth, int aHeight ) { - screenSize = VECTOR2D( aWidth, aHeight ); + screenSize = VECTOR2I( aWidth, aHeight ); // Recreate the bitmaps deleteBitmaps(); diff --git a/common/gal/graphics_abstraction_layer.cpp b/common/gal/graphics_abstraction_layer.cpp index 7f57d652c4..724d14ac9e 100644 --- a/common/gal/graphics_abstraction_layer.cpp +++ b/common/gal/graphics_abstraction_layer.cpp @@ -88,7 +88,7 @@ void GAL::ComputeWorldScreenMatrix() MATRIX3x3D translation; translation.SetIdentity(); - translation.SetTranslation( 0.5 * screenSize ); + translation.SetTranslation( 0.5 * VECTOR2D( screenSize ) ); MATRIX3x3D scale; scale.SetIdentity(); @@ -131,7 +131,7 @@ void GAL::DrawGrid() // For the drawing the start points, end points and increments have // to be calculated in world coordinates VECTOR2D worldStartPoint = screenWorldMatrix * VECTOR2D( 0.0, 0.0 ); - VECTOR2D worldEndPoint = screenWorldMatrix * screenSize; + VECTOR2D worldEndPoint = screenWorldMatrix * VECTOR2D( screenSize ); int gridScreenSizeDense = round( gridSize.x * worldScale ); int gridScreenSizeCoarse = round( gridSize.x * static_cast( gridTick ) * worldScale ); diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 81028d6eea..fb8a0fcf4d 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -86,7 +86,7 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, #endif SetSize( aParent->GetSize() ); - screenSize = VECTOR2D( aParent->GetSize() ); + screenSize = VECTOR2I( aParent->GetSize() ); // Grid color settings are different in Cairo and OpenGL SetGridColor( COLOR4D( 0.8, 0.8, 0.8, 0.1 ) ); @@ -562,7 +562,7 @@ void OPENGL_GAL::DrawCurve( const VECTOR2D& aStartPoint, const VECTOR2D& aContro void OPENGL_GAL::ResizeScreen( int aWidth, int aHeight ) { - screenSize = VECTOR2D( aWidth, aHeight ); + screenSize = VECTOR2I( aWidth, aHeight ); // Resize framebuffers compositor.Resize( aWidth, aHeight ); diff --git a/common/view/view.cpp b/common/view/view.cpp index ba070b2786..5cfe071d9f 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -771,7 +771,7 @@ void VIEW::Redraw() } -const VECTOR2D& VIEW::GetScreenPixelSize() const +const VECTOR2I& VIEW::GetScreenPixelSize() const { return m_gal->GetScreenPixelSize(); } diff --git a/common/zoom.cpp b/common/zoom.cpp index 6add6bc2f6..859d5a4872 100644 --- a/common/zoom.cpp +++ b/common/zoom.cpp @@ -203,8 +203,9 @@ void EDA_DRAW_FRAME::OnZoom( wxCommandEvent& event ) double zoomFactor = gal->GetWorldScale() / gal->GetZoomFactor(); double zoom = 1.0 / ( zoomFactor * GetZoom() ); - view->SetScale( zoom ); - view->SetCenter( VECTOR2D( center ) ); + VECTOR2D cursorWorld( GetCrossHairPosition() ); + view->SetScale( zoom, cursorWorld ); + GetGalCanvas()->Refresh(); } diff --git a/include/gal/graphics_abstraction_layer.h b/include/gal/graphics_abstraction_layer.h index d49e5e2fad..50b5c355c7 100644 --- a/include/gal/graphics_abstraction_layer.h +++ b/include/gal/graphics_abstraction_layer.h @@ -160,7 +160,7 @@ public: virtual bool Show( bool aShow ) = 0; /// @brief Returns GAL canvas size in pixels - const VECTOR2D& GetScreenPixelSize() const + const VECTOR2I& GetScreenPixelSize() const { return screenSize; } @@ -831,7 +831,7 @@ public: protected: std::stack depthStack; ///< Stored depth values - VECTOR2D screenSize; ///< Screen size in screen coordinates + VECTOR2I screenSize; ///< Screen size in screen coordinates double worldUnitLength; ///< The unit length of the world coordinates [inch] double screenDPI; ///< The dots per inch of the screen diff --git a/include/view/view.h b/include/view/view.h index e103089ae0..694042724f 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -261,7 +261,7 @@ public: * Returns the size of the our rendering area, in pixels. * @return viewport screen size */ - const VECTOR2D& GetScreenPixelSize() const; + const VECTOR2I& GetScreenPixelSize() const; /** * Function AddLayer() diff --git a/pcbnew/menubar_pcbframe.cpp b/pcbnew/menubar_pcbframe.cpp index 3a340b0c47..f75bd16aaf 100644 --- a/pcbnew/menubar_pcbframe.cpp +++ b/pcbnew/menubar_pcbframe.cpp @@ -328,12 +328,12 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() */ // Zoom In text = AddHotkeyName( _( "Zoom &In" ), g_Pcbnew_Editor_Hokeys_Descr, - HK_ZOOM_IN, IS_ACCELERATOR ); + HK_ZOOM_IN ); AddMenuItem( viewMenu, ID_ZOOM_IN, text, HELP_ZOOM_IN, KiBitmap( zoom_in_xpm ) ); // Zoom Out text = AddHotkeyName( _( "Zoom &Out" ), g_Pcbnew_Editor_Hokeys_Descr, - HK_ZOOM_OUT, IS_ACCELERATOR ); + HK_ZOOM_OUT ); AddMenuItem( viewMenu, ID_ZOOM_OUT, text, HELP_ZOOM_OUT, KiBitmap( zoom_out_xpm ) ); // Fit on Screen @@ -366,38 +366,38 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() viewMenu->AppendSeparator(); text = AddHotkeyName( _( "&Switch canvas to default" ), g_Pcbnew_Editor_Hokeys_Descr, - HK_CANVAS_DEFAULT, IS_ACCELERATOR ); + HK_CANVAS_DEFAULT ); AddMenuItem( viewMenu, ID_MENU_CANVAS_DEFAULT, text, _( "Switch the canvas implementation to default" ), - KiBitmap( tools_xpm ) ); + KiBitmap( tools_xpm ) ); text = AddHotkeyName( _( "&Switch canvas to OpenGL" ), g_Pcbnew_Editor_Hokeys_Descr, - HK_CANVAS_OPENGL, IS_ACCELERATOR ); + HK_CANVAS_OPENGL ); AddMenuItem( viewMenu, ID_MENU_CANVAS_OPENGL, text, _( "Switch the canvas implementation to OpenGL" ), - KiBitmap( tools_xpm ) ); + KiBitmap( tools_xpm ) ); text = AddHotkeyName( _( "&Switch canvas to Cairo" ), g_Pcbnew_Editor_Hokeys_Descr, - HK_CANVAS_CAIRO, IS_ACCELERATOR ); + HK_CANVAS_CAIRO ); AddMenuItem( viewMenu, ID_MENU_CANVAS_CAIRO, text, _( "Switch the canvas implementation to Cairo" ), - KiBitmap( tools_xpm ) ); + KiBitmap( tools_xpm ) ); /** Create Place Menu **/ wxMenu* placeMenu = new wxMenu; // Module text = AddHotkeyName( _( "&Module" ), g_Pcbnew_Editor_Hokeys_Descr, - HK_ADD_MODULE, IS_ACCELERATOR ); + HK_ADD_MODULE ); AddMenuItem( placeMenu, ID_PCB_MODULE_BUTT, text, _( "Add modules" ), KiBitmap( module_xpm ) ); // Track text = AddHotkeyName( _( "&Track" ), g_Pcbnew_Editor_Hokeys_Descr, - HK_ADD_NEW_TRACK, IS_ACCELERATOR ); + HK_ADD_NEW_TRACK ); AddMenuItem( placeMenu, ID_TRACK_BUTT, text, _( "Add tracks and vias" ), KiBitmap( add_tracks_xpm ) ); From 426844896e9415160b669d41eeb38c8ab5f97729 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 20 Mar 2014 11:31:32 +0100 Subject: [PATCH 209/741] Minor fixes (check for net codes size for ratsnest, cursor coordinates are not always shown as if the cursor was snapped). --- common/drawframe.cpp | 1 - include/wxPcbStruct.h | 2 -- pcbnew/ratsnest_data.cpp | 2 +- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/common/drawframe.cpp b/common/drawframe.cpp index 152152fe1a..31048df82f 100644 --- a/common/drawframe.cpp +++ b/common/drawframe.cpp @@ -1023,7 +1023,6 @@ wxPoint EDA_DRAW_FRAME::GetCrossHairPosition( bool aInvertY ) const if( IsGalCanvasActive() ) { VECTOR2I cursor = GetGalCanvas()->GetViewControls()->GetCursorPosition(); - cursor = GetGalCanvas()->GetGAL()->GetGridPoint( cursor ); return wxPoint( cursor.x, cursor.y ); } diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index be47c3bd22..1298f96e1f 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -216,8 +216,6 @@ public: bool m_show_microwave_tools; bool m_show_layer_manager_tools; - -public: PCB_EDIT_FRAME( wxWindow* father, const wxString& title, const wxPoint& pos, const wxSize& size, long style = KICAD_DEFAULT_DRAWFRAME_STYLE ); diff --git a/pcbnew/ratsnest_data.cpp b/pcbnew/ratsnest_data.cpp index 5bff81fe4f..4242ea6bf1 100644 --- a/pcbnew/ratsnest_data.cpp +++ b/pcbnew/ratsnest_data.cpp @@ -1024,7 +1024,7 @@ void RN_DATA::updateNet( int aNetCode ) { assert( aNetCode < (int) m_nets.size() ); - if( aNetCode < 1 ) + if( aNetCode < 1 || aNetCode > m_nets.size() ) return; m_nets[aNetCode].ClearSimple(); From 141f3fed45226ba8e1ba68e5e180fb5c0ccab0f1 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Thu, 20 Mar 2014 09:18:32 -0500 Subject: [PATCH 210/741] some doxygen fixes, comment fixes --- include/bin_mod.h | 2 +- include/kiface_i.h | 2 +- include/kiway.h | 2 +- include/kiway_player.h | 6 ++- kicad/kicad.cpp | 91 +++--------------------------------------- 5 files changed, 13 insertions(+), 90 deletions(-) diff --git a/include/bin_mod.h b/include/bin_mod.h index c834f2cd7c..edfc9cf8e7 100644 --- a/include/bin_mod.h +++ b/include/bin_mod.h @@ -54,7 +54,7 @@ struct BIN_MOD const char* m_name; ///< name of this binary module, static C string. - wxConfigBase* m_config; ///< maybe from $HOME/. + wxConfigBase* m_config; ///< maybe from $HOME/.${m_name} wxFileHistory m_history; wxString m_help_file; diff --git a/include/kiface_i.h b/include/kiface_i.h index b0b455f971..23f89dffbf 100644 --- a/include/kiface_i.h +++ b/include/kiface_i.h @@ -71,7 +71,7 @@ public: * * @param aKifaceName should point to a C string in permanent storage, * which contains the name of the DSO. Examples: "eeschema", "pcbnew", etc. - * This controls the name of the wxConfigBase established in m_kiway_settings, + * This controls the name of the wxConfigBase established in m_bm, * so it should be lowercase. */ KIFACE_I( const char* aKifaceName, KIWAY::FACE_T aId ) : diff --git a/include/kiway.h b/include/kiway.h index dd83cc93f7..7cf4b7786b 100644 --- a/include/kiway.h +++ b/include/kiway.h @@ -194,7 +194,7 @@ struct KIFACE * * @param aKIWAY tells the window which KIWAY (and PROJECT) it is a participant in. * - * @param aCtlBits consists of bit flags from the set of KFCTL_* #defines above. + * @param aCtlBits consists of bit flags from the set of KFCTL_* \#defines above. * * @return wxWindow* - and if not NULL, should be cast into the known type using * dynamic_cast<>(). diff --git a/include/kiway_player.h b/include/kiway_player.h index 1798b1ba56..2ffab5acb6 100644 --- a/include/kiway_player.h +++ b/include/kiway_player.h @@ -65,7 +65,7 @@ public: * Function Prj * returns a reference to the PROJECT "associated with" this KIWAY. */ - PROJECT& Prj() const; // coded in kiface_i.cpp for now + PROJECT& Prj() const; /** * Function SetKiway @@ -76,7 +76,7 @@ public: * * @param aKiway is often from a parent window, or from KIFACE::CreateWindow(). */ - void SetKiway( wxWindow* aDest, KIWAY* aKiway ); // in kiface_i.cpp for now + void SetKiway( wxWindow* aDest, KIWAY* aKiway ); private: // private, all setting is done through SetKiway(). @@ -142,6 +142,8 @@ public: * according to the knowledge in the derived wxFrame. In almost every case, * the list will have only a single file in it. * + * @param aCtl is a set of bit flags ORed together from the set of KICTL_* \#defined above. + * * @return bool - true if all requested files were opened OK, else false. */ virtual bool OpenProjectFiles( const std::vector& aFileList, int aCtl = 0 ) diff --git a/kicad/kicad.cpp b/kicad/kicad.cpp index 4fc1831a5f..742121c781 100644 --- a/kicad/kicad.cpp +++ b/kicad/kicad.cpp @@ -199,8 +199,9 @@ void PGM_KICAD::destroy() /** * Class KIWAY_MGR - * is container for all (KIWAYS and PROJECTS). This class needs to work both for a C++ - * project manager and an a wxPython one (after being moved into a header later). + * is a container for all KIWAYS [and PROJECTS]. This class needs to work both + * for a C++ project manager and an a wxPython one (after being moved into a + * header later). */ class KIWAY_MGR { @@ -220,7 +221,8 @@ public: private: - // KIWAYs may not be moved once doled out. + // KIWAYs may not be moved once doled out, since window DNA depends on the + // pointer being good forever. // boost_ptr::vector however never moves the object pointed to. typedef boost::ptr_vector KIWAYS; @@ -280,6 +282,7 @@ PROJECT& Prj() bool KIWAY_MGR::OnStart( wxApp* aProcess ) { // The C++ project manager supports only one open PROJECT + // We should need no copy constructor for KIWAY to push a pointer. m_kiways.push_back( new KIWAY() ); return true; @@ -289,85 +292,3 @@ bool KIWAY_MGR::OnStart( wxApp* aProcess ) void KIWAY_MGR::OnEnd() { } - - -/* -static bool init( KICAD_PGM* aProcess, const wxString& aName ) -{ - m_Id = aId; - m_Checker = new wxSingleInstanceChecker( aName.Lower() + wxT( "-" ) + wxGetUserId() ); - - // Init KiCad environment - // the environment variable KICAD (if exists) gives the kicad path: - // something like set KICAD=d:\kicad - bool isDefined = wxGetEnv( wxT( "KICAD" ), &m_KicadEnv ); - - if( isDefined ) // ensure m_KicadEnv ends by "/" - { - m_KicadEnv.Replace( WIN_STRING_DIR_SEP, UNIX_STRING_DIR_SEP ); - - if( !m_KicadEnv.IsEmpty() && m_KicadEnv.Last() != '/' ) - m_KicadEnv += UNIX_STRING_DIR_SEP; - } - - // Prepare On Line Help. Use only lower case for help file names, in order to - // avoid problems with upper/lower case file names under windows and unix. -#if defined ONLINE_HELP_FILES_FORMAT_IS_HTML - m_HelpFileName = aName.Lower() + wxT( ".html" ); -#elif defined ONLINE_HELP_FILES_FORMAT_IS_PDF - m_HelpFileName = aName.Lower() + wxT( ".pdf" ); -#else - #error Help files format not defined -#endif - - // Init parameters for configuration - SetVendorName( wxT( "KiCad" ) ); - SetAppName( aName.Lower() ); - SetTitle( aName ); - - m_settings = new wxConfig(); - - wxASSERT( m_settings != NULL ); - - m_commonSettings = new wxConfig( CommonConfigPath ); - wxASSERT( m_commonSettings != NULL ); - - // Install some image handlers, mainly for help - wxImage::AddHandler( new wxPNGHandler ); - wxImage::AddHandler( new wxGIFHandler ); - wxImage::AddHandler( new wxJPEGHandler ); - wxFileSystem::AddHandler( new wxZipFSHandler ); - - // Analyze the command line & init binary path - SetBinDir(); - SetDefaultSearchPaths(); - SetLanguagePath(); - ReadPdfBrowserInfos(); - - // Internationalization: loading the kicad suitable Dictionary - wxString languageSel; - m_commonSettings->Read( languageCfgKey, &languageSel); - - setLanguageId( wxLANGUAGE_DEFAULT ); - - // Search for the current selection - for( unsigned ii = 0; ii < DIM( s_Languages ); ii++ ) - { - if( s_Languages[ii].m_Lang_Label == languageSel ) - { - setLanguageId( s_Languages[ii].m_WX_Lang_Identifier ); - break; - } - } - - bool succes = SetLanguage( true ); - - if( !succes ) - { - } - - // Set locale option for separator used in float numbers - SetLocaleTo_Default(); -} -*/ - From 223419a8f6e881b6270ffdc35aa0165694f9842e Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Thu, 20 Mar 2014 11:32:34 -0500 Subject: [PATCH 211/741] documentation clarity --- common/kiway.cpp | 12 +++++------- include/kiway.h | 26 +++++++++++++------------- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/common/kiway.cpp b/common/kiway.cpp index 01197f64c5..577f118e66 100644 --- a/common/kiway.cpp +++ b/common/kiway.cpp @@ -35,10 +35,11 @@ wxDynamicLibrary KIWAY::s_pcb_dso; KIWAY::KIWAY() { - memset( &m_dso_players, 0, sizeof( m_dso_players ) ); + memset( &m_kiface, 0, sizeof( m_kiface ) ); } +/* const wxString KIWAY::dso_name( FACE_T aFaceId ) { switch( aFaceId ) @@ -51,6 +52,7 @@ const wxString KIWAY::dso_name( FACE_T aFaceId ) return wxEmptyString; } } +*/ PROJECT& KIWAY::Prj() const @@ -65,10 +67,8 @@ KIFACE* KIWAY::KiFACE( FACE_T aFaceId, bool doLoad ) { case FACE_SCH: case FACE_PCB: - //case FACE_LIB: - //case FACE_MOD: - if( m_dso_players[aFaceId] ) - return m_dso_players[aFaceId]; + if( m_kiface[aFaceId] ) + return m_kiface[aFaceId]; default: wxASSERT_MSG( 0, wxT( "caller has a bug, passed a bad aFaceId" ) ); @@ -86,8 +86,6 @@ KIFACE* KIWAY::KiFACE( FACE_T aFaceId, bool doLoad ) case FACE_PCB: break; - //case FACE_LIB: - //case FACE_MOD: default: ; } diff --git a/include/kiway.h b/include/kiway.h index 7cf4b7786b..b13f8b88e4 100644 --- a/include/kiway.h +++ b/include/kiway.h @@ -159,7 +159,7 @@ struct KIFACE * should do process level initialization here, not project specific since there * will be multiple projects open eventually. * - * @param aProcess is the process block: PGM_BASE* + * @param aProgram is the process block: PGM_BASE* * * @return bool - true if DSO initialized OK, false if not. When returning * false, the loader may optionally decide to terminate the process or not, @@ -173,8 +173,6 @@ struct KIFACE * Function OnKifaceEnd * is called just once just before the DSO is to be unloaded. It is called * before static C++ destructors are called. A default implementation is supplied. - * - * @param aProcess is the process block: PGM_BASE* */ VTBL_ENTRY void OnKifaceEnd() = 0; @@ -197,7 +195,8 @@ struct KIFACE * @param aCtlBits consists of bit flags from the set of KFCTL_* \#defines above. * * @return wxWindow* - and if not NULL, should be cast into the known type using - * dynamic_cast<>(). + * and old school cast. dynamic_cast is problemenatic since it needs typeinfo probably + * not contained in the caller's link image. */ VTBL_ENTRY wxWindow* CreateWindow( wxWindow* aParent, int aClassId, KIWAY* aKIWAY, int aCtlBits = 0 ) = 0; @@ -232,7 +231,7 @@ struct KIFACE * are used to hold function pointers and eliminate the need to link to specific * object code libraries, speeding development and encouraging clearly defined * interface design. Unlike Microsoft COM, which is a multi-vendor design supporting - * DLL's built at various points in time. The KIWAY alchemy is single project, with + * DLL's built at various points in time, the KIWAY alchemy is single project, with * all components being built at the same time. So one should expect solid compatibility * between all KiCad components, as long at they are compiled at the same time. *

@@ -290,15 +289,17 @@ public: private: + /* /// Get the name of the DSO holding the requested FACE_T. static const wxString dso_name( FACE_T aFaceId ); + */ // one for each FACE_T static wxDynamicLibrary s_sch_dso; static wxDynamicLibrary s_pcb_dso; //static wxDynamicLibrary s_cvpcb_dso; // will get merged into pcbnew - KIFACE* m_dso_players[FACE_COUNT]; + KIFACE* m_kiface[FACE_COUNT]; PROJECT m_project; // do not assume this is here, use Prj(). }; @@ -308,19 +309,18 @@ private: * Function Pointer KIFACE_GETTER_FUNC * points to the one and only KIFACE export. The export's address * is looked up via symbolic string and should be extern "C" to avoid name - * mangling. That function can also implement process initialization functionality, - * things to do once per process that is DSO resident. This function will only be - * called one time. The DSO itself however may be asked to support multiple - * Top windows, i.e. multiple projects within its lifetime. + * mangling. This function will only be called one time. The DSO itself however + * may be asked to support multiple Top windows, i.e. multiple projects + * within its lifetime. * * @param aKIFACEversion is where to put the API version implemented by the KIFACE. * @param aKIWAYversion tells the KIFACE what KIWAY version will be available. - * @param aProcess is a pointer to the PGM_BASE for this process. - * @return KIFACE* - unconditionally. + * @param aProgram is a pointer to the PGM_BASE for this process. + * @return KIFACE* - unconditionally, cannot fail. */ typedef KIFACE* KIFACE_GETTER_FUNC( int* aKIFACEversion, int aKIWAYversion, PGM_BASE* aProgram ); -/// No name mangling. Each TOPMOD will implement this once. +/// No name mangling. Each KIFACE (DSO/DLL) will implement this once. extern "C" KIFACE* KIFACE_GETTER( int* aKIFACEversion, int aKIWAYversion, PGM_BASE* aProgram ); #endif // KIWAY_H_ From 34dda6a1b09d5aad02d973d21af470884ae0d577 Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Thu, 20 Mar 2014 14:07:19 -0400 Subject: [PATCH 212/741] Fix windows build error for missing path separator definitions. * Use wxFileName::GetPathSeparator() instead of redefining them. --- common/systemdirsappend.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/systemdirsappend.cpp b/common/systemdirsappend.cpp index 65f7bfc2c0..0aefd88502 100644 --- a/common/systemdirsappend.cpp +++ b/common/systemdirsappend.cpp @@ -45,7 +45,8 @@ void SystemDirsAppend( SEARCH_STACK* aSearchStack ) // bin_dir uses unix path separator. So to parse with wxFileName // use windows separator, especially important for server inclusion: // like: \\myserver\local_path . - bin_dir.Replace( UNIX_STRING_DIR_SEP, WIN_STRING_DIR_SEP ); + bin_dir.Replace( wxFileName::GetPathSeparator( wxPATH_UNIX ), + wxFileName::GetPathSeparator( wxPATH_WIN ) ); #endif wxFileName bin_fn( bin_dir, wxEmptyString ); From a7f1939203b8053a2db2382fe338ce891471871d Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Thu, 20 Mar 2014 20:24:35 -0500 Subject: [PATCH 213/741] simplify and fix the technique used to get the project fp-lib-table --- common/fp_lib_table.cpp | 84 +++++++--------------------------------- common/project.cpp | 43 ++++++++++++++++++++ cvpcb/cfg.cpp | 7 +--- cvpcb/cvframe.cpp | 38 +++++++++--------- cvpcb/readwrite_dlgs.cpp | 20 +++++----- include/fp_lib_table.h | 19 +++++---- include/project.h | 7 ++++ pcbnew/basepcbframe.cpp | 4 ++ pcbnew/files.cpp | 22 +++++------ pcbnew/pcbnew.cpp | 3 ++ pcbnew/pcbnew_config.cpp | 66 +++++++++++++++---------------- 11 files changed, 160 insertions(+), 153 deletions(-) diff --git a/common/fp_lib_table.cpp b/common/fp_lib_table.cpp index 9bbb47c692..8c0d6f5a29 100644 --- a/common/fp_lib_table.cpp +++ b/common/fp_lib_table.cpp @@ -24,6 +24,7 @@ */ +#include #include // wxExpandEnvVars() #include #include @@ -45,19 +46,6 @@ using namespace FP_LIB_TABLE_T; -/** - * Definition for enabling and disabling footprint library trace output. See the - * wxWidgets documentation on using the WXTRACE environment variable. - */ -static const wxString traceFpLibTable( wxT( "KicadFpLibTable" ) ); - - -/// The footprint library table name used when no project file is passed to Pcbnew or CvPcb. -/// This is used temporarily to store the project specific library table until the project -/// file being edited is saved. It is then moved to the file fp-lib-table in the folder where -/// the project file is saved. -static const wxChar templateProjectFileName[] = wxT( "prj-fp-lib-table" ); - static const wxChar global_tbl_name[] = wxT( "fp-lib-table" ); @@ -408,19 +396,6 @@ void FP_LIB_TABLE::ROW::Format( OUTPUTFORMATTER* out, int nestLevel ) const ); } - -void FP_LIB_TABLE::Save( const wxFileName& aPath ) const throw( IO_ERROR ) -{ - wxFileName fn = GetProjectTableFileName( aPath.GetFullPath() ); - - wxLogTrace( traceFpLibTable, wxT( "Saving footprint libary table <%s>." ), - GetChars( fn.GetFullPath() ) ); - - FILE_OUTPUTFORMATTER sf( fn.GetFullPath() ); - Format( &sf, 0 ); -} - - #define OPT_SEP '|' ///< options separator character PROPERTIES* FP_LIB_TABLE::ParseOptions( const std::string& aOptionsList ) @@ -842,34 +817,6 @@ const wxString FP_LIB_TABLE::GlobalPathEnvVariableName() } -wxString FP_LIB_TABLE::GetProjectTableFileName( const wxString& aProjectFullName ) -{ - wxFileName fn = aProjectFullName; - wxString path = fn.GetPath(); - - // Set $KICAD_PRJ_PATH to user's configuration path if aPath is not set or does not exist. - - if( !fn.IsOk() || !wxFileName::IsDirReadable( path ) ) - { - fn.AssignDir( wxStandardPaths::Get().GetUserConfigDir() ); - -#if defined( __WINDOWS__ ) - fn.AppendDir( wxT( "kicad" ) ); -#endif - fn.SetName( templateProjectFileName ); - } - else - { - fn.SetName( global_tbl_name ); - } - - wxLogTrace( traceFpLibTable, wxT( "Project footprint lib table file '%s'." ), - GetChars( fn.GetFullPath() ) ); - - return fn.GetFullPath(); -} - - bool FP_LIB_TABLE::LoadGlobalTable( FP_LIB_TABLE& aTable ) throw (IO_ERROR, PARSE_ERROR ) { bool tableExists = true; @@ -911,39 +858,38 @@ wxString FP_LIB_TABLE::GetGlobalTableFileName() { wxFileName fn; + // This is possibly problematic with an uncertain wxApp title, which is now + // the case. We'll need a better technique soon. fn.SetPath( wxStandardPaths::Get().GetUserConfigDir() ); #if defined( __WINDOWS__ ) fn.AppendDir( wxT( "kicad" ) ); #endif - fn.SetName( GetFileName() ); - - wxLogTrace( traceFpLibTable, wxT( "Global footprint library table file '%s'." ), - GetChars( fn.GetFullPath() ) ); + fn.SetName( global_tbl_name ); return fn.GetFullPath(); } +// prefer wxString filename so it can be seen in a debugger easier than wxFileName. -const wxString FP_LIB_TABLE::GetFileName() -{ - return global_tbl_name; -} - - -void FP_LIB_TABLE::Load( const wxFileName& aFileName, FP_LIB_TABLE* aFallBackTable ) +void FP_LIB_TABLE::Load( const wxString& aFileName ) throw( IO_ERROR ) { - fallBack = aFallBackTable; - // Empty footprint library tables are valid. - if( aFileName.IsOk() && aFileName.FileExists() ) + if( wxFileName::IsFileReadable( aFileName ) ) { - FILE_LINE_READER reader( aFileName.GetFullPath() ); + FILE_LINE_READER reader( aFileName ); FP_LIB_TABLE_LEXER lexer( &reader ); Parse( &lexer ); } } + +void FP_LIB_TABLE::Save( const wxString& aFileName ) const throw( IO_ERROR ) +{ + FILE_OUTPUTFORMATTER sf( aFileName ); + Format( &sf, 0 ); +} + diff --git a/common/project.cpp b/common/project.cpp index 48514ffd2a..b69926e574 100644 --- a/common/project.cpp +++ b/common/project.cpp @@ -82,6 +82,49 @@ const wxString PROJECT::GetProjectFullName() const } +const wxString PROJECT::FootprintLibTblName() const +{ + wxFileName fn = GetProjectFullName(); + wxString path = fn.GetPath(); + + // DBG(printf( "path:'%s' fn:'%s'\n", TO_UTF8(path), TO_UTF8(fn.GetFullPath()) );) + + // if there's no path to the project name, or the name as a whole is bogus or its not + // write-able then use a template file. + if( !fn.GetDirCount() || !fn.IsOk() || !wxFileName::IsDirWritable( path ) ) + { + // return a template filename now. + + // this next line is likely a problem now, since it relies on an + // application title which is no longer constant or known. This next line needs + // to be re-thought out. + + fn.AssignDir( wxStandardPaths::Get().GetUserConfigDir() ); + +#if defined( __WINDOWS__ ) + fn.AppendDir( wxT( "kicad" ) ); +#endif + + /* + The footprint library table name used when no project file is passed + to Pcbnew or CvPcb. This is used temporarily to store the project + specific library table until the project file being edited is saved. + It is then moved to the file fp-lib-table in the folder where the + project file is saved. + */ + fn.SetName( wxT( "prj-fp-lib-table" ) ); + } + else // normal path. + { + fn.SetName( wxT( "fp-lib-table" ) ); + } + + fn.ClearExt(); + + return fn.GetFullPath(); +} + + RETAINED_PATH& PROJECT::RPath( RETPATH_T aIndex ) { unsigned ndx = unsigned( aIndex ); diff --git a/cvpcb/cfg.cpp b/cvpcb/cfg.cpp index 28c9d9816e..c7b5986362 100644 --- a/cvpcb/cfg.cpp +++ b/cvpcb/cfg.cpp @@ -93,14 +93,11 @@ void CVPCB_MAINFRAME::LoadProjectFile( const wxString& aFileName ) prj.SetProjectFullName( fn.GetFullPath() ); */ - wxFileName projectFpLibTableFileName = FP_LIB_TABLE::GetProjectTableFileName( fn.GetFullPath() ); + wxString projectFpLibTableFileName = prj.FootprintLibTblName(); try { - // Stack the project specific FP_LIB_TABLE overlay on top of the global table. - // ~FP_LIB_TABLE() will not touch the fallback table, so multiple projects may - // stack this way, all using the same global fallback table. - FootprintLibs()->Load( projectFpLibTableFileName, &GFootprintTable ); + FootprintLibs()->Load( projectFpLibTableFileName ); } catch( const IO_ERROR& ioe ) { diff --git a/cvpcb/cvframe.cpp b/cvpcb/cvframe.cpp index e02774d814..ae14ead1f2 100644 --- a/cvpcb/cvframe.cpp +++ b/cvpcb/cvframe.cpp @@ -210,6 +210,9 @@ FP_LIB_TABLE* CVPCB_MAINFRAME::FootprintLibs() const if( !tbl ) { + // Stack the project specific FP_LIB_TABLE overlay on top of the global table. + // ~FP_LIB_TABLE() will not touch the fallback table, so multiple projects may + // stack this way, all using the same global fallback table. tbl = new FP_LIB_TABLE( &GFootprintTable ); prj.Elem( PROJECT::FPTBL, tbl ); } @@ -499,46 +502,45 @@ void CVPCB_MAINFRAME::ConfigCvpcb( wxCommandEvent& event ) void CVPCB_MAINFRAME::OnEditFootprintLibraryTable( wxCommandEvent& aEvent ) { - bool tableChanged = false; - int r = InvokePcbLibTableEditor( this, &GFootprintTable, FootprintLibs() ); + bool tableChanged = false; + int r = InvokePcbLibTableEditor( this, &GFootprintTable, FootprintLibs() ); if( r & 1 ) { + wxString fileName = FP_LIB_TABLE::GetGlobalTableFileName(); + try { - FILE_OUTPUTFORMATTER sf( FP_LIB_TABLE::GetGlobalTableFileName() ); - - GFootprintTable.Format( &sf, 0 ); + GFootprintTable.Save( fileName ); tableChanged = true; } catch( const IO_ERROR& ioe ) { wxString msg = wxString::Format( _( - "Error occurred saving the global footprint library " - "table:\n\n%s" ), - GetChars( ioe.errorText ) ); - + "Error occurred saving the global footprint library table:\n'%s'\n%s" ), + GetChars( fileName ), + GetChars( ioe.errorText ) + ); wxMessageBox( msg, _( "File Save Error" ), wxOK | wxICON_ERROR ); } } if( r & 2 ) { - wxFileName fn = m_NetlistFileName; - fn.SetName( FP_LIB_TABLE::GetFileName() ); - fn.SetExt( wxEmptyString ); + wxString fileName = Prj().FootprintLibTblName(); try { - FILE_OUTPUTFORMATTER sf( fn.GetFullPath() ); - FootprintLibs()->Format( &sf, 0 ); + FootprintLibs()->Save( fileName ); tableChanged = true; } - catch( IO_ERROR& ioe ) + catch( const IO_ERROR& ioe ) { - wxString msg; - msg.Printf( _( "Error occurred saving the global footprint library " - "table:\n\n%s" ), ioe.errorText.GetData() ); + wxString msg = wxString::Format( _( + "Error occurred saving the project footprint library table:\n'%s'\n%s" ), + GetChars( fileName ), + GetChars( ioe.errorText ) + ); wxMessageBox( msg, _( "File Save Error" ), wxOK | wxICON_ERROR ); } } diff --git a/cvpcb/readwrite_dlgs.cpp b/cvpcb/readwrite_dlgs.cpp index d55a79df14..6c07864ae0 100644 --- a/cvpcb/readwrite_dlgs.cpp +++ b/cvpcb/readwrite_dlgs.cpp @@ -317,25 +317,25 @@ int CVPCB_MAINFRAME::SaveCmpLinkFile( const wxString& aFullFileName ) // Save the project specific footprint library table. if( !FootprintLibs()->IsEmpty( false ) ) { - wxFileName fpLibFileName = fn; - fpLibFileName.ClearExt(); - fpLibFileName.SetName( FP_LIB_TABLE::GetFileName() ); + wxString fp_lib_tbl = Prj().FootprintLibTblName(); - if( fpLibFileName.FileExists() + if( wxFileName::FileExists( fp_lib_tbl ) && IsOK( this, _( "A footprint library table already exists in this path.\n\nDo " "you want to overwrite it?" ) ) ) { try { - FootprintLibs()->Save( fpLibFileName ); + FootprintLibs()->Save( fp_lib_tbl ); } catch( const IO_ERROR& ioe ) { - DisplayError( this, - wxString::Format( _( "An error occurred attempting to save the " - "footprint library table <%s>\n\n%s" ), - GetChars( fpLibFileName.GetFullPath() ), - GetChars( ioe.errorText ) ) ); + wxString msg = wxString::Format( _( + "An error occurred attempting to save the " + "footprint library table '%s'\n\n%s" ), + GetChars( fp_lib_tbl ), + GetChars( ioe.errorText ) + ); + DisplayError( this, msg ); } } } diff --git a/include/fp_lib_table.h b/include/fp_lib_table.h index a4c7c020d7..e4f589e53d 100644 --- a/include/fp_lib_table.h +++ b/include/fp_lib_table.h @@ -357,8 +357,6 @@ public: */ void Format( OUTPUTFORMATTER* out, int nestLevel ) const throw( IO_ERROR ); - void Save( const wxFileName& aPath ) const throw( IO_ERROR ); - /** * Function GetLogicalLibs * returns the logical library names, all of them that are pertinent to @@ -544,11 +542,13 @@ public: */ static wxString GetGlobalTableFileName(); +#if 0 /** * Function GetFileName * @return the footprint library file name. */ static const wxString GetFileName(); +#endif /** * Function GlobalPathEnvVarVariableName @@ -560,19 +560,24 @@ public: */ static const wxString GlobalPathEnvVariableName(); - static wxString GetProjectTableFileName( const wxString& aProjectFullName ); - /** * Function Load * loads the footprint library table using the path defined in \a aFileName with * \a aFallBackTable. * - * @param aFileName contains the path and possible the file name and extension. - * @param aFallBackTable the fall back footprint library table which can be NULL. + * @param aFileName contains the full path to the s-expression file. + * * @throw IO_ERROR if an error occurs attempting to load the footprint library * table. */ - void Load( const wxFileName& aFileName, FP_LIB_TABLE* aFallBackTable ) throw( IO_ERROR ); + void Load( const wxString& aFileName ) throw( IO_ERROR ); + + /** + * Function Save + * writes this table to aFileName in s-expression form. + * @param aFileName is the name of the file to write to. + */ + void Save( const wxString& aFileName ) const throw( IO_ERROR ); protected: diff --git a/include/project.h b/include/project.h index a187aa5491..202d957eb8 100644 --- a/include/project.h +++ b/include/project.h @@ -82,6 +82,13 @@ public: */ VTBL_ENTRY const wxString GetProjectFullName() const; + /** + * Function FootprintLibTblName + * returns the path and filename of this project's fp-lib-table, + * i.e. the project specific one, not the global one. + */ + VTBL_ENTRY const wxString FootprintLibTblName() const; + /** * Function ConfigSave * saves the current "project" parameters into the wxConfigBase* derivative. diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index bc893a7a05..1afb7e71c6 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -181,7 +181,11 @@ FP_LIB_TABLE* PCB_BASE_FRAME::FootprintLibs() const if( !tbl ) { + // Stack the project specific FP_LIB_TABLE overlay on top of the global table. + // ~FP_LIB_TABLE() will not touch the fallback table, so multiple projects may + // stack this way, all using the same global fallback table. tbl = new FP_LIB_TABLE( &GFootprintTable ); + prj.Elem( PROJECT::FPTBL, tbl ); } diff --git a/pcbnew/files.cpp b/pcbnew/files.cpp index c62010d22c..d95a13df2c 100644 --- a/pcbnew/files.cpp +++ b/pcbnew/files.cpp @@ -605,25 +605,25 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool aCreateBackupF // Save the project specific footprint library table. if( !FootprintLibs()->IsEmpty( false ) ) { - wxFileName fn = pcbFileName; - fn.ClearExt(); - fn.SetName( FP_LIB_TABLE::GetFileName() ); + wxString fp_lib_tbl = Prj().FootprintLibTblName(); - if( fn.FileExists() + if( wxFileName::FileExists( fp_lib_tbl ) && IsOK( this, _( "A footprint library table already exists in this path.\n\nDo " "you want to overwrite it?" ) ) ) { try { - FootprintLibs()->Save( fn ); + FootprintLibs()->Save( fp_lib_tbl ); } - catch( IO_ERROR& ioe ) + catch( const IO_ERROR& ioe ) { - DisplayError( this, - wxString::Format( _( "An error occurred attempting to save the " - "footprint library table '%s'\n\n%s" ), - GetChars( fn.GetFullPath() ), - GetChars( ioe.errorText ) ) ); + wxString msg = wxString::Format( _( + "An error occurred attempting to save the " + "footprint library table '%s'\n\n%s" ), + GetChars( fp_lib_tbl ), + GetChars( ioe.errorText ) + ); + DisplayError( this, msg ); } } } diff --git a/pcbnew/pcbnew.cpp b/pcbnew/pcbnew.cpp index 59946a6c08..25ae74fa72 100644 --- a/pcbnew/pcbnew.cpp +++ b/pcbnew/pcbnew.cpp @@ -478,6 +478,9 @@ void IFACE::OnKifaceEnd() // wxPython will do its own cleanup as part of that process. // This should only be called if python was setup correctly. +/* bring this in, but without a linker error: pcbnewFinishPythonScripting(); +*/ + #endif } diff --git a/pcbnew/pcbnew_config.cpp b/pcbnew/pcbnew_config.cpp index 8046ff7a45..0a8934f528 100644 --- a/pcbnew/pcbnew_config.cpp +++ b/pcbnew/pcbnew_config.cpp @@ -82,13 +82,13 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event ) case ID_MENU_PCB_SHOW_HIDE_MUWAVE_TOOLBAR: m_show_microwave_tools = ! m_show_microwave_tools; m_auimgr.GetPane( wxT( "m_microWaveToolBar" ) ).Show( m_show_microwave_tools ); - m_auimgr.Update(); + m_auimgr.Update(); GetMenuBar()->SetLabel( ID_MENU_PCB_SHOW_HIDE_MUWAVE_TOOLBAR, m_show_microwave_tools ? _( "Hide Microwave Toolbar" ): _( "Show Microwave Toolbar" )); break; - + case ID_PCB_LAYERS_SETUP: InstallDialogLayerSetup(); @@ -108,7 +108,7 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event ) GFootprintTable.Format( &sf, 0 ); tableChanged = true; } - catch( IO_ERROR& ioe ) + catch( const IO_ERROR& ioe ) { wxString msg = wxString::Format( _( "Error occurred saving the global footprint library " @@ -123,18 +123,20 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event ) // is kept in memory and created in the path when the new board is saved. if( (r & 2) && !GetBoard()->GetFileName().IsEmpty() ) { - wxFileName fn = GetBoard()->GetFileName(); + wxString tblName = Prj().FootprintLibTblName(); try { - FootprintLibs()->Save( fn ); + FootprintLibs()->Save( tblName ); tableChanged = true; } - catch( IO_ERROR& ioe ) + catch( const IO_ERROR& ioe ) { - wxString msg; - msg.Printf( _( "Error occurred saving project specific footprint library " - "table:\n\n%s" ), ioe.errorText.GetData() ); + wxString msg = wxString::Format( _( + "Error occurred saving project specific footprint library " + "table:\n\n%s" ), + GetChars( ioe.errorText ) + ); wxMessageBox( msg, _( "File Save Error" ), wxOK | wxICON_ERROR ); } } @@ -171,27 +173,27 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event ) break; case ID_CONFIG_READ: - { - fn = GetBoard()->GetFileName(); - fn.SetExt( ProjectFileExtension ); - - wxFileDialog dlg( this, _( "Read Project File" ), fn.GetPath(), - fn.GetFullName(), ProjectFileWildcard, - wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_CHANGE_DIR ); - - if( dlg.ShowModal() == wxID_CANCEL ) - break; - - if( !wxFileExists( dlg.GetPath() ) ) { - wxString msg; - msg.Printf( _( "File %s not found" ), GetChars( dlg.GetPath() ) ); - DisplayError( this, msg ); - break; - } + fn = GetBoard()->GetFileName(); + fn.SetExt( ProjectFileExtension ); - LoadProjectSettings( dlg.GetPath() ); - } + wxFileDialog dlg( this, _( "Read Project File" ), fn.GetPath(), + fn.GetFullName(), ProjectFileWildcard, + wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_CHANGE_DIR ); + + if( dlg.ShowModal() == wxID_CANCEL ) + break; + + if( !wxFileExists( dlg.GetPath() ) ) + { + wxString msg; + msg.Printf( _( "File %s not found" ), GetChars( dlg.GetPath() ) ); + DisplayError( this, msg ); + break; + } + + LoadProjectSettings( dlg.GetPath() ); + } break; // Hotkey IDs @@ -258,17 +260,15 @@ bool PCB_EDIT_FRAME::LoadProjectSettings( const wxString& aProjectFileName ) SetElementVisibility( RATSNEST_VISIBLE, showRats ); #endif - fn = GetBoard()->GetFileName(); - - wxFileName projectFpLibTableFileName = FP_LIB_TABLE::GetProjectTableFileName( fn.GetFullPath() ); + wxString projectFpLibTableFileName = Prj().FootprintLibTblName(); FootprintLibs()->Clear(); try { - FootprintLibs()->Load( projectFpLibTableFileName, &GFootprintTable ); + FootprintLibs()->Load( projectFpLibTableFileName ); } - catch( IO_ERROR ioe ) + catch( const IO_ERROR& ioe ) { DisplayError( this, ioe.errorText ); } From 0694f2fa1cc5783853e0ffe644c7f924cb9cd217 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 21 Mar 2014 10:40:50 +0100 Subject: [PATCH 214/741] TOOL_EVENTs autoregister themselves in ACTION_MANAGER. ROUTER_TOOL events have temporarily changed their hotkeys assignment. --- common/tool/action_manager.cpp | 3 --- include/tool/tool_action.h | 17 ++++---------- include/tool/tool_manager.h | 10 +++++++- include/wxBasePcbFrame.h | 2 +- pcbnew/basepcbframe.cpp | 4 ++-- pcbnew/board_undo_redo.cpp | 4 ++-- pcbnew/edit.cpp | 2 +- pcbnew/pcbframe.cpp | 13 ++++------- pcbnew/router/router_tool.cpp | 6 ++--- pcbnew/tools/pcb_tools.cpp | 42 ++++++++++------------------------ 10 files changed, 39 insertions(+), 64 deletions(-) diff --git a/common/tool/action_manager.cpp b/common/tool/action_manager.cpp index ce0c403e43..bc1a8be368 100644 --- a/common/tool/action_manager.cpp +++ b/common/tool/action_manager.cpp @@ -60,8 +60,6 @@ void ACTION_MANAGER::RegisterAction( TOOL_ACTION* aAction ) m_actionHotKeys[aAction->m_currentHotKey] = aAction; } - - aAction->setActionMgr( this ); } @@ -71,7 +69,6 @@ void ACTION_MANAGER::UnregisterAction( TOOL_ACTION* aAction ) m_actionIdIndex.erase( aAction->m_id ); // Indicate that the ACTION_MANAGER no longer care about the object - aAction->setActionMgr( NULL ); aAction->setId( -1 ); if( aAction->HasHotKey() ) diff --git a/include/tool/tool_action.h b/include/tool/tool_action.h index 8a3e7c4111..4d91ea982f 100644 --- a/include/tool/tool_action.h +++ b/include/tool/tool_action.h @@ -30,7 +30,7 @@ #include #include -#include +#include /** * Class TOOL_ACTION @@ -50,14 +50,14 @@ public: const std::string& aMenuDesc = std::string( "" ) ) : m_name( aName ), m_scope( aScope ), m_defaultHotKey( aDefaultHotKey ), m_currentHotKey( aDefaultHotKey ), m_menuItem( aMenuItem ), - m_menuDescription( aMenuDesc ), m_id( -1 ), m_actionMgr( NULL ) + m_menuDescription( aMenuDesc ), m_id( -1 ) { + TOOL_MANAGER::Instance().RegisterAction( this ); } ~TOOL_ACTION() { - if( m_actionMgr ) - m_actionMgr->UnregisterAction( this ); + TOOL_MANAGER::Instance().UnregisterAction( this ); } bool operator==( const TOOL_ACTION& aRhs ) const @@ -180,12 +180,6 @@ private: m_id = aId; } - /// Assigns ACTION_MANAGER object that handles the TOOL_ACTION. - void setActionMgr( ACTION_MANAGER* aManager ) - { - m_actionMgr = aManager; - } - /// Name of the action (convention is: app.[tool.]action.name) std::string m_name; @@ -210,9 +204,6 @@ private: /// Unique ID for fast matching. Assigned by ACTION_MANAGER. int m_id; - /// Action manager that handles this TOOL_ACTION. - ACTION_MANAGER* m_actionMgr; - /// Origin of the action // const TOOL_BASE* m_origin; diff --git a/include/tool/tool_manager.h b/include/tool/tool_manager.h index c07dcfe94e..04afea3483 100644 --- a/include/tool/tool_manager.h +++ b/include/tool/tool_manager.h @@ -48,7 +48,13 @@ class wxWindow; class TOOL_MANAGER { public: - TOOL_MANAGER(); + static TOOL_MANAGER& Instance() + { + static TOOL_MANAGER manager; + + return manager; + } + ~TOOL_MANAGER(); /** @@ -211,6 +217,8 @@ public: } private: + TOOL_MANAGER(); + struct TOOL_STATE; typedef std::pair TRANSITION; diff --git a/include/wxBasePcbFrame.h b/include/wxBasePcbFrame.h index 139b6f4d3f..4306d67977 100644 --- a/include/wxBasePcbFrame.h +++ b/include/wxBasePcbFrame.h @@ -95,7 +95,7 @@ protected: /// main window. wxAuiToolBar* m_auxiliaryToolBar; - TOOL_MANAGER* m_toolManager; + TOOL_MANAGER& m_toolManager; TOOL_DISPATCHER* m_toolDispatcher; void updateGridSelectBox(); diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 1467773da6..0464d04683 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -131,10 +131,10 @@ PCB_BASE_FRAME::PCB_BASE_FRAME( wxWindow* aParent, ID_DRAWFRAME_TYPE aFrameType, const wxString& aTitle, const wxPoint& aPos, const wxSize& aSize, long aStyle, const wxString & aFrameName) : - EDA_DRAW_FRAME( aParent, aFrameType, aTitle, aPos, aSize, aStyle, aFrameName ) + EDA_DRAW_FRAME( aParent, aFrameType, aTitle, aPos, aSize, aStyle, aFrameName ), + m_toolManager( TOOL_MANAGER::Instance() ) { m_Pcb = NULL; - m_toolManager = NULL; m_toolDispatcher = NULL; m_DisplayPadFill = true; // How to draw pads diff --git a/pcbnew/board_undo_redo.cpp b/pcbnew/board_undo_redo.cpp index a5a3ad314e..5912380180 100644 --- a/pcbnew/board_undo_redo.cpp +++ b/pcbnew/board_undo_redo.cpp @@ -629,7 +629,7 @@ void PCB_EDIT_FRAME::GetBoardFromUndoList( wxCommandEvent& aEvent ) // Inform tools that undo command was issued TOOL_EVENT event( TC_MESSAGE, TA_UNDO_REDO, AS_GLOBAL ); - m_toolManager->ProcessEvent( event ); + m_toolManager.ProcessEvent( event ); /* Get the old list */ PICKED_ITEMS_LIST* List = GetScreen()->PopCommandFromUndoList(); @@ -652,7 +652,7 @@ void PCB_EDIT_FRAME::GetBoardFromRedoList( wxCommandEvent& aEvent ) // Inform tools that redo command was issued TOOL_EVENT event( TC_MESSAGE, TA_UNDO_REDO, AS_GLOBAL ); - m_toolManager->ProcessEvent( event ); + m_toolManager.ProcessEvent( event ); /* Get the old list */ PICKED_ITEMS_LIST* List = GetScreen()->PopCommandFromRedoList(); diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index 91bd9ee4ad..453572ddc5 100644 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -1466,7 +1466,7 @@ void PCB_EDIT_FRAME::OnSelectTool( wxCommandEvent& aEvent ) std::string actionName = COMMON_ACTIONS::TranslateLegacyId( id ); if( !actionName.empty() ) - m_toolManager->RunAction( actionName ); + m_toolManager.RunAction( actionName ); return; } diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index be5896b50e..dee3308be0 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -528,12 +528,9 @@ void PCB_EDIT_FRAME::SetBoard( BOARD* aBoard ) ViewReloadBoard( aBoard ); // update the tool manager with the new board and its view. - if( m_toolManager ) - { - m_toolManager->SetEnvironment( aBoard, GetGalCanvas()->GetView(), - GetGalCanvas()->GetViewControls(), this ); - m_toolManager->ResetTools( TOOL_BASE::MODEL_RELOAD ); - } + m_toolManager.SetEnvironment( aBoard, GetGalCanvas()->GetView(), + GetGalCanvas()->GetViewControls(), this ); + m_toolManager.ResetTools( TOOL_BASE::MODEL_RELOAD ); } } @@ -714,9 +711,9 @@ void PCB_EDIT_FRAME::UseGalCanvas( bool aEnable ) // Update potential changes in the ratsnest m_Pcb->GetRatsnest()->Recalculate(); - m_toolManager->SetEnvironment( m_Pcb, GetGalCanvas()->GetView(), + m_toolManager.SetEnvironment( m_Pcb, GetGalCanvas()->GetView(), GetGalCanvas()->GetViewControls(), this ); - m_toolManager->ResetTools( TOOL_BASE::GAL_SWITCH ); + m_toolManager.ResetTools( TOOL_BASE::GAL_SWITCH ); } } diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index adb3490de3..88e797b92b 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -44,11 +44,11 @@ using namespace KIGFX; using boost::optional; -static TOOL_ACTION ACT_AutoEndRoute( "AutoEndRoute", AS_CONTEXT, 'F' ); +static TOOL_ACTION ACT_AutoEndRoute( "AutoEndRoute", AS_CONTEXT, 'G' ); static TOOL_ACTION ACT_PlaceVia( "PlaceVia", AS_CONTEXT, 'V' ); -static TOOL_ACTION ACT_OpenRouteOptions( "OpenRouterOptions", AS_CONTEXT, 'E' ); +static TOOL_ACTION ACT_OpenRouteOptions( "OpenRouterOptions", AS_CONTEXT, 'Y' ); static TOOL_ACTION ACT_SwitchPosture( "SwitchPosture", AS_CONTEXT, '/' ); -static TOOL_ACTION ACT_EndTrack( "SwitchPosture", AS_CONTEXT, WXK_END ); +static TOOL_ACTION ACT_EndTrack( "EndTrack", AS_CONTEXT, WXK_END ); ROUTER_TOOL::ROUTER_TOOL() : TOOL_INTERACTIVE( "pcbnew.InteractiveRouter" ) diff --git a/pcbnew/tools/pcb_tools.cpp b/pcbnew/tools/pcb_tools.cpp index 53683e1a55..28a1b424a3 100644 --- a/pcbnew/tools/pcb_tools.cpp +++ b/pcbnew/tools/pcb_tools.cpp @@ -38,54 +38,36 @@ #include "edit_tool.h" #include "drawing_tool.h" #include "point_editor.h" +#include "settings_tool.h" #include "common_actions.h" #include void PCB_EDIT_FRAME::setupTools() { // Create the manager and dispatcher & route draw panel events to the dispatcher - m_toolManager = new TOOL_MANAGER; - m_toolDispatcher = new TOOL_DISPATCHER( m_toolManager, this ); + m_toolManager = TOOL_MANAGER::Instance(); + m_toolDispatcher = new TOOL_DISPATCHER( &m_toolManager, this ); GetGalCanvas()->SetEventDispatcher( m_toolDispatcher ); - // Register tool actions - m_toolManager->RegisterAction( &COMMON_ACTIONS::selectionSingle ); - m_toolManager->RegisterAction( &COMMON_ACTIONS::selectionClear ); - m_toolManager->RegisterAction( &COMMON_ACTIONS::editActivate ); - m_toolManager->RegisterAction( &COMMON_ACTIONS::rotate ); - m_toolManager->RegisterAction( &COMMON_ACTIONS::flip ); - m_toolManager->RegisterAction( &COMMON_ACTIONS::remove ); - m_toolManager->RegisterAction( &COMMON_ACTIONS::properties ); - m_toolManager->RegisterAction( &COMMON_ACTIONS::drawLine ); - m_toolManager->RegisterAction( &COMMON_ACTIONS::drawCircle ); - m_toolManager->RegisterAction( &COMMON_ACTIONS::drawArc ); - m_toolManager->RegisterAction( &COMMON_ACTIONS::drawText ); - m_toolManager->RegisterAction( &COMMON_ACTIONS::drawDimension ); - m_toolManager->RegisterAction( &COMMON_ACTIONS::drawZone ); - m_toolManager->RegisterAction( &COMMON_ACTIONS::drawKeepout ); - m_toolManager->RegisterAction( &COMMON_ACTIONS::placeTarget ); - m_toolManager->RegisterAction( &COMMON_ACTIONS::placeModule ); - m_toolManager->RegisterAction( &COMMON_ACTIONS::routerActivate ); - // Register tools - m_toolManager->RegisterTool( new SELECTION_TOOL ); - m_toolManager->RegisterTool( new ROUTER_TOOL ); - m_toolManager->RegisterTool( new EDIT_TOOL ); - m_toolManager->RegisterTool( new DRAWING_TOOL ); - m_toolManager->RegisterTool( new POINT_EDITOR ); + m_toolManager.RegisterTool( new SELECTION_TOOL ); + m_toolManager.RegisterTool( new ROUTER_TOOL ); + m_toolManager.RegisterTool( new EDIT_TOOL ); + m_toolManager.RegisterTool( new DRAWING_TOOL ); + m_toolManager.RegisterTool( new POINT_EDITOR ); + m_toolManager.RegisterTool( new SETTINGS_TOOL ); - m_toolManager->SetEnvironment( NULL, GetGalCanvas()->GetView(), + m_toolManager.SetEnvironment( NULL, GetGalCanvas()->GetView(), GetGalCanvas()->GetViewControls(), this ); - m_toolManager->ResetTools( TOOL_BASE::RUN ); + m_toolManager.ResetTools( TOOL_BASE::RUN ); // Run the selection tool, it is supposed to be always active - m_toolManager->InvokeTool( "pcbnew.InteractiveSelection" ); + m_toolManager.InvokeTool( "pcbnew.InteractiveSelection" ); } void PCB_EDIT_FRAME::destroyTools() { - delete m_toolManager; delete m_toolDispatcher; } From 87c9423f0feb2a08e288643b892f6362b9a1f87b Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 21 Mar 2014 11:17:47 +0100 Subject: [PATCH 215/741] PCB_EDIT_FRAME::SetActiveLayer() & GetActiveLayer() made public. --- include/wxPcbStruct.h | 34 +++++++++++------------ pcbnew/class_pcb_layer_widget.cpp | 4 +-- pcbnew/deltrack.cpp | 4 +-- pcbnew/dialogs/dialog_general_options.cpp | 2 +- pcbnew/dialogs/dialog_global_deletion.cpp | 2 +- pcbnew/dialogs/dialog_layers_setup.cpp | 10 +++---- pcbnew/dimension.cpp | 2 +- pcbnew/edit.cpp | 28 +++++++++---------- pcbnew/editedge.cpp | 4 +-- pcbnew/editrack-part2.cpp | 12 ++++---- pcbnew/hotkeys_board_editor.cpp | 10 +++---- pcbnew/onleftclick.cpp | 8 +++--- pcbnew/pcbframe.cpp | 6 ++-- pcbnew/tool_pcb.cpp | 2 +- pcbnew/toolbars_update_user_interface.cpp | 2 +- pcbnew/zones_by_polygon.cpp | 8 +++--- 16 files changed, 69 insertions(+), 69 deletions(-) diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index 1298f96e1f..03038aece4 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -134,22 +134,6 @@ protected: void createPopUpBlockMenu( wxMenu* menu ); void createPopUpMenuForMarkers( MARKER_PCB* aMarker, wxMenu* aPopMenu ); - /** - * Function setActiveLayer - * will change the currently active layer to \a aLayer and also - * update the PCB_LAYER_WIDGET. - */ - void setActiveLayer( LAYER_NUM aLayer, bool doLayerWidgetUpdate = true ); - - /** - * Function getActiveLayer - * returns the active layer - */ - LAYER_NUM getActiveLayer() - { - return ( (PCB_SCREEN*) GetScreen() )->m_Active_Layer; - } - /** * Function setHighContrastLayer * takes care of display settings for the given layer to be displayed in high contrast mode. @@ -159,7 +143,7 @@ protected: /** * Function syncLayerWidgetLayer * updates the currently layer "selection" within the PCB_LAYER_WIDGET. - * The currently selected layer is defined by the return value of getActiveLayer(). + * The currently selected layer is defined by the return value of GetActiveLayer(). *

* This function cannot be inline without including layer_widget.h in * here and we do not want to do that. @@ -577,6 +561,22 @@ public: */ void SetTopLayer( LAYER_NUM aLayer ); + /** + * Function SetActiveLayer + * will change the currently active layer to \a aLayer and also + * update the PCB_LAYER_WIDGET. + */ + void SetActiveLayer( LAYER_NUM aLayer, bool doLayerWidgetUpdate = true ); + + /** + * Function GetActiveLayer + * returns the active layer + */ + LAYER_NUM GetActiveLayer() + { + return ( (PCB_SCREEN*) GetScreen() )->m_Active_Layer; + } + /** * Function IsElementVisible * tests whether a given element category is visible. Keep this as an diff --git a/pcbnew/class_pcb_layer_widget.cpp b/pcbnew/class_pcb_layer_widget.cpp index 6dc983babf..cd80e35b75 100644 --- a/pcbnew/class_pcb_layer_widget.cpp +++ b/pcbnew/class_pcb_layer_widget.cpp @@ -183,7 +183,7 @@ void PCB_LAYER_WIDGET::onPopupSelection( wxCommandEvent& event ) if( IsCopperLayer( layer ) ) { bool loc_visible = visible; - if( force_active_layer_visible && (layer == myframe->getActiveLayer() ) ) + if( force_active_layer_visible && (layer == myframe->GetActiveLayer() ) ) loc_visible = true; cb->SetValue( loc_visible ); @@ -354,7 +354,7 @@ bool PCB_LAYER_WIDGET::OnLayerSelect( LAYER_NUM aLayer ) { // the layer change from the PCB_LAYER_WIDGET can be denied by returning // false from this function. - myframe->setActiveLayer( aLayer, false ); + myframe->SetActiveLayer( aLayer, false ); if( m_alwaysShowActiveCopperLayer ) OnLayerSelected(); diff --git a/pcbnew/deltrack.cpp b/pcbnew/deltrack.cpp index 331fbd22ab..a4012d76fc 100644 --- a/pcbnew/deltrack.cpp +++ b/pcbnew/deltrack.cpp @@ -53,7 +53,7 @@ TRACK* PCB_EDIT_FRAME::Delete_Segment( wxDC* DC, TRACK* aTrack ) { if( g_CurrentTrackList.GetCount() > 0 ) { - LAYER_NUM previous_layer = getActiveLayer(); + LAYER_NUM previous_layer = GetActiveLayer(); DBG( g_CurrentTrackList.VerifyListIntegrity(); ) @@ -86,7 +86,7 @@ TRACK* PCB_EDIT_FRAME::Delete_Segment( wxDC* DC, TRACK* aTrack ) // Correct active layer which could change if a via // has been erased - setActiveLayer( previous_layer ); + SetActiveLayer( previous_layer ); UpdateStatusBar(); diff --git a/pcbnew/dialogs/dialog_general_options.cpp b/pcbnew/dialogs/dialog_general_options.cpp index 9f3ea26914..fd7b1aa847 100644 --- a/pcbnew/dialogs/dialog_general_options.cpp +++ b/pcbnew/dialogs/dialog_general_options.cpp @@ -228,7 +228,7 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) // Apply new display options to the GAL canvas (this is faster than recaching) settings->LoadDisplayOptions( DisplayOpt ); - setHighContrastLayer( getActiveLayer() ); + setHighContrastLayer( GetActiveLayer() ); m_canvas->Refresh(); break; diff --git a/pcbnew/dialogs/dialog_global_deletion.cpp b/pcbnew/dialogs/dialog_global_deletion.cpp index 69eec16422..99ff3f3e92 100644 --- a/pcbnew/dialogs/dialog_global_deletion.cpp +++ b/pcbnew/dialogs/dialog_global_deletion.cpp @@ -39,7 +39,7 @@ DIALOG_GLOBAL_DELETION::DIALOG_GLOBAL_DELETION( PCB_EDIT_FRAME* parent ) void PCB_EDIT_FRAME::InstallPcbGlobalDeleteFrame( const wxPoint& pos ) { DIALOG_GLOBAL_DELETION dlg( this ); - dlg.SetCurrentLayer( getActiveLayer() ); + dlg.SetCurrentLayer( GetActiveLayer() ); dlg.ShowModal(); } diff --git a/pcbnew/dialogs/dialog_layers_setup.cpp b/pcbnew/dialogs/dialog_layers_setup.cpp index fc26fe399e..2c3756af5a 100644 --- a/pcbnew/dialogs/dialog_layers_setup.cpp +++ b/pcbnew/dialogs/dialog_layers_setup.cpp @@ -670,11 +670,11 @@ void PCB_EDIT_FRAME::InstallDialogLayerSetup() if( dlg.ShowModal() == wxID_CANCEL ) return; - wxLogDebug( wxT( "Current layer selected %d." ), getActiveLayer() ); + wxLogDebug( wxT( "Current layer selected %d." ), GetActiveLayer() ); // If the current active layer was removed, find the next avaiable layer to set as the // active layer. - if( !( GetLayerMask( getActiveLayer() ) & GetBoard()->GetEnabledLayers() ) ) + if( !( GetLayerMask( GetActiveLayer() ) & GetBoard()->GetEnabledLayers() ) ) { for( LAYER_NUM i = FIRST_LAYER; i < NB_LAYERS; ++i ) { @@ -685,14 +685,14 @@ void PCB_EDIT_FRAME::InstallDialogLayerSetup() if( GetLayerMask( tmp ) & GetBoard()->GetEnabledLayers() ) { - wxLogDebug( wxT( "Setting current layer to %d." ), getActiveLayer() ); - setActiveLayer( tmp, true ); + wxLogDebug( wxT( "Setting current layer to %d." ), GetActiveLayer() ); + SetActiveLayer( tmp, true ); break; } } } else { - setActiveLayer( getActiveLayer(), true ); + SetActiveLayer( GetActiveLayer(), true ); } } diff --git a/pcbnew/dimension.cpp b/pcbnew/dimension.cpp index 71c1a14393..db02e08ae4 100644 --- a/pcbnew/dimension.cpp +++ b/pcbnew/dimension.cpp @@ -251,7 +251,7 @@ DIMENSION* PCB_EDIT_FRAME::EditDimension( DIMENSION* aDimension, wxDC* aDC ) aDimension = new DIMENSION( GetBoard() ); aDimension->SetFlags( IS_NEW ); - aDimension->SetLayer( getActiveLayer() ); + aDimension->SetLayer( GetActiveLayer() ); aDimension->SetOrigin( pos ); aDimension->SetEnd( pos ); diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index 453572ddc5..cf1c9242e2 100644 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -406,14 +406,14 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) m_canvas->SetIgnoreMouseEvents( true ); wxPoint dlgPosition; wxGetMousePosition( &dlgPosition.x, &dlgPosition.y ); - LAYER_NUM layer = SelectLayer( getActiveLayer(), ALL_NO_CU_LAYERS, + LAYER_NUM layer = SelectLayer( GetActiveLayer(), ALL_NO_CU_LAYERS, dlgPosition ); m_canvas->SetIgnoreMouseEvents( false ); m_canvas->MoveCursorToCrossHair(); - if( getActiveLayer() != layer ) + if( GetActiveLayer() != layer ) { - GetScreen()->m_Route_Layer_TOP = getActiveLayer(); + GetScreen()->m_Route_Layer_TOP = GetActiveLayer(); GetScreen()->m_Route_Layer_BOTTOM = layer; Other_Layer_Route( (TRACK*) GetCurItem(), &dc ); } @@ -942,17 +942,17 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) break; case ID_POPUP_PCB_SELECT_LAYER: - itmp = SelectLayer( getActiveLayer() ); + itmp = SelectLayer( GetActiveLayer() ); if( itmp >= 0 ) { // if user changed colors and we are in high contrast mode, then redraw // because the PAD_SMD pads may change color. - if( DisplayOpt.ContrastModeDisplay && getActiveLayer() != itmp ) + if( DisplayOpt.ContrastModeDisplay && GetActiveLayer() != itmp ) { m_canvas->Refresh(); } - setActiveLayer( itmp ); + SetActiveLayer( itmp ); } m_canvas->MoveCursorToCrossHair(); @@ -963,19 +963,19 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) break; case ID_POPUP_PCB_SELECT_NO_CU_LAYER: - itmp = SelectLayer( getActiveLayer(), ALL_CU_LAYERS ); + itmp = SelectLayer( GetActiveLayer(), ALL_CU_LAYERS ); if( itmp >= 0 ) - setActiveLayer( itmp ); + SetActiveLayer( itmp ); m_canvas->MoveCursorToCrossHair(); break; case ID_POPUP_PCB_SELECT_CU_LAYER: - itmp = SelectLayer( getActiveLayer(), ALL_NO_CU_LAYERS ); + itmp = SelectLayer( GetActiveLayer(), ALL_NO_CU_LAYERS ); if( itmp >= 0 ) - setActiveLayer( itmp ); + SetActiveLayer( itmp ); break; @@ -985,7 +985,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) break; case ID_TOOLBARH_PCB_SELECT_LAYER: - setActiveLayer( m_SelLayerBox->GetLayerSelection() ); + SetActiveLayer( m_SelLayerBox->GetLayerSelection() ); if( DisplayOpt.ContrastModeDisplay ) m_canvas->Refresh( true ); @@ -1288,7 +1288,7 @@ void PCB_EDIT_FRAME::RemoveStruct( BOARD_ITEM* Item, wxDC* DC ) void PCB_EDIT_FRAME::SwitchLayer( wxDC* DC, LAYER_NUM layer ) { - LAYER_NUM curLayer = getActiveLayer(); + LAYER_NUM curLayer = GetActiveLayer(); // Check if the specified layer matches the present layer if( layer == curLayer ) @@ -1330,7 +1330,7 @@ void PCB_EDIT_FRAME::SwitchLayer( wxDC* DC, LAYER_NUM layer ) GetScreen()->m_Route_Layer_TOP = curLayer; GetScreen()->m_Route_Layer_BOTTOM = layer; - setActiveLayer( curLayer ); + SetActiveLayer( curLayer ); if( Other_Layer_Route( (TRACK*) GetScreen()->GetCurItem(), DC ) ) { @@ -1351,7 +1351,7 @@ void PCB_EDIT_FRAME::SwitchLayer( wxDC* DC, LAYER_NUM layer ) // and a non-copper layer, or vice-versa? // ... - setActiveLayer( layer ); + SetActiveLayer( layer ); if( DisplayOpt.ContrastModeDisplay ) m_canvas->Refresh(); diff --git a/pcbnew/editedge.cpp b/pcbnew/editedge.cpp index a85a0bf26e..207b515e66 100644 --- a/pcbnew/editedge.cpp +++ b/pcbnew/editedge.cpp @@ -246,7 +246,7 @@ DRAWSEGMENT* PCB_EDIT_FRAME::Begin_DrawSegment( DRAWSEGMENT* Segment, STROKE_T s s_large = GetDesignSettings().m_DrawSegmentWidth; - if( getActiveLayer() == EDGE_N ) + if( GetActiveLayer() == EDGE_N ) { s_large = GetDesignSettings().m_EdgeSegmentWidth; } @@ -255,7 +255,7 @@ DRAWSEGMENT* PCB_EDIT_FRAME::Begin_DrawSegment( DRAWSEGMENT* Segment, STROKE_T s { SetCurItem( Segment = new DRAWSEGMENT( GetBoard() ) ); Segment->SetFlags( IS_NEW ); - Segment->SetLayer( getActiveLayer() ); + Segment->SetLayer( GetActiveLayer() ); Segment->SetWidth( s_large ); Segment->SetShape( shape ); Segment->SetAngle( 900 ); diff --git a/pcbnew/editrack-part2.cpp b/pcbnew/editrack-part2.cpp index e394ad1ca3..528d96988a 100644 --- a/pcbnew/editrack-part2.cpp +++ b/pcbnew/editrack-part2.cpp @@ -51,10 +51,10 @@ bool PCB_EDIT_FRAME::Other_Layer_Route( TRACK* aTrack, wxDC* DC ) if( aTrack == NULL ) { - if( getActiveLayer() != ((PCB_SCREEN*)GetScreen())->m_Route_Layer_TOP ) - setActiveLayer( ((PCB_SCREEN*)GetScreen())->m_Route_Layer_TOP ); + if( GetActiveLayer() != ((PCB_SCREEN*)GetScreen())->m_Route_Layer_TOP ) + SetActiveLayer( ((PCB_SCREEN*)GetScreen())->m_Route_Layer_TOP ); else - setActiveLayer(((PCB_SCREEN*)GetScreen())->m_Route_Layer_BOTTOM ); + SetActiveLayer(((PCB_SCREEN*)GetScreen())->m_Route_Layer_BOTTOM ); UpdateStatusBar(); return true; @@ -108,7 +108,7 @@ bool PCB_EDIT_FRAME::Other_Layer_Route( TRACK* aTrack, wxDC* DC ) via->SetLayerPair( LAYER_N_BACK, LAYER_N_FRONT ); via->SetDrill( GetBoard()->GetCurrentViaDrill() ); - LAYER_NUM first_layer = getActiveLayer(); + LAYER_NUM first_layer = GetActiveLayer(); LAYER_NUM last_layer; // prepare switch to new active layer: @@ -171,7 +171,7 @@ bool PCB_EDIT_FRAME::Other_Layer_Route( TRACK* aTrack, wxDC* DC ) return false; } - setActiveLayer( last_layer ); + SetActiveLayer( last_layer ); TRACK* lastNonVia = g_CurrentTrackSegment; @@ -193,7 +193,7 @@ bool PCB_EDIT_FRAME::Other_Layer_Route( TRACK* aTrack, wxDC* DC ) */ // set the layer to the new value - track->SetLayer( getActiveLayer() ); + track->SetLayer( GetActiveLayer() ); /* the start point is the via position and the end point is the cursor * which also is on the via (will change when moving mouse) diff --git a/pcbnew/hotkeys_board_editor.cpp b/pcbnew/hotkeys_board_editor.cpp index b42f2ddb04..6364d69ba6 100644 --- a/pcbnew/hotkeys_board_editor.cpp +++ b/pcbnew/hotkeys_board_editor.cpp @@ -263,7 +263,7 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit break; case HK_SWITCH_LAYER_TO_PREVIOUS: - ll = getActiveLayer(); + ll = GetActiveLayer(); if( (ll <= LAYER_N_BACK) || (ll > LAYER_N_FRONT) ) break; @@ -279,7 +279,7 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit break; case HK_SWITCH_LAYER_TO_NEXT: - ll = getActiveLayer(); + ll = GetActiveLayer(); if( (ll < LAYER_N_BACK) || (ll >= LAYER_N_FRONT) ) break; @@ -397,7 +397,7 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit break; case HK_BACK_SPACE: - if( IsCopperLayer( getActiveLayer() ) ) + if( IsCopperLayer( GetActiveLayer() ) ) { if( !itemCurrentlyEdited ) { @@ -622,7 +622,7 @@ bool PCB_EDIT_FRAME::OnHotkeyDeleteItem( wxDC* aDC ) switch( GetToolId() ) { case ID_TRACK_BUTT: - if( getActiveLayer() > LAYER_N_FRONT ) + if( GetActiveLayer() > LAYER_N_FRONT ) return false; if( ItemFree ) @@ -983,7 +983,7 @@ bool PCB_EDIT_FRAME::OnHotkeyPlaceItem( wxDC* aDC ) TRACK * PCB_EDIT_FRAME::OnHotkeyBeginRoute( wxDC* aDC ) { - if( getActiveLayer() > LAYER_N_FRONT ) + if( GetActiveLayer() > LAYER_N_FRONT ) return NULL; bool itemCurrentlyEdited = (GetCurItem() && GetCurItem()->GetFlags()); diff --git a/pcbnew/onleftclick.cpp b/pcbnew/onleftclick.cpp index 00b313d784..43f0486fe1 100644 --- a/pcbnew/onleftclick.cpp +++ b/pcbnew/onleftclick.cpp @@ -243,7 +243,7 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition ) if( GetToolId() == ID_PCB_ARC_BUTT ) shape = S_ARC; - if( IsCopperLayer( getActiveLayer() ) ) + if( IsCopperLayer( GetActiveLayer() ) ) { DisplayError( this, _( "Graphic not allowed on Copper layers" ) ); break; @@ -267,7 +267,7 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition ) break; case ID_TRACK_BUTT: - if( !IsCopperLayer( getActiveLayer() ) ) + if( !IsCopperLayer( GetActiveLayer() ) ) { DisplayError( this, _( "Tracks on Copper layers only " ) ); break; @@ -325,7 +325,7 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition ) break; case ID_PCB_ADD_TEXT_BUTT: - if( IsLayerInList( EDGE_LAYER, getActiveLayer() ) ) + if( IsLayerInList( EDGE_LAYER, GetActiveLayer() ) ) { DisplayError( this, _( "Texts not allowed on Edge Cut layer" ) ); @@ -374,7 +374,7 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition ) break; case ID_PCB_DIMENSION_BUTT: - if( IsLayerInList( EDGE_LAYER|ALL_CU_LAYERS, getActiveLayer() ) ) + if( IsLayerInList( EDGE_LAYER|ALL_CU_LAYERS, GetActiveLayer() ) ) { DisplayError( this, _( "Dimension not allowed on Copper or Edge Cut layers" ) ); diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index dee3308be0..8c39655d8b 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -842,7 +842,7 @@ void PCB_EDIT_FRAME::SetGridColor(EDA_COLOR_T aColor) bool PCB_EDIT_FRAME::IsMicroViaAcceptable( void ) { int copperlayercnt = GetBoard()->GetCopperLayerCount( ); - LAYER_NUM currLayer = getActiveLayer(); + LAYER_NUM currLayer = GetActiveLayer(); if( !GetDesignSettings().m_MicroViasAllowed ) return false; // Obvious.. @@ -946,7 +946,7 @@ void PCB_EDIT_FRAME::SetTopLayer( LAYER_NUM aLayer ) } -void PCB_EDIT_FRAME::setActiveLayer( LAYER_NUM aLayer, bool doLayerWidgetUpdate ) +void PCB_EDIT_FRAME::SetActiveLayer( LAYER_NUM aLayer, bool doLayerWidgetUpdate ) { ( (PCB_SCREEN*) GetScreen() )->m_Active_Layer = aLayer; @@ -962,7 +962,7 @@ void PCB_EDIT_FRAME::setActiveLayer( LAYER_NUM aLayer, bool doLayerWidgetUpdate void PCB_EDIT_FRAME::syncLayerWidgetLayer() { - m_Layers->SelectLayer( getActiveLayer() ); + m_Layers->SelectLayer( GetActiveLayer() ); m_Layers->OnLayerSelected(); } diff --git a/pcbnew/tool_pcb.cpp b/pcbnew/tool_pcb.cpp index 6038bf41ff..ec4d07df7d 100644 --- a/pcbnew/tool_pcb.cpp +++ b/pcbnew/tool_pcb.cpp @@ -105,7 +105,7 @@ void PCB_EDIT_FRAME::PrepareLayerIndicator() previous_Route_Layer_BOTTOM_color, previous_via_color; /* get colors, and redraw bitmap button only on changes */ - active_layer_color = GetBoard()->GetLayerColor(getActiveLayer()); + active_layer_color = GetBoard()->GetLayerColor(GetActiveLayer()); if( previous_active_layer_color != active_layer_color ) { diff --git a/pcbnew/toolbars_update_user_interface.cpp b/pcbnew/toolbars_update_user_interface.cpp index 6e8ceaac2c..b65328dcf5 100644 --- a/pcbnew/toolbars_update_user_interface.cpp +++ b/pcbnew/toolbars_update_user_interface.cpp @@ -96,7 +96,7 @@ void PCB_EDIT_FRAME::OnUpdateSelectViaSize( wxUpdateUIEvent& aEvent ) void PCB_EDIT_FRAME::OnUpdateLayerSelectBox( wxUpdateUIEvent& aEvent ) { - m_SelLayerBox->SetLayerSelection( getActiveLayer() ); + m_SelLayerBox->SetLayerSelection( GetActiveLayer() ); } diff --git a/pcbnew/zones_by_polygon.cpp b/pcbnew/zones_by_polygon.cpp index 838bf67bb7..81719711f6 100644 --- a/pcbnew/zones_by_polygon.cpp +++ b/pcbnew/zones_by_polygon.cpp @@ -515,7 +515,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC ) if( !GetBoard()->m_CurrentZoneContour ) { if( GetToolId() == ID_PCB_KEEPOUT_AREA_BUTT && - getActiveLayer() >= FIRST_NON_COPPER_LAYER ) + GetActiveLayer() >= FIRST_NON_COPPER_LAYER ) { DisplayError( this, _( "Error: a keepout area is allowed only on copper layers" ) ); @@ -534,7 +534,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC ) ZONE_EDIT_T edited; // Init zone params to reasonable values - zone->SetLayer( getActiveLayer() ); + zone->SetLayer( GetActiveLayer() ); // Prompt user for parameters: m_canvas->SetIgnoreMouseEvents( true ); @@ -597,7 +597,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC ) return 0; // Switch active layer to the selected zone layer - setActiveLayer( zoneInfo.m_CurrentZone_Layer ); + SetActiveLayer( zoneInfo.m_CurrentZone_Layer ); SetZoneSettings( zoneInfo ); } @@ -607,7 +607,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC ) // zone (add cutout or similar zone) zoneInfo.m_CurrentZone_Layer = s_CurrentZone->GetLayer(); - setActiveLayer( s_CurrentZone->GetLayer() ); + SetActiveLayer( s_CurrentZone->GetLayer() ); zoneInfo << *s_CurrentZone; From ab30fba0ab429e228b9cd7a3c5d2b601645c639e Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 21 Mar 2014 12:50:04 +0100 Subject: [PATCH 216/741] CvPcb: Fix crashes when starting cvPcb (could be Windows Specific) and after closing the footprint viewer. --- cvpcb/class_DisplayFootprintsFrame.cpp | 11 ++------ cvpcb/class_DisplayFootprintsFrame.h | 2 ++ cvpcb/class_footprints_listbox.cpp | 2 +- cvpcb/cvframe.cpp | 38 ++++++++++++++++---------- cvpcb/cvpcb_mainframe.h | 6 +++- 5 files changed, 35 insertions(+), 24 deletions(-) diff --git a/cvpcb/class_DisplayFootprintsFrame.cpp b/cvpcb/class_DisplayFootprintsFrame.cpp index 8c3054c6c0..f320465c8b 100644 --- a/cvpcb/class_DisplayFootprintsFrame.cpp +++ b/cvpcb/class_DisplayFootprintsFrame.cpp @@ -70,15 +70,13 @@ BEGIN_EVENT_TABLE( DISPLAY_FOOTPRINTS_FRAME, PCB_BASE_FRAME ) DISPLAY_FOOTPRINTS_FRAME::OnUpdateLineDrawMode ) END_EVENT_TABLE() -#define DISPLAY_FOOTPRINTS_FRAME_NAME wxT( "CmpFrame" ) - DISPLAY_FOOTPRINTS_FRAME::DISPLAY_FOOTPRINTS_FRAME( KIWAY* aKiway, CVPCB_MAINFRAME* aParent ) : - PCB_BASE_FRAME( aKiway, aParent, CVPCB_DISPLAY_FRAME_TYPE, _( "Module" ), + PCB_BASE_FRAME( aKiway, aParent, CVPCB_DISPLAY_FRAME_TYPE, _( "Footprint Viewer" ), wxDefaultPosition, wxDefaultSize, - KICAD_DEFAULT_DRAWFRAME_STYLE, DISPLAY_FOOTPRINTS_FRAME_NAME ) + KICAD_DEFAULT_DRAWFRAME_STYLE, FOOTPRINTVIEWER_FRAME_NAME ) { - m_FrameName = DISPLAY_FOOTPRINTS_FRAME_NAME; + m_FrameName = FOOTPRINTVIEWER_FRAME_NAME; m_showAxis = true; // true to draw axis. // Give an icon @@ -147,9 +145,6 @@ DISPLAY_FOOTPRINTS_FRAME::~DISPLAY_FOOTPRINTS_FRAME() { delete GetScreen(); SetScreen( NULL ); // Be sure there is no double deletion - - // a crash would be better than this uncommented: - // ( (CVPCB_MAINFRAME*) Pgm().GetTopWindow() )->m_DisplayFootprintFrame = NULL; } diff --git a/cvpcb/class_DisplayFootprintsFrame.h b/cvpcb/class_DisplayFootprintsFrame.h index 5c36fa6ef4..b26f372565 100644 --- a/cvpcb/class_DisplayFootprintsFrame.h +++ b/cvpcb/class_DisplayFootprintsFrame.h @@ -29,6 +29,8 @@ #include +// The name (for wxWidgets) of the footprint viewer frame +#define FOOTPRINTVIEWER_FRAME_NAME wxT( "FootprintViewerFrame" ) class CVPCB_MAINFRAME; diff --git a/cvpcb/class_footprints_listbox.cpp b/cvpcb/class_footprints_listbox.cpp index 7c1ab079e4..d09cee580b 100644 --- a/cvpcb/class_footprints_listbox.cpp +++ b/cvpcb/class_footprints_listbox.cpp @@ -207,7 +207,7 @@ void FOOTPRINTS_LISTBOX::OnLeftClick( wxListEvent& event ) return; // If the footprint view window is displayed, update the footprint. - if( GetParent()->m_DisplayFootprintFrame ) + if( GetParent()->GetFpViewerFrame() ) GetParent()->CreateScreenCmp(); GetParent()->DisplayStatus(); diff --git a/cvpcb/cvframe.cpp b/cvpcb/cvframe.cpp index ae14ead1f2..256e12c641 100644 --- a/cvpcb/cvframe.cpp +++ b/cvpcb/cvframe.cpp @@ -114,7 +114,6 @@ CVPCB_MAINFRAME::CVPCB_MAINFRAME( KIWAY* aKiway, wxWindow* aParent ) : m_ListCmp = NULL; m_FootprintList = NULL; m_LibraryList = NULL; - m_DisplayFootprintFrame = NULL; m_mainToolBar = NULL; m_modified = false; m_isEESchemaNetlist = false; @@ -315,8 +314,8 @@ void CVPCB_MAINFRAME::OnCloseWindow( wxCloseEvent& Event ) } // Close module display frame - if( m_DisplayFootprintFrame ) - m_DisplayFootprintFrame->Close( true ); + if( GetFpViewerFrame() ) + GetFpViewerFrame()->Close( true ); m_modified = false; @@ -562,7 +561,7 @@ void CVPCB_MAINFRAME::OnKeepOpenOnSave( wxCommandEvent& event ) void CVPCB_MAINFRAME::DisplayModule( wxCommandEvent& event ) { CreateScreenCmp(); - m_DisplayFootprintFrame->RedrawScreen( wxPoint( 0, 0 ), false ); + GetFpViewerFrame()->RedrawScreen( wxPoint( 0, 0 ), false ); } @@ -601,7 +600,9 @@ void CVPCB_MAINFRAME::OnSelectComponent( wxListEvent& event ) m_FootprintList->SetFootprints( m_footprints, libraryName, component, filter ); // Tell AuiMgr that objects are changed ! - m_auimgr.Update(); + if( m_auimgr.GetManagedWindow() ) // Be sure Aui Manager is initialized + // (could be not the case when starting CvPcb + m_auimgr.Update(); if( component == NULL ) return; @@ -640,7 +641,7 @@ void CVPCB_MAINFRAME::OnSelectComponent( wxListEvent& event ) if ( ii >= 0 ) m_FootprintList->SetSelection( ii, false ); - if( m_DisplayFootprintFrame ) + if( GetFpViewerFrame() ) { CreateScreenCmp(); } @@ -919,15 +920,17 @@ bool CVPCB_MAINFRAME::WriteComponentLinkFile( const wxString& aFullFileName ) void CVPCB_MAINFRAME::CreateScreenCmp() { - if( !m_DisplayFootprintFrame ) + DISPLAY_FOOTPRINTS_FRAME* fpframe = GetFpViewerFrame(); + + if( !fpframe ) { - m_DisplayFootprintFrame = new DISPLAY_FOOTPRINTS_FRAME( &Kiway(), this ); - m_DisplayFootprintFrame->Show( true ); + fpframe = new DISPLAY_FOOTPRINTS_FRAME( &Kiway(), this ); + fpframe->Show( true ); } else { - if( m_DisplayFootprintFrame->IsIconized() ) - m_DisplayFootprintFrame->Iconize( false ); + if( fpframe->IsIconized() ) + fpframe->Iconize( false ); // The display footprint window might be buried under some other // windows, so CreateScreenCmp() on an existing window would not @@ -935,11 +938,11 @@ void CVPCB_MAINFRAME::CreateScreenCmp() // So we want to put it to front, second after our CVPCB_MAINFRAME. // We do this by a little dance of bringing it to front then the main // frame back. - m_DisplayFootprintFrame->Raise(); // Make sure that is visible. - Raise(); // .. but still we want the focus. + fpframe->Raise(); // Make sure that is visible. + Raise(); // .. but still we want the focus. } - m_DisplayFootprintFrame->InitDisplay(); + fpframe->InitDisplay(); } @@ -1049,3 +1052,10 @@ COMPONENT* CVPCB_MAINFRAME::GetSelectedComponent() return NULL; } + + +DISPLAY_FOOTPRINTS_FRAME* CVPCB_MAINFRAME::GetFpViewerFrame() +{ + // returns the Footprint Viewer frame, if exists, or NULL + return (DISPLAY_FOOTPRINTS_FRAME*) wxWindow::FindWindowByName( FOOTPRINTVIEWER_FRAME_NAME ); +} diff --git a/cvpcb/cvpcb_mainframe.h b/cvpcb/cvpcb_mainframe.h index 6a7e00efaa..8cd8f5c322 100644 --- a/cvpcb/cvpcb_mainframe.h +++ b/cvpcb/cvpcb_mainframe.h @@ -63,7 +63,6 @@ public: FOOTPRINTS_LISTBOX* m_FootprintList; LIBRARY_LISTBOX* m_LibraryList; COMPONENTS_LISTBOX* m_ListCmp; - DISPLAY_FOOTPRINTS_FRAME* m_DisplayFootprintFrame; wxAuiToolBar* m_mainToolBar; wxFileName m_NetlistFileName; wxArrayString m_ModuleLibNames; @@ -95,6 +94,11 @@ public: */ FP_LIB_TABLE* FootprintLibs() const; + /** + * @return a pointer on the Footprint Viewer frame, if exists, or NULL + */ + DISPLAY_FOOTPRINTS_FRAME* GetFpViewerFrame(); + /** * Function OnSelectComponent * Called when clicking on a component in component list window From 8fc1e3827149d56865de7f983a625cfc21d5cfc5 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Fri, 21 Mar 2014 07:20:54 -0500 Subject: [PATCH 217/741] Enable GITHUB as default, include typeinfo into kiway_holder.cpp --- CMakeLists.txt | 2 +- common/kiway_holder.cpp | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8f3f114390..f2d3d8f19d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -82,7 +82,7 @@ mark_as_advanced( KICAD_SKIP_BOOST ) # Normal builders should build Boost. # when not defined by user, the default is python.exe under Windows and python2 for others # python binary file should be is exec path. -option( BUILD_GITHUB_PLUGIN "Build the GITHUB_PLUGIN for pcbnew." OFF ) +option( BUILD_GITHUB_PLUGIN "Build the GITHUB_PLUGIN for pcbnew." ON ) # This can be set to a custom name to brag about a particular branch in the "About" dialog: set( KICAD_REPO_NAME "product" CACHE STRING "Name of the tree from which this build came." ) diff --git a/common/kiway_holder.cpp b/common/kiway_holder.cpp index 8679254d82..a0a2dcfe76 100644 --- a/common/kiway_holder.cpp +++ b/common/kiway_holder.cpp @@ -2,6 +2,10 @@ #include #include +#if defined(DEBUG) + #include +#endif + PROJECT& KIWAY_HOLDER::Prj() const { @@ -26,4 +30,3 @@ void KIWAY_HOLDER::SetKiway( wxWindow* aDest, KIWAY* aKiway ) m_kiway = aKiway; } - From c7116e9d0316704da2a04ebc4ca35aaa91f96efe Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 21 Mar 2014 17:55:46 +0100 Subject: [PATCH 218/741] FIxed too late deletion of TOOLs. --- common/tool/tool_manager.cpp | 10 +++++++++- include/tool/tool_manager.h | 5 +++++ pcbnew/tools/pcb_tools.cpp | 1 + 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 57a98779f6..0d25c88434 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -103,6 +103,14 @@ TOOL_MANAGER::TOOL_MANAGER() : TOOL_MANAGER::~TOOL_MANAGER() +{ + DeleteAll(); + + delete m_actionMgr; +} + + +void TOOL_MANAGER::DeleteAll() { std::map::iterator it, it_end; @@ -113,7 +121,7 @@ TOOL_MANAGER::~TOOL_MANAGER() delete it->first; // delete the tool itself } - delete m_actionMgr; + m_toolState.clear(); } diff --git a/include/tool/tool_manager.h b/include/tool/tool_manager.h index 04afea3483..1103a7f890 100644 --- a/include/tool/tool_manager.h +++ b/include/tool/tool_manager.h @@ -57,6 +57,11 @@ public: ~TOOL_MANAGER(); + /** + * Deletes all the tools that were registered in the TOOL_MANAGER. + */ + void DeleteAll(); + /** * Generates an unique ID from for a tool with given name. */ diff --git a/pcbnew/tools/pcb_tools.cpp b/pcbnew/tools/pcb_tools.cpp index 28a1b424a3..437ad4fba8 100644 --- a/pcbnew/tools/pcb_tools.cpp +++ b/pcbnew/tools/pcb_tools.cpp @@ -68,6 +68,7 @@ void PCB_EDIT_FRAME::setupTools() void PCB_EDIT_FRAME::destroyTools() { + m_toolManager.DeleteAll(); delete m_toolDispatcher; } From 4a39fcdd8fc3436f20f43f7fda5ce9b56ed7e4be Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Fri, 21 Mar 2014 11:59:19 -0500 Subject: [PATCH 219/741] single_top.c logic, improved OpenProjectFiles() documentation. --- common/single_top.cpp | 87 ++++++++++++++++-------------------------- include/kiway_player.h | 11 +++++- 2 files changed, 41 insertions(+), 57 deletions(-) diff --git a/common/single_top.cpp b/common/single_top.cpp index 22da93aacd..ce9fe38202 100644 --- a/common/single_top.cpp +++ b/common/single_top.cpp @@ -353,76 +353,54 @@ bool PGM_SINGLE_TOP::OnPgmInit( wxApp* aWxApp ) if( argc > 1 ) { + /* + gerbview handles multiple project data files, i.e. gerber files on + cmd line. Others currently do not, they handle only one. For common + code simplicity we simply pass all the arguments in however, each + program module can do with them what they want, ignore, complain + whatever. We don't establish policy here, as this is a multi-purpose + launcher. + */ -#if defined(TOP_FRAME) && TOP_FRAME==GERBER_FRAME_TYPE - // gerbview handles multiple project data files, i.e. gerber files on cmd line. - - std::vector fileSet; - - // Load all files specified on the command line. + std::vector argSet; for( int i=1; iOpenProjectFiles( fileSet ) ) - { - // OpenProjectFiles() API asks that it report failure to the UI. - // Nothing further to say here. - - // Fail the process startup if the file could not be opened, - // although this is an optional choice, one that can be reversed - // also in the KIFACE specific OpenProjectFiles() return value. - return false; - } - -#else - - wxFileName fn( argv[1] ); - - if( !fn.IsOk() ) - { - return false; - } - #if defined(PGM_DATA_FILE_EXT) - // PGM_DATA_FILE_EXT is different for each compile, it may come from CMake - // on the compiler command line, or not. - if( !fn.GetExt() ) - fn.SetExt( wxT( PGM_DATA_FILE_EXT ) ); -#endif + // PGM_DATA_FILE_EXT is different for each compile, it may come + // from CMake on the compiler command line, often does not. + // This facillity is mostly useful only for those program modules + // supporting a single argv[1]. + if( !argv1.GetExt() ) + argv1.SetExt( wxT( PGM_DATA_FILE_EXT ) ); - if( !Pgm().LockFile( fn.GetFullPath() ) ) - { - wxLogSysError( _( "This file is already open." ) ); - return false; + argSet[0] = argv1.GetFullPath(); +#endif + if( !Pgm().LockFile( argSet[0] ) ) + { + wxLogSysError( _( "This file is already open." ) ); + return false; + } } - if( fn.GetPath().size() ) + // @todo: setting CWD is taboo in a multi-project environment, this + // will not be possible soon. + if( argv1.GetPath().size() ) // path only { - // wxSetWorkingDirectory does not like empty paths - wxSetWorkingDirectory( fn.GetPath() ); - - // @todo: setting CWD is taboo in a multi-project environment + // wxSetWorkingDirectory() does not like empty paths + wxSetWorkingDirectory( argv1.GetPath() ); } // Use the KIWAY_PLAYER::OpenProjectFiles() API function: - if( !frame->OpenProjectFiles( std::vector( 1, fn.GetFullPath() ) ) ) + if( !frame->OpenProjectFiles( argSet ) ) { // OpenProjectFiles() API asks that it report failure to the UI. // Nothing further to say here. @@ -432,7 +410,6 @@ bool PGM_SINGLE_TOP::OnPgmInit( wxApp* aWxApp ) // also in the KIFACE specific OpenProjectFiles() return value. return false; } -#endif } else { diff --git a/include/kiway_player.h b/include/kiway_player.h index 2ffab5acb6..b61b6f195c 100644 --- a/include/kiway_player.h +++ b/include/kiway_player.h @@ -129,8 +129,15 @@ public: * KIWAY_PLAYER is precluded. *

* Each derived class should handle this in a way specific to its needs. - * No prompting is done inside here for any file or project. There is no - * need to call this with aFileList which is empty. + * No prompting is done inside here for any file or project. There should be + * need to call this with aFileList which is empty. However, calling it with + * a single filename which does not exist should indicate to the implementor + * that a new session is being started and that the given name is the desired + * name for the data file at time of save. + *

+ * Therefore, one of the first things an implementation should do is test for + * existence of the first file in the list, and if it does not exist, treat + * it as a new session, possibly with a UI notification to that effect. *

* After loading the window should update its Title as part of this operation. * If the KIWAY_PLAYER needs to, it can load the *.pro file as part of this operation. From 3a43f0527f300ece3c33a7b5bd3ec69ed8a8b8e1 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 21 Mar 2014 18:00:11 +0100 Subject: [PATCH 220/741] Changed void BASE_SCREEN::GetGrids( GRIDS& aList ) to const GRIDS& BASE_SCREEN::GetGrids(). Refactored: - EDA_DRAW_FRAME::SetNextGrid() & SetPrevGrid() - PCB_BASE_FRAME::SetFastGrid1() & SetFastGrid2() Removed a warning from RN_DATA::updateNet(int). --- common/base_screen.cpp | 7 ------ common/drawframe.cpp | 34 +++++++++++++++++++++++++++- eeschema/eeschema_config.cpp | 4 +--- include/class_base_screen.h | 11 +++++----- include/wxBasePcbFrame.h | 21 +++++++++++++----- include/wxstruct.h | 12 ++++++++++ pcbnew/basepcbframe.cpp | 27 +++++++++++++++++++++++ pcbnew/class_board.h | 14 +++++------- pcbnew/hotkeys_board_editor.cpp | 39 ++++----------------------------- pcbnew/ratsnest_data.cpp | 2 +- 10 files changed, 106 insertions(+), 65 deletions(-) diff --git a/common/base_screen.cpp b/common/base_screen.cpp index a441a418d5..01a798df4a 100644 --- a/common/base_screen.cpp +++ b/common/base_screen.cpp @@ -175,13 +175,6 @@ void BASE_SCREEN::SetGridList( GRIDS& gridlist ) } -void BASE_SCREEN::GetGrids( GRIDS& aList ) -{ - for( size_t i = 0; i < m_grids.size(); i++ ) - aList.push_back( m_grids[ i ] ); -} - - int BASE_SCREEN::SetGrid( const wxRealPoint& size ) { wxASSERT( !m_grids.empty() ); diff --git a/common/drawframe.cpp b/common/drawframe.cpp index 31048df82f..45913b5171 100644 --- a/common/drawframe.cpp +++ b/common/drawframe.cpp @@ -395,7 +395,7 @@ void EDA_DRAW_FRAME::OnSelectGrid( wxCommandEvent& event ) if( IsGalCanvasActive() ) { GetGalCanvas()->GetGAL()->SetGridSize( VECTOR2D( screen->GetGrid().m_Size.x, - screen->GetGrid().m_Size.y ) ); + screen->GetGrid().m_Size.y ) ); GetGalCanvas()->GetView()->MarkTargetDirty( KIGFX::TARGET_NONCACHED ); } @@ -532,6 +532,38 @@ wxPoint EDA_DRAW_FRAME::GetGridPosition( const wxPoint& aPosition ) const } +void EDA_DRAW_FRAME::SetNextGrid() +{ + if( m_gridSelectBox ) + { + m_gridSelectBox->SetSelection( ( m_gridSelectBox->GetSelection() + 1 ) % + m_gridSelectBox->GetCount() ); + + wxCommandEvent cmd( wxEVT_COMMAND_COMBOBOX_SELECTED ); + // cmd.SetEventObject( this ); + OnSelectGrid( cmd ); + } +} + + +void EDA_DRAW_FRAME::SetPrevGrid() +{ + if( m_gridSelectBox ) + { + int cnt = m_gridSelectBox->GetSelection(); + + if( --cnt < 0 ) + cnt = m_gridSelectBox->GetCount() - 1; + + m_gridSelectBox->SetSelection( cnt ); + + wxCommandEvent cmd( wxEVT_COMMAND_COMBOBOX_SELECTED ); + // cmd.SetEventObject( this ); + OnSelectGrid( cmd ); + } +} + + int EDA_DRAW_FRAME::ReturnBlockCommand( int key ) { return 0; diff --git a/eeschema/eeschema_config.cpp b/eeschema/eeschema_config.cpp index 43e5ec21e3..4449957e0b 100644 --- a/eeschema/eeschema_config.cpp +++ b/eeschema/eeschema_config.cpp @@ -255,9 +255,7 @@ void SCH_EDIT_FRAME::Process_Config( wxCommandEvent& event ) void SCH_EDIT_FRAME::OnSetOptions( wxCommandEvent& event ) { wxArrayString units; - GRIDS grid_list; - - GetScreen()->GetGrids( grid_list ); + GRIDS grid_list = GetScreen()->GetGrids(); DIALOG_EESCHEMA_OPTIONS dlg( this ); diff --git a/include/class_base_screen.h b/include/class_base_screen.h index eed5987e39..502ab9a9e6 100644 --- a/include/class_base_screen.h +++ b/include/class_base_screen.h @@ -65,7 +65,7 @@ public: }; -typedef std::vector< GRID_TYPE > GRIDS; +typedef std::vector GRIDS; /** @@ -445,11 +445,12 @@ public: /** * Function GetGrids(). - * Copy the grid list to \a aList. - * - * @param aList - List to copy to. + * Returns the current list of grids. */ - void GetGrids( GRIDS& aList ); + const GRIDS& GetGrids() const + { + return m_grids; + } /** * Function GetClass diff --git a/include/wxBasePcbFrame.h b/include/wxBasePcbFrame.h index 4306d67977..6f8c226e90 100644 --- a/include/wxBasePcbFrame.h +++ b/include/wxBasePcbFrame.h @@ -76,8 +76,8 @@ public: EDA_UNITS_T m_UserGridUnit; wxRealPoint m_UserGridSize; - int m_FastGrid1; - int m_FastGrid2; + int m_FastGrid1; // 1st fast grid setting (index in EDA_DRAW_FRAME::m_gridSelectBox) + int m_FastGrid2; // 2nd fast grid setting (index in EDA_DRAW_FRAME::m_gridSelectBox) EDA_3D_FRAME* m_Draw3DFrame; @@ -220,13 +220,10 @@ public: * Function BestZoom * @return the "best" zoom to show the entire board or footprint on the screen. */ - virtual double BestZoom(); virtual void Show3D_Frame( wxCommandEvent& event ); -public: - // Read/write functions: EDA_ITEM* ReadDrawSegmentDescr( LINE_READER* aReader ); int ReadListeSegmentDescr( LINE_READER* aReader, @@ -680,6 +677,20 @@ public: void OnUpdateSelectGrid( wxUpdateUIEvent& aEvent ); void OnUpdateSelectZoom( wxUpdateUIEvent& aEvent ); + /** + * Function SetFastGrid1() + * + * Switches grid settings to the 1st "fast" setting predefined by user. + */ + void SetFastGrid1(); + + /** + * Function SetFastGrid2() + * + * Switches grid settings to the 1st "fast" setting predefined by user. + */ + void SetFastGrid2(); + DECLARE_EVENT_TABLE() }; diff --git a/include/wxstruct.h b/include/wxstruct.h index 69a24fa7a0..5564fe6050 100644 --- a/include/wxstruct.h +++ b/include/wxstruct.h @@ -727,6 +727,18 @@ public: */ wxPoint GetGridPosition( const wxPoint& aPosition ) const; + /** + * Function SetNextGrid() + * changes the grid size settings to the next one available. + */ + virtual void SetNextGrid(); + + /** + * Function SetPrevGrid() + * changes the grid size settings to the previous one available. + */ + virtual void SetPrevGrid(); + /** * Command event handler for selecting grid sizes. * diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 0464d04683..1bccc1894a 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -914,6 +914,7 @@ void PCB_BASE_FRAME::updateGridSelectBox() } } + void PCB_BASE_FRAME::updateZoomSelectBox() { if( m_zoomSelectBox == NULL ) @@ -943,3 +944,29 @@ void PCB_BASE_FRAME::updateZoomSelectBox() m_zoomSelectBox->SetSelection( i + 1 ); } } + + +void PCB_BASE_FRAME::SetFastGrid1() +{ + if( m_gridSelectBox ) + { + m_gridSelectBox->SetSelection( m_FastGrid1 ); + + wxCommandEvent cmd( wxEVT_COMMAND_COMBOBOX_SELECTED ); + cmd.SetEventObject( this ); + OnSelectGrid( cmd ); + } +} + + +void PCB_BASE_FRAME::SetFastGrid2() +{ + if( m_gridSelectBox ) + { + m_gridSelectBox->SetSelection( m_FastGrid2 ); + + wxCommandEvent cmd( wxEVT_COMMAND_COMBOBOX_SELECTED ); + cmd.SetEventObject( this ); + OnSelectGrid( cmd ); + } +} diff --git a/pcbnew/class_board.h b/pcbnew/class_board.h index 92058d0af6..0d394297b2 100644 --- a/pcbnew/class_board.h +++ b/pcbnew/class_board.h @@ -68,8 +68,6 @@ namespace KIGFX // non-owning container of item candidates when searching for items on the same track. typedef std::vector< TRACK* > TRACK_PTRS; -#define HISTORY_MAX_COUNT 8 - /** * Enum LAYER_T @@ -305,13 +303,13 @@ public: // the first value is always the value of the current NetClass // The others values are extra values - /// Vias size and drill list(max count = HISTORY_MAX_COUNT) - std::vector m_ViasDimensionsList; + // The first value is the current netclass via size // TODO verify + /// Vias size and drill list + std::vector m_ViasDimensionsList; - // The first value is the current netclass via size - // tracks widths (max count = HISTORY_MAX_COUNT) - // The first value is the current netclass track width - std::vector m_TrackWidthList; + // The first value is the current netclass track width // TODO verify + /// Track width list + std::vector m_TrackWidthList; BOARD(); diff --git a/pcbnew/hotkeys_board_editor.cpp b/pcbnew/hotkeys_board_editor.cpp index 6364d69ba6..42ab76ac75 100644 --- a/pcbnew/hotkeys_board_editor.cpp +++ b/pcbnew/hotkeys_board_editor.cpp @@ -216,50 +216,19 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit break; case HK_SWITCH_GRID_TO_FASTGRID1: - if( m_gridSelectBox ) - { - m_gridSelectBox->SetSelection( m_FastGrid1 ); - cmd.SetEventType( wxEVT_COMMAND_COMBOBOX_SELECTED ); - OnSelectGrid( cmd ); - } - + SetFastGrid1(); break; case HK_SWITCH_GRID_TO_FASTGRID2: - if( m_gridSelectBox ) - { - m_gridSelectBox->SetSelection( m_FastGrid2 ); - cmd.SetEventType( wxEVT_COMMAND_COMBOBOX_SELECTED ); - OnSelectGrid( cmd ); - } - + SetFastGrid2(); break; case HK_SWITCH_GRID_TO_NEXT: - if( m_gridSelectBox ) - { - m_gridSelectBox->SetSelection( ( m_gridSelectBox->GetSelection() + 1 ) % - m_gridSelectBox->GetCount() ); - cmd.SetEventType( wxEVT_COMMAND_COMBOBOX_SELECTED ); - OnSelectGrid( cmd ); - } + SetNextGrid(); break; case HK_SWITCH_GRID_TO_PREVIOUS: - if( m_gridSelectBox ) - { - cnt = m_gridSelectBox->GetSelection(); - - if ( cnt == 0 ) - cnt = m_gridSelectBox->GetCount() - 1; - else - cnt--; - - m_gridSelectBox->SetSelection( cnt ); - cmd.SetEventType( wxEVT_COMMAND_COMBOBOX_SELECTED ); - OnSelectGrid( cmd ); - } - + SetPrevGrid(); break; case HK_SWITCH_LAYER_TO_PREVIOUS: diff --git a/pcbnew/ratsnest_data.cpp b/pcbnew/ratsnest_data.cpp index 4242ea6bf1..b2bc4d5899 100644 --- a/pcbnew/ratsnest_data.cpp +++ b/pcbnew/ratsnest_data.cpp @@ -1024,7 +1024,7 @@ void RN_DATA::updateNet( int aNetCode ) { assert( aNetCode < (int) m_nets.size() ); - if( aNetCode < 1 || aNetCode > m_nets.size() ) + if( aNetCode < 1 || aNetCode > (int) m_nets.size() ) return; m_nets[aNetCode].ClearSimple(); From 262ec8920a435aad2012437bc6099bb584d483a7 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 22 Mar 2014 09:28:39 +0100 Subject: [PATCH 221/741] Minor fixes for Windows: move resources from dso to .exe, to have the application icon in executable, and therefore shown in shortcuts. pcb_calculator: minor coding style fix. --- cvpcb/CMakeLists.txt | 3 ++- eeschema/CMakeLists.txt | 3 ++- gerbview/CMakeLists.txt | 3 ++- pagelayout_editor/CMakeLists.txt | 9 ++++---- pcb_calculator/CMakeLists.txt | 3 ++- pcb_calculator/pcb_calculator.h | 6 +++--- pcb_calculator/pcb_calculator_frame.cpp | 14 ++++++------- pcb_calculator/transline_dlg_funct.cpp | 18 +++++++--------- pcb_calculator/transline_ident.cpp | 26 +++++++++++------------ pcb_calculator/transline_ident.h | 28 ++++++++++++------------- pcbnew/CMakeLists.txt | 3 ++- pcbnew/pcbnew.cpp | 7 ++++++- 12 files changed, 66 insertions(+), 57 deletions(-) diff --git a/cvpcb/CMakeLists.txt b/cvpcb/CMakeLists.txt index a5942f0f5d..de080fbf89 100644 --- a/cvpcb/CMakeLists.txt +++ b/cvpcb/CMakeLists.txt @@ -73,6 +73,7 @@ if( USE_KIWAY_DLLS ) add_executable( cvpcb WIN32 MACOSX_BUNDLE ../common/single_top.cpp ../common/pgm_base.cpp + ${CVPCB_RESOURCES} ) set_source_files_properties( ../common/single_top.cpp PROPERTIES COMPILE_DEFINITIONS "TOP_FRAME=CVPCB_FRAME_TYPE;PGM_DATA_FILE_EXT=\"net\";BUILD_KIWAY_DLL" @@ -94,7 +95,7 @@ if( USE_KIWAY_DLLS ) cvpcb.cpp ${CVPCB_SRCS} ${CVPCB_DIALOGS} - ${CVPCB_RESOURCES} +# ${CVPCB_RESOURCES} ) set_target_properties( cvpcb_kiface PROPERTIES OUTPUT_NAME cvpcb diff --git a/eeschema/CMakeLists.txt b/eeschema/CMakeLists.txt index ecbddd5014..9ae138f429 100644 --- a/eeschema/CMakeLists.txt +++ b/eeschema/CMakeLists.txt @@ -242,6 +242,7 @@ if( USE_KIWAY_DLLS ) add_executable( eeschema WIN32 MACOSX_BUNDLE ../common/single_top.cpp ../common/pgm_base.cpp + ${EESCHEMA_RESOURCES} ) set_source_files_properties( ../common/single_top.cpp PROPERTIES COMPILE_DEFINITIONS "TOP_FRAME=SCHEMATIC_FRAME_TYPE;PGM_DATA_FILE_EXT=\"sch\";BUILD_KIWAY_DLL" @@ -258,7 +259,7 @@ if( USE_KIWAY_DLLS ) add_library( eeschema_kiface MODULE ${EESCHEMA_SRCS} ${EESCHEMA_COMMON_SRCS} - ${EESCHEMA_RESOURCES} +# ${EESCHEMA_RESOURCES} ) target_link_libraries( eeschema_kiface common diff --git a/gerbview/CMakeLists.txt b/gerbview/CMakeLists.txt index 124a8d0c56..82e27ca1aa 100644 --- a/gerbview/CMakeLists.txt +++ b/gerbview/CMakeLists.txt @@ -91,6 +91,7 @@ if( USE_KIWAY_DLLS ) add_executable( gerbview WIN32 MACOSX_BUNDLE ../common/single_top.cpp ../common/pgm_base.cpp + ${GERBVIEW_RESOURCES} ) set_source_files_properties( ../common/single_top.cpp PROPERTIES COMPILE_DEFINITIONS "TOP_FRAME=GERBER_FRAME_TYPE;BUILD_KIWAY_DLL" @@ -113,7 +114,7 @@ if( USE_KIWAY_DLLS ) ${GERBVIEW_SRCS} ${DIALOGS_SRCS} ${GERBVIEW_EXTRA_SRCS} - ${GERBVIEW_RESOURCES} +# ${GERBVIEW_RESOURCES} ) set_target_properties( gerbview_kiface PROPERTIES OUTPUT_NAME gerbview diff --git a/pagelayout_editor/CMakeLists.txt b/pagelayout_editor/CMakeLists.txt index 3d25ce7ac3..e59bde050e 100644 --- a/pagelayout_editor/CMakeLists.txt +++ b/pagelayout_editor/CMakeLists.txt @@ -49,10 +49,11 @@ endif() if( USE_KIWAY_DLLS ) - # a very small program launcher for pcbnew_kiface + # a very small program launcher for pl_editor_kiface add_executable( pl_editor WIN32 MACOSX_BUNDLE ../common/single_top.cpp ../common/pgm_base.cpp + ${PL_EDITOR_RESOURCES} ) set_source_files_properties( ../common/single_top.cpp PROPERTIES COMPILE_DEFINITIONS "TOP_FRAME=PL_EDITOR_FRAME_TYPE;PGM_DATA_FILE_EXT=\"kicad_wks\";BUILD_KIWAY_DLL" @@ -69,13 +70,13 @@ if( USE_KIWAY_DLLS ) LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=pl_editor.map" ) endif() - # the main pcbnew program, in DSO form. + # the main pl_editor program, in DSO form. add_library( pl_editor_kiface MODULE pl_editor.cpp ${PL_EDITOR_SRCS} ${DIALOGS_SRCS} ${PL_EDITOR_EXTRA_SRCS} - ${PL_EDITOR_RESOURCES} +# ${PL_EDITOR_RESOURCES} ) target_link_libraries( pl_editor_kiface common @@ -99,7 +100,7 @@ if( USE_KIWAY_DLLS ) LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=_pl_editor.kiface.map" ) endif() - # if building pcbnew, then also build pcbnew_kiface if out of date. + # if building pl_editor, then also build pl_editor_kiface if out of date. add_dependencies( pl_editor pl_editor_kiface ) # these 2 binaries are a matched set, keep them together: diff --git a/pcb_calculator/CMakeLists.txt b/pcb_calculator/CMakeLists.txt index 74be8fe1d7..51f1e21c66 100644 --- a/pcb_calculator/CMakeLists.txt +++ b/pcb_calculator/CMakeLists.txt @@ -72,6 +72,7 @@ if( USE_KIWAY_DLLS ) add_executable( pcb_calculator WIN32 MACOSX_BUNDLE ../common/single_top.cpp ../common/pgm_base.cpp + ${PCB_CALCULATOR_RESOURCES} ) set_source_files_properties( ../common/single_top.cpp PROPERTIES COMPILE_DEFINITIONS "TOP_FRAME=0;BUILD_KIWAY_DLL" @@ -92,7 +93,7 @@ if( USE_KIWAY_DLLS ) add_library( pcb_calculator_kiface MODULE pcb_calculator.cpp ${PCB_CALCULATOR_SRCS} - ${PCB_CALCULATOR_RESOURCES} +# ${PCB_CALCULATOR_RESOURCES} ) set_target_properties( pcb_calculator_kiface PROPERTIES OUTPUT_NAME pcb_calculator diff --git a/pcb_calculator/pcb_calculator.h b/pcb_calculator/pcb_calculator.h index 808b5da208..0c3633a5ca 100644 --- a/pcb_calculator/pcb_calculator.h +++ b/pcb_calculator/pcb_calculator.h @@ -29,7 +29,7 @@ private: wxSize m_FrameSize; wxPoint m_FramePos; wxConfig * m_Config; - enum transline_type_id m_currTransLineType; + enum TRANSLINE_TYPE_ID m_currTransLineType; TRANSLINE * m_currTransLine; // a pointer to the active transline // List of translines: ordered like in dialog menu list std::vector m_transline_list; @@ -153,9 +153,9 @@ private: * Update all values, labels and tool tips of parameters needed * by the new transline * Irrelevant parameters texts are blanked. - * @param aType = the transline_type_id of the new selected transline + * @param aType = the TRANSLINE_TYPE_ID of the new selected transline */ - void TranslineTypeSelection( enum transline_type_id aType ); + void TranslineTypeSelection( enum TRANSLINE_TYPE_ID aType ); /** * Function TransfDlgDataToTranslineParams diff --git a/pcb_calculator/pcb_calculator_frame.cpp b/pcb_calculator/pcb_calculator_frame.cpp index 9482a6ee83..7981201e25 100644 --- a/pcb_calculator/pcb_calculator_frame.cpp +++ b/pcb_calculator/pcb_calculator_frame.cpp @@ -58,17 +58,17 @@ PCB_CALCULATOR_FRAME::PCB_CALCULATOR_FRAME( KIWAY* aKiway, wxWindow* aParent ) : SetKiway( this, aKiway ); m_currTransLine = NULL; - m_currTransLineType = default_type; + m_currTransLineType = DEFAULT_TYPE; m_currAttenuator = NULL; m_RegulatorListChanged = false; m_Config = new wxConfig(); // Populate transline list ordered like in dialog menu list - const static transline_type_id tltype_list[8] = + const static TRANSLINE_TYPE_ID tltype_list[8] = { - microstrip_type, cpw_type, grounded_cpw_type, - rectwaveguide_type, coax_type, c_microstrip_type, - stripline_type, twistedpair_type + MICROSTRIP_TYPE, CPW_TYPE, GROUNDED_CPW_TYPE, + RECTWAVEGUIDE_TYPE, COAX_TYPE, C_MICROSTRIP_TYPE, + STRIPLINE_TYPE, TWISTEDPAIR_TYPE }; for( int ii = 0; ii < 8; ii++ ) @@ -177,8 +177,8 @@ void PCB_CALCULATOR_FRAME::ReadConfig() m_Config->Read( KEYWORD_FRAME_POSY, &m_FramePos.y, -1 ); m_Config->Read( KEYWORD_FRAME_SIZEX, &m_FrameSize.x, -1 ); m_Config->Read( KEYWORD_FRAME_SIZEY, &m_FrameSize.y, -1 ); - m_Config->Read( KEYWORD_TRANSLINE_SELECTION, <mp, (long) default_type ); - m_currTransLineType = (enum transline_type_id) ltmp; + m_Config->Read( KEYWORD_TRANSLINE_SELECTION, <mp, (long) DEFAULT_TYPE ); + m_currTransLineType = (enum TRANSLINE_TYPE_ID) ltmp; m_Config->Read( KEYWORD_PAGE_SELECTION, <mp, 0 ); m_Notebook->ChangeSelection( ltmp ); m_Config->Read( KEYWORD_COLORCODE_SELECTION, <mp, 1 ); diff --git a/pcb_calculator/transline_dlg_funct.cpp b/pcb_calculator/transline_dlg_funct.cpp index 50ee7ea4fa..f6ca6a4208 100644 --- a/pcb_calculator/transline_dlg_funct.cpp +++ b/pcb_calculator/transline_dlg_funct.cpp @@ -33,9 +33,7 @@ extern double DoubleFromString( const wxString& TextValue ); -/* - * these values come from QucsStudio ( by Michael Margraf ) - */ +// these values come from QucsStudio ( by Michael Margraf ) // Display a selection of usual Er, TanD, Rho values // format is @@ -143,16 +141,16 @@ struct DLG_PRM_DATA * Irrelevant parameters texts are blanked. * @param aType = the transline_type_id of the new selected transline */ -void PCB_CALCULATOR_FRAME::TranslineTypeSelection( enum transline_type_id aType ) +void PCB_CALCULATOR_FRAME::TranslineTypeSelection( enum TRANSLINE_TYPE_ID aType ) { wxString msg; #define DOUBLE_TO_CTLR( dlg_item, value ) { msg.Printf( wxT( "%g" ), value );\ dlg_item->SetValue( msg ); } m_currTransLineType = aType; - if( (m_currTransLineType < start_of_list_type ) - || ( m_currTransLineType >= end_of_list_type ) ) - m_currTransLineType = default_type; + if( (m_currTransLineType < START_OF_LIST_TYPE ) + || ( m_currTransLineType >= END_OF_LIST_TYPE ) ) + m_currTransLineType = DEFAULT_TYPE; TRANSLINE_IDENT* tr_ident = m_transline_list[m_currTransLineType]; m_currTransLine = tr_ident->m_TLine; @@ -348,8 +346,8 @@ void PCB_CALCULATOR_FRAME::TranslineTypeSelection( enum transline_type_id aType /** * Function TransfDlgDataToTranslineParams - * Read values entered in dialog frame, and transfert these - * values in current transline parameters, converted in normalized units + * Read values entered in dialog frame, and copy these values + * in current transline parameters, converted in normalized units */ void PCB_CALCULATOR_FRAME::TransfDlgDataToTranslineParams() { @@ -378,7 +376,7 @@ void PCB_CALCULATOR_FRAME::TransfDlgDataToTranslineParams() */ void PCB_CALCULATOR_FRAME::OnTranslineSelection( wxCommandEvent& event ) { - enum transline_type_id id = (enum transline_type_id) event.GetSelection(); + enum TRANSLINE_TYPE_ID id = (enum TRANSLINE_TYPE_ID) event.GetSelection(); TranslineTypeSelection( id ); diff --git a/pcb_calculator/transline_ident.cpp b/pcb_calculator/transline_ident.cpp index 48369d0c03..fc74e0d27b 100644 --- a/pcb_calculator/transline_ident.cpp +++ b/pcb_calculator/transline_ident.cpp @@ -100,7 +100,7 @@ double TRANSLINE_PRM::FromUserUnit() * A class to handle a list of parameters of a given transline */ -TRANSLINE_IDENT::TRANSLINE_IDENT( enum transline_type_id aType ) +TRANSLINE_IDENT::TRANSLINE_IDENT( enum TRANSLINE_TYPE_ID aType ) { m_Type = aType; // The type of transline handled m_Icon = NULL; // An xpm icon to display in dialogs @@ -129,7 +129,7 @@ TRANSLINE_IDENT::TRANSLINE_IDENT( enum transline_type_id aType ) switch( m_Type ) { - case microstrip_type: // microstrip + case MICROSTRIP_TYPE: // microstrip m_TLine = new MICROSTRIP(); m_Icon = new wxBitmap( microstrip_xpm ); @@ -165,7 +165,7 @@ TRANSLINE_IDENT::TRANSLINE_IDENT( enum transline_type_id aType ) _( "Ang_l" ), _( "Electrical Length" ), 0.0, true ) ); break; - case cpw_type: // coplanar waveguide + case CPW_TYPE: // coplanar waveguide m_TLine = new COPLANAR(); m_Icon = new wxBitmap( cpw_xpm ); m_HasPrmSelection = true; @@ -197,7 +197,7 @@ TRANSLINE_IDENT::TRANSLINE_IDENT( enum transline_type_id aType ) _( "Ang_l" ), _( "Electrical Length" ), 0.0, true ) ); break; - case grounded_cpw_type: // grounded coplanar waveguide + case GROUNDED_CPW_TYPE: // grounded coplanar waveguide m_TLine = new GROUNDEDCOPLANAR(); m_Icon = new wxBitmap( cpw_back_xpm ); m_HasPrmSelection = true; @@ -230,7 +230,7 @@ TRANSLINE_IDENT::TRANSLINE_IDENT( enum transline_type_id aType ) break; - case rectwaveguide_type: // rectangular waveguide + case RECTWAVEGUIDE_TYPE: // rectangular waveguide m_TLine = new RECTWAVEGUIDE(); m_Icon = new wxBitmap( rectwaveguide_xpm ); m_HasPrmSelection = true; @@ -264,7 +264,7 @@ TRANSLINE_IDENT::TRANSLINE_IDENT( enum transline_type_id aType ) _( "Ang_l" ), _( "Electrical Length" ), 0, true ) ); break; - case coax_type: // coaxial cable + case COAX_TYPE: // coaxial cable m_TLine = new COAX(); m_Icon = new wxBitmap( coax_xpm ); m_HasPrmSelection = true; @@ -295,7 +295,7 @@ TRANSLINE_IDENT::TRANSLINE_IDENT( enum transline_type_id aType ) _( "Ang_l" ), _( "Electrical Length" ), 0.0, true ) ); break; - case c_microstrip_type: // coupled microstrip + case C_MICROSTRIP_TYPE: // coupled microstrip m_TLine = new C_MICROSTRIP(); m_Icon = new wxBitmap( c_microstrip_xpm ); m_HasPrmSelection = true; @@ -328,14 +328,14 @@ TRANSLINE_IDENT::TRANSLINE_IDENT( enum transline_type_id aType ) _( "L" ), _( "Line Length" ), 50.0, true ) ); AddPrm( new TRANSLINE_PRM( PRM_TYPE_ELEC, Z0_E_PRM, - _( "Z0e" ), _( "Even-Mode Impedance" ), 50.0, true ) ); + _( "Z0e (Zdiff)" ), _( "Even-Mode impedance (diff impedance)" ), 50.0, true ) ); AddPrm( new TRANSLINE_PRM( PRM_TYPE_ELEC, Z0_O_PRM, - _( "Z0o" ), _( "Odd-Mode Impedance" ), 50.0, true ) ); + _( "Z0o (Z0)" ), _( "Odd-Mode impedance" ), 50.0, true ) ); AddPrm( new TRANSLINE_PRM( PRM_TYPE_ELEC, ANG_L_PRM, - _( "Ang_l" ), _( "Electrical Length" ), 0.0, true ) ); + _( "Ang_l" ), _( "Electrical length" ), 0.0, true ) ); break; - case stripline_type: // stripline + case STRIPLINE_TYPE: // stripline m_TLine = new STRIPLINE(); m_Icon = new wxBitmap( stripline_xpm ); @@ -367,7 +367,7 @@ TRANSLINE_IDENT::TRANSLINE_IDENT( enum transline_type_id aType ) _( "Ang_l" ), _( "Electrical Length" ), 0, true ) ); break; - case twistedpair_type: // twisted pair + case TWISTEDPAIR_TYPE: // twisted pair m_TLine = new TWISTEDPAIR(); m_Icon = new wxBitmap( twistedpair_xpm ); m_HasPrmSelection = true; @@ -399,7 +399,7 @@ TRANSLINE_IDENT::TRANSLINE_IDENT( enum transline_type_id aType ) _( "Ang_l" ), _( "Electrical Length" ), 0.0, true ) ); break; - case end_of_list_type: // Not really used + case END_OF_LIST_TYPE: // Not really used break; } } diff --git a/pcb_calculator/transline_ident.h b/pcb_calculator/transline_ident.h index 45854a7877..d0805b04c7 100644 --- a/pcb_calculator/transline_ident.h +++ b/pcb_calculator/transline_ident.h @@ -12,18 +12,18 @@ #include // An enum to handle muwave shapes: -enum transline_type_id { - start_of_list_type = 0, - default_type = start_of_list_type, - microstrip_type = default_type, - cpw_type, - grounded_cpw_type, - rectwaveguide_type, - coax_type, - c_microstrip_type, - stripline_type, - twistedpair_type, - end_of_list_type +enum TRANSLINE_TYPE_ID { + START_OF_LIST_TYPE = 0, + DEFAULT_TYPE = START_OF_LIST_TYPE, + MICROSTRIP_TYPE = DEFAULT_TYPE, + CPW_TYPE, + GROUNDED_CPW_TYPE, + RECTWAVEGUIDE_TYPE, + COAX_TYPE, + C_MICROSTRIP_TYPE, + STRIPLINE_TYPE, + TWISTEDPAIR_TYPE, + END_OF_LIST_TYPE }; // A Class to handle parameters @@ -66,7 +66,7 @@ public: TRANSLINE_PRM( PRM_TYPE aType, PRMS_ID aId, class TRANSLINE_IDENT { public: - enum transline_type_id m_Type; // The type of transline handled + enum TRANSLINE_TYPE_ID m_Type; // The type of transline handled wxBitmap * m_Icon; // An icon to display in dialogs TRANSLINE* m_TLine; // The TRANSLINE itself wxArrayString m_Messages; // messages for results @@ -75,7 +75,7 @@ public: private: std::vector m_prms_List; -public: TRANSLINE_IDENT( enum transline_type_id aType ); +public: TRANSLINE_IDENT( enum TRANSLINE_TYPE_ID aType ); ~TRANSLINE_IDENT(); // Add a new param in list diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 768f76b161..d4fe33441d 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -505,6 +505,7 @@ if( USE_KIWAY_DLLS ) add_executable( pcbnew WIN32 MACOSX_BUNDLE ../common/single_top.cpp ../common/pgm_base.cpp + ${PCBNEW_RESOURCES} ) set_source_files_properties( ../common/single_top.cpp PROPERTIES COMPILE_DEFINITIONS "TOP_FRAME=PCB_FRAME_TYPE;PGM_DATA_FILE_EXT=\"kicad_pcb\";BUILD_KIWAY_DLL" @@ -527,7 +528,7 @@ if( USE_KIWAY_DLLS ) ${PCBNEW_SRCS} ${PCBNEW_COMMON_SRCS} ${PCBNEW_SCRIPTING_SRCS} - ${PCBNEW_RESOURCES} +# ${PCBNEW_RESOURCES} ) set_target_properties( pcbnew_kiface PROPERTIES # Decorate OUTPUT_NAME with PREFIX and SUFFIX, creating something like diff --git a/pcbnew/pcbnew.cpp b/pcbnew/pcbnew.cpp index 25ae74fa72..32b1569589 100644 --- a/pcbnew/pcbnew.cpp +++ b/pcbnew/pcbnew.cpp @@ -49,6 +49,7 @@ #include #include #include +#include #include #include @@ -325,7 +326,11 @@ static bool scriptingSetup() const wxString python_us( "python27_us" ); // Build our python path inside kicad - wxString kipython = m_BinDir + python_us; + wxString kipython = FindKicadFile( python_us + wxT("/python.exe") ); + + //we need only the path: + wxFileName fn( kipython ); + kipython = fn.GetPath(); // If our python install is existing inside kicad, use it if( wxDirExists( kipython ) ) From 1c232f5608ad737c32f9db8aeaac2b33a59c7c14 Mon Sep 17 00:00:00 2001 From: Marco Serantoni Date: Sat, 22 Mar 2014 12:35:33 +0100 Subject: [PATCH 222/741] [MacOSX] Support for kiface in bundles, workaround for some cairo issues --- CMakeModules/download_cairo.cmake | 7 ++++--- cvpcb/CMakeLists.txt | 9 +++++++++ eeschema/CMakeLists.txt | 9 +++++++++ gerbview/CMakeLists.txt | 9 +++++++++ pcb_calculator/CMakeLists.txt | 9 +++++++++ pcbnew/CMakeLists.txt | 9 +++++++++ 6 files changed, 49 insertions(+), 3 deletions(-) diff --git a/CMakeModules/download_cairo.cmake b/CMakeModules/download_cairo.cmake index 26ab53e3e9..2d8b30eb98 100644 --- a/CMakeModules/download_cairo.cmake +++ b/CMakeModules/download_cairo.cmake @@ -103,6 +103,7 @@ ExternalProject_Add( cairo ) # match these with whatever FindCairo.cmake sets -set( CAIRO_FOUND true ) -set( CAIRO_INCLUDE_DIR ${PREFIX}/include ) -set( CAIRO_CAIRO_LIBRARIES ${PREFIX}/lib ) +# Dick i'vent set it because /lib and /lib64 issue in non multiarch binaries OSs +#set( CAIRO_FOUND true ) +set( CAIRO_INCLUDE_DIR ${CAIRO_ROOT}/include ) +set( CAIRO_LIBRARIES ${CAIRO_ROOT}/lib ) diff --git a/cvpcb/CMakeLists.txt b/cvpcb/CMakeLists.txt index de080fbf89..aa04eb2f5c 100644 --- a/cvpcb/CMakeLists.txt +++ b/cvpcb/CMakeLists.txt @@ -171,6 +171,15 @@ if( USE_KIWAY_DLLS ) COMPONENT binary ) + if( APPLE ) + # copies kiface into the bundle + add_custom_target( _cvpcb_kiface_copy ALL + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/cvpcb/_cvpcb.kiface "${CMAKE_BINARY_DIR}/cvpcb/cvpcb.app/Contents/MacOS/" + DEPENDS cvpcb_kiface + COMMENT "Copying kiface into cvpcb" + ) + endif() + else() add_executable( cvpcb WIN32 MACOSX_BUNDLE diff --git a/eeschema/CMakeLists.txt b/eeschema/CMakeLists.txt index 9ae138f429..bd04eebb7d 100644 --- a/eeschema/CMakeLists.txt +++ b/eeschema/CMakeLists.txt @@ -312,6 +312,15 @@ if( USE_KIWAY_DLLS ) COMPONENT binary ) + if( APPLE ) + # copies kiface into the bundle + add_custom_target( _eeschema_kiface_copy ALL + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/eeschema/_eeschema.kiface "${CMAKE_BINARY_DIR}/eeschema/eeschema.app/Contents/MacOS/" + DEPENDS eeschema_kiface + COMMENT "Copying kiface into eeschema" + ) + endif() + else() add_executable( eeschema WIN32 MACOSX_BUNDLE ../common/single_top.cpp diff --git a/gerbview/CMakeLists.txt b/gerbview/CMakeLists.txt index 82e27ca1aa..685c826a1d 100644 --- a/gerbview/CMakeLists.txt +++ b/gerbview/CMakeLists.txt @@ -151,6 +151,15 @@ if( USE_KIWAY_DLLS ) COMPONENT binary ) + if( APPLE ) + # copies kiface into the bundle + add_custom_target( _gerbview_kiface_copy ALL + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/gerbview/_gerbview.kiface "${CMAKE_BINARY_DIR}/gerbview/gerbview.app/Contents/MacOS/" + DEPENDS gerbview_kiface + COMMENT "Copying kiface into gerbview" + ) + endif() + else() add_executable( gerbview WIN32 MACOSX_BUNDLE diff --git a/pcb_calculator/CMakeLists.txt b/pcb_calculator/CMakeLists.txt index 51f1e21c66..fb8e189859 100644 --- a/pcb_calculator/CMakeLists.txt +++ b/pcb_calculator/CMakeLists.txt @@ -134,6 +134,15 @@ if( USE_KIWAY_DLLS ) ) endif() + if( APPLE ) + # copies kiface into the bundle + add_custom_target( _pcb_calculator_kiface_copy ALL + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/pcb_calculator/_pcb_calculator.kiface "${CMAKE_BINARY_DIR}/pcb_calculator/pcb_calculator.app/Contents/MacOS/" + DEPENDS pcb_calculator_kiface + COMMENT "Copying kiface into pcb_calculator" + ) + endif() + else() add_executable( pcb_calculator WIN32 MACOSX_BUNDLE diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index d4fe33441d..ca49ce6f64 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -580,6 +580,15 @@ if( USE_KIWAY_DLLS ) COMPONENT binary ) + if( APPLE ) + # copies kiface into the bundle + add_custom_target( _pcbnew_kiface_copy ALL + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/pcbnew/_pcbnew.kiface "${CMAKE_BINARY_DIR}/pcbnew/pcbnew.app/Contents/MacOS/" + DEPENDS pcbnew_kiface + COMMENT "Copying kiface into pcbnew" + ) + endif() + else() # milestone A) kills this off: add_executable( pcbnew WIN32 MACOSX_BUNDLE From 2db6c2c929a9870e36a1b2a7eb126fc951ac354e Mon Sep 17 00:00:00 2001 From: Marco Serantoni Date: Sun, 23 Mar 2014 02:50:33 +0100 Subject: [PATCH 223/741] [MacOSX] forgot pl_editor, thanks Jean-Paul for pointing it --- pagelayout_editor/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pagelayout_editor/CMakeLists.txt b/pagelayout_editor/CMakeLists.txt index e59bde050e..95ce1af27f 100644 --- a/pagelayout_editor/CMakeLists.txt +++ b/pagelayout_editor/CMakeLists.txt @@ -113,6 +113,14 @@ if( USE_KIWAY_DLLS ) COMPONENT binary ) + if( APPLE ) + # copies kiface into the bundle + add_custom_target( _pleditor_kiface_copy ALL + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/pagelayout_editor/_pl_editor.kiface "${CMAKE_BINARY_DIR}/pagelayout_editor/pl_editor.app/Contents/MacOS/" + DEPENDS pl_editor_kiface + COMMENT "Copying kiface into pleditor" + ) + endif() else() From f1ee6de0251901a9622dfdc8197a8ae24178d7fc Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sun, 23 Mar 2014 07:44:15 +0100 Subject: [PATCH 224/741] Eeschema: does not close when the schematic file given in command line to run Eeschema is not found (i.e. when starting a new project). Otherwise one cannot start a new schematic project. --- eeschema/files-io.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/eeschema/files-io.cpp b/eeschema/files-io.cpp index 8e83cdc524..f7c91d6570 100644 --- a/eeschema/files-io.cpp +++ b/eeschema/files-io.cpp @@ -376,7 +376,9 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector& aFileSet, in msg.Printf( _( "File '%s' not found." ), GetChars( g_RootSheet->GetScreen()->GetFileName() ) ); DisplayInfoMessage( this, msg ); - return false; +// return false; + return true; // do not close Eeschema if the file if not found: + // we may have to create a new schematic file. } // load the project. @@ -392,7 +394,9 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector& aFileSet, in SetSheetNumberAndCount(); m_canvas->Refresh( true ); - return diag; +// return diag; + return true; // do not close Eeschema if the file if not found: + // we may have to create a new schematic file. } From dc9298730d65a3dc1f840eb1255bb627b85168e7 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 24 Mar 2014 08:45:05 +0100 Subject: [PATCH 225/741] Added PCBNEW_CONTROLS for handling miscellaneous hot keys (trying to be compatible with the default hot key settings). Currently there are a lot of stubs to be filled out (in pcbnew_controls.cpp). Handled actions: - switching layers - switching grids - changing track width & via size --- pcbnew/CMakeLists.txt | 1 + pcbnew/tools/common_actions.cpp | 147 +++++++++- pcbnew/tools/common_actions.h | 50 ++++ pcbnew/tools/pcb_tools.cpp | 4 +- pcbnew/tools/pcbnew_control.cpp | 458 ++++++++++++++++++++++++++++++++ pcbnew/tools/pcbnew_control.h | 97 +++++++ 6 files changed, 753 insertions(+), 4 deletions(-) create mode 100644 pcbnew/tools/pcbnew_control.cpp create mode 100644 pcbnew/tools/pcbnew_control.h diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index dee4a0af07..b68f93e05b 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -260,6 +260,7 @@ set( PCBNEW_CLASS_SRCS tools/point_editor.cpp tools/drawing_tool.cpp tools/edit_tool.cpp + tools/pcbnew_control.cpp tools/pcb_tools.cpp tools/common_actions.cpp ) diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index d5a996c284..f409cc610d 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -92,17 +92,160 @@ TOOL_ACTION COMMON_ACTIONS::placeTarget( "pcbnew.InteractiveDrawing.placeTarget" "Add layer alignment target", "Add layer alignment target" ); TOOL_ACTION COMMON_ACTIONS::placeModule( "pcbnew.InteractiveDrawing.placeModule", - AS_GLOBAL, 0, + AS_GLOBAL, 'O', "Add modules", "Add modules" ); TOOL_ACTION COMMON_ACTIONS::routerActivate( "pcbnew.InteractiveRouter", - AS_GLOBAL, 0, + AS_GLOBAL, 'X', "Run push & shove router", "Run push & shove router" ); TOOL_ACTION COMMON_ACTIONS::pointEditorUpdate( "pcbnew.PointEditor.update", AS_GLOBAL, 0, "", "" ); // No description, it is not supposed to be shown anywhere +// View Controls +TOOL_ACTION COMMON_ACTIONS::zoomIn( "pcbnew.zoomIn", + AS_GLOBAL, WXK_F1, + "", "" ); + +TOOL_ACTION COMMON_ACTIONS::zoomOut( "pcbnew.zoomOut", + AS_GLOBAL, WXK_F2, + "", "" ); + +TOOL_ACTION COMMON_ACTIONS::zoomCenter( "pcbnew.zoomCenter", + AS_GLOBAL, WXK_F4, + "", "" ); + +TOOL_ACTION COMMON_ACTIONS::zoomFitScreen( "pcbnew.zoomFitScreen", + AS_GLOBAL, WXK_HOME, + "", "" ); + +// Display modes +TOOL_ACTION COMMON_ACTIONS::trackDisplayMode( "pcbnew.trackDisplayMode", + AS_GLOBAL, 'K', + "", "" ); + +TOOL_ACTION COMMON_ACTIONS::padDisplayMode( "pcbnew.padDisplayMode", + AS_GLOBAL, 'J', // TODO temporarily, find a better hot key + "", "" ); + +TOOL_ACTION COMMON_ACTIONS::viaDisplayMode( "pcbnew.viaDisplayMode", + AS_GLOBAL, 'L', // TODO temporarily, find a better hot key + "", "" ); + +TOOL_ACTION COMMON_ACTIONS::highContrastMode( "pcbnew.highContrastMode", + AS_GLOBAL, 'H', + "", "" ); + +TOOL_ACTION COMMON_ACTIONS::highContrastInc( "pcbnew.highContrastInc", + AS_GLOBAL, MD_SHIFT + '.', // shift+. == > + "", "" ); + +TOOL_ACTION COMMON_ACTIONS::highContrastDec( "pcbnew.highContrastDec", + AS_GLOBAL, MD_SHIFT + 60, // shift+, == < + "", "" ); + + +// Layer control +TOOL_ACTION COMMON_ACTIONS::layerTop( "pcbnew.layerTop", + AS_GLOBAL, WXK_PAGEUP, + "", "" ); + +TOOL_ACTION COMMON_ACTIONS::layerInner1( "pcbnew.layerInner1", + AS_GLOBAL, WXK_F5, + "", "" ); + +TOOL_ACTION COMMON_ACTIONS::layerInner2( "pcbnew.layerInner2", + AS_GLOBAL, WXK_F6, + "", "" ); + +TOOL_ACTION COMMON_ACTIONS::layerInner3( "pcbnew.layerInner3", + AS_GLOBAL, WXK_F7, + "", "" ); + +TOOL_ACTION COMMON_ACTIONS::layerInner4( "pcbnew.layerInner4", + AS_GLOBAL, WXK_F8, + "", "" ); + +TOOL_ACTION COMMON_ACTIONS::layerInner5( "pcbnew.layerInner5", + AS_GLOBAL, WXK_F9, + "", "" ); + +TOOL_ACTION COMMON_ACTIONS::layerInner6( "pcbnew.layerInner6", + AS_GLOBAL, WXK_F10, + "", "" ); + +TOOL_ACTION COMMON_ACTIONS::layerBottom( "pcbnew.layerBottom", + AS_GLOBAL, WXK_PAGEDOWN, + "", "" ); + +TOOL_ACTION COMMON_ACTIONS::layerNext( "pcbnew.layerNext", + AS_GLOBAL, '=', + "", "" ); + +TOOL_ACTION COMMON_ACTIONS::layerPrev( "pcbnew.layerPrev", + AS_GLOBAL, '-', + "", "" ); + +TOOL_ACTION COMMON_ACTIONS::layerAlphaInc( "pcbnew.layerAlphaInc", + AS_GLOBAL, MD_SHIFT + '[', // shift+[ == { + "", "" ); + +TOOL_ACTION COMMON_ACTIONS::layerAlphaDec( "pcbnew.layerAlphaDec", + AS_GLOBAL, MD_SHIFT + ']', // shift+] == } + "", "" ); + + +// Grid control +TOOL_ACTION COMMON_ACTIONS::gridFast1( "pcbnew.gridFast1", + AS_GLOBAL, MD_ALT + '1', + "", "" ); + +TOOL_ACTION COMMON_ACTIONS::gridFast2( "pcbnew.gridFast2", + AS_GLOBAL, MD_ALT + '2', + "", "" ); + +TOOL_ACTION COMMON_ACTIONS::gridNext( "pcbnew.gridNext", + AS_GLOBAL, '`', + "", "" ); + +TOOL_ACTION COMMON_ACTIONS::gridPrev( "pcbnew.gridPrev", + AS_GLOBAL, MD_CTRL + '`', + "", "" ); + + +// Track & via size control +TOOL_ACTION COMMON_ACTIONS::trackWidthInc( "pcbnew.trackWidthInc", + AS_GLOBAL, '[', + "", "" ); + +TOOL_ACTION COMMON_ACTIONS::trackWidthDec( "pcbnew.trackWidthDec", + AS_GLOBAL, ']', + "", "" ); + +TOOL_ACTION COMMON_ACTIONS::viaSizeInc( "pcbnew.viaSizeInc", + AS_GLOBAL, '\'', + "", "" ); + +TOOL_ACTION COMMON_ACTIONS::viaSizeDec( "pcbnew.viaSizeDec", + AS_GLOBAL, '\\', + "", "" ); + + +// Miscellaneous +TOOL_ACTION COMMON_ACTIONS::resetCoords( "pcbnew.resetCoords", + AS_GLOBAL, ' ', + "", "" ); + +TOOL_ACTION COMMON_ACTIONS::switchUnits( "pcbnew.switchUnits", + AS_GLOBAL, MD_CTRL + 'U', + "", "" ); + +TOOL_ACTION COMMON_ACTIONS::showHelp( "pcbnew.showHelp", + AS_GLOBAL, MD_SHIFT + '/', // shift+/ == ? + "", "" ); + + std::string COMMON_ACTIONS::TranslateLegacyId( int aId ) { switch( aId ) diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index 321c372436..c97fa154cf 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -33,6 +33,7 @@ class COMMON_ACTIONS { public: + // Selection Tool /// Activation of the selection tool static TOOL_ACTION selectionActivate; @@ -42,6 +43,7 @@ public: /// Clears the current selection static TOOL_ACTION selectionClear; + // Edit Tool /// Activation of the edit tool static TOOL_ACTION editActivate; @@ -57,6 +59,7 @@ public: /// Deleting a BOARD_ITEM static TOOL_ACTION remove; + // Drawing Tool /// Activation of the drawing tool (line) static TOOL_ACTION drawLine; @@ -84,12 +87,59 @@ public: /// Activation of the drawing tool (placing a MODULE) static TOOL_ACTION placeModule; + // Push and Shove Router Tool /// Activation of the Push and Shove router static TOOL_ACTION routerActivate; + // Point Editor /// Update edit points static TOOL_ACTION pointEditorUpdate; + // View controls + static TOOL_ACTION zoomIn; + static TOOL_ACTION zoomOut; + static TOOL_ACTION zoomCenter; + static TOOL_ACTION zoomFitScreen; + + // Display modes + static TOOL_ACTION trackDisplayMode; + static TOOL_ACTION padDisplayMode; + static TOOL_ACTION viaDisplayMode; + static TOOL_ACTION highContrastMode; + static TOOL_ACTION highContrastInc; + static TOOL_ACTION highContrastDec; + + // Layer control + static TOOL_ACTION layerTop; + static TOOL_ACTION layerInner1; + static TOOL_ACTION layerInner2; + static TOOL_ACTION layerInner3; + static TOOL_ACTION layerInner4; + static TOOL_ACTION layerInner5; + static TOOL_ACTION layerInner6; + static TOOL_ACTION layerBottom; + static TOOL_ACTION layerNext; + static TOOL_ACTION layerPrev; + static TOOL_ACTION layerAlphaInc; + static TOOL_ACTION layerAlphaDec; + + // Grid control + static TOOL_ACTION gridFast1; + static TOOL_ACTION gridFast2; + static TOOL_ACTION gridNext; + static TOOL_ACTION gridPrev; + + // Track & via size control + static TOOL_ACTION trackWidthInc; + static TOOL_ACTION trackWidthDec; + static TOOL_ACTION viaSizeInc; + static TOOL_ACTION viaSizeDec; + + // Miscellaneous + static TOOL_ACTION resetCoords; + static TOOL_ACTION switchUnits; + static TOOL_ACTION showHelp; + /** * Function TranslateLegacyId() * Translates legacy tool ids to the corresponding TOOL_ACTION name. diff --git a/pcbnew/tools/pcb_tools.cpp b/pcbnew/tools/pcb_tools.cpp index 437ad4fba8..45a46a9cdd 100644 --- a/pcbnew/tools/pcb_tools.cpp +++ b/pcbnew/tools/pcb_tools.cpp @@ -38,7 +38,7 @@ #include "edit_tool.h" #include "drawing_tool.h" #include "point_editor.h" -#include "settings_tool.h" +#include "pcbnew_control.h" #include "common_actions.h" #include @@ -55,7 +55,7 @@ void PCB_EDIT_FRAME::setupTools() m_toolManager.RegisterTool( new EDIT_TOOL ); m_toolManager.RegisterTool( new DRAWING_TOOL ); m_toolManager.RegisterTool( new POINT_EDITOR ); - m_toolManager.RegisterTool( new SETTINGS_TOOL ); + m_toolManager.RegisterTool( new PCBNEW_CONTROL ); m_toolManager.SetEnvironment( NULL, GetGalCanvas()->GetView(), GetGalCanvas()->GetViewControls(), this ); diff --git a/pcbnew/tools/pcbnew_control.cpp b/pcbnew/tools/pcbnew_control.cpp new file mode 100644 index 0000000000..c3ffab9c9c --- /dev/null +++ b/pcbnew/tools/pcbnew_control.cpp @@ -0,0 +1,458 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 CERN + * @author Maciej Suminski + * + * 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 "pcbnew_control.h" +#include "common_actions.h" + +#include +#include +#include +#include +#include +#include + +using namespace KIGFX; +using boost::optional; + +PCBNEW_CONTROL::PCBNEW_CONTROL() : + TOOL_INTERACTIVE( "pcbnew.Settings" ) +{ +} + + +bool PCBNEW_CONTROL::Init() +{ + setTransitions(); + + return true; +} + + +int PCBNEW_CONTROL::ZoomIn( TOOL_EVENT& aEvent ) +{ + std::cout << __PRETTY_FUNCTION__ << std::endl; + setTransitions(); + + return 0; +} + + +int PCBNEW_CONTROL::ZoomOut( TOOL_EVENT& aEvent ) +{ + std::cout << __PRETTY_FUNCTION__ << std::endl; + setTransitions(); + + return 0; +} + + +int PCBNEW_CONTROL::ZoomCenter( TOOL_EVENT& aEvent ) +{ + std::cout << __PRETTY_FUNCTION__ << std::endl; + setTransitions(); + + return 0; +} + + +int PCBNEW_CONTROL::ZoomFitScreen( TOOL_EVENT& aEvent ) +{ + std::cout << __PRETTY_FUNCTION__ << std::endl; + setTransitions(); + + return 0; +} + + +int PCBNEW_CONTROL::TrackDisplayMode( TOOL_EVENT& aEvent ) +{ + std::cout << __PRETTY_FUNCTION__ << std::endl; + setTransitions(); + + return 0; +} + + +int PCBNEW_CONTROL::PadDisplayMode( TOOL_EVENT& aEvent ) +{ + wxCommandEvent dummy; + getEditFrame()->OnTogglePadDrawMode( dummy ); + setTransitions(); + + return 0; +} + + +int PCBNEW_CONTROL::ViaDisplayMode( TOOL_EVENT& aEvent ) +{ + std::cout << __PRETTY_FUNCTION__ << std::endl; + setTransitions(); + + return 0; +} + + +int PCBNEW_CONTROL::HighContrastMode( TOOL_EVENT& aEvent ) +{ + std::cout << __PRETTY_FUNCTION__ << std::endl; + setTransitions(); + + return 0; +} + + +int PCBNEW_CONTROL::HighContrastInc( TOOL_EVENT& aEvent ) +{ + std::cout << __PRETTY_FUNCTION__ << std::endl; + setTransitions(); + + return 0; +} + + +int PCBNEW_CONTROL::HighContrastDec( TOOL_EVENT& aEvent ) +{ + std::cout << __PRETTY_FUNCTION__ << std::endl; + setTransitions(); + + return 0; +} + + +// Layer control +int PCBNEW_CONTROL::LayerTop( TOOL_EVENT& aEvent ) +{ + getEditFrame()->SwitchLayer( NULL, LAYER_N_FRONT ); + getEditFrame()->GetGalCanvas()->SetFocus(); + setTransitions(); + + return 0; +} + + +int PCBNEW_CONTROL::LayerInner1( TOOL_EVENT& aEvent ) +{ + getEditFrame()->SwitchLayer( NULL, LAYER_N_2 ); + getEditFrame()->GetGalCanvas()->SetFocus(); + setTransitions(); + + return 0; +} + + +int PCBNEW_CONTROL::LayerInner2( TOOL_EVENT& aEvent ) +{ + getEditFrame()->SwitchLayer( NULL, LAYER_N_3 ); + getEditFrame()->GetGalCanvas()->SetFocus(); + setTransitions(); + + return 0; +} + + +int PCBNEW_CONTROL::LayerInner3( TOOL_EVENT& aEvent ) +{ + getEditFrame()->SwitchLayer( NULL, LAYER_N_4 ); + getEditFrame()->GetGalCanvas()->SetFocus(); + setTransitions(); + + return 0; +} + + +int PCBNEW_CONTROL::LayerInner4( TOOL_EVENT& aEvent ) +{ + getEditFrame()->SwitchLayer( NULL, LAYER_N_5 ); + getEditFrame()->GetGalCanvas()->SetFocus(); + setTransitions(); + + return 0; +} + + +int PCBNEW_CONTROL::LayerInner5( TOOL_EVENT& aEvent ) +{ + getEditFrame()->SwitchLayer( NULL, LAYER_N_6 ); + getEditFrame()->GetGalCanvas()->SetFocus(); + setTransitions(); + + return 0; +} + + +int PCBNEW_CONTROL::LayerInner6( TOOL_EVENT& aEvent ) +{ + getEditFrame()->SwitchLayer( NULL, LAYER_N_7 ); + getEditFrame()->GetGalCanvas()->SetFocus(); + setTransitions(); + + return 0; +} + + +int PCBNEW_CONTROL::LayerBottom( TOOL_EVENT& aEvent ) +{ + getEditFrame()->SetActiveLayer( LAYER_N_BACK, true ); + getEditFrame()->GetGalCanvas()->SetFocus(); + setTransitions(); + + return 0; +} + + +int PCBNEW_CONTROL::LayerNext( TOOL_EVENT& aEvent ) +{ + PCB_EDIT_FRAME* editFrame = getEditFrame(); + LAYER_NUM layer = editFrame->GetActiveLayer(); + layer = ( layer + 1 ) % ( LAST_COPPER_LAYER + 1 ); + assert( IsCopperLayer( layer ) ); + + editFrame->SwitchLayer( NULL, layer ); + editFrame->GetGalCanvas()->SetFocus(); + setTransitions(); + + return 0; +} + + +int PCBNEW_CONTROL::LayerPrev( TOOL_EVENT& aEvent ) +{ + PCB_EDIT_FRAME* editFrame = getEditFrame(); + LAYER_NUM layer = editFrame->GetActiveLayer(); + + if( --layer < 0 ) + layer = LAST_COPPER_LAYER; + + assert( IsCopperLayer( layer ) ); + editFrame->SwitchLayer( NULL, layer ); + editFrame->GetGalCanvas()->SetFocus(); + setTransitions(); + + return 0; +} + + +int PCBNEW_CONTROL::LayerAlphaInc( TOOL_EVENT& aEvent ) +{ + std::cout << __PRETTY_FUNCTION__ << std::endl; + setTransitions(); + + return 0; +} + + +int PCBNEW_CONTROL::LayerAlphaDec( TOOL_EVENT& aEvent ) +{ + std::cout << __PRETTY_FUNCTION__ << std::endl; + setTransitions(); + + return 0; +} + + +// Grid control +int PCBNEW_CONTROL::GridFast1( TOOL_EVENT& aEvent ) +{ + getEditFrame()->SetFastGrid1(); + setTransitions(); + + return 0; +} + + +int PCBNEW_CONTROL::GridFast2( TOOL_EVENT& aEvent ) +{ + getEditFrame()->SetFastGrid2(); + setTransitions(); + + return 0; +} + + +int PCBNEW_CONTROL::GridNext( TOOL_EVENT& aEvent ) +{ + getEditFrame()->SetNextGrid(); + setTransitions(); + + return 0; +} + + +int PCBNEW_CONTROL::GridPrev( TOOL_EVENT& aEvent ) +{ + getEditFrame()->SetPrevGrid(); + setTransitions(); + + return 0; +} + + +// Track & via size control +int PCBNEW_CONTROL::TrackWidthInc( TOOL_EVENT& aEvent ) +{ + BOARD* board = getModel( PCB_T ); + int widthIndex = board->GetTrackWidthIndex() + 1; + + if( widthIndex >= (int) board->m_TrackWidthList.size() ) + widthIndex = board->m_TrackWidthList.size() - 1; + + board->SetTrackWidthIndex( widthIndex ); + + wxUpdateUIEvent dummy; + getEditFrame()->OnUpdateSelectTrackWidth( dummy ); + setTransitions(); + + return 0; +} + + +int PCBNEW_CONTROL::TrackWidthDec( TOOL_EVENT& aEvent ) +{ + BOARD* board = getModel( PCB_T ); + int widthIndex = board->GetTrackWidthIndex() - 1; + + if( widthIndex < 0 ) + widthIndex = 0; + + board->SetTrackWidthIndex( widthIndex ); + + wxUpdateUIEvent dummy; + getEditFrame()->OnUpdateSelectTrackWidth( dummy ); + setTransitions(); + + return 0; +} + + +int PCBNEW_CONTROL::ViaSizeInc( TOOL_EVENT& aEvent ) +{ + BOARD* board = getModel( PCB_T ); + int sizeIndex = board->GetViaSizeIndex() + 1; + + if( sizeIndex >= (int) board->m_ViasDimensionsList.size() ) + sizeIndex = board->m_ViasDimensionsList.size() - 1; + + board->SetViaSizeIndex( sizeIndex ); + + wxUpdateUIEvent dummy; + getEditFrame()->OnUpdateSelectViaSize( dummy ); + setTransitions(); + + return 0; +} + + +int PCBNEW_CONTROL::ViaSizeDec( TOOL_EVENT& aEvent ) +{ + BOARD* board = getModel( PCB_T ); + int sizeIndex = board->GetViaSizeIndex() - 1; + + if( sizeIndex < 0 ) + sizeIndex = 0; + + board->SetViaSizeIndex( sizeIndex ); + + wxUpdateUIEvent dummy; + getEditFrame()->OnUpdateSelectViaSize( dummy ); + setTransitions(); + + return 0; +} + + +// Miscellaneous +int PCBNEW_CONTROL::ResetCoords( TOOL_EVENT& aEvent ) +{ + std::cout << __PRETTY_FUNCTION__ << std::endl; + setTransitions(); + + return 0; +} + + +int PCBNEW_CONTROL::SwitchUnits( TOOL_EVENT& aEvent ) +{ + std::cout << __PRETTY_FUNCTION__ << std::endl; + setTransitions(); + + return 0; +} + + +int PCBNEW_CONTROL::ShowHelp( TOOL_EVENT& aEvent ) +{ + std::cout << __PRETTY_FUNCTION__ << std::endl; + setTransitions(); + + return 0; +} + + +void PCBNEW_CONTROL::setTransitions() +{ + // View controls + Go( &PCBNEW_CONTROL::ZoomIn, COMMON_ACTIONS::zoomIn.MakeEvent() ); + Go( &PCBNEW_CONTROL::ZoomOut, COMMON_ACTIONS::zoomOut.MakeEvent() ); + Go( &PCBNEW_CONTROL::ZoomCenter, COMMON_ACTIONS::zoomCenter.MakeEvent() ); + Go( &PCBNEW_CONTROL::ZoomFitScreen, COMMON_ACTIONS::zoomFitScreen.MakeEvent() ); + + // Display modes + Go( &PCBNEW_CONTROL::TrackDisplayMode, COMMON_ACTIONS::trackDisplayMode.MakeEvent() ); + Go( &PCBNEW_CONTROL::PadDisplayMode, COMMON_ACTIONS::padDisplayMode.MakeEvent() ); + Go( &PCBNEW_CONTROL::ViaDisplayMode, COMMON_ACTIONS::viaDisplayMode.MakeEvent() ); + Go( &PCBNEW_CONTROL::HighContrastMode, COMMON_ACTIONS::highContrastMode.MakeEvent() ); + Go( &PCBNEW_CONTROL::HighContrastInc, COMMON_ACTIONS::highContrastInc.MakeEvent() ); + Go( &PCBNEW_CONTROL::HighContrastDec, COMMON_ACTIONS::highContrastDec.MakeEvent() ); + + // Layer control + Go( &PCBNEW_CONTROL::LayerTop, COMMON_ACTIONS::layerTop.MakeEvent() ); + Go( &PCBNEW_CONTROL::LayerInner1, COMMON_ACTIONS::layerInner1.MakeEvent() ); + Go( &PCBNEW_CONTROL::LayerInner2, COMMON_ACTIONS::layerInner2.MakeEvent() ); + Go( &PCBNEW_CONTROL::LayerInner3, COMMON_ACTIONS::layerInner3.MakeEvent() ); + Go( &PCBNEW_CONTROL::LayerInner4, COMMON_ACTIONS::layerInner4.MakeEvent() ); + Go( &PCBNEW_CONTROL::LayerInner5, COMMON_ACTIONS::layerInner5.MakeEvent() ); + Go( &PCBNEW_CONTROL::LayerInner6, COMMON_ACTIONS::layerInner6.MakeEvent() ); + Go( &PCBNEW_CONTROL::LayerBottom, COMMON_ACTIONS::layerBottom.MakeEvent() ); + Go( &PCBNEW_CONTROL::LayerNext, COMMON_ACTIONS::layerNext.MakeEvent() ); + Go( &PCBNEW_CONTROL::LayerPrev, COMMON_ACTIONS::layerPrev.MakeEvent() ); + Go( &PCBNEW_CONTROL::LayerAlphaInc, COMMON_ACTIONS::layerAlphaInc.MakeEvent() ); + Go( &PCBNEW_CONTROL::LayerAlphaDec , COMMON_ACTIONS::layerAlphaDec.MakeEvent() ); + + // Grid control + Go( &PCBNEW_CONTROL::GridFast1, COMMON_ACTIONS::gridFast1.MakeEvent() ); + Go( &PCBNEW_CONTROL::GridFast2, COMMON_ACTIONS::gridFast2.MakeEvent() ); + Go( &PCBNEW_CONTROL::GridNext, COMMON_ACTIONS::gridNext.MakeEvent() ); + Go( &PCBNEW_CONTROL::GridPrev, COMMON_ACTIONS::gridPrev.MakeEvent() ); + + // Track & via size control + Go( &PCBNEW_CONTROL::TrackWidthInc, COMMON_ACTIONS::trackWidthInc.MakeEvent() ); + Go( &PCBNEW_CONTROL::TrackWidthDec, COMMON_ACTIONS::trackWidthDec.MakeEvent() ); + Go( &PCBNEW_CONTROL::ViaSizeInc, COMMON_ACTIONS::viaSizeInc.MakeEvent() ); + Go( &PCBNEW_CONTROL::ViaSizeDec, COMMON_ACTIONS::viaSizeDec.MakeEvent() ); + + // Miscellaneous + Go( &PCBNEW_CONTROL::ResetCoords, COMMON_ACTIONS::resetCoords.MakeEvent() ); + Go( &PCBNEW_CONTROL::SwitchUnits, COMMON_ACTIONS::switchUnits.MakeEvent() ); + Go( &PCBNEW_CONTROL::ShowHelp, COMMON_ACTIONS::showHelp.MakeEvent() ); +} diff --git a/pcbnew/tools/pcbnew_control.h b/pcbnew/tools/pcbnew_control.h new file mode 100644 index 0000000000..41861cd3c0 --- /dev/null +++ b/pcbnew/tools/pcbnew_control.h @@ -0,0 +1,97 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 CERN + * @author Maciej Suminski + * + * 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 PCBNEW_CONTROL_H +#define PCBNEW_CONTROL_H + +#include + +/** + * Class PCBNEW_CONTROL + * + * TODO + */ + +class PCBNEW_CONTROL : public TOOL_INTERACTIVE +{ +public: + PCBNEW_CONTROL(); + + /// @copydoc TOOL_INTERACTIVE::Reset() + void Reset( RESET_REASON aReason ) {}; + + /// @copydoc TOOL_INTERACTIVE::Init() + bool Init(); + + // View controls + int ZoomIn( TOOL_EVENT& aEvent ); + int ZoomOut( TOOL_EVENT& aEvent ); + int ZoomCenter( TOOL_EVENT& aEvent ); + int ZoomFitScreen( TOOL_EVENT& aEvent ); + + // Display modes + int TrackDisplayMode( TOOL_EVENT& aEvent ); + int PadDisplayMode( TOOL_EVENT& aEvent ); + int ViaDisplayMode( TOOL_EVENT& aEvent ); + int HighContrastMode( TOOL_EVENT& aEvent ); + int HighContrastInc( TOOL_EVENT& aEvent ); + int HighContrastDec( TOOL_EVENT& aEvent ); + + // Layer control + int LayerTop( TOOL_EVENT& aEvent ); + int LayerInner1( TOOL_EVENT& aEvent ); + int LayerInner2( TOOL_EVENT& aEvent ); + int LayerInner3( TOOL_EVENT& aEvent ); + int LayerInner4( TOOL_EVENT& aEvent ); + int LayerInner5( TOOL_EVENT& aEvent ); + int LayerInner6( TOOL_EVENT& aEvent ); + int LayerBottom( TOOL_EVENT& aEvent ); + int LayerNext( TOOL_EVENT& aEvent ); + int LayerPrev( TOOL_EVENT& aEvent ); + int LayerAlphaInc( TOOL_EVENT& aEvent ); + int LayerAlphaDec( TOOL_EVENT& aEvent ); + + // Grid control + int GridFast1( TOOL_EVENT& aEvent ); + int GridFast2( TOOL_EVENT& aEvent ); + int GridNext( TOOL_EVENT& aEvent ); + int GridPrev( TOOL_EVENT& aEvent ); + + // Track & via size control + int TrackWidthInc( TOOL_EVENT& aEvent ); + int TrackWidthDec( TOOL_EVENT& aEvent ); + int ViaSizeInc( TOOL_EVENT& aEvent ); + int ViaSizeDec( TOOL_EVENT& aEvent ); + + // Miscellaneous + int ResetCoords( TOOL_EVENT& aEvent ); + int SwitchUnits( TOOL_EVENT& aEvent ); + int ShowHelp( TOOL_EVENT& aEvent ); + +private: + ///> Sets up handlers for various events. + void setTransitions(); +}; + +#endif From 60e9546b627ad5d5f0b0ead3c4cdf5d728bd8856 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 24 Mar 2014 17:20:23 +0100 Subject: [PATCH 226/741] PCB_EDIT_FRAME::SetHighContrastLayer() went public. Refactored code that handled zooming events. Added PCB_RENDER_SETTINGS::Get/SetSketchMode(). PCBNEW_CONTROL reacts to hot keys changing display modes (sketch via/tracks, high contrast). --- common/tool/tool_dispatcher.cpp | 34 +++++-- common/zoom.cpp | 27 +++-- include/tool/tool_dispatcher.h | 2 +- include/wxPcbStruct.h | 14 +-- include/wxstruct.h | 12 +++ pcbnew/dialogs/dialog_general_options.cpp | 2 +- pcbnew/hotkeys_board_editor.cpp | 4 +- pcbnew/initpcb.cpp | 2 +- pcbnew/menubar_pcbframe.cpp | 4 +- pcbnew/pcb_painter.cpp | 21 ++-- pcbnew/pcb_painter.h | 30 +++++- pcbnew/pcbframe.cpp | 4 +- pcbnew/tools/common_actions.cpp | 9 ++ pcbnew/tools/common_actions.h | 2 + pcbnew/tools/pcb_tools.cpp | 15 ++- pcbnew/tools/pcbnew_control.cpp | 115 +++++++++++++++++++--- pcbnew/tools/pcbnew_control.h | 13 ++- 17 files changed, 242 insertions(+), 68 deletions(-) diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index 1085534eec..8f36386766 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -27,16 +27,16 @@ #include #include +#include #include #include #include +#include #include #include -using boost::optional; - ///> Stores information about a mouse button state struct TOOL_DISPATCHER::BUTTON_STATE { @@ -126,7 +126,7 @@ bool TOOL_DISPATCHER::handleMouseButton( wxEvent& aEvent, int aIndex, bool aMoti { BUTTON_STATE* st = m_buttons[aIndex]; wxEventType type = aEvent.GetEventType(); - optional evt; + boost::optional evt; bool isClick = false; bool up = type == st->upEvent; @@ -205,7 +205,7 @@ bool TOOL_DISPATCHER::handleMouseButton( wxEvent& aEvent, int aIndex, bool aMoti void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) { bool motion = false, buttonEvents = false; - optional evt; + boost::optional evt; int type = aEvent.GetEventType(); @@ -270,7 +270,29 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) } -void TOOL_DISPATCHER::DispatchWxCommand( const wxCommandEvent& aEvent ) +void TOOL_DISPATCHER::DispatchWxCommand( wxCommandEvent& aEvent ) { - // no events to dispatch currently + boost::optional evt; + + switch( aEvent.GetId() ) + { + case ID_ZOOM_IN: // toolbar button "Zoom In" + evt = COMMON_ACTIONS::zoomInCenter.MakeEvent(); + break; + + case ID_ZOOM_OUT: // toolbar button "Zoom In" + evt = COMMON_ACTIONS::zoomOutCenter.MakeEvent(); + break; + + case ID_ZOOM_PAGE: // toolbar button "Fit on Screen" + evt = COMMON_ACTIONS::zoomFitScreen.MakeEvent(); + break; + + default: + aEvent.Skip(); + break; + } + + if( evt ) + m_toolMgr->ProcessEvent( *evt ); } diff --git a/common/zoom.cpp b/common/zoom.cpp index 859d5a4872..b85cc0cc2a 100644 --- a/common/zoom.cpp +++ b/common/zoom.cpp @@ -194,25 +194,22 @@ void EDA_DRAW_FRAME::OnZoom( wxCommandEvent& event ) RedrawScreen( center, true ); } - if( IsGalCanvasActive() ) - { - // Apply computed view settings to GAL - KIGFX::VIEW* view = GetGalCanvas()->GetView(); - KIGFX::GAL* gal = GetGalCanvas()->GetGAL(); - - double zoomFactor = gal->GetWorldScale() / gal->GetZoomFactor(); - double zoom = 1.0 / ( zoomFactor * GetZoom() ); - - VECTOR2D cursorWorld( GetCrossHairPosition() ); - view->SetScale( zoom, cursorWorld ); - - GetGalCanvas()->Refresh(); - } - UpdateStatusBar(); } +void EDA_DRAW_FRAME::SetNextZoom() +{ + GetScreen()->SetNextZoom(); +} + + +void EDA_DRAW_FRAME::SetPrevZoom() +{ + GetScreen()->SetPreviousZoom(); +} + + /* add the zoom list menu the the MasterMenu. * used in OnRightClick(wxMouseEvent& event) */ diff --git a/include/tool/tool_dispatcher.h b/include/tool/tool_dispatcher.h index 3a9be1ac64..8ecd893db1 100644 --- a/include/tool/tool_dispatcher.h +++ b/include/tool/tool_dispatcher.h @@ -79,7 +79,7 @@ public: * specified tool). * @param aEvent is the wxCommandEvent to be processed. */ - virtual void DispatchWxCommand( const wxCommandEvent& aEvent ); + virtual void DispatchWxCommand( wxCommandEvent& aEvent ); private: ///> Number of mouse buttons that is handled in events. diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index 03038aece4..022a591930 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -134,12 +134,6 @@ protected: void createPopUpBlockMenu( wxMenu* menu ); void createPopUpMenuForMarkers( MARKER_PCB* aMarker, wxMenu* aPopMenu ); - /** - * Function setHighContrastLayer - * takes care of display settings for the given layer to be displayed in high contrast mode. - */ - void setHighContrastLayer( LAYER_NUM aLayer ); - /** * Function syncLayerWidgetLayer * updates the currently layer "selection" within the PCB_LAYER_WIDGET. @@ -555,6 +549,12 @@ public: */ virtual void OnModify(); + /** + * Function SetHighContrastLayer + * takes care of display settings for the given layer to be displayed in high contrast mode. + */ + void SetHighContrastLayer( LAYER_NUM aLayer ); + /** * Function SetTopLayer * moves the selected layer to the top, so it is displayed above all others. @@ -572,7 +572,7 @@ public: * Function GetActiveLayer * returns the active layer */ - LAYER_NUM GetActiveLayer() + LAYER_NUM GetActiveLayer() const { return ( (PCB_SCREEN*) GetScreen() )->m_Active_Layer; } diff --git a/include/wxstruct.h b/include/wxstruct.h index 5564fe6050..1047a04302 100644 --- a/include/wxstruct.h +++ b/include/wxstruct.h @@ -796,6 +796,18 @@ public: virtual void OnZoom( wxCommandEvent& event ); + /** + * Function SetNextZoom() + * changes the zoom to the next one available. + */ + void SetNextZoom(); + + /** + * Function SetPrevZoom() + * changes the zoom to the previous one available. + */ + void SetPrevZoom(); + /** * Function RedrawScreen * redraws the entire screen area by updating the scroll bars and mouse pointer in diff --git a/pcbnew/dialogs/dialog_general_options.cpp b/pcbnew/dialogs/dialog_general_options.cpp index fd7b1aa847..af29d9796a 100644 --- a/pcbnew/dialogs/dialog_general_options.cpp +++ b/pcbnew/dialogs/dialog_general_options.cpp @@ -228,7 +228,7 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) // Apply new display options to the GAL canvas (this is faster than recaching) settings->LoadDisplayOptions( DisplayOpt ); - setHighContrastLayer( GetActiveLayer() ); + SetHighContrastLayer( GetActiveLayer() ); m_canvas->Refresh(); break; diff --git a/pcbnew/hotkeys_board_editor.cpp b/pcbnew/hotkeys_board_editor.cpp index 42ab76ac75..a1dae36662 100644 --- a/pcbnew/hotkeys_board_editor.cpp +++ b/pcbnew/hotkeys_board_editor.cpp @@ -152,7 +152,6 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit cmd.SetEventObject( this ); LAYER_NUM ll; - unsigned int cnt; switch( hk_id ) { @@ -355,8 +354,7 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit break; case HK_SWITCH_TRACK_DISPLAY_MODE: - DisplayOpt.DisplayPcbTrackFill ^= 1; - DisplayOpt.DisplayPcbTrackFill &= 1; + DisplayOpt.DisplayPcbTrackFill = !DisplayOpt.DisplayPcbTrackFill; m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill; m_canvas->Refresh(); break; diff --git a/pcbnew/initpcb.cpp b/pcbnew/initpcb.cpp index 8b3b398995..0cb84ac8fb 100644 --- a/pcbnew/initpcb.cpp +++ b/pcbnew/initpcb.cpp @@ -74,7 +74,7 @@ bool PCB_EDIT_FRAME::Clear_Pcb( bool aQuery ) GetBoard()->SetVisibleLayers( ALL_LAYERS ); // Set currently selected layer to be shown in high contrast mode, when enabled` - setHighContrastLayer( GetScreen()->m_Active_Layer ); + SetHighContrastLayer( GetScreen()->m_Active_Layer ); ReFillLayerWidget(); diff --git a/pcbnew/menubar_pcbframe.cpp b/pcbnew/menubar_pcbframe.cpp index f75bd16aaf..780d876ee6 100644 --- a/pcbnew/menubar_pcbframe.cpp +++ b/pcbnew/menubar_pcbframe.cpp @@ -328,12 +328,12 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() */ // Zoom In text = AddHotkeyName( _( "Zoom &In" ), g_Pcbnew_Editor_Hokeys_Descr, - HK_ZOOM_IN ); + HK_ZOOM_IN, IS_ACCELERATOR ); AddMenuItem( viewMenu, ID_ZOOM_IN, text, HELP_ZOOM_IN, KiBitmap( zoom_in_xpm ) ); // Zoom Out text = AddHotkeyName( _( "Zoom &Out" ), g_Pcbnew_Editor_Hokeys_Descr, - HK_ZOOM_OUT ); + HK_ZOOM_OUT, IS_ACCELERATOR ); AddMenuItem( viewMenu, ID_ZOOM_OUT, text, HELP_ZOOM_OUT, KiBitmap( zoom_out_xpm ) ); // Fit on Screen diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 6aa9e54929..e47e2b3686 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -46,7 +46,7 @@ PCB_RENDER_SETTINGS::PCB_RENDER_SETTINGS() // By default everything should be displayed as filled for( unsigned int i = 0; i < END_PCB_VISIBLE_LIST; ++i ) { - m_sketchModeSelect[i] = false; + m_sketchMode[i] = false; } update(); @@ -94,9 +94,9 @@ void PCB_RENDER_SETTINGS::LoadDisplayOptions( const DISPLAY_OPTIONS& aOptions ) m_padNumbers = aOptions.DisplayPadNum; // Whether to draw tracks, vias & pads filled or as outlines - m_sketchModeSelect[PADS_VISIBLE] = !aOptions.DisplayPadFill; - m_sketchModeSelect[VIA_THROUGH_VISIBLE] = !aOptions.DisplayViaFill; - m_sketchModeSelect[TRACKS_VISIBLE] = !aOptions.DisplayPcbTrackFill; + m_sketchMode[PADS_VISIBLE] = !aOptions.DisplayPadFill; + m_sketchMode[VIA_THROUGH_VISIBLE] = !aOptions.DisplayViaFill; + m_sketchMode[TRACKS_VISIBLE] = !aOptions.DisplayPcbTrackFill; switch( aOptions.DisplayNetNamesMode ) { @@ -248,6 +248,7 @@ bool PCB_PAINTER::Draw( const VIEW_ITEM* aItem, int aLayer ) case PCB_MARKER_T: draw( (MARKER_PCB*) aItem ); + break; default: // Painter does not know how to draw the object @@ -308,7 +309,7 @@ void PCB_PAINTER::draw( const TRACK* aTrack, int aLayer ) m_gal->SetStrokeColor( color ); m_gal->SetIsStroke( true ); - if( m_pcbSettings->m_sketchModeSelect[TRACKS_VISIBLE] ) + if( m_pcbSettings->m_sketchMode[TRACKS_VISIBLE] ) { // Outline mode m_gal->SetLineWidth( m_pcbSettings->m_outlineWidth ); @@ -344,7 +345,7 @@ void PCB_PAINTER::draw( const SEGVIA* aVia, int aLayer ) const COLOR4D& color = m_pcbSettings->GetColor( aVia, aLayer ); - if( m_pcbSettings->m_sketchModeSelect[VIA_THROUGH_VISIBLE] ) + if( m_pcbSettings->m_sketchMode[VIA_THROUGH_VISIBLE] ) { // Outline mode m_gal->SetIsFill( false ); @@ -475,7 +476,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) // Pad drawing const COLOR4D& color = m_pcbSettings->GetColor( aPad, aLayer ); - if( m_pcbSettings->m_sketchModeSelect[PADS_VISIBLE] ) + if( m_pcbSettings->m_sketchMode[PADS_VISIBLE] ) { // Outline mode m_gal->SetIsFill( false ); @@ -538,7 +539,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) m = ( size.y - size.x ); n = size.x; - if( m_pcbSettings->m_sketchModeSelect[PADS_VISIBLE] ) + if( m_pcbSettings->m_sketchMode[PADS_VISIBLE] ) { // Outline mode m_gal->DrawArc( VECTOR2D( 0, -m ), n, -M_PI, 0 ); @@ -559,7 +560,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) m = ( size.x - size.y ); n = size.y; - if( m_pcbSettings->m_sketchModeSelect[PADS_VISIBLE] ) + if( m_pcbSettings->m_sketchMode[PADS_VISIBLE] ) { // Outline mode m_gal->DrawArc( VECTOR2D( -m, 0 ), n, M_PI / 2, 3 * M_PI / 2 ); @@ -595,7 +596,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) pointList.push_back( VECTOR2D( corners[2] ) ); pointList.push_back( VECTOR2D( corners[3] ) ); - if( m_pcbSettings->m_sketchModeSelect[PADS_VISIBLE] ) + if( m_pcbSettings->m_sketchMode[PADS_VISIBLE] ) { // Add the beginning point to close the outline pointList.push_back( pointList.front() ); diff --git a/pcbnew/pcb_painter.h b/pcbnew/pcb_painter.h index efa9cc061b..820c4077a5 100644 --- a/pcbnew/pcb_painter.h +++ b/pcbnew/pcb_painter.h @@ -99,6 +99,34 @@ public: */ const COLOR4D& GetLayerColor( int aLayer ) const; + /** + * Function SetSketchMode + * Turns on/off sketch mode for given item layer. + * @param aItemLayer is the item layer that is changed. + * @param aEnabled decides if it is drawn in sketch mode (true for sketched mode, + * false for filled mode). + */ + void SetSketchMode( int aItemLayer, bool aEnabled ) + { + // It is supposed to work only with item layers + assert( aItemLayer >= ITEM_GAL_LAYER( 0 ) ); + + m_sketchMode[aItemLayer] = aEnabled; + } + + /** + * Function GetSketchMode + * Returns sketch mode setting for a given item layer. + * @param aItemLayer is the item layer that is changed. + */ + bool GetSketchMode( int aItemLayer ) const + { + // It is supposed to work only with item layers + assert( aItemLayer >= ITEM_GAL_LAYER( 0 ) ); + + return m_sketchMode[aItemLayer]; + } + protected: ///> @copydoc RENDER_SETTINGS::Update() void update(); @@ -116,7 +144,7 @@ protected: COLOR4D m_layerColorsDark[TOTAL_LAYER_COUNT]; ///> Flag determining if items on a given layer should be drawn as an outline or a filled item - bool m_sketchModeSelect[TOTAL_LAYER_COUNT]; + bool m_sketchMode[TOTAL_LAYER_COUNT]; ///> Flag determining if pad numbers should be visible bool m_padNumbers; diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 8c39655d8b..b168e54300 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -860,7 +860,7 @@ bool PCB_EDIT_FRAME::IsMicroViaAcceptable( void ) } -void PCB_EDIT_FRAME::setHighContrastLayer( LAYER_NUM aLayer ) +void PCB_EDIT_FRAME::SetHighContrastLayer( LAYER_NUM aLayer ) { // Set display settings for high contrast mode KIGFX::VIEW* view = GetGalCanvas()->GetView(); @@ -950,7 +950,7 @@ void PCB_EDIT_FRAME::SetActiveLayer( LAYER_NUM aLayer, bool doLayerWidgetUpdate { ( (PCB_SCREEN*) GetScreen() )->m_Active_Layer = aLayer; - setHighContrastLayer( aLayer ); + SetHighContrastLayer( aLayer ); if( doLayerWidgetUpdate ) syncLayerWidgetLayer(); diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index f409cc610d..11e527d552 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -112,6 +112,14 @@ TOOL_ACTION COMMON_ACTIONS::zoomOut( "pcbnew.zoomOut", AS_GLOBAL, WXK_F2, "", "" ); +TOOL_ACTION COMMON_ACTIONS::zoomInCenter( "pcbnew.zoomInCenter", + AS_GLOBAL, 0, + "", "" ); + +TOOL_ACTION COMMON_ACTIONS::zoomOutCenter( "pcbnew.zoomOutCenter", + AS_GLOBAL, 0, + "", "" ); + TOOL_ACTION COMMON_ACTIONS::zoomCenter( "pcbnew.zoomCenter", AS_GLOBAL, WXK_F4, "", "" ); @@ -120,6 +128,7 @@ TOOL_ACTION COMMON_ACTIONS::zoomFitScreen( "pcbnew.zoomFitScreen", AS_GLOBAL, WXK_HOME, "", "" ); + // Display modes TOOL_ACTION COMMON_ACTIONS::trackDisplayMode( "pcbnew.trackDisplayMode", AS_GLOBAL, 'K', diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index c97fa154cf..097400b9c7 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -98,6 +98,8 @@ public: // View controls static TOOL_ACTION zoomIn; static TOOL_ACTION zoomOut; + static TOOL_ACTION zoomInCenter; + static TOOL_ACTION zoomOutCenter; static TOOL_ACTION zoomCenter; static TOOL_ACTION zoomFitScreen; diff --git a/pcbnew/tools/pcb_tools.cpp b/pcbnew/tools/pcb_tools.cpp index 45a46a9cdd..4d618615dc 100644 --- a/pcbnew/tools/pcb_tools.cpp +++ b/pcbnew/tools/pcb_tools.cpp @@ -49,6 +49,16 @@ void PCB_EDIT_FRAME::setupTools() m_toolDispatcher = new TOOL_DISPATCHER( &m_toolManager, this ); GetGalCanvas()->SetEventDispatcher( m_toolDispatcher ); + // Connect handlers to toolbar buttons +#if wxCHECK_VERSION( 3, 0, 0 ) + Connect( wxEVT_TOOL, wxCommandEventHandler( PCB_EDIT_FRAME::onGenericCommand ), NULL, this ); +#else + Connect( wxEVT_COMMAND_MENU_SELECTED, + wxCommandEventHandler( PCB_EDIT_FRAME::onGenericCommand ), NULL, this ); + Connect( wxEVT_COMMAND_TOOL_CLICKED, + wxCommandEventHandler( PCB_EDIT_FRAME::onGenericCommand ), NULL, this ); +#endif + // Register tools m_toolManager.RegisterTool( new SELECTION_TOOL ); m_toolManager.RegisterTool( new ROUTER_TOOL ); @@ -75,5 +85,8 @@ void PCB_EDIT_FRAME::destroyTools() void PCB_EDIT_FRAME::onGenericCommand( wxCommandEvent& aEvent ) { - m_toolDispatcher->DispatchWxCommand( aEvent ); + if( IsGalCanvasActive() ) + m_toolDispatcher->DispatchWxCommand( aEvent ); + else + aEvent.Skip(); } diff --git a/pcbnew/tools/pcbnew_control.cpp b/pcbnew/tools/pcbnew_control.cpp index c3ffab9c9c..92e29f2ee7 100644 --- a/pcbnew/tools/pcbnew_control.cpp +++ b/pcbnew/tools/pcbnew_control.cpp @@ -28,12 +28,14 @@ #include #include #include +#include #include #include -#include +#include -using namespace KIGFX; -using boost::optional; +#include +#include +#include PCBNEW_CONTROL::PCBNEW_CONTROL() : TOOL_INTERACTIVE( "pcbnew.Settings" ) @@ -41,6 +43,12 @@ PCBNEW_CONTROL::PCBNEW_CONTROL() : } +void PCBNEW_CONTROL::Reset( RESET_REASON aReason ) +{ + m_frame = getEditFrame(); +} + + bool PCBNEW_CONTROL::Init() { setTransitions(); @@ -49,18 +57,40 @@ bool PCBNEW_CONTROL::Init() } -int PCBNEW_CONTROL::ZoomIn( TOOL_EVENT& aEvent ) +int PCBNEW_CONTROL::ZoomInOut( TOOL_EVENT& aEvent ) { - std::cout << __PRETTY_FUNCTION__ << std::endl; + KIGFX::VIEW* view = m_frame->GetGalCanvas()->GetView(); + KIGFX::GAL* gal = m_frame->GetGalCanvas()->GetGAL(); + + if( aEvent.IsAction( &COMMON_ACTIONS::zoomIn ) ) + m_frame->SetPrevZoom(); + else if( aEvent.IsAction( &COMMON_ACTIONS::zoomOut ) ) + m_frame->SetNextZoom(); + + double zoomFactor = gal->GetWorldScale() / gal->GetZoomFactor(); + double zoom = 1.0 / ( zoomFactor * m_frame->GetZoom() ); + + view->SetScale( zoom, getViewControls()->GetCursorPosition() ); setTransitions(); return 0; } -int PCBNEW_CONTROL::ZoomOut( TOOL_EVENT& aEvent ) +int PCBNEW_CONTROL::ZoomInOutCenter( TOOL_EVENT& aEvent ) { - std::cout << __PRETTY_FUNCTION__ << std::endl; + KIGFX::VIEW* view = m_frame->GetGalCanvas()->GetView(); + KIGFX::GAL* gal = m_frame->GetGalCanvas()->GetGAL(); + + if( aEvent.IsAction( &COMMON_ACTIONS::zoomInCenter ) ) + m_frame->SetPrevZoom(); + else if( aEvent.IsAction( &COMMON_ACTIONS::zoomOutCenter ) ) + m_frame->SetNextZoom(); + + double zoomFactor = gal->GetWorldScale() / gal->GetZoomFactor(); + double zoom = 1.0 / ( zoomFactor * m_frame->GetZoom() ); + + view->SetScale( zoom ); setTransitions(); return 0; @@ -69,7 +99,8 @@ int PCBNEW_CONTROL::ZoomOut( TOOL_EVENT& aEvent ) int PCBNEW_CONTROL::ZoomCenter( TOOL_EVENT& aEvent ) { - std::cout << __PRETTY_FUNCTION__ << std::endl; + KIGFX::VIEW* view = m_frame->GetGalCanvas()->GetView(); + view->SetCenter( getViewControls()->GetCursorPosition() ); setTransitions(); return 0; @@ -78,7 +109,24 @@ int PCBNEW_CONTROL::ZoomCenter( TOOL_EVENT& aEvent ) int PCBNEW_CONTROL::ZoomFitScreen( TOOL_EVENT& aEvent ) { - std::cout << __PRETTY_FUNCTION__ << std::endl; + KIGFX::VIEW* view = m_frame->GetGalCanvas()->GetView(); + KIGFX::GAL* gal = m_frame->GetGalCanvas()->GetGAL(); + BOX2I boardBBox = getModel( PCB_T )->ViewBBox(); + VECTOR2I screenSize = gal->GetScreenPixelSize(); + + double iuPerX = screenSize.x ? boardBBox.GetWidth() / screenSize.x : 1.0; + double iuPerY = screenSize.y ? boardBBox.GetHeight() / screenSize.y : 1.0; + + double bestZoom = std::max( iuPerX, iuPerY ); + // This is needed to avoid "jumpy" zooms if first hot key was used and then mouse scroll + // (or other way round). + m_frame->GetScreen()->SetZoom( bestZoom ); + + double zoomFactor = gal->GetWorldScale() / gal->GetZoomFactor(); + double zoom = 1.0 / ( zoomFactor * bestZoom ); + + view->SetScale( zoom ); + view->SetCenter( boardBBox.Centre() ); setTransitions(); return 0; @@ -87,7 +135,20 @@ int PCBNEW_CONTROL::ZoomFitScreen( TOOL_EVENT& aEvent ) int PCBNEW_CONTROL::TrackDisplayMode( TOOL_EVENT& aEvent ) { - std::cout << __PRETTY_FUNCTION__ << std::endl; + KIGFX::PCB_PAINTER* painter = + static_cast( m_frame->GetGalCanvas()->GetView()->GetPainter() ); + KIGFX::PCB_RENDER_SETTINGS* settings = + static_cast ( painter->GetSettings() ); + + // Apply new display options to the GAL canvas + DisplayOpt.DisplayPcbTrackFill = !DisplayOpt.DisplayPcbTrackFill; + m_frame->m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill; + settings->LoadDisplayOptions( DisplayOpt ); + + BOARD* board = getModel( PCB_T ); + for( TRACK* track = board->m_Track; track; track = track->Next() ) + track->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + setTransitions(); return 0; @@ -106,7 +167,23 @@ int PCBNEW_CONTROL::PadDisplayMode( TOOL_EVENT& aEvent ) int PCBNEW_CONTROL::ViaDisplayMode( TOOL_EVENT& aEvent ) { - std::cout << __PRETTY_FUNCTION__ << std::endl; + KIGFX::PCB_PAINTER* painter = + static_cast( m_frame->GetGalCanvas()->GetView()->GetPainter() ); + KIGFX::PCB_RENDER_SETTINGS* settings = + static_cast ( painter->GetSettings() ); + + // Apply new display options to the GAL canvas + DisplayOpt.DisplayViaFill = !DisplayOpt.DisplayViaFill; + m_frame->m_DisplayViaFill = DisplayOpt.DisplayViaFill; + settings->LoadDisplayOptions( DisplayOpt ); + + BOARD* board = getModel( PCB_T ); + for( TRACK* track = board->m_Track; track; track = track->Next() ) + { + if( track->Type() == PCB_VIA_T ) + track->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + setTransitions(); return 0; @@ -115,7 +192,15 @@ int PCBNEW_CONTROL::ViaDisplayMode( TOOL_EVENT& aEvent ) int PCBNEW_CONTROL::HighContrastMode( TOOL_EVENT& aEvent ) { - std::cout << __PRETTY_FUNCTION__ << std::endl; + KIGFX::PCB_PAINTER* painter = + static_cast( m_frame->GetGalCanvas()->GetView()->GetPainter() ); + KIGFX::PCB_RENDER_SETTINGS* settings = + static_cast ( painter->GetSettings() ); + + DisplayOpt.ContrastModeDisplay = !DisplayOpt.ContrastModeDisplay; + settings->LoadDisplayOptions( DisplayOpt ); + m_frame->SetHighContrastLayer( m_frame->GetActiveLayer() ); + setTransitions(); return 0; @@ -412,8 +497,10 @@ int PCBNEW_CONTROL::ShowHelp( TOOL_EVENT& aEvent ) void PCBNEW_CONTROL::setTransitions() { // View controls - Go( &PCBNEW_CONTROL::ZoomIn, COMMON_ACTIONS::zoomIn.MakeEvent() ); - Go( &PCBNEW_CONTROL::ZoomOut, COMMON_ACTIONS::zoomOut.MakeEvent() ); + Go( &PCBNEW_CONTROL::ZoomInOut, COMMON_ACTIONS::zoomIn.MakeEvent() ); + Go( &PCBNEW_CONTROL::ZoomInOut, COMMON_ACTIONS::zoomOut.MakeEvent() ); + Go( &PCBNEW_CONTROL::ZoomInOutCenter, COMMON_ACTIONS::zoomInCenter.MakeEvent() ); + Go( &PCBNEW_CONTROL::ZoomInOutCenter, COMMON_ACTIONS::zoomOutCenter.MakeEvent() ); Go( &PCBNEW_CONTROL::ZoomCenter, COMMON_ACTIONS::zoomCenter.MakeEvent() ); Go( &PCBNEW_CONTROL::ZoomFitScreen, COMMON_ACTIONS::zoomFitScreen.MakeEvent() ); diff --git a/pcbnew/tools/pcbnew_control.h b/pcbnew/tools/pcbnew_control.h index 41861cd3c0..8acc0fba8c 100644 --- a/pcbnew/tools/pcbnew_control.h +++ b/pcbnew/tools/pcbnew_control.h @@ -27,10 +27,12 @@ #include +class PCB_EDIT_FRAME; + /** * Class PCBNEW_CONTROL * - * TODO + * Handles hot keys that are not accepted by any other tool. */ class PCBNEW_CONTROL : public TOOL_INTERACTIVE @@ -39,14 +41,14 @@ public: PCBNEW_CONTROL(); /// @copydoc TOOL_INTERACTIVE::Reset() - void Reset( RESET_REASON aReason ) {}; + void Reset( RESET_REASON aReason ); /// @copydoc TOOL_INTERACTIVE::Init() bool Init(); // View controls - int ZoomIn( TOOL_EVENT& aEvent ); - int ZoomOut( TOOL_EVENT& aEvent ); + int ZoomInOut( TOOL_EVENT& aEvent ); + int ZoomInOutCenter( TOOL_EVENT& aEvent ); int ZoomCenter( TOOL_EVENT& aEvent ); int ZoomFitScreen( TOOL_EVENT& aEvent ); @@ -92,6 +94,9 @@ public: private: ///> Sets up handlers for various events. void setTransitions(); + + ///> Pointerto the currently used edit frame. + PCB_EDIT_FRAME* m_frame; }; #endif From 39bca76df7bcf0d723a219714257988b6b06bd2f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 24 Mar 2014 18:28:21 +0100 Subject: [PATCH 227/741] >Added handled hotkeys: - resetting relative coordinates - switching units - not official: changing transparency for layers (works only for main layers, does not work on vias/pads/etc.) --- common/view/view.cpp | 2 ++ pcbnew/pcb_painter.cpp | 32 ++++++++------------ pcbnew/pcb_painter.h | 18 ++++++++++- pcbnew/tools/common_actions.cpp | 4 +-- pcbnew/tools/pcbnew_control.cpp | 53 +++++++++++++++++++++++++++++---- 5 files changed, 80 insertions(+), 29 deletions(-) diff --git a/common/view/view.cpp b/common/view/view.cpp index 5cfe071d9f..08de942811 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -400,6 +400,7 @@ void VIEW::UpdateLayerColor( int aLayer ) updateItemsColor visitor( aLayer, m_painter, m_gal ); m_layers[aLayer].items->Query( r, visitor ); + MarkTargetDirty( m_layers[aLayer].target ); } @@ -459,6 +460,7 @@ void VIEW::ChangeLayerDepth( int aLayer, int aDepth ) changeItemsDepth visitor( aLayer, aDepth, m_gal ); m_layers[aLayer].items->Query( r, visitor ); + MarkTargetDirty( m_layers[aLayer].target ); } diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index e47e2b3686..33f44f2dd9 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -66,16 +66,16 @@ void PCB_RENDER_SETTINGS::ImportLegacyColors( COLORS_DESIGN_SETTINGS* aSettings } // Default colors for specific layers - m_layerColors[ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE )] = COLOR4D( 0.5, 0.4, 0.0, 1.0 ); - m_layerColors[ITEM_GAL_LAYER( PADS_HOLES_VISIBLE )] = COLOR4D( 0.0, 0.5, 0.5, 1.0 ); - m_layerColors[ITEM_GAL_LAYER( VIA_THROUGH_VISIBLE )] = COLOR4D( 0.7, 0.7, 0.7, 1.0 ); - m_layerColors[ITEM_GAL_LAYER( PADS_VISIBLE )] = COLOR4D( 0.7, 0.7, 0.7, 1.0 ); - m_layerColors[NETNAMES_GAL_LAYER( PADS_NETNAMES_VISIBLE )] = COLOR4D( 0.8, 0.8, 0.8, 0.7 ); - m_layerColors[NETNAMES_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE )] = COLOR4D( 0.8, 0.8, 0.8, 0.7 ); - m_layerColors[NETNAMES_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE )] = COLOR4D( 0.8, 0.8, 0.8, 0.7 ); - m_layerColors[ITEM_GAL_LAYER( RATSNEST_VISIBLE )] = COLOR4D( 0.4, 0.4, 0.4, 0.7 ); - m_layerColors[ITEM_GAL_LAYER( WORKSHEET )] = COLOR4D( 0.5, 0.0, 0.0, 1.0 ); - m_layerColors[ITEM_GAL_LAYER( DRC_VISIBLE )] = COLOR4D( 1.0, 0.0, 0.0, 1.0 ); + m_layerColors[ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE )] = COLOR4D( 0.5, 0.4, 0.0, 0.8 ); + m_layerColors[ITEM_GAL_LAYER( PADS_HOLES_VISIBLE )] = COLOR4D( 0.0, 0.5, 0.5, 0.8 ); + m_layerColors[ITEM_GAL_LAYER( VIA_THROUGH_VISIBLE )] = COLOR4D( 0.7, 0.7, 0.7, 0.8 ); + m_layerColors[ITEM_GAL_LAYER( PADS_VISIBLE )] = COLOR4D( 0.7, 0.7, 0.7, 0.8 ); + m_layerColors[NETNAMES_GAL_LAYER( PADS_NETNAMES_VISIBLE )] = COLOR4D( 0.8, 0.8, 0.8, 0.8 ); + m_layerColors[NETNAMES_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE )] = COLOR4D( 0.8, 0.8, 0.8, 0.8 ); + m_layerColors[NETNAMES_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE )] = COLOR4D( 0.8, 0.8, 0.8, 0.8 ); + m_layerColors[ITEM_GAL_LAYER( RATSNEST_VISIBLE )] = COLOR4D( 0.4, 0.4, 0.4, 0.8 ); + m_layerColors[ITEM_GAL_LAYER( WORKSHEET )] = COLOR4D( 0.5, 0.0, 0.0, 0.8 ); + m_layerColors[ITEM_GAL_LAYER( DRC_VISIBLE )] = COLOR4D( 1.0, 0.0, 0.0, 0.8 ); // Netnames for copper layers for( LAYER_NUM layer = FIRST_COPPER_LAYER; layer <= LAST_COPPER_LAYER; ++layer ) @@ -175,23 +175,15 @@ const COLOR4D& PCB_RENDER_SETTINGS::GetColor( const VIEW_ITEM* aItem, int aLayer void PCB_RENDER_SETTINGS::update() { + RENDER_SETTINGS::update(); + // Calculate darkened/highlighted variants of layer colors for( int i = 0; i < TOTAL_LAYER_COUNT; i++ ) { - m_layerColors[i].a = m_layerOpacity; m_layerColorsHi[i] = m_layerColors[i].Brightened( m_highlightFactor ); m_layerColorsDark[i] = m_layerColors[i].Darkened( 1.0 - m_highlightFactor ); m_layerColorsSel[i] = m_layerColors[i].Brightened( m_selectFactor ); } - - m_hiContrastColor = COLOR4D( m_hiContrastFactor, m_hiContrastFactor, m_hiContrastFactor, - m_layerOpacity ); -} - - -const COLOR4D& PCB_RENDER_SETTINGS::GetLayerColor( int aLayer ) const -{ - return m_layerColors[aLayer]; } diff --git a/pcbnew/pcb_painter.h b/pcbnew/pcb_painter.h index 820c4077a5..cdcedb1db7 100644 --- a/pcbnew/pcb_painter.h +++ b/pcbnew/pcb_painter.h @@ -97,7 +97,23 @@ public: * Returns the color used to draw a layer. * @param aLayer is the layer number. */ - const COLOR4D& GetLayerColor( int aLayer ) const; + const COLOR4D& GetLayerColor( int aLayer ) const + { + return m_layerColors[aLayer]; + } + + /** + * Function SetLayerColor + * Changes the color used to draw a layer. + * @param aLayer is the layer number. + * @param aColor is the new color. + */ + void SetLayerColor( int aLayer, const COLOR4D& aColor ) + { + m_layerColors[aLayer] = aColor; + + update(); // recompute other shades of the color + } /** * Function SetSketchMode diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 11e527d552..0e998de43a 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -197,11 +197,11 @@ TOOL_ACTION COMMON_ACTIONS::layerPrev( "pcbnew.layerPrev", "", "" ); TOOL_ACTION COMMON_ACTIONS::layerAlphaInc( "pcbnew.layerAlphaInc", - AS_GLOBAL, MD_SHIFT + '[', // shift+[ == { + AS_GLOBAL, MD_SHIFT + ']', // shift+] == } "", "" ); TOOL_ACTION COMMON_ACTIONS::layerAlphaDec( "pcbnew.layerAlphaDec", - AS_GLOBAL, MD_SHIFT + ']', // shift+] == } + AS_GLOBAL, MD_SHIFT + '[', // shift+[ == { "", "" ); diff --git a/pcbnew/tools/pcbnew_control.cpp b/pcbnew/tools/pcbnew_control.cpp index 92e29f2ee7..0a04fc0f88 100644 --- a/pcbnew/tools/pcbnew_control.cpp +++ b/pcbnew/tools/pcbnew_control.cpp @@ -32,13 +32,14 @@ #include #include #include +#include #include #include #include PCBNEW_CONTROL::PCBNEW_CONTROL() : - TOOL_INTERACTIVE( "pcbnew.Settings" ) + TOOL_INTERACTIVE( "pcbnew.Control" ) { } @@ -340,7 +341,21 @@ int PCBNEW_CONTROL::LayerPrev( TOOL_EVENT& aEvent ) int PCBNEW_CONTROL::LayerAlphaInc( TOOL_EVENT& aEvent ) { - std::cout << __PRETTY_FUNCTION__ << std::endl; + KIGFX::PCB_PAINTER* painter = + static_cast( m_frame->GetGalCanvas()->GetView()->GetPainter() ); + KIGFX::PCB_RENDER_SETTINGS* settings = + static_cast ( painter->GetSettings() ); + + LAYER_NUM currentLayer = m_frame->GetActiveLayer(); + KIGFX::COLOR4D currentColor = settings->GetLayerColor( currentLayer ); + + if( currentColor.a <= 0.95 ) + { + currentColor.a += 0.05; + settings->SetLayerColor( currentLayer, currentColor ); + m_frame->GetGalCanvas()->GetView()->UpdateLayerColor( currentLayer ); + } + setTransitions(); return 0; @@ -349,7 +364,21 @@ int PCBNEW_CONTROL::LayerAlphaInc( TOOL_EVENT& aEvent ) int PCBNEW_CONTROL::LayerAlphaDec( TOOL_EVENT& aEvent ) { - std::cout << __PRETTY_FUNCTION__ << std::endl; + KIGFX::PCB_PAINTER* painter = + static_cast( m_frame->GetGalCanvas()->GetView()->GetPainter() ); + KIGFX::PCB_RENDER_SETTINGS* settings = + static_cast ( painter->GetSettings() ); + + LAYER_NUM currentLayer = m_frame->GetActiveLayer(); + KIGFX::COLOR4D currentColor = settings->GetLayerColor( currentLayer ); + + if( currentColor.a >= 0.05 ) + { + currentColor.a -= 0.05; + settings->SetLayerColor( currentLayer, currentColor ); + m_frame->GetGalCanvas()->GetView()->UpdateLayerColor( currentLayer ); + } + setTransitions(); return 0; @@ -469,7 +498,10 @@ int PCBNEW_CONTROL::ViaSizeDec( TOOL_EVENT& aEvent ) // Miscellaneous int PCBNEW_CONTROL::ResetCoords( TOOL_EVENT& aEvent ) { - std::cout << __PRETTY_FUNCTION__ << std::endl; + VECTOR2I cursorPos = getViewControls()->GetCursorPosition(); + + m_frame->GetScreen()->m_O_Curseur = wxPoint( cursorPos.x, cursorPos.y ); + m_frame->UpdateStatusBar(); setTransitions(); return 0; @@ -478,7 +510,15 @@ int PCBNEW_CONTROL::ResetCoords( TOOL_EVENT& aEvent ) int PCBNEW_CONTROL::SwitchUnits( TOOL_EVENT& aEvent ) { - std::cout << __PRETTY_FUNCTION__ << std::endl; + // TODO should not it be refactored to pcb_frame member function? + wxCommandEvent evt( wxEVT_COMMAND_MENU_SELECTED ); + + if( g_UserUnit == INCHES ) + evt.SetId( ID_TB_OPTIONS_SELECT_UNIT_MM ); + else + evt.SetId( ID_TB_OPTIONS_SELECT_UNIT_INCH ); + + m_frame->ProcessEvent( evt ); setTransitions(); return 0; @@ -487,7 +527,8 @@ int PCBNEW_CONTROL::SwitchUnits( TOOL_EVENT& aEvent ) int PCBNEW_CONTROL::ShowHelp( TOOL_EVENT& aEvent ) { - std::cout << __PRETTY_FUNCTION__ << std::endl; + // TODO + DisplayInfoMessage( m_frame, _( "Not implemented yet." ) ); setTransitions(); return 0; From 34c593916c6fcbaf43696def8bd52e9ccc573cce Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 27 Mar 2014 18:45:05 +0100 Subject: [PATCH 228/741] Pcbnew: Fix bug #1296649 (Text on flipped modules incorrectly placed). Dialog Freeroute: if freeroute.jar is find in kicad binaries, it is run as a standard java application, not as web applcation Very minor other fixes FPC_(SMD_type)_footprintwizard.py wizard finished. --- include/wxPcbStruct.h | 14 ++- pcbnew/class_module.cpp | 2 +- pcbnew/dialogs/dialog_freeroute_exchange.cpp | 95 ++++++++++++++++--- pcbnew/dialogs/dialog_freeroute_exchange.h | 3 +- pcbnew/scripting/pcbnew_footprint_wizards.cpp | 2 + .../plugins/FPC_(SMD_type)_footprintwizard.py | 79 +++++++++++++-- pcbnew/specctra_export.cpp | 9 +- scripting/wx_python_helpers.cpp | 6 ++ 8 files changed, 184 insertions(+), 26 deletions(-) diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index df6116ccfb..6498d7f0f3 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -972,12 +972,20 @@ public: /** * Function ExporttoSPECCTRA - * will export the current BOARD to a specctra dsn file. See - * See http://www.autotraxeda.com/docs/SPECCTRA/SPECCTRA.pdf for the - * specification. + * Ask for a filename and call ExportSpecctraFile to export the current BOARD + * to a specctra dsn file. */ void ExportToSpecctra( wxCommandEvent& event ); + /** + * Function ExportSpecctraFile + * will export the current BOARD to a specctra dsn file. + * See http://www.autotraxeda.com/docs/SPECCTRA/SPECCTRA.pdf for the + * specification. + * @return true if OK + */ + bool ExportSpecctraFile( const wxString& aFullFilename ); + /** * Function ImportSpecctraSession * will import a specctra *.ses file and use it to relocate MODULEs and diff --git a/pcbnew/class_module.cpp b/pcbnew/class_module.cpp index b8b4853b46..26527c095a 100644 --- a/pcbnew/class_module.cpp +++ b/pcbnew/class_module.cpp @@ -892,7 +892,7 @@ void MODULE::Flip( const wxPoint& aCentre ) case PCB_MODULE_TEXT_T: text = (TEXTE_MODULE*) item; text->m_Pos.y -= m_Pos.y; - NEGATE( text->m_Pos0.y ); + NEGATE( text->m_Pos.y ); text->m_Pos.y += m_Pos.y; NEGATE( text->m_Pos0.y ); NEGATE_AND_NORMALIZE_ANGLE_POS( text->m_Orient ); diff --git a/pcbnew/dialogs/dialog_freeroute_exchange.cpp b/pcbnew/dialogs/dialog_freeroute_exchange.cpp index 81608d3276..fa765b7dcd 100644 --- a/pcbnew/dialogs/dialog_freeroute_exchange.cpp +++ b/pcbnew/dialogs/dialog_freeroute_exchange.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include <../common/dialogs/dialog_display_info_HTML_base.h> @@ -76,6 +77,7 @@ void DIALOG_FREEROUTE::MyInit() { SetFocus(); m_FreeRouteSetupChanged = false; + m_freeRouterIsLocal = false; wxString msg; @@ -87,6 +89,14 @@ void DIALOG_FREEROUTE::MyInit() m_FreerouteURLName->SetValue( wxT( "http://www.freerouting.net/" ) ); else m_FreerouteURLName->SetValue( msg ); + + wxFileName fileName( FindKicadFile( wxT( "freeroute.jar" ) ), wxPATH_UNIX ); + + if( fileName.FileExists() ) + { + m_freeRouterIsLocal = true; + m_buttonLaunchFreeroute->SetLabel( _("Create .dsn File and Launch FreeRouter") ); + } } const char * s_FreeRouteHelpInfo = @@ -116,7 +126,7 @@ void DIALOG_FREEROUTE::OnImportButtonClick( wxCommandEvent& event ) { m_Parent->ImportSpecctraSession( event ); - /* Connectivity inf must be rebuild. + /* Connectivity must be rebuild. * because for large board it can take some time, this is made only on demand */ if( IsOK( this, _("Do you want to rebuild connectivity data ?" ) ) ) @@ -128,13 +138,23 @@ void DIALOG_FREEROUTE::OnImportButtonClick( wxCommandEvent& event ) */ void DIALOG_FREEROUTE::OnLaunchButtonClick( wxCommandEvent& event ) { + wxString javaCommand; + + if( m_freeRouterIsLocal ) + { + javaCommand = CmdRunFreeRouterLocal(); + + if( javaCommand.IsEmpty() ) // Something is wrong + return; + } + else + javaCommand = wxT( "javaws" ); + wxString url; - wxString command; wxFileName fileName( FindKicadFile( wxT( "freeroute.jnlp" ) ), wxPATH_UNIX ); - if( fileName.FileExists() ) + if( m_freeRouterIsLocal || fileName.FileExists() ) { - wxString javaWebStartCommand = wxT( "javaws" ); // Find the Java web start application on Windows. #ifdef __WINDOWS__ @@ -145,13 +165,20 @@ void DIALOG_FREEROUTE::OnLaunchButtonClick( wxCommandEvent& event ) // Windows and the build version of KiCad. // This key works for 32 bit Java on 32 bit Windows and 64 bit Java on 64 bit Windows. - wxRegKey key( wxRegKey::HKLM, wxT( "SOFTWARE\\JavaSoft\\Java Web Start" ), + wxString keyName = m_freeRouterIsLocal ? wxT( "SOFTWARE\\JavaSoft\\Java Runtime Environment" ) + : wxT( "SOFTWARE\\JavaSoft\\Java Web Start" ); + wxRegKey key( wxRegKey::HKLM, keyName, wxIsPlatform64Bit() ? wxRegKey::WOW64ViewMode_64 : wxRegKey::WOW64ViewMode_Default ); // It's possible that 32 bit Java is installed on 64 bit Windows. if( !key.Exists() && wxIsPlatform64Bit() ) - key.SetName( wxRegKey::HKLM, wxT( "SOFTWARE\\Wow6432Node\\JavaSoft\\Java Web Start" ) ); + { + keyName = m_freeRouterIsLocal ? + wxT( "SOFTWARE\\Wow6432Node\\JavaSoft\\Java Runtime Environment" ) + : wxT( "SOFTWARE\\Wow6432Node\\JavaSoft\\Java Web Start" ); + key.SetName( wxRegKey::HKLM, keyName ); + } if( !key.Exists() ) { @@ -168,17 +195,24 @@ void DIALOG_FREEROUTE::OnLaunchButtonClick( wxCommandEvent& event ) wxString value; key.QueryValue( wxT( "CurrentVersion" ), value ); key.SetName( key.GetName() + wxT( "\\" ) + value ); - key.QueryValue( wxT( "Home" ), value ); - javaWebStartCommand = value + wxFileName::GetPathSeparator() + javaWebStartCommand; + + key.QueryValue( m_freeRouterIsLocal ? wxT( "JavaHome" ) : wxT( "Home" ), value ); + wxString javaCommandPath = value + wxFileName::GetPathSeparator(); #else #warning Kicad needs wxWidgets >= 2.9.4. version 2.8 is only supported for testing purposes #endif // wxCHECK_VERSION( 2, 9, 0 ) #endif // __WINDOWS__ - // Wrap FullFileName in double quotes in case it has C:\Program Files in it. - // The space is interpreted as an argument separator. - command << javaWebStartCommand << wxChar( ' ' ) << wxChar( '"' ) - << fileName.GetFullPath() << wxChar( '"' ); + wxString command = javaCommandPath; + + if( m_freeRouterIsLocal ) + command << wxT("bin\\") << javaCommand; + else + // Wrap FullFileName in double quotes in case it has C:\Program Files in it. + // The space is interpreted as an argument separator. + command << javaCommand << wxChar( ' ' ) << wxChar( '"' ) + << fileName.GetFullPath() << wxChar( '"' ); + ProcessExecute( command ); return; } @@ -188,6 +222,43 @@ void DIALOG_FREEROUTE::OnLaunchButtonClick( wxCommandEvent& event ) wxLaunchDefaultBrowser( url ); } +wxString DIALOG_FREEROUTE::CmdRunFreeRouterLocal() +{ + wxString fullFileName = m_Parent->GetBoard()->GetFileName(); + wxString path; + wxString name; + wxString ext; + wxString dsn_ext = wxT( ".dsn" ); + wxString mask = wxT( "*" ) + dsn_ext; + + wxFileName::SplitPath( fullFileName, &path, &name, &ext ); + + name += dsn_ext; + + fullFileName = EDA_FileSelector( _( "Specctra DSN file:" ), + path, + name, // name.ext without path! + dsn_ext, + mask, + this, + wxFD_SAVE, + false + ); + + if( fullFileName == wxEmptyString ) + return fullFileName; + + if( ! m_Parent->ExportSpecctraFile( fullFileName ) ) // the file was not created + return fullFileName; + + wxFileName jarfileName( FindKicadFile( wxT( "freeroute.jar" ) ), wxPATH_UNIX ); + + wxString command = wxT("java -jar "); + command << wxChar( '"' ) << jarfileName.GetFullPath() << wxT( "\" -de " ); + command << wxChar( '"' ) << fullFileName << wxChar( '"' ); + + return command; +} /* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON */ diff --git a/pcbnew/dialogs/dialog_freeroute_exchange.h b/pcbnew/dialogs/dialog_freeroute_exchange.h index 0f1e6f97ff..e9646060f0 100644 --- a/pcbnew/dialogs/dialog_freeroute_exchange.h +++ b/pcbnew/dialogs/dialog_freeroute_exchange.h @@ -16,6 +16,7 @@ class DIALOG_FREEROUTE : public DIALOG_FREEROUTE_BASE private: PCB_EDIT_FRAME* m_Parent; bool m_FreeRouteSetupChanged; + bool m_freeRouterIsLocal; private: // Virtual event handlers @@ -28,7 +29,7 @@ private: void OnCancelButtonClick( wxCommandEvent& event ); void OnTextEditFrUrlUpdated( wxCommandEvent& event ); void MyInit ( ); - + wxString CmdRunFreeRouterLocal(); public: DIALOG_FREEROUTE( PCB_EDIT_FRAME* parent ); diff --git a/pcbnew/scripting/pcbnew_footprint_wizards.cpp b/pcbnew/scripting/pcbnew_footprint_wizards.cpp index 8b74d4ac70..70e2238d34 100644 --- a/pcbnew/scripting/pcbnew_footprint_wizards.cpp +++ b/pcbnew/scripting/pcbnew_footprint_wizards.cpp @@ -81,7 +81,9 @@ PyObject* PYTHON_FOOTPRINT_WIZARD::CallMethod( const char* aMethod, PyObject* aA } if( pFunc ) + { Py_XDECREF( pFunc ); + } return NULL; } diff --git a/pcbnew/scripting/plugins/FPC_(SMD_type)_footprintwizard.py b/pcbnew/scripting/plugins/FPC_(SMD_type)_footprintwizard.py index 0cace0dfb1..f751c47f38 100644 --- a/pcbnew/scripting/plugins/FPC_(SMD_type)_footprintwizard.py +++ b/pcbnew/scripting/plugins/FPC_(SMD_type)_footprintwizard.py @@ -104,10 +104,13 @@ class FPCFootprintWizard(FootprintWizardPlugin): module.Add(pad) + # Mechanical shield pads: left pad and right pad xpos = -shl_to_pad-offsetX - pad_s0 = self.smdRectPad(module, size_shld, wxPoint(xpos,shl_from_top), "0") + pad_s0_pos = wxPoint(xpos,shl_from_top) + pad_s0 = self.smdRectPad(module, size_shld, pad_s0_pos, "0") xpos = (pads-1)*pad_pitch+shl_to_pad-offsetX - pad_s1 = self.smdRectPad(module, size_shld, wxPoint(xpos,shl_from_top), "0") + pad_s1_pos = wxPoint(xpos,shl_from_top) + pad_s1 = self.smdRectPad(module, size_shld, pad_s1_pos, "0") module.Add(pad_s0) module.Add(pad_s1) @@ -115,21 +118,81 @@ class FPCFootprintWizard(FootprintWizardPlugin): #add outline outline = EDGE_MODULE(module) linewidth = FromMM(0.2) - posy = -pad_height/2 - linewidth/2 -FromMM(0.2) - outline.SetStartEnd(wxPoint(pad_pitch * pads - pad_pitch*0.5-offsetX, posy), - wxPoint( - pad_pitch*0.5-offsetX, posy)) outline.SetWidth(linewidth) + margin = FromMM(0.2) + + # upper line + posy = -pad_height/2 - linewidth/2 - margin + xstart = - pad_pitch*0.5-offsetX + xend = pad_pitch * pads + xstart; + outline.SetStartEnd( wxPoint(xstart, posy), wxPoint( xend, posy) ) outline.SetLayer(SILKSCREEN_N_FRONT) #default: not needed outline.SetShape(S_SEGMENT) module.Add(outline) + # lower line outline1 = EDGE_MODULE(module) outline1.Copy(outline) #copy all settings from outline - posy = pad_height/2 + linewidth/2 +FromMM(0.2) - outline1.SetStartEnd(wxPoint(pad_pitch * pads - pad_pitch*0.5-offsetX, posy), - wxPoint( - pad_pitch*0.5-offsetX, posy)) + posy = pad_height/2 + linewidth/2 + margin + outline1.SetStartEnd(wxPoint(xstart, posy), wxPoint( xend, posy)) module.Add(outline1) + # around left mechanical pad (the outline around right pad is mirrored/y axix) + outline2 = EDGE_MODULE(module) # vertical segment + outline2.Copy(outline) + yend = pad_s0_pos.y + shl_height/2 + margin + outline2.SetStartEnd(wxPoint(xstart, posy), wxPoint( xstart, yend)) + module.Add(outline2) + outline2_d = EDGE_MODULE(module) # right pad side + outline2_d.Copy(outline2) + outline2_d.SetStartEnd(wxPoint(-xstart, posy), wxPoint( -xstart, yend)) + module.Add(outline2_d) + + outline3 = EDGE_MODULE(module) # horizontal segment below the pad + outline3.Copy(outline) + posy = yend + xend = pad_s0_pos.x - (shl_width/2 + linewidth + margin*2) + outline3.SetStartEnd(wxPoint(xstart, posy), wxPoint( xend, posy)) + module.Add(outline3) + outline3_d = EDGE_MODULE(module) # right pad side + outline3_d.Copy(outline3) + outline3_d.SetStartEnd(wxPoint(-xstart, posy), wxPoint( -xend, yend)) + module.Add(outline3_d) + + outline4 = EDGE_MODULE(module) # vertical segment at left of the pad + outline4.Copy(outline) + xstart = xend + yend = posy - (shl_height + linewidth + margin*2) + outline4.SetStartEnd(wxPoint(xstart, posy), wxPoint( xend, yend)) + module.Add(outline4) + outline4_d = EDGE_MODULE(module) # right pad side + outline4_d.Copy(outline4) + outline4_d.SetStartEnd(wxPoint(-xstart, posy), wxPoint( -xend, yend)) + module.Add(outline4_d) + + outline5 = EDGE_MODULE(module) # horizontal segment above the pad + outline5.Copy(outline) + xstart = xend + xend = - pad_pitch*0.5-offsetX + posy = yend + outline5.SetStartEnd(wxPoint(xstart, posy), wxPoint( xend, yend)) + module.Add(outline5) + outline5_d = EDGE_MODULE(module) # right pad side + outline5_d.Copy(outline5) + outline5_d.SetStartEnd(wxPoint(-xstart, posy), wxPoint( -xend, yend)) + module.Add(outline5_d) + + outline6 = EDGE_MODULE(module) # vertical segment above the pad + outline6.Copy(outline) + xstart = xend + yend = -pad_height/2 - linewidth/2 - margin + outline6.SetStartEnd(wxPoint(xstart, posy), wxPoint( xend, yend)) + module.Add(outline6) + outline6_d = EDGE_MODULE(module) # right pad side + outline6_d.Copy(outline6) + outline6_d.SetStartEnd(wxPoint(-xstart, posy), wxPoint( -xend, yend)) + module.Add(outline6_d) + # create our footprint wizard fpc_wizard = FPCFootprintWizard() diff --git a/pcbnew/specctra_export.cpp b/pcbnew/specctra_export.cpp index e348c45c82..c9a85591d6 100644 --- a/pcbnew/specctra_export.cpp +++ b/pcbnew/specctra_export.cpp @@ -132,6 +132,11 @@ void PCB_EDIT_FRAME::ExportToSpecctra( wxCommandEvent& event ) if( fullFileName == wxEmptyString ) return; + ExportSpecctraFile( fullFileName ); +} + +bool PCB_EDIT_FRAME::ExportSpecctraFile( const wxString& aFullFilename ) +{ SPECCTRA_DB db; bool ok = true; wxString errorText; @@ -152,7 +157,7 @@ void PCB_EDIT_FRAME::ExportToSpecctra( wxCommandEvent& event ) { GetBoard()->SynchronizeNetsAndNetClasses(); db.FromBOARD( GetBoard() ); - db.ExportPCB( fullFileName, true ); + db.ExportPCB( aFullFilename, true ); // if an exception is thrown by FromBOARD or ExportPCB(), then // ~SPECCTRA_DB() will close the file. @@ -184,6 +189,8 @@ void PCB_EDIT_FRAME::ExportToSpecctra( wxCommandEvent& event ) errorText += _( "Unable to export, please fix and try again." ); DisplayError( this, errorText ); } + + return ok; } diff --git a/scripting/wx_python_helpers.cpp b/scripting/wx_python_helpers.cpp index a97314b355..8ee7bba28b 100644 --- a/scripting/wx_python_helpers.cpp +++ b/scripting/wx_python_helpers.cpp @@ -102,10 +102,14 @@ wxString* newWxStringFromPy( PyObject* src ) } if( must_unref_str ) + { Py_DECREF( uni_str ); + } if( must_unref_obj ) + { Py_DECREF( obj ); + } #else // normal string (or object) to normal python string @@ -136,7 +140,9 @@ wxString* newWxStringFromPy( PyObject* src ) result = new wxString( str_ptr, str_size ); if( must_unref_str ) + { Py_DECREF( str ); + } #endif From 04492587611d2e7480bf220218d9db63dffab3a2 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 27 Mar 2014 19:28:10 +0100 Subject: [PATCH 229/741] Fix (temporary fix) a bug I created in dialog_freeroute_exchange.cpp in bzr rev 4769 --- pcbnew/dialogs/dialog_freeroute_exchange.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pcbnew/dialogs/dialog_freeroute_exchange.cpp b/pcbnew/dialogs/dialog_freeroute_exchange.cpp index fa765b7dcd..e3835adfcf 100644 --- a/pcbnew/dialogs/dialog_freeroute_exchange.cpp +++ b/pcbnew/dialogs/dialog_freeroute_exchange.cpp @@ -139,6 +139,7 @@ void DIALOG_FREEROUTE::OnImportButtonClick( wxCommandEvent& event ) void DIALOG_FREEROUTE::OnLaunchButtonClick( wxCommandEvent& event ) { wxString javaCommand; + wxString command; if( m_freeRouterIsLocal ) { @@ -198,13 +199,12 @@ void DIALOG_FREEROUTE::OnLaunchButtonClick( wxCommandEvent& event ) key.QueryValue( m_freeRouterIsLocal ? wxT( "JavaHome" ) : wxT( "Home" ), value ); wxString javaCommandPath = value + wxFileName::GetPathSeparator(); + command = javaCommandPath; #else #warning Kicad needs wxWidgets >= 2.9.4. version 2.8 is only supported for testing purposes #endif // wxCHECK_VERSION( 2, 9, 0 ) #endif // __WINDOWS__ - wxString command = javaCommandPath; - if( m_freeRouterIsLocal ) command << wxT("bin\\") << javaCommand; else From 47b5bdcd4719789855e1f8c4384a5333da16d1a1 Mon Sep 17 00:00:00 2001 From: Jean-Samuel Reynaud Date: Fri, 28 Mar 2014 07:27:58 -0500 Subject: [PATCH 230/741] Fix a mismatch between method signature in scripting/python_scripting.cpp and scripting/python_scripting.h --- pcbnew/pcbnew.cpp | 2 -- scripting/python_scripting.cpp | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/pcbnew/pcbnew.cpp b/pcbnew/pcbnew.cpp index 32b1569589..a8eac6b21a 100644 --- a/pcbnew/pcbnew.cpp +++ b/pcbnew/pcbnew.cpp @@ -483,9 +483,7 @@ void IFACE::OnKifaceEnd() // wxPython will do its own cleanup as part of that process. // This should only be called if python was setup correctly. -/* bring this in, but without a linker error: pcbnewFinishPythonScripting(); -*/ #endif } diff --git a/scripting/python_scripting.cpp b/scripting/python_scripting.cpp index 31a725d8e8..494195cf3d 100644 --- a/scripting/python_scripting.cpp +++ b/scripting/python_scripting.cpp @@ -172,7 +172,7 @@ bool pcbnewInitPythonScripting( const char * aUserPluginsPath ) } -void pcbnewFinishPythonScripting( char ) +void pcbnewFinishPythonScripting() { #ifdef KICAD_SCRIPTING_WXPYTHON wxPyEndAllowThreads( g_PythonMainTState ); From 44e1f4fa2d70def8884e44c5392d39f3a1962c0b Mon Sep 17 00:00:00 2001 From: cdelbegu Date: Fri, 28 Mar 2014 14:06:30 +0100 Subject: [PATCH 231/741] Pcbnew - GAL: fix bug #1296811 (The grid can't be enable/disable via the layer manager) --- pcbnew/class_pcb_layer_widget.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pcbnew/class_pcb_layer_widget.cpp b/pcbnew/class_pcb_layer_widget.cpp index 82ab8237f7..12f28370a5 100644 --- a/pcbnew/class_pcb_layer_widget.cpp +++ b/pcbnew/class_pcb_layer_widget.cpp @@ -49,6 +49,8 @@ #include #include +#include + /// This is a read only template that is copied and modified before adding to LAYER_WIDGET const LAYER_WIDGET::ROW PCB_LAYER_WIDGET::s_render_rows[] = { @@ -420,8 +422,13 @@ void PCB_LAYER_WIDGET::OnRenderEnable( int aId, bool isEnabled ) EDA_DRAW_PANEL_GAL* galCanvas = myframe->GetGalCanvas(); if( galCanvas ) { - KIGFX::VIEW* view = galCanvas->GetView(); - view->SetLayerVisible( ITEM_GAL_LAYER( aId ), isEnabled ); + if( aId == GRID_VISIBLE ) + { + galCanvas->GetGAL()->SetGridVisibility( myframe->IsGridVisible() ); + galCanvas->GetView()->MarkTargetDirty( KIGFX::TARGET_NONCACHED ); + } + else + galCanvas->GetView()->SetLayerVisible( ITEM_GAL_LAYER( aId ), isEnabled ); } if( galCanvas && myframe->IsGalCanvasActive() ) From 36e62b1047df85364f369ebee88be7ec3bbc519d Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 28 Mar 2014 14:08:48 +0100 Subject: [PATCH 232/741] Eeschema: fix Bug #1298868 (Can't create new schematic from main toolbar icon) --- eeschema/files-io.cpp | 18 +++++++++++------- eeschema/schframe.cpp | 6 +++--- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/eeschema/files-io.cpp b/eeschema/files-io.cpp index f7c91d6570..54897bd5e5 100644 --- a/eeschema/files-io.cpp +++ b/eeschema/files-io.cpp @@ -368,20 +368,24 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector& aFileSet, in // Delete old caches. CMP_LIBRARY::RemoveCacheLibrary(); - libCacheExist = LoadCacheLibrary( g_RootSheet->GetScreen()->GetFileName() ); - - if( !wxFileExists( g_RootSheet->GetScreen()->GetFileName() ) && !libCacheExist ) + if( !wxFileExists( g_RootSheet->GetScreen()->GetFileName() ) ) { Zoom_Automatique( false ); - msg.Printf( _( "File '%s' not found." ), - GetChars( g_RootSheet->GetScreen()->GetFileName() ) ); - DisplayInfoMessage( this, msg ); -// return false; + + if( aCtl == 0 ) + { + msg.Printf( _( "File '%s' not found." ), + GetChars( g_RootSheet->GetScreen()->GetFileName() ) ); + DisplayInfoMessage( this, msg ); + return false; + } + return true; // do not close Eeschema if the file if not found: // we may have to create a new schematic file. } // load the project. + libCacheExist = LoadCacheLibrary( g_RootSheet->GetScreen()->GetFileName() ); g_RootSheet->SetScreen( NULL ); bool diag = g_RootSheet->Load( this ); SetScreen( m_CurrentSheet->LastScreen() ); diff --git a/eeschema/schframe.cpp b/eeschema/schframe.cpp index 1a1995f5a5..fa7cb5c5df 100644 --- a/eeschema/schframe.cpp +++ b/eeschema/schframe.cpp @@ -730,13 +730,13 @@ void SCH_EDIT_FRAME::OnLoadCmpToFootprintLinkFile( wxCommandEvent& event ) void SCH_EDIT_FRAME::OnNewProject( wxCommandEvent& event ) { - wxFileDialog dlg( this, _( "Open Schematic" ), wxGetCwd(), + wxFileDialog dlg( this, _( "New Schematic" ), wxGetCwd(), wxEmptyString, SchematicFileWildcard, - wxFD_OPEN | wxFD_FILE_MUST_EXIST ); + wxFD_SAVE ); if( dlg.ShowModal() != wxID_CANCEL ) { - OpenProjectFiles( std::vector( 1, dlg.GetPath() ) ); + OpenProjectFiles( std::vector( 1, dlg.GetPath() ), 1 ); } } From beb33c75229172174b685b5e4573ab0df177aece Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 28 Mar 2014 14:23:26 +0100 Subject: [PATCH 233/741] Eeschema: fix Bug #1298868 (Can't create new schematic from main toolbar icon) - Fix a bug I created in rev 4773 --- eeschema/files-io.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/eeschema/files-io.cpp b/eeschema/files-io.cpp index 54897bd5e5..a94761d038 100644 --- a/eeschema/files-io.cpp +++ b/eeschema/files-io.cpp @@ -377,7 +377,6 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector& aFileSet, in msg.Printf( _( "File '%s' not found." ), GetChars( g_RootSheet->GetScreen()->GetFileName() ) ); DisplayInfoMessage( this, msg ); - return false; } return true; // do not close Eeschema if the file if not found: From 6d0c5555ea5e38d8f0591513281486c87b170eec Mon Sep 17 00:00:00 2001 From: Lorenzo Marcantonio Date: Sat, 29 Mar 2014 12:22:20 +0100 Subject: [PATCH 234/741] Indentation was completely broken (editor tabbing issue, maybe?) --- pcbnew/exporters/export_d356.cpp | 80 ++++++++++++++++---------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/pcbnew/exporters/export_d356.cpp b/pcbnew/exporters/export_d356.cpp index b5d0b11d48..865986acc9 100644 --- a/pcbnew/exporters/export_d356.cpp +++ b/pcbnew/exporters/export_d356.cpp @@ -50,14 +50,14 @@ * Useful because 356A (when implemented) must be sorted before outputting it */ struct D356_RECORD { - bool smd; - bool hole; - wxString netname; - wxString refdes; - wxString pin; - bool midpoint; + bool smd; + bool hole; + wxString netname; + wxString refdes; + wxString pin; + bool midpoint; int drill; - bool mechanical; + bool mechanical; int access; // Access 0 is 'both sides' int soldermask; // All these in PCB units, will be output in decimils @@ -74,19 +74,19 @@ static int compute_pad_access_code( BOARD *aPcb, LAYER_MSK aLayerMask ) // Non-copper is not interesting here aLayerMask &= ALL_CU_LAYERS; if( aLayerMask == 0 ) - return -1; + return -1; // Traditional TH pad if( (aLayerMask & LAYER_FRONT) && (aLayerMask & LAYER_BACK) ) - return 0; + return 0; // Front SMD pad if( (aLayerMask & LAYER_FRONT) ) - return 1; + return 1; // Back SMD pad if( (aLayerMask & LAYER_BACK) ) - return aPcb->GetCopperLayerCount(); + return aPcb->GetCopperLayerCount(); // OK, we have an inner-layer only pad (and I have no idea about // what could be used for); anyway, find the first copper layer @@ -129,36 +129,36 @@ static void build_pad_testpoints( BOARD *aPcb, // It could be a mask only pad, we only handle pads with copper here if( rk.access != -1 ) { - rk.netname = pad->GetNetname(); - rk.refdes = module->GetReference(); - pad->StringPadName( rk.pin ); - rk.midpoint = false; // XXX MAYBE need to be computed (how?) - const wxSize& drill = pad->GetDrillSize(); - rk.drill = std::min( drill.x, drill.y ); - rk.hole = (rk.drill != 0); - rk.smd = pad->GetAttribute() == PAD_SMD; - rk.mechanical = (pad->GetAttribute() == PAD_HOLE_NOT_PLATED); - rk.x_location = pad->GetPosition().x - origin.x; - rk.y_location = origin.y - pad->GetPosition().y; - rk.x_size = pad->GetSize().x; + rk.netname = pad->GetNetname(); + rk.refdes = module->GetReference(); + pad->StringPadName( rk.pin ); + rk.midpoint = false; // XXX MAYBE need to be computed (how?) + const wxSize& drill = pad->GetDrillSize(); + rk.drill = std::min( drill.x, drill.y ); + rk.hole = (rk.drill != 0); + rk.smd = pad->GetAttribute() == PAD_SMD; + rk.mechanical = (pad->GetAttribute() == PAD_HOLE_NOT_PLATED); + rk.x_location = pad->GetPosition().x - origin.x; + rk.y_location = origin.y - pad->GetPosition().y; + rk.x_size = pad->GetSize().x; - // Rule: round pads have y = 0 - if( pad->GetShape() == PAD_CIRCLE ) - rk.y_size = 0; - else - rk.y_size = pad->GetSize().y; + // Rule: round pads have y = 0 + if( pad->GetShape() == PAD_CIRCLE ) + rk.y_size = 0; + else + rk.y_size = pad->GetSize().y; - rk.rotation = -KiROUND( pad->GetOrientation() ) / 10; - if( rk.rotation < 0 ) rk.rotation += 360; + rk.rotation = -KiROUND( pad->GetOrientation() ) / 10; + if( rk.rotation < 0 ) rk.rotation += 360; - // the value indicates which sides are *not* accessible - rk.soldermask = 3; - if( pad->GetLayerMask() & SOLDERMASK_LAYER_FRONT) - rk.soldermask &= ~1; - if( pad->GetLayerMask() & SOLDERMASK_LAYER_BACK) - rk.soldermask &= ~2; + // the value indicates which sides are *not* accessible + rk.soldermask = 3; + if( pad->GetLayerMask() & SOLDERMASK_LAYER_FRONT) + rk.soldermask &= ~1; + if( pad->GetLayerMask() & SOLDERMASK_LAYER_BACK) + rk.soldermask &= ~2; - aRecords.push_back( rk ); + aRecords.push_back( rk ); } } } @@ -172,15 +172,15 @@ static int via_access_code( BOARD *aPcb, int top_layer, int bottom_layer ) // Easy case for through vias: top_layer is component, bottom_layer is // solder, access code is 0 if( (top_layer == LAYER_N_FRONT) && (bottom_layer == LAYER_N_BACK) ) - return 0; + return 0; // Blind via, reachable from front if( top_layer == LAYER_N_FRONT ) - return 1; + return 1; // Blind via, reachable from bottom if( bottom_layer == LAYER_N_BACK ) - return aPcb->GetCopperLayerCount(); + return aPcb->GetCopperLayerCount(); // It's a buried via, accessible from some inner layer // (maybe could be used for testing before laminating? no idea) From 121494d3d95aef960bf2e0059d538225118e1446 Mon Sep 17 00:00:00 2001 From: Lorenzo Marcantonio Date: Sat, 29 Mar 2014 18:34:13 +0100 Subject: [PATCH 235/741] Removed relic empty if --- common/pgm_base.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/common/pgm_base.cpp b/common/pgm_base.cpp index 36f573f097..e0af909af6 100644 --- a/common/pgm_base.cpp +++ b/common/pgm_base.cpp @@ -406,12 +406,7 @@ bool PGM_BASE::initPgm() loadCommonSettings(); - - bool succes = SetLanguage( true ); - - if( !succes ) - { - } + SetLanguage( true ); // Set locale option for separator used in float numbers SetLocaleTo_Default(); From 4e18b14f14fa7fb5b8020b732fd621ecaee7c888 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 29 Mar 2014 21:00:14 +0100 Subject: [PATCH 236/741] Finishing dialog_freeroute_exchange.cpp changes to run freeroute.jar if found in kicad binaries. Very minor other fix --- eeschema/class_netlist_object.cpp | 6 +++--- pcbnew/dialogs/dialog_freeroute_exchange.cpp | 12 ++++++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/eeschema/class_netlist_object.cpp b/eeschema/class_netlist_object.cpp index 0b62b47dab..34c7333a47 100644 --- a/eeschema/class_netlist_object.cpp +++ b/eeschema/class_netlist_object.cpp @@ -259,7 +259,7 @@ void NETLIST_OBJECT::ConvertBusToNetListItems( NETLIST_OBJECT_LIST& aNetListItem i = busNumber.Find( '[' ); i++; - while( busNumber[i] != '.' && i < busNumber.Len() ) + while( i < busNumber.Len() && busNumber[i] != '.' ) { tmp.Append( busNumber[i] ); i++; @@ -267,12 +267,12 @@ void NETLIST_OBJECT::ConvertBusToNetListItems( NETLIST_OBJECT_LIST& aNetListItem tmp.ToLong( &begin ); - while( busNumber[i] == '.' && i < busNumber.Len() ) + while( i < busNumber.Len() && busNumber[i] == '.' ) i++; tmp.Empty(); - while( busNumber[i] != ']' && i < busNumber.Len() ) + while( i < busNumber.Len() && busNumber[i] != ']' ) { tmp.Append( busNumber[i] ); i++; diff --git a/pcbnew/dialogs/dialog_freeroute_exchange.cpp b/pcbnew/dialogs/dialog_freeroute_exchange.cpp index e3835adfcf..43755778d3 100644 --- a/pcbnew/dialogs/dialog_freeroute_exchange.cpp +++ b/pcbnew/dialogs/dialog_freeroute_exchange.cpp @@ -203,10 +203,14 @@ void DIALOG_FREEROUTE::OnLaunchButtonClick( wxCommandEvent& event ) #else #warning Kicad needs wxWidgets >= 2.9.4. version 2.8 is only supported for testing purposes #endif // wxCHECK_VERSION( 2, 9, 0 ) -#endif // __WINDOWS__ if( m_freeRouterIsLocal ) command << wxT("bin\\") << javaCommand; +#else // __WINDOWS__ + + if( m_freeRouterIsLocal ) + command << javaCommand; +#endif else // Wrap FullFileName in double quotes in case it has C:\Program Files in it. // The space is interpreted as an argument separator. @@ -254,7 +258,11 @@ wxString DIALOG_FREEROUTE::CmdRunFreeRouterLocal() wxFileName jarfileName( FindKicadFile( wxT( "freeroute.jar" ) ), wxPATH_UNIX ); wxString command = wxT("java -jar "); - command << wxChar( '"' ) << jarfileName.GetFullPath() << wxT( "\" -de " ); + // add "freeroute.jar" to command line: + command << wxChar( '"' ) << jarfileName.GetFullPath() << wxChar( '"' ); + // add option to load the .dsn file + command << wxT( " -de " ); + // add *.dsn full filename (quoted): command << wxChar( '"' ) << fullFileName << wxChar( '"' ); return command; From 4426d4c5391fdb83618933b2bac0547e2582ad6f Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 31 Mar 2014 20:14:01 +0200 Subject: [PATCH 237/741] Pcbnew: bug fix: sometimes (depending on a previous command) pcbnew could create an usual zone instead of a keepout zone when the" create keepout zone" tool is activated --- pcbnew/onrightclick.cpp | 6 +---- pcbnew/zones_by_polygon.cpp | 52 +++++++++++++++++++++---------------- 2 files changed, 30 insertions(+), 28 deletions(-) diff --git a/pcbnew/onrightclick.cpp b/pcbnew/onrightclick.cpp index 59e6f3ff65..75d704a889 100644 --- a/pcbnew/onrightclick.cpp +++ b/pcbnew/onrightclick.cpp @@ -137,11 +137,7 @@ bool PCB_EDIT_FRAME::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu ) } item = GetCurItem(); - - if( item ) - flags = item->GetFlags(); - else - flags = 0; + flags = item ? item->GetFlags() : 0; // Add the context menu, which depends on the picked item: if( item ) diff --git a/pcbnew/zones_by_polygon.cpp b/pcbnew/zones_by_polygon.cpp index b92ddb7bf0..44f669fce8 100644 --- a/pcbnew/zones_by_polygon.cpp +++ b/pcbnew/zones_by_polygon.cpp @@ -206,8 +206,14 @@ static void Abort_Zone_Create_Outline( EDA_DRAW_PANEL* Panel, wxDC* DC ) if( zone ) { zone->DrawWhileCreateOutline( Panel, DC, GR_XOR ); - zone->ClearFlags(); zone->RemoveAllContours(); + if( zone->IsNew() ) + { + delete zone; + pcbframe->GetBoard()->m_CurrentZoneContour = NULL; + } + else + zone->ClearFlags(); } pcbframe->SetCurItem( NULL ); @@ -512,21 +518,26 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC ) s_CurrentZone = NULL; } - // If no zone contour in progress, a new zone is being created: - if( !GetBoard()->m_CurrentZoneContour ) + ZONE_CONTAINER* zone = GetBoard()->m_CurrentZoneContour; + + // Verify if a new zone is allowed on this layer: + if( zone == NULL ) { - if( GetToolId() == ID_PCB_KEEPOUT_AREA_BUTT && - getActiveLayer() >= FIRST_NON_COPPER_LAYER ) + if( GetToolId() == ID_PCB_KEEPOUT_AREA_BUTT && !IsCopperLayer( getActiveLayer() ) ) { DisplayError( this, _( "Error: a keepout area is allowed only on copper layers" ) ); return 0; } - else - GetBoard()->m_CurrentZoneContour = new ZONE_CONTAINER( GetBoard() ); } - ZONE_CONTAINER* zone = GetBoard()->m_CurrentZoneContour; + // If no zone contour in progress, a new zone is being created, + if( zone == NULL ) + { + zone = GetBoard()->m_CurrentZoneContour = new ZONE_CONTAINER( GetBoard() ); + zone->SetFlags( IS_NEW ); + zone->SetTimeStamp( GetNewTimeStamp() ); + } if( zone->GetNumCorners() == 0 ) // Start a new contour: init zone params (net, layer ...) { @@ -546,30 +557,25 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC ) if( GetBoard()->GetHighLightNetCode() > 0 ) { zoneInfo.m_NetcodeSelection = GetBoard()->GetHighLightNetCode(); - zone->SetNetCode( zoneInfo.m_NetcodeSelection ); } + double tmp = ZONE_THERMAL_RELIEF_GAP_MIL; wxConfigBase* cfg = Kiface().KifaceSettings(); - cfg->Read( ZONE_THERMAL_RELIEF_GAP_STRING_KEY, &tmp ); - zoneInfo.m_ThermalReliefGap = KiROUND( tmp * IU_PER_MILS); tmp = ZONE_THERMAL_RELIEF_COPPER_WIDTH_MIL; - cfg->Read( ZONE_THERMAL_RELIEF_COPPER_WIDTH_STRING_KEY, - &tmp ); + cfg->Read( ZONE_THERMAL_RELIEF_COPPER_WIDTH_STRING_KEY, &tmp ); zoneInfo.m_ThermalReliefCopperBridge = KiROUND( tmp * IU_PER_MILS ); tmp = ZONE_CLEARANCE_MIL; - cfg->Read( ZONE_CLEARANCE_WIDTH_STRING_KEY, - &tmp ); + cfg->Read( ZONE_CLEARANCE_WIDTH_STRING_KEY, &tmp ); zoneInfo.m_ZoneClearance = KiROUND( tmp * IU_PER_MILS ); tmp = ZONE_THICKNESS_MIL; - cfg->Read( ZONE_MIN_THICKNESS_WIDTH_STRING_KEY, - &tmp ); + cfg->Read( ZONE_MIN_THICKNESS_WIDTH_STRING_KEY, &tmp ); zoneInfo.m_ZoneMinThickness = KiROUND( tmp * IU_PER_MILS ); zoneInfo.m_CurrentZone_Layer = zone->GetLayer(); @@ -599,11 +605,14 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC ) m_canvas->SetIgnoreMouseEvents( false ); if( edited == ZONE_ABORT ) + { + GetBoard()->m_CurrentZoneContour = NULL; + delete zone; return 0; + } // Switch active layer to the selected zone layer setActiveLayer( zoneInfo.m_CurrentZone_Layer ); - SetZoneSettings( zoneInfo ); } else @@ -620,8 +629,8 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC ) } // Show the Net for zones on copper layers - if( zoneInfo.m_CurrentZone_Layer < FIRST_NON_COPPER_LAYER && - ! zoneInfo.GetIsKeepout() ) + if( IsCopperLayer( zoneInfo.m_CurrentZone_Layer ) && + !zoneInfo.GetIsKeepout() ) { if( s_CurrentZone ) { @@ -645,9 +654,6 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC ) // if first segment if( zone->GetNumCorners() == 0 ) { - zone->SetFlags( IS_NEW ); - zone->SetTimeStamp( GetNewTimeStamp() ); - zoneInfo.ExportSetting( *zone ); zone->Outline()->Start( zoneInfo.m_CurrentZone_Layer, From 4eec9fd013facaab9357dd500f24aa188e179b6b Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Mon, 31 Mar 2014 22:38:19 -0400 Subject: [PATCH 238/741] Fix OpenMP link error on MinGW. --- CMakeLists.txt | 7 +++++++ cvpcb/CMakeLists.txt | 1 + pcbnew/CMakeLists.txt | 2 ++ 3 files changed, 10 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f2d3d8f19d..e719d5c601 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -157,10 +157,17 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) endif() find_package( OpenMP QUIET ) + if( OPENMP_FOUND ) set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}" ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}" ) add_definitions( -DUSE_OPENMP ) + + # MinGW does not include the OpenMP link library and FindOpenMP.cmake does not + # set it either. Not sure this is the most elegant solution but it works. + if( MINGW ) + set( OPENMP_LIBRARIES gomp ) + endif() endif() if( MINGW ) diff --git a/cvpcb/CMakeLists.txt b/cvpcb/CMakeLists.txt index aa04eb2f5c..47a5c3c111 100644 --- a/cvpcb/CMakeLists.txt +++ b/cvpcb/CMakeLists.txt @@ -116,6 +116,7 @@ if( USE_KIWAY_DLLS ) ${GLEW_LIBRARIES} ${CAIRO_LIBRARIES} ${PIXMAN_LIBRARY} + ${OPENMP_LIBRARIES} ) # Only for win32 cross compilation using MXE diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index ca49ce6f64..5c1583d711 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -536,6 +536,7 @@ if( USE_KIWAY_DLLS ) OUTPUT_NAME pcbnew PREFIX ${KIFACE_PREFIX} SUFFIX ${KIFACE_SUFFIX} + COMPILE_FLAGS ${OpenMP_CXX_FLAGS} ) target_link_libraries( pcbnew_kiface 3d-viewer @@ -557,6 +558,7 @@ if( USE_KIWAY_DLLS ) ${PIXMAN_LIBRARY} ${Boost_LIBRARIES} # must follow GITHUB ${PCBNEW_EXTRA_LIBS} # -lrt must follow Boost + ${OPENMP_LIBRARIES} ) set_source_files_properties( pcbnew.cpp PROPERTIES # The KIFACE is in pcbnew.cpp, export it: From 1fa49ce7f06190cd54c3a488dbdd57c3eeb423b7 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 1 Apr 2014 13:30:31 +0200 Subject: [PATCH 239/741] Fixed drifting for items dragged using EDIT_TOOL. --- pcbnew/tools/edit_tool.cpp | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 6965042775..3f912e42e5 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -81,13 +81,15 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) if( !makeSelection( selection ) ) return 0; - VECTOR2I dragPosition; // The last position of the cursor while dragging m_dragging = false; // Are selected items being dragged? bool restore = false; // Should items' state be restored when finishing the tool? // By default, modified items need to update their geometry m_updateFlag = KIGFX::VIEW_ITEM::GEOMETRY; + // Offset from the dragged item's center (anchor) + wxPoint offset; + VIEW_CONTROLS* controls = getViewControls(); PCB_EDIT_FRAME* editFrame = static_cast( m_toolMgr->GetEditFrame() ); controls->ShowCursor( true ); @@ -128,29 +130,34 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) else if( evt->IsMotion() || evt->IsDrag( BUT_LEFT ) ) { + VECTOR2I cursor( controls->GetCursorPosition() ); + if( m_dragging ) { + wxPoint movement = wxPoint( cursor.x, cursor.y ) - + static_cast( selection.items.GetPickedItem( 0 ) )->GetPosition(); + // Drag items to the current cursor position - VECTOR2I movement = ( controls->GetCursorPosition() - dragPosition ); for( unsigned int i = 0; i < selection.items.GetCount(); ++i ) { BOARD_ITEM* item = static_cast( selection.items.GetPickedItem( i ) ); - item->Move( wxPoint( movement.x, movement.y ) ); + item->Move( movement + offset ); } updateRatsnest( true ); } - else + else // Prepare to start dragging { - // Prepare to drag - save items, so changes can be undone + // Save items, so changes can be undone editFrame->OnModify(); editFrame->SaveCopyInUndoList( selection.items, UR_CHANGED ); + offset = static_cast( selection.items.GetPickedItem( 0 ) )->GetPosition() - + wxPoint( cursor.x, cursor.y ); m_dragging = true; } selection.group->ViewUpdate( VIEW_ITEM::GEOMETRY ); - dragPosition = controls->GetCursorPosition(); m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate ); } @@ -350,6 +357,7 @@ int EDIT_TOOL::Remove( TOOL_EVENT& aEvent ) // Save them for( unsigned int i = 0; i < selectedItems.GetCount(); ++i ) selectedItems.SetPickedItemStatus( UR_DELETED, i ); + editFrame->OnModify(); editFrame->SaveCopyInUndoList( selectedItems, UR_DELETED ); From a55d25803ef5911900769496e9aebaf1b81f75c2 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 1 Apr 2014 14:06:19 +0200 Subject: [PATCH 240/741] Activation of any drawing/placement tool clears current selection. --- pcbnew/tools/common_actions.cpp | 4 ++-- pcbnew/tools/common_actions.h | 2 +- pcbnew/tools/drawing_tool.cpp | 30 +++++++++++++++++++----------- pcbnew/tools/drawing_tool.h | 2 +- 4 files changed, 23 insertions(+), 15 deletions(-) diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 0e998de43a..63f4f91712 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -71,7 +71,7 @@ TOOL_ACTION COMMON_ACTIONS::drawArc( "pcbnew.InteractiveDrawing.arc", AS_GLOBAL, 0, "Draw an arc", "Draw an arc" ); -TOOL_ACTION COMMON_ACTIONS::drawText( "pcbnew.InteractiveDrawing.text", +TOOL_ACTION COMMON_ACTIONS::placeText( "pcbnew.InteractiveDrawing.text", AS_GLOBAL, 0, "Add a text", "Add a text" ); @@ -281,7 +281,7 @@ std::string COMMON_ACTIONS::TranslateLegacyId( int aId ) return COMMON_ACTIONS::drawArc.GetName(); case ID_PCB_ADD_TEXT_BUTT: - return COMMON_ACTIONS::drawText.GetName(); + return COMMON_ACTIONS::placeText.GetName(); case ID_PCB_DIMENSION_BUTT: return COMMON_ACTIONS::drawDimension.GetName(); diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index 097400b9c7..38569af29a 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -70,7 +70,7 @@ public: static TOOL_ACTION drawArc; /// Activation of the drawing tool (text) - static TOOL_ACTION drawText; + static TOOL_ACTION placeText; /// Activation of the drawing tool (dimension) static TOOL_ACTION drawDimension; diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index e35956f213..30283cca17 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -94,6 +94,7 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) KIGFX::VIEW_GROUP preview( m_view ); m_view->Add( &preview ); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); @@ -270,7 +271,7 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) } -int DRAWING_TOOL::DrawText( TOOL_EVENT& aEvent ) +int DRAWING_TOOL::PlaceText( TOOL_EVENT& aEvent ) { TEXTE_PCB* text = NULL; @@ -278,6 +279,7 @@ int DRAWING_TOOL::DrawText( TOOL_EVENT& aEvent ) KIGFX::VIEW_GROUP preview( m_view ); m_view->Add( &preview ); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); m_controls->SetAutoPan( true ); @@ -325,6 +327,7 @@ int DRAWING_TOOL::DrawText( TOOL_EVENT& aEvent ) { // Init the new item attributes text = m_frame->CreateTextePcb( NULL ); + if( text == NULL ) continue; @@ -381,6 +384,7 @@ int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent ) KIGFX::VIEW_GROUP preview( m_view ); m_view->Add( &preview ); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); @@ -571,6 +575,7 @@ int DRAWING_TOOL::PlaceTarget( TOOL_EVENT& aEvent ) m_view->Add( &preview ); preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); m_controls->SetSnapping( true ); m_controls->SetAutoPan( true ); @@ -644,6 +649,7 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent ) KIGFX::VIEW_GROUP preview( m_view ); m_view->Add( &preview ); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); m_controls->SetAutoPan( true ); @@ -659,7 +665,7 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent ) { if( module ) { - m_board->Delete( module ); // it was added by LoadModuleFromLibrary + m_board->Delete( module ); // it was added by LoadModuleFromLibrary() module = NULL; preview.Clear(); @@ -755,6 +761,7 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) KIGFX::VIEW_GROUP preview( m_view ); m_view->Add( &preview ); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); @@ -930,6 +937,7 @@ int DRAWING_TOOL::drawZone( bool aKeepout ) KIGFX::VIEW_GROUP preview( m_view ); m_view->Add( &preview ); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); @@ -1149,13 +1157,13 @@ void DRAWING_TOOL::make45DegLine( DRAWSEGMENT* aSegment, DRAWSEGMENT* aHelper ) void DRAWING_TOOL::setTransitions() { - Go( &DRAWING_TOOL::DrawLine, COMMON_ACTIONS::drawLine.MakeEvent() ); - Go( &DRAWING_TOOL::DrawCircle, COMMON_ACTIONS::drawCircle.MakeEvent() ); - Go( &DRAWING_TOOL::DrawArc, COMMON_ACTIONS::drawArc.MakeEvent() ); - Go( &DRAWING_TOOL::DrawText, COMMON_ACTIONS::drawText.MakeEvent() ); - Go( &DRAWING_TOOL::DrawDimension, COMMON_ACTIONS::drawDimension.MakeEvent() ); - Go( &DRAWING_TOOL::DrawZone, COMMON_ACTIONS::drawZone.MakeEvent() ); - Go( &DRAWING_TOOL::DrawKeepout, COMMON_ACTIONS::drawKeepout.MakeEvent() ); - Go( &DRAWING_TOOL::PlaceTarget, COMMON_ACTIONS::placeTarget.MakeEvent() ); - Go( &DRAWING_TOOL::PlaceModule, COMMON_ACTIONS::placeModule.MakeEvent() ); + Go( &DRAWING_TOOL::DrawLine, COMMON_ACTIONS::drawLine.MakeEvent() ); + Go( &DRAWING_TOOL::DrawCircle, COMMON_ACTIONS::drawCircle.MakeEvent() ); + Go( &DRAWING_TOOL::DrawArc, COMMON_ACTIONS::drawArc.MakeEvent() ); + Go( &DRAWING_TOOL::DrawDimension, COMMON_ACTIONS::drawDimension.MakeEvent() ); + Go( &DRAWING_TOOL::DrawZone, COMMON_ACTIONS::drawZone.MakeEvent() ); + Go( &DRAWING_TOOL::DrawKeepout, COMMON_ACTIONS::drawKeepout.MakeEvent() ); + Go( &DRAWING_TOOL::PlaceText, COMMON_ACTIONS::placeText.MakeEvent() ); + Go( &DRAWING_TOOL::PlaceTarget, COMMON_ACTIONS::placeTarget.MakeEvent() ); + Go( &DRAWING_TOOL::PlaceModule, COMMON_ACTIONS::placeModule.MakeEvent() ); } diff --git a/pcbnew/tools/drawing_tool.h b/pcbnew/tools/drawing_tool.h index 2339cb3a9c..e05a3a59ce 100644 --- a/pcbnew/tools/drawing_tool.h +++ b/pcbnew/tools/drawing_tool.h @@ -80,7 +80,7 @@ public: * Displays a dialog that allows to input text and its settings and then lets the user decide * where to place the text. */ - int DrawText( TOOL_EVENT& aEvent ); + int PlaceText( TOOL_EVENT& aEvent ); /** * Function DrawDimension() From 79d353671bce4fcba1bbf3125261fcbaff08f295 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 1 Apr 2014 14:13:00 +0200 Subject: [PATCH 241/741] Fixed autopanning for POINT_EDITOR. --- pcbnew/tools/point_editor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp index 1cfdb0a001..4521607434 100644 --- a/pcbnew/tools/point_editor.cpp +++ b/pcbnew/tools/point_editor.cpp @@ -210,14 +210,12 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) if( point ) { controls->ShowCursor( true ); - controls->SetAutoPan( true ); controls->SetSnapping( true ); controls->ForceCursorPosition( true, point->GetPosition() ); } else { controls->ShowCursor( false ); - controls->SetAutoPan( false ); controls->SetSnapping( false ); controls->ForceCursorPosition( false ); } @@ -240,6 +238,7 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) editFrame->SaveCopyInUndoList( selection.items, UR_CHANGED ); controls->ForceCursorPosition( false ); m_original = *m_dragPoint; // Save the original position + controls->SetAutoPan( true ); modified = true; } @@ -267,6 +266,7 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) else if( evt->IsMouseUp( BUT_LEFT ) ) { + controls->SetAutoPan( false ); setAltConstraint( false ); modified = false; } From e79934b03d8041ac99d70cd4ccd176b882b18535 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 1 Apr 2014 14:35:09 +0200 Subject: [PATCH 242/741] If tool was previously active and it is called again, it is brought to the top of the active tool stack. It fixes issue of dragging of items that have EDIT_POINTs, when dragging was activated by hovering over an item and using hot key. --- common/tool/tool_manager.cpp | 8 +++++++- pcbnew/tools/edit_tool.cpp | 26 ++++++++++++-------------- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 0d25c88434..207ee71152 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -253,9 +253,15 @@ bool TOOL_MANAGER::runTool( TOOL_BASE* aTool ) return false; } - // If the tool is already active, do not invoke it again + // If the tool is already active, bring it to the top of the active tools stack if( isActive( aTool ) ) + { + m_activeTools.erase( std::find( m_activeTools.begin(), m_activeTools.end(), + aTool->GetId() ) ); + m_activeTools.push_front( aTool->GetId() ); + return false; + } aTool->Reset( TOOL_INTERACTIVE::RUN ); diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 3f912e42e5..92c0c218a2 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -79,7 +79,13 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) // Be sure that there is at least one item that we can modify if( !makeSelection( selection ) ) + { + setTransitions(); + return 0; + } + + Activate(); m_dragging = false; // Are selected items being dragged? bool restore = false; // Should items' state be restored when finishing the tool? @@ -205,7 +211,11 @@ int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) bool unselect = selection.Empty(); if( !makeSelection( selection ) ) + { + setTransitions(); + return 0; + } // Properties are displayed when there is only one item selected if( selection.Size() == 1 ) @@ -471,20 +481,8 @@ wxPoint EDIT_TOOL::getModificationPoint( const SELECTION_TOOL::SELECTION& aSelec bool EDIT_TOOL::makeSelection( const SELECTION_TOOL::SELECTION& aSelection ) { - if( aSelection.Empty() ) - { - // Try to find an item that could be modified + if( aSelection.Empty() ) // Try to find an item that could be modified m_toolMgr->RunAction( COMMON_ACTIONS::selectionSingle ); - if( aSelection.Empty() ) - { - // This is necessary, so later the tool may be activated upon - // reception of the activation event - setTransitions(); - - return false; // Still no items to work with - } - } - - return true; + return !aSelection.Empty(); } From 6b90eb3a64aeb2df4cbfdd4ec52ee1ef03f3dbcc Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 1 Apr 2014 17:18:43 +0200 Subject: [PATCH 243/741] Refactoring EDIT_POINTS, part 1: separated functions that operate on EDIT_POINTS and EDIT_LINES. --- pcbnew/tools/edit_points.cpp | 16 +++++- pcbnew/tools/edit_points.h | 20 ++++++-- pcbnew/tools/point_editor.cpp | 94 +++++++++++++++++------------------ 3 files changed, 78 insertions(+), 52 deletions(-) diff --git a/pcbnew/tools/edit_points.cpp b/pcbnew/tools/edit_points.cpp index 9f6069d551..1c24722862 100644 --- a/pcbnew/tools/edit_points.cpp +++ b/pcbnew/tools/edit_points.cpp @@ -83,9 +83,15 @@ EDIT_POINT* EDIT_POINTS::Previous( const EDIT_POINT& aPoint ) } } + return NULL; +} + + +EDIT_LINE* EDIT_POINTS::Previous( const EDIT_LINE& aLine ) +{ for( unsigned int i = 0; i < m_lines.size(); ++i ) { - if( m_lines[i] == aPoint ) + if( m_lines[i] == aLine ) { if( i == 0 ) return &m_lines[m_lines.size() - 1]; @@ -111,9 +117,15 @@ EDIT_POINT* EDIT_POINTS::Next( const EDIT_POINT& aPoint ) } } + return NULL; +} + + +EDIT_LINE* EDIT_POINTS::Next( const EDIT_LINE& aLine ) +{ for( unsigned int i = 0; i < m_lines.size(); ++i ) { - if( m_lines[i] == aPoint ) + if( m_lines[i] == aLine ) { if( i == m_lines.size() - 1 ) return &m_lines[0]; diff --git a/pcbnew/tools/edit_points.h b/pcbnew/tools/edit_points.h index 7177bd5241..2e5bddff62 100644 --- a/pcbnew/tools/edit_points.h +++ b/pcbnew/tools/edit_points.h @@ -73,7 +73,7 @@ public: } /** - * Function GetX() + * Function GetY() * * Returns Y coordinate of an EDIT_POINT. */ @@ -356,6 +356,8 @@ public: */ EDIT_POINT* Previous( const EDIT_POINT& aPoint ); + EDIT_LINE* Previous( const EDIT_LINE& aLine ); + /** * Function Next() * @@ -367,16 +369,28 @@ public: */ EDIT_POINT* Next( const EDIT_POINT& aPoint ); - EDIT_POINT& operator[]( unsigned int aIndex ) + EDIT_LINE* Next( const EDIT_LINE& aLine ); + + EDIT_POINT& Point( unsigned int aIndex ) { return m_points[aIndex]; } - const EDIT_POINT& operator[]( unsigned int aIndex ) const + const EDIT_POINT& Point( unsigned int aIndex ) const { return m_points[aIndex]; } + EDIT_LINE& Line( unsigned int aIndex ) + { + return m_lines[aIndex]; + } + + const EDIT_LINE& Line( unsigned int aIndex ) const + { + return m_lines[aIndex]; + } + /** * Function Size() * diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp index 4521607434..db398ff33e 100644 --- a/pcbnew/tools/point_editor.cpp +++ b/pcbnew/tools/point_editor.cpp @@ -63,7 +63,7 @@ public: switch( segment->GetShape() ) { case S_SEGMENT: - points->AddPoint( segment->GetStart() ); // points[0] + points->AddPoint( segment->GetStart() ); // points[0] // TODO add enums for points points->AddPoint( segment->GetEnd() ); // points[1] break; @@ -74,7 +74,7 @@ public: // Set constraints // Arc end has to stay at the same radius as the start - (*points)[2].SetConstraint( new EC_CIRCLE( (*points)[2], (*points)[0], (*points)[1] ) ); + points->Point( 2 ).SetConstraint( new EC_CIRCLE( points->Point( 2 ), points->Point( 0 ), points->Point( 1 ) ) ); break; case S_CIRCLE: @@ -99,10 +99,10 @@ public: // Lines have to be added after creating edit points, so they use EDIT_POINT references for( int i = 0; i < cornersCount - 1; ++i ) - points->AddLine( (*points)[i], (*points)[i + 1] ); + points->AddLine( points->Point( i ), points->Point( i + 1 ) ); // The last missing line, connecting the last and the first polygon point - points->AddLine( (*points)[cornersCount - 1], (*points)[0] ); + points->AddLine( points->Point( cornersCount - 1 ), points->Point( 0 ) ); break; } @@ -116,8 +116,8 @@ public: points->AddPoint( dimension->m_featureLineDO ); // Dimension height setting - edit points should move only along the feature lines - (*points)[0].SetConstraint( new EC_LINE( (*points)[0], (*points)[2] ) ); - (*points)[1].SetConstraint( new EC_LINE( (*points)[1], (*points)[3] ) ); + points->Point( 0 ).SetConstraint( new EC_LINE( points->Point( 0 ), points->Point( 2 ) ) ); + points->Point( 1 ).SetConstraint( new EC_LINE( points->Point( 1 ), points->Point( 3 ) ) ); break; } @@ -322,29 +322,29 @@ void POINT_EDITOR::updateItem() const switch( segment->GetShape() ) { case S_SEGMENT: - if( isModified( (*m_editPoints)[0] ) ) - segment->SetStart( wxPoint( (*m_editPoints)[0].GetPosition().x, - (*m_editPoints)[0].GetPosition().y ) ); + if( isModified( m_editPoints->Point( 0 ) ) ) + segment->SetStart( wxPoint( m_editPoints->Point( 0 ).GetPosition().x, + m_editPoints->Point( 0 ).GetPosition().y ) ); - else if( isModified( (*m_editPoints)[1] ) ) - segment->SetEnd( wxPoint( (*m_editPoints)[1].GetPosition().x, - (*m_editPoints)[1].GetPosition().y ) ); + else if( isModified( m_editPoints->Point( 1 ) ) ) + segment->SetEnd( wxPoint( m_editPoints->Point( 1 ).GetPosition().x, + m_editPoints->Point( 1 ).GetPosition().y ) ); break; case S_ARC: { - const VECTOR2I& center = (*m_editPoints)[0].GetPosition(); - const VECTOR2I& start = (*m_editPoints)[1].GetPosition(); - const VECTOR2I& end = (*m_editPoints)[2].GetPosition(); + const VECTOR2I& center = m_editPoints->Point( 0 ).GetPosition(); + const VECTOR2I& start = m_editPoints->Point( 1 ).GetPosition(); + const VECTOR2I& end = m_editPoints->Point( 2 ).GetPosition(); if( center != segment->GetCenter() ) { wxPoint moveVector = wxPoint( center.x, center.y ) - segment->GetCenter(); segment->Move( moveVector ); - (*m_editPoints)[1].SetPosition( segment->GetArcStart() ); - (*m_editPoints)[2].SetPosition( segment->GetArcEnd() ); + m_editPoints->Point( 1 ).SetPosition( segment->GetArcStart() ); + m_editPoints->Point( 2 ).SetPosition( segment->GetArcEnd() ); } else @@ -371,10 +371,10 @@ void POINT_EDITOR::updateItem() const case S_CIRCLE: { - const VECTOR2I& center = (*m_editPoints)[0].GetPosition(); - const VECTOR2I& end = (*m_editPoints)[1].GetPosition(); + const VECTOR2I& center = m_editPoints->Point( 0 ).GetPosition(); + const VECTOR2I& end = m_editPoints->Point( 1 ).GetPosition(); - if( isModified( (*m_editPoints)[0] ) ) + if( isModified( m_editPoints->Point( 0 ) ) ) { wxPoint moveVector = wxPoint( center.x, center.y ) - segment->GetCenter(); segment->Move( moveVector ); @@ -402,8 +402,8 @@ void POINT_EDITOR::updateItem() const for( int i = 0; i < outline->GetCornersCount(); ++i ) { - outline->SetX( i, (*m_editPoints)[i].GetPosition().x ); - outline->SetY( i, (*m_editPoints)[i].GetPosition().y ); + outline->SetX( i, m_editPoints->Point( i ).GetPosition().x ); + outline->SetY( i, m_editPoints->Point( i ).GetPosition().y ); } break; @@ -414,7 +414,7 @@ void POINT_EDITOR::updateItem() const DIMENSION* dimension = static_cast( item ); // Check which point is currently modified and updated dimension's points respectively - if( isModified( (*m_editPoints)[0] ) ) + if( isModified( m_editPoints->Point( 0 ) ) ) { VECTOR2D featureLine( m_dragPoint->GetPosition() - dimension->GetOrigin() ); VECTOR2D crossBar( dimension->GetEnd() - dimension->GetOrigin() ); @@ -425,7 +425,7 @@ void POINT_EDITOR::updateItem() const dimension->SetHeight( featureLine.EuclideanNorm() ); } - else if( isModified( (*m_editPoints)[1] ) ) + else if( isModified( m_editPoints->Point( 1 ) ) ) { VECTOR2D featureLine( m_dragPoint->GetPosition() - dimension->GetEnd() ); VECTOR2D crossBar( dimension->GetEnd() - dimension->GetOrigin() ); @@ -436,18 +436,18 @@ void POINT_EDITOR::updateItem() const dimension->SetHeight( featureLine.EuclideanNorm() ); } - else if( isModified( (*m_editPoints)[2] ) ) + else if( isModified( m_editPoints->Point( 2 ) ) ) { dimension->SetOrigin( wxPoint( m_dragPoint->GetPosition().x, m_dragPoint->GetPosition().y ) ); - (*m_editPoints)[0].SetConstraint( new EC_LINE( (*m_editPoints)[0], (*m_editPoints)[2] ) ); - (*m_editPoints)[1].SetConstraint( new EC_LINE( (*m_editPoints)[1], (*m_editPoints)[3] ) ); + m_editPoints->Point( 0 ).SetConstraint( new EC_LINE( m_editPoints->Point( 0 ), m_editPoints->Point( 2 ) ) ); + m_editPoints->Point( 1 ).SetConstraint( new EC_LINE( m_editPoints->Point( 1 ), m_editPoints->Point( 3 ) ) ); } - else if( isModified( (*m_editPoints)[3] ) ) + else if( isModified( m_editPoints->Point( 3 ) ) ) { dimension->SetEnd( wxPoint( m_dragPoint->GetPosition().x, m_dragPoint->GetPosition().y ) ); - (*m_editPoints)[0].SetConstraint( new EC_LINE( (*m_editPoints)[0], (*m_editPoints)[2] ) ); - (*m_editPoints)[1].SetConstraint( new EC_LINE( (*m_editPoints)[1], (*m_editPoints)[3] ) ); + m_editPoints->Point( 0 ).SetConstraint( new EC_LINE( m_editPoints->Point( 0 ), m_editPoints->Point( 2 ) ) ); + m_editPoints->Point( 1 ).SetConstraint( new EC_LINE( m_editPoints->Point( 1 ), m_editPoints->Point( 3 ) ) ); } break; @@ -486,19 +486,19 @@ void POINT_EDITOR::updatePoints() const switch( segment->GetShape() ) { case S_SEGMENT: - (*m_editPoints)[0].SetPosition( segment->GetStart() ); - (*m_editPoints)[1].SetPosition( segment->GetEnd() ); + m_editPoints->Point( 0 ).SetPosition( segment->GetStart() ); + m_editPoints->Point( 1 ).SetPosition( segment->GetEnd() ); break; case S_ARC: - (*m_editPoints)[0].SetPosition( segment->GetCenter() ); - (*m_editPoints)[1].SetPosition( segment->GetArcStart() ); - (*m_editPoints)[2].SetPosition( segment->GetArcEnd() ); + m_editPoints->Point( 0 ).SetPosition( segment->GetCenter() ); + m_editPoints->Point( 1 ).SetPosition( segment->GetArcStart() ); + m_editPoints->Point( 2 ).SetPosition( segment->GetArcEnd() ); break; case S_CIRCLE: - (*m_editPoints)[0].SetPosition( segment->GetCenter() ); - (*m_editPoints)[1].SetPosition( segment->GetEnd() ); + m_editPoints->Point( 0 ).SetPosition( segment->GetCenter() ); + m_editPoints->Point( 1 ).SetPosition( segment->GetEnd() ); break; default: // suppress warnings @@ -515,7 +515,7 @@ void POINT_EDITOR::updatePoints() const const CPolyLine* outline = zone->Outline(); for( int i = 0; i < outline->GetCornersCount(); ++i ) - (*m_editPoints)[i].SetPosition( outline->GetPos( i ) ); + m_editPoints->Point( i ).SetPosition( outline->GetPos( i ) ); break; } @@ -524,10 +524,10 @@ void POINT_EDITOR::updatePoints() const { const DIMENSION* dimension = static_cast( item ); - (*m_editPoints)[0].SetPosition( dimension->m_crossBarO ); - (*m_editPoints)[1].SetPosition( dimension->m_crossBarF ); - (*m_editPoints)[2].SetPosition( dimension->m_featureLineGO ); - (*m_editPoints)[3].SetPosition( dimension->m_featureLineDO ); + m_editPoints->Point( 0 ).SetPosition( dimension->m_crossBarO ); + m_editPoints->Point( 1 ).SetPosition( dimension->m_crossBarF ); + m_editPoints->Point( 2 ).SetPosition( dimension->m_featureLineGO ); + m_editPoints->Point( 3 ).SetPosition( dimension->m_featureLineDO ); break; } @@ -580,7 +580,7 @@ EDIT_POINT POINT_EDITOR::get45DegConstrainer() const case S_ARC: case S_CIRCLE: - return (*m_editPoints)[0]; // center + return m_editPoints->Point( 0 ); // center default: // suppress warnings break; @@ -593,11 +593,11 @@ EDIT_POINT POINT_EDITOR::get45DegConstrainer() const case PCB_DIMENSION_T: { // Constraint for crossbar - if( isModified( (*m_editPoints)[2] ) ) - return (*m_editPoints)[3]; + if( isModified( m_editPoints->Point( 2 ) ) ) + return m_editPoints->Point( 3 ); - else if( isModified( (*m_editPoints)[3] ) ) - return (*m_editPoints)[2]; + else if( isModified( m_editPoints->Point( 3 ) ) ) + return m_editPoints->Point( 2 ); else return EDIT_POINT( m_dragPoint->GetPosition() ); // no constraint From 0379247fd4f76efa20c867d38ee859e16e993273 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 1 Apr 2014 17:41:24 +0200 Subject: [PATCH 244/741] Refactoring EDIT_POINTS, part 2: replaced index numbers with constants. --- pcbnew/tools/point_editor.cpp | 132 +++++++++++++++++++++------------- pcbnew/tools/point_editor.h | 2 +- 2 files changed, 83 insertions(+), 51 deletions(-) diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp index db398ff33e..167b8247bf 100644 --- a/pcbnew/tools/point_editor.cpp +++ b/pcbnew/tools/point_editor.cpp @@ -40,6 +40,30 @@ #include #include +// Few constants to avoid using bare numbers for point indices +enum SEG_POINTS +{ + SEG_START, SEG_END +}; + +enum ARC_POINTS +{ + ARC_CENTER, ARC_START, ARC_END +}; + +enum CIRCLE_POINTS +{ + CIRC_CENTER, CIRC_END +}; + +enum DIMENSION_POINTS +{ + DIM_CROSSBARO, + DIM_CROSSBARF, + DIM_FEATUREGO, + DIM_FEATUREDO, +}; + /** * Class POINT_EDITOR * @@ -63,23 +87,25 @@ public: switch( segment->GetShape() ) { case S_SEGMENT: - points->AddPoint( segment->GetStart() ); // points[0] // TODO add enums for points - points->AddPoint( segment->GetEnd() ); // points[1] + points->AddPoint( segment->GetStart() ); + points->AddPoint( segment->GetEnd() ); break; case S_ARC: - points->AddPoint( segment->GetCenter() ); // points[0] - points->AddPoint( segment->GetArcStart() ); // points[1] - points->AddPoint( segment->GetArcEnd() ); // points[2] + points->AddPoint( segment->GetCenter() ); + points->AddPoint( segment->GetArcStart() ); + points->AddPoint( segment->GetArcEnd() ); // Set constraints // Arc end has to stay at the same radius as the start - points->Point( 2 ).SetConstraint( new EC_CIRCLE( points->Point( 2 ), points->Point( 0 ), points->Point( 1 ) ) ); + points->Point( ARC_END ).SetConstraint( new EC_CIRCLE( points->Point( ARC_END ), + points->Point( ARC_CENTER ), + points->Point( ARC_START ) ) ); break; case S_CIRCLE: - points->AddPoint( segment->GetCenter() ); // points[0] - points->AddPoint( segment->GetEnd() ); // points[1] + points->AddPoint( segment->GetCenter() ); + points->AddPoint( segment->GetEnd() ); break; default: // suppress warnings @@ -97,7 +123,8 @@ public: for( int i = 0; i < cornersCount; ++i ) points->AddPoint( outline->GetPos( i ) ); - // Lines have to be added after creating edit points, so they use EDIT_POINT references + // Lines have to be added after creating edit points, + // as they use EDIT_POINT references for( int i = 0; i < cornersCount - 1; ++i ) points->AddLine( points->Point( i ), points->Point( i + 1 ) ); @@ -116,8 +143,10 @@ public: points->AddPoint( dimension->m_featureLineDO ); // Dimension height setting - edit points should move only along the feature lines - points->Point( 0 ).SetConstraint( new EC_LINE( points->Point( 0 ), points->Point( 2 ) ) ); - points->Point( 1 ).SetConstraint( new EC_LINE( points->Point( 1 ), points->Point( 3 ) ) ); + points->Point( DIM_CROSSBARO ).SetConstraint( new EC_LINE( points->Point( DIM_CROSSBARO ), + points->Point( DIM_FEATUREGO ) ) ); + points->Point( DIM_CROSSBARF ).SetConstraint( new EC_LINE( points->Point( DIM_CROSSBARF ), + points->Point( DIM_FEATUREDO ) ) ); break; } @@ -322,29 +351,29 @@ void POINT_EDITOR::updateItem() const switch( segment->GetShape() ) { case S_SEGMENT: - if( isModified( m_editPoints->Point( 0 ) ) ) - segment->SetStart( wxPoint( m_editPoints->Point( 0 ).GetPosition().x, - m_editPoints->Point( 0 ).GetPosition().y ) ); + if( isModified( m_editPoints->Point( SEG_START ) ) ) + segment->SetStart( wxPoint( m_editPoints->Point( SEG_START ).GetPosition().x, + m_editPoints->Point( SEG_START ).GetPosition().y ) ); - else if( isModified( m_editPoints->Point( 1 ) ) ) - segment->SetEnd( wxPoint( m_editPoints->Point( 1 ).GetPosition().x, - m_editPoints->Point( 1 ).GetPosition().y ) ); + else if( isModified( m_editPoints->Point( SEG_END ) ) ) + segment->SetEnd( wxPoint( m_editPoints->Point( SEG_END ).GetPosition().x, + m_editPoints->Point( SEG_END ).GetPosition().y ) ); break; case S_ARC: { - const VECTOR2I& center = m_editPoints->Point( 0 ).GetPosition(); - const VECTOR2I& start = m_editPoints->Point( 1 ).GetPosition(); - const VECTOR2I& end = m_editPoints->Point( 2 ).GetPosition(); + const VECTOR2I& center = m_editPoints->Point( ARC_CENTER ).GetPosition(); + const VECTOR2I& start = m_editPoints->Point( ARC_START ).GetPosition(); + const VECTOR2I& end = m_editPoints->Point( ARC_END ).GetPosition(); if( center != segment->GetCenter() ) { wxPoint moveVector = wxPoint( center.x, center.y ) - segment->GetCenter(); segment->Move( moveVector ); - m_editPoints->Point( 1 ).SetPosition( segment->GetArcStart() ); - m_editPoints->Point( 2 ).SetPosition( segment->GetArcEnd() ); + m_editPoints->Point( ARC_START ).SetPosition( segment->GetArcStart() ); + m_editPoints->Point( ARC_END ).SetPosition( segment->GetArcEnd() ); } else @@ -371,10 +400,10 @@ void POINT_EDITOR::updateItem() const case S_CIRCLE: { - const VECTOR2I& center = m_editPoints->Point( 0 ).GetPosition(); - const VECTOR2I& end = m_editPoints->Point( 1 ).GetPosition(); + const VECTOR2I& center = m_editPoints->Point( CIRC_CENTER ).GetPosition(); + const VECTOR2I& end = m_editPoints->Point( CIRC_END ).GetPosition(); - if( isModified( m_editPoints->Point( 0 ) ) ) + if( isModified( m_editPoints->Point( CIRC_CENTER ) ) ) { wxPoint moveVector = wxPoint( center.x, center.y ) - segment->GetCenter(); segment->Move( moveVector ); @@ -414,7 +443,7 @@ void POINT_EDITOR::updateItem() const DIMENSION* dimension = static_cast( item ); // Check which point is currently modified and updated dimension's points respectively - if( isModified( m_editPoints->Point( 0 ) ) ) + if( isModified( m_editPoints->Point( DIM_CROSSBARO ) ) ) { VECTOR2D featureLine( m_dragPoint->GetPosition() - dimension->GetOrigin() ); VECTOR2D crossBar( dimension->GetEnd() - dimension->GetOrigin() ); @@ -425,7 +454,7 @@ void POINT_EDITOR::updateItem() const dimension->SetHeight( featureLine.EuclideanNorm() ); } - else if( isModified( m_editPoints->Point( 1 ) ) ) + else if( isModified( m_editPoints->Point( DIM_CROSSBARF ) ) ) { VECTOR2D featureLine( m_dragPoint->GetPosition() - dimension->GetEnd() ); VECTOR2D crossBar( dimension->GetEnd() - dimension->GetOrigin() ); @@ -436,18 +465,22 @@ void POINT_EDITOR::updateItem() const dimension->SetHeight( featureLine.EuclideanNorm() ); } - else if( isModified( m_editPoints->Point( 2 ) ) ) + else if( isModified( m_editPoints->Point( DIM_FEATUREGO ) ) ) { dimension->SetOrigin( wxPoint( m_dragPoint->GetPosition().x, m_dragPoint->GetPosition().y ) ); - m_editPoints->Point( 0 ).SetConstraint( new EC_LINE( m_editPoints->Point( 0 ), m_editPoints->Point( 2 ) ) ); - m_editPoints->Point( 1 ).SetConstraint( new EC_LINE( m_editPoints->Point( 1 ), m_editPoints->Point( 3 ) ) ); + m_editPoints->Point( DIM_CROSSBARO ).SetConstraint( new EC_LINE( m_editPoints->Point( DIM_CROSSBARO ), + m_editPoints->Point( DIM_FEATUREGO ) ) ); + m_editPoints->Point( DIM_CROSSBARF ).SetConstraint( new EC_LINE( m_editPoints->Point( DIM_CROSSBARF ), + m_editPoints->Point( DIM_FEATUREDO ) ) ); } - else if( isModified( m_editPoints->Point( 3 ) ) ) + else if( isModified( m_editPoints->Point( DIM_FEATUREDO ) ) ) { dimension->SetEnd( wxPoint( m_dragPoint->GetPosition().x, m_dragPoint->GetPosition().y ) ); - m_editPoints->Point( 0 ).SetConstraint( new EC_LINE( m_editPoints->Point( 0 ), m_editPoints->Point( 2 ) ) ); - m_editPoints->Point( 1 ).SetConstraint( new EC_LINE( m_editPoints->Point( 1 ), m_editPoints->Point( 3 ) ) ); + m_editPoints->Point( DIM_CROSSBARO ).SetConstraint( new EC_LINE( m_editPoints->Point( DIM_CROSSBARO ), + m_editPoints->Point( DIM_FEATUREGO ) ) ); + m_editPoints->Point( DIM_CROSSBARF ).SetConstraint( new EC_LINE( m_editPoints->Point( DIM_CROSSBARF ), + m_editPoints->Point( DIM_FEATUREDO ) ) ); } break; @@ -486,19 +519,19 @@ void POINT_EDITOR::updatePoints() const switch( segment->GetShape() ) { case S_SEGMENT: - m_editPoints->Point( 0 ).SetPosition( segment->GetStart() ); - m_editPoints->Point( 1 ).SetPosition( segment->GetEnd() ); + m_editPoints->Point( SEG_START ).SetPosition( segment->GetStart() ); + m_editPoints->Point( SEG_END ).SetPosition( segment->GetEnd() ); break; case S_ARC: - m_editPoints->Point( 0 ).SetPosition( segment->GetCenter() ); - m_editPoints->Point( 1 ).SetPosition( segment->GetArcStart() ); - m_editPoints->Point( 2 ).SetPosition( segment->GetArcEnd() ); + m_editPoints->Point( ARC_CENTER ).SetPosition( segment->GetCenter() ); + m_editPoints->Point( ARC_START).SetPosition( segment->GetArcStart() ); + m_editPoints->Point( ARC_END ).SetPosition( segment->GetArcEnd() ); break; case S_CIRCLE: - m_editPoints->Point( 0 ).SetPosition( segment->GetCenter() ); - m_editPoints->Point( 1 ).SetPosition( segment->GetEnd() ); + m_editPoints->Point( CIRC_CENTER ).SetPosition( segment->GetCenter() ); + m_editPoints->Point( CIRC_END ).SetPosition( segment->GetEnd() ); break; default: // suppress warnings @@ -524,10 +557,10 @@ void POINT_EDITOR::updatePoints() const { const DIMENSION* dimension = static_cast( item ); - m_editPoints->Point( 0 ).SetPosition( dimension->m_crossBarO ); - m_editPoints->Point( 1 ).SetPosition( dimension->m_crossBarF ); - m_editPoints->Point( 2 ).SetPosition( dimension->m_featureLineGO ); - m_editPoints->Point( 3 ).SetPosition( dimension->m_featureLineDO ); + m_editPoints->Point( DIM_CROSSBARO ).SetPosition( dimension->m_crossBarO ); + m_editPoints->Point( DIM_CROSSBARF ).SetPosition( dimension->m_crossBarF ); + m_editPoints->Point( DIM_FEATUREGO ).SetPosition( dimension->m_featureLineGO ); + m_editPoints->Point( DIM_FEATUREDO ).SetPosition( dimension->m_featureLineDO ); break; } @@ -580,7 +613,7 @@ EDIT_POINT POINT_EDITOR::get45DegConstrainer() const case S_ARC: case S_CIRCLE: - return m_editPoints->Point( 0 ); // center + return m_editPoints->Point( CIRC_CENTER ); default: // suppress warnings break; @@ -593,11 +626,11 @@ EDIT_POINT POINT_EDITOR::get45DegConstrainer() const case PCB_DIMENSION_T: { // Constraint for crossbar - if( isModified( m_editPoints->Point( 2 ) ) ) - return m_editPoints->Point( 3 ); + if( isModified( m_editPoints->Point( DIM_FEATUREGO ) ) ) + return m_editPoints->Point( DIM_FEATUREDO ); - else if( isModified( m_editPoints->Point( 3 ) ) ) - return m_editPoints->Point( 2 ); + else if( isModified( m_editPoints->Point( DIM_FEATUREDO ) ) ) + return m_editPoints->Point( DIM_FEATUREGO ); else return EDIT_POINT( m_dragPoint->GetPosition() ); // no constraint @@ -614,7 +647,6 @@ EDIT_POINT POINT_EDITOR::get45DegConstrainer() const } - void POINT_EDITOR::breakOutline( const VECTOR2I& aBreakPoint ) { EDA_ITEM* item = m_editPoints->GetParent(); diff --git a/pcbnew/tools/point_editor.h b/pcbnew/tools/point_editor.h index 7fdf655809..b87224f613 100644 --- a/pcbnew/tools/point_editor.h +++ b/pcbnew/tools/point_editor.h @@ -95,7 +95,7 @@ private: ///> Returns a point that should be used as a constrainer for 45 degrees mode. EDIT_POINT get45DegConstrainer() const; - // TODO docs + ///> Adds a new edit point on a zone outline. void breakOutline( const VECTOR2I& aBreakPoint ); ///> Sets up handlers for various events. From 1828edbabe57868e6b0eb7e5fba2fbd8f366077d Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 2 Apr 2014 09:31:35 +0200 Subject: [PATCH 245/741] Refactoring EDIT_POINTS, part 3: constraints split to EDIT_POINTs and EDIT_LINEs. --- pcbnew/tools/edit_constraints.cpp | 10 +++++----- pcbnew/tools/edit_constraints.h | 13 +++++-------- pcbnew/tools/edit_points.h | 28 +++++++++++++++++++++++++++- pcbnew/tools/point_editor.cpp | 5 ++--- 4 files changed, 39 insertions(+), 17 deletions(-) diff --git a/pcbnew/tools/edit_constraints.cpp b/pcbnew/tools/edit_constraints.cpp index 91e14ea82d..84d417c2ab 100644 --- a/pcbnew/tools/edit_constraints.cpp +++ b/pcbnew/tools/edit_constraints.cpp @@ -90,8 +90,8 @@ void EC_CIRCLE::Apply( EDIT_POINT& aHandle ) EC_CONVERGING::EC_CONVERGING( EDIT_LINE& aLine, EDIT_POINTS& aPoints ) : - EDIT_CONSTRAINT( aLine.GetOrigin() ), - m_colinearConstraint( NULL ), m_line( aLine ), m_editPoints( aPoints ) + EDIT_CONSTRAINT( aLine ), + m_colinearConstraint( NULL ), m_editPoints( aPoints ) { // Dragged segment endings EDIT_POINT& origin = aLine.GetOrigin(); @@ -128,11 +128,11 @@ EC_CONVERGING::~EC_CONVERGING() } -void EC_CONVERGING::Apply( EDIT_POINT& aHandle ) +void EC_CONVERGING::Apply( EDIT_LINE& aHandle ) { // The dragged segment endpoints - EDIT_POINT& origin = m_line.GetOrigin(); - EDIT_POINT& end = m_line.GetEnd(); + EDIT_POINT& origin = m_constrained.GetOrigin(); + EDIT_POINT& end = m_constrained.GetEnd(); if( m_colinearConstraint ) { diff --git a/pcbnew/tools/edit_constraints.h b/pcbnew/tools/edit_constraints.h index b26c4f69f7..c86afb5a75 100644 --- a/pcbnew/tools/edit_constraints.h +++ b/pcbnew/tools/edit_constraints.h @@ -127,8 +127,8 @@ private: /** * Class EC_45DEGREE * - * EDIT_CONSTRAINT that imposes a constraint that two to be located at angle of 45 degree - * multiplicity. + * EDIT_CONSTRAINT that imposes a constraint that two points have to be located at angle of 45 + * degree multiplicity. */ class EC_45DEGREE : public EDIT_CONSTRAINT { @@ -205,10 +205,10 @@ private: /** * Class EC_CONVERGING * - * EDIT_CONSTRAINT for 3 segment: dragged and two adjacent ones, enforcing to keep their slopes + * EDIT_CONSTRAINT for 3 segments: dragged and two adjacent ones, enforcing to keep their slopes * and allows only to change ending points. Applied to zones. */ -class EC_CONVERGING : public EDIT_CONSTRAINT +class EC_CONVERGING : public EDIT_CONSTRAINT { public: EC_CONVERGING( EDIT_LINE& aLine, EDIT_POINTS& aPoints ); @@ -216,7 +216,7 @@ public: virtual ~EC_CONVERGING(); ///> @copydoc EDIT_CONSTRAINT::Apply() - virtual void Apply( EDIT_POINT& aHandle ); + virtual void Apply( EDIT_LINE& aHandle ); private: ///> Constraint for origin side segment. @@ -229,9 +229,6 @@ private: ///> m_[origin/end]SideConstraint, so it should not be freed. EDIT_CONSTRAINT* m_colinearConstraint; - ///> Dragged segment. - EDIT_LINE& m_line; - ///> EDIT_POINTS instance that stores currently modified lines. EDIT_POINTS& m_editPoints; diff --git a/pcbnew/tools/edit_points.h b/pcbnew/tools/edit_points.h index 2e5bddff62..52f54960ff 100644 --- a/pcbnew/tools/edit_points.h +++ b/pcbnew/tools/edit_points.h @@ -165,7 +165,7 @@ public: ///> Single point size in pixels static const int POINT_SIZE = 10; -protected: +private: ///> Position of EDIT_POINT VECTOR2I m_position; @@ -221,6 +221,29 @@ public: m_constraint->Apply(); } + /** + * Function SetConstraint() + * + * Sets a constraint for and EDIT_POINT. + * @param aConstraint is the constraint to be set. + */ + void SetConstraint( EDIT_CONSTRAINT* aConstraint ) + { + m_constraint.reset( aConstraint ); + } + + /** + * Function GetConstraint() + * + * Returns the constraint imposed on an EDIT_POINT. If there are no constraints, NULL is + * returned. + */ + EDIT_CONSTRAINT* GetConstraint() const + { + return m_constraint.get(); + } + + /** * Function GetOrigin() * @@ -264,6 +287,9 @@ public: private: EDIT_POINT& m_origin; ///< Origin point for a line EDIT_POINT& m_end; ///< End point for a line + + ///> Constraint for the point, NULL if none + boost::shared_ptr > m_constraint; }; diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp index 167b8247bf..5fd82edf53 100644 --- a/pcbnew/tools/point_editor.cpp +++ b/pcbnew/tools/point_editor.cpp @@ -575,12 +575,11 @@ void POINT_EDITOR::setAltConstraint( bool aEnabled ) if( aEnabled ) { EDIT_LINE* line = dynamic_cast( m_dragPoint ); + if( line ) { if( m_editPoints->GetParent()->Type() == PCB_ZONE_AREA_T ) - { - m_altConstraint.reset( new EC_CONVERGING( *line, *m_editPoints ) ); - } + m_altConstraint.reset( (EDIT_CONSTRAINT*)( new EC_CONVERGING( *line, *m_editPoints ) ) ); } else { From 5de41eabd1ec6550d75b3231b890ea44f01219af Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 2 Apr 2014 15:57:21 +0200 Subject: [PATCH 246/741] Added EC_SNAPLINE to make possible snapping EDIT_LINES by their ends rather than by its center. --- pcbnew/tools/edit_constraints.cpp | 18 ++++++++++++++++-- pcbnew/tools/edit_constraints.h | 28 ++++++++++++++++++++++++++++ pcbnew/tools/edit_points.h | 16 +++++++++++++--- pcbnew/tools/point_editor.cpp | 18 +++++++++++------- 4 files changed, 68 insertions(+), 12 deletions(-) diff --git a/pcbnew/tools/edit_constraints.cpp b/pcbnew/tools/edit_constraints.cpp index 84d417c2ab..f0edf9bc8b 100644 --- a/pcbnew/tools/edit_constraints.cpp +++ b/pcbnew/tools/edit_constraints.cpp @@ -131,8 +131,8 @@ EC_CONVERGING::~EC_CONVERGING() void EC_CONVERGING::Apply( EDIT_LINE& aHandle ) { // The dragged segment endpoints - EDIT_POINT& origin = m_constrained.GetOrigin(); - EDIT_POINT& end = m_constrained.GetEnd(); + EDIT_POINT& origin = aHandle.GetOrigin(); + EDIT_POINT& end = aHandle.GetEnd(); if( m_colinearConstraint ) { @@ -173,3 +173,17 @@ void EC_CONVERGING::Apply( EDIT_LINE& aHandle ) end.SetPosition( *originEndIntersect ); } } + + +EC_SNAPLINE::EC_SNAPLINE( EDIT_LINE& aLine, V2D_TRANSFORM_FUN aSnapFun ) : + EDIT_CONSTRAINT( aLine ), m_snapFun( aSnapFun ) +{} + + +void EC_SNAPLINE::Apply( EDIT_LINE& aHandle ) +{ + VECTOR2D delta = aHandle.GetEnd().GetPosition() - aHandle.GetOrigin().GetPosition(); + + aHandle.GetOrigin().SetPosition( m_snapFun( aHandle.GetOrigin().GetPosition() ) ); + aHandle.GetEnd().SetPosition( aHandle.GetOrigin().GetPosition() + delta ); +} diff --git a/pcbnew/tools/edit_constraints.h b/pcbnew/tools/edit_constraints.h index c86afb5a75..6df17e438d 100644 --- a/pcbnew/tools/edit_constraints.h +++ b/pcbnew/tools/edit_constraints.h @@ -26,6 +26,7 @@ #define EDIT_CONSTRAINTS_H_ #include +#include class EDIT_POINT; class EDIT_LINE; @@ -236,4 +237,31 @@ private: VECTOR2I m_draggedVector; }; + +/** + * Class EC_SNAPLINE + * + * EDIT_CONSTRAINT for a EDIT_LINE, one of the ends is snapped to a spot determined by a + * transform function passed as parameter (e.g. it can be snapped to a grid), instead of having + * the line center snapped to a point. + */ +class EC_SNAPLINE : public EDIT_CONSTRAINT +{ +public: + ///> Typedef for a function that determines snapping point. + typedef boost::function V2D_TRANSFORM_FUN; + + EC_SNAPLINE( EDIT_LINE& aLine, V2D_TRANSFORM_FUN aSnapFun ); + + virtual ~EC_SNAPLINE() + {} + + ///> @copydoc EDIT_CONSTRAINT::Apply() + virtual void Apply( EDIT_LINE& aHandle ); + +private: + ///> Function that determines snapping point. + V2D_TRANSFORM_FUN m_snapFun; +}; + #endif /* EDIT_CONSTRAINTS_H_ */ diff --git a/pcbnew/tools/edit_points.h b/pcbnew/tools/edit_points.h index 52f54960ff..b06ec30975 100644 --- a/pcbnew/tools/edit_points.h +++ b/pcbnew/tools/edit_points.h @@ -418,15 +418,25 @@ public: } /** - * Function Size() + * Function PointsSize() * - * Returns number of stored points. + * Returns number of stored EDIT_POINTs. */ - unsigned int Size() const + unsigned int PointsSize() const { return m_points.size(); } + /** + * Function LinesSize() + * + * Returns number of stored EDIT_LINEs. + */ + unsigned int LinesSize() const + { + return m_lines.size(); + } + ///> @copydoc VIEW_ITEM::ViewBBox() virtual const BOX2I ViewBBox() const { diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp index 5fd82edf53..f4aa4baa17 100644 --- a/pcbnew/tools/point_editor.cpp +++ b/pcbnew/tools/point_editor.cpp @@ -23,6 +23,7 @@ */ #include +#include #include #include @@ -64,16 +65,11 @@ enum DIMENSION_POINTS DIM_FEATUREDO, }; -/** - * Class POINT_EDITOR - * - * Tool that displays edit points allowing to modify items by dragging the points. - */ class EDIT_POINTS_FACTORY { public: - static boost::shared_ptr Make( EDA_ITEM* aItem ) + static boost::shared_ptr Make( EDA_ITEM* aItem, KIGFX::GAL* aGal ) { boost::shared_ptr points = boost::make_shared( aItem ); @@ -126,10 +122,18 @@ public: // Lines have to be added after creating edit points, // as they use EDIT_POINT references for( int i = 0; i < cornersCount - 1; ++i ) + { points->AddLine( points->Point( i ), points->Point( i + 1 ) ); + points->Line( i ).SetConstraint( + new EC_SNAPLINE( points->Line( i ), + boost::bind( &KIGFX::GAL::GetGridPoint, aGal, _1 ) ) ); + } // The last missing line, connecting the last and the first polygon point points->AddLine( points->Point( cornersCount - 1 ), points->Point( 0 ) ); + points->Line( points->LinesSize() - 1 ).SetConstraint( + new EC_SNAPLINE( points->Line( points->LinesSize() - 1 ), + boost::bind( &KIGFX::GAL::GetGridPoint, aGal, _1 ) ) ); break; } @@ -208,7 +212,7 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) PCB_EDIT_FRAME* editFrame = getEditFrame(); EDA_ITEM* item = selection.items.GetPickedItem( 0 ); - m_editPoints = EDIT_POINTS_FACTORY::Make( item ); + m_editPoints = EDIT_POINTS_FACTORY::Make( item, m_toolMgr->GetView()->GetGAL() ); if( !m_editPoints ) { setTransitions(); From b6aa832f83034f848aafe035df6fbfc960931a66 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 2 Apr 2014 16:30:48 +0200 Subject: [PATCH 247/741] Converted std::bind1st to boost::bind. --- pcbnew/board_undo_redo.cpp | 9 +++++---- pcbnew/pcbframe.cpp | 3 ++- pcbnew/tools/drawing_tool.cpp | 9 ++++----- pcbnew/tools/edit_tool.cpp | 11 +++++------ pcbnew/tools/selection_tool.cpp | 5 +++-- 5 files changed, 19 insertions(+), 18 deletions(-) diff --git a/pcbnew/board_undo_redo.cpp b/pcbnew/board_undo_redo.cpp index 5912380180..a720b0e48a 100644 --- a/pcbnew/board_undo_redo.cpp +++ b/pcbnew/board_undo_redo.cpp @@ -23,6 +23,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ +#include #include #include #include @@ -522,7 +523,7 @@ void PCB_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRed if( item->Type() == PCB_MODULE_T ) { MODULE* oldModule = static_cast( item ); - oldModule->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Remove ), view ) ); + oldModule->RunOnChildren( boost::bind( &KIGFX::VIEW::Remove, view, _1 ) ); } ratsnest->Remove( item ); @@ -533,7 +534,7 @@ void PCB_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRed if( item->Type() == PCB_MODULE_T ) { MODULE* newModule = static_cast( item ); - newModule->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Add ), view ) ); + newModule->RunOnChildren( boost::bind( &KIGFX::VIEW::Add, view, _1 ) ); } ratsnest->Add( item ); @@ -549,7 +550,7 @@ void PCB_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRed if( item->Type() == PCB_MODULE_T ) { MODULE* module = static_cast( item ); - module->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Remove ), view ) ); + module->RunOnChildren( boost::bind( &KIGFX::VIEW::Remove, view, _1 ) ); } view->Remove( item ); @@ -563,7 +564,7 @@ void PCB_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRed if( item->Type() == PCB_MODULE_T ) { MODULE* module = static_cast( item ); - module->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Add ), view ) ); + module->RunOnChildren( boost::bind( &KIGFX::VIEW::Add, view, _1) ); } view->Add( item ); diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 6fc807c083..faf6e1645d 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -75,6 +75,7 @@ #endif #include +#include // Keys used in read/write config #define OPTKEY_DEFAULT_LINEWIDTH_VALUE wxT( "PlotLineWidth_mm" ) @@ -524,7 +525,7 @@ void PCB_EDIT_FRAME::ViewReloadBoard( const BOARD* aBoard ) const // Load modules and its additional elements for( MODULE* module = aBoard->m_Modules; module; module = module->Next() ) { - module->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Add ), view ) ); + module->RunOnChildren( boost::bind( &KIGFX::VIEW::Add, view, _1 ) ); view->Add( module ); } diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index 61b3064783..b0155f0f1f 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -22,6 +22,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ +#include #include "drawing_tool.h" #include "common_actions.h" @@ -706,14 +707,13 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent ) // Add all the drawable parts to preview preview.Add( module ); - module->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW_GROUP::Add ), - &preview ) ); + module->RunOnChildren( boost::bind( &KIGFX::VIEW_GROUP::Add, &preview, _1 ) ); preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); } else { - module->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Add ), m_view ) ); + module->RunOnChildren( boost::bind( &KIGFX::VIEW::Add, m_view, _1 ) ); m_view->Add( module ); module->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); @@ -722,8 +722,7 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent ) // Remove from preview preview.Remove( module ); - module->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW_GROUP::Remove ), - &preview ) ); + module->RunOnChildren( boost::bind( &KIGFX::VIEW_GROUP::Remove, &preview, _1 ) ); module = NULL; // to indicate that there is no module that we currently modify m_controls->ShowCursor( true ); diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 92c0c218a2..445e7abdd7 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -30,16 +30,15 @@ #include #include #include + #include #include +#include #include "common_actions.h" #include "selection_tool.h" #include "edit_tool.h" -using namespace KIGFX; -using boost::optional; - EDIT_TOOL::EDIT_TOOL() : TOOL_INTERACTIVE( "pcbnew.InteractiveEdit" ), m_selectionTool( NULL ) { @@ -96,7 +95,7 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) // Offset from the dragged item's center (anchor) wxPoint offset; - VIEW_CONTROLS* controls = getViewControls(); + KIGFX::VIEW_CONTROLS* controls = getViewControls(); PCB_EDIT_FRAME* editFrame = static_cast( m_toolMgr->GetEditFrame() ); controls->ShowCursor( true ); controls->SetSnapping( true ); @@ -163,7 +162,7 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) m_dragging = true; } - selection.group->ViewUpdate( VIEW_ITEM::GEOMETRY ); + selection.group->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate ); } @@ -399,7 +398,7 @@ void EDIT_TOOL::remove( BOARD_ITEM* aItem ) { MODULE* module = static_cast( aItem ); module->ClearFlags(); - module->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Remove ), getView() ) ); + module->RunOnChildren( boost::bind( &KIGFX::VIEW::Remove, getView(), _1 ) ); // Module itself is deleted after the switch scope is finished // list of pads is rebuild by BOARD::BuildListOfNets() diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index cb37b23cdc..8c3e79adbb 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -25,6 +25,7 @@ #include #include +#include #include #include @@ -556,7 +557,7 @@ void SELECTION_TOOL::select( BOARD_ITEM* aItem ) if( aItem->Type() == PCB_MODULE_T ) { MODULE* module = static_cast( aItem ); - module->RunOnChildren( std::bind1st( std::mem_fun( &SELECTION_TOOL::selectVisually ), this ) ); + module->RunOnChildren( boost::bind( &SELECTION_TOOL::selectVisually, this, _1 ) ); } selectVisually( aItem ); @@ -587,7 +588,7 @@ void SELECTION_TOOL::deselect( BOARD_ITEM* aItem ) if( aItem->Type() == PCB_MODULE_T ) { MODULE* module = static_cast( aItem ); - module->RunOnChildren( std::bind1st( std::mem_fun( &SELECTION_TOOL::deselectVisually ), this ) ); + module->RunOnChildren( boost::bind( &SELECTION_TOOL::deselectVisually, this, _1 ) ); } deselectVisually( aItem ); From 9b99ac2a53af6d450c09a189b8c7983afbc2089e Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 3 Apr 2014 09:40:55 +0200 Subject: [PATCH 248/741] All: add 2 hotkeys to simulate a mouse left click (key return) and left dclick (key end) --- common/dialogs/dialog_hotkeys_editor.cpp | 7 +++--- common/hotkey_grid_table.cpp | 23 +++++++++++++++++ common/hotkeys_basic.cpp | 2 ++ eeschema/hotkeys.cpp | 28 +++++++++++++++++++++ eeschema/hotkeys.h | 5 +++- eeschema/menubar.cpp | 4 ++- pagelayout_editor/hotkeys.cpp | 32 +++++++++++++++++++++--- pagelayout_editor/hotkeys.h | 5 +++- pagelayout_editor/onrightclick.cpp | 4 ++- pcbnew/hotkeys.cpp | 16 +++++++++--- pcbnew/hotkeys.h | 3 ++- pcbnew/hotkeys_board_editor.cpp | 19 +++++++------- pcbnew/hotkeys_module_editor.cpp | 9 +++++++ pcbnew/onrightclick.cpp | 2 +- 14 files changed, 133 insertions(+), 26 deletions(-) diff --git a/common/dialogs/dialog_hotkeys_editor.cpp b/common/dialogs/dialog_hotkeys_editor.cpp index bb3b85f523..1c249b7f3c 100644 --- a/common/dialogs/dialog_hotkeys_editor.cpp +++ b/common/dialogs/dialog_hotkeys_editor.cpp @@ -175,7 +175,7 @@ void HOTKEYS_EDITOR_DIALOG::OnClickOnCell( wxGridEvent& event ) /** OnRightClickOnCell * If a cell is selected, display a list of keys for selection * The list is restricted to keys that cannot be entered: - * tab, home ... because these keys have special functions in dialogs + * tab, home, return ... because these keys have special functions in dialogs */ void HOTKEYS_EDITOR_DIALOG::OnRightClickOnCell( wxGridEvent& event ) { @@ -186,8 +186,8 @@ void HOTKEYS_EDITOR_DIALOG::OnRightClickOnCell( wxGridEvent& event ) return; // Do not translate these key names. They are internally used. - //ee hotkeys_basic.cpp - #define C_COUNT 8 + // See hotkeys_basic.cpp + #define C_COUNT 9 wxString choices[C_COUNT] = { wxT("End") @@ -198,6 +198,7 @@ void HOTKEYS_EDITOR_DIALOG::OnRightClickOnCell( wxGridEvent& event ) wxT("Space"), wxT("Ctrl+Space"), wxT("Alt+Space"), + wxT("Return") }; wxString keyname = wxGetSingleChoice( _( "Special keys only. For others keys, use keyboard" ), diff --git a/common/hotkey_grid_table.cpp b/common/hotkey_grid_table.cpp index ecb75182aa..c1f82545f3 100644 --- a/common/hotkey_grid_table.cpp +++ b/common/hotkey_grid_table.cpp @@ -1,3 +1,26 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 1992-2014 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 /* diff --git a/common/hotkeys_basic.cpp b/common/hotkeys_basic.cpp index 968bcb47ca..5724fe94cd 100644 --- a/common/hotkeys_basic.cpp +++ b/common/hotkeys_basic.cpp @@ -133,6 +133,8 @@ static struct hotkey_name_descr s_Hotkey_Name_List[] = { wxT( "Left" ), WXK_LEFT }, { wxT( "Right" ), WXK_RIGHT }, + { wxT( "Return" ), WXK_RETURN }, + { wxT( "Space" ), WXK_SPACE }, // Do not change this line: end of list diff --git a/eeschema/hotkeys.cpp b/eeschema/hotkeys.cpp index f6c83a9afa..b3ec06d534 100644 --- a/eeschema/hotkeys.cpp +++ b/eeschema/hotkeys.cpp @@ -128,6 +128,10 @@ static EDA_HOTKEY HkRedo( wxT( "Redo" ), HK_REDO, GR_KB_SHIFT + GR_KB_CTRL + 'Z' (int) wxID_REDO ); #endif +// mouse click command: +static EDA_HOTKEY HkMouseLeftClick( wxT( "Mouse Left Click" ), HK_LEFT_CLICK, WXK_RETURN, 0 ); +static EDA_HOTKEY HkMouseLeftDClick( wxT( "Mouse Left DClick" ), HK_LEFT_DCLICK, WXK_END, 0 ); + // Schematic editor static EDA_HOTKEY HkBeginWire( wxT( "Begin Wire" ), HK_BEGIN_WIRE, 'W', ID_WIRE_BUTT ); static EDA_HOTKEY HkBeginBus( wxT( "Begin Bus" ), HK_BEGIN_BUS, 'B', ID_BUS_BUTT ); @@ -191,6 +195,8 @@ static EDA_HOTKEY HkDelete( wxT( "Delete Item" ), HK_DELETE, WXK_DELETE ); static EDA_HOTKEY HkFindItem( wxT( "Find Item" ), HK_FIND_ITEM, 'F' + GR_KB_CTRL, ID_FIND_ITEMS ); static EDA_HOTKEY HkFindNextItem( wxT( "Find Next Item" ), HK_FIND_NEXT_ITEM, WXK_F5, wxEVT_COMMAND_FIND ); +static EDA_HOTKEY HkFindReplace( wxT( "Find and Replace" ), HK_FIND_REPLACE, + 'F' + GR_KB_CTRL + GR_KB_ALT, wxID_REPLACE ); static EDA_HOTKEY HkFindNextDrcMarker( wxT( "Find Next DRC Marker" ), HK_FIND_NEXT_DRC_MARKER, WXK_F5 + GR_KB_SHIFT, EVT_COMMAND_FIND_DRC_MARKER ); @@ -220,6 +226,8 @@ EDA_HOTKEY* s_Common_Hotkey_List[] = &HkDrag, &HkUndo, &HkRedo, + &HkMouseLeftClick, + &HkMouseLeftDClick, NULL }; @@ -231,6 +239,7 @@ EDA_HOTKEY* s_Schematic_Hotkey_List[] = &HkFindItem, &HkFindNextItem, &HkFindNextDrcMarker, + &HkFindReplace, &HkInsert, &HkMove2Drag, &HkSaveBlock, @@ -361,6 +370,15 @@ void SCH_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition, GetScreen()->m_O_Curseur = GetCrossHairPosition(); break; + case HK_LEFT_CLICK: + OnLeftClick( aDC, aPosition ); + break; + + case HK_LEFT_DCLICK: // Simulate a double left click: generate 2 events + OnLeftClick( aDC, aPosition ); + OnLeftDClick( aDC, aPosition ); + break; + case HK_ZOOM_IN: case HK_ZOOM_OUT: case HK_ZOOM_REDRAW: @@ -395,6 +413,7 @@ void SCH_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition, case HK_UNDO: case HK_REDO: case HK_FIND_ITEM: + case HK_FIND_REPLACE: if( notBusy ) { cmd.SetId( hotKey->m_IdMenuEvent ); @@ -558,6 +577,15 @@ void LIB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition, GetScreen()->m_O_Curseur = GetCrossHairPosition(); break; + case HK_LEFT_CLICK: + OnLeftClick( aDC, aPosition ); + break; + + case HK_LEFT_DCLICK: // Simulate a double left click: generate 2 events + OnLeftClick( aDC, aPosition ); + OnLeftDClick( aDC, aPosition ); + break; + case HK_ZOOM_IN: case HK_ZOOM_OUT: case HK_ZOOM_REDRAW: diff --git a/eeschema/hotkeys.h b/eeschema/hotkeys.h index b434634181..a68a07dd7b 100644 --- a/eeschema/hotkeys.h +++ b/eeschema/hotkeys.h @@ -13,6 +13,7 @@ enum hotkey_id_commnand { HK_FIND_NEXT_ITEM = HK_COMMON_END, HK_FIND_NEXT_DRC_MARKER, HK_FIND_ITEM, + HK_FIND_REPLACE, HK_DELETE, HK_REPEAT_LAST, HK_LIBEDIT_MOVE_GRAPHIC_ITEM, @@ -48,7 +49,9 @@ enum hotkey_id_commnand { HK_ADD_NOCONN_FLAG, HK_SAVE_LIB, HK_SAVE_SCH, - HK_LOAD_SCH + HK_LOAD_SCH, + HK_LEFT_CLICK, + HK_LEFT_DCLICK }; // List of hotkey descriptors for Eeschema diff --git a/eeschema/menubar.cpp b/eeschema/menubar.cpp index 58ed11c90d..086473b394 100644 --- a/eeschema/menubar.cpp +++ b/eeschema/menubar.cpp @@ -213,7 +213,9 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() AddMenuItem( editMenu, ID_FIND_ITEMS, text, HELP_FIND, KiBitmap( find_xpm ) ); // Find/Replace - AddMenuItem( editMenu, wxID_REPLACE, _( "Find and Re&place\tCtrl+Shift+F" ), HELP_REPLACE, + text = AddHotkeyName( _( "Find and Re&place" ), s_Schematic_Hokeys_Descr, + HK_FIND_REPLACE ); + AddMenuItem( editMenu, wxID_REPLACE, text, HELP_REPLACE, KiBitmap( find_replace_xpm ) ); // Import footprint association from the CvPcb cmp file: diff --git a/pagelayout_editor/hotkeys.cpp b/pagelayout_editor/hotkeys.cpp index 77ea54bccd..49a9d0e395 100644 --- a/pagelayout_editor/hotkeys.cpp +++ b/pagelayout_editor/hotkeys.cpp @@ -55,8 +55,12 @@ * and see this list for some ascii keys (space ...) */ -/* local variables */ -/* Hotkey list: */ +// Hotkey list: + +// mouse click command: +static EDA_HOTKEY HkMouseLeftClick( wxT( "Mouse Left Click" ), HK_LEFT_CLICK, WXK_RETURN, 0 ); +static EDA_HOTKEY HkMouseLeftDClick( wxT( "Mouse Left DClick" ), HK_LEFT_DCLICK, WXK_END, 0 ); + static EDA_HOTKEY HkResetLocalCoord( wxT( "Reset Local Coordinates" ), HK_RESET_LOCAL_COORD, ' ' ); static EDA_HOTKEY HkZoomAuto( wxT( "Zoom Auto" ), HK_ZOOM_AUTO, WXK_HOME, ID_ZOOM_PAGE ); @@ -67,6 +71,7 @@ static EDA_HOTKEY HkZoomOut( wxT( "Zoom Out" ), HK_ZOOM_OUT, WXK_F2, ID_POPUP static EDA_HOTKEY HkZoomIn( wxT( "Zoom In" ), HK_ZOOM_IN, WXK_F1, ID_POPUP_ZOOM_IN ); static EDA_HOTKEY HkHelp( wxT( "Help (this window)" ), HK_HELP, '?' ); static EDA_HOTKEY HkMoveItem( wxT( "Move Item" ), HK_MOVE_ITEM, 'M', ID_POPUP_ITEM_MOVE ); +static EDA_HOTKEY HkPlaceItem( wxT( "Place Item" ), HK_PLACE_ITEM, 'P', ID_POPUP_ITEM_PLACE ); static EDA_HOTKEY HkMoveStartPoint( wxT( "Move Start Point" ), HK_MOVE_START_POINT, 'S', ID_POPUP_ITEM_MOVE_START_POINT ); static EDA_HOTKEY HkMoveEndPoint( wxT( "Move End Point" ), HK_MOVE_END_POINT, 'E', @@ -85,13 +90,17 @@ EDA_HOTKEY* s_Common_Hotkey_List[] = &HkZoomIn, &HkZoomOut, &HkZoomRedraw, &HkZoomCenter, &HkZoomAuto, &HkResetLocalCoord, &HkUndo, &HkRedo, + &HkMouseLeftClick, + &HkMouseLeftDClick, NULL }; EDA_HOTKEY* s_PlEditor_Hotkey_List[] = { &HkMoveItem, &HkMoveStartPoint, - &HkMoveEndPoint, &HkDeleteItem, + &HkMoveEndPoint, + &HkPlaceItem, + &HkDeleteItem, NULL }; @@ -142,6 +151,15 @@ void PL_EDITOR_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, case HK_NOT_FOUND: return; + case HK_LEFT_CLICK: + OnLeftClick( aDC, aPosition ); + break; + + case HK_LEFT_DCLICK: // Simulate a double left click: generate 2 events + OnLeftClick( aDC, aPosition ); + OnLeftDClick( aDC, aPosition ); + break; + case HK_HELP: // Display Current hotkey list DisplayHotkeyList( this, s_PlEditor_Hokeys_Descr ); break; @@ -208,6 +226,14 @@ void PL_EDITOR_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, GetEventHandler()->ProcessEvent( cmd ); break; + case HK_PLACE_ITEM: + if( busy ) + { + cmd.SetId( HK_Descr->m_IdMenuEvent ); + GetEventHandler()->ProcessEvent( cmd ); + } + break; + default: wxMessageBox( wxT("Unknown hotkey") ); return; diff --git a/pagelayout_editor/hotkeys.h b/pagelayout_editor/hotkeys.h index 37a310116b..f06d129d26 100644 --- a/pagelayout_editor/hotkeys.h +++ b/pagelayout_editor/hotkeys.h @@ -39,7 +39,10 @@ enum hotkey_id_commnand { HK_MOVE_ITEM, HK_MOVE_START_POINT, HK_MOVE_END_POINT, - HK_DELETE_ITEM + HK_PLACE_ITEM, + HK_DELETE_ITEM, + HK_LEFT_CLICK, + HK_LEFT_DCLICK }; // List of hotkey descriptors for PlEditor. diff --git a/pagelayout_editor/onrightclick.cpp b/pagelayout_editor/onrightclick.cpp index 50c2ccf475..fffe735b70 100644 --- a/pagelayout_editor/onrightclick.cpp +++ b/pagelayout_editor/onrightclick.cpp @@ -108,7 +108,9 @@ bool PL_EDITOR_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* aPopMenu ) } else // An item is currently in edit { - AddMenuItem( aPopMenu, ID_POPUP_ITEM_PLACE, _( "Place" ), + msg = AddHotkeyName( _( "Place Item" ), s_PlEditor_Hokeys_Descr, + HK_PLACE_ITEM ); + AddMenuItem( aPopMenu, ID_POPUP_ITEM_PLACE, msg, KiBitmap( move_xpm ) ); AddMenuItem( aPopMenu, ID_POPUP_ITEM_PLACE_CANCEL, _( "Cancel" ), KiBitmap( cancel_xpm ) ); diff --git a/pcbnew/hotkeys.cpp b/pcbnew/hotkeys.cpp index 173b09fffd..6e63856363 100644 --- a/pcbnew/hotkeys.cpp +++ b/pcbnew/hotkeys.cpp @@ -29,8 +29,14 @@ * and see this list for some ascii keys (space ...) */ -/* local variables */ -/* Hotkey list: */ +// Hotkey list: + +// mouse click command: +static EDA_HOTKEY HkMouseLeftClick( wxT( "Mouse Left Click" ), + HK_LEFT_CLICK, WXK_RETURN, 0 ); +static EDA_HOTKEY HkMouseLeftDClick( wxT( "Mouse Left DClick" ), + HK_LEFT_DCLICK, WXK_END, 0 ); + static EDA_HOTKEY HkSwitch2CopperLayer( wxT( "Switch to Copper layer" ), HK_SWITCH_LAYER_TO_COPPER, WXK_PAGEDOWN ); static EDA_HOTKEY HkSwitch2ComponentLayer( wxT( "Switch to Component layer" ), @@ -70,7 +76,6 @@ static EDA_HOTKEY HkSelLayerAndAddBlindBuriedVia( wxT( "Sel Layer and Add Blind/ 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 HkEndTrack( wxT( "End Track" ), HK_END_TRACK, WXK_END ); static EDA_HOTKEY HkEditBoardItem( wxT( "Edit Item" ), HK_EDIT_ITEM, 'E' ); static EDA_HOTKEY HkFlipItem( wxT( "Flip Item" ), HK_FLIP_ITEM, 'F' ); static EDA_HOTKEY HkRotateItem( wxT( "Rotate Item" ), HK_ROTATE_ITEM, 'R' ); @@ -211,6 +216,8 @@ EDA_HOTKEY* common_Hotkey_List[] = &HkZoomRedraw, &HkZoomCenter, &HkZoomAuto, &HkSwitchUnits, &HkResetLocalCoord, &HkSetGridOrigin, &HkResetGridOrigin, &HkUndo, &HkRedo, + &HkMouseLeftClick, + &HkMouseLeftDClick, NULL }; @@ -225,7 +232,8 @@ EDA_HOTKEY* board_edit_Hotkey_List[] = &HkSwitchTrackPosture, &HkDragTrackKeepSlope, &HkPlaceItem, &HkCopyItem, - &HkEndTrack, &HkMoveItem, &HkFlipItem, + &HkMoveItem, + &HkFlipItem, &HkRotateItem, &HkDragFootprint, &HkGetAndMoveFootprint, &HkLock_Unlock_Footprint, &HkSavefile, &HkSavefileAs, &HkLoadfile, &HkFindItem, &HkEditBoardItem, diff --git a/pcbnew/hotkeys.h b/pcbnew/hotkeys.h index 6424e713da..c213c13daf 100644 --- a/pcbnew/hotkeys.h +++ b/pcbnew/hotkeys.h @@ -28,7 +28,6 @@ enum hotkey_id_commnand { HK_ADD_MICROVIA, HK_SWITCH_TRACK_POSTURE, HK_DRAG_TRACK_KEEP_SLOPE, - HK_END_TRACK, HK_SAVE_BOARD, HK_SAVE_BOARD_AS, HK_LOAD_BOARD, @@ -90,6 +89,8 @@ enum hotkey_id_commnand { HK_CANVAS_DEFAULT, HK_CANVAS_OPENGL, HK_CANVAS_CAIRO, + HK_LEFT_CLICK, + HK_LEFT_DCLICK }; // Full list of hotkey descriptors for board editor and footprint editor diff --git a/pcbnew/hotkeys_board_editor.cpp b/pcbnew/hotkeys_board_editor.cpp index b42f2ddb04..d48f77a2eb 100644 --- a/pcbnew/hotkeys_board_editor.cpp +++ b/pcbnew/hotkeys_board_editor.cpp @@ -161,6 +161,15 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit return; break; + case HK_LEFT_CLICK: + OnLeftClick( aDC, aPosition ); + break; + + case HK_LEFT_DCLICK: // Simulate a double left click: generate 2 events + OnLeftClick( aDC, aPosition ); + OnLeftDClick( aDC, aPosition ); + break; + case HK_RECORD_MACROS_0: case HK_RECORD_MACROS_1: case HK_RECORD_MACROS_2: @@ -428,16 +437,6 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit break; - case HK_END_TRACK: - if( itemCurrentlyEdited && GetCurItem()->IsTrack() && GetCurItem()->IsNew() ) - { - // A new track is in progress: call to End_Route() - m_canvas->MoveCursorToCrossHair(); - End_Route( (TRACK*) GetCurItem(), aDC ); - } - - break; - case HK_GET_AND_MOVE_FOOTPRINT: if( !itemCurrentlyEdited ) evt_type = ID_POPUP_PCB_GET_AND_MOVE_MODULE_REQUEST; diff --git a/pcbnew/hotkeys_module_editor.cpp b/pcbnew/hotkeys_module_editor.cpp index 08be819c83..dcaed9df75 100644 --- a/pcbnew/hotkeys_module_editor.cpp +++ b/pcbnew/hotkeys_module_editor.cpp @@ -58,6 +58,15 @@ void FOOTPRINT_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPos GetScreen()->m_O_Curseur = GetCrossHairPosition(); break; + case HK_LEFT_CLICK: + OnLeftClick( aDC, aPosition ); + break; + + case HK_LEFT_DCLICK: // Simulate a double left click: generate 2 events + OnLeftClick( aDC, aPosition ); + OnLeftDClick( aDC, aPosition ); + break; + case HK_SET_GRID_ORIGIN: SetGridOrigin( GetCrossHairPosition() ); m_canvas->Refresh(); diff --git a/pcbnew/onrightclick.cpp b/pcbnew/onrightclick.cpp index 75d704a889..c66adc4c64 100644 --- a/pcbnew/onrightclick.cpp +++ b/pcbnew/onrightclick.cpp @@ -520,7 +520,7 @@ void PCB_EDIT_FRAME::createPopupMenuForTracks( TRACK* Track, wxMenu* PopMenu ) { if( flags & IS_NEW ) { - msg = AddHotkeyName( _( "End Track" ), g_Board_Editor_Hokeys_Descr, HK_END_TRACK ); + msg = AddHotkeyName( _( "End Track" ), g_Board_Editor_Hokeys_Descr, HK_LEFT_DCLICK ); AddMenuItem( PopMenu, ID_POPUP_PCB_END_TRACK, msg, KiBitmap( checked_ok_xpm ) ); } From d87680796619058389cdbe0493a3297180cc25f4 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 3 Apr 2014 09:48:06 +0200 Subject: [PATCH 249/741] Fixed cancelling dialogs in DRAWING_TOOL. --- common/tool/tool_dispatcher.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index 8f36386766..f04dd2d69d 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -251,14 +251,14 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) if( type == wxEVT_KEY_UP ) { - if( key == WXK_ESCAPE ) // ESC is the special key for cancelling tools - evt = TOOL_EVENT( TC_COMMAND, TA_CANCEL_TOOL ); - else - evt = TOOL_EVENT( TC_KEYBOARD, TA_KEY_UP, key | mods ); + evt = TOOL_EVENT( TC_KEYBOARD, TA_KEY_UP, key | mods ); } else { - evt = TOOL_EVENT( TC_KEYBOARD, TA_KEY_DOWN, key | mods ); + if( key == WXK_ESCAPE ) // ESC is the special key for cancelling tools + evt = TOOL_EVENT( TC_COMMAND, TA_CANCEL_TOOL ); + else + evt = TOOL_EVENT( TC_KEYBOARD, TA_KEY_DOWN, key | mods ); } } From 1ef68d73e56f0e18608c7c9a200fa0ab9aba4caa Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 3 Apr 2014 10:24:27 +0200 Subject: [PATCH 250/741] Fixed missing transitions for EDIT_TOOLs. --- pcbnew/tools/edit_tool.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 445e7abdd7..1c84cc10c5 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -266,7 +266,11 @@ int EDIT_TOOL::Rotate( TOOL_EVENT& aEvent ) bool unselect = selection.Empty(); if( !makeSelection( selection ) ) + { + setTransitions(); + return 0; + } wxPoint rotatePoint = getModificationPoint( selection ); @@ -312,7 +316,11 @@ int EDIT_TOOL::Flip( TOOL_EVENT& aEvent ) bool unselect = selection.Empty(); if( !makeSelection( selection ) ) + { + setTransitions(); + return 0; + } wxPoint flipPoint = getModificationPoint( selection ); @@ -354,7 +362,11 @@ int EDIT_TOOL::Remove( TOOL_EVENT& aEvent ) const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); if( !makeSelection( selection ) ) + { + setTransitions(); + return 0; + } // Get a copy of the selected items set PICKED_ITEMS_LIST selectedItems = selection.items; From a01a7b911c54607510c52f9bdbe0c2c27a66d9bb Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 3 Apr 2014 06:54:08 -0400 Subject: [PATCH 251/741] Fix Clang build error when OpenMP is not found. --- pcbnew/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 5c1583d711..afbdb0e323 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -536,8 +536,12 @@ if( USE_KIWAY_DLLS ) OUTPUT_NAME pcbnew PREFIX ${KIFACE_PREFIX} SUFFIX ${KIFACE_SUFFIX} - COMPILE_FLAGS ${OpenMP_CXX_FLAGS} ) + if( ${OPENMP_FOUND} ) + set_target_properties( pcbnew_kiface PROPERTIES + COMPILE_FLAGS ${OpenMP_CXX_FLAGS} + ) + endif() target_link_libraries( pcbnew_kiface 3d-viewer pcbcommon From 229613ef262e60b8badfaea8fdb0adafc58af086 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 3 Apr 2014 13:55:02 +0200 Subject: [PATCH 252/741] Cmakefiles: do not create map file on Windows, because creating map file generates hundred of useless wranings. In PATCH_COMMAND, use patch instead of bzr patch if patch or patch.exe is found (mandatory to use msys2 because bzr patch does not work when using msys2) --- CMakeModules/download_boost.cmake | 24 +++++++++++++++++------- CMakeModules/download_openssl.cmake | 12 ++++++++++-- cvpcb/CMakeLists.txt | 9 +++++++-- eeschema/CMakeLists.txt | 8 +++++++- gerbview/CMakeLists.txt | 8 +++++++- pagelayout_editor/CMakeLists.txt | 8 +++++++- pcbnew/CMakeLists.txt | 10 +++++++++- 7 files changed, 64 insertions(+), 15 deletions(-) diff --git a/CMakeModules/download_boost.cmake b/CMakeModules/download_boost.cmake index e929a2aae5..601738413c 100644 --- a/CMakeModules/download_boost.cmake +++ b/CMakeModules/download_boost.cmake @@ -101,6 +101,16 @@ else() endif() +find_program(patch_bin NAMES patch patch.exe) + +if( "${patch_bin}" STREQUAL "patch_bin-NOTFOUND" ) + set( PATCH_STR_CMD ${PATCH_STR_CMD} ) +else() + set( PATCH_STR_CMD ${patch_bin} -p0 -i ) +endif() + + + if( MINGW AND NOT CMAKE_HOST_UNIX ) # building for MINGW on windows not UNIX if( MSYS ) # The Boost system does not build properly on MSYS using bootstrap.sh. Running @@ -197,25 +207,25 @@ ExternalProject_Add( boost # bzr revert is insufficient to remove "added" files: COMMAND bzr clean-tree -q --force - COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/boost_minkowski.patch" - COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/boost_cstdint.patch" + COMMAND ${PATCH_STR_CMD} "${PROJECT_SOURCE_DIR}/patches/boost_minkowski.patch" + COMMAND ${PATCH_STR_CMD} "${PROJECT_SOURCE_DIR}/patches/boost_cstdint.patch" - COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/boost_macosx_x86.patch" #https://svn.boost.org/trac/boost/ticket/8266 + COMMAND ${PATCH_STR_CMD} "${PROJECT_SOURCE_DIR}/patches/boost_macosx_x86.patch" #https://svn.boost.org/trac/boost/ticket/8266 # tell bzr about "added" files by last patch: COMMAND bzr add libs/context/src/asm/jump_i386_x86_64_sysv_macho_gas.S COMMAND bzr add libs/context/src/asm/make_i386_x86_64_sysv_macho_gas.S - COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/boost_macosx_x86_build.patch" #https://svn.boost.org/trac/boost/ticket/8266 - COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/boost_macosx_older_openssl.patch" #https://svn.boost.org/trac/boost/ticket/9273 + COMMAND ${PATCH_STR_CMD} "${PROJECT_SOURCE_DIR}/patches/boost_macosx_x86_build.patch" #https://svn.boost.org/trac/boost/ticket/8266 + COMMAND ${PATCH_STR_CMD} "${PROJECT_SOURCE_DIR}/patches/boost_macosx_older_openssl.patch" #https://svn.boost.org/trac/boost/ticket/9273 - COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/boost_mingw.patch" #https://svn.boost.org/trac/boost/ticket/7262 + COMMAND ${PATCH_STR_CMD} "${PROJECT_SOURCE_DIR}/patches/boost_mingw.patch" #https://svn.boost.org/trac/boost/ticket/7262 # tell bzr about "added" files by last patch: COMMAND bzr add libs/context/src/asm/make_i386_ms_pe_gas.S COMMAND bzr add libs/context/src/asm/jump_i386_ms_pe_gas.S COMMAND bzr add libs/context/src/asm/make_x86_64_ms_pe_gas.S COMMAND bzr add libs/context/src/asm/jump_x86_64_ms_pe_gas.S - COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/patch_macosx_context_ppc_v2.patch" #https://svn.boost.org/trac/boost/ticket/8266 + COMMAND ${PATCH_STR_CMD} "${PROJECT_SOURCE_DIR}/patches/patch_macosx_context_ppc_v2.patch" #https://svn.boost.org/trac/boost/ticket/8266 COMMAND bzr add libs/context/build/Jamfile.v2 COMMAND bzr add libs/context/build/architecture.jam COMMAND bzr add libs/context/src/asm/jump_combined_sysv_macho_gas.S diff --git a/CMakeModules/download_openssl.cmake b/CMakeModules/download_openssl.cmake index b810cfb63e..6ab8fc70d7 100644 --- a/CMakeModules/download_openssl.cmake +++ b/CMakeModules/download_openssl.cmake @@ -42,6 +42,14 @@ if( CMAKE_TOOLCHAIN_FILE ) set( TOOLCHAIN "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}" ) endif() +FIND_PROGRAM (patch_bin NAMES patch.exe patch) + +if( "${patch_bin}" STREQUAL "patch_bin-NOTFOUND" ) + set( PATCH_STR_CMD bzr patch -p0 ) +else() + set( PATCH_STR_CMD ${patch_bin} -p0 -i ) +endif() + ExternalProject_Add( openssl DOWNLOAD_DIR ${DOWNLOAD_DIR} @@ -58,13 +66,13 @@ ExternalProject_Add( # PATCH_COMMAND patch -p0 < ${PROJECT_SOURCE_DIR}/patches/openssl-1.0.1e.patch # This one requires the bzr commit below, since bzr patch only knows a working tree. - + # Revert the branch to pristine before applying patch sets as bzr patch # fails when applying a patch to the branch twice and doesn't have a switch # to ignore previously applied patches PATCH_COMMAND bzr revert # PATCH_COMMAND continuation (any *_COMMAND here can be continued with COMMAND): - COMMAND bzr patch -p0 ${PROJECT_SOURCE_DIR}/patches/openssl-1.0.1e.patch + COMMAND ${PATCH_STR_CMD} ${PROJECT_SOURCE_DIR}/patches/openssl-1.0.1e.patch CONFIGURE_COMMAND ${CMAKE_COMMAND} diff --git a/cvpcb/CMakeLists.txt b/cvpcb/CMakeLists.txt index 47a5c3c111..2e89204780 100644 --- a/cvpcb/CMakeLists.txt +++ b/cvpcb/CMakeLists.txt @@ -1,5 +1,10 @@ - -set( MAKE_LINK_MAPS true ) +# the map generation creates on Windows/gcc a lot of useless warnings +# so disable it on windows +if( WIN32 AND NOT CMAKE_CROSSCOMPILING ) + set( MAKE_LINK_MAPS false ) +else() + set( MAKE_LINK_MAPS true ) +endif() add_definitions( -DCVPCB ) diff --git a/eeschema/CMakeLists.txt b/eeschema/CMakeLists.txt index bd04eebb7d..87b71aa5f5 100644 --- a/eeschema/CMakeLists.txt +++ b/eeschema/CMakeLists.txt @@ -1,4 +1,10 @@ -set( MAKE_LINK_MAPS true ) +# the map generation creates on Windows/gcc a lot of useless warnings +# so disable it on windows +if( WIN32 AND NOT CMAKE_CROSSCOMPILING ) + set( MAKE_LINK_MAPS false ) +else() + set( MAKE_LINK_MAPS true ) +endif() add_definitions( -DEESCHEMA ) diff --git a/gerbview/CMakeLists.txt b/gerbview/CMakeLists.txt index 685c826a1d..df67987d6f 100644 --- a/gerbview/CMakeLists.txt +++ b/gerbview/CMakeLists.txt @@ -1,4 +1,10 @@ -set( MAKE_LINK_MAPS true ) +# the map generation creates on Windows/gcc a lot of useless warnings +# so disable it on windows +if( WIN32 AND NOT CMAKE_CROSSCOMPILING ) + set( MAKE_LINK_MAPS false ) +else() + set( MAKE_LINK_MAPS true ) +endif() add_definitions(-DGERBVIEW) diff --git a/pagelayout_editor/CMakeLists.txt b/pagelayout_editor/CMakeLists.txt index 95ce1af27f..308bd94949 100644 --- a/pagelayout_editor/CMakeLists.txt +++ b/pagelayout_editor/CMakeLists.txt @@ -1,4 +1,10 @@ -set( MAKE_LINK_MAPS true ) +# the map generation creates on Windows/gcc a lot of useless warnings +# so disable it on windows +if( WIN32 AND NOT CMAKE_CROSSCOMPILING ) + set( MAKE_LINK_MAPS false ) +else() + set( MAKE_LINK_MAPS true ) +endif() add_definitions(-DPL_EDITOR) diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index afbdb0e323..d16eb9f04f 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -1,4 +1,10 @@ -set( MAKE_LINK_MAPS true ) +# the map generation creates on Windows/gcc a lot of useless warnings +# so disable it on windows +if( WIN32 AND NOT CMAKE_CROSSCOMPILING ) + set( MAKE_LINK_MAPS false ) +else() + set( MAKE_LINK_MAPS true ) +endif() add_definitions( -DPCBNEW ) add_subdirectory(router) @@ -530,6 +536,7 @@ if( USE_KIWAY_DLLS ) ${PCBNEW_SCRIPTING_SRCS} # ${PCBNEW_RESOURCES} ) + set_target_properties( pcbnew_kiface PROPERTIES # Decorate OUTPUT_NAME with PREFIX and SUFFIX, creating something like # _pcbnew.so, _pcbnew.dll, or _pcbnew.kiface @@ -542,6 +549,7 @@ if( USE_KIWAY_DLLS ) COMPILE_FLAGS ${OpenMP_CXX_FLAGS} ) endif() + target_link_libraries( pcbnew_kiface 3d-viewer pcbcommon From bad6cdaa06fe4962bf1a77cf6b9fa9df827e0c7f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 4 Apr 2014 09:01:17 +0200 Subject: [PATCH 253/741] TEXTE_MODULE relative position is updated when absolute position is changed (and viceversa). --- pcbnew/class_text_mod.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pcbnew/class_text_mod.h b/pcbnew/class_text_mod.h index 97e15ab202..5917759cd0 100644 --- a/pcbnew/class_text_mod.h +++ b/pcbnew/class_text_mod.h @@ -87,11 +87,13 @@ public: virtual void SetPosition( const wxPoint& aPos ) { m_Pos = aPos; + SetLocalCoord(); } void Move( const wxPoint& aMoveVector ) { m_Pos += aMoveVector; + SetLocalCoord(); } void Rotate( const wxPoint& aRotCentre, double aAngle ); @@ -110,7 +112,7 @@ public: void SetVisible( bool isVisible ) { m_NoShow = !isVisible; } bool IsVisible() const { return !m_NoShow; } - void SetPos0( const wxPoint& aPos ) { m_Pos0 = aPos; } + void SetPos0( const wxPoint& aPos ) { m_Pos0 = aPos; SetDrawCoord(); } const wxPoint& GetPos0() const { return m_Pos0; } void Copy( TEXTE_MODULE* source ); // copy structure From 4c5afc46afedc15366ffa5d62a021eb4fea38145 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 4 Apr 2014 11:50:15 +0200 Subject: [PATCH 254/741] Added possibility of switching tools by the right toolbar buttons, without deactivating the current tool first (previously tools did not switch if there was one active). --- include/tool/tool_manager.h | 20 ++++ pcbnew/basepcbframe.cpp | 4 +- pcbnew/edit.cpp | 211 ++++++++++++++++++---------------- pcbnew/router/router_tool.cpp | 3 +- pcbnew/tools/drawing_tool.cpp | 14 +++ pcbnew/tools/pcb_tools.cpp | 2 +- 6 files changed, 152 insertions(+), 102 deletions(-) diff --git a/include/tool/tool_manager.h b/include/tool/tool_manager.h index 1103a7f890..7689a9a3c8 100644 --- a/include/tool/tool_manager.h +++ b/include/tool/tool_manager.h @@ -186,6 +186,26 @@ public: return m_editFrame; } + /** + * Returns id of the tool that is on the top of the active tools stack + * (was invoked the most recently). + * @return Id of the currently used tool. + */ + int GetCurrentToolId() const + { + return m_activeTools.front(); + } + + /** + * Returns the tool that is on the top of the active tools stack + * (was invoked the most recently). + * @return Pointer to the currently used tool. + */ + TOOL_BASE* GetCurrentTool() const + { + return FindTool( GetCurrentToolId() ); + } + /** * Defines a state transition - the events that cause a given handler method in the tool * to be called. Called by TOOL_INTERACTIVE::Go(). May be called from a coroutine context. diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 0e93394930..76c31e62a6 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -633,7 +633,7 @@ void PCB_BASE_FRAME::SetToolID( int aId, int aCursor, const wxString& aToolMsg ) // handle color changes for transitions in and out of ID_TRACK_BUTT if( ( GetToolId() == ID_TRACK_BUTT && aId != ID_TRACK_BUTT ) - || ( GetToolId() != ID_TRACK_BUTT && aId== ID_TRACK_BUTT ) ) + || ( GetToolId() != ID_TRACK_BUTT && aId == ID_TRACK_BUTT ) ) { if( DisplayOpt.ContrastModeDisplay ) redraw = true; @@ -641,7 +641,7 @@ void PCB_BASE_FRAME::SetToolID( int aId, int aCursor, const wxString& aToolMsg ) // must do this after the tool has been set, otherwise pad::Draw() does // not show proper color when DisplayOpt.ContrastModeDisplay is true. - if( redraw && m_canvas) + if( redraw && m_canvas ) m_canvas->Refresh(); } diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index eff1aa15b5..0fbe391318 100644 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -1370,109 +1370,124 @@ void PCB_EDIT_FRAME::OnSelectTool( wxCommandEvent& aEvent ) if( GetToolId() == id ) return; - INSTALL_UNBUFFERED_DC( dc, m_canvas ); - - // Stop the current command and deselect the current tool. - m_canvas->EndMouseCapture( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor() ); - - switch( id ) - { - case ID_NO_TOOL_SELECTED: - SetToolID( id, m_canvas->GetDefaultCursor(), wxEmptyString ); - break; - - case ID_TRACK_BUTT: - if( g_Drc_On ) - SetToolID( id, wxCURSOR_PENCIL, _( "Add tracks" ) ); - else - SetToolID( id, wxCURSOR_QUESTION_ARROW, _( "Add tracks" ) ); - - if( (GetBoard()->m_Status_Pcb & LISTE_RATSNEST_ITEM_OK) == 0 ) - { - Compile_Ratsnest( &dc, true ); - } - - break; - - case ID_PCB_MODULE_BUTT: - SetToolID( id, wxCURSOR_PENCIL, _( "Add module" ) ); - break; - - case ID_PCB_ZONES_BUTT: - SetToolID( id, wxCURSOR_PENCIL, _( "Add zones" ) ); - - if( DisplayOpt.DisplayZonesMode != 0 ) - DisplayInfoMessage( this, _( "Warning: zone display is OFF!!!" ) ); - - if( !GetBoard()->IsHighLightNetON() && (GetBoard()->GetHighLightNetCode() > 0 ) ) - HighLight( &dc ); - - break; - - case ID_PCB_KEEPOUT_AREA_BUTT: - SetToolID( id, wxCURSOR_PENCIL, _( "Add keepout" ) ); - break; - - case ID_PCB_MIRE_BUTT: - SetToolID( id, wxCURSOR_PENCIL, _( "Add layer alignment target" ) ); - break; - - case ID_PCB_PLACE_OFFSET_COORD_BUTT: - SetToolID( id, wxCURSOR_PENCIL, _( "Adjust zero" ) ); - break; - - case ID_PCB_PLACE_GRID_COORD_BUTT: - SetToolID( id, wxCURSOR_PENCIL, _( "Adjust grid origin" ) ); - break; - - case ID_PCB_ADD_LINE_BUTT: - SetToolID( id, wxCURSOR_PENCIL, _( "Add graphic line" ) ); - break; - - case ID_PCB_ARC_BUTT: - SetToolID( id, wxCURSOR_PENCIL, _( "Add graphic arc" ) ); - break; - - case ID_PCB_CIRCLE_BUTT: - SetToolID( id, wxCURSOR_PENCIL, _( "Add graphic circle" ) ); - break; - - case ID_PCB_ADD_TEXT_BUTT: - SetToolID( id, wxCURSOR_PENCIL, _( "Add text" ) ); - break; - - case ID_COMPONENT_BUTT: - SetToolID( id, wxCURSOR_HAND, _( "Add module" ) ); - break; - - case ID_PCB_DIMENSION_BUTT: - SetToolID( id, wxCURSOR_PENCIL, _( "Add dimension" ) ); - break; - - case ID_PCB_DELETE_ITEM_BUTT: - SetToolID( id, wxCURSOR_BULLSEYE, _( "Delete item" ) ); - break; - - case ID_PCB_HIGHLIGHT_BUTT: - SetToolID( id, wxCURSOR_HAND, _( "Highlight net" ) ); - break; - - case ID_PCB_SHOW_1_RATSNEST_BUTT: - SetToolID( id, wxCURSOR_HAND, _( "Select rats nest" ) ); - - if( ( GetBoard()->m_Status_Pcb & LISTE_RATSNEST_ITEM_OK ) == 0 ) - Compile_Ratsnest( &dc, true ); - - break; - } - if( IsGalCanvasActive() ) { std::string actionName = COMMON_ACTIONS::TranslateLegacyId( id ); if( !actionName.empty() ) - m_toolManager.RunAction( actionName ); + { + const int MAX_TRIALS = 10; + int trials = 0; - return; + // Cancel the current tool + // TODO while sending a lot of cancel events works for sure, it is not the most + // elegant way to cancel a tool, this should be probably done another way + while( m_toolManager.GetCurrentTool()->GetName() != "pcbnew.InteractiveSelection" && + trials++ < MAX_TRIALS ) + { + TOOL_EVENT cancel( TC_ANY, TA_CANCEL_TOOL ); + m_toolManager.ProcessEvent( cancel ); + } + + m_toolManager.RunAction( actionName ); + } + } + else + { + INSTALL_UNBUFFERED_DC( dc, m_canvas ); + + // Stop the current command and deselect the current tool. + m_canvas->EndMouseCapture( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor() ); + + switch( id ) + { + case ID_NO_TOOL_SELECTED: + SetToolID( id, m_canvas->GetDefaultCursor(), wxEmptyString ); + break; + + case ID_TRACK_BUTT: + if( g_Drc_On ) + SetToolID( id, wxCURSOR_PENCIL, _( "Add tracks" ) ); + else + SetToolID( id, wxCURSOR_QUESTION_ARROW, _( "Add tracks" ) ); + + if( (GetBoard()->m_Status_Pcb & LISTE_RATSNEST_ITEM_OK) == 0 ) + { + Compile_Ratsnest( &dc, true ); + } + + break; + + case ID_PCB_MODULE_BUTT: + SetToolID( id, wxCURSOR_PENCIL, _( "Add module" ) ); + break; + + case ID_PCB_ZONES_BUTT: + SetToolID( id, wxCURSOR_PENCIL, _( "Add zones" ) ); + + if( DisplayOpt.DisplayZonesMode != 0 ) + DisplayInfoMessage( this, _( "Warning: zone display is OFF!!!" ) ); + + if( !GetBoard()->IsHighLightNetON() && (GetBoard()->GetHighLightNetCode() > 0 ) ) + HighLight( &dc ); + + break; + + case ID_PCB_KEEPOUT_AREA_BUTT: + SetToolID( id, wxCURSOR_PENCIL, _( "Add keepout" ) ); + break; + + case ID_PCB_MIRE_BUTT: + SetToolID( id, wxCURSOR_PENCIL, _( "Add layer alignment target" ) ); + break; + + case ID_PCB_PLACE_OFFSET_COORD_BUTT: + SetToolID( id, wxCURSOR_PENCIL, _( "Adjust zero" ) ); + break; + + case ID_PCB_PLACE_GRID_COORD_BUTT: + SetToolID( id, wxCURSOR_PENCIL, _( "Adjust grid origin" ) ); + break; + + case ID_PCB_ADD_LINE_BUTT: + SetToolID( id, wxCURSOR_PENCIL, _( "Add graphic line" ) ); + break; + + case ID_PCB_ARC_BUTT: + SetToolID( id, wxCURSOR_PENCIL, _( "Add graphic arc" ) ); + break; + + case ID_PCB_CIRCLE_BUTT: + SetToolID( id, wxCURSOR_PENCIL, _( "Add graphic circle" ) ); + break; + + case ID_PCB_ADD_TEXT_BUTT: + SetToolID( id, wxCURSOR_PENCIL, _( "Add text" ) ); + break; + + case ID_COMPONENT_BUTT: + SetToolID( id, wxCURSOR_HAND, _( "Add module" ) ); + break; + + case ID_PCB_DIMENSION_BUTT: + SetToolID( id, wxCURSOR_PENCIL, _( "Add dimension" ) ); + break; + + case ID_PCB_DELETE_ITEM_BUTT: + SetToolID( id, wxCURSOR_BULLSEYE, _( "Delete item" ) ); + break; + + case ID_PCB_HIGHLIGHT_BUTT: + SetToolID( id, wxCURSOR_HAND, _( "Highlight net" ) ); + break; + + case ID_PCB_SHOW_1_RATSNEST_BUTT: + SetToolID( id, wxCURSOR_HAND, _( "Select rats nest" ) ); + + if( ( GetBoard()->m_Status_Pcb & LISTE_RATSNEST_ITEM_OK ) == 0 ) + Compile_Ratsnest( &dc, true ); + + break; + } } } diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index 88e797b92b..2608b2d21e 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -27,6 +27,7 @@ #include #include +#include #include #include #include @@ -432,6 +433,7 @@ int ROUTER_TOOL::Main( TOOL_EVENT& aEvent ) // SetContextMenu ( m_menu ); // setMsgPanel(true, 0, wxT("KiRouter"), wxT("Pick an item to start routing")); + getEditFrame()->SetToolID( ID_TRACK_BUTT, wxCURSOR_PENCIL, _( "Add tracks" ) ); ctls->SetSnapping( true ); ctls->ShowCursor( true ); @@ -469,4 +471,3 @@ int ROUTER_TOOL::Main( TOOL_EVENT& aEvent ) return 0; } - diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index b0155f0f1f..1d85ec6906 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -28,6 +28,7 @@ #include #include +#include #include #include @@ -69,12 +70,16 @@ void DRAWING_TOOL::Reset( RESET_REASON aReason ) int DRAWING_TOOL::DrawLine( TOOL_EVENT& aEvent ) { + m_frame->SetToolID( ID_PCB_ADD_LINE_BUTT, wxCURSOR_PENCIL, _( "Add graphic line" ) ); + return drawSegment( S_SEGMENT, true ); } int DRAWING_TOOL::DrawCircle( TOOL_EVENT& aEvent ) { + m_frame->SetToolID( ID_PCB_CIRCLE_BUTT, wxCURSOR_PENCIL, _( "Add graphic circle" ) ); + return drawSegment( S_CIRCLE, false ); } @@ -100,6 +105,7 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) m_controls->SetSnapping( true ); Activate(); + m_frame->SetToolID( ID_PCB_ARC_BUTT, wxCURSOR_PENCIL, _( "Add graphic arc" ) ); enum ARC_STEPS { @@ -286,6 +292,7 @@ int DRAWING_TOOL::PlaceText( TOOL_EVENT& aEvent ) m_controls->SetAutoPan( true ); Activate(); + m_frame->SetToolID( ID_PCB_ADD_TEXT_BUTT, wxCURSOR_PENCIL, _( "Add text" ) ); // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) @@ -390,6 +397,7 @@ int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent ) m_controls->SetSnapping( true ); Activate(); + m_frame->SetToolID( ID_PCB_DIMENSION_BUTT, wxCURSOR_PENCIL, _( "Add dimension" ) ); enum DIMENSION_STEPS { @@ -549,12 +557,16 @@ int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent ) int DRAWING_TOOL::DrawZone( TOOL_EVENT& aEvent ) { + m_frame->SetToolID( ID_PCB_ZONES_BUTT, wxCURSOR_PENCIL, _( "Add zones" ) ); + return drawZone( false ); } int DRAWING_TOOL::DrawKeepout( TOOL_EVENT& aEvent ) { + m_frame->SetToolID( ID_PCB_KEEPOUT_AREA_BUTT, wxCURSOR_PENCIL, _( "Add keepout" ) ); + return drawZone( true ); } @@ -581,6 +593,7 @@ int DRAWING_TOOL::PlaceTarget( TOOL_EVENT& aEvent ) m_controls->SetAutoPan( true ); Activate(); + m_frame->SetToolID( ID_PCB_MIRE_BUTT, wxCURSOR_PENCIL, _( "Add layer alignment target" ) ); // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) @@ -656,6 +669,7 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent ) m_controls->SetAutoPan( true ); Activate(); + m_frame->SetToolID( ID_PCB_MODULE_BUTT, wxCURSOR_HAND, _( "Add module" ) ); // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) diff --git a/pcbnew/tools/pcb_tools.cpp b/pcbnew/tools/pcb_tools.cpp index 4d618615dc..154ea93d46 100644 --- a/pcbnew/tools/pcb_tools.cpp +++ b/pcbnew/tools/pcb_tools.cpp @@ -68,7 +68,7 @@ void PCB_EDIT_FRAME::setupTools() m_toolManager.RegisterTool( new PCBNEW_CONTROL ); m_toolManager.SetEnvironment( NULL, GetGalCanvas()->GetView(), - GetGalCanvas()->GetViewControls(), this ); + GetGalCanvas()->GetViewControls(), this ); m_toolManager.ResetTools( TOOL_BASE::RUN ); // Run the selection tool, it is supposed to be always active From ba275918e3ea416fb7e04f07144ced4d1d34dc1c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 4 Apr 2014 11:56:04 +0200 Subject: [PATCH 255/741] Renamed [class_]drawpanel_gal.[cpp|h] to [class_]draw_panel_gal.[cpp|h] to follow current naming scheme. --- common/CMakeLists.txt | 2 +- common/draw_frame.cpp | 2 +- common/draw_panel.cpp | 2 +- common/{drawpanel_gal.cpp => draw_panel_gal.cpp} | 2 +- common/tool/tool_dispatcher.cpp | 2 +- common/tool/tool_manager.cpp | 2 +- common/zoom.cpp | 2 +- cvpcb/class_DisplayFootprintsFrame.cpp | 2 +- include/{class_drawpanel_gal.h => class_draw_panel_gal.h} | 2 +- pcbnew/basepcbframe.cpp | 2 +- pcbnew/board_undo_redo.cpp | 2 +- pcbnew/class_pcb_layer_widget.cpp | 2 +- pcbnew/dialogs/dialog_display_options.cpp | 2 +- pcbnew/dialogs/dialog_general_options.cpp | 2 +- pcbnew/drc.cpp | 2 +- pcbnew/initpcb.cpp | 2 +- pcbnew/pcbframe.cpp | 2 +- pcbnew/router/router_tool.cpp | 2 +- pcbnew/tools/pcb_tools.cpp | 2 +- pcbnew/tools/pcbnew_control.cpp | 2 +- pcbnew/tools/selection_tool.cpp | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) rename common/{drawpanel_gal.cpp => draw_panel_gal.cpp} (99%) rename include/{class_drawpanel_gal.h => class_draw_panel_gal.h} (99%) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index f6deda5e49..406e707cef 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -29,7 +29,7 @@ add_custom_target( set( GAL_SRCS # Common part - drawpanel_gal.cpp + draw_panel_gal.cpp painter.cpp worksheet_viewitem.cpp gal/graphics_abstraction_layer.cpp diff --git a/common/draw_frame.cpp b/common/draw_frame.cpp index 80230e245f..4b7f50fb81 100644 --- a/common/draw_frame.cpp +++ b/common/draw_frame.cpp @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/common/draw_panel.cpp b/common/draw_panel.cpp index 1e3adb750b..9861fbdd80 100644 --- a/common/draw_panel.cpp +++ b/common/draw_panel.cpp @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include diff --git a/common/drawpanel_gal.cpp b/common/draw_panel_gal.cpp similarity index 99% rename from common/drawpanel_gal.cpp rename to common/draw_panel_gal.cpp index 947e854fa6..67550dc3a8 100644 --- a/common/drawpanel_gal.cpp +++ b/common/draw_panel_gal.cpp @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include #include diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index f04dd2d69d..f89c7ee03f 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -31,7 +31,7 @@ #include #include -#include +#include #include #include diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 207ee71152..eff64f267d 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -44,7 +44,7 @@ #include #include -#include +#include using boost::optional; diff --git a/common/zoom.cpp b/common/zoom.cpp index b942a33f25..b7393cd54f 100644 --- a/common/zoom.cpp +++ b/common/zoom.cpp @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cvpcb/class_DisplayFootprintsFrame.cpp b/cvpcb/class_DisplayFootprintsFrame.cpp index f320465c8b..a43f6bdf99 100644 --- a/cvpcb/class_DisplayFootprintsFrame.cpp +++ b/cvpcb/class_DisplayFootprintsFrame.cpp @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/include/class_drawpanel_gal.h b/include/class_draw_panel_gal.h similarity index 99% rename from include/class_drawpanel_gal.h rename to include/class_draw_panel_gal.h index b7f92c2209..4ec05ed65d 100644 --- a/include/class_drawpanel_gal.h +++ b/include/class_draw_panel_gal.h @@ -23,7 +23,7 @@ */ /** - * @file class_drawpanel_gal.h: + * @file class_draw_panel_gal.h: * @brief EDA_DRAW_PANEL_GAL class definition. */ diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 76c31e62a6..12d783e143 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -51,7 +51,7 @@ #include #include -#include +#include #include #include #include diff --git a/pcbnew/board_undo_redo.cpp b/pcbnew/board_undo_redo.cpp index a720b0e48a..22878bfcfc 100644 --- a/pcbnew/board_undo_redo.cpp +++ b/pcbnew/board_undo_redo.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include diff --git a/pcbnew/class_pcb_layer_widget.cpp b/pcbnew/class_pcb_layer_widget.cpp index e9a8042775..41e346a2a0 100644 --- a/pcbnew/class_pcb_layer_widget.cpp +++ b/pcbnew/class_pcb_layer_widget.cpp @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include diff --git a/pcbnew/dialogs/dialog_display_options.cpp b/pcbnew/dialogs/dialog_display_options.cpp index 1e140d94d9..5ad1e752f4 100644 --- a/pcbnew/dialogs/dialog_display_options.cpp +++ b/pcbnew/dialogs/dialog_display_options.cpp @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include diff --git a/pcbnew/dialogs/dialog_general_options.cpp b/pcbnew/dialogs/dialog_general_options.cpp index af29d9796a..b506f56e2e 100644 --- a/pcbnew/dialogs/dialog_general_options.cpp +++ b/pcbnew/dialogs/dialog_general_options.cpp @@ -43,7 +43,7 @@ #include #include -#include +#include #include #include #include diff --git a/pcbnew/drc.cpp b/pcbnew/drc.cpp index 630475ac23..dc875e47fc 100644 --- a/pcbnew/drc.cpp +++ b/pcbnew/drc.cpp @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include diff --git a/pcbnew/initpcb.cpp b/pcbnew/initpcb.cpp index ee146c2177..dba920d780 100644 --- a/pcbnew/initpcb.cpp +++ b/pcbnew/initpcb.cpp @@ -4,7 +4,7 @@ #include #include -#include +#include #include #include #include diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index faf6e1645d..0a518104d3 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -74,7 +74,7 @@ #include #endif -#include +#include #include // Keys used in read/write config diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index 2608b2d21e..a2e98f71de 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -21,7 +21,7 @@ #include #include -#include "class_drawpanel_gal.h" +#include "class_draw_panel_gal.h" #include "class_board_item.h" #include "class_board.h" diff --git a/pcbnew/tools/pcb_tools.cpp b/pcbnew/tools/pcb_tools.cpp index 154ea93d46..0decc244d7 100644 --- a/pcbnew/tools/pcb_tools.cpp +++ b/pcbnew/tools/pcb_tools.cpp @@ -31,7 +31,7 @@ #include #include -#include +#include #include #include "selection_tool.h" diff --git a/pcbnew/tools/pcbnew_control.cpp b/pcbnew/tools/pcbnew_control.cpp index 0a04fc0f88..f01203178f 100644 --- a/pcbnew/tools/pcbnew_control.cpp +++ b/pcbnew/tools/pcbnew_control.cpp @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 8c3e79adbb..1b8f013a0b 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include #include From 024bf9dd847d96f15fa4844541be15f493559335 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 4 Apr 2014 12:01:30 +0200 Subject: [PATCH 256/741] Fixed GAL canvas freeze when ordered twice to change to the same GAL canvas (e.g. double F11). --- common/draw_panel_gal.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/draw_panel_gal.cpp b/common/draw_panel_gal.cpp index 67550dc3a8..a8c1dc0f67 100644 --- a/common/draw_panel_gal.cpp +++ b/common/draw_panel_gal.cpp @@ -194,14 +194,14 @@ void EDA_DRAW_PANEL_GAL::StopDrawing() void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType ) { - // Protect from refreshing during backend switch - m_pendingRefresh = true; - m_refreshTimer.Stop(); - // Do not do anything if the currently used GAL is correct if( aGalType == m_currentGal && m_gal != NULL ) return; + // Prevent refreshing canvas during backend switch + m_pendingRefresh = true; + m_refreshTimer.Stop(); + delete m_gal; switch( aGalType ) From 14687a45a7cf171bf2862b8f826ac21929f3dddf Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 4 Apr 2014 12:56:50 +0200 Subject: [PATCH 257/741] Fixed occasional crashes on undo/redo while dragging. --- pcbnew/tools/edit_tool.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 1c84cc10c5..5be7f25396 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -111,6 +111,12 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) break; // Finish } + else if( evt->Action() == TA_UNDO_REDO ) + { + unselect = true; + break; + } + // Dispatch TOOL_ACTIONs else if( evt->Category() == TC_COMMAND ) { From 8b8e8d8f7f492776d702a11b0306f530cb279921 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 4 Apr 2014 13:03:41 +0200 Subject: [PATCH 258/741] Fixed crashes related to ratsnest on canvas change. --- pcbnew/pcbframe.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 0a518104d3..697d4f9019 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -692,6 +692,7 @@ void PCB_EDIT_FRAME::SwitchCanvas( wxCommandEvent& aEvent ) switch( id ) { case ID_MENU_CANVAS_DEFAULT: + Compile_Ratsnest( NULL, true ); UseGalCanvas( false ); break; From 89da70fe94f34a6c76542e8c93ce7350a92a3ef7 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 4 Apr 2014 15:43:30 +0200 Subject: [PATCH 259/741] Edit->Global Deletions & Edit->Cleanup Tracks and Vias work in GAL, without toggling between canvases. --- pcbnew/clean.cpp | 53 ++++++++++++++++------- pcbnew/deltrack.cpp | 7 +++ pcbnew/dialogs/dialog_global_deletion.cpp | 52 +++++++++++++++++----- pcbnew/dialogs/dialog_global_deletion.h | 33 +++++++++++--- 4 files changed, 111 insertions(+), 34 deletions(-) diff --git a/pcbnew/clean.cpp b/pcbnew/clean.cpp index e90a496bf0..9acd8215f5 100644 --- a/pcbnew/clean.cpp +++ b/pcbnew/clean.cpp @@ -38,18 +38,19 @@ #include #include #include +#include // Helper class used to clean tracks and vias -class TRACKS_CLEANER: CONNECTIONS +class TRACKS_CLEANER : CONNECTIONS { private: - BOARD * m_Brd; + BOARD* m_Brd; bool m_deleteUnconnectedTracks; bool m_mergeSegments; bool m_cleanVias; public: - TRACKS_CLEANER( BOARD * aPcb ); + TRACKS_CLEANER( BOARD* aPcb ); /** * the cleanup function. @@ -102,8 +103,7 @@ private: * merge aTrackRef and aCandidate, when possible, * i.e. when they are colinear, same width, and obviously same layer */ - TRACK* mergeCollinearSegmentIfPossible( TRACK* aTrackRef, - TRACK* aCandidate, int aEndType ); + TRACK* mergeCollinearSegmentIfPossible( TRACK* aTrackRef, TRACK* aCandidate, int aEndType ); }; /* Install the cleanup dialog frame to know what should be cleaned @@ -161,7 +161,7 @@ bool TRACKS_CLEANER::CleanupBoard() return modified; } -TRACKS_CLEANER::TRACKS_CLEANER( BOARD * aPcb ): CONNECTIONS( aPcb ) +TRACKS_CLEANER::TRACKS_CLEANER( BOARD* aPcb ) : CONNECTIONS( aPcb ) { m_Brd = aPcb; m_deleteUnconnectedTracks = false; @@ -177,22 +177,22 @@ void TRACKS_CLEANER::buildTrackConnectionInfo() BuildTracksCandidatesList( m_Brd->m_Track, NULL); // clear flags and variables used in cleanup - for( TRACK * track = m_Brd->m_Track; track; track = track->Next() ) + for( TRACK* track = m_Brd->m_Track; track; track = track->Next() ) { track->start = NULL; track->end = NULL; track->m_PadsConnected.clear(); - track->SetState( START_ON_PAD|END_ON_PAD|BUSY, false ); + track->SetState( START_ON_PAD | END_ON_PAD | BUSY, false ); } // Build connections info tracks to pads SearchTracksConnectedToPads(); - for( TRACK * track = m_Brd->m_Track; track; track = track->Next() ) + for( TRACK* track = m_Brd->m_Track; track; track = track->Next() ) { // Mark track if connected to pads for( unsigned jj = 0; jj < track->m_PadsConnected.size(); jj++ ) { - D_PAD * pad = track->m_PadsConnected[jj]; + D_PAD* pad = track->m_PadsConnected[jj]; if( pad->HitTest( track->GetStart() ) ) { @@ -240,6 +240,8 @@ bool TRACKS_CLEANER::clean_vias() continue; // delete via + m_Brd->GetRatsnest()->Remove( alt_track ); + alt_track->ViewRelease(); alt_track->UnLink(); delete alt_track; modified = true; @@ -258,11 +260,13 @@ bool TRACKS_CLEANER::clean_vias() // if one pad through is found, the via can be removed for( unsigned ii = 0; ii < track->m_PadsConnected.size(); ii++ ) { - D_PAD * pad = track->m_PadsConnected[ii]; + D_PAD* pad = track->m_PadsConnected[ii]; - if( (pad->GetLayerMask() & ALL_CU_LAYERS) == ALL_CU_LAYERS ) + if( ( pad->GetLayerMask() & ALL_CU_LAYERS ) == ALL_CU_LAYERS ) { // redundant: via delete it + m_Brd->GetRatsnest()->Remove( track ); + track->ViewRelease(); track->UnLink(); delete track; modified = true; @@ -291,7 +295,8 @@ bool TRACKS_CLEANER::deleteUnconnectedTracks() { item_erased = false; TRACK* next_track; - for( TRACK * track = m_Brd->m_Track; track ; track = next_track ) + + for( TRACK* track = m_Brd->m_Track; track ; track = next_track ) { next_track = track->Next(); @@ -312,7 +317,7 @@ bool TRACKS_CLEANER::deleteUnconnectedTracks() LAYER_NUM top_layer, bottom_layer; ZONE_CONTAINER* zone; - if( (type_end & START_ON_PAD ) == 0 ) + if( ( type_end & START_ON_PAD ) == 0 ) { TRACK* other = track->GetTrace( m_Brd->m_Track, NULL, FLG_START ); @@ -334,7 +339,7 @@ bool TRACKS_CLEANER::deleteUnconnectedTracks() } } - if( (other == NULL) && (zone == NULL) ) + if( ( other == NULL ) && ( zone == NULL ) ) { flag_erase |= 1; } @@ -422,7 +427,7 @@ bool TRACKS_CLEANER::deleteUnconnectedTracks() via->GetNetCode() ); } - if( (other == NULL) && (zone == NULL) ) + if( ( other == NULL ) && ( zone == NULL ) ) flag_erase |= 0x20; track->SetState( BUSY, false ); @@ -433,6 +438,8 @@ bool TRACKS_CLEANER::deleteUnconnectedTracks() if( flag_erase ) { // remove segment from board + m_Brd->GetRatsnest()->Remove( track ); + track->ViewRelease(); track->DeleteStructure(); // iterate, because a track connected to the deleted track // is now perhaps now not connected and should be deleted @@ -461,7 +468,11 @@ bool TRACKS_CLEANER::clean_segments() nextsegment = segment->Next(); if( segment->IsNull() ) // Length segment = 0; delete it + { + m_Brd->GetRatsnest()->Remove( segment ); + segment->ViewRelease(); segment->DeleteStructure(); + } } // Delete redundant segments, i.e. segments having the same end points @@ -493,6 +504,8 @@ bool TRACKS_CLEANER::clean_segments() // Delete redundant point if( erase ) { + m_Brd->GetRatsnest()->Remove( other ); + other->ViewRelease(); other->DeleteStructure(); modified = true; } @@ -548,6 +561,8 @@ bool TRACKS_CLEANER::clean_segments() if( segDelete ) { no_inc = 1; + m_Brd->GetRatsnest()->Remove( segDelete ); + segDelete->ViewRelease(); segDelete->DeleteStructure(); modified = true; } @@ -589,6 +604,8 @@ bool TRACKS_CLEANER::clean_segments() if( segDelete ) { no_inc = 1; + m_Brd->GetRatsnest()->Remove( segDelete ); + segDelete->ViewRelease(); segDelete->DeleteStructure(); modified = true; } @@ -688,6 +705,7 @@ TRACK* TRACKS_CLEANER::mergeCollinearSegmentIfPossible( TRACK* aTrackRef, TRACK* aTrackRef->SetStart( aCandidate->GetEnd()); aTrackRef->start = aCandidate->end; aTrackRef->SetState( START_ON_PAD, aCandidate->GetState( END_ON_PAD) ); + aTrackRef->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); return aCandidate; } else @@ -695,6 +713,7 @@ TRACK* TRACKS_CLEANER::mergeCollinearSegmentIfPossible( TRACK* aTrackRef, TRACK* aTrackRef->SetStart( aCandidate->GetStart() ); aTrackRef->start = aCandidate->start; aTrackRef->SetState( START_ON_PAD, aCandidate->GetState( START_ON_PAD) ); + aTrackRef->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); return aCandidate; } } @@ -711,6 +730,7 @@ TRACK* TRACKS_CLEANER::mergeCollinearSegmentIfPossible( TRACK* aTrackRef, TRACK* aTrackRef->SetEnd( aCandidate->GetEnd() ); aTrackRef->end = aCandidate->end; aTrackRef->SetState( END_ON_PAD, aCandidate->GetState( END_ON_PAD) ); + aTrackRef->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); return aCandidate; } else @@ -718,6 +738,7 @@ TRACK* TRACKS_CLEANER::mergeCollinearSegmentIfPossible( TRACK* aTrackRef, TRACK* aTrackRef->SetEnd( aCandidate->GetStart() ); aTrackRef->end = aCandidate->start; aTrackRef->SetState( END_ON_PAD, aCandidate->GetState( START_ON_PAD) ); + aTrackRef->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); return aCandidate; } } diff --git a/pcbnew/deltrack.cpp b/pcbnew/deltrack.cpp index a4012d76fc..42c98cd605 100644 --- a/pcbnew/deltrack.cpp +++ b/pcbnew/deltrack.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -124,6 +125,8 @@ TRACK* PCB_EDIT_FRAME::Delete_Segment( wxDC* DC, TRACK* aTrack ) DLIST* container = (DLIST*)aTrack->GetList(); wxASSERT( container ); + GetBoard()->GetRatsnest()->Remove( aTrack ); + aTrack->ViewRelease(); container->Remove( aTrack ); // redraw the area where the track was @@ -174,6 +177,8 @@ void PCB_EDIT_FRAME::Delete_net( wxDC* DC, TRACK* aTrack ) if( segm->GetNetCode() != net_code_delete ) break; + GetBoard()->GetRatsnest()->Remove( segm ); + segm->ViewRelease(); GetBoard()->m_Track.Remove( segm ); // redraw the area where the track was @@ -219,6 +224,8 @@ void PCB_EDIT_FRAME::Remove_One_Track( wxDC* DC, TRACK* pt_segm ) << TO_UTF8( TRACK::ShowState( tracksegment->GetStatus() ) ) \ << std::endl; ) + GetBoard()->GetRatsnest()->Remove( tracksegment ); + tracksegment->ViewRelease(); GetBoard()->m_Track.Remove( tracksegment ); // redraw the area where the track was diff --git a/pcbnew/dialogs/dialog_global_deletion.cpp b/pcbnew/dialogs/dialog_global_deletion.cpp index 99ff3f3e92..318da30d64 100644 --- a/pcbnew/dialogs/dialog_global_deletion.cpp +++ b/pcbnew/dialogs/dialog_global_deletion.cpp @@ -1,7 +1,27 @@ -/** - * @file dialog_global_deletion.cpp +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 1992-2014 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 #include #include @@ -9,6 +29,7 @@ #include #include #include +#include #include #include @@ -80,14 +101,15 @@ void DIALOG_GLOBAL_DELETION::AcceptPcbDelete( ) } else { - if( !IsOK( this, _( "Are you sure you want to delete the selected items?" ) ) ) return; BOARD* pcb = m_Parent->GetBoard(); PICKED_ITEMS_LIST pickersList; ITEM_PICKER itemPicker( NULL, UR_DELETED ); - BOARD_ITEM* item, * nextitem; + BOARD_ITEM* item; + BOARD_ITEM* nextitem; + RN_DATA* ratsnest = pcb->GetRatsnest(); LAYER_MSK layers_filter = ALL_LAYERS; @@ -101,12 +123,13 @@ void DIALOG_GLOBAL_DELETION::AcceptPcbDelete( ) while( item != NULL ) { - if( GetLayerMask( item->GetLayer() ) & layers_filter ) { itemPicker.SetItem( item ); pickersList.PushItem( itemPicker ); pcb->Remove( item ); + item->ViewRelease(); + ratsnest->Remove( item ); gen_rastnest = true; } else @@ -138,6 +161,7 @@ void DIALOG_GLOBAL_DELETION::AcceptPcbDelete( ) { itemPicker.SetItem( item ); pickersList.PushItem( itemPicker ); + item->ViewRelease(); item->UnLink(); } } @@ -155,6 +179,7 @@ void DIALOG_GLOBAL_DELETION::AcceptPcbDelete( ) { itemPicker.SetItem( item ); pickersList.PushItem( itemPicker ); + item->ViewRelease(); item->UnLink(); } } @@ -162,7 +187,6 @@ void DIALOG_GLOBAL_DELETION::AcceptPcbDelete( ) if( m_DelModules->GetValue() ) { - for( item = pcb->m_Modules; item; item = nextitem ) { nextitem = item->Next(); @@ -173,6 +197,10 @@ void DIALOG_GLOBAL_DELETION::AcceptPcbDelete( ) { itemPicker.SetItem( item ); pickersList.PushItem( itemPicker ); + static_cast( item )->RunOnChildren( + boost::bind( &KIGFX::VIEW_ITEM::ViewRelease, _1 ) ); + ratsnest->Remove( item ); + item->ViewRelease(); item->UnLink(); gen_rastnest = true; } @@ -189,27 +217,29 @@ void DIALOG_GLOBAL_DELETION::AcceptPcbDelete( ) if( !m_TrackFilterAR->GetValue() ) track_mask_filter |= TRACK_AR; - TRACK * nexttrack; + TRACK* nexttrack; for( TRACK *track = pcb->m_Track; track != NULL; track = nexttrack ) { nexttrack = track->Next(); - if( (track->GetState( TRACK_LOCKED | TRACK_AR ) & track_mask_filter) != 0 ) + if( ( track->GetState( TRACK_LOCKED | TRACK_AR ) & track_mask_filter ) != 0 ) continue; - if( (track->GetState( TRACK_LOCKED | TRACK_AR ) == 0) && + if( ( track->GetState( TRACK_LOCKED | TRACK_AR ) == 0 ) && !m_TrackFilterNormal->GetValue() ) continue; - if( (track->Type() == PCB_VIA_T) && !m_TrackFilterVias->GetValue() ) + if( ( track->Type() == PCB_VIA_T ) && !m_TrackFilterVias->GetValue() ) continue; - if( (track->GetLayerMask() & layers_filter) == 0 ) + if( ( track->GetLayerMask() & layers_filter ) == 0 ) continue; itemPicker.SetItem( track ); pickersList.PushItem( itemPicker ); + track->ViewRelease(); + ratsnest->Remove( track ); track->UnLink(); gen_rastnest = true; } diff --git a/pcbnew/dialogs/dialog_global_deletion.h b/pcbnew/dialogs/dialog_global_deletion.h index 4742a9ea04..e38b4955b0 100644 --- a/pcbnew/dialogs/dialog_global_deletion.h +++ b/pcbnew/dialogs/dialog_global_deletion.h @@ -1,6 +1,25 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dialog_global_deletion.h -///////////////////////////////////////////////////////////////////////////// +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 1992-2014 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 + */ #ifndef _DIALOG_GLOBAL_DELETION_H_ #define _DIALOG_GLOBAL_DELETION_H_ @@ -9,20 +28,20 @@ class DIALOG_GLOBAL_DELETION: public DIALOG_GLOBAL_DELETION_BASE { -private: - PCB_EDIT_FRAME * m_Parent; - LAYER_NUM m_currentLayer; - public: DIALOG_GLOBAL_DELETION( PCB_EDIT_FRAME* parent ); void SetCurrentLayer( LAYER_NUM aLayer ); private: + PCB_EDIT_FRAME* m_Parent; + LAYER_NUM m_currentLayer; + void OnOkClick( wxCommandEvent& event ) { AcceptPcbDelete(); EndModal(wxID_OK); } + void OnCancelClick( wxCommandEvent& event ) { EndModal(wxID_CANCEL); From b3318dad5d5e28c06cf422b58f4df7a8a4f444f6 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 4 Apr 2014 15:49:37 +0200 Subject: [PATCH 260/741] High contrast color got blueish by accident - fixed. --- common/painter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/painter.cpp b/common/painter.cpp index 7828623377..47efd47425 100644 --- a/common/painter.cpp +++ b/common/painter.cpp @@ -59,7 +59,7 @@ RENDER_SETTINGS::~RENDER_SETTINGS() void RENDER_SETTINGS::update() { - m_hiContrastColor = COLOR4D( m_hiContrastFactor, m_hiContrastFactor, m_highlightFactor, + m_hiContrastColor = COLOR4D( m_hiContrastFactor, m_hiContrastFactor, m_hiContrastFactor, m_layerOpacity ); } From 4741d5607c9e373d35845f73744b2410f08ab05c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 4 Apr 2014 16:48:45 +0200 Subject: [PATCH 261/741] Elements visibility are updated in the GAL. --- pcbnew/pcbframe.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 697d4f9019..f602df3d53 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -980,6 +980,7 @@ bool PCB_EDIT_FRAME::IsElementVisible( int aElement ) const void PCB_EDIT_FRAME::SetElementVisibility( int aElement, bool aNewState ) { + GetGalCanvas()->GetView()->SetLayerVisible( ITEM_GAL_LAYER( aElement ), aNewState ); GetBoard()->SetElementVisibility( aElement, aNewState ); m_Layers->SetRenderState( aElement, aNewState ); } From 6beacd6e95ee2af1e2f74973440465aefcf13fee Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Fri, 4 Apr 2014 09:57:26 -0500 Subject: [PATCH 262/741] Rework FOOTPRINT_VIEWER_FRAME::GetActiveFootprintViewer(), fix up comments and warnings. --- common/single_top.cpp | 27 +++++++++++++++------------ eeschema/files-io.cpp | 9 +++++++-- pcbnew/modview_frame.cpp | 29 +++++++++++++++++++++++++---- pcbnew/modview_frame.h | 10 +++++++--- 4 files changed, 54 insertions(+), 21 deletions(-) diff --git a/common/single_top.cpp b/common/single_top.cpp index ce9fe38202..efb530e261 100644 --- a/common/single_top.cpp +++ b/common/single_top.cpp @@ -164,7 +164,7 @@ static const wxString dso_full_path( const wxString& aAbsoluteArgv0 ) // in them. They are basically spin-offs from what was once a top process module. // That may not make linux package maintainers happy, but that is not my job. // Get over it. KiCad is not a trivial suite, and multiple platforms come - // into play, not merely linux. For starters they will use extension ".kicad", + // into play, not merely linux. For starters they will use extension ".kiface", // but later in time morph to ".so". They are not purely libraries, else they // would begin with "lib" in basename. Like I said, get over it, we're serving // too many masters here: python, windows, linux, OSX, multiple versions of wx... @@ -338,7 +338,8 @@ bool PGM_SINGLE_TOP::OnPgmInit( wxApp* aWxApp ) // KIFACE::CreateWindow() is a virtual so we don't need to link to it. // Remember its in the *.kiface DSO. #if 0 - // this pulls in EDA_DRAW_FRAME type info, which we don't want in single_top + // this pulls in EDA_DRAW_FRAME type info, which we don't want in + // the single_top link image. KIWAY_PLAYER* frame = dynamic_cast( kiface->CreateWindow( NULL, TOP_FRAME, &kiway, KFCTL_STANDALONE ) ); #else @@ -375,9 +376,9 @@ bool PGM_SINGLE_TOP::OnPgmInit( wxApp* aWxApp ) if( argc == 2 ) { #if defined(PGM_DATA_FILE_EXT) - // PGM_DATA_FILE_EXT is different for each compile, it may come - // from CMake on the compiler command line, often does not. - // This facillity is mostly useful only for those program modules + // PGM_DATA_FILE_EXT, if present, may be different for each compile, + // it may come from CMake on the compiler command line, but often does not. + // This facillity is mostly useful for those program modules // supporting a single argv[1]. if( !argv1.GetExt() ) argv1.SetExt( wxT( PGM_DATA_FILE_EXT ) ); @@ -413,11 +414,13 @@ bool PGM_SINGLE_TOP::OnPgmInit( wxApp* aWxApp ) } else { - /* The lean single_top program launcher has no access program settings, - else it would not be lean. That kind of functionality is in the - KIFACE now, but it cannot assume that it is the only KIFACE in memory. - So this looks like a dead concept here, or an expensive one in terms - of code size. + /* + + The lean single_top program launcher has no access to program + settings, for if it did, it would not be lean. That kind of + functionality is in the KIFACE now, but it cannot assume that it is + the only KIFACE in memory. So this looks like a dead concept here, + or an expensive one in terms of code size. wxString dir; @@ -455,8 +458,8 @@ void PGM_SINGLE_TOP::MacOpenFile( const wxString& aFileName ) if( filename.FileExists() ) { #if 0 - // this pulls in EDA_DRAW_FRAME type info, which we don't want in single_top - // link image. + // this pulls in EDA_DRAW_FRAME type info, which we don't want in + // the single_top link image. KIWAY_PLAYER* frame = dynamic_cast( App().GetTopWindow() ); #else KIWAY_PLAYER* frame = (KIWAY_PLAYER*) App().GetTopWindow(); diff --git a/eeschema/files-io.cpp b/eeschema/files-io.cpp index a94761d038..3832ce3ca6 100644 --- a/eeschema/files-io.cpp +++ b/eeschema/files-io.cpp @@ -248,7 +248,6 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector& aFileSet, in SCH_SCREEN* screen; wxString fullFileName( aFileSet[0] ); wxString msg; - bool libCacheExist = false; SCH_SCREENS screenList; for( screen = screenList.GetFirst(); screen != NULL; screen = screenList.GetNext() ) @@ -384,9 +383,12 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector& aFileSet, in } // load the project. - libCacheExist = LoadCacheLibrary( g_RootSheet->GetScreen()->GetFileName() ); + bool libCacheExist = LoadCacheLibrary( g_RootSheet->GetScreen()->GetFileName() ); + g_RootSheet->SetScreen( NULL ); + bool diag = g_RootSheet->Load( this ); + SetScreen( m_CurrentSheet->LastScreen() ); UpdateFileHistory( g_RootSheet->GetScreen()->GetFileName() ); @@ -397,6 +399,9 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector& aFileSet, in SetSheetNumberAndCount(); m_canvas->Refresh( true ); + (void) libCacheExist; + (void) diag; + // return diag; return true; // do not close Eeschema if the file if not found: // we may have to create a new schematic file. diff --git a/pcbnew/modview_frame.cpp b/pcbnew/modview_frame.cpp index 8375336b75..96313fde13 100644 --- a/pcbnew/modview_frame.cpp +++ b/pcbnew/modview_frame.cpp @@ -271,10 +271,31 @@ const wxChar* FOOTPRINT_VIEWER_FRAME::GetFootprintViewerFrameName() } -FOOTPRINT_VIEWER_FRAME* FOOTPRINT_VIEWER_FRAME::GetActiveFootprintViewer( const wxWindow* aParent ) +FOOTPRINT_VIEWER_FRAME* FOOTPRINT_VIEWER_FRAME::GetActiveFootprintViewer( const KIWAY_PLAYER* aParent ) { - // top_of_project! - wxASSERT( dynamic_cast( aParent ) ); + wxASSERT( aParent ); + + // We search only within the current project, and do so by limiting + // the search scope to a wxWindow hierarchy subset. Find the top most + // KIWAY_PLAYER which is part of this PROJECT by matching its KIWAY* to the + // most immediate parent's. + + // NOTE: an open FOOTPRINT_VIEWER_FRAME may have either the PCB_EDIT_FRAME + // or the FOOTPRINT_EDIT_FRAME. + + KIWAY* kiway = &aParent->Kiway(); + wxWindow* frame; + + while( (frame = aParent->GetParent()) != NULL ) + { + // will go NULL when we reach a non-KIWAY_PLAYER + KIWAY_PLAYER* kwp = dynamic_cast( frame ); + + if( kwp && &kwp->Kiway() == kiway ) + aParent = kwp; + else + break; + } return (FOOTPRINT_VIEWER_FRAME*) wxWindow::FindWindowByName( GetFootprintViewerFrameName(), aParent ); @@ -424,7 +445,7 @@ void FOOTPRINT_VIEWER_FRAME::ClickOnFootprintList( wxCommandEvent& event ) { GetBoard()->Add( loadFootprint( id ) ); } - catch( IO_ERROR ioe ) + catch( const IO_ERROR& ioe ) { wxString msg; msg.Printf( _( "Could not load footprint \"%s\" from library \"%s\".\n\n" diff --git a/pcbnew/modview_frame.h b/pcbnew/modview_frame.h index b28242a811..dab4432f3b 100644 --- a/pcbnew/modview_frame.h +++ b/pcbnew/modview_frame.h @@ -74,10 +74,14 @@ public: /** * Function GetActiveFootprintViewer (static) - * @return a reference to the current opened Footprint viewer - * or NULL if no Footprint viewer currently opened + * + * @param aParent the KIWAY_PLAYER which is the parent of the calling wxWindow. + * This is used to traverse the window hierarchy upwards to the topmost + * KIWAY_PLAYER which is still part of the same project. + * + * @return Any currently opened Footprint viewer or NULL if none. */ - static FOOTPRINT_VIEWER_FRAME* GetActiveFootprintViewer( const wxWindow* aParent ); + static FOOTPRINT_VIEWER_FRAME* GetActiveFootprintViewer( const KIWAY_PLAYER* aParent ); wxString& GetSelectedFootprint( void ) const { return m_selectedFootprintName; } const wxString GetSelectedLibraryFullName(); From 9a84944fba63b25a2e1b33ce77d5e81952a8b53d Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 4 Apr 2014 16:58:44 +0200 Subject: [PATCH 263/741] Corrected zone display settings for GAL. --- pcbnew/dialogs/dialog_general_options.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pcbnew/dialogs/dialog_general_options.cpp b/pcbnew/dialogs/dialog_general_options.cpp index b506f56e2e..9adc32bdf6 100644 --- a/pcbnew/dialogs/dialog_general_options.cpp +++ b/pcbnew/dialogs/dialog_general_options.cpp @@ -193,19 +193,19 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) case ID_TB_OPTIONS_SHOW_ZONES: DisplayOpt.DisplayZonesMode = 0; - updateType = PCB_ZONE_T; + updateType = PCB_ZONE_AREA_T; m_canvas->Refresh(); break; case ID_TB_OPTIONS_SHOW_ZONES_DISABLE: DisplayOpt.DisplayZonesMode = 1; - updateType = PCB_ZONE_T; + updateType = PCB_ZONE_AREA_T; m_canvas->Refresh(); break; case ID_TB_OPTIONS_SHOW_ZONES_OUTLINES_ONLY: DisplayOpt.DisplayZonesMode = 2; - updateType = PCB_ZONE_T; + updateType = PCB_ZONE_AREA_T; m_canvas->Refresh(); break; From a6917280fe15097a7b66e270f23d284da852bcb3 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 4 Apr 2014 17:40:00 +0200 Subject: [PATCH 264/741] Added net highlighting. --- include/painter.h | 24 ++++++++++++++++++--- pcbnew/tools/selection_tool.cpp | 37 ++++++++++++++++++++++++++++++--- pcbnew/tools/selection_tool.h | 8 +++++++ 3 files changed, 63 insertions(+), 6 deletions(-) diff --git a/include/painter.h b/include/painter.h index 004c93e35e..34376d985d 100644 --- a/include/painter.h +++ b/include/painter.h @@ -109,6 +109,26 @@ public: return ( m_activeLayers.count( aLayerId ) > 0 ); } + /** + * Function GetHighlight + * Returns current highlight setting. + * @return True if highlight is enabled, false otherwise. + */ + bool GetHighlight() const + { + return m_highlightEnabled; + } + + /** + * Function GetHighlightNetCode + * Returns netcode of currently highlighted net. + * @return Netcode of currently highlighted net. + */ + int GetHighlightNetCode() const + { + return m_highlightNetcode; + } + /** * Function SetHighlight * Turns on/off highlighting - it may be done for the active layer or the specified net. @@ -119,9 +139,7 @@ public: inline void SetHighlight( bool aEnabled, int aNetcode = -1 ) { m_highlightEnabled = aEnabled; - - if( aNetcode > 0 ) - m_highlightNetcode = aNetcode; + m_highlightNetcode = aNetcode; } /** diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 1b8f013a0b..6fdc83dd4e 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -112,10 +112,17 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) // single click? Select single object else if( evt->IsClick( BUT_LEFT ) ) { - if( !m_additive ) - clearSelection(); + if( evt->Modifier( MD_CTRL ) ) + { + highlightNet( evt->Position() ); + } + else + { + if( !m_additive ) + clearSelection(); - selectSingle( evt->Position() ); + selectSingle( evt->Position() ); + } } // right click? if there is any object - show the context menu @@ -650,6 +657,30 @@ bool SELECTION_TOOL::selectionContains( const VECTOR2I& aPoint ) const } +void SELECTION_TOOL::highlightNet( const VECTOR2I& aPoint ) +{ + KIGFX::RENDER_SETTINGS* render = getView()->GetPainter()->GetSettings(); + GENERAL_COLLECTORS_GUIDE guide = getEditFrame()->GetCollectorsGuide(); + GENERAL_COLLECTOR collector; + int net = -1; + + // Find a connected item for which we are going to highlight a net + collector.Collect( getModel( PCB_T ), GENERAL_COLLECTOR::PadsTracksOrZones, + wxPoint( aPoint.x, aPoint.y ), guide ); + bool enableHighlight = ( collector.GetCount() > 0 ); + + // Obtain net code for the clicked item + if( enableHighlight ) + net = static_cast( collector[0] )->GetNetCode(); + + if( enableHighlight != render->GetHighlight() || net != render->GetHighlightNetCode() ) + { + render->SetHighlight( enableHighlight, net ); + getView()->UpdateAllLayersColor(); + } +} + + void SELECTION_TOOL::SELECTION::clear() { items.ClearItemsList(); diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index ca46f8bbdd..609fcafda5 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -221,6 +221,14 @@ private: */ bool selectionContains( const VECTOR2I& aPoint ) const; + /** + * Function highlightNet() + * Looks for a BOARD_CONNECTED_ITEM in a given spot, and if one is found - it enables + * highlight for its net. + * @param aPoint is the point where an item is expected (world coordinates). + */ + void highlightNet( const VECTOR2I& aPoint ); + /// Visual representation of selection box SELECTION_AREA* m_selArea; From a0fb4ed0c1112603077b2611af7fa48577522942 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 4 Apr 2014 17:42:35 +0200 Subject: [PATCH 265/741] Bruteforce module update after a netlist reload. --- include/wxPcbStruct.h | 2 +- pcbnew/netlist.cpp | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index f382658ee3..e0334d4e6c 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -1475,7 +1475,7 @@ public: /** * Function ReadPcbNetlist - * reads \a aNetlistFileName and ppdates the footprints (load missing footprints and + * reads \a aNetlistFileName and updates the footprints (load missing footprints and * delete on demand extra footprints) on the board. * Update connectivity info, references, values and "TIME STAMP" * diff --git a/pcbnew/netlist.cpp b/pcbnew/netlist.cpp index 258bea0c8f..764b5fbe5c 100644 --- a/pcbnew/netlist.cpp +++ b/pcbnew/netlist.cpp @@ -27,9 +27,11 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ +#include #include #include #include +#include #include #include #include @@ -59,6 +61,7 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName, wxString msg; NETLIST netlist; NETLIST_READER* netlistReader; + KIGFX::VIEW* view = GetGalCanvas()->GetView(); netlist.SetIsDryRun( aIsDryRun ); netlist.SetFindByTimeStamp( aSelectByTimeStamp ); @@ -93,6 +96,16 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName, if( !netlist.IsDryRun() ) GetScreen()->ClearUndoRedoList(); + if( !netlist.IsDryRun() ) + { + // Remove old modules + for( MODULE* module = GetBoard()->m_Modules; module; module = module->Next() ) + { + module->RunOnChildren( boost::bind( &KIGFX::VIEW::Remove, view, _1 ) ); + view->Remove( module ); + } + } + netlist.SortByReference(); GetBoard()->ReplaceNetlist( netlist, aDeleteSinglePadNets, aReporter ); @@ -104,6 +117,13 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName, SetCurItem( NULL ); + // Reload modules + for( MODULE* module = GetBoard()->m_Modules; module; module = module->Next() ) + { + module->RunOnChildren( boost::bind( &KIGFX::VIEW::Add, view, _1 ) ); + GetGalCanvas()->GetView()->Add( module ); + } + if( aDeleteUnconnectedTracks && GetBoard()->m_Track ) { // Remove erroneous tracks. This should probably pushed down to the #BOARD object. From fe37c549f7f340270bea21674b391d104ba96473 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 4 Apr 2014 20:28:35 +0200 Subject: [PATCH 266/741] Footprint Editor: minor cosmetic enhancement (which could avoid a report like bug #1302255) --- bitmaps_png/CMakeLists.txt | 1 + bitmaps_png/cpp_26/copy_library.cpp | 119 +++++++ bitmaps_png/sources/copy_library.svg | 501 +++++++++++++++++++++++++++ include/bitmaps.h | 1 + pcbnew/moduleframe.cpp | 4 +- 5 files changed, 625 insertions(+), 1 deletion(-) create mode 100644 bitmaps_png/cpp_26/copy_library.cpp create mode 100644 bitmaps_png/sources/copy_library.svg diff --git a/bitmaps_png/CMakeLists.txt b/bitmaps_png/CMakeLists.txt index 944a5450fb..c8a79d784f 100644 --- a/bitmaps_png/CMakeLists.txt +++ b/bitmaps_png/CMakeLists.txt @@ -176,6 +176,7 @@ set( BMAPS_MID copyblock copycomponent copy_button + copy_library copper_layers_setup cursor_shape cursor diff --git a/bitmaps_png/cpp_26/copy_library.cpp b/bitmaps_png/cpp_26/copy_library.cpp new file mode 100644 index 0000000000..2b0da851cd --- /dev/null +++ b/bitmaps_png/cpp_26/copy_library.cpp @@ -0,0 +1,119 @@ + +/* Do not modify this file, it was automatically generated by the + * PNG2cpp CMake script, using a *.png file as input. + */ + +#include + +static const unsigned char png[] = { + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, + 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c, + 0xce, 0x00, 0x00, 0x06, 0x5f, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xbd, 0x96, 0x79, 0x4c, 0x54, + 0x57, 0x14, 0xc6, 0x5f, 0x97, 0xa4, 0x8d, 0xd1, 0xf4, 0x0f, 0xd3, 0x58, 0x40, 0x23, 0x51, 0xb0, + 0x35, 0x30, 0x52, 0x53, 0xa0, 0x2a, 0x1a, 0x96, 0xaa, 0x65, 0x51, 0x89, 0x16, 0x6d, 0xad, 0xb5, + 0xd1, 0xba, 0x44, 0x45, 0xc4, 0xa5, 0x8a, 0x11, 0x11, 0x17, 0x6a, 0x1c, 0xd4, 0x26, 0xa2, 0xb6, + 0x01, 0xea, 0xda, 0x5a, 0xc5, 0x28, 0x08, 0x8c, 0x02, 0x65, 0x86, 0x19, 0x18, 0x66, 0x80, 0x61, + 0x19, 0x04, 0x59, 0x67, 0x5f, 0x90, 0x81, 0x41, 0x20, 0x08, 0xb3, 0xbd, 0x37, 0xef, 0xf4, 0xdc, + 0x67, 0xb5, 0xd8, 0x46, 0xaa, 0x4d, 0xd3, 0x97, 0x9c, 0x64, 0x66, 0x72, 0xef, 0xfd, 0x9d, 0xef, + 0x9c, 0xef, 0xdc, 0x37, 0x14, 0x00, 0x50, 0x24, 0x84, 0xbe, 0xbe, 0xfb, 0x44, 0xd3, 0xa7, 0x47, + 0x1c, 0xa6, 0xa8, 0xd7, 0x9f, 0xfe, 0xf6, 0x32, 0x51, 0x34, 0x61, 0xc2, 0xfb, 0xe2, 0x99, 0x33, + 0x93, 0x4b, 0x26, 0x4e, 0xfc, 0x60, 0xac, 0x75, 0x94, 0xb7, 0xb7, 0xf7, 0x2e, 0x5f, 0x5f, 0xdf, + 0x84, 0x5b, 0xa1, 0xa1, 0x97, 0x8c, 0x39, 0x39, 0x17, 0xa5, 0xf3, 0xe7, 0x9f, 0x40, 0xe8, 0xa2, + 0x9b, 0x14, 0xf5, 0xc6, 0x8b, 0x36, 0x89, 0x29, 0xea, 0xcd, 0xe2, 0xa9, 0x53, 0xc3, 0x85, 0x3c, + 0xde, 0x09, 0xc9, 0x8e, 0x1d, 0xd7, 0x85, 0x7c, 0x7e, 0x55, 0x9c, 0xa7, 0xe7, 0x4d, 0x2f, 0x2f, + 0xaf, 0x98, 0x17, 0x82, 0x02, 0x02, 0x02, 0x4e, 0x68, 0xb5, 0xda, 0x2b, 0x85, 0xeb, 0xd7, 0x37, + 0x8a, 0x44, 0xa2, 0x0e, 0x81, 0x40, 0xd0, 0x22, 0xcf, 0xca, 0x2a, 0x29, 0x0e, 0x0c, 0x3c, 0x9d, + 0x3f, 0x6e, 0x9c, 0xe7, 0x5f, 0x37, 0x94, 0x4e, 0x9e, 0xcc, 0xfb, 0x95, 0xc7, 0xfb, 0x45, 0x70, + 0xec, 0x58, 0x5d, 0x91, 0x40, 0xd0, 0x51, 0x5e, 0x5e, 0xae, 0x31, 0x8a, 0x44, 0x6a, 0x49, 0x7a, + 0x7a, 0x91, 0xa7, 0xa7, 0xe7, 0x17, 0x63, 0x82, 0xf0, 0xc3, 0x95, 0xb6, 0xe3, 0xc7, 0x1f, 0x0c, + 0x0e, 0x0e, 0x1a, 0xf0, 0x31, 0x49, 0x24, 0x12, 0x83, 0xa4, 0xb4, 0xb4, 0xfd, 0x52, 0x58, 0x98, + 0xf0, 0x7b, 0x0f, 0x8f, 0x05, 0xdc, 0x62, 0x8a, 0x7a, 0xed, 0xa7, 0x69, 0xd3, 0x12, 0xaf, 0xae, + 0x5c, 0xa9, 0x50, 0xd6, 0xd7, 0x77, 0xd6, 0xd5, 0xd5, 0x19, 0x31, 0x41, 0xd3, 0xc8, 0xc8, 0x88, + 0xbe, 0x47, 0x2a, 0xd5, 0x8a, 0x11, 0x84, 0x8a, 0x56, 0x8d, 0x05, 0xe2, 0x13, 0x90, 0x2a, 0x3d, + 0xbd, 0x79, 0x78, 0x78, 0x58, 0x8f, 0x9f, 0xd5, 0xfd, 0xfd, 0xfd, 0xc6, 0x86, 0x86, 0x86, 0xae, + 0x96, 0x07, 0x0f, 0x74, 0x97, 0xe2, 0xe2, 0x94, 0xc7, 0xbc, 0xbc, 0x92, 0x4f, 0xcd, 0x98, 0x71, + 0x4f, 0x78, 0xf6, 0x6c, 0x0b, 0x3e, 0x7a, 0x0c, 0x33, 0x59, 0xcb, 0xb2, 0xac, 0xc6, 0x6e, 0xb7, + 0xeb, 0x2c, 0xe5, 0xe5, 0x5a, 0x31, 0x9f, 0x7f, 0x0f, 0x41, 0x2b, 0x5f, 0x0a, 0x84, 0x9b, 0xb4, + 0xf5, 0xf5, 0xf5, 0x5d, 0x7d, 0x7d, 0x7d, 0x46, 0x72, 0x40, 0x47, 0x47, 0x87, 0xf9, 0xb6, 0xf4, + 0xb6, 0x65, 0x77, 0xd2, 0x7c, 0x47, 0x7d, 0x45, 0x89, 0xa1, 0xba, 0xba, 0xda, 0x6c, 0xb5, 0x5a, + 0x0d, 0x4e, 0xa7, 0x53, 0x3b, 0x30, 0x30, 0x60, 0x68, 0x6c, 0x6c, 0xec, 0xea, 0xee, 0xee, 0x36, + 0xf4, 0xcb, 0x64, 0xea, 0x32, 0x3e, 0xff, 0x2e, 0x82, 0xe2, 0x46, 0x1f, 0xee, 0x97, 0xe3, 0x17, + 0x12, 0x56, 0x30, 0x3f, 0x8d, 0x03, 0xf1, 0x78, 0xbc, 0x67, 0x20, 0x52, 0x3a, 0x54, 0x63, 0xb8, + 0x7f, 0xff, 0xbe, 0x49, 0x28, 0x14, 0x3e, 0xdc, 0xbe, 0x7d, 0xfb, 0xf0, 0x91, 0x9c, 0xd4, 0xc1, + 0xec, 0xca, 0xd3, 0xee, 0xb4, 0x9a, 0x54, 0xfb, 0xd9, 0xc6, 0x33, 0x83, 0xc6, 0x5e, 0x83, 0x09, + 0x01, 0x66, 0x54, 0x4c, 0xa0, 0x46, 0x04, 0x1a, 0x2d, 0x12, 0x89, 0x56, 0x94, 0x9e, 0x7e, 0xd7, + 0xc3, 0xc3, 0x63, 0x85, 0x4f, 0x86, 0xcf, 0x5b, 0x73, 0xef, 0x04, 0x7f, 0xfd, 0xa9, 0xe0, 0x93, + 0xd2, 0x53, 0xd5, 0x7c, 0x55, 0xf4, 0xd5, 0xc5, 0xe6, 0x49, 0x93, 0x26, 0x15, 0x53, 0xfe, 0xfe, + 0xfe, 0xe9, 0x4f, 0x41, 0x43, 0x43, 0x43, 0x7a, 0xa2, 0xc4, 0xe1, 0x70, 0xe8, 0x6e, 0xdc, 0xb8, + 0xd1, 0x93, 0x9a, 0x9a, 0x4a, 0x1f, 0xbe, 0x76, 0x88, 0x2e, 0x50, 0xe6, 0x82, 0xb4, 0xa2, 0x82, + 0x55, 0x68, 0x14, 0xee, 0xdd, 0xa5, 0xbb, 0x9c, 0xd9, 0xca, 0xac, 0x7e, 0xb2, 0x8e, 0x28, 0x23, + 0x7b, 0x7a, 0x24, 0x12, 0x4d, 0x29, 0x2a, 0x0a, 0x38, 0xc2, 0xcb, 0x8e, 0xbe, 0x11, 0xd9, 0xfa, + 0x73, 0xed, 0xd5, 0x21, 0x45, 0x9d, 0xc2, 0x61, 0x32, 0x99, 0x9c, 0x7b, 0xca, 0x76, 0xda, 0xa3, + 0xa3, 0xa3, 0xe5, 0x7f, 0x82, 0xf8, 0x7c, 0xd2, 0x23, 0x9d, 0x52, 0xa9, 0x34, 0x35, 0x35, 0x35, + 0x75, 0xe5, 0xe7, 0xe7, 0x5b, 0xb2, 0xb3, 0xb3, 0x5d, 0x22, 0xa3, 0x90, 0xa9, 0x30, 0x88, 0x61, + 0x64, 0x78, 0x18, 0xe4, 0x72, 0x39, 0x8b, 0xe5, 0x63, 0xb3, 0x65, 0x99, 0xee, 0x84, 0xdc, 0x78, + 0x5b, 0x6d, 0x43, 0xad, 0xf9, 0xd1, 0xa3, 0x47, 0x3a, 0x8d, 0x50, 0xa0, 0x5b, 0x91, 0xb9, 0xc8, + 0x7a, 0x5a, 0x74, 0xd2, 0x8e, 0xe5, 0x76, 0x29, 0x14, 0x0a, 0xba, 0xa7, 0xa7, 0x87, 0x76, 0xb9, + 0x5c, 0xf4, 0xc1, 0xea, 0x03, 0xf6, 0xa8, 0xa8, 0x28, 0x39, 0xe5, 0xe7, 0xe7, 0xf7, 0x0c, 0x44, + 0x94, 0x90, 0x52, 0x68, 0x34, 0x1a, 0xf3, 0xf9, 0xf3, 0xe7, 0xad, 0x99, 0x99, 0x99, 0x2e, 0xb1, + 0x59, 0xcc, 0x48, 0x4d, 0x12, 0x00, 0xec, 0x3c, 0x6e, 0x04, 0x74, 0x25, 0x54, 0xa0, 0xba, 0xdf, + 0xda, 0x4a, 0xd8, 0xb8, 0x0b, 0xcb, 0xe9, 0xeb, 0xd2, 0xeb, 0xbd, 0x4b, 0xb2, 0x16, 0x31, 0x55, + 0x2a, 0x99, 0x1b, 0x13, 0x71, 0xe3, 0x5e, 0x9a, 0x3c, 0x78, 0xa6, 0xcb, 0xed, 0x76, 0xd3, 0x87, + 0x14, 0xc9, 0xb6, 0xc5, 0x8b, 0x17, 0x3f, 0x0f, 0x32, 0x9b, 0xcd, 0xc6, 0xb6, 0xb6, 0x36, 0xce, + 0x51, 0x44, 0x11, 0xc2, 0x68, 0xb1, 0xa9, 0x8c, 0xa9, 0x30, 0x4b, 0x00, 0x33, 0x05, 0x8b, 0xc5, + 0x02, 0x04, 0x86, 0x96, 0x06, 0x9c, 0x39, 0xa8, 0x6e, 0xaf, 0x66, 0x17, 0xe5, 0x84, 0x43, 0x6b, + 0x67, 0x0b, 0x4b, 0x4a, 0x8b, 0xe5, 0x64, 0xf0, 0xa1, 0x6d, 0x36, 0x1b, 0x8d, 0x3d, 0x64, 0x88, + 0xa2, 0xd4, 0xda, 0x83, 0xb6, 0x85, 0x0b, 0x17, 0x3e, 0x01, 0x35, 0x37, 0x37, 0xe7, 0x15, 0xef, + 0xdc, 0xa9, 0x2a, 0x2a, 0x2c, 0xec, 0xbd, 0x75, 0xeb, 0x96, 0xf5, 0xf2, 0xe5, 0xcb, 0xd6, 0xa3, + 0x47, 0x8f, 0x0e, 0x64, 0x64, 0x64, 0xd0, 0x65, 0x06, 0x91, 0x5b, 0x6c, 0x14, 0x01, 0xaa, 0x05, + 0x5c, 0xc7, 0x95, 0xef, 0xf1, 0xe3, 0xc7, 0x04, 0xc8, 0xf6, 0xf4, 0xf6, 0xb0, 0x9f, 0xdd, 0x89, + 0x85, 0x3e, 0xab, 0x95, 0x75, 0x39, 0x9d, 0x2c, 0x26, 0xc0, 0xd4, 0xd4, 0xd4, 0x30, 0x58, 0x3a, + 0x06, 0x7b, 0xc7, 0x95, 0xee, 0x90, 0xe2, 0x80, 0x2d, 0x22, 0x22, 0x42, 0x4e, 0x05, 0x06, 0x06, + 0xb6, 0x60, 0xb3, 0x1c, 0xcb, 0x63, 0x63, 0x9d, 0xc1, 0x41, 0x41, 0x10, 0x16, 0x1a, 0xca, 0xc5, + 0xec, 0xd9, 0xb3, 0x01, 0xcd, 0x00, 0x85, 0x2d, 0x05, 0x20, 0x32, 0x08, 0x39, 0x10, 0xa9, 0xc8, + 0xf0, 0x93, 0x5e, 0x41, 0x7b, 0x7b, 0x3b, 0x6b, 0x1b, 0x19, 0x61, 0x97, 0xe7, 0x2d, 0x05, 0x02, + 0xc1, 0x24, 0xdc, 0x95, 0x95, 0x95, 0x6e, 0x84, 0xd1, 0x44, 0x15, 0x56, 0x9a, 0x7e, 0xa2, 0x28, + 0xd9, 0x16, 0x1a, 0x1a, 0x2a, 0xa7, 0xe6, 0xcc, 0x99, 0x63, 0x4c, 0x49, 0x49, 0xe1, 0x0e, 0x8d, + 0x8c, 0x8c, 0x84, 0x0d, 0x1b, 0x36, 0xc0, 0xba, 0x75, 0xeb, 0x20, 0x31, 0x31, 0x11, 0xce, 0x9d, + 0x3b, 0x07, 0x12, 0x34, 0x42, 0x99, 0x51, 0x08, 0x3a, 0x9d, 0x0e, 0x30, 0x5b, 0xf8, 0x43, 0x0d, + 0x18, 0xf4, 0x7a, 0xb6, 0xb3, 0xb3, 0x93, 0x8d, 0xcd, 0x5b, 0xc2, 0xa2, 0xdd, 0x19, 0x9c, 0x27, + 0x86, 0xf4, 0x04, 0x13, 0xa2, 0x71, 0xa0, 0x19, 0x9c, 0x47, 0x86, 0xc0, 0x0e, 0x62, 0x8f, 0x16, + 0x2c, 0x58, 0x20, 0xa7, 0xe6, 0xcd, 0x9b, 0xa7, 0x19, 0x0d, 0xda, 0xb2, 0x65, 0x0b, 0xec, 0xdd, + 0xbb, 0x17, 0x36, 0x6d, 0xda, 0xc4, 0x81, 0xca, 0x8d, 0x12, 0x10, 0x1a, 0x4a, 0x01, 0xeb, 0xce, + 0xa9, 0xc1, 0xac, 0xa1, 0xb5, 0xb5, 0x15, 0x48, 0x3f, 0xec, 0x0e, 0x3b, 0xbd, 0x2c, 0x37, 0xc6, + 0x4d, 0x9a, 0x4f, 0x00, 0x6a, 0xb5, 0x9a, 0xae, 0xaa, 0xaa, 0x62, 0x88, 0xe3, 0xc8, 0x77, 0xce, + 0x75, 0x08, 0x0a, 0x09, 0x09, 0x79, 0x1e, 0x14, 0x1e, 0x1e, 0xce, 0x41, 0x36, 0x6e, 0xdc, 0x08, + 0xfb, 0xf7, 0xef, 0x07, 0xec, 0x11, 0x07, 0x2a, 0xd1, 0x16, 0x81, 0x4a, 0xa5, 0x22, 0x87, 0x03, + 0xce, 0x0e, 0xa7, 0x0e, 0xef, 0x43, 0xf7, 0xc0, 0xe0, 0x00, 0xbd, 0x14, 0x41, 0xbd, 0xbd, 0xbd, + 0xb4, 0x54, 0x2a, 0x65, 0xf4, 0x7a, 0x3d, 0x77, 0x38, 0x09, 0x34, 0x16, 0x8d, 0xea, 0xe9, 0x14, + 0x04, 0xcd, 0x9d, 0x3b, 0xb7, 0xea, 0x39, 0xd0, 0xb6, 0x6d, 0xdb, 0x60, 0xd9, 0xb2, 0x65, 0x5c, + 0x60, 0x16, 0x80, 0x86, 0x80, 0xe2, 0xb6, 0x7b, 0x50, 0xa8, 0x2e, 0x00, 0xb4, 0x3d, 0x60, 0xb6, + 0x80, 0x6e, 0xe2, 0xd4, 0x11, 0x7b, 0x3d, 0xec, 0x7e, 0xc8, 0x81, 0xc8, 0xa1, 0x4f, 0xcb, 0x86, + 0xbd, 0x63, 0xf0, 0xc2, 0x65, 0xf0, 0xc2, 0xa5, 0x6d, 0x76, 0x1b, 0x9d, 0x54, 0xf5, 0xad, 0x2d, + 0x38, 0x38, 0xf8, 0x09, 0x28, 0x3e, 0x3e, 0x9e, 0xeb, 0xc9, 0xbe, 0x7d, 0xfb, 0x9e, 0xc5, 0xea, + 0xd5, 0xab, 0x21, 0x29, 0x29, 0x09, 0x34, 0x5d, 0x6a, 0x38, 0x59, 0xc7, 0x87, 0x23, 0x35, 0xa9, + 0x70, 0x57, 0x2d, 0x00, 0x43, 0x17, 0x37, 0x47, 0xc4, 0xea, 0x8c, 0xcd, 0x61, 0xa3, 0x97, 0xe6, + 0x45, 0x73, 0xa5, 0xc3, 0x1e, 0xd1, 0x32, 0x99, 0x8c, 0xd1, 0x1b, 0xf4, 0xb4, 0xcc, 0x54, 0x49, + 0x9f, 0x54, 0x9e, 0x70, 0xec, 0xac, 0xdc, 0x61, 0xcb, 0x90, 0x9d, 0xb1, 0xe2, 0xfb, 0xae, 0x9e, + 0x03, 0x91, 0x52, 0x91, 0xcd, 0xa3, 0xa3, 0xa8, 0xa8, 0x08, 0x12, 0x12, 0x12, 0x20, 0x36, 0x36, + 0x16, 0x56, 0xad, 0x5a, 0x05, 0x69, 0xc7, 0xd3, 0xe0, 0x87, 0x92, 0xf3, 0x70, 0xb8, 0x2a, 0x05, + 0x2e, 0x35, 0x5f, 0x60, 0x1b, 0x94, 0x0d, 0x8c, 0x4a, 0xa3, 0xa2, 0x97, 0xdc, 0x8e, 0x76, 0x13, + 0x33, 0x34, 0x35, 0x37, 0x31, 0x97, 0x5b, 0x2e, 0x3a, 0xbf, 0xcc, 0xfd, 0x7c, 0x24, 0x26, 0x2d, + 0xd2, 0x30, 0x2b, 0x7c, 0x56, 0xad, 0x8f, 0x8f, 0xcf, 0x3d, 0x8c, 0xd3, 0xe3, 0xc7, 0x8f, 0x8f, + 0x7a, 0x21, 0x68, 0x74, 0x90, 0xe1, 0xcc, 0xca, 0xca, 0x82, 0x3d, 0x7b, 0xf6, 0x00, 0x96, 0x01, + 0xd6, 0x1e, 0xfe, 0x8a, 0x49, 0x96, 0xed, 0x77, 0x58, 0x86, 0xbb, 0xe9, 0x25, 0xb9, 0xd1, 0x6e, + 0xfd, 0x90, 0xde, 0xb5, 0x36, 0x6f, 0xcd, 0x88, 0xff, 0x9a, 0x99, 0x6d, 0x78, 0x81, 0x7e, 0x43, + 0x51, 0xd4, 0x94, 0xbf, 0xbd, 0x26, 0x5e, 0x06, 0x34, 0x3a, 0x88, 0x59, 0xd0, 0xae, 0x83, 0xde, + 0x1f, 0x79, 0x97, 0x2d, 0xfc, 0x31, 0x62, 0x20, 0xe4, 0x5a, 0x30, 0xfb, 0xf1, 0x77, 0x41, 0x96, + 0xf7, 0xfc, 0xdf, 0xdd, 0x44, 0x8d, 0xf1, 0xfa, 0xff, 0x57, 0x20, 0x34, 0x4b, 0x5f, 0x50, 0x50, + 0xd0, 0x87, 0xe3, 0xa6, 0x8c, 0xf3, 0x7a, 0x27, 0x6a, 0xc2, 0xee, 0xb1, 0x00, 0xff, 0x09, 0xe8, + 0x55, 0xfe, 0x2d, 0xfd, 0xaf, 0x20, 0x35, 0xb1, 0xf6, 0xd6, 0xad, 0x5b, 0x39, 0x8b, 0xff, 0x53, + 0x6c, 0xde, 0xbc, 0x19, 0x62, 0x62, 0x62, 0x1e, 0xe1, 0x5d, 0x18, 0xf0, 0x4a, 0x20, 0xbc, 0xeb, + 0x36, 0xe2, 0xe4, 0x76, 0xe3, 0x80, 0x3e, 0x7c, 0xd9, 0xc0, 0xf5, 0xb2, 0xb0, 0xb0, 0xb0, 0xb7, + 0x5f, 0x05, 0xf4, 0x3b, 0xd6, 0xb8, 0x5a, 0x39, 0x98, 0x47, 0x6d, 0xf0, 0x00, 0x00, 0x00, 0x00, + 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, +}; + +const BITMAP_OPAQUE copy_library_xpm[1] = {{ png, sizeof( png ), "copy_library_xpm" }}; + +//EOF diff --git a/bitmaps_png/sources/copy_library.svg b/bitmaps_png/sources/copy_library.svg new file mode 100644 index 0000000000..662adeb695 --- /dev/null +++ b/bitmaps_png/sources/copy_library.svg @@ -0,0 +1,501 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/include/bitmaps.h b/include/bitmaps.h index ae049aa719..280942ebc9 100644 --- a/include/bitmaps.h +++ b/include/bitmaps.h @@ -103,6 +103,7 @@ EXTERN_BITMAP( copper_layers_setup_xpm ) EXTERN_BITMAP( copyblock_xpm ) EXTERN_BITMAP( copycomponent_xpm ) EXTERN_BITMAP( copy_button_xpm ) +EXTERN_BITMAP( copy_library_xpm ) EXTERN_BITMAP( create_cmp_file_xpm ) EXTERN_BITMAP( cursor_shape_xpm ) EXTERN_BITMAP( cursor_xpm ) diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index bdbaf7d971..4d11d4c7d1 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -410,7 +410,9 @@ void FOOTPRINT_EDIT_FRAME::OnUpdateVerticalToolbar( wxUpdateUIEvent& aEvent ) void FOOTPRINT_EDIT_FRAME::OnUpdateLibSelected( wxUpdateUIEvent& aEvent ) { - aEvent.Enable( getLibPath() != wxEmptyString ); + bool enable = getLibPath() != wxEmptyString; + aEvent.Enable( enable ); + GetMenuBar()->Enable( ID_MODEDIT_SAVE_LIBRARY_AS, enable ); } From 5768efe8815c431878b51807a8e8a078354492c7 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 4 Apr 2014 20:35:07 +0200 Subject: [PATCH 267/741] Pcbnew: commit forgotten change. --- pcbnew/menubar_modedit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/menubar_modedit.cpp b/pcbnew/menubar_modedit.cpp index 12854c7ea5..ffbe9a681f 100644 --- a/pcbnew/menubar_modedit.cpp +++ b/pcbnew/menubar_modedit.cpp @@ -104,7 +104,7 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar() AddMenuItem( fileMenu, ID_MODEDIT_SAVE_LIBRARY_AS, _( "Save Current Library As..." ), _( "Save entire current library under a new name." ), - wxNullBitmap ); + KiBitmap( copy_library_xpm ) ); // Save module text = AddHotkeyName( _( "&Save Module in Active Library" ), From c0ed226682836325dfbb791db12405916edfa15f Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Fri, 4 Apr 2014 13:43:12 -0500 Subject: [PATCH 268/741] remove a warning message --- pcbnew/class_board_connected_item.cpp | 15 +++------------ pcbnew/modview_frame.cpp | 2 +- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/pcbnew/class_board_connected_item.cpp b/pcbnew/class_board_connected_item.cpp index 73bdced99a..0248131d35 100644 --- a/pcbnew/class_board_connected_item.cpp +++ b/pcbnew/class_board_connected_item.cpp @@ -109,9 +109,7 @@ int BOARD_CONNECTED_ITEM::GetClearance( BOARD_CONNECTED_ITEM* aItem ) const } else { -#ifdef DEBUG - wxLogWarning(wxT("BOARD_CONNECTED_ITEM::GetClearance():NULL netclass,type %d"), Type() ); -#endif + DBG(printf( "%s: NULL netclass,type %d", __func__, Type() );) } return 0; @@ -129,9 +127,7 @@ NETCLASS* BOARD_CONNECTED_ITEM::GetNetClass() const if( board == NULL ) // Should not occur { -#ifdef DEBUG - wxLogWarning( wxT("BOARD_CONNECTED_ITEM::GetNetClass():NULL board,type %d"), Type() ); -#endif + DBG(printf( "%s: NULL board,type %d", __func__, Type() );) return NULL; } @@ -142,12 +138,7 @@ NETCLASS* BOARD_CONNECTED_ITEM::GetNetClass() const { netclass = net->GetNetClass(); -#ifdef DEBUG - if( netclass == NULL ) - { - wxLogWarning( wxT("BOARD_CONNECTED_ITEM::GetNetClass():NULL netclass,type %d"), Type() ); - } -#endif + //DBG( if(!netclass) printf( "%s: NULL netclass,type %d", __func__, Type() );) } if( netclass ) diff --git a/pcbnew/modview_frame.cpp b/pcbnew/modview_frame.cpp index 96313fde13..b79a2c4d3c 100644 --- a/pcbnew/modview_frame.cpp +++ b/pcbnew/modview_frame.cpp @@ -281,7 +281,7 @@ FOOTPRINT_VIEWER_FRAME* FOOTPRINT_VIEWER_FRAME::GetActiveFootprintViewer( const // most immediate parent's. // NOTE: an open FOOTPRINT_VIEWER_FRAME may have either the PCB_EDIT_FRAME - // or the FOOTPRINT_EDIT_FRAME. + // or the FOOTPRINT_EDIT_FRAME as parent. KIWAY* kiway = &aParent->Kiway(); wxWindow* frame; From 8bfcb00aab026b2e96470b49dab74dfda579fb62 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Sun, 6 Apr 2014 13:50:59 -0500 Subject: [PATCH 269/741] kicad-install.sh uses https protocol. --- scripts/kicad-install-no_launchpad_account.sh | 327 ------------------ scripts/kicad-install.sh | 18 +- 2 files changed, 12 insertions(+), 333 deletions(-) delete mode 100644 scripts/kicad-install-no_launchpad_account.sh mode change 100755 => 100644 scripts/kicad-install.sh diff --git a/scripts/kicad-install-no_launchpad_account.sh b/scripts/kicad-install-no_launchpad_account.sh deleted file mode 100644 index 3a0d2d0078..0000000000 --- a/scripts/kicad-install-no_launchpad_account.sh +++ /dev/null @@ -1,327 +0,0 @@ -#!/bin/bash -e -# Install KiCad from source onto either: -# -> a Ubuntu/Debian/Mint or -# -> a Red Hat -# compatible linux system. -# -# The "install_prerequisites" step is the only "distro dependent" one. That step could be modified -# for other linux distros. -# -# There are 3 package groups in a KiCad install: -# 1) Compiled source code in the form of executable programs. -# 2) User manuals and other documentation typically as *.pdf files. -# 3) a) Schematic parts, b) layout footprints, and c) 3D models for footprints. -# -# To achieve 1) source is checked out from its repo and compiled by this script then executables -# are installed using CMake. -# To achieve 2) documentation is checked out from its repo and installed using CMake. -# TO achieve 3a) and 3c) they are checked out from their repos and installed using CMake. -# To achieve 3b) a global fp-lib-table is put into your home directory which points to -# http://github.com/KiCad. No actual footprints are installed locally, internet access is used -# during program operation to fetch footprints from github as if it was a remote drive in the cloud. -# If you want to install those same KiCad footprints locally, you may run a separate script -# named library-repos-install.sh found in this same directory. That script requires that "git" be on -# your system whereas this script does not. The footprints require some means to download them and -# bzr-git seems not up to the task. wget or curl would also work. - - -# Since bash is invoked with -e by the first line of this script, all the steps in this script -# must succeed otherwise bash will abort at the first non-zero error code. Therefore any script -# functions must be crafted to anticipate numerous conditions, such that no command fails unless it -# is a serious situation. - - -# Set where the 3 source trees will go, use a full path -WORKING_TREES=~/kicad_sources - -# CMake Options -OPTS="$OPTS -DCMAKE_BUILD_TYPE=Release" -OPTS="$OPTS -DBUILD_GITHUB_PLUGIN=ON" - -# Python scripting, uncomment to enable -#OPTS="$OPTS -DKICAD_SCRIPTING=ON -DKICAD_SCRIPTING_MODULES=ON -DKICAD_SCRIPTING_WXPYTHON=ON" - -#a connection to https://code.launchpad.net does not request a launchpad account -#but, obviously, you cannot commit anything -REPOS=https://code.launchpad.net -LEGACY_LIB_REPO=$REPOS/~dickelbeck/kicad/library-read-only -SRCS_REPO=$REPOS/~kicad-product-committers/kicad/product -DOCS_REPO=$REPOS/~kicad-developers/kicad/doc - - -usage() -{ - echo "" - echo " usage:" - echo "" - echo "./kicad-install.sh " - echo " where is one of:" - echo " --install-or-update (does full installation or update.)" - echo " --remove-sources (removes source trees for another attempt.)" - echo " --uninstall-libraries (removes KiCad supplied libraries.)" - echo " --uninstall-kicad (uninstalls all of KiCad but leaves source trees.)" - echo "" - echo "example:" - echo ' $ ./kicad-install.sh --install-or-update' -} - - -install_prerequisites() -{ - # Find a package manager, PM - PM=$( command -v yum || command -v apt-get ) - - # assume all these Debian, Mint, Ubuntu systems have same prerequisites - if [ "$(expr match "$PM" '.*\(apt-get\)')" == "apt-get" ]; then - #echo "debian compatible system" - sudo apt-get install \ - bzr \ - bzrtools \ - build-essential \ - cmake \ - cmake-curses-gui \ - debhelper \ - doxygen \ - grep \ - libbz2-dev \ - libcairo2-dev \ - libglew-dev \ - libssl-dev \ - libwxgtk2.8-dev \ - python-wxgtk2.8 - - # assume all yum systems have same prerequisites - elif [ "$(expr match "$PM" '.*\(yum\)')" == "yum" ]; then - #echo "red hat compatible system" - # Note: if you find this list not to be accurate, please submit a patch: - sudo yum groupinstall "Development Tools" - sudo yum install \ - bzr \ - bzrtools \ - bzip2-libs \ - bzip2-devel \ - cmake \ - cmake-gui \ - doxygen \ - cairo-devel \ - glew-devel \ - grep \ - openssl-devel \ - wxGTK-devel \ - wxPython - else - echo - echo "Incompatible System. Neither 'yum' nor 'apt-get' found. Not possible to continue." - echo - exit 1 - fi - - # ensure bzr name and email are set. No message since bzr prints an excellent diagnostic. - bzr whoami || exit 2 -} - - -rm_build_dir() -{ - local dir="$1" - - echo "removing directory $dir" - - if [ -e "$dir/install_manifest.txt" ]; then - # this file is often created as root, so remove as root - sudo rm "$dir/install_manifest.txt" 2> /dev/null - fi - - if [ -d "$dir" ]; then - rm -rf "$dir" - fi -} - - -cmake_uninstall() -{ - # assume caller set the CWD, and is only telling us about it in $1 - local dir="$1" - - cwd=`pwd` - if [ "$cwd" != "$dir" ]; then - echo "missing dir $dir" - elif [ ! -e install_manifest.txt ]; then - echo - echo "Missing file $dir/install_manifest.txt." - else - echo "uninstalling from $dir" - sudo make uninstall - sudo rm install_manifest.txt - fi -} - - -# Function set_env_var -# sets an environment variable globally. -set_env_var() -{ - local var=$1 - local val=$2 - - if [ -d /etc/profile.d ]; then - if [ ! -e /etc/profile.d/kicad.sh ] || ! grep "$var" /etc/profile.d/kicad.sh >> /dev/null; then - echo - echo "Adding environment variable $var to file /etc/profile.d/kicad.sh" - echo "Please logout and back in after this script completes for environment" - echo "variable to get set into environment." - sudo sh -c "echo export $var=$val >> /etc/profile.d/kicad.sh" - fi - - elif [ -e /etc/environment ]; then - if ! grep "$var" /etc/environment >> /dev/null; then - echo - echo "Adding environment variable $var to file /etc/environment" - echo "Please reboot after this script completes for environment variable to get set into environment." - sudo sh -c "echo $var=$val >> /etc/environment" - fi - fi -} - - -install_or_update() -{ - echo "step 1) installing pre-requisites" - install_prerequisites - - - echo "step 2) make $WORKING_TREES if it does not exist" - if [ ! -d "$WORKING_TREES" ]; then - sudo mkdir -p "$WORKING_TREES" - echo " mark $WORKING_TREES as owned by me" - sudo chown -R `whoami` "$WORKING_TREES" - fi - cd $WORKING_TREES - - - echo "step 3) checking out the source code from launchpad repo..." - if [ ! -d "$WORKING_TREES/kicad.bzr" ]; then - bzr checkout $SRCS_REPO kicad.bzr - echo " source repo to local working tree." - else - cd kicad.bzr - bzr up - echo " local source working tree updated." - cd ../ - fi - - if [ ! -d "$WORKING_TREES/kicad-lib.bzr" ]; then - bzr checkout $LEGACY_LIB_REPO kicad-lib.bzr - echo ' kicad-lib checked out.' - else - cd kicad-lib.bzr - bzr up - echo ' kicad-lib repo updated.' - cd ../ - fi - - echo "step 5) checking out the documentation from launchpad repo..." - if [ ! -d "$WORKING_TREES/kicad-doc.bzr" ]; then - bzr checkout $DOCS_REPO kicad-doc.bzr - echo " docs checked out." - else - cd kicad-doc.bzr - bzr up - echo " docs working tree updated." - cd ../ - fi - - - echo "step 6) compiling source code..." - cd kicad.bzr - if [ ! -d "build" ]; then - mkdir build && cd build - cmake $OPTS ../ - else - cd build - # Although a "make clean" is sometimes needed, more often than not it slows down the update - # more than it is worth. Do it manually if you need to in this directory. - # make clean - fi - make -j4 - echo " kicad compiled." - - - echo "step 7) installing KiCad program files..." - sudo make install - echo " kicad program files installed." - - - echo "step 8) installing libraries..." - cd ../../kicad-lib.bzr - rm_build_dir build - mkdir build && cd build - cmake ../ - sudo make install - echo " kicad-lib.bzr installed." - - - echo "step 9) as non-root, install user configuration files..." - # install ~/fp-lib-table - make install_github_fp-lib-table - echo " kicad user-configuration files installed." - - - echo "step 10) installing documentation..." - cd ../../kicad-doc.bzr - rm_build_dir build - mkdir build && cd build - cmake ../ - sudo make install - echo " kicad-doc.bzr installed." - - echo "step 11) check for environment variables..." - if [ -z "${KIGITHUB}" ]; then - set_env_var KIGITHUB https://github.com/KiCad - fi - - echo - echo 'All KiCad "--install-or-update" steps completed, you are up to date.' - echo -} - - -if [ $# -eq 1 -a "$1" == "--remove-sources" ]; then - echo "deleting $WORKING_TREES" - rm_build_dir "$WORKING_TREES/kicad.bzr/build" - rm_build_dir "$WORKING_TREES/kicad-lib.bzr/build" - rm_build_dir "$WORKING_TREES/kicad-doc.bzr/build" - rm -rf "$WORKING_TREES" - exit -fi - - -if [ $# -eq 1 -a "$1" == "--install-or-update" ]; then - install_or_update - exit -fi - - -if [ $# -eq 1 -a "$1" == "--uninstall-libraries" ]; then - cd "$WORKING_TREES/kicad-lib.bzr/build" - cmake_uninstall "$WORKING_TREES/kicad-lib.bzr/build" - exit -fi - - -if [ $# -eq 1 -a "$1" == "--uninstall-kicad" ]; then - cd "$WORKING_TREES/kicad.bzr/build" - cmake_uninstall "$WORKING_TREES/kicad.bzr/build" - - cd "$WORKING_TREES/kicad-lib.bzr/build" - cmake_uninstall "$WORKING_TREES/kicad-lib.bzr/build" - - # this may fail since "uninstall" support is a recent feature of this repo: - cd "$WORKING_TREES/kicad-doc.bzr/build" - cmake_uninstall "$WORKING_TREES/kicad-doc.bzr/build" - - exit -fi - - -usage diff --git a/scripts/kicad-install.sh b/scripts/kicad-install.sh old mode 100755 new mode 100644 index 6dab247203..015d757a31 --- a/scripts/kicad-install.sh +++ b/scripts/kicad-install.sh @@ -35,13 +35,19 @@ WORKING_TREES=~/kicad_sources # CMake Options -OPTS="$OPTS -DCMAKE_BUILD_TYPE=Release" -OPTS="$OPTS -DBUILD_GITHUB_PLUGIN=ON" +#OPTS="$OPTS -DBUILD_GITHUB_PLUGIN=OFF" # Python scripting, uncomment to enable #OPTS="$OPTS -DKICAD_SCRIPTING=ON -DKICAD_SCRIPTING_MODULES=ON -DKICAD_SCRIPTING_WXPYTHON=ON" -LIB_REPO=~dickelbeck/kicad/library-read-only +# Use https under bazaar to retrieve repos because this does not require a +# launchpad.net account. Whereas lp: requires a launchpad account. +# https results in read only access. +REPOS=https://code.launchpad.net + +LEGACY_LIB_REPO=$REPOS/~dickelbeck/kicad/library-read-only +SRCS_REPO=$REPOS/~kicad-product-committers/kicad/product +DOCS_REPO=$REPOS/~kicad-developers/kicad/doc usage() @@ -196,7 +202,7 @@ install_or_update() echo "step 3) checking out the source code from launchpad repo..." if [ ! -d "$WORKING_TREES/kicad.bzr" ]; then - bzr checkout lp:kicad kicad.bzr + bzr checkout $SRCS_REPO kicad.bzr echo " source repo to local working tree." else cd kicad.bzr @@ -206,7 +212,7 @@ install_or_update() fi if [ ! -d "$WORKING_TREES/kicad-lib.bzr" ]; then - bzr checkout "lp:$LIB_REPO" kicad-lib.bzr + bzr checkout $LEGACY_LIB_REPO kicad-lib.bzr echo ' kicad-lib checked out.' else cd kicad-lib.bzr @@ -217,7 +223,7 @@ install_or_update() echo "step 5) checking out the documentation from launchpad repo..." if [ ! -d "$WORKING_TREES/kicad-doc.bzr" ]; then - bzr checkout lp:~kicad-developers/kicad/doc kicad-doc.bzr + bzr checkout $DOCS_REPO kicad-doc.bzr echo " docs checked out." else cd kicad-doc.bzr From a196db3811e80cc25a82f0ef96b4ed074192f9ef Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Sun, 6 Apr 2014 14:12:37 -0500 Subject: [PATCH 270/741] use proper schematic parts library --- scripts/kicad-install.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/kicad-install.sh b/scripts/kicad-install.sh index 015d757a31..8bd792fe87 100644 --- a/scripts/kicad-install.sh +++ b/scripts/kicad-install.sh @@ -45,7 +45,14 @@ WORKING_TREES=~/kicad_sources # https results in read only access. REPOS=https://code.launchpad.net -LEGACY_LIB_REPO=$REPOS/~dickelbeck/kicad/library-read-only +# This is no longer maintained, is old +#LEGACY_LIB_REPO=$REPOS/~dickelbeck/kicad/library-read-only + +# This branch is a bzr/launchpad import of the Git repository +# at https://github.com/KiCad/kicad-library.git. +# It has schematic parts and 3D models in it. +LIBS_REPO=$REPOS/~kicad-product-committers/kicad/library + SRCS_REPO=$REPOS/~kicad-product-committers/kicad/product DOCS_REPO=$REPOS/~kicad-developers/kicad/doc @@ -211,8 +218,9 @@ install_or_update() cd ../ fi + echo "step 4) checking out the schematic parts and 3D library repo." if [ ! -d "$WORKING_TREES/kicad-lib.bzr" ]; then - bzr checkout $LEGACY_LIB_REPO kicad-lib.bzr + bzr checkout $LIBS_REPO kicad-lib.bzr echo ' kicad-lib checked out.' else cd kicad-lib.bzr From 35b554d9d94fbbd3a4731998ddcec438b4c39256 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Sun, 6 Apr 2014 14:21:10 -0500 Subject: [PATCH 271/741] make kicad-install.sh executable --- scripts/kicad-install.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 scripts/kicad-install.sh diff --git a/scripts/kicad-install.sh b/scripts/kicad-install.sh old mode 100644 new mode 100755 From 6fa2f060fa3bcbfbfb9aa6459da7416fd4a1518d Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 7 Apr 2014 13:32:09 +0200 Subject: [PATCH 272/741] Formatted ttl library to comply with KiCad coding policy. --- common/geometry/hetriang.cpp | 1246 +++++++------ include/ttl/halfedge/hedart.h | 175 +- include/ttl/halfedge/hetraits.h | 223 +-- include/ttl/halfedge/hetriang.h | 484 ++--- include/ttl/ttl.h | 2979 ++++++++++++++++--------------- include/ttl/ttl_util.h | 118 +- pcbnew/ratsnest_data.cpp | 34 +- pcbnew/ratsnest_data.h | 14 +- pcbnew/ratsnest_viewitem.cpp | 4 +- 9 files changed, 2707 insertions(+), 2570 deletions(-) diff --git a/common/geometry/hetriang.cpp b/common/geometry/hetriang.cpp index eb5e59ecf7..2172413966 100644 --- a/common/geometry/hetriang.cpp +++ b/common/geometry/hetriang.cpp @@ -48,685 +48,681 @@ #include #include - using namespace hed; -using namespace std; - #ifdef TTL_USE_NODE_ID - int Node::id_count = 0; + int NODE::id_count = 0; #endif //#define DEBUG_HE #ifdef DEBUG_HE #include - static void errorAndExit(char* message) { - cout << "\n!!! ERROR: "<< message << " !!!\n" << endl; exit(-1); - } +static void errorAndExit( char* aMessage ) +{ + cout << "\n!!! ERROR: "<< aMessage << " !!!\n" << endl; + exit( -1 ); +} #endif -//-------------------------------------------------------------------------------------------------- -static EdgePtr getLeadingEdgeInTriangle(const EdgePtr& e) { - EdgePtr edge = e; - - // Code: 3EF (assumes triangle) - if (!edge->isLeadingEdge()) { - edge = edge->getNextEdgeInFace(); - if (!edge->isLeadingEdge()) - edge = edge->getNextEdgeInFace(); - } - - if (!edge->isLeadingEdge()) { - return EdgePtr(); - } - - return edge; -} +static EDGE_PTR getLeadingEdgeInTriangle( const EDGE_PTR& aEdge ) +{ + EDGE_PTR edge = aEdge; + // Code: 3EF (assumes triangle) + if( !edge->IsLeadingEdge() ) + { + edge = edge->GetNextEdgeInFace(); -//-------------------------------------------------------------------------------------------------- -static void getLimits(NodesContainer::iterator first, - NodesContainer::iterator last, - int& xmin, int& ymin, - int& xmax, int& ymax) { - - xmin = ymin = std::numeric_limits::min(); - xmax = ymax = std::numeric_limits::max(); - - NodesContainer::iterator it; - for (it = first; it != last; ++it) { - xmin = min(xmin, (*it)->GetX()); - ymin = min(ymin, (*it)->GetY()); - xmax = max(xmax, (*it)->GetX()); - ymax = max(ymax, (*it)->GetY()); - } -} - - -//-------------------------------------------------------------------------------------------------- -EdgePtr Triangulation::initTwoEnclosingTriangles(NodesContainer::iterator first, - NodesContainer::iterator last) { - - int xmin, ymin, xmax, ymax; - getLimits(first, last, xmin, ymin, xmax, ymax); - - // Add 10% of range: - double fac = 10.0; - double dx = (xmax-xmin)/fac; - double dy = (ymax-ymin)/fac; - - NodePtr n1 = boost::make_shared(xmin-dx, ymin-dy); - NodePtr n2 = boost::make_shared(xmax+dx, ymin-dy); - NodePtr n3 = boost::make_shared(xmax+dx, ymax+dy); - NodePtr n4 = boost::make_shared(xmin-dx, ymax+dy); - - // diagonal - EdgePtr e1d = boost::make_shared(); - EdgePtr e2d = boost::make_shared(); - - // lower triangle - EdgePtr e11 = boost::make_shared(); - EdgePtr e12 = boost::make_shared(); - - // upper triangle - EdgePtr e21 = boost::make_shared(); - EdgePtr e22 = boost::make_shared(); - - // lower triangle - e1d->setSourceNode(n3); - e1d->setNextEdgeInFace(e11); - e1d->setTwinEdge(e2d); - addLeadingEdge(e1d); - - e11->setSourceNode(n1); - e11->setNextEdgeInFace(e12); - - e12->setSourceNode(n2); - e12->setNextEdgeInFace(e1d); - - // upper triangle - e2d->setSourceNode(n1); - e2d->setNextEdgeInFace(e21); - e2d->setTwinEdge(e1d); - addLeadingEdge(e2d); - - e21->setSourceNode(n3); - e21->setNextEdgeInFace(e22); - - e22->setSourceNode(n4); - e22->setNextEdgeInFace(e2d); - - return e11; -} - - -//-------------------------------------------------------------------------------------------------- -Triangulation::Triangulation() { - helper = new ttl::TriangulationHelper( *this ); -} - - -//-------------------------------------------------------------------------------------------------- -Triangulation::Triangulation(const Triangulation& tr) { - std::cout << "Triangulation: Copy constructor not present - EXIT."; - exit(-1); -} - - -//-------------------------------------------------------------------------------------------------- -Triangulation::~Triangulation() { - cleanAll(); - delete helper; -} - - -//-------------------------------------------------------------------------------------------------- -void Triangulation::createDelaunay(NodesContainer::iterator first, - NodesContainer::iterator last) { - - cleanAll(); - - EdgePtr bedge = initTwoEnclosingTriangles(first, last); - Dart dc(bedge); - - Dart d_iter = dc; - - NodesContainer::iterator it; - for (it = first; it != last; ++it) { - helper->insertNode(d_iter, *it); - } - - // In general (e.g. for the triangle based data structure), the initial dart - // may have been changed. - // It is the users responsibility to get a valid boundary dart here. - // The half-edge data structure preserves the initial dart. - // (A dart at the boundary can also be found by trying to locate a - // triangle "outside" the triangulation.) - - // Assumes rectangular domain - helper->removeRectangularBoundary(dc); -} - - -//-------------------------------------------------------------------------------------------------- -void Triangulation::removeTriangle(EdgePtr& edge) { - - EdgePtr e1 = getLeadingEdgeInTriangle(edge); - -#ifdef DEBUG_HE - if (!e1) - errorAndExit("Triangulation::removeTriangle: could not find leading edge"); -#endif - - removeLeadingEdgeFromList(e1); - // cout << "No leading edges = " << leadingEdges_.size() << endl; - // Remove the triangle - EdgePtr e2(e1->getNextEdgeInFace()); - EdgePtr e3(e2->getNextEdgeInFace()); - - e1->clear(); - e2->clear(); - e3->clear(); -} - - -//-------------------------------------------------------------------------------------------------- -void Triangulation::reverse_splitTriangle(EdgePtr& edge) { - - // Reverse operation of splitTriangle - - EdgePtr e1(edge->getNextEdgeInFace()); - EdgePtr le(getLeadingEdgeInTriangle(e1)); -#ifdef DEBUG_HE - if (!le) - errorAndExit("Triangulation::removeTriangle: could not find leading edge"); -#endif - removeLeadingEdgeFromList(le); - - EdgePtr e2(e1->getNextEdgeInFace()->getTwinEdge()->getNextEdgeInFace()); - le = getLeadingEdgeInTriangle(e2); -#ifdef DEBUG_HE - if (!le) - errorAndExit("Triangulation::removeTriangle: could not find leading edge"); -#endif - removeLeadingEdgeFromList(le); - - EdgePtr e3(edge->getTwinEdge()->getNextEdgeInFace()->getNextEdgeInFace()); - le = getLeadingEdgeInTriangle(e3); -#ifdef DEBUG_HE - if (!le) - errorAndExit("Triangulation::removeTriangle: could not find leading edge"); -#endif - removeLeadingEdgeFromList(le); - - // The three triangles at the node have now been removed - // from the triangulation, but the arcs have not been deleted. - // Next delete the 6 half edges radiating from the node - // The node is maintained by handle and need not be deleted explicitly - EdgePtr estar = edge; - EdgePtr enext = estar->getTwinEdge()->getNextEdgeInFace(); - estar->getTwinEdge()->clear(); - estar->clear(); - - estar = enext; - enext = estar->getTwinEdge()->getNextEdgeInFace(); - estar->getTwinEdge()->clear(); - estar->clear(); - - enext->getTwinEdge()->clear(); - enext->clear(); - - - // Create the new triangle - e1->setNextEdgeInFace(e2); - e2->setNextEdgeInFace(e3); - e3->setNextEdgeInFace(e1); - addLeadingEdge(e1); -} - - -//-------------------------------------------------------------------------------------------------- -Dart Triangulation::createDart() { - - // Return an arbitrary CCW dart - return Dart(*leadingEdges_.begin()); -} - - -//-------------------------------------------------------------------------------------------------- -bool Triangulation::removeLeadingEdgeFromList(EdgePtr& leadingEdge) { - - // Remove the edge from the list of leading edges, - // but don't delete it. - // Also set flag for leading edge to false. - // Must search from start of list. Since edges are added to the - // start of the list during triangulation, this operation will - // normally be fast (when used in the triangulation algorithm) - list::iterator it; - for (it = leadingEdges_.begin(); it != leadingEdges_.end(); ++it) { - - EdgePtr edge = *it; - if (edge == leadingEdge) { - - edge->setAsLeadingEdge(false); - it = leadingEdges_.erase(it); - - return true; + if( !edge->IsLeadingEdge() ) + edge = edge->GetNextEdgeInFace(); } - } - - return false; + + if( !edge->IsLeadingEdge() ) + { + return EDGE_PTR(); + } + + return edge; } -//-------------------------------------------------------------------------------------------------- -void Triangulation::cleanAll() { - BOOST_FOREACH(EdgePtr& edge, leadingEdges_) - edge->setNextEdgeInFace(EdgePtr()); +static void getLimits( NODES_CONTAINER::iterator aFirst, NODES_CONTAINER::iterator aLast, + int& aXmin, int& aYmin, int& aXmax, int& aYmax) +{ + aXmin = aYmin = std::numeric_limits::min(); + aXmax = aYmax = std::numeric_limits::max(); + + NODES_CONTAINER::iterator it; + + for( it = aFirst; it != aLast; ++it ) + { + aXmin = std::min( aXmin, ( *it )->GetX() ); + aYmin = std::min( aYmin, ( *it )->GetY() ); + aXmax = std::max( aXmax, ( *it )->GetX() ); + aYmax = std::max( aYmax, ( *it )->GetY() ); + } } -//-------------------------------------------------------------------------------------------------- -void Triangulation::swapEdge(Dart& dart) { - swapEdge(dart.getEdge()); +EDGE_PTR TRIANGULATION::InitTwoEnclosingTriangles( NODES_CONTAINER::iterator aFirst, + NODES_CONTAINER::iterator aLast) +{ + int xmin, ymin, xmax, ymax; + getLimits( aFirst, aLast, xmin, ymin, xmax, ymax ); + + // Add 10% of range: + double fac = 10.0; + double dx = ( xmax - xmin ) / fac; + double dy = ( ymax - ymin ) / fac; + + NODE_PTR n1 = boost::make_shared( xmin - dx, ymin - dy ); + NODE_PTR n2 = boost::make_shared( xmax + dx, ymin - dy ); + NODE_PTR n3 = boost::make_shared( xmax + dx, ymax + dy ); + NODE_PTR n4 = boost::make_shared( xmin - dx, ymax + dy ); + + // diagonal + EDGE_PTR e1d = boost::make_shared(); + EDGE_PTR e2d = boost::make_shared(); + + // lower triangle + EDGE_PTR e11 = boost::make_shared(); + EDGE_PTR e12 = boost::make_shared(); + + // upper triangle + EDGE_PTR e21 = boost::make_shared(); + EDGE_PTR e22 = boost::make_shared(); + + // lower triangle + e1d->SetSourceNode( n3 ); + e1d->SetNextEdgeInFace( e11 ); + e1d->SetTwinEdge( e2d ); + addLeadingEdge( e1d ); + + e11->SetSourceNode( n1 ); + e11->SetNextEdgeInFace( e12 ); + + e12->SetSourceNode( n2 ); + e12->SetNextEdgeInFace( e1d ); + + // upper triangle + e2d->SetSourceNode( n1 ); + e2d->SetNextEdgeInFace( e21 ); + e2d->SetTwinEdge( e1d ); + addLeadingEdge( e2d ); + + e21->SetSourceNode( n3 ); + e21->SetNextEdgeInFace( e22 ); + + e22->SetSourceNode( n4 ); + e22->SetNextEdgeInFace( e2d ); + + return e11; } -//-------------------------------------------------------------------------------------------------- -void Triangulation::splitTriangle(Dart& dart, const NodePtr& point) { - EdgePtr edge = splitTriangle(dart.getEdge(), point); - dart.init(edge); +TRIANGULATION::TRIANGULATION() +{ + m_helper = new ttl::TRIANGULATION_HELPER( *this ); } -//-------------------------------------------------------------------------------------------------- -void Triangulation::reverse_splitTriangle(Dart& dart) { - reverse_splitTriangle(dart.getEdge()); +TRIANGULATION::TRIANGULATION( const TRIANGULATION& aTriangulation ) +{ + // Triangulation: Copy constructor not present + assert( false ); } -//-------------------------------------------------------------------------------------------------- -void Triangulation::removeBoundaryTriangle(Dart& d) { - removeTriangle(d.getEdge()); +TRIANGULATION::~TRIANGULATION() +{ + cleanAll(); + delete m_helper; +} + + +void TRIANGULATION::CreateDelaunay( NODES_CONTAINER::iterator aFirst, + NODES_CONTAINER::iterator aLast ) +{ + cleanAll(); + + EDGE_PTR bedge = InitTwoEnclosingTriangles( aFirst, aLast ); + DART dc( bedge ); + + DART d_iter = dc; + + NODES_CONTAINER::iterator it; + for( it = aFirst; it != aLast; ++it ) + { + m_helper->InsertNode( d_iter, *it ); + } + + // In general (e.g. for the triangle based data structure), the initial dart + // may have been changed. + // It is the users responsibility to get a valid boundary dart here. + // The half-edge data structure preserves the initial dart. + // (A dart at the boundary can also be found by trying to locate a + // triangle "outside" the triangulation.) + + // Assumes rectangular domain + m_helper->RemoveRectangularBoundary( dc ); +} + + +void TRIANGULATION::RemoveTriangle( EDGE_PTR& aEdge ) +{ + EDGE_PTR e1 = getLeadingEdgeInTriangle( aEdge ); + +#ifdef DEBUG_HE + if( !e1 ) + errorAndExit( "Triangulation::removeTriangle: could not find leading aEdge" ); +#endif + + removeLeadingEdgeFromList( e1 ); + // cout << "No leading edges = " << leadingEdges_.size() << endl; + // Remove the triangle + EDGE_PTR e2( e1->GetNextEdgeInFace() ); + EDGE_PTR e3( e2->GetNextEdgeInFace() ); + + e1->Clear(); + e2->Clear(); + e3->Clear(); +} + + +void TRIANGULATION::ReverseSplitTriangle( EDGE_PTR& aEdge ) +{ + // Reverse operation of splitTriangle + EDGE_PTR e1( aEdge->GetNextEdgeInFace() ); + EDGE_PTR le( getLeadingEdgeInTriangle( e1 ) ); +#ifdef DEBUG_HE + if (!le) + errorAndExit("Triangulation::removeTriangle: could not find leading edge"); +#endif + removeLeadingEdgeFromList( le ); + + EDGE_PTR e2( e1->GetNextEdgeInFace()->GetTwinEdge()->GetNextEdgeInFace() ); + le = getLeadingEdgeInTriangle( e2 ); +#ifdef DEBUG_HE + if (!le) + errorAndExit("Triangulation::removeTriangle: could not find leading edge"); +#endif + removeLeadingEdgeFromList( le ); + + EDGE_PTR e3( aEdge->GetTwinEdge()->GetNextEdgeInFace()->GetNextEdgeInFace() ); + le = getLeadingEdgeInTriangle( e3 ); +#ifdef DEBUG_HE + if (!le) + errorAndExit("Triangulation::removeTriangle: could not find leading edge"); +#endif + removeLeadingEdgeFromList( le ); + + // The three triangles at the node have now been removed + // from the triangulation, but the arcs have not been deleted. + // Next delete the 6 half edges radiating from the node + // The node is maintained by handle and need not be deleted explicitly + EDGE_PTR estar = aEdge; + EDGE_PTR enext = estar->GetTwinEdge()->GetNextEdgeInFace(); + estar->GetTwinEdge()->Clear(); + estar->Clear(); + + estar = enext; + enext = estar->GetTwinEdge()->GetNextEdgeInFace(); + estar->GetTwinEdge()->Clear(); + estar->Clear(); + + enext->GetTwinEdge()->Clear(); + enext->Clear(); + + // Create the new triangle + e1->SetNextEdgeInFace( e2 ); + e2->SetNextEdgeInFace( e3 ); + e3->SetNextEdgeInFace( e1 ); + addLeadingEdge( e1 ); +} + + +DART TRIANGULATION::CreateDart() +{ + // Return an arbitrary CCW dart + return DART( *m_leadingEdges.begin() ); +} + + +bool TRIANGULATION::removeLeadingEdgeFromList( EDGE_PTR& aLeadingEdge ) +{ + // Remove the edge from the list of leading edges, + // but don't delete it. + // Also set flag for leading edge to false. + // Must search from start of list. Since edges are added to the + // start of the list during triangulation, this operation will + // normally be fast (when used in the triangulation algorithm) + std::list::iterator it; + for( it = m_leadingEdges.begin(); it != m_leadingEdges.end(); ++it ) + { + EDGE_PTR edge = *it; + + if( edge == aLeadingEdge ) + { + edge->SetAsLeadingEdge( false ); + it = m_leadingEdges.erase( it ); + + return true; + } + } + + return false; +} + + +void TRIANGULATION::cleanAll() +{ + BOOST_FOREACH( EDGE_PTR& edge, m_leadingEdges ) + edge->SetNextEdgeInFace( EDGE_PTR() ); +} + + +void TRIANGULATION::swapEdge( DART& aDart ) +{ + SwapEdge( aDart.GetEdge() ); +} + + +void TRIANGULATION::splitTriangle( DART& aDart, const NODE_PTR& aPoint ) +{ + EDGE_PTR edge = SplitTriangle( aDart.GetEdge(), aPoint ); + aDart.Init( edge ); +} + + +void TRIANGULATION::reverseSplitTriangle( DART& aDart ) +{ + ReverseSplitTriangle( aDart.GetEdge() ); +} + + +void TRIANGULATION::removeBoundaryTriangle( DART& aDart ) +{ + RemoveTriangle( aDart.GetEdge() ); } #ifdef TTL_USE_NODE_FLAG -//-------------------------------------------------------------------------------------------------- -// This is a "template" for accessing all nodes (but multiple tests) -void Triangulation::flagNodes(bool flag) const { - - list::const_iterator it; - for (it = leadingEdges_.begin(); it != leadingEdges_.end(); ++it) { - EdgePtr edge = *it; - - for (int i = 0; i < 3; ++i) { - edge->getSourceNode()->SetFlag(flag); - edge = edge->getNextEdgeInFace(); - } - } -} +void TRIANGULATION::FlagNodes( bool aFlag ) const +{ + std::list::const_iterator it; + for( it = m_leadingEdges.begin(); it != m_leadingEdges.end(); ++it ) + { + EDGE_PTR edge = *it; - -//-------------------------------------------------------------------------------------------------- -list* Triangulation::getNodes() const { - - flagNodes(false); - list* nodeList = new list; - - list::const_iterator it; - for (it = leadingEdges_.begin(); it != leadingEdges_.end(); ++it) { - EdgePtr edge = *it; - - for (int i = 0; i < 3; ++i) { - const NodePtr& node = edge->getSourceNode(); - - if (node->GetFlag() == false) { - nodeList->push_back(node); - node->SetFlag(true); - } - edge = edge->getNextEdgeInFace(); - } - } - return nodeList; -} -#endif - - -//-------------------------------------------------------------------------------------------------- -list* Triangulation::getEdges(bool skip_boundary_edges) const { - - // collect all arcs (one half edge for each arc) - // (boundary edges are also collected). - - list::const_iterator it; - list* elist = new list; - for (it = leadingEdges_.begin(); it != leadingEdges_.end(); ++it) { - EdgePtr edge = *it; - for (int i = 0; i < 3; ++i) { - EdgePtr twinedge = edge->getTwinEdge(); - // only one of the half-edges - - if ( (!twinedge && !skip_boundary_edges) || - (twinedge && ((size_t)edge.get() > (size_t)twinedge.get())) ) - elist->push_front(edge); - - edge = edge->getNextEdgeInFace(); - } - } - return elist; -} - - -//-------------------------------------------------------------------------------------------------- -EdgePtr Triangulation::splitTriangle(EdgePtr& edge, const NodePtr& point) { - - // Add a node by just splitting a triangle into three triangles - // Assumes the half edge is located in the triangle - // Returns a half edge with source node as the new node - -// double x, y, z; -// x = point.x(); -// y = point.y(); -// z = point.z(); - - // e#_n are new edges - // e# are existing edges - // e#_n and e##_n are new twin edges - // e##_n are edges incident to the new node - - // Add the node to the structure - //NodePtr new_node(new Node(x,y,z)); - - NodePtr n1(edge->getSourceNode()); - EdgePtr e1(edge); - - EdgePtr e2(edge->getNextEdgeInFace()); - NodePtr n2(e2->getSourceNode()); - - EdgePtr e3(e2->getNextEdgeInFace()); - NodePtr n3(e3->getSourceNode()); - - EdgePtr e1_n = boost::make_shared(); - EdgePtr e11_n = boost::make_shared(); - EdgePtr e2_n = boost::make_shared(); - EdgePtr e22_n = boost::make_shared(); - EdgePtr e3_n = boost::make_shared(); - EdgePtr e33_n = boost::make_shared(); - - e1_n->setSourceNode(n1); - e11_n->setSourceNode(point); - e2_n->setSourceNode(n2); - e22_n->setSourceNode(point); - e3_n->setSourceNode(n3); - e33_n->setSourceNode(point); - - e1_n->setTwinEdge(e11_n); - e11_n->setTwinEdge(e1_n); - e2_n->setTwinEdge(e22_n); - e22_n->setTwinEdge(e2_n); - e3_n->setTwinEdge(e33_n); - e33_n->setTwinEdge(e3_n); - - e1_n->setNextEdgeInFace(e33_n); - e2_n->setNextEdgeInFace(e11_n); - e3_n->setNextEdgeInFace(e22_n); - - e11_n->setNextEdgeInFace(e1); - e22_n->setNextEdgeInFace(e2); - e33_n->setNextEdgeInFace(e3); - - // and update old's next edge - e1->setNextEdgeInFace(e2_n); - e2->setNextEdgeInFace(e3_n); - e3->setNextEdgeInFace(e1_n); - - // add the three new leading edges, - // Must remove the old leading edge from the list. - // Use the field telling if an edge is a leading edge - // NOTE: Must search in the list!!! - - if (e1->isLeadingEdge()) - removeLeadingEdgeFromList(e1); - else if (e2->isLeadingEdge()) - removeLeadingEdgeFromList(e2); - else if(e3->isLeadingEdge()) - removeLeadingEdgeFromList(e3); - else - assert( false ); // one of the edges should be leading - - addLeadingEdge(e1_n); - addLeadingEdge(e2_n); - addLeadingEdge(e3_n); - - // Return a half edge incident to the new node (with the new node as source node) - - return e11_n; -} - - -//-------------------------------------------------------------------------------------------------- -void Triangulation::swapEdge(EdgePtr& diagonal) { - - // Note that diagonal is both input and output and it is always - // kept in counterclockwise direction (this is not required by all - // functions in TriangulationHelper now) - - // Swap by rotating counterclockwise - // Use the same objects - no deletion or new objects - EdgePtr eL(diagonal); - EdgePtr eR(eL->getTwinEdge()); - EdgePtr eL_1(eL->getNextEdgeInFace()); - EdgePtr eL_2(eL_1->getNextEdgeInFace()); - EdgePtr eR_1(eR->getNextEdgeInFace()); - EdgePtr eR_2(eR_1->getNextEdgeInFace()); - - // avoid node to be dereferenced to zero and deleted - NodePtr nR(eR_2->getSourceNode()); - NodePtr nL(eL_2->getSourceNode()); - - eL->setSourceNode(nR); - eR->setSourceNode(nL); - - // and now 6 1-sewings - eL->setNextEdgeInFace(eL_2); - eL_2->setNextEdgeInFace(eR_1); - eR_1->setNextEdgeInFace(eL); - - eR->setNextEdgeInFace(eR_2); - eR_2->setNextEdgeInFace(eL_1); - eL_1->setNextEdgeInFace(eR); - - if (eL->isLeadingEdge()) - removeLeadingEdgeFromList(eL); - else if (eL_1->isLeadingEdge()) - removeLeadingEdgeFromList(eL_1); - else if (eL_2->isLeadingEdge()) - removeLeadingEdgeFromList(eL_2); - - if (eR->isLeadingEdge()) - removeLeadingEdgeFromList(eR); - else if (eR_1->isLeadingEdge()) - removeLeadingEdgeFromList(eR_1); - else if (eR_2->isLeadingEdge()) - removeLeadingEdgeFromList(eR_2); - - addLeadingEdge(eL); - addLeadingEdge(eR); -} - - -////-------------------------------------------------------------------------- -//static void printEdge(const Dart& dart, ostream& ofile) { -// -// Dart d0 = dart; -// d0.alpha0(); -// -// ofile << dart.x() << " " << dart.y() << endl; -// ofile << d0.x() << " " << d0.y() << endl; -//} - - -//-------------------------------------------------------------------------- -bool Triangulation::checkDelaunay() const { - - // ???? outputs !!!! - // ofstream os("qweND.dat"); - const list& leadingEdges = getLeadingEdges(); - - list::const_iterator it; - bool ok = true; - int noNotDelaunay = 0; - - for (it = leadingEdges.begin(); it != leadingEdges.end(); ++it) { - EdgePtr edge = *it; - - for (int i = 0; i < 3; ++i) { - EdgePtr twinedge = edge->getTwinEdge(); - - // only one of the half-edges - if (!twinedge || (size_t)edge.get() > (size_t)twinedge.get()) { - Dart dart(edge); - if (helper->swapTestDelaunay(dart)) { - noNotDelaunay++; - - //printEdge(dart,os); os << "\n"; - ok = false; - //cout << "............. not Delaunay .... " << endl; + for( int i = 0; i < 3; ++i ) + { + edge->GetSourceNode()->SetFlag( aFlag ); + edge = edge->GetNextEdgeInFace(); } - } - edge = edge->getNextEdgeInFace(); } - } - -#ifdef DEBUG_HE - cout << "!!! Triangulation is NOT Delaunay: " << noNotDelaunay << " edges\n" << endl; +} + + +std::list* TRIANGULATION::GetNodes() const +{ + FlagNodes( false ); + std::list* nodeList = new std::list; + std::list::const_iterator it; + + for( it = m_leadingEdges.begin(); it != m_leadingEdges.end(); ++it ) + { + EDGE_PTR edge = *it; + + for( int i = 0; i < 3; ++i ) + { + const NODE_PTR& node = edge->GetSourceNode(); + + if( node->GetFlag() == false ) + { + nodeList->push_back( node ); + node->SetFlag( true ); + } + edge = edge->GetNextEdgeInFace(); + } + } + return nodeList; +} #endif - - return ok; -} -//-------------------------------------------------------------------------------------------------- -void Triangulation::optimizeDelaunay() { +std::list* TRIANGULATION::GetEdges( bool aSkipBoundaryEdges ) const +{ + // collect all arcs (one half edge for each arc) + // (boundary edges are also collected). + std::list::const_iterator it; + std::list* elist = new std::list; - // This function is also present in ttl where it is implemented - // generically. - // The implementation below is tailored for the half-edge data structure, - // and is thus more efficient + for( it = m_leadingEdges.begin(); it != m_leadingEdges.end(); ++it ) + { + EDGE_PTR edge = *it; + for( int i = 0; i < 3; ++i ) + { + EDGE_PTR twinedge = edge->GetTwinEdge(); + // only one of the half-edges - // Collect all interior edges (one half edge for each arc) - bool skip_boundary_edges = true; - list* elist = getEdges(skip_boundary_edges); - - // Assumes that elist has only one half-edge for each arc. - bool cycling_check = true; - bool optimal = false; - list::const_iterator it; - while(!optimal) { - optimal = true; - for (it = elist->begin(); it != elist->end(); ++it) { - EdgePtr edge = *it; - - Dart dart(edge); - // Constrained edges should not be swapped - if (helper->swapTestDelaunay(dart, cycling_check)) { - optimal = false; - swapEdge(edge); - } + if( ( !twinedge && !aSkipBoundaryEdges ) + || ( twinedge && ( (size_t) edge.get() > (size_t) twinedge.get() ) ) ) + elist->push_front( edge ); + + edge = edge->GetNextEdgeInFace(); + } } - } - delete elist; + + return elist; } -//-------------------------------------------------------------------------------------------------- -EdgePtr Triangulation::getInteriorNode() const { - - const list& leadingEdges = getLeadingEdges(); - list::const_iterator it; - for (it = leadingEdges.begin(); it != leadingEdges.end(); ++it) { - EdgePtr edge = *it; - - // multiple checks, but only until found - for (int i = 0; i < 3; ++i) { - if (edge->getTwinEdge()) { - - if (!helper->isBoundaryNode(Dart(edge))) - return edge; - } - edge = edge->getNextEdgeInFace(); +EDGE_PTR TRIANGULATION::SplitTriangle( EDGE_PTR& aEdge, const NODE_PTR& aPoint ) +{ + // Add a node by just splitting a triangle into three triangles + // Assumes the half aEdge is located in the triangle + // Returns a half aEdge with source node as the new node + + // e#_n are new edges + // e# are existing edges + // e#_n and e##_n are new twin edges + // e##_n are edges incident to the new node + + // Add the node to the structure + //NODE_PTR new_node(new Node(x,y,z)); + + NODE_PTR n1( aEdge->GetSourceNode() ); + EDGE_PTR e1( aEdge ); + + EDGE_PTR e2( aEdge->GetNextEdgeInFace() ); + NODE_PTR n2( e2->GetSourceNode() ); + + EDGE_PTR e3( e2->GetNextEdgeInFace() ); + NODE_PTR n3( e3->GetSourceNode() ); + + EDGE_PTR e1_n = boost::make_shared(); + EDGE_PTR e11_n = boost::make_shared(); + EDGE_PTR e2_n = boost::make_shared(); + EDGE_PTR e22_n = boost::make_shared(); + EDGE_PTR e3_n = boost::make_shared(); + EDGE_PTR e33_n = boost::make_shared(); + + e1_n->SetSourceNode( n1 ); + e11_n->SetSourceNode( aPoint ); + e2_n->SetSourceNode( n2 ); + e22_n->SetSourceNode( aPoint ); + e3_n->SetSourceNode( n3 ); + e33_n->SetSourceNode( aPoint ); + + e1_n->SetTwinEdge( e11_n ); + e11_n->SetTwinEdge( e1_n ); + e2_n->SetTwinEdge( e22_n ); + e22_n->SetTwinEdge( e2_n ); + e3_n->SetTwinEdge( e33_n ); + e33_n->SetTwinEdge( e3_n ); + + e1_n->SetNextEdgeInFace( e33_n ); + e2_n->SetNextEdgeInFace( e11_n ); + e3_n->SetNextEdgeInFace( e22_n ); + + e11_n->SetNextEdgeInFace( e1 ); + e22_n->SetNextEdgeInFace( e2 ); + e33_n->SetNextEdgeInFace( e3 ); + + // and update old's next aEdge + e1->SetNextEdgeInFace( e2_n ); + e2->SetNextEdgeInFace( e3_n ); + e3->SetNextEdgeInFace( e1_n ); + + // add the three new leading edges, + // Must remove the old leading aEdge from the list. + // Use the field telling if an aEdge is a leading aEdge + // NOTE: Must search in the list!!! + + if( e1->IsLeadingEdge() ) + removeLeadingEdgeFromList( e1 ); + else if( e2->IsLeadingEdge() ) + removeLeadingEdgeFromList( e2 ); + else if( e3->IsLeadingEdge() ) + removeLeadingEdgeFromList( e3 ); + else + assert( false ); // one of the edges should be leading + + addLeadingEdge( e1_n ); + addLeadingEdge( e2_n ); + addLeadingEdge( e3_n ); + + // Return a half aEdge incident to the new node (with the new node as source node) + + return e11_n; +} + + +void TRIANGULATION::SwapEdge( EDGE_PTR& aDiagonal ) +{ + // Note that diagonal is both input and output and it is always + // kept in counterclockwise direction (this is not required by all + // functions in TriangulationHelper now) + + // Swap by rotating counterclockwise + // Use the same objects - no deletion or new objects + EDGE_PTR eL( aDiagonal ); + EDGE_PTR eR( eL->GetTwinEdge() ); + EDGE_PTR eL_1( eL->GetNextEdgeInFace() ); + EDGE_PTR eL_2( eL_1->GetNextEdgeInFace() ); + EDGE_PTR eR_1( eR->GetNextEdgeInFace() ); + EDGE_PTR eR_2( eR_1->GetNextEdgeInFace() ); + + // avoid node to be dereferenced to zero and deleted + NODE_PTR nR( eR_2->GetSourceNode() ); + NODE_PTR nL( eL_2->GetSourceNode() ); + + eL->SetSourceNode( nR ); + eR->SetSourceNode( nL ); + + // and now 6 1-sewings + eL->SetNextEdgeInFace( eL_2 ); + eL_2->SetNextEdgeInFace( eR_1 ); + eR_1->SetNextEdgeInFace( eL ); + + eR->SetNextEdgeInFace( eR_2 ); + eR_2->SetNextEdgeInFace( eL_1 ); + eL_1->SetNextEdgeInFace( eR ); + + if( eL->IsLeadingEdge() ) + removeLeadingEdgeFromList( eL ); + else if( eL_1->IsLeadingEdge() ) + removeLeadingEdgeFromList( eL_1 ); + else if( eL_2->IsLeadingEdge() ) + removeLeadingEdgeFromList( eL_2 ); + + if( eR->IsLeadingEdge() ) + removeLeadingEdgeFromList( eR ); + else if( eR_1->IsLeadingEdge() ) + removeLeadingEdgeFromList( eR_1 ); + else if( eR_2->IsLeadingEdge() ) + removeLeadingEdgeFromList( eR_2 ); + + addLeadingEdge( eL ); + addLeadingEdge( eR ); +} + + +bool TRIANGULATION::CheckDelaunay() const +{ + // ???? outputs !!!! + // ofstream os("qweND.dat"); + const std::list& leadingEdges = GetLeadingEdges(); + + std::list::const_iterator it; + bool ok = true; + int noNotDelaunay = 0; + + for( it = leadingEdges.begin(); it != leadingEdges.end(); ++it ) + { + EDGE_PTR edge = *it; + + for( int i = 0; i < 3; ++i ) + { + EDGE_PTR twinedge = edge->GetTwinEdge(); + + // only one of the half-edges + if( !twinedge || (size_t) edge.get() > (size_t) twinedge.get() ) + { + DART dart( edge ); + if( m_helper->SwapTestDelaunay( dart ) ) + { + noNotDelaunay++; + + //printEdge(dart,os); os << "\n"; + ok = false; + //cout << "............. not Delaunay .... " << endl; + } + } + + edge = edge->GetNextEdgeInFace(); + } } - } - return EdgePtr(); // no boundary nodes + +#ifdef DEBUG_HE + cout << "!!! Triangulation is NOT Delaunay: " << noNotDelaunay << " edges\n" << endl; +#endif + + return ok; } -//-------------------------------------------------------------------------------------------------- -EdgePtr Triangulation::getBoundaryEdgeInTriangle(const EdgePtr& e) const { - EdgePtr edge = e; - - if (helper->isBoundaryEdge(Dart(edge))) - return edge; +void TRIANGULATION::OptimizeDelaunay() +{ + // This function is also present in ttl where it is implemented + // generically. + // The implementation below is tailored for the half-edge data structure, + // and is thus more efficient - edge = edge->getNextEdgeInFace(); - if (helper->isBoundaryEdge(Dart(edge))) - return edge; + // Collect all interior edges (one half edge for each arc) + bool skip_boundary_edges = true; + std::list* elist = GetEdges( skip_boundary_edges ); - edge = edge->getNextEdgeInFace(); - if (helper->isBoundaryEdge(Dart(edge))) - return edge; - - return EdgePtr(); -} + // Assumes that elist has only one half-edge for each arc. + bool cycling_check = true; + bool optimal = false; + std::list::const_iterator it; + while( !optimal ) + { + optimal = true; -//-------------------------------------------------------------------------------------------------- -EdgePtr Triangulation::getBoundaryEdge() const { + for( it = elist->begin(); it != elist->end(); ++it ) + { + EDGE_PTR edge = *it; - // Get an arbitrary (CCW) boundary edge - // If the triangulation is closed, NULL is returned - - const list& leadingEdges = getLeadingEdges(); - list::const_iterator it; - EdgePtr edge; - - for (it = leadingEdges.begin(); it != leadingEdges.end(); ++it) { - edge = getBoundaryEdgeInTriangle(*it); - - if (edge) - return edge; - } - return EdgePtr(); -} - - -//-------------------------------------------------------------------------------------------------- -void Triangulation::printEdges(ofstream& os) const { - - // Print source node and target node for each edge face by face, - // but only one of the half-edges. - - const list& leadingEdges = getLeadingEdges(); - list::const_iterator it; - for (it = leadingEdges.begin(); it != leadingEdges.end(); ++it) { - EdgePtr edge = *it; - - for (int i = 0; i < 3; ++i) { - EdgePtr twinedge = edge->getTwinEdge(); - - // Print only one edge (the highest value of the pointer) - if (!twinedge || (size_t)edge.get() > (size_t)twinedge.get()) { - // Print source node and target node - NodePtr node = edge->getSourceNode(); - os << node->GetX() << " " << node->GetY() << endl; - node = edge->getTargetNode(); - os << node->GetX() << " " << node->GetY() << endl; - os << '\n'; // blank line - } - edge = edge->getNextEdgeInFace(); + DART dart( edge ); + // Constrained edges should not be swapped + if( m_helper->SwapTestDelaunay( dart, cycling_check ) ) + { + optimal = false; + SwapEdge( edge ); + } + } + } + + delete elist; +} + + +EDGE_PTR TRIANGULATION::GetInteriorNode() const +{ + const std::list& leadingEdges = GetLeadingEdges(); + std::list::const_iterator it; + + for( it = leadingEdges.begin(); it != leadingEdges.end(); ++it ) + { + EDGE_PTR edge = *it; + + // multiple checks, but only until found + for( int i = 0; i < 3; ++i ) + { + if( edge->GetTwinEdge() ) + { + if( !m_helper->IsBoundaryNode( DART( edge ) ) ) + return edge; + } + + edge = edge->GetNextEdgeInFace(); + } + } + + return EDGE_PTR(); // no boundary nodes +} + + +EDGE_PTR TRIANGULATION::GetBoundaryEdgeInTriangle( const EDGE_PTR& aEdge ) const +{ + EDGE_PTR edge = aEdge; + + if( m_helper->IsBoundaryEdge( DART( edge ) ) ) + return edge; + + edge = edge->GetNextEdgeInFace(); + if( m_helper->IsBoundaryEdge( DART( edge ) ) ) + return edge; + + edge = edge->GetNextEdgeInFace(); + if( m_helper->IsBoundaryEdge( DART( edge ) ) ) + return edge; + + return EDGE_PTR(); +} + + +EDGE_PTR TRIANGULATION::GetBoundaryEdge() const +{ + // Get an arbitrary (CCW) boundary edge + // If the triangulation is closed, NULL is returned + const std::list& leadingEdges = GetLeadingEdges(); + std::list::const_iterator it; + EDGE_PTR edge; + + for( it = leadingEdges.begin(); it != leadingEdges.end(); ++it ) + { + edge = GetBoundaryEdgeInTriangle( *it ); + + if( edge ) + return edge; + } + return EDGE_PTR(); +} + + +void TRIANGULATION::PrintEdges( std::ofstream& aOutput ) const +{ + // Print source node and target node for each edge face by face, + // but only one of the half-edges. + const std::list& leadingEdges = GetLeadingEdges(); + std::list::const_iterator it; + + for( it = leadingEdges.begin(); it != leadingEdges.end(); ++it ) + { + EDGE_PTR edge = *it; + + for( int i = 0; i < 3; ++i ) + { + EDGE_PTR twinedge = edge->GetTwinEdge(); + + // Print only one edge (the highest value of the pointer) + if( !twinedge || (size_t) edge.get() > (size_t) twinedge.get() ) + { + // Print source node and target node + NODE_PTR node = edge->GetSourceNode(); + aOutput << node->GetX() << " " << node->GetY() << std::endl; + node = edge->GetTargetNode(); + aOutput << node->GetX() << " " << node->GetY() << std::endl; + aOutput << '\n'; // blank line + } + + edge = edge->GetNextEdgeInFace(); + } } - } } diff --git a/include/ttl/halfedge/hedart.h b/include/ttl/halfedge/hedart.h index f85678963a..2749c5087c 100644 --- a/include/ttl/halfedge/hedart.h +++ b/include/ttl/halfedge/hedart.h @@ -40,111 +40,152 @@ #ifndef _HALF_EDGE_DART_ #define _HALF_EDGE_DART_ - #include +namespace hed +{ +/** + * \class Dart + * \brief \b %Dart class for the half-edge data structure. + * + * See \ref api for a detailed description of how the member functions + * should be implemented. + */ +class DART +{ + EDGE_PTR m_edge; -namespace hed { + /// Dart direction: true if dart is counterclockwise in face + bool m_dir; - - //------------------------------------------------------------------------------------------------ - // Dart class for the half-edge data structure - //------------------------------------------------------------------------------------------------ - - /** \class Dart - * \brief \b %Dart class for the half-edge data structure. - * - * See \ref api for a detailed description of how the member functions - * should be implemented. - */ - - class Dart { - - EdgePtr edge_; - bool dir_; // true if dart is counterclockwise in face - - public: +public: /// Default constructor - Dart() { dir_ = true; } + DART() + { + m_dir = true; + } /// Constructor - Dart(const EdgePtr& edge, bool dir = true) { edge_ = edge; dir_ = dir; } + DART( const EDGE_PTR& aEdge, bool aDir = true ) + { + m_edge = aEdge; + m_dir = aDir; + } /// Copy constructor - Dart(const Dart& dart) { edge_ = dart.edge_; dir_ = dart.dir_; } + DART( const DART& aDart ) + { + m_edge = aDart.m_edge; + m_dir = aDart.m_dir; + } /// Destructor - ~Dart() {} + ~DART() + { + } /// Assignment operator - Dart& operator = (const Dart& dart) { - if (this == &dart) + DART& operator=( const DART& aDart ) + { + if( this == &aDart ) + return *this; + + m_edge = aDart.m_edge; + m_dir = aDart.m_dir; + return *this; - edge_ = dart.edge_; - dir_ = dart.dir_; - return *this; } /// Comparing dart objects - bool operator==(const Dart& dart) const { - if (dart.edge_ == edge_ && dart.dir_ == dir_) - return true; - return false; + bool operator==( const DART& aDart ) const + { + return ( aDart.m_edge == m_edge && aDart.m_dir == m_dir ); } /// Comparing dart objects - bool operator!=(const Dart& dart) const { - return !(dart==*this); + bool operator!=( const DART& aDart ) const + { + return !( aDart == *this ); } /// Maps the dart to a different node - Dart& alpha0() { dir_ = !dir_; return *this; } + DART& Alpha0() + { + m_dir = !m_dir; + return *this; + } /// Maps the dart to a different edge - Dart& alpha1() { - if (dir_) { - edge_ = edge_->getNextEdgeInFace()->getNextEdgeInFace(); - dir_ = false; - } - else { - edge_ = edge_->getNextEdgeInFace(); - dir_ = true; - } - return *this; + DART& Alpha1() + { + if( m_dir ) + { + m_edge = m_edge->GetNextEdgeInFace()->GetNextEdgeInFace(); + m_dir = false; + } + else + { + m_edge = m_edge->GetNextEdgeInFace(); + m_dir = true; + } + + return *this; } /// Maps the dart to a different triangle. \b Note: the dart is not changed if it is at the boundary! - Dart& alpha2() { - if (edge_->getTwinEdge()) { - edge_ = edge_->getTwinEdge(); - dir_ = !dir_; - } - // else, the dart is at the boundary and should not be changed - return *this; + DART& Alpha2() + { + if( m_edge->GetTwinEdge() ) + { + m_edge = m_edge->GetTwinEdge(); + m_dir = !m_dir; + } + + // else, the dart is at the boundary and should not be changed + return *this; } - - // Utilities not required by TTL - // ----------------------------- - /** @name Utilities not required by TTL */ //@{ + void Init( const EDGE_PTR& aEdge, bool aDir = true ) + { + m_edge = aEdge; + m_dir = aDir; + } - void init(const EdgePtr& edge, bool dir = true) { edge_ = edge; dir_ = dir; } + double X() const + { + return GetNode()->GetX(); + } - double x() const { return getNode()->GetX(); } // x-coordinate of source node - double y() const { return getNode()->GetY(); } // y-coordinate of source node + double Y() const + { + return GetNode()->GetY(); + } - bool isCounterClockWise() const { return dir_; } + bool IsCCW() const + { + return m_dir; + } - const NodePtr& getNode() const { return dir_ ? edge_->getSourceNode() : edge_->getTargetNode(); } - const NodePtr& getOppositeNode() const { return dir_ ? edge_->getTargetNode() : edge_->getSourceNode(); } - EdgePtr& getEdge() { return edge_; } + const NODE_PTR& GetNode() const + { + return m_dir ? m_edge->GetSourceNode() : m_edge->GetTargetNode(); + } + + const NODE_PTR& GetOppositeNode() const + { + return m_dir ? m_edge->GetTargetNode() : m_edge->GetSourceNode(); + } + + EDGE_PTR& GetEdge() + { + return m_edge; + } //@} // End of Utilities not required by TTL +}; - }; - -}; // End of hed namespace +} // End of hed namespace #endif diff --git a/include/ttl/halfedge/hetraits.h b/include/ttl/halfedge/hetraits.h index e24cd0697d..04288a0ba5 100644 --- a/include/ttl/halfedge/hetraits.h +++ b/include/ttl/halfedge/hetraits.h @@ -40,136 +40,149 @@ #ifndef _HALF_EDGE_TRAITS_ #define _HALF_EDGE_TRAITS_ - #include #include - -namespace hed { - - - //------------------------------------------------------------------------------------------------ - // Traits class for the half-edge data structure - //------------------------------------------------------------------------------------------------ - - /** \struct TTLtraits - * \brief \b Traits class (static struct) for the half-edge data structure. - * - * The member functions are those required by different function templates - * in the TTL. Documentation is given here to explain what actions - * should be carried out on the actual data structure as required by the functions - * in the \ref ttl namespace. - * - * The source code of \c %HeTraits.h shows how the traits class is implemented for the - * half-edge data structure. - * - * \see \ref api - * - */ - - struct TTLtraits { +namespace hed +{ +/** + * \struct TTLtraits + * \brief \b Traits class (static struct) for the half-edge data structure. + * + * The member functions are those required by different function templates + * in the TTL. Documentation is given here to explain what actions + * should be carried out on the actual data structure as required by the functions + * in the \ref ttl namespace. + * + * The source code of \c %HeTraits.h shows how the traits class is implemented for the + * half-edge data structure. + * + * \see \ref api + */ +struct TTLtraits +{ + /** + * The floating point type used in calculations involving scalar products and cross products. + */ + typedef double REAL_TYPE; - /** The floating point type used in calculations - * involving scalar products and cross products. - */ - typedef double real_type; - - - //---------------------------------------------------------------------------------------------- - // ------------------------------- Geometric Predicates Group --------------------------------- - //---------------------------------------------------------------------------------------------- - /** @name Geometric Predicates */ //@{ + /** + * Scalar product between two 2D vectors represented as darts.\n + * + * ttl_util::scalarProduct2d can be used. + */ + static REAL_TYPE ScalarProduct2D( const DART& aV1, const DART& aV2 ) + { + DART v10 = aV1; + v10.Alpha0(); - //---------------------------------------------------------------------------------------------- - /** Scalar product between two 2D vectors represented as darts.\n - * - * ttl_util::scalarProduct2d can be used. - */ - static real_type scalarProduct2d(const Dart& v1, const Dart& v2) { - Dart v10 = v1; v10.alpha0(); - Dart v20 = v2; v20.alpha0(); - return ttl_util::scalarProduct2d(v10.x()-v1.x(), v10.y()-v1.y(), - v20.x()-v2.x(), v20.y()-v2.y()); + DART v20 = aV2; + v20.Alpha0(); + + return ttl_util::ScalarProduct2D( v10.X() - aV1.X(), v10.Y() - aV1.Y(), + v20.X() - aV2.X(), v20.Y() - aV2.Y() ); } + /** + * Scalar product between two 2D vectors. + * The first vector is represented by a dart \e v, and the second + * vector has direction from the source node of \e v to the point \e p.\n + * + * ttl_util::ScalarProduct2D can be used. + */ + static REAL_TYPE ScalarProduct2D( const DART& aV, const NODE_PTR& aP ) + { + DART d0 = aV; + d0.Alpha0(); - //---------------------------------------------------------------------------------------------- - /** Scalar product between two 2D vectors. - * The first vector is represented by a dart \e v, and the second - * vector has direction from the source node of \e v to the point \e p.\n - * - * ttl_util::scalarProduct2d can be used. - */ - static real_type scalarProduct2d(const Dart& v, const NodePtr& p) { - Dart d0 = v; d0.alpha0(); - return ttl_util::scalarProduct2d(d0.x() - v.x(), d0.y() - v.y(), - p->GetX() - v.x(), p->GetY() - v.y()); + return ttl_util::ScalarProduct2D( d0.X() - aV.X(), d0.Y() - aV.Y(), + aP->GetX() - aV.X(), aP->GetY() - aV.Y() ); } + /** + * Cross product between two vectors in the plane represented as darts. + * The z-component of the cross product is returned.\n + * + * ttl_util::CrossProduct2D can be used. + */ + static REAL_TYPE CrossProduct2D( const DART& aV1, const DART& aV2 ) + { + DART v10 = aV1; + v10.Alpha0(); - //---------------------------------------------------------------------------------------------- - /** Cross product between two vectors in the plane represented as darts. - * The z-component of the cross product is returned.\n - * - * ttl_util::crossProduct2d can be used. - */ - static real_type crossProduct2d(const Dart& v1, const Dart& v2) { - Dart v10 = v1; v10.alpha0(); - Dart v20 = v2; v20.alpha0(); - return ttl_util::crossProduct2d(v10.x()-v1.x(), v10.y()-v1.y(), - v20.x()-v2.x(), v20.y()-v2.y()); + DART v20 = aV2; + v20.Alpha0(); + + return ttl_util::CrossProduct2D( v10.X() - aV1.X(), v10.Y() - aV1.Y(), + v20.X() - aV2.X(), v20.Y() - aV2.Y() ); } + /** + * Cross product between two vectors in the plane. + * The first vector is represented by a dart \e v, and the second + * vector has direction from the source node of \e v to the point \e p. + * The z-component of the cross product is returned.\n + * + * ttl_util::CrossProduct2d can be used. + */ + static REAL_TYPE CrossProduct2D( const DART& aV, const NODE_PTR& aP ) + { + DART d0 = aV; + d0.Alpha0(); - //---------------------------------------------------------------------------------------------- - /** Cross product between two vectors in the plane. - * The first vector is represented by a dart \e v, and the second - * vector has direction from the source node of \e v to the point \e p. - * The z-component of the cross product is returned.\n - * - * ttl_util::crossProduct2d can be used. - */ - static real_type crossProduct2d(const Dart& v, const NodePtr& p) { - Dart d0 = v; d0.alpha0(); - return ttl_util::crossProduct2d(d0.x() - v.x(), d0.y() - v.y(), - p->GetX() - v.x(), p->GetY() - v.y()); + return ttl_util::CrossProduct2D( d0.X() - aV.X(), d0.Y() - aV.Y(), + aP->GetX() - aV.X(), aP->GetY() - aV.Y() ); } + /** + * Let \e n1 and \e n2 be the nodes associated with two darts, and let \e p + * be a point in the plane. Return a positive value if \e n1, \e n2, + * and \e p occur in counterclockwise order; a negative value if they occur + * in clockwise order; and zero if they are collinear. + */ + static REAL_TYPE Orient2D( const DART& aN1, const DART& aN2, const NODE_PTR& aP ) + { + REAL_TYPE pa[2]; + REAL_TYPE pb[2]; + REAL_TYPE pc[2]; - //---------------------------------------------------------------------------------------------- - /** Let \e n1 and \e n2 be the nodes associated with two darts, and let \e p - * be a point in the plane. Return a positive value if \e n1, \e n2, - * and \e p occur in counterclockwise order; a negative value if they occur - * in clockwise order; and zero if they are collinear. - */ - static real_type orient2d(const Dart& n1, const Dart& n2, const NodePtr& p) { - real_type pa[2]; real_type pb[2]; real_type pc[2]; - pa[0] = n1.x(); pa[1] = n1.y(); - pb[0] = n2.x(); pb[1] = n2.y(); - pc[0] = p->GetX(); pc[1] = p->GetY(); - return ttl_util::orient2dfast(pa, pb, pc); + pa[0] = aN1.X(); + pa[1] = aN1.Y(); + pb[0] = aN2.X(); + pb[1] = aN2.Y(); + pc[0] = aP->GetX(); + pc[1] = aP->GetY(); + + return ttl_util::Orient2DFast( pa, pb, pc ); } + /** + * This is the same predicate as represented with the function above, + * but with a slighty different interface: + * The last parameter is given as a dart where the source node of the dart + * represents a point in the plane. + * This function is required for constrained triangulation. + */ + static REAL_TYPE Orient2D( const DART& aN1, const DART& aN2, const DART& aP ) + { + REAL_TYPE pa[2]; + REAL_TYPE pb[2]; + REAL_TYPE pc[2]; - //---------------------------------------------------------------------------------------------- - /** This is the same predicate as represented with the function above, - * but with a slighty different interface: - * The last parameter is given as a dart where the source node of the dart - * represents a point in the plane. - * This function is required for constrained triangulation. - */ - static real_type orient2d(const Dart& n1, const Dart& n2, const Dart& p) { - real_type pa[2]; real_type pb[2]; real_type pc[2]; - pa[0] = n1.x(); pa[1] = n1.y(); - pb[0] = n2.x(); pb[1] = n2.y(); - pc[0] = p.x(); pc[1] = p.y(); - return ttl_util::orient2dfast(pa, pb, pc); + pa[0] = aN1.X(); + pa[1] = aN1.Y(); + pb[0] = aN2.X(); + pb[1] = aN2.Y(); + pc[0] = aP.X(); + pc[1] = aP.Y(); + + return ttl_util::Orient2DFast( pa, pb, pc ); } //@} // End of Geometric Predicates Group - }; +}; }; // End of hed namespace diff --git a/include/ttl/halfedge/hetriang.h b/include/ttl/halfedge/hetriang.h index 2c5380864e..f84c542e5a 100644 --- a/include/ttl/halfedge/hetriang.h +++ b/include/ttl/halfedge/hetriang.h @@ -42,11 +42,9 @@ #ifndef _HE_TRIANG_H_ #define _HE_TRIANG_H_ - #define TTL_USE_NODE_ID // Each node gets it's own unique id #define TTL_USE_NODE_FLAG // Each node gets a flag (can be set to true or false) - #include #include #include @@ -55,43 +53,40 @@ #include #include -namespace ttl { - class TriangulationHelper; +namespace ttl +{ + class TRIANGULATION_HELPER; }; -//-------------------------------------------------------------------------------------------------- -// The half-edge data structure -//-------------------------------------------------------------------------------------------------- - -namespace hed { - // Helper typedefs - class Node; - class Edge; - typedef boost::shared_ptr NodePtr; - typedef boost::shared_ptr EdgePtr; - typedef boost::weak_ptr EdgeWeakPtr; - typedef std::vector NodesContainer; - - //------------------------------------------------------------------------------------------------ - // Node class for data structures - //------------------------------------------------------------------------------------------------ - - /** \class Node - * \brief \b Node class for data structures (Inherits from HandleId) - * - * \note - * - To enable node IDs, TTL_USE_NODE_ID must be defined. - * - To enable node flags, TTL_USE_NODE_FLAG must be defined. - * - TTL_USE_NODE_ID and TTL_USE_NODE_FLAG should only be enabled if this functionality is - * required by the application, because they increase the memory usage for each Node object. - */ - - class Node { +/** + * The half-edge data structure + */ +namespace hed +{ +// Helper typedefs +class NODE; +class EDGE; +typedef boost::shared_ptr NODE_PTR; +typedef boost::shared_ptr EDGE_PTR; +typedef boost::weak_ptr EDGE_WEAK_PTR; +typedef std::vector NODES_CONTAINER; +/** + * \class NODE + * \brief \b Node class for data structures (Inherits from HandleId) + * + * \note + * - To enable node IDs, TTL_USE_NODE_ID must be defined. + * - To enable node flags, TTL_USE_NODE_FLAG must be defined. + * - TTL_USE_NODE_ID and TTL_USE_NODE_FLAG should only be enabled if this functionality is + * required by the application, because they increase the memory usage for each Node object. + */ +class NODE +{ protected: #ifdef TTL_USE_NODE_FLAG /// TTL_USE_NODE_FLAG must be defined - bool flag_; + bool m_flag; #endif #ifdef TTL_USE_NODE_ID @@ -99,303 +94,378 @@ protected: static int id_count; /// A unique id for each node (TTL_USE_NODE_ID must be defined) - int id_; + int m_id; #endif - int x_, y_; + /// Node coordinates + int m_x, m_y; - unsigned int refCount_; + /// Reference count + unsigned int m_refCount; public: /// Constructor - Node( int x = 0, int y = 0 ) : + NODE( int aX = 0, int aY = 0 ) : #ifdef TTL_USE_NODE_FLAG - flag_( false ), + m_flag( false ), #endif #ifdef TTL_USE_NODE_ID - id_( id_count++ ), + m_id( id_count++ ), #endif - x_( x ), y_( y ), refCount_( 0 ) {} + m_x( aX ), m_y( aY ), m_refCount( 0 ) + { + } /// Destructor - ~Node() {} + ~NODE() {} /// Returns the x-coordinate - int GetX() const { return x_; } + int GetX() const + { + return m_x; + } /// Returns the y-coordinate - int GetY() const { return y_; } + int GetY() const + { + return m_y; + } #ifdef TTL_USE_NODE_ID /// Returns the id (TTL_USE_NODE_ID must be defined) - int Id() const { return id_; } + int Id() const + { + return m_id; + } #endif #ifdef TTL_USE_NODE_FLAG /// Sets the flag (TTL_USE_NODE_FLAG must be defined) - void SetFlag(bool aFlag) { flag_ = aFlag; } + void SetFlag( bool aFlag ) + { + m_flag = aFlag; + } /// Returns the flag (TTL_USE_NODE_FLAG must be defined) - const bool& GetFlag() const { return flag_; } + const bool& GetFlag() const + { + return m_flag; + } #endif - void IncRefCount() { refCount_++; } - void DecRefCount() { refCount_--; } - unsigned int GetRefCount() const { return refCount_; } - }; // End of class Node + void IncRefCount() + { + m_refCount++; + } + + void DecRefCount() + { + m_refCount--; + } + + unsigned int GetRefCount() const + { + return m_refCount; + } +}; - //------------------------------------------------------------------------------------------------ - // Edge class in the half-edge data structure - //------------------------------------------------------------------------------------------------ - - /** \class Edge - * \brief \b %Edge class in the in the half-edge data structure. - */ - - class Edge { - public: +/** + * \class EDGE + * \brief \b %Edge class in the in the half-edge data structure. + */ +class EDGE +{ +public: /// Constructor - Edge() : weight_(0), isLeadingEdge_(false) {} + EDGE() : m_weight( 0 ), m_isLeadingEdge( false ) + { + } /// Destructor - virtual ~Edge() {} + virtual ~EDGE() + { + } /// Sets the source node - void setSourceNode(const NodePtr& node) { sourceNode_ = node; } + void SetSourceNode( const NODE_PTR& aNode ) + { + m_sourceNode = aNode; + } /// Sets the next edge in face - void setNextEdgeInFace(const EdgePtr& edge) { nextEdgeInFace_ = edge; } + void SetNextEdgeInFace( const EDGE_PTR& aEdge ) + { + m_nextEdgeInFace = aEdge; + } /// Sets the twin edge - void setTwinEdge(const EdgePtr& edge) { twinEdge_ = edge; } + void SetTwinEdge( const EDGE_PTR& aEdge ) + { + m_twinEdge = aEdge; + } /// Sets the edge as a leading edge - void setAsLeadingEdge(bool val=true) { isLeadingEdge_ = val; } + void SetAsLeadingEdge( bool aLeading = true ) + { + m_isLeadingEdge = aLeading; + } /// Checks if an edge is a leading edge - bool isLeadingEdge() const { return isLeadingEdge_; } + bool IsLeadingEdge() const + { + return m_isLeadingEdge; + } /// Returns the twin edge - EdgePtr getTwinEdge() const { return twinEdge_.lock(); }; + EDGE_PTR GetTwinEdge() const + { + return m_twinEdge.lock(); + } - void clearTwinEdge() { twinEdge_.reset(); } + void ClearTwinEdge() + { + m_twinEdge.reset(); + } /// Returns the next edge in face - const EdgePtr& getNextEdgeInFace() const { return nextEdgeInFace_; } + const EDGE_PTR& GetNextEdgeInFace() const + { + return m_nextEdgeInFace; + } /// Retuns the source node - const NodePtr& getSourceNode() const { return sourceNode_; } + const NODE_PTR& GetSourceNode() const + { + return m_sourceNode; + } /// Returns the target node - virtual const NodePtr& getTargetNode() const { return nextEdgeInFace_->getSourceNode(); } - - void setWeight( unsigned int weight ) { weight_ = weight; } - - unsigned int getWeight() const { return weight_; } - - void clear() + virtual const NODE_PTR& GetTargetNode() const { - sourceNode_.reset(); - nextEdgeInFace_.reset(); + return m_nextEdgeInFace->GetSourceNode(); + } - if( !twinEdge_.expired() ) + void SetWeight( unsigned int weight ) + { + m_weight = weight; + } + + unsigned int GetWeight() const + { + return m_weight; + } + + void Clear() + { + m_sourceNode.reset(); + m_nextEdgeInFace.reset(); + + if( !m_twinEdge.expired() ) { - twinEdge_.lock()->clearTwinEdge(); - twinEdge_.reset(); + m_twinEdge.lock()->ClearTwinEdge(); + m_twinEdge.reset(); } } - protected: - NodePtr sourceNode_; - EdgeWeakPtr twinEdge_; - EdgePtr nextEdgeInFace_; - unsigned int weight_; - bool isLeadingEdge_; - }; // End of class Edge +protected: + NODE_PTR m_sourceNode; + EDGE_WEAK_PTR m_twinEdge; + EDGE_PTR m_nextEdgeInFace; + unsigned int m_weight; + bool m_isLeadingEdge; +}; - /** \class EdgeMST - * \brief \b Specialization of %Edge class to be used for Minimum Spanning Tree algorithm. + /** + * \class EDGE_MST + * \brief \b Specialization of %EDGE class to be used for Minimum Spanning Tree algorithm. */ - class EdgeMST : public Edge - { - private: - NodePtr target_; +class EDGE_MST : public EDGE +{ +private: + NODE_PTR m_target; - public: - EdgeMST( const NodePtr& source, const NodePtr& target, unsigned int weight = 0 ) : - target_(target) - { sourceNode_ = source; weight_ = weight; } - - EdgeMST( const Edge& edge ) +public: + EDGE_MST( const NODE_PTR& aSource, const NODE_PTR& aTarget, unsigned int aWeight = 0 ) : + m_target( aTarget ) { - sourceNode_ = edge.getSourceNode(); - target_ = edge.getTargetNode(); - weight_ = edge.getWeight(); + m_sourceNode = aSource; + m_weight = aWeight; } - ~EdgeMST() {}; + EDGE_MST( const EDGE& edge ) + { + m_sourceNode = edge.GetSourceNode(); + m_target = edge.GetTargetNode(); + m_weight = edge.GetWeight(); + } + + ~EDGE_MST() + { + } /// @copydoc Edge::setSourceNode() - virtual const NodePtr& getTargetNode() const { return target_; } - }; + virtual const NODE_PTR& GetTargetNode() const + { + return m_target; + } +}; +class DART; // Forward declaration (class in this namespace) - //------------------------------------------------------------------------------------------------ - class Dart; // Forward declaration (class in this namespace) +/** + * \class TRIANGULATION + * \brief \b %Triangulation class for the half-edge data structure with adaption to TTL. + */ +class TRIANGULATION +{ +protected: + /// One half-edge for each arc + std::list m_leadingEdges; - //------------------------------------------------------------------------------------------------ - // Triangulation class in the half-edge data structure - //------------------------------------------------------------------------------------------------ + ttl::TRIANGULATION_HELPER* m_helper; - /** \class Triangulation - * \brief \b %Triangulation class for the half-edge data structure with adaption to TTL. - */ - - class Triangulation { - - protected: - std::list leadingEdges_; // one half-edge for each arc - - ttl::TriangulationHelper* helper; - - void addLeadingEdge(EdgePtr& edge) { - edge->setAsLeadingEdge(); - leadingEdges_.push_front( edge ); + void addLeadingEdge( EDGE_PTR& aEdge ) + { + aEdge->SetAsLeadingEdge(); + m_leadingEdges.push_front( aEdge ); } - bool removeLeadingEdgeFromList(EdgePtr& leadingEdge); + bool removeLeadingEdgeFromList( EDGE_PTR& aLeadingEdge ); void cleanAll(); - + /** Swaps the edge associated with \e dart in the actual data structure. - * - *

- * \image html swapEdge.gif - *
- * - * \param dart - * Some of the functions require a dart as output. - * If this is required by the actual function, the dart should be delivered - * back in a position as seen if it was glued to the edge when swapping (rotating) - * the edge CCW; see the figure. - * - * \note - * - If the edge is \e constrained, or if it should not be swapped for - * some other reason, this function need not do the actual swap of the edge. - * - Some functions in TTL require that \c swapEdge is implemented such that - * darts outside the quadrilateral are not affected by the swap. - */ - void swapEdge(Dart& dart); + * + *
+ * \image html swapEdge.gif + *
+ * + * \param aDart + * Some of the functions require a dart as output. + * If this is required by the actual function, the dart should be delivered + * back in a position as seen if it was glued to the edge when swapping (rotating) + * the edge CCW; see the figure. + * + * \note + * - If the edge is \e constrained, or if it should not be swapped for + * some other reason, this function need not do the actual swap of the edge. + * - Some functions in TTL require that \c swapEdge is implemented such that + * darts outside the quadrilateral are not affected by the swap. + */ + void swapEdge( DART& aDart ); - /** Splits the triangle associated with \e dart in the actual data structure into - * three new triangles joining at \e point. - * - *
- * \image html splitTriangle.gif - *
- * - * \param dart - * Output: A CCW dart incident with the new node; see the figure. - */ - void splitTriangle(Dart& dart, const NodePtr& point); + /** + * Splits the triangle associated with \e dart in the actual data structure into + * three new triangles joining at \e point. + * + *
+ * \image html splitTriangle.gif + *
+ * + * \param aDart + * Output: A CCW dart incident with the new node; see the figure. + */ + void splitTriangle( DART& aDart, const NODE_PTR& aPoint ); - /** The reverse operation of TTLtraits::splitTriangle. - * This function is only required for functions that involve - * removal of interior nodes; see for example TrinagulationHelper::removeInteriorNode. - * - *
- * \image html reverse_splitTriangle.gif - *
- */ - void reverse_splitTriangle(Dart& dart); + /** + * The reverse operation of TTLtraits::splitTriangle. + * This function is only required for functions that involve + * removal of interior nodes; see for example TrinagulationHelper::RemoveInteriorNode. + * + *
+ * \image html reverse_splitTriangle.gif + *
+ */ + void reverseSplitTriangle( DART& aDart ); - /** Removes a triangle with an edge at the boundary of the triangulation - * in the actual data structure - */ - void removeBoundaryTriangle(Dart& d); + /** + * Removes a triangle with an edge at the boundary of the triangulation + * in the actual data structure + */ + void removeBoundaryTriangle( DART& aDart ); - public: +public: /// Default constructor - Triangulation(); - + TRIANGULATION(); + /// Copy constructor - Triangulation(const Triangulation& tr); + TRIANGULATION( const TRIANGULATION& aTriangulation ); /// Destructor - ~Triangulation(); - + ~TRIANGULATION(); + /// Creates a Delaunay triangulation from a set of points - void createDelaunay(NodesContainer::iterator first, - NodesContainer::iterator last); + void CreateDelaunay( NODES_CONTAINER::iterator aFirst, NODES_CONTAINER::iterator aLast ); /// Creates an initial Delaunay triangulation from two enclosing triangles // When using rectangular boundary - loop through all points and expand. // (Called from createDelaunay(...) when starting) - EdgePtr initTwoEnclosingTriangles(NodesContainer::iterator first, - NodesContainer::iterator last); - + EDGE_PTR InitTwoEnclosingTriangles( NODES_CONTAINER::iterator aFirst, + NODES_CONTAINER::iterator aLast ); // These two functions are required by TTL for Delaunay triangulation - + /// Swaps the edge associated with diagonal - void swapEdge(EdgePtr& diagonal); + void SwapEdge( EDGE_PTR& aDiagonal ); /// Splits the triangle associated with edge into three new triangles joining at point - EdgePtr splitTriangle(EdgePtr& edge, const NodePtr& point); - + EDGE_PTR SplitTriangle( EDGE_PTR& aEdge, const NODE_PTR& aPoint ); // Functions required by TTL for removing nodes in a Delaunay triangulation - + /// Removes the boundary triangle associated with edge - void removeTriangle(EdgePtr& edge); // boundary triangle required + void RemoveTriangle( EDGE_PTR& aEdge ); // boundary triangle required /// The reverse operation of removeTriangle - void reverse_splitTriangle(EdgePtr& edge); + void ReverseSplitTriangle( EDGE_PTR& aEdge ); /// Creates an arbitrary CCW dart - Dart createDart(); + DART CreateDart(); /// Returns a list of "triangles" (one leading half-edge for each triangle) - const std::list& getLeadingEdges() const { return leadingEdges_; } + const std::list& GetLeadingEdges() const + { + return m_leadingEdges; + } /// Returns the number of triangles - int noTriangles() const { return (int)leadingEdges_.size(); } - + int NoTriangles() const + { + return (int) m_leadingEdges.size(); + } + /// Returns a list of half-edges (one half-edge for each arc) - std::list* getEdges(bool skip_boundary_edges = false) const; + std::list* GetEdges( bool aSkipBoundaryEdges = false ) const; #ifdef TTL_USE_NODE_FLAG /// Sets flag in all the nodes - void flagNodes(bool flag) const; + void FlagNodes( bool aFlag ) const; /// Returns a list of nodes. This function requires TTL_USE_NODE_FLAG to be defined. \see Node. - std::list* getNodes() const; + std::list* GetNodes() const; #endif /// Swaps edges until the triangulation is Delaunay (constrained edges are not swapped) - void optimizeDelaunay(); + void OptimizeDelaunay(); /// Checks if the triangulation is Delaunay - bool checkDelaunay() const; + bool CheckDelaunay() const; /// Returns an arbitrary interior node (as the source node of the returned edge) - EdgePtr getInteriorNode() const; + EDGE_PTR GetInteriorNode() const; - EdgePtr getBoundaryEdgeInTriangle(const EdgePtr& e) const; + EDGE_PTR GetBoundaryEdgeInTriangle( const EDGE_PTR& aEdge ) const; /// Returns an arbitrary boundary edge - EdgePtr getBoundaryEdge() const; + EDGE_PTR GetBoundaryEdge() const; /// Print edges for plotting with, e.g., gnuplot - void printEdges(std::ofstream& os) const; - - friend class ttl::TriangulationHelper; - - }; // End of class Triangulation - + void PrintEdges( std::ofstream& aOutput ) const; + friend class ttl::TRIANGULATION_HELPER; +}; }; // End of hed namespace #endif diff --git a/include/ttl/ttl.h b/include/ttl/ttl.h index 7de2e7b08d..fae9a8434d 100644 --- a/include/ttl/ttl.h +++ b/include/ttl/ttl.h @@ -40,19 +40,18 @@ #ifndef _TTL_H_ #define _TTL_H_ - #include #include // Debugging #ifdef DEBUG_TTL - static void errorAndExit(char* message) { - cout << "\n!!! ERROR: " << message << " !!!\n" << endl; +static void errorAndExit( char* aMessage ) +{ + cout << "\n!!! ERROR: " << aMessage << " !!!\n" << endl; exit(-1); - } +} #endif - // Next on TOPOLOGY: // - get triangle strips // - weighted graph, algorithms using a weight (real) for each edge, @@ -63,559 +62,557 @@ // - analyze in detail locateFace: e.g. detect 0-orbit in case of infinite loop // around a node etc. - -/** \brief Main interface to TTL +/** + * \brief Main interface to TTL * -* This namespace contains the basic generic algorithms for the TTL, -* the Triangulation Template Library.\n +* This namespace contains the basic generic algorithms for the TTL, +* the Triangulation Template Library.\n * -* Examples of functionality are: -* - Incremental Delaunay triangulation -* - Constrained triangulation -* - Insert/remove nodes and constrained edges -* - Traversal operations -* - Misc. queries for extracting information for visualisation systems etc. +* Examples of functionality are: +* - Incremental Delaunay triangulation +* - Constrained triangulation +* - Insert/remove nodes and constrained edges +* - Traversal operations +* - Misc. queries for extracting information for visualisation systems etc. * -* \par General requirements and assumptions: -* - \e DartType and \e TraitsType should be implemented in accordance with the description -* in \ref api. -* - A \b "Requires:" section in the documentation of a function template -* shows which functionality is required in \e TraitsType to -* support that specific function.\n -* Functionalty required in \e DartType is the same (almost) for all -* function templates; see \ref api and the example referred to. -* - When a reference to a \e dart object is passed to a function in TTL, -* it is assumed that it is oriented \e counterclockwise (CCW) in a triangle -* unless it is explicitly mentioned that it can also be \e clockwise (CW). -* The same applies for a dart that is passed from a function in TTL to -* the users TraitsType class (or struct). -* - When an edge (represented with a dart) is swapped, it is assumed that darts -* outside the quadrilateral where the edge is a diagonal are not affected by -* the swap. Thus, \ref hed::TTLtraits::swapEdge "TraitsType::swapEdge" -* must be implemented in accordance with this rule. +* \par General requirements and assumptions: +* - \e DART_TYPE and \e TRAITS_TYPE should be implemented in accordance with the description +* in \ref api. +* - A \b "Requires:" section in the documentation of a function template +* shows which functionality is required in \e TRAITS_TYPE to +* support that specific function.\n +* Functionalty required in \e DART_TYPE is the same (almost) for all +* function templates; see \ref api and the example referred to. +* - When a reference to a \e dart object is passed to a function in TTL, +* it is assumed that it is oriented \e counterclockwise (CCW) in a triangle +* unless it is explicitly mentioned that it can also be \e clockwise (CW). +* The same applies for a dart that is passed from a function in TTL to +* the users TRAITS_TYPE class (or struct). +* - When an edge (represented with a dart) is swapped, it is assumed that darts +* outside the quadrilateral where the edge is a diagonal are not affected by +* the swap. Thus, \ref hed::TTLtraits::swapEdge "TRAITS_TYPE::swapEdge" +* must be implemented in accordance with this rule. * -* \par Glossary: -* - General terms are explained in \ref api. -* - \e CCW - counterclockwise -* - \e CW - clockwise -* - \e 0_orbit, \e 1_orbit and \e 2_orbit: A sequence of darts around -* a node, around an edge and in a triangle respectively; -* see get_0_orbit_interior and get_0_orbit_boundary -* - \e arc - In a triangulation an arc is equivalent with an edge +* \par Glossary: +* - General terms are explained in \ref api. +* - \e CCW - counterclockwise +* - \e CW - clockwise +* - \e 0_orbit, \e 1_orbit and \e 2_orbit: A sequence of darts around +* a node, around an edge and in a triangle respectively; +* see get_0_orbit_interior and get_0_orbit_boundary +* - \e arc - In a triangulation an arc is equivalent with an edge * -* \see -* \ref ttl_util and \ref api +* \see +* \ref ttl_util and \ref api * -* \author -* �yvind Hjelle, oyvindhj@ifi.uio.no +* \author +* �yvind Hjelle, oyvindhj@ifi.uio.no */ -namespace ttl { - -class TriangulationHelper +namespace ttl +{ +class TRIANGULATION_HELPER { #ifndef DOXYGEN_SHOULD_SKIP_THIS public: - TriangulationHelper(hed::Triangulation& triang) : triangulation(triang) - { - } + TRIANGULATION_HELPER( hed::TRIANGULATION& aTriang ) : + m_triangulation( aTriang ) + { + } - // Delaunay Triangulation - // ---------------------- - template - bool insertNode(DartType& dart, PointType& point); + // Delaunay Triangulation + template + bool InsertNode( DART_TYPE& aDart, POINT_TYPE& aPoint ); - template - void removeRectangularBoundary(DartType& dart); + template + void RemoveRectangularBoundary( DART_TYPE& aDart ); - template - void removeNode(DartType& dart); + template + void RemoveNode( DART_TYPE& aDart ); - template - void removeBoundaryNode(DartType& dart); + template + void RemoveBoundaryNode( DART_TYPE& aDart ); - template - void removeInteriorNode(DartType& dart); + template + void RemoveInteriorNode( DART_TYPE& aDart ); + // Topological and Geometric Queries + // --------------------------------- + template + static bool LocateFaceSimplest( const POINT_TYPE& aPoint, DART_TYPE& aDart ); - // Topological and Geometric Queries - // --------------------------------- - template - static bool locateFaceSimplest(const PointType& point, DartType& dart); + template + static bool LocateTriangle( const POINT_TYPE& aPoint, DART_TYPE& aDart ); - template - static bool locateTriangle(const PointType& point, DartType& dart); + template + static bool InTriangleSimplest( const POINT_TYPE& aPoint, const DART_TYPE& aDart ); - template - static bool inTriangleSimplest(const PointType& point, const DartType& dart); + template + static bool InTriangle( const POINT_TYPE& aPoint, const DART_TYPE& aDart ); - template - static bool inTriangle(const PointType& point, const DartType& dart); + template + static void GetBoundary( const DART_TYPE& aDart, DART_LIST_TYPE& aBoundary ); - template - static void getBoundary(const DartType& dart, DartListType& boundary); + template + static bool IsBoundaryEdge( const DART_TYPE& aDart ); - template - static bool isBoundaryEdge(const DartType& dart); + template + static bool IsBoundaryFace( const DART_TYPE& aDart ); - template - static bool isBoundaryFace(const DartType& dart); + template + static bool IsBoundaryNode( const DART_TYPE& aDart ); - template - static bool isBoundaryNode(const DartType& dart); + template + static int GetDegreeOfNode( const DART_TYPE& aDart ); - template - static int getDegreeOfNode(const DartType& dart); + template + static void Get0OrbitInterior( const DART_TYPE& aDart, DART_LIST_TYPE& aOrbit ); - template - static void get_0_orbit_interior(const DartType& dart, DartListType& orbit); + template + static void Get0OrbitBoundary( const DART_TYPE& aDart, DART_LIST_TYPE& aOrbit ); - template - static void get_0_orbit_boundary(const DartType& dart, DartListType& orbit); + template + static bool Same0Orbit( const DART_TYPE& aD1, const DART_TYPE& aD2 ); - template - static bool same_0_orbit(const DartType& d1, const DartType& d2); + template + static bool Same1Orbit( const DART_TYPE& aD1, const DART_TYPE& aD2 ); - template - static bool same_1_orbit(const DartType& d1, const DartType& d2); + template + static bool Same2Orbit( const DART_TYPE& aD1, const DART_TYPE& aD2 ); - template - static bool same_2_orbit(const DartType& d1, const DartType& d2); + template + static bool SwappableEdge( const DART_TYPE& aDart, bool aAllowDegeneracy = false ); - template - static bool swappableEdge(const DartType& dart, bool allowDegeneracy = false); + template + static void PositionAtNextBoundaryEdge( DART_TYPE& aDart ); - template - static void positionAtNextBoundaryEdge(DartType& dart); + template + static bool ConvexBoundary( const DART_TYPE& aDart ); - template - static bool convexBoundary(const DartType& dart); + // Utilities for Delaunay Triangulation + // ------------------------------------ + template + void OptimizeDelaunay( DART_LIST_TYPE& aElist ); + template + void OptimizeDelaunay( DART_LIST_TYPE& aElist, const typename DART_LIST_TYPE::iterator aEnd ); - // Utilities for Delaunay Triangulation - // ------------------------------------ - template - void optimizeDelaunay(DartListType& elist); + template + bool SwapTestDelaunay( const DART_TYPE& aDart, bool aCyclingCheck = false ) const; - template - void optimizeDelaunay(DartListType& elist, const typename DartListType::iterator end); + template + void RecSwapDelaunay( DART_TYPE& aDiagonal ); - template - bool swapTestDelaunay(const DartType& dart, bool cycling_check = false) const; + template + void SwapEdgesAwayFromInteriorNode( DART_TYPE& aDart, LIST_TYPE& aSwappedEdges ); - template - void recSwapDelaunay(DartType& diagonal); + template + void SwapEdgesAwayFromBoundaryNode( DART_TYPE& aDart, LIST_TYPE& aSwappedEdges ); - template - void swapEdgesAwayFromInteriorNode(DartType& dart, ListType& swapped_edges); + template + void SwapEdgeInList( const typename DART_LIST_TYPE::iterator& aIt, DART_LIST_TYPE& aElist ); - template - void swapEdgesAwayFromBoundaryNode(DartType& dart, ListType& swapped_edges); - - template - void swapEdgeInList(const typename DartListType::iterator& it, DartListType& elist); - - - // Constrained Triangulation - // ------------------------- - template - static DartType insertConstraint(DartType& dstart, DartType& dend, bool optimize_delaunay); + // Constrained Triangulation + // ------------------------- + template + static DART_TYPE InsertConstraint( DART_TYPE& aDStart, DART_TYPE& aDEnd, bool aOptimizeDelaunay ); private: - hed::Triangulation& triangulation; + hed::TRIANGULATION& m_triangulation; - template - void insertNodes(ForwardIterator first, ForwardIterator last, DartType& dart); + template + void insertNodes( FORWARD_ITERATOR aFirst, FORWARD_ITERATOR aLast, DART_TYPE& aDart ); - template - static bool isMemberOfFace(const TopologyElementType& topologyElement, const DartType& dart); + template + static bool isMemberOfFace( const TOPOLOGY_ELEMENT_TYPE& aTopologyElement, const DART_TYPE& aDart ); - template - static bool locateFaceWithNode(const NodeType& node, DartType& dart_iter); + template + static bool locateFaceWithNode( const NODE_TYPE& aNode, DART_TYPE& aDartIter ); - template - static void getAdjacentTriangles(const DartType& dart, DartType& t1, DartType& t2, DartType& t3); + template + static void getAdjacentTriangles( const DART_TYPE& aDart, DART_TYPE& aT1, DART_TYPE& aT2, + DART_TYPE& aT3 ); - template - static void getNeighborNodes(const DartType& dart, std::list& node_list, bool& boundary); + template + static void getNeighborNodes( const DART_TYPE& aDart, std::list& aNodeList, + bool& aBoundary ); - template - static bool degenerateTriangle(const DartType& dart); + template + static bool degenerateTriangle( const DART_TYPE& aDart ); }; #endif // DOXYGEN_SHOULD_SKIP_THIS - //------------------------------------------------------------------------------------------------ - // ------------------------------- Delaunay Triangulation Group --------------------------------- - //------------------------------------------------------------------------------------------------ - /** @name Delaunay Triangulation */ - //@{ - - //------------------------------------------------------------------------------------------------ - /** Inserts a new node in an existing Delaunay triangulation and - * swaps edges to obtain a new Delaunay triangulation. - * This is the basic function for incremental Delaunay triangulation. - * When starting from a set of points, an initial Delaunay triangulation - * can be created as two triangles forming a rectangle that contains - * all the points. - * After \c insertNode has been called repeatedly with all the points, - * removeRectangularBoundary can be called to remove triangles - * at the boundary of the triangulation so that the boundary - * form the convex hull of the points. - * - * Note that this incremetal scheme will run much faster if the points - * have been sorted lexicographically on \e x and \e y. - * - * \param dart - * An arbitrary CCW dart in the tringulation.\n - * Output: A CCW dart incident to the new node. - * - * \param point - * A point (node) to be inserted in the triangulation. - * - * \retval bool - * \c true if \e point was inserted; \c false if not.\n - * If \e point is outside the triangulation, or the input dart is not valid, - * \c false is returned. - * - * \require - * - \ref hed::TTLtraits::splitTriangle "TraitsType::splitTriangle" (DartType&, const PointType&) - * - * \using - * - locateTriangle - * - recSwapDelaunay - * - * \note - * - For efficiency reasons \e dart should be close to the insertion \e point. - * - * \see - * removeRectangularBoundary - */ - template - bool TriangulationHelper::insertNode(DartType& dart, PointType& point) { +//@{ +/** + * Inserts a new node in an existing Delaunay triangulation and + * swaps edges to obtain a new Delaunay triangulation. + * This is the basic function for incremental Delaunay triangulation. + * When starting from a set of points, an initial Delaunay triangulation + * can be created as two triangles forming a rectangle that contains + * all the points. + * After \c insertNode has been called repeatedly with all the points, + * removeRectangularBoundary can be called to remove triangles + * at the boundary of the triangulation so that the boundary + * form the convex hull of the points. + * + * Note that this incremetal scheme will run much faster if the points + * have been sorted lexicographically on \e x and \e y. + * + * \param aDart + * An arbitrary CCW dart in the tringulation.\n + * Output: A CCW dart incident to the new node. + * + * \param aPoint + * A point (node) to be inserted in the triangulation. + * + * \retval bool + * \c true if \e point was inserted; \c false if not.\n + * If \e point is outside the triangulation, or the input dart is not valid, + * \c false is returned. + * + * \require + * - \ref hed::TTLtraits::splitTriangle "TRAITS_TYPE::splitTriangle" (DART_TYPE&, const POINT_TYPE&) + * + * \using + * - locateTriangle + * - RecSwapDelaunay + * + * \note + * - For efficiency reasons \e dart should be close to the insertion \e point. + * + * \see + * removeRectangularBoundary + */ +template +bool TRIANGULATION_HELPER::InsertNode( DART_TYPE& aDart, POINT_TYPE& aPoint ) +{ + bool found = LocateTriangle( aPoint, aDart ); - bool found = locateTriangle(point, dart); - if (!found) { + if( !found ) + { #ifdef DEBUG_TTL - cout << "ERROR: Triangulation::insertNode: NO triangle found. /n"; + cout << "ERROR: Triangulation::insertNode: NO triangle found. /n"; #endif - return false; + return false; } - + // ??? can we hide the dart? this is not possible if one triangle only - triangulation.splitTriangle(dart, point); - - DartType d1 = dart; - d1.alpha2().alpha1().alpha2().alpha0().alpha1(); - - DartType d2 = dart; - d2.alpha1().alpha0().alpha1(); - + m_triangulation.splitTriangle( aDart, aPoint ); + + DART_TYPE d1 = aDart; + d1.Alpha2().Alpha1().Alpha2().Alpha0().Alpha1(); + + DART_TYPE d2 = aDart; + d2.Alpha1().Alpha0().Alpha1(); + // Preserve a dart as output incident to the node and CCW - DartType d3 = dart; - d3.alpha2(); - dart = d3; // and see below - //DartType dsav = d3; - d3.alpha0().alpha1(); - - //if (!TraitsType::fixedEdge(d1) && !isBoundaryEdge(d1)) { - if (!isBoundaryEdge(d1)) { - d1.alpha2(); - recSwapDelaunay(d1); + DART_TYPE d3 = aDart; + d3.Alpha2(); + aDart = d3; // and see below + //DART_TYPE dsav = d3; + d3.Alpha0().Alpha1(); + + //if (!TRAITS_TYPE::fixedEdge(d1) && !IsBoundaryEdge(d1)) { + if( !IsBoundaryEdge( d1 ) ) + { + d1.Alpha2(); + RecSwapDelaunay( d1 ); } - - //if (!TraitsType::fixedEdge(d2) && !isBoundaryEdge(d2)) { - if (!isBoundaryEdge(d2)) { - d2.alpha2(); - recSwapDelaunay(d2); + + //if (!TRAITS_TYPE::fixedEdge(d2) && !IsBoundaryEdge(d2)) { + if( !IsBoundaryEdge( d2 ) ) + { + d2.Alpha2(); + RecSwapDelaunay( d2 ); } - + // Preserve the incoming dart as output incident to the node and CCW - //d = dsav.alpha2(); - dart.alpha2(); - //if (!TraitsType::fixedEdge(d3) && !isBoundaryEdge(d3)) { - if (!isBoundaryEdge(d3)) { - d3.alpha2(); - recSwapDelaunay(d3); + //d = dsav.Alpha2(); + aDart.Alpha2(); + //if (!TRAITS_TYPE::fixedEdge(d3) && !IsBoundaryEdge(d3)) { + if( !IsBoundaryEdge( d3 ) ) + { + d3.Alpha2(); + RecSwapDelaunay( d3 ); } - + return true; - } +} +//------------------------------------------------------------------------------------------------ +// Private/Hidden function (might change later) +template +void TRIANGULATION_HELPER::insertNodes( FORWARD_ITERATOR aFirst, FORWARD_ITERATOR aLast, + DART_TYPE& aDart ) +{ - //------------------------------------------------------------------------------------------------ - // Private/Hidden function (might change later) - template - void TriangulationHelper::insertNodes(ForwardIterator first, ForwardIterator last, DartType& dart) { - // Assumes that the dereferenced point objects are pointers. // References to the point objects are then passed to TTL. - - ForwardIterator it; - for (it = first; it != last; ++it) { - insertNode(dart, **it); + + FORWARD_ITERATOR it; + for( it = aFirst; it != aLast; ++it ) + { + InsertNode( aDart, **it ); } - } +} - //------------------------------------------------------------------------------------------------ - /** Removes the rectangular boundary of a triangulation as a final step of an - * incremental Delaunay triangulation. - * The four nodes at the corners will be removed and the resulting triangulation - * will have a convex boundary and be Delaunay. - * - * \param dart - * A CCW dart at the boundary of the triangulation\n - * Output: A CCW dart at the new boundary - * - * \using - * - removeBoundaryNode - * - * \note - * - This function requires that the boundary of the triangulation is - * a rectangle with four nodes (one in each corner). - */ - template - void TriangulationHelper::removeRectangularBoundary(DartType& dart) { - - DartType d_next = dart; - DartType d_iter; - - for (int i = 0; i < 4; i++) { - d_iter = d_next; - d_next.alpha0(); - positionAtNextBoundaryEdge(d_next); - removeBoundaryNode(d_iter); +/** Removes the rectangular boundary of a triangulation as a final step of an + * incremental Delaunay triangulation. + * The four nodes at the corners will be removed and the resulting triangulation + * will have a convex boundary and be Delaunay. + * + * \param dart + * A CCW dart at the boundary of the triangulation\n + * Output: A CCW dart at the new boundary + * + * \using + * - RemoveBoundaryNode + * + * \note + * - This function requires that the boundary of the m_triangulation is + * a rectangle with four nodes (one in each corner). + */ +template +void TRIANGULATION_HELPER::RemoveRectangularBoundary( DART_TYPE& aDart ) +{ + DART_TYPE d_next = aDart; + DART_TYPE d_iter; + + for( int i = 0; i < 4; i++ ) + { + d_iter = d_next; + d_next.Alpha0(); + PositionAtNextBoundaryEdge( d_next ); + RemoveBoundaryNode( d_iter ); } - - dart = d_next; // Return a dart at the new boundary - } + aDart = d_next; // Return a dart at the new boundary +} - //------------------------------------------------------------------------------------------------ - /** Removes the node associated with \e dart and - * updates the triangulation to be Delaunay. - * - * \using - * - removeBoundaryNode if \e dart represents a node at the boundary - * - removeInteriorNode if \e dart represents an interior node - * - * \note - * - The node cannot belong to a fixed (constrained) edge that is not - * swappable. (An endless loop is likely to occur in this case). - */ - template - void TriangulationHelper::removeNode(DartType& dart) { - - if (isBoundaryNode(dart)) - removeBoundaryNode(dart); +/** Removes the node associated with \e dart and + * updates the triangulation to be Delaunay. + * + * \using + * - RemoveBoundaryNode if \e dart represents a node at the boundary + * - RemoveInteriorNode if \e dart represents an interior node + * + * \note + * - The node cannot belong to a fixed (constrained) edge that is not + * swappable. (An endless loop is likely to occur in this case). + */ +template +void TRIANGULATION_HELPER::RemoveNode( DART_TYPE& aDart ) +{ + + if( isBoundaryNode( aDart ) ) + RemoveBoundaryNode( aDart ); else - removeInteriorNode(dart); - } + RemoveInteriorNode( aDart ); +} +/** Removes the boundary node associated with \e dart and + * updates the triangulation to be Delaunay. + * + * \using + * - SwapEdgesAwayFromBoundaryNode + * - OptimizeDelaunay + * + * \require + * - \ref hed::TTLtraits::removeBoundaryTriangle "TRAITS_TYPE::removeBoundaryTriangle" (Dart&) + */ +template +void TRIANGULATION_HELPER::RemoveBoundaryNode( DART_TYPE& aDart ) +{ - //------------------------------------------------------------------------------------------------ - /** Removes the boundary node associated with \e dart and - * updates the triangulation to be Delaunay. - * - * \using - * - swapEdgesAwayFromBoundaryNode - * - optimizeDelaunay - * - * \require - * - \ref hed::TTLtraits::removeBoundaryTriangle "TraitsType::removeBoundaryTriangle" (Dart&) - */ - template - void TriangulationHelper::removeBoundaryNode(DartType& dart) { - // ... and update Delaunay // - CCW dart must be given (for remove) // - No dart is delivered back now (but this is possible if - // we assume that there is not only one triangle left in the triangulation. - + // we assume that there is not only one triangle left in the m_triangulation. + // Position at boundary edge and CCW - if (!isBoundaryEdge(dart)) { - dart.alpha1(); // ensures that next function delivers back a CCW dart (if the given dart is CCW) - positionAtNextBoundaryEdge(dart); + if( !IsBoundaryEdge( aDart ) ) + { + aDart.Alpha1(); // ensures that next function delivers back a CCW dart (if the given dart is CCW) + PositionAtNextBoundaryEdge( aDart ); } - std::list swapped_edges; - swapEdgesAwayFromBoundaryNode(dart, swapped_edges); - + std::list swapped_edges; + SwapEdgesAwayFromBoundaryNode( aDart, swapped_edges ); + // Remove boundary triangles and remove the new boundary from the list // of swapped edges, see below. - DartType d_iter = dart; - DartType dnext = dart; + DART_TYPE d_iter = aDart; + DART_TYPE dnext = aDart; bool bend = false; - while (bend == false) { - dnext.alpha1().alpha2(); - if (isBoundaryEdge(dnext)) - bend = true; // Stop when boundary - - // Generic: Also remove the new boundary from the list of swapped edges - DartType n_bedge = d_iter; - n_bedge.alpha1().alpha0().alpha1().alpha2(); // new boundary edge - - // ??? can we avoid find if we do this in swap away? - typename std::list::iterator it; - it = find(swapped_edges.begin(), swapped_edges.end(), n_bedge); - - if (it != swapped_edges.end()) - swapped_edges.erase(it); - - // Remove the boundary triangle - triangulation.removeBoundaryTriangle(d_iter); - d_iter = dnext; + while( bend == false ) + { + dnext.Alpha1().Alpha2(); + if( IsBoundaryEdge( dnext ) ) + bend = true; // Stop when boundary + + // Generic: Also remove the new boundary from the list of swapped edges + DART_TYPE n_bedge = d_iter; + n_bedge.Alpha1().Alpha0().Alpha1().Alpha2(); // new boundary edge + + // ??? can we avoid find if we do this in swap away? + typename std::list::iterator it; + it = find( swapped_edges.begin(), swapped_edges.end(), n_bedge ); + + if( it != swapped_edges.end() ) + swapped_edges.erase( it ); + + // Remove the boundary triangle + m_triangulation.removeBoundaryTriangle( d_iter ); + d_iter = dnext; } - + // Optimize Delaunay - typedef std::list DartListType; - optimizeDelaunay(swapped_edges); - } + typedef std::list DART_LIST_TYPE; + OptimizeDelaunay( swapped_edges ); +} - //------------------------------------------------------------------------------------------------ - /** Removes the interior node associated with \e dart and - * updates the triangulation to be Delaunay. - * - * \using - * - swapEdgesAwayFromInteriorNode - * - optimizeDelaunay - * - * \require - * - \ref hed::TTLtraits::reverse_splitTriangle "TraitsType::reverse_splitTriangle" (Dart&) - * - * \note - * - The node cannot belong to a fixed (constrained) edge that is not - * swappable. (An endless loop is likely to occur in this case). - */ - template - void TriangulationHelper::removeInteriorNode(DartType& dart) { - +/** Removes the interior node associated with \e dart and + * updates the triangulation to be Delaunay. + * + * \using + * - SwapEdgesAwayFromInteriorNode + * - OptimizeDelaunay + * + * \require + * - \ref hed::TTLtraits::reverse_splitTriangle "TRAITS_TYPE::reverse_splitTriangle" (Dart&) + * + * \note + * - The node cannot belong to a fixed (constrained) edge that is not + * swappable. (An endless loop is likely to occur in this case). + */ +template +void TRIANGULATION_HELPER::RemoveInteriorNode( DART_TYPE& aDart ) +{ // ... and update to Delaunay. // Must allow degeneracy temporarily, see comments in swap edges away // Assumes: // - revese_splitTriangle does not affect darts // outside the resulting triangle. - + // 1) Swaps edges away from the node until degree=3 (generic) // 2) Removes the remaining 3 triangles and creates a new to fill the hole // unsplitTriangle which is required - // 3) Runs LOP on the platelet to obtain a Delaunay triangulation + // 3) Runs LOP on the platelet to obtain a Delaunay m_triangulation // (No dart is delivered as output) - + // Assumes dart is counterclockwise - - std::list swapped_edges; - swapEdgesAwayFromInteriorNode(dart, swapped_edges); - + + std::list swapped_edges; + SwapEdgesAwayFromInteriorNode( aDart, swapped_edges ); + // The reverse operation of split triangle: // Make one triangle of the three triangles at the node associated with dart - // TraitsType:: - triangulation.reverse_splitTriangle(dart); - + // TRAITS_TYPE:: + m_triangulation.reverseSplitTriangle( aDart ); + // ???? Not generic yet if we are very strict: // When calling unsplit triangle, darts at the three opposite sides may // change! // Should we hide them longer away??? This is possible since they cannot // be boundary edges. // ----> Or should we just require that they are not changed??? - + // Make the swapped-away edges Delaunay. // Note the theoretical result: if there are no edges in the list, // the triangulation is Delaunay already - - optimizeDelaunay(swapped_edges); - } - //@} // End of Delaunay Triangulation Group + OptimizeDelaunay( swapped_edges ); +} +//@} // End of Delaunay Triangulation Group - //------------------------------------------------------------------------------------------------ - // -------------------------- Topological and Geometric Queries Group --------------------------- - //------------------------------------------------------------------------------------------------ - - /** @name Topological and Geometric Queries */ - //@{ - - //------------------------------------------------------------------------------------------------ - // Private/Hidden function (might change later) - template - bool TriangulationHelper::isMemberOfFace(const TopologyElementType& topologyElement, const DartType& dart) { - +/** @name Topological and Geometric Queries */ +//@{ +//------------------------------------------------------------------------------------------------ +// Private/Hidden function (might change later) +template +bool TRIANGULATION_HELPER::isMemberOfFace( const TOPOLOGY_ELEMENT_TYPE& aTopologyElement, + const DART_TYPE& aDart ) +{ // Check if the given topology element (node, edge or face) is a member of the face // Assumes: - // - DartType::isMember(TopologyElementType) - - DartType dart_iter = dart; - do { - if (dart_iter.isMember(topologyElement)) - return true; - dart_iter.alpha0().alpha1(); - } while (dart_iter != dart); + // - DART_TYPE::isMember(TOPOLOGY_ELEMENT_TYPE) + + DART_TYPE dart_iter = aDart; + do + { + if( dart_iter.isMember( aTopologyElement ) ) + return true; + dart_iter.Alpha0().Alpha1(); + } + while( dart_iter != aDart ); + return false; - } +} - - //------------------------------------------------------------------------------------------------ - // Private/Hidden function (might change later) - template - bool TriangulationHelper::locateFaceWithNode(const NodeType& node, DartType& dart_iter) { +//------------------------------------------------------------------------------------------------ +// Private/Hidden function (might change later) +template +bool TRIANGULATION_HELPER::locateFaceWithNode( const NODE_TYPE& aNode, DART_TYPE& aDartIter ) +{ // Locate a face in the topology structure with the given node as a member // Assumes: - // - TraitsType::orient2d(DartType, DartType, NodeType) - // - DartType::isMember(NodeType) + // - TRAITS_TYPE::Orient2D(DART_TYPE, DART_TYPE, NODE_TYPE) + // - DART_TYPE::isMember(NODE_TYPE) // - Note that if false is returned, the node might still be in the // topology structure. Application programmer // should check all if by hypothesis the node is in the topology structure; - // see doc. on locateTriangle. - - bool status = locateFaceSimplest(node, dart_iter); - if (status == false) - return status; - - // True was returned from locateFaceSimplest, but if the located triangle is + // see doc. on LocateTriangle. + + bool status = LocateFaceSimplest( aNode, aDartIter ); + + if( status == false ) + return status; + + // True was returned from LocateFaceSimplest, but if the located triangle is // degenerate and the node is on the extension of the edges, // the node might still be inside. Check if node is a member and return false // if not. (Still the node might be in the topology structure, see doc. above - // and in locateTriangle(const PointType& point, DartType& dart_iter) - - return isMemberOfFace(node, dart_iter); - } + // and in locateTriangle(const POINT_TYPE& point, DART_TYPE& dart_iter) + return isMemberOfFace( aNode, aDartIter ); +} - //------------------------------------------------------------------------------------------------ - /** Locates the face containing a given point. - * It is assumed that the tessellation (e.g. a triangulation) is \e regular in the sense that - * there are no holes, the boundary is convex and there are no degenerate faces. - * - * \param point - * A point to be located - * - * \param dart - * An arbitrary CCW dart in the triangulation\n - * Output: A CCW dart in the located face - * - * \retval bool - * \c true if a face is found; \c false if not. - * - * \require - * - \ref hed::TTLtraits::orient2d "TraitsType::orient2d" (DartType&, DartType&, PointType&) - * - * \note - * - If \c false is returned, \e point may still be inside a face if the tessellation is not - * \e regular as explained above. - * - * \see - * locateTriangle - */ - template - bool TriangulationHelper::locateFaceSimplest(const PointType& point, DartType& dart) { +/** Locates the face containing a given point. + * It is assumed that the tessellation (e.g. a triangulation) is \e regular in the sense that + * there are no holes, the boundary is convex and there are no degenerate faces. + * + * \param aPoint + * A point to be located + * + * \param aDart + * An arbitrary CCW dart in the triangulation\n + * Output: A CCW dart in the located face + * + * \retval bool + * \c true if a face is found; \c false if not. + * + * \require + * - \ref hed::TTLtraits::Orient2D "TRAITS_TYPE::Orient2D" (DART_TYPE&, DART_TYPE&, POINT_TYPE&) + * + * \note + * - If \c false is returned, \e point may still be inside a face if the tessellation is not + * \e regular as explained above. + * + * \see + * LocateTriangle + */ +template +bool TRIANGULATION_HELPER::LocateFaceSimplest( const POINT_TYPE& aPoint, DART_TYPE& aDart ) +{ // Not degenerate triangles if point is on the extension of the edges // But inTriangle may be called in case of true (may update to inFace2) // Convex boundary @@ -623,867 +620,867 @@ private: // convex faces (works for general convex faces) // Not specialized for triangles, but ok? // - // TraitsType::orint2d(PointType) is the half open half-plane defined + // TRAITS_TYPE::orint2d(POINT_TYPE) is the half open half-plane defined // by the dart: // n1 = dart.node() - // n2 = dart.alpha0().node + // n2 = dart.Alpha0().node // Only the following gives true: // ((n2->x()-n1->x())*(point.y()-n1->y()) >= (point.x()-n1->x())*(n2->y()-n1->y())) - - DartType dart_start; - dart_start = dart; - DartType dart_prev; - - DartType d0; - for (;;) { - d0 = dart; - d0.alpha0(); - if (TraitsType::orient2d(dart, d0, point) >= 0) { - dart.alpha0().alpha1(); - if (dart == dart_start) - return true; // left to all edges in face - } - else { - dart_prev = dart; - dart.alpha2(); - if (dart == dart_prev) - return false; // iteration to outside boundary - - dart_start = dart; - dart_start.alpha0(); - - dart.alpha1(); // avoid twice on same edge and ccw in next - } + + DART_TYPE dart_start; + dart_start = aDart; + DART_TYPE dart_prev; + + DART_TYPE d0; + for( ;; ) + { + d0 = aDart; + d0.Alpha0(); + + if( TRAITS_TYPE::Orient2D( aDart, d0, aPoint ) >= 0 ) + { + aDart.Alpha0().Alpha1(); + if( aDart == dart_start ) + return true; // left to all edges in face + } + else + { + dart_prev = aDart; + aDart.Alpha2(); + + if( aDart == dart_prev ) + return false; // iteration to outside boundary + + dart_start = aDart; + dart_start.Alpha0(); + + aDart.Alpha1(); // avoid twice on same edge and ccw in next + } } - } +} - //------------------------------------------------------------------------------------------------ - /** Locates the triangle containing a given point. - * It is assumed that the triangulation is \e regular in the sense that there - * are no holes and the boundary is convex. - * This function deals with degeneracy to some extent, but round-off errors may still - * lead to a wrong result if triangles are degenerate. - * - * \param point - * A point to be located - * - * \param dart - * An arbitrary CCW dart in the triangulation\n - * Output: A CCW dart in the located triangle - * - * \retval bool - * \c true if a triangle is found; \c false if not.\n - * If \e point is outside the triangulation, in which case \c false is returned, - * then the edge associated with \e dart will be at the boundary of the triangulation. - * - * \using - * - locateFaceSimplest - * - inTriangle - */ - template - bool TriangulationHelper::locateTriangle(const PointType& point, DartType& dart) { +/** Locates the triangle containing a given point. + * It is assumed that the triangulation is \e regular in the sense that there + * are no holes and the boundary is convex. + * This function deals with degeneracy to some extent, but round-off errors may still + * lead to a wrong result if triangles are degenerate. + * + * \param point + * A point to be located + * + * \param dart + * An arbitrary CCW dart in the triangulation\n + * Output: A CCW dart in the located triangle + * + * \retval bool + * \c true if a triangle is found; \c false if not.\n + * If \e point is outside the m_triangulation, in which case \c false is returned, + * then the edge associated with \e dart will be at the boundary of the m_triangulation. + * + * \using + * - LocateFaceSimplest + * - InTriangle + */ +template +bool TRIANGULATION_HELPER::LocateTriangle( const POINT_TYPE& aPoint, DART_TYPE& aDart ) +{ // The purpose is to have a fast and stable procedure that // i) avoids concluding that a point is inside a triangle if it is not inside // ii) avoids infinite loops - + // Thus, if false is returned, the point might still be inside a triangle in // the triangulation. But this will probably only occur in the following cases: // i) There are holes in the triangulation which causes the procedure to stop. - // ii) The boundary of the triangulation is not convex. + // ii) The boundary of the m_triangulation is not convex. // ii) There might be degenerate triangles interior to the triangulation, or on the // the boundary, which in some cases might cause the procedure to stop there due // to the logic of the algorithm. - + // It is the application programmer's responsibility to check further if false is // returned. For example, if by hypothesis the point is inside a triangle // in the triangulation and and false is returned, then all triangles in the // triangulation should be checked by the application. This can be done using // the function: - // bool inTriangle(const PointType& point, const DartType& dart). - - + // bool inTriangle(const POINT_TYPE& point, const DART_TYPE& dart). + // Assumes: - // - crossProduct2d, scalarProduct2d etc., see functions called - - bool status = locateFaceSimplest(point, dart); - if (status == false) - return status; + // - CrossProduct2D, ScalarProduct2D etc., see functions called + + bool status = LocateFaceSimplest( aPoint, aDart ); + if( status == false ) + return status; + // There may be degeneracy, i.e., the point might be outside the triangle // on the extension of the edges of a degenerate triangle. - + // The next call returns true if inside a non-degenerate or a degenerate triangle, // but false if the point coincides with the "supernode" in the case where all // edges are degenerate. - return inTriangle(point, dart); - } + return InTriangle( aPoint, aDart ); +} - - //------------------------------------------------------------------------------------------------ - /** Checks if \e point is inside the triangle associated with \e dart. - * A fast and simple function that does not deal with degeneracy. - * - * \param dart - * A CCW dart in the triangle - * - * \require - * - \ref hed::TTLtraits::orient2d "TraitsType::orient2d" (DartType&, DartType&, PointType&) - * - * \see - * inTriangle for a more robust function - */ - template - bool TriangulationHelper::inTriangleSimplest(const PointType& point, const DartType& dart) { - +//------------------------------------------------------------------------------------------------ +/** Checks if \e point is inside the triangle associated with \e dart. + * A fast and simple function that does not deal with degeneracy. + * + * \param aDart + * A CCW dart in the triangle + * + * \require + * - \ref hed::TTLtraits::Orient2D "TRAITS_TYPE::Orient2D" (DART_TYPE&, DART_TYPE&, POINT_TYPE&) + * + * \see + * InTriangle for a more robust function + */ +template +bool TRIANGULATION_HELPER::InTriangleSimplest( const POINT_TYPE& aPoint, const DART_TYPE& aDart ) +{ // Fast and simple: Do not deal with degenerate faces, i.e., if there is // degeneracy, true will be returned if the point is on the extension of the // edges of a degenerate triangle + + DART_TYPE d_iter = aDart; + DART_TYPE d0 = d_iter; + d0.Alpha0(); - DartType d_iter = dart; - DartType d0 = d_iter; - d0.alpha0(); - if (!TraitsType::orient2d(d_iter, d0, point) >= 0) - return false; - - d_iter.alpha0().alpha1(); + if( !TRAITS_TYPE::Orient2D( d_iter, d0, aPoint ) >= 0 ) + return false; + + d_iter.Alpha0().Alpha1(); d0 = d_iter; - d0.alpha0(); - if (!TraitsType::orient2d(d_iter, d0, point) >= 0) - return false; + d0.Alpha0(); - d_iter.alpha0().alpha1(); + if( !TRAITS_TYPE::Orient2D( d_iter, d0, aPoint ) >= 0 ) + return false; + + d_iter.Alpha0().Alpha1(); d0 = d_iter; - d0.alpha0(); - if (!TraitsType::orient2d(d_iter, d0, point) >= 0) - return false; + d0.Alpha0(); + if( !TRAITS_TYPE::Orient2D( d_iter, d0, aPoint ) >= 0 ) + return false; + return true; - } +} +/** Checks if \e point is inside the triangle associated with \e dart. + * This function deals with degeneracy to some extent, but round-off errors may still + * lead to wrong result if the triangle is degenerate. + * + * \param aDart + * A CCW dart in the triangle + * + * \require + * - \ref hed::TTLtraits::CrossProduct2D "TRAITS_TYPE::CrossProduct2D" (DART_TYPE&, POINT_TYPE&) + * - \ref hed::TTLtraits::ScalarProduct2D "TRAITS_TYPE::ScalarProduct2D" (DART_TYPE&, POINT_TYPE&) + * + * \see + * InTriangleSimplest + */ +template +bool TRIANGULATION_HELPER::InTriangle( const POINT_TYPE& aPoint, const DART_TYPE& aDart ) +{ - //------------------------------------------------------------------------------------------------ - /** Checks if \e point is inside the triangle associated with \e dart. - * This function deals with degeneracy to some extent, but round-off errors may still - * lead to wrong result if the triangle is degenerate. - * - * \param dart - * A CCW dart in the triangle - * - * \require - * - \ref hed::TTLtraits::crossProduct2d "TraitsType::crossProduct2d" (DartType&, PointType&) - * - \ref hed::TTLtraits::scalarProduct2d "TraitsType::scalarProduct2d" (DartType&, PointType&) - * - * \see - * inTriangleSimplest - */ - template - bool TriangulationHelper::inTriangle(const PointType& point, const DartType& dart) { - // SHOULD WE INCLUDE A STRATEGY WITH EDGE X e_1 ETC? TO GUARANTEE THAT // ONLY ON ONE EDGE? BUT THIS DOES NOT SOLVE PROBLEMS WITH // notInE1 && notInE1.neghbour ? - - + // Returns true if inside (but not necessarily strictly inside) // Works for degenerate triangles, but not when all edges are degenerate, - // and the point coincides with all nodes; + // and the aPoint coincides with all nodes; // then false is always returned. - - typedef typename TraitsType::real_type real_type; - - DartType dart_iter = dart; - - real_type cr1 = TraitsType::crossProduct2d(dart_iter, point); - if (cr1 < 0) - return false; - - dart_iter.alpha0().alpha1(); - real_type cr2 = TraitsType::crossProduct2d(dart_iter, point); - - if (cr2 < 0) - return false; - - dart_iter.alpha0().alpha1(); - real_type cr3 = TraitsType::crossProduct2d(dart_iter, point); - if (cr3 < 0) - return false; - + + typedef typename TRAITS_TYPE::REAL_TYPE REAL_TYPE; + + DART_TYPE dart_iter = aDart; + + REAL_TYPE cr1 = TRAITS_TYPE::CrossProduct2D( dart_iter, aPoint ); + if( cr1 < 0 ) + return false; + + dart_iter.Alpha0().Alpha1(); + REAL_TYPE cr2 = TRAITS_TYPE::CrossProduct2D( dart_iter, aPoint ); + + if( cr2 < 0 ) + return false; + + dart_iter.Alpha0().Alpha1(); + REAL_TYPE cr3 = TRAITS_TYPE::CrossProduct2D( dart_iter, aPoint ); + if( cr3 < 0 ) + return false; + // All cross products are >= 0 // Check for degeneracy - - if (cr1 != 0 || cr2 != 0 || cr3 != 0) - return true; // inside non-degenerate face - + if( cr1 != 0 || cr2 != 0 || cr3 != 0 ) + return true; // inside non-degenerate face + // All cross-products are zero, i.e. degenerate triangle, check if inside - // Strategy: d.scalarProduct2d >= 0 && alpha0(d).d.scalarProduct2d >= 0 for one of - // the edges. But if all edges are degenerate and the point is on (all) the nodes, + // Strategy: d.ScalarProduct2D >= 0 && alpha0(d).d.ScalarProduct2D >= 0 for one of + // the edges. But if all edges are degenerate and the aPoint is on (all) the nodes, // then "false is returned". - - DartType dart_tmp = dart_iter; - real_type sc1 = TraitsType::scalarProduct2d(dart_tmp,point); - real_type sc2 = TraitsType::scalarProduct2d(dart_tmp.alpha0(), point); - - if (sc1 >= 0 && sc2 >= 0) { - // test for degenerate edge - if (sc1 != 0 || sc2 != 0) - return true; // interior to this edge or on a node (but see comment above) + + DART_TYPE dart_tmp = dart_iter; + REAL_TYPE sc1 = TRAITS_TYPE::ScalarProduct2D( dart_tmp, aPoint ); + REAL_TYPE sc2 = TRAITS_TYPE::ScalarProduct2D( dart_tmp.Alpha0(), aPoint ); + + if( sc1 >= 0 && sc2 >= 0 ) + { + // test for degenerate edge + if( sc1 != 0 || sc2 != 0 ) + return true; // interior to this edge or on a node (but see comment above) } + + dart_tmp = dart_iter.Alpha0().Alpha1(); + sc1 = TRAITS_TYPE::ScalarProduct2D( dart_tmp, aPoint ); + sc2 = TRAITS_TYPE::ScalarProduct2D( dart_tmp.Alpha0(), aPoint ); - dart_tmp = dart_iter.alpha0().alpha1(); - sc1 = TraitsType::scalarProduct2d(dart_tmp,point); - sc2 = TraitsType::scalarProduct2d(dart_tmp.alpha0(),point); - if (sc1 >= 0 && sc2 >= 0) { - // test for degenerate edge - if (sc1 != 0 || sc2 != 0) - return true; // interior to this edge or on a node (but see comment above) + if( sc1 >= 0 && sc2 >= 0 ) + { + // test for degenerate edge + if( sc1 != 0 || sc2 != 0 ) + return true; // interior to this edge or on a node (but see comment above) } + + dart_tmp = dart_iter.Alpha1(); + sc1 = TRAITS_TYPE::ScalarProduct2D( dart_tmp, aPoint ); + sc2 = TRAITS_TYPE::ScalarProduct2D( dart_tmp.Alpha0(), aPoint ); - dart_tmp = dart_iter.alpha1(); - sc1 = TraitsType::scalarProduct2d(dart_tmp,point); - sc2 = TraitsType::scalarProduct2d(dart_tmp.alpha0(),point); - if (sc1 >= 0 && sc2 >= 0) { - // test for degenerate edge - if (sc1 != 0 || sc2 != 0) - return true; // interior to this edge or on a node (but see comment above) + if( sc1 >= 0 && sc2 >= 0 ) + { + // test for degenerate edge + if( sc1 != 0 || sc2 != 0 ) + return true; // interior to this edge or on a node (but see comment above) } - + // Not on any of the edges of the degenerate triangle. - // The only possibility for the point to be "inside" is that all edges are degenerate + // The only possibility for the aPoint to be "inside" is that all edges are degenerate // and the point coincide with all nodes. So false is returned in this case. - + return false; - } +} //------------------------------------------------------------------------------------------------ - // Private/Hidden function (might change later) - template - void TriangulationHelper::getAdjacentTriangles(const DartType& dart, DartType& t1, DartType& t2, DartType& t3) { - - DartType dart_iter = dart; - +// Private/Hidden function (might change later) +template +void TRIANGULATION_HELPER::getAdjacentTriangles( const DART_TYPE& aDart, DART_TYPE& aT1, + DART_TYPE& aT2, DART_TYPE& aT3 ) +{ + + DART_TYPE dart_iter = aDart; + // add first - if (dart_iter.alpha2() != dart) { - t1 = dart_iter; - dart_iter = dart; + if( dart_iter.Alpha2() != aDart ) + { + aT1 = dart_iter; + dart_iter = aDart; } - + // add second - dart_iter.alpha0(); - dart_iter.alpha1(); - DartType dart_prev = dart_iter; - if ((dart_iter.alpha2()) != dart_prev) { - t2 = dart_iter; - dart_iter = dart_prev; + dart_iter.Alpha0(); + dart_iter.Alpha1(); + DART_TYPE dart_prev = dart_iter; + + if( ( dart_iter.Alpha2() ) != dart_prev ) + { + aT2 = dart_iter; + dart_iter = dart_prev; } - + // add third - dart_iter.alpha0(); - dart_iter.alpha1(); + dart_iter.Alpha0(); + dart_iter.Alpha1(); dart_prev = dart_iter; - if ((dart_iter.alpha2()) != dart_prev) - t3 = dart_iter; - } + if( ( dart_iter.Alpha2() ) != dart_prev ) + aT3 = dart_iter; +} - //------------------------------------------------------------------------------------------------ - /** Gets the boundary as sequence of darts, where the edges associated with the darts are boundary - * edges, given a dart with an associating edge at the boundary of a topology structure. - * The first dart in the sequence will be the given one, and the others will have the same - * orientation (CCW or CW) as the first. - * Assumes that the given dart is at the boundary. - * - * \param dart - * A dart at the boundary (CCW or CW) - * - * \param boundary - * A sequence of darts, where the associated edges are the boundary edges - * - * \require - * - DartListType::push_back (DartType&) - */ - template - void TriangulationHelper::getBoundary(const DartType& dart, DartListType& boundary) { +//------------------------------------------------------------------------------------------------ +/** Gets the boundary as sequence of darts, where the edges associated with the darts are boundary + * edges, given a dart with an associating edge at the boundary of a topology structure. + * The first dart in the sequence will be the given one, and the others will have the same + * orientation (CCW or CW) as the first. + * Assumes that the given dart is at the boundary. + * + * \param aDart + * A dart at the boundary (CCW or CW) + * + * \param aBoundary + * A sequence of darts, where the associated edges are the boundary edges + * + * \require + * - DART_LIST_TYPE::push_back (DART_TYPE&) + */ +template +void TRIANGULATION_HELPER::GetBoundary( const DART_TYPE& aDart, DART_LIST_TYPE& aBoundary ) +{ // assumes the given dart is at the boundary (by edge) - - DartType dart_iter(dart); - boundary.push_back(dart_iter); // Given dart as first element - dart_iter.alpha0(); - positionAtNextBoundaryEdge(dart_iter); - - while (dart_iter != dart) { - boundary.push_back(dart_iter); - dart_iter.alpha0(); - positionAtNextBoundaryEdge(dart_iter); + + DART_TYPE dart_iter( aDart ); + aBoundary.push_back( dart_iter ); // Given dart as first element + dart_iter.Alpha0(); + PositionAtNextBoundaryEdge( dart_iter ); + + while( dart_iter != aDart ) + { + aBoundary.push_back( dart_iter ); + dart_iter.Alpha0(); + PositionAtNextBoundaryEdge( dart_iter ); } - } +} - - //------------------------------------------------------------------------------------------------ - /* - // Asumes a fixed point (a boundary edge) is given - // - template - class boundary_1_Iterator { // i.e. "circulator" - - DartType current_; - public: - boundaryEdgeIterator(const DartType& dart) {current_ = dart;} - DartType& operator * () const {return current_;} - void operator ++ () {current_.alpha0(); positionAtNextBoundaryEdge(current_);} - }; - */ - - - //------------------------------------------------------------------------------------------------ - /** Checks if the edge associated with \e dart is at - * the boundary of the triangulation. - * - * \par Implements: - * \code - * DartType dart_iter = dart; - * if (dart_iter.alpha2() == dart) - * return true; - * else - * return false; - * \endcode - */ - template - bool TriangulationHelper::isBoundaryEdge(const DartType& dart) { +/** Checks if the edge associated with \e dart is at + * the boundary of the m_triangulation. + * + * \par Implements: + * \code + * DART_TYPE dart_iter = dart; + * if (dart_iter.Alpha2() == dart) + * return true; + * else + * return false; + * \endcode + */ +template +bool TRIANGULATION_HELPER::IsBoundaryEdge( const DART_TYPE& aDart ) +{ + DART_TYPE dart_iter = aDart; - DartType dart_iter = dart; - if (dart_iter.alpha2() == dart) - return true; - else - return false; - } - - - //------------------------------------------------------------------------------------------------ - /** Checks if the face associated with \e dart is at - * the boundary of the triangulation. - */ - template - bool TriangulationHelper::isBoundaryFace(const DartType& dart) { - - // Strategy: boundary if alpha2(d)=d - - DartType dart_iter(dart); - DartType dart_prev; - - do { - dart_prev = dart_iter; - - if (dart_iter.alpha2() == dart_prev) + if( dart_iter.Alpha2() == aDart ) return true; - else - dart_iter = dart_prev; // back again - - dart_iter.alpha0(); - dart_iter.alpha1(); - - } while (dart_iter != dart); - - return false; - } + else + return false; +} - - //------------------------------------------------------------------------------------------------ - /** Checks if the node associated with \e dart is at - * the boundary of the triangulation. - */ - template - bool TriangulationHelper::isBoundaryNode(const DartType& dart) { - +/** Checks if the face associated with \e dart is at + * the boundary of the m_triangulation. + */ +template +bool TRIANGULATION_HELPER::IsBoundaryFace( const DART_TYPE& aDart ) +{ // Strategy: boundary if alpha2(d)=d - - DartType dart_iter(dart); - DartType dart_prev; - + + DART_TYPE dart_iter( aDart ); + DART_TYPE dart_prev; + + do + { + dart_prev = dart_iter; + + if( dart_iter.Alpha2() == dart_prev ) + return true; + else + dart_iter = dart_prev; // back again + + dart_iter.Alpha0(); + dart_iter.Alpha1(); + + } while( dart_iter != aDart ); + + return false; +} + +/** Checks if the node associated with \e dart is at + * the boundary of the m_triangulation. + */ +template +bool TRIANGULATION_HELPER::IsBoundaryNode( const DART_TYPE& aDart ) +{ + // Strategy: boundary if alpha2(d)=d + + DART_TYPE dart_iter( aDart ); + DART_TYPE dart_prev; + // If input dart is reached again, then internal node // If alpha2(d)=d, then boundary - - do { - dart_iter.alpha1(); - dart_prev = dart_iter; - dart_iter.alpha2(); - - if (dart_iter == dart_prev) - return true; - - } while (dart_iter != dart); - + + do + { + dart_iter.Alpha1(); + dart_prev = dart_iter; + dart_iter.Alpha2(); + + if( dart_iter == dart_prev ) + return true; + + } while( dart_iter != aDart ); + return false; - } +} +/** Returns the degree of the node associated with \e dart. + * + * \par Definition: + * The \e degree (or valency) of a node \e V in a m_triangulation, + * is defined as the number of edges incident with \e V, i.e., + * the number of edges joining \e V with another node in the triangulation. + */ +template +int TRIANGULATION_HELPER::GetDegreeOfNode( const DART_TYPE& aDart ) +{ + DART_TYPE dart_iter( aDart ); + DART_TYPE dart_prev; - //------------------------------------------------------------------------------------------------ - /** Returns the degree of the node associated with \e dart. - * - * \par Definition: - * The \e degree (or valency) of a node \e V in a triangulation, - * is defined as the number of edges incident with \e V, i.e., - * the number of edges joining \e V with another node in the triangulation. - */ - template - int TriangulationHelper::getDegreeOfNode(const DartType& dart) { - - DartType dart_iter(dart); - DartType dart_prev; - // If input dart is reached again, then interior node // If alpha2(d)=d, then boundary - + int degree = 0; bool boundaryVisited = false; - do { - dart_iter.alpha1(); - degree++; - dart_prev = dart_iter; - - dart_iter.alpha2(); - - if (dart_iter == dart_prev) { - if (!boundaryVisited) { - boundaryVisited = true; - // boundary is reached first time, count in the reversed direction - degree++; // count the start since it is not done above - dart_iter = dart; - dart_iter.alpha2(); + do + { + dart_iter.Alpha1(); + degree++; + dart_prev = dart_iter; + + dart_iter.Alpha2(); + + if( dart_iter == dart_prev ) + { + if( !boundaryVisited ) + { + boundaryVisited = true; + // boundary is reached first time, count in the reversed direction + degree++; // count the start since it is not done above + dart_iter = aDart; + dart_iter.Alpha2(); + } else + return degree; } - else - return degree; - } - - } while (dart_iter != dart); - + + } while( dart_iter != aDart ); + return degree; - } +} +// Modification of GetDegreeOfNode: +// Strategy, reverse the list and start in the other direction if the boundary +// is reached. NB. copying of darts but ok., or we could have collected pointers, +// but the memory management. - //------------------------------------------------------------------------------------------------ - // Modification of getDegreeOfNode: - // Strategy, reverse the list and start in the other direction if the boundary - // is reached. NB. copying of darts but ok., or we could have collected pointers, - // but the memory management. - - // NOTE: not symmetry if we choose to collect opposite edges - // now we collect darts with radiating edges - - // Remember that we must also copy the node, but ok with push_back - // The size of the list will be the degree of the node - - // No CW/CCW since topology only - - - // Each dart consists of an incident edge and an adjacent node. - // But note that this is only how we interpret the dart in this implementation. - // Given this list, how can we find the opposite edges: - // We can perform alpha1 on each, but for boundary nodes we will get one edge twice. - // But this is will always be the last dart! - // The darts in the list are in sequence and starts with the alpha0(dart) - // alpha0, alpha1 and alpha2 +// NOTE: not symmetry if we choose to collect opposite edges +// now we collect darts with radiating edges - // Private/Hidden function - template - void TriangulationHelper::getNeighborNodes(const DartType& dart, - std::list& node_list, bool& boundary) { - - DartType dart_iter(dart); - - dart_iter.alpha0(); // position the dart at an opposite node - - DartType dart_prev = dart_iter; - +// Remember that we must also copy the node, but ok with push_back +// The size of the list will be the degree of the node + +// No CW/CCW since topology only + +// Each dart consists of an incident edge and an adjacent node. +// But note that this is only how we interpret the dart in this implementation. +// Given this list, how can we find the opposite edges: +// We can perform alpha1 on each, but for boundary nodes we will get one edge twice. +// But this is will always be the last dart! +// The darts in the list are in sequence and starts with the alpha0(dart) +// alpha0, alpha1 and alpha2 + +// Private/Hidden function +template +void TRIANGULATION_HELPER::getNeighborNodes( const DART_TYPE& aDart, + std::list& aNodeList, bool& aBoundary ) +{ + DART_TYPE dart_iter( aDart ); + dart_iter.Alpha0(); // position the dart at an opposite node + + DART_TYPE dart_prev = dart_iter; bool start_at_boundary = false; - dart_iter.alpha2(); - if (dart_iter == dart_prev) - start_at_boundary = true; + dart_iter.Alpha2(); + + if( dart_iter == dart_prev ) + start_at_boundary = true; else - dart_iter = dart_prev; // back again - - DartType dart_start = dart_iter; - - do { - node_list.push_back(dart_iter); - dart_iter.alpha1(); - dart_iter.alpha0(); - dart_iter.alpha1(); - dart_prev = dart_iter; - dart_iter.alpha2(); - if (dart_iter == dart_prev) { - // boundary reached - boundary = true; - if (start_at_boundary == true) { - // add the dart which now is positioned at the opposite boundary - node_list.push_back(dart_iter); - return; - } - else { - // call the function again such that we start at the boundary - // first clear the list and reposition to the initial node - dart_iter.alpha0(); - node_list.clear(); - getNeighborNodes(dart_iter, node_list, boundary); - return; // after one recursive step - } - } - } while (dart_iter != dart_start); - - boundary = false; - } + dart_iter = dart_prev; // back again + DART_TYPE dart_start = dart_iter; - //------------------------------------------------------------------------------------------------ - /** Gets the 0-orbit around an interior node. - * - * \param dart - * A dart (CCW or CW) positioned at an \e interior node. - * - * \retval orbit - * Sequence of darts with one orbit for each arc. All the darts have the same - * orientation (CCW or CW) as \e dart, and \e dart is the first element - * in the sequence. - * - * \require - * - DartListType::push_back (DartType&) - * - * \see - * get_0_orbit_boundary - */ - template - void TriangulationHelper::get_0_orbit_interior(const DartType& dart, DartListType& orbit) { - - DartType d_iter = dart; - orbit.push_back(d_iter); - d_iter.alpha1().alpha2(); - - while (d_iter != dart) { - orbit.push_back(d_iter); - d_iter.alpha1().alpha2(); + do + { + aNodeList.push_back( dart_iter ); + dart_iter.Alpha1(); + dart_iter.Alpha0(); + dart_iter.Alpha1(); + dart_prev = dart_iter; + dart_iter.Alpha2(); + + if( dart_iter == dart_prev ) + { + // boundary reached + aBoundary = true; + + if( start_at_boundary == true ) + { + // add the dart which now is positioned at the opposite boundary + aNodeList.push_back( dart_iter ); + return; + } + else + { + // call the function again such that we start at the boundary + // first clear the list and reposition to the initial node + dart_iter.Alpha0(); + aNodeList.clear(); + getNeighborNodes( dart_iter, aNodeList, aBoundary ); + + return; // after one recursive step + } + } } - } + while( dart_iter != dart_start ); + aBoundary = false; +} - //------------------------------------------------------------------------------------------------ - /** Gets the 0-orbit around a node at the boundary - * - * \param dart - * A dart (CCW or CW) positioned at a \e boundary \e node and at a \e boundary \e edge. - * - * \retval orbit - * Sequence of darts with one orbit for each arc. All the darts, \e exept \e the \e last one, - * have the same orientation (CCW or CW) as \e dart, and \e dart is the first element - * in the sequence. - * - * \require - * - DartListType::push_back (DartType&) - * - * \note - * - The last dart in the sequence have opposite orientation compared to the others! - * - * \see - * get_0_orbit_interior - */ - template - void TriangulationHelper::get_0_orbit_boundary(const DartType& dart, DartListType& orbit) { +/** Gets the 0-orbit around an interior node. + * + * \param aDart + * A dart (CCW or CW) positioned at an \e interior node. + * + * \retval aOrbit + * Sequence of darts with one orbit for each arc. All the darts have the same + * orientation (CCW or CW) as \e dart, and \e dart is the first element + * in the sequence. + * + * \require + * - DART_LIST_TYPE::push_back (DART_TYPE&) + * + * \see + * Get0OrbitBoundary + */ +template +void TRIANGULATION_HELPER::Get0OrbitInterior( const DART_TYPE& aDart, DART_LIST_TYPE& aOrbit ) +{ + DART_TYPE d_iter = aDart; + aOrbit.push_back( d_iter ); + d_iter.Alpha1().Alpha2(); + + while( d_iter != aDart ) + { + aOrbit.push_back( d_iter ); + d_iter.Alpha1().Alpha2(); + } +} + +/** Gets the 0-orbit around a node at the boundary + * + * \param aDart + * A dart (CCW or CW) positioned at a \e boundary \e node and at a \e boundary \e edge. + * + * \retval orbit + * Sequence of darts with one orbit for each arc. All the darts, \e exept \e the \e last one, + * have the same orientation (CCW or CW) as \e dart, and \e dart is the first element + * in the sequence. + * + * \require + * - DART_LIST_TYPE::push_back (DART_TYPE&) + * + * \note + * - The last dart in the sequence have opposite orientation compared to the others! + * + * \see + * Get0OrbitInterior + */ +template +void TRIANGULATION_HELPER::Get0OrbitBoundary( const DART_TYPE& aDart, DART_LIST_TYPE& aOrbit ) +{ + DART_TYPE dart_prev; + DART_TYPE d_iter = aDart; - DartType dart_prev; - DartType d_iter = dart; - do { - orbit.push_back(d_iter); - d_iter.alpha1(); - dart_prev = d_iter; - d_iter.alpha2(); - } while (d_iter != dart_prev); - - orbit.push_back(d_iter); // the last one with opposite orientation - } + do + { + aOrbit.push_back( d_iter ); + d_iter.Alpha1(); + dart_prev = d_iter; + d_iter.Alpha2(); + } + while( d_iter != dart_prev ); + aOrbit.push_back( d_iter ); // the last one with opposite orientation +} - //------------------------------------------------------------------------------------------------ - /** Checks if the two darts belong to the same 0-orbit, i.e., - * if they share a node. - * \e d1 and/or \e d2 can be CCW or CW. - * - * (This function also examines if the the node associated with - * \e d1 is at the boundary, which slows down the function (slightly). - * If it is known that the node associated with \e d1 is an interior - * node and a faster version is needed, the user should implement his/her - * own version.) - */ - template - bool TriangulationHelper::same_0_orbit(const DartType& d1, const DartType& d2) { - +/** Checks if the two darts belong to the same 0-orbit, i.e., + * if they share a node. + * \e d1 and/or \e d2 can be CCW or CW. + * + * (This function also examines if the the node associated with + * \e d1 is at the boundary, which slows down the function (slightly). + * If it is known that the node associated with \e d1 is an interior + * node and a faster version is needed, the user should implement his/her + * own version.) + */ +template +bool TRIANGULATION_HELPER::Same0Orbit( const DART_TYPE& aD1, const DART_TYPE& aD2 ) +{ // Two copies of the same dart - DartType d_iter = d2; - DartType d_end = d2; - - if (isBoundaryNode(d_iter)) { - // position at both boundary edges - positionAtNextBoundaryEdge(d_iter); - d_end.alpha1(); - positionAtNextBoundaryEdge(d_end); + DART_TYPE d_iter = aD2; + DART_TYPE d_end = aD2; + + if( isBoundaryNode( d_iter ) ) + { + // position at both boundary edges + PositionAtNextBoundaryEdge( d_iter ); + d_end.Alpha1(); + PositionAtNextBoundaryEdge( d_end ); } - - for (;;) { - if (d_iter == d1) - return true; - d_iter.alpha1(); - if (d_iter == d1) - return true; - d_iter.alpha2(); - if (d_iter == d_end) - break; + + for( ;; ) + { + if( d_iter == aD1 ) + return true; + + d_iter.Alpha1(); + + if( d_iter == aD1 ) + return true; + + d_iter.Alpha2(); + + if( d_iter == d_end ) + break; } - + return false; - } +} - - //------------------------------------------------------------------------------------------------ - /** Checks if the two darts belong to the same 1-orbit, i.e., - * if they share an edge. - * \e d1 and/or \e d2 can be CCW or CW. - */ - template - bool TriangulationHelper::same_1_orbit(const DartType& d1, const DartType& d2) { +/** Checks if the two darts belong to the same 1-orbit, i.e., + * if they share an edge. + * \e d1 and/or \e d2 can be CCW or CW. + */ +template +bool TRIANGULATION_HELPER::Same1Orbit( const DART_TYPE& aD1, const DART_TYPE& aD2 ) +{ + DART_TYPE d_iter = aD2; - DartType d_iter = d2; // (Also works at the boundary) - if (d_iter == d1 || d_iter.alpha0() == d1 || d_iter.alpha2() == d1 || d_iter.alpha0() == d1) - return true; - return false; - } + return ( d_iter == aD1 || d_iter.Alpha0() == aD1 || + d_iter.Alpha2() == aD1 || d_iter.Alpha0() == aD1 ); +} - - //------------------------------------------------------------------------------------------------ - /** Checks if the two darts belong to the same 2-orbit, i.e., - * if they lie in the same triangle. - * \e d1 and/or \e d2 can be CCW or CW - */ - template - bool TriangulationHelper::same_2_orbit(const DartType& d1, const DartType& d2) { +//------------------------------------------------------------------------------------------------ +/** Checks if the two darts belong to the same 2-orbit, i.e., + * if they lie in the same triangle. + * \e d1 and/or \e d2 can be CCW or CW + */ +template +bool TRIANGULATION_HELPER::Same2Orbit( const DART_TYPE& aD1, const DART_TYPE& aD2 ) +{ + DART_TYPE d_iter = aD2; - DartType d_iter = d2; - if (d_iter == d1 || d_iter.alpha0() == d1 || - d_iter.alpha1() == d1 || d_iter.alpha0() == d1 || - d_iter.alpha1() == d1 || d_iter.alpha0() == d1) - return true; - return false; - } - + return ( d_iter == aD1 || d_iter.Alpha0() == aD1 || d_iter.Alpha1() == aD1 || + d_iter.Alpha0() == aD1 || d_iter.Alpha1() == aD1 || d_iter.Alpha0() == aD1 ); +} - //------------------------------------------------------------------------------------------------ - // Private/Hidden function - template - bool TriangulationHelper::degenerateTriangle(const DartType& dart) { - +// Private/Hidden function +template +bool TRIANGULATION_HELPER::degenerateTriangle( const DART_TYPE& aDart ) +{ // Check if triangle is degenerate // Assumes CCW dart - - DartType d1 = dart; - DartType d2 = d1; - d2.alpha1(); - if (TraitsType::crossProduct2d(d1,d2) == 0) - return true; - - return false; - } - - //------------------------------------------------------------------------------------------------ - /** Checks if the edge associated with \e dart is swappable, i.e., if the edge - * is a diagonal in a \e strictly convex (or convex) quadrilateral. - * - * \param allowDegeneracy - * If set to true, the function will also return true if the numerical calculations - * indicate that the quadrilateral is convex only, and not necessarily strictly - * convex. - * - * \require - * - \ref hed::TTLtraits::crossProduct2d "TraitsType::crossProduct2d" (Dart&, Dart&) - */ - template - bool TriangulationHelper::swappableEdge(const DartType& dart, bool allowDegeneracy) { + DART_TYPE d1 = aDart; + DART_TYPE d2 = d1; + d2.Alpha1(); + return ( TRAITS_TYPE::CrossProduct2D( d1, d2 ) == 0 ); +} + +/** Checks if the edge associated with \e dart is swappable, i.e., if the edge + * is a diagonal in a \e strictly convex (or convex) quadrilateral. + * + * \param aAllowDegeneracy + * If set to true, the function will also return true if the numerical calculations + * indicate that the quadrilateral is convex only, and not necessarily strictly + * convex. + * + * \require + * - \ref hed::TTLtraits::CrossProduct2D "TRAITS_TYPE::CrossProduct2D" (Dart&, Dart&) + */ +template +bool TRIANGULATION_HELPER::SwappableEdge( const DART_TYPE& aDart, bool aAllowDegeneracy ) +{ // How "safe" is it? - - if (isBoundaryEdge(dart)) - return false; - + + if( IsBoundaryEdge( aDart ) ) + return false; + // "angles" are at the diagonal - DartType d1 = dart; - d1.alpha2().alpha1(); - DartType d2 = dart; - d2.alpha1(); - if (allowDegeneracy) { - if (TraitsType::crossProduct2d(d1,d2) < 0.0) - return false; + DART_TYPE d1 = aDart; + d1.Alpha2().Alpha1(); + DART_TYPE d2 = aDart; + d2.Alpha1(); + + if( aAllowDegeneracy ) + { + if( TRAITS_TYPE::CrossProduct2D( d1, d2 ) < 0.0 ) + return false; } - else { - if (TraitsType::crossProduct2d(d1,d2) <= 0.0) - return false; + else + { + if( TRAITS_TYPE::CrossProduct2D( d1, d2 ) <= 0.0 ) + return false; } - + // Opposite side (still angle at the diagonal) - d1 = dart; - d1.alpha0(); + d1 = aDart; + d1.Alpha0(); d2 = d1; - d1.alpha1(); - d2.alpha2().alpha1(); - - if (allowDegeneracy) { - if (TraitsType::crossProduct2d(d1,d2) < 0.0) - return false; + d1.Alpha1(); + d2.Alpha2().Alpha1(); + + if( aAllowDegeneracy ) + { + if( TRAITS_TYPE::CrossProduct2D( d1, d2 ) < 0.0 ) + return false; } - else { - if (TraitsType::crossProduct2d(d1,d2) <= 0.0) - return false; + else + { + if( TRAITS_TYPE::CrossProduct2D( d1, d2 ) <= 0.0 ) + return false; } + return true; - } +} +/** Given a \e dart, CCW or CW, positioned in a 0-orbit at the boundary of a tessellation. + * Position \e dart at a boundary edge in the same 0-orbit.\n + * If the given \e dart is CCW, \e dart is positioned at the left boundary edge + * and will be CW.\n + * If the given \e dart is CW, \e dart is positioned at the right boundary edge + * and will be CCW. + * + * \note + * - The given \e dart must have a source node at the boundary, otherwise an + * infinit loop occurs. + */ +template +void TRIANGULATION_HELPER::PositionAtNextBoundaryEdge( DART_TYPE& aDart ) +{ + DART_TYPE dart_prev; - //------------------------------------------------------------------------------------------------ - /** Given a \e dart, CCW or CW, positioned in a 0-orbit at the boundary of a tessellation. - * Position \e dart at a boundary edge in the same 0-orbit.\n - * If the given \e dart is CCW, \e dart is positioned at the left boundary edge - * and will be CW.\n - * If the given \e dart is CW, \e dart is positioned at the right boundary edge - * and will be CCW. - * - * \note - * - The given \e dart must have a source node at the boundary, otherwise an - * infinit loop occurs. - */ - template - void TriangulationHelper::positionAtNextBoundaryEdge(DartType& dart) { - - DartType dart_prev; - // If alpha2(d)=d, then boundary - - //old convention: dart.alpha0(); - do { - dart.alpha1(); - dart_prev = dart; - dart.alpha2(); - } while (dart != dart_prev); - } - - //------------------------------------------------------------------------------------------------ - /** Checks if the boundary of a triangulation is convex. - * - * \param dart - * A CCW dart at the boundary of the triangulation - * - * \require - * - \ref hed::TTLtraits::crossProduct2d "TraitsType::crossProduct2d" (const Dart&, const Dart&) - */ - template - bool TriangulationHelper::convexBoundary(const DartType& dart) { - - std::list blist; - getBoundary(dart, blist); - - int no; - no = (int)blist.size(); - typename std::list::const_iterator bit = blist.begin(); - DartType d1 = *bit; - ++bit; - DartType d2; - bool convex = true; - for (; bit != blist.end(); ++bit) { - d2 = *bit; - double crossProd = TraitsType::crossProduct2d(d1, d2); - if (crossProd < 0.0) { - //cout << "!!! Boundary is NOT convex: crossProd = " << crossProd << endl; - convex = false; - return convex; - } - d1 = d2; + //old convention: dart.Alpha0(); + do + { + aDart.Alpha1(); + dart_prev = aDart; + aDart.Alpha2(); } - + while( aDart != dart_prev ); +} + +/** Checks if the boundary of a triangulation is convex. + * + * \param dart + * A CCW dart at the boundary of the m_triangulation + * + * \require + * - \ref hed::TTLtraits::CrossProduct2D "TRAITS_TYPE::CrossProduct2D" (const Dart&, const Dart&) + */ +template +bool TRIANGULATION_HELPER::ConvexBoundary( const DART_TYPE& aDart ) +{ + std::list blist; + getBoundary( aDart, blist ); + + int no; + no = (int) blist.size(); + typename std::list::const_iterator bit = blist.begin(); + DART_TYPE d1 = *bit; + ++bit; + DART_TYPE d2; + bool convex = true; + + for( ; bit != blist.end(); ++bit ) + { + d2 = *bit; + double crossProd = TRAITS_TYPE::CrossProduct2D( d1, d2 ); + + if( crossProd < 0.0 ) + { + //cout << "!!! Boundary is NOT convex: crossProd = " << crossProd << endl; + convex = false; + return convex; + } + + d1 = d2; + } + // Check the last angle d2 = *blist.begin(); - double crossProd = TraitsType::crossProduct2d(d1, d2); - if (crossProd < 0.0) { - //cout << "!!! Boundary is NOT convex: crossProd = " << crossProd << endl; - convex = false; + double crossProd = TRAITS_TYPE::CrossProduct2D( d1, d2 ); + + if( crossProd < 0.0 ) + { + //cout << "!!! Boundary is NOT convex: crossProd = " << crossProd << endl; + convex = false; } - + //if (convex) // cout << "\n---> Boundary is convex\n" << endl; //cout << endl; return convex; - } +} - //@} // End of Topological and Geometric Queries Group +//@} // End of Topological and Geometric Queries Group +/** @name Utilities for Delaunay Triangulation */ +//@{ +//------------------------------------------------------------------------------------------------ +/** Optimizes the edges in the given sequence according to the + * \e Delaunay criterion, i.e., such that the edge will fullfill the + * \e circumcircle criterion (or equivalently the \e MaxMin + * angle criterion) with respect to the quadrilaterals where + * they are diagonals. + * + * \param aElist + * The sequence of edges + * + * \require + * - \ref hed::TTLtraits::swapEdge "TRAITS_TYPE::swapEdge" (DART_TYPE& \e dart)\n + * \b Note: Must be implemented such that \e dart is delivered back in a position as + * seen if it was glued to the edge when swapping (rotating) the edge CCW + * + * \using + * - swapTestDelaunay + */ +template +void TRIANGULATION_HELPER::OptimizeDelaunay( DART_LIST_TYPE& aElist ) +{ + OptimizeDelaunay( aElist, aElist.end() ); +} - //------------------------------------------------------------------------------------------------ - // ------------------------ Utilities for Delaunay Triangulation Group -------------------------- - //------------------------------------------------------------------------------------------------ - - /** @name Utilities for Delaunay Triangulation */ - //@{ - - //------------------------------------------------------------------------------------------------ - /** Optimizes the edges in the given sequence according to the - * \e Delaunay criterion, i.e., such that the edge will fullfill the - * \e circumcircle criterion (or equivalently the \e MaxMin - * angle criterion) with respect to the quadrilaterals where - * they are diagonals. - * - * \param elist - * The sequence of edges - * - * \require - * - \ref hed::TTLtraits::swapEdge "TraitsType::swapEdge" (DartType& \e dart)\n - * \b Note: Must be implemented such that \e dart is delivered back in a position as - * seen if it was glued to the edge when swapping (rotating) the edge CCW - * - * \using - * - swapTestDelaunay - */ - template - void TriangulationHelper::optimizeDelaunay(DartListType& elist) { - optimizeDelaunay(elist, elist.end()); - } - - - //------------------------------------------------------------------------------------------------ - template - void TriangulationHelper::optimizeDelaunay(DartListType& elist, const typename DartListType::iterator end) { - +//------------------------------------------------------------------------------------------------ +template +void TRIANGULATION_HELPER::OptimizeDelaunay( DART_LIST_TYPE& aElist, + const typename DART_LIST_TYPE::iterator aEnd ) +{ // CCW darts // Optimize here means Delaunay, but could be any criterion by // requiring a "should swap" in the traits class, or give // a function object? // Assumes that elist has only one dart for each arc. // Darts outside the quadrilateral are preserved - + // For some data structures it is possible to preserve // all darts when swapping. Thus a preserve_darts_when swapping // ccould be given to indicate this and we would gain performance by avoiding // find in list. - + // Requires that swap retuns a dart in the "same position when rotated CCW" // (A vector instead of a list may be better.) - + // First check that elist is not empty - if (elist.empty()) + if( aElist.empty() ) return; // Avoid cycling by more extensive circumcircle test bool cycling_check = true; bool optimal = false; - typename DartListType::iterator it; + typename DART_LIST_TYPE::iterator it; - typename DartListType::iterator end_opt = end; + typename DART_LIST_TYPE::iterator end_opt = aEnd; // Hmm... The following code is trying to derefence an iterator that may // be invalid. This may lead to debug error on Windows, so we comment out @@ -1491,231 +1488,240 @@ private: // problems... // // last_opt is passed the end of the "active list" - //typename DartListType::iterator end_opt; + //typename DART_LIST_TYPE::iterator end_opt; //if (*end != NULL) // end_opt = end; //else // end_opt = elist.end(); - while(!optimal) { - optimal = true; - for (it = elist.begin(); it != end_opt; ++it) { - if (swapTestDelaunay(*it, cycling_check)) { + while( !optimal ) + { + optimal = true; + for( it = aElist.begin(); it != end_opt; ++it ) + { + if( SwapTestDelaunay( *it, cycling_check ) ) + { + // Preserve darts. Potential darts in the list are: + // - The current dart + // - the four CCW darts on the boundary of the quadrilateral + // (the current arc has only one dart) - // Preserve darts. Potential darts in the list are: - // - The current dart - // - the four CCW darts on the boundary of the quadrilateral - // (the current arc has only one dart) - - swapEdgeInList(it, elist); - - optimal = false; - } // end if should swap - } // end for + SwapEdgeInList( it, aElist ); + + optimal = false; + } // end if should swap + } // end for } // end pass - } +} - - //------------------------------------------------------------------------------------------------ - /** Checks if the edge associated with \e dart should be swapped according - * to the \e Delaunay criterion, i.e., the \e circumcircle criterion (or - * equivalently the \e MaxMin angle criterion). - * - * \param cycling_check - * Must be set to \c true when used in connection with optimization algorithms, - * e.g., optimizeDelaunay. This will avoid cycling and infinite loops in nearly - * neutral cases. - * - * \require - * - \ref hed::TTLtraits::scalarProduct2d "TraitsType::scalarProduct2d" (DartType&, DartType&) - * - \ref hed::TTLtraits::crossProduct2d "TraitsType::crossProduct2d" (DartType&, DartType&) - */ - template +/** Checks if the edge associated with \e dart should be swapped according + * to the \e Delaunay criterion, i.e., the \e circumcircle criterion (or + * equivalently the \e MaxMin angle criterion). + * + * \param aCyclingCheck + * Must be set to \c true when used in connection with optimization algorithms, + * e.g., OptimizeDelaunay. This will avoid cycling and infinite loops in nearly + * neutral cases. + * + * \require + * - \ref hed::TTLtraits::ScalarProduct2D "TRAITS_TYPE::ScalarProduct2D" (DART_TYPE&, DART_TYPE&) + * - \ref hed::TTLtraits::CrossProduct2D "TRAITS_TYPE::CrossProduct2D" (DART_TYPE&, DART_TYPE&) + */ +template #if ((_MSC_VER > 0) && (_MSC_VER < 1300))//#ifdef _MSC_VER - bool TriangulationHelper::swapTestDelaunay(const DartType& dart, bool cycling_check = false) const { +bool TRIANGULATION_HELPER::SwapTestDelaunay(const DART_TYPE& aDart, bool aCyclingCheck = false) const +{ #else - bool TriangulationHelper::swapTestDelaunay(const DartType& dart, bool cycling_check) const { +bool TRIANGULATION_HELPER::SwapTestDelaunay( const DART_TYPE& aDart, bool aCyclingCheck ) const +{ #endif - // The general strategy is taken from Cline & Renka. They claim that // their algorithm insure numerical stability, but experiments show // that this is not correct for neutral, or almost neutral cases. // I have extended this strategy (without using tolerances) to avoid // cycling and infinit loops when used in connection with LOP algorithms; // see the comments below. - - typedef typename TraitsType::real_type real_type; - - if (isBoundaryEdge(dart)) - return false; - - DartType v11 = dart; - v11.alpha1().alpha0(); - DartType v12 = v11; - v12.alpha1(); - - DartType v22 = dart; - v22.alpha2().alpha1().alpha0(); - DartType v21 = v22; - v21.alpha1(); - - real_type cos1 = TraitsType::scalarProduct2d(v11,v12); - real_type cos2 = TraitsType::scalarProduct2d(v21,v22); - + + typedef typename TRAITS_TYPE::REAL_TYPE REAL_TYPE; + + if( IsBoundaryEdge( aDart ) ) + return false; + + DART_TYPE v11 = aDart; + v11.Alpha1().Alpha0(); + DART_TYPE v12 = v11; + v12.Alpha1(); + + DART_TYPE v22 = aDart; + v22.Alpha2().Alpha1().Alpha0(); + DART_TYPE v21 = v22; + v21.Alpha1(); + + REAL_TYPE cos1 = TRAITS_TYPE::ScalarProduct2D( v11, v12 ); + REAL_TYPE cos2 = TRAITS_TYPE::ScalarProduct2D( v21, v22 ); + // "Angles" are opposite to the diagonal. // The diagonals should be swapped iff (t1+t2) .gt. 180 // degrees. The following two tests insure numerical // stability according to Cline & Renka. But experiments show // that cycling may still happen; see the aditional test below. - if (cos1 >= 0 && cos2 >= 0) // both angles are grater or equual 90 - return false; - if (cos1 < 0 && cos2 < 0) // both angles are less than 90 - return true; - - real_type sin1 = TraitsType::crossProduct2d(v11,v12); - real_type sin2 = TraitsType::crossProduct2d(v21,v22); - real_type sin12 = sin1*cos2 + cos1*sin2; - if (sin12 >= 0) // equality represents a neutral case - return false; - - if (cycling_check) { - // situation so far is sin12 < 0. Test if this also - // happens for the swapped edge. - - // The numerical calculations so far indicate that the edge is - // not Delaunay and should not be swapped. But experiments show that - // in neutral cases, or almost neutral cases, it may happen that - // the swapped edge may again be found to be not Delaunay and thus - // be swapped if we return true here. This may lead to cycling and - // an infinte loop when used, e.g., in connection with optimizeDelaunay. - // - // In an attempt to avoid this we test if the swapped edge will - // also be found to be not Delaunay by repeating the last test above - // for the swapped edge. - // We now rely on the general requirement for TraitsType::swapEdge which - // should deliver CCW dart back in "the same position"; see the general - // description. This will insure numerical stability as the next calculation - // is the same as if this function was called again with the swapped edge. - // Cycling is thus impossible provided that the initial tests above does - // not result in ambiguity (and they should probably not do so). - - v11.alpha0(); - v12.alpha0(); - v21.alpha0(); - v22.alpha0(); - // as if the edge was swapped/rotated CCW - cos1 = TraitsType::scalarProduct2d(v22,v11); - cos2 = TraitsType::scalarProduct2d(v12,v21); - sin1 = TraitsType::crossProduct2d(v22,v11); - sin2 = TraitsType::crossProduct2d(v12,v21); - sin12 = sin1*cos2 + cos1*sin2; - if (sin12 < 0) { - // A neutral case, but the tests above lead to swapping + if( cos1 >= 0 && cos2 >= 0 ) // both angles are grater or equual 90 return false; - } + + if( cos1 < 0 && cos2 < 0 ) // both angles are less than 90 + return true; + + REAL_TYPE sin1 = TRAITS_TYPE::CrossProduct2D( v11, v12 ); + REAL_TYPE sin2 = TRAITS_TYPE::CrossProduct2D( v21, v22 ); + REAL_TYPE sin12 = sin1 * cos2 + cos1 * sin2; + + if( sin12 >= 0 ) // equality represents a neutral case + return false; + + if( aCyclingCheck ) + { + // situation so far is sin12 < 0. Test if this also + // happens for the swapped edge. + + // The numerical calculations so far indicate that the edge is + // not Delaunay and should not be swapped. But experiments show that + // in neutral cases, or almost neutral cases, it may happen that + // the swapped edge may again be found to be not Delaunay and thus + // be swapped if we return true here. This may lead to cycling and + // an infinte loop when used, e.g., in connection with OptimizeDelaunay. + // + // In an attempt to avoid this we test if the swapped edge will + // also be found to be not Delaunay by repeating the last test above + // for the swapped edge. + // We now rely on the general requirement for TRAITS_TYPE::swapEdge which + // should deliver CCW dart back in "the same position"; see the general + // description. This will insure numerical stability as the next calculation + // is the same as if this function was called again with the swapped edge. + // Cycling is thus impossible provided that the initial tests above does + // not result in ambiguity (and they should probably not do so). + + v11.Alpha0(); + v12.Alpha0(); + v21.Alpha0(); + v22.Alpha0(); + // as if the edge was swapped/rotated CCW + cos1 = TRAITS_TYPE::ScalarProduct2D( v22, v11 ); + cos2 = TRAITS_TYPE::ScalarProduct2D( v12, v21 ); + sin1 = TRAITS_TYPE::CrossProduct2D( v22, v11 ); + sin2 = TRAITS_TYPE::CrossProduct2D( v12, v21 ); + sin12 = sin1 * cos2 + cos1 * sin2; + + if( sin12 < 0 ) + { + // A neutral case, but the tests above lead to swapping + return false; + } } - + return true; - } +} +//----------------------------------------------------------------------- +// +// x +//" / \ " +// / | \ Darts: +//oe2 / | \ oe2 = oppEdge2 +// x....|....x +// \ d| d/ d = diagonal (input and output) +// \ | / +// oe1 \ / oe1 = oppEdge1 +// x +// +//----------------------------------------------------------------------- +/** Recursively swaps edges in the triangulation according to the \e Delaunay criterion. + * + * \param aDiagonal + * A CCW dart representing the edge where the recursion starts from. + * + * \require + * - \ref hed::TTLtraits::swapEdge "TRAITS_TYPE::swapEdge" (DART_TYPE&)\n + * \b Note: Must be implemented such that the darts outside the quadrilateral + * are not affected by the swap. + * + * \using + * - Calls itself recursively + */ +template +void TRIANGULATION_HELPER::RecSwapDelaunay( DART_TYPE& aDiagonal ) +{ + if( !SwapTestDelaunay( aDiagonal ) ) + // ??? swapTestDelaunay also checks if boundary, so this can be optimized + return; - //----------------------------------------------------------------------- - // - // x - //" / \ " - // / | \ Darts: - //oe2 / | \ oe2 = oppEdge2 - // x....|....x - // \ d| d/ d = diagonal (input and output) - // \ | / - // oe1 \ / oe1 = oppEdge1 - // x - // - //----------------------------------------------------------------------- - /** Recursively swaps edges in the triangulation according to the \e Delaunay criterion. - * - * \param diagonal - * A CCW dart representing the edge where the recursion starts from. - * - * \require - * - \ref hed::TTLtraits::swapEdge "TraitsType::swapEdge" (DartType&)\n - * \b Note: Must be implemented such that the darts outside the quadrilateral - * are not affected by the swap. - * - * \using - * - Calls itself recursively - */ - template - void TriangulationHelper::recSwapDelaunay(DartType& diagonal) { - - if (!swapTestDelaunay(diagonal)) - // ??? swapTestDelaunay also checks if boundary, so this can be optimized - return; - // Get the other "edges" of the current triangle; see illustration above. - DartType oppEdge1 = diagonal; - oppEdge1.alpha1(); + DART_TYPE oppEdge1 = aDiagonal; + oppEdge1.Alpha1(); bool b1; - if (isBoundaryEdge(oppEdge1)) - b1 = true; - else { - b1 = false; - oppEdge1.alpha2(); + + if( IsBoundaryEdge( oppEdge1 ) ) + b1 = true; + else + { + b1 = false; + oppEdge1.Alpha2(); } - - - DartType oppEdge2 = diagonal; - oppEdge2.alpha0().alpha1().alpha0(); + + DART_TYPE oppEdge2 = aDiagonal; + oppEdge2.Alpha0().Alpha1().Alpha0(); bool b2; - if (isBoundaryEdge(oppEdge2)) - b2 = true; - else { - b2 = false; - oppEdge2.alpha2(); + + if( IsBoundaryEdge( oppEdge2 ) ) + b2 = true; + else + { + b2 = false; + oppEdge2.Alpha2(); } - + // Swap the given diagonal - triangulation.swapEdge(diagonal); - - if (!b1) - recSwapDelaunay(oppEdge1); - if (!b2) - recSwapDelaunay(oppEdge2); - } + m_triangulation.swapEdge( aDiagonal ); + if( !b1 ) + RecSwapDelaunay( oppEdge1 ); + + if( !b2 ) + RecSwapDelaunay( oppEdge2 ); +} + +/** Swaps edges away from the (interior) node associated with + * \e dart such that that exactly three edges remain incident + * with the node. + * This function is used as a first step in RemoveInteriorNode + * + * \retval dart + * A CCW dart incident with the node + * + * \par Assumes: + * - The node associated with \e dart is interior to the + * triangulation. + * + * \require + * - \ref hed::TTLtraits::swapEdge "TRAITS_TYPE::swapEdge" (DART_TYPE& \e dart)\n + * \b Note: Must be implemented such that \e dart is delivered back in a position as + * seen if it was glued to the edge when swapping (rotating) the edge CCW + * + * \note + * - A degenerate triangle may be left at the node. + * - The function is not unique as it depends on which dart + * at the node that is given as input. + * + * \see + * SwapEdgesAwayFromBoundaryNode + */ +template +void TRIANGULATION_HELPER::SwapEdgesAwayFromInteriorNode( DART_TYPE& aDart, + LIST_TYPE& aSwappedEdges ) +{ - //------------------------------------------------------------------------------------------------ - /** Swaps edges away from the (interior) node associated with - * \e dart such that that exactly three edges remain incident - * with the node. - * This function is used as a first step in removeInteriorNode - * - * \retval dart - * A CCW dart incident with the node - * - * \par Assumes: - * - The node associated with \e dart is interior to the - * triangulation. - * - * \require - * - \ref hed::TTLtraits::swapEdge "TraitsType::swapEdge" (DartType& \e dart)\n - * \b Note: Must be implemented such that \e dart is delivered back in a position as - * seen if it was glued to the edge when swapping (rotating) the edge CCW - * - * \note - * - A degenerate triangle may be left at the node. - * - The function is not unique as it depends on which dart - * at the node that is given as input. - * - * \see - * swapEdgesAwayFromBoundaryNode - */ - template - void TriangulationHelper::swapEdgesAwayFromInteriorNode(DartType& dart, ListType& swapped_edges) { - // Same iteration as in fixEdgesAtCorner, but not boundary - DartType dnext = dart; - + DART_TYPE dnext = aDart; + // Allow degeneracy, otherwise we might end up with degree=4. // For example, the reverse operation of inserting a point on an // existing edge gives a situation where all edges are non-swappable. @@ -1724,53 +1730,56 @@ private: // ??? An alternative here is to wait with degeneracy till we get an // infinite loop with degree > 3. bool allowDegeneracy = true; - - int degree = getDegreeOfNode(dart); - DartType d_iter; - while (degree > 3) { - d_iter = dnext; - dnext.alpha1().alpha2(); - - if (swappableEdge(d_iter, allowDegeneracy)) { - triangulation.swapEdge(d_iter); // swap the edge away - // Collect swapped edges in the list - // "Hide" the dart on the other side of the edge to avoid it being changed for - // other swaps - DartType swapped_edge = d_iter; // it was delivered back - swapped_edge.alpha2().alpha0(); // CCW (if not at boundary) - swapped_edges.push_back(swapped_edge); - - degree--; - } + + int degree = getDegreeOfNode( aDart ); + DART_TYPE d_iter; + + while( degree > 3 ) + { + d_iter = dnext; + dnext.Alpha1().Alpha2(); + + if( SwappableEdge( d_iter, allowDegeneracy ) ) + { + m_triangulation.swapEdge( d_iter ); // swap the edge away + // Collect swapped edges in the list + // "Hide" the dart on the other side of the edge to avoid it being changed for + // other swaps + DART_TYPE swapped_edge = d_iter; // it was delivered back + swapped_edge.Alpha2().Alpha0(); // CCW (if not at boundary) + aSwappedEdges.push_back( swapped_edge ); + + degree--; + } } + // Output, incident to the node - dart = dnext; - } + aDart = dnext; +} - - //------------------------------------------------------------------------------------------------ - /** Swaps edges away from the (boundary) node associated with - * \e dart in such a way that when removing the edges that remain incident - * with the node, the boundary of the triangulation will be convex. - * This function is used as a first step in removeBoundaryNode - * - * \retval dart - * A CCW dart incident with the node - * - * \require - * - \ref hed::TTLtraits::swapEdge "TraitsType::swapEdge" (DartType& \e dart)\n - * \b Note: Must be implemented such that \e dart is delivered back in a position as - * seen if it was glued to the edge when swapping (rotating) the edge CCW - * - * \par Assumes: - * - The node associated with \e dart is at the boundary of the triangulation. - * - * \see - * swapEdgesAwayFromInteriorNode - */ - template - void TriangulationHelper::swapEdgesAwayFromBoundaryNode(DartType& dart, ListType& swapped_edges) { - +/** Swaps edges away from the (boundary) node associated with + * \e dart in such a way that when removing the edges that remain incident + * with the node, the boundary of the triangulation will be convex. + * This function is used as a first step in RemoveBoundaryNode + * + * \retval dart + * A CCW dart incident with the node + * + * \require + * - \ref hed::TTLtraits::swapEdge "TRAITS_TYPE::swapEdge" (DART_TYPE& \e dart)\n + * \b Note: Must be implemented such that \e dart is delivered back in a position as + * seen if it was glued to the edge when swapping (rotating) the edge CCW + * + * \par Assumes: + * - The node associated with \e dart is at the boundary of the m_triangulation. + * + * \see + * SwapEdgesAwayFromInteriorNode + */ +template +void TRIANGULATION_HELPER::SwapEdgesAwayFromBoundaryNode( DART_TYPE& aDart, + LIST_TYPE& aSwappedEdges ) +{ // All darts that are swappable. // To treat collinear nodes at an existing boundary, we must allow degeneracy // when swapping to the boundary. @@ -1780,98 +1789,108 @@ private: // Assume for the swap in the traits class: // - A dart on the swapped edge is delivered back in a position as // seen if it was glued to the edge when swapping (rotating) the edge CCW - + //int degree = getDegreeOfNode(dart); - -passes: - - // Swap swappable edges that radiate from the node away - DartType d_iter = dart; // ???? can simply use dart - d_iter.alpha1().alpha2(); // first not at boundary - DartType d_next = d_iter; - bool bend = false; - bool swapped_next_to_boundary = false; - bool swapped_in_pass = false; - - bool allowDegeneracy; // = true; - DartType tmp1, tmp2; - - while (!bend) { - - d_next.alpha1().alpha2(); - if (isBoundaryEdge(d_next)) - bend = true; // then it is CW since alpha2 - - // To allow removing among collinear nodes at the boundary, - // degenerate triangles must be allowed - // (they will be removed when used in connection with removeBoundaryNode) - tmp1 = d_iter; tmp1.alpha1(); - tmp2 = d_iter; tmp2.alpha2().alpha1(); // don't bother with boundary (checked later) - - if (isBoundaryEdge(tmp1) && isBoundaryEdge(tmp2)) - allowDegeneracy = true; - else - allowDegeneracy = false; - - if (swappableEdge(d_iter, allowDegeneracy)) { - triangulation.swapEdge(d_iter); - - // Collect swapped edges in the list - // "Hide" the dart on the other side of the edge to avoid it being changed for - // other swapps - DartType swapped_edge = d_iter; // it was delivered back - swapped_edge.alpha2().alpha0(); // CCW - swapped_edges.push_back(swapped_edge); - - //degree--; // if degree is 2, or bend=true, we are done - swapped_in_pass = true; - if (bend) - swapped_next_to_boundary = true; + + passes: + // Swap swappable edges that radiate from the node away + DART_TYPE d_iter = aDart; // ???? can simply use dart + d_iter.Alpha1().Alpha2(); // first not at boundary + DART_TYPE d_next = d_iter; + bool bend = false; + bool swapped_next_to_boundary = false; + bool swapped_in_pass = false; + + bool allowDegeneracy; // = true; + DART_TYPE tmp1, tmp2; + + while( !bend ) + { + d_next.Alpha1().Alpha2(); + + if( IsBoundaryEdge( d_next ) ) + bend = true; // then it is CW since alpha2 + + // To allow removing among collinear nodes at the boundary, + // degenerate triangles must be allowed + // (they will be removed when used in connection with RemoveBoundaryNode) + tmp1 = d_iter; + tmp1.Alpha1(); + tmp2 = d_iter; + tmp2.Alpha2().Alpha1(); // don't bother with boundary (checked later) + + if( IsBoundaryEdge( tmp1 ) && IsBoundaryEdge( tmp2 ) ) + allowDegeneracy = true; + else + allowDegeneracy = false; + + if( SwappableEdge( d_iter, allowDegeneracy ) ) + { + m_triangulation.swapEdge( d_iter ); + + // Collect swapped edges in the list + // "Hide" the dart on the other side of the edge to avoid it being changed for + // other swapps + DART_TYPE swapped_edge = d_iter; // it was delivered back + swapped_edge.Alpha2().Alpha0(); // CCW + aSwappedEdges.push_back( swapped_edge ); + + //degree--; // if degree is 2, or bend=true, we are done + swapped_in_pass = true; + if( bend ) + swapped_next_to_boundary = true; + } + + if( !bend ) + d_iter = d_next; } - if (!bend) - d_iter = d_next; - } - - // Deliver a dart as output in the same position as the incoming dart - if (swapped_next_to_boundary) { - // Assume that "swapping is CCW and dart is preserved in the same position - d_iter.alpha1().alpha0().alpha1(); // CW and see below - } - else { - d_iter.alpha1(); // CW and see below - } - positionAtNextBoundaryEdge(d_iter); // CCW - - dart = d_iter; // for next pass or output - - // If a dart was swapped in this iteration we must run it more - if (swapped_in_pass) - goto passes; - } + // Deliver a dart as output in the same position as the incoming dart + if( swapped_next_to_boundary ) + { + // Assume that "swapping is CCW and dart is preserved in the same position + d_iter.Alpha1().Alpha0().Alpha1(); // CW and see below + } + else + { + d_iter.Alpha1(); // CW and see below + } + PositionAtNextBoundaryEdge( d_iter ); // CCW - //------------------------------------------------------------------------------------------------ - /** Swap the the edge associated with iterator \e it and update affected darts - * in \e elist accordingly. - * The darts affected by the swap are those in the same quadrilateral. - * Thus, if one want to preserve one or more of these darts on should - * keep them in \e elist. - */ - template - void TriangulationHelper::swapEdgeInList(const typename DartListType::iterator& it, DartListType& elist) { + aDart = d_iter; // for next pass or output + + // If a dart was swapped in this iteration we must run it more + if( swapped_in_pass ) + goto passes; +} + +/** Swap the the edge associated with iterator \e it and update affected darts + * in \e elist accordingly. + * The darts affected by the swap are those in the same quadrilateral. + * Thus, if one want to preserve one or more of these darts on should + * keep them in \e elist. + */ +template +void TRIANGULATION_HELPER::SwapEdgeInList( const typename DART_LIST_TYPE::iterator& aIt, + DART_LIST_TYPE& aElist ) +{ + + typename DART_LIST_TYPE::iterator it1, it2, it3, it4; + DART_TYPE dart( *aIt ); + + //typename TRAITS_TYPE::DART_TYPE d1 = dart; d1.Alpha2().Alpha1(); + //typename TRAITS_TYPE::DART_TYPE d2 = d1; d2.Alpha0().Alpha1(); + //typename TRAITS_TYPE::DART_TYPE d3 = dart; d3.Alpha0().Alpha1(); + //typename TRAITS_TYPE::DART_TYPE d4 = d3; d4.Alpha0().Alpha1(); + DART_TYPE d1 = dart; + d1.Alpha2().Alpha1(); + DART_TYPE d2 = d1; + d2.Alpha0().Alpha1(); + DART_TYPE d3 = dart; + d3.Alpha0().Alpha1(); + DART_TYPE d4 = d3; + d4.Alpha0().Alpha1(); - typename DartListType::iterator it1, it2, it3, it4; - DartType dart(*it); - - //typename TraitsType::DartType d1 = dart; d1.alpha2().alpha1(); - //typename TraitsType::DartType d2 = d1; d2.alpha0().alpha1(); - //typename TraitsType::DartType d3 = dart; d3.alpha0().alpha1(); - //typename TraitsType::DartType d4 = d3; d4.alpha0().alpha1(); - DartType d1 = dart; d1.alpha2().alpha1(); - DartType d2 = d1; d2.alpha0().alpha1(); - DartType d3 = dart; d3.alpha0().alpha1(); - DartType d4 = d3; d4.alpha0().alpha1(); - // Find pinters to the darts that may change. // ??? Note, this is not very efficient since we must use find, which is O(N), // four times. @@ -1881,37 +1900,49 @@ passes: // - sould we use another container type or, // - erase them and reinsert? // - or use two lists? - it1 = find(elist.begin(), elist.end(), d1); - it2 = find(elist.begin(), elist.end(), d2); - it3 = find(elist.begin(), elist.end(), d3); - it4 = find(elist.begin(), elist.end(), d4); - - triangulation.swapEdge(dart); + it1 = find( aElist.begin(), aElist.end(), d1 ); + it2 = find( aElist.begin(), aElist.end(), d2 ); + it3 = find( aElist.begin(), aElist.end(), d3 ); + it4 = find( aElist.begin(), aElist.end(), d4 ); + + m_triangulation.swapEdge( dart ); // Update the current dart which may have changed - *it = dart; - + *aIt = dart; + // Update darts that may have changed again (if they were present) // Note that dart is delivered back after swapping - if (it1 != elist.end()) { - d1 = dart; d1.alpha1().alpha0(); - *it1 = d1; + if( it1 != aElist.end() ) + { + d1 = dart; + d1.Alpha1().Alpha0(); + *it1 = d1; } - if (it2 != elist.end()) { - d2 = dart; d2.alpha2().alpha1(); - *it2 = d2; + + if( it2 != aElist.end() ) + { + d2 = dart; + d2.Alpha2().Alpha1(); + *it2 = d2; } - if (it3 != elist.end()) { - d3 = dart; d3.alpha2().alpha1().alpha0().alpha1(); - *it3 = d3; + + if( it3 != aElist.end() ) + { + d3 = dart; + d3.Alpha2().Alpha1().Alpha0().Alpha1(); + *it3 = d3; } - if (it4 != elist.end()) { - d4 = dart; d4.alpha0().alpha1(); - *it4 = d4; + + if( it4 != aElist.end() ) + { + d4 = dart; + d4.Alpha0().Alpha1(); + *it4 = d4; } - } - - //@} // End of Utilities for Delaunay Triangulation Group - -}; // End of ttl namespace scope (but other files may also contain functions for ttl) +} + +//@} // End of Utilities for Delaunay Triangulation Group + +} +// End of ttl namespace scope (but other files may also contain functions for ttl) #endif // _TTL_H_ diff --git a/include/ttl/ttl_util.h b/include/ttl/ttl_util.h index cfdf509531..398f6f316e 100644 --- a/include/ttl/ttl_util.h +++ b/include/ttl/ttl_util.h @@ -3,11 +3,11 @@ * Applied Mathematics, Norway. * * Contact information: E-mail: tor.dokken@sintef.no - * SINTEF ICT, Department of Applied Mathematics, + * SINTEF ICT, DeaPArtment of Applied Mathematics, * P.O. Box 124 Blindern, * 0314 Oslo, Norway. * - * This file is part of TTL. + * This file is aPArt of TTL. * * TTL is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -16,7 +16,7 @@ * * TTL 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 + * MERCHANTABILITY or FITNESS FOR A aPARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public @@ -40,28 +40,22 @@ #ifndef _TTL_UTIL_H_ #define _TTL_UTIL_H_ - #include #include - #ifdef _MSC_VER # if _MSC_VER < 1300 # include # endif #endif - -//using namespace std; - - /** \brief Utilities * -* This name space contains utility functions for TTL.\n +* This name saPAce contains utility functions for TTL.\n * * Point and vector algebra such as scalar product and cross product * between vectors are implemented here. -* These functions are required by functions in the \ref ttl namespace, +* These functions are required by functions in the \ref ttl namesaPAce, * where they are assumed to be present in the \ref hed::TTLtraits "TTLtraits" class. * Thus, the user can call these functions from the traits class. * For efficiency reasons, the user may consider implementing these @@ -77,67 +71,59 @@ * ttl and \ref api * * \author -* Øyvind Hjelle, oyvindhj@ifi.uio.no +* �yvind Hjelle, oyvindhj@ifi.uio.no */ +namespace ttl_util +{ +/** @name Computational geometry */ +//@{ +/** Scalar product between two 2D vectors. + * + * \aPAr Returns: + * \code + * aDX1*aDX2 + aDY1*aDY2 + * \endcode + */ +template +REAL_TYPE ScalarProduct2D( REAL_TYPE aDX1, REAL_TYPE aDY1, REAL_TYPE aDX2, REAL_TYPE aDY2 ) +{ + return aDX1 * aDX2 + aDY1 * aDY2; +} -namespace ttl_util { +/** Cross product between two 2D vectors. (The z-component of the actual cross product.) + * + * \aPAr Returns: + * \code + * aDX1*aDY2 - aDY1*aDX2 + * \endcode + */ +template +REAL_TYPE CrossProduct2D( REAL_TYPE aDX1, REAL_TYPE aDY1, REAL_TYPE aDX2, REAL_TYPE aDY2 ) +{ + return aDX1 * aDY2 - aDY1 * aDX2; +} +/** Returns a positive value if the 2D nodes/points \e aPA, \e aPB, and + * \e aPC occur in counterclockwise order; a negative value if they occur + * in clockwise order; and zero if they are collinear. + * + * \note + * - This is a finite arithmetic fast version. It can be made more robust using + * exact arithmetic schemes by Jonathan Richard Shewchuk. See + * http://www-2.cs.cmu.edu/~quake/robust.html + */ +template +REAL_TYPE Orient2DFast( REAL_TYPE aPA[2], REAL_TYPE aPB[2], REAL_TYPE aPC[2] ) +{ + REAL_TYPE acx = aPA[0] - aPC[0]; + REAL_TYPE bcx = aPB[0] - aPC[0]; + REAL_TYPE acy = aPA[1] - aPC[1]; + REAL_TYPE bcy = aPB[1] - aPC[1]; - //------------------------------------------------------------------------------------------------ - // ------------------------------ Computational Geometry Group ---------------------------------- - //------------------------------------------------------------------------------------------------ - - /** @name Computational geometry */ - //@{ - - //------------------------------------------------------------------------------------------------ - /** Scalar product between two 2D vectors. - * - * \par Returns: - * \code - * dx1*dx2 + dy1*dy2 - * \endcode - */ - template - real_type scalarProduct2d(real_type dx1, real_type dy1, real_type dx2, real_type dy2) { - return dx1*dx2 + dy1*dy2; - } - - - //------------------------------------------------------------------------------------------------ - /** Cross product between two 2D vectors. (The z-component of the actual cross product.) - * - * \par Returns: - * \code - * dx1*dy2 - dy1*dx2 - * \endcode - */ - template - real_type crossProduct2d(real_type dx1, real_type dy1, real_type dx2, real_type dy2) { - return dx1*dy2 - dy1*dx2; - } - - - //------------------------------------------------------------------------------------------------ - /** Returns a positive value if the 2D nodes/points \e pa, \e pb, and - * \e pc occur in counterclockwise order; a negative value if they occur - * in clockwise order; and zero if they are collinear. - * - * \note - * - This is a finite arithmetic fast version. It can be made more robust using - * exact arithmetic schemes by Jonathan Richard Shewchuk. See - * http://www-2.cs.cmu.edu/~quake/robust.html - */ - template - real_type orient2dfast(real_type pa[2], real_type pb[2], real_type pc[2]) { - real_type acx = pa[0] - pc[0]; - real_type bcx = pb[0] - pc[0]; - real_type acy = pa[1] - pc[1]; - real_type bcy = pb[1] - pc[1]; return acx * bcy - acy * bcx; - } +} -}; // End of ttl_util namespace scope +} // namespace ttl_util #endif // _TTL_UTIL_H_ diff --git a/pcbnew/ratsnest_data.cpp b/pcbnew/ratsnest_data.cpp index b2bc4d5899..f74a412479 100644 --- a/pcbnew/ratsnest_data.cpp +++ b/pcbnew/ratsnest_data.cpp @@ -68,7 +68,7 @@ bool sortDistance( const RN_NODE_PTR& aOrigin, const RN_NODE_PTR& aNode1, bool sortWeight( const RN_EDGE_PTR& aEdge1, const RN_EDGE_PTR& aEdge2 ) { - return aEdge1->getWeight() < aEdge2->getWeight(); + return aEdge1->GetWeight() < aEdge2->GetWeight(); } @@ -92,7 +92,7 @@ bool operator!=( const RN_NODE_PTR& aFirst, const RN_NODE_PTR& aSecond ) bool isEdgeConnectingNode( const RN_EDGE_PTR& aEdge, const RN_NODE_PTR& aNode ) { - return aEdge->getSourceNode() == aNode || aEdge->getTargetNode() == aNode; + return aEdge->GetSourceNode() == aNode || aEdge->GetTargetNode() == aNode; } @@ -125,8 +125,8 @@ std::vector* kruskalMST( RN_LINKS::RN_EDGE_LIST& aEdges, { RN_EDGE_PTR& dt = *aEdges.begin(); - int srcTag = tags[dt->getSourceNode()]; - int trgTag = tags[dt->getTargetNode()]; + int srcTag = tags[dt->GetSourceNode()]; + int trgTag = tags[dt->GetTargetNode()]; // Check if by adding this edge we are going to join two different forests if( srcTag != trgTag ) @@ -139,7 +139,7 @@ std::vector* kruskalMST( RN_LINKS::RN_EDGE_LIST& aEdges, // Move nodes that were marked with old tag to the list marked with the new tag cycles[srcTag].splice( cycles[srcTag].end(), cycles[trgTag] ); - if( dt->getWeight() == 0 ) // Skip already existing connections (weight == 0) + if( dt->GetWeight() == 0 ) // Skip already existing connections (weight == 0) { mstExpectedSize--; } @@ -148,9 +148,9 @@ std::vector* kruskalMST( RN_LINKS::RN_EDGE_LIST& aEdges, // Do a copy of edge, but make it RN_EDGE_MST. In contrary to RN_EDGE, // RN_EDGE_MST saves both source and target node and does not require any other // edges to exist for getting source/target nodes - RN_EDGE_MST_PTR newEdge = boost::make_shared( dt->getSourceNode(), - dt->getTargetNode(), - dt->getWeight() ); + RN_EDGE_MST_PTR newEdge = boost::make_shared( dt->GetSourceNode(), + dt->GetTargetNode(), + dt->GetWeight() ); mst->push_back( newEdge ); ++mstSize; } @@ -169,8 +169,8 @@ std::vector* kruskalMST( RN_LINKS::RN_EDGE_LIST& aEdges, void RN_NET::validateEdge( RN_EDGE_PTR& aEdge ) { - RN_NODE_PTR source = aEdge->getSourceNode(); - RN_NODE_PTR target = aEdge->getTargetNode(); + RN_NODE_PTR source = aEdge->GetSourceNode(); + RN_NODE_PTR target = aEdge->GetTargetNode(); bool valid = true; // If any of nodes belonging to the edge has the flag set, @@ -280,13 +280,13 @@ void RN_NET::compute() std::partial_sort_copy( boardNodes.begin(), boardNodes.end(), nodes.begin(), nodes.end() ); TRIANGULATOR triangulator; - triangulator.createDelaunay( nodes.begin(), nodes.end() ); - boost::scoped_ptr triangEdges( triangulator.getEdges() ); + triangulator.CreateDelaunay( nodes.begin(), nodes.end() ); + boost::scoped_ptr triangEdges( triangulator.GetEdges() ); // Compute weight/distance for edges resulting from triangulation RN_LINKS::RN_EDGE_LIST::iterator eit, eitEnd; for( eit = (*triangEdges).begin(), eitEnd = (*triangEdges).end(); eit != eitEnd; ++eit ) - (*eit)->setWeight( getDistance( (*eit)->getSourceNode(), (*eit)->getTargetNode() ) ); + (*eit)->SetWeight( getDistance( (*eit)->GetSourceNode(), (*eit)->GetTargetNode() ) ); // Add the currently existing connections list to the results of triangulation std::copy( boardEdges.begin(), boardEdges.end(), std::front_inserter( *triangEdges ) ); @@ -508,8 +508,8 @@ void RN_NET::RemoveItem( const TRACK* aTrack ) RN_EDGE_PTR& edge = m_tracks.at( aTrack ); // Save nodes, so they can be cleared later - RN_NODE_PTR aBegin = edge->getSourceNode(); - RN_NODE_PTR aEnd = edge->getTargetNode(); + RN_NODE_PTR aBegin = edge->GetSourceNode(); + RN_NODE_PTR aEnd = edge->GetTargetNode(); m_links.RemoveConnection( edge ); // Remove nodes associated with the edge. It is done in a safe way, there is a check @@ -696,8 +696,8 @@ std::list RN_NET::GetNodes( const BOARD_CONNECTED_ITEM* aItem ) con const TRACK* track = static_cast( aItem ); RN_EDGE_PTR edge = m_tracks.at( track ); - nodes.push_back( edge->getSourceNode() ); - nodes.push_back( edge->getTargetNode() ); + nodes.push_back( edge->GetSourceNode() ); + nodes.push_back( edge->GetTargetNode() ); } break; diff --git a/pcbnew/ratsnest_data.h b/pcbnew/ratsnest_data.h index 712909f2fa..afc9c0935f 100644 --- a/pcbnew/ratsnest_data.h +++ b/pcbnew/ratsnest_data.h @@ -50,13 +50,13 @@ class ZONE_CONTAINER; class CPolyPt; // Preserve KiCad coding style policy -typedef hed::Node RN_NODE; -typedef hed::NodePtr RN_NODE_PTR; -typedef hed::Edge RN_EDGE; -typedef hed::EdgePtr RN_EDGE_PTR; -typedef hed::EdgeMST RN_EDGE_MST; -typedef boost::shared_ptr RN_EDGE_MST_PTR; -typedef hed::Triangulation TRIANGULATOR; +typedef hed::NODE RN_NODE; +typedef hed::NODE_PTR RN_NODE_PTR; +typedef hed::EDGE RN_EDGE; +typedef hed::EDGE_PTR RN_EDGE_PTR; +typedef hed::EDGE_MST RN_EDGE_MST; +typedef hed::TRIANGULATION TRIANGULATOR; +typedef boost::shared_ptr RN_EDGE_MST_PTR; bool operator==( const RN_NODE_PTR& aFirst, const RN_NODE_PTR& aSecond ); bool operator!=( const RN_NODE_PTR& aFirst, const RN_NODE_PTR& aSecond ); diff --git a/pcbnew/ratsnest_viewitem.cpp b/pcbnew/ratsnest_viewitem.cpp index 5de2527111..ffe88c3c7f 100644 --- a/pcbnew/ratsnest_viewitem.cpp +++ b/pcbnew/ratsnest_viewitem.cpp @@ -97,8 +97,8 @@ void RATSNEST_VIEWITEM::ViewDraw( int aLayer, GAL* aGal ) const BOOST_FOREACH( const RN_EDGE_PTR& edge, *edges ) { - const RN_NODE_PTR& sourceNode = edge->getSourceNode(); - const RN_NODE_PTR& targetNode = edge->getTargetNode(); + const RN_NODE_PTR& sourceNode = edge->GetSourceNode(); + const RN_NODE_PTR& targetNode = edge->GetTargetNode(); VECTOR2D source( sourceNode->GetX(), sourceNode->GetY() ); VECTOR2D target( targetNode->GetX(), targetNode->GetY() ); From 7dc08c871808ec48a28c635453089ac6f844055d Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 7 Apr 2014 13:50:18 +0200 Subject: [PATCH 273/741] Fixed switching back to selection tool using the right toolbar buttons in pcbnew (GAL). --- pcbnew/edit.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index 0fbe391318..3aad9dc78f 100644 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -1374,7 +1374,7 @@ void PCB_EDIT_FRAME::OnSelectTool( wxCommandEvent& aEvent ) { std::string actionName = COMMON_ACTIONS::TranslateLegacyId( id ); - if( !actionName.empty() ) + if( !actionName.empty() || id == ID_NO_TOOL_SELECTED ) { const int MAX_TRIALS = 10; int trials = 0; @@ -1389,7 +1389,8 @@ void PCB_EDIT_FRAME::OnSelectTool( wxCommandEvent& aEvent ) m_toolManager.ProcessEvent( cancel ); } - m_toolManager.RunAction( actionName ); + if( !actionName.empty() ) + m_toolManager.RunAction( actionName ); } } else From cc445391e980eb1231580d53a6bd66c4dbbb3ee3 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 7 Apr 2014 13:59:27 +0200 Subject: [PATCH 274/741] Items that may be modified using EDIT_POINTs used to stay selected after pressing ESC (only EDIT_POINTs got away) - fixed. --- pcbnew/tools/point_editor.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp index f4aa4baa17..1b6ed99e20 100644 --- a/pcbnew/tools/point_editor.cpp +++ b/pcbnew/tools/point_editor.cpp @@ -315,6 +315,9 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) modified = false; } + // Let the selection tool receive the event too + m_toolMgr->PassEvent(); + break; } From 94bc4355997f9e4807ed043369020d3e19b25f13 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Mon, 7 Apr 2014 07:28:44 -0500 Subject: [PATCH 275/741] Enhance scripts/library-repos-install.sh to create library-repos-install.bat and add that. --- scripts/library-repos-install.bat | 89 +++++++++++++++++++++++++++++++ scripts/library-repos-install.sh | 36 +++++++++++-- 2 files changed, 122 insertions(+), 3 deletions(-) create mode 100644 scripts/library-repos-install.bat diff --git a/scripts/library-repos-install.bat b/scripts/library-repos-install.bat new file mode 100644 index 0000000000..09027b5aab --- /dev/null +++ b/scripts/library-repos-install.bat @@ -0,0 +1,89 @@ +REM This file was created using /scripts/library-repos-install.sh on linux. +REM Run it from a directory you desire as the base for all libraries. +git clone https://github.com/KiCad/kicad-library +git clone https://github.com/KiCad/Displays_7-Segment.pretty +git clone https://github.com/KiCad/Air_Coils_SML_NEOSID.pretty +git clone https://github.com/KiCad/Sockets_BNC.pretty +git clone https://github.com/KiCad/Buzzers_Beepers.pretty +git clone https://github.com/KiCad/Capacitors_Elko_ThroughHole.pretty +git clone https://github.com/KiCad/Capacitors.pretty +git clone https://github.com/KiCad/Capacitors_SMD.pretty +git clone https://github.com/KiCad/Capacitors_ThroughHole.pretty +git clone https://github.com/KiCad/Choke_Axial_ThroughHole.pretty +git clone https://github.com/KiCad/Choke_Radial_ThroughHole.pretty +git clone https://github.com/KiCad/Choke_SMD.pretty +git clone https://github.com/KiCad/Choke_Toroid_ThroughHole.pretty +git clone https://github.com/KiCad/Choke_Common-Mode_Wurth.pretty +git clone https://github.com/KiCad/Connect.pretty +git clone https://github.com/KiCad/Connectors_Serial_MOLEX.pretty +git clone https://github.com/KiCad/Converters_DCDC_ACDC.pretty +git clone https://github.com/KiCad/Crystals.pretty +git clone https://github.com/KiCad/Crystals_Oscillators_SMD.pretty +git clone https://github.com/KiCad/Diodes_SMD.pretty +git clone https://github.com/KiCad/Diodes_ThroughHole.pretty +git clone https://github.com/KiCad/Discret.pretty +git clone https://github.com/KiCad/Display.pretty +git clone https://github.com/KiCad/Divers.pretty +git clone https://github.com/KiCad/EuroBoard_Outline.pretty +git clone https://github.com/KiCad/Fiducials.pretty +git clone https://github.com/KiCad/Filters_HF_Coils_NEOSID.pretty +git clone https://github.com/KiCad/Footprint_Symbols.pretty +git clone https://github.com/KiCad/Fuse_Holders_and_Fuses.pretty +git clone https://github.com/KiCad/Heatsinks.pretty +git clone https://github.com/KiCad/Housings_ROHM.pretty +git clone https://github.com/KiCad/Housings_SIP9.pretty +git clone https://github.com/KiCad/Housings_SOT-23_SOT-143_TSOT-6.pretty +git clone https://github.com/KiCad/Housings_SOT-89.pretty +git clone https://github.com/KiCad/Housings_SOT.pretty +git clone https://github.com/KiCad/Housings_TO-50.pretty +git clone https://github.com/KiCad/Housings_TO-78.pretty +git clone https://github.com/KiCad/Housings_TO-92.pretty +git clone https://github.com/KiCad/Inductors.pretty +git clone https://github.com/KiCad/Inductors_NEOSID.pretty +git clone https://github.com/KiCad/IR-DirectFETs.pretty +git clone https://github.com/KiCad/Iut.pretty +git clone https://github.com/KiCad/Labels.pretty +git clone https://github.com/KiCad/LEDs.pretty +git clone https://github.com/KiCad/Hall-Effect_Transducers_LEM.pretty +git clone https://github.com/KiCad/Measurement_Points.pretty +git clone https://github.com/KiCad/Measurement_Scales.pretty +git clone https://github.com/KiCad/Mechanical_Sockets.pretty +git clone https://github.com/KiCad/Mounting_Holes.pretty +git clone https://github.com/KiCad/Muonde.pretty +git clone https://github.com/KiCad/NF-Transformers_ETAL.pretty +git clone https://github.com/KiCad/Oddities.pretty +git clone https://github.com/KiCad/Transistors_OldSowjetAera.pretty +git clone https://github.com/KiCad/Opto-Devices.pretty +git clone https://github.com/KiCad/Oscillator-Modules.pretty +git clone https://github.com/KiCad/Oscillators.pretty +git clone https://github.com/KiCad/Pentawatts.pretty +git clone https://github.com/KiCad/PFF_PSF_PSS_Leadforms.pretty +git clone https://github.com/KiCad/Pin_Arrays.pretty +git clone https://github.com/KiCad/Potentiometers.pretty +git clone https://github.com/KiCad/Power_Integrations.pretty +git clone https://github.com/KiCad/Printtrafo_CHK.pretty +git clone https://github.com/KiCad/Relays_ThroughHole.pretty +git clone https://github.com/KiCad/Resistors_SMD.pretty +git clone https://github.com/KiCad/Resistors_ThroughHole.pretty +git clone https://github.com/KiCad/Resistors_Universal.pretty +git clone https://github.com/KiCad/QFP.pretty +git clone https://github.com/KiCad/SMD_Packages.pretty +git clone https://github.com/KiCad/Sockets_DIP.pretty +git clone https://github.com/KiCad/Sockets_Mini-Universal.pretty +git clone https://github.com/KiCad/Sockets.pretty +git clone https://github.com/KiCad/Sockets_MOLEX_KK-System.pretty +git clone https://github.com/KiCad/Sockets_PGA.pretty +git clone https://github.com/KiCad/Sockets_WAGO734.pretty +git clone https://github.com/KiCad/SOIC_Packages.pretty +git clone https://github.com/KiCad/SSOP_Packages.pretty +git clone https://github.com/KiCad/Capacitors_Tantalum_SMD.pretty +git clone https://github.com/KiCad/Terminal_Blocks.pretty +git clone https://github.com/KiCad/Transformers_SMPS_ThroughHole.pretty +git clone https://github.com/KiCad/Transistors_SMD.pretty +git clone https://github.com/KiCad/Transistors_TO-220.pretty +git clone https://github.com/KiCad/Transistors_TO-247.pretty +git clone https://github.com/KiCad/Valves.pretty +git clone https://github.com/KiCad/Wire_Connections_Bridges.pretty +git clone https://github.com/KiCad/Wire_Pads.pretty +git clone https://github.com/KiCad/Pin_Headers.pretty +git clone https://github.com/KiCad/Socket_Strips.pretty diff --git a/scripts/library-repos-install.sh b/scripts/library-repos-install.sh index 11c642a28a..b34b570343 100755 --- a/scripts/library-repos-install.sh +++ b/scripts/library-repos-install.sh @@ -34,12 +34,15 @@ usage() echo "" echo "./library-sources-install.sh " echo " where is one of:" + echo " --install-prerequisites (install command tools needed here, run once first.)" echo " --install-or-update (from github, the library sources.)" echo " --remove-all-libraries (remove all *.pretty from $WORKING_TREES/library-repos/. )" - echo " --install-prerequisites (install command tools needed here, run once first.)" echo " --remove-orphaned-libraries (remove local libraries which have been deleted or renamed at github.)" + echo " --list-libraries (show the full list of github libraries.)" + echo " --create-bat-file (cat a windows batch file, redirect to capture to disk.)" echo "" - echo "example:" + echo "examples (with --install-prerequisites once first):" + echo ' $ ./library-sources-install.sh --install-prerequisites' echo ' $ ./library-sources-install.sh --install-or-update' } @@ -134,7 +137,7 @@ checkout_or_update_libraries() if [ ! -e "$WORKING_TREES/library-repos/$repo" ]; then - # Be _sure_ and preserve the directory name, we want extension .pretty not .pretty.git. + # Preserve the directory extension as ".pretty". # That way those repos can serve as pretty libraries directly if need be. echo "installing $WORKING_TREES/library-repos/$repo" @@ -217,5 +220,32 @@ if [ $# -eq 1 -a "$1" == "--install-prerequisites" ]; then exit fi +if [ $# -eq 1 -a "$1" == "--list-libraries" ]; then + + # use github API to get repos into PRETTY_REPOS var + detect_pretty_repos + + # add the "schematic parts & 3D model" kicad-library to total + for repo in kicad-library $PRETTY_REPOS; do + echo "$repo" + done + exit +fi + +# may re-direct this output to a disk file for Windows *.BAT file creation. +if [ $# -eq 1 -a "$1" == "--create-bat-file" ]; then + + # use github API to get repos into PRETTY_REPOS var + detect_pretty_repos + + echo "REM This file was created using /scripts/library-repos-install.sh on linux." + echo "REM Run it from a directory you desire as the base for all libraries." + + # add the "schematic parts & 3D model" kicad-library to total + for repo in kicad-library $PRETTY_REPOS; do + echo "git clone https://github.com/KiCad/$repo" + done + exit +fi usage From c5b65e1ec42fee9390315299616834e67153056f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 7 Apr 2014 14:30:38 +0200 Subject: [PATCH 276/741] Fixed outline breaking for zones (points were not always created in the double click point). --- pcbnew/tools/point_editor.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp index 1b6ed99e20..f7e5b374c2 100644 --- a/pcbnew/tools/point_editor.cpp +++ b/pcbnew/tools/point_editor.cpp @@ -338,6 +338,7 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) controls->ShowCursor( false ); controls->SetAutoPan( false ); controls->SetSnapping( false ); + controls->ForceCursorPosition( false ); } setTransitions(); @@ -672,9 +673,9 @@ void POINT_EDITOR::breakOutline( const VECTOR2I& aBreakPoint ) VECTOR2I( outline->GetPos( nextNearestIdx ) ) ); unsigned int nearestDist = side.Distance( aBreakPoint ); - for( int i = 0; i < outline->GetCornersCount() - 2; ++i ) + for( int i = 0; i < outline->GetCornersCount() - 1; ++i ) { - SEG side( VECTOR2I( outline->GetPos( i ) ), VECTOR2I( outline->GetPos( i + 1 ) ) ); + side = SEG( VECTOR2I( outline->GetPos( i ) ), VECTOR2I( outline->GetPos( i + 1 ) ) ); unsigned int distance = side.Distance( aBreakPoint ); if( distance < nearestDist ) From 89161331e4224736ea59013b1d66ca609efb46c2 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 7 Apr 2014 15:35:50 +0200 Subject: [PATCH 277/741] Fixed refreshing issues (DRC, new items after reloading netlist and probably many other places). --- common/view/view.cpp | 6 +++--- include/view/view_item.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common/view/view.cpp b/common/view/view.cpp index 08de942811..4bf71ec638 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -99,11 +99,11 @@ void VIEW::Add( VIEW_ITEM* aItem ) MarkTargetDirty( l.target ); } - if( aItem->viewRequiredUpdate() != VIEW_ITEM::NONE ) - MarkForUpdate( aItem ); - if( m_dynamic ) aItem->viewAssign( this ); + + if( aItem->viewRequiredUpdate() != VIEW_ITEM::NONE ) + MarkForUpdate( aItem ); } diff --git a/include/view/view_item.h b/include/view/view_item.h index a64b1b22db..6540ea3c82 100644 --- a/include/view/view_item.h +++ b/include/view/view_item.h @@ -174,7 +174,7 @@ public: ALL = 0xff }; - VIEW_ITEM() : m_view( NULL ), m_visible( true ), m_requiredUpdate( NONE ), + VIEW_ITEM() : m_view( NULL ), m_visible( true ), m_requiredUpdate( ALL ), m_groups( NULL ), m_groupsSize( 0 ) {} /** @@ -184,7 +184,7 @@ public: { ViewRelease(); delete[] m_groups; - }; + } /** * Function Type From 82661dc3a61e66103c26475b8db4109f0c2a2088 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 7 Apr 2014 16:04:54 +0200 Subject: [PATCH 278/741] GAL defaults to Cairo, so KiCad does not fail on completely OpenGL incapable systems. Board is cached in GAL only when the canvas is activated. --- pcbnew/basepcbframe.cpp | 2 +- pcbnew/pcbframe.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 12d783e143..0e4299eaef 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -157,7 +157,7 @@ PCB_BASE_FRAME::PCB_BASE_FRAME( KIWAY* aKiway, wxWindow* aParent, ID_DRAWFRAME_T SetGalCanvas( new EDA_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), m_FrameSize, - EDA_DRAW_PANEL_GAL::GAL_TYPE_OPENGL ) ); + EDA_DRAW_PANEL_GAL::GAL_TYPE_CAIRO ) ); // Hide by default, it has to be explicitly shown GetGalCanvas()->Hide(); diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index f602df3d53..302a9574c8 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -490,13 +490,13 @@ void PCB_EDIT_FRAME::SetBoard( BOARD* aBoard ) { PCB_BASE_FRAME::SetBoard( aBoard ); - if( GetGalCanvas() ) + if( IsGalCanvasActive() ) { ViewReloadBoard( aBoard ); // update the tool manager with the new board and its view. m_toolManager.SetEnvironment( aBoard, GetGalCanvas()->GetView(), - GetGalCanvas()->GetViewControls(), this ); + GetGalCanvas()->GetViewControls(), this ); m_toolManager.ResetTools( TOOL_BASE::MODEL_RELOAD ); } } From d053e5615bbeea57c218a05359e902eaab9749f6 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Mon, 7 Apr 2014 23:55:53 -0500 Subject: [PATCH 279/741] More migration towards single process, extend PROJECT::Config*() in proper direction, cleanups. --- CMakeLists.txt | 6 +- common/fp_lib_table.cpp | 14 +---- common/project.cpp | 5 +- common/single_top.cpp | 16 +++-- cvpcb/autosel.cpp | 2 +- cvpcb/cfg.cpp | 21 +++---- cvpcb/readwrite_dlgs.cpp | 25 +++++--- eeschema/eelibs_read_libraryfiles.cpp | 2 +- eeschema/eeschema_config.cpp | 8 +-- eeschema/eeschema_config.h | 3 - eeschema/schframe.cpp | 2 +- include/config_params.h | 11 ++++ include/search_stack.h | 15 ----- pcbnew/CMakeLists.txt | 90 +++++++++++++-------------- pcbnew/dialogs/dialog_netlist.cpp | 2 +- pcbnew/pcbnew.cpp | 5 +- pcbnew/pcbnew_config.cpp | 9 +-- pcbnew/pcbnew_config.h | 6 +- 18 files changed, 114 insertions(+), 128 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e719d5c601..5c061111f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -364,13 +364,13 @@ check_find_package_result( OPENGL_FOUND "OpenGL" ) # https://www.mail-archive.com/cmake@cmake.org/msg47501.html # Handle target used to specify if a target needs wx-widgets or other libraries -# Always defined, empty if no libraries are to be build +# Always defined, empty if no libraries are to be built add_custom_target( lib-dependencies ) if( KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC ) - # This should be build in all cases, if swig exec is not avaiable - # will be impossible also enable SCRIPTING being for PCBNEW required immediatly + # This should be built in all cases, if swig exec is not avaiable + # will be impossible also enable SCRIPTING being for PCBNEW required immediately include( download_pcre ) include( download_swig ) diff --git a/common/fp_lib_table.cpp b/common/fp_lib_table.cpp index 8c0d6f5a29..2605aa7125 100644 --- a/common/fp_lib_table.cpp +++ b/common/fp_lib_table.cpp @@ -622,8 +622,6 @@ const FP_LIB_TABLE::ROW* FP_LIB_TABLE::FindRow( const wxString& aNickname ) // wxGetenv( wchar_t* ) is not re-entrant on linux. // Put a lock on multithreaded use of wxGetenv( wchar_t* ), called from wxEpandEnvVars(), // needed by bool ReadFootprintFiles( FP_LIB_TABLE* aTable, const wxString* aNickname = NULL ); -#if 1 - #include const wxString FP_LIB_TABLE::ExpandSubstitutions( const wxString& aString ) @@ -637,16 +635,6 @@ const wxString FP_LIB_TABLE::ExpandSubstitutions( const wxString& aString ) return wxExpandEnvVars( aString ); } -#else - -const wxString FP_LIB_TABLE::ExpandSubstitutions( const wxString& aString ) -{ - // We reserve the right to do this another way, by providing our own member - // function. - return wxExpandEnvVars( aString ); -} - -#endif bool FP_LIB_TABLE::IsEmpty( bool aIncludeFallback ) { @@ -691,7 +679,7 @@ bool FP_LIB_TABLE::ConvertFromLegacy( SEARCH_STACK& aSStack, NETLIST& aNetList, { wxFileName fn( wxEmptyString, aLibNames[ii], LegacyFootprintLibPathExtension ); - libPath = aSStack.FindValidPath( fn ); + libPath = aSStack.FindValidPath( fn.GetFullPath() ); if( !libPath ) { diff --git a/common/project.cpp b/common/project.cpp index b69926e574..3e3c9cdf84 100644 --- a/common/project.cpp +++ b/common/project.cpp @@ -205,14 +205,17 @@ wxConfigBase* PROJECT::configCreate( const SEARCH_STACK& aSList, const wxString& // is there an edge transition, a change in m_project_filename? if( m_project_name != fn ) { + m_pcb_search.Clear(); m_sch_search.Clear(); SetProjectFullName( fn.GetFullPath() ); - // to the empty list, add project dir as first + // to the empty lists, add project dir as first + m_pcb_search.AddPaths( fn.GetPath() ); m_sch_search.AddPaths( fn.GetPath() ); // append all paths from aSList + add_search_paths( &m_pcb_search, aSList, -1 ); add_search_paths( &m_sch_search, aSList, -1 ); // addLibrarySearchPaths( SEARCH_STACK* aSP, wxConfigBase* aCfg ) diff --git a/common/single_top.cpp b/common/single_top.cpp index efb530e261..9aeb9c178f 100644 --- a/common/single_top.cpp +++ b/common/single_top.cpp @@ -182,10 +182,6 @@ static const wxString dso_full_path( const wxString& aAbsoluteArgv0 ) return fn.GetFullPath(); } -// Use of this is arbitrary, remember single_top only knows about a single DSO. -// Could have used one from the KIWAY also. -static wxDynamicLibrary dso; - // Only a single KIWAY is supported in this single_top top level component, // which is dedicated to loading only a single DSO. @@ -261,6 +257,15 @@ IMPLEMENT_APP( APP_SINGLE_TOP ); static KIFACE_GETTER_FUNC* get_kiface_getter( const wxString& aDSOName ) { #if defined(BUILD_KIWAY_DLL) + + // Remember single_top only knows about a single DSO. Using an automatic + // with a defeated destructor, see Detach() below, so that the DSO program + // image stays in RAM until process termination, and specifically + // beyond the point in time at which static destructors are run. Otherwise + // a static wxDynamicLibrary's destructor might create an out of sequence + // problem. This was never detected, so it's only a preventative strategy. + wxDynamicLibrary dso; + void* addr = NULL; if( !dso.Load( aDSOName, wxDL_VERBATIM | wxDL_NOW ) ) @@ -275,6 +280,9 @@ static KIFACE_GETTER_FUNC* get_kiface_getter( const wxString& aDSOName ) // No further reporting required here. } + // Tell dso's wxDynamicLibrary destructor not to Unload() the program image. + (void) dso.Detach(); + return (KIFACE_GETTER_FUNC*) addr; #else diff --git a/cvpcb/autosel.cpp b/cvpcb/autosel.cpp index 2b40fa4e40..9a96a02457 100644 --- a/cvpcb/autosel.cpp +++ b/cvpcb/autosel.cpp @@ -107,7 +107,7 @@ void CVPCB_MAINFRAME::AssocieModule( wxCommandEvent& event ) { fn.SetExt( fn.GetExt() + wxT( "." ) + FootprintAliasFileExtension ); } - tmp = search.FindValidPath( fn ); + tmp = search.FindValidPath( fn.GetFullPath() ); if( !tmp ) { diff --git a/cvpcb/cfg.cpp b/cvpcb/cfg.cpp index c7b5986362..55d2091048 100644 --- a/cvpcb/cfg.cpp +++ b/cvpcb/cfg.cpp @@ -27,7 +27,7 @@ */ #include -#include +#include #include #include #include @@ -42,29 +42,24 @@ #include -#define GROUP wxT("/cvpcb") -#define GROUPLIB wxT("/pcbnew/libraries") -#define GROUPEQU wxT("/cvpcb/libraries") - - PARAM_CFG_ARRAY& CVPCB_MAINFRAME::GetProjectFileParameters() { if( !m_projectFileParams.empty() ) return m_projectFileParams; - m_projectFileParams.push_back( new PARAM_CFG_BASE( GROUPLIB, PARAM_COMMAND_ERASE ) ); + m_projectFileParams.push_back( new PARAM_CFG_BASE( GROUP_PCB_LIBS, PARAM_COMMAND_ERASE ) ); m_projectFileParams.push_back( new PARAM_CFG_LIBNAME_LIST( - wxT( "LibName" ), &m_ModuleLibNames, GROUPLIB ) ); + wxT( "LibName" ), &m_ModuleLibNames, GROUP_PCB_LIBS ) ); m_projectFileParams.push_back( new PARAM_CFG_LIBNAME_LIST( - wxT( "EquName" ), &m_AliasLibNames, GROUPEQU ) ); + wxT( "EquName" ), &m_AliasLibNames, GROUP_CVP_EQU ) ); m_projectFileParams.push_back( new PARAM_CFG_WXSTRING( wxT( "NetIExt" ), &m_NetlistFileExtension ) ); m_projectFileParams.push_back( new PARAM_CFG_FILENAME( - wxT( "LibDir" ), &m_UserLibraryPath, GROUPLIB ) ); + wxT( "LibDir" ), &m_UserLibraryPath, GROUP_PCB_LIBS ) ); return m_projectFileParams; } @@ -81,7 +76,7 @@ void CVPCB_MAINFRAME::LoadProjectFile( const wxString& aFileName ) fn.SetExt( ProjectFileExtension ); // was: Pgm().ReadProjectConfig( fn.GetFullPath(), GROUP, GetProjectFileParameters(), false ); - prj.ConfigLoad( prj.PcbSearchS(), fn.GetFullPath(), GROUP, GetProjectFileParameters(), false ); + prj.ConfigLoad( Kiface().KifaceSearch(), fn.GetFullPath(), GROUP_CVP, GetProjectFileParameters(), false ); if( m_NetlistFileExtension.IsEmpty() ) m_NetlistFileExtension = wxT( "net" ); @@ -133,7 +128,7 @@ void CVPCB_MAINFRAME::SaveProjectFile( wxCommandEvent& aEvent ) // Pgm().WriteProjectConfig( fn.GetFullPath(), GROUP, GetProjectFileParameters() ); PROJECT& prj = Prj(); - SEARCH_STACK& search = prj.SchSearchS(); - prj.ConfigSave( search, fn.GetFullPath(), GROUP, GetProjectFileParameters() ); + prj.ConfigSave( Kiface().KifaceSearch(), fn.GetFullPath(), GROUP_CVP, GetProjectFileParameters() ); } + diff --git a/cvpcb/readwrite_dlgs.cpp b/cvpcb/readwrite_dlgs.cpp index 6c07864ae0..70ae6ece2f 100644 --- a/cvpcb/readwrite_dlgs.cpp +++ b/cvpcb/readwrite_dlgs.cpp @@ -138,27 +138,36 @@ void CVPCB_MAINFRAME::SetNewPkg( const wxString& aFootprintName ) static bool missingLegacyLibs( FP_LIB_TABLE* aTbl, SEARCH_STACK& aSStack, const wxArrayString& aLibNames, wxString* aErrorMsg ) { - bool retv = false; + bool missing = false; for( unsigned i = 0; i < aLibNames.GetCount(); i++ ) { wxFileName fn( wxEmptyString, aLibNames[i], LegacyFootprintLibPathExtension ); - wxString legacyLibPath = aSStack.FindValidPath( fn ); + wxString legacyLibPath = aSStack.FindValidPath( fn.GetFullPath() ); + /* if( legacyLibPath.IsEmpty() ) continue; + */ - if( aTbl->FindRowByURI( legacyLibPath ) == 0 ) + if( !aTbl->FindRowByURI( legacyLibPath ) ) { - retv = true; + missing = true; if( aErrorMsg ) - *aErrorMsg += wxT( "\"" ) + legacyLibPath + wxT( "\"\n" ); + { + *aErrorMsg += wxChar( '"' ); + + if( !legacyLibPath ) + *aErrorMsg += !legacyLibPath ? aLibNames[i] : legacyLibPath; + + *aErrorMsg += wxT( "\"\n" ); + } } } - return retv; + return missing; } @@ -210,7 +219,7 @@ bool CVPCB_MAINFRAME::ReadNetListAndLinkFiles() if( missingLegacyLibs( FootprintLibs(), Prj().PcbSearchS(), m_ModuleLibNames, &missingLibs ) ) { msg = wxT( "The following legacy libraries are defined in the project file " - "were not found in the footprint library table:\n\n" ) + missingLibs; + "but were not found in the footprint library table:\n\n" ) + missingLibs; msg += wxT( "\nDo you want to update the footprint library table before " "attempting to update the assigned footprints?" ); @@ -237,7 +246,7 @@ bool CVPCB_MAINFRAME::ReadNetListAndLinkFiles() { HTML_MESSAGE_BOX dlg( this, wxEmptyString ); - dlg.MessageSet( wxT( "The following errors occurred attempt to convert the " + dlg.MessageSet( wxT( "The following errors occurred attempting to convert the " "footprint assignments:\n\n" ) ); dlg.ListSet( msg ); dlg.MessageSet( wxT( "\nYou will need to reassign them manually if you want them " diff --git a/eeschema/eelibs_read_libraryfiles.cpp b/eeschema/eelibs_read_libraryfiles.cpp index 8eaaafd8de..56b4e733eb 100644 --- a/eeschema/eelibs_read_libraryfiles.cpp +++ b/eeschema/eelibs_read_libraryfiles.cpp @@ -62,7 +62,7 @@ void SCH_EDIT_FRAME::LoadLibraries() if( !fn.FileExists() ) { - tmp = lib_search.FindValidPath( fn ); + tmp = lib_search.FindValidPath( fn.GetFullPath() ); if( !tmp ) { diff --git a/eeschema/eeschema_config.cpp b/eeschema/eeschema_config.cpp index e335d9d4b6..5623b3cadb 100644 --- a/eeschema/eeschema_config.cpp +++ b/eeschema/eeschema_config.cpp @@ -370,7 +370,7 @@ PARAM_CFG_ARRAY& SCH_EDIT_FRAME::GetProjectFileParametersList() &m_userLibraryPath ) ); m_projectFileParams.push_back( new PARAM_CFG_LIBNAME_LIST( wxT( "LibName" ), &m_componentLibFiles, - GROUPLIB ) ); + GROUP_SCH_LIBS ) ); m_projectFileParams.push_back( new PARAM_CFG_WXSTRING( wxT( "NetFmtName" ), &m_netListFormat) ); @@ -410,7 +410,7 @@ bool SCH_EDIT_FRAME::LoadProjectFile( const wxString& aFileName, bool aForceRere // extension (.pro). fn.SetExt( ProjectFileExtension ); - if( !prj.ConfigLoad( Kiface().KifaceSearch(), fn.GetFullPath(), GROUP, + if( !prj.ConfigLoad( Kiface().KifaceSearch(), fn.GetFullPath(), GROUP_SCH, GetProjectFileParametersList(), !aForceReread ) ) { m_componentLibFiles = liblist_tmp; @@ -429,7 +429,7 @@ bool SCH_EDIT_FRAME::LoadProjectFile( const wxString& aFileName, bool aForceRere pglayout.SetPageLayout(BASE_SCREEN::m_PageLayoutDescrFileName); // libraries in the *.pro file take precedence over standard library search paths, - // but not over the director of the project, which is at index 0. + // but not over the directory of the project, which is at index 0. prj.SchSearchS().AddPaths( m_userLibraryPath, 1 ); // If the list is empty, force loading the standard power symbol library. @@ -466,7 +466,7 @@ void SCH_EDIT_FRAME::SaveProjectSettings( bool aAskForSave ) } prj.ConfigSave( Kiface().KifaceSearch(), - fn.GetFullPath(), GROUP, GetProjectFileParametersList() ); + fn.GetFullPath(), GROUP_SCH, GetProjectFileParametersList() ); } diff --git a/eeschema/eeschema_config.h b/eeschema/eeschema_config.h index 8bdfa54ec6..e771964aaa 100644 --- a/eeschema/eeschema_config.h +++ b/eeschema/eeschema_config.h @@ -4,9 +4,6 @@ #include -#define GROUP wxT( "/eeschema" ) -#define GROUPCOMMON wxT( "/common" ) -#define GROUPLIB wxT( "libraries" ) /* saving parameters option : */ #define INSETUP true /* used when the parameter is saved in general config diff --git a/eeschema/schframe.cpp b/eeschema/schframe.cpp index fa7cb5c5df..a2fba0988d 100644 --- a/eeschema/schframe.cpp +++ b/eeschema/schframe.cpp @@ -868,7 +868,7 @@ void SCH_EDIT_FRAME::OnPrint( wxCommandEvent& event ) // was: wxGetApp().WriteProjectConfig( fn.GetFullPath(), GROUP, GetProjectFileParametersList() ); Prj().ConfigSave( Kiface().KifaceSearch(), - fn.GetFullPath(), GROUP, GetProjectFileParametersList() ); + fn.GetFullPath(), GROUP_SCH, GetProjectFileParametersList() ); } } diff --git a/include/config_params.h b/include/config_params.h index a8002e0a9e..e83899af85 100644 --- a/include/config_params.h +++ b/include/config_params.h @@ -37,6 +37,17 @@ #include +#define GROUP_PCB wxT( "/pcbnew" ) +#define GROUP_SCH wxT( "/eeschema" ) +#define GROUP_PCB_LIBS wxT( "/pcbnew/libraries" ) +#define GROUP_SCH_LIBS wxT( "/eeschema/libraries" ) +#define GROUP_COMMON wxT( "/common" ) + +#define GROUP_CVP wxT("/cvpcb") +//#define GROUP_CVP_LIBS wxT("/pcbnew/libraries") +#define GROUP_CVP_EQU wxT("/cvpcb/libraries") + + #define CONFIG_VERSION 1 #define FORCE_LOCAL_CONFIG true diff --git a/include/search_stack.h b/include/search_stack.h index 29cf8af7b5..c3dd9a1b9a 100644 --- a/include/search_stack.h +++ b/include/search_stack.h @@ -39,21 +39,6 @@ public: return wxPathList::FindValidPath( aFileName ); } - /** - * Function FindValidPath - * KiCad saves user defined library files that are not in the standard - * library search path list with the full file path. Calling the library - * search path list with a user library file will fail. This helper method - * solves that problem. - * @param fileName - * @return a wxEmptyString if library file is not found. - */ - wxString FindValidPath( const wxFileName& aFileName ) const - { - // call wxPathList::FindValidPath( const wxString& ); - return wxPathList::FindValidPath( aFileName.GetFullPath() ); - } - /** * Function AddPaths * insert or append path(s) diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index d16eb9f04f..90365cfb33 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -341,13 +341,10 @@ if( KICAD_SCRIPTING ) COMMAND ${SWIG_EXECUTABLE} ${SWIG_OPTS} -o ${CMAKE_CURRENT_BINARY_DIR}/pcbnew_wrap.cxx scripting/pcbnew.i COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/scripting/build_tools/fix_swig_imports.py ${CMAKE_CURRENT_BINARY_DIR}/pcbnew.py WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - ) + ) endif() -### -# _pcbnew DLL/DSO file creation -### if( BUILD_GITHUB_PLUGIN ) set( GITHUB_PLUGIN_LIBRARIES github_plugin ) @@ -396,7 +393,8 @@ if( KICAD_SCRIPTING_MODULES ) if( MAKE_LINK_MAPS ) set_target_properties( _pcbnew PROPERTIES - LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=pcbnew.so.map" ) + LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=pcbnew.so.map" + ) endif() endif() @@ -417,14 +415,13 @@ if( DOXYGEN_FOUND ) WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} DEPENDS Doxyfile_xml COMMENT "building doxygen docs into directory doxygen-python/html" - ) + ) # create .i files from XML doxygen parsing, docstrings.i will include all of them add_custom_target( xml-to-docstrings COMMAND ${CMAKE_COMMAND} -E remove_directory docstrings COMMAND ${CMAKE_COMMAND} -E make_directory docstrings COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/scripting/build_tools/extract_docstrings.py pcbnew.py doxygen-xml/xml docstrings - COMMAND ${CMAKE_COMMAND} -E remove pcbnew.py # force removal so it will be recreated later with the new docstrings COMMENT "building docstring files" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} @@ -440,16 +437,14 @@ if( DOXYGEN_FOUND ) DEPENDS Doxyfile_python DEPENDS xml-to-docstrings DEPENDS pcbnew.py - COMMENT "building doxygen docs into directory doxygen-python/html" - ) + ) endif() else() message( STATUS "WARNING: Doxygen not found - doxygen-docs (Source Docs) target not created" ) endif() - if( MINGW ) # PCBNEW_RESOURCES variable is set by the macro. mingw_resource_compiler( pcbnew ) @@ -480,9 +475,8 @@ add_custom_command( from ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_freeroute_exchange_help.html" ) -set_source_files_properties( dialogs/dialog_freeroute_exchange.cpp - PROPERTIES - OBJECT_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_freeroute_exchange_help_html.h +set_source_files_properties( dialogs/dialog_freeroute_exchange.cpp PROPERTIES + OBJECT_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_freeroute_exchange_help_html.h ) @@ -506,14 +500,14 @@ endif() if( USE_KIWAY_DLLS ) +#if( false ) # a very small program launcher for pcbnew_kiface add_executable( pcbnew WIN32 MACOSX_BUNDLE ../common/single_top.cpp - ../common/pgm_base.cpp ${PCBNEW_RESOURCES} ) - set_source_files_properties( ../common/single_top.cpp PROPERTIES + set_source_files_properties( ../common/single_top.cpp pcbnew.cpp PROPERTIES COMPILE_DEFINITIONS "TOP_FRAME=PCB_FRAME_TYPE;PGM_DATA_FILE_EXT=\"kicad_pcb\";BUILD_KIWAY_DLL" ) target_link_libraries( pcbnew @@ -534,9 +528,7 @@ if( USE_KIWAY_DLLS ) ${PCBNEW_SRCS} ${PCBNEW_COMMON_SRCS} ${PCBNEW_SCRIPTING_SRCS} -# ${PCBNEW_RESOURCES} ) - set_target_properties( pcbnew_kiface PROPERTIES # Decorate OUTPUT_NAME with PREFIX and SUFFIX, creating something like # _pcbnew.so, _pcbnew.dll, or _pcbnew.kiface @@ -547,7 +539,7 @@ if( USE_KIWAY_DLLS ) if( ${OPENMP_FOUND} ) set_target_properties( pcbnew_kiface PROPERTIES COMPILE_FLAGS ${OpenMP_CXX_FLAGS} - ) + ) endif() target_link_libraries( pcbnew_kiface @@ -578,7 +570,11 @@ if( USE_KIWAY_DLLS ) ) if( MAKE_LINK_MAPS ) set_target_properties( pcbnew_kiface PROPERTIES - LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=_pcbnew.kiface.map" ) + LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=_pcbnew.kiface.map" + ) + set_target_properties( pcbnew PROPERTIES + LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=pcbnew.map" + ) endif() # if building pcbnew, then also build pcbnew_kiface if out of date. @@ -600,18 +596,22 @@ if( USE_KIWAY_DLLS ) COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/pcbnew/_pcbnew.kiface "${CMAKE_BINARY_DIR}/pcbnew/pcbnew.app/Contents/MacOS/" DEPENDS pcbnew_kiface COMMENT "Copying kiface into pcbnew" - ) + ) endif() else() # milestone A) kills this off: add_executable( pcbnew WIN32 MACOSX_BUNDLE + ../common/single_top.cpp pcbnew.cpp ${PCBNEW_SRCS} ${PCBNEW_COMMON_SRCS} ${PCBNEW_SCRIPTING_SRCS} ${PCBNEW_RESOURCES} ) + set_source_files_properties( ../common/single_top.cpp PROPERTIES + COMPILE_DEFINITIONS "TOP_FRAME=PCB_FRAME_TYPE;PGM_DATA_FILE_EXT=\"kicad_pcb\"" + ) target_link_libraries( pcbnew 3d-viewer pcbcommon @@ -646,28 +646,25 @@ else() # milestone A) kills this off: ) endif() + if( MAKE_LINK_MAPS ) + # generate a link map with cross reference + set_target_properties( pcbnew PROPERTIES + LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=pcbnew.map" + ) + endif() + install( TARGETS pcbnew DESTINATION ${KICAD_BIN} COMPONENT binary ) - endif() add_dependencies( pcbnew lib-dependencies ) -### -# 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() - - -if( MAKE_LINK_MAPS ) - # generate a link map with cross reference - set_target_properties( pcbnew PROPERTIES - LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=pcbnew.map" ) + MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist + ) endif() @@ -686,19 +683,19 @@ if( KICAD_SCRIPTING ) COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/pcbnew/pcbnew.py "${PYTHON_DEST}/wx-3.0-osx_cocoa/" DEPENDS FixSwigImportsScripting COMMENT "Copying pcbnew.py into PYTHON_DEST/wx-3.0-osx_cocoa/" - ) + ) add_custom_target( pcbnew_copy_wxpython_scripting ALL COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBWXPYTHON_ROOT}/wxPython/ ${CMAKE_SOURCE_DIR}/pcbnew/pcbnew.app/Contents/Frameworks/wxPython/ DEPENDS FixSwigImportsScripting _pcbnew_py_copy COMMENT "Copying wxPython into pcbnew.app Framework" - ) + ) add_custom_target( pcbnew_copy_plugins ALL COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_SOURCE_DIR}/pcbnew/scripting/plugins ${PROJECT_SOURCE_DIR}/pcbnew/pcbnew.app/Contents/PlugIns/scripting/plugins DEPENDS pcbnew_copy_wxpython_scripting COMMENT "Copying plugins into bundle" - ) + ) # fix bundle after copying wxpython, fixing and copying add_dependencies( osx_fix_bundles pcbnew_copy_wxpython_scripting ) @@ -733,13 +730,13 @@ if( KICAD_SCRIPTING_MODULES ) COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/pcbnew/_pcbnew.so "${PYTHON_DEST}" DEPENDS _pcbnew FixSwigImportsModuleScripting COMMENT "Copying _pcbnew.so into PYTHON_DEST" - ) + ) add_custom_target( pcbnew_copy_wxpython_module ALL COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBWXPYTHON_ROOT}/wxPython/ ${PROJECT_SOURCE_DIR}/pcbnew/pcbnew.app/Contents/Frameworks/wxPython/ DEPENDS FixSwigImportsModuleScripting _pcbnew_so_copy COMMENT "Copying wxPython into pcbnew.app Frameworks" - ) + ) if( KICAD_BUILD_DYNAMIC ) # Tell that we have to run osx_fix_bundles fix after building _pcbnew and migrating wxPython @@ -750,14 +747,15 @@ if( KICAD_SCRIPTING_MODULES ) endif() -# 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} ) +if( false ) # haven't been used in years. + # 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} ) -# This one gets made only when testing. -add_executable( layer_widget_test WIN32 EXCLUDE_FROM_ALL - layer_widget.cpp - ) -target_link_libraries( layer_widget_test common ${wxWidgets_LIBRARIES} ) - + # This one gets made only when testing. + add_executable( layer_widget_test WIN32 EXCLUDE_FROM_ALL + layer_widget.cpp + ) + target_link_libraries( layer_widget_test common ${wxWidgets_LIBRARIES} ) +endif() diff --git a/pcbnew/dialogs/dialog_netlist.cpp b/pcbnew/dialogs/dialog_netlist.cpp index e7cb66c29e..2d4f572f12 100644 --- a/pcbnew/dialogs/dialog_netlist.cpp +++ b/pcbnew/dialogs/dialog_netlist.cpp @@ -91,7 +91,7 @@ void PCB_EDIT_FRAME::InstallNetlistFrame( wxDC* DC ) // was: wxGetApp().WriteProjectConfig( fn.GetFullPath(), GROUP, GetProjectFileParameters() ); Prj().ConfigSave( Kiface().KifaceSearch(), fn.GetFullPath(), - GROUP, GetProjectFileParameters() ); + GROUP_PCB, GetProjectFileParameters() ); } } diff --git a/pcbnew/pcbnew.cpp b/pcbnew/pcbnew.cpp index a8eac6b21a..c9a4129e1b 100644 --- a/pcbnew/pcbnew.cpp +++ b/pcbnew/pcbnew.cpp @@ -208,13 +208,13 @@ MY_API( KIFACE* ) KIFACE_GETTER( int* aKIFACEversion, int aKiwayVersion, PGM_BA return &kiface; } - +#if defined(BUILD_KIWAY_DLL) PGM_BASE& Pgm() { wxASSERT( process ); // KIFACE_GETTER has already been called. return *process; } - +#endif /** * Function set3DShapesPath @@ -484,6 +484,5 @@ void IFACE::OnKifaceEnd() // This should only be called if python was setup correctly. pcbnewFinishPythonScripting(); - #endif } diff --git a/pcbnew/pcbnew_config.cpp b/pcbnew/pcbnew_config.cpp index 0a8934f528..a9870c279d 100644 --- a/pcbnew/pcbnew_config.cpp +++ b/pcbnew/pcbnew_config.cpp @@ -29,7 +29,6 @@ */ #include -//#include #include #include #include @@ -239,7 +238,7 @@ bool PCB_EDIT_FRAME::LoadProjectSettings( const wxString& aProjectFileName ) fn.SetExt( ProjectFileExtension ); // was: wxGetApp().ReadProjectConfig( fn.GetFullPath(), GROUP, GetProjectFileParameters(), false ); - Prj().ConfigLoad( Kiface().KifaceSearch(), fn.GetFullPath(), GROUP, GetProjectFileParameters(), false ); + Prj().ConfigLoad( Kiface().KifaceSearch(), fn.GetFullPath(), GROUP_PCB, GetProjectFileParameters(), false ); // Dick 5-Feb-2012: I don't agree with this, the BOARD contents should dictate // what is visible or not, even initially. And since PCB_EDIT_FRAME projects settings @@ -302,9 +301,7 @@ void PCB_EDIT_FRAME::SaveProjectSettings( bool aAskForSave ) fn = dlg.GetPath(); } - SEARCH_STACK& search = Kiface().KifaceSearch(); - - Prj().ConfigSave( search, fn.GetFullPath(), GROUP, GetProjectFileParameters() ); + Prj().ConfigSave( Kiface().KifaceSearch(), fn.GetFullPath(), GROUP_PCB, GetProjectFileParameters() ); } @@ -315,7 +312,7 @@ PARAM_CFG_ARRAY PCB_EDIT_FRAME::GetProjectFileParameters() pca.push_back( new PARAM_CFG_FILENAME( wxT( "PageLayoutDescrFile" ), &BASE_SCREEN::m_PageLayoutDescrFileName ) ); - pca.push_back( new PARAM_CFG_FILENAME( wxT( "LibDir" ), &g_UserLibDirBuffer, GROUPLIB ) ); + pca.push_back( new PARAM_CFG_FILENAME( wxT( "LibDir" ), &g_UserLibDirBuffer, GROUP_PCB_LIBS ) ); pca.push_back( new PARAM_CFG_FILENAME( wxT( "LastNetListRead" ), &m_lastNetListRead ) ); diff --git a/pcbnew/pcbnew_config.h b/pcbnew/pcbnew_config.h index a0b0006bbd..f4c153e6cd 100644 --- a/pcbnew/pcbnew_config.h +++ b/pcbnew/pcbnew_config.h @@ -1,6 +1,6 @@ /** * @file pcbnew_config.h - * @brief Cconfiguration parameters for Pcbnew. + * @brief Configuration parameters for Pcbnew. */ #ifndef _PCBNEW_CONFIG_H_ @@ -9,10 +9,6 @@ #include #include -#define GROUP wxT( "/pcbnew" ) -#define GROUPLIB wxT( "/pcbnew/libraries" ) -#define GROUPCOMMON wxT( "/common" ) - /* Useful macro : */ #define LOC_COLOR(layer) &g_ColorsSettings.m_LayersColors[layer] #define ITEM_COLOR(item_visible) &g_ColorsSettings.m_ItemsColors[item_visible] From 4011953455277bc16058ebcc7a9065d409be482d Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Wed, 9 Apr 2014 08:33:04 -0500 Subject: [PATCH 280/741] Jettison FP_LIB_TABLE::ConvertFromLegacy() into a static function, where it was used locally. Then comment it out in favor of a newer strategy for filling in nicknames in cvpcb. Add MODULE* FootprintLoadWithOptionalNickname( const FPID& aFootprintId ) throw( IO_ERROR, PARSE_ERROR ); from code found elsewhere. --- common/fp_lib_table.cpp | 182 +- common/page_layout/page_layout_reader.cpp | 6 +- cvpcb/class_DisplayFootprintsFrame.cpp | 2 +- cvpcb/cvframe.cpp | 2 +- cvpcb/readwrite_dlgs.cpp | 347 ++- eeschema/class_libentry.cpp | 2 +- eeschema/class_library.cpp | 4 +- eeschema/dialogs/dialog_bom.cpp | 2 +- eeschema/eeschema_config.cpp | 2 +- eeschema/netform.cpp | 2 +- eeschema/symbedit.cpp | 4 +- include/fp_lib_table.h | 29 +- include/fpid.h | 1 - include/ptree.h | 2 +- new/sch_dir_lib_source.cpp | 2 +- new/test_sch_lib_table.cpp | 2 +- pagelayout_editor/page_layout_writer.cpp | 4 +- pcb_calculator/datafile_read_write.cpp | 13 +- pcbnew/dialogs/dialog_netlist.cpp | 2 +- pcbnew/exporters/export_idf.cpp | 2 +- pcbnew/exporters/gen_modules_placefile.cpp | 2 +- pcbnew/files.cpp | 4 +- pcbnew/github/github_plugin.cpp | 2 +- pcbnew/io_mgr.h | 2 +- pcbnew/ioascii.cpp.notused | 1260 ----------- pcbnew/item_io.cpp.notused | 2266 -------------------- pcbnew/librairi.cpp | 20 +- pcbnew/loadcmp.cpp | 34 +- pcbnew/moduleframe.cpp | 4 +- pcbnew/netlist.cpp | 2 +- pcbnew/specctra_export.cpp | 4 +- pcbnew/specctra_import.cpp | 13 +- pcbnew/specctra_test.cpp | 2 +- tools/property_tree.cpp | 2 +- 34 files changed, 452 insertions(+), 3777 deletions(-) delete mode 100644 pcbnew/ioascii.cpp.notused delete mode 100644 pcbnew/item_io.cpp.notused diff --git a/common/fp_lib_table.cpp b/common/fp_lib_table.cpp index 2605aa7125..f69ccd2ea5 100644 --- a/common/fp_lib_table.cpp +++ b/common/fp_lib_table.cpp @@ -638,164 +638,41 @@ const wxString FP_LIB_TABLE::ExpandSubstitutions( const wxString& aString ) bool FP_LIB_TABLE::IsEmpty( bool aIncludeFallback ) { - if( !aIncludeFallback || (fallBack == NULL) ) + if( !aIncludeFallback || !fallBack ) return rows.empty(); - return fallBack->IsEmpty() && rows.empty(); + return rows.empty() && fallBack->IsEmpty( true ); } -bool FP_LIB_TABLE::ConvertFromLegacy( SEARCH_STACK& aSStack, NETLIST& aNetList, - const wxArrayString& aLibNames, REPORTER* aReporter ) throw( IO_ERROR ) +MODULE* FP_LIB_TABLE::FootprintLoadWithOptionalNickname( const FPID& aFootprintId ) + throw( IO_ERROR, PARSE_ERROR ) { - wxString msg; - FPID lastFPID; - COMPONENT* component; - MODULE* module = 0; - bool retv = true; + wxString nickname = aFootprintId.GetLibNickname(); + wxString fpname = aFootprintId.GetFootprintName(); - if( aNetList.IsEmpty() ) - return true; - - aNetList.SortByFPID(); - - wxString libPath; - - PLUGIN::RELEASER pi( IO_MGR::PluginFind( IO_MGR::LEGACY ) ); - - for( unsigned ii = 0; ii < aNetList.GetCount(); ii++ ) + if( nickname.size() ) { - component = aNetList.GetComponent( ii ); - - // The footprint hasn't been assigned yet so ignore it. - if( component->GetFPID().empty() ) - continue; - - if( component->GetFPID() != lastFPID ) - { - module = NULL; - - for( unsigned ii = 0; ii < aLibNames.GetCount(); ii++ ) - { - wxFileName fn( wxEmptyString, aLibNames[ii], LegacyFootprintLibPathExtension ); - - libPath = aSStack.FindValidPath( fn.GetFullPath() ); - - if( !libPath ) - { - if( aReporter ) - { - msg.Printf( _( "Cannot find footprint library file '%s' in any of the " - "KiCad legacy library search paths.\n" ), - GetChars( fn.GetFullPath() ) ); - aReporter->Report( msg ); - } - - retv = false; - continue; - } - - module = pi->FootprintLoad( libPath, component->GetFPID().GetFootprintName() ); - - if( module ) - { - lastFPID = component->GetFPID(); - break; - } - } - } - - if( !module ) - { - if( aReporter ) - { - msg.Printf( _( "Component `%s` footprint '%s' was not found in any legacy " - "library.\n" ), - GetChars( component->GetReference() ), - GetChars( component->GetFPID().Format() ) ); - aReporter->Report( msg ); - } - - // Clear the footprint assignment since the old library lookup method is no - // longer valid. - FPID emptyFPID; - - component->SetFPID( emptyFPID ); - retv = false; - continue; - } - else - { - wxString libNickname; - - FP_LIB_TABLE* cur = this; - - do - { - cur->ensureIndex(); - - for( unsigned i = 0; i < cur->rows.size(); i++ ) - { - wxString uri = cur->rows[i].GetFullURI( true ); - - if( wxFileName::GetPathSeparator() == wxChar( '\\' ) - && uri.Find( wxChar( '/' ) ) >= 0 ) - { - uri.Replace( wxT( "/"), wxT( "\\" ) ); - } -#ifdef __WINDOWS__ - if( uri.CmpNoCase( libPath ) ) -#else - if( uri == libPath ) -#endif - { - libNickname = cur->rows[i].GetNickName(); - break; - } - } - - } while( ( cur = cur->fallBack ) != 0 && libNickname.IsEmpty() ); - - if( libNickname.IsEmpty() ) - { - if( aReporter ) - { - msg.Printf( _( "Component '%s' footprint '%s' legacy library path '%s' " - "was not found in the footprint library table.\n" ), - GetChars( component->GetReference() ), - GetChars( component->GetFPID().Format() ) ); - aReporter->Report( msg ); - } - - retv = false; - } - else - { - FPID newFPID = lastFPID; - newFPID.SetLibNickname( libNickname ); - - if( !newFPID.IsValid() ) - { - if( aReporter ) - { - msg.Printf( _( "Component '%s' FPID '%s' is not valid.\n" ), - GetChars( component->GetReference() ), - GetChars( newFPID.Format() ) ); - aReporter->Report( msg ); - } - - retv = false; - } - else - { - // The footprint name should already be set. - component->SetFPID( newFPID ); - } - } - } + return FootprintLoad( nickname, fpname ); } - return retv; + // nickname is empty, sequentially search (alphabetically) all libs/nicks for first match: + else + { + std::vector nicks = GetLogicalLibs(); + + // Search each library going through libraries alphabetically. + for( unsigned i = 0; iFootprintLoad( FROM_UTF8( nickname.c_str() ), FROM_UTF8( fpname.c_str() ) ); } - catch( IO_ERROR ioe ) + catch( const IO_ERROR& ioe ) { DisplayError( this, ioe.errorText ); return NULL; diff --git a/cvpcb/cvframe.cpp b/cvpcb/cvframe.cpp index 256e12c641..6fc1292bc3 100644 --- a/cvpcb/cvframe.cpp +++ b/cvpcb/cvframe.cpp @@ -846,7 +846,7 @@ int CVPCB_MAINFRAME::ReadSchematicNetlist() else wxMessageBox( _( "Unknown netlist format." ), wxEmptyString, wxOK | wxICON_ERROR ); } - catch( IO_ERROR& ioe ) + catch( const IO_ERROR& ioe ) { msg = wxString::Format( _( "Error loading netlist.\n%s" ), ioe.errorText.GetData() ); wxMessageBox( msg, _( "Netlist Load Error" ), wxOK | wxICON_ERROR ); diff --git a/cvpcb/readwrite_dlgs.cpp b/cvpcb/readwrite_dlgs.cpp index 70ae6ece2f..afdb4dc398 100644 --- a/cvpcb/readwrite_dlgs.cpp +++ b/cvpcb/readwrite_dlgs.cpp @@ -171,6 +171,164 @@ static bool missingLegacyLibs( FP_LIB_TABLE* aTbl, SEARCH_STACK& aSStack, } +#if 0 + + /* + + This code block was based on two major assumptions that are no longer true: + 1) Footprint library basenames would remain the same. + (But no, basenames have been renamed in the github repo.) + 2) *.mod files would still be around and merely reside in the FP_LIB_TABLE. + (But no, they have been converted to *.pretty.) + + There is a newer replacement code block in the #else region. + + */ + + +/** + * Function convertFromLegacy + * converts the footprint names in \a aNetList from the legacy format to the #FPID format. + * + * @param aNetList is the #NETLIST object to convert. + * @param aLibNames is the list of legacy footprint library names from the currently loaded + * project. + * @param aReporter is the #REPORTER object to dump messages into. + * @return true if all footprint names were successfully converted to a valid FPID. + */ +static bool convertFromLegacy( FP_LIB_TABLE* aTbl, SEARCH_STACK& aSStack, NETLIST& aNetList, + const wxArrayString& aLibNames, REPORTER* aReporter = NULL ) throw( IO_ERROR ) +{ + wxString msg; + FPID lastFPID; + COMPONENT* component; + MODULE* module = 0; + bool retv = true; + + if( aNetList.IsEmpty() ) + return true; + + aNetList.SortByFPID(); + + wxString libPath; + + PLUGIN::RELEASER pi( IO_MGR::PluginFind( IO_MGR::LEGACY ) ); + + for( unsigned ii = 0; ii < aNetList.GetCount(); ii++ ) + { + component = aNetList.GetComponent( ii ); + + // The footprint hasn't been assigned yet so ignore it. + if( component->GetFPID().empty() ) + continue; + + if( component->GetFPID() != lastFPID ) + { + module = NULL; + + for( unsigned ii = 0; ii < aLibNames.GetCount(); ii++ ) + { + wxFileName fn( wxEmptyString, aLibNames[ii], LegacyFootprintLibPathExtension ); + + libPath = aSStack.FindValidPath( fn.GetFullPath() ); + + if( !libPath ) + { + if( aReporter ) + { + msg.Printf( _( "Cannot find footprint library file '%s' in any of the " + "KiCad legacy library search paths.\n" ), + GetChars( fn.GetFullPath() ) ); + aReporter->Report( msg ); + } + + retv = false; + continue; + } + + module = pi->FootprintLoad( libPath, component->GetFPID().GetFootprintName() ); + + if( module ) + { + lastFPID = component->GetFPID(); + break; + } + } + } + + if( !module ) + { + if( aReporter ) + { + msg.Printf( _( "Component '%s' footprint '%s' was not found in any legacy " + "library.\n" ), + GetChars( component->GetReference() ), + GetChars( component->GetFPID().Format() ) ); + aReporter->Report( msg ); + } + + // Clear the footprint assignment since the old library lookup method is no + // longer valid. + FPID emptyFPID; + + component->SetFPID( emptyFPID ); + retv = false; + continue; + } + else + { + wxString libNickname; + + const FP_LIB_TABLE::ROW* row; + + if( ( row = aTbl->FindRowByURI( libPath ) ) != NULL ) + libNickname = row->GetNickName(); + + if( libNickname.IsEmpty() ) + { + if( aReporter ) + { + msg.Printf( _( "Component '%s' with footprint '%s' and legacy library path '%s' " + "was not found in the footprint library table.\n" ), + GetChars( component->GetReference() ), + GetChars( component->GetFPID().Format() ), + GetChars( libPath ) + ); + aReporter->Report( msg ); + } + + retv = false; + } + else + { + FPID newFPID = lastFPID; + newFPID.SetLibNickname( libNickname ); + + if( !newFPID.IsValid() ) + { + if( aReporter ) + { + msg.Printf( _( "Component '%s' FPID '%s' is not valid.\n" ), + GetChars( component->GetReference() ), + GetChars( newFPID.Format() ) ); + aReporter->Report( msg ); + } + + retv = false; + } + else + { + // The footprint name should already be set. + component->SetFPID( newFPID ); + } + } + } + } + + return retv; +} + + bool CVPCB_MAINFRAME::ReadNetListAndLinkFiles() { COMPONENT* component; @@ -242,7 +400,7 @@ bool CVPCB_MAINFRAME::ReadNetListAndLinkFiles() SEARCH_STACK& search = Prj().SchSearchS(); - if( !FootprintLibs()->ConvertFromLegacy( search, m_netlist, m_ModuleLibNames, &reporter ) ) + if( !convertFromLegacy( FootprintLibs(), search, m_netlist, m_ModuleLibNames, &reporter ) ) { HTML_MESSAGE_BOX dlg( this, wxEmptyString ); @@ -300,6 +458,193 @@ bool CVPCB_MAINFRAME::ReadNetListAndLinkFiles() return true; } +#else // new strategy + + +/// Return true if the resultant FPID has a certain nickname. The guess +/// is only made if this footprint resides in only one library. +/// @return int - 0 on success, 1 on not found, 2 on ambiguous i.e. multiple matches +static int guessNickname( FP_LIB_TABLE* aTbl, FPID* aFootprintId ) +{ + if( aFootprintId->GetLibNickname().size() ) + return 0; + + wxString nick; + wxString fpname = aFootprintId->GetFootprintName(); + + std::vector nicks = aTbl->GetLogicalLibs(); + + // Search each library going through libraries alphabetically. + for( unsigned libNdx = 0; libNdxFootprintEnumerate( nicks[libNdx] ); + + for( unsigned nameNdx = 0; nameNdxSetLibNickname( nick ); + return 0; + } + + return 1; +} + + +bool CVPCB_MAINFRAME::ReadNetListAndLinkFiles() +{ + wxString msg; + bool hasMissingNicks = false; + FP_LIB_TABLE* tbl = FootprintLibs(); + + ReadSchematicNetlist(); + + if( m_ListCmp == NULL ) + return false; + + LoadProjectFile( m_NetlistFileName.GetFullPath() ); + LoadFootprintFiles(); + BuildFOOTPRINTS_LISTBOX(); + BuildLIBRARY_LISTBOX(); + + m_ListCmp->Clear(); + m_undefinedComponentCnt = 0; + + if( m_netlist.AnyFootprintsLinked() ) + { + for( unsigned i = 0; i < m_netlist.GetCount(); i++ ) + { + COMPONENT* component = m_netlist.GetComponent( i ); + + if( component->GetFPID().empty() ) + continue; + + if( component->GetFPID().IsLegacy() ) + hasMissingNicks = true; + } + } + + // Check if footprint links were generated before the footprint library table was implemented. + if( hasMissingNicks ) + { + msg = wxT( + "Some of the assigned footprints are legacy entries (are missing lib nicknames). " + "Would you like CvPcb to attempt to convert them to the new required FPID format? " + "(If you answer no, then these assignments will be cleared out and you will " + "have to re-assign these footprints yourself.)" + ); + + if( IsOK( this, msg ) ) + { + msg.Clear(); + + for( unsigned i = 0; i < m_netlist.GetCount(); i++ ) + { + COMPONENT* component = m_netlist.GetComponent( i ); + + if( component->GetFPID().IsLegacy() ) + { + int guess = guessNickname( tbl, (FPID*) &component->GetFPID() ); + + switch( guess ) + { + case 0: + DBG(printf("%s: guessed OK ref:%s fpid:%s\n", __func__, + TO_UTF8( component->GetReference() ), component->GetFPID().Format().c_str() );) + m_modified = true; + break; + + case 1: + msg += wxString::Format( _( + "Component '%s' footprint '%s' was not found in any library.\n" ), + GetChars( component->GetReference() ), + GetChars( component->GetFPID().GetFootprintName() ) + ); + break; + + case 2: + msg += wxString::Format( _( + "Component '%s' footprint '%s' was found in multiple libraries.\n" ), + GetChars( component->GetReference() ), + GetChars( component->GetFPID().GetFootprintName() ) + ); + break; + } + } + } + + if( msg.size() ) + { + HTML_MESSAGE_BOX dlg( this, wxEmptyString ); + + dlg.MessageSet( wxT( "The following errors occurred attempting to convert the " + "footprint assignments:\n\n" ) ); + dlg.ListSet( msg ); + dlg.MessageSet( wxT( "\nYou will need to reassign them manually if you want them " + "to be updated correctly the next time you import the " + "netlist in Pcbnew." ) ); + dlg.ShowModal(); + } + } + else + { + // Clear the legacy footprint assignments. + for( unsigned i = 0; i < m_netlist.GetCount(); i++ ) + { + COMPONENT* component = m_netlist.GetComponent( i ); + + if( component->GetFPID().IsLegacy() ) + { + component->SetFPID( FPID() /* empty */ ); + m_modified = true; + } + } + } + } + + for( unsigned i = 0; i < m_netlist.GetCount(); i++ ) + { + COMPONENT* component = m_netlist.GetComponent( i ); + + msg.Printf( CMP_FORMAT, m_ListCmp->GetCount() + 1, + GetChars( component->GetReference() ), + GetChars( component->GetValue() ), + GetChars( FROM_UTF8( component->GetFPID().Format().c_str() ) ) ); + + m_ListCmp->AppendLine( msg ); + + if( component->GetFPID().empty() ) + { + m_undefinedComponentCnt += 1; + continue; + } + } + + if( !m_netlist.IsEmpty() ) + m_ListCmp->SetSelection( 0, true ); + + DisplayStatus(); + + UpdateTitle(); + + UpdateFileHistory( m_NetlistFileName.GetFullPath() ); + + return true; +} + + +#endif + int CVPCB_MAINFRAME::SaveCmpLinkFile( const wxString& aFullFileName ) { diff --git a/eeschema/class_libentry.cpp b/eeschema/class_libentry.cpp index 904d7f4b86..bd7f81120f 100644 --- a/eeschema/class_libentry.cpp +++ b/eeschema/class_libentry.cpp @@ -136,7 +136,7 @@ bool LIB_ALIAS::SaveDoc( OUTPUTFORMATTER& aFormatter ) aFormatter.Print( 0, "$ENDCMP\n" ); } - catch( IO_ERROR ioe ) + catch( const IO_ERROR& ioe ) { return false; } diff --git a/eeschema/class_library.cpp b/eeschema/class_library.cpp index 50e7da1ad2..39443a8e3f 100644 --- a/eeschema/class_library.cpp +++ b/eeschema/class_library.cpp @@ -731,7 +731,7 @@ bool CMP_LIBRARY::Save( OUTPUTFORMATTER& aFormatter ) aFormatter.Print( 0, "#\n#End Library\n" ); } - catch( IO_ERROR ioe ) + catch( const IO_ERROR& ioe ) { success = false; } @@ -756,7 +756,7 @@ bool CMP_LIBRARY::SaveDocs( OUTPUTFORMATTER& aFormatter ) aFormatter.Print( 0, "#\n#End Doc Library\n" ); } - catch( IO_ERROR ioe ) + catch( const IO_ERROR& ioe ) { success = false; } diff --git a/eeschema/dialogs/dialog_bom.cpp b/eeschema/dialogs/dialog_bom.cpp index b293a39b17..ba64849867 100644 --- a/eeschema/dialogs/dialog_bom.cpp +++ b/eeschema/dialogs/dialog_bom.cpp @@ -249,7 +249,7 @@ void DIALOG_BOM::installPluginsList() { cfg_parser.Parse(); } - catch( IO_ERROR ioe ) + catch( const IO_ERROR& ioe ) { // wxLogMessage( ioe.errorText ); } diff --git a/eeschema/eeschema_config.cpp b/eeschema/eeschema_config.cpp index 5623b3cadb..ee091ae82c 100644 --- a/eeschema/eeschema_config.cpp +++ b/eeschema/eeschema_config.cpp @@ -668,7 +668,7 @@ void SCH_EDIT_FRAME::LoadSettings( wxConfigBase* aCfg ) { m_TemplateFieldNames.Parse( &lexer ); } - catch( IO_ERROR& e ) + catch( const IO_ERROR& e ) { // @todo show error msg DBG( printf( "templatefieldnames parsing error: '%s'\n", diff --git a/eeschema/netform.cpp b/eeschema/netform.cpp index 3a97b08849..6201f4a538 100644 --- a/eeschema/netform.cpp +++ b/eeschema/netform.cpp @@ -1049,7 +1049,7 @@ bool NETLIST_EXPORT_TOOL::WriteKiCadNetList( const wxString& aOutFileName ) xroot->Format( &formatter, 0 ); } - catch( IO_ERROR ioe ) + catch( const IO_ERROR& ioe ) { DisplayError( NULL, ioe.errorText ); return false; diff --git a/eeschema/symbedit.cpp b/eeschema/symbedit.cpp index a5dc98738d..7836f5cbd8 100644 --- a/eeschema/symbedit.cpp +++ b/eeschema/symbedit.cpp @@ -225,14 +225,14 @@ void LIB_EDIT_FRAME::SaveOneSymbol() formatter.Print( 0, "ENDDRAW\n" ); formatter.Print( 0, "ENDDEF\n" ); } - catch( IO_ERROR ioe ) + catch( const IO_ERROR& ioe ) { msg.Printf( _( "An error occurred attempting to save symbol file '%s'" ), GetChars( fn.GetFullPath() ) ); DisplayError( this, msg ); } } - catch( IO_ERROR ioe ) + catch( const IO_ERROR& ioe ) { DisplayError( this, ioe.errorText ); return; diff --git a/include/fp_lib_table.h b/include/fp_lib_table.h index e4f589e53d..679d437b42 100644 --- a/include/fp_lib_table.h +++ b/include/fp_lib_table.h @@ -38,6 +38,7 @@ class wxFileName; class OUTPUTFORMATTER; class MODULE; class FP_LIB_TABLE_LEXER; +class FPID; class NETLIST; class REPORTER; class SEARCH_STACK; @@ -455,6 +456,21 @@ public: //-------------------------------- + /** + * Function FootprintLoadWithOptionalNickname + * loads a footprint having @a aFootprintId with possibly an empty nickname. + * + * @param aFootprintId the [nickname] & fooprint name of the footprint to load. + * + * @return MODULE* - if found caller owns it, else NULL if not found. + * + * @throw IO_ERROR if the library cannot be found or read. No exception + * is thrown in the case where aFootprintName cannot be found. + * @throw PARSE_ERROR if @a aFootprintId is not parsed OK. + */ + MODULE* FootprintLoadWithOptionalNickname( const FPID& aFootprintId ) + throw( IO_ERROR, PARSE_ERROR ); + /** * Function GetDescription * returns the library desicription from @a aNickname, or an empty string @@ -499,19 +515,6 @@ public: */ bool IsEmpty( bool aIncludeFallback = true ); - /** - * Function ConvertFromLegacy - * converts the footprint names in \a aNetList from the legacy format to the #FPID format. - * - * @param aNetList is the #NETLIST object to convert. - * @param aLibNames is the list of legacy footprint library names from the currently loaded - * project. - * @param aReporter is the #REPORTER object to dump messages into. - * @return true if all footprint names were successfully converted to a valid FPID. - */ - bool ConvertFromLegacy( SEARCH_STACK& aSStack, NETLIST& aNetList, - const wxArrayString& aLibNames, REPORTER* aReporter = NULL ) throw( IO_ERROR ); - /** * Function ExpandSubstitutions * replaces any environment variable references with their values and is diff --git a/include/fpid.h b/include/fpid.h index 17155858b8..853983ad51 100644 --- a/include/fpid.h +++ b/include/fpid.h @@ -153,7 +153,6 @@ public: */ bool IsValid() const { return !nickname.empty() && !footprint.empty(); } - /** * Function IsLegacy * @return true if the #FPID only has the #footprint name defined. diff --git a/include/ptree.h b/include/ptree.h index 66943c63f9..0ffad8c8ed 100644 --- a/include/ptree.h +++ b/include/ptree.h @@ -78,7 +78,7 @@ typedef const PTREE CPTREE; * PTREE doc; * Scan( &doc, &lexer ); * } - * catch( IO_ERROR ioe ) + * catch( const IO_ERROR& ioe ) * { * fprintf( stderr, "%s\n", TO_UTF8( ioe.errorText ) ); * } diff --git a/new/sch_dir_lib_source.cpp b/new/sch_dir_lib_source.cpp index 5b3913d7ac..c91e1b5bcd 100644 --- a/new/sch_dir_lib_source.cpp +++ b/new/sch_dir_lib_source.cpp @@ -716,7 +716,7 @@ void DIR_LIB_SOURCE::Test( int argc, char** argv ) printf( "std::exception\n" ); } - catch( IO_ERROR& ioe ) + catch( const IO_ERROR& ioe ) { printf( "exception: %s\n", (const char*) ioe.errorText.ToUTF8() ) ); } diff --git a/new/test_sch_lib_table.cpp b/new/test_sch_lib_table.cpp index 08c6261fec..a385794604 100644 --- a/new/test_sch_lib_table.cpp +++ b/new/test_sch_lib_table.cpp @@ -118,7 +118,7 @@ int main( int argc, char** argv ) printf( "%*s^\n", ioe.byteIndex>=1 ? ioe.byteIndex-1 : 0, "" ); } - catch( IO_ERROR& ioe ) + catch( const IO_ERROR& ioe ) { printf( "%s\n", (const char*) ioe.errorText.ToUTF8() ); } diff --git a/pagelayout_editor/page_layout_writer.cpp b/pagelayout_editor/page_layout_writer.cpp index 03497e849f..dfc6321511 100644 --- a/pagelayout_editor/page_layout_writer.cpp +++ b/pagelayout_editor/page_layout_writer.cpp @@ -98,7 +98,7 @@ public: m_fileout = new FILE_OUTPUTFORMATTER( aFilename ); m_out = m_fileout; } - catch( IO_ERROR ioe ) + catch( const IO_ERROR& ioe ) { wxMessageBox( ioe.errorText, _("Error writing page layout descr file" ) ); } @@ -125,7 +125,7 @@ public: m_writer = new STRING_FORMATTER(); m_out = m_writer; } - catch( IO_ERROR ioe ) + catch( const IO_ERROR& ioe ) { wxMessageBox( ioe.errorText, _("Error writing page layout descr file" ) ); } diff --git a/pcb_calculator/datafile_read_write.cpp b/pcb_calculator/datafile_read_write.cpp index aef8427ca9..ca63df67dd 100644 --- a/pcb_calculator/datafile_read_write.cpp +++ b/pcb_calculator/datafile_read_write.cpp @@ -66,13 +66,16 @@ bool PCB_CALCULATOR_FRAME::ReadDataFile() { datafile_parser.Parse( datafile ); } - catch( IO_ERROR& ioe ) + catch( const IO_ERROR& ioe ) { delete datafile; - ioe.errorText += '\n'; - ioe.errorText += _("Data file error."); - wxMessageBox( ioe.errorText ); + wxString msg = ioe.errorText; + + msg += wxChar('\n'); + msg += _("Data file error."); + + wxMessageBox( msg ); return false; } @@ -99,7 +102,7 @@ bool PCB_CALCULATOR_FRAME::WriteDataFile() while( nestlevel-- ) formatter.Print( nestlevel, ")\n" ); } - catch( IO_ERROR ioe ) + catch( const IO_ERROR& ioe ) { return false; } diff --git a/pcbnew/dialogs/dialog_netlist.cpp b/pcbnew/dialogs/dialog_netlist.cpp index 2d4f572f12..2fc522383b 100644 --- a/pcbnew/dialogs/dialog_netlist.cpp +++ b/pcbnew/dialogs/dialog_netlist.cpp @@ -426,7 +426,7 @@ bool DIALOG_NETLIST::verifyFootprints( const wxString& aNetlistFilename, std::auto_ptr< NETLIST_READER > nlr( netlistReader ); netlistReader->LoadNetlist(); } - catch( IO_ERROR& ioe ) + catch( const IO_ERROR& ioe ) { msg.Printf( _( "Error loading netlist file:\n%s" ), ioe.errorText.GetData() ); wxMessageBox( msg, _( "Netlist Load Error" ), wxOK | wxICON_ERROR ); diff --git a/pcbnew/exporters/export_idf.cpp b/pcbnew/exporters/export_idf.cpp index 3d363f5caa..3e2f3e796e 100644 --- a/pcbnew/exporters/export_idf.cpp +++ b/pcbnew/exporters/export_idf.cpp @@ -403,7 +403,7 @@ bool Export_IDF3( BOARD* aPcb, const wxString& aFullFileName, double aUseThou ) idfBoard.Finish(); } - catch( IO_ERROR ioe ) + catch( const IO_ERROR& ioe ) { wxLogDebug( wxT( "An error occurred attemping export to IDFv3.\n\nError: %s" ), GetChars( ioe.errorText ) ); diff --git a/pcbnew/exporters/gen_modules_placefile.cpp b/pcbnew/exporters/gen_modules_placefile.cpp index b572338064..4507d65394 100644 --- a/pcbnew/exporters/gen_modules_placefile.cpp +++ b/pcbnew/exporters/gen_modules_placefile.cpp @@ -713,7 +713,7 @@ bool PCB_EDIT_FRAME::DoGenFootprintsReport( const wxString& aFullFilename, bool fprintf( rptfile, "$EndMODULE %s\n\n", TO_UTF8 (Module->GetReference() ) ); } } - catch( IO_ERROR ioe ) + catch( const IO_ERROR& ioe ) { DisplayError( NULL, ioe.errorText ); } diff --git a/pcbnew/files.cpp b/pcbnew/files.cpp index d95a13df2c..ec1da8e310 100644 --- a/pcbnew/files.cpp +++ b/pcbnew/files.cpp @@ -404,7 +404,7 @@ bool PCB_EDIT_FRAME::OpenProjectFiles( const std::vector& aFileSet, in SetBoard( loadedBoard ); } } - catch( IO_ERROR ioe ) + catch( const IO_ERROR& ioe ) { wxString msg = wxString::Format( _( "Error loading board.\n%s" ), ioe.errorText.GetData() ); @@ -692,7 +692,7 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool aCreateBackupF pi->Save( pcbFileName.GetFullPath(), GetBoard(), NULL ); } - catch( IO_ERROR ioe ) + catch( const IO_ERROR& ioe ) { wxString msg = wxString::Format( _( "Error saving board.\n%s" ), ioe.errorText.GetData() ); diff --git a/pcbnew/github/github_plugin.cpp b/pcbnew/github/github_plugin.cpp index 28e9efb6ea..894c6ec322 100644 --- a/pcbnew/github/github_plugin.cpp +++ b/pcbnew/github/github_plugin.cpp @@ -570,7 +570,7 @@ int main( int argc, char** argv ) printf("[%d]:%s\n", i, TO_UTF8( fps[i] ) ); } } - catch( IO_ERROR ioe ) + catch( const IO_ERROR& ioe ) { printf( "%s\n", TO_UTF8(ioe.errorText) ); } diff --git a/pcbnew/io_mgr.h b/pcbnew/io_mgr.h index 6ac100ff7f..e2b0135227 100644 --- a/pcbnew/io_mgr.h +++ b/pcbnew/io_mgr.h @@ -204,7 +204,7 @@ public: * or * IO_MGR::Save(...); * } - * catch( IO_ERROR ioe ) + * catch( const IO_ERROR& ioe ) * { * // grab text from ioe, show in error window. * } diff --git a/pcbnew/ioascii.cpp.notused b/pcbnew/ioascii.cpp.notused deleted file mode 100644 index 7e185f84ad..0000000000 --- a/pcbnew/ioascii.cpp.notused +++ /dev/null @@ -1,1260 +0,0 @@ - /** - * @file ioascii.cpp - * @brief Routines for reading and saving of structures in ASCII file common to Pcbnew and CvPcb. - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -/** - * @todo Fix having to recompile the same file with a different defintion. This is - * what C++ derivation was designed to solve. - */ -#ifdef PCBNEW -#include -#endif - -#ifdef CVPCB -#include -#endif - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - - -/* ASCII format of structures: - * - * Structure PAD: - * - * $PAD - * Sh "name" form DIMVA dimH dV dH East: general form dV, dH = delta size - * Dr. diam dV dH: drill: diameter drilling offsets - * At Type S / N layers: standard, cms, conn, hole, meca., - * Stack / Normal, 32-bit hexadecimal: occupation layers - * Nm net_code netname - * Po posrefX posrefy: reFX position, Y (0 = east position / anchor) - * $EndPAD - * - * Module Structure - * - * $MODULE namelib - * Po ax ay east layer masquelayer m_TimeCode - * ax ay ord = anchor (position module) - * east = east to 0.1 degree - * layer = layer number - * masquelayer = silkscreen layer for - * m_TimeCode internal use (groups) - * Li - * - * Cd description of the component (Component Doc) - * Kw List of key words - * - * Sc schematic timestamp, reference schematic - * - * Op rot90 rot180 placement Options Auto (court rot 90, 180) - * rot90 is about 2x4-bit: - * lsb = cost rot 90, rot court msb = -90; - * - * Tn px py DIMVA dimh East thickness mirror visible "text" - * n = type (0 = ref, val = 1,> 1 = qcq - * Texts POS x, y / anchor and orient module 0 - * DIMVA dimh East - * mirror thickness (Normal / Mirror) - * Visible V / I - * DS ox oy fx fy w - * Edge: coord segment ox, oy has fx, fy, on - * was the anchor and orient 0 - * thickness w - * DC ox oy fx fy w descr circle (center, 1 point, thickness) - * $PAD - * $EndPAD section pads if available - * $Endmodule - */ - -/// Get the length of a string constant, at compile time -#define SZ( x ) (sizeof(x)-1) - -static int NbDraw, NbTrack, NbZone, NbMod, NbNets; - -static const char delims[] = " =\n\r"; - - -/** Read a list of segments (Tracks, zones) - * @return items count or - count if no end block ($End...) found. - */ -int PCB_BASE_FRAME::ReadListeSegmentDescr( LINE_READER* aReader, - TRACK* insertBeforeMe, - int StructType, - int NumSegm ) -{ - int shape, width, drill, layer, type, flags, net_code; - int tempStartX, tempStartY; - int tempEndX, tempEndY; - int ii = 0; - - TRACK* newTrack; - - while( aReader->ReadLine() ) - { - char* line = aReader->Line(); - int makeType; - unsigned long timeStamp; - - if( line[0] == '$' ) - { - return ii; // end of segmentlist: OK - } - - int arg_count = sscanf( line + 2, " %d %d %d %d %d %d %d", &shape, - &tempStartX, &tempStartY, - &tempEndX, &tempEndY, &width, - &drill ); - - // Read the 2nd line to determine the exact type, one of: - // PCB_TRACE_T, PCB_VIA_T, or PCB_ZONE_T. The type field in 2nd line - // differentiates between PCB_TRACE_T and PCB_VIA_T. With virtual - // functions in use, it is critical to instantiate the PCB_VIA_T - // exactly. - if( !aReader->ReadLine() ) - break; - - line = aReader->Line(); - - if( line[0] == '$' ) - break; - - // parse the 2nd line first to determine the type of object - sscanf( line + 2, " %d %d %d %lX %X", &layer, &type, &net_code, - &timeStamp, &flags ); - - if( StructType==PCB_TRACE_T && type==1 ) - makeType = PCB_VIA_T; - else - makeType = StructType; - - switch( makeType ) - { - default: - case PCB_TRACE_T: - newTrack = new TRACK( GetBoard() ); - GetBoard()->m_Track.Insert( newTrack, insertBeforeMe ); - break; - - case PCB_VIA_T: - newTrack = new SEGVIA( GetBoard() ); - GetBoard()->m_Track.Insert( newTrack, insertBeforeMe ); - break; - - case PCB_ZONE_T: // this is now deprecated, but exist in old boards - newTrack = new SEGZONE( GetBoard() ); - GetBoard()->m_Zone.Insert( (SEGZONE*) newTrack, (SEGZONE*) insertBeforeMe ); - break; - } - - newTrack->SetTimeStamp( timeStamp ); - - newTrack->m_Start.x = tempStartX; - newTrack->m_Start.y = tempStartY; - newTrack->m_End.x = tempEndX; - newTrack->m_End.y = tempEndY; - - newTrack->m_Width = width; - newTrack->m_Shape = shape; - - if( arg_count < 7 || drill <= 0 ) - newTrack->SetDrillDefault(); - else - newTrack->SetDrill( drill ); - - newTrack->SetLayer( layer ); - - if( makeType == PCB_VIA_T ) // Ensure layers are OK when possible: - { - if( newTrack->GetShape() == VIA_THROUGH ) - ( (SEGVIA*) newTrack )->SetLayerPair( LAYER_N_FRONT, LAYER_N_BACK ); - } - - newTrack->SetNet( net_code ); - newTrack->SetState( flags, ON ); - } - - DisplayError( this, _( "Error: Unexpected end of file !" ) ); - return -ii; -} - - -int PCB_BASE_FRAME::ReadGeneralDescrPcb( LINE_READER* aReader ) -{ - while( aReader->ReadLine() ) - { - char* line = aReader->Line(); - char* data = strtok( line, delims ); - - if( strnicmp( data, "$EndGENERAL", 10 ) == 0 ) - break; - - if( stricmp( data, "EnabledLayers" ) == 0 ) - { - int enabledLayers = 0; - - data = strtok( NULL, delims ); - sscanf( data, "%X", &enabledLayers ); - - // layer usage - GetBoard()->SetEnabledLayers( enabledLayers ); - - // layer visibility equals layer usage, unless overridden later via "VisibleLayers" - GetBoard()->SetVisibleLayers( enabledLayers ); - continue; - } - - if( stricmp( data, "VisibleLayers" ) == 0 ) - { - int visibleLayers = -1; - - data = strtok( NULL, delims ); - sscanf( data, "%X", &visibleLayers ); - - GetBoard()->SetVisibleLayers( visibleLayers ); - continue; - } - - if( strncmp( data, "Ly", 2 ) == 0 ) // Old format for Layer count - { - int Masque_Layer = 1, ii; - - data = strtok( NULL, delims ); - sscanf( data, "%X", &Masque_Layer ); - - // Setup layer count - int layer_count = 0; - - for( ii = 0; ii < NB_COPPER_LAYERS; ii++ ) - { - if( Masque_Layer & 1 ) - layer_count++; - - Masque_Layer >>= 1; - } - - GetBoard()->SetCopperLayerCount( layer_count ); - - continue; - } - - if( stricmp( data, "BoardThickness" ) == 0 ) - { - data = strtok( NULL, delims ); - GetBoard()->GetDesignSettings().m_BoardThickness = atoi( data ); - continue; - } - - if( strnicmp( data, "Links", 5 ) == 0 ) - { - // Info only, do nothing - continue; - } - - if( strnicmp( data, "NoConn", 6 ) == 0 ) - { - data = strtok( NULL, delims ); - GetBoard()->m_NbNoconnect = atoi( data ); - continue; - } - - if( strnicmp( data, "Di", 2 ) == 0 ) - { - data = strtok( NULL, delims ); - int x1 = atoi( data ); - - data = strtok( NULL, delims ); - int y1 = atoi( data ); - - data = strtok( NULL, delims ); - int x2 = atoi( data ); - - data = strtok( NULL, delims ); - int y2 = atoi( data ); - - EDA_RECT bbbox( wxPoint( x1, y1 ), wxSize( x2-x1, y2-y1 ) ); - - GetBoard()->SetBoundingBox( bbbox ); - - continue; - } - - // Read the number of segments of type DRAW, TRACK, ZONE - if( stricmp( data, "Ndraw" ) == 0 ) - { - data = strtok( NULL, delims ); - NbDraw = atoi( data ); - continue; - } - - if( stricmp( data, "Ntrack" ) == 0 ) - { - data = strtok( NULL, delims ); - NbTrack = atoi( data ); - continue; - } - - if( stricmp( data, "Nzone" ) == 0 ) - { - data = strtok( NULL, delims ); - NbZone = atoi( data ); - continue; - } - - if( stricmp( data, "Nmodule" ) == 0 ) - { - data = strtok( NULL, delims ); - NbMod = atoi( data ); - continue; - } - - if( stricmp( data, "Nnets" ) == 0 ) - { - data = strtok( NULL, delims ); - NbNets = atoi( data ); - continue; - } - } - - return 1; -} - - -int PCB_BASE_FRAME::ReadSetup( LINE_READER* aReader ) -{ - char* data; - - NETCLASS* netclass_default = GetBoard()->m_NetClasses.GetDefault(); - ZONE_SETTINGS zoneInfo = GetBoard()->GetZoneSettings(); - BOARD_DESIGN_SETTINGS bds = GetBoard()->GetDesignSettings(); - - while( aReader->ReadLine() ) - { - char* line = aReader->Line(); - - if( strnicmp( line, "PcbPlotParams", 13 ) == 0 ) - { - PCB_PLOT_PARAMS plot_opts; - PCB_PLOT_PARAMS_PARSER parser( &line[13], aReader->GetSource() ); - - try - { - plot_opts.Parse( &parser ); - } - catch( IO_ERROR& e ) - { - wxString msg; - msg.Printf( _( "Error reading PcbPlotParams from %s:\n%s" ), - aReader->GetSource().GetData(), - e.errorText.GetData() ); - wxMessageBox( msg, _( "Open Board File" ), wxOK | wxICON_ERROR ); - } - - GetBoard()->SetPlotOptions( plot_opts ); - - continue; - } - - strtok( line, delims ); - data = strtok( NULL, delims ); - - if( stricmp( line, "$EndSETUP" ) == 0 ) - { - // Until such time as the *.brd file does not have the - // global parameters: - // "TrackWidth", "TrackMinWidth", "ViaSize", "ViaDrill", - // "ViaMinSize", and "TrackClearence", put those same global - // values into the default NETCLASS until later board load - // code should override them. *.brd files which have been - // saved with knowledge of NETCLASSes will override these - // defaults, old boards will not. - // - // @todo: I expect that at some point we can remove said global - // parameters from the *.brd file since the ones in the - // default netclass serve the same purpose. If needed - // at all, the global defaults should go into a preferences - // file instead so they are there to start new board - // projects. - GetBoard()->m_NetClasses.GetDefault()->SetParams(); - - GetBoard()->SetDesignSettings( bds ); - - GetBoard()->SetZoneSettings( zoneInfo ); - - return 0; - } - - if( stricmp( line, "AuxiliaryAxisOrg" ) == 0 ) - { - int gx = 0, gy = 0; - gx = atoi( data ); - data = strtok( NULL, delims ); - - if( data ) - gy = atoi( data ); - - SetOriginAxisPosition( wxPoint( gx, gy ) ); - continue; - } - -#ifdef PCBNEW - - if( stricmp( line, "Layers" ) == 0 ) - { - int tmp; - sscanf( data, "%d", &tmp ); - GetBoard()->SetCopperLayerCount( tmp ); - continue; - } - - const int LAYERKEYZ = sizeof("Layer[") - 1; - - if( strncmp( line, "Layer[", LAYERKEYZ ) == 0 ) - { - // parse: - // Layer[n] - - char* cp = line + LAYERKEYZ; - int layer = atoi( cp ); - - if( data ) - { - wxString layerName = FROM_UTF8( data ); - GetBoard()->SetLayerName( layer, layerName ); - - data = strtok( NULL, " \n\r" ); - - if( data ) - { - LAYER_T type = LAYER::ParseType( data ); - GetBoard()->SetLayerType( layer, type ); - } - } - - continue; - } - - if( stricmp( line, "TrackWidth" ) == 0 ) // no more used - { - continue; - } - - if( stricmp( line, "TrackWidthList" ) == 0 ) - { - int tmp = atoi( data ); - GetBoard()->m_TrackWidthList.push_back( tmp ); - continue; - } - - if( stricmp( line, "TrackClearence" ) == 0 ) - { - netclass_default->SetClearance( atoi( data ) ); - continue; - } - - if( stricmp( line, "TrackMinWidth" ) == 0 ) - { - bds.m_TrackMinWidth = atoi( data ); - continue; - } - - if( stricmp( line, "ZoneClearence" ) == 0 ) - { - zoneInfo.m_ZoneClearance = atoi( data ); - continue; - } - - if( stricmp( line, "DrawSegmWidth" ) == 0 ) - { - bds.m_DrawSegmentWidth = atoi( data ); - continue; - } - - if( stricmp( line, "EdgeSegmWidth" ) == 0 ) - { - bds.m_EdgeSegmentWidth = atoi( data ); - continue; - } - - if( stricmp( line, "ViaSize" ) == 0 ) // no more used - { - continue; - } - - if( stricmp( line, "ViaMinSize" ) == 0 ) - { - bds.m_ViasMinSize = atoi( data ); - continue; - } - - if( stricmp( line, "MicroViaSize" ) == 0 ) // Not used - { - continue; - } - - if( stricmp( line, "MicroViaMinSize" ) == 0 ) - { - bds.m_MicroViasMinSize = atoi( data ); - continue; - } - - if( stricmp( line, "ViaSizeList" ) == 0 ) - { - int tmp = atoi( data ); - VIA_DIMENSION via_dim; - via_dim.m_Diameter = tmp; - data = strtok( NULL, " \n\r" ); - - if( data ) - { - tmp = atoi( data ); - via_dim.m_Drill = tmp > 0 ? tmp : 0; - } - - GetBoard()->m_ViasDimensionsList.push_back( via_dim ); - continue; - } - - if( stricmp( line, "ViaDrill" ) == 0 ) - { - int diameter = atoi( data ); - netclass_default->SetViaDrill( diameter ); - continue; - } - - if( stricmp( line, "ViaMinDrill" ) == 0 ) - { - bds.m_ViasMinDrill = atoi( data ); - continue; - } - - if( stricmp( line, "MicroViaDrill" ) == 0 ) - { - int diameter = atoi( data ); - netclass_default->SetuViaDrill( diameter ); - continue; - } - - if( stricmp( line, "MicroViaMinDrill" ) == 0 ) - { - int diameter = atoi( data ); - bds.m_MicroViasMinDrill = diameter; - continue; - } - - if( stricmp( line, "MicroViasAllowed" ) == 0 ) - { - bds.m_MicroViasAllowed = atoi( data ); - continue; - } - - if( stricmp( line, "TextPcbWidth" ) == 0 ) - { - bds.m_PcbTextWidth = atoi( data ); - continue; - } - - if( stricmp( line, "TextPcbSize" ) == 0 ) - { - bds.m_PcbTextSize.x = atoi( data ); - data = strtok( NULL, delims ); - bds.m_PcbTextSize.y = atoi( data ); - continue; - } - - if( stricmp( line, "EdgeModWidth" ) == 0 ) - { - bds.m_ModuleSegmentWidth = atoi( data ); - continue; - } - - if( stricmp( line, "TextModWidth" ) == 0 ) - { - bds.m_ModuleTextWidth = atoi( data ); - continue; - } - - if( stricmp( line, "TextModSize" ) == 0 ) - { - bds.m_ModuleTextSize.x = atoi( data ); - data = strtok( NULL, delims ); - bds.m_ModuleTextSize.y = atoi( data ); - continue; - } - - if( stricmp( line, "PadSize" ) == 0 ) - { - int x = atoi( data ); - data = strtok( NULL, delims ); - int y = atoi( data ); - bds.m_Pad_Master.SetSize( wxSize( x, y ) ); - continue; - } - - if( stricmp( line, "PadDrill" ) == 0 ) - { - int sz = atoi( data ); - bds.m_Pad_Master.SetSize( wxSize( sz, sz ) ); - continue; - } - - if( stricmp( line, "Pad2MaskClearance" ) == 0 ) - { - bds.m_SolderMaskMargin = atoi( data ); - continue; - } - - if( stricmp( line, "Pad2PasteClearance" ) == 0 ) - { - bds.m_SolderPasteMargin = atoi( data ); - continue; - } - - if( stricmp( line, "Pad2PasteClearanceRatio" ) == 0 ) - { - bds.m_SolderPasteMarginRatio = atof( data ); - continue; - } - - if( stricmp( line, "GridOrigin" ) == 0 ) - { - int Ox = 0; - int Oy = 0; - - Ox = atoi( data ); - data = strtok( NULL, delims ); - - if ( data ) - Oy = atoi( data ); - - GetScreen()->m_GridOrigin.x = Ox; - GetScreen()->m_GridOrigin.y = Oy; - continue; - } - - if( stricmp( line, "VisibleElements" ) == 0 ) - { - int visibleElements = strtoul( data, 0, 16 ); - bds.SetVisibleElements( visibleElements ); - continue; - } -#endif - - } - - /* Ensure tracks and vias sizes lists are ok: - * Sort lists by by increasing value and remove duplicates - * (the first value is not tested, because it is the netclass value - */ - sort( GetBoard()->m_ViasDimensionsList.begin() + 1, GetBoard()->m_ViasDimensionsList.end() ); - sort( GetBoard()->m_TrackWidthList.begin() + 1, GetBoard()->m_TrackWidthList.end() ); - - for( unsigned ii = 1; ii < GetBoard()->m_ViasDimensionsList.size() - 1; ii++ ) - { - if( GetBoard()->m_ViasDimensionsList[ii] == GetBoard()->m_ViasDimensionsList[ii + 1] ) - { - GetBoard()->m_ViasDimensionsList.erase( GetBoard()->m_ViasDimensionsList.begin() + ii ); - ii--; - } - } - - for( unsigned ii = 1; ii < GetBoard()->m_TrackWidthList.size() - 1; ii++ ) - { - if( GetBoard()->m_TrackWidthList[ii] == GetBoard()->m_TrackWidthList[ii + 1] ) - { - GetBoard()->m_TrackWidthList.erase( GetBoard()->m_TrackWidthList.begin() + ii ); - ii--; - } - } - - return 1; -} - - -#ifdef PCBNEW - -static int WriteSetup( FILE* aFile, PCB_EDIT_FRAME* aFrame, BOARD* aBoard ) -{ - const BOARD_DESIGN_SETTINGS& bds = aBoard->GetDesignSettings(); - NETCLASS* netclass_default = aBoard->m_NetClasses.GetDefault(); - char text[1024]; - - fprintf( aFile, "$SETUP\n" ); - sprintf( text, "InternalUnit %f INCH\n", 1.0 / PCB_INTERNAL_UNIT ); - fprintf( aFile, "%s", text ); - - fprintf( aFile, "Layers %d\n", aBoard->GetCopperLayerCount() ); - - unsigned layerMask = g_TabAllCopperLayerMask[aBoard->GetCopperLayerCount() - 1]; - - for( int layer = 0; layerMask; ++layer, layerMask >>= 1 ) - { - if( layerMask & 1 ) - { - fprintf( aFile, "Layer[%d] %s %s\n", layer, - TO_UTF8( aBoard->GetLayerName( layer ) ), - LAYER::ShowType( aBoard->GetLayerType( layer ) ) ); - } - } - - // Save current default track width, for compatibility with older Pcbnew version; - fprintf( aFile, "TrackWidth %d\n", aBoard->GetCurrentTrackWidth() ); - - // Save custom tracks width list (the first is not saved here: this is the netclass value - for( unsigned ii = 1; ii < aBoard->m_TrackWidthList.size(); ii++ ) - fprintf( aFile, "TrackWidthList %d\n", aBoard->m_TrackWidthList[ii] ); - - - fprintf( aFile, "TrackClearence %d\n", netclass_default->GetClearance() ); - fprintf( aFile, "ZoneClearence %d\n", aBoard->GetZoneSettings().m_ZoneClearance ); - fprintf( aFile, "TrackMinWidth %d\n", bds.m_TrackMinWidth ); - - fprintf( aFile, "DrawSegmWidth %d\n", bds.m_DrawSegmentWidth ); - fprintf( aFile, "EdgeSegmWidth %d\n", bds.m_EdgeSegmentWidth ); - - // Save current default via size, for compatibility with older Pcbnew version; - fprintf( aFile, "ViaSize %d\n", netclass_default->GetViaDiameter() ); - fprintf( aFile, "ViaDrill %d\n", netclass_default->GetViaDrill() ); - fprintf( aFile, "ViaMinSize %d\n", bds.m_ViasMinSize ); - fprintf( aFile, "ViaMinDrill %d\n", bds.m_ViasMinDrill ); - - // Save custom vias diameters list (the first is not saved here: this is - // the netclass value - for( unsigned ii = 1; ii < aBoard->m_ViasDimensionsList.size(); ii++ ) - fprintf( aFile, "ViaSizeList %d %d\n", - aBoard->m_ViasDimensionsList[ii].m_Diameter, - aBoard->m_ViasDimensionsList[ii].m_Drill ); - - // for old versions compatibility: - fprintf( aFile, "MicroViaSize %d\n", netclass_default->GetuViaDiameter() ); - fprintf( aFile, "MicroViaDrill %d\n", netclass_default->GetuViaDrill() ); - fprintf( aFile, - "MicroViasAllowed %d\n", - bds.m_MicroViasAllowed ); - fprintf( aFile, - "MicroViaMinSize %d\n", - bds.m_MicroViasMinSize ); - fprintf( aFile, - "MicroViaMinDrill %d\n", - bds.m_MicroViasMinDrill ); - - fprintf( aFile, "TextPcbWidth %d\n", bds.m_PcbTextWidth ); - fprintf( aFile, - "TextPcbSize %d %d\n", - bds.m_PcbTextSize.x, - bds.m_PcbTextSize.y ); - - fprintf( aFile, "EdgeModWidth %d\n", bds.m_ModuleSegmentWidth ); - fprintf( aFile, "TextModSize %d %d\n", bds.m_ModuleTextSize.x, bds.m_ModuleTextSize.y ); - fprintf( aFile, "TextModWidth %d\n", bds.m_ModuleTextWidth ); - - fprintf( aFile, "PadSize %d %d\n", bds.m_Pad_Master.GetSize().x, - bds.m_Pad_Master.GetSize().y ); - - fprintf( aFile, "PadDrill %d\n", bds.m_Pad_Master.GetDrillSize().x ); - fprintf( aFile, - "Pad2MaskClearance %d\n", - bds.m_SolderMaskMargin ); - - if( bds.m_SolderPasteMargin != 0 ) - fprintf( aFile, - "Pad2PasteClearance %d\n", - bds.m_SolderPasteMargin ); - - if( bds.m_SolderPasteMarginRatio != 0 ) - fprintf( aFile, - "Pad2PasteClearanceRatio %g\n", - bds.m_SolderPasteMarginRatio ); - - if ( aFrame->GetScreen()->m_GridOrigin != wxPoint( 0, 0 ) ) - { - fprintf( aFile, - "GridOrigin %d %d\n", - aFrame->GetScreen()->m_GridOrigin.x, - aFrame->GetScreen()->m_GridOrigin.y ); - } - - fprintf( aFile, - "AuxiliaryAxisOrg %d %d\n", - aFrame->GetOriginAxisPosition().x, - aFrame->GetOriginAxisPosition().y ); - - fprintf( aFile, "VisibleElements %X\n", bds.GetVisibleElements() ); - - STRING_FORMATTER sf; - - aBoard->GetPlotOptions().Format( &sf, 0 ); - - wxString record = FROM_UTF8( sf.GetString().c_str() ); - record.Replace( wxT("\n"), wxT(""), true ); - record.Replace( wxT(" "), wxT(" "), true); - fprintf( aFile, "PcbPlotParams %s\n", TO_UTF8( record ) ); - fprintf( aFile, "$EndSETUP\n\n" ); - return 1; -} - - -#endif - - -bool PCB_EDIT_FRAME::WriteGeneralDescrPcb( FILE* File ) -{ - EDA_ITEM* PtStruct = GetBoard()->m_Modules; - int NbModules, NbDrawItem, NbLayers; - - // Write copper layer count - NbLayers = GetBoard()->GetCopperLayerCount(); - fprintf( File, "$GENERAL\n" ); - fprintf( File, "encoding utf-8\n"); - fprintf( File, "LayerCount %d\n", NbLayers ); - - // Write old format for Layer count (for compatibility with old versions of - // pcbnew - fprintf( File, - "Ly %8X\n", - g_TabAllCopperLayerMask[NbLayers - 1] | ALL_NO_CU_LAYERS ); - - fprintf( File, "EnabledLayers %08X\n", GetBoard()->GetEnabledLayers() ); - - if( GetBoard()->GetEnabledLayers() != GetBoard()->GetVisibleLayers() ) - fprintf( File, "VisibleLayers %08X\n", GetBoard()->GetVisibleLayers() ); - - fprintf( File, "Links %d\n", GetBoard()->GetRatsnestsCount() ); - fprintf( File, "NoConn %d\n", GetBoard()->m_NbNoconnect ); - - // Write board's bounding box info - EDA_RECT bbbox = GetBoard()->ComputeBoundingBox(); - fprintf( File, "Di %d %d %d %d\n", - bbbox.GetX(), - bbbox.GetY(), - bbbox.GetRight(), - bbbox.GetBottom() ); - - // Write segment count for footprints, drawings, track and zones - // Calculate the footprint count - for( NbModules = 0; PtStruct != NULL; PtStruct = PtStruct->Next() ) - NbModules++; - - PtStruct = GetBoard()->m_Drawings; NbDrawItem = 0; - - for( ; PtStruct != NULL; PtStruct = PtStruct->Next() ) - NbDrawItem++; - - fprintf( File, "Ndraw %d\n", NbDrawItem ); - fprintf( File, "Ntrack %d\n", GetBoard()->GetNumSegmTrack() ); - fprintf( File, "Nzone %d\n", GetBoard()->GetNumSegmZone() ); - fprintf( File, "BoardThickness %d\n", GetBoard()->GetDesignSettings().m_BoardThickness ); - fprintf( File, "Nmodule %d\n", NbModules ); - fprintf( File, "Nnets %d\n", GetBoard()->GetNetCount() ); - fprintf( File, "$EndGENERAL\n\n" ); - return true; -} - - -/** - * Function WriteSheetDescr - * Save the page information (size, texts, date ..) - * @param aPageSettings The page settings to write to \a aFile. - * @param aTitleBlock The title block information to write to \a aFile. - * @param aFile An open FILE to write info. - */ -static bool WriteSheetDescr( const PAGE_INFO& aPageSettings, const TITLE_BLOCK& aTitleBlock, - FILE* aFile ) -{ - fprintf( aFile, "$SHEETDESCR\n" ); - fprintf( aFile, "Sheet %s %d %d%s\n", - TO_UTF8( aPageSettings.GetType() ), - aPageSettings.GetWidthMils(), - aPageSettings.GetHeightMils(), - !aPageSettings.IsCustom() && aPageSettings.IsPortrait() ? - " portrait" : "" - ); - - fprintf( aFile, "Title %s\n", EscapedUTF8( aTitleBlock.GetTitle() ).c_str() ); - fprintf( aFile, "Date %s\n", EscapedUTF8( aTitleBlock.GetDate() ).c_str() ); - fprintf( aFile, "Rev %s\n", EscapedUTF8( aTitleBlock.GetRevision() ).c_str() ); - fprintf( aFile, "Comp %s\n", EscapedUTF8( aTitleBlock.GetCompany() ).c_str() ); - fprintf( aFile, "Comment1 %s\n", EscapedUTF8( aTitleBlock.GetComment1() ).c_str() ); - fprintf( aFile, "Comment2 %s\n", EscapedUTF8( aTitleBlock.GetComment2() ).c_str() ); - fprintf( aFile, "Comment3 %s\n", EscapedUTF8( aTitleBlock.GetComment3() ).c_str() ); - fprintf( aFile, "Comment4 %s\n", EscapedUTF8( aTitleBlock.GetComment4() ).c_str() ); - - fprintf( aFile, "$EndSHEETDESCR\n\n" ); - return true; -} - - -#if !defined( USE_NEW_PCBNEW_LOAD ) - -static bool ReadSheetDescr( BOARD* aBoard, LINE_READER* aReader ) -{ - char buf[1024]; - TITLE_BLOCK tb; - - while( aReader->ReadLine() ) - { - char* line = aReader->Line(); - - if( strnicmp( line, "$End", 4 ) == 0 ) - { - aBoard->SetTitleBlock( tb ); - return true; - } - - if( strnicmp( line, "Sheet", 4 ) == 0 ) - { - // e.g. "Sheet A3 16535 11700" - // width and height are in 1/1000th of an inch, always - - PAGE_INFO page; - char* sname = strtok( line + SZ( "Sheet" ), delims ); - - if( sname ) - { - wxString wname = FROM_UTF8( sname ); - if( !page.SetType( wname ) ) - { - /* this entire file is soon to be deleted. - m_error.Printf( _( "Unknown sheet type '%s' on line:%d" ), - wname.GetData(), m_reader->LineNumber() ); - THROW_IO_ERROR( m_error ); - */ - } - - char* width = strtok( NULL, delims ); - char* height = strtok( NULL, delims ); - char* orient = strtok( NULL, delims ); - - // only keep width and height if page size is "User" - if( wname == PAGE_INFO::Custom ) - { - if( width && height ) - { - // legacy disk file describes paper in mils - // (1/1000th of an inch) - int w = atoi( width ); - int h = atoi( height ); - - page.SetWidthMils( w ); - page.SetHeightMils( h ); - } - } - - if( orient && !strcmp( orient, "portrait" ) ) - { - page.SetPortrait( true ); - } - - aBoard->SetPageSettings( page ); - } - - continue; - } - - if( strnicmp( line, "Title", 2 ) == 0 ) - { - ReadDelimitedText( buf, line, 256 ); - tb.SetTitle( FROM_UTF8( buf ) ); - continue; - } - - if( strnicmp( line, "Date", 2 ) == 0 ) - { - ReadDelimitedText( buf, line, 256 ); - tb.SetDate( FROM_UTF8( buf ) ); - continue; - } - - if( strnicmp( line, "Rev", 2 ) == 0 ) - { - ReadDelimitedText( buf, line, 256 ); - tb.SetRevision( FROM_UTF8( buf ) ); - continue; - } - - if( strnicmp( line, "Comp", 4 ) == 0 ) - { - ReadDelimitedText( buf, line, 256 ); - tb.SetCompany( FROM_UTF8( buf ) ); - continue; - } - - if( strnicmp( line, "Comment1", 8 ) == 0 ) - { - ReadDelimitedText( buf, line, 256 ); - tb.SetComment1( FROM_UTF8( buf ) ); - continue; - } - - if( strnicmp( line, "Comment2", 8 ) == 0 ) - { - ReadDelimitedText( buf, line, 256 ); - tb.SetComment2( FROM_UTF8( buf ) ); - continue; - } - - if( strnicmp( line, "Comment3", 8 ) == 0 ) - { - ReadDelimitedText( buf, line, 256 ); - tb.SetComment3( FROM_UTF8( buf ) ); - continue; - } - - if( strnicmp( line, "Comment4", 8 ) == 0 ) - { - ReadDelimitedText( buf, line, 256 ); - tb.SetComment4( FROM_UTF8( buf ) ); - continue; - } - } - - return false; -} - - -int PCB_EDIT_FRAME::ReadPcbFile( LINE_READER* aReader, bool Append ) -{ - wxBusyCursor dummy; - - // Switch the locale to standard C (needed to read floating point numbers - // like 1.3) - SetLocaleTo_C_standard(); - - BOARD* board = GetBoard(); - - board->m_Status_Pcb = 0; - board->m_NetClasses.Clear(); - - // Put a dollar sign in front, and test for a specific length of characters - // The -1 is to omit the trailing \0 which is included in sizeof() on a - // string. -#define TESTLINE( x ) (strncmp( line, "$" x, sizeof("$" x) - 1 ) == 0) - - while( aReader->ReadLine() ) - { - char* line = aReader->Line(); - - // put the more frequent ones at the top - - if( TESTLINE( "MODULE" ) ) - { - MODULE* module = new MODULE( board ); - board->Add( module, ADD_APPEND ); - module->ReadDescr( aReader ); - continue; - } - - if( TESTLINE( "DRAWSEGMENT" ) ) - { - DRAWSEGMENT* dseg = new DRAWSEGMENT( board ); - board->Add( dseg, ADD_APPEND ); - dseg->ReadDrawSegmentDescr( aReader ); - continue; - } - - if( TESTLINE( "EQUIPOT" ) ) - { - NETINFO_ITEM* net = new NETINFO_ITEM( board ); - board->m_NetInfo.AppendNet( net ); - net->ReadDescr( aReader ); - continue; - } - - if( TESTLINE( "TEXTPCB" ) ) - { - TEXTE_PCB* pcbtxt = new TEXTE_PCB( board ); - board->Add( pcbtxt, ADD_APPEND ); - pcbtxt->ReadTextePcbDescr( aReader ); - continue; - } - - if( TESTLINE( "TRACK" ) ) - { - -#ifdef PCBNEW - TRACK* insertBeforeMe = Append ? NULL : board->m_Track.GetFirst(); - ReadListeSegmentDescr( aReader, insertBeforeMe, PCB_TRACE_T, NbTrack ); -#endif - - continue; - } - - if( TESTLINE( "NCLASS" ) ) - { - // create an empty NETCLASS without a name. - NETCLASS* netclass = new NETCLASS( board, wxEmptyString ); - - // fill it from the *.brd file, and establish its name. - netclass->ReadDescr( aReader ); - - if( !board->m_NetClasses.Add( netclass ) ) - { - // Must have been a name conflict, this is a bad board file. - // User may have done a hand edit to the file. - // Delete netclass if board could not take ownership of it. - delete netclass; - - // @todo: throw an exception here, this is a bad board file. - } - - continue; - } - - if( TESTLINE( "CZONE_OUTLINE" ) ) - { - ZONE_CONTAINER* zone_descr = new ZONE_CONTAINER( board ); - zone_descr->ReadDescr( aReader ); - if( zone_descr->GetNumCorners() > 2 ) // should always occur - board->Add( zone_descr ); - else - delete zone_descr; - continue; - } - - if( TESTLINE( "COTATION" ) ) - { - DIMENSION* dim = new DIMENSION( board ); - board->Add( dim, ADD_APPEND ); - dim->ReadDimensionDescr( aReader ); - continue; - } - - if( TESTLINE( "PCB_TARGET" ) || TESTLINE( "MIREPCB" ) ) - { - PCB_TARGET* t = new PCB_TARGET( board ); - board->Add( t, ADD_APPEND ); - t->ReadMirePcbDescr( aReader ); - continue; - } - - if( TESTLINE( "ZONE" ) ) - { -#ifdef PCBNEW - SEGZONE* insertBeforeMe = Append ? NULL : board->m_Zone.GetFirst(); - - ReadListeSegmentDescr( aReader, insertBeforeMe, PCB_ZONE_T, NbZone ); -#endif - continue; - } - - if( TESTLINE( "GENERAL" ) ) - { - ReadGeneralDescrPcb( aReader ); - continue; - } - - if( TESTLINE( "SHEETDESCR" ) ) - { - ReadSheetDescr( board, aReader ); - continue; - } - - if( TESTLINE( "SETUP" ) ) - { - if( !Append ) - { - ReadSetup( aReader ); - } - else - { - while( aReader->ReadLine() ) - { - line = aReader->Line(); - - if( TESTLINE( "EndSETUP" ) ) - break; - } - } - - continue; - } - - if( TESTLINE( "EndPCB" ) ) - break; - } - - SetLocaleTo_Default(); // revert to the current locale - - board->m_Status_Pcb = 0; - - // Build the net info list - board->BuildListOfNets(); - - board->SynchronizeNetsAndNetClasses(); - - SetStatusText( wxEmptyString ); - BestZoom(); - return 1; -} - -#endif - - -#ifdef PCBNEW - -/* Save the current PCB in ASCII format - * Returns - * 1 if OK - * 0 if error occurs saving file. - */ -int PCB_EDIT_FRAME::SavePcbFormatAscii( FILE* aFile ) -{ - bool rc; - - GetBoard()->m_Status_Pcb &= ~CONNEXION_OK; - - wxBeginBusyCursor(); - - // Switch the locale to standard C (needed to print floating point numbers - // like 1.3) - LOCALE_IO toggle; - - // Writing file header. - fprintf( aFile, "PCBNEW-BOARD Version %d date %s\n\n", LEGACY_BOARD_FILE_VERSION, - TO_UTF8( DateAndTime() ) ); - fprintf( aFile, "# Created by Pcbnew%s\n\n", TO_UTF8( GetBuildVersion() ) ); - - GetBoard()->SynchronizeNetsAndNetClasses(); - - // Select default Netclass before writing file. - // Useful to save default values in headers - GetBoard()->SetCurrentNetClass( GetBoard()->m_NetClasses.GetDefault()->GetName() ); - - WriteGeneralDescrPcb( aFile ); - WriteSheetDescr( GetBoard()->GetPageSettings(), GetBoard()->GetTitleBlock(), aFile ); - WriteSetup( aFile, this, GetBoard() ); - - rc = GetBoard()->Save( aFile ); - - wxEndBusyCursor(); - - if( !rc ) - DisplayError( this, wxT( "Unable to save PCB file" ) ); - else - SetStatusText( wxEmptyString ); - - return rc; -} - -#endif diff --git a/pcbnew/item_io.cpp.notused b/pcbnew/item_io.cpp.notused deleted file mode 100644 index d145a2e213..0000000000 --- a/pcbnew/item_io.cpp.notused +++ /dev/null @@ -1,2266 +0,0 @@ - - /** - * @file item_io.cpp - * @brief Routines for reading and saving of structures in ASCII file common to Pcbnew and CvPcb. - * This is migrationary and temporary while we move the IO_MGR. - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#ifdef CVPCB -#include -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include <3d_struct.h> -#include -#include -#include -#include - -#define MAX_WIDTH 10000 // Thickness (in 1 / 10000 ") of maximum reasonable features, text... - - -#if 1 || !defined(USE_NEW_PCBNEW_SAVE) - -bool BOARD::Save( FILE* aFile ) const -{ - bool rc = false; - BOARD_ITEM* item; - - // save the nets - for( unsigned ii = 0; ii < GetNetCount(); ii++ ) - if( !FindNet( ii )->Save( aFile ) ) - goto out; - - // Saved nets do not include netclass names, so save netclasses after nets. - m_NetClasses.Save( aFile ); - - // save the modules - for( item = m_Modules; item; item = item->Next() ) - if( !item->Save( aFile ) ) - goto out; - - for( item = m_Drawings; item; item = item->Next() ) - { - switch( item->Type() ) - { - case PCB_TEXT_T: - case PCB_LINE_T: - case PCB_TARGET_T: - case PCB_DIMENSION_T: - if( !item->Save( aFile ) ) - goto out; - - break; - - default: - - // future: throw exception here -#if defined(DEBUG) - printf( "BOARD::Save() ignoring m_Drawings type %d\n", item->Type() ); -#endif - break; - } - } - - // do not save MARKER_PCBs, they can be regenerated easily - - // save the tracks & vias - fprintf( aFile, "$TRACK\n" ); - - for( item = m_Track; item; item = item->Next() ) - { - if( !item->Save( aFile ) ) - goto out; - } - - fprintf( aFile, "$EndTRACK\n" ); - - // save the zones - fprintf( aFile, "$ZONE\n" ); - - for( item = m_Zone; item; item = item->Next() ) - { - if( !item->Save( aFile ) ) - goto out; - } - - fprintf( aFile, "$EndZONE\n" ); - - // save the zone edges - for( unsigned ii = 0; ii < m_ZoneDescriptorList.size(); ii++ ) - { - ZONE_CONTAINER* edge_zone = m_ZoneDescriptorList[ii]; - edge_zone->Save( aFile ); - } - - - if( fprintf( aFile, "$EndBOARD\n" ) != sizeof("$EndBOARD\n") - 1 ) - goto out; - - rc = true; // wrote all OK - -out: - return rc; -} - - -bool DRAWSEGMENT::Save( FILE* aFile ) const -{ - if( fprintf( aFile, "$DRAWSEGMENT\n" ) != sizeof("$DRAWSEGMENT\n") - 1 ) - return false; - - fprintf( aFile, "Po %d %d %d %d %d %d\n", - m_Shape, - m_Start.x, m_Start.y, - m_End.x, m_End.y, m_Width ); - - if( m_Type != S_CURVE ) - { - fprintf( aFile, "De %d %d %g %lX %X\n", - m_Layer, m_Type, GetAngle(), - m_TimeStamp, GetStatus() ); - } - else - { - fprintf( aFile, "De %d %d %g %lX %X %d %d %d %d\n", - m_Layer, m_Type, GetAngle(), - m_TimeStamp, GetStatus(), - m_BezierC1.x,m_BezierC1.y, - m_BezierC2.x,m_BezierC2.y); - } - - if( fprintf( aFile, "$EndDRAWSEGMENT\n" ) != sizeof("$EndDRAWSEGMENT\n") - 1 ) - return false; - - return true; -} - - -/** Note: the old name of class NETINFO_ITEM was EQUIPOT - * so in Save (and read) functions, for compatibility, we use EQUIPOT as - * keyword - */ -bool NETINFO_ITEM::Save( FILE* aFile ) const -{ - bool success = false; - - fprintf( aFile, "$EQUIPOT\n" ); - fprintf( aFile, "Na %d %s\n", GetNet(), EscapedUTF8( m_Netname ).c_str() ); - fprintf( aFile, "St %s\n", "~" ); - - if( fprintf( aFile, "$EndEQUIPOT\n" ) != sizeof("$EndEQUIPOT\n") - 1 ) - goto out; - - success = true; - -out: - return success; -} - - -bool PCB_TARGET::Save( FILE* aFile ) const -{ - bool rc = false; - - if( fprintf( aFile, "$PCB_TARGET\n" ) != sizeof("$PCB_TARGET\n")-1 ) - goto out; - - fprintf( aFile, "Po %X %d %d %d %d %d %8.8lX\n", - m_Shape, m_Layer, - m_Pos.x, m_Pos.y, - m_Size, m_Width, m_TimeStamp ); - - if( fprintf( aFile, "$EndPCB_TARGET\n" ) != sizeof("$EndPCB_TARGET\n")-1 ) - goto out; - - rc = true; - -out: - return rc; -} - - -bool ZONE_CONTAINER::Save( FILE* aFile ) const -{ - unsigned item_pos; - int ret; - unsigned corners_count = m_Poly->corner.size(); - int outline_hatch; - - fprintf( aFile, "$CZONE_OUTLINE\n" ); - - // Save the outline main info - ret = fprintf( aFile, "ZInfo %8.8lX %d %s\n", - m_TimeStamp, GetNet(), - EscapedUTF8( m_Netname ).c_str() ); - - if( ret < 3 ) - return false; - - // Save the outline layer info - ret = fprintf( aFile, "ZLayer %d\n", m_Layer ); - - if( ret < 1 ) - return false; - - // Save the outline aux info - switch( m_Poly->GetHatchStyle() ) - { - default: - case CPolyLine::NO_HATCH: - outline_hatch = 'N'; - break; - - case CPolyLine::DIAGONAL_EDGE: - outline_hatch = 'E'; - break; - - case CPolyLine::DIAGONAL_FULL: - outline_hatch = 'F'; - break; - } - - ret = fprintf( aFile, "ZAux %d %c\n", corners_count, outline_hatch ); - - if( ret < 2 ) - return false; - - if( GetPriority() > 0 ) - { - ret = fprintf( aFile, "ZPriority %d\n", GetPriority() ); - if( ret < 1 ) - return false; - } - - // Save pad option and clearance - int padConnection; - switch( m_PadConnection ) - { - default: - case PAD_IN_ZONE: - padConnection = 'I'; - break; - - case THERMAL_PAD: - padConnection = 'T'; - break; - - case PAD_NOT_IN_ZONE: - padConnection = 'X'; - break; - } - - ret = fprintf( aFile, "ZClearance %d %c\n", m_ZoneClearance, padConnection ); - - if( ret < 2 ) - return false; - - ret = fprintf( aFile, "ZMinThickness %d\n", m_ZoneMinThickness ); - - if( ret < 1 ) - return false; - - ret = fprintf( aFile, - "ZOptions %d %d %c %d %d\n", - m_FillMode, - m_ArcToSegmentsCount, - m_IsFilled ? 'S' : 'F', - m_ThermalReliefGap, - m_ThermalReliefCopperBridge ); - - if( ret < 3 ) - return false; - - ret = fprintf( aFile, - "ZSmoothing %d %d\n", - cornerSmoothingType, cornerRadius ); - - if( ret < 2 ) - return false; - - // Save the corner list - for( item_pos = 0; item_pos < corners_count; item_pos++ ) - { - ret = fprintf( aFile, "ZCorner %d %d %d\n", - m_Poly->corner[item_pos].x, m_Poly->corner[item_pos].y, - m_Poly->corner[item_pos].end_contour ); - - if( ret < 3 ) - return false; - } - - // Save the PolysList - if( m_FilledPolysList.size() ) - { - fprintf( aFile, "$POLYSCORNERS\n" ); - - for( unsigned ii = 0; ii < m_FilledPolysList.size(); ii++ ) - { - const CPolyPt* corner = &m_FilledPolysList[ii]; - ret = fprintf( aFile, - "%d %d %d %d\n", - corner->x, - corner->y, - corner->end_contour, - corner->utility ); - - if( ret < 4 ) - return false; - } - - fprintf( aFile, "$endPOLYSCORNERS\n" ); - } - - // Save the filling segments list - if( m_FillSegmList.size() ) - { - fprintf( aFile, "$FILLSEGMENTS\n" ); - - for( unsigned ii = 0; ii < m_FillSegmList.size(); ii++ ) - { - ret = fprintf( aFile, "%d %d %d %d\n", - m_FillSegmList[ii].m_Start.x, m_FillSegmList[ii].m_Start.y, - m_FillSegmList[ii].m_End.x, m_FillSegmList[ii].m_End.y ); - - if( ret < 4 ) - return false; - } - - fprintf( aFile, "$endFILLSEGMENTS\n" ); - } - - fprintf( aFile, "$endCZONE_OUTLINE\n" ); - - return true; -} - - -bool NETCLASSES::Save( FILE* aFile ) const -{ - bool result; - - // save the default first. - result = m_Default.Save( aFile ); - - if( result ) - { - // the rest will be alphabetical in the *.brd file. - for( const_iterator i = begin(); i!=end(); ++i ) - { - NETCLASS* netclass = i->second; - - result = netclass->Save( aFile ); - if( !result ) - break; - } - } - - return result; -} - - -bool NETCLASS::Save( FILE* aFile ) const -{ - bool result = true; - - fprintf( aFile, "$NCLASS\n" ); - fprintf( aFile, "Name %s\n", EscapedUTF8( m_Name ).c_str() ); - fprintf( aFile, "Desc %s\n", EscapedUTF8( GetDescription() ).c_str() ); - - // Write parameters - - fprintf( aFile, "Clearance %d\n", GetClearance() ); - fprintf( aFile, "TrackWidth %d\n", GetTrackWidth() ); - - fprintf( aFile, "ViaDia %d\n", GetViaDiameter() ); - fprintf( aFile, "ViaDrill %d\n", GetViaDrill() ); - - fprintf( aFile, "uViaDia %d\n", GetuViaDiameter() ); - fprintf( aFile, "uViaDrill %d\n", GetuViaDrill() ); - - // Write members: - for( const_iterator i = begin(); i!=end(); ++i ) - fprintf( aFile, "AddNet %s\n", EscapedUTF8( *i ).c_str() ); - - fprintf( aFile, "$EndNCLASS\n" ); - - return result; -} - - -bool TEXTE_PCB::Save( FILE* aFile ) const -{ - if( m_Text.IsEmpty() ) - return true; - - if( fprintf( aFile, "$TEXTPCB\n" ) != sizeof("$TEXTPCB\n") - 1 ) - return false; - - const char* style = m_Italic ? "Italic" : "Normal"; - - wxArrayString* list = wxStringSplit( m_Text, '\n' ); - - for( unsigned ii = 0; ii < list->Count(); ii++ ) - { - wxString txt = list->Item( ii ); - - if ( ii == 0 ) - fprintf( aFile, "Te %s\n", EscapedUTF8( txt ).c_str() ); - else - fprintf( aFile, "nl %s\n", EscapedUTF8( txt ).c_str() ); - } - - delete list; - - fprintf( aFile, "Po %d %d %d %d %d %g\n", - m_Pos.x, m_Pos.y, m_Size.x, m_Size.y, m_Thickness, GetOrientation() ); - - char hJustify = 'L'; - switch( m_HJustify ) - { - case GR_TEXT_HJUSTIFY_LEFT: - hJustify = 'L'; - break; - case GR_TEXT_HJUSTIFY_CENTER: - hJustify = 'C'; - break; - case GR_TEXT_HJUSTIFY_RIGHT: - hJustify = 'R'; - break; - default: - hJustify = 'C'; - break; - } - - fprintf( aFile, "De %d %d %lX %s %c\n", m_Layer, - m_Mirror ? 0 : 1, - m_TimeStamp, style, hJustify ); - - if( fprintf( aFile, "$EndTEXTPCB\n" ) != sizeof("$EndTEXTPCB\n") - 1 ) - return false; - - return true; -} - - -/** - * Function Save - * writes the data structures for this object out to a FILE in "*.brd" format. - * @param aFile The FILE to write to. - * @return bool - true if success writing else false. - */ -bool TEXTE_MODULE::Save( FILE* aFile ) const -{ - MODULE* parent = (MODULE*) GetParent(); - int orient = m_Orient; - - // Due to the Pcbnew history, m_Orient is saved in screen value - // but it is handled as relative to its parent footprint - if( parent ) - orient += parent->m_Orient; - - int ret = fprintf( aFile, "T%d %d %d %d %d %d %d %c %c %d %c %s\n", - m_Type, - m_Pos0.x, m_Pos0.y, - m_Size.y, m_Size.x, - orient, - m_Thickness, - m_Mirror ? 'M' : 'N', m_NoShow ? 'I' : 'V', - GetLayer(), - m_Italic ? 'I' : 'N', - EscapedUTF8( m_Text ).c_str() - ); - - return ret > 20; -} - - -bool EDGE_MODULE::Save( FILE* aFile ) const -{ - int ret = -1; - - switch( m_Shape ) - { - case S_SEGMENT: - ret = fprintf( aFile, "DS %d %d %d %d %d %d\n", - m_Start0.x, m_Start0.y, - m_End0.x, m_End0.y, - m_Width, m_Layer ); - break; - - case S_CIRCLE: - ret = fprintf( aFile, "DC %d %d %d %d %d %d\n", - m_Start0.x, m_Start0.y, - m_End0.x, m_End0.y, - m_Width, m_Layer ); - break; - - case S_ARC: - ret = fprintf( aFile, "DA %d %d %d %d %g %d %d\n", - m_Start0.x, m_Start0.y, - m_End0.x, m_End0.y, - GetAngle(), - m_Width, m_Layer ); - break; - - case S_POLYGON: - ret = fprintf( aFile, "DP %d %d %d %d %d %d %d\n", - m_Start0.x, m_Start0.y, - m_End0.x, m_End0.y, - (int) m_PolyPoints.size(), - m_Width, m_Layer ); - - for( unsigned i = 0; i 5; -} - - -bool TRACK::Save( FILE* aFile ) const -{ - int type = 0; - - if( Type() == PCB_VIA_T ) - type = 1; - - fprintf( aFile, "Po %d %d %d %d %d %d %d\n", m_Shape, - m_Start.x, m_Start.y, m_End.x, m_End.y, m_Width, m_Drill ); - - fprintf( aFile, "De %d %d %d %lX %X\n", - m_Layer, type, GetNet(), - m_TimeStamp, GetStatus() ); - - return true; -} - - -bool DIMENSION::Save( FILE* aFile ) const -{ - bool rc = false; - - // note: COTATION was the previous name of DIMENSION - // this old keyword is used here for compatibility - const char keyWordLine[] = "$COTATION\n"; - const char keyWordLineEnd[] = "$endCOTATION\n"; - - if( fputs( keyWordLine, aFile ) == EOF ) - goto out; - - fprintf( aFile, "Ge %d %d %lX\n", m_Shape, m_Layer, m_TimeStamp ); - - fprintf( aFile, "Va %d\n", m_Value ); - - if( !m_Text.GetText().IsEmpty() ) - fprintf( aFile, "Te %s\n", EscapedUTF8( m_Text.GetText() ).c_str() ); - else - fprintf( aFile, "Te \"?\"\n" ); - - fprintf( aFile, "Po %d %d %d %d %d %g %d\n", - m_Text.m_Pos.x, m_Text.m_Pos.y, - m_Text.m_Size.x, m_Text.m_Size.y, - m_Text.GetThickness(), m_Text.GetOrientation(), - m_Text.m_Mirror ? 0 : 1 ); - - fprintf( aFile, "Sb %d %d %d %d %d %d\n", S_SEGMENT, - m_crossBarOx, m_crossBarOy, - m_crossBarFx, m_crossBarFy, m_Width ); - - fprintf( aFile, "Sd %d %d %d %d %d %d\n", S_SEGMENT, - m_featureLineDOx, m_featureLineDOy, - m_featureLineDFx, m_featureLineDFy, m_Width ); - - fprintf( aFile, "Sg %d %d %d %d %d %d\n", S_SEGMENT, - m_featureLineGOx, m_featureLineGOy, - m_featureLineGFx, m_featureLineGFy, m_Width ); - - fprintf( aFile, "S1 %d %d %d %d %d %d\n", S_SEGMENT, - m_arrowD1Ox, m_arrowD1Oy, - m_arrowD1Fx, m_arrowD1Fy, m_Width ); - - fprintf( aFile, "S2 %d %d %d %d %d %d\n", S_SEGMENT, - m_arrowD2Ox, m_arrowD2Oy, - m_arrowD2Fx, m_arrowD2Fy, m_Width ); - - - fprintf( aFile, "S3 %d %d %d %d %d %d\n", S_SEGMENT, - m_arrowG1Ox, m_arrowG1Oy, - m_arrowG1Fx, m_arrowG1Fy, m_Width ); - - fprintf( aFile, "S4 %d %d %d %d %d %d\n", S_SEGMENT, - m_arrowG2Ox, m_arrowG2Oy, - m_arrowG2Fx, m_arrowG2Fy, m_Width ); - - if( fputs( keyWordLineEnd, aFile ) == EOF ) - goto out; - - rc = true; - -out: - return rc; -} - - -bool D_PAD::Save( FILE* aFile ) const -{ - int cshape; - const char* texttype; - - // check the return values for first and last fprints() in this function - if( fprintf( aFile, "$PAD\n" ) != sizeof("$PAD\n") - 1 ) - return false; - - switch( m_PadShape ) - { - case PAD_CIRCLE: - cshape = 'C'; break; - - case PAD_RECT: - cshape = 'R'; break; - - case PAD_OVAL: - cshape = 'O'; break; - - case PAD_TRAPEZOID: - cshape = 'T'; break; - - default: - cshape = 'C'; - DisplayError( NULL, _( "Unknown pad shape" ) ); - break; - } - - fprintf( aFile, "Sh \"%.4s\" %c %d %d %d %d %g\n", - m_Padname, cshape, m_Size.x, m_Size.y, - m_DeltaSize.x, m_DeltaSize.y, m_Orient ); - - fprintf( aFile, "Dr %d %d %d", m_Drill.x, m_Offset.x, m_Offset.y ); - - if( m_DrillShape == PAD_OVAL ) - { - fprintf( aFile, " %c %d %d", 'O', m_Drill.x, m_Drill.y ); - } - - fprintf( aFile, "\n" ); - - switch( GetAttribute() ) - { - case PAD_STANDARD: - texttype = "STD"; break; - - case PAD_SMD: - texttype = "SMD"; break; - - case PAD_CONN: - texttype = "CONN"; break; - - case PAD_HOLE_NOT_PLATED: - texttype = "HOLE"; break; - - default: - texttype = "STD"; - DisplayError( NULL, wxT( "Invalid Pad attribute" ) ); - break; - } - - fprintf( aFile, "At %s N %8.8X\n", texttype, m_layerMask ); - - fprintf( aFile, "Ne %d %s\n", GetNet(), EscapedUTF8( m_Netname ).c_str() ); - - fprintf( aFile, "Po %d %d\n", m_Pos0.x, m_Pos0.y ); - - if( GetDieLength() != 0 ) - fprintf( aFile, "Le %d\n", GetDieLength() ); - - if( GetLocalSolderMaskMargin() != 0 ) - fprintf( aFile, ".SolderMask %d\n", GetLocalSolderMaskMargin() ); - - if( GetLocalSolderPasteMargin() != 0 ) - fprintf( aFile, ".SolderPaste %d\n", GetLocalSolderPasteMargin() ); - - if( GetLocalSolderPasteMarginRatio() != 0 ) - fprintf( aFile, ".SolderPasteRatio %g\n", GetLocalSolderPasteMarginRatio() ); - - if( GetLocalClearance() != 0 ) - fprintf( aFile, ".LocalClearance %d\n", GetLocalClearance() ); - - if( m_ZoneConnection != UNDEFINED_CONNECTION ) - fprintf( aFile, ".ZoneConnection %d\n", m_ZoneConnection ); - - if( m_ThermalWidth != 0 ) - fprintf( aFile, ".ThermalWidth %d\n", m_ThermalWidth ); - - if( m_ThermalGap != 0 ) - fprintf( aFile, ".ThermalGap %d\n", m_ThermalGap ); - - if( fprintf( aFile, "$EndPAD\n" ) != sizeof("$EndPAD\n") - 1 ) - return false; - - return true; -} - - -bool MODULE::Save( FILE* aFile ) const -{ - char statusTxt[8]; - BOARD_ITEM* item; - - bool rc = false; - - fprintf( aFile, "$MODULE %s\n", TO_UTF8( m_LibRef ) ); - - memset( statusTxt, 0, sizeof(statusTxt) ); - if( IsLocked() ) - statusTxt[0] = 'F'; - else - statusTxt[0] = '~'; - - if( m_ModuleStatus & MODULE_is_PLACED ) - statusTxt[1] = 'P'; - else - statusTxt[1] = '~'; - - fprintf( aFile, "Po %d %d %g %d %8.8lX %8.8lX %s\n", - m_Pos.x, m_Pos.y, - GetOrientation(), m_Layer, m_LastEdit_Time, - m_TimeStamp, statusTxt ); - - fprintf( aFile, "Li %s\n", TO_UTF8( m_LibRef ) ); - - if( !m_Doc.IsEmpty() ) - { - fprintf( aFile, "Cd %s\n", TO_UTF8( m_Doc ) ); - } - - if( !m_KeyWord.IsEmpty() ) - { - fprintf( aFile, "Kw %s\n", TO_UTF8( m_KeyWord ) ); - } - - fprintf( aFile, "Sc %8.8lX\n", m_TimeStamp ); - fprintf( aFile, "AR %s\n", TO_UTF8( m_Path ) ); - fprintf( aFile, "Op %X %X 0\n", m_CntRot90, m_CntRot180 ); - - if( GetLocalSolderMaskMargin() != 0 ) - fprintf( aFile, ".SolderMask %d\n", GetLocalSolderMaskMargin() ); - - if( m_LocalSolderPasteMargin != 0 ) - fprintf( aFile, ".SolderPaste %d\n", GetLocalSolderPasteMargin() ); - - if( GetLocalSolderPasteMarginRatio() != 0 ) - fprintf( aFile, ".SolderPasteRatio %g\n", GetLocalSolderPasteMarginRatio() ); - - if( m_LocalClearance != 0 ) - fprintf( aFile, ".LocalClearance %d\n", GetLocalClearance() ); - - if( m_ZoneConnection != UNDEFINED_CONNECTION ) - fprintf( aFile, ".ZoneConnection %d\n", m_ZoneConnection ); - - if( m_ThermalWidth != 0 ) - fprintf( aFile, ".ThermalWidth %d\n", m_ThermalWidth ); - - if( m_ThermalGap != 0 ) - fprintf( aFile, ".ThermalGap %d\n", m_ThermalGap ); - - // attributes - if( m_Attributs != MOD_DEFAULT ) - { - fprintf( aFile, "At " ); - - if( m_Attributs & MOD_CMS ) - fprintf( aFile, "SMD " ); - - if( m_Attributs & MOD_VIRTUAL ) - fprintf( aFile, "VIRTUAL " ); - - fprintf( aFile, "\n" ); - } - - // save reference - if( !m_Reference->Save( aFile ) ) - goto out; - - // save value - if( !m_Value->Save( aFile ) ) - goto out; - - // save drawing elements - for( item = m_Drawings; item; item = item->Next() ) - { - switch( item->Type() ) - { - case PCB_MODULE_TEXT_T: - case PCB_MODULE_EDGE_T: - if( !item->Save( aFile ) ) - goto out; - - break; - - default: -#if defined(DEBUG) - printf( "MODULE::Save() ignoring type %d\n", item->Type() ); -#endif - break; - } - } - - // save the pads - for( item = m_Pads; item; item = item->Next() ) - if( !item->Save( aFile ) ) - goto out; - - Write_3D_Descr( aFile ); - - fprintf( aFile, "$EndMODULE %s\n", TO_UTF8( m_LibRef ) ); - - rc = true; -out: - return rc; -} - -/* Save the description of 3D MODULE - */ -int MODULE::Write_3D_Descr( FILE* File ) const -{ - char buf[512]; - - for( S3D_MASTER* t3D = m_3D_Drawings; t3D; t3D = t3D->Next() ) - { - if( !t3D->m_Shape3DName.IsEmpty() ) - { - fprintf( File, "$SHAPE3D\n" ); - - fprintf( File, "Na %s\n", EscapedUTF8( t3D->m_Shape3DName ).c_str() ); - - sprintf( buf, "Sc %lf %lf %lf\n", - t3D->m_MatScale.x, - t3D->m_MatScale.y, - t3D->m_MatScale.z ); - fprintf( File, "%s", to_point( buf ) ); - - sprintf( buf, "Of %lf %lf %lf\n", - t3D->m_MatPosition.x, - t3D->m_MatPosition.y, - t3D->m_MatPosition.z ); - fprintf( File, "%s", to_point( buf ) ); - - sprintf( buf, "Ro %lf %lf %lf\n", - t3D->m_MatRotation.x, - t3D->m_MatRotation.y, - t3D->m_MatRotation.z ); - fprintf( File, "%s", to_point( buf ) ); - - fprintf( File, "$EndSHAPE3D\n" ); - } - } - - return 0; -} - -#endif // USE_NEW_PCBNEW_SAVE - - -#if 1 || !defined(USE_NEW_PCBNEW_LOAD) - -/* Read pad from file. - * The 1st line of descr ($PAD) is assumed to be already read - * Syntax: - * $PAD - * Sh "N1" C 550 550 0 0 1800 - * Dr 310 0 0 - * At STD N 00C0FFFF - * Do 3 "netname" - * Po 6000 -6000 - * $EndPAD - */ -int D_PAD::ReadDescr( LINE_READER* aReader ) -{ - char* Line; - char BufLine[1024], BufCar[256]; - char* PtLine; - int nn, ll, dx, dy; - - while( aReader->ReadLine() ) - { - Line = aReader->Line(); - - if( Line[0] == '$' ) - return 0; - - PtLine = Line + 3; - - /* Decode the first code and read the corresponding data - */ - switch( Line[0] ) - { - case 'S': // = Sh - // Read pad name - nn = 0; - - while( (*PtLine != '"') && *PtLine ) - PtLine++; - - if( *PtLine ) - PtLine++; - - memset( m_Padname, 0, sizeof(m_Padname) ); - - while( (*PtLine != '"') && *PtLine ) - { - if( nn < (int) sizeof(m_Padname) ) - { - if( *PtLine > ' ' ) - { - m_Padname[nn] = *PtLine; nn++; - } - } - PtLine++; - } - - if( *PtLine == '"' ) - PtLine++; - - nn = sscanf( PtLine, " %s %d %d %d %d %lf", - BufCar, &m_Size.x, &m_Size.y, - &m_DeltaSize.x, &m_DeltaSize.y, - &m_Orient ); - - ll = 0xFF & BufCar[0]; - - // Read pad shape - PAD_SHAPE_T shape; - - switch( ll ) - { - default: - case 'C': shape = PAD_CIRCLE; break; - case 'R': shape = PAD_RECT; break; - case 'O': shape = PAD_OVAL; break; - case 'T': shape = PAD_TRAPEZOID; break; - } - - SetShape( shape ); // sets m_boundingRadius = -1 - break; - - case 'D': - BufCar[0] = 0; - nn = sscanf( PtLine, "%d %d %d %s %d %d", &m_Drill.x, - &m_Offset.x, &m_Offset.y, BufCar, &dx, &dy ); - m_Drill.y = m_Drill.x; - m_DrillShape = PAD_CIRCLE; - - if( nn >= 6 ) // Drill shape = OVAL ? - { - if( BufCar[0] == 'O' ) - { - m_Drill.x = dx; - m_Drill.y = dy; - - m_DrillShape = PAD_OVAL; - } - } - - break; - - case 'A': - nn = sscanf( PtLine, "%s %s %X", BufLine, BufCar, - &m_layerMask ); - - // BufCar is not used now update attributes - SetAttribute( PAD_STANDARD ); - if( strncmp( BufLine, "SMD", 3 ) == 0 ) - SetAttribute( PAD_SMD ); - - if( strncmp( BufLine, "CONN", 4 ) == 0 ) - SetAttribute( PAD_CONN ); - - if( strncmp( BufLine, "HOLE", 4 ) == 0 ) - SetAttribute( PAD_HOLE_NOT_PLATED ); - - break; - - case 'N': // Read Netname - int netcode; - nn = sscanf( PtLine, "%d", &netcode ); - SetNet( netcode ); - - // read Netname - ReadDelimitedText( BufLine, PtLine, sizeof(BufLine) ); - SetNetname( FROM_UTF8( StrPurge( BufLine ) ) ); - break; - - case 'P': - nn = sscanf( PtLine, "%d %d", &m_Pos0.x, &m_Pos0.y ); - m_Pos = m_Pos0; - break; - - case 'L': - int lengthdie; - nn = sscanf( PtLine, "%d", &lengthdie ); - SetDieLength( lengthdie ); - break; - - case '.': // Read specific data - if( strnicmp( Line, ".SolderMask ", 12 ) == 0 ) - SetLocalSolderMaskMargin( atoi( Line + 12 ) ); - else if( strnicmp( Line, ".SolderPaste ", 13 ) == 0 ) - SetLocalSolderPasteMargin( atoi( Line + 13 ) ); - else if( strnicmp( Line, ".SolderPasteRatio ", 18 ) == 0 ) - SetLocalSolderPasteMarginRatio( atoi( Line + 18 ) ); - else if( strnicmp( Line, ".LocalClearance ", 16 ) == 0 ) - SetLocalClearance( atoi( Line + 16 ) ); - else if( strnicmp( Line, ".ZoneConnection ", 16 ) == 0 ) - m_ZoneConnection = (ZoneConnection)atoi( Line + 16 ); - else if( strnicmp( Line, ".ThermalWidth ", 14 ) == 0 ) - m_ThermalWidth = atoi( Line + 14 ); - else if( strnicmp( Line, ".ThermalGap ", 12 ) == 0 ) - m_ThermalGap = atoi( Line + 12 ); - break; - - default: - DisplayError( NULL, wxT( "Err Pad: Id inconnu" ) ); - return 1; - } - } - - return 2; // error : EOF -} - - -/* Read 3D module from file. (Ascii) - * The 1st line of descr ($MODULE) is assumed to be already read - * Returns 0 if OK - */ -int MODULE::Read_3D_Descr( LINE_READER* aReader ) -{ - char* Line = aReader->Line(); - char* text = Line + 3; - - S3D_MASTER* t3D = m_3D_Drawings; - - if( !t3D->m_Shape3DName.IsEmpty() ) - { - S3D_MASTER* n3D = new S3D_MASTER( this ); - - m_3D_Drawings.PushBack( n3D ); - - t3D = n3D; - } - - while( aReader->ReadLine() ) - { - Line = aReader->Line(); - - switch( Line[0] ) - { - case '$': - if( Line[1] == 'E' ) - return 0; - - return 1; - - case 'N': // Shape File Name - { - char buf[512]; - ReadDelimitedText( buf, text, 512 ); - t3D->m_Shape3DName = FROM_UTF8( buf ); - break; - } - - case 'S': // Scale - sscanf( text, "%lf %lf %lf\n", - &t3D->m_MatScale.x, - &t3D->m_MatScale.y, - &t3D->m_MatScale.z ); - break; - - case 'O': // Offset - sscanf( text, "%lf %lf %lf\n", - &t3D->m_MatPosition.x, - &t3D->m_MatPosition.y, - &t3D->m_MatPosition.z ); - break; - - case 'R': // Rotation - sscanf( text, "%lf %lf %lf\n", - &t3D->m_MatRotation.x, - &t3D->m_MatRotation.y, - &t3D->m_MatRotation.z ); - break; - - default: - break; - } - } - - return 1; -} - - -/* Read a MODULE description - * The first description line ($MODULE) is already read - * @return 0 if no error - */ -int MODULE::ReadDescr( LINE_READER* aReader ) -{ - char* Line; - char BufLine[256], BufCar1[128], * PtLine; - int itmp1, itmp2; - - while( aReader->ReadLine() ) - { - Line = aReader->Line(); - if( Line[0] == '$' ) - { - if( Line[1] == 'E' ) - break; - - if( Line[1] == 'P' ) - { - D_PAD* pad = new D_PAD( this ); - - pad->ReadDescr( aReader ); - - wxPoint padpos = pad->GetPosition(); - - RotatePoint( &padpos, m_Orient ); - - pad->SetPosition( padpos + m_Pos ); - - m_Pads.PushBack( pad ); - continue; - } - - if( Line[1] == 'S' ) - Read_3D_Descr( aReader ); - } - - if( strlen( Line ) < 4 ) - continue; - - PtLine = Line + 3; - - /* Decode the first code of the current line and read the - * corresponding data - */ - switch( Line[0] ) - { - case 'P': - double orientation; - memset( BufCar1, 0, sizeof(BufCar1) ); - sscanf( PtLine, "%d %d %lf %d %lX %lX %s", - &m_Pos.x, &m_Pos.y, - &orientation, &m_Layer, - &m_LastEdit_Time, &m_TimeStamp, BufCar1 ); - - SetOrientation( orientation ); - - m_ModuleStatus = 0; - - if( BufCar1[0] == 'F' ) - SetLocked( true ); - - if( BufCar1[1] == 'P' ) - m_ModuleStatus |= MODULE_is_PLACED; - - break; - - case 'L': // Li = read the library name of the footprint - *BufLine = 0; - sscanf( PtLine, " %s", BufLine ); - m_LibRef = FROM_UTF8( BufLine ); - break; - - case 'S': - sscanf( PtLine, " %lX", &m_TimeStamp ); - break; - - - case 'O': // (Op)tions for auto placement - itmp1 = itmp2 = 0; - sscanf( PtLine, " %X %X", &itmp1, &itmp2 ); - - m_CntRot180 = itmp2 & 0x0F; - - if( m_CntRot180 > 10 ) - m_CntRot180 = 10; - - m_CntRot90 = itmp1 & 0x0F; - - if( m_CntRot90 > 10 ) - m_CntRot90 = 0; - - itmp1 = (itmp1 >> 4) & 0x0F; - - if( itmp1 > 10 ) - itmp1 = 0; - - m_CntRot90 |= itmp1 << 4; - break; - - case 'A': - if( Line[1] == 't' ) - { - // At = (At)tributes of module - if( strstr( PtLine, "SMD" ) ) - m_Attributs |= MOD_CMS; - - if( strstr( PtLine, "VIRTUAL" ) ) - m_Attributs |= MOD_VIRTUAL; - } - - if( Line[1] == 'R' ) - { - // alternate reference, e.g. /478C2408/478AD1B6 - sscanf( PtLine, " %s", BufLine ); - m_Path = FROM_UTF8( BufLine ); - } - - break; - - case 'T': /* Read a footprint text description (ref, value, or - * drawing */ - TEXTE_MODULE * textm; - sscanf( Line + 1, "%d", &itmp1 ); - - if( itmp1 == TEXT_is_REFERENCE ) - textm = m_Reference; - else if( itmp1 == TEXT_is_VALUE ) - textm = m_Value; - else // text is a drawing - { - textm = new TEXTE_MODULE( this ); - m_Drawings.PushBack( textm ); - } - textm->ReadDescr( aReader ); - break; - - case 'D': // read a drawing item - EDGE_MODULE * edge; - edge = new EDGE_MODULE( this ); - m_Drawings.PushBack( edge ); - edge->ReadDescr( aReader ); - edge->SetDrawCoord(); - break; - - case 'C': // read documentation data - m_Doc = FROM_UTF8( StrPurge( PtLine ) ); - break; - - case 'K': // Read key words - m_KeyWord = FROM_UTF8( StrPurge( PtLine ) ); - break; - - case '.': // Read specific data - if( strnicmp( Line, ".SolderMask ", 12 ) == 0 ) - SetLocalSolderMaskMargin( atoi( Line + 12 ) ); - else if( strnicmp( Line, ".SolderPaste ", 13 ) == 0 ) - SetLocalSolderPasteMargin( atoi( Line + 13 ) ); - else if( strnicmp( Line, ".SolderPasteRatio ", 18 ) == 0 ) - SetLocalSolderPasteMarginRatio( atof( Line + 18 ) ); - else if( strnicmp( Line, ".LocalClearance ", 16 ) == 0 ) - SetLocalClearance( atoi( Line + 16 ) ); - else if( strnicmp( Line, ".ZoneConnection ", 16 ) == 0 ) - m_ZoneConnection = (ZoneConnection)atoi( Line + 16 ); - else if( strnicmp( Line, ".ThermalWidth ", 14 ) == 0 ) - m_ThermalWidth = atoi( Line + 14 ); - else if( strnicmp( Line, ".ThermalGap ", 12 ) == 0 ) - m_ThermalGap = atoi( Line + 12 ); - break; - - default: - break; - } - } - - // Recalculate the bounding box - CalculateBoundingBox(); - return 0; -} - - -/* Read a description line like: - * DS 2600 0 2600 -600 120 21 - * this description line is in Line - * EDGE_MODULE type can be: - * - Circle, - * - Segment (line) - * - Arc - * - Polygon - * - */ -int EDGE_MODULE::ReadDescr( LINE_READER* aReader ) -{ - int ii; - int error = 0; - char* Buf; - char* Line; - - Line = aReader->Line(); - - switch( Line[1] ) - { - case 'S': - m_Shape = S_SEGMENT; - break; - - case 'C': - m_Shape = S_CIRCLE; - break; - - case 'A': - m_Shape = S_ARC; - break; - - case 'P': - m_Shape = S_POLYGON; - break; - - default: - wxString msg; - msg.Printf( wxT( "Unknown EDGE_MODULE type <%s>" ), Line ); - DisplayError( NULL, msg ); - error = 1; - break; - } - - switch( m_Shape ) - { - case S_ARC: - double angle; - sscanf( Line + 3, "%d %d %d %d %lf %d %d", - &m_Start0.x, &m_Start0.y, - &m_End0.x, &m_End0.y, - &angle, &m_Width, &m_Layer ); - - NORMALIZE_ANGLE_360( angle ); - SetAngle( angle ); - break; - - case S_SEGMENT: - case S_CIRCLE: - sscanf( Line + 3, "%d %d %d %d %d %d", - &m_Start0.x, &m_Start0.y, - &m_End0.x, &m_End0.y, - &m_Width, &m_Layer ); - break; - - case S_POLYGON: - int pointCount; - sscanf( Line + 3, "%d %d %d %d %d %d %d", - &m_Start0.x, &m_Start0.y, - &m_End0.x, &m_End0.y, - &pointCount, &m_Width, &m_Layer ); - - m_PolyPoints.clear(); - m_PolyPoints.reserve( pointCount ); - - for( ii = 0; iiReadLine() ) - { - Buf = aReader->Line(); - - if( strncmp( Buf, "Dl", 2 ) != 0 ) - { - error = 1; - break; - } - - int x; - int y; - sscanf( Buf + 3, "%d %d\n", &x, &y ); - - m_PolyPoints.push_back( wxPoint( x, y ) ); - } - else - { - error = 1; - break; - } - } - - break; - - default: - sscanf( Line + 3, "%d %d %d %d %d %d", - &m_Start0.x, &m_Start0.y, - &m_End0.x, &m_End0.y, - &m_Width, &m_Layer ); - break; - } - - // Check for a reasonable width: - if( m_Width <= 1 ) - m_Width = 1; - - if( m_Width > MAX_WIDTH ) - m_Width = MAX_WIDTH; - - // Check for a reasonable layer: - // m_Layer must be >= FIRST_NON_COPPER_LAYER, but because microwave footprints - // can use the copper layers m_Layer < FIRST_NON_COPPER_LAYER is allowed. - // @todo: changes use of EDGE_MODULE these footprints and allows only - // m_Layer >= FIRST_NON_COPPER_LAYER - if( (m_Layer < 0) || (m_Layer > LAST_NON_COPPER_LAYER) ) - m_Layer = SILKSCREEN_N_FRONT; - - return error; -} - - -bool DIMENSION::ReadDimensionDescr( LINE_READER* aReader ) -{ - char* Line; - char Text[2048]; - - while( aReader->ReadLine() ) - { - Line = aReader->Line(); - - if( strnicmp( Line, "$EndDIMENSION", 4 ) == 0 ) - return true; - - if( Line[0] == 'V' ) - { - sscanf( Line + 2, " %d", &m_Value ); - continue; - } - - if( Line[0] == 'G' ) - { - int layer; - - sscanf( Line + 2, " %d %d %lX", &m_Shape, &layer, &m_TimeStamp ); - - if( layer < FIRST_NO_COPPER_LAYER ) - layer = FIRST_NO_COPPER_LAYER; - - if( layer > LAST_NO_COPPER_LAYER ) - layer = LAST_NO_COPPER_LAYER; - - SetLayer( layer ); - m_Text.SetLayer( layer ); - continue; - } - - if( Line[0] == 'T' ) - { - ReadDelimitedText( Text, Line + 2, sizeof(Text) ); - m_Text.m_Text = FROM_UTF8( Text ); - continue; - } - - if( Line[0] == 'P' ) - { - int normal_display = 1; - int orientation; - int thickness; - sscanf( Line + 2, " %d %d %d %d %d %d %d", - &m_Text.m_Pos.x, &m_Text.m_Pos.y, - &m_Text.m_Size.x, &m_Text.m_Size.y, - &thickness, &orientation, - &normal_display ); - - m_Text.m_Mirror = normal_display ? false : true; - m_Pos = m_Text.m_Pos; - m_Text.SetOrientation( orientation ); - m_Text.SetThickness( thickness ); - continue; - } - - if( Line[0] == 'S' ) - { - switch( Line[1] ) - { - int Dummy; - - case 'b': - sscanf( Line + 2, " %d %d %d %d %d %d", - &Dummy, - &m_crossBarOx, &m_crossBarOy, - &m_crossBarFx, &m_crossBarFy, - &m_Width ); - break; - - case 'd': - sscanf( Line + 2, " %d %d %d %d %d %d", - &Dummy, - &m_featureLineDOx, &m_featureLineDOy, - &m_featureLineDFx, &m_featureLineDFy, - &Dummy ); - break; - - case 'g': - sscanf( Line + 2, " %d %d %d %d %d %d", - &Dummy, - &m_featureLineGOx, &m_featureLineGOy, - &m_featureLineGFx, &m_featureLineGFy, - &Dummy ); - break; - - case '1': - sscanf( Line + 2, " %d %d %d %d %d %d", - &Dummy, - &m_arrowD1Ox, &m_arrowD1Oy, - &m_arrowD1Fx, &m_arrowD1Fy, - &Dummy ); - break; - - case '2': - sscanf( Line + 2, " %d %d %d %d %d %d", - &Dummy, - &m_arrowD2Ox, &m_arrowD2Oy, - &m_arrowD2Fx, &m_arrowD2Fy, - &Dummy ); - break; - - case '3': - sscanf( Line + 2, " %d %d %d %d %d %d\n", - &Dummy, - &m_arrowG1Ox, &m_arrowG1Oy, - &m_arrowG1Fx, &m_arrowG1Fy, - &Dummy ); - break; - - case '4': - sscanf( Line + 2, " %d %d %d %d %d %d", - &Dummy, - &m_arrowG2Ox, &m_arrowG2Oy, - &m_arrowG2Fx, &m_arrowG2Fy, - &Dummy ); - break; - } - - continue; - } - } - - return false; -} - - -bool DRAWSEGMENT::ReadDrawSegmentDescr( LINE_READER* aReader ) -{ - char* Line; - - while( aReader->ReadLine() ) - { - Line = aReader->Line(); - - if( strnicmp( Line, "$End", 4 ) == 0 ) - return true; // End of description - - if( Line[0] == 'P' ) - { - sscanf( Line + 2, " %d %d %d %d %d %d", - &m_Shape, &m_Start.x, &m_Start.y, - &m_End.x, &m_End.y, &m_Width ); - - if( m_Width < 0 ) - m_Width = 0; - } - - if( Line[0] == 'D' ) - { - int status; - char* token = 0; - - token = strtok( Line," " ); - - for( int i = 0; (token = strtok( NULL," " )) != NULL; i++ ) - { - switch( i ) - { - case 0: - sscanf( token,"%d",&m_Layer ); - break; - case 1: - sscanf( token,"%d",&m_Type ); - break; - case 2: - double angle; - sscanf( token, "%lf", &angle ); - SetAngle( angle ); - break; - case 3: - sscanf( token,"%lX",&m_TimeStamp ); - break; - case 4: - sscanf( token,"%X",&status ); - break; - // Bezier Control Points - case 5: - sscanf( token,"%d",&m_BezierC1.x ); - break; - case 6: - sscanf( token,"%d",&m_BezierC1.y ); - break; - case 7: - sscanf( token,"%d",&m_BezierC2.x ); - break; - case 8: - sscanf( token,"%d",&m_BezierC2.y ); - break; - default: - break; - } - } - - if( m_Layer < FIRST_NO_COPPER_LAYER ) - m_Layer = FIRST_NO_COPPER_LAYER; - - if( m_Layer > LAST_NO_COPPER_LAYER ) - m_Layer = LAST_NO_COPPER_LAYER; - - SetState( status, ON ); - } - } - - return false; -} - - -/* Read NETINFO_ITEM from file. - * Returns 0 if OK - * 1 if incomplete reading - */ -int NETINFO_ITEM::ReadDescr( LINE_READER* aReader ) -{ - char* Line; - char Ltmp[1024]; - int tmp; - - while( aReader->ReadLine() ) - { - Line = aReader->Line(); - if( strnicmp( Line, "$End", 4 ) == 0 ) - return 0; - - if( strncmp( Line, "Na", 2 ) == 0 ) - { - sscanf( Line + 2, " %d", &tmp ); - SetNet( tmp ); - - ReadDelimitedText( Ltmp, Line + 2, sizeof(Ltmp) ); - m_Netname = FROM_UTF8( Ltmp ); - continue; - } - } - - return 1; -} - - -/* Read the description from the PCB file. - */ -bool PCB_TARGET::ReadMirePcbDescr( LINE_READER* aReader ) -{ - char* Line; - - while( aReader->ReadLine() ) - { - Line = aReader->Line(); - - if( strnicmp( Line, "$End", 4 ) == 0 ) - return true; - - if( Line[0] == 'P' ) - { - sscanf( Line + 2, " %X %d %d %d %d %d %lX", - &m_Shape, &m_Layer, - &m_Pos.x, &m_Pos.y, - &m_Size, &m_Width, &m_TimeStamp ); - - if( m_Layer < FIRST_NO_COPPER_LAYER ) - m_Layer = FIRST_NO_COPPER_LAYER; - - if( m_Layer > LAST_NO_COPPER_LAYER ) - m_Layer = LAST_NO_COPPER_LAYER; - } - } - - return false; -} - - -int ZONE_CONTAINER::ReadDescr( LINE_READER* aReader ) -{ - char* Line, * text; - char netname_buffer[1024]; - int ret; - int outline_hatch = CPolyLine::NO_HATCH; - bool error = false, has_corner = false; - - netname_buffer[0] = 0; - - while( aReader->ReadLine() ) - { - Line = aReader->Line(); - - if( strnicmp( Line, "ZCorner", 7 ) == 0 ) // new corner found - { - int x; - int y; - int flag; - - text = Line + 7; - ret = sscanf( text, "%d %d %d", &x, &y, &flag ); - - if( ret < 3 ) - { - error = true; - } - else - { - if( !has_corner ) - m_Poly->Start( m_Layer, x, y, outline_hatch ); - else - AppendCorner( wxPoint( x, y ) ); - - has_corner = true; - - if( flag ) - m_Poly->Close(); - } - } - else if( strnicmp( Line, "ZInfo", 5 ) == 0 ) // general info found - { - int ts; - int netcode; - - text = Line + 5; - ret = sscanf( text, "%X %d %s", &ts, &netcode, netname_buffer ); - - if( ret < 3 ) - { - error = true; - } - else - { - SetTimeStamp( ts ); - SetNet( netcode ); - ReadDelimitedText( netname_buffer, netname_buffer, 1024 ); - m_Netname = FROM_UTF8( netname_buffer ); - } - } - else if( strnicmp( Line, "ZLayer", 6 ) == 0 ) // layer found - { - int x; - - text = Line + 6; - ret = sscanf( text, "%d", &x ); - - if( ret < 1 ) - error = true; - else - m_Layer = x; - } - else if( strnicmp( Line, "ZAux", 4 ) == 0 ) // aux info found - { - int x; - char hopt[10]; - - text = Line + 4; - ret = sscanf( text, "%d %c", &x, hopt ); - - if( ret < 2 ) - { - error = true; - } - else - { - switch( hopt[0] ) - { - case 'n': - case 'N': - outline_hatch = CPolyLine::NO_HATCH; - break; - - case 'e': - case 'E': - outline_hatch = CPolyLine::DIAGONAL_EDGE; - break; - - case 'f': - case 'F': - outline_hatch = CPolyLine::DIAGONAL_FULL; - break; - } - } - // Set hatch mode later, after reading outlines corners data - } - - else if( strnicmp( Line, "ZPriority", 9 ) == 0 ) - { - int tmp = 0; - text = Line + 9; - ret = sscanf( text, "%d", &tmp ); - if( ret < 1 ) - return false; - SetPriority( tmp ); - } - - else if( strnicmp( Line, "ZSmoothing", 10 ) == 0 ) - { - int tempSmoothingType; - int tempCornerRadius; - text = Line + 10; - ret = sscanf( text, "%d %d", &tempSmoothingType, &tempCornerRadius ); - - if( ret < 2 ) - return false; - - if( tempSmoothingType >= ZONE_SETTINGS::SMOOTHING_LAST ) - return false; - - if( tempSmoothingType < 0 ) - return false; - - cornerSmoothingType = tempSmoothingType; - SetCornerRadius( tempCornerRadius ); - } - else if( strnicmp( Line, "ZOptions", 8 ) == 0 ) // Options info found - { - int fillmode = 1; - int arcsegmentcount = ARC_APPROX_SEGMENTS_COUNT_LOW_DEF; - char fillstate = 'F'; - text = Line + 8; - ret = sscanf( text, "%d %d %c %d %d", &fillmode, &arcsegmentcount, &fillstate, - &m_ThermalReliefGap, &m_ThermalReliefCopperBridge ); - - if( ret < 1 ) // Must find 1 or more args. - return false; - else - m_FillMode = fillmode ? 1 : 0; - - if( arcsegmentcount >= ARC_APPROX_SEGMENTS_COUNT_HIGHT_DEF ) - m_ArcToSegmentsCount = ARC_APPROX_SEGMENTS_COUNT_HIGHT_DEF; - - m_IsFilled = (fillstate == 'S') ? true : false; - } - else if( strnicmp( Line, "ZClearance", 10 ) == 0 ) // Clearance and pad options info found - { - int clearance = 200; - char padConnection; - text = Line + 10; - ret = sscanf( text, "%d %1c", &clearance, &padConnection ); - - if( ret < 2 ) - { - error = true; - } - else - { - m_ZoneClearance = clearance; - - switch( padConnection ) - { - case 'i': - case 'I': - m_PadConnection = PAD_IN_ZONE; - break; - - case 't': - case 'T': - m_PadConnection = THERMAL_PAD; - break; - - case 'x': - case 'X': - m_PadConnection = PAD_NOT_IN_ZONE; - break; - } - } - } - else if( strnicmp( Line, "ZMinThickness", 13 ) == 0 ) // Min Thickness info found - { - int thickness; - text = Line + 13; - ret = sscanf( text, "%d", &thickness ); - - if( ret < 1 ) - error = true; - else - m_ZoneMinThickness = thickness; - } - else if( strnicmp( Line, "$POLYSCORNERS", 13 ) == 0 ) // Read the PolysList (polygons used for fill areas in the zone) - { - while( aReader->ReadLine() ) - { - Line = aReader->Line(); - - if( strnicmp( Line, "$endPOLYSCORNERS", 4 ) == 0 ) - break; - - CPolyPt corner; - int end_contour, utility; - utility = 0; - ret = sscanf( Line, - "%d %d %d %d", - &corner.x, - &corner.y, - &end_contour, - &utility ); - if( ret < 4 ) - return false; - - corner.end_contour = end_contour ? true : false; - corner.utility = utility; - m_FilledPolysList.push_back( corner ); - } - } - else if( strnicmp( Line, "$FILLSEGMENTS", 13 ) == 0 ) - { - SEGMENT segm; - while( aReader->ReadLine() ) - { - Line = aReader->Line(); - - if( strnicmp( Line, "$endFILLSEGMENTS", 4 ) == 0 ) - break; - - ret = sscanf( Line, - "%d %d %d %d", - &segm.m_Start.x, - &segm.m_Start.y, - &segm.m_End.x, - &segm.m_End.y ); - if( ret < 4 ) - return false; - - m_FillSegmList.push_back( segm ); - } - } - else if( strnicmp( Line, "$end", 4 ) == 0 ) // end of description - { - break; - } - } - - if( !IsOnCopperLayer() ) - { - m_FillMode = 0; - SetNet( 0 ); - } - - // Set hatch here, when outlines corners are read - m_Poly->SetHatch( outline_hatch, Mils2iu( m_Poly->GetDefaultHatchPitchMils() ) ); - - return error ? 0 : 1; -} - - -bool NETCLASS::ReadDescr( LINE_READER* aReader ) -{ - bool result = false; - char* line; - char buf[1024]; - wxString netname; - - while( aReader->ReadLine() ) - { - line = aReader->Line(); - if( strnicmp( line, "AddNet", 6 ) == 0 ) - { - ReadDelimitedText( buf, line + 6, sizeof(buf) ); - netname = FROM_UTF8( buf ); - Add( netname ); - continue; - } - - if( strnicmp( line, "$endNCLASS", sizeof( "$endNCLASS" ) - 1 ) == 0 ) - { - result = true; - break; - } - - if( strnicmp( line, "Clearance", 9 ) == 0 ) - { - SetClearance( atoi( line + 9 ) ); - continue; - } - if( strnicmp( line, "TrackWidth", 10 ) == 0 ) - { - SetTrackWidth( atoi( line + 10 ) ); - continue; - } - if( strnicmp( line, "ViaDia", 6 ) == 0 ) - { - SetViaDiameter( atoi( line + 6 ) ); - continue; - } - if( strnicmp( line, "ViaDrill", 8 ) == 0 ) - { - SetViaDrill( atoi( line + 8 ) ); - continue; - } - - if( strnicmp( line, "uViaDia", 7 ) == 0 ) - { - SetuViaDiameter( atoi( line + 7 ) ); - continue; - } - if( strnicmp( line, "uViaDrill", 9 ) == 0 ) - { - SetuViaDrill( atoi( line + 9 ) ); - continue; - } - - if( strnicmp( line, "Name", 4 ) == 0 ) - { - ReadDelimitedText( buf, line + 4, sizeof(buf) ); - m_Name = FROM_UTF8( buf ); - continue; - } - if( strnicmp( line, "Desc", 4 ) == 0 ) - { - ReadDelimitedText( buf, line + 4, sizeof(buf) ); - SetDescription( FROM_UTF8( buf ) ); - continue; - } - } - - return result; -} - - - -/** - * Function ReadTextePcbDescr - * Read a text description from pcb file. - * - * For a single line text: - * - * $TEXTPCB - * Te "Text example" - * Po 66750 53450 600 800 150 0 - * From 24 1 0 Italic - * $EndTEXTPCB - * - * For a multi line text - * - * $TEXTPCB - * Te "Text example" - * Nl "Line 2" - * Po 66750 53450 600 800 150 0 - * From 24 1 0 Italic - * $EndTEXTPCB - * Nl "line nn" is a line added to the current text - */ -int TEXTE_PCB::ReadTextePcbDescr( LINE_READER* aReader ) -{ - char* line; - char text[1024]; - char style[256]; - - while( aReader->ReadLine() ) - { - line = aReader->Line(); - if( strnicmp( line, "$EndTEXTPCB", 11 ) == 0 ) - return 0; - if( strncmp( line, "Te", 2 ) == 0 ) // Text line (first line for multi line texts - { - ReadDelimitedText( text, line + 2, sizeof(text) ); - m_Text = FROM_UTF8( text ); - continue; - } - if( strncmp( line, "nl", 2 ) == 0 ) // next line of the current text - { - ReadDelimitedText( text, line + 2, sizeof(text) ); - m_Text.Append( '\n' ); - m_Text += FROM_UTF8( text ); - continue; - } - if( strncmp( line, "Po", 2 ) == 0 ) - { - double angle; - sscanf( line + 2, " %d %d %d %d %d %lf", - &m_Pos.x, &m_Pos.y, &m_Size.x, &m_Size.y, - &m_Thickness, &angle ); - - SetOrientation( angle ); - - // Ensure the text has minimal size to see this text on screen: - if( m_Size.x < 5 ) - m_Size.x = 5; - if( m_Size.y < 5 ) - m_Size.y = 5; - continue; - } - if( strncmp( line, "De", 2 ) == 0 ) - { - style[0] = 0; - int normal_display = 1; - char hJustify = 'c'; - sscanf( line + 2, " %d %d %lX %s %c\n", &m_Layer, &normal_display, - &m_TimeStamp, style, &hJustify ); - - m_Mirror = normal_display ? false : true; - - if( m_Layer < FIRST_COPPER_LAYER ) - m_Layer = FIRST_COPPER_LAYER; - if( m_Layer > LAST_NO_COPPER_LAYER ) - m_Layer = LAST_NO_COPPER_LAYER; - - if( strnicmp( style, "Italic", 6 ) == 0 ) - m_Italic = 1; - else - m_Italic = 0; - - switch( hJustify ) - { - case 'l': - case 'L': - m_HJustify = GR_TEXT_HJUSTIFY_LEFT; - break; - case 'c': - case 'C': - m_HJustify = GR_TEXT_HJUSTIFY_CENTER; - break; - case 'r': - case 'R': - m_HJustify = GR_TEXT_HJUSTIFY_RIGHT; - break; - default: - m_HJustify = GR_TEXT_HJUSTIFY_CENTER; - break; - } - continue; - } - } - - // Set a reasonable width: - if( m_Thickness < 1 ) - m_Thickness = 1; - m_Thickness = Clamp_Text_PenSize( m_Thickness, m_Size ); - - return 1; -} - -/** - * Function ReadDescr - * Read description from a given line in "*.brd" format. - * @param aReader The line reader object which contains the first line of description. - * @return int - > 0 if success reading else 0. - */ -int TEXTE_MODULE::ReadDescr( LINE_READER* aReader ) -{ - int success = true; - int type; - char BufCar1[128], BufCar2[128], BufCar3[128]; - char* line = aReader->Line(); - double angle; - - int layer = SILKSCREEN_N_FRONT; - - BufCar1[0] = 0; - BufCar2[0] = 0; - BufCar3[0] = 0; - - if( sscanf( line + 1, "%d %d %d %d %d %lf %d %s %s %d %s", - &type, - &m_Pos0.x, &m_Pos0.y, - &m_Size.y, &m_Size.x, - &angle, &m_Thickness, - BufCar1, BufCar2, &layer, BufCar3 ) >= 10 ) - { - success = true; - - SetOrientation( angle ); - } - - - if( (type != TEXT_is_REFERENCE) && (type != TEXT_is_VALUE) ) - type = TEXT_is_DIVERS; - - m_Type = type; - - // Due to the Pcbnew history, .m_Orient is saved in screen value - // but it is handled as relative to its parent footprint - m_Orient -= ( (MODULE*) m_Parent )->m_Orient; - - if( BufCar1[0] == 'M' ) - m_Mirror = true; - else - m_Mirror = false; - - if( BufCar2[0] == 'I' ) - m_NoShow = true; - else - m_NoShow = false; - - if( BufCar3[0] == 'I' ) - m_Italic = true; - else - m_Italic = false; - - // Test for a reasonable layer: - if( layer < 0 ) - layer = 0; - if( layer > LAST_NO_COPPER_LAYER ) - layer = LAST_NO_COPPER_LAYER; - if( layer == LAYER_N_BACK ) - layer = SILKSCREEN_N_BACK; - else if( layer == LAYER_N_FRONT ) - layer = SILKSCREEN_N_FRONT; - - SetLayer( layer ); - - // Calculate the actual position. - SetDrawCoord(); - - - // Search and read the "text" string (a quoted text). - ReadDelimitedText( &m_Text, line ); - - // Test for a reasonable size: - if( m_Size.x < TEXTS_MIN_SIZE ) - m_Size.x = TEXTS_MIN_SIZE; - if( m_Size.y < TEXTS_MIN_SIZE ) - m_Size.y = TEXTS_MIN_SIZE; - - // Set a reasonable width: - if( m_Thickness < 1 ) - m_Thickness = 1; - m_Thickness = Clamp_Text_PenSize( m_Thickness, m_Size ); - - return success; -} - -#endif // USE_NEW_PCBNEW_LOAD diff --git a/pcbnew/librairi.cpp b/pcbnew/librairi.cpp index 1b65c89b97..d8e47c0e46 100644 --- a/pcbnew/librairi.cpp +++ b/pcbnew/librairi.cpp @@ -199,7 +199,7 @@ MODULE* FOOTPRINT_EDIT_FRAME::Import_Module() return NULL; } } - catch( IO_ERROR ioe ) + catch( const IO_ERROR& ioe ) { DisplayError( this, ioe.errorText ); return NULL; @@ -222,7 +222,7 @@ MODULE* FOOTPRINT_EDIT_FRAME::Import_Module() return NULL; } } - catch( IO_ERROR ioe ) + catch( const IO_ERROR& ioe ) { DisplayError( this, ioe.errorText ); return NULL; @@ -259,7 +259,7 @@ MODULE* FOOTPRINT_EDIT_FRAME::Import_Module() return NULL; } } - catch( IO_ERROR ioe ) + catch( const IO_ERROR& ioe ) { DisplayError( this, ioe.errorText ); return NULL; @@ -334,7 +334,7 @@ void FOOTPRINT_EDIT_FRAME::Export_Module( MODULE* aModule ) fprintf( fp, "%s", pcb_io.GetStringOutput( false ).c_str() ); fclose( fp ); } - catch( IO_ERROR ioe ) + catch( const IO_ERROR& ioe ) { DisplayError( this, ioe.errorText ); return; @@ -357,7 +357,7 @@ bool FOOTPRINT_EDIT_FRAME::SaveCurrentModule( const wxString* aLibPath ) pi->FootprintSave( libPath, GetBoard()->m_Modules ); } - catch( IO_ERROR ioe ) + catch( const IO_ERROR& ioe ) { DisplayError( this, ioe.errorText ); return false; @@ -429,7 +429,7 @@ wxString FOOTPRINT_EDIT_FRAME::CreateNewLibrary() writable = pi->IsFootprintLibWritable( libPath ); exists = true; // no exception was thrown, lib must exist. } - catch( IO_ERROR ) + catch( const IO_ERROR& ) { // ignore, original values of 'writable' and 'exists' are accurate. } @@ -455,7 +455,7 @@ wxString FOOTPRINT_EDIT_FRAME::CreateNewLibrary() pi->FootprintLibCreate( libPath ); } - catch( IO_ERROR ioe ) + catch( const IO_ERROR& ioe ) { DisplayError( this, ioe.errorText ); return wxEmptyString; @@ -499,7 +499,7 @@ bool FOOTPRINT_EDIT_FRAME::DeleteModuleFromCurrentLibrary() { FootprintLibs()->FootprintDelete( nickname, fpname ); } - catch( IO_ERROR ioe ) + catch( const IO_ERROR& ioe ) { DisplayError( this, ioe.errorText ); return false; @@ -568,7 +568,7 @@ void PCB_EDIT_FRAME::ArchiveModulesOnBoard( bool aNewModulesOnly ) } } } - catch( IO_ERROR ioe ) + catch( const IO_ERROR& ioe ) { DisplayError( this, ioe.errorText ); } @@ -655,7 +655,7 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibrary, // own if the library or footprint is not writable. FootprintLibs()->FootprintSave( aLibrary, aModule ); } - catch( IO_ERROR ioe ) + catch( const IO_ERROR& ioe ) { DisplayError( this, ioe.errorText ); return false; diff --git a/pcbnew/loadcmp.cpp b/pcbnew/loadcmp.cpp index 990198953a..2db1223087 100644 --- a/pcbnew/loadcmp.cpp +++ b/pcbnew/loadcmp.cpp @@ -220,7 +220,7 @@ MODULE* PCB_BASE_FRAME::LoadModuleFromLibrary( const wxString& aLibrary, { module = loadFootprint( fpid ); } - catch( IO_ERROR ioe ) + catch( const IO_ERROR& ioe ) { wxLogDebug( wxT( "An error occurred attemping to load footprint '%s'.\n\nError: %s" ), fpid.Format().c_str(), GetChars( ioe.errorText ) ); @@ -252,7 +252,7 @@ MODULE* PCB_BASE_FRAME::LoadModuleFromLibrary( const wxString& aLibrary, { module = loadFootprint( fpid ); } - catch( IO_ERROR ioe ) + catch( const IO_ERROR& ioe ) { wxLogDebug( wxT( "An error occurred attemping to load footprint '%s'.\n\nError: %s" ), fpid.Format().c_str(), GetChars( ioe.errorText ) ); @@ -304,7 +304,7 @@ MODULE* PCB_BASE_FRAME::LoadFootprint( const FPID& aFootprintId ) { module = loadFootprint( aFootprintId ); } - catch( IO_ERROR ioe ) + catch( const IO_ERROR& ioe ) { wxLogDebug( wxT( "An error occurred attemping to load footprint '%s'.\n\nError: %s" ), aFootprintId.Format().c_str(), GetChars( ioe.errorText ) ); @@ -321,31 +321,7 @@ MODULE* PCB_BASE_FRAME::loadFootprint( const FPID& aFootprintId ) wxCHECK_MSG( fptbl, NULL, wxT( "Cannot look up FPID in NULL FP_LIB_TABLE." ) ); - wxString nickname = aFootprintId.GetLibNickname(); - wxString fpname = aFootprintId.GetFootprintName(); - - if( nickname.size() ) - { - return fptbl->FootprintLoad( nickname, fpname ); - } - - // user did not enter a nickname, just a footprint name, help him out a little: - else - { - std::vector nicks = fptbl->GetLogicalLibs(); - - // Search each library going through libraries alphabetically. - for( unsigned i = 0; iFootprintLoad( nicks[i], fpname ); - if( ret ) - return ret; - } - - return NULL; - } + return fptbl->FootprintLoadWithOptionalNickname( aFootprintId ); } @@ -557,7 +533,7 @@ void FOOTPRINT_EDIT_FRAME::OnSaveLibraryAs( wxCommandEvent& aEvent ) // m is deleted here by auto_ptr. } } - catch( IO_ERROR ioe ) + catch( const IO_ERROR& ioe ) { DisplayError( this, ioe.errorText ); return; diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index 4d11d4c7d1..fa28eca5b4 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -279,7 +279,7 @@ wxString FOOTPRINT_EDIT_FRAME::getLibPath() return row->GetFullURI( true ); } - catch( IO_ERROR ioe ) + catch( const IO_ERROR& ioe ) { return wxEmptyString; } @@ -639,7 +639,7 @@ void FOOTPRINT_EDIT_FRAME::updateTitle() if( !writable ) title += _( " [Read Only]" ); } - catch( IO_ERROR ioe ) + catch( const IO_ERROR& ioe ) { // user may be bewildered as to why after selecting a library it is not showing up // in the title, we could show an error message, but that should have been done at time diff --git a/pcbnew/netlist.cpp b/pcbnew/netlist.cpp index 258bea0c8f..8bf18cab7b 100644 --- a/pcbnew/netlist.cpp +++ b/pcbnew/netlist.cpp @@ -82,7 +82,7 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName, netlistReader->LoadNetlist(); loadFootprints( netlist, aReporter ); } - catch( IO_ERROR& ioe ) + catch( const IO_ERROR& ioe ) { msg.Printf( _( "Error loading netlist.\n%s" ), ioe.errorText.GetData() ); wxMessageBox( msg, _( "Netlist Load Error" ), wxOK | wxICON_ERROR ); diff --git a/pcbnew/specctra_export.cpp b/pcbnew/specctra_export.cpp index c9a85591d6..40aa2eeb97 100644 --- a/pcbnew/specctra_export.cpp +++ b/pcbnew/specctra_export.cpp @@ -162,7 +162,7 @@ bool PCB_EDIT_FRAME::ExportSpecctraFile( const wxString& aFullFilename ) // if an exception is thrown by FromBOARD or ExportPCB(), then // ~SPECCTRA_DB() will close the file. } - catch( IO_ERROR& ioe ) + catch( const IO_ERROR& ioe ) { ok = false; @@ -1322,7 +1322,7 @@ bool SPECCTRA_DB::GetBoardPolygonOutlines( BOARD* aBoard, aHoles.CloseLastContour(); } } - catch( IO_ERROR ioe ) + catch( const IO_ERROR& ioe ) { // Creates a valid polygon outline is not possible. // So uses the board edge cuts bounding box to create a diff --git a/pcbnew/specctra_import.cpp b/pcbnew/specctra_import.cpp index 06d9a61843..417d433bb3 100644 --- a/pcbnew/specctra_import.cpp +++ b/pcbnew/specctra_import.cpp @@ -102,14 +102,15 @@ void PCB_EDIT_FRAME::ImportSpecctraSession( wxCommandEvent& event ) db.LoadSESSION( fullFileName ); db.FromSESSION( GetBoard() ); } - catch( IO_ERROR& ioe ) + catch( const IO_ERROR& ioe ) { - ioe.errorText += '\n'; - ioe.errorText += _("BOARD may be corrupted, do not save it."); - ioe.errorText += '\n'; - ioe.errorText += _("Fix problem and try again."); + wxString msg = ioe.errorText; + msg += '\n'; + msg += _("BOARD may be corrupted, do not save it."); + msg += '\n'; + msg += _("Fix problem and try again."); - DisplayError( this, ioe.errorText ); + DisplayError( this, msg ); return; } diff --git a/pcbnew/specctra_test.cpp b/pcbnew/specctra_test.cpp index c0b95f7d72..ab11895393 100644 --- a/pcbnew/specctra_test.cpp +++ b/pcbnew/specctra_test.cpp @@ -63,7 +63,7 @@ int main( int argc, char** argv ) // db.LoadPCB( filename ); db.LoadSESSION( filename ); } - catch( IO_ERROR ioe ) + catch( const IO_ERROR& ioe ) { fprintf( stderr, "%s\n", TO_UTF8(ioe.errorText) ); failed = true; diff --git a/tools/property_tree.cpp b/tools/property_tree.cpp index ea1bb77175..dfe898b898 100644 --- a/tools/property_tree.cpp +++ b/tools/property_tree.cpp @@ -83,7 +83,7 @@ int main( int argc, char** argv ) #endif } - catch( IO_ERROR ioe ) + catch( const IO_ERROR& ioe ) { fprintf( stderr, "%s\n", TO_UTF8( ioe.errorText ) ); } From e6fd3934d10b0e9e8c0124dd0fb50c99e8538183 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Apr 2014 16:57:22 +0200 Subject: [PATCH 281/741] Fixed ratsnest update after removing items. --- pcbnew/tools/edit_tool.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 5be7f25396..8dac46385c 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -395,10 +395,7 @@ int EDIT_TOOL::Remove( TOOL_EVENT& aEvent ) remove( item ); } - // Rebuild list of pads and nets if necessary - BOARD* board = getModel( PCB_T ); - if( !( board->m_Status_Pcb & NET_CODES_OK ) ) - board->BuildListOfNets(); + getModel( PCB_T )->GetRatsnest()->Recalculate(); setTransitions(); From 371b2f7c0e56ad89d575e9d3ca58081fa9bf7389 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Apr 2014 17:01:22 +0200 Subject: [PATCH 282/741] Fixed vias layer order. --- pcbnew/basepcbframe.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 0e4299eaef..3abbba0aff 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -87,7 +87,7 @@ const LAYER_NUM PCB_BASE_FRAME::GAL_LAYER_ORDER[] = ITEM_GAL_LAYER( RATSNEST_VISIBLE ), ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), - ITEM_GAL_LAYER( VIAS_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), + ITEM_GAL_LAYER( VIA_THROUGH_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), NETNAMES_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_FR_VISIBLE ), SOLDERMASK_N_FRONT, NETNAMES_GAL_LAYER( LAYER_16_NETNAMES_VISIBLE ), LAYER_N_FRONT, From 50b202fe99b4b6cb144a534c305e56f467157620 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Apr 2014 17:05:05 +0200 Subject: [PATCH 283/741] Hot keys specific to a tool have priority over global hot keys (TOOL_ACTION scope: AS_GLOBAL/AS_CONTEXT is finally handled properly). --- common/tool/action_manager.cpp | 76 +++++++++++++++++++++++++-------- common/tool/tool_manager.cpp | 19 +++++++++ include/tool/action_manager.h | 11 ++--- include/tool/tool_action.h | 15 +++++++ include/tool/tool_manager.h | 10 +++++ pcbnew/router/router_tool.cpp | 10 ++--- pcbnew/tools/common_actions.cpp | 5 ++- 7 files changed, 114 insertions(+), 32 deletions(-) diff --git a/common/tool/action_manager.cpp b/common/tool/action_manager.cpp index bc1a8be368..24ee6ca818 100644 --- a/common/tool/action_manager.cpp +++ b/common/tool/action_manager.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include ACTION_MANAGER::ACTION_MANAGER( TOOL_MANAGER* aToolManager ) : @@ -43,7 +44,12 @@ ACTION_MANAGER::~ACTION_MANAGER() void ACTION_MANAGER::RegisterAction( TOOL_ACTION* aAction ) { - assert( aAction->GetId() == -1 ); // Check if the TOOL_ACTION was not registered before + // Check if the TOOL_ACTION was not registered before + assert( aAction->GetId() == -1 ); + // TOOL_ACTIONs are supposed to be named [appName.]toolName.actionName (with dots between) + // action name without specifying at least toolName is not valid + assert( aAction->GetName().find( '.', 0 ) != std::string::npos ); + assert( m_actionNameIndex.find( aAction->m_name ) == m_actionNameIndex.end() ); assert( m_actionIdIndex.find( aAction->m_id ) == m_actionIdIndex.end() ); @@ -53,13 +59,7 @@ void ACTION_MANAGER::RegisterAction( TOOL_ACTION* aAction ) m_actionIdIndex[aAction->m_id] = aAction; if( aAction->HasHotKey() ) - { - // Duplication of hot keys leads to unexpected behaviour - // The right way to change a hotkey is to use ACTION_MANAGER::ClearHotKey() first - assert( m_actionHotKeys.find( aAction->m_currentHotKey ) == m_actionHotKeys.end() ); - - m_actionHotKeys[aAction->m_currentHotKey] = aAction; - } + m_actionHotKeys[aAction->m_currentHotKey].push_back( aAction ); } @@ -72,7 +72,15 @@ void ACTION_MANAGER::UnregisterAction( TOOL_ACTION* aAction ) aAction->setId( -1 ); if( aAction->HasHotKey() ) - m_actionHotKeys.erase( aAction->m_currentHotKey ); + { + std::list& actions = m_actionHotKeys[aAction->m_currentHotKey]; + std::list::iterator action = std::find( actions.begin(), actions.end(), aAction ); + + if( action != actions.end() ) + actions.erase( action ); + else + assert( false ); + } } @@ -107,18 +115,52 @@ void ACTION_MANAGER::RunAction( const TOOL_ACTION* aAction ) const bool ACTION_MANAGER::RunHotKey( int aHotKey ) const { - std::map::const_iterator it = m_actionHotKeys.find( aHotKey ); + HOTKEY_LIST::const_iterator it = m_actionHotKeys.find( aHotKey ); if( it == m_actionHotKeys.end() ) return false; // no appropriate action found for the hotkey - RunAction( it->second ); + const std::list& actions = it->second; + + // Choose the action that has the highest priority on the active tools stack + // If there is none, run the global action associated with the hot key + int highestPriority = -1, priority = -1; + const TOOL_ACTION* context = NULL; // pointer to context action of the highest priority tool + const TOOL_ACTION* global = NULL; // pointer to global action, if there is no context action + + BOOST_FOREACH( const TOOL_ACTION* action, actions ) + { + if( action->GetScope() == AS_GLOBAL ) + { + // Store the global action for the hot key in case there was no possible + // context actions to run + assert( global == NULL ); // there should be only one global action per hot key + global = action; + + continue; + } + + TOOL_BASE* tool = m_toolMgr->FindTool( action->GetToolName() ); + + if( tool ) + { + priority = m_toolMgr->GetPriority( tool->GetId() ); + + if( priority >= 0 && priority > highestPriority ) + { + highestPriority = priority; + context = action; + } + } + } + + if( !global && !context ) // currently there is no valid action to run + return false; + + if( context ) + RunAction( context ); + else if( global ) + RunAction( global ); return true; } - - -void ACTION_MANAGER::ClearHotKey( int aHotKey ) -{ - m_actionHotKeys.erase( aHotKey ); -} diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index eff64f267d..8c05ca5282 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -301,6 +301,25 @@ void TOOL_MANAGER::ResetTools( TOOL_BASE::RESET_REASON aReason ) } +int TOOL_MANAGER::GetPriority( int aToolId ) const +{ + int priority = 0; + + for( std::deque::const_iterator it = m_activeTools.begin(), + itEnd = m_activeTools.end(); it != itEnd; ++it ) + { + std::cout << FindTool( *it )->GetName() << std::endl; + + if( *it == aToolId ) + return priority; + + ++priority; + } + + return -1; +} + + void TOOL_MANAGER::ScheduleNextState( TOOL_BASE* aTool, TOOL_STATE_FUNC& aHandler, const TOOL_EVENT_LIST& aConditions ) { diff --git a/include/tool/action_manager.h b/include/tool/action_manager.h index b38b329abc..626f795eff 100644 --- a/include/tool/action_manager.h +++ b/include/tool/action_manager.h @@ -25,6 +25,7 @@ #ifndef ACTION_MANAGER_H_ #define ACTION_MANAGER_H_ +#include #include #include @@ -97,13 +98,6 @@ public: */ bool RunHotKey( int aHotKey ) const; - /** - * Function ClearHotKey() - * Removes an action associated with a hotkey. - * @param aHotKey is the hotkey to be cleared. - */ - void ClearHotKey( int aHotKey ); - private: ///> Tool manager needed to run actions TOOL_MANAGER* m_toolMgr; @@ -115,7 +109,8 @@ private: std::map m_actionNameIndex; ///> Map for indexing actions by their hotkeys - std::map m_actionHotKeys; + typedef std::map > HOTKEY_LIST; + HOTKEY_LIST m_actionHotKeys; }; #endif /* ACTION_MANAGER_H_ */ diff --git a/include/tool/tool_action.h b/include/tool/tool_action.h index 4d91ea982f..8fb81e5d8d 100644 --- a/include/tool/tool_action.h +++ b/include/tool/tool_action.h @@ -171,6 +171,21 @@ public: m_menuDescription = aDescription; } + TOOL_ACTION_SCOPE GetScope() const + { + return m_scope; + } + + /** + * Returns name of the tool associated with the action. It is basically the action name + * stripped of the last part (e.g. for "pcbnew.InteractiveDrawing.drawCircle" it is + * "pcbnew.InteractiveDrawing"). + */ + std::string GetToolName() const + { + return m_name.substr( 0, m_name.rfind( '.' ) ); + } + private: friend class ACTION_MANAGER; diff --git a/include/tool/tool_manager.h b/include/tool/tool_manager.h index 7689a9a3c8..1e4563a7e0 100644 --- a/include/tool/tool_manager.h +++ b/include/tool/tool_manager.h @@ -206,6 +206,16 @@ public: return FindTool( GetCurrentToolId() ); } + /** + * Returns priority of a given tool. Higher number means that the tool is closer to the + * beginning of the active tools queue (i.e. receives events earlier, tools with lower + * priority receive events later). + * @param aToolId is the id of queried tool. + * @return The priority of a given tool. If returned number is negative, then it means that + * the tool id is invalid or the tool is not active. + */ + int GetPriority( int aToolId ) const; + /** * Defines a state transition - the events that cause a given handler method in the tool * to be called. Called by TOOL_INTERACTIVE::Go(). May be called from a coroutine context. diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index a2e98f71de..dd24327678 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -45,11 +45,11 @@ using namespace KIGFX; using boost::optional; -static TOOL_ACTION ACT_AutoEndRoute( "AutoEndRoute", AS_CONTEXT, 'G' ); -static TOOL_ACTION ACT_PlaceVia( "PlaceVia", AS_CONTEXT, 'V' ); -static TOOL_ACTION ACT_OpenRouteOptions( "OpenRouterOptions", AS_CONTEXT, 'Y' ); -static TOOL_ACTION ACT_SwitchPosture( "SwitchPosture", AS_CONTEXT, '/' ); -static TOOL_ACTION ACT_EndTrack( "EndTrack", AS_CONTEXT, WXK_END ); +static TOOL_ACTION ACT_AutoEndRoute( "pcbnew.InteractiveRouter.AutoEndRoute", AS_CONTEXT, 'G' ); +static TOOL_ACTION ACT_PlaceVia( "pcbnew.InteractiveRouter.PlaceVia", AS_CONTEXT, 'V' ); +static TOOL_ACTION ACT_OpenRouteOptions( "pcbnew.InteractiveRouter.OpenRouterOptions", AS_CONTEXT, 'T' ); +static TOOL_ACTION ACT_SwitchPosture( "pcbnew.InteractiveRouter.SwitchPosture", AS_CONTEXT, '/' ); +static TOOL_ACTION ACT_EndTrack( "pcbnew.InteractiveRouter.EndTrack", AS_CONTEXT, WXK_END ); ROUTER_TOOL::ROUTER_TOOL() : TOOL_INTERACTIVE( "pcbnew.InteractiveRouter" ) diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 63f4f91712..90a235e9ac 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -43,11 +43,11 @@ TOOL_ACTION COMMON_ACTIONS::editActivate( "pcbnew.InteractiveEdit", "Move", "Moves the selected item(s)" ); TOOL_ACTION COMMON_ACTIONS::rotate( "pcbnew.rotate", - AS_CONTEXT, 'R', + AS_GLOBAL, 'R', "Rotate", "Rotates selected item(s)" ); TOOL_ACTION COMMON_ACTIONS::flip( "pcbnew.flip", - AS_CONTEXT, 'F', + AS_GLOBAL, 'F', "Flip", "Flips selected item(s)" ); TOOL_ACTION COMMON_ACTIONS::remove( "pcbnew.InteractiveEdit.remove", @@ -58,6 +58,7 @@ TOOL_ACTION COMMON_ACTIONS::properties( "pcbnew.InteractiveEdit.properties", AS_GLOBAL, 'E', "Properties...", "Displays properties window" ); + // Drawing tool actions TOOL_ACTION COMMON_ACTIONS::drawLine( "pcbnew.InteractiveDrawing.line", AS_GLOBAL, 0, From 3f8d9da31fb2c598c59a0851447abd1bc0a3d450 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Apr 2014 17:33:22 +0200 Subject: [PATCH 284/741] Key events are handled by wxEVT_CHAR instead of wxEVT_KEY_[UP|DOWN]. Fixed issue of chars that require modifiers (e.g. ? is Shift+/ on US keyboard layout). --- common/draw_panel_gal.cpp | 3 +-- common/tool/action_manager.cpp | 16 +++++++++++++-- common/tool/tool_dispatcher.cpp | 21 ++++++++++--------- common/tool/tool_event.cpp | 3 +-- common/tool/tool_manager.cpp | 2 +- include/tool/tool_event.h | 36 ++++++++++++++------------------- pcbnew/router/router_tool.cpp | 14 ++++++------- pcbnew/tools/common_actions.cpp | 10 ++++----- pcbnew/tools/drawing_tool.cpp | 8 ++++---- 9 files changed, 60 insertions(+), 53 deletions(-) diff --git a/common/draw_panel_gal.cpp b/common/draw_panel_gal.cpp index a8c1dc0f67..0ec6a1130b 100644 --- a/common/draw_panel_gal.cpp +++ b/common/draw_panel_gal.cpp @@ -83,8 +83,7 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin Connect( wxEVT_MIDDLE_DCLICK, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); Connect( wxEVT_MOUSEWHEEL, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); Connect( wxEVT_CHAR_HOOK, wxEventHandler( EDA_DRAW_PANEL_GAL::skipEvent ) ); - Connect( wxEVT_KEY_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_KEY_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_CHAR, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); Connect( wxEVT_ENTER_WINDOW, wxEventHandler( EDA_DRAW_PANEL_GAL::onEnter ), NULL, this ); Connect( KIGFX::WX_VIEW_CONTROLS::EVT_REFRESH_MOUSE, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); diff --git a/common/tool/action_manager.cpp b/common/tool/action_manager.cpp index 24ee6ca818..51c85aa273 100644 --- a/common/tool/action_manager.cpp +++ b/common/tool/action_manager.cpp @@ -115,10 +115,22 @@ void ACTION_MANAGER::RunAction( const TOOL_ACTION* aAction ) const bool ACTION_MANAGER::RunHotKey( int aHotKey ) const { - HOTKEY_LIST::const_iterator it = m_actionHotKeys.find( aHotKey ); + int key = std::toupper( aHotKey & ~MD_MODIFIER_MASK ); + int mod = aHotKey & MD_MODIFIER_MASK; + HOTKEY_LIST::const_iterator it = m_actionHotKeys.find( key | mod ); + + // If no luck, try without modifier, to handle keys that require a modifier + // e.g. to get ? you need to press Shift+/ without US keyboard layout + // Hardcoding ? as Shift+/ is a bad idea, as on another layout you may need to press a + // different combination if( it == m_actionHotKeys.end() ) - return false; // no appropriate action found for the hotkey + { + it = m_actionHotKeys.find( key ); + + if( it == m_actionHotKeys.end() ) + return false; // no appropriate action found for the hotkey + } const std::list& actions = it->second; diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index f89c7ee03f..a387d6581a 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -243,23 +243,26 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) } // Keyboard handling - else if( type == wxEVT_KEY_UP || type == wxEVT_KEY_DOWN ) + else if( type == wxEVT_CHAR ) { wxKeyEvent* ke = static_cast( &aEvent ); int key = ke->GetKeyCode(); int mods = decodeModifiers( ke ); - if( type == wxEVT_KEY_UP ) + if( mods & MD_CTRL ) { - evt = TOOL_EVENT( TC_KEYBOARD, TA_KEY_UP, key | mods ); + // wxWidgets have a quirk related to Ctrl+letter hot keys handled by CHAR_EVT + // http://docs.wxwidgets.org/trunk/classwx_key_event.html: + // "char events for ASCII letters in this case carry codes corresponding to the ASCII + // value of Ctrl-Latter, i.e. 1 for Ctrl-A, 2 for Ctrl-B and so on until 26 for Ctrl-Z." + if( key >= WXK_CONTROL_A && key <= WXK_CONTROL_Z ) + key += 'A' - 1; } + + if( key == WXK_ESCAPE ) // ESC is the special key for cancelling tools + evt = TOOL_EVENT( TC_COMMAND, TA_CANCEL_TOOL ); else - { - if( key == WXK_ESCAPE ) // ESC is the special key for cancelling tools - evt = TOOL_EVENT( TC_COMMAND, TA_CANCEL_TOOL ); - else - evt = TOOL_EVENT( TC_KEYBOARD, TA_KEY_DOWN, key | mods ); - } + evt = TOOL_EVENT( TC_KEYBOARD, TA_KEY_PRESSED, key | mods ); } if( evt ) diff --git a/common/tool/tool_event.cpp b/common/tool/tool_event.cpp index 07460f3571..50739ba419 100644 --- a/common/tool/tool_event.cpp +++ b/common/tool/tool_event.cpp @@ -81,8 +81,7 @@ const std::string TOOL_EVENT::Format() const { TA_MOUSE_DRAG, "drag" }, { TA_MOUSE_MOTION, "motion" }, { TA_MOUSE_WHEEL, "wheel" }, - { TA_KEY_UP, "key-up" }, - { TA_KEY_DOWN, "key-down" }, + { TA_KEY_PRESSED, "key-pressed" }, { TA_VIEW_REFRESH, "view-refresh" }, { TA_VIEW_ZOOM, "view-zoom" }, { TA_VIEW_PAN, "view-pan" }, diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 8c05ca5282..e83b8fc6d2 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -417,7 +417,7 @@ void TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent ) bool TOOL_MANAGER::dispatchStandardEvents( TOOL_EVENT& aEvent ) { - if( aEvent.Action() == TA_KEY_UP ) + if( aEvent.Action() == TA_KEY_PRESSED ) { // Check if there is a hotkey associated if( m_actionMgr->RunHotKey( aEvent.Modifier() | aEvent.KeyCode() ) ) diff --git a/include/tool/tool_event.h b/include/tool/tool_event.h index 4571b5a9f8..bdfe8a8a10 100644 --- a/include/tool/tool_event.h +++ b/include/tool/tool_event.h @@ -64,36 +64,35 @@ enum TOOL_ACTIONS TA_MOUSE_WHEEL = 0x0040, TA_MOUSE = 0x007f, - TA_KEY_UP = 0x0080, - TA_KEY_DOWN = 0x0100, - TA_KEYBOARD = TA_KEY_UP | TA_KEY_DOWN, + TA_KEY_PRESSED = 0x0080, + TA_KEYBOARD = TA_KEY_PRESSED, // View related events - TA_VIEW_REFRESH = 0x0200, - TA_VIEW_ZOOM = 0x0400, - TA_VIEW_PAN = 0x0800, - TA_VIEW_DIRTY = 0x1000, - TA_VIEW = 0x1e00, + TA_VIEW_REFRESH = 0x0100, + TA_VIEW_ZOOM = 0x0200, + TA_VIEW_PAN = 0x0400, + TA_VIEW_DIRTY = 0x0800, + TA_VIEW = 0x0f00, - TA_CHANGE_LAYER = 0x2000, + TA_CHANGE_LAYER = 0x1000, // Tool cancel event. Issued automagically when the user hits escape or selects End Tool from // the context menu. - TA_CANCEL_TOOL = 0x4000, + TA_CANCEL_TOOL = 0x2000, // Context menu update. Issued whenever context menu is open and the user hovers the mouse // over one of choices. Used in dynamic highligting in disambiguation menu - TA_CONTEXT_MENU_UPDATE = 0x8000, + TA_CONTEXT_MENU_UPDATE = 0x4000, // Context menu choice. Sent if the user picked something from the context menu or // closed it without selecting anything. - TA_CONTEXT_MENU_CHOICE = 0x10000, + TA_CONTEXT_MENU_CHOICE = 0x8000, // This event is sent *before* undo/redo command is performed. - TA_UNDO_REDO = 0x20000, + TA_UNDO_REDO = 0x10000, // Tool action (allows to control tools) - TA_ACTION = 0x40000, + TA_ACTION = 0x20000, TA_ANY = 0xffffffff }; @@ -277,14 +276,9 @@ public: return m_keyCode; } - bool IsKeyUp() const + bool IsKeyPressed() const { - return m_actions == TA_KEY_UP; - } - - bool IsKeyDown() const - { - return m_actions == TA_KEY_DOWN; + return m_actions == TA_KEY_PRESSED; } void SetMouseDragOrigin( const VECTOR2D& aP ) diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index dd24327678..8fe733fb8c 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -45,11 +45,11 @@ using namespace KIGFX; using boost::optional; -static TOOL_ACTION ACT_AutoEndRoute( "pcbnew.InteractiveRouter.AutoEndRoute", AS_CONTEXT, 'G' ); -static TOOL_ACTION ACT_PlaceVia( "pcbnew.InteractiveRouter.PlaceVia", AS_CONTEXT, 'V' ); -static TOOL_ACTION ACT_OpenRouteOptions( "pcbnew.InteractiveRouter.OpenRouterOptions", AS_CONTEXT, 'T' ); -static TOOL_ACTION ACT_SwitchPosture( "pcbnew.InteractiveRouter.SwitchPosture", AS_CONTEXT, '/' ); -static TOOL_ACTION ACT_EndTrack( "pcbnew.InteractiveRouter.EndTrack", AS_CONTEXT, WXK_END ); +//static TOOL_ACTION ACT_AutoEndRoute( "pcbnew.InteractiveRouter.AutoEndRoute", AS_CONTEXT, 'G' ); +//static TOOL_ACTION ACT_PlaceVia( "pcbnew.InteractiveRouter.PlaceVia", AS_CONTEXT, 'V' ); +//static TOOL_ACTION ACT_OpenRouteOptions( "pcbnew.InteractiveRouter.OpenRouterOptions", AS_CONTEXT, 'T' ); +//static TOOL_ACTION ACT_SwitchPosture( "pcbnew.InteractiveRouter.SwitchPosture", AS_CONTEXT, '/' ); +//static TOOL_ACTION ACT_EndTrack( "pcbnew.InteractiveRouter.EndTrack", AS_CONTEXT, WXK_END ); ROUTER_TOOL::ROUTER_TOOL() : TOOL_INTERACTIVE( "pcbnew.InteractiveRouter" ) @@ -367,9 +367,9 @@ void ROUTER_TOOL::startRouting() m_router->Move( m_endSnapPoint, m_endItem ); } - else if( evt->IsKeyUp() ) + else if( evt->IsKeyPressed() ) { - switch( evt->KeyCode() ) + switch( std::toupper( evt->KeyCode() ) ) { case 'V': { diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 90a235e9ac..3ff65af56b 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -148,11 +148,11 @@ TOOL_ACTION COMMON_ACTIONS::highContrastMode( "pcbnew.highContrastMode", "", "" ); TOOL_ACTION COMMON_ACTIONS::highContrastInc( "pcbnew.highContrastInc", - AS_GLOBAL, MD_SHIFT + '.', // shift+. == > + AS_GLOBAL, '>', "", "" ); TOOL_ACTION COMMON_ACTIONS::highContrastDec( "pcbnew.highContrastDec", - AS_GLOBAL, MD_SHIFT + 60, // shift+, == < + AS_GLOBAL, '<', "", "" ); @@ -198,11 +198,11 @@ TOOL_ACTION COMMON_ACTIONS::layerPrev( "pcbnew.layerPrev", "", "" ); TOOL_ACTION COMMON_ACTIONS::layerAlphaInc( "pcbnew.layerAlphaInc", - AS_GLOBAL, MD_SHIFT + ']', // shift+] == } + AS_GLOBAL, '}', "", "" ); TOOL_ACTION COMMON_ACTIONS::layerAlphaDec( "pcbnew.layerAlphaDec", - AS_GLOBAL, MD_SHIFT + '[', // shift+[ == { + AS_GLOBAL, '{', "", "" ); @@ -252,7 +252,7 @@ TOOL_ACTION COMMON_ACTIONS::switchUnits( "pcbnew.switchUnits", "", "" ); TOOL_ACTION COMMON_ACTIONS::showHelp( "pcbnew.showHelp", - AS_GLOBAL, MD_SHIFT + '/', // shift+/ == ? + AS_GLOBAL, '?', "", "" ); diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index 1d85ec6906..34af899d35 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -135,7 +135,7 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) break; } - else if( evt->IsKeyUp() && step != SET_ORIGIN ) + else if( evt->IsKeyPressed() && step != SET_ORIGIN ) { int width = arc->GetWidth(); @@ -427,7 +427,7 @@ int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent ) break; } - else if( evt->IsKeyUp() && step != SET_ORIGIN ) + else if( evt->IsKeyPressed() && step != SET_ORIGIN ) { width = dimension->GetWidth(); @@ -603,7 +603,7 @@ int DRAWING_TOOL::PlaceTarget( TOOL_EVENT& aEvent ) if( evt->IsCancel() ) break; - else if( evt->IsKeyUp() ) + else if( evt->IsKeyPressed() ) { int width = target->GetWidth(); @@ -822,7 +822,7 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) m_controls->SetAutoPan( false ); } - else if( graphic && evt->IsKeyUp() ) + else if( graphic && evt->IsKeyPressed() ) { int width = graphic->GetWidth(); From 5efdac01c1b0c9c4eae48843dabf223191995513 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Apr 2014 20:55:34 -0400 Subject: [PATCH 285/741] Fix MinGW OpenMP link error. --- pcbnew/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 90365cfb33..5cf723661c 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -397,6 +397,10 @@ if( KICAD_SCRIPTING_MODULES ) ) endif() + if( ${OPENMP_FOUND} ) + set_property( TARGET _pcbnew APPEND_STRING + PROPERTY LINK_FLAGS " ${OpenMP_CXX_FLAGS}" ) + endif() endif() From f687f9ef85a183277cb4f46e8b8c3fca4aba35f4 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Thu, 10 Apr 2014 16:20:01 -0500 Subject: [PATCH 286/741] catch some IO_ERRORs --- common/single_top.cpp | 24 ++++++++++ cvpcb/readwrite_dlgs.cpp | 98 +++++++++++++++++++++++----------------- 2 files changed, 81 insertions(+), 41 deletions(-) diff --git a/common/single_top.cpp b/common/single_top.cpp index 9aeb9c178f..daa69c6866 100644 --- a/common/single_top.cpp +++ b/common/single_top.cpp @@ -226,6 +226,30 @@ struct APP_SINGLE_TOP : public wxApp return wxApp::OnExit(); } + int OnRun() // overload wxApp virtual + { + try + { + return wxApp::OnRun(); + } + catch( const std::exception& e ) + { + wxLogError( "Unhandled exception class: %s what: %s", + typeid(e).name(), e.what() ); + } + catch( const IO_ERROR& ioe ) + { + wxLogError( "Unhandled exception class: %s what: %s", + typeid( ioe ).name(), TO_UTF8( ioe.errorText ) ); + } + catch(...) + { + wxLogError( "Unhandled exception of unknown type" ); + } + + return -1; + } + /** * Function MacOpenFile * is specific to MacOSX (not used under Linux or Windows). diff --git a/cvpcb/readwrite_dlgs.cpp b/cvpcb/readwrite_dlgs.cpp index afdb4dc398..8683d50232 100644 --- a/cvpcb/readwrite_dlgs.cpp +++ b/cvpcb/readwrite_dlgs.cpp @@ -119,6 +119,20 @@ void CVPCB_MAINFRAME::SetNewPkg( const wxString& aFootprintName ) } +#if 0 + + /* + + This code block was based on two major assumptions that are no longer true: + 1) Footprint library basenames would remain the same. + (But no, basenames have been renamed in the github repo.) + 2) *.mod files would still be around and merely reside in the FP_LIB_TABLE. + (But no, they have been converted to *.pretty.) + + There is a newer replacement code block in the #else region. + + */ + /** * Function missingLegacyLibs * tests the list of \a aLibNames by URI to determine if any of them are missing from @@ -171,21 +185,6 @@ static bool missingLegacyLibs( FP_LIB_TABLE* aTbl, SEARCH_STACK& aSStack, } -#if 0 - - /* - - This code block was based on two major assumptions that are no longer true: - 1) Footprint library basenames would remain the same. - (But no, basenames have been renamed in the github repo.) - 2) *.mod files would still be around and merely reside in the FP_LIB_TABLE. - (But no, they have been converted to *.pretty.) - - There is a newer replacement code block in the #else region. - - */ - - /** * Function convertFromLegacy * converts the footprint names in \a aNetList from the legacy format to the #FPID format. @@ -460,7 +459,6 @@ bool CVPCB_MAINFRAME::ReadNetListAndLinkFiles() #else // new strategy - /// Return true if the resultant FPID has a certain nickname. The guess /// is only made if this footprint resides in only one library. /// @return int - 0 on success, 1 on not found, 2 on ambiguous i.e. multiple matches @@ -548,40 +546,52 @@ bool CVPCB_MAINFRAME::ReadNetListAndLinkFiles() { msg.Clear(); - for( unsigned i = 0; i < m_netlist.GetCount(); i++ ) + try { - COMPONENT* component = m_netlist.GetComponent( i ); - - if( component->GetFPID().IsLegacy() ) + for( unsigned i = 0; i < m_netlist.GetCount(); i++ ) { - int guess = guessNickname( tbl, (FPID*) &component->GetFPID() ); + COMPONENT* component = m_netlist.GetComponent( i ); - switch( guess ) + if( component->GetFPID().IsLegacy() ) { - case 0: - DBG(printf("%s: guessed OK ref:%s fpid:%s\n", __func__, - TO_UTF8( component->GetReference() ), component->GetFPID().Format().c_str() );) - m_modified = true; - break; + int guess = guessNickname( tbl, (FPID*) &component->GetFPID() ); - case 1: - msg += wxString::Format( _( - "Component '%s' footprint '%s' was not found in any library.\n" ), - GetChars( component->GetReference() ), - GetChars( component->GetFPID().GetFootprintName() ) - ); - break; + switch( guess ) + { + case 0: + DBG(printf("%s: guessed OK ref:%s fpid:%s\n", __func__, + TO_UTF8( component->GetReference() ), component->GetFPID().Format().c_str() );) + m_modified = true; + break; - case 2: - msg += wxString::Format( _( - "Component '%s' footprint '%s' was found in multiple libraries.\n" ), - GetChars( component->GetReference() ), - GetChars( component->GetFPID().GetFootprintName() ) - ); - break; + case 1: + msg += wxString::Format( _( + "Component '%s' footprint '%s' was not found in any library.\n" ), + GetChars( component->GetReference() ), + GetChars( component->GetFPID().GetFootprintName() ) + ); + break; + + case 2: + msg += wxString::Format( _( + "Component '%s' footprint '%s' was found in multiple libraries.\n" ), + GetChars( component->GetReference() ), + GetChars( component->GetFPID().GetFootprintName() ) + ); + break; + } } } } + catch( const IO_ERROR& ioe ) + { + wxString msg = ioe.errorText; + msg += wxT( "\n\n" ); + msg += _( "First check your fp-lib-table entries." ); + + wxMessageBox( msg, wxT( "Problematic fp-lib-tables" ) ); + return false; + } if( msg.size() ) { @@ -593,7 +603,13 @@ bool CVPCB_MAINFRAME::ReadNetListAndLinkFiles() dlg.MessageSet( wxT( "\nYou will need to reassign them manually if you want them " "to be updated correctly the next time you import the " "netlist in Pcbnew." ) ); + +#if 1 dlg.ShowModal(); +#else + dlg.Fit(); + dlg.Show( true ); // modeless lets user watch while fixing the problems, but its not working. +#endif } } else From 359f05ad768809986a0e03351af528a98bcb1cf9 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Thu, 10 Apr 2014 16:24:15 -0500 Subject: [PATCH 287/741] oops, wx2.8 compatibility fixes --- common/single_top.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/common/single_top.cpp b/common/single_top.cpp index daa69c6866..0248f5f119 100644 --- a/common/single_top.cpp +++ b/common/single_top.cpp @@ -34,6 +34,7 @@ */ +#include #include #include #include @@ -234,17 +235,18 @@ struct APP_SINGLE_TOP : public wxApp } catch( const std::exception& e ) { - wxLogError( "Unhandled exception class: %s what: %s", + wxLogError( wxT( "Unhandled exception class: %s what: %s" ), typeid(e).name(), e.what() ); } catch( const IO_ERROR& ioe ) { - wxLogError( "Unhandled exception class: %s what: %s", - typeid( ioe ).name(), TO_UTF8( ioe.errorText ) ); + wxLogError( wxT( "Unhandled exception class: %s what: %s" ), + GetChars( FROM_UTF8( typeid( ioe ).name() ) ), + GetChars( ioe.errorText ) ); } catch(...) { - wxLogError( "Unhandled exception of unknown type" ); + wxLogError( wxT( "Unhandled exception of unknown type" ) ); } return -1; From 36bdbde68c3ad84ed1abfeb351993503807f2e43 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Thu, 10 Apr 2014 16:31:55 -0500 Subject: [PATCH 288/741] oops, wx2.8 compatibility fixes --- common/single_top.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/single_top.cpp b/common/single_top.cpp index 0248f5f119..19104c4261 100644 --- a/common/single_top.cpp +++ b/common/single_top.cpp @@ -236,7 +236,8 @@ struct APP_SINGLE_TOP : public wxApp catch( const std::exception& e ) { wxLogError( wxT( "Unhandled exception class: %s what: %s" ), - typeid(e).name(), e.what() ); + GetChars( FROM_UTF8( typeid(e).name() )), + GetChars( FROM_UTF8( e.what() ) ) );; } catch( const IO_ERROR& ioe ) { From a54df13036b88da048da21aa86821cb66a57da0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nick=20=C3=98stergaard?= Date: Fri, 11 Apr 2014 08:30:30 -0500 Subject: [PATCH 289/741] bzr email happiness --- scripts/kicad-install.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/kicad-install.sh b/scripts/kicad-install.sh index 8bd792fe87..3e80a48952 100755 --- a/scripts/kicad-install.sh +++ b/scripts/kicad-install.sh @@ -125,7 +125,10 @@ install_prerequisites() fi # ensure bzr name and email are set. No message since bzr prints an excellent diagnostic. - bzr whoami || exit 2 + bzr whoami || { + echo "WARNING: You have not set bzr whoami, so I will set a dummy." + export BZR_EMAIL="Kicad Build " + } } From 953bf1d92318b47393164b65c8c7250bacb21135 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Fri, 11 Apr 2014 08:36:20 -0500 Subject: [PATCH 290/741] kicad-install.sh: only install global fp-lib-table if non-existent --- scripts/kicad-install.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/kicad-install.sh b/scripts/kicad-install.sh index 3e80a48952..d5e9877926 100755 --- a/scripts/kicad-install.sh +++ b/scripts/kicad-install.sh @@ -273,10 +273,12 @@ install_or_update() echo " kicad-lib.bzr installed." - echo "step 9) as non-root, install user configuration files..." + echo "step 9) as non-root, install global fp-lib-table if none already installed..." # install ~/fp-lib-table - make install_github_fp-lib-table - echo " kicad user-configuration files installed." + if [ ! -e ~/fp-lib-table ]; then + make install_github_fp-lib-table + echo " global fp-lib-table installed." + fi echo "step 10) installing documentation..." From 95ea4f6cc596aad54f57711d3b96bd0082030485 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Sun, 13 Apr 2014 07:48:58 -0500 Subject: [PATCH 291/741] remove a static wxString constructor which was out of sequence with another dependent one, at least with one toolchain. --- pcbnew/class_netclass.cpp | 2 +- pcbnew/class_netclass.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pcbnew/class_netclass.cpp b/pcbnew/class_netclass.cpp index 655595a41d..73729324ef 100644 --- a/pcbnew/class_netclass.cpp +++ b/pcbnew/class_netclass.cpp @@ -36,7 +36,7 @@ // This will get mapped to "kicad_default" in the specctra_export. -const wxString NETCLASS::Default = wxT("Default"); +const wxChar NETCLASS::Default[] = wxT( "Default" ); // Initial values for netclass initialization int NETCLASS::DEFAULT_CLEARANCE = DMils2iu( 100 ); // track to track and track to pads clearance diff --git a/pcbnew/class_netclass.h b/pcbnew/class_netclass.h index 5780a83203..d5e0005357 100644 --- a/pcbnew/class_netclass.h +++ b/pcbnew/class_netclass.h @@ -80,7 +80,7 @@ protected: public: - static const wxString Default; ///< the name of the default NETCLASS + static const wxChar Default[]; ///< the name of the default NETCLASS /** * Constructor From d2e56665f5056f0634848fb162aa170e31b34bf6 Mon Sep 17 00:00:00 2001 From: Lorenzo Marcantonio Date: Sun, 13 Apr 2014 20:24:44 +0200 Subject: [PATCH 292/741] - Began rework/cleanup of the board cleanup routine - Set the modified flag even for null segment removal --- pcbnew/clean.cpp | 76 +++++++++++++++++++----------------------------- 1 file changed, 30 insertions(+), 46 deletions(-) diff --git a/pcbnew/clean.cpp b/pcbnew/clean.cpp index e90a496bf0..63d72de226 100644 --- a/pcbnew/clean.cpp +++ b/pcbnew/clean.cpp @@ -44,9 +44,6 @@ class TRACKS_CLEANER: CONNECTIONS { private: BOARD * m_Brd; - bool m_deleteUnconnectedTracks; - bool m_mergeSegments; - bool m_cleanVias; public: TRACKS_CLEANER( BOARD * aPcb ); @@ -55,22 +52,8 @@ public: * the cleanup function. * return true if some item was modified */ - bool CleanupBoard(); - - void SetdeleteUnconnectedTracksOpt( bool aDelete ) - { - m_deleteUnconnectedTracks = aDelete; - } - - void SetMergeSegmentsOpt( bool aMerge ) - { - m_mergeSegments = aMerge; - } - - void SetCleanViasOpt( bool aClean ) - { - m_cleanVias = aClean; - } + bool CleanupBoard(PCB_EDIT_FRAME *aFrame, bool aCleanVias, + bool aMergeSegments, bool aDeleteUnconnected); private: @@ -88,7 +71,7 @@ private: /** * Merge colinear segments and remove null len segments */ - bool clean_segments(); + bool clean_segments(); /** * helper function @@ -117,19 +100,9 @@ void PCB_EDIT_FRAME::Clean_Pcb() wxBusyCursor( dummy ); TRACKS_CLEANER cleaner( GetBoard() ); - cleaner.SetdeleteUnconnectedTracksOpt( dlg.m_deleteUnconnectedSegm ); - cleaner.SetMergeSegmentsOpt( dlg.m_mergeSegments ); - cleaner.SetCleanViasOpt( dlg.m_cleanVias ); - - if( cleaner.CleanupBoard() ) - { - // Clear undo and redo lists to avoid inconsistencies between lists - GetScreen()->ClearUndoRedoList(); - SetCurItem( NULL ); - Compile_Ratsnest( NULL, true ); - OnModify(); - } + cleaner.CleanupBoard( this, dlg.m_cleanVias, dlg.m_mergeSegments, + dlg.m_deleteUnconnectedSegm ); m_canvas->Refresh( true ); } @@ -142,30 +115,38 @@ void PCB_EDIT_FRAME::Clean_Pcb() * Create segments when track ends are incorrectly connected: * i.e. when a track end covers a pad or a via but is not exactly on the pad or the via center */ -bool TRACKS_CLEANER::CleanupBoard() +bool TRACKS_CLEANER::CleanupBoard( PCB_EDIT_FRAME *aFrame, + bool aCleanVias, + bool aMergeSegments, + bool aDeleteUnconnected ) { bool modified = false; // delete redundant vias - if( m_cleanVias && clean_vias() ) - modified = true; + modified |= (aCleanVias && clean_vias()); // Remove null segments and intermediate points on aligned segments - if( m_mergeSegments && clean_segments() ) - modified = true; + modified |= (aMergeSegments && clean_segments()); // Delete dangling tracks - if( m_deleteUnconnectedTracks && deleteUnconnectedTracks() ) - modified = true; + modified |= (aDeleteUnconnected && deleteUnconnectedTracks()); + if( modified ) + { + // Clear undo and redo lists to avoid inconsistencies between lists + // XXX This is very involved... maybe a member in PCB_EDIT_FRAME + // would be better? + aFrame->GetScreen()->ClearUndoRedoList(); + aFrame->SetCurItem( NULL ); + aFrame->Compile_Ratsnest( NULL, true ); + aFrame->OnModify(); + } return modified; } TRACKS_CLEANER::TRACKS_CLEANER( BOARD * aPcb ): CONNECTIONS( aPcb ) { m_Brd = aPcb; - m_deleteUnconnectedTracks = false; - m_mergeSegments = false; // Build connections info BuildPadsList(); @@ -211,7 +192,6 @@ void TRACKS_CLEANER::buildTrackConnectionInfo() bool TRACKS_CLEANER::clean_vias() { - TRACK* next_track; bool modified = false; for( TRACK* track = m_Brd->m_Track; track; track = track->Next() ) @@ -229,6 +209,7 @@ bool TRACKS_CLEANER::clean_vias() // Search and delete others vias at same location TRACK* alt_track = track->Next(); + TRACK* next_track; for( ; alt_track != NULL; alt_track = next_track ) { next_track = alt_track->Next(); @@ -247,6 +228,7 @@ bool TRACKS_CLEANER::clean_vias() } // Delete Via on pads at same location + TRACK* next_track; for( TRACK* track = m_Brd->m_Track; track != NULL; track = next_track ) { next_track = track->Next(); @@ -452,8 +434,6 @@ bool TRACKS_CLEANER::clean_segments() bool modified = false; TRACK* segment, * nextsegment; TRACK* other; - int flag, no_inc; - // Delete null segments for( segment = m_Brd->m_Track; segment; segment = nextsegment ) @@ -461,7 +441,10 @@ bool TRACKS_CLEANER::clean_segments() nextsegment = segment->Next(); if( segment->IsNull() ) // Length segment = 0; delete it + { segment->DeleteStructure(); + modified = true; + } } // Delete redundant segments, i.e. segments having the same end points @@ -511,7 +494,8 @@ bool TRACKS_CLEANER::clean_segments() if( segment->Type() != PCB_TRACE_T ) continue; - flag = no_inc = 0; + unsigned flag = 0; + bool no_inc = false; // search for a possible point connected to the START point of the current segment for( segStart = segment->Next(); ; ) @@ -588,7 +572,7 @@ bool TRACKS_CLEANER::clean_segments() if( segDelete ) { - no_inc = 1; + no_inc = true; segDelete->DeleteStructure(); modified = true; } From c39385a5cdb4e45ba007c4a00d26562040364972 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Mon, 14 Apr 2014 13:49:52 -0500 Subject: [PATCH 293/741] improve help file finding after kiway breakage. --- common/CMakeLists.txt | 2 + common/basicframe.cpp | 67 ++++--- common/eda_doc.cpp | 15 +- common/findkicadhelppath.cpp.notused | 126 ++++++++++++ common/gestfich.cpp | 286 ++++++++------------------- common/kiface_i.cpp | 90 +-------- common/pgm_base.cpp | 53 ++--- common/search_stack.cpp | 25 --- common/searchhelpfilefullpath.cpp | 128 ++++++++++++ cvpcb/cvframe.cpp | 7 - include/bin_mod.h | 2 + include/common.h | 21 ++ include/gestfich.h | 22 --- include/kiface_i.h | 26 +-- include/pgm_base.h | 12 +- include/search_stack.h | 9 - include/wxstruct.h | 9 + kicad/kicad.h | 5 + kicad/mainframe.cpp | 21 +- kicad/pgm_kicad.h | 2 + kicad/tree_project_frame.cpp | 5 +- 21 files changed, 485 insertions(+), 448 deletions(-) create mode 100644 common/findkicadhelppath.cpp.notused create mode 100644 common/searchhelpfilefullpath.cpp diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index f6deda5e49..cb3d0fceb6 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -172,6 +172,7 @@ set( COMMON_SRCS eda_dde.cpp eda_doc.cpp filter_reader.cpp +# findkicadhelppath.cpp.notused deprecated, use searchhelpfilefullpath.cpp gestfich.cpp getrunningmicrosecs.cpp grid_tricks.cpp @@ -189,6 +190,7 @@ set( COMMON_SRCS ptree.cpp reporter.cpp richio.cpp + searchhelpfilefullpath.cpp search_stack.cpp selcolor.cpp systemdirsappend.cpp diff --git a/common/basicframe.cpp b/common/basicframe.cpp index 3efb4af478..f8a170211a 100644 --- a/common/basicframe.cpp +++ b/common/basicframe.cpp @@ -271,6 +271,18 @@ wxConfigBase* EDA_BASE_FRAME::config() } +const SEARCH_STACK& EDA_BASE_FRAME::sys_search() +{ + return Kiface().KifaceSearch(); +} + + +wxString EDA_BASE_FRAME::help_name() +{ + return Kiface().GetHelpFileName(); +} + + void EDA_BASE_FRAME::PrintMsg( const wxString& text ) { SetStatusText( text ); @@ -327,33 +339,28 @@ wxString EDA_BASE_FRAME::GetFileFromHistory( int cmdId, const wxString& type, void EDA_BASE_FRAME::GetKicadHelp( wxCommandEvent& event ) { - wxString msg; + const SEARCH_STACK& search = sys_search(); /* We have to get document for beginners, - * or the the full specific doc + * or the full specific doc * if event id is wxID_INDEX, we want the document for beginners. * else the specific doc file (its name is in Kiface().GetHelpFileName()) * The document for beginners is the same for all KiCad utilities */ if( event.GetId() == wxID_INDEX ) { - // Temporarily change the help filename - wxString tmp = Kiface().GetHelpFileName(); - // Search for "getting_started_in_kicad.pdf" or "Getting_Started_in_KiCad.pdf" - Kiface().SetHelpFileName( wxT( "getting_started_in_kicad.pdf" ) ); - wxString helpFile = Kiface().GetHelpFile(); + wxString helpFile = SearchHelpFileFullPath( search, wxT( "getting_started_in_kicad.pdf" ) ); if( !helpFile ) - { // Try to find "Getting_Started_in_KiCad.pdf" - Kiface().SetHelpFileName( wxT( "Getting_Started_in_KiCad.pdf" ) ); - helpFile = Kiface().GetHelpFile(); - } + helpFile = SearchHelpFileFullPath( search, wxT( "Getting_Started_in_KiCad.pdf" ) ); if( !helpFile ) { - msg.Printf( _( "Help file %s could not be found." ), - GetChars( Kiface().GetHelpFileName() ) ); + wxString msg = wxString::Format( _( + "Help file '%s' could not be found." ), + wxT( "getting_started_in_kicad.pdf" ) + ); wxMessageBox( msg ); } else @@ -361,36 +368,36 @@ void EDA_BASE_FRAME::GetKicadHelp( wxCommandEvent& event ) GetAssociatedDocument( this, helpFile ); } - Kiface().SetHelpFileName( tmp ); return; } + wxString base_name = help_name(); + #if defined ONLINE_HELP_FILES_FORMAT_IS_HTML - if( Kiface().GetHtmlHelpController() == NULL ) + wxHtmlHelpController* hc = Pgm().GetHtmlHelpController(); + + wxString helpFile = SearchHelpFileFullPath( search, ); + + if( !!helpFile ) { - Kiface().InitOnLineHelp(); + hc->UseConfig( Pgm().CommonSettings() ); + hc->SetTitleFormat( wxT( "KiCad Help" ) ); + hc->AddBook( helpFile ); } - - if( Kiface().GetHtmlHelpController() ) - { - Kiface().GetHtmlHelpController()->DisplayContents(); - Kiface().GetHtmlHelpController()->Display( Kiface().GetHelpFileName() ); - } - else - { - msg.Printf( _( "Help file %s could not be found." ), GetChars( Kiface().GetHelpFileName() ) ); - wxMessageBox( msg ); - } + hc->DisplayContents(); + hc->Display( helpFile ); #elif defined ONLINE_HELP_FILES_FORMAT_IS_PDF - wxString helpFile = Kiface().GetHelpFile(); + wxString helpFile = SearchHelpFileFullPath( search, base_name ); if( !helpFile ) { - msg.Printf( _( "Help file %s could not be found." ), - GetChars( Kiface().GetHelpFileName() ) ); + wxString msg = wxString::Format( _( + "Help file '%s' could not be found." ), + GetChars( base_name ) + ); wxMessageBox( msg ); } else diff --git a/common/eda_doc.cpp b/common/eda_doc.cpp index 8a4dd423ee..407b1c5ed3 100644 --- a/common/eda_doc.cpp +++ b/common/eda_doc.cpp @@ -64,15 +64,19 @@ bool GetAssociatedDocument( wxFrame* aFrame, const wxPathList* aPaths) { - wxString docname, fullfilename, file_ext; + wxString docname, fullfilename; wxString msg; wxString command; bool success = false; // Is an internet url - static const wxString url_header[3] = { wxT( "http:" ), wxT( "ftp:" ), wxT( "www." ) }; + static const wxChar* url_header[3] = { + wxT( "http:" ), + wxT( "ftp:" ), + wxT( "www." ) + }; - for( int ii = 0; ii < 3; ii++ ) + for( unsigned ii = 0; ii < DIM(url_header); ii++ ) { if( aDocName.First( url_header[ii] ) == 0 ) //. seems an internet url { @@ -133,8 +137,9 @@ bool GetAssociatedDocument( wxFrame* aFrame, return false; } - wxFileName CurrentFileName( fullfilename ); - file_ext = CurrentFileName.GetExt(); + wxFileName currentFileName( fullfilename ); + + wxString file_ext = currentFileName.GetExt(); if( file_ext == wxT( "pdf" ) ) { diff --git a/common/findkicadhelppath.cpp.notused b/common/findkicadhelppath.cpp.notused new file mode 100644 index 0000000000..d2d781ef57 --- /dev/null +++ b/common/findkicadhelppath.cpp.notused @@ -0,0 +1,126 @@ + +#include +#include +#include +#include + + +/** + * Function FindKicadHelpPath + * finds the absolute path for KiCad "help" (or "help/<language>") + * Find path kicad/doc/help/xx/ or kicad/doc/help/: + * from BinDir + * else from environment variable KICAD + * else from one of s_HelpPathList + * typically c:/kicad/doc/help or /usr/share/kicad/help + * or /usr/local/share/kicad/help + * (must have kicad in path name) + * + * xx = iso639-1 language id (2 letters (generic) or 4 letters): + * fr = french (or fr_FR) + * en = English (or en_GB or en_US ...) + * de = deutch + * es = spanish + * pt = portuguese (or pt_BR ...) + * + * default = en (if not found = fr) + */ +wxString FindKicadHelpPath() +{ + bool found = false; + wxString bin_dir = Pgm().GetExecutablePath(); + + if( bin_dir.Last() == '/' ) + bin_dir.RemoveLast(); + + wxString fullPath = bin_dir.BeforeLast( '/' ); // cd .. + + fullPath += wxT( "/doc/help/" ); + + wxString localeString = Pgm().GetLocale()->GetCanonicalName(); + + wxString path_tmp = fullPath; + +#ifdef __WINDOWS__ + path_tmp.MakeLower(); +#endif + + if( path_tmp.Contains( wxT( "kicad" ) ) ) + { + if( wxDirExists( fullPath ) ) + found = true; + } + + // find kicad/help/ from environment variable KICAD + if( !found && Pgm().IsKicadEnvVariableDefined() ) + { + fullPath = Pgm().GetKicadEnvVariable() + wxT( "/doc/help/" ); + + if( wxDirExists( fullPath ) ) + found = true; + } + + if( !found ) + { + // Possibilities online help + const static wxChar* possibilities[] = { +#ifdef __WINDOWS__ + wxT( "c:/kicad/doc/help/" ), + wxT( "d:/kicad/doc/help/" ), + wxT( "c:/Program Files/kicad/doc/help/" ), + wxT( "d:/Program Files/kicad/doc/help/" ), +#else + wxT( "/usr/share/doc/kicad/help/" ), + wxT( "/usr/local/share/doc/kicad/help/" ), + wxT( "/usr/local/kicad/doc/help/" ), // default install for "universal + // tarballs" and build for a server + // (new) + wxT( "/usr/local/kicad/help/" ), // default install for "universal + // tarballs" and build for a server + // (old) +#endif + }; + + for( unsigned i=0; iGetCanonicalName(); - - wxString path_tmp = FullPath; -#ifdef __WINDOWS__ - path_tmp.MakeLower(); -#endif - if( path_tmp.Contains( wxT( "kicad" ) ) ) - { - if( wxDirExists( FullPath ) ) - PathFound = true; - } - - /* find kicad/help/ from environment variable KICAD */ - if( !PathFound && Pgm().IsKicadEnvVariableDefined() ) - { - FullPath = Pgm().GetKicadEnvVariable() + wxT( "/doc/help/" ); - - if( wxDirExists( FullPath ) ) - PathFound = true; - } - - /* find kicad/help/ from "s_HelpPathList" */ - int ii = 0; - - while( !PathFound ) - { - FullPath = s_HelpPathList[ii++]; - - if( FullPath == wxT( "end_list" ) ) - break; - - if( wxDirExists( FullPath ) ) - PathFound = true; - } - - if( PathFound ) - { - LangFullPath = FullPath + LocaleString + UNIX_STRING_DIR_SEP; - - if( wxDirExists( LangFullPath ) ) - return LangFullPath; - - LangFullPath = FullPath + LocaleString.Left( 2 ) + UNIX_STRING_DIR_SEP; - - if( wxDirExists( LangFullPath ) ) - return LangFullPath; - - LangFullPath = FullPath + wxT( "en/" ); - - if( wxDirExists( LangFullPath ) ) - { - return LangFullPath; - } - else - { - LangFullPath = FullPath + wxT( "fr/" ); - - if( wxDirExists( LangFullPath ) ) - return LangFullPath; - } - return FullPath; - } - return wxEmptyString; -} - - wxString FindKicadFile( const wxString& shortname ) { - wxString FullFileName; + // Test the presence of the file in the directory shortname of + // the KiCad binary path. + wxString fullFileName = Pgm().GetExecutablePath() + shortname; - /* Test the presence of the file in the directory shortname of - * the KiCad binary path. - */ - FullFileName = Pgm().GetExecutablePath() + shortname; + if( wxFileExists( fullFileName ) ) + return fullFileName; - if( wxFileExists( FullFileName ) ) - return FullFileName; - - /* Test the presence of the file in the directory shortname - * defined by the environment variable KiCad. - */ + // Test the presence of the file in the directory shortname + // defined by the environment variable KiCad. if( Pgm().IsKicadEnvVariableDefined() ) { - FullFileName = Pgm().GetKicadEnvVariable() + shortname; + fullFileName = Pgm().GetKicadEnvVariable() + shortname; - if( wxFileExists( FullFileName ) ) - return FullFileName; + if( wxFileExists( fullFileName ) ) + return fullFileName; } - /* find binary file from default path list: - * /usr/local/kicad/linux or c:/kicad/winexe - * (see s_KicadDataPathList) */ - int ii = 0; + // find binary file from possibilities list: + // /usr/local/kicad/linux or c:/kicad/winexe - while( 1 ) + // Path list for KiCad binary files + const static wxChar* possibilities[] = { +#ifdef __WINDOWS__ + wxT( "c:/kicad/bin/" ), + wxT( "d:/kicad/bin/" ), + wxT( "c:/Program Files/kicad/bin/" ), + wxT( "d:/Program Files/kicad/bin/" ), +#else + wxT( "/usr/bin/" ), + wxT( "/usr/local/bin/" ), + wxT( "/usr/local/kicad/bin/" ), +#endif + }; + + for( unsigned i=0; i could not found" ), GetChars( FullFileName ) ); + msg.Printf( _( "Command <%s> could not found" ), GetChars( fullFileName ) ); DisplayError( frame, msg, 20 ); return -1; } @@ -452,13 +317,13 @@ int ExecuteFile( wxWindow* frame, const wxString& ExecFile, const wxString& para wxString KicadDatasPath() { - bool PathFound = false; + bool found = false; wxString data_path; if( Pgm().IsKicadEnvVariableDefined() ) // Path defined by the KICAD environment variable. { data_path = Pgm().GetKicadEnvVariable(); - PathFound = true; + found = true; } else // Path of executables. { @@ -485,33 +350,56 @@ wxString KicadDatasPath() if( wxDirExists( data_path ) ) { - PathFound = true; + found = true; } else if( wxDirExists( old_path ) ) { data_path = old_path; - PathFound = true; + found = true; } } } - /* find KiCad from default path list: - * /usr/local/kicad/ or c:/kicad/ - * (see s_KicadDataPathList) */ - int ii = 0; - - while( !PathFound ) + if( !found ) { - if( s_KicadDataPathList[ii] == wxT( "end_list" ) ) - break; + // find KiCad from possibilities list: + // /usr/local/kicad/ or c:/kicad/ - data_path = s_KicadDataPathList[ii++]; + const static wxChar* possibilities[] = { +#ifdef __WINDOWS__ + wxT( "c:/kicad/share/" ), + wxT( "d:/kicad/share/" ), + wxT( "c:/kicad/" ), + wxT( "d:/kicad/" ), + wxT( "c:/Program Files/kicad/share/" ), + wxT( "d:/Program Files/kicad/share/" ), + wxT( "c:/Program Files/kicad/" ), + wxT( "d:/Program Files/kicad/" ), +#else + wxT( "/usr/share/kicad/" ), + wxT( "/usr/local/share/kicad/" ), + wxT( "/usr/local/kicad/share/" ), // default data path for "universal + // tarballs" and build for a server + // (new) + wxT( "/usr/local/kicad/" ), // default data path for "universal + // tarballs" and build for a server + // (old) +#endif + }; - if( wxDirExists( data_path ) ) - PathFound = true; + for( unsigned i=0; i/library and /library/doc if( aId == KIWAY::FACE_SCH ) { + // Add schematic doc file path (library/doc) to search path list. + fn.AppendDir( wxT( "library" ) ); aDst->AddPaths( fn.GetPath() ); - // Add schematic doc file path (library/doc)to search path list. fn.AppendDir( wxT( "doc" ) ); aDst->AddPaths( fn.GetPath() ); @@ -85,8 +86,10 @@ static void setSearchPaths( SEARCH_STACK* aDst, KIWAY::FACE_T aId ) aDst->AddPaths( fn.GetPath() ); } + aDst->AddPaths( wxT( "/usr/local/share" ) ); + #if 1 && defined(DEBUG) - aDst->Show( "kiway" ); + aDst->Show( "kiface" ); #endif } @@ -121,86 +124,3 @@ void KIFACE_I::end_common() m_bm.End(); } - -wxString KIFACE_I::GetHelpFile() -{ - wxString fn; - wxArrayString subdirs; - wxArrayString altsubdirs; - - // FIXME: This is not the ideal way to handle this. Unfortunately, the - // CMake install paths seem to be a moving target so this crude - // hack solves the problem of install path differences between - // Windows and non-Windows platforms. - - // Partially fixed, but must be enhanced - - // Create subdir tree for "standard" linux distributions, when KiCad comes - // from a distribution files are in /usr/share/doc/kicad/help and binaries - // in /usr/bin or /usr/local/bin - subdirs.Add( wxT( "share" ) ); - subdirs.Add( wxT( "doc" ) ); - subdirs.Add( wxT( "kicad" ) ); - subdirs.Add( wxT( "help" ) ); - - // Create subdir tree for linux and Windows KiCad pack. - // Note the pack form under linux is also useful if a user wants to - // install KiCad to a server because there is only one path to mount - // or export (something like /usr/local/kicad). - // files are in /kicad/doc/help - // (often /usr/local/kicad/kicad/doc/help) - // /kicad/ is retrieved from m_BinDir - altsubdirs.Add( wxT( "doc" ) ); - altsubdirs.Add( wxT( "help" ) ); - - /* Search for a help file. - * we *must* find a help file. - * so help is searched in directories in this order: - * help/ like help/en_GB - * help/ like help/en - * help/en - */ - - wxLocale* i18n = Pgm().GetLocale(); - - // Step 1 : Try to find help file in help/ - subdirs.Add( i18n->GetCanonicalName() ); - altsubdirs.Add( i18n->GetCanonicalName() ); - - fn = m_bm.m_search.FindFileInSearchPaths( m_bm.m_help_file, &altsubdirs ); - - if( !fn ) - fn = m_bm.m_search.FindFileInSearchPaths( m_bm.m_help_file, &subdirs ); - - // Step 2 : if not found Try to find help file in help/ - if( !fn ) - { - subdirs.RemoveAt( subdirs.GetCount() - 1 ); - altsubdirs.RemoveAt( altsubdirs.GetCount() - 1 ); - - // wxLocale::GetName() does not return always the short name - subdirs.Add( i18n->GetName().BeforeLast( '_' ) ); - altsubdirs.Add( i18n->GetName().BeforeLast( '_' ) ); - - fn = m_bm.m_search.FindFileInSearchPaths( m_bm.m_help_file, &altsubdirs ); - - if( !fn ) - fn = m_bm.m_search.FindFileInSearchPaths( m_bm.m_help_file, &subdirs ); - } - - // Step 3 : if not found Try to find help file in help/en - if( !fn ) - { - subdirs.RemoveAt( subdirs.GetCount() - 1 ); - altsubdirs.RemoveAt( altsubdirs.GetCount() - 1 ); - subdirs.Add( wxT( "en" ) ); - altsubdirs.Add( wxT( "en" ) ); - - fn = m_bm.m_search.FindFileInSearchPaths( m_bm.m_help_file, &altsubdirs ); - - if( !fn ) - fn = m_bm.m_search.FindFileInSearchPaths( m_bm.m_help_file, &subdirs ); - } - - return fn; -} diff --git a/common/pgm_base.cpp b/common/pgm_base.cpp index e0af909af6..1789f939ed 100644 --- a/common/pgm_base.cpp +++ b/common/pgm_base.cpp @@ -297,6 +297,13 @@ void PGM_BASE::destroy() delete m_locale; m_locale = 0; + /* + // Close the help frame + if( m_html_ctrl && m_html_ctrl->GetFrame() ) // returns NULL if no help frame active + m_html_ctrl->GetFrame()->Close( true ); + } + */ + delete m_html_ctrl; m_html_ctrl = 0; } @@ -415,30 +422,18 @@ bool PGM_BASE::initPgm() } -void PGM_BASE::SetHtmlHelpController( wxHtmlHelpController* aController ) +void PGM_BASE::initHtmlHelpController() { - delete m_html_ctrl; - m_html_ctrl = aController; -} - - -void PGM_BASE::InitOnLineHelp() -{ - wxString fullfilename = FindKicadHelpPath(); - #if defined ONLINE_HELP_FILES_FORMAT_IS_HTML - m_HelpFileName = fullfilename + wxT( ".html" ); - fullfilename += wxT( "kicad.hhp" ); - if( wxFileExists( fullfilename ) ) - { - m_html_ctrl = new wxHtmlHelpController( wxHF_TOOLBAR | wxHF_CONTENTS | - wxHF_PRINT | wxHF_OPEN_FILES - /*| wxHF_SEARCH */ ); - m_html_ctrl->UseConfig( m_common_settings ); - m_html_ctrl->SetTitleFormat( wxT( "KiCad Help" ) ); - m_html_ctrl->AddBook( fullfilename ); - } + if( !m_html_ctrl ) + m_html_ctrl = new wxHtmlHelpController( + wxHF_TOOLBAR | wxHF_CONTENTS | + wxHF_PRINT | wxHF_OPEN_FILES + // | wxHF_SEARCH + ); + + wxASSERT( m_html_ctrl ); // may not leave here as NULL #elif defined ONLINE_HELP_FILES_FORMAT_IS_PDF m_html_ctrl = NULL; @@ -449,10 +444,22 @@ void PGM_BASE::InitOnLineHelp() } +wxHtmlHelpController* PGM_BASE::HtmlHelpController() +{ + if( !m_html_ctrl ) + initHtmlHelpController(); + + // there should not be calls to this unless ONLINE_HELP_FILES_FORMAT_IS_HTML is defined + wxASSERT( m_html_ctrl ); + + return m_html_ctrl; +} + + + bool PGM_BASE::setExecutablePath() { -// Apple MacOSx -#ifdef __APPLE__ +#ifdef __APPLE__ // Apple MacOSx // Derive path from location of the app bundle CFBundleRef mainBundle = CFBundleGetMainBundle(); diff --git a/common/search_stack.cpp b/common/search_stack.cpp index f4792f89c2..d9f6a5c870 100644 --- a/common/search_stack.cpp +++ b/common/search_stack.cpp @@ -104,31 +104,6 @@ void SEARCH_STACK::AddPaths( const wxString& aPaths, int aIndex ) } -wxString SEARCH_STACK::FindFileInSearchPaths( - const wxString& aFilename, const wxArrayString* aSubdirs ) -{ - wxPathList paths; - - for( unsigned i = 0; i < GetCount(); ++i ) - { - wxFileName fn( (*this)[i] ); - - if( aSubdirs ) - { - for( unsigned j = 0; j < aSubdirs->GetCount(); j++ ) - fn.AppendDir( (*aSubdirs)[j] ); - } - - if( fn.DirExists() ) - { - paths.Add( fn.GetPath() ); - } - } - - return paths.FindValidPath( aFilename ); -} - - void RETAINED_PATH::Clear() { m_retained_path.Clear(); diff --git a/common/searchhelpfilefullpath.cpp b/common/searchhelpfilefullpath.cpp new file mode 100644 index 0000000000..3ce17dfbd2 --- /dev/null +++ b/common/searchhelpfilefullpath.cpp @@ -0,0 +1,128 @@ + +#include +#include + + + +/** + * Function FindFileInSearchPaths + * looks in "this" for \a aFilename, but first modifies every search + * path by appending a list of path fragments from aSubdirs. That modification + * is not rentative. + */ +wxString FindFileInSearchPaths( const SEARCH_STACK& aStack, + const wxString& aFilename, const wxArrayString* aSubdirs ) +{ + wxPathList paths; + + for( unsigned i = 0; i < aStack.GetCount(); ++i ) + { + wxFileName fn( aStack[i], wxEmptyString ); + + if( aSubdirs ) + { + for( unsigned j = 0; j < aSubdirs->GetCount(); j++ ) + fn.AppendDir( (*aSubdirs)[j] ); + } + + if( fn.DirExists() ) + { + paths.Add( fn.GetPath() ); + } + } + + return paths.FindValidPath( aFilename ); +} + + +// See also FindKicadHelpPath.cpp.notused. +wxString SearchHelpFileFullPath( const SEARCH_STACK& aSStack, const wxString& aBaseName ) +{ + wxArrayString subdirs; + wxArrayString altsubdirs; + SEARCH_STACK ss = aSStack; + + // It might already be in aSStack, but why depend on other code + // far away when it's so easy to add it again (to our copy) as the first place to look. + // This is CMAKE_INSTALL_PREFIX: + ss.AddPaths( wxT( DEFAULT_INSTALL_PATH ), 0 ); + + // If there's a KICAD environment variable set, use that guy's path also + ss.AddPaths( Pgm().GetKicadEnvVariable(), 0 ); + +#if 1 // && defined(__linux__) + // Based on kicad-doc.bzr/CMakeLists.txt, line 20, the help files are + // installed into "/share/doc/kicad/help" for linux. + // This is ${KICAD_HELP} var in that CMakeLists.txt file. + // Below we account for an international subdirectory. + subdirs.Add( wxT( "share" ) ); + subdirs.Add( wxT( "doc" ) ); + subdirs.Add( wxT( "kicad" ) ); + subdirs.Add( wxT( "help" ) ); +#endif + +#if 1 // && defined(__WINDOWS__) + // Based on kicad-doc.bzr/CMakeLists.txt, line 35, the help files are + // installed into "/doc/help" for Windows. + // This is ${KICAD_HELP} var in that CMakeLists.txt file. + // Below we account for an international subdirectory. + altsubdirs.Add( wxT( "doc" ) ); + altsubdirs.Add( wxT( "help" ) ); +#endif + + /* Search for a help file. + * we *must* find a help file. + * so help is searched in directories in this order: + * help/ like help/en_GB + * help/ like help/en + * help/en + */ + + wxLocale* i18n = Pgm().GetLocale(); + + // Step 1 : Try to find help file in help/ + subdirs.Add( i18n->GetCanonicalName() ); + altsubdirs.Add( i18n->GetCanonicalName() ); + +#if defined(DEBUG) && 0 + ss.Show( __func__ ); + printf( "%s: m_help_file:'%s'\n", __func__, TO_UTF8( aBaseName ) ); +#endif + + wxString fn = FindFileInSearchPaths( ss, aBaseName, &altsubdirs ); + + if( !fn ) + fn = FindFileInSearchPaths( ss, aBaseName, &subdirs ); + + // Step 2 : if not found Try to find help file in help/ + if( !fn ) + { + subdirs.RemoveAt( subdirs.GetCount() - 1 ); + altsubdirs.RemoveAt( altsubdirs.GetCount() - 1 ); + + // wxLocale::GetName() does not return always the short name + subdirs.Add( i18n->GetName().BeforeLast( '_' ) ); + altsubdirs.Add( i18n->GetName().BeforeLast( '_' ) ); + + fn = FindFileInSearchPaths( ss, aBaseName, &altsubdirs ); + + if( !fn ) + fn = FindFileInSearchPaths( ss, aBaseName, &subdirs ); + } + + // Step 3 : if not found Try to find help file in help/en + if( !fn ) + { + subdirs.RemoveAt( subdirs.GetCount() - 1 ); + altsubdirs.RemoveAt( altsubdirs.GetCount() - 1 ); + subdirs.Add( wxT( "en" ) ); + altsubdirs.Add( wxT( "en" ) ); + + fn = FindFileInSearchPaths( ss, aBaseName, &altsubdirs ); + + if( !fn ) + fn = FindFileInSearchPaths( ss, aBaseName, &subdirs ); + } + + return fn; +} diff --git a/cvpcb/cvframe.cpp b/cvpcb/cvframe.cpp index 6fc1292bc3..c878e61201 100644 --- a/cvpcb/cvframe.cpp +++ b/cvpcb/cvframe.cpp @@ -301,13 +301,6 @@ void CVPCB_MAINFRAME::OnCloseWindow( wxCloseEvent& Event ) } } - // Close the help frame - if( Pgm().GetHtmlHelpController() ) - { - if( Pgm().GetHtmlHelpController()->GetFrame() )// returns NULL if no help frame active - Pgm().GetHtmlHelpController()->GetFrame()->Close( true ); - } - if( m_NetlistFileName.IsOk() ) { UpdateFileHistory( m_NetlistFileName.GetFullPath() ); diff --git a/include/bin_mod.h b/include/bin_mod.h index edfc9cf8e7..1f687ad480 100644 --- a/include/bin_mod.h +++ b/include/bin_mod.h @@ -59,6 +59,8 @@ struct BIN_MOD wxString m_help_file; SEARCH_STACK m_search; + + }; #endif // BIN_MOD_H_ diff --git a/include/common.h b/include/common.h index a6b282df08..31d95c897f 100644 --- a/include/common.h +++ b/include/common.h @@ -589,4 +589,25 @@ wxString FormatDateLong( const wxDateTime &aDate ); */ void SystemDirsAppend( SEARCH_STACK* aSearchStack ); + +/** + * Function SearchHelpFileFullPath + * returns the help file's full path. + *

+ * Return the KiCad help file with path. + * If the help file for the current locale is not found, an attempt to find + * the English version of the help file is made. + * Help file is searched in directories in this order: + * help/\ like help/en_GB + * help/\ like help/en + * help/en + *

+ * @param aSearchStack contains some possible base dirs that may be above the + * the one actually holding @a aBaseName. These are starting points for nested searches. + * @param aBaseName is the name of the help file to search for. + * @return wxEmptyString is returned if aBaseName is not found, else the full path & filename. + */ +wxString SearchHelpFileFullPath( const SEARCH_STACK& aSearchStack, const wxString& aBaseName ); + + #endif // INCLUDE__COMMON_H_ diff --git a/include/gestfich.h b/include/gestfich.h index 324a767eb0..6a972ea059 100644 --- a/include/gestfich.h +++ b/include/gestfich.h @@ -89,28 +89,6 @@ int ExecuteFile( wxWindow* frame, const wxString& ExecFile, */ void AddDelimiterString( wxString& string ); -/** - * Function FindKicadHelpPath - * finds the absolute path for KiCad "help" (or "help/<language>") - * Find path kicad/doc/help/xx/ or kicad/doc/help/: - * from BinDir - * else from environment variable KICAD - * else from one of s_HelpPathList - * typically c:/kicad/doc/help or /usr/share/kicad/help - * or /usr/local/share/kicad/help - * (must have kicad in path name) - * - * xx = iso639-1 language id (2 letters (generic) or 4 letters): - * fr = french (or fr_FR) - * en = English (or en_GB or en_US ...) - * de = deutch - * es = spanish - * pt = portuguese (or pt_BR ...) - * - * default = en (if not found = fr) - */ -wxString FindKicadHelpPath(); - /** * Function KicadDatasPath * returns the data path common to KiCad. diff --git a/include/kiface_i.h b/include/kiface_i.h index 23f89dffbf..d764c9de35 100644 --- a/include/kiface_i.h +++ b/include/kiface_i.h @@ -100,33 +100,17 @@ public: wxConfigBase* KifaceSettings() const { return m_bm.m_config; } - const wxString& GetHelpFileName() const { return m_bm.m_help_file; } - void SetHelpFileName( const wxString& aFileName ) { m_bm.m_help_file = aFileName; } - /** - * Function GetHelpFile - * gets the help file path. - *

- * Return the KiCad help file with path. The base paths defined in - * m_searchPaths are tested for a valid file. The path returned can - * be relative depending on the paths added to m_searchPaths. See the - * documentation for wxPathList for more information. If the help file - * for the current locale is not found, an attempt to find the English - * version of the help file is made. - * wxEmptyString is returned if help file not found. - * Help file is searched in directories in this order: - * help/\ like help/en_GB - * help/\ like help/en - * help/en - *

+ * Function GetHelpFileName + * returns just the basename portion of the current help file. */ - wxString GetHelpFile(); + const wxString& GetHelpFileName() const { return m_bm.m_help_file; } - wxFileHistory& GetFileHistory() { return m_bm.m_history; } + wxFileHistory& GetFileHistory() { return m_bm.m_history; } /// Only for DSO specific 'non-library' files. /// (The library search path is in the PROJECT class.) - SEARCH_STACK& KifaceSearch() { return m_bm.m_search; } + SEARCH_STACK& KifaceSearch() { return m_bm.m_search; } private: KIWAY::FACE_T m_id; diff --git a/include/pgm_base.h b/include/pgm_base.h index 9ffd028fc7..89587d00a1 100644 --- a/include/pgm_base.h +++ b/include/pgm_base.h @@ -86,9 +86,7 @@ public: //--------------------------------------------------------- - VTBL_ENTRY wxHtmlHelpController* GetHtmlHelpController() { return m_html_ctrl; } - - VTBL_ENTRY void SetHtmlHelpController( wxHtmlHelpController* aController ); + VTBL_ENTRY wxHtmlHelpController* HtmlHelpController(); VTBL_ENTRY wxConfigBase* CommonSettings() const { return m_common_settings; } @@ -161,12 +159,6 @@ public: VTBL_ENTRY void SetLanguagePath(); - /** - * Function InitOnLineHelp - * initializes KiCad's online help. - */ - VTBL_ENTRY void InitOnLineHelp(); - /** * Function ReadPdfBrowserInfos * reads the PDF browser choice from the common configuration. @@ -217,6 +209,8 @@ protected: */ bool initPgm(); + void initHtmlHelpController(); + /** * Function loadCommonSettings * loads the program (process) settings subset which are stored in .kicad_common diff --git a/include/search_stack.h b/include/search_stack.h index c3dd9a1b9a..42534bb74a 100644 --- a/include/search_stack.h +++ b/include/search_stack.h @@ -57,15 +57,6 @@ public: * ";" on windows, or ":" | ";" on unix. */ void RemovePaths( const wxString& aPaths ); - - /** - * Function FindFileInSearchPaths - * looks in "this" for \a aFilename, but first modifies every search - * path by appending a list of path fragments from aSubdirs. That modification - * is not rentative. - */ - wxString FindFileInSearchPaths( const wxString& aFilename, - const wxArrayString* aSubdirs = NULL ); }; diff --git a/include/wxstruct.h b/include/wxstruct.h index fb79aae9a7..dbf8679ef5 100644 --- a/include/wxstruct.h +++ b/include/wxstruct.h @@ -186,6 +186,15 @@ protected: */ virtual wxConfigBase* config(); + /** + * Function sys_search + * returns a SEARCH_STACK pertaining to entire program, and is overloaded in + * KICAD_MANAGER_FRAME + */ + virtual const SEARCH_STACK& sys_search(); + + virtual wxString help_name(); + public: EDA_BASE_FRAME( wxWindow* aParent, ID_DRAWFRAME_TYPE aFrameType, const wxString& aTitle, const wxPoint& aPos, const wxSize& aSize, diff --git a/kicad/kicad.h b/kicad/kicad.h index 129d29dc82..ffaac5afdc 100644 --- a/kicad/kicad.h +++ b/kicad/kicad.h @@ -123,6 +123,11 @@ class KICAD_MANAGER_FRAME : public EDA_BASE_FRAME protected: wxConfigBase* config(); // override EDA_BASE_FRAME virtual + const SEARCH_STACK& sys_search(); // override EDA_BASE_FRAME virtual + + wxString help_name(); // override EDA_BASE_FRAME virtual + + public: TREE_PROJECT_FRAME* m_LeftWin; LAUNCHER_PANEL* m_Launcher; diff --git a/kicad/mainframe.cpp b/kicad/mainframe.cpp index 55f5f1ba0b..e74c471dc1 100644 --- a/kicad/mainframe.cpp +++ b/kicad/mainframe.cpp @@ -123,6 +123,18 @@ wxConfigBase* KICAD_MANAGER_FRAME::config() } +const SEARCH_STACK& KICAD_MANAGER_FRAME::sys_search() +{ + return Pgm().SysSearch(); +} + + +wxString KICAD_MANAGER_FRAME::help_name() +{ + return Pgm().GetHelpFileName(); +} + + void KICAD_MANAGER_FRAME::PrintMsg( const wxString& aText ) { m_MessagesBox->AppendText( aText ); @@ -157,15 +169,6 @@ void KICAD_MANAGER_FRAME::OnCloseWindow( wxCloseEvent& Event ) Event.SetCanVeto( true ); - // Close the help frame - if( Pgm().GetHtmlHelpController() ) - { - if( Pgm().GetHtmlHelpController()->GetFrame() ) // returns NULL if no help frame active - Pgm().GetHtmlHelpController()->GetFrame()->Close( true ); - - Pgm().SetHtmlHelpController( NULL ); - } - m_LeftWin->Show( false ); Destroy(); diff --git a/kicad/pgm_kicad.h b/kicad/pgm_kicad.h index 5de4cebbb7..bb1069efac 100644 --- a/kicad/pgm_kicad.h +++ b/kicad/pgm_kicad.h @@ -58,6 +58,8 @@ public: SEARCH_STACK& SysSearch() { return m_bm.m_search; } + wxString GetHelpFileName() { return m_bm.m_help_file; } + protected: // The PGM_* classes can have difficulties at termination if they diff --git a/kicad/tree_project_frame.cpp b/kicad/tree_project_frame.cpp index 6e6c706371..0cc4add54d 100644 --- a/kicad/tree_project_frame.cpp +++ b/kicad/tree_project_frame.cpp @@ -94,10 +94,10 @@ static const wxChar* s_allowedExtensionsToList[] = */ /* File extension definitions. */ -const wxString TextFileExtension( wxT( "txt" ) ); +const wxChar TextFileExtension[] = wxT( "txt" ); /* File wildcard definitions. */ -const wxString TextFileWildcard( wxT( "Text files (*.txt)|*.txt" ) ); +const wxChar TextFileWildcard[] = wxT( "Text files (*.txt)|*.txt" ); /** @@ -177,7 +177,6 @@ void TREE_PROJECT_FRAME::RemoveFilter( const wxString& filter ) } - /** * Called by the popup menu in the tree frame * Creates a new subdirectory inside the current kicad project directory From 4a7ba86996f4adeab71dae08427de0cfc6296be9 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Tue, 15 Apr 2014 00:34:28 -0500 Subject: [PATCH 294/741] PROJECT::configCreate() logic changes. --- common/project.cpp | 62 ++++++++++++++++++++++++++++++---------------- include/project.h | 9 ------- 2 files changed, 41 insertions(+), 30 deletions(-) diff --git a/common/project.cpp b/common/project.cpp index 3e3c9cdf84..f031bf4b9e 100644 --- a/common/project.cpp +++ b/common/project.cpp @@ -23,18 +23,19 @@ */ +#include + #include #include #include #include #include -#include +#include #include #include #include - PROJECT::PROJECT() { memset( m_elems, 0, sizeof(m_elems) ); @@ -198,24 +199,21 @@ wxConfigBase* PROJECT::configCreate( const SEARCH_STACK& aSList, const wxString& const wxString& aGroupName, bool aForceUseLocalConfig ) { wxConfigBase* cfg = 0; - wxFileName fn = aFileName; + wxFileName fn = aFileName; fn.SetExt( ProjectFileExtension ); + wxString cur_pro_fn = fn.GetFullPath(); + // is there an edge transition, a change in m_project_filename? - if( m_project_name != fn ) + if( m_project_name != cur_pro_fn ) { - m_pcb_search.Clear(); m_sch_search.Clear(); - SetProjectFullName( fn.GetFullPath() ); - // to the empty lists, add project dir as first - m_pcb_search.AddPaths( fn.GetPath() ); m_sch_search.AddPaths( fn.GetPath() ); // append all paths from aSList - add_search_paths( &m_pcb_search, aSList, -1 ); add_search_paths( &m_sch_search, aSList, -1 ); // addLibrarySearchPaths( SEARCH_STACK* aSP, wxConfigBase* aCfg ) @@ -231,8 +229,6 @@ wxConfigBase* PROJECT::configCreate( const SEARCH_STACK& aSList, const wxString& // Init local config filename if( aForceUseLocalConfig || fn.FileExists() ) { - wxString cur_pro_fn = fn.GetFullPath(); - cfg = new wxFileConfig( wxEmptyString, wxEmptyString, cur_pro_fn, wxEmptyString ); cfg->DontCreateOnDemand(); @@ -265,31 +261,43 @@ wxConfigBase* PROJECT::configCreate( const SEARCH_STACK& aSList, const wxString& } else // Version incorrect { + wxLogDebug( wxT( "Project file version is zero, not using this old project file, going with template.\n") ); delete cfg; cfg = 0; } } - // Search for the template kicad.pro file by using caller's SEARCH_STACK. + // No suitable pro file was found, either does not exist, or is too old. + // Use the template kicad.pro file. Find it by using caller's SEARCH_STACK. wxString kicad_pro_template = aSList.FindValidPath( wxT( "kicad.pro" ) ); if( !kicad_pro_template ) { - wxLogDebug( wxT( "Template file not found." ) ); + wxLogDebug( wxT( "Template file not found using search paths." ) ); - fn = wxFileName( wxStandardPaths::Get().GetDocumentsDir(), - wxT( "kicad" ), ProjectFileExtension ); - } - else - { - fn = kicad_pro_template; + wxFileName templ( wxStandardPaths::Get().GetDocumentsDir(), + wxT( "kicad" ), ProjectFileExtension ); + + if( !templ.IsFileReadable() ) + { + wxString msg = wxString::Format( _( "Unable to find kicad.pro template file." ) ); + + DisplayError( NULL, msg ); + + return NULL; + } + + kicad_pro_template = templ.GetFullPath(); } - cfg = new wxFileConfig( wxEmptyString, wxEmptyString, wxEmptyString, fn.GetFullPath() ); + // copy the template to cur_pro_fn, and open it at that destination. + wxCopyFile( kicad_pro_template, cur_pro_fn ); + cfg = new wxFileConfig( wxEmptyString, wxEmptyString, wxEmptyString, cur_pro_fn ); + cfg->DontCreateOnDemand(); - SetProjectFullName( fn.GetFullPath() ); + SetProjectFullName( cur_pro_fn ); return cfg; } @@ -299,6 +307,12 @@ void PROJECT::ConfigSave( const SEARCH_STACK& aSList, const wxString& aFileName { std::auto_ptr cfg( configCreate( aSList, aFileName, aGroupName, FORCE_LOCAL_CONFIG ) ); + if( !cfg.get() ) + { + // could not find template + return; + } + cfg->SetPath( wxCONFIG_PATH_SEPARATOR ); cfg->Write( wxT( "update" ), DateAndTime() ); @@ -329,6 +343,12 @@ bool PROJECT::ConfigLoad( const SEARCH_STACK& aSList, const wxString& aFileName, { std::auto_ptr cfg( configCreate( aSList, aFileName, aGroupName, false ) ); + if( !cfg.get() ) + { + // could not find template + return false; + } + cfg->SetPath( wxCONFIG_PATH_SEPARATOR ); wxString timestamp = cfg->Read( wxT( "update" ) ); diff --git a/include/project.h b/include/project.h index 202d957eb8..a4928f4e5c 100644 --- a/include/project.h +++ b/include/project.h @@ -131,15 +131,6 @@ public: /// Accessor for Eeschema search stack. VTBL_ENTRY SEARCH_STACK& SchSearchS() { return m_sch_search; } - /** - * Function PcbSearchS - * returns the obsolete footprint library search stack. - * Projects created before the FP_LIB_TABLE support will have footprint - * search paths in the *.pro files. Projects created after the FP_LIB_TABLE - * support will not. This stack is used for conversion from old to new only. - */ - VTBL_ENTRY SEARCH_STACK& PcbSearchS() { return m_pcb_search; } - VTBL_ENTRY wxString GetModuleLibraryNickname() { return m_module_library_nickname; } VTBL_ENTRY void SetModuleLibraryNickname( const wxString& aNickName ) { m_module_library_nickname = aNickName; } From 8e6713ca02aa88c5c6308817abb00b7ebb245269 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Tue, 15 Apr 2014 00:55:15 -0500 Subject: [PATCH 295/741] Don't know how it ever worked before, supporting project template kicad.pro --- common/project.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/project.cpp b/common/project.cpp index f031bf4b9e..002bfa7d4f 100644 --- a/common/project.cpp +++ b/common/project.cpp @@ -261,7 +261,7 @@ wxConfigBase* PROJECT::configCreate( const SEARCH_STACK& aSList, const wxString& } else // Version incorrect { - wxLogDebug( wxT( "Project file version is zero, not using this old project file, going with template.\n") ); + wxLogDebug( wxT( "Project file version is zero, not using this old project file, going with template." ) ); delete cfg; cfg = 0; } @@ -293,7 +293,7 @@ wxConfigBase* PROJECT::configCreate( const SEARCH_STACK& aSList, const wxString& // copy the template to cur_pro_fn, and open it at that destination. wxCopyFile( kicad_pro_template, cur_pro_fn ); - cfg = new wxFileConfig( wxEmptyString, wxEmptyString, wxEmptyString, cur_pro_fn ); + cfg = new wxFileConfig( wxEmptyString, wxEmptyString, cur_pro_fn, wxEmptyString ); cfg->DontCreateOnDemand(); From bff37e504e1ec732463b6190c0826154a27c15b6 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 15 Apr 2014 16:36:23 +0200 Subject: [PATCH 296/741] wxWidgets 2.8 compatibility fixes. --- common/tool/tool_dispatcher.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index a387d6581a..502dccfbdb 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -251,6 +251,12 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) if( mods & MD_CTRL ) { +#if !wxCHECK_VERSION( 2, 9, 0 ) + // I really look forward to the day when we will use only one version of wxWidgets.. + const int WXK_CONTROL_A = 1; + const int WXK_CONTROL_Z = 26; +#endif + // wxWidgets have a quirk related to Ctrl+letter hot keys handled by CHAR_EVT // http://docs.wxwidgets.org/trunk/classwx_key_event.html: // "char events for ASCII letters in this case carry codes corresponding to the ASCII From e52d93429bde71cfeac5bce630d5ea88721de07f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 17 Apr 2014 17:02:36 -0500 Subject: [PATCH 297/741] The kicad.exe project manager was not finding the kicad.pro file because it did not know where the template directory was. --- kicad/kicad.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/kicad/kicad.cpp b/kicad/kicad.cpp index 742121c781..f6799d015f 100644 --- a/kicad/kicad.cpp +++ b/kicad/kicad.cpp @@ -79,6 +79,27 @@ bool PGM_KICAD::OnPgmInit( wxApp* aWxApp ) if( !initPgm() ) return false; + // Add search paths to feed the PGM_KICAD::SysSearch() function, + // currenly limited in support to only look for project templates + { + SEARCH_STACK bases; + + SystemDirsAppend( &bases ); + + // DBG( bases.Show( (std::string(__func__) + " bases").c_str() );) + + for( unsigned i = 0; i < bases.GetCount(); ++i ) + { + wxFileName fn( bases[i], wxEmptyString ); + + // Add KiCad template file path to search path list. + fn.AppendDir( wxT( "template" ) ); + m_bm.m_search.AddPaths( fn.GetPath() ); + } + + //DBG( m_bm.m_search.Show( (std::string( __func__ ) + " SysSearch()").c_str() );) + } + // Read current setup and reopen last directory if no filename to open on // command line. if( App().argc == 1 ) From 5f65d0da930cc8c299af7e755b1ab9ff89c7731b Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Thu, 17 Apr 2014 21:05:40 -0500 Subject: [PATCH 298/741] *) Add KIFACE_I::StartFlags() and IsSingle() so a KIFACE implementation can know if it is running under single_top.cpp or under a project manager. *) Test Kiface().IsSingle() when adding menus, some operations are not permitted when running under a project manager and the KIWAY_PLAYER is pegged to a specific project. *) Implemented KIWAY::KiFACE() so it loads *.kiface files. They still have to be in the same directory as the main *.exe launcher, so this presents some difficulty when the binaries are not yet installed but rather the *.kiface files are still in their original build directories. For today, I simply copied _pcbnew.kiface to build/kicad/. *) Add a test case to kicad/mainframe.cpp just to get an early peek at loading _pcbnew.kiface under the C++ project manager. Got that working for one specific invocation just for proof of concept. Surprise, it works. --- bitmap2component/bitmap2cmp_gui.cpp | 6 +- common/CMakeLists.txt | 1 + common/kiface_i.cpp | 4 +- common/kiway.cpp | 82 +++++++++---- common/prependpath.cpp | 70 +++++++++++ common/project.cpp | 16 ++- common/single_top.cpp | 78 ++----------- cvpcb/cvpcb.cpp | 6 +- cvpcb/readwrite_dlgs.cpp | 3 +- eeschema/eeschema.cpp | 28 ++--- eeschema/schframe.cpp | 4 +- gerbview/gerbview.cpp | 6 +- include/common.h | 4 + include/config_params.h | 1 - include/kiface_i.h | 23 +++- include/kiway.h | 61 ++++------ include/kiway_mgr.h | 68 +++++++++++ include/kiway_player.h | 49 +++++++- kicad/commandframe.cpp | 2 +- kicad/kicad.cpp | 87 +++++++------- kicad/mainframe.cpp | 23 +++- pagelayout_editor/pl_editor.cpp | 6 +- pcb_calculator/pcb_calculator.cpp | 6 +- pcbnew/edit.cpp | 12 +- pcbnew/editmod.cpp | 4 +- pcbnew/menubar_pcbframe.cpp | 174 ++++++++-------------------- pcbnew/modedit.cpp | 4 +- pcbnew/pcbframe.cpp | 10 +- pcbnew/pcbnew.cpp | 18 +-- pcbnew/ratsnest.cpp | 5 +- 30 files changed, 488 insertions(+), 373 deletions(-) create mode 100644 common/prependpath.cpp create mode 100644 include/kiway_mgr.h diff --git a/bitmap2component/bitmap2cmp_gui.cpp b/bitmap2component/bitmap2cmp_gui.cpp index 7b11ffb860..9e8968ecfb 100644 --- a/bitmap2component/bitmap2cmp_gui.cpp +++ b/bitmap2component/bitmap2cmp_gui.cpp @@ -639,7 +639,7 @@ namespace BMP2CMP { static struct IFACE : public KIFACE_I { - bool OnKifaceStart( PGM_BASE* aProgram ); + bool OnKifaceStart( PGM_BASE* aProgram, int aCtlBits ); wxWindow* CreateWindow( wxWindow* aParent, int aClassId, KIWAY* aKiway, int aCtlBits = 0 ) { @@ -706,8 +706,8 @@ PGM_BASE& Pgm() #endif -bool IFACE::OnKifaceStart( PGM_BASE* aProgram ) +bool IFACE::OnKifaceStart( PGM_BASE* aProgram, int aCtlBits ) { - return start_common(); + return start_common( aCtlBits ); } diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index cb3d0fceb6..53fdaff9e3 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -186,6 +186,7 @@ set( COMMON_SRCS msgpanel.cpp netlist_keywords.cpp newstroke_font.cpp + prependpath.cpp project.cpp ptree.cpp reporter.cpp diff --git a/common/kiface_i.cpp b/common/kiface_i.cpp index 9432c057cd..3693d1998d 100644 --- a/common/kiface_i.cpp +++ b/common/kiface_i.cpp @@ -94,8 +94,10 @@ static void setSearchPaths( SEARCH_STACK* aDst, KIWAY::FACE_T aId ) } -bool KIFACE_I::start_common() +bool KIFACE_I::start_common( int aCtlBits ) { + m_start_flags = aCtlBits; + m_bm.Init(); m_bm.m_config->Read( showPageLimitsKey, &g_ShowPageLimits ); diff --git a/common/kiway.cpp b/common/kiway.cpp index 577f118e66..390586a24b 100644 --- a/common/kiway.cpp +++ b/common/kiway.cpp @@ -22,15 +22,12 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ +#include + #include #include #include -#include - - -// one for each FACE_T -wxDynamicLibrary KIWAY::s_sch_dso; -wxDynamicLibrary KIWAY::s_pcb_dso; +#include KIWAY::KIWAY() @@ -39,20 +36,30 @@ KIWAY::KIWAY() } -/* -const wxString KIWAY::dso_name( FACE_T aFaceId ) +const wxString KIWAY::dso_full_path( FACE_T aFaceId ) { + const wxChar* name = wxT(""); + switch( aFaceId ) { - case FACE_SCH: return KIFACE_PREFIX wxT( "eeschema" ) KIFACE_SUFFIX; - case FACE_PCB: return KIFACE_PREFIX wxT( "pcbnew" ) KIFACE_SUFFIX; + case FACE_SCH: name = KIFACE_PREFIX wxT( "eeschema" ); break; + case FACE_PCB: name = KIFACE_PREFIX wxT( "pcbnew" ); break; default: wxASSERT_MSG( 0, wxT( "caller has a bug, passed a bad aFaceId" ) ); return wxEmptyString; } + + wxFileName fn = wxStandardPaths::Get().GetExecutablePath(); + + fn.SetName( name ); + + // Here a "suffix" == an extension with a preceding '.', + // so skip the preceding '.' to get an extension + fn.SetExt( KIFACE_SUFFIX + 1 ); // + 1 => &KIFACE_SUFFIX[1] + + return fn.GetFullPath(); } -*/ PROJECT& KIWAY::Prj() const @@ -61,14 +68,15 @@ PROJECT& KIWAY::Prj() const } -KIFACE* KIWAY::KiFACE( FACE_T aFaceId, bool doLoad ) +KIFACE* KIWAY::KiFACE( PGM_BASE* aProgram, FACE_T aFaceId, bool doLoad ) { switch( aFaceId ) { - case FACE_SCH: + // case FACE_SCH: case FACE_PCB: if( m_kiface[aFaceId] ) return m_kiface[aFaceId]; + break; default: wxASSERT_MSG( 0, wxT( "caller has a bug, passed a bad aFaceId" ) ); @@ -78,17 +86,47 @@ KIFACE* KIWAY::KiFACE( FACE_T aFaceId, bool doLoad ) // DSO with KIFACE has not been loaded yet, does user want to load it? if( doLoad ) { - switch( aFaceId ) + wxString dname = dso_full_path( aFaceId ); + + wxDynamicLibrary dso; + + void* addr = NULL; + + if( !dso.Load( dname, wxDL_VERBATIM | wxDL_NOW ) ) { - case FACE_SCH: - break; - - case FACE_PCB: - break; - - default: - ; + // Failure: error reporting UI was done via wxLogSysError(). + // No further reporting required here. } + + else if( ( addr = dso.GetSymbol( wxT( KIFACE_INSTANCE_NAME_AND_VERSION ) ) ) == NULL ) + { + // Failure: error reporting UI was done via wxLogSysError(). + // No further reporting required here. + } + + else + { + KIFACE_GETTER_FUNC* getter = (KIFACE_GETTER_FUNC*) addr; + + KIFACE* kiface = getter( &m_kiface_version[aFaceId], KIFACE_VERSION, aProgram ); + + // KIFACE_GETTER_FUNC function comment (API) says the non-NULL is unconditional. + wxASSERT_MSG( kiface, + wxT( "attempted DSO has a bug, failed to return a KIFACE*" ) ); + + // Give the DSO a single chance to do its "process level" initialization. + // "Process level" specifically means stay away from any projects in there. + if( kiface->OnKifaceStart( aProgram, KFCTL_PROJECT_SUITE ) ) + { + // Tell dso's wxDynamicLibrary destructor not to Unload() the program image. + (void) dso.Detach(); + + return m_kiface[aFaceId] = kiface; + } + } + + // In any of the failure cases above, dso.Unload() should be called here + // by dso destructor. } return NULL; diff --git a/common/prependpath.cpp b/common/prependpath.cpp new file mode 100644 index 0000000000..6f68678642 --- /dev/null +++ b/common/prependpath.cpp @@ -0,0 +1,70 @@ + +#include +#include +#include + + + +#if !wxCHECK_VERSION( 3, 0, 0 ) + +// implement missing wx2.8 function until >= wx3.0 pervades. +static wxString wxJoin(const wxArrayString& arr, const wxChar sep, + const wxChar escape = '\\') +{ + size_t count = arr.size(); + if ( count == 0 ) + return wxEmptyString; + + wxString str; + + // pre-allocate memory using the estimation of the average length of the + // strings in the given array: this is very imprecise, of course, but + // better than nothing + str.reserve(count*(arr[0].length() + arr[count-1].length()) / 2); + + if ( escape == wxT('\0') ) + { + // escaping is disabled: + for ( size_t i = 0; i < count; i++ ) + { + if ( i ) + str += sep; + str += arr[i]; + } + } + else // use escape character + { + for ( size_t n = 0; n < count; n++ ) + { + if ( n ) + str += sep; + + for ( wxString::const_iterator i = arr[n].begin(), + end = arr[n].end(); + i != end; + ++i ) + { + const wxChar ch = *i; + if ( ch == sep ) + str += escape; // escape this separator + str += ch; + } + } + } + + str.Shrink(); // release extra memory if we allocated too much + return str; +} +#endif + + +/// Put aPriorityPath in front of all paths in the value of aEnvVar. +const wxString PrePendPath( const wxString& aEnvVar, const wxString& aPriorityPath ) +{ + wxPathList paths; + + paths.AddEnvList( aEnvVar ); + paths.Insert( aPriorityPath, 0 ); + + return wxJoin( paths, wxPATH_SEP[0] ); +} diff --git a/common/project.cpp b/common/project.cpp index 002bfa7d4f..4825974a9c 100644 --- a/common/project.cpp +++ b/common/project.cpp @@ -43,14 +43,13 @@ PROJECT::PROJECT() PROJECT::~PROJECT() { - /* @todo - careful here, this may work, but the virtual destructor may not - be in the same link image as PROJECT. Won't enable this until - we're more stable and destructor is assuredly in same image, i.e. - libki.so +#if 1 + // careful here, this may work, but the virtual destructor may not + // be in the same link image as PROJECT. + for( unsigned i = 0; i cfg( configCreate( aSList, aFileName, aGroupName, FORCE_LOCAL_CONFIG ) ); + std::auto_ptr cfg( configCreate( aSList, aFileName, aGroupName, true ) ); if( !cfg.get() ) { @@ -353,8 +352,7 @@ bool PROJECT::ConfigLoad( const SEARCH_STACK& aSList, const wxString& aFileName, wxString timestamp = cfg->Read( wxT( "update" ) ); - if( doLoadOnlyIfNew && timestamp.size() && - timestamp == m_pro_date_and_time ) + if( doLoadOnlyIfNew && timestamp.size() && timestamp == m_pro_date_and_time ) { return false; } diff --git a/common/single_top.cpp b/common/single_top.cpp index 19104c4261..b1d925c99c 100644 --- a/common/single_top.cpp +++ b/common/single_top.cpp @@ -51,74 +51,8 @@ // The functions we use will cause the program launcher to pull stuff in // during linkage, keep the map file in mind to see what's going into it. - -#if !wxCHECK_VERSION( 3, 0, 0 ) - -// implement missing wx2.8 function until >= wx3.0 pervades. -static wxString wxJoin(const wxArrayString& arr, const wxChar sep, - const wxChar escape = '\\') -{ - size_t count = arr.size(); - if ( count == 0 ) - return wxEmptyString; - - wxString str; - - // pre-allocate memory using the estimation of the average length of the - // strings in the given array: this is very imprecise, of course, but - // better than nothing - str.reserve(count*(arr[0].length() + arr[count-1].length()) / 2); - - if ( escape == wxT('\0') ) - { - // escaping is disabled: - for ( size_t i = 0; i < count; i++ ) - { - if ( i ) - str += sep; - str += arr[i]; - } - } - else // use escape character - { - for ( size_t n = 0; n < count; n++ ) - { - if ( n ) - str += sep; - - for ( wxString::const_iterator i = arr[n].begin(), - end = arr[n].end(); - i != end; - ++i ) - { - const wxChar ch = *i; - if ( ch == sep ) - str += escape; // escape this separator - str += ch; - } - } - } - - str.Shrink(); // release extra memory if we allocated too much - return str; -} -#endif - - -/// Put aPriorityPath in front of all paths in the value of aEnvVar. -const wxString PrePendPath( const wxString& aEnvVar, const wxString& aPriorityPath ) -{ - wxPathList paths; - - paths.AddEnvList( aEnvVar ); - paths.Insert( aPriorityPath, 0 ); - - return wxJoin( paths, wxPATH_SEP[0] ); -} - - /// Extend LIB_ENV_VAR list with the directory from which I came, prepending it. -void SetLibEnvVar( const wxString& aAbsoluteArgv0 ) +static void set_lib_env_var( const wxString& aAbsoluteArgv0 ) { // POLICY CHOICE 2: Keep same path, so that installer MAY put the // "subsidiary DSOs" in the same directory as the kiway top process modules. @@ -149,6 +83,7 @@ void SetLibEnvVar( const wxString& aAbsoluteArgv0 ) #endif } + // POLICY CHOICE 1: return the full path of the DSO to load from single_top. static const wxString dso_full_path( const wxString& aAbsoluteArgv0 ) { @@ -339,7 +274,7 @@ bool PGM_SINGLE_TOP::OnPgmInit( wxApp* aWxApp ) // Set LIB_ENV_VAR *before* loading the DSO, in case the top-level DSO holding the // KIFACE has hard dependencies on subsidiary DSOs below it. - SetLibEnvVar( absoluteArgv0 ); + set_lib_env_var( absoluteArgv0 ); if( !initPgm() ) return false; @@ -364,7 +299,7 @@ bool PGM_SINGLE_TOP::OnPgmInit( wxApp* aWxApp ) // Give the DSO a single chance to do its "process level" initialization. // "Process level" specifically means stay away from any projects in there. - if( !kiface->OnKifaceStart( this ) ) + if( !kiface->OnKifaceStart( this, KFCTL_STANDALONE ) ) return false; // Use KIFACE to create a top window that the KIFACE knows about. @@ -418,8 +353,11 @@ bool PGM_SINGLE_TOP::OnPgmInit( wxApp* aWxApp ) if( !argv1.GetExt() ) argv1.SetExt( wxT( PGM_DATA_FILE_EXT ) ); - argSet[0] = argv1.GetFullPath(); #endif + argv1.MakeAbsolute(); + + argSet[0] = argv1.GetFullPath(); + if( !Pgm().LockFile( argSet[0] ) ) { wxLogSysError( _( "This file is already open." ) ); diff --git a/cvpcb/cvpcb.cpp b/cvpcb/cvpcb.cpp index ebc75ad5ff..266674667d 100644 --- a/cvpcb/cvpcb.cpp +++ b/cvpcb/cvpcb.cpp @@ -100,7 +100,7 @@ static struct IFACE : public KIFACE_I KIFACE_I( aName, aType ) {} - bool OnKifaceStart( PGM_BASE* aProgram ); + bool OnKifaceStart( PGM_BASE* aProgram, int aCtlBits ); void OnKifaceEnd(); @@ -276,13 +276,13 @@ FP_LIB_TABLE GFootprintTable; // we skip setting KISYSMOD here for now. User should set the environment // variable. -bool IFACE::OnKifaceStart( PGM_BASE* aProgram ) +bool IFACE::OnKifaceStart( PGM_BASE* aProgram, int aCtlBits ) { // This is process level, not project level, initialization of the DSO. // Do nothing in here pertinent to a project! - start_common(); + start_common( aCtlBits ); // Set 3D shape path from environment variable KISYS3DMOD set3DShapesPath( wxT("KISYS3DMOD") ); diff --git a/cvpcb/readwrite_dlgs.cpp b/cvpcb/readwrite_dlgs.cpp index 8683d50232..538fe34841 100644 --- a/cvpcb/readwrite_dlgs.cpp +++ b/cvpcb/readwrite_dlgs.cpp @@ -720,8 +720,7 @@ int CVPCB_MAINFRAME::SaveCmpLinkFile( const wxString& aFullFileName ) return 0; } - wxString msg; - msg.Printf( _("File %s saved"), GetChars( fn.GetFullPath() ) ); + wxString msg = wxString::Format( _("File %s saved"), GetChars( fn.GetFullPath() ) ); SetStatusText( msg ); return 1; } diff --git a/eeschema/eeschema.cpp b/eeschema/eeschema.cpp index c7e72dd048..0d0d0c43e9 100644 --- a/eeschema/eeschema.cpp +++ b/eeschema/eeschema.cpp @@ -68,7 +68,7 @@ static struct IFACE : public KIFACE_I KIFACE_I( aName, aType ) {} - bool OnKifaceStart( PGM_BASE* aProgram ); + bool OnKifaceStart( PGM_BASE* aProgram, int aCtlBits ); void OnKifaceEnd( PGM_BASE* aProgram ) { @@ -79,14 +79,6 @@ static struct IFACE : public KIFACE_I { switch( aClassId ) { - case LIBEDITOR_FRAME_TYPE: - { - LIB_EDIT_FRAME* frame = new LIB_EDIT_FRAME( aKiway, - dynamic_cast( aParent ) ); - return frame; - } - break; - case SCHEMATIC_FRAME_TYPE: { SCH_EDIT_FRAME* frame = new SCH_EDIT_FRAME( aKiway, aParent ); @@ -96,9 +88,19 @@ static struct IFACE : public KIFACE_I // Read a default config file in case no project given on command line. frame->LoadProjectFile( wxEmptyString, true ); - // @todo temporary - CreateServer( frame, KICAD_SCH_PORT_SERVICE_NUMBER ); + if( Kiface().IsSingle() ) + { + // only run this under single_top, not under a project manager. + CreateServer( frame, KICAD_SCH_PORT_SERVICE_NUMBER ); + } + return frame; + } + break; + case LIBEDITOR_FRAME_TYPE: + { + LIB_EDIT_FRAME* frame = new LIB_EDIT_FRAME( aKiway, + dynamic_cast( aParent ) ); return frame; } break; @@ -152,13 +154,13 @@ PGM_BASE& Pgm() } -bool IFACE::OnKifaceStart( PGM_BASE* aProgram ) +bool IFACE::OnKifaceStart( PGM_BASE* aProgram, int aCtlBits ) { // This is process level, not project level, initialization of the DSO. // Do nothing in here pertinent to a project! - start_common(); + start_common( aCtlBits ); // Give a default colour for all layers // (actual color will be initialized by config) diff --git a/eeschema/schframe.cpp b/eeschema/schframe.cpp index a2fba0988d..a26598437f 100644 --- a/eeschema/schframe.cpp +++ b/eeschema/schframe.cpp @@ -819,7 +819,9 @@ void SCH_EDIT_FRAME::OnOpenLibraryEditor( wxCommandEvent& event ) } else { - wxWindow* w = Kiface().CreateWindow( this, LIBEDITOR_FRAME_TYPE, &Kiway() ); + KIFACE_I& kf = Kiface(); + + wxWindow* w = kf.CreateWindow( this, LIBEDITOR_FRAME_TYPE, &Kiway(), kf.StartFlags() ); libeditFrame = dynamic_cast( w ); } diff --git a/gerbview/gerbview.cpp b/gerbview/gerbview.cpp index 4e52f3937a..e7ae04c786 100644 --- a/gerbview/gerbview.cpp +++ b/gerbview/gerbview.cpp @@ -73,7 +73,7 @@ static struct IFACE : public KIFACE_I KIFACE_I( aName, aType ) {} - bool OnKifaceStart( PGM_BASE* aProgram ); + bool OnKifaceStart( PGM_BASE* aProgram, int aCtlBits ); void OnKifaceEnd(); @@ -145,9 +145,9 @@ PGM_BASE& Pgm() } -bool IFACE::OnKifaceStart( PGM_BASE* aProgram ) +bool IFACE::OnKifaceStart( PGM_BASE* aProgram, int aCtlBits ) { - start_common(); + start_common( aCtlBits ); // Must be called before creating the main frame in order to // display the real hotkeys in menus or tool tips diff --git a/include/common.h b/include/common.h index 31d95c897f..ef03ea0e6a 100644 --- a/include/common.h +++ b/include/common.h @@ -610,4 +610,8 @@ void SystemDirsAppend( SEARCH_STACK* aSearchStack ); wxString SearchHelpFileFullPath( const SEARCH_STACK& aSearchStack, const wxString& aBaseName ); +/// Put aPriorityPath in front of all paths in the value of aEnvVar. +const wxString PrePendPath( const wxString& aEnvVar, const wxString& aPriorityPath ); + + #endif // INCLUDE__COMMON_H_ diff --git a/include/config_params.h b/include/config_params.h index e83899af85..5529fbfce5 100644 --- a/include/config_params.h +++ b/include/config_params.h @@ -49,7 +49,6 @@ #define CONFIG_VERSION 1 -#define FORCE_LOCAL_CONFIG true /** diff --git a/include/kiface_i.h b/include/kiface_i.h index d764c9de35..9fe034603a 100644 --- a/include/kiface_i.h +++ b/include/kiface_i.h @@ -43,7 +43,7 @@ public: // see base class KIFACE in kiway.h for doxygen docs - VTBL_ENTRY bool OnKifaceStart( PGM_BASE* aProgram ) = 0; + VTBL_ENTRY bool OnKifaceStart( PGM_BASE* aProgram, int aCtlBits ) = 0; /* { typically call start_common() in your overload @@ -58,7 +58,7 @@ public: } VTBL_ENTRY wxWindow* CreateWindow( wxWindow* aParent, - int aClassId, KIWAY* aKIWAY, int aCtlBits = 0 ) = 0; + int aClassId, KIWAY* aKIWAY, int aCtlBits ) = 0; VTBL_ENTRY void* IfaceOrAddress( int aDataId ) = 0; @@ -76,7 +76,8 @@ public: */ KIFACE_I( const char* aKifaceName, KIWAY::FACE_T aId ) : m_id( aId ), - m_bm( aKifaceName ) + m_bm( aKifaceName ), + m_start_flags( 0 ) { } @@ -85,7 +86,7 @@ public: protected: /// Common things to do for a top program module, during OnKifaceStart(). - bool start_common(); + bool start_common( int aCtlBits ); /// Common things to do for a top program module, during OnKifaceEnd(); void end_common(); @@ -100,6 +101,18 @@ public: wxConfigBase* KifaceSettings() const { return m_bm.m_config; } + /** + * Function StartFlags + * returns whatever was passed as @a aCtlBits to OnKifaceStart() + */ + int StartFlags() const { return m_start_flags; } + + /** + * Function IsSingle + * is this KIFACE_I running under single_top? + */ + bool IsSingle() const { return m_start_flags & KFCTL_STANDALONE; } + /** * Function GetHelpFileName * returns just the basename portion of the current help file. @@ -116,6 +129,8 @@ private: KIWAY::FACE_T m_id; BIN_MOD m_bm; + + int m_start_flags; ///< flags provided in OnKifaceStart() }; diff --git a/include/kiway.h b/include/kiway.h index b13f8b88e4..92e20b93e4 100644 --- a/include/kiway.h +++ b/include/kiway.h @@ -112,25 +112,20 @@ as such! As such, it is OK to use UTF8 characters: // be mangled. #define KIFACE_INSTANCE_NAME_AND_VERSION "KIFACE_1" - #if defined(__linux__) #define LIB_ENV_VAR wxT( "LD_LIBRARY_PATH" ) - #elif defined(__WXMAC__) #define LIB_ENV_VAR wxT( "DYLD_LIBRARY_PATH" ) - #elif defined(__MINGW32__) #define LIB_ENV_VAR wxT( "PATH" ) #endif class wxConfigBase; - - -class KIWAY; class wxWindow; -class PGM_BASE; class wxConfigBase; +class PGM_BASE; +class KIWAY; /** @@ -151,6 +146,10 @@ struct KIFACE // order of functions in this listing unless you recompile all clients of // this interface. +#define KFCTL_STANDALONE (1<<0) ///< Am running as a standalone Top. +#define KFCTL_PROJECT_SUITE (1<<1) ///< Am running under a project mgr, possibly with others + + /** * Function OnKifaceStart * is called just once shortly after the DSO is loaded. It is the second @@ -161,13 +160,15 @@ struct KIFACE * * @param aProgram is the process block: PGM_BASE* * + * @param aCtlBits consists of bit flags from the set of KFCTL_* \#defines above. + * * @return bool - true if DSO initialized OK, false if not. When returning * false, the loader may optionally decide to terminate the process or not, * but will not put out any UI because that is the duty of this function to say * why it is returning false. Never return false without having reported * to the UI why. */ - VTBL_ENTRY bool OnKifaceStart( PGM_BASE* aProgram ) = 0; + VTBL_ENTRY bool OnKifaceStart( PGM_BASE* aProgram, int aCtlBits ) = 0; /** * Function OnKifaceEnd @@ -176,8 +177,6 @@ struct KIFACE */ VTBL_ENTRY void OnKifaceEnd() = 0; -#define KFCTL_STANDALONE (1<<0) ///< Am running as a standalone Top. - /** * Function CreateWindow * creates a wxWindow for the current project. The caller @@ -199,7 +198,7 @@ struct KIFACE * not contained in the caller's link image. */ VTBL_ENTRY wxWindow* CreateWindow( wxWindow* aParent, int aClassId, - KIWAY* aKIWAY, int aCtlBits = 0 ) = 0; + KIWAY* aKIWAY, int aCtlBits ) = 0; /** * Function IfaceOrAddress @@ -249,7 +248,7 @@ class KIWAY : public wxEvtHandler { public: - /// DSO players on *this* KIWAY + /// Possible KIFACEs on *this* KIWAY enum FACE_T { FACE_SCH, ///< eeschema DSO @@ -257,6 +256,7 @@ public: FACE_PCB, ///< pcbnew DSO // FACE_MOD, FACE_CVPCB, + FACE_BMP2CMP, FACE_GERBVIEW, FACE_PL_EDITOR, @@ -265,41 +265,28 @@ public: FACE_COUNT, ///< how many KIWAY player types }; - /* from edaappl.h, now pgm_base.h, obsoleted by above FACE_T enum. - enum PGM_BASE_T - { - APP_UNKNOWN, - APP_EESCHEMA, - APP_PCBNEW, - APP_CVPCB, - APP_GERBVIEW, - APP_KICAD, - APP_PL_EDITOR, - APP_BM2CMP, - }; - */ + // If you change the vtable, recompile all of KiCad. - // Don't change the order of these VTBL_ENTRYs, add new ones at the end, - // unless you recompile all of KiCad. - VTBL_ENTRY KIFACE* KiFACE( FACE_T aFaceId, bool doLoad ); + /** + * Function KiFACE + * returns the KIFACE* given a FACE_T. If it is not already loaded, the + * KIFACE is loaded and initialized with a call to KIFACE::OnKifaceStart() + */ + VTBL_ENTRY KIFACE* KiFACE( PGM_BASE* aProgram, + FACE_T aFaceId, bool doLoad = true ); + VTBL_ENTRY PROJECT& Prj() const; KIWAY(); private: - /* - /// Get the name of the DSO holding the requested FACE_T. - static const wxString dso_name( FACE_T aFaceId ); - */ - - // one for each FACE_T - static wxDynamicLibrary s_sch_dso; - static wxDynamicLibrary s_pcb_dso; - //static wxDynamicLibrary s_cvpcb_dso; // will get merged into pcbnew + /// Get the full path & name of the DSO holding the requested FACE_T. + static const wxString dso_full_path( FACE_T aFaceId ); KIFACE* m_kiface[FACE_COUNT]; + int m_kiface_version[FACE_COUNT]; PROJECT m_project; // do not assume this is here, use Prj(). }; diff --git a/include/kiway_mgr.h b/include/kiway_mgr.h new file mode 100644 index 0000000000..4dde97c65f --- /dev/null +++ b/include/kiway_mgr.h @@ -0,0 +1,68 @@ + +#ifndef KIWAY_MGR_H_ +#define KIWAY_MGR_H_ + +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2014 KiCad Developers, see CHANGELOG.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 +#include + + +/** + * Class KIWAY_MGR + * is a container for all KIWAYS [and PROJECTS]. This class needs to work both + * for a C++ project manager and an a wxPython one (after being moved into a + * header later). + */ +class KIWAY_MGR +{ +public: + //KIWAY_MGR(); + // ~KIWAY_MGR(); + + bool OnStart( wxApp* aProcess ); + + void OnEnd(); + + KIWAY& operator[]( int aIndex ) + { + wxASSERT( m_kiways.size() ); // stuffed in OnStart() + return m_kiways[aIndex]; + } + +private: + + // KIWAYs may not be moved once doled out, since window DNA depends on the + // pointer being good forever. + // boost_ptr::vector however never moves the object pointed to. + typedef boost::ptr_vector KIWAYS; + + KIWAYS m_kiways; +}; + +extern KIWAY_MGR Kiways; + +#endif // KIWAY_MGR_H_ diff --git a/include/kiway_player.h b/include/kiway_player.h index b61b6f195c..15d8489615 100644 --- a/include/kiway_player.h +++ b/include/kiway_player.h @@ -130,7 +130,7 @@ public: *

* Each derived class should handle this in a way specific to its needs. * No prompting is done inside here for any file or project. There should be - * need to call this with aFileList which is empty. However, calling it with + * no need to call this with aFileList which is empty. However, calling it with * a single filename which does not exist should indicate to the implementor * that a new session is being started and that the given name is the desired * name for the data file at time of save. @@ -166,4 +166,51 @@ public: } }; + +// psuedo code for OpenProjectFiles +#if 0 + +bool OpenProjectFiles( const std::vector& aFileList, int aCtl = 0 ) +{ + if( aFileList.size() != 1 ) + { + complain via UI. + return false + } + + assert( aFileList[0] is absolute ) // bug in single_top.cpp or project manager. + + if (window does not support appending) || !(aCtl & KICTL_OPEN_APPEND) + { + close any currently open project files. + } + + if( aFileList[0] does not exist ) + { + notify user file does not exist. + + create an empty project file + mark file as modified. + + use the default project config file. + } + else + { + load aFileList[0] + + use the project config file for project given by aFileList[0]s full path. + } + + UpdateTitle(); + + show contents. +} + + + +#endif + + + + #endif // KIWAY_PLAYER_H_ diff --git a/kicad/commandframe.cpp b/kicad/commandframe.cpp index ca53048b0c..1dc1b03d6b 100644 --- a/kicad/commandframe.cpp +++ b/kicad/commandframe.cpp @@ -59,7 +59,7 @@ int LAUNCHER_PANEL::GetPanelHeight() const * Function CreateCommandToolbar * create the buttons to call Eeschema CvPcb, Pcbnew and GerbView */ -void LAUNCHER_PANEL::CreateCommandToolbar( void ) +void LAUNCHER_PANEL::CreateCommandToolbar() { wxBitmapButton* btn; diff --git a/kicad/kicad.cpp b/kicad/kicad.cpp index f6799d015f..028b1aff91 100644 --- a/kicad/kicad.cpp +++ b/kicad/kicad.cpp @@ -28,10 +28,11 @@ */ +#include #include - +#include #include -#include +#include #include #include #include @@ -40,6 +41,40 @@ #include + +/// Extend LIB_ENV_VAR list with the directory from which I came, prepending it. +static void set_lib_env_var( const wxString& aAbsoluteArgv0 ) +{ + // POLICY CHOICE 2: Keep same path, so that installer MAY put the + // "subsidiary DSOs" in the same directory as the kiway top process modules. + // A subsidiary shared library is one that is not a top level DSO, but rather + // some shared library that a top level DSO needs to even be loaded. It is + // a static link to a shared object from a top level DSO. + + // This directory POLICY CHOICE 2 is not the only dir in play, since LIB_ENV_VAR + // has numerous path options in it, as does DSO searching on linux, windows, and OSX. + // See "man ldconfig" on linux. What's being done here is for quick installs + // into a non-standard place, and especially for Windows users who may not + // know what the PATH environment variable is or how to set it. + + wxFileName fn( aAbsoluteArgv0 ); + + wxString ld_path( LIB_ENV_VAR ); + wxString my_path = fn.GetPath(); + wxString new_paths = PrePendPath( ld_path, my_path ); + + wxSetEnv( ld_path, new_paths ); + +#if defined(DEBUG) + { + wxString test; + wxGetEnv( ld_path, &test ); + printf( "LIB_ENV_VAR:'%s'\n", TO_UTF8( test ) ); + } +#endif +} + + // a dummy to quiet linking with EDA_BASE_FRAME::config(); #include KIFACE_I& Kiface() @@ -62,7 +97,6 @@ bool PGM_KICAD::OnPgmInit( wxApp* aWxApp ) m_bm.Init(); -#if 0 // copied from single_top.c, possibly for milestone B) wxString absoluteArgv0 = wxStandardPaths::Get().GetExecutablePath(); if( !wxIsAbsolutePath( absoluteArgv0 ) ) @@ -71,10 +105,9 @@ bool PGM_KICAD::OnPgmInit( wxApp* aWxApp ) return false; } - // Set LIB_ENV_VAR *before* loading the DSO, in case the top-level DSO holding the - // KIFACE has hard dependencies on subsidiary DSOs below it. - SetLibEnvVar( absoluteArgv0 ); -#endif + // Set LIB_ENV_VAR *before* loading the KIFACE DSOs, in case they have hard + // dependencies on subsidiary DSOs below it. + set_lib_env_var( absoluteArgv0 ); if( !initPgm() ) return false; @@ -218,39 +251,7 @@ void PGM_KICAD::destroy() } -/** - * Class KIWAY_MGR - * is a container for all KIWAYS [and PROJECTS]. This class needs to work both - * for a C++ project manager and an a wxPython one (after being moved into a - * header later). - */ -class KIWAY_MGR -{ -public: - //KIWAY_MGR(); - // ~KIWAY_MGR(); - - bool OnStart( wxApp* aProcess ); - - void OnEnd(); - - KIWAY& operator[]( int aIndex ) - { - wxASSERT( m_kiways.size() ); // stuffed in OnStart() - return m_kiways[aIndex]; - } - -private: - - // KIWAYs may not be moved once doled out, since window DNA depends on the - // pointer being good forever. - // boost_ptr::vector however never moves the object pointed to. - typedef boost::ptr_vector KIWAYS; - - KIWAYS m_kiways; -}; - -static KIWAY_MGR kiways; +KIWAY_MGR Kiways; /** @@ -261,7 +262,7 @@ struct APP_KICAD : public wxApp { bool OnInit() // overload wxApp virtual { - if( kiways.OnStart( this ) ) + if( Kiways.OnStart( this ) ) { return Pgm().OnPgmInit( this ); } @@ -270,7 +271,7 @@ struct APP_KICAD : public wxApp int OnExit() // overload wxApp virtual { - kiways.OnEnd(); + Kiways.OnEnd(); Pgm().OnPgmExit(); @@ -296,7 +297,7 @@ IMPLEMENT_APP( APP_KICAD ); // this link image need this function. PROJECT& Prj() { - return kiways[0].Prj(); + return Kiways[0].Prj(); } diff --git a/kicad/mainframe.cpp b/kicad/mainframe.cpp index e74c471dc1..d75e25f5ed 100644 --- a/kicad/mainframe.cpp +++ b/kicad/mainframe.cpp @@ -30,6 +30,8 @@ #include #include +#include +#include #include #include #include @@ -238,10 +240,23 @@ void KICAD_MANAGER_FRAME::OnRunPcbNew( wxCommandEvent& event ) legacy_board.SetExt( LegacyPcbFileExtension ); kicad_board.SetExt( KiCadPcbFileExtension ); - if( !legacy_board.FileExists() || kicad_board.FileExists() ) - Execute( this, PCBNEW_EXE, QuoteFullPath( kicad_board ) ); - else - Execute( this, PCBNEW_EXE, QuoteFullPath( legacy_board ) ); + wxFileName& board = ( !legacy_board.FileExists() || kicad_board.FileExists() ) ? + kicad_board : legacy_board; + + +#if 0 // it works! + KIFACE* kiface = Kiways[0].KiFACE( &Pgm(), KIWAY::FACE_PCB ); + + KIWAY_PLAYER* frame = (KIWAY_PLAYER*) kiface->CreateWindow( this, PCB_FRAME_TYPE, &Kiways[0], KFCTL_PROJECT_SUITE ); + + frame->OpenProjectFiles( std::vector( 1, board.GetFullPath() ) ); + + frame->Show( true ); + frame->Raise(); + +#else + Execute( this, PCBNEW_EXE, QuoteFullPath( board ) ); +#endif } diff --git a/pagelayout_editor/pl_editor.cpp b/pagelayout_editor/pl_editor.cpp index b96b07d4aa..a72ee92505 100644 --- a/pagelayout_editor/pl_editor.cpp +++ b/pagelayout_editor/pl_editor.cpp @@ -54,7 +54,7 @@ static struct IFACE : public KIFACE_I KIFACE_I( aName, aType ) {} - bool OnKifaceStart( PGM_BASE* aProgram ); + bool OnKifaceStart( PGM_BASE* aProgram, int aCtlBits ); void OnKifaceEnd(); @@ -126,9 +126,9 @@ PGM_BASE& Pgm() } -bool IFACE::OnKifaceStart( PGM_BASE* aProgram ) +bool IFACE::OnKifaceStart( PGM_BASE* aProgram, int aCtlBits ) { - start_common(); + start_common( aCtlBits ); // Must be called before creating the main frame in order to // display the real hotkeys in menus or tool tips diff --git a/pcb_calculator/pcb_calculator.cpp b/pcb_calculator/pcb_calculator.cpp index cfec7e2135..31f27c7a61 100644 --- a/pcb_calculator/pcb_calculator.cpp +++ b/pcb_calculator/pcb_calculator.cpp @@ -55,7 +55,7 @@ static struct IFACE : public KIFACE_I KIFACE_I( aName, aType ) {} - bool OnKifaceStart( PGM_BASE* aProgram ); + bool OnKifaceStart( PGM_BASE* aProgram, int aCtlBits ); void OnKifaceEnd(); @@ -117,9 +117,9 @@ PGM_BASE& Pgm() } -bool IFACE::OnKifaceStart( PGM_BASE* aProgram ) +bool IFACE::OnKifaceStart( PGM_BASE* aProgram, int aCtlBits ) { - start_common(); + start_common( aCtlBits ); return true; } diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index b957b10db6..de2c27b58f 100644 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -194,7 +194,9 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) if( !editor ) { - editor = (FOOTPRINT_EDIT_FRAME*) Kiface().CreateWindow( this, MODULE_EDITOR_FRAME_TYPE, &Kiway() ); + KIFACE_I& kf = Kiface(); + + editor = (FOOTPRINT_EDIT_FRAME*) kf.CreateWindow( this, MODULE_EDITOR_FRAME_TYPE, &Kiway(), kf.StartFlags() ); editor->Show( true ); editor->Zoom_Automatique( false ); @@ -220,7 +222,9 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) if( !viewer ) { - viewer = (FOOTPRINT_VIEWER_FRAME*) Kiface().CreateWindow( this, MODULE_VIEWER_FRAME_TYPE, &Kiway() ); + KIFACE_I& kf = Kiface(); + + viewer = (FOOTPRINT_VIEWER_FRAME*) kf.CreateWindow( this, MODULE_VIEWER_FRAME_TYPE, &Kiway(), kf.StartFlags() ); viewer->Show( true ); viewer->Zoom_Automatique( false ); @@ -839,7 +843,9 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) if( !editor ) { - editor = (FOOTPRINT_EDIT_FRAME*) Kiface().CreateWindow( this, MODULE_EDITOR_FRAME_TYPE, &Kiway() ); + KIFACE_I& kf = Kiface(); + + editor = (FOOTPRINT_EDIT_FRAME*) kf.CreateWindow( this, MODULE_EDITOR_FRAME_TYPE, &Kiway(), kf.StartFlags() ); } editor->Load_Module_From_BOARD( (MODULE*)GetCurItem() ); diff --git a/pcbnew/editmod.cpp b/pcbnew/editmod.cpp index 7eed255d4c..a7cc3cbe74 100644 --- a/pcbnew/editmod.cpp +++ b/pcbnew/editmod.cpp @@ -78,7 +78,9 @@ void PCB_EDIT_FRAME::InstallModuleOptionsFrame( MODULE* Module, wxDC* DC ) if( !editor ) { - editor = (FOOTPRINT_EDIT_FRAME*) Kiface().CreateWindow( this, MODULE_EDITOR_FRAME_TYPE, &Kiway() ); + KIFACE_I& kf = Kiface(); + + editor = (FOOTPRINT_EDIT_FRAME*) kf.CreateWindow( this, MODULE_EDITOR_FRAME_TYPE, &Kiway(), kf.StartFlags() ); } editor->Load_Module_From_BOARD( Module ); diff --git a/pcbnew/menubar_pcbframe.cpp b/pcbnew/menubar_pcbframe.cpp index 5aeaf4e4da..4192e44445 100644 --- a/pcbnew/menubar_pcbframe.cpp +++ b/pcbnew/menubar_pcbframe.cpp @@ -39,9 +39,6 @@ #include #include -/** - * Pcbnew mainframe menubar - */ void PCB_EDIT_FRAME::ReCreateMenuBar() { wxString text; @@ -49,7 +46,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() wxFileHistory& fhist = Kiface().GetFileHistory(); - if( ! menuBar ) + if( !menuBar ) menuBar = new wxMenuBar(); // Delete all existing menus so they can be rebuilt. @@ -64,17 +61,19 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() // Create File Menu wxMenu* filesMenu = new wxMenu; - // New - AddMenuItem( filesMenu, ID_NEW_BOARD, - _( "&New" ), - _( "Clear current board and initialize a new one" ), - KiBitmap( new_pcb_xpm ) ); + if( Kiface().IsSingle() ) // not when under a project mgr + { + AddMenuItem( filesMenu, ID_NEW_BOARD, + _( "&New" ), + _( "Clear current board and initialize a new one" ), + KiBitmap( new_pcb_xpm ) ); - // Open - text = AddHotkeyName( _( "&Open" ), g_Board_Editor_Hokeys_Descr, HK_LOAD_BOARD ); - AddMenuItem( filesMenu, ID_LOAD_FILE, text, - _( "Delete current board and load new board" ), - KiBitmap( open_brd_file_xpm ) ); + // Open + text = AddHotkeyName( _( "&Open" ), g_Board_Editor_Hokeys_Descr, HK_LOAD_BOARD ); + AddMenuItem( filesMenu, ID_LOAD_FILE, text, + _( "Delete current board and load new board" ), + KiBitmap( open_brd_file_xpm ) ); + } // Load Recent submenu static wxMenu* openRecentMenu; @@ -89,44 +88,46 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() fhist.UseMenu( openRecentMenu ); fhist.AddFilesToMenu(); - AddMenuItem( filesMenu, openRecentMenu, - -1, _( "Open &Recent" ), - _( "Open a recent opened board" ), - KiBitmap( open_project_xpm ) ); + if( Kiface().IsSingle() ) // not when under a project mgr + { + AddMenuItem( filesMenu, openRecentMenu, + -1, _( "Open &Recent" ), + _( "Open a recent opened board" ), + KiBitmap( open_project_xpm ) ); + } - // Pcbnew Board AddMenuItem( filesMenu, ID_APPEND_FILE, _( "&Append Board" ), _( "Append another Pcbnew board to the current loaded board" ), KiBitmap( import_xpm ) ); filesMenu->AppendSeparator(); - // Save text = AddHotkeyName( _( "&Save" ), g_Board_Editor_Hokeys_Descr, HK_SAVE_BOARD ); AddMenuItem( filesMenu, ID_SAVE_BOARD, text, _( "Save current board" ), KiBitmap( save_xpm ) ); - // Save As - 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(); + if( Kiface().IsSingle() ) // not when under a project mgr + { + 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(); + } - // Revert AddMenuItem( filesMenu, ID_MENU_READ_BOARD_BACKUP_FILE, _( "Revert to Last" ), _( "Clear board and get previous backup version of board" ), KiBitmap( help_xpm ) ); - // Rescue - AddMenuItem( filesMenu, ID_MENU_RECOVER_BOARD_AUTOSAVE, _( "Rescue" ), - _( "Clear board and get last rescue file automatically saved by Pcbnew" ), - KiBitmap( help_xpm ) ); + AddMenuItem( filesMenu, ID_MENU_RECOVER_BOARD_AUTOSAVE, + _( "Rescue" ), + _( "Clear board and get last rescue file automatically saved by Pcbnew" ), + KiBitmap( help_xpm ) ); filesMenu->AppendSeparator(); - /* Fabrication Outputs submenu */ + //----- Fabrication Outputs submenu ----------------------------------------- wxMenu* fabricationOutputsMenu = new wxMenu; AddMenuItem( fabricationOutputsMenu, ID_PCB_GEN_POS_MODULES_FILE, _( "&Modules Position (.pos) File" ), @@ -138,40 +139,34 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() _( "Generate excellon2 drill file" ), KiBitmap( post_drill_xpm ) ); - // Module Report AddMenuItem( fabricationOutputsMenu, ID_GEN_EXPORT_FILE_MODULE_REPORT, _( "&Module (.rpt) Report" ), _( "Create a report of all modules on the current board" ), KiBitmap( tools_xpm ) ); AddMenuItem( fabricationOutputsMenu, ID_PCB_GEN_D356_FILE, - _( "IPC-D-356 Netlist File" ), - _( "Generate IPC-D-356 netlist file" ), - KiBitmap( netlist_xpm ) ); + _( "IPC-D-356 Netlist File" ), + _( "Generate IPC-D-356 netlist file" ), + KiBitmap( netlist_xpm ) ); - // Component File AddMenuItem( fabricationOutputsMenu, ID_PCB_GEN_CMP_FILE, _( "&Component (.cmp) File" ), _( "(Re)create components file (*.cmp) for CvPcb" ), KiBitmap( create_cmp_file_xpm ) ); - // BOM File AddMenuItem( fabricationOutputsMenu, ID_PCB_GEN_BOM_FILE_FROM_BOARD, _( "&BOM File" ), _( "Create a bill of materials from schematic" ), KiBitmap( bom_xpm ) ); - // Fabrications Outputs submenu append AddMenuItem( filesMenu, fabricationOutputsMenu, -1, _( "&Fabrication Outputs" ), _( "Generate files for fabrication" ), KiBitmap( fabrication_xpm ) ); - - /** Import submenu **/ + //----- Import submenu ------------------------------------------------------ wxMenu* submenuImport = new wxMenu(); - // Specctra Session AddMenuItem( submenuImport, ID_GEN_IMPORT_SPECCTRA_SESSION, _( "&Specctra Session" ), _( "Import a routed \"Specctra Session\" (*.ses) file" ), @@ -187,27 +182,23 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() _( "Import files" ), KiBitmap( import_xpm ) ); - /** Export submenu **/ + //----- Export submenu ------------------------------------------------------ wxMenu* submenuexport = new wxMenu(); - // Specctra DSN AddMenuItem( submenuexport, ID_GEN_EXPORT_SPECCTRA, _( "&Specctra DSN" ), _( "Export the current board to a \"Specctra DSN\" file" ), KiBitmap( export_dsn_xpm ) ); - // GenCAD AddMenuItem( submenuexport, ID_GEN_EXPORT_FILE_GENCADFORMAT, _( "&GenCAD" ), _( "Export GenCAD format" ), KiBitmap( export_xpm ) ); - // VRML AddMenuItem( submenuexport, ID_GEN_EXPORT_FILE_VRML, _( "&VRML" ), _( "Export a VRML board representation" ), KiBitmap( three_d_xpm ) ); - // IDF3 AddMenuItem( submenuexport, ID_GEN_EXPORT_FILE_IDF3, _( "I&DFv3 Export" ), _( "IDFv3 board and component export" ), KiBitmap( export_idf_xpm ) ); @@ -218,24 +209,20 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() filesMenu->AppendSeparator(); - // Page settings AddMenuItem( filesMenu, ID_SHEET_SET, _( "Page s&ettings" ), _( "Page settings for paper size and texts" ), KiBitmap( sheetset_xpm ) ); - // Print AddMenuItem( filesMenu, wxID_PRINT, _( "&Print" ), _( "Print board" ), KiBitmap( print_button_xpm ) ); - // Create SVG file AddMenuItem( filesMenu, ID_GEN_PLOT_SVG, _( "Export SV&G" ), _( "Export a board file in Scalable Vector Graphics format" ), KiBitmap( plot_svg_xpm ) ); - // Plot AddMenuItem( filesMenu, ID_GEN_PLOT, _( "P&lot" ), _( "Plot board in HPGL, PostScript or Gerber RS-274X format)" ), @@ -243,15 +230,14 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() filesMenu->AppendSeparator(); + //----- archive submenu ----------------------------------------------------- wxMenu* submenuarchive = new wxMenu(); - // Archive New Footprints AddMenuItem( submenuarchive, ID_MENU_ARCHIVE_NEW_MODULES, _( "&Archive New Footprints" ), _( "Archive new footprints only in a library (keep other footprints in this lib)" ), KiBitmap( library_update_xpm ) ); - // Create FootPrint Archive AddMenuItem( submenuarchive, ID_MENU_ARCHIVE_ALL_MODULES, _( "&Create Footprint Archive" ), _( "Archive all footprints in a library (old library will be deleted)" ), @@ -263,54 +249,45 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() _( "Archive or add footprints in a library file" ), KiBitmap( library_xpm ) ); - // Quit filesMenu->AppendSeparator(); AddMenuItem( filesMenu, wxID_EXIT, _( "&Quit" ), _( "Quit Pcbnew" ), KiBitmap( exit_xpm ) ); - /** Create Edit menu **/ + //----- Edit menu ----------------------------------------------------------- wxMenu* editMenu = new wxMenu; - // Undo text = AddHotkeyName( _( "&Undo" ), g_Pcbnew_Editor_Hokeys_Descr, HK_UNDO ); AddMenuItem( editMenu, wxID_UNDO, text, HELP_UNDO, KiBitmap( undo_xpm ) ); - // Redo text = AddHotkeyName( _( "&Redo" ), g_Pcbnew_Editor_Hokeys_Descr, HK_REDO ); AddMenuItem( editMenu, wxID_REDO, text, HELP_REDO, KiBitmap( redo_xpm ) ); - // Delete AddMenuItem( editMenu, ID_PCB_DELETE_ITEM_BUTT, _( "&Delete" ), _( "Delete items" ), KiBitmap( delete_xpm ) ); editMenu->AppendSeparator(); - // Find text = AddHotkeyName( _( "&Find" ), g_Pcbnew_Editor_Hokeys_Descr, HK_FIND_ITEM ); AddMenuItem( editMenu, ID_FIND_ITEMS, text, HELP_FIND , KiBitmap( find_xpm ) ); editMenu->AppendSeparator(); - // Global Deletions AddMenuItem( editMenu, ID_PCB_GLOBAL_DELETE, _( "&Global Deletions" ), _( "Delete tracks, modules, texts... on board" ), KiBitmap( general_deletions_xpm ) ); - // Cleanup Tracks and Vias AddMenuItem( editMenu, ID_MENU_PCB_CLEAN, _( "&Cleanup Tracks and Vias" ), _( "Clean stubs, vias, delete break points, or connect dangling tracks to pads and vias" ), KiBitmap( delete_xpm ) ); - // Swap Layers AddMenuItem( editMenu, ID_MENU_PCB_SWAP_LAYERS, _( "&Swap Layers" ), _( "Swap tracks on copper layers or drawings on other layers" ), KiBitmap( swap_layer_xpm ) ); - // Reset module reference sizes AddMenuItem( editMenu, ID_MENU_PCB_RESET_TEXTMODULE_FIELDS_SIZES, _( "&Reset Module Field Sizes" ), _( "Reset text size and width of all module fields to current defaults" ), @@ -323,7 +300,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() _( "Interactive router push&shove tool." ), KiBitmap( ps_router_xpm ) ); - /** Create View menu **/ + //----- View menu ----------------------------------------------------------- wxMenu* viewMenu = new wxMenu; /* Important Note for ZOOM IN and ZOOM OUT commands from menubar: @@ -337,104 +314,84 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() * in other words HK_ZOOM_IN and HK_ZOOM_OUT *are NOT* accelerators * for Zoom in and Zoom out sub menus */ - // Zoom In text = AddHotkeyName( _( "Zoom &In" ), g_Pcbnew_Editor_Hokeys_Descr, HK_ZOOM_IN, IS_ACCELERATOR ); AddMenuItem( viewMenu, ID_ZOOM_IN, text, HELP_ZOOM_IN, KiBitmap( zoom_in_xpm ) ); - // Zoom Out text = AddHotkeyName( _( "Zoom &Out" ), g_Pcbnew_Editor_Hokeys_Descr, HK_ZOOM_OUT, IS_ACCELERATOR ); AddMenuItem( viewMenu, ID_ZOOM_OUT, text, HELP_ZOOM_OUT, KiBitmap( zoom_out_xpm ) ); - // Fit on Screen text = AddHotkeyName( _( "&Fit on Screen" ), g_Pcbnew_Editor_Hokeys_Descr, HK_ZOOM_AUTO ); - AddMenuItem( viewMenu, ID_ZOOM_PAGE, text, HELP_ZOOM_FIT, KiBitmap( zoom_fit_in_page_xpm ) ); viewMenu->AppendSeparator(); - // Redraw text = AddHotkeyName( _( "&Redraw" ), g_Pcbnew_Editor_Hokeys_Descr, HK_ZOOM_REDRAW ); - AddMenuItem( viewMenu, ID_ZOOM_REDRAW, text, HELP_ZOOM_REDRAW, KiBitmap( zoom_redraw_xpm ) ); viewMenu->AppendSeparator(); - // 3D Display AddMenuItem( viewMenu, ID_MENU_PCB_SHOW_3D_FRAME, _( "&3D Display" ),_( "Show board in 3D viewer" ), KiBitmap( three_d_xpm ) ); - // List Nets AddMenuItem( viewMenu, ID_MENU_LIST_NETS, _( "&List Nets" ), _( "View a list of nets with names and id's" ), KiBitmap( tools_xpm ) ); - // Switching GAL-based canvas on/off viewMenu->AppendSeparator(); text = AddHotkeyName( _( "&Switch canvas to default" ), g_Pcbnew_Editor_Hokeys_Descr, HK_CANVAS_DEFAULT, IS_ACCELERATOR ); - AddMenuItem( viewMenu, ID_MENU_CANVAS_DEFAULT, text, _( "Switch the canvas implementation to default" ), KiBitmap( tools_xpm ) ); text = AddHotkeyName( _( "&Switch canvas to OpenGL" ), g_Pcbnew_Editor_Hokeys_Descr, HK_CANVAS_OPENGL, IS_ACCELERATOR ); - AddMenuItem( viewMenu, ID_MENU_CANVAS_OPENGL, text, _( "Switch the canvas implementation to OpenGL" ), KiBitmap( tools_xpm ) ); text = AddHotkeyName( _( "&Switch canvas to Cairo" ), g_Pcbnew_Editor_Hokeys_Descr, HK_CANVAS_CAIRO, IS_ACCELERATOR ); - AddMenuItem( viewMenu, ID_MENU_CANVAS_CAIRO, text, _( "Switch the canvas implementation to Cairo" ), KiBitmap( tools_xpm ) ); - /** Create Place Menu **/ + //----- Place Menu ---------------------------------------------------------- wxMenu* placeMenu = new wxMenu; - // Module text = AddHotkeyName( _( "&Module" ), g_Pcbnew_Editor_Hokeys_Descr, HK_ADD_MODULE, IS_ACCELERATOR ); AddMenuItem( placeMenu, ID_PCB_MODULE_BUTT, text, _( "Add modules" ), KiBitmap( module_xpm ) ); - // Track text = AddHotkeyName( _( "&Track" ), g_Pcbnew_Editor_Hokeys_Descr, HK_ADD_NEW_TRACK, IS_ACCELERATOR ); AddMenuItem( placeMenu, ID_TRACK_BUTT, text, _( "Add tracks and vias" ), KiBitmap( add_tracks_xpm ) ); - // Zone AddMenuItem( placeMenu, ID_PCB_ZONES_BUTT, _( "&Zone" ), _( "Add filled zones" ), KiBitmap( add_zone_xpm ) ); - // Keepout areas AddMenuItem( placeMenu, ID_PCB_KEEPOUT_AREA_BUTT, _( "&Keepout Area" ), _( "Add keepout areas" ), KiBitmap( add_keepout_area_xpm ) ); - // Text AddMenuItem( placeMenu, ID_PCB_ADD_TEXT_BUTT, _( "Te&xt" ), _( "Add text on copper layers or graphic text" ), KiBitmap( add_text_xpm ) ); - // Graphic Arc AddMenuItem( placeMenu, ID_PCB_ARC_BUTT, _( "&Arc" ), _( "Add graphic arc" ),KiBitmap( add_arc_xpm ) ); - // Graphic Circle AddMenuItem( placeMenu, ID_PCB_CIRCLE_BUTT, _( "&Circle" ), _( "Add graphic circle" ), KiBitmap( add_circle_xpm ) ); - // Line or Polygon AddMenuItem( placeMenu, ID_PCB_ADD_LINE_BUTT, _( "&Line or Polygon" ), _( "Add graphic line or polygon" ), @@ -442,34 +399,29 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() placeMenu->AppendSeparator(); - // Dimension AddMenuItem( placeMenu, ID_PCB_DIMENSION_BUTT, _( "&Dimension" ), _( "Add dimension" ), KiBitmap( add_dimension_xpm ) ); - // Layer alignment target AddMenuItem( placeMenu, ID_PCB_MIRE_BUTT, _( "La&yer alignment target" ), _( "Add layer alignment target" ), KiBitmap( add_mires_xpm ) ); placeMenu->AppendSeparator(); - // Drill & Place Offset AddMenuItem( placeMenu, ID_PCB_PLACE_OFFSET_COORD_BUTT, _( "Drill and Place O&ffset" ), _( "Place the origin point for drill and place files" ), KiBitmap( pcb_offset_xpm ) ); - // Grid Origin AddMenuItem( placeMenu, ID_PCB_PLACE_GRID_COORD_BUTT, _( "&Grid Origin" ), _( "Set the origin point for the grid" ), KiBitmap( grid_select_axis_xpm ) ); - /* Create Preferences and configuration menu */ + //----- Preferences and configuration menu------------------------------------ wxMenu* configmenu = new wxMenu; - // Library AddMenuItem( configmenu, ID_PCB_LIB_TABLE_EDIT, _( "Li&brary Tables" ), _( "Setup footprint libraries" ), KiBitmap( library_table_xpm ) ); @@ -487,7 +439,6 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() HELP_SHOW_HIDE_MICROWAVE_TOOLS, KiBitmap( mw_toolbar_xpm ) ); - // General #ifdef __WXMAC__ configmenu->Append(wxID_PREFERENCES); @@ -497,52 +448,44 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() KiBitmap( preference_xpm ) ); #endif - // Display AddMenuItem( configmenu, ID_PCB_DISPLAY_OPTIONS_SETUP, _( "&Display" ), _( "Select how items (pads, tracks texts ... ) are displayed" ), KiBitmap( display_options_xpm ) ); - // Create sizes and dimensions submenu + //--- dimensions submenu ------------------------------------------------------ wxMenu* dimensionsMenu = new wxMenu; - // Grid AddMenuItem( dimensionsMenu, ID_PCB_USER_GRID_SETUP, _( "G&rid" ),_( "Adjust user grid dimensions" ), KiBitmap( grid_xpm ) ); - // Text and Drawings AddMenuItem( dimensionsMenu, ID_PCB_DRAWINGS_WIDTHS_SETUP, _( "Te&xts and Drawings" ), _( "Adjust dimensions for texts and drawings" ), KiBitmap( options_text_xpm ) ); - // Pads AddMenuItem( dimensionsMenu, ID_PCB_PAD_SETUP, _( "&Pads" ), _( "Adjust default pad characteristics" ), KiBitmap( pad_dimensions_xpm ) ); - // Pads Mask Clearance AddMenuItem( dimensionsMenu, ID_PCB_MASK_CLEARANCE, _( "Pads &Mask Clearance" ), _( "Adjust the global clearance between pads and the solder resist mask" ), KiBitmap( pads_mask_layers_xpm ) ); - // Save dimension preferences dimensionsMenu->AppendSeparator(); AddMenuItem( dimensionsMenu, ID_CONFIG_SAVE, _( "&Save" ), _( "Save dimension preferences" ), KiBitmap( save_xpm ) ); - // Language submenu Pgm().AddMenuLanguageList( configmenu ); // Hotkey submenu AddHotkeyConfigMenu( configmenu ); - - // Macros submenu + //--- Macros submenu -------------------------------------------------------- wxMenu* macrosMenu = new wxMenu; AddMenuItem( macrosMenu, ID_PREFRENCES_MACROS_SAVE, @@ -555,7 +498,6 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() _( "Read macros from file" ), KiBitmap( read_setup_xpm ) ); - // Append macros menu to config menu AddMenuItem( configmenu, macrosMenu, -1, _( "Ma&cros" ), _( "Macros save/read operations" ), @@ -563,75 +505,58 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() configmenu->AppendSeparator(); - // Save Preferences AddMenuItem( configmenu, ID_CONFIG_SAVE, _( "&Save Preferences" ), _( "Save application preferences" ), KiBitmap( save_setup_xpm ) ); - // Read Preferences AddMenuItem( configmenu, ID_CONFIG_READ, _( "&Read Preferences" ), _( "Read application preferences" ), KiBitmap( read_setup_xpm ) ); - /** - * Tools menu - */ + //----- Tools menu ---------------------------------------------------------- wxMenu* toolsMenu = new wxMenu; - /* Netlist */ AddMenuItem( toolsMenu, ID_GET_NETLIST, _( "&Netlist" ), _( "Read the netlist and update board connectivity" ), KiBitmap( netlist_xpm ) ); - /* Layer pair */ AddMenuItem( toolsMenu, ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR, _( "&Layer Pair" ), _( "Change the active layer pair" ), KiBitmap( select_layer_pair_xpm ) ); - /* DRC */ AddMenuItem( toolsMenu, ID_DRC_CONTROL, _( "&DRC" ), _( "Perform design rules check" ), KiBitmap( erc_xpm ) ); - /* FreeRoute */ AddMenuItem( toolsMenu, ID_TOOLBARH_PCB_FREEROUTE_ACCESS, _( "&FreeRoute" ), _( "Fast access to the Web Based FreeROUTE advanced router" ), KiBitmap( web_support_xpm ) ); -#ifdef KICAD_SCRIPTING_WXPYTHON - /* Scripting */ +#if defined(KICAD_SCRIPTING_WXPYTHON) AddMenuItem( toolsMenu, ID_TOOLBARH_PCB_SCRIPTING_CONSOLE, _( "&Scripting Console" ), _( "Show/Hide the Scripting console" ), KiBitmap( book_xpm ) ); #endif - /* Design Rules menu - */ wxMenu* designRulesMenu = new wxMenu; - // Design Rules AddMenuItem( designRulesMenu, ID_MENU_PCB_SHOW_DESIGN_RULES_DIALOG, _( "Design Rules" ), _( "Open the design rules editor" ), KiBitmap( hammer_xpm ) ); - // Layers Setup AddMenuItem( designRulesMenu, ID_PCB_LAYERS_SETUP, _( "&Layers Setup" ), _( "Enable and set layer properties" ), KiBitmap( copper_layers_setup_xpm ) ); - /** - * Help menu - */ wxMenu* helpMenu = new wxMenu; AddHelpVersionInfoMenuEntry( helpMenu ); - // Contents AddMenuItem( helpMenu, wxID_HELP, _( "&Contents" ), _( "Open the Pcbnew handbook" ), @@ -642,16 +567,13 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() _( "Open the \"Getting Started in KiCad\" guide for beginners" ), KiBitmap( help_xpm ) ); - // About helpMenu->AppendSeparator(); AddMenuItem( helpMenu, wxID_ABOUT, _( "&About Pcbnew" ), _( "About Pcbnew printed circuit board designer" ), KiBitmap( info_xpm ) ); - /** - * Append all menus to the menuBar - */ + // Append all menus to the menuBar menuBar->Append( filesMenu, _( "&File" ) ); menuBar->Append( editMenu, _( "&Edit" ) ); menuBar->Append( viewMenu, _( "&View" ) ); diff --git a/pcbnew/modedit.cpp b/pcbnew/modedit.cpp index 2729504ab1..22ef70221e 100644 --- a/pcbnew/modedit.cpp +++ b/pcbnew/modedit.cpp @@ -271,7 +271,9 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) FOOTPRINT_VIEWER_FRAME* viewer = FOOTPRINT_VIEWER_FRAME::GetActiveFootprintViewer( top_project ); if( !viewer ) { - viewer = (FOOTPRINT_VIEWER_FRAME*) Kiface().CreateWindow( this, MODULE_VIEWER_FRAME_TYPE, &Kiway() ); + KIFACE_I& kf = Kiface(); + + viewer = (FOOTPRINT_VIEWER_FRAME*) kf.CreateWindow( this, MODULE_VIEWER_FRAME_TYPE, &Kiway(), kf.StartFlags() ); viewer->Show( true ); viewer->Zoom_Automatique( false ); } diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 71918b8ef3..e815ed705a 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -85,9 +85,6 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME ) - EVT_SOCKET( ID_EDA_SOCKET_EVENT_SERV, PCB_EDIT_FRAME::OnSockRequestServer ) - EVT_SOCKET( ID_EDA_SOCKET_EVENT, PCB_EDIT_FRAME::OnSockRequest ) - EVT_COMBOBOX( ID_ON_ZOOM_SELECT, PCB_EDIT_FRAME::OnSelectZoom ) EVT_COMBOBOX( ID_ON_GRID_SELECT, PCB_EDIT_FRAME::OnSelectGrid ) @@ -450,7 +447,7 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : wxAuiPaneInfo( mesg ).Name( wxT( "MsgPanel" ) ).Bottom().Layer(10) ); -#ifdef KICAD_SCRIPTING_WXPYTHON +#if defined(KICAD_SCRIPTING_WXPYTHON) // Add the scripting panel EDA_PANEINFO pythonAuiInfo; pythonAuiInfo.ScriptingToolbarPane(); @@ -831,7 +828,7 @@ void PCB_EDIT_FRAME::SetGridColor(EDA_COLOR_T aColor) } -bool PCB_EDIT_FRAME::IsMicroViaAcceptable( void ) +bool PCB_EDIT_FRAME::IsMicroViaAcceptable() { int copperlayercnt = GetBoard()->GetCopperLayerCount( ); LAYER_NUM currLayer = getActiveLayer(); @@ -1106,7 +1103,7 @@ void PCB_EDIT_FRAME::UpdateTitle() SetTitle( title ); } -#ifdef KICAD_SCRIPTING_WXPYTHON +#if defined(KICAD_SCRIPTING_WXPYTHON) void PCB_EDIT_FRAME::ScriptingConsoleEnableDisable( wxCommandEvent& aEvent ) { if ( m_pythonPanelHidden ) @@ -1171,4 +1168,3 @@ void PCB_EDIT_FRAME::SetRotationAngle( int aRotationAngle ) m_rotationAngle = aRotationAngle; } - diff --git a/pcbnew/pcbnew.cpp b/pcbnew/pcbnew.cpp index c9a4129e1b..98e5a5b660 100644 --- a/pcbnew/pcbnew.cpp +++ b/pcbnew/pcbnew.cpp @@ -101,7 +101,7 @@ static struct IFACE : public KIFACE_I KIFACE_I( aName, aType ) {} - bool OnKifaceStart( PGM_BASE* aProgram ); + bool OnKifaceStart( PGM_BASE* aProgram, int aCtlBits ); void OnKifaceEnd(); @@ -116,14 +116,16 @@ static struct IFACE : public KIFACE_I frame->Zoom_Automatique( true ); -#ifdef KICAD_SCRIPTING +#if defined(KICAD_SCRIPTING) // give the scripting helpers access to our frame ScriptingSetPcbEditFrame( frame ); #endif - // @todo temporarily here - CreateServer( frame, KICAD_PCB_PORT_SERVICE_NUMBER ); - + if( Kiface().IsSingle() ) + { + // only run this under single_top, not under a project manager. + CreateServer( frame, KICAD_PCB_PORT_SERVICE_NUMBER ); + } return frame; } break; @@ -141,7 +143,6 @@ static struct IFACE : public KIFACE_I /* Read a default config file in case no project given on command line. frame->LoadProjectFile( wxEmptyString, true ); */ - return frame; } break; @@ -159,7 +160,6 @@ static struct IFACE : public KIFACE_I /* Read a default config file in case no project given on command line. frame->LoadProjectFile( wxEmptyString, true ); */ - return frame; } break; @@ -411,13 +411,13 @@ static bool scriptingSetup() FP_LIB_TABLE GFootprintTable; -bool IFACE::OnKifaceStart( PGM_BASE* aProgram ) +bool IFACE::OnKifaceStart( PGM_BASE* aProgram, int aCtlBits ) { // This is process level, not project level, initialization of the DSO. // Do nothing in here pertinent to a project! - start_common(); + start_common( aCtlBits ); // Must be called before creating the main frame in order to // display the real hotkeys in menus or tool tips diff --git a/pcbnew/ratsnest.cpp b/pcbnew/ratsnest.cpp index 028c632568..a9703a5450 100644 --- a/pcbnew/ratsnest.cpp +++ b/pcbnew/ratsnest.cpp @@ -234,9 +234,10 @@ void PCB_BASE_FRAME::Build_Board_Ratsnest() { NETINFO_ITEM* net = m_Pcb->FindNet( current_net_code ); - if( net == NULL ) //Should not occur + if( !net ) // Should not occur { - wxMessageBox( wxT( "Build_Board_Ratsnest() error: net not found" ) ); + UTF8 msg = StrPrintf( "%s: error, net %d not found", __func__, current_net_code ); + wxMessageBox( msg ); // BTW, it does happen. return; } From ee3e97e6cabab7de390a3e5cb810cc406302408d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nick=20=C3=98stergaard?= Date: Sat, 19 Apr 2014 18:05:58 +0200 Subject: [PATCH 299/741] Fix vertical offset for multiline text in VRML exporter. --- pcbnew/exporters/export_vrml.cpp | 40 +++++++++++++++----------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/pcbnew/exporters/export_vrml.cpp b/pcbnew/exporters/export_vrml.cpp index ae1b37c194..5962ba276b 100644 --- a/pcbnew/exporters/export_vrml.cpp +++ b/pcbnew/exporters/export_vrml.cpp @@ -600,38 +600,36 @@ static void export_vrml_pcbtext( MODEL_VRML& aModel, TEXTE_PCB* text ) if( text->IsMirrored() ) NEGATE( size.x ); + EDA_COLOR_T color = BLACK; // not actually used, but needed by DrawGraphicText + if( text->IsMultilineAllowed() ) { - wxPoint pos = text->GetTextPosition(); wxArrayString* list = wxStringSplit( text->GetText(), '\n' ); - wxPoint offset; + std::vector positions; + positions.reserve( list->Count() ); + text->GetPositionsOfLinesOfMultilineText( positions, list->Count() ); - offset.y = text->GetInterline(); - - RotatePoint( &offset, text->GetOrientation() ); - - for( unsigned i = 0; iCount(); i++ ) + for( unsigned ii = 0; ii < list->Count(); ii++ ) { - wxString txt = list->Item( i ); - DrawGraphicText( NULL, NULL, pos, BLACK, - txt, text->GetOrientation(), size, - text->GetHorizJustify(), text->GetVertJustify(), - text->GetThickness(), text->IsItalic(), - true, - vrml_text_callback ); - pos += offset; + wxString txt = list->Item( ii ); + DrawGraphicText( NULL, NULL, positions[ii], color, + txt, text->GetOrientation(), size, + text->GetHorizJustify(), text->GetVertJustify(), + text->GetThickness(), text->IsItalic(), + true, + vrml_text_callback ); } delete (list); } else { - DrawGraphicText( NULL, NULL, text->GetTextPosition(), BLACK, - text->GetText(), text->GetOrientation(), size, - text->GetHorizJustify(), text->GetVertJustify(), - text->GetThickness(), text->IsItalic(), - true, - vrml_text_callback ); + DrawGraphicText( NULL, NULL, text->GetTextPosition(), color, + text->GetText(), text->GetOrientation(), size, + text->GetHorizJustify(), text->GetVertJustify(), + text->GetThickness(), text->IsItalic(), + true, + vrml_text_callback ); } } From 0d6560a2182e1d70c563b7272cc6386319be02a7 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Sat, 19 Apr 2014 13:47:20 -0500 Subject: [PATCH 300/741] *) Switch kicad.exe to using KIFACE modules for all major top level windows. Eeschema, Pcbnew, and Cvpcb all run under the same process now, FOR THE VERY FIRST TIME! *) Added KIWAY::PlayerCreate(), PlayerClose(), and PlayersClose(). *) Factored FRAME_T into from ID_DRAWFRAME_TYPE. *) Found that the following command line is helpful for collecting all the *.kiface files into the /kicad/ directory so that kicad can find them. $ cp `find . -name '*.kiface'` kicad/ Maybe somebody will want to rework how the CMake files are organized so all the binaries can go into the same place. See python-a-mingw-us. *) This might fix the problem on the Mac where child process windows were not coming to the front. See ->Raise() in kicad/mainframe.cpp. *) You can set USE_KIFACE to 0 in kicad/mainframe.cpp to chain load child exes instead of using the KIFACE modules directly, i.e. revert. --- 3d-viewer/3d_frame.cpp | 2 +- common/basicframe.cpp | 2 +- common/draw_frame.cpp | 2 +- common/kiway.cpp | 140 ++++++++++++++++++++++--- common/single_top.cpp | 8 +- cvpcb/CMakeLists.txt | 2 +- cvpcb/class_DisplayFootprintsFrame.cpp | 2 +- cvpcb/cvframe.cpp | 2 +- cvpcb/cvpcb.cpp | 2 +- eeschema/CMakeLists.txt | 4 +- eeschema/eeschema.cpp | 4 +- eeschema/lib_pin.cpp | 2 +- eeschema/libeditframe.cpp | 2 +- eeschema/sch_base_frame.cpp | 2 +- eeschema/schframe.cpp | 4 +- eeschema/viewlib_frame.cpp | 2 +- gerbview/CMakeLists.txt | 2 +- gerbview/gerbview.cpp | 2 +- gerbview/gerbview_frame.cpp | 2 +- include/draw_frame.h | 2 +- include/frame_type.h | 32 ++++++ include/kiway.h | 92 +++++++++++++--- include/kiway_player.h | 4 +- include/sch_base_frame.h | 2 +- include/wxBasePcbFrame.h | 2 +- include/wxstruct.h | 27 +---- kicad/kicad.cpp | 16 ++- kicad/mainframe.cpp | 88 ++++++++++------ pagelayout_editor/CMakeLists.txt | 2 +- pagelayout_editor/pl_editor.cpp | 2 +- pagelayout_editor/pl_editor_frame.cpp | 2 +- pcbnew/CMakeLists.txt | 4 +- pcbnew/basepcbframe.cpp | 2 +- pcbnew/dialogs/dialog_set_grid.cpp | 2 +- pcbnew/edit.cpp | 6 +- pcbnew/editmod.cpp | 2 +- pcbnew/edtxtmod.cpp | 4 +- pcbnew/footprint_wizard_frame.cpp | 2 +- pcbnew/modedit.cpp | 2 +- pcbnew/moduleframe.cpp | 2 +- pcbnew/modview_frame.cpp | 2 +- pcbnew/pcbframe.cpp | 2 +- pcbnew/pcbnew.cpp | 6 +- pcbnew/printout_controler.cpp | 2 +- 44 files changed, 357 insertions(+), 140 deletions(-) create mode 100644 include/frame_type.h diff --git a/3d-viewer/3d_frame.cpp b/3d-viewer/3d_frame.cpp index 55058bc911..c1fabb0b7a 100644 --- a/3d-viewer/3d_frame.cpp +++ b/3d-viewer/3d_frame.cpp @@ -81,7 +81,7 @@ END_EVENT_TABLE() EDA_3D_FRAME::EDA_3D_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent, const wxString& aTitle, long style ) : - KIWAY_PLAYER( aKiway, aParent, DISPLAY3D_FRAME_TYPE, aTitle, + KIWAY_PLAYER( aKiway, aParent, FRAME_PCB_DISPLAY3D, aTitle, wxDefaultPosition, wxDefaultSize, style, wxT( "Frame3D" ) ) { m_canvas = NULL; diff --git a/common/basicframe.cpp b/common/basicframe.cpp index f8a170211a..a19fbd96cf 100644 --- a/common/basicframe.cpp +++ b/common/basicframe.cpp @@ -62,7 +62,7 @@ static const wxChar entryPerspective[] = wxT( "Perspective" ); -EDA_BASE_FRAME::EDA_BASE_FRAME( wxWindow* aParent, ID_DRAWFRAME_TYPE aFrameType, +EDA_BASE_FRAME::EDA_BASE_FRAME( wxWindow* aParent, FRAME_T aFrameType, const wxString& aTitle, const wxPoint& aPos, const wxSize& aSize, long aStyle, const wxString& aFrameName ) : wxFrame( aParent, wxID_ANY, aTitle, aPos, aSize, aStyle, aFrameName ) diff --git a/common/draw_frame.cpp b/common/draw_frame.cpp index 13fc21d68a..578520263e 100644 --- a/common/draw_frame.cpp +++ b/common/draw_frame.cpp @@ -90,7 +90,7 @@ END_EVENT_TABLE() EDA_DRAW_FRAME::EDA_DRAW_FRAME( KIWAY* aKiway, wxWindow* aParent, - ID_DRAWFRAME_TYPE aFrameType, + FRAME_T aFrameType, const wxString& aTitle, const wxPoint& aPos, const wxSize& aSize, long aStyle, const wxString & aFrameName ) : diff --git a/common/kiway.cpp b/common/kiway.cpp index 390586a24b..eaf3fcf14d 100644 --- a/common/kiway.cpp +++ b/common/kiway.cpp @@ -24,21 +24,29 @@ #include +#include #include +#include #include #include #include -KIWAY::KIWAY() +KIFACE* KIWAY::m_kiface[KIWAY_FACE_COUNT]; +int KIWAY::m_kiface_version[KIWAY_FACE_COUNT]; + + +KIWAY::KIWAY( PGM_BASE* aProgram, wxFrame* aTop ): + m_program( aProgram ), + m_top( aTop ) { - memset( &m_kiface, 0, sizeof( m_kiface ) ); + memset( m_player, 0, sizeof( m_player ) ); } const wxString KIWAY::dso_full_path( FACE_T aFaceId ) { - const wxChar* name = wxT(""); + const wxChar* name; switch( aFaceId ) { @@ -68,22 +76,24 @@ PROJECT& KIWAY::Prj() const } -KIFACE* KIWAY::KiFACE( PGM_BASE* aProgram, FACE_T aFaceId, bool doLoad ) +KIFACE* KIWAY::KiFACE( FACE_T aFaceId, bool doLoad ) { - switch( aFaceId ) + // Since this will be called from python, cannot assume that code will + // not pass a bad aFaceId. + if( unsigned( aFaceId ) >= DIM( m_kiface ) ) { - // case FACE_SCH: - case FACE_PCB: - if( m_kiface[aFaceId] ) - return m_kiface[aFaceId]; - break; + // @todo : throw an exception here for python's benefit, at least that + // way it gets some explanatory text. - default: wxASSERT_MSG( 0, wxT( "caller has a bug, passed a bad aFaceId" ) ); return NULL; } - // DSO with KIFACE has not been loaded yet, does user want to load it? + // return the previously loaded KIFACE, if it was. + if( m_kiface[aFaceId] ) + return m_kiface[aFaceId]; + + // DSO with KIFACE has not been loaded yet, does caller want to load it? if( doLoad ) { wxString dname = dso_full_path( aFaceId ); @@ -108,7 +118,7 @@ KIFACE* KIWAY::KiFACE( PGM_BASE* aProgram, FACE_T aFaceId, bool doLoad ) { KIFACE_GETTER_FUNC* getter = (KIFACE_GETTER_FUNC*) addr; - KIFACE* kiface = getter( &m_kiface_version[aFaceId], KIFACE_VERSION, aProgram ); + KIFACE* kiface = getter( &m_kiface_version[aFaceId], KIFACE_VERSION, m_program ); // KIFACE_GETTER_FUNC function comment (API) says the non-NULL is unconditional. wxASSERT_MSG( kiface, @@ -116,7 +126,7 @@ KIFACE* KIWAY::KiFACE( PGM_BASE* aProgram, FACE_T aFaceId, bool doLoad ) // Give the DSO a single chance to do its "process level" initialization. // "Process level" specifically means stay away from any projects in there. - if( kiface->OnKifaceStart( aProgram, KFCTL_PROJECT_SUITE ) ) + if( kiface->OnKifaceStart( m_program, KFCTL_PROJECT_SUITE ) ) { // Tell dso's wxDynamicLibrary destructor not to Unload() the program image. (void) dso.Detach(); @@ -131,3 +141,105 @@ KIFACE* KIWAY::KiFACE( PGM_BASE* aProgram, FACE_T aFaceId, bool doLoad ) return NULL; } + + +KIWAY::FACE_T KIWAY::KifaceType( FRAME_T aFrameType ) +{ + switch( aFrameType ) + { + case FRAME_SCH: + case FRAME_SCH_LIB_EDITOR: + case FRAME_SCH_VIEWER: + return FACE_SCH; + + case FRAME_PCB: + case FRAME_PCB_MODULE_EDITOR: + case FRAME_PCB_MODULE_VIEWER: + case FRAME_PCB_FOOTPRINT_WIZARD: + case FRAME_PCB_DISPLAY3D: + return FACE_PCB; + + case FRAME_CVPCB: + case FRAME_CVPCB_DISPLAY: + return FACE_CVPCB; + + case FRAME_GERBER: + return FACE_GERBVIEW; + + case FRAME_PL_EDITOR: + return FACE_PL_EDITOR; + + default: + return FACE_T( -1 ); + } +} + + +KIWAY_PLAYER* KIWAY::PlayerCreate( FRAME_T aFrameType ) +{ + // Since this will be called from python, cannot assume that code will + // not pass a bad aFrameType. + if( unsigned( aFrameType ) >= DIM( m_player ) ) + { + // @todo : throw an exception here for python's benefit, at least that + // way it gets some explanatory text. + + wxASSERT_MSG( 0, wxT( "caller has a bug, passed a bad aFrameType" ) ); + return NULL; + } + + // return the previously opened window + if( m_player[aFrameType] ) + return m_player[aFrameType]; + + FACE_T face_type = KifaceType( aFrameType ); + + wxASSERT( face_type != FACE_T(-1) ); + + KIFACE* kiface = KiFACE( face_type ); + + KIWAY_PLAYER* frame = (KIWAY_PLAYER*) kiface->CreateWindow( m_top, aFrameType, this, KFCTL_PROJECT_SUITE ); + + return m_player[aFrameType] = frame; +} + + +bool KIWAY::PlayerClose( FRAME_T aFrameType, bool doForce ) +{ + // Since this will be called from python, cannot assume that code will + // not pass a bad aFrameType. + if( unsigned( aFrameType ) >= DIM( m_player ) ) + { + // @todo : throw an exception here for python's benefit, at least that + // way it gets some explanatory text. + + wxASSERT_MSG( 0, wxT( "caller has a bug, passed a bad aFrameType" ) ); + return false; + } + + if( m_player[aFrameType] ) + { + if( m_player[aFrameType]->Close( doForce ) ) + { + m_player[aFrameType] = 0; + return true; + } + + return false; + } + + return true; // window is closed already. +} + + +bool KIWAY::PlayersClose( bool doForce ) +{ + bool ret = true; + + for( unsigned i=0; i < DIM( m_player ); ++i ) + { + ret = ret && PlayerClose( FRAME_T( i ), doForce ); + } + + return ret; +} diff --git a/common/single_top.cpp b/common/single_top.cpp index b1d925c99c..0200170b10 100644 --- a/common/single_top.cpp +++ b/common/single_top.cpp @@ -121,7 +121,7 @@ static const wxString dso_full_path( const wxString& aAbsoluteArgv0 ) // Only a single KIWAY is supported in this single_top top level component, // which is dedicated to loading only a single DSO. -static KIWAY kiway; +KIWAY Kiway( &Pgm() ); // implement a PGM_BASE and a wxApp side by side: @@ -304,17 +304,17 @@ bool PGM_SINGLE_TOP::OnPgmInit( wxApp* aWxApp ) // Use KIFACE to create a top window that the KIFACE knows about. // TOP_FRAME is passed on compiler command line from CMake, and is one of - // the types in ID_DRAWFRAME_TYPE. + // the types in FRAME_T. // KIFACE::CreateWindow() is a virtual so we don't need to link to it. // Remember its in the *.kiface DSO. #if 0 // this pulls in EDA_DRAW_FRAME type info, which we don't want in // the single_top link image. KIWAY_PLAYER* frame = dynamic_cast( kiface->CreateWindow( - NULL, TOP_FRAME, &kiway, KFCTL_STANDALONE ) ); + NULL, TOP_FRAME, &Kiway, KFCTL_STANDALONE ) ); #else KIWAY_PLAYER* frame = (KIWAY_PLAYER*) kiface->CreateWindow( - NULL, TOP_FRAME, &kiway, KFCTL_STANDALONE ); + NULL, TOP_FRAME, &Kiway, KFCTL_STANDALONE ); #endif App().SetTopWindow( frame ); // wxApp gets a face. diff --git a/cvpcb/CMakeLists.txt b/cvpcb/CMakeLists.txt index 2e89204780..f36d47ee56 100644 --- a/cvpcb/CMakeLists.txt +++ b/cvpcb/CMakeLists.txt @@ -81,7 +81,7 @@ if( USE_KIWAY_DLLS ) ${CVPCB_RESOURCES} ) set_source_files_properties( ../common/single_top.cpp PROPERTIES - COMPILE_DEFINITIONS "TOP_FRAME=CVPCB_FRAME_TYPE;PGM_DATA_FILE_EXT=\"net\";BUILD_KIWAY_DLL" + COMPILE_DEFINITIONS "TOP_FRAME=FRAME_CVPCB;PGM_DATA_FILE_EXT=\"net\";BUILD_KIWAY_DLL" ) target_link_libraries( cvpcb #singletop # replaces common, giving us restrictive control and link warnings. diff --git a/cvpcb/class_DisplayFootprintsFrame.cpp b/cvpcb/class_DisplayFootprintsFrame.cpp index 4f9730ea4f..e1a0ab36dc 100644 --- a/cvpcb/class_DisplayFootprintsFrame.cpp +++ b/cvpcb/class_DisplayFootprintsFrame.cpp @@ -72,7 +72,7 @@ END_EVENT_TABLE() DISPLAY_FOOTPRINTS_FRAME::DISPLAY_FOOTPRINTS_FRAME( KIWAY* aKiway, CVPCB_MAINFRAME* aParent ) : - PCB_BASE_FRAME( aKiway, aParent, CVPCB_DISPLAY_FRAME_TYPE, _( "Footprint Viewer" ), + PCB_BASE_FRAME( aKiway, aParent, FRAME_CVPCB_DISPLAY, _( "Footprint Viewer" ), wxDefaultPosition, wxDefaultSize, KICAD_DEFAULT_DRAWFRAME_STYLE, FOOTPRINTVIEWER_FRAME_NAME ) { diff --git a/cvpcb/cvframe.cpp b/cvpcb/cvframe.cpp index c878e61201..4adba22292 100644 --- a/cvpcb/cvframe.cpp +++ b/cvpcb/cvframe.cpp @@ -107,7 +107,7 @@ END_EVENT_TABLE() CVPCB_MAINFRAME::CVPCB_MAINFRAME( KIWAY* aKiway, wxWindow* aParent ) : - KIWAY_PLAYER( aKiway, aParent, CVPCB_FRAME_TYPE, wxT( "CvPCB" ), wxDefaultPosition, + KIWAY_PLAYER( aKiway, aParent, FRAME_CVPCB, wxT( "CvPCB" ), wxDefaultPosition, wxDefaultSize, KICAD_DEFAULT_DRAWFRAME_STYLE, CVPCB_MAINFRAME_NAME ) { m_FrameName = CVPCB_MAINFRAME_NAME; diff --git a/cvpcb/cvpcb.cpp b/cvpcb/cvpcb.cpp index 266674667d..78fbebf619 100644 --- a/cvpcb/cvpcb.cpp +++ b/cvpcb/cvpcb.cpp @@ -108,7 +108,7 @@ static struct IFACE : public KIFACE_I { switch( aClassId ) { - case CVPCB_FRAME_TYPE: + case FRAME_CVPCB: { CVPCB_MAINFRAME* frame = new CVPCB_MAINFRAME( aKiway, aParent ); return frame; diff --git a/eeschema/CMakeLists.txt b/eeschema/CMakeLists.txt index 87b71aa5f5..b139726841 100644 --- a/eeschema/CMakeLists.txt +++ b/eeschema/CMakeLists.txt @@ -251,7 +251,7 @@ if( USE_KIWAY_DLLS ) ${EESCHEMA_RESOURCES} ) set_source_files_properties( ../common/single_top.cpp PROPERTIES - COMPILE_DEFINITIONS "TOP_FRAME=SCHEMATIC_FRAME_TYPE;PGM_DATA_FILE_EXT=\"sch\";BUILD_KIWAY_DLL" + COMPILE_DEFINITIONS "TOP_FRAME=FRAME_SCH;PGM_DATA_FILE_EXT=\"sch\";BUILD_KIWAY_DLL" ) target_link_libraries( eeschema #singletop # replaces common, giving us restrictive control and link warnings. @@ -345,7 +345,7 @@ else() ) set_source_files_properties( ../common/single_top.cpp PROPERTIES - COMPILE_DEFINITIONS "TOP_FRAME=SCHEMATIC_FRAME_TYPE;PGM_DATA_FILE_EXT=\"sch\";BUILD_KIWAY_DLL" + COMPILE_DEFINITIONS "TOP_FRAME=FRAME_SCH;PGM_DATA_FILE_EXT=\"sch\";BUILD_KIWAY_DLL" ) if( APPLE ) diff --git a/eeschema/eeschema.cpp b/eeschema/eeschema.cpp index 0d0d0c43e9..fafcd90ac5 100644 --- a/eeschema/eeschema.cpp +++ b/eeschema/eeschema.cpp @@ -79,7 +79,7 @@ static struct IFACE : public KIFACE_I { switch( aClassId ) { - case SCHEMATIC_FRAME_TYPE: + case FRAME_SCH: { SCH_EDIT_FRAME* frame = new SCH_EDIT_FRAME( aKiway, aParent ); @@ -97,7 +97,7 @@ static struct IFACE : public KIFACE_I } break; - case LIBEDITOR_FRAME_TYPE: + case FRAME_SCH_LIB_EDITOR: { LIB_EDIT_FRAME* frame = new LIB_EDIT_FRAME( aKiway, dynamic_cast( aParent ) ); diff --git a/eeschema/lib_pin.cpp b/eeschema/lib_pin.cpp index b8e8f7897a..e4f16b3a8f 100644 --- a/eeschema/lib_pin.cpp +++ b/eeschema/lib_pin.cpp @@ -810,7 +810,7 @@ void LIB_PIN::drawGraphic( EDA_DRAW_PANEL* aPanel, if( aPanel && aPanel->GetParent() ) frame = (EDA_DRAW_FRAME*)aPanel->GetParent(); - if( frame && frame->IsType( SCHEMATIC_FRAME_TYPE ) && + if( frame && frame->IsType( FRAME_SCH ) && ! ((SCH_EDIT_FRAME*)frame)->GetShowAllPins() ) return; diff --git a/eeschema/libeditframe.cpp b/eeschema/libeditframe.cpp index 0eaa7aca20..1a79cba67e 100644 --- a/eeschema/libeditframe.cpp +++ b/eeschema/libeditframe.cpp @@ -190,7 +190,7 @@ END_EVENT_TABLE() #define LIB_EDIT_FRAME_NAME wxT( "LibeditFrame" ) LIB_EDIT_FRAME::LIB_EDIT_FRAME( KIWAY* aKiway, SCH_EDIT_FRAME* aParent ) : - SCH_BASE_FRAME( aKiway, aParent, LIBEDITOR_FRAME_TYPE, _( "Library Editor" ), + SCH_BASE_FRAME( aKiway, aParent, FRAME_SCH_LIB_EDITOR, _( "Library Editor" ), wxDefaultPosition, wxDefaultSize, KICAD_DEFAULT_DRAWFRAME_STYLE, GetLibEditFrameName() ) { wxASSERT( aParent ); // LIB_EDIT_FRAME needs a parent, since it peeks up there. diff --git a/eeschema/sch_base_frame.cpp b/eeschema/sch_base_frame.cpp index 686efce6de..7908defdc1 100644 --- a/eeschema/sch_base_frame.cpp +++ b/eeschema/sch_base_frame.cpp @@ -29,7 +29,7 @@ SCH_BASE_FRAME::SCH_BASE_FRAME( KIWAY* aKiway, wxWindow* aParent, - ID_DRAWFRAME_TYPE aWindowType, const wxString& aTitle, + FRAME_T aWindowType, const wxString& aTitle, const wxPoint& aPosition, const wxSize& aSize, long aStyle, const wxString& aFrameName ) : EDA_DRAW_FRAME( aKiway, aParent, aWindowType, aTitle, aPosition, diff --git a/eeschema/schframe.cpp b/eeschema/schframe.cpp index a26598437f..69221fd9ec 100644 --- a/eeschema/schframe.cpp +++ b/eeschema/schframe.cpp @@ -176,7 +176,7 @@ END_EVENT_TABLE() #define SCH_EDIT_FRAME_NAME wxT( "SchematicFrame" ) SCH_EDIT_FRAME::SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ): - SCH_BASE_FRAME( aKiway, aParent, SCHEMATIC_FRAME_TYPE, wxT( "Eeschema" ), + SCH_BASE_FRAME( aKiway, aParent, FRAME_SCH, wxT( "Eeschema" ), wxDefaultPosition, wxDefaultSize, KICAD_DEFAULT_DRAWFRAME_STYLE, SCH_EDIT_FRAME_NAME ), m_item_to_repeat( 0 ) { @@ -821,7 +821,7 @@ void SCH_EDIT_FRAME::OnOpenLibraryEditor( wxCommandEvent& event ) { KIFACE_I& kf = Kiface(); - wxWindow* w = kf.CreateWindow( this, LIBEDITOR_FRAME_TYPE, &Kiway(), kf.StartFlags() ); + wxWindow* w = kf.CreateWindow( this, FRAME_SCH_LIB_EDITOR, &Kiway(), kf.StartFlags() ); libeditFrame = dynamic_cast( w ); } diff --git a/eeschema/viewlib_frame.cpp b/eeschema/viewlib_frame.cpp index 3963b03dbf..33b05c1bc6 100644 --- a/eeschema/viewlib_frame.cpp +++ b/eeschema/viewlib_frame.cpp @@ -97,7 +97,7 @@ static wxAcceleratorEntry accels[] = LIB_VIEW_FRAME::LIB_VIEW_FRAME( KIWAY* aKiway, SCH_BASE_FRAME* aParent, CMP_LIBRARY* aLibrary, wxSemaphore* aSemaphore, long aStyle ) : - SCH_BASE_FRAME( aKiway, aParent, VIEWER_FRAME_TYPE, _( "Library Browser" ), + SCH_BASE_FRAME( aKiway, aParent, FRAME_SCH_VIEWER, _( "Library Browser" ), wxDefaultPosition, wxDefaultSize, aStyle, GetLibViewerFrameName() ) { wxAcceleratorTable table( ACCEL_TABLE_CNT, accels ); diff --git a/gerbview/CMakeLists.txt b/gerbview/CMakeLists.txt index df67987d6f..7eff8d254e 100644 --- a/gerbview/CMakeLists.txt +++ b/gerbview/CMakeLists.txt @@ -100,7 +100,7 @@ if( USE_KIWAY_DLLS ) ${GERBVIEW_RESOURCES} ) set_source_files_properties( ../common/single_top.cpp PROPERTIES - COMPILE_DEFINITIONS "TOP_FRAME=GERBER_FRAME_TYPE;BUILD_KIWAY_DLL" + COMPILE_DEFINITIONS "TOP_FRAME=FRAME_GERBER;BUILD_KIWAY_DLL" ) target_link_libraries( gerbview #singletop # replaces common, giving us restrictive control and link warnings. diff --git a/gerbview/gerbview.cpp b/gerbview/gerbview.cpp index e7ae04c786..0423cd6b72 100644 --- a/gerbview/gerbview.cpp +++ b/gerbview/gerbview.cpp @@ -81,7 +81,7 @@ static struct IFACE : public KIFACE_I { switch( aClassId ) { - case GERBER_FRAME_TYPE: + case FRAME_GERBER: { GERBVIEW_FRAME* frame = new GERBVIEW_FRAME( aKiway, aParent ); diff --git a/gerbview/gerbview_frame.cpp b/gerbview/gerbview_frame.cpp index 1e2b073e8d..b6d6d412e4 100644 --- a/gerbview/gerbview_frame.cpp +++ b/gerbview/gerbview_frame.cpp @@ -65,7 +65,7 @@ static const wxString cfgShowBorderAndTitleBlock( wxT( "ShowBorderAndTitleBloc #define GERBVIEW_FRAME_NAME wxT( "GerberFrame" ) GERBVIEW_FRAME::GERBVIEW_FRAME( KIWAY* aKiway, wxWindow* aParent ): - EDA_DRAW_FRAME( aKiway, aParent, GERBER_FRAME_TYPE, wxT( "GerbView" ), + EDA_DRAW_FRAME( aKiway, aParent, FRAME_GERBER, wxT( "GerbView" ), wxDefaultPosition, wxDefaultSize, KICAD_DEFAULT_DRAWFRAME_STYLE, GERBVIEW_FRAME_NAME ) { m_colorsSettings = &g_ColorsSettings; diff --git a/include/draw_frame.h b/include/draw_frame.h index b533688e55..67aba863c1 100644 --- a/include/draw_frame.h +++ b/include/draw_frame.h @@ -118,7 +118,7 @@ protected: public: EDA_DRAW_FRAME( KIWAY* aKiway, wxWindow* aParent, - ID_DRAWFRAME_TYPE aFrameType, + FRAME_T aFrameType, const wxString& aTitle, const wxPoint& aPos, const wxSize& aSize, long aStyle, diff --git a/include/frame_type.h b/include/frame_type.h new file mode 100644 index 0000000000..23411168c6 --- /dev/null +++ b/include/frame_type.h @@ -0,0 +1,32 @@ +#ifndef FRAME_T_H_ +#define FRAME_T_H_ + +/** + * Enum FRAME_T + * is the set of EDA_BASE_FRAME derivatives, typically stored in + * EDA_BASE_FRAME::m_Ident. + */ +enum FRAME_T +{ + FRAME_SCH, + FRAME_SCH_LIB_EDITOR, + FRAME_SCH_VIEWER, + FRAME_PCB, + FRAME_PCB_MODULE_EDITOR, + FRAME_PCB_MODULE_VIEWER, + FRAME_PCB_FOOTPRINT_WIZARD, + FRAME_PCB_DISPLAY3D, + FRAME_CVPCB, + FRAME_CVPCB_DISPLAY, + FRAME_GERBER, + + KIWAY_PLAYER_COUNT, // counts subset of FRAME_T's tracked in class KIWAY + + KICAD_MAIN_FRAME_T = KIWAY_PLAYER_COUNT, + FRAME_PL_EDITOR, + //TEXT_EDITOR_FRAME_T, + + FRAME_T_COUNT +}; + +#endif // FRAME_T_H_ diff --git a/include/kiway.h b/include/kiway.h index 92e20b93e4..f4f40ca980 100644 --- a/include/kiway.h +++ b/include/kiway.h @@ -101,6 +101,7 @@ as such! As such, it is OK to use UTF8 characters: #include #include #include +#include #define VTBL_ENTRY virtual @@ -126,6 +127,7 @@ class wxWindow; class wxConfigBase; class PGM_BASE; class KIWAY; +class KIWAY_PLAYER; /** @@ -248,50 +250,109 @@ class KIWAY : public wxEvtHandler { public: - /// Possible KIFACEs on *this* KIWAY + /// Known KIFACE implementations enum FACE_T { - FACE_SCH, ///< eeschema DSO - // FACE_LIB, - FACE_PCB, ///< pcbnew DSO - // FACE_MOD, + FACE_SCH, ///< eeschema DSO + FACE_PCB, ///< pcbnew DSO FACE_CVPCB, - FACE_BMP2CMP, + /// count of those above here, which is the subset managed in a KIWAY. + KIWAY_FACE_COUNT, + + FACE_BMP2CMP = KIWAY_FACE_COUNT, FACE_GERBVIEW, FACE_PL_EDITOR, FACE_PCB_CALCULATOR, - FACE_COUNT, ///< how many KIWAY player types + FACE_COUNT }; - // If you change the vtable, recompile all of KiCad. + /** + * Function KifaceType + * is a simple mapping function which returns the FACE_T which is known to + * implement @a aFrameType. + * + * @return KIWAY::FACE_T - a valid value or FACE_T(-1) if given a bad aFrameType. + */ + static FACE_T KifaceType( FRAME_T aFrameType ); + // If you change the vtable, recompile all of KiCad. + /** * Function KiFACE * returns the KIFACE* given a FACE_T. If it is not already loaded, the * KIFACE is loaded and initialized with a call to KIFACE::OnKifaceStart() */ - VTBL_ENTRY KIFACE* KiFACE( PGM_BASE* aProgram, - FACE_T aFaceId, bool doLoad = true ); + VTBL_ENTRY KIFACE* KiFACE( FACE_T aFaceId, bool doLoad = true ); - VTBL_ENTRY PROJECT& Prj() const; + /** + * Function PlayerCreate + * returns the KIWAY_PLAYER* given a FRAME_T. If it is not already created, + * the required KIFACE is found and loaded and initialized if necessary, then + * the KIWAY_PLAYER window is created but not shown. Caller must Show() it. + * If it is already created, then the existing KIWAY_PLAYER* pointer is returned. + * + * @return KIWAY_PLAYER* - a valid opened KIWAY_PLAYER or NULL if there + * is something wrong. + */ + VTBL_ENTRY KIWAY_PLAYER* PlayerCreate( FRAME_T aFrameType ); - KIWAY(); + /** + * Function PlayerClose + * calls the KIWAY_PLAYER::Close( bool force ) function on the window and + * if not vetoed, returns true, else false. If window actually closes, then + * this KIWAY marks it as not opened internally. + * + * @return bool - true the window is closed and not vetoed, else false. + */ + VTBL_ENTRY bool PlayerClose( FRAME_T aFrameType, bool doForce ); + + /** + * Function PlayersClose + * calls the KIWAY_PLAYER::Close( bool force ) function on all the windows and + * if none are vetoed, returns true, else false. If window actually closes, then + * this KIWAY marks it as not opened internally. + * + * @return bool - true the window is closed and not vetoed, else false. + */ + VTBL_ENTRY bool PlayersClose( bool doForce ); + + + /** + * Function Prj + * returns the PROJECT associated with this KIWAY. This is here as an + * accessor, so that there is freedom to put the actual PROJECT storage + * in a place decided by the implementation, and not known to the caller. + */ + VTBL_ENTRY PROJECT& Prj() const; + + KIWAY( PGM_BASE* aProgram, wxFrame* aTop = NULL ); + + /// In case aTop may not be known at time of KIWAY construction: + void SetTop( wxFrame* aTop ) { m_top = aTop; } private: /// Get the full path & name of the DSO holding the requested FACE_T. static const wxString dso_full_path( FACE_T aFaceId ); - KIFACE* m_kiface[FACE_COUNT]; - int m_kiface_version[FACE_COUNT]; + static KIFACE* m_kiface[KIWAY_FACE_COUNT]; + static int m_kiface_version[KIWAY_FACE_COUNT]; - PROJECT m_project; // do not assume this is here, use Prj(). + KIWAY_PLAYER* m_player[KIWAY_PLAYER_COUNT]; // from frame_type.h + + PROJECT m_project; // do not assume this is here, use Prj(). + + PGM_BASE* m_program; + wxFrame* m_top; }; +extern KIWAY Kiway; // provided by single_top.cpp and kicad.cpp + + /** * Function Pointer KIFACE_GETTER_FUNC * points to the one and only KIFACE export. The export's address @@ -310,4 +371,5 @@ typedef KIFACE* KIFACE_GETTER_FUNC( int* aKIFACEversion, int aKIWAYversion, /// No name mangling. Each KIFACE (DSO/DLL) will implement this once. extern "C" KIFACE* KIFACE_GETTER( int* aKIFACEversion, int aKIWAYversion, PGM_BASE* aProgram ); + #endif // KIWAY_H_ diff --git a/include/kiway_player.h b/include/kiway_player.h index 15d8489615..9a48085dd2 100644 --- a/include/kiway_player.h +++ b/include/kiway_player.h @@ -98,7 +98,7 @@ private: class KIWAY_PLAYER : public EDA_BASE_FRAME, public KIWAY_HOLDER { public: - KIWAY_PLAYER( KIWAY* aKiway, wxWindow* aParent, ID_DRAWFRAME_TYPE aFrameType, + KIWAY_PLAYER( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrameType, const wxString& aTitle, const wxPoint& aPos, const wxSize& aSize, long aStyle, const wxString& aWdoName = wxFrameNameStr ) : EDA_BASE_FRAME( aParent, aFrameType, aTitle, aPos, aSize, aStyle, aWdoName ), @@ -110,7 +110,7 @@ public: KIWAY_PLAYER( wxWindow* aParent, wxWindowID aId, const wxString& aTitle, const wxPoint& aPos, const wxSize& aSize, long aStyle, const wxString& aWdoName = wxFrameNameStr ) : - EDA_BASE_FRAME( aParent, (ID_DRAWFRAME_TYPE) aId, aTitle, aPos, aSize, aStyle, aWdoName ), + EDA_BASE_FRAME( aParent, (FRAME_T) aId, aTitle, aPos, aSize, aStyle, aWdoName ), KIWAY_HOLDER( 0 ) {} diff --git a/include/sch_base_frame.h b/include/sch_base_frame.h index 27a4193446..261989c89a 100644 --- a/include/sch_base_frame.h +++ b/include/sch_base_frame.h @@ -47,7 +47,7 @@ class SCH_BASE_FRAME : public EDA_DRAW_FRAME { public: SCH_BASE_FRAME( KIWAY* aKiway, wxWindow* aParent, - ID_DRAWFRAME_TYPE aWindowType, + FRAME_T aWindowType, const wxString& aTitle, const wxPoint& aPosition, const wxSize& aSize, long aStyle, const wxString & aFrameName ); diff --git a/include/wxBasePcbFrame.h b/include/wxBasePcbFrame.h index 3fd117ffb9..e60a969abb 100644 --- a/include/wxBasePcbFrame.h +++ b/include/wxBasePcbFrame.h @@ -115,7 +115,7 @@ protected: static const LAYER_NUM GAL_LAYER_ORDER[]; public: - PCB_BASE_FRAME( KIWAY* aKiway, wxWindow* aParent, ID_DRAWFRAME_TYPE aFrameType, + PCB_BASE_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrameType, const wxString& aTitle, const wxPoint& aPos, const wxSize& aSize, long aStyle, const wxString& aFrameName ); diff --git a/include/wxstruct.h b/include/wxstruct.h index dbf8679ef5..73363cceed 100644 --- a/include/wxstruct.h +++ b/include/wxstruct.h @@ -46,6 +46,7 @@ #include #include #include +#include #ifdef USE_WX_OVERLAY #include @@ -81,26 +82,6 @@ enum id_librarytype { }; -enum ID_DRAWFRAME_TYPE -{ - NOT_INIT_FRAME_TYPE = 0, - SCHEMATIC_FRAME_TYPE, - LIBEDITOR_FRAME_TYPE, - VIEWER_FRAME_TYPE, - PCB_FRAME_TYPE, - MODULE_EDITOR_FRAME_TYPE, - MODULE_VIEWER_FRAME_TYPE, - FOOTPRINT_WIZARD_FRAME_TYPE, - CVPCB_FRAME_TYPE, - CVPCB_DISPLAY_FRAME_TYPE, - GERBER_FRAME_TYPE, - TEXT_EDITOR_FRAME_TYPE, - DISPLAY3D_FRAME_TYPE, - KICAD_MAIN_FRAME_TYPE, - PL_EDITOR_FRAME_TYPE -}; - - /// Custom trace mask to enable and disable auto save tracing. extern const wxChar traceAutoSave[]; @@ -132,7 +113,7 @@ class EDA_BASE_FRAME : public wxFrame void windowClosing( wxCloseEvent& event ); protected: - ID_DRAWFRAME_TYPE m_Ident; ///< Id Type (pcb, schematic, library..) + FRAME_T m_Ident; ///< Id Type (pcb, schematic, library..) wxPoint m_FramePos; wxSize m_FrameSize; @@ -196,7 +177,7 @@ protected: virtual wxString help_name(); public: - EDA_BASE_FRAME( wxWindow* aParent, ID_DRAWFRAME_TYPE aFrameType, + EDA_BASE_FRAME( wxWindow* aParent, FRAME_T aFrameType, const wxString& aTitle, const wxPoint& aPos, const wxSize& aSize, long aStyle, const wxString& aFrameName ); @@ -219,7 +200,7 @@ public: bool IsActive() const { return m_FrameIsActive; } - bool IsType( ID_DRAWFRAME_TYPE aType ) const { return m_Ident == aType; } + bool IsType( FRAME_T aType ) const { return m_Ident == aType; } void GetKicadHelp( wxCommandEvent& event ); diff --git a/kicad/kicad.cpp b/kicad/kicad.cpp index 028b1aff91..ac0a734dc1 100644 --- a/kicad/kicad.cpp +++ b/kicad/kicad.cpp @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include @@ -149,6 +149,8 @@ bool PGM_KICAD::OnPgmInit( wxApp* aWxApp ) wxDefaultPosition, wxDefaultSize ); App().SetTopWindow( frame ); + Kiway.SetTop( frame ); + bool prjloaded = false; // true when the project is loaded if( App().argc > 1 ) @@ -251,7 +253,7 @@ void PGM_KICAD::destroy() } -KIWAY_MGR Kiways; +KIWAY Kiway( &Pgm() ); /** @@ -262,7 +264,7 @@ struct APP_KICAD : public wxApp { bool OnInit() // overload wxApp virtual { - if( Kiways.OnStart( this ) ) + // if( Kiways.OnStart( this ) ) { return Pgm().OnPgmInit( this ); } @@ -271,7 +273,7 @@ struct APP_KICAD : public wxApp int OnExit() // overload wxApp virtual { - Kiways.OnEnd(); + // Kiways.OnEnd(); Pgm().OnPgmExit(); @@ -297,10 +299,12 @@ IMPLEMENT_APP( APP_KICAD ); // this link image need this function. PROJECT& Prj() { - return Kiways[0].Prj(); + return Kiway.Prj(); } +#if 0 // there can be only one in C++ project manager. + bool KIWAY_MGR::OnStart( wxApp* aProcess ) { // The C++ project manager supports only one open PROJECT @@ -314,3 +318,5 @@ bool KIWAY_MGR::OnStart( wxApp* aProcess ) void KIWAY_MGR::OnEnd() { } + +#endif diff --git a/kicad/mainframe.cpp b/kicad/mainframe.cpp index d75e25f5ed..4f2480f38d 100644 --- a/kicad/mainframe.cpp +++ b/kicad/mainframe.cpp @@ -30,7 +30,7 @@ #include #include -#include +#include #include #include #include @@ -41,13 +41,14 @@ #include #include +#define USE_KIFACE 1 -#define TreeFrameWidthEntry wxT( "LeftWinWidth" ) +#define TreeFrameWidthEntry wxT( "LeftWinWidth" ) KICAD_MANAGER_FRAME::KICAD_MANAGER_FRAME( wxWindow* parent, const wxString& title, const wxPoint& pos, const wxSize& size ) : - EDA_BASE_FRAME( parent, KICAD_MAIN_FRAME_TYPE, title, pos, size, + EDA_BASE_FRAME( parent, KICAD_MAIN_FRAME_T, title, pos, size, KICAD_DEFAULT_DRAWFRAME_STYLE, wxT( "KicadFrame" ) ) { m_leftWinWidth = 60; @@ -154,26 +155,29 @@ void KICAD_MANAGER_FRAME::OnSize( wxSizeEvent& event ) void KICAD_MANAGER_FRAME::OnCloseWindow( wxCloseEvent& Event ) { - int px, py; - - UpdateFileHistory( m_ProjectFileName.GetFullPath(), &Pgm().GetFileHistory() ); - - if( !IsIconized() ) // save main frame position and size + if( Kiway.PlayersClose( false ) ) { - GetPosition( &px, &py ); - m_FramePos.x = px; - m_FramePos.y = py; + int px, py; - GetSize( &px, &py ); - m_FrameSize.x = px; - m_FrameSize.y = py; + UpdateFileHistory( m_ProjectFileName.GetFullPath(), &Pgm().GetFileHistory() ); + + if( !IsIconized() ) // save main frame position and size + { + GetPosition( &px, &py ); + m_FramePos.x = px; + m_FramePos.y = py; + + GetSize( &px, &py ); + m_FrameSize.x = px; + m_FrameSize.y = py; + } + + Event.SetCanVeto( true ); + + m_LeftWin->Show( false ); + + Destroy(); } - - Event.SetCanVeto( true ); - - m_LeftWin->Show( false ); - - Destroy(); } @@ -243,17 +247,12 @@ void KICAD_MANAGER_FRAME::OnRunPcbNew( wxCommandEvent& event ) wxFileName& board = ( !legacy_board.FileExists() || kicad_board.FileExists() ) ? kicad_board : legacy_board; - -#if 0 // it works! - KIFACE* kiface = Kiways[0].KiFACE( &Pgm(), KIWAY::FACE_PCB ); - - KIWAY_PLAYER* frame = (KIWAY_PLAYER*) kiface->CreateWindow( this, PCB_FRAME_TYPE, &Kiways[0], KFCTL_PROJECT_SUITE ); +#if USE_KIFACE + KIWAY_PLAYER* frame = Kiway.PlayerCreate( FRAME_PCB ); frame->OpenProjectFiles( std::vector( 1, board.GetFullPath() ) ); - frame->Show( true ); frame->Raise(); - #else Execute( this, PCBNEW_EXE, QuoteFullPath( board ) ); #endif @@ -265,25 +264,49 @@ void KICAD_MANAGER_FRAME::OnRunCvpcb( wxCommandEvent& event ) wxFileName fn( m_ProjectFileName ); fn.SetExt( NetlistFileExtension ); + +#if USE_KIFACE + KIWAY_PLAYER* frame = Kiway.PlayerCreate( FRAME_CVPCB ); + + frame->OpenProjectFiles( std::vector( 1, fn.GetFullPath() ) ); + frame->Show( true ); + frame->Raise(); +#else Execute( this, CVPCB_EXE, QuoteFullPath( fn ) ); +#endif } + void KICAD_MANAGER_FRAME::OnRunEeschema( wxCommandEvent& event ) { wxFileName fn( m_ProjectFileName ); fn.SetExt( SchematicFileExtension ); - Execute( this, EESCHEMA_EXE, QuoteFullPath( fn ) ); +#if USE_KIFACE + KIWAY_PLAYER* frame = Kiway.PlayerCreate( FRAME_SCH ); + + frame->OpenProjectFiles( std::vector( 1, fn.GetFullPath() ) ); + frame->Show( true ); + frame->Raise(); +#else + Execute( this, EESCHEMA_EXE, QuoteFullPath( fn ) ); +#endif } void KICAD_MANAGER_FRAME::OnRunGerbview( wxCommandEvent& event ) { wxFileName fn( m_ProjectFileName ); + wxString path = wxT( "\"" ); + path += fn.GetPath( wxPATH_GET_SEPARATOR | wxPATH_GET_VOLUME ) + wxT( "\"" ); +#if USE_KIFACE && 0 + +#else Execute( this, GERBVIEW_EXE, path ); +#endif } @@ -353,10 +376,11 @@ void KICAD_MANAGER_FRAME::SaveSettings( wxConfigBase* aCfg ) */ void KICAD_MANAGER_FRAME::PrintPrjInfo() { - wxString msg; - msg.Printf( _( "Working dir: %s\nProject: %s\n" ), - GetChars( wxGetCwd() ), - GetChars( m_ProjectFileName.GetFullPath() ) ); + wxString msg = wxString::Format( _( + "Working dir: %s\nProject: %s\n" ), + GetChars( wxGetCwd() ), + GetChars( m_ProjectFileName.GetFullPath() ) + ); PrintMsg( msg ); } diff --git a/pagelayout_editor/CMakeLists.txt b/pagelayout_editor/CMakeLists.txt index 308bd94949..cd6e41acdd 100644 --- a/pagelayout_editor/CMakeLists.txt +++ b/pagelayout_editor/CMakeLists.txt @@ -62,7 +62,7 @@ if( USE_KIWAY_DLLS ) ${PL_EDITOR_RESOURCES} ) set_source_files_properties( ../common/single_top.cpp PROPERTIES - COMPILE_DEFINITIONS "TOP_FRAME=PL_EDITOR_FRAME_TYPE;PGM_DATA_FILE_EXT=\"kicad_wks\";BUILD_KIWAY_DLL" + COMPILE_DEFINITIONS "TOP_FRAME=FRAME_PL_EDITOR;PGM_DATA_FILE_EXT=\"kicad_wks\";BUILD_KIWAY_DLL" ) target_link_libraries( pl_editor #singletop # replaces common, giving us restrictive control and link warnings. diff --git a/pagelayout_editor/pl_editor.cpp b/pagelayout_editor/pl_editor.cpp index a72ee92505..f15d34e8ab 100644 --- a/pagelayout_editor/pl_editor.cpp +++ b/pagelayout_editor/pl_editor.cpp @@ -62,7 +62,7 @@ static struct IFACE : public KIFACE_I { switch( aClassId ) { - case PL_EDITOR_FRAME_TYPE: + case FRAME_PL_EDITOR: { PL_EDITOR_FRAME* frame = new PL_EDITOR_FRAME( aKiway, aParent ); diff --git a/pagelayout_editor/pl_editor_frame.cpp b/pagelayout_editor/pl_editor_frame.cpp index d5defe8d16..dd1162b9f3 100644 --- a/pagelayout_editor/pl_editor_frame.cpp +++ b/pagelayout_editor/pl_editor_frame.cpp @@ -54,7 +54,7 @@ #define PL_EDITOR_FRAME_NAME wxT( "PlEditorFrame" ) PL_EDITOR_FRAME::PL_EDITOR_FRAME( KIWAY* aKiway, wxWindow* aParent ) : - EDA_DRAW_FRAME( aKiway, aParent, PL_EDITOR_FRAME_TYPE, wxT( "PlEditorFrame" ), + EDA_DRAW_FRAME( aKiway, aParent, FRAME_PL_EDITOR, wxT( "PlEditorFrame" ), wxDefaultPosition, wxDefaultSize, KICAD_DEFAULT_DRAWFRAME_STYLE, PL_EDITOR_FRAME_NAME ) { m_FrameName = PL_EDITOR_FRAME_NAME; diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 5cf723661c..42350320f5 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -512,7 +512,7 @@ if( USE_KIWAY_DLLS ) ${PCBNEW_RESOURCES} ) set_source_files_properties( ../common/single_top.cpp pcbnew.cpp PROPERTIES - COMPILE_DEFINITIONS "TOP_FRAME=PCB_FRAME_TYPE;PGM_DATA_FILE_EXT=\"kicad_pcb\";BUILD_KIWAY_DLL" + COMPILE_DEFINITIONS "TOP_FRAME=FRAME_PCB;PGM_DATA_FILE_EXT=\"kicad_pcb\";BUILD_KIWAY_DLL" ) target_link_libraries( pcbnew #singletop # replaces common, giving us restrictive control and link warnings. @@ -614,7 +614,7 @@ else() # milestone A) kills this off: ${PCBNEW_RESOURCES} ) set_source_files_properties( ../common/single_top.cpp PROPERTIES - COMPILE_DEFINITIONS "TOP_FRAME=PCB_FRAME_TYPE;PGM_DATA_FILE_EXT=\"kicad_pcb\"" + COMPILE_DEFINITIONS "TOP_FRAME=FRAME_PCB;PGM_DATA_FILE_EXT=\"kicad_pcb\"" ) target_link_libraries( pcbnew 3d-viewer diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 1afb7e71c6..2307a5b3c7 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -129,7 +129,7 @@ BEGIN_EVENT_TABLE( PCB_BASE_FRAME, EDA_DRAW_FRAME ) END_EVENT_TABLE() -PCB_BASE_FRAME::PCB_BASE_FRAME( KIWAY* aKiway, wxWindow* aParent, ID_DRAWFRAME_TYPE aFrameType, +PCB_BASE_FRAME::PCB_BASE_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrameType, const wxString& aTitle, const wxPoint& aPos, const wxSize& aSize, long aStyle, const wxString & aFrameName ) : EDA_DRAW_FRAME( aKiway, aParent, aFrameType, aTitle, aPos, aSize, aStyle, aFrameName ) diff --git a/pcbnew/dialogs/dialog_set_grid.cpp b/pcbnew/dialogs/dialog_set_grid.cpp index d60e152805..689b803699 100644 --- a/pcbnew/dialogs/dialog_set_grid.cpp +++ b/pcbnew/dialogs/dialog_set_grid.cpp @@ -211,7 +211,7 @@ bool PCB_BASE_FRAME::InvokeDialogGrid() if( ret == wxID_OK ) { - if( GetGridOrigin() != grid_origin && IsType( PCB_FRAME_TYPE ) ) + if( GetGridOrigin() != grid_origin && IsType( FRAME_PCB ) ) OnModify(); // because grid origin is saved in board, show as modified SetGridOrigin( grid_origin ); diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index de2c27b58f..92b267c856 100644 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -196,7 +196,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) { KIFACE_I& kf = Kiface(); - editor = (FOOTPRINT_EDIT_FRAME*) kf.CreateWindow( this, MODULE_EDITOR_FRAME_TYPE, &Kiway(), kf.StartFlags() ); + editor = (FOOTPRINT_EDIT_FRAME*) kf.CreateWindow( this, FRAME_PCB_MODULE_EDITOR, &Kiway(), kf.StartFlags() ); editor->Show( true ); editor->Zoom_Automatique( false ); @@ -224,7 +224,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) { KIFACE_I& kf = Kiface(); - viewer = (FOOTPRINT_VIEWER_FRAME*) kf.CreateWindow( this, MODULE_VIEWER_FRAME_TYPE, &Kiway(), kf.StartFlags() ); + viewer = (FOOTPRINT_VIEWER_FRAME*) kf.CreateWindow( this, FRAME_PCB_MODULE_VIEWER, &Kiway(), kf.StartFlags() ); viewer->Show( true ); viewer->Zoom_Automatique( false ); @@ -845,7 +845,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) { KIFACE_I& kf = Kiface(); - editor = (FOOTPRINT_EDIT_FRAME*) kf.CreateWindow( this, MODULE_EDITOR_FRAME_TYPE, &Kiway(), kf.StartFlags() ); + editor = (FOOTPRINT_EDIT_FRAME*) kf.CreateWindow( this, FRAME_PCB_MODULE_EDITOR, &Kiway(), kf.StartFlags() ); } editor->Load_Module_From_BOARD( (MODULE*)GetCurItem() ); diff --git a/pcbnew/editmod.cpp b/pcbnew/editmod.cpp index a7cc3cbe74..49325bc1eb 100644 --- a/pcbnew/editmod.cpp +++ b/pcbnew/editmod.cpp @@ -80,7 +80,7 @@ void PCB_EDIT_FRAME::InstallModuleOptionsFrame( MODULE* Module, wxDC* DC ) { KIFACE_I& kf = Kiface(); - editor = (FOOTPRINT_EDIT_FRAME*) kf.CreateWindow( this, MODULE_EDITOR_FRAME_TYPE, &Kiway(), kf.StartFlags() ); + editor = (FOOTPRINT_EDIT_FRAME*) kf.CreateWindow( this, FRAME_PCB_MODULE_EDITOR, &Kiway(), kf.StartFlags() ); } editor->Load_Module_From_BOARD( Module ); diff --git a/pcbnew/edtxtmod.cpp b/pcbnew/edtxtmod.cpp index d180cd00cd..78c1f40d30 100644 --- a/pcbnew/edtxtmod.cpp +++ b/pcbnew/edtxtmod.cpp @@ -108,7 +108,7 @@ void PCB_BASE_FRAME::RotateTextModule( TEXTE_MODULE* Text, wxDC* DC ) if( module && module->GetFlags() == 0 && Text->GetFlags() == 0 ) // prepare undo command { - if( IsType( PCB_FRAME_TYPE ) ) + if( IsType( FRAME_PCB ) ) SaveCopyInUndoList( module, UR_CHANGED ); } @@ -236,7 +236,7 @@ void PCB_BASE_FRAME::PlaceTexteModule( TEXTE_MODULE* Text, wxDC* DC ) double tmp = Text->GetOrientation(); Text->SetOrientation( TextInitialOrientation ); - if( IsType( PCB_FRAME_TYPE ) ) + if( IsType( FRAME_PCB ) ) SaveCopyInUndoList( Module, UR_CHANGED ); else SaveCopyInUndoList( Module, UR_MODEDIT ); diff --git a/pcbnew/footprint_wizard_frame.cpp b/pcbnew/footprint_wizard_frame.cpp index a5d5a5a325..b09623f074 100644 --- a/pcbnew/footprint_wizard_frame.cpp +++ b/pcbnew/footprint_wizard_frame.cpp @@ -121,7 +121,7 @@ static wxAcceleratorEntry accels[] = FOOTPRINT_WIZARD_FRAME::FOOTPRINT_WIZARD_FRAME( KIWAY* aKiway, FOOTPRINT_EDIT_FRAME* aParent, wxSemaphore* semaphore, long style ) : - PCB_BASE_FRAME( aKiway, aParent, FOOTPRINT_WIZARD_FRAME_TYPE, + PCB_BASE_FRAME( aKiway, aParent, FRAME_PCB_FOOTPRINT_WIZARD, _( "Footprint Wizard" ), wxDefaultPosition, wxDefaultSize, style, FOOTPRINT_WIZARD_FRAME_NAME ) { diff --git a/pcbnew/modedit.cpp b/pcbnew/modedit.cpp index 22ef70221e..c9198d4a41 100644 --- a/pcbnew/modedit.cpp +++ b/pcbnew/modedit.cpp @@ -273,7 +273,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) { KIFACE_I& kf = Kiface(); - viewer = (FOOTPRINT_VIEWER_FRAME*) kf.CreateWindow( this, MODULE_VIEWER_FRAME_TYPE, &Kiway(), kf.StartFlags() ); + viewer = (FOOTPRINT_VIEWER_FRAME*) kf.CreateWindow( this, FRAME_PCB_MODULE_VIEWER, &Kiway(), kf.StartFlags() ); viewer->Show( true ); viewer->Zoom_Automatique( false ); } diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index fa28eca5b4..bf2983ccd0 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -153,7 +153,7 @@ END_EVENT_TABLE() #define FOOTPRINT_EDIT_FRAME_NAME wxT( "ModEditFrame" ) FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, PCB_EDIT_FRAME* aParent ) : - PCB_BASE_FRAME( aKiway, aParent, MODULE_EDITOR_FRAME_TYPE, wxEmptyString, + PCB_BASE_FRAME( aKiway, aParent, FRAME_PCB_MODULE_EDITOR, wxEmptyString, wxDefaultPosition, wxDefaultSize, KICAD_DEFAULT_DRAWFRAME_STYLE, GetFootprintEditorFrameName() ) { diff --git a/pcbnew/modview_frame.cpp b/pcbnew/modview_frame.cpp index b79a2c4d3c..30bb30063e 100644 --- a/pcbnew/modview_frame.cpp +++ b/pcbnew/modview_frame.cpp @@ -119,7 +119,7 @@ static wxAcceleratorEntry accels[] = FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent, wxSemaphore* aSemaphore ) : - PCB_BASE_FRAME( aKiway, aParent, MODULE_VIEWER_FRAME_TYPE, _( "Footprint Library Browser" ), + PCB_BASE_FRAME( aKiway, aParent, FRAME_PCB_MODULE_VIEWER, _( "Footprint Library Browser" ), wxDefaultPosition, wxDefaultSize, !aSemaphore ? KICAD_DEFAULT_DRAWFRAME_STYLE : diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index e815ed705a..55c7a6b2ce 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -299,7 +299,7 @@ END_EVENT_TABLE() #define PCB_EDIT_FRAME_NAME wxT( "PcbFrame" ) PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : - PCB_BASE_FRAME( aKiway, aParent, PCB_FRAME_TYPE, wxT( "Pcbnew" ), wxDefaultPosition, + PCB_BASE_FRAME( aKiway, aParent, FRAME_PCB, wxT( "Pcbnew" ), wxDefaultPosition, wxDefaultSize, KICAD_DEFAULT_DRAWFRAME_STYLE, PCB_EDIT_FRAME_NAME ) { m_FrameName = PCB_EDIT_FRAME_NAME; diff --git a/pcbnew/pcbnew.cpp b/pcbnew/pcbnew.cpp index 98e5a5b660..3c47fb7f3d 100644 --- a/pcbnew/pcbnew.cpp +++ b/pcbnew/pcbnew.cpp @@ -110,7 +110,7 @@ static struct IFACE : public KIFACE_I switch( aClassId ) { - case PCB_FRAME_TYPE: + case FRAME_PCB: { PCB_EDIT_FRAME* frame = new PCB_EDIT_FRAME( aKiway, aParent ); @@ -130,7 +130,7 @@ static struct IFACE : public KIFACE_I } break; - case MODULE_EDITOR_FRAME_TYPE: + case FRAME_PCB_MODULE_EDITOR: { // yuck: PCB_EDIT_FRAME* editor = dynamic_cast( aParent ); @@ -147,7 +147,7 @@ static struct IFACE : public KIFACE_I } break; - case MODULE_VIEWER_FRAME_TYPE: + case FRAME_PCB_MODULE_VIEWER: { // yuck: PCB_BASE_FRAME* editor = dynamic_cast( aParent ); diff --git a/pcbnew/printout_controler.cpp b/pcbnew/printout_controler.cpp index 092304298c..c553cd83ed 100644 --- a/pcbnew/printout_controler.cpp +++ b/pcbnew/printout_controler.cpp @@ -263,7 +263,7 @@ void BOARD_PRINTOUT_CONTROLLER::DrawPage() // In module editor, the module is located at 0,0 but for printing // it is moved to pageSizeIU.x/2, pageSizeIU.y/2. // So the equivalent board must be moved to the center of the page: - if( m_Parent->IsType( MODULE_EDITOR_FRAME_TYPE ) ) + if( m_Parent->IsType( FRAME_PCB_MODULE_EDITOR ) ) { boardBoundingBox.Move( wxPoint( pageSizeIU.x/2, pageSizeIU.y/2 ) ); } From ea66e572a06c708dfe81a5471ea5e105d9c91161 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Sat, 19 Apr 2014 13:58:32 -0500 Subject: [PATCH 301/741] KIWAY::dso_full_path() was more incomplete. --- common/kiway.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/common/kiway.cpp b/common/kiway.cpp index eaf3fcf14d..e0ff171aaa 100644 --- a/common/kiway.cpp +++ b/common/kiway.cpp @@ -50,8 +50,13 @@ const wxString KIWAY::dso_full_path( FACE_T aFaceId ) switch( aFaceId ) { - case FACE_SCH: name = KIFACE_PREFIX wxT( "eeschema" ); break; - case FACE_PCB: name = KIFACE_PREFIX wxT( "pcbnew" ); break; + case FACE_SCH: name = KIFACE_PREFIX wxT( "eeschema" ); break; + case FACE_PCB: name = KIFACE_PREFIX wxT( "pcbnew" ); break; + case FACE_CVPCB: name = KIFACE_PREFIX wxT( "cvpcb" ); break; + case FACE_GERBVIEW: name = KIFACE_PREFIX wxT( "gerbview" ); break; + case FACE_PL_EDITOR: name = KIFACE_PREFIX wxT( "pl_editor" ); break; + + // case FACE_PCB_CALCULATOR: who knows. default: wxASSERT_MSG( 0, wxT( "caller has a bug, passed a bad aFaceId" ) ); From f9f3ff22dcdf5bab6a921bff2843665e3d617b7a Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Sat, 19 Apr 2014 14:44:59 -0500 Subject: [PATCH 302/741] hook top frame with KIWAY::playerDestroyHandler() --- common/kiway.cpp | 41 ++++++++++++++++++++++++++++++++++++++++- include/kiway.h | 11 +++++++---- 2 files changed, 47 insertions(+), 5 deletions(-) diff --git a/common/kiway.cpp b/common/kiway.cpp index e0ff171aaa..6e48c92dc5 100644 --- a/common/kiway.cpp +++ b/common/kiway.cpp @@ -38,11 +38,50 @@ int KIWAY::m_kiface_version[KIWAY_FACE_COUNT]; KIWAY::KIWAY( PGM_BASE* aProgram, wxFrame* aTop ): m_program( aProgram ), - m_top( aTop ) + m_top( 0 ) { + SetTop( aTop ); // hook playerDestroyHandler() into aTop. + memset( m_player, 0, sizeof( m_player ) ); } +// Any event types derived from wxCommandEvt, like wxWindowDestroyEvent, are +// propogated upwards to parent windows if not handled below. Therefor the +// m_top window should receive all wxWindowDestroyEvents from originating +// from KIWAY_PLAYERs. It does anyways, but now playerDestroyHandler eavesdrops +// on that event stream looking for KIWAY_PLAYERs being closed. + +void KIWAY::playerDestroyHandler( wxWindowDestroyEvent& event ) +{ + wxWindow* w = event.GetWindow(); + + for( unsigned i=0; iDisconnect( wxEVT_DESTROY, wxWindowDestroyEventHandler( KIWAY::playerDestroyHandler ), NULL, this ); + } + + if( aTop ) + { + aTop->Connect( wxEVT_DESTROY, wxWindowDestroyEventHandler( KIWAY::playerDestroyHandler ), NULL, this ); + } + + m_top = aTop; +} + const wxString KIWAY::dso_full_path( FACE_T aFaceId ) { diff --git a/include/kiway.h b/include/kiway.h index f4f40ca980..7908990ffc 100644 --- a/include/kiway.h +++ b/include/kiway.h @@ -331,22 +331,25 @@ public: KIWAY( PGM_BASE* aProgram, wxFrame* aTop = NULL ); /// In case aTop may not be known at time of KIWAY construction: - void SetTop( wxFrame* aTop ) { m_top = aTop; } + void SetTop( wxFrame* aTop ); private: /// Get the full path & name of the DSO holding the requested FACE_T. static const wxString dso_full_path( FACE_T aFaceId ); + /// hooked into m_top in SetTop(), marks child frame as closed. + void playerDestroyHandler( wxWindowDestroyEvent& event ); + static KIFACE* m_kiface[KIWAY_FACE_COUNT]; static int m_kiface_version[KIWAY_FACE_COUNT]; + PGM_BASE* m_program; + wxFrame* m_top; + KIWAY_PLAYER* m_player[KIWAY_PLAYER_COUNT]; // from frame_type.h PROJECT m_project; // do not assume this is here, use Prj(). - - PGM_BASE* m_program; - wxFrame* m_top; }; From a985255f9534c8aed150aa9de91206d2b2cec199 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Sat, 19 Apr 2014 23:35:34 -0500 Subject: [PATCH 303/741] add back missing pcbnew cross probing event handlers. eeschema launches kiface versions of pcbnew & cvpcb if not single. --- common/kiway.cpp | 23 +++++---- eeschema/controle.cpp | 3 +- eeschema/cross-probing.cpp | 83 +++++++++++++++++++------------- eeschema/menubar.cpp | 96 ++++++++++++------------------------- eeschema/schframe.cpp | 39 +++++++++++++-- include/kiway.h | 9 ++-- kicad/mainframe.cpp | 6 +-- pcbnew/cross-probing.cpp | 27 ++++++----- pcbnew/menubar_pcbframe.cpp | 1 - pcbnew/pcbframe.cpp | 3 ++ 10 files changed, 160 insertions(+), 130 deletions(-) diff --git a/common/kiway.cpp b/common/kiway.cpp index 6e48c92dc5..5ee0300f9b 100644 --- a/common/kiway.cpp +++ b/common/kiway.cpp @@ -47,8 +47,8 @@ KIWAY::KIWAY( PGM_BASE* aProgram, wxFrame* aTop ): // Any event types derived from wxCommandEvt, like wxWindowDestroyEvent, are // propogated upwards to parent windows if not handled below. Therefor the -// m_top window should receive all wxWindowDestroyEvents from originating -// from KIWAY_PLAYERs. It does anyways, but now playerDestroyHandler eavesdrops +// m_top window should receive all wxWindowDestroyEvents originating from +// KIWAY_PLAYERs. It does anyways, but now playerDestroyHandler eavesdrops // on that event stream looking for KIWAY_PLAYERs being closed. void KIWAY::playerDestroyHandler( wxWindowDestroyEvent& event ) @@ -57,7 +57,7 @@ void KIWAY::playerDestroyHandler( wxWindowDestroyEvent& event ) for( unsigned i=0; iCreateWindow( m_top, aFrameType, this, KFCTL_PROJECT_SUITE ); + KIWAY_PLAYER* frame = (KIWAY_PLAYER*) kiface->CreateWindow( m_top, aFrameType, this, KFCTL_PROJECT_SUITE ); - return m_player[aFrameType] = frame; + return m_player[aFrameType] = frame; + } + + return NULL; } diff --git a/eeschema/controle.cpp b/eeschema/controle.cpp index 6cf39282de..9e64f9219e 100644 --- a/eeschema/controle.cpp +++ b/eeschema/controle.cpp @@ -78,7 +78,7 @@ SCH_ITEM* SCH_EDIT_FRAME::LocateAndShowItem( const wxPoint& aPosition, const KIC return NULL; } - /* Cross probing to Pcbnew if a pin or a component is found */ + // Cross probing to Pcbnew if a pin or a component is found switch( item->Type() ) { case SCH_FIELD_T: @@ -105,6 +105,7 @@ SCH_ITEM* SCH_EDIT_FRAME::LocateAndShowItem( const wxPoint& aPosition, const KIC { // Force display pin information (the previous display could be a component info) MSG_PANEL_ITEMS items; + Pin->GetMsgPanelInfo( items ); if( LibItem ) diff --git a/eeschema/cross-probing.cpp b/eeschema/cross-probing.cpp index dcb7788c8d..5258944a90 100644 --- a/eeschema/cross-probing.cpp +++ b/eeschema/cross-probing.cpp @@ -29,6 +29,7 @@ #include #include +#include #include #include #include @@ -107,56 +108,74 @@ void SCH_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline ) } -void SCH_EDIT_FRAME::SendMessageToPCBNEW( EDA_ITEM* objectToSync, SCH_COMPONENT* LibItem ) +std::string FormatProbeItem( EDA_ITEM* aComponent, SCH_COMPONENT* aPart ) { - if( objectToSync == NULL ) - return; - - LIB_PIN* Pin = NULL; - char Line[1024]; - - /* Cross probing to Pcbnew if a pin or a component is found */ - switch( objectToSync->Type() ) + // Cross probing to Pcbnew if a pin or a component is found + switch( aComponent->Type() ) { case SCH_FIELD_T: case LIB_FIELD_T: { - if( !LibItem ) + if( !aPart ) break; - sprintf( Line, "$PART: %s", TO_UTF8( LibItem->GetField( REFERENCE )->GetText() ) ); - SendCommand( MSG_TO_PCB, Line ); + return StrPrintf( "$PART: %s", TO_UTF8( aPart->GetField( REFERENCE )->GetText() ) ); } break; case SCH_COMPONENT_T: - LibItem = (SCH_COMPONENT*) objectToSync; - sprintf( Line, "$PART: %s", TO_UTF8( LibItem->GetField( REFERENCE )->GetText() ) ); - SendCommand( MSG_TO_PCB, Line ); - break; + aPart = (SCH_COMPONENT*) aComponent; + return StrPrintf( "$PART: %s", TO_UTF8( aPart->GetField( REFERENCE )->GetText() ) ); case LIB_PIN_T: - if( !LibItem ) - break; - - Pin = (LIB_PIN*) objectToSync; - - if( Pin->GetNumber() ) { - wxString pinnum; - Pin->PinStringNum( pinnum ); - sprintf( Line, "$PIN: %s $PART: %s", TO_UTF8( pinnum ), - TO_UTF8( LibItem->GetField( REFERENCE )->GetText() ) ); - } - else - { - sprintf( Line, "$PART: %s", TO_UTF8( LibItem->GetField( REFERENCE )->GetText() ) ); - } + if( !aPart ) + break; - SendCommand( MSG_TO_PCB, Line ); + LIB_PIN* pin = (LIB_PIN*) aComponent; + + if( pin->GetNumber() ) + { + wxString pinnum; + + pin->PinStringNum( pinnum ); + + return StrPrintf( "$PIN: %s $PART: %s", TO_UTF8( pinnum ), + TO_UTF8( aPart->GetField( REFERENCE )->GetText() ) ); + } + else + { + return StrPrintf( "$PART: %s", TO_UTF8( aPart->GetField( REFERENCE )->GetText() ) ); + } + } break; default: break; } + + return ""; +} + + +void SCH_EDIT_FRAME::SendMessageToPCBNEW( EDA_ITEM* aComponent, SCH_COMPONENT* aPart ) +{ +#if 1 + wxASSERT( aComponent ); // fix the caller + +#else // WTF? + if( objectToSync == NULL ) // caller remains eternally stupid. + return; +#endif + + std::string packet = FormatProbeItem( aComponent, aPart ); + + if( packet.size() ) + { + if( Kiface().IsSingle() ) + SendCommand( MSG_TO_PCB, packet.c_str() ); + else + { + } + } } diff --git a/eeschema/menubar.cpp b/eeschema/menubar.cpp index 086473b394..6d3e006b56 100644 --- a/eeschema/menubar.cpp +++ b/eeschema/menubar.cpp @@ -64,20 +64,22 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() // Menu File: wxMenu* fileMenu = new wxMenu; - // New - AddMenuItem( fileMenu, - ID_NEW_PROJECT, - _( "&New Schematic Project" ), - _( "Clear current schematic hierarchy and start a new schematic root sheet" ), - KiBitmap( new_xpm ) ); + if( Kiface().IsSingle() ) // not when under a project mgr + { + AddMenuItem( fileMenu, + ID_NEW_PROJECT, + _( "&New Schematic Project" ), + _( "Clear current schematic hierarchy and start a new schematic root sheet" ), + KiBitmap( new_xpm ) ); - // Open - text = AddHotkeyName( _( "&Open Schematic Project" ), s_Schematic_Hokeys_Descr, HK_LOAD_SCH ); - AddMenuItem( fileMenu, - ID_LOAD_PROJECT, text, - _( "Open an existing schematic hierarchy" ), - KiBitmap( open_document_xpm ) ); + text = AddHotkeyName( _( "&Open Schematic Project" ), s_Schematic_Hokeys_Descr, HK_LOAD_SCH ); + AddMenuItem( fileMenu, + ID_LOAD_PROJECT, text, + _( "Open an existing schematic hierarchy" ), + KiBitmap( open_document_xpm ) ); + } + // @todo: static probably not OK in multiple open projects. // Open Recent submenu static wxMenu* openRecentMenu; @@ -91,21 +93,21 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() Kiface().GetFileHistory().UseMenu( openRecentMenu ); Kiface().GetFileHistory().AddFilesToMenu( openRecentMenu ); - AddMenuItem( fileMenu, openRecentMenu, - wxID_ANY, _( "Open &Recent" ), - _( "Open a recent opened schematic project" ), - KiBitmap( open_project_xpm ) ); + if( Kiface().IsSingle() ) // not when under a project mgr + { + AddMenuItem( fileMenu, openRecentMenu, + wxID_ANY, _( "Open &Recent" ), + _( "Open a recent opened schematic project" ), + KiBitmap( open_project_xpm ) ); + } - // Import AddMenuItem( fileMenu, ID_APPEND_PROJECT, _( "&Append Schematic Sheet" ), _( "Append schematic sheet to current project" ), KiBitmap( open_document_xpm ) ); - // Separator fileMenu->AppendSeparator(); - // Save schematic project text = AddHotkeyName( _( "&Save Schematic Project" ), s_Schematic_Hokeys_Descr, HK_SAVE_SCH ); AddMenuItem( fileMenu, @@ -113,31 +115,29 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() _( "Save all sheets in schematic project" ), KiBitmap( save_project_xpm ) ); - // Save current sheet AddMenuItem( fileMenu, ID_UPDATE_ONE_SHEET, _( "Save &Current Sheet Only" ), _( "Save only current schematic sheet" ), KiBitmap( save_xpm ) ); - // Save current sheet as - AddMenuItem( fileMenu, - ID_SAVE_ONE_SHEET_UNDER_NEW_NAME, - _( "Save Current Sheet &As" ), - _( "Save current schematic sheet as..." ), - KiBitmap( save_as_xpm ) ); + if( Kiface().IsSingle() ) // not when under a project mgr + { + AddMenuItem( fileMenu, + ID_SAVE_ONE_SHEET_UNDER_NEW_NAME, + _( "Save Current Sheet &As" ), + _( "Save current schematic sheet as..." ), + KiBitmap( save_as_xpm ) ); + } - // Separator fileMenu->AppendSeparator(); - // Page settings AddMenuItem( fileMenu, ID_SHEET_SET, _( "Pa&ge Settings" ), _( "Setting for sheet size and frame references" ), KiBitmap( sheetset_xpm ) ); - // Print AddMenuItem( fileMenu, wxID_PRINT, _( "Pri&nt" ), @@ -155,7 +155,6 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() // Plot to Clipboard (Windows only) - AddMenuItem( choice_plot_fmt, ID_GEN_COPY_SHEET_TO_CLIPBOARD, _( "Plot to &Clipboard" ), _( "Export drawings to clipboard" ), @@ -243,32 +242,26 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() * using in AddHotkeyName call the option "false" (not a shortcut) */ - // Zoom in text = AddHotkeyName( _( "Zoom &In" ), s_Schematic_Hokeys_Descr, HK_ZOOM_IN, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( viewMenu, ID_ZOOM_IN, text, HELP_ZOOM_IN, KiBitmap( zoom_in_xpm ) ); - // Zoom out text = AddHotkeyName( _( "Zoom &Out" ), s_Schematic_Hokeys_Descr, HK_ZOOM_OUT, IS_ACCELERATOR ); // add accelerator, not a shortcut AddMenuItem( viewMenu, ID_ZOOM_OUT, text, HELP_ZOOM_OUT, KiBitmap( zoom_out_xpm ) ); - // Fit on screen text = AddHotkeyName( _( "&Fit on Screen" ), s_Schematic_Hokeys_Descr, HK_ZOOM_AUTO ); AddMenuItem( viewMenu, ID_ZOOM_PAGE, text, HELP_ZOOM_FIT, KiBitmap( zoom_fit_in_page_xpm ) ); - // Separator viewMenu->AppendSeparator(); - // Hierarchy AddMenuItem( viewMenu, ID_HIERARCHY, _( "Show &Hierarchical Navigator" ), _( "Navigate hierarchical sheets" ), KiBitmap( hierarchy_nav_xpm ) ); - // Redraw text = AddHotkeyName( _( "&Redraw" ), s_Schematic_Hokeys_Descr, HK_ZOOM_REDRAW ); AddMenuItem( viewMenu, ID_ZOOM_REDRAW, text, HELP_ZOOM_REDRAW, KiBitmap( zoom_redraw_xpm ) ); @@ -276,78 +269,66 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() // @todo unify IDs wxMenu* placeMenu = new wxMenu; - // Component text = AddHotkeyName( _( "&Component" ), s_Schematic_Hokeys_Descr, HK_ADD_NEW_COMPONENT, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( placeMenu, ID_SCH_PLACE_COMPONENT, text, HELP_PLACE_COMPONENTS, KiBitmap( add_component_xpm ) ); - // Power port text = AddHotkeyName( _( "&Power Port" ), s_Schematic_Hokeys_Descr, HK_ADD_NEW_POWER, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( placeMenu, ID_PLACE_POWER_BUTT, text, HELP_PLACE_POWERPORT, KiBitmap( add_power_xpm ) ); - // Wire text = AddHotkeyName( _( "&Wire" ), s_Schematic_Hokeys_Descr, HK_BEGIN_WIRE, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( placeMenu, ID_WIRE_BUTT, text, HELP_PLACE_WIRE, KiBitmap( add_line_xpm ) ); - // Bus text = AddHotkeyName( _( "&Bus" ), s_Schematic_Hokeys_Descr, HK_BEGIN_BUS, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( placeMenu, ID_BUS_BUTT, text, HELP_PLACE_BUS, KiBitmap( add_bus_xpm ) ); - // Wire to Bus entry text = AddHotkeyName( _( "Wire to Bus &Entry" ), s_Schematic_Hokeys_Descr, HK_ADD_WIRE_ENTRY, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( placeMenu, ID_WIRETOBUS_ENTRY_BUTT, text, HELP_PLACE_WIRE2BUS_ENTRY, KiBitmap( add_line2bus_xpm ) ); - // Bus to Bus entry text = AddHotkeyName( _( "Bus &to Bus Entry" ), s_Schematic_Hokeys_Descr, HK_ADD_BUS_ENTRY, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( placeMenu, ID_BUSTOBUS_ENTRY_BUTT, text, HELP_PLACE_BUS2BUS_ENTRY, KiBitmap( add_bus2bus_xpm ) ); - // No Connect Flag text = AddHotkeyName( _( "&No Connect Flag" ), s_Schematic_Hokeys_Descr, HK_ADD_NOCONN_FLAG, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( placeMenu, ID_NOCONN_BUTT, text, HELP_PLACE_NC_FLAG, KiBitmap( noconn_xpm ) ); - // Net name text = AddHotkeyName( _( "&Label" ), s_Schematic_Hokeys_Descr, HK_ADD_LABEL, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( placeMenu, ID_LABEL_BUTT, text, HELP_PLACE_NETLABEL, KiBitmap( add_line_label_xpm ) ); - // Global label text = AddHotkeyName( _( "Gl&obal Label" ), s_Schematic_Hokeys_Descr, HK_ADD_GLABEL, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( placeMenu, ID_GLABEL_BUTT, text, HELP_PLACE_GLOBALLABEL, KiBitmap( add_glabel_xpm ) ); - // Junction text = AddHotkeyName( _( "&Junction" ), s_Schematic_Hokeys_Descr, HK_ADD_JUNCTION, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( placeMenu, ID_JUNCTION_BUTT, text, HELP_PLACE_JUNCTION, KiBitmap( add_junction_xpm ) ); - // Separator placeMenu->AppendSeparator(); - // Hierarchical label text = AddHotkeyName( _( "&Hierarchical Label" ), s_Schematic_Hokeys_Descr, HK_ADD_HLABEL, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( placeMenu, ID_HIERLABEL_BUTT, @@ -355,38 +336,32 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() KiBitmap( add_hierarchical_label_xpm ) ); - // Hierarchical sheet text = AddHotkeyName( _( "H&ierarchical &Sheet" ), s_Schematic_Hokeys_Descr, HK_ADD_HIER_SHEET, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( placeMenu, ID_SHEET_SYMBOL_BUTT, text, HELP_PLACE_SHEET, KiBitmap( add_hierarchical_subsheet_xpm ) ); - // Import hierarchical sheet AddMenuItem( placeMenu, ID_IMPORT_HLABEL_BUTT, _( "I&mport Hierarchical Label" ), HELP_IMPORT_SHEETPIN, KiBitmap( import_hierarchical_label_xpm ) ); - // Add hierarchical Pin to Sheet AddMenuItem( placeMenu, ID_SHEET_PIN_BUTT, _( "Hierarchical Pi&n to Sheet" ), HELP_PLACE_SHEETPIN, KiBitmap( add_hierar_pin_xpm ) ); - // Separator placeMenu->AppendSeparator(); - // Graphic line or polygon text = AddHotkeyName( _( "Graphic Polyline" ), s_Schematic_Hokeys_Descr, HK_ADD_GRAPHIC_POLYLINE, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( placeMenu, ID_LINE_COMMENT_BUTT, text, HELP_PLACE_GRAPHICLINES, KiBitmap( add_dashed_line_xpm ) ); - // Graphic text text = AddHotkeyName( _( "Graphic Text" ), s_Schematic_Hokeys_Descr, HK_ADD_GRAPHIC_TEXT, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( placeMenu, ID_TEXT_COMMENT_BUTT, text, @@ -437,14 +412,12 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() // Separator preferencesMenu->AppendSeparator(); - // Save preferences AddMenuItem( preferencesMenu, ID_CONFIG_SAVE, _( "&Save Preferences" ), _( "Save application preferences" ), KiBitmap( save_setup_xpm ) ); - // Read preferences AddMenuItem( preferencesMenu, ID_CONFIG_READ, _( "&Read Preferences" ), @@ -454,22 +427,18 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() // Menu Tools: wxMenu* toolsMenu = new wxMenu; - // Library editor AddMenuItem( toolsMenu, ID_TO_LIBRARY, _( "Library &Editor" ), HELP_RUN_LIB_EDITOR, KiBitmap( libedit_xpm ) ); - // Library viewer AddMenuItem( toolsMenu, ID_TO_LIBVIEW, _( "Library &Browser" ), HELP_RUN_LIB_VIEWER, KiBitmap( library_browse_xpm ) ); - // Separator toolsMenu->AppendSeparator(); - // Annotate AddMenuItem( toolsMenu, ID_GET_ANNOTATE, _( "&Annotate Schematic" ), HELP_ANNOTATE, @@ -482,24 +451,21 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() _( "Perform electrical rule check" ), KiBitmap( erc_xpm ) ); - // Generate netlist AddMenuItem( toolsMenu, ID_GET_NETLIST, _( "Generate &Netlist File" ), _( "Generate the component netlist file" ), KiBitmap( netlist_xpm ) ); - // Generate bill of materials AddMenuItem( toolsMenu, ID_GET_TOOLS, _( "Generate Bill of &Materials" ), HELP_GENERATE_BOM, KiBitmap( bom_xpm ) ); - // Separator toolsMenu->AppendSeparator(); - //Run CvPcb + // Run CvPcb AddMenuItem( toolsMenu, ID_TO_CVPCB, _( "A&ssign Component Footprint" ), @@ -519,7 +485,6 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() // Version info AddHelpVersionInfoMenuEntry( helpMenu ); - // Contents AddMenuItem( helpMenu, wxID_HELP, _( "Eesc&hema Manual" ), @@ -532,7 +497,6 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() _( "Open \"Getting Started in KiCad\" guide for beginners" ), KiBitmap( help_xpm ) ); - // About Eeschema helpMenu->AppendSeparator(); AddMenuItem( helpMenu, wxID_ABOUT, diff --git a/eeschema/schframe.cpp b/eeschema/schframe.cpp index 69221fd9ec..62aec927da 100644 --- a/eeschema/schframe.cpp +++ b/eeschema/schframe.cpp @@ -764,9 +764,23 @@ void SCH_EDIT_FRAME::OnOpenPcbnew( wxCommandEvent& event ) { fn.SetExt( PcbFileExtension ); - wxString filename = QuoteFullPath( fn ); + if( Kiface().IsSingle() ) + { + wxString filename = QuoteFullPath( fn ); + ExecuteFile( this, PCBNEW_EXE, filename ); + } + else + { + KIWAY_PLAYER* player = Kiway().Player( FRAME_PCB, false ); // test open already. - ExecuteFile( this, PCBNEW_EXE, filename ); + if( !player ) + { + player = Kiway().Player( FRAME_PCB, true ); + player->OpenProjectFiles( std::vector( 1, fn.GetFullPath() ) ); + player->Show( true ); + } + player->Raise(); + } } else { @@ -783,7 +797,22 @@ void SCH_EDIT_FRAME::OnOpenCvpcb( wxCommandEvent& event ) if( fn.IsOk() && fn.FileExists() ) { - ExecuteFile( this, CVPCB_EXE, QuoteFullPath( fn ) ); + if( Kiface().IsSingle() ) + { + ExecuteFile( this, CVPCB_EXE, QuoteFullPath( fn ) ); + } + else + { + KIWAY_PLAYER* player = Kiway().Player( FRAME_CVPCB, false ); // test open already. + + if( !player ) + { + player = Kiway().Player( FRAME_CVPCB, true ); + player->OpenProjectFiles( std::vector( 1, fn.GetFullPath() ) ); + player->Show( true ); + } + player->Raise(); + } } else { @@ -802,13 +831,15 @@ void SCH_EDIT_FRAME::OnOpenLibraryEditor( wxCommandEvent& event ) if( (item == NULL) || (item->GetFlags() != 0) || ( item->Type() != SCH_COMPONENT_T ) ) { - wxMessageBox( _("Error: not a component or no component" ) ); + wxMessageBox( _( "Error: not a component or no component" ) ); return; } component = (SCH_COMPONENT*) item; } + // @todo: should be changed to use Kiway().Player()? + LIB_EDIT_FRAME* libeditFrame = LIB_EDIT_FRAME::GetActiveLibraryEditor();; if( libeditFrame ) { diff --git a/include/kiway.h b/include/kiway.h index 7908990ffc..9400bdf46d 100644 --- a/include/kiway.h +++ b/include/kiway.h @@ -288,16 +288,19 @@ public: VTBL_ENTRY KIFACE* KiFACE( FACE_T aFaceId, bool doLoad = true ); /** - * Function PlayerCreate + * Function Player * returns the KIWAY_PLAYER* given a FRAME_T. If it is not already created, * the required KIFACE is found and loaded and initialized if necessary, then * the KIWAY_PLAYER window is created but not shown. Caller must Show() it. * If it is already created, then the existing KIWAY_PLAYER* pointer is returned. * + * @param aFrameType is from enum #FRAME_T. + * @param doCreate when true asks that the player be created if it is not already created, false means do not create. + * * @return KIWAY_PLAYER* - a valid opened KIWAY_PLAYER or NULL if there - * is something wrong. + * is something wrong or doCreate was false and the player has yet to be created. */ - VTBL_ENTRY KIWAY_PLAYER* PlayerCreate( FRAME_T aFrameType ); + VTBL_ENTRY KIWAY_PLAYER* Player( FRAME_T aFrameType, bool doCreate = true ); /** * Function PlayerClose diff --git a/kicad/mainframe.cpp b/kicad/mainframe.cpp index 4f2480f38d..b7b00ad9b4 100644 --- a/kicad/mainframe.cpp +++ b/kicad/mainframe.cpp @@ -248,7 +248,7 @@ void KICAD_MANAGER_FRAME::OnRunPcbNew( wxCommandEvent& event ) kicad_board : legacy_board; #if USE_KIFACE - KIWAY_PLAYER* frame = Kiway.PlayerCreate( FRAME_PCB ); + KIWAY_PLAYER* frame = Kiway.Player( FRAME_PCB ); frame->OpenProjectFiles( std::vector( 1, board.GetFullPath() ) ); frame->Show( true ); @@ -266,7 +266,7 @@ void KICAD_MANAGER_FRAME::OnRunCvpcb( wxCommandEvent& event ) fn.SetExt( NetlistFileExtension ); #if USE_KIFACE - KIWAY_PLAYER* frame = Kiway.PlayerCreate( FRAME_CVPCB ); + KIWAY_PLAYER* frame = Kiway.Player( FRAME_CVPCB ); frame->OpenProjectFiles( std::vector( 1, fn.GetFullPath() ) ); frame->Show( true ); @@ -284,7 +284,7 @@ void KICAD_MANAGER_FRAME::OnRunEeschema( wxCommandEvent& event ) fn.SetExt( SchematicFileExtension ); #if USE_KIFACE - KIWAY_PLAYER* frame = Kiway.PlayerCreate( FRAME_SCH ); + KIWAY_PLAYER* frame = Kiway.Player( FRAME_SCH ); frame->OpenProjectFiles( std::vector( 1, fn.GetFullPath() ) ); frame->Show( true ); diff --git a/pcbnew/cross-probing.cpp b/pcbnew/cross-probing.cpp index 6aba44cb2b..93b98f3558 100644 --- a/pcbnew/cross-probing.cpp +++ b/pcbnew/cross-probing.cpp @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -141,12 +142,12 @@ void PCB_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline ) */ void PCB_EDIT_FRAME::SendMessageToEESCHEMA( BOARD_ITEM* objectToSync ) { - char cmd[1024]; - const char* text_key; - MODULE* module = NULL; - D_PAD* pad; - TEXTE_MODULE* text_mod; - wxString msg; + std::string cmd; + const char* text_key; + MODULE* module = NULL; + D_PAD* pad; + TEXTE_MODULE* text_mod; + wxString msg; if( objectToSync == NULL ) return; @@ -155,14 +156,14 @@ void PCB_EDIT_FRAME::SendMessageToEESCHEMA( BOARD_ITEM* objectToSync ) { case PCB_MODULE_T: module = (MODULE*) objectToSync; - sprintf( cmd, "$PART: \"%s\"", TO_UTF8( module->GetReference() ) ); + StrPrintf( &cmd, "$PART: \"%s\"", TO_UTF8( module->GetReference() ) ); break; case PCB_PAD_T: module = (MODULE*) objectToSync->GetParent(); pad = (D_PAD*) objectToSync; msg = pad->GetPadName(); - sprintf( cmd, "$PART: \"%s\" $PAD: \"%s\"", + StrPrintf( &cmd, "$PART: \"%s\" $PAD: \"%s\"", TO_UTF8( module->GetReference() ), TO_UTF8( msg ) ); break; @@ -178,7 +179,7 @@ void PCB_EDIT_FRAME::SendMessageToEESCHEMA( BOARD_ITEM* objectToSync ) else break; - sprintf( cmd, "$PART: \"%s\" %s \"%s\"", + StrPrintf( &cmd, "$PART: \"%s\" %s \"%s\"", TO_UTF8( module->GetReference() ), text_key, TO_UTF8( text_mod->GetText() ) ); @@ -188,8 +189,12 @@ void PCB_EDIT_FRAME::SendMessageToEESCHEMA( BOARD_ITEM* objectToSync ) break; } - if( module ) + if( module && cmd.size() ) { - SendCommand( MSG_TO_SCH, cmd ); + if( Kiface().IsSingle() ) + SendCommand( MSG_TO_SCH, cmd.c_str() ); + else + { + } } } diff --git a/pcbnew/menubar_pcbframe.cpp b/pcbnew/menubar_pcbframe.cpp index 4192e44445..026e23df09 100644 --- a/pcbnew/menubar_pcbframe.cpp +++ b/pcbnew/menubar_pcbframe.cpp @@ -68,7 +68,6 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() _( "Clear current board and initialize a new one" ), KiBitmap( new_pcb_xpm ) ); - // Open text = AddHotkeyName( _( "&Open" ), g_Board_Editor_Hokeys_Descr, HK_LOAD_BOARD ); AddMenuItem( filesMenu, ID_LOAD_FILE, text, _( "Delete current board and load new board" ), diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 55c7a6b2ce..62a21ad005 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -85,6 +85,9 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME ) + EVT_SOCKET( ID_EDA_SOCKET_EVENT_SERV, PCB_EDIT_FRAME::OnSockRequestServer ) + EVT_SOCKET( ID_EDA_SOCKET_EVENT, PCB_EDIT_FRAME::OnSockRequest ) + EVT_COMBOBOX( ID_ON_ZOOM_SELECT, PCB_EDIT_FRAME::OnSelectZoom ) EVT_COMBOBOX( ID_ON_GRID_SELECT, PCB_EDIT_FRAME::OnSelectGrid ) From e47a2bc5d4192e88b692c4b0ef2668f4234874a0 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Mon, 21 Apr 2014 01:28:17 -0500 Subject: [PATCH 304/741] happy Easter --- common/CMakeLists.txt | 2 + common/draw_frame.cpp | 2 +- common/kiway.cpp | 29 ++++++++++ common/kiway_express.cpp | 49 +++++++++++++++++ common/kiway_player.cpp | 56 +++++++++++++++++++ common/project.cpp | 3 +- eeschema/cross-probing.cpp | 5 +- include/kiway.h | 11 ++-- include/kiway_express.h | 94 ++++++++++++++++++++++++++++++++ include/kiway_player.h | 26 ++++++--- kicad/mainframe.cpp | 35 +++++++----- pcbnew/cross-probing.cpp | 107 +++++++++++++++++++++---------------- 12 files changed, 345 insertions(+), 74 deletions(-) create mode 100644 common/kiway_express.cpp create mode 100644 common/kiway_player.cpp create mode 100644 include/kiway_express.h diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 53fdaff9e3..176bffeb7c 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -182,7 +182,9 @@ set( COMMON_SRCS html_messagebox.cpp kiface_i.cpp kiway.cpp + kiway_express.cpp kiway_holder.cpp + kiway_player.cpp msgpanel.cpp netlist_keywords.cpp newstroke_font.cpp diff --git a/common/draw_frame.cpp b/common/draw_frame.cpp index 578520263e..75461e5f22 100644 --- a/common/draw_frame.cpp +++ b/common/draw_frame.cpp @@ -64,7 +64,7 @@ static const wxString GridColorEntryKeyword( wxT( "GridColor" ) ); static const wxString LastGridSizeIdKeyword( wxT( "_LastGridSize" ) ); -BEGIN_EVENT_TABLE( EDA_DRAW_FRAME, EDA_BASE_FRAME ) +BEGIN_EVENT_TABLE( EDA_DRAW_FRAME, KIWAY_PLAYER ) EVT_MOUSEWHEEL( EDA_DRAW_FRAME::OnMouseEvent ) EVT_MENU_OPEN( EDA_DRAW_FRAME::OnMenuOpen ) EVT_ACTIVATE( EDA_DRAW_FRAME::OnActivate ) diff --git a/common/kiway.cpp b/common/kiway.cpp index 5ee0300f9b..72e31aad3e 100644 --- a/common/kiway.cpp +++ b/common/kiway.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -292,3 +293,31 @@ bool KIWAY::PlayersClose( bool doForce ) return ret; } + + +void KIWAY::ExpressMail( FRAME_T aDestination, + int aCommand, const std::string& aPayload, wxWindow* aSource ) +{ + KIWAY_EXPRESS mail( aDestination, aCommand, aPayload, aSource ); + + ProcessEvent( mail ); +} + + +bool KIWAY::ProcessEvent( wxEvent& aEvent ) +{ + KIWAY_EXPRESS* mail = dynamic_cast( &aEvent ); + + if( mail ) + { + FRAME_T dest = mail->Dest(); + + // see if recipient is alive + KIWAY_PLAYER* alive = Player( dest, false ); + + if( alive ) + return alive->ProcessEvent( aEvent ); + } + + return false; +} diff --git a/common/kiway_express.cpp b/common/kiway_express.cpp new file mode 100644 index 0000000000..230880421d --- /dev/null +++ b/common/kiway_express.cpp @@ -0,0 +1,49 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2014 KiCad Developers, see CHANGELOG.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 + +//IMPLEMENT_DYNAMIC_CLASS( KIWAY_EXPRESS, wxEvent ) + + +const wxEventType KIWAY_EXPRESS::wxEVENT_ID = wxNewEventType(); + + +KIWAY_EXPRESS::KIWAY_EXPRESS( const KIWAY_EXPRESS& anOther ) : + wxEvent( anOther ) +{ + m_destination = anOther.m_destination; + m_payload = anOther.m_payload; +} + + +KIWAY_EXPRESS::KIWAY_EXPRESS( FRAME_T aDestination, int aCommand, + const std::string& aPayload, wxWindow* aSource ) : + wxEvent( aCommand, wxEVENT_ID ), + m_destination( aDestination ), + m_payload( aPayload ) +{ + SetEventObject( aSource ); +} + diff --git a/common/kiway_player.cpp b/common/kiway_player.cpp new file mode 100644 index 0000000000..4706aac339 --- /dev/null +++ b/common/kiway_player.cpp @@ -0,0 +1,56 @@ + + +#include +#include +#include + + +BEGIN_EVENT_TABLE( KIWAY_PLAYER, EDA_BASE_FRAME ) + /* have not been able to get this to work yet: + EVT_KIWAY_EXPRESS( KIWAY_PLAYER::kiway_express ) + Use Connect() in constructor until this can be sorted out + */ +END_EVENT_TABLE() + + + +KIWAY_PLAYER::KIWAY_PLAYER( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrameType, + const wxString& aTitle, const wxPoint& aPos, const wxSize& aSize, + long aStyle, const wxString& aWdoName ) : + EDA_BASE_FRAME( aParent, aFrameType, aTitle, aPos, aSize, aStyle, aWdoName ), + KIWAY_HOLDER( aKiway ) +{ + DBG( printf("KIWAY_EXPRESS::wxEVENT_ID:%d\n", KIWAY_EXPRESS::wxEVENT_ID );) + Connect( KIWAY_EXPRESS::wxEVENT_ID, wxKiwayExressHandler( KIWAY_PLAYER::kiway_express ) ); +} + + +KIWAY_PLAYER::KIWAY_PLAYER( wxWindow* aParent, wxWindowID aId, const wxString& aTitle, + const wxPoint& aPos, const wxSize& aSize, long aStyle, + const wxString& aWdoName ) : + EDA_BASE_FRAME( aParent, (FRAME_T) aId, aTitle, aPos, aSize, aStyle, aWdoName ), + KIWAY_HOLDER( 0 ) +{ + DBG( printf("KIWAY_EXPRESS::wxEVENT_ID:%d\n", KIWAY_EXPRESS::wxEVENT_ID );) + Connect( KIWAY_EXPRESS::wxEVENT_ID, wxKiwayExressHandler( KIWAY_PLAYER::kiway_express ) ); +} + + +void KIWAY_PLAYER::kiway_express( KIWAY_EXPRESS& aEvent ) +{ + // logging support +#if defined(DEBUG) + const char* class_name = typeid(this).name(); + + printf( "%s: cmd:%d pay:'%s'\n", class_name, + aEvent.GetEventType(), aEvent.GetPayload().c_str() ); +#endif + + KiwayMailIn( aEvent ); // call the virtual, overload in derived. +} + + +void KIWAY_PLAYER::KiwayMailIn( KIWAY_EXPRESS& aEvent ) +{ + // overload this. +} diff --git a/common/project.cpp b/common/project.cpp index 4825974a9c..df43e60a5e 100644 --- a/common/project.cpp +++ b/common/project.cpp @@ -30,6 +30,7 @@ #include #include #include +#include // NAMELESS_PROJECT #include #include #include @@ -57,7 +58,7 @@ void PROJECT::SetProjectFullName( const wxString& aFullPathAndName ) { m_project_name = aFullPathAndName; - wxASSERT( m_project_name.IsAbsolute() ); + wxASSERT( m_project_name.GetName() == NAMELESS_PROJECT || m_project_name.IsAbsolute() ); #if 0 wxASSERT( m_project_name.GetExt() == wxT( ".pro" ) ) #else diff --git a/eeschema/cross-probing.cpp b/eeschema/cross-probing.cpp index 5258944a90..0bc51934ab 100644 --- a/eeschema/cross-probing.cpp +++ b/eeschema/cross-probing.cpp @@ -161,10 +161,10 @@ std::string FormatProbeItem( EDA_ITEM* aComponent, SCH_COMPONENT* aPart ) void SCH_EDIT_FRAME::SendMessageToPCBNEW( EDA_ITEM* aComponent, SCH_COMPONENT* aPart ) { #if 1 - wxASSERT( aComponent ); // fix the caller + wxASSERT( aComponent ); // fix the caller #else // WTF? - if( objectToSync == NULL ) // caller remains eternally stupid. + if( !aComponent ) // caller remains eternally stupid. return; #endif @@ -176,6 +176,7 @@ void SCH_EDIT_FRAME::SendMessageToPCBNEW( EDA_ITEM* aComponent, SCH_COMPONENT* a SendCommand( MSG_TO_PCB, packet.c_str() ); else { + Kiway().ExpressMail( FRAME_PCB, 0, packet, this ); } } } diff --git a/include/kiway.h b/include/kiway.h index 9400bdf46d..ae4337b563 100644 --- a/include/kiway.h +++ b/include/kiway.h @@ -295,7 +295,8 @@ public: * If it is already created, then the existing KIWAY_PLAYER* pointer is returned. * * @param aFrameType is from enum #FRAME_T. - * @param doCreate when true asks that the player be created if it is not already created, false means do not create. + * @param doCreate when true asks that the player be created if it is not + * already created, false means do not create and maybe return NULL. * * @return KIWAY_PLAYER* - a valid opened KIWAY_PLAYER or NULL if there * is something wrong or doCreate was false and the player has yet to be created. @@ -315,13 +316,15 @@ public: /** * Function PlayersClose * calls the KIWAY_PLAYER::Close( bool force ) function on all the windows and - * if none are vetoed, returns true, else false. If window actually closes, then + * if none are vetoed, returns true, else false. If any window actually closes, then * this KIWAY marks it as not opened internally. * - * @return bool - true the window is closed and not vetoed, else false. + * @return bool - true indicates that all windows closed because none were vetoed, + * false means at least one cast a veto. Any that cast a veto are still open. */ VTBL_ENTRY bool PlayersClose( bool doForce ); + VTBL_ENTRY void ExpressMail( FRAME_T aDestination, int aCommand, const std::string& aPayload, wxWindow* aSource=NULL ); /** * Function Prj @@ -336,6 +339,8 @@ public: /// In case aTop may not be known at time of KIWAY construction: void SetTop( wxFrame* aTop ); + bool ProcessEvent( wxEvent& aEvent ); // overload virtual + private: /// Get the full path & name of the DSO holding the requested FACE_T. diff --git a/include/kiway_express.h b/include/kiway_express.h new file mode 100644 index 0000000000..6e95d5ae39 --- /dev/null +++ b/include/kiway_express.h @@ -0,0 +1,94 @@ +#ifndef KIWAY_EXPRESS_H_ +#define KIWAY_EXPRESS_H_ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2014 KiCad Developers, see CHANGELOG.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 + */ + +// @see http://wiki.wxwidgets.org/Custom_Events_Tutorial + +#include +#include + +/** + * Class KIWAY_EXPRESS + * carries a payload from one KIWAY_PLAYER to anothing within a PROJECT. + */ +class KIWAY_EXPRESS : public wxEvent +{ +public: + /** + * Function Dest + * returns the destination player id of the message. + */ + FRAME_T Dest() { return m_destination; } + + /** + * Function Payload + * returns the payload, which can be any text but it typicall self + * identifying s-expression. + */ + const std::string& GetPayload() { return m_payload; } + void SetPayload( const std::string& aPayload ) { m_payload = aPayload; } + + KIWAY_EXPRESS* Clone() const { return new KIWAY_EXPRESS( *this ); } + + //KIWAY_EXPRESS() {} + + KIWAY_EXPRESS( FRAME_T aDestination, + wxEventType aCommand, + const std::string& aPayload, + wxWindow* aSource = NULL ); + + KIWAY_EXPRESS( const KIWAY_EXPRESS& anOther ); + + /// Is the wxEventType argument to wxEvent() and identifies the class + /// in a hurry. Allocated at startup by wxNewEventType(); + static const wxEventType wxEVENT_ID; + + //DECLARE_DYNAMIC_CLASS( KIWAY_EXPRESS ) + +private: + + void kiway_express( KIWAY_EXPRESS& aEvent ); + + FRAME_T m_destination; + std::string m_payload; +}; + + +typedef void ( wxEvtHandler::*kiwayExpressFunction )( KIWAY_EXPRESS& ); + +#define wxKiwayExressHandler(func) \ + (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(kiwayExpressFunction, &func) + + +#define EVT_KIWAY_EXPRESS( func ) \ + DECLARE_EVENT_TABLE_ENTRY( \ + KIWAY_EXPRESS::wxEVENT_ID, -1, -1, \ + (wxObjectEventFunction) \ + (kiwayExpressFunction) & func, \ + (wxObject*) NULL ), + + +#endif // KIWAY_EXPRESS_H_ + diff --git a/include/kiway_player.h b/include/kiway_player.h index 9a48085dd2..75b1189053 100644 --- a/include/kiway_player.h +++ b/include/kiway_player.h @@ -84,6 +84,8 @@ private: }; +class KIWAY_EXPRESS; + /** * Class KIWAY_PLAYER * is a wxFrame capable of the OpenProjectFiles function, meaning it can load @@ -100,19 +102,13 @@ class KIWAY_PLAYER : public EDA_BASE_FRAME, public KIWAY_HOLDER public: KIWAY_PLAYER( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrameType, const wxString& aTitle, const wxPoint& aPos, const wxSize& aSize, - long aStyle, const wxString& aWdoName = wxFrameNameStr ) : - EDA_BASE_FRAME( aParent, aFrameType, aTitle, aPos, aSize, aStyle, aWdoName ), - KIWAY_HOLDER( aKiway ) - {} + long aStyle, const wxString& aWdoName = wxFrameNameStr ); /// Don't use this one, only wxformbuilder uses it, and it must be augmented with /// a SetKiway() early in derived constructor. KIWAY_PLAYER( wxWindow* aParent, wxWindowID aId, const wxString& aTitle, const wxPoint& aPos, const wxSize& aSize, long aStyle, - const wxString& aWdoName = wxFrameNameStr ) : - EDA_BASE_FRAME( aParent, (FRAME_T) aId, aTitle, aPos, aSize, aStyle, aWdoName ), - KIWAY_HOLDER( 0 ) - {} + const wxString& aWdoName = wxFrameNameStr ); // For the aCtl argument of OpenProjectFiles() @@ -164,6 +160,20 @@ public: return false; } + + /** + * Function KiwayMailIn + * receives KIWAY_EXPRESS messages from other players. Merely override it + * in derived classes. + */ + virtual void KiwayMailIn( KIWAY_EXPRESS& aEvent ); + + DECLARE_EVENT_TABLE() + +//private: + + /// event handler, routes to virtual KiwayMailIn() + void kiway_express( KIWAY_EXPRESS& aEvent ); }; diff --git a/kicad/mainframe.cpp b/kicad/mainframe.cpp index b7b00ad9b4..32d19c8d37 100644 --- a/kicad/mainframe.cpp +++ b/kicad/mainframe.cpp @@ -248,10 +248,13 @@ void KICAD_MANAGER_FRAME::OnRunPcbNew( wxCommandEvent& event ) kicad_board : legacy_board; #if USE_KIFACE - KIWAY_PLAYER* frame = Kiway.Player( FRAME_PCB ); - - frame->OpenProjectFiles( std::vector( 1, board.GetFullPath() ) ); - frame->Show( true ); + KIWAY_PLAYER* frame = Kiway.Player( FRAME_PCB, false ); + if( !frame ) + { + frame = Kiway.Player( FRAME_PCB, true ); + frame->OpenProjectFiles( std::vector( 1, board.GetFullPath() ) ); + frame->Show( true ); + } frame->Raise(); #else Execute( this, PCBNEW_EXE, QuoteFullPath( board ) ); @@ -266,10 +269,13 @@ void KICAD_MANAGER_FRAME::OnRunCvpcb( wxCommandEvent& event ) fn.SetExt( NetlistFileExtension ); #if USE_KIFACE - KIWAY_PLAYER* frame = Kiway.Player( FRAME_CVPCB ); - - frame->OpenProjectFiles( std::vector( 1, fn.GetFullPath() ) ); - frame->Show( true ); + KIWAY_PLAYER* frame = Kiway.Player( FRAME_CVPCB, false ); + if( !frame ) + { + frame = Kiway.Player( FRAME_CVPCB, true ); + frame->OpenProjectFiles( std::vector( 1, fn.GetFullPath() ) ); + frame->Show( true ); + } frame->Raise(); #else Execute( this, CVPCB_EXE, QuoteFullPath( fn ) ); @@ -284,10 +290,13 @@ void KICAD_MANAGER_FRAME::OnRunEeschema( wxCommandEvent& event ) fn.SetExt( SchematicFileExtension ); #if USE_KIFACE - KIWAY_PLAYER* frame = Kiway.Player( FRAME_SCH ); - - frame->OpenProjectFiles( std::vector( 1, fn.GetFullPath() ) ); - frame->Show( true ); + KIWAY_PLAYER* frame = Kiway.Player( FRAME_SCH, false ); + if( !frame ) + { + frame = Kiway.Player( FRAME_SCH, true ); + frame->OpenProjectFiles( std::vector( 1, fn.GetFullPath() ) ); + frame->Show( true ); + } frame->Raise(); #else Execute( this, EESCHEMA_EXE, QuoteFullPath( fn ) ); @@ -304,6 +313,8 @@ void KICAD_MANAGER_FRAME::OnRunGerbview( wxCommandEvent& event ) #if USE_KIFACE && 0 + // I cannot make sense of the fn. + #else Execute( this, GERBVIEW_EXE, path ); #endif diff --git a/pcbnew/cross-probing.cpp b/pcbnew/cross-probing.cpp index 93b98f3558..7c764e0805 100644 --- a/pcbnew/cross-probing.cpp +++ b/pcbnew/cross-probing.cpp @@ -131,6 +131,55 @@ void PCB_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline ) } +std::string FormatProbeItem( BOARD_ITEM* aItem ) +{ + MODULE* module; + + switch( aItem->Type() ) + { + case PCB_MODULE_T: + module = (MODULE*) aItem; + return StrPrintf( "$PART: \"%s\"", TO_UTF8( module->GetReference() ) ); + + case PCB_PAD_T: + { + module = (MODULE*) aItem->GetParent(); + wxString pad = ((D_PAD*)aItem)->GetPadName(); + + return StrPrintf( "$PART: \"%s\" $PAD: \"%s\"", + TO_UTF8( module->GetReference() ), + TO_UTF8( pad ) ); + } + + case PCB_MODULE_TEXT_T: + { + module = (MODULE*) aItem->GetParent(); + + TEXTE_MODULE* text_mod = (TEXTE_MODULE*) aItem; + + const char* text_key; + + if( text_mod->GetType() == TEXTE_MODULE::TEXT_is_REFERENCE ) + text_key = "$REF:"; + else if( text_mod->GetType() == TEXTE_MODULE::TEXT_is_VALUE ) + text_key = "$VAL:"; + else + break; + + return StrPrintf( "$PART: \"%s\" %s \"%s\"", + TO_UTF8( module->GetReference() ), + text_key, + TO_UTF8( text_mod->GetText() ) ); + } + + default: + break; + } + + return ""; +} + + /** * Send a remote command to Eeschema via a socket, * @param objectToSync = item to be located on schematic (module, pin or text) @@ -140,61 +189,25 @@ void PCB_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline ) * $PART: "reference" $REF: "reference" put cursor on the component ref * $PART: "reference" $VAL: "value" put cursor on the component value */ -void PCB_EDIT_FRAME::SendMessageToEESCHEMA( BOARD_ITEM* objectToSync ) +void PCB_EDIT_FRAME::SendMessageToEESCHEMA( BOARD_ITEM* aSyncItem ) { - std::string cmd; - const char* text_key; - MODULE* module = NULL; - D_PAD* pad; - TEXTE_MODULE* text_mod; - wxString msg; - - if( objectToSync == NULL ) +#if 1 + wxASSERT( aSyncItem ); // can't we fix the caller? +#else + if( !aSyncItem ) return; +#endif - switch( objectToSync->Type() ) - { - case PCB_MODULE_T: - module = (MODULE*) objectToSync; - StrPrintf( &cmd, "$PART: \"%s\"", TO_UTF8( module->GetReference() ) ); - break; + std::string packet = FormatProbeItem( aSyncItem ); - case PCB_PAD_T: - module = (MODULE*) objectToSync->GetParent(); - pad = (D_PAD*) objectToSync; - msg = pad->GetPadName(); - StrPrintf( &cmd, "$PART: \"%s\" $PAD: \"%s\"", - TO_UTF8( module->GetReference() ), - TO_UTF8( msg ) ); - break; - - case PCB_MODULE_TEXT_T: - module = (MODULE*) objectToSync->GetParent(); - text_mod = (TEXTE_MODULE*) objectToSync; - - if( text_mod->GetType() == TEXTE_MODULE::TEXT_is_REFERENCE ) - text_key = "$REF:"; - else if( text_mod->GetType() == TEXTE_MODULE::TEXT_is_VALUE ) - text_key = "$VAL:"; - else - break; - - StrPrintf( &cmd, "$PART: \"%s\" %s \"%s\"", - TO_UTF8( module->GetReference() ), - text_key, - TO_UTF8( text_mod->GetText() ) ); - break; - - default: - break; - } - - if( module && cmd.size() ) + if( packet.size() ) { if( Kiface().IsSingle() ) - SendCommand( MSG_TO_SCH, cmd.c_str() ); + SendCommand( MSG_TO_SCH, packet.c_str() ); else { + Kiway().ExpressMail( FRAME_SCH, 0, packet, this ); } } } + From 1648d7fd431b8e10dd0ab72471d98aaefb692fe7 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Mon, 21 Apr 2014 01:51:33 -0500 Subject: [PATCH 305/741] Get cross-probing working under the Kiway. --- common/kiway.cpp | 8 ++++++++ eeschema/cross-probing.cpp | 12 ++++++++++++ eeschema/schframe.cpp | 1 + include/wxEeschemaStruct.h | 2 ++ include/wxPcbStruct.h | 2 ++ pcbnew/cross-probing.cpp | 11 +++++++++++ pcbnew/pcbframe.cpp | 1 + 7 files changed, 37 insertions(+) diff --git a/common/kiway.cpp b/common/kiway.cpp index 72e31aad3e..6031fe7bfa 100644 --- a/common/kiway.cpp +++ b/common/kiway.cpp @@ -316,7 +316,15 @@ bool KIWAY::ProcessEvent( wxEvent& aEvent ) KIWAY_PLAYER* alive = Player( dest, false ); if( alive ) + { +#if 0 + // This is still broken, but is the way to go. return alive->ProcessEvent( aEvent ); +#else + alive->KiwayMailIn( *mail ); + return true; +#endif + } } return false; diff --git a/eeschema/cross-probing.cpp b/eeschema/cross-probing.cpp index 0bc51934ab..102b3ff18f 100644 --- a/eeschema/cross-probing.cpp +++ b/eeschema/cross-probing.cpp @@ -180,3 +180,15 @@ void SCH_EDIT_FRAME::SendMessageToPCBNEW( EDA_ITEM* aComponent, SCH_COMPONENT* a } } } + + +#include + +void SCH_EDIT_FRAME::KiwayMailIn( KIWAY_EXPRESS& mail ) +{ + // @todo switch on command type + std::string payload = mail.GetPayload(); + + ExecuteRemoteCommand( payload.c_str() ); +} + diff --git a/eeschema/schframe.cpp b/eeschema/schframe.cpp index 62aec927da..fe38369fd4 100644 --- a/eeschema/schframe.cpp +++ b/eeschema/schframe.cpp @@ -1073,3 +1073,4 @@ void SCH_EDIT_FRAME::UpdateTitle() SetTitle( title ); } + diff --git a/include/wxEeschemaStruct.h b/include/wxEeschemaStruct.h index 5f22c1fab7..fea2499c69 100644 --- a/include/wxEeschemaStruct.h +++ b/include/wxEeschemaStruct.h @@ -368,6 +368,8 @@ public: */ virtual void ExecuteRemoteCommand( const char* cmdline ); + void KiwayMailIn( KIWAY_EXPRESS& aEvent ); // virtual overload from KIWAY_PLAYER + void OnLeftClick( wxDC* aDC, const wxPoint& aPosition ); void OnLeftDClick( wxDC* aDC, const wxPoint& aPosition ); bool OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu ); diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index 6498d7f0f3..70cefc2a36 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -239,6 +239,8 @@ public: */ virtual void ExecuteRemoteCommand( const char* cmdline ); + void KiwayMailIn( KIWAY_EXPRESS& aEvent ); // virtual overload from KIWAY_PLAYER + /** * Function ToPlotter * Open a dialog frame to create plot and drill files diff --git a/pcbnew/cross-probing.cpp b/pcbnew/cross-probing.cpp index 7c764e0805..bb119edf23 100644 --- a/pcbnew/cross-probing.cpp +++ b/pcbnew/cross-probing.cpp @@ -211,3 +211,14 @@ void PCB_EDIT_FRAME::SendMessageToEESCHEMA( BOARD_ITEM* aSyncItem ) } } + +#include + +void PCB_EDIT_FRAME::KiwayMailIn( KIWAY_EXPRESS& mail ) +{ + // @todo switch on command type + std::string payload = mail.GetPayload(); + + ExecuteRemoteCommand( payload.c_str() ); +} + diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 62a21ad005..04ecd6af0b 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -1171,3 +1171,4 @@ void PCB_EDIT_FRAME::SetRotationAngle( int aRotationAngle ) m_rotationAngle = aRotationAngle; } + From 7a129e167b66a1c0412b60ba34481e3e162be710 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Mon, 21 Apr 2014 09:49:33 -0500 Subject: [PATCH 306/741] Functional *) void KIWAY::ExpressMail( FRAME_T aDestination, MAIL_T aCommand, const std::string& aPayload, wxWindow* aSource=NULL ); *) virtual void KiwayMailIn( KIWAY_EXPRESS& aEvent ); *) enum MAIL_T expansion into the brave new world if cross KIWAY_PLAYER communications. Let the KIWAY_PLAYING begin..... through well conceived mail from one KIWAY_PLAYER to another. Get thinking now. Add a new MAIL_T value, then send ExpressMail(), and receive it in KiwayMailIn(), it's that easy. --- common/kiway.cpp | 4 ++-- common/kiway_express.cpp | 11 +++++++++++ common/kiway_player.cpp | 4 +++- eeschema/cross-probing.cpp | 21 +++++++++++++++------ include/kiway_express.h | 23 +++++++++++++++++++++++ pcbnew/cross-probing.cpp | 21 +++++++++++++++------ 6 files changed, 69 insertions(+), 15 deletions(-) diff --git a/common/kiway.cpp b/common/kiway.cpp index 6031fe7bfa..56dff4a288 100644 --- a/common/kiway.cpp +++ b/common/kiway.cpp @@ -37,6 +37,7 @@ KIFACE* KIWAY::m_kiface[KIWAY_FACE_COUNT]; int KIWAY::m_kiface_version[KIWAY_FACE_COUNT]; + KIWAY::KIWAY( PGM_BASE* aProgram, wxFrame* aTop ): m_program( aProgram ), m_top( 0 ) @@ -317,8 +318,7 @@ bool KIWAY::ProcessEvent( wxEvent& aEvent ) if( alive ) { -#if 0 - // This is still broken, but is the way to go. +#if 1 return alive->ProcessEvent( aEvent ); #else alive->KiwayMailIn( *mail ); diff --git a/common/kiway_express.cpp b/common/kiway_express.cpp index 230880421d..d11e6e7cee 100644 --- a/common/kiway_express.cpp +++ b/common/kiway_express.cpp @@ -27,7 +27,18 @@ //IMPLEMENT_DYNAMIC_CLASS( KIWAY_EXPRESS, wxEvent ) +#if 0 // requires that this code reside in only a single link image, rather than + // in each of kicad.exe, _pcbnew.kiface, and _eeschema.kiface as now. + // In the current case wxEVENT_ID will get a different value in each link + // image. We need to put this into a shared library for common utilization, + // I think that library should be libki.so. I am reluctant to do that now + // because the cost will be finding libki.so at runtime, and we need infrastructure + // to set our LIB_ENV_VAR to the proper place so libki.so can be reliably found. + // All things in due course. const wxEventType KIWAY_EXPRESS::wxEVENT_ID = wxNewEventType(); +#else +const wxEventType KIWAY_EXPRESS::wxEVENT_ID = 30000; // commmon accross all link images, hopefully unique. +#endif KIWAY_EXPRESS::KIWAY_EXPRESS( const KIWAY_EXPRESS& anOther ) : diff --git a/common/kiway_player.cpp b/common/kiway_player.cpp index 4706aac339..427fdf3a51 100644 --- a/common/kiway_player.cpp +++ b/common/kiway_player.cpp @@ -8,7 +8,9 @@ BEGIN_EVENT_TABLE( KIWAY_PLAYER, EDA_BASE_FRAME ) /* have not been able to get this to work yet: EVT_KIWAY_EXPRESS( KIWAY_PLAYER::kiway_express ) - Use Connect() in constructor until this can be sorted out + Use Connect() in constructor until this can be sorted out. + + OK the problem is KIWAY_PLAYER::wxEVENT_ID not being unique accross all link images. */ END_EVENT_TABLE() diff --git a/eeschema/cross-probing.cpp b/eeschema/cross-probing.cpp index 102b3ff18f..b8bd39884a 100644 --- a/eeschema/cross-probing.cpp +++ b/eeschema/cross-probing.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -176,19 +177,27 @@ void SCH_EDIT_FRAME::SendMessageToPCBNEW( EDA_ITEM* aComponent, SCH_COMPONENT* a SendCommand( MSG_TO_PCB, packet.c_str() ); else { - Kiway().ExpressMail( FRAME_PCB, 0, packet, this ); + // Typically ExpressMail is going to be s-expression packets, but since + // we have existing interpreter of the cross probe packet on the other + // side in place, we use that here. + Kiway().ExpressMail( FRAME_PCB, MAIL_CROSS_PROBE, packet, this ); } } } -#include - void SCH_EDIT_FRAME::KiwayMailIn( KIWAY_EXPRESS& mail ) { - // @todo switch on command type - std::string payload = mail.GetPayload(); + const std::string& payload = mail.GetPayload(); - ExecuteRemoteCommand( payload.c_str() ); + switch( mail.Command() ) + { + case MAIL_CROSS_PROBE: + ExecuteRemoteCommand( payload.c_str() ); + break; + + // many many others. + + } } diff --git a/include/kiway_express.h b/include/kiway_express.h index 6e95d5ae39..e331f3fcb9 100644 --- a/include/kiway_express.h +++ b/include/kiway_express.h @@ -29,6 +29,20 @@ #include #include + +/** + * Enum MAIL_T + * is the set of mail types sendable via KIWAY::ExpressMail() and supplied as + * the @a aCommand parameter to that function. Such mail will be received in + * KIWAY_PLAYER::KiwayMailIn( KIWAY_EXPRESS& aEvent ) and aEvent.Command() will + * match aCommand to ExpressMail(). + */ +enum MAIL_T +{ + MAIL_CROSS_PROBE, +}; + + /** * Class KIWAY_EXPRESS * carries a payload from one KIWAY_PLAYER to anothing within a PROJECT. @@ -42,6 +56,15 @@ public: */ FRAME_T Dest() { return m_destination; } + /** + * Function Command + * returns the EXPRESS_MAIL_T associated with this mail. + */ + MAIL_T Command() + { + return (MAIL_T) GetId(); // re-purposed control id. + } + /** * Function Payload * returns the payload, which can be any text but it typicall self diff --git a/pcbnew/cross-probing.cpp b/pcbnew/cross-probing.cpp index bb119edf23..05f12dc766 100644 --- a/pcbnew/cross-probing.cpp +++ b/pcbnew/cross-probing.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -206,19 +207,27 @@ void PCB_EDIT_FRAME::SendMessageToEESCHEMA( BOARD_ITEM* aSyncItem ) SendCommand( MSG_TO_SCH, packet.c_str() ); else { - Kiway().ExpressMail( FRAME_SCH, 0, packet, this ); + // Typically ExpressMail is going to be s-expression packets, but since + // we have existing interpreter of the cross probe packet on the other + // side in place, we use that here. + Kiway().ExpressMail( FRAME_SCH, MAIL_CROSS_PROBE, packet, this ); } } } -#include - void PCB_EDIT_FRAME::KiwayMailIn( KIWAY_EXPRESS& mail ) { - // @todo switch on command type - std::string payload = mail.GetPayload(); + const std::string& payload = mail.GetPayload(); - ExecuteRemoteCommand( payload.c_str() ); + switch( mail.Command() ) + { + case MAIL_CROSS_PROBE: + ExecuteRemoteCommand( payload.c_str() ); + break; + + // many many others. + + } } From 8afe4599d00921df775ae9433a7637050904f65e Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Tue, 22 Apr 2014 10:16:19 -0500 Subject: [PATCH 307/741] Teach cvpcb about new KIWAY based cross-probing, factor out MAIL_T into mail_type.h --- common/kiway.cpp | 2 +- common/kiway_express.cpp | 2 +- cvpcb/cvframe.cpp | 16 +++++++--------- include/kiway.h | 3 ++- include/kiway_express.h | 20 ++++---------------- include/mail_type.h | 16 ++++++++++++++++ 6 files changed, 31 insertions(+), 28 deletions(-) create mode 100644 include/mail_type.h diff --git a/common/kiway.cpp b/common/kiway.cpp index 56dff4a288..9004566f14 100644 --- a/common/kiway.cpp +++ b/common/kiway.cpp @@ -297,7 +297,7 @@ bool KIWAY::PlayersClose( bool doForce ) void KIWAY::ExpressMail( FRAME_T aDestination, - int aCommand, const std::string& aPayload, wxWindow* aSource ) + MAIL_T aCommand, const std::string& aPayload, wxWindow* aSource ) { KIWAY_EXPRESS mail( aDestination, aCommand, aPayload, aSource ); diff --git a/common/kiway_express.cpp b/common/kiway_express.cpp index d11e6e7cee..8056f4a37b 100644 --- a/common/kiway_express.cpp +++ b/common/kiway_express.cpp @@ -49,7 +49,7 @@ KIWAY_EXPRESS::KIWAY_EXPRESS( const KIWAY_EXPRESS& anOther ) : } -KIWAY_EXPRESS::KIWAY_EXPRESS( FRAME_T aDestination, int aCommand, +KIWAY_EXPRESS::KIWAY_EXPRESS( FRAME_T aDestination, MAIL_T aCommand, const std::string& aPayload, wxWindow* aSource ) : wxEvent( aCommand, wxEVENT_ID ), m_destination( aDestination ), diff --git a/cvpcb/cvframe.cpp b/cvpcb/cvframe.cpp index 4adba22292..74b79b3567 100644 --- a/cvpcb/cvframe.cpp +++ b/cvpcb/cvframe.cpp @@ -786,14 +786,10 @@ void CVPCB_MAINFRAME::UpdateTitle() void CVPCB_MAINFRAME::SendMessageToEESCHEMA() { - char cmd[1024]; - int selection; - COMPONENT* Component; - if( m_netlist.IsEmpty() ) return; - selection = m_ListCmp->GetSelection(); + int selection = m_ListCmp->GetSelection(); if ( selection < 0 ) selection = 0; @@ -801,12 +797,14 @@ void CVPCB_MAINFRAME::SendMessageToEESCHEMA() if( m_netlist.GetComponent( selection ) == NULL ) return; - Component = m_netlist.GetComponent( selection ); + COMPONENT* component = m_netlist.GetComponent( selection ); - sprintf( cmd, "$PART: \"%s\"", TO_UTF8( Component->GetReference() ) ); - - SendCommand( MSG_TO_SCH, cmd ); + std::string packet = StrPrintf( "$PART: \"%s\"", TO_UTF8( component->GetReference() ) ); + if( Kiface().IsSingle() ) + SendCommand( MSG_TO_SCH, packet.c_str() ); + else + Kiway().ExpressMail( FRAME_SCH, MAIL_CROSS_PROBE, packet, this ); } diff --git a/include/kiway.h b/include/kiway.h index ae4337b563..9b2ffd6b2d 100644 --- a/include/kiway.h +++ b/include/kiway.h @@ -102,6 +102,7 @@ as such! As such, it is OK to use UTF8 characters: #include #include #include +#include #define VTBL_ENTRY virtual @@ -324,7 +325,7 @@ public: */ VTBL_ENTRY bool PlayersClose( bool doForce ); - VTBL_ENTRY void ExpressMail( FRAME_T aDestination, int aCommand, const std::string& aPayload, wxWindow* aSource=NULL ); + VTBL_ENTRY void ExpressMail( FRAME_T aDestination, MAIL_T aCommand, const std::string& aPayload, wxWindow* aSource=NULL ); /** * Function Prj diff --git a/include/kiway_express.h b/include/kiway_express.h index e331f3fcb9..e5fba42f63 100644 --- a/include/kiway_express.h +++ b/include/kiway_express.h @@ -28,24 +28,12 @@ #include #include - - -/** - * Enum MAIL_T - * is the set of mail types sendable via KIWAY::ExpressMail() and supplied as - * the @a aCommand parameter to that function. Such mail will be received in - * KIWAY_PLAYER::KiwayMailIn( KIWAY_EXPRESS& aEvent ) and aEvent.Command() will - * match aCommand to ExpressMail(). - */ -enum MAIL_T -{ - MAIL_CROSS_PROBE, -}; +#include /** * Class KIWAY_EXPRESS - * carries a payload from one KIWAY_PLAYER to anothing within a PROJECT. + * carries a payload from one KIWAY_PLAYER to another within a PROJECT. */ class KIWAY_EXPRESS : public wxEvent { @@ -58,7 +46,7 @@ public: /** * Function Command - * returns the EXPRESS_MAIL_T associated with this mail. + * returns the MAIL_T associated with this mail. */ MAIL_T Command() { @@ -78,7 +66,7 @@ public: //KIWAY_EXPRESS() {} KIWAY_EXPRESS( FRAME_T aDestination, - wxEventType aCommand, + MAIL_T aCommand, const std::string& aPayload, wxWindow* aSource = NULL ); diff --git a/include/mail_type.h b/include/mail_type.h new file mode 100644 index 0000000000..9f30d3e284 --- /dev/null +++ b/include/mail_type.h @@ -0,0 +1,16 @@ +#ifndef MAIL_TYPE_H_ +#define MAIL_TYPE_H_ + +/** + * Enum MAIL_T + * is the set of mail types sendable via KIWAY::ExpressMail() and supplied as + * the @a aCommand parameter to that function. Such mail will be received in + * KIWAY_PLAYER::KiwayMailIn( KIWAY_EXPRESS& aEvent ) and aEvent.Command() will + * match aCommand to KIWAY::ExpressMail(). + */ +enum MAIL_T +{ + MAIL_CROSS_PROBE, ///< PCB<->SCH, CVPCB->SCH cross-probing. +}; + +#endif // MAIL_TYPE_H_ From 01f7a53195f9219c1960807254a2f190e1735eec Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Tue, 22 Apr 2014 10:26:59 -0500 Subject: [PATCH 308/741] remove KIWAY_EXPRESS::kiway_express() typo, add comments. --- include/kiway_express.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/kiway_express.h b/include/kiway_express.h index e5fba42f63..cebc9dfd95 100644 --- a/include/kiway_express.h +++ b/include/kiway_express.h @@ -72,18 +72,18 @@ public: KIWAY_EXPRESS( const KIWAY_EXPRESS& anOther ); - /// Is the wxEventType argument to wxEvent() and identifies the class - /// in a hurry. Allocated at startup by wxNewEventType(); + /// The wxEventType argument to wxEvent() and identifies an event class + /// in a hurry. These wxEventTypes also allow a common class to be used + /// multiple ways. Should be allocated at startup by wxNewEventType(); static const wxEventType wxEVENT_ID; //DECLARE_DYNAMIC_CLASS( KIWAY_EXPRESS ) private: + FRAME_T m_destination; ///< could have been a bitmap indicating multiple recipients + std::string m_payload; ///< very often s-expression text, but not always - void kiway_express( KIWAY_EXPRESS& aEvent ); - - FRAME_T m_destination; - std::string m_payload; + // possible new ideas here. }; From 59d7303b03ea6a4eaa412d9d9a5c3f724554ac23 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Tue, 22 Apr 2014 11:10:07 -0500 Subject: [PATCH 309/741] KIWAY::Player() wxASSERT --- common/kiway.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/kiway.cpp b/common/kiway.cpp index 9004566f14..d8e93a00d5 100644 --- a/common/kiway.cpp +++ b/common/kiway.cpp @@ -246,6 +246,8 @@ KIWAY_PLAYER* KIWAY::Player( FRAME_T aFrameType, bool doCreate ) KIFACE* kiface = KiFACE( face_type ); + wxASSERT( kiface ); + KIWAY_PLAYER* frame = (KIWAY_PLAYER*) kiface->CreateWindow( m_top, aFrameType, this, KFCTL_PROJECT_SUITE ); return m_player[aFrameType] = frame; From 99a19d27cb22f9dc7769c1b537ef57b4e7d7f25b Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Tue, 22 Apr 2014 11:16:34 -0500 Subject: [PATCH 310/741] KIWAY::Player() wxASSERT --- common/kiway.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/common/kiway.cpp b/common/kiway.cpp index d8e93a00d5..198a8a21b6 100644 --- a/common/kiway.cpp +++ b/common/kiway.cpp @@ -241,16 +241,17 @@ KIWAY_PLAYER* KIWAY::Player( FRAME_T aFrameType, bool doCreate ) if( doCreate ) { FACE_T face_type = KifaceType( aFrameType ); - wxASSERT( face_type != FACE_T(-1) ); KIFACE* kiface = KiFACE( face_type ); - wxASSERT( kiface ); - KIWAY_PLAYER* frame = (KIWAY_PLAYER*) kiface->CreateWindow( m_top, aFrameType, this, KFCTL_PROJECT_SUITE ); + if( kiface ) + { + KIWAY_PLAYER* frame = (KIWAY_PLAYER*) kiface->CreateWindow( m_top, aFrameType, this, KFCTL_PROJECT_SUITE ); - return m_player[aFrameType] = frame; + return m_player[aFrameType] = frame; + } } return NULL; From 61fe97e666ba40b38e7140e624d45d54ed17729d Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Wed, 23 Apr 2014 08:53:07 -0500 Subject: [PATCH 311/741] the boost site is getting slower, somebody might need supply a better host and offer bandwidth there for downloading the boost tar. --- CMakeModules/download_boost.cmake | 2 +- common/kiway.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeModules/download_boost.cmake b/CMakeModules/download_boost.cmake index 601738413c..4a491ec191 100644 --- a/CMakeModules/download_boost.cmake +++ b/CMakeModules/download_boost.cmake @@ -187,7 +187,7 @@ ExternalProject_Add( boost URL http://downloads.sourceforge.net/project/boost/boost/${BOOST_RELEASE}/boost_${BOOST_VERS}.tar.bz2 DOWNLOAD_DIR "${DOWNLOAD_DIR}" - TIMEOUT 600 # 10 minutes + TIMEOUT 1200 # 20 minutes URL_MD5 ${BOOST_MD5} # If download fails, then enable "LOG_DOWNLOAD ON" and try again. # Upon a second failure with logging enabled, then look at these logs: diff --git a/common/kiway.cpp b/common/kiway.cpp index 198a8a21b6..c5e432ca9b 100644 --- a/common/kiway.cpp +++ b/common/kiway.cpp @@ -249,6 +249,7 @@ KIWAY_PLAYER* KIWAY::Player( FRAME_T aFrameType, bool doCreate ) if( kiface ) { KIWAY_PLAYER* frame = (KIWAY_PLAYER*) kiface->CreateWindow( m_top, aFrameType, this, KFCTL_PROJECT_SUITE ); + wxASSERT( frame ); return m_player[aFrameType] = frame; } From 38f36ae45c06f786be3609659a18ecb23a72ca28 Mon Sep 17 00:00:00 2001 From: John Beard Date: Wed, 23 Apr 2014 18:36:31 +0200 Subject: [PATCH 312/741] Add John Beard's patch: new and useful footprint wizards (SIP/SIP, SOIC/SSOP/TSSOP/MSOP and BGA). Add Python utility tools to make wizard scripts more easy to write. --- .../plugins/FootprintWizardDrawingAids.py | 134 +++++++++ .../plugins/HelpfulFootprintWizardPlugin.py | 250 ++++++++++++++++ pcbnew/scripting/plugins/PadArray.py | 148 ++++++++++ pcbnew/scripting/plugins/bga_wizard.py | 98 +++++++ pcbnew/scripting/plugins/qfp_wizard.py | 272 ++++-------------- pcbnew/scripting/plugins/sdip_wizard.py | 200 +++++++++++++ 6 files changed, 893 insertions(+), 209 deletions(-) create mode 100644 pcbnew/scripting/plugins/FootprintWizardDrawingAids.py create mode 100644 pcbnew/scripting/plugins/HelpfulFootprintWizardPlugin.py create mode 100644 pcbnew/scripting/plugins/PadArray.py create mode 100644 pcbnew/scripting/plugins/bga_wizard.py create mode 100644 pcbnew/scripting/plugins/sdip_wizard.py diff --git a/pcbnew/scripting/plugins/FootprintWizardDrawingAids.py b/pcbnew/scripting/plugins/FootprintWizardDrawingAids.py new file mode 100644 index 0000000000..d1046bdafb --- /dev/null +++ b/pcbnew/scripting/plugins/FootprintWizardDrawingAids.py @@ -0,0 +1,134 @@ +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. +# + +import pcbnew + +class FootprintWizardDrawingAids: + """ + Collection of handy functions to simplify drawing shapes from within + footprint wizards + + A "drawing context" is provided which can be used to set and retain + settings such as line width and layer + """ + def __init__(self, module): + self.module = module + #drawing context defaults + self.dc = { + 'layer': pcbnew.SILKSCREEN_N_FRONT, + 'width': pcbnew.FromMM(0.2) + } + + def SetWidth(self, width): + self.dc['width'] = width + + def SetLayer(self, layer): + self.dc['layer'] = layer + + def Line(self, x1, y1, x2, y2): + + outline = pcbnew.EDGE_MODULE(self.module) + outline.SetWidth(self.dc['width']) + outline.SetLayer(self.dc['layer']) + outline.SetShape(pcbnew.S_SEGMENT) + start = pcbnew.wxPoint(x1, y1) + end = pcbnew.wxPoint(x2, y2) + outline.SetStartEnd(start, end) + self.module.Add(outline) + + # extends from (x1,y1) right + def HLine(self, x, y, l): + """ + Draw a horizontal line from (x,y), rightwards + """ + self.Line(x, y, x + l, y) + + def VLine(self, x, y, l): + """ + Draw a vertical line from (x1,y1), downwards + """ + self.Line(x, y, x, y + l) + + def Polyline(self, pts): + + if len(pts) < 2: + return + + for i in range(0, len(pts) - 1): + self.Line(pts[i][0], pts[i][1], pts[i+1][0], pts[i+1][1]) + + def Reference(self, x, y, size): + """ + Draw the module's reference as the given point. + + The actual setting of the reference is not done in this drawing + aid - that is up to the wizard + """ + + text_size = pcbnew.wxSize(size, size) + + self.module.Reference().SetPos0(pcbnew.wxPoint(x, y)) + self.module.Reference().SetTextPosition(self.module.Reference().GetPos0()) + self.module.Reference().SetSize(text_size) + + def Value(self, x, y, size): + """ + As for references, draw the module's value + """ + text_size = pcbnew.wxSize(size, size) + + self.module.Value().SetPos0(pcbnew.wxPoint(x, y)) + self.module.Value().SetTextPosition(self.module.Value().GetPos0()) + self.module.Value().SetSize(text_size) + + def Box(self, x, y, w, h): + """ + Draw a rectangular box, centred at (x,y), with given width and + height + """ + self.VLine(x - w/2, y - h/2, h) # left + self.VLine(x + w/2, y - h/2, h) # right + self.HLine(x - w/2, y + h/2, w) # bottom + self.HLine(x - w/2, y - h/2, w) # top + + def NotchedBox(self, x, y, w, h, notchW, notchH): + """ + Draw a box with a notch in the top edge + """ + #limit to half the overall width + notchW = min(x + w/2, notchW) + + # draw notch + self.Polyline([ #three sides of box + (x - w/2, y - h/2), + (x - w/2, y + h/2), + (x + w/2, y + h/2), + (x + w/2, y - h/2), + #the notch + (notchW/2, y - h/2), + (notchW/2, y - h/2 + notchH), + (-notchW/2, y - h/2 + notchH), + (-notchW/2, y - h/2), + (x - w/2, y - h/2) + ]) + + def BoxWithDiagonalAtCorner(self, x, y, w, h, diagSetback): + + self.Box(x, y, w, h) + + #diagonal corner + self.Line(x - w/2 + diagSetback, x - h/2, x - w/2, + x - h/2 + diagSetback) diff --git a/pcbnew/scripting/plugins/HelpfulFootprintWizardPlugin.py b/pcbnew/scripting/plugins/HelpfulFootprintWizardPlugin.py new file mode 100644 index 0000000000..de93cfda03 --- /dev/null +++ b/pcbnew/scripting/plugins/HelpfulFootprintWizardPlugin.py @@ -0,0 +1,250 @@ +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. +# + +import pcbnew +import FootprintWizardDrawingAids + +class FootprintWizardParameterManager: + """ + Functions for helpfully managing parameters to a KiCAD Footprint + Wizard. + + Abstracts away from whatever structure is used by pcbnew's footprint + wizard class + """ + + def __init__(self): + self.parameters = {} + self.GenerateParameterList() + + def GenerateParameterList(self): + """ + Construct parameters here, or leave out to have no parameters + """ + pass + + def CheckParameters(self): + """ + Implement this to make checks on parameter values, filling + parameter_errors (or using the checker routines) + + Subclasses can implment their own and override the parent + defaults and add new ones + """ + pass + + uMM = 1 + uMils = 2 + uNatural = 3 + uBool = 4 + + def AddParam(self, section, param, unit, default, hint = ''): + """ + Add a parameter with some properties. + + TODO: Hints are not supported, as there is as yet nowhere to + put them in the KiCAD interface + """ + + val = None + if unit == self.uMM: + val = pcbnew.FromMM(default) + elif unit == self.uMils: + val = pcbnew.FromMils(default) + elif unit == self.uNatural: + val = default + elif unit == self.uBool: + val = "True" if default else "False" #ugly stringing + else: + print "Warning: Unknown unit type: %s" % unit + return + + if unit in [self.uNatural, self.uBool]: + param = "*%s" % param #star prefix for natural + + if section not in self.parameters: + self.parameters[section] = {} + + self.parameters[section][param] = val + + def _PrintParameterTable(self): + """ + Pretty-print the parameters we have + """ + for name, section in self.parameters.iteritems(): + print " %s:" % name + + for key, value in section.iteritems(): + unit = "" + if (type(value) is int or type(value) is float) and not "*" in key: + unit = "mm" + + if "*" in key: + key = key[1:] + else: + value = pcbnew.ToMM(value) + + print " %s: %s%s" % (key, value, unit) + + def _ParametersHaveErrors(self): + """ + Return true if we discovered errors suring parameter processing + """ + + for name, section in self.parameter_errors.iteritems(): + for k, v in section.iteritems(): + if v: + return True + + return False + + def _PrintParameterErrors(self): + """ + Pretty-print parameters with errors + """ + + for name, section in self.parameter_errors.iteritems(): + printed_section = False + + for key, value in section.iteritems(): + if value: + if not printed_section: + print " %s:" % name + + print " %s: %s (have %s)" % (key, value, + self.parameters[name][key]) + + def ProcessParameters(self): + """ + Make sure the parameters we have meet whatever expectations the + footprint wizard has of them + """ + + self.ClearErrors() + self.CheckParameters(); + + if self._ParametersHaveErrors(): + print "Cannot build footprint: Parameters have errors:" + self._PrintParameterErrors() + return False + + print "Building new %s footprint with the following parameters:" % self.name + + self._PrintParameterTable() + return True + + ################################################################# + # PARAMETER CHECKERS + ################################################################# + + def CheckParamPositiveInt(self, section, param, min_value = 1, + max_value = None, is_multiple_of = 1): + """ + Make sure a parameter can be made into an int, and enforce + limits if required + """ + + try: + self.parameters[section][param] = int(self.parameters[section][param]) + except ValueError: + self.parameter_errors[section][param] = "Must be a valid integer" + return + + if min_value is not None and (self.parameters[section][param] < min_value): + self.parameter_errors[section][param] = "Must be greater than or equal to %d" % (min_value) + return + + if max_value is not None and (self.parameters[section][param] > min_value): + self.parameter_errors[section][param] = "Must be less than or equal to %d" % (max_value) + return + + if is_multiple_of > 1 and (self.parameters[section][param] % is_multiple_of) > 0: + self.parameter_errors[section][param] = "Must be a multiple of %d" % is_multiple_of + return + + return + + def CheckParamBool(self, section, param): + """ + Make sure a parameter looks like a boolean, convert to native + boolean type if so + """ + if str(self.parameters[section][param]).lower() in ["true", "t", "y", "yes", "on", "1", "1.0"]: + self.parameters[section][param] = True; + return + elif str(self.parameters[section][param]).lower() in ["false", "f", "n", "no", "off", "0", "0.0"]: + self.parameters[section][param] = False; + return + + self.parameter_errors[section][param] = "Must be boolean (true/false)" + return + + +class HelpfulFootprintWizardPlugin(pcbnew.FootprintWizardPlugin, + FootprintWizardParameterManager): + """ + A class to simplify many aspects of footprint creation, leaving only + the foot-print specific routines to the wizards themselves + + Generally, you need to implement: + GetReference() + GetValue() + GenerateParameterList() + CheckParameters() + BuildThisFootprint() + GetName() + GetDescription() + """ + def __init__(self): + pcbnew.FootprintWizardPlugin.__init__(self) + FootprintWizardParameterManager.__init__(self) + + self.name = self.GetName() + self.decription = self.GetDescription() + self.image = self.GetImage() + + def GetReference(self): + raise NotImplementedError + + def GetValuePrefix(self): + return "U" # footprints needing wizards of often ICs + + def GetImage(self): + return "" + + def BuildThisFootprint(self): + raise NotImplementedError + + def BuildFootprint(self): + """ + Actually make the footprint. We defer all but the setup to + the implmenting class + """ + + if not self.ProcessParameters(): + return + + self.module = pcbnew.MODULE(None) # create a new module + + self.draw = FootprintWizardDrawingAids.FootprintWizardDrawingAids(self.module) + + self.module.SetReference(self.GetReference()) + self.module.SetValue("%s**" % self.GetValuePrefix()) + + fpid = pcbnew.FPID(self.module.GetReference()) #the name in library + self.module.SetFPID( fpid ) + + self.BuildThisFootprint() # implementer's build function diff --git a/pcbnew/scripting/plugins/PadArray.py b/pcbnew/scripting/plugins/PadArray.py new file mode 100644 index 0000000000..99fa70e0dc --- /dev/null +++ b/pcbnew/scripting/plugins/PadArray.py @@ -0,0 +1,148 @@ + +import pcbnew + +class PadMaker: + """ + Useful construction functions for common types of pads + """ + + def __init__(self, module): + self.module = module + + def THPad(self, w, l, drill, shape = pcbnew.PAD_OVAL): + pad = pcbnew.D_PAD(self.module) + + pad.SetSize(pcbnew.wxSize(l, w)) + + pad.SetShape(shape) + + pad.SetAttribute(pcbnew.PAD_STANDARD) + pad.SetLayerMask(pcbnew.PAD_STANDARD_DEFAULT_LAYERS) + pad.SetDrillSize(pcbnew.wxSize(drill, drill)) + + return pad + + def SMDPad(self, w, l, shape = pcbnew.PAD_RECT): + pad = pcbnew.D_PAD(self.module) + pad.SetSize(pcbnew.wxSize(l, w)) + + pad.SetShape(shape) + + pad.SetAttribute(pcbnew.PAD_SMD) + pad.SetLayerMask(pcbnew.PAD_SMD_DEFAULT_LAYERS) + + return pad + + def SMTRoundPad(self, size): + pad = self.SMDPad(size, size, shape = pcbnew.PAD_CIRCLE) + return pad + +class PadArray: + + def __init__(self): + self.firstPad = 1; + + def SetFirstPadInArray(self, fpNum): + self.firstPad = fpNum + + # HACK! pad should one day have its own clone method + def ClonePad(self): + + pad = pcbnew.D_PAD(self.pad.GetParent()) + + pad.SetSize(self.pad.GetSize()) + pad.SetShape(self.pad.GetShape()) + pad.SetAttribute(self.pad.GetAttribute()) + pad.SetLayerMask(self.pad.GetLayerMask()) + pad.SetDrillSize(self.pad.GetDrillSize()) + + return pad + + def AddPad(self, pad): + self.pad.GetParent().Add(pad) + +class PadGridArray(PadArray): + + def __init__(self, pad, nx, ny, px, py, pin1Pos): + # this pad is more of a "context", we will use it as a source of + # pad data, but not actually add it + self.pad = pad + self.nx = int(nx) + self.ny = int(ny) + self.px = px + self.py = py + self.pin1Pos = pin1Pos + + # handy utility function 1 - A, 2 - B, 26 - AA, etc + # aIndex = 0 for 0 - A + def AlphaNameFromNumber(self, n, aIndex = 1): + + div, mod = divmod(n - aIndex, 26) + alpha = chr(65 + mod) + + if div > 0: + return self.AlphaNameFromNumber(div) + alpha; + + return alpha; + + # right to left, top to bottom + def NamingFunction(self, x, y): + return self.firstPad + (self.nx * y + x) + + #relocate the pad and add it as many times as we need + def AddPadsToModule(self): + + for x in range(0, self.nx): + for y in range(self.ny): + posX = self.pin1Pos.x + (self.px * x) + posY = self.pin1Pos.y + (self.py * y) + + pos = pcbnew.wxPoint(posX, posY) + + # THIS DOESN'T WORK yet! + #pad = self.pad.Clone() + pad = self.ClonePad() + + pad.SetPos0(pos) + pad.SetPosition(pos) + + pad.SetPadName(str(self.NamingFunction(x,y))) + + self.AddPad(pad) + +class PadLineArray(PadGridArray): + + def __init__(self, pad, n, pitch, isVertical, pin1Pos): + + if isVertical: + PadGridArray.__init__(self, pad, 1, n, 0, pitch, pin1Pos) + else: + PadGridArray.__init__(self, pad, n, 1, pitch, 0, pin1Pos) + +class RectPadArray(PadArray): + + def __init__(self, nx, ny, pitch, xpitch, ypitch, pin1Pos): + + #left row + pin1Pos = pcbnew.wxPoint(-h_pitch / 2, -row_len / 2) + array = PadLineArray(h_pad, pads_per_row, pad_pitch, True, pin1Pos) + array.SetFirstPadInArray(1) + array.AddPadsToModule() + + #bottom row + pin1Pos = pcbnew.wxPoint(-row_len / 2, v_pitch / 2) + array = PA.PadLineArray(v_pad, pads_per_row, pad_pitch, False, pin1Pos) + array.SetFirstPadInArray(pads_per_row + 1) + array.AddPadsToModule() + + #right row + pin1Pos = pcbnew.wxPoint(h_pitch / 2, row_len / 2) + array = PadLineArray(h_pad, pads_per_row, -pad_pitch, True, pin1Pos) + array.SetFirstPadInArray(2*pads_per_row + 1) + array.AddPadsToModule() + + #top row + pin1Pos = pcbnew.wxPoint(row_len / 2, -v_pitch / 2) + array = PadLineArray(v_pad, pads_per_row, -pad_pitch, False, pin1Pos) + array.SetFirstPadInArray(3*pads_per_row + 1) + array.AddPadsToModule() diff --git a/pcbnew/scripting/plugins/bga_wizard.py b/pcbnew/scripting/plugins/bga_wizard.py new file mode 100644 index 0000000000..7fd6258f3e --- /dev/null +++ b/pcbnew/scripting/plugins/bga_wizard.py @@ -0,0 +1,98 @@ +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. +# + +from __future__ import division +import pcbnew + +import HelpfulFootprintWizardPlugin as HFPW +import PadArray as PA + + +class BGAPadGridArray(PA.PadGridArray): + + def NamingFunction(self, x, y): + return "%s%d" % (self.AlphaNameFromNumber(y + 1), x + 1) + + +class BGAWizard(HFPW.HelpfulFootprintWizardPlugin): + + def GetName(self): + return "BGA" + + def GetDescription(self): + return "Ball Grid Array Footprint Wizard" + + def GenerateParameterList(self): + + self.AddParam("Pads", "pad pitch", self.uMM, 1) + self.AddParam("Pads", "pad size", self.uMM, 0.5) + self.AddParam("Pads", "row count", self.uNatural, 5) + self.AddParam("Pads", "column count", self.uNatural, 5) + self.AddParam("Pads", "outline x margin", self.uMM, 1) + self.AddParam("Pads", "outline y margin", self.uMM, 1) + + def CheckParameters(self): + + self.CheckParamPositiveInt("Pads", "*row count") + self.CheckParamPositiveInt("Pads", "*column count") + + + def GetReference(self): + + pins = self.parameters["Pads"]["*row count"] * self.parameters["Pads"]["*column count"] + + return "BGA %d" % pins + + + def GetValuePrefix(self): + return "U" + + + def BuildThisFootprint(self): + + pads = self.parameters["Pads"] + + rows = pads["*row count"] + cols = pads["*column count"] + pad_size = pads["pad size"] + + pad_size = pcbnew.wxSize(pad_size, pad_size) + + pad_pitch = pads["pad pitch"] + + # add in the pads + pad = PA.PadMaker(self.module).SMTRoundPad(pads["pad size"]) + + pin1Pos = pcbnew.wxPoint(-((rows - 1) * pad_pitch) / 2, + -((cols - 1) * pad_pitch) / 2) + + array = BGAPadGridArray(pad, rows, cols, pad_pitch, pad_pitch, pin1Pos) + array.AddPadsToModule() + + #box + ssX = -pin1Pos.x + pads["outline x margin"] + ssY = -pin1Pos.y + pads["outline y margin"] + + self.draw.BoxWithDiagonalAtCorner(0, 0, ssX*2, ssY*2, pads["outline x margin"]) + + #reference and value + textSize = pcbnew.FromMM(0.8) + + self.draw.Value(0, - ssY - textSize, textSize) + self.draw.Reference(0, ssY + textSize, textSize) + + +BGAWizard().register() diff --git a/pcbnew/scripting/plugins/qfp_wizard.py b/pcbnew/scripting/plugins/qfp_wizard.py index 2df89e113b..0034c1fadb 100644 --- a/pcbnew/scripting/plugins/qfp_wizard.py +++ b/pcbnew/scripting/plugins/qfp_wizard.py @@ -1,235 +1,89 @@ +from __future__ import division import pcbnew -def abs(x): - if x < 0: - return -x +import HelpfulFootprintWizardPlugin +import PadArray as PA - return x +class QFPWizard(HelpfulFootprintWizardPlugin.HelpfulFootprintWizardPlugin): -class QFPWizard(pcbnew.FootprintWizardPlugin): - def __init__(self): - pcbnew.FootprintWizardPlugin.__init__(self) - self.name = "QFP" - self.description = "QFP Footprint Wizard" - self.parameters = { - "Pads": { - "*n": 100, - "pitch": pcbnew.FromMM(0.5), - "width": pcbnew.FromMM(0.25), - "length": pcbnew.FromMM(1.5), - "horizontal pitch": pcbnew.FromMM(15), - "vertical pitch": pcbnew.FromMM(15), - "*oval": "True" - }, - "Package": { - "width": pcbnew.FromMM(14), - "height": pcbnew.FromMM(14) - } - } + def GetName(self): + return "QFP" - self.ClearErrors() + def GetDescription(self): + return "QFP Footprint Wizard" - def smd_rect_pad(self, module, size, pos, name): - pad = pcbnew.D_PAD(module) + def GenerateParameterList(self): + self.AddParam("Pads", "n", self.uNatural, 100) + self.AddParam("Pads", "pad pitch", self.uMM, 0.5) + self.AddParam("Pads", "pad width", self.uMM, 0.25) + self.AddParam("Pads", "pad length", self.uMM, 1.5) + self.AddParam("Pads", "vertical pitch", self.uMM, 15) + self.AddParam("Pads", "horizontal pitch", self.uMM, 15) + self.AddParam("Pads", "oval", self.uBool, True) - pad.SetSize(size) - - if self.parameters['Pads'].get('*oval', "true").lower() == "true": - pad.SetShape(pcbnew.PAD_OVAL) - else: - pad.SetShape(pcbnew.PAD_RECT) - - pad.SetAttribute(pcbnew.PAD_SMD) - pad.SetLayerMask(pcbnew.PAD_SMD_DEFAULT_LAYERS) - pad.SetPos0(pos) - pad.SetPosition(pos) - pad.SetPadName(name) - - return pad + self.AddParam("Pads", "package width", self.uMM, 14) + self.AddParam("Pads", "package height", self.uMM, 14) def CheckParameters(self): - errors = "" - pads = self.parameters - num_pads = pads["Pads"]["*n"] - if (num_pads < 1): - self.parameter_errors["Pads"]["*n"] = "Must be positive" - errors +="Pads/n has wrong value, " - pads["Pads"]["*n"] = int(num_pads) # Reset to int instead of float + self.CheckParamPositiveInt("Pads", "*n", is_multiple_of = 4) - return errors + def GetReference(self): + return "QFP %d" % self.parameters["Pads"]["*n"] - def BuildFootprint(self): - if self.has_errors(): - print "Cannot build footprint: Parameters have errors:" - print self.parameter_errors - return + def BuildThisFootprint(self): - print "Building new QFP footprint with the following parameters:" - self.print_parameter_table() + pads = self.parameters["Pads"] - self.module = pcbnew.MODULE(None) # create a new module + pad_pitch = pads["pad pitch"] + pad_length = self.parameters["Pads"]["pad length"] + pad_width = self.parameters["Pads"]["pad width"] - pads = self.parameters - num_pads = int(pads["Pads"]["*n"]) - pad_width = pads["Pads"]["width"] - pad_length = pads["Pads"]["length"] - pad_pitch = pads["Pads"]["pitch"] - pad_horizontal_pitch = pads["Pads"]["horizontal pitch"] - pad_vertical_pitch = pads["Pads"]["vertical pitch"] + v_pitch = pads["vertical pitch"] + h_pitch = pads["horizontal pitch"] - package_width = pads["Package"]["width"] - package_height = pads["Package"]["height"] + pads_per_row = pads["*n"] // 4 - side_length = pad_pitch * ((num_pads / 4) - 1) + row_len = (pads_per_row - 1) * pad_pitch - offsetX = pad_pitch * ((num_pads / 4) - 1) / 2 - text_size = pcbnew.wxSize(pcbnew.FromMM(0.8), pcbnew.FromMM(0.8)) + h_pad = PA.PadMaker(self.module).SMDPad(pad_width, pad_length, shape = pcbnew.PAD_OVAL) + v_pad = PA.PadMaker(self.module).SMDPad(pad_length, pad_width, shape = pcbnew.PAD_OVAL) - self.module.SetReference("QFP %d" % int(num_pads)) - self.module.Reference().SetPos0(pcbnew.wxPoint(0, pcbnew.FromMM(-0.8))) - self.module.Reference().SetTextPosition(self.module.Reference().GetPos0()) - self.module.Reference().SetSize(text_size) + #left row + pin1Pos = pcbnew.wxPoint(-h_pitch / 2, -row_len / 2) + array = PA.PadLineArray(h_pad, pads_per_row, pad_pitch, True, pin1Pos) + array.SetFirstPadInArray(1) + array.AddPadsToModule() - self.module.SetValue("U**") - self.module.Value().SetPos0(pcbnew.wxPoint(0, pcbnew.FromMM(+0.8))) - self.module.Value().SetTextPosition(self.module.Value().GetPos0()) - self.module.Value().SetSize(text_size) + #bottom row + pin1Pos = pcbnew.wxPoint(-row_len / 2, v_pitch / 2) + array = PA.PadLineArray(v_pad, pads_per_row, pad_pitch, False, pin1Pos) + array.SetFirstPadInArray(pads_per_row + 1) + array.AddPadsToModule() - fpid = pcbnew.FPID(self.module.GetReference()) #the name in library - self.module.SetFPID( fpid ) + #right row + pin1Pos = pcbnew.wxPoint(h_pitch / 2, row_len / 2) + array = PA.PadLineArray(h_pad, pads_per_row, -pad_pitch, True, pin1Pos) + array.SetFirstPadInArray(2*pads_per_row + 1) + array.AddPadsToModule() - pad_size_left_right = pcbnew.wxSize(pad_length, pad_width) - pad_size_bottom_top = pcbnew.wxSize(pad_width, pad_length) + #top row + pin1Pos = pcbnew.wxPoint(row_len / 2, -v_pitch / 2) + array = PA.PadLineArray(v_pad, pads_per_row, -pad_pitch, False, pin1Pos) + array.SetFirstPadInArray(3*pads_per_row + 1) + array.AddPadsToModule() - for cur_pad in range(0, num_pads): - side = int(cur_pad / (num_pads / 4)) # 0 -> left, 1 -> bottom, 2 -> right, 3 -> top + limX = pads["package width"] / 2 + limY = pads["package height"] / 2 + inner = (row_len / 2) + pad_pitch - if side == 0 or side == 2: - pad_size = pad_size_left_right - - pad_pos_x = -(pad_horizontal_pitch / 2) - pad_pos_y = (cur_pad % (num_pads / 4)) * pad_pitch - (side_length / 2) - - if side == 2: - pad_pos_x = -pad_pos_x - pad_pos_y = -pad_pos_y - - else: - pad_size = pad_size_bottom_top - - pad_pos_x = (cur_pad % (num_pads / 4)) * pad_pitch - (side_length / 2) - pad_pos_y = -(pad_vertical_pitch / 2) - - if side == 1: - pad_pos_y = -pad_pos_y - else: - pad_pos_x = -pad_pos_x - - pad_pos = pcbnew.wxPoint(pad_pos_x, pad_pos_y) - - pad = self.smd_rect_pad(self.module, pad_size, pad_pos, str(cur_pad + 1)) - - self.module.Add(pad) - - half_package_width = package_width / 2 - half_package_height = package_height / 2 - - package_pad_height_offset = abs(package_height - side_length) / 2 - pad_pitch - package_pad_width_offset = abs(package_width - side_length) / 2 - pad_pitch - - # Bottom Left Edge, vertical line - outline = pcbnew.EDGE_MODULE(self.module) - outline.SetWidth(pcbnew.FromMM(0.2)) - outline.SetLayer(pcbnew.SILKSCREEN_N_FRONT) - outline.SetShape(pcbnew.S_SEGMENT) - start = pcbnew.wxPoint(-half_package_width, half_package_height - package_pad_height_offset) - end = pcbnew.wxPoint(-half_package_width, half_package_height) - outline.SetStartEnd(start, end) - self.module.Add(outline) - - # Bottom Left Edge, horizontal line - outline = pcbnew.EDGE_MODULE(self.module) - outline.SetWidth(pcbnew.FromMM(0.2)) - outline.SetLayer(pcbnew.SILKSCREEN_N_FRONT) - outline.SetShape(pcbnew.S_SEGMENT) - start = pcbnew.wxPoint(-half_package_width, half_package_height) - end = pcbnew.wxPoint(-half_package_width + package_pad_width_offset, half_package_height) - outline.SetStartEnd(start, end) - self.module.Add(outline) - - # Bottom Right Edge, vertical line - outline = pcbnew.EDGE_MODULE(self.module) - outline.SetWidth(pcbnew.FromMM(0.2)) - outline.SetLayer(pcbnew.SILKSCREEN_N_FRONT) - outline.SetShape(pcbnew.S_SEGMENT) - start = pcbnew.wxPoint(half_package_width, half_package_height - package_pad_height_offset) - end = pcbnew.wxPoint(half_package_width, half_package_height) - outline.SetStartEnd(start, end) - self.module.Add(outline) - - # Bottom Right Edge, horizontal line - outline = pcbnew.EDGE_MODULE(self.module) - outline.SetWidth(pcbnew.FromMM(0.2)) - outline.SetLayer(pcbnew.SILKSCREEN_N_FRONT) - outline.SetShape(pcbnew.S_SEGMENT) - start = pcbnew.wxPoint(half_package_width, half_package_height) - end = pcbnew.wxPoint(half_package_width - package_pad_width_offset, half_package_height) - outline.SetStartEnd(start, end) - self.module.Add(outline) - - # Top Right Edge, vertical line - outline = pcbnew.EDGE_MODULE(self.module) - outline.SetWidth(pcbnew.FromMM(0.2)) - outline.SetLayer(pcbnew.SILKSCREEN_N_FRONT) - outline.SetShape(pcbnew.S_SEGMENT) - start = pcbnew.wxPoint(half_package_width, -half_package_height + package_pad_height_offset) - end = pcbnew.wxPoint(half_package_width, -half_package_height) - outline.SetStartEnd(start, end) - self.module.Add(outline) - - # Top Right Edge, horizontal line - outline = pcbnew.EDGE_MODULE(self.module) - outline.SetWidth(pcbnew.FromMM(0.2)) - outline.SetLayer(pcbnew.SILKSCREEN_N_FRONT) - outline.SetShape(pcbnew.S_SEGMENT) - start = pcbnew.wxPoint(half_package_width, -half_package_height) - end = pcbnew.wxPoint(half_package_width - package_pad_width_offset, -half_package_height) - outline.SetStartEnd(start, end) - self.module.Add(outline) - - # Top Left Edge, straight line - outline = pcbnew.EDGE_MODULE(self.module) - outline.SetWidth(pcbnew.FromMM(0.2)) - outline.SetLayer(pcbnew.SILKSCREEN_N_FRONT) - outline.SetShape(pcbnew.S_SEGMENT) - start = pcbnew.wxPoint(-half_package_width, -half_package_height + package_pad_height_offset) - end = pcbnew.wxPoint(-half_package_width + package_pad_width_offset, -half_package_height) - outline.SetStartEnd(start, end) - self.module.Add(outline) - - def print_parameter_table(self): - for name, section in self.parameters.iteritems(): - print " %s:" % name - - for key, value in section.iteritems(): - unit = "" - if (type(value) is int or type(value) is float) and not "*" in key: - unit = "mm" - - if "*" in key: - key = key[1:] - else: - value = pcbnew.ToMM(value) - - print " %s: %s%s" % (key, value, unit) - - def has_errors(self): - for name, section in self.parameter_errors.iteritems(): - for k, v in section.iteritems(): - if v: - return True - - return False + #top left - diagonal + self.draw.Line(-limX, -inner, -inner, -limY) + # top right + self.draw.Polyline([(inner, -limY), (limX, -limY), (limX, -inner)]) + # bottom left + self.draw.Polyline([(-inner, limY), (-limX, limY), (-limX, inner)]) + # bottom right + self.draw.Polyline([(inner, limY), (limX, limY), (limX, inner)]) QFPWizard().register() diff --git a/pcbnew/scripting/plugins/sdip_wizard.py b/pcbnew/scripting/plugins/sdip_wizard.py new file mode 100644 index 0000000000..c2a37653cb --- /dev/null +++ b/pcbnew/scripting/plugins/sdip_wizard.py @@ -0,0 +1,200 @@ +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. +# + +from __future__ import division +import pcbnew + +import HelpfulFootprintWizardPlugin as HFPW +import PadArray as PA + + +class RowedGridArray(PA.PadGridArray): + + def NamingFunction(self, x, y): + if (x % 2) == 0: # even row, count up + return (x * self.ny) + y + 1; + else: # odd row, count down + return (self.ny * (x + 1)) - y; + +class RowedFootprint(HFPW.HelpfulFootprintWizardPlugin): + + def GenerateParameterList(self): + + # defaults for a DIP package + self.AddParam("Pads", "n", self.uNatural, 24) + self.AddParam("Pads", "silk screen inside", self.uBool, False) + self.AddParam("Pads", "row count", self.uNatural, 2) + + def CheckParameters(self): + self.CheckParamPositiveInt("Pads", "*row count") + self.CheckParamPositiveInt("Pads", "*n", is_multiple_of = self.parameters["Pads"]["*row count"]) + self.CheckParamBool("Pads", "*silk screen inside") #can do this internally to parameter manager? + + def BuildThisFootprint(self): + + pads = self.parameters["Pads"] + + num_pads = pads["*n"] + + pad_length = pads["pad length"] + pad_width = pads["pad width"] + row_pitch = pads["row spacing"] + pad_pitch = pads["pad pitch"] + num_rows = pads["*row count"] + + pads_per_row = num_pads // num_rows + + row_length = pad_pitch * (pads_per_row - 1) #fenceposts + + # add in the pads + pad = self.GetPad() + + pin1Pos = pcbnew.wxPoint(-((num_rows - 1) * row_pitch) / 2, -row_length / 2) + + array = RowedGridArray(pad, num_rows, pads_per_row, row_pitch, pad_pitch, pin1Pos) + array.AddPadsToModule() + + # draw the Silk Screen + + pad_length = pads["pad length"] + pad_width = pads["pad width"] + + ssXOffset = -pad_length / 2 - pads["outline x margin"] + ssYOffset = -pad_width / 2 - pads["outline y margin"] + + + if pads["*silk screen inside"]: + ssXOffset *= -1 + + ssX = -pin1Pos.x - ssXOffset + ssY = -pin1Pos.y - ssYOffset + + + self.DrawBox(ssX, ssY) + + #reference and value + textSize = pcbnew.FromMM(0.8) + + self.draw.Value(0, - ssY - textSize, textSize) + self.draw.Reference(0, ssY + textSize, textSize) + + +class SDIPWizard(RowedFootprint): + + def GetName(self): + return "S/DIP" + + def GetDescription(self): + return "Single/Dual Inline Package Footprint Wizard" + + def GenerateParameterList(self): + RowedFootprint.GenerateParameterList(self) + + self.AddParam("Pads", "pad pitch", self.uMils, 100) + self.AddParam("Pads", "pad width", self.uMils, 60) + self.AddParam("Pads", "pad length", self.uMils, 150) + self.AddParam("Pads", "row spacing", self.uMils, 300) + self.AddParam("Pads", "drill size", self.uMM, 1) + self.AddParam("Pads", "outline x margin", self.uMM, 0.5) + self.AddParam("Pads", "outline y margin", self.uMM, 1) + + def GetReference(self): + + rows = self.parameters["Pads"]["*row count"] + + if rows == 1: + name = "SIP" + elif rows == 2: + name = "DIP" + else: # triple and up aren't really a thing, but call it something! + name = "xIP" + + return "%s %d" % (name, self.parameters["Pads"]["*n"]) + + def GetPad(self): + pad_length = self.parameters["Pads"]["pad length"] + pad_width = self.parameters["Pads"]["pad width"] + drill = self.parameters["Pads"]["drill size"] + return PA.PadMaker(self.module).THPad(pad_width, pad_length, drill, shape = pcbnew.PAD_OVAL) + + def DrawBox(self, ssX, ssY): + + if self.parameters["Pads"]["*row count"] == 2: + + # ---------- + # |8 7 6 5 | + # > | + # |1 2 3 4 | + # ---------- + + # draw the notch + notchWidth = pcbnew.FromMM(3) + notchHeight = pcbnew.FromMM(1) + + self.draw.NotchedBox(0, 0, ssX*2, ssY*2, notchWidth, notchHeight) + else: + # ----------------- + # |1|2 3 4 5 6 7 8| + # ----------------- + self.draw.Box(ssX*2, ssY*2) + + #line between pin1 and pin2 + pad_pitch = self.parameters["Pads"]["pad pitch"]; + self.draw.HLine(-ssX, pin1Pos.y + pad_pitch/2, ssX * 2) + + return ssX, ssY + +SDIPWizard().register() + + +class SOICWizard(RowedFootprint): + + def GetName(self): + return "SOIC" + + def GetDescription(self): + return "SOIC, MSOP, SSOP, TSSOP, etc, footprint wizard" + + def GetReference(self): + return "%s %d" % ("SOIC", self.parameters["Pads"]["*n"]) + + def GenerateParameterList(self): + RowedFootprint.GenerateParameterList(self) + + #and override some of them + self.AddParam("Pads", "pad pitch", self.uMM, 1.27) + self.AddParam("Pads", "pad width", self.uMM, 0.6) + self.AddParam("Pads", "pad length", self.uMM, 2.2) + self.AddParam("Pads", "row spacing", self.uMM, 5.2) + + self.AddParam("Pads", "outline x margin", self.uMM, 0.5) + self.AddParam("Pads", "outline y margin", self.uMM, 0.5) + + def GetPad(self): + pad_length = self.parameters["Pads"]["pad length"] + pad_width = self.parameters["Pads"]["pad width"] + return PA.PadMaker(self.module).SMDPad(pad_width, pad_length, shape = pcbnew.PAD_RECT) + + def DrawBox(self, ssX, ssY): + + # ---------- + # |8 7 6 5 | + # |1 2 3 4 | + # \--------- + + self.draw.BoxWithDiagonalAtCorner(0, 0, ssX*2, ssY*2, pcbnew.FromMM(1)) + +SOICWizard().register() From 32a9a4a400a276fd7228b55701ce0a766cbf34fe Mon Sep 17 00:00:00 2001 From: Andrey Fedorushkov Date: Thu, 24 Apr 2014 09:44:27 +0400 Subject: [PATCH 313/741] fix not correct build if BUILD_GITHUB_PLUGIN=ON in linux rpm-based distro --- pcbnew/github/CMakeLists.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pcbnew/github/CMakeLists.txt b/pcbnew/github/CMakeLists.txt index 34bf3c9cef..48596231ae 100644 --- a/pcbnew/github/CMakeLists.txt +++ b/pcbnew/github/CMakeLists.txt @@ -54,9 +54,7 @@ set( GITHUB_PLUGIN_SRCS github_plugin.cpp ) -add_library( github_plugin - github_plugin.cpp - ) +add_library( github_plugin STATIC ${GITHUB_PLUGIN_SRCS} ) # No, you don't get github without boost and openssl. Boost_LIBRARIES now moved up # into CMakeLists.txt for pcbnew and cvpcb: From 8416c5d65584b1acd5cdf456728d81a3e17e72f9 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Thu, 24 Apr 2014 06:30:14 -0500 Subject: [PATCH 314/741] Add diagnostic message for missing *.kiface, which is now a fatal installation bug. --- common/kiway.cpp | 18 ++++++++++++++++++ kicad/kicad.cpp | 24 ++++++++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/common/kiway.cpp b/common/kiway.cpp index c5e432ca9b..8e5966506c 100644 --- a/common/kiway.cpp +++ b/common/kiway.cpp @@ -183,6 +183,24 @@ KIFACE* KIWAY::KiFACE( FACE_T aFaceId, bool doLoad ) // In any of the failure cases above, dso.Unload() should be called here // by dso destructor. + // However: + + // There is a file installation bug. We only look for KIFACE_I's which we know + // to exist, and we did not find one. If we do not find one, this is an + // installation bug. + + wxString msg = wxString::Format( wxT( + "Fatal Installation Bug\nmissing file:\n'%s'\n\nargv[0]:\n'%s'" ), + GetChars( dname ), + GetChars( wxStandardPaths::Get().GetExecutablePath() ) + ); + + // This is a fatal error, one from which we cannot recover, nor do we want + // to protect against in client code which would require numerous noisy + // tests in numerous places. So we inform the user that the installation + // is bad. This exception will likely not get caught until way up in + // PGM_BASE or a derivative, at which point the process will exit gracefully. + THROW_IO_ERROR( msg ); } return NULL; diff --git a/kicad/kicad.cpp b/kicad/kicad.cpp index ac0a734dc1..44e9488e56 100644 --- a/kicad/kicad.cpp +++ b/kicad/kicad.cpp @@ -280,6 +280,30 @@ struct APP_KICAD : public wxApp return wxApp::OnExit(); } + int OnRun() // overload wxApp virtual + { + try + { + return wxApp::OnRun(); + } + catch( const std::exception& e ) + { + wxLogError( wxT( "Unhandled exception class: %s what: %s" ), + GetChars( FROM_UTF8( typeid(e).name() )), + GetChars( FROM_UTF8( e.what() ) ) );; + } + catch( const IO_ERROR& ioe ) + { + wxLogError( GetChars( ioe.errorText ) ); + } + catch(...) + { + wxLogError( wxT( "Unhandled exception of unknown type" ) ); + } + + return -1; + } + /** * Function MacOpenFile * is specific to MacOSX (not used under Linux or Windows). From 8f0a773bc46f5763f36d3d6f221403fc3beba327 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Thu, 24 Apr 2014 12:21:34 -0500 Subject: [PATCH 315/741] Add custom target on linux to make build-dir symlinks. --- kicad/CMakeLists.txt | 70 ++++++++++++++++++++++++++++---------------- 1 file changed, 44 insertions(+), 26 deletions(-) diff --git a/kicad/CMakeLists.txt b/kicad/CMakeLists.txt index 2647e93792..1d76b4696b 100644 --- a/kicad/CMakeLists.txt +++ b/kicad/CMakeLists.txt @@ -1,12 +1,12 @@ -add_definitions(-DKICAD) +add_definitions( -DKICAD ) -include_directories(BEFORE ${INC_BEFORE}) +include_directories( BEFORE ${INC_BEFORE} ) include_directories( ${INC_AFTER} ) -set(KICAD_SRCS +set( KICAD_SRCS class_treeprojectfiles.cpp class_treeproject_item.cpp commandframe.cpp @@ -19,48 +19,66 @@ set(KICAD_SRCS preferences.cpp prjconfig.cpp project_template.cpp - tree_project_frame.cpp) + tree_project_frame.cpp + ) -if(MINGW) +if( MINGW ) # KICAD_RESOURCES variable is set by the macro. - mingw_resource_compiler(kicad) + mingw_resource_compiler( kicad ) endif() -if(APPLE) - set(KICAD_RESOURCES kicad.icns kicad_doc.icns) - set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/kicad.icns" - PROPERTIES MACOSX_PACKAGE_LOCATION Resources) - set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/kicad_doc.icns" - PROPERTIES MACOSX_PACKAGE_LOCATION Resources) - set(MACOSX_BUNDLE_ICON_FILE kicad.icns) - set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.kicad) - set(MACOSX_BUNDLE_NAME kicad) -endif(APPLE) +if( APPLE ) + set( KICAD_RESOURCES kicad.icns kicad_doc.icns ) + set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/kicad.icns" PROPERTIES + MACOSX_PACKAGE_LOCATION Resources + ) + set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/kicad_doc.icns" PROPERTIES + MACOSX_PACKAGE_LOCATION Resources + ) + set( MACOSX_BUNDLE_ICON_FILE kicad.icns ) + set( MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.kicad ) + set( MACOSX_BUNDLE_NAME kicad ) +endif() -add_executable(kicad WIN32 MACOSX_BUNDLE +add_executable( kicad WIN32 MACOSX_BUNDLE ${KICAD_SRCS} ${KICAD_EXTRA_SRCS} ${KICAD_RESOURCES} ) -if(APPLE) - set_target_properties(kicad PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist) - target_link_libraries(kicad +if( UNIX ) + # for build directory: create kiface symlinks so kicad (exe) can be run in-situ + add_custom_target( kiface_sym_links + COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_BINARY_DIR}/eeschema/_eeschema.kiface" "${CMAKE_BINARY_DIR}/kicad/_eeschema.kiface" + COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_BINARY_DIR}/pcbnew/_pcbnew.kiface" "${CMAKE_BINARY_DIR}/kicad/_pcbnew.kiface" + COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_BINARY_DIR}/cvpcb/_cvpcb.kiface" "${CMAKE_BINARY_DIR}/kicad/_cvpcb.kiface" + COMMENT "Making /kicad/" + ) +endif() + + +if( APPLE ) + set_target_properties( kicad PROPERTIES + MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist + ) + target_link_libraries( kicad common bitmaps polygon ${wxWidgets_LIBRARIES} ) -else(APPLE) - target_link_libraries(kicad +else() + target_link_libraries( kicad common bitmaps polygon ${wxWidgets_LIBRARIES} ${GDI_PLUS_LIBRARIES} ) -endif(APPLE) +endif() + +install( TARGETS kicad + DESTINATION ${KICAD_BIN} + COMPONENT binary + ) -install(TARGETS kicad - DESTINATION ${KICAD_BIN} - COMPONENT binary) From 1e68c5f8b3e1f1bc6038406fc90d2bfce7248988 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Thu, 24 Apr 2014 12:25:57 -0500 Subject: [PATCH 316/741] comment fix, simplified unhandled IO_ERROR exception report in single_top.cpp. --- CMakeLists.txt | 23 ++++++++++++----------- common/kiway.cpp | 4 ++-- common/single_top.cpp | 4 +--- 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5c061111f3..092cae2587 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -621,7 +621,6 @@ add_subdirectory( 3d-viewer ) add_subdirectory( cvpcb ) add_subdirectory( eeschema ) add_subdirectory( gerbview ) -add_subdirectory( kicad ) add_subdirectory( lib_dxf ) add_subdirectory( pcbnew ) add_subdirectory( polygon ) @@ -629,9 +628,11 @@ add_subdirectory( pagelayout_editor ) add_subdirectory( potrace ) add_subdirectory( bitmap2component ) add_subdirectory( pcb_calculator ) +add_subdirectory( kicad ) # should follow pcbnew, eeschema add_subdirectory( tools ) add_subdirectory( utils ) add_subdirectory( qa ) + #add_subdirectory( new ) @@ -651,16 +652,16 @@ add_dependencies( pnsrouter boost ) if ( KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC ) -add_dependencies( pcbnew lib-dependencies ) -add_dependencies( eeschema lib-dependencies ) -add_dependencies( cvpcb lib-dependencies ) -add_dependencies( common lib-dependencies ) -add_dependencies( gal lib-dependencies ) -add_dependencies( pcbcommon lib-dependencies ) -add_dependencies( 3d-viewer lib-dependencies ) -add_dependencies( pcad2kicadpcb lib-dependencies ) -add_dependencies( pl_editor lib-dependencies ) -add_dependencies( pnsrouter lib-dependencies ) + add_dependencies( pcbnew lib-dependencies ) + add_dependencies( eeschema lib-dependencies ) + add_dependencies( cvpcb lib-dependencies ) + add_dependencies( common lib-dependencies ) + add_dependencies( gal lib-dependencies ) + add_dependencies( pcbcommon lib-dependencies ) + add_dependencies( 3d-viewer lib-dependencies ) + add_dependencies( pcad2kicadpcb lib-dependencies ) + add_dependencies( pl_editor lib-dependencies ) + add_dependencies( pnsrouter lib-dependencies ) endif() if ( KICAD_BUILD_DYNAMIC ) diff --git a/common/kiway.cpp b/common/kiway.cpp index 8e5966506c..13c0072a92 100644 --- a/common/kiway.cpp +++ b/common/kiway.cpp @@ -198,8 +198,8 @@ KIFACE* KIWAY::KiFACE( FACE_T aFaceId, bool doLoad ) // This is a fatal error, one from which we cannot recover, nor do we want // to protect against in client code which would require numerous noisy // tests in numerous places. So we inform the user that the installation - // is bad. This exception will likely not get caught until way up in - // PGM_BASE or a derivative, at which point the process will exit gracefully. + // is bad. This exception will likely not get caught until way up in the + // wxApp derivative, at which point the process will exit gracefully. THROW_IO_ERROR( msg ); } diff --git a/common/single_top.cpp b/common/single_top.cpp index 0200170b10..c153f891d4 100644 --- a/common/single_top.cpp +++ b/common/single_top.cpp @@ -176,9 +176,7 @@ struct APP_SINGLE_TOP : public wxApp } catch( const IO_ERROR& ioe ) { - wxLogError( wxT( "Unhandled exception class: %s what: %s" ), - GetChars( FROM_UTF8( typeid( ioe ).name() ) ), - GetChars( ioe.errorText ) ); + wxLogError( GetChars( ioe.errorText ) ); } catch(...) { From b427aa49c1f52ad0a75d5cf48d5fc5cb90765077 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Thu, 24 Apr 2014 13:31:11 -0500 Subject: [PATCH 317/741] single_top w/o kiface whines and exits gracefully. --- common/basicframe.cpp | 7 ++-- common/single_top.cpp | 81 +++++++++++++++++++++++++++++++++---------- 2 files changed, 67 insertions(+), 21 deletions(-) diff --git a/common/basicframe.cpp b/common/basicframe.cpp index a19fbd96cf..91a5c0b4ee 100644 --- a/common/basicframe.cpp +++ b/common/basicframe.cpp @@ -107,7 +107,10 @@ EDA_BASE_FRAME::EDA_BASE_FRAME( wxWindow* aParent, FRAME_T aFrameType, void EDA_BASE_FRAME::windowClosing( wxCloseEvent& event ) { - SaveSettings( config() ); // virtual, wxFrame specific + wxConfigBase* cfg = config(); + + if( cfg ) + SaveSettings( cfg ); // virtual, wxFrame specific event.Skip(); // we did not "handle" the event, only eavesdropped on it. } @@ -266,7 +269,7 @@ wxConfigBase* EDA_BASE_FRAME::config() { // KICAD_MANAGER_FRAME overrides this wxConfigBase* ret = Kiface().KifaceSettings(); - wxASSERT( ret ); + //wxASSERT( ret ); return ret; } diff --git a/common/single_top.cpp b/common/single_top.cpp index c153f891d4..2632a32eae 100644 --- a/common/single_top.cpp +++ b/common/single_top.cpp @@ -152,21 +152,10 @@ PGM_BASE& Pgm() struct APP_SINGLE_TOP : public wxApp { bool OnInit() // overload wxApp virtual - { - return Pgm().OnPgmInit( this ); - } - - int OnExit() // overload wxApp virtual - { - Pgm().OnPgmExit(); - return wxApp::OnExit(); - } - - int OnRun() // overload wxApp virtual { try { - return wxApp::OnRun(); + return Pgm().OnPgmInit( this ); } catch( const std::exception& e ) { @@ -183,7 +172,42 @@ struct APP_SINGLE_TOP : public wxApp wxLogError( wxT( "Unhandled exception of unknown type" ) ); } - return -1; + Pgm().OnPgmExit(); + + return false; + } + + int OnExit() // overload wxApp virtual + { + return wxApp::OnExit(); + } + + int OnRun() // overload wxApp virtual + { + int ret = -1; + + try + { + ret = wxApp::OnRun(); + } + catch( const std::exception& e ) + { + wxLogError( wxT( "Unhandled exception class: %s what: %s" ), + GetChars( FROM_UTF8( typeid(e).name() )), + GetChars( FROM_UTF8( e.what() ) ) );; + } + catch( const IO_ERROR& ioe ) + { + wxLogError( GetChars( ioe.errorText ) ); + } + catch(...) + { + wxLogError( wxT( "Unhandled exception of unknown type" ) ); + } + + Pgm().OnPgmExit(); + + return ret; } /** @@ -240,10 +264,30 @@ static KIFACE_GETTER_FUNC* get_kiface_getter( const wxString& aDSOName ) // No further reporting required here. } - // Tell dso's wxDynamicLibrary destructor not to Unload() the program image. - (void) dso.Detach(); + else + { + // Tell dso's wxDynamicLibrary destructor not to Unload() the program image. + (void) dso.Detach(); - return (KIFACE_GETTER_FUNC*) addr; + return (KIFACE_GETTER_FUNC*) addr; + } + + // There is a file installation bug. We only look for KIFACE_I's which we know + // to exist, and we did not find one. If we do not find one, this is an + // installation bug. + + wxString msg = wxString::Format( wxT( + "Fatal Installation Bug\nmissing file:\n'%s'\n\nargv[0]:\n'%s'" ), + GetChars( aDSOName ), + GetChars( wxStandardPaths::Get().GetExecutablePath() ) + ); + + // This is a fatal error, one from which we cannot recover, nor do we want + // to protect against in client code which would require numerous noisy + // tests in numerous places. So we inform the user that the installation + // is bad. This exception will likely not get caught until way up in the + // wxApp derivative, at which point the process will exit gracefully. + THROW_IO_ERROR( msg ); #else return &KIFACE_GETTER; @@ -415,9 +459,8 @@ void PGM_SINGLE_TOP::OnPgmExit() saveCommonSettings(); - // write common settings to disk, and destroy everything in PGM_BASE, - // especially wxSingleInstanceCheckerImpl earlier than wxApp and earlier - // than static destruction would. + // Destroy everything in PGM_BASE, especially wxSingleInstanceCheckerImpl + // earlier than wxApp and earlier than static destruction would. PGM_BASE::destroy(); } From 9c1f6b7307423f4a962604746491c603491a3bf5 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 24 Apr 2014 20:54:49 +0200 Subject: [PATCH 318/741] Pcbnew: fix Bug #1304418 . Fix also a related issue which crashes Pcbnew in some corner cases. (for instance, when a footprint from the currently edited board is loaded in the footprint editor, and when the board is cleared or reloaded) In footprint editor, the net names are no more shown od modifiable (becuase the footprint editor does not know anything about net names. This change should allow the changes planned in pcbnew. --- common/dialog_about/dialog_about.cpp | 9 +- common/dialog_about/dialog_about_base.cpp | 5 +- common/dialog_about/dialog_about_base.fbp | 987 +++++++++++++--------- common/dialog_about/dialog_about_base.h | 15 +- pcbnew/class_netinfo.h | 4 +- pcbnew/class_netinfolist.cpp | 3 +- pcbnew/class_pad_draw_functions.cpp | 6 +- pcbnew/dialogs/dialog_pad_properties.cpp | 110 ++- pcbnew/loadcmp.cpp | 19 +- pcbnew/moduleframe.cpp | 1 - 10 files changed, 703 insertions(+), 456 deletions(-) diff --git a/common/dialog_about/dialog_about.cpp b/common/dialog_about/dialog_about.cpp index 13ab08a9a3..d4deb7122f 100644 --- a/common/dialog_about/dialog_about.cpp +++ b/common/dialog_about/dialog_about.cpp @@ -29,16 +29,9 @@ dialog_about::dialog_about(wxWindow *parent, AboutAppInfo& appInfo) m_staticTextBuildVersion->SetLabel( info.GetBuildVersion() ); m_staticTextLibVersion->SetLabel( info.GetLibVersion() ); - /* Affects m_titlepanel the parent of some wxStaticText. - * Changing the text afterwards makes it under Windows necessary to call 'Layout()' - * so that the new text gets properly layout. - */ -/* m_staticTextCopyright->GetParent()->Layout(); - m_staticTextBuildVersion->GetParent()->Layout(); - m_staticTextLibVersion->GetParent()->Layout(); -*/ DeleteNotebooks(); CreateNotebooks(); + GetSizer()->SetSizeHints(this); m_auiNotebook->Update(); SetFocus(); diff --git a/common/dialog_about/dialog_about_base.cpp b/common/dialog_about/dialog_about_base.cpp index de343ab237..66cb2f05a2 100644 --- a/common/dialog_about/dialog_about_base.cpp +++ b/common/dialog_about/dialog_about_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Sep 8 2010) +// C++ code generated with wxFormBuilder (version Nov 6 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -46,11 +46,13 @@ dialog_about_base::dialog_about_base( wxWindow* parent, wxWindowID id, const wxS m_staticTextLibVersion->Wrap( -1 ); b_apptitleSizer->Add( m_staticTextLibVersion, 0, wxALIGN_CENTER|wxBOTTOM|wxLEFT|wxRIGHT, 5 ); + bSizer3->Add( b_apptitleSizer, 10, wxEXPAND, 5 ); bSizer3->Add( 0, 0, 2, wxEXPAND, 5 ); + bSizer1->Add( bSizer3, 0, wxEXPAND, 5 ); wxStaticLine* m_staticline1; @@ -67,6 +69,7 @@ dialog_about_base::dialog_about_base( wxWindow* parent, wxWindowID id, const wxS m_buttonOK->SetDefault(); bSizer1->Add( m_buttonOK, 0, wxALIGN_CENTER|wxALL, 5 ); + this->SetSizer( bSizer1 ); this->Layout(); diff --git a/common/dialog_about/dialog_about_base.fbp b/common/dialog_about/dialog_about_base.fbp index 2f6951303c..ce0bf7d57d 100644 --- a/common/dialog_about/dialog_about_base.fbp +++ b/common/dialog_about/dialog_about_base.fbp @@ -2,11 +2,13 @@ - + C++ 1 source_name + 0 0 + res UTF-8 connect dialog_about_base @@ -14,73 +16,80 @@ none 1 MyProject - + . - + 1 + 1 + 1 1 + UI 1 0 - - - + 0 + wxAUI_MGR_DEFAULT + + + 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 +98,7 @@ wxEXPAND 0 - + bSizer3 wxHORIZONTAL none @@ -108,53 +117,80 @@ wxALIGN_CENTER|wxALL 1 - - - + 1 + 1 + 1 + 1 + + + + + + + + + 1 + 0 + 1 + 1 + 0 + Dock + 0 + Left 1 - - + + 1 + + 0 0 wxID_ANY - - + + 0 + + + 0 + + 1 m_bitmapApp + 1 + + protected - - - - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - + 1 + + Resizable + 1 + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -162,7 +198,7 @@ wxEXPAND 10 - + b_apptitleSizer wxVERTICAL none @@ -171,55 +207,82 @@ wxALIGN_CENTER|wxALL 0 - - + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + 1 + 0 + Dock + 0 + Left 1 - + + 1 ,90,92,14,70,0 + 0 0 wxID_ANY App Title - - + + 0 + + + 0 + + 1 m_staticTextAppTitle + 1 + + protected - - + 1 + + Resizable + 1 + wxALIGN_CENTRE - - - - wxFILTER_NONE - wxDefaultValidator - - - - + + 0 + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -227,55 +290,82 @@ wxALIGN_CENTER|wxALL 0 - - + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + 1 + 0 + Dock + 0 + Left 1 - - + + 1 + + 0 0 wxID_ANY Copyright Info - - + + 0 + + + 0 + + 1 m_staticTextCopyright + 1 + + protected - - + 1 + + Resizable + 1 + wxALIGN_CENTRE - - - - wxFILTER_NONE - wxDefaultValidator - - - - + + 0 + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -283,55 +373,82 @@ wxALIGN_CENTER|wxLEFT|wxRIGHT|wxTOP 0 - - + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + 1 + 0 + Dock + 0 + Left 1 - - + + 1 + + 0 0 wxID_ANY Build Version Info - - + + 0 + + + 0 + + 1 m_staticTextBuildVersion + 1 + + protected - - + 1 + + Resizable + 1 + wxALIGN_CENTRE - - - - wxFILTER_NONE - wxDefaultValidator - - - - + + 0 + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -339,55 +456,82 @@ wxALIGN_CENTER|wxBOTTOM|wxLEFT|wxRIGHT 0 - - + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + 1 + 0 + Dock + 0 + Left 1 - - + + 1 + + 0 0 wxID_ANY Lib Version Info - - + + 0 + + + 0 + + 1 m_staticTextLibVersion + 1 + + protected - - + 1 + + Resizable + 1 + wxALIGN_CENTRE - - - - wxFILTER_NONE - wxDefaultValidator - - - - + + 0 + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -409,53 +553,80 @@ 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 + + none - - + 1 + + Resizable + 1 + wxLI_HORIZONTAL - - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -463,63 +634,90 @@ wxEXPAND | wxALL 2 - - + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + 1 + 0 + Dock + 0 + Left 1 - - + + 1 + + 0 0 wxID_ANY - + + 0 + + + 0 750,350 + 1 m_auiNotebook + 1 + + protected - - + 1 + + Resizable + 1 + wxAUI_NB_SCROLL_BUTTONS|wxAUI_NB_TAB_FIXED_WIDTH - + -1 - - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -527,56 +725,87 @@ wxALIGN_CENTER|wxALL 0 - - + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + 1 1 + 0 + Dock + 0 + Left 1 - - + + 1 + + 0 0 wxID_CANCEL OK - - + + 0 + + + 0 + + 1 m_buttonOK + 1 + + private - - - - - - + 1 + + Resizable + 1 + + + + 0 + + wxFILTER_NONE wxDefaultValidator - - - - + + + + OnOkClick - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/common/dialog_about/dialog_about_base.h b/common/dialog_about/dialog_about_base.h index 79253e9973..d0485f3575 100644 --- a/common/dialog_about/dialog_about_base.h +++ b/common/dialog_about/dialog_about_base.h @@ -1,15 +1,16 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Sep 8 2010) +// C++ code generated with wxFormBuilder (version Nov 6 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// -#ifndef __dialog_about_base__ -#define __dialog_about_base__ +#ifndef __DIALOG_ABOUT_BASE_H__ +#define __DIALOG_ABOUT_BASE_H__ +#include +#include #include - #include #include #include @@ -37,13 +38,11 @@ class dialog_about_base : public wxDialog wxButton* m_buttonOK; protected: - wxStaticBitmap* m_bitmapApp; wxStaticText* m_staticTextAppTitle; wxStaticText* m_staticTextCopyright; wxStaticText* m_staticTextBuildVersion; wxStaticText* m_staticTextLibVersion; - wxAuiNotebook* m_auiNotebook; // Virtual event handlers, overide them in your derived class @@ -53,9 +52,9 @@ class dialog_about_base : public wxDialog public: - dialog_about_base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About..."), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 750,350 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSTAY_ON_TOP ); + dialog_about_base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About..."), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 750,450 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSTAY_ON_TOP ); ~dialog_about_base(); }; -#endif //__dialog_about_base__ +#endif //__DIALOG_ABOUT_BASE_H__ diff --git a/pcbnew/class_netinfo.h b/pcbnew/class_netinfo.h index 64e6e9f8b8..88e77df440 100644 --- a/pcbnew/class_netinfo.h +++ b/pcbnew/class_netinfo.h @@ -1,7 +1,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2009 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com + * Copyright (C) 2009 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or @@ -234,7 +234,7 @@ private: /** - * Class NETINFO + * Class NETINFO_LIST * is a container class for NETINFO_ITEM elements, which are the nets. That makes * this class a container for the nets. */ diff --git a/pcbnew/class_netinfolist.cpp b/pcbnew/class_netinfolist.cpp index da3bd875d1..5f73ca0a98 100644 --- a/pcbnew/class_netinfolist.cpp +++ b/pcbnew/class_netinfolist.cpp @@ -1,8 +1,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2009 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2014 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/pcbnew/class_pad_draw_functions.cpp b/pcbnew/class_pad_draw_functions.cpp index dfa489041a..78fcaf457c 100644 --- a/pcbnew/class_pad_draw_functions.cpp +++ b/pcbnew/class_pad_draw_functions.cpp @@ -499,10 +499,10 @@ void D_PAD::DrawShape( EDA_RECT* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo ) wxPoint tpos0 = shape_pos; // Position of the centre of text wxPoint tpos = tpos0; wxSize AreaSize; // size of text area, normalized to AreaSize.y < AreaSize.x - int shortname_len = GetShortNetname().Len(); + int shortname_len = 0; - if( !aDrawInfo.m_Display_netname ) - shortname_len = 0; + if( aDrawInfo.m_Display_netname ) + shortname_len = GetShortNetname().Len(); if( GetShape() == PAD_CIRCLE ) angle = 0; diff --git a/pcbnew/dialogs/dialog_pad_properties.cpp b/pcbnew/dialogs/dialog_pad_properties.cpp index 21c306b66f..fe5faeba66 100644 --- a/pcbnew/dialogs/dialog_pad_properties.cpp +++ b/pcbnew/dialogs/dialog_pad_properties.cpp @@ -97,11 +97,17 @@ private: PCB_BASE_FRAME* m_parent; D_PAD* m_currentPad; // pad currently being edited D_PAD* m_dummyPad; // a working copy used to show changes - BOARD* m_board; - D_PAD& m_padMaster; + D_PAD* m_padMaster; // The pad used to create new pads in board or + // footprint editor + BOARD* m_board; // the main board: this is the board handled by + // the PCB editor, if running or the dummy + // board used by the footprint editor + // (could happen when the Footprint editor will be run + // alone, outside the board editor bool m_isFlipped; // true if the parent footprint (therefore pads) is flipped (mirrored) // in this case, some Y coordinates values must be negated bool m_canUpdate; + bool m_canEditNetName; // true only if the called is the board editor private: void initValues(); @@ -139,25 +145,31 @@ private: void PadPropertiesAccept( wxCommandEvent& event ); }; +void PCB_BASE_FRAME::InstallPadOptionsFrame( D_PAD* aPad ) +{ + DIALOG_PAD_PROPERTIES dlg( this, aPad ); + + dlg.ShowModal(); +} + DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, D_PAD* aPad ) : - DIALOG_PAD_PROPERTIES_BASE( aParent ), - // use aParent's parent, which is the original BOARD, not the dummy module editor BOARD, - // since FOOTPRINT_EDIT_FRAME::GetDesignSettings() is tricked out to use the PCB_EDIT_FRAME's - // BOARD, not its own BOARD. - m_padMaster( aParent->GetDesignSettings().m_Pad_Master ) + DIALOG_PAD_PROPERTIES_BASE( aParent ) { m_canUpdate = false; m_parent = aParent; m_currentPad = aPad; // aPad can be NULL, if the dialog is called // from the module editor to set default pad characteristics + m_board = m_parent->GetBoard(); + + m_padMaster = &m_parent->GetDesignSettings().m_Pad_Master; m_dummyPad = new D_PAD( (MODULE*) NULL ); if( aPad ) m_dummyPad->Copy( aPad ); - else - m_dummyPad->Copy( &m_padMaster ); + else // We are editing a "master" pad, i.e. a pad used to create new pads + m_dummyPad->Copy( m_padMaster ); initValues(); @@ -238,19 +250,16 @@ void DIALOG_PAD_PROPERTIES::OnPaintShowPanel( wxPaintEvent& event ) } -void PCB_BASE_FRAME::InstallPadOptionsFrame( D_PAD* aPad ) -{ - DIALOG_PAD_PROPERTIES dlg( this, aPad ); - - dlg.ShowModal(); -} - - void DIALOG_PAD_PROPERTIES::initValues() { wxString msg; double angle; + // Disable pad net name wxTextCtrl if the caller is the footprint editor + // because nets are living only in the board managed by the board editor + m_canEditNetName = m_parent->IsType( FRAME_PCB ); + + // Setup layers names from board // Should be made first, before calling m_rbCopperLayersSel->SetSelection() m_rbCopperLayersSel->SetString( 0, m_board->GetLayerName( LAYER_N_FRONT ) ); @@ -471,7 +480,7 @@ void DIALOG_PAD_PROPERTIES::initValues() bool enable = m_dummyPad->GetAttribute() != PAD_HOLE_NOT_PLATED; m_PadNumCtrl->Enable( enable ); - m_PadNetNameCtrl->Enable( enable ); + m_PadNetNameCtrl->Enable( m_canEditNetName && enable && m_currentPad != NULL ); m_LengthPadToDieCtrl->Enable( enable ); if( m_dummyPad->GetDrillShape() != PAD_DRILL_OBLONG ) @@ -593,7 +602,7 @@ void DIALOG_PAD_PROPERTIES::PadOrientEvent( wxCommandEvent& event ) void DIALOG_PAD_PROPERTIES::PadTypeSelected( wxCommandEvent& event ) { - unsigned ii = m_PadType->GetSelection(); + unsigned ii = m_PadType->GetSelection(); if( ii >= NBTYPES ) // catches < 0 also ii = 0; @@ -614,7 +623,7 @@ void DIALOG_PAD_PROPERTIES::PadTypeSelected( wxCommandEvent& event ) // (disable for NPTH pads (mechanical pads) bool enable = ii != 3; m_PadNumCtrl->Enable( enable ); - m_PadNetNameCtrl->Enable( enable ); + m_PadNetNameCtrl->Enable( m_canEditNetName && enable && m_currentPad != NULL ); m_LengthPadToDieCtrl->Enable( enable ); } @@ -752,7 +761,9 @@ void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event ) bool rastnestIsChanged = false; int isign = m_isFlipped ? -1 : 1; - transferDataToPad( &m_padMaster ); + transferDataToPad( m_padMaster ); + // m_padMaster is a pattern: ensure there is no net for this pad: + m_padMaster->SetNetCode( NETINFO_LIST::UNCONNECTED ); if( m_currentPad ) // Set current Pad parameters { @@ -768,12 +779,12 @@ void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event ) m_currentPad->ClearFlags( DO_NOT_DRAW ); // Update values - m_currentPad->SetShape( m_padMaster.GetShape() ); - m_currentPad->SetAttribute( m_padMaster.GetAttribute() ); + m_currentPad->SetShape( m_padMaster->GetShape() ); + m_currentPad->SetAttribute( m_padMaster->GetAttribute() ); - if( m_currentPad->GetPosition() != m_padMaster.GetPosition() ) + if( m_currentPad->GetPosition() != m_padMaster->GetPosition() ) { - m_currentPad->SetPosition( m_padMaster.GetPosition() ); + m_currentPad->SetPosition( m_padMaster->GetPosition() ); rastnestIsChanged = true; } @@ -785,54 +796,62 @@ void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event ) m_currentPad->SetPos0( pt ); - m_currentPad->SetOrientation( m_padMaster.GetOrientation() * isign + module->GetOrientation() ); + m_currentPad->SetOrientation( m_padMaster->GetOrientation() * isign + module->GetOrientation() ); - m_currentPad->SetSize( m_padMaster.GetSize() ); + m_currentPad->SetSize( m_padMaster->GetSize() ); - size = m_padMaster.GetDelta(); + size = m_padMaster->GetDelta(); size.y *= isign; m_currentPad->SetDelta( size ); - m_currentPad->SetDrillSize( m_padMaster.GetDrillSize() ); - m_currentPad->SetDrillShape( m_padMaster.GetDrillShape() ); + m_currentPad->SetDrillSize( m_padMaster->GetDrillSize() ); + m_currentPad->SetDrillShape( m_padMaster->GetDrillShape() ); - wxPoint offset = m_padMaster.GetOffset(); + wxPoint offset = m_padMaster->GetOffset(); offset.y *= isign; m_currentPad->SetOffset( offset ); - m_currentPad->SetPadToDieLength( m_padMaster.GetPadToDieLength() ); + m_currentPad->SetPadToDieLength( m_padMaster->GetPadToDieLength() ); - if( m_currentPad->GetLayerMask() != m_padMaster.GetLayerMask() ) + if( m_currentPad->GetLayerMask() != m_padMaster->GetLayerMask() ) { rastnestIsChanged = true; - m_currentPad->SetLayerMask( m_padMaster.GetLayerMask() ); + m_currentPad->SetLayerMask( m_padMaster->GetLayerMask() ); } if( m_isFlipped ) m_currentPad->SetLayerMask( FlipLayerMask( m_currentPad->GetLayerMask() ) ); - m_currentPad->SetPadName( m_padMaster.GetPadName() ); + m_currentPad->SetPadName( m_padMaster->GetPadName() ); - if( m_currentPad->GetNetname() != m_PadNetNameCtrl->GetValue() ) + wxString padNetname; + + // For PAD_HOLE_NOT_PLATED, ensure there is no net name selected + if( m_padMaster->GetAttribute() != PAD_HOLE_NOT_PLATED ) + padNetname = m_PadNetNameCtrl->GetValue(); + + if( m_currentPad->GetNetname() != padNetname ) { - if( !m_PadNetNameCtrl->GetValue().IsEmpty() && m_padMaster.GetNetCode() == 0 ) + const NETINFO_ITEM* netinfo = m_board->FindNet( padNetname ); + + if( !padNetname.IsEmpty() && netinfo == NULL ) { DisplayError( NULL, _( "Unknown netname, netname not changed" ) ); } else { rastnestIsChanged = true; - m_currentPad->SetNetCode( m_padMaster.GetNetCode() ); + m_currentPad->SetNetCode( netinfo->GetNet() ); } } - m_currentPad->SetLocalClearance( m_padMaster.GetLocalClearance() ); - m_currentPad->SetLocalSolderMaskMargin( m_padMaster.GetLocalSolderMaskMargin() ); - m_currentPad->SetLocalSolderPasteMargin( m_padMaster.GetLocalSolderPasteMargin() ); - m_currentPad->SetLocalSolderPasteMarginRatio( m_padMaster.GetLocalSolderPasteMarginRatio() ); - m_currentPad->SetZoneConnection( m_padMaster.GetZoneConnection() ); - m_currentPad->SetThermalWidth( m_padMaster.GetThermalWidth() ); - m_currentPad->SetThermalGap( m_padMaster.GetThermalGap() ); + m_currentPad->SetLocalClearance( m_padMaster->GetLocalClearance() ); + m_currentPad->SetLocalSolderMaskMargin( m_padMaster->GetLocalSolderMaskMargin() ); + m_currentPad->SetLocalSolderPasteMargin( m_padMaster->GetLocalSolderPasteMargin() ); + m_currentPad->SetLocalSolderPasteMarginRatio( m_padMaster->GetLocalSolderPasteMarginRatio() ); + m_currentPad->SetZoneConnection( m_padMaster->GetZoneConnection() ); + m_currentPad->SetThermalWidth( m_padMaster->GetThermalWidth() ); + m_currentPad->SetThermalGap( m_padMaster->GetThermalGap() ); module->CalculateBoundingBox(); m_parent->SetMsgPanel( m_currentPad ); @@ -984,6 +1003,7 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( D_PAD* aPad ) // Check if user has set an existing net name const NETINFO_ITEM* netinfo = m_board->FindNet( m_PadNetNameCtrl->GetValue() ); + if( netinfo != NULL ) aPad->SetNetCode( netinfo->GetNet() ); else diff --git a/pcbnew/loadcmp.cpp b/pcbnew/loadcmp.cpp index 2db1223087..6c324b4d65 100644 --- a/pcbnew/loadcmp.cpp +++ b/pcbnew/loadcmp.cpp @@ -87,23 +87,28 @@ bool FOOTPRINT_EDIT_FRAME::Load_Module_From_BOARD( MODULE* aModule ) aModule = newModule; - GetBoard()->Add( aModule ); + GetBoard()->Add( newModule ); - aModule->ClearFlags(); + newModule->ClearFlags(); - GetBoard()->BuildListOfNets(); + // Clear references to net info, because the footprint editor + // does know any thing about nets handled by the current edited board. + // Morever the main board can change or the net info relative to this main board + // can change while editing this footprint in the footprint editor + for( D_PAD* pad = newModule->Pads(); pad; pad = pad->Next() ) + pad->SetNetCode( NETINFO_LIST::UNCONNECTED ); SetCrossHairPosition( wxPoint( 0, 0 ) ); - PlaceModule( aModule, NULL ); + PlaceModule( newModule, NULL ); // Put it on FRONT layer, // because this is the default in ModEdit, and in libs - if( aModule->GetLayer() != LAYER_N_FRONT ) - aModule->Flip( aModule->GetPosition() ); + if( newModule->GetLayer() != LAYER_N_FRONT ) + newModule->Flip( newModule->GetPosition() ); // Put it in orientation 0, // because this is the default orientation in ModEdit, and in libs - Rotate_Module( NULL, aModule, 0, false ); + Rotate_Module( NULL, newModule, 0, false ); GetScreen()->ClrModify(); Zoom_Automatique( false ); diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index bf2983ccd0..cb7a0425fc 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -46,7 +46,6 @@ #include #include -#include #include #include #include From 3f2c0e1a8dc3e8cf18ac25f947af73e173aaf070 Mon Sep 17 00:00:00 2001 From: Lorenzo Marcantonio Date: Fri, 25 Apr 2014 08:00:04 +0200 Subject: [PATCH 319/741] TRACK/SEGVIA cleanup - SEGVIA becomes VIA - Drill size moved from TRACK to VIA - Removed shape from TRACK, becomes ViaType in VIA - GetTrace becomes GetTrack, for uniformity - Some minor constification and typo fixes --- 3d-viewer/3d_canvas.h | 6 +- 3d-viewer/3d_draw.cpp | 34 +- include/class_board_design_settings.h | 3 +- include/view/view_item.h | 4 +- include/wxPcbStruct.h | 2 +- pcbnew/autorouter/auto_place_footprints.cpp | 7 +- pcbnew/autorouter/autorout.h | 2 + pcbnew/autorouter/graphpcb.cpp | 90 +-- pcbnew/autorouter/routing_matrix.cpp | 28 +- pcbnew/autorouter/solve.cpp | 13 +- pcbnew/board_undo_redo.cpp | 43 +- pcbnew/class_board.cpp | 38 +- pcbnew/class_board.h | 10 +- pcbnew/class_netinfo_item.cpp | 14 +- pcbnew/class_track.cpp | 599 +++++++++--------- pcbnew/class_track.h | 166 +++-- pcbnew/clean.cpp | 62 +- pcbnew/collectors.cpp | 4 +- pcbnew/dialogs/dialog_gendrill.cpp | 28 +- pcbnew/drc.cpp | 4 +- pcbnew/drc_clearance_test_functions.cpp | 21 +- pcbnew/drc_marker_functions.cpp | 5 +- pcbnew/drc_stuff.h | 4 +- pcbnew/eagle_plugin.cpp | 14 +- pcbnew/edit.cpp | 27 +- pcbnew/edit_track_width.cpp | 13 +- pcbnew/editrack-part2.cpp | 6 +- pcbnew/exporters/export_d356.cpp | 16 +- pcbnew/exporters/export_gencad.cpp | 25 +- pcbnew/exporters/export_vrml.cpp | 4 +- pcbnew/exporters/gendrill_Excellon_writer.cpp | 2 +- pcbnew/kicad_plugin.cpp | 10 +- pcbnew/legacy_plugin.cpp | 36 +- pcbnew/magnetic_tracks_functions.cpp | 2 +- pcbnew/move_or_drag_track.cpp | 8 +- pcbnew/pcad2kicadpcb_plugin/pcb_pad.cpp | 6 +- pcbnew/pcb_painter.cpp | 8 +- pcbnew/pcb_painter.h | 4 +- pcbnew/pcb_parser.cpp | 12 +- pcbnew/pcb_parser.h | 4 +- pcbnew/plot_board_layers.cpp | 22 +- pcbnew/plot_brditems_plotter.cpp | 9 +- pcbnew/print_board_functions.cpp | 15 +- pcbnew/ratsnest_data.cpp | 12 +- pcbnew/ratsnest_data.h | 8 +- pcbnew/router/pns_router.cpp | 6 +- pcbnew/router/pns_router.h | 4 +- pcbnew/specctra.h | 12 +- pcbnew/specctra_export.cpp | 4 +- pcbnew/specctra_import.cpp | 20 +- pcbnew/swap_layers.cpp | 4 +- pcbnew/tools/selection_tool.cpp | 2 +- pcbnew/tr_modif.cpp | 4 +- pcbnew/zones_polygons_test_connections.cpp | 9 +- 54 files changed, 806 insertions(+), 709 deletions(-) diff --git a/3d-viewer/3d_canvas.h b/3d-viewer/3d_canvas.h index 43a1f7ed85..d4ad84cebf 100644 --- a/3d-viewer/3d_canvas.h +++ b/3d-viewer/3d_canvas.h @@ -47,7 +47,7 @@ class BOARD_DESIGN_SETTINGS; class EDA_3D_FRAME; class S3D_VERTEX; -class SEGVIA; +class VIA; class D_PAD; // We are using GL lists to store layers and other items @@ -160,8 +160,8 @@ public: void Draw3DGrid( double aGriSizeMM ); void Draw3DAxis(); - void Draw3DViaHole( SEGVIA * aVia ); - void Draw3DPadHole( D_PAD * aPad ); + void Draw3DViaHole( const VIA * aVia ); + void Draw3DPadHole( const D_PAD * aPad ); DECLARE_EVENT_TABLE() }; diff --git a/3d-viewer/3d_draw.cpp b/3d-viewer/3d_draw.cpp index 1afdfe9c27..3216947b8e 100644 --- a/3d-viewer/3d_draw.cpp +++ b/3d-viewer/3d_draw.cpp @@ -302,18 +302,19 @@ void EDA_3D_CANVAS::BuildBoard3DView() // Add via hole if( track->Type() == PCB_VIA_T ) { - int shape = track->GetShape(); - int holediameter = track->GetDrillValue(); - int thickness = g_Parm_3D_Visu.GetCopperThicknessBIU(); + VIA *via = static_cast( track ); + VIATYPE_T viatype = via->GetViaType(); + int holediameter = via->GetDrillValue(); + int thickness = g_Parm_3D_Visu.GetCopperThicknessBIU(); int hole_outer_radius = (holediameter + thickness) / 2; - if( shape != VIA_THROUGH ) + if( viatype != VIA_THROUGH ) TransformCircleToPolygon( currLayerHoles, - track->GetStart(), hole_outer_radius, + via->GetStart(), hole_outer_radius, segcountLowQuality ); else if( !throughHolesListBuilt ) TransformCircleToPolygon( allLayerHoles, - track->GetStart(), hole_outer_radius, + via->GetStart(), hole_outer_radius, segcountLowQuality ); } } @@ -433,8 +434,10 @@ void EDA_3D_CANVAS::BuildBoard3DView() // Draw vias holes (vertical cylinders) for( TRACK* track = pcb->m_Track; track != NULL; track = track->Next() ) { - if( track->Type() == PCB_VIA_T ) - Draw3DViaHole( (SEGVIA*) track ); + const VIA *via = dynamic_cast(track); + + if( via ) + Draw3DViaHole( via ); } // Draw pads holes (vertical cylinders) @@ -529,13 +532,14 @@ void EDA_3D_CANVAS::BuildTechLayers3DView() // Add via hole if( track->Type() == PCB_VIA_T ) { - int shape = track->GetShape(); - int holediameter = track->GetDrillValue(); + const VIA *via = static_cast( track ); + VIATYPE_T viatype = via->GetViaType(); + int holediameter = via->GetDrillValue(); int hole_outer_radius = (holediameter + thickness) / 2; - if( shape == VIA_THROUGH ) + if( viatype == VIA_THROUGH ) TransformCircleToPolygon( allLayerHoles, - track->GetStart(), hole_outer_radius, + via->GetStart(), hole_outer_radius, segcountLowQuality ); } } @@ -1047,7 +1051,7 @@ void EDA_3D_CANVAS::Draw3DGrid( double aGriSizeMM ) } -void EDA_3D_CANVAS::Draw3DViaHole( SEGVIA* aVia ) +void EDA_3D_CANVAS::Draw3DViaHole( const VIA* aVia ) { LAYER_NUM top_layer, bottom_layer; int inner_radius = aVia->GetDrillValue() / 2; @@ -1060,7 +1064,7 @@ void EDA_3D_CANVAS::Draw3DViaHole( SEGVIA* aVia ) SetGLCopperColor(); else { - EDA_COLOR_T color = g_ColorsSettings.GetItemColor( VIAS_VISIBLE + aVia->GetShape() ); + EDA_COLOR_T color = g_ColorsSettings.GetItemColor( VIAS_VISIBLE + aVia->GetViaType() ); SetGLColor( color ); } @@ -1111,7 +1115,7 @@ void MODULE::ReadAndInsert3DComponentShape( EDA_3D_CANVAS* glcanvas, // Draw 3D pads. -void EDA_3D_CANVAS::Draw3DPadHole( D_PAD* aPad ) +void EDA_3D_CANVAS::Draw3DPadHole( const D_PAD* aPad ) { // Draw the pad hole wxSize drillsize = aPad->GetDrillSize(); diff --git a/include/class_board_design_settings.h b/include/class_board_design_settings.h index 31ebfccfe5..67e0c73a88 100644 --- a/include/class_board_design_settings.h +++ b/include/class_board_design_settings.h @@ -7,6 +7,7 @@ #include // NB_COLORS #include +#include #include @@ -19,7 +20,7 @@ class BOARD_DESIGN_SETTINGS public: bool m_MicroViasAllowed; ///< true to allow micro vias bool m_BlindBuriedViaAllowed; ///< true to allow blind/buried vias - int m_CurrentViaType; ///< via type (VIA_BLIND_BURIED, VIA_THROUGH VIA_MICROVIA) + VIATYPE_T 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/include/view/view_item.h b/include/view/view_item.h index c06538b224..f64bb4f1c7 100644 --- a/include/view/view_item.h +++ b/include/view/view_item.h @@ -57,8 +57,8 @@ enum KICAD_T PCB_TEXT_T, ///< class TEXTE_PCB, text on a layer PCB_MODULE_TEXT_T, ///< class TEXTE_MODULE, text in a footprint PCB_MODULE_EDGE_T, ///< class EDGE_MODULE, a footprint edge - PCB_TRACE_T, ///< class TRACKE, a track segment (segment on a copper layer) - PCB_VIA_T, ///< class SEGVIA, a via (like a track segment on a copper layer) + PCB_TRACE_T, ///< class TRACK, a track segment (segment on a copper layer) + PCB_VIA_T, ///< class VIA, a via (like a track segment on a copper layer) PCB_ZONE_T, ///< class SEGZONE, a segment used to fill a zone area (segment on a ///< copper layer) PCB_MARKER_T, ///< class MARKER_PCB, a marker used to show something diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index 70cefc2a36..9ad56f1016 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -44,7 +44,7 @@ class TEXTE_PCB; class MODULE; class TRACK; class SEGZONE; -class SEGVIA; +class VIA; class D_PAD; class TEXTE_MODULE; class PCB_TARGET; diff --git a/pcbnew/autorouter/auto_place_footprints.cpp b/pcbnew/autorouter/auto_place_footprints.cpp index 0351c43bd1..a49ccd1b2c 100644 --- a/pcbnew/autorouter/auto_place_footprints.cpp +++ b/pcbnew/autorouter/auto_place_footprints.cpp @@ -516,12 +516,7 @@ int genPlacementRoutingMatrix( BOARD* aBrd, EDA_MSG_PANEL* messagePanel ) if( DrawSegm->GetLayer() != EDGE_N ) break; - TmpSegm.SetStart( DrawSegm->GetStart() ); - TmpSegm.SetEnd( DrawSegm->GetEnd() ); - TmpSegm.SetShape( DrawSegm->GetShape() ); - TmpSegm.m_Param = DrawSegm->GetAngle(); - - TraceSegmentPcb( &TmpSegm, HOLE | CELL_is_EDGE, + TraceSegmentPcb( DrawSegm, HOLE | CELL_is_EDGE, RoutingMatrix.m_GridRouting, WRITE_CELL ); break; diff --git a/pcbnew/autorouter/autorout.h b/pcbnew/autorouter/autorout.h index 98f5ac0b3a..b284b63ab8 100644 --- a/pcbnew/autorouter/autorout.h +++ b/pcbnew/autorouter/autorout.h @@ -38,6 +38,7 @@ class BOARD; +class DRAWSEGMENT; #define TOP 0 @@ -195,6 +196,7 @@ void PlacePad( D_PAD* pt_pad, int type, int marge, int op_logic ); /* Draws a segment of track on the board. */ void TraceSegmentPcb( TRACK* pt_segm, int type, int marge, int op_logic ); +void TraceSegmentPcb( DRAWSEGMENT* pt_segm, int type, int marge, int op_logic ); /* Uses the color value of all cells included in the board * coord of the rectangle ux0, uy0 (top right corner) diff --git a/pcbnew/autorouter/graphpcb.cpp b/pcbnew/autorouter/graphpcb.cpp index 28dff7ff32..54b94a01f7 100644 --- a/pcbnew/autorouter/graphpcb.cpp +++ b/pcbnew/autorouter/graphpcb.cpp @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -256,29 +257,52 @@ void TraceFilledCircle( int cx, int cy, int radius, } } - -void TraceSegmentPcb( TRACK* pt_segm, int color, int marge, int op_logic ) +void TraceSegmentPcb( DRAWSEGMENT* pt_segm, int color, int marge, int op_logic ) { - int half_width; - int ux0, uy0, ux1, uy1; - - half_width = ( pt_segm->GetWidth() / 2 ) + marge; + int half_width = ( pt_segm->GetWidth() / 2 ) + marge; // Calculate the bounding rectangle of the segment (if H, V or Via) - ux0 = pt_segm->GetStart().x - RoutingMatrix.GetBrdCoordOrigin().x; - uy0 = pt_segm->GetStart().y - RoutingMatrix.GetBrdCoordOrigin().y; - ux1 = pt_segm->GetEnd().x - RoutingMatrix.GetBrdCoordOrigin().x; - uy1 = pt_segm->GetEnd().y - RoutingMatrix.GetBrdCoordOrigin().y; + int ux0 = pt_segm->GetStart().x - RoutingMatrix.GetBrdCoordOrigin().x; + int uy0 = pt_segm->GetStart().y - RoutingMatrix.GetBrdCoordOrigin().y; + int ux1 = pt_segm->GetEnd().x - RoutingMatrix.GetBrdCoordOrigin().x; + int uy1 = pt_segm->GetEnd().y - RoutingMatrix.GetBrdCoordOrigin().y; - // Test if VIA (filled circle was drawn) - if( pt_segm->Type() == PCB_VIA_T ) + LAYER_NUM layer = pt_segm->GetLayer(); + + if( color == VIA_IMPOSSIBLE ) + layer = UNDEFINED_LAYER; + + switch( pt_segm->GetShape() ) + { + // The segment is here a straight line or a circle or an arc.: + case S_CIRCLE: + TraceCircle( ux0, uy0, ux1, uy1, half_width, layer, color, op_logic ); + break; + + case S_ARC: + TraceArc( ux0, uy0, ux1, uy1, pt_segm->GetAngle(), half_width, layer, color, op_logic ); + break; + + // The segment is here a line segment. + default: + DrawSegmentQcq( ux0, uy0, ux1, uy1, half_width, layer, color, op_logic ); + break; + } +} + +void TraceSegmentPcb( TRACK* aTrack, int color, int marge, int op_logic ) +{ + int half_width = ( aTrack->GetWidth() / 2 ) + marge; + + // Test if VIA (filled circle need to be drawn) + if( aTrack->Type() == PCB_VIA_T ) { LAYER_MSK layer_mask = NO_LAYERS; - if( pt_segm->IsOnLayer( g_Route_Layer_BOTTOM ) ) + if( aTrack->IsOnLayer( g_Route_Layer_BOTTOM ) ) layer_mask = GetLayerMask( g_Route_Layer_BOTTOM ); - if( pt_segm->IsOnLayer( g_Route_Layer_TOP ) ) + if( aTrack->IsOnLayer( g_Route_Layer_TOP ) ) { if( layer_mask == 0 ) layer_mask = GetLayerMask( g_Route_Layer_TOP ); @@ -290,39 +314,25 @@ void TraceSegmentPcb( TRACK* pt_segm, int color, int marge, int op_logic ) layer_mask = FULL_LAYERS; if( layer_mask ) - TraceFilledCircle( pt_segm->GetStart().x, pt_segm->GetStart().y, + TraceFilledCircle( aTrack->GetStart().x, aTrack->GetStart().y, half_width, layer_mask, color, op_logic ); - return; } - - LAYER_NUM layer = pt_segm->GetLayer(); - - if( color == VIA_IMPOSSIBLE ) - layer = UNDEFINED_LAYER; - - // The segment is here a straight line or a circle or an arc.: - if( pt_segm->GetShape() == S_CIRCLE ) + else { - TraceCircle( ux0, uy0, ux1, uy1, half_width, layer, color, op_logic ); - return; - } + // Calculate the bounding rectangle of the segment + int ux0 = aTrack->GetStart().x - RoutingMatrix.GetBrdCoordOrigin().x; + int uy0 = aTrack->GetStart().y - RoutingMatrix.GetBrdCoordOrigin().y; + int ux1 = aTrack->GetEnd().x - RoutingMatrix.GetBrdCoordOrigin().x; + int uy1 = aTrack->GetEnd().y - RoutingMatrix.GetBrdCoordOrigin().y; - if( pt_segm->GetShape() == S_ARC ) - { - TraceArc( ux0, uy0, ux1, uy1, pt_segm->m_Param, half_width, layer, color, op_logic ); - return; - } + // Ordinary track + LAYER_NUM layer = aTrack->GetLayer(); + + if( color == VIA_IMPOSSIBLE ) + layer = UNDEFINED_LAYER; - // The segment is here a line segment. - if( ( ux0 != ux1 ) && ( uy0 != uy1 ) ) // Segment tilts. - { DrawSegmentQcq( ux0, uy0, ux1, uy1, half_width, layer, color, op_logic ); - return; } - - // The segment is horizontal or vertical. - // F4EXB 051018-01 - DrawSegmentQcq( ux0, uy0, ux1, uy1, half_width, layer, color, op_logic ); } diff --git a/pcbnew/autorouter/routing_matrix.cpp b/pcbnew/autorouter/routing_matrix.cpp index b5d02e926a..8449c90bc1 100644 --- a/pcbnew/autorouter/routing_matrix.cpp +++ b/pcbnew/autorouter/routing_matrix.cpp @@ -225,7 +225,6 @@ void PlaceCells( BOARD* aPcb, int net_code, int flag ) // Place outlines of modules on matrix routing, if they are on a copper layer // or on the edge layer - TRACK tmpSegm( NULL ); // A dummy track used to create segments. for( MODULE* module = aPcb->m_Modules; module; module = module->Next() ) { @@ -236,21 +235,13 @@ void PlaceCells( BOARD* aPcb, int net_code, int flag ) case PCB_MODULE_EDGE_T: { EDGE_MODULE* edge = (EDGE_MODULE*) item; + EDGE_MODULE tmpEdge( *edge ); - tmpSegm.SetLayer( edge->GetLayer() ); + if( tmpEdge.GetLayer() == EDGE_N ) + tmpEdge.SetLayer( UNDEFINED_LAYER ); - if( tmpSegm.GetLayer() == EDGE_N ) - tmpSegm.SetLayer( UNDEFINED_LAYER ); - - tmpSegm.SetStart( edge->GetStart() ); - tmpSegm.SetEnd( edge->GetEnd() ); - tmpSegm.SetShape( edge->GetShape() ); - tmpSegm.SetWidth( edge->GetWidth() ); - tmpSegm.m_Param = edge->GetAngle(); - tmpSegm.SetNetCode( -1 ); - - TraceSegmentPcb( &tmpSegm, HOLE, marge, WRITE_CELL ); - TraceSegmentPcb( &tmpSegm, VIA_IMPOSSIBLE, via_marge, WRITE_OR_CELL ); + TraceSegmentPcb( &tmpEdge, HOLE, marge, WRITE_CELL ); + TraceSegmentPcb( &tmpEdge, VIA_IMPOSSIBLE, via_marge, WRITE_OR_CELL ); } break; @@ -271,7 +262,7 @@ void PlaceCells( BOARD* aPcb, int net_code, int flag ) int type_cell = HOLE; DrawSegm = (DRAWSEGMENT*) item; - tmpSegm.SetLayer( DrawSegm->GetLayer() ); + DRAWSEGMENT tmpSegm( DrawSegm ); if( DrawSegm->GetLayer() == EDGE_N ) { @@ -279,13 +270,6 @@ void PlaceCells( BOARD* aPcb, int net_code, int flag ) type_cell |= CELL_is_EDGE; } - tmpSegm.SetStart( DrawSegm->GetStart() ); - tmpSegm.SetEnd( DrawSegm->GetEnd() ); - tmpSegm.SetShape( DrawSegm->GetShape() ); - tmpSegm.SetWidth( DrawSegm->GetWidth() ); - tmpSegm.m_Param = DrawSegm->GetAngle(); - tmpSegm.SetNetCode( -1 ); - TraceSegmentPcb( &tmpSegm, type_cell, marge, WRITE_CELL ); } break; diff --git a/pcbnew/autorouter/solve.cpp b/pcbnew/autorouter/solve.cpp index 86e937073a..5e94db6b09 100644 --- a/pcbnew/autorouter/solve.cpp +++ b/pcbnew/autorouter/solve.cpp @@ -1159,14 +1159,11 @@ static int Retrace( PCB_EDIT_FRAME* pcbframe, wxDC* DC, static void OrCell_Trace( BOARD* pcb, int col, int row, int side, int orient, int current_net_code ) { - int dx0, dy0, dx1, dy1; - TRACK* newTrack; - if( orient == HOLE ) // placement of a via { - newTrack = new SEGVIA( pcb ); + VIA *newVia = new VIA( pcb ); - g_CurrentTrackList.PushBack( newTrack ); + g_CurrentTrackList.PushBack( newVia ); g_CurrentTrackSegment->SetState( TRACK_AR, true ); g_CurrentTrackSegment->SetLayer( 0x0F ); @@ -1178,13 +1175,15 @@ static void OrCell_Trace( BOARD* pcb, int col, int row, g_CurrentTrackSegment->SetEnd( g_CurrentTrackSegment->GetStart() ); g_CurrentTrackSegment->SetWidth( pcb->GetCurrentViaSize() ); - g_CurrentTrackSegment->SetShape( pcb->GetDesignSettings().m_CurrentViaType ); + newVia->SetViaType( pcb->GetDesignSettings().m_CurrentViaType ); g_CurrentTrackSegment->SetNetCode( current_net_code ); } else // placement of a standard segment { - newTrack = new TRACK( pcb ); + TRACK *newTrack = new TRACK( pcb ); + int dx0, dy0, dx1, dy1; + g_CurrentTrackList.PushBack( newTrack ); diff --git a/pcbnew/board_undo_redo.cpp b/pcbnew/board_undo_redo.cpp index a5a3ad314e..96d4c844da 100644 --- a/pcbnew/board_undo_redo.cpp +++ b/pcbnew/board_undo_redo.cpp @@ -232,31 +232,38 @@ void BOARD_ITEM::SwapData( BOARD_ITEM* aImage ) int atmp = track->GetWidth(); track->SetWidth( image->GetWidth() ); image->SetWidth( atmp ); - atmp = track->GetShape(); - track->SetShape( image->GetShape() ); - image->SetShape( atmp ); - atmp = track->GetDrillValue(); + if( Type() == PCB_VIA_T ) + { + VIA *via = static_cast( this ); + VIA *viaimage = static_cast( aImage ); - if( track->IsDrillDefault() ) - atmp = -1; + VIATYPE_T viatmp = via->GetViaType(); + via->SetViaType( viaimage->GetViaType() ); + viaimage->SetViaType( viatmp ); - int itmp = image->GetDrillValue(); + int drilltmp = via->GetDrillValue(); - if( image->IsDrillDefault() ) - itmp = -1; + if( via->IsDrillDefault() ) + drilltmp = -1; - EXCHG(itmp, atmp ); + int itmp = viaimage->GetDrillValue(); - if( atmp > 0 ) - track->SetDrill( atmp ); - else - track->SetDrillDefault(); + if( viaimage->IsDrillDefault() ) + itmp = -1; - if( itmp > 0 ) - image->SetDrill( itmp ); - else - image->SetDrillDefault(); + EXCHG(itmp, drilltmp ); + + if( drilltmp > 0 ) + via->SetDrill( drilltmp ); + else + via->SetDrillDefault(); + + if( itmp > 0 ) + viaimage->SetDrill( itmp ); + else + viaimage->SetDrillDefault(); + } } break; diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index 20860474eb..6109e60945 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -242,7 +242,7 @@ void BOARD::chainMarkedSegments( wxPoint aPosition, LAYER_MSK aLayerMask, TRACK_ segment = m_Track; candidate = NULL; NbSegm = 0; - while( ( segment = ::GetTrace( segment, NULL, aPosition, aLayerMask ) ) != NULL ) + while( ( segment = ::GetTrack( segment, NULL, aPosition, aLayerMask ) ) != NULL ) { if( segment->GetState( BUSY ) ) // already found and selected: skip it { @@ -1172,7 +1172,7 @@ SEARCH_RESULT BOARD::Visit( INSPECTOR* inspector, const void* testData, #if 0 // both these are on same list, so we must scan it twice in order // to get VIA priority, using new #else code below. - // But we are not using separate lists for TRACKs and SEGVIAs, because + // But we are not using separate lists for TRACKs and VIA, because // items are ordered (sorted) in the linked // list by netcode AND by physical distance: // when created, if a track or via is connected to an existing track or @@ -1561,11 +1561,9 @@ int BOARD::SetAreasNetCodesFromNetNames( void ) } -TRACK* BOARD::GetViaByPosition( const wxPoint& aPosition, LAYER_NUM aLayer) +VIA* BOARD::GetViaByPosition( const wxPoint& aPosition, LAYER_NUM aLayer) const { - TRACK* track; - - for( track = m_Track; track; track = track->Next() ) + for( TRACK *track = m_Track; track; track = track->Next() ) { if( track->Type() != PCB_VIA_T ) continue; @@ -1576,14 +1574,11 @@ TRACK* BOARD::GetViaByPosition( const wxPoint& aPosition, LAYER_NUM aLayer) if( track->GetState( BUSY | IS_DELETED ) ) continue; - if( aLayer == UNDEFINED_LAYER ) - break; - - if( track->IsOnLayer( aLayer ) ) - break; + if( (aLayer == UNDEFINED_LAYER) || (track->IsOnLayer( aLayer )) ) + return static_cast( track ); } - return track; + return NULL; } @@ -1777,9 +1772,10 @@ void BOARD::GetSortedPadListByXthenYCoord( std::vector& aVector, int aNe } -TRACK* BOARD::GetTrace( TRACK* aTrace, const wxPoint& aPosition, LAYER_MSK aLayerMask ) +TRACK* BOARD::GetTrack( TRACK* aTrace, const wxPoint& aPosition, + LAYER_MSK aLayerMask ) const { - for( TRACK* track = aTrace; track; track = track->Next() ) + for( TRACK* track = aTrace; track; track = track->Next() ) { LAYER_NUM layer = track->GetLayer(); @@ -1846,16 +1842,16 @@ TRACK* BOARD::MarkTrace( TRACK* aTrace, int* aCount, if( aTrace->Type() == PCB_VIA_T ) { TRACK* Segm1, * Segm2 = NULL, * Segm3 = NULL; - Segm1 = ::GetTrace( m_Track, NULL, aTrace->GetStart(), layerMask ); + Segm1 = ::GetTrack( m_Track, NULL, aTrace->GetStart(), layerMask ); if( Segm1 ) { - Segm2 = ::GetTrace( Segm1->Next(), NULL, aTrace->GetStart(), layerMask ); + Segm2 = ::GetTrack( Segm1->Next(), NULL, aTrace->GetStart(), layerMask ); } if( Segm2 ) { - Segm3 = ::GetTrace( Segm2->Next(), NULL, aTrace->GetStart(), layerMask ); + Segm3 = ::GetTrack( Segm2->Next(), NULL, aTrace->GetStart(), layerMask ); } if( Segm3 ) // More than 2 segments are connected to this via. the track" is only this via @@ -1903,7 +1899,7 @@ TRACK* BOARD::MarkTrace( TRACK* aTrace, int* aCount, layerMask = via->GetLayerMask(); - TRACK* track = ::GetTrace( m_Track, NULL, via->GetStart(), layerMask ); + TRACK* track = ::GetTrack( m_Track, NULL, via->GetStart(), layerMask ); // GetTrace does not consider tracks flagged BUSY. // So if no connected track found, this via is on the current track @@ -1925,7 +1921,7 @@ TRACK* BOARD::MarkTrace( TRACK* aTrace, int* aCount, */ LAYER_NUM layer = track->GetLayer(); - while( ( track = ::GetTrace( track->Next(), NULL, via->GetStart(), layerMask ) ) != NULL ) + while( ( track = ::GetTrack( track->Next(), NULL, via->GetStart(), layerMask ) ) != NULL ) { if( layer != track->GetLayer() ) { @@ -2127,10 +2123,10 @@ BOARD_CONNECTED_ITEM* BOARD::GetLockPoint( const wxPoint& aPosition, LAYER_MSK a } /* No pad has been located so check for a segment of the trace. */ - TRACK* segment = ::GetTrace( m_Track, NULL, aPosition, aLayerMask ); + TRACK* segment = ::GetTrack( m_Track, NULL, aPosition, aLayerMask ); if( segment == NULL ) - segment = GetTrace( m_Track, aPosition, aLayerMask ); + segment = GetTrack( m_Track, aPosition, aLayerMask ); return segment; } diff --git a/pcbnew/class_board.h b/pcbnew/class_board.h index 12150cda90..d899096819 100644 --- a/pcbnew/class_board.h +++ b/pcbnew/class_board.h @@ -286,7 +286,7 @@ public: DLIST m_Drawings; // linked list of lines & texts DLIST m_Modules; // linked list of MODULEs - DLIST m_Track; // linked list of TRACKs and SEGVIAs + DLIST m_Track; // linked list of TRACKs and VIAs DLIST m_Zone; // linked list of SEGZONEs /// Ratsnest list for the BOARD @@ -1370,9 +1370,9 @@ public: *

* @param aPosition The wxPoint to HitTest() against. * @param aLayer The layer to search. Use -1 for a don't care. - * @return TRACK* A point a to the SEGVIA object if found, else NULL. + * @return VIA* A point a to the VIA object if found, else NULL. */ - TRACK* GetViaByPosition( const wxPoint& aPosition, LAYER_NUM aLayer = UNDEFINED_LAYER ); + VIA* GetViaByPosition( const wxPoint& aPosition, LAYER_NUM aLayer = UNDEFINED_LAYER ) const; /** * Function GetPad @@ -1438,7 +1438,7 @@ public: void GetSortedPadListByXthenYCoord( std::vector& aVector, int aNetCode = -1 ); /** - * Function GetTrace + * Function GetTrack * find the segment of \a aTrace at \a aPosition on \a aLayer if \a Layer is visible. * Traces that are flagged as deleted or busy are ignored. * @@ -1448,7 +1448,7 @@ public: * layer mask. * @return A TRACK object pointer if found otherwise NULL. */ - TRACK* GetTrace( TRACK* aTrace, const wxPoint& aPosition, LAYER_MSK aLayerMask ); + TRACK* GetTrack( TRACK* aTrace, const wxPoint& aPosition, LAYER_MSK aLayerMask ) const; /** * Function MarkTrace diff --git a/pcbnew/class_netinfo_item.cpp b/pcbnew/class_netinfo_item.cpp index f61705385f..447cf8a503 100644 --- a/pcbnew/class_netinfo_item.cpp +++ b/pcbnew/class_netinfo_item.cpp @@ -82,7 +82,6 @@ void NETINFO_ITEM::Draw( EDA_DRAW_PANEL* panel, void NETINFO_ITEM::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) { int count; - EDA_ITEM* Struct; wxString txt; MODULE* module; D_PAD* pad; @@ -113,20 +112,19 @@ void NETINFO_ITEM::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) aList.push_back( MSG_PANEL_ITEM( _( "Pads" ), txt, DARKGREEN ) ); count = 0; - Struct = m_parent->GetBoard()->m_Track; - for( ; Struct != NULL; Struct = Struct->Next() ) + for( const TRACK *track = m_parent->GetBoard()->m_Track; track != NULL; track = track->Next() ) { - if( Struct->Type() == PCB_VIA_T ) + if( track->Type() == PCB_VIA_T ) { - if( ( (SEGVIA*) Struct )->GetNetCode() == GetNet() ) + if( track->GetNetCode() == GetNet() ) count++; } - if( Struct->Type() == PCB_TRACE_T ) + if( track->Type() == PCB_TRACE_T ) { - if( ( (TRACK*) Struct )->GetNetCode() == GetNet() ) - lengthnet += ( (TRACK*) Struct )->GetLength(); + if( track->GetNetCode() == GetNet() ) + lengthnet += track->GetLength(); } } diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index f15033d3e1..48a665927d 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -88,15 +88,13 @@ inline bool IsNear( wxPoint& p1, wxPoint& p2, int max_dist ) } -TRACK* GetTrace( TRACK* aStartTrace, TRACK* aEndTrace, const wxPoint& aPosition, - LAYER_MSK aLayerMask ) +TRACK* GetTrack( TRACK* aStartTrace, TRACK* aEndTrace, + const wxPoint& aPosition, LAYER_MSK aLayerMask ) { - TRACK* PtSegm; - if( aStartTrace == NULL ) return NULL; - for( PtSegm = aStartTrace; PtSegm != NULL; PtSegm = PtSegm->Next() ) + for( TRACK *PtSegm = aStartTrace; PtSegm != NULL; PtSegm = PtSegm->Next() ) { if( PtSegm->GetState( IS_DELETED | BUSY ) == 0 ) { @@ -125,9 +123,7 @@ TRACK::TRACK( BOARD_ITEM* aParent, KICAD_T idtype ) : BOARD_CONNECTED_ITEM( aParent, idtype ) { m_Width = Millimeter2iu( 0.2 ); - m_Shape = S_SEGMENT; start = end = NULL; - SetDrillDefault(); m_Param = 0; } @@ -179,34 +175,41 @@ wxString SEGZONE::GetSelectMenuText() const } -SEGVIA::SEGVIA( BOARD_ITEM* aParent ) : +VIA::VIA( BOARD_ITEM* aParent ) : TRACK( aParent, PCB_VIA_T ) { - SetShape( VIA_THROUGH ); + SetViaType( VIA_THROUGH ); m_Width = Millimeter2iu( 0.5 ); + SetDrillDefault(); } -EDA_ITEM* SEGVIA::Clone() const +EDA_ITEM* VIA::Clone() const { - return new SEGVIA( *this ); + return new VIA( *this ); } -wxString SEGVIA::GetSelectMenuText() const +wxString VIA::GetSelectMenuText() const { wxString text; wxString format; BOARD* board = GetBoard(); - int shape = GetShape(); - - if( shape == VIA_BLIND_BURIED ) + switch( GetViaType() ) + { + case VIA_BLIND_BURIED: format = _( "Blind/Buried Via %s, net[%s] (%d) on layers %s/%s" ); - else if( shape == VIA_MICROVIA ) + break; + case VIA_MICROVIA: format = _( "Micro Via %s, Net [%s] (%d) on layers %s/%s" ); + break; // else say nothing about normal (through) vias - else format = _( "Via %s net [%s] (%d) on layers %s/%s" ); + default: + format = _( "Via %s net [%s] (%d) on layers %s/%s" ); + break; + } + if( board ) { @@ -224,7 +227,7 @@ wxString SEGVIA::GetSelectMenuText() const } else { - wxFAIL_MSG( wxT( "SEGVIA::GetSelectMenuText: BOARD is NULL" ) ); + wxFAIL_MSG( wxT( "VIA::GetSelectMenuText: BOARD is NULL" ) ); text.Printf( format.GetData(), GetChars( ShowWidth() ), wxT( "???" ), 0, wxT( "??" ), wxT( "??" ) ); @@ -242,18 +245,15 @@ int TRACK::GetClearance( BOARD_CONNECTED_ITEM* aItem ) const } -int TRACK::GetDrillValue() const +int VIA::GetDrillValue() const { - if( Type() != PCB_VIA_T ) - return 0; - if( m_Drill > 0 ) // Use the specific value. return m_Drill; // Use the default value from the Netclass NETCLASS* netclass = GetNetClass(); - if( m_Shape == VIA_MICROVIA ) + if( GetViaType() == VIA_MICROVIA ) return netclass->GetuViaDrill(); return netclass->GetViaDrill(); @@ -391,7 +391,7 @@ SEARCH_RESULT TRACK::Visit( INSPECTOR* inspector, const void* testData, } -bool SEGVIA::IsOnLayer( LAYER_NUM layer_number ) const +bool VIA::IsOnLayer( LAYER_NUM layer_number ) const { LAYER_NUM bottom_layer, top_layer; @@ -403,43 +403,38 @@ bool SEGVIA::IsOnLayer( LAYER_NUM layer_number ) const return false; } +LAYER_MSK VIA::GetLayerMask() const +{ + if( GetViaType() == VIA_THROUGH ) + return ALL_CU_LAYERS; + + // VIA_BLIND_BURIED or VIA_MICRVIA: + + LAYER_NUM bottom_layer, top_layer; + + // LayerPair() knows how layers are stored + LayerPair( &top_layer, &bottom_layer ); + + LAYER_MSK layermask = NO_LAYERS; + + while( bottom_layer <= top_layer ) + { + layermask |= ::GetLayerMask( bottom_layer ); + ++bottom_layer; + } + + return layermask; +} LAYER_MSK TRACK::GetLayerMask() const { - if( Type() == PCB_VIA_T ) - { - int via_type = GetShape(); - - if( via_type == VIA_THROUGH ) - return ALL_CU_LAYERS; - - // VIA_BLIND_BURIED or VIA_MICRVIA: - - LAYER_NUM bottom_layer, top_layer; - - // LayerPair() knows how layers are stored - ( (SEGVIA*) this )->LayerPair( &top_layer, &bottom_layer ); - - LAYER_MSK layermask = NO_LAYERS; - - while( bottom_layer <= top_layer ) - { - layermask |= ::GetLayerMask( bottom_layer ); - ++bottom_layer; - } - - return layermask; - } - else - { - return ::GetLayerMask( m_Layer ); - } + return ::GetLayerMask( m_Layer ); } -void SEGVIA::SetLayerPair( LAYER_NUM top_layer, LAYER_NUM bottom_layer ) +void VIA::SetLayerPair( LAYER_NUM top_layer, LAYER_NUM bottom_layer ) { - if( GetShape() == VIA_THROUGH ) + if( GetViaType() == VIA_THROUGH ) { top_layer = LAYER_N_FRONT; bottom_layer = LAYER_N_BACK; @@ -453,12 +448,12 @@ void SEGVIA::SetLayerPair( LAYER_NUM top_layer, LAYER_NUM bottom_layer ) } -void SEGVIA::LayerPair( LAYER_NUM* top_layer, LAYER_NUM* bottom_layer ) const +void VIA::LayerPair( LAYER_NUM* top_layer, LAYER_NUM* bottom_layer ) const { LAYER_NUM b_layer = LAYER_N_BACK; LAYER_NUM t_layer = LAYER_N_FRONT; - if( GetShape() != VIA_THROUGH ) + if( GetViaType() != VIA_THROUGH ) { // XXX EVIL usage of LAYER b_layer = (m_Layer >> 4) & 15; @@ -557,116 +552,13 @@ TRACK* TRACK::GetEndNetCode( int NetCode ) return NULL; } - -void TRACK::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, - const wxPoint& aOffset ) +void TRACK::DrawShortNetname( EDA_DRAW_PANEL* panel, + wxDC* aDC, GR_DRAWMODE aDrawMode, EDA_COLOR_T aBgColor ) { - int l_trace; - int radius; - LAYER_NUM curr_layer = ( (PCB_SCREEN*) panel->GetScreen() )->m_Active_Layer; - - if( Type() == PCB_ZONE_T && DisplayOpt.DisplayZonesMode != 0 ) - return; - - BOARD * brd = GetBoard( ); - EDA_COLOR_T color = brd->GetLayerColor(m_Layer); - - if( brd->IsLayerVisible( m_Layer ) == false && !( aDrawMode & GR_HIGHLIGHT ) ) - return; - -#ifdef USE_WX_OVERLAY - // If dragged not draw in OnPaint otherwise remains impressed in wxOverlay - if( (m_Flags && IS_DRAGGED) && aDC->IsKindOf(wxCLASSINFO(wxPaintDC))) - return; -#endif - - if( ( aDrawMode & GR_ALLOW_HIGHCONTRAST ) && DisplayOpt.ContrastModeDisplay ) - { - if( !IsOnLayer( curr_layer ) ) - ColorTurnToDarkDarkGray( &color ); - } - - if( aDrawMode & GR_HIGHLIGHT ) - ColorChangeHighlightFlag( &color, !(aDrawMode & GR_AND) ); - - ColorApplyHighlightFlag( &color ); - - SetAlpha( &color, 150 ); - - GRSetDrawMode( aDC, aDrawMode ); - - - l_trace = m_Width >> 1; - - if( m_Shape == S_CIRCLE ) - { - radius = KiROUND( GetLineLength( m_Start, m_End ) ); - - if( aDC->LogicalToDeviceXRel( l_trace ) <= MIN_DRAW_WIDTH ) - { - GRCircle( panel->GetClipBox(), aDC, m_Start.x + aOffset.x, - m_Start.y + aOffset.y, radius, color ); - } - else - { - - if( aDC->LogicalToDeviceXRel( l_trace ) <= MIN_DRAW_WIDTH ) // Line mode if too small - { - GRCircle( panel->GetClipBox(), aDC, m_Start.x + aOffset.x, - m_Start.y + aOffset.y, radius, color ); - } - else if( ( !DisplayOpt.DisplayPcbTrackFill) || GetState( FORCE_SKETCH ) ) - { - GRCircle( panel->GetClipBox(), aDC, m_Start.x + aOffset.x, - m_Start.y + aOffset.y, radius - l_trace, color ); - GRCircle( panel->GetClipBox(), aDC, m_Start.x + aOffset.x, - m_Start.y + aOffset.y, radius + l_trace, color ); - } - else - { - GRCircle( panel->GetClipBox(), aDC, m_Start.x + aOffset.x, - m_Start.y + aOffset.y, radius, m_Width, color ); - } - } - - return; - } - - if( aDC->LogicalToDeviceXRel( l_trace ) <= MIN_DRAW_WIDTH ) - { - GRLine( panel->GetClipBox(), aDC, m_Start + aOffset, m_End + aOffset, 0, color ); - return; - } - - if( !DisplayOpt.DisplayPcbTrackFill || GetState( FORCE_SKETCH ) ) - { - GRCSegm( panel->GetClipBox(), aDC, m_Start + aOffset, m_End + aOffset, m_Width, color ); - } - else - { - GRFillCSegm( panel->GetClipBox(), aDC, m_Start.x + aOffset.x, - m_Start.y + aOffset.y, - m_End.x + aOffset.x, m_End.y + aOffset.y, m_Width, color ); - } - - if( panel->GetScreen()->m_IsPrinting ) - return; - - // Show clearance for tracks, not for zone segments - if( ShowClearance( this ) ) - { - GRCSegm( panel->GetClipBox(), aDC, m_Start + aOffset, m_End + aOffset, - m_Width + (GetClearance() * 2), color ); - } - - /* Display the short netname for tracks, not for zone segments. - * we must filter tracks, to avoid a lot of texts. + /* we must filter tracks, to avoid a lot of texts. * - only tracks with a length > 10 * thickness are eligible * and, of course, if we are not printing the board */ - if( Type() == PCB_ZONE_T ) - return; - if( DisplayOpt.DisplayNetNamesMode == 0 || DisplayOpt.DisplayNetNamesMode == 1 ) return; @@ -703,7 +595,7 @@ void TRACK::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, // Calculate angle: if the track segment is vertical, angle = 90 degrees // If horizontal 0 degrees, otherwise compute it - double angle; // angle is in 0.1 degree + double angle; // angle is in 0.1 degree if( dy == 0 ) // Horizontal segment { @@ -723,6 +615,7 @@ void TRACK::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, } } + LAYER_NUM curr_layer = ( (PCB_SCREEN*) panel->GetScreen() )->m_Active_Layer; if( ( aDC->LogicalToDeviceXRel( tsize ) >= MIN_TEXT_SIZE ) && ( !(!IsOnLayer( curr_layer )&& DisplayOpt.ContrastModeDisplay) ) ) { @@ -732,15 +625,136 @@ void TRACK::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, tsize = (tsize * 7) / 10; // small reduction to give a better look EDA_RECT* clipbox = panel? panel->GetClipBox() : NULL; DrawGraphicHaloText( clipbox, aDC, tpos, - color, BLACK, WHITE, net->GetShortNetname(), angle, - wxSize( tsize, tsize ), - GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER, - tsize / 7, - false, false ); + aBgColor, BLACK, WHITE, net->GetShortNetname(), angle, + wxSize( tsize, tsize ), + GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER, + tsize / 7, + false, false ); } } } +void TRACK::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, + const wxPoint& aOffset ) +{ + BOARD * brd = GetBoard( ); + EDA_COLOR_T color = brd->GetLayerColor(m_Layer); + + if( brd->IsLayerVisible( m_Layer ) == false && !( aDrawMode & GR_HIGHLIGHT ) ) + return; + +#ifdef USE_WX_OVERLAY + // If dragged not draw in OnPaint otherwise remains impressed in wxOverlay + if( (m_Flags && IS_DRAGGED) && aDC->IsKindOf(wxCLASSINFO(wxPaintDC))) + return; +#endif + + if( ( aDrawMode & GR_ALLOW_HIGHCONTRAST ) && DisplayOpt.ContrastModeDisplay ) + { + LAYER_NUM curr_layer = ( (PCB_SCREEN*) panel->GetScreen() )->m_Active_Layer; + + if( !IsOnLayer( curr_layer ) ) + ColorTurnToDarkDarkGray( &color ); + } + + if( aDrawMode & GR_HIGHLIGHT ) + ColorChangeHighlightFlag( &color, !(aDrawMode & GR_AND) ); + + ColorApplyHighlightFlag( &color ); + + SetAlpha( &color, 150 ); + + GRSetDrawMode( aDC, aDrawMode ); + + int l_trace = m_Width / 2; + + if( aDC->LogicalToDeviceXRel( l_trace ) <= MIN_DRAW_WIDTH ) + { + GRLine( panel->GetClipBox(), aDC, m_Start + aOffset, m_End + aOffset, 0, color ); + return; + } + + if( !DisplayOpt.DisplayPcbTrackFill || GetState( FORCE_SKETCH ) ) + { + GRCSegm( panel->GetClipBox(), aDC, m_Start + aOffset, m_End + aOffset, m_Width, color ); + } + else + { + GRFillCSegm( panel->GetClipBox(), aDC, m_Start.x + aOffset.x, + m_Start.y + aOffset.y, + m_End.x + aOffset.x, m_End.y + aOffset.y, m_Width, color ); + } + + if( panel->GetScreen()->m_IsPrinting ) + return; + + // Show clearance for tracks, not for zone segments + if( ShowClearance( this ) ) + { + GRCSegm( panel->GetClipBox(), aDC, m_Start + aOffset, m_End + aOffset, + m_Width + (GetClearance() * 2), color ); + } + + DrawShortNetname( panel, aDC, aDrawMode, color ); +} + +void SEGZONE::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, + const wxPoint& aOffset ) +{ + if( DisplayOpt.DisplayZonesMode != 0 ) + return; + + BOARD * brd = GetBoard( ); + EDA_COLOR_T color = brd->GetLayerColor(m_Layer); + + if( brd->IsLayerVisible( m_Layer ) == false && !( aDrawMode & GR_HIGHLIGHT ) ) + return; + +#ifdef USE_WX_OVERLAY + // If dragged not draw in OnPaint otherwise remains impressed in wxOverlay + if( (m_Flags && IS_DRAGGED) && aDC->IsKindOf(wxCLASSINFO(wxPaintDC))) + return; +#endif + + if( ( aDrawMode & GR_ALLOW_HIGHCONTRAST ) && DisplayOpt.ContrastModeDisplay ) + { + LAYER_NUM curr_layer = ( (PCB_SCREEN*) panel->GetScreen() )->m_Active_Layer; + + if( !IsOnLayer( curr_layer ) ) + ColorTurnToDarkDarkGray( &color ); + } + + if( aDrawMode & GR_HIGHLIGHT ) + ColorChangeHighlightFlag( &color, !(aDrawMode & GR_AND) ); + + ColorApplyHighlightFlag( &color ); + + SetAlpha( &color, 150 ); + + GRSetDrawMode( aDC, aDrawMode ); + + int l_trace = m_Width / 2; + + if( aDC->LogicalToDeviceXRel( l_trace ) <= MIN_DRAW_WIDTH ) + { + GRLine( panel->GetClipBox(), aDC, m_Start + aOffset, m_End + aOffset, 0, color ); + return; + } + + if( !DisplayOpt.DisplayPcbTrackFill || GetState( FORCE_SKETCH ) ) + { + GRCSegm( panel->GetClipBox(), aDC, m_Start + aOffset, m_End + aOffset, m_Width, color ); + } + else + { + GRFillCSegm( panel->GetClipBox(), aDC, m_Start.x + aOffset.x, + m_Start.y + aOffset.y, + m_End.x + aOffset.x, m_End.y + aOffset.y, m_Width, color ); + } + + // No clearance or netnames for zones +} + void TRACK::ViewGetLayers( int aLayers[], int& aCount ) const { @@ -764,7 +778,7 @@ unsigned int TRACK::ViewGetLOD( int aLayer ) const } -void SEGVIA::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, +void VIA::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, const wxPoint& aOffset ) { int radius; @@ -780,9 +794,9 @@ void SEGVIA::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, GRSetDrawMode( aDC, aDrawMode ); BOARD * brd = GetBoard( ); - EDA_COLOR_T color = brd->GetVisibleElementColor(VIAS_VISIBLE + m_Shape); + EDA_COLOR_T color = brd->GetVisibleElementColor(VIAS_VISIBLE + GetViaType()); - if( brd->IsElementVisible( PCB_VISIBLE(VIAS_VISIBLE + m_Shape) ) == false + if( brd->IsElementVisible( PCB_VISIBLE(VIAS_VISIBLE + GetViaType()) ) == false && ( color & HIGHLIGHT_FLAG ) != HIGHLIGHT_FLAG ) return; @@ -879,7 +893,7 @@ void SEGVIA::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, // for Micro Vias, draw a partial cross : X on component layer, or + on copper layer // (so we can see 2 superimposed microvias ): - if( GetShape() == VIA_MICROVIA ) + if( GetViaType() == VIA_MICROVIA ) { int ax, ay, bx, by; @@ -917,12 +931,12 @@ void SEGVIA::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, // for Buried Vias, draw a partial line : orient depending on layer pair // (so we can see superimposed buried vias ): - if( GetShape() == VIA_BLIND_BURIED ) + if( GetViaType() == VIA_BLIND_BURIED ) { int ax = 0, ay = radius, bx = 0, by = drill_radius; LAYER_NUM layer_top, layer_bottom; - ( (SEGVIA*) this )->LayerPair( &layer_top, &layer_bottom ); + ( (VIA*) this )->LayerPair( &layer_top, &layer_bottom ); // lines for the top layer RotatePoint( &ax, &ay, layer_top * 3600.0 / brd->GetCopperLayerCount( ) ); @@ -978,7 +992,7 @@ void SEGVIA::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, } -void SEGVIA::ViewGetLayers( int aLayers[], int& aCount ) const +void VIA::ViewGetLayers( int aLayers[], int& aCount ) const { // Just show it on common via & via holes layers aLayers[0] = ITEM_GAL_LAYER( VIAS_VISIBLE ); @@ -1035,56 +1049,12 @@ void TRACK::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) } } - -void TRACK::GetMsgPanelInfoBase( std::vector< MSG_PANEL_ITEM >& aList ) +void TRACK::GetMsgPanelInfoBase_Common( std::vector< MSG_PANEL_ITEM >& aList ) { wxString msg; - BOARD* board = GetBoard(); - switch( Type() ) - { - case PCB_VIA_T: - switch( GetShape() ) - { - default: - case 0: - msg = wxT( "???" ); // Not used yet, does not exist currently - break; - - case 1: - msg = _( "Micro Via" ); // from external layer (TOP or BOTTOM) from - // the near neighbor inner layer only - break; - - case 2: - msg = _( "Blind/Buried Via" ); // from inner or external to inner - // or external layer (no restriction) - break; - - case 3: - msg = _( "Through Via" ); // Usual via (from TOP to BOTTOM layer only ) - break; - } - - break; - - case PCB_TRACE_T: - msg = _( "Track" ); - break; - - case PCB_ZONE_T: - msg = _( "Zone" ); - break; - - default: - msg = wxT( "???" ); - break; - } - - aList.push_back( MSG_PANEL_ITEM( _( "Type" ), msg, DARKCYAN ) ); - - // Display Net Name (in Pcbnew) - if( board ) + // Display Net Name + if( GetBoard() ) { NETINFO_ITEM* net = GetNet(); @@ -1095,7 +1065,7 @@ void TRACK::GetMsgPanelInfoBase( std::vector< MSG_PANEL_ITEM >& aList ) aList.push_back( MSG_PANEL_ITEM( _( "NetName" ), msg, RED ) ); - /* Display net code : (useful in test or debug) */ + // Display net code : (useful in test or debug) msg.Printf( wxT( "%d.%d" ), GetNetCode(), GetSubNet() ); aList.push_back( MSG_PANEL_ITEM( _( "NetCode" ), msg, RED ) ); } @@ -1127,7 +1097,7 @@ void TRACK::GetMsgPanelInfoBase( std::vector< MSG_PANEL_ITEM >& aList ) #endif // defined(DEBUG) - /* Display the State member */ + // Display the State member msg = wxT( ". . " ); if( GetState( TRACK_LOCKED ) ) @@ -1137,64 +1107,126 @@ void TRACK::GetMsgPanelInfoBase( std::vector< MSG_PANEL_ITEM >& aList ) msg[2] = 'A'; aList.push_back( MSG_PANEL_ITEM( _( "Status" ), msg, MAGENTA ) ); +} - /* Display layer or layer pair) */ - if( Type() == PCB_VIA_T ) - { - SEGVIA* Via = (SEGVIA*) this; - LAYER_NUM top_layer, bottom_layer; +void TRACK::GetMsgPanelInfoBase( std::vector< MSG_PANEL_ITEM >& aList ) +{ + wxString msg; + BOARD* board = GetBoard(); - Via->LayerPair( &top_layer, &bottom_layer ); - if( board ) - msg = board->GetLayerName( top_layer ) + wxT( "/" ) - + board->GetLayerName( bottom_layer ); - else - msg.Printf(wxT("%d/%d"), top_layer, bottom_layer ); - } + aList.push_back( MSG_PANEL_ITEM( _( "Type" ), _( "Track" ), DARKCYAN ) ); + + GetMsgPanelInfoBase_Common( aList ); + + // Display layer + if( board ) + msg = board->GetLayerName( m_Layer ); else - { - if( board ) - msg = board->GetLayerName( m_Layer ); - else - msg.Printf(wxT("%d"), m_Layer ); - } + msg.Printf(wxT("%d"), m_Layer ); aList.push_back( MSG_PANEL_ITEM( _( "Layer" ), msg, BROWN ) ); // Display width msg = ::CoordinateToString( (unsigned) m_Width ); - if( Type() == PCB_VIA_T ) // Display Diam and Drill values - { - // Display diameter value: - aList.push_back( MSG_PANEL_ITEM( _( "Diam" ), msg, DARKCYAN ) ); - - // Display drill value - int drill_value = GetDrillValue(); - - msg = ::CoordinateToString( drill_value ); - - wxString title = _( "Drill" ); - title += wxT( " " ); - - if( m_Drill >= 0 ) - title += _( "(Specific)" ); - else - title += _( "(Default)" ); - - aList.push_back( MSG_PANEL_ITEM( title, msg, RED ) ); - } - else - { - aList.push_back( MSG_PANEL_ITEM( _( "Width" ), msg, DARKCYAN ) ); - } + aList.push_back( MSG_PANEL_ITEM( _( "Width" ), msg, DARKCYAN ) ); // Display segment length - if( Type() != PCB_VIA_T ) // Display Diam and Drill values + msg = ::LengthDoubleToString( GetLength() ); + aList.push_back( MSG_PANEL_ITEM( _( "Segment Length" ), msg, DARKCYAN ) ); +} + +void SEGZONE::GetMsgPanelInfoBase( std::vector< MSG_PANEL_ITEM >& aList ) +{ + wxString msg; + BOARD* board = GetBoard(); + + aList.push_back( MSG_PANEL_ITEM( _( "Type" ), _( "Zone " ), DARKCYAN ) ); + + GetMsgPanelInfoBase_Common( aList ); + + // Display layer + if( board ) + msg = board->GetLayerName( m_Layer ); + else + msg.Printf(wxT("%d"), m_Layer ); + + aList.push_back( MSG_PANEL_ITEM( _( "Layer" ), msg, BROWN ) ); + + // Display width + msg = ::CoordinateToString( (unsigned) m_Width ); + + aList.push_back( MSG_PANEL_ITEM( _( "Width" ), msg, DARKCYAN ) ); + + // Display segment length + msg = ::LengthDoubleToString( GetLength() ); + aList.push_back( MSG_PANEL_ITEM( _( "Segment Length" ), msg, DARKCYAN ) ); +} + +void VIA::GetMsgPanelInfoBase( std::vector< MSG_PANEL_ITEM >& aList ) +{ + wxString msg; + BOARD* board = GetBoard(); + + switch( GetViaType() ) { - msg = ::LengthDoubleToString( GetLength() ); - aList.push_back( MSG_PANEL_ITEM( _( "Segment Length" ), msg, DARKCYAN ) ); + default: + case VIA_NOT_DEFINED: + msg = wxT( "???" ); // Not used yet, does not exist currently + break; + + case VIA_MICROVIA: + msg = _( "Micro Via" ); // from external layer (TOP or BOTTOM) from + // the near neighbor inner layer only + break; + + case VIA_BLIND_BURIED: + msg = _( "Blind/Buried Via" ); // from inner or external to inner + // or external layer (no restriction) + break; + + case VIA_THROUGH: + msg = _( "Through Via" ); // Usual via (from TOP to BOTTOM layer only ) + break; } + + aList.push_back( MSG_PANEL_ITEM( _( "Type" ), msg, DARKCYAN ) ); + + GetMsgPanelInfoBase_Common( aList ); + + + // Display layer pair + LAYER_NUM top_layer, bottom_layer; + + LayerPair( &top_layer, &bottom_layer ); + if( board ) + msg = board->GetLayerName( top_layer ) + wxT( "/" ) + + board->GetLayerName( bottom_layer ); + else + msg.Printf(wxT("%d/%d"), top_layer, bottom_layer ); + + aList.push_back( MSG_PANEL_ITEM( _( "Layers" ), msg, BROWN ) ); + + // Display width + msg = ::CoordinateToString( (unsigned) m_Width ); + + // Display diameter value: + aList.push_back( MSG_PANEL_ITEM( _( "Diam" ), msg, DARKCYAN ) ); + + // Display drill value + int drill_value = GetDrillValue(); + + msg = ::CoordinateToString( drill_value ); + + wxString title = _( "Drill" ); + title += wxT( " " ); + + if( m_Drill >= 0 ) + title += _( "(Specific)" ); + else + title += _( "(Default)" ); + + aList.push_back( MSG_PANEL_ITEM( title, msg, RED ) ); } @@ -1243,11 +1275,9 @@ bool TRACK::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) con } -TRACK* TRACK::GetVia( const wxPoint& aPosition, LAYER_NUM aLayer) +VIA* TRACK::GetVia( const wxPoint& aPosition, LAYER_NUM aLayer) { - TRACK* track; - - for( track = this; track; track = track->Next() ) + for( TRACK *track = this; track; track = track->Next() ) { if( track->Type() != PCB_VIA_T ) continue; @@ -1258,22 +1288,17 @@ TRACK* TRACK::GetVia( const wxPoint& aPosition, LAYER_NUM aLayer) if( track->GetState( BUSY | IS_DELETED ) ) continue; - if( aLayer == UNDEFINED_LAYER ) - break; - - if( track->IsOnLayer( aLayer ) ) - break; + if( (aLayer == UNDEFINED_LAYER) || (track->IsOnLayer( aLayer )) ) + return static_cast( track ); } - return track; + return NULL; } -TRACK* TRACK::GetVia( TRACK* aEndTrace, const wxPoint& aPosition, LAYER_MSK aLayerMask ) +VIA* TRACK::GetVia( TRACK* aEndTrace, const wxPoint& aPosition, LAYER_MSK aLayerMask ) { - TRACK* trace; - - for( trace = this; trace != NULL; trace = trace->Next() ) + for( TRACK *trace = this; trace; trace = trace->Next() ) { if( trace->Type() == PCB_VIA_T ) { @@ -1282,7 +1307,7 @@ TRACK* TRACK::GetVia( TRACK* aEndTrace, const wxPoint& aPosition, LAYER_MSK aLay if( trace->GetState( BUSY | IS_DELETED ) == 0 ) { if( aLayerMask & trace->GetLayerMask() ) - return trace; + return static_cast( trace ); } } } @@ -1295,7 +1320,7 @@ TRACK* TRACK::GetVia( TRACK* aEndTrace, const wxPoint& aPosition, LAYER_MSK aLay } -TRACK* TRACK::GetTrace( TRACK* aStartTrace, TRACK* aEndTrace, int aEndPoint ) +TRACK* TRACK::GetTrack( TRACK* aStartTrace, TRACK* aEndTrace, int aEndPoint ) { const int NEIGHTBOUR_COUNT_MAX = 50; @@ -1466,7 +1491,7 @@ int TRACK::GetEndSegments( int aCount, TRACK** aStartTrace, TRACK** aEndTrace ) } Track->SetState( BUSY, true ); - segm = ::GetTrace( this, TrackListEnd, Track->m_Start, layerMask ); + segm = ::GetTrack( this, TrackListEnd, Track->m_Start, layerMask ); Track->SetState( BUSY, false ); if( via ) @@ -1513,7 +1538,7 @@ int TRACK::GetEndSegments( int aCount, TRACK** aStartTrace, TRACK** aEndTrace ) } Track->SetState( BUSY, true ); - segm = ::GetTrace( this, TrackListEnd, Track->m_End, layerMask ); + segm = ::GetTrack( this, TrackListEnd, Track->m_End, layerMask ); Track->SetState( BUSY, false ); if( via ) diff --git a/pcbnew/class_track.h b/pcbnew/class_track.h index 56ac970102..8b727dde17 100644 --- a/pcbnew/class_track.h +++ b/pcbnew/class_track.h @@ -38,23 +38,27 @@ class TRACK; +class VIA; class D_PAD; class MSG_PANEL_ITEM; -// Via attributes (m_Shape parameter) -#define VIA_THROUGH 3 /* Always a through hole via */ -#define VIA_BLIND_BURIED 2 /* this via can be on internal layers */ -#define VIA_MICROVIA 1 /* this via which connect from an external layer - * to the near neighbor internal layer */ -#define VIA_NOT_DEFINED 0 /* not yet used */ +// Via types +enum VIATYPE_T +{ + VIA_THROUGH = 3, /* Always a through hole via */ + VIA_BLIND_BURIED = 2, /* this via can be on internal layers */ + VIA_MICROVIA = 1, /* this via which connect from an external layer + * to the near neighbor internal layer */ + VIA_NOT_DEFINED = 0 /* not yet used */ +}; #define UNDEFINED_DRILL_DIAMETER -1 //< Undefined via drill diameter. #define MIN_VIA_DRAW_SIZE 4 /// Minimum size in pixel for full drawing /** - * Function GetTrace + * Function GetTrack * is a helper function to locate a trace segment having an end point at \a aPosition * on \a aLayerMask starting at \a aStartTrace and end at \a aEndTrace. *

@@ -69,9 +73,8 @@ class MSG_PANEL_ITEM; * layer mask. * @return A TRACK object pointer if found otherwise NULL. */ -extern TRACK* GetTrace( TRACK* aStartTrace, TRACK* aEndTrace, const wxPoint& aPosition, - LAYER_MSK aLayerMask ); - +extern TRACK* GetTrack( TRACK* aStartTrace, TRACK* aEndTrace, + const wxPoint& aPosition, LAYER_MSK aLayerMask ); class TRACK : public BOARD_CONNECTED_ITEM { @@ -85,9 +88,6 @@ protected: int m_Width; // Thickness of track, or via diameter wxPoint m_Start; // Line start point wxPoint m_End; // Line end point - int m_Shape; // vias: shape and type, Track = shape.. - - int m_Drill; // for vias: via drill (- 1 for default value) public: BOARD_CONNECTED_ITEM* start; // pointers to a connected item (pad or track) @@ -124,9 +124,6 @@ public: void SetStart( const wxPoint& aStart ) { m_Start = aStart; } const wxPoint& GetStart() const { return m_Start; } - int GetShape() const { return m_Shape; } - void SetShape( int aShape ) { m_Shape = aShape; } - // Virtual function const EDA_RECT GetBoundingBox() const; @@ -180,47 +177,13 @@ public: int aClearanceValue, int aCircleToSegmentsCount, double aCorrectionFactor ) const; - /** - * Function SetDrill - * sets the drill value for vias. - * @param aDrill is the new drill diameter - */ - void SetDrill( int aDrill ) { m_Drill = aDrill; } - - /** - * Function GetDrill - * returns the local drill setting for this VIA. If you want the calculated value, - * use GetDrillValue() instead. - */ - int GetDrill() const { return m_Drill; } - - /** - * Function GetDrillValue - * "calculates" the drill value for vias (m-Drill if > 0, or default - * drill value for the board. - * @return real drill_value - */ - int GetDrillValue() const; - - /** - * Function SetDrillDefault - * sets the drill value for vias to the default value #UNDEFINED_DRILL_DIAMETER. - */ - void SetDrillDefault() { m_Drill = UNDEFINED_DRILL_DIAMETER; } - - /** - * Function IsDrillDefault - * @return true if the drill value is default value (-1) - */ - bool IsDrillDefault() { return m_Drill <= 0; } - /** * Function GetLayerMask * returns a "layer mask", which is a bitmap of all layers on which the - * TRACK segment or SEGVIA physically resides. + * TRACK segment or VIA physically resides. * @return int - a layer mask, see pcbstruct.h's LAYER_BACK, etc. */ - LAYER_MSK GetLayerMask() const; + virtual LAYER_MSK GetLayerMask() const; /** * Function IsPointOnEnds @@ -239,13 +202,6 @@ public: void GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ); - /** - * Function GetMsgPanelInfoBase - * Display info about the track segment only, and does not calculate the full track length - * @param aList A list of #MSG_PANEL_ITEM objects to add status information. - */ - void GetMsgPanelInfoBase( std::vector< MSG_PANEL_ITEM >& aList ); - /** * Function ShowWidth * returns the width of the track in displayable user units. @@ -265,28 +221,28 @@ public: /** * Function GetVia - * finds the first SEGVIA object at \a aPosition on \a aLayer starting at the trace. + * finds the first VIA object at \a aPosition on \a aLayer starting at the trace. * * @param aPosition The wxPoint to HitTest() against. * @param aLayer The layer to match, pass -1 for a don't care. - * @return A pointer to a SEGVIA object if found, else NULL. + * @return A pointer to a VIA object if found, else NULL. */ - TRACK* GetVia( const wxPoint& aPosition, LAYER_NUM aLayer = UNDEFINED_LAYER ); + VIA* GetVia( const wxPoint& aPosition, LAYER_NUM aLayer = UNDEFINED_LAYER ); /** * Function GetVia - * finds the first SEGVIA object at \a aPosition on \a aLayer starting at the trace + * finds the first VIA object at \a aPosition on \a aLayer starting at the trace * and ending at \a aEndTrace. * * @param aEndTrace Pointer to the last TRACK object to end search. * @param aPosition The wxPoint to HitTest() against. * @param aLayerMask The layers to match, pass -1 for a don't care. - * @return A pointer to a SEGVIA object if found, else NULL. + * @return A pointer to a VIA object if found, else NULL. */ - TRACK* GetVia( TRACK* aEndTrace, const wxPoint& aPosition, LAYER_MSK aLayerMask ); + VIA* GetVia( TRACK* aEndTrace, const wxPoint& aPosition, LAYER_MSK aLayerMask ); /** - * Function GetTrace + * Function GetTrack * return the trace segment connected to the segment at \a aEndPoint from \a * aStartTrace to \a aEndTrace. * @@ -296,7 +252,7 @@ public: * @param aEndPoint The start or end point of the segment to test against. * @return A TRACK object pointer if found otherwise NULL. */ - TRACK* GetTrace( TRACK* aStartTrace, TRACK* aEndTrace, int aEndPoint ); + TRACK* GetTrack( TRACK* aStartTrace, TRACK* aEndTrace, int aEndPoint ); /** * Function GetEndSegments @@ -349,6 +305,24 @@ public: static wxString ShowState( int stateBits ); #endif + +protected: + /** + * Function GetMsgPanelInfoBase + * Display info about the track segment only, and does not calculate the full track length + * @param aList A list of #MSG_PANEL_ITEM objects to add status information. + */ + virtual void GetMsgPanelInfoBase( std::vector< MSG_PANEL_ITEM >& aList ); + + + /** + * Helper function for the common panel info */ + void GetMsgPanelInfoBase_Common( std::vector< MSG_PANEL_ITEM >& aList ); + + /** + * Helper for drawing the short netname in tracks */ + void DrawShortNetname( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, + EDA_COLOR_T aBgColor ); }; @@ -369,16 +343,22 @@ public: wxString GetSelectMenuText() const; + void Draw( EDA_DRAW_PANEL* panel, wxDC* DC, + GR_DRAWMODE aDrawMode, const wxPoint& aOffset = ZeroOffset ); + BITMAP_DEF GetMenuImage() const { return add_zone_xpm; } EDA_ITEM* Clone() const; + +protected: + virtual void GetMsgPanelInfoBase( std::vector< MSG_PANEL_ITEM >& aList ); }; -class SEGVIA : public TRACK +class VIA : public TRACK { public: - SEGVIA( BOARD_ITEM* aParent ); + VIA( BOARD_ITEM* aParent ); // Do not create a copy constructor. The one generated by the compiler is adequate. @@ -387,6 +367,8 @@ public: bool IsOnLayer( LAYER_NUM aLayer ) const; + virtual LAYER_MSK GetLayerMask() const; + /** * Function SetLayerPair * set the .m_Layer member param: @@ -428,6 +410,52 @@ public: #if defined (DEBUG) virtual void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override #endif + + VIATYPE_T GetViaType() const { return m_ViaType; } + void SetViaType( VIATYPE_T aViaType ) { m_ViaType = aViaType; } + + /** + * Function SetDrill + * sets the drill value for vias. + * @param aDrill is the new drill diameter + */ + void SetDrill( int aDrill ) { m_Drill = aDrill; } + + /** + * Function GetDrill + * returns the local drill setting for this VIA. If you want the calculated value, + * use GetDrillValue() instead. + */ + int GetDrill() const { return m_Drill; } + + /** + * Function GetDrillValue + * "calculates" the drill value for vias (m-Drill if > 0, or default + * drill value for the board. + * @return real drill_value + */ + int GetDrillValue() const; + + /** + * Function SetDrillDefault + * sets the drill value for vias to the default value #UNDEFINED_DRILL_DIAMETER. + */ + void SetDrillDefault() { m_Drill = UNDEFINED_DRILL_DIAMETER; } + + /** + * Function IsDrillDefault + * @return true if the drill value is default value (-1) + */ + bool IsDrillDefault() const { return m_Drill <= 0; } + + +protected: + virtual void GetMsgPanelInfoBase( std::vector< MSG_PANEL_ITEM >& aList ); + +private: + VIATYPE_T m_ViaType; // Type of via + + int m_Drill; // for vias: via drill (- 1 for default value) }; diff --git a/pcbnew/clean.cpp b/pcbnew/clean.cpp index 63d72de226..443394157d 100644 --- a/pcbnew/clean.cpp +++ b/pcbnew/clean.cpp @@ -111,7 +111,7 @@ void PCB_EDIT_FRAME::Clean_Pcb() * Delete * - Redundant points on tracks (merge aligned segments) * - vias on pad - * - null lenght segments + * - null length segments * Create segments when track ends are incorrectly connected: * i.e. when a track end covers a pad or a via but is not exactly on the pad or the via center */ @@ -201,10 +201,13 @@ bool TRACKS_CLEANER::clean_vias() { if( track->GetStart() != track->GetEnd() ) track->SetEnd( track->GetStart() ); - } - if( track->GetShape() != VIA_THROUGH ) - continue; + VIA *via = static_cast( track ); + /* Important: this cleanup only does thru hole vias, it doesn't + * (yet) handle high density interconnects */ + if( via->GetViaType() != VIA_THROUGH ) + continue; + } // Search and delete others vias at same location TRACK* alt_track = track->Next(); @@ -213,17 +216,21 @@ bool TRACKS_CLEANER::clean_vias() for( ; alt_track != NULL; alt_track = next_track ) { next_track = alt_track->Next(); + VIA *alt_via = dynamic_cast( alt_track ); + if( alt_via ) + { - if( alt_track->GetShape() != VIA_THROUGH ) - continue; + if( alt_via->GetViaType() != VIA_THROUGH ) + continue; - if( alt_track->GetStart() != track->GetStart() ) - continue; + if( alt_via->GetStart() != track->GetStart() ) + continue; - // delete via - alt_track->UnLink(); - delete alt_track; - modified = true; + // delete via + alt_track->UnLink(); + delete alt_track; + modified = true; + } } } @@ -233,7 +240,8 @@ bool TRACKS_CLEANER::clean_vias() { next_track = track->Next(); - if( track->GetShape() != VIA_THROUGH ) + VIA *via = dynamic_cast( track ); + if( !via || (via->GetViaType() != VIA_THROUGH )) continue; // Examine the list of connected pads: @@ -296,7 +304,7 @@ bool TRACKS_CLEANER::deleteUnconnectedTracks() if( (type_end & START_ON_PAD ) == 0 ) { - TRACK* other = track->GetTrace( m_Brd->m_Track, NULL, FLG_START ); + TRACK* other = track->GetTrack( m_Brd->m_Track, NULL, FLG_START ); if( other == NULL ) // Test a connection to zones { @@ -309,7 +317,7 @@ bool TRACKS_CLEANER::deleteUnconnectedTracks() } else { - ((SEGVIA*)track)->LayerPair( &top_layer, &bottom_layer ); + ((VIA*)track)->LayerPair( &top_layer, &bottom_layer ); zone = m_Brd->HitTestForAnyFilledArea( track->GetStart(), top_layer, bottom_layer, track->GetNetCode() ); @@ -332,8 +340,8 @@ bool TRACKS_CLEANER::deleteUnconnectedTracks() // search for another segment following the via track->SetState( BUSY, true ); - SEGVIA* via = (SEGVIA*) other; - other = via->GetTrace( m_Brd->m_Track, NULL, FLG_START ); + VIA* via = (VIA*) other; + other = via->GetTrack( m_Brd->m_Track, NULL, FLG_START ); if( other == NULL ) { @@ -356,7 +364,7 @@ bool TRACKS_CLEANER::deleteUnconnectedTracks() // test if this track end point is connected to an other track if( (type_end & END_ON_PAD ) == 0 ) { - TRACK* other = track->GetTrace( m_Brd->m_Track, NULL, FLG_END ); + TRACK* other = track->GetTrack( m_Brd->m_Track, NULL, FLG_END ); if( other == NULL ) // Test a connection to zones { @@ -369,7 +377,7 @@ bool TRACKS_CLEANER::deleteUnconnectedTracks() } else { - ((SEGVIA*)track)->LayerPair( &top_layer, &bottom_layer ); + ((VIA*)track)->LayerPair( &top_layer, &bottom_layer ); zone = m_Brd->HitTestForAnyFilledArea( track->GetEnd(), top_layer, bottom_layer, track->GetNetCode() ); @@ -393,8 +401,8 @@ bool TRACKS_CLEANER::deleteUnconnectedTracks() track->SetState( BUSY, true ); - SEGVIA* via = (SEGVIA*) other; - other = via->GetTrace( m_Brd->m_Track, NULL, FLG_END ); + VIA* via = (VIA*) other; + other = via->GetTrack( m_Brd->m_Track, NULL, FLG_END ); if( other == NULL ) { @@ -500,7 +508,7 @@ bool TRACKS_CLEANER::clean_segments() // search for a possible point connected to the START point of the current segment for( segStart = segment->Next(); ; ) { - segStart = segment->GetTrace( segStart, NULL, FLG_START ); + segStart = segment->GetTrack( segStart, NULL, FLG_START ); if( segStart ) { @@ -514,7 +522,7 @@ bool TRACKS_CLEANER::clean_segments() // We must have only one segment connected segStart->SetState( BUSY, true ); - other = segment->GetTrace( m_Brd->m_Track, NULL, FLG_START ); + other = segment->GetTrack( m_Brd->m_Track, NULL, FLG_START ); segStart->SetState( BUSY, false ); if( other == NULL ) @@ -540,7 +548,7 @@ bool TRACKS_CLEANER::clean_segments() // search for a possible point connected to the END point of the current segment: for( segEnd = segment->Next(); ; ) { - segEnd = segment->GetTrace( segEnd, NULL, FLG_END ); + segEnd = segment->GetTrack( segEnd, NULL, FLG_END ); if( segEnd ) { @@ -552,7 +560,7 @@ bool TRACKS_CLEANER::clean_segments() // We must have only one segment connected segEnd->SetState( BUSY, true ); - other = segment->GetTrace( m_Brd->m_Track, NULL, FLG_END ); + other = segment->GetTrack( m_Brd->m_Track, NULL, FLG_END ); segEnd->SetState( BUSY, false ); if( other == NULL ) @@ -736,7 +744,7 @@ bool PCB_EDIT_FRAME::RemoveMisConnectedTracks() } else { - other = segment->GetTrace( GetBoard()->m_Track, NULL, FLG_START ); + other = segment->GetTrack( GetBoard()->m_Track, NULL, FLG_START ); if( other ) net_code_s = other->GetNetCode(); @@ -754,7 +762,7 @@ bool PCB_EDIT_FRAME::RemoveMisConnectedTracks() } else { - other = segment->GetTrace( GetBoard()->m_Track, NULL, FLG_END ); + other = segment->GetTrack( GetBoard()->m_Track, NULL, FLG_END ); if( other ) net_code_e = other->GetNetCode(); diff --git a/pcbnew/collectors.cpp b/pcbnew/collectors.cpp index 4aee57a556..2470684c6d 100644 --- a/pcbnew/collectors.cpp +++ b/pcbnew/collectors.cpp @@ -149,7 +149,7 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_ITEM* testItem, const void* testDa MODULE* module = NULL; D_PAD* pad = NULL; bool pad_through = false; - SEGVIA* via = NULL; + VIA* via = NULL; MARKER_PCB* marker = NULL; #if 0 // debugging @@ -252,7 +252,7 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_ITEM* testItem, const void* testDa break; case PCB_VIA_T: // vias are on many layers, so layer test is specific - via = (SEGVIA*) item; + via = (VIA*) item; break; case PCB_TRACE_T: diff --git a/pcbnew/dialogs/dialog_gendrill.cpp b/pcbnew/dialogs/dialog_gendrill.cpp index dc03481fca..6daa73471e 100644 --- a/pcbnew/dialogs/dialog_gendrill.cpp +++ b/pcbnew/dialogs/dialog_gendrill.cpp @@ -140,15 +140,27 @@ void DIALOG_GENDRILL::InitDisplayParams() for( TRACK* track = m_parent->GetBoard()->m_Track; track != NULL; track = track->Next() ) { - if( track->Type() != PCB_VIA_T ) - continue; + const VIA *via = dynamic_cast( track ); + if( via ) + { + switch( via->GetViaType() ) + { + case VIA_THROUGH: + m_throughViasCount++; + break; - if( track->GetShape() == VIA_THROUGH ) - m_throughViasCount++; - else if( track->GetShape() == VIA_MICROVIA ) - m_microViasCount++; - else if( track->GetShape() == VIA_BLIND_BURIED ) - m_blindOrBuriedViasCount++; + case VIA_MICROVIA: + m_microViasCount++; + break; + + case VIA_BLIND_BURIED: + m_blindOrBuriedViasCount++; + break; + + default: + break; + } + } } m_MicroViaDrillValue->Enable( m_microViasCount ); diff --git a/pcbnew/drc.cpp b/pcbnew/drc.cpp index c53df84be0..07b8ebf0f9 100644 --- a/pcbnew/drc.cpp +++ b/pcbnew/drc.cpp @@ -597,7 +597,7 @@ void DRC::testKeepoutAreas() if( ! area->GetDoNotAllowVias() ) continue; - if( ! ((SEGVIA*)segm)->IsOnLayer( area->GetLayer() ) ) + if( ! ((VIA*)segm)->IsOnLayer( area->GetLayer() ) ) continue; if( area->Outline()->Distance( segm->GetPosition() ) < segm->GetWidth()/2 ) @@ -645,7 +645,7 @@ bool DRC::doTrackKeepoutDrc( TRACK* aRefSeg ) if( ! area->GetDoNotAllowVias() ) continue; - if( ! ((SEGVIA*)aRefSeg)->IsOnLayer( area->GetLayer() ) ) + if( ! ((VIA*)aRefSeg)->IsOnLayer( area->GetLayer() ) ) continue; if( area->Outline()->Distance( aRefSeg->GetPosition() ) < aRefSeg->GetWidth()/2 ) diff --git a/pcbnew/drc_clearance_test_functions.cpp b/pcbnew/drc_clearance_test_functions.cpp index 0550f6cfa2..04394d2d08 100644 --- a/pcbnew/drc_clearance_test_functions.cpp +++ b/pcbnew/drc_clearance_test_functions.cpp @@ -169,21 +169,22 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads ) // Phase 0 : Test vias if( aRefSeg->Type() == PCB_VIA_T ) { + const VIA *refvia = static_cast( aRefSeg ); // test if the via size is smaller than minimum - if( aRefSeg->GetShape() == VIA_MICROVIA ) + if( refvia->GetViaType() == VIA_MICROVIA ) { - if( aRefSeg->GetWidth() < netclass->GetuViaMinDiameter() ) + if( refvia->GetWidth() < netclass->GetuViaMinDiameter() ) { - m_currentMarker = fillMarker( aRefSeg, NULL, + m_currentMarker = fillMarker( refvia, NULL, DRCE_TOO_SMALL_MICROVIA, m_currentMarker ); return false; } } else { - if( aRefSeg->GetWidth() < netclass->GetViaMinDiameter() ) + if( refvia->GetWidth() < netclass->GetViaMinDiameter() ) { - m_currentMarker = fillMarker( aRefSeg, NULL, + m_currentMarker = fillMarker( refvia, NULL, DRCE_TOO_SMALL_VIA, m_currentMarker ); return false; } @@ -192,9 +193,9 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads ) // test if via's hole is bigger than its diameter // This test is necessary since the via hole size and width can be modified // and a default via hole can be bigger than some vias sizes - if( aRefSeg->GetDrillValue() > aRefSeg->GetWidth() ) + if( refvia->GetDrillValue() > refvia->GetWidth() ) { - m_currentMarker = fillMarker( aRefSeg, NULL, + m_currentMarker = fillMarker( refvia, NULL, DRCE_VIA_HOLE_BIGGER, m_currentMarker ); return false; } @@ -202,12 +203,12 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads ) // For microvias: test if they are blind vias and only between 2 layers // because they are used for very small drill size and are drill by laser // and **only one layer** can be drilled - if( aRefSeg->GetShape() == VIA_MICROVIA ) + if( refvia->GetViaType() == VIA_MICROVIA ) { LAYER_NUM layer1, layer2; bool err = true; - ( (SEGVIA*) aRefSeg )->LayerPair( &layer1, &layer2 ); + refvia->LayerPair( &layer1, &layer2 ); if( layer1 > layer2 ) EXCHG( layer1, layer2 ); @@ -222,7 +223,7 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads ) if( err ) { - m_currentMarker = fillMarker( aRefSeg, NULL, + m_currentMarker = fillMarker( refvia, NULL, DRCE_MICRO_VIA_INCORRECT_LAYER_PAIR, m_currentMarker ); return false; } diff --git a/pcbnew/drc_marker_functions.cpp b/pcbnew/drc_marker_functions.cpp index 817d7e17d9..9a5002521d 100644 --- a/pcbnew/drc_marker_functions.cpp +++ b/pcbnew/drc_marker_functions.cpp @@ -44,7 +44,8 @@ #include -MARKER_PCB* DRC::fillMarker( TRACK* aTrack, BOARD_ITEM* aItem, int aErrorCode, MARKER_PCB* fillMe ) +MARKER_PCB* DRC::fillMarker( const TRACK* aTrack, BOARD_ITEM* aItem, int aErrorCode, + MARKER_PCB* fillMe ) { wxString textA = aTrack->GetSelectMenuText(); wxString textB; @@ -62,7 +63,7 @@ MARKER_PCB* DRC::fillMarker( TRACK* aTrack, BOARD_ITEM* aItem, int aErrorCode, M } else if( aItem->Type() == PCB_VIA_T ) { - posB = position = ((SEGVIA*)aItem)->GetPosition(); + posB = position = ((VIA*)aItem)->GetPosition(); } else if( aItem->Type() == PCB_TRACE_T ) { diff --git a/pcbnew/drc_stuff.h b/pcbnew/drc_stuff.h index f2daee5b95..927e94936a 100644 --- a/pcbnew/drc_stuff.h +++ b/pcbnew/drc_stuff.h @@ -212,14 +212,14 @@ private: * DRC problem, or unconnected pad problem. * * @param aTrack The reference track. - * @param aItem Another item on the BOARD, such as a SEGVIA, SEGZONE, + * @param aItem Another item on the BOARD, such as a VIA, SEGZONE, * or TRACK. * @param aErrorCode A categorizing identifier for the particular type * of error that is being reported. * @param fillMe A MARKER_PCB* which is to be filled in, or NULL if one is to * first be allocated, then filled. */ - MARKER_PCB* fillMarker( TRACK* aTrack, BOARD_ITEM* aItem, int aErrorCode, MARKER_PCB* fillMe ); + MARKER_PCB* fillMarker( const TRACK* aTrack, BOARD_ITEM* aItem, int aErrorCode, MARKER_PCB* fillMe ); MARKER_PCB* fillMarker( D_PAD* aPad, D_PAD* bPad, int aErrorCode, MARKER_PCB* fillMe ); diff --git a/pcbnew/eagle_plugin.cpp b/pcbnew/eagle_plugin.cpp index f8e31fddec..a78007761b 100644 --- a/pcbnew/eagle_plugin.cpp +++ b/pcbnew/eagle_plugin.cpp @@ -2410,9 +2410,9 @@ void EAGLE_PLUGIN::loadSignals( CPTREE& aSignals ) if( IsCopperLayer( layer_front_most ) && IsCopperLayer( layer_back_most ) ) { - int kidiam; - int drillz = kicad( v.drill ); - SEGVIA* via = new SEGVIA( m_board ); + int kidiam; + int drillz = kicad( v.drill ); + VIA* via = new VIA( m_board ); m_board->m_Track.Insert( via, NULL ); via->SetLayerPair( layer_front_most, layer_back_most ); @@ -2439,11 +2439,11 @@ void EAGLE_PLUGIN::loadSignals( CPTREE& aSignals ) m_min_via_hole = drillz; if( layer_front_most == LAYER_N_FRONT && layer_back_most == LAYER_N_BACK ) - via->SetShape( VIA_THROUGH ); + via->SetViaType( VIA_THROUGH ); else if( layer_front_most == LAYER_N_FRONT || layer_back_most == LAYER_N_BACK ) - via->SetShape( VIA_MICROVIA ); + via->SetViaType( VIA_MICROVIA ); else - via->SetShape( VIA_BLIND_BURIED ); + via->SetViaType( VIA_BLIND_BURIED ); via->SetTimeStamp( timeStamp( it->second ) ); @@ -2453,8 +2453,6 @@ void EAGLE_PLUGIN::loadSignals( CPTREE& aSignals ) via->SetEnd( pos ); via->SetNetCode( netCode ); - - via->SetShape( S_CIRCLE ); // @todo should be in SEGVIA constructor } m_xpath->pop(); } diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index 92b267c856..98a3ec4fee 100644 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -394,14 +394,23 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) } else { - int v_type = GetDesignSettings().m_CurrentViaType; - if( id == ID_POPUP_PCB_PLACE_BLIND_BURIED_VIA || - id == ID_POPUP_PCB_SELECT_CU_LAYER_AND_PLACE_BLIND_BURIED_VIA ) - GetDesignSettings().m_CurrentViaType = VIA_BLIND_BURIED; - else if( id == ID_POPUP_PCB_PLACE_MICROVIA ) - GetDesignSettings().m_CurrentViaType = VIA_MICROVIA; - else - GetDesignSettings().m_CurrentViaType = VIA_THROUGH; + BOARD_DESIGN_SETTINGS &settings = GetDesignSettings(); + VIATYPE_T v_type = settings.m_CurrentViaType; + switch( id ) + { + case ID_POPUP_PCB_PLACE_BLIND_BURIED_VIA: + case ID_POPUP_PCB_SELECT_CU_LAYER_AND_PLACE_BLIND_BURIED_VIA: + settings.m_CurrentViaType = VIA_BLIND_BURIED; + break; + + case ID_POPUP_PCB_PLACE_MICROVIA: + settings.m_CurrentViaType = VIA_MICROVIA; + break; + + default: + settings.m_CurrentViaType = VIA_THROUGH; + break; + } // place via and switch layer. if( id == ID_POPUP_PCB_SELECT_CU_LAYER_AND_PLACE_THROUGH_VIA || @@ -426,7 +435,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) else Other_Layer_Route( (TRACK*) GetCurItem(), &dc ); - GetDesignSettings().m_CurrentViaType = v_type; + settings.m_CurrentViaType = v_type; if( DisplayOpt.ContrastModeDisplay ) m_canvas->Refresh(); diff --git a/pcbnew/edit_track_width.cpp b/pcbnew/edit_track_width.cpp index 4c2d5e8327..c371ee0978 100644 --- a/pcbnew/edit_track_width.cpp +++ b/pcbnew/edit_track_width.cpp @@ -47,8 +47,10 @@ bool PCB_EDIT_FRAME::SetTrackSegmentWidth( TRACK* aTrackItem, if( aTrackItem->Type() == PCB_VIA_T ) { - if( !aTrackItem->IsDrillDefault() ) - initial_drill = aTrackItem->GetDrillValue(); + const VIA *via = static_cast( aTrackItem ); + + if( !via->IsDrillDefault() ) + initial_drill = via->GetDrillValue(); if( net ) { @@ -60,7 +62,7 @@ bool PCB_EDIT_FRAME::SetTrackSegmentWidth( TRACK* aTrackItem, new_drill = GetBoard()->GetCurrentViaDrill(); } - if( aTrackItem->GetShape() == VIA_MICROVIA ) + if( via->GetViaType() == VIA_MICROVIA ) { if( net ) new_width = net->GetMicroViaSize(); @@ -107,10 +109,11 @@ bool PCB_EDIT_FRAME::SetTrackSegmentWidth( TRACK* aTrackItem, if( aTrackItem->Type() == PCB_VIA_T ) { // Set new drill value. Note: currently microvias have only a default drill value + VIA *via = static_cast( aTrackItem ); if( new_drill > 0 ) - aTrackItem->SetDrill( new_drill ); + via->SetDrill( new_drill ); else - aTrackItem->SetDrillDefault(); + via->SetDrillDefault(); } } } diff --git a/pcbnew/editrack-part2.cpp b/pcbnew/editrack-part2.cpp index e394ad1ca3..bedbcac572 100644 --- a/pcbnew/editrack-part2.cpp +++ b/pcbnew/editrack-part2.cpp @@ -95,9 +95,9 @@ bool PCB_EDIT_FRAME::Other_Layer_Route( TRACK* aTrack, wxDC* DC ) m_canvas->CallMouseCapture( DC, wxDefaultPosition, false ); // create the via - SEGVIA* via = new SEGVIA( GetBoard() ); + VIA* via = new VIA( GetBoard() ); via->SetFlags( IS_NEW ); - via->SetShape( GetDesignSettings().m_CurrentViaType ); + via->SetViaType( GetDesignSettings().m_CurrentViaType ); via->SetWidth( GetBoard()->GetCurrentViaSize()); via->SetNetCode( GetBoard()->GetHighLightNetCode() ); via->SetEnd( g_CurrentTrackSegment->GetEnd() ); @@ -118,7 +118,7 @@ bool PCB_EDIT_FRAME::Other_Layer_Route( TRACK* aTrack, wxDC* DC ) last_layer = GetScreen()->m_Route_Layer_BOTTOM; // Adjust the actual via layer pair - switch ( via->GetShape() ) + switch ( via->GetViaType() ) { case VIA_BLIND_BURIED: via->SetLayerPair( first_layer, last_layer ); diff --git a/pcbnew/exporters/export_d356.cpp b/pcbnew/exporters/export_d356.cpp index 865986acc9..f75dfbdeba 100644 --- a/pcbnew/exporters/export_d356.cpp +++ b/pcbnew/exporters/export_d356.cpp @@ -198,23 +198,23 @@ static void build_via_testpoints( BOARD *aPcb, { if( track->Type() == PCB_VIA_T ) { - SEGVIA *via = (SEGVIA*) track; - NETINFO_ITEM *net = track->GetNet(); + VIA *via = (VIA*) track; + NETINFO_ITEM *net = track->GetNet(); D356_RECORD rk; - rk.smd = false; + rk.smd = false; rk.hole = true; - if( net ) - rk.netname = net->GetNetname(); - else - rk.netname = wxEmptyString; + if( net ) + rk.netname = net->GetNetname(); + else + rk.netname = wxEmptyString; rk.refdes = wxT("VIA"); rk.pin = wxT(""); rk.midpoint = true; // Vias are always midpoints rk.drill = via->GetDrillValue(); rk.mechanical = false; LAYER_NUM top_layer, bottom_layer; - via->LayerPair( &top_layer, &bottom_layer ); + via->LayerPair( &top_layer, &bottom_layer ); rk.access = via_access_code( aPcb, top_layer, bottom_layer ); rk.x_location = via->GetPosition().x - origin.x; rk.y_location = origin.y - via->GetPosition().y; diff --git a/pcbnew/exporters/export_gencad.cpp b/pcbnew/exporters/export_gencad.cpp index 8ef7e19214..601c91ae6d 100644 --- a/pcbnew/exporters/export_gencad.cpp +++ b/pcbnew/exporters/export_gencad.cpp @@ -222,8 +222,8 @@ static int PadListSortByShape( const void* aRefptr, const void* aObjptr ) // Sort vias for uniqueness static int ViaSort( const void* aRefptr, const void* aObjptr ) { - TRACK* padref = *(TRACK**) aRefptr; - TRACK* padcmp = *(TRACK**) aObjptr; + VIA* padref = *(VIA**) aRefptr; + VIA* padcmp = *(VIA**) aObjptr; if( padref->GetWidth() != padcmp->GetWidth() ) return padref->GetWidth() - padcmp->GetWidth(); @@ -253,8 +253,8 @@ static void CreatePadsShapesSection( FILE* aFile, BOARD* aPcb ) { std::vector pads; std::vector padstacks; - std::vector vias; - std::vector viastacks; + std::vector vias; + std::vector viastacks; padstacks.resize( 1 ); // We count pads from 1 // The master layermask (i.e. the enabled layers) for padstack generation @@ -275,17 +275,17 @@ static void CreatePadsShapesSection( FILE* aFile, BOARD* aPcb ) { if( track->Type() == PCB_VIA_T ) { - vias.push_back( track ); + vias.push_back( static_cast(track) ); } } - qsort( &vias[0], vias.size(), sizeof(TRACK*), ViaSort ); + qsort( &vias[0], vias.size(), sizeof(VIA*), ViaSort ); // Emit vias pads TRACK* old_via = 0; for( unsigned i = 0; i < vias.size(); i++ ) { - TRACK* via = vias[i]; + VIA* via = vias[i]; if( old_via && 0 == ViaSort( &old_via, &via ) ) continue; @@ -433,7 +433,7 @@ static void CreatePadsShapesSection( FILE* aFile, BOARD* aPcb ) // Via padstacks for( unsigned i = 0; i < viastacks.size(); i++ ) { - TRACK* via = viastacks[i]; + VIA* via = viastacks[i]; LAYER_MSK mask = via->GetLayerMask() & master_layermask; fprintf( aFile, "PADSTACK VIA%d.%d.%X %g\n", via->GetWidth(), via->GetDrillValue(), mask, @@ -832,11 +832,12 @@ static void CreateRoutesSection( FILE* aFile, BOARD* aPcb ) } if( track->Type() == PCB_VIA_T ) { + const VIA *via = static_cast(track); fprintf( aFile, "VIA VIA%d.%d.%X %g %g ALL %g via%d\n", - track->GetWidth(), track->GetDrillValue(), - track->GetLayerMask() & master_layermask, - MapXTo( track->GetStart().x ), MapYTo( track->GetStart().y ), - track->GetDrillValue() / SCALE_FACTOR, vianum++ ); + via->GetWidth(), via->GetDrillValue(), + via->GetLayerMask() & master_layermask, + MapXTo( via->GetStart().x ), MapYTo( via->GetStart().y ), + via->GetDrillValue() / SCALE_FACTOR, vianum++ ); } } diff --git a/pcbnew/exporters/export_vrml.cpp b/pcbnew/exporters/export_vrml.cpp index 5962ba276b..2522e813e2 100644 --- a/pcbnew/exporters/export_vrml.cpp +++ b/pcbnew/exporters/export_vrml.cpp @@ -801,7 +801,7 @@ static void export_round_padstack( MODEL_VRML& aModel, BOARD* pcb, } -static void export_vrml_via( MODEL_VRML& aModel, BOARD* pcb, SEGVIA* via ) +static void export_vrml_via( MODEL_VRML& aModel, BOARD* pcb, const VIA* via ) { double x, y, r, hole; LAYER_NUM top_layer, bottom_layer; @@ -827,7 +827,7 @@ static void export_vrml_tracks( MODEL_VRML& aModel, BOARD* pcb ) { if( track->Type() == PCB_VIA_T ) { - export_vrml_via( aModel, pcb, (SEGVIA*) track ); + export_vrml_via( aModel, pcb, (const VIA*) track ); } else if( track->GetLayer() == FIRST_COPPER_LAYER || track->GetLayer() == LAST_COPPER_LAYER ) diff --git a/pcbnew/exporters/gendrill_Excellon_writer.cpp b/pcbnew/exporters/gendrill_Excellon_writer.cpp index 8a3413db1f..a8a086187a 100644 --- a/pcbnew/exporters/gendrill_Excellon_writer.cpp +++ b/pcbnew/exporters/gendrill_Excellon_writer.cpp @@ -458,7 +458,7 @@ void EXCELLON_WRITER::BuildHolesList( int aFirstLayer, if( track->Type() != PCB_VIA_T ) continue; - SEGVIA* via = (SEGVIA*) track; + const VIA* via = (const VIA*) track; hole_value = via->GetDrillValue(); if( hole_value == 0 ) diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index a675d8fcfd..fd7059399a 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -1342,7 +1342,7 @@ void PCB_IO::format( TRACK* aTrack, int aNestLevel ) const { LAYER_NUM layer1, layer2; - SEGVIA* via = (SEGVIA*) aTrack; + const VIA* via = static_cast(aTrack); BOARD* board = (BOARD*) via->GetParent(); wxCHECK_RET( board != 0, wxT( "Via " ) + via->GetSelectMenuText() + @@ -1352,7 +1352,7 @@ void PCB_IO::format( TRACK* aTrack, int aNestLevel ) const via->LayerPair( &layer1, &layer2 ); - switch( aTrack->GetShape() ) + switch( via->GetViaType() ) { case VIA_THROUGH: // Default shape not saved. break; @@ -1366,15 +1366,15 @@ void PCB_IO::format( TRACK* aTrack, int aNestLevel ) const break; default: - THROW_IO_ERROR( wxString::Format( _( "unknown via type %d" ), aTrack->GetShape() ) ); + THROW_IO_ERROR( wxString::Format( _( "unknown via type %d" ), via->GetViaType() ) ); } m_out->Print( 0, " (at %s) (size %s)", FMT_IU( aTrack->GetStart() ).c_str(), FMT_IU( aTrack->GetWidth() ).c_str() ); - if( aTrack->GetDrill() != UNDEFINED_DRILL_DIAMETER ) - m_out->Print( 0, " (drill %s)", FMT_IU( aTrack->GetDrill() ).c_str() ); + if( via->GetDrill() != UNDEFINED_DRILL_DIAMETER ) + m_out->Print( 0, " (drill %s)", FMT_IU( via->GetDrill() ).c_str() ); m_out->Print( 0, " (layers %s %s)", m_out->Quotew( m_board->GetLayerName( layer1 ) ).c_str(), diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index f548c2b997..12e500b023 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -1998,7 +1998,7 @@ void LEGACY_PLUGIN::loadTrackList( int aStructType ) assert( TESTLINE( "Po" ) ); - int shape = intParse( line + SZ( "Po" ), &data ); + VIATYPE_T viatype = static_cast( intParse( line + SZ( "Po" ), &data )); BIU start_x = biuParse( data, &data ); BIU start_y = biuParse( data, &data ); BIU end_x = biuParse( data, &data ); @@ -2059,7 +2059,7 @@ void LEGACY_PLUGIN::loadTrackList( int aStructType ) break; case PCB_VIA_T: - newTrack = new SEGVIA( m_board ); + newTrack = new VIA( m_board ); m_board->m_Track.Append( newTrack ); break; @@ -2075,19 +2075,20 @@ void LEGACY_PLUGIN::loadTrackList( int aStructType ) newTrack->SetEnd( wxPoint( end_x, end_y ) ); newTrack->SetWidth( width ); - newTrack->SetShape( shape ); - - if( drill < 0 ) - newTrack->SetDrillDefault(); - else - newTrack->SetDrill( drill ); - newTrack->SetLayer( layer ); if( makeType == PCB_VIA_T ) // Ensure layers are OK when possible: { - if( newTrack->GetShape() == VIA_THROUGH ) - ( (SEGVIA*) newTrack )->SetLayerPair( LAYER_N_FRONT, LAYER_N_BACK ); + VIA *via = static_cast( newTrack ); + via->SetViaType( viatype ); + + if( drill < 0 ) + via->SetDrillDefault(); + else + via->SetDrill( drill ); + + if( via->GetViaType() == VIA_THROUGH ) + via->SetLayerPair( LAYER_N_FRONT, LAYER_N_BACK ); } newTrack->SetNetCode( net_code ); @@ -3620,17 +3621,24 @@ void LEGACY_PLUGIN::savePCB_LINE( const DRAWSEGMENT* me ) const void LEGACY_PLUGIN::saveTRACK( const TRACK* me ) const { int type = 0; + VIATYPE_T viatype = VIA_NOT_DEFINED; + int drill = UNDEFINED_DRILL_DIAMETER; if( me->Type() == PCB_VIA_T ) + { + const VIA *via = static_cast(me); type = 1; + viatype = via->GetViaType(); + drill = via->GetDrill(); + } fprintf(m_fp, "Po %d %s %s %s %s\n", - me->GetShape(), + viatype, fmtBIUPoint( me->GetStart() ).c_str(), fmtBIUPoint( me->GetEnd() ).c_str(), fmtBIU( me->GetWidth() ).c_str(), - me->GetDrill() == UNDEFINED_DRILL_DIAMETER ? - "-1" : fmtBIU( me->GetDrill() ).c_str() ); + drill == UNDEFINED_DRILL_DIAMETER ? + "-1" : fmtBIU( drill ).c_str() ); fprintf(m_fp, "De %d %d %d %lX %X\n", me->GetLayer(), type, me->GetNetCode(), diff --git a/pcbnew/magnetic_tracks_functions.cpp b/pcbnew/magnetic_tracks_functions.cpp index 5c84d0d6d8..1c901cf760 100644 --- a/pcbnew/magnetic_tracks_functions.cpp +++ b/pcbnew/magnetic_tracks_functions.cpp @@ -193,7 +193,7 @@ bool Magnetize( PCB_EDIT_FRAME* frame, int aCurrentTool, wxSize aGridSize, { LAYER_MSK layer_mask = GetLayerMask( layer ); - TRACK* track = m_Pcb->GetTrace( m_Pcb->m_Track, pos, layer_mask ); + TRACK* track = m_Pcb->GetTrack( m_Pcb->m_Track, pos, layer_mask ); if( !track || track->Type() != PCB_TRACE_T ) { diff --git a/pcbnew/move_or_drag_track.cpp b/pcbnew/move_or_drag_track.cpp index 6525d7abd7..7d108eea4b 100644 --- a/pcbnew/move_or_drag_track.cpp +++ b/pcbnew/move_or_drag_track.cpp @@ -709,7 +709,7 @@ void PCB_EDIT_FRAME::Start_DragTrackSegmentAndKeepSlope( TRACK* track, wxDC* DC s_StartSegmentPresent = s_EndSegmentPresent = true; if( ( track->start == NULL ) || ( track->start->Type() == PCB_TRACE_T ) ) - TrackToStartPoint = track->GetTrace( GetBoard()->m_Track, NULL, FLG_START ); + TrackToStartPoint = track->GetTrack( GetBoard()->m_Track, NULL, FLG_START ); // Test if more than one segment is connected to this point if( TrackToStartPoint ) @@ -717,14 +717,14 @@ void PCB_EDIT_FRAME::Start_DragTrackSegmentAndKeepSlope( TRACK* track, wxDC* DC TrackToStartPoint->SetState( BUSY, true ); if( ( TrackToStartPoint->Type() == PCB_VIA_T ) - || track->GetTrace( GetBoard()->m_Track, NULL, FLG_START ) ) + || track->GetTrack( GetBoard()->m_Track, NULL, FLG_START ) ) error = true; TrackToStartPoint->SetState( BUSY, false ); } if( ( track->end == NULL ) || ( track->end->Type() == PCB_TRACE_T ) ) - TrackToEndPoint = track->GetTrace( GetBoard()->m_Track, NULL, FLG_END ); + TrackToEndPoint = track->GetTrack( GetBoard()->m_Track, NULL, FLG_END ); // Test if more than one segment is connected to this point if( TrackToEndPoint ) @@ -732,7 +732,7 @@ void PCB_EDIT_FRAME::Start_DragTrackSegmentAndKeepSlope( TRACK* track, wxDC* DC TrackToEndPoint->SetState( BUSY, true ); if( (TrackToEndPoint->Type() == PCB_VIA_T) - || track->GetTrace( GetBoard()->m_Track, NULL, FLG_END ) ) + || track->GetTrack( GetBoard()->m_Track, NULL, FLG_END ) ) error = true; TrackToEndPoint->SetState( BUSY, false ); diff --git a/pcbnew/pcad2kicadpcb_plugin/pcb_pad.cpp b/pcbnew/pcad2kicadpcb_plugin/pcb_pad.cpp index 4985958fc9..c1e7c416b2 100644 --- a/pcbnew/pcad2kicadpcb_plugin/pcb_pad.cpp +++ b/pcbnew/pcad2kicadpcb_plugin/pcb_pad.cpp @@ -329,7 +329,7 @@ void PCB_PAD::AddToBoard() if( IsCopperLayer( m_KiCadLayer ) ) { - SEGVIA* via = new SEGVIA( m_board ); + VIA* via = new VIA( m_board ); m_board->m_Track.Append( via ); via->SetTimeStamp( 0 ); @@ -338,8 +338,8 @@ void PCB_PAD::AddToBoard() via->SetEnd( wxPoint( m_positionX, m_positionY ) ); via->SetWidth( height ); - via->SetShape( VIA_THROUGH ); - ( (SEGVIA*) via )->SetLayerPair( LAYER_N_FRONT, LAYER_N_BACK ); + via->SetViaType( VIA_THROUGH ); + via->SetLayerPair( LAYER_N_FRONT, LAYER_N_BACK ); via->SetDrill( m_hole ); via->SetLayer( m_KiCadLayer ); diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index ff5d085939..c2d98603ed 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -210,15 +210,15 @@ bool PCB_PAINTER::Draw( const VIEW_ITEM* aItem, int aLayer ) { case PCB_ZONE_T: case PCB_TRACE_T: - draw( (TRACK*) aItem, aLayer ); + draw( (const TRACK*) aItem, aLayer ); break; case PCB_VIA_T: - draw( (SEGVIA*) aItem, aLayer ); + draw( (const VIA*) aItem, aLayer ); break; case PCB_PAD_T: - draw( (D_PAD*) aItem, aLayer ); + draw( (const D_PAD*) aItem, aLayer ); break; case PCB_LINE_T: @@ -329,7 +329,7 @@ void PCB_PAINTER::draw( const TRACK* aTrack, int aLayer ) } -void PCB_PAINTER::draw( const SEGVIA* aVia, int aLayer ) +void PCB_PAINTER::draw( const VIA* aVia, int aLayer ) { VECTOR2D center( aVia->GetStart() ); double radius; diff --git a/pcbnew/pcb_painter.h b/pcbnew/pcb_painter.h index cf9f242b8c..85b1192936 100644 --- a/pcbnew/pcb_painter.h +++ b/pcbnew/pcb_painter.h @@ -37,7 +37,7 @@ class DISPLAY_OPTIONS; class BOARD_ITEM; class BOARD; -class SEGVIA; +class VIA; class TRACK; class D_PAD; class DRAWSEGMENT; @@ -161,7 +161,7 @@ protected: // Drawing functions for various types of PCB-specific items void draw( const TRACK* aTrack, int aLayer ); - void draw( const SEGVIA* aVia, int aLayer ); + void draw( const VIA* aVia, int aLayer ); void draw( const D_PAD* aPad, int aLayer ); void draw( const DRAWSEGMENT* aSegment ); void draw( const TEXTE_PCB* aText, int aLayer ); diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index 11b4035090..97e073d1d5 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -432,7 +432,7 @@ BOARD* PCB_PARSER::parseBOARD() throw( IO_ERROR, PARSE_ERROR ) break; case T_via: - m_board->Add( parseSEGVIA(), ADD_APPEND ); + m_board->Add( parseVIA(), ADD_APPEND ); break; case T_zone: @@ -2310,15 +2310,15 @@ TRACK* PCB_PARSER::parseTRACK() throw( IO_ERROR, PARSE_ERROR ) } -SEGVIA* PCB_PARSER::parseSEGVIA() throw( IO_ERROR, PARSE_ERROR ) +VIA* PCB_PARSER::parseVIA() throw( IO_ERROR, PARSE_ERROR ) { wxCHECK_MSG( CurTok() == T_via, NULL, - wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as SEGVIA." ) ); + wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as VIA." ) ); wxPoint pt; T token; - std::auto_ptr< SEGVIA > via( new SEGVIA( m_board ) ); + std::auto_ptr< VIA > via( new VIA( m_board ) ); for( token = NextTok(); token != T_RIGHT; token = NextTok() ) { @@ -2328,11 +2328,11 @@ SEGVIA* PCB_PARSER::parseSEGVIA() throw( IO_ERROR, PARSE_ERROR ) switch( token ) { case T_blind: - via->SetShape( VIA_BLIND_BURIED ); + via->SetViaType( VIA_BLIND_BURIED ); break; case T_micro: - via->SetShape( VIA_MICROVIA ); + via->SetViaType( VIA_MICROVIA ); break; case T_at: diff --git a/pcbnew/pcb_parser.h b/pcbnew/pcb_parser.h index 0dfb0bbdc5..eeb4faf9d6 100644 --- a/pcbnew/pcb_parser.h +++ b/pcbnew/pcb_parser.h @@ -49,7 +49,7 @@ class TEXTE_PCB; class TRACK; class MODULE; class PCB_TARGET; -class SEGVIA; +class VIA; class S3D_MASTER; class ZONE_CONTAINER; @@ -101,7 +101,7 @@ class PCB_PARSER : public PCB_LEXER EDGE_MODULE* parseEDGE_MODULE() throw( IO_ERROR, PARSE_ERROR ); D_PAD* parseD_PAD( MODULE* aParent = NULL ) throw( IO_ERROR, PARSE_ERROR ); TRACK* parseTRACK() throw( IO_ERROR, PARSE_ERROR ); - SEGVIA* parseSEGVIA() throw( IO_ERROR, PARSE_ERROR ); + VIA* parseVIA() throw( IO_ERROR, PARSE_ERROR ); ZONE_CONTAINER* parseZONE_CONTAINER() throw( IO_ERROR, PARSE_ERROR ); PCB_TARGET* parsePCB_TARGET() throw( IO_ERROR, PARSE_ERROR ); BOARD* parseBOARD() throw( IO_ERROR, PARSE_ERROR ); diff --git a/pcbnew/plot_board_layers.cpp b/pcbnew/plot_board_layers.cpp index 34d708195b..f299787716 100644 --- a/pcbnew/plot_board_layers.cpp +++ b/pcbnew/plot_board_layers.cpp @@ -357,10 +357,10 @@ void PlotStandardLayer( BOARD *aBoard, PLOTTER* aPlotter, // plot them on solder mask for( TRACK* track = aBoard->m_Track; track; track = track->Next() ) { - if( track->Type() != PCB_VIA_T ) - continue; + const VIA* Via = dynamic_cast( track ); - SEGVIA* Via = (SEGVIA*) track; + if( !Via ) + continue; // vias are not plotted if not on selected layer, but if layer // is SOLDERMASK_LAYER_BACK or SOLDERMASK_LAYER_FRONT,vias are drawn, @@ -396,7 +396,7 @@ void PlotStandardLayer( BOARD *aBoard, PLOTTER* aPlotter, if( diameter <= 0 ) continue; - EDA_COLOR_T color = aBoard->GetVisibleElementColor(VIAS_VISIBLE + Via->GetShape()); + EDA_COLOR_T color = aBoard->GetVisibleElementColor(VIAS_VISIBLE + Via->GetViaType()); // Set plot color (change WHITE to LIGHTGRAY because // the white items are not seen on a white paper or screen aPlotter->SetColor( color != WHITE ? color : LIGHTGRAY); @@ -534,10 +534,10 @@ void PlotSolderMaskLayer( BOARD *aBoard, PLOTTER* aPlotter, int via_margin = via_clearance + inflate; for( TRACK* track = aBoard->m_Track; track; track = track->Next() ) { - if( track->Type() != PCB_VIA_T ) - continue; + const VIA* via = dynamic_cast( track ); - SEGVIA* via = (SEGVIA*) track; + if( !via ) + continue; // vias are plotted only if they are on the corresponding // external copper layer @@ -553,11 +553,11 @@ void PlotSolderMaskLayer( BOARD *aBoard, PLOTTER* aPlotter, continue; via->TransformShapeWithClearanceToPolygon( bufferPolys, via_margin, - circleToSegmentsCount, - correction ); + circleToSegmentsCount, + correction ); via->TransformShapeWithClearanceToPolygon( initialPolys, via_clearance, - circleToSegmentsCount, - correction ); + circleToSegmentsCount, + correction ); } } diff --git a/pcbnew/plot_brditems_plotter.cpp b/pcbnew/plot_brditems_plotter.cpp index aa4dfc3860..1535b3593f 100644 --- a/pcbnew/plot_brditems_plotter.cpp +++ b/pcbnew/plot_brditems_plotter.cpp @@ -685,11 +685,12 @@ void BRDITEMS_PLOTTER::PlotDrillMarks() for( TRACK *pts = m_board->m_Track; pts != NULL; pts = pts->Next() ) { - if( pts->Type() != PCB_VIA_T ) - continue; + const VIA *via = dynamic_cast( pts ); - plotOneDrillMark( PAD_DRILL_CIRCLE, pts->GetStart(), wxSize( pts->GetDrillValue(), 0 ), - wxSize( pts->GetWidth(), 0 ), 0, small_drill ); + if( via ) + plotOneDrillMark( PAD_DRILL_CIRCLE, via->GetStart(), + wxSize( via->GetDrillValue(), 0 ), + wxSize( via->GetWidth(), 0 ), 0, small_drill ); } for( MODULE *Module = m_board->m_Modules; Module != NULL; Module = Module->Next() ) diff --git a/pcbnew/print_board_functions.cpp b/pcbnew/print_board_functions.cpp index f663521417..2683e268b5 100644 --- a/pcbnew/print_board_functions.cpp +++ b/pcbnew/print_board_functions.cpp @@ -249,12 +249,14 @@ void PCB_EDIT_FRAME::PrintPage( wxDC* aDC, if( track->Type() == PCB_VIA_T ) // VIA encountered. { - int radius = track->GetWidth() >> 1; - EDA_COLOR_T color = g_ColorsSettings.GetItemColor( VIAS_VISIBLE + track->GetShape() ); + int radius = track->GetWidth() / 2; + const VIA *via = static_cast( track ); + + EDA_COLOR_T color = g_ColorsSettings.GetItemColor( VIAS_VISIBLE + via->GetViaType() ); GRSetDrawMode( aDC, drawmode ); GRFilledCircle( m_canvas->GetClipBox(), aDC, - track->GetStart().x, - track->GetStart().y, + via->GetStart().x, + via->GetStart().y, radius, 0, color, color ); } @@ -313,11 +315,12 @@ void PCB_EDIT_FRAME::PrintPage( wxDC* aDC, if( track->Type() == PCB_VIA_T ) // VIA encountered. { int diameter; + const VIA *via = static_cast( track ); if( drillShapeOpt == PRINT_PARAMETERS::SMALL_DRILL_SHAPE ) - diameter = std::min( SMALL_DRILL, track->GetDrillValue() ); + diameter = std::min( SMALL_DRILL, via->GetDrillValue() ); else - diameter = track->GetDrillValue(); + diameter = via->GetDrillValue(); GRFilledCircle( m_canvas->GetClipBox(), aDC, track->GetStart().x, track->GetStart().y, diff --git a/pcbnew/ratsnest_data.cpp b/pcbnew/ratsnest_data.cpp index 97f04e29b0..26a0d34bf2 100644 --- a/pcbnew/ratsnest_data.cpp +++ b/pcbnew/ratsnest_data.cpp @@ -393,7 +393,7 @@ void RN_NET::AddItem( const D_PAD* aPad ) } -void RN_NET::AddItem( const SEGVIA* aVia ) +void RN_NET::AddItem( const VIA* aVia ) { m_vias[aVia] = m_links.AddNode( aVia->GetPosition().x, aVia->GetPosition().y ); @@ -482,7 +482,7 @@ void RN_NET::RemoveItem( const D_PAD* aPad ) } -void RN_NET::RemoveItem( const SEGVIA* aVia ) +void RN_NET::RemoveItem( const VIA* aVia ) { try { @@ -686,7 +686,7 @@ std::list RN_NET::GetNodes( const BOARD_CONNECTED_ITEM* aItem ) con case PCB_VIA_T: { - const SEGVIA* via = static_cast( aItem ); + const VIA* via = static_cast( aItem ); nodes.push_back( m_vias.at( via ) ); } break; @@ -877,7 +877,7 @@ void RN_DATA::Add( const BOARD_ITEM* aItem ) break; case PCB_VIA_T: - m_nets[net].AddItem( static_cast( aItem ) ); + m_nets[net].AddItem( static_cast( aItem ) ); break; case PCB_ZONE_AREA_T: @@ -928,7 +928,7 @@ void RN_DATA::Remove( const BOARD_ITEM* aItem ) break; case PCB_VIA_T: - m_nets[net].RemoveItem( static_cast( aItem ) ); + m_nets[net].RemoveItem( static_cast( aItem ) ); break; case PCB_ZONE_AREA_T: @@ -973,7 +973,7 @@ void RN_DATA::ProcessBoard() if( netCode > 0 ) { if( track->Type() == PCB_VIA_T ) - m_nets[netCode].AddItem( static_cast( track ) ); + m_nets[netCode].AddItem( static_cast( track ) ); else if( track->Type() == PCB_TRACE_T ) m_nets[netCode].AddItem( track ); } diff --git a/pcbnew/ratsnest_data.h b/pcbnew/ratsnest_data.h index 712909f2fa..59f3f0e356 100644 --- a/pcbnew/ratsnest_data.h +++ b/pcbnew/ratsnest_data.h @@ -44,7 +44,7 @@ class BOARD_ITEM; class BOARD_CONNECTED_ITEM; class MODULE; class D_PAD; -class SEGVIA; +class VIA; class TRACK; class ZONE_CONTAINER; class CPolyPt; @@ -332,7 +332,7 @@ public: * taken into account during ratsnest computations. * @param aVia is a via for which node is added. */ - void AddItem( const SEGVIA* aVia ); + void AddItem( const VIA* aVia ); /** * Function AddItem() @@ -364,7 +364,7 @@ public: * taken into account during ratsnest computations anymore. * @param aVia is a via for which nodes and edges are removed. */ - void RemoveItem( const SEGVIA* aVia ); + void RemoveItem( const VIA* aVia ); /** * Function RemoveItem() @@ -522,7 +522,7 @@ protected: boost::unordered_map m_pads; ///> Map that associates nodes in the ratsnest model to respective vias. - boost::unordered_map m_vias; + boost::unordered_map m_vias; ///> Map that associates edges in the ratsnest model to respective tracks. boost::unordered_map m_tracks; diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index e3cf287596..5f63911751 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -189,7 +189,7 @@ PNS_ITEM* PNS_ROUTER::syncTrack( TRACK* aTrack ) } -PNS_ITEM* PNS_ROUTER::syncVia( SEGVIA* aVia ) +PNS_ITEM* PNS_ROUTER::syncVia( VIA* aVia ) { PNS_VIA* v = new PNS_VIA( aVia->GetPosition(), @@ -268,7 +268,7 @@ void PNS_ROUTER::SyncWorld() if( type == PCB_TRACE_T ) item = syncTrack( t ); else if( type == PCB_VIA_T ) - item = syncVia( static_cast( t ) ); + item = syncVia( static_cast( t ) ); if( item ) m_world->Add( item ); @@ -618,7 +618,7 @@ void PNS_ROUTER::commitRouting( PNS_NODE* aNode ) case PNS_ITEM::VIA: { - SEGVIA* via_board = new SEGVIA( m_board ); + VIA* via_board = new VIA( m_board ); PNS_VIA* via = static_cast( item ); via_board->SetPosition( wxPoint( via->GetPos().x, via->GetPos().y ) ); via_board->SetWidth( via->GetDiameter() ); diff --git a/pcbnew/router/pns_router.h b/pcbnew/router/pns_router.h index 430f950a37..e5fabbeec2 100644 --- a/pcbnew/router/pns_router.h +++ b/pcbnew/router/pns_router.h @@ -37,7 +37,7 @@ class BOARD; class BOARD_ITEM; class D_PAD; class TRACK; -class SEGVIA; +class VIA; class PNS_NODE; class PNS_LINE_PLACER; class PNS_ITEM; @@ -169,7 +169,7 @@ private: PNS_ITEM* syncPad( D_PAD* aPad ); PNS_ITEM* syncTrack( TRACK* aTrack ); - PNS_ITEM* syncVia( SEGVIA* aVia ); + PNS_ITEM* syncVia( VIA* aVia ); void commitPad( PNS_SOLID* aPad ); void commitSegment( PNS_SEGMENT* aTrack ); diff --git a/pcbnew/specctra.h b/pcbnew/specctra.h index 35572563fa..d2a5104d95 100644 --- a/pcbnew/specctra.h +++ b/pcbnew/specctra.h @@ -40,7 +40,7 @@ class TYPE_COLLECTOR; // outside the DSN namespace class BOARD; class TRACK; -class SEGVIA; +class VIA; class NETCLASS; class MODULE; @@ -3790,12 +3790,12 @@ class SPECCTRA_DB : public SPECCTRA_LEXER /** * Function makeVia - * makes any kind of PADSTACK using the given KiCad SEGVIA. - * @param aVia The SEGVIA to build the padstack from. + * makes any kind of PADSTACK using the given KiCad VIA. + * @param aVia The VIA to build the padstack from. * @return PADSTACK* - The padstack, which is on the heap only, user must save * or delete it. */ - PADSTACK* makeVia( const SEGVIA* aVia ); + PADSTACK* makeVia( const ::VIA* aVia ); /** * Function deleteNETs @@ -3827,10 +3827,10 @@ class SPECCTRA_DB : public SPECCTRA_LEXER /** * Function makeVIA - * instantiates a KiCad SEGVIA on the heap and initializes it with internal + * instantiates a KiCad VIA on the heap and initializes it with internal * values consistent with the given PADSTACK, POINT, and netcode. */ - SEGVIA* makeVIA( PADSTACK* aPadstack, const POINT& aPoint, int aNetCode ) throw( IO_ERROR ); + ::VIA* makeVIA( PADSTACK* aPadstack, const POINT& aPoint, int aNetCode ) throw( IO_ERROR ); //--------------------------------------------------------- diff --git a/pcbnew/specctra_export.cpp b/pcbnew/specctra_export.cpp index 40aa2eeb97..ef452ce66d 100644 --- a/pcbnew/specctra_export.cpp +++ b/pcbnew/specctra_export.cpp @@ -834,7 +834,7 @@ PADSTACK* SPECCTRA_DB::makeVia( int aCopperDiameter, int aDrillDiameter, } -PADSTACK* SPECCTRA_DB::makeVia( const SEGVIA* aVia ) +PADSTACK* SPECCTRA_DB::makeVia( const ::VIA* aVia ) { LAYER_NUM topLayerNum; LAYER_NUM botLayerNum; @@ -1985,7 +1985,7 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IO_ERROR ) for( int i = 0; iType() == PCB_VIA_T ); int netcode = via->GetNetCode(); diff --git a/pcbnew/specctra_import.cpp b/pcbnew/specctra_import.cpp index 417d433bb3..dbe998375c 100644 --- a/pcbnew/specctra_import.cpp +++ b/pcbnew/specctra_import.cpp @@ -214,9 +214,9 @@ TRACK* SPECCTRA_DB::makeTRACK( PATH* aPath, int aPointIndex, int aNetcode ) thro } -SEGVIA* SPECCTRA_DB::makeVIA( PADSTACK* aPadstack, const POINT& aPoint, int aNetCode ) throw( IO_ERROR ) +::VIA* SPECCTRA_DB::makeVIA( PADSTACK* aPadstack, const POINT& aPoint, int aNetCode ) throw( IO_ERROR ) { - SEGVIA* via = 0; + ::VIA* via = 0; SHAPE* shape; int shapeCount = aPadstack->Length(); @@ -261,10 +261,10 @@ SEGVIA* SPECCTRA_DB::makeVIA( PADSTACK* aPadstack, const POINT& aPoint, int aNet CIRCLE* circle = (CIRCLE*) shape->shape; int viaDiam = scale( circle->diameter, routeResolution ); - via = new SEGVIA( sessionBoard ); + via = new ::VIA( sessionBoard ); via->SetPosition( mapPt( aPoint, routeResolution ) ); via->SetDrill( drillDiam ); - via->SetShape( VIA_THROUGH ); + via->SetViaType( VIA_THROUGH ); via->SetWidth( viaDiam ); via->SetLayerPair( LAYER_N_FRONT, LAYER_N_BACK ); } @@ -279,10 +279,10 @@ SEGVIA* SPECCTRA_DB::makeVIA( PADSTACK* aPadstack, const POINT& aPoint, int aNet CIRCLE* circle = (CIRCLE*) shape->shape; int viaDiam = scale( circle->diameter, routeResolution ); - via = new SEGVIA( sessionBoard ); + via = new ::VIA( sessionBoard ); via->SetPosition( mapPt( aPoint, routeResolution ) ); via->SetDrill( drillDiam ); - via->SetShape( VIA_THROUGH ); + via->SetViaType( VIA_THROUGH ); via->SetWidth( viaDiam ); via->SetLayerPair( LAYER_N_FRONT, LAYER_N_BACK ); } @@ -321,15 +321,15 @@ SEGVIA* SPECCTRA_DB::makeVIA( PADSTACK* aPadstack, const POINT& aPoint, int aNet viaDiam = scale( circle->diameter, routeResolution ); } - via = new SEGVIA( sessionBoard ); + via = new ::VIA( sessionBoard ); via->SetPosition( mapPt( aPoint, routeResolution ) ); via->SetDrill( drillDiam ); if( (topLayerNdx==0 && botLayerNdx==1) || (topLayerNdx==copperLayerCount-2 && botLayerNdx==copperLayerCount-1)) - via->SetShape( VIA_MICROVIA ); + via->SetViaType( VIA_MICROVIA ); else - via->SetShape( VIA_BLIND_BURIED ); + via->SetViaType( VIA_BLIND_BURIED ); via->SetWidth( viaDiam ); @@ -546,7 +546,7 @@ void SPECCTRA_DB::FromSESSION( BOARD* aBoard ) throw( IO_ERROR ) for( unsigned v=0; vvertexes.size(); ++v ) { - SEGVIA* via = makeVIA( padstack, wire_via->vertexes[v], netCode ); + ::VIA* via = makeVIA( padstack, wire_via->vertexes[v], netCode ); aBoard->Add( via ); } } diff --git a/pcbnew/swap_layers.cpp b/pcbnew/swap_layers.cpp index 11180b107b..e3bf92bc59 100644 --- a/pcbnew/swap_layers.cpp +++ b/pcbnew/swap_layers.cpp @@ -360,9 +360,9 @@ void PCB_EDIT_FRAME::Swap_Layers( wxCommandEvent& event ) if( pt_segm->Type() == PCB_VIA_T ) { - SEGVIA* Via = (SEGVIA*) pt_segm; + VIA* Via = (VIA*) pt_segm; - if( Via->GetShape() == VIA_THROUGH ) + if( Via->GetViaType() == VIA_THROUGH ) continue; LAYER_NUM top_layer, bottom_layer; diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index fd567a16d1..d5d85b5431 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -459,7 +459,7 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) const { // For vias it is enough if only one of layers is visible LAYER_NUM top, bottom; - static_cast( aItem )->LayerPair( &top, &bottom ); + static_cast( aItem )->LayerPair( &top, &bottom ); return board->IsLayerVisible( top ) || board->IsLayerVisible( bottom ); } diff --git a/pcbnew/tr_modif.cpp b/pcbnew/tr_modif.cpp index 59c0f042fb..2e929fc9a1 100644 --- a/pcbnew/tr_modif.cpp +++ b/pcbnew/tr_modif.cpp @@ -168,7 +168,7 @@ int PCB_EDIT_FRAME::EraseRedundantTrack( wxDC* aDC, /* A segment must be connected to the starting point, otherwise * it is unnecessary to analyze the other point */ - pt_segm = GetTrace( bufStart, bufEnd, start, startmasklayer ); + pt_segm = GetTrack( bufStart, bufEnd, start, startmasklayer ); if( pt_segm == NULL ) // Not connected to the track starting point. { @@ -183,7 +183,7 @@ int PCB_EDIT_FRAME::EraseRedundantTrack( wxDC* aDC, */ for( pt_del = bufStart, nbconnect = 0; ; ) { - pt_segm = GetTrace( pt_del, bufEnd, end, endmasklayer ); + pt_segm = GetTrack( pt_del, bufEnd, end, endmasklayer ); if( pt_segm == NULL ) break; diff --git a/pcbnew/zones_polygons_test_connections.cpp b/pcbnew/zones_polygons_test_connections.cpp index ce9c948c46..b1d69d0455 100644 --- a/pcbnew/zones_polygons_test_connections.cpp +++ b/pcbnew/zones_polygons_test_connections.cpp @@ -175,12 +175,15 @@ void BOARD::Test_Connections_To_Copper_Areas( int aNetcode ) } else if( item->Type() == PCB_VIA_T ) { - pos1 = pos2 = ( (SEGVIA*) item )->GetStart(); + const VIA *via = static_cast( item ); + pos1 = via->GetStart(); + pos2 = pos1; } else if( item->Type() == PCB_TRACE_T ) { - pos1 = ( (TRACK*) item )->GetStart(); - pos2 = ( (TRACK*) item )->GetEnd(); + const TRACK *trk = static_cast( item ); + pos1 = trk->GetStart(); + pos2 = trk->GetEnd(); } else { From c0879414a552a8c9c2909d4c9672b040ec41e7a1 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Fri, 25 Apr 2014 01:43:14 -0500 Subject: [PATCH 320/741] SEGVIA -> VIA for swig --- pcbnew/scripting/board_item.i | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/pcbnew/scripting/board_item.i b/pcbnew/scripting/board_item.i index 37e3ed1f83..1671c10da2 100644 --- a/pcbnew/scripting/board_item.i +++ b/pcbnew/scripting/board_item.i @@ -36,28 +36,27 @@ } %extend BOARD_ITEM -{ - TEXTE_PCB* Cast_to_TEXTE_PCB() { return dynamic_cast(self); } - DIMENSION* Cast_to_DIMENSION() { return dynamic_cast(self); } - MODULE* Cast_to_MODULE() { return dynamic_cast(self); } - TEXTE_MODULE* Cast_to_TEXTE_MODULE(){ return dynamic_cast(self); } - DRAWSEGMENT* Cast_to_DRAWSEGMENT() { return dynamic_cast(self); } - MARKER_PCB* Cast_to_MARKER_PCB() { return dynamic_cast(self); } - BOARD* Cast_to_BOARD() { return dynamic_cast(self); } - EDGE_MODULE* Cast_to_EDGE_MODULE() { return dynamic_cast(self); } - D_PAD* Cast_to_D_PAD() { return dynamic_cast(self); } - TRACK* Cast_to_TRACK() { return dynamic_cast(self); } +{ + TEXTE_PCB* Cast_to_TEXTE_PCB() { return dynamic_cast(self); } + DIMENSION* Cast_to_DIMENSION() { return dynamic_cast(self); } + MODULE* Cast_to_MODULE() { return dynamic_cast(self); } + TEXTE_MODULE* Cast_to_TEXTE_MODULE() { return dynamic_cast(self); } + DRAWSEGMENT* Cast_to_DRAWSEGMENT() { return dynamic_cast(self); } + MARKER_PCB* Cast_to_MARKER_PCB() { return dynamic_cast(self); } + BOARD* Cast_to_BOARD() { return dynamic_cast(self); } + EDGE_MODULE* Cast_to_EDGE_MODULE() { return dynamic_cast(self); } + D_PAD* Cast_to_D_PAD() { return dynamic_cast(self); } + TRACK* Cast_to_TRACK() { return dynamic_cast(self); } SEGZONE* Cast_to_SEGZONE() { return dynamic_cast(self); } - SEGVIA* Cast_to_SEGVIA() { return dynamic_cast(self); } - + VIA* Cast_to_VIA() { return dynamic_cast(self); } %pythoncode { def Cast(self): - + ct = self.GetClass() - + if ct=="PTEXT": return self.Cast_to_TEXTE_PCB() elif ct=="BOARD": @@ -77,7 +76,7 @@ elif ct=="ZONE": return self.Cast_to_SEGZONE() elif ct=="VIA": - return self.Cast_to_SEGVIA() + return self.Cast_to_VIA() elif ct=="TRACK": return self.Cast_to_TRACK() else: From 948f22de6dd6fda8f3ca663155abcf2f1d3ae8c0 Mon Sep 17 00:00:00 2001 From: Lorenzo Marcantonio Date: Fri, 25 Apr 2014 10:03:50 +0200 Subject: [PATCH 321/741] Removed the ugly bit stuffing for the bottom via layer number (just replaced it with a member) --- pcbnew/class_track.cpp | 20 ++++++++++---------- pcbnew/class_track.h | 12 ++++++------ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index 48a665927d..d1564f0066 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -179,6 +179,7 @@ VIA::VIA( BOARD_ITEM* aParent ) : TRACK( aParent, PCB_VIA_T ) { SetViaType( VIA_THROUGH ); + m_BottomLayer = LAYER_N_BACK; m_Width = Millimeter2iu( 0.5 ); SetDrillDefault(); } @@ -432,19 +433,19 @@ LAYER_MSK TRACK::GetLayerMask() const } -void VIA::SetLayerPair( LAYER_NUM top_layer, LAYER_NUM bottom_layer ) +void VIA::SetLayerPair( LAYER_NUM aTopLayer, LAYER_NUM aBottomLayer ) { if( GetViaType() == VIA_THROUGH ) { - top_layer = LAYER_N_FRONT; - bottom_layer = LAYER_N_BACK; + aTopLayer = LAYER_N_FRONT; + aBottomLayer = LAYER_N_BACK; } - if( bottom_layer > top_layer ) - EXCHG( bottom_layer, top_layer ); + if( aBottomLayer > aTopLayer ) + EXCHG( aBottomLayer, aTopLayer ); - // XXX EVIL usage of LAYER - m_Layer = (top_layer & 15) + ( (bottom_layer & 15) << 4 ); + m_Layer = aTopLayer; + m_BottomLayer = aBottomLayer; } @@ -455,9 +456,8 @@ void VIA::LayerPair( LAYER_NUM* top_layer, LAYER_NUM* bottom_layer ) const if( GetViaType() != VIA_THROUGH ) { - // XXX EVIL usage of LAYER - b_layer = (m_Layer >> 4) & 15; - t_layer = m_Layer & 15; + b_layer = m_BottomLayer; + t_layer = m_Layer; if( b_layer > t_layer ) EXCHG( b_layer, t_layer ); diff --git a/pcbnew/class_track.h b/pcbnew/class_track.h index 8b727dde17..34b651094a 100644 --- a/pcbnew/class_track.h +++ b/pcbnew/class_track.h @@ -371,15 +371,12 @@ public: /** * Function SetLayerPair - * set the .m_Layer member param: - * For a via m_Layer contains the 2 layers : - * top layer and bottom layer used by the via. - * The via connect all layers from top layer to bottom layer - * 4 bits for the first layer and 4 next bits for the second layer + * For a via m_Layer contains the top layer, the other layer is in + * m_BottomLayer * @param top_layer = first layer connected by the via * @param bottom_layer = last layer connected by the via */ - void SetLayerPair( LAYER_NUM top_layer, LAYER_NUM bottom_layer ); + void SetLayerPair( LAYER_NUM aTopLayer, LAYER_NUM aBottomLayer ); /** * Function LayerPair @@ -453,6 +450,9 @@ protected: virtual void GetMsgPanelInfoBase( std::vector< MSG_PANEL_ITEM >& aList ); private: + /// The bottom layer of the via (the top layer is in m_Layer) + LAYER_NUM m_BottomLayer; + VIATYPE_T m_ViaType; // Type of via int m_Drill; // for vias: via drill (- 1 for default value) From 802a59dc521e6d34e3dfbc6b031307aec7add266 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 25 Apr 2014 18:49:32 +0200 Subject: [PATCH 322/741] eeschema: fix the very minor bug #1298094. But it was due to a bad bounding box calculation, which is now fixed. --- common/eda_text.cpp | 13 +------------ eeschema/sch_field.cpp | 33 ++++----------------------------- 2 files changed, 5 insertions(+), 41 deletions(-) diff --git a/common/eda_text.cpp b/common/eda_text.cpp index 97da020d55..1c253819ba 100644 --- a/common/eda_text.cpp +++ b/common/eda_text.cpp @@ -32,14 +32,6 @@ #include // RotatePoint #include // EDA_DRAW_PANEL -// until bzr rev 4476, Y position of vertical justification -// of multiline texts was incorrectly calculated for BOTTOM -// and CENTER vertical justification. (Only the first line was justified) -// If this line is left uncommented, the bug is fixed, but -// creates a (very minor) issue for existing texts, mainly in Pcbnew -// because the text position is sometimes critical. -#define FIX_MULTILINE_VERT_JUSTIF - // Conversion to application internal units defined at build time. #if defined( PCBNEW ) #include @@ -205,7 +197,6 @@ EDA_RECT EDA_TEXT::GetTextBox( int aLine, int aThickness, bool aInvertY ) const if( linecount > 1 ) { -#ifdef FIX_MULTILINE_VERT_JUSTIF int yoffset; linecount -= 1; @@ -224,7 +215,6 @@ EDA_RECT EDA_TEXT::GetTextBox( int aLine, int aThickness, bool aInvertY ) const rect.SetY( rect.GetY() - yoffset ); break; } -#endif } rect.Inflate( thickness / 2 ); @@ -305,7 +295,6 @@ void EDA_TEXT::GetPositionsOfLinesOfMultilineText( offset.y = GetInterline(); -#ifdef FIX_MULTILINE_VERT_JUSTIF if( aLineCount > 1 ) { switch( m_VJustify ) @@ -326,7 +315,7 @@ void EDA_TEXT::GetPositionsOfLinesOfMultilineText( // Rotate the position of the first line // around the center of the multiline text block RotatePoint( &pos, m_Pos, m_Orient ); -#endif + // Rotate the offset lines to increase happened in the right direction RotatePoint( &offset, m_Orient ); diff --git a/eeschema/sch_field.cpp b/eeschema/sch_field.cpp index 942bf820e8..3eb8462e9f 100644 --- a/eeschema/sch_field.cpp +++ b/eeschema/sch_field.cpp @@ -35,19 +35,6 @@ * They can be renamed and can appear in reports */ -/* set USE_TEXT_JUSTIFY_INITIAL_BEHAVIOR to 0 to use - * a justification relative to the text itself - * i.e. justification relative to an horizontal text - * or to 1 to keep the initial Eeschema behavior - * The initial behavior is: - * For vertical texts, exchange the horizontal and the vertical justification - * The idea is to keep the justification always left or top for instance, - * no matter the text orientation - * This is a bit tricky when you want to change a text field justification - * when the fiels and the component are both rotated 90.0 degrees - */ -#define USE_TEXT_JUSTIFY_INITIAL_BEHAVIOR 0 - #include #include #include @@ -206,7 +193,7 @@ void SCH_FIELD::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, textpos = m_Pos - origin; textpos = parentComponent->GetScreenCoord( textpos ); textpos += parentComponent->GetPosition(); - GRLine( clipbox, DC, origin.x, origin.y, textpos.x, textpos.y, 2, DARKGRAY ); + GRLine( clipbox, DC, origin, textpos, 2, DARKGRAY ); } /* Enable this to draw the bounding box around the text field to validate @@ -281,26 +268,14 @@ const EDA_RECT SCH_FIELD::GetBoundingBox() const // Calculate the text bounding box: EDA_RECT rect; - // set USE_TEXT_JUSTIFY_INITIAL_BEHAVIOR to 0 to use - // a justification relative to the text itself - // i.e. justification relative to an horizontal text - // or to 1 to keep the initial behavior -#if (USE_TEXT_JUSTIFY_INITIAL_BEHAVIOR == 1 ) - if( m_Orient == TEXT_ORIENT_VERT ) + if( m_id == REFERENCE ) // multi units have one letter or more added to reference { - // For vertical texts, exchange the horizontal and the vertical justification - // The idea is to keep the justification always left or top for instance, - // no matter the text orientation - SCH_FIELD text( *this ); // Make a local copy to swap justifications + SCH_FIELD text( *this ); // Make a local copy to change text // because GetBoundingBox() is const - int tmp = (int)text.m_VJustify; - NEGATE( tmp ); - text.m_VJustify = (EDA_TEXT_VJUSTIFY_T)text.m_HJustify; - text.m_HJustify = (EDA_TEXT_HJUSTIFY_T)tmp; + text.SetText( GetFullyQualifiedText() ); rect = text.GetTextBox( -1, linewidth ); } else -#endif rect = GetTextBox( -1, linewidth ); // Calculate the bounding box position relative to the component: From c2af94ac03c7dd7291fa05cf7f4f6b3ef53d705d Mon Sep 17 00:00:00 2001 From: Lorenzo Marcantonio Date: Fri, 25 Apr 2014 19:13:33 +0200 Subject: [PATCH 323/741] Reworked the endpoint designator constants FLG_BEGIN and FLG_END in a ENDPOINT_T enum type --- pcbnew/autorouter/solve.cpp | 6 ++++-- pcbnew/class_board.cpp | 15 +++------------ pcbnew/class_board.h | 2 +- pcbnew/class_track.cpp | 11 +++-------- pcbnew/class_track.h | 13 ++++++++++++- pcbnew/clean.cpp | 30 +++++++++++++++--------------- pcbnew/editrack.cpp | 4 ++-- pcbnew/move_or_drag_track.cpp | 8 ++++---- pcbnew/pcbnew.h | 8 +++++--- 9 files changed, 49 insertions(+), 48 deletions(-) diff --git a/pcbnew/autorouter/solve.cpp b/pcbnew/autorouter/solve.cpp index 5e94db6b09..8ddf52f040 100644 --- a/pcbnew/autorouter/solve.cpp +++ b/pcbnew/autorouter/solve.cpp @@ -1300,12 +1300,14 @@ static void AddNewTrace( PCB_EDIT_FRAME* pcbframe, wxDC* DC ) g_CurrentTrackList.PushBack( newTrack ); } - g_FirstTrackSegment->start = pcbframe->GetBoard()->GetPad( g_FirstTrackSegment, FLG_START ); + g_FirstTrackSegment->start = pcbframe->GetBoard()->GetPad( g_FirstTrackSegment, + ENDPOINT_START ); if( g_FirstTrackSegment->start ) g_FirstTrackSegment->SetState( BEGIN_ONPAD, true ); - g_CurrentTrackSegment->end = pcbframe->GetBoard()->GetPad( g_CurrentTrackSegment, FLG_END ); + g_CurrentTrackSegment->end = pcbframe->GetBoard()->GetPad( g_CurrentTrackSegment, + ENDPOINT_END ); if( g_CurrentTrackSegment->end ) g_CurrentTrackSegment->SetState( END_ONPAD, true ); diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index 6109e60945..2960e9e315 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -1598,22 +1598,13 @@ D_PAD* BOARD::GetPad( const wxPoint& aPosition, LAYER_MSK aLayerMask ) } -D_PAD* BOARD::GetPad( TRACK* aTrace, int aEndPoint ) +D_PAD* BOARD::GetPad( TRACK* aTrace, ENDPOINT_T aEndPoint ) { D_PAD* pad = NULL; - wxPoint aPosition; + const wxPoint &aPosition = aTrace->GetEndPoint( aEndPoint ); LAYER_MSK aLayerMask = GetLayerMask( aTrace->GetLayer() ); - if( aEndPoint == FLG_START ) - { - aPosition = aTrace->GetStart(); - } - else - { - aPosition = aTrace->GetEnd(); - } - for( MODULE* module = m_Modules; module; module = module->Next() ) { pad = module->GetPad( aPosition, aLayerMask ); @@ -2195,7 +2186,7 @@ TRACK* BOARD::CreateLockPoint( wxPoint& aPosition, TRACK* aSegment, PICKED_ITEMS aSegment->end = newTrack; aSegment->SetState( END_ONPAD, false ); - D_PAD * pad = GetPad( newTrack, FLG_START ); + D_PAD * pad = GetPad( newTrack, ENDPOINT_START ); if ( pad ) { diff --git a/pcbnew/class_board.h b/pcbnew/class_board.h index d899096819..516d09ca1f 100644 --- a/pcbnew/class_board.h +++ b/pcbnew/class_board.h @@ -1392,7 +1392,7 @@ public: * @param aEndPoint The end point of \a aTrace the hit test against. * @return A pointer to a D_PAD object if found or NULL if not found. */ - D_PAD* GetPad( TRACK* aTrace, int aEndPoint ); + D_PAD* GetPad( TRACK* aTrace, ENDPOINT_T aEndPoint ); /** * Function GetPadFast diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index d1564f0066..abf4d7a732 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -70,7 +70,7 @@ static bool ShowClearance( const TRACK* aTrack ) * return true if the dist between p1 and p2 < max_dist * Currently in test (currently ratsnest algos work only if p1 == p2) */ -inline bool IsNear( wxPoint& p1, wxPoint& p2, int max_dist ) +inline bool IsNear( const wxPoint& p1, const wxPoint& p2, int max_dist ) { #if 0 // Do not change it: does not work int dist; @@ -1320,21 +1320,16 @@ VIA* TRACK::GetVia( TRACK* aEndTrace, const wxPoint& aPosition, LAYER_MSK aLayer } -TRACK* TRACK::GetTrack( TRACK* aStartTrace, TRACK* aEndTrace, int aEndPoint ) +TRACK* TRACK::GetTrack( TRACK* aStartTrace, TRACK* aEndTrace, ENDPOINT_T aEndPoint ) { const int NEIGHTBOUR_COUNT_MAX = 50; TRACK* previousSegment; TRACK* nextSegment; int Reflayer; - wxPoint position; int ii; int max_dist; - - if( aEndPoint == FLG_START ) - position = m_Start; - else - position = m_End; + const wxPoint &position = GetEndPoint( aEndPoint ); Reflayer = GetLayerMask(); diff --git a/pcbnew/class_track.h b/pcbnew/class_track.h index 34b651094a..63c9026967 100644 --- a/pcbnew/class_track.h +++ b/pcbnew/class_track.h @@ -31,6 +31,7 @@ #define CLASS_TRACK_H +#include #include #include #include @@ -124,6 +125,16 @@ public: void SetStart( const wxPoint& aStart ) { m_Start = aStart; } const wxPoint& GetStart() const { return m_Start; } + + /// Return the selected endpoint (start or end) + const wxPoint& GetEndPoint( ENDPOINT_T aEndPoint ) const + { + if( aEndPoint == ENDPOINT_START ) + return m_Start; + else + return m_End; + } + // Virtual function const EDA_RECT GetBoundingBox() const; @@ -252,7 +263,7 @@ public: * @param aEndPoint The start or end point of the segment to test against. * @return A TRACK object pointer if found otherwise NULL. */ - TRACK* GetTrack( TRACK* aStartTrace, TRACK* aEndTrace, int aEndPoint ); + TRACK* GetTrack( TRACK* aStartTrace, TRACK* aEndTrace, ENDPOINT_T aEndPoint ); /** * Function GetEndSegments diff --git a/pcbnew/clean.cpp b/pcbnew/clean.cpp index 443394157d..9bf5a83c95 100644 --- a/pcbnew/clean.cpp +++ b/pcbnew/clean.cpp @@ -86,7 +86,7 @@ private: * i.e. when they are colinear, same width, and obviously same layer */ TRACK* mergeCollinearSegmentIfPossible( TRACK* aTrackRef, - TRACK* aCandidate, int aEndType ); + TRACK* aCandidate, ENDPOINT_T aEndType ); }; /* Install the cleanup dialog frame to know what should be cleaned @@ -304,7 +304,7 @@ bool TRACKS_CLEANER::deleteUnconnectedTracks() if( (type_end & START_ON_PAD ) == 0 ) { - TRACK* other = track->GetTrack( m_Brd->m_Track, NULL, FLG_START ); + TRACK* other = track->GetTrack( m_Brd->m_Track, NULL, ENDPOINT_START ); if( other == NULL ) // Test a connection to zones { @@ -341,7 +341,7 @@ bool TRACKS_CLEANER::deleteUnconnectedTracks() track->SetState( BUSY, true ); VIA* via = (VIA*) other; - other = via->GetTrack( m_Brd->m_Track, NULL, FLG_START ); + other = via->GetTrack( m_Brd->m_Track, NULL, ENDPOINT_START ); if( other == NULL ) { @@ -364,7 +364,7 @@ bool TRACKS_CLEANER::deleteUnconnectedTracks() // test if this track end point is connected to an other track if( (type_end & END_ON_PAD ) == 0 ) { - TRACK* other = track->GetTrack( m_Brd->m_Track, NULL, FLG_END ); + TRACK* other = track->GetTrack( m_Brd->m_Track, NULL, ENDPOINT_END ); if( other == NULL ) // Test a connection to zones { @@ -402,7 +402,7 @@ bool TRACKS_CLEANER::deleteUnconnectedTracks() track->SetState( BUSY, true ); VIA* via = (VIA*) other; - other = via->GetTrack( m_Brd->m_Track, NULL, FLG_END ); + other = via->GetTrack( m_Brd->m_Track, NULL, ENDPOINT_END ); if( other == NULL ) { @@ -508,7 +508,7 @@ bool TRACKS_CLEANER::clean_segments() // search for a possible point connected to the START point of the current segment for( segStart = segment->Next(); ; ) { - segStart = segment->GetTrack( segStart, NULL, FLG_START ); + segStart = segment->GetTrack( segStart, NULL, ENDPOINT_START ); if( segStart ) { @@ -522,7 +522,7 @@ bool TRACKS_CLEANER::clean_segments() // We must have only one segment connected segStart->SetState( BUSY, true ); - other = segment->GetTrack( m_Brd->m_Track, NULL, FLG_START ); + other = segment->GetTrack( m_Brd->m_Track, NULL, ENDPOINT_START ); segStart->SetState( BUSY, false ); if( other == NULL ) @@ -535,7 +535,7 @@ bool TRACKS_CLEANER::clean_segments() if( flag ) // We have the starting point of the segment is connected to an other segment { - segDelete = mergeCollinearSegmentIfPossible( segment, segStart, FLG_START ); + segDelete = mergeCollinearSegmentIfPossible( segment, segStart, ENDPOINT_START ); if( segDelete ) { @@ -548,7 +548,7 @@ bool TRACKS_CLEANER::clean_segments() // search for a possible point connected to the END point of the current segment: for( segEnd = segment->Next(); ; ) { - segEnd = segment->GetTrack( segEnd, NULL, FLG_END ); + segEnd = segment->GetTrack( segEnd, NULL, ENDPOINT_END ); if( segEnd ) { @@ -560,7 +560,7 @@ bool TRACKS_CLEANER::clean_segments() // We must have only one segment connected segEnd->SetState( BUSY, true ); - other = segment->GetTrack( m_Brd->m_Track, NULL, FLG_END ); + other = segment->GetTrack( m_Brd->m_Track, NULL, ENDPOINT_END ); segEnd->SetState( BUSY, false ); if( other == NULL ) @@ -576,7 +576,7 @@ bool TRACKS_CLEANER::clean_segments() if( flag & 2 ) // We have the ending point of the segment is connected to an other segment { - segDelete = mergeCollinearSegmentIfPossible( segment, segEnd, FLG_END ); + segDelete = mergeCollinearSegmentIfPossible( segment, segEnd, ENDPOINT_END ); if( segDelete ) { @@ -607,7 +607,7 @@ bool TRACKS_CLEANER::clean_segments() * else return NULL */ TRACK* TRACKS_CLEANER::mergeCollinearSegmentIfPossible( TRACK* aTrackRef, TRACK* aCandidate, - int aEndType ) + ENDPOINT_T aEndType ) { if( aTrackRef->GetWidth() != aCandidate->GetWidth() ) return NULL; @@ -667,7 +667,7 @@ TRACK* TRACKS_CLEANER::mergeCollinearSegmentIfPossible( TRACK* aTrackRef, TRACK* * (this function) is called when there is only 2 connected segments, *and if this point is not on a pad, it can be removed and the 2 segments will be merged */ - if( aEndType == FLG_START ) + if( aEndType == ENDPOINT_START ) { // We do not have a pad, which is a always terminal point for a track if( aTrackRef->GetState( START_ON_PAD) ) @@ -744,7 +744,7 @@ bool PCB_EDIT_FRAME::RemoveMisConnectedTracks() } else { - other = segment->GetTrack( GetBoard()->m_Track, NULL, FLG_START ); + other = segment->GetTrack( GetBoard()->m_Track, NULL, ENDPOINT_START ); if( other ) net_code_s = other->GetNetCode(); @@ -762,7 +762,7 @@ bool PCB_EDIT_FRAME::RemoveMisConnectedTracks() } else { - other = segment->GetTrack( GetBoard()->m_Track, NULL, FLG_END ); + other = segment->GetTrack( GetBoard()->m_Track, NULL, ENDPOINT_END ); if( other ) net_code_e = other->GetNetCode(); diff --git a/pcbnew/editrack.cpp b/pcbnew/editrack.cpp index 41cc2d7e30..683b7d41d7 100644 --- a/pcbnew/editrack.cpp +++ b/pcbnew/editrack.cpp @@ -266,7 +266,7 @@ TRACK* PCB_EDIT_FRAME::Begin_Route( TRACK* aTrack, wxDC* aDC ) newTrack->SetState( BEGIN_ONPAD | END_ONPAD, false ); - D_PAD* pad = GetBoard()->GetPad( previousTrack, FLG_END ); + D_PAD* pad = GetBoard()->GetPad( previousTrack, ENDPOINT_END ); if( pad ) { @@ -1057,7 +1057,7 @@ void DeleteNullTrackSegments( BOARD* pcb, DLIST& aTrackList ) while( track != NULL ) { TRACK* next_track = track->Next(); - LockPoint = pcb->GetPad( track, FLG_END ); + LockPoint = pcb->GetPad( track, ENDPOINT_END ); if( LockPoint ) { diff --git a/pcbnew/move_or_drag_track.cpp b/pcbnew/move_or_drag_track.cpp index 7d108eea4b..6631ce31dc 100644 --- a/pcbnew/move_or_drag_track.cpp +++ b/pcbnew/move_or_drag_track.cpp @@ -709,7 +709,7 @@ void PCB_EDIT_FRAME::Start_DragTrackSegmentAndKeepSlope( TRACK* track, wxDC* DC s_StartSegmentPresent = s_EndSegmentPresent = true; if( ( track->start == NULL ) || ( track->start->Type() == PCB_TRACE_T ) ) - TrackToStartPoint = track->GetTrack( GetBoard()->m_Track, NULL, FLG_START ); + TrackToStartPoint = track->GetTrack( GetBoard()->m_Track, NULL, ENDPOINT_START ); // Test if more than one segment is connected to this point if( TrackToStartPoint ) @@ -717,14 +717,14 @@ void PCB_EDIT_FRAME::Start_DragTrackSegmentAndKeepSlope( TRACK* track, wxDC* DC TrackToStartPoint->SetState( BUSY, true ); if( ( TrackToStartPoint->Type() == PCB_VIA_T ) - || track->GetTrack( GetBoard()->m_Track, NULL, FLG_START ) ) + || track->GetTrack( GetBoard()->m_Track, NULL, ENDPOINT_START ) ) error = true; TrackToStartPoint->SetState( BUSY, false ); } if( ( track->end == NULL ) || ( track->end->Type() == PCB_TRACE_T ) ) - TrackToEndPoint = track->GetTrack( GetBoard()->m_Track, NULL, FLG_END ); + TrackToEndPoint = track->GetTrack( GetBoard()->m_Track, NULL, ENDPOINT_END ); // Test if more than one segment is connected to this point if( TrackToEndPoint ) @@ -732,7 +732,7 @@ void PCB_EDIT_FRAME::Start_DragTrackSegmentAndKeepSlope( TRACK* track, wxDC* DC TrackToEndPoint->SetState( BUSY, true ); if( (TrackToEndPoint->Type() == PCB_VIA_T) - || track->GetTrack( GetBoard()->m_Track, NULL, FLG_END ) ) + || track->GetTrack( GetBoard()->m_Track, NULL, ENDPOINT_END ) ) error = true; TrackToEndPoint->SetState( BUSY, false ); diff --git a/pcbnew/pcbnew.h b/pcbnew/pcbnew.h index 25df567ebb..d2c6427ea6 100644 --- a/pcbnew/pcbnew.h +++ b/pcbnew/pcbnew.h @@ -25,9 +25,11 @@ #define MATCH_LAYER (1 << 2) ///< if module not on current layer, do not select #define VISIBLE_ONLY (1 << 3) ///< if module not on a visible layer, do not select - -#define FLG_START 0 // Flag used in locate routines -#define FLG_END 1 // Flag used in locate routines +/// Flag used in locate routines (from which endpoint work) +enum ENDPOINT_T { + ENDPOINT_START = 0, + ENDPOINT_END = 1 +}; #define DIM_ANCRE_MODULE 3 // Anchor size (footprint center) From 29c8ec422079a32b0cb5cda8f6b1d5a2cc7b499c Mon Sep 17 00:00:00 2001 From: Lorenzo Marcantonio Date: Sat, 26 Apr 2014 13:23:00 +0200 Subject: [PATCH 324/741] Fixed bug in via cleanup control flow --- pcbnew/clean.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pcbnew/clean.cpp b/pcbnew/clean.cpp index 9bf5a83c95..4bcfb5127e 100644 --- a/pcbnew/clean.cpp +++ b/pcbnew/clean.cpp @@ -208,6 +208,8 @@ bool TRACKS_CLEANER::clean_vias() if( via->GetViaType() != VIA_THROUGH ) continue; } + else + continue; // Search and delete others vias at same location TRACK* alt_track = track->Next(); @@ -219,7 +221,6 @@ bool TRACKS_CLEANER::clean_vias() VIA *alt_via = dynamic_cast( alt_track ); if( alt_via ) { - if( alt_via->GetViaType() != VIA_THROUGH ) continue; From 834699accb56580d76a7b61f1ec603a6c8a4394a Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sun, 27 Apr 2014 13:30:45 +0200 Subject: [PATCH 325/741] Pcbnew: fix bug #1313076 (Filled Zones on technical layers) does not show up on 3D rendering --- 3d-viewer/3d_draw.cpp | 41 ++++++++++++++++++------------ CMakeModules/download_avhttp.cmake | 8 +++++- 2 files changed, 32 insertions(+), 17 deletions(-) diff --git a/3d-viewer/3d_draw.cpp b/3d-viewer/3d_draw.cpp index 3216947b8e..0a703179fa 100644 --- a/3d-viewer/3d_draw.cpp +++ b/3d-viewer/3d_draw.cpp @@ -257,8 +257,8 @@ void EDA_3D_CANVAS::BuildBoard3DView() // Build a polygon from edge cut items wxString msg; - if( ! pcb->GetBoardPolygonOutlines( bufferPcbOutlines, - allLayerHoles, &msg ) ) + + if( !pcb->GetBoardPolygonOutlines( bufferPcbOutlines, allLayerHoles, &msg ) ) { msg << wxT("\n\n") << _("Unable to calculate the board outlines.\n" @@ -432,7 +432,7 @@ void EDA_3D_CANVAS::BuildBoard3DView() } // Draw vias holes (vertical cylinders) - for( TRACK* track = pcb->m_Track; track != NULL; track = track->Next() ) + for( const TRACK* track = pcb->m_Track; track != NULL; track = track->Next() ) { const VIA *via = dynamic_cast(track); @@ -441,7 +441,7 @@ void EDA_3D_CANVAS::BuildBoard3DView() } // Draw pads holes (vertical cylinders) - for( MODULE* module = pcb->m_Modules; module != NULL; module = module->Next() ) + for( const MODULE* module = pcb->m_Modules; module != NULL; module = module->Next() ) { for( D_PAD* pad = module->Pads(); pad != NULL; pad = pad->Next() ) Draw3DPadHole( pad ); @@ -508,6 +508,7 @@ void EDA_3D_CANVAS::BuildTechLayers3DView() // to reduce time calculations // for holes and items which do not need // a fine representation + double correctionFactorLQ = 1.0 / cos( M_PI / (segcountLowQuality * 2) ); CPOLYGONS_LIST bufferPolys; bufferPolys.reserve( 100000 ); // Reserve for large board @@ -517,8 +518,8 @@ void EDA_3D_CANVAS::BuildTechLayers3DView() CPOLYGONS_LIST bufferPcbOutlines; // stores the board main outlines // Build a polygon from edge cut items wxString msg; - if( ! pcb->GetBoardPolygonOutlines( bufferPcbOutlines, - allLayerHoles, &msg ) ) + + if( !pcb->GetBoardPolygonOutlines( bufferPcbOutlines, allLayerHoles, &msg ) ) { msg << wxT("\n\n") << _("Unable to calculate the board outlines.\n" @@ -610,22 +611,30 @@ void EDA_3D_CANVAS::BuildTechLayers3DView() continue; BuildPadShapeThickOutlineAsPolygon( pad, bufferPolys, - linewidth, - segcountforcircle, correctionFactor ); + linewidth, segcountforcircle, correctionFactor ); } } else module->TransformPadsShapesWithClearanceToPolygon( layer, - bufferPolys, - 0, - segcountforcircle, - correctionFactor ); + bufferPolys, 0, segcountforcircle, correctionFactor ); module->TransformGraphicShapesWithClearanceToPolygonSet( layer, - bufferPolys, - 0, - segcountforcircle, - correctionFactor ); + bufferPolys, 0, segcountforcircle, correctionFactor ); + } + + // Draw non copper zones + if( g_Parm_3D_Visu.GetFlag( FL_ZONE ) ) + { + for( int ii = 0; ii < pcb->GetAreaCount(); ii++ ) + { + ZONE_CONTAINER* zone = pcb->GetArea( ii ); + + if( !zone->IsOnLayer( layer ) ) + continue; + + zone->TransformSolidAreasShapesToPolygonSet( + bufferPolys, segcountLowQuality, correctionFactorLQ ); + } } // bufferPolys contains polygons to merge. Many overlaps . diff --git a/CMakeModules/download_avhttp.cmake b/CMakeModules/download_avhttp.cmake index 6fa9f423b4..abc52b7e89 100644 --- a/CMakeModules/download_avhttp.cmake +++ b/CMakeModules/download_avhttp.cmake @@ -38,6 +38,12 @@ # Where the library is to be installed. set( PREFIX ${DOWNLOAD_DIR}/avhttp ) +if( KICAD_SKIP_BOOST ) + set( AVHTTP_DEPEND "" ) +else() + set( AVHTTP_DEPEND "boost" ) +endif() + # Install the AVHTTP header only library ${PREFIX} ExternalProject_Add( avhttp @@ -46,7 +52,7 @@ ExternalProject_Add( avhttp # grab it from a local zip file for now, cmake caller's source dir URL ${CMAKE_CURRENT_SOURCE_DIR}/avhttp-master.zip - DEPENDS boost + DEPENDS ${AVHTTP_DEPEND} CONFIGURE_COMMAND "" From 4456840a1f2649008548da9b12f417d0990bfc84 Mon Sep 17 00:00:00 2001 From: unknown <804778@bugs.launchpad.net> Date: Sun, 27 Apr 2014 15:49:41 +0200 Subject: [PATCH 326/741] 3D viewer: Commit patch to enable the rendering of wrl files generated with Meshlab. See https://bugs.launchpad.net/kicad/+bug/804778 --- 3d-viewer/vrmlmodelparser.cpp | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/3d-viewer/vrmlmodelparser.cpp b/3d-viewer/vrmlmodelparser.cpp index 8891a424aa..0e3877eea4 100644 --- a/3d-viewer/vrmlmodelparser.cpp +++ b/3d-viewer/vrmlmodelparser.cpp @@ -4,7 +4,7 @@ * Copyright (C) 2013 Tuomas Vaherkoski * Copyright (C) 2012 Jean-Pierre Charras, jp.charras@wanadoo.fr * Copyright (C) 2011 Wayne Stambaugh - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2014 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 @@ -71,7 +71,7 @@ void VRML_MODEL_PARSER::Load( const wxString aFilename ) if ( text == NULL ) continue; - if( stricmp( text, "DEF" ) == 0 || stricmp( text, "Group" ) == 0 ) + if( stricmp( text, "DEF" ) == 0 || stricmp( text, "Transform" ) == 0 || stricmp( text, "Group" ) == 0 ) { while( GetLine( file, line, &LineNum, 512 ) ) { @@ -121,7 +121,7 @@ int VRML_MODEL_PARSER::readMaterial( FILE* file, int* LineNum ) return 0; } - if( stricmp( command, "DEF" ) == 0 || stricmp( command, "Material") == 0) + if( stricmp( command, "DEF" ) == 0 || stricmp( command,"Transform" ) == 0 || stricmp( command, "Material") == 0) { material = new S3D_MATERIAL( GetMaster(), mat_name ); @@ -197,6 +197,9 @@ int VRML_MODEL_PARSER::readChildren( FILE* file, int* LineNum ) { text = strtok( line, sep_chars ); + if( *text == '[' ) + continue; + if( *text == ']' ) return 0; @@ -233,6 +236,11 @@ int VRML_MODEL_PARSER::readShape( FILE* file, int* LineNum ) break; } + if( *text == '{' ) + { + continue; + } + if( stricmp( text, "appearance" ) == 0 ) { readAppearance( file, LineNum ); @@ -267,6 +275,11 @@ int VRML_MODEL_PARSER::readAppearance( FILE* file, int* LineNum ) break; } + if( *text == '{' ) + { + continue; + } + if( stricmp( text, "material" ) == 0 ) { readMaterial( file, LineNum ); @@ -380,6 +393,16 @@ int VRML_MODEL_PARSER::readGeometry( FILE* file, int* LineNum ) break; } + if( stricmp( text, "creaseAngle" ) == 0 ) + { + continue; + } + + if( *text == '{' ) + { + continue; + } + if( stricmp( text, "normalPerVertex" ) == 0 ) { text = strtok( NULL, " ,\t\n\r" ); From d2083b06718aaf20aaca693a9729746968495bec Mon Sep 17 00:00:00 2001 From: Marco Serantoni Date: Sun, 27 Apr 2014 16:28:37 +0200 Subject: [PATCH 327/741] [MacOSX] Fix for name collision with OSX headers, Maciej, Tomasz or others feel free to rework if you want/like --- include/geometry/rtree.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/geometry/rtree.h b/include/geometry/rtree.h index 6d5a5561d7..4ae5fafae6 100644 --- a/include/geometry/rtree.h +++ b/include/geometry/rtree.h @@ -32,10 +32,10 @@ #define ASSERT assert // RTree uses ASSERT( condition ) #ifndef Min - #define Min std::min + #define rMin std::min #endif // Min #ifndef Max - #define Max std::max + #define rMax std::max #endif // Max // @@ -1326,8 +1326,8 @@ typename RTREE_QUAL::Rect RTREE_QUAL::CombineRect( Rect* a_rectA, Rect* a_rectB for( int index = 0; index < NUMDIMS; ++index ) { - newRect.m_min[index] = Min( a_rectA->m_min[index], a_rectB->m_min[index] ); - newRect.m_max[index] = Max( a_rectA->m_max[index], a_rectB->m_max[index] ); + newRect.m_min[index] = rMin( a_rectA->m_min[index], a_rectB->m_min[index] ); + newRect.m_max[index] = rMax( a_rectA->m_max[index], a_rectB->m_max[index] ); } return newRect; From 76771b856d185772ea9b5756df542be5c3407592 Mon Sep 17 00:00:00 2001 From: Marco Serantoni Date: Sun, 27 Apr 2014 16:30:49 +0200 Subject: [PATCH 328/741] [MacOSX] Fixing issue with kiface libs, now are symbolic linked to the owner bundle --- kicad/CMakeLists.txt | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/kicad/CMakeLists.txt b/kicad/CMakeLists.txt index 1d76b4696b..0bb6ae8574 100644 --- a/kicad/CMakeLists.txt +++ b/kicad/CMakeLists.txt @@ -58,9 +58,35 @@ endif() if( APPLE ) + # binaries have to be build and kiface be in place + # Mockup the destination directory to linking symbolical + # Could be usefully also for debug in building place + add_custom_target( kiway-kicad-bundle-applinks ALL + COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_BINARY_DIR}/eeschema/eeschema.app" "${CMAKE_BINARY_DIR}/kicad/eeschema.app" + COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_BINARY_DIR}/pcbnew/pcbnew.app" "${CMAKE_BINARY_DIR}/kicad/pcbnew.app" + COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_BINARY_DIR}/cvpcb/cvpcb.app" "${CMAKE_BINARY_DIR}/kicad/cvpcb.app" + DEPENDS eeschema pcbnew cvpcb eeschema_kiface pcbnew_kiface cvpcb_kiface + COMMENT "Making bundles links in kicad.app directory" + ) + + # Kicad is dependent by other applications (otherwise what we could symlink?) + add_dependencies( kicad kiway-kicad-bundle-applinks ) + + # making kiface links relative - .app symlinks are alredy in place ! + add_custom_target( kiway-kicad-bundle-kiface-links ALL + COMMAND ${CMAKE_COMMAND} -E create_symlink "../../../eeschema.app/Contents/MacOS/_eeschema.kiface" "_eeschema.kiface" + COMMAND ${CMAKE_COMMAND} -E create_symlink "../../../pcbnew.app/Contents/MacOS/_pcbnew.kiface" "_pcbnew.kiface" + COMMAND ${CMAKE_COMMAND} -E create_symlink "../../../cvpcb.app/Contents/MacOS/_cvpcb.kiface" "_cvpcb.kiface" + DEPENDS kicad + WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/kicad/kicad.app/Contents/MacOS" + COMMENT "Making Symbolik link to kiface libs in Kicad.app Bundle" + ) + set_target_properties( kicad PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist ) + + target_link_libraries( kicad common bitmaps From a990c9f0474f34c13d0cbfa7418b33277e979fdc Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Mon, 28 Apr 2014 04:23:39 -0500 Subject: [PATCH 329/741] Reverse Marco's patch, pending a proper review of my last patch from an English speaking Mac developer. --- kicad/CMakeLists.txt | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/kicad/CMakeLists.txt b/kicad/CMakeLists.txt index 0bb6ae8574..1d76b4696b 100644 --- a/kicad/CMakeLists.txt +++ b/kicad/CMakeLists.txt @@ -58,35 +58,9 @@ endif() if( APPLE ) - # binaries have to be build and kiface be in place - # Mockup the destination directory to linking symbolical - # Could be usefully also for debug in building place - add_custom_target( kiway-kicad-bundle-applinks ALL - COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_BINARY_DIR}/eeschema/eeschema.app" "${CMAKE_BINARY_DIR}/kicad/eeschema.app" - COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_BINARY_DIR}/pcbnew/pcbnew.app" "${CMAKE_BINARY_DIR}/kicad/pcbnew.app" - COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_BINARY_DIR}/cvpcb/cvpcb.app" "${CMAKE_BINARY_DIR}/kicad/cvpcb.app" - DEPENDS eeschema pcbnew cvpcb eeschema_kiface pcbnew_kiface cvpcb_kiface - COMMENT "Making bundles links in kicad.app directory" - ) - - # Kicad is dependent by other applications (otherwise what we could symlink?) - add_dependencies( kicad kiway-kicad-bundle-applinks ) - - # making kiface links relative - .app symlinks are alredy in place ! - add_custom_target( kiway-kicad-bundle-kiface-links ALL - COMMAND ${CMAKE_COMMAND} -E create_symlink "../../../eeschema.app/Contents/MacOS/_eeschema.kiface" "_eeschema.kiface" - COMMAND ${CMAKE_COMMAND} -E create_symlink "../../../pcbnew.app/Contents/MacOS/_pcbnew.kiface" "_pcbnew.kiface" - COMMAND ${CMAKE_COMMAND} -E create_symlink "../../../cvpcb.app/Contents/MacOS/_cvpcb.kiface" "_cvpcb.kiface" - DEPENDS kicad - WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/kicad/kicad.app/Contents/MacOS" - COMMENT "Making Symbolik link to kiface libs in Kicad.app Bundle" - ) - set_target_properties( kicad PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist ) - - target_link_libraries( kicad common bitmaps From 7b843ecac8cb064d8b384a44e3d12a8f3b05a612 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 28 Apr 2014 18:13:18 +0200 Subject: [PATCH 330/741] Plots function: fix a bug about virtual PLOTTER::Text, which was not virtual for derived classes due to a missing parameter in ::Text in these classes. Noticeable only in SVG plot. SVG plot, fix a missing reinitialization in plot lines, which could define a filled polyline, instead of a simple polyline (these fixes solve Bug #1313084 ) --- common/common_plotDXF_functions.cpp | 17 +++++++++---- common/common_plotPDF_functions.cpp | 13 ++++++---- common/common_plotPS_functions.cpp | 37 ++++++++++++++++------------- common/common_plotSVG_functions.cpp | 14 +++++++++-- eeschema/sheet.cpp | 2 -- include/plot_common.h | 12 ++++++---- 6 files changed, 63 insertions(+), 32 deletions(-) diff --git a/common/common_plotDXF_functions.cpp b/common/common_plotDXF_functions.cpp index 2368cb98f7..0164ca628b 100644 --- a/common/common_plotDXF_functions.cpp +++ b/common/common_plotDXF_functions.cpp @@ -570,12 +570,21 @@ void DXF_PLOTTER::Text( const wxPoint& aPos, enum EDA_TEXT_VJUSTIFY_T aV_justify, int aWidth, bool aItalic, - bool aBold ) + bool aBold, + bool aMultilineAllowed ) { - if( textAsLines || containsNonAsciiChars( aText ) ) - /* output text as graphics */ + // Fix me: see how to use DXF text mode for multiline texts + if( aMultilineAllowed && !aText.Contains( wxT( "\n" ) ) ) + aMultilineAllowed = false; // the text has only one line. + + if( textAsLines || containsNonAsciiChars( aText ) || aMultilineAllowed ) + { + // output text as graphics. + // Perhaps miltiline texts could be handled as DXF text entity + // but I do not want spend time about this (JPC) PLOTTER::Text( aPos, aColor, aText, aOrient, aSize, aH_justify, aV_justify, - aWidth, aItalic, aBold ); + aWidth, aItalic, aBold, aMultilineAllowed ); + } else { /* Emit text as a text entity. This loses formatting and shape but it's diff --git a/common/common_plotPDF_functions.cpp b/common/common_plotPDF_functions.cpp index ec9cef66d3..7d75be97d4 100644 --- a/common/common_plotPDF_functions.cpp +++ b/common/common_plotPDF_functions.cpp @@ -741,10 +741,15 @@ void PDF_PLOTTER::Text( const wxPoint& aPos, enum EDA_TEXT_VJUSTIFY_T aV_justify, int aWidth, bool aItalic, - bool aBold ) + bool aBold, + bool aMultilineAllowed ) { + // Fix me: see how to use PDF text mode for multiline texts + if( aMultilineAllowed && !aText.Contains( wxT( "\n" ) ) ) + aMultilineAllowed = false; // the text has only one line. + // Emit native PDF text (if requested) - if( m_textMode != PLOTTEXTMODE_STROKE ) + if( m_textMode != PLOTTEXTMODE_STROKE && !aMultilineAllowed ) { const char *fontname = aItalic ? (aBold ? "/KicadFontBI" : "/KicadFontI") : (aBold ? "/KicadFontB" : "/KicadFont"); @@ -800,10 +805,10 @@ void PDF_PLOTTER::Text( const wxPoint& aPos, } // Plot the stroked text (if requested) - if( m_textMode != PLOTTEXTMODE_NATIVE ) + if( m_textMode != PLOTTEXTMODE_NATIVE || aMultilineAllowed ) { PLOTTER::Text( aPos, aColor, aText, aOrient, aSize, aH_justify, aV_justify, - aWidth, aItalic, aBold ); + aWidth, aItalic, aBold, aMultilineAllowed ); } } diff --git a/common/common_plotPS_functions.cpp b/common/common_plotPS_functions.cpp index 9e1644485b..627f079088 100644 --- a/common/common_plotPS_functions.cpp +++ b/common/common_plotPS_functions.cpp @@ -812,27 +812,32 @@ bool PS_PLOTTER::EndPlot() -void PS_PLOTTER::Text( const wxPoint& aPos, - enum EDA_COLOR_T aColor, - const wxString& aText, - double aOrient, - const wxSize& aSize, - enum EDA_TEXT_HJUSTIFY_T aH_justify, - enum EDA_TEXT_VJUSTIFY_T aV_justify, - int aWidth, - bool aItalic, - bool aBold ) +void PS_PLOTTER::Text( const wxPoint& aPos, + enum EDA_COLOR_T aColor, + const wxString& aText, + double aOrient, + const wxSize& aSize, + enum EDA_TEXT_HJUSTIFY_T aH_justify, + enum EDA_TEXT_VJUSTIFY_T aV_justify, + int aWidth, + bool aItalic, + bool aBold, + bool aMultilineAllowed ) { SetCurrentLineWidth( aWidth ); SetColor( aColor ); + // Fix me: see how to use PS text mode for multiline texts + if( aMultilineAllowed && !aText.Contains( wxT( "\n" ) ) ) + aMultilineAllowed = false; // the text has only one line. + // Draw the native postscript text (if requested) - if( m_textMode == PLOTTEXTMODE_NATIVE ) + if( m_textMode == PLOTTEXTMODE_NATIVE && !aMultilineAllowed ) { const char *fontname = aItalic ? (aBold ? "/KicadFont-BoldOblique" : "/KicadFont-Oblique") - : (aBold ? "/KicadFont-Bold" - : "/KicadFont"); + : (aBold ? "/KicadFont-Bold" + : "/KicadFont"); // Compute the copious tranformation parameters double ctm_a, ctm_b, ctm_c, ctm_d, ctm_e, ctm_f; @@ -874,16 +879,16 @@ void PS_PLOTTER::Text( const wxPoint& aPos, if( m_textMode == PLOTTEXTMODE_PHANTOM ) { fputsPostscriptString( outputFile, aText ); - DPOINT pos_dev = userToDeviceCoordinates( aPos ); + DPOINT pos_dev = userToDeviceCoordinates( aPos ); fprintf( outputFile, " %g %g phantomshow\n", pos_dev.x, pos_dev.y ); } // Draw the stroked text (if requested) - if( m_textMode != PLOTTEXTMODE_NATIVE ) + if( m_textMode != PLOTTEXTMODE_NATIVE || aMultilineAllowed ) { PLOTTER::Text( aPos, aColor, aText, aOrient, aSize, aH_justify, aV_justify, - aWidth, aItalic, aBold ); + aWidth, aItalic, aBold, aMultilineAllowed ); } } diff --git a/common/common_plotSVG_functions.cpp b/common/common_plotSVG_functions.cpp index b883107c84..e5d00a63e5 100644 --- a/common/common_plotSVG_functions.cpp +++ b/common/common_plotSVG_functions.cpp @@ -478,6 +478,15 @@ void SVG_PLOTTER::PenTo( const wxPoint& pos, char plume ) if( penState == 'Z' ) // here plume = 'D' or 'U' { DPOINT pos_dev = userToDeviceCoordinates( pos ); + + // Ensure we do not use a fill mode when moving tne pen, + // in SVG mode (i;e. we are plotting only basic lines, not a filled area + if( m_fillMode != NO_FILL ) + { + setFillMode( NO_FILL ); + setSVGPlotStyle(); + } + fprintf( outputFile, " -//#include #include #include #include #include -//#include #include #include diff --git a/include/plot_common.h b/include/plot_common.h index f59a2fbd82..3f0aee4e75 100644 --- a/include/plot_common.h +++ b/include/plot_common.h @@ -568,7 +568,8 @@ public: enum EDA_TEXT_VJUSTIFY_T aV_justify, int aWidth, bool aItalic, - bool aBold ); + bool aBold, + bool aMultilineAllowed = false ); protected: virtual void emitSetRGBColor( double r, double g, double b ); }; @@ -633,7 +634,8 @@ public: enum EDA_TEXT_VJUSTIFY_T aV_justify, int aWidth, bool aItalic, - bool aBold ); + bool aBold, + bool aMultilineAllowed = false ); virtual void PlotImage( const wxImage& aImage, const wxPoint& aPos, double aScaleFactor ); @@ -702,7 +704,8 @@ public: enum EDA_TEXT_VJUSTIFY_T aV_justify, int aWidth, bool aItalic, - bool aBold ); + bool aBold, + bool aMultilineAllowed = false ); protected: FILL_T m_fillMode; // true if the current contour @@ -904,7 +907,8 @@ public: enum EDA_TEXT_VJUSTIFY_T aV_justify, int aWidth, bool aItalic, - bool aBold ); + bool aBold, + bool aMultilineAllowed = false ); protected: bool textAsLines; From 7b4b3297dbbee1fcfaa689883dec72f3b07cb4dd Mon Sep 17 00:00:00 2001 From: Lorenzo Marcantonio Date: Wed, 30 Apr 2014 21:16:22 +0200 Subject: [PATCH 331/741] - Better way to iterate on vias in the track list (GetFirstVia) - Converted the Next/Prev C casts to static casts and removed the type unsafe ones - Splitted as virtual the VIA::Flip member instead of using RTTI - Heavily refactored the 'unconnected track' cleanup routine - Misc constification --- 3d-viewer/3d_draw.cpp | 32 +- eeschema/sch_screen.cpp | 2 +- eeschema/sch_sheet_path.cpp | 12 +- eeschema/sch_sheet_path.h | 14 +- gerbview/class_gbr_screen.h | 2 +- gerbview/class_gerber_draw_item.h | 4 +- include/base_struct.h | 4 +- include/class_board_item.h | 4 +- include/class_pcb_screen.h | 2 +- include/class_sch_screen.h | 2 +- include/sch_item_struct.h | 4 +- pcbnew/class_board.cpp | 17 +- pcbnew/class_drawsegment.h | 3 - pcbnew/class_edge_mod.h | 3 - pcbnew/class_mire.h | 3 - pcbnew/class_module.cpp | 7 +- pcbnew/class_module.h | 4 +- pcbnew/class_pad.h | 2 +- pcbnew/class_text_mod.h | 4 - pcbnew/class_track.cpp | 15 +- pcbnew/class_track.h | 18 +- pcbnew/clean.cpp | 316 +++++++----------- pcbnew/edgemod.cpp | 19 +- pcbnew/editrack.cpp | 4 +- pcbnew/exporters/export_gencad.cpp | 8 +- pcbnew/exporters/gendrill_Excellon_writer.cpp | 7 +- pcbnew/plot_brditems_plotter.cpp | 15 +- 27 files changed, 217 insertions(+), 310 deletions(-) diff --git a/3d-viewer/3d_draw.cpp b/3d-viewer/3d_draw.cpp index 0a703179fa..289d3c3c72 100644 --- a/3d-viewer/3d_draw.cpp +++ b/3d-viewer/3d_draw.cpp @@ -274,7 +274,7 @@ void EDA_3D_CANVAS::BuildBoard3DView() bool hightQualityMode = false; for( LAYER_NUM layer = FIRST_COPPER_LAYER; layer <= LAST_COPPER_LAYER; - layer++ ) + ++layer ) { if( layer != LAST_COPPER_LAYER && layer >= g_Parm_3D_Visu.m_CopperLayersCount ) @@ -528,21 +528,19 @@ void EDA_3D_CANVAS::BuildTechLayers3DView() } int thickness = g_Parm_3D_Visu.GetCopperThicknessBIU(); - for( TRACK* track = pcb->m_Track; track != NULL; track = track->Next() ) - { - // Add via hole - if( track->Type() == PCB_VIA_T ) - { - const VIA *via = static_cast( track ); - VIATYPE_T viatype = via->GetViaType(); - int holediameter = via->GetDrillValue(); - int hole_outer_radius = (holediameter + thickness) / 2; - if( viatype == VIA_THROUGH ) - TransformCircleToPolygon( allLayerHoles, - via->GetStart(), hole_outer_radius, - segcountLowQuality ); - } + // Add via holes + for( VIA* via = GetFirstVia( pcb->m_Track ); via != NULL; + via = GetFirstVia( via->Next() ) ) + { + VIATYPE_T viatype = via->GetViaType(); + int holediameter = via->GetDrillValue(); + int hole_outer_radius = (holediameter + thickness) / 2; + + if( viatype == VIA_THROUGH ) + TransformCircleToPolygon( allLayerHoles, + via->GetStart(), hole_outer_radius, + segcountLowQuality ); } // draw pads holes @@ -562,7 +560,7 @@ void EDA_3D_CANVAS::BuildTechLayers3DView() allLayerHoles.ExportTo( brdpolysetHoles ); for( LAYER_NUM layer = FIRST_NON_COPPER_LAYER; layer <= LAST_NON_COPPER_LAYER; - layer++ ) + ++layer ) { // Skip user layers, which are not drawn here if( IsUserLayer( layer) ) @@ -713,7 +711,7 @@ void EDA_3D_CANVAS::BuildBoard3DAuxLayers() bufferPolys.reserve( 5000 ); // Reserve for items not on board for( LAYER_NUM layer = FIRST_USER_LAYER; layer <= LAST_USER_LAYER; - layer++ ) + ++layer ) { if( !Is3DLayerEnabled( layer ) ) continue; diff --git a/eeschema/sch_screen.cpp b/eeschema/sch_screen.cpp index 86a8ed9727..9a7d2a5390 100644 --- a/eeschema/sch_screen.cpp +++ b/eeschema/sch_screen.cpp @@ -1345,7 +1345,7 @@ SCH_SCREEN* SCH_SCREENS::GetNext() } -SCH_SCREEN* SCH_SCREENS::GetScreen( unsigned int aIndex ) +SCH_SCREEN* SCH_SCREENS::GetScreen( unsigned int aIndex ) const { if( aIndex < m_screens.size() ) return m_screens[ aIndex ]; diff --git a/eeschema/sch_sheet_path.cpp b/eeschema/sch_sheet_path.cpp index 23ef5272c3..230ea77fe3 100644 --- a/eeschema/sch_sheet_path.cpp +++ b/eeschema/sch_sheet_path.cpp @@ -112,7 +112,7 @@ int SCH_SHEET_PATH::Cmp( const SCH_SHEET_PATH& aSheetPathToTest ) const } -SCH_SHEET* SCH_SHEET_PATH::Last() +SCH_SHEET* SCH_SHEET_PATH::Last() const { if( m_numSheets ) return m_sheets[m_numSheets - 1]; @@ -121,7 +121,7 @@ SCH_SHEET* SCH_SHEET_PATH::Last() } -SCH_SCREEN* SCH_SHEET_PATH::LastScreen() +SCH_SCREEN* SCH_SHEET_PATH::LastScreen() const { SCH_SHEET* lastSheet = Last(); @@ -132,7 +132,7 @@ SCH_SCREEN* SCH_SHEET_PATH::LastScreen() } -SCH_ITEM* SCH_SHEET_PATH::LastDrawList() +SCH_ITEM* SCH_SHEET_PATH::LastDrawList() const { SCH_SHEET* lastSheet = Last(); @@ -143,7 +143,7 @@ SCH_ITEM* SCH_SHEET_PATH::LastDrawList() } -SCH_ITEM* SCH_SHEET_PATH::FirstDrawList() +SCH_ITEM* SCH_SHEET_PATH::FirstDrawList() const { SCH_ITEM* item = NULL; @@ -316,7 +316,7 @@ void SCH_SHEET_PATH::GetComponents( SCH_REFERENCE_LIST& aReferences, bool aInclu } -SCH_ITEM* SCH_SHEET_PATH::FindNextItem( KICAD_T aType, SCH_ITEM* aLastItem, bool aWrap ) +SCH_ITEM* SCH_SHEET_PATH::FindNextItem( KICAD_T aType, SCH_ITEM* aLastItem, bool aWrap ) const { bool hasWrapped = false; bool firstItemFound = false; @@ -349,7 +349,7 @@ SCH_ITEM* SCH_SHEET_PATH::FindNextItem( KICAD_T aType, SCH_ITEM* aLastItem, bool } -SCH_ITEM* SCH_SHEET_PATH::FindPreviousItem( KICAD_T aType, SCH_ITEM* aLastItem, bool aWrap ) +SCH_ITEM* SCH_SHEET_PATH::FindPreviousItem( KICAD_T aType, SCH_ITEM* aLastItem, bool aWrap ) const { bool hasWrapped = false; bool firstItemFound = false; diff --git a/eeschema/sch_sheet_path.h b/eeschema/sch_sheet_path.h index dcfe9b690a..f6a32fbeb9 100644 --- a/eeschema/sch_sheet_path.h +++ b/eeschema/sch_sheet_path.h @@ -129,20 +129,20 @@ public: * returns a pointer to the last sheet of the list * One can see the others sheet as the "path" to reach this last sheet */ - SCH_SHEET* Last(); + SCH_SHEET* Last() const; /** * Function LastScreen * @return the SCH_SCREEN relative to the last sheet in list */ - SCH_SCREEN* LastScreen(); + SCH_SCREEN* LastScreen() const; /** * Function LastDrawList * @return a pointer to the first schematic item handled by the * SCH_SCREEN relative to the last sheet in list */ - SCH_ITEM* LastDrawList(); + SCH_ITEM* LastDrawList() const; /** * Get the last schematic item relative to the first sheet in the list. @@ -150,7 +150,7 @@ public: * @return Last schematic item relative to the first sheet in the list if list * is not empty. Otherwise NULL. */ - SCH_ITEM* FirstDrawList(); + SCH_ITEM* FirstDrawList() const; /** * Function Push @@ -248,7 +248,7 @@ public: * is defined. * @return - The next schematic item if found. Otherwise, NULL is returned. */ - SCH_ITEM* FindNextItem( KICAD_T aType, SCH_ITEM* aLastItem = NULL, bool aWrap = false ); + SCH_ITEM* FindNextItem( KICAD_T aType, SCH_ITEM* aLastItem = NULL, bool aWrap = false ) const; /** * Find the previous schematic item in this sheet path object. @@ -260,7 +260,7 @@ public: * is defined. * @return - The previous schematic item if found. Otherwise, NULL is returned. */ - SCH_ITEM* FindPreviousItem( KICAD_T aType, SCH_ITEM* aLastItem = NULL, bool aWrap = false ); + SCH_ITEM* FindPreviousItem( KICAD_T aType, SCH_ITEM* aLastItem = NULL, bool aWrap = false ) const; SCH_SHEET_PATH& operator=( const SCH_SHEET_PATH& d1 ); @@ -318,7 +318,7 @@ public: * @return the number of sheets in list: * usually the number of sheets found in the whole hierarchy */ - int GetCount() { return m_count; } + int GetCount() const { return m_count; } /** * Function GetFirst diff --git a/gerbview/class_gbr_screen.h b/gerbview/class_gbr_screen.h index 8be96b21d5..9e89373e53 100644 --- a/gerbview/class_gbr_screen.h +++ b/gerbview/class_gbr_screen.h @@ -26,7 +26,7 @@ public: ~GBR_SCREEN(); - GBR_SCREEN* Next() { return (GBR_SCREEN*) Pnext; } + GBR_SCREEN* Next() const { return static_cast( Pnext ); } // void SetNextZoom(); // void SetPreviousZoom(); diff --git a/gerbview/class_gerber_draw_item.h b/gerbview/class_gerber_draw_item.h index 2989333c0a..70ad0a1164 100644 --- a/gerbview/class_gerber_draw_item.h +++ b/gerbview/class_gerber_draw_item.h @@ -116,8 +116,8 @@ public: */ GERBER_DRAW_ITEM* Copy() const; - GERBER_DRAW_ITEM* Next() const { return (GERBER_DRAW_ITEM*) Pnext; } - GERBER_DRAW_ITEM* Back() const { return (GERBER_DRAW_ITEM*) Pback; } + GERBER_DRAW_ITEM* Next() const { return static_cast( Pnext ); } + GERBER_DRAW_ITEM* Back() const { return static_cast( Pback ); } /** * Function GetLayer diff --git a/include/base_struct.h b/include/base_struct.h index 8679cfdd5b..9ec7af03c8 100644 --- a/include/base_struct.h +++ b/include/base_struct.h @@ -375,8 +375,8 @@ public: void SetTimeStamp( time_t aNewTimeStamp ) { m_TimeStamp = aNewTimeStamp; } time_t GetTimeStamp() const { return m_TimeStamp; } - EDA_ITEM* Next() const { return (EDA_ITEM*) Pnext; } - EDA_ITEM* Back() const { return (EDA_ITEM*) Pback; } + EDA_ITEM* Next() const { return Pnext; } + EDA_ITEM* Back() const { return Pback; } EDA_ITEM* GetParent() const { return m_Parent; } DHEAD* GetList() const { return m_List; } diff --git a/include/class_board_item.h b/include/class_board_item.h index ceb428af5e..26a30af896 100644 --- a/include/class_board_item.h +++ b/include/class_board_item.h @@ -108,8 +108,8 @@ public: */ static wxPoint ZeroOffset; - BOARD_ITEM* Next() const { return (BOARD_ITEM*) Pnext; } - BOARD_ITEM* Back() const { return (BOARD_ITEM*) Pback; } + BOARD_ITEM* Next() const { return static_cast( Pnext ); } + BOARD_ITEM* Back() const { return static_cast( Pback ); } BOARD_ITEM* GetParent() const { return (BOARD_ITEM*) m_Parent; } /** diff --git a/include/class_pcb_screen.h b/include/class_pcb_screen.h index e15082be40..59f3f3d592 100644 --- a/include/class_pcb_screen.h +++ b/include/class_pcb_screen.h @@ -31,7 +31,7 @@ public: ~PCB_SCREEN(); - PCB_SCREEN* Next() { return (PCB_SCREEN*) Pnext; } + PCB_SCREEN* Next() const { return static_cast( Pnext ); } void SetNextZoom(); void SetPreviousZoom(); diff --git a/include/class_sch_screen.h b/include/class_sch_screen.h index 02a6787679..acf8f20819 100644 --- a/include/class_sch_screen.h +++ b/include/class_sch_screen.h @@ -523,7 +523,7 @@ public: int GetCount() const { return m_screens.size(); } SCH_SCREEN* GetFirst(); SCH_SCREEN* GetNext(); - SCH_SCREEN* GetScreen( unsigned int aIndex ); + SCH_SCREEN* GetScreen( unsigned int aIndex ) const; /** * Function ClearAnnotation diff --git a/include/sch_item_struct.h b/include/sch_item_struct.h index e425e1d6b1..5fe90cd69f 100644 --- a/include/sch_item_struct.h +++ b/include/sch_item_struct.h @@ -136,8 +136,8 @@ public: */ virtual void SwapData( SCH_ITEM* aItem ); - SCH_ITEM* Next() { return (SCH_ITEM*) Pnext; } - SCH_ITEM* Back() { return (SCH_ITEM*) Pback; } + SCH_ITEM* Next() const { return static_cast( Pnext ); } + SCH_ITEM* Back() const { return static_cast( Pback ); } /** * Function GetLayer diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index 2960e9e315..a7b4e35987 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -1563,19 +1563,12 @@ int BOARD::SetAreasNetCodesFromNetNames( void ) VIA* BOARD::GetViaByPosition( const wxPoint& aPosition, LAYER_NUM aLayer) const { - for( TRACK *track = m_Track; track; track = track->Next() ) + for( VIA *via = GetFirstVia( m_Track); via; via = GetFirstVia( via->Next() ) ) { - if( track->Type() != PCB_VIA_T ) - continue; - - if( track->GetStart() != aPosition ) - continue; - - if( track->GetState( BUSY | IS_DELETED ) ) - continue; - - if( (aLayer == UNDEFINED_LAYER) || (track->IsOnLayer( aLayer )) ) - return static_cast( track ); + if( (via->GetStart() == aPosition) && + (via->GetState( BUSY | IS_DELETED ) == 0) && + ((aLayer == UNDEFINED_LAYER) || (via->IsOnLayer( aLayer ))) ) + return via; } return NULL; diff --git a/pcbnew/class_drawsegment.h b/pcbnew/class_drawsegment.h index 635a3235d7..64ce5dcb8c 100644 --- a/pcbnew/class_drawsegment.h +++ b/pcbnew/class_drawsegment.h @@ -68,9 +68,6 @@ public: /// skip the linked list stuff, and parent const DRAWSEGMENT& operator = ( const DRAWSEGMENT& rhs ); - DRAWSEGMENT* Next() const { return (DRAWSEGMENT*) Pnext; } - DRAWSEGMENT* Back() const { return (DRAWSEGMENT*) Pback; } - void SetWidth( int aWidth ) { m_Width = aWidth; } int GetWidth() const { return m_Width; } diff --git a/pcbnew/class_edge_mod.h b/pcbnew/class_edge_mod.h index 8c6559ad74..18790d9b9b 100644 --- a/pcbnew/class_edge_mod.h +++ b/pcbnew/class_edge_mod.h @@ -51,9 +51,6 @@ public: ~EDGE_MODULE(); - EDGE_MODULE* Next() const { return (EDGE_MODULE*) Pnext; } - EDGE_MODULE* Back() const { return (EDGE_MODULE*) Pback; } - /// skip the linked list stuff, and parent const EDGE_MODULE& operator = ( const EDGE_MODULE& rhs ); diff --git a/pcbnew/class_mire.h b/pcbnew/class_mire.h index da42a07fb0..0a7186b6b1 100644 --- a/pcbnew/class_mire.h +++ b/pcbnew/class_mire.h @@ -56,9 +56,6 @@ public: ~PCB_TARGET(); - PCB_TARGET* Next() const { return (PCB_TARGET*) Pnext; } - PCB_TARGET* Back() const { return (PCB_TARGET*) Pnext; } - void SetPosition( const wxPoint& aPos ) { m_Pos = aPos; } // override const wxPoint& GetPosition() const { return m_Pos; } // override diff --git a/pcbnew/class_module.cpp b/pcbnew/class_module.cpp index 26527c095a..ca343a6333 100644 --- a/pcbnew/class_module.cpp +++ b/pcbnew/class_module.cpp @@ -422,9 +422,12 @@ EDA_RECT MODULE::GetFootprintRect() const area.SetEnd( m_Pos ); area.Inflate( Millimeter2iu( 0.25 ) ); // Give a min size to the area - for( EDGE_MODULE* edge = (EDGE_MODULE*) m_Drawings.GetFirst(); edge; edge = edge->Next() ) - if( edge->Type() == PCB_MODULE_EDGE_T ) + for( const BOARD_ITEM* item = m_Drawings.GetFirst(); item; item = item->Next() ) + { + const EDGE_MODULE *edge = dynamic_cast( item ); + if( edge ) area.Merge( edge->GetBoundingBox() ); + } for( D_PAD* pad = m_Pads; pad; pad = pad->Next() ) area.Merge( pad->GetBoundingBox() ); diff --git a/pcbnew/class_module.h b/pcbnew/class_module.h index 3127d73fb1..189abfe6be 100644 --- a/pcbnew/class_module.h +++ b/pcbnew/class_module.h @@ -77,8 +77,8 @@ public: ~MODULE(); - MODULE* Next() const { return (MODULE*) Pnext; } - MODULE* Back() const { return (MODULE*) Pback; } + MODULE* Next() const { return static_cast( Pnext ); } + MODULE* Back() const { return static_cast( Pback ); } void Copy( MODULE* Module ); // Copy structure diff --git a/pcbnew/class_pad.h b/pcbnew/class_pad.h index 11b49568c1..3cbdcbe82a 100644 --- a/pcbnew/class_pad.h +++ b/pcbnew/class_pad.h @@ -106,7 +106,7 @@ public: void Copy( D_PAD* source ); - D_PAD* Next() const { return (D_PAD*) Pnext; } + D_PAD* Next() const { return static_cast( Pnext ); } MODULE* GetParent() const { return (MODULE*) m_Parent; } diff --git a/pcbnew/class_text_mod.h b/pcbnew/class_text_mod.h index 97e15ab202..bc207e7254 100644 --- a/pcbnew/class_text_mod.h +++ b/pcbnew/class_text_mod.h @@ -98,10 +98,6 @@ public: void Flip( const wxPoint& aCentre ); - TEXTE_MODULE* Next() const { return (TEXTE_MODULE*) Pnext; } - - TEXTE_MODULE* Back() const { return (TEXTE_MODULE*) Pback; } - /// @deprecated it seems (but the type is used to 'protect' //reference and value from deletion, and for identification) void SetType( TEXT_TYPE aType ) { m_Type = aType; } diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index abf4d7a732..8b454c9610 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -88,12 +88,9 @@ inline bool IsNear( const wxPoint& p1, const wxPoint& p2, int max_dist ) } -TRACK* GetTrack( TRACK* aStartTrace, TRACK* aEndTrace, +TRACK* GetTrack( TRACK* aStartTrace, const TRACK* aEndTrace, const wxPoint& aPosition, LAYER_MSK aLayerMask ) { - if( aStartTrace == NULL ) - return NULL; - for( TRACK *PtSegm = aStartTrace; PtSegm != NULL; PtSegm = PtSegm->Next() ) { if( PtSegm->GetState( IS_DELETED | BUSY ) == 0 ) @@ -180,7 +177,6 @@ VIA::VIA( BOARD_ITEM* aParent ) : { SetViaType( VIA_THROUGH ); m_BottomLayer = LAYER_N_BACK; - m_Width = Millimeter2iu( 0.5 ); SetDrillDefault(); } @@ -369,9 +365,14 @@ void TRACK::Flip( const wxPoint& aCentre ) { m_Start.y = aCentre.y - (m_Start.y - aCentre.y); m_End.y = aCentre.y - (m_End.y - aCentre.y); + SetLayer( FlipLayer( GetLayer() ) ); +} - if( Type() != PCB_VIA_T ) - SetLayer( FlipLayer( GetLayer() ) ); + +void VIA::Flip( const wxPoint& aCentre ) +{ + m_Start.y = aCentre.y - (m_Start.y - aCentre.y); + m_End.y = aCentre.y - (m_End.y - aCentre.y); } diff --git a/pcbnew/class_track.h b/pcbnew/class_track.h index 63c9026967..0417048fa3 100644 --- a/pcbnew/class_track.h +++ b/pcbnew/class_track.h @@ -74,7 +74,7 @@ enum VIATYPE_T * layer mask. * @return A TRACK object pointer if found otherwise NULL. */ -extern TRACK* GetTrack( TRACK* aStartTrace, TRACK* aEndTrace, +extern TRACK* GetTrack( TRACK* aStartTrace, const TRACK* aEndTrace, const wxPoint& aPosition, LAYER_MSK aLayerMask ); class TRACK : public BOARD_CONNECTED_ITEM @@ -100,8 +100,8 @@ public: // Do not create a copy constructor. The one generated by the compiler is adequate. - TRACK* Next() const { return (TRACK*) Pnext; } - TRACK* Back() const { return (TRACK*) Pback; } + TRACK* Next() const { return static_cast( Pnext ); } + TRACK* Back() const { return static_cast( Pback ); } virtual void Move( const wxPoint& aMoveVector ) { @@ -350,7 +350,7 @@ public: } - SEGZONE* Next() const { return (SEGZONE*) Pnext; } + SEGZONE* Next() const { return static_cast( Pnext ); } wxString GetSelectMenuText() const; @@ -415,6 +415,8 @@ public: /// @copydoc VIEW_ITEM::ViewGetLayers() virtual void ViewGetLayers( int aLayers[], int& aCount ) const; + virtual void Flip( const wxPoint& aCentre ); + #if defined (DEBUG) virtual void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override #endif @@ -469,5 +471,13 @@ private: int m_Drill; // for vias: via drill (- 1 for default value) }; +/// Scan a track list for the first VIA o NULL if not found (or NULL passed) +inline VIA *GetFirstVia( TRACK *aTrk, const TRACK *aStopPoint = NULL ) +{ + while( aTrk && (aTrk != aStopPoint) && (aTrk->Type() != PCB_VIA_T) ) + aTrk = aTrk->Next(); + + return static_cast( aTrk ); +} #endif /* CLASS_TRACK_H */ diff --git a/pcbnew/clean.cpp b/pcbnew/clean.cpp index 4bcfb5127e..127f0cbae5 100644 --- a/pcbnew/clean.cpp +++ b/pcbnew/clean.cpp @@ -87,6 +87,11 @@ private: */ TRACK* mergeCollinearSegmentIfPossible( TRACK* aTrackRef, TRACK* aCandidate, ENDPOINT_T aEndType ); + + const ZONE_CONTAINER* zoneForTrackEndpoint( const TRACK *aTrack, + ENDPOINT_T aEndPoint ); + + bool testTrackEndpointDangling( TRACK *aTrack, ENDPOINT_T aEndPoint ); }; /* Install the cleanup dialog frame to know what should be cleaned @@ -101,7 +106,7 @@ void PCB_EDIT_FRAME::Clean_Pcb() wxBusyCursor( dummy ); TRACKS_CLEANER cleaner( GetBoard() ); - cleaner.CleanupBoard( this, dlg.m_cleanVias, dlg.m_mergeSegments, + cleaner.CleanupBoard( this, dlg.m_cleanVias, dlg.m_mergeSegments, dlg.m_deleteUnconnectedSegm ); m_canvas->Refresh( true ); } @@ -134,8 +139,6 @@ bool TRACKS_CLEANER::CleanupBoard( PCB_EDIT_FRAME *aFrame, if( modified ) { // Clear undo and redo lists to avoid inconsistencies between lists - // XXX This is very involved... maybe a member in PCB_EDIT_FRAME - // would be better? aFrame->GetScreen()->ClearUndoRedoList(); aFrame->SetCurItem( NULL ); aFrame->Compile_Ratsnest( NULL, true ); @@ -158,7 +161,7 @@ void TRACKS_CLEANER::buildTrackConnectionInfo() BuildTracksCandidatesList( m_Brd->m_Track, NULL); // clear flags and variables used in cleanup - for( TRACK * track = m_Brd->m_Track; track; track = track->Next() ) + for( TRACK *track = m_Brd->m_Track; track != NULL; track = track->Next() ) { track->start = NULL; track->end = NULL; @@ -168,7 +171,7 @@ void TRACKS_CLEANER::buildTrackConnectionInfo() // Build connections info tracks to pads SearchTracksConnectedToPads(); - for( TRACK * track = m_Brd->m_Track; track; track = track->Next() ) + for( TRACK *track = m_Brd->m_Track; track != NULL; track = track->Next() ) { // Mark track if connected to pads for( unsigned jj = 0; jj < track->m_PadsConnected.size(); jj++ ) @@ -194,70 +197,50 @@ bool TRACKS_CLEANER::clean_vias() { bool modified = false; - for( TRACK* track = m_Brd->m_Track; track; track = track->Next() ) + for( VIA* via = GetFirstVia( m_Brd->m_Track ); via != NULL; + via = GetFirstVia( via->Next() ) ) { - // Correct via m_End defects (if any) - if( track->Type() == PCB_VIA_T ) + // Correct via m_End defects (if any), should never happen + if( via->GetStart() != via->GetEnd() ) { - if( track->GetStart() != track->GetEnd() ) - track->SetEnd( track->GetStart() ); - - VIA *via = static_cast( track ); - /* Important: this cleanup only does thru hole vias, it doesn't - * (yet) handle high density interconnects */ - if( via->GetViaType() != VIA_THROUGH ) - continue; + wxFAIL_MSG( "Via with mismatching ends" ); + via->SetEnd( via->GetStart() ); } - else - continue; - // Search and delete others vias at same location - TRACK* alt_track = track->Next(); - - TRACK* next_track; - for( ; alt_track != NULL; alt_track = next_track ) + /* Important: these cleanups only do thru hole vias, they don't + * (yet) handle high density interconnects */ + if( via->GetViaType() != VIA_THROUGH ) { - next_track = alt_track->Next(); - VIA *alt_via = dynamic_cast( alt_track ); - if( alt_via ) + // Search and delete others vias at same location + VIA* next_via; + for( VIA* alt_via = GetFirstVia( via->Next() ); alt_via != NULL; + alt_via = next_via ) { - if( alt_via->GetViaType() != VIA_THROUGH ) - continue; + next_via = GetFirstVia( alt_via->Next() ); - if( alt_via->GetStart() != track->GetStart() ) - continue; - - // delete via - alt_track->UnLink(); - delete alt_track; - modified = true; + if( (alt_via->GetViaType() == VIA_THROUGH) && + (alt_via->GetStart() == via->GetStart()) ) + { + // delete via + alt_via->DeleteStructure(); + modified = true; + } } - } - } - // Delete Via on pads at same location - TRACK* next_track; - for( TRACK* track = m_Brd->m_Track; track != NULL; track = next_track ) - { - next_track = track->Next(); - - VIA *via = dynamic_cast( track ); - if( !via || (via->GetViaType() != VIA_THROUGH )) - continue; - - // Examine the list of connected pads: - // if one pad through is found, the via can be removed - for( unsigned ii = 0; ii < track->m_PadsConnected.size(); ii++ ) - { - D_PAD * pad = track->m_PadsConnected[ii]; - - if( (pad->GetLayerMask() & ALL_CU_LAYERS) == ALL_CU_LAYERS ) + /* To delete through Via on THT pads at same location + * Examine the list of connected pads: + * if one through pad is found, the via can be removed */ + for( unsigned ii = 0; ii < via->m_PadsConnected.size(); ++ii ) { - // redundant: via delete it - track->UnLink(); - delete track; - modified = true; - break; + const D_PAD *pad = via->m_PadsConnected[ii]; + + if( (pad->GetLayerMask() & ALL_CU_LAYERS) == ALL_CU_LAYERS ) + { + // redundant: delete the via + via->DeleteStructure(); + modified = true; + break; + } } } } @@ -265,6 +248,64 @@ bool TRACKS_CLEANER::clean_vias() return modified; } +/// Utility for checking if a track/via ends on a zone +const ZONE_CONTAINER* TRACKS_CLEANER::zoneForTrackEndpoint( const TRACK *aTrack, + ENDPOINT_T aEndPoint ) +{ + // Vias are special cased, since they get a layer range, not a single one + LAYER_NUM top_layer, bottom_layer; + const VIA *via = dynamic_cast( aTrack ); + + if( via ) + via->LayerPair( &top_layer, &bottom_layer ); + else + { + top_layer = aTrack->GetLayer(); + bottom_layer = top_layer; + } + return m_Brd->HitTestForAnyFilledArea( aTrack->GetEndPoint( aEndPoint ), + top_layer, bottom_layer, aTrack->GetNetCode() ); +} + +/** Utility: does the endpoint unconnected processed for one endpoint of one track + * Returns true if the track must be deleted, false if not necessarily */ +bool TRACKS_CLEANER::testTrackEndpointDangling( TRACK *aTrack, ENDPOINT_T aEndPoint ) +{ + bool flag_erase = false; + + TRACK* other = aTrack->GetTrack( m_Brd->m_Track, NULL, aEndPoint ); + if( (other == NULL) && + (zoneForTrackEndpoint( aTrack, aEndPoint ) == NULL) ) + flag_erase = true; // Start endpoint is neither on pad, zone or other track + else // segment, via or zone connected to this end + { + // Fill connectivity informations + if( aEndPoint == ENDPOINT_START ) + aTrack->start = other; + else + aTrack->end = other; + + /* If a via is connected to this end, test if this via has a second item connected. + * If not, remove the current segment (the via would then become + * unconnected and remove on the following pass) */ + VIA* via = dynamic_cast( other ); + if( via ) + { + // search for another segment following the via + aTrack->SetState( BUSY, true ); + + other = via->GetTrack( m_Brd->m_Track, NULL, aEndPoint ); + + // There is a via on the start but it goes nowhere + if( (other == NULL) && + (zoneForTrackEndpoint( via, aEndPoint ) == NULL) ) + flag_erase = true; + + aTrack->SetState( BUSY, false ); + } + } + return flag_erase; +} /* * Delete dangling tracks @@ -277,161 +318,44 @@ bool TRACKS_CLEANER::deleteUnconnectedTracks() return false; bool modified = false; - bool item_erased = true; - while( item_erased ) // Iterate when at least one track is deleted + bool item_erased; + do // Iterate when at least one track is deleted { item_erased = false; TRACK* next_track; - for( TRACK * track = m_Brd->m_Track; track ; track = next_track ) + for( TRACK *track = m_Brd->m_Track; track != NULL; track = next_track ) { next_track = track->Next(); - int flag_erase = 0; //Not connected indicator - int type_end = 0; + bool flag_erase = false; // Start without a good reason to erase it - if( track->GetState( START_ON_PAD ) ) - type_end |= START_ON_PAD; + /* if a track endpoint is not connected to a pad, test if + * the endpoint is connected to another track or to a zone. + * For via test, an enhancement could be to test if + * connected to 2 items on different layers. Currently + * a via must be connected to 2 items, that can be on the + * same layer */ - if( track->GetState( END_ON_PAD ) ) - type_end |= END_ON_PAD; + // Check if there is nothing attached on the start + if( !(track->GetState( START_ON_PAD )) ) + flag_erase |= testTrackEndpointDangling( track, ENDPOINT_START ); - // if the track start point is not connected to a pad, - // test if this track start point is connected to another track - // For via test, an enhancement could be to test if connected - // to 2 items on different layers. - // Currently a via must be connected to 2 items, that can be on the same layer - LAYER_NUM top_layer, bottom_layer; - ZONE_CONTAINER* zone; - - if( (type_end & START_ON_PAD ) == 0 ) - { - TRACK* other = track->GetTrack( m_Brd->m_Track, NULL, ENDPOINT_START ); - - if( other == NULL ) // Test a connection to zones - { - if( track->Type() != PCB_VIA_T ) - { - zone = m_Brd->HitTestForAnyFilledArea( track->GetStart(), - track->GetLayer(), - track->GetLayer(), - track->GetNetCode() ); - } - else - { - ((VIA*)track)->LayerPair( &top_layer, &bottom_layer ); - zone = m_Brd->HitTestForAnyFilledArea( track->GetStart(), - top_layer, bottom_layer, - track->GetNetCode() ); - } - } - - if( (other == NULL) && (zone == NULL) ) - { - flag_erase |= 1; - } - else // segment, via or zone connected to this end - { - track->start = other; - // If a via is connected to this end, - // test if this via has a second item connected. - // If no, remove it with the current segment - - if( other && other->Type() == PCB_VIA_T ) - { - // search for another segment following the via - track->SetState( BUSY, true ); - - VIA* via = (VIA*) other; - other = via->GetTrack( m_Brd->m_Track, NULL, ENDPOINT_START ); - - if( other == NULL ) - { - via->LayerPair( &top_layer, &bottom_layer ); - zone = m_Brd->HitTestForAnyFilledArea( via->GetStart(), - bottom_layer, - top_layer, - via->GetNetCode() ); - } - - if( (other == NULL) && (zone == NULL) ) - flag_erase |= 2; - - track->SetState( BUSY, false ); - } - } - } - - // if track end point is not connected to a pad, - // test if this track end point is connected to an other track - if( (type_end & END_ON_PAD ) == 0 ) - { - TRACK* other = track->GetTrack( m_Brd->m_Track, NULL, ENDPOINT_END ); - - if( other == NULL ) // Test a connection to zones - { - if( track->Type() != PCB_VIA_T ) - { - zone = m_Brd->HitTestForAnyFilledArea( track->GetEnd(), - track->GetLayer(), - track->GetLayer(), - track->GetNetCode() ); - } - else - { - ((VIA*)track)->LayerPair( &top_layer, &bottom_layer ); - zone = m_Brd->HitTestForAnyFilledArea( track->GetEnd(), - top_layer, bottom_layer, - track->GetNetCode() ); - } - } - - if ( (other == NULL) && (zone == NULL) ) - { - flag_erase |= 0x10; - } - else // segment, via or zone connected to this end - { - track->end = other; - - // If a via is connected to this end, test if this via has a second item connected - // if no, remove it with the current segment - - if( other && other->Type() == PCB_VIA_T ) - { - // search for another segment following the via - - track->SetState( BUSY, true ); - - VIA* via = (VIA*) other; - other = via->GetTrack( m_Brd->m_Track, NULL, ENDPOINT_END ); - - if( other == NULL ) - { - via->LayerPair( &top_layer, &bottom_layer ); - zone = m_Brd->HitTestForAnyFilledArea( via->GetEnd(), - bottom_layer, top_layer, - via->GetNetCode() ); - } - - if( (other == NULL) && (zone == NULL) ) - flag_erase |= 0x20; - - track->SetState( BUSY, false ); - } - } - } + // Check if there is nothing attached on the end + if( !(track->GetState( END_ON_PAD )) ) + flag_erase |= testTrackEndpointDangling( track, ENDPOINT_END ); if( flag_erase ) { // remove segment from board track->DeleteStructure(); - // iterate, because a track connected to the deleted track - // is now perhaps now not connected and should be deleted + + /* keep iterating, because a track connected to the deleted track + * now perhaps is not connected and should be deleted */ item_erased = true; modified = true; } } - } + } while( item_erased ); return modified; } diff --git a/pcbnew/edgemod.cpp b/pcbnew/edgemod.cpp index 7239dc37a8..77019494f2 100644 --- a/pcbnew/edgemod.cpp +++ b/pcbnew/edgemod.cpp @@ -169,12 +169,11 @@ void FOOTPRINT_EDIT_FRAME::Edit_Edge_Width( EDGE_MODULE* aEdge ) { aEdge = (EDGE_MODULE*) (BOARD_ITEM*) module->GraphicalItems(); - for( ; aEdge != NULL; aEdge = aEdge->Next() ) + for( BOARD_ITEM *item = module->GraphicalItems(); item; item = item->Next() ) { - if( aEdge->Type() != PCB_MODULE_EDGE_T ) - continue; - - aEdge->SetWidth( GetDesignSettings().m_ModuleSegmentWidth ); + aEdge = dynamic_cast( item ); + if( aEdge ) + aEdge->SetWidth( GetDesignSettings().m_ModuleSegmentWidth ); } } else @@ -216,14 +215,12 @@ void FOOTPRINT_EDIT_FRAME::Edit_Edge_Layer( EDGE_MODULE* aEdge ) if( aEdge == NULL ) { - aEdge = (EDGE_MODULE*) (BOARD_ITEM*) module->GraphicalItems(); - - for( ; aEdge != NULL; aEdge = aEdge->Next() ) + for( BOARD_ITEM *item = module->GraphicalItems() ; item != NULL; + item = item->Next() ) { - if( aEdge->Type() != PCB_MODULE_EDGE_T ) - continue; + aEdge = dynamic_cast( item ); - if( aEdge->GetLayer() != new_layer ) + if( aEdge && (aEdge->GetLayer() != new_layer) ) { if( ! modified ) // save only once SaveCopyInUndoList( module, UR_MODEDIT ); diff --git a/pcbnew/editrack.cpp b/pcbnew/editrack.cpp index 683b7d41d7..220668148c 100644 --- a/pcbnew/editrack.cpp +++ b/pcbnew/editrack.cpp @@ -62,9 +62,9 @@ static void Abort_Create_Track( EDA_DRAW_PANEL* Panel, wxDC* DC ) { PCB_EDIT_FRAME* frame = (PCB_EDIT_FRAME*) Panel->GetParent(); BOARD* pcb = frame->GetBoard(); - TRACK* track = (TRACK*) frame->GetCurItem(); + TRACK* track = dynamic_cast( frame->GetCurItem() ); - if( track && ( track->Type()==PCB_VIA_T || track->Type()==PCB_TRACE_T ) ) + if( track ) { // Erase the current drawing ShowNewTrackWhenMovingCursor( Panel, DC, wxDefaultPosition, false ); diff --git a/pcbnew/exporters/export_gencad.cpp b/pcbnew/exporters/export_gencad.cpp index 601c91ae6d..c1895cbc7b 100644 --- a/pcbnew/exporters/export_gencad.cpp +++ b/pcbnew/exporters/export_gencad.cpp @@ -271,12 +271,10 @@ static void CreatePadsShapesSection( FILE* aFile, BOARD* aPcb ) } // The same for vias - for( TRACK* track = aPcb->m_Track; track != NULL; track = track->Next() ) + for( VIA* via = GetFirstVia( aPcb->m_Track ); via != NULL; + via = GetFirstVia( via->Next() ) ) { - if( track->Type() == PCB_VIA_T ) - { - vias.push_back( static_cast(track) ); - } + vias.push_back( via ); } qsort( &vias[0], vias.size(), sizeof(VIA*), ViaSort ); diff --git a/pcbnew/exporters/gendrill_Excellon_writer.cpp b/pcbnew/exporters/gendrill_Excellon_writer.cpp index a8a086187a..679df5bed1 100644 --- a/pcbnew/exporters/gendrill_Excellon_writer.cpp +++ b/pcbnew/exporters/gendrill_Excellon_writer.cpp @@ -453,12 +453,9 @@ void EXCELLON_WRITER::BuildHolesList( int aFirstLayer, // build hole list for vias if( ! aGenerateNPTH_list ) // vias are always plated ! { - for( TRACK* track = m_pcb->m_Track; track; track = track->Next() ) + for( VIA* via = GetFirstVia( m_pcb->m_Track ); via; + via = GetFirstVia( via->Next() ) ) { - if( track->Type() != PCB_VIA_T ) - continue; - - const VIA* via = (const VIA*) track; hole_value = via->GetDrillValue(); if( hole_value == 0 ) diff --git a/pcbnew/plot_brditems_plotter.cpp b/pcbnew/plot_brditems_plotter.cpp index 1535b3593f..8494eb560b 100644 --- a/pcbnew/plot_brditems_plotter.cpp +++ b/pcbnew/plot_brditems_plotter.cpp @@ -148,10 +148,11 @@ bool BRDITEMS_PLOTTER::PlotAllTextsModule( MODULE* aModule ) PlotTextModule( &aModule->Value(), GetValueColor() ); } - for( textModule = (TEXTE_MODULE*) aModule->GraphicalItems().GetFirst(); - textModule != NULL; textModule = textModule->Next() ) + for( BOARD_ITEM *item = aModule->GraphicalItems().GetFirst(); + item != NULL; item = item->Next() ) { - if( textModule->Type() != PCB_MODULE_TEXT_T ) + textModule = dynamic_cast( item ); + if( !textModule ) continue; if( !GetPlotOtherText() ) @@ -350,13 +351,11 @@ void BRDITEMS_PLOTTER::Plot_Edges_Modules() { for( MODULE* module = m_board->m_Modules; module; module = module->Next() ) { - for( EDGE_MODULE* edge = (EDGE_MODULE*) module->GraphicalItems().GetFirst(); - edge; edge = edge->Next() ) + for( BOARD_ITEM* item = module->GraphicalItems().GetFirst(); item; item = item->Next() ) { - if( edge->Type() != PCB_MODULE_EDGE_T ) - continue; + EDGE_MODULE *edge = dynamic_cast( item ); - if( ( GetLayerMask( edge->GetLayer() ) & m_layerMask ) == 0 ) + if( !edge || (( GetLayerMask( edge->GetLayer() ) & m_layerMask ) == 0) ) continue; Plot_1_EdgeModule( edge ); From fca1ba6755120c27ee353c7879ccc0931ee451f7 Mon Sep 17 00:00:00 2001 From: Lorenzo Marcantonio Date: Thu, 1 May 2014 08:50:11 +0200 Subject: [PATCH 332/741] Virtual split of TRACK/VIA::HitTest --- pcbnew/class_track.cpp | 92 +++++++++++++++++------------------------- pcbnew/class_track.h | 12 +++++- 2 files changed, 47 insertions(+), 57 deletions(-) diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index 8b454c9610..2dd626a5c8 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -1233,64 +1233,56 @@ void VIA::GetMsgPanelInfoBase( std::vector< MSG_PANEL_ITEM >& aList ) bool TRACK::HitTest( const wxPoint& aPosition ) { - int max_dist = m_Width >> 1; + return TestSegmentHit( aPosition, m_Start, m_End, m_Width / 2 ); +} - if( Type() == PCB_VIA_T ) - { - // rel_pos is aPosition relative to m_Start (or the center of the via) - wxPoint rel_pos = aPosition - m_Start; - double dist = (double) rel_pos.x * rel_pos.x + (double) rel_pos.y * rel_pos.y; - return dist <= (double) max_dist * max_dist; - } +bool VIA::HitTest( const wxPoint& aPosition ) +{ + int max_dist = m_Width / 2; - return TestSegmentHit( aPosition, m_Start, m_End, max_dist ); + // rel_pos is aPosition relative to m_Start (or the center of the via) + wxPoint rel_pos = aPosition - m_Start; + double dist = (double) rel_pos.x * rel_pos.x + (double) rel_pos.y * rel_pos.y; + return dist <= (double) max_dist * max_dist; } bool TRACK::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const +{ + EDA_RECT arect = aRect; + arect.Inflate( aAccuracy ); + + if( aContained ) + /* Tracks are a special case: + * they are considered inside the rect if one end is inside the rect */ + return arect.Contains( GetStart() ) || arect.Contains( GetEnd() ); + else + return arect.Intersects( GetStart(), GetEnd() ); +} + +bool VIA::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const { EDA_RECT box; EDA_RECT arect = aRect; arect.Inflate( aAccuracy ); - if( Type() == PCB_VIA_T ) - { - box.SetOrigin( GetStart() ); - box.Inflate( GetWidth() >> 1 ); + box.SetOrigin( GetStart() ); + box.Inflate( GetWidth() / 2 ); - if(aContained) - return arect.Contains( box ); - else - return arect.Intersects( box ); - } + if( aContained ) + return arect.Contains( box ); else - { - if( aContained ) - // Tracks are a specila case: - // they are considered inside the rect if one end - // is inside the rect - return arect.Contains( GetStart() ) || arect.Contains( GetEnd() ); - else - return arect.Intersects( GetStart(), GetEnd() ); - } + return arect.Intersects( box ); } - VIA* TRACK::GetVia( const wxPoint& aPosition, LAYER_NUM aLayer) { - for( TRACK *track = this; track; track = track->Next() ) + for( VIA *via = GetFirstVia( this ); via; via = GetFirstVia( via->Next() ) ) { - if( track->Type() != PCB_VIA_T ) - continue; - - if( !track->HitTest( aPosition ) ) - continue; - - if( track->GetState( BUSY | IS_DELETED ) ) - continue; - - if( (aLayer == UNDEFINED_LAYER) || (track->IsOnLayer( aLayer )) ) - return static_cast( track ); + if( via->HitTest( aPosition ) && + !via->GetState( BUSY | IS_DELETED ) && + ((aLayer == UNDEFINED_LAYER) || (via->IsOnLayer( aLayer ))) ) + return via; } return NULL; @@ -1299,22 +1291,12 @@ VIA* TRACK::GetVia( const wxPoint& aPosition, LAYER_NUM aLayer) VIA* TRACK::GetVia( TRACK* aEndTrace, const wxPoint& aPosition, LAYER_MSK aLayerMask ) { - for( TRACK *trace = this; trace; trace = trace->Next() ) + for( VIA *via = GetFirstVia( this, aEndTrace ); via; via = GetFirstVia( via->Next() ) ) { - if( trace->Type() == PCB_VIA_T ) - { - if( aPosition == trace->m_Start ) - { - if( trace->GetState( BUSY | IS_DELETED ) == 0 ) - { - if( aLayerMask & trace->GetLayerMask() ) - return static_cast( trace ); - } - } - } - - if( trace == aEndTrace ) - break; + if( via->HitTest( aPosition ) && + !via->GetState( BUSY | IS_DELETED ) && + (aLayerMask & via->GetLayerMask()) ) + return via; } return NULL; diff --git a/pcbnew/class_track.h b/pcbnew/class_track.h index 0417048fa3..9afc346788 100644 --- a/pcbnew/class_track.h +++ b/pcbnew/class_track.h @@ -228,7 +228,7 @@ public: /** @copydoc BOARD_ITEM::HitTest(const EDA_RECT& aRect, * bool aContained = true, int aAccuracy ) const */ - bool HitTest( const EDA_RECT& aRect, bool aContained = true, int aAccuracy = 0 ) const; + virtual bool HitTest( const EDA_RECT& aRect, bool aContained = true, int aAccuracy = 0 ) const; /** * Function GetVia @@ -401,6 +401,10 @@ public: const wxPoint& GetPosition() const { return m_Start; } // was overload void SetPosition( const wxPoint& aPoint ) { m_Start = aPoint; m_End = aPoint; } // was overload + virtual bool HitTest( const wxPoint& aPosition ); + + virtual bool HitTest( const EDA_RECT& aRect, bool aContained = true, int aAccuracy = 0 ) const; + wxString GetClass() const { return wxT( "VIA" ); @@ -477,7 +481,11 @@ inline VIA *GetFirstVia( TRACK *aTrk, const TRACK *aStopPoint = NULL ) while( aTrk && (aTrk != aStopPoint) && (aTrk->Type() != PCB_VIA_T) ) aTrk = aTrk->Next(); - return static_cast( aTrk ); + // It could stop because of the stop point, not on a via + if( aTrk && (aTrk->Type() == PCB_VIA_T) ) + return static_cast( aTrk ); + else + return NULL; } #endif /* CLASS_TRACK_H */ From 0ff0b9b835dd3e721dd77b80cd5b59ea4b3e9902 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 2 May 2014 08:28:40 +0200 Subject: [PATCH 333/741] Fix issue in bga footprint wizard. --- pcbnew/scripting/plugins/PadArray.py | 9 +++++---- pcbnew/scripting/plugins/bga_wizard.py | 8 ++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/pcbnew/scripting/plugins/PadArray.py b/pcbnew/scripting/plugins/PadArray.py index 99fa70e0dc..3c5d5f7cb1 100644 --- a/pcbnew/scripting/plugins/PadArray.py +++ b/pcbnew/scripting/plugins/PadArray.py @@ -75,13 +75,14 @@ class PadGridArray(PadArray): # handy utility function 1 - A, 2 - B, 26 - AA, etc # aIndex = 0 for 0 - A - def AlphaNameFromNumber(self, n, aIndex = 1): + # alphabet = set of allowable chars if not A-Z, eg ABCDEFGHJKLMNPRTUVWY for BGA + def AlphaNameFromNumber(self, n, aIndex = 1, alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"): - div, mod = divmod(n - aIndex, 26) - alpha = chr(65 + mod) + div, mod = divmod(n - aIndex, len(alphabet)) + alpha = alphabet[mod] if div > 0: - return self.AlphaNameFromNumber(div) + alpha; + return self.AlphaNameFromNumber(div, aIndex, alphabet) + alpha; return alpha; diff --git a/pcbnew/scripting/plugins/bga_wizard.py b/pcbnew/scripting/plugins/bga_wizard.py index 7fd6258f3e..9b68b48ef6 100644 --- a/pcbnew/scripting/plugins/bga_wizard.py +++ b/pcbnew/scripting/plugins/bga_wizard.py @@ -24,7 +24,7 @@ import PadArray as PA class BGAPadGridArray(PA.PadGridArray): def NamingFunction(self, x, y): - return "%s%d" % (self.AlphaNameFromNumber(y + 1), x + 1) + return "%s%d" % (self.AlphaNameFromNumber(y + 1, alphabet="ABCDEFGHJKLMNPRTUVWY"), x + 1) class BGAWizard(HFPW.HelpfulFootprintWizardPlugin): @@ -76,10 +76,10 @@ class BGAWizard(HFPW.HelpfulFootprintWizardPlugin): # add in the pads pad = PA.PadMaker(self.module).SMTRoundPad(pads["pad size"]) - pin1Pos = pcbnew.wxPoint(-((rows - 1) * pad_pitch) / 2, - -((cols - 1) * pad_pitch) / 2) + pin1Pos = pcbnew.wxPoint(-((cols - 1) * pad_pitch) / 2, + -((rows - 1) * pad_pitch) / 2) - array = BGAPadGridArray(pad, rows, cols, pad_pitch, pad_pitch, pin1Pos) + array = BGAPadGridArray(pad, cols, rows, pad_pitch, pad_pitch, pin1Pos) array.AddPadsToModule() #box From 32c676540dbb2708216c1c2f75c3679863ca7884 Mon Sep 17 00:00:00 2001 From: "john.j." Date: Fri, 2 May 2014 08:28:40 +0200 Subject: [PATCH 334/741] Fix issue in bga footprint wizard. --- pcbnew/scripting/plugins/PadArray.py | 9 +++++---- pcbnew/scripting/plugins/bga_wizard.py | 8 ++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/pcbnew/scripting/plugins/PadArray.py b/pcbnew/scripting/plugins/PadArray.py index 99fa70e0dc..3c5d5f7cb1 100644 --- a/pcbnew/scripting/plugins/PadArray.py +++ b/pcbnew/scripting/plugins/PadArray.py @@ -75,13 +75,14 @@ class PadGridArray(PadArray): # handy utility function 1 - A, 2 - B, 26 - AA, etc # aIndex = 0 for 0 - A - def AlphaNameFromNumber(self, n, aIndex = 1): + # alphabet = set of allowable chars if not A-Z, eg ABCDEFGHJKLMNPRTUVWY for BGA + def AlphaNameFromNumber(self, n, aIndex = 1, alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"): - div, mod = divmod(n - aIndex, 26) - alpha = chr(65 + mod) + div, mod = divmod(n - aIndex, len(alphabet)) + alpha = alphabet[mod] if div > 0: - return self.AlphaNameFromNumber(div) + alpha; + return self.AlphaNameFromNumber(div, aIndex, alphabet) + alpha; return alpha; diff --git a/pcbnew/scripting/plugins/bga_wizard.py b/pcbnew/scripting/plugins/bga_wizard.py index 7fd6258f3e..9b68b48ef6 100644 --- a/pcbnew/scripting/plugins/bga_wizard.py +++ b/pcbnew/scripting/plugins/bga_wizard.py @@ -24,7 +24,7 @@ import PadArray as PA class BGAPadGridArray(PA.PadGridArray): def NamingFunction(self, x, y): - return "%s%d" % (self.AlphaNameFromNumber(y + 1), x + 1) + return "%s%d" % (self.AlphaNameFromNumber(y + 1, alphabet="ABCDEFGHJKLMNPRTUVWY"), x + 1) class BGAWizard(HFPW.HelpfulFootprintWizardPlugin): @@ -76,10 +76,10 @@ class BGAWizard(HFPW.HelpfulFootprintWizardPlugin): # add in the pads pad = PA.PadMaker(self.module).SMTRoundPad(pads["pad size"]) - pin1Pos = pcbnew.wxPoint(-((rows - 1) * pad_pitch) / 2, - -((cols - 1) * pad_pitch) / 2) + pin1Pos = pcbnew.wxPoint(-((cols - 1) * pad_pitch) / 2, + -((rows - 1) * pad_pitch) / 2) - array = BGAPadGridArray(pad, rows, cols, pad_pitch, pad_pitch, pin1Pos) + array = BGAPadGridArray(pad, cols, rows, pad_pitch, pad_pitch, pin1Pos) array.AddPadsToModule() #box From c698a1da24492d1314cf7e40330f8362192efe75 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 2 May 2014 19:56:24 +0200 Subject: [PATCH 335/741] Eeschema: fix unwanted creation of noname.pro (or other useless config file), when opening eeschema. Fix also an issue when saving the config (from save config menu) which saved the config file in an unknow folder. --- common/project.cpp | 22 ++++++++++++++-------- eeschema/eeschema.cpp | 1 - eeschema/eeschema_config.cpp | 8 ++++---- 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/common/project.cpp b/common/project.cpp index df43e60a5e..df31c81c1b 100644 --- a/common/project.cpp +++ b/common/project.cpp @@ -60,9 +60,9 @@ void PROJECT::SetProjectFullName( const wxString& aFullPathAndName ) wxASSERT( m_project_name.GetName() == NAMELESS_PROJECT || m_project_name.IsAbsolute() ); #if 0 - wxASSERT( m_project_name.GetExt() == wxT( ".pro" ) ) + wxASSERT( m_project_name.GetExt() == ProjectFileExtension ) #else - m_project_name.SetExt( wxT( ".pro" ) ); + m_project_name.SetExt( ProjectFileExtension ); #endif // until multiple projects are in play, set an environment variable for the @@ -269,19 +269,21 @@ wxConfigBase* PROJECT::configCreate( const SEARCH_STACK& aSList, const wxString& // No suitable pro file was found, either does not exist, or is too old. // Use the template kicad.pro file. Find it by using caller's SEARCH_STACK. - - wxString kicad_pro_template = aSList.FindValidPath( wxT( "kicad.pro" ) ); + wxString templateFile = wxT( "kicad." ) + ProjectFileExtension; + wxString kicad_pro_template = aSList.FindValidPath( templateFile ); if( !kicad_pro_template ) { - wxLogDebug( wxT( "Template file not found using search paths." ) ); + wxLogDebug( wxT( "Template file <%s> not found using search paths." ), + GetChars( templateFile ) ); wxFileName templ( wxStandardPaths::Get().GetDocumentsDir(), wxT( "kicad" ), ProjectFileExtension ); if( !templ.IsFileReadable() ) { - wxString msg = wxString::Format( _( "Unable to find kicad.pro template file." ) ); + wxString msg = wxString::Format( _( "Unable to find %s template config file." ), + GetChars( templateFile ) ); DisplayError( NULL, msg ); @@ -291,8 +293,12 @@ wxConfigBase* PROJECT::configCreate( const SEARCH_STACK& aSList, const wxString& kicad_pro_template = templ.GetFullPath(); } - // copy the template to cur_pro_fn, and open it at that destination. - wxCopyFile( kicad_pro_template, cur_pro_fn ); + // The project config file is not found (happens for new projects, + // or if the schematic editor is run outside an existing project + // In this case the default template (kicad.pro) is used + cur_pro_fn = kicad_pro_template; + wxLogDebug( wxT( "Use template file '%s' as project file." ), GetChars( cur_pro_fn ) ); + cfg = new wxFileConfig( wxEmptyString, wxEmptyString, cur_pro_fn, wxEmptyString ); cfg->DontCreateOnDemand(); diff --git a/eeschema/eeschema.cpp b/eeschema/eeschema.cpp index fafcd90ac5..c5e1432036 100644 --- a/eeschema/eeschema.cpp +++ b/eeschema/eeschema.cpp @@ -40,7 +40,6 @@ #include #include -//#include #include #include #include diff --git a/eeschema/eeschema_config.cpp b/eeschema/eeschema_config.cpp index ee091ae82c..caa3b2782b 100644 --- a/eeschema/eeschema_config.cpp +++ b/eeschema/eeschema_config.cpp @@ -139,7 +139,7 @@ void LIB_EDIT_FRAME::Process_Config( wxCommandEvent& event ) switch( id ) { case ID_CONFIG_SAVE: - schFrame->SaveProjectSettings( false ); + schFrame->SaveProjectSettings( true ); break; case ID_CONFIG_READ: @@ -205,7 +205,7 @@ void SCH_EDIT_FRAME::Process_Config( wxCommandEvent& event ) switch( id ) { case ID_CONFIG_SAVE: - SaveProjectSettings( false ); + SaveProjectSettings( true ); break; case ID_CONFIG_READ: @@ -456,8 +456,8 @@ void SCH_EDIT_FRAME::SaveProjectSettings( bool aAskForSave ) if( aAskForSave ) { wxFileDialog dlg( this, _( "Save Project File" ), - fn.GetPath(), fn.GetFullName(), - ProjectFileWildcard, wxFD_SAVE | wxFD_CHANGE_DIR ); + fn.GetPath(), fn.GetFullPath(), + ProjectFileWildcard, wxFD_SAVE ); if( dlg.ShowModal() == wxID_CANCEL ) return; From 5688a872128e89c572f91e6e20fce85ce4566183 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 2 May 2014 19:56:24 +0200 Subject: [PATCH 336/741] Eeschema: fix unwanted creation of noname.pro (or other useless config file), when opening eeschema. Fix also an issue when saving the config (from save config menu) which saved the config file in an unknow folder. --- common/project.cpp | 22 ++++++++++++++-------- eeschema/eeschema.cpp | 1 - eeschema/eeschema_config.cpp | 8 ++++---- 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/common/project.cpp b/common/project.cpp index df43e60a5e..df31c81c1b 100644 --- a/common/project.cpp +++ b/common/project.cpp @@ -60,9 +60,9 @@ void PROJECT::SetProjectFullName( const wxString& aFullPathAndName ) wxASSERT( m_project_name.GetName() == NAMELESS_PROJECT || m_project_name.IsAbsolute() ); #if 0 - wxASSERT( m_project_name.GetExt() == wxT( ".pro" ) ) + wxASSERT( m_project_name.GetExt() == ProjectFileExtension ) #else - m_project_name.SetExt( wxT( ".pro" ) ); + m_project_name.SetExt( ProjectFileExtension ); #endif // until multiple projects are in play, set an environment variable for the @@ -269,19 +269,21 @@ wxConfigBase* PROJECT::configCreate( const SEARCH_STACK& aSList, const wxString& // No suitable pro file was found, either does not exist, or is too old. // Use the template kicad.pro file. Find it by using caller's SEARCH_STACK. - - wxString kicad_pro_template = aSList.FindValidPath( wxT( "kicad.pro" ) ); + wxString templateFile = wxT( "kicad." ) + ProjectFileExtension; + wxString kicad_pro_template = aSList.FindValidPath( templateFile ); if( !kicad_pro_template ) { - wxLogDebug( wxT( "Template file not found using search paths." ) ); + wxLogDebug( wxT( "Template file <%s> not found using search paths." ), + GetChars( templateFile ) ); wxFileName templ( wxStandardPaths::Get().GetDocumentsDir(), wxT( "kicad" ), ProjectFileExtension ); if( !templ.IsFileReadable() ) { - wxString msg = wxString::Format( _( "Unable to find kicad.pro template file." ) ); + wxString msg = wxString::Format( _( "Unable to find %s template config file." ), + GetChars( templateFile ) ); DisplayError( NULL, msg ); @@ -291,8 +293,12 @@ wxConfigBase* PROJECT::configCreate( const SEARCH_STACK& aSList, const wxString& kicad_pro_template = templ.GetFullPath(); } - // copy the template to cur_pro_fn, and open it at that destination. - wxCopyFile( kicad_pro_template, cur_pro_fn ); + // The project config file is not found (happens for new projects, + // or if the schematic editor is run outside an existing project + // In this case the default template (kicad.pro) is used + cur_pro_fn = kicad_pro_template; + wxLogDebug( wxT( "Use template file '%s' as project file." ), GetChars( cur_pro_fn ) ); + cfg = new wxFileConfig( wxEmptyString, wxEmptyString, cur_pro_fn, wxEmptyString ); cfg->DontCreateOnDemand(); diff --git a/eeschema/eeschema.cpp b/eeschema/eeschema.cpp index fafcd90ac5..c5e1432036 100644 --- a/eeschema/eeschema.cpp +++ b/eeschema/eeschema.cpp @@ -40,7 +40,6 @@ #include #include -//#include #include #include #include diff --git a/eeschema/eeschema_config.cpp b/eeschema/eeschema_config.cpp index ee091ae82c..caa3b2782b 100644 --- a/eeschema/eeschema_config.cpp +++ b/eeschema/eeschema_config.cpp @@ -139,7 +139,7 @@ void LIB_EDIT_FRAME::Process_Config( wxCommandEvent& event ) switch( id ) { case ID_CONFIG_SAVE: - schFrame->SaveProjectSettings( false ); + schFrame->SaveProjectSettings( true ); break; case ID_CONFIG_READ: @@ -205,7 +205,7 @@ void SCH_EDIT_FRAME::Process_Config( wxCommandEvent& event ) switch( id ) { case ID_CONFIG_SAVE: - SaveProjectSettings( false ); + SaveProjectSettings( true ); break; case ID_CONFIG_READ: @@ -456,8 +456,8 @@ void SCH_EDIT_FRAME::SaveProjectSettings( bool aAskForSave ) if( aAskForSave ) { wxFileDialog dlg( this, _( "Save Project File" ), - fn.GetPath(), fn.GetFullName(), - ProjectFileWildcard, wxFD_SAVE | wxFD_CHANGE_DIR ); + fn.GetPath(), fn.GetFullPath(), + ProjectFileWildcard, wxFD_SAVE ); if( dlg.ShowModal() == wxID_CANCEL ) return; From 25d1ab4008a20bc44e011a910783b68d002d09af Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Sat, 3 May 2014 12:40:19 -0500 Subject: [PATCH 337/741] Modular-Kicad milestone B), major portions: *) Rework the set language support, simplify it by using KIWAY. Now any major frame with a "change language" menu can change the language for all KIWAY_PLAYERs in the whole KIWAY. Multiple KIWAYs are not supported yet. *) Simplify "modal wxFrame" support, and add that support exclusively to KIWAY_PLAYER where it is inherited by all derivatives. The function KIWAY_PLAYER::ShowModal() is in the vtable and so is cross module capable. *) Remove the requirements and assumptions that the wxFrame hierarchy always had PCB_EDIT_FRAME and SCH_EDIT_FRAME as immediate parents of their viewers and editors. This is no longer the case, nor required. *) Use KIWAY::Player() everywhere to make KIWAY_PLAYERs, this registers the KIWAY_PLAYER within the KIWAY and makes it very easy to find an open frame quickly. It also gives control to the KIWAY as to frame hierarchical relationships. *) Change single_top to use the KIWAY for loading a KIFACE and instantiating the single KIWAY_PLAYER, see bullet immediately above. *) Add KIWAY::OnKiwayEnd() and call it from PGM_BASE at program termination, this gives the KIFACEs a chance to save their final configuration dope to disk. *) Add dedicated FRAME_T's for the modal frames, so m_Ident can be tested and these modal frames are distinctly different than their non-modal equivalents. KIWAY_PLAYER::IsModal() is !not! a valid test during the wxFrame's constructor, so this is another important reason for having a dedicated FRAME_T for each modal wxFrame. On balance, more lines were deleted than were added to achieve all this. --- bitmap2component/CMakeLists.txt | 2 +- common/basicframe.cpp | 30 +---- common/colors.cpp | 1 + common/draw_frame.cpp | 6 - common/fpid.cpp | 41 +++---- common/kiway.cpp | 99 +++++++++++++--- common/kiway_player.cpp | 148 +++++++++++++++++++++--- common/pgm_base.cpp | 2 +- common/single_top.cpp | 128 +++----------------- cvpcb/cvframe.cpp | 8 -- cvpcb/cvpcb_mainframe.h | 6 - eeschema/block_libedit.cpp | 2 +- eeschema/eeschema.cpp | 10 ++ eeschema/eeschema_config.cpp | 31 ++--- eeschema/getpart.cpp | 24 ++-- eeschema/libeditframe.cpp | 74 +++++------- eeschema/libeditframe.h | 13 --- eeschema/sch_base_frame.cpp | 9 +- eeschema/schedit.cpp | 2 +- eeschema/schframe.cpp | 51 ++++---- eeschema/sheet.cpp | 2 +- eeschema/tool_viewlib.cpp | 4 +- eeschema/viewlib_frame.cpp | 113 +++++++++--------- eeschema/viewlib_frame.h | 27 ++--- gerbview/events_called_functions.cpp | 41 +++---- gerbview/gerbview_frame.h | 6 +- include/draw_frame.h | 7 -- include/fpid.h | 20 ++-- include/frame_type.h | 23 +++- include/kiface_i.h | 2 +- include/kiway.h | 59 +++++++--- include/kiway_player.h | 57 ++++++++- include/wxEeschemaStruct.h | 6 - include/wxPcbStruct.h | 6 +- include/wxstruct.h | 23 +--- kicad/kicad.cpp | 4 +- kicad/kicad.h | 3 +- kicad/mainframe.cpp | 8 ++ kicad/menubar.cpp | 19 +-- kicad/preferences.cpp | 5 - pagelayout_editor/events_functions.cpp | 17 +-- pagelayout_editor/pl_editor_frame.h | 6 - pcb_calculator/CMakeLists.txt | 3 +- pcb_calculator/pcb_calculator_frame.cpp | 1 + pcbnew/block_module_editor.cpp | 2 +- pcbnew/edit.cpp | 28 ++--- pcbnew/editmod.cpp | 12 +- pcbnew/footprint_wizard.cpp | 2 +- pcbnew/footprint_wizard_frame.cpp | 58 +++------- pcbnew/footprint_wizard_frame.h | 28 ++--- pcbnew/gpcb_plugin.cpp | 3 +- pcbnew/kicad_plugin.cpp | 6 +- pcbnew/librairi.cpp | 2 +- pcbnew/loadcmp.cpp | 27 ++--- pcbnew/modedit.cpp | 70 +++++------ pcbnew/module_editor_frame.h | 13 +-- pcbnew/moduleframe.cpp | 15 +-- pcbnew/modview_frame.cpp | 116 +++++++++---------- pcbnew/modview_frame.h | 42 +++---- pcbnew/pcbframe.cpp | 12 +- pcbnew/pcbnew.cpp | 25 ++-- pcbnew/pcbnew_config.cpp | 2 +- pcbnew/tool_modview.cpp | 5 +- 63 files changed, 769 insertions(+), 848 deletions(-) diff --git a/bitmap2component/CMakeLists.txt b/bitmap2component/CMakeLists.txt index 5bf7debd48..489ff8f3f1 100644 --- a/bitmap2component/CMakeLists.txt +++ b/bitmap2component/CMakeLists.txt @@ -14,7 +14,7 @@ set( BITMAP2COMPONENT_SRCS ) set_source_files_properties( ../common/single_top.cpp PROPERTIES - COMPILE_DEFINITIONS "TOP_FRAME=0" + COMPILE_DEFINITIONS "TOP_FRAME=FRAME_BM2CMP" ) set_source_files_properties( bitmap2cmp_gui.cpp PROPERTIES COMPILE_DEFINITIONS "COMPILING_DLL" diff --git a/common/basicframe.cpp b/common/basicframe.cpp index 91a5c0b4ee..37be1fd12c 100644 --- a/common/basicframe.cpp +++ b/common/basicframe.cpp @@ -169,12 +169,8 @@ void EDA_BASE_FRAME::ReCreateMenuBar() } -void EDA_BASE_FRAME::SetLanguage( wxCommandEvent& event ) +void EDA_BASE_FRAME::ShowChangedLanguage() { - int id = event.GetId(); - - Pgm().SetLanguageIdentifier( id ); - Pgm().SetLanguage(); ReCreateMenuBar(); GetMenuBar()->Refresh(); } @@ -717,27 +713,3 @@ void EDA_BASE_FRAME::CheckForAutoSaveFile( const wxFileName& aFileName, } } - -void EDA_BASE_FRAME::SetModalMode( bool aModal ) -{ - // Disable all other windows -#if wxCHECK_VERSION(2, 9, 4) - if( IsTopLevel() ) - { - wxWindowList::compatibility_iterator node = wxTopLevelWindows.GetFirst(); - - while( node ) - { - wxWindow* win = node->GetData(); - - if( win != this ) - win->Enable( !aModal ); - - node = node->GetNext(); - } - } -#else - // Deprecated since wxWidgets 2.9.4 - MakeModal( aModal ); -#endif -} diff --git a/common/colors.cpp b/common/colors.cpp index ca12867b6e..9016840865 100644 --- a/common/colors.cpp +++ b/common/colors.cpp @@ -122,6 +122,7 @@ EDA_COLOR_T ColorMix( EDA_COLOR_T aColor1, EDA_COLOR_T aColor2 ) // First easy thing: a black gives always the other colour if( aColor1 == BLACK ) return aColor2; + if( aColor2 == BLACK) return aColor1; diff --git a/common/draw_frame.cpp b/common/draw_frame.cpp index 75461e5f22..a79503edd3 100644 --- a/common/draw_frame.cpp +++ b/common/draw_frame.cpp @@ -556,12 +556,6 @@ bool EDA_DRAW_FRAME::HandleBlockEnd( wxDC* DC ) } -void EDA_DRAW_FRAME::SetLanguage( wxCommandEvent& event ) -{ - EDA_BASE_FRAME::SetLanguage( event ); -} - - void EDA_DRAW_FRAME::UpdateStatusBar() { wxString Line; diff --git a/common/fpid.cpp b/common/fpid.cpp index ef9f35b89f..025b7b57e4 100644 --- a/common/fpid.cpp +++ b/common/fpid.cpp @@ -62,6 +62,7 @@ const char* EndsWithRev( const char* start, const char* tail, char separator ) } +#if 0 // Not used int RevCmp( const char* s1, const char* s2 ) { int r = strncmp( s1, s2, 3 ); @@ -76,6 +77,7 @@ int RevCmp( const char* s1, const char* s2 ) return -(rnum1 - rnum2); // swap the sign, higher revs first } +#endif //----------------------------------------- @@ -116,7 +118,7 @@ void FPID::clear() } -int FPID::Parse( const std::string& aId ) +int FPID::Parse( const UTF8& aId ) { clear(); @@ -171,12 +173,6 @@ int FPID::Parse( const std::string& aId ) } -int FPID::Parse( const wxString& aId ) -{ - return Parse( std::string( TO_UTF8( aId ) ) ); -} - - FPID::FPID( const std::string& aId ) throw( PARSE_ERROR ) { int offset = Parse( aId ); @@ -194,14 +190,14 @@ FPID::FPID( const std::string& aId ) throw( PARSE_ERROR ) FPID::FPID( const wxString& aId ) throw( PARSE_ERROR ) { - std::string id = TO_UTF8( aId ); + UTF8 id = aId; int offset = Parse( id ); if( offset != -1 ) { THROW_PARSE_ERROR( _( "Illegal character found in FPID string" ), - wxString::FromUTF8( id.c_str() ), + aId, id.c_str(), 0, offset ); @@ -209,7 +205,7 @@ FPID::FPID( const wxString& aId ) throw( PARSE_ERROR ) } -int FPID::SetLibNickname( const std::string& aLogical ) +int FPID::SetLibNickname( const UTF8& aLogical ) { int offset = okLogical( aLogical ); @@ -222,15 +218,9 @@ int FPID::SetLibNickname( const std::string& aLogical ) } -int FPID::SetLibNickname( const wxString& aLogical ) +int FPID::SetFootprintName( const UTF8& aFootprintName ) { - return SetLibNickname( std::string( TO_UTF8( aLogical ) ) ); -} - - -int FPID::SetFootprintName( const std::string& aFootprintName ) -{ - int separation = int( aFootprintName.find_first_of( "/" ) ); + int separation = int( aFootprintName.find_first_of( "/" ) ); if( separation != -1 ) { @@ -246,13 +236,7 @@ int FPID::SetFootprintName( const std::string& aFootprintName ) } -int FPID::SetFootprintName( const wxString& aFootprintName ) -{ - return SetFootprintName( std::string( TO_UTF8( aFootprintName ) ) ); -} - - -int FPID::SetRevision( const std::string& aRevision ) +int FPID::SetRevision( const UTF8& aRevision ) { int offset = okRevision( aRevision ); @@ -301,8 +285,10 @@ UTF8 FPID::GetFootprintNameAndRev() const } -UTF8 FPID::Format( const std::string& aLogicalLib, const std::string& aFootprintName, - const std::string& aRevision ) +#if 0 // this is broken, it does not output aFootprintName for some reason + +UTF8 FPID::Format( const UTF8& aLogicalLib, const UTF8& aFootprintName, + const UTF8& aRevision ) throw( PARSE_ERROR ) { UTF8 ret; @@ -344,6 +330,7 @@ UTF8 FPID::Format( const std::string& aLogicalLib, const std::string& aFootprint return ret; } +#endif int FPID::compare( const FPID& aFPID ) const diff --git a/common/kiway.cpp b/common/kiway.cpp index 13c0072a92..a599474f06 100644 --- a/common/kiway.cpp +++ b/common/kiway.cpp @@ -23,14 +23,16 @@ */ #include +#include +#include #include #include #include #include +#include #include -#include -#include +#include KIFACE* KIWAY::m_kiface[KIWAY_FACE_COUNT]; @@ -38,22 +40,24 @@ int KIWAY::m_kiface_version[KIWAY_FACE_COUNT]; -KIWAY::KIWAY( PGM_BASE* aProgram, wxFrame* aTop ): +KIWAY::KIWAY( PGM_BASE* aProgram, int aCtlBits, wxFrame* aTop ): m_program( aProgram ), + m_ctl( aCtlBits ), m_top( 0 ) { - SetTop( aTop ); // hook playerDestroyHandler() into aTop. + SetTop( aTop ); // hook player_destroy_handler() into aTop. memset( m_player, 0, sizeof( m_player ) ); } + // Any event types derived from wxCommandEvt, like wxWindowDestroyEvent, are // propogated upwards to parent windows if not handled below. Therefor the // m_top window should receive all wxWindowDestroyEvents originating from -// KIWAY_PLAYERs. It does anyways, but now playerDestroyHandler eavesdrops +// KIWAY_PLAYERs. It does anyways, but now player_destroy_handler eavesdrops // on that event stream looking for KIWAY_PLAYERs being closed. -void KIWAY::playerDestroyHandler( wxWindowDestroyEvent& event ) +void KIWAY::player_destroy_handler( wxWindowDestroyEvent& event ) { wxWindow* w = event.GetWindow(); @@ -62,7 +66,7 @@ void KIWAY::playerDestroyHandler( wxWindowDestroyEvent& event ) // if destroying one of our flock, then mark it as deceased. if( (wxWindow*) m_player[i] == w ) { - // DBG(printf( "%s: marking m_player[%d] as destroyed\n", __func__, i );) + DBG(printf( "%s: marking m_player[%d] as destroyed\n", __func__, i );) m_player[i] = 0; } } @@ -73,12 +77,12 @@ void KIWAY::SetTop( wxFrame* aTop ) { if( m_top ) { - m_top->Disconnect( wxEVT_DESTROY, wxWindowDestroyEventHandler( KIWAY::playerDestroyHandler ), NULL, this ); + m_top->Disconnect( wxEVT_DESTROY, wxWindowDestroyEventHandler( KIWAY::player_destroy_handler ), NULL, this ); } if( aTop ) { - aTop->Connect( wxEVT_DESTROY, wxWindowDestroyEventHandler( KIWAY::playerDestroyHandler ), NULL, this ); + aTop->Connect( wxEVT_DESTROY, wxWindowDestroyEventHandler( KIWAY::player_destroy_handler ), NULL, this ); } m_top = aTop; @@ -91,13 +95,13 @@ const wxString KIWAY::dso_full_path( FACE_T aFaceId ) switch( aFaceId ) { - case FACE_SCH: name = KIFACE_PREFIX wxT( "eeschema" ); break; - case FACE_PCB: name = KIFACE_PREFIX wxT( "pcbnew" ); break; - case FACE_CVPCB: name = KIFACE_PREFIX wxT( "cvpcb" ); break; - case FACE_GERBVIEW: name = KIFACE_PREFIX wxT( "gerbview" ); break; - case FACE_PL_EDITOR: name = KIFACE_PREFIX wxT( "pl_editor" ); break; - - // case FACE_PCB_CALCULATOR: who knows. + case FACE_SCH: name = KIFACE_PREFIX wxT( "eeschema" ); break; + case FACE_PCB: name = KIFACE_PREFIX wxT( "pcbnew" ); break; + case FACE_CVPCB: name = KIFACE_PREFIX wxT( "cvpcb" ); break; + case FACE_GERBVIEW: name = KIFACE_PREFIX wxT( "gerbview" ); break; + case FACE_PL_EDITOR: name = KIFACE_PREFIX wxT( "pl_editor" ); break; + case FACE_PCB_CALCULATOR: name = KIFACE_PREFIX wxT( "pcb_calculator" ); break; + case FACE_BMP2CMP: name = KIFACE_PREFIX wxT( "bitmap2component" ); break; default: wxASSERT_MSG( 0, wxT( "caller has a bug, passed a bad aFaceId" ) ); @@ -172,7 +176,7 @@ KIFACE* KIWAY::KiFACE( FACE_T aFaceId, bool doLoad ) // Give the DSO a single chance to do its "process level" initialization. // "Process level" specifically means stay away from any projects in there. - if( kiface->OnKifaceStart( m_program, KFCTL_PROJECT_SUITE ) ) + if( kiface->OnKifaceStart( m_program, m_ctl ) ) { // Tell dso's wxDynamicLibrary destructor not to Unload() the program image. (void) dso.Detach(); @@ -214,12 +218,14 @@ KIWAY::FACE_T KIWAY::KifaceType( FRAME_T aFrameType ) case FRAME_SCH: case FRAME_SCH_LIB_EDITOR: case FRAME_SCH_VIEWER: + case FRAME_SCH_VIEWER_MODAL: return FACE_SCH; case FRAME_PCB: case FRAME_PCB_MODULE_EDITOR: case FRAME_PCB_MODULE_VIEWER: - case FRAME_PCB_FOOTPRINT_WIZARD: + case FRAME_PCB_MODULE_VIEWER_MODAL: + case FRAME_PCB_FOOTPRINT_WIZARD_MODAL: case FRAME_PCB_DISPLAY3D: return FACE_PCB; @@ -233,6 +239,12 @@ KIWAY::FACE_T KIWAY::KifaceType( FRAME_T aFrameType ) case FRAME_PL_EDITOR: return FACE_PL_EDITOR; + case FRAME_CALC: + return FACE_PCB_CALCULATOR; + + case FRAME_BM2CMP: + return FACE_BMP2CMP; + default: return FACE_T( -1 ); } @@ -266,7 +278,12 @@ KIWAY_PLAYER* KIWAY::Player( FRAME_T aFrameType, bool doCreate ) if( kiface ) { - KIWAY_PLAYER* frame = (KIWAY_PLAYER*) kiface->CreateWindow( m_top, aFrameType, this, KFCTL_PROJECT_SUITE ); + KIWAY_PLAYER* frame = (KIWAY_PLAYER*) kiface->CreateWindow( + m_top, + aFrameType, + this, + m_ctl // questionable need, these same flags where passed to the KIFACE::OnKifaceStart() + ); wxASSERT( frame ); return m_player[aFrameType] = frame; @@ -327,6 +344,39 @@ void KIWAY::ExpressMail( FRAME_T aDestination, } +void KIWAY::SetLanguage( int aLanguage ) +{ + Pgm().SetLanguageIdentifier( aLanguage ); + Pgm().SetLanguage(); + +#if 1 + // This is a risky hack that goes away if we allow the language to be + // set only from the top most frame if !Kiface.IsSingle() + + // Only for the C++ project manager, and not for the python one and not for + // single_top do we look for the EDA_BASE_FRAME as the top level window. + // For single_top this is not needed because that window is registered in + // the array below. + if( m_ctl & KFCTL_CPP_PROJECT_SUITE ) + { + EDA_BASE_FRAME* top = (EDA_BASE_FRAME*) m_top; + if( top ) + top->ShowChangedLanguage(); + } +#endif + + for( unsigned i=0; i < DIM( m_player ); ++i ) + { + KIWAY_PLAYER* frame = m_player[i]; + + if( frame ) + { + frame->ShowChangedLanguage(); + } + } +} + + bool KIWAY::ProcessEvent( wxEvent& aEvent ) { KIWAY_EXPRESS* mail = dynamic_cast( &aEvent ); @@ -351,3 +401,14 @@ bool KIWAY::ProcessEvent( wxEvent& aEvent ) return false; } + + +void KIWAY::OnKiwayEnd() +{ + for( unsigned i=0; i < DIM( m_kiface ); ++i ) + { + if( m_kiface[i] ) + m_kiface[i]->OnKifaceEnd(); + } +} + diff --git a/common/kiway_player.cpp b/common/kiway_player.cpp index 427fdf3a51..31aca7d1d8 100644 --- a/common/kiway_player.cpp +++ b/common/kiway_player.cpp @@ -2,28 +2,26 @@ #include #include +#include +#include #include BEGIN_EVENT_TABLE( KIWAY_PLAYER, EDA_BASE_FRAME ) - /* have not been able to get this to work yet: EVT_KIWAY_EXPRESS( KIWAY_PLAYER::kiway_express ) - Use Connect() in constructor until this can be sorted out. - - OK the problem is KIWAY_PLAYER::wxEVENT_ID not being unique accross all link images. - */ + EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END, KIWAY_PLAYER::language_change ) END_EVENT_TABLE() - KIWAY_PLAYER::KIWAY_PLAYER( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrameType, const wxString& aTitle, const wxPoint& aPos, const wxSize& aSize, long aStyle, const wxString& aWdoName ) : EDA_BASE_FRAME( aParent, aFrameType, aTitle, aPos, aSize, aStyle, aWdoName ), - KIWAY_HOLDER( aKiway ) + KIWAY_HOLDER( aKiway ), + m_modal_dismissed( 0 ) { DBG( printf("KIWAY_EXPRESS::wxEVENT_ID:%d\n", KIWAY_EXPRESS::wxEVENT_ID );) - Connect( KIWAY_EXPRESS::wxEVENT_ID, wxKiwayExressHandler( KIWAY_PLAYER::kiway_express ) ); + //Connect( KIWAY_EXPRESS::wxEVENT_ID, wxKiwayExressHandler( KIWAY_PLAYER::kiway_express ) ); } @@ -31,10 +29,125 @@ KIWAY_PLAYER::KIWAY_PLAYER( wxWindow* aParent, wxWindowID aId, const wxString& a const wxPoint& aPos, const wxSize& aSize, long aStyle, const wxString& aWdoName ) : EDA_BASE_FRAME( aParent, (FRAME_T) aId, aTitle, aPos, aSize, aStyle, aWdoName ), - KIWAY_HOLDER( 0 ) + KIWAY_HOLDER( 0 ), + m_modal_dismissed( 0 ) { DBG( printf("KIWAY_EXPRESS::wxEVENT_ID:%d\n", KIWAY_EXPRESS::wxEVENT_ID );) - Connect( KIWAY_EXPRESS::wxEVENT_ID, wxKiwayExressHandler( KIWAY_PLAYER::kiway_express ) ); + //Connect( KIWAY_EXPRESS::wxEVENT_ID, wxKiwayExressHandler( KIWAY_PLAYER::kiway_express ) ); +} + + +KIWAY_PLAYER::~KIWAY_PLAYER(){} + + +void KIWAY_PLAYER::KiwayMailIn( KIWAY_EXPRESS& aEvent ) +{ + // override this in derived classes. +} + + +static void makeModal( wxFrame* aFrame, bool IsModal ) +{ + // disable or enable all other top level windows +#if wxCHECK_VERSION(2, 9, 4) + wxWindowList::compatibility_iterator node = wxTopLevelWindows.GetFirst(); + + while( node ) + { + wxWindow* win = node->GetData(); + + if( win != aFrame ) + win->Enable( !IsModal ); + + node = node->GetNext(); + } +#else + // Deprecated since wxWidgets 2.9.4 + aFrame->MakeModal( IsModal ); +#endif +} + + +/** + * toggle global wxFrame enable/disable state, does the re-enable part even + * if an exception is thrown. + */ +struct ENABLE_DISABLE +{ + wxFrame* m_frame; + + ENABLE_DISABLE( wxFrame* aFrame ) : + m_frame( aFrame ) + { + makeModal( aFrame, true ); + } + + ~ENABLE_DISABLE() + { + // Re-enable all frames, (oops, even if they were previously inactive). + // This is probably why this function was deprecated in wx. + makeModal( m_frame, false ); + } +}; + + +bool KIWAY_PLAYER::ShowModal( wxString* aResult ) +{ + /* + This function has a nice interface but an unsightly implementation. + Now it is encapsulated, making it easier to improve. I am not sure + a wxSemaphore was needed, especially since no blocking happens. It seems + like a volatile bool is sufficient. + + It works in tandem with DismissModal(). But only ShowModal() is in the + vtable and therefore cross-module capable. + */ + + volatile bool dismissed = false; + + // disable all frames except the modal one, re-enable on exit, exception safe. + ENABLE_DISABLE toggle( this ); + + m_modal_dismissed = &dismissed; + + Show( true ); + Raise(); + + // Wait for the one and only active frame to call DismissModal() from + // some concluding event. + while( !dismissed ) + { + wxYield(); + wxMilliSleep( 50 ); + } + + // no longer modal, not to mention that the pointer would be invalid outside this scope. + m_modal_dismissed = NULL; + + if( aResult ) + *aResult = m_modal_string; + + return m_modal_ret_val; +} + + +bool KIWAY_PLAYER::IsDismissed() +{ + // if already dismissed, then m_modal_dismissed may be NULL, and if not, + // it can still be dismissed if the bool is true. + bool ret = !m_modal_dismissed || *m_modal_dismissed; + + return ret; +} + + +void KIWAY_PLAYER::DismissModal( bool aRetVal, const wxString& aResult ) +{ + m_modal_ret_val = aRetVal; + m_modal_string = aResult; + + if( m_modal_dismissed ) + *m_modal_dismissed = true; } @@ -42,17 +155,20 @@ void KIWAY_PLAYER::kiway_express( KIWAY_EXPRESS& aEvent ) { // logging support #if defined(DEBUG) - const char* class_name = typeid(this).name(); + const char* class_name = typeid( this ).name(); - printf( "%s: cmd:%d pay:'%s'\n", class_name, - aEvent.GetEventType(), aEvent.GetPayload().c_str() ); + printf( "%s: received cmd:%d pay:'%s'\n", class_name, + aEvent.Command(), aEvent.GetPayload().c_str() ); #endif - KiwayMailIn( aEvent ); // call the virtual, overload in derived. + KiwayMailIn( aEvent ); // call the virtual, override in derived. } -void KIWAY_PLAYER::KiwayMailIn( KIWAY_EXPRESS& aEvent ) +void KIWAY_PLAYER::language_change( wxCommandEvent& event ) { - // overload this. + int id = event.GetId(); + + // tell all the KIWAY_PLAYERs about the language change. + Kiway().SetLanguage( id ); } diff --git a/common/pgm_base.cpp b/common/pgm_base.cpp index 1789f939ed..d7f923676c 100644 --- a/common/pgm_base.cpp +++ b/common/pgm_base.cpp @@ -622,7 +622,7 @@ bool PGM_BASE::SetLanguage( bool first_time ) void PGM_BASE::SetLanguageIdentifier( int menu_id ) { - wxLogDebug( wxT( "Select language ID %d from %zd possible languages." ), + wxLogDebug( wxT( "Select language ID %d from %d possible languages." ), menu_id, DIM( s_Languages ) ); for( unsigned ii = 0; ii < DIM( s_Languages ); ii++ ) diff --git a/common/single_top.cpp b/common/single_top.cpp index 2632a32eae..7d7c816590 100644 --- a/common/single_top.cpp +++ b/common/single_top.cpp @@ -121,7 +121,7 @@ static const wxString dso_full_path( const wxString& aAbsoluteArgv0 ) // Only a single KIWAY is supported in this single_top top level component, // which is dedicated to loading only a single DSO. -KIWAY Kiway( &Pgm() ); +KIWAY Kiway( &Pgm(), KFCTL_STANDALONE ); // implement a PGM_BASE and a wxApp side by side: @@ -225,82 +225,6 @@ struct APP_SINGLE_TOP : public wxApp IMPLEMENT_APP( APP_SINGLE_TOP ); -/** - * Function get_kiface_getter - * returns a KIFACE_GETTER_FUNC for the current process's main implementation - * link image. - * - * @param aDSOName is an absolute full path to the DSO to load and find - * KIFACE_GETTER_FUNC within. - * - * @return KIFACE_GETTER_FUNC* - a pointer to a function which can be called to - * get the KIFACE or NULL if the getter func was not found. If not found, - * it is possibly not version compatible since the lookup is done by name and - * the name contains the API version. - */ -static KIFACE_GETTER_FUNC* get_kiface_getter( const wxString& aDSOName ) -{ -#if defined(BUILD_KIWAY_DLL) - - // Remember single_top only knows about a single DSO. Using an automatic - // with a defeated destructor, see Detach() below, so that the DSO program - // image stays in RAM until process termination, and specifically - // beyond the point in time at which static destructors are run. Otherwise - // a static wxDynamicLibrary's destructor might create an out of sequence - // problem. This was never detected, so it's only a preventative strategy. - wxDynamicLibrary dso; - - void* addr = NULL; - - if( !dso.Load( aDSOName, wxDL_VERBATIM | wxDL_NOW ) ) - { - // Failure: error reporting UI was done via wxLogSysError(). - // No further reporting required here. - } - - else if( ( addr = dso.GetSymbol( wxT( KIFACE_INSTANCE_NAME_AND_VERSION ) ) ) == NULL ) - { - // Failure: error reporting UI was done via wxLogSysError(). - // No further reporting required here. - } - - else - { - // Tell dso's wxDynamicLibrary destructor not to Unload() the program image. - (void) dso.Detach(); - - return (KIFACE_GETTER_FUNC*) addr; - } - - // There is a file installation bug. We only look for KIFACE_I's which we know - // to exist, and we did not find one. If we do not find one, this is an - // installation bug. - - wxString msg = wxString::Format( wxT( - "Fatal Installation Bug\nmissing file:\n'%s'\n\nargv[0]:\n'%s'" ), - GetChars( aDSOName ), - GetChars( wxStandardPaths::Get().GetExecutablePath() ) - ); - - // This is a fatal error, one from which we cannot recover, nor do we want - // to protect against in client code which would require numerous noisy - // tests in numerous places. So we inform the user that the installation - // is bad. This exception will likely not get caught until way up in the - // wxApp derivative, at which point the process will exit gracefully. - THROW_IO_ERROR( msg ); - -#else - return &KIFACE_GETTER; - -#endif -} - - -static KIFACE* kiface; -static int kiface_version; - - - bool PGM_SINGLE_TOP::OnPgmInit( wxApp* aWxApp ) { // first thing: set m_wx_app @@ -321,44 +245,27 @@ bool PGM_SINGLE_TOP::OnPgmInit( wxApp* aWxApp ) if( !initPgm() ) return false; - wxString dname = dso_full_path( absoluteArgv0 ); +#if !defined(BUILD_KIWAY_DLL) + // Get the getter, it is statically linked into this binary image. + KIFACE_GETTER_FUNC* getter = &KIFACE_GETTER; - // Get the getter. - KIFACE_GETTER_FUNC* getter = get_kiface_getter( dname ); - - if( !getter ) - { - // get_kiface_getter() failed & already showed the UI message. - // Return failure without any further UI. - return false; - } + int kiface_version; // Get the KIFACE. - kiface = getter( &kiface_version, KIFACE_VERSION, this ); + KIFACE* kiface = getter( &kiface_version, KIFACE_VERSION, this ); - // KIFACE_GETTER_FUNC function comment (API) says the non-NULL is unconditional. - wxASSERT_MSG( kiface, wxT( "attempted DSO has a bug, failed to return a KIFACE*" ) ); - - // Give the DSO a single chance to do its "process level" initialization. - // "Process level" specifically means stay away from any projects in there. - if( !kiface->OnKifaceStart( this, KFCTL_STANDALONE ) ) - return false; - - // Use KIFACE to create a top window that the KIFACE knows about. - // TOP_FRAME is passed on compiler command line from CMake, and is one of - // the types in FRAME_T. - // KIFACE::CreateWindow() is a virtual so we don't need to link to it. - // Remember its in the *.kiface DSO. -#if 0 - // this pulls in EDA_DRAW_FRAME type info, which we don't want in - // the single_top link image. - KIWAY_PLAYER* frame = dynamic_cast( kiface->CreateWindow( - NULL, TOP_FRAME, &Kiway, KFCTL_STANDALONE ) ); -#else - KIWAY_PLAYER* frame = (KIWAY_PLAYER*) kiface->CreateWindow( - NULL, TOP_FRAME, &Kiway, KFCTL_STANDALONE ); + // Trick the KIWAY into thinking it loaded a KIFACE, by recording the KIFACE + // in the KIWAY. It needs to be there for KIWAY::OnKiwayEnd() anyways. + Kiway.set_kiface( KIWAY::KifaceType( TOP_FRAME ), kiface ); #endif + // Use KIWAY to create a top window, which registers its existence also. + // "TOP_FRAME" is a macro that is passed on compiler command line from CMake, + // and is one of the types in FRAME_T. + KIWAY_PLAYER* frame = Kiway.Player( TOP_FRAME, true ); + + Kiway.SetTop( frame ); + App().SetTopWindow( frame ); // wxApp gets a face. // Open project or file specified on the command line: @@ -454,8 +361,7 @@ bool PGM_SINGLE_TOP::OnPgmInit( wxApp* aWxApp ) void PGM_SINGLE_TOP::OnPgmExit() { - if( kiface ) - kiface->OnKifaceEnd(); + Kiway.OnKiwayEnd(); saveCommonSettings(); diff --git a/cvpcb/cvframe.cpp b/cvpcb/cvframe.cpp index 74b79b3567..3ffd306b7d 100644 --- a/cvpcb/cvframe.cpp +++ b/cvpcb/cvframe.cpp @@ -76,8 +76,6 @@ BEGIN_EVENT_TABLE( CVPCB_MAINFRAME, EDA_BASE_FRAME ) EVT_MENU( ID_CVPCB_LIB_TABLE_EDIT, CVPCB_MAINFRAME::OnEditFootprintLibraryTable ) - EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END, CVPCB_MAINFRAME::SetLanguage ) - // Toolbar events EVT_TOOL( ID_CVPCB_QUIT, CVPCB_MAINFRAME::OnQuit ) EVT_TOOL( ID_CVPCB_READ_INPUT_NETLIST, CVPCB_MAINFRAME::LoadNetList ) @@ -558,12 +556,6 @@ void CVPCB_MAINFRAME::DisplayModule( wxCommandEvent& event ) } -void CVPCB_MAINFRAME::SetLanguage( wxCommandEvent& event ) -{ - EDA_BASE_FRAME::SetLanguage( event ); -} - - void CVPCB_MAINFRAME::DisplayDocFile( wxCommandEvent& event ) { GetAssociatedDocument( this, m_DocModulesFileName, &Kiface().KifaceSearch() ); diff --git a/cvpcb/cvpcb_mainframe.h b/cvpcb/cvpcb_mainframe.h index 8cd8f5c322..3993091dda 100644 --- a/cvpcb/cvpcb_mainframe.h +++ b/cvpcb/cvpcb_mainframe.h @@ -123,12 +123,6 @@ public: void ChangeFocus( bool aMoveRight ); - /** - * Function SetLanguage - * is called on a language menu selection. - */ - void SetLanguage( wxCommandEvent& event ); - void ToFirstNA( wxCommandEvent& event ); void ToPreviousNA( wxCommandEvent& event ); diff --git a/eeschema/block_libedit.cpp b/eeschema/block_libedit.cpp index e9c89d14f5..abf7fc66ed 100644 --- a/eeschema/block_libedit.cpp +++ b/eeschema/block_libedit.cpp @@ -321,7 +321,7 @@ void DrawMovingBlockOutlines( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& wxPoint move_offset; block = &screen->m_BlockLocate; - LIB_EDIT_FRAME* parent = ( LIB_EDIT_FRAME* ) aPanel->GetParent(); + LIB_EDIT_FRAME* parent = (LIB_EDIT_FRAME*) aPanel->GetParent(); wxASSERT( parent != NULL ); LIB_COMPONENT* component = parent->GetComponent(); diff --git a/eeschema/eeschema.cpp b/eeschema/eeschema.cpp index c5e1432036..911c1d138d 100644 --- a/eeschema/eeschema.cpp +++ b/eeschema/eeschema.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -104,6 +105,15 @@ static struct IFACE : public KIFACE_I } break; + + case FRAME_SCH_VIEWER: + case FRAME_SCH_VIEWER_MODAL: + { + LIB_VIEW_FRAME* frame = new LIB_VIEW_FRAME( aKiway, aParent, FRAME_T( aClassId ) ); + return frame; + } + break; + default: return NULL; } diff --git a/eeschema/eeschema_config.cpp b/eeschema/eeschema_config.cpp index caa3b2782b..2a0cccf33b 100644 --- a/eeschema/eeschema_config.cpp +++ b/eeschema/eeschema_config.cpp @@ -118,7 +118,10 @@ EDA_COLOR_T GetInvisibleItemColor() void LIB_EDIT_FRAME::InstallConfigFrame( wxCommandEvent& event ) { - InvokeEeschemaConfig( (SCH_EDIT_FRAME *)GetParent(), this ); + SCH_EDIT_FRAME* frame = (SCH_EDIT_FRAME*) Kiway().Player( FRAME_SCH, false ); + wxASSERT( frame ); + + InvokeEeschemaConfig( frame, this ); } @@ -134,7 +137,9 @@ void LIB_EDIT_FRAME::Process_Config( wxCommandEvent& event ) { int id = event.GetId(); wxFileName fn; - SCH_EDIT_FRAME* schFrame = ( SCH_EDIT_FRAME* ) GetParent(); + + SCH_EDIT_FRAME* schFrame = (SCH_EDIT_FRAME*) Kiway().Player( FRAME_SCH, false ); + wxASSERT( schFrame ); switch( id ) { @@ -143,20 +148,20 @@ void LIB_EDIT_FRAME::Process_Config( wxCommandEvent& event ) break; case ID_CONFIG_READ: - { - fn = g_RootSheet->GetScreen()->GetFileName(); - fn.SetExt( ProjectFileExtension ); + { + fn = g_RootSheet->GetScreen()->GetFileName(); + fn.SetExt( ProjectFileExtension ); - wxFileDialog dlg( this, _( "Read Project File" ), fn.GetPath(), - fn.GetFullName(), ProjectFileWildcard, - wxFD_OPEN | wxFD_FILE_MUST_EXIST ); + wxFileDialog dlg( this, _( "Read Project File" ), fn.GetPath(), + fn.GetFullName(), ProjectFileWildcard, + wxFD_OPEN | wxFD_FILE_MUST_EXIST ); - if( dlg.ShowModal() == wxID_CANCEL ) - break; + if( dlg.ShowModal() == wxID_CANCEL ) + break; - schFrame->LoadProjectFile( dlg.GetPath(), true ); - } - break; + schFrame->LoadProjectFile( dlg.GetPath(), true ); + } + break; // Hotkey IDs diff --git a/eeschema/getpart.cpp b/eeschema/getpart.cpp index fa1f083860..e977eee5c1 100644 --- a/eeschema/getpart.cpp +++ b/eeschema/getpart.cpp @@ -30,6 +30,7 @@ #include #include +#include #include #include #include @@ -55,18 +56,14 @@ wxString SCH_BASE_FRAME::SelectComponentFromLibBrowser( LIB_ALIAS* aPreselectedAlias, int* aUnit, int* aConvert ) { - wxSemaphore semaphore( 0, 1 ); - wxString cmpname; - - // Close the current Lib browser, if open, and open a new one, in "modal" mode: - LIB_VIEW_FRAME* viewlibFrame = LIB_VIEW_FRAME::GetActiveLibraryViewer( this ); + // Close the any current non-modal Lib browser if open, and open a new one, in "modal" mode: + LIB_VIEW_FRAME* viewlibFrame = (LIB_VIEW_FRAME*) Kiway().Player( FRAME_SCH_VIEWER, false ); if( viewlibFrame ) viewlibFrame->Destroy(); - viewlibFrame = new LIB_VIEW_FRAME( &Kiway(), this, NULL, &semaphore, - KICAD_DEFAULT_DRAWFRAME_STYLE | wxFRAME_FLOAT_ON_PARENT ); + viewlibFrame = (LIB_VIEW_FRAME*) Kiway().Player( FRAME_SCH_VIEWER_MODAL, true ); - if ( aPreselectedAlias ) + if( aPreselectedAlias ) { viewlibFrame->SetSelectedLibrary( aPreselectedAlias->GetLibraryName() ); viewlibFrame->SetSelectedComponent( aPreselectedAlias->GetName() ); @@ -80,15 +77,9 @@ wxString SCH_BASE_FRAME::SelectComponentFromLibBrowser( LIB_ALIAS* aPreselectedA viewlibFrame->Refresh(); - // Show the library viewer frame until it is closed - // Wait for viewer closing event: - while( semaphore.TryWait() == wxSEMA_BUSY ) - { - wxYield(); - wxMilliSleep( 50 ); - } + wxString cmpname; - cmpname = viewlibFrame->GetSelectedComponent(); + viewlibFrame->ShowModal( &cmpname ); if( aUnit ) *aUnit = viewlibFrame->GetUnit(); @@ -101,6 +92,7 @@ wxString SCH_BASE_FRAME::SelectComponentFromLibBrowser( LIB_ALIAS* aPreselectedA return cmpname; } + wxString SCH_BASE_FRAME::SelectComponentFromLibrary( const wxString& aLibname, wxArrayString& aHistoryList, int& aHistoryLastUnit, diff --git a/eeschema/libeditframe.cpp b/eeschema/libeditframe.cpp index 1a79cba67e..49ea88353d 100644 --- a/eeschema/libeditframe.cpp +++ b/eeschema/libeditframe.cpp @@ -99,7 +99,7 @@ BEGIN_EVENT_TABLE( LIB_EDIT_FRAME, EDA_DRAW_FRAME ) EVT_SIZE( LIB_EDIT_FRAME::OnSize ) EVT_ACTIVATE( LIB_EDIT_FRAME::OnActivate ) - /* Main horizontal toolbar. */ + // Main horizontal toolbar. EVT_TOOL( ID_LIBEDIT_SAVE_CURRENT_LIB, LIB_EDIT_FRAME::OnSaveActiveLibrary ) EVT_TOOL( ID_LIBEDIT_SELECT_CURRENT_LIB, LIB_EDIT_FRAME::Process_Special_Functions ) EVT_TOOL( ID_LIBEDIT_DELETE_PART, LIB_EDIT_FRAME::DeleteOnePart ) @@ -125,12 +125,12 @@ BEGIN_EVENT_TABLE( LIB_EDIT_FRAME, EDA_DRAW_FRAME ) EVT_COMBOBOX( ID_LIBEDIT_SELECT_PART_NUMBER, LIB_EDIT_FRAME::OnSelectPart ) EVT_COMBOBOX( ID_LIBEDIT_SELECT_ALIAS, LIB_EDIT_FRAME::OnSelectAlias ) - /* Right vertical toolbar. */ + // Right vertical toolbar. EVT_TOOL( ID_NO_TOOL_SELECTED, LIB_EDIT_FRAME::OnSelectTool ) EVT_TOOL_RANGE( ID_LIBEDIT_PIN_BUTT, ID_LIBEDIT_DELETE_ITEM_BUTT, LIB_EDIT_FRAME::OnSelectTool ) - /* menubar commands */ + // menubar commands EVT_MENU( wxID_EXIT, LIB_EDIT_FRAME::CloseWindow ) EVT_MENU( ID_LIBEDIT_SAVE_CURRENT_LIB_AS, LIB_EDIT_FRAME::OnSaveActiveLibrary ) EVT_MENU( ID_LIBEDIT_GEN_PNG_FILE, LIB_EDIT_FRAME::OnPlotCurrentComponent ) @@ -152,9 +152,7 @@ BEGIN_EVENT_TABLE( LIB_EDIT_FRAME, EDA_DRAW_FRAME ) EVT_MENU_RANGE( ID_PREFERENCES_HOTKEY_START, ID_PREFERENCES_HOTKEY_END, LIB_EDIT_FRAME::Process_Config ) - EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END, LIB_EDIT_FRAME::SetLanguage ) - - /* Context menu events and commands. */ + // Context menu events and commands. EVT_MENU( ID_LIBEDIT_EDIT_PIN, LIB_EDIT_FRAME::OnEditPin ) EVT_MENU( ID_LIBEDIT_ROTATE_ITEM, LIB_EDIT_FRAME::OnRotateItem ) @@ -165,7 +163,7 @@ BEGIN_EVENT_TABLE( LIB_EDIT_FRAME, EDA_DRAW_FRAME ) EVT_MENU_RANGE( ID_POPUP_GENERAL_START_RANGE, ID_POPUP_GENERAL_END_RANGE, LIB_EDIT_FRAME::Process_Special_Functions ) - /* Update user interface elements. */ + // Update user interface elements. EVT_UPDATE_UI( ExportPartId, LIB_EDIT_FRAME::OnUpdateEditingPart ) EVT_UPDATE_UI( CreateNewLibAndSavePartId, LIB_EDIT_FRAME::OnUpdateEditingPart ) EVT_UPDATE_UI( ID_LIBEDIT_SAVE_CURRENT_PART, LIB_EDIT_FRAME::OnUpdateEditingPart ) @@ -193,7 +191,7 @@ LIB_EDIT_FRAME::LIB_EDIT_FRAME( KIWAY* aKiway, SCH_EDIT_FRAME* aParent ) : SCH_BASE_FRAME( aKiway, aParent, FRAME_SCH_LIB_EDITOR, _( "Library Editor" ), wxDefaultPosition, wxDefaultSize, KICAD_DEFAULT_DRAWFRAME_STYLE, GetLibEditFrameName() ) { - wxASSERT( aParent ); // LIB_EDIT_FRAME needs a parent, since it peeks up there. + wxASSERT( aParent ); m_FrameName = GetLibEditFrameName(); m_showAxis = true; // true to draw axis @@ -204,6 +202,7 @@ LIB_EDIT_FRAME::LIB_EDIT_FRAME( KIWAY* aKiway, SCH_EDIT_FRAME* aParent ) : m_tempCopyComponent = NULL; m_HotkeysZoomAndGridList = s_Libedit_Hokeys_Descr; m_editPinsPerPartOrConvert = false; + // Initialize grid id to the default value 50 mils: m_LastGridSizeId = ID_POPUP_GRID_LEVEL_50 - ID_POPUP_GRID_LEVEL_1000; @@ -293,12 +292,6 @@ const wxChar* LIB_EDIT_FRAME::GetLibEditFrameName() } -LIB_EDIT_FRAME* LIB_EDIT_FRAME::GetActiveLibraryEditor() -{ - return (LIB_EDIT_FRAME*) wxWindow::FindWindowByName(GetLibEditFrameName()); -} - - void LIB_EDIT_FRAME::LoadSettings( wxConfigBase* aCfg ) { #if 0 // original @@ -389,12 +382,12 @@ void LIB_EDIT_FRAME::OnCloseWindow( wxCloseEvent& Event ) double LIB_EDIT_FRAME::BestZoom() { -/* Please, note: wxMSW before version 2.9 seems have - * problems with zoom values < 1 ( i.e. userscale > 1) and needs to be patched: - * edit file /src/msw/dc.cpp - * search for line static const int VIEWPORT_EXTENT = 1000; - * and replace by static const int VIEWPORT_EXTENT = 10000; - */ + /* Please, note: wxMSW before version 2.9 seems have + * problems with zoom values < 1 ( i.e. userscale > 1) and needs to be patched: + * edit file /src/msw/dc.cpp + * search for line static const int VIEWPORT_EXTENT = 1000; + * and replace by static const int VIEWPORT_EXTENT = 10000; + */ int dx, dy; wxSize size; EDA_RECT BoundaryBox; @@ -750,23 +743,23 @@ void LIB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) break; case ID_POPUP_LIBEDIT_DELETE_CURRENT_POLY_SEGMENT: - { - // Delete the last created segment, while creating a polyline draw item - if( m_drawItem == NULL ) - break; + { + // Delete the last created segment, while creating a polyline draw item + if( m_drawItem == NULL ) + break; - m_canvas->MoveCursorToCrossHair(); - 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( GetCrossHairPosition( true ) ); - m_drawItem->Draw( m_canvas, &dc, wxPoint( 0, 0 ), UNSPECIFIED_COLOR, g_XorMode, NULL, - DefaultTransform ); - m_drawItem->SetFlags( oldFlags ); - m_lastDrawItem = NULL; + m_canvas->MoveCursorToCrossHair(); + 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( GetCrossHairPosition( true ) ); + m_drawItem->Draw( m_canvas, &dc, wxPoint( 0, 0 ), UNSPECIFIED_COLOR, g_XorMode, NULL, + DefaultTransform ); + m_drawItem->SetFlags( oldFlags ); + m_lastDrawItem = NULL; + } break; - } case ID_POPUP_LIBEDIT_DELETE_ITEM: if( m_drawItem ) @@ -918,17 +911,6 @@ void LIB_EDIT_FRAME::EnsureActiveLibExists() } -void LIB_EDIT_FRAME::SetLanguage( wxCommandEvent& event ) -{ - EDA_BASE_FRAME::SetLanguage( event ); - SCH_EDIT_FRAME *parent = (SCH_EDIT_FRAME *)GetParent(); - // Call parent->EDA_BASE_FRAME::SetLanguage and NOT - // parent->SetLanguage because parent->SetLanguage call - // LIB_EDIT_FRAME::SetLanguage - parent->EDA_BASE_FRAME::SetLanguage( event ); -} - - void LIB_EDIT_FRAME::TempCopyComponent() { if( m_tempCopyComponent ) diff --git a/eeschema/libeditframe.h b/eeschema/libeditframe.h index 45582f34d8..07a52b6203 100644 --- a/eeschema/libeditframe.h +++ b/eeschema/libeditframe.h @@ -133,13 +133,6 @@ public: */ static const wxChar* GetLibEditFrameName(); - /** - * Function GetActiveLibraryEditor (static) - * @return a reference to the current opened Library editor - * or NULL if no Library editor currently opened - */ - static LIB_EDIT_FRAME* GetActiveLibraryEditor(); - void ReCreateMenuBar(); /** @@ -149,12 +142,6 @@ public: */ static void EnsureActiveLibExists(); - /** - * Function SetLanguage - * is called on a language menu selection - */ - void SetLanguage( wxCommandEvent& event ); - void InstallConfigFrame( wxCommandEvent& event ); void InstallDimensionsDialog( wxCommandEvent& event ); void OnColorConfig( wxCommandEvent& aEvent ); diff --git a/eeschema/sch_base_frame.cpp b/eeschema/sch_base_frame.cpp index 7908defdc1..ca6ac2f9ed 100644 --- a/eeschema/sch_base_frame.cpp +++ b/eeschema/sch_base_frame.cpp @@ -26,6 +26,7 @@ #include #include #include +#include SCH_BASE_FRAME::SCH_BASE_FRAME( KIWAY* aKiway, wxWindow* aParent, @@ -40,12 +41,10 @@ SCH_BASE_FRAME::SCH_BASE_FRAME( KIWAY* aKiway, wxWindow* aParent, void SCH_BASE_FRAME::OnOpenLibraryViewer( wxCommandEvent& event ) { - LIB_VIEW_FRAME* viewlibFrame = LIB_VIEW_FRAME::GetActiveLibraryViewer( this ); + LIB_VIEW_FRAME* viewlibFrame = (LIB_VIEW_FRAME*) Kiway().Player( FRAME_SCH_VIEWER, true ); - if( viewlibFrame ) - viewlibFrame->Show( true ); - else - new LIB_VIEW_FRAME( &Kiway(), this ); + viewlibFrame->Show( true ); + viewlibFrame->Raise(); } diff --git a/eeschema/schedit.cpp b/eeschema/schedit.cpp index 8706b5c4b5..ff42fdc9af 100644 --- a/eeschema/schedit.cpp +++ b/eeschema/schedit.cpp @@ -664,7 +664,7 @@ static void abortMoveItem( EDA_DRAW_PANEL* aPanel, wxDC* aDC ) { SCH_SCREEN* screen = (SCH_SCREEN*) aPanel->GetScreen(); SCH_ITEM* item = screen->GetCurItem(); - SCH_EDIT_FRAME* parent = ( SCH_EDIT_FRAME* ) aPanel->GetParent(); + SCH_EDIT_FRAME* parent = (SCH_EDIT_FRAME*) aPanel->GetParent(); parent->SetRepeatItem( NULL ); screen->SetCurItem( NULL ); diff --git a/eeschema/schframe.cpp b/eeschema/schframe.cpp index fe38369fd4..db9e8f50ce 100644 --- a/eeschema/schframe.cpp +++ b/eeschema/schframe.cpp @@ -96,8 +96,6 @@ BEGIN_EVENT_TABLE( SCH_EDIT_FRAME, EDA_DRAW_FRAME ) EVT_MENU( ID_COLORS_SETUP, SCH_EDIT_FRAME::OnColorConfig ) EVT_TOOL( wxID_PREFERENCES, SCH_EDIT_FRAME::OnSetOptions ) - EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END, SCH_EDIT_FRAME::SetLanguage ) - EVT_TOOL( ID_TO_LIBRARY, SCH_EDIT_FRAME::OnOpenLibraryEditor ) EVT_TOOL( ID_POPUP_SCH_CALL_LIBEDIT_AND_LOAD_CMP, SCH_EDIT_FRAME::OnOpenLibraryEditor ) EVT_TOOL( ID_TO_LIBVIEW, SCH_EDIT_FRAME::OnOpenLibraryViewer ) @@ -442,13 +440,20 @@ void SCH_EDIT_FRAME::SaveUndoItemInUndoList( SCH_ITEM* aItem ) void SCH_EDIT_FRAME::OnCloseWindow( wxCloseEvent& aEvent ) { - LIB_EDIT_FRAME * libeditFrame = LIB_EDIT_FRAME::GetActiveLibraryEditor();; - if( libeditFrame && !libeditFrame->Close() ) // Can close component editor? - return; + if( Kiface().IsSingle() ) + { + LIB_EDIT_FRAME* libeditFrame = (LIB_EDIT_FRAME*) Kiway().Player( FRAME_SCH_LIB_EDITOR, false ); + if( libeditFrame && !libeditFrame->Close() ) // Can close component editor? + return; - LIB_VIEW_FRAME* viewlibFrame = LIB_VIEW_FRAME::GetActiveLibraryViewer( this ); - if( viewlibFrame && !viewlibFrame->Close() ) // Can close component viewer? - return; + LIB_VIEW_FRAME* viewlibFrame = (LIB_VIEW_FRAME*) Kiway().Player( FRAME_SCH_VIEWER, false ); + if( viewlibFrame && !viewlibFrame->Close() ) // Can close component viewer? + return; + + viewlibFrame = (LIB_VIEW_FRAME*) Kiway().Player( FRAME_SCH_VIEWER_MODAL, false ); + if( viewlibFrame && !viewlibFrame->Close() ) // Can close modal component viewer? + return; + } SCH_SHEET_LIST SheetList; @@ -829,7 +834,7 @@ void SCH_EDIT_FRAME::OnOpenLibraryEditor( wxCommandEvent& event ) { SCH_ITEM* item = GetScreen()->GetCurItem(); - if( (item == NULL) || (item->GetFlags() != 0) || ( item->Type() != SCH_COMPONENT_T ) ) + if( !item || (item->GetFlags() != 0) || ( item->Type() != SCH_COMPONENT_T ) ) { wxMessageBox( _( "Error: not a component or no component" ) ); return; @@ -838,9 +843,21 @@ void SCH_EDIT_FRAME::OnOpenLibraryEditor( wxCommandEvent& event ) component = (SCH_COMPONENT*) item; } - // @todo: should be changed to use Kiway().Player()? + LIB_EDIT_FRAME* libeditFrame = (LIB_EDIT_FRAME*) Kiway().Player( FRAME_SCH_LIB_EDITOR, false ); + if( !libeditFrame ) + { + libeditFrame = (LIB_EDIT_FRAME*) Kiway().Player( FRAME_SCH_LIB_EDITOR, true ); + libeditFrame->Show( true ); + } + else + { + // if( libeditFrame->IsIconized() ) + // libeditFrame->Iconize( false ); + } - LIB_EDIT_FRAME* libeditFrame = LIB_EDIT_FRAME::GetActiveLibraryEditor();; + libeditFrame->Raise(); + +#if 0 if( libeditFrame ) { if( libeditFrame->IsIconized() ) @@ -855,6 +872,8 @@ void SCH_EDIT_FRAME::OnOpenLibraryEditor( wxCommandEvent& event ) wxWindow* w = kf.CreateWindow( this, FRAME_SCH_LIB_EDITOR, &Kiway(), kf.StartFlags() ); libeditFrame = dynamic_cast( w ); } +#endif + if( component ) { @@ -875,16 +894,6 @@ void SCH_EDIT_FRAME::OnExit( wxCommandEvent& event ) } -void SCH_EDIT_FRAME::SetLanguage( wxCommandEvent& event ) -{ - EDA_BASE_FRAME::SetLanguage( event ); - - LIB_EDIT_FRAME * libeditFrame = LIB_EDIT_FRAME::GetActiveLibraryEditor();; - if( libeditFrame ) - libeditFrame->EDA_BASE_FRAME::SetLanguage( event ); -} - - void SCH_EDIT_FRAME::OnPrint( wxCommandEvent& event ) { wxFileName fn; diff --git a/eeschema/sheet.cpp b/eeschema/sheet.cpp index 62d9fca131..23e9ae5100 100644 --- a/eeschema/sheet.cpp +++ b/eeschema/sheet.cpp @@ -283,7 +283,7 @@ static void ExitSheet( EDA_DRAW_PANEL* aPanel, wxDC* aDC ) SCH_SCREEN* screen = (SCH_SCREEN*) aPanel->GetScreen(); SCH_ITEM* item = screen->GetCurItem(); - SCH_EDIT_FRAME* parent = ( SCH_EDIT_FRAME* ) aPanel->GetParent(); + SCH_EDIT_FRAME* parent = (SCH_EDIT_FRAME*) aPanel->GetParent(); if( (item == NULL) || (item->Type() != SCH_SHEET_T) || (parent == NULL) ) return; diff --git a/eeschema/tool_viewlib.cpp b/eeschema/tool_viewlib.cpp index 5dce538405..f929ad5c28 100644 --- a/eeschema/tool_viewlib.cpp +++ b/eeschema/tool_viewlib.cpp @@ -116,9 +116,9 @@ void LIB_VIEW_FRAME::ReCreateHToolbar() _( "View component documents" ) ); m_mainToolBar->EnableTool( ID_LIBVIEW_VIEWDOC, false ); - if( m_semaphore ) + // if library browser is modal + if( m_Ident == FRAME_SCH_VIEWER_MODAL ) { - // The library browser is called from a "load component" command m_mainToolBar->AddSeparator(); m_mainToolBar->AddTool( ID_LIBVIEW_CMP_EXPORT_TO_SCHEMATIC, wxEmptyString, KiBitmap( export_xpm ), diff --git a/eeschema/viewlib_frame.cpp b/eeschema/viewlib_frame.cpp index 33b05c1bc6..e4af57c174 100644 --- a/eeschema/viewlib_frame.cpp +++ b/eeschema/viewlib_frame.cpp @@ -47,28 +47,25 @@ */ wxString LIB_VIEW_FRAME::m_libraryName; wxString LIB_VIEW_FRAME::m_entryName; + int LIB_VIEW_FRAME::m_unit = 1; int LIB_VIEW_FRAME::m_convert = 1; -/// When the viewer is used to select a component in schematic, the selected component is here. -wxString LIB_VIEW_FRAME::m_exportToEeschemaCmpName; - - BEGIN_EVENT_TABLE( LIB_VIEW_FRAME, EDA_DRAW_FRAME ) - /* Window events */ + // Window events EVT_CLOSE( LIB_VIEW_FRAME::OnCloseWindow ) EVT_SIZE( LIB_VIEW_FRAME::OnSize ) EVT_ACTIVATE( LIB_VIEW_FRAME::OnActivate ) - /* Toolbar events */ + // Toolbar events EVT_TOOL_RANGE( ID_LIBVIEW_NEXT, ID_LIBVIEW_DE_MORGAN_CONVERT_BUTT, LIB_VIEW_FRAME::Process_Special_Functions ) EVT_TOOL( ID_LIBVIEW_CMP_EXPORT_TO_SCHEMATIC, LIB_VIEW_FRAME::ExportToSchematicLibraryPart ) EVT_COMBOBOX( ID_LIBVIEW_SELECT_PART_NUMBER, LIB_VIEW_FRAME::Process_Special_Functions ) - /* listbox events */ + // listbox events EVT_LISTBOX( ID_LIBVIEW_LIB_LIST, LIB_VIEW_FRAME::ClickOnLibList ) EVT_LISTBOX( ID_LIBVIEW_CMP_LIST, LIB_VIEW_FRAME::ClickOnCmpList ) EVT_LISTBOX_DCLICK( ID_LIBVIEW_CMP_LIST, LIB_VIEW_FRAME::DClickOnCmpList ) @@ -95,11 +92,17 @@ static wxAcceleratorEntry accels[] = #define ACCEL_TABLE_CNT ( sizeof( accels ) / sizeof( wxAcceleratorEntry ) ) #define LIB_VIEW_FRAME_NAME wxT( "ViewlibFrame" ) -LIB_VIEW_FRAME::LIB_VIEW_FRAME( KIWAY* aKiway, SCH_BASE_FRAME* aParent, - CMP_LIBRARY* aLibrary, wxSemaphore* aSemaphore, long aStyle ) : - SCH_BASE_FRAME( aKiway, aParent, FRAME_SCH_VIEWER, _( "Library Browser" ), - wxDefaultPosition, wxDefaultSize, aStyle, GetLibViewerFrameName() ) +LIB_VIEW_FRAME::LIB_VIEW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrameType, + CMP_LIBRARY* aLibrary ) : + SCH_BASE_FRAME( aKiway, aParent, aFrameType, _( "Library Browser" ), + wxDefaultPosition, wxDefaultSize, + aFrameType==FRAME_SCH_VIEWER ? + KICAD_DEFAULT_DRAWFRAME_STYLE : + KICAD_DEFAULT_DRAWFRAME_STYLE | wxFRAME_FLOAT_ON_PARENT, + GetLibViewerFrameName() ) { + wxASSERT( aFrameType==FRAME_SCH_VIEWER || aFrameType==FRAME_SCH_VIEWER_MODAL ); + wxAcceleratorTable table( ACCEL_TABLE_CNT, accels ); m_FrameName = GetLibViewerFrameName(); @@ -114,12 +117,6 @@ LIB_VIEW_FRAME::LIB_VIEW_FRAME( KIWAY* aKiway, SCH_BASE_FRAME* aParent, m_HotkeysZoomAndGridList = s_Viewlib_Hokeys_Descr; m_cmpList = NULL; m_libList = NULL; - m_semaphore = aSemaphore; - - if( m_semaphore ) - SetModalMode( true ); - - m_exportToEeschemaCmpName.Empty(); SetScreen( new SCH_SCREEN() ); GetScreen()->m_Center = true; // Axis origin centered on screen. @@ -139,10 +136,10 @@ LIB_VIEW_FRAME::LIB_VIEW_FRAME( KIWAY* aKiway, SCH_BASE_FRAME* aParent, wxPoint win_pos( 0, 0 ); - if( aLibrary == NULL ) + if( !aLibrary ) { // Creates the libraries window display - m_libList = new wxListBox( this, ID_LIBVIEW_LIB_LIST, + m_libList = new wxListBox( this, ID_LIBVIEW_LIB_LIST, wxPoint( 0, 0 ), wxSize(m_libListWidth, -1), 0, NULL, wxLB_HSCROLL ); } @@ -243,25 +240,19 @@ const wxChar* LIB_VIEW_FRAME::GetLibViewerFrameName() } -LIB_VIEW_FRAME* LIB_VIEW_FRAME::GetActiveLibraryViewer( const wxWindow* aParent ) -{ - return (LIB_VIEW_FRAME*) wxWindow::FindWindowByName( GetLibViewerFrameName(), aParent ); -} - - void LIB_VIEW_FRAME::OnCloseWindow( wxCloseEvent& Event ) { - if( m_semaphore ) - { - m_semaphore->Post(); - // This window will be destroyed by the calling function, - // if needed - SetModalMode( false ); - } - else + if( !IsModal() ) { Destroy(); } + else if( !IsDismissed() ) + { + // only dismiss modal frame if not already dismissed. + DismissModal( false ); + + // Modal frame will be destroyed by the calling function. + } } @@ -283,12 +274,13 @@ void LIB_VIEW_FRAME::OnSetRelativeOffset( wxCommandEvent& event ) double LIB_VIEW_FRAME::BestZoom() { -/* Please, note: wxMSW before version 2.9 seems have - * problems with zoom values < 1 ( i.e. userscale > 1) and needs to be patched: - * edit file /src/msw/dc.cpp - * search for line static const int VIEWPORT_EXTENT = 1000; - * and replace by static const int VIEWPORT_EXTENT = 10000; - */ + /* Please, note: wxMSW before version 2.9 seems have + * problems with zoom values < 1 ( i.e. userscale > 1) and needs to be patched: + * edit file /src/msw/dc.cpp + * search for line static const int VIEWPORT_EXTENT = 1000; + * and replace by static const int VIEWPORT_EXTENT = 10000; + */ + LIB_COMPONENT* component = NULL; double bestzoom = 16.0; // default value for bestzoom CMP_LIBRARY* lib = CMP_LIBRARY::FindLibrary( m_libraryName ); @@ -344,8 +336,8 @@ void LIB_VIEW_FRAME::ReCreateListLib() } else { - /* If not found, clear current library selection because it can be - * deleted after a config change. */ + // If not found, clear current library selection because it can be + // deleted after a config change. m_libraryName = wxEmptyString; m_entryName = wxEmptyString; m_unit = 1; @@ -417,6 +409,7 @@ void LIB_VIEW_FRAME::SetSelectedLibrary( const wxString& aLibraryName ) m_canvas->Refresh(); DisplayLibInfos(); ReCreateHToolbar(); + // Ensure the corresponding line in m_libList is selected // (which is not necessary the case if SetSelectedLibrary is called // by an other caller than ClickOnLibList. @@ -440,9 +433,10 @@ void LIB_VIEW_FRAME::SetSelectedComponent( const wxString& aComponentName ) if( m_entryName.CmpNoCase( aComponentName ) != 0 ) { m_entryName = aComponentName; + // Ensure the corresponding line in m_cmpList is selected - // (which is not necessary the case if SetSelectedComponent is called - // by an other caller than ClickOnCmpList. + // (which is not necessarily the case if SetSelectedComponent is called + // by another caller than ClickOnCmpList. m_cmpList->SetStringSelection( aComponentName, true ); DisplayLibInfos(); m_unit = 1; @@ -456,14 +450,21 @@ void LIB_VIEW_FRAME::SetSelectedComponent( const wxString& aComponentName ) void LIB_VIEW_FRAME::DClickOnCmpList( wxCommandEvent& event ) { - if( m_semaphore ) + if( IsModal() ) { ExportToSchematicLibraryPart( event ); - // Prevent the double click from being as a single click in the parent - // window which would cause the part to be parked rather than staying - // in drag mode. - ((SCH_BASE_FRAME*) GetParent())->SkipNextLeftButtonReleaseEvent(); + // The schematic editor might not be the parent of the library viewer. + // It could be a python window. + SCH_EDIT_FRAME* schframe = dynamic_cast( GetParent() ); + + if( schframe ) + { + // Prevent the double click from being as a single click in the parent + // window which would cause the part to be parked rather than staying + // in drag mode. + schframe->SkipNextLeftButtonReleaseEvent(); + } } } @@ -473,9 +474,17 @@ void LIB_VIEW_FRAME::ExportToSchematicLibraryPart( wxCommandEvent& event ) int ii = m_cmpList->GetSelection(); if( ii >= 0 ) - m_exportToEeschemaCmpName = m_cmpList->GetString( ii ); + { + wxString part_name = m_cmpList->GetString( ii ); + + // a selection was made, pass true + DismissModal( true, part_name ); + } else - m_exportToEeschemaCmpName.Empty(); + { + // no selection was made, pass false + DismissModal( false ); + } Close( true ); } @@ -524,10 +533,6 @@ void LIB_VIEW_FRAME::OnActivate( wxActivateEvent& event ) { EDA_DRAW_FRAME::OnActivate( event ); - // Ensure we do not have old selection: - if( m_FrameIsActive ) - m_exportToEeschemaCmpName.Empty(); - if( m_libList ) ReCreateListLib(); diff --git a/eeschema/viewlib_frame.h b/eeschema/viewlib_frame.h index bdb304a312..4e67d0eafc 100644 --- a/eeschema/viewlib_frame.h +++ b/eeschema/viewlib_frame.h @@ -38,7 +38,6 @@ class wxSashLayoutWindow; class wxListBox; -class wxSemaphore; class CMP_LIBRARY; @@ -48,9 +47,14 @@ class CMP_LIBRARY; class LIB_VIEW_FRAME : public SCH_BASE_FRAME { public: - LIB_VIEW_FRAME( KIWAY* aKiway, SCH_BASE_FRAME* aParent, - CMP_LIBRARY* aLibrary = NULL, wxSemaphore* aSemaphore = NULL, - long aStyle = KICAD_DEFAULT_DRAWFRAME_STYLE ); + + /** + * Constructor + * @param aFrameType must be given either FRAME_SCH_LIB_VIEWER or + * FRAME_SCH_LIB_VIEWER_MODAL + */ + LIB_VIEW_FRAME( KIWAY* aKiway, wxWindow* aParent, + FRAME_T aFrameType, CMP_LIBRARY* aLibrary = NULL ); ~LIB_VIEW_FRAME(); @@ -61,13 +65,6 @@ public: */ static const wxChar* GetLibViewerFrameName(); - /** - * Function GetActiveLibraryViewer (static) - * @return a reference to the current opened Library viewer - * or NULL if no Library viewer currently opened - */ - static LIB_VIEW_FRAME* GetActiveLibraryViewer( const wxWindow* aParent ); - void OnSize( wxSizeEvent& event ); /** @@ -109,7 +106,6 @@ public: * @param the alias name of the component to be selected. */ void SetSelectedComponent( const wxString& aComponentName ); - const wxString& GetSelectedComponent( void ) const { return m_exportToEeschemaCmpName; } void SetUnit( int aUnit ) { m_unit = aUnit; } int GetUnit( void ) { return m_unit; } @@ -147,8 +143,6 @@ private: wxListBox* m_cmpList; // The list of components int m_cmpListWidth; // Last width of the window - // Flags - wxSemaphore* m_semaphore; // != NULL if the frame must emulate a modal dialog wxString m_configPath; // subpath for configuration // TODO(hzeller): looks like these members were chosen to be static to survive different @@ -156,11 +150,8 @@ private: // ugly hack, and should be solved differently. static wxString m_libraryName; - // TODO(hzeller): figure out what the difference between these is and the motivation to - // have this distinction. Shouldn't these essentially be the same ? static wxString m_entryName; - static wxString m_exportToEeschemaCmpName; // When the viewer is used to select a component - // in schematic, the selected component is here + static int m_unit; static int m_convert; diff --git a/gerbview/events_called_functions.cpp b/gerbview/events_called_functions.cpp index a1021c1fab..6f258ab2b8 100644 --- a/gerbview/events_called_functions.cpp +++ b/gerbview/events_called_functions.cpp @@ -52,8 +52,6 @@ BEGIN_EVENT_TABLE( GERBVIEW_FRAME, EDA_DRAW_FRAME ) GERBVIEW_FRAME::OnSelectOptionToolbar ) EVT_MENU( wxID_PREFERENCES, GERBVIEW_FRAME::InstallGerberOptionsDialog ) - EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END, EDA_DRAW_FRAME::SetLanguage ) - // menu Postprocess EVT_MENU( ID_GERBVIEW_SHOW_LIST_DCODES, GERBVIEW_FRAME::Process_Special_Functions ) EVT_MENU( ID_GERBVIEW_SHOW_SOURCE, GERBVIEW_FRAME::OnShowGerberSourceFile ) @@ -209,9 +207,6 @@ void GERBVIEW_FRAME::Process_Special_Functions( wxCommandEvent& event ) } -/* Selects the active DCode for the current active layer. - * Items using this DCode are hightlighted - */ void GERBVIEW_FRAME::OnSelectActiveDCode( wxCommandEvent& event ) { GERBER_IMAGE* gerber_image = g_GERBER_List[getActiveLayer()]; @@ -228,10 +223,7 @@ void GERBVIEW_FRAME::OnSelectActiveDCode( wxCommandEvent& event ) } } -/* Selects the active layer: - * - if a file is loaded, it is loaded in this layer - * _ this layer is displayed on top of other layers - */ + void GERBVIEW_FRAME::OnSelectActiveLayer( wxCommandEvent& event ) { LAYER_NUM layer = getActiveLayer(); @@ -246,9 +238,6 @@ void GERBVIEW_FRAME::OnSelectActiveLayer( wxCommandEvent& event ) } -/* Call preferred editor to show (and edit) the gerber source file - * loaded in the active layer - */ void GERBVIEW_FRAME::OnShowGerberSourceFile( wxCommandEvent& event ) { LAYER_NUM layer = getActiveLayer(); @@ -275,9 +264,6 @@ void GERBVIEW_FRAME::OnShowGerberSourceFile( wxCommandEvent& event ) } -/* Function OnSelectDisplayMode: called to select display mode - * (fast display, or exact mode with stacked images or with transparency - */ void GERBVIEW_FRAME::OnSelectDisplayMode( wxCommandEvent& event ) { int oldMode = GetDisplayMode(); @@ -301,20 +287,20 @@ void GERBVIEW_FRAME::OnSelectDisplayMode( wxCommandEvent& event ) m_canvas->Refresh(); } + void GERBVIEW_FRAME::OnQuit( wxCommandEvent& event ) { Close( true ); } -/** - * Function SetLanguage - * called on a language menu selection - * Update Layer manager title and tabs texts - */ -void GERBVIEW_FRAME::SetLanguage( wxCommandEvent& event ) + +void GERBVIEW_FRAME::ShowChangedLanguage() { - EDA_DRAW_FRAME::SetLanguage( event ); + // call my base class + EDA_DRAW_FRAME::ShowChangedLanguage(); + m_LayersManager->SetLayersManagerTabsText(); + wxAuiPaneInfo& pane_info = m_auimgr.GetPane( m_LayersManager ); pane_info.Caption( _( "Visibles" ) ); m_auimgr.Update(); @@ -322,14 +308,12 @@ void GERBVIEW_FRAME::SetLanguage( wxCommandEvent& event ) ReFillLayerWidget(); } -/** - * Function OnSelectOptionToolbar - * called to validate current choices - */ + void GERBVIEW_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) { - int id = event.GetId(); - bool state; + int id = event.GetId(); + bool state; + switch( id ) { case ID_MENU_GERBVIEW_SHOW_HIDE_LAYERS_MANAGER_DIALOG: @@ -374,6 +358,7 @@ void GERBVIEW_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) break; case ID_TB_OPTIONS_SHOW_LAYERS_MANAGER_VERTICAL_TOOLBAR: + // show/hide auxiliary Vertical layers and visibility manager toolbar m_show_layer_manager_tools = state; m_auimgr.GetPane( wxT( "m_LayersManagerToolBar" ) ).Show( m_show_layer_manager_tools ); diff --git a/gerbview/gerbview_frame.h b/gerbview/gerbview_frame.h index f703ece8ee..df14fdaa4b 100644 --- a/gerbview/gerbview_frame.h +++ b/gerbview/gerbview_frame.h @@ -462,11 +462,7 @@ public: void SaveSettings( wxConfigBase* aCfg ); // override virtual - /** - * Function SetLanguage - * called on a language menu selection - */ - virtual void SetLanguage( wxCommandEvent& event ); + void ShowChangedLanguage(); // override EDA_BASE_FRAME virtual void Process_Special_Functions( wxCommandEvent& event ); void OnSelectOptionToolbar( wxCommandEvent& event ); diff --git a/include/draw_frame.h b/include/draw_frame.h index 67aba863c1..aaf999edec 100644 --- a/include/draw_frame.h +++ b/include/draw_frame.h @@ -281,13 +281,6 @@ public: void EraseMsgBox(); void Process_PageSettings( wxCommandEvent& event ); - /** - * Function SetLanguage - * called on a language menu selection - * when using a derived function, do not forget to call this one - */ - virtual void SetLanguage( wxCommandEvent& event ); - virtual void ReCreateHToolbar() = 0; virtual void ReCreateVToolbar() = 0; virtual void ReCreateMenuBar(); diff --git a/include/fpid.h b/include/fpid.h index 853983ad51..ec1ab80931 100644 --- a/include/fpid.h +++ b/include/fpid.h @@ -80,9 +80,7 @@ public: * @return int - minus 1 (i.e. -1) means success, >= 0 indicates the character offset into * aId at which an error was detected. */ - int Parse( const std::string& aId ); - - int Parse( const wxString& aId ); + int Parse( const UTF8& aId ); /** * Function GetLibNickname @@ -100,9 +98,7 @@ public: * into the parameter at which an error was detected, usually because it * contained '/' or ':'. */ - int SetLibNickname( const std::string& aNickname ); - - int SetLibNickname( const wxString& aNickname ); + int SetLibNickname( const UTF8& aNickname ); /** * Function GetFootprintName @@ -114,11 +110,9 @@ public: * Function SetFootprintName * overrides the footprint name portion of the FPID to @a aFootprintName */ - int SetFootprintName( const std::string& aFootprintName ); + int SetFootprintName( const UTF8& aFootprintName ); - int SetFootprintName( const wxString& aFootprintName ); - - int SetRevision( const std::string& aRevision ); + int SetRevision( const UTF8& aRevision ); const UTF8& GetRevision() const { return revision; } @@ -136,10 +130,10 @@ public: * aLibNickname, aFootprintName, and aRevision. * * @throw PARSE_ERROR if any of the pieces are illegal. - */ - static UTF8 Format( const std::string& aLibNickname, const std::string& aFootprintName, - const std::string& aRevision ) + static UTF8 Format( const UTF8& aLibNickname, const UTF8& aFootprintName, + const UTF8& aRevision = "" ) throw( PARSE_ERROR ); + */ /** * Function IsValid diff --git a/include/frame_type.h b/include/frame_type.h index 23411168c6..e58f615659 100644 --- a/include/frame_type.h +++ b/include/frame_type.h @@ -11,22 +11,35 @@ enum FRAME_T FRAME_SCH, FRAME_SCH_LIB_EDITOR, FRAME_SCH_VIEWER, + FRAME_SCH_VIEWER_MODAL, + FRAME_PCB, FRAME_PCB_MODULE_EDITOR, FRAME_PCB_MODULE_VIEWER, - FRAME_PCB_FOOTPRINT_WIZARD, + FRAME_PCB_MODULE_VIEWER_MODAL, + FRAME_PCB_FOOTPRINT_WIZARD_MODAL, FRAME_PCB_DISPLAY3D, + FRAME_CVPCB, FRAME_CVPCB_DISPLAY, + FRAME_GERBER, - KIWAY_PLAYER_COUNT, // counts subset of FRAME_T's tracked in class KIWAY - - KICAD_MAIN_FRAME_T = KIWAY_PLAYER_COUNT, FRAME_PL_EDITOR, - //TEXT_EDITOR_FRAME_T, + + FRAME_BM2CMP, + + FRAME_CALC, + + KIWAY_PLAYER_COUNT, // counts subset of FRAME_T's which are KIWAY_PLAYER derivatives + + // C++ project manager is not a KIWAY_PLAYER + KICAD_MAIN_FRAME_T = KIWAY_PLAYER_COUNT, FRAME_T_COUNT }; + //TEXT_EDITOR_FRAME_T, + + #endif // FRAME_T_H_ diff --git a/include/kiface_i.h b/include/kiface_i.h index 9fe034603a..23f053580c 100644 --- a/include/kiface_i.h +++ b/include/kiface_i.h @@ -58,7 +58,7 @@ public: } VTBL_ENTRY wxWindow* CreateWindow( wxWindow* aParent, - int aClassId, KIWAY* aKIWAY, int aCtlBits ) = 0; + int aClassId, KIWAY* aKIWAY, int aCtlBits = 0 ) = 0; VTBL_ENTRY void* IfaceOrAddress( int aDataId ) = 0; diff --git a/include/kiway.h b/include/kiway.h index 9b2ffd6b2d..469a0fde27 100644 --- a/include/kiway.h +++ b/include/kiway.h @@ -150,7 +150,8 @@ struct KIFACE // this interface. #define KFCTL_STANDALONE (1<<0) ///< Am running as a standalone Top. -#define KFCTL_PROJECT_SUITE (1<<1) ///< Am running under a project mgr, possibly with others +#define KFCTL_CPP_PROJECT_SUITE (1<<1) ///< Am running under C++ project mgr, possibly with others +#define KFCTL_PY_PROJECT_SUITE (1<<2) ///< Am running under python project mgr, possibly with others /** @@ -201,7 +202,7 @@ struct KIFACE * not contained in the caller's link image. */ VTBL_ENTRY wxWindow* CreateWindow( wxWindow* aParent, int aClassId, - KIWAY* aKIWAY, int aCtlBits ) = 0; + KIWAY* aKIWAY, int aCtlBits = 0 ) = 0; /** * Function IfaceOrAddress @@ -249,6 +250,7 @@ struct KIFACE */ class KIWAY : public wxEvtHandler { + friend class PGM_SINGLE_TOP; // can use set_kiface() public: /// Known KIFACE implementations @@ -257,16 +259,12 @@ public: FACE_SCH, ///< eeschema DSO FACE_PCB, ///< pcbnew DSO FACE_CVPCB, - - /// count of those above here, which is the subset managed in a KIWAY. - KIWAY_FACE_COUNT, - - FACE_BMP2CMP = KIWAY_FACE_COUNT, FACE_GERBVIEW, FACE_PL_EDITOR, FACE_PCB_CALCULATOR, + FACE_BMP2CMP, - FACE_COUNT + KIWAY_FACE_COUNT }; /** @@ -302,7 +300,7 @@ public: * @return KIWAY_PLAYER* - a valid opened KIWAY_PLAYER or NULL if there * is something wrong or doCreate was false and the player has yet to be created. */ - VTBL_ENTRY KIWAY_PLAYER* Player( FRAME_T aFrameType, bool doCreate = true ); + VTBL_ENTRY KIWAY_PLAYER* Player( FRAME_T aFrameType, bool doCreate = true ); /** * Function PlayerClose @@ -312,7 +310,7 @@ public: * * @return bool - true the window is closed and not vetoed, else false. */ - VTBL_ENTRY bool PlayerClose( FRAME_T aFrameType, bool doForce ); + VTBL_ENTRY bool PlayerClose( FRAME_T aFrameType, bool doForce ); /** * Function PlayersClose @@ -325,7 +323,14 @@ public: */ VTBL_ENTRY bool PlayersClose( bool doForce ); - VTBL_ENTRY void ExpressMail( FRAME_T aDestination, MAIL_T aCommand, const std::string& aPayload, wxWindow* aSource=NULL ); + /** + * Function ExpressMail + * send aPayload to aDestination from aSource. Recipient receives this in its + * KIWAY_PLAYER::KiwayMailIn() function and can efficiently switch() based on + * aCommand in there. + */ + VTBL_ENTRY void ExpressMail( FRAME_T aDestination, MAIL_T aCommand, + const std::string& aPayload, wxWindow* aSource = NULL ); /** * Function Prj @@ -335,11 +340,26 @@ public: */ VTBL_ENTRY PROJECT& Prj() const; - KIWAY( PGM_BASE* aProgram, wxFrame* aTop = NULL ); + /** + * Function SetLanguage + * changes the language and then calls ShowChangedLanguage() on all KIWAY_PLAYERs. + */ + VTBL_ENTRY void SetLanguage( int aLanguage ); - /// In case aTop may not be known at time of KIWAY construction: + KIWAY( PGM_BASE* aProgram, int aCtlBits, wxFrame* aTop = NULL ); + + /** + * Function SetTop + * tells this KIWAY about the top most frame in the program and optionally + * allows it to play the role of one of the KIWAY_PLAYERs if launched from + * single_top.cpp. + * + * @param aTop is the top most wxFrame in the entire program. + */ void SetTop( wxFrame* aTop ); + void OnKiwayEnd(); + bool ProcessEvent( wxEvent& aEvent ); // overload virtual private: @@ -348,12 +368,23 @@ private: static const wxString dso_full_path( FACE_T aFaceId ); /// hooked into m_top in SetTop(), marks child frame as closed. - void playerDestroyHandler( wxWindowDestroyEvent& event ); + void player_destroy_handler( wxWindowDestroyEvent& event ); + + bool set_kiface( FACE_T aFaceType, KIFACE* aKiface ) + { + if( unsigned( aFaceType ) < unsigned( KIWAY_FACE_COUNT ) ) + { + m_kiface[aFaceType] = aKiface; + return true; + } + return false; + } static KIFACE* m_kiface[KIWAY_FACE_COUNT]; static int m_kiface_version[KIWAY_FACE_COUNT]; PGM_BASE* m_program; + int m_ctl; wxFrame* m_top; KIWAY_PLAYER* m_player[KIWAY_PLAYER_COUNT]; // from frame_type.h diff --git a/include/kiway_player.h b/include/kiway_player.h index 75b1189053..8188ad35c8 100644 --- a/include/kiway_player.h +++ b/include/kiway_player.h @@ -35,6 +35,8 @@ class PROJECT; struct KIFACE; class KIFACE_I; +#define VTBL_ENTRY virtual + /** * Class KIWAY_HOLDER @@ -80,7 +82,7 @@ public: private: // private, all setting is done through SetKiway(). - KIWAY* m_kiway; // no ownership. + KIWAY* m_kiway; // no ownership. }; @@ -110,6 +112,9 @@ public: const wxPoint& aPos, const wxSize& aSize, long aStyle, const wxString& aWdoName = wxFrameNameStr ); + ~KIWAY_PLAYER(); + + //--------------------------------------------------------- // For the aCtl argument of OpenProjectFiles() #define KICTL_OPEN_APPEND (1<<0) ///< append the data file, rather than replace @@ -149,7 +154,7 @@ public: * * @return bool - true if all requested files were opened OK, else false. */ - virtual bool OpenProjectFiles( const std::vector& aFileList, int aCtl = 0 ) + VTBL_ENTRY bool OpenProjectFiles( const std::vector& aFileList, int aCtl = 0 ) { // overload me for your wxFrame type. @@ -161,6 +166,25 @@ public: return false; } + /** + * Function ShowModal + * puts up this wxFrame as if it were a modal dialog, with all other instantiated + * wxFrames disabled until this KIWAY_PLAYER derivative calls DismissModal(). + * That is, behavior is similar to a modal dialog window. Not all KIWAY_PLAYERs + * use this interface, so don't call this unless the implementation knows how + * to call DismissModal() on a button click or double click or some special + * event which ends the modal behavior. + * + * @param aResult if not NULL, indicates a place to put a resultant string. + * + * @return bool - true if frame implementation called KIWAY_PLAYER::DismissModal() + * with aRetVal of true. + */ + VTBL_ENTRY bool ShowModal( wxString* aResult ); + + //-------------------------------------------------------- + + /** * Function KiwayMailIn * receives KIWAY_EXPRESS messages from other players. Merely override it @@ -168,12 +192,35 @@ public: */ virtual void KiwayMailIn( KIWAY_EXPRESS& aEvent ); - DECLARE_EVENT_TABLE() +protected: -//private: + bool IsModal() { return m_modal_dismissed; } - /// event handler, routes to virtual KiwayMailIn() + /** + * Function IsDismissed + * returns false only if both the frame is acting in modal mode and it has not been + * dismissed yet with DismissModal(). IOW, it will return true if the dialog is + * not modal or if it is modal and has been dismissed. + */ + bool IsDismissed(); + + void DismissModal( bool aRetVal, const wxString& aResult = wxEmptyString ); + + /// event handler, routes to derivative specific virtual KiwayMailIn() void kiway_express( KIWAY_EXPRESS& aEvent ); + + /** + * Function language_change + * is an event handler called on a language menu selection. + */ + void language_change( wxCommandEvent& event ); + + // variables for modal behavior support, only used by a few derivatives. + volatile bool* m_modal_dismissed; // points to "dismissed state", NULL means not modal + wxString m_modal_string; + bool m_modal_ret_val; // true if a selection was made + + DECLARE_EVENT_TABLE() }; diff --git a/include/wxEeschemaStruct.h b/include/wxEeschemaStruct.h index fea2499c69..171351d321 100644 --- a/include/wxEeschemaStruct.h +++ b/include/wxEeschemaStruct.h @@ -813,12 +813,6 @@ private: void OnUpdateBusOrientation( wxUpdateUIEvent& event ); void OnUpdateSelectTool( wxUpdateUIEvent& aEvent ); - /** - * Function SetLanguage - * called on a language menu selection - */ - void SetLanguage( wxCommandEvent& event ); - /** * Function UpdateTitle * sets the main window title bar text. diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index 9ad56f1016..21218d78a9 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -1666,11 +1666,7 @@ public: */ MODULE* Genere_Self( wxDC* DC ); - /** - * Function SetLanguage - * called on a language menu selection - */ - virtual void SetLanguage( wxCommandEvent& event ); + void ShowChangedLanguage(); // override EDA_BASE_FRAME virtual /** * Function UpdateTitle diff --git a/include/wxstruct.h b/include/wxstruct.h index 73363cceed..22153455a2 100644 --- a/include/wxstruct.h +++ b/include/wxstruct.h @@ -113,7 +113,7 @@ class EDA_BASE_FRAME : public wxFrame void windowClosing( wxCloseEvent& event ); protected: - FRAME_T m_Ident; ///< Id Type (pcb, schematic, library..) + FRAME_T m_Ident; ///< Id Type (pcb, schematic, library..) wxPoint m_FramePos; wxSize m_FrameSize; @@ -302,13 +302,6 @@ public: */ void ExportHotkeyConfigToFile( struct EDA_HOTKEY_CONFIG* aDescList ); - /** - * Function SetLanguage - * called on a language menu selection - * when using a derived function, do not forget to call this one - */ - virtual void SetLanguage( wxCommandEvent& event ); - /** * Function GetFileFromHistory * fetches the file name from the file history list. @@ -380,17 +373,10 @@ public: void CheckForAutoSaveFile( const wxFileName& aFileName, const wxString& aBackupFileExtension ); /** - * Function SetModalMode - * Disable or enable all other windows, to emulate a dialog behavior - * Useful when the frame is used to show and selec items - * (see FOOTPRINT_VIEWER_FRAME and LIB_VIEW_FRAME) - * - * @param aModal = true to disable all other opened windows (i.e. - * this windows is in dialog mode - * = false to enable other windows - * This function is analog to MakeModal( aModal ), deprecated since wxWidgets 2.9.4 + * Function ShowChangedLanguage + * redraws the menus and what not in current language. */ - void SetModalMode( bool aModal ); + virtual void ShowChangedLanguage(); }; @@ -415,7 +401,6 @@ public: * then after a //==// break has additional calls to anchor toolbars in a way that matches * present functionality. */ - class EDA_PANEINFO : public wxAuiPaneInfo { diff --git a/kicad/kicad.cpp b/kicad/kicad.cpp index 44e9488e56..5b696f5715 100644 --- a/kicad/kicad.cpp +++ b/kicad/kicad.cpp @@ -197,6 +197,8 @@ bool PGM_KICAD::OnPgmInit( wxApp* aWxApp ) void PGM_KICAD::OnPgmExit() { + Kiway.OnKiwayEnd(); + saveCommonSettings(); // write common settings to disk, and destroy everything in PGM_KICAD, @@ -253,7 +255,7 @@ void PGM_KICAD::destroy() } -KIWAY Kiway( &Pgm() ); +KIWAY Kiway( &Pgm(), KFCTL_CPP_PROJECT_SUITE ); /** diff --git a/kicad/kicad.h b/kicad/kicad.h index ffaac5afdc..ab76ac5cbc 100644 --- a/kicad/kicad.h +++ b/kicad/kicad.h @@ -140,6 +140,8 @@ public: private: int m_leftWinWidth; + void language_change( wxCommandEvent& event ); + public: KICAD_MANAGER_FRAME( wxWindow* parent, const wxString& title, const wxPoint& pos, const wxSize& size ); @@ -202,7 +204,6 @@ public: */ void ClearMsg(); - void SetLanguage( wxCommandEvent& event ); void OnRefresh( wxCommandEvent& event ); void OnSelectDefaultPdfBrowser( wxCommandEvent& event ); void OnSelectPreferredPdfBrowser( wxCommandEvent& event ); diff --git a/kicad/mainframe.cpp b/kicad/mainframe.cpp index 32d19c8d37..0d965c0af8 100644 --- a/kicad/mainframe.cpp +++ b/kicad/mainframe.cpp @@ -361,6 +361,14 @@ void KICAD_MANAGER_FRAME::OnRefresh( wxCommandEvent& event ) } +void KICAD_MANAGER_FRAME::language_change( wxCommandEvent& event ) +{ + int id = event.GetId(); + + Kiway.SetLanguage( id ); +} + + void KICAD_MANAGER_FRAME::ClearMsg() { m_MessagesBox->Clear(); diff --git a/kicad/menubar.cpp b/kicad/menubar.cpp index 0e1fce998d..e792987a3c 100644 --- a/kicad/menubar.cpp +++ b/kicad/menubar.cpp @@ -33,20 +33,20 @@ #include #include -/* Menubar and toolbar event table */ +// Menubar and toolbar event table BEGIN_EVENT_TABLE( KICAD_MANAGER_FRAME, EDA_BASE_FRAME ) - /* Window events */ + // Window events EVT_SIZE( KICAD_MANAGER_FRAME::OnSize ) EVT_CLOSE( KICAD_MANAGER_FRAME::OnCloseWindow ) - /* Toolbar events */ + // Toolbar events EVT_TOOL( ID_NEW_PROJECT, KICAD_MANAGER_FRAME::OnLoadProject ) EVT_TOOL( ID_NEW_PROJECT_FROM_TEMPLATE, KICAD_MANAGER_FRAME::OnLoadProject ) EVT_TOOL( ID_LOAD_PROJECT, KICAD_MANAGER_FRAME::OnLoadProject ) EVT_TOOL( ID_SAVE_PROJECT, KICAD_MANAGER_FRAME::OnSaveProject ) EVT_TOOL( ID_SAVE_AND_ZIP_FILES, KICAD_MANAGER_FRAME::OnArchiveFiles ) - /* Menu events */ + // Menu events EVT_MENU( ID_SAVE_PROJECT, KICAD_MANAGER_FRAME::OnSaveProject ) EVT_MENU( wxID_EXIT, KICAD_MANAGER_FRAME::OnExit ) EVT_MENU( ID_TO_EDITOR, KICAD_MANAGER_FRAME::OnOpenTextEditor ) @@ -63,16 +63,17 @@ BEGIN_EVENT_TABLE( KICAD_MANAGER_FRAME, EDA_BASE_FRAME ) EVT_MENU( wxID_INDEX, KICAD_MANAGER_FRAME::GetKicadHelp ) EVT_MENU( wxID_ABOUT, KICAD_MANAGER_FRAME::GetKicadAbout ) - /* Range menu events */ - EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END, KICAD_MANAGER_FRAME::SetLanguage ) + // Range menu events + EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END, KICAD_MANAGER_FRAME::language_change ) + EVT_MENU_RANGE( wxID_FILE1, wxID_FILE9, KICAD_MANAGER_FRAME::OnFileHistory ) // Special functions - #ifdef KICAD_USE_FILES_WATCHER +#ifdef KICAD_USE_FILES_WATCHER EVT_MENU( ID_INIT_WATCHED_PATHS, KICAD_MANAGER_FRAME::OnChangeWatchedPaths ) - #endif +#endif - /* Button events */ + // Button events EVT_BUTTON( ID_TO_PCB, KICAD_MANAGER_FRAME::OnRunPcbNew ) EVT_BUTTON( ID_TO_CVPCB, KICAD_MANAGER_FRAME::OnRunCvpcb ) EVT_BUTTON( ID_TO_EESCHEMA, KICAD_MANAGER_FRAME::OnRunEeschema ) diff --git a/kicad/preferences.cpp b/kicad/preferences.cpp index 19bed9f1d1..2176d628bc 100644 --- a/kicad/preferences.cpp +++ b/kicad/preferences.cpp @@ -88,8 +88,3 @@ void KICAD_MANAGER_FRAME::OnSelectPreferredPdfBrowser( wxCommandEvent& event ) Pgm().WritePdfBrowserInfos(); } - -void KICAD_MANAGER_FRAME::SetLanguage( wxCommandEvent& event ) -{ - EDA_BASE_FRAME::SetLanguage( event ); -} diff --git a/pagelayout_editor/events_functions.cpp b/pagelayout_editor/events_functions.cpp index 0473900644..c2fd6982dc 100644 --- a/pagelayout_editor/events_functions.cpp +++ b/pagelayout_editor/events_functions.cpp @@ -70,12 +70,8 @@ BEGIN_EVENT_TABLE( PL_EDITOR_FRAME, EDA_DRAW_FRAME ) EVT_MENU( wxID_EXIT, PL_EDITOR_FRAME::OnQuit ) // menu Preferences - EVT_MENU_RANGE( ID_PREFERENCES_HOTKEY_START, ID_PREFERENCES_HOTKEY_END, - PL_EDITOR_FRAME::Process_Config ) - EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END, - EDA_DRAW_FRAME::SetLanguage ) - EVT_MENU( ID_MENU_PL_EDITOR_SELECT_PREFERED_EDITOR, - EDA_BASE_FRAME::OnSelectPreferredEditor ) + EVT_MENU_RANGE( ID_PREFERENCES_HOTKEY_START, ID_PREFERENCES_HOTKEY_END, PL_EDITOR_FRAME::Process_Config ) + EVT_MENU( ID_MENU_PL_EDITOR_SELECT_PREFERED_EDITOR, EDA_BASE_FRAME::OnSelectPreferredEditor ) EVT_MENU( wxID_PREFERENCES, PL_EDITOR_FRAME::Process_Config ) EVT_MENU( ID_MENU_SWITCH_BGCOLOR, PL_EDITOR_FRAME::Process_Config ) EVT_MENU( ID_MENU_GRID_ONOFF, PL_EDITOR_FRAME::Process_Config ) @@ -473,15 +469,6 @@ void PL_EDITOR_FRAME::OnQuit( wxCommandEvent& event ) Close( true ); } -/** - * Function SetLanguage - * called on a language menu selection - * Update Layer manager title and tabs texts - */ -void PL_EDITOR_FRAME::SetLanguage( wxCommandEvent& event ) -{ - EDA_DRAW_FRAME::SetLanguage( event ); -} void PL_EDITOR_FRAME::ToPlotter(wxCommandEvent& event) { diff --git a/pagelayout_editor/pl_editor_frame.h b/pagelayout_editor/pl_editor_frame.h index 7ba3a8dc15..e675cb9c9b 100644 --- a/pagelayout_editor/pl_editor_frame.h +++ b/pagelayout_editor/pl_editor_frame.h @@ -198,12 +198,6 @@ public: void SaveSettings( wxConfigBase* aCfg ); // override virtual - /** - * Function SetLanguage - * called on a language menu selection - */ - virtual void SetLanguage( wxCommandEvent& event ); - void Process_Special_Functions( wxCommandEvent& event ); void OnSelectOptionToolbar( wxCommandEvent& event ); diff --git a/pcb_calculator/CMakeLists.txt b/pcb_calculator/CMakeLists.txt index fb8e189859..14db6b9ff6 100644 --- a/pcb_calculator/CMakeLists.txt +++ b/pcb_calculator/CMakeLists.txt @@ -75,7 +75,7 @@ if( USE_KIWAY_DLLS ) ${PCB_CALCULATOR_RESOURCES} ) set_source_files_properties( ../common/single_top.cpp PROPERTIES - COMPILE_DEFINITIONS "TOP_FRAME=0;BUILD_KIWAY_DLL" + COMPILE_DEFINITIONS "TOP_FRAME=FRAME_CALC;BUILD_KIWAY_DLL" ) target_link_libraries( pcb_calculator #singletop # replaces common, giving us restrictive control and link warnings. @@ -93,7 +93,6 @@ if( USE_KIWAY_DLLS ) add_library( pcb_calculator_kiface MODULE pcb_calculator.cpp ${PCB_CALCULATOR_SRCS} -# ${PCB_CALCULATOR_RESOURCES} ) set_target_properties( pcb_calculator_kiface PROPERTIES OUTPUT_NAME pcb_calculator diff --git a/pcb_calculator/pcb_calculator_frame.cpp b/pcb_calculator/pcb_calculator_frame.cpp index 7981201e25..3abd3601f2 100644 --- a/pcb_calculator/pcb_calculator_frame.cpp +++ b/pcb_calculator/pcb_calculator_frame.cpp @@ -134,6 +134,7 @@ PCB_CALCULATOR_FRAME::~PCB_CALCULATOR_FRAME() this->Freeze(); } + void PCB_CALCULATOR_FRAME::OnClosePcbCalc( wxCloseEvent& event ) { if( m_RegulatorListChanged ) diff --git a/pcbnew/block_module_editor.cpp b/pcbnew/block_module_editor.cpp index 9fc22bd1e1..abba8d6d01 100644 --- a/pcbnew/block_module_editor.cpp +++ b/pcbnew/block_module_editor.cpp @@ -306,7 +306,7 @@ static void DrawMovingBlockOutlines( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wx bool aErase ) { BASE_SCREEN* screen = aPanel->GetScreen(); - FOOTPRINT_EDIT_FRAME* moduleEditFrame = FOOTPRINT_EDIT_FRAME::GetActiveFootprintEditor( aPanel->GetParent() ); + FOOTPRINT_EDIT_FRAME* moduleEditFrame = dynamic_cast( aPanel->GetParent() ); wxASSERT( moduleEditFrame ); MODULE* currentModule = moduleEditFrame->GetBoard()->m_Modules; diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index 98a3ec4fee..e76623b0e4 100644 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -190,21 +190,21 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) case ID_OPEN_MODULE_EDITOR: { - FOOTPRINT_EDIT_FRAME* editor = FOOTPRINT_EDIT_FRAME::GetActiveFootprintEditor( this ); + FOOTPRINT_EDIT_FRAME* editor = (FOOTPRINT_EDIT_FRAME*) Kiway().Player( FRAME_PCB_MODULE_EDITOR, false ); if( !editor ) { - KIFACE_I& kf = Kiface(); - - editor = (FOOTPRINT_EDIT_FRAME*) kf.CreateWindow( this, FRAME_PCB_MODULE_EDITOR, &Kiway(), kf.StartFlags() ); + editor = (FOOTPRINT_EDIT_FRAME*) Kiway().Player( FRAME_PCB_MODULE_EDITOR, true ); editor->Show( true ); editor->Zoom_Automatique( false ); } else { + /* not needed on linux, other platforms need this? if( editor->IsIconized() ) editor->Iconize( false ); + */ editor->Raise(); @@ -218,21 +218,21 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) case ID_OPEN_MODULE_VIEWER: { - FOOTPRINT_VIEWER_FRAME* viewer = FOOTPRINT_VIEWER_FRAME::GetActiveFootprintViewer( this ); + FOOTPRINT_VIEWER_FRAME* viewer = (FOOTPRINT_VIEWER_FRAME*) Kiway().Player( FRAME_PCB_MODULE_VIEWER, false ); if( !viewer ) { - KIFACE_I& kf = Kiface(); - - viewer = (FOOTPRINT_VIEWER_FRAME*) kf.CreateWindow( this, FRAME_PCB_MODULE_VIEWER, &Kiway(), kf.StartFlags() ); + viewer = (FOOTPRINT_VIEWER_FRAME*) Kiway().Player( FRAME_PCB_MODULE_VIEWER, true ); viewer->Show( true ); viewer->Zoom_Automatique( false ); } else { + /* not needed on linux, other platforms need this? if( viewer->IsIconized() ) viewer->Iconize( false ); + */ viewer->Raise(); @@ -848,20 +848,14 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) } { - FOOTPRINT_EDIT_FRAME* editor = FOOTPRINT_EDIT_FRAME::GetActiveFootprintEditor( this ); - - if( !editor ) - { - KIFACE_I& kf = Kiface(); - - editor = (FOOTPRINT_EDIT_FRAME*) kf.CreateWindow( this, FRAME_PCB_MODULE_EDITOR, &Kiway(), kf.StartFlags() ); - } + FOOTPRINT_EDIT_FRAME* editor = (FOOTPRINT_EDIT_FRAME*) Kiway().Player( FRAME_PCB_MODULE_EDITOR, true ); editor->Load_Module_From_BOARD( (MODULE*)GetCurItem() ); SetCurItem( NULL ); // the current module could be deleted by editor->Show( true ); - editor->Iconize( false ); + + editor->Raise(); // Iconize( false ); } m_canvas->MoveCursorToCrossHair(); break; diff --git a/pcbnew/editmod.cpp b/pcbnew/editmod.cpp index 49325bc1eb..4a69ef6a02 100644 --- a/pcbnew/editmod.cpp +++ b/pcbnew/editmod.cpp @@ -28,6 +28,7 @@ #include #include +#include #include #include #include @@ -74,20 +75,13 @@ void PCB_EDIT_FRAME::InstallModuleOptionsFrame( MODULE* Module, wxDC* DC ) if( retvalue == 2 ) { - FOOTPRINT_EDIT_FRAME* editor = FOOTPRINT_EDIT_FRAME::GetActiveFootprintEditor( this ); - - if( !editor ) - { - KIFACE_I& kf = Kiface(); - - editor = (FOOTPRINT_EDIT_FRAME*) kf.CreateWindow( this, FRAME_PCB_MODULE_EDITOR, &Kiway(), kf.StartFlags() ); - } + FOOTPRINT_EDIT_FRAME* editor = (FOOTPRINT_EDIT_FRAME*) Kiway().Player( FRAME_PCB_MODULE_EDITOR, true ); editor->Load_Module_From_BOARD( Module ); SetCurItem( NULL ); editor->Show( true ); - editor->Iconize( false ); + editor->Raise(); // Iconize( false ); } } diff --git a/pcbnew/footprint_wizard.cpp b/pcbnew/footprint_wizard.cpp index e82db334fc..ab4023846a 100644 --- a/pcbnew/footprint_wizard.cpp +++ b/pcbnew/footprint_wizard.cpp @@ -145,7 +145,7 @@ MODULE* FOOTPRINT_WIZARD_FRAME::GetBuiltFootprint() { FOOTPRINT_WIZARD* footprintWizard = FOOTPRINT_WIZARDS::GetWizard( m_wizardName ); - if( footprintWizard && m_exportRequest ) + if( footprintWizard && m_modal_ret_val ) { return footprintWizard->GetModule(); } diff --git a/pcbnew/footprint_wizard_frame.cpp b/pcbnew/footprint_wizard_frame.cpp index b09623f074..7fac217892 100644 --- a/pcbnew/footprint_wizard_frame.cpp +++ b/pcbnew/footprint_wizard_frame.cpp @@ -113,18 +113,18 @@ static wxAcceleratorEntry accels[] = #define EXTRA_BORDER_SIZE 2 -/* Function FOOTPRINT_WIZARD_FRAME - * it's the constructor for the footprint wizard frame, it creates everything inside - */ #define FOOTPRINT_WIZARD_FRAME_NAME wxT( "FootprintWizard" ) -FOOTPRINT_WIZARD_FRAME::FOOTPRINT_WIZARD_FRAME( KIWAY* aKiway, FOOTPRINT_EDIT_FRAME* aParent, - wxSemaphore* semaphore, long style ) : - PCB_BASE_FRAME( aKiway, aParent, FRAME_PCB_FOOTPRINT_WIZARD, - _( "Footprint Wizard" ), - wxDefaultPosition, wxDefaultSize, style, FOOTPRINT_WIZARD_FRAME_NAME ) +FOOTPRINT_WIZARD_FRAME::FOOTPRINT_WIZARD_FRAME( KIWAY* aKiway, + wxWindow* aParent, FRAME_T aFrameType ) : + PCB_BASE_FRAME( aKiway, aParent, aFrameType, _( "Footprint Wizard" ), + wxDefaultPosition, wxDefaultSize, + KICAD_DEFAULT_DRAWFRAME_STYLE | wxFRAME_FLOAT_ON_PARENT, + FOOTPRINT_WIZARD_FRAME_NAME ) { + wxASSERT( aFrameType==FRAME_PCB_FOOTPRINT_WIZARD_MODAL ); + wxAcceleratorTable table( ACCEL_TABLE_CNT, accels ); m_FrameName = FOOTPRINT_WIZARD_FRAME_NAME; @@ -137,14 +137,10 @@ FOOTPRINT_WIZARD_FRAME::FOOTPRINT_WIZARD_FRAME( KIWAY* aKiway, FOOTPRINT_EDIT_FR SetIcon( icon ); m_HotkeysZoomAndGridList = g_Module_Viewer_Hokeys_Descr; - m_semaphore = semaphore; m_wizardName.Empty(); - m_exportRequest = false; - - if( m_semaphore ) - SetModalMode( true ); SetBoard( new BOARD() ); + // Ensure all layers and items are visible: GetBoard()->SetVisibleAlls(); SetScreen( new PCB_SCREEN( GetPageSizeIU() ) ); @@ -244,17 +240,14 @@ FOOTPRINT_WIZARD_FRAME::~FOOTPRINT_WIZARD_FRAME() } -/* Function OnCloseWindow - * Handles the close event, saving settings an destroying or releasing a semaphore from caller - */ void FOOTPRINT_WIZARD_FRAME::OnCloseWindow( wxCloseEvent& Event ) { - if( m_semaphore ) + if( IsModal() ) { - m_semaphore->Post(); - SetModalMode( false ); - // This window will be destroyed by the calling function, - // to avoid side effects + // Only dismiss a modal frame once, so that the return values set by + // the prior DismissModal() are not bashed for ShowModal(). + if( !IsDismissed() ) + DismissModal( false ); } else { @@ -265,15 +258,11 @@ void FOOTPRINT_WIZARD_FRAME::OnCloseWindow( wxCloseEvent& Event ) void FOOTPRINT_WIZARD_FRAME::ExportSelectedFootprint( wxCommandEvent& aEvent ) { - m_exportRequest = true; + DismissModal( true ); Close(); } -/* Function OnSize - * It handles a dialog resize event, asking for an update - * - */ void FOOTPRINT_WIZARD_FRAME::OnSize( wxSizeEvent& SizeEv ) { if( m_auimgr.GetManagedWindow() ) @@ -283,10 +272,6 @@ void FOOTPRINT_WIZARD_FRAME::OnSize( wxSizeEvent& SizeEv ) } -/* Function OnSetRelativeOffset - * Updates the cursor position and the status bar - * - */ void FOOTPRINT_WIZARD_FRAME::OnSetRelativeOffset( wxCommandEvent& event ) { GetScreen()->m_O_Curseur = GetCrossHairPosition(); @@ -294,10 +279,6 @@ void FOOTPRINT_WIZARD_FRAME::OnSetRelativeOffset( wxCommandEvent& event ) } -/* Function ReCreatePageList - * It recreates the list of pages for a new loaded wizard - * - */ void FOOTPRINT_WIZARD_FRAME::ReCreatePageList() { if( m_pageList == NULL ) @@ -326,11 +307,6 @@ void FOOTPRINT_WIZARD_FRAME::ReCreatePageList() } -/* Function ReCreateParameterList - * It creates the parameter grid for a certain wizard page of the current wizard - * - */ - void FOOTPRINT_WIZARD_FRAME::ReCreateParameterList() { if( m_parameterGrid == NULL ) @@ -620,7 +596,7 @@ void FOOTPRINT_WIZARD_FRAME::ReCreateHToolbar() { wxString msg; - if( m_mainToolBar == NULL ) + if( !m_mainToolBar ) { m_mainToolBar = new wxAuiToolBar( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_TB_DEFAULT_STYLE | wxAUI_TB_HORZ_LAYOUT ); @@ -665,7 +641,7 @@ void FOOTPRINT_WIZARD_FRAME::ReCreateHToolbar() m_mainToolBar->AddTool( ID_ZOOM_PAGE, wxEmptyString, KiBitmap( zoom_fit_in_page_xpm ), msg ); - if( m_semaphore ) + if( m_Ident == FRAME_PCB_FOOTPRINT_WIZARD_MODAL ) { // The library browser is called from a "load component" command m_mainToolBar->AddSeparator(); diff --git a/pcbnew/footprint_wizard_frame.h b/pcbnew/footprint_wizard_frame.h index c36ecc70c3..d65c309f34 100644 --- a/pcbnew/footprint_wizard_frame.h +++ b/pcbnew/footprint_wizard_frame.h @@ -35,41 +35,37 @@ #include class wxSashLayoutWindow; class wxListBox; -class wxSemaphore; class wxGrid; class wxGridEvent; class FOOTPRINT_EDIT_FRAME; /** - * Component library viewer main window. + * Class FOOTPRINT_WIZARD_FRAME */ class FOOTPRINT_WIZARD_FRAME : public PCB_BASE_FRAME { private: - wxListBox* m_pageList; // < The list of pages - int m_pageListWidth; // < width of the window - wxGrid* m_parameterGrid; // < The list of parameters - int m_parameterGridWidth; // < size of the grid + wxListBox* m_pageList; ///< The list of pages + int m_pageListWidth; ///< width of the window + wxGrid* m_parameterGrid; ///< The list of parameters + int m_parameterGridWidth; ///< size of the grid // 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 + wxString m_configPath; ///< subpath for configuration protected: - wxString m_wizardName; // < name of the current wizard - wxString m_wizardDescription; // < description of the wizard - wxString m_wizardStatus; // < current wizard status + 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( KIWAY* aKiway, - FOOTPRINT_EDIT_FRAME* parent, wxSemaphore* semaphore = NULL, - long style = KICAD_DEFAULT_DRAWFRAME_STYLE ); + + FOOTPRINT_WIZARD_FRAME( KIWAY* aKiway, wxWindow* parent, FRAME_T aFrameType ); ~FOOTPRINT_WIZARD_FRAME(); - MODULE* GetBuiltFootprint( void ); + MODULE* GetBuiltFootprint(); private: diff --git a/pcbnew/gpcb_plugin.cpp b/pcbnew/gpcb_plugin.cpp index 7585aad4f9..1f207eaaa6 100644 --- a/pcbnew/gpcb_plugin.cpp +++ b/pcbnew/gpcb_plugin.cpp @@ -285,7 +285,7 @@ void GPCB_FPL_CACHE::Load() MODULE* footprint = parseMODULE( &reader ); // The footprint name is the file name without the extension. - footprint->SetFPID( fn.GetName() ); + footprint->SetFPID( FPID( fn.GetName() ) ); m_modules.insert( name, new GPCB_FPL_CACHE_ITEM( footprint, fn.GetName() ) ); } while( dir.GetNext( &fpFileName ) ); @@ -299,7 +299,6 @@ void GPCB_FPL_CACHE::Load() void GPCB_FPL_CACHE::Remove( const wxString& aFootprintName ) { - std::string footprintName = TO_UTF8( aFootprintName ); MODULE_CITER it = m_modules.find( footprintName ); diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index fd7059399a..80015dc147 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -279,7 +279,7 @@ void FP_CACHE::Load() MODULE* footprint = (MODULE*) m_owner->m_parser->Parse(); // The footprint name is the file name without the extension. - footprint->SetFPID( fullPath.GetName() ); + footprint->SetFPID( FPID( fullPath.GetName() ) ); m_modules.insert( name, new FP_CACHE_ITEM( footprint, fullPath ) ); } while( dir.GetNext( &fpFileName ) ); @@ -657,14 +657,14 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const m_out->Print( aNestLevel, ")\n\n" ); - // Save net codes and names + // Save net codes and names for( NETINFO_MAPPING::iterator net = m_mapping->begin(), netEnd = m_mapping->end(); net != netEnd; ++net ) { m_out->Print( aNestLevel, "(net %d %s)\n", m_mapping->Translate( net->GetNet() ), m_out->Quotew( net->GetNetname() ).c_str() ); - } + } m_out->Print( 0, "\n" ); diff --git a/pcbnew/librairi.cpp b/pcbnew/librairi.cpp index d8e47c0e46..487f356e6a 100644 --- a/pcbnew/librairi.cpp +++ b/pcbnew/librairi.cpp @@ -620,7 +620,7 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibrary, if( footprintName.IsEmpty() ) { footprintName = wxT("noname"); - aModule->SetFPID( footprintName ); + aModule->SetFPID( FPID( footprintName ) ); } bool module_exists = false; diff --git a/pcbnew/loadcmp.cpp b/pcbnew/loadcmp.cpp index 6c324b4d65..3aca4d620f 100644 --- a/pcbnew/loadcmp.cpp +++ b/pcbnew/loadcmp.cpp @@ -34,6 +34,8 @@ #include #include #include +#include +//#include #include #include #include @@ -118,32 +120,21 @@ bool FOOTPRINT_EDIT_FRAME::Load_Module_From_BOARD( MODULE* aModule ) wxString PCB_BASE_FRAME::SelectFootprintFromLibBrowser() { - wxString fpname; - wxString fpid; + // Close the current non-modal Lib browser if opened, and open a new one, in "modal" mode: + FOOTPRINT_VIEWER_FRAME* viewer; - wxSemaphore semaphore( 0, 1 ); - - // Close the current Lib browser, if opened, and open a new one, in "modal" mode: - FOOTPRINT_VIEWER_FRAME* viewer = FOOTPRINT_VIEWER_FRAME::GetActiveFootprintViewer( this ); + viewer = (FOOTPRINT_VIEWER_FRAME*) Kiway().Player( FRAME_PCB_MODULE_VIEWER, false ); if( viewer ) viewer->Destroy(); - viewer = new FOOTPRINT_VIEWER_FRAME( &Kiway(), this, &semaphore ); + viewer = (FOOTPRINT_VIEWER_FRAME*) Kiway().Player( FRAME_PCB_MODULE_VIEWER_MODAL, true ); - // Show the library viewer frame until it is closed - while( semaphore.TryWait() == wxSEMA_BUSY ) // Wait for viewer closing event - { - wxYield(); - wxMilliSleep( 50 ); - } + wxString fpid; - fpname = viewer->GetSelectedFootprint(); + viewer->ShowModal( &fpid ); - if( !!fpname ) - { - fpid = viewer->GetSelectedLibrary() + wxT( ":" ) + fpname; - } + //DBG(printf("%s: fpid:'%s'\n", __func__, TO_UTF8( fpid ) );) viewer->Destroy(); diff --git a/pcbnew/modedit.cpp b/pcbnew/modedit.cpp index c9198d4a41..73a20509f8 100644 --- a/pcbnew/modedit.cpp +++ b/pcbnew/modedit.cpp @@ -27,6 +27,7 @@ #include #include +#include #include #include #include @@ -262,25 +263,19 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) case ID_OPEN_MODULE_VIEWER: { - // Make a _project specific_ PCB_EDIT_FRAME be the start of the search in - // FOOTPRINT_VIEWER_FRAME::GetActiveFootprintViewer(); - - PCB_EDIT_FRAME* top_project = dynamic_cast( GetParent() ); - wxASSERT( top_project ); // dynamic_cast returns NULL if class mismatch. - - FOOTPRINT_VIEWER_FRAME* viewer = FOOTPRINT_VIEWER_FRAME::GetActiveFootprintViewer( top_project ); + FOOTPRINT_VIEWER_FRAME* viewer = (FOOTPRINT_VIEWER_FRAME*) Kiway().Player( FRAME_PCB_MODULE_VIEWER, false ); if( !viewer ) { - KIFACE_I& kf = Kiface(); - - viewer = (FOOTPRINT_VIEWER_FRAME*) kf.CreateWindow( this, FRAME_PCB_MODULE_VIEWER, &Kiway(), kf.StartFlags() ); + viewer = (FOOTPRINT_VIEWER_FRAME*) Kiway().Player( FRAME_PCB_MODULE_VIEWER, true ); viewer->Show( true ); viewer->Zoom_Automatique( false ); } else { + /* if( viewer->IsIconized() ) viewer->Iconize( false ); + */ viewer->Raise(); @@ -324,41 +319,37 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) case ID_MODEDIT_NEW_MODULE_FROM_WIZARD: { - wxSemaphore semaphore( 0, 1 ); + FOOTPRINT_WIZARD_FRAME* wizard = (FOOTPRINT_WIZARD_FRAME*) Kiway().Player( + FRAME_PCB_FOOTPRINT_WIZARD_MODAL, true ); - FOOTPRINT_WIZARD_FRAME* wizard = new FOOTPRINT_WIZARD_FRAME( &Kiway(), 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 + wxString not_used; + + if( wizard->ShowModal( ¬_used ) ) { - wxYield(); - wxMilliSleep( 50 ); - } + // Creates the new footprint from python script wizard + MODULE* module = wizard->GetBuiltFootprint(); - // Creates the new footprint from python script wizard - MODULE* module = wizard->GetBuiltFootprint(); + if( module ) // i.e. if create module command not aborted + { + Clear_Pcb( true ); + GetScreen()->ClearUndoRedoList(); + SetCurItem( NULL ); + SetCrossHairPosition( wxPoint( 0, 0 ) ); - if( module ) // i.e. if create module command not aborted - { - 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 ); - // Add the new object 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 ) ); - module->ClearFlags(); + // 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 ) ); + module->ClearFlags(); + } } wizard->Destroy(); @@ -378,7 +369,8 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) { // 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(); + PCB_EDIT_FRAME* pcbframe = (PCB_EDIT_FRAME*) Kiway().Player( FRAME_PCB, true ); + BOARD* mainpcb = pcbframe->GetBoard(); MODULE* source_module = NULL; MODULE* module_in_edit = GetBoard()->m_Modules; diff --git a/pcbnew/module_editor_frame.h b/pcbnew/module_editor_frame.h index 4378beac06..438c4ed35e 100644 --- a/pcbnew/module_editor_frame.h +++ b/pcbnew/module_editor_frame.h @@ -53,17 +53,6 @@ public: */ static const wxChar* GetFootprintEditorFrameName(); - /** - * Function GetActiveFootprintEditor (static) - * - * @param aTopOfProject is a PCB_EDIT_FRAME* window which anchors the search in - * a project specific way. - * - * @return a reference to the current opened Footprint editor - * or NULL if no Footprint editor currently opened - */ - static FOOTPRINT_EDIT_FRAME* GetActiveFootprintEditor( const wxWindow* aTopOfProject ); - BOARD_DESIGN_SETTINGS& GetDesignSettings() const; // overload PCB_BASE_FRAME, get parent's void SetDesignSettings( const BOARD_DESIGN_SETTINGS& aSettings ); // overload @@ -415,7 +404,7 @@ public: protected: /// protected so only friend PCB::IFACE::CreateWindow() can act as sole factory. - FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, PCB_EDIT_FRAME* aParent ); + FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ); static BOARD* s_Pcb; ///< retain board across invocations of module editor diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index cb7a0425fc..c2a9b93d4e 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -151,7 +151,7 @@ END_EVENT_TABLE() #define FOOTPRINT_EDIT_FRAME_NAME wxT( "ModEditFrame" ) -FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, PCB_EDIT_FRAME* aParent ) : +FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : PCB_BASE_FRAME( aKiway, aParent, FRAME_PCB_MODULE_EDITOR, wxEmptyString, wxDefaultPosition, wxDefaultSize, KICAD_DEFAULT_DRAWFRAME_STYLE, GetFootprintEditorFrameName() ) @@ -291,19 +291,6 @@ const wxChar* FOOTPRINT_EDIT_FRAME::GetFootprintEditorFrameName() } -/* return a reference to the current opened Footprint editor - * or NULL if no Footprint editor currently opened - */ -FOOTPRINT_EDIT_FRAME* FOOTPRINT_EDIT_FRAME::GetActiveFootprintEditor( const wxWindow* aParent ) -{ - // top_of_project! - wxASSERT( dynamic_cast( aParent ) ); - - wxWindow* ret = wxWindow::FindWindowByName( GetFootprintEditorFrameName(), aParent ); - return (FOOTPRINT_EDIT_FRAME*) ret; -} - - BOARD_DESIGN_SETTINGS& FOOTPRINT_EDIT_FRAME::GetDesignSettings() const { // get the BOARD_DESIGN_SETTINGS from the parent editor, not our BOARD. diff --git a/pcbnew/modview_frame.cpp b/pcbnew/modview_frame.cpp index 30bb30063e..1db99caf30 100644 --- a/pcbnew/modview_frame.cpp +++ b/pcbnew/modview_frame.cpp @@ -29,6 +29,7 @@ #include #include +#include #include #include #include @@ -70,12 +71,12 @@ wxString FOOTPRINT_VIEWER_FRAME::m_selectedFootprintName; BEGIN_EVENT_TABLE( FOOTPRINT_VIEWER_FRAME, EDA_DRAW_FRAME ) - /* Window events */ + // Window events EVT_CLOSE( FOOTPRINT_VIEWER_FRAME::OnCloseWindow ) EVT_SIZE( FOOTPRINT_VIEWER_FRAME::OnSize ) EVT_ACTIVATE( FOOTPRINT_VIEWER_FRAME::OnActivate ) - /* Toolbar events */ + // Toolbar events EVT_TOOL( ID_MODVIEW_SELECT_LIB, FOOTPRINT_VIEWER_FRAME::SelectCurrentLibrary ) EVT_TOOL( ID_MODVIEW_SELECT_PART, @@ -88,7 +89,7 @@ BEGIN_EVENT_TABLE( FOOTPRINT_VIEWER_FRAME, EDA_DRAW_FRAME ) FOOTPRINT_VIEWER_FRAME::ExportSelectedFootprint ) EVT_TOOL( ID_MODVIEW_SHOW_3D_VIEW, FOOTPRINT_VIEWER_FRAME::Show3D_Frame ) - /* listbox events */ + // listbox events EVT_LISTBOX( ID_MODVIEW_LIB_LIST, FOOTPRINT_VIEWER_FRAME::ClickOnLibList ) EVT_LISTBOX( ID_MODVIEW_FOOTPRINT_LIST, FOOTPRINT_VIEWER_FRAME::ClickOnFootprintList ) EVT_LISTBOX_DCLICK( ID_MODVIEW_FOOTPRINT_LIST, FOOTPRINT_VIEWER_FRAME::DClickOnFootprintList ) @@ -118,14 +119,16 @@ static wxAcceleratorEntry accels[] = #define FOOTPRINT_VIEWER_FRAME_NAME wxT( "ModViewFrame" ) -FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent, wxSemaphore* aSemaphore ) : - PCB_BASE_FRAME( aKiway, aParent, FRAME_PCB_MODULE_VIEWER, _( "Footprint Library Browser" ), +FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrameType ) : + PCB_BASE_FRAME( aKiway, aParent, aFrameType, _( "Footprint Library Browser" ), wxDefaultPosition, wxDefaultSize, - !aSemaphore ? - KICAD_DEFAULT_DRAWFRAME_STYLE : - KICAD_DEFAULT_DRAWFRAME_STYLE | wxFRAME_FLOAT_ON_PARENT, + aFrameType == FRAME_PCB_MODULE_VIEWER_MODAL ? + KICAD_DEFAULT_DRAWFRAME_STYLE | wxFRAME_FLOAT_ON_PARENT : + KICAD_DEFAULT_DRAWFRAME_STYLE, GetFootprintViewerFrameName() ) { + wxASSERT( aFrameType==FRAME_PCB_MODULE_VIEWER || aFrameType==FRAME_PCB_MODULE_VIEWER_MODAL ); + wxAcceleratorTable table( DIM( accels ), accels ); m_FrameName = GetFootprintViewerFrameName(); @@ -145,12 +148,8 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* a m_footprintList = new wxListBox( this, ID_MODVIEW_FOOTPRINT_LIST, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_HSCROLL ); - m_semaphore = aSemaphore; m_selectedFootprintName.Empty(); - if( m_semaphore ) - SetModalMode( true ); - SetBoard( new BOARD() ); // Ensure all layers and items are visible: @@ -237,7 +236,6 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* a } #if 0 // no. - // Set min size (overwrite params read in LoadPerspective(), if any) m_auimgr.GetPane( m_libList ).MinSize( minsize ); m_auimgr.GetPane( m_footprintList ).MinSize( minsize ); @@ -271,45 +269,16 @@ const wxChar* FOOTPRINT_VIEWER_FRAME::GetFootprintViewerFrameName() } -FOOTPRINT_VIEWER_FRAME* FOOTPRINT_VIEWER_FRAME::GetActiveFootprintViewer( const KIWAY_PLAYER* aParent ) -{ - wxASSERT( aParent ); - - // We search only within the current project, and do so by limiting - // the search scope to a wxWindow hierarchy subset. Find the top most - // KIWAY_PLAYER which is part of this PROJECT by matching its KIWAY* to the - // most immediate parent's. - - // NOTE: an open FOOTPRINT_VIEWER_FRAME may have either the PCB_EDIT_FRAME - // or the FOOTPRINT_EDIT_FRAME as parent. - - KIWAY* kiway = &aParent->Kiway(); - wxWindow* frame; - - while( (frame = aParent->GetParent()) != NULL ) - { - // will go NULL when we reach a non-KIWAY_PLAYER - KIWAY_PLAYER* kwp = dynamic_cast( frame ); - - if( kwp && &kwp->Kiway() == kiway ) - aParent = kwp; - else - break; - } - - return (FOOTPRINT_VIEWER_FRAME*) wxWindow::FindWindowByName( - GetFootprintViewerFrameName(), aParent ); -} - - void FOOTPRINT_VIEWER_FRAME::OnCloseWindow( wxCloseEvent& Event ) { - if( m_semaphore ) + if( IsModal() ) { - m_semaphore->Post(); - SetModalMode( false ); - // This window will be destroyed by the calling function, - // to avoid side effects + // Only dismiss a modal frame once, so that the return values set by + // the prior DismissModal() are not bashed for ShowModal(). + if( !IsDismissed() ) + DismissModal( false ); + + // window will be destroyed by the calling function. } else Destroy(); @@ -464,15 +433,23 @@ void FOOTPRINT_VIEWER_FRAME::ClickOnFootprintList( wxCommandEvent& event ) void FOOTPRINT_VIEWER_FRAME::DClickOnFootprintList( wxCommandEvent& event ) { - if( m_semaphore ) + if( IsModal() ) { + // @todo(DICK) ExportSelectedFootprint( event ); + // Prevent the double click from being as a single mouse button release // event in the parent window which would cause the part to be parked - // rather than staying in mode mode. + // rather than staying in move mode. // Remember the mouse button will be released in the parent window // thus creating a mouse button release event which should be ignored - ((PCB_BASE_FRAME*)GetParent())->SkipNextLeftButtonReleaseEvent(); + PCB_EDIT_FRAME* pcbframe = dynamic_cast( GetParent() ); + + // The parent may not be the board editor: + if( pcbframe ) + { + pcbframe->SkipNextLeftButtonReleaseEvent(); + } } } @@ -482,9 +459,24 @@ void FOOTPRINT_VIEWER_FRAME::ExportSelectedFootprint( wxCommandEvent& event ) int ii = m_footprintList->GetSelection(); if( ii >= 0 ) - m_selectedFootprintName = m_footprintList->GetString( ii ); + { + wxString fp_name = m_footprintList->GetString( ii ); + + // @todo(DICK) assign to static now, later PROJECT retained string. + m_selectedFootprintName = fp_name; + + FPID fpid; + + fpid.SetLibNickname( GetSelectedLibrary() ); + fpid.SetFootprintName( fp_name ); + + DismissModal( true, fpid.Format() ); + } else + { m_selectedFootprintName.Empty(); + DismissModal( false ); + } Close( true ); } @@ -580,25 +572,25 @@ void FOOTPRINT_VIEWER_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition 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 ); @@ -621,7 +613,7 @@ void FOOTPRINT_VIEWER_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition } } - UpdateStatusBar(); /* Display new cursor coordinates */ + UpdateStatusBar(); // Display new cursor coordinates } @@ -746,11 +738,13 @@ void FOOTPRINT_VIEWER_FRAME::SelectCurrentLibrary( wxCommandEvent& event ) void FOOTPRINT_VIEWER_FRAME::SelectCurrentFootprint( wxCommandEvent& event ) { - PCB_EDIT_FRAME* parent = (PCB_EDIT_FRAME*) GetParent(); + // The PCB_EDIT_FRAME may not be the FOOTPRINT_VIEW_FRAME's parent, + // so use Kiway().Player() to fetch. + PCB_EDIT_FRAME* parent = (PCB_EDIT_FRAME*) Kiway().Player( FRAME_PCB, true ); + wxString libname = m_libraryName + wxT( "." ) + LegacyFootprintLibPathExtension; MODULE* oldmodule = GetBoard()->m_Modules; - MODULE* module = LoadModuleFromLibrary( libname, parent->FootprintLibs(), - false ); + MODULE* module = LoadModuleFromLibrary( libname, parent->FootprintLibs(), false ); if( module ) { diff --git a/pcbnew/modview_frame.h b/pcbnew/modview_frame.h index dab4432f3b..9595866458 100644 --- a/pcbnew/modview_frame.h +++ b/pcbnew/modview_frame.h @@ -34,7 +34,6 @@ class wxSashLayoutWindow; class wxListBox; -class wxSemaphore; class FP_LIB_TABLE; namespace PCB { struct IFACE; } @@ -44,25 +43,13 @@ namespace PCB { struct IFACE; } */ class FOOTPRINT_VIEWER_FRAME : public PCB_BASE_FRAME { - friend struct PCB::IFACE; - -private: - wxListBox* m_libList; // The list of libs names - wxListBox* m_footprintList; // The list of footprint names - - // Flags - wxSemaphore* m_semaphore; // != NULL if the frame emulates a modal dialog - wxString m_configPath; // subpath for configuration + friend struct PCB::IFACE; // constructor called from here only protected: - static wxString m_libraryName; // Current selected library - static wxString m_footprintName; // Current selected footprint - static wxString m_selectedFootprintName; // When the viewer is used to select a footprint - // the selected footprint is here + FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrameType ); + public: - FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent, wxSemaphore* aSemaphore = NULL ); - ~FOOTPRINT_VIEWER_FRAME(); /** @@ -72,17 +59,6 @@ public: */ static const wxChar* GetFootprintViewerFrameName(); - /** - * Function GetActiveFootprintViewer (static) - * - * @param aParent the KIWAY_PLAYER which is the parent of the calling wxWindow. - * This is used to traverse the window hierarchy upwards to the topmost - * KIWAY_PLAYER which is still part of the same project. - * - * @return Any currently opened Footprint viewer or NULL if none. - */ - static FOOTPRINT_VIEWER_FRAME* GetActiveFootprintViewer( const KIWAY_PLAYER* aParent ); - wxString& GetSelectedFootprint( void ) const { return m_selectedFootprintName; } const wxString GetSelectedLibraryFullName(); @@ -102,8 +78,19 @@ public: */ void ReCreateLibraryList(); + private: + wxListBox* m_libList; // The list of libs names + wxListBox* m_footprintList; // The list of footprint names + + wxString m_configPath; // subpath for configuration + + static wxString m_libraryName; // Current selected library + static wxString m_footprintName; // Current selected footprint + static wxString m_selectedFootprintName; // When the viewer is used to select a footprint + + void OnSize( wxSizeEvent& event ); void ReCreateFootprintList(); @@ -193,7 +180,6 @@ private: void SaveCopyInUndoList( BOARD_ITEM*, UNDO_REDO_T, const wxPoint& ) {} void SaveCopyInUndoList( const PICKED_ITEMS_LIST&, UNDO_REDO_T, const wxPoint &) {} - DECLARE_EVENT_TABLE() }; diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 04ecd6af0b..a95e7804fa 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -152,8 +152,6 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME ) EVT_MENU( ID_PCB_DISPLAY_OPTIONS_SETUP, PCB_EDIT_FRAME::InstallDisplayOptionsDialog ) EVT_MENU( ID_PCB_USER_GRID_SETUP, PCB_EDIT_FRAME::Process_Special_Functions ) - EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END, PCB_EDIT_FRAME::SetLanguage ) - // menu Postprocess EVT_MENU( ID_PCB_GEN_POS_MODULES_FILE, PCB_EDIT_FRAME::GenFootprintsPositionFile ) EVT_MENU( ID_PCB_GEN_DRILL_FILE, PCB_EDIT_FRAME::InstallDrillFrame ) @@ -1024,9 +1022,11 @@ void PCB_EDIT_FRAME::SetVisibleAlls() } -void PCB_EDIT_FRAME::SetLanguage( wxCommandEvent& event ) +void PCB_EDIT_FRAME::ShowChangedLanguage() { - EDA_DRAW_FRAME::SetLanguage( event ); + // call my base class + PCB_BASE_FRAME::ShowChangedLanguage(); + m_Layers->SetLayersManagerTabsText(); wxAuiPaneInfo& pane_info = m_auimgr.GetPane( m_Layers ); @@ -1034,10 +1034,6 @@ void PCB_EDIT_FRAME::SetLanguage( wxCommandEvent& event ) pane_info.Caption( _( "Visibles" ) ); m_auimgr.Update(); ReFillLayerWidget(); - - FOOTPRINT_EDIT_FRAME* moduleEditFrame = FOOTPRINT_EDIT_FRAME::GetActiveFootprintEditor( this ); - if( moduleEditFrame ) - moduleEditFrame->EDA_DRAW_FRAME::SetLanguage( event ); } diff --git a/pcbnew/pcbnew.cpp b/pcbnew/pcbnew.cpp index 3c47fb7f3d..793a537885 100644 --- a/pcbnew/pcbnew.cpp +++ b/pcbnew/pcbnew.cpp @@ -60,6 +60,7 @@ #include #include #include +#include // Colors for layers and items @@ -109,7 +110,6 @@ static struct IFACE : public KIFACE_I { switch( aClassId ) { - case FRAME_PCB: { PCB_EDIT_FRAME* frame = new PCB_EDIT_FRAME( aKiway, aParent ); @@ -132,11 +132,7 @@ static struct IFACE : public KIFACE_I case FRAME_PCB_MODULE_EDITOR: { - // yuck: - PCB_EDIT_FRAME* editor = dynamic_cast( aParent ); - wxASSERT( editor ); - - FOOTPRINT_EDIT_FRAME* frame = new FOOTPRINT_EDIT_FRAME( aKiway, editor ); + FOOTPRINT_EDIT_FRAME* frame = new FOOTPRINT_EDIT_FRAME( aKiway, aParent ); frame->Zoom_Automatique( true ); @@ -148,12 +144,10 @@ static struct IFACE : public KIFACE_I break; case FRAME_PCB_MODULE_VIEWER: + case FRAME_PCB_MODULE_VIEWER_MODAL: { - // yuck: - PCB_BASE_FRAME* editor = dynamic_cast( aParent ); - wxASSERT( editor ); - - FOOTPRINT_VIEWER_FRAME* frame = new FOOTPRINT_VIEWER_FRAME( aKiway, editor ); + FOOTPRINT_VIEWER_FRAME* frame = new FOOTPRINT_VIEWER_FRAME( + aKiway, aParent, FRAME_T( aClassId ) ); frame->Zoom_Automatique( true ); @@ -164,6 +158,15 @@ static struct IFACE : public KIFACE_I } break; + case FRAME_PCB_FOOTPRINT_WIZARD_MODAL: + { + FOOTPRINT_WIZARD_FRAME* frame = new FOOTPRINT_WIZARD_FRAME( + aKiway, aParent, FRAME_T( aClassId ) ); + + return frame; + } + break; + default: ; } diff --git a/pcbnew/pcbnew_config.cpp b/pcbnew/pcbnew_config.cpp index a9870c279d..df8df9fcc3 100644 --- a/pcbnew/pcbnew_config.cpp +++ b/pcbnew/pcbnew_config.cpp @@ -142,7 +142,7 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event ) FOOTPRINT_VIEWER_FRAME* viewer; - if( tableChanged && (viewer = FOOTPRINT_VIEWER_FRAME::GetActiveFootprintViewer( this )) != NULL ) + if( tableChanged && (viewer = (FOOTPRINT_VIEWER_FRAME*)Kiway().Player( FRAME_PCB_MODULE_VIEWER, false )) != NULL ) { viewer->ReCreateLibraryList(); } diff --git a/pcbnew/tool_modview.cpp b/pcbnew/tool_modview.cpp index 02fccab586..3994a2a96d 100644 --- a/pcbnew/tool_modview.cpp +++ b/pcbnew/tool_modview.cpp @@ -95,9 +95,8 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateHToolbar() m_mainToolBar->AddTool( ID_ZOOM_PAGE, wxEmptyString, KiBitmap( zoom_fit_in_page_xpm ), msg ); - // Enable this tool only if the library browser is called from - // a "load component" command - if( m_semaphore ) + // Enable this tool only if the library browser is intended for modal use. + if( m_Ident == FRAME_PCB_MODULE_VIEWER_MODAL ) { m_mainToolBar->AddSeparator(); m_mainToolBar->AddTool( ID_MODVIEW_FOOTPRINT_EXPORT_TO_BOARD, wxEmptyString, From 991926d32069169bbd7dfc25c46fd650cb42b7fc Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Sat, 3 May 2014 12:40:19 -0500 Subject: [PATCH 338/741] Modular-Kicad milestone B), major portions: *) Rework the set language support, simplify it by using KIWAY. Now any major frame with a "change language" menu can change the language for all KIWAY_PLAYERs in the whole KIWAY. Multiple KIWAYs are not supported yet. *) Simplify "modal wxFrame" support, and add that support exclusively to KIWAY_PLAYER where it is inherited by all derivatives. The function KIWAY_PLAYER::ShowModal() is in the vtable and so is cross module capable. *) Remove the requirements and assumptions that the wxFrame hierarchy always had PCB_EDIT_FRAME and SCH_EDIT_FRAME as immediate parents of their viewers and editors. This is no longer the case, nor required. *) Use KIWAY::Player() everywhere to make KIWAY_PLAYERs, this registers the KIWAY_PLAYER within the KIWAY and makes it very easy to find an open frame quickly. It also gives control to the KIWAY as to frame hierarchical relationships. *) Change single_top to use the KIWAY for loading a KIFACE and instantiating the single KIWAY_PLAYER, see bullet immediately above. *) Add KIWAY::OnKiwayEnd() and call it from PGM_BASE at program termination, this gives the KIFACEs a chance to save their final configuration dope to disk. *) Add dedicated FRAME_T's for the modal frames, so m_Ident can be tested and these modal frames are distinctly different than their non-modal equivalents. KIWAY_PLAYER::IsModal() is !not! a valid test during the wxFrame's constructor, so this is another important reason for having a dedicated FRAME_T for each modal wxFrame. On balance, more lines were deleted than were added to achieve all this. --- bitmap2component/CMakeLists.txt | 2 +- common/basicframe.cpp | 30 +---- common/colors.cpp | 1 + common/draw_frame.cpp | 6 - common/fpid.cpp | 41 +++---- common/kiway.cpp | 99 +++++++++++++--- common/kiway_player.cpp | 148 +++++++++++++++++++++--- common/pgm_base.cpp | 2 +- common/single_top.cpp | 128 +++----------------- cvpcb/cvframe.cpp | 8 -- cvpcb/cvpcb_mainframe.h | 6 - eeschema/block_libedit.cpp | 2 +- eeschema/eeschema.cpp | 10 ++ eeschema/eeschema_config.cpp | 31 ++--- eeschema/getpart.cpp | 24 ++-- eeschema/libeditframe.cpp | 74 +++++------- eeschema/libeditframe.h | 13 --- eeschema/sch_base_frame.cpp | 9 +- eeschema/schedit.cpp | 2 +- eeschema/schframe.cpp | 51 ++++---- eeschema/sheet.cpp | 2 +- eeschema/tool_viewlib.cpp | 4 +- eeschema/viewlib_frame.cpp | 113 +++++++++--------- eeschema/viewlib_frame.h | 27 ++--- gerbview/events_called_functions.cpp | 41 +++---- gerbview/gerbview_frame.h | 6 +- include/draw_frame.h | 7 -- include/fpid.h | 20 ++-- include/frame_type.h | 23 +++- include/kiface_i.h | 2 +- include/kiway.h | 59 +++++++--- include/kiway_player.h | 57 ++++++++- include/wxEeschemaStruct.h | 6 - include/wxPcbStruct.h | 6 +- include/wxstruct.h | 23 +--- kicad/kicad.cpp | 4 +- kicad/kicad.h | 3 +- kicad/mainframe.cpp | 8 ++ kicad/menubar.cpp | 19 +-- kicad/preferences.cpp | 5 - pagelayout_editor/events_functions.cpp | 17 +-- pagelayout_editor/pl_editor_frame.h | 6 - pcb_calculator/CMakeLists.txt | 3 +- pcb_calculator/pcb_calculator_frame.cpp | 1 + pcbnew/block_module_editor.cpp | 2 +- pcbnew/edit.cpp | 28 ++--- pcbnew/editmod.cpp | 12 +- pcbnew/footprint_wizard.cpp | 2 +- pcbnew/footprint_wizard_frame.cpp | 58 +++------- pcbnew/footprint_wizard_frame.h | 28 ++--- pcbnew/gpcb_plugin.cpp | 3 +- pcbnew/kicad_plugin.cpp | 6 +- pcbnew/librairi.cpp | 2 +- pcbnew/loadcmp.cpp | 27 ++--- pcbnew/modedit.cpp | 70 +++++------ pcbnew/module_editor_frame.h | 13 +-- pcbnew/moduleframe.cpp | 15 +-- pcbnew/modview_frame.cpp | 116 +++++++++---------- pcbnew/modview_frame.h | 42 +++---- pcbnew/pcbframe.cpp | 12 +- pcbnew/pcbnew.cpp | 25 ++-- pcbnew/pcbnew_config.cpp | 2 +- pcbnew/tool_modview.cpp | 5 +- 63 files changed, 769 insertions(+), 848 deletions(-) diff --git a/bitmap2component/CMakeLists.txt b/bitmap2component/CMakeLists.txt index 5bf7debd48..489ff8f3f1 100644 --- a/bitmap2component/CMakeLists.txt +++ b/bitmap2component/CMakeLists.txt @@ -14,7 +14,7 @@ set( BITMAP2COMPONENT_SRCS ) set_source_files_properties( ../common/single_top.cpp PROPERTIES - COMPILE_DEFINITIONS "TOP_FRAME=0" + COMPILE_DEFINITIONS "TOP_FRAME=FRAME_BM2CMP" ) set_source_files_properties( bitmap2cmp_gui.cpp PROPERTIES COMPILE_DEFINITIONS "COMPILING_DLL" diff --git a/common/basicframe.cpp b/common/basicframe.cpp index 91a5c0b4ee..37be1fd12c 100644 --- a/common/basicframe.cpp +++ b/common/basicframe.cpp @@ -169,12 +169,8 @@ void EDA_BASE_FRAME::ReCreateMenuBar() } -void EDA_BASE_FRAME::SetLanguage( wxCommandEvent& event ) +void EDA_BASE_FRAME::ShowChangedLanguage() { - int id = event.GetId(); - - Pgm().SetLanguageIdentifier( id ); - Pgm().SetLanguage(); ReCreateMenuBar(); GetMenuBar()->Refresh(); } @@ -717,27 +713,3 @@ void EDA_BASE_FRAME::CheckForAutoSaveFile( const wxFileName& aFileName, } } - -void EDA_BASE_FRAME::SetModalMode( bool aModal ) -{ - // Disable all other windows -#if wxCHECK_VERSION(2, 9, 4) - if( IsTopLevel() ) - { - wxWindowList::compatibility_iterator node = wxTopLevelWindows.GetFirst(); - - while( node ) - { - wxWindow* win = node->GetData(); - - if( win != this ) - win->Enable( !aModal ); - - node = node->GetNext(); - } - } -#else - // Deprecated since wxWidgets 2.9.4 - MakeModal( aModal ); -#endif -} diff --git a/common/colors.cpp b/common/colors.cpp index ca12867b6e..9016840865 100644 --- a/common/colors.cpp +++ b/common/colors.cpp @@ -122,6 +122,7 @@ EDA_COLOR_T ColorMix( EDA_COLOR_T aColor1, EDA_COLOR_T aColor2 ) // First easy thing: a black gives always the other colour if( aColor1 == BLACK ) return aColor2; + if( aColor2 == BLACK) return aColor1; diff --git a/common/draw_frame.cpp b/common/draw_frame.cpp index 75461e5f22..a79503edd3 100644 --- a/common/draw_frame.cpp +++ b/common/draw_frame.cpp @@ -556,12 +556,6 @@ bool EDA_DRAW_FRAME::HandleBlockEnd( wxDC* DC ) } -void EDA_DRAW_FRAME::SetLanguage( wxCommandEvent& event ) -{ - EDA_BASE_FRAME::SetLanguage( event ); -} - - void EDA_DRAW_FRAME::UpdateStatusBar() { wxString Line; diff --git a/common/fpid.cpp b/common/fpid.cpp index ef9f35b89f..025b7b57e4 100644 --- a/common/fpid.cpp +++ b/common/fpid.cpp @@ -62,6 +62,7 @@ const char* EndsWithRev( const char* start, const char* tail, char separator ) } +#if 0 // Not used int RevCmp( const char* s1, const char* s2 ) { int r = strncmp( s1, s2, 3 ); @@ -76,6 +77,7 @@ int RevCmp( const char* s1, const char* s2 ) return -(rnum1 - rnum2); // swap the sign, higher revs first } +#endif //----------------------------------------- @@ -116,7 +118,7 @@ void FPID::clear() } -int FPID::Parse( const std::string& aId ) +int FPID::Parse( const UTF8& aId ) { clear(); @@ -171,12 +173,6 @@ int FPID::Parse( const std::string& aId ) } -int FPID::Parse( const wxString& aId ) -{ - return Parse( std::string( TO_UTF8( aId ) ) ); -} - - FPID::FPID( const std::string& aId ) throw( PARSE_ERROR ) { int offset = Parse( aId ); @@ -194,14 +190,14 @@ FPID::FPID( const std::string& aId ) throw( PARSE_ERROR ) FPID::FPID( const wxString& aId ) throw( PARSE_ERROR ) { - std::string id = TO_UTF8( aId ); + UTF8 id = aId; int offset = Parse( id ); if( offset != -1 ) { THROW_PARSE_ERROR( _( "Illegal character found in FPID string" ), - wxString::FromUTF8( id.c_str() ), + aId, id.c_str(), 0, offset ); @@ -209,7 +205,7 @@ FPID::FPID( const wxString& aId ) throw( PARSE_ERROR ) } -int FPID::SetLibNickname( const std::string& aLogical ) +int FPID::SetLibNickname( const UTF8& aLogical ) { int offset = okLogical( aLogical ); @@ -222,15 +218,9 @@ int FPID::SetLibNickname( const std::string& aLogical ) } -int FPID::SetLibNickname( const wxString& aLogical ) +int FPID::SetFootprintName( const UTF8& aFootprintName ) { - return SetLibNickname( std::string( TO_UTF8( aLogical ) ) ); -} - - -int FPID::SetFootprintName( const std::string& aFootprintName ) -{ - int separation = int( aFootprintName.find_first_of( "/" ) ); + int separation = int( aFootprintName.find_first_of( "/" ) ); if( separation != -1 ) { @@ -246,13 +236,7 @@ int FPID::SetFootprintName( const std::string& aFootprintName ) } -int FPID::SetFootprintName( const wxString& aFootprintName ) -{ - return SetFootprintName( std::string( TO_UTF8( aFootprintName ) ) ); -} - - -int FPID::SetRevision( const std::string& aRevision ) +int FPID::SetRevision( const UTF8& aRevision ) { int offset = okRevision( aRevision ); @@ -301,8 +285,10 @@ UTF8 FPID::GetFootprintNameAndRev() const } -UTF8 FPID::Format( const std::string& aLogicalLib, const std::string& aFootprintName, - const std::string& aRevision ) +#if 0 // this is broken, it does not output aFootprintName for some reason + +UTF8 FPID::Format( const UTF8& aLogicalLib, const UTF8& aFootprintName, + const UTF8& aRevision ) throw( PARSE_ERROR ) { UTF8 ret; @@ -344,6 +330,7 @@ UTF8 FPID::Format( const std::string& aLogicalLib, const std::string& aFootprint return ret; } +#endif int FPID::compare( const FPID& aFPID ) const diff --git a/common/kiway.cpp b/common/kiway.cpp index 13c0072a92..a599474f06 100644 --- a/common/kiway.cpp +++ b/common/kiway.cpp @@ -23,14 +23,16 @@ */ #include +#include +#include #include #include #include #include +#include #include -#include -#include +#include KIFACE* KIWAY::m_kiface[KIWAY_FACE_COUNT]; @@ -38,22 +40,24 @@ int KIWAY::m_kiface_version[KIWAY_FACE_COUNT]; -KIWAY::KIWAY( PGM_BASE* aProgram, wxFrame* aTop ): +KIWAY::KIWAY( PGM_BASE* aProgram, int aCtlBits, wxFrame* aTop ): m_program( aProgram ), + m_ctl( aCtlBits ), m_top( 0 ) { - SetTop( aTop ); // hook playerDestroyHandler() into aTop. + SetTop( aTop ); // hook player_destroy_handler() into aTop. memset( m_player, 0, sizeof( m_player ) ); } + // Any event types derived from wxCommandEvt, like wxWindowDestroyEvent, are // propogated upwards to parent windows if not handled below. Therefor the // m_top window should receive all wxWindowDestroyEvents originating from -// KIWAY_PLAYERs. It does anyways, but now playerDestroyHandler eavesdrops +// KIWAY_PLAYERs. It does anyways, but now player_destroy_handler eavesdrops // on that event stream looking for KIWAY_PLAYERs being closed. -void KIWAY::playerDestroyHandler( wxWindowDestroyEvent& event ) +void KIWAY::player_destroy_handler( wxWindowDestroyEvent& event ) { wxWindow* w = event.GetWindow(); @@ -62,7 +66,7 @@ void KIWAY::playerDestroyHandler( wxWindowDestroyEvent& event ) // if destroying one of our flock, then mark it as deceased. if( (wxWindow*) m_player[i] == w ) { - // DBG(printf( "%s: marking m_player[%d] as destroyed\n", __func__, i );) + DBG(printf( "%s: marking m_player[%d] as destroyed\n", __func__, i );) m_player[i] = 0; } } @@ -73,12 +77,12 @@ void KIWAY::SetTop( wxFrame* aTop ) { if( m_top ) { - m_top->Disconnect( wxEVT_DESTROY, wxWindowDestroyEventHandler( KIWAY::playerDestroyHandler ), NULL, this ); + m_top->Disconnect( wxEVT_DESTROY, wxWindowDestroyEventHandler( KIWAY::player_destroy_handler ), NULL, this ); } if( aTop ) { - aTop->Connect( wxEVT_DESTROY, wxWindowDestroyEventHandler( KIWAY::playerDestroyHandler ), NULL, this ); + aTop->Connect( wxEVT_DESTROY, wxWindowDestroyEventHandler( KIWAY::player_destroy_handler ), NULL, this ); } m_top = aTop; @@ -91,13 +95,13 @@ const wxString KIWAY::dso_full_path( FACE_T aFaceId ) switch( aFaceId ) { - case FACE_SCH: name = KIFACE_PREFIX wxT( "eeschema" ); break; - case FACE_PCB: name = KIFACE_PREFIX wxT( "pcbnew" ); break; - case FACE_CVPCB: name = KIFACE_PREFIX wxT( "cvpcb" ); break; - case FACE_GERBVIEW: name = KIFACE_PREFIX wxT( "gerbview" ); break; - case FACE_PL_EDITOR: name = KIFACE_PREFIX wxT( "pl_editor" ); break; - - // case FACE_PCB_CALCULATOR: who knows. + case FACE_SCH: name = KIFACE_PREFIX wxT( "eeschema" ); break; + case FACE_PCB: name = KIFACE_PREFIX wxT( "pcbnew" ); break; + case FACE_CVPCB: name = KIFACE_PREFIX wxT( "cvpcb" ); break; + case FACE_GERBVIEW: name = KIFACE_PREFIX wxT( "gerbview" ); break; + case FACE_PL_EDITOR: name = KIFACE_PREFIX wxT( "pl_editor" ); break; + case FACE_PCB_CALCULATOR: name = KIFACE_PREFIX wxT( "pcb_calculator" ); break; + case FACE_BMP2CMP: name = KIFACE_PREFIX wxT( "bitmap2component" ); break; default: wxASSERT_MSG( 0, wxT( "caller has a bug, passed a bad aFaceId" ) ); @@ -172,7 +176,7 @@ KIFACE* KIWAY::KiFACE( FACE_T aFaceId, bool doLoad ) // Give the DSO a single chance to do its "process level" initialization. // "Process level" specifically means stay away from any projects in there. - if( kiface->OnKifaceStart( m_program, KFCTL_PROJECT_SUITE ) ) + if( kiface->OnKifaceStart( m_program, m_ctl ) ) { // Tell dso's wxDynamicLibrary destructor not to Unload() the program image. (void) dso.Detach(); @@ -214,12 +218,14 @@ KIWAY::FACE_T KIWAY::KifaceType( FRAME_T aFrameType ) case FRAME_SCH: case FRAME_SCH_LIB_EDITOR: case FRAME_SCH_VIEWER: + case FRAME_SCH_VIEWER_MODAL: return FACE_SCH; case FRAME_PCB: case FRAME_PCB_MODULE_EDITOR: case FRAME_PCB_MODULE_VIEWER: - case FRAME_PCB_FOOTPRINT_WIZARD: + case FRAME_PCB_MODULE_VIEWER_MODAL: + case FRAME_PCB_FOOTPRINT_WIZARD_MODAL: case FRAME_PCB_DISPLAY3D: return FACE_PCB; @@ -233,6 +239,12 @@ KIWAY::FACE_T KIWAY::KifaceType( FRAME_T aFrameType ) case FRAME_PL_EDITOR: return FACE_PL_EDITOR; + case FRAME_CALC: + return FACE_PCB_CALCULATOR; + + case FRAME_BM2CMP: + return FACE_BMP2CMP; + default: return FACE_T( -1 ); } @@ -266,7 +278,12 @@ KIWAY_PLAYER* KIWAY::Player( FRAME_T aFrameType, bool doCreate ) if( kiface ) { - KIWAY_PLAYER* frame = (KIWAY_PLAYER*) kiface->CreateWindow( m_top, aFrameType, this, KFCTL_PROJECT_SUITE ); + KIWAY_PLAYER* frame = (KIWAY_PLAYER*) kiface->CreateWindow( + m_top, + aFrameType, + this, + m_ctl // questionable need, these same flags where passed to the KIFACE::OnKifaceStart() + ); wxASSERT( frame ); return m_player[aFrameType] = frame; @@ -327,6 +344,39 @@ void KIWAY::ExpressMail( FRAME_T aDestination, } +void KIWAY::SetLanguage( int aLanguage ) +{ + Pgm().SetLanguageIdentifier( aLanguage ); + Pgm().SetLanguage(); + +#if 1 + // This is a risky hack that goes away if we allow the language to be + // set only from the top most frame if !Kiface.IsSingle() + + // Only for the C++ project manager, and not for the python one and not for + // single_top do we look for the EDA_BASE_FRAME as the top level window. + // For single_top this is not needed because that window is registered in + // the array below. + if( m_ctl & KFCTL_CPP_PROJECT_SUITE ) + { + EDA_BASE_FRAME* top = (EDA_BASE_FRAME*) m_top; + if( top ) + top->ShowChangedLanguage(); + } +#endif + + for( unsigned i=0; i < DIM( m_player ); ++i ) + { + KIWAY_PLAYER* frame = m_player[i]; + + if( frame ) + { + frame->ShowChangedLanguage(); + } + } +} + + bool KIWAY::ProcessEvent( wxEvent& aEvent ) { KIWAY_EXPRESS* mail = dynamic_cast( &aEvent ); @@ -351,3 +401,14 @@ bool KIWAY::ProcessEvent( wxEvent& aEvent ) return false; } + + +void KIWAY::OnKiwayEnd() +{ + for( unsigned i=0; i < DIM( m_kiface ); ++i ) + { + if( m_kiface[i] ) + m_kiface[i]->OnKifaceEnd(); + } +} + diff --git a/common/kiway_player.cpp b/common/kiway_player.cpp index 427fdf3a51..31aca7d1d8 100644 --- a/common/kiway_player.cpp +++ b/common/kiway_player.cpp @@ -2,28 +2,26 @@ #include #include +#include +#include #include BEGIN_EVENT_TABLE( KIWAY_PLAYER, EDA_BASE_FRAME ) - /* have not been able to get this to work yet: EVT_KIWAY_EXPRESS( KIWAY_PLAYER::kiway_express ) - Use Connect() in constructor until this can be sorted out. - - OK the problem is KIWAY_PLAYER::wxEVENT_ID not being unique accross all link images. - */ + EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END, KIWAY_PLAYER::language_change ) END_EVENT_TABLE() - KIWAY_PLAYER::KIWAY_PLAYER( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrameType, const wxString& aTitle, const wxPoint& aPos, const wxSize& aSize, long aStyle, const wxString& aWdoName ) : EDA_BASE_FRAME( aParent, aFrameType, aTitle, aPos, aSize, aStyle, aWdoName ), - KIWAY_HOLDER( aKiway ) + KIWAY_HOLDER( aKiway ), + m_modal_dismissed( 0 ) { DBG( printf("KIWAY_EXPRESS::wxEVENT_ID:%d\n", KIWAY_EXPRESS::wxEVENT_ID );) - Connect( KIWAY_EXPRESS::wxEVENT_ID, wxKiwayExressHandler( KIWAY_PLAYER::kiway_express ) ); + //Connect( KIWAY_EXPRESS::wxEVENT_ID, wxKiwayExressHandler( KIWAY_PLAYER::kiway_express ) ); } @@ -31,10 +29,125 @@ KIWAY_PLAYER::KIWAY_PLAYER( wxWindow* aParent, wxWindowID aId, const wxString& a const wxPoint& aPos, const wxSize& aSize, long aStyle, const wxString& aWdoName ) : EDA_BASE_FRAME( aParent, (FRAME_T) aId, aTitle, aPos, aSize, aStyle, aWdoName ), - KIWAY_HOLDER( 0 ) + KIWAY_HOLDER( 0 ), + m_modal_dismissed( 0 ) { DBG( printf("KIWAY_EXPRESS::wxEVENT_ID:%d\n", KIWAY_EXPRESS::wxEVENT_ID );) - Connect( KIWAY_EXPRESS::wxEVENT_ID, wxKiwayExressHandler( KIWAY_PLAYER::kiway_express ) ); + //Connect( KIWAY_EXPRESS::wxEVENT_ID, wxKiwayExressHandler( KIWAY_PLAYER::kiway_express ) ); +} + + +KIWAY_PLAYER::~KIWAY_PLAYER(){} + + +void KIWAY_PLAYER::KiwayMailIn( KIWAY_EXPRESS& aEvent ) +{ + // override this in derived classes. +} + + +static void makeModal( wxFrame* aFrame, bool IsModal ) +{ + // disable or enable all other top level windows +#if wxCHECK_VERSION(2, 9, 4) + wxWindowList::compatibility_iterator node = wxTopLevelWindows.GetFirst(); + + while( node ) + { + wxWindow* win = node->GetData(); + + if( win != aFrame ) + win->Enable( !IsModal ); + + node = node->GetNext(); + } +#else + // Deprecated since wxWidgets 2.9.4 + aFrame->MakeModal( IsModal ); +#endif +} + + +/** + * toggle global wxFrame enable/disable state, does the re-enable part even + * if an exception is thrown. + */ +struct ENABLE_DISABLE +{ + wxFrame* m_frame; + + ENABLE_DISABLE( wxFrame* aFrame ) : + m_frame( aFrame ) + { + makeModal( aFrame, true ); + } + + ~ENABLE_DISABLE() + { + // Re-enable all frames, (oops, even if they were previously inactive). + // This is probably why this function was deprecated in wx. + makeModal( m_frame, false ); + } +}; + + +bool KIWAY_PLAYER::ShowModal( wxString* aResult ) +{ + /* + This function has a nice interface but an unsightly implementation. + Now it is encapsulated, making it easier to improve. I am not sure + a wxSemaphore was needed, especially since no blocking happens. It seems + like a volatile bool is sufficient. + + It works in tandem with DismissModal(). But only ShowModal() is in the + vtable and therefore cross-module capable. + */ + + volatile bool dismissed = false; + + // disable all frames except the modal one, re-enable on exit, exception safe. + ENABLE_DISABLE toggle( this ); + + m_modal_dismissed = &dismissed; + + Show( true ); + Raise(); + + // Wait for the one and only active frame to call DismissModal() from + // some concluding event. + while( !dismissed ) + { + wxYield(); + wxMilliSleep( 50 ); + } + + // no longer modal, not to mention that the pointer would be invalid outside this scope. + m_modal_dismissed = NULL; + + if( aResult ) + *aResult = m_modal_string; + + return m_modal_ret_val; +} + + +bool KIWAY_PLAYER::IsDismissed() +{ + // if already dismissed, then m_modal_dismissed may be NULL, and if not, + // it can still be dismissed if the bool is true. + bool ret = !m_modal_dismissed || *m_modal_dismissed; + + return ret; +} + + +void KIWAY_PLAYER::DismissModal( bool aRetVal, const wxString& aResult ) +{ + m_modal_ret_val = aRetVal; + m_modal_string = aResult; + + if( m_modal_dismissed ) + *m_modal_dismissed = true; } @@ -42,17 +155,20 @@ void KIWAY_PLAYER::kiway_express( KIWAY_EXPRESS& aEvent ) { // logging support #if defined(DEBUG) - const char* class_name = typeid(this).name(); + const char* class_name = typeid( this ).name(); - printf( "%s: cmd:%d pay:'%s'\n", class_name, - aEvent.GetEventType(), aEvent.GetPayload().c_str() ); + printf( "%s: received cmd:%d pay:'%s'\n", class_name, + aEvent.Command(), aEvent.GetPayload().c_str() ); #endif - KiwayMailIn( aEvent ); // call the virtual, overload in derived. + KiwayMailIn( aEvent ); // call the virtual, override in derived. } -void KIWAY_PLAYER::KiwayMailIn( KIWAY_EXPRESS& aEvent ) +void KIWAY_PLAYER::language_change( wxCommandEvent& event ) { - // overload this. + int id = event.GetId(); + + // tell all the KIWAY_PLAYERs about the language change. + Kiway().SetLanguage( id ); } diff --git a/common/pgm_base.cpp b/common/pgm_base.cpp index 1789f939ed..d7f923676c 100644 --- a/common/pgm_base.cpp +++ b/common/pgm_base.cpp @@ -622,7 +622,7 @@ bool PGM_BASE::SetLanguage( bool first_time ) void PGM_BASE::SetLanguageIdentifier( int menu_id ) { - wxLogDebug( wxT( "Select language ID %d from %zd possible languages." ), + wxLogDebug( wxT( "Select language ID %d from %d possible languages." ), menu_id, DIM( s_Languages ) ); for( unsigned ii = 0; ii < DIM( s_Languages ); ii++ ) diff --git a/common/single_top.cpp b/common/single_top.cpp index 2632a32eae..7d7c816590 100644 --- a/common/single_top.cpp +++ b/common/single_top.cpp @@ -121,7 +121,7 @@ static const wxString dso_full_path( const wxString& aAbsoluteArgv0 ) // Only a single KIWAY is supported in this single_top top level component, // which is dedicated to loading only a single DSO. -KIWAY Kiway( &Pgm() ); +KIWAY Kiway( &Pgm(), KFCTL_STANDALONE ); // implement a PGM_BASE and a wxApp side by side: @@ -225,82 +225,6 @@ struct APP_SINGLE_TOP : public wxApp IMPLEMENT_APP( APP_SINGLE_TOP ); -/** - * Function get_kiface_getter - * returns a KIFACE_GETTER_FUNC for the current process's main implementation - * link image. - * - * @param aDSOName is an absolute full path to the DSO to load and find - * KIFACE_GETTER_FUNC within. - * - * @return KIFACE_GETTER_FUNC* - a pointer to a function which can be called to - * get the KIFACE or NULL if the getter func was not found. If not found, - * it is possibly not version compatible since the lookup is done by name and - * the name contains the API version. - */ -static KIFACE_GETTER_FUNC* get_kiface_getter( const wxString& aDSOName ) -{ -#if defined(BUILD_KIWAY_DLL) - - // Remember single_top only knows about a single DSO. Using an automatic - // with a defeated destructor, see Detach() below, so that the DSO program - // image stays in RAM until process termination, and specifically - // beyond the point in time at which static destructors are run. Otherwise - // a static wxDynamicLibrary's destructor might create an out of sequence - // problem. This was never detected, so it's only a preventative strategy. - wxDynamicLibrary dso; - - void* addr = NULL; - - if( !dso.Load( aDSOName, wxDL_VERBATIM | wxDL_NOW ) ) - { - // Failure: error reporting UI was done via wxLogSysError(). - // No further reporting required here. - } - - else if( ( addr = dso.GetSymbol( wxT( KIFACE_INSTANCE_NAME_AND_VERSION ) ) ) == NULL ) - { - // Failure: error reporting UI was done via wxLogSysError(). - // No further reporting required here. - } - - else - { - // Tell dso's wxDynamicLibrary destructor not to Unload() the program image. - (void) dso.Detach(); - - return (KIFACE_GETTER_FUNC*) addr; - } - - // There is a file installation bug. We only look for KIFACE_I's which we know - // to exist, and we did not find one. If we do not find one, this is an - // installation bug. - - wxString msg = wxString::Format( wxT( - "Fatal Installation Bug\nmissing file:\n'%s'\n\nargv[0]:\n'%s'" ), - GetChars( aDSOName ), - GetChars( wxStandardPaths::Get().GetExecutablePath() ) - ); - - // This is a fatal error, one from which we cannot recover, nor do we want - // to protect against in client code which would require numerous noisy - // tests in numerous places. So we inform the user that the installation - // is bad. This exception will likely not get caught until way up in the - // wxApp derivative, at which point the process will exit gracefully. - THROW_IO_ERROR( msg ); - -#else - return &KIFACE_GETTER; - -#endif -} - - -static KIFACE* kiface; -static int kiface_version; - - - bool PGM_SINGLE_TOP::OnPgmInit( wxApp* aWxApp ) { // first thing: set m_wx_app @@ -321,44 +245,27 @@ bool PGM_SINGLE_TOP::OnPgmInit( wxApp* aWxApp ) if( !initPgm() ) return false; - wxString dname = dso_full_path( absoluteArgv0 ); +#if !defined(BUILD_KIWAY_DLL) + // Get the getter, it is statically linked into this binary image. + KIFACE_GETTER_FUNC* getter = &KIFACE_GETTER; - // Get the getter. - KIFACE_GETTER_FUNC* getter = get_kiface_getter( dname ); - - if( !getter ) - { - // get_kiface_getter() failed & already showed the UI message. - // Return failure without any further UI. - return false; - } + int kiface_version; // Get the KIFACE. - kiface = getter( &kiface_version, KIFACE_VERSION, this ); + KIFACE* kiface = getter( &kiface_version, KIFACE_VERSION, this ); - // KIFACE_GETTER_FUNC function comment (API) says the non-NULL is unconditional. - wxASSERT_MSG( kiface, wxT( "attempted DSO has a bug, failed to return a KIFACE*" ) ); - - // Give the DSO a single chance to do its "process level" initialization. - // "Process level" specifically means stay away from any projects in there. - if( !kiface->OnKifaceStart( this, KFCTL_STANDALONE ) ) - return false; - - // Use KIFACE to create a top window that the KIFACE knows about. - // TOP_FRAME is passed on compiler command line from CMake, and is one of - // the types in FRAME_T. - // KIFACE::CreateWindow() is a virtual so we don't need to link to it. - // Remember its in the *.kiface DSO. -#if 0 - // this pulls in EDA_DRAW_FRAME type info, which we don't want in - // the single_top link image. - KIWAY_PLAYER* frame = dynamic_cast( kiface->CreateWindow( - NULL, TOP_FRAME, &Kiway, KFCTL_STANDALONE ) ); -#else - KIWAY_PLAYER* frame = (KIWAY_PLAYER*) kiface->CreateWindow( - NULL, TOP_FRAME, &Kiway, KFCTL_STANDALONE ); + // Trick the KIWAY into thinking it loaded a KIFACE, by recording the KIFACE + // in the KIWAY. It needs to be there for KIWAY::OnKiwayEnd() anyways. + Kiway.set_kiface( KIWAY::KifaceType( TOP_FRAME ), kiface ); #endif + // Use KIWAY to create a top window, which registers its existence also. + // "TOP_FRAME" is a macro that is passed on compiler command line from CMake, + // and is one of the types in FRAME_T. + KIWAY_PLAYER* frame = Kiway.Player( TOP_FRAME, true ); + + Kiway.SetTop( frame ); + App().SetTopWindow( frame ); // wxApp gets a face. // Open project or file specified on the command line: @@ -454,8 +361,7 @@ bool PGM_SINGLE_TOP::OnPgmInit( wxApp* aWxApp ) void PGM_SINGLE_TOP::OnPgmExit() { - if( kiface ) - kiface->OnKifaceEnd(); + Kiway.OnKiwayEnd(); saveCommonSettings(); diff --git a/cvpcb/cvframe.cpp b/cvpcb/cvframe.cpp index 74b79b3567..3ffd306b7d 100644 --- a/cvpcb/cvframe.cpp +++ b/cvpcb/cvframe.cpp @@ -76,8 +76,6 @@ BEGIN_EVENT_TABLE( CVPCB_MAINFRAME, EDA_BASE_FRAME ) EVT_MENU( ID_CVPCB_LIB_TABLE_EDIT, CVPCB_MAINFRAME::OnEditFootprintLibraryTable ) - EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END, CVPCB_MAINFRAME::SetLanguage ) - // Toolbar events EVT_TOOL( ID_CVPCB_QUIT, CVPCB_MAINFRAME::OnQuit ) EVT_TOOL( ID_CVPCB_READ_INPUT_NETLIST, CVPCB_MAINFRAME::LoadNetList ) @@ -558,12 +556,6 @@ void CVPCB_MAINFRAME::DisplayModule( wxCommandEvent& event ) } -void CVPCB_MAINFRAME::SetLanguage( wxCommandEvent& event ) -{ - EDA_BASE_FRAME::SetLanguage( event ); -} - - void CVPCB_MAINFRAME::DisplayDocFile( wxCommandEvent& event ) { GetAssociatedDocument( this, m_DocModulesFileName, &Kiface().KifaceSearch() ); diff --git a/cvpcb/cvpcb_mainframe.h b/cvpcb/cvpcb_mainframe.h index 8cd8f5c322..3993091dda 100644 --- a/cvpcb/cvpcb_mainframe.h +++ b/cvpcb/cvpcb_mainframe.h @@ -123,12 +123,6 @@ public: void ChangeFocus( bool aMoveRight ); - /** - * Function SetLanguage - * is called on a language menu selection. - */ - void SetLanguage( wxCommandEvent& event ); - void ToFirstNA( wxCommandEvent& event ); void ToPreviousNA( wxCommandEvent& event ); diff --git a/eeschema/block_libedit.cpp b/eeschema/block_libedit.cpp index e9c89d14f5..abf7fc66ed 100644 --- a/eeschema/block_libedit.cpp +++ b/eeschema/block_libedit.cpp @@ -321,7 +321,7 @@ void DrawMovingBlockOutlines( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& wxPoint move_offset; block = &screen->m_BlockLocate; - LIB_EDIT_FRAME* parent = ( LIB_EDIT_FRAME* ) aPanel->GetParent(); + LIB_EDIT_FRAME* parent = (LIB_EDIT_FRAME*) aPanel->GetParent(); wxASSERT( parent != NULL ); LIB_COMPONENT* component = parent->GetComponent(); diff --git a/eeschema/eeschema.cpp b/eeschema/eeschema.cpp index c5e1432036..911c1d138d 100644 --- a/eeschema/eeschema.cpp +++ b/eeschema/eeschema.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -104,6 +105,15 @@ static struct IFACE : public KIFACE_I } break; + + case FRAME_SCH_VIEWER: + case FRAME_SCH_VIEWER_MODAL: + { + LIB_VIEW_FRAME* frame = new LIB_VIEW_FRAME( aKiway, aParent, FRAME_T( aClassId ) ); + return frame; + } + break; + default: return NULL; } diff --git a/eeschema/eeschema_config.cpp b/eeschema/eeschema_config.cpp index caa3b2782b..2a0cccf33b 100644 --- a/eeschema/eeschema_config.cpp +++ b/eeschema/eeschema_config.cpp @@ -118,7 +118,10 @@ EDA_COLOR_T GetInvisibleItemColor() void LIB_EDIT_FRAME::InstallConfigFrame( wxCommandEvent& event ) { - InvokeEeschemaConfig( (SCH_EDIT_FRAME *)GetParent(), this ); + SCH_EDIT_FRAME* frame = (SCH_EDIT_FRAME*) Kiway().Player( FRAME_SCH, false ); + wxASSERT( frame ); + + InvokeEeschemaConfig( frame, this ); } @@ -134,7 +137,9 @@ void LIB_EDIT_FRAME::Process_Config( wxCommandEvent& event ) { int id = event.GetId(); wxFileName fn; - SCH_EDIT_FRAME* schFrame = ( SCH_EDIT_FRAME* ) GetParent(); + + SCH_EDIT_FRAME* schFrame = (SCH_EDIT_FRAME*) Kiway().Player( FRAME_SCH, false ); + wxASSERT( schFrame ); switch( id ) { @@ -143,20 +148,20 @@ void LIB_EDIT_FRAME::Process_Config( wxCommandEvent& event ) break; case ID_CONFIG_READ: - { - fn = g_RootSheet->GetScreen()->GetFileName(); - fn.SetExt( ProjectFileExtension ); + { + fn = g_RootSheet->GetScreen()->GetFileName(); + fn.SetExt( ProjectFileExtension ); - wxFileDialog dlg( this, _( "Read Project File" ), fn.GetPath(), - fn.GetFullName(), ProjectFileWildcard, - wxFD_OPEN | wxFD_FILE_MUST_EXIST ); + wxFileDialog dlg( this, _( "Read Project File" ), fn.GetPath(), + fn.GetFullName(), ProjectFileWildcard, + wxFD_OPEN | wxFD_FILE_MUST_EXIST ); - if( dlg.ShowModal() == wxID_CANCEL ) - break; + if( dlg.ShowModal() == wxID_CANCEL ) + break; - schFrame->LoadProjectFile( dlg.GetPath(), true ); - } - break; + schFrame->LoadProjectFile( dlg.GetPath(), true ); + } + break; // Hotkey IDs diff --git a/eeschema/getpart.cpp b/eeschema/getpart.cpp index fa1f083860..e977eee5c1 100644 --- a/eeschema/getpart.cpp +++ b/eeschema/getpart.cpp @@ -30,6 +30,7 @@ #include #include +#include #include #include #include @@ -55,18 +56,14 @@ wxString SCH_BASE_FRAME::SelectComponentFromLibBrowser( LIB_ALIAS* aPreselectedAlias, int* aUnit, int* aConvert ) { - wxSemaphore semaphore( 0, 1 ); - wxString cmpname; - - // Close the current Lib browser, if open, and open a new one, in "modal" mode: - LIB_VIEW_FRAME* viewlibFrame = LIB_VIEW_FRAME::GetActiveLibraryViewer( this ); + // Close the any current non-modal Lib browser if open, and open a new one, in "modal" mode: + LIB_VIEW_FRAME* viewlibFrame = (LIB_VIEW_FRAME*) Kiway().Player( FRAME_SCH_VIEWER, false ); if( viewlibFrame ) viewlibFrame->Destroy(); - viewlibFrame = new LIB_VIEW_FRAME( &Kiway(), this, NULL, &semaphore, - KICAD_DEFAULT_DRAWFRAME_STYLE | wxFRAME_FLOAT_ON_PARENT ); + viewlibFrame = (LIB_VIEW_FRAME*) Kiway().Player( FRAME_SCH_VIEWER_MODAL, true ); - if ( aPreselectedAlias ) + if( aPreselectedAlias ) { viewlibFrame->SetSelectedLibrary( aPreselectedAlias->GetLibraryName() ); viewlibFrame->SetSelectedComponent( aPreselectedAlias->GetName() ); @@ -80,15 +77,9 @@ wxString SCH_BASE_FRAME::SelectComponentFromLibBrowser( LIB_ALIAS* aPreselectedA viewlibFrame->Refresh(); - // Show the library viewer frame until it is closed - // Wait for viewer closing event: - while( semaphore.TryWait() == wxSEMA_BUSY ) - { - wxYield(); - wxMilliSleep( 50 ); - } + wxString cmpname; - cmpname = viewlibFrame->GetSelectedComponent(); + viewlibFrame->ShowModal( &cmpname ); if( aUnit ) *aUnit = viewlibFrame->GetUnit(); @@ -101,6 +92,7 @@ wxString SCH_BASE_FRAME::SelectComponentFromLibBrowser( LIB_ALIAS* aPreselectedA return cmpname; } + wxString SCH_BASE_FRAME::SelectComponentFromLibrary( const wxString& aLibname, wxArrayString& aHistoryList, int& aHistoryLastUnit, diff --git a/eeschema/libeditframe.cpp b/eeschema/libeditframe.cpp index 1a79cba67e..49ea88353d 100644 --- a/eeschema/libeditframe.cpp +++ b/eeschema/libeditframe.cpp @@ -99,7 +99,7 @@ BEGIN_EVENT_TABLE( LIB_EDIT_FRAME, EDA_DRAW_FRAME ) EVT_SIZE( LIB_EDIT_FRAME::OnSize ) EVT_ACTIVATE( LIB_EDIT_FRAME::OnActivate ) - /* Main horizontal toolbar. */ + // Main horizontal toolbar. EVT_TOOL( ID_LIBEDIT_SAVE_CURRENT_LIB, LIB_EDIT_FRAME::OnSaveActiveLibrary ) EVT_TOOL( ID_LIBEDIT_SELECT_CURRENT_LIB, LIB_EDIT_FRAME::Process_Special_Functions ) EVT_TOOL( ID_LIBEDIT_DELETE_PART, LIB_EDIT_FRAME::DeleteOnePart ) @@ -125,12 +125,12 @@ BEGIN_EVENT_TABLE( LIB_EDIT_FRAME, EDA_DRAW_FRAME ) EVT_COMBOBOX( ID_LIBEDIT_SELECT_PART_NUMBER, LIB_EDIT_FRAME::OnSelectPart ) EVT_COMBOBOX( ID_LIBEDIT_SELECT_ALIAS, LIB_EDIT_FRAME::OnSelectAlias ) - /* Right vertical toolbar. */ + // Right vertical toolbar. EVT_TOOL( ID_NO_TOOL_SELECTED, LIB_EDIT_FRAME::OnSelectTool ) EVT_TOOL_RANGE( ID_LIBEDIT_PIN_BUTT, ID_LIBEDIT_DELETE_ITEM_BUTT, LIB_EDIT_FRAME::OnSelectTool ) - /* menubar commands */ + // menubar commands EVT_MENU( wxID_EXIT, LIB_EDIT_FRAME::CloseWindow ) EVT_MENU( ID_LIBEDIT_SAVE_CURRENT_LIB_AS, LIB_EDIT_FRAME::OnSaveActiveLibrary ) EVT_MENU( ID_LIBEDIT_GEN_PNG_FILE, LIB_EDIT_FRAME::OnPlotCurrentComponent ) @@ -152,9 +152,7 @@ BEGIN_EVENT_TABLE( LIB_EDIT_FRAME, EDA_DRAW_FRAME ) EVT_MENU_RANGE( ID_PREFERENCES_HOTKEY_START, ID_PREFERENCES_HOTKEY_END, LIB_EDIT_FRAME::Process_Config ) - EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END, LIB_EDIT_FRAME::SetLanguage ) - - /* Context menu events and commands. */ + // Context menu events and commands. EVT_MENU( ID_LIBEDIT_EDIT_PIN, LIB_EDIT_FRAME::OnEditPin ) EVT_MENU( ID_LIBEDIT_ROTATE_ITEM, LIB_EDIT_FRAME::OnRotateItem ) @@ -165,7 +163,7 @@ BEGIN_EVENT_TABLE( LIB_EDIT_FRAME, EDA_DRAW_FRAME ) EVT_MENU_RANGE( ID_POPUP_GENERAL_START_RANGE, ID_POPUP_GENERAL_END_RANGE, LIB_EDIT_FRAME::Process_Special_Functions ) - /* Update user interface elements. */ + // Update user interface elements. EVT_UPDATE_UI( ExportPartId, LIB_EDIT_FRAME::OnUpdateEditingPart ) EVT_UPDATE_UI( CreateNewLibAndSavePartId, LIB_EDIT_FRAME::OnUpdateEditingPart ) EVT_UPDATE_UI( ID_LIBEDIT_SAVE_CURRENT_PART, LIB_EDIT_FRAME::OnUpdateEditingPart ) @@ -193,7 +191,7 @@ LIB_EDIT_FRAME::LIB_EDIT_FRAME( KIWAY* aKiway, SCH_EDIT_FRAME* aParent ) : SCH_BASE_FRAME( aKiway, aParent, FRAME_SCH_LIB_EDITOR, _( "Library Editor" ), wxDefaultPosition, wxDefaultSize, KICAD_DEFAULT_DRAWFRAME_STYLE, GetLibEditFrameName() ) { - wxASSERT( aParent ); // LIB_EDIT_FRAME needs a parent, since it peeks up there. + wxASSERT( aParent ); m_FrameName = GetLibEditFrameName(); m_showAxis = true; // true to draw axis @@ -204,6 +202,7 @@ LIB_EDIT_FRAME::LIB_EDIT_FRAME( KIWAY* aKiway, SCH_EDIT_FRAME* aParent ) : m_tempCopyComponent = NULL; m_HotkeysZoomAndGridList = s_Libedit_Hokeys_Descr; m_editPinsPerPartOrConvert = false; + // Initialize grid id to the default value 50 mils: m_LastGridSizeId = ID_POPUP_GRID_LEVEL_50 - ID_POPUP_GRID_LEVEL_1000; @@ -293,12 +292,6 @@ const wxChar* LIB_EDIT_FRAME::GetLibEditFrameName() } -LIB_EDIT_FRAME* LIB_EDIT_FRAME::GetActiveLibraryEditor() -{ - return (LIB_EDIT_FRAME*) wxWindow::FindWindowByName(GetLibEditFrameName()); -} - - void LIB_EDIT_FRAME::LoadSettings( wxConfigBase* aCfg ) { #if 0 // original @@ -389,12 +382,12 @@ void LIB_EDIT_FRAME::OnCloseWindow( wxCloseEvent& Event ) double LIB_EDIT_FRAME::BestZoom() { -/* Please, note: wxMSW before version 2.9 seems have - * problems with zoom values < 1 ( i.e. userscale > 1) and needs to be patched: - * edit file /src/msw/dc.cpp - * search for line static const int VIEWPORT_EXTENT = 1000; - * and replace by static const int VIEWPORT_EXTENT = 10000; - */ + /* Please, note: wxMSW before version 2.9 seems have + * problems with zoom values < 1 ( i.e. userscale > 1) and needs to be patched: + * edit file /src/msw/dc.cpp + * search for line static const int VIEWPORT_EXTENT = 1000; + * and replace by static const int VIEWPORT_EXTENT = 10000; + */ int dx, dy; wxSize size; EDA_RECT BoundaryBox; @@ -750,23 +743,23 @@ void LIB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) break; case ID_POPUP_LIBEDIT_DELETE_CURRENT_POLY_SEGMENT: - { - // Delete the last created segment, while creating a polyline draw item - if( m_drawItem == NULL ) - break; + { + // Delete the last created segment, while creating a polyline draw item + if( m_drawItem == NULL ) + break; - m_canvas->MoveCursorToCrossHair(); - 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( GetCrossHairPosition( true ) ); - m_drawItem->Draw( m_canvas, &dc, wxPoint( 0, 0 ), UNSPECIFIED_COLOR, g_XorMode, NULL, - DefaultTransform ); - m_drawItem->SetFlags( oldFlags ); - m_lastDrawItem = NULL; + m_canvas->MoveCursorToCrossHair(); + 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( GetCrossHairPosition( true ) ); + m_drawItem->Draw( m_canvas, &dc, wxPoint( 0, 0 ), UNSPECIFIED_COLOR, g_XorMode, NULL, + DefaultTransform ); + m_drawItem->SetFlags( oldFlags ); + m_lastDrawItem = NULL; + } break; - } case ID_POPUP_LIBEDIT_DELETE_ITEM: if( m_drawItem ) @@ -918,17 +911,6 @@ void LIB_EDIT_FRAME::EnsureActiveLibExists() } -void LIB_EDIT_FRAME::SetLanguage( wxCommandEvent& event ) -{ - EDA_BASE_FRAME::SetLanguage( event ); - SCH_EDIT_FRAME *parent = (SCH_EDIT_FRAME *)GetParent(); - // Call parent->EDA_BASE_FRAME::SetLanguage and NOT - // parent->SetLanguage because parent->SetLanguage call - // LIB_EDIT_FRAME::SetLanguage - parent->EDA_BASE_FRAME::SetLanguage( event ); -} - - void LIB_EDIT_FRAME::TempCopyComponent() { if( m_tempCopyComponent ) diff --git a/eeschema/libeditframe.h b/eeschema/libeditframe.h index 45582f34d8..07a52b6203 100644 --- a/eeschema/libeditframe.h +++ b/eeschema/libeditframe.h @@ -133,13 +133,6 @@ public: */ static const wxChar* GetLibEditFrameName(); - /** - * Function GetActiveLibraryEditor (static) - * @return a reference to the current opened Library editor - * or NULL if no Library editor currently opened - */ - static LIB_EDIT_FRAME* GetActiveLibraryEditor(); - void ReCreateMenuBar(); /** @@ -149,12 +142,6 @@ public: */ static void EnsureActiveLibExists(); - /** - * Function SetLanguage - * is called on a language menu selection - */ - void SetLanguage( wxCommandEvent& event ); - void InstallConfigFrame( wxCommandEvent& event ); void InstallDimensionsDialog( wxCommandEvent& event ); void OnColorConfig( wxCommandEvent& aEvent ); diff --git a/eeschema/sch_base_frame.cpp b/eeschema/sch_base_frame.cpp index 7908defdc1..ca6ac2f9ed 100644 --- a/eeschema/sch_base_frame.cpp +++ b/eeschema/sch_base_frame.cpp @@ -26,6 +26,7 @@ #include #include #include +#include SCH_BASE_FRAME::SCH_BASE_FRAME( KIWAY* aKiway, wxWindow* aParent, @@ -40,12 +41,10 @@ SCH_BASE_FRAME::SCH_BASE_FRAME( KIWAY* aKiway, wxWindow* aParent, void SCH_BASE_FRAME::OnOpenLibraryViewer( wxCommandEvent& event ) { - LIB_VIEW_FRAME* viewlibFrame = LIB_VIEW_FRAME::GetActiveLibraryViewer( this ); + LIB_VIEW_FRAME* viewlibFrame = (LIB_VIEW_FRAME*) Kiway().Player( FRAME_SCH_VIEWER, true ); - if( viewlibFrame ) - viewlibFrame->Show( true ); - else - new LIB_VIEW_FRAME( &Kiway(), this ); + viewlibFrame->Show( true ); + viewlibFrame->Raise(); } diff --git a/eeschema/schedit.cpp b/eeschema/schedit.cpp index 8706b5c4b5..ff42fdc9af 100644 --- a/eeschema/schedit.cpp +++ b/eeschema/schedit.cpp @@ -664,7 +664,7 @@ static void abortMoveItem( EDA_DRAW_PANEL* aPanel, wxDC* aDC ) { SCH_SCREEN* screen = (SCH_SCREEN*) aPanel->GetScreen(); SCH_ITEM* item = screen->GetCurItem(); - SCH_EDIT_FRAME* parent = ( SCH_EDIT_FRAME* ) aPanel->GetParent(); + SCH_EDIT_FRAME* parent = (SCH_EDIT_FRAME*) aPanel->GetParent(); parent->SetRepeatItem( NULL ); screen->SetCurItem( NULL ); diff --git a/eeschema/schframe.cpp b/eeschema/schframe.cpp index fe38369fd4..db9e8f50ce 100644 --- a/eeschema/schframe.cpp +++ b/eeschema/schframe.cpp @@ -96,8 +96,6 @@ BEGIN_EVENT_TABLE( SCH_EDIT_FRAME, EDA_DRAW_FRAME ) EVT_MENU( ID_COLORS_SETUP, SCH_EDIT_FRAME::OnColorConfig ) EVT_TOOL( wxID_PREFERENCES, SCH_EDIT_FRAME::OnSetOptions ) - EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END, SCH_EDIT_FRAME::SetLanguage ) - EVT_TOOL( ID_TO_LIBRARY, SCH_EDIT_FRAME::OnOpenLibraryEditor ) EVT_TOOL( ID_POPUP_SCH_CALL_LIBEDIT_AND_LOAD_CMP, SCH_EDIT_FRAME::OnOpenLibraryEditor ) EVT_TOOL( ID_TO_LIBVIEW, SCH_EDIT_FRAME::OnOpenLibraryViewer ) @@ -442,13 +440,20 @@ void SCH_EDIT_FRAME::SaveUndoItemInUndoList( SCH_ITEM* aItem ) void SCH_EDIT_FRAME::OnCloseWindow( wxCloseEvent& aEvent ) { - LIB_EDIT_FRAME * libeditFrame = LIB_EDIT_FRAME::GetActiveLibraryEditor();; - if( libeditFrame && !libeditFrame->Close() ) // Can close component editor? - return; + if( Kiface().IsSingle() ) + { + LIB_EDIT_FRAME* libeditFrame = (LIB_EDIT_FRAME*) Kiway().Player( FRAME_SCH_LIB_EDITOR, false ); + if( libeditFrame && !libeditFrame->Close() ) // Can close component editor? + return; - LIB_VIEW_FRAME* viewlibFrame = LIB_VIEW_FRAME::GetActiveLibraryViewer( this ); - if( viewlibFrame && !viewlibFrame->Close() ) // Can close component viewer? - return; + LIB_VIEW_FRAME* viewlibFrame = (LIB_VIEW_FRAME*) Kiway().Player( FRAME_SCH_VIEWER, false ); + if( viewlibFrame && !viewlibFrame->Close() ) // Can close component viewer? + return; + + viewlibFrame = (LIB_VIEW_FRAME*) Kiway().Player( FRAME_SCH_VIEWER_MODAL, false ); + if( viewlibFrame && !viewlibFrame->Close() ) // Can close modal component viewer? + return; + } SCH_SHEET_LIST SheetList; @@ -829,7 +834,7 @@ void SCH_EDIT_FRAME::OnOpenLibraryEditor( wxCommandEvent& event ) { SCH_ITEM* item = GetScreen()->GetCurItem(); - if( (item == NULL) || (item->GetFlags() != 0) || ( item->Type() != SCH_COMPONENT_T ) ) + if( !item || (item->GetFlags() != 0) || ( item->Type() != SCH_COMPONENT_T ) ) { wxMessageBox( _( "Error: not a component or no component" ) ); return; @@ -838,9 +843,21 @@ void SCH_EDIT_FRAME::OnOpenLibraryEditor( wxCommandEvent& event ) component = (SCH_COMPONENT*) item; } - // @todo: should be changed to use Kiway().Player()? + LIB_EDIT_FRAME* libeditFrame = (LIB_EDIT_FRAME*) Kiway().Player( FRAME_SCH_LIB_EDITOR, false ); + if( !libeditFrame ) + { + libeditFrame = (LIB_EDIT_FRAME*) Kiway().Player( FRAME_SCH_LIB_EDITOR, true ); + libeditFrame->Show( true ); + } + else + { + // if( libeditFrame->IsIconized() ) + // libeditFrame->Iconize( false ); + } - LIB_EDIT_FRAME* libeditFrame = LIB_EDIT_FRAME::GetActiveLibraryEditor();; + libeditFrame->Raise(); + +#if 0 if( libeditFrame ) { if( libeditFrame->IsIconized() ) @@ -855,6 +872,8 @@ void SCH_EDIT_FRAME::OnOpenLibraryEditor( wxCommandEvent& event ) wxWindow* w = kf.CreateWindow( this, FRAME_SCH_LIB_EDITOR, &Kiway(), kf.StartFlags() ); libeditFrame = dynamic_cast( w ); } +#endif + if( component ) { @@ -875,16 +894,6 @@ void SCH_EDIT_FRAME::OnExit( wxCommandEvent& event ) } -void SCH_EDIT_FRAME::SetLanguage( wxCommandEvent& event ) -{ - EDA_BASE_FRAME::SetLanguage( event ); - - LIB_EDIT_FRAME * libeditFrame = LIB_EDIT_FRAME::GetActiveLibraryEditor();; - if( libeditFrame ) - libeditFrame->EDA_BASE_FRAME::SetLanguage( event ); -} - - void SCH_EDIT_FRAME::OnPrint( wxCommandEvent& event ) { wxFileName fn; diff --git a/eeschema/sheet.cpp b/eeschema/sheet.cpp index 62d9fca131..23e9ae5100 100644 --- a/eeschema/sheet.cpp +++ b/eeschema/sheet.cpp @@ -283,7 +283,7 @@ static void ExitSheet( EDA_DRAW_PANEL* aPanel, wxDC* aDC ) SCH_SCREEN* screen = (SCH_SCREEN*) aPanel->GetScreen(); SCH_ITEM* item = screen->GetCurItem(); - SCH_EDIT_FRAME* parent = ( SCH_EDIT_FRAME* ) aPanel->GetParent(); + SCH_EDIT_FRAME* parent = (SCH_EDIT_FRAME*) aPanel->GetParent(); if( (item == NULL) || (item->Type() != SCH_SHEET_T) || (parent == NULL) ) return; diff --git a/eeschema/tool_viewlib.cpp b/eeschema/tool_viewlib.cpp index 5dce538405..f929ad5c28 100644 --- a/eeschema/tool_viewlib.cpp +++ b/eeschema/tool_viewlib.cpp @@ -116,9 +116,9 @@ void LIB_VIEW_FRAME::ReCreateHToolbar() _( "View component documents" ) ); m_mainToolBar->EnableTool( ID_LIBVIEW_VIEWDOC, false ); - if( m_semaphore ) + // if library browser is modal + if( m_Ident == FRAME_SCH_VIEWER_MODAL ) { - // The library browser is called from a "load component" command m_mainToolBar->AddSeparator(); m_mainToolBar->AddTool( ID_LIBVIEW_CMP_EXPORT_TO_SCHEMATIC, wxEmptyString, KiBitmap( export_xpm ), diff --git a/eeschema/viewlib_frame.cpp b/eeschema/viewlib_frame.cpp index 33b05c1bc6..e4af57c174 100644 --- a/eeschema/viewlib_frame.cpp +++ b/eeschema/viewlib_frame.cpp @@ -47,28 +47,25 @@ */ wxString LIB_VIEW_FRAME::m_libraryName; wxString LIB_VIEW_FRAME::m_entryName; + int LIB_VIEW_FRAME::m_unit = 1; int LIB_VIEW_FRAME::m_convert = 1; -/// When the viewer is used to select a component in schematic, the selected component is here. -wxString LIB_VIEW_FRAME::m_exportToEeschemaCmpName; - - BEGIN_EVENT_TABLE( LIB_VIEW_FRAME, EDA_DRAW_FRAME ) - /* Window events */ + // Window events EVT_CLOSE( LIB_VIEW_FRAME::OnCloseWindow ) EVT_SIZE( LIB_VIEW_FRAME::OnSize ) EVT_ACTIVATE( LIB_VIEW_FRAME::OnActivate ) - /* Toolbar events */ + // Toolbar events EVT_TOOL_RANGE( ID_LIBVIEW_NEXT, ID_LIBVIEW_DE_MORGAN_CONVERT_BUTT, LIB_VIEW_FRAME::Process_Special_Functions ) EVT_TOOL( ID_LIBVIEW_CMP_EXPORT_TO_SCHEMATIC, LIB_VIEW_FRAME::ExportToSchematicLibraryPart ) EVT_COMBOBOX( ID_LIBVIEW_SELECT_PART_NUMBER, LIB_VIEW_FRAME::Process_Special_Functions ) - /* listbox events */ + // listbox events EVT_LISTBOX( ID_LIBVIEW_LIB_LIST, LIB_VIEW_FRAME::ClickOnLibList ) EVT_LISTBOX( ID_LIBVIEW_CMP_LIST, LIB_VIEW_FRAME::ClickOnCmpList ) EVT_LISTBOX_DCLICK( ID_LIBVIEW_CMP_LIST, LIB_VIEW_FRAME::DClickOnCmpList ) @@ -95,11 +92,17 @@ static wxAcceleratorEntry accels[] = #define ACCEL_TABLE_CNT ( sizeof( accels ) / sizeof( wxAcceleratorEntry ) ) #define LIB_VIEW_FRAME_NAME wxT( "ViewlibFrame" ) -LIB_VIEW_FRAME::LIB_VIEW_FRAME( KIWAY* aKiway, SCH_BASE_FRAME* aParent, - CMP_LIBRARY* aLibrary, wxSemaphore* aSemaphore, long aStyle ) : - SCH_BASE_FRAME( aKiway, aParent, FRAME_SCH_VIEWER, _( "Library Browser" ), - wxDefaultPosition, wxDefaultSize, aStyle, GetLibViewerFrameName() ) +LIB_VIEW_FRAME::LIB_VIEW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrameType, + CMP_LIBRARY* aLibrary ) : + SCH_BASE_FRAME( aKiway, aParent, aFrameType, _( "Library Browser" ), + wxDefaultPosition, wxDefaultSize, + aFrameType==FRAME_SCH_VIEWER ? + KICAD_DEFAULT_DRAWFRAME_STYLE : + KICAD_DEFAULT_DRAWFRAME_STYLE | wxFRAME_FLOAT_ON_PARENT, + GetLibViewerFrameName() ) { + wxASSERT( aFrameType==FRAME_SCH_VIEWER || aFrameType==FRAME_SCH_VIEWER_MODAL ); + wxAcceleratorTable table( ACCEL_TABLE_CNT, accels ); m_FrameName = GetLibViewerFrameName(); @@ -114,12 +117,6 @@ LIB_VIEW_FRAME::LIB_VIEW_FRAME( KIWAY* aKiway, SCH_BASE_FRAME* aParent, m_HotkeysZoomAndGridList = s_Viewlib_Hokeys_Descr; m_cmpList = NULL; m_libList = NULL; - m_semaphore = aSemaphore; - - if( m_semaphore ) - SetModalMode( true ); - - m_exportToEeschemaCmpName.Empty(); SetScreen( new SCH_SCREEN() ); GetScreen()->m_Center = true; // Axis origin centered on screen. @@ -139,10 +136,10 @@ LIB_VIEW_FRAME::LIB_VIEW_FRAME( KIWAY* aKiway, SCH_BASE_FRAME* aParent, wxPoint win_pos( 0, 0 ); - if( aLibrary == NULL ) + if( !aLibrary ) { // Creates the libraries window display - m_libList = new wxListBox( this, ID_LIBVIEW_LIB_LIST, + m_libList = new wxListBox( this, ID_LIBVIEW_LIB_LIST, wxPoint( 0, 0 ), wxSize(m_libListWidth, -1), 0, NULL, wxLB_HSCROLL ); } @@ -243,25 +240,19 @@ const wxChar* LIB_VIEW_FRAME::GetLibViewerFrameName() } -LIB_VIEW_FRAME* LIB_VIEW_FRAME::GetActiveLibraryViewer( const wxWindow* aParent ) -{ - return (LIB_VIEW_FRAME*) wxWindow::FindWindowByName( GetLibViewerFrameName(), aParent ); -} - - void LIB_VIEW_FRAME::OnCloseWindow( wxCloseEvent& Event ) { - if( m_semaphore ) - { - m_semaphore->Post(); - // This window will be destroyed by the calling function, - // if needed - SetModalMode( false ); - } - else + if( !IsModal() ) { Destroy(); } + else if( !IsDismissed() ) + { + // only dismiss modal frame if not already dismissed. + DismissModal( false ); + + // Modal frame will be destroyed by the calling function. + } } @@ -283,12 +274,13 @@ void LIB_VIEW_FRAME::OnSetRelativeOffset( wxCommandEvent& event ) double LIB_VIEW_FRAME::BestZoom() { -/* Please, note: wxMSW before version 2.9 seems have - * problems with zoom values < 1 ( i.e. userscale > 1) and needs to be patched: - * edit file /src/msw/dc.cpp - * search for line static const int VIEWPORT_EXTENT = 1000; - * and replace by static const int VIEWPORT_EXTENT = 10000; - */ + /* Please, note: wxMSW before version 2.9 seems have + * problems with zoom values < 1 ( i.e. userscale > 1) and needs to be patched: + * edit file /src/msw/dc.cpp + * search for line static const int VIEWPORT_EXTENT = 1000; + * and replace by static const int VIEWPORT_EXTENT = 10000; + */ + LIB_COMPONENT* component = NULL; double bestzoom = 16.0; // default value for bestzoom CMP_LIBRARY* lib = CMP_LIBRARY::FindLibrary( m_libraryName ); @@ -344,8 +336,8 @@ void LIB_VIEW_FRAME::ReCreateListLib() } else { - /* If not found, clear current library selection because it can be - * deleted after a config change. */ + // If not found, clear current library selection because it can be + // deleted after a config change. m_libraryName = wxEmptyString; m_entryName = wxEmptyString; m_unit = 1; @@ -417,6 +409,7 @@ void LIB_VIEW_FRAME::SetSelectedLibrary( const wxString& aLibraryName ) m_canvas->Refresh(); DisplayLibInfos(); ReCreateHToolbar(); + // Ensure the corresponding line in m_libList is selected // (which is not necessary the case if SetSelectedLibrary is called // by an other caller than ClickOnLibList. @@ -440,9 +433,10 @@ void LIB_VIEW_FRAME::SetSelectedComponent( const wxString& aComponentName ) if( m_entryName.CmpNoCase( aComponentName ) != 0 ) { m_entryName = aComponentName; + // Ensure the corresponding line in m_cmpList is selected - // (which is not necessary the case if SetSelectedComponent is called - // by an other caller than ClickOnCmpList. + // (which is not necessarily the case if SetSelectedComponent is called + // by another caller than ClickOnCmpList. m_cmpList->SetStringSelection( aComponentName, true ); DisplayLibInfos(); m_unit = 1; @@ -456,14 +450,21 @@ void LIB_VIEW_FRAME::SetSelectedComponent( const wxString& aComponentName ) void LIB_VIEW_FRAME::DClickOnCmpList( wxCommandEvent& event ) { - if( m_semaphore ) + if( IsModal() ) { ExportToSchematicLibraryPart( event ); - // Prevent the double click from being as a single click in the parent - // window which would cause the part to be parked rather than staying - // in drag mode. - ((SCH_BASE_FRAME*) GetParent())->SkipNextLeftButtonReleaseEvent(); + // The schematic editor might not be the parent of the library viewer. + // It could be a python window. + SCH_EDIT_FRAME* schframe = dynamic_cast( GetParent() ); + + if( schframe ) + { + // Prevent the double click from being as a single click in the parent + // window which would cause the part to be parked rather than staying + // in drag mode. + schframe->SkipNextLeftButtonReleaseEvent(); + } } } @@ -473,9 +474,17 @@ void LIB_VIEW_FRAME::ExportToSchematicLibraryPart( wxCommandEvent& event ) int ii = m_cmpList->GetSelection(); if( ii >= 0 ) - m_exportToEeschemaCmpName = m_cmpList->GetString( ii ); + { + wxString part_name = m_cmpList->GetString( ii ); + + // a selection was made, pass true + DismissModal( true, part_name ); + } else - m_exportToEeschemaCmpName.Empty(); + { + // no selection was made, pass false + DismissModal( false ); + } Close( true ); } @@ -524,10 +533,6 @@ void LIB_VIEW_FRAME::OnActivate( wxActivateEvent& event ) { EDA_DRAW_FRAME::OnActivate( event ); - // Ensure we do not have old selection: - if( m_FrameIsActive ) - m_exportToEeschemaCmpName.Empty(); - if( m_libList ) ReCreateListLib(); diff --git a/eeschema/viewlib_frame.h b/eeschema/viewlib_frame.h index bdb304a312..4e67d0eafc 100644 --- a/eeschema/viewlib_frame.h +++ b/eeschema/viewlib_frame.h @@ -38,7 +38,6 @@ class wxSashLayoutWindow; class wxListBox; -class wxSemaphore; class CMP_LIBRARY; @@ -48,9 +47,14 @@ class CMP_LIBRARY; class LIB_VIEW_FRAME : public SCH_BASE_FRAME { public: - LIB_VIEW_FRAME( KIWAY* aKiway, SCH_BASE_FRAME* aParent, - CMP_LIBRARY* aLibrary = NULL, wxSemaphore* aSemaphore = NULL, - long aStyle = KICAD_DEFAULT_DRAWFRAME_STYLE ); + + /** + * Constructor + * @param aFrameType must be given either FRAME_SCH_LIB_VIEWER or + * FRAME_SCH_LIB_VIEWER_MODAL + */ + LIB_VIEW_FRAME( KIWAY* aKiway, wxWindow* aParent, + FRAME_T aFrameType, CMP_LIBRARY* aLibrary = NULL ); ~LIB_VIEW_FRAME(); @@ -61,13 +65,6 @@ public: */ static const wxChar* GetLibViewerFrameName(); - /** - * Function GetActiveLibraryViewer (static) - * @return a reference to the current opened Library viewer - * or NULL if no Library viewer currently opened - */ - static LIB_VIEW_FRAME* GetActiveLibraryViewer( const wxWindow* aParent ); - void OnSize( wxSizeEvent& event ); /** @@ -109,7 +106,6 @@ public: * @param the alias name of the component to be selected. */ void SetSelectedComponent( const wxString& aComponentName ); - const wxString& GetSelectedComponent( void ) const { return m_exportToEeschemaCmpName; } void SetUnit( int aUnit ) { m_unit = aUnit; } int GetUnit( void ) { return m_unit; } @@ -147,8 +143,6 @@ private: wxListBox* m_cmpList; // The list of components int m_cmpListWidth; // Last width of the window - // Flags - wxSemaphore* m_semaphore; // != NULL if the frame must emulate a modal dialog wxString m_configPath; // subpath for configuration // TODO(hzeller): looks like these members were chosen to be static to survive different @@ -156,11 +150,8 @@ private: // ugly hack, and should be solved differently. static wxString m_libraryName; - // TODO(hzeller): figure out what the difference between these is and the motivation to - // have this distinction. Shouldn't these essentially be the same ? static wxString m_entryName; - static wxString m_exportToEeschemaCmpName; // When the viewer is used to select a component - // in schematic, the selected component is here + static int m_unit; static int m_convert; diff --git a/gerbview/events_called_functions.cpp b/gerbview/events_called_functions.cpp index a1021c1fab..6f258ab2b8 100644 --- a/gerbview/events_called_functions.cpp +++ b/gerbview/events_called_functions.cpp @@ -52,8 +52,6 @@ BEGIN_EVENT_TABLE( GERBVIEW_FRAME, EDA_DRAW_FRAME ) GERBVIEW_FRAME::OnSelectOptionToolbar ) EVT_MENU( wxID_PREFERENCES, GERBVIEW_FRAME::InstallGerberOptionsDialog ) - EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END, EDA_DRAW_FRAME::SetLanguage ) - // menu Postprocess EVT_MENU( ID_GERBVIEW_SHOW_LIST_DCODES, GERBVIEW_FRAME::Process_Special_Functions ) EVT_MENU( ID_GERBVIEW_SHOW_SOURCE, GERBVIEW_FRAME::OnShowGerberSourceFile ) @@ -209,9 +207,6 @@ void GERBVIEW_FRAME::Process_Special_Functions( wxCommandEvent& event ) } -/* Selects the active DCode for the current active layer. - * Items using this DCode are hightlighted - */ void GERBVIEW_FRAME::OnSelectActiveDCode( wxCommandEvent& event ) { GERBER_IMAGE* gerber_image = g_GERBER_List[getActiveLayer()]; @@ -228,10 +223,7 @@ void GERBVIEW_FRAME::OnSelectActiveDCode( wxCommandEvent& event ) } } -/* Selects the active layer: - * - if a file is loaded, it is loaded in this layer - * _ this layer is displayed on top of other layers - */ + void GERBVIEW_FRAME::OnSelectActiveLayer( wxCommandEvent& event ) { LAYER_NUM layer = getActiveLayer(); @@ -246,9 +238,6 @@ void GERBVIEW_FRAME::OnSelectActiveLayer( wxCommandEvent& event ) } -/* Call preferred editor to show (and edit) the gerber source file - * loaded in the active layer - */ void GERBVIEW_FRAME::OnShowGerberSourceFile( wxCommandEvent& event ) { LAYER_NUM layer = getActiveLayer(); @@ -275,9 +264,6 @@ void GERBVIEW_FRAME::OnShowGerberSourceFile( wxCommandEvent& event ) } -/* Function OnSelectDisplayMode: called to select display mode - * (fast display, or exact mode with stacked images or with transparency - */ void GERBVIEW_FRAME::OnSelectDisplayMode( wxCommandEvent& event ) { int oldMode = GetDisplayMode(); @@ -301,20 +287,20 @@ void GERBVIEW_FRAME::OnSelectDisplayMode( wxCommandEvent& event ) m_canvas->Refresh(); } + void GERBVIEW_FRAME::OnQuit( wxCommandEvent& event ) { Close( true ); } -/** - * Function SetLanguage - * called on a language menu selection - * Update Layer manager title and tabs texts - */ -void GERBVIEW_FRAME::SetLanguage( wxCommandEvent& event ) + +void GERBVIEW_FRAME::ShowChangedLanguage() { - EDA_DRAW_FRAME::SetLanguage( event ); + // call my base class + EDA_DRAW_FRAME::ShowChangedLanguage(); + m_LayersManager->SetLayersManagerTabsText(); + wxAuiPaneInfo& pane_info = m_auimgr.GetPane( m_LayersManager ); pane_info.Caption( _( "Visibles" ) ); m_auimgr.Update(); @@ -322,14 +308,12 @@ void GERBVIEW_FRAME::SetLanguage( wxCommandEvent& event ) ReFillLayerWidget(); } -/** - * Function OnSelectOptionToolbar - * called to validate current choices - */ + void GERBVIEW_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) { - int id = event.GetId(); - bool state; + int id = event.GetId(); + bool state; + switch( id ) { case ID_MENU_GERBVIEW_SHOW_HIDE_LAYERS_MANAGER_DIALOG: @@ -374,6 +358,7 @@ void GERBVIEW_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) break; case ID_TB_OPTIONS_SHOW_LAYERS_MANAGER_VERTICAL_TOOLBAR: + // show/hide auxiliary Vertical layers and visibility manager toolbar m_show_layer_manager_tools = state; m_auimgr.GetPane( wxT( "m_LayersManagerToolBar" ) ).Show( m_show_layer_manager_tools ); diff --git a/gerbview/gerbview_frame.h b/gerbview/gerbview_frame.h index f703ece8ee..df14fdaa4b 100644 --- a/gerbview/gerbview_frame.h +++ b/gerbview/gerbview_frame.h @@ -462,11 +462,7 @@ public: void SaveSettings( wxConfigBase* aCfg ); // override virtual - /** - * Function SetLanguage - * called on a language menu selection - */ - virtual void SetLanguage( wxCommandEvent& event ); + void ShowChangedLanguage(); // override EDA_BASE_FRAME virtual void Process_Special_Functions( wxCommandEvent& event ); void OnSelectOptionToolbar( wxCommandEvent& event ); diff --git a/include/draw_frame.h b/include/draw_frame.h index 67aba863c1..aaf999edec 100644 --- a/include/draw_frame.h +++ b/include/draw_frame.h @@ -281,13 +281,6 @@ public: void EraseMsgBox(); void Process_PageSettings( wxCommandEvent& event ); - /** - * Function SetLanguage - * called on a language menu selection - * when using a derived function, do not forget to call this one - */ - virtual void SetLanguage( wxCommandEvent& event ); - virtual void ReCreateHToolbar() = 0; virtual void ReCreateVToolbar() = 0; virtual void ReCreateMenuBar(); diff --git a/include/fpid.h b/include/fpid.h index 853983ad51..ec1ab80931 100644 --- a/include/fpid.h +++ b/include/fpid.h @@ -80,9 +80,7 @@ public: * @return int - minus 1 (i.e. -1) means success, >= 0 indicates the character offset into * aId at which an error was detected. */ - int Parse( const std::string& aId ); - - int Parse( const wxString& aId ); + int Parse( const UTF8& aId ); /** * Function GetLibNickname @@ -100,9 +98,7 @@ public: * into the parameter at which an error was detected, usually because it * contained '/' or ':'. */ - int SetLibNickname( const std::string& aNickname ); - - int SetLibNickname( const wxString& aNickname ); + int SetLibNickname( const UTF8& aNickname ); /** * Function GetFootprintName @@ -114,11 +110,9 @@ public: * Function SetFootprintName * overrides the footprint name portion of the FPID to @a aFootprintName */ - int SetFootprintName( const std::string& aFootprintName ); + int SetFootprintName( const UTF8& aFootprintName ); - int SetFootprintName( const wxString& aFootprintName ); - - int SetRevision( const std::string& aRevision ); + int SetRevision( const UTF8& aRevision ); const UTF8& GetRevision() const { return revision; } @@ -136,10 +130,10 @@ public: * aLibNickname, aFootprintName, and aRevision. * * @throw PARSE_ERROR if any of the pieces are illegal. - */ - static UTF8 Format( const std::string& aLibNickname, const std::string& aFootprintName, - const std::string& aRevision ) + static UTF8 Format( const UTF8& aLibNickname, const UTF8& aFootprintName, + const UTF8& aRevision = "" ) throw( PARSE_ERROR ); + */ /** * Function IsValid diff --git a/include/frame_type.h b/include/frame_type.h index 23411168c6..e58f615659 100644 --- a/include/frame_type.h +++ b/include/frame_type.h @@ -11,22 +11,35 @@ enum FRAME_T FRAME_SCH, FRAME_SCH_LIB_EDITOR, FRAME_SCH_VIEWER, + FRAME_SCH_VIEWER_MODAL, + FRAME_PCB, FRAME_PCB_MODULE_EDITOR, FRAME_PCB_MODULE_VIEWER, - FRAME_PCB_FOOTPRINT_WIZARD, + FRAME_PCB_MODULE_VIEWER_MODAL, + FRAME_PCB_FOOTPRINT_WIZARD_MODAL, FRAME_PCB_DISPLAY3D, + FRAME_CVPCB, FRAME_CVPCB_DISPLAY, + FRAME_GERBER, - KIWAY_PLAYER_COUNT, // counts subset of FRAME_T's tracked in class KIWAY - - KICAD_MAIN_FRAME_T = KIWAY_PLAYER_COUNT, FRAME_PL_EDITOR, - //TEXT_EDITOR_FRAME_T, + + FRAME_BM2CMP, + + FRAME_CALC, + + KIWAY_PLAYER_COUNT, // counts subset of FRAME_T's which are KIWAY_PLAYER derivatives + + // C++ project manager is not a KIWAY_PLAYER + KICAD_MAIN_FRAME_T = KIWAY_PLAYER_COUNT, FRAME_T_COUNT }; + //TEXT_EDITOR_FRAME_T, + + #endif // FRAME_T_H_ diff --git a/include/kiface_i.h b/include/kiface_i.h index 9fe034603a..23f053580c 100644 --- a/include/kiface_i.h +++ b/include/kiface_i.h @@ -58,7 +58,7 @@ public: } VTBL_ENTRY wxWindow* CreateWindow( wxWindow* aParent, - int aClassId, KIWAY* aKIWAY, int aCtlBits ) = 0; + int aClassId, KIWAY* aKIWAY, int aCtlBits = 0 ) = 0; VTBL_ENTRY void* IfaceOrAddress( int aDataId ) = 0; diff --git a/include/kiway.h b/include/kiway.h index 9b2ffd6b2d..469a0fde27 100644 --- a/include/kiway.h +++ b/include/kiway.h @@ -150,7 +150,8 @@ struct KIFACE // this interface. #define KFCTL_STANDALONE (1<<0) ///< Am running as a standalone Top. -#define KFCTL_PROJECT_SUITE (1<<1) ///< Am running under a project mgr, possibly with others +#define KFCTL_CPP_PROJECT_SUITE (1<<1) ///< Am running under C++ project mgr, possibly with others +#define KFCTL_PY_PROJECT_SUITE (1<<2) ///< Am running under python project mgr, possibly with others /** @@ -201,7 +202,7 @@ struct KIFACE * not contained in the caller's link image. */ VTBL_ENTRY wxWindow* CreateWindow( wxWindow* aParent, int aClassId, - KIWAY* aKIWAY, int aCtlBits ) = 0; + KIWAY* aKIWAY, int aCtlBits = 0 ) = 0; /** * Function IfaceOrAddress @@ -249,6 +250,7 @@ struct KIFACE */ class KIWAY : public wxEvtHandler { + friend class PGM_SINGLE_TOP; // can use set_kiface() public: /// Known KIFACE implementations @@ -257,16 +259,12 @@ public: FACE_SCH, ///< eeschema DSO FACE_PCB, ///< pcbnew DSO FACE_CVPCB, - - /// count of those above here, which is the subset managed in a KIWAY. - KIWAY_FACE_COUNT, - - FACE_BMP2CMP = KIWAY_FACE_COUNT, FACE_GERBVIEW, FACE_PL_EDITOR, FACE_PCB_CALCULATOR, + FACE_BMP2CMP, - FACE_COUNT + KIWAY_FACE_COUNT }; /** @@ -302,7 +300,7 @@ public: * @return KIWAY_PLAYER* - a valid opened KIWAY_PLAYER or NULL if there * is something wrong or doCreate was false and the player has yet to be created. */ - VTBL_ENTRY KIWAY_PLAYER* Player( FRAME_T aFrameType, bool doCreate = true ); + VTBL_ENTRY KIWAY_PLAYER* Player( FRAME_T aFrameType, bool doCreate = true ); /** * Function PlayerClose @@ -312,7 +310,7 @@ public: * * @return bool - true the window is closed and not vetoed, else false. */ - VTBL_ENTRY bool PlayerClose( FRAME_T aFrameType, bool doForce ); + VTBL_ENTRY bool PlayerClose( FRAME_T aFrameType, bool doForce ); /** * Function PlayersClose @@ -325,7 +323,14 @@ public: */ VTBL_ENTRY bool PlayersClose( bool doForce ); - VTBL_ENTRY void ExpressMail( FRAME_T aDestination, MAIL_T aCommand, const std::string& aPayload, wxWindow* aSource=NULL ); + /** + * Function ExpressMail + * send aPayload to aDestination from aSource. Recipient receives this in its + * KIWAY_PLAYER::KiwayMailIn() function and can efficiently switch() based on + * aCommand in there. + */ + VTBL_ENTRY void ExpressMail( FRAME_T aDestination, MAIL_T aCommand, + const std::string& aPayload, wxWindow* aSource = NULL ); /** * Function Prj @@ -335,11 +340,26 @@ public: */ VTBL_ENTRY PROJECT& Prj() const; - KIWAY( PGM_BASE* aProgram, wxFrame* aTop = NULL ); + /** + * Function SetLanguage + * changes the language and then calls ShowChangedLanguage() on all KIWAY_PLAYERs. + */ + VTBL_ENTRY void SetLanguage( int aLanguage ); - /// In case aTop may not be known at time of KIWAY construction: + KIWAY( PGM_BASE* aProgram, int aCtlBits, wxFrame* aTop = NULL ); + + /** + * Function SetTop + * tells this KIWAY about the top most frame in the program and optionally + * allows it to play the role of one of the KIWAY_PLAYERs if launched from + * single_top.cpp. + * + * @param aTop is the top most wxFrame in the entire program. + */ void SetTop( wxFrame* aTop ); + void OnKiwayEnd(); + bool ProcessEvent( wxEvent& aEvent ); // overload virtual private: @@ -348,12 +368,23 @@ private: static const wxString dso_full_path( FACE_T aFaceId ); /// hooked into m_top in SetTop(), marks child frame as closed. - void playerDestroyHandler( wxWindowDestroyEvent& event ); + void player_destroy_handler( wxWindowDestroyEvent& event ); + + bool set_kiface( FACE_T aFaceType, KIFACE* aKiface ) + { + if( unsigned( aFaceType ) < unsigned( KIWAY_FACE_COUNT ) ) + { + m_kiface[aFaceType] = aKiface; + return true; + } + return false; + } static KIFACE* m_kiface[KIWAY_FACE_COUNT]; static int m_kiface_version[KIWAY_FACE_COUNT]; PGM_BASE* m_program; + int m_ctl; wxFrame* m_top; KIWAY_PLAYER* m_player[KIWAY_PLAYER_COUNT]; // from frame_type.h diff --git a/include/kiway_player.h b/include/kiway_player.h index 75b1189053..8188ad35c8 100644 --- a/include/kiway_player.h +++ b/include/kiway_player.h @@ -35,6 +35,8 @@ class PROJECT; struct KIFACE; class KIFACE_I; +#define VTBL_ENTRY virtual + /** * Class KIWAY_HOLDER @@ -80,7 +82,7 @@ public: private: // private, all setting is done through SetKiway(). - KIWAY* m_kiway; // no ownership. + KIWAY* m_kiway; // no ownership. }; @@ -110,6 +112,9 @@ public: const wxPoint& aPos, const wxSize& aSize, long aStyle, const wxString& aWdoName = wxFrameNameStr ); + ~KIWAY_PLAYER(); + + //--------------------------------------------------------- // For the aCtl argument of OpenProjectFiles() #define KICTL_OPEN_APPEND (1<<0) ///< append the data file, rather than replace @@ -149,7 +154,7 @@ public: * * @return bool - true if all requested files were opened OK, else false. */ - virtual bool OpenProjectFiles( const std::vector& aFileList, int aCtl = 0 ) + VTBL_ENTRY bool OpenProjectFiles( const std::vector& aFileList, int aCtl = 0 ) { // overload me for your wxFrame type. @@ -161,6 +166,25 @@ public: return false; } + /** + * Function ShowModal + * puts up this wxFrame as if it were a modal dialog, with all other instantiated + * wxFrames disabled until this KIWAY_PLAYER derivative calls DismissModal(). + * That is, behavior is similar to a modal dialog window. Not all KIWAY_PLAYERs + * use this interface, so don't call this unless the implementation knows how + * to call DismissModal() on a button click or double click or some special + * event which ends the modal behavior. + * + * @param aResult if not NULL, indicates a place to put a resultant string. + * + * @return bool - true if frame implementation called KIWAY_PLAYER::DismissModal() + * with aRetVal of true. + */ + VTBL_ENTRY bool ShowModal( wxString* aResult ); + + //-------------------------------------------------------- + + /** * Function KiwayMailIn * receives KIWAY_EXPRESS messages from other players. Merely override it @@ -168,12 +192,35 @@ public: */ virtual void KiwayMailIn( KIWAY_EXPRESS& aEvent ); - DECLARE_EVENT_TABLE() +protected: -//private: + bool IsModal() { return m_modal_dismissed; } - /// event handler, routes to virtual KiwayMailIn() + /** + * Function IsDismissed + * returns false only if both the frame is acting in modal mode and it has not been + * dismissed yet with DismissModal(). IOW, it will return true if the dialog is + * not modal or if it is modal and has been dismissed. + */ + bool IsDismissed(); + + void DismissModal( bool aRetVal, const wxString& aResult = wxEmptyString ); + + /// event handler, routes to derivative specific virtual KiwayMailIn() void kiway_express( KIWAY_EXPRESS& aEvent ); + + /** + * Function language_change + * is an event handler called on a language menu selection. + */ + void language_change( wxCommandEvent& event ); + + // variables for modal behavior support, only used by a few derivatives. + volatile bool* m_modal_dismissed; // points to "dismissed state", NULL means not modal + wxString m_modal_string; + bool m_modal_ret_val; // true if a selection was made + + DECLARE_EVENT_TABLE() }; diff --git a/include/wxEeschemaStruct.h b/include/wxEeschemaStruct.h index fea2499c69..171351d321 100644 --- a/include/wxEeschemaStruct.h +++ b/include/wxEeschemaStruct.h @@ -813,12 +813,6 @@ private: void OnUpdateBusOrientation( wxUpdateUIEvent& event ); void OnUpdateSelectTool( wxUpdateUIEvent& aEvent ); - /** - * Function SetLanguage - * called on a language menu selection - */ - void SetLanguage( wxCommandEvent& event ); - /** * Function UpdateTitle * sets the main window title bar text. diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index 9ad56f1016..21218d78a9 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -1666,11 +1666,7 @@ public: */ MODULE* Genere_Self( wxDC* DC ); - /** - * Function SetLanguage - * called on a language menu selection - */ - virtual void SetLanguage( wxCommandEvent& event ); + void ShowChangedLanguage(); // override EDA_BASE_FRAME virtual /** * Function UpdateTitle diff --git a/include/wxstruct.h b/include/wxstruct.h index 73363cceed..22153455a2 100644 --- a/include/wxstruct.h +++ b/include/wxstruct.h @@ -113,7 +113,7 @@ class EDA_BASE_FRAME : public wxFrame void windowClosing( wxCloseEvent& event ); protected: - FRAME_T m_Ident; ///< Id Type (pcb, schematic, library..) + FRAME_T m_Ident; ///< Id Type (pcb, schematic, library..) wxPoint m_FramePos; wxSize m_FrameSize; @@ -302,13 +302,6 @@ public: */ void ExportHotkeyConfigToFile( struct EDA_HOTKEY_CONFIG* aDescList ); - /** - * Function SetLanguage - * called on a language menu selection - * when using a derived function, do not forget to call this one - */ - virtual void SetLanguage( wxCommandEvent& event ); - /** * Function GetFileFromHistory * fetches the file name from the file history list. @@ -380,17 +373,10 @@ public: void CheckForAutoSaveFile( const wxFileName& aFileName, const wxString& aBackupFileExtension ); /** - * Function SetModalMode - * Disable or enable all other windows, to emulate a dialog behavior - * Useful when the frame is used to show and selec items - * (see FOOTPRINT_VIEWER_FRAME and LIB_VIEW_FRAME) - * - * @param aModal = true to disable all other opened windows (i.e. - * this windows is in dialog mode - * = false to enable other windows - * This function is analog to MakeModal( aModal ), deprecated since wxWidgets 2.9.4 + * Function ShowChangedLanguage + * redraws the menus and what not in current language. */ - void SetModalMode( bool aModal ); + virtual void ShowChangedLanguage(); }; @@ -415,7 +401,6 @@ public: * then after a //==// break has additional calls to anchor toolbars in a way that matches * present functionality. */ - class EDA_PANEINFO : public wxAuiPaneInfo { diff --git a/kicad/kicad.cpp b/kicad/kicad.cpp index 44e9488e56..5b696f5715 100644 --- a/kicad/kicad.cpp +++ b/kicad/kicad.cpp @@ -197,6 +197,8 @@ bool PGM_KICAD::OnPgmInit( wxApp* aWxApp ) void PGM_KICAD::OnPgmExit() { + Kiway.OnKiwayEnd(); + saveCommonSettings(); // write common settings to disk, and destroy everything in PGM_KICAD, @@ -253,7 +255,7 @@ void PGM_KICAD::destroy() } -KIWAY Kiway( &Pgm() ); +KIWAY Kiway( &Pgm(), KFCTL_CPP_PROJECT_SUITE ); /** diff --git a/kicad/kicad.h b/kicad/kicad.h index ffaac5afdc..ab76ac5cbc 100644 --- a/kicad/kicad.h +++ b/kicad/kicad.h @@ -140,6 +140,8 @@ public: private: int m_leftWinWidth; + void language_change( wxCommandEvent& event ); + public: KICAD_MANAGER_FRAME( wxWindow* parent, const wxString& title, const wxPoint& pos, const wxSize& size ); @@ -202,7 +204,6 @@ public: */ void ClearMsg(); - void SetLanguage( wxCommandEvent& event ); void OnRefresh( wxCommandEvent& event ); void OnSelectDefaultPdfBrowser( wxCommandEvent& event ); void OnSelectPreferredPdfBrowser( wxCommandEvent& event ); diff --git a/kicad/mainframe.cpp b/kicad/mainframe.cpp index 32d19c8d37..0d965c0af8 100644 --- a/kicad/mainframe.cpp +++ b/kicad/mainframe.cpp @@ -361,6 +361,14 @@ void KICAD_MANAGER_FRAME::OnRefresh( wxCommandEvent& event ) } +void KICAD_MANAGER_FRAME::language_change( wxCommandEvent& event ) +{ + int id = event.GetId(); + + Kiway.SetLanguage( id ); +} + + void KICAD_MANAGER_FRAME::ClearMsg() { m_MessagesBox->Clear(); diff --git a/kicad/menubar.cpp b/kicad/menubar.cpp index 0e1fce998d..e792987a3c 100644 --- a/kicad/menubar.cpp +++ b/kicad/menubar.cpp @@ -33,20 +33,20 @@ #include #include -/* Menubar and toolbar event table */ +// Menubar and toolbar event table BEGIN_EVENT_TABLE( KICAD_MANAGER_FRAME, EDA_BASE_FRAME ) - /* Window events */ + // Window events EVT_SIZE( KICAD_MANAGER_FRAME::OnSize ) EVT_CLOSE( KICAD_MANAGER_FRAME::OnCloseWindow ) - /* Toolbar events */ + // Toolbar events EVT_TOOL( ID_NEW_PROJECT, KICAD_MANAGER_FRAME::OnLoadProject ) EVT_TOOL( ID_NEW_PROJECT_FROM_TEMPLATE, KICAD_MANAGER_FRAME::OnLoadProject ) EVT_TOOL( ID_LOAD_PROJECT, KICAD_MANAGER_FRAME::OnLoadProject ) EVT_TOOL( ID_SAVE_PROJECT, KICAD_MANAGER_FRAME::OnSaveProject ) EVT_TOOL( ID_SAVE_AND_ZIP_FILES, KICAD_MANAGER_FRAME::OnArchiveFiles ) - /* Menu events */ + // Menu events EVT_MENU( ID_SAVE_PROJECT, KICAD_MANAGER_FRAME::OnSaveProject ) EVT_MENU( wxID_EXIT, KICAD_MANAGER_FRAME::OnExit ) EVT_MENU( ID_TO_EDITOR, KICAD_MANAGER_FRAME::OnOpenTextEditor ) @@ -63,16 +63,17 @@ BEGIN_EVENT_TABLE( KICAD_MANAGER_FRAME, EDA_BASE_FRAME ) EVT_MENU( wxID_INDEX, KICAD_MANAGER_FRAME::GetKicadHelp ) EVT_MENU( wxID_ABOUT, KICAD_MANAGER_FRAME::GetKicadAbout ) - /* Range menu events */ - EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END, KICAD_MANAGER_FRAME::SetLanguage ) + // Range menu events + EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END, KICAD_MANAGER_FRAME::language_change ) + EVT_MENU_RANGE( wxID_FILE1, wxID_FILE9, KICAD_MANAGER_FRAME::OnFileHistory ) // Special functions - #ifdef KICAD_USE_FILES_WATCHER +#ifdef KICAD_USE_FILES_WATCHER EVT_MENU( ID_INIT_WATCHED_PATHS, KICAD_MANAGER_FRAME::OnChangeWatchedPaths ) - #endif +#endif - /* Button events */ + // Button events EVT_BUTTON( ID_TO_PCB, KICAD_MANAGER_FRAME::OnRunPcbNew ) EVT_BUTTON( ID_TO_CVPCB, KICAD_MANAGER_FRAME::OnRunCvpcb ) EVT_BUTTON( ID_TO_EESCHEMA, KICAD_MANAGER_FRAME::OnRunEeschema ) diff --git a/kicad/preferences.cpp b/kicad/preferences.cpp index 19bed9f1d1..2176d628bc 100644 --- a/kicad/preferences.cpp +++ b/kicad/preferences.cpp @@ -88,8 +88,3 @@ void KICAD_MANAGER_FRAME::OnSelectPreferredPdfBrowser( wxCommandEvent& event ) Pgm().WritePdfBrowserInfos(); } - -void KICAD_MANAGER_FRAME::SetLanguage( wxCommandEvent& event ) -{ - EDA_BASE_FRAME::SetLanguage( event ); -} diff --git a/pagelayout_editor/events_functions.cpp b/pagelayout_editor/events_functions.cpp index 0473900644..c2fd6982dc 100644 --- a/pagelayout_editor/events_functions.cpp +++ b/pagelayout_editor/events_functions.cpp @@ -70,12 +70,8 @@ BEGIN_EVENT_TABLE( PL_EDITOR_FRAME, EDA_DRAW_FRAME ) EVT_MENU( wxID_EXIT, PL_EDITOR_FRAME::OnQuit ) // menu Preferences - EVT_MENU_RANGE( ID_PREFERENCES_HOTKEY_START, ID_PREFERENCES_HOTKEY_END, - PL_EDITOR_FRAME::Process_Config ) - EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END, - EDA_DRAW_FRAME::SetLanguage ) - EVT_MENU( ID_MENU_PL_EDITOR_SELECT_PREFERED_EDITOR, - EDA_BASE_FRAME::OnSelectPreferredEditor ) + EVT_MENU_RANGE( ID_PREFERENCES_HOTKEY_START, ID_PREFERENCES_HOTKEY_END, PL_EDITOR_FRAME::Process_Config ) + EVT_MENU( ID_MENU_PL_EDITOR_SELECT_PREFERED_EDITOR, EDA_BASE_FRAME::OnSelectPreferredEditor ) EVT_MENU( wxID_PREFERENCES, PL_EDITOR_FRAME::Process_Config ) EVT_MENU( ID_MENU_SWITCH_BGCOLOR, PL_EDITOR_FRAME::Process_Config ) EVT_MENU( ID_MENU_GRID_ONOFF, PL_EDITOR_FRAME::Process_Config ) @@ -473,15 +469,6 @@ void PL_EDITOR_FRAME::OnQuit( wxCommandEvent& event ) Close( true ); } -/** - * Function SetLanguage - * called on a language menu selection - * Update Layer manager title and tabs texts - */ -void PL_EDITOR_FRAME::SetLanguage( wxCommandEvent& event ) -{ - EDA_DRAW_FRAME::SetLanguage( event ); -} void PL_EDITOR_FRAME::ToPlotter(wxCommandEvent& event) { diff --git a/pagelayout_editor/pl_editor_frame.h b/pagelayout_editor/pl_editor_frame.h index 7ba3a8dc15..e675cb9c9b 100644 --- a/pagelayout_editor/pl_editor_frame.h +++ b/pagelayout_editor/pl_editor_frame.h @@ -198,12 +198,6 @@ public: void SaveSettings( wxConfigBase* aCfg ); // override virtual - /** - * Function SetLanguage - * called on a language menu selection - */ - virtual void SetLanguage( wxCommandEvent& event ); - void Process_Special_Functions( wxCommandEvent& event ); void OnSelectOptionToolbar( wxCommandEvent& event ); diff --git a/pcb_calculator/CMakeLists.txt b/pcb_calculator/CMakeLists.txt index fb8e189859..14db6b9ff6 100644 --- a/pcb_calculator/CMakeLists.txt +++ b/pcb_calculator/CMakeLists.txt @@ -75,7 +75,7 @@ if( USE_KIWAY_DLLS ) ${PCB_CALCULATOR_RESOURCES} ) set_source_files_properties( ../common/single_top.cpp PROPERTIES - COMPILE_DEFINITIONS "TOP_FRAME=0;BUILD_KIWAY_DLL" + COMPILE_DEFINITIONS "TOP_FRAME=FRAME_CALC;BUILD_KIWAY_DLL" ) target_link_libraries( pcb_calculator #singletop # replaces common, giving us restrictive control and link warnings. @@ -93,7 +93,6 @@ if( USE_KIWAY_DLLS ) add_library( pcb_calculator_kiface MODULE pcb_calculator.cpp ${PCB_CALCULATOR_SRCS} -# ${PCB_CALCULATOR_RESOURCES} ) set_target_properties( pcb_calculator_kiface PROPERTIES OUTPUT_NAME pcb_calculator diff --git a/pcb_calculator/pcb_calculator_frame.cpp b/pcb_calculator/pcb_calculator_frame.cpp index 7981201e25..3abd3601f2 100644 --- a/pcb_calculator/pcb_calculator_frame.cpp +++ b/pcb_calculator/pcb_calculator_frame.cpp @@ -134,6 +134,7 @@ PCB_CALCULATOR_FRAME::~PCB_CALCULATOR_FRAME() this->Freeze(); } + void PCB_CALCULATOR_FRAME::OnClosePcbCalc( wxCloseEvent& event ) { if( m_RegulatorListChanged ) diff --git a/pcbnew/block_module_editor.cpp b/pcbnew/block_module_editor.cpp index 9fc22bd1e1..abba8d6d01 100644 --- a/pcbnew/block_module_editor.cpp +++ b/pcbnew/block_module_editor.cpp @@ -306,7 +306,7 @@ static void DrawMovingBlockOutlines( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wx bool aErase ) { BASE_SCREEN* screen = aPanel->GetScreen(); - FOOTPRINT_EDIT_FRAME* moduleEditFrame = FOOTPRINT_EDIT_FRAME::GetActiveFootprintEditor( aPanel->GetParent() ); + FOOTPRINT_EDIT_FRAME* moduleEditFrame = dynamic_cast( aPanel->GetParent() ); wxASSERT( moduleEditFrame ); MODULE* currentModule = moduleEditFrame->GetBoard()->m_Modules; diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index 98a3ec4fee..e76623b0e4 100644 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -190,21 +190,21 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) case ID_OPEN_MODULE_EDITOR: { - FOOTPRINT_EDIT_FRAME* editor = FOOTPRINT_EDIT_FRAME::GetActiveFootprintEditor( this ); + FOOTPRINT_EDIT_FRAME* editor = (FOOTPRINT_EDIT_FRAME*) Kiway().Player( FRAME_PCB_MODULE_EDITOR, false ); if( !editor ) { - KIFACE_I& kf = Kiface(); - - editor = (FOOTPRINT_EDIT_FRAME*) kf.CreateWindow( this, FRAME_PCB_MODULE_EDITOR, &Kiway(), kf.StartFlags() ); + editor = (FOOTPRINT_EDIT_FRAME*) Kiway().Player( FRAME_PCB_MODULE_EDITOR, true ); editor->Show( true ); editor->Zoom_Automatique( false ); } else { + /* not needed on linux, other platforms need this? if( editor->IsIconized() ) editor->Iconize( false ); + */ editor->Raise(); @@ -218,21 +218,21 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) case ID_OPEN_MODULE_VIEWER: { - FOOTPRINT_VIEWER_FRAME* viewer = FOOTPRINT_VIEWER_FRAME::GetActiveFootprintViewer( this ); + FOOTPRINT_VIEWER_FRAME* viewer = (FOOTPRINT_VIEWER_FRAME*) Kiway().Player( FRAME_PCB_MODULE_VIEWER, false ); if( !viewer ) { - KIFACE_I& kf = Kiface(); - - viewer = (FOOTPRINT_VIEWER_FRAME*) kf.CreateWindow( this, FRAME_PCB_MODULE_VIEWER, &Kiway(), kf.StartFlags() ); + viewer = (FOOTPRINT_VIEWER_FRAME*) Kiway().Player( FRAME_PCB_MODULE_VIEWER, true ); viewer->Show( true ); viewer->Zoom_Automatique( false ); } else { + /* not needed on linux, other platforms need this? if( viewer->IsIconized() ) viewer->Iconize( false ); + */ viewer->Raise(); @@ -848,20 +848,14 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) } { - FOOTPRINT_EDIT_FRAME* editor = FOOTPRINT_EDIT_FRAME::GetActiveFootprintEditor( this ); - - if( !editor ) - { - KIFACE_I& kf = Kiface(); - - editor = (FOOTPRINT_EDIT_FRAME*) kf.CreateWindow( this, FRAME_PCB_MODULE_EDITOR, &Kiway(), kf.StartFlags() ); - } + FOOTPRINT_EDIT_FRAME* editor = (FOOTPRINT_EDIT_FRAME*) Kiway().Player( FRAME_PCB_MODULE_EDITOR, true ); editor->Load_Module_From_BOARD( (MODULE*)GetCurItem() ); SetCurItem( NULL ); // the current module could be deleted by editor->Show( true ); - editor->Iconize( false ); + + editor->Raise(); // Iconize( false ); } m_canvas->MoveCursorToCrossHair(); break; diff --git a/pcbnew/editmod.cpp b/pcbnew/editmod.cpp index 49325bc1eb..4a69ef6a02 100644 --- a/pcbnew/editmod.cpp +++ b/pcbnew/editmod.cpp @@ -28,6 +28,7 @@ #include #include +#include #include #include #include @@ -74,20 +75,13 @@ void PCB_EDIT_FRAME::InstallModuleOptionsFrame( MODULE* Module, wxDC* DC ) if( retvalue == 2 ) { - FOOTPRINT_EDIT_FRAME* editor = FOOTPRINT_EDIT_FRAME::GetActiveFootprintEditor( this ); - - if( !editor ) - { - KIFACE_I& kf = Kiface(); - - editor = (FOOTPRINT_EDIT_FRAME*) kf.CreateWindow( this, FRAME_PCB_MODULE_EDITOR, &Kiway(), kf.StartFlags() ); - } + FOOTPRINT_EDIT_FRAME* editor = (FOOTPRINT_EDIT_FRAME*) Kiway().Player( FRAME_PCB_MODULE_EDITOR, true ); editor->Load_Module_From_BOARD( Module ); SetCurItem( NULL ); editor->Show( true ); - editor->Iconize( false ); + editor->Raise(); // Iconize( false ); } } diff --git a/pcbnew/footprint_wizard.cpp b/pcbnew/footprint_wizard.cpp index e82db334fc..ab4023846a 100644 --- a/pcbnew/footprint_wizard.cpp +++ b/pcbnew/footprint_wizard.cpp @@ -145,7 +145,7 @@ MODULE* FOOTPRINT_WIZARD_FRAME::GetBuiltFootprint() { FOOTPRINT_WIZARD* footprintWizard = FOOTPRINT_WIZARDS::GetWizard( m_wizardName ); - if( footprintWizard && m_exportRequest ) + if( footprintWizard && m_modal_ret_val ) { return footprintWizard->GetModule(); } diff --git a/pcbnew/footprint_wizard_frame.cpp b/pcbnew/footprint_wizard_frame.cpp index b09623f074..7fac217892 100644 --- a/pcbnew/footprint_wizard_frame.cpp +++ b/pcbnew/footprint_wizard_frame.cpp @@ -113,18 +113,18 @@ static wxAcceleratorEntry accels[] = #define EXTRA_BORDER_SIZE 2 -/* Function FOOTPRINT_WIZARD_FRAME - * it's the constructor for the footprint wizard frame, it creates everything inside - */ #define FOOTPRINT_WIZARD_FRAME_NAME wxT( "FootprintWizard" ) -FOOTPRINT_WIZARD_FRAME::FOOTPRINT_WIZARD_FRAME( KIWAY* aKiway, FOOTPRINT_EDIT_FRAME* aParent, - wxSemaphore* semaphore, long style ) : - PCB_BASE_FRAME( aKiway, aParent, FRAME_PCB_FOOTPRINT_WIZARD, - _( "Footprint Wizard" ), - wxDefaultPosition, wxDefaultSize, style, FOOTPRINT_WIZARD_FRAME_NAME ) +FOOTPRINT_WIZARD_FRAME::FOOTPRINT_WIZARD_FRAME( KIWAY* aKiway, + wxWindow* aParent, FRAME_T aFrameType ) : + PCB_BASE_FRAME( aKiway, aParent, aFrameType, _( "Footprint Wizard" ), + wxDefaultPosition, wxDefaultSize, + KICAD_DEFAULT_DRAWFRAME_STYLE | wxFRAME_FLOAT_ON_PARENT, + FOOTPRINT_WIZARD_FRAME_NAME ) { + wxASSERT( aFrameType==FRAME_PCB_FOOTPRINT_WIZARD_MODAL ); + wxAcceleratorTable table( ACCEL_TABLE_CNT, accels ); m_FrameName = FOOTPRINT_WIZARD_FRAME_NAME; @@ -137,14 +137,10 @@ FOOTPRINT_WIZARD_FRAME::FOOTPRINT_WIZARD_FRAME( KIWAY* aKiway, FOOTPRINT_EDIT_FR SetIcon( icon ); m_HotkeysZoomAndGridList = g_Module_Viewer_Hokeys_Descr; - m_semaphore = semaphore; m_wizardName.Empty(); - m_exportRequest = false; - - if( m_semaphore ) - SetModalMode( true ); SetBoard( new BOARD() ); + // Ensure all layers and items are visible: GetBoard()->SetVisibleAlls(); SetScreen( new PCB_SCREEN( GetPageSizeIU() ) ); @@ -244,17 +240,14 @@ FOOTPRINT_WIZARD_FRAME::~FOOTPRINT_WIZARD_FRAME() } -/* Function OnCloseWindow - * Handles the close event, saving settings an destroying or releasing a semaphore from caller - */ void FOOTPRINT_WIZARD_FRAME::OnCloseWindow( wxCloseEvent& Event ) { - if( m_semaphore ) + if( IsModal() ) { - m_semaphore->Post(); - SetModalMode( false ); - // This window will be destroyed by the calling function, - // to avoid side effects + // Only dismiss a modal frame once, so that the return values set by + // the prior DismissModal() are not bashed for ShowModal(). + if( !IsDismissed() ) + DismissModal( false ); } else { @@ -265,15 +258,11 @@ void FOOTPRINT_WIZARD_FRAME::OnCloseWindow( wxCloseEvent& Event ) void FOOTPRINT_WIZARD_FRAME::ExportSelectedFootprint( wxCommandEvent& aEvent ) { - m_exportRequest = true; + DismissModal( true ); Close(); } -/* Function OnSize - * It handles a dialog resize event, asking for an update - * - */ void FOOTPRINT_WIZARD_FRAME::OnSize( wxSizeEvent& SizeEv ) { if( m_auimgr.GetManagedWindow() ) @@ -283,10 +272,6 @@ void FOOTPRINT_WIZARD_FRAME::OnSize( wxSizeEvent& SizeEv ) } -/* Function OnSetRelativeOffset - * Updates the cursor position and the status bar - * - */ void FOOTPRINT_WIZARD_FRAME::OnSetRelativeOffset( wxCommandEvent& event ) { GetScreen()->m_O_Curseur = GetCrossHairPosition(); @@ -294,10 +279,6 @@ void FOOTPRINT_WIZARD_FRAME::OnSetRelativeOffset( wxCommandEvent& event ) } -/* Function ReCreatePageList - * It recreates the list of pages for a new loaded wizard - * - */ void FOOTPRINT_WIZARD_FRAME::ReCreatePageList() { if( m_pageList == NULL ) @@ -326,11 +307,6 @@ void FOOTPRINT_WIZARD_FRAME::ReCreatePageList() } -/* Function ReCreateParameterList - * It creates the parameter grid for a certain wizard page of the current wizard - * - */ - void FOOTPRINT_WIZARD_FRAME::ReCreateParameterList() { if( m_parameterGrid == NULL ) @@ -620,7 +596,7 @@ void FOOTPRINT_WIZARD_FRAME::ReCreateHToolbar() { wxString msg; - if( m_mainToolBar == NULL ) + if( !m_mainToolBar ) { m_mainToolBar = new wxAuiToolBar( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_TB_DEFAULT_STYLE | wxAUI_TB_HORZ_LAYOUT ); @@ -665,7 +641,7 @@ void FOOTPRINT_WIZARD_FRAME::ReCreateHToolbar() m_mainToolBar->AddTool( ID_ZOOM_PAGE, wxEmptyString, KiBitmap( zoom_fit_in_page_xpm ), msg ); - if( m_semaphore ) + if( m_Ident == FRAME_PCB_FOOTPRINT_WIZARD_MODAL ) { // The library browser is called from a "load component" command m_mainToolBar->AddSeparator(); diff --git a/pcbnew/footprint_wizard_frame.h b/pcbnew/footprint_wizard_frame.h index c36ecc70c3..d65c309f34 100644 --- a/pcbnew/footprint_wizard_frame.h +++ b/pcbnew/footprint_wizard_frame.h @@ -35,41 +35,37 @@ #include class wxSashLayoutWindow; class wxListBox; -class wxSemaphore; class wxGrid; class wxGridEvent; class FOOTPRINT_EDIT_FRAME; /** - * Component library viewer main window. + * Class FOOTPRINT_WIZARD_FRAME */ class FOOTPRINT_WIZARD_FRAME : public PCB_BASE_FRAME { private: - wxListBox* m_pageList; // < The list of pages - int m_pageListWidth; // < width of the window - wxGrid* m_parameterGrid; // < The list of parameters - int m_parameterGridWidth; // < size of the grid + wxListBox* m_pageList; ///< The list of pages + int m_pageListWidth; ///< width of the window + wxGrid* m_parameterGrid; ///< The list of parameters + int m_parameterGridWidth; ///< size of the grid // 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 + wxString m_configPath; ///< subpath for configuration protected: - wxString m_wizardName; // < name of the current wizard - wxString m_wizardDescription; // < description of the wizard - wxString m_wizardStatus; // < current wizard status + 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( KIWAY* aKiway, - FOOTPRINT_EDIT_FRAME* parent, wxSemaphore* semaphore = NULL, - long style = KICAD_DEFAULT_DRAWFRAME_STYLE ); + + FOOTPRINT_WIZARD_FRAME( KIWAY* aKiway, wxWindow* parent, FRAME_T aFrameType ); ~FOOTPRINT_WIZARD_FRAME(); - MODULE* GetBuiltFootprint( void ); + MODULE* GetBuiltFootprint(); private: diff --git a/pcbnew/gpcb_plugin.cpp b/pcbnew/gpcb_plugin.cpp index 7585aad4f9..1f207eaaa6 100644 --- a/pcbnew/gpcb_plugin.cpp +++ b/pcbnew/gpcb_plugin.cpp @@ -285,7 +285,7 @@ void GPCB_FPL_CACHE::Load() MODULE* footprint = parseMODULE( &reader ); // The footprint name is the file name without the extension. - footprint->SetFPID( fn.GetName() ); + footprint->SetFPID( FPID( fn.GetName() ) ); m_modules.insert( name, new GPCB_FPL_CACHE_ITEM( footprint, fn.GetName() ) ); } while( dir.GetNext( &fpFileName ) ); @@ -299,7 +299,6 @@ void GPCB_FPL_CACHE::Load() void GPCB_FPL_CACHE::Remove( const wxString& aFootprintName ) { - std::string footprintName = TO_UTF8( aFootprintName ); MODULE_CITER it = m_modules.find( footprintName ); diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index fd7059399a..80015dc147 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -279,7 +279,7 @@ void FP_CACHE::Load() MODULE* footprint = (MODULE*) m_owner->m_parser->Parse(); // The footprint name is the file name without the extension. - footprint->SetFPID( fullPath.GetName() ); + footprint->SetFPID( FPID( fullPath.GetName() ) ); m_modules.insert( name, new FP_CACHE_ITEM( footprint, fullPath ) ); } while( dir.GetNext( &fpFileName ) ); @@ -657,14 +657,14 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const m_out->Print( aNestLevel, ")\n\n" ); - // Save net codes and names + // Save net codes and names for( NETINFO_MAPPING::iterator net = m_mapping->begin(), netEnd = m_mapping->end(); net != netEnd; ++net ) { m_out->Print( aNestLevel, "(net %d %s)\n", m_mapping->Translate( net->GetNet() ), m_out->Quotew( net->GetNetname() ).c_str() ); - } + } m_out->Print( 0, "\n" ); diff --git a/pcbnew/librairi.cpp b/pcbnew/librairi.cpp index d8e47c0e46..487f356e6a 100644 --- a/pcbnew/librairi.cpp +++ b/pcbnew/librairi.cpp @@ -620,7 +620,7 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibrary, if( footprintName.IsEmpty() ) { footprintName = wxT("noname"); - aModule->SetFPID( footprintName ); + aModule->SetFPID( FPID( footprintName ) ); } bool module_exists = false; diff --git a/pcbnew/loadcmp.cpp b/pcbnew/loadcmp.cpp index 6c324b4d65..3aca4d620f 100644 --- a/pcbnew/loadcmp.cpp +++ b/pcbnew/loadcmp.cpp @@ -34,6 +34,8 @@ #include #include #include +#include +//#include #include #include #include @@ -118,32 +120,21 @@ bool FOOTPRINT_EDIT_FRAME::Load_Module_From_BOARD( MODULE* aModule ) wxString PCB_BASE_FRAME::SelectFootprintFromLibBrowser() { - wxString fpname; - wxString fpid; + // Close the current non-modal Lib browser if opened, and open a new one, in "modal" mode: + FOOTPRINT_VIEWER_FRAME* viewer; - wxSemaphore semaphore( 0, 1 ); - - // Close the current Lib browser, if opened, and open a new one, in "modal" mode: - FOOTPRINT_VIEWER_FRAME* viewer = FOOTPRINT_VIEWER_FRAME::GetActiveFootprintViewer( this ); + viewer = (FOOTPRINT_VIEWER_FRAME*) Kiway().Player( FRAME_PCB_MODULE_VIEWER, false ); if( viewer ) viewer->Destroy(); - viewer = new FOOTPRINT_VIEWER_FRAME( &Kiway(), this, &semaphore ); + viewer = (FOOTPRINT_VIEWER_FRAME*) Kiway().Player( FRAME_PCB_MODULE_VIEWER_MODAL, true ); - // Show the library viewer frame until it is closed - while( semaphore.TryWait() == wxSEMA_BUSY ) // Wait for viewer closing event - { - wxYield(); - wxMilliSleep( 50 ); - } + wxString fpid; - fpname = viewer->GetSelectedFootprint(); + viewer->ShowModal( &fpid ); - if( !!fpname ) - { - fpid = viewer->GetSelectedLibrary() + wxT( ":" ) + fpname; - } + //DBG(printf("%s: fpid:'%s'\n", __func__, TO_UTF8( fpid ) );) viewer->Destroy(); diff --git a/pcbnew/modedit.cpp b/pcbnew/modedit.cpp index c9198d4a41..73a20509f8 100644 --- a/pcbnew/modedit.cpp +++ b/pcbnew/modedit.cpp @@ -27,6 +27,7 @@ #include #include +#include #include #include #include @@ -262,25 +263,19 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) case ID_OPEN_MODULE_VIEWER: { - // Make a _project specific_ PCB_EDIT_FRAME be the start of the search in - // FOOTPRINT_VIEWER_FRAME::GetActiveFootprintViewer(); - - PCB_EDIT_FRAME* top_project = dynamic_cast( GetParent() ); - wxASSERT( top_project ); // dynamic_cast returns NULL if class mismatch. - - FOOTPRINT_VIEWER_FRAME* viewer = FOOTPRINT_VIEWER_FRAME::GetActiveFootprintViewer( top_project ); + FOOTPRINT_VIEWER_FRAME* viewer = (FOOTPRINT_VIEWER_FRAME*) Kiway().Player( FRAME_PCB_MODULE_VIEWER, false ); if( !viewer ) { - KIFACE_I& kf = Kiface(); - - viewer = (FOOTPRINT_VIEWER_FRAME*) kf.CreateWindow( this, FRAME_PCB_MODULE_VIEWER, &Kiway(), kf.StartFlags() ); + viewer = (FOOTPRINT_VIEWER_FRAME*) Kiway().Player( FRAME_PCB_MODULE_VIEWER, true ); viewer->Show( true ); viewer->Zoom_Automatique( false ); } else { + /* if( viewer->IsIconized() ) viewer->Iconize( false ); + */ viewer->Raise(); @@ -324,41 +319,37 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) case ID_MODEDIT_NEW_MODULE_FROM_WIZARD: { - wxSemaphore semaphore( 0, 1 ); + FOOTPRINT_WIZARD_FRAME* wizard = (FOOTPRINT_WIZARD_FRAME*) Kiway().Player( + FRAME_PCB_FOOTPRINT_WIZARD_MODAL, true ); - FOOTPRINT_WIZARD_FRAME* wizard = new FOOTPRINT_WIZARD_FRAME( &Kiway(), 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 + wxString not_used; + + if( wizard->ShowModal( ¬_used ) ) { - wxYield(); - wxMilliSleep( 50 ); - } + // Creates the new footprint from python script wizard + MODULE* module = wizard->GetBuiltFootprint(); - // Creates the new footprint from python script wizard - MODULE* module = wizard->GetBuiltFootprint(); + if( module ) // i.e. if create module command not aborted + { + Clear_Pcb( true ); + GetScreen()->ClearUndoRedoList(); + SetCurItem( NULL ); + SetCrossHairPosition( wxPoint( 0, 0 ) ); - if( module ) // i.e. if create module command not aborted - { - 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 ); - // Add the new object 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 ) ); - module->ClearFlags(); + // 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 ) ); + module->ClearFlags(); + } } wizard->Destroy(); @@ -378,7 +369,8 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) { // 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(); + PCB_EDIT_FRAME* pcbframe = (PCB_EDIT_FRAME*) Kiway().Player( FRAME_PCB, true ); + BOARD* mainpcb = pcbframe->GetBoard(); MODULE* source_module = NULL; MODULE* module_in_edit = GetBoard()->m_Modules; diff --git a/pcbnew/module_editor_frame.h b/pcbnew/module_editor_frame.h index 4378beac06..438c4ed35e 100644 --- a/pcbnew/module_editor_frame.h +++ b/pcbnew/module_editor_frame.h @@ -53,17 +53,6 @@ public: */ static const wxChar* GetFootprintEditorFrameName(); - /** - * Function GetActiveFootprintEditor (static) - * - * @param aTopOfProject is a PCB_EDIT_FRAME* window which anchors the search in - * a project specific way. - * - * @return a reference to the current opened Footprint editor - * or NULL if no Footprint editor currently opened - */ - static FOOTPRINT_EDIT_FRAME* GetActiveFootprintEditor( const wxWindow* aTopOfProject ); - BOARD_DESIGN_SETTINGS& GetDesignSettings() const; // overload PCB_BASE_FRAME, get parent's void SetDesignSettings( const BOARD_DESIGN_SETTINGS& aSettings ); // overload @@ -415,7 +404,7 @@ public: protected: /// protected so only friend PCB::IFACE::CreateWindow() can act as sole factory. - FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, PCB_EDIT_FRAME* aParent ); + FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ); static BOARD* s_Pcb; ///< retain board across invocations of module editor diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index cb7a0425fc..c2a9b93d4e 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -151,7 +151,7 @@ END_EVENT_TABLE() #define FOOTPRINT_EDIT_FRAME_NAME wxT( "ModEditFrame" ) -FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, PCB_EDIT_FRAME* aParent ) : +FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : PCB_BASE_FRAME( aKiway, aParent, FRAME_PCB_MODULE_EDITOR, wxEmptyString, wxDefaultPosition, wxDefaultSize, KICAD_DEFAULT_DRAWFRAME_STYLE, GetFootprintEditorFrameName() ) @@ -291,19 +291,6 @@ const wxChar* FOOTPRINT_EDIT_FRAME::GetFootprintEditorFrameName() } -/* return a reference to the current opened Footprint editor - * or NULL if no Footprint editor currently opened - */ -FOOTPRINT_EDIT_FRAME* FOOTPRINT_EDIT_FRAME::GetActiveFootprintEditor( const wxWindow* aParent ) -{ - // top_of_project! - wxASSERT( dynamic_cast( aParent ) ); - - wxWindow* ret = wxWindow::FindWindowByName( GetFootprintEditorFrameName(), aParent ); - return (FOOTPRINT_EDIT_FRAME*) ret; -} - - BOARD_DESIGN_SETTINGS& FOOTPRINT_EDIT_FRAME::GetDesignSettings() const { // get the BOARD_DESIGN_SETTINGS from the parent editor, not our BOARD. diff --git a/pcbnew/modview_frame.cpp b/pcbnew/modview_frame.cpp index 30bb30063e..1db99caf30 100644 --- a/pcbnew/modview_frame.cpp +++ b/pcbnew/modview_frame.cpp @@ -29,6 +29,7 @@ #include #include +#include #include #include #include @@ -70,12 +71,12 @@ wxString FOOTPRINT_VIEWER_FRAME::m_selectedFootprintName; BEGIN_EVENT_TABLE( FOOTPRINT_VIEWER_FRAME, EDA_DRAW_FRAME ) - /* Window events */ + // Window events EVT_CLOSE( FOOTPRINT_VIEWER_FRAME::OnCloseWindow ) EVT_SIZE( FOOTPRINT_VIEWER_FRAME::OnSize ) EVT_ACTIVATE( FOOTPRINT_VIEWER_FRAME::OnActivate ) - /* Toolbar events */ + // Toolbar events EVT_TOOL( ID_MODVIEW_SELECT_LIB, FOOTPRINT_VIEWER_FRAME::SelectCurrentLibrary ) EVT_TOOL( ID_MODVIEW_SELECT_PART, @@ -88,7 +89,7 @@ BEGIN_EVENT_TABLE( FOOTPRINT_VIEWER_FRAME, EDA_DRAW_FRAME ) FOOTPRINT_VIEWER_FRAME::ExportSelectedFootprint ) EVT_TOOL( ID_MODVIEW_SHOW_3D_VIEW, FOOTPRINT_VIEWER_FRAME::Show3D_Frame ) - /* listbox events */ + // listbox events EVT_LISTBOX( ID_MODVIEW_LIB_LIST, FOOTPRINT_VIEWER_FRAME::ClickOnLibList ) EVT_LISTBOX( ID_MODVIEW_FOOTPRINT_LIST, FOOTPRINT_VIEWER_FRAME::ClickOnFootprintList ) EVT_LISTBOX_DCLICK( ID_MODVIEW_FOOTPRINT_LIST, FOOTPRINT_VIEWER_FRAME::DClickOnFootprintList ) @@ -118,14 +119,16 @@ static wxAcceleratorEntry accels[] = #define FOOTPRINT_VIEWER_FRAME_NAME wxT( "ModViewFrame" ) -FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent, wxSemaphore* aSemaphore ) : - PCB_BASE_FRAME( aKiway, aParent, FRAME_PCB_MODULE_VIEWER, _( "Footprint Library Browser" ), +FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrameType ) : + PCB_BASE_FRAME( aKiway, aParent, aFrameType, _( "Footprint Library Browser" ), wxDefaultPosition, wxDefaultSize, - !aSemaphore ? - KICAD_DEFAULT_DRAWFRAME_STYLE : - KICAD_DEFAULT_DRAWFRAME_STYLE | wxFRAME_FLOAT_ON_PARENT, + aFrameType == FRAME_PCB_MODULE_VIEWER_MODAL ? + KICAD_DEFAULT_DRAWFRAME_STYLE | wxFRAME_FLOAT_ON_PARENT : + KICAD_DEFAULT_DRAWFRAME_STYLE, GetFootprintViewerFrameName() ) { + wxASSERT( aFrameType==FRAME_PCB_MODULE_VIEWER || aFrameType==FRAME_PCB_MODULE_VIEWER_MODAL ); + wxAcceleratorTable table( DIM( accels ), accels ); m_FrameName = GetFootprintViewerFrameName(); @@ -145,12 +148,8 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* a m_footprintList = new wxListBox( this, ID_MODVIEW_FOOTPRINT_LIST, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_HSCROLL ); - m_semaphore = aSemaphore; m_selectedFootprintName.Empty(); - if( m_semaphore ) - SetModalMode( true ); - SetBoard( new BOARD() ); // Ensure all layers and items are visible: @@ -237,7 +236,6 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* a } #if 0 // no. - // Set min size (overwrite params read in LoadPerspective(), if any) m_auimgr.GetPane( m_libList ).MinSize( minsize ); m_auimgr.GetPane( m_footprintList ).MinSize( minsize ); @@ -271,45 +269,16 @@ const wxChar* FOOTPRINT_VIEWER_FRAME::GetFootprintViewerFrameName() } -FOOTPRINT_VIEWER_FRAME* FOOTPRINT_VIEWER_FRAME::GetActiveFootprintViewer( const KIWAY_PLAYER* aParent ) -{ - wxASSERT( aParent ); - - // We search only within the current project, and do so by limiting - // the search scope to a wxWindow hierarchy subset. Find the top most - // KIWAY_PLAYER which is part of this PROJECT by matching its KIWAY* to the - // most immediate parent's. - - // NOTE: an open FOOTPRINT_VIEWER_FRAME may have either the PCB_EDIT_FRAME - // or the FOOTPRINT_EDIT_FRAME as parent. - - KIWAY* kiway = &aParent->Kiway(); - wxWindow* frame; - - while( (frame = aParent->GetParent()) != NULL ) - { - // will go NULL when we reach a non-KIWAY_PLAYER - KIWAY_PLAYER* kwp = dynamic_cast( frame ); - - if( kwp && &kwp->Kiway() == kiway ) - aParent = kwp; - else - break; - } - - return (FOOTPRINT_VIEWER_FRAME*) wxWindow::FindWindowByName( - GetFootprintViewerFrameName(), aParent ); -} - - void FOOTPRINT_VIEWER_FRAME::OnCloseWindow( wxCloseEvent& Event ) { - if( m_semaphore ) + if( IsModal() ) { - m_semaphore->Post(); - SetModalMode( false ); - // This window will be destroyed by the calling function, - // to avoid side effects + // Only dismiss a modal frame once, so that the return values set by + // the prior DismissModal() are not bashed for ShowModal(). + if( !IsDismissed() ) + DismissModal( false ); + + // window will be destroyed by the calling function. } else Destroy(); @@ -464,15 +433,23 @@ void FOOTPRINT_VIEWER_FRAME::ClickOnFootprintList( wxCommandEvent& event ) void FOOTPRINT_VIEWER_FRAME::DClickOnFootprintList( wxCommandEvent& event ) { - if( m_semaphore ) + if( IsModal() ) { + // @todo(DICK) ExportSelectedFootprint( event ); + // Prevent the double click from being as a single mouse button release // event in the parent window which would cause the part to be parked - // rather than staying in mode mode. + // rather than staying in move mode. // Remember the mouse button will be released in the parent window // thus creating a mouse button release event which should be ignored - ((PCB_BASE_FRAME*)GetParent())->SkipNextLeftButtonReleaseEvent(); + PCB_EDIT_FRAME* pcbframe = dynamic_cast( GetParent() ); + + // The parent may not be the board editor: + if( pcbframe ) + { + pcbframe->SkipNextLeftButtonReleaseEvent(); + } } } @@ -482,9 +459,24 @@ void FOOTPRINT_VIEWER_FRAME::ExportSelectedFootprint( wxCommandEvent& event ) int ii = m_footprintList->GetSelection(); if( ii >= 0 ) - m_selectedFootprintName = m_footprintList->GetString( ii ); + { + wxString fp_name = m_footprintList->GetString( ii ); + + // @todo(DICK) assign to static now, later PROJECT retained string. + m_selectedFootprintName = fp_name; + + FPID fpid; + + fpid.SetLibNickname( GetSelectedLibrary() ); + fpid.SetFootprintName( fp_name ); + + DismissModal( true, fpid.Format() ); + } else + { m_selectedFootprintName.Empty(); + DismissModal( false ); + } Close( true ); } @@ -580,25 +572,25 @@ void FOOTPRINT_VIEWER_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition 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 ); @@ -621,7 +613,7 @@ void FOOTPRINT_VIEWER_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition } } - UpdateStatusBar(); /* Display new cursor coordinates */ + UpdateStatusBar(); // Display new cursor coordinates } @@ -746,11 +738,13 @@ void FOOTPRINT_VIEWER_FRAME::SelectCurrentLibrary( wxCommandEvent& event ) void FOOTPRINT_VIEWER_FRAME::SelectCurrentFootprint( wxCommandEvent& event ) { - PCB_EDIT_FRAME* parent = (PCB_EDIT_FRAME*) GetParent(); + // The PCB_EDIT_FRAME may not be the FOOTPRINT_VIEW_FRAME's parent, + // so use Kiway().Player() to fetch. + PCB_EDIT_FRAME* parent = (PCB_EDIT_FRAME*) Kiway().Player( FRAME_PCB, true ); + wxString libname = m_libraryName + wxT( "." ) + LegacyFootprintLibPathExtension; MODULE* oldmodule = GetBoard()->m_Modules; - MODULE* module = LoadModuleFromLibrary( libname, parent->FootprintLibs(), - false ); + MODULE* module = LoadModuleFromLibrary( libname, parent->FootprintLibs(), false ); if( module ) { diff --git a/pcbnew/modview_frame.h b/pcbnew/modview_frame.h index dab4432f3b..9595866458 100644 --- a/pcbnew/modview_frame.h +++ b/pcbnew/modview_frame.h @@ -34,7 +34,6 @@ class wxSashLayoutWindow; class wxListBox; -class wxSemaphore; class FP_LIB_TABLE; namespace PCB { struct IFACE; } @@ -44,25 +43,13 @@ namespace PCB { struct IFACE; } */ class FOOTPRINT_VIEWER_FRAME : public PCB_BASE_FRAME { - friend struct PCB::IFACE; - -private: - wxListBox* m_libList; // The list of libs names - wxListBox* m_footprintList; // The list of footprint names - - // Flags - wxSemaphore* m_semaphore; // != NULL if the frame emulates a modal dialog - wxString m_configPath; // subpath for configuration + friend struct PCB::IFACE; // constructor called from here only protected: - static wxString m_libraryName; // Current selected library - static wxString m_footprintName; // Current selected footprint - static wxString m_selectedFootprintName; // When the viewer is used to select a footprint - // the selected footprint is here + FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrameType ); + public: - FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent, wxSemaphore* aSemaphore = NULL ); - ~FOOTPRINT_VIEWER_FRAME(); /** @@ -72,17 +59,6 @@ public: */ static const wxChar* GetFootprintViewerFrameName(); - /** - * Function GetActiveFootprintViewer (static) - * - * @param aParent the KIWAY_PLAYER which is the parent of the calling wxWindow. - * This is used to traverse the window hierarchy upwards to the topmost - * KIWAY_PLAYER which is still part of the same project. - * - * @return Any currently opened Footprint viewer or NULL if none. - */ - static FOOTPRINT_VIEWER_FRAME* GetActiveFootprintViewer( const KIWAY_PLAYER* aParent ); - wxString& GetSelectedFootprint( void ) const { return m_selectedFootprintName; } const wxString GetSelectedLibraryFullName(); @@ -102,8 +78,19 @@ public: */ void ReCreateLibraryList(); + private: + wxListBox* m_libList; // The list of libs names + wxListBox* m_footprintList; // The list of footprint names + + wxString m_configPath; // subpath for configuration + + static wxString m_libraryName; // Current selected library + static wxString m_footprintName; // Current selected footprint + static wxString m_selectedFootprintName; // When the viewer is used to select a footprint + + void OnSize( wxSizeEvent& event ); void ReCreateFootprintList(); @@ -193,7 +180,6 @@ private: void SaveCopyInUndoList( BOARD_ITEM*, UNDO_REDO_T, const wxPoint& ) {} void SaveCopyInUndoList( const PICKED_ITEMS_LIST&, UNDO_REDO_T, const wxPoint &) {} - DECLARE_EVENT_TABLE() }; diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 04ecd6af0b..a95e7804fa 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -152,8 +152,6 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME ) EVT_MENU( ID_PCB_DISPLAY_OPTIONS_SETUP, PCB_EDIT_FRAME::InstallDisplayOptionsDialog ) EVT_MENU( ID_PCB_USER_GRID_SETUP, PCB_EDIT_FRAME::Process_Special_Functions ) - EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END, PCB_EDIT_FRAME::SetLanguage ) - // menu Postprocess EVT_MENU( ID_PCB_GEN_POS_MODULES_FILE, PCB_EDIT_FRAME::GenFootprintsPositionFile ) EVT_MENU( ID_PCB_GEN_DRILL_FILE, PCB_EDIT_FRAME::InstallDrillFrame ) @@ -1024,9 +1022,11 @@ void PCB_EDIT_FRAME::SetVisibleAlls() } -void PCB_EDIT_FRAME::SetLanguage( wxCommandEvent& event ) +void PCB_EDIT_FRAME::ShowChangedLanguage() { - EDA_DRAW_FRAME::SetLanguage( event ); + // call my base class + PCB_BASE_FRAME::ShowChangedLanguage(); + m_Layers->SetLayersManagerTabsText(); wxAuiPaneInfo& pane_info = m_auimgr.GetPane( m_Layers ); @@ -1034,10 +1034,6 @@ void PCB_EDIT_FRAME::SetLanguage( wxCommandEvent& event ) pane_info.Caption( _( "Visibles" ) ); m_auimgr.Update(); ReFillLayerWidget(); - - FOOTPRINT_EDIT_FRAME* moduleEditFrame = FOOTPRINT_EDIT_FRAME::GetActiveFootprintEditor( this ); - if( moduleEditFrame ) - moduleEditFrame->EDA_DRAW_FRAME::SetLanguage( event ); } diff --git a/pcbnew/pcbnew.cpp b/pcbnew/pcbnew.cpp index 3c47fb7f3d..793a537885 100644 --- a/pcbnew/pcbnew.cpp +++ b/pcbnew/pcbnew.cpp @@ -60,6 +60,7 @@ #include #include #include +#include // Colors for layers and items @@ -109,7 +110,6 @@ static struct IFACE : public KIFACE_I { switch( aClassId ) { - case FRAME_PCB: { PCB_EDIT_FRAME* frame = new PCB_EDIT_FRAME( aKiway, aParent ); @@ -132,11 +132,7 @@ static struct IFACE : public KIFACE_I case FRAME_PCB_MODULE_EDITOR: { - // yuck: - PCB_EDIT_FRAME* editor = dynamic_cast( aParent ); - wxASSERT( editor ); - - FOOTPRINT_EDIT_FRAME* frame = new FOOTPRINT_EDIT_FRAME( aKiway, editor ); + FOOTPRINT_EDIT_FRAME* frame = new FOOTPRINT_EDIT_FRAME( aKiway, aParent ); frame->Zoom_Automatique( true ); @@ -148,12 +144,10 @@ static struct IFACE : public KIFACE_I break; case FRAME_PCB_MODULE_VIEWER: + case FRAME_PCB_MODULE_VIEWER_MODAL: { - // yuck: - PCB_BASE_FRAME* editor = dynamic_cast( aParent ); - wxASSERT( editor ); - - FOOTPRINT_VIEWER_FRAME* frame = new FOOTPRINT_VIEWER_FRAME( aKiway, editor ); + FOOTPRINT_VIEWER_FRAME* frame = new FOOTPRINT_VIEWER_FRAME( + aKiway, aParent, FRAME_T( aClassId ) ); frame->Zoom_Automatique( true ); @@ -164,6 +158,15 @@ static struct IFACE : public KIFACE_I } break; + case FRAME_PCB_FOOTPRINT_WIZARD_MODAL: + { + FOOTPRINT_WIZARD_FRAME* frame = new FOOTPRINT_WIZARD_FRAME( + aKiway, aParent, FRAME_T( aClassId ) ); + + return frame; + } + break; + default: ; } diff --git a/pcbnew/pcbnew_config.cpp b/pcbnew/pcbnew_config.cpp index a9870c279d..df8df9fcc3 100644 --- a/pcbnew/pcbnew_config.cpp +++ b/pcbnew/pcbnew_config.cpp @@ -142,7 +142,7 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event ) FOOTPRINT_VIEWER_FRAME* viewer; - if( tableChanged && (viewer = FOOTPRINT_VIEWER_FRAME::GetActiveFootprintViewer( this )) != NULL ) + if( tableChanged && (viewer = (FOOTPRINT_VIEWER_FRAME*)Kiway().Player( FRAME_PCB_MODULE_VIEWER, false )) != NULL ) { viewer->ReCreateLibraryList(); } diff --git a/pcbnew/tool_modview.cpp b/pcbnew/tool_modview.cpp index 02fccab586..3994a2a96d 100644 --- a/pcbnew/tool_modview.cpp +++ b/pcbnew/tool_modview.cpp @@ -95,9 +95,8 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateHToolbar() m_mainToolBar->AddTool( ID_ZOOM_PAGE, wxEmptyString, KiBitmap( zoom_fit_in_page_xpm ), msg ); - // Enable this tool only if the library browser is called from - // a "load component" command - if( m_semaphore ) + // Enable this tool only if the library browser is intended for modal use. + if( m_Ident == FRAME_PCB_MODULE_VIEWER_MODAL ) { m_mainToolBar->AddSeparator(); m_mainToolBar->AddTool( ID_MODVIEW_FOOTPRINT_EXPORT_TO_BOARD, wxEmptyString, From f16f248bf96ce56a9b8cd8d68836335f1dd60167 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Sat, 3 May 2014 19:44:57 -0500 Subject: [PATCH 339/741] Change order of headers for wx 2.8, use wxWindowDisabler not ENABLE_DISABLE. --- common/kiway.cpp | 5 +- common/kiway_player.cpp | 74 +++++++------------ .../dialog_edit_component_in_schematic.cpp | 35 ++++++++- include/kiway_player.h | 2 +- pcbnew/modedit.cpp | 4 +- 5 files changed, 65 insertions(+), 55 deletions(-) diff --git a/common/kiway.cpp b/common/kiway.cpp index a599474f06..8f2ebf9824 100644 --- a/common/kiway.cpp +++ b/common/kiway.cpp @@ -23,8 +23,6 @@ */ #include -#include -#include #include #include @@ -34,6 +32,9 @@ #include #include +#include +#include + KIFACE* KIWAY::m_kiface[KIWAY_FACE_COUNT]; int KIWAY::m_kiface_version[KIWAY_FACE_COUNT]; diff --git a/common/kiway_player.cpp b/common/kiway_player.cpp index 31aca7d1d8..274e4e564c 100644 --- a/common/kiway_player.cpp +++ b/common/kiway_player.cpp @@ -1,3 +1,27 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2014 KiCad Developers, see CHANGELOG.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 @@ -5,6 +29,7 @@ #include #include #include +#include BEGIN_EVENT_TABLE( KIWAY_PLAYER, EDA_BASE_FRAME ) @@ -46,51 +71,6 @@ void KIWAY_PLAYER::KiwayMailIn( KIWAY_EXPRESS& aEvent ) } -static void makeModal( wxFrame* aFrame, bool IsModal ) -{ - // disable or enable all other top level windows -#if wxCHECK_VERSION(2, 9, 4) - wxWindowList::compatibility_iterator node = wxTopLevelWindows.GetFirst(); - - while( node ) - { - wxWindow* win = node->GetData(); - - if( win != aFrame ) - win->Enable( !IsModal ); - - node = node->GetNext(); - } -#else - // Deprecated since wxWidgets 2.9.4 - aFrame->MakeModal( IsModal ); -#endif -} - - -/** - * toggle global wxFrame enable/disable state, does the re-enable part even - * if an exception is thrown. - */ -struct ENABLE_DISABLE -{ - wxFrame* m_frame; - - ENABLE_DISABLE( wxFrame* aFrame ) : - m_frame( aFrame ) - { - makeModal( aFrame, true ); - } - - ~ENABLE_DISABLE() - { - // Re-enable all frames, (oops, even if they were previously inactive). - // This is probably why this function was deprecated in wx. - makeModal( m_frame, false ); - } -}; - - bool KIWAY_PLAYER::ShowModal( wxString* aResult ) { /* @@ -103,10 +83,10 @@ bool KIWAY_PLAYER::ShowModal( wxString* aResult ) vtable and therefore cross-module capable. */ - volatile bool dismissed = false; + volatile bool dismissed = false; // disable all frames except the modal one, re-enable on exit, exception safe. - ENABLE_DISABLE toggle( this ); + wxWindowDisabler toggle( this ); m_modal_dismissed = &dismissed; diff --git a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp index 9a6644d327..4fc02d14fb 100644 --- a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp +++ b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp @@ -30,6 +30,7 @@ #include #include +#include #include #include #include @@ -435,8 +436,38 @@ 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 ); +#if 1 + wxString datasheet_uri = fieldValueTextCtrl->GetValue(); + ::wxLaunchDefaultBrowser( datasheet_uri ); + +#else + unsigned fieldNdx = getSelectedFieldNdx(); + +/* + if( fieldNdx == DATASHEET ) + { + wxString datasheet_uri = fieldValueTextCtrl->GetValue(); + ::wxLaunchDefaultBrowser( datasheet_uri ); + } + else if( fieldNdx == FOOTPRINT ) +*/ + { + // pick a footprint + wxString fpid; + + KIWAY_PLAYER* frame = Kiway().Player( FRAME_PCB_MODULE_VIEWER_MODAL, true ); + + if( frame->ShowModal( &fpid ) ) + { + printf( "%s: %s\n", __func__, TO_UTF8( fpid ) ); + } + + frame->Show( false ); // keep the frame open, but hidden. + + Raise(); + } +#endif + } diff --git a/include/kiway_player.h b/include/kiway_player.h index 8188ad35c8..6a08e70ed0 100644 --- a/include/kiway_player.h +++ b/include/kiway_player.h @@ -180,7 +180,7 @@ public: * @return bool - true if frame implementation called KIWAY_PLAYER::DismissModal() * with aRetVal of true. */ - VTBL_ENTRY bool ShowModal( wxString* aResult ); + VTBL_ENTRY bool ShowModal( wxString* aResult = NULL ); //-------------------------------------------------------- diff --git a/pcbnew/modedit.cpp b/pcbnew/modedit.cpp index 73a20509f8..26e6ca7fde 100644 --- a/pcbnew/modedit.cpp +++ b/pcbnew/modedit.cpp @@ -324,9 +324,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) wizard->Zoom_Automatique( false ); - wxString not_used; - - if( wizard->ShowModal( ¬_used ) ) + if( wizard->ShowModal() ) { // Creates the new footprint from python script wizard MODULE* module = wizard->GetBuiltFootprint(); From 19c184df97376366be8b287cdf05943e037919ea Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Sat, 3 May 2014 19:44:57 -0500 Subject: [PATCH 340/741] Change order of headers for wx 2.8, use wxWindowDisabler not ENABLE_DISABLE. --- common/kiway.cpp | 5 +- common/kiway_player.cpp | 74 +++++++------------ .../dialog_edit_component_in_schematic.cpp | 35 ++++++++- include/kiway_player.h | 2 +- pcbnew/modedit.cpp | 4 +- 5 files changed, 65 insertions(+), 55 deletions(-) diff --git a/common/kiway.cpp b/common/kiway.cpp index a599474f06..8f2ebf9824 100644 --- a/common/kiway.cpp +++ b/common/kiway.cpp @@ -23,8 +23,6 @@ */ #include -#include -#include #include #include @@ -34,6 +32,9 @@ #include #include +#include +#include + KIFACE* KIWAY::m_kiface[KIWAY_FACE_COUNT]; int KIWAY::m_kiface_version[KIWAY_FACE_COUNT]; diff --git a/common/kiway_player.cpp b/common/kiway_player.cpp index 31aca7d1d8..274e4e564c 100644 --- a/common/kiway_player.cpp +++ b/common/kiway_player.cpp @@ -1,3 +1,27 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2014 KiCad Developers, see CHANGELOG.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 @@ -5,6 +29,7 @@ #include #include #include +#include BEGIN_EVENT_TABLE( KIWAY_PLAYER, EDA_BASE_FRAME ) @@ -46,51 +71,6 @@ void KIWAY_PLAYER::KiwayMailIn( KIWAY_EXPRESS& aEvent ) } -static void makeModal( wxFrame* aFrame, bool IsModal ) -{ - // disable or enable all other top level windows -#if wxCHECK_VERSION(2, 9, 4) - wxWindowList::compatibility_iterator node = wxTopLevelWindows.GetFirst(); - - while( node ) - { - wxWindow* win = node->GetData(); - - if( win != aFrame ) - win->Enable( !IsModal ); - - node = node->GetNext(); - } -#else - // Deprecated since wxWidgets 2.9.4 - aFrame->MakeModal( IsModal ); -#endif -} - - -/** - * toggle global wxFrame enable/disable state, does the re-enable part even - * if an exception is thrown. - */ -struct ENABLE_DISABLE -{ - wxFrame* m_frame; - - ENABLE_DISABLE( wxFrame* aFrame ) : - m_frame( aFrame ) - { - makeModal( aFrame, true ); - } - - ~ENABLE_DISABLE() - { - // Re-enable all frames, (oops, even if they were previously inactive). - // This is probably why this function was deprecated in wx. - makeModal( m_frame, false ); - } -}; - - bool KIWAY_PLAYER::ShowModal( wxString* aResult ) { /* @@ -103,10 +83,10 @@ bool KIWAY_PLAYER::ShowModal( wxString* aResult ) vtable and therefore cross-module capable. */ - volatile bool dismissed = false; + volatile bool dismissed = false; // disable all frames except the modal one, re-enable on exit, exception safe. - ENABLE_DISABLE toggle( this ); + wxWindowDisabler toggle( this ); m_modal_dismissed = &dismissed; diff --git a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp index 9a6644d327..4fc02d14fb 100644 --- a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp +++ b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp @@ -30,6 +30,7 @@ #include #include +#include #include #include #include @@ -435,8 +436,38 @@ 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 ); +#if 1 + wxString datasheet_uri = fieldValueTextCtrl->GetValue(); + ::wxLaunchDefaultBrowser( datasheet_uri ); + +#else + unsigned fieldNdx = getSelectedFieldNdx(); + +/* + if( fieldNdx == DATASHEET ) + { + wxString datasheet_uri = fieldValueTextCtrl->GetValue(); + ::wxLaunchDefaultBrowser( datasheet_uri ); + } + else if( fieldNdx == FOOTPRINT ) +*/ + { + // pick a footprint + wxString fpid; + + KIWAY_PLAYER* frame = Kiway().Player( FRAME_PCB_MODULE_VIEWER_MODAL, true ); + + if( frame->ShowModal( &fpid ) ) + { + printf( "%s: %s\n", __func__, TO_UTF8( fpid ) ); + } + + frame->Show( false ); // keep the frame open, but hidden. + + Raise(); + } +#endif + } diff --git a/include/kiway_player.h b/include/kiway_player.h index 8188ad35c8..6a08e70ed0 100644 --- a/include/kiway_player.h +++ b/include/kiway_player.h @@ -180,7 +180,7 @@ public: * @return bool - true if frame implementation called KIWAY_PLAYER::DismissModal() * with aRetVal of true. */ - VTBL_ENTRY bool ShowModal( wxString* aResult ); + VTBL_ENTRY bool ShowModal( wxString* aResult = NULL ); //-------------------------------------------------------- diff --git a/pcbnew/modedit.cpp b/pcbnew/modedit.cpp index 73a20509f8..26e6ca7fde 100644 --- a/pcbnew/modedit.cpp +++ b/pcbnew/modedit.cpp @@ -324,9 +324,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) wizard->Zoom_Automatique( false ); - wxString not_used; - - if( wizard->ShowModal( ¬_used ) ) + if( wizard->ShowModal() ) { // Creates the new footprint from python script wizard MODULE* module = wizard->GetBuiltFootprint(); From 85c5aa22c6b2c00c381f326df8a3805cc4856de6 Mon Sep 17 00:00:00 2001 From: Lorenzo Marcantonio Date: Sun, 4 May 2014 19:08:36 +0200 Subject: [PATCH 341/741] Constification of HitTest and GetParent In particular HitTest for zones *do not* select the nearest vertex/edge as a side effect --- 3d-viewer/3d_canvas.h | 2 +- 3d-viewer/3d_viewer.h | 2 +- common/draw_panel.cpp | 2 +- .../page_layout/page_layout_graphic_items.cpp | 12 +++--- cvpcb/cvstruct.h | 2 +- cvpcb/listboxes.cpp | 2 +- eeschema/class_libentry.h | 4 +- eeschema/lib_arc.cpp | 4 +- eeschema/lib_arc.h | 4 +- eeschema/lib_bezier.cpp | 4 +- eeschema/lib_bezier.h | 4 +- eeschema/lib_circle.cpp | 4 +- eeschema/lib_circle.h | 4 +- eeschema/lib_draw_item.h | 6 +-- eeschema/lib_field.cpp | 36 ++++++---------- eeschema/lib_field.h | 6 +-- eeschema/lib_pin.cpp | 4 +- eeschema/lib_pin.h | 4 +- eeschema/lib_polyline.cpp | 4 +- eeschema/lib_polyline.h | 4 +- eeschema/lib_rectangle.cpp | 4 +- eeschema/lib_rectangle.h | 4 +- eeschema/lib_text.cpp | 17 +++----- eeschema/lib_text.h | 6 +-- eeschema/sch_collectors.h | 2 +- gerbview/class_GERBER.h | 2 +- gerbview/class_gerber_draw_item.cpp | 6 +-- gerbview/class_gerber_draw_item.h | 6 +-- include/base_struct.h | 6 +-- include/class_board_item.h | 2 +- include/class_drawpanel.h | 2 +- include/sch_item_struct.h | 5 ++- include/worksheet_shape_builder.h | 14 +++--- kicad/class_treeprojectfiles.h | 2 +- pcbnew/class_dimension.cpp | 2 +- pcbnew/class_dimension.h | 2 +- pcbnew/class_drawsegment.cpp | 2 +- pcbnew/class_drawsegment.h | 2 +- pcbnew/class_marker_pcb.h | 2 +- pcbnew/class_mire.cpp | 2 +- pcbnew/class_mire.h | 2 +- pcbnew/class_module.cpp | 2 +- pcbnew/class_module.h | 2 +- pcbnew/class_pad.cpp | 2 +- pcbnew/class_pad.h | 7 +-- pcbnew/class_pcb_text.h | 2 +- pcbnew/class_text_mod.cpp | 5 ++- pcbnew/class_text_mod.h | 2 +- pcbnew/class_track.cpp | 2 +- pcbnew/class_track.h | 2 +- pcbnew/class_zone.cpp | 43 ++++++++++--------- pcbnew/class_zone.h | 15 ++++--- pcbnew/controle.cpp | 40 +++++++++++------ pcbnew/dialogs/dialog_general_options.h | 2 +- pcbnew/eagle_plugin.cpp | 2 + pcbnew/onrightclick.cpp | 4 +- pcbnew/router/pns_node.cpp | 6 +-- pcbnew/router/pns_node.h | 2 +- pcbnew/zones_by_polygon.cpp | 12 +++--- polygon/polygon_test_point_inside.cpp | 2 +- polygon/polygon_test_point_inside.h | 4 +- 61 files changed, 188 insertions(+), 176 deletions(-) diff --git a/3d-viewer/3d_canvas.h b/3d-viewer/3d_canvas.h index d4ad84cebf..b68541dfdf 100644 --- a/3d-viewer/3d_canvas.h +++ b/3d-viewer/3d_canvas.h @@ -80,7 +80,7 @@ public: EDA_3D_CANVAS( EDA_3D_FRAME* parent, int* attribList = 0 ); ~EDA_3D_CANVAS(); - EDA_3D_FRAME* Parent() { return (EDA_3D_FRAME*)GetParent(); } + EDA_3D_FRAME* Parent() const { return static_cast( GetParent() ); } BOARD* GetBoard() { return Parent()->GetBoard(); } diff --git a/3d-viewer/3d_viewer.h b/3d-viewer/3d_viewer.h index 46c92053b7..c0f950a67a 100644 --- a/3d-viewer/3d_viewer.h +++ b/3d-viewer/3d_viewer.h @@ -81,7 +81,7 @@ public: m_auimgr.UnInit(); }; - PCB_BASE_FRAME* Parent() { return (PCB_BASE_FRAME*)GetParent(); } + PCB_BASE_FRAME* Parent() const { return (PCB_BASE_FRAME*)GetParent(); } BOARD* GetBoard(); diff --git a/common/draw_panel.cpp b/common/draw_panel.cpp index 1e3adb750b..9ac1875616 100644 --- a/common/draw_panel.cpp +++ b/common/draw_panel.cpp @@ -165,7 +165,7 @@ EDA_DRAW_PANEL::~EDA_DRAW_PANEL() } -EDA_DRAW_FRAME* EDA_DRAW_PANEL::GetParent() +EDA_DRAW_FRAME* EDA_DRAW_PANEL::GetParent() const { wxWindow* mom = wxScrolledWindow::GetParent(); return (EDA_DRAW_FRAME*) mom; diff --git a/common/page_layout/page_layout_graphic_items.cpp b/common/page_layout/page_layout_graphic_items.cpp index aeb4b53696..c927e935df 100644 --- a/common/page_layout/page_layout_graphic_items.cpp +++ b/common/page_layout/page_layout_graphic_items.cpp @@ -192,7 +192,7 @@ void WS_DRAW_ITEM_TEXT::DrawWsItem( EDA_RECT* aClipBox, wxDC* aDC ) } // return true if the point aPosition is on the text -bool WS_DRAW_ITEM_TEXT::HitTest( const wxPoint& aPosition) +bool WS_DRAW_ITEM_TEXT::HitTest( const wxPoint& aPosition) const { return EDA_TEXT::TextHitTest( aPosition, 0 ); } @@ -221,7 +221,7 @@ void WS_DRAW_ITEM_POLYGON::DrawWsItem( EDA_RECT* aClipBox, wxDC* aDC ) // return true if the point aPosition is inside one of polygons #include -bool WS_DRAW_ITEM_POLYGON::HitTest( const wxPoint& aPosition) +bool WS_DRAW_ITEM_POLYGON::HitTest( const wxPoint& aPosition) const { return TestPointInsidePolygon( &m_Corners[0], m_Corners.size(), aPosition ); @@ -249,7 +249,7 @@ void WS_DRAW_ITEM_RECT::DrawWsItem( EDA_RECT* aClipBox, wxDC* aDC ) } // return true if the point aPosition is on the rect outline -bool WS_DRAW_ITEM_RECT::HitTest( const wxPoint& aPosition) +bool WS_DRAW_ITEM_RECT::HitTest( const wxPoint& aPosition) const { int dist = GetPenWidth()/2; wxPoint start = GetStart(); @@ -316,7 +316,7 @@ void WS_DRAW_ITEM_LINE::DrawWsItem( EDA_RECT* aClipBox, wxDC* aDC ) } // return true if the point aPosition is on the text -bool WS_DRAW_ITEM_LINE::HitTest( const wxPoint& aPosition) +bool WS_DRAW_ITEM_LINE::HitTest( const wxPoint& aPosition) const { return TestSegmentHit( aPosition, GetStart(), GetEnd(), GetPenWidth()/2 ); } @@ -394,9 +394,9 @@ void WS_DRAW_ITEM_BITMAP::DrawWsItem( EDA_RECT* aClipBox, wxDC* aDC ) * Virtual function * return true if the point aPosition is on bitmap */ -bool WS_DRAW_ITEM_BITMAP::HitTest( const wxPoint& aPosition) +bool WS_DRAW_ITEM_BITMAP::HitTest( const wxPoint& aPosition) const { - WORKSHEET_DATAITEM_BITMAP* parent = (WORKSHEET_DATAITEM_BITMAP*)GetParent(); + const WORKSHEET_DATAITEM_BITMAP* parent = static_cast( GetParent() ); if( parent->m_ImageBitmap == NULL ) return false; diff --git a/cvpcb/cvstruct.h b/cvpcb/cvstruct.h index 579aa44dc6..7078a8d8a8 100644 --- a/cvpcb/cvstruct.h +++ b/cvpcb/cvstruct.h @@ -52,7 +52,7 @@ public: int GetSelection(); void OnSize( wxSizeEvent& event ); - virtual CVPCB_MAINFRAME* GetParent(); + virtual CVPCB_MAINFRAME* GetParent() const; }; diff --git a/cvpcb/listboxes.cpp b/cvpcb/listboxes.cpp index d36d921625..bc7f364658 100644 --- a/cvpcb/listboxes.cpp +++ b/cvpcb/listboxes.cpp @@ -79,7 +79,7 @@ int ITEMS_LISTBOX_BASE::GetSelection() } -CVPCB_MAINFRAME* ITEMS_LISTBOX_BASE::GetParent() +CVPCB_MAINFRAME* ITEMS_LISTBOX_BASE::GetParent() const { return (CVPCB_MAINFRAME*) wxListView::GetParent(); } diff --git a/eeschema/class_libentry.h b/eeschema/class_libentry.h index a8c84ade03..a730d9d19b 100644 --- a/eeschema/class_libentry.h +++ b/eeschema/class_libentry.h @@ -654,14 +654,14 @@ public: */ void SetPartCount( int count ); - int GetPartCount() { return m_unitCount; } + int GetPartCount() const { return m_unitCount; } /** * Function IsMulti * @return true if the component has multiple parts per package. * When happens, the reference has a sub reference ti identify part */ - bool IsMulti() { return m_unitCount > 1; } + bool IsMulti() const { return m_unitCount > 1; } /** * Function SubReference diff --git a/eeschema/lib_arc.cpp b/eeschema/lib_arc.cpp index df4fb03f0d..686adbf8c0 100644 --- a/eeschema/lib_arc.cpp +++ b/eeschema/lib_arc.cpp @@ -171,7 +171,7 @@ bool LIB_ARC::Load( LINE_READER& aLineReader, wxString& aErrorMsg ) } -bool LIB_ARC::HitTest( const wxPoint& aRefPoint ) +bool LIB_ARC::HitTest( const wxPoint& aRefPoint ) const { int mindist = GetPenSize() / 2; @@ -183,7 +183,7 @@ bool LIB_ARC::HitTest( const wxPoint& aRefPoint ) } -bool LIB_ARC::HitTest( wxPoint aPosition, int aThreshold, const TRANSFORM& aTransform ) +bool LIB_ARC::HitTest( const wxPoint &aPosition, int aThreshold, const TRANSFORM& aTransform ) const { if( aThreshold < 0 ) diff --git a/eeschema/lib_arc.h b/eeschema/lib_arc.h index 2c017b9c20..74fc633071 100644 --- a/eeschema/lib_arc.h +++ b/eeschema/lib_arc.h @@ -100,9 +100,9 @@ public: bool Load( LINE_READER& aLineReader, wxString& aErrorMsg ); - bool HitTest( const wxPoint& aPosition ); + bool HitTest( const wxPoint& aPosition ) const; - bool HitTest( wxPoint aPosition, int aThreshold, const TRANSFORM& aTransform ); + bool HitTest( const wxPoint& aPosition, int aThreshold, const TRANSFORM& aTransform ) const; const EDA_RECT GetBoundingBox() const; // Virtual diff --git a/eeschema/lib_bezier.cpp b/eeschema/lib_bezier.cpp index b58e11cb6b..3378bb1603 100644 --- a/eeschema/lib_bezier.cpp +++ b/eeschema/lib_bezier.cpp @@ -345,7 +345,7 @@ void LIB_BEZIER::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& } -bool LIB_BEZIER::HitTest( const wxPoint& aRefPos ) +bool LIB_BEZIER::HitTest( const wxPoint& aRefPos ) const { int mindist = GetPenSize() / 2; @@ -357,7 +357,7 @@ bool LIB_BEZIER::HitTest( const wxPoint& aRefPos ) } -bool LIB_BEZIER::HitTest( wxPoint aPosRef, int aThreshold, const TRANSFORM& aTransform ) +bool LIB_BEZIER::HitTest( const wxPoint &aPosRef, int aThreshold, const TRANSFORM& aTransform ) const { wxPoint ref, start, end; diff --git a/eeschema/lib_bezier.h b/eeschema/lib_bezier.h index 00a320b43f..0a1be188f1 100644 --- a/eeschema/lib_bezier.h +++ b/eeschema/lib_bezier.h @@ -72,9 +72,9 @@ public: */ unsigned GetCornerCount() const { return m_PolyPoints.size(); } - bool HitTest( const wxPoint& aPosition ); + bool HitTest( const wxPoint& aPosition ) const; - bool HitTest( wxPoint aPosRef, int aThreshold, const TRANSFORM& aTransform ); + bool HitTest( const wxPoint& aPosRef, int aThreshold, const TRANSFORM& aTransform ) const; const EDA_RECT GetBoundingBox() const; // Virtual diff --git a/eeschema/lib_circle.cpp b/eeschema/lib_circle.cpp index 204db95d5f..6a249ec740 100644 --- a/eeschema/lib_circle.cpp +++ b/eeschema/lib_circle.cpp @@ -87,7 +87,7 @@ bool LIB_CIRCLE::Load( LINE_READER& aLineReader, wxString& aErrorMsg ) } -bool LIB_CIRCLE::HitTest( const wxPoint& aPosRef ) +bool LIB_CIRCLE::HitTest( const wxPoint& aPosRef ) const { int mindist = GetPenSize() / 2; @@ -99,7 +99,7 @@ bool LIB_CIRCLE::HitTest( const wxPoint& aPosRef ) } -bool LIB_CIRCLE::HitTest( wxPoint aPosRef, int aThreshold, const TRANSFORM& aTransform ) +bool LIB_CIRCLE::HitTest( const wxPoint &aPosRef, int aThreshold, const TRANSFORM& aTransform ) const { if( aThreshold < 0 ) aThreshold = GetPenSize() / 2; diff --git a/eeschema/lib_circle.h b/eeschema/lib_circle.h index 49f0f605ac..cbd0b31778 100644 --- a/eeschema/lib_circle.h +++ b/eeschema/lib_circle.h @@ -61,9 +61,9 @@ public: bool Load( LINE_READER& aLineReader, wxString& aErrorMsg ); - bool HitTest( const wxPoint& aPosition ); + bool HitTest( const wxPoint& aPosition ) const; - bool HitTest( wxPoint aPosRef, int aThreshold, const TRANSFORM& aTransform ); + bool HitTest( const wxPoint& aPosRef, int aThreshold, const TRANSFORM& aTransform ) const; int GetPenSize( ) const; diff --git a/eeschema/lib_draw_item.h b/eeschema/lib_draw_item.h index 8efffd827e..10e972eb4a 100644 --- a/eeschema/lib_draw_item.h +++ b/eeschema/lib_draw_item.h @@ -237,12 +237,12 @@ public: virtual bool Load( LINE_READER& aLine, wxString& aErrorMsg ) = 0; - LIB_COMPONENT* GetParent() + LIB_COMPONENT* GetParent() const { return (LIB_COMPONENT *)m_Parent; } - virtual bool HitTest( const wxPoint& aPosition ) + virtual bool HitTest( const wxPoint& aPosition ) const { return EDA_ITEM::HitTest( aPosition ); } @@ -255,7 +255,7 @@ public: * @param aTransform The transform matrix. * @return True if the point \a aPosition is near this object */ - virtual bool HitTest( wxPoint aPosition, int aThreshold, const TRANSFORM& aTransform ) = 0; + virtual bool HitTest( const wxPoint &aPosition, int aThreshold, const TRANSFORM& aTransform ) const = 0; /** * @return the boundary box for this, in library coordinates diff --git a/eeschema/lib_field.cpp b/eeschema/lib_field.cpp index 392daecc8c..36f43f8c0d 100644 --- a/eeschema/lib_field.cpp +++ b/eeschema/lib_field.cpp @@ -320,7 +320,7 @@ void LIB_FIELD::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& a } -bool LIB_FIELD::HitTest( const wxPoint& aPosition ) +bool LIB_FIELD::HitTest( const wxPoint& aPosition ) const { // Because HitTest is mainly used to select the field // return always false if this field is void @@ -331,49 +331,37 @@ bool LIB_FIELD::HitTest( const wxPoint& aPosition ) } -bool LIB_FIELD::HitTest( wxPoint aPosition, int aThreshold, const TRANSFORM& aTransform ) +bool LIB_FIELD::HitTest( const wxPoint &aPosition, int aThreshold, const TRANSFORM& aTransform ) const { if( aThreshold < 0 ) aThreshold = 0; - int extraCharCount = 0; + // Build a temporary copy of the text for hit testing + EDA_TEXT tmp_text( *this ); // Reference designator text has one or 2 additional character (displays // U? or U?A) if( m_id == REFERENCE ) { - extraCharCount++; - m_Text.Append('?'); - LIB_COMPONENT* parent = (LIB_COMPONENT*)m_Parent; + wxString extended_text = tmp_text.GetText(); + extended_text.Append('?'); + const LIB_COMPONENT* parent = static_cast( m_Parent ); if ( parent && ( parent->GetPartCount() > 1 ) ) - { - m_Text.Append('A'); - extraCharCount++; - } + extended_text.Append('A'); + tmp_text.SetText( extended_text ); } - wxPoint physicalpos = aTransform.TransformCoordinate( m_Pos ); - wxPoint tmp = m_Pos; - m_Pos = physicalpos; + tmp_text.SetTextPosition( aTransform.TransformCoordinate( m_Pos ) ); /* The text orientation may need to be flipped if the * transformation matrix causes xy axes to be flipped. * this simple algo works only for schematic matrix (rot 90 or/and mirror) */ int t1 = ( aTransform.x1 != 0 ) ^ ( m_Orient != 0 ); - int orient = t1 ? TEXT_ORIENT_HORIZ : TEXT_ORIENT_VERT; - EXCHG( m_Orient, orient ); + tmp_text.SetOrientation( t1 ? TEXT_ORIENT_HORIZ : TEXT_ORIENT_VERT ); - bool hit = TextHitTest( aPosition ); - - EXCHG( m_Orient, orient ); - m_Pos = tmp; - - while( extraCharCount-- ) - m_Text.RemoveLast( ); - - return hit; + return tmp_text.TextHitTest( aPosition ); } diff --git a/eeschema/lib_field.h b/eeschema/lib_field.h index 1e475fa913..49e36d8be5 100644 --- a/eeschema/lib_field.h +++ b/eeschema/lib_field.h @@ -151,7 +151,7 @@ public: * Function IsVoid * @return true if the field value is void (no text in this field) */ - bool IsVoid() + bool IsVoid() const { return m_Text.IsEmpty(); } @@ -169,9 +169,9 @@ public: void GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ); - bool HitTest( const wxPoint& aPosition ); + bool HitTest( const wxPoint& aPosition ) const; - bool HitTest( wxPoint aPosition, int aThreshold, const TRANSFORM& aTransform ); + bool HitTest( const wxPoint &aPosition, int aThreshold, const TRANSFORM& aTransform ) const; void operator=( const LIB_FIELD& field ) { diff --git a/eeschema/lib_pin.cpp b/eeschema/lib_pin.cpp index e4f16b3a8f..29c4aee929 100644 --- a/eeschema/lib_pin.cpp +++ b/eeschema/lib_pin.cpp @@ -525,13 +525,13 @@ void LIB_PIN::EnableEditMode( bool enable, bool editPinByPin ) } -bool LIB_PIN::HitTest( const wxPoint& aPosition ) +bool LIB_PIN::HitTest( const wxPoint& aPosition ) const { return HitTest( aPosition, 0, DefaultTransform ); } -bool LIB_PIN::HitTest( wxPoint aPosition, int aThreshold, const TRANSFORM& aTransform ) +bool LIB_PIN::HitTest( const wxPoint &aPosition, int aThreshold, const TRANSFORM& aTransform ) const { if( aThreshold < 0 ) aThreshold = 0; diff --git a/eeschema/lib_pin.h b/eeschema/lib_pin.h index bf4c504776..dd85740de6 100644 --- a/eeschema/lib_pin.h +++ b/eeschema/lib_pin.h @@ -131,9 +131,9 @@ public: bool Load( LINE_READER& aLineReader, wxString& aErrorMsg ); - bool HitTest( const wxPoint& aPosition ); + bool HitTest( const wxPoint& aPosition ) const; - bool HitTest( wxPoint aPosRef, int aThreshold, const TRANSFORM& aTransform ); + bool HitTest( const wxPoint &aPosRef, int aThreshold, const TRANSFORM& aTransform ) const; void GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ); diff --git a/eeschema/lib_polyline.cpp b/eeschema/lib_polyline.cpp index 5b4b1ba49c..75eae61c71 100644 --- a/eeschema/lib_polyline.cpp +++ b/eeschema/lib_polyline.cpp @@ -321,7 +321,7 @@ void LIB_POLYLINE::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint } -bool LIB_POLYLINE::HitTest( const wxPoint& aPosition ) +bool LIB_POLYLINE::HitTest( const wxPoint& aPosition ) const { int mindist = GetPenSize() / 2; @@ -333,7 +333,7 @@ bool LIB_POLYLINE::HitTest( const wxPoint& aPosition ) } -bool LIB_POLYLINE::HitTest( wxPoint aPosition, int aThreshold, const TRANSFORM& aTransform ) +bool LIB_POLYLINE::HitTest( const wxPoint &aPosition, int aThreshold, const TRANSFORM& aTransform ) const { wxPoint ref, start, end; diff --git a/eeschema/lib_polyline.h b/eeschema/lib_polyline.h index 81a4d8a08e..78a3891613 100644 --- a/eeschema/lib_polyline.h +++ b/eeschema/lib_polyline.h @@ -74,9 +74,9 @@ public: */ unsigned GetCornerCount() const { return m_PolyPoints.size(); } - bool HitTest( const wxPoint& aPosition ); + bool HitTest( const wxPoint& aPosition ) const; - bool HitTest( wxPoint aPosition, int aThreshold, const TRANSFORM& aTransform ); + bool HitTest( const wxPoint &aPosition, int aThreshold, const TRANSFORM& aTransform ) const; const EDA_RECT GetBoundingBox() const; // Virtual diff --git a/eeschema/lib_rectangle.cpp b/eeschema/lib_rectangle.cpp index 7efdb3dbf1..057b049eb1 100644 --- a/eeschema/lib_rectangle.cpp +++ b/eeschema/lib_rectangle.cpp @@ -267,7 +267,7 @@ const EDA_RECT LIB_RECTANGLE::GetBoundingBox() const } -bool LIB_RECTANGLE::HitTest( const wxPoint& aPosition ) +bool LIB_RECTANGLE::HitTest( const wxPoint& aPosition ) const { int mindist = ( GetPenSize() / 2 ) + 1; @@ -279,7 +279,7 @@ bool LIB_RECTANGLE::HitTest( const wxPoint& aPosition ) } -bool LIB_RECTANGLE::HitTest( wxPoint aPosition, int aThreshold, const TRANSFORM& aTransform ) +bool LIB_RECTANGLE::HitTest( const wxPoint &aPosition, int aThreshold, const TRANSFORM& aTransform ) const { if( aThreshold < 0 ) aThreshold = GetPenSize() / 2; diff --git a/eeschema/lib_rectangle.h b/eeschema/lib_rectangle.h index 739f20b60e..63e182691d 100644 --- a/eeschema/lib_rectangle.h +++ b/eeschema/lib_rectangle.h @@ -65,9 +65,9 @@ public: bool Load( LINE_READER& aLineReader, wxString& aErrorMsg ); - bool HitTest( const wxPoint& aPosition ); + bool HitTest( const wxPoint& aPosition ) const; - bool HitTest( wxPoint aPosRef, int aThreshold, const TRANSFORM& aTransform ); + bool HitTest( const wxPoint &aPosRef, int aThreshold, const TRANSFORM& aTransform ) const; int GetPenSize( ) const; diff --git a/eeschema/lib_text.cpp b/eeschema/lib_text.cpp index d52acdda97..1b51b0f4e9 100644 --- a/eeschema/lib_text.cpp +++ b/eeschema/lib_text.cpp @@ -185,32 +185,27 @@ bool LIB_TEXT::Load( LINE_READER& aLineReader, wxString& errorMsg ) } -bool LIB_TEXT::HitTest( const wxPoint& aPosition ) +bool LIB_TEXT::HitTest( const wxPoint& aPosition ) const { return HitTest( aPosition, 0, DefaultTransform ); } -bool LIB_TEXT::HitTest( wxPoint aPosition, int aThreshold, const TRANSFORM& aTransform ) +bool LIB_TEXT::HitTest( const wxPoint &aPosition, int aThreshold, const TRANSFORM& aTransform ) const { if( aThreshold < 0 ) aThreshold = 0; - wxPoint physicalpos = aTransform.TransformCoordinate( m_Pos ); - wxPoint tmp = m_Pos; - m_Pos = physicalpos; + EDA_TEXT tmp_text( *this ); + tmp_text.SetTextPosition( aTransform.TransformCoordinate( m_Pos ) ); /* The text orientation may need to be flipped if the * transformation matrix causes xy axes to be flipped. * this simple algo works only for schematic matrix (rot 90 or/and mirror) */ int t1 = ( aTransform.x1 != 0 ) ^ ( m_Orient != 0 ); - int orient = t1 ? TEXT_ORIENT_HORIZ : TEXT_ORIENT_VERT; - EXCHG( m_Orient, orient ); - bool hit = TextHitTest( aPosition ); - EXCHG( m_Orient, orient ); - m_Pos = tmp; - return hit; + tmp_text.SetOrientation( t1 ? TEXT_ORIENT_HORIZ : TEXT_ORIENT_VERT ); + return tmp_text.TextHitTest( aPosition ); } diff --git a/eeschema/lib_text.h b/eeschema/lib_text.h index 3db14c11a8..8353869226 100644 --- a/eeschema/lib_text.h +++ b/eeschema/lib_text.h @@ -82,11 +82,11 @@ public: bool Load( LINE_READER& aLineReader, wxString& aErrorMsg ); - bool HitTest( const wxPoint& aPosition ); + bool HitTest( const wxPoint& aPosition ) const; - bool HitTest( wxPoint aPosition, int aThreshold, const TRANSFORM& aTransform ); + bool HitTest( const wxPoint &aPosition, int aThreshold, const TRANSFORM& aTransform ) const; - bool HitTest( EDA_RECT& aRect ) + bool HitTest( const EDA_RECT& aRect ) const { return TextHitTest( aRect ); } diff --git a/eeschema/sch_collectors.h b/eeschema/sch_collectors.h index 299ea9ec62..4813253919 100644 --- a/eeschema/sch_collectors.h +++ b/eeschema/sch_collectors.h @@ -210,7 +210,7 @@ public: wxString GetSheetPath() const { return m_sheetPath; } - SCH_ITEM* GetParent() { return m_parent; } + SCH_ITEM* GetParent() const { return m_parent; } }; diff --git a/gerbview/class_GERBER.h b/gerbview/class_GERBER.h index 632ac6487c..c975bf0233 100644 --- a/gerbview/class_GERBER.h +++ b/gerbview/class_GERBER.h @@ -148,7 +148,7 @@ public: * Function GetParent * @return the GERBVIEW_FRAME parent of this GERBER_IMAGE */ - GERBVIEW_FRAME* GetParent() + GERBVIEW_FRAME* GetParent() const { return m_Parent; } diff --git a/gerbview/class_gerber_draw_item.cpp b/gerbview/class_gerber_draw_item.cpp index c73d8972da..f01f3d5d55 100644 --- a/gerbview/class_gerber_draw_item.cpp +++ b/gerbview/class_gerber_draw_item.cpp @@ -131,7 +131,7 @@ wxPoint GERBER_DRAW_ITEM::GetABPosition( const wxPoint& aXYPosition ) const } -wxPoint GERBER_DRAW_ITEM::GetXYPosition( const wxPoint& aABPosition ) +wxPoint GERBER_DRAW_ITEM::GetXYPosition( const wxPoint& aABPosition ) const { // do the inverse transform made by GetABPosition wxPoint xyPos = aABPosition; @@ -577,7 +577,7 @@ void GERBER_DRAW_ITEM::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) } -bool GERBER_DRAW_ITEM::HitTest( const wxPoint& aRefPos ) +bool GERBER_DRAW_ITEM::HitTest( const wxPoint& aRefPos ) const { // calculate aRefPos in XY gerber axis: wxPoint ref_pos = GetXYPosition( aRefPos ); @@ -592,7 +592,7 @@ bool GERBER_DRAW_ITEM::HitTest( const wxPoint& aRefPos ) } -bool GERBER_DRAW_ITEM::HitTest( EDA_RECT& aRefArea ) +bool GERBER_DRAW_ITEM::HitTest( const EDA_RECT& aRefArea ) const { wxPoint pos = GetABPosition( m_Start ); diff --git a/gerbview/class_gerber_draw_item.h b/gerbview/class_gerber_draw_item.h index 70ad0a1164..c7a0b695cc 100644 --- a/gerbview/class_gerber_draw_item.h +++ b/gerbview/class_gerber_draw_item.h @@ -209,7 +209,7 @@ public: * @param aABPosition = position in A,B plotter axis * @return const wxPoint - The given position in X,Y axis. */ - wxPoint GetXYPosition( const wxPoint& aABPosition ); + wxPoint GetXYPosition( const wxPoint& aABPosition ) const; /** * Function GetDcodeDescr @@ -255,7 +255,7 @@ public: * @param aRefPos a wxPoint to test * @return bool - true if a hit, else false */ - bool HitTest( const wxPoint& aRefPos ); + bool HitTest( const wxPoint& aRefPos ) const; /** * Function HitTest (overloaded) @@ -264,7 +264,7 @@ public: * @param aRefArea a wxPoint to test * @return bool - true if a hit, else false */ - bool HitTest( EDA_RECT& aRefArea ); + bool HitTest( const EDA_RECT& aRefArea ) const; /** * Function GetClass diff --git a/include/base_struct.h b/include/base_struct.h index 9ec7af03c8..38e320ef38 100644 --- a/include/base_struct.h +++ b/include/base_struct.h @@ -456,14 +456,10 @@ public: * Function HitTest * tests if \a aPosition is contained within or on the bounding area of an item. * - * @note This function cannot be const because some of the derive objects perform - * intermediate calculations which change object members. Make sure derived - * objects do not declare this as const. - * * @param aPosition A reference to a wxPoint object containing the coordinates to test. * @return True if \a aPosition is within or on the item bounding area. */ - virtual bool HitTest( const wxPoint& aPosition ) + virtual bool HitTest( const wxPoint& aPosition ) const { return false; // derived classes should override this function } diff --git a/include/class_board_item.h b/include/class_board_item.h index 26a30af896..91fd3ead0c 100644 --- a/include/class_board_item.h +++ b/include/class_board_item.h @@ -254,7 +254,7 @@ public: */ wxString GetLayerName() const; - virtual bool HitTest( const wxPoint& aPosition ) + virtual bool HitTest( const wxPoint& aPosition ) const { return EDA_ITEM::HitTest( aPosition ); } diff --git a/include/class_drawpanel.h b/include/class_drawpanel.h index 3a9c3735b7..d3e69371b3 100644 --- a/include/class_drawpanel.h +++ b/include/class_drawpanel.h @@ -123,7 +123,7 @@ public: BASE_SCREEN* GetScreen(); - EDA_DRAW_FRAME* GetParent(); + EDA_DRAW_FRAME* GetParent() const; void OnPaint( wxPaintEvent& event ); diff --git a/include/sch_item_struct.h b/include/sch_item_struct.h index 5fe90cd69f..6a3d4913ba 100644 --- a/include/sch_item_struct.h +++ b/include/sch_item_struct.h @@ -291,7 +291,10 @@ public: bool IsConnected( const wxPoint& aPoint ) const; /** @copydoc EDA_ITEM::HitTest(const wxPoint&) */ - virtual bool HitTest( const wxPoint& aPosition ) { return HitTest( aPosition, 0 ); } + virtual bool HitTest( const wxPoint& aPosition ) const + { + return HitTest( aPosition, 0 ); + } /** * Function HitTest diff --git a/include/worksheet_shape_builder.h b/include/worksheet_shape_builder.h index de0bb5aa57..718213c9b7 100644 --- a/include/worksheet_shape_builder.h +++ b/include/worksheet_shape_builder.h @@ -59,7 +59,7 @@ public: EDA_COLOR_T GetColor() const { return m_color; } WS_DRAW_TYPE GetType() const { return m_type; }; - WORKSHEET_DATAITEM* GetParent() { return m_parent; } + WORKSHEET_DATAITEM* GetParent() const { return m_parent; } /** The function to draw a WS_DRAW_ITEM */ @@ -69,7 +69,7 @@ public: * Abstract function: should exist for derived items * return true if the point aPosition is on the item */ - virtual bool HitTest( const wxPoint& aPosition) = 0; + virtual bool HitTest( const wxPoint& aPosition) const = 0; /** * Abstract function: should exist for derived items @@ -124,7 +124,7 @@ public: * Virtual function * return true if the point aPosition is on the line */ - virtual bool HitTest( const wxPoint& aPosition); + virtual bool HitTest( const wxPoint& aPosition) const; /** * return true if the point aPosition is on the starting point of this item. @@ -174,7 +174,7 @@ public: * Virtual function * return true if the point aPosition is inside one polygon */ - virtual bool HitTest( const wxPoint& aPosition); + virtual bool HitTest( const wxPoint& aPosition) const; /** * return true if the point aPosition is on the starting point of this item. @@ -202,7 +202,7 @@ public: * Virtual function * return true if the point aPosition is on one edge of the rectangle */ - virtual bool HitTest( const wxPoint& aPosition); + virtual bool HitTest( const wxPoint& aPosition) const; /** * return true if the point aPosition is on the starting point of this item. @@ -239,7 +239,7 @@ public: * Virtual function * return true if the point aPosition is on the text */ - virtual bool HitTest( const wxPoint& aPosition); + virtual bool HitTest( const wxPoint& aPosition) const; /** * return true if the point aPosition is on the starting point of this item. @@ -274,7 +274,7 @@ public: * Virtual function * return true if the point aPosition is on bitmap */ - virtual bool HitTest( const wxPoint& aPosition); + virtual bool HitTest( const wxPoint& aPosition) const; /** * return true if the point aPosition is on the reference point of this item. diff --git a/kicad/class_treeprojectfiles.h b/kicad/class_treeprojectfiles.h index b671a02e0f..6d592d4696 100644 --- a/kicad/class_treeprojectfiles.h +++ b/kicad/class_treeprojectfiles.h @@ -17,7 +17,7 @@ private: public: - TREE_PROJECT_FRAME* GetParent() + TREE_PROJECT_FRAME* GetParent() const { return m_Parent; } diff --git a/pcbnew/class_dimension.cpp b/pcbnew/class_dimension.cpp index e49ca7e5dd..59ff184ddc 100644 --- a/pcbnew/class_dimension.cpp +++ b/pcbnew/class_dimension.cpp @@ -396,7 +396,7 @@ void DIMENSION::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) } -bool DIMENSION::HitTest( const wxPoint& aPosition ) +bool DIMENSION::HitTest( const wxPoint& aPosition ) const { if( m_Text.TextHitTest( aPosition ) ) return true; diff --git a/pcbnew/class_dimension.h b/pcbnew/class_dimension.h index 1ea29bd8dc..d68fc7770d 100644 --- a/pcbnew/class_dimension.h +++ b/pcbnew/class_dimension.h @@ -127,7 +127,7 @@ public: void GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ); - bool HitTest( const wxPoint& aPosition ); + bool HitTest( const wxPoint& aPosition ) const; /** @copydoc BOARD_ITEM::HitTest(const EDA_RECT& aRect, * bool aContained = true, int aAccuracy ) const diff --git a/pcbnew/class_drawsegment.cpp b/pcbnew/class_drawsegment.cpp index d1e9799258..2c976e90ee 100644 --- a/pcbnew/class_drawsegment.cpp +++ b/pcbnew/class_drawsegment.cpp @@ -475,7 +475,7 @@ const EDA_RECT DRAWSEGMENT::GetBoundingBox() const } -bool DRAWSEGMENT::HitTest( const wxPoint& aPosition ) +bool DRAWSEGMENT::HitTest( const wxPoint& aPosition ) const { switch( m_Shape ) { diff --git a/pcbnew/class_drawsegment.h b/pcbnew/class_drawsegment.h index 64ce5dcb8c..3cae1d9dcf 100644 --- a/pcbnew/class_drawsegment.h +++ b/pcbnew/class_drawsegment.h @@ -178,7 +178,7 @@ public: virtual const EDA_RECT GetBoundingBox() const; - virtual bool HitTest( const wxPoint& aPosition ); + virtual bool HitTest( const wxPoint& aPosition ) const; /** @copydoc BOARD_ITEM::HitTest(const EDA_RECT& aRect, * bool aContained = true, int aAccuracy ) const diff --git a/pcbnew/class_marker_pcb.h b/pcbnew/class_marker_pcb.h index 7728b152c0..5e794a743c 100644 --- a/pcbnew/class_marker_pcb.h +++ b/pcbnew/class_marker_pcb.h @@ -64,7 +64,7 @@ public: const wxPoint& GetPosition() const { return m_Pos; } void SetPosition( const wxPoint& aPos ) { m_Pos = aPos; } - bool HitTest( const wxPoint& aPosition ) + bool HitTest( const wxPoint& aPosition ) const { return HitTestMarker( aPosition ); } diff --git a/pcbnew/class_mire.cpp b/pcbnew/class_mire.cpp index d2fb096755..3abeaf95d0 100644 --- a/pcbnew/class_mire.cpp +++ b/pcbnew/class_mire.cpp @@ -158,7 +158,7 @@ void PCB_TARGET::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE mode_color, } -bool PCB_TARGET::HitTest( const wxPoint& aPosition ) +bool PCB_TARGET::HitTest( const wxPoint& aPosition ) const { int dX = aPosition.x - m_Pos.x; int dY = aPosition.y - m_Pos.y; diff --git a/pcbnew/class_mire.h b/pcbnew/class_mire.h index 0a7186b6b1..9f12ac7d73 100644 --- a/pcbnew/class_mire.h +++ b/pcbnew/class_mire.h @@ -82,7 +82,7 @@ public: void Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE aDrawMode, const wxPoint& offset = ZeroOffset ); - bool HitTest( const wxPoint& aPosition ); + bool HitTest( const wxPoint& aPosition ) const; /** @copydoc BOARD_ITEM::HitTest(const EDA_RECT& aRect, * bool aContained = true, int aAccuracy ) const diff --git a/pcbnew/class_module.cpp b/pcbnew/class_module.cpp index ca343a6333..257f34bd6e 100644 --- a/pcbnew/class_module.cpp +++ b/pcbnew/class_module.cpp @@ -549,7 +549,7 @@ void MODULE::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) } -bool MODULE::HitTest( const wxPoint& aPosition ) +bool MODULE::HitTest( const wxPoint& aPosition ) const { if( m_BoundaryBox.Contains( aPosition ) ) return true; diff --git a/pcbnew/class_module.h b/pcbnew/class_module.h index 189abfe6be..3b378c30a6 100644 --- a/pcbnew/class_module.h +++ b/pcbnew/class_module.h @@ -324,7 +324,7 @@ public: void GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ); - bool HitTest( const wxPoint& aPosition ); + bool HitTest( const wxPoint& aPosition ) const; /** @copydoc BOARD_ITEM::HitTest(const EDA_RECT& aRect, * bool aContained = true, int aAccuracy ) const diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index 43b2b17f04..f4a1282ed7 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -637,7 +637,7 @@ bool D_PAD::IsOnLayer( LAYER_NUM aLayer ) const } -bool D_PAD::HitTest( const wxPoint& aPosition ) +bool D_PAD::HitTest( const wxPoint& aPosition ) const { int dx, dy; diff --git a/pcbnew/class_pad.h b/pcbnew/class_pad.h index 3cbdcbe82a..41ac5c3913 100644 --- a/pcbnew/class_pad.h +++ b/pcbnew/class_pad.h @@ -341,7 +341,7 @@ public: * Function GetBoundingRadius * returns the radius of a minimum sized circle which fully encloses this pad. */ - int GetBoundingRadius() + int GetBoundingRadius() const { // Any member function which would affect this calculation should set // m_boundingRadius to -1 to re-trigger the calculation from here. @@ -368,7 +368,7 @@ public: bool IsOnLayer( LAYER_NUM aLayer ) const; - bool HitTest( const wxPoint& aPosition ); + bool HitTest( const wxPoint& aPosition ) const; wxString GetClass() const { @@ -450,7 +450,8 @@ private: */ int boundingRadius() const; - int m_boundingRadius; ///< radius of the circle containing the pad shape + // Actually computed and cached on demand by the accessor + mutable int m_boundingRadius; ///< radius of the circle containing the pad shape /// Pad name (4 char) or a long identifier (used in pad name /// comparisons because this is faster than string comparison) diff --git a/pcbnew/class_pcb_text.h b/pcbnew/class_pcb_text.h index 0ebd4119bf..7a6d853704 100644 --- a/pcbnew/class_pcb_text.h +++ b/pcbnew/class_pcb_text.h @@ -76,7 +76,7 @@ public: void GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ); - bool HitTest( const wxPoint& aPosition ) + bool HitTest( const wxPoint& aPosition ) const { return TextHitTest( aPosition ); } diff --git a/pcbnew/class_text_mod.cpp b/pcbnew/class_text_mod.cpp index e5e7a2d2be..b103869775 100644 --- a/pcbnew/class_text_mod.cpp +++ b/pcbnew/class_text_mod.cpp @@ -163,7 +163,7 @@ void TEXTE_MODULE::SetLocalCoord() RotatePoint( &m_Pos0.x, &m_Pos0.y, -angle ); } -bool TEXTE_MODULE::HitTest( const wxPoint& aPosition ) +bool TEXTE_MODULE::HitTest( const wxPoint& aPosition ) const { wxPoint rel_pos; EDA_RECT area = GetTextBox( -1, -1 ); @@ -455,6 +455,9 @@ void TEXTE_MODULE::ViewGetLayers( int aLayers[], int& aCount ) const case LAYER_N_FRONT: aLayers[0] = ITEM_GAL_LAYER( MOD_TEXT_FR_VISIBLE ); // how about SILKSCREEN_N_FRONT? break; + + default: + wxFAIL_MSG( wxT( "Can't tell text layer" ) ); } break; } diff --git a/pcbnew/class_text_mod.h b/pcbnew/class_text_mod.h index bc207e7254..7ab96e516b 100644 --- a/pcbnew/class_text_mod.h +++ b/pcbnew/class_text_mod.h @@ -148,7 +148,7 @@ public: void GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ); - bool HitTest( const wxPoint& aPosition ); + bool HitTest( const wxPoint& aPosition ) const; wxString GetClass() const { diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index 2dd626a5c8..7a40e066fb 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -1236,7 +1236,7 @@ bool TRACK::HitTest( const wxPoint& aPosition ) return TestSegmentHit( aPosition, m_Start, m_End, m_Width / 2 ); } -bool VIA::HitTest( const wxPoint& aPosition ) +bool VIA::HitTest( const wxPoint& aPosition ) const { int max_dist = m_Width / 2; diff --git a/pcbnew/class_track.h b/pcbnew/class_track.h index 9afc346788..4340c33e6d 100644 --- a/pcbnew/class_track.h +++ b/pcbnew/class_track.h @@ -401,7 +401,7 @@ public: const wxPoint& GetPosition() const { return m_Start; } // was overload void SetPosition( const wxPoint& aPoint ) { m_Start = aPoint; m_End = aPoint; } // was overload - virtual bool HitTest( const wxPoint& aPosition ); + virtual bool HitTest( const wxPoint& aPosition ) const; virtual bool HitTest( const EDA_RECT& aRect, bool aContained = true, int aAccuracy = 0 ) const; diff --git a/pcbnew/class_zone.cpp b/pcbnew/class_zone.cpp index 6679fee49a..a6b360f98a 100644 --- a/pcbnew/class_zone.cpp +++ b/pcbnew/class_zone.cpp @@ -440,37 +440,42 @@ int ZONE_CONTAINER::GetThermalReliefCopperBridge( D_PAD* aPad ) const } -bool ZONE_CONTAINER::HitTest( const wxPoint& aPosition ) +bool ZONE_CONTAINER::HitTest( const wxPoint& aPosition ) const { - if( HitTestForCorner( aPosition ) ) + if( HitTestForCorner( aPosition ) >= 0 ) return true; - if( HitTestForEdge( aPosition ) ) + if( HitTestForEdge( aPosition ) >= 0 ) return true; return false; } +void ZONE_CONTAINER::SetSelectedCorner( const wxPoint& aPosition ) +{ + m_CornerSelection = HitTestForCorner( aPosition ); + + if( m_CornerSelection < 0 ) + m_CornerSelection = HitTestForEdge( aPosition ); +} + + // Zones outlines have no thickness, so it Hit Test functions // we must have a default distance between the test point // and a corner or a zone edge: #define MAX_DIST_IN_MM 0.25 -bool ZONE_CONTAINER::HitTestForCorner( const wxPoint& refPos ) +int ZONE_CONTAINER::HitTestForCorner( const wxPoint& refPos ) const { int distmax = Millimeter2iu( MAX_DIST_IN_MM ); - m_CornerSelection = m_Poly->HitTestForCorner( refPos, distmax ); - - return m_CornerSelection >= 0; + return m_Poly->HitTestForCorner( refPos, distmax ); } -bool ZONE_CONTAINER::HitTestForEdge( const wxPoint& refPos ) +int ZONE_CONTAINER::HitTestForEdge( const wxPoint& refPos ) const { int distmax = Millimeter2iu( MAX_DIST_IN_MM ); - m_CornerSelection = m_Poly->HitTestForEdge( refPos, distmax ); - - return m_CornerSelection >= 0; + return m_Poly->HitTestForEdge( refPos, distmax ); } @@ -700,25 +705,23 @@ void ZONE_CONTAINER::Move( const wxPoint& offset ) } -void ZONE_CONTAINER::MoveEdge( const wxPoint& offset ) +void ZONE_CONTAINER::MoveEdge( const wxPoint& offset, int aEdge ) { - int ii = m_CornerSelection; - // Move the start point of the selected edge: - SetCornerPosition( ii, GetCornerPosition( ii ) + offset ); + SetCornerPosition( aEdge, GetCornerPosition( aEdge ) + offset ); // Move the end point of the selected edge: - if( m_Poly->m_CornersList.IsEndContour( ii ) || ii == GetNumCorners() - 1 ) + if( m_Poly->m_CornersList.IsEndContour( aEdge ) || aEdge == GetNumCorners() - 1 ) { - int icont = m_Poly->GetContour( ii ); - ii = m_Poly->GetContourStart( icont ); + int icont = m_Poly->GetContour( aEdge ); + aEdge = m_Poly->GetContourStart( icont ); } else { - ii++; + aEdge++; } - SetCornerPosition( ii, GetCornerPosition( ii ) + offset ); + SetCornerPosition( aEdge, GetCornerPosition( aEdge ) + offset ); m_Poly->Hatch(); } diff --git a/pcbnew/class_zone.h b/pcbnew/class_zone.h index 6423d85396..2642937d06 100644 --- a/pcbnew/class_zone.h +++ b/pcbnew/class_zone.h @@ -217,6 +217,10 @@ public: int GetSelectedCorner() const { return m_CornerSelection; } void SetSelectedCorner( int aCorner ) { m_CornerSelection = aCorner; } + /// + // Like HitTest but selects the current corner to be operated on + void SetSelectedCorner( const wxPoint& aPosition ); + int GetLocalFlags() const { return m_localFlgs; } void SetLocalFlags( int aFlags ) { m_localFlgs = aFlags; } @@ -234,7 +238,7 @@ public: * @param aRefPos A wxPoint to test * @return bool - true if a hit, else false */ - virtual bool HitTest( const wxPoint& aPosition ); + virtual bool HitTest( const wxPoint& aPosition ) const; /** * Function HitTest @@ -342,7 +346,7 @@ public: * @return true if found * @param refPos : A wxPoint to test */ - bool HitTestForCorner( const wxPoint& refPos ); + int HitTestForCorner( const wxPoint& refPos ) const; /** * Function HitTestForEdge @@ -351,7 +355,7 @@ public: * @return true if found * @param refPos : A wxPoint to test */ - bool HitTestForEdge( const wxPoint& refPos ); + int HitTestForEdge( const wxPoint& refPos ) const; /** @copydoc BOARD_ITEM::HitTest(const EDA_RECT& aRect, * bool aContained = true, int aAccuracy ) const @@ -400,10 +404,11 @@ public: /** * Function MoveEdge - * Move the outline Edge. m_CornerSelection is the start point of the outline edge + * Move the outline Edge * @param offset = moving vector + * @param aEdge = start point of the outline edge */ - void MoveEdge( const wxPoint& offset ); + void MoveEdge( const wxPoint& offset, int aEdge ); /** * Function Rotate diff --git a/pcbnew/controle.cpp b/pcbnew/controle.cpp index d6f8a79583..06f07af712 100644 --- a/pcbnew/controle.cpp +++ b/pcbnew/controle.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -160,8 +161,9 @@ BOARD_ITEM* PCB_BASE_FRAME::PcbGeneralLocateAndDisplay( int aHotKeyCode ) (*m_Collector)[i]->Show( 0, std::cout ); #endif - /* Remove redundancies: sometime, zones are found twice, + /* Remove redundancies: sometime, legacy zones are found twice, * because zones can be filled by overlapping segments (this is a fill option) + * Trigger the selection of the current edge for new-style zones */ time_t timestampzone = 0; @@ -169,18 +171,32 @@ BOARD_ITEM* PCB_BASE_FRAME::PcbGeneralLocateAndDisplay( int aHotKeyCode ) { item = (*m_Collector)[ii]; - if( item->Type() != PCB_ZONE_T ) - continue; + switch( item->Type() ) + { + case PCB_ZONE_T: + // Found a TYPE ZONE + if( item->GetTimeStamp() == timestampzone ) // Remove it, redundant, zone already found + { + m_Collector->Remove( ii ); + ii--; + } + else + { + timestampzone = item->GetTimeStamp(); + } + break; - // Found a TYPE ZONE - if( item->GetTimeStamp() == timestampzone ) // Remove it, redundant, zone already found - { - m_Collector->Remove( ii ); - ii--; - } - else - { - timestampzone = item->GetTimeStamp(); + case PCB_ZONE_AREA_T: + { + /* We need to do the selection now because the menu text + * depends on it */ + ZONE_CONTAINER *zone = static_cast( item ); + zone->SetSelectedCorner( RefPos( true ) ); + } + break; + + default: + break; } } diff --git a/pcbnew/dialogs/dialog_general_options.h b/pcbnew/dialogs/dialog_general_options.h index 7cdefdbe2e..89abaa7b1b 100644 --- a/pcbnew/dialogs/dialog_general_options.h +++ b/pcbnew/dialogs/dialog_general_options.h @@ -16,7 +16,7 @@ public: void OnOkClick( wxCommandEvent& event ); void OnCancelClick( wxCommandEvent& event ); - PCB_EDIT_FRAME* GetParent() { return (PCB_EDIT_FRAME*) wxDialog::GetParent(); } + PCB_EDIT_FRAME* GetParent() const { return (PCB_EDIT_FRAME*) wxDialog::GetParent(); } private: void OnMiddleBtnPanEnbl( wxCommandEvent& event ) diff --git a/pcbnew/eagle_plugin.cpp b/pcbnew/eagle_plugin.cpp index a78007761b..4f93574ab2 100644 --- a/pcbnew/eagle_plugin.cpp +++ b/pcbnew/eagle_plugin.cpp @@ -2234,6 +2234,8 @@ void EAGLE_PLUGIN::packageCircle( MODULE* aModule, CPTREE& aTree ) const case ECO1_N: layer = SILKSCREEN_N_FRONT; break; case ECO2_N: layer = SILKSCREEN_N_BACK; break; */ + default: + break; } gr->SetLayer( layer ); diff --git a/pcbnew/onrightclick.cpp b/pcbnew/onrightclick.cpp index c66adc4c64..372538c1b1 100644 --- a/pcbnew/onrightclick.cpp +++ b/pcbnew/onrightclick.cpp @@ -661,14 +661,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( RefPos( true ) ) ) + if( edge_zone->HitTestForCorner( RefPos( true ) ) >= 0 ) { 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( RefPos( true ) ) ) + else if( edge_zone->HitTestForEdge( RefPos( true ) ) >= 0 ) { AddMenuItem( zones_menu, ID_POPUP_PCB_ADD_ZONE_CORNER, _( "Create Corner" ), KiBitmap( add_corner_xpm ) ); diff --git a/pcbnew/router/pns_node.cpp b/pcbnew/router/pns_node.cpp index e2349c4800..825be77e57 100644 --- a/pcbnew/router/pns_node.cpp +++ b/pcbnew/router/pns_node.cpp @@ -401,9 +401,9 @@ struct hitVisitor { PNS_ITEMSET& m_items; const VECTOR2I& m_point; - PNS_NODE* m_world; + const PNS_NODE* m_world; - hitVisitor( PNS_ITEMSET& aTab, const VECTOR2I& aPoint, PNS_NODE* aWorld ) : + hitVisitor( PNS_ITEMSET& aTab, const VECTOR2I& aPoint, const PNS_NODE* aWorld ) : m_items( aTab ), m_point( aPoint ), m_world( aWorld ) {}; bool operator()( PNS_ITEM* aItem ) @@ -423,7 +423,7 @@ struct hitVisitor }; -const PNS_ITEMSET PNS_NODE::HitTest( const VECTOR2I& aPoint ) +const PNS_ITEMSET PNS_NODE::HitTest( const VECTOR2I& aPoint ) const { PNS_ITEMSET items; // fixme: we treat a point as an infinitely small circle - this is inefficient. diff --git a/pcbnew/router/pns_node.h b/pcbnew/router/pns_node.h index f88b74bd4f..de3e886dc2 100644 --- a/pcbnew/router/pns_node.h +++ b/pcbnew/router/pns_node.h @@ -140,7 +140,7 @@ public: int aKindMask = PNS_ITEM::ANY ); ///> Hit detection - const PNS_ITEMSET HitTest( const VECTOR2I& aPoint ); + const PNS_ITEMSET HitTest( const VECTOR2I& aPoint ) const; void Add( PNS_ITEM* aItem ); void Remove( PNS_ITEM* aItem ); diff --git a/pcbnew/zones_by_polygon.cpp b/pcbnew/zones_by_polygon.cpp index 44f669fce8..7b40a598e8 100644 --- a/pcbnew/zones_by_polygon.cpp +++ b/pcbnew/zones_by_polygon.cpp @@ -433,9 +433,9 @@ void Abort_Zone_Move_Corner_Or_Outlines( EDA_DRAW_PANEL* Panel, wxDC* DC ) } else if( zone->IsDragging() ) { - wxPoint offset; - offset = s_CornerInitialPosition - s_CursorLastPosition; - zone->MoveEdge( offset ); + wxPoint offset = s_CornerInitialPosition - s_CursorLastPosition; + int selection = zone->GetSelectedCorner(); + zone->MoveEdge( offset, selection ); } else { @@ -485,9 +485,9 @@ void Show_Zone_Corner_Or_Outline_While_Move_Mouse( EDA_DRAW_PANEL* aPanel, wxDC* } else if( zone->IsDragging() ) { - wxPoint offset; - offset = pos - s_CursorLastPosition; - zone->MoveEdge( offset ); + wxPoint offset = pos - s_CursorLastPosition; + int selection = zone->GetSelectedCorner(); + zone->MoveEdge( offset, selection ); s_CursorLastPosition = pos; } else diff --git a/polygon/polygon_test_point_inside.cpp b/polygon/polygon_test_point_inside.cpp index aafade407c..f63d9ba9d7 100644 --- a/polygon/polygon_test_point_inside.cpp +++ b/polygon/polygon_test_point_inside.cpp @@ -96,7 +96,7 @@ bool TestPointInsidePolygon( const CPOLYGONS_LIST& aPolysList, /* Function TestPointInsidePolygon (overlaid) * same as previous, but use wxPoint and aCount corners */ -bool TestPointInsidePolygon( wxPoint *aPolysList, int aCount,wxPoint aRefPoint ) +bool TestPointInsidePolygon( const wxPoint *aPolysList, int aCount, const wxPoint &aRefPoint ) { // count intersection points to right of (refx,refy). If odd number, point (refx,refy) is inside polyline int ics, ice; diff --git a/polygon/polygon_test_point_inside.h b/polygon/polygon_test_point_inside.h index b817380d1c..ff43798159 100644 --- a/polygon/polygon_test_point_inside.h +++ b/polygon/polygon_test_point_inside.h @@ -34,6 +34,6 @@ bool TestPointInsidePolygon( const CPOLYGONS_LIST& aPolysList, * @param aRefPoint: the point coordinate to test * @return true if the point is inside, false for outside */ -bool TestPointInsidePolygon( wxPoint* aPolysList, +bool TestPointInsidePolygon( const wxPoint* aPolysList, int aCount, - wxPoint aRefPoint ); + const wxPoint &aRefPoint ); From 342016b69276dbcb0b9d55dd722b28c6ab097359 Mon Sep 17 00:00:00 2001 From: Lorenzo Marcantonio Date: Sun, 4 May 2014 19:08:36 +0200 Subject: [PATCH 342/741] Constification of HitTest and GetParent In particular HitTest for zones *do not* select the nearest vertex/edge as a side effect --- 3d-viewer/3d_canvas.h | 2 +- 3d-viewer/3d_viewer.h | 2 +- common/draw_panel.cpp | 2 +- .../page_layout/page_layout_graphic_items.cpp | 12 +++--- cvpcb/cvstruct.h | 2 +- cvpcb/listboxes.cpp | 2 +- eeschema/class_libentry.h | 4 +- eeschema/lib_arc.cpp | 4 +- eeschema/lib_arc.h | 4 +- eeschema/lib_bezier.cpp | 4 +- eeschema/lib_bezier.h | 4 +- eeschema/lib_circle.cpp | 4 +- eeschema/lib_circle.h | 4 +- eeschema/lib_draw_item.h | 6 +-- eeschema/lib_field.cpp | 36 ++++++---------- eeschema/lib_field.h | 6 +-- eeschema/lib_pin.cpp | 4 +- eeschema/lib_pin.h | 4 +- eeschema/lib_polyline.cpp | 4 +- eeschema/lib_polyline.h | 4 +- eeschema/lib_rectangle.cpp | 4 +- eeschema/lib_rectangle.h | 4 +- eeschema/lib_text.cpp | 17 +++----- eeschema/lib_text.h | 6 +-- eeschema/sch_collectors.h | 2 +- gerbview/class_GERBER.h | 2 +- gerbview/class_gerber_draw_item.cpp | 6 +-- gerbview/class_gerber_draw_item.h | 6 +-- include/base_struct.h | 6 +-- include/class_board_item.h | 2 +- include/class_drawpanel.h | 2 +- include/sch_item_struct.h | 5 ++- include/worksheet_shape_builder.h | 14 +++--- kicad/class_treeprojectfiles.h | 2 +- pcbnew/class_dimension.cpp | 2 +- pcbnew/class_dimension.h | 2 +- pcbnew/class_drawsegment.cpp | 2 +- pcbnew/class_drawsegment.h | 2 +- pcbnew/class_marker_pcb.h | 2 +- pcbnew/class_mire.cpp | 2 +- pcbnew/class_mire.h | 2 +- pcbnew/class_module.cpp | 2 +- pcbnew/class_module.h | 2 +- pcbnew/class_pad.cpp | 2 +- pcbnew/class_pad.h | 7 +-- pcbnew/class_pcb_text.h | 2 +- pcbnew/class_text_mod.cpp | 5 ++- pcbnew/class_text_mod.h | 2 +- pcbnew/class_track.cpp | 2 +- pcbnew/class_track.h | 2 +- pcbnew/class_zone.cpp | 43 ++++++++++--------- pcbnew/class_zone.h | 15 ++++--- pcbnew/controle.cpp | 40 +++++++++++------ pcbnew/dialogs/dialog_general_options.h | 2 +- pcbnew/eagle_plugin.cpp | 2 + pcbnew/onrightclick.cpp | 4 +- pcbnew/router/pns_node.cpp | 6 +-- pcbnew/router/pns_node.h | 2 +- pcbnew/zones_by_polygon.cpp | 12 +++--- polygon/polygon_test_point_inside.cpp | 2 +- polygon/polygon_test_point_inside.h | 4 +- 61 files changed, 188 insertions(+), 176 deletions(-) diff --git a/3d-viewer/3d_canvas.h b/3d-viewer/3d_canvas.h index d4ad84cebf..b68541dfdf 100644 --- a/3d-viewer/3d_canvas.h +++ b/3d-viewer/3d_canvas.h @@ -80,7 +80,7 @@ public: EDA_3D_CANVAS( EDA_3D_FRAME* parent, int* attribList = 0 ); ~EDA_3D_CANVAS(); - EDA_3D_FRAME* Parent() { return (EDA_3D_FRAME*)GetParent(); } + EDA_3D_FRAME* Parent() const { return static_cast( GetParent() ); } BOARD* GetBoard() { return Parent()->GetBoard(); } diff --git a/3d-viewer/3d_viewer.h b/3d-viewer/3d_viewer.h index 46c92053b7..c0f950a67a 100644 --- a/3d-viewer/3d_viewer.h +++ b/3d-viewer/3d_viewer.h @@ -81,7 +81,7 @@ public: m_auimgr.UnInit(); }; - PCB_BASE_FRAME* Parent() { return (PCB_BASE_FRAME*)GetParent(); } + PCB_BASE_FRAME* Parent() const { return (PCB_BASE_FRAME*)GetParent(); } BOARD* GetBoard(); diff --git a/common/draw_panel.cpp b/common/draw_panel.cpp index 1e3adb750b..9ac1875616 100644 --- a/common/draw_panel.cpp +++ b/common/draw_panel.cpp @@ -165,7 +165,7 @@ EDA_DRAW_PANEL::~EDA_DRAW_PANEL() } -EDA_DRAW_FRAME* EDA_DRAW_PANEL::GetParent() +EDA_DRAW_FRAME* EDA_DRAW_PANEL::GetParent() const { wxWindow* mom = wxScrolledWindow::GetParent(); return (EDA_DRAW_FRAME*) mom; diff --git a/common/page_layout/page_layout_graphic_items.cpp b/common/page_layout/page_layout_graphic_items.cpp index aeb4b53696..c927e935df 100644 --- a/common/page_layout/page_layout_graphic_items.cpp +++ b/common/page_layout/page_layout_graphic_items.cpp @@ -192,7 +192,7 @@ void WS_DRAW_ITEM_TEXT::DrawWsItem( EDA_RECT* aClipBox, wxDC* aDC ) } // return true if the point aPosition is on the text -bool WS_DRAW_ITEM_TEXT::HitTest( const wxPoint& aPosition) +bool WS_DRAW_ITEM_TEXT::HitTest( const wxPoint& aPosition) const { return EDA_TEXT::TextHitTest( aPosition, 0 ); } @@ -221,7 +221,7 @@ void WS_DRAW_ITEM_POLYGON::DrawWsItem( EDA_RECT* aClipBox, wxDC* aDC ) // return true if the point aPosition is inside one of polygons #include -bool WS_DRAW_ITEM_POLYGON::HitTest( const wxPoint& aPosition) +bool WS_DRAW_ITEM_POLYGON::HitTest( const wxPoint& aPosition) const { return TestPointInsidePolygon( &m_Corners[0], m_Corners.size(), aPosition ); @@ -249,7 +249,7 @@ void WS_DRAW_ITEM_RECT::DrawWsItem( EDA_RECT* aClipBox, wxDC* aDC ) } // return true if the point aPosition is on the rect outline -bool WS_DRAW_ITEM_RECT::HitTest( const wxPoint& aPosition) +bool WS_DRAW_ITEM_RECT::HitTest( const wxPoint& aPosition) const { int dist = GetPenWidth()/2; wxPoint start = GetStart(); @@ -316,7 +316,7 @@ void WS_DRAW_ITEM_LINE::DrawWsItem( EDA_RECT* aClipBox, wxDC* aDC ) } // return true if the point aPosition is on the text -bool WS_DRAW_ITEM_LINE::HitTest( const wxPoint& aPosition) +bool WS_DRAW_ITEM_LINE::HitTest( const wxPoint& aPosition) const { return TestSegmentHit( aPosition, GetStart(), GetEnd(), GetPenWidth()/2 ); } @@ -394,9 +394,9 @@ void WS_DRAW_ITEM_BITMAP::DrawWsItem( EDA_RECT* aClipBox, wxDC* aDC ) * Virtual function * return true if the point aPosition is on bitmap */ -bool WS_DRAW_ITEM_BITMAP::HitTest( const wxPoint& aPosition) +bool WS_DRAW_ITEM_BITMAP::HitTest( const wxPoint& aPosition) const { - WORKSHEET_DATAITEM_BITMAP* parent = (WORKSHEET_DATAITEM_BITMAP*)GetParent(); + const WORKSHEET_DATAITEM_BITMAP* parent = static_cast( GetParent() ); if( parent->m_ImageBitmap == NULL ) return false; diff --git a/cvpcb/cvstruct.h b/cvpcb/cvstruct.h index 579aa44dc6..7078a8d8a8 100644 --- a/cvpcb/cvstruct.h +++ b/cvpcb/cvstruct.h @@ -52,7 +52,7 @@ public: int GetSelection(); void OnSize( wxSizeEvent& event ); - virtual CVPCB_MAINFRAME* GetParent(); + virtual CVPCB_MAINFRAME* GetParent() const; }; diff --git a/cvpcb/listboxes.cpp b/cvpcb/listboxes.cpp index d36d921625..bc7f364658 100644 --- a/cvpcb/listboxes.cpp +++ b/cvpcb/listboxes.cpp @@ -79,7 +79,7 @@ int ITEMS_LISTBOX_BASE::GetSelection() } -CVPCB_MAINFRAME* ITEMS_LISTBOX_BASE::GetParent() +CVPCB_MAINFRAME* ITEMS_LISTBOX_BASE::GetParent() const { return (CVPCB_MAINFRAME*) wxListView::GetParent(); } diff --git a/eeschema/class_libentry.h b/eeschema/class_libentry.h index a8c84ade03..a730d9d19b 100644 --- a/eeschema/class_libentry.h +++ b/eeschema/class_libentry.h @@ -654,14 +654,14 @@ public: */ void SetPartCount( int count ); - int GetPartCount() { return m_unitCount; } + int GetPartCount() const { return m_unitCount; } /** * Function IsMulti * @return true if the component has multiple parts per package. * When happens, the reference has a sub reference ti identify part */ - bool IsMulti() { return m_unitCount > 1; } + bool IsMulti() const { return m_unitCount > 1; } /** * Function SubReference diff --git a/eeschema/lib_arc.cpp b/eeschema/lib_arc.cpp index df4fb03f0d..686adbf8c0 100644 --- a/eeschema/lib_arc.cpp +++ b/eeschema/lib_arc.cpp @@ -171,7 +171,7 @@ bool LIB_ARC::Load( LINE_READER& aLineReader, wxString& aErrorMsg ) } -bool LIB_ARC::HitTest( const wxPoint& aRefPoint ) +bool LIB_ARC::HitTest( const wxPoint& aRefPoint ) const { int mindist = GetPenSize() / 2; @@ -183,7 +183,7 @@ bool LIB_ARC::HitTest( const wxPoint& aRefPoint ) } -bool LIB_ARC::HitTest( wxPoint aPosition, int aThreshold, const TRANSFORM& aTransform ) +bool LIB_ARC::HitTest( const wxPoint &aPosition, int aThreshold, const TRANSFORM& aTransform ) const { if( aThreshold < 0 ) diff --git a/eeschema/lib_arc.h b/eeschema/lib_arc.h index 2c017b9c20..74fc633071 100644 --- a/eeschema/lib_arc.h +++ b/eeschema/lib_arc.h @@ -100,9 +100,9 @@ public: bool Load( LINE_READER& aLineReader, wxString& aErrorMsg ); - bool HitTest( const wxPoint& aPosition ); + bool HitTest( const wxPoint& aPosition ) const; - bool HitTest( wxPoint aPosition, int aThreshold, const TRANSFORM& aTransform ); + bool HitTest( const wxPoint& aPosition, int aThreshold, const TRANSFORM& aTransform ) const; const EDA_RECT GetBoundingBox() const; // Virtual diff --git a/eeschema/lib_bezier.cpp b/eeschema/lib_bezier.cpp index b58e11cb6b..3378bb1603 100644 --- a/eeschema/lib_bezier.cpp +++ b/eeschema/lib_bezier.cpp @@ -345,7 +345,7 @@ void LIB_BEZIER::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& } -bool LIB_BEZIER::HitTest( const wxPoint& aRefPos ) +bool LIB_BEZIER::HitTest( const wxPoint& aRefPos ) const { int mindist = GetPenSize() / 2; @@ -357,7 +357,7 @@ bool LIB_BEZIER::HitTest( const wxPoint& aRefPos ) } -bool LIB_BEZIER::HitTest( wxPoint aPosRef, int aThreshold, const TRANSFORM& aTransform ) +bool LIB_BEZIER::HitTest( const wxPoint &aPosRef, int aThreshold, const TRANSFORM& aTransform ) const { wxPoint ref, start, end; diff --git a/eeschema/lib_bezier.h b/eeschema/lib_bezier.h index 00a320b43f..0a1be188f1 100644 --- a/eeschema/lib_bezier.h +++ b/eeschema/lib_bezier.h @@ -72,9 +72,9 @@ public: */ unsigned GetCornerCount() const { return m_PolyPoints.size(); } - bool HitTest( const wxPoint& aPosition ); + bool HitTest( const wxPoint& aPosition ) const; - bool HitTest( wxPoint aPosRef, int aThreshold, const TRANSFORM& aTransform ); + bool HitTest( const wxPoint& aPosRef, int aThreshold, const TRANSFORM& aTransform ) const; const EDA_RECT GetBoundingBox() const; // Virtual diff --git a/eeschema/lib_circle.cpp b/eeschema/lib_circle.cpp index 204db95d5f..6a249ec740 100644 --- a/eeschema/lib_circle.cpp +++ b/eeschema/lib_circle.cpp @@ -87,7 +87,7 @@ bool LIB_CIRCLE::Load( LINE_READER& aLineReader, wxString& aErrorMsg ) } -bool LIB_CIRCLE::HitTest( const wxPoint& aPosRef ) +bool LIB_CIRCLE::HitTest( const wxPoint& aPosRef ) const { int mindist = GetPenSize() / 2; @@ -99,7 +99,7 @@ bool LIB_CIRCLE::HitTest( const wxPoint& aPosRef ) } -bool LIB_CIRCLE::HitTest( wxPoint aPosRef, int aThreshold, const TRANSFORM& aTransform ) +bool LIB_CIRCLE::HitTest( const wxPoint &aPosRef, int aThreshold, const TRANSFORM& aTransform ) const { if( aThreshold < 0 ) aThreshold = GetPenSize() / 2; diff --git a/eeschema/lib_circle.h b/eeschema/lib_circle.h index 49f0f605ac..cbd0b31778 100644 --- a/eeschema/lib_circle.h +++ b/eeschema/lib_circle.h @@ -61,9 +61,9 @@ public: bool Load( LINE_READER& aLineReader, wxString& aErrorMsg ); - bool HitTest( const wxPoint& aPosition ); + bool HitTest( const wxPoint& aPosition ) const; - bool HitTest( wxPoint aPosRef, int aThreshold, const TRANSFORM& aTransform ); + bool HitTest( const wxPoint& aPosRef, int aThreshold, const TRANSFORM& aTransform ) const; int GetPenSize( ) const; diff --git a/eeschema/lib_draw_item.h b/eeschema/lib_draw_item.h index 8efffd827e..10e972eb4a 100644 --- a/eeschema/lib_draw_item.h +++ b/eeschema/lib_draw_item.h @@ -237,12 +237,12 @@ public: virtual bool Load( LINE_READER& aLine, wxString& aErrorMsg ) = 0; - LIB_COMPONENT* GetParent() + LIB_COMPONENT* GetParent() const { return (LIB_COMPONENT *)m_Parent; } - virtual bool HitTest( const wxPoint& aPosition ) + virtual bool HitTest( const wxPoint& aPosition ) const { return EDA_ITEM::HitTest( aPosition ); } @@ -255,7 +255,7 @@ public: * @param aTransform The transform matrix. * @return True if the point \a aPosition is near this object */ - virtual bool HitTest( wxPoint aPosition, int aThreshold, const TRANSFORM& aTransform ) = 0; + virtual bool HitTest( const wxPoint &aPosition, int aThreshold, const TRANSFORM& aTransform ) const = 0; /** * @return the boundary box for this, in library coordinates diff --git a/eeschema/lib_field.cpp b/eeschema/lib_field.cpp index 392daecc8c..36f43f8c0d 100644 --- a/eeschema/lib_field.cpp +++ b/eeschema/lib_field.cpp @@ -320,7 +320,7 @@ void LIB_FIELD::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& a } -bool LIB_FIELD::HitTest( const wxPoint& aPosition ) +bool LIB_FIELD::HitTest( const wxPoint& aPosition ) const { // Because HitTest is mainly used to select the field // return always false if this field is void @@ -331,49 +331,37 @@ bool LIB_FIELD::HitTest( const wxPoint& aPosition ) } -bool LIB_FIELD::HitTest( wxPoint aPosition, int aThreshold, const TRANSFORM& aTransform ) +bool LIB_FIELD::HitTest( const wxPoint &aPosition, int aThreshold, const TRANSFORM& aTransform ) const { if( aThreshold < 0 ) aThreshold = 0; - int extraCharCount = 0; + // Build a temporary copy of the text for hit testing + EDA_TEXT tmp_text( *this ); // Reference designator text has one or 2 additional character (displays // U? or U?A) if( m_id == REFERENCE ) { - extraCharCount++; - m_Text.Append('?'); - LIB_COMPONENT* parent = (LIB_COMPONENT*)m_Parent; + wxString extended_text = tmp_text.GetText(); + extended_text.Append('?'); + const LIB_COMPONENT* parent = static_cast( m_Parent ); if ( parent && ( parent->GetPartCount() > 1 ) ) - { - m_Text.Append('A'); - extraCharCount++; - } + extended_text.Append('A'); + tmp_text.SetText( extended_text ); } - wxPoint physicalpos = aTransform.TransformCoordinate( m_Pos ); - wxPoint tmp = m_Pos; - m_Pos = physicalpos; + tmp_text.SetTextPosition( aTransform.TransformCoordinate( m_Pos ) ); /* The text orientation may need to be flipped if the * transformation matrix causes xy axes to be flipped. * this simple algo works only for schematic matrix (rot 90 or/and mirror) */ int t1 = ( aTransform.x1 != 0 ) ^ ( m_Orient != 0 ); - int orient = t1 ? TEXT_ORIENT_HORIZ : TEXT_ORIENT_VERT; - EXCHG( m_Orient, orient ); + tmp_text.SetOrientation( t1 ? TEXT_ORIENT_HORIZ : TEXT_ORIENT_VERT ); - bool hit = TextHitTest( aPosition ); - - EXCHG( m_Orient, orient ); - m_Pos = tmp; - - while( extraCharCount-- ) - m_Text.RemoveLast( ); - - return hit; + return tmp_text.TextHitTest( aPosition ); } diff --git a/eeschema/lib_field.h b/eeschema/lib_field.h index 1e475fa913..49e36d8be5 100644 --- a/eeschema/lib_field.h +++ b/eeschema/lib_field.h @@ -151,7 +151,7 @@ public: * Function IsVoid * @return true if the field value is void (no text in this field) */ - bool IsVoid() + bool IsVoid() const { return m_Text.IsEmpty(); } @@ -169,9 +169,9 @@ public: void GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ); - bool HitTest( const wxPoint& aPosition ); + bool HitTest( const wxPoint& aPosition ) const; - bool HitTest( wxPoint aPosition, int aThreshold, const TRANSFORM& aTransform ); + bool HitTest( const wxPoint &aPosition, int aThreshold, const TRANSFORM& aTransform ) const; void operator=( const LIB_FIELD& field ) { diff --git a/eeschema/lib_pin.cpp b/eeschema/lib_pin.cpp index e4f16b3a8f..29c4aee929 100644 --- a/eeschema/lib_pin.cpp +++ b/eeschema/lib_pin.cpp @@ -525,13 +525,13 @@ void LIB_PIN::EnableEditMode( bool enable, bool editPinByPin ) } -bool LIB_PIN::HitTest( const wxPoint& aPosition ) +bool LIB_PIN::HitTest( const wxPoint& aPosition ) const { return HitTest( aPosition, 0, DefaultTransform ); } -bool LIB_PIN::HitTest( wxPoint aPosition, int aThreshold, const TRANSFORM& aTransform ) +bool LIB_PIN::HitTest( const wxPoint &aPosition, int aThreshold, const TRANSFORM& aTransform ) const { if( aThreshold < 0 ) aThreshold = 0; diff --git a/eeschema/lib_pin.h b/eeschema/lib_pin.h index bf4c504776..dd85740de6 100644 --- a/eeschema/lib_pin.h +++ b/eeschema/lib_pin.h @@ -131,9 +131,9 @@ public: bool Load( LINE_READER& aLineReader, wxString& aErrorMsg ); - bool HitTest( const wxPoint& aPosition ); + bool HitTest( const wxPoint& aPosition ) const; - bool HitTest( wxPoint aPosRef, int aThreshold, const TRANSFORM& aTransform ); + bool HitTest( const wxPoint &aPosRef, int aThreshold, const TRANSFORM& aTransform ) const; void GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ); diff --git a/eeschema/lib_polyline.cpp b/eeschema/lib_polyline.cpp index 5b4b1ba49c..75eae61c71 100644 --- a/eeschema/lib_polyline.cpp +++ b/eeschema/lib_polyline.cpp @@ -321,7 +321,7 @@ void LIB_POLYLINE::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint } -bool LIB_POLYLINE::HitTest( const wxPoint& aPosition ) +bool LIB_POLYLINE::HitTest( const wxPoint& aPosition ) const { int mindist = GetPenSize() / 2; @@ -333,7 +333,7 @@ bool LIB_POLYLINE::HitTest( const wxPoint& aPosition ) } -bool LIB_POLYLINE::HitTest( wxPoint aPosition, int aThreshold, const TRANSFORM& aTransform ) +bool LIB_POLYLINE::HitTest( const wxPoint &aPosition, int aThreshold, const TRANSFORM& aTransform ) const { wxPoint ref, start, end; diff --git a/eeschema/lib_polyline.h b/eeschema/lib_polyline.h index 81a4d8a08e..78a3891613 100644 --- a/eeschema/lib_polyline.h +++ b/eeschema/lib_polyline.h @@ -74,9 +74,9 @@ public: */ unsigned GetCornerCount() const { return m_PolyPoints.size(); } - bool HitTest( const wxPoint& aPosition ); + bool HitTest( const wxPoint& aPosition ) const; - bool HitTest( wxPoint aPosition, int aThreshold, const TRANSFORM& aTransform ); + bool HitTest( const wxPoint &aPosition, int aThreshold, const TRANSFORM& aTransform ) const; const EDA_RECT GetBoundingBox() const; // Virtual diff --git a/eeschema/lib_rectangle.cpp b/eeschema/lib_rectangle.cpp index 7efdb3dbf1..057b049eb1 100644 --- a/eeschema/lib_rectangle.cpp +++ b/eeschema/lib_rectangle.cpp @@ -267,7 +267,7 @@ const EDA_RECT LIB_RECTANGLE::GetBoundingBox() const } -bool LIB_RECTANGLE::HitTest( const wxPoint& aPosition ) +bool LIB_RECTANGLE::HitTest( const wxPoint& aPosition ) const { int mindist = ( GetPenSize() / 2 ) + 1; @@ -279,7 +279,7 @@ bool LIB_RECTANGLE::HitTest( const wxPoint& aPosition ) } -bool LIB_RECTANGLE::HitTest( wxPoint aPosition, int aThreshold, const TRANSFORM& aTransform ) +bool LIB_RECTANGLE::HitTest( const wxPoint &aPosition, int aThreshold, const TRANSFORM& aTransform ) const { if( aThreshold < 0 ) aThreshold = GetPenSize() / 2; diff --git a/eeschema/lib_rectangle.h b/eeschema/lib_rectangle.h index 739f20b60e..63e182691d 100644 --- a/eeschema/lib_rectangle.h +++ b/eeschema/lib_rectangle.h @@ -65,9 +65,9 @@ public: bool Load( LINE_READER& aLineReader, wxString& aErrorMsg ); - bool HitTest( const wxPoint& aPosition ); + bool HitTest( const wxPoint& aPosition ) const; - bool HitTest( wxPoint aPosRef, int aThreshold, const TRANSFORM& aTransform ); + bool HitTest( const wxPoint &aPosRef, int aThreshold, const TRANSFORM& aTransform ) const; int GetPenSize( ) const; diff --git a/eeschema/lib_text.cpp b/eeschema/lib_text.cpp index d52acdda97..1b51b0f4e9 100644 --- a/eeschema/lib_text.cpp +++ b/eeschema/lib_text.cpp @@ -185,32 +185,27 @@ bool LIB_TEXT::Load( LINE_READER& aLineReader, wxString& errorMsg ) } -bool LIB_TEXT::HitTest( const wxPoint& aPosition ) +bool LIB_TEXT::HitTest( const wxPoint& aPosition ) const { return HitTest( aPosition, 0, DefaultTransform ); } -bool LIB_TEXT::HitTest( wxPoint aPosition, int aThreshold, const TRANSFORM& aTransform ) +bool LIB_TEXT::HitTest( const wxPoint &aPosition, int aThreshold, const TRANSFORM& aTransform ) const { if( aThreshold < 0 ) aThreshold = 0; - wxPoint physicalpos = aTransform.TransformCoordinate( m_Pos ); - wxPoint tmp = m_Pos; - m_Pos = physicalpos; + EDA_TEXT tmp_text( *this ); + tmp_text.SetTextPosition( aTransform.TransformCoordinate( m_Pos ) ); /* The text orientation may need to be flipped if the * transformation matrix causes xy axes to be flipped. * this simple algo works only for schematic matrix (rot 90 or/and mirror) */ int t1 = ( aTransform.x1 != 0 ) ^ ( m_Orient != 0 ); - int orient = t1 ? TEXT_ORIENT_HORIZ : TEXT_ORIENT_VERT; - EXCHG( m_Orient, orient ); - bool hit = TextHitTest( aPosition ); - EXCHG( m_Orient, orient ); - m_Pos = tmp; - return hit; + tmp_text.SetOrientation( t1 ? TEXT_ORIENT_HORIZ : TEXT_ORIENT_VERT ); + return tmp_text.TextHitTest( aPosition ); } diff --git a/eeschema/lib_text.h b/eeschema/lib_text.h index 3db14c11a8..8353869226 100644 --- a/eeschema/lib_text.h +++ b/eeschema/lib_text.h @@ -82,11 +82,11 @@ public: bool Load( LINE_READER& aLineReader, wxString& aErrorMsg ); - bool HitTest( const wxPoint& aPosition ); + bool HitTest( const wxPoint& aPosition ) const; - bool HitTest( wxPoint aPosition, int aThreshold, const TRANSFORM& aTransform ); + bool HitTest( const wxPoint &aPosition, int aThreshold, const TRANSFORM& aTransform ) const; - bool HitTest( EDA_RECT& aRect ) + bool HitTest( const EDA_RECT& aRect ) const { return TextHitTest( aRect ); } diff --git a/eeschema/sch_collectors.h b/eeschema/sch_collectors.h index 299ea9ec62..4813253919 100644 --- a/eeschema/sch_collectors.h +++ b/eeschema/sch_collectors.h @@ -210,7 +210,7 @@ public: wxString GetSheetPath() const { return m_sheetPath; } - SCH_ITEM* GetParent() { return m_parent; } + SCH_ITEM* GetParent() const { return m_parent; } }; diff --git a/gerbview/class_GERBER.h b/gerbview/class_GERBER.h index 632ac6487c..c975bf0233 100644 --- a/gerbview/class_GERBER.h +++ b/gerbview/class_GERBER.h @@ -148,7 +148,7 @@ public: * Function GetParent * @return the GERBVIEW_FRAME parent of this GERBER_IMAGE */ - GERBVIEW_FRAME* GetParent() + GERBVIEW_FRAME* GetParent() const { return m_Parent; } diff --git a/gerbview/class_gerber_draw_item.cpp b/gerbview/class_gerber_draw_item.cpp index c73d8972da..f01f3d5d55 100644 --- a/gerbview/class_gerber_draw_item.cpp +++ b/gerbview/class_gerber_draw_item.cpp @@ -131,7 +131,7 @@ wxPoint GERBER_DRAW_ITEM::GetABPosition( const wxPoint& aXYPosition ) const } -wxPoint GERBER_DRAW_ITEM::GetXYPosition( const wxPoint& aABPosition ) +wxPoint GERBER_DRAW_ITEM::GetXYPosition( const wxPoint& aABPosition ) const { // do the inverse transform made by GetABPosition wxPoint xyPos = aABPosition; @@ -577,7 +577,7 @@ void GERBER_DRAW_ITEM::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) } -bool GERBER_DRAW_ITEM::HitTest( const wxPoint& aRefPos ) +bool GERBER_DRAW_ITEM::HitTest( const wxPoint& aRefPos ) const { // calculate aRefPos in XY gerber axis: wxPoint ref_pos = GetXYPosition( aRefPos ); @@ -592,7 +592,7 @@ bool GERBER_DRAW_ITEM::HitTest( const wxPoint& aRefPos ) } -bool GERBER_DRAW_ITEM::HitTest( EDA_RECT& aRefArea ) +bool GERBER_DRAW_ITEM::HitTest( const EDA_RECT& aRefArea ) const { wxPoint pos = GetABPosition( m_Start ); diff --git a/gerbview/class_gerber_draw_item.h b/gerbview/class_gerber_draw_item.h index 70ad0a1164..c7a0b695cc 100644 --- a/gerbview/class_gerber_draw_item.h +++ b/gerbview/class_gerber_draw_item.h @@ -209,7 +209,7 @@ public: * @param aABPosition = position in A,B plotter axis * @return const wxPoint - The given position in X,Y axis. */ - wxPoint GetXYPosition( const wxPoint& aABPosition ); + wxPoint GetXYPosition( const wxPoint& aABPosition ) const; /** * Function GetDcodeDescr @@ -255,7 +255,7 @@ public: * @param aRefPos a wxPoint to test * @return bool - true if a hit, else false */ - bool HitTest( const wxPoint& aRefPos ); + bool HitTest( const wxPoint& aRefPos ) const; /** * Function HitTest (overloaded) @@ -264,7 +264,7 @@ public: * @param aRefArea a wxPoint to test * @return bool - true if a hit, else false */ - bool HitTest( EDA_RECT& aRefArea ); + bool HitTest( const EDA_RECT& aRefArea ) const; /** * Function GetClass diff --git a/include/base_struct.h b/include/base_struct.h index 9ec7af03c8..38e320ef38 100644 --- a/include/base_struct.h +++ b/include/base_struct.h @@ -456,14 +456,10 @@ public: * Function HitTest * tests if \a aPosition is contained within or on the bounding area of an item. * - * @note This function cannot be const because some of the derive objects perform - * intermediate calculations which change object members. Make sure derived - * objects do not declare this as const. - * * @param aPosition A reference to a wxPoint object containing the coordinates to test. * @return True if \a aPosition is within or on the item bounding area. */ - virtual bool HitTest( const wxPoint& aPosition ) + virtual bool HitTest( const wxPoint& aPosition ) const { return false; // derived classes should override this function } diff --git a/include/class_board_item.h b/include/class_board_item.h index 26a30af896..91fd3ead0c 100644 --- a/include/class_board_item.h +++ b/include/class_board_item.h @@ -254,7 +254,7 @@ public: */ wxString GetLayerName() const; - virtual bool HitTest( const wxPoint& aPosition ) + virtual bool HitTest( const wxPoint& aPosition ) const { return EDA_ITEM::HitTest( aPosition ); } diff --git a/include/class_drawpanel.h b/include/class_drawpanel.h index 3a9c3735b7..d3e69371b3 100644 --- a/include/class_drawpanel.h +++ b/include/class_drawpanel.h @@ -123,7 +123,7 @@ public: BASE_SCREEN* GetScreen(); - EDA_DRAW_FRAME* GetParent(); + EDA_DRAW_FRAME* GetParent() const; void OnPaint( wxPaintEvent& event ); diff --git a/include/sch_item_struct.h b/include/sch_item_struct.h index 5fe90cd69f..6a3d4913ba 100644 --- a/include/sch_item_struct.h +++ b/include/sch_item_struct.h @@ -291,7 +291,10 @@ public: bool IsConnected( const wxPoint& aPoint ) const; /** @copydoc EDA_ITEM::HitTest(const wxPoint&) */ - virtual bool HitTest( const wxPoint& aPosition ) { return HitTest( aPosition, 0 ); } + virtual bool HitTest( const wxPoint& aPosition ) const + { + return HitTest( aPosition, 0 ); + } /** * Function HitTest diff --git a/include/worksheet_shape_builder.h b/include/worksheet_shape_builder.h index de0bb5aa57..718213c9b7 100644 --- a/include/worksheet_shape_builder.h +++ b/include/worksheet_shape_builder.h @@ -59,7 +59,7 @@ public: EDA_COLOR_T GetColor() const { return m_color; } WS_DRAW_TYPE GetType() const { return m_type; }; - WORKSHEET_DATAITEM* GetParent() { return m_parent; } + WORKSHEET_DATAITEM* GetParent() const { return m_parent; } /** The function to draw a WS_DRAW_ITEM */ @@ -69,7 +69,7 @@ public: * Abstract function: should exist for derived items * return true if the point aPosition is on the item */ - virtual bool HitTest( const wxPoint& aPosition) = 0; + virtual bool HitTest( const wxPoint& aPosition) const = 0; /** * Abstract function: should exist for derived items @@ -124,7 +124,7 @@ public: * Virtual function * return true if the point aPosition is on the line */ - virtual bool HitTest( const wxPoint& aPosition); + virtual bool HitTest( const wxPoint& aPosition) const; /** * return true if the point aPosition is on the starting point of this item. @@ -174,7 +174,7 @@ public: * Virtual function * return true if the point aPosition is inside one polygon */ - virtual bool HitTest( const wxPoint& aPosition); + virtual bool HitTest( const wxPoint& aPosition) const; /** * return true if the point aPosition is on the starting point of this item. @@ -202,7 +202,7 @@ public: * Virtual function * return true if the point aPosition is on one edge of the rectangle */ - virtual bool HitTest( const wxPoint& aPosition); + virtual bool HitTest( const wxPoint& aPosition) const; /** * return true if the point aPosition is on the starting point of this item. @@ -239,7 +239,7 @@ public: * Virtual function * return true if the point aPosition is on the text */ - virtual bool HitTest( const wxPoint& aPosition); + virtual bool HitTest( const wxPoint& aPosition) const; /** * return true if the point aPosition is on the starting point of this item. @@ -274,7 +274,7 @@ public: * Virtual function * return true if the point aPosition is on bitmap */ - virtual bool HitTest( const wxPoint& aPosition); + virtual bool HitTest( const wxPoint& aPosition) const; /** * return true if the point aPosition is on the reference point of this item. diff --git a/kicad/class_treeprojectfiles.h b/kicad/class_treeprojectfiles.h index b671a02e0f..6d592d4696 100644 --- a/kicad/class_treeprojectfiles.h +++ b/kicad/class_treeprojectfiles.h @@ -17,7 +17,7 @@ private: public: - TREE_PROJECT_FRAME* GetParent() + TREE_PROJECT_FRAME* GetParent() const { return m_Parent; } diff --git a/pcbnew/class_dimension.cpp b/pcbnew/class_dimension.cpp index e49ca7e5dd..59ff184ddc 100644 --- a/pcbnew/class_dimension.cpp +++ b/pcbnew/class_dimension.cpp @@ -396,7 +396,7 @@ void DIMENSION::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) } -bool DIMENSION::HitTest( const wxPoint& aPosition ) +bool DIMENSION::HitTest( const wxPoint& aPosition ) const { if( m_Text.TextHitTest( aPosition ) ) return true; diff --git a/pcbnew/class_dimension.h b/pcbnew/class_dimension.h index 1ea29bd8dc..d68fc7770d 100644 --- a/pcbnew/class_dimension.h +++ b/pcbnew/class_dimension.h @@ -127,7 +127,7 @@ public: void GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ); - bool HitTest( const wxPoint& aPosition ); + bool HitTest( const wxPoint& aPosition ) const; /** @copydoc BOARD_ITEM::HitTest(const EDA_RECT& aRect, * bool aContained = true, int aAccuracy ) const diff --git a/pcbnew/class_drawsegment.cpp b/pcbnew/class_drawsegment.cpp index d1e9799258..2c976e90ee 100644 --- a/pcbnew/class_drawsegment.cpp +++ b/pcbnew/class_drawsegment.cpp @@ -475,7 +475,7 @@ const EDA_RECT DRAWSEGMENT::GetBoundingBox() const } -bool DRAWSEGMENT::HitTest( const wxPoint& aPosition ) +bool DRAWSEGMENT::HitTest( const wxPoint& aPosition ) const { switch( m_Shape ) { diff --git a/pcbnew/class_drawsegment.h b/pcbnew/class_drawsegment.h index 64ce5dcb8c..3cae1d9dcf 100644 --- a/pcbnew/class_drawsegment.h +++ b/pcbnew/class_drawsegment.h @@ -178,7 +178,7 @@ public: virtual const EDA_RECT GetBoundingBox() const; - virtual bool HitTest( const wxPoint& aPosition ); + virtual bool HitTest( const wxPoint& aPosition ) const; /** @copydoc BOARD_ITEM::HitTest(const EDA_RECT& aRect, * bool aContained = true, int aAccuracy ) const diff --git a/pcbnew/class_marker_pcb.h b/pcbnew/class_marker_pcb.h index 7728b152c0..5e794a743c 100644 --- a/pcbnew/class_marker_pcb.h +++ b/pcbnew/class_marker_pcb.h @@ -64,7 +64,7 @@ public: const wxPoint& GetPosition() const { return m_Pos; } void SetPosition( const wxPoint& aPos ) { m_Pos = aPos; } - bool HitTest( const wxPoint& aPosition ) + bool HitTest( const wxPoint& aPosition ) const { return HitTestMarker( aPosition ); } diff --git a/pcbnew/class_mire.cpp b/pcbnew/class_mire.cpp index d2fb096755..3abeaf95d0 100644 --- a/pcbnew/class_mire.cpp +++ b/pcbnew/class_mire.cpp @@ -158,7 +158,7 @@ void PCB_TARGET::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE mode_color, } -bool PCB_TARGET::HitTest( const wxPoint& aPosition ) +bool PCB_TARGET::HitTest( const wxPoint& aPosition ) const { int dX = aPosition.x - m_Pos.x; int dY = aPosition.y - m_Pos.y; diff --git a/pcbnew/class_mire.h b/pcbnew/class_mire.h index 0a7186b6b1..9f12ac7d73 100644 --- a/pcbnew/class_mire.h +++ b/pcbnew/class_mire.h @@ -82,7 +82,7 @@ public: void Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE aDrawMode, const wxPoint& offset = ZeroOffset ); - bool HitTest( const wxPoint& aPosition ); + bool HitTest( const wxPoint& aPosition ) const; /** @copydoc BOARD_ITEM::HitTest(const EDA_RECT& aRect, * bool aContained = true, int aAccuracy ) const diff --git a/pcbnew/class_module.cpp b/pcbnew/class_module.cpp index ca343a6333..257f34bd6e 100644 --- a/pcbnew/class_module.cpp +++ b/pcbnew/class_module.cpp @@ -549,7 +549,7 @@ void MODULE::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) } -bool MODULE::HitTest( const wxPoint& aPosition ) +bool MODULE::HitTest( const wxPoint& aPosition ) const { if( m_BoundaryBox.Contains( aPosition ) ) return true; diff --git a/pcbnew/class_module.h b/pcbnew/class_module.h index 189abfe6be..3b378c30a6 100644 --- a/pcbnew/class_module.h +++ b/pcbnew/class_module.h @@ -324,7 +324,7 @@ public: void GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ); - bool HitTest( const wxPoint& aPosition ); + bool HitTest( const wxPoint& aPosition ) const; /** @copydoc BOARD_ITEM::HitTest(const EDA_RECT& aRect, * bool aContained = true, int aAccuracy ) const diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index 43b2b17f04..f4a1282ed7 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -637,7 +637,7 @@ bool D_PAD::IsOnLayer( LAYER_NUM aLayer ) const } -bool D_PAD::HitTest( const wxPoint& aPosition ) +bool D_PAD::HitTest( const wxPoint& aPosition ) const { int dx, dy; diff --git a/pcbnew/class_pad.h b/pcbnew/class_pad.h index 3cbdcbe82a..41ac5c3913 100644 --- a/pcbnew/class_pad.h +++ b/pcbnew/class_pad.h @@ -341,7 +341,7 @@ public: * Function GetBoundingRadius * returns the radius of a minimum sized circle which fully encloses this pad. */ - int GetBoundingRadius() + int GetBoundingRadius() const { // Any member function which would affect this calculation should set // m_boundingRadius to -1 to re-trigger the calculation from here. @@ -368,7 +368,7 @@ public: bool IsOnLayer( LAYER_NUM aLayer ) const; - bool HitTest( const wxPoint& aPosition ); + bool HitTest( const wxPoint& aPosition ) const; wxString GetClass() const { @@ -450,7 +450,8 @@ private: */ int boundingRadius() const; - int m_boundingRadius; ///< radius of the circle containing the pad shape + // Actually computed and cached on demand by the accessor + mutable int m_boundingRadius; ///< radius of the circle containing the pad shape /// Pad name (4 char) or a long identifier (used in pad name /// comparisons because this is faster than string comparison) diff --git a/pcbnew/class_pcb_text.h b/pcbnew/class_pcb_text.h index 0ebd4119bf..7a6d853704 100644 --- a/pcbnew/class_pcb_text.h +++ b/pcbnew/class_pcb_text.h @@ -76,7 +76,7 @@ public: void GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ); - bool HitTest( const wxPoint& aPosition ) + bool HitTest( const wxPoint& aPosition ) const { return TextHitTest( aPosition ); } diff --git a/pcbnew/class_text_mod.cpp b/pcbnew/class_text_mod.cpp index e5e7a2d2be..b103869775 100644 --- a/pcbnew/class_text_mod.cpp +++ b/pcbnew/class_text_mod.cpp @@ -163,7 +163,7 @@ void TEXTE_MODULE::SetLocalCoord() RotatePoint( &m_Pos0.x, &m_Pos0.y, -angle ); } -bool TEXTE_MODULE::HitTest( const wxPoint& aPosition ) +bool TEXTE_MODULE::HitTest( const wxPoint& aPosition ) const { wxPoint rel_pos; EDA_RECT area = GetTextBox( -1, -1 ); @@ -455,6 +455,9 @@ void TEXTE_MODULE::ViewGetLayers( int aLayers[], int& aCount ) const case LAYER_N_FRONT: aLayers[0] = ITEM_GAL_LAYER( MOD_TEXT_FR_VISIBLE ); // how about SILKSCREEN_N_FRONT? break; + + default: + wxFAIL_MSG( wxT( "Can't tell text layer" ) ); } break; } diff --git a/pcbnew/class_text_mod.h b/pcbnew/class_text_mod.h index bc207e7254..7ab96e516b 100644 --- a/pcbnew/class_text_mod.h +++ b/pcbnew/class_text_mod.h @@ -148,7 +148,7 @@ public: void GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ); - bool HitTest( const wxPoint& aPosition ); + bool HitTest( const wxPoint& aPosition ) const; wxString GetClass() const { diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index 2dd626a5c8..7a40e066fb 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -1236,7 +1236,7 @@ bool TRACK::HitTest( const wxPoint& aPosition ) return TestSegmentHit( aPosition, m_Start, m_End, m_Width / 2 ); } -bool VIA::HitTest( const wxPoint& aPosition ) +bool VIA::HitTest( const wxPoint& aPosition ) const { int max_dist = m_Width / 2; diff --git a/pcbnew/class_track.h b/pcbnew/class_track.h index 9afc346788..4340c33e6d 100644 --- a/pcbnew/class_track.h +++ b/pcbnew/class_track.h @@ -401,7 +401,7 @@ public: const wxPoint& GetPosition() const { return m_Start; } // was overload void SetPosition( const wxPoint& aPoint ) { m_Start = aPoint; m_End = aPoint; } // was overload - virtual bool HitTest( const wxPoint& aPosition ); + virtual bool HitTest( const wxPoint& aPosition ) const; virtual bool HitTest( const EDA_RECT& aRect, bool aContained = true, int aAccuracy = 0 ) const; diff --git a/pcbnew/class_zone.cpp b/pcbnew/class_zone.cpp index 6679fee49a..a6b360f98a 100644 --- a/pcbnew/class_zone.cpp +++ b/pcbnew/class_zone.cpp @@ -440,37 +440,42 @@ int ZONE_CONTAINER::GetThermalReliefCopperBridge( D_PAD* aPad ) const } -bool ZONE_CONTAINER::HitTest( const wxPoint& aPosition ) +bool ZONE_CONTAINER::HitTest( const wxPoint& aPosition ) const { - if( HitTestForCorner( aPosition ) ) + if( HitTestForCorner( aPosition ) >= 0 ) return true; - if( HitTestForEdge( aPosition ) ) + if( HitTestForEdge( aPosition ) >= 0 ) return true; return false; } +void ZONE_CONTAINER::SetSelectedCorner( const wxPoint& aPosition ) +{ + m_CornerSelection = HitTestForCorner( aPosition ); + + if( m_CornerSelection < 0 ) + m_CornerSelection = HitTestForEdge( aPosition ); +} + + // Zones outlines have no thickness, so it Hit Test functions // we must have a default distance between the test point // and a corner or a zone edge: #define MAX_DIST_IN_MM 0.25 -bool ZONE_CONTAINER::HitTestForCorner( const wxPoint& refPos ) +int ZONE_CONTAINER::HitTestForCorner( const wxPoint& refPos ) const { int distmax = Millimeter2iu( MAX_DIST_IN_MM ); - m_CornerSelection = m_Poly->HitTestForCorner( refPos, distmax ); - - return m_CornerSelection >= 0; + return m_Poly->HitTestForCorner( refPos, distmax ); } -bool ZONE_CONTAINER::HitTestForEdge( const wxPoint& refPos ) +int ZONE_CONTAINER::HitTestForEdge( const wxPoint& refPos ) const { int distmax = Millimeter2iu( MAX_DIST_IN_MM ); - m_CornerSelection = m_Poly->HitTestForEdge( refPos, distmax ); - - return m_CornerSelection >= 0; + return m_Poly->HitTestForEdge( refPos, distmax ); } @@ -700,25 +705,23 @@ void ZONE_CONTAINER::Move( const wxPoint& offset ) } -void ZONE_CONTAINER::MoveEdge( const wxPoint& offset ) +void ZONE_CONTAINER::MoveEdge( const wxPoint& offset, int aEdge ) { - int ii = m_CornerSelection; - // Move the start point of the selected edge: - SetCornerPosition( ii, GetCornerPosition( ii ) + offset ); + SetCornerPosition( aEdge, GetCornerPosition( aEdge ) + offset ); // Move the end point of the selected edge: - if( m_Poly->m_CornersList.IsEndContour( ii ) || ii == GetNumCorners() - 1 ) + if( m_Poly->m_CornersList.IsEndContour( aEdge ) || aEdge == GetNumCorners() - 1 ) { - int icont = m_Poly->GetContour( ii ); - ii = m_Poly->GetContourStart( icont ); + int icont = m_Poly->GetContour( aEdge ); + aEdge = m_Poly->GetContourStart( icont ); } else { - ii++; + aEdge++; } - SetCornerPosition( ii, GetCornerPosition( ii ) + offset ); + SetCornerPosition( aEdge, GetCornerPosition( aEdge ) + offset ); m_Poly->Hatch(); } diff --git a/pcbnew/class_zone.h b/pcbnew/class_zone.h index 6423d85396..2642937d06 100644 --- a/pcbnew/class_zone.h +++ b/pcbnew/class_zone.h @@ -217,6 +217,10 @@ public: int GetSelectedCorner() const { return m_CornerSelection; } void SetSelectedCorner( int aCorner ) { m_CornerSelection = aCorner; } + /// + // Like HitTest but selects the current corner to be operated on + void SetSelectedCorner( const wxPoint& aPosition ); + int GetLocalFlags() const { return m_localFlgs; } void SetLocalFlags( int aFlags ) { m_localFlgs = aFlags; } @@ -234,7 +238,7 @@ public: * @param aRefPos A wxPoint to test * @return bool - true if a hit, else false */ - virtual bool HitTest( const wxPoint& aPosition ); + virtual bool HitTest( const wxPoint& aPosition ) const; /** * Function HitTest @@ -342,7 +346,7 @@ public: * @return true if found * @param refPos : A wxPoint to test */ - bool HitTestForCorner( const wxPoint& refPos ); + int HitTestForCorner( const wxPoint& refPos ) const; /** * Function HitTestForEdge @@ -351,7 +355,7 @@ public: * @return true if found * @param refPos : A wxPoint to test */ - bool HitTestForEdge( const wxPoint& refPos ); + int HitTestForEdge( const wxPoint& refPos ) const; /** @copydoc BOARD_ITEM::HitTest(const EDA_RECT& aRect, * bool aContained = true, int aAccuracy ) const @@ -400,10 +404,11 @@ public: /** * Function MoveEdge - * Move the outline Edge. m_CornerSelection is the start point of the outline edge + * Move the outline Edge * @param offset = moving vector + * @param aEdge = start point of the outline edge */ - void MoveEdge( const wxPoint& offset ); + void MoveEdge( const wxPoint& offset, int aEdge ); /** * Function Rotate diff --git a/pcbnew/controle.cpp b/pcbnew/controle.cpp index d6f8a79583..06f07af712 100644 --- a/pcbnew/controle.cpp +++ b/pcbnew/controle.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -160,8 +161,9 @@ BOARD_ITEM* PCB_BASE_FRAME::PcbGeneralLocateAndDisplay( int aHotKeyCode ) (*m_Collector)[i]->Show( 0, std::cout ); #endif - /* Remove redundancies: sometime, zones are found twice, + /* Remove redundancies: sometime, legacy zones are found twice, * because zones can be filled by overlapping segments (this is a fill option) + * Trigger the selection of the current edge for new-style zones */ time_t timestampzone = 0; @@ -169,18 +171,32 @@ BOARD_ITEM* PCB_BASE_FRAME::PcbGeneralLocateAndDisplay( int aHotKeyCode ) { item = (*m_Collector)[ii]; - if( item->Type() != PCB_ZONE_T ) - continue; + switch( item->Type() ) + { + case PCB_ZONE_T: + // Found a TYPE ZONE + if( item->GetTimeStamp() == timestampzone ) // Remove it, redundant, zone already found + { + m_Collector->Remove( ii ); + ii--; + } + else + { + timestampzone = item->GetTimeStamp(); + } + break; - // Found a TYPE ZONE - if( item->GetTimeStamp() == timestampzone ) // Remove it, redundant, zone already found - { - m_Collector->Remove( ii ); - ii--; - } - else - { - timestampzone = item->GetTimeStamp(); + case PCB_ZONE_AREA_T: + { + /* We need to do the selection now because the menu text + * depends on it */ + ZONE_CONTAINER *zone = static_cast( item ); + zone->SetSelectedCorner( RefPos( true ) ); + } + break; + + default: + break; } } diff --git a/pcbnew/dialogs/dialog_general_options.h b/pcbnew/dialogs/dialog_general_options.h index 7cdefdbe2e..89abaa7b1b 100644 --- a/pcbnew/dialogs/dialog_general_options.h +++ b/pcbnew/dialogs/dialog_general_options.h @@ -16,7 +16,7 @@ public: void OnOkClick( wxCommandEvent& event ); void OnCancelClick( wxCommandEvent& event ); - PCB_EDIT_FRAME* GetParent() { return (PCB_EDIT_FRAME*) wxDialog::GetParent(); } + PCB_EDIT_FRAME* GetParent() const { return (PCB_EDIT_FRAME*) wxDialog::GetParent(); } private: void OnMiddleBtnPanEnbl( wxCommandEvent& event ) diff --git a/pcbnew/eagle_plugin.cpp b/pcbnew/eagle_plugin.cpp index a78007761b..4f93574ab2 100644 --- a/pcbnew/eagle_plugin.cpp +++ b/pcbnew/eagle_plugin.cpp @@ -2234,6 +2234,8 @@ void EAGLE_PLUGIN::packageCircle( MODULE* aModule, CPTREE& aTree ) const case ECO1_N: layer = SILKSCREEN_N_FRONT; break; case ECO2_N: layer = SILKSCREEN_N_BACK; break; */ + default: + break; } gr->SetLayer( layer ); diff --git a/pcbnew/onrightclick.cpp b/pcbnew/onrightclick.cpp index c66adc4c64..372538c1b1 100644 --- a/pcbnew/onrightclick.cpp +++ b/pcbnew/onrightclick.cpp @@ -661,14 +661,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( RefPos( true ) ) ) + if( edge_zone->HitTestForCorner( RefPos( true ) ) >= 0 ) { 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( RefPos( true ) ) ) + else if( edge_zone->HitTestForEdge( RefPos( true ) ) >= 0 ) { AddMenuItem( zones_menu, ID_POPUP_PCB_ADD_ZONE_CORNER, _( "Create Corner" ), KiBitmap( add_corner_xpm ) ); diff --git a/pcbnew/router/pns_node.cpp b/pcbnew/router/pns_node.cpp index e2349c4800..825be77e57 100644 --- a/pcbnew/router/pns_node.cpp +++ b/pcbnew/router/pns_node.cpp @@ -401,9 +401,9 @@ struct hitVisitor { PNS_ITEMSET& m_items; const VECTOR2I& m_point; - PNS_NODE* m_world; + const PNS_NODE* m_world; - hitVisitor( PNS_ITEMSET& aTab, const VECTOR2I& aPoint, PNS_NODE* aWorld ) : + hitVisitor( PNS_ITEMSET& aTab, const VECTOR2I& aPoint, const PNS_NODE* aWorld ) : m_items( aTab ), m_point( aPoint ), m_world( aWorld ) {}; bool operator()( PNS_ITEM* aItem ) @@ -423,7 +423,7 @@ struct hitVisitor }; -const PNS_ITEMSET PNS_NODE::HitTest( const VECTOR2I& aPoint ) +const PNS_ITEMSET PNS_NODE::HitTest( const VECTOR2I& aPoint ) const { PNS_ITEMSET items; // fixme: we treat a point as an infinitely small circle - this is inefficient. diff --git a/pcbnew/router/pns_node.h b/pcbnew/router/pns_node.h index f88b74bd4f..de3e886dc2 100644 --- a/pcbnew/router/pns_node.h +++ b/pcbnew/router/pns_node.h @@ -140,7 +140,7 @@ public: int aKindMask = PNS_ITEM::ANY ); ///> Hit detection - const PNS_ITEMSET HitTest( const VECTOR2I& aPoint ); + const PNS_ITEMSET HitTest( const VECTOR2I& aPoint ) const; void Add( PNS_ITEM* aItem ); void Remove( PNS_ITEM* aItem ); diff --git a/pcbnew/zones_by_polygon.cpp b/pcbnew/zones_by_polygon.cpp index 44f669fce8..7b40a598e8 100644 --- a/pcbnew/zones_by_polygon.cpp +++ b/pcbnew/zones_by_polygon.cpp @@ -433,9 +433,9 @@ void Abort_Zone_Move_Corner_Or_Outlines( EDA_DRAW_PANEL* Panel, wxDC* DC ) } else if( zone->IsDragging() ) { - wxPoint offset; - offset = s_CornerInitialPosition - s_CursorLastPosition; - zone->MoveEdge( offset ); + wxPoint offset = s_CornerInitialPosition - s_CursorLastPosition; + int selection = zone->GetSelectedCorner(); + zone->MoveEdge( offset, selection ); } else { @@ -485,9 +485,9 @@ void Show_Zone_Corner_Or_Outline_While_Move_Mouse( EDA_DRAW_PANEL* aPanel, wxDC* } else if( zone->IsDragging() ) { - wxPoint offset; - offset = pos - s_CursorLastPosition; - zone->MoveEdge( offset ); + wxPoint offset = pos - s_CursorLastPosition; + int selection = zone->GetSelectedCorner(); + zone->MoveEdge( offset, selection ); s_CursorLastPosition = pos; } else diff --git a/polygon/polygon_test_point_inside.cpp b/polygon/polygon_test_point_inside.cpp index aafade407c..f63d9ba9d7 100644 --- a/polygon/polygon_test_point_inside.cpp +++ b/polygon/polygon_test_point_inside.cpp @@ -96,7 +96,7 @@ bool TestPointInsidePolygon( const CPOLYGONS_LIST& aPolysList, /* Function TestPointInsidePolygon (overlaid) * same as previous, but use wxPoint and aCount corners */ -bool TestPointInsidePolygon( wxPoint *aPolysList, int aCount,wxPoint aRefPoint ) +bool TestPointInsidePolygon( const wxPoint *aPolysList, int aCount, const wxPoint &aRefPoint ) { // count intersection points to right of (refx,refy). If odd number, point (refx,refy) is inside polyline int ics, ice; diff --git a/polygon/polygon_test_point_inside.h b/polygon/polygon_test_point_inside.h index b817380d1c..ff43798159 100644 --- a/polygon/polygon_test_point_inside.h +++ b/polygon/polygon_test_point_inside.h @@ -34,6 +34,6 @@ bool TestPointInsidePolygon( const CPOLYGONS_LIST& aPolysList, * @param aRefPoint: the point coordinate to test * @return true if the point is inside, false for outside */ -bool TestPointInsidePolygon( wxPoint* aPolysList, +bool TestPointInsidePolygon( const wxPoint* aPolysList, int aCount, - wxPoint aRefPoint ); + const wxPoint &aRefPoint ); From fa5a6e5dd2f8c8def7b93950d58adbfa11a997a0 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Sun, 4 May 2014 20:20:49 +0200 Subject: [PATCH 343/741] Clearing m_hiddentItems to avoid PNS crashes. --- pcbnew/router/pns_router.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index 72d4cb7960..9a57b50b16 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -470,6 +470,8 @@ void PNS_ROUTER::EraseView() item->ViewSetVisible( true ); } + m_hiddenItems.clear(); + if( m_previewItems ) { m_previewItems->FreeItems(); From fef168aaed9cf6283fadf9eb9de0d0feeee1b301 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Sun, 4 May 2014 13:22:27 -0500 Subject: [PATCH 344/741] Modular-Kicad milestone B), minor portions: *) KIWAY_PLAYER::IsModal() is now a retained state, controlled by SetModal() *) Fully re-work the KIWAY_PLAYER::ShowModal() to use a nested event loop. *) Add support to DIALOG_SHIM for a "quasi-modal" dialog presentation and mode. See top of dialog_shim.cpp about that for benefits and need. *) You can now pick footprint from the schematic component field dialog, although if you do this before you open the BOARD, you will only get the global footprint libraries, not also the project specific ones. Opening the BOARD first avoids this problem. This is the first example of cross KIFACE invocation, it is also the first instance of using a TOP_FRAME other than FRAME_PCB as the first thing. It works, but it's missing support for opening the project specific table because historically the FRAME_PCB did that. This is now starting to expose all the near term needs for KIWAY_PLAYER <-> PROJECT interaction, independence and out of sequence usage. A fix for this will be coming in a few days. However it mostly starts to show why the KIWAY is terribly useful and important. --- common/basicframe.cpp | 11 ++ common/dialog_shim.cpp | 126 +++++++++++++++++- common/kiway_player.cpp | 71 +++++----- .../dialog_edit_component_in_schematic.cpp | 35 +++-- eeschema/getpart.cpp | 15 ++- eeschema/tool_viewlib.cpp | 11 +- eeschema/viewlib_frame.cpp | 3 + include/dialog_shim.h | 16 ++- include/kiway_player.h | 7 +- include/wxstruct.h | 4 +- pcbnew/footprint_wizard_frame.cpp | 5 +- pcbnew/modview_frame.cpp | 6 +- pcbnew/tool_modview.cpp | 6 +- 13 files changed, 245 insertions(+), 71 deletions(-) diff --git a/common/basicframe.cpp b/common/basicframe.cpp index 37be1fd12c..2fb7d4c604 100644 --- a/common/basicframe.cpp +++ b/common/basicframe.cpp @@ -151,6 +151,17 @@ bool EDA_BASE_FRAME::ProcessEvent( wxEvent& aEvent ) } +bool EDA_BASE_FRAME::Enable( bool enable ) +{ +#if defined(DEBUG) + const char* type_id = typeid( *this ).name(); + printf( "wxFrame %s: %s\n", type_id, enable ? "enabled" : "disabled" ); +#endif + + return wxFrame::Enable( enable ); +} + + void EDA_BASE_FRAME::onAutoSaveTimer( wxTimerEvent& aEvent ) { if( !doAutoSave() ) diff --git a/common/dialog_shim.cpp b/common/dialog_shim.cpp index 354444c4ff..8c1d94e794 100644 --- a/common/dialog_shim.cpp +++ b/common/dialog_shim.cpp @@ -25,17 +25,45 @@ #include #include +#include + +/* + Quasi-Modal Mode Explained: + + The gtk calls in wxDialog::ShowModal() cause event routing problems if that + modal dialog then tries to use KIWAY_PLAYER::ShowModal(). The latter shows up + and mostly works but does not respond to the window decoration close button. + There is no way to get around this without reversing the gtk calls temporarily. + + Quasi-Modal mode is our own almost modal mode which disables only the parent + of the DIALOG_SHIM, leaving other frames operable and while staying captured in the + nested event loop. This avoids the gtk calls and leaves event routing pure + and sufficient to operate the KIWAY_PLAYER::ShowModal() properly. When using + ShowQuasiModal() you have to use EndQuasiModal() in your dialogs and not + EndModal(). There is also IsQuasiModal() but its value can only be true + when the nested event loop is active. Do not mix the modal and quasi-modal + functions. Use one set or the other. + + You might find this behavior preferable over a pure modal mode, and it was said + that only the Mac has this natively, but now other platforms have something + similar. You CAN use it anywhere for any dialog. But you MUST use it when + you want to use KIWAY_PLAYER::ShowModal() from a dialog event. +*/ + + DIALOG_SHIM::DIALOG_SHIM( wxWindow* aParent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxDialog( aParent, id, title, pos, size, style, name ), - KIWAY_HOLDER( 0 ) + KIWAY_HOLDER( 0 ), + m_qmodal_loop( 0 ), + m_qmodal_showing( false ) { // pray that aParent is either a KIWAY_PLAYER or DIALOG_SHIM derivation. KIWAY_HOLDER* h = dynamic_cast( aParent ); wxASSERT_MSG( h, - wxT( "DIALOG_SHIM's parent not derived from KIWAY_PLAYER nor DIALOG_SHIM" ) ); + wxT( "DIALOG_SHIM's parent is NULL or not derived from KIWAY_PLAYER nor DIALOG_SHIM" ) ); if( h ) SetKiway( this, &h->Kiway() ); @@ -46,6 +74,14 @@ DIALOG_SHIM::DIALOG_SHIM( wxWindow* aParent, wxWindowID id, const wxString& titl } +DIALOG_SHIM::~DIALOG_SHIM() +{ + // if the dialog is quasi-modal, this will end its event loop + if( IsQuasiModal() ) + EndQuasiModal( wxID_CANCEL ); +} + + // our hashtable is an implementation secret, don't need or want it in a header file #include #include // EDA_RECT @@ -92,6 +128,90 @@ bool DIALOG_SHIM::Show( bool show ) } +bool DIALOG_SHIM::Enable( bool enable ) +{ +#if defined(DEBUG) + const char* type_id = typeid( *this ).name(); + printf( "wxDialog %s: %s\n", type_id, enable ? "enabled" : "disabled" ); +#endif + + return wxDialog::Enable( enable ); +} + + +int DIALOG_SHIM::ShowQuasiModal() +{ + // toggle a window's "enable" status to disabled, then enabled on exit. + // exception safe. + struct ENABLE_DISABLE + { + wxWindow* m_win; + ENABLE_DISABLE( wxWindow* aWindow ) : m_win( aWindow ) { if( m_win ) m_win->Disable(); } + ~ENABLE_DISABLE() { if( m_win ) m_win->Enable(); } + }; + + // This is an exception safe way to zero a pointer before returning. + // Yes, even though DismissModal() clears this first normally, this is + // here in case there's an exception before the dialog is dismissed. + struct NULLER + { + void*& m_what; + NULLER( void*& aPtr ) : m_what( aPtr ) {} + ~NULLER() { m_what = 0; } // indeed, set it to NULL on destruction + } clear_this( (void*&) m_qmodal_loop ); + + + // release the mouse if it's currently captured as the window having it + // will be disabled when this dialog is shown -- but will still keep the + // capture making it impossible to do anything in the modal dialog itself + wxWindow* win = wxWindow::GetCapture(); + if( win ) + win->ReleaseMouse(); + + wxWindow* parent = GetParentForModalDialog(); + + ENABLE_DISABLE toggle( parent ); + + Show( true ); + + m_qmodal_showing = true; + + wxGUIEventLoop event_loop; + wxEventLoopActivator event_loop_stacker( &event_loop ); + + m_qmodal_loop = &event_loop; + + event_loop.Run(); + + if( toggle.m_win ) // let's focus back on the parent window + toggle.m_win->SetFocus(); + + return GetReturnCode(); +} + + +void DIALOG_SHIM::EndQuasiModal( int retCode ) +{ + SetReturnCode( retCode ); + + if( !IsQuasiModal() ) + { + wxFAIL_MSG( "either DIALOG_SHIM::EndQuasiModal called twice or ShowQuasiModal wasn't called" ); + return; + } + + m_qmodal_showing = false; + + if( m_qmodal_loop ) + { + m_qmodal_loop->Exit(); + m_qmodal_loop = NULL; + } + + Show( false ); +} + + #if DLGSHIM_USE_SETFOCUS static bool findWindowRecursively( const wxWindowList& children, const wxWindow* wanted ) @@ -113,7 +233,7 @@ static bool findWindowRecursively( const wxWindowList& children, const wxWindow* } -static bool findWindowRecursively( const wxWindow* topmost, const wxWindow* wanted ) +static bool findWindowReursively( const wxWindow* topmost, const wxWindow* wanted ) { // wanted may be NULL and that is ok. diff --git a/common/kiway_player.cpp b/common/kiway_player.cpp index 274e4e564c..d171744227 100644 --- a/common/kiway_player.cpp +++ b/common/kiway_player.cpp @@ -23,13 +23,14 @@ */ - #include #include #include #include +#include #include #include +#include BEGIN_EVENT_TABLE( KIWAY_PLAYER, EDA_BASE_FRAME ) @@ -43,10 +44,10 @@ KIWAY_PLAYER::KIWAY_PLAYER( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrameType long aStyle, const wxString& aWdoName ) : EDA_BASE_FRAME( aParent, aFrameType, aTitle, aPos, aSize, aStyle, aWdoName ), KIWAY_HOLDER( aKiway ), - m_modal_dismissed( 0 ) + m_modal( false ), + m_modal_loop( 0 ) { - DBG( printf("KIWAY_EXPRESS::wxEVENT_ID:%d\n", KIWAY_EXPRESS::wxEVENT_ID );) - //Connect( KIWAY_EXPRESS::wxEVENT_ID, wxKiwayExressHandler( KIWAY_PLAYER::kiway_express ) ); + // DBG( printf("KIWAY_EXPRESS::wxEVENT_ID:%d\n", KIWAY_EXPRESS::wxEVENT_ID );) } @@ -55,10 +56,10 @@ KIWAY_PLAYER::KIWAY_PLAYER( wxWindow* aParent, wxWindowID aId, const wxString& a const wxString& aWdoName ) : EDA_BASE_FRAME( aParent, (FRAME_T) aId, aTitle, aPos, aSize, aStyle, aWdoName ), KIWAY_HOLDER( 0 ), - m_modal_dismissed( 0 ) + m_modal( false ), + m_modal_loop( 0 ) { - DBG( printf("KIWAY_EXPRESS::wxEVENT_ID:%d\n", KIWAY_EXPRESS::wxEVENT_ID );) - //Connect( KIWAY_EXPRESS::wxEVENT_ID, wxKiwayExressHandler( KIWAY_PLAYER::kiway_express ) ); + // DBG( printf("KIWAY_EXPRESS::wxEVENT_ID:%d\n", KIWAY_EXPRESS::wxEVENT_ID );) } @@ -73,49 +74,54 @@ void KIWAY_PLAYER::KiwayMailIn( KIWAY_EXPRESS& aEvent ) bool KIWAY_PLAYER::ShowModal( wxString* aResult ) { + wxASSERT_MSG( IsModal(), "ShowModal() shouldn't be called on non-modal frame" ); + /* - This function has a nice interface but an unsightly implementation. - Now it is encapsulated, making it easier to improve. I am not sure - a wxSemaphore was needed, especially since no blocking happens. It seems - like a volatile bool is sufficient. + This function has a nice interface but a necessarily unsightly implementation. + Now the implementation is encapsulated, localizing future changes. It works in tandem with DismissModal(). But only ShowModal() is in the vtable and therefore cross-module capable. */ - volatile bool dismissed = false; + // This is an exception safe way to zero a pointer before returning. + // Yes, even though DismissModal() clears this first normally, this is + // here in case there's an exception before the dialog is dismissed. + struct NULLER + { + void*& m_what; + NULLER( void*& aPtr ) : m_what( aPtr ) {} + ~NULLER() { m_what = 0; } // indeed, set it to NULL on destruction + } clear_this( (void*&) m_modal_loop ); - // disable all frames except the modal one, re-enable on exit, exception safe. + // exception safe way to disable all frames except the modal one, + // re-enable on exit wxWindowDisabler toggle( this ); - m_modal_dismissed = &dismissed; - Show( true ); - Raise(); - // Wait for the one and only active frame to call DismissModal() from - // some concluding event. - while( !dismissed ) - { - wxYield(); - wxMilliSleep( 50 ); - } + wxGUIEventLoop event_loop; + wxEventLoopActivator event_loop_stacker( &event_loop ); - // no longer modal, not to mention that the pointer would be invalid outside this scope. - m_modal_dismissed = NULL; + m_modal_loop = &event_loop; + + event_loop.Run(); if( aResult ) *aResult = m_modal_string; + DBG(printf( "~%s: aResult:'%s' ret:%d\n", + __func__, TO_UTF8( m_modal_string ), m_modal_ret_val );) + return m_modal_ret_val; } bool KIWAY_PLAYER::IsDismissed() { - // if already dismissed, then m_modal_dismissed may be NULL, and if not, - // it can still be dismissed if the bool is true. - bool ret = !m_modal_dismissed || *m_modal_dismissed; + bool ret = !m_modal_loop; + + DBG(printf( "%s: ret:%d\n", __func__, ret );) return ret; } @@ -126,8 +132,13 @@ void KIWAY_PLAYER::DismissModal( bool aRetVal, const wxString& aResult ) m_modal_ret_val = aRetVal; m_modal_string = aResult; - if( m_modal_dismissed ) - *m_modal_dismissed = true; + if( m_modal_loop ) + { + m_modal_loop->Exit(); + m_modal_loop = 0; // this marks it as dismissed. + } + + Show( false ); } diff --git a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp index 4fc02d14fb..cb9fcbc4ee 100644 --- a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp +++ b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp @@ -148,10 +148,10 @@ void SCH_EDIT_FRAME::EditComponent( SCH_COMPONENT* aComponent ) // make sure the chipnameTextCtrl is wide enough to hold any unusually long chip names: EnsureTextCtrlWidth( dlg->chipnameTextCtrl ); - dlg->ShowModal(); + dlg->ShowQuasiModal(); - m_canvas->MoveCursorToCrossHair(); m_canvas->SetIgnoreMouseEvents( false ); + m_canvas->MoveCursorToCrossHair(); dlg->Destroy(); } @@ -214,7 +214,7 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnListItemSelected( wxListEvent& event void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnCancelButtonClick( wxCommandEvent& event ) { - EndModal( 1 ); + EndQuasiModal( 1 ); } @@ -379,7 +379,7 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnOKButtonClick( wxCommandEvent& event m_Parent->GetScreen()->TestDanglingEnds(); m_Parent->GetCanvas()->Refresh( true ); - EndModal( 0 ); + EndQuasiModal( 0 ); } @@ -436,23 +436,21 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::deleteFieldButtonHandler( wxCommandEven void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::showButtonHandler( wxCommandEvent& event ) { -#if 1 +#if 0 wxString datasheet_uri = fieldValueTextCtrl->GetValue(); ::wxLaunchDefaultBrowser( datasheet_uri ); #else - unsigned fieldNdx = getSelectedFieldNdx(); -/* + unsigned fieldNdx = getSelectedFieldNdx(); if( fieldNdx == DATASHEET ) { wxString datasheet_uri = fieldValueTextCtrl->GetValue(); ::wxLaunchDefaultBrowser( datasheet_uri ); } else if( fieldNdx == FOOTPRINT ) -*/ { - // pick a footprint + // pick a footprint using the footprint picker. wxString fpid; KIWAY_PLAYER* frame = Kiway().Player( FRAME_PCB_MODULE_VIEWER_MODAL, true ); @@ -460,11 +458,11 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::showButtonHandler( wxCommandEvent& even if( frame->ShowModal( &fpid ) ) { printf( "%s: %s\n", __func__, TO_UTF8( fpid ) ); + fieldValueTextCtrl->SetValue( fpid ); + } - frame->Show( false ); // keep the frame open, but hidden. - - Raise(); + frame->Destroy(); } #endif @@ -764,7 +762,16 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copySelectedFieldToPanel() fieldValueTextCtrl->SetValue( field.GetText() ); - m_show_datasheet_button->Enable( fieldNdx == DATASHEET ); + m_show_datasheet_button->Enable( fieldNdx == DATASHEET || fieldNdx == FOOTPRINT ); + + if( fieldNdx == DATASHEET ) + m_show_datasheet_button->SetLabel( _( "Show in Browser" ) ); + else if( fieldNdx == FOOTPRINT ) + m_show_datasheet_button->SetLabel( _( "Assign Footprint" ) ); + else + m_show_datasheet_button->SetLabel( wxEmptyString ); + + m_show_datasheet_button->Enable( fieldNdx == DATASHEET || fieldNdx == FOOTPRINT ); // For power symbols, the value is NOR editable, because value and pin // name must be same and can be edited only in library editor @@ -1006,5 +1013,5 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::SetInitCmp( wxCommandEvent& event ) m_Parent->OnModify(); m_Cmp->Draw( m_Parent->GetCanvas(), &dc, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE ); - EndModal( 1 ); + EndQuasiModal( 1 ); } diff --git a/eeschema/getpart.cpp b/eeschema/getpart.cpp index e977eee5c1..e81d028bfa 100644 --- a/eeschema/getpart.cpp +++ b/eeschema/getpart.cpp @@ -56,7 +56,7 @@ wxString SCH_BASE_FRAME::SelectComponentFromLibBrowser( LIB_ALIAS* aPreselectedAlias, int* aUnit, int* aConvert ) { - // Close the any current non-modal Lib browser if open, and open a new one, in "modal" mode: + // Close any open non-modal Lib browser, and open a new one, in "modal" mode: LIB_VIEW_FRAME* viewlibFrame = (LIB_VIEW_FRAME*) Kiway().Player( FRAME_SCH_VIEWER, false ); if( viewlibFrame ) viewlibFrame->Destroy(); @@ -79,13 +79,14 @@ wxString SCH_BASE_FRAME::SelectComponentFromLibBrowser( LIB_ALIAS* aPreselectedA wxString cmpname; - viewlibFrame->ShowModal( &cmpname ); + if( viewlibFrame->ShowModal( &cmpname ) ) + { + if( aUnit ) + *aUnit = viewlibFrame->GetUnit(); - if( aUnit ) - *aUnit = viewlibFrame->GetUnit(); - - if( aConvert ) - *aConvert = viewlibFrame->GetConvert(); + if( aConvert ) + *aConvert = viewlibFrame->GetConvert(); + } viewlibFrame->Destroy(); diff --git a/eeschema/tool_viewlib.cpp b/eeschema/tool_viewlib.cpp index f929ad5c28..e1982ca1ca 100644 --- a/eeschema/tool_viewlib.cpp +++ b/eeschema/tool_viewlib.cpp @@ -116,8 +116,7 @@ void LIB_VIEW_FRAME::ReCreateHToolbar() _( "View component documents" ) ); m_mainToolBar->EnableTool( ID_LIBVIEW_VIEWDOC, false ); - // if library browser is modal - if( m_Ident == FRAME_SCH_VIEWER_MODAL ) + if( IsModal() ) { m_mainToolBar->AddSeparator(); m_mainToolBar->AddTool( ID_LIBVIEW_CMP_EXPORT_TO_SCHEMATIC, @@ -130,11 +129,11 @@ void LIB_VIEW_FRAME::ReCreateHToolbar() m_mainToolBar->Realize(); } - if( (m_libraryName != wxEmptyString) && (m_entryName != wxEmptyString) ) + if( m_libraryName.size() && m_entryName.size() ) { lib = CMP_LIBRARY::FindLibrary( m_libraryName ); - if( lib != NULL ) + if( lib ) { component = lib->FindComponent( m_entryName ); @@ -161,7 +160,6 @@ void LIB_VIEW_FRAME::ReCreateHToolbar() m_mainToolBar->ToggleTool( ID_LIBVIEW_DE_MORGAN_CONVERT_BUTT, false ); } - int parts_count = 1; if( component ) @@ -171,8 +169,7 @@ void LIB_VIEW_FRAME::ReCreateHToolbar() for( ii = 0; ii < parts_count; ii++ ) { - wxString msg; - msg.Printf( _( "Unit %c" ), 'A' + ii ); + wxString msg = wxString::Format( _( "Unit %c" ), 'A' + ii ); m_selpartBox->Append( msg ); } diff --git a/eeschema/viewlib_frame.cpp b/eeschema/viewlib_frame.cpp index e4af57c174..e8b368c118 100644 --- a/eeschema/viewlib_frame.cpp +++ b/eeschema/viewlib_frame.cpp @@ -103,6 +103,9 @@ LIB_VIEW_FRAME::LIB_VIEW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrame { wxASSERT( aFrameType==FRAME_SCH_VIEWER || aFrameType==FRAME_SCH_VIEWER_MODAL ); + if( aFrameType == FRAME_SCH_VIEWER_MODAL ) + SetModal( true ); + wxAcceleratorTable table( ACCEL_TABLE_CNT, accels ); m_FrameName = GetLibViewerFrameName(); diff --git a/include/dialog_shim.h b/include/dialog_shim.h index cab1d5f0f7..ae906dc97b 100644 --- a/include/dialog_shim.h +++ b/include/dialog_shim.h @@ -56,12 +56,26 @@ public: const wxString& name = wxDialogNameStr ); - bool Show( bool show ); // overload wxDialog::Show + ~DIALOG_SHIM(); + int ShowQuasiModal(); // disable only the parent window, otherwise modal. + + void EndQuasiModal( int retCode ); // End quasi-modal mode + + bool IsQuasiModal() { return m_qmodal_showing; } + + bool Show( bool show ); // override wxDialog::Show + + bool Enable( bool enable ); // override wxDialog::Enable virtual protected: std::string m_hash_key; // alternate for class_map when classname re-used. + // variables for quasi-modal behavior support, only used by a few derivatives. + wxGUIEventLoop* m_qmodal_loop; // points to nested event_loop, NULL means not qmodal and dismissed + bool m_qmodal_showing; + + #if DLGSHIM_USE_SETFOCUS private: void onInit( wxInitDialogEvent& aEvent ); diff --git a/include/kiway_player.h b/include/kiway_player.h index 6a08e70ed0..ff20714bbc 100644 --- a/include/kiway_player.h +++ b/include/kiway_player.h @@ -87,6 +87,7 @@ private: class KIWAY_EXPRESS; +class wxGUIEventLoop; /** * Class KIWAY_PLAYER @@ -194,7 +195,8 @@ public: protected: - bool IsModal() { return m_modal_dismissed; } + bool IsModal() { return m_modal; } + void SetModal( bool IsModal ) { m_modal = IsModal; } /** * Function IsDismissed @@ -216,7 +218,8 @@ protected: void language_change( wxCommandEvent& event ); // variables for modal behavior support, only used by a few derivatives. - volatile bool* m_modal_dismissed; // points to "dismissed state", NULL means not modal + bool m_modal; // true if frame is intended to be modal, not modeless + wxGUIEventLoop* m_modal_loop; // points to nested event_loop, NULL means not modal and dismissed wxString m_modal_string; bool m_modal_ret_val; // true if a selection was made diff --git a/include/wxstruct.h b/include/wxstruct.h index 22153455a2..daffa56d67 100644 --- a/include/wxstruct.h +++ b/include/wxstruct.h @@ -190,7 +190,9 @@ public: * @warning If you override this function in a derived class, make sure you call * down to this or the auto save feature will be disabled. */ - bool ProcessEvent( wxEvent& aEvent ); // overload wxFrame::ProcessEvent() + bool ProcessEvent( wxEvent& aEvent ); // override wxFrame::ProcessEvent() + + bool Enable( bool enable ); // override wxFrame::Enable virtual void SetAutoSaveInterval( int aInterval ) { m_autoSaveInterval = aInterval; } diff --git a/pcbnew/footprint_wizard_frame.cpp b/pcbnew/footprint_wizard_frame.cpp index 7fac217892..0cff8d2bb1 100644 --- a/pcbnew/footprint_wizard_frame.cpp +++ b/pcbnew/footprint_wizard_frame.cpp @@ -125,6 +125,9 @@ FOOTPRINT_WIZARD_FRAME::FOOTPRINT_WIZARD_FRAME( KIWAY* aKiway, { wxASSERT( aFrameType==FRAME_PCB_FOOTPRINT_WIZARD_MODAL ); + if( aFrameType == FRAME_PCB_FOOTPRINT_WIZARD_MODAL ) + SetModal( true ); + wxAcceleratorTable table( ACCEL_TABLE_CNT, accels ); m_FrameName = FOOTPRINT_WIZARD_FRAME_NAME; @@ -641,7 +644,7 @@ void FOOTPRINT_WIZARD_FRAME::ReCreateHToolbar() m_mainToolBar->AddTool( ID_ZOOM_PAGE, wxEmptyString, KiBitmap( zoom_fit_in_page_xpm ), msg ); - if( m_Ident == FRAME_PCB_FOOTPRINT_WIZARD_MODAL ) + if( IsModal() ) { // The library browser is called from a "load component" command m_mainToolBar->AddSeparator(); diff --git a/pcbnew/modview_frame.cpp b/pcbnew/modview_frame.cpp index 1db99caf30..1bcbd5fcd5 100644 --- a/pcbnew/modview_frame.cpp +++ b/pcbnew/modview_frame.cpp @@ -129,6 +129,9 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent { wxASSERT( aFrameType==FRAME_PCB_MODULE_VIEWER || aFrameType==FRAME_PCB_MODULE_VIEWER_MODAL ); + if( aFrameType == FRAME_PCB_MODULE_VIEWER_MODAL ) + SetModal( true ); + wxAcceleratorTable table( DIM( accels ), accels ); m_FrameName = GetFootprintViewerFrameName(); @@ -271,6 +274,7 @@ const wxChar* FOOTPRINT_VIEWER_FRAME::GetFootprintViewerFrameName() void FOOTPRINT_VIEWER_FRAME::OnCloseWindow( wxCloseEvent& Event ) { + DBG(printf( "%s:\n", __func__ );) if( IsModal() ) { // Only dismiss a modal frame once, so that the return values set by @@ -278,7 +282,7 @@ void FOOTPRINT_VIEWER_FRAME::OnCloseWindow( wxCloseEvent& Event ) if( !IsDismissed() ) DismissModal( false ); - // window will be destroyed by the calling function. + // window to be destroyed by the caller of KIWAY_PLAYER::ShowModal() } else Destroy(); diff --git a/pcbnew/tool_modview.cpp b/pcbnew/tool_modview.cpp index 3994a2a96d..3101864a0c 100644 --- a/pcbnew/tool_modview.cpp +++ b/pcbnew/tool_modview.cpp @@ -48,8 +48,7 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateHToolbar() { m_mainToolBar = new wxAuiToolBar( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_TB_DEFAULT_STYLE - | wxAUI_TB_OVERFLOW - ); + | wxAUI_TB_OVERFLOW ); // Set up toolbar m_mainToolBar->AddTool( ID_MODVIEW_SELECT_LIB, wxEmptyString, @@ -95,8 +94,7 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateHToolbar() m_mainToolBar->AddTool( ID_ZOOM_PAGE, wxEmptyString, KiBitmap( zoom_fit_in_page_xpm ), msg ); - // Enable this tool only if the library browser is intended for modal use. - if( m_Ident == FRAME_PCB_MODULE_VIEWER_MODAL ) + if( IsModal() ) { m_mainToolBar->AddSeparator(); m_mainToolBar->AddTool( ID_MODVIEW_FOOTPRINT_EXPORT_TO_BOARD, wxEmptyString, From a2227a75b4b837661fa1c2226af021e7862d510b Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Sun, 4 May 2014 13:22:27 -0500 Subject: [PATCH 345/741] Modular-Kicad milestone B), minor portions: *) KIWAY_PLAYER::IsModal() is now a retained state, controlled by SetModal() *) Fully re-work the KIWAY_PLAYER::ShowModal() to use a nested event loop. *) Add support to DIALOG_SHIM for a "quasi-modal" dialog presentation and mode. See top of dialog_shim.cpp about that for benefits and need. *) You can now pick footprint from the schematic component field dialog, although if you do this before you open the BOARD, you will only get the global footprint libraries, not also the project specific ones. Opening the BOARD first avoids this problem. This is the first example of cross KIFACE invocation, it is also the first instance of using a TOP_FRAME other than FRAME_PCB as the first thing. It works, but it's missing support for opening the project specific table because historically the FRAME_PCB did that. This is now starting to expose all the near term needs for KIWAY_PLAYER <-> PROJECT interaction, independence and out of sequence usage. A fix for this will be coming in a few days. However it mostly starts to show why the KIWAY is terribly useful and important. --- common/basicframe.cpp | 11 ++ common/dialog_shim.cpp | 126 +++++++++++++++++- common/kiway_player.cpp | 71 +++++----- .../dialog_edit_component_in_schematic.cpp | 35 +++-- eeschema/getpart.cpp | 15 ++- eeschema/tool_viewlib.cpp | 11 +- eeschema/viewlib_frame.cpp | 3 + include/dialog_shim.h | 16 ++- include/kiway_player.h | 7 +- include/wxstruct.h | 4 +- pcbnew/footprint_wizard_frame.cpp | 5 +- pcbnew/modview_frame.cpp | 6 +- pcbnew/tool_modview.cpp | 6 +- 13 files changed, 245 insertions(+), 71 deletions(-) diff --git a/common/basicframe.cpp b/common/basicframe.cpp index 37be1fd12c..2fb7d4c604 100644 --- a/common/basicframe.cpp +++ b/common/basicframe.cpp @@ -151,6 +151,17 @@ bool EDA_BASE_FRAME::ProcessEvent( wxEvent& aEvent ) } +bool EDA_BASE_FRAME::Enable( bool enable ) +{ +#if defined(DEBUG) + const char* type_id = typeid( *this ).name(); + printf( "wxFrame %s: %s\n", type_id, enable ? "enabled" : "disabled" ); +#endif + + return wxFrame::Enable( enable ); +} + + void EDA_BASE_FRAME::onAutoSaveTimer( wxTimerEvent& aEvent ) { if( !doAutoSave() ) diff --git a/common/dialog_shim.cpp b/common/dialog_shim.cpp index 354444c4ff..8c1d94e794 100644 --- a/common/dialog_shim.cpp +++ b/common/dialog_shim.cpp @@ -25,17 +25,45 @@ #include #include +#include + +/* + Quasi-Modal Mode Explained: + + The gtk calls in wxDialog::ShowModal() cause event routing problems if that + modal dialog then tries to use KIWAY_PLAYER::ShowModal(). The latter shows up + and mostly works but does not respond to the window decoration close button. + There is no way to get around this without reversing the gtk calls temporarily. + + Quasi-Modal mode is our own almost modal mode which disables only the parent + of the DIALOG_SHIM, leaving other frames operable and while staying captured in the + nested event loop. This avoids the gtk calls and leaves event routing pure + and sufficient to operate the KIWAY_PLAYER::ShowModal() properly. When using + ShowQuasiModal() you have to use EndQuasiModal() in your dialogs and not + EndModal(). There is also IsQuasiModal() but its value can only be true + when the nested event loop is active. Do not mix the modal and quasi-modal + functions. Use one set or the other. + + You might find this behavior preferable over a pure modal mode, and it was said + that only the Mac has this natively, but now other platforms have something + similar. You CAN use it anywhere for any dialog. But you MUST use it when + you want to use KIWAY_PLAYER::ShowModal() from a dialog event. +*/ + + DIALOG_SHIM::DIALOG_SHIM( wxWindow* aParent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxDialog( aParent, id, title, pos, size, style, name ), - KIWAY_HOLDER( 0 ) + KIWAY_HOLDER( 0 ), + m_qmodal_loop( 0 ), + m_qmodal_showing( false ) { // pray that aParent is either a KIWAY_PLAYER or DIALOG_SHIM derivation. KIWAY_HOLDER* h = dynamic_cast( aParent ); wxASSERT_MSG( h, - wxT( "DIALOG_SHIM's parent not derived from KIWAY_PLAYER nor DIALOG_SHIM" ) ); + wxT( "DIALOG_SHIM's parent is NULL or not derived from KIWAY_PLAYER nor DIALOG_SHIM" ) ); if( h ) SetKiway( this, &h->Kiway() ); @@ -46,6 +74,14 @@ DIALOG_SHIM::DIALOG_SHIM( wxWindow* aParent, wxWindowID id, const wxString& titl } +DIALOG_SHIM::~DIALOG_SHIM() +{ + // if the dialog is quasi-modal, this will end its event loop + if( IsQuasiModal() ) + EndQuasiModal( wxID_CANCEL ); +} + + // our hashtable is an implementation secret, don't need or want it in a header file #include #include // EDA_RECT @@ -92,6 +128,90 @@ bool DIALOG_SHIM::Show( bool show ) } +bool DIALOG_SHIM::Enable( bool enable ) +{ +#if defined(DEBUG) + const char* type_id = typeid( *this ).name(); + printf( "wxDialog %s: %s\n", type_id, enable ? "enabled" : "disabled" ); +#endif + + return wxDialog::Enable( enable ); +} + + +int DIALOG_SHIM::ShowQuasiModal() +{ + // toggle a window's "enable" status to disabled, then enabled on exit. + // exception safe. + struct ENABLE_DISABLE + { + wxWindow* m_win; + ENABLE_DISABLE( wxWindow* aWindow ) : m_win( aWindow ) { if( m_win ) m_win->Disable(); } + ~ENABLE_DISABLE() { if( m_win ) m_win->Enable(); } + }; + + // This is an exception safe way to zero a pointer before returning. + // Yes, even though DismissModal() clears this first normally, this is + // here in case there's an exception before the dialog is dismissed. + struct NULLER + { + void*& m_what; + NULLER( void*& aPtr ) : m_what( aPtr ) {} + ~NULLER() { m_what = 0; } // indeed, set it to NULL on destruction + } clear_this( (void*&) m_qmodal_loop ); + + + // release the mouse if it's currently captured as the window having it + // will be disabled when this dialog is shown -- but will still keep the + // capture making it impossible to do anything in the modal dialog itself + wxWindow* win = wxWindow::GetCapture(); + if( win ) + win->ReleaseMouse(); + + wxWindow* parent = GetParentForModalDialog(); + + ENABLE_DISABLE toggle( parent ); + + Show( true ); + + m_qmodal_showing = true; + + wxGUIEventLoop event_loop; + wxEventLoopActivator event_loop_stacker( &event_loop ); + + m_qmodal_loop = &event_loop; + + event_loop.Run(); + + if( toggle.m_win ) // let's focus back on the parent window + toggle.m_win->SetFocus(); + + return GetReturnCode(); +} + + +void DIALOG_SHIM::EndQuasiModal( int retCode ) +{ + SetReturnCode( retCode ); + + if( !IsQuasiModal() ) + { + wxFAIL_MSG( "either DIALOG_SHIM::EndQuasiModal called twice or ShowQuasiModal wasn't called" ); + return; + } + + m_qmodal_showing = false; + + if( m_qmodal_loop ) + { + m_qmodal_loop->Exit(); + m_qmodal_loop = NULL; + } + + Show( false ); +} + + #if DLGSHIM_USE_SETFOCUS static bool findWindowRecursively( const wxWindowList& children, const wxWindow* wanted ) @@ -113,7 +233,7 @@ static bool findWindowRecursively( const wxWindowList& children, const wxWindow* } -static bool findWindowRecursively( const wxWindow* topmost, const wxWindow* wanted ) +static bool findWindowReursively( const wxWindow* topmost, const wxWindow* wanted ) { // wanted may be NULL and that is ok. diff --git a/common/kiway_player.cpp b/common/kiway_player.cpp index 274e4e564c..d171744227 100644 --- a/common/kiway_player.cpp +++ b/common/kiway_player.cpp @@ -23,13 +23,14 @@ */ - #include #include #include #include +#include #include #include +#include BEGIN_EVENT_TABLE( KIWAY_PLAYER, EDA_BASE_FRAME ) @@ -43,10 +44,10 @@ KIWAY_PLAYER::KIWAY_PLAYER( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrameType long aStyle, const wxString& aWdoName ) : EDA_BASE_FRAME( aParent, aFrameType, aTitle, aPos, aSize, aStyle, aWdoName ), KIWAY_HOLDER( aKiway ), - m_modal_dismissed( 0 ) + m_modal( false ), + m_modal_loop( 0 ) { - DBG( printf("KIWAY_EXPRESS::wxEVENT_ID:%d\n", KIWAY_EXPRESS::wxEVENT_ID );) - //Connect( KIWAY_EXPRESS::wxEVENT_ID, wxKiwayExressHandler( KIWAY_PLAYER::kiway_express ) ); + // DBG( printf("KIWAY_EXPRESS::wxEVENT_ID:%d\n", KIWAY_EXPRESS::wxEVENT_ID );) } @@ -55,10 +56,10 @@ KIWAY_PLAYER::KIWAY_PLAYER( wxWindow* aParent, wxWindowID aId, const wxString& a const wxString& aWdoName ) : EDA_BASE_FRAME( aParent, (FRAME_T) aId, aTitle, aPos, aSize, aStyle, aWdoName ), KIWAY_HOLDER( 0 ), - m_modal_dismissed( 0 ) + m_modal( false ), + m_modal_loop( 0 ) { - DBG( printf("KIWAY_EXPRESS::wxEVENT_ID:%d\n", KIWAY_EXPRESS::wxEVENT_ID );) - //Connect( KIWAY_EXPRESS::wxEVENT_ID, wxKiwayExressHandler( KIWAY_PLAYER::kiway_express ) ); + // DBG( printf("KIWAY_EXPRESS::wxEVENT_ID:%d\n", KIWAY_EXPRESS::wxEVENT_ID );) } @@ -73,49 +74,54 @@ void KIWAY_PLAYER::KiwayMailIn( KIWAY_EXPRESS& aEvent ) bool KIWAY_PLAYER::ShowModal( wxString* aResult ) { + wxASSERT_MSG( IsModal(), "ShowModal() shouldn't be called on non-modal frame" ); + /* - This function has a nice interface but an unsightly implementation. - Now it is encapsulated, making it easier to improve. I am not sure - a wxSemaphore was needed, especially since no blocking happens. It seems - like a volatile bool is sufficient. + This function has a nice interface but a necessarily unsightly implementation. + Now the implementation is encapsulated, localizing future changes. It works in tandem with DismissModal(). But only ShowModal() is in the vtable and therefore cross-module capable. */ - volatile bool dismissed = false; + // This is an exception safe way to zero a pointer before returning. + // Yes, even though DismissModal() clears this first normally, this is + // here in case there's an exception before the dialog is dismissed. + struct NULLER + { + void*& m_what; + NULLER( void*& aPtr ) : m_what( aPtr ) {} + ~NULLER() { m_what = 0; } // indeed, set it to NULL on destruction + } clear_this( (void*&) m_modal_loop ); - // disable all frames except the modal one, re-enable on exit, exception safe. + // exception safe way to disable all frames except the modal one, + // re-enable on exit wxWindowDisabler toggle( this ); - m_modal_dismissed = &dismissed; - Show( true ); - Raise(); - // Wait for the one and only active frame to call DismissModal() from - // some concluding event. - while( !dismissed ) - { - wxYield(); - wxMilliSleep( 50 ); - } + wxGUIEventLoop event_loop; + wxEventLoopActivator event_loop_stacker( &event_loop ); - // no longer modal, not to mention that the pointer would be invalid outside this scope. - m_modal_dismissed = NULL; + m_modal_loop = &event_loop; + + event_loop.Run(); if( aResult ) *aResult = m_modal_string; + DBG(printf( "~%s: aResult:'%s' ret:%d\n", + __func__, TO_UTF8( m_modal_string ), m_modal_ret_val );) + return m_modal_ret_val; } bool KIWAY_PLAYER::IsDismissed() { - // if already dismissed, then m_modal_dismissed may be NULL, and if not, - // it can still be dismissed if the bool is true. - bool ret = !m_modal_dismissed || *m_modal_dismissed; + bool ret = !m_modal_loop; + + DBG(printf( "%s: ret:%d\n", __func__, ret );) return ret; } @@ -126,8 +132,13 @@ void KIWAY_PLAYER::DismissModal( bool aRetVal, const wxString& aResult ) m_modal_ret_val = aRetVal; m_modal_string = aResult; - if( m_modal_dismissed ) - *m_modal_dismissed = true; + if( m_modal_loop ) + { + m_modal_loop->Exit(); + m_modal_loop = 0; // this marks it as dismissed. + } + + Show( false ); } diff --git a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp index 4fc02d14fb..cb9fcbc4ee 100644 --- a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp +++ b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp @@ -148,10 +148,10 @@ void SCH_EDIT_FRAME::EditComponent( SCH_COMPONENT* aComponent ) // make sure the chipnameTextCtrl is wide enough to hold any unusually long chip names: EnsureTextCtrlWidth( dlg->chipnameTextCtrl ); - dlg->ShowModal(); + dlg->ShowQuasiModal(); - m_canvas->MoveCursorToCrossHair(); m_canvas->SetIgnoreMouseEvents( false ); + m_canvas->MoveCursorToCrossHair(); dlg->Destroy(); } @@ -214,7 +214,7 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnListItemSelected( wxListEvent& event void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnCancelButtonClick( wxCommandEvent& event ) { - EndModal( 1 ); + EndQuasiModal( 1 ); } @@ -379,7 +379,7 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnOKButtonClick( wxCommandEvent& event m_Parent->GetScreen()->TestDanglingEnds(); m_Parent->GetCanvas()->Refresh( true ); - EndModal( 0 ); + EndQuasiModal( 0 ); } @@ -436,23 +436,21 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::deleteFieldButtonHandler( wxCommandEven void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::showButtonHandler( wxCommandEvent& event ) { -#if 1 +#if 0 wxString datasheet_uri = fieldValueTextCtrl->GetValue(); ::wxLaunchDefaultBrowser( datasheet_uri ); #else - unsigned fieldNdx = getSelectedFieldNdx(); -/* + unsigned fieldNdx = getSelectedFieldNdx(); if( fieldNdx == DATASHEET ) { wxString datasheet_uri = fieldValueTextCtrl->GetValue(); ::wxLaunchDefaultBrowser( datasheet_uri ); } else if( fieldNdx == FOOTPRINT ) -*/ { - // pick a footprint + // pick a footprint using the footprint picker. wxString fpid; KIWAY_PLAYER* frame = Kiway().Player( FRAME_PCB_MODULE_VIEWER_MODAL, true ); @@ -460,11 +458,11 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::showButtonHandler( wxCommandEvent& even if( frame->ShowModal( &fpid ) ) { printf( "%s: %s\n", __func__, TO_UTF8( fpid ) ); + fieldValueTextCtrl->SetValue( fpid ); + } - frame->Show( false ); // keep the frame open, but hidden. - - Raise(); + frame->Destroy(); } #endif @@ -764,7 +762,16 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copySelectedFieldToPanel() fieldValueTextCtrl->SetValue( field.GetText() ); - m_show_datasheet_button->Enable( fieldNdx == DATASHEET ); + m_show_datasheet_button->Enable( fieldNdx == DATASHEET || fieldNdx == FOOTPRINT ); + + if( fieldNdx == DATASHEET ) + m_show_datasheet_button->SetLabel( _( "Show in Browser" ) ); + else if( fieldNdx == FOOTPRINT ) + m_show_datasheet_button->SetLabel( _( "Assign Footprint" ) ); + else + m_show_datasheet_button->SetLabel( wxEmptyString ); + + m_show_datasheet_button->Enable( fieldNdx == DATASHEET || fieldNdx == FOOTPRINT ); // For power symbols, the value is NOR editable, because value and pin // name must be same and can be edited only in library editor @@ -1006,5 +1013,5 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::SetInitCmp( wxCommandEvent& event ) m_Parent->OnModify(); m_Cmp->Draw( m_Parent->GetCanvas(), &dc, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE ); - EndModal( 1 ); + EndQuasiModal( 1 ); } diff --git a/eeschema/getpart.cpp b/eeschema/getpart.cpp index e977eee5c1..e81d028bfa 100644 --- a/eeschema/getpart.cpp +++ b/eeschema/getpart.cpp @@ -56,7 +56,7 @@ wxString SCH_BASE_FRAME::SelectComponentFromLibBrowser( LIB_ALIAS* aPreselectedAlias, int* aUnit, int* aConvert ) { - // Close the any current non-modal Lib browser if open, and open a new one, in "modal" mode: + // Close any open non-modal Lib browser, and open a new one, in "modal" mode: LIB_VIEW_FRAME* viewlibFrame = (LIB_VIEW_FRAME*) Kiway().Player( FRAME_SCH_VIEWER, false ); if( viewlibFrame ) viewlibFrame->Destroy(); @@ -79,13 +79,14 @@ wxString SCH_BASE_FRAME::SelectComponentFromLibBrowser( LIB_ALIAS* aPreselectedA wxString cmpname; - viewlibFrame->ShowModal( &cmpname ); + if( viewlibFrame->ShowModal( &cmpname ) ) + { + if( aUnit ) + *aUnit = viewlibFrame->GetUnit(); - if( aUnit ) - *aUnit = viewlibFrame->GetUnit(); - - if( aConvert ) - *aConvert = viewlibFrame->GetConvert(); + if( aConvert ) + *aConvert = viewlibFrame->GetConvert(); + } viewlibFrame->Destroy(); diff --git a/eeschema/tool_viewlib.cpp b/eeschema/tool_viewlib.cpp index f929ad5c28..e1982ca1ca 100644 --- a/eeschema/tool_viewlib.cpp +++ b/eeschema/tool_viewlib.cpp @@ -116,8 +116,7 @@ void LIB_VIEW_FRAME::ReCreateHToolbar() _( "View component documents" ) ); m_mainToolBar->EnableTool( ID_LIBVIEW_VIEWDOC, false ); - // if library browser is modal - if( m_Ident == FRAME_SCH_VIEWER_MODAL ) + if( IsModal() ) { m_mainToolBar->AddSeparator(); m_mainToolBar->AddTool( ID_LIBVIEW_CMP_EXPORT_TO_SCHEMATIC, @@ -130,11 +129,11 @@ void LIB_VIEW_FRAME::ReCreateHToolbar() m_mainToolBar->Realize(); } - if( (m_libraryName != wxEmptyString) && (m_entryName != wxEmptyString) ) + if( m_libraryName.size() && m_entryName.size() ) { lib = CMP_LIBRARY::FindLibrary( m_libraryName ); - if( lib != NULL ) + if( lib ) { component = lib->FindComponent( m_entryName ); @@ -161,7 +160,6 @@ void LIB_VIEW_FRAME::ReCreateHToolbar() m_mainToolBar->ToggleTool( ID_LIBVIEW_DE_MORGAN_CONVERT_BUTT, false ); } - int parts_count = 1; if( component ) @@ -171,8 +169,7 @@ void LIB_VIEW_FRAME::ReCreateHToolbar() for( ii = 0; ii < parts_count; ii++ ) { - wxString msg; - msg.Printf( _( "Unit %c" ), 'A' + ii ); + wxString msg = wxString::Format( _( "Unit %c" ), 'A' + ii ); m_selpartBox->Append( msg ); } diff --git a/eeschema/viewlib_frame.cpp b/eeschema/viewlib_frame.cpp index e4af57c174..e8b368c118 100644 --- a/eeschema/viewlib_frame.cpp +++ b/eeschema/viewlib_frame.cpp @@ -103,6 +103,9 @@ LIB_VIEW_FRAME::LIB_VIEW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrame { wxASSERT( aFrameType==FRAME_SCH_VIEWER || aFrameType==FRAME_SCH_VIEWER_MODAL ); + if( aFrameType == FRAME_SCH_VIEWER_MODAL ) + SetModal( true ); + wxAcceleratorTable table( ACCEL_TABLE_CNT, accels ); m_FrameName = GetLibViewerFrameName(); diff --git a/include/dialog_shim.h b/include/dialog_shim.h index cab1d5f0f7..ae906dc97b 100644 --- a/include/dialog_shim.h +++ b/include/dialog_shim.h @@ -56,12 +56,26 @@ public: const wxString& name = wxDialogNameStr ); - bool Show( bool show ); // overload wxDialog::Show + ~DIALOG_SHIM(); + int ShowQuasiModal(); // disable only the parent window, otherwise modal. + + void EndQuasiModal( int retCode ); // End quasi-modal mode + + bool IsQuasiModal() { return m_qmodal_showing; } + + bool Show( bool show ); // override wxDialog::Show + + bool Enable( bool enable ); // override wxDialog::Enable virtual protected: std::string m_hash_key; // alternate for class_map when classname re-used. + // variables for quasi-modal behavior support, only used by a few derivatives. + wxGUIEventLoop* m_qmodal_loop; // points to nested event_loop, NULL means not qmodal and dismissed + bool m_qmodal_showing; + + #if DLGSHIM_USE_SETFOCUS private: void onInit( wxInitDialogEvent& aEvent ); diff --git a/include/kiway_player.h b/include/kiway_player.h index 6a08e70ed0..ff20714bbc 100644 --- a/include/kiway_player.h +++ b/include/kiway_player.h @@ -87,6 +87,7 @@ private: class KIWAY_EXPRESS; +class wxGUIEventLoop; /** * Class KIWAY_PLAYER @@ -194,7 +195,8 @@ public: protected: - bool IsModal() { return m_modal_dismissed; } + bool IsModal() { return m_modal; } + void SetModal( bool IsModal ) { m_modal = IsModal; } /** * Function IsDismissed @@ -216,7 +218,8 @@ protected: void language_change( wxCommandEvent& event ); // variables for modal behavior support, only used by a few derivatives. - volatile bool* m_modal_dismissed; // points to "dismissed state", NULL means not modal + bool m_modal; // true if frame is intended to be modal, not modeless + wxGUIEventLoop* m_modal_loop; // points to nested event_loop, NULL means not modal and dismissed wxString m_modal_string; bool m_modal_ret_val; // true if a selection was made diff --git a/include/wxstruct.h b/include/wxstruct.h index 22153455a2..daffa56d67 100644 --- a/include/wxstruct.h +++ b/include/wxstruct.h @@ -190,7 +190,9 @@ public: * @warning If you override this function in a derived class, make sure you call * down to this or the auto save feature will be disabled. */ - bool ProcessEvent( wxEvent& aEvent ); // overload wxFrame::ProcessEvent() + bool ProcessEvent( wxEvent& aEvent ); // override wxFrame::ProcessEvent() + + bool Enable( bool enable ); // override wxFrame::Enable virtual void SetAutoSaveInterval( int aInterval ) { m_autoSaveInterval = aInterval; } diff --git a/pcbnew/footprint_wizard_frame.cpp b/pcbnew/footprint_wizard_frame.cpp index 7fac217892..0cff8d2bb1 100644 --- a/pcbnew/footprint_wizard_frame.cpp +++ b/pcbnew/footprint_wizard_frame.cpp @@ -125,6 +125,9 @@ FOOTPRINT_WIZARD_FRAME::FOOTPRINT_WIZARD_FRAME( KIWAY* aKiway, { wxASSERT( aFrameType==FRAME_PCB_FOOTPRINT_WIZARD_MODAL ); + if( aFrameType == FRAME_PCB_FOOTPRINT_WIZARD_MODAL ) + SetModal( true ); + wxAcceleratorTable table( ACCEL_TABLE_CNT, accels ); m_FrameName = FOOTPRINT_WIZARD_FRAME_NAME; @@ -641,7 +644,7 @@ void FOOTPRINT_WIZARD_FRAME::ReCreateHToolbar() m_mainToolBar->AddTool( ID_ZOOM_PAGE, wxEmptyString, KiBitmap( zoom_fit_in_page_xpm ), msg ); - if( m_Ident == FRAME_PCB_FOOTPRINT_WIZARD_MODAL ) + if( IsModal() ) { // The library browser is called from a "load component" command m_mainToolBar->AddSeparator(); diff --git a/pcbnew/modview_frame.cpp b/pcbnew/modview_frame.cpp index 1db99caf30..1bcbd5fcd5 100644 --- a/pcbnew/modview_frame.cpp +++ b/pcbnew/modview_frame.cpp @@ -129,6 +129,9 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent { wxASSERT( aFrameType==FRAME_PCB_MODULE_VIEWER || aFrameType==FRAME_PCB_MODULE_VIEWER_MODAL ); + if( aFrameType == FRAME_PCB_MODULE_VIEWER_MODAL ) + SetModal( true ); + wxAcceleratorTable table( DIM( accels ), accels ); m_FrameName = GetFootprintViewerFrameName(); @@ -271,6 +274,7 @@ const wxChar* FOOTPRINT_VIEWER_FRAME::GetFootprintViewerFrameName() void FOOTPRINT_VIEWER_FRAME::OnCloseWindow( wxCloseEvent& Event ) { + DBG(printf( "%s:\n", __func__ );) if( IsModal() ) { // Only dismiss a modal frame once, so that the return values set by @@ -278,7 +282,7 @@ void FOOTPRINT_VIEWER_FRAME::OnCloseWindow( wxCloseEvent& Event ) if( !IsDismissed() ) DismissModal( false ); - // window will be destroyed by the calling function. + // window to be destroyed by the caller of KIWAY_PLAYER::ShowModal() } else Destroy(); diff --git a/pcbnew/tool_modview.cpp b/pcbnew/tool_modview.cpp index 3994a2a96d..3101864a0c 100644 --- a/pcbnew/tool_modview.cpp +++ b/pcbnew/tool_modview.cpp @@ -48,8 +48,7 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateHToolbar() { m_mainToolBar = new wxAuiToolBar( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_TB_DEFAULT_STYLE - | wxAUI_TB_OVERFLOW - ); + | wxAUI_TB_OVERFLOW ); // Set up toolbar m_mainToolBar->AddTool( ID_MODVIEW_SELECT_LIB, wxEmptyString, @@ -95,8 +94,7 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateHToolbar() m_mainToolBar->AddTool( ID_ZOOM_PAGE, wxEmptyString, KiBitmap( zoom_fit_in_page_xpm ), msg ); - // Enable this tool only if the library browser is intended for modal use. - if( m_Ident == FRAME_PCB_MODULE_VIEWER_MODAL ) + if( IsModal() ) { m_mainToolBar->AddSeparator(); m_mainToolBar->AddTool( ID_MODVIEW_FOOTPRINT_EXPORT_TO_BOARD, wxEmptyString, From 19dd876684c14a674bd3f894a4c1765a0aeeae25 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Sun, 4 May 2014 14:57:44 -0500 Subject: [PATCH 346/741] wx 2.8 now builds, but the quasi-modal support seems broken on 2.8. Wanted others to be able to build at least. --- common/basicframe.cpp | 2 + common/dialog_shim.cpp | 87 +++++++++++++++++++++++++++++++++++++---- common/kiway_player.cpp | 2 +- include/dialog_shim.h | 16 +++++++- include/kiway_player.h | 12 +++++- 5 files changed, 108 insertions(+), 11 deletions(-) diff --git a/common/basicframe.cpp b/common/basicframe.cpp index 2fb7d4c604..dbcf15d9f9 100644 --- a/common/basicframe.cpp +++ b/common/basicframe.cpp @@ -153,6 +153,8 @@ bool EDA_BASE_FRAME::ProcessEvent( wxEvent& aEvent ) bool EDA_BASE_FRAME::Enable( bool enable ) { + // so we can do logging of this state change: + #if defined(DEBUG) const char* type_id = typeid( *this ).name(); printf( "wxFrame %s: %s\n", type_id, enable ? "enabled" : "disabled" ); diff --git a/common/dialog_shim.cpp b/common/dialog_shim.cpp index 8c1d94e794..548a91cdb4 100644 --- a/common/dialog_shim.cpp +++ b/common/dialog_shim.cpp @@ -130,6 +130,8 @@ bool DIALOG_SHIM::Show( bool show ) bool DIALOG_SHIM::Enable( bool enable ) { + // so we can do logging of this state change: + #if defined(DEBUG) const char* type_id = typeid( *this ).name(); printf( "wxDialog %s: %s\n", type_id, enable ? "enabled" : "disabled" ); @@ -139,6 +141,73 @@ bool DIALOG_SHIM::Enable( bool enable ) } +#if !wxCHECK_VERSION( 2, 9, 4 ) +wxWindow* DIALOG_SHIM::CheckIfCanBeUsedAsParent( wxWindow* parent ) const +{ + if ( !parent ) + return NULL; + + extern WXDLLIMPEXP_DATA_BASE(wxList) wxPendingDelete; + + if ( wxPendingDelete.Member(parent) || parent->IsBeingDeleted() ) + { + // this window is being deleted and we shouldn't create any children + // under it + return NULL; + } + + if ( parent->GetExtraStyle() & wxWS_EX_TRANSIENT ) + { + // this window is not being deleted yet but it's going to disappear + // soon so still don't parent this window under it + return NULL; + } + + if ( !parent->IsShownOnScreen() ) + { + // using hidden parent won't work correctly neither + return NULL; + } + + // FIXME-VC6: this compiler requires an explicit const cast or it fails + // with error C2446 + if ( const_cast(parent) == this ) + { + // not sure if this can really happen but it doesn't hurt to guard + // against this clearly invalid situation + return NULL; + } + + return parent; +} + + +wxWindow* DIALOG_SHIM::GetParentForModalDialog(wxWindow *parent, long style) const +{ + // creating a parent-less modal dialog will result (under e.g. wxGTK2) + // in an unfocused dialog, so try to find a valid parent for it unless we + // were explicitly asked not to + if ( style & wxDIALOG_NO_PARENT ) + return NULL; + + // first try the given parent + if ( parent ) + parent = CheckIfCanBeUsedAsParent(wxGetTopLevelParent(parent)); + + // then the currently active window + if ( !parent ) + parent = CheckIfCanBeUsedAsParent( + wxGetTopLevelParent(wxGetActiveWindow())); + + // and finally the application main window + if ( !parent ) + parent = CheckIfCanBeUsedAsParent(wxTheApp->GetTopWindow()); + + return parent; +} +#endif + + int DIALOG_SHIM::ShowQuasiModal() { // toggle a window's "enable" status to disabled, then enabled on exit. @@ -147,7 +216,14 @@ int DIALOG_SHIM::ShowQuasiModal() { wxWindow* m_win; ENABLE_DISABLE( wxWindow* aWindow ) : m_win( aWindow ) { if( m_win ) m_win->Disable(); } - ~ENABLE_DISABLE() { if( m_win ) m_win->Enable(); } + ~ENABLE_DISABLE() + { + if( m_win ) + { + m_win->Enable(); + m_win->SetFocus(); // let's focus back on the parent window + } + } }; // This is an exception safe way to zero a pointer before returning. @@ -168,7 +244,7 @@ int DIALOG_SHIM::ShowQuasiModal() if( win ) win->ReleaseMouse(); - wxWindow* parent = GetParentForModalDialog(); + wxWindow* parent = GetParentForModalDialog( GetParent(), GetWindowStyle() ); ENABLE_DISABLE toggle( parent ); @@ -176,16 +252,13 @@ int DIALOG_SHIM::ShowQuasiModal() m_qmodal_showing = true; - wxGUIEventLoop event_loop; + WX_EVENT_LOOP event_loop; wxEventLoopActivator event_loop_stacker( &event_loop ); m_qmodal_loop = &event_loop; event_loop.Run(); - if( toggle.m_win ) // let's focus back on the parent window - toggle.m_win->SetFocus(); - return GetReturnCode(); } @@ -233,7 +306,7 @@ static bool findWindowRecursively( const wxWindowList& children, const wxWindow* } -static bool findWindowReursively( const wxWindow* topmost, const wxWindow* wanted ) +static bool findWindowRecursively( const wxWindow* topmost, const wxWindow* wanted ) { // wanted may be NULL and that is ok. diff --git a/common/kiway_player.cpp b/common/kiway_player.cpp index d171744227..bd993efa0b 100644 --- a/common/kiway_player.cpp +++ b/common/kiway_player.cpp @@ -100,7 +100,7 @@ bool KIWAY_PLAYER::ShowModal( wxString* aResult ) Show( true ); - wxGUIEventLoop event_loop; + WX_EVENT_LOOP event_loop; wxEventLoopActivator event_loop_stacker( &event_loop ); m_modal_loop = &event_loop; diff --git a/include/dialog_shim.h b/include/dialog_shim.h index ae906dc97b..3e2ab62cee 100644 --- a/include/dialog_shim.h +++ b/include/dialog_shim.h @@ -35,6 +35,14 @@ #define DLGSHIM_USE_SETFOCUS 0 #endif +#if wxCHECK_VERSION( 2, 9, 4 ) + #define WX_EVENT_LOOP wxGUIEventLoop +#else + #define WX_EVENT_LOOP wxEventLoop +#endif + +class WX_EVENT_LOOP; + /** * Class DIALOG_SHIM @@ -69,10 +77,16 @@ public: bool Enable( bool enable ); // override wxDialog::Enable virtual protected: + +#if !wxCHECK_VERSION( 2, 9, 4 ) + wxWindow* CheckIfCanBeUsedAsParent( wxWindow* parent ) const; + wxWindow* GetParentForModalDialog( wxWindow *parent, long style ) const; +#endif + std::string m_hash_key; // alternate for class_map when classname re-used. // variables for quasi-modal behavior support, only used by a few derivatives. - wxGUIEventLoop* m_qmodal_loop; // points to nested event_loop, NULL means not qmodal and dismissed + WX_EVENT_LOOP* m_qmodal_loop; // points to nested event_loop, NULL means not qmodal and dismissed bool m_qmodal_showing; diff --git a/include/kiway_player.h b/include/kiway_player.h index ff20714bbc..e62981ab54 100644 --- a/include/kiway_player.h +++ b/include/kiway_player.h @@ -87,7 +87,15 @@ private: class KIWAY_EXPRESS; -class wxGUIEventLoop; + +#if wxCHECK_VERSION( 2, 9, 4 ) + #define WX_EVENT_LOOP wxGUIEventLoop +#else + #define WX_EVENT_LOOP wxEventLoop +#endif + +class WX_EVENT_LOOP; + /** * Class KIWAY_PLAYER @@ -219,7 +227,7 @@ protected: // variables for modal behavior support, only used by a few derivatives. bool m_modal; // true if frame is intended to be modal, not modeless - wxGUIEventLoop* m_modal_loop; // points to nested event_loop, NULL means not modal and dismissed + WX_EVENT_LOOP* m_modal_loop; // points to nested event_loop, NULL means not modal and dismissed wxString m_modal_string; bool m_modal_ret_val; // true if a selection was made From 80a402a369e4696062b795e5088a3dd07d503ab9 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Sun, 4 May 2014 14:57:44 -0500 Subject: [PATCH 347/741] wx 2.8 now builds, but the quasi-modal support seems broken on 2.8. Wanted others to be able to build at least. --- common/basicframe.cpp | 2 + common/dialog_shim.cpp | 87 +++++++++++++++++++++++++++++++++++++---- common/kiway_player.cpp | 2 +- include/dialog_shim.h | 16 +++++++- include/kiway_player.h | 12 +++++- 5 files changed, 108 insertions(+), 11 deletions(-) diff --git a/common/basicframe.cpp b/common/basicframe.cpp index 2fb7d4c604..dbcf15d9f9 100644 --- a/common/basicframe.cpp +++ b/common/basicframe.cpp @@ -153,6 +153,8 @@ bool EDA_BASE_FRAME::ProcessEvent( wxEvent& aEvent ) bool EDA_BASE_FRAME::Enable( bool enable ) { + // so we can do logging of this state change: + #if defined(DEBUG) const char* type_id = typeid( *this ).name(); printf( "wxFrame %s: %s\n", type_id, enable ? "enabled" : "disabled" ); diff --git a/common/dialog_shim.cpp b/common/dialog_shim.cpp index 8c1d94e794..548a91cdb4 100644 --- a/common/dialog_shim.cpp +++ b/common/dialog_shim.cpp @@ -130,6 +130,8 @@ bool DIALOG_SHIM::Show( bool show ) bool DIALOG_SHIM::Enable( bool enable ) { + // so we can do logging of this state change: + #if defined(DEBUG) const char* type_id = typeid( *this ).name(); printf( "wxDialog %s: %s\n", type_id, enable ? "enabled" : "disabled" ); @@ -139,6 +141,73 @@ bool DIALOG_SHIM::Enable( bool enable ) } +#if !wxCHECK_VERSION( 2, 9, 4 ) +wxWindow* DIALOG_SHIM::CheckIfCanBeUsedAsParent( wxWindow* parent ) const +{ + if ( !parent ) + return NULL; + + extern WXDLLIMPEXP_DATA_BASE(wxList) wxPendingDelete; + + if ( wxPendingDelete.Member(parent) || parent->IsBeingDeleted() ) + { + // this window is being deleted and we shouldn't create any children + // under it + return NULL; + } + + if ( parent->GetExtraStyle() & wxWS_EX_TRANSIENT ) + { + // this window is not being deleted yet but it's going to disappear + // soon so still don't parent this window under it + return NULL; + } + + if ( !parent->IsShownOnScreen() ) + { + // using hidden parent won't work correctly neither + return NULL; + } + + // FIXME-VC6: this compiler requires an explicit const cast or it fails + // with error C2446 + if ( const_cast(parent) == this ) + { + // not sure if this can really happen but it doesn't hurt to guard + // against this clearly invalid situation + return NULL; + } + + return parent; +} + + +wxWindow* DIALOG_SHIM::GetParentForModalDialog(wxWindow *parent, long style) const +{ + // creating a parent-less modal dialog will result (under e.g. wxGTK2) + // in an unfocused dialog, so try to find a valid parent for it unless we + // were explicitly asked not to + if ( style & wxDIALOG_NO_PARENT ) + return NULL; + + // first try the given parent + if ( parent ) + parent = CheckIfCanBeUsedAsParent(wxGetTopLevelParent(parent)); + + // then the currently active window + if ( !parent ) + parent = CheckIfCanBeUsedAsParent( + wxGetTopLevelParent(wxGetActiveWindow())); + + // and finally the application main window + if ( !parent ) + parent = CheckIfCanBeUsedAsParent(wxTheApp->GetTopWindow()); + + return parent; +} +#endif + + int DIALOG_SHIM::ShowQuasiModal() { // toggle a window's "enable" status to disabled, then enabled on exit. @@ -147,7 +216,14 @@ int DIALOG_SHIM::ShowQuasiModal() { wxWindow* m_win; ENABLE_DISABLE( wxWindow* aWindow ) : m_win( aWindow ) { if( m_win ) m_win->Disable(); } - ~ENABLE_DISABLE() { if( m_win ) m_win->Enable(); } + ~ENABLE_DISABLE() + { + if( m_win ) + { + m_win->Enable(); + m_win->SetFocus(); // let's focus back on the parent window + } + } }; // This is an exception safe way to zero a pointer before returning. @@ -168,7 +244,7 @@ int DIALOG_SHIM::ShowQuasiModal() if( win ) win->ReleaseMouse(); - wxWindow* parent = GetParentForModalDialog(); + wxWindow* parent = GetParentForModalDialog( GetParent(), GetWindowStyle() ); ENABLE_DISABLE toggle( parent ); @@ -176,16 +252,13 @@ int DIALOG_SHIM::ShowQuasiModal() m_qmodal_showing = true; - wxGUIEventLoop event_loop; + WX_EVENT_LOOP event_loop; wxEventLoopActivator event_loop_stacker( &event_loop ); m_qmodal_loop = &event_loop; event_loop.Run(); - if( toggle.m_win ) // let's focus back on the parent window - toggle.m_win->SetFocus(); - return GetReturnCode(); } @@ -233,7 +306,7 @@ static bool findWindowRecursively( const wxWindowList& children, const wxWindow* } -static bool findWindowReursively( const wxWindow* topmost, const wxWindow* wanted ) +static bool findWindowRecursively( const wxWindow* topmost, const wxWindow* wanted ) { // wanted may be NULL and that is ok. diff --git a/common/kiway_player.cpp b/common/kiway_player.cpp index d171744227..bd993efa0b 100644 --- a/common/kiway_player.cpp +++ b/common/kiway_player.cpp @@ -100,7 +100,7 @@ bool KIWAY_PLAYER::ShowModal( wxString* aResult ) Show( true ); - wxGUIEventLoop event_loop; + WX_EVENT_LOOP event_loop; wxEventLoopActivator event_loop_stacker( &event_loop ); m_modal_loop = &event_loop; diff --git a/include/dialog_shim.h b/include/dialog_shim.h index ae906dc97b..3e2ab62cee 100644 --- a/include/dialog_shim.h +++ b/include/dialog_shim.h @@ -35,6 +35,14 @@ #define DLGSHIM_USE_SETFOCUS 0 #endif +#if wxCHECK_VERSION( 2, 9, 4 ) + #define WX_EVENT_LOOP wxGUIEventLoop +#else + #define WX_EVENT_LOOP wxEventLoop +#endif + +class WX_EVENT_LOOP; + /** * Class DIALOG_SHIM @@ -69,10 +77,16 @@ public: bool Enable( bool enable ); // override wxDialog::Enable virtual protected: + +#if !wxCHECK_VERSION( 2, 9, 4 ) + wxWindow* CheckIfCanBeUsedAsParent( wxWindow* parent ) const; + wxWindow* GetParentForModalDialog( wxWindow *parent, long style ) const; +#endif + std::string m_hash_key; // alternate for class_map when classname re-used. // variables for quasi-modal behavior support, only used by a few derivatives. - wxGUIEventLoop* m_qmodal_loop; // points to nested event_loop, NULL means not qmodal and dismissed + WX_EVENT_LOOP* m_qmodal_loop; // points to nested event_loop, NULL means not qmodal and dismissed bool m_qmodal_showing; diff --git a/include/kiway_player.h b/include/kiway_player.h index ff20714bbc..e62981ab54 100644 --- a/include/kiway_player.h +++ b/include/kiway_player.h @@ -87,7 +87,15 @@ private: class KIWAY_EXPRESS; -class wxGUIEventLoop; + +#if wxCHECK_VERSION( 2, 9, 4 ) + #define WX_EVENT_LOOP wxGUIEventLoop +#else + #define WX_EVENT_LOOP wxEventLoop +#endif + +class WX_EVENT_LOOP; + /** * Class KIWAY_PLAYER @@ -219,7 +227,7 @@ protected: // variables for modal behavior support, only used by a few derivatives. bool m_modal; // true if frame is intended to be modal, not modeless - wxGUIEventLoop* m_modal_loop; // points to nested event_loop, NULL means not modal and dismissed + WX_EVENT_LOOP* m_modal_loop; // points to nested event_loop, NULL means not modal and dismissed wxString m_modal_string; bool m_modal_ret_val; // true if a selection was made From bb374d2616225df7393d3201599aad07d52fb772 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Sun, 4 May 2014 15:27:29 -0500 Subject: [PATCH 348/741] typeinfo.h missing in Debug build for wx2.8 --- common/basicframe.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/basicframe.cpp b/common/basicframe.cpp index dbcf15d9f9..8f05616062 100644 --- a/common/basicframe.cpp +++ b/common/basicframe.cpp @@ -46,7 +46,7 @@ #include #include - +#include /// The default auto save interval is 10 minutes. #define DEFAULT_AUTO_SAVE_INTERVAL 600 From 7a0093b0c4cf1b23ae1ffc2ee598ba8b5707f849 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Sun, 4 May 2014 15:27:29 -0500 Subject: [PATCH 349/741] typeinfo.h missing in Debug build for wx2.8 --- common/basicframe.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/basicframe.cpp b/common/basicframe.cpp index dbcf15d9f9..8f05616062 100644 --- a/common/basicframe.cpp +++ b/common/basicframe.cpp @@ -46,7 +46,7 @@ #include #include - +#include /// The default auto save interval is 10 minutes. #define DEFAULT_AUTO_SAVE_INTERVAL 600 From 74cb23a958f376d6c6b608695ac499892460cb89 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Sun, 4 May 2014 19:19:16 -0500 Subject: [PATCH 350/741] Quasimodo is not a monster, he is your friend. --- common/dialog_shim.cpp | 10 ++++++++-- common/kiway_player.cpp | 10 ++++++++-- pcbnew/clean.cpp | 2 +- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/common/dialog_shim.cpp b/common/dialog_shim.cpp index 548a91cdb4..f8236c1ac6 100644 --- a/common/dialog_shim.cpp +++ b/common/dialog_shim.cpp @@ -246,14 +246,20 @@ int DIALOG_SHIM::ShowQuasiModal() wxWindow* parent = GetParentForModalDialog( GetParent(), GetWindowStyle() ); - ENABLE_DISABLE toggle( parent ); + ENABLE_DISABLE toggle( parent ); // quasi-modal: disable only my "optimal" parent Show( true ); m_qmodal_showing = true; WX_EVENT_LOOP event_loop; + +#if wxCHECK_VERSION( 2, 9, 4 ) // 2.9.4 is only approximate. + // new code needs this, old code does it in wxEventLoop::Run() and cannot + // tolerate it here. Where that boundary is as a version number, I don't know. + // A closer look at the subversion repo for wx would tell. wxEventLoopActivator event_loop_stacker( &event_loop ); +#endif m_qmodal_loop = &event_loop; @@ -269,7 +275,7 @@ void DIALOG_SHIM::EndQuasiModal( int retCode ) if( !IsQuasiModal() ) { - wxFAIL_MSG( "either DIALOG_SHIM::EndQuasiModal called twice or ShowQuasiModal wasn't called" ); + wxFAIL_MSG( wxT( "either DIALOG_SHIM::EndQuasiModal called twice or ShowQuasiModal wasn't called" ) ); return; } diff --git a/common/kiway_player.cpp b/common/kiway_player.cpp index bd993efa0b..ab0ae3e571 100644 --- a/common/kiway_player.cpp +++ b/common/kiway_player.cpp @@ -74,7 +74,7 @@ void KIWAY_PLAYER::KiwayMailIn( KIWAY_EXPRESS& aEvent ) bool KIWAY_PLAYER::ShowModal( wxString* aResult ) { - wxASSERT_MSG( IsModal(), "ShowModal() shouldn't be called on non-modal frame" ); + wxASSERT_MSG( IsModal(), wxT( "ShowModal() shouldn't be called on non-modal frame" ) ); /* This function has a nice interface but a necessarily unsightly implementation. @@ -95,13 +95,19 @@ bool KIWAY_PLAYER::ShowModal( wxString* aResult ) } clear_this( (void*&) m_modal_loop ); // exception safe way to disable all frames except the modal one, - // re-enable on exit + // re-enables only those that were disabled on exit wxWindowDisabler toggle( this ); Show( true ); WX_EVENT_LOOP event_loop; + +#if wxCHECK_VERSION( 2, 9, 4 ) // 2.9.4 is only approximate. + // new code needs this, old code does it in wxEventLoop::Run() and cannot + // tolerate it here. Where that boundary is as a version number, I don't know. + // A closer look at the subversion repo for wx would tell. wxEventLoopActivator event_loop_stacker( &event_loop ); +#endif m_modal_loop = &event_loop; diff --git a/pcbnew/clean.cpp b/pcbnew/clean.cpp index 127f0cbae5..12ca312064 100644 --- a/pcbnew/clean.cpp +++ b/pcbnew/clean.cpp @@ -203,7 +203,7 @@ bool TRACKS_CLEANER::clean_vias() // Correct via m_End defects (if any), should never happen if( via->GetStart() != via->GetEnd() ) { - wxFAIL_MSG( "Via with mismatching ends" ); + wxFAIL_MSG( wxT( "Via with mismatching ends" ) ); via->SetEnd( via->GetStart() ); } From fb346a0c104f891697468a52c60129c758467429 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Sun, 4 May 2014 19:19:16 -0500 Subject: [PATCH 351/741] Quasimodo is not a monster, he is your friend. --- common/dialog_shim.cpp | 10 ++++++++-- common/kiway_player.cpp | 10 ++++++++-- pcbnew/clean.cpp | 2 +- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/common/dialog_shim.cpp b/common/dialog_shim.cpp index 548a91cdb4..f8236c1ac6 100644 --- a/common/dialog_shim.cpp +++ b/common/dialog_shim.cpp @@ -246,14 +246,20 @@ int DIALOG_SHIM::ShowQuasiModal() wxWindow* parent = GetParentForModalDialog( GetParent(), GetWindowStyle() ); - ENABLE_DISABLE toggle( parent ); + ENABLE_DISABLE toggle( parent ); // quasi-modal: disable only my "optimal" parent Show( true ); m_qmodal_showing = true; WX_EVENT_LOOP event_loop; + +#if wxCHECK_VERSION( 2, 9, 4 ) // 2.9.4 is only approximate. + // new code needs this, old code does it in wxEventLoop::Run() and cannot + // tolerate it here. Where that boundary is as a version number, I don't know. + // A closer look at the subversion repo for wx would tell. wxEventLoopActivator event_loop_stacker( &event_loop ); +#endif m_qmodal_loop = &event_loop; @@ -269,7 +275,7 @@ void DIALOG_SHIM::EndQuasiModal( int retCode ) if( !IsQuasiModal() ) { - wxFAIL_MSG( "either DIALOG_SHIM::EndQuasiModal called twice or ShowQuasiModal wasn't called" ); + wxFAIL_MSG( wxT( "either DIALOG_SHIM::EndQuasiModal called twice or ShowQuasiModal wasn't called" ) ); return; } diff --git a/common/kiway_player.cpp b/common/kiway_player.cpp index bd993efa0b..ab0ae3e571 100644 --- a/common/kiway_player.cpp +++ b/common/kiway_player.cpp @@ -74,7 +74,7 @@ void KIWAY_PLAYER::KiwayMailIn( KIWAY_EXPRESS& aEvent ) bool KIWAY_PLAYER::ShowModal( wxString* aResult ) { - wxASSERT_MSG( IsModal(), "ShowModal() shouldn't be called on non-modal frame" ); + wxASSERT_MSG( IsModal(), wxT( "ShowModal() shouldn't be called on non-modal frame" ) ); /* This function has a nice interface but a necessarily unsightly implementation. @@ -95,13 +95,19 @@ bool KIWAY_PLAYER::ShowModal( wxString* aResult ) } clear_this( (void*&) m_modal_loop ); // exception safe way to disable all frames except the modal one, - // re-enable on exit + // re-enables only those that were disabled on exit wxWindowDisabler toggle( this ); Show( true ); WX_EVENT_LOOP event_loop; + +#if wxCHECK_VERSION( 2, 9, 4 ) // 2.9.4 is only approximate. + // new code needs this, old code does it in wxEventLoop::Run() and cannot + // tolerate it here. Where that boundary is as a version number, I don't know. + // A closer look at the subversion repo for wx would tell. wxEventLoopActivator event_loop_stacker( &event_loop ); +#endif m_modal_loop = &event_loop; diff --git a/pcbnew/clean.cpp b/pcbnew/clean.cpp index 127f0cbae5..12ca312064 100644 --- a/pcbnew/clean.cpp +++ b/pcbnew/clean.cpp @@ -203,7 +203,7 @@ bool TRACKS_CLEANER::clean_vias() // Correct via m_End defects (if any), should never happen if( via->GetStart() != via->GetEnd() ) { - wxFAIL_MSG( "Via with mismatching ends" ); + wxFAIL_MSG( wxT( "Via with mismatching ends" ) ); via->SetEnd( via->GetStart() ); } From fc26cdfb7423f1e2b902e3b30b77215b73413a1f Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 5 May 2014 09:46:07 +0200 Subject: [PATCH 352/741] footprint editor: fix crashes. In this fix, I removed the assumption the parent frame is the board editor. However, this assumption is still present here and there in the moduleframe code. --- pcbnew/loadcmp.cpp | 9 ++++++--- pcbnew/moduleframe.cpp | 17 +++++++++-------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/pcbnew/loadcmp.cpp b/pcbnew/loadcmp.cpp index 3aca4d620f..6e66b00c55 100644 --- a/pcbnew/loadcmp.cpp +++ b/pcbnew/loadcmp.cpp @@ -65,14 +65,17 @@ static FOOTPRINT_LIST MList; bool FOOTPRINT_EDIT_FRAME::Load_Module_From_BOARD( MODULE* aModule ) { MODULE* newModule; - PCB_BASE_FRAME* parent = (PCB_BASE_FRAME*) GetParent(); + PCB_EDIT_FRAME* frame = (PCB_EDIT_FRAME*) Kiway().Player( FRAME_PCB, false ); + + if( frame == NULL ) // happens if no board editor opened + return false; if( aModule == NULL ) { - if( ! parent->GetBoard() || ! parent->GetBoard()->m_Modules ) + if( ! frame->GetBoard() || ! frame->GetBoard()->m_Modules ) return false; - aModule = SelectFootprint( parent->GetBoard() ); + aModule = SelectFootprint( frame->GetBoard() ); } if( aModule == NULL ) diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index c2a9b93d4e..076dc14999 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -50,6 +50,7 @@ #include #include #include +#include static PCB_SCREEN* s_screenModule; // the PCB_SCREEN used by the footprint editor @@ -416,21 +417,21 @@ void FOOTPRINT_EDIT_FRAME::OnUpdateLibAndModuleSelected( wxUpdateUIEvent& aEvent void FOOTPRINT_EDIT_FRAME::OnUpdateLoadModuleFromBoard( wxUpdateUIEvent& aEvent ) { - PCB_BASE_FRAME* frame = (PCB_BASE_FRAME*) GetParent(); + PCB_EDIT_FRAME* frame = (PCB_EDIT_FRAME*) Kiway().Player( FRAME_PCB, false ); - aEvent.Enable( frame->GetBoard()->m_Modules != NULL ); + aEvent.Enable( frame && frame->GetBoard()->m_Modules != NULL ); } void FOOTPRINT_EDIT_FRAME::OnUpdateInsertModuleInBoard( wxUpdateUIEvent& aEvent ) { - PCB_BASE_FRAME* frame = (PCB_BASE_FRAME*) GetParent(); + PCB_EDIT_FRAME* frame = (PCB_EDIT_FRAME*) Kiway().Player( FRAME_PCB, false ); MODULE* module_in_edit = GetBoard()->m_Modules; - bool canInsert = ( module_in_edit && !module_in_edit->GetLink() ); + bool canInsert = frame && module_in_edit && !module_in_edit->GetLink(); // If the source was deleted, the module can inserted but not updated in the board. - if( module_in_edit && module_in_edit->GetLink() ) // this is not a new module + if( frame && module_in_edit && module_in_edit->GetLink() ) // this is not a new module { BOARD* mainpcb = frame->GetBoard(); MODULE* source_module = mainpcb->m_Modules; @@ -451,12 +452,12 @@ void FOOTPRINT_EDIT_FRAME::OnUpdateInsertModuleInBoard( wxUpdateUIEvent& aEvent void FOOTPRINT_EDIT_FRAME::OnUpdateReplaceModuleInBoard( wxUpdateUIEvent& aEvent ) { - PCB_BASE_FRAME* frame = (PCB_BASE_FRAME*) GetParent(); + PCB_EDIT_FRAME* frame = (PCB_EDIT_FRAME*) Kiway().Player( FRAME_PCB, false ); MODULE* module_in_edit = GetBoard()->m_Modules; - bool canReplace = ( module_in_edit && module_in_edit->GetLink() ); + bool canReplace = frame && module_in_edit && module_in_edit->GetLink(); - if( module_in_edit && module_in_edit->GetLink() ) // this is not a new module + if( canReplace ) // this is not a new module, but verify if the source is still on board { BOARD* mainpcb = frame->GetBoard(); MODULE* source_module = mainpcb->m_Modules; From d9c3de9bbd851f98693e2456c897b48fd7478d08 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 5 May 2014 09:46:07 +0200 Subject: [PATCH 353/741] footprint editor: fix crashes. In this fix, I removed the assumption the parent frame is the board editor. However, this assumption is still present here and there in the moduleframe code. --- pcbnew/loadcmp.cpp | 9 ++++++--- pcbnew/moduleframe.cpp | 17 +++++++++-------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/pcbnew/loadcmp.cpp b/pcbnew/loadcmp.cpp index 3aca4d620f..6e66b00c55 100644 --- a/pcbnew/loadcmp.cpp +++ b/pcbnew/loadcmp.cpp @@ -65,14 +65,17 @@ static FOOTPRINT_LIST MList; bool FOOTPRINT_EDIT_FRAME::Load_Module_From_BOARD( MODULE* aModule ) { MODULE* newModule; - PCB_BASE_FRAME* parent = (PCB_BASE_FRAME*) GetParent(); + PCB_EDIT_FRAME* frame = (PCB_EDIT_FRAME*) Kiway().Player( FRAME_PCB, false ); + + if( frame == NULL ) // happens if no board editor opened + return false; if( aModule == NULL ) { - if( ! parent->GetBoard() || ! parent->GetBoard()->m_Modules ) + if( ! frame->GetBoard() || ! frame->GetBoard()->m_Modules ) return false; - aModule = SelectFootprint( parent->GetBoard() ); + aModule = SelectFootprint( frame->GetBoard() ); } if( aModule == NULL ) diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index c2a9b93d4e..076dc14999 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -50,6 +50,7 @@ #include #include #include +#include static PCB_SCREEN* s_screenModule; // the PCB_SCREEN used by the footprint editor @@ -416,21 +417,21 @@ void FOOTPRINT_EDIT_FRAME::OnUpdateLibAndModuleSelected( wxUpdateUIEvent& aEvent void FOOTPRINT_EDIT_FRAME::OnUpdateLoadModuleFromBoard( wxUpdateUIEvent& aEvent ) { - PCB_BASE_FRAME* frame = (PCB_BASE_FRAME*) GetParent(); + PCB_EDIT_FRAME* frame = (PCB_EDIT_FRAME*) Kiway().Player( FRAME_PCB, false ); - aEvent.Enable( frame->GetBoard()->m_Modules != NULL ); + aEvent.Enable( frame && frame->GetBoard()->m_Modules != NULL ); } void FOOTPRINT_EDIT_FRAME::OnUpdateInsertModuleInBoard( wxUpdateUIEvent& aEvent ) { - PCB_BASE_FRAME* frame = (PCB_BASE_FRAME*) GetParent(); + PCB_EDIT_FRAME* frame = (PCB_EDIT_FRAME*) Kiway().Player( FRAME_PCB, false ); MODULE* module_in_edit = GetBoard()->m_Modules; - bool canInsert = ( module_in_edit && !module_in_edit->GetLink() ); + bool canInsert = frame && module_in_edit && !module_in_edit->GetLink(); // If the source was deleted, the module can inserted but not updated in the board. - if( module_in_edit && module_in_edit->GetLink() ) // this is not a new module + if( frame && module_in_edit && module_in_edit->GetLink() ) // this is not a new module { BOARD* mainpcb = frame->GetBoard(); MODULE* source_module = mainpcb->m_Modules; @@ -451,12 +452,12 @@ void FOOTPRINT_EDIT_FRAME::OnUpdateInsertModuleInBoard( wxUpdateUIEvent& aEvent void FOOTPRINT_EDIT_FRAME::OnUpdateReplaceModuleInBoard( wxUpdateUIEvent& aEvent ) { - PCB_BASE_FRAME* frame = (PCB_BASE_FRAME*) GetParent(); + PCB_EDIT_FRAME* frame = (PCB_EDIT_FRAME*) Kiway().Player( FRAME_PCB, false ); MODULE* module_in_edit = GetBoard()->m_Modules; - bool canReplace = ( module_in_edit && module_in_edit->GetLink() ); + bool canReplace = frame && module_in_edit && module_in_edit->GetLink(); - if( module_in_edit && module_in_edit->GetLink() ) // this is not a new module + if( canReplace ) // this is not a new module, but verify if the source is still on board { BOARD* mainpcb = frame->GetBoard(); MODULE* source_module = mainpcb->m_Modules; From c7dc319737e9677a0061388ba7cc006014e9f2f4 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 5 May 2014 17:15:54 +0200 Subject: [PATCH 354/741] Kicad: fix crash on exit, when Libedit was called during a session. It fixes also a crash if Libedit was called, closed and reopened. Happens only if eeschema was called from the Kicad manager. --- eeschema/eeschema.cpp | 3 +-- eeschema/libeditframe.cpp | 2 +- eeschema/libeditframe.h | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/eeschema/eeschema.cpp b/eeschema/eeschema.cpp index 911c1d138d..52da445fd0 100644 --- a/eeschema/eeschema.cpp +++ b/eeschema/eeschema.cpp @@ -99,8 +99,7 @@ static struct IFACE : public KIFACE_I case FRAME_SCH_LIB_EDITOR: { - LIB_EDIT_FRAME* frame = new LIB_EDIT_FRAME( aKiway, - dynamic_cast( aParent ) ); + LIB_EDIT_FRAME* frame = new LIB_EDIT_FRAME( aKiway, aParent ); return frame; } break; diff --git a/eeschema/libeditframe.cpp b/eeschema/libeditframe.cpp index 49ea88353d..5edc5badb4 100644 --- a/eeschema/libeditframe.cpp +++ b/eeschema/libeditframe.cpp @@ -187,7 +187,7 @@ END_EVENT_TABLE() #define LIB_EDIT_FRAME_NAME wxT( "LibeditFrame" ) -LIB_EDIT_FRAME::LIB_EDIT_FRAME( KIWAY* aKiway, SCH_EDIT_FRAME* aParent ) : +LIB_EDIT_FRAME::LIB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : SCH_BASE_FRAME( aKiway, aParent, FRAME_SCH_LIB_EDITOR, _( "Library Editor" ), wxDefaultPosition, wxDefaultSize, KICAD_DEFAULT_DRAWFRAME_STYLE, GetLibEditFrameName() ) { diff --git a/eeschema/libeditframe.h b/eeschema/libeditframe.h index 07a52b6203..106ef8830b 100644 --- a/eeschema/libeditframe.h +++ b/eeschema/libeditframe.h @@ -122,7 +122,7 @@ class LIB_EDIT_FRAME : public SCH_BASE_FRAME public: - LIB_EDIT_FRAME( KIWAY* aKiway, SCH_EDIT_FRAME* aParent ); + LIB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ); ~LIB_EDIT_FRAME(); From 45e006aee82ddc3258f17b19d4ef23dbc56f0164 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 5 May 2014 17:15:54 +0200 Subject: [PATCH 355/741] Kicad: fix crash on exit, when Libedit was called during a session. It fixes also a crash if Libedit was called, closed and reopened. Happens only if eeschema was called from the Kicad manager. --- eeschema/eeschema.cpp | 3 +-- eeschema/libeditframe.cpp | 2 +- eeschema/libeditframe.h | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/eeschema/eeschema.cpp b/eeschema/eeschema.cpp index 911c1d138d..52da445fd0 100644 --- a/eeschema/eeschema.cpp +++ b/eeschema/eeschema.cpp @@ -99,8 +99,7 @@ static struct IFACE : public KIFACE_I case FRAME_SCH_LIB_EDITOR: { - LIB_EDIT_FRAME* frame = new LIB_EDIT_FRAME( aKiway, - dynamic_cast( aParent ) ); + LIB_EDIT_FRAME* frame = new LIB_EDIT_FRAME( aKiway, aParent ); return frame; } break; diff --git a/eeschema/libeditframe.cpp b/eeschema/libeditframe.cpp index 49ea88353d..5edc5badb4 100644 --- a/eeschema/libeditframe.cpp +++ b/eeschema/libeditframe.cpp @@ -187,7 +187,7 @@ END_EVENT_TABLE() #define LIB_EDIT_FRAME_NAME wxT( "LibeditFrame" ) -LIB_EDIT_FRAME::LIB_EDIT_FRAME( KIWAY* aKiway, SCH_EDIT_FRAME* aParent ) : +LIB_EDIT_FRAME::LIB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : SCH_BASE_FRAME( aKiway, aParent, FRAME_SCH_LIB_EDITOR, _( "Library Editor" ), wxDefaultPosition, wxDefaultSize, KICAD_DEFAULT_DRAWFRAME_STYLE, GetLibEditFrameName() ) { diff --git a/eeschema/libeditframe.h b/eeschema/libeditframe.h index 07a52b6203..106ef8830b 100644 --- a/eeschema/libeditframe.h +++ b/eeschema/libeditframe.h @@ -122,7 +122,7 @@ class LIB_EDIT_FRAME : public SCH_BASE_FRAME public: - LIB_EDIT_FRAME( KIWAY* aKiway, SCH_EDIT_FRAME* aParent ); + LIB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ); ~LIB_EDIT_FRAME(); From 55e61bc6e3674b36b39cd4ff8f0f77a1e995a9b9 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Mon, 5 May 2014 12:28:40 -0500 Subject: [PATCH 356/741] Modular-Kicad milestone B), glamorous portions: *) Eeschema can now show the footprint editor. *) Eeschema can now invoke the footprint picker from the library part field editor. *) KIWAY_PLAYER::ShowModal() takes aResultantFocusWindow that tells what window to give the focus to. Required since frames are often near the top of the hierarchy and they are invoked by a peer, not a parent. --- common/basicframe.cpp | 2 +- common/dialog_shim.cpp | 4 ++ common/kiway.cpp | 8 +++- common/kiway_player.cpp | 38 +++++++++++++----- .../dialog_edit_component_in_schematic.cpp | 16 ++------ .../dialog_edit_libentry_fields_in_lib.cpp | 40 ++++++++++++++++--- ...ialog_edit_libentry_fields_in_lib_base.cpp | 2 +- ...ialog_edit_libentry_fields_in_lib_base.fbp | 2 +- .../dialog_edit_libentry_fields_in_lib_base.h | 5 ++- eeschema/getpart.cpp | 2 +- eeschema/schframe.cpp | 18 +++++++++ eeschema/tool_sch.cpp | 10 ++++- include/id.h | 1 + include/kiway_player.h | 3 +- include/wxEeschemaStruct.h | 3 +- pcbnew/loadcmp.cpp | 3 +- 16 files changed, 114 insertions(+), 43 deletions(-) diff --git a/common/basicframe.cpp b/common/basicframe.cpp index 8f05616062..382c9c9164 100644 --- a/common/basicframe.cpp +++ b/common/basicframe.cpp @@ -157,7 +157,7 @@ bool EDA_BASE_FRAME::Enable( bool enable ) #if defined(DEBUG) const char* type_id = typeid( *this ).name(); - printf( "wxFrame %s: %s\n", type_id, enable ? "enabled" : "disabled" ); + printf( "wxFrame %-28s: %s\n", type_id, enable ? "enabled" : "disabled" ); #endif return wxFrame::Enable( enable ); diff --git a/common/dialog_shim.cpp b/common/dialog_shim.cpp index f8236c1ac6..1d3e9b6054 100644 --- a/common/dialog_shim.cpp +++ b/common/dialog_shim.cpp @@ -244,8 +244,12 @@ int DIALOG_SHIM::ShowQuasiModal() if( win ) win->ReleaseMouse(); + // Get the optimal parent wxWindow* parent = GetParentForModalDialog( GetParent(), GetWindowStyle() ); + // Show the optimal parent + DBG( if( parent ) printf( "%s: optimal parent: %s\n", __func__, typeid(*parent).name() );) + ENABLE_DISABLE toggle( parent ); // quasi-modal: disable only my "optimal" parent Show( true ); diff --git a/common/kiway.cpp b/common/kiway.cpp index 8f2ebf9824..396c5cb417 100644 --- a/common/kiway.cpp +++ b/common/kiway.cpp @@ -53,7 +53,7 @@ KIWAY::KIWAY( PGM_BASE* aProgram, int aCtlBits, wxFrame* aTop ): // Any event types derived from wxCommandEvt, like wxWindowDestroyEvent, are -// propogated upwards to parent windows if not handled below. Therefor the +// propogated upwards to parent windows if not handled below. Therefore the // m_top window should receive all wxWindowDestroyEvents originating from // KIWAY_PLAYERs. It does anyways, but now player_destroy_handler eavesdrops // on that event stream looking for KIWAY_PLAYERs being closed. @@ -67,10 +67,14 @@ void KIWAY::player_destroy_handler( wxWindowDestroyEvent& event ) // if destroying one of our flock, then mark it as deceased. if( (wxWindow*) m_player[i] == w ) { - DBG(printf( "%s: marking m_player[%d] as destroyed\n", __func__, i );) + DBG(printf( "%s: m_player[%d] destroyed: %s\n", + __func__, i, TO_UTF8( m_player[i]->GetName() ) );) + m_player[i] = 0; } } + + // event.Skip(); skip to who, the wxApp? I'm the top window. } diff --git a/common/kiway_player.cpp b/common/kiway_player.cpp index ab0ae3e571..fc0415a702 100644 --- a/common/kiway_player.cpp +++ b/common/kiway_player.cpp @@ -72,7 +72,7 @@ void KIWAY_PLAYER::KiwayMailIn( KIWAY_EXPRESS& aEvent ) } -bool KIWAY_PLAYER::ShowModal( wxString* aResult ) +bool KIWAY_PLAYER::ShowModal( wxString* aResult, wxWindow* aResultantFocusWindow ) { wxASSERT_MSG( IsModal(), wxT( "ShowModal() shouldn't be called on non-modal frame" ) ); @@ -94,24 +94,30 @@ bool KIWAY_PLAYER::ShowModal( wxString* aResult ) ~NULLER() { m_what = 0; } // indeed, set it to NULL on destruction } clear_this( (void*&) m_modal_loop ); - // exception safe way to disable all frames except the modal one, - // re-enables only those that were disabled on exit - wxWindowDisabler toggle( this ); Show( true ); + SetFocus(); - WX_EVENT_LOOP event_loop; + { + // exception safe way to disable all frames except the modal one, + // re-enables only those that were disabled on exit + wxWindowDisabler toggle( this ); + + WX_EVENT_LOOP event_loop; #if wxCHECK_VERSION( 2, 9, 4 ) // 2.9.4 is only approximate. - // new code needs this, old code does it in wxEventLoop::Run() and cannot - // tolerate it here. Where that boundary is as a version number, I don't know. - // A closer look at the subversion repo for wx would tell. - wxEventLoopActivator event_loop_stacker( &event_loop ); + // new code needs this, old code does it in wxEventLoop::Run() and cannot + // tolerate it here. Where that boundary is as a version number, I don't know. + // A closer look at the subversion repo for wx would tell. + wxEventLoopActivator event_loop_stacker( &event_loop ); #endif - m_modal_loop = &event_loop; + m_modal_loop = &event_loop; - event_loop.Run(); + event_loop.Run(); + + } // End of scop for some variables. + // End nesting before setting focus below. if( aResult ) *aResult = m_modal_string; @@ -119,6 +125,16 @@ bool KIWAY_PLAYER::ShowModal( wxString* aResult ) DBG(printf( "~%s: aResult:'%s' ret:%d\n", __func__, TO_UTF8( m_modal_string ), m_modal_ret_val );) + if( aResultantFocusWindow ) + { + aResultantFocusWindow->Raise(); + + // have the final say, after wxWindowDisabler reenables my parent and + // the events settle down, set the focus + wxYield(); + aResultantFocusWindow->SetFocus(); + } + return m_modal_ret_val; } diff --git a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp index cb9fcbc4ee..0ea32ac16e 100644 --- a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp +++ b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp @@ -436,13 +436,8 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::deleteFieldButtonHandler( wxCommandEven void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::showButtonHandler( wxCommandEvent& event ) { -#if 0 - wxString datasheet_uri = fieldValueTextCtrl->GetValue(); - ::wxLaunchDefaultBrowser( datasheet_uri ); - -#else - unsigned fieldNdx = getSelectedFieldNdx(); + if( fieldNdx == DATASHEET ) { wxString datasheet_uri = fieldValueTextCtrl->GetValue(); @@ -455,17 +450,14 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::showButtonHandler( wxCommandEvent& even KIWAY_PLAYER* frame = Kiway().Player( FRAME_PCB_MODULE_VIEWER_MODAL, true ); - if( frame->ShowModal( &fpid ) ) + if( frame->ShowModal( &fpid, this ) ) { - printf( "%s: %s\n", __func__, TO_UTF8( fpid ) ); + // DBG( printf( "%s: %s\n", __func__, TO_UTF8( fpid ) ); ) fieldValueTextCtrl->SetValue( fpid ); - } frame->Destroy(); } -#endif - } @@ -771,8 +763,6 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copySelectedFieldToPanel() else m_show_datasheet_button->SetLabel( wxEmptyString ); - m_show_datasheet_button->Enable( fieldNdx == DATASHEET || fieldNdx == FOOTPRINT ); - // 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_libentry_fields_in_lib.cpp b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp index 4036c36cb5..37831227d9 100644 --- a/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp +++ b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp @@ -28,6 +28,7 @@ #include #include +#include #include #include #include @@ -141,7 +142,7 @@ void LIB_EDIT_FRAME::InstallFieldsEditorDialog( wxCommandEvent& event ) DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB dlg( this, m_component ); - int abort = dlg.ShowModal(); + int abort = dlg.ShowQuasiModal(); if( abort ) return; @@ -211,7 +212,7 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::OnListItemSelected( wxListEvent& event void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::OnCancelButtonClick( wxCommandEvent& event ) { - EndModal( 1 ); + EndQuasiModal( 1 ); } @@ -282,7 +283,7 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::OnOKButtonClick( wxCommandEvent& event m_parent->OnModify(); - EndModal( 0 ); + EndQuasiModal( 0 ); } @@ -381,8 +382,28 @@ 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 ); + unsigned fieldNdx = getSelectedFieldNdx(); + + if( fieldNdx == DATASHEET ) + { + wxString datasheet_uri = fieldValueTextCtrl->GetValue(); + ::wxLaunchDefaultBrowser( datasheet_uri ); + } + else if( fieldNdx == FOOTPRINT ) + { + // pick a footprint using the footprint picker. + wxString fpid; + + KIWAY_PLAYER* frame = Kiway().Player( FRAME_PCB_MODULE_VIEWER_MODAL, true ); + + if( frame->ShowModal( &fpid, this ) ) + { + // DBG( printf( "%s: %s\n", __func__, TO_UTF8( fpid ) ); ) + fieldValueTextCtrl->SetValue( fpid ); + } + + frame->Destroy(); + } } @@ -652,7 +673,14 @@ 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 ); + m_show_datasheet_button->Enable( fieldNdx == DATASHEET || fieldNdx == FOOTPRINT ); + + if( fieldNdx == DATASHEET ) + m_show_datasheet_button->SetLabel( _( "Show in Browser" ) ); + else if( fieldNdx == FOOTPRINT ) + m_show_datasheet_button->SetLabel( _( "Assign Footprint" ) ); + else + m_show_datasheet_button->SetLabel( wxEmptyString ); 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 a859617859..956e092640 100644 --- a/eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.cpp +++ b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.cpp @@ -9,7 +9,7 @@ /////////////////////////////////////////////////////////////////////////// -DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); 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 d6a0535ca9..94ef7e29cf 100644 --- a/eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.fbp +++ b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.fbp @@ -46,7 +46,7 @@ -1,-1 wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU - + DIALOG_SHIM; dialog_shim.h Field Properties 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 82188f2008..fdd0464897 100644 --- a/eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.h +++ b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.h @@ -11,6 +11,9 @@ #include #include #include +class DIALOG_SHIM; + +#include "dialog_shim.h" #include #include #include @@ -33,7 +36,7 @@ /////////////////////////////////////////////////////////////////////////////// /// Class DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE /////////////////////////////////////////////////////////////////////////////// -class DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE : public wxDialog +class DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE : public DIALOG_SHIM { private: diff --git a/eeschema/getpart.cpp b/eeschema/getpart.cpp index e81d028bfa..8821cfb31e 100644 --- a/eeschema/getpart.cpp +++ b/eeschema/getpart.cpp @@ -79,7 +79,7 @@ wxString SCH_BASE_FRAME::SelectComponentFromLibBrowser( LIB_ALIAS* aPreselectedA wxString cmpname; - if( viewlibFrame->ShowModal( &cmpname ) ) + if( viewlibFrame->ShowModal( &cmpname, this ) ) { if( aUnit ) *aUnit = viewlibFrame->GetUnit(); diff --git a/eeschema/schframe.cpp b/eeschema/schframe.cpp index db9e8f50ce..fad9539da9 100644 --- a/eeschema/schframe.cpp +++ b/eeschema/schframe.cpp @@ -101,6 +101,8 @@ BEGIN_EVENT_TABLE( SCH_EDIT_FRAME, EDA_DRAW_FRAME ) EVT_TOOL( ID_TO_LIBVIEW, SCH_EDIT_FRAME::OnOpenLibraryViewer ) EVT_TOOL( ID_TO_PCB, SCH_EDIT_FRAME::OnOpenPcbnew ) + EVT_TOOL( ID_TO_PCB_MODULE_EDITOR, SCH_EDIT_FRAME::OnOpenPcbModuleEditor ) + EVT_TOOL( ID_TO_CVPCB, SCH_EDIT_FRAME::OnOpenCvpcb ) EVT_TOOL( ID_SHEET_SET, EDA_DRAW_FRAME::Process_PageSettings ) @@ -794,6 +796,22 @@ void SCH_EDIT_FRAME::OnOpenPcbnew( wxCommandEvent& event ) } +void SCH_EDIT_FRAME::OnOpenPcbModuleEditor( wxCommandEvent& event ) +{ + if( !Kiface().IsSingle() ) + { + wxFileName fn = g_RootSheet->GetScreen()->GetFileName(); + + if( fn.IsOk() ) + { + KIWAY_PLAYER* player = Kiway().Player( FRAME_PCB_MODULE_EDITOR ); + player->Show( true ); + player->Raise(); + } + } +} + + void SCH_EDIT_FRAME::OnOpenCvpcb( wxCommandEvent& event ) { wxFileName fn = g_RootSheet->GetScreen()->GetFileName(); diff --git a/eeschema/tool_sch.cpp b/eeschema/tool_sch.cpp index 2bbed5bd48..962ef3847f 100644 --- a/eeschema/tool_sch.cpp +++ b/eeschema/tool_sch.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -139,10 +140,8 @@ void SCH_EDIT_FRAME::ReCreateHToolbar() m_mainToolBar->AddTool( ID_TO_LIBVIEW, wxEmptyString, KiBitmap( library_browse_xpm ), HELP_RUN_LIB_VIEWER ); - m_mainToolBar->AddSeparator(); - m_mainToolBar->AddTool( ID_GET_ANNOTATE, wxEmptyString, KiBitmap( annotate_xpm ), HELP_ANNOTATE ); @@ -158,6 +157,13 @@ void SCH_EDIT_FRAME::ReCreateHToolbar() m_mainToolBar->AddSeparator(); + // The user must HAVE footprints before he can assign them. So put this before + // the CVPCB. + if( !Kiface().IsSingle() ) // if pcbnew is not a separate process + { + m_mainToolBar->AddTool( ID_TO_PCB_MODULE_EDITOR, wxEmptyString, KiBitmap( module_editor_xpm ), + _( "Footprint Editor" ) ); + } m_mainToolBar->AddTool( ID_TO_CVPCB, wxEmptyString, KiBitmap( cvpcb_xpm ), _( "Run CvPcb to associate components and footprints" ) ); diff --git a/include/id.h b/include/id.h index 0c60acd429..a243491c30 100644 --- a/include/id.h +++ b/include/id.h @@ -45,6 +45,7 @@ enum main_id { ID_TO_PCB = wxID_HIGHEST, + ID_TO_PCB_MODULE_EDITOR, ID_TO_CVPCB, ID_LOAD_PROJECT, ID_APPEND_PROJECT, diff --git a/include/kiway_player.h b/include/kiway_player.h index e62981ab54..48cfeafc4a 100644 --- a/include/kiway_player.h +++ b/include/kiway_player.h @@ -185,11 +185,12 @@ public: * event which ends the modal behavior. * * @param aResult if not NULL, indicates a place to put a resultant string. + * @param aResultantFocusWindow if not NULL, indicates what window to pass focus to on return. * * @return bool - true if frame implementation called KIWAY_PLAYER::DismissModal() * with aRetVal of true. */ - VTBL_ENTRY bool ShowModal( wxString* aResult = NULL ); + VTBL_ENTRY bool ShowModal( wxString* aResult = NULL, wxWindow* aResultantFocusWindow = NULL ); //-------------------------------------------------------- diff --git a/include/wxEeschemaStruct.h b/include/wxEeschemaStruct.h index 171351d321..852b65c3fc 100644 --- a/include/wxEeschemaStruct.h +++ b/include/wxEeschemaStruct.h @@ -368,7 +368,7 @@ public: */ virtual void ExecuteRemoteCommand( const char* cmdline ); - void KiwayMailIn( KIWAY_EXPRESS& aEvent ); // virtual overload from KIWAY_PLAYER + void KiwayMailIn( KIWAY_EXPRESS& aEvent ); // override virtual from KIWAY_PLAYER void OnLeftClick( wxDC* aDC, const wxPoint& aPosition ); void OnLeftDClick( wxDC* aDC, const wxPoint& aPosition ); @@ -793,6 +793,7 @@ private: void OnLoadProject( wxCommandEvent& event ); void OnAppendProject( wxCommandEvent& event ); void OnOpenPcbnew( wxCommandEvent& event ); + void OnOpenPcbModuleEditor( wxCommandEvent& event ); void OnOpenCvpcb( wxCommandEvent& event ); void OnOpenLibraryEditor( wxCommandEvent& event ); void OnSetOptions( wxCommandEvent& event ); diff --git a/pcbnew/loadcmp.cpp b/pcbnew/loadcmp.cpp index 6e66b00c55..dda500664f 100644 --- a/pcbnew/loadcmp.cpp +++ b/pcbnew/loadcmp.cpp @@ -135,7 +135,7 @@ wxString PCB_BASE_FRAME::SelectFootprintFromLibBrowser() wxString fpid; - viewer->ShowModal( &fpid ); + viewer->ShowModal( &fpid, this ); //DBG(printf("%s: fpid:'%s'\n", __func__, TO_UTF8( fpid ) );) @@ -274,7 +274,6 @@ MODULE* PCB_BASE_FRAME::LoadModuleFromLibrary( const wxString& aLibrary, module->SetTimeStamp( GetNewTimeStamp() ); GetBoard()->m_Status_Pcb = 0; - // Put it on FRONT layer, // (Can be stored flipped if the lib is an archive built from a board) if( module->IsFlipped() ) From 3b0712873a399d4db9eef6f10e17328594649d15 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Mon, 5 May 2014 12:28:40 -0500 Subject: [PATCH 357/741] Modular-Kicad milestone B), glamorous portions: *) Eeschema can now show the footprint editor. *) Eeschema can now invoke the footprint picker from the library part field editor. *) KIWAY_PLAYER::ShowModal() takes aResultantFocusWindow that tells what window to give the focus to. Required since frames are often near the top of the hierarchy and they are invoked by a peer, not a parent. --- common/basicframe.cpp | 2 +- common/dialog_shim.cpp | 4 ++ common/kiway.cpp | 8 +++- common/kiway_player.cpp | 38 +++++++++++++----- .../dialog_edit_component_in_schematic.cpp | 16 ++------ .../dialog_edit_libentry_fields_in_lib.cpp | 40 ++++++++++++++++--- ...ialog_edit_libentry_fields_in_lib_base.cpp | 2 +- ...ialog_edit_libentry_fields_in_lib_base.fbp | 2 +- .../dialog_edit_libentry_fields_in_lib_base.h | 5 ++- eeschema/getpart.cpp | 2 +- eeschema/schframe.cpp | 18 +++++++++ eeschema/tool_sch.cpp | 10 ++++- include/id.h | 1 + include/kiway_player.h | 3 +- include/wxEeschemaStruct.h | 3 +- pcbnew/loadcmp.cpp | 3 +- 16 files changed, 114 insertions(+), 43 deletions(-) diff --git a/common/basicframe.cpp b/common/basicframe.cpp index 8f05616062..382c9c9164 100644 --- a/common/basicframe.cpp +++ b/common/basicframe.cpp @@ -157,7 +157,7 @@ bool EDA_BASE_FRAME::Enable( bool enable ) #if defined(DEBUG) const char* type_id = typeid( *this ).name(); - printf( "wxFrame %s: %s\n", type_id, enable ? "enabled" : "disabled" ); + printf( "wxFrame %-28s: %s\n", type_id, enable ? "enabled" : "disabled" ); #endif return wxFrame::Enable( enable ); diff --git a/common/dialog_shim.cpp b/common/dialog_shim.cpp index f8236c1ac6..1d3e9b6054 100644 --- a/common/dialog_shim.cpp +++ b/common/dialog_shim.cpp @@ -244,8 +244,12 @@ int DIALOG_SHIM::ShowQuasiModal() if( win ) win->ReleaseMouse(); + // Get the optimal parent wxWindow* parent = GetParentForModalDialog( GetParent(), GetWindowStyle() ); + // Show the optimal parent + DBG( if( parent ) printf( "%s: optimal parent: %s\n", __func__, typeid(*parent).name() );) + ENABLE_DISABLE toggle( parent ); // quasi-modal: disable only my "optimal" parent Show( true ); diff --git a/common/kiway.cpp b/common/kiway.cpp index 8f2ebf9824..396c5cb417 100644 --- a/common/kiway.cpp +++ b/common/kiway.cpp @@ -53,7 +53,7 @@ KIWAY::KIWAY( PGM_BASE* aProgram, int aCtlBits, wxFrame* aTop ): // Any event types derived from wxCommandEvt, like wxWindowDestroyEvent, are -// propogated upwards to parent windows if not handled below. Therefor the +// propogated upwards to parent windows if not handled below. Therefore the // m_top window should receive all wxWindowDestroyEvents originating from // KIWAY_PLAYERs. It does anyways, but now player_destroy_handler eavesdrops // on that event stream looking for KIWAY_PLAYERs being closed. @@ -67,10 +67,14 @@ void KIWAY::player_destroy_handler( wxWindowDestroyEvent& event ) // if destroying one of our flock, then mark it as deceased. if( (wxWindow*) m_player[i] == w ) { - DBG(printf( "%s: marking m_player[%d] as destroyed\n", __func__, i );) + DBG(printf( "%s: m_player[%d] destroyed: %s\n", + __func__, i, TO_UTF8( m_player[i]->GetName() ) );) + m_player[i] = 0; } } + + // event.Skip(); skip to who, the wxApp? I'm the top window. } diff --git a/common/kiway_player.cpp b/common/kiway_player.cpp index ab0ae3e571..fc0415a702 100644 --- a/common/kiway_player.cpp +++ b/common/kiway_player.cpp @@ -72,7 +72,7 @@ void KIWAY_PLAYER::KiwayMailIn( KIWAY_EXPRESS& aEvent ) } -bool KIWAY_PLAYER::ShowModal( wxString* aResult ) +bool KIWAY_PLAYER::ShowModal( wxString* aResult, wxWindow* aResultantFocusWindow ) { wxASSERT_MSG( IsModal(), wxT( "ShowModal() shouldn't be called on non-modal frame" ) ); @@ -94,24 +94,30 @@ bool KIWAY_PLAYER::ShowModal( wxString* aResult ) ~NULLER() { m_what = 0; } // indeed, set it to NULL on destruction } clear_this( (void*&) m_modal_loop ); - // exception safe way to disable all frames except the modal one, - // re-enables only those that were disabled on exit - wxWindowDisabler toggle( this ); Show( true ); + SetFocus(); - WX_EVENT_LOOP event_loop; + { + // exception safe way to disable all frames except the modal one, + // re-enables only those that were disabled on exit + wxWindowDisabler toggle( this ); + + WX_EVENT_LOOP event_loop; #if wxCHECK_VERSION( 2, 9, 4 ) // 2.9.4 is only approximate. - // new code needs this, old code does it in wxEventLoop::Run() and cannot - // tolerate it here. Where that boundary is as a version number, I don't know. - // A closer look at the subversion repo for wx would tell. - wxEventLoopActivator event_loop_stacker( &event_loop ); + // new code needs this, old code does it in wxEventLoop::Run() and cannot + // tolerate it here. Where that boundary is as a version number, I don't know. + // A closer look at the subversion repo for wx would tell. + wxEventLoopActivator event_loop_stacker( &event_loop ); #endif - m_modal_loop = &event_loop; + m_modal_loop = &event_loop; - event_loop.Run(); + event_loop.Run(); + + } // End of scop for some variables. + // End nesting before setting focus below. if( aResult ) *aResult = m_modal_string; @@ -119,6 +125,16 @@ bool KIWAY_PLAYER::ShowModal( wxString* aResult ) DBG(printf( "~%s: aResult:'%s' ret:%d\n", __func__, TO_UTF8( m_modal_string ), m_modal_ret_val );) + if( aResultantFocusWindow ) + { + aResultantFocusWindow->Raise(); + + // have the final say, after wxWindowDisabler reenables my parent and + // the events settle down, set the focus + wxYield(); + aResultantFocusWindow->SetFocus(); + } + return m_modal_ret_val; } diff --git a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp index cb9fcbc4ee..0ea32ac16e 100644 --- a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp +++ b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp @@ -436,13 +436,8 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::deleteFieldButtonHandler( wxCommandEven void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::showButtonHandler( wxCommandEvent& event ) { -#if 0 - wxString datasheet_uri = fieldValueTextCtrl->GetValue(); - ::wxLaunchDefaultBrowser( datasheet_uri ); - -#else - unsigned fieldNdx = getSelectedFieldNdx(); + if( fieldNdx == DATASHEET ) { wxString datasheet_uri = fieldValueTextCtrl->GetValue(); @@ -455,17 +450,14 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::showButtonHandler( wxCommandEvent& even KIWAY_PLAYER* frame = Kiway().Player( FRAME_PCB_MODULE_VIEWER_MODAL, true ); - if( frame->ShowModal( &fpid ) ) + if( frame->ShowModal( &fpid, this ) ) { - printf( "%s: %s\n", __func__, TO_UTF8( fpid ) ); + // DBG( printf( "%s: %s\n", __func__, TO_UTF8( fpid ) ); ) fieldValueTextCtrl->SetValue( fpid ); - } frame->Destroy(); } -#endif - } @@ -771,8 +763,6 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copySelectedFieldToPanel() else m_show_datasheet_button->SetLabel( wxEmptyString ); - m_show_datasheet_button->Enable( fieldNdx == DATASHEET || fieldNdx == FOOTPRINT ); - // 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_libentry_fields_in_lib.cpp b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp index 4036c36cb5..37831227d9 100644 --- a/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp +++ b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp @@ -28,6 +28,7 @@ #include #include +#include #include #include #include @@ -141,7 +142,7 @@ void LIB_EDIT_FRAME::InstallFieldsEditorDialog( wxCommandEvent& event ) DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB dlg( this, m_component ); - int abort = dlg.ShowModal(); + int abort = dlg.ShowQuasiModal(); if( abort ) return; @@ -211,7 +212,7 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::OnListItemSelected( wxListEvent& event void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::OnCancelButtonClick( wxCommandEvent& event ) { - EndModal( 1 ); + EndQuasiModal( 1 ); } @@ -282,7 +283,7 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::OnOKButtonClick( wxCommandEvent& event m_parent->OnModify(); - EndModal( 0 ); + EndQuasiModal( 0 ); } @@ -381,8 +382,28 @@ 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 ); + unsigned fieldNdx = getSelectedFieldNdx(); + + if( fieldNdx == DATASHEET ) + { + wxString datasheet_uri = fieldValueTextCtrl->GetValue(); + ::wxLaunchDefaultBrowser( datasheet_uri ); + } + else if( fieldNdx == FOOTPRINT ) + { + // pick a footprint using the footprint picker. + wxString fpid; + + KIWAY_PLAYER* frame = Kiway().Player( FRAME_PCB_MODULE_VIEWER_MODAL, true ); + + if( frame->ShowModal( &fpid, this ) ) + { + // DBG( printf( "%s: %s\n", __func__, TO_UTF8( fpid ) ); ) + fieldValueTextCtrl->SetValue( fpid ); + } + + frame->Destroy(); + } } @@ -652,7 +673,14 @@ 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 ); + m_show_datasheet_button->Enable( fieldNdx == DATASHEET || fieldNdx == FOOTPRINT ); + + if( fieldNdx == DATASHEET ) + m_show_datasheet_button->SetLabel( _( "Show in Browser" ) ); + else if( fieldNdx == FOOTPRINT ) + m_show_datasheet_button->SetLabel( _( "Assign Footprint" ) ); + else + m_show_datasheet_button->SetLabel( wxEmptyString ); 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 a859617859..956e092640 100644 --- a/eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.cpp +++ b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.cpp @@ -9,7 +9,7 @@ /////////////////////////////////////////////////////////////////////////// -DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); 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 d6a0535ca9..94ef7e29cf 100644 --- a/eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.fbp +++ b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.fbp @@ -46,7 +46,7 @@ -1,-1 wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU - + DIALOG_SHIM; dialog_shim.h Field Properties 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 82188f2008..fdd0464897 100644 --- a/eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.h +++ b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.h @@ -11,6 +11,9 @@ #include #include #include +class DIALOG_SHIM; + +#include "dialog_shim.h" #include #include #include @@ -33,7 +36,7 @@ /////////////////////////////////////////////////////////////////////////////// /// Class DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE /////////////////////////////////////////////////////////////////////////////// -class DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE : public wxDialog +class DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE : public DIALOG_SHIM { private: diff --git a/eeschema/getpart.cpp b/eeschema/getpart.cpp index e81d028bfa..8821cfb31e 100644 --- a/eeschema/getpart.cpp +++ b/eeschema/getpart.cpp @@ -79,7 +79,7 @@ wxString SCH_BASE_FRAME::SelectComponentFromLibBrowser( LIB_ALIAS* aPreselectedA wxString cmpname; - if( viewlibFrame->ShowModal( &cmpname ) ) + if( viewlibFrame->ShowModal( &cmpname, this ) ) { if( aUnit ) *aUnit = viewlibFrame->GetUnit(); diff --git a/eeschema/schframe.cpp b/eeschema/schframe.cpp index db9e8f50ce..fad9539da9 100644 --- a/eeschema/schframe.cpp +++ b/eeschema/schframe.cpp @@ -101,6 +101,8 @@ BEGIN_EVENT_TABLE( SCH_EDIT_FRAME, EDA_DRAW_FRAME ) EVT_TOOL( ID_TO_LIBVIEW, SCH_EDIT_FRAME::OnOpenLibraryViewer ) EVT_TOOL( ID_TO_PCB, SCH_EDIT_FRAME::OnOpenPcbnew ) + EVT_TOOL( ID_TO_PCB_MODULE_EDITOR, SCH_EDIT_FRAME::OnOpenPcbModuleEditor ) + EVT_TOOL( ID_TO_CVPCB, SCH_EDIT_FRAME::OnOpenCvpcb ) EVT_TOOL( ID_SHEET_SET, EDA_DRAW_FRAME::Process_PageSettings ) @@ -794,6 +796,22 @@ void SCH_EDIT_FRAME::OnOpenPcbnew( wxCommandEvent& event ) } +void SCH_EDIT_FRAME::OnOpenPcbModuleEditor( wxCommandEvent& event ) +{ + if( !Kiface().IsSingle() ) + { + wxFileName fn = g_RootSheet->GetScreen()->GetFileName(); + + if( fn.IsOk() ) + { + KIWAY_PLAYER* player = Kiway().Player( FRAME_PCB_MODULE_EDITOR ); + player->Show( true ); + player->Raise(); + } + } +} + + void SCH_EDIT_FRAME::OnOpenCvpcb( wxCommandEvent& event ) { wxFileName fn = g_RootSheet->GetScreen()->GetFileName(); diff --git a/eeschema/tool_sch.cpp b/eeschema/tool_sch.cpp index 2bbed5bd48..962ef3847f 100644 --- a/eeschema/tool_sch.cpp +++ b/eeschema/tool_sch.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -139,10 +140,8 @@ void SCH_EDIT_FRAME::ReCreateHToolbar() m_mainToolBar->AddTool( ID_TO_LIBVIEW, wxEmptyString, KiBitmap( library_browse_xpm ), HELP_RUN_LIB_VIEWER ); - m_mainToolBar->AddSeparator(); - m_mainToolBar->AddTool( ID_GET_ANNOTATE, wxEmptyString, KiBitmap( annotate_xpm ), HELP_ANNOTATE ); @@ -158,6 +157,13 @@ void SCH_EDIT_FRAME::ReCreateHToolbar() m_mainToolBar->AddSeparator(); + // The user must HAVE footprints before he can assign them. So put this before + // the CVPCB. + if( !Kiface().IsSingle() ) // if pcbnew is not a separate process + { + m_mainToolBar->AddTool( ID_TO_PCB_MODULE_EDITOR, wxEmptyString, KiBitmap( module_editor_xpm ), + _( "Footprint Editor" ) ); + } m_mainToolBar->AddTool( ID_TO_CVPCB, wxEmptyString, KiBitmap( cvpcb_xpm ), _( "Run CvPcb to associate components and footprints" ) ); diff --git a/include/id.h b/include/id.h index 0c60acd429..a243491c30 100644 --- a/include/id.h +++ b/include/id.h @@ -45,6 +45,7 @@ enum main_id { ID_TO_PCB = wxID_HIGHEST, + ID_TO_PCB_MODULE_EDITOR, ID_TO_CVPCB, ID_LOAD_PROJECT, ID_APPEND_PROJECT, diff --git a/include/kiway_player.h b/include/kiway_player.h index e62981ab54..48cfeafc4a 100644 --- a/include/kiway_player.h +++ b/include/kiway_player.h @@ -185,11 +185,12 @@ public: * event which ends the modal behavior. * * @param aResult if not NULL, indicates a place to put a resultant string. + * @param aResultantFocusWindow if not NULL, indicates what window to pass focus to on return. * * @return bool - true if frame implementation called KIWAY_PLAYER::DismissModal() * with aRetVal of true. */ - VTBL_ENTRY bool ShowModal( wxString* aResult = NULL ); + VTBL_ENTRY bool ShowModal( wxString* aResult = NULL, wxWindow* aResultantFocusWindow = NULL ); //-------------------------------------------------------- diff --git a/include/wxEeschemaStruct.h b/include/wxEeschemaStruct.h index 171351d321..852b65c3fc 100644 --- a/include/wxEeschemaStruct.h +++ b/include/wxEeschemaStruct.h @@ -368,7 +368,7 @@ public: */ virtual void ExecuteRemoteCommand( const char* cmdline ); - void KiwayMailIn( KIWAY_EXPRESS& aEvent ); // virtual overload from KIWAY_PLAYER + void KiwayMailIn( KIWAY_EXPRESS& aEvent ); // override virtual from KIWAY_PLAYER void OnLeftClick( wxDC* aDC, const wxPoint& aPosition ); void OnLeftDClick( wxDC* aDC, const wxPoint& aPosition ); @@ -793,6 +793,7 @@ private: void OnLoadProject( wxCommandEvent& event ); void OnAppendProject( wxCommandEvent& event ); void OnOpenPcbnew( wxCommandEvent& event ); + void OnOpenPcbModuleEditor( wxCommandEvent& event ); void OnOpenCvpcb( wxCommandEvent& event ); void OnOpenLibraryEditor( wxCommandEvent& event ); void OnSetOptions( wxCommandEvent& event ); diff --git a/pcbnew/loadcmp.cpp b/pcbnew/loadcmp.cpp index 6e66b00c55..dda500664f 100644 --- a/pcbnew/loadcmp.cpp +++ b/pcbnew/loadcmp.cpp @@ -135,7 +135,7 @@ wxString PCB_BASE_FRAME::SelectFootprintFromLibBrowser() wxString fpid; - viewer->ShowModal( &fpid ); + viewer->ShowModal( &fpid, this ); //DBG(printf("%s: fpid:'%s'\n", __func__, TO_UTF8( fpid ) );) @@ -274,7 +274,6 @@ MODULE* PCB_BASE_FRAME::LoadModuleFromLibrary( const wxString& aLibrary, module->SetTimeStamp( GetNewTimeStamp() ); GetBoard()->m_Status_Pcb = 0; - // Put it on FRONT layer, // (Can be stored flipped if the lib is an archive built from a board) if( module->IsFlipped() ) From 0e8a72dbf08bb4be9ae79c5697a33ffd98422836 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Mon, 5 May 2014 23:58:33 -0500 Subject: [PATCH 358/741] Fix new bug which crashed pcbnew running under kicad.exe while adding a new module in mod editor --- pcbnew/moduleframe.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index 076dc14999..cc83322f50 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -31,7 +31,7 @@ #include #include -//#include +#include #include #include #include @@ -50,7 +50,6 @@ #include #include #include -#include static PCB_SCREEN* s_screenModule; // the PCB_SCREEN used by the footprint editor @@ -296,7 +295,8 @@ BOARD_DESIGN_SETTINGS& FOOTPRINT_EDIT_FRAME::GetDesignSettings() const { // get the BOARD_DESIGN_SETTINGS from the parent editor, not our BOARD. - PCB_BASE_FRAME* parentFrame = (PCB_BASE_FRAME*) GetParent(); + // @todo(DICK) change the routing to some default or the board directly, parent may not exist + PCB_BASE_FRAME* parentFrame = (PCB_BASE_FRAME*) Kiway().Player( FRAME_PCB, true ); wxASSERT( parentFrame ); @@ -308,7 +308,8 @@ void FOOTPRINT_EDIT_FRAME::SetDesignSettings( const BOARD_DESIGN_SETTINGS& aSett { // set the BOARD_DESIGN_SETTINGS into parent editor, not our BOARD. - PCB_BASE_FRAME* parentFrame = (PCB_BASE_FRAME*) GetParent(); + // @todo(DICK) change the routing to some default or the board directly, parent may not exist + PCB_BASE_FRAME* parentFrame = (PCB_BASE_FRAME*) Kiway().Player( FRAME_PCB, true ); wxASSERT( parentFrame ); @@ -320,7 +321,8 @@ const PCB_PLOT_PARAMS& FOOTPRINT_EDIT_FRAME::GetPlotSettings() const { // get the settings from the parent editor, not our BOARD. - PCB_BASE_FRAME* parentFrame = (PCB_BASE_FRAME*) GetParent(); + // @todo(DICK) change the routing to some default or the board directly, parent may not exist + PCB_BASE_FRAME* parentFrame = (PCB_BASE_FRAME*) Kiway().Player( FRAME_PCB, true ); wxASSERT( parentFrame ); @@ -332,7 +334,8 @@ void FOOTPRINT_EDIT_FRAME::SetPlotSettings( const PCB_PLOT_PARAMS& aSettings ) { // set the settings into parent editor, not our BOARD. - PCB_BASE_FRAME* parentFrame = (PCB_BASE_FRAME*) GetParent(); + // @todo(DICK) change the routing to some default or the board directly, parent may not exist + PCB_BASE_FRAME* parentFrame = (PCB_BASE_FRAME*) Kiway().Player( FRAME_PCB, true ); wxASSERT( parentFrame ); From 843449839416d50c7a10df4cc825bdcef08f2a05 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Mon, 5 May 2014 23:58:33 -0500 Subject: [PATCH 359/741] Fix new bug which crashed pcbnew running under kicad.exe while adding a new module in mod editor --- pcbnew/moduleframe.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index 076dc14999..cc83322f50 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -31,7 +31,7 @@ #include #include -//#include +#include #include #include #include @@ -50,7 +50,6 @@ #include #include #include -#include static PCB_SCREEN* s_screenModule; // the PCB_SCREEN used by the footprint editor @@ -296,7 +295,8 @@ BOARD_DESIGN_SETTINGS& FOOTPRINT_EDIT_FRAME::GetDesignSettings() const { // get the BOARD_DESIGN_SETTINGS from the parent editor, not our BOARD. - PCB_BASE_FRAME* parentFrame = (PCB_BASE_FRAME*) GetParent(); + // @todo(DICK) change the routing to some default or the board directly, parent may not exist + PCB_BASE_FRAME* parentFrame = (PCB_BASE_FRAME*) Kiway().Player( FRAME_PCB, true ); wxASSERT( parentFrame ); @@ -308,7 +308,8 @@ void FOOTPRINT_EDIT_FRAME::SetDesignSettings( const BOARD_DESIGN_SETTINGS& aSett { // set the BOARD_DESIGN_SETTINGS into parent editor, not our BOARD. - PCB_BASE_FRAME* parentFrame = (PCB_BASE_FRAME*) GetParent(); + // @todo(DICK) change the routing to some default or the board directly, parent may not exist + PCB_BASE_FRAME* parentFrame = (PCB_BASE_FRAME*) Kiway().Player( FRAME_PCB, true ); wxASSERT( parentFrame ); @@ -320,7 +321,8 @@ const PCB_PLOT_PARAMS& FOOTPRINT_EDIT_FRAME::GetPlotSettings() const { // get the settings from the parent editor, not our BOARD. - PCB_BASE_FRAME* parentFrame = (PCB_BASE_FRAME*) GetParent(); + // @todo(DICK) change the routing to some default or the board directly, parent may not exist + PCB_BASE_FRAME* parentFrame = (PCB_BASE_FRAME*) Kiway().Player( FRAME_PCB, true ); wxASSERT( parentFrame ); @@ -332,7 +334,8 @@ void FOOTPRINT_EDIT_FRAME::SetPlotSettings( const PCB_PLOT_PARAMS& aSettings ) { // set the settings into parent editor, not our BOARD. - PCB_BASE_FRAME* parentFrame = (PCB_BASE_FRAME*) GetParent(); + // @todo(DICK) change the routing to some default or the board directly, parent may not exist + PCB_BASE_FRAME* parentFrame = (PCB_BASE_FRAME*) Kiway().Player( FRAME_PCB, true ); wxASSERT( parentFrame ); From 279f6e2bcf1a4efd1194214c628f166465e34859 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Tue, 6 May 2014 00:23:57 -0500 Subject: [PATCH 360/741] Allow building of a STABLE or TESTING version using kicad-install.sh. --- scripts/kicad-install.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/scripts/kicad-install.sh b/scripts/kicad-install.sh index d5e9877926..b867060b77 100755 --- a/scripts/kicad-install.sh +++ b/scripts/kicad-install.sh @@ -34,6 +34,17 @@ # Set where the 3 source trees will go, use a full path WORKING_TREES=~/kicad_sources +STABLE=tag:pre-kiway # currently the best mix of features and stabilty +TESTING=last:1 # the most recent + + +# Set this to STABLE or TESTING or other know revision number: +REVISION=$STABLE + +# For info on revision syntax: +# $ bzr help revisionspec + + # CMake Options #OPTS="$OPTS -DBUILD_GITHUB_PLUGIN=OFF" @@ -45,9 +56,6 @@ WORKING_TREES=~/kicad_sources # https results in read only access. REPOS=https://code.launchpad.net -# This is no longer maintained, is old -#LEGACY_LIB_REPO=$REPOS/~dickelbeck/kicad/library-read-only - # This branch is a bzr/launchpad import of the Git repository # at https://github.com/KiCad/kicad-library.git. # It has schematic parts and 3D models in it. @@ -216,7 +224,7 @@ install_or_update() echo " source repo to local working tree." else cd kicad.bzr - bzr up + bzr up -r $REVISION echo " local source working tree updated." cd ../ fi From b933ef856506d3c9607d11990d50de1e755acb24 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Tue, 6 May 2014 00:23:57 -0500 Subject: [PATCH 361/741] Allow building of a STABLE or TESTING version using kicad-install.sh. --- scripts/kicad-install.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/scripts/kicad-install.sh b/scripts/kicad-install.sh index d5e9877926..b867060b77 100755 --- a/scripts/kicad-install.sh +++ b/scripts/kicad-install.sh @@ -34,6 +34,17 @@ # Set where the 3 source trees will go, use a full path WORKING_TREES=~/kicad_sources +STABLE=tag:pre-kiway # currently the best mix of features and stabilty +TESTING=last:1 # the most recent + + +# Set this to STABLE or TESTING or other know revision number: +REVISION=$STABLE + +# For info on revision syntax: +# $ bzr help revisionspec + + # CMake Options #OPTS="$OPTS -DBUILD_GITHUB_PLUGIN=OFF" @@ -45,9 +56,6 @@ WORKING_TREES=~/kicad_sources # https results in read only access. REPOS=https://code.launchpad.net -# This is no longer maintained, is old -#LEGACY_LIB_REPO=$REPOS/~dickelbeck/kicad/library-read-only - # This branch is a bzr/launchpad import of the Git repository # at https://github.com/KiCad/kicad-library.git. # It has schematic parts and 3D models in it. @@ -216,7 +224,7 @@ install_or_update() echo " source repo to local working tree." else cd kicad.bzr - bzr up + bzr up -r $REVISION echo " local source working tree updated." cd ../ fi From e797c489d150f4fa68af9afc955ef5b5cbcaed8d Mon Sep 17 00:00:00 2001 From: Lorenzo Marcantonio Date: Tue, 6 May 2014 17:14:47 +0200 Subject: [PATCH 362/741] Missing const caused unpickability of tracks --- pcbnew/class_track.cpp | 2 +- pcbnew/class_track.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index 7a40e066fb..02872390bf 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -1231,7 +1231,7 @@ void VIA::GetMsgPanelInfoBase( std::vector< MSG_PANEL_ITEM >& aList ) } -bool TRACK::HitTest( const wxPoint& aPosition ) +bool TRACK::HitTest( const wxPoint& aPosition ) const { return TestSegmentHit( aPosition, m_Start, m_End, m_Width / 2 ); } diff --git a/pcbnew/class_track.h b/pcbnew/class_track.h index 4340c33e6d..c5ca9d03d7 100644 --- a/pcbnew/class_track.h +++ b/pcbnew/class_track.h @@ -223,7 +223,7 @@ public: const KICAD_T scanTypes[] ); - virtual bool HitTest( const wxPoint& aPosition ); + virtual bool HitTest( const wxPoint& aPosition ) const; /** @copydoc BOARD_ITEM::HitTest(const EDA_RECT& aRect, * bool aContained = true, int aAccuracy ) const From e4508a65ffae8b1b4c42df203acb4a814a552399 Mon Sep 17 00:00:00 2001 From: Lorenzo Marcantonio Date: Tue, 6 May 2014 17:14:47 +0200 Subject: [PATCH 363/741] Missing const caused unpickability of tracks --- pcbnew/class_track.cpp | 2 +- pcbnew/class_track.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index 7a40e066fb..02872390bf 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -1231,7 +1231,7 @@ void VIA::GetMsgPanelInfoBase( std::vector< MSG_PANEL_ITEM >& aList ) } -bool TRACK::HitTest( const wxPoint& aPosition ) +bool TRACK::HitTest( const wxPoint& aPosition ) const { return TestSegmentHit( aPosition, m_Start, m_End, m_Width / 2 ); } diff --git a/pcbnew/class_track.h b/pcbnew/class_track.h index 4340c33e6d..c5ca9d03d7 100644 --- a/pcbnew/class_track.h +++ b/pcbnew/class_track.h @@ -223,7 +223,7 @@ public: const KICAD_T scanTypes[] ); - virtual bool HitTest( const wxPoint& aPosition ); + virtual bool HitTest( const wxPoint& aPosition ) const; /** @copydoc BOARD_ITEM::HitTest(const EDA_RECT& aRect, * bool aContained = true, int aAccuracy ) const From 8c2da5f51c033b46a21bcb3a860f08f0c5d008c0 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Thu, 8 May 2014 17:29:22 -0500 Subject: [PATCH 364/741] peggable checkout version in scripts/kicad-install.sh --- scripts/kicad-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/kicad-install.sh b/scripts/kicad-install.sh index b867060b77..e1826fc55a 100755 --- a/scripts/kicad-install.sh +++ b/scripts/kicad-install.sh @@ -220,7 +220,7 @@ install_or_update() echo "step 3) checking out the source code from launchpad repo..." if [ ! -d "$WORKING_TREES/kicad.bzr" ]; then - bzr checkout $SRCS_REPO kicad.bzr + bzr checkout -r $REVISION $SRCS_REPO kicad.bzr echo " source repo to local working tree." else cd kicad.bzr From 223e372628445776581fee40ff47e941f0911372 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Thu, 8 May 2014 17:29:22 -0500 Subject: [PATCH 365/741] peggable checkout version in scripts/kicad-install.sh --- scripts/kicad-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/kicad-install.sh b/scripts/kicad-install.sh index b867060b77..e1826fc55a 100755 --- a/scripts/kicad-install.sh +++ b/scripts/kicad-install.sh @@ -220,7 +220,7 @@ install_or_update() echo "step 3) checking out the source code from launchpad repo..." if [ ! -d "$WORKING_TREES/kicad.bzr" ]; then - bzr checkout $SRCS_REPO kicad.bzr + bzr checkout -r $REVISION $SRCS_REPO kicad.bzr echo " source repo to local working tree." else cd kicad.bzr From 190461f8ede5e53a59002999a5a6547ce6587dad Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 9 May 2014 08:32:05 +0200 Subject: [PATCH 366/741] OSX: fix incorrect path to launch pl_editor. fix also a bug in python script round_value_robin.py. --- eeschema/viewlib_frame.h | 1 - include/common.h | 2 +- scripts/bom-in-python/round_value_robin.py | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/eeschema/viewlib_frame.h b/eeschema/viewlib_frame.h index 4e67d0eafc..e87952a64e 100644 --- a/eeschema/viewlib_frame.h +++ b/eeschema/viewlib_frame.h @@ -36,7 +36,6 @@ #include #include -class wxSashLayoutWindow; class wxListBox; class CMP_LIBRARY; diff --git a/include/common.h b/include/common.h index ef03ea0e6a..f7d222adc6 100644 --- a/include/common.h +++ b/include/common.h @@ -102,7 +102,7 @@ enum pseudokeys { #define GERBVIEW_EXE wxT( "gerbview.app/Contents/MacOS/gerbview" ) #define BITMAPCONVERTER_EXE wxT( "bitmap2component.app/Contents/MacOS/bitmap2component" ) #define PCB_CALCULATOR_EXE wxT( "pcb_calculator.app/Contents/MacOS/pcb_calculator" ) -#define PL_EDITOR_EXE wxT( "pcb_calculator.app/Contents/MacOS/pl_editor" ) +#define PL_EDITOR_EXE wxT( "pl_editor.app/Contents/MacOS/pl_editor" ) # endif #endif diff --git a/scripts/bom-in-python/round_value_robin.py b/scripts/bom-in-python/round_value_robin.py index 536f5a1239..028312fc2a 100644 --- a/scripts/bom-in-python/round_value_robin.py +++ b/scripts/bom-in-python/round_value_robin.py @@ -30,7 +30,7 @@ def checkvalue(self): if v.isdigit(): i = int(v) if (i > 1000000): - i = i / 100000 + i = i / 1000000 v = str(i) + "M" if (i > 1000): i = i / 1000 From 0166c95efdd453613b5476a5904b706a4703fe57 Mon Sep 17 00:00:00 2001 From: "marco." Date: Fri, 9 May 2014 08:32:05 +0200 Subject: [PATCH 367/741] OSX: fix incorrect path to launch pl_editor. fix also a bug in python script round_value_robin.py. --- eeschema/viewlib_frame.h | 1 - include/common.h | 2 +- scripts/bom-in-python/round_value_robin.py | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/eeschema/viewlib_frame.h b/eeschema/viewlib_frame.h index 4e67d0eafc..e87952a64e 100644 --- a/eeschema/viewlib_frame.h +++ b/eeschema/viewlib_frame.h @@ -36,7 +36,6 @@ #include #include -class wxSashLayoutWindow; class wxListBox; class CMP_LIBRARY; diff --git a/include/common.h b/include/common.h index ef03ea0e6a..f7d222adc6 100644 --- a/include/common.h +++ b/include/common.h @@ -102,7 +102,7 @@ enum pseudokeys { #define GERBVIEW_EXE wxT( "gerbview.app/Contents/MacOS/gerbview" ) #define BITMAPCONVERTER_EXE wxT( "bitmap2component.app/Contents/MacOS/bitmap2component" ) #define PCB_CALCULATOR_EXE wxT( "pcb_calculator.app/Contents/MacOS/pcb_calculator" ) -#define PL_EDITOR_EXE wxT( "pcb_calculator.app/Contents/MacOS/pl_editor" ) +#define PL_EDITOR_EXE wxT( "pl_editor.app/Contents/MacOS/pl_editor" ) # endif #endif diff --git a/scripts/bom-in-python/round_value_robin.py b/scripts/bom-in-python/round_value_robin.py index 536f5a1239..028312fc2a 100644 --- a/scripts/bom-in-python/round_value_robin.py +++ b/scripts/bom-in-python/round_value_robin.py @@ -30,7 +30,7 @@ def checkvalue(self): if v.isdigit(): i = int(v) if (i > 1000000): - i = i / 100000 + i = i / 1000000 v = str(i) + "M" if (i > 1000): i = i / 1000 From ecbe6e0856eef27a554282a766ce332d913c67aa Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Fri, 9 May 2014 09:27:21 -0500 Subject: [PATCH 368/741] Try some new Mac support ideas. --- cvpcb/CMakeLists.txt | 41 +++++------ eeschema/CMakeLists.txt | 24 +++---- eeschema/Info.plist | 80 +++++++++------------ gerbview/CMakeLists.txt | 29 ++++---- gerbview/Info.plist | 116 +++++++++++++------------------ kicad/CMakeLists.txt | 16 +++++ kicad/Info.plist | 80 +++++++++------------ pagelayout_editor/CMakeLists.txt | 56 ++++++--------- pagelayout_editor/Info.plist | 80 +++++++++------------ pcb_calculator/CMakeLists.txt | 29 ++++---- pcbnew/CMakeLists.txt | 19 +++-- pcbnew/Info.plist | 79 +++++++++------------ 12 files changed, 275 insertions(+), 374 deletions(-) diff --git a/cvpcb/CMakeLists.txt b/cvpcb/CMakeLists.txt index f36d47ee56..626c41867b 100644 --- a/cvpcb/CMakeLists.txt +++ b/cvpcb/CMakeLists.txt @@ -100,7 +100,6 @@ if( USE_KIWAY_DLLS ) cvpcb.cpp ${CVPCB_SRCS} ${CVPCB_DIALOGS} -# ${CVPCB_RESOURCES} ) set_target_properties( cvpcb_kiface PROPERTIES OUTPUT_NAME cvpcb @@ -148,12 +147,6 @@ if( USE_KIWAY_DLLS ) target_link_libraries( cvpcb_kiface rt ) endif() - if( APPLE ) - set_target_properties( cvpcb PROPERTIES - MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist - ) - endif() - set_source_files_properties( cvpcb.cpp PROPERTIES # The KIFACE is in cvpcb.cpp, export it: COMPILE_DEFINITIONS "BUILD_KIWAY_DLL;COMPILING_DLL" @@ -172,18 +165,16 @@ if( USE_KIWAY_DLLS ) DESTINATION ${KICAD_BIN} COMPONENT binary ) - install( TARGETS cvpcb_kiface - DESTINATION ${KICAD_BIN} - COMPONENT binary - ) - if( APPLE ) - # copies kiface into the bundle - add_custom_target( _cvpcb_kiface_copy ALL - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/cvpcb/_cvpcb.kiface "${CMAKE_BINARY_DIR}/cvpcb/cvpcb.app/Contents/MacOS/" - DEPENDS cvpcb_kiface - COMMENT "Copying kiface into cvpcb" - ) + # puts the *.kiface into the *.app bundle while linking + set_target_properties( cvpcb_kiface PROPERTIES + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/cvpcb.app/Contents/MacOS/ + ) + else() + install( TARGETS cvpcb_kiface + DESTINATION ${KICAD_BIN} + COMPONENT binary + ) endif() else() @@ -228,15 +219,15 @@ else() # Must follow github_plugin target_link_libraries( cvpcb ${Boost_LIBRARIES} ) - if( APPLE ) - set_target_properties( cvpcb PROPERTIES - MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist - ) - endif() - install( TARGETS cvpcb DESTINATION ${KICAD_BIN} COMPONENT binary ) - +endif() + + +if( APPLE ) + set_target_properties( cvpcb PROPERTIES + MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist + ) endif() diff --git a/eeschema/CMakeLists.txt b/eeschema/CMakeLists.txt index b139726841..a57179691d 100644 --- a/eeschema/CMakeLists.txt +++ b/eeschema/CMakeLists.txt @@ -311,20 +311,18 @@ if( USE_KIWAY_DLLS ) DESTINATION ${KICAD_BIN} COMPONENT binary ) - install( TARGETS eeschema_kiface - # actual filename subject to change at milestone C) - # modular-kicad blueprint. - DESTINATION ${KICAD_BIN} - COMPONENT binary - ) - if( APPLE ) - # copies kiface into the bundle - add_custom_target( _eeschema_kiface_copy ALL - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/eeschema/_eeschema.kiface "${CMAKE_BINARY_DIR}/eeschema/eeschema.app/Contents/MacOS/" - DEPENDS eeschema_kiface - COMMENT "Copying kiface into eeschema" - ) + # puts the *.kiface into the *.app bundle while linking + set_target_properties( eeschema_kiface PROPERTIES + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/eeschema.app/Contents/MacOS/ + ) + else() + install( TARGETS eeschema_kiface + # actual filename subject to change at milestone C) + # modular-kicad blueprint. + DESTINATION ${KICAD_BIN} + COMPONENT binary + ) endif() else() diff --git a/eeschema/Info.plist b/eeschema/Info.plist index 80d58bfc7d..d9ad6ea8b2 100644 --- a/eeschema/Info.plist +++ b/eeschema/Info.plist @@ -2,54 +2,36 @@ - CFBundleDocumentTypes - - - CFBundleTypeRole - Editor - CFBundleTypeExtensions - - sch - - CFBundleTypeIconFile - eeschema.icns - CFBundleTypeName - eeschema document - LSHandlerRank - Owner - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - eeschema - CFBundleGetInfoString - - CFBundleIconFile - eeschema.icns - CFBundleIdentifier - org.kicad-eda.eeschema - CFBundleInfoDictionaryVersion - 6.0 - CFBundleLongVersionString - - CFBundleName - EESchema - CFBundlePackageType - APPL - CFBundleShortVersionString - - CFBundleSignature - ???? - CFBundleVersion - - CSResourcesFileMapped - - LSRequiresCarbon - - NSHumanReadableCopyright - - NSHighResolutionCapable - True + CFBundleDocumentTypes + + + CFBundleTypeRole Editor + CFBundleTypeExtensions + + sch + + + CFBundleTypeIconFile eeschema.icns + CFBundleTypeName eeschema document + LSHandlerRank Owner + + + + CFBundleDevelopmentRegion English + CFBundleExecutable eeschema + CFBundleGetInfoString + CFBundleIconFile eeschema.icns + CFBundleIdentifier org.kicad-eda.eeschema + CFBundleInfoDictionaryVersion 6.0 + CFBundleLongVersionString + CFBundleName EESchema + CFBundlePackageType APPL + CFBundleShortVersionString + CFBundleSignature ???? + CFBundleVersion + CSResourcesFileMapped + LSRequiresCarbon + NSHumanReadableCopyright + NSHighResolutionCapable True diff --git a/gerbview/CMakeLists.txt b/gerbview/CMakeLists.txt index 7eff8d254e..4ffae72958 100644 --- a/gerbview/CMakeLists.txt +++ b/gerbview/CMakeLists.txt @@ -81,11 +81,11 @@ endif() if( APPLE ) - set(GERBVIEW_RESOURCES gerbview.icns gerbview_doc.icns) - set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/gerbview.icns" PROPERTIES + set( GERBVIEW_RESOURCES gerbview.icns gerbview_doc.icns ) + set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/gerbview.icns" PROPERTIES MACOSX_PACKAGE_LOCATION Resources ) - set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/gerbview_doc.icns" PROPERTIES + set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/gerbview_doc.icns" PROPERTIES MACOSX_PACKAGE_LOCATION Resources ) set( MACOSX_BUNDLE_ICON_FILE gerbview.icns ) @@ -120,7 +120,6 @@ if( USE_KIWAY_DLLS ) ${GERBVIEW_SRCS} ${DIALOGS_SRCS} ${GERBVIEW_EXTRA_SRCS} -# ${GERBVIEW_RESOURCES} ) set_target_properties( gerbview_kiface PROPERTIES OUTPUT_NAME gerbview @@ -152,18 +151,16 @@ if( USE_KIWAY_DLLS ) DESTINATION ${KICAD_BIN} COMPONENT binary ) - install( TARGETS gerbview_kiface - DESTINATION ${KICAD_BIN} - COMPONENT binary - ) - if( APPLE ) - # copies kiface into the bundle - add_custom_target( _gerbview_kiface_copy ALL - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/gerbview/_gerbview.kiface "${CMAKE_BINARY_DIR}/gerbview/gerbview.app/Contents/MacOS/" - DEPENDS gerbview_kiface - COMMENT "Copying kiface into gerbview" - ) + # puts the *.kiface into the *.app bundle while linking + set_target_properties( gerbview_kiface PROPERTIES + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/gerbview.app/Contents/MacOS/ + ) + else() + install( TARGETS gerbview_kiface + DESTINATION ${KICAD_BIN} + COMPONENT binary + ) endif() else() @@ -194,5 +191,3 @@ if( APPLE ) set_target_properties( gerbview PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist) endif() - - diff --git a/gerbview/Info.plist b/gerbview/Info.plist index a9d27ad02e..a37434eca2 100644 --- a/gerbview/Info.plist +++ b/gerbview/Info.plist @@ -2,72 +2,54 @@ - CFBundleDocumentTypes - - - CFBundleTypeExtensions - - pen - gba - gbr - gbx - gbo - gbl - gtl - gto - gta - gbp - gbp - gbs - gts - gtp - gbx - lgr - ger - pho - drl - - CFBundleTypeIconFile - gerbview_doc.icns - CFBundleTypeName - gerbview document - LSHandlerRank - Default - CFBundleTypeRole - Viewer - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - gerbview - CFBundleGetInfoString - - CFBundleIconFile - gerbview.icns - CFBundleIdentifier - org.kicad-eda.gerbview - CFBundleInfoDictionaryVersion - 6.0 - CFBundleLongVersionString - - CFBundleName - GerbView - CFBundlePackageType - APPL - CFBundleShortVersionString - - CFBundleSignature - ???? - CFBundleVersion - - CSResourcesFileMapped - - LSRequiresCarbon - - NSHumanReadableCopyright - - NSHighResolutionCapable - True + CFBundleDocumentTypes + + + CFBundleTypeExtensions + + pen + gba + gbr + gbx + gbo + gbl + gtl + gto + gta + gbp + gbp + gbs + gts + gtp + gbx + lgr + ger + pho + drl + + + CFBundleTypeIconFile gerbview_doc.icns + CFBundleTypeName gerbview document + LSHandlerRank Default + CFBundleTypeRole Viewer + + + + CFBundleDevelopmentRegion English + CFBundleExecutable gerbview + CFBundleGetInfoString + CFBundleIconFile gerbview.icns + CFBundleIdentifier org.kicad-eda.gerbview + CFBundleInfoDictionaryVersion 6.0 + CFBundleLongVersionString + CFBundleName GerbView + CFBundlePackageType APPL + CFBundleShortVersionString + CFBundleSignature ???? + CFBundleVersion + CSResourcesFileMapped + LSRequiresCarbon + NSHumanReadableCopyright + NSHighResolutionCapable True diff --git a/kicad/CMakeLists.txt b/kicad/CMakeLists.txt index 1d76b4696b..121c5af247 100644 --- a/kicad/CMakeLists.txt +++ b/kicad/CMakeLists.txt @@ -57,6 +57,22 @@ if( UNIX ) endif() +if( APPLE ) + # In this CMakeLists.txt's build directory, create kiface symlinks should get + # "installed()" as part of the kicad.app bundle. These are pointers on the + # target which point up and over to the stand alone kicad app's *.kiface files. + foreach( symlink pcbnew eeschema cvpcb ) + add_custom_command( TARGET kicad + COMMAND ${CMAKE_COMMAND} -E remove + "${CMAKE_CURRENT_BINARY_DIR}/kicad.app/Contents/MacOS/_${symlink}.kiface" + COMMAND ${CMAKE_COMMAND} -E create_symlink + "../../../${symlink}.app/Contents/MacOS/_${symlink}.kiface" + "${CMAKE_CURRENT_BINARY_DIR}/kicad.app/Contents/MacOS/_${symlink}.kiface" + COMMENT "kicad.app ${symlink} symlink" + ) + endforeach() +endif() + if( APPLE ) set_target_properties( kicad PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist diff --git a/kicad/Info.plist b/kicad/Info.plist index fa990ed54d..d55a08c51a 100644 --- a/kicad/Info.plist +++ b/kicad/Info.plist @@ -2,54 +2,36 @@ - CFBundleDocumentTypes - - - CFBundleTypeRole - Editor - CFBundleTypeIconFile - kicad_doc.icns - CFBundleTypeExtensions - - pro - - CFBundleTypeName - kicad project files - LSHandlerRank - Owner - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - kicad - CFBundleGetInfoString - - CFBundleIconFile - kicad.icns - CFBundleIdentifier - org.kicad-eda.kicad - CFBundleInfoDictionaryVersion - 6.0 - CFBundleLongVersionString - - CFBundleName - KiCad - CFBundlePackageType - APPL - CFBundleShortVersionString - - CFBundleSignature - ???? - CFBundleVersion - - CSResourcesFileMapped - - LSRequiresCarbon - - NSHumanReadableCopyright - - NSHighResolutionCapable - True + CFBundleDocumentTypes + + + CFBundleTypeRole Editor + CFBundleTypeIconFile kicad_doc.icns + + CFBundleTypeExtensions + pro + + + CFBundleTypeName kicad project files + LSHandlerRank Owner + + + + CFBundleDevelopmentRegion English + CFBundleExecutable kicad + CFBundleGetInfoString + CFBundleIconFile kicad.icns + CFBundleIdentifier org.kicad-eda.kicad + CFBundleInfoDictionaryVersion 6.0 + CFBundleLongVersionString + CFBundleName KiCad + CFBundlePackageType APPL + CFBundleShortVersionString + CFBundleSignature ???? + CFBundleVersion + CSResourcesFileMapped + LSRequiresCarbon + NSHumanReadableCopyright + NSHighResolutionCapable True diff --git a/pagelayout_editor/CMakeLists.txt b/pagelayout_editor/CMakeLists.txt index cd6e41acdd..2f6a544db8 100644 --- a/pagelayout_editor/CMakeLists.txt +++ b/pagelayout_editor/CMakeLists.txt @@ -49,7 +49,20 @@ set( PL_EDITOR_EXTRA_SRCS if( MINGW ) # PL_EDITOR_RESOURCES variable is set by the macro. - mingw_resource_compiler(pl_editor) + mingw_resource_compiler( pl_editor ) +endif() + + +if( APPLE ) + set( PL_EDITOR_RESOURCES pl_editor.icns pl_editor_doc.icns ) + set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/pl_editor.icns" PROPERTIES + MACOSX_PACKAGE_LOCATION Resources + ) + set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/pl_editor_doc.icns" PROPERTIES + MACOSX_PACKAGE_LOCATION Resources + ) + set( MACOSX_BUNDLE_ICON_FILE pl_editor.icns ) + set( MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.pl_editor ) endif() @@ -82,7 +95,6 @@ if( USE_KIWAY_DLLS ) ${PL_EDITOR_SRCS} ${DIALOGS_SRCS} ${PL_EDITOR_EXTRA_SRCS} -# ${PL_EDITOR_RESOURCES} ) target_link_libraries( pl_editor_kiface common @@ -114,18 +126,16 @@ if( USE_KIWAY_DLLS ) DESTINATION ${KICAD_BIN} COMPONENT binary ) - install( TARGETS pl_editor_kiface - DESTINATION ${KICAD_BIN} - COMPONENT binary - ) - if( APPLE ) - # copies kiface into the bundle - add_custom_target( _pleditor_kiface_copy ALL - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/pagelayout_editor/_pl_editor.kiface "${CMAKE_BINARY_DIR}/pagelayout_editor/pl_editor.app/Contents/MacOS/" - DEPENDS pl_editor_kiface - COMMENT "Copying kiface into pleditor" - ) + # puts the *.kiface into the *.app bundle while linking + set_target_properties( pl_editor_kiface PROPERTIES + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/pl_editor.app/Contents/MacOS/ + ) + else() + install( TARGETS pl_editor_kiface + DESTINATION ${KICAD_BIN} + COMPONENT binary + ) endif() else() @@ -137,13 +147,6 @@ else() ${PL_EDITOR_EXTRA_SRCS} ${PL_EDITOR_RESOURCES} ) - - if( APPLE ) - set_target_properties( pl_editor PROPERTIES - MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist - ) - endif() - target_link_libraries( pl_editor common polygon @@ -152,28 +155,15 @@ else() ${wxWidgets_LIBRARIES} ${GDI_PLUS_LIBRARIES} ) - install( TARGETS pl_editor DESTINATION ${KICAD_BIN} COMPONENT binary ) - endif() if( APPLE ) - set( PL_EDITOR_RESOURCES pl_editor.icns pl_editor_doc.icns ) - set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/pl_editor.icns" PROPERTIES - MACOSX_PACKAGE_LOCATION Resources - ) - set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/pl_editor_doc.icns" PROPERTIES - MACOSX_PACKAGE_LOCATION Resources - ) - set( MACOSX_BUNDLE_ICON_FILE pl_editor.icns ) - set( MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.pl_editor ) - set_target_properties( pl_editor PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist ) endif() - diff --git a/pagelayout_editor/Info.plist b/pagelayout_editor/Info.plist index 64d9326613..9db98f05b2 100644 --- a/pagelayout_editor/Info.plist +++ b/pagelayout_editor/Info.plist @@ -2,54 +2,36 @@ - CFBundleDocumentTypes - - - CFBundleTypeRole - Editor - CFBundleTypeExtensions - - kicad_wks - - CFBundleTypeIconFile - pl_editor.icns - CFBundleTypeName - pl_editor document - LSHandlerRank - Owner - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - pl_editor - CFBundleGetInfoString - - CFBundleIconFile - pl_editor.icns - CFBundleIdentifier - org.kicad-eda.pl_editor - CFBundleInfoDictionaryVersion - 6.0 - CFBundleLongVersionString - - CFBundleName - pl_editor - CFBundlePackageType - APPL - CFBundleShortVersionString - - CFBundleSignature - ???? - CFBundleVersion - - CSResourcesFileMapped - - LSRequiresCarbon - - NSHumanReadableCopyright - - NSHighResolutionCapable - True + CFBundleDocumentTypes + + + CFBundleTypeRole Editor + CFBundleTypeExtensions + + kicad_wks + + + CFBundleTypeIconFile pl_editor.icns + CFBundleTypeName pl_editor document + LSHandlerRank Owner + + + + CFBundleDevelopmentRegion English + CFBundleExecutable pl_editor + CFBundleGetInfoString + CFBundleIconFile pl_editor.icns + CFBundleIdentifier org.kicad-eda.pl_editor + CFBundleInfoDictionaryVersion 6.0 + CFBundleLongVersionString + CFBundleName pl_editor + CFBundlePackageType APPL + CFBundleShortVersionString + CFBundleSignature ???? + CFBundleVersion + CSResourcesFileMapped + LSRequiresCarbon + NSHumanReadableCopyright + NSHighResolutionCapable True diff --git a/pcb_calculator/CMakeLists.txt b/pcb_calculator/CMakeLists.txt index 14db6b9ff6..8e1dad619c 100644 --- a/pcb_calculator/CMakeLists.txt +++ b/pcb_calculator/CMakeLists.txt @@ -122,14 +122,15 @@ if( USE_KIWAY_DLLS ) DESTINATION ${KICAD_BIN} COMPONENT binary ) - install( TARGETS pcb_calculator_kiface - DESTINATION ${KICAD_BIN} - COMPONENT binary - ) - if( APPLE ) - set_target_properties( pcb_calculator PROPERTIES - MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist + # puts the *.kiface into the *.app bundle while linking + set_target_properties( pcb_calculator_kiface PROPERTIES + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/pcb_calculator.app/Contents/MacOS/ + ) + else() + install( TARGETS pcb_calculator_kiface + DESTINATION ${KICAD_BIN} + COMPONENT binary ) endif() @@ -156,13 +157,6 @@ else() set_source_files_properties( pcb_calculator.cpp PROPERTIES COMPILE_DEFINITIONS "COMPILING_DLL" ) - - if( APPLE ) - set_target_properties( pcb_calculator PROPERTIES - MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist - ) - endif() - target_link_libraries( pcb_calculator common bitmaps @@ -175,3 +169,10 @@ else() ) endif() + + +if( APPLE ) + set_target_properties( pcb_calculator PROPERTIES + MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist + ) +endif() diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 42350320f5..068f950f39 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -589,17 +589,15 @@ if( USE_KIWAY_DLLS ) DESTINATION ${KICAD_BIN} COMPONENT binary ) - install( TARGETS pcbnew_kiface - DESTINATION ${KICAD_BIN} - COMPONENT binary - ) - if( APPLE ) - # copies kiface into the bundle - add_custom_target( _pcbnew_kiface_copy ALL - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/pcbnew/_pcbnew.kiface "${CMAKE_BINARY_DIR}/pcbnew/pcbnew.app/Contents/MacOS/" - DEPENDS pcbnew_kiface - COMMENT "Copying kiface into pcbnew" + # puts the *.kiface into the *.app bundle while linking + set_target_properties( pcbnew_kiface PROPERTIES + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/pcbnew.app/Contents/MacOS/ + ) + else() + install( TARGETS pcbnew_kiface + DESTINATION ${KICAD_BIN} + COMPONENT binary ) endif() @@ -763,3 +761,4 @@ if( false ) # haven't been used in years. ) target_link_libraries( layer_widget_test common ${wxWidgets_LIBRARIES} ) endif() + diff --git a/pcbnew/Info.plist b/pcbnew/Info.plist index 1f4b5bfdd5..3f31259d06 100644 --- a/pcbnew/Info.plist +++ b/pcbnew/Info.plist @@ -2,53 +2,36 @@ - CFBundleDocumentTypes - - - CFBundleTypeRole - Editor - CFBundleTypeIconFile - pcbnew_doc.icns - CFBundleTypeExtensions - - kicad_pcb - brd - - CFBundleTypeName - pcbnew board - LSHandlerRank - Owner - - - CFBundleExecutable - pcbnew - CFBundleGetInfoString - - CFBundleIconFile - pcbnew.icns - CFBundleIdentifier - org.kicad-eda.pcbnew - CFBundleInfoDictionaryVersion - 6.0 - CFBundleLongVersionString - - CFBundleName - PCBNew - CFBundlePackageType - APPL - CFBundleShortVersionString - - CFBundleSignature - ???? - CFBundleVersion - - CSResourcesFileMapped - - LSRequiresCarbon - - NSHumanReadableCopyright - - NSHighResolutionCapable - True + CFBundleDocumentTypes + + + CFBundleTypeRole Editor + CFBundleTypeIconFile pcbnew_doc.icns + CFBundleTypeExtensions + + kicad_pcb + brd + + + CFBundleTypeName pcbnew board + LSHandlerRank Owner + + + + CFBundleExecutable pcbnew + CFBundleGetInfoString + CFBundleIconFile pcbnew.icns + CFBundleIdentifier org.kicad-eda.pcbnew + CFBundleInfoDictionaryVersion 6.0 + CFBundleLongVersionString + CFBundleName PCBNew + CFBundlePackageType APPL + CFBundleShortVersionString + CFBundleSignature ???? + CFBundleVersion + CSResourcesFileMapped + LSRequiresCarbon + NSHumanReadableCopyright + NSHighResolutionCapable True From c855824337e0b68fae96bc0a8c4e9b8ed2117c54 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Fri, 9 May 2014 09:27:21 -0500 Subject: [PATCH 369/741] Try some new Mac support ideas. --- cvpcb/CMakeLists.txt | 41 +++++------ eeschema/CMakeLists.txt | 24 +++---- eeschema/Info.plist | 80 +++++++++------------ gerbview/CMakeLists.txt | 29 ++++---- gerbview/Info.plist | 116 +++++++++++++------------------ kicad/CMakeLists.txt | 16 +++++ kicad/Info.plist | 80 +++++++++------------ pagelayout_editor/CMakeLists.txt | 56 ++++++--------- pagelayout_editor/Info.plist | 80 +++++++++------------ pcb_calculator/CMakeLists.txt | 29 ++++---- pcbnew/CMakeLists.txt | 19 +++-- pcbnew/Info.plist | 79 +++++++++------------ 12 files changed, 275 insertions(+), 374 deletions(-) diff --git a/cvpcb/CMakeLists.txt b/cvpcb/CMakeLists.txt index f36d47ee56..626c41867b 100644 --- a/cvpcb/CMakeLists.txt +++ b/cvpcb/CMakeLists.txt @@ -100,7 +100,6 @@ if( USE_KIWAY_DLLS ) cvpcb.cpp ${CVPCB_SRCS} ${CVPCB_DIALOGS} -# ${CVPCB_RESOURCES} ) set_target_properties( cvpcb_kiface PROPERTIES OUTPUT_NAME cvpcb @@ -148,12 +147,6 @@ if( USE_KIWAY_DLLS ) target_link_libraries( cvpcb_kiface rt ) endif() - if( APPLE ) - set_target_properties( cvpcb PROPERTIES - MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist - ) - endif() - set_source_files_properties( cvpcb.cpp PROPERTIES # The KIFACE is in cvpcb.cpp, export it: COMPILE_DEFINITIONS "BUILD_KIWAY_DLL;COMPILING_DLL" @@ -172,18 +165,16 @@ if( USE_KIWAY_DLLS ) DESTINATION ${KICAD_BIN} COMPONENT binary ) - install( TARGETS cvpcb_kiface - DESTINATION ${KICAD_BIN} - COMPONENT binary - ) - if( APPLE ) - # copies kiface into the bundle - add_custom_target( _cvpcb_kiface_copy ALL - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/cvpcb/_cvpcb.kiface "${CMAKE_BINARY_DIR}/cvpcb/cvpcb.app/Contents/MacOS/" - DEPENDS cvpcb_kiface - COMMENT "Copying kiface into cvpcb" - ) + # puts the *.kiface into the *.app bundle while linking + set_target_properties( cvpcb_kiface PROPERTIES + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/cvpcb.app/Contents/MacOS/ + ) + else() + install( TARGETS cvpcb_kiface + DESTINATION ${KICAD_BIN} + COMPONENT binary + ) endif() else() @@ -228,15 +219,15 @@ else() # Must follow github_plugin target_link_libraries( cvpcb ${Boost_LIBRARIES} ) - if( APPLE ) - set_target_properties( cvpcb PROPERTIES - MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist - ) - endif() - install( TARGETS cvpcb DESTINATION ${KICAD_BIN} COMPONENT binary ) - +endif() + + +if( APPLE ) + set_target_properties( cvpcb PROPERTIES + MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist + ) endif() diff --git a/eeschema/CMakeLists.txt b/eeschema/CMakeLists.txt index b139726841..a57179691d 100644 --- a/eeschema/CMakeLists.txt +++ b/eeschema/CMakeLists.txt @@ -311,20 +311,18 @@ if( USE_KIWAY_DLLS ) DESTINATION ${KICAD_BIN} COMPONENT binary ) - install( TARGETS eeschema_kiface - # actual filename subject to change at milestone C) - # modular-kicad blueprint. - DESTINATION ${KICAD_BIN} - COMPONENT binary - ) - if( APPLE ) - # copies kiface into the bundle - add_custom_target( _eeschema_kiface_copy ALL - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/eeschema/_eeschema.kiface "${CMAKE_BINARY_DIR}/eeschema/eeschema.app/Contents/MacOS/" - DEPENDS eeschema_kiface - COMMENT "Copying kiface into eeschema" - ) + # puts the *.kiface into the *.app bundle while linking + set_target_properties( eeschema_kiface PROPERTIES + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/eeschema.app/Contents/MacOS/ + ) + else() + install( TARGETS eeschema_kiface + # actual filename subject to change at milestone C) + # modular-kicad blueprint. + DESTINATION ${KICAD_BIN} + COMPONENT binary + ) endif() else() diff --git a/eeschema/Info.plist b/eeschema/Info.plist index 80d58bfc7d..d9ad6ea8b2 100644 --- a/eeschema/Info.plist +++ b/eeschema/Info.plist @@ -2,54 +2,36 @@ - CFBundleDocumentTypes - - - CFBundleTypeRole - Editor - CFBundleTypeExtensions - - sch - - CFBundleTypeIconFile - eeschema.icns - CFBundleTypeName - eeschema document - LSHandlerRank - Owner - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - eeschema - CFBundleGetInfoString - - CFBundleIconFile - eeschema.icns - CFBundleIdentifier - org.kicad-eda.eeschema - CFBundleInfoDictionaryVersion - 6.0 - CFBundleLongVersionString - - CFBundleName - EESchema - CFBundlePackageType - APPL - CFBundleShortVersionString - - CFBundleSignature - ???? - CFBundleVersion - - CSResourcesFileMapped - - LSRequiresCarbon - - NSHumanReadableCopyright - - NSHighResolutionCapable - True + CFBundleDocumentTypes + + + CFBundleTypeRole Editor + CFBundleTypeExtensions + + sch + + + CFBundleTypeIconFile eeschema.icns + CFBundleTypeName eeschema document + LSHandlerRank Owner + + + + CFBundleDevelopmentRegion English + CFBundleExecutable eeschema + CFBundleGetInfoString + CFBundleIconFile eeschema.icns + CFBundleIdentifier org.kicad-eda.eeschema + CFBundleInfoDictionaryVersion 6.0 + CFBundleLongVersionString + CFBundleName EESchema + CFBundlePackageType APPL + CFBundleShortVersionString + CFBundleSignature ???? + CFBundleVersion + CSResourcesFileMapped + LSRequiresCarbon + NSHumanReadableCopyright + NSHighResolutionCapable True diff --git a/gerbview/CMakeLists.txt b/gerbview/CMakeLists.txt index 7eff8d254e..4ffae72958 100644 --- a/gerbview/CMakeLists.txt +++ b/gerbview/CMakeLists.txt @@ -81,11 +81,11 @@ endif() if( APPLE ) - set(GERBVIEW_RESOURCES gerbview.icns gerbview_doc.icns) - set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/gerbview.icns" PROPERTIES + set( GERBVIEW_RESOURCES gerbview.icns gerbview_doc.icns ) + set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/gerbview.icns" PROPERTIES MACOSX_PACKAGE_LOCATION Resources ) - set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/gerbview_doc.icns" PROPERTIES + set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/gerbview_doc.icns" PROPERTIES MACOSX_PACKAGE_LOCATION Resources ) set( MACOSX_BUNDLE_ICON_FILE gerbview.icns ) @@ -120,7 +120,6 @@ if( USE_KIWAY_DLLS ) ${GERBVIEW_SRCS} ${DIALOGS_SRCS} ${GERBVIEW_EXTRA_SRCS} -# ${GERBVIEW_RESOURCES} ) set_target_properties( gerbview_kiface PROPERTIES OUTPUT_NAME gerbview @@ -152,18 +151,16 @@ if( USE_KIWAY_DLLS ) DESTINATION ${KICAD_BIN} COMPONENT binary ) - install( TARGETS gerbview_kiface - DESTINATION ${KICAD_BIN} - COMPONENT binary - ) - if( APPLE ) - # copies kiface into the bundle - add_custom_target( _gerbview_kiface_copy ALL - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/gerbview/_gerbview.kiface "${CMAKE_BINARY_DIR}/gerbview/gerbview.app/Contents/MacOS/" - DEPENDS gerbview_kiface - COMMENT "Copying kiface into gerbview" - ) + # puts the *.kiface into the *.app bundle while linking + set_target_properties( gerbview_kiface PROPERTIES + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/gerbview.app/Contents/MacOS/ + ) + else() + install( TARGETS gerbview_kiface + DESTINATION ${KICAD_BIN} + COMPONENT binary + ) endif() else() @@ -194,5 +191,3 @@ if( APPLE ) set_target_properties( gerbview PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist) endif() - - diff --git a/gerbview/Info.plist b/gerbview/Info.plist index a9d27ad02e..a37434eca2 100644 --- a/gerbview/Info.plist +++ b/gerbview/Info.plist @@ -2,72 +2,54 @@ - CFBundleDocumentTypes - - - CFBundleTypeExtensions - - pen - gba - gbr - gbx - gbo - gbl - gtl - gto - gta - gbp - gbp - gbs - gts - gtp - gbx - lgr - ger - pho - drl - - CFBundleTypeIconFile - gerbview_doc.icns - CFBundleTypeName - gerbview document - LSHandlerRank - Default - CFBundleTypeRole - Viewer - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - gerbview - CFBundleGetInfoString - - CFBundleIconFile - gerbview.icns - CFBundleIdentifier - org.kicad-eda.gerbview - CFBundleInfoDictionaryVersion - 6.0 - CFBundleLongVersionString - - CFBundleName - GerbView - CFBundlePackageType - APPL - CFBundleShortVersionString - - CFBundleSignature - ???? - CFBundleVersion - - CSResourcesFileMapped - - LSRequiresCarbon - - NSHumanReadableCopyright - - NSHighResolutionCapable - True + CFBundleDocumentTypes + + + CFBundleTypeExtensions + + pen + gba + gbr + gbx + gbo + gbl + gtl + gto + gta + gbp + gbp + gbs + gts + gtp + gbx + lgr + ger + pho + drl + + + CFBundleTypeIconFile gerbview_doc.icns + CFBundleTypeName gerbview document + LSHandlerRank Default + CFBundleTypeRole Viewer + + + + CFBundleDevelopmentRegion English + CFBundleExecutable gerbview + CFBundleGetInfoString + CFBundleIconFile gerbview.icns + CFBundleIdentifier org.kicad-eda.gerbview + CFBundleInfoDictionaryVersion 6.0 + CFBundleLongVersionString + CFBundleName GerbView + CFBundlePackageType APPL + CFBundleShortVersionString + CFBundleSignature ???? + CFBundleVersion + CSResourcesFileMapped + LSRequiresCarbon + NSHumanReadableCopyright + NSHighResolutionCapable True diff --git a/kicad/CMakeLists.txt b/kicad/CMakeLists.txt index 1d76b4696b..121c5af247 100644 --- a/kicad/CMakeLists.txt +++ b/kicad/CMakeLists.txt @@ -57,6 +57,22 @@ if( UNIX ) endif() +if( APPLE ) + # In this CMakeLists.txt's build directory, create kiface symlinks should get + # "installed()" as part of the kicad.app bundle. These are pointers on the + # target which point up and over to the stand alone kicad app's *.kiface files. + foreach( symlink pcbnew eeschema cvpcb ) + add_custom_command( TARGET kicad + COMMAND ${CMAKE_COMMAND} -E remove + "${CMAKE_CURRENT_BINARY_DIR}/kicad.app/Contents/MacOS/_${symlink}.kiface" + COMMAND ${CMAKE_COMMAND} -E create_symlink + "../../../${symlink}.app/Contents/MacOS/_${symlink}.kiface" + "${CMAKE_CURRENT_BINARY_DIR}/kicad.app/Contents/MacOS/_${symlink}.kiface" + COMMENT "kicad.app ${symlink} symlink" + ) + endforeach() +endif() + if( APPLE ) set_target_properties( kicad PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist diff --git a/kicad/Info.plist b/kicad/Info.plist index fa990ed54d..d55a08c51a 100644 --- a/kicad/Info.plist +++ b/kicad/Info.plist @@ -2,54 +2,36 @@ - CFBundleDocumentTypes - - - CFBundleTypeRole - Editor - CFBundleTypeIconFile - kicad_doc.icns - CFBundleTypeExtensions - - pro - - CFBundleTypeName - kicad project files - LSHandlerRank - Owner - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - kicad - CFBundleGetInfoString - - CFBundleIconFile - kicad.icns - CFBundleIdentifier - org.kicad-eda.kicad - CFBundleInfoDictionaryVersion - 6.0 - CFBundleLongVersionString - - CFBundleName - KiCad - CFBundlePackageType - APPL - CFBundleShortVersionString - - CFBundleSignature - ???? - CFBundleVersion - - CSResourcesFileMapped - - LSRequiresCarbon - - NSHumanReadableCopyright - - NSHighResolutionCapable - True + CFBundleDocumentTypes + + + CFBundleTypeRole Editor + CFBundleTypeIconFile kicad_doc.icns + + CFBundleTypeExtensions + pro + + + CFBundleTypeName kicad project files + LSHandlerRank Owner + + + + CFBundleDevelopmentRegion English + CFBundleExecutable kicad + CFBundleGetInfoString + CFBundleIconFile kicad.icns + CFBundleIdentifier org.kicad-eda.kicad + CFBundleInfoDictionaryVersion 6.0 + CFBundleLongVersionString + CFBundleName KiCad + CFBundlePackageType APPL + CFBundleShortVersionString + CFBundleSignature ???? + CFBundleVersion + CSResourcesFileMapped + LSRequiresCarbon + NSHumanReadableCopyright + NSHighResolutionCapable True diff --git a/pagelayout_editor/CMakeLists.txt b/pagelayout_editor/CMakeLists.txt index cd6e41acdd..2f6a544db8 100644 --- a/pagelayout_editor/CMakeLists.txt +++ b/pagelayout_editor/CMakeLists.txt @@ -49,7 +49,20 @@ set( PL_EDITOR_EXTRA_SRCS if( MINGW ) # PL_EDITOR_RESOURCES variable is set by the macro. - mingw_resource_compiler(pl_editor) + mingw_resource_compiler( pl_editor ) +endif() + + +if( APPLE ) + set( PL_EDITOR_RESOURCES pl_editor.icns pl_editor_doc.icns ) + set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/pl_editor.icns" PROPERTIES + MACOSX_PACKAGE_LOCATION Resources + ) + set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/pl_editor_doc.icns" PROPERTIES + MACOSX_PACKAGE_LOCATION Resources + ) + set( MACOSX_BUNDLE_ICON_FILE pl_editor.icns ) + set( MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.pl_editor ) endif() @@ -82,7 +95,6 @@ if( USE_KIWAY_DLLS ) ${PL_EDITOR_SRCS} ${DIALOGS_SRCS} ${PL_EDITOR_EXTRA_SRCS} -# ${PL_EDITOR_RESOURCES} ) target_link_libraries( pl_editor_kiface common @@ -114,18 +126,16 @@ if( USE_KIWAY_DLLS ) DESTINATION ${KICAD_BIN} COMPONENT binary ) - install( TARGETS pl_editor_kiface - DESTINATION ${KICAD_BIN} - COMPONENT binary - ) - if( APPLE ) - # copies kiface into the bundle - add_custom_target( _pleditor_kiface_copy ALL - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/pagelayout_editor/_pl_editor.kiface "${CMAKE_BINARY_DIR}/pagelayout_editor/pl_editor.app/Contents/MacOS/" - DEPENDS pl_editor_kiface - COMMENT "Copying kiface into pleditor" - ) + # puts the *.kiface into the *.app bundle while linking + set_target_properties( pl_editor_kiface PROPERTIES + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/pl_editor.app/Contents/MacOS/ + ) + else() + install( TARGETS pl_editor_kiface + DESTINATION ${KICAD_BIN} + COMPONENT binary + ) endif() else() @@ -137,13 +147,6 @@ else() ${PL_EDITOR_EXTRA_SRCS} ${PL_EDITOR_RESOURCES} ) - - if( APPLE ) - set_target_properties( pl_editor PROPERTIES - MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist - ) - endif() - target_link_libraries( pl_editor common polygon @@ -152,28 +155,15 @@ else() ${wxWidgets_LIBRARIES} ${GDI_PLUS_LIBRARIES} ) - install( TARGETS pl_editor DESTINATION ${KICAD_BIN} COMPONENT binary ) - endif() if( APPLE ) - set( PL_EDITOR_RESOURCES pl_editor.icns pl_editor_doc.icns ) - set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/pl_editor.icns" PROPERTIES - MACOSX_PACKAGE_LOCATION Resources - ) - set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/pl_editor_doc.icns" PROPERTIES - MACOSX_PACKAGE_LOCATION Resources - ) - set( MACOSX_BUNDLE_ICON_FILE pl_editor.icns ) - set( MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.pl_editor ) - set_target_properties( pl_editor PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist ) endif() - diff --git a/pagelayout_editor/Info.plist b/pagelayout_editor/Info.plist index 64d9326613..9db98f05b2 100644 --- a/pagelayout_editor/Info.plist +++ b/pagelayout_editor/Info.plist @@ -2,54 +2,36 @@ - CFBundleDocumentTypes - - - CFBundleTypeRole - Editor - CFBundleTypeExtensions - - kicad_wks - - CFBundleTypeIconFile - pl_editor.icns - CFBundleTypeName - pl_editor document - LSHandlerRank - Owner - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - pl_editor - CFBundleGetInfoString - - CFBundleIconFile - pl_editor.icns - CFBundleIdentifier - org.kicad-eda.pl_editor - CFBundleInfoDictionaryVersion - 6.0 - CFBundleLongVersionString - - CFBundleName - pl_editor - CFBundlePackageType - APPL - CFBundleShortVersionString - - CFBundleSignature - ???? - CFBundleVersion - - CSResourcesFileMapped - - LSRequiresCarbon - - NSHumanReadableCopyright - - NSHighResolutionCapable - True + CFBundleDocumentTypes + + + CFBundleTypeRole Editor + CFBundleTypeExtensions + + kicad_wks + + + CFBundleTypeIconFile pl_editor.icns + CFBundleTypeName pl_editor document + LSHandlerRank Owner + + + + CFBundleDevelopmentRegion English + CFBundleExecutable pl_editor + CFBundleGetInfoString + CFBundleIconFile pl_editor.icns + CFBundleIdentifier org.kicad-eda.pl_editor + CFBundleInfoDictionaryVersion 6.0 + CFBundleLongVersionString + CFBundleName pl_editor + CFBundlePackageType APPL + CFBundleShortVersionString + CFBundleSignature ???? + CFBundleVersion + CSResourcesFileMapped + LSRequiresCarbon + NSHumanReadableCopyright + NSHighResolutionCapable True diff --git a/pcb_calculator/CMakeLists.txt b/pcb_calculator/CMakeLists.txt index 14db6b9ff6..8e1dad619c 100644 --- a/pcb_calculator/CMakeLists.txt +++ b/pcb_calculator/CMakeLists.txt @@ -122,14 +122,15 @@ if( USE_KIWAY_DLLS ) DESTINATION ${KICAD_BIN} COMPONENT binary ) - install( TARGETS pcb_calculator_kiface - DESTINATION ${KICAD_BIN} - COMPONENT binary - ) - if( APPLE ) - set_target_properties( pcb_calculator PROPERTIES - MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist + # puts the *.kiface into the *.app bundle while linking + set_target_properties( pcb_calculator_kiface PROPERTIES + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/pcb_calculator.app/Contents/MacOS/ + ) + else() + install( TARGETS pcb_calculator_kiface + DESTINATION ${KICAD_BIN} + COMPONENT binary ) endif() @@ -156,13 +157,6 @@ else() set_source_files_properties( pcb_calculator.cpp PROPERTIES COMPILE_DEFINITIONS "COMPILING_DLL" ) - - if( APPLE ) - set_target_properties( pcb_calculator PROPERTIES - MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist - ) - endif() - target_link_libraries( pcb_calculator common bitmaps @@ -175,3 +169,10 @@ else() ) endif() + + +if( APPLE ) + set_target_properties( pcb_calculator PROPERTIES + MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist + ) +endif() diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 42350320f5..068f950f39 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -589,17 +589,15 @@ if( USE_KIWAY_DLLS ) DESTINATION ${KICAD_BIN} COMPONENT binary ) - install( TARGETS pcbnew_kiface - DESTINATION ${KICAD_BIN} - COMPONENT binary - ) - if( APPLE ) - # copies kiface into the bundle - add_custom_target( _pcbnew_kiface_copy ALL - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/pcbnew/_pcbnew.kiface "${CMAKE_BINARY_DIR}/pcbnew/pcbnew.app/Contents/MacOS/" - DEPENDS pcbnew_kiface - COMMENT "Copying kiface into pcbnew" + # puts the *.kiface into the *.app bundle while linking + set_target_properties( pcbnew_kiface PROPERTIES + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/pcbnew.app/Contents/MacOS/ + ) + else() + install( TARGETS pcbnew_kiface + DESTINATION ${KICAD_BIN} + COMPONENT binary ) endif() @@ -763,3 +761,4 @@ if( false ) # haven't been used in years. ) target_link_libraries( layer_widget_test common ${wxWidgets_LIBRARIES} ) endif() + diff --git a/pcbnew/Info.plist b/pcbnew/Info.plist index 1f4b5bfdd5..3f31259d06 100644 --- a/pcbnew/Info.plist +++ b/pcbnew/Info.plist @@ -2,53 +2,36 @@ - CFBundleDocumentTypes - - - CFBundleTypeRole - Editor - CFBundleTypeIconFile - pcbnew_doc.icns - CFBundleTypeExtensions - - kicad_pcb - brd - - CFBundleTypeName - pcbnew board - LSHandlerRank - Owner - - - CFBundleExecutable - pcbnew - CFBundleGetInfoString - - CFBundleIconFile - pcbnew.icns - CFBundleIdentifier - org.kicad-eda.pcbnew - CFBundleInfoDictionaryVersion - 6.0 - CFBundleLongVersionString - - CFBundleName - PCBNew - CFBundlePackageType - APPL - CFBundleShortVersionString - - CFBundleSignature - ???? - CFBundleVersion - - CSResourcesFileMapped - - LSRequiresCarbon - - NSHumanReadableCopyright - - NSHighResolutionCapable - True + CFBundleDocumentTypes + + + CFBundleTypeRole Editor + CFBundleTypeIconFile pcbnew_doc.icns + CFBundleTypeExtensions + + kicad_pcb + brd + + + CFBundleTypeName pcbnew board + LSHandlerRank Owner + + + + CFBundleExecutable pcbnew + CFBundleGetInfoString + CFBundleIconFile pcbnew.icns + CFBundleIdentifier org.kicad-eda.pcbnew + CFBundleInfoDictionaryVersion 6.0 + CFBundleLongVersionString + CFBundleName PCBNew + CFBundlePackageType APPL + CFBundleShortVersionString + CFBundleSignature ???? + CFBundleVersion + CSResourcesFileMapped + LSRequiresCarbon + NSHumanReadableCopyright + NSHighResolutionCapable True From 963029262b17aa57e78748c7c8ed8a2c27c2a997 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 9 May 2014 20:06:18 +0200 Subject: [PATCH 370/741] Fix an annoying behavior of new quasi modal frames on Windows (when closing them, the caller frame was no more on top ) --- common/kiway_player.cpp | 15 +++++++++++++-- include/kiway_player.h | 6 ++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/common/kiway_player.cpp b/common/kiway_player.cpp index fc0415a702..fda3962d2d 100644 --- a/common/kiway_player.cpp +++ b/common/kiway_player.cpp @@ -45,7 +45,7 @@ KIWAY_PLAYER::KIWAY_PLAYER( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrameType EDA_BASE_FRAME( aParent, aFrameType, aTitle, aPos, aSize, aStyle, aWdoName ), KIWAY_HOLDER( aKiway ), m_modal( false ), - m_modal_loop( 0 ) + m_modal_loop( 0 ), m_modal_resultant_parent( 0 ) { // DBG( printf("KIWAY_EXPRESS::wxEVENT_ID:%d\n", KIWAY_EXPRESS::wxEVENT_ID );) } @@ -57,7 +57,7 @@ KIWAY_PLAYER::KIWAY_PLAYER( wxWindow* aParent, wxWindowID aId, const wxString& a EDA_BASE_FRAME( aParent, (FRAME_T) aId, aTitle, aPos, aSize, aStyle, aWdoName ), KIWAY_HOLDER( 0 ), m_modal( false ), - m_modal_loop( 0 ) + m_modal_loop( 0 ), m_modal_resultant_parent( 0 ) { // DBG( printf("KIWAY_EXPRESS::wxEVENT_ID:%d\n", KIWAY_EXPRESS::wxEVENT_ID );) } @@ -95,6 +95,7 @@ bool KIWAY_PLAYER::ShowModal( wxString* aResult, wxWindow* aResultantFocusWindow } clear_this( (void*&) m_modal_loop ); + m_modal_resultant_parent = aResultantFocusWindow; Show( true ); SetFocus(); @@ -138,6 +139,16 @@ bool KIWAY_PLAYER::ShowModal( wxString* aResult, wxWindow* aResultantFocusWindow return m_modal_ret_val; } +bool KIWAY_PLAYER::Destroy() +{ + // Needed on Windows to leave the modal parent on top with focus +#ifdef __WINDOWS__ + if( m_modal_resultant_parent && GetParent() != m_modal_resultant_parent ) + Reparent( m_modal_resultant_parent ); +#endif + + return EDA_BASE_FRAME::Destroy(); +} bool KIWAY_PLAYER::IsDismissed() { diff --git a/include/kiway_player.h b/include/kiway_player.h index 48cfeafc4a..0bdc2e8045 100644 --- a/include/kiway_player.h +++ b/include/kiway_player.h @@ -202,6 +202,11 @@ public: */ virtual void KiwayMailIn( KIWAY_EXPRESS& aEvent ); + /** + * Our version of Destroy() which is virtual from wxWidgets + */ + bool Destroy(); + protected: bool IsModal() { return m_modal; } @@ -229,6 +234,7 @@ protected: // variables for modal behavior support, only used by a few derivatives. bool m_modal; // true if frame is intended to be modal, not modeless WX_EVENT_LOOP* m_modal_loop; // points to nested event_loop, NULL means not modal and dismissed + wxWindow* m_modal_resultant_parent; // the window caller in modal mode wxString m_modal_string; bool m_modal_ret_val; // true if a selection was made From dc745aa62e6395a582b5b9e2d2b03b61cd117fc0 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 9 May 2014 20:06:18 +0200 Subject: [PATCH 371/741] Fix an annoying behavior of new quasi modal frames on Windows (when closing them, the caller frame was no more on top ) --- common/kiway_player.cpp | 15 +++++++++++++-- include/kiway_player.h | 6 ++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/common/kiway_player.cpp b/common/kiway_player.cpp index fc0415a702..fda3962d2d 100644 --- a/common/kiway_player.cpp +++ b/common/kiway_player.cpp @@ -45,7 +45,7 @@ KIWAY_PLAYER::KIWAY_PLAYER( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrameType EDA_BASE_FRAME( aParent, aFrameType, aTitle, aPos, aSize, aStyle, aWdoName ), KIWAY_HOLDER( aKiway ), m_modal( false ), - m_modal_loop( 0 ) + m_modal_loop( 0 ), m_modal_resultant_parent( 0 ) { // DBG( printf("KIWAY_EXPRESS::wxEVENT_ID:%d\n", KIWAY_EXPRESS::wxEVENT_ID );) } @@ -57,7 +57,7 @@ KIWAY_PLAYER::KIWAY_PLAYER( wxWindow* aParent, wxWindowID aId, const wxString& a EDA_BASE_FRAME( aParent, (FRAME_T) aId, aTitle, aPos, aSize, aStyle, aWdoName ), KIWAY_HOLDER( 0 ), m_modal( false ), - m_modal_loop( 0 ) + m_modal_loop( 0 ), m_modal_resultant_parent( 0 ) { // DBG( printf("KIWAY_EXPRESS::wxEVENT_ID:%d\n", KIWAY_EXPRESS::wxEVENT_ID );) } @@ -95,6 +95,7 @@ bool KIWAY_PLAYER::ShowModal( wxString* aResult, wxWindow* aResultantFocusWindow } clear_this( (void*&) m_modal_loop ); + m_modal_resultant_parent = aResultantFocusWindow; Show( true ); SetFocus(); @@ -138,6 +139,16 @@ bool KIWAY_PLAYER::ShowModal( wxString* aResult, wxWindow* aResultantFocusWindow return m_modal_ret_val; } +bool KIWAY_PLAYER::Destroy() +{ + // Needed on Windows to leave the modal parent on top with focus +#ifdef __WINDOWS__ + if( m_modal_resultant_parent && GetParent() != m_modal_resultant_parent ) + Reparent( m_modal_resultant_parent ); +#endif + + return EDA_BASE_FRAME::Destroy(); +} bool KIWAY_PLAYER::IsDismissed() { diff --git a/include/kiway_player.h b/include/kiway_player.h index 48cfeafc4a..0bdc2e8045 100644 --- a/include/kiway_player.h +++ b/include/kiway_player.h @@ -202,6 +202,11 @@ public: */ virtual void KiwayMailIn( KIWAY_EXPRESS& aEvent ); + /** + * Our version of Destroy() which is virtual from wxWidgets + */ + bool Destroy(); + protected: bool IsModal() { return m_modal; } @@ -229,6 +234,7 @@ protected: // variables for modal behavior support, only used by a few derivatives. bool m_modal; // true if frame is intended to be modal, not modeless WX_EVENT_LOOP* m_modal_loop; // points to nested event_loop, NULL means not modal and dismissed + wxWindow* m_modal_resultant_parent; // the window caller in modal mode wxString m_modal_string; bool m_modal_ret_val; // true if a selection was made From e45aadd11baa545170735b4d2049005f9dbe668a Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Fri, 9 May 2014 13:35:48 -0500 Subject: [PATCH 372/741] Modular-Kicad milestone B), minor portion: *) Implement a framework for "Data Load On Demand". *) Implement FP_LIB_TABLE* PROJECT::PcbFootprintLibs(), which is the first prototype. This allows the project specific footprint tables to be part of the Module Editor when invoked from Eeschema. --- common/fp_lib_table.cpp | 15 +- common/project.cpp | 43 ++- cvpcb/cfg.cpp | 19 +- cvpcb/class_DisplayFootprintsFrame.cpp | 3 +- cvpcb/class_library_listbox.cpp | 2 +- cvpcb/cvframe.cpp | 32 +-- cvpcb/cvpcb_mainframe.h | 6 - cvpcb/readwrite_dlgs.cpp | 352 +------------------------ include/fp_lib_table.h | 2 + include/project.h | 69 +++-- include/wxBasePcbFrame.h | 10 +- pcbnew/basepcbframe.cpp | 24 +- pcbnew/files.cpp | 6 +- pcbnew/librairi.cpp | 24 +- pcbnew/loadcmp.cpp | 2 +- pcbnew/modedit.cpp | 2 +- pcbnew/moduleframe.cpp | 6 +- pcbnew/modview_frame.cpp | 13 +- pcbnew/netlist.cpp | 2 +- pcbnew/onleftclick.cpp | 3 +- pcbnew/pcbnew_config.cpp | 17 +- pcbnew/xchgmod.cpp | 3 +- scripts/kicad-install.sh | 2 +- 23 files changed, 176 insertions(+), 481 deletions(-) diff --git a/common/fp_lib_table.cpp b/common/fp_lib_table.cpp index f69ccd2ea5..2b5a47aa9c 100644 --- a/common/fp_lib_table.cpp +++ b/common/fp_lib_table.cpp @@ -137,6 +137,12 @@ FP_LIB_TABLE::FP_LIB_TABLE( FP_LIB_TABLE* aFallBackTable ) : } +FP_LIB_TABLE::~FP_LIB_TABLE() +{ + // *fallBack is not owned here. +} + + wxArrayString FP_LIB_TABLE::FootprintEnumerate( const wxString& aNickname ) { const ROW* row = FindRow( aNickname ); @@ -514,9 +520,16 @@ std::vector FP_LIB_TABLE::GetLogicalLibs() } while( ( cur = cur->fallBack ) != 0 ); + ret.reserve( unique.size() ); + + // DBG(printf( "%s: count:%zd\n", __func__, unique.size() );) + // return a sorted, unique set of nicknames in a std::vector to caller for( std::set::const_iterator it = unique.begin(); it!=unique.end(); ++it ) + { + //DBG(printf( " %s\n", TO_UTF8( *it ) );) ret.push_back( *it ); + } return ret; } @@ -738,7 +751,7 @@ wxString FP_LIB_TABLE::GetGlobalTableFileName() void FP_LIB_TABLE::Load( const wxString& aFileName ) throw( IO_ERROR ) { - // Empty footprint library tables are valid. + // It's OK if footprint library tables are missing. if( wxFileName::IsFileReadable( aFileName ) ) { FILE_LINE_READER reader( aFileName ); diff --git a/common/project.cpp b/common/project.cpp index df31c81c1b..2e10d8a661 100644 --- a/common/project.cpp +++ b/common/project.cpp @@ -42,15 +42,22 @@ PROJECT::PROJECT() memset( m_elems, 0, sizeof(m_elems) ); } + +void PROJECT::ElemsClear() +{ + // careful here, this should work, but the virtual destructor may not + // be in the same link image as PROJECT. + for( unsigned i = 0; iClear(); - - /* this is done by ConfigLoad(), and that sets the env var too. - prj.SetProjectFullName( fn.GetFullPath() ); - */ - - wxString projectFpLibTableFileName = prj.FootprintLibTblName(); - - try - { - FootprintLibs()->Load( projectFpLibTableFileName ); - } - catch( const IO_ERROR& ioe ) - { - DisplayError( this, ioe.errorText ); - } + // Force it to be loaded on demand. + prj.ElemClear( PROJECT::ELEM_FPTBL ); } diff --git a/cvpcb/class_DisplayFootprintsFrame.cpp b/cvpcb/class_DisplayFootprintsFrame.cpp index e1a0ab36dc..241ecdd861 100644 --- a/cvpcb/class_DisplayFootprintsFrame.cpp +++ b/cvpcb/class_DisplayFootprintsFrame.cpp @@ -488,7 +488,8 @@ MODULE* DISPLAY_FOOTPRINTS_FRAME::Get_Module( const wxString& aFootprintName ) wxLogDebug( wxT( "Load footprint <%s> from library <%s>." ), fpname.c_str(), nickname.c_str() ); - footprint = FootprintLibs()->FootprintLoad( FROM_UTF8( nickname.c_str() ), FROM_UTF8( fpname.c_str() ) ); + footprint = Prj().PcbFootprintLibs()->FootprintLoad( + FROM_UTF8( nickname.c_str() ), FROM_UTF8( fpname.c_str() ) ); } catch( const IO_ERROR& ioe ) { diff --git a/cvpcb/class_library_listbox.cpp b/cvpcb/class_library_listbox.cpp index db86776145..4149f285ca 100644 --- a/cvpcb/class_library_listbox.cpp +++ b/cvpcb/class_library_listbox.cpp @@ -128,7 +128,7 @@ void LIBRARY_LISTBOX::SetLibraryList( const wxArrayString& aList ) { RefreshItems( 0L, m_libraryList.Count()-1 ); -#if defined (__WXGTK__ ) // && wxMINOR_VERSION == 8 +#if defined (__WXGTK__ ) && wxMINOR_VERSION == 8 // @bug On GTK and wxWidgets 2.8.x, this will assert in debug builds because the // column parameter is -1. This was the only way to prevent GTK3 from // ellipsizing long strings down to a few characters. It still doesn't set diff --git a/cvpcb/cvframe.cpp b/cvpcb/cvframe.cpp index 3ffd306b7d..7079e40287 100644 --- a/cvpcb/cvframe.cpp +++ b/cvpcb/cvframe.cpp @@ -200,24 +200,6 @@ CVPCB_MAINFRAME::~CVPCB_MAINFRAME() } -FP_LIB_TABLE* CVPCB_MAINFRAME::FootprintLibs() const -{ - PROJECT& prj = Prj(); - FP_LIB_TABLE* tbl = dynamic_cast( prj.Elem( PROJECT::FPTBL ) ); - - if( !tbl ) - { - // Stack the project specific FP_LIB_TABLE overlay on top of the global table. - // ~FP_LIB_TABLE() will not touch the fallback table, so multiple projects may - // stack this way, all using the same global fallback table. - tbl = new FP_LIB_TABLE( &GFootprintTable ); - prj.Elem( PROJECT::FPTBL, tbl ); - } - - return tbl; -} - - void CVPCB_MAINFRAME::LoadSettings( wxConfigBase* aCfg ) { EDA_BASE_FRAME::LoadSettings( aCfg ); @@ -493,7 +475,7 @@ void CVPCB_MAINFRAME::ConfigCvpcb( wxCommandEvent& event ) void CVPCB_MAINFRAME::OnEditFootprintLibraryTable( wxCommandEvent& aEvent ) { bool tableChanged = false; - int r = InvokePcbLibTableEditor( this, &GFootprintTable, FootprintLibs() ); + int r = InvokePcbLibTableEditor( this, &GFootprintTable, Prj().PcbFootprintLibs() ); if( r & 1 ) { @@ -521,7 +503,7 @@ void CVPCB_MAINFRAME::OnEditFootprintLibraryTable( wxCommandEvent& aEvent ) try { - FootprintLibs()->Save( fileName ); + Prj().PcbFootprintLibs()->Save( fileName ); tableChanged = true; } catch( const IO_ERROR& ioe ) @@ -538,7 +520,7 @@ void CVPCB_MAINFRAME::OnEditFootprintLibraryTable( wxCommandEvent& aEvent ) if( tableChanged ) { BuildLIBRARY_LISTBOX(); - m_footprints.ReadFootprintFiles( FootprintLibs() ); + m_footprints.ReadFootprintFiles( Prj().PcbFootprintLibs() ); } } @@ -735,7 +717,7 @@ void CVPCB_MAINFRAME::DisplayStatus() bool CVPCB_MAINFRAME::LoadFootprintFiles() { - FP_LIB_TABLE* fptbl = FootprintLibs(); + FP_LIB_TABLE* fptbl = Prj().PcbFootprintLibs(); // Check if there are footprint libraries in the footprint library table. if( !fptbl || !fptbl->GetLogicalLibs().size() ) @@ -1012,11 +994,13 @@ void CVPCB_MAINFRAME::BuildLIBRARY_LISTBOX() wxFONTWEIGHT_NORMAL ) ); } - if( FootprintLibs() ) + FP_LIB_TABLE* tbl = Prj().PcbFootprintLibs(); + + if( tbl ) { wxArrayString libNames; - std::vector< wxString > libNickNames = FootprintLibs()->GetLogicalLibs(); + std::vector< wxString > libNickNames = tbl->GetLogicalLibs(); for( unsigned ii = 0; ii < libNickNames.size(); ii++ ) libNames.Add( libNickNames[ii] ); diff --git a/cvpcb/cvpcb_mainframe.h b/cvpcb/cvpcb_mainframe.h index 3993091dda..7b136746a9 100644 --- a/cvpcb/cvpcb_mainframe.h +++ b/cvpcb/cvpcb_mainframe.h @@ -88,12 +88,6 @@ public: bool OpenProjectFiles( const std::vector& aFileSet, int aCtl=0 ); // overload KIWAY_PLAYER - /** - * Function FootprintLibs - * @return the project #FP_LIB_TABLE. - */ - FP_LIB_TABLE* FootprintLibs() const; - /** * @return a pointer on the Footprint Viewer frame, if exists, or NULL */ diff --git a/cvpcb/readwrite_dlgs.cpp b/cvpcb/readwrite_dlgs.cpp index 538fe34841..939abc7acb 100644 --- a/cvpcb/readwrite_dlgs.cpp +++ b/cvpcb/readwrite_dlgs.cpp @@ -119,346 +119,6 @@ void CVPCB_MAINFRAME::SetNewPkg( const wxString& aFootprintName ) } -#if 0 - - /* - - This code block was based on two major assumptions that are no longer true: - 1) Footprint library basenames would remain the same. - (But no, basenames have been renamed in the github repo.) - 2) *.mod files would still be around and merely reside in the FP_LIB_TABLE. - (But no, they have been converted to *.pretty.) - - There is a newer replacement code block in the #else region. - - */ - -/** - * Function missingLegacyLibs - * tests the list of \a aLibNames by URI to determine if any of them are missing from - * the #FP_LIB_TABLE. - * - * @note The missing legacy footprint library test is performed by using old library - * file path lookup method. If the library is found, it is compared against all - * of the URIs in the table rather than the nickname. This was done because the - * user could change the nicknames from the default table. Using the full path - * is more reliable. - * - * @param aLibNames is the list of legacy library names. - * @param aErrorMsg is a pointer to a wxString object to store the URIs of any missing - * legacy library paths. Can be NULL. - * @return true if there are missing legacy libraries. Otherwise false. - */ -static bool missingLegacyLibs( FP_LIB_TABLE* aTbl, SEARCH_STACK& aSStack, - const wxArrayString& aLibNames, wxString* aErrorMsg ) -{ - bool missing = false; - - for( unsigned i = 0; i < aLibNames.GetCount(); i++ ) - { - wxFileName fn( wxEmptyString, aLibNames[i], LegacyFootprintLibPathExtension ); - - wxString legacyLibPath = aSStack.FindValidPath( fn.GetFullPath() ); - - /* - if( legacyLibPath.IsEmpty() ) - continue; - */ - - if( !aTbl->FindRowByURI( legacyLibPath ) ) - { - missing = true; - - if( aErrorMsg ) - { - *aErrorMsg += wxChar( '"' ); - - if( !legacyLibPath ) - *aErrorMsg += !legacyLibPath ? aLibNames[i] : legacyLibPath; - - *aErrorMsg += wxT( "\"\n" ); - } - } - } - - return missing; -} - - -/** - * Function convertFromLegacy - * converts the footprint names in \a aNetList from the legacy format to the #FPID format. - * - * @param aNetList is the #NETLIST object to convert. - * @param aLibNames is the list of legacy footprint library names from the currently loaded - * project. - * @param aReporter is the #REPORTER object to dump messages into. - * @return true if all footprint names were successfully converted to a valid FPID. - */ -static bool convertFromLegacy( FP_LIB_TABLE* aTbl, SEARCH_STACK& aSStack, NETLIST& aNetList, - const wxArrayString& aLibNames, REPORTER* aReporter = NULL ) throw( IO_ERROR ) -{ - wxString msg; - FPID lastFPID; - COMPONENT* component; - MODULE* module = 0; - bool retv = true; - - if( aNetList.IsEmpty() ) - return true; - - aNetList.SortByFPID(); - - wxString libPath; - - PLUGIN::RELEASER pi( IO_MGR::PluginFind( IO_MGR::LEGACY ) ); - - for( unsigned ii = 0; ii < aNetList.GetCount(); ii++ ) - { - component = aNetList.GetComponent( ii ); - - // The footprint hasn't been assigned yet so ignore it. - if( component->GetFPID().empty() ) - continue; - - if( component->GetFPID() != lastFPID ) - { - module = NULL; - - for( unsigned ii = 0; ii < aLibNames.GetCount(); ii++ ) - { - wxFileName fn( wxEmptyString, aLibNames[ii], LegacyFootprintLibPathExtension ); - - libPath = aSStack.FindValidPath( fn.GetFullPath() ); - - if( !libPath ) - { - if( aReporter ) - { - msg.Printf( _( "Cannot find footprint library file '%s' in any of the " - "KiCad legacy library search paths.\n" ), - GetChars( fn.GetFullPath() ) ); - aReporter->Report( msg ); - } - - retv = false; - continue; - } - - module = pi->FootprintLoad( libPath, component->GetFPID().GetFootprintName() ); - - if( module ) - { - lastFPID = component->GetFPID(); - break; - } - } - } - - if( !module ) - { - if( aReporter ) - { - msg.Printf( _( "Component '%s' footprint '%s' was not found in any legacy " - "library.\n" ), - GetChars( component->GetReference() ), - GetChars( component->GetFPID().Format() ) ); - aReporter->Report( msg ); - } - - // Clear the footprint assignment since the old library lookup method is no - // longer valid. - FPID emptyFPID; - - component->SetFPID( emptyFPID ); - retv = false; - continue; - } - else - { - wxString libNickname; - - const FP_LIB_TABLE::ROW* row; - - if( ( row = aTbl->FindRowByURI( libPath ) ) != NULL ) - libNickname = row->GetNickName(); - - if( libNickname.IsEmpty() ) - { - if( aReporter ) - { - msg.Printf( _( "Component '%s' with footprint '%s' and legacy library path '%s' " - "was not found in the footprint library table.\n" ), - GetChars( component->GetReference() ), - GetChars( component->GetFPID().Format() ), - GetChars( libPath ) - ); - aReporter->Report( msg ); - } - - retv = false; - } - else - { - FPID newFPID = lastFPID; - newFPID.SetLibNickname( libNickname ); - - if( !newFPID.IsValid() ) - { - if( aReporter ) - { - msg.Printf( _( "Component '%s' FPID '%s' is not valid.\n" ), - GetChars( component->GetReference() ), - GetChars( newFPID.Format() ) ); - aReporter->Report( msg ); - } - - retv = false; - } - else - { - // The footprint name should already be set. - component->SetFPID( newFPID ); - } - } - } - } - - return retv; -} - - -bool CVPCB_MAINFRAME::ReadNetListAndLinkFiles() -{ - COMPONENT* component; - wxString msg; - bool isLegacy = true; - - ReadSchematicNetlist(); - - if( m_ListCmp == NULL ) - return false; - - LoadProjectFile( m_NetlistFileName.GetFullPath() ); - LoadFootprintFiles(); - BuildFOOTPRINTS_LISTBOX(); - BuildLIBRARY_LISTBOX(); - - m_ListCmp->Clear(); - m_undefinedComponentCnt = 0; - - if( m_netlist.AnyFootprintsLinked() ) - { - for( unsigned i = 0; i < m_netlist.GetCount(); i++ ) - { - component = m_netlist.GetComponent( i ); - - if( component->GetFPID().empty() ) - continue; - - if( isLegacy ) - { - if( !component->GetFPID().IsLegacy() ) - isLegacy = false; - } - } - } - else - { - isLegacy = false; // None of the components have footprints assigned. - } - - wxString missingLibs; - - // Check if footprint links were generated before the footprint library table was implemented. - if( isLegacy ) - { - if( missingLegacyLibs( FootprintLibs(), Prj().PcbSearchS(), m_ModuleLibNames, &missingLibs ) ) - { - msg = wxT( "The following legacy libraries are defined in the project file " - "but were not found in the footprint library table:\n\n" ) + missingLibs; - msg += wxT( "\nDo you want to update the footprint library table before " - "attempting to update the assigned footprints?" ); - - if( IsOK( this, msg ) ) - { - wxCommandEvent cmd; - - OnEditFootprintLibraryTable( cmd ); - } - } - - msg = wxT( "Some or all of the assigned footprints contain legacy entries. Would you " - "like CvPcb to attempt to convert them to the new footprint library table " - "format?" ); - - if( IsOK( this, msg ) ) - { - msg.Clear(); - WX_STRING_REPORTER reporter( &msg ); - - SEARCH_STACK& search = Prj().SchSearchS(); - - if( !convertFromLegacy( FootprintLibs(), search, m_netlist, m_ModuleLibNames, &reporter ) ) - { - HTML_MESSAGE_BOX dlg( this, wxEmptyString ); - - dlg.MessageSet( wxT( "The following errors occurred attempting to convert the " - "footprint assignments:\n\n" ) ); - dlg.ListSet( msg ); - dlg.MessageSet( wxT( "\nYou will need to reassign them manually if you want them " - "to be updated correctly the next time you import the " - "netlist in Pcbnew." ) ); - dlg.ShowModal(); - } - - m_modified = true; - } - else - { - // Clear the legacy footprint assignments. - for( unsigned i = 0; i < m_netlist.GetCount(); i++ ) - { - FPID emptyFPID; - component = m_netlist.GetComponent( i ); - component->SetFPID( emptyFPID ); - m_modified = true; - } - } - } - - for( unsigned i = 0; i < m_netlist.GetCount(); i++ ) - { - component = m_netlist.GetComponent( i ); - - msg.Printf( CMP_FORMAT, m_ListCmp->GetCount() + 1, - GetChars( component->GetReference() ), - GetChars( component->GetValue() ), - GetChars( FROM_UTF8( component->GetFPID().Format().c_str() ) ) ); - - m_ListCmp->AppendLine( msg ); - - if( component->GetFPID().empty() ) - { - m_undefinedComponentCnt += 1; - continue; - } - } - - if( !m_netlist.IsEmpty() ) - m_ListCmp->SetSelection( 0, true ); - - DisplayStatus(); - - UpdateTitle(); - - UpdateFileHistory( m_NetlistFileName.GetFullPath() ); - - return true; -} - -#else // new strategy - /// Return true if the resultant FPID has a certain nickname. The guess /// is only made if this footprint resides in only one library. /// @return int - 0 on success, 1 on not found, 2 on ambiguous i.e. multiple matches @@ -503,7 +163,6 @@ bool CVPCB_MAINFRAME::ReadNetListAndLinkFiles() { wxString msg; bool hasMissingNicks = false; - FP_LIB_TABLE* tbl = FootprintLibs(); ReadSchematicNetlist(); @@ -512,6 +171,7 @@ bool CVPCB_MAINFRAME::ReadNetListAndLinkFiles() LoadProjectFile( m_NetlistFileName.GetFullPath() ); LoadFootprintFiles(); + BuildFOOTPRINTS_LISTBOX(); BuildLIBRARY_LISTBOX(); @@ -554,6 +214,9 @@ bool CVPCB_MAINFRAME::ReadNetListAndLinkFiles() if( component->GetFPID().IsLegacy() ) { + // get this first here, it's possibly obsoleted if we get it too soon. + FP_LIB_TABLE* tbl = Prj().PcbFootprintLibs(); + int guess = guessNickname( tbl, (FPID*) &component->GetFPID() ); switch( guess ) @@ -659,9 +322,6 @@ bool CVPCB_MAINFRAME::ReadNetListAndLinkFiles() } -#endif - - int CVPCB_MAINFRAME::SaveCmpLinkFile( const wxString& aFullFileName ) { wxFileName fn; @@ -685,7 +345,7 @@ int CVPCB_MAINFRAME::SaveCmpLinkFile( const wxString& aFullFileName ) fn.SetExt( ComponentFileExtension ); // Save the project specific footprint library table. - if( !FootprintLibs()->IsEmpty( false ) ) + if( !Prj().PcbFootprintLibs()->IsEmpty( false ) ) { wxString fp_lib_tbl = Prj().FootprintLibTblName(); @@ -695,7 +355,7 @@ int CVPCB_MAINFRAME::SaveCmpLinkFile( const wxString& aFullFileName ) { try { - FootprintLibs()->Save( fp_lib_tbl ); + Prj().PcbFootprintLibs()->Save( fp_lib_tbl ); } catch( const IO_ERROR& ioe ) { diff --git a/include/fp_lib_table.h b/include/fp_lib_table.h index 679d437b42..4a2b822137 100644 --- a/include/fp_lib_table.h +++ b/include/fp_lib_table.h @@ -270,6 +270,8 @@ public: */ FP_LIB_TABLE( FP_LIB_TABLE* aFallBackTable = NULL ); + ~FP_LIB_TABLE(); + /// Delete all rows. void Clear() { diff --git a/include/project.h b/include/project.h index a4928f4e5c..c7f7a7f3dd 100644 --- a/include/project.h +++ b/include/project.h @@ -35,7 +35,7 @@ class wxConfigBase; class PARAM_CFG_ARRAY; - +class FP_LIB_TABLE; #define VTBL_ENTRY virtual @@ -49,11 +49,12 @@ class PROJECT { public: - /// Derive PROJECT elements from this, it has a virtual destructor, and - /// Elem*() functions can work with it. Implementation is opaque in - /// class PROJECT. If find you have to include derived class headers in this - /// file, you are doing something wrong. Keep knowledge of derived classes - /// opaque to class PROJECT please. + /// A PROJECT can hold stuff it knows nothing about, in the form of + /// _ELEM derivatives. Derive PROJECT elements from this, it has a virtual + /// destructor, and Elem*() functions can work with it. Implementation is + /// opaque in class PROJECT. If find you have to include derived class headers + /// in this file, you are doing incompatible with the goal of this class. + /// Keep knowledge of derived classes opaque to class PROJECT please. class _ELEM { public: @@ -63,6 +64,8 @@ public: PROJECT(); ~PROJECT(); + //--------------------------------------------------------- + // VTBL_ENTRY bool MaybeLoadProjectSettings( const std::vector& aFileSet ); /** @@ -154,18 +157,12 @@ public: */ enum ELEM_T { - FPTBL, + ELEM_FPTBL, ELEM_COUNT }; /** - * A PROJECT can hold stuff it knows nothing about, in the form of - * _ELEM derivatives. This function gives access to a PROJECT::_ELEM using - * enum ELEM_T as an index. - *

- * Acts as setter iff aElem is not NULL, else getter. - *

* Typically wrapped somewhere else in a more meaningful function wrapper. * This is a cross module API, therefore the _ELEM destructor is virtual and * can point to a destructor function in another link image. Be careful that @@ -174,7 +171,47 @@ public: * Summary: 1) cross module API, 2) PROJECT knows nothing about _ELEM objects, * except how to delete them and set and get pointers to them. */ - VTBL_ENTRY _ELEM* Elem( ELEM_T aIndex, _ELEM* aElem = NULL ); + VTBL_ENTRY _ELEM* GetElem( ELEM_T aIndex ); + VTBL_ENTRY void SetElem( ELEM_T aIndex, _ELEM* aElem ); + + /// Inline, clear the _ELEM at position aIndex + void ElemClear( ELEM_T aIndex ) + { + _ELEM* existing = GetElem( aIndex ); + delete existing; // virtual + SetElem( aIndex, NULL ); + } + + /** + * Function ElemsClear + * deletes all the _ELEMs and set their pointers to NULL. + */ + VTBL_ENTRY void ElemsClear(); + + //-------------------------------------------------------- + + //----------------------------------------------------- + + // These are the non-virtual DATA LOAD ON DEMAND members. They load project related + // data on demand, and do so typicallly into m_elems[] at a particular index using + // SetElem() & GetElem(). That is, they wrap SetElem() and GetElem(). + // To get the data to reload on demand, first SetProjectFullName(), + // then call ElemClear() from client code. + + // non-virtuals resident in PCBNEW link image(s). By being non-virtual, these + // functions can get linked into the KIFACE that needs them, and only there. + // In fact, the other KIFACEs don't even know they exist. +#if defined(PCBNEW) || defined(CVPCB) + // These are all prefaced with "Pcb" + FP_LIB_TABLE* PcbFootprintLibs(); +#endif + + +#if defined(EESCHEMA) + // These are all prefaced with "Sch" +#endif + + //---------------------------------------------------- private: @@ -215,10 +252,6 @@ private: //-------------------------------------------------------------- #if 0 - VTBL_ENTRY int ElemAllocNdx(); - VTBL_ENTRY void ElemSet( int aIndex, ELEMENT_BASE* aBlock ); - VTBL_ENTRY ELEM_BASE* ElemGet( int aIndex ) - /** * Function Value * fetches a project variable @a aVariable and returns true if that variable was diff --git a/include/wxBasePcbFrame.h b/include/wxBasePcbFrame.h index e60a969abb..b518af6f12 100644 --- a/include/wxBasePcbFrame.h +++ b/include/wxBasePcbFrame.h @@ -103,7 +103,7 @@ protected: * * @param aFootprintId is the #FPID of component footprint to load. * @return the #MODULE if found or NULL if \a aFootprintId not found in any of the - * libraries in the table returned from #FootprintLibs(). + * libraries in the table returned from #Prj().PcbFootprintLibs(). * @throw IO_ERROR if an I/O error occurs or a #PARSE_ERROR if a file parsing error * occurs while reading footprint library files. */ @@ -127,7 +127,7 @@ public: * * @param aFootprintId is the #FPID of component footprint to load. * @return the #MODULE if found or NULL if \a aFootprintId not found in any of the - * libraries in table returned from #FootprintLibs(). + * libraries in table returned from #Prj().PcbFootprintLibs(). */ MODULE* LoadFootprint( const FPID& aFootprintId ); @@ -466,12 +466,6 @@ public: */ wxString SelectFootprintFromLibBrowser(); - /** - * Function FootprintLibs - * @return the project #FP_LIB_TABLE. - */ - FP_LIB_TABLE* FootprintLibs() const; - // ratsnest functions /** * Function Compile_Ratsnest diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 2307a5b3c7..af02b79258 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -174,10 +174,15 @@ PCB_BASE_FRAME::~PCB_BASE_FRAME() } -FP_LIB_TABLE* PCB_BASE_FRAME::FootprintLibs() const +FP_LIB_TABLE* PROJECT::PcbFootprintLibs() { - PROJECT& prj = Prj(); - FP_LIB_TABLE* tbl = dynamic_cast( prj.Elem( PROJECT::FPTBL ) ); + // This is a lazy loading function, it loads the project specific table when + // that table is asked for, not before. + + FP_LIB_TABLE* tbl = (FP_LIB_TABLE*) GetElem( ELEM_FPTBL ); + + // its gotta be NULL or a FP_LIB_TABLE, or a bug. + wxASSERT( !tbl || dynamic_cast( tbl ) ); if( !tbl ) { @@ -186,7 +191,18 @@ FP_LIB_TABLE* PCB_BASE_FRAME::FootprintLibs() const // stack this way, all using the same global fallback table. tbl = new FP_LIB_TABLE( &GFootprintTable ); - prj.Elem( PROJECT::FPTBL, tbl ); + SetElem( ELEM_FPTBL, tbl ); + + wxString projectFpLibTableFileName = FootprintLibTblName(); + + try + { + tbl->Load( projectFpLibTableFileName ); + } + catch( const IO_ERROR& ioe ) + { + DisplayError( NULL, ioe.errorText ); + } } return tbl; diff --git a/pcbnew/files.cpp b/pcbnew/files.cpp index ec1da8e310..27262d6f38 100644 --- a/pcbnew/files.cpp +++ b/pcbnew/files.cpp @@ -173,7 +173,7 @@ void PCB_EDIT_FRAME::Files_io( wxCommandEvent& event ) Clear_Pcb( true ); // Clear footprint library table for the new board. - FootprintLibs()->Clear(); + Prj().PcbFootprintLibs()->Clear(); wxFileName fn; @@ -603,7 +603,7 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool aCreateBackupF return false; // Save the project specific footprint library table. - if( !FootprintLibs()->IsEmpty( false ) ) + if( !Prj().PcbFootprintLibs()->IsEmpty( false ) ) { wxString fp_lib_tbl = Prj().FootprintLibTblName(); @@ -613,7 +613,7 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool aCreateBackupF { try { - FootprintLibs()->Save( fp_lib_tbl ); + Prj().PcbFootprintLibs()->Save( fp_lib_tbl ); } catch( const IO_ERROR& ioe ) { diff --git a/pcbnew/librairi.cpp b/pcbnew/librairi.cpp index 487f356e6a..c55cad44b5 100644 --- a/pcbnew/librairi.cpp +++ b/pcbnew/librairi.cpp @@ -469,7 +469,7 @@ bool FOOTPRINT_EDIT_FRAME::DeleteModuleFromCurrentLibrary() { wxString nickname = getLibNickName(); - if( !FootprintLibs()->IsFootprintLibWritable( nickname ) ) + if( !Prj().PcbFootprintLibs()->IsFootprintLibWritable( nickname ) ) { wxString msg = wxString::Format( _( "Library '%s' is read only" ), @@ -481,7 +481,7 @@ bool FOOTPRINT_EDIT_FRAME::DeleteModuleFromCurrentLibrary() } wxString fpid_txt = PCB_BASE_FRAME::SelectFootprint( this, nickname, - wxEmptyString, wxEmptyString, FootprintLibs() ); + wxEmptyString, wxEmptyString, Prj().PcbFootprintLibs() ); if( !fpid_txt ) return false; @@ -497,7 +497,7 @@ bool FOOTPRINT_EDIT_FRAME::DeleteModuleFromCurrentLibrary() try { - FootprintLibs()->FootprintDelete( nickname, fpname ); + Prj().PcbFootprintLibs()->FootprintDelete( nickname, fpname ); } catch( const IO_ERROR& ioe ) { @@ -545,22 +545,24 @@ void PCB_EDIT_FRAME::ArchiveModulesOnBoard( bool aNewModulesOnly ) try { + FP_LIB_TABLE* tbl = Prj().PcbFootprintLibs(); + // Delete old library if we're replacing it entirely. if( !aNewModulesOnly ) { - FootprintLibs()->FootprintLibDelete( nickname ); - FootprintLibs()->FootprintLibCreate( nickname ); + tbl->FootprintLibDelete( nickname ); + tbl->FootprintLibCreate( nickname ); for( MODULE* m = GetBoard()->m_Modules; m; m = m->Next() ) { - FootprintLibs()->FootprintSave( nickname, m, true ); + tbl->FootprintSave( nickname, m, true ); } } else { for( MODULE* m = GetBoard()->m_Modules; m; m = m->Next() ) { - FootprintLibs()->FootprintSave( nickname, m, false ); + tbl->FootprintSave( nickname, m, false ); // Check for request to stop backup (ESCAPE key actuated) if( m_canvas->GetAbortRequest() ) @@ -627,7 +629,9 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibrary, try { - MODULE* m = FootprintLibs()->FootprintLoad( aLibrary, footprintName ); + FP_LIB_TABLE* tbl = Prj().PcbFootprintLibs(); + + MODULE* m = tbl->FootprintLoad( aLibrary, footprintName ); if( m ) { @@ -653,7 +657,7 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibrary, // this always overwrites any existing footprint, but should yell on its // own if the library or footprint is not writable. - FootprintLibs()->FootprintSave( aLibrary, aModule ); + tbl->FootprintSave( aLibrary, aModule ); } catch( const IO_ERROR& ioe ) { @@ -738,7 +742,7 @@ wxString PCB_BASE_FRAME::SelectLibrary( const wxString& aNicknameExisting ) headers.Add( _( "Nickname" ) ); headers.Add( _( "Description" ) ); - FP_LIB_TABLE* fptbl = FootprintLibs(); + FP_LIB_TABLE* fptbl = Prj().PcbFootprintLibs(); std::vector< wxArrayString > itemsToDisplay; std::vector< wxString > nicknames = fptbl->GetLogicalLibs(); diff --git a/pcbnew/loadcmp.cpp b/pcbnew/loadcmp.cpp index dda500664f..cd3f85d00d 100644 --- a/pcbnew/loadcmp.cpp +++ b/pcbnew/loadcmp.cpp @@ -315,7 +315,7 @@ MODULE* PCB_BASE_FRAME::LoadFootprint( const FPID& aFootprintId ) MODULE* PCB_BASE_FRAME::loadFootprint( const FPID& aFootprintId ) throw( IO_ERROR, PARSE_ERROR ) { - FP_LIB_TABLE* fptbl = FootprintLibs(); + FP_LIB_TABLE* fptbl = Prj().PcbFootprintLibs(); wxCHECK_MSG( fptbl, NULL, wxT( "Cannot look up FPID in NULL FP_LIB_TABLE." ) ); diff --git a/pcbnew/modedit.cpp b/pcbnew/modedit.cpp index 26e6ca7fde..81b74eebe7 100644 --- a/pcbnew/modedit.cpp +++ b/pcbnew/modedit.cpp @@ -491,7 +491,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) Clear_Pcb( true ); SetCrossHairPosition( wxPoint( 0, 0 ) ); - LoadModuleFromLibrary( getLibNickName(), FootprintLibs(), true ); + LoadModuleFromLibrary( getLibNickName(), Prj().PcbFootprintLibs(), true ); redraw = true; if( GetBoard()->m_Modules ) diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index cc83322f50..4ef660f343 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -274,7 +274,7 @@ wxString FOOTPRINT_EDIT_FRAME::getLibPath() { const wxString& nickname = getLibNickName(); - const FP_LIB_TABLE::ROW* row = FootprintLibs()->FindRow( nickname ); + const FP_LIB_TABLE::ROW* row = Prj().PcbFootprintLibs()->FindRow( nickname ); return row->GetFullURI( true ); } @@ -481,7 +481,7 @@ void FOOTPRINT_EDIT_FRAME::OnUpdateReplaceModuleInBoard( wxUpdateUIEvent& aEvent void FOOTPRINT_EDIT_FRAME::OnUpdateSelectCurrentLib( wxUpdateUIEvent& aEvent ) { - FP_LIB_TABLE* fptbl = FootprintLibs(); + FP_LIB_TABLE* fptbl = Prj().PcbFootprintLibs(); aEvent.Enable( fptbl && !fptbl->IsEmpty() ); } @@ -621,7 +621,7 @@ void FOOTPRINT_EDIT_FRAME::updateTitle() { try { - bool writable = FootprintLibs()->IsFootprintLibWritable( nickname ); + bool writable = Prj().PcbFootprintLibs()->IsFootprintLibWritable( nickname ); // no exception was thrown, this means libPath is valid, but it may be read only. title = _( "Module Editor (active library: " ) + nickname + wxT( ")" ); diff --git a/pcbnew/modview_frame.cpp b/pcbnew/modview_frame.cpp index 1bcbd5fcd5..dc24cf3208 100644 --- a/pcbnew/modview_frame.cpp +++ b/pcbnew/modview_frame.cpp @@ -309,7 +309,7 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList() { m_libList->Clear(); - std::vector< wxString > nicknames = FootprintLibs()->GetLogicalLibs(); + std::vector< wxString > nicknames = Prj().PcbFootprintLibs()->GetLogicalLibs(); for( unsigned ii = 0; ii < nicknames.size(); ii++ ) m_libList->Append( nicknames[ii] ); @@ -348,7 +348,7 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList() FOOTPRINT_LIST fp_info_list; - fp_info_list.ReadFootprintFiles( FootprintLibs(), &m_libraryName ); + fp_info_list.ReadFootprintFiles( Prj().PcbFootprintLibs(), &m_libraryName ); if( fp_info_list.GetErrorCount() ) { @@ -509,7 +509,7 @@ void FOOTPRINT_VIEWER_FRAME::OnActivate( wxActivateEvent& event ) m_selectedFootprintName.Empty(); // Ensure we have the right library list: - std::vector< wxString > libNicknames = FootprintLibs()->GetLogicalLibs(); + std::vector< wxString > libNicknames = Prj().PcbFootprintLibs()->GetLogicalLibs(); if( libNicknames.size() == m_libList->GetCount() ) { @@ -742,13 +742,16 @@ void FOOTPRINT_VIEWER_FRAME::SelectCurrentLibrary( wxCommandEvent& event ) void FOOTPRINT_VIEWER_FRAME::SelectCurrentFootprint( wxCommandEvent& event ) { +#if 0 // cannot remember why this is here // The PCB_EDIT_FRAME may not be the FOOTPRINT_VIEW_FRAME's parent, // so use Kiway().Player() to fetch. PCB_EDIT_FRAME* parent = (PCB_EDIT_FRAME*) Kiway().Player( FRAME_PCB, true ); + (void*) parent; +#endif wxString libname = m_libraryName + wxT( "." ) + LegacyFootprintLibPathExtension; MODULE* oldmodule = GetBoard()->m_Modules; - MODULE* module = LoadModuleFromLibrary( libname, parent->FootprintLibs(), false ); + MODULE* module = LoadModuleFromLibrary( libname, Prj().PcbFootprintLibs(), false ); if( module ) { @@ -808,7 +811,7 @@ void FOOTPRINT_VIEWER_FRAME::SelectAndViewFootprint( int aMode ) // Delete the current footprint GetBoard()->m_Modules.DeleteAll(); - MODULE* footprint = FootprintLibs()->FootprintLoad( m_libraryName, m_footprintName ); + MODULE* footprint = Prj().PcbFootprintLibs()->FootprintLoad( m_libraryName, m_footprintName ); if( footprint ) GetBoard()->Add( footprint, ADD_APPEND ); diff --git a/pcbnew/netlist.cpp b/pcbnew/netlist.cpp index 8bf18cab7b..af65d26faf 100644 --- a/pcbnew/netlist.cpp +++ b/pcbnew/netlist.cpp @@ -172,7 +172,7 @@ void PCB_EDIT_FRAME::loadFootprints( NETLIST& aNetlist, REPORTER* aReporter ) MODULE* module = 0; MODULE* fpOnBoard; - if( aNetlist.IsEmpty() || FootprintLibs()->IsEmpty() ) + if( aNetlist.IsEmpty() || Prj().PcbFootprintLibs()->IsEmpty() ) return; aNetlist.SortByFPID(); diff --git a/pcbnew/onleftclick.cpp b/pcbnew/onleftclick.cpp index 78390e52ba..a86324ce5e 100644 --- a/pcbnew/onleftclick.cpp +++ b/pcbnew/onleftclick.cpp @@ -37,6 +37,7 @@ #include #include #include +#include #include #include @@ -355,7 +356,7 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition ) { m_canvas->MoveCursorToCrossHair(); DrawStruct = (BOARD_ITEM*) LoadModuleFromLibrary( - wxEmptyString, FootprintLibs(), true, aDC ); + wxEmptyString, Prj().PcbFootprintLibs(), true, aDC ); SetCurItem( DrawStruct ); diff --git a/pcbnew/pcbnew_config.cpp b/pcbnew/pcbnew_config.cpp index df8df9fcc3..00452262ce 100644 --- a/pcbnew/pcbnew_config.cpp +++ b/pcbnew/pcbnew_config.cpp @@ -96,7 +96,7 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event ) case ID_PCB_LIB_TABLE_EDIT: { bool tableChanged = false; - int r = InvokePcbLibTableEditor( this, &GFootprintTable, FootprintLibs() ); + int r = InvokePcbLibTableEditor( this, &GFootprintTable, Prj().PcbFootprintLibs() ); if( r & 1 ) { @@ -126,7 +126,7 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event ) try { - FootprintLibs()->Save( tblName ); + Prj().PcbFootprintLibs()->Save( tblName ); tableChanged = true; } catch( const IO_ERROR& ioe ) @@ -259,18 +259,7 @@ bool PCB_EDIT_FRAME::LoadProjectSettings( const wxString& aProjectFileName ) SetElementVisibility( RATSNEST_VISIBLE, showRats ); #endif - wxString projectFpLibTableFileName = Prj().FootprintLibTblName(); - - FootprintLibs()->Clear(); - - try - { - FootprintLibs()->Load( projectFpLibTableFileName ); - } - catch( const IO_ERROR& ioe ) - { - DisplayError( this, ioe.errorText ); - } + Prj().ElemClear( PROJECT::ELEM_FPTBL ); // Force it to be reloaded on demand. // Load the page layout decr file, from the filename stored in // BASE_SCREEN::m_PageLayoutDescrFileName, read in config project file diff --git a/pcbnew/xchgmod.cpp b/pcbnew/xchgmod.cpp index 9f3c31f404..7fafc6a914 100644 --- a/pcbnew/xchgmod.cpp +++ b/pcbnew/xchgmod.cpp @@ -38,6 +38,7 @@ #include #include +#include #include #include @@ -492,7 +493,7 @@ void DIALOG_EXCHANGE_MODULE::BrowseAndSelectFootprint( wxCommandEvent& event ) wxString newname; newname = m_parent->SelectFootprint( m_parent, wxEmptyString, wxEmptyString, wxEmptyString, - m_parent->FootprintLibs() ); + Prj().PcbFootprintLibs() ); if( newname != wxEmptyString ) m_NewModule->SetValue( newname ); diff --git a/scripts/kicad-install.sh b/scripts/kicad-install.sh index e1826fc55a..7ddd906881 100755 --- a/scripts/kicad-install.sh +++ b/scripts/kicad-install.sh @@ -38,7 +38,7 @@ STABLE=tag:pre-kiway # currently the best mix of features and stabilty TESTING=last:1 # the most recent -# Set this to STABLE or TESTING or other know revision number: +# Set this to STABLE or TESTING or other known revision number: REVISION=$STABLE # For info on revision syntax: From 9fe5ce67e66ed544e3534c2e7c83765a4a183fbe Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Fri, 9 May 2014 13:35:48 -0500 Subject: [PATCH 373/741] Modular-Kicad milestone B), minor portion: *) Implement a framework for "Data Load On Demand". *) Implement FP_LIB_TABLE* PROJECT::PcbFootprintLibs(), which is the first prototype. This allows the project specific footprint tables to be part of the Module Editor when invoked from Eeschema. --- common/fp_lib_table.cpp | 15 +- common/project.cpp | 43 ++- cvpcb/cfg.cpp | 19 +- cvpcb/class_DisplayFootprintsFrame.cpp | 3 +- cvpcb/class_library_listbox.cpp | 2 +- cvpcb/cvframe.cpp | 32 +-- cvpcb/cvpcb_mainframe.h | 6 - cvpcb/readwrite_dlgs.cpp | 352 +------------------------ include/fp_lib_table.h | 2 + include/project.h | 69 +++-- include/wxBasePcbFrame.h | 10 +- pcbnew/basepcbframe.cpp | 24 +- pcbnew/files.cpp | 6 +- pcbnew/librairi.cpp | 24 +- pcbnew/loadcmp.cpp | 2 +- pcbnew/modedit.cpp | 2 +- pcbnew/moduleframe.cpp | 6 +- pcbnew/modview_frame.cpp | 13 +- pcbnew/netlist.cpp | 2 +- pcbnew/onleftclick.cpp | 3 +- pcbnew/pcbnew_config.cpp | 17 +- pcbnew/xchgmod.cpp | 3 +- scripts/kicad-install.sh | 2 +- 23 files changed, 176 insertions(+), 481 deletions(-) diff --git a/common/fp_lib_table.cpp b/common/fp_lib_table.cpp index f69ccd2ea5..2b5a47aa9c 100644 --- a/common/fp_lib_table.cpp +++ b/common/fp_lib_table.cpp @@ -137,6 +137,12 @@ FP_LIB_TABLE::FP_LIB_TABLE( FP_LIB_TABLE* aFallBackTable ) : } +FP_LIB_TABLE::~FP_LIB_TABLE() +{ + // *fallBack is not owned here. +} + + wxArrayString FP_LIB_TABLE::FootprintEnumerate( const wxString& aNickname ) { const ROW* row = FindRow( aNickname ); @@ -514,9 +520,16 @@ std::vector FP_LIB_TABLE::GetLogicalLibs() } while( ( cur = cur->fallBack ) != 0 ); + ret.reserve( unique.size() ); + + // DBG(printf( "%s: count:%zd\n", __func__, unique.size() );) + // return a sorted, unique set of nicknames in a std::vector to caller for( std::set::const_iterator it = unique.begin(); it!=unique.end(); ++it ) + { + //DBG(printf( " %s\n", TO_UTF8( *it ) );) ret.push_back( *it ); + } return ret; } @@ -738,7 +751,7 @@ wxString FP_LIB_TABLE::GetGlobalTableFileName() void FP_LIB_TABLE::Load( const wxString& aFileName ) throw( IO_ERROR ) { - // Empty footprint library tables are valid. + // It's OK if footprint library tables are missing. if( wxFileName::IsFileReadable( aFileName ) ) { FILE_LINE_READER reader( aFileName ); diff --git a/common/project.cpp b/common/project.cpp index df31c81c1b..2e10d8a661 100644 --- a/common/project.cpp +++ b/common/project.cpp @@ -42,15 +42,22 @@ PROJECT::PROJECT() memset( m_elems, 0, sizeof(m_elems) ); } + +void PROJECT::ElemsClear() +{ + // careful here, this should work, but the virtual destructor may not + // be in the same link image as PROJECT. + for( unsigned i = 0; iClear(); - - /* this is done by ConfigLoad(), and that sets the env var too. - prj.SetProjectFullName( fn.GetFullPath() ); - */ - - wxString projectFpLibTableFileName = prj.FootprintLibTblName(); - - try - { - FootprintLibs()->Load( projectFpLibTableFileName ); - } - catch( const IO_ERROR& ioe ) - { - DisplayError( this, ioe.errorText ); - } + // Force it to be loaded on demand. + prj.ElemClear( PROJECT::ELEM_FPTBL ); } diff --git a/cvpcb/class_DisplayFootprintsFrame.cpp b/cvpcb/class_DisplayFootprintsFrame.cpp index e1a0ab36dc..241ecdd861 100644 --- a/cvpcb/class_DisplayFootprintsFrame.cpp +++ b/cvpcb/class_DisplayFootprintsFrame.cpp @@ -488,7 +488,8 @@ MODULE* DISPLAY_FOOTPRINTS_FRAME::Get_Module( const wxString& aFootprintName ) wxLogDebug( wxT( "Load footprint <%s> from library <%s>." ), fpname.c_str(), nickname.c_str() ); - footprint = FootprintLibs()->FootprintLoad( FROM_UTF8( nickname.c_str() ), FROM_UTF8( fpname.c_str() ) ); + footprint = Prj().PcbFootprintLibs()->FootprintLoad( + FROM_UTF8( nickname.c_str() ), FROM_UTF8( fpname.c_str() ) ); } catch( const IO_ERROR& ioe ) { diff --git a/cvpcb/class_library_listbox.cpp b/cvpcb/class_library_listbox.cpp index db86776145..4149f285ca 100644 --- a/cvpcb/class_library_listbox.cpp +++ b/cvpcb/class_library_listbox.cpp @@ -128,7 +128,7 @@ void LIBRARY_LISTBOX::SetLibraryList( const wxArrayString& aList ) { RefreshItems( 0L, m_libraryList.Count()-1 ); -#if defined (__WXGTK__ ) // && wxMINOR_VERSION == 8 +#if defined (__WXGTK__ ) && wxMINOR_VERSION == 8 // @bug On GTK and wxWidgets 2.8.x, this will assert in debug builds because the // column parameter is -1. This was the only way to prevent GTK3 from // ellipsizing long strings down to a few characters. It still doesn't set diff --git a/cvpcb/cvframe.cpp b/cvpcb/cvframe.cpp index 3ffd306b7d..7079e40287 100644 --- a/cvpcb/cvframe.cpp +++ b/cvpcb/cvframe.cpp @@ -200,24 +200,6 @@ CVPCB_MAINFRAME::~CVPCB_MAINFRAME() } -FP_LIB_TABLE* CVPCB_MAINFRAME::FootprintLibs() const -{ - PROJECT& prj = Prj(); - FP_LIB_TABLE* tbl = dynamic_cast( prj.Elem( PROJECT::FPTBL ) ); - - if( !tbl ) - { - // Stack the project specific FP_LIB_TABLE overlay on top of the global table. - // ~FP_LIB_TABLE() will not touch the fallback table, so multiple projects may - // stack this way, all using the same global fallback table. - tbl = new FP_LIB_TABLE( &GFootprintTable ); - prj.Elem( PROJECT::FPTBL, tbl ); - } - - return tbl; -} - - void CVPCB_MAINFRAME::LoadSettings( wxConfigBase* aCfg ) { EDA_BASE_FRAME::LoadSettings( aCfg ); @@ -493,7 +475,7 @@ void CVPCB_MAINFRAME::ConfigCvpcb( wxCommandEvent& event ) void CVPCB_MAINFRAME::OnEditFootprintLibraryTable( wxCommandEvent& aEvent ) { bool tableChanged = false; - int r = InvokePcbLibTableEditor( this, &GFootprintTable, FootprintLibs() ); + int r = InvokePcbLibTableEditor( this, &GFootprintTable, Prj().PcbFootprintLibs() ); if( r & 1 ) { @@ -521,7 +503,7 @@ void CVPCB_MAINFRAME::OnEditFootprintLibraryTable( wxCommandEvent& aEvent ) try { - FootprintLibs()->Save( fileName ); + Prj().PcbFootprintLibs()->Save( fileName ); tableChanged = true; } catch( const IO_ERROR& ioe ) @@ -538,7 +520,7 @@ void CVPCB_MAINFRAME::OnEditFootprintLibraryTable( wxCommandEvent& aEvent ) if( tableChanged ) { BuildLIBRARY_LISTBOX(); - m_footprints.ReadFootprintFiles( FootprintLibs() ); + m_footprints.ReadFootprintFiles( Prj().PcbFootprintLibs() ); } } @@ -735,7 +717,7 @@ void CVPCB_MAINFRAME::DisplayStatus() bool CVPCB_MAINFRAME::LoadFootprintFiles() { - FP_LIB_TABLE* fptbl = FootprintLibs(); + FP_LIB_TABLE* fptbl = Prj().PcbFootprintLibs(); // Check if there are footprint libraries in the footprint library table. if( !fptbl || !fptbl->GetLogicalLibs().size() ) @@ -1012,11 +994,13 @@ void CVPCB_MAINFRAME::BuildLIBRARY_LISTBOX() wxFONTWEIGHT_NORMAL ) ); } - if( FootprintLibs() ) + FP_LIB_TABLE* tbl = Prj().PcbFootprintLibs(); + + if( tbl ) { wxArrayString libNames; - std::vector< wxString > libNickNames = FootprintLibs()->GetLogicalLibs(); + std::vector< wxString > libNickNames = tbl->GetLogicalLibs(); for( unsigned ii = 0; ii < libNickNames.size(); ii++ ) libNames.Add( libNickNames[ii] ); diff --git a/cvpcb/cvpcb_mainframe.h b/cvpcb/cvpcb_mainframe.h index 3993091dda..7b136746a9 100644 --- a/cvpcb/cvpcb_mainframe.h +++ b/cvpcb/cvpcb_mainframe.h @@ -88,12 +88,6 @@ public: bool OpenProjectFiles( const std::vector& aFileSet, int aCtl=0 ); // overload KIWAY_PLAYER - /** - * Function FootprintLibs - * @return the project #FP_LIB_TABLE. - */ - FP_LIB_TABLE* FootprintLibs() const; - /** * @return a pointer on the Footprint Viewer frame, if exists, or NULL */ diff --git a/cvpcb/readwrite_dlgs.cpp b/cvpcb/readwrite_dlgs.cpp index 538fe34841..939abc7acb 100644 --- a/cvpcb/readwrite_dlgs.cpp +++ b/cvpcb/readwrite_dlgs.cpp @@ -119,346 +119,6 @@ void CVPCB_MAINFRAME::SetNewPkg( const wxString& aFootprintName ) } -#if 0 - - /* - - This code block was based on two major assumptions that are no longer true: - 1) Footprint library basenames would remain the same. - (But no, basenames have been renamed in the github repo.) - 2) *.mod files would still be around and merely reside in the FP_LIB_TABLE. - (But no, they have been converted to *.pretty.) - - There is a newer replacement code block in the #else region. - - */ - -/** - * Function missingLegacyLibs - * tests the list of \a aLibNames by URI to determine if any of them are missing from - * the #FP_LIB_TABLE. - * - * @note The missing legacy footprint library test is performed by using old library - * file path lookup method. If the library is found, it is compared against all - * of the URIs in the table rather than the nickname. This was done because the - * user could change the nicknames from the default table. Using the full path - * is more reliable. - * - * @param aLibNames is the list of legacy library names. - * @param aErrorMsg is a pointer to a wxString object to store the URIs of any missing - * legacy library paths. Can be NULL. - * @return true if there are missing legacy libraries. Otherwise false. - */ -static bool missingLegacyLibs( FP_LIB_TABLE* aTbl, SEARCH_STACK& aSStack, - const wxArrayString& aLibNames, wxString* aErrorMsg ) -{ - bool missing = false; - - for( unsigned i = 0; i < aLibNames.GetCount(); i++ ) - { - wxFileName fn( wxEmptyString, aLibNames[i], LegacyFootprintLibPathExtension ); - - wxString legacyLibPath = aSStack.FindValidPath( fn.GetFullPath() ); - - /* - if( legacyLibPath.IsEmpty() ) - continue; - */ - - if( !aTbl->FindRowByURI( legacyLibPath ) ) - { - missing = true; - - if( aErrorMsg ) - { - *aErrorMsg += wxChar( '"' ); - - if( !legacyLibPath ) - *aErrorMsg += !legacyLibPath ? aLibNames[i] : legacyLibPath; - - *aErrorMsg += wxT( "\"\n" ); - } - } - } - - return missing; -} - - -/** - * Function convertFromLegacy - * converts the footprint names in \a aNetList from the legacy format to the #FPID format. - * - * @param aNetList is the #NETLIST object to convert. - * @param aLibNames is the list of legacy footprint library names from the currently loaded - * project. - * @param aReporter is the #REPORTER object to dump messages into. - * @return true if all footprint names were successfully converted to a valid FPID. - */ -static bool convertFromLegacy( FP_LIB_TABLE* aTbl, SEARCH_STACK& aSStack, NETLIST& aNetList, - const wxArrayString& aLibNames, REPORTER* aReporter = NULL ) throw( IO_ERROR ) -{ - wxString msg; - FPID lastFPID; - COMPONENT* component; - MODULE* module = 0; - bool retv = true; - - if( aNetList.IsEmpty() ) - return true; - - aNetList.SortByFPID(); - - wxString libPath; - - PLUGIN::RELEASER pi( IO_MGR::PluginFind( IO_MGR::LEGACY ) ); - - for( unsigned ii = 0; ii < aNetList.GetCount(); ii++ ) - { - component = aNetList.GetComponent( ii ); - - // The footprint hasn't been assigned yet so ignore it. - if( component->GetFPID().empty() ) - continue; - - if( component->GetFPID() != lastFPID ) - { - module = NULL; - - for( unsigned ii = 0; ii < aLibNames.GetCount(); ii++ ) - { - wxFileName fn( wxEmptyString, aLibNames[ii], LegacyFootprintLibPathExtension ); - - libPath = aSStack.FindValidPath( fn.GetFullPath() ); - - if( !libPath ) - { - if( aReporter ) - { - msg.Printf( _( "Cannot find footprint library file '%s' in any of the " - "KiCad legacy library search paths.\n" ), - GetChars( fn.GetFullPath() ) ); - aReporter->Report( msg ); - } - - retv = false; - continue; - } - - module = pi->FootprintLoad( libPath, component->GetFPID().GetFootprintName() ); - - if( module ) - { - lastFPID = component->GetFPID(); - break; - } - } - } - - if( !module ) - { - if( aReporter ) - { - msg.Printf( _( "Component '%s' footprint '%s' was not found in any legacy " - "library.\n" ), - GetChars( component->GetReference() ), - GetChars( component->GetFPID().Format() ) ); - aReporter->Report( msg ); - } - - // Clear the footprint assignment since the old library lookup method is no - // longer valid. - FPID emptyFPID; - - component->SetFPID( emptyFPID ); - retv = false; - continue; - } - else - { - wxString libNickname; - - const FP_LIB_TABLE::ROW* row; - - if( ( row = aTbl->FindRowByURI( libPath ) ) != NULL ) - libNickname = row->GetNickName(); - - if( libNickname.IsEmpty() ) - { - if( aReporter ) - { - msg.Printf( _( "Component '%s' with footprint '%s' and legacy library path '%s' " - "was not found in the footprint library table.\n" ), - GetChars( component->GetReference() ), - GetChars( component->GetFPID().Format() ), - GetChars( libPath ) - ); - aReporter->Report( msg ); - } - - retv = false; - } - else - { - FPID newFPID = lastFPID; - newFPID.SetLibNickname( libNickname ); - - if( !newFPID.IsValid() ) - { - if( aReporter ) - { - msg.Printf( _( "Component '%s' FPID '%s' is not valid.\n" ), - GetChars( component->GetReference() ), - GetChars( newFPID.Format() ) ); - aReporter->Report( msg ); - } - - retv = false; - } - else - { - // The footprint name should already be set. - component->SetFPID( newFPID ); - } - } - } - } - - return retv; -} - - -bool CVPCB_MAINFRAME::ReadNetListAndLinkFiles() -{ - COMPONENT* component; - wxString msg; - bool isLegacy = true; - - ReadSchematicNetlist(); - - if( m_ListCmp == NULL ) - return false; - - LoadProjectFile( m_NetlistFileName.GetFullPath() ); - LoadFootprintFiles(); - BuildFOOTPRINTS_LISTBOX(); - BuildLIBRARY_LISTBOX(); - - m_ListCmp->Clear(); - m_undefinedComponentCnt = 0; - - if( m_netlist.AnyFootprintsLinked() ) - { - for( unsigned i = 0; i < m_netlist.GetCount(); i++ ) - { - component = m_netlist.GetComponent( i ); - - if( component->GetFPID().empty() ) - continue; - - if( isLegacy ) - { - if( !component->GetFPID().IsLegacy() ) - isLegacy = false; - } - } - } - else - { - isLegacy = false; // None of the components have footprints assigned. - } - - wxString missingLibs; - - // Check if footprint links were generated before the footprint library table was implemented. - if( isLegacy ) - { - if( missingLegacyLibs( FootprintLibs(), Prj().PcbSearchS(), m_ModuleLibNames, &missingLibs ) ) - { - msg = wxT( "The following legacy libraries are defined in the project file " - "but were not found in the footprint library table:\n\n" ) + missingLibs; - msg += wxT( "\nDo you want to update the footprint library table before " - "attempting to update the assigned footprints?" ); - - if( IsOK( this, msg ) ) - { - wxCommandEvent cmd; - - OnEditFootprintLibraryTable( cmd ); - } - } - - msg = wxT( "Some or all of the assigned footprints contain legacy entries. Would you " - "like CvPcb to attempt to convert them to the new footprint library table " - "format?" ); - - if( IsOK( this, msg ) ) - { - msg.Clear(); - WX_STRING_REPORTER reporter( &msg ); - - SEARCH_STACK& search = Prj().SchSearchS(); - - if( !convertFromLegacy( FootprintLibs(), search, m_netlist, m_ModuleLibNames, &reporter ) ) - { - HTML_MESSAGE_BOX dlg( this, wxEmptyString ); - - dlg.MessageSet( wxT( "The following errors occurred attempting to convert the " - "footprint assignments:\n\n" ) ); - dlg.ListSet( msg ); - dlg.MessageSet( wxT( "\nYou will need to reassign them manually if you want them " - "to be updated correctly the next time you import the " - "netlist in Pcbnew." ) ); - dlg.ShowModal(); - } - - m_modified = true; - } - else - { - // Clear the legacy footprint assignments. - for( unsigned i = 0; i < m_netlist.GetCount(); i++ ) - { - FPID emptyFPID; - component = m_netlist.GetComponent( i ); - component->SetFPID( emptyFPID ); - m_modified = true; - } - } - } - - for( unsigned i = 0; i < m_netlist.GetCount(); i++ ) - { - component = m_netlist.GetComponent( i ); - - msg.Printf( CMP_FORMAT, m_ListCmp->GetCount() + 1, - GetChars( component->GetReference() ), - GetChars( component->GetValue() ), - GetChars( FROM_UTF8( component->GetFPID().Format().c_str() ) ) ); - - m_ListCmp->AppendLine( msg ); - - if( component->GetFPID().empty() ) - { - m_undefinedComponentCnt += 1; - continue; - } - } - - if( !m_netlist.IsEmpty() ) - m_ListCmp->SetSelection( 0, true ); - - DisplayStatus(); - - UpdateTitle(); - - UpdateFileHistory( m_NetlistFileName.GetFullPath() ); - - return true; -} - -#else // new strategy - /// Return true if the resultant FPID has a certain nickname. The guess /// is only made if this footprint resides in only one library. /// @return int - 0 on success, 1 on not found, 2 on ambiguous i.e. multiple matches @@ -503,7 +163,6 @@ bool CVPCB_MAINFRAME::ReadNetListAndLinkFiles() { wxString msg; bool hasMissingNicks = false; - FP_LIB_TABLE* tbl = FootprintLibs(); ReadSchematicNetlist(); @@ -512,6 +171,7 @@ bool CVPCB_MAINFRAME::ReadNetListAndLinkFiles() LoadProjectFile( m_NetlistFileName.GetFullPath() ); LoadFootprintFiles(); + BuildFOOTPRINTS_LISTBOX(); BuildLIBRARY_LISTBOX(); @@ -554,6 +214,9 @@ bool CVPCB_MAINFRAME::ReadNetListAndLinkFiles() if( component->GetFPID().IsLegacy() ) { + // get this first here, it's possibly obsoleted if we get it too soon. + FP_LIB_TABLE* tbl = Prj().PcbFootprintLibs(); + int guess = guessNickname( tbl, (FPID*) &component->GetFPID() ); switch( guess ) @@ -659,9 +322,6 @@ bool CVPCB_MAINFRAME::ReadNetListAndLinkFiles() } -#endif - - int CVPCB_MAINFRAME::SaveCmpLinkFile( const wxString& aFullFileName ) { wxFileName fn; @@ -685,7 +345,7 @@ int CVPCB_MAINFRAME::SaveCmpLinkFile( const wxString& aFullFileName ) fn.SetExt( ComponentFileExtension ); // Save the project specific footprint library table. - if( !FootprintLibs()->IsEmpty( false ) ) + if( !Prj().PcbFootprintLibs()->IsEmpty( false ) ) { wxString fp_lib_tbl = Prj().FootprintLibTblName(); @@ -695,7 +355,7 @@ int CVPCB_MAINFRAME::SaveCmpLinkFile( const wxString& aFullFileName ) { try { - FootprintLibs()->Save( fp_lib_tbl ); + Prj().PcbFootprintLibs()->Save( fp_lib_tbl ); } catch( const IO_ERROR& ioe ) { diff --git a/include/fp_lib_table.h b/include/fp_lib_table.h index 679d437b42..4a2b822137 100644 --- a/include/fp_lib_table.h +++ b/include/fp_lib_table.h @@ -270,6 +270,8 @@ public: */ FP_LIB_TABLE( FP_LIB_TABLE* aFallBackTable = NULL ); + ~FP_LIB_TABLE(); + /// Delete all rows. void Clear() { diff --git a/include/project.h b/include/project.h index a4928f4e5c..c7f7a7f3dd 100644 --- a/include/project.h +++ b/include/project.h @@ -35,7 +35,7 @@ class wxConfigBase; class PARAM_CFG_ARRAY; - +class FP_LIB_TABLE; #define VTBL_ENTRY virtual @@ -49,11 +49,12 @@ class PROJECT { public: - /// Derive PROJECT elements from this, it has a virtual destructor, and - /// Elem*() functions can work with it. Implementation is opaque in - /// class PROJECT. If find you have to include derived class headers in this - /// file, you are doing something wrong. Keep knowledge of derived classes - /// opaque to class PROJECT please. + /// A PROJECT can hold stuff it knows nothing about, in the form of + /// _ELEM derivatives. Derive PROJECT elements from this, it has a virtual + /// destructor, and Elem*() functions can work with it. Implementation is + /// opaque in class PROJECT. If find you have to include derived class headers + /// in this file, you are doing incompatible with the goal of this class. + /// Keep knowledge of derived classes opaque to class PROJECT please. class _ELEM { public: @@ -63,6 +64,8 @@ public: PROJECT(); ~PROJECT(); + //--------------------------------------------------------- + // VTBL_ENTRY bool MaybeLoadProjectSettings( const std::vector& aFileSet ); /** @@ -154,18 +157,12 @@ public: */ enum ELEM_T { - FPTBL, + ELEM_FPTBL, ELEM_COUNT }; /** - * A PROJECT can hold stuff it knows nothing about, in the form of - * _ELEM derivatives. This function gives access to a PROJECT::_ELEM using - * enum ELEM_T as an index. - *

- * Acts as setter iff aElem is not NULL, else getter. - *

* Typically wrapped somewhere else in a more meaningful function wrapper. * This is a cross module API, therefore the _ELEM destructor is virtual and * can point to a destructor function in another link image. Be careful that @@ -174,7 +171,47 @@ public: * Summary: 1) cross module API, 2) PROJECT knows nothing about _ELEM objects, * except how to delete them and set and get pointers to them. */ - VTBL_ENTRY _ELEM* Elem( ELEM_T aIndex, _ELEM* aElem = NULL ); + VTBL_ENTRY _ELEM* GetElem( ELEM_T aIndex ); + VTBL_ENTRY void SetElem( ELEM_T aIndex, _ELEM* aElem ); + + /// Inline, clear the _ELEM at position aIndex + void ElemClear( ELEM_T aIndex ) + { + _ELEM* existing = GetElem( aIndex ); + delete existing; // virtual + SetElem( aIndex, NULL ); + } + + /** + * Function ElemsClear + * deletes all the _ELEMs and set their pointers to NULL. + */ + VTBL_ENTRY void ElemsClear(); + + //-------------------------------------------------------- + + //----------------------------------------------------- + + // These are the non-virtual DATA LOAD ON DEMAND members. They load project related + // data on demand, and do so typicallly into m_elems[] at a particular index using + // SetElem() & GetElem(). That is, they wrap SetElem() and GetElem(). + // To get the data to reload on demand, first SetProjectFullName(), + // then call ElemClear() from client code. + + // non-virtuals resident in PCBNEW link image(s). By being non-virtual, these + // functions can get linked into the KIFACE that needs them, and only there. + // In fact, the other KIFACEs don't even know they exist. +#if defined(PCBNEW) || defined(CVPCB) + // These are all prefaced with "Pcb" + FP_LIB_TABLE* PcbFootprintLibs(); +#endif + + +#if defined(EESCHEMA) + // These are all prefaced with "Sch" +#endif + + //---------------------------------------------------- private: @@ -215,10 +252,6 @@ private: //-------------------------------------------------------------- #if 0 - VTBL_ENTRY int ElemAllocNdx(); - VTBL_ENTRY void ElemSet( int aIndex, ELEMENT_BASE* aBlock ); - VTBL_ENTRY ELEM_BASE* ElemGet( int aIndex ) - /** * Function Value * fetches a project variable @a aVariable and returns true if that variable was diff --git a/include/wxBasePcbFrame.h b/include/wxBasePcbFrame.h index e60a969abb..b518af6f12 100644 --- a/include/wxBasePcbFrame.h +++ b/include/wxBasePcbFrame.h @@ -103,7 +103,7 @@ protected: * * @param aFootprintId is the #FPID of component footprint to load. * @return the #MODULE if found or NULL if \a aFootprintId not found in any of the - * libraries in the table returned from #FootprintLibs(). + * libraries in the table returned from #Prj().PcbFootprintLibs(). * @throw IO_ERROR if an I/O error occurs or a #PARSE_ERROR if a file parsing error * occurs while reading footprint library files. */ @@ -127,7 +127,7 @@ public: * * @param aFootprintId is the #FPID of component footprint to load. * @return the #MODULE if found or NULL if \a aFootprintId not found in any of the - * libraries in table returned from #FootprintLibs(). + * libraries in table returned from #Prj().PcbFootprintLibs(). */ MODULE* LoadFootprint( const FPID& aFootprintId ); @@ -466,12 +466,6 @@ public: */ wxString SelectFootprintFromLibBrowser(); - /** - * Function FootprintLibs - * @return the project #FP_LIB_TABLE. - */ - FP_LIB_TABLE* FootprintLibs() const; - // ratsnest functions /** * Function Compile_Ratsnest diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 2307a5b3c7..af02b79258 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -174,10 +174,15 @@ PCB_BASE_FRAME::~PCB_BASE_FRAME() } -FP_LIB_TABLE* PCB_BASE_FRAME::FootprintLibs() const +FP_LIB_TABLE* PROJECT::PcbFootprintLibs() { - PROJECT& prj = Prj(); - FP_LIB_TABLE* tbl = dynamic_cast( prj.Elem( PROJECT::FPTBL ) ); + // This is a lazy loading function, it loads the project specific table when + // that table is asked for, not before. + + FP_LIB_TABLE* tbl = (FP_LIB_TABLE*) GetElem( ELEM_FPTBL ); + + // its gotta be NULL or a FP_LIB_TABLE, or a bug. + wxASSERT( !tbl || dynamic_cast( tbl ) ); if( !tbl ) { @@ -186,7 +191,18 @@ FP_LIB_TABLE* PCB_BASE_FRAME::FootprintLibs() const // stack this way, all using the same global fallback table. tbl = new FP_LIB_TABLE( &GFootprintTable ); - prj.Elem( PROJECT::FPTBL, tbl ); + SetElem( ELEM_FPTBL, tbl ); + + wxString projectFpLibTableFileName = FootprintLibTblName(); + + try + { + tbl->Load( projectFpLibTableFileName ); + } + catch( const IO_ERROR& ioe ) + { + DisplayError( NULL, ioe.errorText ); + } } return tbl; diff --git a/pcbnew/files.cpp b/pcbnew/files.cpp index ec1da8e310..27262d6f38 100644 --- a/pcbnew/files.cpp +++ b/pcbnew/files.cpp @@ -173,7 +173,7 @@ void PCB_EDIT_FRAME::Files_io( wxCommandEvent& event ) Clear_Pcb( true ); // Clear footprint library table for the new board. - FootprintLibs()->Clear(); + Prj().PcbFootprintLibs()->Clear(); wxFileName fn; @@ -603,7 +603,7 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool aCreateBackupF return false; // Save the project specific footprint library table. - if( !FootprintLibs()->IsEmpty( false ) ) + if( !Prj().PcbFootprintLibs()->IsEmpty( false ) ) { wxString fp_lib_tbl = Prj().FootprintLibTblName(); @@ -613,7 +613,7 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool aCreateBackupF { try { - FootprintLibs()->Save( fp_lib_tbl ); + Prj().PcbFootprintLibs()->Save( fp_lib_tbl ); } catch( const IO_ERROR& ioe ) { diff --git a/pcbnew/librairi.cpp b/pcbnew/librairi.cpp index 487f356e6a..c55cad44b5 100644 --- a/pcbnew/librairi.cpp +++ b/pcbnew/librairi.cpp @@ -469,7 +469,7 @@ bool FOOTPRINT_EDIT_FRAME::DeleteModuleFromCurrentLibrary() { wxString nickname = getLibNickName(); - if( !FootprintLibs()->IsFootprintLibWritable( nickname ) ) + if( !Prj().PcbFootprintLibs()->IsFootprintLibWritable( nickname ) ) { wxString msg = wxString::Format( _( "Library '%s' is read only" ), @@ -481,7 +481,7 @@ bool FOOTPRINT_EDIT_FRAME::DeleteModuleFromCurrentLibrary() } wxString fpid_txt = PCB_BASE_FRAME::SelectFootprint( this, nickname, - wxEmptyString, wxEmptyString, FootprintLibs() ); + wxEmptyString, wxEmptyString, Prj().PcbFootprintLibs() ); if( !fpid_txt ) return false; @@ -497,7 +497,7 @@ bool FOOTPRINT_EDIT_FRAME::DeleteModuleFromCurrentLibrary() try { - FootprintLibs()->FootprintDelete( nickname, fpname ); + Prj().PcbFootprintLibs()->FootprintDelete( nickname, fpname ); } catch( const IO_ERROR& ioe ) { @@ -545,22 +545,24 @@ void PCB_EDIT_FRAME::ArchiveModulesOnBoard( bool aNewModulesOnly ) try { + FP_LIB_TABLE* tbl = Prj().PcbFootprintLibs(); + // Delete old library if we're replacing it entirely. if( !aNewModulesOnly ) { - FootprintLibs()->FootprintLibDelete( nickname ); - FootprintLibs()->FootprintLibCreate( nickname ); + tbl->FootprintLibDelete( nickname ); + tbl->FootprintLibCreate( nickname ); for( MODULE* m = GetBoard()->m_Modules; m; m = m->Next() ) { - FootprintLibs()->FootprintSave( nickname, m, true ); + tbl->FootprintSave( nickname, m, true ); } } else { for( MODULE* m = GetBoard()->m_Modules; m; m = m->Next() ) { - FootprintLibs()->FootprintSave( nickname, m, false ); + tbl->FootprintSave( nickname, m, false ); // Check for request to stop backup (ESCAPE key actuated) if( m_canvas->GetAbortRequest() ) @@ -627,7 +629,9 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibrary, try { - MODULE* m = FootprintLibs()->FootprintLoad( aLibrary, footprintName ); + FP_LIB_TABLE* tbl = Prj().PcbFootprintLibs(); + + MODULE* m = tbl->FootprintLoad( aLibrary, footprintName ); if( m ) { @@ -653,7 +657,7 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibrary, // this always overwrites any existing footprint, but should yell on its // own if the library or footprint is not writable. - FootprintLibs()->FootprintSave( aLibrary, aModule ); + tbl->FootprintSave( aLibrary, aModule ); } catch( const IO_ERROR& ioe ) { @@ -738,7 +742,7 @@ wxString PCB_BASE_FRAME::SelectLibrary( const wxString& aNicknameExisting ) headers.Add( _( "Nickname" ) ); headers.Add( _( "Description" ) ); - FP_LIB_TABLE* fptbl = FootprintLibs(); + FP_LIB_TABLE* fptbl = Prj().PcbFootprintLibs(); std::vector< wxArrayString > itemsToDisplay; std::vector< wxString > nicknames = fptbl->GetLogicalLibs(); diff --git a/pcbnew/loadcmp.cpp b/pcbnew/loadcmp.cpp index dda500664f..cd3f85d00d 100644 --- a/pcbnew/loadcmp.cpp +++ b/pcbnew/loadcmp.cpp @@ -315,7 +315,7 @@ MODULE* PCB_BASE_FRAME::LoadFootprint( const FPID& aFootprintId ) MODULE* PCB_BASE_FRAME::loadFootprint( const FPID& aFootprintId ) throw( IO_ERROR, PARSE_ERROR ) { - FP_LIB_TABLE* fptbl = FootprintLibs(); + FP_LIB_TABLE* fptbl = Prj().PcbFootprintLibs(); wxCHECK_MSG( fptbl, NULL, wxT( "Cannot look up FPID in NULL FP_LIB_TABLE." ) ); diff --git a/pcbnew/modedit.cpp b/pcbnew/modedit.cpp index 26e6ca7fde..81b74eebe7 100644 --- a/pcbnew/modedit.cpp +++ b/pcbnew/modedit.cpp @@ -491,7 +491,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) Clear_Pcb( true ); SetCrossHairPosition( wxPoint( 0, 0 ) ); - LoadModuleFromLibrary( getLibNickName(), FootprintLibs(), true ); + LoadModuleFromLibrary( getLibNickName(), Prj().PcbFootprintLibs(), true ); redraw = true; if( GetBoard()->m_Modules ) diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index cc83322f50..4ef660f343 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -274,7 +274,7 @@ wxString FOOTPRINT_EDIT_FRAME::getLibPath() { const wxString& nickname = getLibNickName(); - const FP_LIB_TABLE::ROW* row = FootprintLibs()->FindRow( nickname ); + const FP_LIB_TABLE::ROW* row = Prj().PcbFootprintLibs()->FindRow( nickname ); return row->GetFullURI( true ); } @@ -481,7 +481,7 @@ void FOOTPRINT_EDIT_FRAME::OnUpdateReplaceModuleInBoard( wxUpdateUIEvent& aEvent void FOOTPRINT_EDIT_FRAME::OnUpdateSelectCurrentLib( wxUpdateUIEvent& aEvent ) { - FP_LIB_TABLE* fptbl = FootprintLibs(); + FP_LIB_TABLE* fptbl = Prj().PcbFootprintLibs(); aEvent.Enable( fptbl && !fptbl->IsEmpty() ); } @@ -621,7 +621,7 @@ void FOOTPRINT_EDIT_FRAME::updateTitle() { try { - bool writable = FootprintLibs()->IsFootprintLibWritable( nickname ); + bool writable = Prj().PcbFootprintLibs()->IsFootprintLibWritable( nickname ); // no exception was thrown, this means libPath is valid, but it may be read only. title = _( "Module Editor (active library: " ) + nickname + wxT( ")" ); diff --git a/pcbnew/modview_frame.cpp b/pcbnew/modview_frame.cpp index 1bcbd5fcd5..dc24cf3208 100644 --- a/pcbnew/modview_frame.cpp +++ b/pcbnew/modview_frame.cpp @@ -309,7 +309,7 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList() { m_libList->Clear(); - std::vector< wxString > nicknames = FootprintLibs()->GetLogicalLibs(); + std::vector< wxString > nicknames = Prj().PcbFootprintLibs()->GetLogicalLibs(); for( unsigned ii = 0; ii < nicknames.size(); ii++ ) m_libList->Append( nicknames[ii] ); @@ -348,7 +348,7 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList() FOOTPRINT_LIST fp_info_list; - fp_info_list.ReadFootprintFiles( FootprintLibs(), &m_libraryName ); + fp_info_list.ReadFootprintFiles( Prj().PcbFootprintLibs(), &m_libraryName ); if( fp_info_list.GetErrorCount() ) { @@ -509,7 +509,7 @@ void FOOTPRINT_VIEWER_FRAME::OnActivate( wxActivateEvent& event ) m_selectedFootprintName.Empty(); // Ensure we have the right library list: - std::vector< wxString > libNicknames = FootprintLibs()->GetLogicalLibs(); + std::vector< wxString > libNicknames = Prj().PcbFootprintLibs()->GetLogicalLibs(); if( libNicknames.size() == m_libList->GetCount() ) { @@ -742,13 +742,16 @@ void FOOTPRINT_VIEWER_FRAME::SelectCurrentLibrary( wxCommandEvent& event ) void FOOTPRINT_VIEWER_FRAME::SelectCurrentFootprint( wxCommandEvent& event ) { +#if 0 // cannot remember why this is here // The PCB_EDIT_FRAME may not be the FOOTPRINT_VIEW_FRAME's parent, // so use Kiway().Player() to fetch. PCB_EDIT_FRAME* parent = (PCB_EDIT_FRAME*) Kiway().Player( FRAME_PCB, true ); + (void*) parent; +#endif wxString libname = m_libraryName + wxT( "." ) + LegacyFootprintLibPathExtension; MODULE* oldmodule = GetBoard()->m_Modules; - MODULE* module = LoadModuleFromLibrary( libname, parent->FootprintLibs(), false ); + MODULE* module = LoadModuleFromLibrary( libname, Prj().PcbFootprintLibs(), false ); if( module ) { @@ -808,7 +811,7 @@ void FOOTPRINT_VIEWER_FRAME::SelectAndViewFootprint( int aMode ) // Delete the current footprint GetBoard()->m_Modules.DeleteAll(); - MODULE* footprint = FootprintLibs()->FootprintLoad( m_libraryName, m_footprintName ); + MODULE* footprint = Prj().PcbFootprintLibs()->FootprintLoad( m_libraryName, m_footprintName ); if( footprint ) GetBoard()->Add( footprint, ADD_APPEND ); diff --git a/pcbnew/netlist.cpp b/pcbnew/netlist.cpp index 8bf18cab7b..af65d26faf 100644 --- a/pcbnew/netlist.cpp +++ b/pcbnew/netlist.cpp @@ -172,7 +172,7 @@ void PCB_EDIT_FRAME::loadFootprints( NETLIST& aNetlist, REPORTER* aReporter ) MODULE* module = 0; MODULE* fpOnBoard; - if( aNetlist.IsEmpty() || FootprintLibs()->IsEmpty() ) + if( aNetlist.IsEmpty() || Prj().PcbFootprintLibs()->IsEmpty() ) return; aNetlist.SortByFPID(); diff --git a/pcbnew/onleftclick.cpp b/pcbnew/onleftclick.cpp index 78390e52ba..a86324ce5e 100644 --- a/pcbnew/onleftclick.cpp +++ b/pcbnew/onleftclick.cpp @@ -37,6 +37,7 @@ #include #include #include +#include #include #include @@ -355,7 +356,7 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition ) { m_canvas->MoveCursorToCrossHair(); DrawStruct = (BOARD_ITEM*) LoadModuleFromLibrary( - wxEmptyString, FootprintLibs(), true, aDC ); + wxEmptyString, Prj().PcbFootprintLibs(), true, aDC ); SetCurItem( DrawStruct ); diff --git a/pcbnew/pcbnew_config.cpp b/pcbnew/pcbnew_config.cpp index df8df9fcc3..00452262ce 100644 --- a/pcbnew/pcbnew_config.cpp +++ b/pcbnew/pcbnew_config.cpp @@ -96,7 +96,7 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event ) case ID_PCB_LIB_TABLE_EDIT: { bool tableChanged = false; - int r = InvokePcbLibTableEditor( this, &GFootprintTable, FootprintLibs() ); + int r = InvokePcbLibTableEditor( this, &GFootprintTable, Prj().PcbFootprintLibs() ); if( r & 1 ) { @@ -126,7 +126,7 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event ) try { - FootprintLibs()->Save( tblName ); + Prj().PcbFootprintLibs()->Save( tblName ); tableChanged = true; } catch( const IO_ERROR& ioe ) @@ -259,18 +259,7 @@ bool PCB_EDIT_FRAME::LoadProjectSettings( const wxString& aProjectFileName ) SetElementVisibility( RATSNEST_VISIBLE, showRats ); #endif - wxString projectFpLibTableFileName = Prj().FootprintLibTblName(); - - FootprintLibs()->Clear(); - - try - { - FootprintLibs()->Load( projectFpLibTableFileName ); - } - catch( const IO_ERROR& ioe ) - { - DisplayError( this, ioe.errorText ); - } + Prj().ElemClear( PROJECT::ELEM_FPTBL ); // Force it to be reloaded on demand. // Load the page layout decr file, from the filename stored in // BASE_SCREEN::m_PageLayoutDescrFileName, read in config project file diff --git a/pcbnew/xchgmod.cpp b/pcbnew/xchgmod.cpp index 9f3c31f404..7fafc6a914 100644 --- a/pcbnew/xchgmod.cpp +++ b/pcbnew/xchgmod.cpp @@ -38,6 +38,7 @@ #include #include +#include #include #include @@ -492,7 +493,7 @@ void DIALOG_EXCHANGE_MODULE::BrowseAndSelectFootprint( wxCommandEvent& event ) wxString newname; newname = m_parent->SelectFootprint( m_parent, wxEmptyString, wxEmptyString, wxEmptyString, - m_parent->FootprintLibs() ); + Prj().PcbFootprintLibs() ); if( newname != wxEmptyString ) m_NewModule->SetValue( newname ); diff --git a/scripts/kicad-install.sh b/scripts/kicad-install.sh index e1826fc55a..7ddd906881 100755 --- a/scripts/kicad-install.sh +++ b/scripts/kicad-install.sh @@ -38,7 +38,7 @@ STABLE=tag:pre-kiway # currently the best mix of features and stabilty TESTING=last:1 # the most recent -# Set this to STABLE or TESTING or other know revision number: +# Set this to STABLE or TESTING or other known revision number: REVISION=$STABLE # For info on revision syntax: From f9ba502b72c8e58ac5a4301a5c9bffd08484f8c1 Mon Sep 17 00:00:00 2001 From: Lorenzo Marcantonio Date: Sat, 10 May 2014 14:48:17 +0200 Subject: [PATCH 374/741] More refactoring of the track cleanup code Algorithm is still the same... now need to know what it really meant to do --- pcbnew/clean.cpp | 422 +++++++++++++++++++++++++++-------------------- 1 file changed, 240 insertions(+), 182 deletions(-) diff --git a/pcbnew/clean.cpp b/pcbnew/clean.cpp index 12ca312064..6c50bd1808 100644 --- a/pcbnew/clean.cpp +++ b/pcbnew/clean.cpp @@ -25,7 +25,7 @@ /** * @file clean.cpp - * @brief functions to clean tracks: remove null lenght and redundant segments + * @brief functions to clean tracks: remove null length and redundant segments */ @@ -43,7 +43,7 @@ class TRACKS_CLEANER: CONNECTIONS { private: - BOARD * m_Brd; + BOARD *m_Brd; public: TRACKS_CLEANER( BOARD * aPcb ); @@ -52,8 +52,8 @@ public: * the cleanup function. * return true if some item was modified */ - bool CleanupBoard(PCB_EDIT_FRAME *aFrame, bool aCleanVias, - bool aMergeSegments, bool aDeleteUnconnected); + bool CleanupBoard( PCB_EDIT_FRAME *aFrame, bool aCleanVias, + bool aMergeSegments, bool aDeleteUnconnected); private: @@ -63,13 +63,30 @@ private: */ bool clean_vias(); + /** + * Removes all the following THT vias on the same position of the + * specified one + */ + bool remove_duplicates_of_via( const VIA *aVia ); + + /** + * Removes all the following duplicates tracks of the specified one + */ + bool remove_duplicates_of_track( const TRACK *aTrack ); + /** * Removes dangling tracks */ bool deleteUnconnectedTracks(); + /// Delete null length track segments + bool delete_null_segments(); + + /// Try to merge the segment to a following collinear one + bool merge_collinear_of_track( TRACK *aSegment ); + /** - * Merge colinear segments and remove null len segments + * Merge collinear segments and remove duplicated and null len segments */ bool clean_segments(); @@ -193,6 +210,28 @@ void TRACKS_CLEANER::buildTrackConnectionInfo() } } +bool TRACKS_CLEANER::remove_duplicates_of_via( const VIA *aVia ) +{ + bool modified = false; + + // Search and delete others vias at same location + VIA* next_via; + for( VIA* alt_via = GetFirstVia( aVia->Next() ); alt_via != NULL; + alt_via = next_via ) + { + next_via = GetFirstVia( alt_via->Next() ); + + if( (alt_via->GetViaType() == VIA_THROUGH) && + (alt_via->GetStart() == aVia->GetStart()) ) + { + // delete via + alt_via->DeleteStructure(); + modified = true; + } + } + return modified; +} + bool TRACKS_CLEANER::clean_vias() { bool modified = false; @@ -211,21 +250,7 @@ bool TRACKS_CLEANER::clean_vias() * (yet) handle high density interconnects */ if( via->GetViaType() != VIA_THROUGH ) { - // Search and delete others vias at same location - VIA* next_via; - for( VIA* alt_via = GetFirstVia( via->Next() ); alt_via != NULL; - alt_via = next_via ) - { - next_via = GetFirstVia( alt_via->Next() ); - - if( (alt_via->GetViaType() == VIA_THROUGH) && - (alt_via->GetStart() == via->GetStart()) ) - { - // delete via - alt_via->DeleteStructure(); - modified = true; - } - } + modified |= remove_duplicates_of_via( via ); /* To delete through Via on THT pads at same location * Examine the list of connected pads: @@ -360,16 +385,14 @@ bool TRACKS_CLEANER::deleteUnconnectedTracks() return modified; } - -// Delete null length segments, and intermediate points .. -bool TRACKS_CLEANER::clean_segments() +// Delete null length track segments +bool TRACKS_CLEANER::delete_null_segments() { + TRACK *nextsegment; bool modified = false; - TRACK* segment, * nextsegment; - TRACK* other; // Delete null segments - for( segment = m_Brd->m_Track; segment; segment = nextsegment ) + for( TRACK *segment = m_Brd->m_Track; segment; segment = nextsegment ) { nextsegment = segment->Next(); @@ -379,145 +402,211 @@ bool TRACKS_CLEANER::clean_segments() modified = true; } } + return modified; +} - // Delete redundant segments, i.e. segments having the same end points - // and layers - for( segment = m_Brd->m_Track; segment; segment = segment->Next() ) +bool TRACKS_CLEANER::remove_duplicates_of_track( const TRACK *aTrack ) +{ + bool modified = false; + + TRACK *nextsegment; + for( TRACK *other = aTrack->Next(); other; other = nextsegment ) { - for( other = segment->Next(); other; other = nextsegment ) + nextsegment = other->Next(); + + // New netcode, break out (can't be there any other) + if( aTrack->GetNetCode() != other->GetNetCode() ) + break; + + // Must be of the same type, on the same layer and the endpoints + // must be the same (maybe swapped) + if( (aTrack->Type() != other->Type()) && + (aTrack->GetLayer() != other->GetLayer()) ) { - nextsegment = other->Next(); - bool erase = false; - - if( segment->Type() != other->Type() ) - continue; - - if( segment->GetLayer() != other->GetLayer() ) - continue; - - if( segment->GetNetCode() != other->GetNetCode() ) - break; - - if( ( segment->GetStart() == other->GetStart() ) && - ( segment->GetEnd() == other->GetEnd() ) ) - erase = true; - - if( ( segment->GetStart() == other->GetEnd() ) && - ( segment->GetEnd() == other->GetStart() ) ) - erase = true; - - // Delete redundant point - if( erase ) + if( ((aTrack->GetStart() == other->GetStart()) && + (aTrack->GetEnd() == other->GetEnd())) || + ((aTrack->GetStart() == other->GetEnd()) && + (aTrack->GetEnd() == other->GetStart()))) { other->DeleteStructure(); modified = true; } } } + return modified; +} - // merge collinear segments: - for( segment = m_Brd->m_Track; segment; segment = nextsegment ) +bool TRACKS_CLEANER::merge_collinear_of_track( TRACK *aSegment ) +{ + bool merged_this = false; + bool flag = false; // If there are connections to this on the endpoint + + // search for a possible point connected to the START point of the current segment + TRACK *segStart = aSegment->Next(); + while( true ) { - TRACK* segStart; - TRACK* segEnd; - TRACK* segDelete; + segStart = aSegment->GetTrack( segStart, NULL, ENDPOINT_START ); - nextsegment = segment->Next(); - - if( segment->Type() != PCB_TRACE_T ) - continue; - - unsigned flag = 0; - bool no_inc = false; - - // search for a possible point connected to the START point of the current segment - for( segStart = segment->Next(); ; ) + if( segStart ) { - segStart = segment->GetTrack( segStart, NULL, ENDPOINT_START ); - - if( segStart ) - { - // the two segments must have the same width - if( segment->GetWidth() != segStart->GetWidth() ) - break; - - // it cannot be a via - if( segStart->Type() != PCB_TRACE_T ) - break; - - // We must have only one segment connected - segStart->SetState( BUSY, true ); - other = segment->GetTrack( m_Brd->m_Track, NULL, ENDPOINT_START ); - segStart->SetState( BUSY, false ); - - if( other == NULL ) - flag = 1; // OK - + // the two segments must have the same width + if( aSegment->GetWidth() != segStart->GetWidth() ) break; - } + + // it cannot be a via + if( segStart->Type() != PCB_TRACE_T ) + break; + + // We must have only one segment connected + segStart->SetState( BUSY, true ); + TRACK *other = aSegment->GetTrack( m_Brd->m_Track, NULL, ENDPOINT_START ); + segStart->SetState( BUSY, false ); + + if( other == NULL ) + flag = true; // OK + break; } + break; + } - if( flag ) // We have the starting point of the segment is connected to an other segment + if( flag ) // We have the starting point of the segment is connected to an other segment + { + TRACK *segDelete = mergeCollinearSegmentIfPossible( aSegment, segStart, ENDPOINT_START ); + + if( segDelete ) { - segDelete = mergeCollinearSegmentIfPossible( segment, segStart, ENDPOINT_START ); - - if( segDelete ) - { - no_inc = 1; - segDelete->DeleteStructure(); - modified = true; - } + segDelete->DeleteStructure(); + merged_this = true; } + } - // search for a possible point connected to the END point of the current segment: - for( segEnd = segment->Next(); ; ) + // Do the same with the other endpoint + flag = false; + + // search for a possible point connected to the END point of the current segment: + TRACK *segEnd = aSegment->Next(); + while( true ) + { + segEnd = aSegment->GetTrack( segEnd, NULL, ENDPOINT_END ); + + if( segEnd ) { - segEnd = segment->GetTrack( segEnd, NULL, ENDPOINT_END ); - - if( segEnd ) - { - if( segment->GetWidth() != segEnd->GetWidth() ) - break; - - if( segEnd->Type() != PCB_TRACE_T ) - break; - - // We must have only one segment connected - segEnd->SetState( BUSY, true ); - other = segment->GetTrack( m_Brd->m_Track, NULL, ENDPOINT_END ); - segEnd->SetState( BUSY, false ); - - if( other == NULL ) - flag |= 2; // Ok - + if( aSegment->GetWidth() != segEnd->GetWidth() ) break; - } - else - { + + if( segEnd->Type() != PCB_TRACE_T ) break; - } - } - if( flag & 2 ) // We have the ending point of the segment is connected to an other segment + // We must have only one segment connected + segEnd->SetState( BUSY, true ); + TRACK *other = aSegment->GetTrack( m_Brd->m_Track, NULL, ENDPOINT_END ); + segEnd->SetState( BUSY, false ); + + if( other == NULL ) + flag = true; // Ok + + break; + } + else { - segDelete = mergeCollinearSegmentIfPossible( segment, segEnd, ENDPOINT_END ); - - if( segDelete ) - { - no_inc = true; - segDelete->DeleteStructure(); - modified = true; - } + break; } + } - if( no_inc ) // The current segment was modified, retry to merge it - nextsegment = segment->Next(); + if( flag ) // We have the ending point of the segment is connected to an other segment + { + TRACK *segDelete = mergeCollinearSegmentIfPossible( aSegment, segEnd, ENDPOINT_END ); + + if( segDelete ) + { + segDelete->DeleteStructure(); + merged_this = true; + } + } + return merged_this; +} + +// Delete null length segments, and intermediate points .. +bool TRACKS_CLEANER::clean_segments() +{ + bool modified = false; + + // Easy things first + modified |= delete_null_segments(); + + // Delete redundant segments, i.e. segments having the same end points + // and layers + for( TRACK *segment = m_Brd->m_Track; segment; segment = segment->Next() ) + { + modified |= remove_duplicates_of_track( segment ); + } + + // merge collinear segments: + TRACK *nextsegment; + for( TRACK *segment = m_Brd->m_Track; segment; segment = nextsegment ) + { + nextsegment = segment->Next(); + + if( segment->Type() == PCB_TRACE_T ) + { + bool merged_this = merge_collinear_of_track( segment ); + modified |= merged_this; + + if( merged_this ) // The current segment was modified, retry to merge it + nextsegment = segment->Next(); + } } return modified; } +/* Utility: check for parallelism between two segments */ +static bool parallelism_test( int dx1, int dy1, int dx2, int dy2 ) +{ + // The following condition tree is ugly and repetitive, but I have + // not a better way to express clearly the trivial cases. Hope the + // compiler optimize it better than always doing the product + // below... + + // test for vertical alignment (easy to handle) + if( dx1 == 0 ) + { + if( dx2 != 0 ) + return false; + else + return true; + } + + if( dx2 == 0 ) + { + if( dx1 != 0 ) + return false; + else + return true; + } + + // test for horizontal alignment (easy to handle) + if( dy1 == 0 ) + { + if( dy2 != 0 ) + return false; + else + return true; + } + + if( dy2 == 0 ) + { + if( dy1 != 0 ) + return false; + else + return true; + } + + /* test for alignment in other cases: Do the usual cross product test + * (the same as testing the slope, but without a division) */ + return ((double)dy1 * dx2 == (double)dx1 * dy2); +} /** Function used by clean_segments. * Test if aTrackRef and aCandidate (which must have a common end) are collinear. @@ -534,63 +623,32 @@ bool TRACKS_CLEANER::clean_segments() TRACK* TRACKS_CLEANER::mergeCollinearSegmentIfPossible( TRACK* aTrackRef, TRACK* aCandidate, ENDPOINT_T aEndType ) { - if( aTrackRef->GetWidth() != aCandidate->GetWidth() ) + // First of all, they must be of the same width and must be both actual tracks + if( (aTrackRef->GetWidth() != aCandidate->GetWidth()) || + (aTrackRef->Type() != PCB_TRACE_T) || + (aCandidate->Type() != PCB_TRACE_T) ) return NULL; - bool is_colinear = false; + // Trivial case: exactly the same track + if( ( aTrackRef->GetStart() == aCandidate->GetStart() ) && + ( aTrackRef->GetEnd() == aCandidate->GetEnd() ) ) + return aCandidate; - // Trivial case: superimposed tracks ( tracks, not vias ): - if( aTrackRef->Type() == PCB_TRACE_T && aCandidate->Type() == PCB_TRACE_T ) - { - if( ( aTrackRef->GetStart() == aCandidate->GetStart() ) && - ( aTrackRef->GetEnd() == aCandidate->GetEnd() ) ) - return aCandidate; + if( ( aTrackRef->GetStart() == aCandidate->GetEnd() ) && + ( aTrackRef->GetEnd() == aCandidate->GetStart() ) ) + return aCandidate; - if( ( aTrackRef->GetStart() == aCandidate->GetEnd() ) && - ( aTrackRef->GetEnd() == aCandidate->GetStart() ) ) - return aCandidate; - } - - int refdx = aTrackRef->GetEnd().x - aTrackRef->GetStart().x; - int refdy = aTrackRef->GetEnd().y - aTrackRef->GetStart().y; - - int segmdx = aCandidate->GetEnd().x - aCandidate->GetStart().x; - int segmdy = aCandidate->GetEnd().y - aCandidate->GetStart().y; - - // test for vertical alignment (easy to handle) - if( refdx == 0 ) - { - if( segmdx != 0 ) - return NULL; - else - is_colinear = true; - } - - // test for horizontal alignment (easy to handle) - if( refdy == 0 ) - { - if( segmdy != 0 ) - return NULL; - else - is_colinear = true; - } - - /* test if alignment in other cases - * We must have refdy/refdx == segmdy/segmdx, (i.e. same slope) - * or refdy * segmdx == segmdy * refdx - */ - if( is_colinear == false ) - { - if( ( double)refdy * segmdx != (double)refdx * segmdy ) - return NULL; - - is_colinear = true; - } + // Weed out non-parallel tracks + if ( !parallelism_test( aTrackRef->GetEnd().x - aTrackRef->GetStart().x, + aTrackRef->GetEnd().y - aTrackRef->GetStart().y, + aCandidate->GetEnd().x - aCandidate->GetStart().x, + aCandidate->GetEnd().y - aCandidate->GetStart().y ) ) + return NULL; /* Here we have 2 aligned segments: * We must change the pt_ref common point only if not on a pad * (this function) is called when there is only 2 connected segments, - *and if this point is not on a pad, it can be removed and the 2 segments will be merged + * and if this point is not on a pad, it can be removed and the 2 segments will be merged */ if( aEndType == ENDPOINT_START ) { From 7dc8fc1f29a5c953bb78ec22ea33a722cbedfed0 Mon Sep 17 00:00:00 2001 From: Lorenzo Marcantonio Date: Sat, 10 May 2014 14:48:17 +0200 Subject: [PATCH 375/741] More refactoring of the track cleanup code Algorithm is still the same... now need to know what it really meant to do --- pcbnew/clean.cpp | 422 +++++++++++++++++++++++++++-------------------- 1 file changed, 240 insertions(+), 182 deletions(-) diff --git a/pcbnew/clean.cpp b/pcbnew/clean.cpp index 12ca312064..6c50bd1808 100644 --- a/pcbnew/clean.cpp +++ b/pcbnew/clean.cpp @@ -25,7 +25,7 @@ /** * @file clean.cpp - * @brief functions to clean tracks: remove null lenght and redundant segments + * @brief functions to clean tracks: remove null length and redundant segments */ @@ -43,7 +43,7 @@ class TRACKS_CLEANER: CONNECTIONS { private: - BOARD * m_Brd; + BOARD *m_Brd; public: TRACKS_CLEANER( BOARD * aPcb ); @@ -52,8 +52,8 @@ public: * the cleanup function. * return true if some item was modified */ - bool CleanupBoard(PCB_EDIT_FRAME *aFrame, bool aCleanVias, - bool aMergeSegments, bool aDeleteUnconnected); + bool CleanupBoard( PCB_EDIT_FRAME *aFrame, bool aCleanVias, + bool aMergeSegments, bool aDeleteUnconnected); private: @@ -63,13 +63,30 @@ private: */ bool clean_vias(); + /** + * Removes all the following THT vias on the same position of the + * specified one + */ + bool remove_duplicates_of_via( const VIA *aVia ); + + /** + * Removes all the following duplicates tracks of the specified one + */ + bool remove_duplicates_of_track( const TRACK *aTrack ); + /** * Removes dangling tracks */ bool deleteUnconnectedTracks(); + /// Delete null length track segments + bool delete_null_segments(); + + /// Try to merge the segment to a following collinear one + bool merge_collinear_of_track( TRACK *aSegment ); + /** - * Merge colinear segments and remove null len segments + * Merge collinear segments and remove duplicated and null len segments */ bool clean_segments(); @@ -193,6 +210,28 @@ void TRACKS_CLEANER::buildTrackConnectionInfo() } } +bool TRACKS_CLEANER::remove_duplicates_of_via( const VIA *aVia ) +{ + bool modified = false; + + // Search and delete others vias at same location + VIA* next_via; + for( VIA* alt_via = GetFirstVia( aVia->Next() ); alt_via != NULL; + alt_via = next_via ) + { + next_via = GetFirstVia( alt_via->Next() ); + + if( (alt_via->GetViaType() == VIA_THROUGH) && + (alt_via->GetStart() == aVia->GetStart()) ) + { + // delete via + alt_via->DeleteStructure(); + modified = true; + } + } + return modified; +} + bool TRACKS_CLEANER::clean_vias() { bool modified = false; @@ -211,21 +250,7 @@ bool TRACKS_CLEANER::clean_vias() * (yet) handle high density interconnects */ if( via->GetViaType() != VIA_THROUGH ) { - // Search and delete others vias at same location - VIA* next_via; - for( VIA* alt_via = GetFirstVia( via->Next() ); alt_via != NULL; - alt_via = next_via ) - { - next_via = GetFirstVia( alt_via->Next() ); - - if( (alt_via->GetViaType() == VIA_THROUGH) && - (alt_via->GetStart() == via->GetStart()) ) - { - // delete via - alt_via->DeleteStructure(); - modified = true; - } - } + modified |= remove_duplicates_of_via( via ); /* To delete through Via on THT pads at same location * Examine the list of connected pads: @@ -360,16 +385,14 @@ bool TRACKS_CLEANER::deleteUnconnectedTracks() return modified; } - -// Delete null length segments, and intermediate points .. -bool TRACKS_CLEANER::clean_segments() +// Delete null length track segments +bool TRACKS_CLEANER::delete_null_segments() { + TRACK *nextsegment; bool modified = false; - TRACK* segment, * nextsegment; - TRACK* other; // Delete null segments - for( segment = m_Brd->m_Track; segment; segment = nextsegment ) + for( TRACK *segment = m_Brd->m_Track; segment; segment = nextsegment ) { nextsegment = segment->Next(); @@ -379,145 +402,211 @@ bool TRACKS_CLEANER::clean_segments() modified = true; } } + return modified; +} - // Delete redundant segments, i.e. segments having the same end points - // and layers - for( segment = m_Brd->m_Track; segment; segment = segment->Next() ) +bool TRACKS_CLEANER::remove_duplicates_of_track( const TRACK *aTrack ) +{ + bool modified = false; + + TRACK *nextsegment; + for( TRACK *other = aTrack->Next(); other; other = nextsegment ) { - for( other = segment->Next(); other; other = nextsegment ) + nextsegment = other->Next(); + + // New netcode, break out (can't be there any other) + if( aTrack->GetNetCode() != other->GetNetCode() ) + break; + + // Must be of the same type, on the same layer and the endpoints + // must be the same (maybe swapped) + if( (aTrack->Type() != other->Type()) && + (aTrack->GetLayer() != other->GetLayer()) ) { - nextsegment = other->Next(); - bool erase = false; - - if( segment->Type() != other->Type() ) - continue; - - if( segment->GetLayer() != other->GetLayer() ) - continue; - - if( segment->GetNetCode() != other->GetNetCode() ) - break; - - if( ( segment->GetStart() == other->GetStart() ) && - ( segment->GetEnd() == other->GetEnd() ) ) - erase = true; - - if( ( segment->GetStart() == other->GetEnd() ) && - ( segment->GetEnd() == other->GetStart() ) ) - erase = true; - - // Delete redundant point - if( erase ) + if( ((aTrack->GetStart() == other->GetStart()) && + (aTrack->GetEnd() == other->GetEnd())) || + ((aTrack->GetStart() == other->GetEnd()) && + (aTrack->GetEnd() == other->GetStart()))) { other->DeleteStructure(); modified = true; } } } + return modified; +} - // merge collinear segments: - for( segment = m_Brd->m_Track; segment; segment = nextsegment ) +bool TRACKS_CLEANER::merge_collinear_of_track( TRACK *aSegment ) +{ + bool merged_this = false; + bool flag = false; // If there are connections to this on the endpoint + + // search for a possible point connected to the START point of the current segment + TRACK *segStart = aSegment->Next(); + while( true ) { - TRACK* segStart; - TRACK* segEnd; - TRACK* segDelete; + segStart = aSegment->GetTrack( segStart, NULL, ENDPOINT_START ); - nextsegment = segment->Next(); - - if( segment->Type() != PCB_TRACE_T ) - continue; - - unsigned flag = 0; - bool no_inc = false; - - // search for a possible point connected to the START point of the current segment - for( segStart = segment->Next(); ; ) + if( segStart ) { - segStart = segment->GetTrack( segStart, NULL, ENDPOINT_START ); - - if( segStart ) - { - // the two segments must have the same width - if( segment->GetWidth() != segStart->GetWidth() ) - break; - - // it cannot be a via - if( segStart->Type() != PCB_TRACE_T ) - break; - - // We must have only one segment connected - segStart->SetState( BUSY, true ); - other = segment->GetTrack( m_Brd->m_Track, NULL, ENDPOINT_START ); - segStart->SetState( BUSY, false ); - - if( other == NULL ) - flag = 1; // OK - + // the two segments must have the same width + if( aSegment->GetWidth() != segStart->GetWidth() ) break; - } + + // it cannot be a via + if( segStart->Type() != PCB_TRACE_T ) + break; + + // We must have only one segment connected + segStart->SetState( BUSY, true ); + TRACK *other = aSegment->GetTrack( m_Brd->m_Track, NULL, ENDPOINT_START ); + segStart->SetState( BUSY, false ); + + if( other == NULL ) + flag = true; // OK + break; } + break; + } - if( flag ) // We have the starting point of the segment is connected to an other segment + if( flag ) // We have the starting point of the segment is connected to an other segment + { + TRACK *segDelete = mergeCollinearSegmentIfPossible( aSegment, segStart, ENDPOINT_START ); + + if( segDelete ) { - segDelete = mergeCollinearSegmentIfPossible( segment, segStart, ENDPOINT_START ); - - if( segDelete ) - { - no_inc = 1; - segDelete->DeleteStructure(); - modified = true; - } + segDelete->DeleteStructure(); + merged_this = true; } + } - // search for a possible point connected to the END point of the current segment: - for( segEnd = segment->Next(); ; ) + // Do the same with the other endpoint + flag = false; + + // search for a possible point connected to the END point of the current segment: + TRACK *segEnd = aSegment->Next(); + while( true ) + { + segEnd = aSegment->GetTrack( segEnd, NULL, ENDPOINT_END ); + + if( segEnd ) { - segEnd = segment->GetTrack( segEnd, NULL, ENDPOINT_END ); - - if( segEnd ) - { - if( segment->GetWidth() != segEnd->GetWidth() ) - break; - - if( segEnd->Type() != PCB_TRACE_T ) - break; - - // We must have only one segment connected - segEnd->SetState( BUSY, true ); - other = segment->GetTrack( m_Brd->m_Track, NULL, ENDPOINT_END ); - segEnd->SetState( BUSY, false ); - - if( other == NULL ) - flag |= 2; // Ok - + if( aSegment->GetWidth() != segEnd->GetWidth() ) break; - } - else - { + + if( segEnd->Type() != PCB_TRACE_T ) break; - } - } - if( flag & 2 ) // We have the ending point of the segment is connected to an other segment + // We must have only one segment connected + segEnd->SetState( BUSY, true ); + TRACK *other = aSegment->GetTrack( m_Brd->m_Track, NULL, ENDPOINT_END ); + segEnd->SetState( BUSY, false ); + + if( other == NULL ) + flag = true; // Ok + + break; + } + else { - segDelete = mergeCollinearSegmentIfPossible( segment, segEnd, ENDPOINT_END ); - - if( segDelete ) - { - no_inc = true; - segDelete->DeleteStructure(); - modified = true; - } + break; } + } - if( no_inc ) // The current segment was modified, retry to merge it - nextsegment = segment->Next(); + if( flag ) // We have the ending point of the segment is connected to an other segment + { + TRACK *segDelete = mergeCollinearSegmentIfPossible( aSegment, segEnd, ENDPOINT_END ); + + if( segDelete ) + { + segDelete->DeleteStructure(); + merged_this = true; + } + } + return merged_this; +} + +// Delete null length segments, and intermediate points .. +bool TRACKS_CLEANER::clean_segments() +{ + bool modified = false; + + // Easy things first + modified |= delete_null_segments(); + + // Delete redundant segments, i.e. segments having the same end points + // and layers + for( TRACK *segment = m_Brd->m_Track; segment; segment = segment->Next() ) + { + modified |= remove_duplicates_of_track( segment ); + } + + // merge collinear segments: + TRACK *nextsegment; + for( TRACK *segment = m_Brd->m_Track; segment; segment = nextsegment ) + { + nextsegment = segment->Next(); + + if( segment->Type() == PCB_TRACE_T ) + { + bool merged_this = merge_collinear_of_track( segment ); + modified |= merged_this; + + if( merged_this ) // The current segment was modified, retry to merge it + nextsegment = segment->Next(); + } } return modified; } +/* Utility: check for parallelism between two segments */ +static bool parallelism_test( int dx1, int dy1, int dx2, int dy2 ) +{ + // The following condition tree is ugly and repetitive, but I have + // not a better way to express clearly the trivial cases. Hope the + // compiler optimize it better than always doing the product + // below... + + // test for vertical alignment (easy to handle) + if( dx1 == 0 ) + { + if( dx2 != 0 ) + return false; + else + return true; + } + + if( dx2 == 0 ) + { + if( dx1 != 0 ) + return false; + else + return true; + } + + // test for horizontal alignment (easy to handle) + if( dy1 == 0 ) + { + if( dy2 != 0 ) + return false; + else + return true; + } + + if( dy2 == 0 ) + { + if( dy1 != 0 ) + return false; + else + return true; + } + + /* test for alignment in other cases: Do the usual cross product test + * (the same as testing the slope, but without a division) */ + return ((double)dy1 * dx2 == (double)dx1 * dy2); +} /** Function used by clean_segments. * Test if aTrackRef and aCandidate (which must have a common end) are collinear. @@ -534,63 +623,32 @@ bool TRACKS_CLEANER::clean_segments() TRACK* TRACKS_CLEANER::mergeCollinearSegmentIfPossible( TRACK* aTrackRef, TRACK* aCandidate, ENDPOINT_T aEndType ) { - if( aTrackRef->GetWidth() != aCandidate->GetWidth() ) + // First of all, they must be of the same width and must be both actual tracks + if( (aTrackRef->GetWidth() != aCandidate->GetWidth()) || + (aTrackRef->Type() != PCB_TRACE_T) || + (aCandidate->Type() != PCB_TRACE_T) ) return NULL; - bool is_colinear = false; + // Trivial case: exactly the same track + if( ( aTrackRef->GetStart() == aCandidate->GetStart() ) && + ( aTrackRef->GetEnd() == aCandidate->GetEnd() ) ) + return aCandidate; - // Trivial case: superimposed tracks ( tracks, not vias ): - if( aTrackRef->Type() == PCB_TRACE_T && aCandidate->Type() == PCB_TRACE_T ) - { - if( ( aTrackRef->GetStart() == aCandidate->GetStart() ) && - ( aTrackRef->GetEnd() == aCandidate->GetEnd() ) ) - return aCandidate; + if( ( aTrackRef->GetStart() == aCandidate->GetEnd() ) && + ( aTrackRef->GetEnd() == aCandidate->GetStart() ) ) + return aCandidate; - if( ( aTrackRef->GetStart() == aCandidate->GetEnd() ) && - ( aTrackRef->GetEnd() == aCandidate->GetStart() ) ) - return aCandidate; - } - - int refdx = aTrackRef->GetEnd().x - aTrackRef->GetStart().x; - int refdy = aTrackRef->GetEnd().y - aTrackRef->GetStart().y; - - int segmdx = aCandidate->GetEnd().x - aCandidate->GetStart().x; - int segmdy = aCandidate->GetEnd().y - aCandidate->GetStart().y; - - // test for vertical alignment (easy to handle) - if( refdx == 0 ) - { - if( segmdx != 0 ) - return NULL; - else - is_colinear = true; - } - - // test for horizontal alignment (easy to handle) - if( refdy == 0 ) - { - if( segmdy != 0 ) - return NULL; - else - is_colinear = true; - } - - /* test if alignment in other cases - * We must have refdy/refdx == segmdy/segmdx, (i.e. same slope) - * or refdy * segmdx == segmdy * refdx - */ - if( is_colinear == false ) - { - if( ( double)refdy * segmdx != (double)refdx * segmdy ) - return NULL; - - is_colinear = true; - } + // Weed out non-parallel tracks + if ( !parallelism_test( aTrackRef->GetEnd().x - aTrackRef->GetStart().x, + aTrackRef->GetEnd().y - aTrackRef->GetStart().y, + aCandidate->GetEnd().x - aCandidate->GetStart().x, + aCandidate->GetEnd().y - aCandidate->GetStart().y ) ) + return NULL; /* Here we have 2 aligned segments: * We must change the pt_ref common point only if not on a pad * (this function) is called when there is only 2 connected segments, - *and if this point is not on a pad, it can be removed and the 2 segments will be merged + * and if this point is not on a pad, it can be removed and the 2 segments will be merged */ if( aEndType == ENDPOINT_START ) { From 73a8cd618042c5492711e4e79034654e81cd5e81 Mon Sep 17 00:00:00 2001 From: Lorenzo Marcantonio Date: Mon, 12 May 2014 18:57:46 +0200 Subject: [PATCH 376/741] Added eeschema option for the default pin length --- eeschema/dialogs/dialog_eeschema_options.h | 3 + .../dialogs/dialog_eeschema_options_base.cpp | 23 +- .../dialogs/dialog_eeschema_options_base.fbp | 255 +++++++++++++++++- .../dialogs/dialog_eeschema_options_base.h | 7 +- eeschema/eeschema_config.cpp | 22 +- eeschema/general.h | 8 +- eeschema/lib_pin.cpp | 2 +- eeschema/lib_pin.h | 1 - eeschema/pinedit.cpp | 15 +- 9 files changed, 315 insertions(+), 21 deletions(-) diff --git a/eeschema/dialogs/dialog_eeschema_options.h b/eeschema/dialogs/dialog_eeschema_options.h index 01ce909728..1d49bdd694 100644 --- a/eeschema/dialogs/dialog_eeschema_options.h +++ b/eeschema/dialogs/dialog_eeschema_options.h @@ -58,6 +58,9 @@ public: void SetLineWidth( int aWidth ) { m_spinLineWidth->SetValue( aWidth ); } int GetLineWidth( void ) { return m_spinLineWidth->GetValue(); } + void SetPinLength( int aLength ) { m_spinPinLength->SetValue( aLength ); } + int GetPinLength( void ) { return m_spinPinLength->GetValue(); } + void SetTextSize( int text_size ) { m_spinTextSize->SetValue( text_size ); } int GetTextSize( void ) { return m_spinTextSize->GetValue(); } diff --git a/eeschema/dialogs/dialog_eeschema_options_base.cpp b/eeschema/dialogs/dialog_eeschema_options_base.cpp index 6dbad7738f..a64f18ea81 100644 --- a/eeschema/dialogs/dialog_eeschema_options_base.cpp +++ b/eeschema/dialogs/dialog_eeschema_options_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 8 2012) +// C++ code generated with wxFormBuilder (version Apr 10 2012) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -35,7 +35,7 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx bSizer3 = new wxBoxSizer( wxVERTICAL ); wxFlexGridSizer* fgSizer1; - fgSizer1 = new wxFlexGridSizer( 10, 3, 0, 0 ); + fgSizer1 = new wxFlexGridSizer( 11, 3, 0, 0 ); fgSizer1->AddGrowableCol( 0 ); fgSizer1->AddGrowableCol( 1 ); fgSizer1->AddGrowableCol( 2 ); @@ -89,6 +89,17 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx m_staticLineWidthUnits->Wrap( -1 ); fgSizer1->Add( m_staticLineWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 ); + m_staticText52 = new wxStaticText( m_panel1, wxID_ANY, _("Default pin length:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText52->Wrap( -1 ); + fgSizer1->Add( m_staticText52, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 3 ); + + m_spinPinLength = new wxSpinCtrl( m_panel1, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, 50, 1000, 100 ); + fgSizer1->Add( m_spinPinLength, 0, wxALIGN_CENTER|wxALL|wxEXPAND, 3 ); + + m_staticPinLengthUnits = new wxStaticText( m_panel1, wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticPinLengthUnits->Wrap( -1 ); + fgSizer1->Add( m_staticPinLengthUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 3 ); + m_staticText7 = new wxStaticText( m_panel1, wxID_ANY, _("Default text &size:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText7->Wrap( -1 ); fgSizer1->Add( m_staticText7, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 ); @@ -236,7 +247,6 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx fgSizer2->Add( m_staticText15, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 3 ); m_fieldName1 = new wxTextCtrl( m_panel2, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_fieldName1->SetMaxLength( 0 ); fgSizer2->Add( m_fieldName1, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 ); m_staticText161 = new wxStaticText( m_panel2, wxID_ANY, _("Custom field 2"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -244,7 +254,6 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx fgSizer2->Add( m_staticText161, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 3 ); m_fieldName2 = new wxTextCtrl( m_panel2, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_fieldName2->SetMaxLength( 0 ); fgSizer2->Add( m_fieldName2, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 ); m_staticText17 = new wxStaticText( m_panel2, wxID_ANY, _("Custom field 3"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -252,7 +261,6 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx fgSizer2->Add( m_staticText17, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 3 ); m_fieldName3 = new wxTextCtrl( m_panel2, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_fieldName3->SetMaxLength( 0 ); fgSizer2->Add( m_fieldName3, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 ); m_staticText18 = new wxStaticText( m_panel2, wxID_ANY, _("Custom field 4"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -260,7 +268,6 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx fgSizer2->Add( m_staticText18, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 3 ); m_fieldName4 = new wxTextCtrl( m_panel2, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_fieldName4->SetMaxLength( 0 ); fgSizer2->Add( m_fieldName4, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 ); m_staticText19 = new wxStaticText( m_panel2, wxID_ANY, _("Custom field 5"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -268,7 +275,6 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx fgSizer2->Add( m_staticText19, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 3 ); m_fieldName5 = new wxTextCtrl( m_panel2, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_fieldName5->SetMaxLength( 0 ); fgSizer2->Add( m_fieldName5, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 ); m_staticText20 = new wxStaticText( m_panel2, wxID_ANY, _("Custom field 6"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -276,7 +282,6 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx fgSizer2->Add( m_staticText20, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 3 ); m_fieldName6 = new wxTextCtrl( m_panel2, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_fieldName6->SetMaxLength( 0 ); fgSizer2->Add( m_fieldName6, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 ); m_staticText21 = new wxStaticText( m_panel2, wxID_ANY, _("Custom field 7"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -284,7 +289,6 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx fgSizer2->Add( m_staticText21, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 3 ); m_fieldName7 = new wxTextCtrl( m_panel2, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_fieldName7->SetMaxLength( 0 ); fgSizer2->Add( m_fieldName7, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 ); m_staticText22 = new wxStaticText( m_panel2, wxID_ANY, _("Custom field 8"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -292,7 +296,6 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx fgSizer2->Add( m_staticText22, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 3 ); m_fieldName8 = new wxTextCtrl( m_panel2, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_fieldName8->SetMaxLength( 0 ); fgSizer2->Add( m_fieldName8, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 ); diff --git a/eeschema/dialogs/dialog_eeschema_options_base.fbp b/eeschema/dialogs/dialog_eeschema_options_base.fbp index 921c443c25..b8e18ad1a9 100644 --- a/eeschema/dialogs/dialog_eeschema_options_base.fbp +++ b/eeschema/dialogs/dialog_eeschema_options_base.fbp @@ -288,7 +288,7 @@ fgSizer1 wxFLEX_GROWMODE_SPECIFIED none - 10 + 11 0 3 @@ -1231,6 +1231,259 @@

+ + 3 + wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Default pin length: + + 0 + + + 0 + + 1 + m_staticText52 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + wxALIGN_CENTER|wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + 100 + 1000 + + 0 + + 50 + + 0 + + 1 + m_spinPinLength + 1 + + + protected + 1 + + Resizable + 1 + + wxSP_ARROW_KEYS|wxSP_WRAP + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + mils + + 0 + + + 0 + + 1 + m_staticPinLengthUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + 3 wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT diff --git a/eeschema/dialogs/dialog_eeschema_options_base.h b/eeschema/dialogs/dialog_eeschema_options_base.h index 0b0581e117..4ed5cb762a 100644 --- a/eeschema/dialogs/dialog_eeschema_options_base.h +++ b/eeschema/dialogs/dialog_eeschema_options_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 8 2012) +// C++ code generated with wxFormBuilder (version Apr 10 2012) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -11,8 +11,6 @@ #include #include #include -class DIALOG_SHIM; - #include "dialog_shim.h" #include #include @@ -69,6 +67,9 @@ class DIALOG_EESCHEMA_OPTIONS_BASE : public DIALOG_SHIM wxStaticText* m_staticText5; wxSpinCtrl* m_spinLineWidth; wxStaticText* m_staticLineWidthUnits; + wxStaticText* m_staticText52; + wxSpinCtrl* m_spinPinLength; + wxStaticText* m_staticPinLengthUnits; wxStaticText* m_staticText7; wxSpinCtrl* m_spinTextSize; wxStaticText* m_staticTextSizeUnits; diff --git a/eeschema/eeschema_config.cpp b/eeschema/eeschema_config.cpp index 2a0cccf33b..aca02062da 100644 --- a/eeschema/eeschema_config.cpp +++ b/eeschema/eeschema_config.cpp @@ -84,7 +84,7 @@ int GetDefaultLineThickness() return s_drawDefaultLineThickness; } -void SetDefaultLineThickness( int aThickness) +void SetDefaultLineThickness( int aThickness ) { if( aThickness >=1 ) s_drawDefaultLineThickness = aThickness; @@ -92,6 +92,21 @@ void SetDefaultLineThickness( int aThickness) s_drawDefaultLineThickness = 1; } +/* + * Default pin length + */ +static int s_defaultPinLength; + +int GetDefaultPinLength() +{ + return s_defaultPinLength; +} + +void SetDefaultPinLength( int aLength ) +{ + s_defaultPinLength = aLength; +} + EDA_COLOR_T GetLayerColor( LayerNumber aLayer ) { return s_layerColor[aLayer]; @@ -269,6 +284,7 @@ void SCH_EDIT_FRAME::OnSetOptions( wxCommandEvent& event ) dlg.SetGridSizes( grid_list, GetScreen()->GetGridId() ); dlg.SetBusWidth( GetDefaultBusThickness() ); dlg.SetLineWidth( GetDefaultLineThickness() ); + dlg.SetPinLength( GetDefaultPinLength() ); dlg.SetTextSize( GetDefaultLabelSize() ); dlg.SetRepeatHorizontal( g_RepeatStep.x ); dlg.SetRepeatVertical( g_RepeatStep.y ); @@ -317,6 +333,7 @@ void SCH_EDIT_FRAME::OnSetOptions( wxCommandEvent& event ) SetDefaultBusThickness( dlg.GetBusWidth() ); SetDefaultLineThickness( dlg.GetLineWidth() ); + SetDefaultPinLength( dlg.GetPinLength() ); SetDefaultLabelSize( dlg.GetTextSize() ); g_RepeatStep.x = dlg.GetRepeatHorizontal(); g_RepeatStep.y = dlg.GetRepeatVertical(); @@ -477,6 +494,7 @@ void SCH_EDIT_FRAME::SaveProjectSettings( bool aAskForSave ) static const wxChar DefaultBusWidthEntry[] = wxT( "DefaultBusWidth" ); static const wxChar DefaultDrawLineWidthEntry[] = wxT( "DefaultDrawLineWidth" ); +static const wxChar DefaultPinLengthEntry[] = wxT( "DefaultPinLength" ); static const wxChar ShowHiddenPinsEntry[] = wxT( "ShowHiddenPins" ); static const wxChar HorzVertLinesOnlyEntry[] = wxT( "HorizVertLinesOnly" ); static const wxChar PreviewFramePositionXEntry[] = wxT( "PreviewFramePositionX" ); @@ -602,6 +620,7 @@ void SCH_EDIT_FRAME::LoadSettings( wxConfigBase* aCfg ) SetDefaultBusThickness( aCfg->Read( DefaultBusWidthEntry, 12l ) ); SetDefaultLineThickness( aCfg->Read( DefaultDrawLineWidthEntry, 6l ) ); + SetDefaultPinLength( aCfg->Read( DefaultPinLengthEntry, 300l ) ); aCfg->Read( ShowHiddenPinsEntry, &m_showAllPins, false ); aCfg->Read( HorzVertLinesOnlyEntry, &m_forceHVLines, true ); @@ -691,6 +710,7 @@ void SCH_EDIT_FRAME::SaveSettings( wxConfigBase* aCfg ) aCfg->Write( DefaultBusWidthEntry, (long) GetDefaultBusThickness() ); aCfg->Write( DefaultDrawLineWidthEntry, (long) GetDefaultLineThickness() ); + aCfg->Write( DefaultPinLengthEntry, (long) GetDefaultPinLength() ); aCfg->Write( ShowHiddenPinsEntry, m_showAllPins ); aCfg->Write( HorzVertLinesOnlyEntry, GetForceHVLines() ); diff --git a/eeschema/general.h b/eeschema/general.h index 9c60345d0c..83d50569b3 100644 --- a/eeschema/general.h +++ b/eeschema/general.h @@ -74,7 +74,13 @@ extern SCH_SHEET* g_RootSheet; * default thickness line value (i.e. = 0 ). */ int GetDefaultLineThickness(); -void SetDefaultLineThickness( int aThickness); +void SetDefaultLineThickness( int aThickness ); + +/** + * Default length for new pins in module editor + */ +int GetDefaultPinLength(); +void SetDefaultPinLength( int aLength ); /** * Default line thickness used to draw/plot busses. diff --git a/eeschema/lib_pin.cpp b/eeschema/lib_pin.cpp index 29c4aee929..f980e02984 100644 --- a/eeschema/lib_pin.cpp +++ b/eeschema/lib_pin.cpp @@ -185,7 +185,7 @@ const wxChar* MsgPinElectricType[] = LIB_PIN::LIB_PIN( LIB_COMPONENT* aParent ) : LIB_ITEM( LIB_PIN_T, aParent ) { - m_length = DEFAULT_PIN_LENGTH; // default Pin len + m_length = GetDefaultPinLength(); // default Pin len m_orientation = PIN_RIGHT; // Pin orient: Up, Down, Left, Right m_shape = NONE; // Pin shape, bitwise. m_type = PIN_UNSPECIFIED; // electrical type of pin diff --git a/eeschema/lib_pin.h b/eeschema/lib_pin.h index dd85740de6..a6fb715bfb 100644 --- a/eeschema/lib_pin.h +++ b/eeschema/lib_pin.h @@ -33,7 +33,6 @@ #define TARGET_PIN_RADIUS 12 // Circle diameter drawn at the active end of pins -#define DEFAULT_PIN_LENGTH 300 // Default Length of a pin when it is created. // pins: special symbols sizes #define INVERT_PIN_RADIUS 30 // Radius of inverted pin circle. diff --git a/eeschema/pinedit.cpp b/eeschema/pinedit.cpp index 202a7d691f..287f9c5233 100644 --- a/eeschema/pinedit.cpp +++ b/eeschema/pinedit.cpp @@ -59,13 +59,22 @@ static wxPoint PinPreviousPos; static int LastPinType = PIN_INPUT; static int LastPinOrient = PIN_RIGHT; static int LastPinShape = NONE; -static int LastPinLength = DEFAULT_PIN_LENGTH; static int LastPinNameSize = DEFAULT_TEXT_SIZE; static int LastPinNumSize = DEFAULT_TEXT_SIZE; static bool LastPinCommonConvert = false; static bool LastPinCommonUnit = false; static bool LastPinVisible = true; +// The -1 is a non-valid value to trigger delayed initialization +static int LastPinLength = -1; + +static int GetLastPinLength() +{ + if( LastPinLength == -1 ) + LastPinLength = GetDefaultPinLength(); + + return LastPinLength; +} void LIB_EDIT_FRAME::OnEditPin( wxCommandEvent& event ) { @@ -136,7 +145,7 @@ void LIB_EDIT_FRAME::OnEditPin( wxCommandEvent& event ) pin->SetNumber( dlg.GetPadName() ); pin->SetNumberTextSize( LastPinNumSize ); pin->SetOrientation( LastPinOrient ); - pin->SetLength( LastPinLength ); + pin->SetLength( GetLastPinLength() ); pin->SetType( LastPinType ); pin->SetShape( LastPinShape ); pin->SetConversion( ( LastPinCommonConvert ) ? 0 : m_convert ); @@ -389,7 +398,7 @@ void LIB_EDIT_FRAME::CreatePin( wxDC* DC ) pin->SetFlags( IS_LINKED ); pin->Move( GetCrossHairPosition( true ) ); - pin->SetLength( LastPinLength ); + pin->SetLength( GetLastPinLength() ); pin->SetOrientation( LastPinOrient ); pin->SetType( LastPinType ); pin->SetShape( LastPinShape ); From 402c7d21cb900db91444ec5be64bd564b82b9ab9 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 13 May 2014 10:01:06 +0200 Subject: [PATCH 377/741] Fixed ifdefs in rtree.h. --- include/geometry/rtree.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/geometry/rtree.h b/include/geometry/rtree.h index 4ae5fafae6..40f7957421 100644 --- a/include/geometry/rtree.h +++ b/include/geometry/rtree.h @@ -31,12 +31,12 @@ #include #define ASSERT assert // RTree uses ASSERT( condition ) -#ifndef Min +#ifndef rMin #define rMin std::min -#endif // Min -#ifndef Max +#endif // rMin +#ifndef rMax #define rMax std::max -#endif // Max +#endif // rMax // // RTree.h From 1cbf03cb606d67a58c401a5b1fa3d320ba41af9d Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 13 May 2014 11:22:50 +0200 Subject: [PATCH 378/741] Ratsnest was not refreshed on board reload - fixed. --- pcbnew/pcbframe.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 3ed5d2583a..ada7b0d8c7 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -544,6 +544,7 @@ void PCB_EDIT_FRAME::ViewReloadBoard( const BOARD* aBoard ) const view->Add( worksheet ); view->Add( aBoard->GetRatsnestViewItem() ); + aBoard->GetRatsnest()->Recalculate(); // Limit panning to the size of worksheet frame GetGalCanvas()->GetViewControls()->SetPanBoundary( aBoard->GetWorksheetViewItem()->ViewBBox() ); @@ -673,9 +674,6 @@ void PCB_EDIT_FRAME::UseGalCanvas( bool aEnable ) { ViewReloadBoard( m_Pcb ); - // Update potential changes in the ratsnest - m_Pcb->GetRatsnest()->Recalculate(); - m_toolManager.SetEnvironment( m_Pcb, GetGalCanvas()->GetView(), GetGalCanvas()->GetViewControls(), this ); m_toolManager.ResetTools( TOOL_BASE::GAL_SWITCH ); From 8bb5eaa434875c0faf0abd58d5b1c666098618cb Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 13 May 2014 11:22:50 +0200 Subject: [PATCH 379/741] Better way of adding CONTEXT_MENU entries. --- common/tool/context_menu.cpp | 47 ++++++++++++++---------------------- include/tool/context_menu.h | 8 ------ 2 files changed, 18 insertions(+), 37 deletions(-) diff --git a/common/tool/context_menu.cpp b/common/tool/context_menu.cpp index 6dfab27e58..d45bbb3602 100644 --- a/common/tool/context_menu.cpp +++ b/common/tool/context_menu.cpp @@ -101,17 +101,28 @@ void CONTEXT_MENU::Add( const TOOL_ACTION& aAction ) { /// ID numbers for tool actions need to have a value higher than m_actionId int id = m_actionId + aAction.GetId(); - wxString menuEntry; + + wxMenuItem* item = new wxMenuItem( &m_menu, id, + wxString( aAction.GetMenuItem().c_str(), wxConvUTF8 ), + wxString( aAction.GetDescription().c_str(), wxConvUTF8 ), wxITEM_NORMAL ); if( aAction.HasHotKey() ) - menuEntry = wxString( ( aAction.GetMenuItem() + '\t' + - getHotKeyDescription( aAction ) ).c_str(), wxConvUTF8 ); - else - menuEntry = wxString( aAction.GetMenuItem().c_str(), wxConvUTF8 ); + { + int key = aAction.GetHotKey() & ~MD_MODIFIER_MASK; + int mod = aAction.GetHotKey() & MD_MODIFIER_MASK; + wxAcceleratorEntryFlags flags = wxACCEL_NORMAL; - m_menu.Append( new wxMenuItem( &m_menu, id, menuEntry, - wxString( aAction.GetDescription().c_str(), wxConvUTF8 ), wxITEM_NORMAL ) ); + switch( mod ) + { + case MD_ALT: flags = wxACCEL_ALT; break; + case MD_CTRL: flags = wxACCEL_CTRL; break; + case MD_SHIFT: flags = wxACCEL_SHIFT; break; + } + item->SetAccel( new wxAcceleratorEntry( flags, key, id, item ) ); + } + + m_menu.Append( item ); m_toolActions[id] = &aAction; } @@ -128,28 +139,6 @@ void CONTEXT_MENU::Clear() } -std::string CONTEXT_MENU::getHotKeyDescription( const TOOL_ACTION& aAction ) const -{ - int hotkey = aAction.GetHotKey(); - - std::string description = ""; - - if( hotkey & MD_ALT ) - description += "ALT+"; - - if( hotkey & MD_CTRL ) - description += "CTRL+"; - - if( hotkey & MD_SHIFT ) - description += "SHIFT+"; - - // TODO dispatch keys such as Fx, TAB, PG_UP/DN, HOME, END, etc. - description += char( hotkey & ~MD_MODIFIER_MASK ); - - return description; -} - - void CONTEXT_MENU::CMEventHandler::onEvent( wxEvent& aEvent ) { TOOL_EVENT evt; diff --git a/include/tool/context_menu.h b/include/tool/context_menu.h index df6f7cb0b7..e181b576bb 100644 --- a/include/tool/context_menu.h +++ b/include/tool/context_menu.h @@ -128,14 +128,6 @@ private: m_tool = aTool; } - /** - * Function getHotKeyDescription() - * Returns a hot key in the string format accepted by wxMenu. - * @param aAction is the action with hot key to be translated.. - * @return Hot key in the string format compatible with wxMenu. - */ - std::string getHotKeyDescription( const TOOL_ACTION& aAction ) const; - ///> Flag indicating that the menu title was set up. bool m_titleSet; From 7fd9fc4911c08986e99d2e3171cc5afc2e9069c8 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 13 May 2014 11:22:51 +0200 Subject: [PATCH 380/741] Ratsnest lines are highlighted together with all items in the same net. --- pcbnew/ratsnest_viewitem.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pcbnew/ratsnest_viewitem.cpp b/pcbnew/ratsnest_viewitem.cpp index ffe88c3c7f..1f40f8ed26 100644 --- a/pcbnew/ratsnest_viewitem.cpp +++ b/pcbnew/ratsnest_viewitem.cpp @@ -60,6 +60,7 @@ void RATSNEST_VIEWITEM::ViewDraw( int aLayer, GAL* aGal ) const aGal->SetLineWidth( 1.0 ); RENDER_SETTINGS* rs = m_view->GetPainter()->GetSettings(); COLOR4D color = rs->GetColor( NULL, ITEM_GAL_LAYER( RATSNEST_VISIBLE ) ); + int highlightedNet = rs->GetHighlightNetCode(); for( int i = 1; i < m_data->GetNetCount(); ++i ) { @@ -89,7 +90,8 @@ void RATSNEST_VIEWITEM::ViewDraw( int aLayer, GAL* aGal ) const } // Draw the "static" ratsnest - aGal->SetStrokeColor( color ); // using the default ratsnest color + if( i != highlightedNet ) + aGal->SetStrokeColor( color ); // using the default ratsnest color for not highlighted const std::vector* edges = net.GetUnconnected(); if( edges == NULL ) From 6b222d19d5f5872f1d2e2f2d22aca5bfacd8a286 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 13 May 2014 11:22:51 +0200 Subject: [PATCH 381/741] Added preference for selecting tracks/vias/graphics if there is a module present in the selection point. --- pcbnew/tools/selection_tool.cpp | 41 +++++++++++++++++++++++++++++++++ pcbnew/tools/selection_tool.h | 10 ++++++++ 2 files changed, 51 insertions(+) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 2511cb687e..02068b72c8 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -227,6 +227,7 @@ bool SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere, bool aAllowDisambigua BOARD_ITEM* item; GENERAL_COLLECTORS_GUIDE guide = getEditFrame()->GetCollectorsGuide(); GENERAL_COLLECTOR collector; + const KICAD_T types[] = { PCB_TRACE_T, PCB_VIA_T, PCB_LINE_T, EOT }; // preferred types collector.Collect( pcb, GENERAL_COLLECTOR::AllBoardItems, wxPoint( aWhere.x, aWhere.y ), guide ); @@ -252,6 +253,14 @@ bool SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere, bool aAllowDisambigua collector.Remove( i ); } + // Check if among the selection candidates there is only one instance of preferred type + if( item = prefer( collector, types ) ) + { + toggleSelection( item ); + + return true; + } + // Let's see if there is still disambiguation in selection.. if( collector.GetCount() == 1 ) { @@ -681,6 +690,38 @@ void SELECTION_TOOL::highlightNet( const VECTOR2I& aPoint ) } +BOARD_ITEM* SELECTION_TOOL::prefer( GENERAL_COLLECTOR& aCollector, const KICAD_T aTypes[] ) const +{ + BOARD_ITEM* preferred = NULL; + + int typesNr = 0; + while( aTypes[typesNr++] != EOT ); // count number of types, excluding the sentinel (EOT) + + for( int i = 0; i < aCollector.GetCount(); ++i ) + { + KICAD_T type = aCollector[i]->Type(); + + for( int j = 0; j < typesNr - 1; ++j ) // Check if the item's type is in our list + { + if( aTypes[j] == type ) + { + if( preferred == NULL ) + { + preferred = aCollector[i]; // save the first matching item + break; + } + else + { + return NULL; // there is more than one preferred item, so there is no clear choice + } + } + } + } + + return preferred; +} + + void SELECTION_TOOL::SELECTION::clear() { items.ClearItemsList(); diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index 609fcafda5..0850286d24 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -229,6 +229,16 @@ private: */ void highlightNet( const VECTOR2I& aPoint ); + /** + * Function prefer() + * Checks if collector's list contains only single entry of asked types. If so, it returns it. + * @param aCollector is the collector that has a list of items to be queried. + * @param aTypes is the list of searched/preferred types. + * @return Pointer to the preferred item, if there is only one entry of given type or NULL + * if there are more entries or no entries at all. + */ + BOARD_ITEM* prefer( GENERAL_COLLECTOR& aCollector, const KICAD_T aTypes[] ) const; + /// Visual representation of selection box SELECTION_AREA* m_selArea; From 50193f175179d33afb90d7dba68afd901f37a5a4 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 13 May 2014 11:22:51 +0200 Subject: [PATCH 382/741] Resolved HOME hot key conflict between menu entry (Zoom Page) and event assigned to the hot key in the ACTION_MANAGER. Conflicts: pcbnew/menubar_pcbframe.cpp --- common/tool/tool_manager.cpp | 3 +-- pcbnew/menubar_pcbframe.cpp | 2 +- pcbnew/tools/selection_tool.cpp | 3 ++- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index e83b8fc6d2..0f0ee83533 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -513,8 +513,7 @@ bool TOOL_MANAGER::ProcessEvent( TOOL_EVENT& aEvent ) if( m_view->IsDirty() ) { PCB_EDIT_FRAME* f = static_cast( GetEditFrame() ); - if( f->IsGalCanvasActive() ) - f->GetGalCanvas()->Refresh(); // fixme: ugly hack, provide a method in TOOL_DISPATCHER. + f->GetGalCanvas()->Refresh(); // fixme: ugly hack, provide a method in TOOL_DISPATCHER. } return false; diff --git a/pcbnew/menubar_pcbframe.cpp b/pcbnew/menubar_pcbframe.cpp index 11aa831c27..b95b8529fe 100644 --- a/pcbnew/menubar_pcbframe.cpp +++ b/pcbnew/menubar_pcbframe.cpp @@ -315,7 +315,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() AddMenuItem( viewMenu, ID_ZOOM_OUT, text, HELP_ZOOM_OUT, KiBitmap( zoom_out_xpm ) ); text = AddHotkeyName( _( "&Fit on Screen" ), g_Pcbnew_Editor_Hokeys_Descr, - HK_ZOOM_AUTO ); + HK_ZOOM_AUTO, IS_ACCELERATOR ); AddMenuItem( viewMenu, ID_ZOOM_PAGE, text, HELP_ZOOM_FIT, KiBitmap( zoom_fit_in_page_xpm ) ); diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 02068b72c8..b0a333285c 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -254,7 +254,8 @@ bool SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere, bool aAllowDisambigua } // Check if among the selection candidates there is only one instance of preferred type - if( item = prefer( collector, types ) ) + item = prefer( collector, types ); + if( item ) { toggleSelection( item ); From 2f5103bc67ab13cb8f438a047e8f725c37ef528c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 13 May 2014 11:22:51 +0200 Subject: [PATCH 383/741] Fixed jumpy zoom when hotkeys and scroll wheel were used alternatively. --- common/view/wx_view_controls.cpp | 4 ++-- pcbnew/tools/pcbnew_control.cpp | 30 ++++++++++-------------------- 2 files changed, 12 insertions(+), 22 deletions(-) diff --git a/common/view/wx_view_controls.cpp b/common/view/wx_view_controls.cpp index 22eb3ee47e..9f51a0f624 100644 --- a/common/view/wx_view_controls.cpp +++ b/common/view/wx_view_controls.cpp @@ -160,12 +160,12 @@ void WX_VIEW_CONTROLS::onWheel( wxMouseEvent& aEvent ) // Set scaling speed depending on scroll wheel event interval if( timeDiff < 500 && timeDiff > 0 ) { - zoomScale = ( aEvent.GetWheelRotation() > 0.0 ) ? 2.05 - timeDiff / 500 : + zoomScale = ( aEvent.GetWheelRotation() > 0 ) ? 2.05 - timeDiff / 500 : 1.0 / ( 2.05 - timeDiff / 500 ); } else { - zoomScale = ( aEvent.GetWheelRotation() > 0.0 ) ? 1.05 : 0.95; + zoomScale = ( aEvent.GetWheelRotation() > 0 ) ? 1.05 : 0.95; } VECTOR2D anchor = m_view->ToWorld( VECTOR2D( aEvent.GetX(), aEvent.GetY() ) ); diff --git a/pcbnew/tools/pcbnew_control.cpp b/pcbnew/tools/pcbnew_control.cpp index f01203178f..ec8b086bab 100644 --- a/pcbnew/tools/pcbnew_control.cpp +++ b/pcbnew/tools/pcbnew_control.cpp @@ -61,17 +61,14 @@ bool PCBNEW_CONTROL::Init() int PCBNEW_CONTROL::ZoomInOut( TOOL_EVENT& aEvent ) { KIGFX::VIEW* view = m_frame->GetGalCanvas()->GetView(); - KIGFX::GAL* gal = m_frame->GetGalCanvas()->GetGAL(); + double zoomScale = 1.0; if( aEvent.IsAction( &COMMON_ACTIONS::zoomIn ) ) - m_frame->SetPrevZoom(); + zoomScale = 1.3; else if( aEvent.IsAction( &COMMON_ACTIONS::zoomOut ) ) - m_frame->SetNextZoom(); + zoomScale = 0.7; - double zoomFactor = gal->GetWorldScale() / gal->GetZoomFactor(); - double zoom = 1.0 / ( zoomFactor * m_frame->GetZoom() ); - - view->SetScale( zoom, getViewControls()->GetCursorPosition() ); + view->SetScale( view->GetScale() * zoomScale, getViewControls()->GetCursorPosition() ); setTransitions(); return 0; @@ -81,17 +78,14 @@ int PCBNEW_CONTROL::ZoomInOut( TOOL_EVENT& aEvent ) int PCBNEW_CONTROL::ZoomInOutCenter( TOOL_EVENT& aEvent ) { KIGFX::VIEW* view = m_frame->GetGalCanvas()->GetView(); - KIGFX::GAL* gal = m_frame->GetGalCanvas()->GetGAL(); + double zoomScale = 1.0; - if( aEvent.IsAction( &COMMON_ACTIONS::zoomInCenter ) ) - m_frame->SetPrevZoom(); - else if( aEvent.IsAction( &COMMON_ACTIONS::zoomOutCenter ) ) - m_frame->SetNextZoom(); + if( aEvent.IsAction( &COMMON_ACTIONS::zoomIn ) ) + zoomScale = 1.3; + else if( aEvent.IsAction( &COMMON_ACTIONS::zoomOut ) ) + zoomScale = 0.7; - double zoomFactor = gal->GetWorldScale() / gal->GetZoomFactor(); - double zoom = 1.0 / ( zoomFactor * m_frame->GetZoom() ); - - view->SetScale( zoom ); + view->SetScale( view->GetScale() * zoomScale ); setTransitions(); return 0; @@ -119,10 +113,6 @@ int PCBNEW_CONTROL::ZoomFitScreen( TOOL_EVENT& aEvent ) double iuPerY = screenSize.y ? boardBBox.GetHeight() / screenSize.y : 1.0; double bestZoom = std::max( iuPerX, iuPerY ); - // This is needed to avoid "jumpy" zooms if first hot key was used and then mouse scroll - // (or other way round). - m_frame->GetScreen()->SetZoom( bestZoom ); - double zoomFactor = gal->GetWorldScale() / gal->GetZoomFactor(); double zoom = 1.0 / ( zoomFactor * bestZoom ); From 3eaef97a7d9f83ccdad6b4025b8bebefab8b3d75 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 13 May 2014 11:22:51 +0200 Subject: [PATCH 384/741] Added WX_UNIT_TEXT - wxWidget control for inputing sizes using different units (mm, inch, internal units). --- common/CMakeLists.txt | 1 + common/wxunittext.cpp | 146 ++++++++++++++++++++++++++++++++++++++++++ include/wxunittext.h | 139 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 286 insertions(+) create mode 100644 common/wxunittext.cpp create mode 100644 include/wxunittext.h diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 07da514a8e..b30ac34312 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -202,6 +202,7 @@ set( COMMON_SRCS wildcards_and_files_ext.cpp worksheet.cpp wxwineda.cpp + wxunittext.cpp xnode.cpp zoom.cpp ) diff --git a/common/wxunittext.cpp b/common/wxunittext.cpp new file mode 100644 index 0000000000..5af3c721ea --- /dev/null +++ b/common/wxunittext.cpp @@ -0,0 +1,146 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 CERN + * Author: Maciej Suminski + * + * 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 "wxunittext.h" +#include +#include +#include +#include +#include + +WX_UNIT_TEXT::WX_UNIT_TEXT( wxWindow* aParent, const wxString& aLabel, double aValue, double aStep ) : + wxPanel( aParent, wxID_ANY ), + m_step( aStep ) +{ + // Use the currently selected units + m_units = g_UserUnit; + + wxBoxSizer* sizer; + sizer = new wxBoxSizer( wxHORIZONTAL ); + + // Helper label + m_inputLabel = new wxStaticText( this, wxID_ANY, aLabel, + wxDefaultPosition, wxDefaultSize, 0 ); + wxSize size = m_inputLabel->GetMinSize(); + size.SetWidth( 150 ); + m_inputLabel->SetMinSize( size ); + sizer->Add( m_inputLabel, 1, wxALIGN_CENTER_VERTICAL | wxALL | wxEXPAND, 5 ); + + wxFloatingPointValidator validator( 4, NULL, wxNUM_VAL_NO_TRAILING_ZEROES ); + validator.SetRange( 0.0, std::numeric_limits::max() ); + + // Main input control + m_inputValue = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, + wxTE_PROCESS_ENTER ); + m_inputValue->SetValidator( validator ); + SetValue( aValue ); + sizer->Add( m_inputValue, 0, wxALIGN_CENTER_VERTICAL | wxALL ); + + // Spin buttons for modifying values using the mouse + m_spinButton = new wxSpinButton( this, wxID_ANY ); + m_spinButton->SetRange( std::numeric_limits::min(), std::numeric_limits::max() ); + m_spinButton->SetCanFocus( false ); + sizer->Add( m_spinButton, 0, wxALIGN_CENTER_VERTICAL | wxALL ); + + sizer->AddSpacer( 5 ); + + // Create units label + m_unitLabel = new wxStaticText( this, wxID_ANY, GetUnitsLabel( g_UserUnit ), + wxDefaultPosition, wxDefaultSize, 0 ); + sizer->Add( m_unitLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL ); + + SetSizer( sizer ); + Layout(); + + Connect( wxEVT_SPIN_UP, wxSpinEventHandler( WX_UNIT_TEXT::onSpinUpEvent ), NULL, this ); + Connect( wxEVT_SPIN_DOWN, wxSpinEventHandler( WX_UNIT_TEXT::onSpinDownEvent ), NULL, this ); + Connect( wxEVT_TEXT_ENTER, wxCommandEventHandler( WX_UNIT_TEXT::onEnter ), NULL, this ); +} + + +WX_UNIT_TEXT::~WX_UNIT_TEXT() +{ +} + + +void WX_UNIT_TEXT::SetUnits( EDA_UNITS_T aUnits, bool aConvert ) +{ + assert( !aConvert ); // TODO conversion does not work yet + + m_unitLabel->SetLabel( GetUnitsLabel( g_UserUnit ) ); +} + + +void WX_UNIT_TEXT::SetValue( double aValue ) +{ + assert( aValue >= 0.0 ); + + if( aValue >= 0.0 ) + { + m_inputValue->SetValue( Double2Str( aValue ) ); + m_inputValue->MarkDirty(); + } +} + + +double WX_UNIT_TEXT::GetValue( EDA_UNITS_T aUnit ) const +{ + assert( false ); // TODO + + return 0.0; +} + + +double WX_UNIT_TEXT::GetValue() const +{ + wxString text = m_inputValue->GetValue(); + double value; + + if( !text.ToDouble( &value ) ) + value = 0.0; + + return value; +} + + +void WX_UNIT_TEXT::onSpinUpEvent( wxSpinEvent& aEvent ) +{ + SetValue( GetValue() + m_step ); +} + + +void WX_UNIT_TEXT::onSpinDownEvent( wxSpinEvent& aEvent ) +{ + double newValue = GetValue() - m_step; + + if( newValue >= 0.0 ) + SetValue( newValue ); +} + + +void WX_UNIT_TEXT::onEnter( wxCommandEvent& aEvent ) +{ + // Move focus to the next widget + Navigate(); +} diff --git a/include/wxunittext.h b/include/wxunittext.h new file mode 100644 index 0000000000..977002e59a --- /dev/null +++ b/include/wxunittext.h @@ -0,0 +1,139 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 CERN + * Author: Maciej Suminski + * + * 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 WXUNITTEXT_H_ +#define WXUNITTEXT_H_ + +#include +#include + +class wxTextCtrl; +class wxSpinButton; +class wxStaticText; + +class WX_UNIT_TEXT : public wxPanel +{ +public: + /** + * Constructor. + * @param aParent is the parent window. + * @param aLabel is the label displayed next to the text input control. + * @param aValue is the initial value for the control. + * @param aStep is the step size when using spin buttons. + */ + WX_UNIT_TEXT( wxWindow* aParent, const wxString& aLabel = wxString( "Size:" ), + double aValue = 0.0, double aStep = 0.1 ); + + virtual ~WX_UNIT_TEXT(); + + /** + * Function SetUnits + * Changes the units used by the control. + * @param aUnits is the new unit to be used. + * @param aConvert decides if the current value should be converted to the value in new units + * or should it stay the same. + */ + void SetUnits( EDA_UNITS_T aUnits, bool aConvert = false ); + + /** + * Function SetValue + * Sets new value for the control. + * @param aValue is the new value. + */ + virtual void SetValue( double aValue ); + + /** + * Function GetValue + * Returns the current value using specified units (if currently used units are different, then + * they are converted first). + * @param aUnits is the wanted unit. + */ + virtual double GetValue( EDA_UNITS_T aUnits ) const; + + /** + * Function GetValue + * Returns the current value in currently used units. + */ + virtual double GetValue() const; + + /** + * Function GetUnits + * Returns currently used units. + */ + EDA_UNITS_T GetUnits() const + { + return m_units; + } + + /** + * Function SetStep + * Sets the difference introduced by a single spin button click. + * @param aStep is new step size. + */ + void SetStep( double aStep ) + { + assert( aStep > 0.0 ); + + m_step = aStep; + } + + /** + * Function GetStep + * Returns the difference introduced by a single spin button click. + */ + double GetStep() const + { + return m_step; + } + +protected: + ///> Spin up button click event handler. + void onSpinUpEvent( wxSpinEvent& aEvent ); + + ///> Spin down button click event handler. + void onSpinDownEvent( wxSpinEvent& aEvent ); + + ///> On Enter press event handler. + void onEnter( wxCommandEvent& aEvent ); + + ///> Label for the input (e.g. "Size:") + wxStaticText* m_inputLabel; + + ///> Text input control. + wxTextCtrl* m_inputValue; + + ///> Spin buttons for changing the value using mouse. + wxSpinButton* m_spinButton; + + ///> Label showing currently used units. + wxStaticText* m_unitLabel; + + ///> Currently used units. + EDA_UNITS_T m_units; + + ///> Step size (added/subtracted difference if spin buttons are used). + double m_step; +}; + +#endif /* WXUNITTEXT_H_ */ From 761375ddef2e3e75fa203bc360cda135d3a5bcaf Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 13 May 2014 11:22:51 +0200 Subject: [PATCH 385/741] More compatibility fixes. --- common/draw_panel_gal.cpp | 18 +++++-- common/tool/context_menu.cpp | 2 +- common/wxunittext.cpp | 95 +++++++++++++++++++++++++--------- include/class_draw_panel_gal.h | 9 +++- include/wxunittext.h | 14 ++--- pcbnew/basepcbframe.cpp | 3 ++ pcbnew/pcbframe.cpp | 5 +- 7 files changed, 107 insertions(+), 39 deletions(-) diff --git a/common/draw_panel_gal.cpp b/common/draw_panel_gal.cpp index 0ec6a1130b..93ad978969 100644 --- a/common/draw_panel_gal.cpp +++ b/common/draw_panel_gal.cpp @@ -67,7 +67,6 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin m_viewControls = new KIGFX::WX_VIEW_CONTROLS( m_view, this ); - Connect( wxEVT_PAINT, wxPaintEventHandler( EDA_DRAW_PANEL_GAL::onPaint ), NULL, this ); Connect( wxEVT_SIZE, wxSizeEventHandler( EDA_DRAW_PANEL_GAL::onSize ), NULL, this ); /* Generic events for the Tool Dispatcher */ @@ -184,10 +183,21 @@ void EDA_DRAW_PANEL_GAL::Refresh( bool eraseBackground, const wxRect* rect ) } +void EDA_DRAW_PANEL_GAL::StartDrawing() +{ + m_pendingRefresh = false; + Connect( wxEVT_PAINT, wxPaintEventHandler( EDA_DRAW_PANEL_GAL::onPaint ), NULL, this ); + + wxPaintEvent redrawEvent; + wxPostEvent( this, redrawEvent ); +} + + void EDA_DRAW_PANEL_GAL::StopDrawing() { - Disconnect( wxEVT_PAINT, wxPaintEventHandler( EDA_DRAW_PANEL_GAL::onPaint ), NULL, this ); + m_pendingRefresh = true; m_refreshTimer.Stop(); + Disconnect( wxEVT_PAINT, wxPaintEventHandler( EDA_DRAW_PANEL_GAL::onPaint ), NULL, this ); } @@ -198,8 +208,7 @@ void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType ) return; // Prevent refreshing canvas during backend switch - m_pendingRefresh = true; - m_refreshTimer.Stop(); + StopDrawing(); delete m_gal; @@ -228,7 +237,6 @@ void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType ) m_view->SetGAL( m_gal ); m_currentGal = aGalType; - m_pendingRefresh = false; } diff --git a/common/tool/context_menu.cpp b/common/tool/context_menu.cpp index d45bbb3602..580e876a8b 100644 --- a/common/tool/context_menu.cpp +++ b/common/tool/context_menu.cpp @@ -110,7 +110,7 @@ void CONTEXT_MENU::Add( const TOOL_ACTION& aAction ) { int key = aAction.GetHotKey() & ~MD_MODIFIER_MASK; int mod = aAction.GetHotKey() & MD_MODIFIER_MASK; - wxAcceleratorEntryFlags flags = wxACCEL_NORMAL; + int flags = wxACCEL_NORMAL; switch( mod ) { diff --git a/common/wxunittext.cpp b/common/wxunittext.cpp index 5af3c721ea..f33be9ec5a 100644 --- a/common/wxunittext.cpp +++ b/common/wxunittext.cpp @@ -26,8 +26,12 @@ #include #include #include -#include +#include #include +#if wxCHECK_VERSION( 2, 9, 0 ) +#include +#endif +#include WX_UNIT_TEXT::WX_UNIT_TEXT( wxWindow* aParent, const wxString& aLabel, double aValue, double aStep ) : wxPanel( aParent, wxID_ANY ), @@ -47,22 +51,29 @@ WX_UNIT_TEXT::WX_UNIT_TEXT( wxWindow* aParent, const wxString& aLabel, double aV m_inputLabel->SetMinSize( size ); sizer->Add( m_inputLabel, 1, wxALIGN_CENTER_VERTICAL | wxALL | wxEXPAND, 5 ); - wxFloatingPointValidator validator( 4, NULL, wxNUM_VAL_NO_TRAILING_ZEROES ); - validator.SetRange( 0.0, std::numeric_limits::max() ); - // Main input control m_inputValue = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER ); - m_inputValue->SetValidator( validator ); + SetValue( aValue ); sizer->Add( m_inputValue, 0, wxALIGN_CENTER_VERTICAL | wxALL ); +#if wxCHECK_VERSION( 2, 9, 0 ) // Sorry guys, I am tired of dealing with 2.8 compatibility + wxFloatingPointValidator validator( 4, NULL, wxNUM_VAL_NO_TRAILING_ZEROES ); + validator.SetRange( 0.0, std::numeric_limits::max() ); + m_inputValue->SetValidator( validator ); + // Spin buttons for modifying values using the mouse m_spinButton = new wxSpinButton( this, wxID_ANY ); m_spinButton->SetRange( std::numeric_limits::min(), std::numeric_limits::max() ); + m_spinButton->SetCanFocus( false ); sizer->Add( m_spinButton, 0, wxALIGN_CENTER_VERTICAL | wxALL ); + Connect( wxEVT_SPIN_UP, wxSpinEventHandler( WX_UNIT_TEXT::onSpinUpEvent ), NULL, this ); + Connect( wxEVT_SPIN_DOWN, wxSpinEventHandler( WX_UNIT_TEXT::onSpinDownEvent ), NULL, this ); +#endif + sizer->AddSpacer( 5 ); // Create units label @@ -72,10 +83,6 @@ WX_UNIT_TEXT::WX_UNIT_TEXT( wxWindow* aParent, const wxString& aLabel, double aV SetSizer( sizer ); Layout(); - - Connect( wxEVT_SPIN_UP, wxSpinEventHandler( WX_UNIT_TEXT::onSpinUpEvent ), NULL, this ); - Connect( wxEVT_SPIN_DOWN, wxSpinEventHandler( WX_UNIT_TEXT::onSpinDownEvent ), NULL, this ); - Connect( wxEVT_TEXT_ENTER, wxCommandEventHandler( WX_UNIT_TEXT::onEnter ), NULL, this ); } @@ -98,49 +105,87 @@ void WX_UNIT_TEXT::SetValue( double aValue ) if( aValue >= 0.0 ) { - m_inputValue->SetValue( Double2Str( aValue ) ); + m_inputValue->SetValue( wxString( Double2Str( aValue ).c_str(), wxConvUTF8 ) ); m_inputValue->MarkDirty(); } } -double WX_UNIT_TEXT::GetValue( EDA_UNITS_T aUnit ) const +/*boost::optional WX_UNIT_TEXT::GetValue( EDA_UNITS_T aUnit ) const { - assert( false ); // TODO + if( aUnit == m_units ) + return GetValue(); // no conversion needed + + switch( m_units ) + { + case MILLIMETRES: + switch( aUnit ) + { + case INCHES: + iu = Mils2iu( GetValue() * 1000.0 ); + break; + + case UNSCALED_UNITS: + iu = GetValue(); + break; + } + break; + + case INCHES: + switch( aUnit ) + { + case MILLIMETRES: + return Mils2mm( GetValue() * 1000.0 ); + break; + + case UNSCALED_UNITS: + return Mils2iu( GetValue() * 1000.0 ); + break; + } + break; + + case UNSCALED_UNITS: + switch( aUnit ) + { + case MILLIMETRES: + return Iu2Mils( GetValue() ) / 1000.0; + break; + +// case INCHES: +// return +// break; + } + break; + } + + assert( false ); // seems that there are some conversions missing return 0.0; -} +}*/ -double WX_UNIT_TEXT::GetValue() const +boost::optional WX_UNIT_TEXT::GetValue() const { wxString text = m_inputValue->GetValue(); double value; if( !text.ToDouble( &value ) ) - value = 0.0; + return boost::optional(); - return value; + return boost::optional( value ); } void WX_UNIT_TEXT::onSpinUpEvent( wxSpinEvent& aEvent ) { - SetValue( GetValue() + m_step ); + SetValue( *GetValue() + m_step ); } void WX_UNIT_TEXT::onSpinDownEvent( wxSpinEvent& aEvent ) { - double newValue = GetValue() - m_step; + double newValue = *GetValue() - m_step; if( newValue >= 0.0 ) SetValue( newValue ); } - - -void WX_UNIT_TEXT::onEnter( wxCommandEvent& aEvent ) -{ - // Move focus to the next widget - Navigate(); -} diff --git a/include/class_draw_panel_gal.h b/include/class_draw_panel_gal.h index 4ec05ed65d..766cb5d630 100644 --- a/include/class_draw_panel_gal.h +++ b/include/class_draw_panel_gal.h @@ -111,9 +111,16 @@ public: m_eventDispatcher = aEventDispatcher; } + /** + * Function StartDrawing() + * Begins drawing if it was stopped previously. + */ + void StartDrawing(); + /** * Function StopDrawing() - * Prevents the GAL canvas from further drawing till it is recreated. + * Prevents the GAL canvas from further drawing till it is recreated + * or StartDrawing() is called. */ void StopDrawing(); diff --git a/include/wxunittext.h b/include/wxunittext.h index 977002e59a..92791f09ff 100644 --- a/include/wxunittext.h +++ b/include/wxunittext.h @@ -28,6 +28,11 @@ #include #include +namespace boost +{ + template + class optional; +} class wxTextCtrl; class wxSpinButton; class wxStaticText; @@ -42,7 +47,7 @@ public: * @param aValue is the initial value for the control. * @param aStep is the step size when using spin buttons. */ - WX_UNIT_TEXT( wxWindow* aParent, const wxString& aLabel = wxString( "Size:" ), + WX_UNIT_TEXT( wxWindow* aParent, const wxString& aLabel = _( "Size:" ), double aValue = 0.0, double aStep = 0.1 ); virtual ~WX_UNIT_TEXT(); @@ -69,13 +74,13 @@ public: * they are converted first). * @param aUnits is the wanted unit. */ - virtual double GetValue( EDA_UNITS_T aUnits ) const; + //virtual double GetValue( EDA_UNITS_T aUnits ) const; /** * Function GetValue * Returns the current value in currently used units. */ - virtual double GetValue() const; + virtual boost::optional GetValue() const; /** * Function GetUnits @@ -114,9 +119,6 @@ protected: ///> Spin down button click event handler. void onSpinDownEvent( wxSpinEvent& aEvent ); - ///> On Enter press event handler. - void onEnter( wxCommandEvent& aEvent ); - ///> Label for the input (e.g. "Size:") wxStaticText* m_inputLabel; diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 3bbade6770..00fcf088c0 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -159,6 +159,9 @@ PCB_BASE_FRAME::PCB_BASE_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrame this, -1, wxPoint( 0, 0 ), m_FrameSize, EDA_DRAW_PANEL_GAL::GAL_TYPE_CAIRO ) ); + // GAL should not be active yet + GetGalCanvas()->StopDrawing(); + // Hide by default, it has to be explicitly shown GetGalCanvas()->Hide(); diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index ada7b0d8c7..9f66d54d21 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -673,10 +673,13 @@ void PCB_EDIT_FRAME::UseGalCanvas( bool aEnable ) if( aEnable ) { ViewReloadBoard( m_Pcb ); + GetGalCanvas()->GetView()->RecacheAllItems(); m_toolManager.SetEnvironment( m_Pcb, GetGalCanvas()->GetView(), GetGalCanvas()->GetViewControls(), this ); - m_toolManager.ResetTools( TOOL_BASE::GAL_SWITCH ); + m_toolManager.ResetTools( TOOL_BASE::MODEL_RELOAD ); + + GetGalCanvas()->StartDrawing(); } } From 929008c6c33133198544c7f9a1a6b168cf84aa5f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 13 May 2014 11:22:51 +0200 Subject: [PATCH 386/741] SELECTION_TOOL updates dragging offset after rotating/flipping. Cursor position is saved as a field in order to avoid drifting of items while they are being dragged and rotated/flipped. --- pcbnew/tools/edit_tool.cpp | 28 ++++++++++++++++------------ pcbnew/tools/edit_tool.h | 6 ++++++ 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 8dac46385c..36814e541d 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -92,9 +92,6 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) // By default, modified items need to update their geometry m_updateFlag = KIGFX::VIEW_ITEM::GEOMETRY; - // Offset from the dragged item's center (anchor) - wxPoint offset; - KIGFX::VIEW_CONTROLS* controls = getViewControls(); PCB_EDIT_FRAME* editFrame = static_cast( m_toolMgr->GetEditFrame() ); controls->ShowCursor( true ); @@ -141,18 +138,18 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) else if( evt->IsMotion() || evt->IsDrag( BUT_LEFT ) ) { - VECTOR2I cursor( controls->GetCursorPosition() ); + m_cursor = controls->GetCursorPosition(); if( m_dragging ) { - wxPoint movement = wxPoint( cursor.x, cursor.y ) - + wxPoint movement = wxPoint( m_cursor.x, m_cursor.y ) - static_cast( selection.items.GetPickedItem( 0 ) )->GetPosition(); // Drag items to the current cursor position for( unsigned int i = 0; i < selection.items.GetCount(); ++i ) { BOARD_ITEM* item = static_cast( selection.items.GetPickedItem( i ) ); - item->Move( movement + offset ); + item->Move( movement + m_offset ); } updateRatsnest( true ); @@ -163,8 +160,9 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) editFrame->OnModify(); editFrame->SaveCopyInUndoList( selection.items, UR_CHANGED ); - offset = static_cast( selection.items.GetPickedItem( 0 ) )->GetPosition() - - wxPoint( cursor.x, cursor.y ); + // Update dragging offset (distance between cursor and the first dragged item) + m_offset = static_cast( selection.items.GetPickedItem( 0 ) )->GetPosition() - + wxPoint( m_cursor.x, m_cursor.y ); m_dragging = true; } @@ -227,14 +225,13 @@ int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) { // Display properties dialog BOARD_ITEM* item = static_cast( selection.items.GetPickedItem( 0 ) ); - VECTOR2I cursor = getViewControls()->GetCursorPosition(); // Check if user wants to edit pad or module properties if( item->Type() == PCB_MODULE_T ) { for( D_PAD* pad = static_cast( item )->Pads(); pad; pad = pad->Next() ) { - if( pad->ViewBBox().Contains( cursor ) ) + if( pad->ViewBBox().Contains( m_cursor ) ) { // Turns out that user wants to edit a pad properties item = pad; @@ -298,6 +295,10 @@ int EDIT_TOOL::Rotate( TOOL_EVENT& aEvent ) updateRatsnest( m_dragging ); + // Update dragging offset (distance between cursor and the first dragged item) + m_offset = static_cast( selection.items.GetPickedItem( 0 ) )->GetPosition() - + rotatePoint; + if( m_dragging ) selection.group->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); else @@ -348,6 +349,10 @@ int EDIT_TOOL::Flip( TOOL_EVENT& aEvent ) updateRatsnest( m_dragging ); + // Update dragging offset (distance between cursor and the first dragged item) + m_offset = static_cast( selection.items.GetPickedItem( 0 ) )->GetPosition() - + flipPoint; + if( m_dragging ) selection.group->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); else @@ -487,8 +492,7 @@ wxPoint EDIT_TOOL::getModificationPoint( const SELECTION_TOOL::SELECTION& aSelec } else { - VECTOR2I cursor = getViewControls()->GetCursorPosition(); - return wxPoint( cursor.x, cursor.y ); + return wxPoint( m_cursor.x, m_cursor.y ); } } diff --git a/pcbnew/tools/edit_tool.h b/pcbnew/tools/edit_tool.h index b5f6f1fc0d..d3792766ff 100644 --- a/pcbnew/tools/edit_tool.h +++ b/pcbnew/tools/edit_tool.h @@ -98,6 +98,12 @@ private: ///> Flag determining if anything is being dragged right now bool m_dragging; + ///> Offset from the dragged item's center (anchor) + wxPoint m_offset; + + ///> Last cursor position + VECTOR2I m_cursor; + ///> Removes and frees a single BOARD_ITEM. void remove( BOARD_ITEM* aItem ); From a0801e2d8e580c369f085f9f65af5e068f893a07 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 13 May 2014 11:22:51 +0200 Subject: [PATCH 387/741] Pad properties are back. --- pcbnew/tools/edit_tool.cpp | 2 +- pcbnew/tools/edit_tool.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 36814e541d..5f3906e67b 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -231,7 +231,7 @@ int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) { for( D_PAD* pad = static_cast( item )->Pads(); pad; pad = pad->Next() ) { - if( pad->ViewBBox().Contains( m_cursor ) ) + if( pad->ViewBBox().Contains( getViewControls()->GetCursorPosition() ) ) { // Turns out that user wants to edit a pad properties item = pad; diff --git a/pcbnew/tools/edit_tool.h b/pcbnew/tools/edit_tool.h index d3792766ff..b23f076e96 100644 --- a/pcbnew/tools/edit_tool.h +++ b/pcbnew/tools/edit_tool.h @@ -101,7 +101,8 @@ private: ///> Offset from the dragged item's center (anchor) wxPoint m_offset; - ///> Last cursor position + ///> Last cursor position (needed for getModificationPoint() to avoid changes + ///> of edit reference point). VECTOR2I m_cursor; ///> Removes and frees a single BOARD_ITEM. From 9325a9e74d8a0cc36ca289f965a61247e73afb00 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 13 May 2014 11:22:51 +0200 Subject: [PATCH 388/741] Fixed rotation/flip point. --- pcbnew/tools/edit_tool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 5f3906e67b..b647b2bbf2 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -488,7 +488,7 @@ wxPoint EDIT_TOOL::getModificationPoint( const SELECTION_TOOL::SELECTION& aSelec { if( aSelection.Size() == 1 ) { - return static_cast( aSelection.items.GetPickedItem( 0 ) )->GetPosition(); + return static_cast( aSelection.items.GetPickedItem( 0 ) )->GetPosition() - m_offset; } else { From 089e99b99eff8bb417681ae6f5bbd373b3252680 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 13 May 2014 11:22:51 +0200 Subject: [PATCH 389/741] Fixing memory leaks. --- common/tool/context_menu.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/tool/context_menu.cpp b/common/tool/context_menu.cpp index 580e876a8b..827d1080e0 100644 --- a/common/tool/context_menu.cpp +++ b/common/tool/context_menu.cpp @@ -119,7 +119,8 @@ void CONTEXT_MENU::Add( const TOOL_ACTION& aAction ) case MD_SHIFT: flags = wxACCEL_SHIFT; break; } - item->SetAccel( new wxAcceleratorEntry( flags, key, id, item ) ); + wxAcceleratorEntry accel( flags, key, id, item ); + item->SetAccel( &accel ); } m_menu.Append( item ); From 05ee03d6b0b739c2a56920277c9919d89a930254 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 13 May 2014 11:22:51 +0200 Subject: [PATCH 390/741] Recursive copy constructor for CONTEXT_MENU. --- common/tool/context_menu.cpp | 142 ++++++++++++++++++++++++----------- common/tool/tool_manager.cpp | 4 +- include/tool/context_menu.h | 50 ++++++------ 3 files changed, 123 insertions(+), 73 deletions(-) diff --git a/common/tool/context_menu.cpp b/common/tool/context_menu.cpp index 827d1080e0..400193a16b 100644 --- a/common/tool/context_menu.cpp +++ b/common/tool/context_menu.cpp @@ -29,41 +29,32 @@ #include CONTEXT_MENU::CONTEXT_MENU() : - m_titleSet( false ), m_selected( -1 ), m_handler( this ), m_tool( NULL ) + m_titleSet( false ), m_selected( -1 ), m_tool( NULL ) { - m_menu.Connect( wxEVT_MENU_HIGHLIGHT, wxEventHandler( CMEventHandler::onEvent ), - NULL, &m_handler ); - m_menu.Connect( wxEVT_COMMAND_MENU_SELECTED, wxEventHandler( CMEventHandler::onEvent ), - NULL, &m_handler ); - - // Workaround for the case when mouse cursor never reaches menu (it hangs up tools using menu) - wxMenuEvent menuEvent( wxEVT_MENU_HIGHLIGHT, -1, &m_menu ); - m_menu.AddPendingEvent( menuEvent ); + setupEvents(); } CONTEXT_MENU::CONTEXT_MENU( const CONTEXT_MENU& aMenu ) : - m_titleSet( aMenu.m_titleSet ), m_selected( -1 ), m_handler( this ), m_tool( aMenu.m_tool ) + m_titleSet( aMenu.m_titleSet ), m_selected( -1 ), m_tool( aMenu.m_tool ) { - m_menu.Connect( wxEVT_MENU_HIGHLIGHT, wxEventHandler( CMEventHandler::onEvent ), - NULL, &m_handler ); - m_menu.Connect( wxEVT_COMMAND_MENU_SELECTED, wxEventHandler( CMEventHandler::onEvent ), - NULL, &m_handler ); - - // Workaround for the case when mouse cursor never reaches menu (it hangs up tools using menu) - wxMenuEvent menuEvent( wxEVT_MENU_HIGHLIGHT, -1, &m_menu ); - m_menu.AddPendingEvent( menuEvent ); + setupEvents(); // Copy all the menu entries - for( unsigned i = 0; i < aMenu.m_menu.GetMenuItemCount(); ++i ) - { - wxMenuItem* item = aMenu.m_menu.FindItemByPosition( i ); - m_menu.Append( new wxMenuItem( &m_menu, item->GetId(), item->GetItemLabel(), - wxEmptyString, wxITEM_NORMAL ) ); - } + copyMenu( &aMenu, this ); +} - // Copy tool actions that are available to choose from context menu - m_toolActions = aMenu.m_toolActions; + +void CONTEXT_MENU::setupEvents() +{ + Connect( wxEVT_MENU_HIGHLIGHT, wxEventHandler( CONTEXT_MENU::onMenuEvent ), + NULL, this ); + Connect( wxEVT_COMMAND_MENU_SELECTED, wxEventHandler( CONTEXT_MENU::onMenuEvent ), + NULL, this ); + + // Workaround for the case when mouse cursor never reaches menu (it hangs up tools using menu) + wxMenuEvent menuEvent( wxEVT_MENU_HIGHLIGHT, -1, this ); + AddPendingEvent( menuEvent ); } @@ -71,15 +62,16 @@ void CONTEXT_MENU::SetTitle( const wxString& aTitle ) { // TODO handle an empty string (remove title and separator) - // Unfortunately wxMenu::SetTitle() does nothing.. + // Unfortunately wxMenu::SetTitle() does nothing.. (at least wxGTK) + if( m_titleSet ) { - m_menu.FindItemByPosition( 0 )->SetItemLabel( aTitle ); + FindItemByPosition( 0 )->SetItemLabel( aTitle ); } else { - m_menu.InsertSeparator( 0 ); - m_menu.Insert( 0, new wxMenuItem( &m_menu, -1, aTitle, wxEmptyString, wxITEM_NORMAL ) ); + InsertSeparator( 0 ); + Insert( 0, new wxMenuItem( this, -1, aTitle, wxEmptyString, wxITEM_NORMAL ) ); m_titleSet = true; } } @@ -89,11 +81,11 @@ void CONTEXT_MENU::Add( const wxString& aLabel, int aId ) { #ifdef DEBUG - if( m_menu.FindItem( aId ) != NULL ) + if( FindItem( aId ) != NULL ) wxLogWarning( wxT( "Adding more than one menu entry with the same ID may result in" "undefined behaviour" ) ); #endif - m_menu.Append( new wxMenuItem( &m_menu, aId, aLabel, wxEmptyString, wxITEM_NORMAL ) ); + Append( new wxMenuItem( this, aId, aLabel, wxEmptyString, wxITEM_NORMAL ) ); } @@ -102,7 +94,7 @@ void CONTEXT_MENU::Add( const TOOL_ACTION& aAction ) /// ID numbers for tool actions need to have a value higher than m_actionId int id = m_actionId + aAction.GetId(); - wxMenuItem* item = new wxMenuItem( &m_menu, id, + wxMenuItem* item = new wxMenuItem( this, id, wxString( aAction.GetMenuItem().c_str(), wxConvUTF8 ), wxString( aAction.GetDescription().c_str(), wxConvUTF8 ), wxITEM_NORMAL ); @@ -123,7 +115,7 @@ void CONTEXT_MENU::Add( const TOOL_ACTION& aAction ) item->SetAccel( &accel ); } - m_menu.Append( item ); + Append( item ); m_toolActions[id] = &aAction; } @@ -133,14 +125,14 @@ void CONTEXT_MENU::Clear() m_titleSet = false; // Remove all the entries from context menu - for( unsigned i = 0; i < m_menu.GetMenuItemCount(); ++i ) - m_menu.Destroy( m_menu.FindItemByPosition( 0 ) ); + for( unsigned i = 0; i < GetMenuItemCount(); ++i ) + Destroy( FindItemByPosition( 0 ) ); m_toolActions.clear(); } -void CONTEXT_MENU::CMEventHandler::onEvent( wxEvent& aEvent ) +void CONTEXT_MENU::onMenuEvent( wxEvent& aEvent ) { TOOL_EVENT evt; wxEventType type = aEvent.GetEventType(); @@ -155,21 +147,83 @@ void CONTEXT_MENU::CMEventHandler::onEvent( wxEvent& aEvent ) else if( type == wxEVT_COMMAND_MENU_SELECTED ) { // Store the selected position - m_menu->m_selected = aEvent.GetId(); + m_selected = aEvent.GetId(); // Check if there is a TOOL_ACTION for the given ID - if( m_menu->m_toolActions.count( aEvent.GetId() ) == 1 ) + if( m_toolActions.count( aEvent.GetId() ) == 1 ) { - evt = m_menu->m_toolActions[aEvent.GetId()]->MakeEvent(); + evt = m_toolActions[aEvent.GetId()]->MakeEvent(); } else { - // Handling non-action menu entries (e.g. items in clarification list) - evt = TOOL_EVENT( TC_COMMAND, TA_CONTEXT_MENU_CHOICE, aEvent.GetId() ); + OPT_TOOL_EVENT custom = handleCustomEvent( aEvent ); + if(custom) + evt = *custom; + else { + // Handling non-action menu entries (e.g. items in clarification list) + evt = TOOL_EVENT( TC_COMMAND, TA_CONTEXT_MENU_CHOICE, aEvent.GetId() ); + } } } // forward the action/update event to the TOOL_MANAGER - if( m_menu->m_tool ) - m_menu->m_tool->GetManager()->ProcessEvent( evt ); + if( m_tool ) + m_tool->GetManager()->ProcessEvent( evt ); +} + + +void CONTEXT_MENU::copyMenu( const CONTEXT_MENU* aParent, CONTEXT_MENU* aTarget ) const +{ + // Copy all the menu entries + for( unsigned i = 0; i < aParent->GetMenuItemCount(); ++i ) + { + wxMenuItem* item = aParent->FindItemByPosition( i ); + + if( item->IsSubMenu() ) + { +#ifdef DEBUG + // Submenus of a CONTEXT_MENU are supposed to be CONTEXT_MENUs as well + assert( dynamic_cast( item->GetSubMenu() ) ); +#endif + + CONTEXT_MENU* menu = new CONTEXT_MENU; + copyMenu( static_cast( item->GetSubMenu() ), menu ); + aTarget->AppendSubMenu( menu, item->GetItemLabel(), wxT( "" ) ); + } + else + { + wxMenuItem* newItem = new wxMenuItem( aTarget, item->GetId(), item->GetItemLabel(), + wxEmptyString, item->GetKind() ); + + aTarget->Append( newItem ); + copyItem( item, newItem ); + } + } + + // Copy tool actions that are available to choose from context menu + aTarget->m_toolActions = aParent->m_toolActions; +} + + +void CONTEXT_MENU::copyItem( const wxMenuItem* aSource, wxMenuItem* aDest ) const +{ + assert( !aSource->IsSubMenu() ); + + aDest->SetKind( aSource->GetKind() ); + aDest->SetHelp( aSource->GetHelp() ); + aDest->Enable( aSource->IsEnabled() ); + + if( aSource->IsCheckable() ) + aDest->Check( aSource->IsChecked() ); + + if( aSource->GetKind() == wxITEM_NORMAL ) + aDest->SetBitmap( aSource->GetBitmap() ); + + if( aSource->IsSubMenu() ) + { + CONTEXT_MENU* newMenu = new CONTEXT_MENU; + + copyMenu( static_cast( aSource->GetSubMenu() ), newMenu ); + aDest->SetSubMenu( newMenu ); + } } diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 0f0ee83533..dd77425a0c 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -308,8 +308,6 @@ int TOOL_MANAGER::GetPriority( int aToolId ) const for( std::deque::const_iterator it = m_activeTools.begin(), itEnd = m_activeTools.end(); it != itEnd; ++it ) { - std::cout << FindTool( *it )->GetName() << std::endl; - if( *it == aToolId ) return priority; @@ -497,7 +495,7 @@ bool TOOL_MANAGER::ProcessEvent( TOOL_EVENT& aEvent ) st->contextMenuTrigger = CMENU_OFF; boost::scoped_ptr menu( new CONTEXT_MENU( *st->contextMenu ) ); - GetEditFrame()->PopupMenu( menu->GetMenu() ); + GetEditFrame()->PopupMenu( menu.get() ); // If nothing was chosen from the context menu, we must notify the tool as well if( menu->GetSelected() < 0 ) diff --git a/include/tool/context_menu.h b/include/tool/context_menu.h index e181b576bb..a0a57b3d0b 100644 --- a/include/tool/context_menu.h +++ b/include/tool/context_menu.h @@ -37,7 +37,7 @@ class TOOL_INTERACTIVE; * Defines the structure of a context (usually right-click) popup menu * for a given tool. */ -class CONTEXT_MENU +class CONTEXT_MENU : public wxMenu { public: ///> Default constructor @@ -71,6 +71,7 @@ public: */ void Add( const TOOL_ACTION& aAction ); + /** * Function Clear() * Removes all the entries from the menu (as well as its title). It leaves the menu in the @@ -89,32 +90,32 @@ public: return m_selected; } - /** - * Function GetMenu() - * Returns the instance of wxMenu object used to display the menu. - */ - wxMenu* GetMenu() const + +protected: + virtual OPT_TOOL_EVENT handleCustomEvent ( wxEvent& aEvent ) { - return const_cast( &m_menu ); - } + return OPT_TOOL_EVENT(); + }; private: - ///> Class CMEventHandler takes care of handling menu events. After reception of particular - ///> events, it translates them to TOOL_EVENTs that may control tools. - class CMEventHandler : public wxEvtHandler - { - public: - ///> Default constructor - ///> aMenu is the CONTEXT_MENU instance for which it handles events. - CMEventHandler( CONTEXT_MENU* aMenu ) : m_menu( aMenu ) {}; + /** + * Function copyMenu + * Copies recursively all entries and submenus. + * @param aParent is the source. + * @param aTarget is the destination. + */ + void copyMenu( const CONTEXT_MENU* aParent, CONTEXT_MENU* aTarget ) const; - ///> Handler for menu events. - void onEvent( wxEvent& aEvent ); + /** + * Function copyItem + * Copies all properties of a menu entry. + */ + void copyItem( const wxMenuItem* aSource, wxMenuItem* aDest ) const; - private: - ///> CONTEXT_MENU instance for which it handles events. - CONTEXT_MENU* m_menu; - }; + void setupEvents(); + + ///> Event handler. + void onMenuEvent( wxEvent& aEvent ); friend class TOOL_INTERACTIVE; @@ -131,14 +132,11 @@ private: ///> Flag indicating that the menu title was set up. bool m_titleSet; - ///> Instance of wxMenu used for display of the context menu. - wxMenu m_menu; - ///> Stores the id number of selected item. int m_selected; ///> Instance of menu event handler. - CMEventHandler m_handler; + //CMEventHandler m_handler; ///> Creator of the menu TOOL_INTERACTIVE* m_tool; From e2feefc08cc85f21c13bf33226eb815fb344e9f4 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 13 May 2014 11:22:51 +0200 Subject: [PATCH 391/741] Fixed custom event handlers for CONTEXT_MENU. Moved menuCopy to CONTEXT_MENU copy constructor. --- common/tool/context_menu.cpp | 88 +++++++++++++++--------------------- include/tool/context_menu.h | 25 +++++----- 2 files changed, 50 insertions(+), 63 deletions(-) diff --git a/common/tool/context_menu.cpp b/common/tool/context_menu.cpp index 400193a16b..8bdcd57536 100644 --- a/common/tool/context_menu.cpp +++ b/common/tool/context_menu.cpp @@ -26,22 +26,48 @@ #include #include #include +#include #include CONTEXT_MENU::CONTEXT_MENU() : m_titleSet( false ), m_selected( -1 ), m_tool( NULL ) { + setCustomEventHandler( boost::bind( &CONTEXT_MENU::handleCustomEvent, this, _1 ) ); + setupEvents(); } CONTEXT_MENU::CONTEXT_MENU( const CONTEXT_MENU& aMenu ) : - m_titleSet( aMenu.m_titleSet ), m_selected( -1 ), m_tool( aMenu.m_tool ) + m_titleSet( aMenu.m_titleSet ), m_selected( -1 ), m_tool( aMenu.m_tool ), + m_toolActions( aMenu.m_toolActions ), m_customHandler( aMenu.m_customHandler ) { - setupEvents(); - // Copy all the menu entries - copyMenu( &aMenu, this ); + for( unsigned i = 0; i < aMenu.GetMenuItemCount(); ++i ) + { + wxMenuItem* item = aMenu.FindItemByPosition( i ); + + if( item->IsSubMenu() ) + { +#ifdef DEBUG + // Submenus of a CONTEXT_MENU are supposed to be CONTEXT_MENUs as well + assert( dynamic_cast( item->GetSubMenu() ) ); +#endif + + CONTEXT_MENU* menu = new CONTEXT_MENU( static_cast( *item->GetSubMenu() ) ); + AppendSubMenu( menu, item->GetItemLabel(), wxEmptyString ); + } + else + { + wxMenuItem* newItem = new wxMenuItem( this, item->GetId(), item->GetItemLabel(), + wxEmptyString, item->GetKind() ); + + Append( newItem ); + copyItem( item, newItem ); + } + } + + setupEvents(); } @@ -156,10 +182,12 @@ void CONTEXT_MENU::onMenuEvent( wxEvent& aEvent ) } else { - OPT_TOOL_EVENT custom = handleCustomEvent( aEvent ); - if(custom) + OPT_TOOL_EVENT custom = m_customHandler( aEvent ); + + if( custom ) evt = *custom; - else { + else + { // Handling non-action menu entries (e.g. items in clarification list) evt = TOOL_EVENT( TC_COMMAND, TA_CONTEXT_MENU_CHOICE, aEvent.GetId() ); } @@ -167,47 +195,13 @@ void CONTEXT_MENU::onMenuEvent( wxEvent& aEvent ) } // forward the action/update event to the TOOL_MANAGER - if( m_tool ) - m_tool->GetManager()->ProcessEvent( evt ); -} - - -void CONTEXT_MENU::copyMenu( const CONTEXT_MENU* aParent, CONTEXT_MENU* aTarget ) const -{ - // Copy all the menu entries - for( unsigned i = 0; i < aParent->GetMenuItemCount(); ++i ) - { - wxMenuItem* item = aParent->FindItemByPosition( i ); - - if( item->IsSubMenu() ) - { -#ifdef DEBUG - // Submenus of a CONTEXT_MENU are supposed to be CONTEXT_MENUs as well - assert( dynamic_cast( item->GetSubMenu() ) ); -#endif - - CONTEXT_MENU* menu = new CONTEXT_MENU; - copyMenu( static_cast( item->GetSubMenu() ), menu ); - aTarget->AppendSubMenu( menu, item->GetItemLabel(), wxT( "" ) ); - } - else - { - wxMenuItem* newItem = new wxMenuItem( aTarget, item->GetId(), item->GetItemLabel(), - wxEmptyString, item->GetKind() ); - - aTarget->Append( newItem ); - copyItem( item, newItem ); - } - } - - // Copy tool actions that are available to choose from context menu - aTarget->m_toolActions = aParent->m_toolActions; + TOOL_MANAGER::Instance().ProcessEvent( evt ); } void CONTEXT_MENU::copyItem( const wxMenuItem* aSource, wxMenuItem* aDest ) const { - assert( !aSource->IsSubMenu() ); + assert( !aSource->IsSubMenu() ); // it does not transfer submenus aDest->SetKind( aSource->GetKind() ); aDest->SetHelp( aSource->GetHelp() ); @@ -218,12 +212,4 @@ void CONTEXT_MENU::copyItem( const wxMenuItem* aSource, wxMenuItem* aDest ) cons if( aSource->GetKind() == wxITEM_NORMAL ) aDest->SetBitmap( aSource->GetBitmap() ); - - if( aSource->IsSubMenu() ) - { - CONTEXT_MENU* newMenu = new CONTEXT_MENU; - - copyMenu( static_cast( aSource->GetSubMenu() ), newMenu ); - aDest->SetSubMenu( newMenu ); - } } diff --git a/include/tool/context_menu.h b/include/tool/context_menu.h index a0a57b3d0b..709e0d34e7 100644 --- a/include/tool/context_menu.h +++ b/include/tool/context_menu.h @@ -28,6 +28,7 @@ #include #include #include +#include class TOOL_INTERACTIVE; @@ -90,28 +91,25 @@ public: return m_selected; } - protected: - virtual OPT_TOOL_EVENT handleCustomEvent ( wxEvent& aEvent ) + void setCustomEventHandler( boost::function aHandler ) + { + m_customHandler = aHandler; + } + + virtual OPT_TOOL_EVENT handleCustomEvent(const wxEvent& aEvent ) { return OPT_TOOL_EVENT(); - }; + } private: - /** - * Function copyMenu - * Copies recursively all entries and submenus. - * @param aParent is the source. - * @param aTarget is the destination. - */ - void copyMenu( const CONTEXT_MENU* aParent, CONTEXT_MENU* aTarget ) const; - /** * Function copyItem - * Copies all properties of a menu entry. + * Copies all properties of a menu entry to another. */ void copyItem( const wxMenuItem* aSource, wxMenuItem* aDest ) const; + ///> Initializes handlers for events. void setupEvents(); ///> Event handler. @@ -146,6 +144,9 @@ private: /// Associates tool actions with menu item IDs. Non-owning. std::map m_toolActions; + + /// Custom events handler, allows to translate wxEvents to TOOL_EVENTs. + boost::function m_customHandler; }; #endif From 3f2fc340754c543d2f2d7391f840525caf5c89e1 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 13 May 2014 11:22:51 +0200 Subject: [PATCH 392/741] WX_UNIT_TEXT can handle default value. --- common/wxunittext.cpp | 12 ++++++++++-- include/wxunittext.h | 3 +++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/common/wxunittext.cpp b/common/wxunittext.cpp index f33be9ec5a..743f973dce 100644 --- a/common/wxunittext.cpp +++ b/common/wxunittext.cpp @@ -101,13 +101,15 @@ void WX_UNIT_TEXT::SetUnits( EDA_UNITS_T aUnits, bool aConvert ) void WX_UNIT_TEXT::SetValue( double aValue ) { - assert( aValue >= 0.0 ); - if( aValue >= 0.0 ) { m_inputValue->SetValue( wxString( Double2Str( aValue ).c_str(), wxConvUTF8 ) ); m_inputValue->MarkDirty(); } + else + { + m_inputValue->SetValue( DEFAULT_VALUE ); + } } @@ -169,6 +171,9 @@ boost::optional WX_UNIT_TEXT::GetValue() const wxString text = m_inputValue->GetValue(); double value; + if( text == DEFAULT_VALUE ) + return boost::optional( -1.0 ); + if( !text.ToDouble( &value ) ) return boost::optional(); @@ -189,3 +194,6 @@ void WX_UNIT_TEXT::onSpinDownEvent( wxSpinEvent& aEvent ) if( newValue >= 0.0 ) SetValue( newValue ); } + + +const wxString WX_UNIT_TEXT::DEFAULT_VALUE = _( "default "); diff --git a/include/wxunittext.h b/include/wxunittext.h index 92791f09ff..54c52e14dc 100644 --- a/include/wxunittext.h +++ b/include/wxunittext.h @@ -136,6 +136,9 @@ protected: ///> Step size (added/subtracted difference if spin buttons are used). double m_step; + + ///> Default value (or non-specified) + static const wxString DEFAULT_VALUE; }; #endif /* WXUNITTEXT_H_ */ From 4577aed921f48e5c99b64381adb2288054fec0a8 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 13 May 2014 11:22:51 +0200 Subject: [PATCH 393/741] Minor reorganization of handling custom events with CONTEXT_MENU. --- common/tool/context_menu.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/common/tool/context_menu.cpp b/common/tool/context_menu.cpp index 8bdcd57536..7413761ed3 100644 --- a/common/tool/context_menu.cpp +++ b/common/tool/context_menu.cpp @@ -160,7 +160,8 @@ void CONTEXT_MENU::Clear() void CONTEXT_MENU::onMenuEvent( wxEvent& aEvent ) { - TOOL_EVENT evt; + OPT_TOOL_EVENT evt; + wxEventType type = aEvent.GetEventType(); // When the currently chosen item in the menu is changed, an update event is issued. @@ -182,20 +183,16 @@ void CONTEXT_MENU::onMenuEvent( wxEvent& aEvent ) } else { - OPT_TOOL_EVENT custom = m_customHandler( aEvent ); + evt = m_customHandler( aEvent ); - if( custom ) - evt = *custom; - else - { - // Handling non-action menu entries (e.g. items in clarification list) + // Handling non-action menu entries (e.g. items in clarification list) + if( !evt ) evt = TOOL_EVENT( TC_COMMAND, TA_CONTEXT_MENU_CHOICE, aEvent.GetId() ); - } } } // forward the action/update event to the TOOL_MANAGER - TOOL_MANAGER::Instance().ProcessEvent( evt ); + TOOL_MANAGER::Instance().ProcessEvent( *evt ); } From ffe212ea5e8b928bd9f30bf3c26de7142af9541a Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 13 May 2014 11:22:51 +0200 Subject: [PATCH 394/741] Initial support for custom track width & via size. --- pcbnew/class_board.cpp | 6 ++ pcbnew/class_board.h | 125 +++++++++++++++++++++++++++++++++++++---- 2 files changed, 121 insertions(+), 10 deletions(-) diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index a7b4e35987..81399f456f 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -106,6 +106,12 @@ BOARD::BOARD() : SetCurrentNetClass( m_NetClasses.GetDefault()->GetName() ); + // Set sensible initial values for custom track width & via size + m_useCustomTrackVia = false; + m_customTrackWidth = GetCurrentTrackWidth(); + m_customViaSize.m_Diameter = GetCurrentViaSize(); + m_customViaSize.m_Drill = GetCurrentViaDrill(); + // Initialize ratsnest m_ratsnest = new RN_DATA( this ); m_ratsnestViewItem = new KIGFX::RATSNEST_VIEWITEM( m_ratsnest ); diff --git a/pcbnew/class_board.h b/pcbnew/class_board.h index 308f69a13d..7fc8987198 100644 --- a/pcbnew/class_board.h +++ b/pcbnew/class_board.h @@ -258,6 +258,15 @@ private: // Index for m_TrackWidthList to select the value. unsigned m_trackWidthIndex; + ///> Use custom values for track/via sizes (not specified in net class nor in the size lists). + bool m_useCustomTrackVia; + + ///> Custom track width (used after UseCustomTrackViaSize( true ) was called). + int m_customTrackWidth; + + ///> Custom via size (used after UseCustomTrackViaSize( true ) was called). + VIA_DIMENSION m_customViaSize; + /** * Function chainMarkedSegments * is used by MarkTrace() to set the BUSY flag of connected segments of the trace @@ -303,15 +312,14 @@ public: // the first value is always the value of the current NetClass // The others values are extra values - // The first value is the current netclass via size // TODO verify + // The first value is the current netclass via size /// Vias size and drill list std::vector m_ViasDimensionsList; - // The first value is the current netclass track width // TODO verify + // The first value is the current netclass track width /// Track width list std::vector m_TrackWidthList; - BOARD(); ~BOARD(); @@ -1074,12 +1082,36 @@ public: /** * Function GetCurrentTrackWidth * @return the current track width, according to the selected options - * ( using the default netclass value or a preset value ) + * ( using the default netclass value or a preset/custom value ) * the default netclass is always in m_TrackWidthList[0] */ int GetCurrentTrackWidth() const { - return m_TrackWidthList[m_trackWidthIndex]; + if( m_useCustomTrackVia ) + return m_customTrackWidth; + else + return m_TrackWidthList[m_trackWidthIndex]; + } + + /** + * Function SetCustomTrackWidth + * Sets custom width for track (i.e. not available in netclasses or preset list). To have + * it returned with GetCurrentTrackWidth() you need to enable custom track & via sizes + * (UseCustomTrackViaSize()). + * @param aWidth is the new track width. + */ + void SetCustomTrackWidth( int aWidth ) + { + m_customTrackWidth = aWidth; + } + + /** + * Function GetCustomTrackWidth + * @return Current custom width for a track. + */ + int GetCustomTrackWidth() const + { + return m_customTrackWidth; } /** @@ -1099,24 +1131,76 @@ public: /** * Function GetCurrentViaSize * @return the current via size, according to the selected options - * ( using the default netclass value or a preset value ) + * ( using the default netclass value or a preset/custom value ) * the default netclass is always in m_TrackWidthList[0] */ int GetCurrentViaSize() { - return m_ViasDimensionsList[m_viaSizeIndex].m_Diameter; + if( m_useCustomTrackVia ) + return m_customViaSize.m_Diameter; + else + return m_ViasDimensionsList[m_viaSizeIndex].m_Diameter; } + /** + * Function SetCustomViaSize + * Sets custom size for via diameter (i.e. not available in netclasses or preset list). To have + * it returned with GetCurrentViaSize() you need to enable custom track & via sizes + * (UseCustomTrackViaSize()). + * @param aSize is the new drill diameter. + */ + void SetCustomViaSize( int aSize ) + { + m_customViaSize.m_Diameter = aSize; + } + + /** + * Function GetCustomViaSize + * @return Current custom size for the via diameter. + */ + int GetCustomViaSize() const + { + return m_customViaSize.m_Diameter; + } + + /** * Function GetCurrentViaDrill * @return the current via size, according to the selected options - * ( using the default netclass value or a preset value ) + * ( using the default netclass value or a preset/custom value ) * the default netclass is always in m_TrackWidthList[0] */ int GetCurrentViaDrill() { - return m_ViasDimensionsList[m_viaSizeIndex].m_Drill > 0 ? - m_ViasDimensionsList[m_viaSizeIndex].m_Drill : -1; + int drill; + + if( m_useCustomTrackVia ) + drill = m_customViaSize.m_Drill; + else + drill = m_ViasDimensionsList[m_viaSizeIndex].m_Drill; + + return drill > 0 ? drill : -1; + } + + /** + * Function SetCustomViaDrill + * Sets custom size for via drill (i.e. not available in netclasses or preset list). To have + * it returned with GetCurrentViaDrill() you need to enable custom track & via sizes + * (UseCustomTrackViaSize()). + * @param aDrill is the new drill size. + */ + void SetCustomViaDrill( int aDrill ) + { + m_customViaSize.m_Drill = aDrill; + } + + /** + * Function GetCustomViaDrill + * @return Current custom size for the via drill. + */ + int GetCustomViaDrill() const + { + return m_customViaSize.m_Drill; } /** @@ -1133,6 +1217,27 @@ public: */ int GetCurrentMicroViaDrill(); + /** + * Function UseCustomTrackViaSize + * Enables/disables custom track/via size settings. If enabled, values set with + * SetCustomTrackWidth()/SetCustomViaSize()/SetCustomViaDrill() are used for newly created + * tracks and vias. + * @param aEnabled decides if custom settings should be used for new tracks/vias. + */ + void UseCustomTrackViaSize( bool aEnabled ) + { + m_useCustomTrackVia = aEnabled; + } + + /** + * Function UseCustomTrackViaSize + * @return True if custom sizes of tracks & vias are enabled, false otherwise. + */ + bool UseCustomTrackViaSize() const + { + return m_useCustomTrackVia; + } + /***************************************************************************/ wxString GetClass() const From 917e47397d562315c691cc8cf3f57957b1b27b6d Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 13 May 2014 11:22:51 +0200 Subject: [PATCH 395/741] Custom track/via size settings nicely cooperate with other options. --- pcbnew/pcbnew_id.h | 1 + pcbnew/tools/common_actions.cpp | 1 + pcbnew/tools/common_actions.h | 2 ++ pcbnew/tools/pcbnew_control.cpp | 12 ++++++++++++ 4 files changed, 16 insertions(+) diff --git a/pcbnew/pcbnew_id.h b/pcbnew/pcbnew_id.h index 0ceb7ccde8..421aad1e70 100644 --- a/pcbnew/pcbnew_id.h +++ b/pcbnew/pcbnew_id.h @@ -170,6 +170,7 @@ enum pcbnew_ids ID_AUX_TOOLBAR_PCB_SELECT_AUTO_WIDTH, ID_POPUP_PCB_SELECT_WIDTH_START_RANGE, ID_POPUP_PCB_SELECT_WIDTH, + ID_POPUP_PCB_SELECT_CUSTOM, ID_POPUP_PCB_SELECT_AUTO_WIDTH, ID_POPUP_PCB_SELECT_USE_NETCLASS_VALUES, ID_POPUP_PCB_SELECT_WIDTH1, diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 3ff65af56b..539de05ceb 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -241,6 +241,7 @@ TOOL_ACTION COMMON_ACTIONS::viaSizeDec( "pcbnew.viaSizeDec", AS_GLOBAL, '\\', "", "" ); +TOOL_ACTION COMMON_ACTIONS::trackViaSizeChanged( "pcbnew.trackViaSizeChanged", AS_GLOBAL, 0, "", "" ); // Miscellaneous TOOL_ACTION COMMON_ACTIONS::resetCoords( "pcbnew.resetCoords", diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index 38569af29a..671a509699 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -137,6 +137,8 @@ public: static TOOL_ACTION viaSizeInc; static TOOL_ACTION viaSizeDec; + static TOOL_ACTION trackViaSizeChanged; // notification + // Miscellaneous static TOOL_ACTION resetCoords; static TOOL_ACTION switchUnits; diff --git a/pcbnew/tools/pcbnew_control.cpp b/pcbnew/tools/pcbnew_control.cpp index ec8b086bab..378ae9a580 100644 --- a/pcbnew/tools/pcbnew_control.cpp +++ b/pcbnew/tools/pcbnew_control.cpp @@ -422,11 +422,14 @@ int PCBNEW_CONTROL::TrackWidthInc( TOOL_EVENT& aEvent ) widthIndex = board->m_TrackWidthList.size() - 1; board->SetTrackWidthIndex( widthIndex ); + board->UseCustomTrackViaSize( false ); wxUpdateUIEvent dummy; getEditFrame()->OnUpdateSelectTrackWidth( dummy ); setTransitions(); + m_toolMgr->RunAction( COMMON_ACTIONS::trackViaSizeChanged ); + return 0; } @@ -440,11 +443,14 @@ int PCBNEW_CONTROL::TrackWidthDec( TOOL_EVENT& aEvent ) widthIndex = 0; board->SetTrackWidthIndex( widthIndex ); + board->UseCustomTrackViaSize( false ); wxUpdateUIEvent dummy; getEditFrame()->OnUpdateSelectTrackWidth( dummy ); setTransitions(); + m_toolMgr->RunAction( COMMON_ACTIONS::trackViaSizeChanged ); + return 0; } @@ -458,11 +464,14 @@ int PCBNEW_CONTROL::ViaSizeInc( TOOL_EVENT& aEvent ) sizeIndex = board->m_ViasDimensionsList.size() - 1; board->SetViaSizeIndex( sizeIndex ); + board->UseCustomTrackViaSize( false ); wxUpdateUIEvent dummy; getEditFrame()->OnUpdateSelectViaSize( dummy ); setTransitions(); + m_toolMgr->RunAction( COMMON_ACTIONS::trackViaSizeChanged ); + return 0; } @@ -476,11 +485,14 @@ int PCBNEW_CONTROL::ViaSizeDec( TOOL_EVENT& aEvent ) sizeIndex = 0; board->SetViaSizeIndex( sizeIndex ); + board->UseCustomTrackViaSize( false ); wxUpdateUIEvent dummy; getEditFrame()->OnUpdateSelectViaSize( dummy ); setTransitions(); + m_toolMgr->RunAction( COMMON_ACTIONS::trackViaSizeChanged ); + return 0; } From 7ec1313cbcff4df62c039bb79ef1ef1caa1ce909 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 13 May 2014 11:22:51 +0200 Subject: [PATCH 396/741] Custom width settings taken into account in wxUpdateUIEvent handlers. --- include/wxPcbStruct.h | 1 + pcbnew/pcbframe.cpp | 2 ++ pcbnew/pcbnew_id.h | 2 +- pcbnew/toolbars_update_user_interface.cpp | 16 +++++++++++++--- 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index 0e19dc8e22..b9321922a8 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -248,6 +248,7 @@ public: void OnUpdateZoneDisplayStyle( wxUpdateUIEvent& aEvent ); void OnUpdateSelectTrackWidth( wxUpdateUIEvent& aEvent ); void OnUpdateSelectAutoTrackWidth( wxUpdateUIEvent& aEvent ); + void OnUpdateSelectCustomTrackWidth( wxUpdateUIEvent& aEvent ); void OnUpdateAutoPlaceModulesMode( wxUpdateUIEvent& aEvent ); void OnUpdateAutoPlaceTracksMode( wxUpdateUIEvent& aEvent ); void OnUpdateMuWaveToolbar( wxUpdateUIEvent& aEvent ); diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 9f66d54d21..212dd6a83c 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -275,6 +275,8 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME ) EVT_UPDATE_UI( ID_AUX_TOOLBAR_PCB_SELECT_AUTO_WIDTH, PCB_EDIT_FRAME::OnUpdateSelectAutoTrackWidth ) EVT_UPDATE_UI( ID_POPUP_PCB_SELECT_AUTO_WIDTH, PCB_EDIT_FRAME::OnUpdateSelectAutoTrackWidth ) + EVT_UPDATE_UI( ID_POPUP_PCB_SELECT_CUSTOM_WIDTH, + PCB_EDIT_FRAME::OnUpdateSelectCustomTrackWidth ) EVT_UPDATE_UI( ID_AUX_TOOLBAR_PCB_VIA_SIZE, PCB_EDIT_FRAME::OnUpdateSelectViaSize ) EVT_UPDATE_UI( ID_TOOLBARH_PCB_MODE_MODULE, PCB_EDIT_FRAME::OnUpdateAutoPlaceModulesMode ) EVT_UPDATE_UI( ID_TOOLBARH_PCB_MODE_TRACKS, PCB_EDIT_FRAME::OnUpdateAutoPlaceTracksMode ) diff --git a/pcbnew/pcbnew_id.h b/pcbnew/pcbnew_id.h index 421aad1e70..785c92417f 100644 --- a/pcbnew/pcbnew_id.h +++ b/pcbnew/pcbnew_id.h @@ -170,7 +170,7 @@ enum pcbnew_ids ID_AUX_TOOLBAR_PCB_SELECT_AUTO_WIDTH, ID_POPUP_PCB_SELECT_WIDTH_START_RANGE, ID_POPUP_PCB_SELECT_WIDTH, - ID_POPUP_PCB_SELECT_CUSTOM, + ID_POPUP_PCB_SELECT_CUSTOM_WIDTH, ID_POPUP_PCB_SELECT_AUTO_WIDTH, ID_POPUP_PCB_SELECT_USE_NETCLASS_VALUES, ID_POPUP_PCB_SELECT_WIDTH1, diff --git a/pcbnew/toolbars_update_user_interface.cpp b/pcbnew/toolbars_update_user_interface.cpp index ac2f65a490..78b44145bb 100644 --- a/pcbnew/toolbars_update_user_interface.cpp +++ b/pcbnew/toolbars_update_user_interface.cpp @@ -62,7 +62,9 @@ void PCB_EDIT_FRAME::OnUpdateSelectTrackWidth( wxUpdateUIEvent& aEvent ) { bool check = ( ( ( ID_POPUP_PCB_SELECT_WIDTH1 + (int) GetBoard()->GetTrackWidthIndex() ) == aEvent.GetId() ) && - !GetDesignSettings().m_UseConnectedTrackWidth ); + !GetDesignSettings().m_UseConnectedTrackWidth && + !GetBoard()->UseCustomTrackViaSize() ); + aEvent.Check( check ); } } @@ -70,7 +72,14 @@ void PCB_EDIT_FRAME::OnUpdateSelectTrackWidth( wxUpdateUIEvent& aEvent ) void PCB_EDIT_FRAME::OnUpdateSelectAutoTrackWidth( wxUpdateUIEvent& aEvent ) { - aEvent.Check( GetDesignSettings().m_UseConnectedTrackWidth ); + aEvent.Check( GetDesignSettings().m_UseConnectedTrackWidth && + !GetBoard()->UseCustomTrackViaSize() ); +} + + +void PCB_EDIT_FRAME::OnUpdateSelectCustomTrackWidth( wxUpdateUIEvent& aEvent ) +{ + aEvent.Check( GetBoard()->UseCustomTrackViaSize() ); } @@ -87,7 +96,8 @@ void PCB_EDIT_FRAME::OnUpdateSelectViaSize( wxUpdateUIEvent& aEvent ) { bool check = ( ( ( ID_POPUP_PCB_SELECT_VIASIZE1 + (int) GetBoard()->GetViaSizeIndex() ) == aEvent.GetId() ) && - !GetDesignSettings().m_UseConnectedTrackWidth ); + !GetDesignSettings().m_UseConnectedTrackWidth && + !GetBoard()->UseCustomTrackViaSize() ); aEvent.Check( check ); } From cd8aaee160cda2189ce27522b91cb32a9aac0f7c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 13 May 2014 11:22:51 +0200 Subject: [PATCH 397/741] Moved most of the board design rules related fields & methods to BOARD_DESIGN_SETTINGS class. --- include/class_board_design_settings.h | 208 ++++++++++++++- pcbnew/autorouter/solve.cpp | 10 +- pcbnew/class_board.cpp | 54 ++-- pcbnew/class_board.h | 241 +----------------- pcbnew/class_board_design_settings.cpp | 33 ++- pcbnew/dialogs/dialog_design_rules.cpp | 8 +- .../dialog_global_edit_tracks_and_vias.cpp | 12 +- pcbnew/edit_track_width.cpp | 6 +- pcbnew/editrack-part2.cpp | 4 +- pcbnew/editrack.cpp | 18 +- pcbnew/event_handlers_tracks_vias_sizes.cpp | 12 +- pcbnew/hotkeys_board_editor.cpp | 12 +- pcbnew/kicad_plugin.cpp | 12 +- pcbnew/legacy_plugin.cpp | 37 +-- pcbnew/muonde.cpp | 10 +- pcbnew/onrightclick.cpp | 23 +- pcbnew/pcb_parser.cpp | 6 +- pcbnew/tool_pcb.cpp | 24 +- pcbnew/toolbars_update_user_interface.cpp | 22 +- pcbnew/tools/pcbnew_control.cpp | 32 +-- 20 files changed, 393 insertions(+), 391 deletions(-) diff --git a/include/class_board_design_settings.h b/include/class_board_design_settings.h index 67e0c73a88..70ba89f4ae 100644 --- a/include/class_board_design_settings.h +++ b/include/class_board_design_settings.h @@ -10,6 +10,41 @@ #include #include +/** + * Struct VIA_DIMENSION + * is a small helper container to handle a stock of specific vias each with + * unique diameter and drill sizes in the BOARD class. + */ +struct VIA_DIMENSION +{ + int m_Diameter; // <= 0 means use Netclass via diameter + int m_Drill; // <= 0 means use Netclass via drill + + VIA_DIMENSION() + { + m_Diameter = 0; + m_Drill = 0; + } + + VIA_DIMENSION( int aDiameter, int aDrill ) + { + m_Diameter = aDiameter; + m_Drill = aDrill; + } + + bool operator==( const VIA_DIMENSION& aOther ) const + { + return ( m_Diameter == aOther.m_Diameter ) && ( m_Drill == aOther.m_Drill ); + } + + bool operator<( const VIA_DIMENSION& aOther ) const + { + if( m_Diameter != aOther.m_Diameter ) + return m_Diameter < aOther.m_Diameter; + + return m_Drill < aOther.m_Drill; + } +}; /** * Class BOARD_DESIGN_SETTINGS @@ -18,6 +53,14 @@ class BOARD_DESIGN_SETTINGS { public: + // The first value is the current netclass via size + /// Vias size and drill list + std::vector m_ViasDimensionsList; + + // The first value is the current netclass track width + /// Track width list + std::vector m_TrackWidthList; + bool m_MicroViasAllowed; ///< true to allow micro vias bool m_BlindBuriedViaAllowed; ///< true to allow blind/buried vias VIATYPE_T m_CurrentViaType; ///< via type (VIA_BLIND_BURIED, VIA_THROUGH VIA_MICROVIA) @@ -52,9 +95,155 @@ public: D_PAD m_Pad_Master; -public: BOARD_DESIGN_SETTINGS(); + /** + * Function GetTrackWidthIndex + * @return the current track width list index. + */ + unsigned GetTrackWidthIndex() const { return m_trackWidthIndex; } + + /** + * Function SetTrackWidthIndex + * sets the current track width list index to \a aIndex. + * + * @param aIndex is the track width list index. + */ + void SetTrackWidthIndex( unsigned aIndex ); + + /** + * Function GetCurrentTrackWidth + * @return the current track width, according to the selected options + * ( using the default netclass value or a preset/custom value ) + * the default netclass is always in m_TrackWidthList[0] + */ + int GetCurrentTrackWidth() const + { + return m_useCustomTrackVia ? m_customTrackWidth : m_TrackWidthList[m_trackWidthIndex]; + } + + /** + * Function SetCustomTrackWidth + * Sets custom width for track (i.e. not available in netclasses or preset list). To have + * it returned with GetCurrentTrackWidth() you need to enable custom track & via sizes + * (UseCustomTrackViaSize()). + * @param aWidth is the new track width. + */ + void SetCustomTrackWidth( int aWidth ) + { + m_customTrackWidth = aWidth; + } + + /** + * Function GetCustomTrackWidth + * @return Current custom width for a track. + */ + int GetCustomTrackWidth() const + { + return m_customTrackWidth; + } + + /** + * Function GetViaSizeIndex + * @return the current via size list index. + */ + unsigned GetViaSizeIndex() const { return m_viaSizeIndex; } + + /** + * Function SetViaSizeIndex + * sets the current via size list index to \a aIndex. + * + * @param aIndex is the via size list index. + */ + void SetViaSizeIndex( unsigned aIndex ); + + /** + * Function GetCurrentViaSize + * @return the current via size, according to the selected options + * ( using the default netclass value or a preset/custom value ) + * the default netclass is always in m_TrackWidthList[0] + */ + int GetCurrentViaSize() const + { + if( m_useCustomTrackVia ) + return m_customViaSize.m_Diameter; + else + return m_ViasDimensionsList[m_viaSizeIndex].m_Diameter; + } + + /** + * Function SetCustomViaSize + * Sets custom size for via diameter (i.e. not available in netclasses or preset list). To have + * it returned with GetCurrentViaSize() you need to enable custom track & via sizes + * (UseCustomTrackViaSize()). + * @param aSize is the new drill diameter. + */ + void SetCustomViaSize( int aSize ) + { + m_customViaSize.m_Diameter = aSize; + } + + /** + * Function GetCustomViaSize + * @return Current custom size for the via diameter. + */ + int GetCustomViaSize() const + { + return m_customViaSize.m_Diameter; + } + + /** + * Function GetCurrentViaDrill + * @return the current via size, according to the selected options + * ( using the default netclass value or a preset/custom value ) + * the default netclass is always in m_TrackWidthList[0] + */ + int GetCurrentViaDrill() const; + + /** + * Function SetCustomViaDrill + * Sets custom size for via drill (i.e. not available in netclasses or preset list). To have + * it returned with GetCurrentViaDrill() you need to enable custom track & via sizes + * (UseCustomTrackViaSize()). + * @param aDrill is the new drill size. + */ + void SetCustomViaDrill( int aDrill ) + { + m_customViaSize.m_Drill = aDrill; + } + + /** + * Function GetCustomViaDrill + * @return Current custom size for the via drill. + */ + int GetCustomViaDrill() const + { + return m_customViaSize.m_Drill; + } + + // TODO microvia methods should go here + + /** + * Function UseCustomTrackViaSize + * Enables/disables custom track/via size settings. If enabled, values set with + * SetCustomTrackWidth()/SetCustomViaSize()/SetCustomViaDrill() are used for newly created + * tracks and vias. + * @param aEnabled decides if custom settings should be used for new tracks/vias. + */ + void UseCustomTrackViaSize( bool aEnabled ) + { + m_useCustomTrackVia = aEnabled; + } + + /** + * Function UseCustomTrackViaSize + * @return True if custom sizes of tracks & vias are enabled, false otherwise. + */ + bool UseCustomTrackViaSize() const + { + return m_useCustomTrackVia; + } + /** * Function GetVisibleLayers * returns a bit-mask of all the layers that are visible @@ -196,6 +385,23 @@ public: void SetBoardThickness( int aThickness ) { m_boardThickness = aThickness; } private: + /// Index for #m_ViasDimensionsList to select the current via size. + /// 0 is the index selection of the default value Netclass + unsigned m_viaSizeIndex; + + // Index for m_TrackWidthList to select the value. + /// 0 is the index selection of the default value Netclass + unsigned m_trackWidthIndex; + + ///> Use custom values for track/via sizes (not specified in net class nor in the size lists). + bool m_useCustomTrackVia; + + ///> Custom track width (used after UseCustomTrackViaSize( true ) was called). + int m_customTrackWidth; + + ///> Custom via size (used after UseCustomTrackViaSize( true ) was called). + VIA_DIMENSION m_customViaSize; + int m_CopperLayerCount; ///< Number of copper layers for this design LAYER_MSK m_EnabledLayers; ///< Bit-mask for layer enabling LAYER_MSK m_VisibleLayers; ///< Bit-mask for layer visibility diff --git a/pcbnew/autorouter/solve.cpp b/pcbnew/autorouter/solve.cpp index 8ddf52f040..9da2804e9f 100644 --- a/pcbnew/autorouter/solve.cpp +++ b/pcbnew/autorouter/solve.cpp @@ -428,7 +428,7 @@ static int Autoroute_One_Track( PCB_EDIT_FRAME* pcbframe, result = NOSUCCESS; - marge = s_Clearance + ( pcbframe->GetBoard()->GetCurrentTrackWidth() / 2 ); + marge = s_Clearance + ( pcbframe->GetDesignSettings().GetCurrentTrackWidth() / 2 ); /* clear direction flags */ i = RoutingMatrix.m_Nrows * RoutingMatrix.m_Ncols * sizeof(DIR_CELL); @@ -1174,7 +1174,7 @@ static void OrCell_Trace( BOARD* pcb, int col, int row, ( RoutingMatrix.m_GridRouting * col ))); g_CurrentTrackSegment->SetEnd( g_CurrentTrackSegment->GetStart() ); - g_CurrentTrackSegment->SetWidth( pcb->GetCurrentViaSize() ); + g_CurrentTrackSegment->SetWidth( pcb->GetDesignSettings().GetCurrentViaSize() ); newVia->SetViaType( pcb->GetDesignSettings().m_CurrentViaType ); g_CurrentTrackSegment->SetNetCode( current_net_code ); @@ -1233,7 +1233,7 @@ static void OrCell_Trace( BOARD* pcb, int col, int row, } } - g_CurrentTrackSegment->SetWidth( pcb->GetCurrentTrackWidth() ); + g_CurrentTrackSegment->SetWidth( pcb->GetDesignSettings().GetCurrentTrackWidth() ); if( g_CurrentTrackSegment->GetStart() != g_CurrentTrackSegment->GetEnd() ) { @@ -1275,8 +1275,8 @@ static void AddNewTrace( PCB_EDIT_FRAME* pcbframe, wxDC* DC ) EDA_DRAW_PANEL* panel = pcbframe->GetCanvas(); PCB_SCREEN* screen = pcbframe->GetScreen(); - marge = s_Clearance + ( pcbframe->GetBoard()->GetCurrentTrackWidth() / 2 ); - via_marge = s_Clearance + ( pcbframe->GetBoard()->GetCurrentViaSize() / 2 ); + marge = s_Clearance + ( pcbframe->GetDesignSettings().GetCurrentTrackWidth() / 2 ); + via_marge = s_Clearance + ( pcbframe->GetDesignSettings().GetCurrentViaSize() / 2 ); dx1 = g_CurrentTrackSegment->GetEnd().x - g_CurrentTrackSegment->GetStart().x; dy1 = g_CurrentTrackSegment->GetEnd().y - g_CurrentTrackSegment->GetStart().y; diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index 81399f456f..c5784848d7 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -94,8 +94,8 @@ BOARD::BOARD() : m_NetClasses.GetDefault()->SetDescription( _( "This is the default net class." ) ); - m_viaSizeIndex = 0; - m_trackWidthIndex = 0; + m_designSettings.SetViaSizeIndex( 0 ); + m_designSettings.SetTrackWidthIndex( 0 ); /* Dick 5-Feb-2012: this seems unnecessary. I don't believe the comment near line 70 of class_netclass.cpp. I stepped through with debugger. @@ -107,10 +107,10 @@ BOARD::BOARD() : SetCurrentNetClass( m_NetClasses.GetDefault()->GetName() ); // Set sensible initial values for custom track width & via size - m_useCustomTrackVia = false; - m_customTrackWidth = GetCurrentTrackWidth(); - m_customViaSize.m_Diameter = GetCurrentViaSize(); - m_customViaSize.m_Drill = GetCurrentViaDrill(); + m_designSettings.UseCustomTrackViaSize( false ); + m_designSettings.SetCustomTrackWidth( m_designSettings.GetCurrentTrackWidth() ); + m_designSettings.SetCustomViaSize( m_designSettings.GetCurrentViaSize() ); + m_designSettings.SetCustomViaDrill( m_designSettings.GetCurrentViaDrill() ); // Initialize ratsnest m_ratsnest = new RN_DATA( this ); @@ -331,37 +331,37 @@ bool BOARD::SetCurrentNetClass( const wxString& aNetClassName ) m_currentNetClassName = netClass->GetName(); // Initialize others values: - if( m_ViasDimensionsList.size() == 0 ) + if( m_designSettings.m_ViasDimensionsList.size() == 0 ) { VIA_DIMENSION viadim; lists_sizes_modified = true; - m_ViasDimensionsList.push_back( viadim ); + m_designSettings.m_ViasDimensionsList.push_back( viadim ); } - if( m_TrackWidthList.size() == 0 ) + if( m_designSettings.m_TrackWidthList.size() == 0 ) { lists_sizes_modified = true; - m_TrackWidthList.push_back( 0 ); + m_designSettings.m_TrackWidthList.push_back( 0 ); } /* note the m_ViasDimensionsList[0] and m_TrackWidthList[0] values * are always the Netclass values */ - if( m_ViasDimensionsList[0].m_Diameter != netClass->GetViaDiameter() ) + if( m_designSettings.m_ViasDimensionsList[0].m_Diameter != netClass->GetViaDiameter() ) lists_sizes_modified = true; - m_ViasDimensionsList[0].m_Diameter = netClass->GetViaDiameter(); + m_designSettings.m_ViasDimensionsList[0].m_Diameter = netClass->GetViaDiameter(); - if( m_TrackWidthList[0] != netClass->GetTrackWidth() ) + if( m_designSettings.m_TrackWidthList[0] != netClass->GetTrackWidth() ) lists_sizes_modified = true; - m_TrackWidthList[0] = netClass->GetTrackWidth(); + m_designSettings.m_TrackWidthList[0] = netClass->GetTrackWidth(); - if( m_viaSizeIndex >= m_ViasDimensionsList.size() ) - m_viaSizeIndex = m_ViasDimensionsList.size(); + if( m_designSettings.GetViaSizeIndex() >= m_designSettings.m_ViasDimensionsList.size() ) + m_designSettings.SetViaSizeIndex( m_designSettings.m_ViasDimensionsList.size() ); - if( m_trackWidthIndex >= m_TrackWidthList.size() ) - m_trackWidthIndex = m_TrackWidthList.size(); + if( m_designSettings.GetTrackWidthIndex() >= m_designSettings.m_TrackWidthList.size() ) + m_designSettings.SetTrackWidthIndex( m_designSettings.m_TrackWidthList.size() ); return lists_sizes_modified; } @@ -2200,24 +2200,6 @@ TRACK* BOARD::CreateLockPoint( wxPoint& aPosition, TRACK* aSegment, PICKED_ITEMS } -void BOARD::SetViaSizeIndex( unsigned aIndex ) -{ - if( aIndex >= m_ViasDimensionsList.size() ) - m_viaSizeIndex = m_ViasDimensionsList.size(); - else - m_viaSizeIndex = aIndex; -} - - -void BOARD::SetTrackWidthIndex( unsigned aIndex ) -{ - if( aIndex >= m_TrackWidthList.size() ) - m_trackWidthIndex = m_TrackWidthList.size(); - else - m_trackWidthIndex = aIndex; -} - - ZONE_CONTAINER* BOARD::AddArea( PICKED_ITEMS_LIST* aNewZonesList, int aNetcode, LAYER_NUM aLayer, wxPoint aStartPointPosition, int aHatch ) { diff --git a/pcbnew/class_board.h b/pcbnew/class_board.h index 7fc8987198..a728061ba0 100644 --- a/pcbnew/class_board.h +++ b/pcbnew/class_board.h @@ -111,8 +111,6 @@ public: /** The type of the layer */ LAYER_T m_Type; -// int m_Color; - /** * Function ShowType * converts a LAYER_T enum to a const char* @@ -136,52 +134,15 @@ private: }; -/** - * Struct VIA_DIMENSION - * is a small helper container to handle a stock of specific vias each with - * unique diameter and drill sizes in the BOARD class. - */ -struct VIA_DIMENSION -{ - int m_Diameter; // <= 0 means use Netclass via diameter - int m_Drill; // <= 0 means use Netclass via drill - - VIA_DIMENSION() - { - m_Diameter = 0; - m_Drill = 0; - } - - VIA_DIMENSION( int aDiameter, int aDrill ) - { - m_Diameter = aDiameter; - m_Drill = aDrill; - } - - bool operator == ( const VIA_DIMENSION& other ) const - { - return (m_Diameter == other.m_Diameter) && (m_Drill == other.m_Drill); - } - - bool operator < ( const VIA_DIMENSION& other ) const - { - if( m_Diameter != other.m_Diameter ) - return m_Diameter < other.m_Diameter; - - return m_Drill < other.m_Drill; - } -}; - - // Helper class to handle high light nets class HIGH_LIGHT_INFO { friend class BOARD; + protected: int m_netCode; // net selected for highlight (-1 when no net selected ) bool m_highLightOn; // highlight active -protected: void Clear() { m_netCode = -1; @@ -251,22 +212,6 @@ private: /// This is also the last used netclass after starting a track. wxString m_currentNetClassName; - /// Index for #m_ViasDimensionsList to select the current via size. - /// 0 is the index selection of the default value Netclass - unsigned m_viaSizeIndex; - - // Index for m_TrackWidthList to select the value. - unsigned m_trackWidthIndex; - - ///> Use custom values for track/via sizes (not specified in net class nor in the size lists). - bool m_useCustomTrackVia; - - ///> Custom track width (used after UseCustomTrackViaSize( true ) was called). - int m_customTrackWidth; - - ///> Custom via size (used after UseCustomTrackViaSize( true ) was called). - VIA_DIMENSION m_customViaSize; - /** * Function chainMarkedSegments * is used by MarkTrace() to set the BUSY flag of connected segments of the trace @@ -308,18 +253,6 @@ public: /// List of current netclasses. There is always the default netclass. NETCLASSES m_NetClasses; - // handling of vias and tracks size: - // the first value is always the value of the current NetClass - // The others values are extra values - - // The first value is the current netclass via size - /// Vias size and drill list - std::vector m_ViasDimensionsList; - - // The first value is the current netclass track width - /// Track width list - std::vector m_TrackWidthList; - BOARD(); ~BOARD(); @@ -647,7 +580,10 @@ public: * Function SetDesignSettings * @param aDesignSettings the new BOARD_DESIGN_SETTINGS to use */ - void SetDesignSettings( const BOARD_DESIGN_SETTINGS& aDesignSettings ) { m_designSettings = aDesignSettings; } + void SetDesignSettings( const BOARD_DESIGN_SETTINGS& aDesignSettings ) + { + m_designSettings = aDesignSettings; + } const PAGE_INFO& GetPageSettings() const { return m_paper; } void SetPageSettings( const PAGE_INFO& aPageSettings ) { m_paper = aPageSettings; } @@ -778,7 +714,6 @@ public: return m_FullRatsnest.size(); } - /** * Function GetNodesCount * @return the number of pads members of nets (i.e. with netcode > 0) @@ -1029,10 +964,9 @@ public: */ int SortedNetnamesList( wxArrayString& aNames, bool aSortbyPadsCount ); - /**************************************/ - /** - * Function relative to NetClasses: **/ - /**************************************/ + /************************************** + * Functions related to NetClasses: + **************************************/ /** * Function SynchronizeNetsAndNetClasses @@ -1065,144 +999,6 @@ public: */ int GetSmallestClearanceValue(); - /** - * Function GetTrackWidthIndex - * @return the current track width list index. - */ - unsigned GetTrackWidthIndex() const { return m_trackWidthIndex; } - - /** - * Function SetTrackWidthIndex - * sets the current track width list index to \a aIndex. - * - * @param aIndex is the track width list index. - */ - void SetTrackWidthIndex( unsigned aIndex ); - - /** - * Function GetCurrentTrackWidth - * @return the current track width, according to the selected options - * ( using the default netclass value or a preset/custom value ) - * the default netclass is always in m_TrackWidthList[0] - */ - int GetCurrentTrackWidth() const - { - if( m_useCustomTrackVia ) - return m_customTrackWidth; - else - return m_TrackWidthList[m_trackWidthIndex]; - } - - /** - * Function SetCustomTrackWidth - * Sets custom width for track (i.e. not available in netclasses or preset list). To have - * it returned with GetCurrentTrackWidth() you need to enable custom track & via sizes - * (UseCustomTrackViaSize()). - * @param aWidth is the new track width. - */ - void SetCustomTrackWidth( int aWidth ) - { - m_customTrackWidth = aWidth; - } - - /** - * Function GetCustomTrackWidth - * @return Current custom width for a track. - */ - int GetCustomTrackWidth() const - { - return m_customTrackWidth; - } - - /** - * Function GetViaSizeIndex - * @return the current via size list index. - */ - unsigned GetViaSizeIndex() const { return m_viaSizeIndex; } - - /** - * Function SetViaSizeIndex - * sets the current via size list index to \a aIndex. - * - * @param aIndex is the via size list index. - */ - void SetViaSizeIndex( unsigned aIndex ); - - /** - * Function GetCurrentViaSize - * @return the current via size, according to the selected options - * ( using the default netclass value or a preset/custom value ) - * the default netclass is always in m_TrackWidthList[0] - */ - int GetCurrentViaSize() - { - if( m_useCustomTrackVia ) - return m_customViaSize.m_Diameter; - else - return m_ViasDimensionsList[m_viaSizeIndex].m_Diameter; - } - - /** - * Function SetCustomViaSize - * Sets custom size for via diameter (i.e. not available in netclasses or preset list). To have - * it returned with GetCurrentViaSize() you need to enable custom track & via sizes - * (UseCustomTrackViaSize()). - * @param aSize is the new drill diameter. - */ - void SetCustomViaSize( int aSize ) - { - m_customViaSize.m_Diameter = aSize; - } - - /** - * Function GetCustomViaSize - * @return Current custom size for the via diameter. - */ - int GetCustomViaSize() const - { - return m_customViaSize.m_Diameter; - } - - - /** - * Function GetCurrentViaDrill - * @return the current via size, according to the selected options - * ( using the default netclass value or a preset/custom value ) - * the default netclass is always in m_TrackWidthList[0] - */ - int GetCurrentViaDrill() - { - int drill; - - if( m_useCustomTrackVia ) - drill = m_customViaSize.m_Drill; - else - drill = m_ViasDimensionsList[m_viaSizeIndex].m_Drill; - - return drill > 0 ? drill : -1; - } - - /** - * Function SetCustomViaDrill - * Sets custom size for via drill (i.e. not available in netclasses or preset list). To have - * it returned with GetCurrentViaDrill() you need to enable custom track & via sizes - * (UseCustomTrackViaSize()). - * @param aDrill is the new drill size. - */ - void SetCustomViaDrill( int aDrill ) - { - m_customViaSize.m_Drill = aDrill; - } - - /** - * Function GetCustomViaDrill - * @return Current custom size for the via drill. - */ - int GetCustomViaDrill() const - { - return m_customViaSize.m_Drill; - } - /** * Function GetCurrentMicroViaSize * @return the current micro via size, @@ -1217,27 +1013,6 @@ public: */ int GetCurrentMicroViaDrill(); - /** - * Function UseCustomTrackViaSize - * Enables/disables custom track/via size settings. If enabled, values set with - * SetCustomTrackWidth()/SetCustomViaSize()/SetCustomViaDrill() are used for newly created - * tracks and vias. - * @param aEnabled decides if custom settings should be used for new tracks/vias. - */ - void UseCustomTrackViaSize( bool aEnabled ) - { - m_useCustomTrackVia = aEnabled; - } - - /** - * Function UseCustomTrackViaSize - * @return True if custom sizes of tracks & vias are enabled, false otherwise. - */ - bool UseCustomTrackViaSize() const - { - return m_useCustomTrackVia; - } - /***************************************************************************/ wxString GetClass() const diff --git a/pcbnew/class_board_design_settings.cpp b/pcbnew/class_board_design_settings.cpp index 31ef22a23f..79fa3ce42f 100644 --- a/pcbnew/class_board_design_settings.cpp +++ b/pcbnew/class_board_design_settings.cpp @@ -81,7 +81,7 @@ BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS() : m_PcbTextSize = wxSize( DEFAULT_TEXT_PCB_SIZE, DEFAULT_TEXT_PCB_SIZE ); // current Pcb (not module) Text size - m_TrackMinWidth = DMils2iu( 100 ); // track min value for width ((min copper size value + m_TrackMinWidth = DMils2iu( 100 ); // track min value for width (min copper size value) m_ViasMinSize = DMils2iu( 350 ); // vias (not micro vias) min diameter m_ViasMinDrill = DMils2iu( 200 ); // vias (not micro vias) min drill diameter m_MicroViasMinSize = DMils2iu( 200 ); // micro vias (not vias) min diameter @@ -171,6 +171,37 @@ void BOARD_DESIGN_SETTINGS::AppendConfigs( PARAM_CFG_ARRAY* aResult ) } +void BOARD_DESIGN_SETTINGS::SetViaSizeIndex( unsigned aIndex ) +{ + if( aIndex >= m_ViasDimensionsList.size() ) + m_viaSizeIndex = m_ViasDimensionsList.size(); + else + m_viaSizeIndex = aIndex; +} + + +int BOARD_DESIGN_SETTINGS::GetCurrentViaDrill() const +{ + int drill; + + if( m_useCustomTrackVia ) + drill = m_customViaSize.m_Drill; + else + drill = m_ViasDimensionsList[m_viaSizeIndex].m_Drill; + + return drill > 0 ? drill : -1; +} + + +void BOARD_DESIGN_SETTINGS::SetTrackWidthIndex( unsigned aIndex ) +{ + if( aIndex >= m_TrackWidthList.size() ) + m_trackWidthIndex = m_TrackWidthList.size(); + else + m_trackWidthIndex = aIndex; +} + + // see pcbstruct.h LAYER_MSK BOARD_DESIGN_SETTINGS::GetVisibleLayers() const { diff --git a/pcbnew/dialogs/dialog_design_rules.cpp b/pcbnew/dialogs/dialog_design_rules.cpp index f83be84b9e..35b687de13 100644 --- a/pcbnew/dialogs/dialog_design_rules.cpp +++ b/pcbnew/dialogs/dialog_design_rules.cpp @@ -276,9 +276,9 @@ void DIALOG_DESIGN_RULES::InitGlobalRules() // Initialize Vias and Tracks sizes lists. // note we display only extra values, never the current netclass value. // (the first value in history list) - m_TracksWidthList = m_Parent->GetBoard()->m_TrackWidthList; + m_TracksWidthList = m_BrdSettings.m_TrackWidthList; m_TracksWidthList.erase( m_TracksWidthList.begin() ); // remove the netclass value - m_ViasDimensionsList = m_Parent->GetBoard()->m_ViasDimensionsList; + m_ViasDimensionsList = m_BrdSettings.m_ViasDimensionsList; m_ViasDimensionsList.erase( m_ViasDimensionsList.begin() ); // remove the netclass value InitDimensionsLists(); } @@ -634,12 +634,12 @@ void DIALOG_DESIGN_RULES::CopyDimensionsListsToBoard() // Sort new list by by increasing value sort( m_ViasDimensionsList.begin(), m_ViasDimensionsList.end() ); - std::vector * tlist = &m_Parent->GetBoard()->m_TrackWidthList; + std::vector* tlist = &m_BrdSettings.m_TrackWidthList; tlist->erase( tlist->begin() + 1, tlist->end() ); // Remove old "custom" sizes tlist->insert( tlist->end(), m_TracksWidthList.begin(), m_TracksWidthList.end() ); //Add new "custom" sizes // Reinitialize m_ViaSizeList - std::vector * vialist = &m_Parent->GetBoard()->m_ViasDimensionsList; + std::vector* vialist = &m_BrdSettings.m_ViasDimensionsList; vialist->erase( vialist->begin() + 1, vialist->end() ); vialist->insert( vialist->end(), m_ViasDimensionsList.begin(), m_ViasDimensionsList.end() ); } diff --git a/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp b/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp index 02577075cd..71904a927e 100644 --- a/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp +++ b/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp @@ -60,7 +60,7 @@ void DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::MyInit() /* Disable the option "copy current to net" if we have only default netclass values * i.e. when m_TrackWidthSelector and m_ViaSizeSelector are set to 0 */ - if( !board->GetTrackWidthIndex() && !board->GetViaSizeIndex() ) + if( !board->GetDesignSettings().GetTrackWidthIndex() && !board->GetDesignSettings().GetViaSizeIndex() ) { m_Net2CurrValueButton->Enable( false ); m_OptionID = ID_NETCLASS_VALUES_TO_CURRENT_NET; @@ -77,9 +77,9 @@ void DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::MyInit() msg = StringFromValue( g_UserUnit, value, true ); m_gridDisplayCurrentSettings->SetCellValue( 0, 0, msg ); - if( board->GetTrackWidthIndex() ) + if( board->GetDesignSettings().GetTrackWidthIndex() ) { - value = board->GetCurrentTrackWidth(); + value = board->GetDesignSettings().GetCurrentTrackWidth(); msg = StringFromValue( g_UserUnit, value, true ); } else @@ -91,9 +91,9 @@ void DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::MyInit() msg = StringFromValue( g_UserUnit, value, true ); m_gridDisplayCurrentSettings->SetCellValue( 0, 1, msg ); - if( board->GetViaSizeIndex() ) + if( board->GetDesignSettings().GetViaSizeIndex() ) { - value = board->GetCurrentViaSize(); + value = board->GetDesignSettings().GetCurrentViaSize(); msg = StringFromValue( g_UserUnit, value, true ); } else @@ -103,7 +103,7 @@ void DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::MyInit() value = netclass->GetViaDrill(); // Display via drill msg = StringFromValue( g_UserUnit, value, true ); m_gridDisplayCurrentSettings->SetCellValue( 0, 2, msg ); - value = board->GetCurrentViaDrill(); + value = board->GetDesignSettings().GetCurrentViaDrill(); if( value >= 0 ) msg = StringFromValue( g_UserUnit, value, true ); else diff --git a/pcbnew/edit_track_width.cpp b/pcbnew/edit_track_width.cpp index c371ee0978..f19c8216e1 100644 --- a/pcbnew/edit_track_width.cpp +++ b/pcbnew/edit_track_width.cpp @@ -43,7 +43,7 @@ bool PCB_EDIT_FRAME::SetTrackSegmentWidth( TRACK* aTrackItem, if( net ) new_width = net->GetTrackWidth(); else - new_width = GetBoard()->GetCurrentTrackWidth(); + new_width = GetDesignSettings().GetCurrentTrackWidth(); if( aTrackItem->Type() == PCB_VIA_T ) { @@ -58,8 +58,8 @@ bool PCB_EDIT_FRAME::SetTrackSegmentWidth( TRACK* aTrackItem, } else { - new_width = GetBoard()->GetCurrentViaSize(); - new_drill = GetBoard()->GetCurrentViaDrill(); + new_width = GetDesignSettings().GetCurrentViaSize(); + new_drill = GetDesignSettings().GetCurrentViaDrill(); } if( via->GetViaType() == VIA_MICROVIA ) diff --git a/pcbnew/editrack-part2.cpp b/pcbnew/editrack-part2.cpp index ef7ed1642f..07967de9c9 100644 --- a/pcbnew/editrack-part2.cpp +++ b/pcbnew/editrack-part2.cpp @@ -98,7 +98,7 @@ bool PCB_EDIT_FRAME::Other_Layer_Route( TRACK* aTrack, wxDC* DC ) VIA* via = new VIA( GetBoard() ); via->SetFlags( IS_NEW ); via->SetViaType( GetDesignSettings().m_CurrentViaType ); - via->SetWidth( GetBoard()->GetCurrentViaSize()); + via->SetWidth( GetDesignSettings().GetCurrentViaSize()); via->SetNetCode( GetBoard()->GetHighLightNetCode() ); via->SetEnd( g_CurrentTrackSegment->GetEnd() ); via->SetStart( g_CurrentTrackSegment->GetEnd() ); @@ -106,7 +106,7 @@ bool PCB_EDIT_FRAME::Other_Layer_Route( TRACK* aTrack, wxDC* DC ) // Usual via is from copper to component. // layer pair is LAYER_N_BACK and LAYER_N_FRONT. via->SetLayerPair( LAYER_N_BACK, LAYER_N_FRONT ); - via->SetDrill( GetBoard()->GetCurrentViaDrill() ); + via->SetDrill( GetDesignSettings().GetCurrentViaDrill() ); LAYER_NUM first_layer = GetActiveLayer(); LAYER_NUM last_layer; diff --git a/pcbnew/editrack.cpp b/pcbnew/editrack.cpp index 220668148c..ddd1356705 100644 --- a/pcbnew/editrack.cpp +++ b/pcbnew/editrack.cpp @@ -170,9 +170,9 @@ TRACK* PCB_EDIT_FRAME::Begin_Route( TRACK* aTrack, wxDC* aDC ) GetBoard()->SetCurrentNetClass( g_CurrentTrackSegment->GetNetClassName() ); g_CurrentTrackSegment->SetLayer( GetScreen()->m_Active_Layer ); - g_CurrentTrackSegment->SetWidth( GetBoard()->GetCurrentTrackWidth() ); + g_CurrentTrackSegment->SetWidth( GetDesignSettings().GetCurrentTrackWidth() ); - if( GetBoard()->GetDesignSettings().m_UseConnectedTrackWidth ) + if( GetDesignSettings().m_UseConnectedTrackWidth ) { if( TrackOnStartPoint && TrackOnStartPoint->Type() == PCB_TRACE_T ) g_CurrentTrackSegment->SetWidth( TrackOnStartPoint->GetWidth()); @@ -282,8 +282,8 @@ TRACK* PCB_EDIT_FRAME::Begin_Route( TRACK* aTrack, wxDC* aDC ) newTrack->SetLayer( GetScreen()->m_Active_Layer ); - if( !GetBoard()->GetDesignSettings().m_UseConnectedTrackWidth ) - newTrack->SetWidth( GetBoard()->GetCurrentTrackWidth() ); + if( !GetDesignSettings().m_UseConnectedTrackWidth ) + newTrack->SetWidth( GetDesignSettings().GetCurrentTrackWidth() ); DBG( g_CurrentTrackList.VerifyListIntegrity(); ); @@ -691,7 +691,7 @@ void ShowNewTrackWhenMovingCursor( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPo DisplayOpt.ShowTrackClearanceMode = SHOW_CLEARANCE_ALWAYS; // Values to Via circle - int boardViaRadius = frame->GetBoard()->GetCurrentViaSize()/2; + int boardViaRadius = frame->GetDesignSettings().GetCurrentViaSize()/2; int viaRadiusWithClearence = boardViaRadius+netclass->GetClearance(); EDA_RECT* panelClipBox=aPanel->GetClipBox(); @@ -718,8 +718,8 @@ void ShowNewTrackWhenMovingCursor( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPo // Set track parameters, that can be modified while creating the track g_CurrentTrackSegment->SetLayer( screen->m_Active_Layer ); - if( !frame->GetBoard()->GetDesignSettings().m_UseConnectedTrackWidth ) - g_CurrentTrackSegment->SetWidth( frame->GetBoard()->GetCurrentTrackWidth() ); + if( !frame->GetDesignSettings().m_UseConnectedTrackWidth ) + g_CurrentTrackSegment->SetWidth( frame->GetDesignSettings().GetCurrentTrackWidth() ); if( g_TwoSegmentTrackBuild ) { @@ -729,8 +729,8 @@ void ShowNewTrackWhenMovingCursor( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPo { previous_track->SetLayer( screen->m_Active_Layer ); - if( !frame->GetBoard()->GetDesignSettings().m_UseConnectedTrackWidth ) - previous_track->SetWidth( frame->GetBoard()->GetCurrentTrackWidth() ); + if( !frame->GetDesignSettings().m_UseConnectedTrackWidth ) + previous_track->SetWidth( frame->GetDesignSettings().GetCurrentTrackWidth() ); } } diff --git a/pcbnew/event_handlers_tracks_vias_sizes.cpp b/pcbnew/event_handlers_tracks_vias_sizes.cpp index 52428a3834..0ccd13a6a5 100644 --- a/pcbnew/event_handlers_tracks_vias_sizes.cpp +++ b/pcbnew/event_handlers_tracks_vias_sizes.cpp @@ -41,8 +41,8 @@ void PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event( wxCommandEvent& event ) case ID_POPUP_PCB_SELECT_USE_NETCLASS_VALUES: GetDesignSettings().m_UseConnectedTrackWidth = false; - GetBoard()->SetTrackWidthIndex( 0 ); - GetBoard()->SetViaSizeIndex( 0 ); + GetDesignSettings().SetTrackWidthIndex( 0 ); + GetDesignSettings().SetViaSizeIndex( 0 ); break; case ID_POPUP_PCB_SELECT_AUTO_WIDTH: @@ -69,7 +69,7 @@ void PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event( wxCommandEvent& event ) m_canvas->MoveCursorToCrossHair(); GetDesignSettings().m_UseConnectedTrackWidth = false; ii = id - ID_POPUP_PCB_SELECT_WIDTH1; - GetBoard()->SetTrackWidthIndex( ii ); + GetDesignSettings().SetTrackWidthIndex( ii ); break; case ID_POPUP_PCB_SELECT_VIASIZE1: // this is the default Netclass selection @@ -91,17 +91,17 @@ void PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event( wxCommandEvent& event ) // select the new current value for via size (via diameter) m_canvas->MoveCursorToCrossHair(); ii = id - ID_POPUP_PCB_SELECT_VIASIZE1; - GetBoard()->SetViaSizeIndex( ii ); + GetDesignSettings().SetViaSizeIndex( ii ); break; case ID_AUX_TOOLBAR_PCB_TRACK_WIDTH: ii = m_SelTrackWidthBox->GetCurrentSelection(); - GetBoard()->SetTrackWidthIndex( ii ); + GetDesignSettings().SetTrackWidthIndex( ii ); break; case ID_AUX_TOOLBAR_PCB_VIA_SIZE: ii = m_SelViaSizeBox->GetCurrentSelection(); - GetBoard()->SetViaSizeIndex( ii ); + GetDesignSettings().SetViaSizeIndex( ii ); break; default: diff --git a/pcbnew/hotkeys_board_editor.cpp b/pcbnew/hotkeys_board_editor.cpp index 14931a0fa4..1cffe09577 100644 --- a/pcbnew/hotkeys_board_editor.cpp +++ b/pcbnew/hotkeys_board_editor.cpp @@ -199,10 +199,10 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit if( GetCanvas()->IsMouseCaptured() ) GetCanvas()->CallMouseCapture( aDC, wxDefaultPosition, false ); - if( GetBoard()->GetTrackWidthIndex() < GetBoard()->m_TrackWidthList.size() - 1 ) - GetBoard()->SetTrackWidthIndex( GetBoard()->GetTrackWidthIndex() + 1 ); + if( GetDesignSettings().GetTrackWidthIndex() < GetDesignSettings().m_TrackWidthList.size() - 1 ) + GetDesignSettings().SetTrackWidthIndex( GetDesignSettings().GetTrackWidthIndex() + 1 ); else - GetBoard()->SetTrackWidthIndex( 0 ); + GetDesignSettings().SetTrackWidthIndex( 0 ); if( GetCanvas()->IsMouseCaptured() ) GetCanvas()->CallMouseCapture( aDC, wxDefaultPosition, false ); @@ -213,10 +213,10 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit if( GetCanvas()->IsMouseCaptured() ) GetCanvas()->CallMouseCapture( aDC, wxDefaultPosition, false ); - if( GetBoard()->GetTrackWidthIndex() <= 0 ) - GetBoard()->SetTrackWidthIndex( GetBoard()->m_TrackWidthList.size() -1 ); + if( GetDesignSettings().GetTrackWidthIndex() <= 0 ) + GetDesignSettings().SetTrackWidthIndex( GetDesignSettings().m_TrackWidthList.size() -1 ); else - GetBoard()->SetTrackWidthIndex( GetBoard()->GetTrackWidthIndex() - 1 ); + GetDesignSettings().SetTrackWidthIndex( GetDesignSettings().GetTrackWidthIndex() - 1 ); if( GetCanvas()->IsMouseCaptured() ) GetCanvas()->CallMouseCapture( aDC, wxDefaultPosition, false ); diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index 5c4b280dda..fd2cf976dc 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -551,12 +551,12 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const // Save current default track width, for compatibility with older Pcbnew version; m_out->Print( aNestLevel+1, "(last_trace_width %s)\n", - FMTIU( aBoard->GetCurrentTrackWidth() ).c_str() ); + FMTIU( aBoard->GetDesignSettings().GetCurrentTrackWidth() ).c_str() ); // Save custom tracks width list (the first is not saved here: this is the netclass value - for( unsigned ii = 1; ii < aBoard->m_TrackWidthList.size(); ii++ ) + for( unsigned ii = 1; ii < aBoard->GetDesignSettings().m_TrackWidthList.size(); ii++ ) m_out->Print( aNestLevel+1, "(user_trace_width %s)\n", - FMTIU( aBoard->m_TrackWidthList[ii] ).c_str() ); + FMTIU( aBoard->GetDesignSettings().m_TrackWidthList[ii] ).c_str() ); m_out->Print( aNestLevel+1, "(trace_clearance %s)\n", FMTIU( aBoard->m_NetClasses.GetDefault()->GetClearance() ).c_str() ); @@ -587,10 +587,10 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const // Save custom vias diameters list (the first is not saved here: this is // the netclass value - for( unsigned ii = 1; ii < aBoard->m_ViasDimensionsList.size(); ii++ ) + for( unsigned ii = 1; ii < aBoard->GetDesignSettings().m_ViasDimensionsList.size(); ii++ ) m_out->Print( aNestLevel+1, "(user_via %s %s)\n", - FMTIU( aBoard->m_ViasDimensionsList[ii].m_Diameter ).c_str(), - FMTIU( aBoard->m_ViasDimensionsList[ii].m_Drill ).c_str() ); + FMTIU( aBoard->GetDesignSettings().m_ViasDimensionsList[ii].m_Diameter ).c_str(), + FMTIU( aBoard->GetDesignSettings().m_ViasDimensionsList[ii].m_Drill ).c_str() ); // for old versions compatibility: if( aBoard->GetDesignSettings().m_BlindBuriedViaAllowed ) diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index d94852db4c..cf0aca69fe 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -633,6 +633,8 @@ void LEGACY_PLUGIN::loadSHEET() void LEGACY_PLUGIN::loadSETUP() { NETCLASS* netclass_default = m_board->m_NetClasses.GetDefault(); + // TODO Orson: is it really necessary to first operate on a copy and then apply it? + // would not it be better to use reference here and apply all the changes instantly? BOARD_DESIGN_SETTINGS bds = m_board->GetDesignSettings(); ZONE_SETTINGS zs = m_board->GetZoneSettings(); char* line; @@ -692,7 +694,7 @@ void LEGACY_PLUGIN::loadSETUP() else if( TESTLINE( "TrackWidthList" ) ) { BIU tmp = biuParse( line + SZ( "TrackWidthList" ) ); - m_board->m_TrackWidthList.push_back( tmp ); + bds.m_TrackWidthList.push_back( tmp ); } else if( TESTLINE( "TrackClearence" ) ) @@ -754,7 +756,8 @@ void LEGACY_PLUGIN::loadSETUP() if( data ) // DRILL may not be present ? drill = biuParse( data ); - m_board->m_ViasDimensionsList.push_back( VIA_DIMENSION( diameter, drill ) ); + bds.m_ViasDimensionsList.push_back( VIA_DIMENSION( diameter, + drill ) ); } else if( TESTLINE( "ViaDrill" ) ) @@ -907,23 +910,24 @@ void LEGACY_PLUGIN::loadSETUP() * Sort lists by by increasing value and remove duplicates * (the first value is not tested, because it is the netclass value */ - sort( m_board->m_ViasDimensionsList.begin() + 1, m_board->m_ViasDimensionsList.end() ); - sort( m_board->m_TrackWidthList.begin() + 1, m_board->m_TrackWidthList.end() ); + BOARD_DESIGN_SETTINGS& designSettings = m_board->GetDesignSettings(); + sort( designSettings.m_ViasDimensionsList.begin() + 1, designSettings.m_ViasDimensionsList.end() ); + sort( designSettings.m_TrackWidthList.begin() + 1, designSettings.m_TrackWidthList.end() ); - for( unsigned ii = 1; ii < m_board->m_ViasDimensionsList.size() - 1; ii++ ) + for( unsigned ii = 1; ii < designSettings.m_ViasDimensionsList.size() - 1; ii++ ) { - if( m_board->m_ViasDimensionsList[ii] == m_board->m_ViasDimensionsList[ii + 1] ) + if( designSettings.m_ViasDimensionsList[ii] == designSettings.m_ViasDimensionsList[ii + 1] ) { - m_board->m_ViasDimensionsList.erase( m_board->m_ViasDimensionsList.begin() + ii ); + designSettings.m_ViasDimensionsList.erase( designSettings.m_ViasDimensionsList.begin() + ii ); ii--; } } - for( unsigned ii = 1; ii < m_board->m_TrackWidthList.size() - 1; ii++ ) + for( unsigned ii = 1; ii < designSettings.m_TrackWidthList.size() - 1; ii++ ) { - if( m_board->m_TrackWidthList[ii] == m_board->m_TrackWidthList[ii + 1] ) + if( designSettings.m_TrackWidthList[ii] == designSettings.m_TrackWidthList[ii + 1] ) { - m_board->m_TrackWidthList.erase( m_board->m_TrackWidthList.begin() + ii ); + designSettings.m_TrackWidthList.erase( designSettings.m_TrackWidthList.begin() + ii ); ii--; } } @@ -3005,11 +3009,12 @@ void LEGACY_PLUGIN::saveSETUP( const BOARD* aBoard ) const } // Save current default track width, for compatibility with older Pcbnew version; - fprintf( m_fp, "TrackWidth %s\n", fmtBIU( aBoard->GetCurrentTrackWidth() ).c_str() ); + fprintf( m_fp, "TrackWidth %s\n", + fmtBIU( aBoard->GetDesignSettings().GetCurrentTrackWidth() ).c_str() ); // Save custom tracks width list (the first is not saved here: this is the netclass value - for( unsigned ii = 1; ii < aBoard->m_TrackWidthList.size(); ii++ ) - fprintf( m_fp, "TrackWidthList %s\n", fmtBIU( aBoard->m_TrackWidthList[ii] ).c_str() ); + for( unsigned ii = 1; ii < aBoard->GetDesignSettings().m_TrackWidthList.size(); ii++ ) + fprintf( m_fp, "TrackWidthList %s\n", fmtBIU( aBoard->GetDesignSettings().m_TrackWidthList[ii] ).c_str() ); fprintf( m_fp, "TrackClearence %s\n", fmtBIU( netclass_default->GetClearance() ).c_str() ); @@ -3030,10 +3035,10 @@ void LEGACY_PLUGIN::saveSETUP( const BOARD* aBoard ) const // Save custom vias diameters list (the first is not saved here: this is // the netclass value - for( unsigned ii = 1; ii < aBoard->m_ViasDimensionsList.size(); ii++ ) + for( unsigned ii = 1; ii < aBoard->GetDesignSettings().m_ViasDimensionsList.size(); ii++ ) fprintf( m_fp, "ViaSizeList %s %s\n", - fmtBIU( aBoard->m_ViasDimensionsList[ii].m_Diameter ).c_str(), - fmtBIU( aBoard->m_ViasDimensionsList[ii].m_Drill ).c_str() ); + fmtBIU( aBoard->GetDesignSettings().m_ViasDimensionsList[ii].m_Diameter ).c_str(), + fmtBIU( aBoard->GetDesignSettings().m_ViasDimensionsList[ii].m_Drill ).c_str() ); // for old versions compatibility: fprintf( m_fp, "MicroViaSize %s\n", fmtBIU( netclass_default->GetuViaDiameter() ).c_str() ); diff --git a/pcbnew/muonde.cpp b/pcbnew/muonde.cpp index f943b13c42..ba2be9e2b4 100644 --- a/pcbnew/muonde.cpp +++ b/pcbnew/muonde.cpp @@ -215,7 +215,7 @@ MODULE* PCB_EDIT_FRAME::Genere_Self( wxDC* DC ) } // Calculate the elements. - Mself.m_Width = GetBoard()->GetCurrentTrackWidth(); + Mself.m_Width = GetDesignSettings().GetCurrentTrackWidth(); std::vector buffer; ll = BuildCornersList_S_Shape( buffer, Mself.m_Start, Mself.m_End, Mself.lng, Mself.m_Width ); @@ -561,7 +561,7 @@ MODULE* PCB_EDIT_FRAME::Create_MuWaveBasicShape( const wxString& name, int pad_c module->Pads().PushFront( pad ); - int tw = GetBoard()->GetCurrentTrackWidth(); + int tw = GetDesignSettings().GetCurrentTrackWidth(); pad->SetSize( wxSize( tw, tw ) ); pad->SetPosition( module->GetPosition() ); @@ -588,7 +588,7 @@ MODULE* PCB_EDIT_FRAME::Create_MuWaveComponent( int shape_type ) int angle = 0; // Enter the size of the gap or stub - int gap_size = GetBoard()->GetCurrentTrackWidth(); + int gap_size = GetDesignSettings().GetCurrentTrackWidth(); switch( shape_type ) { @@ -1104,7 +1104,7 @@ void PCB_EDIT_FRAME::Edit_Gap( wxDC* DC, MODULE* aModule ) gap_size = ValueFromString( g_UserUnit, msg ); // Updating sizes of pads forming the gap. - int tw = GetBoard()->GetCurrentTrackWidth(); + int tw = GetDesignSettings().GetCurrentTrackWidth(); pad->SetSize( wxSize( tw, tw ) ); pad->SetY0( 0 ); @@ -1118,7 +1118,7 @@ void PCB_EDIT_FRAME::Edit_Gap( wxDC* DC, MODULE* aModule ) pad->SetPosition( padpos ); - tw = GetBoard()->GetCurrentTrackWidth(); + tw = GetDesignSettings().GetCurrentTrackWidth(); next_pad->SetSize( wxSize( tw, tw ) ); next_pad->SetY0( 0 ); diff --git a/pcbnew/onrightclick.cpp b/pcbnew/onrightclick.cpp index 372538c1b1..ec8157d17e 100644 --- a/pcbnew/onrightclick.cpp +++ b/pcbnew/onrightclick.cpp @@ -532,7 +532,7 @@ void PCB_EDIT_FRAME::createPopupMenuForTracks( TRACK* Track, wxMenu* PopMenu ) AddMenuItem( PopMenu, ID_POPUP_PCB_SELECT_CU_LAYER_AND_PLACE_THROUGH_VIA, msg, KiBitmap( select_w_layer_xpm ) ); - if( GetBoard()->GetDesignSettings().m_BlindBuriedViaAllowed ) + if( GetDesignSettings().m_BlindBuriedViaAllowed ) { msg = AddHotkeyName( _( "Place Blind/Buried Via" ), g_Board_Editor_Hokeys_Descr, HK_ADD_BLIND_BURIED_VIA ); @@ -957,17 +957,17 @@ static wxMenu* Append_Track_Width_List( BOARD* aBoard ) if( aBoard->GetDesignSettings().m_UseConnectedTrackWidth ) trackwidth_menu->Check( ID_POPUP_PCB_SELECT_AUTO_WIDTH, true ); - if( aBoard->GetViaSizeIndex() != 0 - || aBoard->GetTrackWidthIndex() != 0 + if( aBoard->GetDesignSettings().GetViaSizeIndex() != 0 + || aBoard->GetDesignSettings().GetTrackWidthIndex() != 0 || aBoard->GetDesignSettings().m_UseConnectedTrackWidth ) trackwidth_menu->Append( ID_POPUP_PCB_SELECT_USE_NETCLASS_VALUES, _( "Use Netclass Values" ), _( "Use track and via sizes from their Netclass values" ), true ); - for( unsigned ii = 0; ii < aBoard->m_TrackWidthList.size(); ii++ ) + for( unsigned ii = 0; ii < aBoard->GetDesignSettings().m_TrackWidthList.size(); ii++ ) { - value = StringFromValue( g_UserUnit, aBoard->m_TrackWidthList[ii], true ); + value = StringFromValue( g_UserUnit, aBoard->GetDesignSettings().m_TrackWidthList[ii], true ); msg.Printf( _( "Track %s" ), GetChars( value ) ); if( ii == 0 ) @@ -978,15 +978,16 @@ static wxMenu* Append_Track_Width_List( BOARD* aBoard ) trackwidth_menu->AppendSeparator(); - for( unsigned ii = 0; ii < aBoard->m_ViasDimensionsList.size(); ii++ ) + for( unsigned ii = 0; ii < aBoard->GetDesignSettings().m_ViasDimensionsList.size(); ii++ ) { - value = StringFromValue( g_UserUnit, aBoard->m_ViasDimensionsList[ii].m_Diameter, - true ); + value = StringFromValue( g_UserUnit, + aBoard->GetDesignSettings().m_ViasDimensionsList[ii].m_Diameter, + true ); wxString drill = StringFromValue( g_UserUnit, - aBoard->m_ViasDimensionsList[ii].m_Drill, - true ); + aBoard->GetDesignSettings().m_ViasDimensionsList[ii].m_Drill, + true ); - if( aBoard->m_ViasDimensionsList[ii].m_Drill <= 0 ) + if( aBoard->GetDesignSettings().m_ViasDimensionsList[ii].m_Drill <= 0 ) { msg.Printf( _( "Via %s" ), GetChars( value ) ); } diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index bfa1ea337d..59ef3cb88f 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -809,6 +809,8 @@ void PCB_PARSER::parseSetup() throw( IO_ERROR, PARSE_ERROR ) T token; NETCLASS* defaultNetclass = m_board->m_NetClasses.GetDefault(); + // TODO Orson: is it really necessary to first operate on a copy and then apply it? + // would not it be better to use reference here and apply all the changes instantly? BOARD_DESIGN_SETTINGS designSettings = m_board->GetDesignSettings(); ZONE_SETTINGS zoneSettings = m_board->GetZoneSettings(); @@ -827,7 +829,7 @@ void PCB_PARSER::parseSetup() throw( IO_ERROR, PARSE_ERROR ) break; case T_user_trace_width: - m_board->m_TrackWidthList.push_back( parseBoardUnits( T_user_trace_width ) ); + designSettings.m_TrackWidthList.push_back( parseBoardUnits( T_user_trace_width ) ); NeedRIGHT(); break; @@ -885,7 +887,7 @@ void PCB_PARSER::parseSetup() throw( IO_ERROR, PARSE_ERROR ) { int viaSize = parseBoardUnits( "user via size" ); int viaDrill = parseBoardUnits( "user via drill" ); - m_board->m_ViasDimensionsList.push_back( VIA_DIMENSION( viaSize, viaDrill ) ); + designSettings.m_ViasDimensionsList.push_back( VIA_DIMENSION( viaSize, viaDrill ) ); NeedRIGHT(); } break; diff --git a/pcbnew/tool_pcb.cpp b/pcbnew/tool_pcb.cpp index ec4d07df7d..c115cbcc37 100644 --- a/pcbnew/tool_pcb.cpp +++ b/pcbnew/tool_pcb.cpp @@ -620,9 +620,9 @@ void PCB_EDIT_FRAME::updateTraceWidthSelectBox() m_SelTrackWidthBox->Clear(); - for( unsigned ii = 0; ii < GetBoard()->m_TrackWidthList.size(); ii++ ) + for( unsigned ii = 0; ii < GetDesignSettings().m_TrackWidthList.size(); ii++ ) { - msg = _( "Track " ) + CoordinateToString( GetBoard()->m_TrackWidthList[ii], true ); + msg = _( "Track " ) + CoordinateToString( GetDesignSettings().m_TrackWidthList[ii], true ); if( ii == 0 ) msg << _( " *" ); @@ -630,10 +630,10 @@ void PCB_EDIT_FRAME::updateTraceWidthSelectBox() m_SelTrackWidthBox->Append( msg ); } - if( GetBoard()->GetTrackWidthIndex() >= GetBoard()->m_TrackWidthList.size() ) - GetBoard()->SetTrackWidthIndex( 0 ); + if( GetDesignSettings().GetTrackWidthIndex() >= GetDesignSettings().m_TrackWidthList.size() ) + GetDesignSettings().SetTrackWidthIndex( 0 ); - m_SelTrackWidthBox->SetSelection( GetBoard()->GetTrackWidthIndex() ); + m_SelTrackWidthBox->SetSelection( GetDesignSettings().GetTrackWidthIndex() ); } @@ -646,14 +646,14 @@ void PCB_EDIT_FRAME::updateViaSizeSelectBox() m_SelViaSizeBox->Clear(); - for( unsigned ii = 0; ii < GetBoard()->m_ViasDimensionsList.size(); ii++ ) + for( unsigned ii = 0; ii < GetDesignSettings().m_ViasDimensionsList.size(); ii++ ) { msg = _( "Via " ); - msg << CoordinateToString( GetBoard()->m_ViasDimensionsList[ii].m_Diameter, true ); + msg << CoordinateToString( GetDesignSettings().m_ViasDimensionsList[ii].m_Diameter, true ); - if( GetBoard()->m_ViasDimensionsList[ii].m_Drill ) + if( GetDesignSettings().m_ViasDimensionsList[ii].m_Drill ) msg << wxT("/ ") - << CoordinateToString( GetBoard()->m_ViasDimensionsList[ii].m_Drill, true ); + << CoordinateToString( GetDesignSettings().m_ViasDimensionsList[ii].m_Drill, true ); if( ii == 0 ) msg << _( " *" ); @@ -661,10 +661,10 @@ void PCB_EDIT_FRAME::updateViaSizeSelectBox() m_SelViaSizeBox->Append( msg ); } - if( GetBoard()->GetViaSizeIndex() >= GetBoard()->m_ViasDimensionsList.size() ) - GetBoard()->SetViaSizeIndex( 0 ); + if( GetDesignSettings().GetViaSizeIndex() >= GetDesignSettings().m_ViasDimensionsList.size() ) + GetDesignSettings().SetViaSizeIndex( 0 ); - m_SelViaSizeBox->SetSelection( GetBoard()->GetViaSizeIndex() ); + m_SelViaSizeBox->SetSelection( GetDesignSettings().GetViaSizeIndex() ); } diff --git a/pcbnew/toolbars_update_user_interface.cpp b/pcbnew/toolbars_update_user_interface.cpp index 78b44145bb..b94bc75d59 100644 --- a/pcbnew/toolbars_update_user_interface.cpp +++ b/pcbnew/toolbars_update_user_interface.cpp @@ -55,15 +55,15 @@ void PCB_EDIT_FRAME::OnUpdateSelectTrackWidth( wxUpdateUIEvent& aEvent ) { if( aEvent.GetId() == ID_AUX_TOOLBAR_PCB_TRACK_WIDTH ) { - if( m_SelTrackWidthBox->GetSelection() != (int) GetBoard()->GetTrackWidthIndex() ) - m_SelTrackWidthBox->SetSelection( GetBoard()->GetTrackWidthIndex() ); + if( m_SelTrackWidthBox->GetSelection() != (int) GetDesignSettings().GetTrackWidthIndex() ) + m_SelTrackWidthBox->SetSelection( GetDesignSettings().GetTrackWidthIndex() ); } else { bool check = ( ( ( ID_POPUP_PCB_SELECT_WIDTH1 + - (int) GetBoard()->GetTrackWidthIndex() ) == aEvent.GetId() ) && - !GetDesignSettings().m_UseConnectedTrackWidth && - !GetBoard()->UseCustomTrackViaSize() ); + (int) GetDesignSettings().GetTrackWidthIndex() ) == aEvent.GetId() ) && + !GetDesignSettings().m_UseConnectedTrackWidth && + !GetDesignSettings().UseCustomTrackViaSize() ); aEvent.Check( check ); } @@ -73,13 +73,13 @@ void PCB_EDIT_FRAME::OnUpdateSelectTrackWidth( wxUpdateUIEvent& aEvent ) void PCB_EDIT_FRAME::OnUpdateSelectAutoTrackWidth( wxUpdateUIEvent& aEvent ) { aEvent.Check( GetDesignSettings().m_UseConnectedTrackWidth && - !GetBoard()->UseCustomTrackViaSize() ); + !GetDesignSettings().UseCustomTrackViaSize() ); } void PCB_EDIT_FRAME::OnUpdateSelectCustomTrackWidth( wxUpdateUIEvent& aEvent ) { - aEvent.Check( GetBoard()->UseCustomTrackViaSize() ); + aEvent.Check( GetDesignSettings().UseCustomTrackViaSize() ); } @@ -89,15 +89,15 @@ void PCB_EDIT_FRAME::OnUpdateSelectViaSize( wxUpdateUIEvent& aEvent ) if( aEvent.GetId() == ID_AUX_TOOLBAR_PCB_VIA_SIZE ) { - if( m_SelViaSizeBox->GetSelection() != (int) GetBoard()->GetViaSizeIndex() ) - m_SelViaSizeBox->SetSelection( GetBoard()->GetViaSizeIndex() ); + if( m_SelViaSizeBox->GetSelection() != (int) GetDesignSettings().GetViaSizeIndex() ) + m_SelViaSizeBox->SetSelection( GetDesignSettings().GetViaSizeIndex() ); } else { bool check = ( ( ( ID_POPUP_PCB_SELECT_VIASIZE1 + - (int) GetBoard()->GetViaSizeIndex() ) == aEvent.GetId() ) && + (int) GetDesignSettings().GetViaSizeIndex() ) == aEvent.GetId() ) && !GetDesignSettings().m_UseConnectedTrackWidth && - !GetBoard()->UseCustomTrackViaSize() ); + !GetDesignSettings().UseCustomTrackViaSize() ); aEvent.Check( check ); } diff --git a/pcbnew/tools/pcbnew_control.cpp b/pcbnew/tools/pcbnew_control.cpp index 378ae9a580..3fb689e71f 100644 --- a/pcbnew/tools/pcbnew_control.cpp +++ b/pcbnew/tools/pcbnew_control.cpp @@ -416,13 +416,13 @@ int PCBNEW_CONTROL::GridPrev( TOOL_EVENT& aEvent ) int PCBNEW_CONTROL::TrackWidthInc( TOOL_EVENT& aEvent ) { BOARD* board = getModel( PCB_T ); - int widthIndex = board->GetTrackWidthIndex() + 1; + int widthIndex = board->GetDesignSettings().GetTrackWidthIndex() + 1; - if( widthIndex >= (int) board->m_TrackWidthList.size() ) - widthIndex = board->m_TrackWidthList.size() - 1; + if( widthIndex >= (int) board->GetDesignSettings().m_TrackWidthList.size() ) + widthIndex = board->GetDesignSettings().m_TrackWidthList.size() - 1; - board->SetTrackWidthIndex( widthIndex ); - board->UseCustomTrackViaSize( false ); + board->GetDesignSettings().SetTrackWidthIndex( widthIndex ); + board->GetDesignSettings().UseCustomTrackViaSize( false ); wxUpdateUIEvent dummy; getEditFrame()->OnUpdateSelectTrackWidth( dummy ); @@ -437,13 +437,13 @@ int PCBNEW_CONTROL::TrackWidthInc( TOOL_EVENT& aEvent ) int PCBNEW_CONTROL::TrackWidthDec( TOOL_EVENT& aEvent ) { BOARD* board = getModel( PCB_T ); - int widthIndex = board->GetTrackWidthIndex() - 1; + int widthIndex = board->GetDesignSettings().GetTrackWidthIndex() - 1; if( widthIndex < 0 ) widthIndex = 0; - board->SetTrackWidthIndex( widthIndex ); - board->UseCustomTrackViaSize( false ); + board->GetDesignSettings().SetTrackWidthIndex( widthIndex ); + board->GetDesignSettings().UseCustomTrackViaSize( false ); wxUpdateUIEvent dummy; getEditFrame()->OnUpdateSelectTrackWidth( dummy ); @@ -458,13 +458,13 @@ int PCBNEW_CONTROL::TrackWidthDec( TOOL_EVENT& aEvent ) int PCBNEW_CONTROL::ViaSizeInc( TOOL_EVENT& aEvent ) { BOARD* board = getModel( PCB_T ); - int sizeIndex = board->GetViaSizeIndex() + 1; + int sizeIndex = board->GetDesignSettings().GetViaSizeIndex() + 1; - if( sizeIndex >= (int) board->m_ViasDimensionsList.size() ) - sizeIndex = board->m_ViasDimensionsList.size() - 1; + if( sizeIndex >= (int) board->GetDesignSettings().m_ViasDimensionsList.size() ) + sizeIndex = board->GetDesignSettings().m_ViasDimensionsList.size() - 1; - board->SetViaSizeIndex( sizeIndex ); - board->UseCustomTrackViaSize( false ); + board->GetDesignSettings().SetViaSizeIndex( sizeIndex ); + board->GetDesignSettings().UseCustomTrackViaSize( false ); wxUpdateUIEvent dummy; getEditFrame()->OnUpdateSelectViaSize( dummy ); @@ -479,13 +479,13 @@ int PCBNEW_CONTROL::ViaSizeInc( TOOL_EVENT& aEvent ) int PCBNEW_CONTROL::ViaSizeDec( TOOL_EVENT& aEvent ) { BOARD* board = getModel( PCB_T ); - int sizeIndex = board->GetViaSizeIndex() - 1; + int sizeIndex = board->GetDesignSettings().GetViaSizeIndex() - 1; if( sizeIndex < 0 ) sizeIndex = 0; - board->SetViaSizeIndex( sizeIndex ); - board->UseCustomTrackViaSize( false ); + board->GetDesignSettings().SetViaSizeIndex( sizeIndex ); + board->GetDesignSettings().UseCustomTrackViaSize( false ); wxUpdateUIEvent dummy; getEditFrame()->OnUpdateSelectViaSize( dummy ); From 5af454c28b7b673054702f372b84915028938686 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 13 May 2014 11:22:51 +0200 Subject: [PATCH 398/741] Fixed namecase for private fields in BOARD_DESIGN_SETTINGS class. Moved a few one-liners of BOARD_DESIGN_SETTINGS class to the header file. --- include/class_board_design_settings.h | 32 ++++++++++-------- pcbnew/class_board_design_settings.cpp | 45 +++++++++----------------- 2 files changed, 35 insertions(+), 42 deletions(-) diff --git a/include/class_board_design_settings.h b/include/class_board_design_settings.h index 70ba89f4ae..9fce5db845 100644 --- a/include/class_board_design_settings.h +++ b/include/class_board_design_settings.h @@ -249,7 +249,10 @@ public: * returns a bit-mask of all the layers that are visible * @return int - the visible layers in bit-mapped form. */ - LAYER_MSK GetVisibleLayers() const; + LAYER_MSK GetVisibleLayers() const + { + return m_visibleLayers; + } /** * Function SetVisibleAlls @@ -263,7 +266,10 @@ public: * changes the bit-mask of visible layers * @param aMask = The new bit-mask of visible layers */ - void SetVisibleLayers( LAYER_MSK aMask ); + void SetVisibleLayers( LAYER_MSK aMask ) + { + m_visibleLayers = aMask & m_enabledLayers & FULL_LAYERS; + } /** * Function IsLayerVisible @@ -274,7 +280,7 @@ public: bool IsLayerVisible( LAYER_NUM aLayer ) const { // If a layer is disabled, it is automatically invisible - return m_VisibleLayers & m_EnabledLayers & GetLayerMask( aLayer ); + return m_visibleLayers & m_enabledLayers & GetLayerMask( aLayer ); } /** @@ -292,7 +298,7 @@ public: */ int GetVisibleElements() const { - return m_VisibleElements; + return m_visibleElements; } /** @@ -302,7 +308,7 @@ public: */ void SetVisibleElements( int aMask ) { - m_VisibleElements = aMask; + m_visibleElements = aMask; } /** @@ -317,7 +323,7 @@ public: { assert( aElementCategory >= 0 && aElementCategory < END_PCB_VISIBLE_LIST ); - return ( m_VisibleElements & ( 1 << aElementCategory ) ); + return ( m_visibleElements & ( 1 << aElementCategory ) ); } /** @@ -336,7 +342,7 @@ public: */ inline LAYER_MSK GetEnabledLayers() const { - return m_EnabledLayers; + return m_enabledLayers; } /** @@ -354,7 +360,7 @@ public: */ bool IsLayerEnabled( LAYER_NUM aLayer ) const { - return m_EnabledLayers & GetLayerMask( aLayer ); + return m_enabledLayers & GetLayerMask( aLayer ); } /** @@ -363,7 +369,7 @@ public: */ int GetCopperLayerCount() const { - return m_CopperLayerCount; + return m_copperLayerCount; } /** @@ -402,10 +408,10 @@ private: ///> Custom via size (used after UseCustomTrackViaSize( true ) was called). VIA_DIMENSION m_customViaSize; - int m_CopperLayerCount; ///< Number of copper layers for this design - LAYER_MSK m_EnabledLayers; ///< Bit-mask for layer enabling - LAYER_MSK m_VisibleLayers; ///< Bit-mask for layer visibility - int m_VisibleElements; ///< Bit-mask for element category visibility + int m_copperLayerCount; ///< Number of copper layers for this design + LAYER_MSK m_enabledLayers; ///< Bit-mask for layer enabling + LAYER_MSK m_visibleLayers; ///< Bit-mask for layer visibility + int m_visibleElements; ///< Bit-mask for element category visibility int m_boardThickness; ///< Board thickness for 3D viewer }; diff --git a/pcbnew/class_board_design_settings.cpp b/pcbnew/class_board_design_settings.cpp index 79fa3ce42f..a727c904f9 100644 --- a/pcbnew/class_board_design_settings.cpp +++ b/pcbnew/class_board_design_settings.cpp @@ -54,13 +54,13 @@ BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS() : m_Pad_Master( NULL ) { - m_EnabledLayers = ALL_LAYERS; // All layers enabled at first. + m_enabledLayers = ALL_LAYERS; // All layers enabled at first. // SetCopperLayerCount() will adjust this. SetVisibleLayers( FULL_LAYERS ); // set all but hidden text as visible. - m_VisibleElements = ~( 1 << MOD_TEXT_INVISIBLE ); + m_visibleElements = ~( 1 << MOD_TEXT_INVISIBLE ); SetCopperLayerCount( 2 ); // Default design is a double sided board @@ -202,32 +202,19 @@ void BOARD_DESIGN_SETTINGS::SetTrackWidthIndex( unsigned aIndex ) } -// see pcbstruct.h -LAYER_MSK BOARD_DESIGN_SETTINGS::GetVisibleLayers() const -{ - return m_VisibleLayers; -} - - void BOARD_DESIGN_SETTINGS::SetVisibleAlls() { SetVisibleLayers( FULL_LAYERS ); - m_VisibleElements = -1; -} - - -void BOARD_DESIGN_SETTINGS::SetVisibleLayers( LAYER_MSK aMask ) -{ - m_VisibleLayers = aMask & m_EnabledLayers & FULL_LAYERS; + m_visibleElements = -1; } void BOARD_DESIGN_SETTINGS::SetLayerVisibility( LAYER_NUM aLayer, bool aNewState ) { if( aNewState && IsLayerEnabled( aLayer ) ) - m_VisibleLayers |= GetLayerMask( aLayer ); + m_visibleLayers |= GetLayerMask( aLayer ); else - m_VisibleLayers &= ~GetLayerMask( aLayer ); + m_visibleLayers &= ~GetLayerMask( aLayer ); } @@ -237,9 +224,9 @@ void BOARD_DESIGN_SETTINGS::SetElementVisibility( int aElementCategory, bool aNe return; if( aNewState ) - m_VisibleElements |= 1 << aElementCategory; + m_visibleElements |= 1 << aElementCategory; else - m_VisibleElements &= ~( 1 << aElementCategory ); + m_visibleElements &= ~( 1 << aElementCategory ); } @@ -247,17 +234,17 @@ void BOARD_DESIGN_SETTINGS::SetCopperLayerCount( int aNewLayerCount ) { // if( aNewLayerCount < 2 ) aNewLayerCount = 2; - m_CopperLayerCount = aNewLayerCount; + m_copperLayerCount = aNewLayerCount; // ensure consistency with the m_EnabledLayers member - m_EnabledLayers &= ~ALL_CU_LAYERS; - m_EnabledLayers |= LAYER_BACK; + m_enabledLayers &= ~ALL_CU_LAYERS; + m_enabledLayers |= LAYER_BACK; - if( m_CopperLayerCount > 1 ) - m_EnabledLayers |= LAYER_FRONT; + if( m_copperLayerCount > 1 ) + m_enabledLayers |= LAYER_FRONT; for( LAYER_NUM ii = LAYER_N_2; ii < aNewLayerCount - 1; ++ii ) - m_EnabledLayers |= GetLayerMask( ii ); + m_enabledLayers |= GetLayerMask( ii ); } @@ -266,13 +253,13 @@ void BOARD_DESIGN_SETTINGS::SetEnabledLayers( LAYER_MSK aMask ) // Back and front layers are always enabled. aMask |= LAYER_BACK | LAYER_FRONT; - m_EnabledLayers = aMask; + m_enabledLayers = aMask; // A disabled layer cannot be visible - m_VisibleLayers &= aMask; + m_visibleLayers &= aMask; // update m_CopperLayerCount to ensure its consistency with m_EnabledLayers - m_CopperLayerCount = LayerMaskCountSet( aMask & ALL_CU_LAYERS); + m_copperLayerCount = LayerMaskCountSet( aMask & ALL_CU_LAYERS); } From d9eb15c9fa7c00741565308c612f4bc6fb5b3850 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 13 May 2014 11:22:51 +0200 Subject: [PATCH 399/741] Moved NETCLASSES to BOARD_DESIGN_SETTINGS. Most of the changes are just adding GetDesignSettings() before every occurence of m_NetClasses. More complex changes: class_netclass.cpp - NETCLASS does not store the pointer to the parent BOARD anymore. Added function SetParams( BOARD_DESIGN_SETTINGS& ). class_netclass.h - Removed GetTrackMinWidth(), GetViaMinDiameter(), GetViaMinDrill(), GetuViaMinDiameter(), GetuViaMinDrill() as they were refering to BOARD_DESIGN_SETTINGS anyway (they are not net class specific). kicad_plugin.cpp - filters out empty nets (that are anyway not saved) when storing net class information. Previously it was done in NETCLASS::Format() function. --- include/class_board_design_settings.h | 61 ++++++++ pcbnew/autorouter/routing_matrix.cpp | 2 +- pcbnew/autorouter/solve.cpp | 2 +- pcbnew/class_board.cpp | 112 +-------------- pcbnew/class_board.h | 65 --------- pcbnew/class_board_connected_item.cpp | 4 +- pcbnew/class_board_design_settings.cpp | 97 +++++++++++++ pcbnew/class_module.cpp | 2 +- pcbnew/class_netclass.cpp | 130 +++++------------- pcbnew/class_netclass.h | 50 ++++--- pcbnew/dialogs/dialog_design_rules.cpp | 67 ++++----- pcbnew/dialogs/dialog_design_rules.h | 2 +- .../dialog_global_edit_tracks_and_vias.cpp | 21 +-- pcbnew/dialogs/dialog_plot.cpp | 4 +- pcbnew/drc.cpp | 2 +- pcbnew/drc_clearance_test_functions.cpp | 7 +- pcbnew/eagle_plugin.cpp | 4 +- pcbnew/edit_track_width.cpp | 2 +- pcbnew/editrack.cpp | 2 +- pcbnew/files.cpp | 6 +- pcbnew/kicad_plugin.cpp | 107 ++++++++------ pcbnew/legacy_plugin.cpp | 16 +-- pcbnew/legacy_plugin.h | 2 +- pcbnew/onleftclick.cpp | 2 +- pcbnew/onrightclick.cpp | 6 +- pcbnew/pcb_parser.cpp | 18 +-- pcbnew/router/pns_router.cpp | 2 +- pcbnew/router/router_tool.cpp | 4 +- pcbnew/specctra_export.cpp | 9 +- ...nvert_brd_items_to_polygons_with_Boost.cpp | 2 +- ...ones_convert_to_polygons_aux_functions.cpp | 2 +- 31 files changed, 378 insertions(+), 434 deletions(-) diff --git a/include/class_board_design_settings.h b/include/class_board_design_settings.h index 9fce5db845..a22f3c5bb6 100644 --- a/include/class_board_design_settings.h +++ b/include/class_board_design_settings.h @@ -8,6 +8,7 @@ #include // NB_COLORS #include #include +#include #include /** @@ -61,6 +62,9 @@ public: /// Track width list std::vector m_TrackWidthList; + /// List of current netclasses. There is always the default netclass. + NETCLASSES m_NetClasses; + bool m_MicroViasAllowed; ///< true to allow micro vias bool m_BlindBuriedViaAllowed; ///< true to allow blind/buried vias VIATYPE_T m_CurrentViaType; ///< via type (VIA_BLIND_BURIED, VIA_THROUGH VIA_MICROVIA) @@ -97,6 +101,56 @@ public: BOARD_DESIGN_SETTINGS(); + /** + * Function SetCurrentNetClassName + * sets the current net class name to \a aName. + * + * @param aName is a reference to a wxString object containing the current net class name. + */ + void SetCurrentNetClassName( const wxString& aName ) { m_currentNetClassName = aName; } + + /** + * Function GetCurrentNetClassName + * @return the current net class name. + */ + const wxString& GetCurrentNetClassName() const { return m_currentNetClassName; } + + /** + * Function SetCurrentNetClass + * Must be called after a netclass selection (or after a netclass parameter change + * Initialize vias and tracks values displayed in comb boxes of the auxiliary toolbar + * and some others parameters (netclass name ....) + * @param aNetClassName = the new netclass name + * @return true if lists of tracks and vias sizes are modified + */ + bool SetCurrentNetClass( const wxString& aNetClassName ); + + /** + * Function GetBiggestClearanceValue + * @return the biggest clearance value found in NetClasses list + */ + int GetBiggestClearanceValue(); + + /** + * Function GetSmallestClearanceValue + * @return the smallest clearance value found in NetClasses list + */ + int GetSmallestClearanceValue(); + + /** + * Function GetCurrentMicroViaSize + * @return the current micro via size, + * that is the current netclass value + */ + int GetCurrentMicroViaSize(); + + /** + * Function GetCurrentMicroViaDrill + * @return the current micro via drill, + * that is the current netclass value + */ + int GetCurrentMicroViaDrill(); + /** * Function GetTrackWidthIndex * @return the current track width list index. @@ -413,6 +467,13 @@ private: LAYER_MSK m_visibleLayers; ///< Bit-mask for layer visibility int m_visibleElements; ///< Bit-mask for element category visibility int m_boardThickness; ///< Board thickness for 3D viewer + + /// Current net class name used to display netclass info. + /// This is also the last used netclass after starting a track. + wxString m_currentNetClassName; + + void formatNetClass( NETCLASS* aNetClass, OUTPUTFORMATTER* aFormatter, int aNestLevel, + int aControlBits ) const throw( IO_ERROR ); }; #endif // BOARD_DESIGN_SETTINGS_H_ diff --git a/pcbnew/autorouter/routing_matrix.cpp b/pcbnew/autorouter/routing_matrix.cpp index 8449c90bc1..9d87b52bda 100644 --- a/pcbnew/autorouter/routing_matrix.cpp +++ b/pcbnew/autorouter/routing_matrix.cpp @@ -201,7 +201,7 @@ void PlaceCells( BOARD* aPcb, int net_code, int flag ) LAYER_MSK layerMask; // use the default NETCLASS? - NETCLASS* nc = aPcb->m_NetClasses.GetDefault(); + NETCLASS* nc = aPcb->GetDesignSettings().m_NetClasses.GetDefault(); int trackWidth = nc->GetTrackWidth(); int clearance = nc->GetClearance(); diff --git a/pcbnew/autorouter/solve.cpp b/pcbnew/autorouter/solve.cpp index 9da2804e9f..c1f66b5423 100644 --- a/pcbnew/autorouter/solve.cpp +++ b/pcbnew/autorouter/solve.cpp @@ -280,7 +280,7 @@ int PCB_EDIT_FRAME::Solve( wxDC* DC, int aLayersCount ) m_canvas->SetAbortRequest( false ); - s_Clearance = GetBoard()->m_NetClasses.GetDefault()->GetClearance(); + s_Clearance = GetBoard()->GetDesignSettings().m_NetClasses.GetDefault()->GetClearance(); // Prepare the undo command info s_ItemsListPicker.ClearListAndDeleteItems(); // Should not be necessary, but... diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index c5784848d7..c05474d29f 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -66,8 +66,7 @@ wxPoint BOARD_ITEM::ZeroOffset( 0, 0 ); BOARD::BOARD() : BOARD_ITEM( (BOARD_ITEM*) NULL, PCB_T ), m_NetInfo( this ), - m_paper( PAGE_INFO::A4 ), - m_NetClasses( this ) + m_paper( PAGE_INFO::A4 ) { // we have not loaded a board yet, assume latest until then. m_fileFormatVersionAtLoad = LEGACY_BOARD_FILE_VERSION; @@ -92,19 +91,12 @@ BOARD::BOARD() : m_Layer[layer].m_Type = LT_UNDEFINED; } - m_NetClasses.GetDefault()->SetDescription( _( "This is the default net class." ) ); + NETCLASS* defaultClass = m_designSettings.m_NetClasses.GetDefault(); + defaultClass->SetDescription( _( "This is the default net class." ) ); - m_designSettings.SetViaSizeIndex( 0 ); - m_designSettings.SetTrackWidthIndex( 0 ); - - /* Dick 5-Feb-2012: this seems unnecessary. I don't believe the comment - near line 70 of class_netclass.cpp. I stepped through with debugger. - Perhaps something else is at work, it is not a constructor race. // Initialize default values in default netclass. - */ - m_NetClasses.GetDefault()->SetParams(); - - SetCurrentNetClass( m_NetClasses.GetDefault()->GetName() ); + defaultClass->SetParams( m_designSettings ); + m_designSettings.SetCurrentNetClass( defaultClass->GetName() ); // Set sensible initial values for custom track width & via size m_designSettings.UseCustomTrackViaSize( false ); @@ -319,100 +311,6 @@ void BOARD::PopHighLight() } -bool BOARD::SetCurrentNetClass( const wxString& aNetClassName ) -{ - NETCLASS* netClass = m_NetClasses.Find( aNetClassName ); - bool lists_sizes_modified = false; - - // if not found (should not happen) use the default - if( netClass == NULL ) - netClass = m_NetClasses.GetDefault(); - - m_currentNetClassName = netClass->GetName(); - - // Initialize others values: - if( m_designSettings.m_ViasDimensionsList.size() == 0 ) - { - VIA_DIMENSION viadim; - lists_sizes_modified = true; - m_designSettings.m_ViasDimensionsList.push_back( viadim ); - } - - if( m_designSettings.m_TrackWidthList.size() == 0 ) - { - lists_sizes_modified = true; - m_designSettings.m_TrackWidthList.push_back( 0 ); - } - - /* note the m_ViasDimensionsList[0] and m_TrackWidthList[0] values - * are always the Netclass values - */ - if( m_designSettings.m_ViasDimensionsList[0].m_Diameter != netClass->GetViaDiameter() ) - lists_sizes_modified = true; - - m_designSettings.m_ViasDimensionsList[0].m_Diameter = netClass->GetViaDiameter(); - - if( m_designSettings.m_TrackWidthList[0] != netClass->GetTrackWidth() ) - lists_sizes_modified = true; - - m_designSettings.m_TrackWidthList[0] = netClass->GetTrackWidth(); - - if( m_designSettings.GetViaSizeIndex() >= m_designSettings.m_ViasDimensionsList.size() ) - m_designSettings.SetViaSizeIndex( m_designSettings.m_ViasDimensionsList.size() ); - - if( m_designSettings.GetTrackWidthIndex() >= m_designSettings.m_TrackWidthList.size() ) - m_designSettings.SetTrackWidthIndex( m_designSettings.m_TrackWidthList.size() ); - - return lists_sizes_modified; -} - - -int BOARD::GetBiggestClearanceValue() -{ - int clearance = m_NetClasses.GetDefault()->GetClearance(); - - //Read list of Net Classes - for( NETCLASSES::const_iterator nc = m_NetClasses.begin(); nc != m_NetClasses.end(); nc++ ) - { - NETCLASS* netclass = nc->second; - clearance = std::max( clearance, netclass->GetClearance() ); - } - - return clearance; -} - - -int BOARD::GetSmallestClearanceValue() -{ - int clearance = m_NetClasses.GetDefault()->GetClearance(); - - //Read list of Net Classes - for( NETCLASSES::const_iterator nc = m_NetClasses.begin(); nc != m_NetClasses.end(); nc++ ) - { - NETCLASS* netclass = nc->second; - clearance = std::min( clearance, netclass->GetClearance() ); - } - - return clearance; -} - - -int BOARD::GetCurrentMicroViaSize() -{ - NETCLASS* netclass = m_NetClasses.Find( m_currentNetClassName ); - - return netclass->GetuViaDiameter(); -} - - -int BOARD::GetCurrentMicroViaDrill() -{ - NETCLASS* netclass = m_NetClasses.Find( m_currentNetClassName ); - - return netclass->GetuViaDrill(); -} - - bool BOARD::SetLayer( LAYER_NUM aIndex, const LAYER& aLayer ) { if( aIndex < NB_COPPER_LAYERS ) diff --git a/pcbnew/class_board.h b/pcbnew/class_board.h index a728061ba0..ccb3589ccf 100644 --- a/pcbnew/class_board.h +++ b/pcbnew/class_board.h @@ -208,10 +208,6 @@ private: /// Number of unconnected nets in the current rats nest. int m_unconnectedNetCount; - /// Current net class name used to display netclass info. - /// This is also the last used netclass after starting a track. - wxString m_currentNetClassName; - /** * Function chainMarkedSegments * is used by MarkTrace() to set the BUSY flag of connected segments of the trace @@ -223,10 +219,6 @@ private: */ void chainMarkedSegments( wxPoint aPosition, LAYER_MSK aLayerMask, TRACK_PTRS* aList ); - void formatNetClass( NETCLASS* aNetClass, OUTPUTFORMATTER* aFormatter, int aNestLevel, - int aControlBits ) const - throw( IO_ERROR ); - public: void SetFileName( const wxString& aFileName ) { m_fileName = aFileName; } @@ -250,9 +242,6 @@ public: /// zone contour currently in progress ZONE_CONTAINER* m_CurrentZoneContour; - /// List of current netclasses. There is always the default netclass. - NETCLASSES m_NetClasses; - BOARD(); ~BOARD(); @@ -742,20 +731,6 @@ public: */ void SetUnconnectedNetCount( unsigned aCount ) { m_unconnectedNetCount = aCount; } - /** - * Function SetCurrentNetClassName - * sets the current net class name to \a aName. - * - * @param aName is a reference to a wxString object containing the current net class name. - */ - void SetCurrentNetClassName( const wxString& aName ) { m_currentNetClassName = aName; } - - /** - * Function GetCurrentNetClassName - * @return the current net class name. - */ - const wxString& GetCurrentNetClassName() const { return m_currentNetClassName; } - /** * Function GetPadCount * @return the number of pads in board @@ -964,10 +939,6 @@ public: */ int SortedNetnamesList( wxArrayString& aNames, bool aSortbyPadsCount ); - /************************************** - * Functions related to NetClasses: - **************************************/ - /** * Function SynchronizeNetsAndNetClasses * copies NETCLASS info to each NET, based on NET membership in a NETCLASS. @@ -977,42 +948,6 @@ public: */ void SynchronizeNetsAndNetClasses(); - /** - * Function SetCurrentNetClass - * Must be called after a netclass selection (or after a netclass parameter change - * Initialize vias and tracks values displayed in comb boxes of the auxiliary toolbar - * and some others parameters (netclass name ....) - * @param aNetClassName = the new netclass name - * @return true if lists of tracks and vias sizes are modified - */ - bool SetCurrentNetClass( const wxString& aNetClassName ); - - /** - * Function GetBiggestClearanceValue - * @return the biggest clearance value found in NetClasses list - */ - int GetBiggestClearanceValue(); - - /** - * Function GetSmallestClearanceValue - * @return the smallest clearance value found in NetClasses list - */ - int GetSmallestClearanceValue(); - - /** - * Function GetCurrentMicroViaSize - * @return the current micro via size, - * that is the current netclass value - */ - int GetCurrentMicroViaSize(); - - /** - * Function GetCurrentMicroViaDrill - * @return the current micro via drill, - * that is the current netclass value - */ - int GetCurrentMicroViaDrill(); - /***************************************************************************/ wxString GetClass() const diff --git a/pcbnew/class_board_connected_item.cpp b/pcbnew/class_board_connected_item.cpp index 0248131d35..9aaa6d14ad 100644 --- a/pcbnew/class_board_connected_item.cpp +++ b/pcbnew/class_board_connected_item.cpp @@ -144,7 +144,7 @@ NETCLASS* BOARD_CONNECTED_ITEM::GetNetClass() const if( netclass ) return netclass; else - return board->m_NetClasses.GetDefault(); + return board->GetDesignSettings().m_NetClasses.GetDefault(); } @@ -158,7 +158,7 @@ wxString BOARD_CONNECTED_ITEM::GetNetClassName() const else { BOARD* board = GetBoard(); - name = board->m_NetClasses.GetDefault()->GetName(); + name = board->GetDesignSettings().m_NetClasses.GetDefault()->GetName(); } return name; diff --git a/pcbnew/class_board_design_settings.cpp b/pcbnew/class_board_design_settings.cpp index a727c904f9..aac977d827 100644 --- a/pcbnew/class_board_design_settings.cpp +++ b/pcbnew/class_board_design_settings.cpp @@ -102,6 +102,9 @@ BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS() : // Layer thickness for 3D viewer m_boardThickness = Millimeter2iu( DEFAULT_BOARD_THICKNESS_MM ); + + m_viaSizeIndex = 0; + m_trackWidthIndex = 0; } // Add parameters to save in project config. @@ -171,6 +174,100 @@ void BOARD_DESIGN_SETTINGS::AppendConfigs( PARAM_CFG_ARRAY* aResult ) } +bool BOARD_DESIGN_SETTINGS::SetCurrentNetClass( const wxString& aNetClassName ) +{ + NETCLASS* netClass = m_NetClasses.Find( aNetClassName ); + bool lists_sizes_modified = false; + + // if not found (should not happen) use the default + if( netClass == NULL ) + netClass = m_NetClasses.GetDefault(); + + m_currentNetClassName = netClass->GetName(); + + // Initialize others values: + if( m_ViasDimensionsList.size() == 0 ) + { + VIA_DIMENSION viadim; + lists_sizes_modified = true; + m_ViasDimensionsList.push_back( viadim ); + } + + if( m_TrackWidthList.size() == 0 ) + { + lists_sizes_modified = true; + m_TrackWidthList.push_back( 0 ); + } + + /* note the m_ViasDimensionsList[0] and m_TrackWidthList[0] values + * are always the Netclass values + */ + if( m_ViasDimensionsList[0].m_Diameter != netClass->GetViaDiameter() ) + lists_sizes_modified = true; + + m_ViasDimensionsList[0].m_Diameter = netClass->GetViaDiameter(); + + if( m_TrackWidthList[0] != netClass->GetTrackWidth() ) + lists_sizes_modified = true; + + m_TrackWidthList[0] = netClass->GetTrackWidth(); + + if( GetViaSizeIndex() >= m_ViasDimensionsList.size() ) + SetViaSizeIndex( m_ViasDimensionsList.size() ); + + if( GetTrackWidthIndex() >= m_TrackWidthList.size() ) + SetTrackWidthIndex( m_TrackWidthList.size() ); + + return lists_sizes_modified; +} + + +int BOARD_DESIGN_SETTINGS::GetBiggestClearanceValue() +{ + int clearance = m_NetClasses.GetDefault()->GetClearance(); + + //Read list of Net Classes + for( NETCLASSES::const_iterator nc = m_NetClasses.begin(); nc != m_NetClasses.end(); nc++ ) + { + NETCLASS* netclass = nc->second; + clearance = std::max( clearance, netclass->GetClearance() ); + } + + return clearance; +} + + +int BOARD_DESIGN_SETTINGS::GetSmallestClearanceValue() +{ + int clearance = m_NetClasses.GetDefault()->GetClearance(); + + //Read list of Net Classes + for( NETCLASSES::const_iterator nc = m_NetClasses.begin(); nc != m_NetClasses.end(); nc++ ) + { + NETCLASS* netclass = nc->second; + clearance = std::min( clearance, netclass->GetClearance() ); + } + + return clearance; +} + + +int BOARD_DESIGN_SETTINGS::GetCurrentMicroViaSize() +{ + NETCLASS* netclass = m_NetClasses.Find( m_currentNetClassName ); + + return netclass->GetuViaDiameter(); +} + + +int BOARD_DESIGN_SETTINGS::GetCurrentMicroViaDrill() +{ + NETCLASS* netclass = m_NetClasses.Find( m_currentNetClassName ); + + return netclass->GetuViaDrill(); +} + + void BOARD_DESIGN_SETTINGS::SetViaSizeIndex( unsigned aIndex ) { if( aIndex >= m_ViasDimensionsList.size() ) diff --git a/pcbnew/class_module.cpp b/pcbnew/class_module.cpp index bc55907cb3..5673c06f2d 100644 --- a/pcbnew/class_module.cpp +++ b/pcbnew/class_module.cpp @@ -447,7 +447,7 @@ const EDA_RECT MODULE::GetBoundingBox() const // Add the Clearance shape size: (shape around the pads when the // clearance is shown. Not optimized, but the draw cost is small // (perhaps smaller than optimization). - int biggest_clearance = GetBoard()->GetBiggestClearanceValue(); + int biggest_clearance = GetBoard()->GetDesignSettings().GetBiggestClearanceValue(); area.Inflate( biggest_clearance ); return area; diff --git a/pcbnew/class_netclass.cpp b/pcbnew/class_netclass.cpp index 73729324ef..daa72ff32b 100644 --- a/pcbnew/class_netclass.cpp +++ b/pcbnew/class_netclass.cpp @@ -39,59 +39,43 @@ const wxChar NETCLASS::Default[] = wxT( "Default" ); // Initial values for netclass initialization -int NETCLASS::DEFAULT_CLEARANCE = DMils2iu( 100 ); // track to track and track to pads clearance -int NETCLASS::DEFAULT_VIA_DRILL = DMils2iu( 250 ); // default via drill -int NETCLASS::DEFAULT_UVIA_DRILL = DMils2iu( 50 ); // micro via drill +const int NETCLASS::DEFAULT_CLEARANCE = DMils2iu( 100 ); // track to track and track to pads clearance +const int NETCLASS::DEFAULT_VIA_DRILL = DMils2iu( 250 ); // default via drill +const int NETCLASS::DEFAULT_UVIA_DRILL = DMils2iu( 50 ); // micro via drill -NETCLASS::NETCLASS( BOARD* aParent, const wxString& aName, const NETCLASS* initialParameters ) : - m_Parent( aParent ), +NETCLASS::NETCLASS( const wxString& aName ) : m_Name( aName ) { - // use initialParameters if not NULL, else set the initial - // parameters from boardDesignSettings (try to change this) - SetParams( initialParameters ); + // Default settings + SetClearance( DEFAULT_CLEARANCE ); + SetViaDrill( DEFAULT_VIA_DRILL ); + SetuViaDrill( DEFAULT_UVIA_DRILL ); } -void NETCLASS::SetParams( const NETCLASS* defaults ) +void NETCLASS::SetParams( const NETCLASS& aDefaults ) { - if( defaults ) - { - SetClearance( defaults->GetClearance() ); - SetTrackWidth( defaults->GetTrackWidth() ); - SetViaDiameter( defaults->GetViaDiameter() ); - SetViaDrill( defaults->GetViaDrill() ); - SetuViaDiameter( defaults->GetuViaDiameter() ); - SetuViaDrill( defaults->GetuViaDrill() ); - } - else - { + SetClearance( aDefaults.GetClearance() ); + SetTrackWidth( aDefaults.GetTrackWidth() ); + SetViaDiameter( aDefaults.GetViaDiameter() ); + SetViaDrill( aDefaults.GetViaDrill() ); + SetuViaDiameter( aDefaults.GetuViaDiameter() ); + SetuViaDrill( aDefaults.GetuViaDrill() ); +} -/* Dick 5-Feb-2012: I do not believe this comment to be true with current code. - It is certainly not a constructor race. Normally items are initialized - within a class according to the order of their appearance. - // Note: - // We use m_Parent->GetDesignSettings() to get some default values - // But when this function is called when instantiating a BOARD class, - // by the NETCLASSES constructor that calls NETCLASS constructor, - // the BOARD constructor (see BOARD::BOARD) is not yet run, - // and BOARD::m_designSettings contains not yet initialized values. - // So inside the BOARD constructor itself, you SHOULD recall SetParams -*/ +void NETCLASS::SetParams( const BOARD_DESIGN_SETTINGS& aSettings ) +{ + SetTrackWidth( aSettings.m_TrackMinWidth ); + SetViaDiameter( aSettings.m_ViasMinSize ); + SetuViaDiameter( aSettings.m_MicroViasMinSize ); - const BOARD_DESIGN_SETTINGS& g = m_Parent->GetDesignSettings(); - - SetTrackWidth( g.m_TrackMinWidth ); - SetViaDiameter( g.m_ViasMinSize ); - SetuViaDiameter( g.m_MicroViasMinSize ); - - // Use default values for next parameters: - SetClearance( DEFAULT_CLEARANCE ); - SetViaDrill( DEFAULT_VIA_DRILL ); - SetuViaDrill( DEFAULT_UVIA_DRILL ); - } + // TODO: BOARD_DESIGN_SETTINGS may provide the following parameters - should it? + // Use default values for next parameters: + SetClearance( DEFAULT_CLEARANCE ); + SetViaDrill( DEFAULT_VIA_DRILL ); + SetuViaDrill( DEFAULT_UVIA_DRILL ); } @@ -100,9 +84,8 @@ NETCLASS::~NETCLASS() } -NETCLASSES::NETCLASSES( BOARD* aParent ) : - m_Parent( aParent ), - m_Default( aParent, NETCLASS::Default ) +NETCLASSES::NETCLASSES() : + m_Default( NETCLASS::Default ) { } @@ -198,7 +181,7 @@ NETCLASS* NETCLASSES::Find( const wxString& aName ) const void BOARD::SynchronizeNetsAndNetClasses() { - // D(printf("start\n");) // simple performance/timing indicator. + NETCLASSES& netClasses = m_designSettings.m_NetClasses; // set all NETs to the default NETCLASS, then later override some // as we go through the NETCLASSes. @@ -206,19 +189,19 @@ void BOARD::SynchronizeNetsAndNetClasses() for( NETINFO_LIST::iterator net( m_NetInfo.begin() ), netEnd( m_NetInfo.end() ); net != netEnd; ++net ) { - net->SetClass( m_NetClasses.GetDefault() ); + net->SetClass( netClasses.GetDefault() ); } // Add netclass name and pointer to nets. If a net is in more than one netclass, // set the net's name and pointer to only the first netclass. Subsequent // and therefore bogus netclass memberships will be deleted in logic below this loop. - for( NETCLASSES::iterator clazz=m_NetClasses.begin(); clazz!=m_NetClasses.end(); ++clazz ) + for( NETCLASSES::iterator clazz = netClasses.begin(); clazz != netClasses.end(); ++clazz ) { NETCLASS* netclass = clazz->second; - for( NETCLASS::iterator member = netclass->begin(); member!=netclass->end(); ++member ) + for( NETCLASS::iterator member = netclass->begin(); member != netclass->end(); ++member ) { - const wxString& netname = *member; + const wxString& netname = *member; // although this overall function seems to be adequately fast, // FindNet( wxString ) uses now a fast binary search and is fast @@ -237,14 +220,14 @@ void BOARD::SynchronizeNetsAndNetClasses() // contain netnames that do not exist, by deleting all netnames from // every netclass and re-adding them. - for( NETCLASSES::iterator clazz=m_NetClasses.begin(); clazz!=m_NetClasses.end(); ++clazz ) + for( NETCLASSES::iterator clazz = netClasses.begin(); clazz != netClasses.end(); ++clazz ) { NETCLASS* netclass = clazz->second; netclass->Clear(); } - m_NetClasses.GetDefault()->Clear(); + netClasses.GetDefault()->Clear(); for( NETINFO_LIST::iterator net( m_NetInfo.begin() ), netEnd( m_NetInfo.end() ); net != netEnd; ++net ) @@ -253,14 +236,12 @@ void BOARD::SynchronizeNetsAndNetClasses() // because of the std:map<> this should be fast, and because of // prior logic, netclass should not be NULL. - NETCLASS* netclass = m_NetClasses.Find( classname ); + NETCLASS* netclass = netClasses.Find( classname ); wxASSERT( netclass ); netclass->Add( net->GetNetname() ); } - - // D(printf("stop\n");) } @@ -286,36 +267,6 @@ void NETCLASS::Show( int nestLevel, std::ostream& os ) const #endif -int NETCLASS::GetTrackMinWidth() const -{ - return m_Parent->GetDesignSettings().m_TrackMinWidth; -} - - -int NETCLASS::GetViaMinDiameter() const -{ - return m_Parent->GetDesignSettings().m_ViasMinSize; -} - - -int NETCLASS::GetViaMinDrill() const -{ - return m_Parent->GetDesignSettings().m_ViasMinDrill; -} - - -int NETCLASS::GetuViaMinDiameter() const -{ - return m_Parent->GetDesignSettings().m_MicroViasMinSize; -} - - -int NETCLASS::GetuViaMinDrill() const -{ - return m_Parent->GetDesignSettings().m_MicroViasMinDrill; -} - - void NETCLASS::Format( OUTPUTFORMATTER* aFormatter, int aNestLevel, int aControlBits ) const throw( IO_ERROR ) { @@ -333,14 +284,7 @@ void NETCLASS::Format( OUTPUTFORMATTER* aFormatter, int aNestLevel, int aControl aFormatter->Print( aNestLevel+1, "(uvia_drill %s)\n", FMT_IU( GetuViaDrill() ).c_str() ); for( NETCLASS::const_iterator it = begin(); it != end(); ++it ) - { - NETINFO_ITEM* netinfo = m_Parent->FindNet( *it ); - - if( netinfo && netinfo->GetNodesCount() > 0 ) - { - aFormatter->Print( aNestLevel+1, "(add_net %s)\n", aFormatter->Quotew( *it ).c_str() ); - } - } + aFormatter->Print( aNestLevel+1, "(add_net %s)\n", aFormatter->Quotew( *it ).c_str() ); aFormatter->Print( aNestLevel, ")\n\n" ); } diff --git a/pcbnew/class_netclass.h b/pcbnew/class_netclass.h index d5e0005357..7085b3ebe3 100644 --- a/pcbnew/class_netclass.h +++ b/pcbnew/class_netclass.h @@ -41,6 +41,7 @@ class LINE_READER; class BOARD; +class BOARD_DESIGN_SETTINGS; /** @@ -53,17 +54,15 @@ class NETCLASS { private: // Default values used to init a NETCLASS - static int DEFAULT_CLEARANCE; - static int DEFAULT_VIA_DRILL; - static int DEFAULT_UVIA_DRILL; + const static int DEFAULT_CLEARANCE; + const static int DEFAULT_VIA_DRILL; + const static int DEFAULT_UVIA_DRILL; protected: - - BOARD* m_Parent; wxString m_Name; ///< Name of the net class wxString m_Description; ///< what this NETCLASS is for. - typedef std::set STRINGSET; + typedef std::set STRINGSET; STRINGSET m_Members; ///< names of NET members of this class @@ -85,12 +84,9 @@ public: /** * Constructor * stuffs a NETCLASS instance with aParent, aName, and optionally the initialParameters - * @param aParent = the parent board * @param aName = the name of this new netclass - * @param initialParameters is a NETCLASS to copy parameters from, or if - * NULL tells me to copy default settings from BOARD::m_designSettings. */ - NETCLASS( BOARD* aParent, const wxString& aName, const NETCLASS* initialParameters = NULL ); + NETCLASS( const wxString& aName ); ~NETCLASS(); @@ -115,7 +111,6 @@ public: return m_Members.size(); } - /** * Function Clear * empties the collection of members. @@ -125,7 +120,6 @@ public: m_Members.clear(); } - /** * Function AddMember * adds \a aNetname to this NETCLASS if it is not already in this NETCLASS. @@ -169,34 +163,35 @@ public: void SetClearance( int aClearance ) { m_Clearance = aClearance; } int GetTrackWidth() const { return m_TrackWidth; } - int GetTrackMinWidth() const; void SetTrackWidth( int aWidth ) { m_TrackWidth = aWidth; } int GetViaDiameter() const { return m_ViaDia; } - int GetViaMinDiameter() const; void SetViaDiameter( int aDia ) { m_ViaDia = aDia; } int GetViaDrill() const { return m_ViaDrill; } - int GetViaMinDrill() const; void SetViaDrill( int aSize ) { m_ViaDrill = aSize; } int GetuViaDiameter() const { return m_uViaDia; } - int GetuViaMinDiameter() const; void SetuViaDiameter( int aSize ) { m_uViaDia = aSize; } int GetuViaDrill() const { return m_uViaDrill; } - int GetuViaMinDrill() const; void SetuViaDrill( int aSize ) { m_uViaDrill = aSize; } - /** * Function SetParams * will set all the parameters by copying them from \a defaults. * Parameters are the values like m_ViaSize, etc, but do not include m_Description. - * @param defaults is another NETCLASS to copy from. If NULL, then copy - * from global preferences instead. + * @param aDefaults is another NETCLASS object to copy from. */ - void SetParams( const NETCLASS* defaults = NULL ); + void SetParams( const NETCLASS& aDefaults ); + + /** + * Function SetParams + * will set all the parameters by copying them from board design settings. + * @param aSettings is a BOARD_DESIGN_SETTINGS object to copy from. Clearance, via drill and + * microvia drill values are taken from the defaults. + */ + void SetParams( const BOARD_DESIGN_SETTINGS& aSettings ); /** * Function Format @@ -225,9 +220,7 @@ public: class NETCLASSES { private: - BOARD* m_Parent; - - typedef std::map NETCLASSMAP; + typedef std::map NETCLASSMAP; /// all the NETCLASSes except the default one. NETCLASSMAP m_NetClasses; @@ -236,7 +229,7 @@ private: NETCLASS m_Default; public: - NETCLASSES( BOARD* aParent = NULL ); + NETCLASSES(); ~NETCLASSES(); /** @@ -245,7 +238,7 @@ public: */ void Clear(); - typedef NETCLASSMAP::iterator iterator; + typedef NETCLASSMAP::iterator iterator; iterator begin() { return m_NetClasses.begin(); } iterator end() { return m_NetClasses.end(); } @@ -253,7 +246,6 @@ public: const_iterator begin() const { return m_NetClasses.begin(); } const_iterator end() const { return m_NetClasses.end(); } - /** * Function GetCount * @return the number of netclasses, excluding the default one. @@ -263,6 +255,10 @@ public: return m_NetClasses.size(); } + /** + * Function GetDefault + * @return the default net class. + */ NETCLASS* GetDefault() const { return (NETCLASS*) &m_Default; diff --git a/pcbnew/dialogs/dialog_design_rules.cpp b/pcbnew/dialogs/dialog_design_rules.cpp index 35b687de13..13f6da13c9 100644 --- a/pcbnew/dialogs/dialog_design_rules.cpp +++ b/pcbnew/dialogs/dialog_design_rules.cpp @@ -190,15 +190,15 @@ void DIALOG_DESIGN_RULES::PrintCurrentSettings() m_MessagesList->AppendToPage( _( "Current general settings:
" ) ); // Display min values: - value = StringFromValue( g_UserUnit, m_BrdSettings.m_TrackMinWidth, true ); + value = StringFromValue( g_UserUnit, m_BrdSettings->m_TrackMinWidth, true ); msg.Printf( _( "Minimum value for tracks width: %s
\n" ), GetChars( value ) ); m_MessagesList->AppendToPage( msg ); - value = StringFromValue( g_UserUnit, m_BrdSettings.m_ViasMinSize, true ); + value = StringFromValue( g_UserUnit, m_BrdSettings->m_ViasMinSize, true ); msg.Printf( _( "Minimum value for vias diameter: %s
\n" ), GetChars( value ) ); m_MessagesList->AppendToPage( msg ); - value = StringFromValue( g_UserUnit, m_BrdSettings.m_MicroViasMinSize, true ); + value = StringFromValue( g_UserUnit, m_BrdSettings->m_MicroViasMinSize, true ); msg.Printf( _( "Minimum value for microvias diameter: %s
\n" ), GetChars( value ) ); m_MessagesList->AppendToPage( msg ); } @@ -212,7 +212,7 @@ void DIALOG_DESIGN_RULES::InitDialogRules() SetReturnCode( 0 ); m_Pcb = m_Parent->GetBoard(); - m_BrdSettings = m_Pcb->GetDesignSettings(); + m_BrdSettings = &m_Pcb->GetDesignSettings(); // Initialize the Rules List InitRulesList(); @@ -220,13 +220,8 @@ void DIALOG_DESIGN_RULES::InitDialogRules() // copy all NETs into m_AllNets by adding them as NETCUPs. // @todo go fix m_Pcb->SynchronizeNetsAndNetClasses() so that the netcode==0 is not present in the BOARD::m_NetClasses - - - NETCLASS* netclass; - - NETCLASSES& netclasses = m_Pcb->m_NetClasses; - - netclass = netclasses.GetDefault(); + NETCLASSES& netclasses = m_BrdSettings->m_NetClasses; + NETCLASS* netclass = netclasses.GetDefault(); // Initialize list of nets for Default Net Class for( NETCLASS::const_iterator name = netclass->begin(); name != netclass->end(); ++name ) @@ -262,23 +257,23 @@ void DIALOG_DESIGN_RULES::InitGlobalRules() AddUnitSymbol( *m_MicroViaMinDrillTitle ); AddUnitSymbol( *m_TrackMinWidthTitle ); - PutValueInLocalUnits( *m_SetViasMinSizeCtrl, m_BrdSettings.m_ViasMinSize ); - PutValueInLocalUnits( *m_SetViasMinDrillCtrl, m_BrdSettings.m_ViasMinDrill ); + PutValueInLocalUnits( *m_SetViasMinSizeCtrl, m_BrdSettings->m_ViasMinSize ); + PutValueInLocalUnits( *m_SetViasMinDrillCtrl, m_BrdSettings->m_ViasMinDrill ); - if( m_BrdSettings.m_BlindBuriedViaAllowed ) + if( m_BrdSettings->m_BlindBuriedViaAllowed ) m_OptViaType->SetSelection( 1 ); - m_AllowMicroViaCtrl->SetSelection( m_BrdSettings.m_MicroViasAllowed ? 1 : 0 ); - PutValueInLocalUnits( *m_SetMicroViasMinSizeCtrl, m_BrdSettings.m_MicroViasMinSize ); - PutValueInLocalUnits( *m_SetMicroViasMinDrillCtrl, m_BrdSettings.m_MicroViasMinDrill ); - PutValueInLocalUnits( *m_SetTrackMinWidthCtrl, m_BrdSettings.m_TrackMinWidth ); + m_AllowMicroViaCtrl->SetSelection( m_BrdSettings->m_MicroViasAllowed ? 1 : 0 ); + PutValueInLocalUnits( *m_SetMicroViasMinSizeCtrl, m_BrdSettings->m_MicroViasMinSize ); + PutValueInLocalUnits( *m_SetMicroViasMinDrillCtrl, m_BrdSettings->m_MicroViasMinDrill ); + PutValueInLocalUnits( *m_SetTrackMinWidthCtrl, m_BrdSettings->m_TrackMinWidth ); // Initialize Vias and Tracks sizes lists. // note we display only extra values, never the current netclass value. // (the first value in history list) - m_TracksWidthList = m_BrdSettings.m_TrackWidthList; + m_TracksWidthList = m_BrdSettings->m_TrackWidthList; m_TracksWidthList.erase( m_TracksWidthList.begin() ); // remove the netclass value - m_ViasDimensionsList = m_BrdSettings.m_ViasDimensionsList; + m_ViasDimensionsList = m_BrdSettings->m_ViasDimensionsList; m_ViasDimensionsList.erase( m_ViasDimensionsList.begin() ); // remove the netclass value InitDimensionsLists(); } @@ -484,7 +479,7 @@ static void class2gridRow( wxGrid* grid, int row, NETCLASS* nc ) */ void DIALOG_DESIGN_RULES::InitRulesList() { - NETCLASSES& netclasses = m_Pcb->m_NetClasses; + NETCLASSES& netclasses = m_BrdSettings->m_NetClasses; // the +1 is for the Default NETCLASS. if( netclasses.GetCount() + 1 > (unsigned) m_grid->GetNumberRows() ) @@ -524,7 +519,7 @@ static void gridRow2class( wxGrid* grid, int row, NETCLASS* nc ) */ void DIALOG_DESIGN_RULES::CopyRulesListToBoard() { - NETCLASSES& netclasses = m_Pcb->m_NetClasses; + NETCLASSES& netclasses = m_BrdSettings->m_NetClasses; // Remove all netclasses from board. We'll copy new list after netclasses.Clear(); @@ -535,9 +530,9 @@ void DIALOG_DESIGN_RULES::CopyRulesListToBoard() // Copy other NetClasses : for( int row = 1; row < m_grid->GetNumberRows(); ++row ) { - NETCLASS* nc = new NETCLASS( m_Pcb, m_grid->GetRowLabelValue( row ) ); + NETCLASS* nc = new NETCLASS( m_grid->GetRowLabelValue( row ) ); - if( !m_Pcb->m_NetClasses.Add( nc ) ) + if( !m_BrdSettings->m_NetClasses.Add( nc ) ) { // this netclass cannot be added because an other netclass with the same name exists // Should not occur because OnAddNetclassClick() tests for existing NetClass names @@ -568,20 +563,20 @@ void DIALOG_DESIGN_RULES::CopyRulesListToBoard() void DIALOG_DESIGN_RULES::CopyGlobalRulesToBoard() /*************************************************/ { - m_BrdSettings.m_BlindBuriedViaAllowed = m_OptViaType->GetSelection() > 0; + m_BrdSettings->m_BlindBuriedViaAllowed = m_OptViaType->GetSelection() > 0; // Update vias minimum values for DRC - m_BrdSettings.m_ViasMinSize = ValueFromTextCtrl( *m_SetViasMinSizeCtrl ); - m_BrdSettings.m_ViasMinDrill = ValueFromTextCtrl( *m_SetViasMinDrillCtrl ); + m_BrdSettings->m_ViasMinSize = ValueFromTextCtrl( *m_SetViasMinSizeCtrl ); + m_BrdSettings->m_ViasMinDrill = ValueFromTextCtrl( *m_SetViasMinDrillCtrl ); - m_BrdSettings.m_MicroViasAllowed = m_AllowMicroViaCtrl->GetSelection() == 1; + m_BrdSettings->m_MicroViasAllowed = m_AllowMicroViaCtrl->GetSelection() == 1; // Update microvias minimum values for DRC - m_BrdSettings.m_MicroViasMinSize = ValueFromTextCtrl( *m_SetMicroViasMinSizeCtrl ); - m_BrdSettings.m_MicroViasMinDrill = ValueFromTextCtrl( *m_SetMicroViasMinDrillCtrl ); + m_BrdSettings->m_MicroViasMinSize = ValueFromTextCtrl( *m_SetMicroViasMinSizeCtrl ); + m_BrdSettings->m_MicroViasMinDrill = ValueFromTextCtrl( *m_SetMicroViasMinDrillCtrl ); // Update tracks minimum values for DRC - m_BrdSettings.m_TrackMinWidth = ValueFromTextCtrl( *m_SetTrackMinWidthCtrl ); + m_BrdSettings->m_TrackMinWidth = ValueFromTextCtrl( *m_SetTrackMinWidthCtrl ); } @@ -634,12 +629,12 @@ void DIALOG_DESIGN_RULES::CopyDimensionsListsToBoard() // Sort new list by by increasing value sort( m_ViasDimensionsList.begin(), m_ViasDimensionsList.end() ); - std::vector* tlist = &m_BrdSettings.m_TrackWidthList; + std::vector* tlist = &m_BrdSettings->m_TrackWidthList; tlist->erase( tlist->begin() + 1, tlist->end() ); // Remove old "custom" sizes tlist->insert( tlist->end(), m_TracksWidthList.begin(), m_TracksWidthList.end() ); //Add new "custom" sizes // Reinitialize m_ViaSizeList - std::vector* vialist = &m_BrdSettings.m_ViasDimensionsList; + std::vector* vialist = &m_BrdSettings->m_ViasDimensionsList; vialist->erase( vialist->begin() + 1, vialist->end() ); vialist->insert( vialist->end(), m_ViasDimensionsList.begin(), m_ViasDimensionsList.end() ); } @@ -671,11 +666,9 @@ void DIALOG_DESIGN_RULES::OnOkButtonClick( wxCommandEvent& event ) CopyGlobalRulesToBoard(); CopyDimensionsListsToBoard(); - m_Pcb->SetDesignSettings( m_BrdSettings ); - EndModal( wxID_OK ); - m_Pcb->SetCurrentNetClass( NETCLASS::Default ); + m_BrdSettings->SetCurrentNetClass( NETCLASS::Default ); } @@ -755,7 +748,7 @@ void DIALOG_DESIGN_RULES::OnRemoveNetclassClick( wxCommandEvent& event ) for( unsigned ii = 0; ii < select.GetCount(); ii++ ) { int grid_row = select[ii]; - if( grid_row != 0 ) // Do not remove the default class + if( grid_row != 0 ) // Do not remove the default class { wxString classname = m_grid->GetRowLabelValue( grid_row ); m_grid->DeleteRows( grid_row ); diff --git a/pcbnew/dialogs/dialog_design_rules.h b/pcbnew/dialogs/dialog_design_rules.h index 3bfbfd8d57..f7206b5175 100644 --- a/pcbnew/dialogs/dialog_design_rules.h +++ b/pcbnew/dialogs/dialog_design_rules.h @@ -40,7 +40,7 @@ private: PCB_EDIT_FRAME* m_Parent; BOARD* m_Pcb; - BOARD_DESIGN_SETTINGS m_BrdSettings; + BOARD_DESIGN_SETTINGS* m_BrdSettings; static int s_LastTabSelection; ///< which tab user had open last diff --git a/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp b/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp index 71904a927e..5f3afd55f1 100644 --- a/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp +++ b/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp @@ -46,21 +46,22 @@ void DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::MyInit() // Display current setup for tracks and vias BOARD* board = m_Parent->GetBoard(); - NETCLASSES& netclasses = board->m_NetClasses; - NETINFO_ITEM* net = board->FindNet( m_Netcode ); + BOARD_DESIGN_SETTINGS& dsnSettings = board->GetDesignSettings(); + NETCLASSES& netclasses = dsnSettings.m_NetClasses; NETCLASS* netclass = netclasses.GetDefault(); + NETINFO_ITEM* net = board->FindNet( m_Netcode ); if( net ) { m_CurrentNetName->SetLabel( net->GetNetname() ); - m_CurrentNetclassName->SetLabel( board->GetCurrentNetClassName() ); - netclass = netclasses.Find( board->GetCurrentNetClassName() ); + m_CurrentNetclassName->SetLabel( dsnSettings.GetCurrentNetClassName() ); + netclass = netclasses.Find( dsnSettings.GetCurrentNetClassName() ); } /* Disable the option "copy current to net" if we have only default netclass values * i.e. when m_TrackWidthSelector and m_ViaSizeSelector are set to 0 */ - if( !board->GetDesignSettings().GetTrackWidthIndex() && !board->GetDesignSettings().GetViaSizeIndex() ) + if( !dsnSettings.GetTrackWidthIndex() && !dsnSettings.GetViaSizeIndex() ) { m_Net2CurrValueButton->Enable( false ); m_OptionID = ID_NETCLASS_VALUES_TO_CURRENT_NET; @@ -77,9 +78,9 @@ void DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::MyInit() msg = StringFromValue( g_UserUnit, value, true ); m_gridDisplayCurrentSettings->SetCellValue( 0, 0, msg ); - if( board->GetDesignSettings().GetTrackWidthIndex() ) + if( dsnSettings.GetTrackWidthIndex() ) { - value = board->GetDesignSettings().GetCurrentTrackWidth(); + value = dsnSettings.GetCurrentTrackWidth(); msg = StringFromValue( g_UserUnit, value, true ); } else @@ -91,9 +92,9 @@ void DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::MyInit() msg = StringFromValue( g_UserUnit, value, true ); m_gridDisplayCurrentSettings->SetCellValue( 0, 1, msg ); - if( board->GetDesignSettings().GetViaSizeIndex() ) + if( dsnSettings.GetViaSizeIndex() ) { - value = board->GetDesignSettings().GetCurrentViaSize(); + value = dsnSettings.GetCurrentViaSize(); msg = StringFromValue( g_UserUnit, value, true ); } else @@ -103,7 +104,7 @@ void DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::MyInit() value = netclass->GetViaDrill(); // Display via drill msg = StringFromValue( g_UserUnit, value, true ); m_gridDisplayCurrentSettings->SetCellValue( 0, 2, msg ); - value = board->GetDesignSettings().GetCurrentViaDrill(); + value = dsnSettings.GetCurrentViaDrill(); if( value >= 0 ) msg = StringFromValue( g_UserUnit, value, true ); else diff --git a/pcbnew/dialogs/dialog_plot.cpp b/pcbnew/dialogs/dialog_plot.cpp index 3b2550e931..0c59845187 100644 --- a/pcbnew/dialogs/dialog_plot.cpp +++ b/pcbnew/dialogs/dialog_plot.cpp @@ -70,8 +70,8 @@ void DIALOG_PLOT::Init_Dialog() // The reasonable width correction value must be in a range of // [-(MinTrackWidth-1), +(MinClearanceValue-1)] decimils. - m_widthAdjustMinValue = -(m_board->GetDesignSettings().m_TrackMinWidth - 1); - m_widthAdjustMaxValue = m_board->GetSmallestClearanceValue() - 1; + m_widthAdjustMinValue = -( m_board->GetDesignSettings().m_TrackMinWidth - 1 ); + m_widthAdjustMaxValue = m_board->GetDesignSettings().GetSmallestClearanceValue() - 1; switch( m_plotOpts.GetFormat() ) { diff --git a/pcbnew/drc.cpp b/pcbnew/drc.cpp index b32ddb65b4..67c451c721 100644 --- a/pcbnew/drc.cpp +++ b/pcbnew/drc.cpp @@ -403,7 +403,7 @@ bool DRC::testNetClasses() { bool ret = true; - NETCLASSES& netclasses = m_pcb->m_NetClasses; + NETCLASSES& netclasses = m_pcb->GetDesignSettings().m_NetClasses; wxString msg; // construct this only once here, not in a loop, since somewhat expensive. diff --git a/pcbnew/drc_clearance_test_functions.cpp b/pcbnew/drc_clearance_test_functions.cpp index 04394d2d08..ed48f149ab 100644 --- a/pcbnew/drc_clearance_test_functions.cpp +++ b/pcbnew/drc_clearance_test_functions.cpp @@ -154,6 +154,7 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads ) wxPoint shape_pos; NETCLASS* netclass = aRefSeg->GetNetClass(); + BOARD_DESIGN_SETTINGS& dsnSettings = m_pcb->GetDesignSettings(); /* In order to make some calculations more easier or faster, * pads and tracks coordinates will be made relative to the reference segment origin @@ -173,7 +174,7 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads ) // test if the via size is smaller than minimum if( refvia->GetViaType() == VIA_MICROVIA ) { - if( refvia->GetWidth() < netclass->GetuViaMinDiameter() ) + if( refvia->GetWidth() < dsnSettings.m_MicroViasMinSize ) { m_currentMarker = fillMarker( refvia, NULL, DRCE_TOO_SMALL_MICROVIA, m_currentMarker ); @@ -182,7 +183,7 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads ) } else { - if( refvia->GetWidth() < netclass->GetViaMinDiameter() ) + if( refvia->GetWidth() < dsnSettings.m_ViasMinSize ) { m_currentMarker = fillMarker( refvia, NULL, DRCE_TOO_SMALL_VIA, m_currentMarker ); @@ -231,7 +232,7 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads ) } else // This is a track segment { - if( aRefSeg->GetWidth() < netclass->GetTrackMinWidth() ) + if( aRefSeg->GetWidth() < dsnSettings.m_TrackMinWidth ) { m_currentMarker = fillMarker( aRefSeg, NULL, DRCE_TOO_SMALL_TRACK_WIDTH, m_currentMarker ); diff --git a/pcbnew/eagle_plugin.cpp b/pcbnew/eagle_plugin.cpp index 4f93574ab2..b1da39fc6f 100644 --- a/pcbnew/eagle_plugin.cpp +++ b/pcbnew/eagle_plugin.cpp @@ -1133,7 +1133,7 @@ BOARD* EAGLE_PLUGIN::Load( const wxString& aFileName, BOARD* aAppendToMe, const loadAllSections( doc ); - BOARD_DESIGN_SETTINGS& designSettings = m_board->GetDesignSettings(); + BOARD_DESIGN_SETTINGS& designSettings = m_board->GetDesignSettings(); if( m_min_trace < designSettings.m_TrackMinWidth ) designSettings.m_TrackMinWidth = m_min_trace; @@ -1146,7 +1146,7 @@ BOARD* EAGLE_PLUGIN::Load( const wxString& aFileName, BOARD* aAppendToMe, const if( m_rules->mdWireWire ) { - NETCLASS* defaultNetclass = m_board->m_NetClasses.GetDefault(); + NETCLASS* defaultNetclass = designSettings.m_NetClasses.GetDefault(); int clearance = KiROUND( m_rules->mdWireWire ); if( clearance < defaultNetclass->GetClearance() ) diff --git a/pcbnew/edit_track_width.cpp b/pcbnew/edit_track_width.cpp index f19c8216e1..b0ec02eb13 100644 --- a/pcbnew/edit_track_width.cpp +++ b/pcbnew/edit_track_width.cpp @@ -67,7 +67,7 @@ bool PCB_EDIT_FRAME::SetTrackSegmentWidth( TRACK* aTrackItem, if( net ) new_width = net->GetMicroViaSize(); else - new_width = GetBoard()->GetCurrentMicroViaSize(); + new_width = GetDesignSettings().GetCurrentMicroViaSize(); } } diff --git a/pcbnew/editrack.cpp b/pcbnew/editrack.cpp index ddd1356705..715ac98f8d 100644 --- a/pcbnew/editrack.cpp +++ b/pcbnew/editrack.cpp @@ -167,7 +167,7 @@ TRACK* PCB_EDIT_FRAME::Begin_Route( TRACK* aTrack, wxDC* aDC ) // Display info about track Net class, and init track and vias sizes: g_CurrentTrackSegment->SetNetCode( GetBoard()->GetHighLightNetCode() ); - GetBoard()->SetCurrentNetClass( g_CurrentTrackSegment->GetNetClassName() ); + GetDesignSettings().SetCurrentNetClass( g_CurrentTrackSegment->GetNetClassName() ); g_CurrentTrackSegment->SetLayer( GetScreen()->m_Active_Layer ); g_CurrentTrackSegment->SetWidth( GetDesignSettings().GetCurrentTrackWidth() ); diff --git a/pcbnew/files.cpp b/pcbnew/files.cpp index 27262d6f38..89671c066b 100644 --- a/pcbnew/files.cpp +++ b/pcbnew/files.cpp @@ -356,7 +356,7 @@ bool PCB_EDIT_FRAME::OpenProjectFiles( const std::vector& aFileSet, in } else { - GetBoard()->m_NetClasses.Clear(); + GetDesignSettings().m_NetClasses.Clear(); } BOARD* loadedBoard = 0; // it will be set to non-NULL if loaded OK @@ -485,7 +485,7 @@ bool PCB_EDIT_FRAME::OpenProjectFiles( const std::vector& aFileSet, in #endif // Update info shown by the horizontal toolbars - GetBoard()->SetCurrentNetClass( NETCLASS::Default ); + GetDesignSettings().SetCurrentNetClass( NETCLASS::Default ); ReFillLayerWidget(); ReCreateLayerBox(); @@ -678,7 +678,7 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool aCreateBackupF // Select default Netclass before writing file. // Useful to save default values in headers - GetBoard()->SetCurrentNetClass( GetBoard()->m_NetClasses.GetDefault()->GetName() ); + GetDesignSettings().SetCurrentNetClass( GetDesignSettings().m_NetClasses.GetDefault()->GetName() ); try { diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index fd2cf976dc..adf5ce76eb 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -60,6 +60,17 @@ */ static const wxString traceFootprintLibrary( wxT( "KicadFootprintLib" ) ); +///> Removes empty nets (i.e. with node count equal zero) from net classes +void filterNetClass( const BOARD& aBoard, NETCLASS& aNetClass ) +{ + for( NETCLASS::const_iterator it = aNetClass.begin(); it != aNetClass.end(); ++it ) + { + NETINFO_ITEM* netinfo = aBoard.FindNet( *it ); + + if( netinfo && netinfo->GetNodesCount() <= 0 ) // hopefully there are no nets with negative + aNetClass.Remove( it ); // node count, but you never know.. + } +} /** * Class FP_CACHE_ITEM @@ -483,6 +494,8 @@ void PCB_IO::formatLayer( const BOARD_ITEM* aItem ) const void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const throw( IO_ERROR ) { + const BOARD_DESIGN_SETTINGS& dsnSettings = aBoard->GetDesignSettings(); + m_out->Print( 0, "\n" ); m_out->Print( aNestLevel, "(general\n" ); @@ -496,7 +509,7 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const FMTIU( aBoard->GetBoundingBox().GetRight() ).c_str(), FMTIU( aBoard->GetBoundingBox().GetBottom() ).c_str() ); m_out->Print( aNestLevel+1, "(thickness %s)\n", - FMTIU( aBoard->GetDesignSettings().GetBoardThickness() ).c_str() ); + FMTIU( dsnSettings.GetBoardThickness() ).c_str() ); m_out->Print( aNestLevel+1, "(drawings %d)\n", aBoard->m_Drawings.GetCount() ); m_out->Print( aNestLevel+1, "(tracks %d)\n", aBoard->GetNumSegmTrack() ); @@ -551,15 +564,15 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const // Save current default track width, for compatibility with older Pcbnew version; m_out->Print( aNestLevel+1, "(last_trace_width %s)\n", - FMTIU( aBoard->GetDesignSettings().GetCurrentTrackWidth() ).c_str() ); + FMTIU( dsnSettings.GetCurrentTrackWidth() ).c_str() ); // Save custom tracks width list (the first is not saved here: this is the netclass value - for( unsigned ii = 1; ii < aBoard->GetDesignSettings().m_TrackWidthList.size(); ii++ ) + for( unsigned ii = 1; ii < dsnSettings.m_TrackWidthList.size(); ii++ ) m_out->Print( aNestLevel+1, "(user_trace_width %s)\n", - FMTIU( aBoard->GetDesignSettings().m_TrackWidthList[ii] ).c_str() ); + FMTIU( dsnSettings.m_TrackWidthList[ii] ).c_str() ); m_out->Print( aNestLevel+1, "(trace_clearance %s)\n", - FMTIU( aBoard->m_NetClasses.GetDefault()->GetClearance() ).c_str() ); + FMTIU( dsnSettings.m_NetClasses.GetDefault()->GetClearance() ).c_str() ); // ZONE_SETTINGS m_out->Print( aNestLevel+1, "(zone_clearance %s)\n", @@ -568,78 +581,79 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const aBoard->GetZoneSettings().m_Zone_45_Only ? "yes" : "no" ); m_out->Print( aNestLevel+1, "(trace_min %s)\n", - FMTIU( aBoard->GetDesignSettings().m_TrackMinWidth ).c_str() ); + FMTIU( dsnSettings.m_TrackMinWidth ).c_str() ); m_out->Print( aNestLevel+1, "(segment_width %s)\n", - FMTIU( aBoard->GetDesignSettings().m_DrawSegmentWidth ).c_str() ); + FMTIU( dsnSettings.m_DrawSegmentWidth ).c_str() ); m_out->Print( aNestLevel+1, "(edge_width %s)\n", - FMTIU( aBoard->GetDesignSettings().m_EdgeSegmentWidth ).c_str() ); + FMTIU( dsnSettings.m_EdgeSegmentWidth ).c_str() ); // Save current default via size, for compatibility with older Pcbnew version; m_out->Print( aNestLevel+1, "(via_size %s)\n", - FMTIU( aBoard->m_NetClasses.GetDefault()->GetViaDiameter() ).c_str() ); + FMTIU( dsnSettings.m_NetClasses.GetDefault()->GetViaDiameter() ).c_str() ); m_out->Print( aNestLevel+1, "(via_drill %s)\n", - FMTIU( aBoard->m_NetClasses.GetDefault()->GetViaDrill() ).c_str() ); + FMTIU( dsnSettings.m_NetClasses.GetDefault()->GetViaDrill() ).c_str() ); m_out->Print( aNestLevel+1, "(via_min_size %s)\n", - FMTIU( aBoard->GetDesignSettings().m_ViasMinSize ).c_str() ); + FMTIU( dsnSettings.m_ViasMinSize ).c_str() ); m_out->Print( aNestLevel+1, "(via_min_drill %s)\n", - FMTIU( aBoard->GetDesignSettings().m_ViasMinDrill ).c_str() ); + FMTIU( dsnSettings.m_ViasMinDrill ).c_str() ); // Save custom vias diameters list (the first is not saved here: this is // the netclass value - for( unsigned ii = 1; ii < aBoard->GetDesignSettings().m_ViasDimensionsList.size(); ii++ ) + for( unsigned ii = 1; ii < dsnSettings.m_ViasDimensionsList.size(); ii++ ) m_out->Print( aNestLevel+1, "(user_via %s %s)\n", - FMTIU( aBoard->GetDesignSettings().m_ViasDimensionsList[ii].m_Diameter ).c_str(), - FMTIU( aBoard->GetDesignSettings().m_ViasDimensionsList[ii].m_Drill ).c_str() ); + FMTIU( dsnSettings.m_ViasDimensionsList[ii].m_Diameter ).c_str(), + FMTIU( dsnSettings.m_ViasDimensionsList[ii].m_Drill ).c_str() ); // for old versions compatibility: - if( aBoard->GetDesignSettings().m_BlindBuriedViaAllowed ) + if( dsnSettings.m_BlindBuriedViaAllowed ) m_out->Print( aNestLevel+1, "(blind_buried_vias_allowed yes)\n" ); + m_out->Print( aNestLevel+1, "(uvia_size %s)\n", - FMTIU( aBoard->m_NetClasses.GetDefault()->GetuViaDiameter() ).c_str() ); + FMTIU( dsnSettings.m_NetClasses.GetDefault()->GetuViaDiameter() ).c_str() ); m_out->Print( aNestLevel+1, "(uvia_drill %s)\n", - FMTIU( aBoard->m_NetClasses.GetDefault()->GetuViaDrill() ).c_str() ); + FMTIU( dsnSettings.m_NetClasses.GetDefault()->GetuViaDrill() ).c_str() ); m_out->Print( aNestLevel+1, "(uvias_allowed %s)\n", - ( aBoard->GetDesignSettings().m_MicroViasAllowed ) ? "yes" : "no" ); + ( dsnSettings.m_MicroViasAllowed ) ? "yes" : "no" ); m_out->Print( aNestLevel+1, "(uvia_min_size %s)\n", - FMTIU( aBoard->GetDesignSettings().m_MicroViasMinSize ).c_str() ); + FMTIU( dsnSettings.m_MicroViasMinSize ).c_str() ); m_out->Print( aNestLevel+1, "(uvia_min_drill %s)\n", - FMTIU( aBoard->GetDesignSettings().m_MicroViasMinDrill ).c_str() ); + FMTIU( dsnSettings.m_MicroViasMinDrill ).c_str() ); m_out->Print( aNestLevel+1, "(pcb_text_width %s)\n", - FMTIU( aBoard->GetDesignSettings().m_PcbTextWidth ).c_str() ); + FMTIU( dsnSettings.m_PcbTextWidth ).c_str() ); m_out->Print( aNestLevel+1, "(pcb_text_size %s %s)\n", - FMTIU( aBoard->GetDesignSettings().m_PcbTextSize.x ).c_str(), - FMTIU( aBoard->GetDesignSettings().m_PcbTextSize.y ).c_str() ); + FMTIU( dsnSettings.m_PcbTextSize.x ).c_str(), + FMTIU( dsnSettings.m_PcbTextSize.y ).c_str() ); m_out->Print( aNestLevel+1, "(mod_edge_width %s)\n", - FMTIU( aBoard->GetDesignSettings().m_ModuleSegmentWidth ).c_str() ); + FMTIU( dsnSettings.m_ModuleSegmentWidth ).c_str() ); m_out->Print( aNestLevel+1, "(mod_text_size %s %s)\n", - FMTIU( aBoard->GetDesignSettings().m_ModuleTextSize.x ).c_str(), - FMTIU( aBoard->GetDesignSettings().m_ModuleTextSize.y ).c_str() ); + FMTIU( dsnSettings.m_ModuleTextSize.x ).c_str(), + FMTIU( dsnSettings.m_ModuleTextSize.y ).c_str() ); m_out->Print( aNestLevel+1, "(mod_text_width %s)\n", - FMTIU( aBoard->GetDesignSettings().m_ModuleTextWidth ).c_str() ); + FMTIU( dsnSettings.m_ModuleTextWidth ).c_str() ); m_out->Print( aNestLevel+1, "(pad_size %s %s)\n", - FMTIU( aBoard->GetDesignSettings().m_Pad_Master.GetSize().x ).c_str(), - FMTIU( aBoard->GetDesignSettings().m_Pad_Master.GetSize().y ).c_str() ); + FMTIU( dsnSettings.m_Pad_Master.GetSize().x ).c_str(), + FMTIU( dsnSettings.m_Pad_Master.GetSize().y ).c_str() ); m_out->Print( aNestLevel+1, "(pad_drill %s)\n", - FMTIU( aBoard->GetDesignSettings().m_Pad_Master.GetDrillSize().x ).c_str() ); + FMTIU( dsnSettings.m_Pad_Master.GetDrillSize().x ).c_str() ); m_out->Print( aNestLevel+1, "(pad_to_mask_clearance %s)\n", - FMTIU( aBoard->GetDesignSettings().m_SolderMaskMargin ).c_str() ); + FMTIU( dsnSettings.m_SolderMaskMargin ).c_str() ); - if( aBoard->GetDesignSettings().m_SolderMaskMinWidth ) + if( dsnSettings.m_SolderMaskMinWidth ) m_out->Print( aNestLevel+1, "(solder_mask_min_width %s)\n", - FMTIU( aBoard->GetDesignSettings().m_SolderMaskMinWidth ).c_str() ); + FMTIU( dsnSettings.m_SolderMaskMinWidth ).c_str() ); - if( aBoard->GetDesignSettings().m_SolderPasteMargin != 0 ) + if( dsnSettings.m_SolderPasteMargin != 0 ) m_out->Print( aNestLevel+1, "(pad_to_paste_clearance %s)\n", - FMTIU( aBoard->GetDesignSettings().m_SolderPasteMargin ).c_str() ); + FMTIU( dsnSettings.m_SolderPasteMargin ).c_str() ); - if( aBoard->GetDesignSettings().m_SolderPasteMarginRatio != 0 ) + if( dsnSettings.m_SolderPasteMarginRatio != 0 ) m_out->Print( aNestLevel+1, "(pad_to_paste_clearance_ratio %s)\n", - Double2Str( aBoard->GetDesignSettings().m_SolderPasteMarginRatio ).c_str() ); + Double2Str( dsnSettings.m_SolderPasteMarginRatio ).c_str() ); m_out->Print( aNestLevel+1, "(aux_axis_origin %s %s)\n", FMTIU( aBoard->GetAuxOrigin().x ).c_str(), @@ -651,7 +665,7 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const FMTIU( aBoard->GetGridOrigin().y ).c_str() ); m_out->Print( aNestLevel+1, "(visible_elements %X)\n", - aBoard->GetDesignSettings().GetVisibleElements() ); + dsnSettings.GetVisibleElements() ); aBoard->GetPlotOptions().Format( m_out, aNestLevel+1 ); @@ -669,15 +683,18 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const m_out->Print( 0, "\n" ); // Save the default net class first. - aBoard->m_NetClasses.GetDefault()->Format( m_out, aNestLevel, m_ctl ); + NETCLASS defaultNC = *dsnSettings.m_NetClasses.GetDefault(); + filterNetClass( *aBoard, defaultNC ); // Remove empty nets (from a copy of a netclass) + defaultNC.Format( m_out, aNestLevel, m_ctl ); // Save the rest of the net classes alphabetically. - for( NETCLASSES::const_iterator it = aBoard->m_NetClasses.begin(); - it != aBoard->m_NetClasses.end(); + for( NETCLASSES::const_iterator it = dsnSettings.m_NetClasses.begin(); + it != dsnSettings.m_NetClasses.end(); ++it ) { - NETCLASS* netclass = it->second; - netclass->Format( m_out, aNestLevel, m_ctl ); + NETCLASS netclass = *it->second; + filterNetClass( *aBoard, netclass ); // Remove empty nets (from a copy of a netclass) + netclass.Format( m_out, aNestLevel, m_ctl ); } // Save the modules. @@ -707,7 +724,7 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const /// will not be saved. // Save the polygon (which are the newer technology) zones. - for( int i=0; i < aBoard->GetAreaCount(); ++i ) + for( int i = 0; i < aBoard->GetAreaCount(); ++i ) Format( aBoard->GetArea( i ), aNestLevel ); } diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index cf0aca69fe..77a4d14a0e 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -632,7 +632,7 @@ void LEGACY_PLUGIN::loadSHEET() void LEGACY_PLUGIN::loadSETUP() { - NETCLASS* netclass_default = m_board->m_NetClasses.GetDefault(); + NETCLASS* netclass_default = m_board->GetDesignSettings().m_NetClasses.GetDefault(); // TODO Orson: is it really necessary to first operate on a copy and then apply it? // would not it be better to use reference here and apply all the changes instantly? BOARD_DESIGN_SETTINGS bds = m_board->GetDesignSettings(); @@ -897,7 +897,7 @@ void LEGACY_PLUGIN::loadSETUP() // at all, the global defaults should go into a preferences // file instead so they are there to start new board // projects. - m_board->m_NetClasses.GetDefault()->SetParams(); + m_board->GetDesignSettings().m_NetClasses.GetDefault()->SetParams( m_board->GetDesignSettings() ); return; // preferred exit } @@ -2113,7 +2113,7 @@ void LEGACY_PLUGIN::loadNETCLASS() // yet since that would bypass duplicate netclass name checking within the BOARD. // store it temporarily in an auto_ptr until successfully inserted into the BOARD // just before returning. - auto_ptr nc( new NETCLASS( m_board, wxEmptyString ) ); + auto_ptr nc( new NETCLASS( wxEmptyString ) ); while( ( line = READLINE( m_reader ) ) != NULL ) { @@ -2175,7 +2175,7 @@ void LEGACY_PLUGIN::loadNETCLASS() else if( TESTLINE( "$EndNCLASS" ) ) { - if( m_board->m_NetClasses.Add( nc.get() ) ) + if( m_board->GetDesignSettings().m_NetClasses.Add( nc.get() ) ) { nc.release(); } @@ -2984,8 +2984,8 @@ void LEGACY_PLUGIN::saveSHEET( const BOARD* aBoard ) const void LEGACY_PLUGIN::saveSETUP( const BOARD* aBoard ) const { - NETCLASS* netclass_default = aBoard->m_NetClasses.GetDefault(); const BOARD_DESIGN_SETTINGS& bds = aBoard->GetDesignSettings(); + NETCLASS* netclass_default = bds.m_NetClasses.GetDefault(); fprintf( m_fp, "$SETUP\n" ); @@ -3098,7 +3098,7 @@ void LEGACY_PLUGIN::saveBOARD_ITEMS( const BOARD* aBoard ) const } // Saved nets do not include netclass names, so save netclasses after nets. - saveNETCLASSES( &aBoard->m_NetClasses ); + saveNETCLASSES( &aBoard->GetDesignSettings().m_NetClasses ); // save the modules for( MODULE* m = aBoard->m_Modules; m; m = (MODULE*) m->Next() ) @@ -3119,7 +3119,7 @@ void LEGACY_PLUGIN::saveBOARD_ITEMS( const BOARD* aBoard ) const savePCB_TARGET( (PCB_TARGET*) gr ); break; case PCB_DIMENSION_T: - saveDIMENTION( (DIMENSION*) gr ); + saveDIMENSION( (DIMENSION*) gr ); break; default: THROW_IO_ERROR( wxString::Format( UNKNOWN_GRAPHIC_FORMAT, gr->Type() ) ); @@ -3763,7 +3763,7 @@ void LEGACY_PLUGIN::saveZONE_CONTAINER( const ZONE_CONTAINER* me ) const } -void LEGACY_PLUGIN::saveDIMENTION( const DIMENSION* me ) const +void LEGACY_PLUGIN::saveDIMENSION( const DIMENSION* me ) const { // note: COTATION was the previous name of DIMENSION // this old keyword is used here for compatibility diff --git a/pcbnew/legacy_plugin.h b/pcbnew/legacy_plugin.h index dec3bfcbac..a9efbaa053 100644 --- a/pcbnew/legacy_plugin.h +++ b/pcbnew/legacy_plugin.h @@ -261,7 +261,7 @@ protected: void savePCB_TEXT( const TEXTE_PCB* aText ) const; void savePCB_TARGET( const PCB_TARGET* aTarget ) const; void savePCB_LINE( const DRAWSEGMENT* aStroke ) const; - void saveDIMENTION( const DIMENSION* aDimension ) const; + void saveDIMENSION( const DIMENSION* aDimension ) const; void saveTRACK( const TRACK* aTrack ) const; /** diff --git a/pcbnew/onleftclick.cpp b/pcbnew/onleftclick.cpp index dc5b0b97ee..922d04e727 100644 --- a/pcbnew/onleftclick.cpp +++ b/pcbnew/onleftclick.cpp @@ -161,7 +161,7 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition ) case PCB_TRACE_T: case PCB_VIA_T: case PCB_PAD_T: - GetBoard()->SetCurrentNetClass( + GetDesignSettings().SetCurrentNetClass( ((BOARD_CONNECTED_ITEM*)DrawStruct)->GetNetClassName() ); updateTraceWidthSelectBox(); updateViaSizeSelectBox(); diff --git a/pcbnew/onrightclick.cpp b/pcbnew/onrightclick.cpp index ec8157d17e..ffb14ac90a 100644 --- a/pcbnew/onrightclick.cpp +++ b/pcbnew/onrightclick.cpp @@ -464,7 +464,7 @@ void PCB_EDIT_FRAME::createPopupMenuForTracks( TRACK* Track, wxMenu* PopMenu ) wxPoint cursorPosition = GetCrossHairPosition(); wxString msg; - GetBoard()->SetCurrentNetClass( Track->GetNetClassName() ); + GetDesignSettings().SetCurrentNetClass( Track->GetNetClassName() ); updateTraceWidthSelectBox(); updateViaSizeSelectBox(); @@ -834,9 +834,9 @@ void PCB_EDIT_FRAME::createPopUpMenuForFpPads( D_PAD* Pad, wxMenu* menu ) if( flags ) // Currently in edit, no others commands possible return; - if( GetBoard()->GetCurrentNetClassName() != Pad->GetNetClassName() ) + if( GetDesignSettings().GetCurrentNetClassName() != Pad->GetNetClassName() ) { - GetBoard()->SetCurrentNetClass( Pad->GetNetClassName() ); + GetDesignSettings().SetCurrentNetClass( Pad->GetNetClassName() ); updateTraceWidthSelectBox(); updateViaSizeSelectBox(); } diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index 59ef3cb88f..77586e843f 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -808,7 +808,7 @@ void PCB_PARSER::parseSetup() throw( IO_ERROR, PARSE_ERROR ) wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as setup." ) ); T token; - NETCLASS* defaultNetclass = m_board->m_NetClasses.GetDefault(); + NETCLASS* defaultNetClass = m_board->GetDesignSettings().m_NetClasses.GetDefault(); // TODO Orson: is it really necessary to first operate on a copy and then apply it? // would not it be better to use reference here and apply all the changes instantly? BOARD_DESIGN_SETTINGS designSettings = m_board->GetDesignSettings(); @@ -834,7 +834,7 @@ void PCB_PARSER::parseSetup() throw( IO_ERROR, PARSE_ERROR ) break; case T_trace_clearance: - defaultNetclass->SetClearance( parseBoardUnits( T_trace_clearance ) ); + defaultNetClass->SetClearance( parseBoardUnits( T_trace_clearance ) ); NeedRIGHT(); break; @@ -864,12 +864,12 @@ void PCB_PARSER::parseSetup() throw( IO_ERROR, PARSE_ERROR ) break; case T_via_size: - defaultNetclass->SetViaDiameter( parseBoardUnits( T_via_size ) ); + defaultNetClass->SetViaDiameter( parseBoardUnits( T_via_size ) ); NeedRIGHT(); break; case T_via_drill: - defaultNetclass->SetViaDrill( parseBoardUnits( T_via_drill ) ); + defaultNetClass->SetViaDrill( parseBoardUnits( T_via_drill ) ); NeedRIGHT(); break; @@ -893,12 +893,12 @@ void PCB_PARSER::parseSetup() throw( IO_ERROR, PARSE_ERROR ) break; case T_uvia_size: - defaultNetclass->SetuViaDiameter( parseBoardUnits( T_uvia_size ) ); + defaultNetClass->SetuViaDiameter( parseBoardUnits( T_uvia_size ) ); NeedRIGHT(); break; case T_uvia_drill: - defaultNetclass->SetuViaDrill( parseBoardUnits( T_uvia_drill ) ); + defaultNetClass->SetuViaDrill( parseBoardUnits( T_uvia_drill ) ); NeedRIGHT(); break; @@ -1048,7 +1048,7 @@ void PCB_PARSER::parseSetup() throw( IO_ERROR, PARSE_ERROR ) // at all, the global defaults should go into a preferences // file instead so they are there to start new board // projects. - m_board->m_NetClasses.GetDefault()->SetParams(); + defaultNetClass->SetParams( m_board->GetDesignSettings() ); } @@ -1082,7 +1082,7 @@ void PCB_PARSER::parseNETCLASS() throw( IO_ERROR, PARSE_ERROR ) T token; - std::auto_ptr nc( new NETCLASS( m_board, wxEmptyString ) ); + std::auto_ptr nc( new NETCLASS( wxEmptyString ) ); // Read netclass name (can be a name or just a number like track width) NeedSYMBOLorNUMBER(); @@ -1135,7 +1135,7 @@ void PCB_PARSER::parseNETCLASS() throw( IO_ERROR, PARSE_ERROR ) NeedRIGHT(); } - if( m_board->m_NetClasses.Add( nc.get() ) ) + if( m_board->GetDesignSettings().m_NetClasses.Add( nc.get() ) ) { nc.release(); } diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index 9a57b50b16..104aeaa05e 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -70,7 +70,7 @@ public: continue; wxString netClassName = ni->GetClassName(); - NETCLASS* nc = aBoard->m_NetClasses.Find( netClassName ); + NETCLASS* nc = aBoard->GetDesignSettings().m_NetClasses.Find( netClassName ); int clearance = nc->GetClearance(); m_clearanceCache[i] = clearance; TRACE( 1, "Add net %d netclass %s clearance %d", i % netClassName.mb_str() % diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index 8fe733fb8c..e270a0a5e8 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -115,11 +115,11 @@ void ROUTER_TOOL::getNetclassDimensions( int aNetCode, int& aWidth, if( ni ) { wxString netClassName = ni->GetClassName(); - netClass = board->m_NetClasses.Find( netClassName ); + netClass = board->GetDesignSettings().m_NetClasses.Find( netClassName ); } if( !netClass ) - netClass = board->m_NetClasses.GetDefault(); + netClass = board->GetDesignSettings().m_NetClasses.GetDefault(); aWidth = netClass->GetTrackWidth(); aViaDiameter = netClass->GetViaDiameter(); diff --git a/pcbnew/specctra_export.cpp b/pcbnew/specctra_export.cpp index ef452ce66d..089925576c 100644 --- a/pcbnew/specctra_export.cpp +++ b/pcbnew/specctra_export.cpp @@ -1476,9 +1476,10 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IO_ERROR ) //------------------------------------------------------------- { char rule[80]; + NETCLASS* defaultClass = aBoard->GetDesignSettings().m_NetClasses.GetDefault(); - int defaultTrackWidth = aBoard->m_NetClasses.GetDefault()->GetTrackWidth(); - int defaultClearance = aBoard->m_NetClasses.GetDefault()->GetClearance(); + int defaultTrackWidth = defaultClass->GetTrackWidth(); + int defaultClearance = defaultClass->GetClearance(); double clearance = scale( defaultClearance ); @@ -1829,7 +1830,7 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IO_ERROR ) //-----< output vias used in netclasses >----------------------------------- { - NETCLASSES& nclasses = aBoard->m_NetClasses; + NETCLASSES& nclasses = aBoard->GetDesignSettings().m_NetClasses; // Assume the netclass vias are all the same kind of thru, blind, or buried vias. // This is in lieu of either having each netclass via have its own layer pair in @@ -2039,7 +2040,7 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IO_ERROR ) //--------------------------------------------------------- - NETCLASSES& nclasses = aBoard->m_NetClasses; + NETCLASSES& nclasses = aBoard->GetDesignSettings().m_NetClasses; exportNETCLASS( nclasses.GetDefault(), aBoard ); diff --git a/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp b/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp index c51da1fc1c..b41d859b65 100644 --- a/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp +++ b/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp @@ -176,7 +176,7 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb ) */ EDA_RECT item_boundingbox; EDA_RECT zone_boundingbox = GetBoundingBox(); - int biggest_clearance = aPcb->GetBiggestClearanceValue(); + int biggest_clearance = aPcb->GetDesignSettings().GetBiggestClearanceValue(); biggest_clearance = std::max( biggest_clearance, zone_clearance ); zone_boundingbox.Inflate( biggest_clearance ); diff --git a/pcbnew/zones_convert_to_polygons_aux_functions.cpp b/pcbnew/zones_convert_to_polygons_aux_functions.cpp index be02fd0d40..9861b0d120 100644 --- a/pcbnew/zones_convert_to_polygons_aux_functions.cpp +++ b/pcbnew/zones_convert_to_polygons_aux_functions.cpp @@ -138,7 +138,7 @@ void BuildUnconnectedThermalStubsPolygonList( CPOLYGONS_LIST& aCornerBuffer, EDA_RECT item_boundingbox; EDA_RECT zone_boundingbox = aZone->GetBoundingBox(); - int biggest_clearance = aPcb->GetBiggestClearanceValue(); + int biggest_clearance = aPcb->GetDesignSettings().GetBiggestClearanceValue(); biggest_clearance = std::max( biggest_clearance, zone_clearance ); zone_boundingbox.Inflate( biggest_clearance ); From 562beafcde6ebc1a34ff241f37dd7ae58ccc80e9 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 13 May 2014 11:22:51 +0200 Subject: [PATCH 400/741] Fixed modification point for EDIT_TOOL when the tool is not active. --- pcbnew/tools/edit_tool.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index b647b2bbf2..c0e30627dc 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -492,6 +492,11 @@ wxPoint EDIT_TOOL::getModificationPoint( const SELECTION_TOOL::SELECTION& aSelec } else { + // If EDIT_TOOL is not currently active then it means that the cursor position is not + // updated, so we have to fetch the latest value + if( m_toolMgr->GetCurrentToolId() != m_toolId ) + m_cursor = getViewControls()->GetCursorPosition(); + return wxPoint( m_cursor.x, m_cursor.y ); } } From a1087801aff82c01dbbb41710b26edfa46fdc318 Mon Sep 17 00:00:00 2001 From: Lorenzo Marcantonio Date: Tue, 13 May 2014 21:24:12 +0200 Subject: [PATCH 401/741] Various fixes to pin drawing code - Better shape to the 60617 pin markers - Made the markers' size proportional to the pin text - Added the missing implementation in the pin plot routines --- eeschema/lib_pin.cpp | 220 ++++++++++++++++++++++++++++++------------- eeschema/lib_pin.h | 6 -- 2 files changed, 153 insertions(+), 73 deletions(-) diff --git a/eeschema/lib_pin.cpp b/eeschema/lib_pin.cpp index f980e02984..d0fa09b677 100644 --- a/eeschema/lib_pin.cpp +++ b/eeschema/lib_pin.cpp @@ -182,6 +182,23 @@ const wxChar* MsgPinElectricType[] = }; +/// Utility for getting the size of the 'internal' pin decorators (as a radius) +// i.e. the clock symbols (falling clock is actually external but is of +// the same kind) + +static int InternalPinDecoSize( const LIB_PIN &aPin ) +{ + return aPin.GetNameTextSize() / 2; +} + +/// Utility for getting the size of the 'external' pin decorators (as a radius) +// i.e. the negation circle, the polarity 'slopes' and the nonlogic +// marker +static int ExternalPinDecoSize( const LIB_PIN &aPin ) +{ + return aPin.GetNumberTextSize() / 2; +} + LIB_PIN::LIB_PIN( LIB_COMPONENT* aParent ) : LIB_ITEM( LIB_PIN_T, aParent ) { @@ -907,32 +924,52 @@ void LIB_PIN::DrawPinSymbol( EDA_DRAW_PANEL* aPanel, if( m_shape & INVERT ) { - GRCircle( clipbox, aDC, MapX1 * INVERT_PIN_RADIUS + x1, - MapY1 * INVERT_PIN_RADIUS + y1, - INVERT_PIN_RADIUS, width, color ); + const int radius = ExternalPinDecoSize( *this ); + GRCircle( clipbox, aDC, MapX1 * radius + x1, + MapY1 * radius + y1, + radius, width, color ); - GRMoveTo( MapX1 * INVERT_PIN_RADIUS * 2 + x1, - MapY1 * INVERT_PIN_RADIUS * 2 + y1 ); + GRMoveTo( MapX1 * radius * 2 + x1, + MapY1 * radius * 2 + y1 ); GRLineTo( clipbox, aDC, posX, posY, width, color ); } else if( m_shape & CLOCK_FALL ) /* an alternative for Inverted Clock */ { - GRMoveTo( x1 + MapY1 * CLOCK_PIN_DIM, - y1 - MapX1 * CLOCK_PIN_DIM ); - GRLineTo( clipbox, - aDC, - x1 + MapX1 * CLOCK_PIN_DIM, - y1 + MapY1 * CLOCK_PIN_DIM, - width, - color ); - GRLineTo( clipbox, - aDC, - x1 - MapY1 * CLOCK_PIN_DIM, - y1 + MapX1 * CLOCK_PIN_DIM, - width, - color ); - GRMoveTo( MapX1 * CLOCK_PIN_DIM + x1, - MapY1 * CLOCK_PIN_DIM + y1 ); + const int clock_size = InternalPinDecoSize( *this ); + if( MapY1 == 0 ) /* MapX1 = +- 1 */ + { + GRMoveTo( x1, y1 + clock_size ); + GRLineTo( clipbox, + aDC, + x1 + MapX1 * clock_size * 2, + y1, + width, + color ); + GRLineTo( clipbox, + aDC, + x1, + y1 - clock_size, + width, + color ); + } + else /* MapX1 = 0 */ + { + GRMoveTo( x1 + clock_size, y1 ); + GRLineTo( clipbox, + aDC, + x1, + y1 + MapY1 * clock_size * 2, + width, + color ); + GRLineTo( clipbox, + aDC, + x1 - clock_size, + y1, + width, + color ); + } + GRMoveTo( MapX1 * clock_size * 2 + x1, + MapY1 * clock_size * 2 + y1 ); GRLineTo( clipbox, aDC, posX, posY, width, color ); } else @@ -943,34 +980,35 @@ void LIB_PIN::DrawPinSymbol( EDA_DRAW_PANEL* aPanel, if( m_shape & CLOCK ) { + const int clock_size = InternalPinDecoSize( *this ); if( MapY1 == 0 ) /* MapX1 = +- 1 */ { - GRMoveTo( x1, y1 + CLOCK_PIN_DIM ); + GRMoveTo( x1, y1 + clock_size ); GRLineTo( clipbox, aDC, - x1 - MapX1 * CLOCK_PIN_DIM, + x1 - MapX1 * clock_size * 2, y1, width, color ); GRLineTo( clipbox, aDC, x1, - y1 - CLOCK_PIN_DIM, + y1 - clock_size, width, color ); } else /* MapX1 = 0 */ { - GRMoveTo( x1 + CLOCK_PIN_DIM, y1 ); + GRMoveTo( x1 + clock_size, y1 ); GRLineTo( clipbox, aDC, x1, - y1 - MapY1 * CLOCK_PIN_DIM, + y1 - MapY1 * clock_size * 2, width, color ); GRLineTo( clipbox, aDC, - x1 - CLOCK_PIN_DIM, + x1 - clock_size, y1, width, color ); @@ -979,22 +1017,23 @@ void LIB_PIN::DrawPinSymbol( EDA_DRAW_PANEL* aPanel, if( m_shape & LOWLEVEL_IN ) /* IEEE symbol "Active Low Input" */ { + const int symbol_size = ExternalPinDecoSize( *this ); if( MapY1 == 0 ) /* MapX1 = +- 1 */ { - GRMoveTo( x1 + MapX1 * IEEE_SYMBOL_PIN_DIM * 2, y1 ); + GRMoveTo( x1 + MapX1 * symbol_size * 2, y1 ); GRLineTo( clipbox, aDC, - x1 + MapX1 * IEEE_SYMBOL_PIN_DIM * 2, - y1 - IEEE_SYMBOL_PIN_DIM, + x1 + MapX1 * symbol_size * 2, + y1 - symbol_size * 2, width, color ); GRLineTo( clipbox, aDC, x1, y1, width, color ); } else /* MapX1 = 0 */ { - GRMoveTo( x1, y1 + MapY1 * IEEE_SYMBOL_PIN_DIM * 2 ); - GRLineTo( clipbox, aDC, x1 - IEEE_SYMBOL_PIN_DIM, - y1 + MapY1 * IEEE_SYMBOL_PIN_DIM * 2, width, color ); + GRMoveTo( x1, y1 + MapY1 * symbol_size * 2 ); + GRLineTo( clipbox, aDC, x1 - symbol_size * 2, + y1 + MapY1 * symbol_size * 2, width, color ); GRLineTo( clipbox, aDC, x1, y1, width, color ); } } @@ -1002,43 +1041,45 @@ void LIB_PIN::DrawPinSymbol( EDA_DRAW_PANEL* aPanel, if( m_shape & LOWLEVEL_OUT ) /* IEEE symbol "Active Low Output" */ { + const int symbol_size = ExternalPinDecoSize( *this ); if( MapY1 == 0 ) /* MapX1 = +- 1 */ { - GRMoveTo( x1, y1 - IEEE_SYMBOL_PIN_DIM ); + GRMoveTo( x1, y1 - symbol_size * 2 ); GRLineTo( clipbox, aDC, - x1 + MapX1 * IEEE_SYMBOL_PIN_DIM * 2, + x1 + MapX1 * symbol_size * 2, y1, width, color ); } else /* MapX1 = 0 */ { - GRMoveTo( x1 - IEEE_SYMBOL_PIN_DIM, y1 ); + GRMoveTo( x1 - symbol_size * 2, y1 ); GRLineTo( clipbox, aDC, x1, - y1 + MapY1 * IEEE_SYMBOL_PIN_DIM * 2, + y1 + MapY1 * symbol_size * 2, width, color ); } } else if( m_shape & NONLOGIC ) /* NonLogic pin symbol */ { - GRMoveTo( x1 - (MapX1 + MapY1) * NONLOGIC_PIN_DIM, - y1 - (MapY1 - MapX1) * NONLOGIC_PIN_DIM ); + const int symbol_size = ExternalPinDecoSize( *this ); + GRMoveTo( x1 - (MapX1 + MapY1) * symbol_size, + y1 - (MapY1 - MapX1) * symbol_size ); GRLineTo( clipbox, aDC, - x1 + (MapX1 + MapY1) * NONLOGIC_PIN_DIM, - y1 + (MapY1 - MapX1) * NONLOGIC_PIN_DIM, + x1 + (MapX1 + MapY1) * symbol_size, + y1 + (MapY1 - MapX1) * symbol_size, width, color ); - GRMoveTo( x1 - (MapX1 - MapY1) * NONLOGIC_PIN_DIM, - y1 - (MapY1 + MapX1) * NONLOGIC_PIN_DIM ); + GRMoveTo( x1 - (MapX1 - MapY1) * symbol_size, + y1 - (MapY1 + MapX1) * symbol_size ); GRLineTo( clipbox, aDC, - x1 + (MapX1 - MapY1) * NONLOGIC_PIN_DIM, - y1 + (MapY1 + MapX1) * NONLOGIC_PIN_DIM, + x1 + (MapX1 - MapY1) * symbol_size, + y1 + (MapY1 + MapX1) * symbol_size, width, color ); } @@ -1310,14 +1351,35 @@ void LIB_PIN::PlotSymbol( PLOTTER* aPlotter, const wxPoint& aPosition, int aOrie if( m_shape & INVERT ) { - aPlotter->Circle( wxPoint( MapX1 * INVERT_PIN_RADIUS + x1, - MapY1 * INVERT_PIN_RADIUS + y1 ), - INVERT_PIN_RADIUS * 2, // diameter + const int radius = ExternalPinDecoSize( *this ); + aPlotter->Circle( wxPoint( MapX1 * radius + x1, + MapY1 * radius + y1 ), + radius * 2, // diameter NO_FILL, // fill option GetPenSize() ); // width - aPlotter->MoveTo( wxPoint( MapX1 * INVERT_PIN_RADIUS * 2 + x1, - MapY1 * INVERT_PIN_RADIUS * 2 + y1 ) ); + aPlotter->MoveTo( wxPoint( MapX1 * radius * 2 + x1, + MapY1 * radius * 2 + y1 ) ); + aPlotter->FinishTo( aPosition ); + } + else if( m_shape & CLOCK_FALL ) + { + const int clock_size = InternalPinDecoSize( *this ); + if( MapY1 == 0 ) /* MapX1 = +- 1 */ + { + aPlotter->MoveTo( wxPoint( x1, y1 + clock_size ) ); + aPlotter->LineTo( wxPoint( x1 + MapX1 * clock_size * 2, y1 ) ); + aPlotter->FinishTo( wxPoint( x1, y1 - clock_size ) ); + } + else /* MapX1 = 0 */ + { + aPlotter->MoveTo( wxPoint( x1 + clock_size, y1 ) ); + aPlotter->LineTo( wxPoint( x1, y1 + MapY1 * clock_size * 2 ) ); + aPlotter->FinishTo( wxPoint( x1 - clock_size, y1 ) ); + } + + aPlotter->MoveTo( wxPoint( MapX1 * clock_size * 2 + x1, + MapY1 * clock_size * 2 + y1 ) ); aPlotter->FinishTo( aPosition ); } else @@ -1328,34 +1390,36 @@ void LIB_PIN::PlotSymbol( PLOTTER* aPlotter, const wxPoint& aPosition, int aOrie if( m_shape & CLOCK ) { + const int clock_size = InternalPinDecoSize( *this ); if( MapY1 == 0 ) /* MapX1 = +- 1 */ { - aPlotter->MoveTo( wxPoint( x1, y1 + CLOCK_PIN_DIM ) ); - aPlotter->LineTo( wxPoint( x1 - MapX1 * CLOCK_PIN_DIM, y1 ) ); - aPlotter->FinishTo( wxPoint( x1, y1 - CLOCK_PIN_DIM ) ); + aPlotter->MoveTo( wxPoint( x1, y1 + clock_size ) ); + aPlotter->LineTo( wxPoint( x1 - MapX1 * clock_size * 2, y1 ) ); + aPlotter->FinishTo( wxPoint( x1, y1 - clock_size ) ); } else /* MapX1 = 0 */ { - aPlotter->MoveTo( wxPoint( x1 + CLOCK_PIN_DIM, y1 ) ); - aPlotter->LineTo( wxPoint( x1, y1 - MapY1 * CLOCK_PIN_DIM ) ); - aPlotter->FinishTo( wxPoint( x1 - CLOCK_PIN_DIM, y1 ) ); + aPlotter->MoveTo( wxPoint( x1 + clock_size, y1 ) ); + aPlotter->LineTo( wxPoint( x1, y1 - MapY1 * clock_size * 2 ) ); + aPlotter->FinishTo( wxPoint( x1 - clock_size, y1 ) ); } } if( m_shape & LOWLEVEL_IN ) /* IEEE symbol "Active Low Input" */ { + const int symbol_size = ExternalPinDecoSize( *this ); if( MapY1 == 0 ) /* MapX1 = +- 1 */ { - aPlotter->MoveTo( wxPoint( x1 + MapX1 * IEEE_SYMBOL_PIN_DIM * 2, y1 ) ); - aPlotter->LineTo( wxPoint( x1 + MapX1 * IEEE_SYMBOL_PIN_DIM * 2, - y1 - IEEE_SYMBOL_PIN_DIM ) ); + aPlotter->MoveTo( wxPoint( x1 + MapX1 * symbol_size * 2, y1 ) ); + aPlotter->LineTo( wxPoint( x1 + MapX1 * symbol_size * 2, + y1 - symbol_size * 2 ) ); aPlotter->FinishTo( wxPoint( x1, y1 ) ); } else /* MapX1 = 0 */ { - aPlotter->MoveTo( wxPoint( x1, y1 + MapY1 * IEEE_SYMBOL_PIN_DIM * 2 ) ); - aPlotter->LineTo( wxPoint( x1 - IEEE_SYMBOL_PIN_DIM, - y1 + MapY1 * IEEE_SYMBOL_PIN_DIM * 2 ) ); + aPlotter->MoveTo( wxPoint( x1, y1 + MapY1 * symbol_size * 2 ) ); + aPlotter->LineTo( wxPoint( x1 - symbol_size * 2, + y1 + MapY1 * symbol_size * 2 ) ); aPlotter->FinishTo( wxPoint( x1, y1 ) ); } } @@ -1363,17 +1427,39 @@ void LIB_PIN::PlotSymbol( PLOTTER* aPlotter, const wxPoint& aPosition, int aOrie if( m_shape & LOWLEVEL_OUT ) /* IEEE symbol "Active Low Output" */ { + const int symbol_size = ExternalPinDecoSize( *this ); if( MapY1 == 0 ) /* MapX1 = +- 1 */ { - aPlotter->MoveTo( wxPoint( x1, y1 - IEEE_SYMBOL_PIN_DIM ) ); - aPlotter->FinishTo( wxPoint( x1 + MapX1 * IEEE_SYMBOL_PIN_DIM * 2, y1 ) ); + aPlotter->MoveTo( wxPoint( x1, y1 - symbol_size * 2 ) ); + aPlotter->FinishTo( wxPoint( x1 + MapX1 * symbol_size * 2, y1 ) ); } else /* MapX1 = 0 */ { - aPlotter->MoveTo( wxPoint( x1 - IEEE_SYMBOL_PIN_DIM, y1 ) ); - aPlotter->FinishTo( wxPoint( x1, y1 + MapY1 * IEEE_SYMBOL_PIN_DIM * 2 ) ); + aPlotter->MoveTo( wxPoint( x1 - symbol_size * 2, y1 ) ); + aPlotter->FinishTo( wxPoint( x1, y1 + MapY1 * symbol_size * 2 ) ); } } + else if( m_shape & NONLOGIC ) /* NonLogic pin symbol */ + { + const int symbol_size = ExternalPinDecoSize( *this ); + aPlotter->MoveTo( wxPoint( x1 - (MapX1 + MapY1) * symbol_size, + y1 - (MapY1 - MapX1) * symbol_size ) ); + aPlotter->FinishTo( wxPoint( x1 + (MapX1 + MapY1) * symbol_size, + y1 + (MapY1 - MapX1) * symbol_size ) ); + aPlotter->MoveTo( wxPoint( x1 - (MapX1 - MapY1) * symbol_size, + y1 - (MapY1 + MapX1) * symbol_size ) ); + aPlotter->FinishTo( wxPoint( x1 + (MapX1 - MapY1) * symbol_size, + y1 + (MapY1 + MapX1) * symbol_size ) ); + } + if( m_type == PIN_NC ) // Draw a N.C. symbol + { + const int ex1 = aPosition.x; + const int ey1 = aPosition.y; + aPlotter->MoveTo( wxPoint( ex1 - NCSYMB_PIN_DIM, ey1 - NCSYMB_PIN_DIM ) ); + aPlotter->FinishTo( wxPoint( ex1 + NCSYMB_PIN_DIM, ey1 + NCSYMB_PIN_DIM ) ); + aPlotter->MoveTo( wxPoint( ex1 + NCSYMB_PIN_DIM, ey1 - NCSYMB_PIN_DIM ) ); + aPlotter->FinishTo( wxPoint( ex1 - NCSYMB_PIN_DIM, ey1 + NCSYMB_PIN_DIM ) ); + } } @@ -1897,7 +1983,7 @@ const EDA_RECT LIB_PIN::GetBoundingBox() const int numberTextHeight = showNum ? KiROUND( m_numTextSize * 1.1 ) : 0; if( m_shape & INVERT ) - minsizeV = std::max( TARGET_PIN_RADIUS, INVERT_PIN_RADIUS ); + minsizeV = std::max( TARGET_PIN_RADIUS, ExternalPinDecoSize( *this ) ); // calculate top left corner position // for the default pin orientation (PIN_RIGHT) diff --git a/eeschema/lib_pin.h b/eeschema/lib_pin.h index a6fb715bfb..8e15a12738 100644 --- a/eeschema/lib_pin.h +++ b/eeschema/lib_pin.h @@ -34,12 +34,6 @@ #define TARGET_PIN_RADIUS 12 // Circle diameter drawn at the active end of pins -// pins: special symbols sizes -#define INVERT_PIN_RADIUS 30 // Radius of inverted pin circle. -#define CLOCK_PIN_DIM 40 // Dim of clock pin symbol. -#define IEEE_SYMBOL_PIN_DIM 40 // Dim of special pin symbol. -#define NONLOGIC_PIN_DIM 30 // Dim of nonlogic pin symbol (X). - /** * The component library pin object electrical types used in ERC tests. */ From 129e26d512588c8322a0010fc294fbcaf67039cc Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 14 May 2014 09:42:16 +0200 Subject: [PATCH 402/741] Disable autopanning when GAL panel does not have focus. --- common/view/wx_view_controls.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/view/wx_view_controls.cpp b/common/view/wx_view_controls.cpp index 9f51a0f624..acd88316fa 100644 --- a/common/view/wx_view_controls.cpp +++ b/common/view/wx_view_controls.cpp @@ -217,6 +217,11 @@ void WX_VIEW_CONTROLS::onTimer( wxTimerEvent& aEvent ) { case AUTO_PANNING: { +#if wxCHECK_VERSION( 3, 0, 0 ) + if( !m_parentPanel->HasFocus() ) + break; +#endif + double borderSize = std::min( m_autoPanMargin * m_view->GetScreenPixelSize().x, m_autoPanMargin * m_view->GetScreenPixelSize().y ); From 27bb059aafd00348f19dee3754c7fea55a5693f4 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 14 May 2014 09:48:29 +0200 Subject: [PATCH 403/741] Via holes were always visible in GAL canvas - fixed. --- pcbnew/basepcbframe.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 00fcf088c0..caa1194fc8 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -835,7 +835,7 @@ void PCB_BASE_FRAME::LoadSettings( wxConfigBase* aCfg ) } // Some more required layers settings - view->SetRequired( ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( VIAS_VISIBLE ) ); + view->SetRequired( ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( VIA_THROUGH_VISIBLE ) ); view->SetRequired( ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ) ); view->SetRequired( NETNAMES_GAL_LAYER( PADS_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ) ); From 2cba91f9749bdefc0b1ca2542a93fb847f05157f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 14 May 2014 09:56:35 +0200 Subject: [PATCH 404/741] Holding shift always activates extend current selection mode (in GAL canvas). --- pcbnew/tools/selection_tool.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index b0a333285c..1917076f59 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -147,8 +147,13 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) // drag with LMB? Select multiple objects (or at least draw a selection box) or drag them else if( evt->IsDrag( BUT_LEFT ) ) { - if( m_selection.Empty() || m_additive ) + if( m_additive ) { + selectMultiple(); + } + else if( m_selection.Empty() ) + { + // There is nothing selected, so try to select something if( !selectSingle( getView()->ToWorld( getViewControls()->GetMousePosition() ), false ) ) { // If nothings has been selected or user wants to select more From d27ea7895d5b4c1e30ba7ae96bf6ff0587a2f26c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 14 May 2014 10:35:12 +0200 Subject: [PATCH 405/741] Moved background color settings from GAL to RENDER_SETTINGS. Added RENDER_SETTINGS::TranslateColor() to convert between EDA_COLOR_T and COLOR4D. --- common/draw_panel_gal.cpp | 5 ++-- common/gal/cairo/cairo_gal.cpp | 8 +++--- common/gal/opengl/opengl_gal.cpp | 4 +-- include/class_draw_panel_gal.h | 2 +- include/gal/cairo/cairo_gal.h | 5 ++-- include/gal/graphics_abstraction_layer.h | 18 ++++--------- include/gal/opengl/opengl_gal.h | 2 +- include/painter.h | 32 ++++++++++++++++++++++++ pcbnew/pcb_painter.cpp | 2 ++ 9 files changed, 52 insertions(+), 26 deletions(-) diff --git a/common/draw_panel_gal.cpp b/common/draw_panel_gal.cpp index 93ad978969..1b293c63ac 100644 --- a/common/draw_panel_gal.cpp +++ b/common/draw_panel_gal.cpp @@ -1,7 +1,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2013 CERN + * Copyright (C) 2013-2014 CERN * @author Tomasz Wlostowski * * This program is free software; you can redistribute it and/or @@ -124,7 +124,7 @@ void EDA_DRAW_PANEL_GAL::onPaint( wxPaintEvent& WXUNUSED( aEvent ) ) m_view->UpdateItems(); m_gal->BeginDrawing(); - m_gal->ClearScreen(); + m_gal->ClearScreen( m_painter->GetSettings()->GetBackgroundColor() ); if( m_view->IsDirty() ) { @@ -228,7 +228,6 @@ void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType ) wxSize size = GetClientSize(); m_gal->ResizeScreen( size.GetX(), size.GetY() ); - m_gal->SetBackgroundColor( KIGFX::COLOR4D( 0.0, 0.0, 0.0, 1.0 ) ); if( m_painter ) m_painter->SetGAL( m_gal ); diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index 13055c7aed..a6f1429721 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -315,10 +315,10 @@ void CAIRO_GAL::Flush() } -void CAIRO_GAL::ClearScreen() +void CAIRO_GAL::ClearScreen( const COLOR4D& aColor ) { - cairo_set_source_rgb( currentContext, - backgroundColor.r, backgroundColor.g, backgroundColor.b ); + backgroundColor = aColor; + cairo_set_source_rgb( currentContext, aColor.r, aColor.g, aColor.b ); cairo_rectangle( currentContext, 0.0, 0.0, screenSize.x, screenSize.y ); cairo_fill( currentContext ); } @@ -973,7 +973,7 @@ void CAIRO_GAL::initSurface() cairo_set_antialias( context, CAIRO_ANTIALIAS_SUBPIXEL ); // Clear the screen - ClearScreen(); + ClearScreen( backgroundColor ); // Compute the world <-> screen transformations ComputeWorldScreenMatrix(); diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 5bd59303a2..568772f96a 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -589,10 +589,10 @@ void OPENGL_GAL::Flush() } -void OPENGL_GAL::ClearScreen() +void OPENGL_GAL::ClearScreen( const COLOR4D& aColor ) { // Clear screen - glClearColor( backgroundColor.r, backgroundColor.g, backgroundColor.b, backgroundColor.a ); + glClearColor( aColor.r, aColor.g, aColor.b, aColor.a ); glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); } diff --git a/include/class_draw_panel_gal.h b/include/class_draw_panel_gal.h index 766cb5d630..16de3a139c 100644 --- a/include/class_draw_panel_gal.h +++ b/include/class_draw_panel_gal.h @@ -1,7 +1,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2013 CERN + * Copyright (C) 2013-2014 CERN * @author Tomasz Wlostowski * * This program is free software; you can redistribute it and/or diff --git a/include/gal/cairo/cairo_gal.h b/include/gal/cairo/cairo_gal.h index 352e262931..6b44b1d476 100644 --- a/include/gal/cairo/cairo_gal.h +++ b/include/gal/cairo/cairo_gal.h @@ -135,7 +135,7 @@ public: virtual void Flush(); /// @copydoc GAL::ClearScreen() - virtual void ClearScreen(); + virtual void ClearScreen( const COLOR4D& aColor ); // ----------------- // Attribute setting @@ -309,7 +309,7 @@ private: /// Type definition for an graphics group element typedef struct { - GRAPHICS_COMMAND command; ///< Command to execute + GRAPHICS_COMMAND command; ///< Command to execute double arguments[MAX_CAIRO_ARGUMENTS]; ///< Arguments for Cairo commands bool boolArgument; ///< A bool argument int intArgument; ///< An int argument @@ -333,6 +333,7 @@ private: unsigned int* bitmapBufferBackup; ///< Backup storage of the cairo image int stride; ///< Stride value for Cairo bool isInitialized; ///< Are Cairo image & surface ready to use + COLOR4D backgroundColor; ///< Background color // Methods void storePath(); ///< Store the actual path diff --git a/include/gal/graphics_abstraction_layer.h b/include/gal/graphics_abstraction_layer.h index 50b5c355c7..6d904d2016 100644 --- a/include/gal/graphics_abstraction_layer.h +++ b/include/gal/graphics_abstraction_layer.h @@ -168,8 +168,11 @@ public: /// @brief Force all remaining objects to be drawn. virtual void Flush() = 0; - /// @brief Clear the screen. - virtual void ClearScreen() = 0; + /** + * @brief Clear the screen. + * @param aColor is the color used for clearing. + */ + virtual void ClearScreen( const COLOR4D& aColor ) = 0; // ----------------- // Attribute setting @@ -225,16 +228,6 @@ public: return strokeColor; } - /** - * @brief Set the background color. - * - * @param aColor is the color for background filling. - */ - inline virtual void SetBackgroundColor( const COLOR4D& aColor ) - { - backgroundColor = aColor; - } - /** * @brief Set the line width. * @@ -849,7 +842,6 @@ protected: bool isFillEnabled; ///< Is filling of graphic objects enabled ? bool isStrokeEnabled; ///< Are the outlines stroked ? - COLOR4D backgroundColor; ///< The background color COLOR4D fillColor; ///< The fill color COLOR4D strokeColor; ///< The color of the outlines diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index d5c97aada9..10c4fea54d 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -143,7 +143,7 @@ public: virtual void Flush(); /// @copydoc GAL::ClearScreen() - virtual void ClearScreen(); + virtual void ClearScreen( const COLOR4D& aColor ); // -------------- // Transformation diff --git a/include/painter.h b/include/painter.h index 34376d985d..afa74aa482 100644 --- a/include/painter.h +++ b/include/painter.h @@ -177,6 +177,36 @@ public: return m_worksheetLineWidth; } + /** + * Function TranslateColor + * Returns the color responding to the one of EDA_COLOR_T enum values. + * @param EDA_COLOR_T color equivalent. + */ + const COLOR4D& TranslateColor( EDA_COLOR_T aColor ) + { + return m_legacyColorMap[aColor]; + } + + /** + * Function GetBackgroundColor + * Returns current background color settings. + * @return Background color. + */ + const COLOR4D& GetBackgroundColor() const + { + return m_backgroundColor; + } + + /** + * Function SetBackgroundColor + * Sets new color for background. + * @param aColor is the new background color. + */ + void SetBackgroundColor( const COLOR4D& aColor ) + { + m_backgroundColor = aColor; + } + protected: /** * Function update @@ -203,6 +233,8 @@ protected: float m_outlineWidth; ///< Line width used when drawing outlines float m_worksheetLineWidth; ///< Line width used when drawing worksheet + COLOR4D m_backgroundColor; ///< The background color + /// Map of colors that were usually used for display std::map m_legacyColorMap; }; diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 0465f450aa..7b72b47497 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -43,6 +43,8 @@ using namespace KIGFX; PCB_RENDER_SETTINGS::PCB_RENDER_SETTINGS() { + m_backgroundColor = COLOR4D( 0.0, 0.0, 0.0, 1.0 ); + // By default everything should be displayed as filled for( unsigned int i = 0; i < END_PCB_VISIBLE_LIST; ++i ) { From cce6e270963f7761a85a10c17fcd150618d76b14 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 14 May 2014 11:45:01 +0200 Subject: [PATCH 406/741] Various fixes to geometry & math library. --- common/geometry/shape_collisions.cpp | 273 ++++++++++++++++++--------- common/geometry/shape_line_chain.cpp | 90 +++++---- include/geometry/seg.h | 14 +- include/geometry/shape_circle.h | 11 ++ include/geometry/shape_line_chain.h | 20 ++ include/geometry/shape_rect.h | 24 ++- include/math/math_util.h | 5 + include/math/vector2d.h | 3 +- 8 files changed, 299 insertions(+), 141 deletions(-) diff --git a/common/geometry/shape_collisions.cpp b/common/geometry/shape_collisions.cpp index 604335b43e..52db4ecb81 100644 --- a/common/geometry/shape_collisions.cpp +++ b/common/geometry/shape_collisions.cpp @@ -23,11 +23,13 @@ */ #include +#include #include #include #include #include +#include typedef VECTOR2I::extended_type ecoord; @@ -45,25 +47,21 @@ static inline bool Collide( const SHAPE_CIRCLE& aA, const SHAPE_CIRCLE& aB, int return false; if( aNeedMTV ) - aMTV = delta.Resize( sqrt( abs( min_dist_sq - dist_sq ) ) + 1 ); + aMTV = delta.Resize( min_dist - sqrt( dist_sq ) + 3 ); // fixme: apparent rounding error return true; } -static inline bool Collide( const SHAPE_RECT& aA, const SHAPE_CIRCLE& aB, int aClearance, - bool aNeedMTV, VECTOR2I& aMTV ) +static inline bool Collide( const SHAPE_RECT& aA, const SHAPE_CIRCLE& aB, int aClearance, + bool aNeedMTV, VECTOR2I& aMTV ) { const VECTOR2I c = aB.GetCenter(); const VECTOR2I p0 = aA.GetPosition(); const VECTOR2I size = aA.GetSize(); - const ecoord r = aB.GetRadius(); - const ecoord min_dist = aClearance + r; - const ecoord min_dist_sq = min_dist * min_dist; - - if( aA.BBox( 0 ).Contains( c ) ) - return true; - + const int r = aB.GetRadius(); + const int min_dist = aClearance + r; + const VECTOR2I vts[] = { VECTOR2I( p0.x, p0.y ), @@ -73,33 +71,35 @@ static inline bool Collide( const SHAPE_RECT& aA, const SHAPE_CIRCLE& aB, int a VECTOR2I( p0.x, p0.y ) }; - ecoord nearest_seg_dist_sq = VECTOR2I::ECOORD_MAX; + int nearest_seg_dist = INT_MAX; VECTOR2I nearest; bool inside = c.x >= p0.x && c.x <= ( p0.x + size.x ) && c.y >= p0.y && c.y <= ( p0.y + size.y ); - if( !inside ) - { - for( int i = 0; i < 4; i++ ) - { - const SEG seg( vts[i], vts[i + 1] ); - ecoord dist_sq = seg.SquaredDistance( c ); - if( dist_sq < min_dist_sq ) - { - if( !aNeedMTV ) - return true; - else - { - nearest = seg.NearestPoint( c ); - nearest_seg_dist_sq = dist_sq; - } - } + if( !aNeedMTV && inside ) + return true; + + for( int i = 0; i < 4; i++ ) + { + const SEG seg( vts[i], vts[i + 1] ); + + VECTOR2I pn = seg.NearestPoint( c ); + + int d = ( pn - c ).EuclideanNorm(); + + if( ( d < min_dist ) && !aNeedMTV ) + return true; + + if( d < nearest_seg_dist ) + { + nearest = pn; + nearest_seg_dist = d; } } - if( nearest_seg_dist_sq >= min_dist_sq && !inside ) + if( nearest_seg_dist >= min_dist && !inside ) return false; VECTOR2I delta = c - nearest; @@ -107,25 +107,77 @@ static inline bool Collide( const SHAPE_RECT& aA, const SHAPE_CIRCLE& aB, int a if( !aNeedMTV ) return true; + if( inside ) - aMTV = -delta.Resize( sqrt( abs( r * r + nearest_seg_dist_sq ) + 1 ) ); + aMTV = -delta.Resize( abs( min_dist + 1 + nearest_seg_dist ) + 1 ); else - aMTV = delta.Resize( sqrt( abs( r * r - nearest_seg_dist_sq ) + 1 ) ); + aMTV = delta.Resize( abs( min_dist + 1 - nearest_seg_dist ) + 1 ); + return true; } +static VECTOR2I pushoutForce( const SHAPE_CIRCLE& aA, const SEG& aB, int aClearance ) +{ + VECTOR2I nearest = aB.NearestPoint( aA.GetCenter() ); + VECTOR2I f (0, 0); + + int dist = ( nearest - aA.GetCenter() ).EuclideanNorm(); + int min_dist = aClearance + aA.GetRadius(); + + if( dist < min_dist ) + f = ( aA.GetCenter() - nearest ).Resize ( min_dist - dist + 10 ); + + return f; +} + + static inline bool Collide( const SHAPE_CIRCLE& aA, const SHAPE_LINE_CHAIN& aB, int aClearance, bool aNeedMTV, VECTOR2I& aMTV ) { + bool found = false; + VECTOR2I::extended_type clSq = (VECTOR2I::extended_type) aClearance * aClearance; + + for( int s = 0; s < aB.SegmentCount(); s++ ) { + if( aA.Collide( aB.CSegment( s ), aClearance ) ) - return true; + { + found = true; + break; + } } - return false; + if( !aNeedMTV || !found ) + return found; + + SHAPE_CIRCLE cmoved( aA ); + VECTOR2I f_total( 0, 0 ); + + for( int s = 0; s < aB.SegmentCount(); s++ ) + { + VECTOR2I f = pushoutForce( cmoved, aB.CSegment( s ), aClearance ); + cmoved.SetCenter( cmoved.GetCenter() + f ); + f_total += f; + } + + aMTV = f_total; + return found; +} + + +static inline bool Collide( const SHAPE_CIRCLE& aA, const SHAPE_SEGMENT& aSeg, int aClearance, + bool aNeedMTV, VECTOR2I& aMTV ) +{ + bool col = aA.Collide( aSeg.GetSeg(), aClearance + aSeg.GetWidth() / 2); + + if( col && aNeedMTV ) + { + aMTV = pushoutForce( aA, aSeg.GetSeg(), aClearance + aSeg.GetWidth() / 2); + } + return col; } @@ -155,74 +207,123 @@ static inline bool Collide( const SHAPE_RECT& aA, const SHAPE_LINE_CHAIN& aB, in } -bool CollideShapes( const SHAPE* aA, const SHAPE* aB, int aClearance, - bool aNeedMTV, VECTOR2I& aMTV ) +static inline bool Collide( const SHAPE_RECT& aA, const SHAPE_SEGMENT& aSeg, int aClearance, + bool aNeedMTV, VECTOR2I& aMTV ) { - switch( aA->Type() ) - { - case SH_RECT: - switch( aB->Type() ) - { - case SH_CIRCLE: - return Collide( *static_cast( aA ), - *static_cast( aB ), aClearance, aNeedMTV, aMTV ); + return aA.Collide( aSeg.GetSeg(), aClearance + aSeg.GetWidth() / 2 ); +} - case SH_LINE_CHAIN: - return Collide( *static_cast( aA ), - *static_cast( aB ), aClearance, aNeedMTV, aMTV ); - default: - break; - } - break; +static inline bool Collide( const SHAPE_SEGMENT& aA, const SHAPE_SEGMENT& aB, int aClearance, + bool aNeedMTV, VECTOR2I& aMTV ) +{ + return aA.Collide( aB.GetSeg(), aClearance + aB.GetWidth() / 2 ); +} - case SH_CIRCLE: - switch( aB->Type() ) - { - case SH_RECT: - return Collide( *static_cast( aB ), - *static_cast( aA ), aClearance, aNeedMTV, aMTV ); - case SH_CIRCLE: - return Collide( *static_cast( aA ), - *static_cast( aB ), aClearance, aNeedMTV, aMTV ); +static inline bool Collide( const SHAPE_LINE_CHAIN& aA, const SHAPE_SEGMENT& aB, int aClearance, + bool aNeedMTV, VECTOR2I& aMTV ) +{ + if( aA.Collide( aB.GetSeg(), aClearance + aB.GetWidth() / 2 ) ) + return true; - case SH_LINE_CHAIN: - return Collide( *static_cast( aA ), - *static_cast( aB ), aClearance, aNeedMTV, aMTV ); + return false; +} - default: - break; - } - break; - case SH_LINE_CHAIN: - switch( aB->Type() ) - { - case SH_RECT: - return Collide( *static_cast( aB ), - *static_cast( aA ), aClearance, aNeedMTV, aMTV ); +template bool +CollCase( const SHAPE* aA, const SHAPE* aB, int aClearance, bool aNeedMTV, VECTOR2I& aMTV ) +{ + return Collide (*static_cast( aA ), + *static_cast( aB ), + aClearance, aNeedMTV, aMTV); +} - case SH_CIRCLE: - return Collide( *static_cast( aB ), - *static_cast( aA ), aClearance, aNeedMTV, aMTV ); +bool CollideShapes( const SHAPE* aA, const SHAPE* aB, int aClearance, bool aNeedMTV, VECTOR2I& aMTV ) +{ + switch( aA->Type() ) + { + case SH_RECT: + switch( aB->Type() ) + { + case SH_CIRCLE: + return CollCase( aA, aB, aClearance, aNeedMTV, aMTV ); - case SH_LINE_CHAIN: - return Collide( *static_cast( aA ), - *static_cast( aB ), aClearance, aNeedMTV, aMTV ); + case SH_LINE_CHAIN: + return CollCase( aA, aB, aClearance, aNeedMTV, aMTV ); - default: - break; - } - break; + case SH_SEGMENT: + return CollCase( aA, aB, aClearance, aNeedMTV, aMTV ); - default: - break; - } + default: + break; + } - assert( 0 ); // unsupported_collision + case SH_CIRCLE: + switch( aB->Type() ) + { + case SH_RECT: + return CollCase( aB, aA, aClearance, aNeedMTV, aMTV ); - return false; + case SH_CIRCLE: + return CollCase( aA, aB, aClearance, aNeedMTV, aMTV ); + + case SH_LINE_CHAIN: + return CollCase( aA, aB, aClearance, aNeedMTV, aMTV ); + + case SH_SEGMENT: + return CollCase( aA, aB, aClearance, aNeedMTV, aMTV ); + default: + break; + } + + case SH_LINE_CHAIN: + switch( aB->Type() ) + { + case SH_RECT: + return CollCase( aB, aA, aClearance, aNeedMTV, aMTV ); + + case SH_CIRCLE: + return CollCase( aB, aA, aClearance, aNeedMTV, aMTV ); + + case SH_LINE_CHAIN: + return CollCase( aA, aB, aClearance, aNeedMTV, aMTV ); + + case SH_SEGMENT: + return CollCase( aA, aB, aClearance, aNeedMTV, aMTV ); + + default: + break; + } + + case SH_SEGMENT: + switch( aB->Type() ) + { + case SH_RECT: + return CollCase( aB, aA, aClearance, aNeedMTV, aMTV ); + + case SH_CIRCLE: + return CollCase( aB, aA, aClearance, aNeedMTV, aMTV ); + + case SH_LINE_CHAIN: + return CollCase( aB, aA, aClearance, aNeedMTV, aMTV ); + + case SH_SEGMENT: + return CollCase( aA, aB, aClearance, aNeedMTV, aMTV ); + + default: + break; + } + + default: + break; + } + + bool unsupported_collision = true; + + assert( unsupported_collision == false ); + + return false; } diff --git a/common/geometry/shape_line_chain.cpp b/common/geometry/shape_line_chain.cpp index 7ac8c10eae..e442fcd503 100644 --- a/common/geometry/shape_line_chain.cpp +++ b/common/geometry/shape_line_chain.cpp @@ -135,6 +135,9 @@ int SHAPE_LINE_CHAIN::Distance( const VECTOR2I& aP ) const { int d = INT_MAX; + if( IsClosed() && PointInside( aP ) ) + return 0; + for( int s = 0; s < SegmentCount(); s++ ) d = std::min( d, CSegment( s ).Distance( aP ) ); @@ -179,7 +182,7 @@ int SHAPE_LINE_CHAIN::Split( const VECTOR2I& aP ) int SHAPE_LINE_CHAIN::Find( const VECTOR2I& aP ) const { - for( int s = 0; s< PointCount(); s++ ) + for( int s = 0; s < PointCount(); s++ ) if( CPoint( s ) == aP ) return s; @@ -187,6 +190,16 @@ int SHAPE_LINE_CHAIN::Find( const VECTOR2I& aP ) const } +int SHAPE_LINE_CHAIN::FindSegment( const VECTOR2I& aP ) const +{ + for( int s = 0; s < SegmentCount(); s++ ) + if( CSegment( s ).Distance( aP ) <= 1 ) + return s; + + return -1; +} + + const SHAPE_LINE_CHAIN SHAPE_LINE_CHAIN::Slice( int aStartIndex, int aEndIndex ) const { SHAPE_LINE_CHAIN rv; @@ -261,6 +274,9 @@ int SHAPE_LINE_CHAIN::Intersect( const SHAPE_LINE_CHAIN& aChain, INTERSECTIONS& if( a.Collinear( b ) ) { + is.our = a; + is.their = b; + if( a.Contains( b.A ) ) { is.p = b.A; aIp.push_back( is ); } if( a.Contains( b.B ) ) { is.p = b.B; aIp.push_back( is ); } if( b.Contains( a.A ) ) { is.p = a.A; aIp.push_back( is ); } @@ -282,44 +298,6 @@ int SHAPE_LINE_CHAIN::Intersect( const SHAPE_LINE_CHAIN& aChain, INTERSECTIONS& } return aIp.size(); - - for( int s1 = 0; s1 < SegmentCount(); s1++ ) - { - for( int s2 = 0; s2 < aChain.SegmentCount(); s2++ ) - { - const SEG& a = CSegment( s1 ); - const SEG& b = aChain.CSegment( s2 ); - OPT_VECTOR2I p = a.Intersect( b ); - INTERSECTION is; - - if( p ) - { - is.p = *p; - is.our = a; - is.their = b; - aIp.push_back( is ); - } - else if( a.Collinear( b ) ) - { - if( a.A != b.A && a.A != b.B && b.Contains( a.A ) ) - { - is.p = a.A; - is.our = a; - is.their = b; - aIp.push_back( is ); - } - else if( a.B != b.A && a.B != b.B && b.Contains( a.B ) ) - { - is.p = a.B; - is.our = a; - is.their = b; - aIp.push_back( is ); - } - } - } - } - - return aIp.size(); } @@ -372,10 +350,13 @@ bool SHAPE_LINE_CHAIN::PointInside( const VECTOR2I& aP ) const bool SHAPE_LINE_CHAIN::PointOnEdge( const VECTOR2I& aP ) const { - if( SegmentCount() < 1 ) + if( !PointCount() ) + return false; + + else if( PointCount() == 1 ) return m_points[0] == aP; - for( int i = 1; i < SegmentCount(); i++ ) + for( int i = 0; i < SegmentCount(); i++ ) { const SEG s = CSegment( i ); @@ -534,3 +515,30 @@ const std::string SHAPE_LINE_CHAIN::Format() const return ss.str(); } + + +bool SHAPE_LINE_CHAIN::CompareGeometry ( const SHAPE_LINE_CHAIN & aOther ) const +{ + SHAPE_LINE_CHAIN a(*this), b(aOther); + a.Simplify(); + b.Simplify(); + + if(a.m_points.size() != b.m_points.size()) + return false; + + for(int i = 0; i < a.PointCount(); i++) + if(a.CPoint(i) != b.CPoint(i)) + return false; + return true; +} + +bool SHAPE_LINE_CHAIN::Intersects( const SHAPE_LINE_CHAIN& aChain ) const +{ + INTERSECTIONS dummy; + return Intersect(aChain, dummy) != 0; +} + +SHAPE* SHAPE_LINE_CHAIN::Clone() const +{ + return new SHAPE_LINE_CHAIN( *this ); +} diff --git a/include/geometry/seg.h b/include/geometry/seg.h index cf5b8d50c9..7e789f9d21 100644 --- a/include/geometry/seg.h +++ b/include/geometry/seg.h @@ -244,14 +244,14 @@ public: */ bool Collinear( const SEG& aSeg ) const { - ecoord qa = A.y - B.y; - ecoord qb = B.x - A.x; - ecoord qc = -qa * A.x - qb * A.y; + ecoord qa1 = A.y - B.y; + ecoord qb1 = B.x - A.x; + ecoord qc1 = -qa1 * A.x - qb1 * A.y; + ecoord qa2 = aSeg.A.y - aSeg.B.y; + ecoord qb2 = aSeg.B.x - aSeg.A.x; + ecoord qc2 = -qa2 * aSeg.A.x - qb2 * aSeg.A.y; - ecoord d1 = std::abs( aSeg.A.x * qa + aSeg.A.y * qb + qc ); - ecoord d2 = std::abs( aSeg.B.x * qa + aSeg.B.y * qb + qc ); - - return ( d1 <= 1 && d2 <= 1 ); + return ( qa1 == qa2 ) && ( qb1 == qb2 ) && ( qc1 == qc2 ); } /** diff --git a/include/geometry/shape_circle.h b/include/geometry/shape_circle.h index a11cd4da8f..e4b668b68c 100644 --- a/include/geometry/shape_circle.h +++ b/include/geometry/shape_circle.h @@ -38,9 +38,20 @@ public: SHAPE( SH_CIRCLE ), m_radius( aRadius ), m_center( aCenter ) {} + SHAPE_CIRCLE ( const SHAPE_CIRCLE& aOther ) : + SHAPE( SH_CIRCLE ), + m_radius( aOther.m_radius ), + m_center( aOther.m_center ) + {}; + ~SHAPE_CIRCLE() {} + SHAPE* Clone() const + { + return new SHAPE_CIRCLE( *this ); + } + const BOX2I BBox( int aClearance = 0 ) const { const VECTOR2I rc( m_radius + aClearance, m_radius + aClearance ); diff --git a/include/geometry/shape_line_chain.h b/include/geometry/shape_line_chain.h index da6494e91a..b91e6a566c 100644 --- a/include/geometry/shape_line_chain.h +++ b/include/geometry/shape_line_chain.h @@ -116,6 +116,8 @@ public: ~SHAPE_LINE_CHAIN() {} + SHAPE *Clone() const; + /** * Function Clear() * Removes all points from the line chain. @@ -366,6 +368,11 @@ public: } } + void Insert( int aVertex, const VECTOR2I& aP ) + { + m_points.insert( m_points.begin() + aVertex, aP ); + } + /** * Function Replace() * @@ -417,6 +424,15 @@ public: */ int Find( const VECTOR2I& aP ) const; + /** + * Function FindSegment() + * + * Searches for segment containing point aP. + * @param aP the point to be looked for + * @return index of the correspoinding segment in the line chain or negative when not found. + */ + int FindSegment( const VECTOR2I& aP ) const; + /** * Function Slice() * @@ -441,6 +457,8 @@ public: VECTOR2I m_origin; }; + bool Intersects( const SHAPE_LINE_CHAIN& aChain ) const; + /** * Function Intersect() * @@ -533,6 +551,8 @@ public: return false; } + bool CompareGeometry( const SHAPE_LINE_CHAIN & aOther ) const; + private: /// array of vertices std::vector m_points; diff --git a/include/geometry/shape_rect.h b/include/geometry/shape_rect.h index d2c5f22a33..bc3ba44d17 100644 --- a/include/geometry/shape_rect.h +++ b/include/geometry/shape_rect.h @@ -53,10 +53,22 @@ public: * Constructor * Creates a rectangle defined by top-left corner aP0, width aW and height aH. */ - SHAPE_RECT( const VECTOR2I& aP0, int aW, int aH ) : + SHAPE_RECT( const VECTOR2I& aP0, int aW, int aH ) : SHAPE( SH_RECT ), m_p0( aP0 ), m_w( aW ), m_h( aH ) {} + SHAPE_RECT ( const SHAPE_RECT& aOther ) : + SHAPE( SH_RECT ), + m_p0( aOther.m_p0 ), + m_w( aOther.m_w ), + m_h( aOther.m_h ) + {}; + + SHAPE* Clone() const + { + return new SHAPE_RECT( *this ); + } + /// @copydoc SHAPE::BBox() const BOX2I BBox( int aClearance = 0 ) const { @@ -90,11 +102,11 @@ public: if( BBox( 0 ).Contains( aSeg.A ) || BBox( 0 ).Contains( aSeg.B ) ) return true; - VECTOR2I vts[] = { VECTOR2I( m_p0.x, m_p0.y ), - VECTOR2I( m_p0.x, m_p0.y + m_h ), - VECTOR2I( m_p0.x + m_w, m_p0.y + m_h ), - VECTOR2I( m_p0.x + m_w, m_p0.y ), - VECTOR2I( m_p0.x, m_p0.y ) }; + VECTOR2I vts[] = { VECTOR2I( m_p0.x, m_p0.y ), + VECTOR2I( m_p0.x, m_p0.y + m_h ), + VECTOR2I( m_p0.x + m_w, m_p0.y + m_h ), + VECTOR2I( m_p0.x + m_w, m_p0.y ), + VECTOR2I( m_p0.x, m_p0.y ) }; for( int i = 0; i < 4; i++ ) { diff --git a/include/math/math_util.h b/include/math/math_util.h index 812b52fba8..cb3ce50460 100644 --- a/include/math/math_util.h +++ b/include/math/math_util.h @@ -40,6 +40,11 @@ T rescale( T aNumerator, T aValue, T aDenominator ) return aNumerator * aValue / aDenominator; } +template +int sign( T val ) +{ + return ( T( 0 ) < val) - ( val < T( 0 ) ); +} // explicit specializations for integer types, taking care of overflow. template <> diff --git a/include/math/vector2d.h b/include/math/vector2d.h index feee5ff060..5bb43e5872 100644 --- a/include/math/vector2d.h +++ b/include/math/vector2d.h @@ -28,6 +28,7 @@ #ifndef VECTOR2D_H_ #define VECTOR2D_H_ +#include #include #include #include @@ -376,7 +377,7 @@ VECTOR2 VECTOR2::Resize( T aNewLength ) const return VECTOR2 ( ( x < 0 ? -1 : 1 ) * sqrt( rescale( l_sq_new, (extended_type) x * x, l_sq_current ) ), - ( y < 0 ? -1 : 1 ) * sqrt( rescale( l_sq_new, (extended_type) y * y, l_sq_current ) ) ); + ( y < 0 ? -1 : 1 ) * sqrt( rescale( l_sq_new, (extended_type) y * y, l_sq_current ) ) ) * sign( aNewLength ); } From 0ae6b4412e8ebf3dbfb263a6fa2a57a56bc45477 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 14 May 2014 11:47:17 +0200 Subject: [PATCH 407/741] Added a missing file. --- include/geometry/shape_segment.h | 90 ++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 include/geometry/shape_segment.h diff --git a/include/geometry/shape_segment.h b/include/geometry/shape_segment.h new file mode 100644 index 0000000000..5f18760bd7 --- /dev/null +++ b/include/geometry/shape_segment.h @@ -0,0 +1,90 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * + * 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 __SHAPE_SEGMENT_H +#define __SHAPE_SEGMENT_H + +#include +#include + +class SHAPE_SEGMENT : public SHAPE { + +public: + SHAPE_SEGMENT(): + SHAPE( SH_SEGMENT ), m_width( 0 ) {}; + + SHAPE_SEGMENT( const VECTOR2I& aA, const VECTOR2I& aB, int aWidth = 0 ): + SHAPE( SH_SEGMENT ), m_seg( aA, aB ), m_width( aWidth ) {}; + + SHAPE_SEGMENT( const SEG& aSeg, int aWidth = 0 ): + SHAPE( SH_SEGMENT ), m_seg( aSeg ), m_width( aWidth ) {}; + + ~SHAPE_SEGMENT() {}; + + SHAPE* Clone() const + { + return new SHAPE_SEGMENT( m_seg, m_width ); + } + + const BOX2I BBox( int aClearance = 0 ) const + { + return BOX2I( m_seg.A, m_seg.B - m_seg.A ).Inflate( aClearance + m_width / 2 ); + } + + bool Collide( const SEG& aSeg, int aClearance = 0 ) const + { + return m_seg.Distance( aSeg ) <= m_width / 2 + aClearance; + } + + bool Collide( const VECTOR2I& aP, int aClearance = 0 ) const + { + return m_seg.Distance( aP ) <= m_width / 2 + aClearance; + } + + void SetSeg ( const SEG& aSeg ) + { + m_seg = aSeg; + } + + const SEG& GetSeg () const + { + return m_seg; + } + + void SetWidth ( int aWidth ) + { + m_width = aWidth; + } + + int GetWidth() const + { + return m_width; + } + +private: + SEG m_seg; + int m_width; +}; + +#endif From 922bf1ddeaffc6da1d58f0437e23914c7a693d10 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 14 May 2014 12:08:29 +0200 Subject: [PATCH 408/741] Fixed freezing of GAL canvas if user chooses Cancel in the on close dialog. --- pcbnew/pcbframe.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 212dd6a83c..9695d39bb6 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -591,7 +591,6 @@ void PCB_EDIT_FRAME::OnQuit( wxCommandEvent& event ) void PCB_EDIT_FRAME::OnCloseWindow( wxCloseEvent& Event ) { m_canvas->SetAbortRequest( true ); - GetGalCanvas()->StopDrawing(); if( GetScreen()->IsModify() ) { @@ -615,6 +614,8 @@ void PCB_EDIT_FRAME::OnCloseWindow( wxCloseEvent& Event ) } } + GetGalCanvas()->StopDrawing(); + // Delete the auto save file if it exists. wxFileName fn = GetBoard()->GetFileName(); From 5bf50ee910cdd86104679428ab89dfb6aef44a6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20W=C5=82ostowski?= Date: Wed, 14 May 2014 13:48:29 +0200 Subject: [PATCH 409/741] VIEW: added CalculateExtents() method --- common/view/view.cpp | 35 +++++++++++++++++++++++++++++++++++ include/view/view.h | 4 ++++ 2 files changed, 39 insertions(+) diff --git a/common/view/view.cpp b/common/view/view.cpp index 4bf71ec638..5e213c0c1d 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -1019,3 +1019,38 @@ void VIEW::UpdateItems() m_needsUpdate.clear(); } + +struct VIEW::extentsVisitor { + BOX2I extents; + bool first; + + extentsVisitor() + { + first = true; + } + + bool operator()( VIEW_ITEM* aItem ) + { + if(first) + extents = aItem->ViewBBox(); + else + extents.Merge ( aItem->ViewBBox() ); + return false; + } + }; + +const BOX2I VIEW::CalculateExtents() +{ + + extentsVisitor v; + BOX2I fullScene; + fullScene.SetMaximum(); + + + BOOST_FOREACH( VIEW_LAYER* l, m_orderedLayers ) + { + l->items->Query( fullScene, v ); + } + + return v.extents; +} diff --git a/include/view/view.h b/include/view/view.h index 694042724f..2930af1844 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -507,6 +507,8 @@ public: */ void UpdateItems(); + const BOX2I CalculateExtents() ; + static const int VIEW_MAX_LAYERS = 128; ///< maximum number of layers that may be shown private: @@ -534,6 +536,8 @@ private: struct unlinkItem; struct updateItemsColor; struct changeItemsDepth; + struct extentsVisitor; + ///* Redraws contents within rect aRect void redrawRect( const BOX2I& aRect ); From 5a51d11b781eb34d8a46599a0c5731f44cdea414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20W=C5=82ostowski?= Date: Wed, 14 May 2014 13:52:29 +0200 Subject: [PATCH 410/741] geometry: get rid of useless vertex references in SEG class --- include/geometry/seg.h | 58 ++++++----------------------- include/geometry/shape_line_chain.h | 2 +- 2 files changed, 12 insertions(+), 48 deletions(-) diff --git a/include/geometry/seg.h b/include/geometry/seg.h index 7e789f9d21..af8161bb80 100644 --- a/include/geometry/seg.h +++ b/include/geometry/seg.h @@ -46,17 +46,14 @@ public: * to an object the segment belongs to (e.g. a line chain) or references to locally stored * points (m_a, m_b). */ - VECTOR2I& A; - VECTOR2I& B; + VECTOR2I A; + VECTOR2I B; /** Default constructor * Creates an empty (0, 0) segment, locally-referenced */ - SEG() : A( m_a ), B( m_b ) + SEG() { - A = m_a; - B = m_b; - m_is_local = true; m_index = -1; } @@ -64,13 +61,10 @@ public: * Constructor * Creates a segment between (aX1, aY1) and (aX2, aY2), locally referenced */ - SEG( int aX1, int aY1, int aX2, int aY2 ) : A( m_a ), B( m_b ) + SEG( int aX1, int aY1, int aX2, int aY2 ) : + A ( VECTOR2I( aX1, aY1 ) ), + B ( VECTOR2I( aX2, aY2 ) ) { - m_a = VECTOR2I( aX1, aY1 ); - m_b = VECTOR2I( aX2, aY2 ); - A = m_a; - B = m_b; - m_is_local = true; m_index = -1; } @@ -78,11 +72,8 @@ public: * Constructor * Creates a segment between (aA) and (aB), locally referenced */ - SEG( const VECTOR2I& aA, const VECTOR2I& aB ) : A( m_a ), B( m_b ), m_a( aA ), m_b( aB ) + SEG( const VECTOR2I& aA, const VECTOR2I& aB ) : A( aA ), B( aB ) { - A = m_a; - B = m_b; - m_is_local = true; m_index = -1; } @@ -93,44 +84,24 @@ public: * @param aB reference to the end point in the parent shape * @param aIndex index of the segment within the parent shape */ - SEG ( VECTOR2I& aA, VECTOR2I& aB, int aIndex ) : A( aA ), B( aB ) + SEG ( const VECTOR2I& aA, const VECTOR2I& aB, int aIndex ) : A( aA ), B( aB ) { - m_is_local = false; m_index = aIndex; } /** * Copy constructor */ - SEG ( const SEG& aSeg ) : A( m_a ), B( m_b ) + SEG ( const SEG& aSeg ) : A( aSeg.A ), B( aSeg.B ), m_index ( aSeg.m_index ) { - if( aSeg.m_is_local ) - { - m_a = aSeg.m_a; - m_b = aSeg.m_b; - A = m_a; - B = m_b; - m_is_local = true; - m_index = -1; - } - else - { - A = aSeg.A; - B = aSeg.B; - m_index = aSeg.m_index; - m_is_local = false; - } } SEG& operator=( const SEG& aSeg ) { A = aSeg.A; B = aSeg.B; - m_a = aSeg.m_a; - m_b = aSeg.m_b; m_index = aSeg.m_index; - m_is_local = aSeg.m_is_local; - + return *this; } @@ -289,14 +260,8 @@ public: private: bool ccw( const VECTOR2I& aA, const VECTOR2I& aB, const VECTOR2I &aC ) const; - ///> locally stored start/end coordinates (used when m_is_local == true) - VECTOR2I m_a, m_b; - ///> index withing the parent shape (used when m_is_local == false) int m_index; - - ///> locality flag - bool m_is_local; }; @@ -344,8 +309,7 @@ inline const VECTOR2I SEG::NearestPoint( const VECTOR2I& aP ) const inline std::ostream& operator<<( std::ostream& aStream, const SEG& aSeg ) { - if( aSeg.m_is_local ) - aStream << "[ local " << aSeg.A << " - " << aSeg.B << " ]"; + aStream << "[ " << aSeg.A << " - " << aSeg.B << " ]"; return aStream; } diff --git a/include/geometry/shape_line_chain.h b/include/geometry/shape_line_chain.h index b91e6a566c..0ff020bd32 100644 --- a/include/geometry/shape_line_chain.h +++ b/include/geometry/shape_line_chain.h @@ -445,7 +445,7 @@ public: struct compareOriginDistance { - compareOriginDistance( VECTOR2I& aOrigin ): + compareOriginDistance( const VECTOR2I& aOrigin ): m_origin( aOrigin ) {} From dd5558f65380df571ae7eb3e80f079766368bee0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20W=C5=82ostowski?= Date: Wed, 14 May 2014 13:53:02 +0200 Subject: [PATCH 411/741] geometry: GetShape()->Shape() in indexed shape containers --- include/geometry/shape_index.h | 2 +- include/geometry/shape_index_list.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/geometry/shape_index.h b/include/geometry/shape_index.h index 24b174e1fa..49b0e124f9 100644 --- a/include/geometry/shape_index.h +++ b/include/geometry/shape_index.h @@ -43,7 +43,7 @@ template static const SHAPE* shapeFunctor( T aItem ) { - return aItem->GetShape(); + return aItem->Shape(); } diff --git a/include/geometry/shape_index_list.h b/include/geometry/shape_index_list.h index 0d0e644803..194ae5ffd9 100644 --- a/include/geometry/shape_index_list.h +++ b/include/geometry/shape_index_list.h @@ -30,7 +30,7 @@ template const SHAPE* defaultShapeFunctor( const T aItem ) { - return aItem->GetShape(); + return aItem->Shape(); } template > From e9afb10a9dc0034d4a6c8ae1ebb9e78729a139b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20W=C5=82ostowski?= Date: Wed, 14 May 2014 13:54:59 +0200 Subject: [PATCH 412/741] Switching top layer should update the layer widget --- pcbnew/pcbframe.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 9695d39bb6..b873ef95f7 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -591,6 +591,7 @@ void PCB_EDIT_FRAME::OnQuit( wxCommandEvent& event ) void PCB_EDIT_FRAME::OnCloseWindow( wxCloseEvent& Event ) { m_canvas->SetAbortRequest( true ); + GetGalCanvas()->StopDrawing(); if( GetScreen()->IsModify() ) { @@ -614,8 +615,6 @@ void PCB_EDIT_FRAME::OnCloseWindow( wxCloseEvent& Event ) } } - GetGalCanvas()->StopDrawing(); - // Delete the auto save file if it exists. wxFileName fn = GetBoard()->GetFileName(); @@ -914,6 +913,7 @@ void PCB_EDIT_FRAME::SetActiveLayer( LAYER_NUM aLayer, bool doLayerWidgetUpdate ( (PCB_SCREEN*) GetScreen() )->m_Active_Layer = aLayer; SetHighContrastLayer( aLayer ); + SetTopLayer( aLayer ); if( doLayerWidgetUpdate ) syncLayerWidgetLayer(); From 061660e9e4a8cfb1aa43880c10087716352eaba5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20W=C5=82ostowski?= Date: Wed, 14 May 2014 15:53:54 +0200 Subject: [PATCH 413/741] Long-awaited new version of the P&S router --- pcbnew/dialogs/dialog_pns_settings.cpp | 75 + pcbnew/dialogs/dialog_pns_settings.h | 45 + pcbnew/dialogs/dialog_pns_settings_base.cpp | 127 ++ pcbnew/dialogs/dialog_pns_settings_base.fbp | 1414 +++++++++++++++++ pcbnew/dialogs/dialog_pns_settings_base.h | 67 + pcbnew/dialogs/dialog_track_via_size.cpp | 91 ++ pcbnew/dialogs/dialog_track_via_size.h | 52 + pcbnew/dialogs/dialog_track_via_size_base.cpp | 59 + pcbnew/dialogs/dialog_track_via_size_base.fbp | 539 +++++++ pcbnew/dialogs/dialog_track_via_size_base.h | 54 + pcbnew/router/CMakeLists.txt | 64 +- pcbnew/router/direction.h | 77 +- pcbnew/router/pns_algo_base.cpp | 32 + pcbnew/router/pns_algo_base.h | 60 + pcbnew/router/pns_dragger.cpp | 301 ++++ pcbnew/router/pns_dragger.h | 135 ++ pcbnew/router/pns_index.h | 132 +- pcbnew/router/pns_item.cpp | 11 +- pcbnew/router/pns_item.h | 276 +++- pcbnew/router/pns_itemset.cpp | 26 +- pcbnew/router/pns_itemset.h | 30 +- pcbnew/router/pns_joint.h | 48 +- pcbnew/router/pns_layerset.h | 4 +- pcbnew/router/pns_line.cpp | 1135 +++++++------ pcbnew/router/pns_line.h | 264 +-- pcbnew/router/pns_line_placer.cpp | 720 ++++++--- pcbnew/router/pns_line_placer.h | 297 +++- pcbnew/router/pns_logger.cpp | 173 ++ pcbnew/router/pns_logger.h | 58 + pcbnew/router/pns_node.cpp | 469 ++++-- pcbnew/router/pns_node.h | 309 +++- pcbnew/router/pns_optimizer.cpp | 151 +- pcbnew/router/pns_optimizer.h | 15 +- pcbnew/router/pns_router.cpp | 554 ++++--- pcbnew/router/pns_router.h | 101 +- pcbnew/router/pns_routing_settings.cpp | 49 + pcbnew/router/pns_routing_settings.h | 134 +- pcbnew/router/pns_segment.h | 82 +- pcbnew/router/pns_shove.cpp | 1294 +++++++++++---- pcbnew/router/pns_shove.h | 109 +- pcbnew/router/pns_solid.cpp | 23 +- pcbnew/router/pns_solid.h | 34 +- pcbnew/router/pns_utils.cpp | 54 +- pcbnew/router/pns_utils.h | 14 +- pcbnew/router/pns_via.cpp | 132 +- pcbnew/router/pns_via.h | 46 +- pcbnew/router/pns_walkaround.cpp | 64 +- pcbnew/router/pns_walkaround.h | 37 +- pcbnew/router/range.h | 91 ++ pcbnew/router/router_preview_item.cpp | 235 ++- pcbnew/router/router_preview_item.h | 50 +- pcbnew/router/router_tool.cpp | 568 +++++-- pcbnew/router/router_tool.h | 26 +- pcbnew/router/time_limit.cpp | 46 + pcbnew/router/time_limit.h | 44 + pcbnew/router/trace.h | 16 +- 56 files changed, 8596 insertions(+), 2517 deletions(-) create mode 100644 pcbnew/dialogs/dialog_pns_settings.cpp create mode 100644 pcbnew/dialogs/dialog_pns_settings.h create mode 100644 pcbnew/dialogs/dialog_pns_settings_base.cpp create mode 100644 pcbnew/dialogs/dialog_pns_settings_base.fbp create mode 100644 pcbnew/dialogs/dialog_pns_settings_base.h create mode 100644 pcbnew/dialogs/dialog_track_via_size.cpp create mode 100644 pcbnew/dialogs/dialog_track_via_size.h create mode 100644 pcbnew/dialogs/dialog_track_via_size_base.cpp create mode 100644 pcbnew/dialogs/dialog_track_via_size_base.fbp create mode 100644 pcbnew/dialogs/dialog_track_via_size_base.h create mode 100644 pcbnew/router/pns_algo_base.cpp create mode 100644 pcbnew/router/pns_algo_base.h create mode 100644 pcbnew/router/pns_dragger.cpp create mode 100644 pcbnew/router/pns_dragger.h create mode 100644 pcbnew/router/pns_logger.cpp create mode 100644 pcbnew/router/pns_logger.h create mode 100644 pcbnew/router/pns_routing_settings.cpp create mode 100644 pcbnew/router/range.h create mode 100644 pcbnew/router/time_limit.cpp create mode 100644 pcbnew/router/time_limit.h diff --git a/pcbnew/dialogs/dialog_pns_settings.cpp b/pcbnew/dialogs/dialog_pns_settings.cpp new file mode 100644 index 0000000000..0368294ab1 --- /dev/null +++ b/pcbnew/dialogs/dialog_pns_settings.cpp @@ -0,0 +1,75 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2014 CERN + * Author: Maciej Suminski + * + * 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 3 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, see . + */ + +/** + * Push and Shove router settings dialog. + */ + +#include "dialog_pns_settings.h" +#include + +DIALOG_PNS_SETTINGS::DIALOG_PNS_SETTINGS( wxWindow* aParent, PNS_ROUTING_SETTINGS& aSettings ) : + DIALOG_PNS_SETTINGS_BASE( aParent ), m_settings( aSettings ) +{ + // "Figure out what's best" is not available yet + m_mode->Enable( RM_Smart, false ); + + // Load widgets' values from settings + m_mode->SetSelection( m_settings.Mode() ); + m_shoveVias->SetValue( m_settings.ShoveVias() ); + m_backPressure->SetValue( m_settings.JumpOverObstacles() ); + m_removeLoops->SetValue( m_settings.RemoveLoops() ); + m_suggestEnding->SetValue( m_settings.SuggestFinish() ); + m_autoNeckdown->SetValue( m_settings.SmartPads() ); + m_effort->SetValue( m_settings.OptimizerEffort() ); + m_smoothDragged->SetValue( m_settings.SmoothDraggedSegments() ); + m_violateDrc->SetValue( m_settings.CanViolateDRC() ); +} + + +void DIALOG_PNS_SETTINGS::OnClose( wxCloseEvent& aEvent ) +{ + // Do nothing, it is result of ESC pressing + EndModal( 0 ); +} + + +void DIALOG_PNS_SETTINGS::OnOkClick( wxCommandEvent& aEvent ) +{ + // Save widgets' values to settings + m_settings.SetMode( (PNS_MODE) m_mode->GetSelection() ); + m_settings.SetShoveVias( m_shoveVias->GetValue() ); + m_settings.SetJumpOverObstacles( m_backPressure->GetValue() ); + m_settings.SetRemoveLoops( m_removeLoops->GetValue() ); + m_settings.SetSuggestFinish ( m_suggestEnding->GetValue() ); + m_settings.SetSmartPads( m_autoNeckdown->GetValue() ); + m_settings.SetOptimizerEffort( (PNS_OPTIMIZATION_EFFORT) m_effort->GetValue() ); + m_settings.SetSmoothDraggedSegments( m_smoothDragged->GetValue() ); + m_settings.SetCanViolateDRC( m_violateDrc->GetValue() ); + + EndModal( 1 ); +} + + +void DIALOG_PNS_SETTINGS::OnCancelClick( wxCommandEvent& aEvent ) +{ + // Do nothing + EndModal( 0 ); +} diff --git a/pcbnew/dialogs/dialog_pns_settings.h b/pcbnew/dialogs/dialog_pns_settings.h new file mode 100644 index 0000000000..2241ed60dc --- /dev/null +++ b/pcbnew/dialogs/dialog_pns_settings.h @@ -0,0 +1,45 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2014 CERN + * Author: Maciej Suminski + * + * 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 3 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, see . + */ + +/** + * Push and Shove router settings dialog. + */ + +#ifndef __dialog_pns_settings__ +#define __dialog_pns_settings__ + +#include "dialog_pns_settings_base.h" + +class PNS_ROUTING_SETTINGS; + +class DIALOG_PNS_SETTINGS : public DIALOG_PNS_SETTINGS_BASE +{ + public: + DIALOG_PNS_SETTINGS( wxWindow* aParent, PNS_ROUTING_SETTINGS& aSettings ); + + virtual void OnClose( wxCloseEvent& aEvent ); + virtual void OnOkClick( wxCommandEvent& aEvent ); + virtual void OnCancelClick( wxCommandEvent& aEvent ); + + private: + PNS_ROUTING_SETTINGS& m_settings; +}; + +#endif // __dialog_pns_settings__ diff --git a/pcbnew/dialogs/dialog_pns_settings_base.cpp b/pcbnew/dialogs/dialog_pns_settings_base.cpp new file mode 100644 index 0000000000..b675f8fd9d --- /dev/null +++ b/pcbnew/dialogs/dialog_pns_settings_base.cpp @@ -0,0 +1,127 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Apr 30 2013) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "dialog_pns_settings_base.h" + +/////////////////////////////////////////////////////////////////////////// + +DIALOG_PNS_SETTINGS_BASE::DIALOG_PNS_SETTINGS_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bMainSizer; + bMainSizer = new wxBoxSizer( wxVERTICAL ); + + wxString m_modeChoices[] = { _("Highlight collisions"), _("Shove"), _("Walk around"), _("Figure out what's best") }; + int m_modeNChoices = sizeof( m_modeChoices ) / sizeof( wxString ); + m_mode = new wxRadioBox( this, wxID_ANY, _("Mode"), wxDefaultPosition, wxDefaultSize, m_modeNChoices, m_modeChoices, 1, wxRA_SPECIFY_COLS ); + m_mode->SetSelection( 1 ); + bMainSizer->Add( m_mode, 0, wxALL, 5 ); + + wxStaticBoxSizer* bOptions; + bOptions = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxVERTICAL ); + + m_shoveVias = new wxCheckBox( this, wxID_ANY, _("Shove vias"), wxDefaultPosition, wxDefaultSize, 0 ); + bOptions->Add( m_shoveVias, 0, wxALL, 5 ); + + m_backPressure = new wxCheckBox( this, wxID_ANY, _("Jump over obstacles"), wxDefaultPosition, wxDefaultSize, 0 ); + bOptions->Add( m_backPressure, 0, wxALL, 5 ); + + m_removeLoops = new wxCheckBox( this, wxID_ANY, _("Remove redundant tracks"), wxDefaultPosition, wxDefaultSize, 0 ); + bOptions->Add( m_removeLoops, 0, wxALL, 5 ); + + m_autoNeckdown = new wxCheckBox( this, wxID_ANY, _("Automatic neckdown"), wxDefaultPosition, wxDefaultSize, 0 ); + bOptions->Add( m_autoNeckdown, 0, wxALL, 5 ); + + m_smoothDragged = new wxCheckBox( this, wxID_ANY, _("Smooth dragged segments"), wxDefaultPosition, wxDefaultSize, 0 ); + bOptions->Add( m_smoothDragged, 0, wxALL, 5 ); + + m_violateDrc = new wxCheckBox( this, wxID_ANY, _("Allow DRC violations"), wxDefaultPosition, wxDefaultSize, 0 ); + bOptions->Add( m_violateDrc, 0, wxALL, 5 ); + + m_suggestEnding = new wxCheckBox( this, wxID_ANY, _("Suggest track finish"), wxDefaultPosition, wxDefaultSize, 0 ); + m_suggestEnding->Enable( false ); + + bOptions->Add( m_suggestEnding, 0, wxALL, 5 ); + + wxBoxSizer* bEffort; + bEffort = new wxBoxSizer( wxHORIZONTAL ); + + m_effortLabel = new wxStaticText( this, wxID_ANY, _("Optimizer effort"), wxDefaultPosition, wxDefaultSize, 0 ); + m_effortLabel->Wrap( -1 ); + bEffort->Add( m_effortLabel, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + + bEffort->Add( 0, 0, 0, wxEXPAND, 5 ); + + wxBoxSizer* bSlider; + bSlider = new wxBoxSizer( wxVERTICAL ); + + m_effort = new wxSlider( this, wxID_ANY, 1, 0, 2, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_BOTTOM|wxSL_HORIZONTAL|wxSL_TOP ); + bSlider->Add( m_effort, 1, wxEXPAND, 5 ); + + wxBoxSizer* bSliderLabels; + bSliderLabels = new wxBoxSizer( wxHORIZONTAL ); + + m_lowLabel = new wxStaticText( this, wxID_ANY, _("low"), wxDefaultPosition, wxDefaultSize, 0 ); + m_lowLabel->Wrap( -1 ); + m_lowLabel->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); + + bSliderLabels->Add( m_lowLabel, 0, 0, 5 ); + + + bSliderLabels->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_highLabel = new wxStaticText( this, wxID_ANY, _("high"), wxDefaultPosition, wxDefaultSize, 0 ); + m_highLabel->Wrap( -1 ); + m_highLabel->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); + + bSliderLabels->Add( m_highLabel, 0, 0, 5 ); + + + bSlider->Add( bSliderLabels, 1, wxEXPAND, 5 ); + + + bEffort->Add( bSlider, 1, wxEXPAND, 5 ); + + + bOptions->Add( bEffort, 1, wxALL|wxEXPAND, 5 ); + + wxBoxSizer* bButtons; + bButtons = new wxBoxSizer( wxHORIZONTAL ); + + m_ok = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 ); + m_ok->SetDefault(); + bButtons->Add( m_ok, 1, wxALL, 5 ); + + m_cancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + bButtons->Add( m_cancel, 1, wxALL, 5 ); + + + bOptions->Add( bButtons, 1, wxEXPAND, 5 ); + + + bMainSizer->Add( bOptions, 1, wxEXPAND, 5 ); + + + this->SetSizer( bMainSizer ); + this->Layout(); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PNS_SETTINGS_BASE::OnClose ) ); + m_ok->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PNS_SETTINGS_BASE::OnOkClick ), NULL, this ); + m_cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PNS_SETTINGS_BASE::OnCancelClick ), NULL, this ); +} + +DIALOG_PNS_SETTINGS_BASE::~DIALOG_PNS_SETTINGS_BASE() +{ + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PNS_SETTINGS_BASE::OnClose ) ); + m_ok->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PNS_SETTINGS_BASE::OnOkClick ), NULL, this ); + m_cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PNS_SETTINGS_BASE::OnCancelClick ), NULL, this ); + +} diff --git a/pcbnew/dialogs/dialog_pns_settings_base.fbp b/pcbnew/dialogs/dialog_pns_settings_base.fbp new file mode 100644 index 0000000000..dd008e9e25 --- /dev/null +++ b/pcbnew/dialogs/dialog_pns_settings_base.fbp @@ -0,0 +1,1414 @@ + + + + + + C++ + 1 + source_name + 0 + 0 + res + UTF-8 + connect + dialog_pns_settings_base + 1000 + none + 1 + DIALOG_PNS_SETTINGS_BASE + + . + + 1 + 1 + 1 + 0 + 0 + + 0 + wxAUI_MGR_DEFAULT + + + + 1 + 1 + impl_virtual + + + + 0 + wxID_ANY + + + DIALOG_PNS_SETTINGS_BASE + + 289,504 + wxDEFAULT_DIALOG_STYLE + + Interactive Router settings + + + + + + + + + + + + + + OnClose + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bMainSizer + wxVERTICAL + none + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Highlight collisions" "Shove" "Walk around" "Figure out what's best" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Mode + 1 + + 0 + + + 0 + + 1 + m_mode + 1 + + + protected + 1 + + Resizable + 1 + 1 + + wxRA_SPECIFY_COLS + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + wxID_ANY + Options + + bOptions + wxVERTICAL + none + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Shove vias + + 0 + + + 0 + + 1 + m_shoveVias + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Jump over obstacles + + 0 + + + 0 + + 1 + m_backPressure + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Remove redundant tracks + + 0 + + + 0 + + 1 + m_removeLoops + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Automatic neckdown + + 0 + + + 0 + + 1 + m_autoNeckdown + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Smooth dragged segments + + 0 + + + 0 + + 1 + m_smoothDragged + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Allow DRC violations + + 0 + + + 0 + + 1 + m_violateDrc + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + + 1 + + 0 + 0 + wxID_ANY + Suggest track finish + + 0 + + + 0 + + 1 + m_suggestEnding + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + + bEffort + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER_VERTICAL|wxALL + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Optimizer effort + + 0 + + + 0 + + 1 + m_effortLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + 0 + protected + 0 + + + + 5 + wxEXPAND + 1 + + + bSlider + wxVERTICAL + none + + 5 + wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + 2 + + 1 + + 0 + + 0 + + 1 + m_effort + 1 + + + protected + 1 + + Resizable + 1 + + wxSL_AUTOTICKS|wxSL_BOTTOM|wxSL_HORIZONTAL|wxSL_TOP + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bSliderLabels + wxHORIZONTAL + none + + 5 + + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,90,8,70,0 + 0 + 0 + wxID_ANY + low + + 0 + + + 0 + + 1 + m_lowLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,90,8,70,0 + 0 + 0 + wxID_ANY + high + + 0 + + + 0 + + 1 + m_highLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bButtons + wxHORIZONTAL + none + + 5 + wxALL + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_OK + OK + + 0 + + + 0 + + 1 + m_ok + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnOkClick + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_CANCEL + Cancel + + 0 + + + 0 + + 1 + m_cancel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnCancelClick + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pcbnew/dialogs/dialog_pns_settings_base.h b/pcbnew/dialogs/dialog_pns_settings_base.h new file mode 100644 index 0000000000..ceb135dc58 --- /dev/null +++ b/pcbnew/dialogs/dialog_pns_settings_base.h @@ -0,0 +1,67 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Apr 30 2013) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __DIALOG_PNS_SETTINGS_BASE_H__ +#define __DIALOG_PNS_SETTINGS_BASE_H__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class DIALOG_PNS_SETTINGS_BASE +/////////////////////////////////////////////////////////////////////////////// +class DIALOG_PNS_SETTINGS_BASE : public wxDialog +{ + private: + + protected: + wxRadioBox* m_mode; + wxCheckBox* m_shoveVias; + wxCheckBox* m_backPressure; + wxCheckBox* m_removeLoops; + wxCheckBox* m_autoNeckdown; + wxCheckBox* m_smoothDragged; + wxCheckBox* m_violateDrc; + wxCheckBox* m_suggestEnding; + wxStaticText* m_effortLabel; + wxSlider* m_effort; + wxStaticText* m_lowLabel; + wxStaticText* m_highLabel; + wxButton* m_ok; + wxButton* m_cancel; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } + + + public: + + DIALOG_PNS_SETTINGS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Interactive Router settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 289,504 ), long style = wxDEFAULT_DIALOG_STYLE ); + ~DIALOG_PNS_SETTINGS_BASE(); + +}; + +#endif //__DIALOG_PNS_SETTINGS_BASE_H__ diff --git a/pcbnew/dialogs/dialog_track_via_size.cpp b/pcbnew/dialogs/dialog_track_via_size.cpp new file mode 100644 index 0000000000..8a51cafdb4 --- /dev/null +++ b/pcbnew/dialogs/dialog_track_via_size.cpp @@ -0,0 +1,91 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2014 CERN + * Author: Maciej Suminski + * + * 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 3 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, see . + */ + +/** + * Push and Shove router track width and via size dialog. + */ + +#include "dialog_track_via_size.h" +#include +#include +#include + +DIALOG_TRACK_VIA_SIZE::DIALOG_TRACK_VIA_SIZE( wxWindow* aParent, PNS_ROUTING_SETTINGS& aSettings ) : + DIALOG_TRACK_VIA_SIZE_BASE( aParent ), + m_settings( aSettings ) +{ + // Load router settings to dialog fields + m_trackWidth->SetValue( To_User_Unit( m_trackWidth->GetUnits(), m_settings.GetTrackWidth() ) ); + m_viaDiameter->SetValue( To_User_Unit( m_viaDiameter->GetUnits(), m_settings.GetViaDiameter() ) ); + m_viaDrill->SetValue( To_User_Unit( m_viaDrill->GetUnits(), m_settings.GetViaDrill() ) ); + + m_trackWidth->SetFocus(); + + // Pressing ENTER when any of the text input fields is active applies changes + #if wxCHECK_VERSION( 3, 0, 0 ) + Connect( wxEVT_TEXT_ENTER, wxCommandEventHandler( DIALOG_TRACK_VIA_SIZE::onOkClick ), NULL, this ); + #else + Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_TRACK_VIA_SIZE::onOkClick ), NULL, this ); + #endif +} + + +bool DIALOG_TRACK_VIA_SIZE::check() +{ + // Wrong input + if( !m_trackWidth->GetValue() || !m_viaDiameter->GetValue() || !m_viaDrill->GetValue() ) + return false; + + // Via drill should be smaller than via diameter + if( *m_viaDrill->GetValue() >= m_viaDiameter->GetValue() ) + return false; + + return true; +} + + +void DIALOG_TRACK_VIA_SIZE::onClose( wxCloseEvent& aEvent ) +{ + EndModal( 0 ); +} + + +void DIALOG_TRACK_VIA_SIZE::onOkClick( wxCommandEvent& aEvent ) +{ + if( check() ) + { + // Store dialog values to the router settings + m_settings.SetTrackWidth( From_User_Unit( m_trackWidth->GetUnits(), *m_trackWidth->GetValue() ) ); + m_settings.SetViaDiameter( From_User_Unit( m_viaDiameter->GetUnits(), *m_viaDiameter->GetValue() ) ); + m_settings.SetViaDrill( From_User_Unit( m_viaDrill->GetUnits(), *m_viaDrill->GetValue() ) ); + EndModal( 1 ); + } + else + { + DisplayError( GetParent(), _( "Settings are incorrect" ) ); + m_trackWidth->SetFocus(); + } +} + + +void DIALOG_TRACK_VIA_SIZE::onCancelClick( wxCommandEvent& aEvent ) +{ + EndModal( 0 ); +} diff --git a/pcbnew/dialogs/dialog_track_via_size.h b/pcbnew/dialogs/dialog_track_via_size.h new file mode 100644 index 0000000000..92a03e8ec6 --- /dev/null +++ b/pcbnew/dialogs/dialog_track_via_size.h @@ -0,0 +1,52 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2014 CERN + * Author: Maciej Suminski + * + * 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 3 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, see . + */ + +/** + * Push and Shove router track width and via size dialog. + */ + +#ifndef __dialog_track_via_size__ +#define __dialog_track_via_size__ + +#include "dialog_track_via_size_base.h" + +class PNS_ROUTING_SETTINGS; + +/** Implementing DIALOG_TRACK_VIA_SIZE_BASE */ +class DIALOG_TRACK_VIA_SIZE : public DIALOG_TRACK_VIA_SIZE_BASE +{ + public: + /** Constructor */ + DIALOG_TRACK_VIA_SIZE( wxWindow* aParent, PNS_ROUTING_SETTINGS& aSettings ); + + protected: + // Routings settings that are modified by the dialog. + PNS_ROUTING_SETTINGS& m_settings; + + ///> Checks if values given in the dialog are sensible. + bool check(); + + // Handlers for DIALOG_TRACK_VIA_SIZE_BASE events. + void onClose( wxCloseEvent& aEvent ); + void onOkClick( wxCommandEvent& aEvent ); + void onCancelClick( wxCommandEvent& aEvent ); +}; + +#endif // __dialog_track_via_size__ diff --git a/pcbnew/dialogs/dialog_track_via_size_base.cpp b/pcbnew/dialogs/dialog_track_via_size_base.cpp new file mode 100644 index 0000000000..a402009da1 --- /dev/null +++ b/pcbnew/dialogs/dialog_track_via_size_base.cpp @@ -0,0 +1,59 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Apr 30 2013) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "dialog_track_via_size_base.h" + +/////////////////////////////////////////////////////////////////////////// + +DIALOG_TRACK_VIA_SIZE_BASE::DIALOG_TRACK_VIA_SIZE_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizes; + bSizes = new wxBoxSizer( wxVERTICAL ); + + m_trackWidth = new WX_UNIT_TEXT( this, _("Track width:") ); + bSizes->Add( m_trackWidth, 0, wxALL, 5 ); + + m_viaDiameter = new WX_UNIT_TEXT( this, _("Via diameter:") ); + bSizes->Add( m_viaDiameter, 0, wxALL, 5 ); + + m_viaDrill = new WX_UNIT_TEXT( this, _("Via drill:") ); + bSizes->Add( m_viaDrill, 0, wxALL, 5 ); + + wxBoxSizer* bButtons; + bButtons = new wxBoxSizer( wxHORIZONTAL ); + + m_ok = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 ); + bButtons->Add( m_ok, 1, wxALL, 5 ); + + m_cancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + bButtons->Add( m_cancel, 1, wxALL, 5 ); + + + bSizes->Add( bButtons, 0, wxEXPAND, 5 ); + + + this->SetSizer( bSizes ); + this->Layout(); + + this->Centre( wxBOTH ); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_TRACK_VIA_SIZE_BASE::onClose ) ); + m_ok->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_TRACK_VIA_SIZE_BASE::onOkClick ), NULL, this ); + m_cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_TRACK_VIA_SIZE_BASE::onCancelClick ), NULL, this ); +} + +DIALOG_TRACK_VIA_SIZE_BASE::~DIALOG_TRACK_VIA_SIZE_BASE() +{ + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_TRACK_VIA_SIZE_BASE::onClose ) ); + m_ok->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_TRACK_VIA_SIZE_BASE::onOkClick ), NULL, this ); + m_cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_TRACK_VIA_SIZE_BASE::onCancelClick ), NULL, this ); + +} diff --git a/pcbnew/dialogs/dialog_track_via_size_base.fbp b/pcbnew/dialogs/dialog_track_via_size_base.fbp new file mode 100644 index 0000000000..61462d3330 --- /dev/null +++ b/pcbnew/dialogs/dialog_track_via_size_base.fbp @@ -0,0 +1,539 @@ + + + + + + C++ + 1 + source_name + 0 + 0 + res + UTF-8 + connect + dialog_track_via_size_base + 1000 + none + 1 + DIALOG_TRACK_VIA_SIZE_BASE + + . + + 1 + 1 + 1 + 0 + 0 + + 0 + wxAUI_MGR_DEFAULT + + wxBOTH + + 1 + 1 + impl_virtual + + + + 0 + wxID_ANY + + + DIALOG_TRACK_VIA_SIZE_BASE + + 388,164 + wxDEFAULT_DIALOG_STYLE + + Track width and via size + + + + + + + + + + + + + + onClose + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizes + wxVERTICAL + none + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + WX_UNIT_TEXT + 1 + m_trackWidth = new WX_UNIT_TEXT( this, _("Track width:") ); + + 1 + WX_UNIT_TEXT* m_trackWidth; + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + #include <wxunittext.h> + + 0 + + + 0 + + 1 + m_trackWidth + 1 + + + protected + 1 + + Resizable + + 1 + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + WX_UNIT_TEXT + 1 + m_viaDiameter = new WX_UNIT_TEXT( this, _("Via diameter:") ); + + 1 + WX_UNIT_TEXT* m_viaDiameter; + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + #include <wxunittext.h> + + 0 + + + 0 + + 1 + m_viaDiameter + 1 + + + protected + 1 + + Resizable + + 1 + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + WX_UNIT_TEXT + 1 + m_viaDrill = new WX_UNIT_TEXT( this, _("Via drill:") ); + + 1 + WX_UNIT_TEXT* m_viaDrill; + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + #include <wxunittext.h> + + 0 + + + 0 + + 1 + m_viaDrill + 1 + + + protected + 1 + + Resizable + + 1 + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + + bButtons + wxHORIZONTAL + none + + 5 + wxALL + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_OK + OK + + 0 + + + 0 + + 1 + m_ok + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + onOkClick + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_CANCEL + Cancel + + 0 + + + 0 + + 1 + m_cancel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + onCancelClick + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pcbnew/dialogs/dialog_track_via_size_base.h b/pcbnew/dialogs/dialog_track_via_size_base.h new file mode 100644 index 0000000000..de4f0e43a1 --- /dev/null +++ b/pcbnew/dialogs/dialog_track_via_size_base.h @@ -0,0 +1,54 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Apr 30 2013) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __DIALOG_TRACK_VIA_SIZE_BASE_H__ +#define __DIALOG_TRACK_VIA_SIZE_BASE_H__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class DIALOG_TRACK_VIA_SIZE_BASE +/////////////////////////////////////////////////////////////////////////////// +class DIALOG_TRACK_VIA_SIZE_BASE : public wxDialog +{ + private: + + protected: + WX_UNIT_TEXT* m_trackWidth; + WX_UNIT_TEXT* m_viaDiameter; + WX_UNIT_TEXT* m_viaDrill; + wxButton* m_ok; + wxButton* m_cancel; + + // Virtual event handlers, overide them in your derived class + virtual void onClose( wxCloseEvent& event ) { event.Skip(); } + virtual void onOkClick( wxCommandEvent& event ) { event.Skip(); } + virtual void onCancelClick( wxCommandEvent& event ) { event.Skip(); } + + + public: + + DIALOG_TRACK_VIA_SIZE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Track width and via size"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 388,164 ), long style = wxDEFAULT_DIALOG_STYLE ); + ~DIALOG_TRACK_VIA_SIZE_BASE(); + +}; + +#endif //__DIALOG_TRACK_VIA_SIZE_BASE_H__ diff --git a/pcbnew/router/CMakeLists.txt b/pcbnew/router/CMakeLists.txt index 329714658b..94d89b771c 100644 --- a/pcbnew/router/CMakeLists.txt +++ b/pcbnew/router/CMakeLists.txt @@ -11,40 +11,50 @@ include_directories( set( PCBNEW_PNS_SRCS direction.h - pns_via.h - pns_routing_settings.h - pns_shove.cpp - pns_line.cpp - pns_utils.h - pns_layerset.h + time_limit.h + time_limit.cpp trace.h - pns_line.h - pns_walkaround.cpp - pns_node.h - pns_line_placer.cpp - pns_utils.cpp - pns_solid.h - pns_item.cpp - pns_via.cpp - pns_node.cpp - pns_solid.cpp - pns_line_placer.h - pns_optimizer.h - pns_walkaround.h - pns_shove.h - pns_router.h - pns_router.cpp + + pns_algo_base.h + pns_algo_base.cpp + pns_dragger.cpp + pns_dragger.h pns_index.h pns_item.h - pns_optimizer.cpp - pns_joint.h - pns_segment.h + pns_item.cpp pns_itemset.h pns_itemset.cpp - router_tool.cpp - router_tool.h + pns_joint.h + pns_layerset.h + pns_line.h + pns_line.cpp + pns_line_placer.h + pns_line_placer.cpp + pns_logger.h + pns_logger.cpp + pns_node.h + pns_node.cpp + pns_optimizer.h + pns_optimizer.cpp + pns_router.h + pns_router.cpp + pns_routing_settings.h + pns_routing_settings.cpp + pns_segment.h + pns_shove.h + pns_shove.cpp + pns_solid.h + pns_solid.cpp + pns_utils.h + pns_utils.cpp + pns_via.h + pns_via.cpp + pns_walkaround.h + pns_walkaround.cpp router_preview_item.cpp router_preview_item.h + router_tool.cpp + router_tool.h ) add_library( pnsrouter STATIC ${PCBNEW_PNS_SRCS} ) diff --git a/pcbnew/router/direction.h b/pcbnew/router/direction.h index ad38fcbdef..646c681cd2 100644 --- a/pcbnew/router/direction.h +++ b/pcbnew/router/direction.h @@ -1,7 +1,7 @@ /* * KiRouter - a push-and-(sometimes-)shove PCB router * - * Copyright (C) 2013 CERN + * Copyright (C) 2013-2014 CERN * Author: Tomasz Wlostowski * * This program is free software: you can redistribute it and/or modify it @@ -180,6 +180,11 @@ public: return ( m_dir % 2 ) == 1; } + bool IsDefined() const + { + return m_dir != UNDEFINED; + } + /** * Function BuildInitialTrace() * @@ -244,32 +249,75 @@ public: return aOther.m_dir != m_dir; } + /** + * Function Right() + * + * Returns the direction on the right side of this (i.e. turns right + * by 45 deg) + */ const DIRECTION_45 Right() const { DIRECTION_45 r; - r.m_dir = (Directions) (m_dir + 1); - - if( r.m_dir == NW ) - r.m_dir = N; + if ( m_dir != UNDEFINED ) + r.m_dir = static_cast( ( m_dir + 1 ) % 8 ); return r; } -private: - - template - int sign( T val ) const + /** + * Function Left() + * + * Returns the direction on the left side of this (i.e. turns left + * by 45 deg) + */ + const DIRECTION_45 Left() const { - return (T( 0 ) < val) - ( val < T( 0 ) ); + DIRECTION_45 l; + + if (m_dir == UNDEFINED) + return l; + + if(m_dir == N) + l.m_dir = NW; + else + l.m_dir = static_cast (m_dir - 1); + + return l; } + + + /** + * Function ToVector() + * + * Returns a unit vector corresponding to our direction. + */ + const VECTOR2I ToVector() const + { + switch(m_dir) + { + case N: return VECTOR2I(0, 1); + case S: return VECTOR2I(0, -1); + case E: return VECTOR2I(1, 0); + case W: return VECTOR2I(-1, 0); + case NE: return VECTOR2I(1, 1); + case NW: return VECTOR2I(-1, 1); + case SE: return VECTOR2I(1, -1); + case SW: return VECTOR2I(-1, -1); + + default: + return VECTOR2I(0, 0); + } + } + +private: + /** * Function construct() * Calculates the direction from a vector. If the vector's angle is not a multiple of 45 * degrees, the direction is rounded to the nearest octant. - * @param aVec our vector - */ + * @param aVec our vector */ void construct( const VECTOR2I& aVec ) { m_dir = UNDEFINED; @@ -321,8 +369,9 @@ private: m_dir = S; } } - - Directions m_dir; ///> our actual direction + + ///> our actual direction + Directions m_dir; }; #endif // __DIRECTION_H diff --git a/pcbnew/router/pns_algo_base.cpp b/pcbnew/router/pns_algo_base.cpp new file mode 100644 index 0000000000..7008665428 --- /dev/null +++ b/pcbnew/router/pns_algo_base.cpp @@ -0,0 +1,32 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013-2014 CERN + * Author: Tomasz Wlostowski + * + * 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 3 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, see . + */ + +#include "pns_algo_base.h" +#include "pns_router.h" + +PNS_ROUTING_SETTINGS& PNS_ALGO_BASE::Settings() const +{ + return m_router->Settings(); +} + +PNS_LOGGER *PNS_ALGO_BASE::Logger() +{ + return NULL; +} \ No newline at end of file diff --git a/pcbnew/router/pns_algo_base.h b/pcbnew/router/pns_algo_base.h new file mode 100644 index 0000000000..c274c15116 --- /dev/null +++ b/pcbnew/router/pns_algo_base.h @@ -0,0 +1,60 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013-2014 CERN + * Author: Tomasz Wlostowski + * + * 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 3 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, see . + */ + +#ifndef __PNS_ALGO_BASE_H +#define __PNS_ALGO_BASE_H + +#include "pns_routing_settings.h" + +class PNS_ROUTER; +class PNS_LOGGER; + +/** + * Class PNS_ALGO_BASE + * + * Base class for all P&S algorithms (shoving, walkaround, line placement, dragging, etc.) + * Holds a bunch of objects commonly used by all algorithms (P&S settings, parent router instance, logging) + **/ + +class PNS_ALGO_BASE { + +public: + PNS_ALGO_BASE ( PNS_ROUTER *aRouter ): + m_router ( aRouter ) + {}; + + virtual ~PNS_ALGO_BASE() {} + + ///> Returns the instance of our router + PNS_ROUTER *Router() const { + return m_router; + } + + ///> Returns current router settings + PNS_ROUTING_SETTINGS& Settings() const; + + ///> Returns the logger object, allowing to dump geometry to a file. + virtual PNS_LOGGER *Logger(); + +private: + PNS_ROUTER *m_router; +}; + +#endif diff --git a/pcbnew/router/pns_dragger.cpp b/pcbnew/router/pns_dragger.cpp new file mode 100644 index 0000000000..5361c641ec --- /dev/null +++ b/pcbnew/router/pns_dragger.cpp @@ -0,0 +1,301 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013-2014 CERN + * Author: Tomasz Wlostowski + * + * 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 3 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, see . + */ + +#include + +#include "pns_dragger.h" +#include "pns_shove.h" +#include "pns_router.h" + +PNS_DRAGGER::PNS_DRAGGER( PNS_ROUTER* aRouter ) : + PNS_ALGO_BASE ( aRouter ) +{ + m_world = NULL; + m_shove = NULL; +}; + +PNS_DRAGGER::~PNS_DRAGGER() +{ + if( m_shove ) + delete m_shove; +} + +void PNS_DRAGGER::SetWorld ( PNS_NODE *aWorld ) +{ + m_world = aWorld; +} + +bool PNS_DRAGGER::startDragSegment( const VECTOR2D& aP, PNS_SEGMENT *aSeg ) +{ + int w2 = aSeg->Width() / 2; + + m_draggedLine = m_world->AssembleLine ( aSeg, &m_draggedSegmentIndex ); + m_shove->SetInitialLine (m_draggedLine); + m_lastValidDraggedLine = *m_draggedLine; + m_lastValidDraggedLine.ClearSegmentLinks(); + + if( (aP - aSeg->Seg().A).EuclideanNorm() <= w2 ) + m_mode = CORNER; + else if( (aP - aSeg->Seg().B).EuclideanNorm() <= w2 ) + { + m_draggedSegmentIndex ++; + m_mode = CORNER; + } else + m_mode = SEGMENT; + return true; +} + +bool PNS_DRAGGER::startDragVia( const VECTOR2D& aP, PNS_VIA *aVia ) +{ + m_draggedVia = aVia; + m_initialVia = aVia; + m_mode = VIA; + + VECTOR2I p0 ( aVia->Pos() ); + PNS_JOINT *jt = m_world->FindJoint( p0, aVia->Layers().Start(), aVia->Net() ); + + BOOST_FOREACH(PNS_ITEM *item, jt->LinkList() ) + { + if(item->OfKind( PNS_ITEM::SEGMENT )) + { + int segIndex; + PNS_SEGMENT *seg = (PNS_SEGMENT *) item; + std::auto_ptr l ( m_world->AssembleLine(seg, &segIndex) ); + + if(segIndex != 0) + l->Reverse(); + + m_origViaConnections.push_back (*l); + + } + } + + + return true; +} + +bool PNS_DRAGGER::Start ( const VECTOR2I& aP, PNS_ITEM* aStartItem ) +{ + m_shove = new PNS_SHOVE ( m_world, Router() ); + m_lastNode = NULL; + m_draggedItems.Clear(); + m_currentMode = Settings().Mode(); + + TRACE(2, "StartDragging: item %p [kind %d]", aStartItem % aStartItem->Kind()); + + switch( aStartItem->Kind() ) + { + case PNS_ITEM::SEGMENT: + return startDragSegment ( aP, static_cast (aStartItem) ); + case PNS_ITEM::VIA: + return startDragVia ( aP, static_cast (aStartItem) ); + default: + return false; + } +} + +bool PNS_DRAGGER::dragMarkObstacles(const VECTOR2I& aP) +{ + if(m_lastNode) + { + delete m_lastNode; + m_lastNode = NULL; + } + + switch(m_mode) + { + case SEGMENT: + case CORNER: + { + int thresh = Settings().SmoothDraggedSegments() ? m_draggedLine->Width() / 4 : 0; + PNS_LINE tmp (*m_draggedLine); + + if(m_mode == SEGMENT) + tmp.DragSegment ( aP, m_draggedSegmentIndex, thresh ); + else + tmp.DragCorner ( aP, m_draggedSegmentIndex, thresh ); + + m_lastNode = m_shove->CurrentNode()->Branch(); + + m_lastValidDraggedLine = tmp; + m_lastValidDraggedLine.ClearSegmentLinks(); + m_lastValidDraggedLine.Unmark(); + + m_lastNode->Add ( &m_lastValidDraggedLine ); + m_draggedItems = PNS_ITEMSET ( &m_lastValidDraggedLine ); + + break; + } + case VIA: // fixme... + { + m_lastNode = m_shove->CurrentNode()->Branch(); + dumbDragVia ( m_initialVia, m_lastNode, aP ); + + + break; + } + } + + if (Settings().CanViolateDRC()) + m_dragStatus = true; + else + m_dragStatus = !m_world->CheckColliding( m_draggedItems ); + + return true; +} + +void PNS_DRAGGER::dumbDragVia ( PNS_VIA *aVia, PNS_NODE *aNode, const VECTOR2I& aP ) +{ + // fixme: this is awful. + m_draggedVia = aVia->Clone(); + m_draggedVia->SetPos( aP ); + m_draggedItems.Clear(); + m_draggedItems.Add(m_draggedVia); + + m_lastNode->Remove ( aVia ); + m_lastNode->Add ( m_draggedVia ); + + BOOST_FOREACH(PNS_LINE &l, m_origViaConnections) + { + PNS_LINE origLine (l); + PNS_LINE *draggedLine = l.Clone(); + + draggedLine->DragCorner( aP, 0 ); + draggedLine->ClearSegmentLinks(); + + m_draggedItems.AddOwned( draggedLine ); + + m_lastNode->Remove ( &origLine ); + m_lastNode->Add ( draggedLine ); + } +} + +bool PNS_DRAGGER::dragShove(const VECTOR2I& aP) +{ + bool ok = false; + + + if(m_lastNode) + { + delete m_lastNode; + m_lastNode = NULL; + } + + switch(m_mode) + { + case SEGMENT: + case CORNER: + { + int thresh = Settings().SmoothDraggedSegments() ? m_draggedLine->Width() / 4 : 0; + PNS_LINE tmp (*m_draggedLine); + if(m_mode == SEGMENT) + tmp.DragSegment ( aP, m_draggedSegmentIndex, thresh ); + else + tmp.DragCorner ( aP, m_draggedSegmentIndex, thresh ); + + PNS_SHOVE::ShoveStatus st = m_shove->ShoveLines( tmp ); + + if(st == PNS_SHOVE::SH_OK) + ok = true; + else if (st == PNS_SHOVE::SH_HEAD_MODIFIED) + { + tmp = m_shove->NewHead(); + ok = true; + } + + m_lastNode = m_shove->CurrentNode()->Branch(); + + if(ok) + m_lastValidDraggedLine = tmp; + + m_lastValidDraggedLine.ClearSegmentLinks(); + m_lastValidDraggedLine.Unmark(); + m_lastNode->Add ( &m_lastValidDraggedLine ); + m_draggedItems = PNS_ITEMSET ( &m_lastValidDraggedLine ); + + break; + } + case VIA: + { + PNS_VIA *newVia; + PNS_SHOVE::ShoveStatus st = m_shove -> ShoveDraggingVia ( m_draggedVia, aP, &newVia ); + + if(st == PNS_SHOVE::SH_OK || st == PNS_SHOVE::SH_HEAD_MODIFIED) + ok = true; + + m_lastNode = m_shove->CurrentNode()->Branch(); + + if( ok ) + { + m_draggedVia = newVia; + m_draggedItems.Clear(); + } + + break; + } + + } + + m_dragStatus = ok; + return ok; +} + +bool PNS_DRAGGER::FixRoute( ) +{ + if(m_dragStatus) + { + Router()->CommitRouting( CurrentNode() ); + return true; + } + + return false; +} + +bool PNS_DRAGGER::Drag ( const VECTOR2I& aP ) +{ + switch ( m_currentMode ) + { + case RM_MarkObstacles: + return dragMarkObstacles (aP); + case RM_Shove: + case RM_Walkaround: + case RM_Smart: + return dragShove ( aP ); + default: + return false; + } +} + +PNS_NODE *PNS_DRAGGER::CurrentNode() const +{ + return m_lastNode; +} + +const PNS_ITEMSET PNS_DRAGGER::Traces() +{ + return m_draggedItems; +} + +PNS_LOGGER *PNS_DRAGGER::Logger() +{ + if(m_shove) + return m_shove->Logger(); + return NULL; +} diff --git a/pcbnew/router/pns_dragger.h b/pcbnew/router/pns_dragger.h new file mode 100644 index 0000000000..73d206589d --- /dev/null +++ b/pcbnew/router/pns_dragger.h @@ -0,0 +1,135 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013-2014 CERN + * Author: Tomasz Wlostowski + * + * 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 3 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, see . + */ + +#ifndef __PNS_DRAGGER_H +#define __PNS_DRAGGER_H + +#include + +#include "pns_node.h" +#include "pns_via.h" +#include "pns_line.h" +#include "pns_algo_base.h" +#include "pns_itemset.h" + +class PNS_ROUTER; +class PNS_SHOVE; +class PNS_OPTIMIZER; +class PNS_ROUTER_BASE; + +/** + * Class PNS_DRAGGER + * + * Via, segment and corner dragging algorithm. + */ + +class PNS_DRAGGER : public PNS_ALGO_BASE +{ +public: + + PNS_DRAGGER( PNS_ROUTER *aRouter ); + ~PNS_DRAGGER(); + + /** + * Function SetWorld() + * + * Sets the board to work on. + */ + void SetWorld ( PNS_NODE *aWorld ); + + + /** + * Function Start() + * + * Starts routing a single track at point aP, taking item aStartItem as anchor + * (unless NULL). Returns true if a dragging operation has started. + */ + bool Start ( const VECTOR2I& aP, PNS_ITEM* aStartItem ); + + /** + * Function Drag() + * + * Drags the current segment/corner/via to the point aP. + * @return true, if dragging finished with success. + */ + bool Drag ( const VECTOR2I& aP ); + + /** + * Function FixRoute() + * + * Checks if the result of current dragging operation is correct + * and eventually commits it to the world. + * @return true, if dragging finished with success. + */ + bool FixRoute ( ); + + /** + * Function CurrentNode() + * + * Returns the most recent world state, including all + * items changed due to dragging operation. + */ + + PNS_NODE* CurrentNode() const; + + /** + * Function Traces() + * + * Returns the set of dragged items. + */ + const PNS_ITEMSET Traces(); + + /// @copydoc PNS_ALGO_BASE::Logger() + virtual PNS_LOGGER *Logger(); + +private: + + typedef std::pair LinePair; + typedef std::vector LinePairVec; + + enum DragMode { + CORNER = 0, + SEGMENT, + VIA + }; + + bool dragMarkObstacles(const VECTOR2I& aP); + bool dragShove(const VECTOR2I& aP); + bool startDragSegment( const VECTOR2D& aP, PNS_SEGMENT *aSeg ); + bool startDragVia( const VECTOR2D& aP, PNS_VIA *aVia ); + void dumbDragVia ( PNS_VIA *aVia, PNS_NODE *aNode, const VECTOR2I& aP ); + + PNS_NODE * m_world; + PNS_NODE * m_lastNode; + DragMode m_mode; + PNS_LINE * m_draggedLine; + PNS_VIA * m_draggedVia; + PNS_LINE m_lastValidDraggedLine; + PNS_SHOVE * m_shove; + int m_draggedSegmentIndex; + bool m_dragStatus; + PNS_MODE m_currentMode; + std::vector m_origViaConnections; + std::vector m_draggedViaConnections; + PNS_VIA * m_initialVia; + PNS_ITEMSET m_draggedItems; +}; + +#endif diff --git a/pcbnew/router/pns_index.h b/pcbnew/router/pns_index.h index 05d612e597..841f61bc1a 100644 --- a/pcbnew/router/pns_index.h +++ b/pcbnew/router/pns_index.h @@ -1,7 +1,7 @@ /* * KiRouter - a push-and-(sometimes-)shove PCB router * - * Copyright (C) 2013 CERN + * Copyright (C) 2013-2014 CERN * Author: Tomasz Wlostowski * * This program is free software: you can redistribute it and/or modify it @@ -15,12 +15,15 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with this program. If not, see . + * with this program. If not, see . */ #ifndef __PNS_INDEX_H #define __PNS_INDEX_H +#include +#include + #include #include @@ -33,7 +36,7 @@ * Class PNS_INDEX * * Custom spatial index, holding our board items and allowing for very fast searches. Items - * are assigned to separate R-Tree subundices depending on their type and spanned layers, reducing + * are assigned to separate R-Tree subindices depending on their type and spanned layers, reducing * overlap and improving search time. **/ @@ -47,30 +50,93 @@ public: PNS_INDEX(); ~PNS_INDEX(); + /** + * Function Add() + * + * Adds item to the spatial index. + */ void Add( PNS_ITEM* aItem ); + + /** + * Function Remove() + * + * Removes an item from the spatial index. + */ void Remove( PNS_ITEM* aItem ); + + /** + * Function Add() + * + * Replaces one item with another. + */ void Replace( PNS_ITEM* aOldItem, PNS_ITEM* aNewItem ); + /** + * Function Query() + * + * Searches items in the index that are in proximity of aItem. + * For each item, function object aVisitor is called. Only items on + * overlapping layers are considered. + * + * @param aItem item to search against + * @param aMinDistance proximity distance (wrs to the item's shape) + * @param aVisitor function object called on each found item. Return + false from the visitor to stop searching. + * @return number of items found. + */ template - int Query( const PNS_ITEM* aItem, int aMinDistance, Visitor& v ); + int Query( const PNS_ITEM* aItem, int aMinDistance, Visitor& aVisitor ); + /** + * Function Query() + * + * Searches items in the index that are in proximity of aShape. + * For each item, function object aVisitor is called. Treats all + * layers as colliding. + * + * @param aShape shape to search against + * @param aMinDistance proximity distance (wrs to the item's shape) + * @param aVisitor function object called on each found item. Return + false from the visitor to stop searching. + * @return number of items found. + */ template - int Query( const SHAPE* aShape, int aMinDistance, Visitor& v ); + int Query( const SHAPE* aShape, int aMinDistance, Visitor& aVisitor ); + /** + * Function Clear() + * + * Removes all items from the index. + */ void Clear(); + /** + * Function GetItemsForNet() + * + * Returns list of all items in a given net. + */ NetItemsList* GetItemsForNet( int aNet ); - - ItemSet::iterator begin() { return m_allItems.begin(); } - ItemSet::iterator end() { return m_allItems.end(); } - + + /** + * Function Contains() + * + * Returns true if item aItem exists in the index. + */ bool Contains( PNS_ITEM* aItem ) const { return m_allItems.find( aItem ) != m_allItems.end(); } + /** + * Function Size() + * + * Returns number of items stored in the index. + */ int Size() const { return m_allItems.size(); } + ItemSet::iterator begin() { return m_allItems.begin(); } + ItemSet::iterator end() { return m_allItems.end(); } + private: static const int MaxSubIndices = 64; static const int SI_Multilayer = 2; @@ -81,7 +147,7 @@ private: static const int SI_PadsBottom = 1; template - int querySingle( int index, const SHAPE* aShape, int aMinDistance, Visitor& v ); + int querySingle( int index, const SHAPE* aShape, int aMinDistance, Visitor& aVisitor ); ItemShapeIndex* getSubindex( const PNS_ITEM* aItem ); @@ -101,9 +167,9 @@ PNS_INDEX::ItemShapeIndex* PNS_INDEX::getSubindex( const PNS_ITEM* aItem ) { int idx_n = -1; - const PNS_LAYERSET l = aItem->GetLayers(); + const PNS_LAYERSET l = aItem->Layers(); - switch( aItem->GetKind() ) + switch( aItem->Kind() ) { case PNS_ITEM::VIA: idx_n = SI_Multilayer; @@ -113,9 +179,9 @@ PNS_INDEX::ItemShapeIndex* PNS_INDEX::getSubindex( const PNS_ITEM* aItem ) { if( l.IsMultilayer() ) idx_n = SI_Multilayer; - else if( l.Start() == 0 ) // fixme: use kicad layer codes + else if( l.Start() == LAYER_N_BACK) // fixme: use kicad layer codes idx_n = SI_PadsTop; - else if( l.Start() == 15 ) + else if( l.Start() == LAYER_N_FRONT ) idx_n = SI_PadsBottom; break; @@ -143,9 +209,11 @@ void PNS_INDEX::Add( PNS_ITEM* aItem ) { ItemShapeIndex* idx = getSubindex( aItem ); + + idx->Add( aItem ); m_allItems.insert( aItem ); - int net = aItem->GetNet(); + int net = aItem->Net(); if( net >= 0 ) { @@ -161,7 +229,7 @@ void PNS_INDEX::Remove( PNS_ITEM* aItem ) idx->Remove( aItem ); m_allItems.erase( aItem ); - int net = aItem->GetNet(); + int net = aItem->Net(); if( net >= 0 && m_netMap.find( net ) != m_netMap.end() ) m_netMap[net].remove( aItem ); @@ -176,43 +244,43 @@ void PNS_INDEX::Replace( PNS_ITEM* aOldItem, PNS_ITEM* aNewItem ) template -int PNS_INDEX::querySingle( int index, const SHAPE* aShape, int aMinDistance, Visitor& v ) +int PNS_INDEX::querySingle( int index, const SHAPE* aShape, int aMinDistance, Visitor& aVisitor ) { if( !m_subIndices[index] ) return 0; - return m_subIndices[index]->Query( aShape, aMinDistance, v, false ); + return m_subIndices[index]->Query( aShape, aMinDistance, aVisitor, false ); } template -int PNS_INDEX::Query( const PNS_ITEM* aItem, int aMinDistance, Visitor& v ) +int PNS_INDEX::Query( const PNS_ITEM* aItem, int aMinDistance, Visitor& aVisitor ) { - const SHAPE* shape = aItem->GetShape(); + const SHAPE* shape = aItem->Shape(); int total = 0; - total += querySingle( SI_Multilayer, shape, aMinDistance, v ); + total += querySingle( SI_Multilayer, shape, aMinDistance, aVisitor ); - const PNS_LAYERSET layers = aItem->GetLayers(); + const PNS_LAYERSET layers = aItem->Layers(); if( layers.IsMultilayer() ) { - total += querySingle( SI_PadsTop, shape, aMinDistance, v ); - total += querySingle( SI_PadsBottom, shape, aMinDistance, v ); + total += querySingle( SI_PadsTop, shape, aMinDistance, aVisitor ); + total += querySingle( SI_PadsBottom, shape, aMinDistance, aVisitor ); for( int i = layers.Start(); i <= layers.End(); ++i ) - total += querySingle( SI_Traces + 2 * i + SI_SegStraight, shape, aMinDistance, v ); + total += querySingle( SI_Traces + 2 * i + SI_SegStraight, shape, aMinDistance, aVisitor ); } else { int l = layers.Start(); - if( l == 0 ) - total += querySingle( SI_PadsTop, shape, aMinDistance, v ); - else if( l == 15 ) - total += querySingle( SI_PadsBottom, shape, aMinDistance, v ); + if( l == LAYER_N_BACK ) + total += querySingle( SI_PadsTop, shape, aMinDistance, aVisitor ); + else if( l == LAYER_N_FRONT ) + total += querySingle( SI_PadsBottom, shape, aMinDistance, aVisitor ); - total += querySingle( SI_Traces + 2 * l + SI_SegStraight, shape, aMinDistance, v ); + total += querySingle( SI_Traces + 2 * l + SI_SegStraight, shape, aMinDistance, aVisitor ); } return total; @@ -220,12 +288,12 @@ int PNS_INDEX::Query( const PNS_ITEM* aItem, int aMinDistance, Visitor& v ) template -int PNS_INDEX::Query( const SHAPE* aShape, int aMinDistance, Visitor& v ) +int PNS_INDEX::Query( const SHAPE* aShape, int aMinDistance, Visitor& aVisitor ) { int total = 0; for( int i = 0; i < MaxSubIndices; i++ ) - total += querySingle( i, aShape, aMinDistance, v ); + total += querySingle( i, aShape, aMinDistance, aVisitor ); return total; } diff --git a/pcbnew/router/pns_item.cpp b/pcbnew/router/pns_item.cpp index 68e04a41c0..6ec4b77989 100644 --- a/pcbnew/router/pns_item.cpp +++ b/pcbnew/router/pns_item.cpp @@ -1,7 +1,7 @@ /* * KiRouter - a push-and-(sometimes-)shove PCB router * - * Copyright (C) 2013 CERN + * Copyright (C) 2013-2014 CERN * Author: Tomasz Wlostowski * * This program is free software: you can redistribute it and/or modify it @@ -15,7 +15,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with this program. If not, see . + * with this program. If not, see . */ #include "pns_item.h" @@ -32,7 +32,7 @@ bool PNS_ITEM::collideSimple( const PNS_ITEM* aOther, int aClearance, bool aNeed if( !m_layers.Overlaps( aOther->m_layers ) ) return false; - return GetShape()->Collide( aOther->GetShape(), aClearance ); + return Shape()->Collide( aOther->Shape(), aClearance ); // fixme: MTV } @@ -50,7 +50,7 @@ bool PNS_ITEM::Collide( const PNS_ITEM* aOther, int aClearance, bool aNeedMTV, const PNS_LINE* line = static_cast( aOther ); if( line->EndsWithVia() ) - return collideSimple( &line->GetVia(), aClearance - line->GetWidth() / 2, aNeedMTV, + return collideSimple( &line->Via(), aClearance - line->Width() / 2, aNeedMTV, aMTV ); } @@ -58,7 +58,7 @@ bool PNS_ITEM::Collide( const PNS_ITEM* aOther, int aClearance, bool aNeedMTV, } -const std::string PNS_ITEM::GetKindStr() const +const std::string PNS_ITEM::KindStr() const { switch( m_kind ) { @@ -85,4 +85,5 @@ const std::string PNS_ITEM::GetKindStr() const PNS_ITEM::~PNS_ITEM() { + } diff --git a/pcbnew/router/pns_item.h b/pcbnew/router/pns_item.h index c375a7ada5..0bc03b8ba7 100644 --- a/pcbnew/router/pns_item.h +++ b/pcbnew/router/pns_item.h @@ -1,7 +1,7 @@ /* * KiRouter - a push-and-(sometimes-)shove PCB router * - * Copyright (C) 2013 CERN + * Copyright (C) 2013-2014 CERN * Author: Tomasz Wlostowski * * This program is free software: you can redistribute it and/or modify it @@ -15,7 +15,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with this program. If not, see . + * with this program. If not, see . */ #ifndef __PNS_ITEM_H @@ -26,18 +26,25 @@ #include #include +#include "trace.h" + #include "pns_layerset.h" class BOARD_CONNECTED_ITEM; class PNS_NODE; +enum LineMarker { + MK_HEAD = ( 1 << 0 ), + MK_VIOLATION = ( 1 << 3 ), + MK_LOCKED = ( 1 << 4 ) +}; + /** * Class PNS_ITEM * * Base class for PNS router board items. Implements the shared properties of all PCB items - * net, spanned layers, geometric shape & refererence to owning model. */ - class PNS_ITEM { public: @@ -60,8 +67,9 @@ public: m_movable = true; m_kind = aKind; m_parent = NULL; - m_world = NULL; m_owner = NULL; + m_marker = 0; + m_rank = -1; } PNS_ITEM( const PNS_ITEM& aOther ) @@ -70,61 +78,203 @@ public: m_net = aOther.m_net; m_movable = aOther.m_movable; m_kind = aOther.m_kind; - m_world = aOther.m_world; m_parent = aOther.m_parent; m_owner = NULL; + m_marker = aOther.m_marker; + m_rank = aOther.m_rank; } virtual ~PNS_ITEM(); - virtual PNS_ITEM* Clone() const = 0; + /** + * Function Clone() + * + * Returns a deep copy of the item + */ + virtual PNS_ITEM* Clone( ) const = 0; - ///> Returns a convex polygon "hull" of a the item, that is used as the walkaround - /// path. - /// aClearance defines how far from the body of the item the hull should be, - /// aWalkaroundThickness is the width of the line that walks around this hull. + /* + * Function Hull() + * + * Returns a convex polygon "hull" of a the item, that is used as the walk-around + * path. + * @param aClearance defines how far from the body of the item the hull should be, + * @param aWalkaroundThickness is the width of the line that walks around this hull. + */ virtual const SHAPE_LINE_CHAIN Hull( int aClearance = 0, int aWalkaroundThickness = 0 ) const { return SHAPE_LINE_CHAIN(); }; - PnsKind GetKind() const { return m_kind; } - bool OfKind( int aKind ) const { return (aKind & m_kind) != 0; } + /** + * Function Kind() + * + * Returns the type (kind) of the item + */ + PnsKind Kind() const + { + return m_kind; + } + + /** + * Function OfKind() + * + * Returns true if the item's type matches the mask aKindMask. + */ + bool OfKind( int aKindMask ) const + { + return (aKindMask & m_kind) != 0; + } - const std::string GetKindStr() const; + /** + * Function KindStr() + * + * Returns the kind of the item, as string + */ + const std::string KindStr() const; - ///> Gets/Sets the corresponding parent object in the host application's model (pcbnew) - void SetParent( BOARD_CONNECTED_ITEM* aParent ) { m_parent = aParent; } - BOARD_CONNECTED_ITEM* GetParent() const { return m_parent; } + /** + * Function SetParent() + * + * Sets the corresponding parent object in the host application's model. + */ + void SetParent( BOARD_CONNECTED_ITEM* aParent ) + { + m_parent = aParent; + } + + /** + * Function Parent() + * + * Returns the corresponding parent object in the host application's model. + */ + BOARD_CONNECTED_ITEM* Parent() const + { + return m_parent; + } - ///> Net accessors - int GetNet() const { return m_net; } - void SetNet( int aNet ) { m_net = aNet; } + /** + * Function SetNet() + * + * Sets the item's net to aNet + */ + void SetNet( int aNet ) + { + m_net = aNet; + } - ///> Layers accessors - const PNS_LAYERSET& GetLayers() const { return m_layers; } - void SetLayers( const PNS_LAYERSET& aLayers ) { m_layers = aLayers; } + /** + * Function Net() + * + * Returns the item's net. + */ + int Net() const + { + return m_net; + } + + /** + * Function SetLayers() + * + * Sets the layers spanned by the item to aLayers. + */ + void SetLayers( const PNS_LAYERSET& aLayers ) + { + m_layers = aLayers; + } + + /** + * Function SetLayer() + * + * Sets the layers spanned by the item to a single layer aLayer. + */ void SetLayer( int aLayer ) { m_layers = PNS_LAYERSET( aLayer, aLayer ); } - ///> Ownership management. An item can belong to a single PNS_NODE or stay unowned. - void SetOwner( PNS_NODE* aOwner ) { m_owner = aOwner; } - bool BelongsTo( PNS_NODE* aNode ) const { return m_owner == aNode; } - PNS_NODE* GetOwner() const { return m_owner; } + /** + * Function Layers() + * + * Returns the contiguous set of layers spanned by the item. + */ + const PNS_LAYERSET& Layers() const + { + return m_layers; + } + + /** + * Function Layer() + * + * Returns the item's layer, for single-layered items only. + */ + virtual int Layer() const + { + return Layers().Start(); + } - ///> Sets the world that is used for collision resolution. - void SetWorld( PNS_NODE* aWorld ) { m_world = aWorld; } - PNS_NODE* GetWorld() const { return m_world; } + /** + * Function LayersOverlap() + * + * Returns true if the set of layers spanned by aOther overlaps our + * layers. + */ + bool LayersOverlap( const PNS_ITEM *aOther ) const + { + return Layers().Overlaps( aOther->Layers() ); + } - ///> Collision function. Checks if the item aOther is closer to us than - /// aClearance and returns true if so. It can also calculate a minimum translation vector that - /// resolves the collision if needed. + /** + * Functon SetOwner() + * + * Sets the node that owns this item. An item can belong to a single + * PNS_NODE or stay unowned. + */ + void SetOwner( PNS_NODE* aOwner ) + { + m_owner = aOwner; + } + + /** + * Function BelongsTo() + * + * Returns true if the item is owned by the node aNode. + */ + bool BelongsTo( PNS_NODE* aNode ) const + { + return m_owner == aNode; + } + + /** + * Function Owner() + * + * Returns the owner of this item, or NULL if there's none. + */ + PNS_NODE* Owner() const { return m_owner; } + + + /** + * Function Collide() + * + * Checks for a collision (clearance violation) with between us and item aOther. + * Collision checking takes all PCB stuff into accound (layers, nets, DRC rules). + * Optionally returns a minimum translation vector for force propagation + * algorithm. + * + * @param aOther item to check collision against + * @param aClearance desired clearance + * @param aNeedMTV when true, the minimum translation vector is calculated + * @param aMTV the minimum translation vector + * @param true, if a collision was found. + */ virtual bool Collide( const PNS_ITEM* aOther, int aClearance, bool aNeedMTV, VECTOR2I& aMTV ) const; - ///> A shortcut without MTV calculation + /** + * Function Collide() + * + * A shortcut for PNS_ITEM::Colllide() without MTV stuff. + */ bool Collide( const PNS_ITEM* aOther, int aClearance ) const { VECTOR2I dummy; @@ -132,26 +282,68 @@ public: return Collide( aOther, aClearance, false, dummy ); } - ///> Returns the geometric shape of the item - virtual const SHAPE* GetShape() const + /** + * Function Shape() + * + * Returns the geometrical shape of the item. Used + * for collision detection & spatial indexing. + */ + virtual const SHAPE* Shape() const { return NULL; } + virtual void Mark(int aMarker) + { + m_marker = aMarker; + } + + virtual void Unmark () + { + m_marker = 0; + } + + virtual int Marker() const + { + return m_marker; + } + + virtual void SetRank ( int aRank ) + { + m_rank = aRank; + } + + virtual int Rank() const + { + return m_rank; + } + + virtual VECTOR2I Anchor(int n) const + { + return VECTOR2I (); + }; + + virtual int AnchorCount() const + { + return 0; + } + private: + bool collideSimple( const PNS_ITEM* aOther, int aClearance, bool aNeedMTV, VECTOR2I& aMTV ) const; protected: - PnsKind m_kind; + PnsKind m_kind; - BOARD_CONNECTED_ITEM* m_parent; - PNS_NODE* m_world; - PNS_NODE* m_owner; - PNS_LAYERSET m_layers; + BOARD_CONNECTED_ITEM *m_parent; + PNS_NODE *m_owner; + PNS_LAYERSET m_layers; - bool m_movable; - int m_net; + bool m_movable; + int m_net; + int m_marker; + int m_rank; }; #endif // __PNS_ITEM_H diff --git a/pcbnew/router/pns_itemset.cpp b/pcbnew/router/pns_itemset.cpp index ebe69dc555..fccc5eccae 100644 --- a/pcbnew/router/pns_itemset.cpp +++ b/pcbnew/router/pns_itemset.cpp @@ -1,7 +1,7 @@ /* * KiRouter - a push-and-(sometimes-)shove PCB router * - * Copyright (C) 2013 CERN + * Copyright (C) 2013-2014 CERN * Author: Tomasz Wlostowski * * This program is free software: you can redistribute it and/or modify it @@ -15,7 +15,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with this program. If not, see . + * with this program. If not, see . */ #include @@ -23,16 +23,30 @@ #include "pns_itemset.h" -PNS_ITEMSET::PNS_ITEMSET() +PNS_ITEMSET::PNS_ITEMSET( PNS_ITEM *aInitialItem ) { + if(aInitialItem) + m_items.push_back(aInitialItem); } PNS_ITEMSET::~PNS_ITEMSET() { + Clear(); } +void PNS_ITEMSET::Clear() +{ + BOOST_FOREACH(PNS_ITEM *item, m_ownedItems) + { + delete item; + } + + m_items.clear(); + m_ownedItems.clear(); +} + PNS_ITEMSET& PNS_ITEMSET::FilterLayers( int aStart, int aEnd ) { ItemVector newItems; @@ -45,7 +59,7 @@ PNS_ITEMSET& PNS_ITEMSET::FilterLayers( int aStart, int aEnd ) BOOST_FOREACH( PNS_ITEM * item, m_items ) - if( item->GetLayers().Overlaps( l ) ) + if( item->Layers().Overlaps( l ) ) newItems.push_back( item ); m_items = newItems; @@ -59,7 +73,7 @@ PNS_ITEMSET& PNS_ITEMSET::FilterKinds( int aKindMask ) BOOST_FOREACH( PNS_ITEM * item, m_items ) - if( item->GetKind() & aKindMask ) + if( item->OfKind ( aKindMask ) ) newItems.push_back( item ); m_items = newItems; @@ -73,7 +87,7 @@ PNS_ITEMSET& PNS_ITEMSET::FilterNet( int aNet ) BOOST_FOREACH( PNS_ITEM * item, m_items ) - if( item->GetNet() == aNet ) + if( item->Net() == aNet ) newItems.push_back( item ); m_items = newItems; diff --git a/pcbnew/router/pns_itemset.h b/pcbnew/router/pns_itemset.h index da2c4a6634..9a6aaab3a8 100644 --- a/pcbnew/router/pns_itemset.h +++ b/pcbnew/router/pns_itemset.h @@ -1,7 +1,7 @@ /* * KiRouter - a push-and-(sometimes-)shove PCB router * - * Copyright (C) 2013 CERN + * Copyright (C) 2013-2014 CERN * Author: Tomasz Wlostowski * * This program is free software: you can redistribute it and/or modify it @@ -15,7 +15,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with this program. If not, see . + * with this program. If not, see . */ #ifndef __PNS_ITEMSET_H @@ -37,10 +37,25 @@ class PNS_ITEMSET public: typedef std::vector ItemVector; - PNS_ITEMSET(); + PNS_ITEMSET( PNS_ITEM *aInitialItem = NULL ); + + PNS_ITEMSET (const PNS_ITEMSET &aOther ) + { + m_items = aOther.m_items; + m_ownedItems = ItemVector(); + } + + const PNS_ITEMSET& operator= (const PNS_ITEMSET &aOther) + { + m_items = aOther.m_items; + m_ownedItems = ItemVector(); + return *this; + } + ~PNS_ITEMSET(); ItemVector& Items() { return m_items; } + const ItemVector& CItems() const { return m_items; } PNS_ITEMSET& FilterLayers( int aStart, int aEnd = -1 ); PNS_ITEMSET& FilterKinds( int aKindMask ); @@ -55,8 +70,17 @@ public: PNS_ITEM* Get( int index ) const { return m_items[index]; } + void Clear(); + + void AddOwned ( PNS_ITEM *aItem ) + { + m_items.push_back( aItem ); + m_ownedItems.push_back( aItem ); + } + private: ItemVector m_items; + ItemVector m_ownedItems; }; #endif diff --git a/pcbnew/router/pns_joint.h b/pcbnew/router/pns_joint.h index 4fd63e177a..699481538f 100644 --- a/pcbnew/router/pns_joint.h +++ b/pcbnew/router/pns_joint.h @@ -1,7 +1,7 @@ /* * KiRouter - a push-and-(sometimes-)shove PCB router * - * Copyright (C) 2013 CERN + * Copyright (C) 2013-2014 CERN * Author: Tomasz Wlostowski * * This program is free software: you can redistribute it and/or modify it @@ -15,7 +15,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with this program. If not, see . + * with this program. If not, see . */ #ifndef __PNS_JOINT_H @@ -72,7 +72,7 @@ public: m_layers = b.m_layers; } - PNS_ITEM* Clone() const + PNS_ITEM* Clone ( ) const { assert( false ); return NULL; @@ -85,15 +85,15 @@ public: if( m_linkedItems.size() != 2 ) return false; - if( m_linkedItems[0]->GetKind() != SEGMENT || - m_linkedItems[1]->GetKind() != SEGMENT ) + if( m_linkedItems[0]->Kind() != SEGMENT || + m_linkedItems[1]->Kind() != SEGMENT ) return false; PNS_SEGMENT* seg1 = static_cast( m_linkedItems[0] ); PNS_SEGMENT* seg2 = static_cast( m_linkedItems[1] ); - // joints between segments of different widths are not trivial. - return seg1->GetWidth() == seg2->GetWidth(); + // joints between segments of different widths are not considered trivial. + return seg1->Width() == seg2->Width(); } ///> Links the joint to a given board item (when it's added to the PNS_NODE) @@ -131,11 +131,35 @@ public: return static_cast( m_linkedItems[m_linkedItems[0] == aCurrent ? 1 : 0] ); } + PNS_VIA *Via() + { + for( LinkedItems::iterator i = m_linkedItems.begin(); + i != m_linkedItems.end(); ++i ) + if( (*i)->Kind() == PNS_ITEM::VIA ) + return (PNS_VIA *)(*i); + return NULL; + } + /// trivial accessors - const HashTag& GetTag() const { return m_tag; } - const VECTOR2I& GetPos() const { return m_tag.pos; } - int GetNet() const { return m_tag.net; } - LinkedItems& GetLinkList() { return m_linkedItems; }; + const HashTag& Tag() const + { + return m_tag; + } + + const VECTOR2I& Pos() const + { + return m_tag.pos; + } + + int Net() const + { + return m_tag.net; + } + + LinkedItems& LinkList() + { + return m_linkedItems; + } ///> Returns the number of linked items of types listed in aMask. int LinkCount( int aMask = -1 ) const @@ -144,7 +168,7 @@ public: for( LinkedItems::const_iterator i = m_linkedItems.begin(); i != m_linkedItems.end(); ++i ) - if( (*i)->GetKind() & aMask ) + if( (*i)->Kind() & aMask ) n++; return n; diff --git a/pcbnew/router/pns_layerset.h b/pcbnew/router/pns_layerset.h index eedc00e31e..d99ef57040 100644 --- a/pcbnew/router/pns_layerset.h +++ b/pcbnew/router/pns_layerset.h @@ -1,7 +1,7 @@ /* * KiRouter - a push-and-(sometimes-)shove PCB router * - * Copyright (C) 2013 CERN + * Copyright (C) 2013-2014 CERN * Author: Tomasz Wlostowski * * This program is free software: you can redistribute it and/or modify it @@ -15,7 +15,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with this program. If not, see . + * with this program. If not, see . */ #ifndef __PNS_LAYERSET_H diff --git a/pcbnew/router/pns_line.cpp b/pcbnew/router/pns_line.cpp index 63011b6b75..8cc7bcea87 100644 --- a/pcbnew/router/pns_line.cpp +++ b/pcbnew/router/pns_line.cpp @@ -1,7 +1,7 @@ /* * KiRouter - a push-and-(sometimes-)shove PCB router * - * Copyright (C) 2013 CERN + * Copyright (C) 2013-2014 CERN * Author: Tomasz Wlostowski * * This program is free software: you can redistribute it and/or modify it @@ -15,7 +15,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with this program. If not, see . + * with this program. If not, see . */ #include @@ -29,262 +29,117 @@ #include "pns_utils.h" #include "pns_router.h" +#include + using boost::optional; -PNS_LINE* PNS_LINE::Clone() const +PNS_LINE::PNS_LINE( const PNS_LINE& aOther ) : + PNS_ITEM( aOther ), + m_line( aOther.m_line ), + m_width( aOther.m_width ) { - PNS_LINE* l = new PNS_LINE(); + m_net = aOther.m_net; + m_movable = aOther.m_movable; + m_layers = aOther.m_layers; + m_owner = aOther.m_owner; + m_via = aOther.m_via; + m_hasVia = aOther.m_hasVia; + m_marker = aOther.m_marker; + m_rank = aOther.m_rank; - l->m_line = m_line; - l->m_width = m_width; - l->m_layers = m_layers; - l->m_net = m_net; - l->m_movable = m_movable; - l->m_segmentRefs = NULL; - l->m_hasVia = m_hasVia; - l->m_via = m_via; + copyLinks ( &aOther ); +} +PNS_LINE::~PNS_LINE() +{ + if( m_segmentRefs ) + delete m_segmentRefs; +}; + + +const PNS_LINE& PNS_LINE :: operator= (const PNS_LINE& aOther) +{ + m_line = aOther.m_line; + m_width = aOther.m_width; + m_net = aOther.m_net; + m_movable = aOther.m_movable; + m_owner = aOther.m_owner; + m_layers = aOther.m_layers; + m_via = aOther.m_via; + m_hasVia = aOther.m_hasVia; + m_marker = aOther.m_marker; + m_rank = aOther.m_rank; + + copyLinks ( &aOther ); + + return *this; +} + +PNS_LINE* PNS_LINE::Clone( ) const +{ + PNS_LINE* l = new PNS_LINE( *this ); return l; } - -PNS_LINE* PNS_LINE::CloneProperties() const +void PNS_LINE::Mark(int aMarker) { - PNS_LINE* l = new PNS_LINE(); + m_marker = aMarker; + + if(m_segmentRefs) + { + BOOST_FOREACH( PNS_SEGMENT *s, *m_segmentRefs ) + s->Mark(aMarker); + } +} - l->m_width = m_width; - l->m_layers = m_layers; - l->m_net = m_net; - l->m_movable = m_movable; +void PNS_LINE::Unmark () +{ + if(m_segmentRefs) + { + BOOST_FOREACH( PNS_SEGMENT *s, *m_segmentRefs ) + s->Unmark(); + } + m_marker = 0; +} - return l; +int PNS_LINE::Marker()const +{ + int marker = m_marker; + if(m_segmentRefs) + { + BOOST_FOREACH( PNS_SEGMENT *s, *m_segmentRefs ) + marker |= s->Marker(); + } + return marker; +} + +void PNS_LINE::copyLinks( const PNS_LINE *aParent ) +{ + if(aParent->m_segmentRefs == NULL) + { + m_segmentRefs = NULL; + return; + } + + m_segmentRefs = new SegmentRefs(); + *m_segmentRefs = *aParent->m_segmentRefs; } -PNS_SEGMENT* PNS_SEGMENT::Clone() const +PNS_SEGMENT* PNS_SEGMENT::Clone( ) const { PNS_SEGMENT* s = new PNS_SEGMENT; - s->m_width = m_width; + s->m_seg = m_seg; s->m_net = m_net; - s->m_shape = m_shape; s->m_layers = m_layers; + s->m_marker = m_marker; + s->m_rank = m_rank; + s->m_owner = m_owner; - return s; // assert(false); + return s; } - -#if 1 -bool PNS_LINE::MergeObtuseSegments() -{ - int step = m_line.PointCount() - 3; - int iter = 0; - - int segs_pre = m_line.SegmentCount(); - - if( step < 0 ) - return false; - - SHAPE_LINE_CHAIN current_path( m_line ); - - while( 1 ) - { - iter++; - int n_segs = current_path.SegmentCount(); - int max_step = n_segs - 2; - - if( step > max_step ) - step = max_step; - - if( step < 2 ) - { - m_line = current_path; - return current_path.SegmentCount() < segs_pre; - } - - bool found_anything = false; - int n = 0; - - while( n < n_segs - step ) - { - const SEG s1 = current_path.CSegment( n ); - const SEG s2 = current_path.CSegment( n + step ); - SEG s1opt, s2opt; - - if( DIRECTION_45( s1 ).IsObtuse( DIRECTION_45( s2 ) ) ) - { - VECTOR2I ip = *s1.IntersectLines( s2 ); - - if( s1.Distance( ip ) <= 1 || s2.Distance( ip ) <= 1 ) - { - s1opt = SEG( s1.A, ip ); - s2opt = SEG( ip, s2.B ); - } - else - { - s1opt = SEG( s1.A, ip ); - s2opt = SEG( ip, s2.B ); - } - - - if( DIRECTION_45( s1opt ).IsObtuse( DIRECTION_45( s2opt ) ) ) - { - SHAPE_LINE_CHAIN opt_path; - opt_path.Append( s1opt.A ); - opt_path.Append( s1opt.B ); - opt_path.Append( s2opt.B ); - - PNS_LINE opt_track( *this, opt_path ); - - if( !m_world->CheckColliding( &opt_track, PNS_ITEM::ANY ) ) - { - current_path.Replace( s1.Index() + 1, s2.Index(), ip ); - n_segs = current_path.SegmentCount(); - found_anything = true; - break; - } - } - } - - n++; - } - - if( !found_anything ) - { - if( step <= 2 ) - { - m_line = current_path; - return m_line.SegmentCount() < segs_pre; - } - - step--; - } - } - - return m_line.SegmentCount() < segs_pre; -} - - -bool PNS_LINE::MergeSegments() -{ - int step = m_line.PointCount() - 3; - int iter = 0; - - int segs_pre = m_line.SegmentCount(); - - if( step < 0 ) - return false; - - SHAPE_LINE_CHAIN current_path( m_line ); - - while( 1 ) - { - iter++; - int n_segs = current_path.SegmentCount(); - int max_step = n_segs - 2; - - if( step > max_step ) - step = max_step; - - if( step < 2 ) - { - m_line = current_path; - return current_path.SegmentCount() < segs_pre; - } - - bool found_anything = false; - int n = 0; - - while( n < n_segs - step ) - { - const SEG s1 = current_path.CSegment( n ); - const SEG s2 = current_path.CSegment( n + step ); - SEG s1opt, s2opt; - - if( n > 0 ) - { - SHAPE_LINE_CHAIN path_straight = DIRECTION_45().BuildInitialTrace( s1.A, - s2.A, false ); - SHAPE_LINE_CHAIN path_diagonal = DIRECTION_45().BuildInitialTrace( s1.A, - s2.A, true ); - } - - if( DIRECTION_45( s1 ) == DIRECTION_45( s2 ) ) - { - if( s1.Collinear( s2 ) ) - { - // printf("Colinear: np %d step %d n1 %d n2 %d\n", n_segs, step, n, n+step); - - SHAPE_LINE_CHAIN opt_path; - opt_path.Append( s1.A ); - opt_path.Append( s2.B ); - - PNS_LINE tmp( *this, opt_path ); - - if( !m_world->CheckColliding( &tmp, PNS_ITEM::ANY ) ) - { - current_path.Remove( s1.Index() + 1, s2.Index() ); - n_segs = current_path.SegmentCount(); - found_anything = true; - break; - } - } - } - else if( DIRECTION_45( s1 ).IsObtuse( DIRECTION_45( s2 ) ) ) - { - VECTOR2I ip = *s1.IntersectLines( s2 ); - - if( s1.Distance( ip ) <= 1 || s2.Distance( ip ) <= 1 ) - { - s1opt = SEG( s1.A, ip ); - s2opt = SEG( ip, s2.B ); - } - else - { - s1opt = SEG( s1.A, ip ); - s2opt = SEG( ip, s2.B ); - } - - - if( DIRECTION_45( s1opt ).IsObtuse( DIRECTION_45( s2opt ) ) ) - { - SHAPE_LINE_CHAIN opt_path; - opt_path.Append( s1opt.A ); - opt_path.Append( s1opt.B ); - opt_path.Append( s2opt.B ); - - PNS_LINE opt_track( *this, opt_path ); - - if( !m_world->CheckColliding( &opt_track, PNS_ITEM::ANY ) ) - { - current_path.Replace( s1.Index() + 1, s2.Index(), ip ); - n_segs = current_path.SegmentCount(); - found_anything = true; - break; - } - } - } - - n++; - } - - if( !found_anything ) - { - if( step <= 2 ) - { - m_line = current_path; - return m_line.SegmentCount() < segs_pre; - } - - step--; - } - } - - return m_line.SegmentCount() < segs_pre; -} -#endif - - int PNS_LINE::CountCorners( int aAngles ) { int count = 0; @@ -306,247 +161,12 @@ int PNS_LINE::CountCorners( int aAngles ) return count; } - -// #define DUMP_TEST_CASES - -// fixme: damn f*****g inefficient and incredibly crappily written -void PNS_LINE::NewWalkaround( const SHAPE_LINE_CHAIN& aObstacle, - SHAPE_LINE_CHAIN& aPrePath, - SHAPE_LINE_CHAIN& aWalkaroundPath, - SHAPE_LINE_CHAIN& aPostPath, - bool aCw ) const -{ - typedef SHAPE_LINE_CHAIN::INTERSECTION INTERSECTION; - - SHAPE_LINE_CHAIN l_orig( m_line ); - SHAPE_LINE_CHAIN l_hull; - std::vector outside, on_edge, inside; - SHAPE_LINE_CHAIN path; - - std::vector isects; - - // don't calculate walkaround for empty lines - if( m_line.PointCount() < 2 ) - return; - -#ifdef DUMP_TEST_CASES - printf( "%s\n", m_line.Format().c_str() ); - printf( "%s\n", aObstacle.Format().c_str() ); -#endif - - aObstacle.Intersect( m_line, isects ); - - // printf("NewWalk intersectiosn :%d\n" ,isects.size()); - if( !aCw ) - l_hull = aObstacle.Reverse(); - else - l_hull = aObstacle; - - BOOST_FOREACH( INTERSECTION isect, isects ) { - l_orig.Split( isect.p ); - l_hull.Split( isect.p ); - } - - -#ifdef DUMP_TEST_CASES - printf( "%s\n", m_line.Format().c_str() ); - printf( "%s\n", aObstacle.Format().c_str() ); - printf( "%s\n", l_orig.Format().c_str() ); - printf( "%s\n", l_hull.Format().c_str() ); -#endif - - - // printf("Pts: line %d hull %d\n", l_orig.PointCount(), l_hull.PointCount()); - - int first_post = -1; - int last_pre = -1; - - for( int i = 0; i < l_orig.PointCount(); i++ ) - { - int ei = l_hull.Find( l_orig.CPoint( i ) ); - bool edge = ei >= 0; - bool in = l_hull.PointInside( l_orig.CPoint( i ) ) && !edge; - bool out = !( in || edge); - - outside.push_back( out ); - on_edge.push_back( edge ); - inside.push_back( in ); - } - - for( int i = l_orig.PointCount() - 1; i >= 1; i-- ) - if( inside[i] && outside[i - 1] ) - { - SHAPE_LINE_CHAIN::INTERSECTIONS ips; - l_hull.Intersect( SEG( l_orig.CPoint( i ), l_orig.CPoint( i - 1 ) ), ips ); - l_orig.Remove( i, -1 ); - l_orig.Append( ips[0].p ); - break; - } - else if( inside[i] && on_edge[i - 1] ) - { - l_orig.Remove( i, -1 ); - // n = i; - } - else if( !inside[i] ) - break; - - if( !outside.size() && on_edge.size() < 2 ) - return; - - for( int i = 0; i < l_orig.PointCount(); i++ ) - { - const VECTOR2I p = l_orig.Point( i ); - - if( outside[i] || ( on_edge[i] && i == ( l_orig.PointCount() - 1 ) ) ) - { - if( last_pre < 0 ) - aPrePath.Append( p ); - - path.Append( p ); - } - else if( on_edge[i] ) - { - int li = -1; - - if( last_pre < 0 ) - { - aPrePath.Append( p ); - last_pre = path.PointCount(); - } - - if( i == l_orig.PointCount() - 1 || outside[i + 1] ) - { - path.Append( p ); - } - else - { - int vi2 = l_hull.Find( l_orig.CPoint( i ) ); - - path.Append( l_hull.CPoint( vi2 ) ); - - for( int j = (vi2 + 1) % l_hull.PointCount(); - j != vi2; - j = (j + 1) % l_hull.PointCount() ) - { - path.Append( l_hull.CPoint( j ) ); - li = l_orig.Find( l_hull.CPoint( j ) ); - - if( li >= 0 && ( li == ( l_orig.PointCount() - 1 ) || - outside[li + 1] ) ) - break; - } - - if( li >= 0 ) - { - if( i >= li ) - break; - else - i = li; - } - } - - first_post = path.PointCount() - 1; - } - } - - if( last_pre < 0 && first_post < 0 ) - return; - - aWalkaroundPath = path.Slice( last_pre, first_post ); - - if( first_post >= 0 ) - aPostPath = path.Slice( first_post, -1 ); -} - - -bool PNS_LINE::onEdge( const SHAPE_LINE_CHAIN& obstacle, VECTOR2I p, int& ei, - bool& is_vertex ) const -{ - int vtx = obstacle.Find( p ); - - if( vtx >= 0 ) - { - ei = vtx; - is_vertex = true; - return true; - } - - for( int s = 0; s < obstacle.SegmentCount(); s++ ) - { - if( obstacle.CSegment( s ).Contains( p ) ) - { - ei = s; - is_vertex = false; - return true; - } - } - - return false; -} - - -bool PNS_LINE::walkScan( const SHAPE_LINE_CHAIN& aLine, const SHAPE_LINE_CHAIN& aObstacle, - bool aReverse, VECTOR2I& aIp, int& aIndexO, int& aIndexL, bool& aIsVertex ) const -{ - int sc = aLine.SegmentCount(); - - for( int i = 0; i < aLine.SegmentCount(); i++ ) - { - printf( "check-seg rev %d %d/%d %d\n", aReverse, i, sc, sc - 1 - i ); - SEG tmp = aLine.CSegment( aReverse ? sc - 1 - i : i ); - SEG s( tmp.A, tmp.B ); - - if( aReverse ) - { - s.A = tmp.B; - s.B = tmp.A; - } - - if( onEdge( aObstacle, s.A, aIndexO, aIsVertex ) ) - { - aIndexL = (aReverse ? sc - 1 - i : i); - aIp = s.A; - printf( "vertex %d on-%s %d\n", aIndexL, - aIsVertex ? "vertex" : "edge", aIndexO ); - return true; - } - - if( onEdge( aObstacle, s.B, aIndexO, aIsVertex ) ) - { - aIndexL = (aReverse ? sc - 1 - i - 1 : i + 1); - aIp = s.B; - printf( "vertex %d on-%s %d\n", aIndexL, - aIsVertex ? "vertex" : "edge", aIndexO ); - return true; - } - - SHAPE_LINE_CHAIN::INTERSECTIONS ips; - int n_is = aObstacle.Intersect( s, ips ); - - if( n_is > 0 ) - { - aIndexO = ips[0].our.Index(); - aIndexL = aReverse ? sc - 1 - i : i; - printf( "segment-%d intersects edge-%d\n", aIndexL, aIndexO ); - aIp = ips[0].p; - return true; - } - } - - return false; -} - - bool PNS_LINE::Walkaround( SHAPE_LINE_CHAIN aObstacle, SHAPE_LINE_CHAIN& aPre, SHAPE_LINE_CHAIN& aWalk, SHAPE_LINE_CHAIN& aPost, bool aCw ) const { - const SHAPE_LINE_CHAIN& line = GetCLine(); + const SHAPE_LINE_CHAIN& line ( CLine() ); VECTOR2I ip_start; - int index_o_start, index_l_start; VECTOR2I ip_end; - int index_o_end, index_l_end; - - bool is_vertex_start, is_vertex_end; if( line.SegmentCount() < 1 ) return false; @@ -555,92 +175,83 @@ bool PNS_LINE::Walkaround( SHAPE_LINE_CHAIN aObstacle, SHAPE_LINE_CHAIN& aPre, aObstacle.PointInside( line.CPoint( -1 ) ) ) return false; -// printf("forward:\n"); - bool found = walkScan( line, aObstacle, false, ip_start, index_o_start, - index_l_start, is_vertex_start ); - // printf("reverse:\n"); - found |= walkScan( line, aObstacle, true, ip_end, index_o_end, index_l_end, is_vertex_end ); + SHAPE_LINE_CHAIN::INTERSECTIONS ips, ips2; - if( !found || ip_start == ip_end ) + line.Intersect(aObstacle, ips); + + int nearest_dist = INT_MAX; + int farthest_dist = 0; + + SHAPE_LINE_CHAIN::INTERSECTION nearest, farthest; + + for(int i = 0; i < (int) ips.size(); i++) + { + const VECTOR2I p = ips[i].p; + int dist = line.PathLength(p); + + if(dist <= nearest_dist) + { + nearest_dist = dist; + nearest = ips[i]; + } + + if(dist >= farthest_dist) + { + farthest_dist = dist; + farthest = ips[i]; + } + } + + if(ips.size() <= 1 || nearest.p == farthest.p) { aPre = line; return true; } - aPre = line.Slice( 0, index_l_start ); - aPre.Append( ip_start ); + aPre = line.Slice( 0, nearest.our.Index() ); + aPre.Append( nearest.p ); + aPre.Simplify(); + aWalk.Clear(); - aWalk.Append( ip_start ); + aWalk.SetClosed(false); + aWalk.Append( nearest.p ); - if( aCw ) + int i = nearest.their.Index(); + + assert ( nearest.their.Index() >= 0 ); + assert ( farthest.their.Index() >= 0 ); + + assert( nearest_dist <= farthest_dist ); + + aObstacle.Split( nearest.p ); + aObstacle.Split( farthest.p ); + + int i_first = aObstacle.Find( nearest.p ); + int i_last = aObstacle.Find( farthest.p ); + + i = i_first; + + while (i != i_last) { - int is = ( index_o_start + 1 ) % aObstacle.PointCount(); - int ie = ( is_vertex_end ? index_o_end : index_o_end + 1 ) % aObstacle.PointCount(); - - while( 1 ) - { - printf( "is %d\n", is ); - aWalk.Append( aObstacle.CPoint( is ) ); - - if( is == ie ) - break; - - is++; - - if( is == aObstacle.PointCount() ) - is = 0; - } + aWalk.Append(aObstacle.CPoint(i)); + i += (aCw ? 1 : -1); + + if (i < 0) + i = aObstacle.PointCount() - 1; + else if (i == aObstacle.PointCount()) + i = 0; } - else - { - int is = index_o_start; - int ie = ( is_vertex_end ? index_o_end : index_o_end ) % aObstacle.PointCount(); - - while( 1 ) - { - printf( "is %d\n", is ); - aWalk.Append( aObstacle.CPoint( is ) ); - - if( is == ie ) - break; - - is--; - - if( is < 0 ) - is = aObstacle.PointCount() - 1; - } - } - - aWalk.Append( ip_end ); + + aWalk.Append( farthest.p ); + aWalk.Simplify(); aPost.Clear(); - aPost.Append( ip_end ); - aPost.Append( line.Slice( is_vertex_end ? index_l_end : index_l_end + 1, -1 ) ); - - // for(int i = (index_o_start + 1) % obstacle.PointCount(); - // i != (index_o_end + 1) % obstacle.PointCount(); i=(i+1) % obstacle.PointCount()) - // { - // printf("append %d\n", i); - // walk.Append(obstacle.CPoint(i)); - // } - + aPost.Append( farthest.p ); + aPost.Append( line.Slice( farthest.our.Index() + 1, -1 ) ); + aPost.Simplify(); return true; } - -void PNS_LINE::NewWalkaround( const SHAPE_LINE_CHAIN& aObstacle, - SHAPE_LINE_CHAIN& aPath, - bool aCw ) const -{ - SHAPE_LINE_CHAIN walk, post; - - NewWalkaround( aObstacle, aPath, walk, post, aCw ); - aPath.Append( walk ); - aPath.Append( post ); - aPath.Simplify(); -} - - void PNS_LINE::Walkaround( const SHAPE_LINE_CHAIN& aObstacle, SHAPE_LINE_CHAIN& aPath, bool aCw ) const @@ -656,38 +267,7 @@ void PNS_LINE::Walkaround( const SHAPE_LINE_CHAIN& aObstacle, const SHAPE_LINE_CHAIN PNS_SEGMENT::Hull( int aClearance, int aWalkaroundThickness ) const { - int d = aClearance + 10; - int x = (int)( 2.0 / ( 1.0 + M_SQRT2 ) * d ) + 2; - - const VECTOR2I a = m_shape.CPoint( 0 ); - const VECTOR2I b = m_shape.CPoint( 1 ); - - VECTOR2I dir = b - a; - - VECTOR2I p0 = dir.Perpendicular().Resize( d ); - - VECTOR2I ds = dir.Perpendicular().Resize( x / 2 ); - VECTOR2I pd = dir.Resize( x / 2 ); - VECTOR2I dp = dir.Resize( d ); - - SHAPE_LINE_CHAIN s; - - s.SetClosed( true ); - - s.Append( b + p0 + pd ); - s.Append( b + dp + ds ); - s.Append( b + dp - ds ); - s.Append( b - p0 + pd ); - s.Append( a - p0 - pd ); - s.Append( a - dp - ds ); - s.Append( a - dp + ds ); - s.Append( a + p0 - pd ); - - // make sure the hull outline is always clockwise - if( s.CSegment( 0 ).Side( a ) < 0 ) - return s.Reverse(); - else - return s; + return SegmentHull ( m_seg, aClearance, aWalkaroundThickness ); } @@ -723,8 +303,8 @@ const PNS_LINE PNS_LINE::ClipToNearestObstacle( PNS_NODE* aNode ) const if( obs ) { l.RemoveVia(); - int p = l.GetLine().Split( obs->ip_first ); - l.GetLine().Remove( p + 1, -1 ); + int p = l.Line().Split( obs->ip_first ); + l.Line().Remove( p + 1, -1 ); } return l; @@ -744,3 +324,404 @@ void PNS_LINE::ShowLinks() for( int i = 0; i < (int) m_segmentRefs->size(); i++ ) printf( "seg %d: %p\n", i, (*m_segmentRefs)[i] ); } + +SHAPE_LINE_CHAIN dragCornerInternal ( const SHAPE_LINE_CHAIN& origin, const VECTOR2I& aP ) +{ + optional picked; + int i; + + int d = 2; + + if(origin.CSegment(-1).Length() > 100000 * 30) // fixme: constant/parameter? + d = 1; + + for(i = origin.SegmentCount() - d; i >= 0; i--) + { + + DIRECTION_45 d_start (origin.CSegment(i)); + VECTOR2I p_start = origin.CPoint(i); + SHAPE_LINE_CHAIN paths [2]; + DIRECTION_45 dirs[2]; + DIRECTION_45 d_prev = (i > 0 ? DIRECTION_45(origin.CSegment(i-1)) : DIRECTION_45()); + + for(int j = 0; j < 2; j++) + { + paths [j] = d_start.BuildInitialTrace( p_start, aP, j ); + dirs [j] = DIRECTION_45(paths[j].CSegment(0)); + } + + + for( int j = 0; j < 2; j++) + if(dirs[j] == d_start) + { + picked = paths[j]; + break; + } + + if(picked) + break; + + for(int j = 0; j < 2; j++) + if (dirs[j].IsObtuse(d_prev)) + { + picked = paths[j]; + break; + } + if(picked) + break; + } + + if(picked) + { + SHAPE_LINE_CHAIN path = origin.Slice(0, i); + path.Append(*picked); + return path; + + } + + return DIRECTION_45().BuildInitialTrace(origin.CPoint(0), aP, true); +} + + + +void PNS_LINE::DragCorner ( const VECTOR2I& aP, int aIndex, int aSnappingThreshold ) +{ + SHAPE_LINE_CHAIN path; + + VECTOR2I snapped = snapDraggedCorner( m_line, aP, aIndex, aSnappingThreshold ); + + if( aIndex == 0) + path = dragCornerInternal( m_line.Reverse(), snapped ).Reverse(); + else if ( aIndex == m_line.SegmentCount() ) + path = dragCornerInternal( m_line, snapped ); + else { + // fixme: awkward behaviour for "outwards" drags + path = dragCornerInternal( m_line.Slice (0, aIndex), snapped ); + SHAPE_LINE_CHAIN path_rev = dragCornerInternal( m_line.Slice (aIndex, -1).Reverse(), snapped ).Reverse(); + path.Append(path_rev); + } + path.Simplify(); + m_line = path; +} + +VECTOR2I PNS_LINE::snapDraggedCorner( const SHAPE_LINE_CHAIN& aPath, const VECTOR2I &aP, int aIndex, int aThreshold ) const +{ + int s_start = std::max(aIndex - 2, 0); + int s_end = std::min(aIndex + 2, aPath.SegmentCount() - 1); + + int i, j; + int best_dist = INT_MAX; + VECTOR2I best_snap = aP; + + if(aThreshold <= 0) + return aP; + + for(i = s_start; i <= s_end; i++) + { + const SEG& a = aPath.CSegment(i); + + for(j = s_start; j < i; j++) + { + const SEG& b = aPath.CSegment(j); + + if( ! (DIRECTION_45(a).IsObtuse(DIRECTION_45(b))) ) + continue; + + OPT_VECTOR2I ip = a.IntersectLines(b); + + if(ip) + { + int dist = (*ip - aP).EuclideanNorm(); + if( dist < aThreshold && dist < best_dist ) + { + best_dist = dist; + best_snap = *ip; + } + } + } + } + + return best_snap; +} + +VECTOR2I PNS_LINE::snapToNeighbourSegments( const SHAPE_LINE_CHAIN& aPath, const VECTOR2I &aP, int aIndex, int aThreshold ) const +{ + VECTOR2I snap_p[2]; + DIRECTION_45 dragDir ( aPath.CSegment(aIndex) ); + int snap_d[2] = {-1, -1}; + + if( aThreshold == 0 ) + return aP; + + if(aIndex >= 2) + { + SEG s = aPath.CSegment(aIndex - 2); + if(DIRECTION_45(s) == dragDir) + snap_d[0] = s.LineDistance(aP); + snap_p[0] = s.A; + } + + if(aIndex < aPath.SegmentCount() - 2) + { + SEG s = aPath.CSegment(aIndex + 2); + if(DIRECTION_45(s) == dragDir) + snap_d[1] = s.LineDistance(aP); + snap_p[1] = s.A; + } + + VECTOR2I best = aP; + int minDist = INT_MAX; + + for(int i = 0; i < 2; i++) + if(snap_d[i] >= 0 && snap_d[i] < minDist && snap_d[i] <= aThreshold) + { + minDist = snap_d[i]; + best = snap_p[i]; + } + + return best; +} + + +void PNS_LINE::DragSegment ( const VECTOR2I& aP, int aIndex, int aSnappingThreshold ) +{ + SHAPE_LINE_CHAIN path (m_line); + VECTOR2I target (aP) ; + + SEG guideA[2], guideB[2]; + int index = aIndex; + + target = snapToNeighbourSegments( path, aP, aIndex, aSnappingThreshold ); + + if(index == 0) + { + path.Insert (0, path.CPoint(0)); + index++; + } + + if(index == path.SegmentCount()-1) + { + path.Insert(path.PointCount() - 1, path.CPoint(-1)); + } + + SEG dragged = path.CSegment(index); + DIRECTION_45 drag_dir (dragged); + + SEG s_prev = path.CSegment(index - 1); + SEG s_next = path.CSegment(index + 1); + + DIRECTION_45 dir_prev (s_prev); + DIRECTION_45 dir_next (s_next); + + if(dir_prev == drag_dir) + { + dir_prev = dir_prev.Left(); + path.Insert( index, path.CPoint(index) ); + index++; + } + + if(dir_next == drag_dir) + { + dir_next = dir_next.Right(); + path.Insert( index + 1, path.CPoint(index + 1) ); + } + + + s_prev = path.CSegment(index - 1); + s_next = path.CSegment(index + 1); + dragged = path.CSegment(index); + + bool lockEndpointA = true; + bool lockEndpointB = true; + + if(aIndex == 0) + { + if(!lockEndpointA) + guideA[0] = guideA[1] = SEG( dragged.A, dragged.A + drag_dir.Right().Right().ToVector() ); + else { + guideA[0] = SEG( dragged.A, dragged.A + drag_dir.Right().ToVector() ); + guideA[1] = SEG( dragged.A, dragged.A + drag_dir.Left().ToVector() ); + } + } else { + if(dir_prev.IsObtuse(drag_dir)) + { + guideA[0] = SEG( s_prev.A, s_prev.A + drag_dir.Left().ToVector() ); + guideA[1] = SEG( s_prev.A, s_prev.A + drag_dir.Right().ToVector() ); + } else + guideA[0] = guideA[1] = SEG( dragged.A, dragged.A + dir_prev.ToVector() ); + } + + if(aIndex == m_line.SegmentCount() - 1) + { + if(!lockEndpointB) + guideB[0] = guideB[1] = SEG( dragged.B, dragged.B + drag_dir.Right().Right().ToVector() ); + else { + guideB[0] = SEG( dragged.B, dragged.B + drag_dir.Right().ToVector() ); + guideB[1] = SEG( dragged.B, dragged.B + drag_dir.Left().ToVector() ); + } + } else { + if(dir_next.IsObtuse(drag_dir)) + { + guideB[0] = SEG( s_next.B, s_next.B + drag_dir.Left().ToVector() ); + guideB[1] = SEG( s_next.B, s_next.B + drag_dir.Right().ToVector() ); + } else + guideB[0] = guideB[1] = SEG( dragged.B, dragged.B + dir_next.ToVector() ); + } + + SEG s_current (target, target + drag_dir.ToVector()); + + int best_len = INT_MAX; + SHAPE_LINE_CHAIN best; + + for(int i = 0; i < 2; i++) + { + for(int j = 0; j < 2; j++) + { + OPT_VECTOR2I ip1 = s_current.IntersectLines(guideA[i]); + OPT_VECTOR2I ip2 = s_current.IntersectLines(guideB[j]); + + SHAPE_LINE_CHAIN np; + + if(!ip1 || !ip2) + continue; + + SEG s1 ( s_prev.A, *ip1 ); + SEG s2 ( *ip1, *ip2 ); + SEG s3 ( *ip2, s_next.B ); + + OPT_VECTOR2I ip; + + if(ip = s1.Intersect(s_next)) + { + np.Append ( s1.A ); + np.Append ( *ip ); + np.Append ( s_next.B ); + } else if(ip = s3.Intersect(s_prev)) + { + np.Append ( s_prev.A ); + np.Append ( *ip ); + np.Append ( s3.B ); + } else if(ip = s1.Intersect(s3)) + { + np.Append( s_prev.A ); + np.Append( *ip ); + np.Append( s_next.B ); + } else { + np.Append( s_prev.A ); + np.Append( *ip1 ); + np.Append( *ip2 ); + np.Append( s_next.B ); + } + + if(np.Length() < best_len) + { + best_len = np.Length(); + best = np; + } + + } + } + + if(!lockEndpointA && aIndex == 0) + best.Remove(0, 0); + if(!lockEndpointB && aIndex == m_line.SegmentCount() - 1) + best.Remove(-1, -1); + + + if(m_line.PointCount() == 1) + m_line = best; + else if (aIndex == 0) + m_line.Replace(0, 1, best); + else if (aIndex == m_line.SegmentCount() - 1) + m_line.Replace(-2, -1, best); + else + m_line.Replace(aIndex, aIndex + 1, best); + + m_line.Simplify(); +} + + +bool PNS_LINE::CompareGeometry( const PNS_LINE& aOther ) +{ + return m_line.CompareGeometry(aOther.m_line); +} + +void PNS_LINE::Reverse() +{ + m_line = m_line.Reverse(); + if(m_segmentRefs) + std::reverse(m_segmentRefs->begin(), m_segmentRefs->end() ); +} + +void PNS_LINE::AppendVia(const PNS_VIA& aVia) +{ + if(aVia.Pos() == m_line.CPoint(0)) + { + + Reverse(); + } + + m_hasVia = true; + m_via = aVia; + m_via.SetNet( m_net ); +} + +void PNS_LINE::SetRank(int aRank) +{ + m_rank = aRank; + if(m_segmentRefs) + { + BOOST_FOREACH( PNS_SEGMENT *s, *m_segmentRefs ) + s->SetRank(aRank); + } +} + +int PNS_LINE::Rank() const +{ + int min_rank = INT_MAX; + int rank; + if(m_segmentRefs) + { + BOOST_FOREACH( PNS_SEGMENT *s, *m_segmentRefs ) + min_rank = std::min(min_rank, s->Rank()); + rank = (min_rank == INT_MAX) ? -1 : min_rank; + } else { + rank = m_rank; + } + + return rank; +} + +void PNS_LINE::ClipVertexRange ( int aStart, int aEnd ) +{ + m_line = m_line.Slice (aStart, aEnd); + + if(m_segmentRefs) + { + SegmentRefs *snew = new SegmentRefs( m_segmentRefs->begin() + aStart, m_segmentRefs->begin() + aEnd ); + + delete m_segmentRefs; + m_segmentRefs = snew; + } +} + +bool PNS_LINE::HasLoops() const +{ + + for(int i = 0; i < PointCount(); i++) + for(int j = 0; j < PointCount(); j++) + { + if( (std::abs(i-j) > 1) && CPoint(i) == CPoint(j)) + return true; + } + + return false; +} + +void PNS_LINE::ClearSegmentLinks() +{ + if(m_segmentRefs) + delete m_segmentRefs; + m_segmentRefs = NULL; +} + diff --git a/pcbnew/router/pns_line.h b/pcbnew/router/pns_line.h index ebd07750cf..520409d937 100644 --- a/pcbnew/router/pns_line.h +++ b/pcbnew/router/pns_line.h @@ -1,7 +1,7 @@ /* * KiRouter - a push-and-(sometimes-)shove PCB router * - * Copyright (C) 2013 CERN + * Copyright (C) 2013-2014 CERN * Author: Tomasz Wlostowski * * This program is free software: you can redistribute it and/or modify it @@ -15,7 +15,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with this program. If not, see . + * with this program. If not, see . */ #ifndef __PNS_LINE_H @@ -42,60 +42,42 @@ class PNS_VIA; * vias, pads, junctions between multiple traces or two traces different widths * and combinations of these). PNS_LINEs are NOT stored in the model (PNS_NODE). * Instead, they are assembled on-the-fly, based on a via/pad/segment that - * belongs/begins them. + * belongs to/starts/ends them. * * PNS_LINEs can be either loose (consisting of segments that do not belong to * any PNS_NODE) or owned (with segments taken from a PNS_NODE) - these are * returned by PNS_NODE::AssembleLine and friends. * - * A PNS_LINE may have a PNS_VIA attached at its and - this is used by via + * A PNS_LINE may have a PNS_VIA attached at its end (i.e. the last point) - this is used by via * dragging/force propagation stuff. */ +#define PNS_HULL_MARGIN 10 + class PNS_LINE : public PNS_ITEM { public: - typedef std::vector LinkedSegments; - - PNS_LINE() : - PNS_ITEM( LINE ) - { - m_segmentRefs = NULL; - m_hasVia = false; - m_affectedRangeStart = -1; - }; - - PNS_LINE( int aLayer, int aWidth, const SHAPE_LINE_CHAIN& aLine ) : - PNS_ITEM( LINE ) - { - m_line = aLine; - m_width = aWidth; - m_segmentRefs = NULL; - m_hasVia = false; - m_affectedRangeStart = -1; - SetLayer( aLayer ); - } - - PNS_LINE( const PNS_LINE& aOther ) : - PNS_ITEM( aOther ), - m_line( aOther.m_line ), - m_width( aOther.m_width ) - { - m_net = aOther.m_net; - m_movable = aOther.m_movable; - m_world = aOther.m_world; - m_layers = aOther.m_layers; - m_segmentRefs = NULL; - m_via = aOther.m_via; - m_hasVia = aOther.m_hasVia; - m_affectedRangeStart = -1; - } + typedef std::vector SegmentRefs; /** * Constructor - * copies properties (net, layers from a base line), and replaces the shape - * by aLine + * Makes an empty line. + */ + PNS_LINE() : PNS_ITEM (LINE) + { + m_segmentRefs = NULL; + m_hasVia = false; + } + + + PNS_LINE( const PNS_LINE& aOther ) ; + + /** + * Constructor + * Copies properties (net, layers, etc.) from a base line and replaces the shape + * by another **/ + PNS_LINE( const PNS_LINE& aBase, const SHAPE_LINE_CHAIN& aLine ) : PNS_ITEM( aBase ), m_line( aLine ), @@ -105,49 +87,101 @@ public: m_layers = aBase.m_layers; m_segmentRefs = NULL; m_hasVia = false; - m_affectedRangeStart = -1; } - ~PNS_LINE() + ~PNS_LINE(); + + /// @copydoc PNS_ITEM::Clone() + virtual PNS_LINE* Clone( ) const; + + const PNS_LINE& operator= (const PNS_LINE& aOther); + + ///> Assigns a shape to the line (a polyline/line chain) + void SetShape ( const SHAPE_LINE_CHAIN& aLine ) + { + m_line = aLine; + } + + ///> Returns the shape of the line + const SHAPE* Shape() const + { + return &m_line; + } + + ///> Modifiable accessor to the underlying shape + SHAPE_LINE_CHAIN& Line() + { + return m_line; + } + + ///> Const accessor to the underlying shape + const SHAPE_LINE_CHAIN& CLine() const + { + return m_line; + } + + ///> Returns the number of segments in the line + int SegmentCount() const { - if( m_segmentRefs ) - delete m_segmentRefs; - }; + return m_line.SegmentCount(); + } - virtual PNS_LINE* Clone() const; + ///> Returns the number of points in the line + int PointCount() const + { + return m_line.PointCount(); + } - ///> clones the line without cloning the shape - ///> (just the properties - net, width, layers, etc.) - PNS_LINE* CloneProperties() const; + ///> Returns the aIdx-th point of the line + const VECTOR2I& CPoint( int aIdx ) const + { + return m_line.CPoint(aIdx); + } - int GetLayer() const { return GetLayers().Start(); } + ///> Returns the aIdx-th segment of the line + const SEG CSegment (int aIdx ) const + { + return m_line.CSegment(aIdx); + } - ///> Geometry accessors - void SetShape( const SHAPE_LINE_CHAIN& aLine ) { m_line = aLine; } - const SHAPE* GetShape() const { return &m_line; } - SHAPE_LINE_CHAIN& GetLine() { return m_line; } - const SHAPE_LINE_CHAIN& GetCLine() const { return m_line; } + ///> Sets line width + void SetWidth( int aWidth ) + { + m_width = aWidth; + } + + ///> Returns line width + int Width() const + { + return m_width; + } - ///> Width accessors - void SetWidth( int aWidth ) { m_width = aWidth; } - int GetWidth() const { return m_width; } + ///> Returns true if the line is geometrically identical as line aOther + bool CompareGeometry( const PNS_LINE& aOther ); - ///> Links a segment from a PNS_NODE to this line, making it owned by the node + ///> Reverses the point/vertex order + void Reverse(); + + + /* Linking functions */ + + ///> Adds a reference to a segment registered in a PNS_NODE that is a part of this line. void LinkSegment( PNS_SEGMENT* aSeg ) { if( !m_segmentRefs ) - m_segmentRefs = new std::vector (); + m_segmentRefs = new SegmentRefs(); m_segmentRefs->push_back( aSeg ); } - ///> Returns a list of segments from the owning node that constitute this - ///> line (or NULL if the line is loose) - LinkedSegments* GetLinkedSegments() + ///> Returns the list of segments from the owning node that constitute this + ///> line (or NULL if the line is not linked) + SegmentRefs* LinkedSegments() { return m_segmentRefs; } + ///> Checks if the segment aSeg is a part of the line. bool ContainsSegment( PNS_SEGMENT* aSeg ) const { if( !m_segmentRefs ) @@ -157,13 +191,23 @@ public: aSeg ) != m_segmentRefs->end(); } - ///> Returns this line, but clipped to the nearest obstacle - ///> along, to avoid collision. + ///> Erases the linking information. Used to detach the line from the owning node. + void ClearSegmentLinks(); + + ///> Returns the number of segments that were assembled together to form this line. + int LinkCount() const { + if(!m_segmentRefs) + return -1; + return m_segmentRefs->size(); + } + + ///> Clips the line to the nearest obstacle, traversing from the line's start vertex (0). + ///> Returns the clipped line. const PNS_LINE ClipToNearestObstacle( PNS_NODE* aNode ) const; - ///> DEPRECATED optimization functions (moved to PNS_OPTIMIZER) - bool MergeObtuseSegments(); - bool MergeSegments(); + ///> Clips the line to a given range of vertices. + void ClipVertexRange ( int aStart, int aEnd ); + ///> Returns the number of corners of angles specified by mask aAngles. int CountCorners( int aAngles ); @@ -173,17 +217,7 @@ public: ///> aPrePath = path from origin to the obstacle ///> aWalkaroundPath = path around the obstacle ///> aPostPath = past from obstacle till the end - ///> aCW = whether to walkaround in clockwise or counter-clockwise direction. - void NewWalkaround( const SHAPE_LINE_CHAIN& aObstacle, - SHAPE_LINE_CHAIN& aPrePath, - SHAPE_LINE_CHAIN& aWalkaroundPath, - SHAPE_LINE_CHAIN& aPostPath, - bool aCw ) const; - - void NewWalkaround( const SHAPE_LINE_CHAIN& aObstacle, - SHAPE_LINE_CHAIN& aPath, - bool aCw ) const; - + ///> aCW = whether to walk around in clockwise or counter-clockwise direction. bool Walkaround( SHAPE_LINE_CHAIN obstacle, SHAPE_LINE_CHAIN& pre, @@ -202,62 +236,46 @@ public: bool EndsWithVia() const { return m_hasVia; } - void AppendVia( const PNS_VIA& aVia ) - { - m_hasVia = true; - m_via = aVia; - m_via.SetNet( m_net ); - } - + void AppendVia( const PNS_VIA& aVia ); void RemoveVia() { m_hasVia = false; } - const PNS_VIA& GetVia() const { return m_via; } - void SetAffectedRange( int aStart, int aEnd ) - { - m_affectedRangeStart = aStart; - m_affectedRangeEnd = aEnd; - } + const PNS_VIA& Via() const { return m_via; } + + virtual void Mark(int aMarker); + virtual void Unmark (); + virtual int Marker() const; + + void DragSegment ( const VECTOR2I& aP, int aIndex, int aSnappingThreshold = 0 ); + void DragCorner ( const VECTOR2I& aP, int aIndex, int aSnappingThreshold = 0 ); - void ClearAffectedRange() - { - m_affectedRangeStart = -1; - } - - bool GetAffectedRange( int& aStart, int& aEnd ) - { - if( m_affectedRangeStart >= 0 ) - { - aStart = m_affectedRangeStart; - aEnd = m_affectedRangeEnd; - return true; - } - else - { - aStart = 0; - aEnd = m_line.PointCount(); - return false; - } - } + void SetRank ( int aRank ); + int Rank() const; + + bool HasLoops() const; private: - bool onEdge( const SHAPE_LINE_CHAIN& obstacle, VECTOR2I p, int& ei, bool& is_vertex ) const; - bool walkScan( const SHAPE_LINE_CHAIN& line, const SHAPE_LINE_CHAIN& obstacle, - bool reverse, VECTOR2I& ip, int& index_o, int& index_l, bool& is_vertex ) const; - ///> List of semgments in a PNS_NODE (PNS_ITEM::m_owner) that constitute this line. - LinkedSegments* m_segmentRefs; + VECTOR2I snapToNeighbourSegments( const SHAPE_LINE_CHAIN& aPath, const VECTOR2I &aP, int aIndex, int aThreshold) const; + VECTOR2I snapDraggedCorner( const SHAPE_LINE_CHAIN& aPath, const VECTOR2I &aP, int aIndex, int aThreshold ) const; - ///> Shape of the line + ///> Copies m_segmentRefs from the line aParent. + void copyLinks( const PNS_LINE *aParent ) ; + + ///> List of segments in the owning PNS_NODE (PNS_ITEM::m_owner) that constitute this line, or NULL + ///> if the line is not a part of any node. + SegmentRefs* m_segmentRefs; + + ///> The actual shape of the line SHAPE_LINE_CHAIN m_line; + ///> our width int m_width; - ///> Via at the end and a flag indicating if it's enabled. - PNS_VIA m_via; + ///> If true, the line ends with a via bool m_hasVia; - int m_affectedRangeStart; - int m_affectedRangeEnd; + ///> Via at the end point, if m_hasVia == true + PNS_VIA m_via; }; #endif // __PNS_LINE_H diff --git a/pcbnew/router/pns_line_placer.cpp b/pcbnew/router/pns_line_placer.cpp index 4b9b616f3e..16f3ea1429 100644 --- a/pcbnew/router/pns_line_placer.cpp +++ b/pcbnew/router/pns_line_placer.cpp @@ -1,7 +1,7 @@ /* * KiRouter - a push-and-(sometimes-)shove PCB router * - * Copyright (C) 2013 CERN + * Copyright (C) 2013-2014 CERN * Author: Tomasz Wlostowski * * This program is free software: you can redistribute it and/or modify it @@ -15,12 +15,14 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with this program. If not, see . + * with this program. If not, see . */ #include #include +#include + #include "trace.h" #include "pns_node.h" @@ -28,44 +30,46 @@ #include "pns_walkaround.h" #include "pns_shove.h" #include "pns_utils.h" +#include "pns_router.h" + +#include using boost::optional; -const double PNS_LINE_PLACER::m_shoveLengthThreshold = 1.7; - -PNS_LINE_PLACER::PNS_LINE_PLACER( PNS_NODE* aWorld ) +PNS_LINE_PLACER::PNS_LINE_PLACER( PNS_ROUTER* aRouter ) : + PNS_ALGO_BASE ( aRouter ) { - m_initial_direction = DIRECTION_45( DIRECTION_45::N ); - m_follow_mouse = false; - m_smoothing_step = 100000; - m_smooth_mouse = false; + m_initial_direction = DIRECTION_45::N; m_iteration = 0; - m_world = aWorld; - m_mode = RM_Smart; - m_follow_mouse = true; + m_world = NULL; m_shove = NULL; + m_currentNode = NULL; }; - PNS_LINE_PLACER::~PNS_LINE_PLACER() { if( m_shove ) delete m_shove; } - -void PNS_LINE_PLACER::ApplySettings( const PNS_ROUTING_SETTINGS& aSettings ) +void PNS_LINE_PLACER::setWorld ( PNS_NODE *aWorld ) { - m_follow_mouse = aSettings.m_followMouse; - m_mode = aSettings.m_routingMode; - m_walkaroundIterationLimit = aSettings.m_walkaroundIterationLimit; - m_smartPads = aSettings.m_smartPads; + m_world = aWorld; } +void PNS_LINE_PLACER::AddVia( bool aEnabled, int aDiameter, int aDrill ) +{ + m_viaDiameter = aDiameter; + m_viaDrill = aDrill; + m_placingVia = aEnabled; +} -void PNS_LINE_PLACER::StartPlacement( const VECTOR2I& aStart, int aNet, +void PNS_LINE_PLACER::startPlacement( const VECTOR2I& aStart, int aNet, int aWidth, int aLayer ) { + + assert(m_world != NULL); + m_direction = m_initial_direction; TRACE( 1, "world %p, intitial-direction %s layer %d\n", m_world % m_direction.Format().c_str() % aLayer ); @@ -73,27 +77,37 @@ void PNS_LINE_PLACER::StartPlacement( const VECTOR2I& aStart, int aNet, m_tail.SetNet( aNet ); m_head.SetWidth( aWidth ); m_tail.SetWidth( aWidth ); - m_head.GetLine().Clear(); - m_tail.GetLine().Clear(); + m_head.Line().Clear(); + m_tail.Line().Clear(); m_head.SetLayer( aLayer ); m_tail.SetLayer( aLayer ); m_iteration = 0; m_p_start = aStart; - m_currentNode = m_world->Branch(); - m_head.SetWorld( m_currentNode ); - m_tail.SetWorld( m_currentNode ); - // if(m_shove) - // delete m_shove; - m_shove = new PNS_SHOVE( m_currentNode ); + + m_lastNode = NULL; + m_currentNode = m_world; + + m_currentMode = Settings().Mode(); + + if(m_shove) + delete m_shove; + + m_shove = NULL; + + if(m_currentMode == RM_Shove || m_currentMode == RM_Smart) + { + m_shove = new PNS_SHOVE( m_world -> Branch(), Router() ); + } + m_placingVia = false; } -void PNS_LINE_PLACER::SetInitialDirection( const DIRECTION_45& aDirection ) +void PNS_LINE_PLACER::setInitialDirection( const DIRECTION_45& aDirection ) { m_initial_direction = aDirection; - if( m_tail.GetCLine().SegmentCount() == 0 ) +if( m_tail.SegmentCount() == 0 ) m_direction = aDirection; } @@ -101,8 +115,8 @@ void PNS_LINE_PLACER::SetInitialDirection( const DIRECTION_45& aDirection ) bool PNS_LINE_PLACER::handleSelfIntersections() { SHAPE_LINE_CHAIN::INTERSECTIONS ips; - SHAPE_LINE_CHAIN& head = m_head.GetLine(); - SHAPE_LINE_CHAIN& tail = m_tail.GetLine(); + SHAPE_LINE_CHAIN& head = m_head.Line(); + SHAPE_LINE_CHAIN& tail = m_tail.Line(); // if there is no tail, there is nothing to intersect with if( tail.PointCount() < 2 ) @@ -159,8 +173,11 @@ bool PNS_LINE_PLACER::handleSelfIntersections() bool PNS_LINE_PLACER::handlePullback() { - SHAPE_LINE_CHAIN& head = m_head.GetLine(); - SHAPE_LINE_CHAIN& tail = m_tail.GetLine(); + SHAPE_LINE_CHAIN& head = m_head.Line(); + SHAPE_LINE_CHAIN& tail = m_tail.Line(); + + if(head.PointCount() < 2) + return false; int n = tail.PointCount(); @@ -173,8 +190,8 @@ bool PNS_LINE_PLACER::handlePullback() return true; } - DIRECTION_45 first_head( head.Segment( 0 ) ); - DIRECTION_45 last_tail( tail.Segment( -1 ) ); + DIRECTION_45 first_head( head.CSegment( 0 ) ); + DIRECTION_45 last_tail( tail.CSegment( -1 ) ); DIRECTION_45::AngleType angle = first_head.Angle( last_tail ); // case 1: we have a defined routing direction, and the currently computed @@ -215,11 +232,14 @@ bool PNS_LINE_PLACER::handlePullback() bool PNS_LINE_PLACER::reduceTail( const VECTOR2I& aEnd ) { - SHAPE_LINE_CHAIN& head = m_head.GetLine(); - SHAPE_LINE_CHAIN& tail = m_tail.GetLine(); + SHAPE_LINE_CHAIN& head = m_head.Line(); + SHAPE_LINE_CHAIN& tail = m_tail.Line(); int n = tail.SegmentCount(); + if(head.SegmentCount() < 1) + return false; + // Don't attempt this for too short tails if( n < 2 ) return false; @@ -231,7 +251,7 @@ bool PNS_LINE_PLACER::reduceTail( const VECTOR2I& aEnd ) VECTOR2I new_start; int reduce_index = -1; - DIRECTION_45 head_dir( head.Segment( 0 ) ); + DIRECTION_45 head_dir( head.CSegment( 0 ) ); for( int i = tail.SegmentCount() - 1; i >= 0; i-- ) { @@ -247,7 +267,7 @@ bool PNS_LINE_PLACER::reduceTail( const VECTOR2I& aEnd ) if( m_currentNode->CheckColliding( &tmp, PNS_ITEM::ANY ) ) break; - if( DIRECTION_45( replacement.Segment( 0 ) ) == dir ) + if( DIRECTION_45( replacement.CSegment( 0 ) ) == dir ) { new_start = s.A; new_direction = dir; @@ -285,8 +305,8 @@ bool PNS_LINE_PLACER::checkObtusity( const SEG& a, const SEG& b ) const bool PNS_LINE_PLACER::mergeHead() { - SHAPE_LINE_CHAIN& head = m_head.GetLine(); - SHAPE_LINE_CHAIN& tail = m_tail.GetLine(); + SHAPE_LINE_CHAIN& head = m_head.Line(); + SHAPE_LINE_CHAIN& tail = m_tail.Line(); const int ForbiddenAngles = DIRECTION_45::ANG_ACUTE | DIRECTION_45::ANG_HALF_FULL | @@ -357,146 +377,157 @@ bool PNS_LINE_PLACER::handleViaPlacement( PNS_LINE& aHead ) return true; PNS_LAYERSET allLayers( 0, 15 ); - PNS_VIA v( aHead.GetCLine().CPoint( -1 ), allLayers, m_viaDiameter, aHead.GetNet() ); + PNS_VIA v( aHead.CPoint( -1 ), allLayers, m_viaDiameter, aHead.Net() ); v.SetDrill( m_viaDrill ); VECTOR2I force; - VECTOR2I lead = aHead.GetCLine().CPoint( -1 ) - aHead.GetCLine().CPoint( 0 ); + VECTOR2I lead = aHead.CPoint( -1 ) - aHead.CPoint( 0 ); - if( v.PushoutForce( m_shove->GetCurrentNode(), lead, force, true, 20 ) ) + bool solidsOnly = ( m_currentMode != RM_Walkaround ); + + if( v.PushoutForce( m_currentNode, lead, force, solidsOnly, 40 ) ) { SHAPE_LINE_CHAIN line = m_direction.BuildInitialTrace( - aHead.GetCLine().CPoint( 0 ), - aHead.GetCLine().CPoint( -1 ) + force ); + aHead.CPoint( 0 ), + aHead.CPoint( -1 ) + force ); aHead = PNS_LINE( aHead, line ); - v.SetPos( v.GetPos() + force ); + v.SetPos( v.Pos() + force ); return true; } return false; } - -bool PNS_LINE_PLACER::routeHead( const VECTOR2I& aP, PNS_LINE& aNewHead, - bool aCwWalkaround ) +bool PNS_LINE_PLACER::rhWalkOnly ( const VECTOR2I& aP, PNS_LINE& aNewHead ) { - // STAGE 1: route a simple two-segment trace between m_p_start and aP... SHAPE_LINE_CHAIN line = m_direction.BuildInitialTrace( m_p_start, aP ); + PNS_LINE initTrack( m_head, line ), walkFull; + int effort = 0; + bool viaOk = handleViaPlacement( initTrack ); + bool rv = true; - PNS_LINE initTrack( m_head, line ); - PNS_LINE walkFull, walkSolids; + PNS_WALKAROUND walkaround( m_currentNode, Router() ); - if( m_mode == RM_Ignore ) + walkaround.SetSolidsOnly( false ); + walkaround.SetIterationLimit( Settings().WalkaroundIterationLimit() ); + + PNS_WALKAROUND::WalkaroundStatus wf = walkaround.Route( initTrack, walkFull, false ); + + switch(Settings().OptimizerEffort()) { - aNewHead = initTrack; - return true; + case OE_Low: + effort = 0; + break; + case OE_Medium: + case OE_Full: + effort = PNS_OPTIMIZER::MERGE_SEGMENTS; + break; } + if(Settings().SmartPads()) + effort |= PNS_OPTIMIZER::SMART_PADS; + + if( wf == PNS_WALKAROUND::STUCK ) + { + walkFull = walkFull.ClipToNearestObstacle( m_currentNode ); + rv = true; + + } else if( m_placingVia && viaOk ) { + PNS_LAYERSET allLayers( 0, 15 ); + PNS_VIA v1( walkFull.CPoint( -1 ), allLayers, m_viaDiameter ); + walkFull.AppendVia( v1 ); + } + + PNS_OPTIMIZER::Optimize( &walkFull, effort, m_currentNode ); + + if( m_currentNode->CheckColliding(&walkFull) ) + { + TRACEn(0, "strange, walk line colliding\n"); + } + + m_head = walkFull; + aNewHead = walkFull; + + return rv; +} + +bool PNS_LINE_PLACER::rhMarkObstacles ( const VECTOR2I& aP, PNS_LINE& aNewHead ) +{ + m_head.SetShape ( m_direction.BuildInitialTrace( m_p_start, aP ) ); + + if( m_placingVia ) + { + PNS_LAYERSET allLayers( 0, 15 ); + PNS_VIA v1( m_head.CPoint( -1 ), allLayers, m_viaDiameter ); + m_head.AppendVia( v1 ); + } + + aNewHead = m_head; + + return m_currentNode->CheckColliding( &m_head ); +} + +bool PNS_LINE_PLACER::rhShoveOnly ( const VECTOR2I& aP, PNS_LINE& aNewHead ) +{ + SHAPE_LINE_CHAIN line = m_direction.BuildInitialTrace( m_p_start, aP ); + PNS_LINE initTrack( m_head, line ); + PNS_LINE walkSolids, l2; handleViaPlacement( initTrack ); - m_currentNode = m_shove->GetCurrentNode(); - + m_currentNode = m_shove->CurrentNode(); PNS_OPTIMIZER optimizer( m_currentNode ); - PNS_WALKAROUND walkaround( m_currentNode ); - walkaround.SetSolidsOnly( false ); - walkaround.SetIterationLimit( m_mode == RM_Walkaround ? 8 : 5 ); - // walkaround.SetApproachCursor(true, aP); + PNS_WALKAROUND walkaround( m_currentNode, Router() ); - PNS_WALKAROUND::WalkaroundStatus wf = walkaround.Route( initTrack, walkFull ); - -#if 0 - - if( m_mode == RM_Walkaround ) - { - // walkaround. -// PNSDisplayDebugLine (walkFull.GetCLine(), 4); - - if( wf == PNS_WALKAROUND::STUCK ) - { - aNewHead = m_head; - aNewHead.SetShape( walkFull.GetCLine() ); - aNewHead = aNewHead.ClipToNearestObstacle( m_currentNode ); - return false; - } - - aNewHead = m_head; - aNewHead.SetShape( walkFull.GetCLine() ); - -// printf("nh w %d l %d\n", aNewHead.GetWidth(), aNewHead.GetLayers().Start()); - return true; - } - -#endif - - PNS_COST_ESTIMATOR cost_walk, cost_orig; - - walkaround.SetApproachCursor( false, aP ); walkaround.SetSolidsOnly( true ); walkaround.SetIterationLimit( 10 ); PNS_WALKAROUND::WalkaroundStatus stat_solids = walkaround.Route( initTrack, walkSolids ); optimizer.SetEffortLevel( PNS_OPTIMIZER::MERGE_SEGMENTS ); - optimizer.SetCollisionMask( PNS_ITEM::SOLID ); + optimizer.SetCollisionMask ( PNS_ITEM::SOLID ); optimizer.Optimize( &walkSolids ); - #if 0 - optimizer.SetCollisionMask( -1 ); - optimizer.Optimize( &walkFull ); - #endif - cost_orig.Add( initTrack ); - cost_walk.Add( walkFull ); - if( m_mode == RM_Smart || m_mode == RM_Shove ) - { - PNS_LINE l2; - - bool walk_better = cost_orig.IsBetter( cost_walk, 1.5, 10.0 ); - walk_better = false; - -#if 0 - printf( "RtTrk width %d %d %d", initTrack.GetWidth(), - walkFull.GetWidth(), walkSolids.GetWidth() ); - printf( "init-coll %d\n", m_currentNode->CheckColliding( &initTrack ) ? 1 : 0 ); - printf( "total cost: walk cor %.0f len %.0f orig cor %.0f len %.0f walk-better %d\n", - cost_walk.GetCornerCost(), cost_walk.GetLengthCost(), - cost_orig.GetCornerCost(), cost_orig.GetLengthCost(), - walk_better ); -#endif - - if( m_mode == RM_Smart && wf == PNS_WALKAROUND::DONE && walk_better - && walkFull.GetCLine().CPoint( -1 ) == initTrack.GetCLine().CPoint( -1 ) ) - l2 = walkFull; - else if( stat_solids == PNS_WALKAROUND::DONE ) + if( stat_solids == PNS_WALKAROUND::DONE ) l2 = walkSolids; else - l2 = initTrack.ClipToNearestObstacle( m_shove->GetCurrentNode() ); + l2 = initTrack.ClipToNearestObstacle( m_shove->CurrentNode() ); - PNS_LINE l( m_tail ); - l.GetLine().Append( l2.GetCLine() ); - l.GetLine().Simplify(); + PNS_LINE l( m_tail ); + l.Line().Append( l2.CLine() ); + l.Line().Simplify(); - if( m_placingVia ) - { - PNS_LAYERSET allLayers( 0, 15 ); - PNS_VIA v1( l.GetCLine().CPoint( -1 ), allLayers, m_viaDiameter ); - PNS_VIA v2( l2.GetCLine().CPoint( -1 ), allLayers, m_viaDiameter ); - v1.SetDrill( m_viaDrill ); - v2.SetDrill( m_viaDrill ); + if( m_placingVia ) + { + PNS_LAYERSET allLayers( 0, 15 ); + PNS_VIA v1( l.CPoint( -1 ), allLayers, m_viaDiameter ); + PNS_VIA v2( l2.CPoint( -1 ), allLayers, m_viaDiameter ); + v1.SetDrill( m_viaDrill ); + v2.SetDrill( m_viaDrill ); - l.AppendVia( v1 ); - l2.AppendVia( v2 ); - } + l.AppendVia( v1 ); + l2.AppendVia( v2 ); + } - PNS_SHOVE::ShoveStatus status = m_shove->ShoveLines( &l ); - m_currentNode = m_shove->GetCurrentNode(); + l.Line().Simplify(); - if( status == PNS_SHOVE::SH_OK ) + // in certain, uncommon cases there may be loops in the head+tail, In such case, we don't shove to avoid + // screwing up the database. + if ( l.HasLoops() ) + { + aNewHead = m_head; + return false; + } + + PNS_SHOVE::ShoveStatus status = m_shove->ShoveLines( l ); + + m_currentNode = m_shove->CurrentNode(); + + if( status == PNS_SHOVE::SH_OK ) { optimizer.SetWorld( m_currentNode ); - optimizer.ClearCache(); optimizer.SetEffortLevel( PNS_OPTIMIZER::MERGE_OBTUSE | PNS_OPTIMIZER::SMART_PADS ); - optimizer.SetCollisionMask( -1 ); + optimizer.SetCollisionMask( PNS_ITEM::ANY ); optimizer.Optimize( &l2 ); aNewHead = l2; @@ -510,25 +541,59 @@ bool PNS_LINE_PLACER::routeHead( const VECTOR2I& aP, PNS_LINE& aNewHead, walkaround.SetIterationLimit( 10 ); walkaround.SetApproachCursor( true, aP ); walkaround.Route( initTrack, l2 ); - aNewHead = l2.ClipToNearestObstacle( m_shove->GetCurrentNode() ); - // aNewHead = l2; + aNewHead = l2.ClipToNearestObstacle( m_shove->CurrentNode() ); return false; } - } + + return false; +} + +bool PNS_LINE_PLACER::routeHead( const VECTOR2I& aP, PNS_LINE& aNewHead ) +{ + switch( m_currentMode ) + { + case RM_MarkObstacles: + return rhMarkObstacles( aP, aNewHead ); + case RM_Walkaround: + return rhWalkOnly ( aP, aNewHead ); + case RM_Shove: + return rhShoveOnly ( aP, aNewHead ); + default: + break; + } + return false; } bool PNS_LINE_PLACER::optimizeTailHeadTransition() { - SHAPE_LINE_CHAIN& head = m_head.GetLine(); - SHAPE_LINE_CHAIN& tail = m_tail.GetLine(); + + PNS_LINE tmp = Trace(); - const int TailLookbackSegments = 5; + if(PNS_OPTIMIZER::Optimize(&tmp, PNS_OPTIMIZER::FANOUT_CLEANUP, m_currentNode)) + { + if(tmp.SegmentCount() < 1) + return false; - int threshold = std::min( tail.PointCount(), TailLookbackSegments + 1 ); + m_head = tmp; + m_p_start = tmp.CLine().CPoint( 0 ); + m_direction = DIRECTION_45( tmp.CSegment( 0 ) ); + m_tail.Line().Clear(); + return true; + } + + SHAPE_LINE_CHAIN& head = m_head.Line(); + SHAPE_LINE_CHAIN& tail = m_tail.Line(); + + int tailLookbackSegments = 3; + + //if(m_currentMode() == RM_Walkaround) + // tailLookbackSegments = 10000; + + int threshold = std::min( tail.PointCount(), tailLookbackSegments + 1 ); if( tail.SegmentCount() < 3 ) return false; @@ -536,8 +601,9 @@ bool PNS_LINE_PLACER::optimizeTailHeadTransition() // assemble TailLookbackSegments tail segments with the current head SHAPE_LINE_CHAIN opt_line = tail.Slice( -threshold, -1 ); - opt_line.Append( head ); -// opt_line.Simplify(); + int end = std::min(2, head.PointCount() - 1 ); + + opt_line.Append( head.Slice( 0, end ) ); PNS_LINE new_head( m_tail, opt_line ); @@ -545,20 +611,18 @@ bool PNS_LINE_PLACER::optimizeTailHeadTransition() // If so, replace the (threshold) last tail points and the head with // the optimized line - // if(PNS_OPTIMIZER::Optimize(&new_head, PNS_OPTIMIZER::MERGE_SEGMENTS)) - - if( new_head.MergeSegments() ) + if(PNS_OPTIMIZER::Optimize(&new_head, PNS_OPTIMIZER::MERGE_OBTUSE, m_currentNode)) { PNS_LINE tmp( m_tail, opt_line ); TRACE( 0, "Placer: optimize tail-head [%d]", threshold ); head.Clear(); - tail.Replace( -threshold, -1, new_head.GetCLine() ); + tail.Replace( -threshold, -1, new_head.CLine() ); tail.Simplify(); - m_p_start = new_head.GetCLine().CPoint( -1 ); - m_direction = DIRECTION_45( new_head.GetCLine().CSegment( -1 ) ); + m_p_start = new_head.CLine().CPoint( -1 ); + m_direction = DIRECTION_45( new_head.CSegment( -1 ) ); return true; } @@ -576,26 +640,24 @@ void PNS_LINE_PLACER::routeStep( const VECTOR2I& aP ) PNS_LINE new_head; - m_follow_mouse = true; - TRACE( 2, "INIT-DIR: %s head: %d, tail: %d segs\n", - m_initial_direction.Format().c_str() % m_head.GetCLine().SegmentCount() % - m_tail.GetCLine().SegmentCount() ); + m_initial_direction.Format().c_str() % m_head.SegmentCount() % + m_tail.SegmentCount() ); for( i = 0; i < n_iter; i++ ) { - if( !go_back && m_follow_mouse ) + if( !go_back && Settings().FollowMouse() ) reduceTail( aP ); go_back = false; - if( !routeHead( aP, new_head, true ) ) + if( !routeHead( aP, new_head ) ) fail = true; if( !new_head.Is45Degree() ) fail = true; - if( !m_follow_mouse ) + if( !Settings().FollowMouse() ) return; m_head = new_head; @@ -615,48 +677,36 @@ void PNS_LINE_PLACER::routeStep( const VECTOR2I& aP ) if( !fail ) { - if( optimizeTailHeadTransition() ) - return; + if( optimizeTailHeadTransition() ) + return; mergeHead(); } } -bool PNS_LINE_PLACER::Route( const VECTOR2I& aP ) +bool PNS_LINE_PLACER::route( const VECTOR2I& aP ) { - if( m_smooth_mouse ) - { - VECTOR2I p_cur = m_p_start; - VECTOR2I step = (aP - m_p_start).Resize( m_smoothing_step ); - - do - { - if( (p_cur - aP).EuclideanNorm() <= m_smoothing_step ) - p_cur = aP; - else - p_cur += step; - - routeStep( p_cur ); - } while( p_cur != aP ); - } - else - routeStep( aP ); - + routeStep( aP ); return CurrentEnd() == aP; } -const PNS_LINE PNS_LINE_PLACER::GetTrace() const +const PNS_LINE PNS_LINE_PLACER::Trace() const { PNS_LINE tmp( m_head ); - tmp.SetShape( m_tail.GetCLine() ); - tmp.GetLine().Append( m_head.GetCLine() ); - tmp.GetLine().Simplify(); + tmp.SetShape( m_tail.CLine() ); + tmp.Line().Append( m_head.CLine() ); + tmp.Line().Simplify(); return tmp; } +const PNS_ITEMSET PNS_LINE_PLACER::Traces() +{ + m_currentTrace = Trace(); + return PNS_ITEMSET( &m_currentTrace ); +} void PNS_LINE_PLACER::FlipPosture() { @@ -664,15 +714,301 @@ void PNS_LINE_PLACER::FlipPosture() m_direction = m_direction.Right(); } - -void PNS_LINE_PLACER::GetUpdatedItems( PNS_NODE::ItemVector& aRemoved, - PNS_NODE::ItemVector& aAdded ) +PNS_NODE* PNS_LINE_PLACER::CurrentNode(bool aLoopsRemoved) const { - return m_shove->GetCurrentNode()->GetUpdatedItems( aRemoved, aAdded ); + if(aLoopsRemoved && m_lastNode) + return m_lastNode; + return m_currentNode; } -PNS_NODE* PNS_LINE_PLACER::GetCurrentNode() const +void PNS_LINE_PLACER::splitAdjacentSegments( PNS_NODE* aNode, PNS_ITEM* aSeg, const VECTOR2I& aP ) { - return m_shove->GetCurrentNode(); + if( aSeg && aSeg->OfKind( PNS_ITEM::SEGMENT ) ) + { + PNS_JOINT *jt = aNode->FindJoint( aP, aSeg ); + + if( jt && jt->LinkCount() >= 1 ) + return; + + PNS_SEGMENT* s_old = static_cast( aSeg ); + + PNS_SEGMENT* s_new[2]; + + s_new[0] = s_old->Clone(); + s_new[1] = s_old->Clone(); + + s_new[0]->SetEnds( s_old->Seg().A, aP ); + s_new[1]->SetEnds( aP, s_old->Seg().B ); + + aNode->Remove( s_old ); + aNode->Add( s_new[0], true ); + aNode->Add( s_new[1], true ); + } } + +void PNS_LINE_PLACER::SetLayer(int aLayer) +{ + m_currentLayer = aLayer; +} + +void PNS_LINE_PLACER::SetWidth(int aWidth) +{ + m_currentWidth = aWidth; +} + +void PNS_LINE_PLACER::Start( const VECTOR2I& aP, PNS_ITEM* aStartItem ) +{ + VECTOR2I p( aP ); + + static int unknowNetIdx = 0; // -10000; + int net = -1; + + m_lastNode = NULL; + m_placingVia = false; + m_startsOnVia = false; + + bool splitSeg = false; + + if( Router()->SnappingEnabled() ) + p = Router()->SnapToItem( aStartItem, aP, splitSeg ); + + if( !aStartItem || aStartItem->Net() < 0 ) + net = unknowNetIdx--; + else + net = aStartItem->Net(); + + m_currentStart = p; + m_originalStart = p; + m_currentEnd = p; + m_currentNet = net; + + + PNS_NODE *rootNode = Router()->GetWorld()->Branch(); + + if( splitSeg ) + splitAdjacentSegments( rootNode, aStartItem, p ); + + setWorld ( rootNode ); + setInitialDirection( Settings().InitialDirection() ); + startPlacement( p, m_currentNet, m_currentWidth, m_currentLayer ); +} + + +void PNS_LINE_PLACER::Move( const VECTOR2I& aP, PNS_ITEM* aEndItem ) +{ + PNS_LINE current; + VECTOR2I p = aP; + int eiDepth = -1; + + if(aEndItem && aEndItem->Owner()) + eiDepth = aEndItem->Owner()->Depth(); + + if( m_lastNode ) + { + delete m_lastNode; + m_lastNode = NULL; + } + + route( p ); + + current = Trace(); + + if(!current.PointCount()) + m_currentEnd = m_p_start; + else + m_currentEnd = current.CLine().CPoint(-1); + + + PNS_NODE *latestNode = m_currentNode; + m_lastNode = latestNode->Branch(); + + + if(eiDepth >= 0 && aEndItem && latestNode->Depth() > eiDepth && current.SegmentCount() && current.CPoint(-1) == aP) + { + splitAdjacentSegments( m_lastNode, aEndItem, current.CPoint(-1) ); + if(Settings().RemoveLoops()) + removeLoops( m_lastNode, ¤t ); + } + + updateLeadingRatLine(); +} + +bool PNS_LINE_PLACER::FixRoute( const VECTOR2I& aP, PNS_ITEM* aEndItem ) +{ + bool realEnd = false; + int lastV; + + PNS_LINE pl = Trace(); + + if (m_currentMode == RM_MarkObstacles && + !Settings().CanViolateDRC() && + m_world->CheckColliding( &pl ) ) + return false; + + const SHAPE_LINE_CHAIN& l = pl.CLine(); + + if( !l.SegmentCount() ) + return true; + + VECTOR2I p_pre_last = l.CPoint( -1 ); + const VECTOR2I p_last = l.CPoint( -1 ); + DIRECTION_45 d_last( l.CSegment( -1 ) ); + + if( l.PointCount() > 2 ) + p_pre_last = l.CPoint( -2 ); + + if( aEndItem && m_currentNet >= 0 && m_currentNet == aEndItem->Net() ) + realEnd = true; + + + if(realEnd || m_placingVia) + lastV = l.SegmentCount(); + else + lastV = std::max( 1, l.SegmentCount() - 1 ); + + + PNS_SEGMENT* lastSeg = NULL; + + for( int i = 0; i < lastV; i++ ) + { + const SEG& s = pl.CSegment( i ); + PNS_SEGMENT* seg = new PNS_SEGMENT( s, m_currentNet ); + seg->SetWidth( pl.Width() ); + seg->SetLayer( m_currentLayer ); + m_lastNode->Add( seg ); + lastSeg = seg; + } + + if( pl.EndsWithVia() ) + m_lastNode->Add( pl.Via().Clone() ); + + if(realEnd) + simplifyNewLine ( m_lastNode, lastSeg ); + + Router()->CommitRouting ( m_lastNode ); + + m_lastNode = NULL; + + if(!realEnd) + { + setInitialDirection( d_last ); + VECTOR2I p_start = m_placingVia ? p_last : p_pre_last; + + if( m_placingVia ) + m_currentLayer = Router()->NextCopperLayer( true ); + + setWorld ( Router()->GetWorld()->Branch() ); + startPlacement( p_start, m_head.Net(), m_head.Width(), m_currentLayer ); + + m_startsOnVia = m_placingVia; + m_placingVia = false; + } + + return realEnd; +} + +void PNS_LINE_PLACER::removeLoops( PNS_NODE* aNode, PNS_LINE* aLatest ) +{ + if(!aLatest->SegmentCount()) + return; + + aNode->Add( aLatest, true ); + + for(int s = 0; s < aLatest->SegmentCount(); s++ ) + { + PNS_SEGMENT *seg = (*aLatest->LinkedSegments())[s]; + + PNS_LINE* ourLine = aNode->AssembleLine( seg ) ; + PNS_JOINT a, b; + + std::vector lines; + + aNode->FindLineEnds( ourLine, a, b ); + + if( a == b ) + { + aNode->FindLineEnds( aLatest, a, b); + } + + aNode->FindLinesBetweenJoints( a, b, lines ); + + int removedCount = 0; + int total = 0; + + BOOST_FOREACH( PNS_LINE* line, lines ) + { + total++; + + if( !( line->ContainsSegment( seg ) ) && line->SegmentCount() ) + { + Router()->DisplayDebugLine ( line->CLine(), -1, 10000 ); + + for(int i = 0; i < line->PointCount(); i++ ) + Router()->DisplayDebugPoint ( line->CPoint(i), -1 ); + + aNode->Remove( line ); + removedCount ++; + } + } + + TRACE(0, "total segs removed: %d/%d\n", removedCount % total); + + delete ourLine; + } + + aNode->Remove( aLatest ); +} + +void PNS_LINE_PLACER::simplifyNewLine ( PNS_NODE *aNode, PNS_SEGMENT *aLatest ) +{ + PNS_LINE *l = aNode->AssembleLine( aLatest) ; + SHAPE_LINE_CHAIN simplified ( l->CLine() ); + simplified.Simplify(); + + if(simplified.PointCount() != l->PointCount()) + { + std::auto_ptr lnew ( l->Clone() ); + aNode -> Remove(l); + lnew->SetShape(simplified); + aNode -> Add( lnew.get() ); + } +} + +void PNS_LINE_PLACER::UpdateSizes( const PNS_ROUTING_SETTINGS& aSettings ) +{ + int trackWidth = aSettings.GetTrackWidth(); + + m_head.SetWidth( trackWidth ); + m_tail.SetWidth( trackWidth ); + + m_viaDiameter = aSettings.GetViaDiameter(); + m_viaDrill = aSettings.GetViaDrill(); +} + +void PNS_LINE_PLACER::updateLeadingRatLine() +{ + PNS_LINE current = Trace(); + + if(! current.PointCount() ) + return; + + std::auto_ptr tmpNode ( m_lastNode->Branch() ); + tmpNode->Add( ¤t ); + + PNS_JOINT *jt = tmpNode->FindJoint( current.CPoint(-1), current.Layers().Start(), current.Net() ); + + if(!jt) + return; + + int anchor; + PNS_ITEM *it = tmpNode->NearestUnconnectedItem ( jt, &anchor ); + + if(it) + { + SHAPE_LINE_CHAIN lc; + lc.Append ( current.CPoint(-1) ); + lc.Append ( it->Anchor(anchor) ); + Router()->DisplayDebugLine( lc, 5, 10000 ); + } +} \ No newline at end of file diff --git a/pcbnew/router/pns_line_placer.h b/pcbnew/router/pns_line_placer.h index 625e6451b2..ddbeb23c74 100644 --- a/pcbnew/router/pns_line_placer.h +++ b/pcbnew/router/pns_line_placer.h @@ -1,7 +1,7 @@ /* * KiRouter - a push-and-(sometimes-)shove PCB router * - * Copyright (C) 2013 CERN + * Copyright (C) 2013-2014 CERN * Author: Tomasz Wlostowski * * This program is free software: you can redistribute it and/or modify it @@ -15,7 +15,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with this program. If not, see . + * with this program. If not, see . */ #ifndef __PNS_LINE_PLACER_H @@ -29,7 +29,7 @@ #include "pns_node.h" #include "pns_via.h" #include "pns_line.h" -#include "pns_routing_settings.h" +#include "pns_algo_base.h" class PNS_ROUTER; class PNS_SHOVE; @@ -39,29 +39,156 @@ class PNS_ROUTER_BASE; /** * Class PNS_LINE_PLACER * - * Interactively routes a single track. Runs shove and walkaround - * algorithms when needed. + * Single track placement algorithm. Interactively routes a track. + * Applies shove and walkaround algorithms when needed. */ -class PNS_LINE_PLACER +class PNS_LINE_PLACER : public PNS_ALGO_BASE { public: - PNS_LINE_PLACER( PNS_NODE* aWorld ); + PNS_LINE_PLACER( PNS_ROUTER *aRouter ); ~PNS_LINE_PLACER(); - ///> Appends a via at the end of currently placed line. - void AddVia( bool aEnabled, int aDiameter, int aDrill ) - { - m_viaDiameter = aDiameter; - m_viaDrill = aDrill; - m_placingVia = aEnabled; - } - - ///> Starts placement of a line at point aStart. - void StartPlacement( const VECTOR2I& aStart, int aNet, int aWidth, int aLayer ); + /** + * Function Start() + * + * Starts routing a single track at point aP, taking item aStartItem as anchor + * (unless NULL). + */ + void Start ( const VECTOR2I& aP, PNS_ITEM* aStartItem ); + + /** + * Function Move() + * + * Moves the end of the currently routed trace to the point aP, taking + * aEndItem as anchor (if not NULL). + * (unless NULL). + */ + void Move( const VECTOR2I& aP, PNS_ITEM* aEndItem ); /** - * Function Route() + * Function FixRoute() + * + * Commits the currently routed track to the parent node, taking + * aP as the final end point and aEndItem as the final anchor (if provided). + * @return true, if route has been commited. May return false if the routing + * result is violating design rules - in such case, the track is only committed + * if Settings.CanViolateDRC() is on. + */ + bool FixRoute( const VECTOR2I& aP, PNS_ITEM* aEndItem ); + + /** + * Function AddVia() + * + * Enables/disables a via at the end of currently routed trace. + * @param aEnabled if true, a via is attached during placement + * @param aDiameter diameter of the via + * @param aDrill drill of the via + */ + void AddVia( bool aEnabled, int aDiameter, int aDrill ); + + /** + * Function SetLayer() + * + * Sets the current routing layer. + */ + void SetLayer ( int aLayer ); + + /** + * Function SetWidth() + * + * Sets the current track width. + */ + void SetWidth ( int aWidth ); + + /** + * Function Head() + * + * Returns the "head" of the line being placed, that is the volatile part + * that has not "settled" yet. + */ + const PNS_LINE& Head() const { return m_head; } + + /** + * Function Tail() + * + * Returns the "tail" of the line being placed, the part which has already wrapped around + * and shoved some obstacles. + */ + const PNS_LINE& Tail() const { return m_tail; } + + /** + * Function Trace() + * + * Returns the complete routed line. + */ + const PNS_LINE Trace() const; + + /** + * Function Traces() + * + * Returns the complete routed line, as a single-member PNS_ITEMSET. + */ + const PNS_ITEMSET Traces(); + + /** + * Function CurrentEnd() + * + * Returns the current end of the line being placed. It may not be equal + * to the cursor position due to collisions. + */ + const VECTOR2I& CurrentEnd() const + { + return m_currentEnd; + } + + /** + * Function CurrentNet() + * + * Returns the net code of currently routed track. + */ + int CurrentNet() const + { + return m_currentNet; + } + + /** + * Function CurrentLayer() + * + * Returns the layer of currently routed track. + */ + int CurrentLayer() const + { + return m_currentLayer; + } + + /** + * Function CurrentNode() + * + * Returns the most recent world state. + */ + PNS_NODE* CurrentNode(bool aLoopsRemoved = false) const; + + /** + * Function FlipPosture() + * + * Toggles the current posture (straight/diagonal) of the trace head. + */ + void FlipPosture(); + + /** + * Function UpdateSizes() + * + * Performs on-the-fly update of the width, via diameter & drill size from + * a settings class. Used to dynamically change these parameters as + * the track is routed. + */ + void UpdateSizes( const PNS_ROUTING_SETTINGS& aSettings ); + + +private: + /** + * Function route() * * Re-routes the current track to point aP. Returns true, when routing has * completed successfully (i.e. the trace end has reached point aP), and false @@ -70,55 +197,76 @@ public: * @param aP ending point of current route. * @return true, if the routing is complete. */ - bool Route( const VECTOR2I& aP ); - ///> Sets initial routing direction/posture - void SetInitialDirection( const DIRECTION_45& aDirection ); + bool route( const VECTOR2I& aP ); - void ApplySettings( const PNS_ROUTING_SETTINGS& aSettings ); + /** + * Function updateLeadingRatLine() + * + * Draws the "leading" ratsnest line, which connects the end of currently + * routed track and the nearest yet unrouted item. If the routing for + * current net is complete, draws nothing. + */ + void updateLeadingRatLine(); + + /** + * Function setWorld() + * + * Sets the board to route. + */ + void setWorld ( PNS_NODE *aWorld ); + + /** + * Function startPlacement() + * + * Initializes placement of a new line with given parameters. + */ + void startPlacement( const VECTOR2I& aStart, int aNet, int aWidth, int aLayer ); - ///> Returns the "head" of the line being placed, that is the volatile part - ///> that has not been settled yet - const PNS_LINE& GetHead() const { return m_head; } - ///> Returns the "tail" of the line being placed the part that has been - ///> fixed already (follow mouse mode only) - const PNS_LINE& GetTail() const { return m_tail; } + /** + * Function setInitialDirection() + * + * Sets preferred direction of the very first track segment to be laid. + * Used by posture switching mechanism. + */ + void setInitialDirection( const DIRECTION_45& aDirection ); - ///> Returns the whole routed line - const PNS_LINE GetTrace() const; + /** + * Function splitAdjacentSegments() + * + * Checks if point aP lies on segment aSeg. If so, splits the segment in two, + * forming a joint at aP and stores updated topology in node aNode. + */ + void splitAdjacentSegments( PNS_NODE* aNode, PNS_ITEM* aSeg, const VECTOR2I& aP ); - ///> Returns the current end of the line being placed. It may not be equal - ///> to the cursor position due to collisions. - const VECTOR2I& CurrentEnd() const - { - if( m_head.GetCLine().PointCount() > 0 ) - return m_head.GetCLine().CPoint( -1 ); - else if( m_tail.GetCLine().PointCount() > 0 ) - return m_tail.GetCLine().CPoint( -1 ); - else - return m_p_start; - } + /** + * Function removeLoops() + * + * Searches aNode for traces concurrent to aLatest and removes them. Updated + * topology is stored in aNode. + */ + void removeLoops( PNS_NODE* aNode, PNS_LINE* aLatest ); - ///> Returns all items in the world that have been affected by the routing - ///> operation. Used to update data structures of the host application - void GetUpdatedItems( PNS_NODE::ItemVector& aRemoved, - PNS_NODE::ItemVector& aAdded ); - - ///> Toggles the current posture (straight/diagonal) of the trace head. - void FlipPosture(); - - ///> Returns the most recent world state - PNS_NODE* GetCurrentNode() const; - -private: - static const double m_shoveLengthThreshold; + /** + * Function simplifyNewLine() + * + * Assembles a line starting from segment aLatest, removes collinear segments + * and redundant vertexes. If a simplification bhas been found, replaces the + * old line with the simplified one in aNode. + */ + void simplifyNewLine ( PNS_NODE *aNode, PNS_SEGMENT *aLatest ); + /** + * Function handleViaPlacement() + * + * Attempts to find a spot to place the via at the end of line aHead. + */ bool handleViaPlacement( PNS_LINE& aHead ); /** * Function checkObtusity() * - * Helper that checks if segments a and b form an obtuse angle + * Helper function, checking if segments a and b form an obtuse angle * (in 45-degree regime). * @return true, if angle (a, b) is obtuse */ @@ -163,8 +311,6 @@ private: */ bool reduceTail( const VECTOR2I& aEnd ); - void fixHeadPosture(); - /** * Function optimizeTailHeadTransition() * @@ -182,8 +328,7 @@ private: * around all colliding solid or non-movable items. Movable segments are * ignored, as they'll be handled later by the shove algorithm. */ - bool routeHead( const VECTOR2I& aP, PNS_LINE& aNewHead, - bool aCwWalkaround = true ); + bool routeHead( const VECTOR2I& aP, PNS_LINE& aNewHead); /** * Function routeStep() @@ -194,18 +339,15 @@ private: */ void routeStep( const VECTOR2I& aP ); - ///> routing mode (walkaround, shove, etc.) - PNS_MODE m_mode; + ///< route step, walkaround mode + bool rhWalkOnly ( const VECTOR2I& aP, PNS_LINE& aNewHead); - ///> follow mouse trail by attaching new segments to the head - ///> as the cursor moves - bool m_follow_mouse; + ///< route step, shove mode + bool rhShoveOnly ( const VECTOR2I& aP, PNS_LINE& aNewHead); - ///> mouse smoothing active - bool m_smooth_mouse; - - ///> mouse smoothing step (in world units) - int m_smoothing_step; + ///< route step, mark obstacles mode + bool rhMarkObstacles ( const VECTOR2I& aP, PNS_LINE& aNewHead ); + ///> current routing direction DIRECTION_45 m_direction; @@ -235,6 +377,9 @@ private: ///> Current world state PNS_NODE* m_currentNode; + ///> Postprocessed world state (including marked collisions & removed loops) + PNS_NODE* m_lastNode; + ///> Are we placing a via? bool m_placingVia; @@ -244,11 +389,17 @@ private: ///> current via drill int m_viaDrill; - ///> walkaround algorithm iteration limit - int m_walkaroundIterationLimit; + int m_currentWidth; + int m_currentNet; + int m_currentLayer; + + bool m_startsOnVia; + + VECTOR2I m_originalStart, m_currentEnd, m_currentStart; + PNS_LINE m_currentTrace; + + PNS_MODE m_currentMode; - ///> smart pads optimizer enabled. - bool m_smartPads; }; #endif // __PNS_LINE_PLACER_H diff --git a/pcbnew/router/pns_logger.cpp b/pcbnew/router/pns_logger.cpp new file mode 100644 index 0000000000..e20577b6b9 --- /dev/null +++ b/pcbnew/router/pns_logger.cpp @@ -0,0 +1,173 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013-2014 CERN + * Author: Tomasz Wlostowski + * + * 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 3 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, see . + */ + +#include "pns_logger.h" +#include "pns_item.h" +#include "pns_via.h" +#include "pns_line.h" +#include "pns_segment.h" +#include "pns_solid.h" + +#include +#include +#include +#include + +PNS_LOGGER::PNS_LOGGER( ) +{ + m_groupOpened = false; +} + + +PNS_LOGGER::~PNS_LOGGER() +{ + +} + +void PNS_LOGGER::Clear() +{ + m_theLog.str(std::string()); + m_groupOpened = false; +} + +void PNS_LOGGER::NewGroup ( const std::string& name, int iter) +{ + if(m_groupOpened) + m_theLog << "endgroup" << std::endl; + m_theLog << "group " << name << " " << iter << std::endl; + m_groupOpened = true; +} + +void PNS_LOGGER::EndGroup() +{ + if(!m_groupOpened) + return; + + m_groupOpened = false; + m_theLog << "endgroup" << std::endl; +} + +void PNS_LOGGER::Log ( const PNS_ITEM *item, int kind, const std::string name ) +{ + m_theLog << "item " << kind << " " << name << " "; + m_theLog << item->Net() << " " << item->Layers().Start() << " " << item->Layers().End() << " " << item->Marker() << " " << item->Rank(); + + switch(item->Kind()) + { + case PNS_ITEM::LINE: + { + PNS_LINE *l = (PNS_LINE *) item; + m_theLog << " line "; + m_theLog << l->Width() << " " << (l->EndsWithVia() ? 1 : 0) << " "; + dumpShape ( l->Shape() ); + m_theLog << std::endl; + break; + } + case PNS_ITEM::VIA: + { + m_theLog << " via 0 0 "; + dumpShape ( item->Shape() ); + m_theLog << std::endl; + break; + } + + case PNS_ITEM::SEGMENT: + { + PNS_SEGMENT *s =(PNS_SEGMENT *) item; + m_theLog << " line "; + m_theLog << s->Width() << " 0 linechain 2 0 " << s->Seg().A.x << " " <Seg().A.y << " " << s->Seg().B.x << " " <Seg().B.y << std::endl; + break; + } + + case PNS_ITEM::SOLID: + { + PNS_SOLID *s = (PNS_SOLID*) item; + m_theLog << " solid 0 0 "; + dumpShape ( s->Shape() ); + m_theLog << std::endl; + break; + } + + default: + break; + } +} + +void PNS_LOGGER::Log ( const SHAPE_LINE_CHAIN *l, int kind, const std::string name ) +{ + m_theLog << "item " << kind << " " << name << " "; + m_theLog << 0 << " " << 0 << " " << 0 << " " << 0 << " " << 0; + m_theLog << " line "; + m_theLog << 0 << " " << 0 << " "; + dumpShape ( l ); + m_theLog << std::endl; +} + +void PNS_LOGGER::Log ( const VECTOR2I& start, const VECTOR2I& end, int kind , const std::string name) +{ + +} + +void PNS_LOGGER::dumpShape ( const SHAPE * sh ) +{ + switch(sh->Type()) + { + case SH_LINE_CHAIN: + { + const SHAPE_LINE_CHAIN *lc = (const SHAPE_LINE_CHAIN *) sh; + m_theLog << "linechain " << lc->PointCount() << " " << (lc->IsClosed() ? 1 : 0) << " "; + for(int i = 0; i < lc->PointCount(); i++) + m_theLog << lc->CPoint(i).x << " " << lc->CPoint(i).y << " "; + break; + } + case SH_CIRCLE: + { + const SHAPE_CIRCLE *c = (const SHAPE_CIRCLE *) sh; + m_theLog << "circle " << c->GetCenter().x << " " << c->GetCenter().y << " " << c->GetRadius(); + break; + } + case SH_RECT: + { + const SHAPE_RECT *r = (const SHAPE_RECT *) sh; + m_theLog << "rect " << r->GetPosition().x << " " << r->GetPosition().y << " " << r->GetSize().x << " " <GetSize().y; + break; + } + case SH_SEGMENT: + { + const SHAPE_SEGMENT *s = (const SHAPE_SEGMENT *) sh; + m_theLog << "linechain 2 0 " << s->GetSeg().A.x << " " << s->GetSeg().A.y << " " << s->GetSeg().B.x << " " << s->GetSeg().B.y; + break; + } + default: + break; + } +} + +void PNS_LOGGER::Save ( const std::string& filename ) +{ + + EndGroup(); + + FILE *f=fopen(filename.c_str(),"wb"); + printf("Saving to '%s' [%p]\n", filename.c_str(), f); + const std::string s = m_theLog.str(); + fwrite(s.c_str(), 1, s.length(), f); + fclose(f); +} diff --git a/pcbnew/router/pns_logger.h b/pcbnew/router/pns_logger.h new file mode 100644 index 0000000000..cc112908ae --- /dev/null +++ b/pcbnew/router/pns_logger.h @@ -0,0 +1,58 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013-2014 CERN + * Author: Tomasz Wlostowski + * + * 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 3 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, see . + */ + +#ifndef __PNS_LOGGER_H +#define __PNS_LOGGER_H + +#include +#include +#include +#include + +#include + +class PNS_ITEM; +class SHAPE_LINE_CHAIN; +class SHAPE; + +class PNS_LOGGER { + +public: + PNS_LOGGER(); + ~PNS_LOGGER(); + + void Save ( const std::string& filename ); + + void Clear(); + void NewGroup ( const std::string& name, int iter = 0); + void EndGroup(); + void Log ( const PNS_ITEM *item, int kind = 0, const std::string name = std::string () ); + void Log ( const SHAPE_LINE_CHAIN *l, int kind = 0, const std::string name = std::string () ); + void Log ( const VECTOR2I& start, const VECTOR2I& end, int kind = 0, const std::string name = std::string () ); + +private: + + void dumpShape ( const SHAPE* sh ); + + bool m_groupOpened; + std::stringstream m_theLog; +}; + +#endif diff --git a/pcbnew/router/pns_node.cpp b/pcbnew/router/pns_node.cpp index 825be77e57..4413289dfb 100644 --- a/pcbnew/router/pns_node.cpp +++ b/pcbnew/router/pns_node.cpp @@ -1,7 +1,7 @@ /* * KiRouter - a push-and-(sometimes-)shove PCB router * - * Copyright (C) 2013 CERN + * Copyright (C) 2013-2014 CERN * Author: Tomasz Wlostowski * * This program is free software: you can redistribute it and/or modify it @@ -15,7 +15,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with this program. If not, see . + * with this program. If not, see . */ #include @@ -36,31 +36,40 @@ #include "pns_solid.h" #include "pns_joint.h" #include "pns_index.h" +#include "pns_router.h" using boost::unordered_set; using boost::unordered_map; +#ifdef DEBUG static boost::unordered_set allocNodes; +#endif PNS_NODE::PNS_NODE() { - // printf("MakeNode [%p, total = %d]\n", this, allocNodes.size()); + TRACE( 0, "PNS_NODE::create %p", this ); + m_depth = 0; m_root = this; m_parent = NULL; m_maxClearance = 800000; // fixme: depends on how thick traces are. m_index = new PNS_INDEX; +#ifdef DEBUG allocNodes.insert( this ); +#endif } - PNS_NODE::~PNS_NODE() { + TRACE( 0, "PNS_NODE::delete %p", this ); + if( !m_children.empty() ) { TRACEn( 0, "attempting to free a node that has kids.\n" ); assert( false ); } +#ifdef DEBUG + if( allocNodes.find( this ) == allocNodes.end() ) { TRACEn( 0, "attempting to free an already-free'd node.\n" ); @@ -69,6 +78,8 @@ PNS_NODE::~PNS_NODE() allocNodes.erase( this ); +#endif + for( PNS_INDEX::ItemSet::iterator i = m_index->begin(); i != m_index->end(); ++i ) if( (*i)->BelongsTo( this ) ) @@ -81,30 +92,19 @@ PNS_NODE::~PNS_NODE() int PNS_NODE::GetClearance( const PNS_ITEM* a, const PNS_ITEM* b ) const { - int clearance = (*m_clearanceFunctor)( a, b ); - - if( a->OfKind( PNS_ITEM::SEGMENT ) ) - clearance += static_cast(a)->GetWidth() / 2; - - if( a->OfKind( PNS_ITEM::LINE ) ) - clearance += static_cast(a)->GetWidth() / 2; - - if( b->OfKind( PNS_ITEM::SEGMENT ) ) - clearance += static_cast(b)->GetWidth() / 2; - - if( b->OfKind( PNS_ITEM::LINE ) ) - clearance += static_cast(b)->GetWidth() / 2; - - return clearance; + return (*m_clearanceFunctor)( a, b ); } - PNS_NODE* PNS_NODE::Branch() { PNS_NODE* child = new PNS_NODE; + TRACE( 0, "PNS_NODE::branch %p (parent %p)", child % this ); + + m_children.push_back( child ); + child->m_depth = m_depth + 1; child->m_parent = this; child->m_clearanceFunctor = m_clearanceFunctor; child->m_root = isRoot() ? this : m_root; @@ -173,14 +173,21 @@ struct PNS_NODE::obstacleVisitor ///> number of items found so far int m_matchCount; + ///> additional clearance + int m_extraClearance; + obstacleVisitor( PNS_NODE::Obstacles& aTab, const PNS_ITEM* aItem, int aKindMask ) : m_tab( aTab ), m_item( aItem ), m_kindMask( aKindMask ), m_limitCount( -1 ), - m_matchCount( 0 ) - {}; + m_matchCount( 0 ), + m_extraClearance( 0 ) + { + if(aItem->Kind() == PNS_ITEM::LINE) + m_extraClearance += static_cast(aItem)->Width() / 2; + }; void SetCountLimit( int aLimit ) { @@ -203,7 +210,10 @@ struct PNS_NODE::obstacleVisitor if( m_override && m_override->overrides( aItem ) ) return true; - int clearance = m_node->GetClearance( aItem, m_item ); + int clearance = m_extraClearance + m_node->GetClearance( aItem, m_item ); + + if(aItem->Kind() == PNS_ITEM::LINE) + clearance += static_cast(aItem)->Width() / 2; if( !aItem->Collide( m_item, clearance ) ) return true; @@ -228,12 +238,14 @@ int PNS_NODE::QueryColliding( const PNS_ITEM* aItem, { obstacleVisitor visitor( aObstacles, aItem, aKindMask ); +#ifdef DEBUG assert( allocNodes.find( this ) != allocNodes.end() ); +#endif visitor.SetCountLimit( aLimitCount ); visitor.SetWorld( this, NULL ); - // first, look for colliding items ourselves + // first, look for colliding items in the local index m_index->Query( aItem, m_maxClearance, visitor ); // if we haven't found enough items, look in the root branch as well. @@ -252,7 +264,7 @@ PNS_NODE::OptObstacle PNS_NODE::NearestObstacle( const PNS_LINE* aItem, int aKin Obstacles obs_list; bool found_isects = false; - const SHAPE_LINE_CHAIN& line = aItem->GetCLine(); + const SHAPE_LINE_CHAIN& line = aItem->CLine(); obs_list.reserve( 100 ); @@ -265,7 +277,7 @@ PNS_NODE::OptObstacle PNS_NODE::NearestObstacle( const PNS_LINE* aItem, int aKin } if( aItem->EndsWithVia() ) - n += QueryColliding( &aItem->GetVia(), obs_list, aKindMask ); + n += QueryColliding( &aItem->Via(), obs_list, aKindMask ); // if(! QueryColliding ( aItem, obs_list, aKindMask )) if( !n ) @@ -286,20 +298,20 @@ PNS_NODE::OptObstacle PNS_NODE::NearestObstacle( const PNS_LINE* aItem, int aKin int clearance = GetClearance( obs.item, &aLine ); - SHAPE_LINE_CHAIN hull = obs.item->Hull( clearance ); + SHAPE_LINE_CHAIN hull = obs.item->Hull( clearance, aItem->Width() ); if( aLine.EndsWithVia() ) { - int clearance = GetClearance( obs.item, &aLine.GetVia() ); + int clearance = GetClearance( obs.item, &aLine.Via() ); - SHAPE_LINE_CHAIN viaHull = aLine.GetVia().Hull( clearance ); + SHAPE_LINE_CHAIN viaHull = aLine.Via().Hull( clearance, aItem->Width() ); viaHull.Intersect( hull, isect_list ); BOOST_FOREACH( SHAPE_LINE_CHAIN::INTERSECTION isect, isect_list ) { - int dist = aLine.GetCLine().Length() + - ( isect.p - aLine.GetVia().GetPos() ).EuclideanNorm(); + int dist = aLine.CLine().Length() + + ( isect.p - aLine.Via().Pos() ).EuclideanNorm(); if( dist < nearest.dist_first ) { @@ -320,11 +332,11 @@ PNS_NODE::OptObstacle PNS_NODE::NearestObstacle( const PNS_LINE* aItem, int aKin isect_list.clear(); - hull.Intersect( aLine.GetCLine(), isect_list ); + hull.Intersect( aLine.CLine(), isect_list ); BOOST_FOREACH( SHAPE_LINE_CHAIN::INTERSECTION isect, isect_list ) { - int dist = aLine.GetCLine().PathLength( isect.p ); + int dist = aLine.CLine().PathLength( isect.p ); if( dist < nearest.dist_first ) { @@ -346,9 +358,22 @@ PNS_NODE::OptObstacle PNS_NODE::NearestObstacle( const PNS_LINE* aItem, int aKin nearest.dist_last = dist_max; } - return found_isects ? nearest : OptObstacle(); + if(!found_isects) + nearest.item = obs_list[0].item; + + return nearest; } +PNS_NODE::OptObstacle PNS_NODE::CheckColliding( const PNS_ITEMSET& aSet, int aKindMask ) +{ + BOOST_FOREACH( const PNS_ITEM *item, aSet.CItems() ) + { + OptObstacle obs = CheckColliding(item, aKindMask); + if(obs) + return obs; + } + return OptObstacle(); +} PNS_NODE::OptObstacle PNS_NODE::CheckColliding( const PNS_ITEM* aItemA, int aKindMask ) { @@ -356,11 +381,11 @@ PNS_NODE::OptObstacle PNS_NODE::CheckColliding( const PNS_ITEM* aItemA, int aKin obs.reserve( 100 ); - if( aItemA->GetKind() == PNS_ITEM::LINE ) + if( aItemA->Kind() == PNS_ITEM::LINE ) { int n = 0; const PNS_LINE* line = static_cast(aItemA); - const SHAPE_LINE_CHAIN& l = line->GetCLine(); + const SHAPE_LINE_CHAIN& l = line->CLine(); for( int i = 0; i < l.SegmentCount(); i++ ) { @@ -373,7 +398,7 @@ PNS_NODE::OptObstacle PNS_NODE::CheckColliding( const PNS_ITEM* aItemA, int aKin if( line->EndsWithVia() ) { - n += QueryColliding( &line->GetVia(), obs, aKindMask, 1 ); + n += QueryColliding( &line->Via(), obs, aKindMask, 1 ); if( n ) return OptObstacle( obs[0] ); @@ -388,12 +413,16 @@ PNS_NODE::OptObstacle PNS_NODE::CheckColliding( const PNS_ITEM* aItemA, int aKin bool PNS_NODE::CheckColliding( const PNS_ITEM* aItemA, const PNS_ITEM* aItemB, int aKindMask ) { - Obstacles dummy; - assert( aItemB ); - // return QueryColliding(aItemA, dummy, aKindMask, 1) > 0; + int clearance = GetClearance( aItemA, aItemB ); - return aItemA->Collide( aItemB, GetClearance( aItemA, aItemB ) ); + // fixme: refactor + if(aItemA->Kind() == PNS_ITEM::LINE) + clearance += static_cast(aItemA)->Width() / 2; + if(aItemB->Kind() == PNS_ITEM::LINE) + clearance += static_cast(aItemB)->Width() / 2; + + return aItemA->Collide( aItemB, clearance ); } @@ -412,10 +441,7 @@ struct hitVisitor int cl = 0; - if( aItem->GetKind() == PNS_ITEM::SEGMENT ) - cl += static_cast(aItem)->GetWidth() / 2; - - if( aItem->GetShape()->Collide( &cp, cl ) ) + if( aItem->Shape()->Collide( &cp, cl ) ) m_items.Add( aItem ); return true; @@ -426,6 +452,7 @@ struct hitVisitor const PNS_ITEMSET PNS_NODE::HitTest( const VECTOR2I& aPoint ) const { PNS_ITEMSET items; + // fixme: we treat a point as an infinitely small circle - this is inefficient. SHAPE_CIRCLE s( aPoint, 0 ); hitVisitor visitor( items, aPoint, this ); @@ -451,21 +478,21 @@ const PNS_ITEMSET PNS_NODE::HitTest( const VECTOR2I& aPoint ) const void PNS_NODE::addSolid( PNS_SOLID* aSolid ) { - linkJoint( aSolid->GetCenter(), aSolid->GetLayers(), aSolid->GetNet(), aSolid ); + linkJoint( aSolid->Pos(), aSolid->Layers(), aSolid->Net(), aSolid ); m_index->Add( aSolid ); } void PNS_NODE::addVia( PNS_VIA* aVia ) { - linkJoint( aVia->GetPos(), aVia->GetLayers(), aVia->GetNet(), aVia ); + linkJoint( aVia->Pos(), aVia->Layers(), aVia->Net(), aVia ); m_index->Add( aVia ); } -void PNS_NODE::addLine( PNS_LINE* aLine ) +void PNS_NODE::addLine( PNS_LINE* aLine, bool aAllowRedundant ) { - const SHAPE_LINE_CHAIN& l = aLine->GetLine(); + SHAPE_LINE_CHAIN& l = aLine->Line(); for( int i = 0; i < l.SegmentCount(); i++ ) { @@ -474,53 +501,65 @@ void PNS_NODE::addLine( PNS_LINE* aLine ) if( s.A != s.B ) { PNS_SEGMENT* pseg = new PNS_SEGMENT( *aLine, s ); + PNS_SEGMENT* psegR = NULL; - pseg->SetOwner( this ); + if ( !aAllowRedundant ) + psegR = findRedundantSegment( pseg ); - linkJoint( s.A, pseg->GetLayers(), aLine->GetNet(), pseg ); - linkJoint( s.B, pseg->GetLayers(), aLine->GetNet(), pseg ); + if(psegR) + aLine->LinkSegment(psegR); + else { + + pseg->SetOwner( this ); - aLine->LinkSegment( pseg ); + linkJoint( s.A, pseg->Layers(), aLine->Net(), pseg ); + linkJoint( s.B, pseg->Layers(), aLine->Net(), pseg ); - m_index->Add( pseg ); - } + aLine->LinkSegment( pseg ); + + m_index->Add( pseg ); + } + } } } -void PNS_NODE::addSegment( PNS_SEGMENT* aSeg ) +void PNS_NODE::addSegment( PNS_SEGMENT* aSeg, bool aAllowRedundant ) { - if( aSeg->GetSeg().A == aSeg->GetSeg().B ) + if( aSeg->Seg().A == aSeg->Seg().B ) { TRACEn( 0, "attempting to add a segment with same end coordinates, ignoring." ) return; } + if ( !aAllowRedundant && findRedundantSegment ( aSeg ) ) + return; + aSeg->SetOwner( this ); - linkJoint( aSeg->GetSeg().A, aSeg->GetLayers(), aSeg->GetNet(), aSeg ); - linkJoint( aSeg->GetSeg().B, aSeg->GetLayers(), aSeg->GetNet(), aSeg ); + linkJoint( aSeg->Seg().A, aSeg->Layers(), aSeg->Net(), aSeg ); + linkJoint( aSeg->Seg().B, aSeg->Layers(), aSeg->Net(), aSeg ); m_index->Add( aSeg ); } -void PNS_NODE::Add( PNS_ITEM* aItem ) +void PNS_NODE::Add( PNS_ITEM* aItem, bool aAllowRedundant ) { aItem->SetOwner( this ); - switch( aItem->GetKind() ) + switch( aItem->Kind() ) { case PNS_ITEM::SOLID: addSolid( static_cast( aItem ) ); break; case PNS_ITEM::SEGMENT: - addSegment( static_cast( aItem ) ); + addSegment( static_cast( aItem ), aAllowRedundant ); break; case PNS_ITEM::LINE: - addLine( static_cast (aItem) ); + addLine( static_cast (aItem), aAllowRedundant ); break; case PNS_ITEM::VIA: @@ -535,6 +574,9 @@ void PNS_NODE::Add( PNS_ITEM* aItem ) void PNS_NODE::doRemove( PNS_ITEM* aItem ) { + + // assert(m_root->m_index->Contains(aItem) || m_index->Contains(aItem)); + // case 1: removing an item that is stored in the root node from any branch: // mark it as overridden, but do not remove if( aItem->BelongsTo( m_root ) && !isRoot() ) @@ -553,8 +595,8 @@ void PNS_NODE::doRemove( PNS_ITEM* aItem ) void PNS_NODE::removeSegment( PNS_SEGMENT* aSeg ) { - unlinkJoint( aSeg->GetSeg().A, aSeg->GetLayers(), aSeg->GetNet(), aSeg ); - unlinkJoint( aSeg->GetSeg().B, aSeg->GetLayers(), aSeg->GetNet(), aSeg ); + unlinkJoint( aSeg->Seg().A, aSeg->Layers(), aSeg->Net(), aSeg ); + unlinkJoint( aSeg->Seg().B, aSeg->Layers(), aSeg->Net(), aSeg ); doRemove( aSeg ); } @@ -562,12 +604,18 @@ void PNS_NODE::removeSegment( PNS_SEGMENT* aSeg ) void PNS_NODE::removeLine( PNS_LINE* aLine ) { - std::vector* segRefs = aLine->GetLinkedSegments(); + std::vector* segRefs = aLine->LinkedSegments(); - if( !segRefs ) + if(! aLine->SegmentCount() ) return; - assert( aLine->GetOwner() ); + assert (segRefs != NULL); + assert (aLine->Owner()); + + if ( (int)segRefs->size() != aLine->SegmentCount()) + { + //printf("******weird deletion: segrefs %d segcount %d hasloops %d\n", segRefs->size(), aLine->SegmentCount(), aLine->HasLoops()); + } BOOST_FOREACH( PNS_SEGMENT* seg, *segRefs ) { @@ -575,17 +623,60 @@ void PNS_NODE::removeLine( PNS_LINE* aLine ) } aLine->SetOwner( NULL ); + aLine->ClearSegmentLinks(); } + void PNS_NODE::removeVia( PNS_VIA* aVia ) { - unlinkJoint( aVia->GetPos(), aVia->GetLayers(), aVia->GetNet(), aVia ); + // We have to split a single joint (associated with a via, binding together multiple layers) + // into multiple independent joints. As I'm a lazy bastard, I simply delete the via and all its links and re-insert them. - doRemove( aVia ); + PNS_JOINT::HashTag tag; + + VECTOR2I p ( aVia->Pos() ); + PNS_LAYERSET vLayers ( aVia->Layers() ); + int net = aVia->Net(); + + PNS_JOINT *jt = FindJoint( p, vLayers.Start(), net ); + PNS_JOINT::LinkedItems links ( jt->LinkList() ); + + tag.net = net; + tag.pos = p; + + bool split; + do + { + split = false; + std::pair range = m_joints.equal_range( tag ); + + if( range.first == m_joints.end() ) + break; + + // find and remove all joints containing the via to be removed + + for( JointMap::iterator f = range.first; f != range.second; ++f ) + { + if( aVia->LayersOverlap ( &f->second ) ) + { + m_joints.erase( f ); + split = true; + break; + } + } + } while (split); + + // and re-link them, using the former via's link list + BOOST_FOREACH(PNS_ITEM *item, links) + { + if( item != aVia ) + linkJoint ( p, item->Layers(), net, item ); + } + + doRemove( aVia ); } - void PNS_NODE::Replace( PNS_ITEM* aOldItem, PNS_ITEM* aNewItem ) { Remove( aOldItem ); @@ -595,10 +686,11 @@ void PNS_NODE::Replace( PNS_ITEM* aOldItem, PNS_ITEM* aNewItem ) void PNS_NODE::Remove( PNS_ITEM* aItem ) { - switch( aItem->GetKind() ) + switch( aItem->Kind() ) { case PNS_ITEM::SOLID: - assert( false ); + // fixme: this fucks up the joints, but it's only used for marking colliding obstacles for the moment, so we don't care. + doRemove ( aItem ); break; case PNS_ITEM::SEGMENT: @@ -627,13 +719,13 @@ void PNS_NODE::followLine( PNS_SEGMENT* current, bool scanDirection, int& pos, for( ; ; ) { const VECTOR2I p = - (scanDirection ^ prevReversed) ? current->GetSeg().B : current->GetSeg().A; - const OptJoint jt = FindJoint( p, current->GetLayer(), current->GetNet() ); + (scanDirection ^ prevReversed) ? current->Seg().B : current->Seg().A; + const PNS_JOINT *jt = FindJoint( p, current ); assert( jt ); assert( pos > 0 && pos < limit ); - corners[pos] = jt->GetPos(); + corners[pos] = jt->Pos(); segments[pos] = current; pos += (scanDirection ? 1 : -1); @@ -642,13 +734,14 @@ void PNS_NODE::followLine( PNS_SEGMENT* current, bool scanDirection, int& pos, break; current = jt->NextSegment( current ); + prevReversed = - ( jt->GetPos() == (scanDirection ? current->GetSeg().B : current->GetSeg().A ) ); + ( jt->Pos() == (scanDirection ? current->Seg().B : current->Seg().A ) ); } } -PNS_LINE* PNS_NODE::AssembleLine( PNS_SEGMENT* aSeg, const OptJoint& a, const OptJoint& b ) +PNS_LINE* PNS_NODE::AssembleLine( PNS_SEGMENT* aSeg, int *aOriginSegmentIndex) { const int MaxVerts = 1024; @@ -658,61 +751,151 @@ PNS_LINE* PNS_NODE::AssembleLine( PNS_SEGMENT* aSeg, const OptJoint& a, const Op PNS_LINE* pl = new PNS_LINE; int i_start = MaxVerts / 2, i_end = i_start + 1; - pl->SetWidth( aSeg->GetWidth() ); - pl->SetLayers( aSeg->GetLayers() ); - pl->SetNet( aSeg->GetNet() ); + pl->SetWidth( aSeg->Width() ); + pl->SetLayers( aSeg->Layers() ); + pl->SetNet( aSeg->Net() ); pl->SetOwner( this ); - // pl->LinkSegment(aSeg); - followLine( aSeg, false, i_start, MaxVerts, corners, segs ); followLine( aSeg, true, i_end, MaxVerts, corners, segs ); + int n = 0; - int clip_start = -1, clip_end = -1; + PNS_SEGMENT *prev_seg = NULL; for( int i = i_start + 1; i < i_end; i++ ) { const VECTOR2I& p = corners[i]; - if( a && ( p == a->GetPos() || p == b->GetPos() ) ) + pl->Line().Append( p ); + + if( prev_seg != segs[i] ) { - clip_start = std::min( clip_start, i ); - clip_end = std::max( clip_end, i ); + pl->LinkSegment( segs[i] ); + + if(segs[i] == aSeg && aOriginSegmentIndex) + *aOriginSegmentIndex = n; + n++; } - pl->GetLine().Append( p ); - - if( segs[i - 1] != segs[i] ) - pl->LinkSegment( segs[i] ); + prev_seg = segs[i]; } + + assert (pl->SegmentCount() != 0); + assert (pl->SegmentCount() == (int) pl->LinkedSegments()->size()); + return pl; } void PNS_NODE::FindLineEnds( PNS_LINE* aLine, PNS_JOINT& a, PNS_JOINT& b ) { - a = *FindJoint( aLine->GetCLine().CPoint( 0 ), aLine->GetLayers().Start(), aLine->GetNet() ); - b = *FindJoint( aLine->GetCLine().CPoint( -1 ), aLine->GetLayers().Start(), aLine->GetNet() ); + a = *FindJoint( aLine->CPoint( 0 ), aLine ); + b = *FindJoint( aLine->CPoint( -1 ), aLine ); } +void PNS_NODE::MapConnectivity ( PNS_JOINT* aStart, std::vector & aFoundJoints ) +{ + std::deque searchQueue; + std::set processed; + + searchQueue.push_back(aStart); + processed.insert ( aStart ); + + while(!searchQueue.empty()) + { + PNS_JOINT *current = searchQueue.front(); + searchQueue.pop_front(); + + BOOST_FOREACH ( PNS_ITEM *item, current->LinkList() ) + if ( item->OfKind( PNS_ITEM::SEGMENT ) ) + { + PNS_SEGMENT *seg = static_cast(item); + PNS_JOINT *a = FindJoint( seg->Seg().A, seg ); + PNS_JOINT *b = FindJoint( seg->Seg().B, seg ); + PNS_JOINT *next = (*a == *current) ? b : a; + + if( processed.find( next ) == processed.end() ) + { + processed.insert ( next ); + searchQueue.push_back( next ); + } + } + } + + BOOST_FOREACH(PNS_JOINT *jt, processed) + aFoundJoints.push_back( jt ); +} + +PNS_ITEM *PNS_NODE::NearestUnconnectedItem ( PNS_JOINT *aStart, int *aAnchor, int aKindMask ) +{ + std::set disconnected; + std::vector joints; + + AllItemsInNet( aStart->Net(), disconnected ); + MapConnectivity ( aStart, joints ); + + BOOST_FOREACH(PNS_JOINT *jt, joints) + { + BOOST_FOREACH (PNS_ITEM *link, jt->LinkList() ) + { + if(disconnected.find(link) != disconnected.end() ) + disconnected.erase(link); + } + } + + int best_dist = INT_MAX; + PNS_ITEM *best = NULL; + + BOOST_FOREACH (PNS_ITEM *item, disconnected ) + { + if( item->OfKind ( aKindMask ) ) + { + for(int i = 0; i < item->AnchorCount(); i++) + { + VECTOR2I p = item->Anchor ( i ); + int d = (p - aStart->Pos()).EuclideanNorm(); + + if(d < best_dist) + { + best_dist = d; + best = item; + if(aAnchor) + *aAnchor = i; + } + } + } + } + + return best; +} int PNS_NODE::FindLinesBetweenJoints( PNS_JOINT& a, PNS_JOINT& b, std::vector& aLines ) { - BOOST_FOREACH( PNS_ITEM* item, a.GetLinkList() ) + BOOST_FOREACH( PNS_ITEM* item, a.LinkList() ) { - if( item->GetKind() == PNS_ITEM::SEGMENT ) + if( item->Kind() == PNS_ITEM::SEGMENT ) { PNS_SEGMENT* seg = static_cast(item); PNS_LINE* line = AssembleLine( seg ); PNS_JOINT j_start, j_end; + FindLineEnds( line, j_start, j_end ); - if( (j_start == a && j_end == b )|| (j_end == a && j_start == b) ) + + int id_start = line->CLine().Find (a.Pos()); + int id_end = line->CLine().Find (b.Pos()); + + if(id_end < id_start) + std::swap(id_end, id_start); + + if(id_start >= 0 && id_end >= 0) + { + line->ClipVertexRange ( id_start, id_end ); aLines.push_back( line ); - else + } else delete line; } } @@ -721,7 +904,7 @@ int PNS_NODE::FindLinesBetweenJoints( PNS_JOINT& a, PNS_JOINT& b, std::vectorsecond.GetLayers().Overlaps( aLayer ) ) - return f->second; + if( f->second.Layers().Overlaps( aLayer ) ) + return &f->second; ++f; } - return OptJoint(); + return NULL; } @@ -787,7 +970,7 @@ PNS_JOINT& PNS_NODE::touchJoint( const VECTOR2I& aPos, const PNS_LAYERSET& aLaye for( f = range.first; f != range.second; ++f ) { - if( aLayers.Overlaps( f->second.GetLayers() ) ) + if( aLayers.Overlaps( f->second.Layers() ) ) { jt.Merge( f->second ); m_joints.erase( f ); @@ -949,7 +1132,11 @@ void PNS_NODE::Commit( PNS_NODE* aNode ) for( PNS_INDEX::ItemSet::iterator i = aNode->m_index->begin(); i != aNode->m_index->end(); ++i ) + { + (*i)->SetRank ( -1 ); + (*i)->Unmark (); Add( *i ); + } releaseChildren(); } @@ -957,29 +1144,81 @@ void PNS_NODE::Commit( PNS_NODE* aNode ) void PNS_NODE::KillChildren() { - assert( isRoot() ); - + assert ( isRoot() ); releaseChildren(); } -void PNS_NODE::AllItemsInNet( int aNet, std::list& aItems ) +void PNS_NODE::AllItemsInNet( int aNet, std::set& aItems ) { PNS_INDEX::NetItemsList* l_cur = m_index->GetItemsForNet( aNet ); - if( !l_cur ) - return; - - std::copy( aItems.begin(), l_cur->begin(), l_cur->end() ); + if(l_cur) + { + BOOST_FOREACH (PNS_ITEM *item, *l_cur ) + aItems.insert ( item ); + } + if( !isRoot() ) { PNS_INDEX::NetItemsList* l_root = m_root->m_index->GetItemsForNet( aNet ); - for( PNS_INDEX::NetItemsList::iterator i = l_root->begin(); i!= l_root->end(); ++i ) - if( !overrides( *i ) ) - aItems.push_back( *i ); - - + if(l_root) + for( PNS_INDEX::NetItemsList::iterator i = l_root->begin(); i!= l_root->end(); ++i ) + if( !overrides( *i ) ) + aItems.insert( *i ); } } + +void PNS_NODE::ClearRanks() +{ + for( PNS_INDEX::ItemSet::iterator i = m_index->begin(); i != m_index->end(); ++i ) + { + (*i)->SetRank(-1); + (*i)->Mark(0); + } +} + +int PNS_NODE::FindByMarker ( int aMarker, PNS_ITEMSET& aItems ) +{ + for( PNS_INDEX::ItemSet::iterator i = m_index->begin(); i != m_index->end(); ++i ) + if ( (*i)->Marker() & aMarker ) aItems.Add(*i); + return 0; +} + +int PNS_NODE::RemoveByMarker ( int aMarker ) +{ + for( PNS_INDEX::ItemSet::iterator i = m_index->begin(); i != m_index->end(); ++i ) + if ( (*i)->Marker() & aMarker ) + { + Remove (*i); + } + return 0; +} + +PNS_SEGMENT* PNS_NODE::findRedundantSegment ( PNS_SEGMENT *aSeg ) +{ + PNS_JOINT *jtStart = FindJoint ( aSeg->Seg().A, aSeg ); + + if(!jtStart) + return NULL; + + BOOST_FOREACH( PNS_ITEM *item, jtStart->LinkList() ) + if(item->OfKind(PNS_ITEM::SEGMENT)) + { + PNS_SEGMENT *seg2 = (PNS_SEGMENT *) item; + + const VECTOR2I a1 ( aSeg->Seg().A ); + const VECTOR2I b1 ( aSeg->Seg().B ); + + const VECTOR2I a2 ( seg2->Seg().A ); + const VECTOR2I b2 ( seg2->Seg().B ); + + if( seg2->Layers().Start() == aSeg->Layers().Start() && + ((a1 == a2 && b1 == b2) || (a1 == b2 && a2 == b1))) + return seg2; + } + + return NULL; +} diff --git a/pcbnew/router/pns_node.h b/pcbnew/router/pns_node.h index de3e886dc2..4242f8d614 100644 --- a/pcbnew/router/pns_node.h +++ b/pcbnew/router/pns_node.h @@ -1,7 +1,7 @@ /* * KiRouter - a push-and-(sometimes-)shove PCB router * - * Copyright (C) 2013 CERN + * Copyright (C) 2013-2014 CERN * Author: Tomasz Wlostowski * * This program is free software: you can redistribute it and/or modify it @@ -15,8 +15,9 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with this program. If not, see . + * with this program. If not, see . */ + #ifndef __PNS_NODE_H #define __PNS_NODE_H @@ -26,7 +27,6 @@ #include #include #include -#include #include #include @@ -43,8 +43,12 @@ class PNS_VIA; class PNS_RATSNEST; class PNS_INDEX; -using boost::shared_ptr; +/** + * Class PNS_CLEARANCE_FUNC + * + * An abstract function object, returning a required clearance between two items. + **/ class PNS_CLEARANCE_FUNC { public: @@ -84,7 +88,7 @@ struct PNS_OBSTACLE * hierarchical and indexed way. * Features: * - spatial-indexed container for PCB item shapes - * - collision search (with clearance checking) + * - collision search & clearance checking * - assembly of lines connecting joints, finding loops and unique paths * - lightweight cloning/branching (for recursive optimization and shove * springback) @@ -96,101 +100,236 @@ public: typedef boost::optional OptObstacle; typedef std::vector ItemVector; typedef std::vector Obstacles; - typedef boost::optional OptJoint; - - PNS_NODE(); - ~PNS_NODE(); + + PNS_NODE (); + ~PNS_NODE (); ///> Returns the expected clearance between items a and b. - int GetClearance( const PNS_ITEM* a, const PNS_ITEM* b ) const; + int GetClearance ( const PNS_ITEM* a, const PNS_ITEM* b ) const; ///> Returns the pre-set worst case clearance between any pair of items - int GetMaxClearance() const + int GetMaxClearance () const { return m_maxClearance; } - void SetMaxClearance( int aClearance ) + ///> Sets the worst-case clerance between any pair of items + void SetMaxClearance ( int aClearance ) { m_maxClearance = aClearance; } - void SetClearanceFunctor( PNS_CLEARANCE_FUNC* aFunc ) + ///> Assigns a clerance resolution function object + void SetClearanceFunctor ( PNS_CLEARANCE_FUNC* aFunc ) { m_clearanceFunctor = aFunc; } - ///> Finds items that collide with aItem and stores collision information - ///> in aObstacles. - int QueryColliding( const PNS_ITEM* aItem, - Obstacles& aObstacles, - int aKindMask = PNS_ITEM::ANY, - int aLimitCount = -1 ); - - ///> Finds the nearest item that collides with aItem. - OptObstacle NearestObstacle( const PNS_LINE* aItem, int aKindMask = PNS_ITEM::ANY ); - - ///> Checks if the item collides with anything else in the world, - ///> and returns it if so. - OptObstacle CheckColliding( const PNS_ITEM* aItem, int aKindMask = PNS_ITEM::ANY ); - - ///> Checks if two items collide [deprecated]. - bool CheckColliding( const PNS_ITEM* aItemA, - const PNS_ITEM* aItemB, - int aKindMask = PNS_ITEM::ANY ); - - ///> Hit detection - const PNS_ITEMSET HitTest( const VECTOR2I& aPoint ) const; - - void Add( PNS_ITEM* aItem ); - void Remove( PNS_ITEM* aItem ); - void Replace( PNS_ITEM* aOldItem, PNS_ITEM* aNewItem ); - - ///> Creates a lightweight copy ("branch") of self. Note that if there are - ///> any branches in use, their parents must NOT be deleted. - PNS_NODE* Branch(); - - ///> Assembles a line connecting two non-trivial joints the - ///> segment aSeg belongs to. - PNS_LINE* AssembleLine( PNS_SEGMENT* aSeg, - const OptJoint& a = OptJoint(), const OptJoint& b = OptJoint() ); - - ///> Dumps the contents and joints structure - void Dump( bool aLong = false ); - ///> Returns the number of joints int JointCount() const { return m_joints.size(); } - ///> Returns the lists of items removed and added in this branch, with - ///> respect to the root. + ///> Returns the number of nodes in the inheritance chain (wrs to the root node) + int Depth() const + { + return m_depth; + } + + /** + * Function QueryColliding() + * + * Finds items collliding (closer than clearance) with the item aItem. + * @param aItem item to check collisions against + * @param aObstacles set of colliding objects found + * @param aKindMask mask of obstacle types to take into account + * @param aLimitCount stop looking for collisions after finding this number of colliding items + * @return number of obstacles found + */ + int QueryColliding ( const PNS_ITEM* aItem, + Obstacles& aObstacles, + int aKindMask = PNS_ITEM::ANY, + int aLimitCount = -1 ); + + + /** + * Function NearestObstacle() + * + * Follows the line in search of an obstacle that is nearest to the starting to the line's starting + * point. + * @param aItem the item to find collisions with + * @param aKindMask mask of obstacle types to take into account + * @return the obstacle, if found, otherwise empty. + */ + OptObstacle NearestObstacle ( const PNS_LINE* aItem, + int aKindMask = PNS_ITEM::ANY ); + + /** + * Function CheckColliding() + * + * Checks if the item collides with anything else in the world, + * and if found, returns the obstacle. + * @param aItem the item to find collisions with + * @param aKindMask mask of obstacle types to take into account + * @return the obstacle, if found, otherwise empty. + */ + OptObstacle CheckColliding ( const PNS_ITEM* aItem, + int aKindMask = PNS_ITEM::ANY ); + + + /** + * Function CheckColliding() + * + * Checks if any item in the set collides with anything else in the world, + * and if found, returns the obstacle. + * @param aSet set of items to find collisions with + * @param aKindMask mask of obstacle types to take into account + * @return the obstacle, if found, otherwise empty. + */ + OptObstacle CheckColliding ( const PNS_ITEMSET& aSet, + int aKindMask = PNS_ITEM::ANY ); + + + /** + * Function CheckColliding() + * + * Checks if any item in the set collides with anything else in the world, + * and if found, returns the obstacle. + * @param aSet set of items to find collisions with + * @param aKindMask mask of obstacle types to take into account + * @return the obstacle, if found, otherwise empty. + */ + bool CheckColliding ( const PNS_ITEM* aItemA, + const PNS_ITEM* aItemB, + int aKindMask = PNS_ITEM::ANY ); + + /** + * Function HitTest() + * + * Finds all items that contain the point aPoint. + * @param aPoint the point + * @return the items + */ + const PNS_ITEMSET HitTest ( const VECTOR2I& aPoint ) const; + + /** + * Function Add() + * + * Adds an item to the current node. + * @param aItem item to add + * @param aAllowRedundant if true, duplicate items are allowed (e.g. a segment or via + * at the same coordinates as an existing one) + */ + void Add ( PNS_ITEM* aItem, bool aAllowRedundant = false ); + + /** + * Function Remove() + * + * Just as the name says, removes an item from this branch. + * @param aItem item to remove + */ + void Remove ( PNS_ITEM* aItem ); + + /** + * Function Replace() + * + * Just as the name says, replaces an item with another one. + * @param aOldItem item to be removed + * @param aNewItem item add instead + */ + void Replace ( PNS_ITEM* aOldItem, PNS_ITEM* aNewItem ); + + /** + * Function Branch() + * + * Creates a lightweight copy (called branch) of self that tracks + * the changes (added/removed items) wrs to the root. Note that if there are + * any branches in use, their parents must NOT be deleted. + * @return the new branch + */ + PNS_NODE* Branch ( ); + + /** + * Function AssembleLine() + * + * Follows the joint map to assemble a line connecting two non-trivial + * joints starting from segment aSeg. + * @param aSeg the initial segment + * @param aOriginSegmentIndex index of aSeg in the resulting line + * @return the line + */ + + PNS_LINE* AssembleLine ( PNS_SEGMENT* aSeg, + int *aOriginSegmentIndex = NULL ); + + ///> Prints the contents and joints structure + void Dump ( bool aLong = false ); + + + + /** + * Function GetUpdatedItems() + * + * Returns the lists of items removed and added in this branch, with + * respect to the root branch. + * @param aRemoved removed items + * @param aAdded added items + */ void GetUpdatedItems( ItemVector& aRemoved, ItemVector& aAdded ); - ///> Copies the changes from a given branch (aNode) to the root. Called on - ///> a non-root branch will fail. + + /** + * Function Commit() + * + * Applies the changes from a given branch (aNode) to the root branch. Called on + * a non-root branch will fail. Calling commit also kills all children nodes of the root branch. + * @param aNode node to commit changes from + */ void Commit( PNS_NODE* aNode ); - ///> finds a joint at a given position, layer and nets - const OptJoint FindJoint( const VECTOR2I& aPos, int aLayer, int aNet ); + /** + * Function FindJoint() + * + * Searches for a joint at a given position, layer and belonging to given net. + * @return the joint, if found, otherwise empty + */ + PNS_JOINT* FindJoint( const VECTOR2I& aPos, int aLayer, int aNet ); - ///> finds all linest between a pair of joints. Used by the loop removal engine. - int FindLinesBetweenJoints( PNS_JOINT& a, PNS_JOINT& b, - std::vector& aLines ); + /** + * Function FindJoint() + * + * Searches for a joint at a given position, linked to given item. + * @return the joint, if found, otherwise empty + */ + PNS_JOINT* FindJoint( const VECTOR2I& aPos, PNS_ITEM *aItem ) + { + return FindJoint( aPos, aItem->Layers().Start(), aItem->Net() ); + } + + void MapConnectivity ( PNS_JOINT* aStart, std::vector & aFoundJoints ); + + PNS_ITEM *NearestUnconnectedItem ( PNS_JOINT *aStart, int *aAnchor = NULL, int aKindMask = PNS_ITEM::ANY); + + + ///> finds all lines between a pair of joints. Used by the loop removal procedure. + int FindLinesBetweenJoints( PNS_JOINT& a, + PNS_JOINT& b, + std::vector& aLines ); ///> finds the joints corresponding to the ends of line aLine void FindLineEnds( PNS_LINE* aLine, PNS_JOINT& a, PNS_JOINT& b ); - - ///> finds all joints that have an (in)direct connection(s) - ///> (i.e. segments/vias) with the joint aJoint. - void FindConnectedJoints( const PNS_JOINT& aJoint, - std::vector& aConnectedJoints ); - + ///> Destroys all child nodes. Applicable only to the root node. void KillChildren(); - void AllItemsInNet( int aNet, std::list& aItems ); + void AllItemsInNet( int aNet, std::set& aItems ); + + void ClearRanks(); + + + int FindByMarker ( int aMarker, PNS_ITEMSET& aItems ); + int RemoveByMarker ( int aMarker ); private: struct obstacleVisitor; @@ -198,12 +337,13 @@ private: typedef JointMap::value_type TagJointPair; /// nodes are not copyable - PNS_NODE( const PNS_NODE& b ); - PNS_NODE& operator=( const PNS_NODE& b ); + PNS_NODE ( const PNS_NODE& b ); + PNS_NODE& operator= ( const PNS_NODE& b ); ///> tries to find matching joint and creates a new one if not found - PNS_JOINT& touchJoint( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, - int aNet ); + PNS_JOINT& touchJoint( const VECTOR2I& aPos, + const PNS_LAYERSET& aLayers, + int aNet ); ///> touches a joint and links it to an item void linkJoint( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, @@ -215,8 +355,8 @@ private: ///> helpers for adding/removing items void addSolid( PNS_SOLID* aSeg ); - void addSegment( PNS_SEGMENT* aSeg ); - void addLine( PNS_LINE* aLine ); + void addSegment( PNS_SEGMENT* aSeg, bool aAllowRedundant ); + void addLine( PNS_LINE* aLine, bool aAllowRedundant ); void addVia( PNS_VIA* aVia ); void removeSolid( PNS_SOLID* aSeg ); void removeLine( PNS_LINE* aLine ); @@ -239,16 +379,15 @@ private: return m_override.find( aItem ) != m_override.end(); } - ///> scans the joint map, forming a line starting from segment (current). - void followLine( PNS_SEGMENT* current, - bool scanDirection, - int& pos, - int limit, - VECTOR2I* corners, - PNS_SEGMENT** segments ); + PNS_SEGMENT *findRedundantSegment ( PNS_SEGMENT *aSeg ); - ///> spatial index of all items - // SHAPE_INDEX_LIST m_items; + ///> scans the joint map, forming a line starting from segment (current). + void followLine ( PNS_SEGMENT* current, + bool scanDirection, + int& pos, + int limit, + VECTOR2I* corners, + PNS_SEGMENT** segments ); ///> hash table with the joints, linking the items. Joints are hashed by ///> their position, layer set and net. @@ -263,7 +402,7 @@ private: ///> list of nodes branched from this one std::vector m_children; - ///> hash of root's items that are more recent in this node + ///> hash of root's items that have been changed in this node boost::unordered_set m_override; ///> worst case item-item clearance @@ -275,8 +414,8 @@ private: ///> Geometric/Net index of the items PNS_INDEX* m_index; - ///> list of currently processed obstacles. - Obstacles m_obstacleList; + ///> depth of the node (number of parent nodes in the inheritance chain) + int m_depth; }; #endif diff --git a/pcbnew/router/pns_optimizer.cpp b/pcbnew/router/pns_optimizer.cpp index 48e84207e5..e6aab0e9a1 100644 --- a/pcbnew/router/pns_optimizer.cpp +++ b/pcbnew/router/pns_optimizer.cpp @@ -1,7 +1,7 @@ /* * KiRouter - a push-and-(sometimes-)shove PCB router * - * Copyright (C) 2013 CERN + * Copyright (C) 2013-2014 CERN * Author: Tomasz Wlostowski * * This program is free software: you can redistribute it and/or modify it @@ -15,7 +15,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with this program. If not, see . + * with this program. If not, see . */ #include @@ -27,12 +27,13 @@ #include "pns_node.h" #include "pns_optimizer.h" #include "pns_utils.h" +#include "pns_router.h" /** * * Cost Estimator Methods * - **/ + */ int PNS_COST_ESTIMATOR::CornerCost( const SEG& a, const SEG& b ) { @@ -74,29 +75,29 @@ int PNS_COST_ESTIMATOR::CornerCost( const SHAPE_LINE_CHAIN& aLine ) int PNS_COST_ESTIMATOR::CornerCost( const PNS_LINE& aLine ) { - return CornerCost( aLine.GetCLine() ); + return CornerCost( aLine.CLine() ); } void PNS_COST_ESTIMATOR::Add( PNS_LINE& aLine ) { - m_lengthCost += aLine.GetCLine().Length(); + m_lengthCost += aLine.CLine().Length(); m_cornerCost += CornerCost( aLine ); } void PNS_COST_ESTIMATOR::Remove( PNS_LINE& aLine ) { - m_lengthCost -= aLine.GetCLine().Length(); + m_lengthCost -= aLine.CLine().Length(); m_cornerCost -= CornerCost( aLine ); } void PNS_COST_ESTIMATOR::Replace( PNS_LINE& aOldLine, PNS_LINE& aNewLine ) { - m_lengthCost -= aOldLine.GetCLine().Length(); + m_lengthCost -= aOldLine.CLine().Length(); m_cornerCost -= CornerCost( aOldLine ); - m_lengthCost += aNewLine.GetCLine().Length(); + m_lengthCost += aNewLine.CLine().Length(); m_cornerCost += CornerCost( aNewLine ); } @@ -145,7 +146,7 @@ struct PNS_OPTIMIZER::CacheVisitor bool operator()( PNS_ITEM* aOtherItem ) { - if( !m_mask & aOtherItem->GetKind() ) + if( !m_mask & aOtherItem->Kind() ) return true; int clearance = m_node->GetClearance( aOtherItem, m_ourItem ); @@ -177,13 +178,13 @@ void PNS_OPTIMIZER::cacheAdd( PNS_ITEM* aItem, bool aIsStatic = false ) void PNS_OPTIMIZER::removeCachedSegments( PNS_LINE* aLine, int aStartVertex, int aEndVertex ) { - std::vector* segs = aLine->GetLinkedSegments(); + PNS_LINE::SegmentRefs* segs = aLine->LinkedSegments(); if( !segs ) return; if( aEndVertex < 0 ) - aEndVertex += aLine->GetCLine().PointCount(); + aEndVertex += aLine->PointCount(); for( int i = aStartVertex; i < aEndVertex - 1; i++ ) { @@ -196,7 +197,7 @@ void PNS_OPTIMIZER::removeCachedSegments( PNS_LINE* aLine, int aStartVertex, int void PNS_OPTIMIZER::CacheRemove( PNS_ITEM* aItem ) { - if( aItem->GetKind() == PNS_ITEM::LINE ) + if( aItem->Kind() == PNS_ITEM::LINE ) removeCachedSegments( static_cast (aItem) ); } @@ -234,7 +235,7 @@ bool PNS_OPTIMIZER::checkColliding( PNS_ITEM* aItem, bool aUpdateCache ) return m_world->CheckColliding( aItem ); // something is wrong with the cache, need to investigate. - m_cache.Query( aItem->GetShape(), m_world->GetMaxClearance(), v, false ); + m_cache.Query( aItem->Shape(), m_world->GetMaxClearance(), v, false ); if( !v.m_collidingItem ) { @@ -268,7 +269,7 @@ bool PNS_OPTIMIZER::checkColliding( PNS_LINE* aLine, const SHAPE_LINE_CHAIN& aOp bool PNS_OPTIMIZER::mergeObtuse( PNS_LINE* aLine ) { - SHAPE_LINE_CHAIN& line = aLine->GetLine(); + SHAPE_LINE_CHAIN& line = aLine->Line(); int step = line.PointCount() - 3; int iter = 0; @@ -360,7 +361,7 @@ bool PNS_OPTIMIZER::mergeObtuse( PNS_LINE* aLine ) bool PNS_OPTIMIZER::mergeFull( PNS_LINE* aLine ) { - SHAPE_LINE_CHAIN& line = aLine->GetLine(); + SHAPE_LINE_CHAIN& line = aLine->Line(); int step = line.SegmentCount() - 1; int segs_pre = line.SegmentCount(); @@ -395,7 +396,7 @@ bool PNS_OPTIMIZER::mergeFull( PNS_LINE* aLine ) } -bool PNS_OPTIMIZER::Optimize( PNS_LINE* aLine, PNS_LINE* aResult, int aStartVertex, int aEndVertex ) +bool PNS_OPTIMIZER::Optimize( PNS_LINE* aLine, PNS_LINE* aResult )//, int aStartVertex, int aEndVertex ) { if( !aResult ) aResult = aLine; @@ -415,6 +416,9 @@ bool PNS_OPTIMIZER::Optimize( PNS_LINE* aLine, PNS_LINE* aResult, int aStartVert if( m_effortLevel & SMART_PADS ) rv |= runSmartPads( aResult ); + if( m_effortLevel & FANOUT_CLEANUP ) + rv |= fanoutCleanup( aResult ); + return rv; } @@ -427,11 +431,11 @@ bool PNS_OPTIMIZER::mergeStep( PNS_LINE* aLine, SHAPE_LINE_CHAIN& aCurrentPath, int cost_orig = PNS_COST_ESTIMATOR::CornerCost( aCurrentPath ); - if( aLine->GetCLine().SegmentCount() < 4 ) + if( aLine->SegmentCount() < 4 ) return false; - DIRECTION_45 orig_start( aLine->GetCLine().CSegment( 0 ) ); - DIRECTION_45 orig_end( aLine->GetCLine().CSegment( -1 ) ); + DIRECTION_45 orig_start( aLine->CSegment( 0 ) ); + DIRECTION_45 orig_end( aLine->CSegment( -1 ) ); while( n < n_segs - step ) { @@ -559,23 +563,30 @@ PNS_OPTIMIZER::BreakoutList PNS_OPTIMIZER::rectBreakouts( int aWidth, PNS_OPTIMIZER::BreakoutList PNS_OPTIMIZER::computeBreakouts( int aWidth, const PNS_ITEM* aItem, bool aPermitDiagonal ) const { - switch( aItem->GetKind() ) + switch( aItem->Kind() ) { case PNS_ITEM::VIA: { const PNS_VIA* via = static_cast( aItem ); - return circleBreakouts( aWidth, via->GetShape(), aPermitDiagonal ); + return circleBreakouts( aWidth, via->Shape(), aPermitDiagonal ); } case PNS_ITEM::SOLID: { - const SHAPE* shape = aItem->GetShape(); + const SHAPE* shape = aItem->Shape(); switch( shape->Type() ) { case SH_RECT: return rectBreakouts( aWidth, shape, aPermitDiagonal ); + case SH_SEGMENT: + { + const SHAPE_SEGMENT *seg = static_cast (shape); + const SHAPE_RECT rect = ApproximateSegmentAsRect ( *seg ); + return rectBreakouts( aWidth, &rect, aPermitDiagonal ); + } + case SH_CIRCLE: return circleBreakouts( aWidth, shape, aPermitDiagonal ); @@ -594,14 +605,14 @@ PNS_OPTIMIZER::BreakoutList PNS_OPTIMIZER::computeBreakouts( int aWidth, PNS_ITEM* PNS_OPTIMIZER::findPadOrVia( int aLayer, int aNet, const VECTOR2I& aP ) const { - PNS_NODE::OptJoint jt = m_world->FindJoint( aP, aLayer, aNet ); + PNS_JOINT *jt = m_world->FindJoint( aP, aLayer, aNet ); if( !jt ) return NULL; - BOOST_FOREACH( PNS_ITEM* item, jt->GetLinkList() ) + BOOST_FOREACH( PNS_ITEM* item, jt->LinkList() ) { - if( item->GetKind() == PNS_ITEM::VIA || item->GetKind() == PNS_ITEM::SOLID ) + if( item->OfKind (PNS_ITEM::VIA | PNS_ITEM::SOLID ) ) return item; } @@ -621,19 +632,16 @@ int PNS_OPTIMIZER::smartPadsSingle( PNS_LINE* aLine, PNS_ITEM* aPad, bool aEnd, typedef std::pair RtVariant; std::vector variants; - BreakoutList breakouts = computeBreakouts( aLine->GetWidth(), aPad, true ); + BreakoutList breakouts = computeBreakouts( aLine->Width(), aPad, true ); - SHAPE_LINE_CHAIN line = ( aEnd ? aLine->GetCLine().Reverse() : aLine->GetCLine() ); + SHAPE_LINE_CHAIN line = ( aEnd ? aLine->CLine().Reverse() : aLine->CLine() ); - // bool startDiagonal = DIRECTION_45( line.CSegment(0) ).IsDiagonal(); int p_end = std::min( aEndVertex, std::min( 3, line.PointCount() - 1 ) ); for( int p = 1; p <= p_end; p++ ) { BOOST_FOREACH( SHAPE_LINE_CHAIN & l, breakouts ) { - // PNSDisplayDebugLine (l, 0); - for( int diag = 0; diag < 2; diag++ ) { @@ -642,11 +650,12 @@ int PNS_OPTIMIZER::smartPadsSingle( PNS_LINE* aLine, PNS_ITEM* aPad, bool aEnd, line.CPoint( p ), diag == 0 ); DIRECTION_45 dir_bkout( l.CSegment( -1 ) ); - // DIRECTION_45 dir_head ( line.CSegment(p + 1)); + if(!connect.SegmentCount()) + continue; + int ang1 = dir_bkout.Angle( DIRECTION_45( connect.CSegment( 0 ) ) ); int ang2 = 0; - // int ang2 = dir_head.Angle ( DIRECTION_45(connect.CSegment(-1) )); if( (ang1 | ang2) & ForbiddenAngles ) continue; @@ -662,7 +671,6 @@ int PNS_OPTIMIZER::smartPadsSingle( PNS_LINE* aLine, PNS_ITEM* aPad, bool aEnd, v.Append( line.CPoint( i ) ); PNS_LINE tmp( *aLine, v ); - // tmp.GetLine().Simplify(); int cc = tmp.CountCorners( ForbiddenAngles ); if( cc == 0 ) @@ -689,18 +697,12 @@ int PNS_OPTIMIZER::smartPadsSingle( PNS_LINE* aLine, PNS_ITEM* aPad, bool aEnd, if( !checkColliding( &tmp ) ) { -/* if(aEnd) - * PNSDisplayDebugLine (l_best, 6); - * else - * PNSDisplayDebugLine (l_best, 5);*/ - if( cost < min_cost || ( cost == min_cost && len < min_len ) ) { l_best = vp.second; p_best = vp.first; found = true; - // if(cost == min_cost) if( cost == min_cost ) min_len = std::min( len, min_len ); @@ -711,12 +713,6 @@ int PNS_OPTIMIZER::smartPadsSingle( PNS_LINE* aLine, PNS_ITEM* aPad, bool aEnd, if( found ) { -// printf("end: %d, p-best: %d, p-end: %d, p-total: %d\n", aEnd, p_best, p_end, l_best.PointCount()); - -// if(!aEnd) -// PNSDisplayDebugLine (l_best, 5); -// else - aLine->SetShape( l_best ); return p_best; } @@ -724,18 +720,17 @@ int PNS_OPTIMIZER::smartPadsSingle( PNS_LINE* aLine, PNS_ITEM* aPad, bool aEnd, return -1; } - bool PNS_OPTIMIZER::runSmartPads( PNS_LINE* aLine ) { - SHAPE_LINE_CHAIN& line = aLine->GetLine(); - + SHAPE_LINE_CHAIN& line = aLine->Line(); + if( line.PointCount() < 3 ) return false; VECTOR2I p_start = line.CPoint( 0 ), p_end = line.CPoint( -1 ); - PNS_ITEM* startPad = findPadOrVia( aLine->GetLayer(), aLine->GetNet(), p_start ); - PNS_ITEM* endPad = findPadOrVia( aLine->GetLayer(), aLine->GetNet(), p_end ); + PNS_ITEM* startPad = findPadOrVia( aLine->Layer(), aLine->Net(), p_start ); + PNS_ITEM* endPad = findPadOrVia( aLine->Layer(), aLine->Net(), p_end ); int vtx = -1; @@ -746,16 +741,68 @@ bool PNS_OPTIMIZER::runSmartPads( PNS_LINE* aLine ) smartPadsSingle( aLine, endPad, true, vtx < 0 ? line.PointCount() - 1 : line.PointCount() - 1 - vtx ); - aLine->GetLine().Simplify(); + aLine->Line().Simplify(); return true; } bool PNS_OPTIMIZER::Optimize( PNS_LINE* aLine, int aEffortLevel, PNS_NODE* aWorld ) { - PNS_OPTIMIZER opt( aWorld ? aWorld : aLine->GetWorld() ); + PNS_OPTIMIZER opt( aWorld ); opt.SetEffortLevel( aEffortLevel ); opt.SetCollisionMask( -1 ); return opt.Optimize( aLine ); } + + +bool PNS_OPTIMIZER::fanoutCleanup( PNS_LINE * aLine ) +{ + if( aLine->PointCount() < 3 ) + return false; + + VECTOR2I p_start = aLine->CPoint( 0 ), p_end = aLine->CPoint( -1 ); + + PNS_ITEM* startPad = findPadOrVia( aLine->Layer(), aLine->Net(), p_start ); + PNS_ITEM* endPad = findPadOrVia( aLine->Layer(), aLine->Net(), p_end ); + + int thr = aLine->Width() * 10; + int len = aLine->CLine().Length(); + + + if(!startPad) + return false; + + + bool startMatch = startPad->OfKind(PNS_ITEM::VIA | PNS_ITEM::SOLID); + bool endMatch = false; + + if(endPad) + { + endMatch = endPad->OfKind(PNS_ITEM::VIA | PNS_ITEM::SOLID); + } else { + endMatch = aLine->EndsWithVia(); + } + + + if(startMatch && endMatch && len < thr) + { + + for(int i = 0; i < 2; i++ ) + { + SHAPE_LINE_CHAIN l2 = DIRECTION_45().BuildInitialTrace(p_start, p_end, i); + PNS_ROUTER::GetInstance()->DisplayDebugLine (l2, 4, 10000); + PNS_LINE repl; + repl = PNS_LINE (*aLine, l2 ); + + + + if (!m_world->CheckColliding(&repl)) + { + aLine->SetShape(repl.CLine()); + return true; + } + } + } + return false; +} diff --git a/pcbnew/router/pns_optimizer.h b/pcbnew/router/pns_optimizer.h index 916e77bb69..3e1d9b211c 100644 --- a/pcbnew/router/pns_optimizer.h +++ b/pcbnew/router/pns_optimizer.h @@ -1,7 +1,7 @@ /* * KiRouter - a push-and-(sometimes-)shove PCB router * - * Copyright (C) 2013 CERN + * Copyright (C) 2013-2014 CERN * Author: Tomasz Wlostowski * * This program is free software: you can redistribute it and/or modify it @@ -15,7 +15,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with this program. If not, see . + * with this program. If not, see . */ #ifndef __PNS_OPTIMIZER_H @@ -27,6 +27,8 @@ #include #include +#include "range.h" + class PNS_NODE; class PNS_LINE; class PNS_ROUTER; @@ -90,17 +92,17 @@ public: { MERGE_SEGMENTS = 0x01, SMART_PADS = 0x02, - MERGE_OBTUSE = 0x04 + MERGE_OBTUSE = 0x04, + FANOUT_CLEANUP = 0x08 }; PNS_OPTIMIZER( PNS_NODE* aWorld ); ~PNS_OPTIMIZER(); ///> a quick shortcut to optmize a line without creating and setting up an optimizer - static bool Optimize( PNS_LINE* aLine, int aEffortLevel, PNS_NODE* aWorld = NULL ); + static bool Optimize( PNS_LINE* aLine, int aEffortLevel, PNS_NODE* aWorld); - bool Optimize( PNS_LINE* aLine, PNS_LINE* aResult = NULL, - int aStartVertex = 0, int aEndVertex = -1 ); + bool Optimize( PNS_LINE* aLine, PNS_LINE* aResult = NULL ); void SetWorld( PNS_NODE* aNode ) { m_world = aNode; } void CacheStaticItem( PNS_ITEM* aItem ); @@ -135,6 +137,7 @@ private: bool removeUglyCorners( PNS_LINE* aLine ); bool runSmartPads( PNS_LINE* aLine ); bool mergeStep( PNS_LINE* aLine, SHAPE_LINE_CHAIN& aCurrentLine, int step ); + bool fanoutCleanup( PNS_LINE * aLine ); bool checkColliding( PNS_ITEM* aItem, bool aUpdateCache = true ); bool checkColliding( PNS_LINE* aLine, const SHAPE_LINE_CHAIN& aOptPath ); diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index 104aeaa05e..a08b0f0fc7 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -1,7 +1,7 @@ /* * KiRouter - a push-and-(sometimes-)shove PCB router * - * Copyright (C) 2013 CERN + * Copyright (C) 2013-2014 CERN * Author: Tomasz Wlostowski * * This program is free software: you can redistribute it and/or modify it @@ -15,7 +15,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with this program. If not, see . + * with this program. If not, see . */ #include @@ -42,11 +42,13 @@ #include "pns_solid.h" #include "pns_utils.h" #include "pns_router.h" +#include "pns_shove.h" +#include "pns_dragger.h" #include #include -#include +#include #include #include #include @@ -80,13 +82,29 @@ public: m_defaultClearance = 254000; // aBoard->m_NetClasses.Find ("Default clearance")->GetClearance(); } + int localPadClearance( const PNS_ITEM * item ) const + { + if(!item->Parent() || item->Parent()->Type() != PCB_PAD_T ) + return 0; + + const D_PAD *pad = static_cast( item->Parent() ); + + return pad->GetLocalClearance(); + } + int operator()( const PNS_ITEM* a, const PNS_ITEM* b ) { - int net_a = a->GetNet(); + int net_a = a->Net(); int cl_a = (net_a >= 0 ? m_clearanceCache[net_a] : m_defaultClearance); - int net_b = b->GetNet(); + int net_b = b->Net(); int cl_b = (net_b >= 0 ? m_clearanceCache[net_b] : m_defaultClearance); + int pad_a = localPadClearance( a ); + int pad_b = localPadClearance( b ); + + cl_a = std::max(cl_a, pad_a); + cl_b = std::max(cl_b, pad_b); + return std::max( cl_a, cl_b ); } @@ -97,11 +115,12 @@ private: PNS_ITEM* PNS_ROUTER::syncPad( D_PAD* aPad ) { - PNS_LAYERSET layers( 0, 15 ); + PNS_LAYERSET layers ( 0, 15 ); switch( aPad->GetAttribute() ) { case PAD_STANDARD: + layers = PNS_LAYERSET( 0, 15 ); break; case PAD_SMD: @@ -130,49 +149,64 @@ PNS_ITEM* PNS_ROUTER::syncPad( D_PAD* aPad ) solid->SetLayers( layers ); solid->SetNet( aPad->GetNetCode() ); + solid->SetParent( aPad ); + wxPoint wx_c = aPad->GetPosition(); wxSize wx_sz = aPad->GetSize(); VECTOR2I c( wx_c.x, wx_c.y ); VECTOR2I sz( wx_sz.x, wx_sz.y ); - solid->SetCenter( c ); + solid->SetPos( c ); double orient = aPad->GetOrientation() / 10.0; + bool nonOrtho = false; + if( orient == 90.0 || orient == 270.0 ) sz = VECTOR2I( sz.y, sz.x ); else if( orient != 0.0 && orient != 180.0 ) { - TRACEn( 0, "non-orthogonal pad rotations not supported yet" ); - delete solid; - return NULL; + // rotated pads are replaced by for the moment by circles due to my laziness ;) + solid->SetShape ( new SHAPE_CIRCLE (c, std::min(sz.x, sz.y) / 2 ) ); + nonOrtho = true; } - switch( aPad->GetShape() ) + if(!nonOrtho) { - case PAD_CIRCLE: - solid->SetShape( new SHAPE_CIRCLE( c, sz.x / 2 ) ); - break; - - case PAD_OVAL: - if( sz.x == sz.y ) + switch( aPad->GetShape() ) + { + case PAD_CIRCLE: solid->SetShape( new SHAPE_CIRCLE( c, sz.x / 2 ) ); - else + break; + + case PAD_OVAL: + if( sz.x == sz.y ) + solid->SetShape( new SHAPE_CIRCLE( c, sz.x / 2 ) ); + else { + VECTOR2I delta; + + if (sz.x > sz.y) + delta = VECTOR2I((sz.x - sz.y) / 2, 0); + else + delta = VECTOR2I(0, (sz.y - sz.x) / 2); + + SHAPE_SEGMENT *shape = new SHAPE_SEGMENT( c - delta, c + delta, std::min(sz.x, sz.y) ); + solid->SetShape( shape ); + } + break; + + case PAD_RECT: solid->SetShape( new SHAPE_RECT( c - sz / 2, sz.x, sz.y ) ); - break; + break; - case PAD_RECT: - solid->SetShape( new SHAPE_RECT( c - sz / 2, sz.x, sz.y ) ); - break; - - default: - TRACEn( 0, "unsupported pad shape" ); - delete solid; - return NULL; + default: + TRACEn( 0, "unsupported pad shape" ); + delete solid; + return NULL; + } } - solid->SetParent( aPad ); return solid; } @@ -197,7 +231,9 @@ PNS_ITEM* PNS_ROUTER::syncVia( VIA* aVia ) aVia->GetWidth(), aVia->GetNetCode() ); + v->SetDrill ( aVia->GetDrill() ); v->SetParent( aVia ); + return v; } @@ -233,7 +269,6 @@ int PNS_ROUTER::NextCopperLayer( bool aUp ) void PNS_ROUTER::SyncWorld() { - std::vector pads; if( !m_board ) { @@ -243,11 +278,12 @@ void PNS_ROUTER::SyncWorld() ClearWorld(); + int worstClearance = m_board->GetDesignSettings().GetBiggestClearanceValue(); + m_clearanceFunc = new PCBNEW_CLEARANCE_FUNC( m_board ); m_world = new PNS_NODE(); m_world->SetClearanceFunctor( m_clearanceFunc ); - m_world->SetMaxClearance( 1000000 ); // m_board->GetBiggestClearanceValue()); - pads = m_board->GetPads(); + m_world->SetMaxClearance( 4 * worstClearance ); for( MODULE* module = m_board->m_Modules; module; module = module->Next() ) { @@ -273,8 +309,6 @@ void PNS_ROUTER::SyncWorld() if( item ) m_world->Add( item ); } - - m_placer = new PNS_LINE_PLACER( m_world ); } @@ -291,10 +325,8 @@ PNS_ROUTER::PNS_ROUTER() m_world = NULL; m_placer = NULL; m_previewItems = NULL; - m_start_diagonal = false; m_board = NULL; - - TRACE( 1, "m_board = %p\n", m_board ); + m_dragger = NULL; } @@ -351,11 +383,11 @@ void PNS_ROUTER::ClearWorld() } -void PNS_ROUTER::SetCurrentWidth( int w ) +/*void PNS_ROUTER::SetCurrentWidth( int w ) { // fixme: change width while routing m_currentWidth = w; -} +}*/ bool PNS_ROUTER::RoutingInProgress() const @@ -369,7 +401,11 @@ const PNS_ITEMSET PNS_ROUTER::QueryHoverItems( const VECTOR2I& aP ) if( m_state == IDLE ) return m_world->HitTest( aP ); else - return m_placer->GetCurrentNode()->HitTest( aP ); + { + //assert ( m_placer->GetCurrentNode()->checkExists() ); + //TRACE(0,"query-hover [%p]", m_placer->GetCurrentNode()); + return m_placer->CurrentNode()->HitTest( aP ); + } } @@ -383,23 +419,23 @@ const VECTOR2I PNS_ROUTER::SnapToItem( PNS_ITEM* item, VECTOR2I aP, bool& aSplit return aP; } - switch( item->GetKind() ) + switch( item->Kind() ) { case PNS_ITEM::SOLID: - anchor = static_cast(item)->GetCenter(); + anchor = static_cast(item)->Pos(); aSplitsSegment = false; break; case PNS_ITEM::VIA: - anchor = static_cast(item)->GetPos(); + anchor = static_cast(item)->Pos(); aSplitsSegment = false; break; case PNS_ITEM::SEGMENT: { PNS_SEGMENT* seg = static_cast( item ); - const SEG& s = seg->GetSeg(); - int w = seg->GetWidth(); + const SEG& s = seg->Seg(); + int w = seg->Width(); aSplitsSegment = false; @@ -423,50 +459,52 @@ const VECTOR2I PNS_ROUTER::SnapToItem( PNS_ITEM* item, VECTOR2I aP, bool& aSplit return anchor; } - -void PNS_ROUTER::StartRouting( const VECTOR2I& aP, PNS_ITEM* aStartItem ) +bool PNS_ROUTER::StartDragging( const VECTOR2I& aP, PNS_ITEM* aStartItem ) { - VECTOR2I p; - - static int unknowNetIdx = 0; // -10000; - - m_placingVia = false; - m_startsOnVia = false; - m_currentNet = -1; - - bool splitSeg = false; - - p = SnapToItem( aStartItem, aP, splitSeg ); - - if( !aStartItem || aStartItem->GetNet() < 0 ) - m_currentNet = unknowNetIdx--; - else - m_currentNet = aStartItem->GetNet(); - - m_currentStart = p; - m_originalStart = p; - m_currentEnd = p; - - m_placer->SetInitialDirection( m_start_diagonal ? DIRECTION_45( - DIRECTION_45::NE ) : DIRECTION_45( DIRECTION_45::N ) ); - m_placer->StartPlacement( m_originalStart, m_currentNet, m_currentWidth, m_currentLayer ); - m_state = ROUTE_TRACK; - - if( splitSeg ) - splitAdjacentSegments( m_placer->GetCurrentNode(), aStartItem, p ); + if(!aStartItem || aStartItem->OfKind(PNS_ITEM::SOLID)) + return false; + + m_dragger = new PNS_DRAGGER ( this ); + m_dragger->SetWorld( m_world ); + if( m_dragger->Start ( aP, aStartItem ) ) + m_state = DRAG_SEGMENT; + else { + delete m_dragger; + m_state = IDLE; + return false; + } + + return true; } -const VECTOR2I PNS_ROUTER::GetCurrentEnd() const +bool PNS_ROUTER::StartRouting( const VECTOR2I& aP, PNS_ITEM* aStartItem ) +{ + + + m_state = ROUTE_TRACK; + + m_placer = new PNS_LINE_PLACER( this ); + m_placer->SetLayer( m_currentLayer ); + m_placer->SetWidth ( m_settings.GetTrackWidth() ); + m_placer->Start( aP, aStartItem ); + m_currentEnd = aP; + m_currentEndItem = NULL; + + return true; +} + + +const VECTOR2I PNS_ROUTER::CurrentEnd() const { return m_currentEnd; } -void PNS_ROUTER::EraseView() +void PNS_ROUTER::eraseView() { BOOST_FOREACH( BOARD_ITEM* item, m_hiddenItems ) - { + { item->ViewSetVisible( true ); } @@ -480,71 +518,131 @@ void PNS_ROUTER::EraseView() } -void PNS_ROUTER::DisplayItem( const PNS_ITEM* aItem, bool aIsHead ) +void PNS_ROUTER::DisplayItem( const PNS_ITEM* aItem, int aColor, int aClearance ) { ROUTER_PREVIEW_ITEM* pitem = new ROUTER_PREVIEW_ITEM( aItem, m_previewItems ); - m_previewItems->Add( pitem ); + if(aColor >= 0) + pitem->SetColor ( KIGFX::COLOR4D ( aColor )); - if( aIsHead ) - pitem->MarkAsHead(); + if(aClearance >= 0) + pitem->SetClearance ( aClearance ); + + m_previewItems->Add( pitem ); pitem->ViewSetVisible( true ); m_previewItems->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY | KIGFX::VIEW_ITEM::APPEARANCE ); } +void PNS_ROUTER::DisplayItems( const PNS_ITEMSET& aItems ) +{ + BOOST_FOREACH(const PNS_ITEM *item, aItems.CItems()) + DisplayItem(item); +} void PNS_ROUTER::DisplayDebugLine( const SHAPE_LINE_CHAIN& aLine, int aType, int aWidth ) { ROUTER_PREVIEW_ITEM* pitem = new ROUTER_PREVIEW_ITEM( NULL, m_previewItems ); - pitem->DebugLine( aLine, aWidth, aType ); + pitem->Line( aLine, aWidth, aType ); m_previewItems->Add( pitem ); pitem->ViewSetVisible( true ); m_previewItems->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY | KIGFX::VIEW_ITEM::APPEARANCE ); } -void PNS_ROUTER::DisplayDebugBox( const BOX2I& aBox, int aType, int aWidth ) -{ -} +void PNS_ROUTER::DisplayDebugPoint( const VECTOR2I pos, int aType ) +{ + ROUTER_PREVIEW_ITEM* pitem = new ROUTER_PREVIEW_ITEM( NULL, m_previewItems ); + + pitem->Point( pos, aType ); + m_previewItems->Add( pitem ); + pitem->ViewSetVisible( true ); + m_previewItems->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY | KIGFX::VIEW_ITEM::APPEARANCE ); + +} void PNS_ROUTER::Move( const VECTOR2I& aP, PNS_ITEM* endItem ) { - PNS_NODE::ItemVector removed, added; - VECTOR2I p = aP; + m_currentEnd = aP; + m_currentEndItem = endItem; - if( m_state == IDLE ) - return; - - // TODO is something missing here? - if( m_state == START_ROUTING ) + switch( m_state ) { + case ROUTE_TRACK: + movePlacing( aP, endItem ); + break; + + case DRAG_SEGMENT: + moveDragging (aP, endItem ); + break; + default: + break; } +} - EraseView(); +void PNS_ROUTER::moveDragging( const VECTOR2I& aP, PNS_ITEM* endItem ) +{ + eraseView(); - m_currentEnd = p; - m_placer->Route( p ); + m_dragger->Drag( aP ); + PNS_ITEMSET dragged = m_dragger->Traces(); - PNS_LINE current = m_placer->GetTrace(); + updateView ( m_dragger->CurrentNode ( ), dragged ); +} - DisplayItem( ¤t, true ); +void PNS_ROUTER::markViolations( PNS_NODE *aNode, PNS_ITEMSET& aCurrent, PNS_NODE::ItemVector& aRemoved ) +{ + + BOOST_FOREACH(PNS_ITEM *item, aCurrent.Items()) + { + PNS_NODE::Obstacles obstacles; - if( current.EndsWithVia() ) - DisplayItem( ¤t.GetVia(), true ); + aNode->QueryColliding( item, obstacles, PNS_ITEM::ANY ); + + if ( item->OfKind(PNS_ITEM::LINE ) ) + { + PNS_LINE *l = static_cast (item); + if (l->EndsWithVia()) + { + PNS_VIA v ( l->Via() ); + aNode->QueryColliding(&v , obstacles, PNS_ITEM::ANY ); + } + } - m_placer->GetCurrentNode()->GetUpdatedItems( removed, added ); + BOOST_FOREACH(PNS_OBSTACLE& obs, obstacles) + { + int clearance = aNode->GetClearance( item, obs.item ); + std::auto_ptr tmp ( obs.item->Clone() ); + tmp->Mark ( MK_VIOLATION ); + DisplayItem( tmp.get(), -1, clearance ); + aRemoved.push_back(obs.item); + } + } +} + +void PNS_ROUTER::updateView( PNS_NODE *aNode, PNS_ITEMSET& aCurrent ) +{ + PNS_NODE::ItemVector removed, added; + PNS_NODE::Obstacles obstacles; + + if(!aNode) + return; + + if( Settings().Mode() == RM_MarkObstacles ) + markViolations(aNode, aCurrent, removed); + + aNode->GetUpdatedItems( removed, added ); BOOST_FOREACH( PNS_ITEM* item, added ) - { + { DisplayItem( item ); } BOOST_FOREACH( PNS_ITEM* item, removed ) { - BOARD_ITEM* parent = item->GetParent(); + BOARD_CONNECTED_ITEM* parent = item->Parent(); if( parent ) { @@ -558,32 +656,36 @@ void PNS_ROUTER::Move( const VECTOR2I& aP, PNS_ITEM* endItem ) } -void PNS_ROUTER::splitAdjacentSegments( PNS_NODE* aNode, PNS_ITEM* aSeg, const VECTOR2I& aP ) +void PNS_ROUTER::ApplySettings() { - if( aSeg && aSeg->OfKind( PNS_ITEM::SEGMENT ) ) + // Change track/via size settings + if( m_state == ROUTE_TRACK) { - PNS_NODE::OptJoint jt = aNode->FindJoint( aP, aSeg->GetLayers().Start(), aSeg->GetNet() ); - - if( jt && jt->LinkCount() >= 1 ) - return; - - PNS_SEGMENT* s_old = static_cast( aSeg ); - PNS_SEGMENT* s_new[2]; - - s_new[0] = s_old->Clone(); - s_new[1] = s_old->Clone(); - - s_new[0]->SetEnds( s_old->GetSeg().A, aP ); - s_new[1]->SetEnds( aP, s_old->GetSeg().B ); - - aNode->Remove( s_old ); - aNode->Add( s_new[0] ); - aNode->Add( s_new[1] ); + m_placer->UpdateSizes( m_settings ); + m_placer->Move( m_currentEnd, m_currentEndItem ); + movePlacing( m_currentEnd, m_currentEndItem ); } + + // TODO handle mode/optimization/other options change } +void PNS_ROUTER::movePlacing( const VECTOR2I& aP, PNS_ITEM* endItem ) +{ + eraseView(); -void PNS_ROUTER::commitRouting( PNS_NODE* aNode ) + m_placer->Move( aP, endItem ); + PNS_LINE current = m_placer->Trace(); + + DisplayItem( ¤t ); + + if( current.EndsWithVia() ) + DisplayItem( ¤t.Via() ); + + PNS_ITEMSET tmp ( ¤t ); + updateView ( m_placer->CurrentNode ( true ), tmp ); +} + +void PNS_ROUTER::CommitRouting( PNS_NODE* aNode ) { PNS_NODE::ItemVector removed, added; @@ -591,13 +693,13 @@ void PNS_ROUTER::commitRouting( PNS_NODE* aNode ) for( unsigned int i = 0; i < removed.size(); i++ ) { - BOARD_CONNECTED_ITEM* parent = removed[i]->GetParent(); + BOARD_CONNECTED_ITEM* parent = removed[i]->Parent(); if( parent ) { - m_undoBuffer.PushItem( ITEM_PICKER( parent, UR_DELETED ) ); - m_board->Remove( parent ); m_view->Remove( parent ); + m_board->Remove( parent ); + m_undoBuffer.PushItem( ITEM_PICKER( parent, UR_DELETED ) ); } } @@ -605,19 +707,19 @@ void PNS_ROUTER::commitRouting( PNS_NODE* aNode ) { BOARD_CONNECTED_ITEM* newBI = NULL; - switch( item->GetKind() ) + switch( item->Kind() ) { case PNS_ITEM::SEGMENT: { PNS_SEGMENT* seg = static_cast( item ); TRACK* track = new TRACK( m_board ); - const SEG& s = seg->GetSeg(); + const SEG& s = seg->Seg(); track->SetStart( wxPoint( s.A.x, s.A.y ) ); track->SetEnd( wxPoint( s.B.x, s.B.y ) ); - track->SetWidth( seg->GetWidth() ); - track->SetLayer( seg->GetLayers().Start() ); - track->SetNetCode( seg->GetNet() ); + track->SetWidth( seg->Width() ); + track->SetLayer( seg->Layers().Start() ); + track->SetNetCode( seg->Net() ); newBI = track; break; } @@ -626,9 +728,10 @@ void PNS_ROUTER::commitRouting( PNS_NODE* aNode ) { VIA* via_board = new VIA( m_board ); PNS_VIA* via = static_cast( item ); - via_board->SetPosition( wxPoint( via->GetPos().x, via->GetPos().y ) ); - via_board->SetWidth( via->GetDiameter() ); - via_board->SetNetCode( via->GetNet() ); + via_board->SetPosition( wxPoint( via->Pos().x, via->Pos().y ) ); + via_board->SetWidth( via->Diameter() ); + via_board->SetDrill( via->Drill() ); + via_board->SetNetCode( via->Net() ); newBI = via_board; break; } @@ -657,12 +760,12 @@ PNS_VIA* PNS_ROUTER::checkLoneVia( PNS_JOINT* aJoint ) const PNS_VIA* theVia = NULL; PNS_LAYERSET l; - BOOST_FOREACH( PNS_ITEM* item, aJoint->GetLinkList() ) + BOOST_FOREACH( PNS_ITEM* item, aJoint->LinkList() ) { - if( item->GetKind() == PNS_ITEM::VIA ) + if( item->Kind() == PNS_ITEM::VIA ) theVia = static_cast( item ); - l.Merge( item->GetLayers() ); + l.Merge( item->Layers() ); } if( l.Start() == l.End() ) @@ -671,103 +774,34 @@ PNS_VIA* PNS_ROUTER::checkLoneVia( PNS_JOINT* aJoint ) const return NULL; } - -PNS_NODE* PNS_ROUTER::removeLoops( PNS_NODE* aNode, PNS_SEGMENT* aLatestSeg ) -{ - PNS_LINE* ourLine = aNode->AssembleLine( aLatestSeg ); - PNS_NODE* cleaned = aNode->Branch(); - PNS_JOINT a, b; - - std::vector lines; - - cleaned->FindLineEnds( ourLine, a, b ); - cleaned->FindLinesBetweenJoints( a, b, lines ); - - BOOST_FOREACH( PNS_LINE* line, lines ) - { - if( !( line->ContainsSegment( aLatestSeg ) ) ) - { - cleaned->Remove( line ); - } - } - - return cleaned; -} - - bool PNS_ROUTER::FixRoute( const VECTOR2I& aP, PNS_ITEM* aEndItem ) { - bool real_end = false; + bool rv = false; - PNS_LINE pl = m_placer->GetTrace(); - const SHAPE_LINE_CHAIN& l = pl.GetCLine(); - - if( !l.SegmentCount() ) - return true; - - VECTOR2I p_pre_last = l.CPoint( -1 ); - const VECTOR2I p_last = l.CPoint( -1 ); - DIRECTION_45 d_last( l.CSegment( -1 ) ); - - if( l.PointCount() > 2 ) - p_pre_last = l.CPoint( -2 ); - - if( aEndItem && m_currentNet >= 0 && m_currentNet == aEndItem->GetNet() ) - real_end = true; - - int last = ( real_end || m_placingVia ) ? l.SegmentCount() : std::max( 1, l.SegmentCount() - 1 ); - - PNS_NODE* latest = m_placer->GetCurrentNode(); - - if( real_end ) - splitAdjacentSegments( latest, aEndItem, aP ); - - PNS_SEGMENT* lastSeg = NULL; - - for( int i = 0; i < last; i++ ) + switch(m_state) { - const SEG& s = pl.GetCLine().CSegment( i ); - PNS_SEGMENT* seg = new PNS_SEGMENT( s, m_currentNet ); - seg->SetWidth( pl.GetWidth() ); - seg->SetLayer( m_currentLayer ); - latest->Add( seg ); - lastSeg = seg; - } + case ROUTE_TRACK: + rv = m_placer->FixRoute (aP, aEndItem); + m_placingVia = false; + + break; + case DRAG_SEGMENT: + rv = m_dragger->FixRoute (); + break; + + default: + break; + } - if( pl.EndsWithVia() ) - latest->Add( pl.GetVia().Clone() ); - - if( real_end ) - latest = removeLoops( latest, lastSeg ); - - commitRouting( latest ); - - EraseView(); - - if( real_end ) - { - m_state = IDLE; - // m_world->KillChildren(); - } - else - { - m_state = ROUTE_TRACK; - m_placer->SetInitialDirection( d_last ); - m_currentStart = m_placingVia ? p_last : p_pre_last; - - if( m_placingVia ) - m_currentLayer = NextCopperLayer( true ); - - m_placer->StartPlacement( m_currentStart, m_currentNet, m_currentWidth, m_currentLayer ); - - m_startsOnVia = m_placingVia; - m_placingVia = false; - } - - return real_end; + + if(rv) + StopRouting(); + + return rv; } + void PNS_ROUTER::StopRouting() { // Update the ratsnest with new changes @@ -776,25 +810,30 @@ void PNS_ROUTER::StopRouting() if( !RoutingInProgress() ) return; - EraseView(); + if(m_placer) + delete m_placer; + + if(m_dragger) + delete m_dragger; + + m_placer = NULL; + m_dragger = NULL; + + eraseView(); m_state = IDLE; m_world->KillChildren(); + m_world->ClearRanks(); } void PNS_ROUTER::FlipPosture() { - if( m_placer->GetTail().GetCLine().SegmentCount() == 0 ) + if(m_state == ROUTE_TRACK) { - m_start_diagonal = !m_start_diagonal; - m_placer->SetInitialDirection( m_start_diagonal ? - DIRECTION_45( DIRECTION_45::NE ) : DIRECTION_45( DIRECTION_45::N ) ); - } - else m_placer->FlipPosture(); - - Move( m_currentEnd, NULL ); + m_placer->Move ( m_currentEnd, m_currentEndItem ); + } } @@ -810,10 +849,10 @@ void PNS_ROUTER::SwitchLayer( int layer ) if( m_startsOnVia ) { m_currentLayer = layer; - m_placer->StartPlacement( m_currentStart, m_currentNet, m_currentWidth, - m_currentLayer ); + //m_placer->StartPlacement( m_currentStart, m_currentNet, m_currentWidth, + // m_currentLayer ); } - + break; default: break; } @@ -825,6 +864,45 @@ void PNS_ROUTER::ToggleViaPlacement() if( m_state == ROUTE_TRACK ) { m_placingVia = !m_placingVia; - m_placer->AddVia( m_placingVia, m_currentViaDiameter, m_currentViaDrill ); + m_placer->AddVia( m_placingVia, m_settings.GetViaDiameter(), m_settings.GetViaDrill() ); } } + +int PNS_ROUTER::GetCurrentNet() const +{ + switch(m_state) + { + case ROUTE_TRACK: + return m_placer->CurrentNet(); + default: + return m_currentNet; + } +} + +int PNS_ROUTER::GetCurrentLayer() const +{ + switch(m_state) + { + case ROUTE_TRACK: + return m_placer->CurrentLayer(); + default: + return m_currentLayer; + } +} + +void PNS_ROUTER::DumpLog() +{ + PNS_LOGGER *logger = NULL; + switch(m_state) + { + case DRAG_SEGMENT: + logger = m_dragger->Logger(); + break; + + default: + break; + } + + if(logger) + logger->Save ( "/tmp/shove.log" ); +} diff --git a/pcbnew/router/pns_router.h b/pcbnew/router/pns_router.h index e5fabbeec2..53c0905487 100644 --- a/pcbnew/router/pns_router.h +++ b/pcbnew/router/pns_router.h @@ -1,7 +1,7 @@ /* * KiRouter - a push-and-(sometimes-)shove PCB router * - * Copyright (C) 2013 CERN + * Copyright (C) 2013-2014 CERN * Author: Tomasz Wlostowski * * This program is free software: you can redistribute it and/or modify it @@ -15,7 +15,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with this program. If not, see . + * with this program. If not, see . */ #ifndef __PNS_ROUTER_H @@ -32,6 +32,7 @@ #include "pns_routing_settings.h" #include "pns_item.h" #include "pns_itemset.h" +#include "pns_node.h" class BOARD; class BOARD_ITEM; @@ -47,7 +48,8 @@ class PNS_SEGMENT; class PNS_JOINT; class PNS_VIA; class PNS_CLEARANCE_FUNC; -class VIEW_GROUP; +class PNS_SHOVE; +class PNS_DRAGGER; namespace KIGFX { class VIEW; @@ -67,9 +69,8 @@ private: enum RouterState { IDLE, - START_ROUTING, - ROUTE_TRACK, - FINISH_TRACK + DRAG_SEGMENT, + ROUTE_TRACK }; public: @@ -85,13 +86,13 @@ public: void SetView( KIGFX::VIEW* aView ); bool RoutingInProgress() const; - void StartRouting( const VECTOR2I& aP, PNS_ITEM* aItem ); + bool StartRouting( const VECTOR2I& aP, PNS_ITEM* aItem ); void Move( const VECTOR2I& aP, PNS_ITEM* aItem ); bool FixRoute( const VECTOR2I& aP, PNS_ITEM* aItem ); void StopRouting(); - const VECTOR2I GetCurrentEnd() const; + const VECTOR2I CurrentEnd() const; int GetClearance( const PNS_ITEM* a, const PNS_ITEM* b ) const; @@ -102,25 +103,22 @@ public: void FlipPosture(); - void DisplayItem( const PNS_ITEM* aItem, bool aIsHead = false ); + void DisplayItem( const PNS_ITEM* aItem, int aColor = -1, int aClearance = -1 ); + void DisplayItems( const PNS_ITEMSET& aItems ); + void DisplayDebugLine( const SHAPE_LINE_CHAIN& aLine, int aType = 0, int aWidth = 0 ); + void DisplayDebugPoint( const VECTOR2I aPos, int aType = 0); void DisplayDebugBox( const BOX2I& aBox, int aType = 0, int aWidth = 0 ); - void EraseView(); void SwitchLayer( int layer ); - int GetCurrentLayer() const { return m_currentLayer; } void ToggleViaPlacement(); - void SetCurrentWidth( int w ); - - void SetCurrentViaDiameter( int d ) { m_currentViaDiameter = d; } - void SetCurrentViaDrill( int d ) { m_currentViaDrill = d; } - int GetCurrentWidth() const { return m_currentWidth; } - int GetCurrentViaDiameter() const { return m_currentViaDiameter; } - int GetCurrentViaDrill() const { return m_currentViaDrill; } - int GetCurrentNet() const { return m_currentNet; } + int GetCurrentLayer() const;// { return m_currentLayer; } + int GetCurrentNet() const;// { return m_currentNet; } + void DumpLog(); + PNS_CLEARANCE_FUNC* GetClearanceFunc() const { return m_clearanceFunc; @@ -138,11 +136,24 @@ public: const PNS_ITEMSET QueryHoverItems( const VECTOR2I& aP ); const VECTOR2I SnapToItem( PNS_ITEM* item, VECTOR2I aP, bool& aSplitsSegment ); + bool StartDragging( const VECTOR2I& aP, PNS_ITEM* aItem ); + + void SetIterLimit( int aX ) { m_iterLimit = aX; } + int GetIterLimit() const { return m_iterLimit; }; + + void SetShowIntermediateSteps(bool aX, int aSnapshotIter = -1 ) { m_showInterSteps = aX; m_snapshotIter = aSnapshotIter; } + bool GetShowIntermediateSteps() const { return m_showInterSteps; } + int GetShapshotIter() const { return m_snapshotIter; } + + PNS_ROUTING_SETTINGS& Settings() { return m_settings; } + + void CommitRouting( PNS_NODE* aNode ); + /** * Returns the last changes introduced by the router (since the last time ClearLastChanges() * was called or a new track has been started). */ - const PICKED_ITEMS_LIST& GetLastChanges() const + const PICKED_ITEMS_LIST& GetUndoBuffer() const { return m_undoBuffer; } @@ -150,21 +161,41 @@ public: /** * Clears the list of recent changes, saved to be stored in the undo buffer. */ - void ClearLastChanges() + void ClearUndoBuffer() { m_undoBuffer.ClearItemsList(); } + /** + * Applies stored settings. + * \see Settings() + */ + void ApplySettings(); + + void EnableSnapping ( bool aEnable ) + { + m_snappingEnabled = aEnable; + } + + bool SnappingEnabled () const + { + return m_snappingEnabled; + } + + private: + void movePlacing ( const VECTOR2I& aP, PNS_ITEM* aItem ); + void moveDragging ( const VECTOR2I& aP, PNS_ITEM* aItem ); + + void eraseView(); + void updateView( PNS_NODE *aNode, PNS_ITEMSET &aCurrent ); //PNS_LINE *aCurrent = NULL ); + void clearViewFlags(); // optHoverItem queryHoverItemEx(const VECTOR2I& aP); PNS_ITEM* pickSingleItem( PNS_ITEMSET& aItems ) const; // std::vector aItems) const; void splitAdjacentSegments( PNS_NODE* aNode, PNS_ITEM* aSeg, const VECTOR2I& aP ); // optHoverItem& aItem); - void commitRouting( PNS_NODE* aNode ); - PNS_NODE* removeLoops( PNS_NODE* aNode, PNS_SEGMENT* aLatestSeg ); - PNS_NODE* removeLoops( PNS_NODE* aNode, PNS_LINE* aNewLine ); PNS_VIA* checkLoneVia( PNS_JOINT* aJoint ) const; PNS_ITEM* syncPad( D_PAD* aPad ); @@ -177,35 +208,45 @@ private: void highlightCurrent( bool enabled ); + void markViolations( PNS_NODE *aNode, PNS_ITEMSET& aCurrent, PNS_NODE::ItemVector& aRemoved ); + int m_currentLayer; int m_currentNet; - int m_currentWidth; - int m_currentViaDiameter; - int m_currentViaDrill; - - bool m_start_diagonal; RouterState m_state; BOARD* m_board; PNS_NODE* m_world; + PNS_NODE* m_lastNode; PNS_LINE_PLACER* m_placer; + PNS_DRAGGER *m_dragger; + PNS_LINE* m_draggedLine; + PNS_SHOVE* m_shove; + int m_draggedSegmentIndex; + int m_iterLimit; + bool m_showInterSteps; + int m_snapshotIter; KIGFX::VIEW* m_view; KIGFX::VIEW_GROUP* m_previewItems; + + PNS_ITEM *m_currentEndItem; + VECTOR2I m_currentEnd; VECTOR2I m_currentStart; VECTOR2I m_originalStart; bool m_placingVia; bool m_startsOnVia; + bool m_snappingEnabled; + bool m_violation; // optHoverItem m_startItem, m_endItem; PNS_ROUTING_SETTINGS m_settings; PNS_CLEARANCE_FUNC* m_clearanceFunc; - boost::unordered_set m_hiddenItems; + boost::unordered_set m_hiddenItems; ///> Stores list of modified items in the current operation PICKED_ITEMS_LIST m_undoBuffer; diff --git a/pcbnew/router/pns_routing_settings.cpp b/pcbnew/router/pns_routing_settings.cpp new file mode 100644 index 0000000000..cddc110311 --- /dev/null +++ b/pcbnew/router/pns_routing_settings.cpp @@ -0,0 +1,49 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013-2014 CERN + * Author: Tomasz Wlostowski + * + * 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 3 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, see . + */ + +#include "pns_routing_settings.h" + +PNS_ROUTING_SETTINGS::PNS_ROUTING_SETTINGS() +{ + m_routingMode = RM_Walkaround; + m_optimizerEffort = OE_Full; + m_removeLoops = true; + m_smartPads = true; + m_shoveVias = true; + m_suggestFinish = false; + m_followMouse = true; + m_startDiagonal = false; + m_shoveIterationLimit = 250; + m_shoveTimeLimit = 1000; + m_walkaroundIterationLimit = 40; + m_jumpOverObstacles = false; + m_smoothDraggedSegments = true; + m_canViolateDRC = false; +} + +TIME_LIMIT PNS_ROUTING_SETTINGS::ShoveTimeLimit() const +{ + return TIME_LIMIT ( m_shoveTimeLimit ); +} + +int PNS_ROUTING_SETTINGS::ShoveIterationLimit() const +{ + return m_shoveIterationLimit; +} diff --git a/pcbnew/router/pns_routing_settings.h b/pcbnew/router/pns_routing_settings.h index 72a4babef0..02eab2a352 100644 --- a/pcbnew/router/pns_routing_settings.h +++ b/pcbnew/router/pns_routing_settings.h @@ -1,7 +1,7 @@ /* * KiRouter - a push-and-(sometimes-)shove PCB router * - * Copyright (C) 2013 CERN + * Copyright (C) 2013-2014 CERN * Author: Tomasz Wlostowski * * This program is free software: you can redistribute it and/or modify it @@ -15,39 +15,147 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with this program. If not, see . + * with this program. If not, see . */ -#ifndef __PNS_ROUTER_SETTINGS -#define __PNS_ROUTER_SETTINGS +#ifndef __PNS_ROUTING_SETTINGS +#define __PNS_ROUTING_SETTINGS +#include "direction.h" +#include "time_limit.h" + ///> Routing modes enum PNS_MODE { - RM_Ignore = 0, ///> Ignore collisions - RM_Shove, ///> Only shove - RM_Walkaround, ///> Only walkaround - RM_Smart ///> Guess what's better + RM_MarkObstacles = 0, ///> Ignore collisions, mark obstacles + RM_Shove, ///> Only shove + RM_Walkaround, ///> Only walkaround + RM_Smart ///> Guess what's better, try to make least mess on the PCB }; +///> Optimization effort +enum PNS_OPTIMIZATION_EFFORT +{ + OE_Low = 0, + OE_Medium = 1, + OE_Full = 2 +}; + +/** + * Class PNS_ROUTING_SETTINGS + * + * Contains all persistent settings of the router, such as the mode, optimization effort, etc. + */ + class PNS_ROUTING_SETTINGS { public: - PNS_MODE m_routingMode; + PNS_ROUTING_SETTINGS(); + ///> Returns the routing mode. + PNS_MODE Mode() const { return m_routingMode; } + + ///> Sets the routing mode. + void SetMode( PNS_MODE aMode ) { m_routingMode = aMode; } + + ///> Returns the optimizer effort. Bigger means cleaner traces, but slower routing. + PNS_OPTIMIZATION_EFFORT OptimizerEffort() const { return m_optimizerEffort; } + + ///> Sets the optimizer effort. Bigger means cleaner traces, but slower routing. + void SetOptimizerEffort( PNS_OPTIMIZATION_EFFORT aEffort ) { m_optimizerEffort = aEffort; } + + ///> Returns true if shoving vias is enbled. + bool ShoveVias() const { return m_shoveVias; } + + ///> Enables/disables shoving vias. + void SetShoveVias( bool aShoveVias ) { m_shoveVias = aShoveVias; } + + ///> Returns true if loop (redundant track) removal is on. + bool RemoveLoops() const { return m_removeLoops; } + + ///> Enables/disables loop (redundant track) removal. + void SetRemoveLoops( bool aRemoveLoops ) { m_removeLoops = aRemoveLoops; } + + ///> Returns true if suggesting the finish of currently placed track is on. + bool SuggestFinish() { return m_suggestFinish; } + + ///> Enables displaying suggestions for finishing the currently placed track. + void SetSuggestFinish( bool aSuggestFinish ) { m_suggestFinish = aSuggestFinish; } + + ///> Returns true if Smart Pads (automatic neckdown) is enabled. + bool SmartPads () const { return m_smartPads; } + + ///> Enables/disables Smart Pads (automatic neckdown). + void SetSmartPads( bool aSmartPads ) { m_smartPads = aSmartPads; } + + ///> Returns true if follow mouse mode is active (permanently on for the moment). + bool FollowMouse() const + { + return m_followMouse && !(Mode() == RM_MarkObstacles); + } + + ///> Returns true if smoothing segments durign dragging is enabled. + bool SmoothDraggedSegments() const { return m_smoothDraggedSegments; } + + ///> Enables/disabled smoothing segments during dragging. + void SetSmoothDraggedSegments( bool aSmooth ) { m_smoothDraggedSegments = aSmooth; } + + ///> Returns true if jumping over unmovable obstacles is on. + bool JumpOverObstacles() const { return m_jumpOverObstacles; } + + ///> Enables/disables jumping over unmovable obstacles. + void SetJumpOverObstacles( bool aJumpOverObstacles ) { m_jumpOverObstacles = aJumpOverObstacles; } + + void SetStartDiagonal(bool aStartDiagonal) { m_startDiagonal = aStartDiagonal; } + + bool CanViolateDRC() const { return m_canViolateDRC; } + void SetCanViolateDRC( bool aViolate ) { m_canViolateDRC = aViolate; } + + void SetTrackWidth( int aWidth ) { m_trackWidth = aWidth; } + int GetTrackWidth() const { return m_trackWidth; } + void SetViaDiameter( int aDiameter ) { m_viaDiameter = aDiameter; } + int GetViaDiameter() const { return m_viaDiameter; } + void SetViaDrill( int aDrill ) { m_viaDrill = aDrill; } + int GetViaDrill() const { return m_viaDrill; } + + const DIRECTION_45 InitialDirection() const + { + if(m_startDiagonal) + return DIRECTION_45 (DIRECTION_45::NE); + else + return DIRECTION_45 (DIRECTION_45::N); + } + + int ShoveIterationLimit() const; + TIME_LIMIT ShoveTimeLimit() const; + + int WalkaroundIterationLimit() const { return m_walkaroundIterationLimit; }; + TIME_LIMIT WalkaroundTimeLimit() const; + +private: + + bool m_shoveVias; + bool m_startDiagonal; bool m_removeLoops; bool m_smartPads; - bool m_suggestEnding; - bool m_shoveOnRequest; - bool m_changePostures; + bool m_suggestFinish; bool m_followMouse; + bool m_jumpOverObstacles; + bool m_smoothDraggedSegments; + bool m_canViolateDRC; - int m_lineWidth; + PNS_MODE m_routingMode; + PNS_OPTIMIZATION_EFFORT m_optimizerEffort; + + int m_trackWidth; int m_viaDiameter; int m_viaDrill; + int m_preferredLayer; int m_walkaroundIterationLimit; int m_shoveIterationLimit; + TIME_LIMIT m_shoveTimeLimit; + TIME_LIMIT m_walkaroundTimeLimit; }; #endif diff --git a/pcbnew/router/pns_segment.h b/pcbnew/router/pns_segment.h index 06ab41dfa0..0ebc4bc767 100644 --- a/pcbnew/router/pns_segment.h +++ b/pcbnew/router/pns_segment.h @@ -1,7 +1,7 @@ /* * KiRouter - a push-and-(sometimes-)shove PCB router * - * Copyright (C) 2013 CERN + * Copyright (C) 2013-2014 CERN * Author: Tomasz Wlostowski * * This program is free software: you can redistribute it and/or modify it @@ -15,7 +15,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with this program. If not, see . + * with this program. If not, see . */ #ifndef __PNS_SEGMENT_H @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include "pns_item.h" @@ -40,31 +40,27 @@ public: {}; PNS_SEGMENT( const SEG& aSeg, int aNet ) : - PNS_ITEM( SEGMENT ) + PNS_ITEM( SEGMENT ), m_seg(aSeg, 0) { m_net = aNet; - m_shape.Clear(); - m_shape.Append( aSeg.A ); - m_shape.Append( aSeg.B ); }; PNS_SEGMENT( const PNS_LINE& aParentLine, const SEG& aSeg ) : - PNS_ITEM( SEGMENT ) + PNS_ITEM( SEGMENT ), + m_seg(aSeg, aParentLine.Width()) { - m_net = aParentLine.GetNet(); - m_layers = aParentLine.GetLayers(); - m_width = aParentLine.GetWidth(); - m_shape.Clear(); - m_shape.Append( aSeg.A ); - m_shape.Append( aSeg.B ); + m_net = aParentLine.Net(); + m_layers = aParentLine.Layers(); + m_marker = aParentLine.Marker(); + m_rank = aParentLine.Rank(); }; - PNS_SEGMENT* Clone() const; + PNS_SEGMENT* Clone( ) const; - const SHAPE* GetShape() const + const SHAPE* Shape() const { - return static_cast( &m_shape ); + return static_cast( &m_seg ); } void SetLayer( int aLayer ) @@ -72,53 +68,59 @@ public: SetLayers( PNS_LAYERSET( aLayer ) ); } - int GetLayer() const + int Layer() const { - return GetLayers().Start(); - } - - const SHAPE_LINE_CHAIN& GetCLine() const - { - return m_shape; + return Layers().Start(); } void SetWidth( int aWidth ) { - m_width = aWidth; + m_seg.SetWidth(aWidth); } - int GetWidth() const + int Width() const { - return m_width; + return m_seg.GetWidth(); } - const SEG GetSeg() const + const SEG& Seg() const { - assert( m_shape.PointCount() >= 1 ); + return m_seg.GetSeg(); + } - if( m_shape.PointCount() == 1 ) - return SEG( m_shape.CPoint( 0 ), m_shape.CPoint( 0 ) ); - - return SEG( m_shape.CPoint( 0 ), m_shape.CPoint( 1 ) ); + const SHAPE_LINE_CHAIN CLine() const + { + return SHAPE_LINE_CHAIN( m_seg.GetSeg().A, m_seg.GetSeg().B ); } void SetEnds( const VECTOR2I& a, const VECTOR2I& b ) { - m_shape.Clear(); - m_shape.Append( a ); - m_shape.Append( b ); - } + m_seg.SetSeg( SEG ( a, b ) ); + } void SwapEnds() { - m_shape = m_shape.Reverse(); + SEG tmp = m_seg.GetSeg(); + m_seg.SetSeg( SEG (tmp.B , tmp.A )); } const SHAPE_LINE_CHAIN Hull( int aClearance, int aWalkaroundThickness ) const; + virtual VECTOR2I Anchor(int n) const + { + if(n == 0) + return m_seg.GetSeg().A; + else + return m_seg.GetSeg().B; + } + + virtual int AnchorCount() const + { + return 2; + } + private: - SHAPE_LINE_CHAIN m_shape; - int m_width; + SHAPE_SEGMENT m_seg; }; #endif diff --git a/pcbnew/router/pns_shove.cpp b/pcbnew/router/pns_shove.cpp index ad58ee1feb..491f3327f3 100644 --- a/pcbnew/router/pns_shove.cpp +++ b/pcbnew/router/pns_shove.cpp @@ -1,7 +1,7 @@ /* * KiRouter - a push-and-(sometimes-)shove PCB router * - * Copyright (C) 2013 CERN + * Copyright (C) 2013-2014 CERN * Author: Tomasz Wlostowski * * This program is free software: you can redistribute it and/or modify it @@ -15,477 +15,1067 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with this program. If not, see . + * with this program. If not, see . */ #include #include -#include +#include #include "trace.h" +#include "range.h" #include "pns_line.h" #include "pns_node.h" #include "pns_walkaround.h" #include "pns_shove.h" +#include "pns_solid.h" #include "pns_optimizer.h" #include "pns_via.h" #include "pns_utils.h" +#include "pns_router.h" +#include "pns_shove.h" + +#include "time_limit.h" #include -PNS_SHOVE::PNS_SHOVE( PNS_NODE* aWorld ) +static void sanityCheck (PNS_LINE *l_old, PNS_LINE *l_new) +{ + assert (l_old->CPoint(0) == l_new->CPoint(0) ); + assert (l_old->CPoint(-1) == l_new->CPoint(-1 )); +} + +PNS_SHOVE::PNS_SHOVE( PNS_NODE* aWorld, PNS_ROUTER *aRouter ) : + PNS_ALGO_BASE ( aRouter ) { m_root = aWorld; - m_iterLimit = 100; }; PNS_SHOVE::~PNS_SHOVE() { +// free all the stuff we've created during routing/dragging operation. + BOOST_FOREACH(PNS_ITEM *item, m_gcItems) + delete item; } - -struct range +// garbage-collected line assembling +PNS_LINE* PNS_SHOVE::assembleLine ( const PNS_SEGMENT *aSeg, int *aIndex ) { - range() - { - min_v = max_v = -1; - } + PNS_LINE *l = m_currentNode->AssembleLine( const_cast (aSeg), aIndex); - void add( int x ) - { - if( min_v < 0 ) min_v = x; + m_gcItems.push_back(l); + return l; +} - if( max_v < 0 ) max_v = x; - - if( x < min_v ) - min_v = x; - else if( x > max_v ) - max_v = x; - } - - int start() - { - return min_v; - } - - int end() - { - return max_v; - } - - int min_v, max_v; -}; - -// fixme: this is damn f***ing inefficient. And fails much too often due to broken direction finding algorithm. -bool PNS_SHOVE::tryShove( PNS_NODE* aNode, PNS_LINE* aHead, PNS_LINE* aObstacle, - PNS_SEGMENT& aObstacleSeg, PNS_LINE* aResult, bool aInvertWinding ) +// garbage-collected line cloning +PNS_LINE *PNS_SHOVE::cloneLine ( const PNS_LINE *aLine ) { - const SHAPE_LINE_CHAIN& head = aHead->GetCLine(); - bool cw = false; - int i; + PNS_LINE *l = aLine->Clone(); - if( aHead->EndsWithVia() && !aHead->GetLayers().Overlaps( aObstacle->GetLayers() ) ) + m_gcItems.push_back(l); + return l; +} + +// A dumb function that checks if the shoved line is shoved the right way, e.g. +// visually "outwards" of the line/via applying pressure on it. Unfortunately there's no +// mathematical concept of orientation of an open curve, so we use some primitive heuristics: +// if the shoved line wraps around the start of the "pusher", it's likely shoved in wrong direction. +bool PNS_SHOVE::checkBumpDirection ( PNS_LINE *aCurrent, PNS_LINE *aShoved ) const +{ + const SEG ss = aCurrent->CSegment(0); + + int dist = m_currentNode->GetClearance(aCurrent, aShoved) + PNS_HULL_MARGIN; + + dist += aCurrent->Width() / 2; + dist += aShoved->Width() / 2; + + const VECTOR2I ps = ss.A - (ss.B - ss.A).Resize(dist); + + return !aShoved->CLine().PointOnEdge(ps); +} + +PNS_SHOVE::ShoveStatus PNS_SHOVE::walkaroundLoneVia ( PNS_LINE *aCurrent, PNS_LINE *aObstacle, PNS_LINE *aShoved ) +{ + int clearance = m_currentNode->GetClearance( aCurrent, aObstacle ); + const SHAPE_LINE_CHAIN hull = aCurrent->Via().Hull( clearance, aObstacle->Width() ); + SHAPE_LINE_CHAIN path_cw, path_ccw; + + aObstacle->Walkaround( hull, path_cw, true ); + aObstacle->Walkaround( hull, path_ccw, false ); + + const SHAPE_LINE_CHAIN& shortest = path_ccw.Length() < path_cw.Length() ? path_ccw : path_cw; + + if(shortest.PointCount() < 2) + return SH_INCOMPLETE; + if(aObstacle->CPoint(-1) != shortest.CPoint(-1)) + return SH_INCOMPLETE; + if(aObstacle->CPoint(0) != shortest.CPoint(0)) + return SH_INCOMPLETE; + + aShoved->SetShape( shortest ); + + if( m_currentNode->CheckColliding( aShoved, aCurrent ) ) + return SH_INCOMPLETE; + + return SH_OK; +} + +PNS_SHOVE::ShoveStatus PNS_SHOVE::processHullSet ( PNS_LINE *aCurrent, PNS_LINE *aObstacle, PNS_LINE *aShoved, const HullSet& hulls ) +{ + const SHAPE_LINE_CHAIN& obs = aObstacle->CLine(); + bool failingDirCheck = false; + int attempt; + + for(attempt = 0; attempt < 4; attempt++) { - int clearance = aNode->GetClearance( aHead, aObstacle ); - SHAPE_LINE_CHAIN hull = aHead->GetVia().Hull( clearance - aObstacle->GetWidth() / 2 ); + bool invertTraversal = (attempt >= 2); + bool clockwise = attempt % 2; + int vFirst = -1, vLast = -1; - // SHAPE_LINE_CHAIN path_pre, path_walk_cw, path_walk_ccw, path_post; + SHAPE_LINE_CHAIN path; + PNS_LINE l ( *aObstacle ); - SHAPE_LINE_CHAIN path_cw, path_ccw, * path; - - aObstacle->NewWalkaround( hull, path_cw, true ); - aObstacle->NewWalkaround( hull, path_ccw, false ); - - path = path_ccw.Length() < path_cw.Length() ? &path_ccw : &path_cw; - aResult->SetShape( *path ); - - // PNSDisplayDebugLine (*path, 5); - - if( !aResult->Is45Degree() ) + for(int i = 0; i < (int)hulls.size(); i++ ) { - // printf("polyset non-45\npoly %s\nendpolyset\n", aResult->GetCLine().Format().c_str()); + const SHAPE_LINE_CHAIN& hull = hulls[invertTraversal ? hulls.size() - 1 - i : i]; + + l.Walkaround( hull, path, clockwise ); + path.Simplify(); + l.SetShape( path ); + } + + for(int i = 0; i < std::min ( path.PointCount(), obs.PointCount() ); i++) + { + if(path.CPoint(i) != obs.CPoint(i)) + { + vFirst = i; + break; + } } - /*... special case for vias? */ + int k = obs.PointCount() - 1; + for(int i = path.PointCount() - 1; i >= 0 && k >= 0; i--, k--) + { + if(path.CPoint(i) != obs.CPoint(k)) + { + vLast = i; + break; + } + } - return !aNode->CheckColliding( aResult, aHead ); + if( ( vFirst < 0 || vLast < 0) && !path.CompareGeometry( aObstacle->CLine() )) + { + TRACE( 100, "attempt %d fail vfirst-last", attempt ); + continue; + } + + if(path.CPoint(-1) != obs.CPoint(-1) || path.CPoint(0) != obs.CPoint(0)) + { + TRACE(100, "attempt %d fail vend-start\n", attempt); + continue; + } + + if(!checkBumpDirection(aCurrent, &l)) + { + TRACE( 100, "attempt %d fail direction-check", attempt ); + failingDirCheck = true; + aShoved->SetShape(l.CLine()); + continue; + } + + if(path.SelfIntersecting()) + { + TRACE( 100, "attempt %d fail self-intersect", attempt ); + continue; + } + + bool colliding = m_currentNode->CheckColliding( &l, aCurrent ); + + if( (aCurrent->Marker() & MK_HEAD) && !colliding) + { + PNS_JOINT *jtStart = m_currentNode->FindJoint ( aCurrent->CPoint(0), aCurrent ); + + BOOST_FOREACH( PNS_ITEM *item, jtStart->LinkList() ) + { + if(m_currentNode->CheckColliding(item, &l)) + colliding = true; + } + } + + if( colliding ) + { + TRACE( 100, "attempt %d fail coll-check", attempt ); + continue; + } + + aShoved->SetShape( l.CLine() ); + + return SH_OK; } - int ns = head.SegmentCount(); + return failingDirCheck ? SH_OK : SH_INCOMPLETE; +} - if( aHead->EndsWithVia() ) - ns++; +PNS_SHOVE::ShoveStatus PNS_SHOVE::processSingleLine ( PNS_LINE *aCurrent, PNS_LINE *aObstacle, PNS_LINE *aShoved ) +{ + aShoved->ClearSegmentLinks(); - for( i = 0; i < head.SegmentCount(); i++ ) + bool obstacleIsHead = false; + + if( aObstacle->LinkedSegments() ) { - const PNS_SEGMENT hs( *aHead, head.CSegment( i ) ); - - - if( aNode->CheckColliding( &hs, aObstacle ) ) + BOOST_FOREACH( PNS_SEGMENT *s, *aObstacle->LinkedSegments() ) + if(s->Marker() & MK_HEAD) { - VECTOR2I v1 = hs.GetSeg().B - hs.GetSeg().A; - VECTOR2I v2 = aObstacleSeg.GetSeg().B - aObstacleSeg.GetSeg().A; - - VECTOR2I::extended_type det = v1.Cross( v2 ); - - if( det > 0 ) - cw = true; - else - cw = false; - + obstacleIsHead = true; break; } } - if( aInvertWinding ) + ShoveStatus rv; + + bool viaOnEnd = aCurrent->EndsWithVia(); + + if( viaOnEnd && ( !aCurrent->LayersOverlap( aObstacle ) || aCurrent->SegmentCount() == 0 ) ) { - if( cw ) - cw = false; - else - cw = true; - } + rv = walkaroundLoneVia( aCurrent, aObstacle, aShoved ); + } else { + int w = aObstacle->Width(); + int n_segs = aCurrent->SegmentCount(); + int clearance = m_currentNode->GetClearance( aCurrent, aObstacle ); - PNS_LINE shoved( *aObstacle ); + HullSet hulls; - int clearance = aNode->GetClearance( aHead, aObstacle ); + hulls.reserve( n_segs + 1 ); - range r; - - for( i = 0; i < ns; i++ ) - { - SHAPE_LINE_CHAIN hull; - - if( i < head.SegmentCount() ) + for( int i = 0; i < n_segs; i++ ) { - const PNS_SEGMENT hs( *aHead, head.CSegment( i ) ); - hull = hs.Hull( clearance, 0 ); + PNS_SEGMENT seg ( *aCurrent, aCurrent->CSegment(i) ); + hulls.push_back ( seg.Hull( clearance, w ) ); } - else - hull = aHead->GetVia().Hull( clearance - aObstacle->GetWidth() / 2 ); - SHAPE_LINE_CHAIN path_pre, path_walk, path_post, tmp; - SHAPE_LINE_CHAIN path_pre2, path_walk2, path_post2; + if( viaOnEnd ) + hulls.push_back ( aCurrent->Via().Hull( clearance, w ) ); - // shoved.NewWalkaround(hull, path_pre, path_walk, path_post, cw); - shoved.NewWalkaround( hull, path_pre, path_walk, path_post, cw ); - - /*if(path_pre != path_pre2 || path_post != path_post2 || path_walk != path_walk2 ) - * { - * TRACE(5, "polyset orig\npoly %s\npoly %s\npoly %s\nendpolyset\n", path_pre.Format().c_str() % path_walk.Format().c_str() % path_post.Format().c_str()); - * TRACE(5, "polyset err\npoly %s\npoly %s\npoly %s\nendpolyset\n", path_pre2.Format().c_str() % path_walk2.Format().c_str() % path_post2.Format().c_str()); - * }*/ - - tmp = shoved.GetCLine(); - - if( path_walk.SegmentCount() ) - r.add( i ); - - path_pre.Append( path_walk ); - path_pre.Append( path_post ); - path_pre.Simplify(); - shoved.SetShape( path_pre ); -// shoved.SetAffectedRange ( start, end ); - *aResult = shoved; - - if( !aResult->Is45Degree() ) - { - // TRACE(5, "polyset non-45\npoly %s\npoly %s\npoly %s\nendpolyset\n", tmp.Format().c_str() % hull.Format().c_str() % aResult->GetCLine().Format().c_str()); - } + rv = processHullSet ( aCurrent, aObstacle, aShoved, hulls); } + + if(obstacleIsHead) + aShoved->Mark( aShoved->Marker() | MK_HEAD ); - TRACE( 2, "CW %d affectedRange %d-%d [total %d]", (cw ? 1 : 0) % r.start() % r.end() % ns ); - - return !aNode->CheckColliding( aResult, aHead ); + return rv; } -PNS_SHOVE::ShoveStatus PNS_SHOVE::shoveSingleLine( PNS_NODE* aNode, PNS_LINE* aCurrent, - PNS_LINE* aObstacle, PNS_SEGMENT& aObstacleSeg, PNS_LINE* aResult ) +PNS_SHOVE::ShoveStatus PNS_SHOVE::onCollidingSegment( PNS_LINE *aCurrent, PNS_SEGMENT *aObstacleSeg ) { - bool rv = tryShove( aNode, aCurrent, aObstacle, aObstacleSeg, aResult, false ); + int segIndex; + PNS_LINE *obstacleLine = assembleLine (aObstacleSeg, &segIndex); + PNS_LINE *shovedLine = cloneLine ( obstacleLine ); + + ShoveStatus rv = processSingleLine ( aCurrent, obstacleLine, shovedLine ); - if( !rv ) - rv = tryShove( aNode, aCurrent, aObstacle, aObstacleSeg, aResult, true ); + assert ( obstacleLine->LayersOverlap (shovedLine) ); - if( !rv ) + + if(rv == SH_OK) { - TRACEn( 2, "Shove failed" ); - return SH_INCOMPLETE; + if ( shovedLine->Marker() & MK_HEAD ) + m_newHead = *shovedLine; + + sanityCheck(obstacleLine, shovedLine); + m_currentNode->Replace (obstacleLine, shovedLine); + sanityCheck(obstacleLine, shovedLine); + + int rank = aCurrent->Rank(); + shovedLine->SetRank ( rank - 1 ); + + pushLine(shovedLine); } - aResult->GetLine().Simplify(); +#ifdef DEBUG + m_logger.NewGroup ("on-colliding-segment", m_iter); + m_logger.Log ( aObstacleSeg, 0, "obstacle-segment"); + m_logger.Log ( aCurrent, 1, "current-line"); + m_logger.Log ( obstacleLine, 2, "obstacle-line"); + m_logger.Log ( shovedLine, 3, "shoved-line"); +#endif - const SHAPE_LINE_CHAIN& sh_shoved = aResult->GetCLine(); - const SHAPE_LINE_CHAIN& sh_orig = aObstacle->GetCLine(); + return rv; +} - if( sh_shoved.SegmentCount() > 1 && sh_shoved.CPoint( 0 ) == sh_orig.CPoint( 0 ) - && sh_shoved.CPoint( -1 ) == sh_orig.CPoint( -1 ) ) - return SH_OK; - else if( !sh_shoved.SegmentCount() ) - return SH_NULL; - else +PNS_SHOVE::ShoveStatus PNS_SHOVE::onCollidingLine( PNS_LINE *aCurrent, PNS_LINE *aObstacle ) +{ + PNS_LINE *shovedLine = cloneLine(aObstacle); + + ShoveStatus rv = processSingleLine ( aCurrent, aObstacle, shovedLine ); + + if(rv == SH_OK) + { + if ( shovedLine->Marker() & MK_HEAD ) + m_newHead = *shovedLine; + + sanityCheck(aObstacle,shovedLine); + m_currentNode->Replace( aObstacle, shovedLine ); + sanityCheck(aObstacle,shovedLine); + + int rank = aObstacle->Rank(); + shovedLine->SetRank ( rank ); + + pushLine(shovedLine); + + #ifdef DEBUG + m_logger.NewGroup ("on-colliding-line", m_iter); + m_logger.Log ( aObstacle, 0, "obstacle-line"); + m_logger.Log ( aCurrent, 1, "current-line"); + m_logger.Log ( shovedLine, 3, "shoved-line"); + #endif + + + } + + + return rv; +} + +PNS_SHOVE::ShoveStatus PNS_SHOVE::onCollidingSolid( PNS_LINE *aCurrent, PNS_SOLID *aObstacleSolid ) +{ + PNS_WALKAROUND walkaround( m_currentNode, Router() ); + PNS_LINE* walkaroundLine = cloneLine(aCurrent); + + + if(aCurrent->EndsWithVia()) + { + PNS_VIA vh = aCurrent->Via(); + PNS_VIA *via = NULL; + PNS_JOINT *jtStart = m_currentNode->FindJoint ( vh.Pos(), aCurrent ); + + if(!jtStart) + return SH_INCOMPLETE; + + BOOST_FOREACH( PNS_ITEM *item, jtStart->LinkList() ) + if(item->OfKind(PNS_ITEM::VIA)) + { + via = (PNS_VIA *) item; + break; + } + + if( via && m_currentNode->CheckColliding(via, aObstacleSolid) ) + return onCollidingVia ( aObstacleSolid, via ); + } + + walkaround.SetSolidsOnly( true ); + walkaround.SetIterationLimit ( 8 ); // fixme: make configurable + + int currentRank = aCurrent->Rank(); + int nextRank; + + if (!Settings().JumpOverObstacles() ) + { + nextRank = currentRank + 10000; + walkaround.SetSingleDirection( false ); + } else { + nextRank = currentRank - 1; + walkaround.SetSingleDirection( true ); + } + + + if (walkaround.Route( *aCurrent, *walkaroundLine, false ) != PNS_WALKAROUND::DONE ) return SH_INCOMPLETE; + + walkaroundLine->ClearSegmentLinks(); + walkaroundLine->Unmark(); + walkaroundLine->Line().Simplify(); + + if(walkaroundLine->HasLoops()) + return SH_INCOMPLETE; + + if (aCurrent->Marker() & MK_HEAD) + { + walkaroundLine->Mark(MK_HEAD); + m_newHead = *walkaroundLine; + } + + + m_currentNode->Replace( aCurrent, walkaroundLine ); + walkaroundLine->SetRank ( nextRank ); + +#ifdef DEBUG + m_logger.NewGroup ("on-colliding-solid", m_iter); + m_logger.Log ( aObstacleSolid, 0, "obstacle-solid"); + m_logger.Log ( aCurrent, 1, "current-line"); + m_logger.Log ( walkaroundLine, 3, "walk-line"); +#endif + + popLine(); + pushLine(walkaroundLine); + + return SH_OK; } -bool PNS_SHOVE::reduceSpringback( PNS_LINE* aHead ) +bool PNS_SHOVE::reduceSpringback( const PNS_ITEMSET& aHeadSet ) { bool rv = false; while( !m_nodeStack.empty() ) { - SpringbackTag st_stack = m_nodeStack.back(); - bool tail_ok = true; + SpringbackTag spTag = m_nodeStack.back(); - if( !st_stack.node->CheckColliding( aHead ) && tail_ok ) + if( !spTag.node->CheckColliding( aHeadSet ) ) { rv = true; - delete st_stack.node; + + delete spTag.node; m_nodeStack.pop_back(); } else - break; + break; } return rv; } -bool PNS_SHOVE::pushSpringback( PNS_NODE* aNode, PNS_LINE* aHead, const PNS_COST_ESTIMATOR& aCost ) + +bool PNS_SHOVE::pushSpringback( PNS_NODE* aNode, const PNS_ITEMSET& aHeadItems, const PNS_COST_ESTIMATOR& aCost ) { - BOX2I headBB = aHead->GetCLine().BBox(); SpringbackTag st; st.node = aNode; st.cost = aCost; - st.length = std::max( headBB.GetWidth(), headBB.GetHeight() );; + st.headItems = aHeadItems; m_nodeStack.push_back( st ); return true; } -const PNS_COST_ESTIMATOR PNS_SHOVE::TotalCost() const +PNS_SHOVE::ShoveStatus PNS_SHOVE::pushVia ( PNS_VIA *aVia, const VECTOR2I& aForce, int aCurrentRank ) { - if( m_nodeStack.empty() ) - return PNS_COST_ESTIMATOR(); - else - return m_nodeStack.back().cost; + + LinePairVec draggedLines; + VECTOR2I p0 ( aVia->Pos() ); + PNS_JOINT *jt = m_currentNode->FindJoint( p0, 1, aVia->Net() ); + PNS_VIA *pushedVia = aVia -> Clone(); + + pushedVia->SetPos( p0 + aForce ); + pushedVia->Mark( aVia->Marker() ) ; + + if(aVia->Marker() & MK_HEAD) + { + m_draggedVia = pushedVia; + } + + if(!jt) + { + TRACEn(1, "weird, can't find the center-of-via joint\n"); + return SH_INCOMPLETE; + } + + BOOST_FOREACH(PNS_ITEM *item, jt->LinkList() ) + { + if(item->OfKind( PNS_ITEM::SEGMENT )) + { + PNS_SEGMENT *seg = (PNS_SEGMENT *) item; + LinePair lp; + int segIndex; + + lp.first = assembleLine(seg, &segIndex); + + assert(segIndex == 0 || (segIndex == (lp.first->SegmentCount() - 1) )); + + if(segIndex == 0) + lp.first->Reverse(); + + lp.second = cloneLine( lp.first ); + lp.second->ClearSegmentLinks(); + lp.second->DragCorner( p0 + aForce, lp.second->CLine().Find( p0 )); + lp.second->AppendVia ( *pushedVia ); + draggedLines.push_back(lp); + } + } + + m_currentNode->Remove( aVia ); + m_currentNode->Add ( pushedVia ); + + if(aVia->BelongsTo(m_currentNode)) + delete aVia; + + pushedVia -> SetRank (aCurrentRank - 1); + +#ifdef DEBUG + m_logger.Log ( aVia, 0, "obstacle-via"); + m_logger.Log ( pushedVia, 1, "pushed-via"); +#endif + + BOOST_FOREACH( LinePair lp, draggedLines ) + { + if(lp.first->Marker() & MK_HEAD) + { + lp.second->Mark ( MK_HEAD ); + m_newHead = *lp.second; + } + + unwindStack(lp.first); + + if(lp.second->SegmentCount()) + { + m_currentNode->Replace ( lp.first, lp.second ); + lp.second->SetRank( aCurrentRank - 1); + pushLine(lp.second); + } else + m_currentNode->Remove(lp.first); + +#ifdef DEBUG + m_logger.Log ( lp.first, 2, "fan-pre"); + m_logger.Log ( lp.second, 3, "fan-post"); +#endif + } + + return SH_OK; } -PNS_SHOVE::ShoveStatus PNS_SHOVE::ShoveLines( PNS_LINE* aCurrentHead ) +PNS_SHOVE::ShoveStatus PNS_SHOVE::onCollidingVia (PNS_ITEM *aCurrent, PNS_VIA *aObstacleVia ) { - std::stack lineStack; - PNS_NODE* node, * parent; + int clearance = m_currentNode->GetClearance( aCurrent, aObstacleVia ) ; + LinePairVec draggedLines; + VECTOR2I p0 ( aObstacleVia->Pos() ); + bool colLine = false, colVia = false; + PNS_LINE *currentLine = NULL; + VECTOR2I mtvLine, mtvVia, mtv, mtvSolid; + int rank = -1; + + if( aCurrent->OfKind (PNS_ITEM::LINE)) + { + +#ifdef DEBUG + m_logger.NewGroup ("push-via-by-line", m_iter); + m_logger.Log(aCurrent, 4, "current"); +#endif + + currentLine = (PNS_LINE*) aCurrent; + colLine = CollideShapes( aObstacleVia->Shape(), currentLine->Shape(), clearance + currentLine->Width() / 2 + PNS_HULL_MARGIN, true, mtvLine ); + + if(currentLine->EndsWithVia()) + colVia = CollideShapes (currentLine->Via().Shape(), aObstacleVia->Shape(), clearance + PNS_HULL_MARGIN, true, mtvVia); + + if(!colLine && !colVia) + return SH_OK; + + if(colLine && colVia) + mtv = mtvVia.EuclideanNorm() > mtvLine.EuclideanNorm() ? mtvVia : mtvLine; + else if (colLine) + mtv = mtvLine; + else + mtv = mtvVia; + rank = currentLine->Rank(); + } + else if (aCurrent->OfKind(PNS_ITEM::SOLID)) + { + CollideShapes( aObstacleVia->Shape(), aCurrent->Shape(), clearance + PNS_HULL_MARGIN, true, mtvSolid ); + mtv = mtvSolid; + rank = aCurrent->Rank() + 10000; + } + + return pushVia ( aObstacleVia, mtv, rank ); +} + +PNS_SHOVE::ShoveStatus PNS_SHOVE::onReverseCollidingVia (PNS_LINE *aCurrent, PNS_VIA *aObstacleVia ) +{ + std::vector steps; + int n = 0; + PNS_LINE *cur = cloneLine( aCurrent ); + cur->ClearSegmentLinks(); + + PNS_JOINT *jt = m_currentNode->FindJoint ( aObstacleVia->Pos(), aObstacleVia ); + PNS_LINE *shoved = cloneLine( aCurrent ); + shoved->ClearSegmentLinks(); + + + cur->RemoveVia(); + unwindStack(aCurrent); + + BOOST_FOREACH( PNS_ITEM *item, jt->LinkList() ) + { + + if (item->OfKind(PNS_ITEM::SEGMENT) && item->LayersOverlap (aCurrent) ) + { + PNS_SEGMENT *seg = (PNS_SEGMENT *) item; + PNS_LINE *head = assembleLine( seg ); + + head->AppendVia( *aObstacleVia ); + + ShoveStatus st = processSingleLine ( head, cur, shoved ); + + if( st != SH_OK ) + { +#ifdef DEBUG + m_logger.NewGroup ("on-reverse-via-fail-shove", m_iter); + m_logger.Log ( aObstacleVia, 0, "the-via"); + m_logger.Log ( aCurrent, 1, "current-line"); + m_logger.Log ( shoved, 3, "shoved-line"); +#endif + + return st; + } + cur->SetShape ( shoved->CLine() ); + n++; + } + } + + if(!n) + { +#ifdef DEBUG + m_logger.NewGroup ("on-reverse-via-fail-lonevia", m_iter); + m_logger.Log ( aObstacleVia, 0, "the-via"); + m_logger.Log ( aCurrent, 1, "current-line"); +#endif + + PNS_LINE head(*aCurrent); + head.Line().Clear(); + head.AppendVia( *aObstacleVia ); + head.ClearSegmentLinks(); + + ShoveStatus st = processSingleLine ( &head, aCurrent, shoved ); + + if( st != SH_OK ) + return st; + + cur->SetShape ( shoved->CLine() ); + } + + if(aCurrent->EndsWithVia()) + shoved->AppendVia( aCurrent->Via( )); + +#ifdef DEBUG + m_logger.NewGroup ("on-reverse-via", m_iter); + m_logger.Log ( aObstacleVia, 0, "the-via"); + m_logger.Log ( aCurrent, 1, "current-line"); + m_logger.Log ( shoved, 3, "shoved-line"); +#endif + int currentRank = aCurrent->Rank(); + m_currentNode->Replace ( aCurrent, shoved ); + + pushLine(shoved); + shoved->SetRank( currentRank ); + + return SH_OK; +} + + +void PNS_SHOVE::unwindStack ( PNS_SEGMENT *seg ) +{ + for (std::vector::iterator i = m_lineStack.begin(); i != m_lineStack.end(); ) + { + if( (*i)->ContainsSegment ( seg ) ) + i = m_lineStack.erase( i ); + else + i++; + } + + for (std::vector::iterator i = m_optimizerQueue.begin(); i != m_optimizerQueue.end(); ) + { + if( (*i)->ContainsSegment ( seg ) ) + i = m_optimizerQueue.erase( i ); + else + i++; + } +} + +void PNS_SHOVE::unwindStack ( PNS_ITEM *item ) +{ + if (item->OfKind(PNS_ITEM::SEGMENT)) + unwindStack(static_cast(item)); + else if (item->OfKind(PNS_ITEM::LINE)) { + PNS_LINE *l = static_cast( item ); + + if (!l->LinkedSegments()) + return; + + BOOST_FOREACH(PNS_SEGMENT *seg, *l->LinkedSegments() ) + unwindStack(seg); + } +} + +void PNS_SHOVE::pushLine (PNS_LINE *l) +{ + if(l->LinkCount() >= 0 && (l->LinkCount() != l->SegmentCount())) + assert(false); + + m_lineStack.push_back(l); + m_optimizerQueue.push_back(l); +} + +void PNS_SHOVE::popLine( ) +{ + PNS_LINE *l = m_lineStack.back(); + + for (std::vector::iterator i = m_optimizerQueue.begin(); i != m_optimizerQueue.end(); ) + { + if( (*i) == l ) + { + i = m_optimizerQueue.erase( i ); + } else + i++; + } + + m_lineStack.pop_back(); +} + +PNS_SHOVE::ShoveStatus PNS_SHOVE::shoveIteration(int aIter) +{ + PNS_LINE* currentLine = m_lineStack.back(); + PNS_NODE::OptObstacle nearest; + ShoveStatus st; + + PNS_ITEM::PnsKind search_order[] = { PNS_ITEM::SOLID, PNS_ITEM::VIA, PNS_ITEM::SEGMENT }; + + for(int i = 0; i < 3; i++) + { + nearest = m_currentNode->NearestObstacle( currentLine, search_order[i] ); + if(nearest) + break; + } + + if( !nearest ) + { + m_lineStack.pop_back(); + return SH_OK; + } + + PNS_ITEM *ni = nearest->item; + + unwindStack(ni); + + if( !ni->OfKind(PNS_ITEM::SOLID) && ni->Rank() >= 0 && ni->Rank() > currentLine->Rank() ) + { + switch( ni->Kind() ) + { + case PNS_ITEM::VIA: + { + PNS_VIA *revVia = (PNS_VIA *) ni; + TRACE( 2, "iter %d: reverse-collide-via", aIter ); + + if (currentLine->EndsWithVia() && m_currentNode->CheckColliding(¤tLine->Via(), revVia)) + { + st = SH_INCOMPLETE; + } else { + st = onReverseCollidingVia ( currentLine, revVia ); + } + + break; + } + + case PNS_ITEM::SEGMENT: + { + PNS_SEGMENT *seg = (PNS_SEGMENT* ) ni; + TRACE( 2, "iter %d: reverse-collide-segment ", aIter ); + PNS_LINE *revLine = assembleLine ( seg ); + + popLine(); + st = onCollidingLine( revLine, currentLine ); + pushLine(revLine); + break; + } + + default: + assert(false); + } + } else { // "forward" collisoins + switch( ni->Kind() ) + { + case PNS_ITEM::SEGMENT: + TRACE( 2, "iter %d: collide-segment ", aIter ); + st = onCollidingSegment( currentLine, (PNS_SEGMENT* ) ni ); + break; + + case PNS_ITEM::VIA: + TRACE( 2, "iter %d: shove-via ", aIter ); + st = onCollidingVia ( currentLine, (PNS_VIA *) ni ); + break; + + case PNS_ITEM::SOLID: + TRACE( 2, "iter %d: walk-solid ", aIter ); + st = onCollidingSolid ( currentLine, (PNS_SOLID *) ni ); + break; + + default: + break; + } + } + + return st; +} + +PNS_SHOVE::ShoveStatus PNS_SHOVE::shoveMainLoop() +{ + ShoveStatus st = SH_OK; + + TRACE( 1, "ShoveStart [root: %d jts, current: %d jts]", m_root->JointCount() % + m_currentNode->JointCount() ); + + int iterLimit = Settings().ShoveIterationLimit(); + TIME_LIMIT timeLimit = Settings().ShoveTimeLimit(); + + m_iter = 0; + + timeLimit.Restart(); + + while( !m_lineStack.empty() ) + { + st = shoveIteration(m_iter); + + m_iter++; + + if( st == SH_INCOMPLETE || timeLimit.Expired() || m_iter >= iterLimit ) + { + st = SH_INCOMPLETE; + break; + } + } + + return st; +} + + +PNS_SHOVE::ShoveStatus PNS_SHOVE::ShoveLines( const PNS_LINE& aCurrentHead ) +{ + ShoveStatus st = SH_OK; + + // empty head? nothing to shove... + if( ! aCurrentHead.SegmentCount() ) + return SH_INCOMPLETE; + + PNS_LINE* head = cloneLine ( &aCurrentHead ); + head->ClearSegmentLinks(); + + m_lineStack.clear(); + m_optimizerQueue.clear(); + m_newHead = OptLine(); + m_logger.Clear(); + + PNS_ITEMSET headSet ( cloneLine( &aCurrentHead ) ); + + reduceSpringback( headSet ); + + PNS_NODE *parent = m_nodeStack.empty() ? m_root : m_nodeStack.back().node; + + m_currentNode = parent->Branch(); + m_currentNode->ClearRanks(); + m_currentNode->Add( head ); + + head->Mark ( MK_HEAD ); + head->SetRank ( 100000 ); + + m_logger.NewGroup ("initial", 0); + m_logger.Log ( head, 0, "head"); + PNS_VIA* headVia = NULL; - bool fail = false; - int iter = 0; - - PNS_LINE* head = aCurrentHead->Clone(); - - reduceSpringback( aCurrentHead ); - - parent = m_nodeStack.empty() ? m_root : m_nodeStack.back().node; - node = parent->Branch(); - - lineStack.push( head ); - - // node->Add(tail); - node->Add( head ); if( head->EndsWithVia() ) { - headVia = head->GetVia().Clone(); - node->Add( headVia ); + headVia = head->Via().Clone(); + m_currentNode->Add( headVia ); + headVia->Mark( MK_HEAD ); + headVia->SetRank ( 100000 ); + m_logger.Log ( headVia, 0, "head-via"); + } - PNS_OPTIMIZER optimizer( node ); + pushLine (head); + st = shoveMainLoop(); + runOptimizer ( m_currentNode, head ); - optimizer.SetEffortLevel( PNS_OPTIMIZER::MERGE_SEGMENTS | PNS_OPTIMIZER::SMART_PADS ); - optimizer.SetCollisionMask( -1 ); - PNS_NODE::OptObstacle nearest; - - optimizer.CacheStaticItem( head ); - - if( headVia ) - optimizer.CacheStaticItem( headVia ); - - TRACE( 1, "ShoveStart [root: %d jts, node: %d jts]", m_root->JointCount() % - node->JointCount() ); - - // PNS_ITEM *lastWalkSolid = NULL; - prof_counter totalRealTime; - - wxLongLong t_start = wxGetLocalTimeMillis(); - - while( !lineStack.empty() ) + if( m_newHead && st == SH_OK ) { - wxLongLong t_cur = wxGetLocalTimeMillis(); + st = SH_HEAD_MODIFIED; + Router()->DisplayDebugLine ( m_newHead->CLine(), 3, 20000 ); + } - if( (t_cur - t_start).ToLong() > ShoveTimeLimit ) - { - fail = true; - break; - } + m_currentNode->RemoveByMarker ( MK_HEAD ); - iter++; + TRACE( 1, "Shove status : %s after %d iterations", ((st == SH_OK || st == SH_HEAD_MODIFIED) ? "OK" : "FAILURE") % m_iter ); - if( iter > m_iterLimit ) - { - fail = true; - break; - } - - PNS_LINE* currentLine = lineStack.top(); - - prof_start( &totalRealTime ); - nearest = node->NearestObstacle( currentLine, PNS_ITEM::ANY ); - prof_end( &totalRealTime ); - - TRACE( 2, "t-nearestObstacle %lld us", totalRealTime.usecs() ); - - if( !nearest ) - { - if( lineStack.size() > 1 ) - { - PNS_LINE* original = lineStack.top(); - PNS_LINE optimized; - int r_start, r_end; - - original->GetAffectedRange( r_start, r_end ); - - TRACE( 1, "Iter %d optimize-line [range %d-%d, total %d]", - iter % r_start % r_end % original->GetCLine().PointCount() ); - // lastWalkSolid = NULL; - prof_start( &totalRealTime ); - - if( optimizer.Optimize( original, &optimized ) ) - { - node->Remove( original ); - optimizer.CacheRemove( original ); - node->Add( &optimized ); - - if( original->BelongsTo( node ) ) - delete original; - } - - prof_end( &totalRealTime ); - - TRACE( 2, "t-optimizeObstacle %lld us", totalRealTime.usecs() ); - } - - lineStack.pop(); - } - else - { - switch( nearest->item->GetKind() ) - { - case PNS_ITEM::SEGMENT: - { - TRACE( 1, "Iter %d shove-line", iter ); - - PNS_SEGMENT* pseg = static_cast(nearest->item); - PNS_LINE* collidingLine = node->AssembleLine( pseg ); - PNS_LINE* shovedLine = collidingLine->CloneProperties(); - - prof_start( &totalRealTime ); - ShoveStatus st = shoveSingleLine( node, currentLine, collidingLine, - *pseg, shovedLine ); - prof_end( &totalRealTime ); - - TRACE( 2, "t-shoveSingle %lld us", totalRealTime.usecs() ); - - if( st == SH_OK ) - { - node->Replace( collidingLine, shovedLine ); - - if( collidingLine->BelongsTo( node ) ) - delete collidingLine; - - optimizer.CacheRemove( collidingLine ); - lineStack.push( shovedLine ); - } - else - fail = true; - - // lastWalkSolid = NULL; - - break; - } // case SEGMENT - - case PNS_ITEM::SOLID: - case PNS_ITEM::VIA: - { - TRACE( 1, "Iter %d walkaround-solid [%p]", iter % nearest->item ); - - if( lineStack.size() == 1 ) - { - fail = true; - break; - } - -/* if(lastWalkSolid == nearest->item) - * { - * fail = true; - * break; - * }*/ - - PNS_WALKAROUND walkaround( node ); - PNS_LINE* walkaroundLine = currentLine->CloneProperties(); - - walkaround.SetSolidsOnly( true ); - walkaround.SetSingleDirection( true ); - - prof_start( &totalRealTime ); - walkaround.Route( *currentLine, *walkaroundLine, false ); - prof_end( &totalRealTime ); - - TRACE( 2, "t-walkSolid %lld us", totalRealTime.usecs() ); - - - node->Replace( currentLine, walkaroundLine ); - - if( currentLine->BelongsTo( node ) ) - delete currentLine; - - optimizer.CacheRemove( currentLine ); - lineStack.top() = walkaroundLine; - - // lastWalkSolid = nearest->item; - break; - } - - default: - break; - } // switch - - if( fail ) - break; - } - } - - node->Remove( head ); - delete head; - - if( headVia ) + if( st == SH_OK || st == SH_HEAD_MODIFIED ) { - node->Remove( headVia ); - delete headVia; - } - - TRACE( 1, "Shove status : %s after %d iterations", (fail ? "FAILED" : "OK") % iter ); - - if( !fail ) - { - pushSpringback( node, aCurrentHead, PNS_COST_ESTIMATOR() ); - return SH_OK; + pushSpringback( m_currentNode, headSet, PNS_COST_ESTIMATOR() ); } else { - delete node; - return SH_INCOMPLETE; + delete m_currentNode; + + m_currentNode = parent; + m_newHead = OptLine(); } + + return st; +} + + +PNS_SHOVE::ShoveStatus PNS_SHOVE::ShoveDraggingVia ( PNS_VIA *aVia, const VECTOR2I& aWhere, PNS_VIA **aNewVia ) +{ + ShoveStatus st = SH_OK; + + m_lineStack.clear(); + m_optimizerQueue.clear(); + m_newHead = OptLine(); + m_draggedVia = NULL; + + //reduceSpringback( aCurrentHead ); + + PNS_NODE *parent = m_nodeStack.empty() ? m_root : m_nodeStack.back().node; + m_currentNode = parent->Branch(); + m_currentNode->ClearRanks(); + + aVia->Mark( MK_HEAD ); + + + st = pushVia ( aVia, (aWhere - aVia->Pos()), 0 ); + st = shoveMainLoop(); + runOptimizer ( m_currentNode, NULL ); + + if( st == SH_OK || st == SH_HEAD_MODIFIED ) + { + pushSpringback( m_currentNode, PNS_ITEMSET(), PNS_COST_ESTIMATOR() ); + } + else + { + delete m_currentNode; + m_currentNode = parent; + } + + if(aNewVia) + *aNewVia = m_draggedVia; + + return st; +} + +void PNS_SHOVE::runOptimizer ( PNS_NODE *node, PNS_LINE *head ) +{ + PNS_OPTIMIZER optimizer( node ); + int optFlags = 0, n_passes = 0, extend = 0; + + PNS_OPTIMIZATION_EFFORT effort = Settings().OptimizerEffort(); + + + switch(effort) + { + case OE_Low: + optFlags = PNS_OPTIMIZER::MERGE_OBTUSE; + n_passes = 1; + extend = 0; + break; + case OE_Medium: + optFlags = PNS_OPTIMIZER::MERGE_OBTUSE; + n_passes = 2; + extend = 1; + break; + case OE_Full: + optFlags = PNS_OPTIMIZER::MERGE_SEGMENTS; + n_passes = 2; + break; + default: + break; + } + + if(Settings().SmartPads()) + optFlags |= PNS_OPTIMIZER::SMART_PADS ; + + optimizer.SetEffortLevel( optFlags ); + optimizer.SetCollisionMask( PNS_ITEM::ANY ); + + for(int pass = 0; pass < n_passes; pass ++) + { + std::reverse ( m_optimizerQueue.begin(), m_optimizerQueue.end() ); + for(std::vector::iterator i = m_optimizerQueue.begin(); i != m_optimizerQueue.end(); ++i) + { + PNS_LINE *line = *i; + + if( ! (line -> Marker() & MK_HEAD ) ) + { + if(effort == OE_Medium || effort == OE_Low ) + { + RANGE r = findShovedVertexRange ( line ); + + if (r.Defined()) + { + int start_v = std::max(0, r.MinV() - extend); + int end_v = std::min(line->PointCount() - 1 , r.MaxV() + extend ); + line->ClipVertexRange ( start_v, end_v ); + } + } + + PNS_LINE optimized; + + if( optimizer.Optimize( line, &optimized ) ) + { + node->Remove( line ); + line->SetShape(optimized.CLine()); + node->Add( line ); + } + } + } + } + + +} + +const RANGE PNS_SHOVE::findShovedVertexRange ( PNS_LINE *l ) +{ + RANGE r; + + for(int i = 0; i < l->SegmentCount(); i++) + { + PNS_SEGMENT *s = (*l->LinkedSegments())[i]; + PNS_JOINT *jt = m_root->FindJoint( s->Seg().A, s->Layer(), s->Net() ); + bool found = false; + + if(jt) + { + BOOST_FOREACH( PNS_ITEM *item, jt->LinkList() ) + { + if(item->OfKind(PNS_ITEM::SEGMENT)) + { + PNS_SEGMENT *s_old = (PNS_SEGMENT *) item; + + if( s_old->Net() == s->Net() && + s_old->Layer() == s->Layer() && + s_old->Seg().A == s->Seg().A && + s_old->Seg().B == s->Seg().B ) + { + found = true; + break; + } + } + } + } + + if(!found) + { + r.Grow(i); + r.Grow(i + 1); + } + } + return r; +} + +PNS_NODE* PNS_SHOVE::CurrentNode() +{ + return m_nodeStack.empty() ? m_root : m_nodeStack.back().node; +} + +const PNS_LINE PNS_SHOVE::NewHead() const +{ + assert(m_newHead); + return *m_newHead; +} + +void PNS_SHOVE::SetInitialLine ( PNS_LINE *aInitial ) +{ + m_root = m_root->Branch(); + m_root->Remove ( aInitial ); } diff --git a/pcbnew/router/pns_shove.h b/pcbnew/router/pns_shove.h index 581d2f49f9..d070e89790 100644 --- a/pcbnew/router/pns_shove.h +++ b/pcbnew/router/pns_shove.h @@ -1,7 +1,7 @@ /* * KiRouter - a push-and-(sometimes-)shove PCB router * - * Copyright (C) 2013 CERN + * Copyright (C) 2013-2014 CERN * Author: Tomasz Wlostowski * * This program is free software: you can redistribute it and/or modify it @@ -15,7 +15,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with this program. If not, see . + * with this program. If not, see . */ #ifndef __PNS_SHOVE_H @@ -25,61 +25,114 @@ #include #include "pns_optimizer.h" +#include "pns_routing_settings.h" +#include "pns_algo_base.h" +#include "pns_logger.h" +#include "range.h" class PNS_LINE; class PNS_NODE; class PNS_ROUTER; -class PNS_SHOVE +/** + * Class PNS_SHOVE + * + * The actual Push and Shove algorithm. + */ + +class PNS_SHOVE : public PNS_ALGO_BASE { public: - PNS_SHOVE( PNS_NODE* aWorld ); - ~PNS_SHOVE(); enum ShoveStatus { SH_OK = 0, SH_NULL, - SH_INCOMPLETE + SH_INCOMPLETE, + SH_HEAD_MODIFIED }; - ShoveStatus ShoveLines( PNS_LINE* aCurrentHead ); + PNS_SHOVE( PNS_NODE* aWorld, PNS_ROUTER *aRouter ); + ~PNS_SHOVE(); - PNS_NODE* GetCurrentNode() + virtual PNS_LOGGER *Logger() { - return m_nodeStack.empty() ? m_root : m_nodeStack.back().node; + return &m_logger; } - const PNS_COST_ESTIMATOR TotalCost() const; + ShoveStatus ShoveLines( const PNS_LINE& aCurrentHead ); + ShoveStatus ShoveDraggingVia ( PNS_VIA *aVia, const VECTOR2I& aWhere, PNS_VIA **aNewVia ); - void Reset(); - void KillChildNodes(); + PNS_NODE* CurrentNode(); + + const PNS_LINE NewHead() const; + + void SetInitialLine ( PNS_LINE *aInitial ); private: - static const int ShoveTimeLimit = 3000; - - bool tryShove( PNS_NODE* aWorld, PNS_LINE* aTrack, PNS_LINE* aObstacle, - PNS_SEGMENT& aObstacleSeg, PNS_LINE* aResult, bool aInvertWinding ); - - ShoveStatus shoveSingleLine( PNS_NODE* aNode, PNS_LINE* aCurrent, PNS_LINE* aObstacle, - PNS_SEGMENT& aObstacleSeg, PNS_LINE* aResult ); - - bool reduceSpringback( PNS_LINE* aHead ); - bool pushSpringback( PNS_NODE* aNode, PNS_LINE* aHead, const PNS_COST_ESTIMATOR& aCost ); + typedef std::vector HullSet; + typedef boost::optional OptLine; + typedef std::pair LinePair; + typedef std::vector LinePairVec; struct SpringbackTag { int64_t length; int segments; VECTOR2I p; - PNS_NODE* node; + PNS_NODE *node; + PNS_ITEMSET headItems; PNS_COST_ESTIMATOR cost; }; - std::vector m_nodeStack; - PNS_NODE* m_root; - PNS_NODE* m_currentNode; - int m_iterLimit; + ShoveStatus processSingleLine(PNS_LINE *aCurrent, PNS_LINE* aObstacle, PNS_LINE *aShoved ); + ShoveStatus processHullSet ( PNS_LINE *aCurrent, PNS_LINE *aObstacle, PNS_LINE *aShoved, const HullSet& hulls ); + + bool reduceSpringback( const PNS_ITEMSET &aHeadItems ); + bool pushSpringback( PNS_NODE* aNode, const PNS_ITEMSET &aHeadItems, const PNS_COST_ESTIMATOR& aCost ); + + ShoveStatus walkaroundLoneVia ( PNS_LINE *aCurrent, PNS_LINE *aObstacle, PNS_LINE *aShoved ); + bool checkBumpDirection ( PNS_LINE *aCurrent, PNS_LINE *aShoved ) const; + + ShoveStatus onCollidingLine( PNS_LINE *aCurrent, PNS_LINE *aObstacle ); + ShoveStatus onCollidingSegment( PNS_LINE *aCurrent, PNS_SEGMENT *aObstacleSeg ); + ShoveStatus onCollidingSolid( PNS_LINE *aCurrent, PNS_SOLID *aObstacleSolid ); + ShoveStatus onCollidingVia( PNS_ITEM *aCurrent, PNS_VIA *aObstacleVia ); + ShoveStatus onReverseCollidingVia( PNS_LINE *aCurrent, PNS_VIA *aObstacleVia ); + ShoveStatus pushVia ( PNS_VIA *aVia, const VECTOR2I& aForce, int aCurrentRank ); + + void unwindStack ( PNS_SEGMENT *seg ); + void unwindStack ( PNS_ITEM *item ); + + void runOptimizer ( PNS_NODE *node, PNS_LINE *head ); + + void pushLine ( PNS_LINE *l ); + void popLine(); + + const RANGE findShovedVertexRange ( PNS_LINE *l ); + + PNS_LINE *assembleLine ( const PNS_SEGMENT *aSeg, int *aIndex = NULL ); + PNS_LINE *cloneLine ( const PNS_LINE *aLine ); + + ShoveStatus shoveIteration(int aIter); + ShoveStatus shoveMainLoop(); + + std::vector m_nodeStack; + std::vector m_lineStack; + std::vector m_optimizerQueue; + std::vector m_gcItems; + + PNS_NODE* m_root; + PNS_NODE* m_currentNode; + PNS_LINE* m_currentHead; + PNS_LINE* m_collidingLine; + + OptLine m_newHead; + + PNS_LOGGER m_logger; + PNS_VIA* m_draggedVia; + + int m_iter; }; -#endif +#endif // __PNS_SHOVE_H diff --git a/pcbnew/router/pns_solid.cpp b/pcbnew/router/pns_solid.cpp index 807f9faa0b..da4fab064d 100644 --- a/pcbnew/router/pns_solid.cpp +++ b/pcbnew/router/pns_solid.cpp @@ -1,7 +1,7 @@ /* * KiRouter - a push-and-(sometimes-)shove PCB router * - * Copyright (C) 2013 CERN + * Copyright (C) 2013-2014 CERN * Author: Tomasz Wlostowski * * This program is free software: you can redistribute it and/or modify it @@ -15,7 +15,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with this program. If not, see . + * with this program. If not, see . */ #include @@ -30,13 +30,15 @@ const SHAPE_LINE_CHAIN PNS_SOLID::Hull( int aClearance, int aWalkaroundThickness ) const { + int cl = aClearance + aWalkaroundThickness / 2; + switch( m_shape->Type() ) { case SH_RECT: { SHAPE_RECT* rect = static_cast( m_shape ); return OctagonalHull( rect->GetPosition(), rect->GetSize(), - aClearance + 1, 0.2 * aClearance ); + cl + 1, 0.2 * cl ); } case SH_CIRCLE: @@ -44,7 +46,12 @@ const SHAPE_LINE_CHAIN PNS_SOLID::Hull( int aClearance, int aWalkaroundThickness SHAPE_CIRCLE* circle = static_cast( m_shape ); int r = circle->GetRadius(); return OctagonalHull( circle->GetCenter() - VECTOR2I( r, r ), VECTOR2I( 2 * r, 2 * r ), - aClearance + 1, 0.52 * (r + aClearance) ); + cl + 1, 0.52 * (r + cl) ); + } + case SH_SEGMENT: + { + SHAPE_SEGMENT *seg = static_cast ( m_shape ); + return SegmentHull (*seg, aClearance, aWalkaroundThickness ); } default: @@ -55,10 +62,8 @@ const SHAPE_LINE_CHAIN PNS_SOLID::Hull( int aClearance, int aWalkaroundThickness } -PNS_ITEM* PNS_SOLID::Clone() const +PNS_ITEM* PNS_SOLID::Clone ( ) const { - // solids are never cloned as the shove algorithm never moves them - assert( false ); - - return NULL; + PNS_ITEM *solid = new PNS_SOLID ( *this ); + return solid; } diff --git a/pcbnew/router/pns_solid.h b/pcbnew/router/pns_solid.h index b6f38a2851..d1e725a461 100644 --- a/pcbnew/router/pns_solid.h +++ b/pcbnew/router/pns_solid.h @@ -15,7 +15,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with this program. If not, see . + * with this program. If not, see . */ #ifndef __PNS_SOLID_H @@ -42,9 +42,16 @@ public: delete m_shape; } - PNS_ITEM* Clone() const; + PNS_SOLID( const PNS_SOLID& aSolid ) : + PNS_ITEM ( aSolid ) + { + m_shape = aSolid.m_shape->Clone(); + m_pos = aSolid.m_pos; + } + + PNS_ITEM* Clone( ) const; - const SHAPE* GetShape() const { return m_shape; } + const SHAPE* Shape() const { return m_shape; } const SHAPE_LINE_CHAIN Hull( int aClearance = 0, int aWalkaroundThickness = 0 ) const; @@ -56,18 +63,29 @@ public: m_shape = shape; } - const VECTOR2I& GetCenter() const + const VECTOR2I& Pos() const { - return m_center; + return m_pos; } - void SetCenter( const VECTOR2I& aCenter ) + void SetPos( const VECTOR2I& aCenter ) { - m_center = aCenter; + m_pos = aCenter; } + virtual VECTOR2I Anchor(int n) const + { + return m_pos; + } + + virtual int AnchorCount() const + { + return 1; + } + + private: - VECTOR2I m_center; + VECTOR2I m_pos; SHAPE* m_shape; }; diff --git a/pcbnew/router/pns_utils.cpp b/pcbnew/router/pns_utils.cpp index c787753534..e1042e6437 100644 --- a/pcbnew/router/pns_utils.cpp +++ b/pcbnew/router/pns_utils.cpp @@ -1,7 +1,7 @@ /* * KiRouter - a push-and-(sometimes-)shove PCB router * - * Copyright (C) 2013 CERN + * Copyright (C) 2013-2014 CERN * Author: Tomasz Wlostowski * * This program is free software: you can redistribute it and/or modify it @@ -15,13 +15,15 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with this program. If not, see . + * with this program. If not, see . */ #include "pns_utils.h" #include "pns_line.h" #include "pns_router.h" +#include + const SHAPE_LINE_CHAIN OctagonalHull( const VECTOR2I& aP0, const VECTOR2I& aSize, int aClearance, @@ -42,3 +44,51 @@ const SHAPE_LINE_CHAIN OctagonalHull( const VECTOR2I& aP0, return s; } + +const SHAPE_LINE_CHAIN SegmentHull ( const SHAPE_SEGMENT& aSeg, + int aClearance, + int aWalkaroundThickness ) +{ + int d = aSeg.GetWidth() / 2 + aClearance + aWalkaroundThickness / 2 + HULL_MARGIN; + int x = (int)( 2.0 / ( 1.0 + M_SQRT2 ) * d ); + + const VECTOR2I a = aSeg.GetSeg().A; + const VECTOR2I b = aSeg.GetSeg().B; + + VECTOR2I dir = b - a; + VECTOR2I p0 = dir.Perpendicular().Resize( d ); + VECTOR2I ds = dir.Perpendicular().Resize( x / 2 ); + VECTOR2I pd = dir.Resize( x / 2 ); + VECTOR2I dp = dir.Resize( d ); + + SHAPE_LINE_CHAIN s; + + s.SetClosed( true ); + + s.Append( b + p0 + pd ); + s.Append( b + dp + ds ); + s.Append( b + dp - ds ); + s.Append( b - p0 + pd ); + s.Append( a - p0 - pd ); + s.Append( a - dp - ds ); + s.Append( a - dp + ds ); + s.Append( a + p0 - pd ); + + // make sure the hull outline is always clockwise + if( s.CSegment( 0 ).Side( a ) < 0 ) + return s.Reverse(); + else + return s; +} + +SHAPE_RECT ApproximateSegmentAsRect( const SHAPE_SEGMENT& aSeg ) +{ + SHAPE_RECT r; + + VECTOR2I delta ( aSeg.GetWidth() / 2, aSeg.GetWidth() / 2 ); + VECTOR2I p0 ( aSeg.GetSeg().A - delta ); + VECTOR2I p1 ( aSeg.GetSeg().B + delta ); + + return SHAPE_RECT ( std::min(p0.x, p1.x), std::min(p0.y, p1.y), + std::abs(p1.x - p0.x), std::abs(p1.y - p0.y )); +} \ No newline at end of file diff --git a/pcbnew/router/pns_utils.h b/pcbnew/router/pns_utils.h index 655720f1f1..50bfc90179 100644 --- a/pcbnew/router/pns_utils.h +++ b/pcbnew/router/pns_utils.h @@ -1,7 +1,7 @@ /* * KiRouter - a push-and-(sometimes-)shove PCB router * - * Copyright (C) 2013 CERN + * Copyright (C) 2013-2014 CERN * Author: Tomasz Wlostowski * * This program is free software: you can redistribute it and/or modify it @@ -15,7 +15,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with this program. If not, see . + * with this program. If not, see . */ #ifndef __PNS_UTILS_H @@ -23,10 +23,20 @@ #include #include +#include +#include + +#define HULL_MARGIN 10 /** Various utility functions */ const SHAPE_LINE_CHAIN OctagonalHull( const VECTOR2I& aP0, const VECTOR2I& aSize, int aClearance, int aChamfer ); +const SHAPE_LINE_CHAIN SegmentHull ( const SHAPE_SEGMENT& aSeg, + int aClearance, + int aWalkaroundThickness ); + +SHAPE_RECT ApproximateSegmentAsRect( const SHAPE_SEGMENT& aSeg ); + #endif // __PNS_UTILS_H diff --git a/pcbnew/router/pns_via.cpp b/pcbnew/router/pns_via.cpp index 30666d78ab..037bb16e99 100644 --- a/pcbnew/router/pns_via.cpp +++ b/pcbnew/router/pns_via.cpp @@ -1,7 +1,7 @@ /* * KiRouter - a push-and-(sometimes-)shove PCB router * - * Copyright (C) 2013 CERN + * Copyright (C) 2013-2014 CERN * Author: Tomasz Wlostowski * * This program is free software: you can redistribute it and/or modify it @@ -15,98 +15,16 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with this program. If not, see . + * with this program. If not, see . */ #include "pns_via.h" #include "pns_node.h" #include "pns_utils.h" +#include "pns_router.h" #include -static bool Circle2Circle( VECTOR2I p1, VECTOR2I p2, int r1, int r2, VECTOR2I& force ) -{ - int mindist = r1 + r2; - VECTOR2I delta = p2 - p1; - int dist = delta.EuclideanNorm(); - - if( dist >= mindist ) - return false; - - force = delta.Resize( abs( mindist - dist ) + 1 ); - return true; -}; - -static bool Rect2Circle( VECTOR2I rp0, VECTOR2I rsize, VECTOR2I cc, int cr, VECTOR2I& force ) -{ - VECTOR2I vts[] = - { - VECTOR2I( rp0.x, rp0.y ), - VECTOR2I( rp0.x, rp0.y + rsize.y ), - VECTOR2I( rp0.x + rsize.x, rp0.y + rsize.y ), - VECTOR2I( rp0.x + rsize.x, rp0.y ), - VECTOR2I( rp0.x, rp0.y ) - }; - - int dist = INT_MAX; - VECTOR2I nearest; - - for( int i = 0; i < 4; i++ ) - { - SEG s( vts[i], vts[i + 1] ); - - VECTOR2I pn = s.NearestPoint( cc ); - - int d = (pn - cc).EuclideanNorm(); - - if( d < dist ) - { - nearest = pn; - dist = d; - } - } - - bool inside = cc.x >= rp0.x && cc.x <= (rp0.x + rsize.x) - && cc.y >= rp0.y && cc.y <= (rp0.y + rsize.y); - - VECTOR2I delta = cc - nearest; - - if( dist >= cr && !inside ) - return false; - - if( inside ) - force = -delta.Resize( abs( cr + dist ) + 1 ); - else - force = delta.Resize( abs( cr - dist ) + 1 ); - - return true; -}; - - -static bool ShPushoutForce( const SHAPE* shape, VECTOR2I p, int r, VECTOR2I& force, int clearance ) -{ - switch( shape->Type() ) - { - case SH_CIRCLE: - { - const SHAPE_CIRCLE* cir = static_cast(shape); - return Circle2Circle( cir->GetCenter(), p, cir->GetRadius(), r + clearance + 1, force ); - } - - case SH_RECT: - { - const SHAPE_RECT* rect = static_cast(shape); - return Rect2Circle( rect->GetPosition(), rect->GetSize(), p, r + clearance + 1, force ); - } - - default: - return false; - } - - return false; -} - - bool PNS_VIA::PushoutForce( PNS_NODE* aNode, const VECTOR2I& aDirection, VECTOR2I& aForce, @@ -115,30 +33,31 @@ bool PNS_VIA::PushoutForce( PNS_NODE* aNode, { int iter = 0; PNS_VIA mv( *this ); - VECTOR2I force, totalForce; + VECTOR2I force, totalForce, force2; + while( iter < aMaxIterations ) { - PNS_NODE::OptObstacle obs = aNode->CheckColliding( &mv, - aSolidsOnly ? PNS_ITEM::SOLID : PNS_ITEM::ANY ); + + PNS_NODE::OptObstacle obs = aNode->CheckColliding( &mv, aSolidsOnly ? PNS_ITEM::SOLID : PNS_ITEM::ANY ); if( !obs ) break; int clearance = aNode->GetClearance( obs->item, &mv ); - if( iter > 10 ) + if( iter > aMaxIterations / 2 ) { - VECTOR2I l = -aDirection.Resize( m_diameter / 4 ); + VECTOR2I l = aDirection.Resize( m_diameter / 2 ); totalForce += l; - mv.SetPos( mv.GetPos() + l ); + mv.SetPos( mv.Pos() + l ); } - if( ShPushoutForce( obs->item->GetShape(), mv.GetPos(), mv.GetDiameter() / 2, force, - clearance ) ) - { - totalForce += force; - mv.SetPos( mv.GetPos() + force ); + bool col = CollideShapes( obs->item->Shape(), mv.Shape(), clearance, true, force2 ); + + if(col) { + totalForce += force2; + mv.SetPos( mv.Pos() + force2 ); } @@ -155,7 +74,26 @@ bool PNS_VIA::PushoutForce( PNS_NODE* aNode, const SHAPE_LINE_CHAIN PNS_VIA::Hull( int aClearance, int aWalkaroundThickness ) const { + int cl = (aClearance + aWalkaroundThickness / 2); + return OctagonalHull( m_pos - VECTOR2I( m_diameter / 2, m_diameter / 2 ), VECTOR2I( m_diameter, - m_diameter ), aClearance + 1, (2 * aClearance + m_diameter) * 0.26 ); + m_diameter ), cl + 1, (2 * cl + m_diameter) * 0.26 ); +} + +PNS_VIA* PNS_VIA::Clone ( ) const +{ + PNS_VIA* v = new PNS_VIA(); + + v->SetNet( Net() ); + v->SetLayers( Layers() ); + v->m_pos = m_pos; + v->m_diameter = m_diameter; + v->m_drill = m_drill; + v->m_owner = NULL; + v->m_shape = SHAPE_CIRCLE( m_pos, m_diameter / 2 ); + v->m_rank = m_rank; + v->m_marker = m_marker; + + return v; } diff --git a/pcbnew/router/pns_via.h b/pcbnew/router/pns_via.h index 1a0fc2a2bd..684116b6da 100644 --- a/pcbnew/router/pns_via.h +++ b/pcbnew/router/pns_via.h @@ -1,7 +1,7 @@ /* * KiRouter - a push-and-(sometimes-)shove PCB router * - * Copyright (C) 2013 CERN + * Copyright (C) 2013-2014 CERN * Author: Tomasz Wlostowski * * This program is free software: you can redistribute it and/or modify it @@ -15,7 +15,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with this program. If not, see . + * with this program. If not, see . */ #ifndef __PNS_VIA_H @@ -45,16 +45,21 @@ public: }; - PNS_VIA( const PNS_VIA& b ) : PNS_ITEM( VIA ) + PNS_VIA( const PNS_VIA& b ) : + PNS_ITEM( VIA ) { - SetNet( b.GetNet() ); - SetLayers( b.GetLayers() ); + SetNet( b.Net() ); + SetLayers( b.Layers() ); m_pos = b.m_pos; m_diameter = b.m_diameter; m_shape = SHAPE_CIRCLE( m_pos, m_diameter / 2 ); + m_marker = b.m_marker; + m_rank = b.m_rank; + m_owner = b.m_owner; + m_drill = b.m_drill; } - const VECTOR2I& GetPos() const + const VECTOR2I& Pos() const { return m_pos; } @@ -65,7 +70,7 @@ public: m_shape.SetCenter( aPos ); } - int GetDiameter() const + int Diameter() const { return m_diameter; } @@ -76,7 +81,7 @@ public: m_shape.SetRadius( m_diameter / 2 ); } - int GetDrill() const + int Drill() const { return m_drill; } @@ -92,25 +97,24 @@ public: bool aSolidsOnly = true, int aMaxIterations = 10 ); - const SHAPE* GetShape() const + const SHAPE* Shape() const { return &m_shape; } - PNS_VIA* Clone() const - { - PNS_VIA* v = new PNS_VIA(); - - v->SetNet( GetNet() ); - v->SetLayers( GetLayers() ); - v->m_pos = m_pos; - v->m_diameter = m_diameter; - v->m_shape = SHAPE_CIRCLE( m_pos, m_diameter / 2 ); - - return v; - } + PNS_VIA* Clone ( ) const; const SHAPE_LINE_CHAIN Hull( int aClearance = 0, int aWalkaroundThickness = 0 ) const; + + virtual VECTOR2I Anchor(int n) const + { + return m_pos; + } + + virtual int AnchorCount() const + { + return 1; + } private: diff --git a/pcbnew/router/pns_walkaround.cpp b/pcbnew/router/pns_walkaround.cpp index 185def64d2..5be937e489 100644 --- a/pcbnew/router/pns_walkaround.cpp +++ b/pcbnew/router/pns_walkaround.cpp @@ -1,7 +1,7 @@ /* * KiRouter - a push-and-(sometimes-)shove PCB router * - * Copyright (C) 2013 CERN + * Copyright (C) 2013-2014 CERN * Author: Tomasz Wlostowski * * This program is free software: you can redistribute it and/or modify it @@ -15,7 +15,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with this program. If not, see . + * with this program. If not, see . */ #include @@ -38,8 +38,8 @@ void PNS_WALKAROUND::start( const PNS_LINE& aInitialPath ) PNS_NODE::OptObstacle PNS_WALKAROUND::nearestObstacle( const PNS_LINE& aPath ) { - return m_world->NearestObstacle( &aPath, - m_solids_only ? (PNS_ITEM::SOLID | PNS_ITEM::VIA) : PNS_ITEM::ANY ); + return m_world->NearestObstacle( &aPath, m_item_mask); + } @@ -55,33 +55,42 @@ PNS_WALKAROUND::WalkaroundStatus PNS_WALKAROUND::singleStep( PNS_LINE& aPath, SHAPE_LINE_CHAIN path_pre[2], path_walk[2], path_post[2]; - VECTOR2I last = aPath.GetCLine().CPoint( -1 ); + VECTOR2I last = aPath.CPoint( -1 );; + if( ( current_obs->hull ).PointInside( last ) ) { m_recursiveBlockageCount++; if( m_recursiveBlockageCount < 3 ) - aPath.GetLine().Append( current_obs->hull.NearestPoint( last ) ); + aPath.Line().Append( current_obs->hull.NearestPoint( last ) ); else { aPath = aPath.ClipToNearestObstacle( m_world ); - return STUCK; + return DONE; } } - aPath.NewWalkaround( current_obs->hull, path_pre[0], path_walk[0], + aPath.Walkaround( current_obs->hull, path_pre[0], path_walk[0], path_post[0], aWindingDirection ); - aPath.NewWalkaround( current_obs->hull, path_pre[1], path_walk[1], + aPath.Walkaround( current_obs->hull, path_pre[1], path_walk[1], path_post[1], !aWindingDirection ); - +#ifdef DEBUG + m_logger.NewGroup (aWindingDirection ? "walk-cw" : "walk-ccw", m_iteration); + m_logger.Log ( &path_walk[0], 0, "path-walk"); + m_logger.Log ( &path_pre[0], 1, "path-pre"); + m_logger.Log ( &path_post[0], 4, "path-post"); + m_logger.Log ( ¤t_obs->hull, 2, "hull"); + m_logger.Log ( current_obs->item, 3, "item"); +#endif + int len_pre = path_walk[0].Length(); int len_alt = path_walk[1].Length(); - + PNS_LINE walk_path( aPath, path_walk[1] ); - bool alt_collides = m_world->CheckColliding( &walk_path, - m_solids_only ? PNS_ITEM::SOLID : PNS_ITEM::ANY ); + bool alt_collides = m_world->CheckColliding( &walk_path, m_item_mask ); + SHAPE_LINE_CHAIN pnew; @@ -126,6 +135,7 @@ PNS_WALKAROUND::WalkaroundStatus PNS_WALKAROUND::Route( const PNS_LINE& aInitial WalkaroundStatus s_cw = IN_PROGRESS, s_ccw = IN_PROGRESS; SHAPE_LINE_CHAIN best_path; + start( aInitialPath ); m_currentObstacle[0] = m_currentObstacle[1] = nearestObstacle( aInitialPath ); @@ -143,9 +153,10 @@ PNS_WALKAROUND::WalkaroundStatus PNS_WALKAROUND::Route( const PNS_LINE& aInitial if( ( s_cw == DONE && s_ccw == DONE ) || ( s_cw == STUCK && s_ccw == STUCK ) ) { - int len_cw = path_cw.GetCLine().Length(); - int len_ccw = path_ccw.GetCLine().Length(); + int len_cw = path_cw.CLine().Length(); + int len_ccw = path_ccw.CLine().Length(); + if( m_forceLongerPath ) aWalkPath = (len_cw > len_ccw ? path_cw : path_ccw); else @@ -166,11 +177,11 @@ PNS_WALKAROUND::WalkaroundStatus PNS_WALKAROUND::Route( const PNS_LINE& aInitial m_iteration++; } - + if( m_iteration == m_iteration_limit ) { - int len_cw = path_cw.GetCLine().Length(); - int len_ccw = path_ccw.GetCLine().Length(); + int len_cw = path_cw.CLine().Length(); + int len_ccw = path_ccw.CLine().Length(); if( m_forceLongerPath ) @@ -185,7 +196,7 @@ PNS_WALKAROUND::WalkaroundStatus PNS_WALKAROUND::Route( const PNS_LINE& aInitial // int len_ccw = path_ccw.GetCLine().Length(); bool found = false; - SHAPE_LINE_CHAIN l = aWalkPath.GetCLine(); + SHAPE_LINE_CHAIN l = aWalkPath.CLine(); for( int i = 0; i < l.SegmentCount(); i++ ) { @@ -198,7 +209,6 @@ PNS_WALKAROUND::WalkaroundStatus PNS_WALKAROUND::Route( const PNS_LINE& aInitial if( dist_n <= dist_a && dist_n < dist_b ) { - // PNSDisplayDebugLine( l, 3 ); l.Remove( i + 1, -1 ); l.Append( nearest ); l.Simplify(); @@ -214,13 +224,21 @@ PNS_WALKAROUND::WalkaroundStatus PNS_WALKAROUND::Route( const PNS_LINE& aInitial } } - aWalkPath.SetWorld( m_world ); - aWalkPath.GetLine().Simplify(); + aWalkPath.Line().Simplify(); + if(aWalkPath.SegmentCount() < 1) + return STUCK; + + if(aWalkPath.CPoint(-1) != aInitialPath.CPoint(-1)) + return STUCK; + + if(aWalkPath.CPoint(0) != aInitialPath.CPoint(0)) + return STUCK; + WalkaroundStatus st = s_ccw == DONE || s_cw == DONE ? DONE : STUCK; if( aOptimize && st == DONE ) - PNS_OPTIMIZER::Optimize( &aWalkPath, PNS_OPTIMIZER::MERGE_OBTUSE, m_world ); + PNS_OPTIMIZER::Optimize( &aWalkPath, PNS_OPTIMIZER::MERGE_OBTUSE, m_world ); return st; } diff --git a/pcbnew/router/pns_walkaround.h b/pcbnew/router/pns_walkaround.h index 609b80d2ce..0a87213a22 100644 --- a/pcbnew/router/pns_walkaround.h +++ b/pcbnew/router/pns_walkaround.h @@ -1,7 +1,7 @@ /* * KiRouter - a push-and-(sometimes-)shove PCB router * - * Copyright (C) 2013 CERN + * Copyright (C) 2013-2014 CERN * Author: Tomasz Wlostowski * * This program is free software: you can redistribute it and/or modify it @@ -15,7 +15,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with this program. If not, see . + * with this program. If not, see . */ #ifndef __PNS_WALKAROUND_H @@ -23,19 +23,26 @@ #include "pns_line.h" #include "pns_node.h" +#include "pns_router.h" +#include "pns_logger.h" +#include "pns_algo_base.h" -class PNS_WALKAROUND +class PNS_WALKAROUND : public PNS_ALGO_BASE { static const int DefaultIterationLimit = 50; public: - PNS_WALKAROUND( PNS_NODE* aWorld ) : - m_world( aWorld ), m_iteration_limit( DefaultIterationLimit ) + PNS_WALKAROUND( PNS_NODE* aWorld, PNS_ROUTER *aRouter ) : + PNS_ALGO_BASE ( aRouter ), + m_world( aWorld ), + m_iteration_limit( DefaultIterationLimit ) { m_forceSingleDirection = false; m_forceLongerPath = false; m_cursorApproachMode = false; + m_item_mask = PNS_ITEM::ANY; }; + ~PNS_WALKAROUND() {}; enum WalkaroundStatus @@ -57,13 +64,22 @@ public: void SetSolidsOnly( bool aSolidsOnly ) { - m_solids_only = aSolidsOnly; + if(aSolidsOnly) + m_item_mask = PNS_ITEM::SOLID; + else + m_item_mask = PNS_ITEM::ANY; + } + + void SetItemMask ( int aMask ) + { + m_item_mask = aMask; } void SetSingleDirection( bool aForceSingleDirection ) { m_forceSingleDirection = aForceSingleDirection; - m_forceLongerPath = true; + m_forceLongerPath = aForceSingleDirection; + //printf("FSD %d FPD %d\n", m_forceSingleDirection?1:0, m_forceLongerPath ? 1: 0); } void SetApproachCursor( bool aEnabled, const VECTOR2I& aPos ) @@ -75,6 +91,10 @@ public: WalkaroundStatus Route( const PNS_LINE& aInitialPath, PNS_LINE& aWalkPath, bool aOptimize = true ); + virtual PNS_LOGGER *Logger() { + return &m_logger; + } + private: void start( const PNS_LINE& aInitialPath ); @@ -86,12 +106,13 @@ private: int m_recursiveBlockageCount; int m_iteration; int m_iteration_limit; - bool m_solids_only; + int m_item_mask; bool m_forceSingleDirection, m_forceLongerPath; bool m_cursorApproachMode; VECTOR2I m_cursorPos; PNS_NODE::OptObstacle m_currentObstacle[2]; bool m_recursiveCollision[2]; + PNS_LOGGER m_logger; }; #endif // __PNS_WALKAROUND_H diff --git a/pcbnew/router/range.h b/pcbnew/router/range.h new file mode 100644 index 0000000000..8409731926 --- /dev/null +++ b/pcbnew/router/range.h @@ -0,0 +1,91 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013-2014 CERN + * Author: Tomasz Wlostowski + * + * 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 3 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, see . + */ + +#ifndef __RANGE_H +#define __RANGE_H + +template class RANGE { + + public: + RANGE (T aMin, T aMax) : + m_min(aMin), + m_max(aMax), + m_defined(true) {} + + RANGE (): + m_defined (false) {}; + + T MinV() const + { + return m_min; + } + + T MaxV() const + { + return m_max; + } + + void Set ( T aMin, T aMax ) const + { + m_max = aMax; + m_min = aMin; + } + + void Grow ( T value ) + { + if(!m_defined) + { + m_min = value; + m_max = value; + m_defined = true; + } else { + m_min = std::min(m_min, value); + m_max = std::max(m_max, value); + } + } + + bool Inside ( const T& value ) const + { + if(!m_defined) + return true; + + return value >= m_min && value <= m_max; + } + + bool Overlaps ( const RANGE &aOther ) const + { + if(!m_defined || !aOther.m_defined) + return true; + + return m_max >= aOther.m_min && m_min <= aOther.m_max; + } + + bool Defined() const + { + return m_defined; + } + + private: + T m_min, m_max; + bool m_defined; + +}; + +#endif \ No newline at end of file diff --git a/pcbnew/router/router_preview_item.cpp b/pcbnew/router/router_preview_item.cpp index 8ce1db4721..3287082c3c 100644 --- a/pcbnew/router/router_preview_item.cpp +++ b/pcbnew/router/router_preview_item.cpp @@ -1,7 +1,7 @@ /* * KiRouter - a push-and-(sometimes-)shove PCB router * - * Copyright (C) 2013 CERN + * Copyright (C) 2013-2014 CERN * Author: Tomasz Wlostowski * * This program is free software: you can redistribute it and/or modify it @@ -15,13 +15,16 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with this program. If not, see . + * with this program. If not, see . */ #include +#include + #include "class_track.h" #include +#include #include "router_preview_item.h" @@ -34,9 +37,12 @@ using namespace KIGFX; ROUTER_PREVIEW_ITEM::ROUTER_PREVIEW_ITEM( const PNS_ITEM* aItem, VIEW_GROUP* aParent ) : EDA_ITEM( NOT_USED ) { - m_Flags = 0; m_parent = aParent; - m_layer = DRAW_N; + + m_shape = NULL; + m_clearance = -1; + m_originLayer = m_layer = ITEM_GAL_LAYER ( GP_OVERLAY ); + if( aItem ) Update( aItem ); @@ -50,62 +56,73 @@ ROUTER_PREVIEW_ITEM::~ROUTER_PREVIEW_ITEM() void ROUTER_PREVIEW_ITEM::Update( const PNS_ITEM* aItem ) { - m_layer = aItem->GetLayers().Start(); - m_color = getLayerColor( m_layer ); + m_originLayer = aItem->Layers().Start(); + + assert (m_originLayer >= 0); + + m_layer = m_originLayer; + m_color = getLayerColor( m_originLayer ); m_color.a = 0.8; - - switch( aItem->GetKind() ) + m_depth = BaseOverlayDepth - aItem->Layers().Start(); + + m_shape = aItem->Shape()->Clone(); + + switch( aItem->Kind() ) { - case PNS_ITEM::LINE: - m_type = PR_LINE; - m_width = static_cast(aItem)->GetWidth(); - m_line = *static_cast( aItem->GetShape() ); - break; + case PNS_ITEM::LINE: + m_type = PR_SHAPE; + m_width = ((PNS_LINE *) aItem)->Width(); + + break; - case PNS_ITEM::SEGMENT: - m_type = PR_LINE; - m_width = static_cast(aItem)->GetWidth(); - m_line = *static_cast( aItem->GetShape() ); - break; + case PNS_ITEM::SEGMENT: + { + PNS_SEGMENT *seg = (PNS_SEGMENT *)aItem; + m_type = PR_SHAPE; + m_width = seg->Width(); + break; + } - case PNS_ITEM::VIA: - m_type = PR_VIA; - m_color = COLOR4D( 0.7, 0.7, 0.7, 0.8 ); - m_width = static_cast(aItem)->GetDiameter(); - m_viaCenter = static_cast(aItem)->GetPos(); - break; + case PNS_ITEM::VIA: + m_type = PR_SHAPE; + m_width = 0; + m_color = COLOR4D( 0.7, 0.7, 0.7, 0.8 ); + m_depth = ViaOverlayDepth; + break; + + case PNS_ITEM::SOLID: + m_type = PR_SHAPE; + m_width = 0; + break; default: break; } + if(aItem->Marker() & MK_VIOLATION) + m_color = COLOR4D (0, 1, 0, 1); + + if(aItem->Marker() & MK_HEAD) + m_color.Brighten(0.7); + ViewSetVisible( true ); ViewUpdate( GEOMETRY | APPEARANCE ); } - -void ROUTER_PREVIEW_ITEM::MarkAsHead() -{ - if( m_type != PR_VIA ) - m_color.Saturate( 1.0 ); -} - - const BOX2I ROUTER_PREVIEW_ITEM::ViewBBox() const { BOX2I bbox; switch( m_type ) { - case PR_LINE: - bbox = m_line.BBox(); + case PR_SHAPE: + bbox = m_shape->BBox(); bbox.Inflate( m_width / 2 ); return bbox; - case PR_VIA: - bbox = BOX2I( m_viaCenter, VECTOR2I( 0, 0 ) ); - bbox.Inflate( m_width / 2 ); + case PR_POINT: + bbox = BOX2I ( m_pos - VECTOR2I(100000, 100000), VECTOR2I( 200000, 200000 )); return bbox; default: @@ -115,76 +132,124 @@ const BOX2I ROUTER_PREVIEW_ITEM::ViewBBox() const return bbox; } +void ROUTER_PREVIEW_ITEM::drawLineChain( const SHAPE_LINE_CHAIN &l, KIGFX::GAL* aGal ) const +{ + for( int s = 0; s < l.SegmentCount(); s++ ) + aGal->DrawLine( l.CSegment( s ).A, l.CSegment( s ).B ); + if( l.IsClosed() ) + aGal->DrawLine( l.CSegment( -1 ).B, l.CSegment( 0 ).A ); +} void ROUTER_PREVIEW_ITEM::ViewDraw( int aLayer, KIGFX::GAL* aGal ) const { - switch( m_type ) + //col.Brighten(0.7); + aGal->SetLayerDepth( m_depth ); + + if(m_type == PR_SHAPE) { - case PR_LINE: - aGal->SetLayerDepth( -100.0 ); aGal->SetLineWidth( m_width ); aGal->SetStrokeColor( m_color ); - aGal->SetIsStroke( true ); - aGal->SetIsFill( false ); - - for( int s = 0; s < m_line.SegmentCount(); s++ ) - aGal->DrawLine( m_line.CSegment( s ).A, m_line.CSegment( s ).B ); - - if( m_line.IsClosed() ) - aGal->DrawLine( m_line.CSegment( -1 ).B, m_line.CSegment( 0 ).A ); - break; - - case PR_VIA: - aGal->SetLayerDepth( -101.0 ); - aGal->SetIsStroke( false ); - aGal->SetIsFill( true ); aGal->SetFillColor( m_color ); - aGal->DrawCircle( m_viaCenter, m_width / 2 ); - break; + aGal->SetIsStroke( m_width ? true : false ); + aGal->SetIsFill( true ); - default: - break; + + if(!m_shape) + return; + + switch( m_shape->Type() ) + { + case SH_LINE_CHAIN: + { + const SHAPE_LINE_CHAIN *l = (const SHAPE_LINE_CHAIN *) m_shape; + drawLineChain(*l, aGal); + break; + } + + case SH_SEGMENT: + { + const SHAPE_SEGMENT *s = (const SHAPE_SEGMENT *) m_shape; + aGal->DrawLine( s->GetSeg().A, s->GetSeg().B ); + + if(m_clearance > 0) + { + aGal->SetLayerDepth ( ClearanceOverlayDepth ); + aGal->SetStrokeColor ( COLOR4D( DARKDARKGRAY )); + aGal->SetLineWidth( m_width + 2 * m_clearance ); + aGal->DrawLine( s->GetSeg().A, s->GetSeg().B ); + + } + + break; + } + + case SH_CIRCLE: + { + const SHAPE_CIRCLE *c = (const SHAPE_CIRCLE *) m_shape; + aGal->DrawCircle( c->GetCenter(), c->GetRadius() ); + + if(m_clearance > 0) + { + aGal->SetLayerDepth ( ClearanceOverlayDepth ); + aGal->SetFillColor ( COLOR4D( DARKDARKGRAY )); + aGal->SetIsStroke( false ); + aGal->DrawCircle( c->GetCenter(), c->GetRadius() + m_clearance ); + } + + break; + } + + case SH_RECT: + { + const SHAPE_RECT *r = (const SHAPE_RECT *) m_shape; + aGal->DrawRectangle (r->GetPosition(), r->GetPosition() + r->GetSize()); + + if(m_clearance > 0) + { + aGal->SetLayerDepth ( ClearanceOverlayDepth ); + VECTOR2I p0 (r -> GetPosition() ), s ( r->GetSize() ); + aGal->SetStrokeColor ( COLOR4D( DARKDARKGRAY )); + aGal->SetIsStroke( true ); + aGal->SetLineWidth ( 2 * m_clearance ); + aGal->DrawLine( p0, VECTOR2I(p0.x + s.x, p0.y) ); + aGal->DrawLine( p0, VECTOR2I(p0.x, p0.y + s.y) ); + aGal->DrawLine( p0 + s , VECTOR2I(p0.x + s.x, p0.y) ); + aGal->DrawLine( p0 + s, VECTOR2I(p0.x, p0.y + s.y) ); + } + + break; + } + } } } -void ROUTER_PREVIEW_ITEM::DebugLine( const SHAPE_LINE_CHAIN& aLine, int aWidth, int aStyle ) +void ROUTER_PREVIEW_ITEM::Line( const SHAPE_LINE_CHAIN& aLine, int aWidth, int aStyle ) { -#if 0 - m_line = aLine; + + m_originLayer = m_layer = 0; m_width = aWidth; m_color = assignColor( aStyle ); + m_type = PR_SHAPE; + m_depth = -2047; + m_shape = aLine.Clone(); - - m_type = PR_LINE; + ViewSetVisible(true); ViewUpdate( GEOMETRY | APPEARANCE ); -#endif + } - -void ROUTER_PREVIEW_ITEM::DebugBox( const BOX2I& aBox, int aStyle ) +void ROUTER_PREVIEW_ITEM::Point( const VECTOR2I& aPos, int aStyle ) { -#if 0 - assert( false ); +} - m_line.Clear(); - m_line.Append( aBox.GetX(), aBox.GetY() ); - m_line.Append( aBox.GetX() + aBox.GetWidth(), aBox.GetY() + aBox.GetHeight() ); - m_line.Append( aBox.GetX() + aBox.GetWidth(), aBox.GetY() + aBox.GetHeight() ); - m_line.Append( aBox.GetX(), aBox.GetY() + aBox.GetHeight() ); - m_line.SetClosed( true ); - m_width = 20000; - m_color = assignColor( aStyle ); - m_type = PR_LINE; - ViewUpdate( GEOMETRY | APPEARANCE ); -#endif +void ROUTER_PREVIEW_ITEM::Box( const BOX2I& aBox, int aStyle ) +{ } const COLOR4D ROUTER_PREVIEW_ITEM::getLayerColor( int aLayer ) const { - // assert (m_view != NULL); - PCB_RENDER_SETTINGS* settings = static_cast ( m_parent->GetView()->GetPainter()->GetSettings() ); @@ -202,10 +267,10 @@ const COLOR4D ROUTER_PREVIEW_ITEM::assignColor( int aStyle ) const color = COLOR4D( 0, 1, 0, 1 ); break; case 1: - color = COLOR4D( 1, 0, 0, 0.3 ); break; + color = COLOR4D( 1, 0, 0, 1 ); break; case 2: - color = COLOR4D( 1, 0.5, 0.5, 1 ); break; + color = COLOR4D( 1, 1, 0, 1 ); break; case 3: color = COLOR4D( 0, 0, 1, 1 ); break; @@ -220,9 +285,11 @@ const COLOR4D ROUTER_PREVIEW_ITEM::assignColor( int aStyle ) const color = COLOR4D( 0, 1, 1, 1 ); break; case 32: - color = COLOR4D( 0, 0, 1, 0.5 ); break; + color = COLOR4D( 0, 0, 1, 1 ); break; default: + color = COLOR4D( 0.4, 0.4, 0.4, 1 ); break; + break; } diff --git a/pcbnew/router/router_preview_item.h b/pcbnew/router/router_preview_item.h index 058c47f816..514b21dcea 100644 --- a/pcbnew/router/router_preview_item.h +++ b/pcbnew/router/router_preview_item.h @@ -1,7 +1,7 @@ /* * KiRouter - a push-and-(sometimes-)shove PCB router * - * Copyright (C) 2013 CERN + * Copyright (C) 2013-2014 CERN * Author: Tomasz Wlostowski * * This program is free software: you can redistribute it and/or modify it @@ -15,7 +15,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with this program. If not, see . + * with this program. If not, see . */ #ifndef __ROUTER_PREVIEW_ITEM_H @@ -46,24 +46,32 @@ class ROUTER_PREVIEW_ITEM : public EDA_ITEM public: enum ItemType { - PR_VIA, - PR_LINE, - PR_STUCK_MARKER - }; - - enum ItemFlags - { - PR_SUGGESTION = 1 + PR_STUCK_MARKER = 0, + PR_POINT, + PR_SHAPE }; + ROUTER_PREVIEW_ITEM( const PNS_ITEM* aItem = NULL, KIGFX::VIEW_GROUP* aParent = NULL ); ~ROUTER_PREVIEW_ITEM(); void Update( const PNS_ITEM* aItem ); void StuckMarker( VECTOR2I& aPosition ); - void DebugLine( const SHAPE_LINE_CHAIN& aLine, int aWidth = 0, int aStyle = 0 ); - void DebugBox( const BOX2I& aBox, int aStyle = 0 ); + + void Line( const SHAPE_LINE_CHAIN& aLine, int aWidth = 0, int aStyle = 0 ); + void Box( const BOX2I& aBox, int aStyle = 0 ); + void Point ( const VECTOR2I& aPos, int aStyle = 0); + + void SetColor( const KIGFX::COLOR4D& aColor ) + { + m_color = aColor; + } + + void SetClearance ( int aClearance ) + { + m_clearance = aClearance; + } void Show( int a, std::ostream& b ) const {}; @@ -77,7 +85,7 @@ public: aCount = 1; } - void MarkAsHead(); + void drawLineChain( const SHAPE_LINE_CHAIN &l, KIGFX::GAL *aGal ) const; private: const KIGFX::COLOR4D assignColor( int aStyle ) const; @@ -86,17 +94,25 @@ private: KIGFX::VIEW_GROUP* m_parent; PNS_ROUTER* m_router; - SHAPE_LINE_CHAIN m_line; + SHAPE *m_shape; ItemType m_type; + int m_style; int m_width; int m_layer; + int m_originLayer; + int m_clearance; + + // fixme: shouldn't this go to VIEW? + static const int ClearanceOverlayDepth = -2000; + static const int BaseOverlayDepth = -2020; + static const int ViaOverlayDepth = -2046; + + double m_depth; KIGFX::COLOR4D m_color; - - VECTOR2I m_stuckPosition; - VECTOR2I m_viaCenter; + VECTOR2I m_pos; }; #endif diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index e270a0a5e8..4220aa4035 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -15,22 +15,28 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with this program. If not, see . + * with this program. If not, see . */ +#include + #include #include +#include #include "class_draw_panel_gal.h" -#include "class_board_item.h" #include "class_board.h" #include #include +#include #include #include #include #include +#include +#include +#include #include #include @@ -45,29 +51,181 @@ using namespace KIGFX; using boost::optional; -//static TOOL_ACTION ACT_AutoEndRoute( "pcbnew.InteractiveRouter.AutoEndRoute", AS_CONTEXT, 'G' ); -//static TOOL_ACTION ACT_PlaceVia( "pcbnew.InteractiveRouter.PlaceVia", AS_CONTEXT, 'V' ); -//static TOOL_ACTION ACT_OpenRouteOptions( "pcbnew.InteractiveRouter.OpenRouterOptions", AS_CONTEXT, 'T' ); -//static TOOL_ACTION ACT_SwitchPosture( "pcbnew.InteractiveRouter.SwitchPosture", AS_CONTEXT, '/' ); -//static TOOL_ACTION ACT_EndTrack( "pcbnew.InteractiveRouter.EndTrack", AS_CONTEXT, WXK_END ); +static TOOL_ACTION ACT_NewTrack( "pcbnew.InteractiveRouter.NewTrack", + AS_CONTEXT, 'X', + "New Track", "Starts laying a new track."); +static TOOL_ACTION ACT_EndTrack( "pcbnew.InteractiveRouter.EndTrack", + AS_CONTEXT, WXK_END, + "End Track", "Stops laying the current track."); +static TOOL_ACTION ACT_AutoEndRoute( "pcbnew.InteractiveRouter.AutoEndRoute", + AS_CONTEXT, 'F', + "Auto-end Track", "Automagically finishes currently routed track." ); +static TOOL_ACTION ACT_Drag( "pcbnew.InteractiveRouter.Drag", + AS_CONTEXT, 'G', + "Drag Track/Via", "Drags a track or a via." ); +static TOOL_ACTION ACT_PlaceThroughVia( "pcbnew.InteractiveRouter.PlaceVia", + AS_CONTEXT, 'V', + "Place Through Via", "Adds a through-hole via at the end of currently routed track." ); +static TOOL_ACTION ACT_CustomTrackWidth( "pcbnew.InteractiveRouter.CustomTrackWidth", + AS_CONTEXT, 'W', + "Custom Track Width", "Shows a dialog for changing the track width and via size."); +static TOOL_ACTION ACT_RouterOptions( "pcbnew.InteractiveRouter.RouterOptions", + AS_CONTEXT, 'E', + "Routing Options...", "Shows a dialog containing router options."); +static TOOL_ACTION ACT_SwitchPosture( "pcbnew.InteractiveRouter.SwitchPosture", + AS_CONTEXT, '/', + "Switch Track Posture", "Switches posture of the currenly routed track."); ROUTER_TOOL::ROUTER_TOOL() : TOOL_INTERACTIVE( "pcbnew.InteractiveRouter" ) { m_router = NULL; - m_menu = new CONTEXT_MENU; - - m_menu->SetTitle( wxT( "Interactive router" ) ); // fixme: not implemented yet. Sorry. - m_menu->Add( wxT( "Cancel" ), 1 ); - m_menu->Add( wxT( "New track" ), 2 ); - m_menu->Add( wxT( "End track" ), 3 ); - m_menu->Add( wxT( "Auto-end track" ), 4 ); - m_menu->Add( wxT( "Place via" ), 5 ); - m_menu->Add( wxT( "Switch posture" ), 6 ); - - m_menu->Add( wxT( "Routing options..." ), 7 ); } +class CONTEXT_TRACK_WIDTH_MENU: public CONTEXT_MENU +{ +public: + CONTEXT_TRACK_WIDTH_MENU() + { + setCustomEventHandler( boost::bind( &CONTEXT_TRACK_WIDTH_MENU::handleCustomEvent, this, _1 ) ); + } + + void SetBoard( BOARD* aBoard ) + { + BOARD_DESIGN_SETTINGS &bds = aBoard->GetDesignSettings(); + + wxString msg; + m_board = aBoard; + + Append( ID_POPUP_PCB_SELECT_CUSTOM_WIDTH, _( "Custom size" ), wxEmptyString, wxITEM_CHECK ); + + Append( ID_POPUP_PCB_SELECT_AUTO_WIDTH, _( "Use the starting track width" ), + _( "Route using the width of the starting track." ), + wxITEM_CHECK ); + + Append( ID_POPUP_PCB_SELECT_USE_NETCLASS_VALUES, + _( "Use netclass values" ), + _( "Use track and via sizes from the net class" ), + wxITEM_CHECK ); + + for( unsigned i = 0; i < bds.m_TrackWidthList.size(); i++ ) + { + msg = _ ("Track "); + msg << StringFromValue( g_UserUnit, bds.m_TrackWidthList[i], true ); + + if( i == 0 ) + msg << _( " (from netclass)" ); + + Append( ID_POPUP_PCB_SELECT_WIDTH1 + i, msg, wxEmptyString, wxITEM_CHECK ); + } + + AppendSeparator(); + + for( unsigned i = 0; i < bds.m_ViasDimensionsList.size(); i++ ) + { + msg = _ ("Via "); + msg << StringFromValue( g_UserUnit, bds.m_ViasDimensionsList[i].m_Diameter, + true ); + wxString drill = StringFromValue( g_UserUnit, + bds.m_ViasDimensionsList[i].m_Drill, + true ); + + if( bds.m_ViasDimensionsList[i].m_Drill <= 0 ) + { + msg << _ (", drill: default"); + } else { + msg << _ (", drill: ") << drill; + } + + if( i == 0 ) + msg << _( " (from netclass)" ); + + Append( ID_POPUP_PCB_SELECT_VIASIZE1 + i, msg, wxEmptyString, wxITEM_CHECK ); + } + } + +protected: + OPT_TOOL_EVENT handleCustomEvent( const wxEvent& aEvent ) + { +#if ID_POPUP_PCB_SELECT_VIASIZE1 < ID_POPUP_PCB_SELECT_WIDTH1 +#error You have changed event ids, it breaks a piece of code. Lookup this line for more details. +// Recognising type of event (track width/via size) is based on comparison if the event id is +// within a specific range. If ranges of event ids changes, then the following is not valid anymore. +#endif + BOARD_DESIGN_SETTINGS &bds = m_board->GetDesignSettings(); + + int id = aEvent.GetId(); + + // General settings, to be modified below + bds.m_UseConnectedTrackWidth = false; + bds.UseCustomTrackViaSize( false ); + + if( id == ID_POPUP_PCB_SELECT_CUSTOM_WIDTH ) + { + bds.UseCustomTrackViaSize( true ); + } + + else if( id == ID_POPUP_PCB_SELECT_AUTO_WIDTH ) + { + bds.m_UseConnectedTrackWidth = true; + } + + else if( id == ID_POPUP_PCB_SELECT_USE_NETCLASS_VALUES ) + { + bds.SetViaSizeIndex( 0 ); + bds.SetTrackWidthIndex( 0 ); + } + + else if( id > ID_POPUP_PCB_SELECT_VIASIZE1 ) // via size has changed + { + assert( id < ID_POPUP_PCB_SELECT_WIDTH_END_RANGE ); + + bds.SetViaSizeIndex( id - ID_POPUP_PCB_SELECT_VIASIZE1 ); + } + + else // track width has changed + { + assert( id >= ID_POPUP_PCB_SELECT_WIDTH1 ); + assert( id < ID_POPUP_PCB_SELECT_VIASIZE ); + + bds.SetTrackWidthIndex( id - ID_POPUP_PCB_SELECT_WIDTH1 ); + } + + return OPT_TOOL_EVENT( COMMON_ACTIONS::trackViaSizeChanged.MakeEvent() ); + } + + BOARD* m_board; +}; + + +class CONTEXT_GRID_MENU: public CONTEXT_MENU { }; + + +class ROUTER_TOOL_MENU: public CONTEXT_MENU { + +public: + ROUTER_TOOL_MENU( BOARD *aBoard ) + { + SetTitle( wxT( "Interactive Router" ) ); + Add( ACT_NewTrack ); + Add( ACT_EndTrack ); +// Add( ACT_AutoEndRoute ); // fixme: not implemented yet. Sorry. + Add( ACT_Drag ); + Add( ACT_PlaceThroughVia ); + Add( ACT_SwitchPosture ); + + AppendSeparator ( ); + + CONTEXT_TRACK_WIDTH_MENU* trackMenu = new CONTEXT_TRACK_WIDTH_MENU; + trackMenu->SetBoard( aBoard ); + AppendSubMenu( trackMenu, wxT( "Select Track Width" ) ); + + Add( ACT_CustomTrackWidth ); + + AppendSeparator ( ); + Add( ACT_RouterOptions ); + } +}; ROUTER_TOOL::~ROUTER_TOOL() { @@ -108,6 +266,7 @@ void ROUTER_TOOL::getNetclassDimensions( int aNetCode, int& aWidth, int& aViaDiameter, int& aViaDrill ) { BOARD* board = getModel( PCB_T ); + BOARD_DESIGN_SETTINGS &bds = board->GetDesignSettings(); NETCLASS* netClass = NULL; NETINFO_ITEM* ni = board->FindNet( aNetCode ); @@ -115,11 +274,11 @@ void ROUTER_TOOL::getNetclassDimensions( int aNetCode, int& aWidth, if( ni ) { wxString netClassName = ni->GetClassName(); - netClass = board->GetDesignSettings().m_NetClasses.Find( netClassName ); + netClass = bds.m_NetClasses.Find( netClassName ); } if( !netClass ) - netClass = board->GetDesignSettings().m_NetClasses.GetDefault(); + netClass = bds.m_NetClasses.GetDefault(); aWidth = netClass->GetTrackWidth(); aViaDiameter = netClass->GetViaDiameter(); @@ -134,74 +293,67 @@ PNS_ITEM* ROUTER_TOOL::pickSingleItem( const VECTOR2I& aWhere, int aNet, int aLa if( aLayer > 0 ) tl = aLayer; - PNS_ITEM* picked_seg = NULL; - PNS_ITEM* picked_via = NULL; + PNS_ITEM* prioritized[4]; + + for(int i = 0; i < 4; i++) + prioritized[i] = 0; + PNS_ITEMSET candidates = m_router->QueryHoverItems( aWhere ); BOOST_FOREACH( PNS_ITEM* item, candidates.Items() ) { - if( !IsCopperLayer( item->GetLayers().Start() ) ) + if( !IsCopperLayer( item->Layers().Start() ) ) continue; - if( item->GetParent() && !item->GetParent()->ViewIsVisible() && - !item->GetParent()->IsSelected() ) - continue; + // fixme: this causes flicker with live loop removal... + //if( item->Parent() && !item->Parent()->ViewIsVisible() ) + // continue; - if( aNet < 0 || item->GetNet() == aNet ) + if( aNet < 0 || item->Net() == aNet ) { if( item->OfKind( PNS_ITEM::VIA | PNS_ITEM::SOLID ) ) { - if( item->GetLayers().Overlaps( tl ) || !picked_via ) - picked_via = item; + if( !prioritized[2] ) + prioritized[2] = item; + if( item->Layers().Overlaps( tl )) + prioritized[0] = item; } else { - if( item->GetLayers().Overlaps( tl ) || !picked_seg ) - picked_seg = item; + if( !prioritized[3] ) + prioritized[3] = item; + if (item->Layers().Overlaps( tl )) + prioritized[1] = item; } } } - if( DisplayOpt.ContrastModeDisplay ) + PNS_ITEM *rv = NULL; + for(int i = 0; i < 4; i++) { - if( picked_seg && !picked_seg->GetLayers().Overlaps( tl ) ) - picked_seg = NULL; + PNS_ITEM *item = prioritized[i]; + + if( DisplayOpt.ContrastModeDisplay ) + if( item && !item->Layers().Overlaps( tl ) ) + item = NULL; + + if(item) + { + rv = item; + break; + } } - PNS_ITEM* rv = picked_via ? picked_via : picked_seg; - - if( rv && aLayer >= 0 && !rv->GetLayers().Overlaps( aLayer ) ) + if( rv && aLayer >= 0 && !rv->Layers().Overlaps( aLayer ) ) rv = NULL; if( rv ) - TRACE( 0, "%s, layer : %d, tl: %d", rv->GetKindStr().c_str() % rv->GetLayers().Start() % + TRACE( 0, "%s, layer : %d, tl: %d", rv->KindStr().c_str() % rv->Layers().Start() % tl ); return rv; } - -void ROUTER_TOOL::setMsgPanel( bool aEnabled, int aEntry, - const wxString& aUpperMessage, const wxString& aLowerMessage ) -{ - PCB_EDIT_FRAME* frame = getEditFrame (); - - if( m_panelItems.size() <= (unsigned int) aEntry ) - m_panelItems.resize( aEntry + 1 ); - - m_panelItems[aEntry] = MSG_PANEL_ITEM( aUpperMessage, aLowerMessage, BLACK ); - frame->SetMsgPanel( m_panelItems ); -} - - -void ROUTER_TOOL::clearMsgPanel() -{ - PCB_EDIT_FRAME* frame = getEditFrame (); - - frame->ClearMsgPanel(); -} - - void ROUTER_TOOL::highlightNet( bool aEnabled, int aNetcode ) { RENDER_SETTINGS* rs = getView()->GetPainter()->GetSettings(); @@ -214,37 +366,104 @@ void ROUTER_TOOL::highlightNet( bool aEnabled, int aNetcode ) getView()->UpdateAllLayersColor(); } +void ROUTER_TOOL::handleCommonEvents( TOOL_EVENT& evt ) +{ +#ifdef DEBUG + if( evt.IsKeyPressed() ) + { + switch( evt.KeyCode() ) + { + case 'S': + TRACEn(2, "saving drag/route log...\n"); + m_router->DumpLog(); + break; + } + } + else +#endif + if( evt.IsAction( &ACT_RouterOptions ) ) + { + DIALOG_PNS_SETTINGS settingsDlg( m_toolMgr->GetEditFrame(), m_router->Settings() ); + + if( settingsDlg.ShowModal() ) + m_router->ApplySettings(); + } + + else if( evt.IsAction( &ACT_CustomTrackWidth ) ) + { + DIALOG_TRACK_VIA_SIZE sizeDlg( m_toolMgr->GetEditFrame(), m_router->Settings() ); + BOARD_DESIGN_SETTINGS& bds = getModel( PCB_T )->GetDesignSettings(); + + sizeDlg.ShowModal(); + + // TODO it should be changed, router settings won't keep track & via sizes in the future + bds.SetCustomTrackWidth( m_router->Settings().GetTrackWidth() ); + bds.SetCustomViaSize( m_router->Settings().GetViaDiameter() ); + bds.SetCustomViaDrill( m_router->Settings().GetViaDrill() ); + bds.UseCustomTrackViaSize( true ); + + // TODO Should be done another way, but RunAction() won't work here. As the ROUTER_TOOL + // did not call Wait(), it does not wait for events and therefore the sent event + // won't arrive here + TOOL_EVENT event = COMMON_ACTIONS::trackViaSizeChanged.MakeEvent(); + handleCommonEvents( event ); + } + + else if( evt.IsAction( &COMMON_ACTIONS::trackViaSizeChanged ) ) + { + BOARD_DESIGN_SETTINGS& bds = getModel( PCB_T )->GetDesignSettings(); + + m_router->Settings().SetTrackWidth( bds.GetCurrentTrackWidth() ); + m_router->Settings().SetViaDiameter( bds.GetCurrentViaSize() ); + m_router->Settings().SetViaDrill( bds.GetCurrentViaDrill() ); + m_router->ApplySettings(); + } +} void ROUTER_TOOL::updateStartItem( TOOL_EVENT& aEvent ) { VIEW_CONTROLS* ctls = getViewControls(); int tl = getView()->GetTopLayer(); + VECTOR2I cp = ctls->GetCursorPosition(); PNS_ITEM* startItem = NULL; if( aEvent.IsMotion() || aEvent.IsClick() ) { VECTOR2I p = aEvent.Position(); + startItem = pickSingleItem( p ); - if( startItem && startItem->GetNet() >= 0 ) + bool snapEnabled = !aEvent.Modifier(MD_SHIFT); + + m_router->EnableSnapping ( snapEnabled ); + + if(!snapEnabled && startItem && !startItem->Layers().Overlaps( tl ) ) + startItem = NULL; + + if( startItem && startItem->Net() >= 0 ) { bool dummy; - VECTOR2I cursorPos = m_router->SnapToItem( startItem, p, dummy ); - ctls->ForceCursorPosition( true, cursorPos ); + VECTOR2I psnap = m_router->SnapToItem( startItem, p, dummy ); + + if (snapEnabled) { + m_startSnapPoint = psnap; + ctls->ForceCursorPosition( true, psnap ); + } else { + m_startSnapPoint = cp; + ctls->ForceCursorPosition( false ); + } - m_startSnapPoint = cursorPos; - - if( startItem->GetLayers().IsMultilayer() ) + if( startItem->Layers().IsMultilayer() ) m_startLayer = tl; else - m_startLayer = startItem->GetLayers().Start(); + m_startLayer = startItem->Layers().Start(); m_startItem = startItem; } else { m_startItem = NULL; - m_startSnapPoint = p; + m_startSnapPoint = cp; m_startLayer = tl; ctls->ForceCursorPosition( false ); } @@ -255,13 +474,18 @@ void ROUTER_TOOL::updateStartItem( TOOL_EVENT& aEvent ) void ROUTER_TOOL::updateEndItem( TOOL_EVENT& aEvent ) { VIEW_CONTROLS* ctls = getViewControls(); - VECTOR2I p = aEvent.Position(); + VECTOR2I p = getView()->ToWorld( ctls->GetMousePosition() ); + VECTOR2I cp = ctls->GetCursorPosition(); int layer; - if( m_router->GetCurrentNet() < 0 || !m_startItem ) + bool snapEnabled = !aEvent.Modifier(MD_SHIFT); + + m_router->EnableSnapping ( snapEnabled ); + + if( !snapEnabled || m_router->GetCurrentNet() < 0 || !m_startItem ) { m_endItem = NULL; - m_endSnapPoint = p; + m_endSnapPoint = cp; return; } @@ -272,7 +496,7 @@ void ROUTER_TOOL::updateEndItem( TOOL_EVENT& aEvent ) else layer = m_router->GetCurrentLayer(); - PNS_ITEM* endItem = pickSingleItem( p, m_startItem->GetNet(), layer ); + PNS_ITEM* endItem = pickSingleItem( p, m_startItem->Net(), layer ); if( endItem ) { @@ -284,57 +508,39 @@ void ROUTER_TOOL::updateEndItem( TOOL_EVENT& aEvent ) else { m_endItem = NULL; - m_endSnapPoint = ctls->GetCursorPosition(); + m_endSnapPoint = cp; ctls->ForceCursorPosition( false ); } - // Draw ratsnest for the currently routed track - RN_DATA* ratsnest = getModel( PCB_T )->GetRatsnest(); - ratsnest->ClearSimple(); - - if( ( m_endItem == NULL || m_endItem == m_startItem ) && m_startItem->GetNet() > 0 ) - { - // The ending node has to be first, so the line for the track is drawn first - ratsnest->AddSimple( m_endSnapPoint, m_startItem->GetNet() ); - - // Those nodes are added just to force ratsnest not to drawn - // lines to already routed parts of the track - const PICKED_ITEMS_LIST& changes = m_router->GetLastChanges(); - for( unsigned int i = 0; i < changes.GetCount(); ++i ) - { - // Block the new tracks, do not handle tracks that were moved - // (moved tracks are saved in the undo buffer with UR_DELETED status instead) - if( changes.GetPickedItemStatus( i ) == UR_NEW ) - ratsnest->AddBlocked( static_cast( changes.GetPickedItem( i ) ) ); - } - - // Also the origin of the new track should be skipped in the ratsnest shown for the routed track - ratsnest->AddBlocked( static_cast( m_startItem->GetParent() ) ); - } - if( m_endItem ) - TRACE( 0, "%s, layer : %d", m_endItem->GetKindStr().c_str() % - m_endItem->GetLayers().Start() ); + TRACE( 0, "%s, layer : %d", m_endItem->KindStr().c_str() % + m_endItem->Layers().Start() ); } -void ROUTER_TOOL::startRouting() +void ROUTER_TOOL::performRouting() { + PCB_EDIT_FRAME* frame = getEditFrame(); bool saveUndoBuffer = true; VIEW_CONTROLS* ctls = getViewControls(); - int width = getDefaultWidth( m_startItem ? m_startItem->GetNet() : -1 ); + if( getModel( PCB_T )->GetDesignSettings().m_UseConnectedTrackWidth ) + { + int width = getDefaultWidth( m_startItem ? m_startItem->Net() : -1 ); - if( m_startItem && m_startItem->OfKind( PNS_ITEM::SEGMENT ) ) - width = static_cast( m_startItem )->GetWidth(); + if( m_startItem && m_startItem->OfKind( PNS_ITEM::SEGMENT ) ) + width = static_cast( m_startItem )->Width(); + + m_router->Settings().SetTrackWidth( width ); + } - m_router->SetCurrentWidth( width ); m_router->SwitchLayer( m_startLayer ); - getEditFrame()->SetTopLayer( m_startLayer ); + frame->SetActiveLayer( m_startLayer ); + frame->GetGalCanvas()->SetFocus(); - if( m_startItem && m_startItem->GetNet() >= 0 ) - highlightNet( true, m_startItem->GetNet() ); + if( m_startItem && m_startItem->Net() >= 0 ) + highlightNet( true, m_startItem->Net() ); ctls->ForceCursorPosition( false ); ctls->SetAutoPan( true ); @@ -366,43 +572,37 @@ void ROUTER_TOOL::startRouting() break; m_router->Move( m_endSnapPoint, m_endItem ); - } - else if( evt->IsKeyPressed() ) + } else if( evt->IsAction( &ACT_PlaceThroughVia ) ) { - switch( std::toupper( evt->KeyCode() ) ) - { - case 'V': - { - int w, diameter, drill; - getNetclassDimensions( m_router->GetCurrentNet(), w, diameter, drill ); - m_router->SetCurrentViaDiameter( diameter ); - m_router->SetCurrentViaDrill( drill ); - m_router->ToggleViaPlacement(); - getEditFrame()->SetTopLayer( m_router->GetCurrentLayer() ); - m_router->Move( m_endSnapPoint, m_endItem ); - break; - } - - case '/': - m_router->FlipPosture(); - break; - - case '+': - case '=': - m_router->SwitchLayer( m_router->NextCopperLayer( true ) ); - updateEndItem( *evt ); - getEditFrame()->SetTopLayer( m_router->GetCurrentLayer() ); - m_router->Move( m_endSnapPoint, m_endItem ); - - break; - - case '-': - m_router->SwitchLayer( m_router->NextCopperLayer( false ) ); - getEditFrame()->SetTopLayer( m_router->GetCurrentLayer() ); - m_router->Move( m_endSnapPoint, m_endItem ); - break; - } + m_router->ToggleViaPlacement(); + frame->SetTopLayer( m_router->GetCurrentLayer() ); + m_router->Move( m_endSnapPoint, m_endItem ); } + else if( evt->IsAction( &ACT_SwitchPosture ) ) + { + m_router->FlipPosture(); + m_router->Move( m_endSnapPoint, m_endItem ); + } + else if( evt->IsAction( &COMMON_ACTIONS::layerNext ) ) + { + m_router->SwitchLayer( m_router->NextCopperLayer( true ) ); + updateEndItem( *evt ); + frame->SetActiveLayer( m_router->GetCurrentLayer() ); + m_router->Move( m_endSnapPoint, m_endItem ); + } + else if( evt->IsAction( &COMMON_ACTIONS::layerPrev ) ) + { + m_router->SwitchLayer( m_router->NextCopperLayer( false ) ); + frame->SetActiveLayer( m_router->GetCurrentLayer() ); + m_router->Move( m_endSnapPoint, m_endItem ); + } + else if( evt->IsAction( &ACT_EndTrack ) ) + { + if( m_router->FixRoute( m_endSnapPoint, m_endItem ) ) + break; + } + + handleCommonEvents(*evt); } m_router->StopRouting(); @@ -410,10 +610,9 @@ void ROUTER_TOOL::startRouting() if( saveUndoBuffer ) { // Save the recent changes in the undo buffer - getEditFrame()->SaveCopyInUndoList( m_router->GetLastChanges(), - UR_UNSPECIFIED ); - m_router->ClearLastChanges(); - getEditFrame()->OnModify(); + frame->SaveCopyInUndoList( m_router->GetUndoBuffer(), UR_UNSPECIFIED ); + m_router->ClearUndoBuffer(); + frame->OnModify(); } else { @@ -430,14 +629,23 @@ void ROUTER_TOOL::startRouting() int ROUTER_TOOL::Main( TOOL_EVENT& aEvent ) { VIEW_CONTROLS* ctls = getViewControls(); + BOARD* board = getModel( PCB_T ); + BOARD_DESIGN_SETTINGS& bds = board->GetDesignSettings(); - // SetContextMenu ( m_menu ); - // setMsgPanel(true, 0, wxT("KiRouter"), wxT("Pick an item to start routing")); - getEditFrame()->SetToolID( ID_TRACK_BUTT, wxCURSOR_PENCIL, _( "Add tracks" ) ); + getEditFrame()->SetToolID( ID_TRACK_BUTT, wxCURSOR_PENCIL, _( "Interactive Router" ) ); ctls->SetSnapping( true ); ctls->ShowCursor( true ); + // Set current track widths & via size + m_router->Settings().SetTrackWidth( bds.GetCurrentTrackWidth() ); + m_router->Settings().SetViaDiameter( bds.GetCurrentViaSize() ); + m_router->Settings().SetViaDrill( bds.GetCurrentViaDrill() ); + + ROUTER_TOOL_MENU *ctxMenu = new ROUTER_TOOL_MENU( board ); + + SetContextMenu ( ctxMenu ); + // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { @@ -453,21 +661,69 @@ int ROUTER_TOOL::Main( TOOL_EVENT& aEvent ) m_needsSync = true; else if( evt->IsMotion() ) updateStartItem( *evt ); - else if( evt->IsClick( BUT_LEFT ) ) + else if( evt->IsClick( BUT_LEFT ) || evt->IsAction( &ACT_NewTrack ) ) { updateStartItem( *evt ); - startRouting(); - } - } - // clearMsgPanel(); + if( evt->Modifier( MD_CTRL ) ) + performDragging(); + else + performRouting(); + } else if ( evt->IsAction( &ACT_Drag ) ) + performDragging(); + + handleCommonEvents(*evt); + } // Restore the default settings ctls->SetAutoPan( false ); ctls->ShowCursor( false ); - ctls->ForceCursorPosition( false ); - getEditFrame()->SetToolID( ID_NO_TOOL_SELECTED, wxCURSOR_DEFAULT, wxEmptyString ); + delete ctxMenu; + return 0; } + + +void ROUTER_TOOL::performDragging() +{ + VIEW_CONTROLS* ctls = getViewControls(); + + bool dragStarted = m_router->StartDragging( m_startSnapPoint, m_startItem ); + + if(!dragStarted) + return; + + if( m_startItem && m_startItem->Net() >= 0 ) + highlightNet( true, m_startItem->Net() ); + + ctls->ForceCursorPosition( false ); + ctls->SetAutoPan( true ); + + while( OPT_TOOL_EVENT evt = Wait() ) + { + if( evt->IsCancel() ) + break; + else if( evt->IsMotion() ) + { + updateEndItem( *evt ); + m_router->Move( m_endSnapPoint, m_endItem ); + } + else if( evt->IsClick( BUT_LEFT ) ) + { + + if( m_router->FixRoute( m_endSnapPoint, m_endItem ) ) + break; + + } + handleCommonEvents(*evt); + } + + if( m_router->RoutingInProgress() ) + m_router->StopRouting(); + + ctls->SetAutoPan( false ); + ctls->ForceCursorPosition( false ); + highlightNet( false ); +} diff --git a/pcbnew/router/router_tool.h b/pcbnew/router/router_tool.h index 42bbceb19c..db9db3ea6a 100644 --- a/pcbnew/router/router_tool.h +++ b/pcbnew/router/router_tool.h @@ -1,8 +1,9 @@ /* * KiRouter - a push-and-(sometimes-)shove PCB router * - * Copyright (C) 2013 CERN + * Copyright (C) 2013-2014 CERN * Author: Tomasz Wlostowski + * Author: Maciej Suminski * * 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 @@ -15,7 +16,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with this program. If not, see . + * with this program. If not, see . */ #ifndef __ROUTER_TOOL_H @@ -24,6 +25,8 @@ #include #include +#include + #include #include @@ -35,7 +38,7 @@ class PNS_ROUTER; class PNS_ITEM; -class ROUTER_TOOL : public TOOL_INTERACTIVE +class APIEXPORT ROUTER_TOOL : public TOOL_INTERACTIVE { public: ROUTER_TOOL(); @@ -48,12 +51,11 @@ private: PNS_ITEM* pickSingleItem( const VECTOR2I& aWhere, int aNet = -1, int aLayer = -1 ); - void setMsgPanel( bool enabled, int entry, const wxString& aUpperMessage = wxT(""), - const wxString& aLowerMessage = wxT("") ); - void clearMsgPanel(); - int getDefaultWidth( int aNetCode ); - void startRouting(); + + void performRouting(); + void performDragging(); + void highlightNet( bool enabled, int netcode = -1 ); void updateStartItem( TOOL_EVENT& aEvent ); @@ -61,6 +63,8 @@ private: void getNetclassDimensions( int aNetCode, int& aWidth, int& aViaDiameter, int& aViaDrill ); + void handleCommonEvents( TOOL_EVENT& evt ); + MSG_PANEL_ITEMS m_panelItems; PNS_ROUTER* m_router; @@ -72,11 +76,11 @@ private: PNS_ITEM* m_endItem; VECTOR2I m_endSnapPoint; + + CONTEXT_MENU* m_menu; + ///> Flag marking that the router's world needs syncing. bool m_needsSync; - - /*boost::shared_ptr m_menu;*/ - CONTEXT_MENU* m_menu; }; #endif diff --git a/pcbnew/router/time_limit.cpp b/pcbnew/router/time_limit.cpp new file mode 100644 index 0000000000..0e14a10678 --- /dev/null +++ b/pcbnew/router/time_limit.cpp @@ -0,0 +1,46 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013-2014 CERN + * Author: Tomasz Wlostowski + * + * 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 3 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, see . + */ + +#include + +#include "time_limit.h" + +TIME_LIMIT::TIME_LIMIT( int aMilliseconds ) : + m_limitMs( aMilliseconds ) + { + Restart(); + }; + +TIME_LIMIT::~TIME_LIMIT () {} + +bool TIME_LIMIT::Expired() const +{ + return ( wxGetLocalTimeMillis().GetValue() - m_startTics ) >= m_limitMs; +} + +void TIME_LIMIT::Restart() +{ + m_startTics = wxGetLocalTimeMillis().GetValue(); +} + +void TIME_LIMIT::Set ( int aMilliseconds ) +{ + m_limitMs = aMilliseconds; +} diff --git a/pcbnew/router/time_limit.h b/pcbnew/router/time_limit.h new file mode 100644 index 0000000000..fbb58c4156 --- /dev/null +++ b/pcbnew/router/time_limit.h @@ -0,0 +1,44 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013-2014 CERN + * Author: Tomasz Wlostowski + * + * 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 3 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, see . + */ + +#ifndef __TIME_LIMIT_H +#define __TIME_LIMIT_H + +#include + +class TIME_LIMIT { + +public: + TIME_LIMIT( int aMilliseconds = 0); + ~TIME_LIMIT (); + + bool Expired() const; + void Restart(); + + void Set ( int aMilliseconds ); + +private: + + int m_limitMs; + int64_t m_startTics; +}; + + +#endif \ No newline at end of file diff --git a/pcbnew/router/trace.h b/pcbnew/router/trace.h index 1f8a3e32c9..91f29baa15 100644 --- a/pcbnew/router/trace.h +++ b/pcbnew/router/trace.h @@ -15,22 +15,21 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with this program. If not, see . + * with this program. If not, see . */ #ifndef __TRACE_H #define __TRACE_H -// #ifdef DEBUG -#if 0 - #include #include #include -static void _trace_print( const char* aFuncName, int level, const std::string& aMsg ) +static inline void _trace_print( const char* aFuncName, int level, const std::string& aMsg ) { +#ifdef DEBUG std::cerr << "trace[" << level << "]: " << aFuncName << ": " << aMsg << std::endl; +#endif } #define TRACE( level, fmt, ... ) \ @@ -39,11 +38,4 @@ static void _trace_print( const char* aFuncName, int level, const std::string& a #define TRACEn( level, msg ) \ _trace_print( __FUNCTION__, level, std::string( msg ) ); -#else - -#define TRACE( level, fmt, ... ) -#define TRACEn( level, msg ) - -#endif - #endif From ae4f41c3281c78eef0a2f816afcca77b2b4631ab Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 14 May 2014 16:28:39 +0200 Subject: [PATCH 414/741] Added missing dialog files for pcbnew. --- pcbnew/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index ae2292bf13..2fc30d1fc7 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -97,6 +97,8 @@ set( PCBNEW_DIALOGS dialogs/dialog_netlist_fbp.cpp dialogs/dialog_pcb_text_properties.cpp dialogs/dialog_pcb_text_properties_base.cpp + dialogs/dialog_pns_settings.cpp + dialogs/dialog_pns_settings_base.cpp dialogs/dialog_non_copper_zones_properties_base.cpp dialogs/dialog_pad_properties.cpp dialogs/dialog_pad_properties_base.cpp @@ -115,6 +117,8 @@ set( PCBNEW_DIALOGS dialogs/dialog_set_grid.cpp dialogs/dialog_set_grid_base.cpp dialogs/dialog_target_properties_base.cpp + dialogs/dialog_track_via_size.cpp + dialogs/dialog_track_via_size_base.cpp footprint_wizard.cpp footprint_wizard_frame.cpp dialogs/dialog_footprint_wizard_list_base.cpp From def53707d52bb18376028f309a0675dce2f36cce Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 14 May 2014 16:29:53 +0200 Subject: [PATCH 415/741] TOOL_MANAGER is no longer static. Reworked autoregistration of TOOL_ACTIONs. --- common/tool/action_manager.cpp | 4 ++++ common/tool/context_menu.cpp | 15 ++++++--------- common/tool/tool_manager.cpp | 9 +-------- include/tool/tool_action.h | 17 +++++++++++++---- include/tool/tool_manager.h | 27 ++++++++++++++------------- include/wxBasePcbFrame.h | 2 +- pcbnew/basepcbframe.cpp | 4 ++-- pcbnew/board_undo_redo.cpp | 4 ++-- pcbnew/edit.cpp | 6 +++--- pcbnew/pcbframe.cpp | 10 +++++----- pcbnew/tools/pcb_tools.cpp | 34 ++++++++++++++++++++-------------- 11 files changed, 71 insertions(+), 61 deletions(-) diff --git a/common/tool/action_manager.cpp b/common/tool/action_manager.cpp index 51c85aa273..444143b0fb 100644 --- a/common/tool/action_manager.cpp +++ b/common/tool/action_manager.cpp @@ -50,6 +50,7 @@ void ACTION_MANAGER::RegisterAction( TOOL_ACTION* aAction ) // action name without specifying at least toolName is not valid assert( aAction->GetName().find( '.', 0 ) != std::string::npos ); + // TOOL_ACTIONs must have unique names & ids assert( m_actionNameIndex.find( aAction->m_name ) == m_actionNameIndex.end() ); assert( m_actionIdIndex.find( aAction->m_id ) == m_actionIdIndex.end() ); @@ -60,6 +61,8 @@ void ACTION_MANAGER::RegisterAction( TOOL_ACTION* aAction ) if( aAction->HasHotKey() ) m_actionHotKeys[aAction->m_currentHotKey].push_back( aAction ); + + aAction->setActionMgr( this ); } @@ -69,6 +72,7 @@ void ACTION_MANAGER::UnregisterAction( TOOL_ACTION* aAction ) m_actionIdIndex.erase( aAction->m_id ); // Indicate that the ACTION_MANAGER no longer care about the object + aAction->setActionMgr( NULL ); aAction->setId( -1 ); if( aAction->HasHotKey() ) diff --git a/common/tool/context_menu.cpp b/common/tool/context_menu.cpp index 7413761ed3..b6277e16a7 100644 --- a/common/tool/context_menu.cpp +++ b/common/tool/context_menu.cpp @@ -73,14 +73,8 @@ CONTEXT_MENU::CONTEXT_MENU( const CONTEXT_MENU& aMenu ) : void CONTEXT_MENU::setupEvents() { - Connect( wxEVT_MENU_HIGHLIGHT, wxEventHandler( CONTEXT_MENU::onMenuEvent ), - NULL, this ); - Connect( wxEVT_COMMAND_MENU_SELECTED, wxEventHandler( CONTEXT_MENU::onMenuEvent ), - NULL, this ); - - // Workaround for the case when mouse cursor never reaches menu (it hangs up tools using menu) - wxMenuEvent menuEvent( wxEVT_MENU_HIGHLIGHT, -1, this ); - AddPendingEvent( menuEvent ); + Connect( wxEVT_MENU_HIGHLIGHT, wxEventHandler( CONTEXT_MENU::onMenuEvent ), NULL, this ); + Connect( wxEVT_COMMAND_MENU_SELECTED, wxEventHandler( CONTEXT_MENU::onMenuEvent ), NULL, this ); } @@ -191,8 +185,11 @@ void CONTEXT_MENU::onMenuEvent( wxEvent& aEvent ) } } + assert( m_tool ); // without tool & tool manager we cannot handle events + // forward the action/update event to the TOOL_MANAGER - TOOL_MANAGER::Instance().ProcessEvent( *evt ); + if( evt && m_tool ) + m_tool->GetManager()->ProcessEvent( *evt ); } diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index dd77425a0c..a0bba9c51f 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -103,14 +103,6 @@ TOOL_MANAGER::TOOL_MANAGER() : TOOL_MANAGER::~TOOL_MANAGER() -{ - DeleteAll(); - - delete m_actionMgr; -} - - -void TOOL_MANAGER::DeleteAll() { std::map::iterator it, it_end; @@ -122,6 +114,7 @@ void TOOL_MANAGER::DeleteAll() } m_toolState.clear(); + delete m_actionMgr; } diff --git a/include/tool/tool_action.h b/include/tool/tool_action.h index 8fb81e5d8d..4097fd2f7f 100644 --- a/include/tool/tool_action.h +++ b/include/tool/tool_action.h @@ -52,12 +52,12 @@ public: m_currentHotKey( aDefaultHotKey ), m_menuItem( aMenuItem ), m_menuDescription( aMenuDesc ), m_id( -1 ) { - TOOL_MANAGER::Instance().RegisterAction( this ); + TOOL_MANAGER::GetActionList().push_back( this ); } ~TOOL_ACTION() { - TOOL_MANAGER::Instance().UnregisterAction( this ); + TOOL_MANAGER::GetActionList().remove( this ); } bool operator==( const TOOL_ACTION& aRhs ) const @@ -195,6 +195,12 @@ private: m_id = aId; } + /// Assigns ACTION_MANAGER object that handles the TOOL_ACTION. + void setActionMgr( ACTION_MANAGER* aManager ) + { + m_actionMgr = aManager; + } + /// Name of the action (convention is: app.[tool.]action.name) std::string m_name; @@ -219,11 +225,14 @@ private: /// Unique ID for fast matching. Assigned by ACTION_MANAGER. int m_id; + /// Action manager that handles this TOOL_ACTION. + ACTION_MANAGER* m_actionMgr; + /// Origin of the action -// const TOOL_BASE* m_origin; + // const TOOL_BASE* m_origin; /// Originating UI object -// wxWindow* m_uiOrigin; + // wxWindow* m_uiOrigin; }; #endif diff --git a/include/tool/tool_manager.h b/include/tool/tool_manager.h index 1e4563a7e0..c8861c7ff1 100644 --- a/include/tool/tool_manager.h +++ b/include/tool/tool_manager.h @@ -48,20 +48,10 @@ class wxWindow; class TOOL_MANAGER { public: - static TOOL_MANAGER& Instance() - { - static TOOL_MANAGER manager; - - return manager; - } + TOOL_MANAGER(); ~TOOL_MANAGER(); - /** - * Deletes all the tools that were registered in the TOOL_MANAGER. - */ - void DeleteAll(); - /** * Generates an unique ID from for a tool with given name. */ @@ -251,9 +241,20 @@ public: m_passEvent = true; } -private: - TOOL_MANAGER(); + /** + * Returns list of TOOL_ACTIONs. TOOL_ACTIONs add themselves to the list upon their + * creation. + * @return List of TOOL_ACTIONs. + */ + static std::list& GetActionList() + { + // TODO I am afraid this approach won't work when we reach multitab version of kicad. + static std::list actionList; + return actionList; + } + +private: struct TOOL_STATE; typedef std::pair TRANSITION; diff --git a/include/wxBasePcbFrame.h b/include/wxBasePcbFrame.h index b2ce7d9a23..19d66214ac 100644 --- a/include/wxBasePcbFrame.h +++ b/include/wxBasePcbFrame.h @@ -90,7 +90,7 @@ protected: /// main window. wxAuiToolBar* m_auxiliaryToolBar; - TOOL_MANAGER& m_toolManager; + TOOL_MANAGER* m_toolManager; TOOL_DISPATCHER* m_toolDispatcher; void updateGridSelectBox(); diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index caa1194fc8..5577650436 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -133,10 +133,10 @@ END_EVENT_TABLE() PCB_BASE_FRAME::PCB_BASE_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrameType, const wxString& aTitle, const wxPoint& aPos, const wxSize& aSize, long aStyle, const wxString & aFrameName ) : - EDA_DRAW_FRAME( aKiway, aParent, aFrameType, aTitle, aPos, aSize, aStyle, aFrameName ), - m_toolManager( TOOL_MANAGER::Instance() ) + EDA_DRAW_FRAME( aKiway, aParent, aFrameType, aTitle, aPos, aSize, aStyle, aFrameName ) { m_Pcb = NULL; + m_toolManager = NULL; m_toolDispatcher = NULL; m_DisplayPadFill = true; // How to draw pads diff --git a/pcbnew/board_undo_redo.cpp b/pcbnew/board_undo_redo.cpp index db51056d02..56b5ca63d2 100644 --- a/pcbnew/board_undo_redo.cpp +++ b/pcbnew/board_undo_redo.cpp @@ -637,7 +637,7 @@ void PCB_EDIT_FRAME::GetBoardFromUndoList( wxCommandEvent& aEvent ) // Inform tools that undo command was issued TOOL_EVENT event( TC_MESSAGE, TA_UNDO_REDO, AS_GLOBAL ); - m_toolManager.ProcessEvent( event ); + m_toolManager->ProcessEvent( event ); /* Get the old list */ PICKED_ITEMS_LIST* List = GetScreen()->PopCommandFromUndoList(); @@ -660,7 +660,7 @@ void PCB_EDIT_FRAME::GetBoardFromRedoList( wxCommandEvent& aEvent ) // Inform tools that redo command was issued TOOL_EVENT event( TC_MESSAGE, TA_UNDO_REDO, AS_GLOBAL ); - m_toolManager.ProcessEvent( event ); + m_toolManager->ProcessEvent( event ); /* Get the old list */ PICKED_ITEMS_LIST* List = GetScreen()->PopCommandFromRedoList(); diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index 51de425839..7c2a02804f 100644 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -1391,15 +1391,15 @@ void PCB_EDIT_FRAME::OnSelectTool( wxCommandEvent& aEvent ) // Cancel the current tool // TODO while sending a lot of cancel events works for sure, it is not the most // elegant way to cancel a tool, this should be probably done another way - while( m_toolManager.GetCurrentTool()->GetName() != "pcbnew.InteractiveSelection" && + while( m_toolManager->GetCurrentTool()->GetName() != "pcbnew.InteractiveSelection" && trials++ < MAX_TRIALS ) { TOOL_EVENT cancel( TC_ANY, TA_CANCEL_TOOL ); - m_toolManager.ProcessEvent( cancel ); + m_toolManager->ProcessEvent( cancel ); } if( !actionName.empty() ) - m_toolManager.RunAction( actionName ); + m_toolManager->RunAction( actionName ); } } else diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index b873ef95f7..d04541e200 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -495,9 +495,9 @@ void PCB_EDIT_FRAME::SetBoard( BOARD* aBoard ) ViewReloadBoard( aBoard ); // update the tool manager with the new board and its view. - m_toolManager.SetEnvironment( aBoard, GetGalCanvas()->GetView(), - GetGalCanvas()->GetViewControls(), this ); - m_toolManager.ResetTools( TOOL_BASE::MODEL_RELOAD ); + m_toolManager->SetEnvironment( aBoard, GetGalCanvas()->GetView(), + GetGalCanvas()->GetViewControls(), this ); + m_toolManager->ResetTools( TOOL_BASE::MODEL_RELOAD ); } } @@ -677,9 +677,9 @@ void PCB_EDIT_FRAME::UseGalCanvas( bool aEnable ) ViewReloadBoard( m_Pcb ); GetGalCanvas()->GetView()->RecacheAllItems(); - m_toolManager.SetEnvironment( m_Pcb, GetGalCanvas()->GetView(), + m_toolManager->SetEnvironment( m_Pcb, GetGalCanvas()->GetView(), GetGalCanvas()->GetViewControls(), this ); - m_toolManager.ResetTools( TOOL_BASE::MODEL_RELOAD ); + m_toolManager->ResetTools( TOOL_BASE::MODEL_RELOAD ); GetGalCanvas()->StartDrawing(); } diff --git a/pcbnew/tools/pcb_tools.cpp b/pcbnew/tools/pcb_tools.cpp index 0decc244d7..eaefa97678 100644 --- a/pcbnew/tools/pcb_tools.cpp +++ b/pcbnew/tools/pcb_tools.cpp @@ -24,6 +24,7 @@ #include #include +#include #include #include @@ -45,8 +46,8 @@ void PCB_EDIT_FRAME::setupTools() { // Create the manager and dispatcher & route draw panel events to the dispatcher - m_toolManager = TOOL_MANAGER::Instance(); - m_toolDispatcher = new TOOL_DISPATCHER( &m_toolManager, this ); + m_toolManager = new TOOL_MANAGER; + m_toolDispatcher = new TOOL_DISPATCHER( m_toolManager, this ); GetGalCanvas()->SetEventDispatcher( m_toolDispatcher ); // Connect handlers to toolbar buttons @@ -59,26 +60,31 @@ void PCB_EDIT_FRAME::setupTools() wxCommandEventHandler( PCB_EDIT_FRAME::onGenericCommand ), NULL, this ); #endif - // Register tools - m_toolManager.RegisterTool( new SELECTION_TOOL ); - m_toolManager.RegisterTool( new ROUTER_TOOL ); - m_toolManager.RegisterTool( new EDIT_TOOL ); - m_toolManager.RegisterTool( new DRAWING_TOOL ); - m_toolManager.RegisterTool( new POINT_EDITOR ); - m_toolManager.RegisterTool( new PCBNEW_CONTROL ); + // Register actions + std::list& actionList = m_toolManager->GetActionList(); + BOOST_FOREACH( TOOL_ACTION* action, actionList ) + m_toolManager->RegisterAction( action ); - m_toolManager.SetEnvironment( NULL, GetGalCanvas()->GetView(), - GetGalCanvas()->GetViewControls(), this ); - m_toolManager.ResetTools( TOOL_BASE::RUN ); + // Register tools + m_toolManager->RegisterTool( new SELECTION_TOOL ); + m_toolManager->RegisterTool( new ROUTER_TOOL ); + m_toolManager->RegisterTool( new EDIT_TOOL ); + m_toolManager->RegisterTool( new DRAWING_TOOL ); + m_toolManager->RegisterTool( new POINT_EDITOR ); + m_toolManager->RegisterTool( new PCBNEW_CONTROL ); + + m_toolManager->SetEnvironment( NULL, GetGalCanvas()->GetView(), + GetGalCanvas()->GetViewControls(), this ); + m_toolManager->ResetTools( TOOL_BASE::RUN ); // Run the selection tool, it is supposed to be always active - m_toolManager.InvokeTool( "pcbnew.InteractiveSelection" ); + m_toolManager->InvokeTool( "pcbnew.InteractiveSelection" ); } void PCB_EDIT_FRAME::destroyTools() { - m_toolManager.DeleteAll(); + delete m_toolManager; delete m_toolDispatcher; } From f31dd1cdafc2d09f9f530d837b07a33341a3f716 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 14 May 2014 16:40:56 +0200 Subject: [PATCH 416/741] PNS debug output is enabled with PNS_DEBUG define. --- pcbnew/router/trace.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pcbnew/router/trace.h b/pcbnew/router/trace.h index 91f29baa15..7e6fc80980 100644 --- a/pcbnew/router/trace.h +++ b/pcbnew/router/trace.h @@ -32,10 +32,15 @@ static inline void _trace_print( const char* aFuncName, int level, const std::st #endif } -#define TRACE( level, fmt, ... ) \ - _trace_print( __FUNCTION__, level, ( boost::format( fmt ) % __VA_ARGS__ ).str() ); +#ifdef PNS_DEBUG + #define TRACE( level, fmt, ... ) \ + _trace_print( __FUNCTION__, level, ( boost::format( fmt ) % __VA_ARGS__ ).str() ); -#define TRACEn( level, msg ) \ - _trace_print( __FUNCTION__, level, std::string( msg ) ); + #define TRACEn( level, msg ) \ + _trace_print( __FUNCTION__, level, std::string( msg ) ); +#else + #define TRACE( ... ) + #define TRACEn( ... ) +#endif #endif From d7ac36826055a4537e047737ecdd3f396f07fa87 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 14 May 2014 16:53:49 +0200 Subject: [PATCH 417/741] PNS routing settings are stored between router invocations. --- pcbnew/router/pns_router.h | 11 +++++++++++ pcbnew/router/router_tool.cpp | 3 +++ pcbnew/router/router_tool.h | 2 ++ 3 files changed, 16 insertions(+) diff --git a/pcbnew/router/pns_router.h b/pcbnew/router/pns_router.h index 53c0905487..9c867c585d 100644 --- a/pcbnew/router/pns_router.h +++ b/pcbnew/router/pns_router.h @@ -172,6 +172,17 @@ public: */ void ApplySettings(); + /** + * Changes routing settings to ones passed in the parameter. + * @param aSettings are the new settings. + */ + void LoadSettings( const PNS_ROUTING_SETTINGS& aSettings ) + { + m_settings = aSettings; + + ApplySettings(); + } + void EnableSnapping ( bool aEnable ) { m_snappingEnabled = aEnable; diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index 4220aa4035..db2c996a34 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -244,6 +244,7 @@ void ROUTER_TOOL::Reset( RESET_REASON aReason ) m_router->ClearWorld(); m_router->SetBoard( getModel( PCB_T ) ); m_router->SyncWorld(); + m_router->LoadSettings( m_settings ); m_needsSync = false; if( getView() ) @@ -620,6 +621,8 @@ void ROUTER_TOOL::performRouting() m_needsSync = true; } + m_settings = m_router->Settings(); + ctls->SetAutoPan( false ); ctls->ForceCursorPosition( false ); highlightNet( false ); diff --git a/pcbnew/router/router_tool.h b/pcbnew/router/router_tool.h index db9db3ea6a..e516222470 100644 --- a/pcbnew/router/router_tool.h +++ b/pcbnew/router/router_tool.h @@ -34,6 +34,7 @@ #include #include "pns_layerset.h" +#include "pns_routing_settings.h" class PNS_ROUTER; class PNS_ITEM; @@ -68,6 +69,7 @@ private: MSG_PANEL_ITEMS m_panelItems; PNS_ROUTER* m_router; + PNS_ROUTING_SETTINGS m_settings; ///< Stores routing settings between router invocations PNS_ITEM* m_startItem; int m_startLayer; From 0d9373ca6c9ca9ec546eeeb8d7f92f52d1acb3a8 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 14 May 2014 18:45:59 +0200 Subject: [PATCH 418/741] Undo/report support for track dragging (PNS). --- pcbnew/router/pns_router.cpp | 4 ---- pcbnew/router/router_tool.cpp | 24 ++++++++++++++++++++++-- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index a08b0f0fc7..72e001801c 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -373,13 +373,9 @@ void PNS_ROUTER::ClearWorld() if( m_placer ) delete m_placer; - if( m_previewItems ) - delete m_previewItems; - m_clearanceFunc = NULL; m_world = NULL; m_placer = NULL; - m_previewItems = NULL; } diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index db2c996a34..45e2d9d577 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -621,8 +621,6 @@ void ROUTER_TOOL::performRouting() m_needsSync = true; } - m_settings = m_router->Settings(); - ctls->SetAutoPan( false ); ctls->ForceCursorPosition( false ); highlightNet( false ); @@ -683,6 +681,8 @@ int ROUTER_TOOL::Main( TOOL_EVENT& aEvent ) ctls->ShowCursor( false ); getEditFrame()->SetToolID( ID_NO_TOOL_SELECTED, wxCURSOR_DEFAULT, wxEmptyString ); + // Store routing settings till the next invocation + m_settings = m_router->Settings(); delete ctxMenu; return 0; @@ -691,6 +691,8 @@ int ROUTER_TOOL::Main( TOOL_EVENT& aEvent ) void ROUTER_TOOL::performDragging() { + PCB_EDIT_FRAME* frame = getEditFrame(); + bool saveUndoBuffer = true; VIEW_CONTROLS* ctls = getViewControls(); bool dragStarted = m_router->StartDragging( m_startSnapPoint, m_startItem ); @@ -708,6 +710,11 @@ void ROUTER_TOOL::performDragging() { if( evt->IsCancel() ) break; + else if( evt->Action() == TA_UNDO_REDO ) + { + saveUndoBuffer = false; + break; + } else if( evt->IsMotion() ) { updateEndItem( *evt ); @@ -726,6 +733,19 @@ void ROUTER_TOOL::performDragging() if( m_router->RoutingInProgress() ) m_router->StopRouting(); + if( saveUndoBuffer ) + { + // Save the recent changes in the undo buffer + frame->SaveCopyInUndoList( m_router->GetUndoBuffer(), UR_UNSPECIFIED ); + m_router->ClearUndoBuffer(); + frame->OnModify(); + } + else + { + // It was interrupted by TA_UNDO_REDO event, so we have to sync the world now + m_needsSync = true; + } + ctls->SetAutoPan( false ); ctls->ForceCursorPosition( false ); highlightNet( false ); From f04997797bc80ed7ad3fc8ad0aaed2cb19b021da Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 14 May 2014 19:04:21 +0200 Subject: [PATCH 419/741] Fixed freezing of GAL canvas if user chooses Cancel in the on close dialog.. --- pcbnew/pcbframe.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index d04541e200..597255c21d 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -591,7 +591,6 @@ void PCB_EDIT_FRAME::OnQuit( wxCommandEvent& event ) void PCB_EDIT_FRAME::OnCloseWindow( wxCloseEvent& Event ) { m_canvas->SetAbortRequest( true ); - GetGalCanvas()->StopDrawing(); if( GetScreen()->IsModify() ) { @@ -615,6 +614,8 @@ void PCB_EDIT_FRAME::OnCloseWindow( wxCloseEvent& Event ) } } + GetGalCanvas()->StopDrawing(); + // Delete the auto save file if it exists. wxFileName fn = GetBoard()->GetFileName(); From 7a526261fbd15e0529b322dc45c77439dfabd34c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 14 May 2014 19:15:25 +0200 Subject: [PATCH 420/741] PNS router deselects all items when started. --- pcbnew/router/router_tool.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index 45e2d9d577..a983fac319 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -633,6 +633,9 @@ int ROUTER_TOOL::Main( TOOL_EVENT& aEvent ) BOARD* board = getModel( PCB_T ); BOARD_DESIGN_SETTINGS& bds = board->GetDesignSettings(); + // Deselect all items + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + getEditFrame()->SetToolID( ID_TRACK_BUTT, wxCURSOR_PENCIL, _( "Interactive Router" ) ); ctls->SetSnapping( true ); From bb0804ec29d5f780f5971d19fe53b15ff12d047c Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 15 May 2014 08:32:24 +0200 Subject: [PATCH 421/741] DXF export: fix incorrect export of polygons having thick outline (like zones): Thick segments of outline were drawn like lines with no thickness. Fix ( workaround only) crash (Windows only) when a quasi modal frame (like footprint viewer) was called from a dialog (like the component properties dialog in schematic editor). Very minor other fixes. --- common/common_plotDXF_functions.cpp | 31 ++++++++++++++++++++++++----- common/eda_doc.cpp | 8 ++++---- common/kiway_player.cpp | 10 ++++++++-- common/msgpanel.cpp | 5 +++-- eeschema/getpart.cpp | 1 - include/eda_doc.h | 4 ++-- include/msgpanel.h | 4 +++- pcbnew/modedit.cpp | 8 +++++++- pcbnew/tools/common_actions.cpp | 8 ++++---- 9 files changed, 57 insertions(+), 22 deletions(-) diff --git a/common/common_plotDXF_functions.cpp b/common/common_plotDXF_functions.cpp index 0164ca628b..89aabe2f73 100644 --- a/common/common_plotDXF_functions.cpp +++ b/common/common_plotDXF_functions.cpp @@ -326,18 +326,39 @@ void DXF_PLOTTER::PlotPoly( const std::vector< wxPoint >& aCornerList, if( aCornerList.size() <= 1 ) return; - MoveTo( aCornerList[0] ); - for( unsigned ii = 1; ii < aCornerList.size(); ii++ ) - LineTo( aCornerList[ii] ); + // Plot outlines with lines (thickness = 0) to define the polygon + if( aWidth == 0 || aFill ) + { + MoveTo( aCornerList[0] ); + + for( unsigned ii = 1; ii < aCornerList.size(); ii++ ) + LineTo( aCornerList[ii] ); + } // Close polygon if 'fill' requested + unsigned last = aCornerList.size() - 1; + if( aFill ) { - unsigned ii = aCornerList.size() - 1; - if( aCornerList[ii] != aCornerList[0] ) + if( aCornerList[last] != aCornerList[0] ) LineTo( aCornerList[0] ); } + PenFinish(); + + // if the polygon outline has thickness, plot outlines with thick segments + if( aWidth > 0 ) + { + MoveTo( aCornerList[0] ); + + for( unsigned ii = 1; ii < aCornerList.size(); ii++ ) + ThickSegment( aCornerList[ii-1], aCornerList[ii], + aWidth, FILLED ); + + if( aCornerList[last] != aCornerList[0] ) + ThickSegment( aCornerList[last], aCornerList[0], + aWidth, FILLED ); + } } diff --git a/common/eda_doc.cpp b/common/eda_doc.cpp index 407b1c5ed3..717002e000 100644 --- a/common/eda_doc.cpp +++ b/common/eda_doc.cpp @@ -59,7 +59,7 @@ static const wxFileTypeInfo EDAfallbacks[] = }; -bool GetAssociatedDocument( wxFrame* aFrame, +bool GetAssociatedDocument( wxWindow* aParent, const wxString& aDocName, const wxPathList* aPaths) @@ -122,7 +122,7 @@ bool GetAssociatedDocument( wxFrame* aFrame, fullfilename, extension, mask, - aFrame, + aParent, wxFD_OPEN, true, wxPoint( -1, -1 ) ); @@ -133,7 +133,7 @@ bool GetAssociatedDocument( wxFrame* aFrame, if( !wxFileExists( fullfilename ) ) { msg.Printf( _( "Doc File '%s' not found" ), GetChars( aDocName ) ); - DisplayError( aFrame, msg ); + DisplayError( aParent, msg ); return false; } @@ -176,7 +176,7 @@ bool GetAssociatedDocument( wxFrame* aFrame, if( !success ) { msg.Printf( _( "Unknown MIME type for doc file <%s>" ), GetChars( fullfilename ) ); - DisplayError( aFrame, msg ); + DisplayError( aParent, msg ); } return success; diff --git a/common/kiway_player.cpp b/common/kiway_player.cpp index fda3962d2d..2351239e16 100644 --- a/common/kiway_player.cpp +++ b/common/kiway_player.cpp @@ -141,10 +141,16 @@ bool KIWAY_PLAYER::ShowModal( wxString* aResult, wxWindow* aResultantFocusWindow bool KIWAY_PLAYER::Destroy() { - // Needed on Windows to leave the modal parent on top with focus + // Reparent is needed on Windows to leave the modal parent on top with focus + // However it works only if the caller is a main frame, not a dialog. + // (application crashes if the new parent is a wxDialog #ifdef __WINDOWS__ if( m_modal_resultant_parent && GetParent() != m_modal_resultant_parent ) - Reparent( m_modal_resultant_parent ); + { + EDA_BASE_FRAME* parent = dynamic_cast(m_modal_resultant_parent); + if( parent ) + Reparent( m_modal_resultant_parent ); + } #endif return EDA_BASE_FRAME::Destroy(); diff --git a/common/msgpanel.cpp b/common/msgpanel.cpp index 9004f03d6b..5652db8148 100644 --- a/common/msgpanel.cpp +++ b/common/msgpanel.cpp @@ -37,8 +37,9 @@ END_EVENT_TABLE() EDA_MSG_PANEL::EDA_MSG_PANEL( wxWindow* aParent, int aId, - const wxPoint& aPosition, const wxSize& aSize ) : - wxPanel( aParent, aId, aPosition, aSize ) + const wxPoint& aPosition, const wxSize& aSize, + long style, const wxString &name ) : + wxPanel( aParent, aId, aPosition, aSize, style, name ) { SetFont( wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT ) ); SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); diff --git a/eeschema/getpart.cpp b/eeschema/getpart.cpp index 8821cfb31e..cd4c15a90a 100644 --- a/eeschema/getpart.cpp +++ b/eeschema/getpart.cpp @@ -39,7 +39,6 @@ #include #include -#include #include #include #include diff --git a/include/eda_doc.h b/include/eda_doc.h index fd6e0f3df2..1935c528c4 100644 --- a/include/eda_doc.h +++ b/include/eda_doc.h @@ -19,13 +19,13 @@ int KeyWordOk( const wxString& aKeyList, const wxString& aDatabase ); /** * Function GetAssociatedDocument * open a document (file) with the suitable browser - * @param aFrame = main frame + * @param aParent = main frame * @param aDocName = filename of file to open (Full filename or short filename) * if \a aDocName begins with http: or ftp: or www. the default internet browser is launched * @param aPaths = a wxPathList to explore. * if NULL or aDocName is a full filename, aPath is not used. */ -bool GetAssociatedDocument( wxFrame* aFrame, +bool GetAssociatedDocument( wxWindow* aParent, const wxString& aDocName, const wxPathList* aPaths = NULL ); diff --git a/include/msgpanel.h b/include/msgpanel.h index 6ea6513ce2..dc5edd29eb 100644 --- a/include/msgpanel.h +++ b/include/msgpanel.h @@ -121,7 +121,9 @@ protected: wxSize computeTextSize( const wxString& text ) const; public: - EDA_MSG_PANEL( wxWindow* aParent, int aId, const wxPoint& aPosition, const wxSize& aSize ); + EDA_MSG_PANEL( wxWindow* aParent, int aId, + const wxPoint& aPosition, const wxSize& aSize, + long style=wxTAB_TRAVERSAL, const wxString &name=wxPanelNameStr); ~EDA_MSG_PANEL(); /** diff --git a/pcbnew/modedit.cpp b/pcbnew/modedit.cpp index 81b74eebe7..7150c85bcf 100644 --- a/pcbnew/modedit.cpp +++ b/pcbnew/modedit.cpp @@ -367,7 +367,13 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) { // 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*) Kiway().Player( FRAME_PCB, true ); + PCB_EDIT_FRAME* pcbframe = (PCB_EDIT_FRAME*) Kiway().Player( FRAME_PCB, false ); + + if( pcbframe == NULL ) // happens when the board editor is not active (or closed) + { + wxMessageBox( _("No board currently edited" ) ); + break; + } BOARD* mainpcb = pcbframe->GetBoard(); MODULE* source_module = NULL; diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 3ff65af56b..45e9ba17fc 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -208,11 +208,11 @@ TOOL_ACTION COMMON_ACTIONS::layerAlphaDec( "pcbnew.layerAlphaDec", // Grid control TOOL_ACTION COMMON_ACTIONS::gridFast1( "pcbnew.gridFast1", - AS_GLOBAL, MD_ALT + '1', + AS_GLOBAL, (int)MD_ALT + '1', "", "" ); TOOL_ACTION COMMON_ACTIONS::gridFast2( "pcbnew.gridFast2", - AS_GLOBAL, MD_ALT + '2', + AS_GLOBAL, (int)MD_ALT + '2', "", "" ); TOOL_ACTION COMMON_ACTIONS::gridNext( "pcbnew.gridNext", @@ -220,7 +220,7 @@ TOOL_ACTION COMMON_ACTIONS::gridNext( "pcbnew.gridNext", "", "" ); TOOL_ACTION COMMON_ACTIONS::gridPrev( "pcbnew.gridPrev", - AS_GLOBAL, MD_CTRL + '`', + AS_GLOBAL, (int)MD_CTRL + '`', "", "" ); @@ -248,7 +248,7 @@ TOOL_ACTION COMMON_ACTIONS::resetCoords( "pcbnew.resetCoords", "", "" ); TOOL_ACTION COMMON_ACTIONS::switchUnits( "pcbnew.switchUnits", - AS_GLOBAL, MD_CTRL + 'U', + AS_GLOBAL, (int)MD_CTRL + 'U', "", "" ); TOOL_ACTION COMMON_ACTIONS::showHelp( "pcbnew.showHelp", From b2a5b2f3293dbc2f932edd6e5f662935ecd228ea Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 15 May 2014 10:11:17 +0200 Subject: [PATCH 422/741] Scripting fix. --- pcbnew/class_netclass.h | 6 +++--- pcbnew/scripting/pcbnew_scripting_helpers.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pcbnew/class_netclass.h b/pcbnew/class_netclass.h index 7085b3ebe3..0d79013df8 100644 --- a/pcbnew/class_netclass.h +++ b/pcbnew/class_netclass.h @@ -54,9 +54,9 @@ class NETCLASS { private: // Default values used to init a NETCLASS - const static int DEFAULT_CLEARANCE; - const static int DEFAULT_VIA_DRILL; - const static int DEFAULT_UVIA_DRILL; + static const int DEFAULT_CLEARANCE; + static const int DEFAULT_VIA_DRILL; + static const int DEFAULT_UVIA_DRILL; protected: wxString m_Name; ///< Name of the net class diff --git a/pcbnew/scripting/pcbnew_scripting_helpers.cpp b/pcbnew/scripting/pcbnew_scripting_helpers.cpp index 42a0a14391..62b21b3df1 100644 --- a/pcbnew/scripting/pcbnew_scripting_helpers.cpp +++ b/pcbnew/scripting/pcbnew_scripting_helpers.cpp @@ -86,7 +86,7 @@ bool SaveBoard( wxString& aFileName, BOARD* aBoard, { aBoard->m_Status_Pcb &= ~CONNEXION_OK; aBoard->SynchronizeNetsAndNetClasses(); - aBoard->SetCurrentNetClass( aBoard->m_NetClasses.GetDefault()->GetName() ); + aBoard->GetDesignSettings().SetCurrentNetClass( NETCLASS::Default ); #if 0 wxString header; From 4fcaf4c586222b52cefe51992b6f5810d28a87bc Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 15 May 2014 10:51:08 +0200 Subject: [PATCH 423/741] Minor BOARD_DESIGN_SETTINGS refactoring. Removed SetCurrentClassName() (it was not used anywhere and less safe than SetCurrentClass()). Added BOARD_DESIGN_SETTIGNS::GetDefault() to make some pieces of shorter and clearer. --- include/class_board_design_settings.h | 18 ++++++++++-------- pcbnew/autorouter/routing_matrix.cpp | 2 +- pcbnew/autorouter/solve.cpp | 2 +- pcbnew/class_board.cpp | 2 +- pcbnew/class_board_connected_item.cpp | 4 ++-- pcbnew/eagle_plugin.cpp | 2 +- pcbnew/files.cpp | 2 +- pcbnew/kicad_plugin.cpp | 12 ++++++------ pcbnew/legacy_plugin.cpp | 6 +++--- pcbnew/pcb_parser.cpp | 2 +- pcbnew/router/router_tool.cpp | 2 +- 11 files changed, 28 insertions(+), 26 deletions(-) diff --git a/include/class_board_design_settings.h b/include/class_board_design_settings.h index a22f3c5bb6..8d04fe0922 100644 --- a/include/class_board_design_settings.h +++ b/include/class_board_design_settings.h @@ -102,18 +102,22 @@ public: BOARD_DESIGN_SETTINGS(); /** - * Function SetCurrentNetClassName - * sets the current net class name to \a aName. - * - * @param aName is a reference to a wxString object containing the current net class name. + * Function GetDefault + * @return the default netclass. */ - void SetCurrentNetClassName( const wxString& aName ) { m_currentNetClassName = aName; } + inline NETCLASS* GetDefault() const + { + return m_NetClasses.GetDefault(); + } /** * Function GetCurrentNetClassName * @return the current net class name. */ - const wxString& GetCurrentNetClassName() const { return m_currentNetClassName; } + const wxString& GetCurrentNetClassName() const + { + return m_currentNetClassName; + } /** * Function SetCurrentNetClass @@ -275,8 +279,6 @@ public: return m_customViaSize.m_Drill; } - // TODO microvia methods should go here - /** * Function UseCustomTrackViaSize * Enables/disables custom track/via size settings. If enabled, values set with diff --git a/pcbnew/autorouter/routing_matrix.cpp b/pcbnew/autorouter/routing_matrix.cpp index 9d87b52bda..ee1890bf2a 100644 --- a/pcbnew/autorouter/routing_matrix.cpp +++ b/pcbnew/autorouter/routing_matrix.cpp @@ -201,7 +201,7 @@ void PlaceCells( BOARD* aPcb, int net_code, int flag ) LAYER_MSK layerMask; // use the default NETCLASS? - NETCLASS* nc = aPcb->GetDesignSettings().m_NetClasses.GetDefault(); + NETCLASS* nc = aPcb->GetDesignSettings().GetDefault(); int trackWidth = nc->GetTrackWidth(); int clearance = nc->GetClearance(); diff --git a/pcbnew/autorouter/solve.cpp b/pcbnew/autorouter/solve.cpp index c1f66b5423..0e0120c458 100644 --- a/pcbnew/autorouter/solve.cpp +++ b/pcbnew/autorouter/solve.cpp @@ -280,7 +280,7 @@ int PCB_EDIT_FRAME::Solve( wxDC* DC, int aLayersCount ) m_canvas->SetAbortRequest( false ); - s_Clearance = GetBoard()->GetDesignSettings().m_NetClasses.GetDefault()->GetClearance(); + s_Clearance = GetBoard()->GetDesignSettings().GetDefault()->GetClearance(); // Prepare the undo command info s_ItemsListPicker.ClearListAndDeleteItems(); // Should not be necessary, but... diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index c05474d29f..2fc5fa7d3e 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -91,7 +91,7 @@ BOARD::BOARD() : m_Layer[layer].m_Type = LT_UNDEFINED; } - NETCLASS* defaultClass = m_designSettings.m_NetClasses.GetDefault(); + NETCLASS* defaultClass = m_designSettings.GetDefault(); defaultClass->SetDescription( _( "This is the default net class." ) ); // Initialize default values in default netclass. diff --git a/pcbnew/class_board_connected_item.cpp b/pcbnew/class_board_connected_item.cpp index 9aaa6d14ad..0b91036802 100644 --- a/pcbnew/class_board_connected_item.cpp +++ b/pcbnew/class_board_connected_item.cpp @@ -144,7 +144,7 @@ NETCLASS* BOARD_CONNECTED_ITEM::GetNetClass() const if( netclass ) return netclass; else - return board->GetDesignSettings().m_NetClasses.GetDefault(); + return board->GetDesignSettings().GetDefault(); } @@ -158,7 +158,7 @@ wxString BOARD_CONNECTED_ITEM::GetNetClassName() const else { BOARD* board = GetBoard(); - name = board->GetDesignSettings().m_NetClasses.GetDefault()->GetName(); + name = NETCLASS::Default; } return name; diff --git a/pcbnew/eagle_plugin.cpp b/pcbnew/eagle_plugin.cpp index b1da39fc6f..2e59478403 100644 --- a/pcbnew/eagle_plugin.cpp +++ b/pcbnew/eagle_plugin.cpp @@ -1146,7 +1146,7 @@ BOARD* EAGLE_PLUGIN::Load( const wxString& aFileName, BOARD* aAppendToMe, const if( m_rules->mdWireWire ) { - NETCLASS* defaultNetclass = designSettings.m_NetClasses.GetDefault(); + NETCLASS* defaultNetclass = designSettings.GetDefault(); int clearance = KiROUND( m_rules->mdWireWire ); if( clearance < defaultNetclass->GetClearance() ) diff --git a/pcbnew/files.cpp b/pcbnew/files.cpp index 89671c066b..10eaa4be0a 100644 --- a/pcbnew/files.cpp +++ b/pcbnew/files.cpp @@ -678,7 +678,7 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool aCreateBackupF // Select default Netclass before writing file. // Useful to save default values in headers - GetDesignSettings().SetCurrentNetClass( GetDesignSettings().m_NetClasses.GetDefault()->GetName() ); + GetDesignSettings().SetCurrentNetClass( NETCLASS::Default ); try { diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index adf5ce76eb..f77c4dfbb4 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -572,7 +572,7 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const FMTIU( dsnSettings.m_TrackWidthList[ii] ).c_str() ); m_out->Print( aNestLevel+1, "(trace_clearance %s)\n", - FMTIU( dsnSettings.m_NetClasses.GetDefault()->GetClearance() ).c_str() ); + FMTIU( dsnSettings.GetDefault()->GetClearance() ).c_str() ); // ZONE_SETTINGS m_out->Print( aNestLevel+1, "(zone_clearance %s)\n", @@ -590,9 +590,9 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const // Save current default via size, for compatibility with older Pcbnew version; m_out->Print( aNestLevel+1, "(via_size %s)\n", - FMTIU( dsnSettings.m_NetClasses.GetDefault()->GetViaDiameter() ).c_str() ); + FMTIU( dsnSettings.GetDefault()->GetViaDiameter() ).c_str() ); m_out->Print( aNestLevel+1, "(via_drill %s)\n", - FMTIU( dsnSettings.m_NetClasses.GetDefault()->GetViaDrill() ).c_str() ); + FMTIU( dsnSettings.GetDefault()->GetViaDrill() ).c_str() ); m_out->Print( aNestLevel+1, "(via_min_size %s)\n", FMTIU( dsnSettings.m_ViasMinSize ).c_str() ); m_out->Print( aNestLevel+1, "(via_min_drill %s)\n", @@ -610,9 +610,9 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const m_out->Print( aNestLevel+1, "(blind_buried_vias_allowed yes)\n" ); m_out->Print( aNestLevel+1, "(uvia_size %s)\n", - FMTIU( dsnSettings.m_NetClasses.GetDefault()->GetuViaDiameter() ).c_str() ); + FMTIU( dsnSettings.GetDefault()->GetuViaDiameter() ).c_str() ); m_out->Print( aNestLevel+1, "(uvia_drill %s)\n", - FMTIU( dsnSettings.m_NetClasses.GetDefault()->GetuViaDrill() ).c_str() ); + FMTIU( dsnSettings.GetDefault()->GetuViaDrill() ).c_str() ); m_out->Print( aNestLevel+1, "(uvias_allowed %s)\n", ( dsnSettings.m_MicroViasAllowed ) ? "yes" : "no" ); m_out->Print( aNestLevel+1, "(uvia_min_size %s)\n", @@ -683,7 +683,7 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const m_out->Print( 0, "\n" ); // Save the default net class first. - NETCLASS defaultNC = *dsnSettings.m_NetClasses.GetDefault(); + NETCLASS defaultNC = *dsnSettings.GetDefault(); filterNetClass( *aBoard, defaultNC ); // Remove empty nets (from a copy of a netclass) defaultNC.Format( m_out, aNestLevel, m_ctl ); diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index 77a4d14a0e..f2f174267b 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -632,7 +632,7 @@ void LEGACY_PLUGIN::loadSHEET() void LEGACY_PLUGIN::loadSETUP() { - NETCLASS* netclass_default = m_board->GetDesignSettings().m_NetClasses.GetDefault(); + NETCLASS* netclass_default = m_board->GetDesignSettings().GetDefault(); // TODO Orson: is it really necessary to first operate on a copy and then apply it? // would not it be better to use reference here and apply all the changes instantly? BOARD_DESIGN_SETTINGS bds = m_board->GetDesignSettings(); @@ -897,7 +897,7 @@ void LEGACY_PLUGIN::loadSETUP() // at all, the global defaults should go into a preferences // file instead so they are there to start new board // projects. - m_board->GetDesignSettings().m_NetClasses.GetDefault()->SetParams( m_board->GetDesignSettings() ); + m_board->GetDesignSettings().GetDefault()->SetParams( m_board->GetDesignSettings() ); return; // preferred exit } @@ -2985,7 +2985,7 @@ void LEGACY_PLUGIN::saveSHEET( const BOARD* aBoard ) const void LEGACY_PLUGIN::saveSETUP( const BOARD* aBoard ) const { const BOARD_DESIGN_SETTINGS& bds = aBoard->GetDesignSettings(); - NETCLASS* netclass_default = bds.m_NetClasses.GetDefault(); + NETCLASS* netclass_default = bds.GetDefault(); fprintf( m_fp, "$SETUP\n" ); diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index 77586e843f..547120fa9b 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -808,7 +808,7 @@ void PCB_PARSER::parseSetup() throw( IO_ERROR, PARSE_ERROR ) wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as setup." ) ); T token; - NETCLASS* defaultNetClass = m_board->GetDesignSettings().m_NetClasses.GetDefault(); + NETCLASS* defaultNetClass = m_board->GetDesignSettings().GetDefault(); // TODO Orson: is it really necessary to first operate on a copy and then apply it? // would not it be better to use reference here and apply all the changes instantly? BOARD_DESIGN_SETTINGS designSettings = m_board->GetDesignSettings(); diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index a983fac319..e0f4a2068a 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -279,7 +279,7 @@ void ROUTER_TOOL::getNetclassDimensions( int aNetCode, int& aWidth, } if( !netClass ) - netClass = bds.m_NetClasses.GetDefault(); + netClass = bds.GetDefault(); aWidth = netClass->GetTrackWidth(); aViaDiameter = netClass->GetViaDiameter(); From ebf35fd43ae18b2b1d78e51e796a1176a4e56649 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 15 May 2014 17:08:15 +0200 Subject: [PATCH 424/741] Workaround for Mac OS, fixes focus after a mouse click. --- common/tool/tool_dispatcher.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index 502dccfbdb..4e66a1271c 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -240,6 +240,13 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) evt = TOOL_EVENT( TC_MOUSE, TA_MOUSE_MOTION, mods ); evt->SetMousePosition( pos ); } + +#ifdef __APPLE__ + // TODO That's a big ugly workaround, somehow DRAWPANEL_GAL loses focus + // after second LMB click and currently I have no means to do better debugging + if( type == wxEVT_LEFT_UP ) + m_editFrame->GetGalCanvas()->SetFocus(); +#endif /* __APPLE__ */ } // Keyboard handling From ad1b138f28928ed1908cb2778e499e6313c6213d Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 16 May 2014 13:37:31 +0200 Subject: [PATCH 425/741] Reformatted PNS code to conform the coding policy. --- pcbnew/router/direction.h | 34 +- pcbnew/router/pns_algo_base.h | 15 +- pcbnew/router/pns_dragger.cpp | 140 +++--- pcbnew/router/pns_dragger.h | 55 +-- pcbnew/router/pns_index.h | 42 +- pcbnew/router/pns_item.cpp | 4 +- pcbnew/router/pns_item.h | 20 +- pcbnew/router/pns_itemset.cpp | 35 +- pcbnew/router/pns_itemset.h | 27 +- pcbnew/router/pns_joint.h | 72 +-- pcbnew/router/pns_layerset.h | 12 +- pcbnew/router/pns_line.cpp | 460 +++++++++-------- pcbnew/router/pns_line.h | 58 +-- pcbnew/router/pns_line_placer.cpp | 212 ++++---- pcbnew/router/pns_line_placer.h | 26 +- pcbnew/router/pns_logger.cpp | 99 ++-- pcbnew/router/pns_logger.h | 21 +- pcbnew/router/pns_node.cpp | 409 +++++++-------- pcbnew/router/pns_node.h | 125 +++-- pcbnew/router/pns_optimizer.cpp | 138 +++--- pcbnew/router/pns_optimizer.h | 38 +- pcbnew/router/pns_router.cpp | 288 +++++------ pcbnew/router/pns_router.h | 47 +- pcbnew/router/pns_routing_settings.cpp | 4 +- pcbnew/router/pns_routing_settings.h | 15 +- pcbnew/router/pns_segment.h | 13 +- pcbnew/router/pns_shove.cpp | 655 +++++++++++++------------ pcbnew/router/pns_shove.h | 82 ++-- pcbnew/router/pns_solid.cpp | 34 +- pcbnew/router/pns_solid.h | 5 +- pcbnew/router/pns_utils.cpp | 25 +- pcbnew/router/pns_utils.h | 7 +- pcbnew/router/pns_via.cpp | 27 +- pcbnew/router/pns_via.h | 26 +- pcbnew/router/pns_walkaround.cpp | 69 ++- pcbnew/router/pns_walkaround.h | 39 +- pcbnew/router/range.h | 48 +- pcbnew/router/router_preview_item.cpp | 135 +++-- pcbnew/router/router_preview_item.h | 13 +- pcbnew/router/router_tool.cpp | 124 ++--- pcbnew/router/router_tool.h | 4 +- pcbnew/router/time_limit.cpp | 15 +- pcbnew/router/time_limit.h | 14 +- pcbnew/router/trace.h | 4 +- 44 files changed, 1940 insertions(+), 1795 deletions(-) diff --git a/pcbnew/router/direction.h b/pcbnew/router/direction.h index 646c681cd2..cd872fccb5 100644 --- a/pcbnew/router/direction.h +++ b/pcbnew/router/direction.h @@ -209,12 +209,12 @@ public: // we are more horizontal than vertical? if( w > h ) { - mp0 = VECTOR2I( (w - h) * sw, 0 ); // direction: E + mp0 = VECTOR2I( ( w - h ) * sw, 0 ); // direction: E mp1 = VECTOR2I( h * sw, h * sh ); // direction: NE } else { - mp0 = VECTOR2I( 0, sh * (h - w) ); // direction: N + mp0 = VECTOR2I( 0, sh * ( h - w ) ); // direction: N mp1 = VECTOR2I( sw * w, sh * w ); // direction: NE } @@ -237,7 +237,7 @@ public: pl.Append( aP1 ); pl.Simplify(); return pl; - }; + } bool operator==( const DIRECTION_45& aOther ) const { @@ -275,19 +275,17 @@ public: { DIRECTION_45 l; - if (m_dir == UNDEFINED) + if ( m_dir == UNDEFINED ) return l; - if(m_dir == N) + if( m_dir == N ) l.m_dir = NW; else - l.m_dir = static_cast (m_dir - 1); + l.m_dir = static_cast( m_dir - 1 ); return l; } - - /** * Function ToVector() * @@ -295,19 +293,19 @@ public: */ const VECTOR2I ToVector() const { - switch(m_dir) + switch( m_dir ) { - case N: return VECTOR2I(0, 1); - case S: return VECTOR2I(0, -1); - case E: return VECTOR2I(1, 0); - case W: return VECTOR2I(-1, 0); - case NE: return VECTOR2I(1, 1); - case NW: return VECTOR2I(-1, 1); - case SE: return VECTOR2I(1, -1); - case SW: return VECTOR2I(-1, -1); + case N: return VECTOR2I( 0, 1 ); + case S: return VECTOR2I( 0, -1 ); + case E: return VECTOR2I( 1, 0 ); + case W: return VECTOR2I( -1, 0 ); + case NE: return VECTOR2I( 1, 1 ); + case NW: return VECTOR2I( -1, 1 ); + case SE: return VECTOR2I( 1, -1 ); + case SW: return VECTOR2I( -1, -1 ); default: - return VECTOR2I(0, 0); + return VECTOR2I( 0, 0 ); } } diff --git a/pcbnew/router/pns_algo_base.h b/pcbnew/router/pns_algo_base.h index c274c15116..1aa94333fc 100644 --- a/pcbnew/router/pns_algo_base.h +++ b/pcbnew/router/pns_algo_base.h @@ -33,17 +33,18 @@ class PNS_LOGGER; * Holds a bunch of objects commonly used by all algorithms (P&S settings, parent router instance, logging) **/ -class PNS_ALGO_BASE { - +class PNS_ALGO_BASE +{ public: - PNS_ALGO_BASE ( PNS_ROUTER *aRouter ): + PNS_ALGO_BASE( PNS_ROUTER *aRouter ) : m_router ( aRouter ) - {}; + {} virtual ~PNS_ALGO_BASE() {} ///> Returns the instance of our router - PNS_ROUTER *Router() const { + PNS_ROUTER* Router() const + { return m_router; } @@ -51,10 +52,10 @@ public: PNS_ROUTING_SETTINGS& Settings() const; ///> Returns the logger object, allowing to dump geometry to a file. - virtual PNS_LOGGER *Logger(); + virtual PNS_LOGGER* Logger(); private: - PNS_ROUTER *m_router; + PNS_ROUTER* m_router; }; #endif diff --git a/pcbnew/router/pns_dragger.cpp b/pcbnew/router/pns_dragger.cpp index 5361c641ec..bc43858d95 100644 --- a/pcbnew/router/pns_dragger.cpp +++ b/pcbnew/router/pns_dragger.cpp @@ -29,7 +29,8 @@ PNS_DRAGGER::PNS_DRAGGER( PNS_ROUTER* aRouter ) : { m_world = NULL; m_shove = NULL; -}; +} + PNS_DRAGGER::~PNS_DRAGGER() { @@ -37,97 +38,103 @@ PNS_DRAGGER::~PNS_DRAGGER() delete m_shove; } -void PNS_DRAGGER::SetWorld ( PNS_NODE *aWorld ) + +void PNS_DRAGGER::SetWorld ( PNS_NODE* aWorld ) { m_world = aWorld; } -bool PNS_DRAGGER::startDragSegment( const VECTOR2D& aP, PNS_SEGMENT *aSeg ) + +bool PNS_DRAGGER::startDragSegment( const VECTOR2D& aP, PNS_SEGMENT* aSeg ) { int w2 = aSeg->Width() / 2; m_draggedLine = m_world->AssembleLine ( aSeg, &m_draggedSegmentIndex ); - m_shove->SetInitialLine (m_draggedLine); + m_shove->SetInitialLine( m_draggedLine ); m_lastValidDraggedLine = *m_draggedLine; m_lastValidDraggedLine.ClearSegmentLinks(); - if( (aP - aSeg->Seg().A).EuclideanNorm() <= w2 ) + if( ( aP - aSeg->Seg().A ).EuclideanNorm() <= w2 ) m_mode = CORNER; - else if( (aP - aSeg->Seg().B).EuclideanNorm() <= w2 ) + else if( ( aP - aSeg->Seg().B ).EuclideanNorm() <= w2 ) { m_draggedSegmentIndex ++; m_mode = CORNER; } else m_mode = SEGMENT; + return true; } -bool PNS_DRAGGER::startDragVia( const VECTOR2D& aP, PNS_VIA *aVia ) + +bool PNS_DRAGGER::startDragVia( const VECTOR2D& aP, PNS_VIA* aVia ) { m_draggedVia = aVia; m_initialVia = aVia; m_mode = VIA; - VECTOR2I p0 ( aVia->Pos() ); + VECTOR2I p0( aVia->Pos() ); PNS_JOINT *jt = m_world->FindJoint( p0, aVia->Layers().Start(), aVia->Net() ); BOOST_FOREACH(PNS_ITEM *item, jt->LinkList() ) { - if(item->OfKind( PNS_ITEM::SEGMENT )) + if( item->OfKind( PNS_ITEM::SEGMENT ) ) { int segIndex; - PNS_SEGMENT *seg = (PNS_SEGMENT *) item; - std::auto_ptr l ( m_world->AssembleLine(seg, &segIndex) ); - - if(segIndex != 0) + PNS_SEGMENT* seg = (PNS_SEGMENT*) item; + std::auto_ptr l( m_world->AssembleLine( seg, &segIndex ) ); + + if( segIndex != 0 ) l->Reverse(); - m_origViaConnections.push_back (*l); - + m_origViaConnections.push_back( *l ); } } - return true; } -bool PNS_DRAGGER::Start ( const VECTOR2I& aP, PNS_ITEM* aStartItem ) + +bool PNS_DRAGGER::Start( const VECTOR2I& aP, PNS_ITEM* aStartItem ) { - m_shove = new PNS_SHOVE ( m_world, Router() ); + m_shove = new PNS_SHOVE( m_world, Router() ); m_lastNode = NULL; m_draggedItems.Clear(); m_currentMode = Settings().Mode(); - TRACE(2, "StartDragging: item %p [kind %d]", aStartItem % aStartItem->Kind()); + TRACE( 2, "StartDragging: item %p [kind %d]", aStartItem % aStartItem->Kind() ); switch( aStartItem->Kind() ) { case PNS_ITEM::SEGMENT: - return startDragSegment ( aP, static_cast (aStartItem) ); + return startDragSegment ( aP, static_cast( aStartItem ) ); + case PNS_ITEM::VIA: return startDragVia ( aP, static_cast (aStartItem) ); + default: return false; } } -bool PNS_DRAGGER::dragMarkObstacles(const VECTOR2I& aP) + +bool PNS_DRAGGER::dragMarkObstacles( const VECTOR2I& aP ) { - if(m_lastNode) + if( m_lastNode ) { delete m_lastNode; m_lastNode = NULL; } - switch(m_mode) + switch( m_mode ) { case SEGMENT: case CORNER: { int thresh = Settings().SmoothDraggedSegments() ? m_draggedLine->Width() / 4 : 0; - PNS_LINE tmp (*m_draggedLine); + PNS_LINE tmp( *m_draggedLine ); - if(m_mode == SEGMENT) + if( m_mode == SEGMENT ) tmp.DragSegment ( aP, m_draggedSegmentIndex, thresh ); else tmp.DragCorner ( aP, m_draggedSegmentIndex, thresh ); @@ -143,17 +150,17 @@ bool PNS_DRAGGER::dragMarkObstacles(const VECTOR2I& aP) break; } + case VIA: // fixme... { m_lastNode = m_shove->CurrentNode()->Branch(); dumbDragVia ( m_initialVia, m_lastNode, aP ); - break; } } - if (Settings().CanViolateDRC()) + if( Settings().CanViolateDRC() ) m_dragStatus = true; else m_dragStatus = !m_world->CheckColliding( m_draggedItems ); @@ -161,60 +168,62 @@ bool PNS_DRAGGER::dragMarkObstacles(const VECTOR2I& aP) return true; } -void PNS_DRAGGER::dumbDragVia ( PNS_VIA *aVia, PNS_NODE *aNode, const VECTOR2I& aP ) + +void PNS_DRAGGER::dumbDragVia( PNS_VIA* aVia, PNS_NODE* aNode, const VECTOR2I& aP ) { // fixme: this is awful. m_draggedVia = aVia->Clone(); m_draggedVia->SetPos( aP ); m_draggedItems.Clear(); - m_draggedItems.Add(m_draggedVia); + m_draggedItems.Add( m_draggedVia ); - m_lastNode->Remove ( aVia ); - m_lastNode->Add ( m_draggedVia ); + m_lastNode->Remove( aVia ); + m_lastNode->Add( m_draggedVia ); - BOOST_FOREACH(PNS_LINE &l, m_origViaConnections) + BOOST_FOREACH( PNS_LINE &l, m_origViaConnections ) { PNS_LINE origLine (l); - PNS_LINE *draggedLine = l.Clone(); + PNS_LINE* draggedLine = l.Clone(); draggedLine->DragCorner( aP, 0 ); draggedLine->ClearSegmentLinks(); m_draggedItems.AddOwned( draggedLine ); - m_lastNode->Remove ( &origLine ); - m_lastNode->Add ( draggedLine ); + m_lastNode->Remove( &origLine ); + m_lastNode->Add( draggedLine ); } } -bool PNS_DRAGGER::dragShove(const VECTOR2I& aP) + +bool PNS_DRAGGER::dragShove( const VECTOR2I& aP ) { bool ok = false; - - if(m_lastNode) + if( m_lastNode ) { delete m_lastNode; m_lastNode = NULL; } - switch(m_mode) + switch( m_mode ) { case SEGMENT: case CORNER: { int thresh = Settings().SmoothDraggedSegments() ? m_draggedLine->Width() / 4 : 0; - PNS_LINE tmp (*m_draggedLine); - if(m_mode == SEGMENT) - tmp.DragSegment ( aP, m_draggedSegmentIndex, thresh ); + PNS_LINE tmp( *m_draggedLine ); + + if( m_mode == SEGMENT ) + tmp.DragSegment( aP, m_draggedSegmentIndex, thresh ); else - tmp.DragCorner ( aP, m_draggedSegmentIndex, thresh ); + tmp.DragCorner( aP, m_draggedSegmentIndex, thresh ); - PNS_SHOVE::ShoveStatus st = m_shove->ShoveLines( tmp ); + PNS_SHOVE::SHOVE_STATUS st = m_shove->ShoveLines( tmp ); - if(st == PNS_SHOVE::SH_OK) + if( st == PNS_SHOVE::SH_OK ) ok = true; - else if (st == PNS_SHOVE::SH_HEAD_MODIFIED) + else if( st == PNS_SHOVE::SH_HEAD_MODIFIED ) { tmp = m_shove->NewHead(); ok = true; @@ -222,22 +231,23 @@ bool PNS_DRAGGER::dragShove(const VECTOR2I& aP) m_lastNode = m_shove->CurrentNode()->Branch(); - if(ok) + if( ok ) m_lastValidDraggedLine = tmp; m_lastValidDraggedLine.ClearSegmentLinks(); m_lastValidDraggedLine.Unmark(); - m_lastNode->Add ( &m_lastValidDraggedLine ); - m_draggedItems = PNS_ITEMSET ( &m_lastValidDraggedLine ); + m_lastNode->Add( &m_lastValidDraggedLine ); + m_draggedItems = PNS_ITEMSET( &m_lastValidDraggedLine ); break; } + case VIA: { PNS_VIA *newVia; - PNS_SHOVE::ShoveStatus st = m_shove -> ShoveDraggingVia ( m_draggedVia, aP, &newVia ); + PNS_SHOVE::SHOVE_STATUS st = m_shove->ShoveDraggingVia( m_draggedVia, aP, &newVia ); - if(st == PNS_SHOVE::SH_OK || st == PNS_SHOVE::SH_HEAD_MODIFIED) + if( st == PNS_SHOVE::SH_OK || st == PNS_SHOVE::SH_HEAD_MODIFIED ) ok = true; m_lastNode = m_shove->CurrentNode()->Branch(); @@ -250,16 +260,17 @@ bool PNS_DRAGGER::dragShove(const VECTOR2I& aP) break; } - } m_dragStatus = ok; + return ok; } -bool PNS_DRAGGER::FixRoute( ) + +bool PNS_DRAGGER::FixRoute() { - if(m_dragStatus) + if( m_dragStatus ) { Router()->CommitRouting( CurrentNode() ); return true; @@ -267,35 +278,42 @@ bool PNS_DRAGGER::FixRoute( ) return false; } - -bool PNS_DRAGGER::Drag ( const VECTOR2I& aP ) + + +bool PNS_DRAGGER::Drag( const VECTOR2I& aP ) { - switch ( m_currentMode ) + switch( m_currentMode ) { case RM_MarkObstacles: - return dragMarkObstacles (aP); + return dragMarkObstacles( aP ); + case RM_Shove: case RM_Walkaround: case RM_Smart: - return dragShove ( aP ); + return dragShove( aP ); + default: return false; } } + PNS_NODE *PNS_DRAGGER::CurrentNode() const { return m_lastNode; } + const PNS_ITEMSET PNS_DRAGGER::Traces() { return m_draggedItems; } -PNS_LOGGER *PNS_DRAGGER::Logger() + +PNS_LOGGER* PNS_DRAGGER::Logger() { - if(m_shove) + if( m_shove ) return m_shove->Logger(); + return NULL; } diff --git a/pcbnew/router/pns_dragger.h b/pcbnew/router/pns_dragger.h index 73d206589d..171b8ac79e 100644 --- a/pcbnew/router/pns_dragger.h +++ b/pcbnew/router/pns_dragger.h @@ -39,12 +39,10 @@ class PNS_ROUTER_BASE; * * Via, segment and corner dragging algorithm. */ - class PNS_DRAGGER : public PNS_ALGO_BASE { public: - - PNS_DRAGGER( PNS_ROUTER *aRouter ); + PNS_DRAGGER( PNS_ROUTER* aRouter ); ~PNS_DRAGGER(); /** @@ -52,8 +50,7 @@ public: * * Sets the board to work on. */ - void SetWorld ( PNS_NODE *aWorld ); - + void SetWorld( PNS_NODE* aWorld ); /** * Function Start() @@ -61,7 +58,7 @@ public: * Starts routing a single track at point aP, taking item aStartItem as anchor * (unless NULL). Returns true if a dragging operation has started. */ - bool Start ( const VECTOR2I& aP, PNS_ITEM* aStartItem ); + bool Start( const VECTOR2I& aP, PNS_ITEM* aStartItem ); /** * Function Drag() @@ -69,7 +66,7 @@ public: * Drags the current segment/corner/via to the point aP. * @return true, if dragging finished with success. */ - bool Drag ( const VECTOR2I& aP ); + bool Drag( const VECTOR2I& aP ); /** * Function FixRoute() @@ -78,7 +75,7 @@ public: * and eventually commits it to the world. * @return true, if dragging finished with success. */ - bool FixRoute ( ); + bool FixRoute(); /** * Function CurrentNode() @@ -86,7 +83,6 @@ public: * Returns the most recent world state, including all * items changed due to dragging operation. */ - PNS_NODE* CurrentNode() const; /** @@ -97,11 +93,10 @@ public: const PNS_ITEMSET Traces(); /// @copydoc PNS_ALGO_BASE::Logger() - virtual PNS_LOGGER *Logger(); + virtual PNS_LOGGER* Logger(); private: - - typedef std::pair LinePair; + typedef std::pair LinePair; typedef std::vector LinePairVec; enum DragMode { @@ -110,26 +105,26 @@ private: VIA }; - bool dragMarkObstacles(const VECTOR2I& aP); - bool dragShove(const VECTOR2I& aP); - bool startDragSegment( const VECTOR2D& aP, PNS_SEGMENT *aSeg ); - bool startDragVia( const VECTOR2D& aP, PNS_VIA *aVia ); - void dumbDragVia ( PNS_VIA *aVia, PNS_NODE *aNode, const VECTOR2I& aP ); + bool dragMarkObstacles( const VECTOR2I& aP ); + bool dragShove(const VECTOR2I& aP ); + bool startDragSegment( const VECTOR2D& aP, PNS_SEGMENT* aSeg ); + bool startDragVia( const VECTOR2D& aP, PNS_VIA* aVia ); + void dumbDragVia( PNS_VIA* aVia, PNS_NODE* aNode, const VECTOR2I& aP ); - PNS_NODE * m_world; - PNS_NODE * m_lastNode; - DragMode m_mode; - PNS_LINE * m_draggedLine; - PNS_VIA * m_draggedVia; - PNS_LINE m_lastValidDraggedLine; - PNS_SHOVE * m_shove; - int m_draggedSegmentIndex; - bool m_dragStatus; + PNS_NODE* m_world; + PNS_NODE* m_lastNode; + DragMode m_mode; + PNS_LINE* m_draggedLine; + PNS_VIA* m_draggedVia; + PNS_LINE m_lastValidDraggedLine; + PNS_SHOVE* m_shove; + int m_draggedSegmentIndex; + bool m_dragStatus; PNS_MODE m_currentMode; - std::vector m_origViaConnections; - std::vector m_draggedViaConnections; - PNS_VIA * m_initialVia; - PNS_ITEMSET m_draggedItems; + std::vector m_origViaConnections; + std::vector m_draggedViaConnections; + PNS_VIA* m_initialVia; + PNS_ITEMSET m_draggedItems; }; #endif diff --git a/pcbnew/router/pns_index.h b/pcbnew/router/pns_index.h index 841f61bc1a..edb58b33e4 100644 --- a/pcbnew/router/pns_index.h +++ b/pcbnew/router/pns_index.h @@ -39,13 +39,12 @@ * are assigned to separate R-Tree subindices depending on their type and spanned layers, reducing * overlap and improving search time. **/ - class PNS_INDEX { public: - typedef std::list NetItemsList; - typedef SHAPE_INDEX ItemShapeIndex; - typedef boost::unordered_set ItemSet; + typedef std::list NET_ITEMS_LIST; + typedef SHAPE_INDEX ITEM_SHAPE_INDEX; + typedef boost::unordered_set ITEM_SET; PNS_INDEX(); ~PNS_INDEX(); @@ -115,7 +114,7 @@ public: * * Returns list of all items in a given net. */ - NetItemsList* GetItemsForNet( int aNet ); + NET_ITEMS_LIST* GetItemsForNet( int aNet ); /** * Function Contains() @@ -134,36 +133,35 @@ public: */ int Size() const { return m_allItems.size(); } - ItemSet::iterator begin() { return m_allItems.begin(); } - ItemSet::iterator end() { return m_allItems.end(); } + ITEM_SET::iterator begin() { return m_allItems.begin(); } + ITEM_SET::iterator end() { return m_allItems.end(); } private: static const int MaxSubIndices = 64; static const int SI_Multilayer = 2; static const int SI_SegDiagonal = 0; static const int SI_SegStraight = 1; - static const int SI_Traces = 3; - static const int SI_PadsTop = 0; - static const int SI_PadsBottom = 1; + static const int SI_Traces = 3; + static const int SI_PadsTop = 0; + static const int SI_PadsBottom = 1; template int querySingle( int index, const SHAPE* aShape, int aMinDistance, Visitor& aVisitor ); - ItemShapeIndex* getSubindex( const PNS_ITEM* aItem ); + ITEM_SHAPE_INDEX* getSubindex( const PNS_ITEM* aItem ); - ItemShapeIndex* m_subIndices[MaxSubIndices]; - std::map m_netMap; - ItemSet m_allItems; + ITEM_SHAPE_INDEX* m_subIndices[MaxSubIndices]; + std::map m_netMap; + ITEM_SET m_allItems; }; - PNS_INDEX::PNS_INDEX() { memset( m_subIndices, 0, sizeof( m_subIndices ) ); } -PNS_INDEX::ItemShapeIndex* PNS_INDEX::getSubindex( const PNS_ITEM* aItem ) +PNS_INDEX::ITEM_SHAPE_INDEX* PNS_INDEX::getSubindex( const PNS_ITEM* aItem ) { int idx_n = -1; @@ -199,7 +197,7 @@ PNS_INDEX::ItemShapeIndex* PNS_INDEX::getSubindex( const PNS_ITEM* aItem ) assert( idx_n >= 0 && idx_n < MaxSubIndices ); if( !m_subIndices[idx_n] ) - m_subIndices[idx_n] = new ItemShapeIndex; + m_subIndices[idx_n] = new ITEM_SHAPE_INDEX; return m_subIndices[idx_n]; } @@ -207,10 +205,8 @@ PNS_INDEX::ItemShapeIndex* PNS_INDEX::getSubindex( const PNS_ITEM* aItem ) void PNS_INDEX::Add( PNS_ITEM* aItem ) { - ItemShapeIndex* idx = getSubindex( aItem ); + ITEM_SHAPE_INDEX* idx = getSubindex( aItem ); - - idx->Add( aItem ); m_allItems.insert( aItem ); int net = aItem->Net(); @@ -224,7 +220,7 @@ void PNS_INDEX::Add( PNS_ITEM* aItem ) void PNS_INDEX::Remove( PNS_ITEM* aItem ) { - ItemShapeIndex* idx = getSubindex( aItem ); + ITEM_SHAPE_INDEX* idx = getSubindex( aItem ); idx->Remove( aItem ); m_allItems.erase( aItem ); @@ -303,7 +299,7 @@ void PNS_INDEX::Clear() { for( int i = 0; i < MaxSubIndices; ++i ) { - ItemShapeIndex* idx = m_subIndices[i]; + ITEM_SHAPE_INDEX* idx = m_subIndices[i]; if( idx ) delete idx; @@ -319,7 +315,7 @@ PNS_INDEX::~PNS_INDEX() } -PNS_INDEX::NetItemsList* PNS_INDEX::GetItemsForNet( int aNet ) +PNS_INDEX::NET_ITEMS_LIST* PNS_INDEX::GetItemsForNet( int aNet ) { if( m_netMap.find( aNet ) == m_netMap.end() ) return NULL; diff --git a/pcbnew/router/pns_item.cpp b/pcbnew/router/pns_item.cpp index 6ec4b77989..67fd14ad7b 100644 --- a/pcbnew/router/pns_item.cpp +++ b/pcbnew/router/pns_item.cpp @@ -50,8 +50,7 @@ bool PNS_ITEM::Collide( const PNS_ITEM* aOther, int aClearance, bool aNeedMTV, const PNS_LINE* line = static_cast( aOther ); if( line->EndsWithVia() ) - return collideSimple( &line->Via(), aClearance - line->Width() / 2, aNeedMTV, - aMTV ); + return collideSimple( &line->Via(), aClearance - line->Width() / 2, aNeedMTV, aMTV ); } return false; @@ -85,5 +84,4 @@ const std::string PNS_ITEM::KindStr() const PNS_ITEM::~PNS_ITEM() { - } diff --git a/pcbnew/router/pns_item.h b/pcbnew/router/pns_item.h index 0bc03b8ba7..cf1e24b1c6 100644 --- a/pcbnew/router/pns_item.h +++ b/pcbnew/router/pns_item.h @@ -91,7 +91,7 @@ public: * * Returns a deep copy of the item */ - virtual PNS_ITEM* Clone( ) const = 0; + virtual PNS_ITEM* Clone() const = 0; /* * Function Hull() @@ -104,7 +104,7 @@ public: virtual const SHAPE_LINE_CHAIN Hull( int aClearance = 0, int aWalkaroundThickness = 0 ) const { return SHAPE_LINE_CHAIN(); - }; + } /** * Function Kind() @@ -123,7 +123,7 @@ public: */ bool OfKind( int aKindMask ) const { - return (aKindMask & m_kind) != 0; + return ( aKindMask & m_kind ) != 0; } /** @@ -219,7 +219,7 @@ public: * Returns true if the set of layers spanned by aOther overlaps our * layers. */ - bool LayersOverlap( const PNS_ITEM *aOther ) const + bool LayersOverlap( const PNS_ITEM* aOther ) const { return Layers().Overlaps( aOther->Layers() ); } @@ -252,7 +252,6 @@ public: */ PNS_NODE* Owner() const { return m_owner; } - /** * Function Collide() * @@ -308,7 +307,7 @@ public: return m_marker; } - virtual void SetRank ( int aRank ) + virtual void SetRank( int aRank ) { m_rank = aRank; } @@ -318,10 +317,10 @@ public: return m_rank; } - virtual VECTOR2I Anchor(int n) const + virtual VECTOR2I Anchor( int n ) const { return VECTOR2I (); - }; + } virtual int AnchorCount() const { @@ -329,15 +328,14 @@ public: } private: - bool collideSimple( const PNS_ITEM* aOther, int aClearance, bool aNeedMTV, VECTOR2I& aMTV ) const; protected: PnsKind m_kind; - BOARD_CONNECTED_ITEM *m_parent; - PNS_NODE *m_owner; + BOARD_CONNECTED_ITEM* m_parent; + PNS_NODE* m_owner; PNS_LAYERSET m_layers; bool m_movable; diff --git a/pcbnew/router/pns_itemset.cpp b/pcbnew/router/pns_itemset.cpp index fccc5eccae..20254b94c0 100644 --- a/pcbnew/router/pns_itemset.cpp +++ b/pcbnew/router/pns_itemset.cpp @@ -22,8 +22,7 @@ #include "pns_itemset.h" - -PNS_ITEMSET::PNS_ITEMSET( PNS_ITEM *aInitialItem ) +PNS_ITEMSET::PNS_ITEMSET( PNS_ITEM* aInitialItem ) { if(aInitialItem) m_items.push_back(aInitialItem); @@ -38,7 +37,7 @@ PNS_ITEMSET::~PNS_ITEMSET() void PNS_ITEMSET::Clear() { - BOOST_FOREACH(PNS_ITEM *item, m_ownedItems) + BOOST_FOREACH(PNS_ITEM* item, m_ownedItems) { delete item; } @@ -47,9 +46,10 @@ void PNS_ITEMSET::Clear() m_ownedItems.clear(); } + PNS_ITEMSET& PNS_ITEMSET::FilterLayers( int aStart, int aEnd ) { - ItemVector newItems; + ITEM_VECTOR newItems; PNS_LAYERSET l; if( aEnd < 0 ) @@ -57,39 +57,44 @@ PNS_ITEMSET& PNS_ITEMSET::FilterLayers( int aStart, int aEnd ) else l = PNS_LAYERSET( aStart, aEnd ); - BOOST_FOREACH( PNS_ITEM * item, m_items ) + BOOST_FOREACH( PNS_ITEM* item, m_items ) if( item->Layers().Overlaps( l ) ) newItems.push_back( item ); m_items = newItems; + return *this; } PNS_ITEMSET& PNS_ITEMSET::FilterKinds( int aKindMask ) { - ItemVector newItems; + ITEM_VECTOR newItems; - BOOST_FOREACH( PNS_ITEM * item, m_items ) - - if( item->OfKind ( aKindMask ) ) - newItems.push_back( item ); + BOOST_FOREACH( PNS_ITEM* item, m_items ) + { + if( item->OfKind ( aKindMask ) ) + newItems.push_back( item ); + } m_items = newItems; + return *this; } PNS_ITEMSET& PNS_ITEMSET::FilterNet( int aNet ) { - ItemVector newItems; + ITEM_VECTOR newItems; - BOOST_FOREACH( PNS_ITEM * item, m_items ) - - if( item->Net() == aNet ) - newItems.push_back( item ); + BOOST_FOREACH( PNS_ITEM* item, m_items ) + { + if( item->Net() == aNet ) + newItems.push_back( item ); + } m_items = newItems; + return *this; } diff --git a/pcbnew/router/pns_itemset.h b/pcbnew/router/pns_itemset.h index 9a6aaab3a8..44fe9c3c92 100644 --- a/pcbnew/router/pns_itemset.h +++ b/pcbnew/router/pns_itemset.h @@ -35,27 +35,28 @@ class PNS_ITEMSET { public: - typedef std::vector ItemVector; + typedef std::vector ITEM_VECTOR; - PNS_ITEMSET( PNS_ITEM *aInitialItem = NULL ); + PNS_ITEMSET( PNS_ITEM* aInitialItem = NULL ); - PNS_ITEMSET (const PNS_ITEMSET &aOther ) + PNS_ITEMSET( const PNS_ITEMSET& aOther ) { m_items = aOther.m_items; - m_ownedItems = ItemVector(); + m_ownedItems = ITEM_VECTOR(); } - const PNS_ITEMSET& operator= (const PNS_ITEMSET &aOther) + const PNS_ITEMSET& operator=( const PNS_ITEMSET& aOther ) { m_items = aOther.m_items; - m_ownedItems = ItemVector(); + m_ownedItems = ITEM_VECTOR(); + return *this; } ~PNS_ITEMSET(); - ItemVector& Items() { return m_items; } - const ItemVector& CItems() const { return m_items; } + ITEM_VECTOR& Items() { return m_items; } + const ITEM_VECTOR& CItems() const { return m_items; } PNS_ITEMSET& FilterLayers( int aStart, int aEnd = -1 ); PNS_ITEMSET& FilterKinds( int aKindMask ); @@ -63,24 +64,24 @@ public: int Size() { return m_items.size(); } - void Add( PNS_ITEM* item ) + void Add( PNS_ITEM* aItem ) { - m_items.push_back( item ); + m_items.push_back( aItem ); } PNS_ITEM* Get( int index ) const { return m_items[index]; } void Clear(); - void AddOwned ( PNS_ITEM *aItem ) + void AddOwned( PNS_ITEM *aItem ) { m_items.push_back( aItem ); m_ownedItems.push_back( aItem ); } private: - ItemVector m_items; - ItemVector m_ownedItems; + ITEM_VECTOR m_items; + ITEM_VECTOR m_ownedItems; }; #endif diff --git a/pcbnew/router/pns_joint.h b/pcbnew/router/pns_joint.h index 699481538f..1bee21c06f 100644 --- a/pcbnew/router/pns_joint.h +++ b/pcbnew/router/pns_joint.h @@ -40,11 +40,11 @@ class PNS_JOINT : public PNS_ITEM { public: - typedef std::vector LinkedItems; + typedef std::vector LINKED_ITEMS; ///> Joints are hashed by their position, layers and net. /// Linked items are, obviously, not hashed - struct HashTag + struct HASH_TAG { VECTOR2I pos; int net; @@ -53,8 +53,7 @@ public: PNS_JOINT() : PNS_ITEM( JOINT ) {} - PNS_JOINT( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, - int aNet = -1 ) : + PNS_JOINT( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, int aNet = -1 ) : PNS_ITEM( JOINT ) { m_tag.pos = aPos; @@ -62,14 +61,14 @@ public: m_layers = aLayers; } - PNS_JOINT( const PNS_JOINT& b ) : + PNS_JOINT( const PNS_JOINT& aB ) : PNS_ITEM( JOINT ) { - m_layers = b.m_layers; - m_tag.pos = b.m_tag.pos; - m_tag.net = b.m_tag.net; - m_linkedItems = b.m_linkedItems; - m_layers = b.m_layers; + m_layers = aB.m_layers; + m_tag.pos = aB.m_tag.pos; + m_tag.net = aB.m_tag.net; + m_linkedItems = aB.m_linkedItems; + m_layers = aB.m_layers; } PNS_ITEM* Clone ( ) const @@ -85,8 +84,7 @@ public: if( m_linkedItems.size() != 2 ) return false; - if( m_linkedItems[0]->Kind() != SEGMENT || - m_linkedItems[1]->Kind() != SEGMENT ) + if( m_linkedItems[0]->Kind() != SEGMENT || m_linkedItems[1]->Kind() != SEGMENT ) return false; PNS_SEGMENT* seg1 = static_cast( m_linkedItems[0] ); @@ -99,8 +97,7 @@ public: ///> Links the joint to a given board item (when it's added to the PNS_NODE) void Link( PNS_ITEM* aItem ) { - LinkedItems::iterator f = std::find( m_linkedItems.begin(), - m_linkedItems.end(), aItem ); + LINKED_ITEMS::iterator f = std::find( m_linkedItems.begin(), m_linkedItems.end(), aItem ); if( f != m_linkedItems.end() ) return; @@ -112,8 +109,7 @@ public: ///> Returns true if the joint became dangling after unlinking. bool Unlink( PNS_ITEM* aItem ) { - LinkedItems::iterator f = std::find( m_linkedItems.begin(), - m_linkedItems.end(), aItem ); + LINKED_ITEMS::iterator f = std::find( m_linkedItems.begin(), m_linkedItems.end(), aItem ); if( f != m_linkedItems.end() ) m_linkedItems.erase( f ); @@ -131,17 +127,19 @@ public: return static_cast( m_linkedItems[m_linkedItems[0] == aCurrent ? 1 : 0] ); } - PNS_VIA *Via() + PNS_VIA* Via() { - for( LinkedItems::iterator i = m_linkedItems.begin(); - i != m_linkedItems.end(); ++i ) + for( LINKED_ITEMS::iterator i = m_linkedItems.begin(); i != m_linkedItems.end(); ++i ) + { if( (*i)->Kind() == PNS_ITEM::VIA ) - return (PNS_VIA *)(*i); + return (PNS_VIA*)( *i ); + } + return NULL; } /// trivial accessors - const HashTag& Tag() const + const HASH_TAG& Tag() const { return m_tag; } @@ -156,7 +154,7 @@ public: return m_tag.net; } - LinkedItems& LinkList() + LINKED_ITEMS& LinkList() { return m_linkedItems; } @@ -166,10 +164,12 @@ public: { int n = 0; - for( LinkedItems::const_iterator i = m_linkedItems.begin(); - i != m_linkedItems.end(); ++i ) + for( LINKED_ITEMS::const_iterator i = m_linkedItems.begin(); + i != m_linkedItems.end(); ++i ) + { if( (*i)->Kind() & aMask ) n++; + } return n; } @@ -189,9 +189,11 @@ public: m_layers.Merge( aJoint.m_layers ); // fixme: duplicate links (?) - for( LinkedItems::const_iterator i = aJoint.m_linkedItems.begin(); - i != aJoint.m_linkedItems.end(); ++i ) + for( LINKED_ITEMS::const_iterator i = aJoint.m_linkedItems.begin(); + i != aJoint.m_linkedItems.end(); ++i ) + { m_linkedItems.push_back( *i ); + } } bool Overlaps( const PNS_JOINT& rhs ) const @@ -202,27 +204,27 @@ public: private: ///> hash tag for unordered_multimap - HashTag m_tag; + HASH_TAG m_tag; ///> list of items linked to this joint - LinkedItems m_linkedItems; + LINKED_ITEMS m_linkedItems; }; // hash function & comparison operator for boost::unordered_map<> -inline bool operator==( PNS_JOINT::HashTag const& p1, - PNS_JOINT::HashTag const& p2 ) +inline bool operator==( PNS_JOINT::HASH_TAG const& aP1, + PNS_JOINT::HASH_TAG const& aP2 ) { - return p1.pos == p2.pos && p1.net == p2.net; + return aP1.pos == aP2.pos && aP1.net == aP2.net; } -inline std::size_t hash_value( PNS_JOINT::HashTag const& p ) +inline std::size_t hash_value( PNS_JOINT::HASH_TAG const& aP ) { std::size_t seed = 0; - boost::hash_combine( seed, p.pos.x ); - boost::hash_combine( seed, p.pos.y ); - boost::hash_combine( seed, p.net ); + boost::hash_combine( seed, aP.pos.x ); + boost::hash_combine( seed, aP.pos.y ); + boost::hash_combine( seed, aP.net ); return seed; } diff --git a/pcbnew/router/pns_layerset.h b/pcbnew/router/pns_layerset.h index d99ef57040..7ba05d84ef 100644 --- a/pcbnew/router/pns_layerset.h +++ b/pcbnew/router/pns_layerset.h @@ -50,17 +50,17 @@ public: m_start = m_end = aLayer; } - PNS_LAYERSET( const PNS_LAYERSET& b ) : - m_start( b.m_start ), - m_end( b.m_end ) + PNS_LAYERSET( const PNS_LAYERSET& aB ) : + m_start( aB.m_start ), + m_end( aB.m_end ) {} ~PNS_LAYERSET() {}; - const PNS_LAYERSET& operator=( const PNS_LAYERSET& b ) + const PNS_LAYERSET& operator=( const PNS_LAYERSET& aB ) { - m_start = b.m_start; - m_end = b.m_end; + m_start = aB.m_start; + m_end = aB.m_end; return *this; } diff --git a/pcbnew/router/pns_line.cpp b/pcbnew/router/pns_line.cpp index 8cc7bcea87..d7663c4e7d 100644 --- a/pcbnew/router/pns_line.cpp +++ b/pcbnew/router/pns_line.cpp @@ -50,14 +50,15 @@ PNS_LINE::PNS_LINE( const PNS_LINE& aOther ) : copyLinks ( &aOther ); } + PNS_LINE::~PNS_LINE() { if( m_segmentRefs ) delete m_segmentRefs; -}; +} -const PNS_LINE& PNS_LINE :: operator= (const PNS_LINE& aOther) +const PNS_LINE& PNS_LINE::operator=( const PNS_LINE& aOther ) { m_line = aOther.m_line; m_width = aOther.m_width; @@ -75,53 +76,62 @@ const PNS_LINE& PNS_LINE :: operator= (const PNS_LINE& aOther) return *this; } -PNS_LINE* PNS_LINE::Clone( ) const + +PNS_LINE* PNS_LINE::Clone() const { PNS_LINE* l = new PNS_LINE( *this ); + return l; } -void PNS_LINE::Mark(int aMarker) + +void PNS_LINE::Mark( int aMarker ) { m_marker = aMarker; - if(m_segmentRefs) + if( m_segmentRefs ) { - BOOST_FOREACH( PNS_SEGMENT *s, *m_segmentRefs ) - s->Mark(aMarker); + BOOST_FOREACH( PNS_SEGMENT* s, *m_segmentRefs ) + s->Mark( aMarker ); } } + void PNS_LINE::Unmark () { - if(m_segmentRefs) + if( m_segmentRefs ) { - BOOST_FOREACH( PNS_SEGMENT *s, *m_segmentRefs ) + BOOST_FOREACH( PNS_SEGMENT* s, *m_segmentRefs ) s->Unmark(); } + m_marker = 0; } + int PNS_LINE::Marker()const { int marker = m_marker; - if(m_segmentRefs) + + if( m_segmentRefs ) { - BOOST_FOREACH( PNS_SEGMENT *s, *m_segmentRefs ) + BOOST_FOREACH( PNS_SEGMENT* s, *m_segmentRefs ) marker |= s->Marker(); } + return marker; } + void PNS_LINE::copyLinks( const PNS_LINE *aParent ) { - if(aParent->m_segmentRefs == NULL) + if( aParent->m_segmentRefs == NULL ) { m_segmentRefs = NULL; return; } - m_segmentRefs = new SegmentRefs(); + m_segmentRefs = new SEGMENT_REFS(); *m_segmentRefs = *aParent->m_segmentRefs; } @@ -140,6 +150,7 @@ PNS_SEGMENT* PNS_SEGMENT::Clone( ) const return s; } + int PNS_LINE::CountCorners( int aAngles ) { int count = 0; @@ -161,6 +172,7 @@ int PNS_LINE::CountCorners( int aAngles ) return count; } + bool PNS_LINE::Walkaround( SHAPE_LINE_CHAIN aObstacle, SHAPE_LINE_CHAIN& aPre, SHAPE_LINE_CHAIN& aWalk, SHAPE_LINE_CHAIN& aPost, bool aCw ) const { @@ -171,38 +183,37 @@ bool PNS_LINE::Walkaround( SHAPE_LINE_CHAIN aObstacle, SHAPE_LINE_CHAIN& aPre, if( line.SegmentCount() < 1 ) return false; - if( aObstacle.PointInside( line.CPoint( 0 ) ) || - aObstacle.PointInside( line.CPoint( -1 ) ) ) + if( aObstacle.PointInside( line.CPoint( 0 ) ) || aObstacle.PointInside( line.CPoint( -1 ) ) ) return false; SHAPE_LINE_CHAIN::INTERSECTIONS ips, ips2; - line.Intersect(aObstacle, ips); + line.Intersect( aObstacle, ips ); int nearest_dist = INT_MAX; int farthest_dist = 0; SHAPE_LINE_CHAIN::INTERSECTION nearest, farthest; - for(int i = 0; i < (int) ips.size(); i++) + for( int i = 0; i < (int) ips.size(); i++ ) { const VECTOR2I p = ips[i].p; - int dist = line.PathLength(p); + int dist = line.PathLength( p ); - if(dist <= nearest_dist) + if( dist <= nearest_dist ) { nearest_dist = dist; nearest = ips[i]; } - if(dist >= farthest_dist) + if( dist >= farthest_dist ) { farthest_dist = dist; farthest = ips[i]; } } - if(ips.size() <= 1 || nearest.p == farthest.p) + if( ips.size() <= 1 || nearest.p == farthest.p ) { aPre = line; return true; @@ -213,13 +224,13 @@ bool PNS_LINE::Walkaround( SHAPE_LINE_CHAIN aObstacle, SHAPE_LINE_CHAIN& aPre, aPre.Simplify(); aWalk.Clear(); - aWalk.SetClosed(false); + aWalk.SetClosed( false ); aWalk.Append( nearest.p ); int i = nearest.their.Index(); - assert ( nearest.their.Index() >= 0 ); - assert ( farthest.their.Index() >= 0 ); + assert( nearest.their.Index() >= 0 ); + assert( farthest.their.Index() >= 0 ); assert( nearest_dist <= farthest_dist ); @@ -231,14 +242,14 @@ bool PNS_LINE::Walkaround( SHAPE_LINE_CHAIN aObstacle, SHAPE_LINE_CHAIN& aPre, i = i_first; - while (i != i_last) + while( i != i_last ) { - aWalk.Append(aObstacle.CPoint(i)); - i += (aCw ? 1 : -1); + aWalk.Append( aObstacle.CPoint( i ) ); + i += ( aCw ? 1 : -1 ); - if (i < 0) + if( i < 0 ) i = aObstacle.PointCount() - 1; - else if (i == aObstacle.PointCount()) + else if( i == aObstacle.PointCount() ) i = 0; } @@ -249,9 +260,11 @@ bool PNS_LINE::Walkaround( SHAPE_LINE_CHAIN aObstacle, SHAPE_LINE_CHAIN& aPre, aPost.Append( farthest.p ); aPost.Append( line.Slice( farthest.our.Index() + 1, -1 ) ); aPost.Simplify(); + return true; } + void PNS_LINE::Walkaround( const SHAPE_LINE_CHAIN& aObstacle, SHAPE_LINE_CHAIN& aPath, bool aCw ) const @@ -298,12 +311,12 @@ const PNS_LINE PNS_LINE::ClipToNearestObstacle( PNS_NODE* aNode ) const { PNS_LINE l( *this ); - PNS_NODE::OptObstacle obs = aNode->NearestObstacle( &l ); + PNS_NODE::OPT_OBSTACLE obs = aNode->NearestObstacle( &l ); if( obs ) { l.RemoveVia(); - int p = l.Line().Split( obs->ip_first ); + int p = l.Line().Split( obs->m_ipFirst ); l.Line().Remove( p + 1, -1 ); } @@ -325,113 +338,121 @@ void PNS_LINE::ShowLinks() printf( "seg %d: %p\n", i, (*m_segmentRefs)[i] ); } -SHAPE_LINE_CHAIN dragCornerInternal ( const SHAPE_LINE_CHAIN& origin, const VECTOR2I& aP ) +SHAPE_LINE_CHAIN dragCornerInternal( const SHAPE_LINE_CHAIN& aOrigin, const VECTOR2I& aP ) { optional picked; int i; int d = 2; - if(origin.CSegment(-1).Length() > 100000 * 30) // fixme: constant/parameter? + if( aOrigin.CSegment( -1 ).Length() > 100000 * 30 ) // fixme: constant/parameter? d = 1; - for(i = origin.SegmentCount() - d; i >= 0; i--) + for( i = aOrigin.SegmentCount() - d; i >= 0; i-- ) { - - DIRECTION_45 d_start (origin.CSegment(i)); - VECTOR2I p_start = origin.CPoint(i); - SHAPE_LINE_CHAIN paths [2]; + DIRECTION_45 d_start ( aOrigin.CSegment( i ) ); + VECTOR2I p_start = aOrigin.CPoint( i ); + SHAPE_LINE_CHAIN paths[2]; DIRECTION_45 dirs[2]; - DIRECTION_45 d_prev = (i > 0 ? DIRECTION_45(origin.CSegment(i-1)) : DIRECTION_45()); + DIRECTION_45 d_prev = ( i > 0 ? DIRECTION_45( aOrigin.CSegment( i - 1 ) ) : DIRECTION_45() ); - for(int j = 0; j < 2; j++) + for( int j = 0; j < 2; j++ ) { - paths [j] = d_start.BuildInitialTrace( p_start, aP, j ); - dirs [j] = DIRECTION_45(paths[j].CSegment(0)); + paths[j] = d_start.BuildInitialTrace( p_start, aP, j ); + dirs[j] = DIRECTION_45( paths[j].CSegment( 0 ) ); } - - for( int j = 0; j < 2; j++) - if(dirs[j] == d_start) - { - picked = paths[j]; - break; - } - - if(picked) - break; - - for(int j = 0; j < 2; j++) - if (dirs[j].IsObtuse(d_prev)) + for( int j = 0; j < 2; j++ ) + { + if( dirs[j] == d_start ) { picked = paths[j]; break; } - if(picked) - break; + } + + if( picked ) + break; + + for( int j = 0; j < 2; j++ ) + { + if( dirs[j].IsObtuse( d_prev ) ) + { + picked = paths[j]; + break; + } + } + + if( picked ) + break; } - if(picked) + if( picked ) { - SHAPE_LINE_CHAIN path = origin.Slice(0, i); - path.Append(*picked); - return path; + SHAPE_LINE_CHAIN path = aOrigin.Slice( 0, i ); + path.Append( *picked ); + return path; } - return DIRECTION_45().BuildInitialTrace(origin.CPoint(0), aP, true); + return DIRECTION_45().BuildInitialTrace( aOrigin.CPoint( 0 ), aP, true ); } - void PNS_LINE::DragCorner ( const VECTOR2I& aP, int aIndex, int aSnappingThreshold ) { SHAPE_LINE_CHAIN path; VECTOR2I snapped = snapDraggedCorner( m_line, aP, aIndex, aSnappingThreshold ); - if( aIndex == 0) + if( aIndex == 0 ) path = dragCornerInternal( m_line.Reverse(), snapped ).Reverse(); else if ( aIndex == m_line.SegmentCount() ) path = dragCornerInternal( m_line, snapped ); - else { + else + { // fixme: awkward behaviour for "outwards" drags - path = dragCornerInternal( m_line.Slice (0, aIndex), snapped ); - SHAPE_LINE_CHAIN path_rev = dragCornerInternal( m_line.Slice (aIndex, -1).Reverse(), snapped ).Reverse(); - path.Append(path_rev); + path = dragCornerInternal( m_line.Slice( 0, aIndex ), snapped ); + SHAPE_LINE_CHAIN path_rev = dragCornerInternal( m_line.Slice( aIndex, -1 ).Reverse(), + snapped ).Reverse(); + path.Append( path_rev ); } + path.Simplify(); m_line = path; } -VECTOR2I PNS_LINE::snapDraggedCorner( const SHAPE_LINE_CHAIN& aPath, const VECTOR2I &aP, int aIndex, int aThreshold ) const + +VECTOR2I PNS_LINE::snapDraggedCorner( const SHAPE_LINE_CHAIN& aPath, const VECTOR2I& aP, + int aIndex, int aThreshold ) const { - int s_start = std::max(aIndex - 2, 0); - int s_end = std::min(aIndex + 2, aPath.SegmentCount() - 1); + int s_start = std::max( aIndex - 2, 0 ); + int s_end = std::min( aIndex + 2, aPath.SegmentCount() - 1 ); int i, j; int best_dist = INT_MAX; VECTOR2I best_snap = aP; - if(aThreshold <= 0) + if( aThreshold <= 0 ) return aP; - for(i = s_start; i <= s_end; i++) + for( i = s_start; i <= s_end; i++ ) { - const SEG& a = aPath.CSegment(i); + const SEG& a = aPath.CSegment( i ); - for(j = s_start; j < i; j++) + for( j = s_start; j < i; j++ ) { - const SEG& b = aPath.CSegment(j); + const SEG& b = aPath.CSegment( j ); - if( ! (DIRECTION_45(a).IsObtuse(DIRECTION_45(b))) ) + if( !( DIRECTION_45( a ).IsObtuse(DIRECTION_45( b ) ) ) ) continue; OPT_VECTOR2I ip = a.IntersectLines(b); - if(ip) + if( ip ) { - int dist = (*ip - aP).EuclideanNorm(); + int dist = ( *ip - aP ).EuclideanNorm(); + if( dist < aThreshold && dist < best_dist ) { best_dist = dist; @@ -444,40 +465,47 @@ VECTOR2I PNS_LINE::snapDraggedCorner( const SHAPE_LINE_CHAIN& aPath, const VECTO return best_snap; } -VECTOR2I PNS_LINE::snapToNeighbourSegments( const SHAPE_LINE_CHAIN& aPath, const VECTOR2I &aP, int aIndex, int aThreshold ) const +VECTOR2I PNS_LINE::snapToNeighbourSegments( const SHAPE_LINE_CHAIN& aPath, const VECTOR2I &aP, + int aIndex, int aThreshold ) const { VECTOR2I snap_p[2]; - DIRECTION_45 dragDir ( aPath.CSegment(aIndex) ); - int snap_d[2] = {-1, -1}; + DIRECTION_45 dragDir( aPath.CSegment( aIndex ) ); + int snap_d[2] = { -1, -1 }; if( aThreshold == 0 ) return aP; - if(aIndex >= 2) + if( aIndex >= 2 ) { - SEG s = aPath.CSegment(aIndex - 2); - if(DIRECTION_45(s) == dragDir) - snap_d[0] = s.LineDistance(aP); + SEG s = aPath.CSegment( aIndex - 2 ); + + if( DIRECTION_45( s ) == dragDir ) + snap_d[0] = s.LineDistance( aP ); + snap_p[0] = s.A; } - if(aIndex < aPath.SegmentCount() - 2) + if( aIndex < aPath.SegmentCount() - 2 ) { - SEG s = aPath.CSegment(aIndex + 2); - if(DIRECTION_45(s) == dragDir) + SEG s = aPath.CSegment( aIndex + 2 ); + + if( DIRECTION_45( s ) == dragDir ) snap_d[1] = s.LineDistance(aP); + snap_p[1] = s.A; } VECTOR2I best = aP; int minDist = INT_MAX; - for(int i = 0; i < 2; i++) - if(snap_d[i] >= 0 && snap_d[i] < minDist && snap_d[i] <= aThreshold) + for( int i = 0; i < 2; i++ ) + { + if( snap_d[i] >= 0 && snap_d[i] < minDist && snap_d[i] <= aThreshold ) { minDist = snap_d[i]; best = snap_p[i]; } + } return best; } @@ -485,157 +513,166 @@ VECTOR2I PNS_LINE::snapToNeighbourSegments( const SHAPE_LINE_CHAIN& aPath, const void PNS_LINE::DragSegment ( const VECTOR2I& aP, int aIndex, int aSnappingThreshold ) { - SHAPE_LINE_CHAIN path (m_line); - VECTOR2I target (aP) ; + SHAPE_LINE_CHAIN path( m_line ); + VECTOR2I target( aP ); SEG guideA[2], guideB[2]; int index = aIndex; target = snapToNeighbourSegments( path, aP, aIndex, aSnappingThreshold ); - if(index == 0) + if( index == 0 ) { - path.Insert (0, path.CPoint(0)); + path.Insert( 0, path.CPoint( 0 ) ); index++; } - if(index == path.SegmentCount()-1) + if( index == path.SegmentCount() - 1 ) { - path.Insert(path.PointCount() - 1, path.CPoint(-1)); + path.Insert( path.PointCount() - 1, path.CPoint( -1 ) ); } - SEG dragged = path.CSegment(index); - DIRECTION_45 drag_dir (dragged); + SEG dragged = path.CSegment( index ); + DIRECTION_45 drag_dir( dragged ); - SEG s_prev = path.CSegment(index - 1); - SEG s_next = path.CSegment(index + 1); + SEG s_prev = path.CSegment( index - 1 ); + SEG s_next = path.CSegment( index + 1 ); - DIRECTION_45 dir_prev (s_prev); - DIRECTION_45 dir_next (s_next); + DIRECTION_45 dir_prev( s_prev ); + DIRECTION_45 dir_next( s_next ); - if(dir_prev == drag_dir) + if( dir_prev == drag_dir ) { dir_prev = dir_prev.Left(); - path.Insert( index, path.CPoint(index) ); + path.Insert( index, path.CPoint( index ) ); index++; } - if(dir_next == drag_dir) + if( dir_next == drag_dir ) { dir_next = dir_next.Right(); - path.Insert( index + 1, path.CPoint(index + 1) ); + path.Insert( index + 1, path.CPoint( index + 1 ) ); } - - s_prev = path.CSegment(index - 1); - s_next = path.CSegment(index + 1); - dragged = path.CSegment(index); + s_prev = path.CSegment( index - 1 ); + s_next = path.CSegment( index + 1 ); + dragged = path.CSegment( index ); bool lockEndpointA = true; bool lockEndpointB = true; - if(aIndex == 0) + if( aIndex == 0 ) { - if(!lockEndpointA) + if( !lockEndpointA ) guideA[0] = guideA[1] = SEG( dragged.A, dragged.A + drag_dir.Right().Right().ToVector() ); - else { + else + { guideA[0] = SEG( dragged.A, dragged.A + drag_dir.Right().ToVector() ); guideA[1] = SEG( dragged.A, dragged.A + drag_dir.Left().ToVector() ); } - } else { - if(dir_prev.IsObtuse(drag_dir)) + } + else + { + if( dir_prev.IsObtuse(drag_dir ) ) { - guideA[0] = SEG( s_prev.A, s_prev.A + drag_dir.Left().ToVector() ); - guideA[1] = SEG( s_prev.A, s_prev.A + drag_dir.Right().ToVector() ); - } else - guideA[0] = guideA[1] = SEG( dragged.A, dragged.A + dir_prev.ToVector() ); + guideA[0] = SEG( s_prev.A, s_prev.A + drag_dir.Left().ToVector() ); + guideA[1] = SEG( s_prev.A, s_prev.A + drag_dir.Right().ToVector() ); + } + else + guideA[0] = guideA[1] = SEG( dragged.A, dragged.A + dir_prev.ToVector() ); } - if(aIndex == m_line.SegmentCount() - 1) + if( aIndex == m_line.SegmentCount() - 1 ) { - if(!lockEndpointB) + if( !lockEndpointB ) guideB[0] = guideB[1] = SEG( dragged.B, dragged.B + drag_dir.Right().Right().ToVector() ); - else { + else + { guideB[0] = SEG( dragged.B, dragged.B + drag_dir.Right().ToVector() ); guideB[1] = SEG( dragged.B, dragged.B + drag_dir.Left().ToVector() ); } - } else { - if(dir_next.IsObtuse(drag_dir)) + } + else + { + if( dir_next.IsObtuse( drag_dir ) ) { - guideB[0] = SEG( s_next.B, s_next.B + drag_dir.Left().ToVector() ); - guideB[1] = SEG( s_next.B, s_next.B + drag_dir.Right().ToVector() ); - } else + guideB[0] = SEG( s_next.B, s_next.B + drag_dir.Left().ToVector() ); + guideB[1] = SEG( s_next.B, s_next.B + drag_dir.Right().ToVector() ); + } + else guideB[0] = guideB[1] = SEG( dragged.B, dragged.B + dir_next.ToVector() ); } - SEG s_current (target, target + drag_dir.ToVector()); + SEG s_current( target, target + drag_dir.ToVector() ); int best_len = INT_MAX; SHAPE_LINE_CHAIN best; - for(int i = 0; i < 2; i++) + for( int i = 0; i < 2; i++ ) { - for(int j = 0; j < 2; j++) + for( int j = 0; j < 2; j++ ) { - OPT_VECTOR2I ip1 = s_current.IntersectLines(guideA[i]); - OPT_VECTOR2I ip2 = s_current.IntersectLines(guideB[j]); + OPT_VECTOR2I ip1 = s_current.IntersectLines( guideA[i] ); + OPT_VECTOR2I ip2 = s_current.IntersectLines( guideB[j] ); - SHAPE_LINE_CHAIN np; + SHAPE_LINE_CHAIN np; - if(!ip1 || !ip2) - continue; + if( !ip1 || !ip2 ) + continue; - SEG s1 ( s_prev.A, *ip1 ); - SEG s2 ( *ip1, *ip2 ); - SEG s3 ( *ip2, s_next.B ); + SEG s1( s_prev.A, *ip1 ); + SEG s2( *ip1, *ip2 ); + SEG s3( *ip2, s_next.B ); - OPT_VECTOR2I ip; + OPT_VECTOR2I ip; - if(ip = s1.Intersect(s_next)) - { - np.Append ( s1.A ); - np.Append ( *ip ); - np.Append ( s_next.B ); - } else if(ip = s3.Intersect(s_prev)) - { - np.Append ( s_prev.A ); - np.Append ( *ip ); - np.Append ( s3.B ); - } else if(ip = s1.Intersect(s3)) - { - np.Append( s_prev.A ); - np.Append( *ip ); - np.Append( s_next.B ); - } else { - np.Append( s_prev.A ); - np.Append( *ip1 ); - np.Append( *ip2 ); - np.Append( s_next.B ); - } + if( ip = s1.Intersect( s_next ) ) + { + np.Append ( s1.A ); + np.Append ( *ip ); + np.Append ( s_next.B ); + } + else if( ip = s3.Intersect( s_prev ) ) + { + np.Append ( s_prev.A ); + np.Append ( *ip ); + np.Append ( s3.B ); + } + else if( ip = s1.Intersect( s3 ) ) + { + np.Append( s_prev.A ); + np.Append( *ip ); + np.Append( s_next.B ); + } + else + { + np.Append( s_prev.A ); + np.Append( *ip1 ); + np.Append( *ip2 ); + np.Append( s_next.B ); + } - if(np.Length() < best_len) - { - best_len = np.Length(); - best = np; - } - + if( np.Length() < best_len ) + { + best_len = np.Length(); + best = np; + } } } - if(!lockEndpointA && aIndex == 0) - best.Remove(0, 0); - if(!lockEndpointB && aIndex == m_line.SegmentCount() - 1) - best.Remove(-1, -1); - - - if(m_line.PointCount() == 1) + if( !lockEndpointA && aIndex == 0 ) + best.Remove( 0, 0 ); + if( !lockEndpointB && aIndex == m_line.SegmentCount() - 1 ) + best.Remove( -1, -1 ); + + if( m_line.PointCount() == 1 ) m_line = best; - else if (aIndex == 0) - m_line.Replace(0, 1, best); - else if (aIndex == m_line.SegmentCount() - 1) - m_line.Replace(-2, -1, best); + else if( aIndex == 0 ) + m_line.Replace( 0, 1, best ); + else if( aIndex == m_line.SegmentCount() - 1 ) + m_line.Replace( -2, -1, best ); else - m_line.Replace(aIndex, aIndex + 1, best); + m_line.Replace( aIndex, aIndex + 1, best ); m_line.Simplify(); } @@ -643,21 +680,23 @@ void PNS_LINE::DragSegment ( const VECTOR2I& aP, int aIndex, int aSnappingThresh bool PNS_LINE::CompareGeometry( const PNS_LINE& aOther ) { - return m_line.CompareGeometry(aOther.m_line); + return m_line.CompareGeometry( aOther.m_line ); } + void PNS_LINE::Reverse() { - m_line = m_line.Reverse(); - if(m_segmentRefs) - std::reverse(m_segmentRefs->begin(), m_segmentRefs->end() ); + m_line = m_line.Reverse(); + + if( m_segmentRefs ) + std::reverse( m_segmentRefs->begin(), m_segmentRefs->end() ); } -void PNS_LINE::AppendVia(const PNS_VIA& aVia) + +void PNS_LINE::AppendVia( const PNS_VIA& aVia ) { - if(aVia.Pos() == m_line.CPoint(0)) + if( aVia.Pos() == m_line.CPoint( 0 ) ) { - Reverse(); } @@ -666,62 +705,73 @@ void PNS_LINE::AppendVia(const PNS_VIA& aVia) m_via.SetNet( m_net ); } -void PNS_LINE::SetRank(int aRank) + +void PNS_LINE::SetRank( int aRank ) { m_rank = aRank; - if(m_segmentRefs) + + if( m_segmentRefs ) { - BOOST_FOREACH( PNS_SEGMENT *s, *m_segmentRefs ) - s->SetRank(aRank); + BOOST_FOREACH( PNS_SEGMENT* s, *m_segmentRefs ) + s->SetRank( aRank ); } } + int PNS_LINE::Rank() const { int min_rank = INT_MAX; int rank; - if(m_segmentRefs) + + if( m_segmentRefs ) { BOOST_FOREACH( PNS_SEGMENT *s, *m_segmentRefs ) - min_rank = std::min(min_rank, s->Rank()); - rank = (min_rank == INT_MAX) ? -1 : min_rank; - } else { + min_rank = std::min( min_rank, s->Rank() ); + rank = ( min_rank == INT_MAX ) ? -1 : min_rank; + } + else + { rank = m_rank; } return rank; } -void PNS_LINE::ClipVertexRange ( int aStart, int aEnd ) + +void PNS_LINE::ClipVertexRange( int aStart, int aEnd ) { - m_line = m_line.Slice (aStart, aEnd); + m_line = m_line.Slice( aStart, aEnd ); - if(m_segmentRefs) + if( m_segmentRefs ) { - SegmentRefs *snew = new SegmentRefs( m_segmentRefs->begin() + aStart, m_segmentRefs->begin() + aEnd ); + SEGMENT_REFS* snew = new SEGMENT_REFS( m_segmentRefs->begin() + aStart, + m_segmentRefs->begin() + aEnd ); delete m_segmentRefs; m_segmentRefs = snew; } } + bool PNS_LINE::HasLoops() const { - - for(int i = 0; i < PointCount(); i++) - for(int j = 0; j < PointCount(); j++) + for( int i = 0; i < PointCount(); i++ ) + { + for( int j = 0; j < PointCount(); j++ ) { - if( (std::abs(i-j) > 1) && CPoint(i) == CPoint(j)) + if( ( std::abs( i - j ) > 1 ) && CPoint( i ) == CPoint( j ) ) return true; } + } - return false; + return false; } + void PNS_LINE::ClearSegmentLinks() { - if(m_segmentRefs) + if( m_segmentRefs ) delete m_segmentRefs; + m_segmentRefs = NULL; } - diff --git a/pcbnew/router/pns_line.h b/pcbnew/router/pns_line.h index 520409d937..d77c37ec96 100644 --- a/pcbnew/router/pns_line.h +++ b/pcbnew/router/pns_line.h @@ -57,19 +57,18 @@ class PNS_VIA; class PNS_LINE : public PNS_ITEM { public: - typedef std::vector SegmentRefs; + typedef std::vector SEGMENT_REFS; /** * Constructor * Makes an empty line. */ - PNS_LINE() : PNS_ITEM (LINE) + PNS_LINE() : PNS_ITEM( LINE ) { m_segmentRefs = NULL; m_hasVia = false; } - PNS_LINE( const PNS_LINE& aOther ) ; /** @@ -77,7 +76,6 @@ public: * Copies properties (net, layers, etc.) from a base line and replaces the shape * by another **/ - PNS_LINE( const PNS_LINE& aBase, const SHAPE_LINE_CHAIN& aLine ) : PNS_ITEM( aBase ), m_line( aLine ), @@ -92,12 +90,12 @@ public: ~PNS_LINE(); /// @copydoc PNS_ITEM::Clone() - virtual PNS_LINE* Clone( ) const; + virtual PNS_LINE* Clone() const; - const PNS_LINE& operator= (const PNS_LINE& aOther); + const PNS_LINE& operator=( const PNS_LINE& aOther ); ///> Assigns a shape to the line (a polyline/line chain) - void SetShape ( const SHAPE_LINE_CHAIN& aLine ) + void SetShape( const SHAPE_LINE_CHAIN& aLine ) { m_line = aLine; } @@ -135,13 +133,13 @@ public: ///> Returns the aIdx-th point of the line const VECTOR2I& CPoint( int aIdx ) const { - return m_line.CPoint(aIdx); + return m_line.CPoint( aIdx ); } ///> Returns the aIdx-th segment of the line - const SEG CSegment (int aIdx ) const + const SEG CSegment( int aIdx ) const { - return m_line.CSegment(aIdx); + return m_line.CSegment( aIdx ); } ///> Sets line width @@ -169,14 +167,14 @@ public: void LinkSegment( PNS_SEGMENT* aSeg ) { if( !m_segmentRefs ) - m_segmentRefs = new SegmentRefs(); + m_segmentRefs = new SEGMENT_REFS(); m_segmentRefs->push_back( aSeg ); } ///> Returns the list of segments from the owning node that constitute this ///> line (or NULL if the line is not linked) - SegmentRefs* LinkedSegments() + SEGMENT_REFS* LinkedSegments() { return m_segmentRefs; } @@ -195,9 +193,11 @@ public: void ClearSegmentLinks(); ///> Returns the number of segments that were assembled together to form this line. - int LinkCount() const { - if(!m_segmentRefs) + int LinkCount() const + { + if( !m_segmentRefs ) return -1; + return m_segmentRefs->size(); } @@ -208,7 +208,6 @@ public: ///> Clips the line to a given range of vertices. void ClipVertexRange ( int aStart, int aEnd ); - ///> Returns the number of corners of angles specified by mask aAngles. int CountCorners( int aAngles ); @@ -218,12 +217,11 @@ public: ///> aWalkaroundPath = path around the obstacle ///> aPostPath = past from obstacle till the end ///> aCW = whether to walk around in clockwise or counter-clockwise direction. - - bool Walkaround( SHAPE_LINE_CHAIN obstacle, - SHAPE_LINE_CHAIN& pre, - SHAPE_LINE_CHAIN& walk, - SHAPE_LINE_CHAIN& post, - bool cw ) const; + bool Walkaround( SHAPE_LINE_CHAIN aObstacle, + SHAPE_LINE_CHAIN& aPre, + SHAPE_LINE_CHAIN& aWalk, + SHAPE_LINE_CHAIN& aPost, + bool aCw ) const; void Walkaround( const SHAPE_LINE_CHAIN& aObstacle, SHAPE_LINE_CHAIN& aPath, @@ -241,29 +239,31 @@ public: const PNS_VIA& Via() const { return m_via; } - virtual void Mark(int aMarker); + virtual void Mark( int aMarker ); virtual void Unmark (); virtual int Marker() const; - void DragSegment ( const VECTOR2I& aP, int aIndex, int aSnappingThreshold = 0 ); - void DragCorner ( const VECTOR2I& aP, int aIndex, int aSnappingThreshold = 0 ); + void DragSegment( const VECTOR2I& aP, int aIndex, int aSnappingThreshold = 0 ); + void DragCorner( const VECTOR2I& aP, int aIndex, int aSnappingThreshold = 0 ); - void SetRank ( int aRank ); + void SetRank( int aRank ); int Rank() const; bool HasLoops() const; private: + VECTOR2I snapToNeighbourSegments( const SHAPE_LINE_CHAIN& aPath, const VECTOR2I &aP, + int aIndex, int aThreshold) const; - VECTOR2I snapToNeighbourSegments( const SHAPE_LINE_CHAIN& aPath, const VECTOR2I &aP, int aIndex, int aThreshold) const; - VECTOR2I snapDraggedCorner( const SHAPE_LINE_CHAIN& aPath, const VECTOR2I &aP, int aIndex, int aThreshold ) const; + VECTOR2I snapDraggedCorner( const SHAPE_LINE_CHAIN& aPath, const VECTOR2I &aP, + int aIndex, int aThreshold ) const; ///> Copies m_segmentRefs from the line aParent. - void copyLinks( const PNS_LINE *aParent ) ; + void copyLinks( const PNS_LINE* aParent ) ; ///> List of segments in the owning PNS_NODE (PNS_ITEM::m_owner) that constitute this line, or NULL ///> if the line is not a part of any node. - SegmentRefs* m_segmentRefs; + SEGMENT_REFS* m_segmentRefs; ///> The actual shape of the line SHAPE_LINE_CHAIN m_line; diff --git a/pcbnew/router/pns_line_placer.cpp b/pcbnew/router/pns_line_placer.cpp index 16f3ea1429..a79993249f 100644 --- a/pcbnew/router/pns_line_placer.cpp +++ b/pcbnew/router/pns_line_placer.cpp @@ -44,7 +44,8 @@ PNS_LINE_PLACER::PNS_LINE_PLACER( PNS_ROUTER* aRouter ) : m_world = NULL; m_shove = NULL; m_currentNode = NULL; -}; +} + PNS_LINE_PLACER::~PNS_LINE_PLACER() { @@ -52,11 +53,13 @@ PNS_LINE_PLACER::~PNS_LINE_PLACER() delete m_shove; } -void PNS_LINE_PLACER::setWorld ( PNS_NODE *aWorld ) + +void PNS_LINE_PLACER::setWorld ( PNS_NODE* aWorld ) { m_world = aWorld; } + void PNS_LINE_PLACER::AddVia( bool aEnabled, int aDiameter, int aDrill ) { m_viaDiameter = aDiameter; @@ -64,11 +67,10 @@ void PNS_LINE_PLACER::AddVia( bool aEnabled, int aDiameter, int aDrill ) m_placingVia = aEnabled; } -void PNS_LINE_PLACER::startPlacement( const VECTOR2I& aStart, int aNet, - int aWidth, int aLayer ) + +void PNS_LINE_PLACER::startPlacement( const VECTOR2I& aStart, int aNet, int aWidth, int aLayer ) { - - assert(m_world != NULL); + assert( m_world != NULL ); m_direction = m_initial_direction; TRACE( 1, "world %p, intitial-direction %s layer %d\n", @@ -89,14 +91,14 @@ void PNS_LINE_PLACER::startPlacement( const VECTOR2I& aStart, int aNet, m_currentMode = Settings().Mode(); - if(m_shove) + if( m_shove ) delete m_shove; m_shove = NULL; - if(m_currentMode == RM_Shove || m_currentMode == RM_Smart) + if( m_currentMode == RM_Shove || m_currentMode == RM_Smart ) { - m_shove = new PNS_SHOVE( m_world -> Branch(), Router() ); + m_shove = new PNS_SHOVE( m_world->Branch(), Router() ); } m_placingVia = false; @@ -107,8 +109,8 @@ void PNS_LINE_PLACER::setInitialDirection( const DIRECTION_45& aDirection ) { m_initial_direction = aDirection; -if( m_tail.SegmentCount() == 0 ) - m_direction = aDirection; + if( m_tail.SegmentCount() == 0 ) + m_direction = aDirection; } @@ -154,6 +156,7 @@ bool PNS_LINE_PLACER::handleSelfIntersections() m_direction = m_initial_direction; tail.Clear(); head.Clear(); + return true; } else @@ -176,7 +179,7 @@ bool PNS_LINE_PLACER::handlePullback() SHAPE_LINE_CHAIN& head = m_head.Line(); SHAPE_LINE_CHAIN& tail = m_tail.Line(); - if(head.PointCount() < 2) + if( head.PointCount() < 2 ) return false; int n = tail.PointCount(); @@ -201,7 +204,7 @@ bool PNS_LINE_PLACER::handlePullback() // case 2: regardless of the current routing direction, if the tail/head // extremities form an acute or right angle, reduce the tail by one segment // (and hope that further iterations) will result with a cleaner trace - bool pullback_2 = (angle == DIRECTION_45::ANG_RIGHT || angle == DIRECTION_45::ANG_ACUTE); + bool pullback_2 = ( angle == DIRECTION_45::ANG_RIGHT || angle == DIRECTION_45::ANG_ACUTE ); if( pullback_1 || pullback_2 ) { @@ -237,7 +240,7 @@ bool PNS_LINE_PLACER::reduceTail( const VECTOR2I& aEnd ) int n = tail.SegmentCount(); - if(head.SegmentCount() < 1) + if( head.SegmentCount() < 1 ) return false; // Don't attempt this for too short tails @@ -294,10 +297,10 @@ bool PNS_LINE_PLACER::reduceTail( const VECTOR2I& aEnd ) } -bool PNS_LINE_PLACER::checkObtusity( const SEG& a, const SEG& b ) const +bool PNS_LINE_PLACER::checkObtusity( const SEG& aA, const SEG& aB ) const { - const DIRECTION_45 dir_a( a ); - const DIRECTION_45 dir_b( b ); + const DIRECTION_45 dir_a( aA ); + const DIRECTION_45 dir_b( aB ); return dir_a.IsObtuse( dir_b ) || dir_a == dir_b; } @@ -399,6 +402,7 @@ bool PNS_LINE_PLACER::handleViaPlacement( PNS_LINE& aHead ) return false; } + bool PNS_LINE_PLACER::rhWalkOnly ( const VECTOR2I& aP, PNS_LINE& aNewHead ) { SHAPE_LINE_CHAIN line = m_direction.BuildInitialTrace( m_p_start, aP ); @@ -412,27 +416,30 @@ bool PNS_LINE_PLACER::rhWalkOnly ( const VECTOR2I& aP, PNS_LINE& aNewHead ) walkaround.SetSolidsOnly( false ); walkaround.SetIterationLimit( Settings().WalkaroundIterationLimit() ); - PNS_WALKAROUND::WalkaroundStatus wf = walkaround.Route( initTrack, walkFull, false ); + PNS_WALKAROUND::WALKAROUND_STATUS wf = walkaround.Route( initTrack, walkFull, false ); - switch(Settings().OptimizerEffort()) + switch( Settings().OptimizerEffort() ) { - case OE_Low: + case OE_LOW: effort = 0; break; - case OE_Medium: - case OE_Full: + + case OE_MEDIUM: + case OE_FULL: effort = PNS_OPTIMIZER::MERGE_SEGMENTS; break; } - if(Settings().SmartPads()) + + if( Settings().SmartPads() ) effort |= PNS_OPTIMIZER::SMART_PADS; if( wf == PNS_WALKAROUND::STUCK ) { walkFull = walkFull.ClipToNearestObstacle( m_currentNode ); rv = true; - - } else if( m_placingVia && viaOk ) { + } + else if( m_placingVia && viaOk ) + { PNS_LAYERSET allLayers( 0, 15 ); PNS_VIA v1( walkFull.CPoint( -1 ), allLayers, m_viaDiameter ); walkFull.AppendVia( v1 ); @@ -440,7 +447,7 @@ bool PNS_LINE_PLACER::rhWalkOnly ( const VECTOR2I& aP, PNS_LINE& aNewHead ) PNS_OPTIMIZER::Optimize( &walkFull, effort, m_currentNode ); - if( m_currentNode->CheckColliding(&walkFull) ) + if( m_currentNode->CheckColliding( &walkFull ) ) { TRACEn(0, "strange, walk line colliding\n"); } @@ -451,9 +458,10 @@ bool PNS_LINE_PLACER::rhWalkOnly ( const VECTOR2I& aP, PNS_LINE& aNewHead ) return rv; } -bool PNS_LINE_PLACER::rhMarkObstacles ( const VECTOR2I& aP, PNS_LINE& aNewHead ) + +bool PNS_LINE_PLACER::rhMarkObstacles( const VECTOR2I& aP, PNS_LINE& aNewHead ) { - m_head.SetShape ( m_direction.BuildInitialTrace( m_p_start, aP ) ); + m_head.SetShape( m_direction.BuildInitialTrace( m_p_start, aP ) ); if( m_placingVia ) { @@ -461,12 +469,13 @@ bool PNS_LINE_PLACER::rhMarkObstacles ( const VECTOR2I& aP, PNS_LINE& aNewHead ) PNS_VIA v1( m_head.CPoint( -1 ), allLayers, m_viaDiameter ); m_head.AppendVia( v1 ); } - + aNewHead = m_head; return m_currentNode->CheckColliding( &m_head ); } + bool PNS_LINE_PLACER::rhShoveOnly ( const VECTOR2I& aP, PNS_LINE& aNewHead ) { SHAPE_LINE_CHAIN line = m_direction.BuildInitialTrace( m_p_start, aP ); @@ -482,16 +491,16 @@ bool PNS_LINE_PLACER::rhShoveOnly ( const VECTOR2I& aP, PNS_LINE& aNewHead ) walkaround.SetSolidsOnly( true ); walkaround.SetIterationLimit( 10 ); - PNS_WALKAROUND::WalkaroundStatus stat_solids = walkaround.Route( initTrack, walkSolids ); + PNS_WALKAROUND::WALKAROUND_STATUS stat_solids = walkaround.Route( initTrack, walkSolids ); optimizer.SetEffortLevel( PNS_OPTIMIZER::MERGE_SEGMENTS ); optimizer.SetCollisionMask ( PNS_ITEM::SOLID ); optimizer.Optimize( &walkSolids ); if( stat_solids == PNS_WALKAROUND::DONE ) - l2 = walkSolids; - else - l2 = initTrack.ClipToNearestObstacle( m_shove->CurrentNode() ); + l2 = walkSolids; + else + l2 = initTrack.ClipToNearestObstacle( m_shove->CurrentNode() ); PNS_LINE l( m_tail ); l.Line().Append( l2.CLine() ); @@ -513,43 +522,43 @@ bool PNS_LINE_PLACER::rhShoveOnly ( const VECTOR2I& aP, PNS_LINE& aNewHead ) // in certain, uncommon cases there may be loops in the head+tail, In such case, we don't shove to avoid // screwing up the database. - if ( l.HasLoops() ) + if( l.HasLoops() ) { aNewHead = m_head; return false; } - PNS_SHOVE::ShoveStatus status = m_shove->ShoveLines( l ); + PNS_SHOVE::SHOVE_STATUS status = m_shove->ShoveLines( l ); m_currentNode = m_shove->CurrentNode(); if( status == PNS_SHOVE::SH_OK ) - { - optimizer.SetWorld( m_currentNode ); - optimizer.SetEffortLevel( PNS_OPTIMIZER::MERGE_OBTUSE | PNS_OPTIMIZER::SMART_PADS ); - optimizer.SetCollisionMask( PNS_ITEM::ANY ); - optimizer.Optimize( &l2 ); + { + optimizer.SetWorld( m_currentNode ); + optimizer.SetEffortLevel( PNS_OPTIMIZER::MERGE_OBTUSE | PNS_OPTIMIZER::SMART_PADS ); + optimizer.SetCollisionMask( PNS_ITEM::ANY ); + optimizer.Optimize( &l2 ); - aNewHead = l2; + aNewHead = l2; - return true; - } - else - { - walkaround.SetWorld( m_currentNode ); - walkaround.SetSolidsOnly( false ); - walkaround.SetIterationLimit( 10 ); - walkaround.SetApproachCursor( true, aP ); - walkaround.Route( initTrack, l2 ); - aNewHead = l2.ClipToNearestObstacle( m_shove->CurrentNode() ); - - return false; - } + return true; + } + else + { + walkaround.SetWorld( m_currentNode ); + walkaround.SetSolidsOnly( false ); + walkaround.SetIterationLimit( 10 ); + walkaround.SetApproachCursor( true, aP ); + walkaround.Route( initTrack, l2 ); + aNewHead = l2.ClipToNearestObstacle( m_shove->CurrentNode() ); + return false; + } return false; } + bool PNS_LINE_PLACER::routeHead( const VECTOR2I& aP, PNS_LINE& aNewHead ) { switch( m_currentMode ) @@ -570,18 +579,18 @@ bool PNS_LINE_PLACER::routeHead( const VECTOR2I& aP, PNS_LINE& aNewHead ) bool PNS_LINE_PLACER::optimizeTailHeadTransition() { - PNS_LINE tmp = Trace(); - if(PNS_OPTIMIZER::Optimize(&tmp, PNS_OPTIMIZER::FANOUT_CLEANUP, m_currentNode)) + if( PNS_OPTIMIZER::Optimize( &tmp, PNS_OPTIMIZER::FANOUT_CLEANUP, m_currentNode ) ) { - if(tmp.SegmentCount() < 1) + if( tmp.SegmentCount() < 1 ) return false; m_head = tmp; m_p_start = tmp.CLine().CPoint( 0 ); m_direction = DIRECTION_45( tmp.CSegment( 0 ) ); m_tail.Line().Clear(); + return true; } @@ -611,7 +620,7 @@ bool PNS_LINE_PLACER::optimizeTailHeadTransition() // If so, replace the (threshold) last tail points and the head with // the optimized line - if(PNS_OPTIMIZER::Optimize(&new_head, PNS_OPTIMIZER::MERGE_OBTUSE, m_currentNode)) + if( PNS_OPTIMIZER::Optimize( &new_head, PNS_OPTIMIZER::MERGE_OBTUSE, m_currentNode ) ) { PNS_LINE tmp( m_tail, opt_line ); @@ -702,22 +711,26 @@ const PNS_LINE PNS_LINE_PLACER::Trace() const return tmp; } + const PNS_ITEMSET PNS_LINE_PLACER::Traces() { m_currentTrace = Trace(); return PNS_ITEMSET( &m_currentTrace ); } + void PNS_LINE_PLACER::FlipPosture() { m_initial_direction = m_initial_direction.Right(); m_direction = m_direction.Right(); } -PNS_NODE* PNS_LINE_PLACER::CurrentNode(bool aLoopsRemoved) const + +PNS_NODE* PNS_LINE_PLACER::CurrentNode( bool aLoopsRemoved ) const { - if(aLoopsRemoved && m_lastNode) + if( aLoopsRemoved && m_lastNode ) return m_lastNode; + return m_currentNode; } @@ -747,16 +760,19 @@ void PNS_LINE_PLACER::splitAdjacentSegments( PNS_NODE* aNode, PNS_ITEM* aSeg, co } } + void PNS_LINE_PLACER::SetLayer(int aLayer) { m_currentLayer = aLayer; } + void PNS_LINE_PLACER::SetWidth(int aWidth) { m_currentWidth = aWidth; } + void PNS_LINE_PLACER::Start( const VECTOR2I& aP, PNS_ITEM* aStartItem ) { VECTOR2I p( aP ); @@ -783,7 +799,6 @@ void PNS_LINE_PLACER::Start( const VECTOR2I& aP, PNS_ITEM* aStartItem ) m_currentEnd = p; m_currentNet = net; - PNS_NODE *rootNode = Router()->GetWorld()->Branch(); if( splitSeg ) @@ -801,7 +816,7 @@ void PNS_LINE_PLACER::Move( const VECTOR2I& aP, PNS_ITEM* aEndItem ) VECTOR2I p = aP; int eiDepth = -1; - if(aEndItem && aEndItem->Owner()) + if( aEndItem && aEndItem->Owner() ) eiDepth = aEndItem->Owner()->Depth(); if( m_lastNode ) @@ -814,26 +829,27 @@ void PNS_LINE_PLACER::Move( const VECTOR2I& aP, PNS_ITEM* aEndItem ) current = Trace(); - if(!current.PointCount()) + if( !current.PointCount() ) m_currentEnd = m_p_start; else m_currentEnd = current.CLine().CPoint(-1); - PNS_NODE *latestNode = m_currentNode; m_lastNode = latestNode->Branch(); - - if(eiDepth >= 0 && aEndItem && latestNode->Depth() > eiDepth && current.SegmentCount() && current.CPoint(-1) == aP) + if( eiDepth >= 0 && aEndItem && latestNode->Depth() > eiDepth && + current.SegmentCount() && current.CPoint( -1 ) == aP ) { - splitAdjacentSegments( m_lastNode, aEndItem, current.CPoint(-1) ); - if(Settings().RemoveLoops()) + splitAdjacentSegments( m_lastNode, aEndItem, current.CPoint( -1 ) ); + + if( Settings().RemoveLoops() ) removeLoops( m_lastNode, ¤t ); } updateLeadingRatLine(); } + bool PNS_LINE_PLACER::FixRoute( const VECTOR2I& aP, PNS_ITEM* aEndItem ) { bool realEnd = false; @@ -861,13 +877,11 @@ bool PNS_LINE_PLACER::FixRoute( const VECTOR2I& aP, PNS_ITEM* aEndItem ) if( aEndItem && m_currentNet >= 0 && m_currentNet == aEndItem->Net() ) realEnd = true; - - if(realEnd || m_placingVia) + if( realEnd || m_placingVia ) lastV = l.SegmentCount(); else - lastV = std::max( 1, l.SegmentCount() - 1 ); - - + lastV = std::max( 1, l.SegmentCount() - 1 ); + PNS_SEGMENT* lastSeg = NULL; for( int i = 0; i < lastV; i++ ) @@ -883,14 +897,14 @@ bool PNS_LINE_PLACER::FixRoute( const VECTOR2I& aP, PNS_ITEM* aEndItem ) if( pl.EndsWithVia() ) m_lastNode->Add( pl.Via().Clone() ); - if(realEnd) + if( realEnd ) simplifyNewLine ( m_lastNode, lastSeg ); Router()->CommitRouting ( m_lastNode ); m_lastNode = NULL; - if(!realEnd) + if( !realEnd ) { setInitialDirection( d_last ); VECTOR2I p_start = m_placingVia ? p_last : p_pre_last; @@ -908,20 +922,19 @@ bool PNS_LINE_PLACER::FixRoute( const VECTOR2I& aP, PNS_ITEM* aEndItem ) return realEnd; } + void PNS_LINE_PLACER::removeLoops( PNS_NODE* aNode, PNS_LINE* aLatest ) { - if(!aLatest->SegmentCount()) + if( !aLatest->SegmentCount() ) return; aNode->Add( aLatest, true ); - for(int s = 0; s < aLatest->SegmentCount(); s++ ) + for( int s = 0; s < aLatest->SegmentCount(); s++ ) { - PNS_SEGMENT *seg = (*aLatest->LinkedSegments())[s]; - - PNS_LINE* ourLine = aNode->AssembleLine( seg ) ; + PNS_SEGMENT *seg = ( *aLatest->LinkedSegments() )[s]; + PNS_LINE* ourLine = aNode->AssembleLine( seg ); PNS_JOINT a, b; - std::vector lines; aNode->FindLineEnds( ourLine, a, b ); @@ -940,19 +953,19 @@ void PNS_LINE_PLACER::removeLoops( PNS_NODE* aNode, PNS_LINE* aLatest ) { total++; - if( !( line->ContainsSegment( seg ) ) && line->SegmentCount() ) + if( !( line->ContainsSegment( seg ) ) && line->SegmentCount() ) { Router()->DisplayDebugLine ( line->CLine(), -1, 10000 ); - for(int i = 0; i < line->PointCount(); i++ ) - Router()->DisplayDebugPoint ( line->CPoint(i), -1 ); + for( int i = 0; i < line->PointCount(); i++ ) + Router()->DisplayDebugPoint( line->CPoint( i ), -1 ); aNode->Remove( line ); removedCount ++; } } - TRACE(0, "total segs removed: %d/%d\n", removedCount % total); + TRACE( 0, "total segs removed: %d/%d\n", removedCount % total ); delete ourLine; } @@ -960,13 +973,15 @@ void PNS_LINE_PLACER::removeLoops( PNS_NODE* aNode, PNS_LINE* aLatest ) aNode->Remove( aLatest ); } -void PNS_LINE_PLACER::simplifyNewLine ( PNS_NODE *aNode, PNS_SEGMENT *aLatest ) + +void PNS_LINE_PLACER::simplifyNewLine( PNS_NODE* aNode, PNS_SEGMENT* aLatest ) { - PNS_LINE *l = aNode->AssembleLine( aLatest) ; + PNS_LINE* l = aNode->AssembleLine( aLatest ); SHAPE_LINE_CHAIN simplified ( l->CLine() ); + simplified.Simplify(); - if(simplified.PointCount() != l->PointCount()) + if( simplified.PointCount() != l->PointCount() ) { std::auto_ptr lnew ( l->Clone() ); aNode -> Remove(l); @@ -975,6 +990,7 @@ void PNS_LINE_PLACER::simplifyNewLine ( PNS_NODE *aNode, PNS_SEGMENT *aLatest ) } } + void PNS_LINE_PLACER::UpdateSizes( const PNS_ROUTING_SETTINGS& aSettings ) { int trackWidth = aSettings.GetTrackWidth(); @@ -986,29 +1002,31 @@ void PNS_LINE_PLACER::UpdateSizes( const PNS_ROUTING_SETTINGS& aSettings ) m_viaDrill = aSettings.GetViaDrill(); } + void PNS_LINE_PLACER::updateLeadingRatLine() { PNS_LINE current = Trace(); - if(! current.PointCount() ) + if( !current.PointCount() ) return; std::auto_ptr tmpNode ( m_lastNode->Branch() ); tmpNode->Add( ¤t ); - PNS_JOINT *jt = tmpNode->FindJoint( current.CPoint(-1), current.Layers().Start(), current.Net() ); - - if(!jt) + PNS_JOINT *jt = tmpNode->FindJoint( current.CPoint( -1 ), + current.Layers().Start(), current.Net() ); + + if( !jt ) return; int anchor; - PNS_ITEM *it = tmpNode->NearestUnconnectedItem ( jt, &anchor ); + PNS_ITEM *it = tmpNode->NearestUnconnectedItem( jt, &anchor ); - if(it) + if( it ) { SHAPE_LINE_CHAIN lc; - lc.Append ( current.CPoint(-1) ); - lc.Append ( it->Anchor(anchor) ); + lc.Append ( current.CPoint( -1 ) ); + lc.Append ( it->Anchor( anchor ) ); Router()->DisplayDebugLine( lc, 5, 10000 ); } -} \ No newline at end of file +} diff --git a/pcbnew/router/pns_line_placer.h b/pcbnew/router/pns_line_placer.h index ddbeb23c74..66fdb32c17 100644 --- a/pcbnew/router/pns_line_placer.h +++ b/pcbnew/router/pns_line_placer.h @@ -46,7 +46,7 @@ class PNS_ROUTER_BASE; class PNS_LINE_PLACER : public PNS_ALGO_BASE { public: - PNS_LINE_PLACER( PNS_ROUTER *aRouter ); + PNS_LINE_PLACER( PNS_ROUTER* aRouter ); ~PNS_LINE_PLACER(); /** @@ -56,7 +56,7 @@ public: * (unless NULL). */ void Start ( const VECTOR2I& aP, PNS_ITEM* aStartItem ); - + /** * Function Move() * @@ -92,14 +92,14 @@ public: * * Sets the current routing layer. */ - void SetLayer ( int aLayer ); + void SetLayer( int aLayer ); /** * Function SetWidth() * * Sets the current track width. */ - void SetWidth ( int aWidth ); + void SetWidth( int aWidth ); /** * Function Head() @@ -167,7 +167,7 @@ public: * * Returns the most recent world state. */ - PNS_NODE* CurrentNode(bool aLoopsRemoved = false) const; + PNS_NODE* CurrentNode( bool aLoopsRemoved = false ) const; /** * Function FlipPosture() @@ -185,7 +185,6 @@ public: */ void UpdateSizes( const PNS_ROUTING_SETTINGS& aSettings ); - private: /** * Function route() @@ -197,7 +196,6 @@ private: * @param aP ending point of current route. * @return true, if the routing is complete. */ - bool route( const VECTOR2I& aP ); /** @@ -214,7 +212,7 @@ private: * * Sets the board to route. */ - void setWorld ( PNS_NODE *aWorld ); + void setWorld ( PNS_NODE* aWorld ); /** * Function startPlacement() @@ -268,9 +266,9 @@ private: * * Helper function, checking if segments a and b form an obtuse angle * (in 45-degree regime). - * @return true, if angle (a, b) is obtuse + * @return true, if angle (aA, aB) is obtuse */ - bool checkObtusity( const SEG& a, const SEG& b ) const; + bool checkObtusity( const SEG& aA, const SEG& aB ) const; /** * Function handleSelfIntersections() @@ -339,16 +337,15 @@ private: */ void routeStep( const VECTOR2I& aP ); - ///< route step, walkaround mode + ///> route step, walkaround mode bool rhWalkOnly ( const VECTOR2I& aP, PNS_LINE& aNewHead); - ///< route step, shove mode + ///> route step, shove mode bool rhShoveOnly ( const VECTOR2I& aP, PNS_LINE& aNewHead); - ///< route step, mark obstacles mode + ///> route step, mark obstacles mode bool rhMarkObstacles ( const VECTOR2I& aP, PNS_LINE& aNewHead ); - ///> current routing direction DIRECTION_45 m_direction; @@ -399,7 +396,6 @@ private: PNS_LINE m_currentTrace; PNS_MODE m_currentMode; - }; #endif // __PNS_LINE_PLACER_H diff --git a/pcbnew/router/pns_logger.cpp b/pcbnew/router/pns_logger.cpp index e20577b6b9..b09578137c 100644 --- a/pcbnew/router/pns_logger.cpp +++ b/pcbnew/router/pns_logger.cpp @@ -38,136 +38,153 @@ PNS_LOGGER::PNS_LOGGER( ) PNS_LOGGER::~PNS_LOGGER() { - } + void PNS_LOGGER::Clear() { - m_theLog.str(std::string()); + m_theLog.str( std::string() ); m_groupOpened = false; } -void PNS_LOGGER::NewGroup ( const std::string& name, int iter) + +void PNS_LOGGER::NewGroup( const std::string& aName, int aIter ) { - if(m_groupOpened) + if( m_groupOpened ) m_theLog << "endgroup" << std::endl; - m_theLog << "group " << name << " " << iter << std::endl; + + m_theLog << "group " << aName << " " << aIter << std::endl; m_groupOpened = true; } + void PNS_LOGGER::EndGroup() { - if(!m_groupOpened) + if( !m_groupOpened ) return; m_groupOpened = false; m_theLog << "endgroup" << std::endl; } -void PNS_LOGGER::Log ( const PNS_ITEM *item, int kind, const std::string name ) -{ - m_theLog << "item " << kind << " " << name << " "; - m_theLog << item->Net() << " " << item->Layers().Start() << " " << item->Layers().End() << " " << item->Marker() << " " << item->Rank(); - switch(item->Kind()) +void PNS_LOGGER::Log ( const PNS_ITEM* aItem, int aKind, const std::string aName ) +{ + m_theLog << "aItem " << aKind << " " << aName << " "; + m_theLog << aItem->Net() << " " << aItem->Layers().Start() << " " << + aItem->Layers().End() << " " << aItem->Marker() << " " << aItem->Rank(); + + switch( aItem->Kind() ) { case PNS_ITEM::LINE: { - PNS_LINE *l = (PNS_LINE *) item; + PNS_LINE* l = (PNS_LINE*) aItem; m_theLog << " line "; - m_theLog << l->Width() << " " << (l->EndsWithVia() ? 1 : 0) << " "; + m_theLog << l->Width() << " " << ( l->EndsWithVia() ? 1 : 0 ) << " "; dumpShape ( l->Shape() ); m_theLog << std::endl; break; } + case PNS_ITEM::VIA: { m_theLog << " via 0 0 "; - dumpShape ( item->Shape() ); + dumpShape ( aItem->Shape() ); m_theLog << std::endl; break; } case PNS_ITEM::SEGMENT: { - PNS_SEGMENT *s =(PNS_SEGMENT *) item; + PNS_SEGMENT* s =(PNS_SEGMENT*) aItem; m_theLog << " line "; - m_theLog << s->Width() << " 0 linechain 2 0 " << s->Seg().A.x << " " <Seg().A.y << " " << s->Seg().B.x << " " <Seg().B.y << std::endl; + m_theLog << s->Width() << " 0 linechain 2 0 " << s->Seg().A.x << " " << + s->Seg().A.y << " " << s->Seg().B.x << " " <Seg().B.y << std::endl; break; } case PNS_ITEM::SOLID: { - PNS_SOLID *s = (PNS_SOLID*) item; + PNS_SOLID* s = (PNS_SOLID*) aItem; m_theLog << " solid 0 0 "; - dumpShape ( s->Shape() ); + dumpShape( s->Shape() ); m_theLog << std::endl; break; } default: - break; + break; } } -void PNS_LOGGER::Log ( const SHAPE_LINE_CHAIN *l, int kind, const std::string name ) + +void PNS_LOGGER::Log( const SHAPE_LINE_CHAIN *aL, int aKind, const std::string aName ) { - m_theLog << "item " << kind << " " << name << " "; + m_theLog << "item " << aKind << " " << aName << " "; m_theLog << 0 << " " << 0 << " " << 0 << " " << 0 << " " << 0; m_theLog << " line "; m_theLog << 0 << " " << 0 << " "; - dumpShape ( l ); + dumpShape( aL ); m_theLog << std::endl; } -void PNS_LOGGER::Log ( const VECTOR2I& start, const VECTOR2I& end, int kind , const std::string name) -{ +void PNS_LOGGER::Log( const VECTOR2I& aStart, const VECTOR2I& aEnd, + int aKind, const std::string aName) +{ } -void PNS_LOGGER::dumpShape ( const SHAPE * sh ) + +void PNS_LOGGER::dumpShape( const SHAPE* aSh ) { - switch(sh->Type()) + switch( aSh->Type() ) { case SH_LINE_CHAIN: { - const SHAPE_LINE_CHAIN *lc = (const SHAPE_LINE_CHAIN *) sh; - m_theLog << "linechain " << lc->PointCount() << " " << (lc->IsClosed() ? 1 : 0) << " "; - for(int i = 0; i < lc->PointCount(); i++) - m_theLog << lc->CPoint(i).x << " " << lc->CPoint(i).y << " "; + const SHAPE_LINE_CHAIN* lc = (const SHAPE_LINE_CHAIN*) aSh; + m_theLog << "linechain " << lc->PointCount() << " " << ( lc->IsClosed() ? 1 : 0 ) << " "; + + for( int i = 0; i < lc->PointCount(); i++ ) + m_theLog << lc->CPoint( i ).x << " " << lc->CPoint( i ).y << " "; + break; } + case SH_CIRCLE: { - const SHAPE_CIRCLE *c = (const SHAPE_CIRCLE *) sh; + const SHAPE_CIRCLE *c = (const SHAPE_CIRCLE*) aSh; m_theLog << "circle " << c->GetCenter().x << " " << c->GetCenter().y << " " << c->GetRadius(); break; } + case SH_RECT: { - const SHAPE_RECT *r = (const SHAPE_RECT *) sh; - m_theLog << "rect " << r->GetPosition().x << " " << r->GetPosition().y << " " << r->GetSize().x << " " <GetSize().y; + const SHAPE_RECT* r = (const SHAPE_RECT*) aSh; + m_theLog << "rect " << r->GetPosition().x << " " << r->GetPosition().y << " " << + r->GetSize().x << " " <GetSize().y; break; } + case SH_SEGMENT: { - const SHAPE_SEGMENT *s = (const SHAPE_SEGMENT *) sh; - m_theLog << "linechain 2 0 " << s->GetSeg().A.x << " " << s->GetSeg().A.y << " " << s->GetSeg().B.x << " " << s->GetSeg().B.y; + const SHAPE_SEGMENT* s = (const SHAPE_SEGMENT*) aSh; + m_theLog << "linechain 2 0 " << s->GetSeg().A.x << " " << s->GetSeg().A.y << " " << + s->GetSeg().B.x << " " << s->GetSeg().B.y; break; } + default: break; } } -void PNS_LOGGER::Save ( const std::string& filename ) +void PNS_LOGGER::Save( const std::string& aFilename ) { - EndGroup(); - FILE *f=fopen(filename.c_str(),"wb"); - printf("Saving to '%s' [%p]\n", filename.c_str(), f); + FILE* f = fopen( aFilename.c_str(), "wb" ); + printf( "Saving to '%s' [%p]\n", aFilename.c_str(), f ); const std::string s = m_theLog.str(); - fwrite(s.c_str(), 1, s.length(), f); - fclose(f); + fwrite( s.c_str(), 1, s.length(), f ); + fclose( f ); } diff --git a/pcbnew/router/pns_logger.h b/pcbnew/router/pns_logger.h index cc112908ae..9120a43557 100644 --- a/pcbnew/router/pns_logger.h +++ b/pcbnew/router/pns_logger.h @@ -32,24 +32,25 @@ class PNS_ITEM; class SHAPE_LINE_CHAIN; class SHAPE; -class PNS_LOGGER { - +class PNS_LOGGER +{ public: PNS_LOGGER(); ~PNS_LOGGER(); - void Save ( const std::string& filename ); - + void Save( const std::string& aFilename ); void Clear(); - void NewGroup ( const std::string& name, int iter = 0); + + void NewGroup( const std::string& aName, int aIter = 0 ); void EndGroup(); - void Log ( const PNS_ITEM *item, int kind = 0, const std::string name = std::string () ); - void Log ( const SHAPE_LINE_CHAIN *l, int kind = 0, const std::string name = std::string () ); - void Log ( const VECTOR2I& start, const VECTOR2I& end, int kind = 0, const std::string name = std::string () ); + + void Log( const PNS_ITEM* aItem, int aKind = 0, const std::string aName = std::string() ); + void Log( const SHAPE_LINE_CHAIN *aL, int aKind = 0, const std::string aName = std::string() ); + void Log( const VECTOR2I& aStart, const VECTOR2I& aEnd, int aKind = 0, + const std::string aName = std::string() ); private: - - void dumpShape ( const SHAPE* sh ); + void dumpShape ( const SHAPE* aSh ); bool m_groupOpened; std::stringstream m_theLog; diff --git a/pcbnew/router/pns_node.cpp b/pcbnew/router/pns_node.cpp index 4413289dfb..df63612ab6 100644 --- a/pcbnew/router/pns_node.cpp +++ b/pcbnew/router/pns_node.cpp @@ -53,11 +53,13 @@ PNS_NODE::PNS_NODE() m_parent = NULL; m_maxClearance = 800000; // fixme: depends on how thick traces are. m_index = new PNS_INDEX; + #ifdef DEBUG allocNodes.insert( this ); #endif } + PNS_NODE::~PNS_NODE() { TRACE( 0, "PNS_NODE::delete %p", this ); @@ -69,7 +71,6 @@ PNS_NODE::~PNS_NODE() } #ifdef DEBUG - if( allocNodes.find( this ) == allocNodes.end() ) { TRACEn( 0, "attempting to free an already-free'd node.\n" ); @@ -77,31 +78,31 @@ PNS_NODE::~PNS_NODE() } allocNodes.erase( this ); - #endif - for( PNS_INDEX::ItemSet::iterator i = m_index->begin(); - i != m_index->end(); ++i ) + for( PNS_INDEX::ITEM_SET::iterator i = m_index->begin(); i != m_index->end(); ++i ) + { if( (*i)->BelongsTo( this ) ) delete *i; + } unlinkParent(); delete m_index; } -int PNS_NODE::GetClearance( const PNS_ITEM* a, const PNS_ITEM* b ) const +int PNS_NODE::GetClearance( const PNS_ITEM* aA, const PNS_ITEM* aB ) const { - return (*m_clearanceFunctor)( a, b ); + return (*m_clearanceFunctor)( aA, aB ); } + PNS_NODE* PNS_NODE::Branch() { PNS_NODE* child = new PNS_NODE; TRACE( 0, "PNS_NODE::branch %p (parent %p)", child % this ); - m_children.push_back( child ); child->m_depth = m_depth + 1; @@ -114,10 +115,9 @@ PNS_NODE* PNS_NODE::Branch() // to stored items. if( !isRoot() ) { - JointMap::iterator j; + JOINT_MAP::iterator j; - for( PNS_INDEX::ItemSet::iterator i = m_index->begin(); - i != m_index->end(); ++i ) + for( PNS_INDEX::ITEM_SET::iterator i = m_index->begin(); i != m_index->end(); ++i ) child->m_index->Add( *i ); child->m_joints = m_joints; @@ -150,7 +150,7 @@ void PNS_NODE::unlinkParent() // function object that visits potential obstacles and performs // the actual collision refining -struct PNS_NODE::obstacleVisitor +struct PNS_NODE::OBSTACLE_VISITOR { ///> node we are searching in (either root or a branch) PNS_NODE* m_node; @@ -159,7 +159,7 @@ struct PNS_NODE::obstacleVisitor PNS_NODE* m_override; ///> list of encountered obstacles - Obstacles& m_tab; + OBSTACLES& m_tab; ///> the item we are looking for collisions with const PNS_ITEM* m_item; @@ -176,8 +176,7 @@ struct PNS_NODE::obstacleVisitor ///> additional clearance int m_extraClearance; - obstacleVisitor( PNS_NODE::Obstacles& aTab, const PNS_ITEM* aItem, - int aKindMask ) : + OBSTACLE_VISITOR( PNS_NODE::OBSTACLES& aTab, const PNS_ITEM* aItem, int aKindMask ) : m_tab( aTab ), m_item( aItem ), m_kindMask( aKindMask ), @@ -185,9 +184,9 @@ struct PNS_NODE::obstacleVisitor m_matchCount( 0 ), m_extraClearance( 0 ) { - if(aItem->Kind() == PNS_ITEM::LINE) - m_extraClearance += static_cast(aItem)->Width() / 2; - }; + if( aItem->Kind() == PNS_ITEM::LINE ) + m_extraClearance += static_cast( aItem )->Width() / 2; + } void SetCountLimit( int aLimit ) { @@ -212,7 +211,7 @@ struct PNS_NODE::obstacleVisitor int clearance = m_extraClearance + m_node->GetClearance( aItem, m_item ); - if(aItem->Kind() == PNS_ITEM::LINE) + if( aItem->Kind() == PNS_ITEM::LINE ) clearance += static_cast(aItem)->Width() / 2; if( !aItem->Collide( m_item, clearance ) ) @@ -220,7 +219,7 @@ struct PNS_NODE::obstacleVisitor PNS_OBSTACLE obs; - obs.item = aItem; + obs.m_item = aItem; m_tab.push_back( obs ); m_matchCount++; @@ -234,9 +233,9 @@ struct PNS_NODE::obstacleVisitor int PNS_NODE::QueryColliding( const PNS_ITEM* aItem, - PNS_NODE::Obstacles& aObstacles, int aKindMask, int aLimitCount ) + PNS_NODE::OBSTACLES& aObstacles, int aKindMask, int aLimitCount ) { - obstacleVisitor visitor( aObstacles, aItem, aKindMask ); + OBSTACLE_VISITOR visitor( aObstacles, aItem, aKindMask ); #ifdef DEBUG assert( allocNodes.find( this ) != allocNodes.end() ); @@ -249,7 +248,7 @@ int PNS_NODE::QueryColliding( const PNS_ITEM* aItem, m_index->Query( aItem, m_maxClearance, visitor ); // if we haven't found enough items, look in the root branch as well. - if( !isRoot() && ( visitor.m_matchCount < aLimitCount || aLimitCount < 0) ) + if( !isRoot() && ( visitor.m_matchCount < aLimitCount || aLimitCount < 0 ) ) { visitor.SetWorld( m_root, this ); m_root->m_index->Query( aItem, m_maxClearance, visitor ); @@ -259,9 +258,9 @@ int PNS_NODE::QueryColliding( const PNS_ITEM* aItem, } -PNS_NODE::OptObstacle PNS_NODE::NearestObstacle( const PNS_LINE* aItem, int aKindMask ) +PNS_NODE::OPT_OBSTACLE PNS_NODE::NearestObstacle( const PNS_LINE* aItem, int aKindMask ) { - Obstacles obs_list; + OBSTACLES obs_list; bool found_isects = false; const SHAPE_LINE_CHAIN& line = aItem->CLine(); @@ -281,13 +280,13 @@ PNS_NODE::OptObstacle PNS_NODE::NearestObstacle( const PNS_LINE* aItem, int aKin // if(! QueryColliding ( aItem, obs_list, aKindMask )) if( !n ) - return OptObstacle(); + return OPT_OBSTACLE(); PNS_LINE& aLine = (PNS_LINE&) *aItem; PNS_OBSTACLE nearest; - nearest.item = NULL; - nearest.dist_first = INT_MAX; + nearest.m_item = NULL; + nearest.m_distFirst = INT_MAX; BOOST_FOREACH( PNS_OBSTACLE obs, obs_list ) { @@ -296,13 +295,13 @@ PNS_NODE::OptObstacle PNS_NODE::NearestObstacle( const PNS_LINE* aItem, int aKin std::vector isect_list; - int clearance = GetClearance( obs.item, &aLine ); + int clearance = GetClearance( obs.m_item, &aLine ); - SHAPE_LINE_CHAIN hull = obs.item->Hull( clearance, aItem->Width() ); + SHAPE_LINE_CHAIN hull = obs.m_item->Hull( clearance, aItem->Width() ); if( aLine.EndsWithVia() ) { - int clearance = GetClearance( obs.item, &aLine.Via() ); + int clearance = GetClearance( obs.m_item, &aLine.Via() ); SHAPE_LINE_CHAIN viaHull = aLine.Via().Hull( clearance, aItem->Width() ); @@ -313,13 +312,13 @@ PNS_NODE::OptObstacle PNS_NODE::NearestObstacle( const PNS_LINE* aItem, int aKin int dist = aLine.CLine().Length() + ( isect.p - aLine.Via().Pos() ).EuclideanNorm(); - if( dist < nearest.dist_first ) + if( dist < nearest.m_distFirst ) { found_isects = true; - nearest.dist_first = dist; - nearest.ip_first = isect.p; - nearest.item = obs.item; - nearest.hull = hull; + nearest.m_distFirst = dist; + nearest.m_ipFirst = isect.p; + nearest.m_item = obs.m_item; + nearest.m_hull = hull; } if( dist > dist_max ) @@ -338,13 +337,13 @@ PNS_NODE::OptObstacle PNS_NODE::NearestObstacle( const PNS_LINE* aItem, int aKin { int dist = aLine.CLine().PathLength( isect.p ); - if( dist < nearest.dist_first ) + if( dist < nearest.m_distFirst ) { found_isects = true; - nearest.dist_first = dist; - nearest.ip_first = isect.p; - nearest.item = obs.item; - nearest.hull = hull; + nearest.m_distFirst = dist; + nearest.m_ipFirst = isect.p; + nearest.m_item = obs.m_item; + nearest.m_hull = hull; } if( dist > dist_max ) @@ -354,37 +353,41 @@ PNS_NODE::OptObstacle PNS_NODE::NearestObstacle( const PNS_LINE* aItem, int aKin } } - nearest.ip_last = ip_last; - nearest.dist_last = dist_max; + nearest.m_ipLast = ip_last; + nearest.m_distLast = dist_max; } - if(!found_isects) - nearest.item = obs_list[0].item; + if( !found_isects ) + nearest.m_item = obs_list[0].m_item; return nearest; } -PNS_NODE::OptObstacle PNS_NODE::CheckColliding( const PNS_ITEMSET& aSet, int aKindMask ) + +PNS_NODE::OPT_OBSTACLE PNS_NODE::CheckColliding( const PNS_ITEMSET& aSet, int aKindMask ) { - BOOST_FOREACH( const PNS_ITEM *item, aSet.CItems() ) + BOOST_FOREACH( const PNS_ITEM* item, aSet.CItems() ) { - OptObstacle obs = CheckColliding(item, aKindMask); - if(obs) + OPT_OBSTACLE obs = CheckColliding( item, aKindMask ); + + if( obs ) return obs; } - return OptObstacle(); + + return OPT_OBSTACLE(); } -PNS_NODE::OptObstacle PNS_NODE::CheckColliding( const PNS_ITEM* aItemA, int aKindMask ) + +PNS_NODE::OPT_OBSTACLE PNS_NODE::CheckColliding( const PNS_ITEM* aItemA, int aKindMask ) { - Obstacles obs; + OBSTACLES obs; obs.reserve( 100 ); if( aItemA->Kind() == PNS_ITEM::LINE ) { int n = 0; - const PNS_LINE* line = static_cast(aItemA); + const PNS_LINE* line = static_cast( aItemA ); const SHAPE_LINE_CHAIN& l = line->CLine(); for( int i = 0; i < l.SegmentCount(); i++ ) @@ -393,7 +396,7 @@ PNS_NODE::OptObstacle PNS_NODE::CheckColliding( const PNS_ITEM* aItemA, int aKin n += QueryColliding( &s, obs, aKindMask, 1 ); if( n ) - return OptObstacle( obs[0] ); + return OPT_OBSTACLE( obs[0] ); } if( line->EndsWithVia() ) @@ -401,13 +404,13 @@ PNS_NODE::OptObstacle PNS_NODE::CheckColliding( const PNS_ITEM* aItemA, int aKin n += QueryColliding( &line->Via(), obs, aKindMask, 1 ); if( n ) - return OptObstacle( obs[0] ); + return OPT_OBSTACLE( obs[0] ); } } else if( QueryColliding( aItemA, obs, aKindMask, 1 ) > 0 ) - return OptObstacle( obs[0] ); + return OPT_OBSTACLE( obs[0] ); - return OptObstacle(); + return OPT_OBSTACLE(); } @@ -417,23 +420,24 @@ bool PNS_NODE::CheckColliding( const PNS_ITEM* aItemA, const PNS_ITEM* aItemB, i int clearance = GetClearance( aItemA, aItemB ); // fixme: refactor - if(aItemA->Kind() == PNS_ITEM::LINE) - clearance += static_cast(aItemA)->Width() / 2; - if(aItemB->Kind() == PNS_ITEM::LINE) - clearance += static_cast(aItemB)->Width() / 2; + if( aItemA->Kind() == PNS_ITEM::LINE ) + clearance += static_cast( aItemA )->Width() / 2; + if( aItemB->Kind() == PNS_ITEM::LINE ) + clearance += static_cast( aItemB )->Width() / 2; return aItemA->Collide( aItemB, clearance ); } -struct hitVisitor +struct HIT_VISITOR { PNS_ITEMSET& m_items; const VECTOR2I& m_point; const PNS_NODE* m_world; - hitVisitor( PNS_ITEMSET& aTab, const VECTOR2I& aPoint, const PNS_NODE* aWorld ) : - m_items( aTab ), m_point( aPoint ), m_world( aWorld ) {}; + HIT_VISITOR( PNS_ITEMSET& aTab, const VECTOR2I& aPoint, const PNS_NODE* aWorld ) : + m_items( aTab ), m_point( aPoint ), m_world( aWorld ) + {} bool operator()( PNS_ITEM* aItem ) { @@ -455,17 +459,17 @@ const PNS_ITEMSET PNS_NODE::HitTest( const VECTOR2I& aPoint ) const // fixme: we treat a point as an infinitely small circle - this is inefficient. SHAPE_CIRCLE s( aPoint, 0 ); - hitVisitor visitor( items, aPoint, this ); + HIT_VISITOR visitor( items, aPoint, this ); m_index->Query( &s, m_maxClearance, visitor ); if( !isRoot() ) // fixme: could be made cleaner { PNS_ITEMSET items_root; - hitVisitor visitor_root( items_root, aPoint, m_root ); + HIT_VISITOR visitor_root( items_root, aPoint, m_root ); m_root->m_index->Query( &s, m_maxClearance, visitor_root ); - BOOST_FOREACH( PNS_ITEM * item, items_root.Items() ) + BOOST_FOREACH( PNS_ITEM* item, items_root.Items() ) { if( !overrides( item ) ) items.Add( item ); @@ -506,10 +510,10 @@ void PNS_NODE::addLine( PNS_LINE* aLine, bool aAllowRedundant ) if ( !aAllowRedundant ) psegR = findRedundantSegment( pseg ); - if(psegR) - aLine->LinkSegment(psegR); - else { - + if( psegR ) + aLine->LinkSegment( psegR ); + else + { pseg->SetOwner( this ); linkJoint( s.A, pseg->Layers(), aLine->Net(), pseg ); @@ -532,7 +536,7 @@ void PNS_NODE::addSegment( PNS_SEGMENT* aSeg, bool aAllowRedundant ) return; } - if ( !aAllowRedundant && findRedundantSegment ( aSeg ) ) + if( !aAllowRedundant && findRedundantSegment ( aSeg ) ) return; aSeg->SetOwner( this ); @@ -559,11 +563,11 @@ void PNS_NODE::Add( PNS_ITEM* aItem, bool aAllowRedundant ) break; case PNS_ITEM::LINE: - addLine( static_cast (aItem), aAllowRedundant ); + addLine( static_cast( aItem ), aAllowRedundant ); break; case PNS_ITEM::VIA: - addVia( static_cast(aItem) ); + addVia( static_cast( aItem ) ); break; default: @@ -574,7 +578,6 @@ void PNS_NODE::Add( PNS_ITEM* aItem, bool aAllowRedundant ) void PNS_NODE::doRemove( PNS_ITEM* aItem ) { - // assert(m_root->m_index->Contains(aItem) || m_index->Contains(aItem)); // case 1: removing an item that is stored in the root node from any branch: @@ -612,7 +615,7 @@ void PNS_NODE::removeLine( PNS_LINE* aLine ) assert (segRefs != NULL); assert (aLine->Owner()); - if ( (int)segRefs->size() != aLine->SegmentCount()) + if ( (int) segRefs->size() != aLine->SegmentCount() ) { //printf("******weird deletion: segrefs %d segcount %d hasloops %d\n", segRefs->size(), aLine->SegmentCount(), aLine->HasLoops()); } @@ -627,20 +630,19 @@ void PNS_NODE::removeLine( PNS_LINE* aLine ) } - void PNS_NODE::removeVia( PNS_VIA* aVia ) { // We have to split a single joint (associated with a via, binding together multiple layers) // into multiple independent joints. As I'm a lazy bastard, I simply delete the via and all its links and re-insert them. - PNS_JOINT::HashTag tag; + PNS_JOINT::HASH_TAG tag; - VECTOR2I p ( aVia->Pos() ); - PNS_LAYERSET vLayers ( aVia->Layers() ); + VECTOR2I p( aVia->Pos() ); + PNS_LAYERSET vLayers( aVia->Layers() ); int net = aVia->Net(); - PNS_JOINT *jt = FindJoint( p, vLayers.Start(), net ); - PNS_JOINT::LinkedItems links ( jt->LinkList() ); + PNS_JOINT* jt = FindJoint( p, vLayers.Start(), net ); + PNS_JOINT::LINKED_ITEMS links( jt->LinkList() ); tag.net = net; tag.pos = p; @@ -648,15 +650,15 @@ void PNS_NODE::removeVia( PNS_VIA* aVia ) bool split; do { - split = false; - std::pair range = m_joints.equal_range( tag ); + split = false; + std::pair range = m_joints.equal_range( tag ); if( range.first == m_joints.end() ) break; // find and remove all joints containing the via to be removed - for( JointMap::iterator f = range.first; f != range.second; ++f ) + for( JOINT_MAP::iterator f = range.first; f != range.second; ++f ) { if( aVia->LayersOverlap ( &f->second ) ) { @@ -665,10 +667,10 @@ void PNS_NODE::removeVia( PNS_VIA* aVia ) break; } } - } while (split); + } while( split ); // and re-link them, using the former via's link list - BOOST_FOREACH(PNS_ITEM *item, links) + BOOST_FOREACH(PNS_ITEM* item, links) { if( item != aVia ) linkJoint ( p, item->Layers(), net, item ); @@ -677,6 +679,7 @@ void PNS_NODE::removeVia( PNS_VIA* aVia ) doRemove( aVia ); } + void PNS_NODE::Replace( PNS_ITEM* aOldItem, PNS_ITEM* aNewItem ) { Remove( aOldItem ); @@ -711,37 +714,37 @@ void PNS_NODE::Remove( PNS_ITEM* aItem ) } -void PNS_NODE::followLine( PNS_SEGMENT* current, bool scanDirection, int& pos, - int limit, VECTOR2I* corners, PNS_SEGMENT** segments ) +void PNS_NODE::followLine( PNS_SEGMENT* aCurrent, bool aScanDirection, int& aPos, + int aLimit, VECTOR2I* aCorners, PNS_SEGMENT** aSegments ) { bool prevReversed = false; for( ; ; ) { const VECTOR2I p = - (scanDirection ^ prevReversed) ? current->Seg().B : current->Seg().A; - const PNS_JOINT *jt = FindJoint( p, current ); + ( aScanDirection ^ prevReversed ) ? aCurrent->Seg().B : aCurrent->Seg().A; + const PNS_JOINT* jt = FindJoint( p, aCurrent ); assert( jt ); - assert( pos > 0 && pos < limit ); + assert( aPos > 0 && aPos < aLimit ); - corners[pos] = jt->Pos(); - segments[pos] = current; + aCorners[aPos] = jt->Pos(); + aSegments[aPos] = aCurrent; - pos += (scanDirection ? 1 : -1); + aPos += ( aScanDirection ? 1 : -1 ); if( !jt->IsLineCorner() ) break; - current = jt->NextSegment( current ); + aCurrent = jt->NextSegment( aCurrent ); prevReversed = - ( jt->Pos() == (scanDirection ? current->Seg().B : current->Seg().A ) ); + ( jt->Pos() == (aScanDirection ? aCurrent->Seg().B : aCurrent->Seg().A ) ); } } -PNS_LINE* PNS_NODE::AssembleLine( PNS_SEGMENT* aSeg, int *aOriginSegmentIndex) +PNS_LINE* PNS_NODE::AssembleLine( PNS_SEGMENT* aSeg, int* aOriginSegmentIndex) { const int MaxVerts = 1024; @@ -761,7 +764,7 @@ PNS_LINE* PNS_NODE::AssembleLine( PNS_SEGMENT* aSeg, int *aOriginSegmentIndex) int n = 0; - PNS_SEGMENT *prev_seg = NULL; + PNS_SEGMENT* prev_seg = NULL; for( int i = i_start + 1; i < i_end; i++ ) { @@ -773,8 +776,9 @@ PNS_LINE* PNS_NODE::AssembleLine( PNS_SEGMENT* aSeg, int *aOriginSegmentIndex) { pl->LinkSegment( segs[i] ); - if(segs[i] == aSeg && aOriginSegmentIndex) + if( segs[i] == aSeg && aOriginSegmentIndex ) *aOriginSegmentIndex = n; + n++; } @@ -782,53 +786,57 @@ PNS_LINE* PNS_NODE::AssembleLine( PNS_SEGMENT* aSeg, int *aOriginSegmentIndex) } - assert (pl->SegmentCount() != 0); - assert (pl->SegmentCount() == (int) pl->LinkedSegments()->size()); + assert( pl->SegmentCount() != 0 ); + assert( pl->SegmentCount() == (int) pl->LinkedSegments()->size() ); return pl; } -void PNS_NODE::FindLineEnds( PNS_LINE* aLine, PNS_JOINT& a, PNS_JOINT& b ) +void PNS_NODE::FindLineEnds( PNS_LINE* aLine, PNS_JOINT& aA, PNS_JOINT& aB ) { - a = *FindJoint( aLine->CPoint( 0 ), aLine ); - b = *FindJoint( aLine->CPoint( -1 ), aLine ); + aA = *FindJoint( aLine->CPoint( 0 ), aLine ); + aB = *FindJoint( aLine->CPoint( -1 ), aLine ); } -void PNS_NODE::MapConnectivity ( PNS_JOINT* aStart, std::vector & aFoundJoints ) + +void PNS_NODE::MapConnectivity ( PNS_JOINT* aStart, std::vector& aFoundJoints ) { std::deque searchQueue; std::set processed; - searchQueue.push_back(aStart); - processed.insert ( aStart ); + searchQueue.push_back( aStart ); + processed.insert( aStart ); - while(!searchQueue.empty()) + while( !searchQueue.empty() ) { - PNS_JOINT *current = searchQueue.front(); + PNS_JOINT* current = searchQueue.front(); searchQueue.pop_front(); - BOOST_FOREACH ( PNS_ITEM *item, current->LinkList() ) + BOOST_FOREACH( PNS_ITEM* item, current->LinkList() ) + { if ( item->OfKind( PNS_ITEM::SEGMENT ) ) { - PNS_SEGMENT *seg = static_cast(item); - PNS_JOINT *a = FindJoint( seg->Seg().A, seg ); - PNS_JOINT *b = FindJoint( seg->Seg().B, seg ); - PNS_JOINT *next = (*a == *current) ? b : a; + PNS_SEGMENT* seg = static_cast( item ); + PNS_JOINT* a = FindJoint( seg->Seg().A, seg ); + PNS_JOINT* b = FindJoint( seg->Seg().B, seg ); + PNS_JOINT* next = ( *a == *current ) ? b : a; if( processed.find( next ) == processed.end() ) { - processed.insert ( next ); + processed.insert( next ); searchQueue.push_back( next ); } } + } } - BOOST_FOREACH(PNS_JOINT *jt, processed) + BOOST_FOREACH(PNS_JOINT* jt, processed) aFoundJoints.push_back( jt ); } -PNS_ITEM *PNS_NODE::NearestUnconnectedItem ( PNS_JOINT *aStart, int *aAnchor, int aKindMask ) + +PNS_ITEM* PNS_NODE::NearestUnconnectedItem( PNS_JOINT* aStart, int* aAnchor, int aKindMask ) { std::set disconnected; std::vector joints; @@ -836,32 +844,33 @@ PNS_ITEM *PNS_NODE::NearestUnconnectedItem ( PNS_JOINT *aStart, int *aAnchor, in AllItemsInNet( aStart->Net(), disconnected ); MapConnectivity ( aStart, joints ); - BOOST_FOREACH(PNS_JOINT *jt, joints) + BOOST_FOREACH( PNS_JOINT *jt, joints ) { - BOOST_FOREACH (PNS_ITEM *link, jt->LinkList() ) + BOOST_FOREACH( PNS_ITEM* link, jt->LinkList() ) { - if(disconnected.find(link) != disconnected.end() ) - disconnected.erase(link); + if( disconnected.find( link ) != disconnected.end() ) + disconnected.erase( link ); } } int best_dist = INT_MAX; - PNS_ITEM *best = NULL; + PNS_ITEM* best = NULL; - BOOST_FOREACH (PNS_ITEM *item, disconnected ) + BOOST_FOREACH( PNS_ITEM* item, disconnected ) { - if( item->OfKind ( aKindMask ) ) + if( item->OfKind( aKindMask ) ) { for(int i = 0; i < item->AnchorCount(); i++) { - VECTOR2I p = item->Anchor ( i ); - int d = (p - aStart->Pos()).EuclideanNorm(); + VECTOR2I p = item->Anchor( i ); + int d = ( p - aStart->Pos() ).EuclideanNorm(); - if(d < best_dist) + if( d < best_dist ) { best_dist = d; best = item; - if(aAnchor) + + if( aAnchor ) *aAnchor = i; } } @@ -871,31 +880,32 @@ PNS_ITEM *PNS_NODE::NearestUnconnectedItem ( PNS_JOINT *aStart, int *aAnchor, in return best; } -int PNS_NODE::FindLinesBetweenJoints( PNS_JOINT& a, PNS_JOINT& b, std::vector& aLines ) + +int PNS_NODE::FindLinesBetweenJoints( PNS_JOINT& aA, PNS_JOINT& aB, std::vector& aLines ) { - BOOST_FOREACH( PNS_ITEM* item, a.LinkList() ) + BOOST_FOREACH( PNS_ITEM* item, aA.LinkList() ) { if( item->Kind() == PNS_ITEM::SEGMENT ) { - PNS_SEGMENT* seg = static_cast(item); + PNS_SEGMENT* seg = static_cast( item ); PNS_LINE* line = AssembleLine( seg ); PNS_JOINT j_start, j_end; FindLineEnds( line, j_start, j_end ); + int id_start = line->CLine().Find( aA.Pos() ); + int id_end = line->CLine().Find( aB.Pos() ); - int id_start = line->CLine().Find (a.Pos()); - int id_end = line->CLine().Find (b.Pos()); + if( id_end < id_start ) + std::swap( id_end, id_start ); - if(id_end < id_start) - std::swap(id_end, id_start); - - if(id_start >= 0 && id_end >= 0) + if( id_start >= 0 && id_end >= 0 ) { line->ClipVertexRange ( id_start, id_end ); aLines.push_back( line ); - } else + } + else delete line; } } @@ -906,12 +916,12 @@ int PNS_NODE::FindLinesBetweenJoints( PNS_JOINT& a, PNS_JOINT& b, std::vector range; + std::pair range; // not found and we are not root? find in the root and copy results here. if( f == m_joints.end() && !isRoot() ) @@ -978,7 +988,8 @@ PNS_JOINT& PNS_NODE::touchJoint( const VECTOR2I& aPos, const PNS_LAYERSET& aLaye break; } } - } while( merged ); + } + while( merged ); return m_joints.insert( TagJointPair( tag, jt ) )->second; } @@ -991,10 +1002,8 @@ void PNS_JOINT::Dump() const } -void PNS_NODE::linkJoint( const VECTOR2I& aPos, - const PNS_LAYERSET& aLayers, - int aNet, - PNS_ITEM* aWhere ) +void PNS_NODE::linkJoint( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, + int aNet, PNS_ITEM* aWhere ) { PNS_JOINT& jt = touchJoint( aPos, aLayers, aNet ); @@ -1003,7 +1012,7 @@ void PNS_NODE::linkJoint( const VECTOR2I& aPos, void PNS_NODE::unlinkJoint( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, - int aNet, PNS_ITEM* aWhere ) + int aNet, PNS_ITEM* aWhere ) { // fixme: remove dangling joints PNS_JOINT& jt = touchJoint( aPos, aLayers, aNet ); @@ -1021,7 +1030,7 @@ void PNS_NODE::Dump( bool aLong ) for( i = m_items.begin(); i != m_items.end(); i++ ) { if( (*i)->GetKind() == PNS_ITEM::SEGMENT ) - all_segs.insert( static_cast(*i) ); + all_segs.insert( static_cast( *i ) ); } if( !isRoot() ) @@ -1033,24 +1042,24 @@ void PNS_NODE::Dump( bool aLong ) } } - JointMap::iterator j; + JOINT_MAP::iterator j; if( aLong ) - for( j = m_joints.begin(); j!=m_joints.end(); ++j ) + for( j = m_joints.begin(); j != m_joints.end(); ++j ) { printf( "joint : %s, links : %d\n", j->second.GetPos().Format().c_str(), j->second.LinkCount() ); - PNS_JOINT::LinkedItems::const_iterator k; + PNS_JOINT::LINKED_ITEMS::const_iterator k; for( k = j->second.GetLinkList().begin(); k != j->second.GetLinkList().end(); ++k ) { - const PNS_ITEM* item = *k; + const PNS_ITEM* m_item = *k; - switch( item->GetKind() ) + switch( m_item->GetKind() ) { case PNS_ITEM::SEGMENT: { - const PNS_SEGMENT* seg = static_cast(item); + const PNS_SEGMENT* seg = static_cast( m_item ); printf( " -> seg %s %s\n", seg->GetSeg().A.Format().c_str(), seg->GetSeg().B.Format().c_str() ); break; @@ -1075,7 +1084,6 @@ void PNS_NODE::Dump( bool aLong ) if( aLong ) printf( "Line: %s, net %d ", l->GetLine().Format().c_str(), l->GetNet() ); - for( std::vector::iterator j = seg_refs->begin(); j != seg_refs->end(); ++j ) { printf( "%s ", (*j)->GetSeg().A.Format().c_str() ); @@ -1094,7 +1102,7 @@ void PNS_NODE::Dump( bool aLong ) } -void PNS_NODE::GetUpdatedItems( ItemVector& aRemoved, ItemVector& aAdded ) +void PNS_NODE::GetUpdatedItems( ITEM_VECTOR& aRemoved, ITEM_VECTOR& aAdded ) { aRemoved.reserve( m_override.size() ); aAdded.reserve( m_index->Size() ); @@ -1102,10 +1110,10 @@ void PNS_NODE::GetUpdatedItems( ItemVector& aRemoved, ItemVector& aAdded ) if( isRoot() ) return; - BOOST_FOREACH( PNS_ITEM * item, m_override ) + BOOST_FOREACH( PNS_ITEM* item, m_override ) aRemoved.push_back( item ); - for( PNS_INDEX::ItemSet::iterator i = m_index->begin(); i!=m_index->end(); ++i ) + for( PNS_INDEX::ITEM_SET::iterator i = m_index->begin(); i != m_index->end(); ++i ) aAdded.push_back( *i ); } @@ -1115,7 +1123,8 @@ void PNS_NODE::releaseChildren() // copy the kids as the PNS_NODE destructor erases the item from the parent node. std::vector kids = m_children; - BOOST_FOREACH( PNS_NODE * node, kids ) { + BOOST_FOREACH( PNS_NODE * node, kids ) + { node->releaseChildren(); delete node; } @@ -1130,11 +1139,11 @@ void PNS_NODE::Commit( PNS_NODE* aNode ) BOOST_FOREACH( PNS_ITEM * item, aNode->m_override ) Remove( item ); - for( PNS_INDEX::ItemSet::iterator i = aNode->m_index->begin(); + for( PNS_INDEX::ITEM_SET::iterator i = aNode->m_index->begin(); i != aNode->m_index->end(); ++i ) { - (*i)->SetRank ( -1 ); - (*i)->Unmark (); + (*i)->SetRank( -1 ); + (*i)->Unmark(); Add( *i ); } @@ -1151,74 +1160,86 @@ void PNS_NODE::KillChildren() void PNS_NODE::AllItemsInNet( int aNet, std::set& aItems ) { - PNS_INDEX::NetItemsList* l_cur = m_index->GetItemsForNet( aNet ); + PNS_INDEX::NET_ITEMS_LIST* l_cur = m_index->GetItemsForNet( aNet ); - - if(l_cur) + if( l_cur ) { - BOOST_FOREACH (PNS_ITEM *item, *l_cur ) - aItems.insert ( item ); + BOOST_FOREACH( PNS_ITEM*item, *l_cur ) + aItems.insert( item ); } if( !isRoot() ) { - PNS_INDEX::NetItemsList* l_root = m_root->m_index->GetItemsForNet( aNet ); + PNS_INDEX::NET_ITEMS_LIST* l_root = m_root->m_index->GetItemsForNet( aNet ); - if(l_root) - for( PNS_INDEX::NetItemsList::iterator i = l_root->begin(); i!= l_root->end(); ++i ) + if( l_root ) + for( PNS_INDEX::NET_ITEMS_LIST::iterator i = l_root->begin(); i!= l_root->end(); ++i ) if( !overrides( *i ) ) aItems.insert( *i ); } } + void PNS_NODE::ClearRanks() { - for( PNS_INDEX::ItemSet::iterator i = m_index->begin(); i != m_index->end(); ++i ) + for( PNS_INDEX::ITEM_SET::iterator i = m_index->begin(); i != m_index->end(); ++i ) { - (*i)->SetRank(-1); - (*i)->Mark(0); + (*i)->SetRank( -1 ); + (*i)->Mark( 0 ); } } -int PNS_NODE::FindByMarker ( int aMarker, PNS_ITEMSET& aItems ) + +int PNS_NODE::FindByMarker( int aMarker, PNS_ITEMSET& aItems ) { - for( PNS_INDEX::ItemSet::iterator i = m_index->begin(); i != m_index->end(); ++i ) - if ( (*i)->Marker() & aMarker ) aItems.Add(*i); + for( PNS_INDEX::ITEM_SET::iterator i = m_index->begin(); i != m_index->end(); ++i ) + { + if( (*i)->Marker() & aMarker ) + aItems.Add( *i ); + } + return 0; } -int PNS_NODE::RemoveByMarker ( int aMarker ) + +int PNS_NODE::RemoveByMarker( int aMarker ) { - for( PNS_INDEX::ItemSet::iterator i = m_index->begin(); i != m_index->end(); ++i ) - if ( (*i)->Marker() & aMarker ) - { - Remove (*i); - } + for( PNS_INDEX::ITEM_SET::iterator i = m_index->begin(); i != m_index->end(); ++i ) + { + if ( (*i)->Marker() & aMarker ) + { + Remove( *i ); + } + } + return 0; } + PNS_SEGMENT* PNS_NODE::findRedundantSegment ( PNS_SEGMENT *aSeg ) { - PNS_JOINT *jtStart = FindJoint ( aSeg->Seg().A, aSeg ); + PNS_JOINT* jtStart = FindJoint ( aSeg->Seg().A, aSeg ); - if(!jtStart) + if( !jtStart ) return NULL; - BOOST_FOREACH( PNS_ITEM *item, jtStart->LinkList() ) - if(item->OfKind(PNS_ITEM::SEGMENT)) + BOOST_FOREACH( PNS_ITEM* item, jtStart->LinkList() ) + { + if( item->OfKind( PNS_ITEM::SEGMENT ) ) { - PNS_SEGMENT *seg2 = (PNS_SEGMENT *) item; + PNS_SEGMENT* seg2 = (PNS_SEGMENT*) item; - const VECTOR2I a1 ( aSeg->Seg().A ); - const VECTOR2I b1 ( aSeg->Seg().B ); + const VECTOR2I a1( aSeg->Seg().A ); + const VECTOR2I b1( aSeg->Seg().B ); - const VECTOR2I a2 ( seg2->Seg().A ); - const VECTOR2I b2 ( seg2->Seg().B ); + const VECTOR2I a2( seg2->Seg().A ); + const VECTOR2I b2( seg2->Seg().B ); if( seg2->Layers().Start() == aSeg->Layers().Start() && - ((a1 == a2 && b1 == b2) || (a1 == b2 && a2 == b1))) + ( ( a1 == a2 && b1 == b2 ) || ( a1 == b2 && a2 == b1 ) ) ) return seg2; } + } return NULL; } diff --git a/pcbnew/router/pns_node.h b/pcbnew/router/pns_node.h index 4242f8d614..f4d728a3d6 100644 --- a/pcbnew/router/pns_node.h +++ b/pcbnew/router/pns_node.h @@ -52,7 +52,7 @@ class PNS_INDEX; class PNS_CLEARANCE_FUNC { public: - virtual int operator()( const PNS_ITEM* a, const PNS_ITEM* b ) = 0; + virtual int operator()( const PNS_ITEM* aA, const PNS_ITEM* aB ) = 0; virtual ~PNS_CLEARANCE_FUNC() {} }; @@ -65,20 +65,20 @@ public: struct PNS_OBSTACLE { ///> Item we search collisions with - PNS_ITEM* head; + PNS_ITEM* m_head; - ///> Item found to be colliding with head - PNS_ITEM* item; + ///> Item found to be colliding with m_head + PNS_ITEM* m_item; - ///> Hull of the colliding item - SHAPE_LINE_CHAIN hull; + ///> Hull of the colliding m_item + SHAPE_LINE_CHAIN m_hull; ///> First and last intersection point between the head item and the hull - ///> of the colliding item - VECTOR2I ip_first, ip_last; + ///> of the colliding m_item + VECTOR2I m_ipFirst, m_ipLast; ///> ... and the distance thereof - int dist_first, dist_last; + int m_distFirst, m_distLast; }; /** @@ -93,34 +93,33 @@ struct PNS_OBSTACLE * - lightweight cloning/branching (for recursive optimization and shove * springback) **/ - class PNS_NODE { public: - typedef boost::optional OptObstacle; - typedef std::vector ItemVector; - typedef std::vector Obstacles; + typedef boost::optional OPT_OBSTACLE; + typedef std::vector ITEM_VECTOR; + typedef std::vector OBSTACLES; PNS_NODE (); ~PNS_NODE (); ///> Returns the expected clearance between items a and b. - int GetClearance ( const PNS_ITEM* a, const PNS_ITEM* b ) const; + int GetClearance( const PNS_ITEM* aA, const PNS_ITEM* aB ) const; ///> Returns the pre-set worst case clearance between any pair of items - int GetMaxClearance () const + int GetMaxClearance() const { return m_maxClearance; } ///> Sets the worst-case clerance between any pair of items - void SetMaxClearance ( int aClearance ) + void SetMaxClearance( int aClearance ) { m_maxClearance = aClearance; } ///> Assigns a clerance resolution function object - void SetClearanceFunctor ( PNS_CLEARANCE_FUNC* aFunc ) + void SetClearanceFunctor( PNS_CLEARANCE_FUNC* aFunc ) { m_clearanceFunctor = aFunc; } @@ -147,11 +146,10 @@ public: * @param aLimitCount stop looking for collisions after finding this number of colliding items * @return number of obstacles found */ - int QueryColliding ( const PNS_ITEM* aItem, - Obstacles& aObstacles, - int aKindMask = PNS_ITEM::ANY, - int aLimitCount = -1 ); - + int QueryColliding( const PNS_ITEM* aItem, + OBSTACLES& aObstacles, + int aKindMask = PNS_ITEM::ANY, + int aLimitCount = -1 ); /** * Function NearestObstacle() @@ -162,7 +160,7 @@ public: * @param aKindMask mask of obstacle types to take into account * @return the obstacle, if found, otherwise empty. */ - OptObstacle NearestObstacle ( const PNS_LINE* aItem, + OPT_OBSTACLE NearestObstacle( const PNS_LINE* aItem, int aKindMask = PNS_ITEM::ANY ); /** @@ -174,7 +172,7 @@ public: * @param aKindMask mask of obstacle types to take into account * @return the obstacle, if found, otherwise empty. */ - OptObstacle CheckColliding ( const PNS_ITEM* aItem, + OPT_OBSTACLE CheckColliding( const PNS_ITEM* aItem, int aKindMask = PNS_ITEM::ANY ); @@ -187,7 +185,7 @@ public: * @param aKindMask mask of obstacle types to take into account * @return the obstacle, if found, otherwise empty. */ - OptObstacle CheckColliding ( const PNS_ITEMSET& aSet, + OPT_OBSTACLE CheckColliding( const PNS_ITEMSET& aSet, int aKindMask = PNS_ITEM::ANY ); @@ -200,9 +198,9 @@ public: * @param aKindMask mask of obstacle types to take into account * @return the obstacle, if found, otherwise empty. */ - bool CheckColliding ( const PNS_ITEM* aItemA, - const PNS_ITEM* aItemB, - int aKindMask = PNS_ITEM::ANY ); + bool CheckColliding( const PNS_ITEM* aItemA, + const PNS_ITEM* aItemB, + int aKindMask = PNS_ITEM::ANY ); /** * Function HitTest() @@ -211,7 +209,7 @@ public: * @param aPoint the point * @return the items */ - const PNS_ITEMSET HitTest ( const VECTOR2I& aPoint ) const; + const PNS_ITEMSET HitTest( const VECTOR2I& aPoint ) const; /** * Function Add() @@ -221,7 +219,7 @@ public: * @param aAllowRedundant if true, duplicate items are allowed (e.g. a segment or via * at the same coordinates as an existing one) */ - void Add ( PNS_ITEM* aItem, bool aAllowRedundant = false ); + void Add( PNS_ITEM* aItem, bool aAllowRedundant = false ); /** * Function Remove() @@ -229,7 +227,7 @@ public: * Just as the name says, removes an item from this branch. * @param aItem item to remove */ - void Remove ( PNS_ITEM* aItem ); + void Remove( PNS_ITEM* aItem ); /** * Function Replace() @@ -238,7 +236,7 @@ public: * @param aOldItem item to be removed * @param aNewItem item add instead */ - void Replace ( PNS_ITEM* aOldItem, PNS_ITEM* aNewItem ); + void Replace( PNS_ITEM* aOldItem, PNS_ITEM* aNewItem ); /** * Function Branch() @@ -248,7 +246,7 @@ public: * any branches in use, their parents must NOT be deleted. * @return the new branch */ - PNS_NODE* Branch ( ); + PNS_NODE* Branch(); /** * Function AssembleLine() @@ -259,14 +257,10 @@ public: * @param aOriginSegmentIndex index of aSeg in the resulting line * @return the line */ - - PNS_LINE* AssembleLine ( PNS_SEGMENT* aSeg, - int *aOriginSegmentIndex = NULL ); + PNS_LINE* AssembleLine( PNS_SEGMENT* aSeg, int *aOriginSegmentIndex = NULL ); ///> Prints the contents and joints structure - void Dump ( bool aLong = false ); - - + void Dump( bool aLong = false ); /** * Function GetUpdatedItems() @@ -276,8 +270,7 @@ public: * @param aRemoved removed items * @param aAdded added items */ - void GetUpdatedItems( ItemVector& aRemoved, ItemVector& aAdded ); - + void GetUpdatedItems( ITEM_VECTOR& aRemoved, ITEM_VECTOR& aAdded ); /** * Function Commit() @@ -302,23 +295,24 @@ public: * Searches for a joint at a given position, linked to given item. * @return the joint, if found, otherwise empty */ - PNS_JOINT* FindJoint( const VECTOR2I& aPos, PNS_ITEM *aItem ) + PNS_JOINT* FindJoint( const VECTOR2I& aPos, PNS_ITEM* aItem ) { return FindJoint( aPos, aItem->Layers().Start(), aItem->Net() ); } - void MapConnectivity ( PNS_JOINT* aStart, std::vector & aFoundJoints ); + void MapConnectivity( PNS_JOINT* aStart, std::vector & aFoundJoints ); - PNS_ITEM *NearestUnconnectedItem ( PNS_JOINT *aStart, int *aAnchor = NULL, int aKindMask = PNS_ITEM::ANY); + PNS_ITEM* NearestUnconnectedItem( PNS_JOINT* aStart, int *aAnchor = NULL, + int aKindMask = PNS_ITEM::ANY); ///> finds all lines between a pair of joints. Used by the loop removal procedure. - int FindLinesBetweenJoints( PNS_JOINT& a, - PNS_JOINT& b, + int FindLinesBetweenJoints( PNS_JOINT& aA, + PNS_JOINT& aB, std::vector& aLines ); ///> finds the joints corresponding to the ends of line aLine - void FindLineEnds( PNS_LINE* aLine, PNS_JOINT& a, PNS_JOINT& b ); + void FindLineEnds( PNS_LINE* aLine, PNS_JOINT& aA, PNS_JOINT& aB ); ///> Destroys all child nodes. Applicable only to the root node. void KillChildren(); @@ -326,28 +320,27 @@ public: void AllItemsInNet( int aNet, std::set& aItems ); void ClearRanks(); - - int FindByMarker ( int aMarker, PNS_ITEMSET& aItems ); - int RemoveByMarker ( int aMarker ); + int FindByMarker( int aMarker, PNS_ITEMSET& aItems ); + int RemoveByMarker( int aMarker ); private: - struct obstacleVisitor; - typedef boost::unordered_multimap JointMap; - typedef JointMap::value_type TagJointPair; + struct OBSTACLE_VISITOR; + typedef boost::unordered_multimap JOINT_MAP; + typedef JOINT_MAP::value_type TagJointPair; /// nodes are not copyable - PNS_NODE ( const PNS_NODE& b ); - PNS_NODE& operator= ( const PNS_NODE& b ); + PNS_NODE( const PNS_NODE& aB ); + PNS_NODE& operator=( const PNS_NODE& aB ); ///> tries to find matching joint and creates a new one if not found PNS_JOINT& touchJoint( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, int aNet ); - ///> touches a joint and links it to an item + ///> touches a joint and links it to an m_item void linkJoint( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, - int aNet, PNS_ITEM* aWhere ); + int aNet, PNS_ITEM* aWhere ); ///> unlinks an item from a joint void unlinkJoint( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, @@ -372,26 +365,26 @@ private: return m_parent == NULL; } - ///> checks if this branch contains an updated version of the item + ///> checks if this branch contains an updated version of the m_item ///> from the root branch. bool overrides( PNS_ITEM* aItem ) const { return m_override.find( aItem ) != m_override.end(); } - PNS_SEGMENT *findRedundantSegment ( PNS_SEGMENT *aSeg ); + PNS_SEGMENT *findRedundantSegment ( PNS_SEGMENT* aSeg ); ///> scans the joint map, forming a line starting from segment (current). - void followLine ( PNS_SEGMENT* current, - bool scanDirection, - int& pos, - int limit, - VECTOR2I* corners, - PNS_SEGMENT** segments ); + void followLine( PNS_SEGMENT* aCurrent, + bool aScanDirection, + int& aPos, + int aLimit, + VECTOR2I* aCorners, + PNS_SEGMENT** aSegments ); ///> hash table with the joints, linking the items. Joints are hashed by ///> their position, layer set and net. - JointMap m_joints; + JOINT_MAP m_joints; ///> node this node was branched from PNS_NODE* m_parent; diff --git a/pcbnew/router/pns_optimizer.cpp b/pcbnew/router/pns_optimizer.cpp index e6aab0e9a1..6451bca600 100644 --- a/pcbnew/router/pns_optimizer.cpp +++ b/pcbnew/router/pns_optimizer.cpp @@ -30,14 +30,11 @@ #include "pns_router.h" /** - * * Cost Estimator Methods - * */ - -int PNS_COST_ESTIMATOR::CornerCost( const SEG& a, const SEG& b ) +int PNS_COST_ESTIMATOR::CornerCost( const SEG& aA, const SEG& aB ) { - DIRECTION_45 dir_a( a ), dir_b( b ); + DIRECTION_45 dir_a( aA ), dir_b( aB ); switch( dir_a.Angle( dir_b ) ) { @@ -109,8 +106,8 @@ bool PNS_COST_ESTIMATOR::IsBetter( PNS_COST_ESTIMATOR& aOther, if( aOther.m_cornerCost < m_cornerCost && aOther.m_lengthCost < m_lengthCost ) return true; - else if( aOther.m_cornerCost < m_cornerCost * aCornerTollerance && aOther.m_lengthCost < - m_lengthCost * aLengthTollerance ) + else if( aOther.m_cornerCost < m_cornerCost * aCornerTollerance && + aOther.m_lengthCost < m_lengthCost * aLengthTollerance ) return true; return false; @@ -118,9 +115,7 @@ bool PNS_COST_ESTIMATOR::IsBetter( PNS_COST_ESTIMATOR& aOther, /** - * * Optimizer - * **/ PNS_OPTIMIZER::PNS_OPTIMIZER( PNS_NODE* aWorld ) : m_world( aWorld ), m_collisionKindMask( PNS_ITEM::ANY ), m_effortLevel( MERGE_SEGMENTS ) @@ -135,14 +130,14 @@ PNS_OPTIMIZER::~PNS_OPTIMIZER() } -struct PNS_OPTIMIZER::CacheVisitor +struct PNS_OPTIMIZER::CACHE_VISITOR { - CacheVisitor( const PNS_ITEM* aOurItem, PNS_NODE* aNode, int aMask ) : + CACHE_VISITOR( const PNS_ITEM* aOurItem, PNS_NODE* aNode, int aMask ) : m_ourItem( aOurItem ), m_collidingItem( NULL ), m_node( aNode ), m_mask( aMask ) - {}; + {} bool operator()( PNS_ITEM* aOtherItem ) { @@ -171,14 +166,14 @@ void PNS_OPTIMIZER::cacheAdd( PNS_ITEM* aItem, bool aIsStatic = false ) return; m_cache.Add( aItem ); - m_cacheTags[aItem].hits = 1; - m_cacheTags[aItem].isStatic = aIsStatic; + m_cacheTags[aItem].m_hits = 1; + m_cacheTags[aItem].m_isStatic = aIsStatic; } void PNS_OPTIMIZER::removeCachedSegments( PNS_LINE* aLine, int aStartVertex, int aEndVertex ) { - PNS_LINE::SegmentRefs* segs = aLine->LinkedSegments(); + PNS_LINE::SEGMENT_REFS* segs = aLine->LinkedSegments(); if( !segs ) return; @@ -198,7 +193,7 @@ void PNS_OPTIMIZER::removeCachedSegments( PNS_LINE* aLine, int aStartVertex, int void PNS_OPTIMIZER::CacheRemove( PNS_ITEM* aItem ) { if( aItem->Kind() == PNS_ITEM::LINE ) - removeCachedSegments( static_cast (aItem) ); + removeCachedSegments( static_cast( aItem ) ); } @@ -219,7 +214,7 @@ void PNS_OPTIMIZER::ClearCache( bool aStaticOnly ) for( CachedItemTags::iterator i = m_cacheTags.begin(); i!= m_cacheTags.end(); ++i ) { - if( i->second.isStatic ) + if( i->second.m_isStatic ) { m_cache.Remove( i->first ); m_cacheTags.erase( i->first ); @@ -230,7 +225,7 @@ void PNS_OPTIMIZER::ClearCache( bool aStaticOnly ) bool PNS_OPTIMIZER::checkColliding( PNS_ITEM* aItem, bool aUpdateCache ) { - CacheVisitor v( aItem, m_world, m_collisionKindMask ); + CACHE_VISITOR v( aItem, m_world, m_collisionKindMask ); return m_world->CheckColliding( aItem ); @@ -239,19 +234,19 @@ bool PNS_OPTIMIZER::checkColliding( PNS_ITEM* aItem, bool aUpdateCache ) if( !v.m_collidingItem ) { - PNS_NODE::OptObstacle obs = m_world->CheckColliding( aItem ); + PNS_NODE::OPT_OBSTACLE obs = m_world->CheckColliding( aItem ); if( obs ) { if( aUpdateCache ) - cacheAdd( obs->item ); + cacheAdd( obs->m_item ); return true; } } else { - m_cacheTags[v.m_collidingItem].hits++; + m_cacheTags[v.m_collidingItem].m_hits++; return true; } @@ -430,7 +425,6 @@ bool PNS_OPTIMIZER::mergeStep( PNS_LINE* aLine, SHAPE_LINE_CHAIN& aCurrentPath, int cost_orig = PNS_COST_ESTIMATOR::CornerCost( aCurrentPath ); - if( aLine->SegmentCount() < 4 ) return false; @@ -442,7 +436,8 @@ bool PNS_OPTIMIZER::mergeStep( PNS_LINE* aLine, SHAPE_LINE_CHAIN& aCurrentPath, const SEG s1 = aCurrentPath.CSegment( n ); const SEG s2 = aCurrentPath.CSegment( n + step ); - SHAPE_LINE_CHAIN path[2], * picked = NULL; + SHAPE_LINE_CHAIN path[2]; + SHAPE_LINE_CHAIN* picked = NULL; int cost[2]; for( int i = 0; i < 2; i++ ) @@ -485,10 +480,10 @@ bool PNS_OPTIMIZER::mergeStep( PNS_LINE* aLine, SHAPE_LINE_CHAIN& aCurrentPath, } -PNS_OPTIMIZER::BreakoutList PNS_OPTIMIZER::circleBreakouts( int aWidth, +PNS_OPTIMIZER::BREAKOUT_LIST PNS_OPTIMIZER::circleBreakouts( int aWidth, const SHAPE* aShape, bool aPermitDiagonal ) const { - BreakoutList breakouts; + BREAKOUT_LIST breakouts; for( int angle = 0; angle < 360; angle += 45 ) { @@ -505,12 +500,12 @@ PNS_OPTIMIZER::BreakoutList PNS_OPTIMIZER::circleBreakouts( int aWidth, } -PNS_OPTIMIZER::BreakoutList PNS_OPTIMIZER::rectBreakouts( int aWidth, +PNS_OPTIMIZER::BREAKOUT_LIST PNS_OPTIMIZER::rectBreakouts( int aWidth, const SHAPE* aShape, bool aPermitDiagonal ) const { const SHAPE_RECT* rect = static_cast(aShape); VECTOR2I s = rect->GetSize(), c = rect->GetPosition() + VECTOR2I( s.x / 2, s.y / 2 ); - BreakoutList breakouts; + BREAKOUT_LIST breakouts; VECTOR2I d_offset; @@ -520,7 +515,6 @@ PNS_OPTIMIZER::BreakoutList PNS_OPTIMIZER::rectBreakouts( int aWidth, VECTOR2I d_vert = VECTOR2I( 0, s.y / 2 + aWidth ); VECTOR2I d_horiz = VECTOR2I( s.x / 2 + aWidth, 0 ); - breakouts.push_back( SHAPE_LINE_CHAIN( c, c + d_horiz ) ); breakouts.push_back( SHAPE_LINE_CHAIN( c, c - d_horiz ) ); breakouts.push_back( SHAPE_LINE_CHAIN( c, c + d_vert ) ); @@ -560,59 +554,59 @@ PNS_OPTIMIZER::BreakoutList PNS_OPTIMIZER::rectBreakouts( int aWidth, } -PNS_OPTIMIZER::BreakoutList PNS_OPTIMIZER::computeBreakouts( int aWidth, +PNS_OPTIMIZER::BREAKOUT_LIST PNS_OPTIMIZER::computeBreakouts( int aWidth, const PNS_ITEM* aItem, bool aPermitDiagonal ) const { switch( aItem->Kind() ) { case PNS_ITEM::VIA: - { - const PNS_VIA* via = static_cast( aItem ); - return circleBreakouts( aWidth, via->Shape(), aPermitDiagonal ); - } + { + const PNS_VIA* via = static_cast( aItem ); + return circleBreakouts( aWidth, via->Shape(), aPermitDiagonal ); + } case PNS_ITEM::SOLID: + { + const SHAPE* shape = aItem->Shape(); + + switch( shape->Type() ) { - const SHAPE* shape = aItem->Shape(); + case SH_RECT: + return rectBreakouts( aWidth, shape, aPermitDiagonal ); - switch( shape->Type() ) - { - case SH_RECT: - return rectBreakouts( aWidth, shape, aPermitDiagonal ); - - case SH_SEGMENT: - { - const SHAPE_SEGMENT *seg = static_cast (shape); - const SHAPE_RECT rect = ApproximateSegmentAsRect ( *seg ); - return rectBreakouts( aWidth, &rect, aPermitDiagonal ); - } - - case SH_CIRCLE: - return circleBreakouts( aWidth, shape, aPermitDiagonal ); - - default: - break; - } + case SH_SEGMENT: + { + const SHAPE_SEGMENT* seg = static_cast (shape); + const SHAPE_RECT rect = ApproximateSegmentAsRect ( *seg ); + return rectBreakouts( aWidth, &rect, aPermitDiagonal ); } + case SH_CIRCLE: + return circleBreakouts( aWidth, shape, aPermitDiagonal ); + + default: + break; + } + } + default: break; } - return BreakoutList(); + return BREAKOUT_LIST(); } PNS_ITEM* PNS_OPTIMIZER::findPadOrVia( int aLayer, int aNet, const VECTOR2I& aP ) const { - PNS_JOINT *jt = m_world->FindJoint( aP, aLayer, aNet ); + PNS_JOINT* jt = m_world->FindJoint( aP, aLayer, aNet ); if( !jt ) return NULL; BOOST_FOREACH( PNS_ITEM* item, jt->LinkList() ) { - if( item->OfKind (PNS_ITEM::VIA | PNS_ITEM::SOLID ) ) + if( item->OfKind( PNS_ITEM::VIA | PNS_ITEM::SOLID ) ) return item; } @@ -632,7 +626,7 @@ int PNS_OPTIMIZER::smartPadsSingle( PNS_LINE* aLine, PNS_ITEM* aPad, bool aEnd, typedef std::pair RtVariant; std::vector variants; - BreakoutList breakouts = computeBreakouts( aLine->Width(), aPad, true ); + BREAKOUT_LIST breakouts = computeBreakouts( aLine->Width(), aPad, true ); SHAPE_LINE_CHAIN line = ( aEnd ? aLine->CLine().Reverse() : aLine->CLine() ); @@ -647,7 +641,7 @@ int PNS_OPTIMIZER::smartPadsSingle( PNS_LINE* aLine, PNS_ITEM* aPad, bool aEnd, { SHAPE_LINE_CHAIN v; SHAPE_LINE_CHAIN connect = dir.BuildInitialTrace( l.CPoint( -1 ), - line.CPoint( p ), diag == 0 ); + line.CPoint( p ), diag == 0 ); DIRECTION_45 dir_bkout( l.CSegment( -1 ) ); @@ -739,9 +733,10 @@ bool PNS_OPTIMIZER::runSmartPads( PNS_LINE* aLine ) if( endPad ) smartPadsSingle( aLine, endPad, true, - vtx < 0 ? line.PointCount() - 1 : line.PointCount() - 1 - vtx ); + vtx < 0 ? line.PointCount() - 1 : line.PointCount() - 1 - vtx ); aLine->Line().Simplify(); + return true; } @@ -756,7 +751,7 @@ bool PNS_OPTIMIZER::Optimize( PNS_LINE* aLine, int aEffortLevel, PNS_NODE* aWorl } -bool PNS_OPTIMIZER::fanoutCleanup( PNS_LINE * aLine ) +bool PNS_OPTIMIZER::fanoutCleanup( PNS_LINE* aLine ) { if( aLine->PointCount() < 3 ) return false; @@ -769,40 +764,35 @@ bool PNS_OPTIMIZER::fanoutCleanup( PNS_LINE * aLine ) int thr = aLine->Width() * 10; int len = aLine->CLine().Length(); - - if(!startPad) + if( !startPad ) return false; - - bool startMatch = startPad->OfKind(PNS_ITEM::VIA | PNS_ITEM::SOLID); + bool startMatch = startPad->OfKind( PNS_ITEM::VIA | PNS_ITEM::SOLID ); bool endMatch = false; if(endPad) { - endMatch = endPad->OfKind(PNS_ITEM::VIA | PNS_ITEM::SOLID); + endMatch = endPad->OfKind( PNS_ITEM::VIA | PNS_ITEM::SOLID ); } else { endMatch = aLine->EndsWithVia(); } - - if(startMatch && endMatch && len < thr) + if( startMatch && endMatch && len < thr ) { - for(int i = 0; i < 2; i++ ) { - SHAPE_LINE_CHAIN l2 = DIRECTION_45().BuildInitialTrace(p_start, p_end, i); - PNS_ROUTER::GetInstance()->DisplayDebugLine (l2, 4, 10000); + SHAPE_LINE_CHAIN l2 = DIRECTION_45().BuildInitialTrace( p_start, p_end, i ); + PNS_ROUTER::GetInstance()->DisplayDebugLine( l2, 4, 10000 ); PNS_LINE repl; - repl = PNS_LINE (*aLine, l2 ); - + repl = PNS_LINE( *aLine, l2 ); - - if (!m_world->CheckColliding(&repl)) + if( !m_world->CheckColliding( &repl ) ) { - aLine->SetShape(repl.CLine()); + aLine->SetShape( repl.CLine() ); return true; } } } + return false; } diff --git a/pcbnew/router/pns_optimizer.h b/pcbnew/router/pns_optimizer.h index 3e1d9b211c..fb75b41a53 100644 --- a/pcbnew/router/pns_optimizer.h +++ b/pcbnew/router/pns_optimizer.h @@ -38,23 +38,22 @@ class PNS_ROUTER; * * Calculates the cost of a given line, taking corner angles and total length into account. **/ - class PNS_COST_ESTIMATOR { public: PNS_COST_ESTIMATOR() : m_lengthCost( 0 ), m_cornerCost( 0 ) - {}; + {} - PNS_COST_ESTIMATOR( const PNS_COST_ESTIMATOR& b ) : - m_lengthCost( b.m_lengthCost ), - m_cornerCost( b.m_cornerCost ) - {}; + PNS_COST_ESTIMATOR( const PNS_COST_ESTIMATOR& aB ) : + m_lengthCost( aB.m_lengthCost ), + m_cornerCost( aB.m_cornerCost ) + {} ~PNS_COST_ESTIMATOR() {}; - static int CornerCost( const SEG& a, const SEG& b ); + static int CornerCost( const SEG& aA, const SEG& aB ); static int CornerCost( const SHAPE_LINE_CHAIN& aLine ); static int CornerCost( const PNS_LINE& aLine ); @@ -63,7 +62,7 @@ public: void Replace( PNS_LINE& aOldLine, PNS_LINE& aNewLine ); bool IsBetter( PNS_COST_ESTIMATOR& aOther, double aLengthTollerance, - double aCornerTollerace ) const; + double aCornerTollerace ) const; double GetLengthCost() const { return m_lengthCost; } double GetCornerCost() const { return m_cornerCost; } @@ -84,7 +83,6 @@ private: * the procedure as long as the total cost of the line keeps decreasing * - "Smart Pads" - that is, rerouting pad/via exits to make them look nice (SMART_PADS). **/ - class PNS_OPTIMIZER { public: @@ -122,14 +120,14 @@ public: private: static const int MaxCachedItems = 256; - typedef std::vector BreakoutList; + typedef std::vector BREAKOUT_LIST; - struct CacheVisitor; + struct CACHE_VISITOR; - struct CachedItem + struct CACHED_ITEM { - int hits; - bool isStatic; + int m_hits; + bool m_isStatic; }; bool mergeObtuse( PNS_LINE* aLine ); @@ -142,15 +140,13 @@ private: bool checkColliding( PNS_ITEM* aItem, bool aUpdateCache = true ); bool checkColliding( PNS_LINE* aLine, const SHAPE_LINE_CHAIN& aOptPath ); - void cacheAdd( PNS_ITEM* aItem, bool aIsStatic ); void removeCachedSegments( PNS_LINE* aLine, int aStartVertex = 0, int aEndVertex = -1 ); - BreakoutList circleBreakouts( int aWidth, const SHAPE* aShape, bool aPermitDiagonal ) const; - BreakoutList rectBreakouts( int aWidth, const SHAPE* aShape, bool aPermitDiagonal ) const; - BreakoutList ovalBreakouts( int aWidth, const SHAPE* aShape, bool aPermitDiagonal ) const; - BreakoutList computeBreakouts( int aWidth, const PNS_ITEM* aItem, - bool aPermitDiagonal ) const; + BREAKOUT_LIST circleBreakouts( int aWidth, const SHAPE* aShape, bool aPermitDiagonal ) const; + BREAKOUT_LIST rectBreakouts( int aWidth, const SHAPE* aShape, bool aPermitDiagonal ) const; + BREAKOUT_LIST ovalBreakouts( int aWidth, const SHAPE* aShape, bool aPermitDiagonal ) const; + BREAKOUT_LIST computeBreakouts( int aWidth, const PNS_ITEM* aItem, bool aPermitDiagonal ) const; int smartPadsSingle( PNS_LINE* aLine, PNS_ITEM* aPad, bool aEnd, int aEndVertex ); @@ -158,7 +154,7 @@ private: SHAPE_INDEX_LIST m_cache; - typedef boost::unordered_map CachedItemTags; + typedef boost::unordered_map CachedItemTags; CachedItemTags m_cacheTags; PNS_NODE* m_world; int m_collisionKindMask; diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index 72e001801c..e1f3440625 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -82,28 +82,28 @@ public: m_defaultClearance = 254000; // aBoard->m_NetClasses.Find ("Default clearance")->GetClearance(); } - int localPadClearance( const PNS_ITEM * item ) const + int localPadClearance( const PNS_ITEM* aItem ) const { - if(!item->Parent() || item->Parent()->Type() != PCB_PAD_T ) + if( !aItem->Parent() || aItem->Parent()->Type() != PCB_PAD_T ) return 0; - const D_PAD *pad = static_cast( item->Parent() ); + const D_PAD* pad = static_cast( aItem->Parent() ); return pad->GetLocalClearance(); } - int operator()( const PNS_ITEM* a, const PNS_ITEM* b ) + int operator()( const PNS_ITEM* aA, const PNS_ITEM* aB ) { - int net_a = a->Net(); - int cl_a = (net_a >= 0 ? m_clearanceCache[net_a] : m_defaultClearance); - int net_b = b->Net(); - int cl_b = (net_b >= 0 ? m_clearanceCache[net_b] : m_defaultClearance); + int net_a = aA->Net(); + int cl_a = ( net_a >= 0 ? m_clearanceCache[net_a] : m_defaultClearance ); + int net_b = aB->Net(); + int cl_b = ( net_b >= 0 ? m_clearanceCache[net_b] : m_defaultClearance ); - int pad_a = localPadClearance( a ); - int pad_b = localPadClearance( b ); + int pad_a = localPadClearance( aA ); + int pad_b = localPadClearance( aB ); - cl_a = std::max(cl_a, pad_a); - cl_b = std::max(cl_b, pad_b); + cl_a = std::max( cl_a, pad_a ); + cl_b = std::max( cl_b, pad_b ); return std::max( cl_a, cl_b ); } @@ -113,9 +113,10 @@ private: int m_defaultClearance; }; + PNS_ITEM* PNS_ROUTER::syncPad( D_PAD* aPad ) { - PNS_LAYERSET layers ( 0, 15 ); + PNS_LAYERSET layers( 0, 15 ); switch( aPad->GetAttribute() ) { @@ -131,7 +132,7 @@ PNS_ITEM* PNS_ROUTER::syncPad( D_PAD* aPad ) for( i = FIRST_COPPER_LAYER; i <= LAST_COPPER_LAYER; i++ ) { - if( lmsk & (1 << i) ) + if( lmsk & ( 1 << i ) ) { layers = PNS_LAYERSET( i ); break; @@ -162,17 +163,16 @@ PNS_ITEM* PNS_ROUTER::syncPad( D_PAD* aPad ) double orient = aPad->GetOrientation() / 10.0; bool nonOrtho = false; - if( orient == 90.0 || orient == 270.0 ) sz = VECTOR2I( sz.y, sz.x ); else if( orient != 0.0 && orient != 180.0 ) { // rotated pads are replaced by for the moment by circles due to my laziness ;) - solid->SetShape ( new SHAPE_CIRCLE (c, std::min(sz.x, sz.y) / 2 ) ); + solid->SetShape( new SHAPE_CIRCLE( c, std::min( sz.x, sz.y ) / 2 ) ); nonOrtho = true; } - if(!nonOrtho) + if( !nonOrtho ) { switch( aPad->GetShape() ) { @@ -183,15 +183,17 @@ PNS_ITEM* PNS_ROUTER::syncPad( D_PAD* aPad ) case PAD_OVAL: if( sz.x == sz.y ) solid->SetShape( new SHAPE_CIRCLE( c, sz.x / 2 ) ); - else { + else + { VECTOR2I delta; - if (sz.x > sz.y) - delta = VECTOR2I((sz.x - sz.y) / 2, 0); + if( sz.x > sz.y ) + delta = VECTOR2I( ( sz.x - sz.y ) / 2, 0 ); else - delta = VECTOR2I(0, (sz.y - sz.x) / 2); + delta = VECTOR2I( 0, ( sz.y - sz.x ) / 2 ); - SHAPE_SEGMENT *shape = new SHAPE_SEGMENT( c - delta, c + delta, std::min(sz.x, sz.y) ); + SHAPE_SEGMENT* shape = new SHAPE_SEGMENT( c - delta, c + delta, + std::min( sz.x, sz.y ) ); solid->SetShape( shape ); } break; @@ -203,6 +205,7 @@ PNS_ITEM* PNS_ROUTER::syncPad( D_PAD* aPad ) default: TRACEn( 0, "unsupported pad shape" ); delete solid; + return NULL; } } @@ -250,7 +253,8 @@ int PNS_ROUTER::NextCopperLayer( bool aUp ) LAYER_MSK mask = m_board->GetEnabledLayers() & m_board->GetVisibleLayers(); LAYER_NUM l = m_currentLayer; - do { + do + { l += ( aUp ? 1 : -1 ); if( l > LAST_COPPER_LAYER ) @@ -261,7 +265,8 @@ int PNS_ROUTER::NextCopperLayer( bool aUp ) if( mask & GetLayerMask( l ) ) return l; - } while( l != m_currentLayer ); + } + while( l != m_currentLayer ); return l; } @@ -269,7 +274,6 @@ int PNS_ROUTER::NextCopperLayer( bool aUp ) void PNS_ROUTER::SyncWorld() { - if( !m_board ) { TRACEn( 0, "No board attached, aborting sync." ); @@ -379,13 +383,6 @@ void PNS_ROUTER::ClearWorld() } -/*void PNS_ROUTER::SetCurrentWidth( int w ) -{ - // fixme: change width while routing - m_currentWidth = w; -}*/ - - bool PNS_ROUTER::RoutingInProgress() const { return m_state != IDLE; @@ -405,49 +402,49 @@ const PNS_ITEMSET PNS_ROUTER::QueryHoverItems( const VECTOR2I& aP ) } -const VECTOR2I PNS_ROUTER::SnapToItem( PNS_ITEM* item, VECTOR2I aP, bool& aSplitsSegment ) +const VECTOR2I PNS_ROUTER::SnapToItem( PNS_ITEM* aItem, VECTOR2I aP, bool& aSplitsSegment ) { VECTOR2I anchor; - if( !item ) + if( !aItem ) { aSplitsSegment = false; return aP; } - switch( item->Kind() ) + switch( aItem->Kind() ) { case PNS_ITEM::SOLID: - anchor = static_cast(item)->Pos(); + anchor = static_cast( aItem )->Pos(); aSplitsSegment = false; break; case PNS_ITEM::VIA: - anchor = static_cast(item)->Pos(); + anchor = static_cast( aItem )->Pos(); aSplitsSegment = false; break; case PNS_ITEM::SEGMENT: + { + PNS_SEGMENT* seg = static_cast( aItem ); + const SEG& s = seg->Seg(); + int w = seg->Width(); + + aSplitsSegment = false; + + if( ( aP - s.A ).EuclideanNorm() < w / 2 ) + anchor = s.A; + else if( ( aP - s.B ).EuclideanNorm() < w / 2 ) + anchor = s.B; + else { - PNS_SEGMENT* seg = static_cast( item ); - const SEG& s = seg->Seg(); - int w = seg->Width(); - - aSplitsSegment = false; - - if( ( aP - s.A ).EuclideanNorm() < w / 2 ) - anchor = s.A; - else if( ( aP - s.B ).EuclideanNorm() < w / 2 ) - anchor = s.B; - else - { - anchor = s.NearestPoint( aP ); - aSplitsSegment = true; - } - - break; + anchor = s.NearestPoint( aP ); + aSplitsSegment = true; } + break; + } + default: break; } @@ -455,16 +452,19 @@ const VECTOR2I PNS_ROUTER::SnapToItem( PNS_ITEM* item, VECTOR2I aP, bool& aSplit return anchor; } + bool PNS_ROUTER::StartDragging( const VECTOR2I& aP, PNS_ITEM* aStartItem ) { - if(!aStartItem || aStartItem->OfKind(PNS_ITEM::SOLID)) + if( !aStartItem || aStartItem->OfKind( PNS_ITEM::SOLID ) ) return false; m_dragger = new PNS_DRAGGER ( this ); m_dragger->SetWorld( m_world ); + if( m_dragger->Start ( aP, aStartItem ) ) m_state = DRAG_SEGMENT; - else { + else + { delete m_dragger; m_state = IDLE; return false; @@ -476,8 +476,6 @@ bool PNS_ROUTER::StartDragging( const VECTOR2I& aP, PNS_ITEM* aStartItem ) bool PNS_ROUTER::StartRouting( const VECTOR2I& aP, PNS_ITEM* aStartItem ) { - - m_state = ROUTE_TRACK; m_placer = new PNS_LINE_PLACER( this ); @@ -518,11 +516,11 @@ void PNS_ROUTER::DisplayItem( const PNS_ITEM* aItem, int aColor, int aClearance { ROUTER_PREVIEW_ITEM* pitem = new ROUTER_PREVIEW_ITEM( aItem, m_previewItems ); - if(aColor >= 0) - pitem->SetColor ( KIGFX::COLOR4D ( aColor )); + if( aColor >= 0 ) + pitem->SetColor( KIGFX::COLOR4D ( aColor ) ); - if(aClearance >= 0) - pitem->SetClearance ( aClearance ); + if( aClearance >= 0 ) + pitem->SetClearance( aClearance ); m_previewItems->Add( pitem ); @@ -530,12 +528,14 @@ void PNS_ROUTER::DisplayItem( const PNS_ITEM* aItem, int aColor, int aClearance m_previewItems->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY | KIGFX::VIEW_ITEM::APPEARANCE ); } + void PNS_ROUTER::DisplayItems( const PNS_ITEMSET& aItems ) { - BOOST_FOREACH(const PNS_ITEM *item, aItems.CItems()) - DisplayItem(item); + BOOST_FOREACH( const PNS_ITEM *item, aItems.CItems() ) + DisplayItem( item ); } + void PNS_ROUTER::DisplayDebugLine( const SHAPE_LINE_CHAIN& aLine, int aType, int aWidth ) { ROUTER_PREVIEW_ITEM* pitem = new ROUTER_PREVIEW_ITEM( NULL, m_previewItems ); @@ -547,18 +547,17 @@ void PNS_ROUTER::DisplayDebugLine( const SHAPE_LINE_CHAIN& aLine, int aType, int } - -void PNS_ROUTER::DisplayDebugPoint( const VECTOR2I pos, int aType ) +void PNS_ROUTER::DisplayDebugPoint( const VECTOR2I aPos, int aType ) { ROUTER_PREVIEW_ITEM* pitem = new ROUTER_PREVIEW_ITEM( NULL, m_previewItems ); - pitem->Point( pos, aType ); + pitem->Point( aPos, aType ); m_previewItems->Add( pitem ); pitem->ViewSetVisible( true ); m_previewItems->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY | KIGFX::VIEW_ITEM::APPEARANCE ); - } + void PNS_ROUTER::Move( const VECTOR2I& aP, PNS_ITEM* endItem ) { m_currentEnd = aP; @@ -573,57 +572,62 @@ void PNS_ROUTER::Move( const VECTOR2I& aP, PNS_ITEM* endItem ) case DRAG_SEGMENT: moveDragging (aP, endItem ); break; + default: break; } } -void PNS_ROUTER::moveDragging( const VECTOR2I& aP, PNS_ITEM* endItem ) + +void PNS_ROUTER::moveDragging( const VECTOR2I& aP, PNS_ITEM* aEndItem ) { eraseView(); m_dragger->Drag( aP ); PNS_ITEMSET dragged = m_dragger->Traces(); - updateView ( m_dragger->CurrentNode ( ), dragged ); + updateView ( m_dragger->CurrentNode(), dragged ); } -void PNS_ROUTER::markViolations( PNS_NODE *aNode, PNS_ITEMSET& aCurrent, PNS_NODE::ItemVector& aRemoved ) + +void PNS_ROUTER::markViolations( PNS_NODE* aNode, PNS_ITEMSET& aCurrent, + PNS_NODE::ITEM_VECTOR& aRemoved ) { - - BOOST_FOREACH(PNS_ITEM *item, aCurrent.Items()) + BOOST_FOREACH( PNS_ITEM *item, aCurrent.Items() ) { - PNS_NODE::Obstacles obstacles; + PNS_NODE::OBSTACLES obstacles; aNode->QueryColliding( item, obstacles, PNS_ITEM::ANY ); - if ( item->OfKind(PNS_ITEM::LINE ) ) + if( item->OfKind( PNS_ITEM::LINE ) ) { - PNS_LINE *l = static_cast (item); - if (l->EndsWithVia()) + PNS_LINE *l = static_cast( item ); + + if( l->EndsWithVia() ) { PNS_VIA v ( l->Via() ); - aNode->QueryColliding(&v , obstacles, PNS_ITEM::ANY ); + aNode->QueryColliding( &v, obstacles, PNS_ITEM::ANY ); } } - BOOST_FOREACH(PNS_OBSTACLE& obs, obstacles) + BOOST_FOREACH( PNS_OBSTACLE& obs, obstacles ) { - int clearance = aNode->GetClearance( item, obs.item ); - std::auto_ptr tmp ( obs.item->Clone() ); - tmp->Mark ( MK_VIOLATION ); + int clearance = aNode->GetClearance( item, obs.m_item ); + std::auto_ptr tmp( obs.m_item->Clone() ); + tmp->Mark( MK_VIOLATION ); DisplayItem( tmp.get(), -1, clearance ); - aRemoved.push_back(obs.item); + aRemoved.push_back( obs.m_item ); } } } -void PNS_ROUTER::updateView( PNS_NODE *aNode, PNS_ITEMSET& aCurrent ) + +void PNS_ROUTER::updateView( PNS_NODE* aNode, PNS_ITEMSET& aCurrent ) { - PNS_NODE::ItemVector removed, added; - PNS_NODE::Obstacles obstacles; + PNS_NODE::ITEM_VECTOR removed, added; + PNS_NODE::OBSTACLES obstacles; - if(!aNode) + if( !aNode ) return; if( Settings().Mode() == RM_MarkObstacles ) @@ -661,15 +665,14 @@ void PNS_ROUTER::ApplySettings() m_placer->Move( m_currentEnd, m_currentEndItem ); movePlacing( m_currentEnd, m_currentEndItem ); } - - // TODO handle mode/optimization/other options change } -void PNS_ROUTER::movePlacing( const VECTOR2I& aP, PNS_ITEM* endItem ) + +void PNS_ROUTER::movePlacing( const VECTOR2I& aP, PNS_ITEM* aEndItem ) { eraseView(); - m_placer->Move( aP, endItem ); + m_placer->Move( aP, aEndItem ); PNS_LINE current = m_placer->Trace(); DisplayItem( ¤t ); @@ -681,9 +684,10 @@ void PNS_ROUTER::movePlacing( const VECTOR2I& aP, PNS_ITEM* endItem ) updateView ( m_placer->CurrentNode ( true ), tmp ); } + void PNS_ROUTER::CommitRouting( PNS_NODE* aNode ) { - PNS_NODE::ItemVector removed, added; + PNS_NODE::ITEM_VECTOR removed, added; aNode->GetUpdatedItems( removed, added ); @@ -706,31 +710,31 @@ void PNS_ROUTER::CommitRouting( PNS_NODE* aNode ) switch( item->Kind() ) { case PNS_ITEM::SEGMENT: - { - PNS_SEGMENT* seg = static_cast( item ); - TRACK* track = new TRACK( m_board ); - const SEG& s = seg->Seg(); + { + PNS_SEGMENT* seg = static_cast( item ); + TRACK* track = new TRACK( m_board ); + const SEG& s = seg->Seg(); - track->SetStart( wxPoint( s.A.x, s.A.y ) ); - track->SetEnd( wxPoint( s.B.x, s.B.y ) ); - track->SetWidth( seg->Width() ); - track->SetLayer( seg->Layers().Start() ); - track->SetNetCode( seg->Net() ); - newBI = track; - break; - } + track->SetStart( wxPoint( s.A.x, s.A.y ) ); + track->SetEnd( wxPoint( s.B.x, s.B.y ) ); + track->SetWidth( seg->Width() ); + track->SetLayer( seg->Layers().Start() ); + track->SetNetCode( seg->Net() ); + newBI = track; + break; + } case PNS_ITEM::VIA: - { - VIA* via_board = new VIA( m_board ); - PNS_VIA* via = static_cast( item ); - via_board->SetPosition( wxPoint( via->Pos().x, via->Pos().y ) ); - via_board->SetWidth( via->Diameter() ); - via_board->SetDrill( via->Drill() ); - via_board->SetNetCode( via->Net() ); - newBI = via_board; - break; - } + { + VIA* via_board = new VIA( m_board ); + PNS_VIA* via = static_cast( item ); + via_board->SetPosition( wxPoint( via->Pos().x, via->Pos().y ) ); + via_board->SetWidth( via->Diameter() ); + via_board->SetDrill( via->Drill() ); + via_board->SetNetCode( via->Net() ); + newBI = via_board; + break; + } default: break; @@ -770,34 +774,33 @@ PNS_VIA* PNS_ROUTER::checkLoneVia( PNS_JOINT* aJoint ) const return NULL; } + bool PNS_ROUTER::FixRoute( const VECTOR2I& aP, PNS_ITEM* aEndItem ) { bool rv = false; - switch(m_state) + switch( m_state ) { case ROUTE_TRACK: - rv = m_placer->FixRoute (aP, aEndItem); + rv = m_placer->FixRoute( aP, aEndItem ); m_placingVia = false; - break; + case DRAG_SEGMENT: - rv = m_dragger->FixRoute (); + rv = m_dragger->FixRoute(); break; default: break; } - - if(rv) + if( rv ) StopRouting(); return rv; } - void PNS_ROUTER::StopRouting() { // Update the ratsnest with new changes @@ -806,10 +809,10 @@ void PNS_ROUTER::StopRouting() if( !RoutingInProgress() ) return; - if(m_placer) + if( m_placer ) delete m_placer; - if(m_dragger) + if( m_dragger ) delete m_dragger; m_placer = NULL; @@ -825,7 +828,7 @@ void PNS_ROUTER::StopRouting() void PNS_ROUTER::FlipPosture() { - if(m_state == ROUTE_TRACK) + if( m_state == ROUTE_TRACK ) { m_placer->FlipPosture(); m_placer->Move ( m_currentEnd, m_currentEndItem ); @@ -833,22 +836,23 @@ void PNS_ROUTER::FlipPosture() } -void PNS_ROUTER::SwitchLayer( int layer ) +void PNS_ROUTER::SwitchLayer( int aLayer ) { switch( m_state ) { case IDLE: - m_currentLayer = layer; + m_currentLayer = aLayer; break; case ROUTE_TRACK: - if( m_startsOnVia ) - { - m_currentLayer = layer; - //m_placer->StartPlacement( m_currentStart, m_currentNet, m_currentWidth, - // m_currentLayer ); - } - break; + if( m_startsOnVia ) + { + m_currentLayer = aLayer; + //m_placer->StartPlacement( m_currentStart, m_currentNet, m_currentWidth, + // m_currentLayer ); + } + break; + default: break; } @@ -864,32 +868,38 @@ void PNS_ROUTER::ToggleViaPlacement() } } + int PNS_ROUTER::GetCurrentNet() const { - switch(m_state) + switch( m_state ) { case ROUTE_TRACK: return m_placer->CurrentNet(); + default: return m_currentNet; } } + int PNS_ROUTER::GetCurrentLayer() const { - switch(m_state) + switch( m_state ) { case ROUTE_TRACK: return m_placer->CurrentLayer(); + default: return m_currentLayer; } } - + + void PNS_ROUTER::DumpLog() { - PNS_LOGGER *logger = NULL; - switch(m_state) + PNS_LOGGER* logger = NULL; + + switch( m_state ) { case DRAG_SEGMENT: logger = m_dragger->Logger(); @@ -899,6 +909,6 @@ void PNS_ROUTER::DumpLog() break; } - if(logger) + if( logger ) logger->Save ( "/tmp/shove.log" ); } diff --git a/pcbnew/router/pns_router.h b/pcbnew/router/pns_router.h index 9c867c585d..b5fc2a6daa 100644 --- a/pcbnew/router/pns_router.h +++ b/pcbnew/router/pns_router.h @@ -51,9 +51,10 @@ class PNS_CLEARANCE_FUNC; class PNS_SHOVE; class PNS_DRAGGER; -namespace KIGFX { -class VIEW; -class VIEW_GROUP; +namespace KIGFX +{ + class VIEW; + class VIEW_GROUP; }; @@ -62,7 +63,6 @@ class VIEW_GROUP; * * Main router class. */ - class PNS_ROUTER { private: @@ -94,7 +94,7 @@ public: const VECTOR2I CurrentEnd() const; - int GetClearance( const PNS_ITEM* a, const PNS_ITEM* b ) const; + int GetClearance( const PNS_ITEM* aA, const PNS_ITEM* aB ) const; PNS_NODE* GetWorld() const { @@ -114,8 +114,8 @@ public: void ToggleViaPlacement(); - int GetCurrentLayer() const;// { return m_currentLayer; } - int GetCurrentNet() const;// { return m_currentNet; } + int GetCurrentLayer() const; + int GetCurrentNet() const; void DumpLog(); @@ -134,14 +134,19 @@ public: // typedef boost::optional optHoverItem; const PNS_ITEMSET QueryHoverItems( const VECTOR2I& aP ); - const VECTOR2I SnapToItem( PNS_ITEM* item, VECTOR2I aP, bool& aSplitsSegment ); + const VECTOR2I SnapToItem( PNS_ITEM* aItem, VECTOR2I aP, bool& aSplitsSegment ); bool StartDragging( const VECTOR2I& aP, PNS_ITEM* aItem ); void SetIterLimit( int aX ) { m_iterLimit = aX; } int GetIterLimit() const { return m_iterLimit; }; - void SetShowIntermediateSteps(bool aX, int aSnapshotIter = -1 ) { m_showInterSteps = aX; m_snapshotIter = aSnapshotIter; } + void SetShowIntermediateSteps( bool aX, int aSnapshotIter = -1 ) + { + m_showInterSteps = aX; + m_snapshotIter = aSnapshotIter; + } + bool GetShowIntermediateSteps() const { return m_showInterSteps; } int GetShapshotIter() const { return m_snapshotIter; } @@ -168,7 +173,7 @@ public: /** * Applies stored settings. - * \see Settings() + * @see Settings() */ void ApplySettings(); @@ -183,30 +188,29 @@ public: ApplySettings(); } - void EnableSnapping ( bool aEnable ) + void EnableSnapping( bool aEnable ) { m_snappingEnabled = aEnable; } - bool SnappingEnabled () const + bool SnappingEnabled() const { return m_snappingEnabled; } - private: - void movePlacing ( const VECTOR2I& aP, PNS_ITEM* aItem ); - void moveDragging ( const VECTOR2I& aP, PNS_ITEM* aItem ); + void movePlacing( const VECTOR2I& aP, PNS_ITEM* aItem ); + void moveDragging( const VECTOR2I& aP, PNS_ITEM* aItem ); void eraseView(); - void updateView( PNS_NODE *aNode, PNS_ITEMSET &aCurrent ); //PNS_LINE *aCurrent = NULL ); + void updateView( PNS_NODE* aNode, PNS_ITEMSET& aCurrent ); void clearViewFlags(); // optHoverItem queryHoverItemEx(const VECTOR2I& aP); - PNS_ITEM* pickSingleItem( PNS_ITEMSET& aItems ) const; // std::vector aItems) const; - void splitAdjacentSegments( PNS_NODE* aNode, PNS_ITEM* aSeg, const VECTOR2I& aP ); // optHoverItem& aItem); + PNS_ITEM* pickSingleItem( PNS_ITEMSET& aItems ) const; + void splitAdjacentSegments( PNS_NODE* aNode, PNS_ITEM* aSeg, const VECTOR2I& aP ); PNS_VIA* checkLoneVia( PNS_JOINT* aJoint ) const; PNS_ITEM* syncPad( D_PAD* aPad ); @@ -219,7 +223,7 @@ private: void highlightCurrent( bool enabled ); - void markViolations( PNS_NODE *aNode, PNS_ITEMSET& aCurrent, PNS_NODE::ItemVector& aRemoved ); + void markViolations( PNS_NODE *aNode, PNS_ITEMSET& aCurrent, PNS_NODE::ITEM_VECTOR& aRemoved ); int m_currentLayer; int m_currentNet; @@ -241,8 +245,7 @@ private: KIGFX::VIEW* m_view; KIGFX::VIEW_GROUP* m_previewItems; - - PNS_ITEM *m_currentEndItem; + PNS_ITEM* m_currentEndItem; VECTOR2I m_currentEnd; VECTOR2I m_currentStart; @@ -252,7 +255,7 @@ private: bool m_snappingEnabled; bool m_violation; -// optHoverItem m_startItem, m_endItem; + // optHoverItem m_startItem, m_endItem; PNS_ROUTING_SETTINGS m_settings; PNS_CLEARANCE_FUNC* m_clearanceFunc; diff --git a/pcbnew/router/pns_routing_settings.cpp b/pcbnew/router/pns_routing_settings.cpp index cddc110311..cf87359674 100644 --- a/pcbnew/router/pns_routing_settings.cpp +++ b/pcbnew/router/pns_routing_settings.cpp @@ -23,7 +23,7 @@ PNS_ROUTING_SETTINGS::PNS_ROUTING_SETTINGS() { m_routingMode = RM_Walkaround; - m_optimizerEffort = OE_Full; + m_optimizerEffort = OE_FULL; m_removeLoops = true; m_smartPads = true; m_shoveVias = true; @@ -38,11 +38,13 @@ PNS_ROUTING_SETTINGS::PNS_ROUTING_SETTINGS() m_canViolateDRC = false; } + TIME_LIMIT PNS_ROUTING_SETTINGS::ShoveTimeLimit() const { return TIME_LIMIT ( m_shoveTimeLimit ); } + int PNS_ROUTING_SETTINGS::ShoveIterationLimit() const { return m_shoveIterationLimit; diff --git a/pcbnew/router/pns_routing_settings.h b/pcbnew/router/pns_routing_settings.h index 02eab2a352..5f6de3fa92 100644 --- a/pcbnew/router/pns_routing_settings.h +++ b/pcbnew/router/pns_routing_settings.h @@ -36,9 +36,9 @@ enum PNS_MODE ///> Optimization effort enum PNS_OPTIMIZATION_EFFORT { - OE_Low = 0, - OE_Medium = 1, - OE_Full = 2 + OE_LOW = 0, + OE_MEDIUM = 1, + OE_FULL = 2 }; /** @@ -91,7 +91,7 @@ public: ///> Returns true if follow mouse mode is active (permanently on for the moment). bool FollowMouse() const { - return m_followMouse && !(Mode() == RM_MarkObstacles); + return m_followMouse && !( Mode() == RM_MarkObstacles ); } ///> Returns true if smoothing segments durign dragging is enabled. @@ -120,10 +120,10 @@ public: const DIRECTION_45 InitialDirection() const { - if(m_startDiagonal) - return DIRECTION_45 (DIRECTION_45::NE); + if( m_startDiagonal ) + return DIRECTION_45( DIRECTION_45::NE ); else - return DIRECTION_45 (DIRECTION_45::N); + return DIRECTION_45( DIRECTION_45::N ); } int ShoveIterationLimit() const; @@ -133,7 +133,6 @@ public: TIME_LIMIT WalkaroundTimeLimit() const; private: - bool m_shoveVias; bool m_startDiagonal; bool m_removeLoops; diff --git a/pcbnew/router/pns_segment.h b/pcbnew/router/pns_segment.h index 0ebc4bc767..2550526c2e 100644 --- a/pcbnew/router/pns_segment.h +++ b/pcbnew/router/pns_segment.h @@ -37,17 +37,17 @@ class PNS_SEGMENT : public PNS_ITEM public: PNS_SEGMENT() : PNS_ITEM( SEGMENT ) - {}; + {} PNS_SEGMENT( const SEG& aSeg, int aNet ) : - PNS_ITEM( SEGMENT ), m_seg(aSeg, 0) + PNS_ITEM( SEGMENT ), m_seg( aSeg, 0 ) { m_net = aNet; - }; + } PNS_SEGMENT( const PNS_LINE& aParentLine, const SEG& aSeg ) : PNS_ITEM( SEGMENT ), - m_seg(aSeg, aParentLine.Width()) + m_seg( aSeg, aParentLine.Width() ) { m_net = aParentLine.Net(); m_layers = aParentLine.Layers(); @@ -55,7 +55,6 @@ public: m_rank = aParentLine.Rank(); }; - PNS_SEGMENT* Clone( ) const; const SHAPE* Shape() const @@ -101,14 +100,14 @@ public: void SwapEnds() { SEG tmp = m_seg.GetSeg(); - m_seg.SetSeg( SEG (tmp.B , tmp.A )); + m_seg.SetSeg( SEG (tmp.B , tmp.A ) ); } const SHAPE_LINE_CHAIN Hull( int aClearance, int aWalkaroundThickness ) const; virtual VECTOR2I Anchor(int n) const { - if(n == 0) + if( n == 0 ) return m_seg.GetSeg().A; else return m_seg.GetSeg().B; diff --git a/pcbnew/router/pns_shove.cpp b/pcbnew/router/pns_shove.cpp index 491f3327f3..8b46a503db 100644 --- a/pcbnew/router/pns_shove.cpp +++ b/pcbnew/router/pns_shove.cpp @@ -41,63 +41,70 @@ #include -static void sanityCheck (PNS_LINE *l_old, PNS_LINE *l_new) +static void sanityCheck( PNS_LINE *aOld, PNS_LINE *aNew ) { - assert (l_old->CPoint(0) == l_new->CPoint(0) ); - assert (l_old->CPoint(-1) == l_new->CPoint(-1 )); + assert( aOld->CPoint( 0 ) == aNew->CPoint( 0 ) ); + assert( aOld->CPoint( -1 ) == aNew->CPoint( -1 ) ); } -PNS_SHOVE::PNS_SHOVE( PNS_NODE* aWorld, PNS_ROUTER *aRouter ) : + +PNS_SHOVE::PNS_SHOVE( PNS_NODE* aWorld, PNS_ROUTER* aRouter ) : PNS_ALGO_BASE ( aRouter ) { m_root = aWorld; -}; +} PNS_SHOVE::~PNS_SHOVE() { -// free all the stuff we've created during routing/dragging operation. - BOOST_FOREACH(PNS_ITEM *item, m_gcItems) + // free all the stuff we've created during routing/dragging operation. + BOOST_FOREACH( PNS_ITEM *item, m_gcItems ) delete item; } + // garbage-collected line assembling -PNS_LINE* PNS_SHOVE::assembleLine ( const PNS_SEGMENT *aSeg, int *aIndex ) +PNS_LINE* PNS_SHOVE::assembleLine( const PNS_SEGMENT *aSeg, int *aIndex ) { - PNS_LINE *l = m_currentNode->AssembleLine( const_cast (aSeg), aIndex); + PNS_LINE* l = m_currentNode->AssembleLine( const_cast( aSeg ), aIndex ); m_gcItems.push_back(l); + return l; } + // garbage-collected line cloning PNS_LINE *PNS_SHOVE::cloneLine ( const PNS_LINE *aLine ) { PNS_LINE *l = aLine->Clone(); - m_gcItems.push_back(l); + m_gcItems.push_back( l ); return l; } + // A dumb function that checks if the shoved line is shoved the right way, e.g. // visually "outwards" of the line/via applying pressure on it. Unfortunately there's no // mathematical concept of orientation of an open curve, so we use some primitive heuristics: // if the shoved line wraps around the start of the "pusher", it's likely shoved in wrong direction. -bool PNS_SHOVE::checkBumpDirection ( PNS_LINE *aCurrent, PNS_LINE *aShoved ) const +bool PNS_SHOVE::checkBumpDirection( PNS_LINE *aCurrent, PNS_LINE *aShoved ) const { - const SEG ss = aCurrent->CSegment(0); + const SEG ss = aCurrent->CSegment( 0 ); - int dist = m_currentNode->GetClearance(aCurrent, aShoved) + PNS_HULL_MARGIN; + int dist = m_currentNode->GetClearance( aCurrent, aShoved ) + PNS_HULL_MARGIN; dist += aCurrent->Width() / 2; dist += aShoved->Width() / 2; - const VECTOR2I ps = ss.A - (ss.B - ss.A).Resize(dist); + const VECTOR2I ps = ss.A - ( ss.B - ss.A ).Resize( dist ); - return !aShoved->CLine().PointOnEdge(ps); + return !aShoved->CLine().PointOnEdge( ps ); } -PNS_SHOVE::ShoveStatus PNS_SHOVE::walkaroundLoneVia ( PNS_LINE *aCurrent, PNS_LINE *aObstacle, PNS_LINE *aShoved ) + +PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::walkaroundLoneVia( PNS_LINE* aCurrent, PNS_LINE* aObstacle, + PNS_LINE* aShoved ) { int clearance = m_currentNode->GetClearance( aCurrent, aObstacle ); const SHAPE_LINE_CHAIN hull = aCurrent->Via().Hull( clearance, aObstacle->Width() ); @@ -108,13 +115,15 @@ PNS_SHOVE::ShoveStatus PNS_SHOVE::walkaroundLoneVia ( PNS_LINE *aCurrent, PNS_LI const SHAPE_LINE_CHAIN& shortest = path_ccw.Length() < path_cw.Length() ? path_ccw : path_cw; - if(shortest.PointCount() < 2) + if( shortest.PointCount() < 2 ) return SH_INCOMPLETE; - if(aObstacle->CPoint(-1) != shortest.CPoint(-1)) + + if( aObstacle->CPoint( -1 ) != shortest.CPoint( -1 ) ) return SH_INCOMPLETE; - if(aObstacle->CPoint(0) != shortest.CPoint(0)) + + if( aObstacle->CPoint( 0 ) != shortest.CPoint( 0 ) ) return SH_INCOMPLETE; - + aShoved->SetShape( shortest ); if( m_currentNode->CheckColliding( aShoved, aCurrent ) ) @@ -123,33 +132,35 @@ PNS_SHOVE::ShoveStatus PNS_SHOVE::walkaroundLoneVia ( PNS_LINE *aCurrent, PNS_LI return SH_OK; } -PNS_SHOVE::ShoveStatus PNS_SHOVE::processHullSet ( PNS_LINE *aCurrent, PNS_LINE *aObstacle, PNS_LINE *aShoved, const HullSet& hulls ) + +PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::processHullSet( PNS_LINE* aCurrent, PNS_LINE* aObstacle, + PNS_LINE* aShoved, const HULL_SET& aHulls ) { const SHAPE_LINE_CHAIN& obs = aObstacle->CLine(); bool failingDirCheck = false; int attempt; - for(attempt = 0; attempt < 4; attempt++) + for( attempt = 0; attempt < 4; attempt++ ) { - bool invertTraversal = (attempt >= 2); + bool invertTraversal = ( attempt >= 2 ); bool clockwise = attempt % 2; int vFirst = -1, vLast = -1; SHAPE_LINE_CHAIN path; - PNS_LINE l ( *aObstacle ); + PNS_LINE l( *aObstacle ); - for(int i = 0; i < (int)hulls.size(); i++ ) + for( int i = 0; i < (int) aHulls.size(); i++ ) { - const SHAPE_LINE_CHAIN& hull = hulls[invertTraversal ? hulls.size() - 1 - i : i]; + const SHAPE_LINE_CHAIN& hull = aHulls[invertTraversal ? aHulls.size() - 1 - i : i]; l.Walkaround( hull, path, clockwise ); path.Simplify(); l.SetShape( path ); } - for(int i = 0; i < std::min ( path.PointCount(), obs.PointCount() ); i++) + for( int i = 0; i < std::min ( path.PointCount(), obs.PointCount() ); i++ ) { - if(path.CPoint(i) != obs.CPoint(i)) + if( path.CPoint( i ) != obs.CPoint( i ) ) { vFirst = i; break; @@ -157,36 +168,37 @@ PNS_SHOVE::ShoveStatus PNS_SHOVE::processHullSet ( PNS_LINE *aCurrent, PNS_LINE } int k = obs.PointCount() - 1; - for(int i = path.PointCount() - 1; i >= 0 && k >= 0; i--, k--) + for( int i = path.PointCount() - 1; i >= 0 && k >= 0; i--, k-- ) { - if(path.CPoint(i) != obs.CPoint(k)) + if( path.CPoint( i ) != obs.CPoint( k ) ) { vLast = i; break; } } - if( ( vFirst < 0 || vLast < 0) && !path.CompareGeometry( aObstacle->CLine() )) + if( ( vFirst < 0 || vLast < 0 ) && !path.CompareGeometry( aObstacle->CLine() ) ) { TRACE( 100, "attempt %d fail vfirst-last", attempt ); continue; } - if(path.CPoint(-1) != obs.CPoint(-1) || path.CPoint(0) != obs.CPoint(0)) + if( path.CPoint( -1 ) != obs.CPoint( -1 ) || path.CPoint( 0 ) != obs.CPoint( 0 ) ) { - TRACE(100, "attempt %d fail vend-start\n", attempt); + TRACE( 100, "attempt %d fail vend-start\n", attempt ); continue; } - if(!checkBumpDirection(aCurrent, &l)) + if( !checkBumpDirection( aCurrent, &l ) ) { TRACE( 100, "attempt %d fail direction-check", attempt ); failingDirCheck = true; - aShoved->SetShape(l.CLine()); + aShoved->SetShape( l.CLine() ); + continue; } - if(path.SelfIntersecting()) + if( path.SelfIntersecting() ) { TRACE( 100, "attempt %d fail self-intersect", attempt ); continue; @@ -194,13 +206,13 @@ PNS_SHOVE::ShoveStatus PNS_SHOVE::processHullSet ( PNS_LINE *aCurrent, PNS_LINE bool colliding = m_currentNode->CheckColliding( &l, aCurrent ); - if( (aCurrent->Marker() & MK_HEAD) && !colliding) + if( ( aCurrent->Marker() & MK_HEAD ) && !colliding ) { - PNS_JOINT *jtStart = m_currentNode->FindJoint ( aCurrent->CPoint(0), aCurrent ); + PNS_JOINT* jtStart = m_currentNode->FindJoint( aCurrent->CPoint( 0 ), aCurrent ); - BOOST_FOREACH( PNS_ITEM *item, jtStart->LinkList() ) + BOOST_FOREACH( PNS_ITEM* item, jtStart->LinkList() ) { - if(m_currentNode->CheckColliding(item, &l)) + if( m_currentNode->CheckColliding( item, &l ) ) colliding = true; } } @@ -219,7 +231,9 @@ PNS_SHOVE::ShoveStatus PNS_SHOVE::processHullSet ( PNS_LINE *aCurrent, PNS_LINE return failingDirCheck ? SH_OK : SH_INCOMPLETE; } -PNS_SHOVE::ShoveStatus PNS_SHOVE::processSingleLine ( PNS_LINE *aCurrent, PNS_LINE *aObstacle, PNS_LINE *aShoved ) + +PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::processSingleLine( PNS_LINE* aCurrent, PNS_LINE* aObstacle, + PNS_LINE* aShoved ) { aShoved->ClearSegmentLinks(); @@ -227,73 +241,75 @@ PNS_SHOVE::ShoveStatus PNS_SHOVE::processSingleLine ( PNS_LINE *aCurrent, PNS_LI if( aObstacle->LinkedSegments() ) { - BOOST_FOREACH( PNS_SEGMENT *s, *aObstacle->LinkedSegments() ) - if(s->Marker() & MK_HEAD) + BOOST_FOREACH( PNS_SEGMENT* s, *aObstacle->LinkedSegments() ) + + if( s->Marker() & MK_HEAD ) { obstacleIsHead = true; break; } } - ShoveStatus rv; + SHOVE_STATUS rv; bool viaOnEnd = aCurrent->EndsWithVia(); if( viaOnEnd && ( !aCurrent->LayersOverlap( aObstacle ) || aCurrent->SegmentCount() == 0 ) ) { rv = walkaroundLoneVia( aCurrent, aObstacle, aShoved ); - } else { + } + else + { int w = aObstacle->Width(); int n_segs = aCurrent->SegmentCount(); int clearance = m_currentNode->GetClearance( aCurrent, aObstacle ); - HullSet hulls; + HULL_SET hulls; hulls.reserve( n_segs + 1 ); for( int i = 0; i < n_segs; i++ ) { - PNS_SEGMENT seg ( *aCurrent, aCurrent->CSegment(i) ); - hulls.push_back ( seg.Hull( clearance, w ) ); + PNS_SEGMENT seg( *aCurrent, aCurrent->CSegment( i ) ); + hulls.push_back( seg.Hull( clearance, w ) ); } if( viaOnEnd ) hulls.push_back ( aCurrent->Via().Hull( clearance, w ) ); - rv = processHullSet ( aCurrent, aObstacle, aShoved, hulls); + rv = processHullSet ( aCurrent, aObstacle, aShoved, hulls ); } - if(obstacleIsHead) + if( obstacleIsHead ) aShoved->Mark( aShoved->Marker() | MK_HEAD ); return rv; } -PNS_SHOVE::ShoveStatus PNS_SHOVE::onCollidingSegment( PNS_LINE *aCurrent, PNS_SEGMENT *aObstacleSeg ) +PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::onCollidingSegment( PNS_LINE* aCurrent, PNS_SEGMENT* aObstacleSeg ) { int segIndex; - PNS_LINE *obstacleLine = assembleLine (aObstacleSeg, &segIndex); - PNS_LINE *shovedLine = cloneLine ( obstacleLine ); + PNS_LINE* obstacleLine = assembleLine( aObstacleSeg, &segIndex ); + PNS_LINE* shovedLine = cloneLine( obstacleLine ); - ShoveStatus rv = processSingleLine ( aCurrent, obstacleLine, shovedLine ); - - assert ( obstacleLine->LayersOverlap (shovedLine) ); + SHOVE_STATUS rv = processSingleLine( aCurrent, obstacleLine, shovedLine ); + assert ( obstacleLine->LayersOverlap( shovedLine ) ); - if(rv == SH_OK) + if( rv == SH_OK ) { if ( shovedLine->Marker() & MK_HEAD ) m_newHead = *shovedLine; - sanityCheck(obstacleLine, shovedLine); - m_currentNode->Replace (obstacleLine, shovedLine); - sanityCheck(obstacleLine, shovedLine); + sanityCheck( obstacleLine, shovedLine ); + m_currentNode->Replace( obstacleLine, shovedLine ); + sanityCheck( obstacleLine, shovedLine ); int rank = aCurrent->Rank(); - shovedLine->SetRank ( rank - 1 ); + shovedLine->SetRank( rank - 1 ); - pushLine(shovedLine); + pushLine( shovedLine ); } #ifdef DEBUG @@ -307,64 +323,64 @@ PNS_SHOVE::ShoveStatus PNS_SHOVE::onCollidingSegment( PNS_LINE *aCurrent, PNS_SE return rv; } -PNS_SHOVE::ShoveStatus PNS_SHOVE::onCollidingLine( PNS_LINE *aCurrent, PNS_LINE *aObstacle ) + +PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::onCollidingLine( PNS_LINE *aCurrent, PNS_LINE *aObstacle ) { - PNS_LINE *shovedLine = cloneLine(aObstacle); + PNS_LINE* shovedLine = cloneLine( aObstacle ); - ShoveStatus rv = processSingleLine ( aCurrent, aObstacle, shovedLine ); + SHOVE_STATUS rv = processSingleLine( aCurrent, aObstacle, shovedLine ); - if(rv == SH_OK) + if( rv == SH_OK ) { if ( shovedLine->Marker() & MK_HEAD ) m_newHead = *shovedLine; - sanityCheck(aObstacle,shovedLine); + sanityCheck( aObstacle, shovedLine ); m_currentNode->Replace( aObstacle, shovedLine ); - sanityCheck(aObstacle,shovedLine); + sanityCheck( aObstacle, shovedLine ); int rank = aObstacle->Rank(); shovedLine->SetRank ( rank ); - pushLine(shovedLine); + pushLine( shovedLine ); #ifdef DEBUG - m_logger.NewGroup ("on-colliding-line", m_iter); - m_logger.Log ( aObstacle, 0, "obstacle-line"); - m_logger.Log ( aCurrent, 1, "current-line"); - m_logger.Log ( shovedLine, 3, "shoved-line"); + m_logger.NewGroup( "on-colliding-line", m_iter ); + m_logger.Log( aObstacle, 0, "obstacle-line" ); + m_logger.Log( aCurrent, 1, "current-line" ); + m_logger.Log( shovedLine, 3, "shoved-line" ); #endif - - } - return rv; } -PNS_SHOVE::ShoveStatus PNS_SHOVE::onCollidingSolid( PNS_LINE *aCurrent, PNS_SOLID *aObstacleSolid ) + +PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::onCollidingSolid( PNS_LINE* aCurrent, PNS_SOLID* aObstacleSolid ) { PNS_WALKAROUND walkaround( m_currentNode, Router() ); - PNS_LINE* walkaroundLine = cloneLine(aCurrent); + PNS_LINE* walkaroundLine = cloneLine( aCurrent ); - - if(aCurrent->EndsWithVia()) + if( aCurrent->EndsWithVia() ) { PNS_VIA vh = aCurrent->Via(); - PNS_VIA *via = NULL; - PNS_JOINT *jtStart = m_currentNode->FindJoint ( vh.Pos(), aCurrent ); + PNS_VIA* via = NULL; + PNS_JOINT* jtStart = m_currentNode->FindJoint ( vh.Pos(), aCurrent ); - if(!jtStart) + if( !jtStart ) return SH_INCOMPLETE; - BOOST_FOREACH( PNS_ITEM *item, jtStart->LinkList() ) - if(item->OfKind(PNS_ITEM::VIA)) - { - via = (PNS_VIA *) item; - break; - } + BOOST_FOREACH( PNS_ITEM* item, jtStart->LinkList() ) + { + if( item->OfKind( PNS_ITEM::VIA ) ) + { + via = (PNS_VIA*) item; + break; + } + } - if( via && m_currentNode->CheckColliding(via, aObstacleSolid) ) - return onCollidingVia ( aObstacleSolid, via ); + if( via && m_currentNode->CheckColliding( via, aObstacleSolid ) ) + return onCollidingVia( aObstacleSolid, via ); } walkaround.SetSolidsOnly( true ); @@ -373,45 +389,45 @@ PNS_SHOVE::ShoveStatus PNS_SHOVE::onCollidingSolid( PNS_LINE *aCurrent, PNS_SOLI int currentRank = aCurrent->Rank(); int nextRank; - if (!Settings().JumpOverObstacles() ) + if( !Settings().JumpOverObstacles() ) { nextRank = currentRank + 10000; walkaround.SetSingleDirection( false ); - } else { + } + else + { nextRank = currentRank - 1; walkaround.SetSingleDirection( true ); } - - if (walkaround.Route( *aCurrent, *walkaroundLine, false ) != PNS_WALKAROUND::DONE ) + if( walkaround.Route( *aCurrent, *walkaroundLine, false ) != PNS_WALKAROUND::DONE ) return SH_INCOMPLETE; walkaroundLine->ClearSegmentLinks(); walkaroundLine->Unmark(); walkaroundLine->Line().Simplify(); - if(walkaroundLine->HasLoops()) + if( walkaroundLine->HasLoops() ) return SH_INCOMPLETE; - if (aCurrent->Marker() & MK_HEAD) + if( aCurrent->Marker() & MK_HEAD ) { - walkaroundLine->Mark(MK_HEAD); + walkaroundLine->Mark( MK_HEAD ); m_newHead = *walkaroundLine; } - m_currentNode->Replace( aCurrent, walkaroundLine ); walkaroundLine->SetRank ( nextRank ); #ifdef DEBUG - m_logger.NewGroup ("on-colliding-solid", m_iter); - m_logger.Log ( aObstacleSolid, 0, "obstacle-solid"); - m_logger.Log ( aCurrent, 1, "current-line"); - m_logger.Log ( walkaroundLine, 3, "walk-line"); + m_logger.NewGroup( "on-colliding-solid", m_iter ); + m_logger.Log( aObstacleSolid, 0, "obstacle-solid" ); + m_logger.Log( aCurrent, 1, "current-line" ); + m_logger.Log( walkaroundLine, 3, "walk-line" ); #endif popLine(); - pushLine(walkaroundLine); + pushLine( walkaroundLine ); return SH_OK; } @@ -423,13 +439,13 @@ bool PNS_SHOVE::reduceSpringback( const PNS_ITEMSET& aHeadSet ) while( !m_nodeStack.empty() ) { - SpringbackTag spTag = m_nodeStack.back(); + SPRINGBACK_TAG spTag = m_nodeStack.back(); - if( !spTag.node->CheckColliding( aHeadSet ) ) + if( !spTag.m_node->CheckColliding( aHeadSet ) ) { rv = true; - delete spTag.node; + delete spTag.m_node; m_nodeStack.pop_back(); } else @@ -440,98 +456,99 @@ bool PNS_SHOVE::reduceSpringback( const PNS_ITEMSET& aHeadSet ) } - -bool PNS_SHOVE::pushSpringback( PNS_NODE* aNode, const PNS_ITEMSET& aHeadItems, const PNS_COST_ESTIMATOR& aCost ) +bool PNS_SHOVE::pushSpringback( PNS_NODE* aNode, const PNS_ITEMSET& aHeadItems, + const PNS_COST_ESTIMATOR& aCost ) { - SpringbackTag st; + SPRINGBACK_TAG st; - st.node = aNode; - st.cost = aCost; - st.headItems = aHeadItems; + st.m_node = aNode; + st.m_cost = aCost; + st.m_headItems = aHeadItems; m_nodeStack.push_back( st ); + return true; } -PNS_SHOVE::ShoveStatus PNS_SHOVE::pushVia ( PNS_VIA *aVia, const VECTOR2I& aForce, int aCurrentRank ) +PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::pushVia( PNS_VIA* aVia, const VECTOR2I& aForce, int aCurrentRank ) { - - LinePairVec draggedLines; + LINE_PAIR_VEC draggedLines; VECTOR2I p0 ( aVia->Pos() ); - PNS_JOINT *jt = m_currentNode->FindJoint( p0, 1, aVia->Net() ); - PNS_VIA *pushedVia = aVia -> Clone(); + PNS_JOINT* jt = m_currentNode->FindJoint( p0, 1, aVia->Net() ); + PNS_VIA* pushedVia = aVia -> Clone(); pushedVia->SetPos( p0 + aForce ); - pushedVia->Mark( aVia->Marker() ) ; + pushedVia->Mark( aVia->Marker() ); - if(aVia->Marker() & MK_HEAD) + if( aVia->Marker() & MK_HEAD ) { m_draggedVia = pushedVia; } - if(!jt) + if( !jt ) { - TRACEn(1, "weird, can't find the center-of-via joint\n"); + TRACEn( 1, "weird, can't find the center-of-via joint\n" ); return SH_INCOMPLETE; } - BOOST_FOREACH(PNS_ITEM *item, jt->LinkList() ) + BOOST_FOREACH( PNS_ITEM* item, jt->LinkList() ) { - if(item->OfKind( PNS_ITEM::SEGMENT )) + if( item->OfKind( PNS_ITEM::SEGMENT ) ) { - PNS_SEGMENT *seg = (PNS_SEGMENT *) item; - LinePair lp; + PNS_SEGMENT* seg = (PNS_SEGMENT*) item; + LINE_PAIR lp; int segIndex; - lp.first = assembleLine(seg, &segIndex); + lp.first = assembleLine( seg, &segIndex ); - assert(segIndex == 0 || (segIndex == (lp.first->SegmentCount() - 1) )); + assert( segIndex == 0 || ( segIndex == ( lp.first->SegmentCount() - 1 ) ) ); - if(segIndex == 0) + if( segIndex == 0 ) lp.first->Reverse(); lp.second = cloneLine( lp.first ); lp.second->ClearSegmentLinks(); - lp.second->DragCorner( p0 + aForce, lp.second->CLine().Find( p0 )); + lp.second->DragCorner( p0 + aForce, lp.second->CLine().Find( p0 ) ); lp.second->AppendVia ( *pushedVia ); - draggedLines.push_back(lp); + draggedLines.push_back( lp ); } } m_currentNode->Remove( aVia ); m_currentNode->Add ( pushedVia ); - if(aVia->BelongsTo(m_currentNode)) + if( aVia->BelongsTo( m_currentNode ) ) delete aVia; - pushedVia -> SetRank (aCurrentRank - 1); + pushedVia->SetRank( aCurrentRank - 1 ); #ifdef DEBUG m_logger.Log ( aVia, 0, "obstacle-via"); m_logger.Log ( pushedVia, 1, "pushed-via"); #endif - BOOST_FOREACH( LinePair lp, draggedLines ) + BOOST_FOREACH( LINE_PAIR lp, draggedLines ) { - if(lp.first->Marker() & MK_HEAD) + if( lp.first->Marker() & MK_HEAD ) { - lp.second->Mark ( MK_HEAD ); + lp.second->Mark( MK_HEAD ); m_newHead = *lp.second; } unwindStack(lp.first); - if(lp.second->SegmentCount()) + if( lp.second->SegmentCount() ) { - m_currentNode->Replace ( lp.first, lp.second ); - lp.second->SetRank( aCurrentRank - 1); - pushLine(lp.second); - } else - m_currentNode->Remove(lp.first); + m_currentNode->Replace( lp.first, lp.second ); + lp.second->SetRank( aCurrentRank - 1 ); + pushLine( lp.second ); + } + else + m_currentNode->Remove( lp.first ); #ifdef DEBUG - m_logger.Log ( lp.first, 2, "fan-pre"); - m_logger.Log ( lp.second, 3, "fan-post"); + m_logger.Log( lp.first, 2, "fan-pre" ); + m_logger.Log( lp.second, 3, "fan-post" ); #endif } @@ -539,108 +556,112 @@ PNS_SHOVE::ShoveStatus PNS_SHOVE::pushVia ( PNS_VIA *aVia, const VECTOR2I& aForc } -PNS_SHOVE::ShoveStatus PNS_SHOVE::onCollidingVia (PNS_ITEM *aCurrent, PNS_VIA *aObstacleVia ) +PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::onCollidingVia (PNS_ITEM* aCurrent, PNS_VIA* aObstacleVia ) { int clearance = m_currentNode->GetClearance( aCurrent, aObstacleVia ) ; - LinePairVec draggedLines; - VECTOR2I p0 ( aObstacleVia->Pos() ); + LINE_PAIR_VEC draggedLines; + VECTOR2I p0( aObstacleVia->Pos() ); bool colLine = false, colVia = false; PNS_LINE *currentLine = NULL; VECTOR2I mtvLine, mtvVia, mtv, mtvSolid; int rank = -1; - if( aCurrent->OfKind (PNS_ITEM::LINE)) + if( aCurrent->OfKind( PNS_ITEM::LINE ) ) { - #ifdef DEBUG - m_logger.NewGroup ("push-via-by-line", m_iter); - m_logger.Log(aCurrent, 4, "current"); + m_logger.NewGroup( "push-via-by-line", m_iter ); + m_logger.Log( aCurrent, 4, "current" ); #endif currentLine = (PNS_LINE*) aCurrent; - colLine = CollideShapes( aObstacleVia->Shape(), currentLine->Shape(), clearance + currentLine->Width() / 2 + PNS_HULL_MARGIN, true, mtvLine ); + colLine = CollideShapes( aObstacleVia->Shape(), currentLine->Shape(), + clearance + currentLine->Width() / 2 + PNS_HULL_MARGIN, + true, mtvLine ); - if(currentLine->EndsWithVia()) - colVia = CollideShapes (currentLine->Via().Shape(), aObstacleVia->Shape(), clearance + PNS_HULL_MARGIN, true, mtvVia); + if( currentLine->EndsWithVia() ) + colVia = CollideShapes( currentLine->Via().Shape(), aObstacleVia->Shape(), + clearance + PNS_HULL_MARGIN, true, mtvVia ); - if(!colLine && !colVia) - return SH_OK; + if( !colLine && !colVia ) + return SH_OK; - if(colLine && colVia) + if( colLine && colVia ) mtv = mtvVia.EuclideanNorm() > mtvLine.EuclideanNorm() ? mtvVia : mtvLine; - else if (colLine) + else if( colLine ) mtv = mtvLine; else mtv = mtvVia; + rank = currentLine->Rank(); } else if (aCurrent->OfKind(PNS_ITEM::SOLID)) { - CollideShapes( aObstacleVia->Shape(), aCurrent->Shape(), clearance + PNS_HULL_MARGIN, true, mtvSolid ); + CollideShapes( aObstacleVia->Shape(), aCurrent->Shape(), + clearance + PNS_HULL_MARGIN, true, mtvSolid ); mtv = mtvSolid; rank = aCurrent->Rank() + 10000; } - return pushVia ( aObstacleVia, mtv, rank ); + return pushVia( aObstacleVia, mtv, rank ); } -PNS_SHOVE::ShoveStatus PNS_SHOVE::onReverseCollidingVia (PNS_LINE *aCurrent, PNS_VIA *aObstacleVia ) + +PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::onReverseCollidingVia( PNS_LINE* aCurrent, PNS_VIA* aObstacleVia ) { - std::vector steps; + std::vector steps; int n = 0; - PNS_LINE *cur = cloneLine( aCurrent ); + PNS_LINE* cur = cloneLine( aCurrent ); cur->ClearSegmentLinks(); - PNS_JOINT *jt = m_currentNode->FindJoint ( aObstacleVia->Pos(), aObstacleVia ); - PNS_LINE *shoved = cloneLine( aCurrent ); + PNS_JOINT* jt = m_currentNode->FindJoint( aObstacleVia->Pos(), aObstacleVia ); + PNS_LINE* shoved = cloneLine( aCurrent ); shoved->ClearSegmentLinks(); - cur->RemoveVia(); unwindStack(aCurrent); - BOOST_FOREACH( PNS_ITEM *item, jt->LinkList() ) + BOOST_FOREACH( PNS_ITEM* item, jt->LinkList() ) { - - if (item->OfKind(PNS_ITEM::SEGMENT) && item->LayersOverlap (aCurrent) ) + if( item->OfKind( PNS_ITEM::SEGMENT ) && item->LayersOverlap( aCurrent ) ) { - PNS_SEGMENT *seg = (PNS_SEGMENT *) item; - PNS_LINE *head = assembleLine( seg ); + PNS_SEGMENT* seg = (PNS_SEGMENT*) item; + PNS_LINE* head = assembleLine( seg ); head->AppendVia( *aObstacleVia ); - ShoveStatus st = processSingleLine ( head, cur, shoved ); + SHOVE_STATUS st = processSingleLine ( head, cur, shoved ); if( st != SH_OK ) { #ifdef DEBUG - m_logger.NewGroup ("on-reverse-via-fail-shove", m_iter); - m_logger.Log ( aObstacleVia, 0, "the-via"); - m_logger.Log ( aCurrent, 1, "current-line"); - m_logger.Log ( shoved, 3, "shoved-line"); + m_logger.NewGroup( "on-reverse-via-fail-shove", m_iter ); + m_logger.Log( aObstacleVia, 0, "the-via" ); + m_logger.Log( aCurrent, 1, "current-line" ); + m_logger.Log( shoved, 3, "shoved-line" ); #endif return st; } - cur->SetShape ( shoved->CLine() ); + + cur->SetShape( shoved->CLine() ); n++; } } - if(!n) + if( !n ) { #ifdef DEBUG - m_logger.NewGroup ("on-reverse-via-fail-lonevia", m_iter); - m_logger.Log ( aObstacleVia, 0, "the-via"); - m_logger.Log ( aCurrent, 1, "current-line"); + m_logger.NewGroup( "on-reverse-via-fail-lonevia", m_iter ); + m_logger.Log( aObstacleVia, 0, "the-via" ); + m_logger.Log( aCurrent, 1, "current-line" ); #endif - PNS_LINE head(*aCurrent); + PNS_LINE head( *aCurrent ); head.Line().Clear(); head.AppendVia( *aObstacleVia ); head.ClearSegmentLinks(); - ShoveStatus st = processSingleLine ( &head, aCurrent, shoved ); + SHOVE_STATUS st = processSingleLine( &head, aCurrent, shoved ); if( st != SH_OK ) return st; @@ -648,96 +669,103 @@ PNS_SHOVE::ShoveStatus PNS_SHOVE::onReverseCollidingVia (PNS_LINE *aCurrent, PNS cur->SetShape ( shoved->CLine() ); } - if(aCurrent->EndsWithVia()) - shoved->AppendVia( aCurrent->Via( )); + if( aCurrent->EndsWithVia() ) + shoved->AppendVia( aCurrent->Via() ); #ifdef DEBUG - m_logger.NewGroup ("on-reverse-via", m_iter); - m_logger.Log ( aObstacleVia, 0, "the-via"); - m_logger.Log ( aCurrent, 1, "current-line"); - m_logger.Log ( shoved, 3, "shoved-line"); + m_logger.NewGroup( "on-reverse-via", m_iter ); + m_logger.Log( aObstacleVia, 0, "the-via" ); + m_logger.Log( aCurrent, 1, "current-line" ); + m_logger.Log( shoved, 3, "shoved-line" ); #endif int currentRank = aCurrent->Rank(); m_currentNode->Replace ( aCurrent, shoved ); - pushLine(shoved); + pushLine( shoved ); shoved->SetRank( currentRank ); return SH_OK; } -void PNS_SHOVE::unwindStack ( PNS_SEGMENT *seg ) +void PNS_SHOVE::unwindStack( PNS_SEGMENT *aSeg ) { - for (std::vector::iterator i = m_lineStack.begin(); i != m_lineStack.end(); ) + for( std::vector::iterator i = m_lineStack.begin(); i != m_lineStack.end(); ) { - if( (*i)->ContainsSegment ( seg ) ) + if( (*i)->ContainsSegment ( aSeg ) ) i = m_lineStack.erase( i ); else i++; } - for (std::vector::iterator i = m_optimizerQueue.begin(); i != m_optimizerQueue.end(); ) + for( std::vector::iterator i = m_optimizerQueue.begin(); i != m_optimizerQueue.end(); ) { - if( (*i)->ContainsSegment ( seg ) ) + if( (*i)->ContainsSegment( aSeg ) ) i = m_optimizerQueue.erase( i ); else i++; } } -void PNS_SHOVE::unwindStack ( PNS_ITEM *item ) -{ - if (item->OfKind(PNS_ITEM::SEGMENT)) - unwindStack(static_cast(item)); - else if (item->OfKind(PNS_ITEM::LINE)) { - PNS_LINE *l = static_cast( item ); - if (!l->LinkedSegments()) +void PNS_SHOVE::unwindStack( PNS_ITEM* aItem ) +{ + if( aItem->OfKind( PNS_ITEM::SEGMENT ) ) + unwindStack( static_cast( aItem ) ); + else if( aItem->OfKind( PNS_ITEM::LINE ) ) + { + PNS_LINE* l = static_cast( aItem ); + + if ( !l->LinkedSegments() ) return; - BOOST_FOREACH(PNS_SEGMENT *seg, *l->LinkedSegments() ) - unwindStack(seg); + BOOST_FOREACH( PNS_SEGMENT* seg, *l->LinkedSegments() ) + unwindStack( seg ); } } -void PNS_SHOVE::pushLine (PNS_LINE *l) + +void PNS_SHOVE::pushLine( PNS_LINE* aL ) { - if(l->LinkCount() >= 0 && (l->LinkCount() != l->SegmentCount())) - assert(false); + if( aL->LinkCount() >= 0 && ( aL->LinkCount() != aL->SegmentCount() ) ) + assert( false ); - m_lineStack.push_back(l); - m_optimizerQueue.push_back(l); + m_lineStack.push_back( aL ); + m_optimizerQueue.push_back( aL ); } + void PNS_SHOVE::popLine( ) { - PNS_LINE *l = m_lineStack.back(); + PNS_LINE* l = m_lineStack.back(); - for (std::vector::iterator i = m_optimizerQueue.begin(); i != m_optimizerQueue.end(); ) + for( std::vector::iterator i = m_optimizerQueue.begin(); i != m_optimizerQueue.end(); ) { - if( (*i) == l ) + if( ( *i ) == l ) { i = m_optimizerQueue.erase( i ); - } else + } + else i++; } m_lineStack.pop_back(); } -PNS_SHOVE::ShoveStatus PNS_SHOVE::shoveIteration(int aIter) + +PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::shoveIteration( int aIter ) { PNS_LINE* currentLine = m_lineStack.back(); - PNS_NODE::OptObstacle nearest; - ShoveStatus st; + PNS_NODE::OPT_OBSTACLE nearest; + SHOVE_STATUS st; - PNS_ITEM::PnsKind search_order[] = { PNS_ITEM::SOLID, PNS_ITEM::VIA, PNS_ITEM::SEGMENT }; + PNS_ITEM::PnsKind search_order[] = { PNS_ITEM::SOLID, PNS_ITEM::VIA, PNS_ITEM::SEGMENT }; - for(int i = 0; i < 3; i++) + for( int i = 0; i < 3; i++ ) { nearest = m_currentNode->NearestObstacle( currentLine, search_order[i] ); - if(nearest) + + if( nearest ) break; } @@ -747,23 +775,25 @@ PNS_SHOVE::ShoveStatus PNS_SHOVE::shoveIteration(int aIter) return SH_OK; } - PNS_ITEM *ni = nearest->item; + PNS_ITEM* ni = nearest->m_item; - unwindStack(ni); + unwindStack( ni ); - if( !ni->OfKind(PNS_ITEM::SOLID) && ni->Rank() >= 0 && ni->Rank() > currentLine->Rank() ) + if( !ni->OfKind( PNS_ITEM::SOLID ) && ni->Rank() >= 0 && ni->Rank() > currentLine->Rank() ) { switch( ni->Kind() ) { case PNS_ITEM::VIA: { - PNS_VIA *revVia = (PNS_VIA *) ni; + PNS_VIA* revVia = (PNS_VIA*) ni; TRACE( 2, "iter %d: reverse-collide-via", aIter ); - if (currentLine->EndsWithVia() && m_currentNode->CheckColliding(¤tLine->Via(), revVia)) + if( currentLine->EndsWithVia() && m_currentNode->CheckColliding( ¤tLine->Via(), revVia ) ) { st = SH_INCOMPLETE; - } else { + } + else + { st = onReverseCollidingVia ( currentLine, revVia ); } @@ -772,35 +802,37 @@ PNS_SHOVE::ShoveStatus PNS_SHOVE::shoveIteration(int aIter) case PNS_ITEM::SEGMENT: { - PNS_SEGMENT *seg = (PNS_SEGMENT* ) ni; + PNS_SEGMENT* seg = (PNS_SEGMENT*) ni; TRACE( 2, "iter %d: reverse-collide-segment ", aIter ); - PNS_LINE *revLine = assembleLine ( seg ); + PNS_LINE* revLine = assembleLine( seg ); popLine(); st = onCollidingLine( revLine, currentLine ); - pushLine(revLine); + pushLine( revLine ); break; } default: - assert(false); + assert( false ); } - } else { // "forward" collisoins + } + else + { // "forward" collisoins switch( ni->Kind() ) { case PNS_ITEM::SEGMENT: TRACE( 2, "iter %d: collide-segment ", aIter ); - st = onCollidingSegment( currentLine, (PNS_SEGMENT* ) ni ); + st = onCollidingSegment( currentLine, (PNS_SEGMENT*) ni ); break; case PNS_ITEM::VIA: TRACE( 2, "iter %d: shove-via ", aIter ); - st = onCollidingVia ( currentLine, (PNS_VIA *) ni ); + st = onCollidingVia( currentLine, (PNS_VIA*) ni ); break; case PNS_ITEM::SOLID: TRACE( 2, "iter %d: walk-solid ", aIter ); - st = onCollidingSolid ( currentLine, (PNS_SOLID *) ni ); + st = onCollidingSolid( currentLine, (PNS_SOLID*) ni ); break; default: @@ -811,12 +843,13 @@ PNS_SHOVE::ShoveStatus PNS_SHOVE::shoveIteration(int aIter) return st; } -PNS_SHOVE::ShoveStatus PNS_SHOVE::shoveMainLoop() + +PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::shoveMainLoop() { - ShoveStatus st = SH_OK; + SHOVE_STATUS st = SH_OK; TRACE( 1, "ShoveStart [root: %d jts, current: %d jts]", m_root->JointCount() % - m_currentNode->JointCount() ); + m_currentNode->JointCount() ); int iterLimit = Settings().ShoveIterationLimit(); TIME_LIMIT timeLimit = Settings().ShoveTimeLimit(); @@ -827,7 +860,7 @@ PNS_SHOVE::ShoveStatus PNS_SHOVE::shoveMainLoop() while( !m_lineStack.empty() ) { - st = shoveIteration(m_iter); + st = shoveIteration( m_iter ); m_iter++; @@ -842,37 +875,37 @@ PNS_SHOVE::ShoveStatus PNS_SHOVE::shoveMainLoop() } -PNS_SHOVE::ShoveStatus PNS_SHOVE::ShoveLines( const PNS_LINE& aCurrentHead ) +PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::ShoveLines( const PNS_LINE& aCurrentHead ) { - ShoveStatus st = SH_OK; + SHOVE_STATUS st = SH_OK; // empty head? nothing to shove... - if( ! aCurrentHead.SegmentCount() ) + if( !aCurrentHead.SegmentCount() ) return SH_INCOMPLETE; - PNS_LINE* head = cloneLine ( &aCurrentHead ); + PNS_LINE* head = cloneLine( &aCurrentHead ); head->ClearSegmentLinks(); m_lineStack.clear(); m_optimizerQueue.clear(); - m_newHead = OptLine(); + m_newHead = OPT_LINE(); m_logger.Clear(); - PNS_ITEMSET headSet ( cloneLine( &aCurrentHead ) ); + PNS_ITEMSET headSet( cloneLine( &aCurrentHead ) ); reduceSpringback( headSet ); - PNS_NODE *parent = m_nodeStack.empty() ? m_root : m_nodeStack.back().node; + PNS_NODE* parent = m_nodeStack.empty() ? m_root : m_nodeStack.back().m_node; m_currentNode = parent->Branch(); m_currentNode->ClearRanks(); m_currentNode->Add( head ); - head->Mark ( MK_HEAD ); - head->SetRank ( 100000 ); + head->Mark( MK_HEAD ); + head->SetRank( 100000 ); - m_logger.NewGroup ("initial", 0); - m_logger.Log ( head, 0, "head"); + m_logger.NewGroup( "initial", 0 ); + m_logger.Log( head, 0, "head" ); PNS_VIA* headVia = NULL; @@ -881,24 +914,24 @@ PNS_SHOVE::ShoveStatus PNS_SHOVE::ShoveLines( const PNS_LINE& aCurrentHead ) headVia = head->Via().Clone(); m_currentNode->Add( headVia ); headVia->Mark( MK_HEAD ); - headVia->SetRank ( 100000 ); - m_logger.Log ( headVia, 0, "head-via"); - + headVia->SetRank( 100000 ); + m_logger.Log( headVia, 0, "head-via" ); } - pushLine (head); + pushLine( head ); st = shoveMainLoop(); - runOptimizer ( m_currentNode, head ); + runOptimizer( m_currentNode, head ); if( m_newHead && st == SH_OK ) { st = SH_HEAD_MODIFIED; - Router()->DisplayDebugLine ( m_newHead->CLine(), 3, 20000 ); + Router()->DisplayDebugLine( m_newHead->CLine(), 3, 20000 ); } - m_currentNode->RemoveByMarker ( MK_HEAD ); + m_currentNode->RemoveByMarker( MK_HEAD ); - TRACE( 1, "Shove status : %s after %d iterations", ((st == SH_OK || st == SH_HEAD_MODIFIED) ? "OK" : "FAILURE") % m_iter ); + TRACE( 1, "Shove status : %s after %d iterations", + ( ( st == SH_OK || st == SH_HEAD_MODIFIED ) ? "OK" : "FAILURE") % m_iter ); if( st == SH_OK || st == SH_HEAD_MODIFIED ) { @@ -909,34 +942,34 @@ PNS_SHOVE::ShoveStatus PNS_SHOVE::ShoveLines( const PNS_LINE& aCurrentHead ) delete m_currentNode; m_currentNode = parent; - m_newHead = OptLine(); + m_newHead = OPT_LINE(); } return st; } -PNS_SHOVE::ShoveStatus PNS_SHOVE::ShoveDraggingVia ( PNS_VIA *aVia, const VECTOR2I& aWhere, PNS_VIA **aNewVia ) +PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::ShoveDraggingVia( PNS_VIA* aVia, const VECTOR2I& aWhere, + PNS_VIA** aNewVia ) { - ShoveStatus st = SH_OK; + SHOVE_STATUS st = SH_OK; m_lineStack.clear(); m_optimizerQueue.clear(); - m_newHead = OptLine(); + m_newHead = OPT_LINE(); m_draggedVia = NULL; //reduceSpringback( aCurrentHead ); - PNS_NODE *parent = m_nodeStack.empty() ? m_root : m_nodeStack.back().node; + PNS_NODE* parent = m_nodeStack.empty() ? m_root : m_nodeStack.back().m_node; m_currentNode = parent->Branch(); - m_currentNode->ClearRanks(); + m_currentNode->ClearRanks(); aVia->Mark( MK_HEAD ); - - st = pushVia ( aVia, (aWhere - aVia->Pos()), 0 ); + st = pushVia( aVia, ( aWhere - aVia->Pos() ), 0 ); st = shoveMainLoop(); - runOptimizer ( m_currentNode, NULL ); + runOptimizer( m_currentNode, NULL ); if( st == SH_OK || st == SH_HEAD_MODIFIED ) { @@ -948,64 +981,69 @@ PNS_SHOVE::ShoveStatus PNS_SHOVE::ShoveDraggingVia ( PNS_VIA *aVia, const VECTOR m_currentNode = parent; } - if(aNewVia) + if( aNewVia ) *aNewVia = m_draggedVia; return st; } -void PNS_SHOVE::runOptimizer ( PNS_NODE *node, PNS_LINE *head ) + +void PNS_SHOVE::runOptimizer( PNS_NODE* aNode, PNS_LINE* aHead ) { - PNS_OPTIMIZER optimizer( node ); + PNS_OPTIMIZER optimizer( aNode ); int optFlags = 0, n_passes = 0, extend = 0; PNS_OPTIMIZATION_EFFORT effort = Settings().OptimizerEffort(); - - switch(effort) + switch( effort ) { - case OE_Low: + case OE_LOW: optFlags = PNS_OPTIMIZER::MERGE_OBTUSE; n_passes = 1; extend = 0; break; - case OE_Medium: + + case OE_MEDIUM: optFlags = PNS_OPTIMIZER::MERGE_OBTUSE; n_passes = 2; extend = 1; break; - case OE_Full: + + case OE_FULL: optFlags = PNS_OPTIMIZER::MERGE_SEGMENTS; n_passes = 2; break; + default: break; } - if(Settings().SmartPads()) + if( Settings().SmartPads() ) optFlags |= PNS_OPTIMIZER::SMART_PADS ; optimizer.SetEffortLevel( optFlags ); optimizer.SetCollisionMask( PNS_ITEM::ANY ); - for(int pass = 0; pass < n_passes; pass ++) + for( int pass = 0; pass < n_passes; pass++ ) { - std::reverse ( m_optimizerQueue.begin(), m_optimizerQueue.end() ); - for(std::vector::iterator i = m_optimizerQueue.begin(); i != m_optimizerQueue.end(); ++i) - { - PNS_LINE *line = *i; - - if( ! (line -> Marker() & MK_HEAD ) ) - { - if(effort == OE_Medium || effort == OE_Low ) - { - RANGE r = findShovedVertexRange ( line ); + std::reverse( m_optimizerQueue.begin(), m_optimizerQueue.end() ); - if (r.Defined()) + for( std::vector::iterator i = m_optimizerQueue.begin(); + i != m_optimizerQueue.end(); ++i) + { + PNS_LINE* line = *i; + + if( !( line -> Marker() & MK_HEAD ) ) + { + if( effort == OE_MEDIUM || effort == OE_LOW ) + { + RANGE r = findShovedVertexRange( line ); + + if( r.Defined() ) { - int start_v = std::max(0, r.MinV() - extend); - int end_v = std::min(line->PointCount() - 1 , r.MaxV() + extend ); - line->ClipVertexRange ( start_v, end_v ); + int start_v = std::max( 0, r.MinV() - extend ); + int end_v = std::min( line->PointCount() - 1 , r.MaxV() + extend ); + line->ClipVertexRange( start_v, end_v ); } } @@ -1013,9 +1051,9 @@ void PNS_SHOVE::runOptimizer ( PNS_NODE *node, PNS_LINE *head ) if( optimizer.Optimize( line, &optimized ) ) { - node->Remove( line ); - line->SetShape(optimized.CLine()); - node->Add( line ); + aNode->Remove( line ); + line->SetShape( optimized.CLine() ); + aNode->Add( line ); } } } @@ -1024,23 +1062,24 @@ void PNS_SHOVE::runOptimizer ( PNS_NODE *node, PNS_LINE *head ) } -const RANGE PNS_SHOVE::findShovedVertexRange ( PNS_LINE *l ) + +const RANGE PNS_SHOVE::findShovedVertexRange( PNS_LINE *aL ) { RANGE r; - for(int i = 0; i < l->SegmentCount(); i++) + for( int i = 0; i < aL->SegmentCount(); i++ ) { - PNS_SEGMENT *s = (*l->LinkedSegments())[i]; - PNS_JOINT *jt = m_root->FindJoint( s->Seg().A, s->Layer(), s->Net() ); + PNS_SEGMENT* s = (*aL->LinkedSegments())[i]; + PNS_JOINT* jt = m_root->FindJoint( s->Seg().A, s->Layer(), s->Net() ); bool found = false; - if(jt) + if( jt ) { - BOOST_FOREACH( PNS_ITEM *item, jt->LinkList() ) + BOOST_FOREACH( PNS_ITEM* item, jt->LinkList() ) { - if(item->OfKind(PNS_ITEM::SEGMENT)) + if( item->OfKind( PNS_ITEM::SEGMENT ) ) { - PNS_SEGMENT *s_old = (PNS_SEGMENT *) item; + PNS_SEGMENT* s_old = (PNS_SEGMENT*) item; if( s_old->Net() == s->Net() && s_old->Layer() == s->Layer() && @@ -1054,27 +1093,31 @@ const RANGE PNS_SHOVE::findShovedVertexRange ( PNS_LINE *l ) } } - if(!found) + if( !found ) { - r.Grow(i); - r.Grow(i + 1); + r.Grow( i ); + r.Grow( i + 1 ); } } + return r; } + PNS_NODE* PNS_SHOVE::CurrentNode() { - return m_nodeStack.empty() ? m_root : m_nodeStack.back().node; + return m_nodeStack.empty() ? m_root : m_nodeStack.back().m_node; } + const PNS_LINE PNS_SHOVE::NewHead() const { - assert(m_newHead); + assert( m_newHead ); + return *m_newHead; } -void PNS_SHOVE::SetInitialLine ( PNS_LINE *aInitial ) +void PNS_SHOVE::SetInitialLine( PNS_LINE* aInitial ) { m_root = m_root->Branch(); m_root->Remove ( aInitial ); diff --git a/pcbnew/router/pns_shove.h b/pcbnew/router/pns_shove.h index d070e89790..53568ab281 100644 --- a/pcbnew/router/pns_shove.h +++ b/pcbnew/router/pns_shove.h @@ -44,7 +44,7 @@ class PNS_SHOVE : public PNS_ALGO_BASE { public: - enum ShoveStatus + enum SHOVE_STATUS { SH_OK = 0, SH_NULL, @@ -52,72 +52,74 @@ public: SH_HEAD_MODIFIED }; - PNS_SHOVE( PNS_NODE* aWorld, PNS_ROUTER *aRouter ); + PNS_SHOVE( PNS_NODE* aWorld, PNS_ROUTER* aRouter ); ~PNS_SHOVE(); - virtual PNS_LOGGER *Logger() + virtual PNS_LOGGER* Logger() { return &m_logger; } - ShoveStatus ShoveLines( const PNS_LINE& aCurrentHead ); - ShoveStatus ShoveDraggingVia ( PNS_VIA *aVia, const VECTOR2I& aWhere, PNS_VIA **aNewVia ); + SHOVE_STATUS ShoveLines( const PNS_LINE& aCurrentHead ); + SHOVE_STATUS ShoveDraggingVia( PNS_VIA*aVia, const VECTOR2I& aWhere, PNS_VIA** aNewVia ); PNS_NODE* CurrentNode(); const PNS_LINE NewHead() const; - void SetInitialLine ( PNS_LINE *aInitial ); + void SetInitialLine ( PNS_LINE* aInitial ); private: - typedef std::vector HullSet; - typedef boost::optional OptLine; - typedef std::pair LinePair; - typedef std::vector LinePairVec; + typedef std::vector HULL_SET; + typedef boost::optional OPT_LINE; + typedef std::pair LINE_PAIR; + typedef std::vector LINE_PAIR_VEC; - struct SpringbackTag + struct SPRINGBACK_TAG { - int64_t length; - int segments; - VECTOR2I p; - PNS_NODE *node; - PNS_ITEMSET headItems; - PNS_COST_ESTIMATOR cost; + int64_t m_length; + int m_segments; + VECTOR2I m_p; + PNS_NODE* m_node; + PNS_ITEMSET m_headItems; + PNS_COST_ESTIMATOR m_cost; }; - ShoveStatus processSingleLine(PNS_LINE *aCurrent, PNS_LINE* aObstacle, PNS_LINE *aShoved ); - ShoveStatus processHullSet ( PNS_LINE *aCurrent, PNS_LINE *aObstacle, PNS_LINE *aShoved, const HullSet& hulls ); + SHOVE_STATUS processSingleLine( PNS_LINE* aCurrent, PNS_LINE* aObstacle, PNS_LINE* aShoved ); + SHOVE_STATUS processHullSet( PNS_LINE* aCurrent, PNS_LINE* aObstacle, + PNS_LINE* aShoved, const HULL_SET& hulls ); - bool reduceSpringback( const PNS_ITEMSET &aHeadItems ); - bool pushSpringback( PNS_NODE* aNode, const PNS_ITEMSET &aHeadItems, const PNS_COST_ESTIMATOR& aCost ); + bool reduceSpringback( const PNS_ITEMSET& aHeadItems ); + bool pushSpringback( PNS_NODE* aNode, const PNS_ITEMSET &aHeadItems, + const PNS_COST_ESTIMATOR& aCost ); - ShoveStatus walkaroundLoneVia ( PNS_LINE *aCurrent, PNS_LINE *aObstacle, PNS_LINE *aShoved ); - bool checkBumpDirection ( PNS_LINE *aCurrent, PNS_LINE *aShoved ) const; + SHOVE_STATUS walkaroundLoneVia( PNS_LINE* aCurrent, PNS_LINE* aObstacle, PNS_LINE* aShoved ); + bool checkBumpDirection( PNS_LINE* aCurrent, PNS_LINE* aShoved ) const; - ShoveStatus onCollidingLine( PNS_LINE *aCurrent, PNS_LINE *aObstacle ); - ShoveStatus onCollidingSegment( PNS_LINE *aCurrent, PNS_SEGMENT *aObstacleSeg ); - ShoveStatus onCollidingSolid( PNS_LINE *aCurrent, PNS_SOLID *aObstacleSolid ); - ShoveStatus onCollidingVia( PNS_ITEM *aCurrent, PNS_VIA *aObstacleVia ); - ShoveStatus onReverseCollidingVia( PNS_LINE *aCurrent, PNS_VIA *aObstacleVia ); - ShoveStatus pushVia ( PNS_VIA *aVia, const VECTOR2I& aForce, int aCurrentRank ); + SHOVE_STATUS onCollidingLine( PNS_LINE* aCurrent, PNS_LINE* aObstacle ); + SHOVE_STATUS onCollidingSegment( PNS_LINE* aCurrent, PNS_SEGMENT* aObstacleSeg ); + SHOVE_STATUS onCollidingSolid( PNS_LINE* aCurrent, PNS_SOLID* aObstacleSolid ); + SHOVE_STATUS onCollidingVia( PNS_ITEM* aCurrent, PNS_VIA* aObstacleVia ); + SHOVE_STATUS onReverseCollidingVia( PNS_LINE* aCurrent, PNS_VIA* aObstacleVia ); + SHOVE_STATUS pushVia( PNS_VIA* aVia, const VECTOR2I& aForce, int aCurrentRank ); - void unwindStack ( PNS_SEGMENT *seg ); - void unwindStack ( PNS_ITEM *item ); + void unwindStack( PNS_SEGMENT* aSeg ); + void unwindStack( PNS_ITEM *aItem ); - void runOptimizer ( PNS_NODE *node, PNS_LINE *head ); + void runOptimizer( PNS_NODE* aNode, PNS_LINE* aHead ); - void pushLine ( PNS_LINE *l ); + void pushLine( PNS_LINE *aL ); void popLine(); - const RANGE findShovedVertexRange ( PNS_LINE *l ); + const RANGE findShovedVertexRange( PNS_LINE *aL ); - PNS_LINE *assembleLine ( const PNS_SEGMENT *aSeg, int *aIndex = NULL ); - PNS_LINE *cloneLine ( const PNS_LINE *aLine ); + PNS_LINE* assembleLine( const PNS_SEGMENT* aSeg, int* aIndex = NULL ); + PNS_LINE* cloneLine( const PNS_LINE* aLine ); - ShoveStatus shoveIteration(int aIter); - ShoveStatus shoveMainLoop(); + SHOVE_STATUS shoveIteration( int aIter ); + SHOVE_STATUS shoveMainLoop(); - std::vector m_nodeStack; + std::vector m_nodeStack; std::vector m_lineStack; std::vector m_optimizerQueue; std::vector m_gcItems; @@ -127,7 +129,7 @@ private: PNS_LINE* m_currentHead; PNS_LINE* m_collidingLine; - OptLine m_newHead; + OPT_LINE m_newHead; PNS_LOGGER m_logger; PNS_VIA* m_draggedVia; diff --git a/pcbnew/router/pns_solid.cpp b/pcbnew/router/pns_solid.cpp index da4fab064d..6305ceabc4 100644 --- a/pcbnew/router/pns_solid.cpp +++ b/pcbnew/router/pns_solid.cpp @@ -30,29 +30,29 @@ const SHAPE_LINE_CHAIN PNS_SOLID::Hull( int aClearance, int aWalkaroundThickness ) const { - int cl = aClearance + aWalkaroundThickness / 2; + int cl = aClearance + aWalkaroundThickness / 2; switch( m_shape->Type() ) { case SH_RECT: - { - SHAPE_RECT* rect = static_cast( m_shape ); - return OctagonalHull( rect->GetPosition(), rect->GetSize(), - cl + 1, 0.2 * cl ); - } + { + SHAPE_RECT* rect = static_cast( m_shape ); + return OctagonalHull( rect->GetPosition(), rect->GetSize(), cl + 1, 0.2 * cl ); + } case SH_CIRCLE: - { - SHAPE_CIRCLE* circle = static_cast( m_shape ); - int r = circle->GetRadius(); - return OctagonalHull( circle->GetCenter() - VECTOR2I( r, r ), VECTOR2I( 2 * r, 2 * r ), - cl + 1, 0.52 * (r + cl) ); - } + { + SHAPE_CIRCLE* circle = static_cast( m_shape ); + int r = circle->GetRadius(); + return OctagonalHull( circle->GetCenter() - VECTOR2I( r, r ), VECTOR2I( 2 * r, 2 * r ), + cl + 1, 0.52 * ( r + cl ) ); + } + case SH_SEGMENT: - { - SHAPE_SEGMENT *seg = static_cast ( m_shape ); - return SegmentHull (*seg, aClearance, aWalkaroundThickness ); - } + { + SHAPE_SEGMENT* seg = static_cast ( m_shape ); + return SegmentHull( *seg, aClearance, aWalkaroundThickness ); + } default: break; @@ -64,6 +64,6 @@ const SHAPE_LINE_CHAIN PNS_SOLID::Hull( int aClearance, int aWalkaroundThickness PNS_ITEM* PNS_SOLID::Clone ( ) const { - PNS_ITEM *solid = new PNS_SOLID ( *this ); + PNS_ITEM* solid = new PNS_SOLID( *this ); return solid; } diff --git a/pcbnew/router/pns_solid.h b/pcbnew/router/pns_solid.h index d1e725a461..88f8431d24 100644 --- a/pcbnew/router/pns_solid.h +++ b/pcbnew/router/pns_solid.h @@ -49,7 +49,7 @@ public: m_pos = aSolid.m_pos; } - PNS_ITEM* Clone( ) const; + PNS_ITEM* Clone() const; const SHAPE* Shape() const { return m_shape; } @@ -73,7 +73,7 @@ public: m_pos = aCenter; } - virtual VECTOR2I Anchor(int n) const + virtual VECTOR2I Anchor( int aN ) const { return m_pos; } @@ -83,7 +83,6 @@ public: return 1; } - private: VECTOR2I m_pos; SHAPE* m_shape; diff --git a/pcbnew/router/pns_utils.cpp b/pcbnew/router/pns_utils.cpp index e1042e6437..5a69e673d8 100644 --- a/pcbnew/router/pns_utils.cpp +++ b/pcbnew/router/pns_utils.cpp @@ -24,10 +24,8 @@ #include -const SHAPE_LINE_CHAIN OctagonalHull( const VECTOR2I& aP0, - const VECTOR2I& aSize, - int aClearance, - int aChamfer ) +const SHAPE_LINE_CHAIN OctagonalHull( const VECTOR2I& aP0, const VECTOR2I& aSize, + int aClearance, int aChamfer ) { SHAPE_LINE_CHAIN s; @@ -45,9 +43,9 @@ const SHAPE_LINE_CHAIN OctagonalHull( const VECTOR2I& aP0, return s; } -const SHAPE_LINE_CHAIN SegmentHull ( const SHAPE_SEGMENT& aSeg, - int aClearance, - int aWalkaroundThickness ) + +const SHAPE_LINE_CHAIN SegmentHull ( const SHAPE_SEGMENT& aSeg, int aClearance, + int aWalkaroundThickness ) { int d = aSeg.GetWidth() / 2 + aClearance + aWalkaroundThickness / 2 + HULL_MARGIN; int x = (int)( 2.0 / ( 1.0 + M_SQRT2 ) * d ); @@ -81,14 +79,15 @@ const SHAPE_LINE_CHAIN SegmentHull ( const SHAPE_SEGMENT& aSeg, return s; } + SHAPE_RECT ApproximateSegmentAsRect( const SHAPE_SEGMENT& aSeg ) { SHAPE_RECT r; - VECTOR2I delta ( aSeg.GetWidth() / 2, aSeg.GetWidth() / 2 ); - VECTOR2I p0 ( aSeg.GetSeg().A - delta ); - VECTOR2I p1 ( aSeg.GetSeg().B + delta ); + VECTOR2I delta( aSeg.GetWidth() / 2, aSeg.GetWidth() / 2 ); + VECTOR2I p0( aSeg.GetSeg().A - delta ); + VECTOR2I p1( aSeg.GetSeg().B + delta ); - return SHAPE_RECT ( std::min(p0.x, p1.x), std::min(p0.y, p1.y), - std::abs(p1.x - p0.x), std::abs(p1.y - p0.y )); -} \ No newline at end of file + return SHAPE_RECT( std::min( p0.x, p1.x ), std::min( p0.y, p1.y ), + std::abs( p1.x - p0.x ), std::abs( p1.y - p0.y ) ); +} diff --git a/pcbnew/router/pns_utils.h b/pcbnew/router/pns_utils.h index 50bfc90179..5bf6d9313b 100644 --- a/pcbnew/router/pns_utils.h +++ b/pcbnew/router/pns_utils.h @@ -31,11 +31,10 @@ /** Various utility functions */ const SHAPE_LINE_CHAIN OctagonalHull( const VECTOR2I& aP0, const VECTOR2I& aSize, - int aClearance, int aChamfer ); + int aClearance, int aChamfer ); -const SHAPE_LINE_CHAIN SegmentHull ( const SHAPE_SEGMENT& aSeg, - int aClearance, - int aWalkaroundThickness ); +const SHAPE_LINE_CHAIN SegmentHull ( const SHAPE_SEGMENT& aSeg, int aClearance, + int aWalkaroundThickness ); SHAPE_RECT ApproximateSegmentAsRect( const SHAPE_SEGMENT& aSeg ); diff --git a/pcbnew/router/pns_via.cpp b/pcbnew/router/pns_via.cpp index 037bb16e99..f7ff5e9461 100644 --- a/pcbnew/router/pns_via.cpp +++ b/pcbnew/router/pns_via.cpp @@ -25,26 +25,22 @@ #include -bool PNS_VIA::PushoutForce( PNS_NODE* aNode, - const VECTOR2I& aDirection, - VECTOR2I& aForce, - bool aSolidsOnly, - int aMaxIterations ) +bool PNS_VIA::PushoutForce( PNS_NODE* aNode, const VECTOR2I& aDirection, VECTOR2I& aForce, + bool aSolidsOnly, int aMaxIterations ) { int iter = 0; PNS_VIA mv( *this ); VECTOR2I force, totalForce, force2; - while( iter < aMaxIterations ) { - - PNS_NODE::OptObstacle obs = aNode->CheckColliding( &mv, aSolidsOnly ? PNS_ITEM::SOLID : PNS_ITEM::ANY ); + PNS_NODE::OPT_OBSTACLE obs = aNode->CheckColliding( &mv, + aSolidsOnly ? PNS_ITEM::SOLID : PNS_ITEM::ANY ); if( !obs ) break; - int clearance = aNode->GetClearance( obs->item, &mv ); + int clearance = aNode->GetClearance( obs->m_item, &mv ); if( iter > aMaxIterations / 2 ) { @@ -53,14 +49,13 @@ bool PNS_VIA::PushoutForce( PNS_NODE* aNode, mv.SetPos( mv.Pos() + l ); } - bool col = CollideShapes( obs->item->Shape(), mv.Shape(), clearance, true, force2 ); + bool col = CollideShapes( obs->m_item->Shape(), mv.Shape(), clearance, true, force2 ); - if(col) { + if( col ) { totalForce += force2; mv.SetPos( mv.Pos() + force2 ); } - iter++; } @@ -68,19 +63,21 @@ bool PNS_VIA::PushoutForce( PNS_NODE* aNode, return false; aForce = totalForce; + return true; } const SHAPE_LINE_CHAIN PNS_VIA::Hull( int aClearance, int aWalkaroundThickness ) const { - int cl = (aClearance + aWalkaroundThickness / 2); + int cl = ( aClearance + aWalkaroundThickness / 2 ); return OctagonalHull( m_pos - - VECTOR2I( m_diameter / 2, m_diameter / 2 ), VECTOR2I( m_diameter, - m_diameter ), cl + 1, (2 * cl + m_diameter) * 0.26 ); + VECTOR2I( m_diameter / 2, m_diameter / 2 ), VECTOR2I( m_diameter, m_diameter ), + cl + 1, ( 2 * cl + m_diameter ) * 0.26 ); } + PNS_VIA* PNS_VIA::Clone ( ) const { PNS_VIA* v = new PNS_VIA(); diff --git a/pcbnew/router/pns_via.h b/pcbnew/router/pns_via.h index 684116b6da..00a4587b74 100644 --- a/pcbnew/router/pns_via.h +++ b/pcbnew/router/pns_via.h @@ -32,7 +32,8 @@ class PNS_VIA : public PNS_ITEM { public: PNS_VIA() : - PNS_ITEM( VIA ) {}; + PNS_ITEM( VIA ) + {} PNS_VIA( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, int aDiameter, int aNet = -1 ) : PNS_ITEM( VIA ) @@ -42,21 +43,21 @@ public: m_pos = aPos; m_diameter = aDiameter; m_shape = SHAPE_CIRCLE( aPos, aDiameter / 2 ); - }; + } - PNS_VIA( const PNS_VIA& b ) : + PNS_VIA( const PNS_VIA& aB ) : PNS_ITEM( VIA ) { - SetNet( b.Net() ); - SetLayers( b.Layers() ); - m_pos = b.m_pos; - m_diameter = b.m_diameter; + SetNet( aB.Net() ); + SetLayers( aB.Layers() ); + m_pos = aB.m_pos; + m_diameter = aB.m_diameter; m_shape = SHAPE_CIRCLE( m_pos, m_diameter / 2 ); - m_marker = b.m_marker; - m_rank = b.m_rank; - m_owner = b.m_owner; - m_drill = b.m_drill; + m_marker = aB.m_marker; + m_rank = aB.m_rank; + m_owner = aB.m_owner; + m_drill = aB.m_drill; } const VECTOR2I& Pos() const @@ -106,7 +107,7 @@ public: const SHAPE_LINE_CHAIN Hull( int aClearance = 0, int aWalkaroundThickness = 0 ) const; - virtual VECTOR2I Anchor(int n) const + virtual VECTOR2I Anchor( int n ) const { return m_pos; } @@ -117,7 +118,6 @@ public: } private: - int m_diameter; int m_drill; VECTOR2I m_pos; diff --git a/pcbnew/router/pns_walkaround.cpp b/pcbnew/router/pns_walkaround.cpp index 5be937e489..071f762a32 100644 --- a/pcbnew/router/pns_walkaround.cpp +++ b/pcbnew/router/pns_walkaround.cpp @@ -32,22 +32,22 @@ using boost::optional; void PNS_WALKAROUND::start( const PNS_LINE& aInitialPath ) { m_iteration = 0; - m_iteration_limit = 50; + m_iterationLimit = 50; } -PNS_NODE::OptObstacle PNS_WALKAROUND::nearestObstacle( const PNS_LINE& aPath ) +PNS_NODE::OPT_OBSTACLE PNS_WALKAROUND::nearestObstacle( const PNS_LINE& aPath ) { - return m_world->NearestObstacle( &aPath, m_item_mask); - + return m_world->NearestObstacle( &aPath, m_itemMask ); } -PNS_WALKAROUND::WalkaroundStatus PNS_WALKAROUND::singleStep( PNS_LINE& aPath, - bool aWindingDirection ) +PNS_WALKAROUND::WALKAROUND_STATUS PNS_WALKAROUND::singleStep( PNS_LINE& aPath, + bool aWindingDirection ) { optional& current_obs = aWindingDirection ? m_currentObstacle[0] : m_currentObstacle[1]; + bool& prev_recursive = aWindingDirection ? m_recursiveCollision[0] : m_recursiveCollision[1]; if( !current_obs ) @@ -55,15 +55,14 @@ PNS_WALKAROUND::WalkaroundStatus PNS_WALKAROUND::singleStep( PNS_LINE& aPath, SHAPE_LINE_CHAIN path_pre[2], path_walk[2], path_post[2]; - VECTOR2I last = aPath.CPoint( -1 );; + VECTOR2I last = aPath.CPoint( -1 ); - - if( ( current_obs->hull ).PointInside( last ) ) + if( ( current_obs->m_hull ).PointInside( last ) ) { m_recursiveBlockageCount++; if( m_recursiveBlockageCount < 3 ) - aPath.Line().Append( current_obs->hull.NearestPoint( last ) ); + aPath.Line().Append( current_obs->m_hull.NearestPoint( last ) ); else { aPath = aPath.ClipToNearestObstacle( m_world ); @@ -71,17 +70,18 @@ PNS_WALKAROUND::WalkaroundStatus PNS_WALKAROUND::singleStep( PNS_LINE& aPath, } } - aPath.Walkaround( current_obs->hull, path_pre[0], path_walk[0], - path_post[0], aWindingDirection ); - aPath.Walkaround( current_obs->hull, path_pre[1], path_walk[1], - path_post[1], !aWindingDirection ); + aPath.Walkaround( current_obs->m_hull, path_pre[0], path_walk[0], + path_post[0], aWindingDirection ); + aPath.Walkaround( current_obs->m_hull, path_pre[1], path_walk[1], + path_post[1], !aWindingDirection ); + #ifdef DEBUG - m_logger.NewGroup (aWindingDirection ? "walk-cw" : "walk-ccw", m_iteration); - m_logger.Log ( &path_walk[0], 0, "path-walk"); - m_logger.Log ( &path_pre[0], 1, "path-pre"); - m_logger.Log ( &path_post[0], 4, "path-post"); - m_logger.Log ( ¤t_obs->hull, 2, "hull"); - m_logger.Log ( current_obs->item, 3, "item"); + m_logger.NewGroup( aWindingDirection ? "walk-cw" : "walk-ccw", m_iteration ); + m_logger.Log( &path_walk[0], 0, "path-walk" ); + m_logger.Log( &path_pre[0], 1, "path-pre" ); + m_logger.Log( &path_post[0], 4, "path-post" ); + m_logger.Log( ¤t_obs->m_hull, 2, "hull" ); + m_logger.Log( current_obs->m_item, 3, "item" ); #endif int len_pre = path_walk[0].Length(); @@ -89,8 +89,7 @@ PNS_WALKAROUND::WalkaroundStatus PNS_WALKAROUND::singleStep( PNS_LINE& aPath, PNS_LINE walk_path( aPath, path_walk[1] ); - bool alt_collides = m_world->CheckColliding( &walk_path, m_item_mask ); - + bool alt_collides = m_world->CheckColliding( &walk_path, m_itemMask ); SHAPE_LINE_CHAIN pnew; @@ -127,15 +126,13 @@ PNS_WALKAROUND::WalkaroundStatus PNS_WALKAROUND::singleStep( PNS_LINE& aPath, } -PNS_WALKAROUND::WalkaroundStatus PNS_WALKAROUND::Route( const PNS_LINE& aInitialPath, - PNS_LINE& aWalkPath, - bool aOptimize ) +PNS_WALKAROUND::WALKAROUND_STATUS PNS_WALKAROUND::Route( const PNS_LINE& aInitialPath, + PNS_LINE& aWalkPath, bool aOptimize ) { PNS_LINE path_cw( aInitialPath ), path_ccw( aInitialPath ); - WalkaroundStatus s_cw = IN_PROGRESS, s_ccw = IN_PROGRESS; + WALKAROUND_STATUS s_cw = IN_PROGRESS, s_ccw = IN_PROGRESS; SHAPE_LINE_CHAIN best_path; - start( aInitialPath ); m_currentObstacle[0] = m_currentObstacle[1] = nearestObstacle( aInitialPath ); @@ -143,7 +140,7 @@ PNS_WALKAROUND::WalkaroundStatus PNS_WALKAROUND::Route( const PNS_LINE& aInitial aWalkPath = aInitialPath; - while( m_iteration < m_iteration_limit ) + while( m_iteration < m_iterationLimit ) { if( s_cw != STUCK ) s_cw = singleStep( path_cw, true ); @@ -155,7 +152,6 @@ PNS_WALKAROUND::WalkaroundStatus PNS_WALKAROUND::Route( const PNS_LINE& aInitial { int len_cw = path_cw.CLine().Length(); int len_ccw = path_ccw.CLine().Length(); - if( m_forceLongerPath ) aWalkPath = (len_cw > len_ccw ? path_cw : path_ccw); @@ -178,16 +174,15 @@ PNS_WALKAROUND::WalkaroundStatus PNS_WALKAROUND::Route( const PNS_LINE& aInitial m_iteration++; } - if( m_iteration == m_iteration_limit ) + if( m_iteration == m_iterationLimit ) { int len_cw = path_cw.CLine().Length(); int len_ccw = path_ccw.CLine().Length(); - if( m_forceLongerPath ) - aWalkPath = (len_cw > len_ccw ? path_cw : path_ccw); + aWalkPath = ( len_cw > len_ccw ? path_cw : path_ccw ); else - aWalkPath = (len_cw < len_ccw ? path_cw : path_ccw); + aWalkPath = ( len_cw < len_ccw ? path_cw : path_ccw ); } if( m_cursorApproachMode ) @@ -226,16 +221,16 @@ PNS_WALKAROUND::WalkaroundStatus PNS_WALKAROUND::Route( const PNS_LINE& aInitial aWalkPath.Line().Simplify(); - if(aWalkPath.SegmentCount() < 1) + if( aWalkPath.SegmentCount() < 1 ) return STUCK; - if(aWalkPath.CPoint(-1) != aInitialPath.CPoint(-1)) + if( aWalkPath.CPoint( -1 ) != aInitialPath.CPoint( -1 ) ) return STUCK; - if(aWalkPath.CPoint(0) != aInitialPath.CPoint(0)) + if( aWalkPath.CPoint( 0 ) != aInitialPath.CPoint( 0 ) ) return STUCK; - WalkaroundStatus st = s_ccw == DONE || s_cw == DONE ? DONE : STUCK; + WALKAROUND_STATUS st = s_ccw == DONE || s_cw == DONE ? DONE : STUCK; if( aOptimize && st == DONE ) PNS_OPTIMIZER::Optimize( &aWalkPath, PNS_OPTIMIZER::MERGE_OBTUSE, m_world ); diff --git a/pcbnew/router/pns_walkaround.h b/pcbnew/router/pns_walkaround.h index 0a87213a22..71b9c1ce2d 100644 --- a/pcbnew/router/pns_walkaround.h +++ b/pcbnew/router/pns_walkaround.h @@ -32,20 +32,20 @@ class PNS_WALKAROUND : public PNS_ALGO_BASE static const int DefaultIterationLimit = 50; public: - PNS_WALKAROUND( PNS_NODE* aWorld, PNS_ROUTER *aRouter ) : + PNS_WALKAROUND( PNS_NODE* aWorld, PNS_ROUTER* aRouter ) : PNS_ALGO_BASE ( aRouter ), m_world( aWorld ), - m_iteration_limit( DefaultIterationLimit ) + m_iterationLimit( DefaultIterationLimit ) { m_forceSingleDirection = false; m_forceLongerPath = false; m_cursorApproachMode = false; - m_item_mask = PNS_ITEM::ANY; - }; + m_itemMask = PNS_ITEM::ANY; + } ~PNS_WALKAROUND() {}; - enum WalkaroundStatus + enum WALKAROUND_STATUS { IN_PROGRESS = 0, DONE, @@ -59,23 +59,23 @@ public: void SetIterationLimit( const int aIterLimit ) { - m_iteration_limit = aIterLimit; + m_iterationLimit = aIterLimit; } void SetSolidsOnly( bool aSolidsOnly ) { - if(aSolidsOnly) - m_item_mask = PNS_ITEM::SOLID; + if( aSolidsOnly ) + m_itemMask = PNS_ITEM::SOLID; else - m_item_mask = PNS_ITEM::ANY; + m_itemMask = PNS_ITEM::ANY; } - void SetItemMask ( int aMask ) + void SetItemMask( int aMask ) { - m_item_mask = aMask; + m_itemMask = aMask; } - void SetSingleDirection( bool aForceSingleDirection ) + void SetSingleDirection( bool aForceSingleDirection ) { m_forceSingleDirection = aForceSingleDirection; m_forceLongerPath = aForceSingleDirection; @@ -88,29 +88,30 @@ public: m_cursorApproachMode = aEnabled; } - WalkaroundStatus Route( const PNS_LINE& aInitialPath, PNS_LINE& aWalkPath, + WALKAROUND_STATUS Route( const PNS_LINE& aInitialPath, PNS_LINE& aWalkPath, bool aOptimize = true ); - virtual PNS_LOGGER *Logger() { + virtual PNS_LOGGER* Logger() + { return &m_logger; } private: void start( const PNS_LINE& aInitialPath ); - WalkaroundStatus singleStep( PNS_LINE& aPath, bool aWindingDirection ); - PNS_NODE::OptObstacle nearestObstacle( const PNS_LINE& aPath ); + WALKAROUND_STATUS singleStep( PNS_LINE& aPath, bool aWindingDirection ); + PNS_NODE::OPT_OBSTACLE nearestObstacle( const PNS_LINE& aPath ); PNS_NODE* m_world; int m_recursiveBlockageCount; int m_iteration; - int m_iteration_limit; - int m_item_mask; + int m_iterationLimit; + int m_itemMask; bool m_forceSingleDirection, m_forceLongerPath; bool m_cursorApproachMode; VECTOR2I m_cursorPos; - PNS_NODE::OptObstacle m_currentObstacle[2]; + PNS_NODE::OPT_OBSTACLE m_currentObstacle[2]; bool m_recursiveCollision[2]; PNS_LOGGER m_logger; }; diff --git a/pcbnew/router/range.h b/pcbnew/router/range.h index 8409731926..0778cf70e7 100644 --- a/pcbnew/router/range.h +++ b/pcbnew/router/range.h @@ -21,16 +21,17 @@ #ifndef __RANGE_H #define __RANGE_H -template class RANGE { - +template +class RANGE +{ public: - RANGE (T aMin, T aMax) : - m_min(aMin), - m_max(aMax), - m_defined(true) {} + RANGE( T aMin, T aMax ) : + m_min( aMin ), + m_max( aMax ), + m_defined( true ) {} - RANGE (): - m_defined (false) {}; + RANGE(): + m_defined( false ) {} T MinV() const { @@ -42,36 +43,38 @@ template class RANGE { return m_max; } - void Set ( T aMin, T aMax ) const + void Set( T aMin, T aMax ) const { m_max = aMax; m_min = aMin; } - void Grow ( T value ) + void Grow( T aValue ) { - if(!m_defined) + if( !m_defined ) { - m_min = value; - m_max = value; + m_min = aValue; + m_max = aValue; m_defined = true; - } else { - m_min = std::min(m_min, value); - m_max = std::max(m_max, value); + } + else + { + m_min = std::min( m_min, aValue ); + m_max = std::max( m_max, aValue ); } } - bool Inside ( const T& value ) const + bool Inside( const T& aValue ) const { - if(!m_defined) + if( !m_defined ) return true; - return value >= m_min && value <= m_max; + return aValue >= m_min && aValue <= m_max; } - bool Overlaps ( const RANGE &aOther ) const + bool Overlaps ( const RANGE& aOther ) const { - if(!m_defined || !aOther.m_defined) + if( !m_defined || !aOther.m_defined ) return true; return m_max >= aOther.m_min && m_min <= aOther.m_max; @@ -85,7 +88,6 @@ template class RANGE { private: T m_min, m_max; bool m_defined; - }; -#endif \ No newline at end of file +#endif diff --git a/pcbnew/router/router_preview_item.cpp b/pcbnew/router/router_preview_item.cpp index 3287082c3c..85a7062b5a 100644 --- a/pcbnew/router/router_preview_item.cpp +++ b/pcbnew/router/router_preview_item.cpp @@ -43,7 +43,6 @@ ROUTER_PREVIEW_ITEM::ROUTER_PREVIEW_ITEM( const PNS_ITEM* aItem, VIEW_GROUP* aPa m_clearance = -1; m_originLayer = m_layer = ITEM_GAL_LAYER ( GP_OVERLAY ); - if( aItem ) Update( aItem ); } @@ -56,60 +55,59 @@ ROUTER_PREVIEW_ITEM::~ROUTER_PREVIEW_ITEM() void ROUTER_PREVIEW_ITEM::Update( const PNS_ITEM* aItem ) { - m_originLayer = aItem->Layers().Start(); - assert (m_originLayer >= 0); + assert( m_originLayer >= 0 ); m_layer = m_originLayer; m_color = getLayerColor( m_originLayer ); m_color.a = 0.8; m_depth = BaseOverlayDepth - aItem->Layers().Start(); - m_shape = aItem->Shape()->Clone(); switch( aItem->Kind() ) { - case PNS_ITEM::LINE: - m_type = PR_SHAPE; - m_width = ((PNS_LINE *) aItem)->Width(); - - break; + case PNS_ITEM::LINE: + m_type = PR_SHAPE; + m_width = ( (PNS_LINE*) aItem )->Width(); - case PNS_ITEM::SEGMENT: - { - PNS_SEGMENT *seg = (PNS_SEGMENT *)aItem; - m_type = PR_SHAPE; - m_width = seg->Width(); - break; - } + break; - case PNS_ITEM::VIA: - m_type = PR_SHAPE; - m_width = 0; - m_color = COLOR4D( 0.7, 0.7, 0.7, 0.8 ); - m_depth = ViaOverlayDepth; - break; - - case PNS_ITEM::SOLID: - m_type = PR_SHAPE; - m_width = 0; - break; + case PNS_ITEM::SEGMENT: + { + PNS_SEGMENT* seg = (PNS_SEGMENT*) aItem; + m_type = PR_SHAPE; + m_width = seg->Width(); + break; + } + + case PNS_ITEM::VIA: + m_type = PR_SHAPE; + m_width = 0; + m_color = COLOR4D( 0.7, 0.7, 0.7, 0.8 ); + m_depth = ViaOverlayDepth; + break; + + case PNS_ITEM::SOLID: + m_type = PR_SHAPE; + m_width = 0; + break; default: break; } - if(aItem->Marker() & MK_VIOLATION) - m_color = COLOR4D (0, 1, 0, 1); + if( aItem->Marker() & MK_VIOLATION ) + m_color = COLOR4D( 0, 1, 0, 1 ); - if(aItem->Marker() & MK_HEAD) - m_color.Brighten(0.7); + if( aItem->Marker() & MK_HEAD ) + m_color.Brighten( 0.7 ); ViewSetVisible( true ); ViewUpdate( GEOMETRY | APPEARANCE ); } + const BOX2I ROUTER_PREVIEW_ITEM::ViewBBox() const { BOX2I bbox; @@ -122,7 +120,7 @@ const BOX2I ROUTER_PREVIEW_ITEM::ViewBBox() const return bbox; case PR_POINT: - bbox = BOX2I ( m_pos - VECTOR2I(100000, 100000), VECTOR2I( 200000, 200000 )); + bbox = BOX2I ( m_pos - VECTOR2I( 100000, 100000 ), VECTOR2I( 200000, 200000 ) ); return bbox; default: @@ -132,20 +130,23 @@ const BOX2I ROUTER_PREVIEW_ITEM::ViewBBox() const return bbox; } -void ROUTER_PREVIEW_ITEM::drawLineChain( const SHAPE_LINE_CHAIN &l, KIGFX::GAL* aGal ) const + +void ROUTER_PREVIEW_ITEM::drawLineChain( const SHAPE_LINE_CHAIN &aL, KIGFX::GAL* aGal ) const { - for( int s = 0; s < l.SegmentCount(); s++ ) - aGal->DrawLine( l.CSegment( s ).A, l.CSegment( s ).B ); - if( l.IsClosed() ) - aGal->DrawLine( l.CSegment( -1 ).B, l.CSegment( 0 ).A ); + for( int s = 0; s < aL.SegmentCount(); s++ ) + aGal->DrawLine( aL.CSegment( s ).A, aL.CSegment( s ).B ); + + if( aL.IsClosed() ) + aGal->DrawLine( aL.CSegment( -1 ).B, aL.CSegment( 0 ).A ); } + void ROUTER_PREVIEW_ITEM::ViewDraw( int aLayer, KIGFX::GAL* aGal ) const { //col.Brighten(0.7); aGal->SetLayerDepth( m_depth ); - if(m_type == PR_SHAPE) + if( m_type == PR_SHAPE ) { aGal->SetLineWidth( m_width ); aGal->SetStrokeColor( m_color ); @@ -153,31 +154,29 @@ void ROUTER_PREVIEW_ITEM::ViewDraw( int aLayer, KIGFX::GAL* aGal ) const aGal->SetIsStroke( m_width ? true : false ); aGal->SetIsFill( true ); - - if(!m_shape) + if( !m_shape ) return; switch( m_shape->Type() ) { case SH_LINE_CHAIN: { - const SHAPE_LINE_CHAIN *l = (const SHAPE_LINE_CHAIN *) m_shape; - drawLineChain(*l, aGal); + const SHAPE_LINE_CHAIN* l = (const SHAPE_LINE_CHAIN*) m_shape; + drawLineChain( *l, aGal ); break; } case SH_SEGMENT: { - const SHAPE_SEGMENT *s = (const SHAPE_SEGMENT *) m_shape; + const SHAPE_SEGMENT* s = (const SHAPE_SEGMENT*) m_shape; aGal->DrawLine( s->GetSeg().A, s->GetSeg().B ); - if(m_clearance > 0) + if( m_clearance > 0 ) { - aGal->SetLayerDepth ( ClearanceOverlayDepth ); - aGal->SetStrokeColor ( COLOR4D( DARKDARKGRAY )); + aGal->SetLayerDepth( ClearanceOverlayDepth ); + aGal->SetStrokeColor( COLOR4D( DARKDARKGRAY )); aGal->SetLineWidth( m_width + 2 * m_clearance ); aGal->DrawLine( s->GetSeg().A, s->GetSeg().B ); - } break; @@ -185,13 +184,13 @@ void ROUTER_PREVIEW_ITEM::ViewDraw( int aLayer, KIGFX::GAL* aGal ) const case SH_CIRCLE: { - const SHAPE_CIRCLE *c = (const SHAPE_CIRCLE *) m_shape; + const SHAPE_CIRCLE* c = (const SHAPE_CIRCLE*) m_shape; aGal->DrawCircle( c->GetCenter(), c->GetRadius() ); - if(m_clearance > 0) + if( m_clearance > 0 ) { - aGal->SetLayerDepth ( ClearanceOverlayDepth ); - aGal->SetFillColor ( COLOR4D( DARKDARKGRAY )); + aGal->SetLayerDepth( ClearanceOverlayDepth ); + aGal->SetFillColor( COLOR4D( DARKDARKGRAY ) ); aGal->SetIsStroke( false ); aGal->DrawCircle( c->GetCenter(), c->GetRadius() + m_clearance ); } @@ -201,20 +200,20 @@ void ROUTER_PREVIEW_ITEM::ViewDraw( int aLayer, KIGFX::GAL* aGal ) const case SH_RECT: { - const SHAPE_RECT *r = (const SHAPE_RECT *) m_shape; - aGal->DrawRectangle (r->GetPosition(), r->GetPosition() + r->GetSize()); + const SHAPE_RECT* r = (const SHAPE_RECT*) m_shape; + aGal->DrawRectangle( r->GetPosition(), r->GetPosition() + r->GetSize() ); - if(m_clearance > 0) + if( m_clearance > 0 ) { - aGal->SetLayerDepth ( ClearanceOverlayDepth ); - VECTOR2I p0 (r -> GetPosition() ), s ( r->GetSize() ); - aGal->SetStrokeColor ( COLOR4D( DARKDARKGRAY )); + aGal->SetLayerDepth( ClearanceOverlayDepth ); + VECTOR2I p0( r->GetPosition() ), s( r->GetSize() ); + aGal->SetStrokeColor( COLOR4D( DARKDARKGRAY ) ); aGal->SetIsStroke( true ); - aGal->SetLineWidth ( 2 * m_clearance ); - aGal->DrawLine( p0, VECTOR2I(p0.x + s.x, p0.y) ); - aGal->DrawLine( p0, VECTOR2I(p0.x, p0.y + s.y) ); - aGal->DrawLine( p0 + s , VECTOR2I(p0.x + s.x, p0.y) ); - aGal->DrawLine( p0 + s, VECTOR2I(p0.x, p0.y + s.y) ); + aGal->SetLineWidth( 2 * m_clearance ); + aGal->DrawLine( p0, VECTOR2I( p0.x + s.x, p0.y ) ); + aGal->DrawLine( p0, VECTOR2I( p0.x, p0.y + s.y ) ); + aGal->DrawLine( p0 + s , VECTOR2I( p0.x + s.x, p0.y ) ); + aGal->DrawLine( p0 + s, VECTOR2I( p0.x, p0.y + s.y ) ); } break; @@ -224,9 +223,8 @@ void ROUTER_PREVIEW_ITEM::ViewDraw( int aLayer, KIGFX::GAL* aGal ) const } -void ROUTER_PREVIEW_ITEM::Line( const SHAPE_LINE_CHAIN& aLine, int aWidth, int aStyle ) +void ROUTER_PREVIEW_ITEM::Line( const SHAPE_LINE_CHAIN& aLine, int aWidth, int aStyle ) { - m_originLayer = m_layer = 0; m_width = aWidth; m_color = assignColor( aStyle ); @@ -234,15 +232,16 @@ void ROUTER_PREVIEW_ITEM::Line( const SHAPE_LINE_CHAIN& aLine, int aWidth, int a m_depth = -2047; m_shape = aLine.Clone(); - ViewSetVisible(true); + ViewSetVisible( true ); ViewUpdate( GEOMETRY | APPEARANCE ); - } -void ROUTER_PREVIEW_ITEM::Point( const VECTOR2I& aPos, int aStyle ) + +void ROUTER_PREVIEW_ITEM::Point( const VECTOR2I& aPos, int aStyle ) { } + void ROUTER_PREVIEW_ITEM::Box( const BOX2I& aBox, int aStyle ) { } @@ -251,7 +250,7 @@ void ROUTER_PREVIEW_ITEM::Box( const BOX2I& aBox, int aStyle ) const COLOR4D ROUTER_PREVIEW_ITEM::getLayerColor( int aLayer ) const { PCB_RENDER_SETTINGS* settings = - static_cast ( m_parent->GetView()->GetPainter()->GetSettings() ); + static_cast( m_parent->GetView()->GetPainter()->GetSettings() ); return settings->GetLayerColor( aLayer ); } diff --git a/pcbnew/router/router_preview_item.h b/pcbnew/router/router_preview_item.h index 514b21dcea..c22e21c5e6 100644 --- a/pcbnew/router/router_preview_item.h +++ b/pcbnew/router/router_preview_item.h @@ -44,13 +44,12 @@ class PNS_ROUTER; class ROUTER_PREVIEW_ITEM : public EDA_ITEM { public: - enum ItemType + enum ITEM_TYPE { PR_STUCK_MARKER = 0, PR_POINT, PR_SHAPE }; - ROUTER_PREVIEW_ITEM( const PNS_ITEM* aItem = NULL, KIGFX::VIEW_GROUP* aParent = NULL ); ~ROUTER_PREVIEW_ITEM(); @@ -68,12 +67,12 @@ public: m_color = aColor; } - void SetClearance ( int aClearance ) + void SetClearance( int aClearance ) { m_clearance = aClearance; } - void Show( int a, std::ostream& b ) const {}; + void Show( int aA, std::ostream& aB ) const {}; const BOX2I ViewBBox() const; @@ -85,7 +84,7 @@ public: aCount = 1; } - void drawLineChain( const SHAPE_LINE_CHAIN &l, KIGFX::GAL *aGal ) const; + void drawLineChain( const SHAPE_LINE_CHAIN& aL, KIGFX::GAL *aGal ) const; private: const KIGFX::COLOR4D assignColor( int aStyle ) const; @@ -94,9 +93,9 @@ private: KIGFX::VIEW_GROUP* m_parent; PNS_ROUTER* m_router; - SHAPE *m_shape; + SHAPE* m_shape; - ItemType m_type; + ITEM_TYPE m_type; int m_style; int m_width; diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index e0f4a2068a..eace67a44f 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -82,35 +82,35 @@ ROUTER_TOOL::ROUTER_TOOL() : m_router = NULL; } + class CONTEXT_TRACK_WIDTH_MENU: public CONTEXT_MENU { public: CONTEXT_TRACK_WIDTH_MENU() { - setCustomEventHandler( boost::bind( &CONTEXT_TRACK_WIDTH_MENU::handleCustomEvent, this, _1 ) ); + setCustomEventHandler( boost::bind( &CONTEXT_TRACK_WIDTH_MENU::handleCustomEvent, + this, _1 ) ); } void SetBoard( BOARD* aBoard ) { - BOARD_DESIGN_SETTINGS &bds = aBoard->GetDesignSettings(); + BOARD_DESIGN_SETTINGS& bds = aBoard->GetDesignSettings(); wxString msg; m_board = aBoard; - Append( ID_POPUP_PCB_SELECT_CUSTOM_WIDTH, _( "Custom size" ), wxEmptyString, wxITEM_CHECK ); + Append( ID_POPUP_PCB_SELECT_CUSTOM_WIDTH, _( "Custom size" ), + wxEmptyString, wxITEM_CHECK ); Append( ID_POPUP_PCB_SELECT_AUTO_WIDTH, _( "Use the starting track width" ), - _( "Route using the width of the starting track." ), - wxITEM_CHECK ); + _( "Route using the width of the starting track." ), wxITEM_CHECK ); - Append( ID_POPUP_PCB_SELECT_USE_NETCLASS_VALUES, - _( "Use netclass values" ), - _( "Use track and via sizes from the net class" ), - wxITEM_CHECK ); + Append( ID_POPUP_PCB_SELECT_USE_NETCLASS_VALUES, _( "Use netclass values" ), + _( "Use track and via sizes from the net class" ), wxITEM_CHECK ); for( unsigned i = 0; i < bds.m_TrackWidthList.size(); i++ ) { - msg = _ ("Track "); + msg = _( "Track "); msg << StringFromValue( g_UserUnit, bds.m_TrackWidthList[i], true ); if( i == 0 ) @@ -123,17 +123,18 @@ public: for( unsigned i = 0; i < bds.m_ViasDimensionsList.size(); i++ ) { - msg = _ ("Via "); - msg << StringFromValue( g_UserUnit, bds.m_ViasDimensionsList[i].m_Diameter, - true ); + msg = _("Via "); + msg << StringFromValue( g_UserUnit, bds.m_ViasDimensionsList[i].m_Diameter, true ); wxString drill = StringFromValue( g_UserUnit, - bds.m_ViasDimensionsList[i].m_Drill, - true ); + bds.m_ViasDimensionsList[i].m_Drill, + true ); if( bds.m_ViasDimensionsList[i].m_Drill <= 0 ) { msg << _ (", drill: default"); - } else { + } + else + { msg << _ (", drill: ") << drill; } @@ -148,7 +149,7 @@ protected: OPT_TOOL_EVENT handleCustomEvent( const wxEvent& aEvent ) { #if ID_POPUP_PCB_SELECT_VIASIZE1 < ID_POPUP_PCB_SELECT_WIDTH1 -#error You have changed event ids, it breaks a piece of code. Lookup this line for more details. +#error You have changed event ids order, it breaks code. Check the source code for more details. // Recognising type of event (track width/via size) is based on comparison if the event id is // within a specific range. If ranges of event ids changes, then the following is not valid anymore. #endif @@ -156,7 +157,7 @@ protected: int id = aEvent.GetId(); - // General settings, to be modified below + // Initial settings, to be modified below bds.m_UseConnectedTrackWidth = false; bds.UseCustomTrackViaSize( false ); @@ -198,13 +199,10 @@ protected: }; -class CONTEXT_GRID_MENU: public CONTEXT_MENU { }; - - -class ROUTER_TOOL_MENU: public CONTEXT_MENU { - +class ROUTER_TOOL_MENU: public CONTEXT_MENU +{ public: - ROUTER_TOOL_MENU( BOARD *aBoard ) + ROUTER_TOOL_MENU( BOARD* aBoard ) { SetTitle( wxT( "Interactive Router" ) ); Add( ACT_NewTrack ); @@ -227,6 +225,7 @@ public: } }; + ROUTER_TOOL::~ROUTER_TOOL() { delete m_router; @@ -259,12 +258,13 @@ int ROUTER_TOOL::getDefaultWidth( int aNetCode ) int w, d1, d2; getNetclassDimensions( aNetCode, w, d1, d2 ); + return w; } void ROUTER_TOOL::getNetclassDimensions( int aNetCode, int& aWidth, - int& aViaDiameter, int& aViaDrill ) +int& aViaDiameter, int& aViaDrill ) { BOARD* board = getModel( PCB_T ); BOARD_DESIGN_SETTINGS &bds = board->GetDesignSettings(); @@ -316,29 +316,29 @@ PNS_ITEM* ROUTER_TOOL::pickSingleItem( const VECTOR2I& aWhere, int aNet, int aLa { if( !prioritized[2] ) prioritized[2] = item; - if( item->Layers().Overlaps( tl )) + if( item->Layers().Overlaps( tl ) ) prioritized[0] = item; } else { - if( !prioritized[3] ) + if( !prioritized[3] ) prioritized[3] = item; - if (item->Layers().Overlaps( tl )) + if( item->Layers().Overlaps( tl ) ) prioritized[1] = item; } } } - PNS_ITEM *rv = NULL; - for(int i = 0; i < 4; i++) + PNS_ITEM* rv = NULL; + for( int i = 0; i < 4; i++ ) { - PNS_ITEM *item = prioritized[i]; + PNS_ITEM* item = prioritized[i]; if( DisplayOpt.ContrastModeDisplay ) if( item && !item->Layers().Overlaps( tl ) ) item = NULL; - if(item) + if( item ) { rv = item; break; @@ -349,12 +349,12 @@ PNS_ITEM* ROUTER_TOOL::pickSingleItem( const VECTOR2I& aWhere, int aNet, int aLa rv = NULL; if( rv ) - TRACE( 0, "%s, layer : %d, tl: %d", rv->KindStr().c_str() % rv->Layers().Start() % - tl ); + TRACE( 0, "%s, layer : %d, tl: %d", rv->KindStr().c_str() % rv->Layers().Start() % tl ); return rv; } + void ROUTER_TOOL::highlightNet( bool aEnabled, int aNetcode ) { RENDER_SETTINGS* rs = getView()->GetPainter()->GetSettings(); @@ -367,22 +367,23 @@ void ROUTER_TOOL::highlightNet( bool aEnabled, int aNetcode ) getView()->UpdateAllLayersColor(); } -void ROUTER_TOOL::handleCommonEvents( TOOL_EVENT& evt ) + +void ROUTER_TOOL::handleCommonEvents( TOOL_EVENT& aEvent ) { #ifdef DEBUG - if( evt.IsKeyPressed() ) - { - switch( evt.KeyCode() ) - { - case 'S': - TRACEn(2, "saving drag/route log...\n"); - m_router->DumpLog(); - break; - } + if( aEvent.IsKeyPressed() ) + { + switch( aEvent.KeyCode() ) + { + case 'S': + TRACEn( 2, "saving drag/route log...\n" ); + m_router->DumpLog(); + break; } + } else #endif - if( evt.IsAction( &ACT_RouterOptions ) ) + if( aEvent.IsAction( &ACT_RouterOptions ) ) { DIALOG_PNS_SETTINGS settingsDlg( m_toolMgr->GetEditFrame(), m_router->Settings() ); @@ -390,7 +391,7 @@ void ROUTER_TOOL::handleCommonEvents( TOOL_EVENT& evt ) m_router->ApplySettings(); } - else if( evt.IsAction( &ACT_CustomTrackWidth ) ) + else if( aEvent.IsAction( &ACT_CustomTrackWidth ) ) { DIALOG_TRACK_VIA_SIZE sizeDlg( m_toolMgr->GetEditFrame(), m_router->Settings() ); BOARD_DESIGN_SETTINGS& bds = getModel( PCB_T )->GetDesignSettings(); @@ -410,7 +411,7 @@ void ROUTER_TOOL::handleCommonEvents( TOOL_EVENT& evt ) handleCommonEvents( event ); } - else if( evt.IsAction( &COMMON_ACTIONS::trackViaSizeChanged ) ) + else if( aEvent.IsAction( &COMMON_ACTIONS::trackViaSizeChanged ) ) { BOARD_DESIGN_SETTINGS& bds = getModel( PCB_T )->GetDesignSettings(); @@ -421,6 +422,7 @@ void ROUTER_TOOL::handleCommonEvents( TOOL_EVENT& evt ) } } + void ROUTER_TOOL::updateStartItem( TOOL_EVENT& aEvent ) { VIEW_CONTROLS* ctls = getViewControls(); @@ -431,14 +433,11 @@ void ROUTER_TOOL::updateStartItem( TOOL_EVENT& aEvent ) if( aEvent.IsMotion() || aEvent.IsClick() ) { VECTOR2I p = aEvent.Position(); - startItem = pickSingleItem( p ); - bool snapEnabled = !aEvent.Modifier(MD_SHIFT); - m_router->EnableSnapping ( snapEnabled ); - if(!snapEnabled && startItem && !startItem->Layers().Overlaps( tl ) ) + if( !snapEnabled && startItem && !startItem->Layers().Overlaps( tl ) ) startItem = NULL; if( startItem && startItem->Net() >= 0 ) @@ -446,10 +445,13 @@ void ROUTER_TOOL::updateStartItem( TOOL_EVENT& aEvent ) bool dummy; VECTOR2I psnap = m_router->SnapToItem( startItem, p, dummy ); - if (snapEnabled) { + if( snapEnabled ) + { m_startSnapPoint = psnap; ctls->ForceCursorPosition( true, psnap ); - } else { + } + else + { m_startSnapPoint = cp; ctls->ForceCursorPosition( false ); } @@ -514,8 +516,7 @@ void ROUTER_TOOL::updateEndItem( TOOL_EVENT& aEvent ) } if( m_endItem ) - TRACE( 0, "%s, layer : %d", m_endItem->KindStr().c_str() % - m_endItem->Layers().Start() ); + TRACE( 0, "%s, layer : %d", m_endItem->KindStr().c_str() % m_endItem->Layers().Start() ); } @@ -573,7 +574,8 @@ void ROUTER_TOOL::performRouting() break; m_router->Move( m_endSnapPoint, m_endItem ); - } else if( evt->IsAction( &ACT_PlaceThroughVia ) ) + } + else if( evt->IsAction( &ACT_PlaceThroughVia ) ) { m_router->ToggleViaPlacement(); frame->SetTopLayer( m_router->GetCurrentLayer() ); @@ -636,7 +638,8 @@ int ROUTER_TOOL::Main( TOOL_EVENT& aEvent ) // Deselect all items m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); - getEditFrame()->SetToolID( ID_TRACK_BUTT, wxCURSOR_PENCIL, _( "Interactive Router" ) ); + getEditFrame()->SetToolID( ID_TRACK_BUTT, wxCURSOR_PENCIL, + _( "Interactive Router" ) ); ctls->SetSnapping( true ); ctls->ShowCursor( true ); @@ -700,7 +703,7 @@ void ROUTER_TOOL::performDragging() bool dragStarted = m_router->StartDragging( m_startSnapPoint, m_startItem ); - if(!dragStarted) + if( !dragStarted ) return; if( m_startItem && m_startItem->Net() >= 0 ) @@ -725,12 +728,11 @@ void ROUTER_TOOL::performDragging() } else if( evt->IsClick( BUT_LEFT ) ) { - if( m_router->FixRoute( m_endSnapPoint, m_endItem ) ) break; - } - handleCommonEvents(*evt); + + handleCommonEvents( *evt ); } if( m_router->RoutingInProgress() ) diff --git a/pcbnew/router/router_tool.h b/pcbnew/router/router_tool.h index e516222470..e2e1119fe3 100644 --- a/pcbnew/router/router_tool.h +++ b/pcbnew/router/router_tool.h @@ -49,7 +49,6 @@ public: int Main( TOOL_EVENT& aEvent ); private: - PNS_ITEM* pickSingleItem( const VECTOR2I& aWhere, int aNet = -1, int aLayer = -1 ); int getDefaultWidth( int aNetCode ); @@ -57,7 +56,7 @@ private: void performRouting(); void performDragging(); - void highlightNet( bool enabled, int netcode = -1 ); + void highlightNet( bool aEnabled, int aNetcode = -1 ); void updateStartItem( TOOL_EVENT& aEvent ); void updateEndItem( TOOL_EVENT& aEvent ); @@ -78,7 +77,6 @@ private: PNS_ITEM* m_endItem; VECTOR2I m_endSnapPoint; - CONTEXT_MENU* m_menu; ///> Flag marking that the router's world needs syncing. diff --git a/pcbnew/router/time_limit.cpp b/pcbnew/router/time_limit.cpp index 0e14a10678..b4cef54869 100644 --- a/pcbnew/router/time_limit.cpp +++ b/pcbnew/router/time_limit.cpp @@ -24,23 +24,28 @@ TIME_LIMIT::TIME_LIMIT( int aMilliseconds ) : m_limitMs( aMilliseconds ) - { - Restart(); - }; +{ + Restart(); +} + + +TIME_LIMIT::~TIME_LIMIT() +{} -TIME_LIMIT::~TIME_LIMIT () {} bool TIME_LIMIT::Expired() const { return ( wxGetLocalTimeMillis().GetValue() - m_startTics ) >= m_limitMs; } + void TIME_LIMIT::Restart() { m_startTics = wxGetLocalTimeMillis().GetValue(); } -void TIME_LIMIT::Set ( int aMilliseconds ) + +void TIME_LIMIT::Set( int aMilliseconds ) { m_limitMs = aMilliseconds; } diff --git a/pcbnew/router/time_limit.h b/pcbnew/router/time_limit.h index fbb58c4156..8c7a07db5e 100644 --- a/pcbnew/router/time_limit.h +++ b/pcbnew/router/time_limit.h @@ -23,22 +23,20 @@ #include -class TIME_LIMIT { - +class TIME_LIMIT +{ public: - TIME_LIMIT( int aMilliseconds = 0); - ~TIME_LIMIT (); + TIME_LIMIT( int aMilliseconds = 0 ); + ~TIME_LIMIT(); bool Expired() const; void Restart(); - void Set ( int aMilliseconds ); + void Set( int aMilliseconds ); private: - int m_limitMs; int64_t m_startTics; }; - -#endif \ No newline at end of file +#endif diff --git a/pcbnew/router/trace.h b/pcbnew/router/trace.h index 7e6fc80980..c115b67881 100644 --- a/pcbnew/router/trace.h +++ b/pcbnew/router/trace.h @@ -25,10 +25,10 @@ #include #include -static inline void _trace_print( const char* aFuncName, int level, const std::string& aMsg ) +static inline void _trace_print( const char* aFuncName, int aLevel, const std::string& aMsg ) { #ifdef DEBUG - std::cerr << "trace[" << level << "]: " << aFuncName << ": " << aMsg << std::endl; + std::cerr << "trace[" << aLevel << "]: " << aFuncName << ": " << aMsg << std::endl; #endif } From 6d17ad712cc3eef720ce63faf230e2e66e3e6465 Mon Sep 17 00:00:00 2001 From: Lorenzo Marcantonio Date: Fri, 16 May 2014 15:57:53 +0200 Subject: [PATCH 426/741] Made the project default text size apply to all text things in eeschema, instead of the hardcoded value --- eeschema/dialogs/dialog_edit_label.cpp | 2 +- eeschema/edit_label.cpp | 2 +- eeschema/eeschema_config.cpp | 21 +++++++++++++++---- eeschema/general.h | 7 ++++++- eeschema/lib_field.cpp | 3 ++- eeschema/lib_pin.cpp | 4 ++-- eeschema/libeditframe.cpp | 6 +++++- eeschema/pinedit.cpp | 28 ++++++++++++++++++++------ eeschema/sch_component.cpp | 2 +- eeschema/sch_sheet.cpp | 5 +++-- eeschema/sch_sheet_pin.cpp | 2 +- eeschema/sch_text.cpp | 8 ++++---- eeschema/schframe.cpp | 2 -- eeschema/sheetlab.cpp | 16 ++++++++++++--- include/eda_text.h | 8 +++++++- include/wxEeschemaStruct.h | 11 +++++----- 16 files changed, 90 insertions(+), 37 deletions(-) diff --git a/eeschema/dialogs/dialog_edit_label.cpp b/eeschema/dialogs/dialog_edit_label.cpp index 91fcc91cda..a8c96451bb 100644 --- a/eeschema/dialogs/dialog_edit_label.cpp +++ b/eeschema/dialogs/dialog_edit_label.cpp @@ -297,7 +297,7 @@ void DIALOG_LABEL_EDITOR::TextPropertiesAccept( wxCommandEvent& aEvent ) // Make the text size the new default size ( if it is a new text ): if( m_CurrentText->IsNew() ) - m_Parent->SetDefaultLabelSize( m_CurrentText->GetSize().x ); + SetDefaultTextSize( m_CurrentText->GetSize().x ); m_Parent->GetCanvas()->RefreshDrawingRect( m_CurrentText->GetBoundingBox() ); m_Parent->GetCanvas()->MoveCursorToCrossHair(); diff --git a/eeschema/edit_label.cpp b/eeschema/edit_label.cpp index c3d8797471..c620571f4b 100644 --- a/eeschema/edit_label.cpp +++ b/eeschema/edit_label.cpp @@ -101,7 +101,7 @@ SCH_TEXT* SCH_EDIT_FRAME::CreateNewText( wxDC* aDC, int aType ) textItem->SetBold( lastTextBold ); textItem->SetItalic( lastTextItalic ); textItem->SetOrientation( lastTextOrientation ); - textItem->SetSize( wxSize( GetDefaultLabelSize(), GetDefaultLabelSize() ) ); + textItem->SetSize( wxSize( GetDefaultTextSize(), GetDefaultTextSize() ) ); textItem->SetFlags( IS_NEW | IS_MOVED ); EditSchematicText( textItem ); diff --git a/eeschema/eeschema_config.cpp b/eeschema/eeschema_config.cpp index ed548ef958..8ece081b1b 100644 --- a/eeschema/eeschema_config.cpp +++ b/eeschema/eeschema_config.cpp @@ -57,7 +57,7 @@ static EDA_COLOR_T s_layerColor[NB_SCH_LAYERS]; -// The width to draw busses that do not have a specific width +/// The width to draw busses that do not have a specific width static int s_defaultBusThickness; int GetDefaultBusThickness() @@ -73,6 +73,19 @@ void SetDefaultBusThickness( int aThickness) s_defaultBusThickness = 1; } +/// Default size for text (not only labels) +static int s_defaultTextSize; + +int GetDefaultTextSize() +{ + return s_defaultTextSize; +} + +void SetDefaultTextSize( int aTextSize ) +{ + s_defaultTextSize = aTextSize; +} + /* * Default line (in Eeschema units) thickness used to draw/plot items having a * default thickness line value (i.e. = 0 ). @@ -283,7 +296,7 @@ void SCH_EDIT_FRAME::OnSetOptions( wxCommandEvent& event ) dlg.SetBusWidth( GetDefaultBusThickness() ); dlg.SetLineWidth( GetDefaultLineThickness() ); dlg.SetPinLength( GetDefaultPinLength() ); - dlg.SetTextSize( GetDefaultLabelSize() ); + dlg.SetTextSize( GetDefaultTextSize() ); dlg.SetRepeatHorizontal( g_RepeatStep.x ); dlg.SetRepeatVertical( g_RepeatStep.y ); dlg.SetRepeatLabel( g_RepeatDeltaLabel ); @@ -332,7 +345,7 @@ void SCH_EDIT_FRAME::OnSetOptions( wxCommandEvent& event ) SetDefaultBusThickness( dlg.GetBusWidth() ); SetDefaultLineThickness( dlg.GetLineWidth() ); SetDefaultPinLength( dlg.GetPinLength() ); - SetDefaultLabelSize( dlg.GetTextSize() ); + SetDefaultTextSize( dlg.GetTextSize() ); g_RepeatStep.x = dlg.GetRepeatHorizontal(); g_RepeatStep.y = dlg.GetRepeatVertical(); g_RepeatDeltaLabel = dlg.GetRepeatLabel(); @@ -404,7 +417,7 @@ PARAM_CFG_ARRAY& SCH_EDIT_FRAME::GetProjectFileParametersList() &g_RepeatDeltaLabel, 1, -10, +10 ) ); m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "LabSize" ), - &m_defaultLabelSize, + &s_defaultTextSize, DEFAULT_SIZE_TEXT, 5, 1000 ) ); diff --git a/eeschema/general.h b/eeschema/general.h index 83d50569b3..828f286d24 100644 --- a/eeschema/general.h +++ b/eeschema/general.h @@ -14,7 +14,6 @@ class SCH_SHEET; #define SCHEMATIC_HEAD_STRING "Schematic File Version" #define TXTMARGE 10 // Offset in mils for placement of labels and pin numbers -#define DEFAULT_TEXT_SIZE 50 // Default size for field texts #define DANGLING_SYMBOL_SIZE 12 #define GR_DEFAULT_DRAWMODE GR_COPY @@ -76,6 +75,12 @@ extern SCH_SHEET* g_RootSheet; int GetDefaultLineThickness(); void SetDefaultLineThickness( int aThickness ); +/** + * Default size for text in general + */ +int GetDefaultTextSize(); +void SetDefaultTextSize( int aSize ); + /** * Default length for new pins in module editor */ diff --git a/eeschema/lib_field.cpp b/eeschema/lib_field.cpp index 36f43f8c0d..83e89a98cd 100644 --- a/eeschema/lib_field.cpp +++ b/eeschema/lib_field.cpp @@ -67,7 +67,8 @@ LIB_FIELD::~LIB_FIELD() void LIB_FIELD::Init( int id ) { m_id = id; - m_Size.x = m_Size.y = DEFAULT_SIZE_TEXT; + m_Size.x = GetDefaultTextSize(); + m_Size.y = GetDefaultTextSize(); m_typeName = _( "Field" ); m_Orient = TEXT_ORIENT_HORIZ; m_rotate = false; diff --git a/eeschema/lib_pin.cpp b/eeschema/lib_pin.cpp index d0fa09b677..1313e5a010 100644 --- a/eeschema/lib_pin.cpp +++ b/eeschema/lib_pin.cpp @@ -208,8 +208,8 @@ LIB_PIN::LIB_PIN( LIB_COMPONENT* aParent ) : m_type = PIN_UNSPECIFIED; // electrical type of pin m_attributes = 0; // bit 0 != 0: pin invisible m_number = 0; // pin number (i.e. 4 ASCII chars) - m_numTextSize = DEFAULT_TEXT_SIZE; - m_nameTextSize = DEFAULT_TEXT_SIZE; // Default size for pin name and num + m_numTextSize = GetDefaultTextSize(); // Default size for pin name and num + m_nameTextSize = GetDefaultTextSize(); m_width = 0; m_typeName = _( "Pin" ); } diff --git a/eeschema/libeditframe.cpp b/eeschema/libeditframe.cpp index 5edc5badb4..379c5bb0cd 100644 --- a/eeschema/libeditframe.cpp +++ b/eeschema/libeditframe.cpp @@ -88,7 +88,7 @@ LIB_ITEM* LIB_EDIT_FRAME::m_lastDrawItem = NULL; LIB_ITEM* LIB_EDIT_FRAME::m_drawItem = NULL; bool LIB_EDIT_FRAME:: m_showDeMorgan = false; wxSize LIB_EDIT_FRAME:: m_clientSize = wxSize( -1, -1 ); -int LIB_EDIT_FRAME:: m_textSize = DEFAULT_SIZE_TEXT; +int LIB_EDIT_FRAME:: m_textSize = -1; int LIB_EDIT_FRAME:: m_textOrientation = TEXT_ORIENT_HORIZ; int LIB_EDIT_FRAME:: m_drawLineWidth = 0; FILL_T LIB_EDIT_FRAME:: m_drawFillStyle = NO_FILL; @@ -203,6 +203,10 @@ LIB_EDIT_FRAME::LIB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : m_HotkeysZoomAndGridList = s_Libedit_Hokeys_Descr; m_editPinsPerPartOrConvert = false; + // Delayed initialization + if( m_textSize == -1 ) + m_textSize = GetDefaultTextSize(); + // Initialize grid id to the default value 50 mils: m_LastGridSizeId = ID_POPUP_GRID_LEVEL_50 - ID_POPUP_GRID_LEVEL_1000; diff --git a/eeschema/pinedit.cpp b/eeschema/pinedit.cpp index 287f9c5233..3755109ccd 100644 --- a/eeschema/pinedit.cpp +++ b/eeschema/pinedit.cpp @@ -59,14 +59,14 @@ static wxPoint PinPreviousPos; static int LastPinType = PIN_INPUT; static int LastPinOrient = PIN_RIGHT; static int LastPinShape = NONE; -static int LastPinNameSize = DEFAULT_TEXT_SIZE; -static int LastPinNumSize = DEFAULT_TEXT_SIZE; static bool LastPinCommonConvert = false; static bool LastPinCommonUnit = false; static bool LastPinVisible = true; // The -1 is a non-valid value to trigger delayed initialization static int LastPinLength = -1; +static int LastPinNameSize = -1; +static int LastPinNumSize = -1; static int GetLastPinLength() { @@ -76,6 +76,22 @@ static int GetLastPinLength() return LastPinLength; } +static int GetLastPinNameSize() +{ + if( LastPinNameSize == -1 ) + LastPinNameSize = GetDefaultTextSize(); + + return LastPinNameSize; +} + +static int GetLastPinNumSize() +{ + if( LastPinNumSize == -1 ) + LastPinNumSize = GetDefaultTextSize(); + + return LastPinNumSize; +} + void LIB_EDIT_FRAME::OnEditPin( wxCommandEvent& event ) { if( m_drawItem == NULL || m_drawItem->Type() != LIB_PIN_T ) @@ -141,9 +157,9 @@ void LIB_EDIT_FRAME::OnEditPin( wxCommandEvent& event ) pin->EnableEditMode( true, m_editPinsPerPartOrConvert ); pin->SetName( dlg.GetName() ); - pin->SetNameTextSize( LastPinNameSize ); + pin->SetNameTextSize( GetLastPinNameSize() ); pin->SetNumber( dlg.GetPadName() ); - pin->SetNumberTextSize( LastPinNumSize ); + pin->SetNumberTextSize( GetLastPinNumSize() ); pin->SetOrientation( LastPinOrient ); pin->SetLength( GetLastPinLength() ); pin->SetType( LastPinType ); @@ -402,8 +418,8 @@ void LIB_EDIT_FRAME::CreatePin( wxDC* DC ) pin->SetOrientation( LastPinOrient ); pin->SetType( LastPinType ); pin->SetShape( LastPinShape ); - pin->SetNameTextSize( LastPinNameSize ); - pin->SetNumberTextSize( LastPinNumSize ); + pin->SetNameTextSize( GetLastPinNameSize() ); + pin->SetNumberTextSize( GetLastPinNumSize() ); pin->SetConvert( LastPinCommonConvert ? 0 : m_convert ); pin->SetUnit( LastPinCommonUnit ? 0 : m_unit ); pin->SetVisible( LastPinVisible ); diff --git a/eeschema/sch_component.cpp b/eeschema/sch_component.cpp index 90903a582a..0ee3715fd2 100644 --- a/eeschema/sch_component.cpp +++ b/eeschema/sch_component.cpp @@ -1311,7 +1311,7 @@ bool SCH_COMPONENT::Load( LINE_READER& aLine, wxString& aErrorMsg ) GetField( fieldNdx )->SetAttributes( attr ); if( (w == 0 ) || (ii == 4) ) - w = DEFAULT_SIZE_TEXT; + w = GetDefaultTextSize(); GetField( fieldNdx )->SetSize( wxSize( w, w ) ); GetField( fieldNdx )->SetOrientation( TEXT_ORIENT_HORIZ ); diff --git a/eeschema/sch_sheet.cpp b/eeschema/sch_sheet.cpp index 95c268dcaa..4d51daa852 100644 --- a/eeschema/sch_sheet.cpp +++ b/eeschema/sch_sheet.cpp @@ -50,7 +50,8 @@ SCH_SHEET::SCH_SHEET( const wxPoint& pos ) : m_pos = pos; m_size = wxSize( MIN_SHEET_WIDTH, MIN_SHEET_HEIGHT ); SetTimeStamp( GetNewTimeStamp() ); - m_sheetNameSize = m_fileNameSize = DEFAULT_TEXT_SIZE; + m_sheetNameSize = GetDefaultTextSize(); + m_fileNameSize = GetDefaultTextSize(); m_screen = NULL; m_name.Printf( wxT( "Sheet%8.8lX" ), m_TimeStamp ); m_fileName.Printf( wxT( "file%8.8lX.sch" ), m_TimeStamp ); @@ -269,7 +270,7 @@ bool SCH_SHEET::Load( LINE_READER& aLine, wxString& aErrorMsg ) } if( size == 0 ) - size = DEFAULT_SIZE_TEXT; + size = GetDefaultTextSize(); if( fieldNdx == 0 ) { diff --git a/eeschema/sch_sheet_pin.cpp b/eeschema/sch_sheet_pin.cpp index 3b3809c2e3..8f6f415052 100644 --- a/eeschema/sch_sheet_pin.cpp +++ b/eeschema/sch_sheet_pin.cpp @@ -307,7 +307,7 @@ bool SCH_SHEET_PIN::Load( LINE_READER& aLine, wxString& aErrorMsg ) m_Text = FROM_UTF8( name ); if( size == 0 ) - size = DEFAULT_SIZE_TEXT; + size = GetDefaultTextSize(); m_Size.x = m_Size.y = size; diff --git a/eeschema/sch_text.cpp b/eeschema/sch_text.cpp index 7893abfa5f..3f80135351 100644 --- a/eeschema/sch_text.cpp +++ b/eeschema/sch_text.cpp @@ -445,7 +445,7 @@ bool SCH_TEXT::Load( LINE_READER& aLine, wxString& aErrorMsg ) } if( size == 0 ) - size = DEFAULT_SIZE_TEXT; + size = GetDefaultTextSize(); char* text = strtok( (char*) aLine, "\n\r" ); @@ -930,7 +930,7 @@ bool SCH_LABEL::Load( LINE_READER& aLine, wxString& aErrorMsg ) } if( size == 0 ) - size = DEFAULT_SIZE_TEXT; + size = GetDefaultTextSize(); char* text = strtok( (char*) aLine, "\n\r" ); @@ -1093,7 +1093,7 @@ bool SCH_GLOBALLABEL::Load( LINE_READER& aLine, wxString& aErrorMsg ) } if( size == 0 ) - size = DEFAULT_SIZE_TEXT; + size = GetDefaultTextSize(); char* text = strtok( (char*) aLine, "\n\r" ); @@ -1524,7 +1524,7 @@ bool SCH_HIERLABEL::Load( LINE_READER& aLine, wxString& aErrorMsg ) } if( size == 0 ) - size = DEFAULT_SIZE_TEXT; + size = GetDefaultTextSize(); char* text = strtok( (char*) aLine, "\n\r" ); diff --git a/eeschema/schframe.cpp b/eeschema/schframe.cpp index fad9539da9..4a46f3047a 100644 --- a/eeschema/schframe.cpp +++ b/eeschema/schframe.cpp @@ -184,7 +184,6 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ): m_showAxis = false; // true to show axis m_showBorderAndTitleBlock = true; // true to show sheet references m_CurrentSheet = new SCH_SHEET_PATH(); - m_TextFieldSize = DEFAULT_SIZE_TEXT; m_DefaultSchematicFileName = NAMELESS_PROJECT; m_DefaultSchematicFileName += wxT( ".sch" ); m_showAllPins = false; @@ -199,7 +198,6 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ): m_hasAutoSave = true; SetForceHVLines( true ); - SetDefaultLabelSize( DEFAULT_SIZE_TEXT ); CreateScreens(); diff --git a/eeschema/sheetlab.cpp b/eeschema/sheetlab.cpp index f9043a226d..9069c1fed9 100644 --- a/eeschema/sheetlab.cpp +++ b/eeschema/sheetlab.cpp @@ -44,9 +44,19 @@ int SCH_EDIT_FRAME::m_lastSheetPinType = NET_INPUT; -wxSize SCH_EDIT_FRAME::m_lastSheetPinTextSize( DEFAULT_SIZE_TEXT, DEFAULT_SIZE_TEXT ); +wxSize SCH_EDIT_FRAME::m_lastSheetPinTextSize( -1, -1 ); wxPoint SCH_EDIT_FRAME::m_lastSheetPinPosition; +const wxSize &SCH_EDIT_FRAME::GetLastSheetPinTextSize() +{ + // Delayed initialization (need the preferences to be loaded) + if( m_lastSheetPinTextSize.x == -1 ) + { + m_lastSheetPinTextSize.x = GetDefaultTextSize(); + m_lastSheetPinTextSize.y = GetDefaultTextSize(); + } + return m_lastSheetPinTextSize; +} int SCH_EDIT_FRAME::EditSheetPin( SCH_SHEET_PIN* aSheetPin, wxDC* aDC ) { @@ -102,7 +112,7 @@ SCH_SHEET_PIN* SCH_EDIT_FRAME::CreateSheetPin( SCH_SHEET* aSheet, wxDC* aDC ) sheetPin = new SCH_SHEET_PIN( aSheet, wxPoint( 0, 0 ), line ); sheetPin->SetFlags( IS_NEW ); - sheetPin->SetSize( m_lastSheetPinTextSize ); + sheetPin->SetSize( GetLastSheetPinTextSize() ); sheetPin->SetShape( m_lastSheetPinType ); int response = EditSheetPin( sheetPin, NULL ); @@ -158,7 +168,7 @@ SCH_SHEET_PIN* SCH_EDIT_FRAME::ImportSheetPin( SCH_SHEET* aSheet, wxDC* aDC ) sheetPin = new SCH_SHEET_PIN( aSheet, wxPoint( 0, 0 ), label->GetText() ); sheetPin->SetFlags( IS_NEW ); - sheetPin->SetSize( m_lastSheetPinTextSize ); + sheetPin->SetSize( GetLastSheetPinTextSize() ); m_lastSheetPinType = label->GetShape(); sheetPin->SetShape( label->GetShape() ); sheetPin->SetPosition( GetCrossHairPosition() ); diff --git a/include/eda_text.h b/include/eda_text.h index a114e56f1a..aa1b6aa7f2 100644 --- a/include/eda_text.h +++ b/include/eda_text.h @@ -60,7 +60,13 @@ enum EDA_DRAW_MODE_T { }; -#define DEFAULT_SIZE_TEXT 60 /* default text height (in mils or 1/1000") */ +/** This is the "default-of-the-default" hardcoded text size; individual + * application define their own default policy starting with this + * (usually with a user option or project). DO NOT change this value if + * you do not fully realize the effect it has on sexp serialization + * (text size equal to this is not explicitly wrote, so it would change + * subsequent reads) */ +#define DEFAULT_SIZE_TEXT 60 // default text height (in mils, i.e. 1/1000") #define TEXT_NO_VISIBLE 1 //< EDA_TEXT::m_Attribut(e?) visibility flag. #define DIM_ANCRE_TEXTE 2 // Anchor size for text diff --git a/include/wxEeschemaStruct.h b/include/wxEeschemaStruct.h index 852b65c3fc..34d8dc8555 100644 --- a/include/wxEeschemaStruct.h +++ b/include/wxEeschemaStruct.h @@ -118,7 +118,6 @@ private: SCH_SHEET_PATH* m_CurrentSheet; ///< which sheet we are presently working on. wxString m_DefaultSchematicFileName; - int m_TextFieldSize; PARAM_CFG_ARRAY m_projectFileParams; PARAM_CFG_ARRAY m_configSettings; wxPageSetupDialogData m_pageSetupData; @@ -146,8 +145,6 @@ private: ///< generator. bool m_forceHVLines; ///< force H or V directions for wires, bus, line - int m_defaultLabelSize; ///< size of a new label - /// An index to the last find item in the found items list #m_foundItems. int m_foundItemIndex; @@ -172,6 +169,11 @@ private: protected: TEMPLATES m_TemplateFieldNames; + /** + * Initializing accessor for the pin text size + */ + const wxSize &GetLastSheetPinTextSize(); + /** * Function doAutoSave * saves the schematic files that have been modified and not yet saved. @@ -205,9 +207,6 @@ public: void OnCloseWindow( wxCloseEvent& Event ); - int GetDefaultLabelSize() const { return m_defaultLabelSize; } - void SetDefaultLabelSize( int aLabelSize ) { m_defaultLabelSize = aLabelSize; } - bool GetForceHVLines() const { return m_forceHVLines; } void SetForceHVLines( bool aForceHVdirection ) { m_forceHVLines = aForceHVdirection; } From 51ee6916ec06d382eed93f9d45d94e7ce4eb0712 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 16 May 2014 16:01:03 +0200 Subject: [PATCH 427/741] Removed header files from CMakeLists.txt. --- pcbnew/router/CMakeLists.txt | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/pcbnew/router/CMakeLists.txt b/pcbnew/router/CMakeLists.txt index 94d89b771c..411216441f 100644 --- a/pcbnew/router/CMakeLists.txt +++ b/pcbnew/router/CMakeLists.txt @@ -10,51 +10,26 @@ include_directories( ) set( PCBNEW_PNS_SRCS - direction.h - time_limit.h time_limit.cpp - trace.h - pns_algo_base.h pns_algo_base.cpp pns_dragger.cpp - pns_dragger.h - pns_index.h - pns_item.h pns_item.cpp - pns_itemset.h pns_itemset.cpp - pns_joint.h - pns_layerset.h - pns_line.h pns_line.cpp - pns_line_placer.h pns_line_placer.cpp - pns_logger.h pns_logger.cpp - pns_node.h pns_node.cpp - pns_optimizer.h pns_optimizer.cpp - pns_router.h pns_router.cpp - pns_routing_settings.h pns_routing_settings.cpp - pns_segment.h - pns_shove.h pns_shove.cpp - pns_solid.h pns_solid.cpp - pns_utils.h pns_utils.cpp - pns_via.h pns_via.cpp - pns_walkaround.h pns_walkaround.cpp router_preview_item.cpp - router_preview_item.h router_tool.cpp - router_tool.h ) add_library( pnsrouter STATIC ${PCBNEW_PNS_SRCS} ) From 645e17684d95e76f3591617072d66397f3fa7ad1 Mon Sep 17 00:00:00 2001 From: Lorenzo Marcantonio Date: Fri, 16 May 2014 19:43:27 +0200 Subject: [PATCH 428/741] Pull unfilled polygon drawing thru the line clipper; GTK mess up even in this case and the sheet border lines glitch on the screen at high zoom otherwise in pcbnew. --- common/gr_basic.cpp | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/common/gr_basic.cpp b/common/gr_basic.cpp index f46ca2ad17..c97ec7d8dc 100644 --- a/common/gr_basic.cpp +++ b/common/gr_basic.cpp @@ -805,15 +805,11 @@ static void GRSPoly( EDA_RECT* ClipBox, wxDC* DC, int n, wxPoint Points[], } else { - wxPoint endPt = Points[n - 1]; - - GRSetBrush( DC, Color ); - DC->DrawLines( n, Points ); - - // The last point is not drawn by DrawLine and DrawLines - // Add it if the polygon is not closed - if( endPt != Points[0] ) - DC->DrawPoint( endPt.x, endPt.y ); + GRMoveTo( Points[0].x, Points[0].y ); + for( int i = 1; i < n; ++i ) + { + GRLineTo( ClipBox, DC, Points[i].x, Points[i].y, width, Color ); + } } } @@ -841,16 +837,18 @@ static void GRSClosedPoly( EDA_RECT* aClipBox, wxDC* aDC, } else { - GRSetBrush( aDC, aBgColor ); - aDC->DrawLines( aPointCount, aPoints ); + GRMoveTo( aPoints[0].x, aPoints[0].y ); + for( int i = 1; i < aPointCount; ++i ) + { + GRLineTo( aClipBox, aDC, aPoints[i].x, aPoints[i].y, aWidth, aColor ); + } int lastpt = aPointCount - 1; - /* Close the polygon. */ + + // Close the polygon if( aPoints[lastpt] != aPoints[0] ) { - GRLine( aClipBox, aDC, aPoints[0].x, aPoints[0].y, - aPoints[lastpt].x, aPoints[lastpt].y, - aWidth, aColor ); + GRLineTo( aClipBox, aDC, aPoints[lastpt].x, aPoints[lastpt].y, aWidth, aColor ); } } } From 41e41b95f8adee77d531442b300d6e5bd96699af Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 16 May 2014 21:03:45 +0200 Subject: [PATCH 429/741] Plot DXF: better generation of filled zone polygons. --- common/CMakeLists.txt | 2 +- common/common_plotDXF_functions.cpp | 103 +- common/common_plotGERBER_functions.cpp | 23 +- common/common_plotHPGL_functions.cpp | 2 + .../dialog_libedit_dimensions_base.fbp | 2238 ++++++++--------- pcbnew/dialogs/dialog_plot.cpp | 2 + pcbnew/plot_brditems_plotter.cpp | 17 +- 7 files changed, 1235 insertions(+), 1152 deletions(-) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 07da514a8e..5ecc8f8232 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -163,6 +163,7 @@ set( COMMON_SRCS config_params.cpp confirm.cpp copy_to_clipboard.cpp + convert_basic_shapes_to_polygon.cpp dialog_shim.cpp displlst.cpp draw_frame.cpp @@ -247,7 +248,6 @@ set( PCB_COMMON_SRCS base_screen.cpp eda_text.cpp class_page_info.cpp - convert_basic_shapes_to_polygon.cpp pcbcommon.cpp footprint_info.cpp ../pcbnew/basepcbframe.cpp diff --git a/common/common_plotDXF_functions.cpp b/common/common_plotDXF_functions.cpp index 89aabe2f73..fbca11328f 100644 --- a/common/common_plotDXF_functions.cpp +++ b/common/common_plotDXF_functions.cpp @@ -11,6 +11,7 @@ #include #include #include +#include /** * Oblique angle for DXF native text @@ -319,35 +320,43 @@ void DXF_PLOTTER::Circle( const wxPoint& centre, int diameter, FILL_T fill, int /** * DXF polygon: doesn't fill it but at least it close the filled ones + * DXF does not know thick outline. + * It does not know thhick segments, therefore filled polygons with thick outline + * are converted to inflated polygon by aWidth/2 */ +#include "clipper.hpp" void DXF_PLOTTER::PlotPoly( const std::vector< wxPoint >& aCornerList, FILL_T aFill, int aWidth) { if( aCornerList.size() <= 1 ) return; + unsigned last = aCornerList.size() - 1; + // Plot outlines with lines (thickness = 0) to define the polygon - if( aWidth == 0 || aFill ) + if( aWidth <= 0 ) { MoveTo( aCornerList[0] ); for( unsigned ii = 1; ii < aCornerList.size(); ii++ ) LineTo( aCornerList[ii] ); + + // Close polygon if 'fill' requested + if( aFill ) + { + if( aCornerList[last] != aCornerList[0] ) + LineTo( aCornerList[0] ); + } + + PenFinish(); + + return; } - // Close polygon if 'fill' requested - unsigned last = aCornerList.size() - 1; - if( aFill ) - { - if( aCornerList[last] != aCornerList[0] ) - LineTo( aCornerList[0] ); - } - - PenFinish(); - - // if the polygon outline has thickness, plot outlines with thick segments - if( aWidth > 0 ) + // if the polygon outline has thickness, and is not filled + // (i.e. is a polyline) plot outlines with thick segments + if( aWidth > 0 && !aFill ) { MoveTo( aCornerList[0] ); @@ -355,10 +364,72 @@ void DXF_PLOTTER::PlotPoly( const std::vector< wxPoint >& aCornerList, ThickSegment( aCornerList[ii-1], aCornerList[ii], aWidth, FILLED ); - if( aCornerList[last] != aCornerList[0] ) - ThickSegment( aCornerList[last], aCornerList[0], - aWidth, FILLED ); + return; } + + // The polygon outline has thickness, and is filled + // Build and plot the polygon which contains the initial + // polygon and its thick outline + CPOLYGONS_LIST bufferOutline; + CPOLYGONS_LIST bufferPolybase; + const int circleToSegmentsCount = 16; + + // enter outline as polygon: + for( unsigned ii = 1; ii < aCornerList.size(); ii++ ) + { + TransformRoundedEndsSegmentToPolygon( bufferOutline, + aCornerList[ii-1], aCornerList[ii], circleToSegmentsCount, aWidth ); + } + + // enter the initial polygon: + for( unsigned ii = 0; ii < aCornerList.size(); ii++ ) + { + CPolyPt polypoint( aCornerList[ii].x, aCornerList[ii].y ); + bufferPolybase.Append( polypoint ); + } + + bufferPolybase.CloseLastContour(); + + // Merge polygons to build the polygon which contains the initial + // polygon and its thick outline + KI_POLYGON_SET polysBase; // Store the main outline and the final outline + KI_POLYGON_SET polysOutline; // Store the thick segments to draw the outline + bufferPolybase.ExportTo( polysBase ); + bufferOutline.ExportTo( polysOutline ); + + polysBase += polysOutline; // create the outline which contains thick outline + + // We should have only one polygon in list, now. + wxASSERT( polysBase.size() == 1 ); + + if( polysBase.size() < 1 ) // should not happen + return; + + KI_POLYGON poly = polysBase[0]; // Expected only one polygon here + + if( poly.size() < 2 ) // should not happen + return; + + // Now, output the final polygon to DXF file: + last = poly.size() - 1; + KI_POLY_POINT point = *(poly.begin()); + wxPoint startPoint( point.x(), point.y() ); + MoveTo( startPoint ); + + for( unsigned ii = 1; ii < poly.size(); ii++ ) + { + point = *( poly.begin() + ii ); + LineTo( wxPoint( point.x(), point.y() ) ); + } + + // Close polygon, if needed + point = *(poly.begin() + last); + wxPoint endPoint( point.x(), point.y() ); + + if( endPoint != startPoint ) + LineTo( startPoint ); + + PenFinish(); } diff --git a/common/common_plotGERBER_functions.cpp b/common/common_plotGERBER_functions.cpp index e8b5273ded..c0b1d418c3 100644 --- a/common/common_plotGERBER_functions.cpp +++ b/common/common_plotGERBER_functions.cpp @@ -325,25 +325,32 @@ void GERBER_PLOTTER::PlotPoly( const std::vector< wxPoint >& aCornerList, if( aCornerList.size() <= 1 ) return; + // Gerber format does not know filled polygons with thick outline + // Thereore, to plot a filled polygon with outline having a thickness, + // one should plot outline as thick segments + SetCurrentLineWidth( aWidth ); if( aFill ) + { fputs( "G36*\n", outputFile ); - MoveTo( aCornerList[0] ); + MoveTo( aCornerList[0] ); - for( unsigned ii = 1; ii < aCornerList.size(); ii++ ) - { - LineTo( aCornerList[ii] ); - } + for( unsigned ii = 1; ii < aCornerList.size(); ii++ ) + LineTo( aCornerList[ii] ); - if( aFill ) - { FinishTo( aCornerList[0] ); fputs( "G37*\n", outputFile ); } - else + + if( aWidth > 0 ) { + MoveTo( aCornerList[0] ); + + for( unsigned ii = 1; ii < aCornerList.size(); ii++ ) + LineTo( aCornerList[ii] ); + PenFinish(); } } diff --git a/common/common_plotHPGL_functions.cpp b/common/common_plotHPGL_functions.cpp index d3ff46b6f4..8498b0491b 100644 --- a/common/common_plotHPGL_functions.cpp +++ b/common/common_plotHPGL_functions.cpp @@ -264,6 +264,8 @@ void HPGL_PLOTTER::PlotPoly( const std::vector& aCornerList, if( aCornerList.size() <= 1 ) return; + SetCurrentLineWidth( aWidth ); + MoveTo( aCornerList[0] ); for( unsigned ii = 1; ii < aCornerList.size(); ii++ ) diff --git a/eeschema/dialogs/dialog_libedit_dimensions_base.fbp b/eeschema/dialogs/dialog_libedit_dimensions_base.fbp index 0b76d9a183..0c3540751b 100644 --- a/eeschema/dialogs/dialog_libedit_dimensions_base.fbp +++ b/eeschema/dialogs/dialog_libedit_dimensions_base.fbp @@ -1,8 +1,8 @@ - + - + C++ 1 UTF-8 @@ -12,66 +12,66 @@ none 1 dialog_libedit_dimensions_base - + . - + 1 1 0 - + wxBOTH - + 1 - - - + + + 0 wxID_ANY - - + + DIALOG_LIBEDIT_DIMENSIONS_BASE - + 412,349 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER - + Library Editor Options - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + mainSizer wxVERTICAL none @@ -83,9 +83,9 @@ 3 wxHORIZONTAL 0,1,2 - + 0 - + fgSizer1 wxFLEX_GROWMODE_SPECIFIED none @@ -96,50 +96,50 @@ wxALIGN_CENTER_VERTICAL|wxALL 1 - - + + 1 - - + + 0 wxID_ANY &Grid size: - - + + m_staticText3 protected - - - - - - - - + + + + + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -147,50 +147,50 @@ wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND 0 - + "50" "25" "10" "5" "2" "1" - + 1 - - + + 0 wxID_ANY - - + + m_choiceGridSize protected - + 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -198,50 +198,50 @@ wxALIGN_CENTER_VERTICAL|wxALL 0 - - + + 1 - - + + 0 wxID_ANY mils - - + + m_staticGridUnits protected - - - - - - - - + + + + + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -249,50 +249,50 @@ wxALIGN_CENTER_VERTICAL|wxALL 1 - - + + 1 - - + + 0 wxID_ANY Current graphic &line width: - - + + m_staticText5 protected - - - - - - - - + + + + + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -300,54 +300,54 @@ wxALL|wxEXPAND 0 - - + + 1 - - + + 0 wxID_ANY - + 0 - + m_CurrentGraphicLineThicknessCtrl protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -355,50 +355,50 @@ wxALIGN_CENTER_VERTICAL|wxALL 0 - - + + 1 - - + + 0 wxID_ANY mils - - + + m_staticLineWidthUnits protected - - - - - - - - + + + + + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -406,50 +406,50 @@ wxALIGN_CENTER_VERTICAL|wxALL 1 - - + + 1 - - + + 0 wxID_ANY Current graphic text &size: - - + + m_staticText7 protected - - - - - - - - + + + + + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -457,54 +457,54 @@ wxALL|wxEXPAND 0 - - + + 1 - - + + 0 wxID_ANY - + 0 - + m_CurrentGraphicTextSizeCtrl protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -512,50 +512,50 @@ wxALIGN_CENTER_VERTICAL|wxALL 0 - - + + 1 - - + + 0 wxID_ANY mils - - + + m_staticTextSizeUnits protected - - - - - - - - + + + + + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -563,50 +563,50 @@ wxALIGN_CENTER_VERTICAL|wxALL 1 - - + + 1 - - + + 0 wxID_ANY Repeat draw item &horizontal displacement: - - + + m_staticText9 protected - - - - - - - - + + + + + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -614,50 +614,50 @@ wxALL|wxEXPAND 0 - + "50" "25" - + 1 - - + + 0 wxID_ANY - - + + m_choiceRepeatHorizontal protected - + 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -665,50 +665,50 @@ wxALIGN_CENTER_VERTICAL|wxALL 0 - - + + 1 - - + + 0 wxID_ANY mils - - + + m_staticRepeatXUnits protected - - - - - - - - + + + + + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -716,50 +716,50 @@ wxALIGN_CENTER_VERTICAL|wxALL 1 - - + + 1 - - + + 0 wxID_ANY Repeat draw item &vertical displacement: - - + + m_staticText12 protected - - - - - - - - + + + + + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -767,50 +767,50 @@ wxALL|wxEXPAND 0 - + "50" "25" - + 1 - - + + 0 wxID_ANY - - + + m_choiceRepeatVertical protected - + 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -818,50 +818,50 @@ wxALIGN_CENTER_VERTICAL|wxALL 0 - - + + 1 - - + + 0 wxID_ANY mils - - + + m_staticRepeatYUnits protected - - - - - - - - + + + + + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -869,50 +869,50 @@ wxALL|wxALIGN_CENTER_VERTICAL 0 - - + + 1 - - + + 0 wxID_ANY Current &pin lenght: - - + + m_staticText15 protected - - - - - - - - + + + + + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -920,54 +920,54 @@ wxEXPAND|wxALL 0 - - + + 1 - - + + 0 wxID_ANY - + 0 - + m_CurrentPinLenghtCtrl protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -975,50 +975,50 @@ wxALL 0 - - + + 1 - - + + 0 wxID_ANY mils - - + + m_staticText161 protected - - - - - - - - + + + + + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1026,50 +1026,50 @@ wxALL|wxALIGN_CENTER_VERTICAL 0 - - + + 1 - - + + 0 wxID_ANY Current pin name size: - - + + m_CurrentPinNameSizeText protected - - - - - - - - + + + + + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1077,54 +1077,54 @@ wxALL|wxEXPAND 0 - - + + 1 - - + + 0 wxID_ANY - + 0 - + m_CurrentPinNameSizeCtrl protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1132,50 +1132,50 @@ wxALL 0 - - + + 1 - - + + 0 wxID_ANY mils - - + + m_staticText18 protected - - - - - - - - + + + + + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1183,50 +1183,50 @@ wxALL|wxALIGN_CENTER_VERTICAL 0 - - + + 1 - - + + 0 wxID_ANY Current pin number size: - - + + m_CurrentPinNumberSizeText protected - - - - - - - - + + + + + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1234,54 +1234,54 @@ wxALL|wxEXPAND 0 - - + + 1 - - + + 0 wxID_ANY - + 0 - + m_CurrentPinNumberSizeCtrl protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1289,50 +1289,50 @@ wxALL 0 - - + + 1 - - + + 0 wxID_ANY mils - - + + m_staticText20 protected - - - - - - - - + + + + + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1340,50 +1340,50 @@ wxALL|wxALIGN_CENTER_VERTICAL 0 - - + + 1 - - + + 0 wxID_ANY &Repeat pin number increment: - - + + m_staticText16 protected - - - - - - - - + + + + + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1391,54 +1391,54 @@ wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND 0 - - + + 1 - - + + 0 wxID_ANY 1 10 - + 0 - + m_spinRepeatLabel protected - - + + wxSP_ARROW_KEYS|wxSP_WRAP - - + + 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1458,48 +1458,48 @@ wxEXPAND | wxALL 0 - - + + 1 - - + + 0 wxID_ANY - - + + m_staticline1 protected - - + + wxLI_HORIZONTAL - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1507,7 +1507,7 @@ wxALIGN_RIGHT 0 - + bSizerBttons wxHORIZONTAL none @@ -1516,51 +1516,51 @@ wxALL 0 - - + + 0 1 - - + + 0 wxID_ANY Save as Default - - + + m_buttonSave protected - - - - - - - - + + + + + + + + OnSaveSetupClick - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1576,17 +1576,17 @@ 1 0 0 - + m_sdbSizer1 protected - + OnCancelClick - - - + + + OnOkClick - - + + diff --git a/pcbnew/dialogs/dialog_plot.cpp b/pcbnew/dialogs/dialog_plot.cpp index 3b2550e931..bf9e0d28ac 100644 --- a/pcbnew/dialogs/dialog_plot.cpp +++ b/pcbnew/dialogs/dialog_plot.cpp @@ -775,6 +775,8 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event ) // Save the current plot options in the board m_parent->SetPlotSettings( m_plotOpts ); + wxBusyCursor dummy; + for( LAYER_NUM layer = FIRST_LAYER; layer < NB_PCB_LAYERS; ++layer ) { if( m_plotOpts.GetLayerSelection() & GetLayerMask( layer ) ) diff --git a/pcbnew/plot_brditems_plotter.cpp b/pcbnew/plot_brditems_plotter.cpp index 00dbeede81..3926012958 100644 --- a/pcbnew/plot_brditems_plotter.cpp +++ b/pcbnew/plot_brditems_plotter.cpp @@ -539,13 +539,14 @@ void BRDITEMS_PLOTTER::PlotFilledAreas( ZONE_CONTAINER* aZone ) // Plot the current filled area and its outline if( GetMode() == FILLED ) { - // Plot the current filled area polygon - if( aZone->GetFillMode() == 0 ) // We are using solid polygons - { // (if != 0: using segments ) - m_plotter->PlotPoly( cornerList, FILLED_SHAPE ); + // Plot the filled area polygon. + // The area can be filled by segments or uses solid polygons + if( aZone->GetFillMode() == 0 ) // We are using solid polygons + { + m_plotter->PlotPoly( cornerList, FILLED_SHAPE, aZone->GetMinThickness() ); } - else // We are using areas filled by - { // segments: plot them ) + else // We are using areas filled by segments: plot segments and outline + { for( unsigned iseg = 0; iseg < aZone->FillSegments().size(); iseg++ ) { wxPoint start = aZone->FillSegments()[iseg].m_Start; @@ -554,11 +555,11 @@ void BRDITEMS_PLOTTER::PlotFilledAreas( ZONE_CONTAINER* aZone ) aZone->GetMinThickness(), GetMode() ); } - } - // Plot the current filled area outline + // Plot the area outline only if( aZone->GetMinThickness() > 0 ) m_plotter->PlotPoly( cornerList, NO_FILL, aZone->GetMinThickness() ); + } } else { From 073a9e17240c2496d7278fd751f570f70991bf37 Mon Sep 17 00:00:00 2001 From: Lorenzo Marcantonio Date: Sat, 17 May 2014 19:36:02 +0200 Subject: [PATCH 430/741] TRACK::GetTrack can now be told to confine search to the netlist and/or force the sequential (restartable) algorithm Reworked the collinear track routines. Cleanup should be faster given the above modification. --- pcbnew/class_track.cpp | 158 +++++++++----------------------- pcbnew/class_track.h | 7 +- pcbnew/clean.cpp | 166 ++++++++++------------------------ pcbnew/move_or_drag_track.cpp | 8 +- 4 files changed, 104 insertions(+), 235 deletions(-) diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index 130104e0b1..ace8ca96ef 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -66,28 +66,6 @@ static bool ShowClearance( const TRACK* aTrack ) } -/* - * return true if the dist between p1 and p2 < max_dist - * Currently in test (currently ratsnest algos work only if p1 == p2) - */ -inline bool IsNear( const wxPoint& p1, const wxPoint& p2, int max_dist ) -{ -#if 0 // Do not change it: does not work - int dist; - dist = abs( p1.x - p2.x ) + abs( p1.y - p2.y ); - dist *= 7; - dist /= 10; - - if ( dist < max_dist ) - return true; -#else - if ( p1 == p2 ) - return true; -#endif - return false; -} - - TRACK* GetTrack( TRACK* aStartTrace, const TRACK* aEndTrace, const wxPoint& aPosition, LAYER_MSK aLayerMask ) { @@ -1303,125 +1281,79 @@ VIA* TRACK::GetVia( TRACK* aEndTrace, const wxPoint& aPosition, LAYER_MSK aLayer } -TRACK* TRACK::GetTrack( TRACK* aStartTrace, TRACK* aEndTrace, ENDPOINT_T aEndPoint ) +TRACK* TRACK::GetTrack( TRACK* aStartTrace, TRACK* aEndTrace, ENDPOINT_T aEndPoint, + bool aSameNetOnly, bool aSequential ) { - const int NEIGHTBOUR_COUNT_MAX = 50; - - TRACK* previousSegment; - TRACK* nextSegment; - int Reflayer; - int ii; - int max_dist; const wxPoint &position = GetEndPoint( aEndPoint ); + LAYER_MSK refLayers = GetLayerMask(); + TRACK *previousSegment; + TRACK *nextSegment; - Reflayer = GetLayerMask(); - - previousSegment = nextSegment = this; - - // Local search: - for( ii = 0; ii < NEIGHTBOUR_COUNT_MAX; ii++ ) + if( aSequential ) { - if( (nextSegment == NULL) && (previousSegment == NULL) ) - break; + // Simple sequential search: from aStartTrace forward to aEndTrace + previousSegment = NULL; + nextSegment = aStartTrace; + } + else + { + /* Local bidirectional search: from this backward to aStartTrace + * AND forward to aEndTrace. The idea is that nearest segments + * are found (on average) faster in this way. In fact same-net + * segments are almost guaranteed to be found faster, in a global + * search, since they are grouped together in the track list */ + previousSegment = this; + nextSegment = this; + } + + while( nextSegment || previousSegment ) + { + // Terminate the search in the direction if the netcode mismatches + if( aSameNetOnly ) + { + if( nextSegment && (nextSegment->GetNetCode() != GetNetCode()) ) + nextSegment = NULL; + if( previousSegment && (previousSegment->GetNetCode() != GetNetCode()) ) + previousSegment = NULL; + } if( nextSegment ) { - if( nextSegment->GetState( BUSY | IS_DELETED ) ) - goto suite; - - if( nextSegment == this ) - goto suite; - - /* max_dist is the max distance between 2 track ends which - * ensure a copper continuity */ - max_dist = ( nextSegment->m_Width + this->m_Width ) / 2; - - if( IsNear( position, nextSegment->m_Start, max_dist ) ) + if ( (nextSegment != this) && + !nextSegment->GetState( BUSY | IS_DELETED ) && + (refLayers & nextSegment->GetLayerMask()) ) { - if( Reflayer & nextSegment->GetLayerMask() ) + if( (position == nextSegment->m_Start) || + (position == nextSegment->m_End) ) return nextSegment; } - if( IsNear( position, nextSegment->m_End, max_dist ) ) - { - if( Reflayer & nextSegment->GetLayerMask() ) - return nextSegment; - } -suite: + // Keep looking forward if( nextSegment == aEndTrace ) nextSegment = NULL; else - nextSegment = nextSegment->Next(); + nextSegment = nextSegment->Next(); } + // Same as above, looking back. During sequential search this branch is inactive if( previousSegment ) { - if( previousSegment->GetState( BUSY | IS_DELETED ) ) - goto suite1; - - if( previousSegment == this ) - goto suite1; - - max_dist = ( previousSegment->m_Width + m_Width ) / 2; - - if( IsNear( position, previousSegment->m_Start, max_dist ) ) + if ( (previousSegment != this) && + !previousSegment->GetState( BUSY | IS_DELETED ) && + (refLayers & previousSegment->GetLayerMask()) ) { - if( Reflayer & previousSegment->GetLayerMask() ) + if( (position == previousSegment->m_Start) || + (position == previousSegment->m_End) ) return previousSegment; } - if( IsNear( position, previousSegment->m_End, max_dist ) ) - { - if( Reflayer & previousSegment->GetLayerMask() ) - return previousSegment; - } -suite1: if( previousSegment == aStartTrace ) previousSegment = NULL; - else if( previousSegment->Type() != PCB_T ) - previousSegment = previousSegment->Back(); else - previousSegment = NULL; + previousSegment = previousSegment->Back(); } } - // General search - for( nextSegment = aStartTrace; nextSegment != NULL; nextSegment = nextSegment->Next() ) - { - if( nextSegment->GetState( IS_DELETED | BUSY ) ) - { - if( nextSegment == aEndTrace ) - break; - - continue; - } - - if( nextSegment == this ) - { - if( nextSegment == aEndTrace ) - break; - - continue; - } - - max_dist = ( nextSegment->m_Width + m_Width ) / 2; - - if( IsNear( position, nextSegment->m_Start, max_dist ) ) - { - if( Reflayer & nextSegment->GetLayerMask() ) - return nextSegment; - } - - if( IsNear( position, nextSegment->m_End, max_dist ) ) - { - if( Reflayer & nextSegment->GetLayerMask() ) - return nextSegment; - } - - if( nextSegment == aEndTrace ) - break; - } - return NULL; } diff --git a/pcbnew/class_track.h b/pcbnew/class_track.h index c5ca9d03d7..58994bdff0 100644 --- a/pcbnew/class_track.h +++ b/pcbnew/class_track.h @@ -261,9 +261,14 @@ public: * @param aEndTrace A pointer to the TRACK object to stop the search. A NULL value * searches to the end of the list. * @param aEndPoint The start or end point of the segment to test against. + * @param aSameNetOnly if true stop searching when the netcode changes + * @param aSequential If true, forces a forward sequential search, + * which is restartable; the default search can be faster but the + * position of the returned track in the list is unpredictable * @return A TRACK object pointer if found otherwise NULL. */ - TRACK* GetTrack( TRACK* aStartTrace, TRACK* aEndTrace, ENDPOINT_T aEndPoint ); + TRACK* GetTrack( TRACK* aStartTrace, TRACK* aEndTrace, ENDPOINT_T aEndPoint, + bool aSameNetOnly, bool aSequential ); /** * Function GetEndSegments diff --git a/pcbnew/clean.cpp b/pcbnew/clean.cpp index fce7fd632c..ecf08d4012 100644 --- a/pcbnew/clean.cpp +++ b/pcbnew/clean.cpp @@ -303,7 +303,7 @@ bool TRACKS_CLEANER::testTrackEndpointDangling( TRACK *aTrack, ENDPOINT_T aEndPo { bool flag_erase = false; - TRACK* other = aTrack->GetTrack( m_Brd->m_Track, NULL, aEndPoint ); + TRACK* other = aTrack->GetTrack( m_Brd->m_Track, NULL, aEndPoint, true, false ); if( (other == NULL) && (zoneForTrackEndpoint( aTrack, aEndPoint ) == NULL) ) flag_erase = true; // Start endpoint is neither on pad, zone or other track @@ -324,7 +324,7 @@ bool TRACKS_CLEANER::testTrackEndpointDangling( TRACK *aTrack, ENDPOINT_T aEndPo // search for another segment following the via aTrack->SetState( BUSY, true ); - other = via->GetTrack( m_Brd->m_Track, NULL, aEndPoint ); + other = via->GetTrack( m_Brd->m_Track, NULL, aEndPoint, true, false ); // There is a via on the start but it goes nowhere if( (other == NULL) && @@ -450,95 +450,50 @@ bool TRACKS_CLEANER::remove_duplicates_of_track( const TRACK *aTrack ) bool TRACKS_CLEANER::merge_collinear_of_track( TRACK *aSegment ) { bool merged_this = false; - bool flag = false; // If there are connections to this on the endpoint - // search for a possible point connected to the START point of the current segment - TRACK *segStart = aSegment->Next(); - while( true ) + // *WHY* doesn't C++ have prec and succ (or ++ --) like PASCAL? + for( ENDPOINT_T endpoint = ENDPOINT_START; endpoint <= ENDPOINT_END; + endpoint = ENDPOINT_T( endpoint + 1 ) ) { - segStart = aSegment->GetTrack( segStart, NULL, ENDPOINT_START ); - - if( segStart ) + // search for a possible segment connected to the current endpoint of the current one + TRACK *other = aSegment->Next(); + if( other ) { - // the two segments must have the same width - if( aSegment->GetWidth() != segStart->GetWidth() ) - break; + other = aSegment->GetTrack( other, NULL, endpoint, true, false ); - // it cannot be a via - if( segStart->Type() != PCB_TRACE_T ) - break; + if( other ) + { + // the two segments must have the same width and the other + // cannot be a via + if( (aSegment->GetWidth() == other->GetWidth()) && + (other->Type() == PCB_TRACE_T) ) + { + // There can be only one segment connected + other->SetState( BUSY, true ); + TRACK *yet_another = aSegment->GetTrack( m_Brd->m_Track, NULL, + endpoint, true, false ); + other->SetState( BUSY, false ); - // We must have only one segment connected - segStart->SetState( BUSY, true ); - TRACK *other = aSegment->GetTrack( m_Brd->m_Track, NULL, ENDPOINT_START ); - segStart->SetState( BUSY, false ); + if( !yet_another ) + { + // Try to merge them + TRACK *segDelete = mergeCollinearSegmentIfPossible( aSegment, + other, endpoint ); - if( other == NULL ) - flag = true; // OK - - break; - } - break; - } - - if( flag ) // We have the starting point of the segment is connected to an other segment - { - TRACK *segDelete = mergeCollinearSegmentIfPossible( aSegment, segStart, ENDPOINT_START ); - - if( segDelete ) - { - m_Brd->GetRatsnest()->Remove( segDelete ); - segDelete->ViewRelease(); - segDelete->DeleteStructure(); - merged_this = true; + // Merge succesful, the other one has to go away + if( segDelete ) + { + m_Brd->GetRatsnest()->Remove( segDelete ); + segDelete->ViewRelease(); + segDelete->DeleteStructure(); + merged_this = true; + } + } + } + } } } - // Do the same with the other endpoint - flag = false; - - // search for a possible point connected to the END point of the current segment: - TRACK *segEnd = aSegment->Next(); - while( true ) - { - segEnd = aSegment->GetTrack( segEnd, NULL, ENDPOINT_END ); - - if( segEnd ) - { - if( aSegment->GetWidth() != segEnd->GetWidth() ) - break; - - if( segEnd->Type() != PCB_TRACE_T ) - break; - - // We must have only one segment connected - segEnd->SetState( BUSY, true ); - TRACK *other = aSegment->GetTrack( m_Brd->m_Track, NULL, ENDPOINT_END ); - segEnd->SetState( BUSY, false ); - - if( other == NULL ) - flag = true; // Ok - - break; - } - else - { - break; - } - } - - if( flag ) // We have the ending point of the segment is connected to an other segment - { - TRACK *segDelete = mergeCollinearSegmentIfPossible( aSegment, segEnd, ENDPOINT_END ); - - if( segDelete ) - { - m_Brd->GetRatsnest()->Remove( segDelete ); - segDelete->ViewRelease(); - segDelete->DeleteStructure(); - merged_this = true; - } - } return merged_this; } @@ -550,12 +505,9 @@ bool TRACKS_CLEANER::clean_segments() // Easy things first modified |= delete_null_segments(); - // Delete redundant segments, i.e. segments having the same end points - // and layers + // Delete redundant segments, i.e. segments having the same end points and layers for( TRACK *segment = m_Brd->m_Track; segment; segment = segment->Next() ) - { modified |= remove_duplicates_of_track( segment ); - } // merge collinear segments: TRACK *nextsegment; @@ -568,7 +520,7 @@ bool TRACKS_CLEANER::clean_segments() bool merged_this = merge_collinear_of_track( segment ); modified |= merged_this; - if( merged_this ) // The current segment was modified, retry to merge it + if( merged_this ) // The current segment was modified, retry to merge it again nextsegment = segment->Next(); } } @@ -579,44 +531,24 @@ bool TRACKS_CLEANER::clean_segments() /* Utility: check for parallelism between two segments */ static bool parallelism_test( int dx1, int dy1, int dx2, int dy2 ) { - // The following condition tree is ugly and repetitive, but I have - // not a better way to express clearly the trivial cases. Hope the - // compiler optimize it better than always doing the product - // below... + /* The following condition list is ugly and repetitive, but I have + * not a better way to express clearly the trivial cases. Hope the + * compiler optimize it better than always doing the product + * below... */ // test for vertical alignment (easy to handle) if( dx1 == 0 ) - { - if( dx2 != 0 ) - return false; - else - return true; - } + return dx2 == 0; if( dx2 == 0 ) - { - if( dx1 != 0 ) - return false; - else - return true; - } + return dx1 == 0; // test for horizontal alignment (easy to handle) if( dy1 == 0 ) - { - if( dy2 != 0 ) - return false; - else - return true; - } + return dy2 == 0; if( dy2 == 0 ) - { - if( dy1 != 0 ) - return false; - else - return true; - } + return dy1 == 0; /* test for alignment in other cases: Do the usual cross product test * (the same as testing the slope, but without a division) */ @@ -746,7 +678,7 @@ bool PCB_EDIT_FRAME::RemoveMisConnectedTracks() } else { - other = segment->GetTrack( GetBoard()->m_Track, NULL, ENDPOINT_START ); + other = segment->GetTrack( GetBoard()->m_Track, NULL, ENDPOINT_START, false, false ); if( other ) net_code_s = other->GetNetCode(); @@ -764,7 +696,7 @@ bool PCB_EDIT_FRAME::RemoveMisConnectedTracks() } else { - other = segment->GetTrack( GetBoard()->m_Track, NULL, ENDPOINT_END ); + other = segment->GetTrack( GetBoard()->m_Track, NULL, ENDPOINT_END, false, false ); if( other ) net_code_e = other->GetNetCode(); diff --git a/pcbnew/move_or_drag_track.cpp b/pcbnew/move_or_drag_track.cpp index 6631ce31dc..8156764d9b 100644 --- a/pcbnew/move_or_drag_track.cpp +++ b/pcbnew/move_or_drag_track.cpp @@ -709,7 +709,7 @@ void PCB_EDIT_FRAME::Start_DragTrackSegmentAndKeepSlope( TRACK* track, wxDC* DC s_StartSegmentPresent = s_EndSegmentPresent = true; if( ( track->start == NULL ) || ( track->start->Type() == PCB_TRACE_T ) ) - TrackToStartPoint = track->GetTrack( GetBoard()->m_Track, NULL, ENDPOINT_START ); + TrackToStartPoint = track->GetTrack( GetBoard()->m_Track, NULL, ENDPOINT_START, true, false ); // Test if more than one segment is connected to this point if( TrackToStartPoint ) @@ -717,14 +717,14 @@ void PCB_EDIT_FRAME::Start_DragTrackSegmentAndKeepSlope( TRACK* track, wxDC* DC TrackToStartPoint->SetState( BUSY, true ); if( ( TrackToStartPoint->Type() == PCB_VIA_T ) - || track->GetTrack( GetBoard()->m_Track, NULL, ENDPOINT_START ) ) + || track->GetTrack( GetBoard()->m_Track, NULL, ENDPOINT_START, true, false ) ) error = true; TrackToStartPoint->SetState( BUSY, false ); } if( ( track->end == NULL ) || ( track->end->Type() == PCB_TRACE_T ) ) - TrackToEndPoint = track->GetTrack( GetBoard()->m_Track, NULL, ENDPOINT_END ); + TrackToEndPoint = track->GetTrack( GetBoard()->m_Track, NULL, ENDPOINT_END, true, false ); // Test if more than one segment is connected to this point if( TrackToEndPoint ) @@ -732,7 +732,7 @@ void PCB_EDIT_FRAME::Start_DragTrackSegmentAndKeepSlope( TRACK* track, wxDC* DC TrackToEndPoint->SetState( BUSY, true ); if( (TrackToEndPoint->Type() == PCB_VIA_T) - || track->GetTrack( GetBoard()->m_Track, NULL, ENDPOINT_END ) ) + || track->GetTrack( GetBoard()->m_Track, NULL, ENDPOINT_END, true, false ) ) error = true; TrackToEndPoint->SetState( BUSY, false ); From d54ade94036e03630016f5d005e9ca473233becb Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 17 May 2014 21:29:15 +0200 Subject: [PATCH 431/741] Rework on DXF export. --- 3d-viewer/3d_draw.cpp | 2 +- common/gr_basic.cpp | 2 +- ...board_items_to_polygon_shape_transform.cpp | 106 ++++++++++--- pcbnew/class_board.h | 13 ++ pcbnew/class_pad.cpp | 33 +++++ pcbnew/class_pad.h | 11 ++ pcbnew/class_pad_draw_functions.cpp | 28 +--- pcbnew/pcbplot.h | 11 ++ pcbnew/plot_board_layers.cpp | 139 +++++++++++++++++- 9 files changed, 292 insertions(+), 53 deletions(-) diff --git a/3d-viewer/3d_draw.cpp b/3d-viewer/3d_draw.cpp index 289d3c3c72..82abd0b0de 100644 --- a/3d-viewer/3d_draw.cpp +++ b/3d-viewer/3d_draw.cpp @@ -239,7 +239,7 @@ void EDA_3D_CANVAS::BuildBoard3DView() BOARD* pcb = GetBoard(); bool realistic_mode = g_Parm_3D_Visu.IsRealisticMode(); - // Number of segments to draw a circle using segments + // Number of segments to convert a circle to polygon const int segcountforcircle = 16; double correctionFactor = 1.0 / cos( M_PI / (segcountforcircle * 2) ); const int segcountLowQuality = 12; // segments to draw a circle with low quality diff --git a/common/gr_basic.cpp b/common/gr_basic.cpp index c97ec7d8dc..b0ff4b6ff2 100644 --- a/common/gr_basic.cpp +++ b/common/gr_basic.cpp @@ -848,7 +848,7 @@ static void GRSClosedPoly( EDA_RECT* aClipBox, wxDC* aDC, // Close the polygon if( aPoints[lastpt] != aPoints[0] ) { - GRLineTo( aClipBox, aDC, aPoints[lastpt].x, aPoints[lastpt].y, aWidth, aColor ); + GRLineTo( aClipBox, aDC, aPoints[0].x, aPoints[0].y, aWidth, aColor ); } } } diff --git a/pcbnew/board_items_to_polygon_shape_transform.cpp b/pcbnew/board_items_to_polygon_shape_transform.cpp index e08cceec96..d4122e7b93 100644 --- a/pcbnew/board_items_to_polygon_shape_transform.cpp +++ b/pcbnew/board_items_to_polygon_shape_transform.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -38,6 +39,80 @@ static void addTextSegmToPoly( int x0, int y0, int xf, int yf ) s_textCircle2SegmentCount, s_textWidth ); } +/** + * Function ConvertBrdLayerToPolygonalContours + * Build a set of polygons which are the outlines of copper items + * (pads, tracks, texts, zones) + * the holes in vias or pads are ignored + * Usefull to export the shape of copper layers to dxf polygons + * or 3D viewer + * the polygons are not merged. + * @param aLayer = A layer, like LAYER_N_BACK, etc. + * @param aOutlines The CPOLYGONS_LIST to fill in with main outlines. + * @return true if success, false if a contour is not valid + */ +void BOARD::ConvertBrdLayerToPolygonalContours( LAYER_NUM aLayer, CPOLYGONS_LIST& aOutlines ) +{ + // Number of segments to convert a circle to a polygon + const int segcountforcircle = 16; + double correctionFactor = 1.0 / cos( M_PI / (segcountforcircle * 2) ); + + // convert tracks and vias: + for( TRACK* track = m_Track; track != NULL; track = track->Next() ) + { + if( !track->IsOnLayer( aLayer ) ) + continue; + + track->TransformShapeWithClearanceToPolygon( aOutlines, + 0, segcountforcircle, correctionFactor ); + } + + // convert pads + for( MODULE* module = m_Modules; module != NULL; module = module->Next() ) + { + module->TransformPadsShapesWithClearanceToPolygon( aLayer, + aOutlines, 0, segcountforcircle, correctionFactor ); + + // Micro-wave modules may have items on copper layers + module->TransformGraphicShapesWithClearanceToPolygonSet( aLayer, + aOutlines, 0, segcountforcircle, correctionFactor ); + } + + // convert copper zones + for( int ii = 0; ii < GetAreaCount(); ii++ ) + { + ZONE_CONTAINER* zone = GetArea( ii ); + LAYER_NUM zonelayer = zone->GetLayer(); + + if( zonelayer == aLayer ) + zone->TransformSolidAreasShapesToPolygonSet( + aOutlines, segcountforcircle, correctionFactor ); + } + + // convert graphic items on copper layers (texts) + for( BOARD_ITEM* item = m_Drawings; item; item = item->Next() ) + { + if( !item->IsOnLayer( aLayer ) ) + continue; + + switch( item->Type() ) + { + case PCB_LINE_T: // should not exist on copper layers + ( (DRAWSEGMENT*) item )->TransformShapeWithClearanceToPolygon( + aOutlines, 0, segcountforcircle, correctionFactor ); + break; + + case PCB_TEXT_T: + ( (TEXTE_PCB*) item )->TransformShapeWithClearanceToPolygonSet( + aOutlines, 0, segcountforcircle, correctionFactor ); + break; + + default: + break; + } + } +} + /* generate pads shapes on layer aLayer as polygons, * and adds these polygons to aCornerBuffer * aCornerBuffer = the buffer to store polygons @@ -614,43 +689,26 @@ bool D_PAD::BuildPadDrillShapePolygon( CPOLYGONS_LIST& aCornerBuffer, int aInflateValue, int aSegmentsPerCircle ) const { wxSize drillsize = GetDrillSize(); - bool hasHole = drillsize.x && drillsize.y; - if( ! hasHole ) + if( !drillsize.x || !drillsize.y ) return false; - drillsize.x += aInflateValue; - drillsize.y += aInflateValue; - if( drillsize.x == drillsize.y ) // usual round hole { TransformCircleToPolygon( aCornerBuffer, GetPosition(), - drillsize.x /2, aSegmentsPerCircle ); + (drillsize.x / 2) + aInflateValue, aSegmentsPerCircle ); } else // Oblong hole { - wxPoint ends_offset; + wxPoint start, end; int width; - if( drillsize.x > drillsize.y ) // Horizontal oval - { - ends_offset.x = ( drillsize.x - drillsize.y ) / 2; - width = drillsize.y; - } - else // Vertical oval - { - ends_offset.y = ( drillsize.y - drillsize.x ) / 2; - width = drillsize.x; - } + GetOblongDrillGeometry( start, end, width ); - RotatePoint( &ends_offset, GetOrientation() ); + width += aInflateValue * 2; - wxPoint start = GetPosition() + ends_offset; - wxPoint end = GetPosition() - ends_offset; - - // Prepare the shape creation - TransformRoundedEndsSegmentToPolygon( aCornerBuffer, start, end, - aSegmentsPerCircle, width ); + TransformRoundedEndsSegmentToPolygon( aCornerBuffer, + GetPosition() + start, GetPosition() + end, aSegmentsPerCircle, width ); } return true; diff --git a/pcbnew/class_board.h b/pcbnew/class_board.h index 308f69a13d..0c625cb66d 100644 --- a/pcbnew/class_board.h +++ b/pcbnew/class_board.h @@ -685,6 +685,19 @@ public: CPOLYGONS_LIST& aHoles, wxString* aErrorText = NULL ); + /** + * Function ConvertBrdLayerToPolygonalContours + * Build a set of polygons which are the outlines of copper items + * (pads, tracks, vias, texts, zones) + * Holes in vias or pads are ignored + * Usefull to export the shape of copper layers to dxf polygons + * or 3D viewer + * the polygons are not merged. + * @param aLayer = A copper layer, like LAYER_N_BACK, etc. + * @param aOutlines The CPOLYGONS_LIST to fill in with items outline. + */ + void ConvertBrdLayerToPolygonalContours( LAYER_NUM aLayer, CPOLYGONS_LIST& aOutlines ); + /** * Function GetLayerName * returns the name of a layer given by aLayer. Copper layers may diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index f4a1282ed7..2d2342d4e8 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -637,6 +637,39 @@ bool D_PAD::IsOnLayer( LAYER_NUM aLayer ) const } +void D_PAD::GetOblongDrillGeometry( wxPoint& aStartPoint, + wxPoint& aEndPoint, int& aWidth ) const +{ + // calculates the start point, end point and width + // of an equivalent segment which have the same position and width as the hole + int delta_cx, delta_cy; + + wxSize halfsize = GetDrillSize();; + halfsize.x /= 2; + halfsize.y /= 2; + + if( m_Drill.x > m_Drill.y ) // horizontal + { + delta_cx = halfsize.x - halfsize.y; + delta_cy = 0; + aWidth = m_Drill.y; + } + else // vertical + { + delta_cx = 0; + delta_cy = halfsize.y - halfsize.x; + aWidth = m_Drill.x; + } + + RotatePoint( &delta_cx, &delta_cy, m_Orient ); + + aStartPoint.x = delta_cx; + aStartPoint.y = delta_cy; + + aEndPoint.x = - delta_cx; + aEndPoint.y = - delta_cy; +} + bool D_PAD::HitTest( const wxPoint& aPosition ) const { int dx, dy; diff --git a/pcbnew/class_pad.h b/pcbnew/class_pad.h index 41ac5c3913..61a8c73575 100644 --- a/pcbnew/class_pad.h +++ b/pcbnew/class_pad.h @@ -169,6 +169,17 @@ public: { m_drillShape = aDrillShape; } PAD_DRILL_SHAPE_T GetDrillShape() const { return m_drillShape; } + /** + * Function GetOblongDrillGeometry calculates the start point, end point and width + * of an equivalent segment which have the same position and width as the hole + * Usefull to plot/draw oblong holes like segments with rounded ends + * used in draw and plot functions + * @param aStartPoint = first point of the equivalent segment, relative to the pad position. + * @param aEndPoint = second point of the equivalent segment, relative to the pad position. + * @param aWidth = width equivalent segment. + */ + void GetOblongDrillGeometry( wxPoint& aStartPoint, wxPoint& aEndPoint, int& aWidth ) const; + void SetLayerMask( LAYER_MSK aLayerMask ) { m_layerMask = aLayerMask; } LAYER_MSK GetLayerMask() const { return m_layerMask; } diff --git a/pcbnew/class_pad_draw_functions.cpp b/pcbnew/class_pad_draw_functions.cpp index 78fcaf457c..24113ea52a 100644 --- a/pcbnew/class_pad_draw_functions.cpp +++ b/pcbnew/class_pad_draw_functions.cpp @@ -310,7 +310,6 @@ void D_PAD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDraw_mode, void D_PAD::DrawShape( EDA_RECT* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo ) { wxPoint coord[4]; - int delta_cx, delta_cy; double angle = m_Orient; int seg_width; @@ -439,27 +438,12 @@ void D_PAD::DrawShape( EDA_RECT* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo ) break; case PAD_DRILL_OBLONG: - halfsize.x = m_Drill.x >> 1; - halfsize.y = m_Drill.y >> 1; - - if( m_Drill.x > m_Drill.y ) // horizontal - { - delta_cx = halfsize.x - halfsize.y; - delta_cy = 0; - seg_width = m_Drill.y; - } - else // vertical - { - delta_cx = 0; - delta_cy = halfsize.y - halfsize.x; - seg_width = m_Drill.x; - } - - RotatePoint( &delta_cx, &delta_cy, angle ); - - GRFillCSegm( aClipBox, aDC, holepos.x + delta_cx, holepos.y + delta_cy, - holepos.x - delta_cx, holepos.y - delta_cy, seg_width, - hole_color ); + { + wxPoint drl_start, drl_end; + GetOblongDrillGeometry( drl_start, drl_end, seg_width ); + GRFilledSegment( aClipBox, aDC, holepos + drl_start, + holepos + drl_end, seg_width, hole_color ); + } break; default: diff --git a/pcbnew/pcbplot.h b/pcbnew/pcbplot.h index f42ef156bc..50c607e25f 100644 --- a/pcbnew/pcbplot.h +++ b/pcbnew/pcbplot.h @@ -204,6 +204,17 @@ void PlotOneBoardLayer( BOARD *aBoard, PLOTTER* aPlotter, LAYER_NUM aLayer, void PlotStandardLayer( BOARD* aBoard, PLOTTER* aPlotter, LAYER_MSK aLayerMask, const PCB_PLOT_PARAMS& aPlotOpt ); +/** + * Function PlotLayerOutlines + * plot copper outline of a copper layer. + * @param aBoard = the board to plot + * @param aPlotter = the plotter to use + * @param aLayerMask = the mask to define the layers to plot + * @param aPlotOpt = the plot options. Has meaning for some formats only + */ +void PlotLayerOutlines( BOARD *aBoard, PLOTTER* aPlotter, + LAYER_MSK aLayerMask, const PCB_PLOT_PARAMS& aPlotOpt ); + /** * Function PlotSilkScreen * plot silkscreen layers which have specific requirements, mainly for pads. diff --git a/pcbnew/plot_board_layers.cpp b/pcbnew/plot_board_layers.cpp index f299787716..7bfa48cb36 100644 --- a/pcbnew/plot_board_layers.cpp +++ b/pcbnew/plot_board_layers.cpp @@ -176,10 +176,18 @@ void PlotOneBoardLayer( BOARD *aBoard, PLOTTER* aPlotter, LAYER_NUM aLayer, case LAYER_N_15: case LAST_COPPER_LAYER: // Skip NPTH pads on copper layers ( only if hole size == pad size ): - plotOpt.SetSkipPlotNPTH_Pads( true ); // Drill mark will be plotted, // if drill mark is SMALL_DRILL_SHAPE or FULL_DRILL_SHAPE - PlotStandardLayer( aBoard, aPlotter, layer_mask, plotOpt ); + if( plotOpt.GetFormat() == PLOT_FORMAT_DXF ) + { + plotOpt.SetSkipPlotNPTH_Pads( false ); + PlotLayerOutlines( aBoard, aPlotter, layer_mask, plotOpt ); + } + else + { + plotOpt.SetSkipPlotNPTH_Pads( true ); + PlotStandardLayer( aBoard, aPlotter, layer_mask, plotOpt ); + } break; case SOLDERMASK_N_BACK: @@ -190,7 +198,12 @@ void PlotOneBoardLayer( BOARD *aBoard, PLOTTER* aPlotter, LAYER_NUM aLayer, // Plot solder mask: if( soldermask_min_thickness == 0 ) - PlotStandardLayer( aBoard, aPlotter, layer_mask, plotOpt ); + { + if( plotOpt.GetFormat() == PLOT_FORMAT_DXF ) + PlotLayerOutlines( aBoard, aPlotter, layer_mask, plotOpt ); + else + PlotStandardLayer( aBoard, aPlotter, layer_mask, plotOpt ); + } else PlotSolderMaskLayer( aBoard, aPlotter, layer_mask, plotOpt, soldermask_min_thickness ); @@ -202,12 +215,19 @@ void PlotOneBoardLayer( BOARD *aBoard, PLOTTER* aPlotter, LAYER_NUM aLayer, plotOpt.SetSkipPlotNPTH_Pads( false ); // Disable plot pad holes plotOpt.SetDrillMarksType( PCB_PLOT_PARAMS::NO_DRILL_SHAPE ); - PlotStandardLayer( aBoard, aPlotter, layer_mask, plotOpt ); + + if( plotOpt.GetFormat() == PLOT_FORMAT_DXF ) + PlotLayerOutlines( aBoard, aPlotter, layer_mask, plotOpt ); + else + PlotStandardLayer( aBoard, aPlotter, layer_mask, plotOpt ); break; case SILKSCREEN_N_FRONT: case SILKSCREEN_N_BACK: - PlotSilkScreen( aBoard, aPlotter, layer_mask, plotOpt ); + if( plotOpt.GetFormat() == PLOT_FORMAT_DXF ) + PlotLayerOutlines( aBoard, aPlotter, layer_mask, plotOpt ); + else + PlotSilkScreen( aBoard, aPlotter, layer_mask, plotOpt ); // Gerber: Subtract soldermask from silkscreen if enabled if( aPlotter->GetPlotterType() == PLOT_FORMAT_GERBER @@ -444,6 +464,115 @@ void PlotStandardLayer( BOARD *aBoard, PLOTTER* aPlotter, itemplotter.PlotDrillMarks(); } +/* Plot outlines of copper, for copper layer + */ +#include "clipper.hpp" +void PlotLayerOutlines( BOARD *aBoard, PLOTTER* aPlotter, + LAYER_MSK aLayerMask, const PCB_PLOT_PARAMS& aPlotOpt ) +{ + + BRDITEMS_PLOTTER itemplotter( aPlotter, aBoard, aPlotOpt ); + itemplotter.SetLayerMask( aLayerMask ); + + CPOLYGONS_LIST outlines; + + for( LAYER_NUM layer = FIRST_LAYER; layer < NB_PCB_LAYERS; layer++ ) + { + LAYER_MSK layer_mask = GetLayerMask( layer ); + + if( (aLayerMask & layer_mask ) == 0 ) + continue; + + outlines.RemoveAllContours(); + aBoard->ConvertBrdLayerToPolygonalContours( layer, outlines ); + + // Merge all overlapping polygons. + KI_POLYGON_SET kpolygons; + KI_POLYGON_SET ktmp; + outlines.ExportTo( ktmp ); + + kpolygons += ktmp; + + // Plot outlines + std::vector< wxPoint > cornerList; + + for( unsigned ii = 0; ii < kpolygons.size(); ii++ ) + { + KI_POLYGON polygon = kpolygons[ii]; + + // polygon contains only one polygon, but it can have holes linked by + // overlapping segments. + // To plot clean outlines, we have to break this polygon into more polygons with + // no overlapping segments, using Clipper, because boost::polygon + // does not allow that + ClipperLib::Path raw_polygon; + ClipperLib::Paths normalized_polygons; + + for( unsigned ic = 0; ic < polygon.size(); ic++ ) + { + KI_POLY_POINT corner = *(polygon.begin() + ic); + raw_polygon.push_back( ClipperLib::IntPoint( corner.x(), corner.y() ) ); + } + + ClipperLib::SimplifyPolygon( raw_polygon, normalized_polygons ); + + // Now we have one or more basic polygons: plot each polygon + for( unsigned ii = 0; ii < normalized_polygons.size(); ii++ ) + { + ClipperLib::Path& polygon = normalized_polygons[ii]; + cornerList.clear(); + + for( unsigned jj = 0; jj < polygon.size(); jj++ ) + cornerList.push_back( wxPoint( polygon[jj].X , polygon[jj].Y ) ); + + // Ensure the polygon is closed + if( cornerList[0] != cornerList[cornerList.size()-1] ) + cornerList.push_back( cornerList[0] ); + + aPlotter->PlotPoly( cornerList, NO_FILL ); + } + } + + // Plot pad holes + if( aPlotOpt.GetDrillMarksType() != PCB_PLOT_PARAMS::NO_DRILL_SHAPE ) + { + for( MODULE* module = aBoard->m_Modules; module; module = module->Next() ) + { + for( D_PAD* pad = module->Pads(); pad; pad = pad->Next() ) + { + wxSize hole = pad->GetDrillSize(); + + if( hole.x == 0 || hole.y == 0 ) + continue; + + if( hole.x == hole.y ) + aPlotter->Circle( pad->GetPosition(), hole.x, NO_FILL ); + else + { + wxPoint drl_start, drl_end; + int width; + pad->GetOblongDrillGeometry( drl_start, drl_end, width ); + aPlotter->ThickSegment( pad->GetPosition() + drl_start, + pad->GetPosition() + drl_end, width, SKETCH ); + } + } + } + } + + // Plot vias holes + for( TRACK* track = aBoard->m_Track; track; track = track->Next() ) + { + const VIA* via = dynamic_cast( track ); + + if( via && via->IsOnLayer( layer ) ) // via holes can be not through holes + { + aPlotter->Circle( via->GetPosition(), via->GetDrillValue(), NO_FILL ); + } + } + } +} + + /* Plot a solder mask layer. * Solder mask layers have a minimum thickness value and cannot be drawn like standard layers, * unless the minimum thickness is 0. From 4e9582c3ab2a3388dc39ac1917f5a1ce4eebfecf Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Sun, 18 May 2014 19:37:45 -0400 Subject: [PATCH 432/741] Add road map to developer's documentation. - Create KiCad road map document. - Add road map to developer's documentation. - A separate road map build command to CMake so the road map can be built separately for use in websites. - Update .bzrignore to ignore road map files generated by Doxygen. --- .bzrignore | 1 + CMakeLists.txt | 7 + Documentation/development/Doxyfile | 1809 +++++++++++++++++++++++++ Documentation/development/road-map.md | 706 ++++++++++ Doxyfile | 7 +- 5 files changed, 2527 insertions(+), 3 deletions(-) create mode 100644 Documentation/development/Doxyfile create mode 100644 Documentation/development/road-map.md diff --git a/.bzrignore b/.bzrignore index 61e1b52445..d53f202616 100644 --- a/.bzrignore +++ b/.bzrignore @@ -28,6 +28,7 @@ version.h config.h install_manifest.txt Documentation/doxygen +Documentation/development/doxygen *.bak common/pcb_plot_params_keywords.cpp include/pcb_plot_params_lexer.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 161235edd6..31a00ad1ec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -687,6 +687,13 @@ if( DOXYGEN_FOUND ) DEPENDS Doxyfile COMMENT "building doxygen docs into directory Documentation/doxygen/html" ) + add_custom_target( dev-docs + ${CMAKE_COMMAND} -E remove_directory Documentation/development/doxygen + COMMAND ${DOXYGEN_EXECUTABLE} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Documentation/development + DEPENDS Doxyfile + COMMENT "building developer's resource docs into directory Documentation/development/doxygen/html" + ) else() message( STATUS "WARNING: Doxygen not found - doxygen-docs (Source Docs) target not created" ) endif() diff --git a/Documentation/development/Doxyfile b/Documentation/development/Doxyfile new file mode 100644 index 0000000000..2fce8d160a --- /dev/null +++ b/Documentation/development/Doxyfile @@ -0,0 +1,1809 @@ +# Doxyfile 1.8.2 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" "). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or sequence of words) that should +# identify the project. Note that if you do not use Doxywizard you need +# to put quotes around the project name if it contains spaces. + +PROJECT_NAME = "KiCad Developer's Resource Documentation" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer +# a quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = + +# With the PROJECT_LOGO tag one can specify an logo or icon that is +# included in the documentation. The maximum height of the logo should not +# exceed 55 pixels and the maximum width should not exceed 200 pixels. +# Doxygen will copy the logo to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = doxygen + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, +# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English +# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, +# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = YES + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = NO + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. Note that you specify absolute paths here, but also +# relative paths, which will be relative from the directory where doxygen is +# started. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful if your file system +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + +JAVADOC_AUTOBRIEF = YES + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding +# "class=itcl::class" will allow you to use the command class in the +# itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, +# and language is one of the parsers supported by doxygen: IDL, Java, +# Javascript, CSharp, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, +# C++. For instance to make doxygen treat .inc files as Fortran files (default +# is PHP), and .f files as C (default is Fortran), use: inc=Fortran f=C. Note +# that for custom extensions you also need to set FILE_PATTERNS otherwise the +# files are not read by doxygen. + +EXTENSION_MAPPING = + +# If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all +# comments according to the Markdown format, which allows for more readable +# documentation. See http://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you +# can mix doxygen, HTML, and XML commands with Markdown formatting. +# Disable only in case of backward compatibilities issues. + +MARKDOWN_SUPPORT = YES + +# When enabled doxygen tries to link words that correspond to documented classes, +# or namespaces to their corresponding documentation. Such a link can be +# prevented in individual cases by by putting a % sign in front of the word or +# globally by setting AUTOLINK_SUPPORT to NO. + +AUTOLINK_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also makes the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate getter and setter methods for a property. Setting this option to YES (the default) will make doxygen replace the get and set methods by a property in the documentation. This will only work if the methods are indeed getting or setting a simple type. If this is not the case, or you want to show the methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and +# unions are shown inside the group in which they are included (e.g. using +# @ingroup) instead of on a separate page (for HTML and Man pages) or +# section (for LaTeX and RTF). + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and +# unions with only public data fields will be shown inline in the documentation +# of the scope in which they are defined (i.e. file, namespace, or group +# documentation), provided this scope is documented. If set to NO (the default), +# structs, classes, and unions are shown on a separate page (for HTML and Man +# pages) or section (for LaTeX and RTF). + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penalty. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will roughly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols. + +SYMBOL_CACHE_SIZE = 4 + +# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be +# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given +# their name and scope. Since this can be an expensive process and often the +# same symbol appear multiple times in the code, doxygen keeps a cache of +# pre-resolved symbols. If the cache is too small doxygen will become slower. +# If the cache is too large, memory is wasted. The cache size is given by this +# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols. + +LOOKUP_CACHE_SIZE = 6 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = YES + +# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal +# scope will be included in the documentation. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = YES + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespaces are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen +# will list include files with double quotes in the documentation +# rather than with sharp brackets. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen +# will sort the (brief and detailed) documentation of class members so that +# constructors and destructors are listed first. If set to NO (the default) +# the constructors will appear in the respective orders defined by +# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. +# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO +# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to +# do proper type resolution of all parameters of a function it will reject a +# match between the prototype and the implementation of a member function even +# if there is only one candidate or it is obvious which candidate to choose +# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen +# will still accept a match between prototype and implementation in such cases. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or macro consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and macros in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. +# This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. +# You can optionally specify a file name after the option, if omitted +# DoxygenLayout.xml will be used as the name of the layout file. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files +# containing the references data. This must be a list of .bib files. The +# .bib extension is automatically appended if omitted. Using this command +# requires the bibtex tool to be installed. See also +# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style +# of the bibliography can be controlled using LATEX_BIB_STYLE. To use this +# feature you need bibtex and perl available in the search path. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# The WARN_NO_PARAMDOC option can be enabled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text " + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = road-map.md + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh +# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py +# *.f90 *.f *.for *.vhd *.vhdl + +FILE_PATTERNS = *.md + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = + + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. +# If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. +# Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. +# The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty or if +# non of the patterns match the file name, INPUT_FILTER is applied. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) +# and it is also possible to disable source filtering for a specific pattern +# using *.ext= (so without naming a filter). This option only has effect when +# FILTER_SOURCE_FILES is enabled. + +FILTER_SOURCE_PATTERNS = + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = YES + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = YES + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C, C++ and Fortran comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = YES + +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = YES + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. +# Otherwise they will link to the documentation. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = YES + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. Note that when using a custom header you are responsible +# for the proper inclusion of any scripts and style sheets that doxygen +# needs, which is dependent on the configuration options used. +# It is advised to generate a default header using "doxygen -w html +# header.html footer.html stylesheet.css YourConfigFile" and then modify +# that header. Note that the header is subject to change so you typically +# have to redo this when upgrading to a newer version of doxygen or when +# changing the value of configuration settings such as GENERATE_TREEVIEW! + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If left blank doxygen will +# generate a default style sheet. Note that it is recommended to use +# HTML_EXTRA_STYLESHEET instead of this one, as it is more robust and this +# tag will in the future become obsolete. + +HTML_STYLESHEET = + +# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional +# user-defined cascading style sheet that is included after the standard +# style sheets created by doxygen. Using this option one can overrule +# certain style aspects. This is preferred over using HTML_STYLESHEET +# since it does not replace the standard style sheet and is therefor more +# robust against future updates. Doxygen will copy the style sheet file to +# the output directory. + +HTML_EXTRA_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that +# the files will be copied as-is; there are no commands or markers available. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. +# Doxygen will adjust the colors in the style sheet and background images +# according to this color. Hue is specified as an angle on a colorwheel, +# see http://en.wikipedia.org/wiki/Hue for more information. +# For instance the value 0 represents red, 60 is yellow, 120 is green, +# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. +# The allowed range is 0 to 359. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of +# the colors in the HTML output. For a value of 0 the output will use +# grayscales only. A value of 255 will produce the most vivid colors. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to +# the luminance component of the colors in the HTML output. Values below +# 100 gradually make the output lighter, whereas values above 100 make +# the output darker. The value divided by 100 is the actual gamma applied, +# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, +# and 100 does not change the gamma. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting +# this to NO can help when comparing the output of multiple runs. + +HTML_TIMESTAMP = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. + +HTML_DYNAMIC_SECTIONS = NO + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of +# entries shown in the various tree structured indices initially; the user +# can expand and collapse entries dynamically later on. Doxygen will expand +# the tree to such a level that at most the specified number of entries are +# visible (unless a fully collapsed tree already exceeds this amount). +# So setting the number of entries 1 will produce a full collapsed tree by +# default. 0 is a special value representing an infinite number of entries +# and will result in a full expanded tree by default. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely +# identify the documentation publisher. This should be a reverse domain-name +# style string, e.g. com.mycompany.MyDocSet.documentation. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated +# that can be used as input for Qt's qhelpgenerator to generate a +# Qt Compressed Help (.qch) of the generated HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = doc + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to +# add. For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see +# +# Qt Help Project / Custom Filters. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's +# filter section matches. +# +# Qt Help Project / Filter Attributes. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files +# will be generated, which together with the HTML files, form an Eclipse help +# plugin. To install this plugin and make it available under the help contents +# menu in Eclipse, the contents of the directory containing the HTML and XML +# files needs to be copied into the plugins directory of eclipse. The name of +# the directory within the plugins directory should be the same as +# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before +# the help appears. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have +# this name. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) +# at top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. Since the tabs have the same information as the +# navigation tree you can set this option to NO if you already set +# GENERATE_TREEVIEW to YES. + +DISABLE_INDEX = NO + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to YES, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). +# Windows users are probably better off using the HTML help feature. +# Since the tree basically has the same information as the tab index you +# could consider to set DISABLE_INDEX to NO when enabling this option. + +GENERATE_TREEVIEW = YES + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values +# (range [0,1..20]) that doxygen will group on one line in the generated HTML +# documentation. Note that a value of 0 will completely suppress the enum +# values from appearing in the overview section. + +ENUM_VALUES_PER_LINE = 4 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open +# links to external symbols imported via tag files in a separate window. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are +# not supported properly for IE 6.0, but are supported on all modern browsers. +# Note that when changing this option you need to delete any form_*.png files +# in the HTML output before the changes have effect. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax +# (see http://www.mathjax.org) which uses client side Javascript for the +# rendering instead of using prerendered bitmaps. Use this if you do not +# have LaTeX installed or if you want to formulas look prettier in the HTML +# output. When enabled you may also need to install MathJax separately and +# configure the path to it using the MATHJAX_RELPATH option. + +USE_MATHJAX = NO + +# When MathJax is enabled you need to specify the location relative to the +# HTML output directory using the MATHJAX_RELPATH option. The destination +# directory should contain the MathJax.js script. For instance, if the mathjax +# directory is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to +# the MathJax Content Delivery Network so you can quickly see the result without +# installing MathJax. +# However, it is strongly recommended to install a local +# copy of MathJax from http://www.mathjax.org before deployment. + +MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest + +# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension +# names that should be enabled during MathJax rendering. + +MATHJAX_EXTENSIONS = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box +# for the HTML output. The underlying search engine uses javascript +# and DHTML and should work on any modern browser. Note that when using +# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets +# (GENERATE_DOCSET) there is already a search function so this one should +# typically be disabled. For large projects the javascript based search engine +# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. + +SEARCHENGINE = NO + +# When the SERVER_BASED_SEARCH tag is enabled the search engine will be +# implemented using a PHP enabled web server instead of at the web client +# using Javascript. Doxygen will generate the search PHP script and index +# file to put on the web server. The advantage of the server +# based approach is that it scales better to large projects and allows +# full text search. The disadvantages are that it is more difficult to setup +# and does not have live searching capabilities. + +SERVER_BASED_SEARCH = NO + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. +# Note that when enabling USE_PDFLATEX this option is only used for +# generating bitmaps for formulas in the HTML output, but not in the +# Makefile that is written to the output directory. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4wide + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for +# the generated latex document. The footer should contain everything after +# the last chapter. If it is left blank doxygen will generate a +# standard footer. Notice: only use this tag if you know what you are doing! + +LATEX_FOOTER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = NO + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = NO + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +# If LATEX_SOURCE_CODE is set to YES then doxygen will include +# source code with syntax highlighting in the LaTeX output. +# Note that which sources are shown also depends on other settings +# such as SOURCE_BROWSER. + +LATEX_SOURCE_CODE = NO + +# The LATEX_BIB_STYLE tag can be used to specify the style to use for the +# bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See +# http://en.wikipedia.org/wiki/BibTeX for more info. + +LATEX_BIB_STYLE = plain + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load style sheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. +# This is useful +# if you want to understand what is going on. +# On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# pointed to by INCLUDE_PATH will be searched when a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = *.h + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition that +# overrules the definition found in the source code. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all references to function-like macros +# that are alone on a line, have an all uppercase name, and do not end with a +# semicolon, because these will confuse the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. For each +# tag file the location of the external documentation should be added. The +# format of a tag file without this location is as follows: +# +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths +# or URLs. Note that each tag file must have a unique name (where the name does +# NOT include the path). If a tag file is not located in the directory in which +# doxygen is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option also works with HAVE_DOT disabled, but it is recommended to +# install and use dot, since it yields more powerful graphs. + +CLASS_DIAGRAMS = YES + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = NO + +# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is +# allowed to run in parallel. When set to 0 (the default) doxygen will +# base this on the number of processors available in the system. You can set it +# explicitly to a value larger than 0 to get control over the balance +# between CPU load and processing speed. + +DOT_NUM_THREADS = 0 + +# By default doxygen will use the Helvetica font for all dot files that +# doxygen generates. When you want a differently looking font you can specify +# the font name using DOT_FONTNAME. You need to make sure dot is able to find +# the font, which can be done by putting it in a standard location or by setting +# the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the +# directory containing the font. + +DOT_FONTNAME = Helvetica + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the Helvetica font. +# If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to +# set the path where dot can find it. + +DOT_FONTPATH = + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If the UML_LOOK tag is enabled, the fields and methods are shown inside +# the class node. If there are many fields or methods and many nodes the +# graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS +# threshold limits the number of items for each type to make the size more +# managable. Set this to 0 for no limit. Note that the threshold may be +# exceeded by 50% before the limit is enforced. + +UML_LIMIT_NUM_FIELDS = 10 + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs +# for selected functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller +# graphs for selected functions only using the \callergraph command. + +CALLER_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will generate a graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are svg, png, jpg, or gif. +# If left blank png will be used. If you choose svg you need to set +# HTML_FILE_EXTENSION to xhtml in order to make the SVG files +# visible in IE 9+ (other browsers do not have this requirement). + +DOT_IMAGE_FORMAT = png + +# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to +# enable generation of interactive SVG images that allow zooming and panning. +# Note that this requires a modern browser other than Internet Explorer. +# Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you +# need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files +# visible. Older versions of IE do not have SVG support. + +INTERACTIVE_SVG = NO + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The MSCFILE_DIRS tag can be used to specify one or more directories that +# contain msc files that are included in the documentation (see the +# \mscfile command). + +MSCFILE_DIRS = + +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. + +DOT_GRAPH_MAX_NODES = 50 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES diff --git a/Documentation/development/road-map.md b/Documentation/development/road-map.md new file mode 100644 index 0000000000..16aef94e5c --- /dev/null +++ b/Documentation/development/road-map.md @@ -0,0 +1,706 @@ +# Road Map # {#mainpage} + +This document is the KiCad Developer's road map document. It is a living +document that should be maintained as the project progresses. The goal of +this document is to provide an overview for developers of where the project +is headed to prevent resource conflicts and endless rehashing of previously +discussed topics. It is broken into sections for each major component of +the KiCad source code and documentation. It defines tasks that developers +an use to contribute to the project and provides updated status information. +Tasks should define clear objective and avoid vague generalizations so that +a new developer can complete the task. It is not a place for developers to +add their own personal wish list It should only be updated with approval +of the project manager after discussion with the lead developers. + +Each entry in the road map is made up of four sections. The goal should +be a brief description of the what the road map entry will accomplish. The +task section should be a list of deliverable items that are specific enough +hat they can be documented as completed. The dependencies sections is a list +of requirements that must be completed before work can begin on any of the +tasks. The status section should include a list of completed tasks or marked +as complete as when the goal is met. + +[TOC] + +# Project # {#project} +This section defines the tasks for the project related goals that are not +related to coding or documentation. It is a catch all for issues such as +developer and user relations, dissemination of information on websites, +policies, etc. + +## Stable Release ## {#stable_release} +**Goal:** + +Provide a lightweight stable release mechanism that is robust enough to meet +the requirements of Linux packagers and corporate users but avoid the burden +of back porting fixes to a maintenance branch to avoid the additional work for +developers. + +**Task:** +- Devise a process to have some type of reasonably stable release protocol + to provide "stable" releases for Linux distribution packagers and corporate + users. +- Document "stable" release procedure. + +**Dependencies:** +- None + +**Status:** +- Initial planning stages. + + +# General # {#general} +This section defines the tasks that affect all or most of KiCad or do not +fit under as specific part of the code such as the board editor or the +schematic editor. + +## Convert to a Single Process Application. ## {#kiway} +**Goal:** + +Merge common schematic and board code into to separate dynamic objects to allow +Eeschema and Pcbnew to run under a single process. + +**Task:** +- Convert the majority core code in Eeschema and Pcbnew into dynamic libraries. +- Provide a robust method for communicating between code running under a single + process. +- Revise the schematic editor and board editor main windows run under a single + process instead of multiple stand alone applications. +- Design a method for passing information between the dynamic libraries running + under the same process. +- Remove inter-process communications between Eeschema and Pcbnew. + +**Dependencies:** +- None + +**Status:** +- Stage 1 code released. +- Stage 2 in process. + +## User Interface Modernization ## {#wxaui} +**Goal:** + +Give KiCad a more modern user interface with dockable tool bars and windows. +Create perspectives to allow users to arrange dockable windows as they prefer. + +**Task:** +- Take advantage of the advanced UI features in wxAui such as detaching and + hiding. +- Study ergonomics of various commercial/proprietary PCB applications (when + in doubt about any particular UI solution, check how it has been done in a + certain proprietary app that is very popular among OSHW folks and do exactly + opposite). +- Clean up menu structure. Menus must allow access to all features of the + program in a clear and logical way. Currently some functions of Pcbnew are + accessible only through tool bars +- Redesign dialogs, make sure they are following same style rules. +- Check quality of translations. Either fix or remove bad quality translations. +- Develop a global shortcut manager that allows the user assign arbitrary + shortcuts for any tool or action. + +**Dependencies:** +- [wxWidgets 3](#wxwidgets3) + +**Status:** +- No progress. + + +# Build Tools # {#build_tools} +This section covers build tools for both the KiCad source as well as the +custom dependency builds required to build KiCad. + +## Create Separate Build Dependency Project ## {#depends_prj} +**Goal:** + +Move the library dependencies and their patches into a separate project to +developers to build and install them as required instead of requiring them +at build time. Give developers the flexibility to build and/or install +library dependencies as they see fit. Remove them from the KiCad source code +to reduce the build footprint. + +**Task:** +- Create a separate project to build all external dependency libraries that are + currently build from source (Boost, OpenSSL, etc). +- Use CMake to create a package configuration file for each library so the + KiCad find package can pull in header paths, library dependencies, compile + flags, and link flags to build KiCad. +- Use CMake find package to pull external dependencies. +- Remove all build from source dependencies for KiCad source code. + +**Dependencies:** +- None + +**Status:** +- Initial concept discussions. + +## Platform Binary Installers ## {#installers} +**Goal:** + +Provide quality installers for all supported platforms. + +**Task:** +- Bring OSX installer up to the level of the Window's and Linux installers. +- Possible use of CPack to build platform specific installers as long as they + are of the same or better quality than the current independent installers. + +**Dependencies** +- None + +**Status** +- No progress + + +# Common Library # {#common_lib} +This section covers the source code shared between all of the KiCad +applications + +## Unified Rendering Framework ## {#unified_rendering} +**Goal:** + +Provide a single framework for developing new tools. Port existing tools +to the new framework and remove the legacy framework tools. + +**Task:** +- Port wxDC to GAL or get Cairo rendering to nearly the performance of the + current wxDC rendering so that we have a single framework to develop new + tools and we can continue to support systems that don't have a complete + OpenGL stack. + +**Dependencies** +- [Tool framework](http://www.ohwr.org/projects/cern-kicad/wiki/WorkPackages) + +**Status** +- No progress + +## Unified Geometry Library ## {#geometry_lib} +**Goal:** + +Select a single geometry library so that all applications share a common +base for 2D objects. Remove any redundant geometry libraries and code to +clean up code base. + +**Task:** +- Select the best geometry library (Boost, etc.) for the task. +- Port all legacy geometry code to the selected library. +- Remove any unused geometry library code. + +**Dependencies:** +- None + +**Status:** +- In progress as part of push and shove router. + +## Conversion to wxWidgets 3 ## {#wxwidgets3} +**Goal:** + +Stop supporting the version 2 branch of wxWidgets so that newer features +provided by version 3 can be utilized. + +**Task:** +- Make wxWidgets 3 a build requirement. +- Remove all wxWidgets 2 specific code. + +**Dependencies:** +- wxWidgets 3 is widely available on Linux distributions. + +**Status:** +- No progress + +## Linux Printing Improvements ## {#linux_print} +**Goal:** + +Bring printing on Linux up to par with printing on Windows. + +**Task:** +- Resolve Linux printing issues. + +**Dependencies** +- [wxWidgets 3](#wxwidgets3) + +**Status** +- No progress. + +## Object Properties and Introspection ## {#object_props} +**Goal:** + +Provide an object introspection system using properties. + +**Task:** +- Select existing or develop property system. +- Add definable properties to base objects. +- Create introspection framework for manipulating object properties. +- Serialization of properties to and from files and/or other I/O structures. +- Create tool to edit property name/type/value table. + +**Dependencies:** +- None + +**Status:** +- No progress. + +## Dynamic Library Plugin ## {#plugin_base} +**Goal:** + +Create a base library plugin for handling external file I/O. This will allow +plugins to be provided that are external to the project such as providing solid +model file support (STEP, IGES, etc.) using OpenCascade without making it a +project dependency. + +**Task:** +- Create a plugin to handle dynamically registered plugins for loading and + saving file formats. +- This object should be flexible enough to be extended for handling all file + plugin types including schematic, board, footprint library, component + library, etc. +- See [blueprint](https://blueprints.launchpad.net/kicad/+spec/pluggable-file-io) + on Launchpad for more information. + +**Dependencies:** +- None + +**Status:** +- No progress. + + +# KiCad: Application Launcher # {#kicad} +This section applies to the source code for the KiCad application launcher. + + +# Eeschema: Schematic Editor # {#eeschema} +This section applies to the source code for the Eeschema schematic editor. + +## Coherent SCHEMATIC Object ## {#sch_object} +**Goal:** + +Clean up the code related to the schematic object(s) into a coherent object for +managing and manipulating the schematic. + +**Task:** +- Move most if not all of the code from SCH_SCREEN to the new SCHEMATIC object. +- Add any missing functionality to the SCHEMATIC object. + +**Dependencies:** +- None + +**Status:** +- No progress. + +## Hierarchical Sheet Design ## {#hierarchy_fix} +**Goal:** + +Create a more robust sheet instance design rather than recreating them on the +fly every time sheet information is required. + +**Task:** +- Choose a data structure to contain the sheet hierarchy. +- Create helper class to manipulate the hierarchy data structure. + +**Dependencies:** +- None + +**Status:** +- No progress. + +## Schematic and Component Library Plugin ## {#sch_plugin} +**Goal:** +Create a plugin manager for loading and saving schematics and component +libraries similar to the board plugin manager. + +**Task:** +- Design plugin manager for schematics and component libraries. +- Port the current schematic and component library file formats to use the + plugin. + +**Dependencies:** +- [Dynamic library plugin](#plugin_base) + +**Status:** +- No progress. + +## Graphics Abstraction Layer Conversion ## {#sch_gal} +**Goal:** + +Take advantage of advanced graphics rendering in Eeschema. + +**Task:** +- Port graphics rendering to GAL. + +**Dependencies:** +- None + +**Status:** +- No progress. + +## Port Editing Tools ## {#sch_tool_framework} +**Goal:** + +Use standard tool framework across all applications. + +**Task:** +- Rewrite editing tools using the new tool framework. + +**Dependencies:** +- [GAL port](#sch_gal). + +**Status:** +- No progress. + +## S-Expression File Format ## {#sch_sexpr} +**Goal:** + +Make schematic file format more readable, add new features, and take advantage +of the s-expression capability used in Pcbnew. + +**Task:** +- Finalize feature set and file format. +- Discuss the possibility of dropping the unit-less proposal temporarily to get + the s-expression file format and SWEET library format implemented without + completely rewriting Eeschema. +- Add new s-expression file format to plugin. + +**Dependencies:** +- [Dynamic library plugin](#plugin_base). + +**Status:** +- File format document nearly complete. + +## Implement Sweet Component Libraries ## {#sch_sweet} +**Goal:** + +Make component library design more robust and feature rich. Use s-expressions +to make component library files more readable. + +**Task:** +- Use sweet component file format for component libraries. + +**Dependencies:** +- [S-expression file format](#sch_sexpr). + +**Status:** +- Initial SWEET library written. + +## Component Library Editor Improvements ## {#lib_editor_usability} +**Goal:** + +Make editing components with multiple units and/or alternate graphical +representations easier. + +**Task:** +- Determine usability improvements in the library editor for components with + multiple units and/or alternate graphical representations. +- Implement said useability improvements. + +**Dependencies:** +- None. + +**Status:** +- No progress. + +## Component and Netlist Attributes ## {#netlist_attributes} +**Goal:** +Provide a method of passing information to other tools via the net list. + +**Task:** +- Add virtual components and attributes to netlist to define properties that + can be used by other tools besides the board editor. + +**Dependencies:** +- [S-expression schematic file format](#sch_sexpr). + +**Status:** +- No progress. + + +# CvPcb: Footprint Association Tool # {#cvpcb} +This section covers the source code of the footprint assignment tool CvPcb. + +## Footprint Assignment Tool ## +**Goal:** + +Merge the footprint assignment functionality of CvPcb into Eeschema so +footprints can be assigned inside the schematic editor eliminating the need +to launch an separate program. + +**Task:** +- Merge footprint assignment capability into Pcbnew shared library. +- Remove CvPcb as a stand alone tool. +- Add functionality to both the schematic and board editors so users can assign + footprints as they prefer. + +**Dependencies:** +- [Convert to a single process application](#kiway). + +**Status:** +- Initial library conversion committed to product branch. + + +# Pcbnew: Circuit Board Editor # {#pcbnew} +This section covers the source code of the board editing application Pcbnew. + +## Tool Framework ## {#pcb_tool_framework} +**Goal:** + +Unify all board editing tools under a single framework. + +**Task:** +- Complete porting of all board editing tools to new tool framework so they + are available in the OpenGL and Cairo canvases. +- Remove all duplicate legacy editing tools. + +**Dependencies:** +- None + +**Status:** +- Initial porting work in progress. + +## Linked Objects ## {#pcb_linked_objects} +**Goal:** + +Provide a way to allow external objects such as footprints to be externally +linked in the board file so that changes in the footprint are automatically +updated. This will all a one to many object relationship which can pave the +way for real board modules. + +**Task:** +- Add externally and internally linked objects to the file format to allow for + footprints and/or other board objects to be shared (one to many relationship) + instead of only supporting embedded objects (one to one relationship) that + can only be edited in place. + +**Dependencies:** +- None. + +**Status:** +- No progress. + +## Modeling ## {#modeling} +**Goal:** + +Provide improved solid modeling support for KiCad including the file formats +available in OpenCascade. + +**Task:** +- Design plugin architecture to handle loading and saving 3D models. +- Back port existing 3D formats (IDF and S3D) to plugin +- Add STEP 3D modeling capability. +- Add IGES 3D modeling capability. + +**Dependencies:** +- [Dynamic library plugin](#plugin_base). + +**Status:** +- No progress. + +## Push and Shove Router Improvements ## {#ps_router_improvements} +**Goal:** +Add features such as matched length and microwave tools to the P&S router. + +**Task:** +- Determine which features are feasible. +- Look at the recently opened FreeRouter code at + http://www.freerouting.net/fen/download/file.php?id=146 for inspiration. + +**Dependencies:** +- None + +**Status:** +- No progress. + +## Layer Improvements ## {#pcb_layers} +**Goal:** + +Increase the number of usable technical and user defined layers in Pcbnew. + +**Task:** +- Extend the number of copper and mechanical layers. +- Develop a type safe flag set template or adapt something already available. +- Refactor Pcbnew code to use new flag and remove the 32 layer limitation. +- Extend the board file format to handle the additional layers. + +**Dependencies:** +- None + +**Status:** +- No progress. + +## Pin and Part Swapping ## {#pcb_drc} +**Goal:** + +Allow Pcbnew to perform pin and/or part swapping during layout so the user +does not have to do it in Eeschema and re-import the net list. + +**Task:** +- Provide forward and back annotation between the schematic and board editors. +- Define netlist file format changes required to handle pin/part swapping. +- Update netlist file formatter and parser to handle file format changes. +- Develop a netlist comparison engine that will produce a netlist diff that + can be passed between the schematic and board editors. +- Create pin/part swap dialog to manipulate swappable pins and parts. +- Add support to handle net label back annotation changes. + +**Dependencies:** +- [S-expression schematic file format](#sch_sexpr). +- [Convert to a single process application](#kiway). + +**Status:** +- No progress. + +## Intelligent Selection Tool ## {#pcb_selection_tool} +**Goal:** + +Make the selection tool easier for the user to determine which object(s) are +being selected. + +**Task:** +- Determine and define the actual desired behavior. +- Improve ambiguous selections when multiple items are under the cursor or in + the selection bounding box. + +**Dependencies:** +- Tool framework. +- Unified geometry library. + +**Status:** +- Initial design committed to product branch. + +## Clipboard Support ## {#fp_edit_clipboard} +**Goal:** + +Provide clipboard cut and paste for footprints.. + +**Task:** +- Clipboard cut and paste to and from clipboard of footprints in footprint + editor. + +**Dependencies:** +- None + +**Status:** +- No progress. + + +# GerbView: Gerber File Viewer # {#gerbview} + +This section covers the source code for the GerbView gerber file viewer. + +## Graphics Abstraction Layer ## {#gerbview_gal} +**Goal:** + +Graphics rendering unification. + +**Task:** +- Port graphics rendering layer to GAL. + +**Dependencies:** +- None. + +**Status** +- No progress. + +# Documentation # {#documentation} +This section defines the tasks for both the user and developer documentation. + +## Conversion to Markup/down Format ## {#doc_format} +**Goal:** + +Make documentation more VCS friendly and separate document content and +formatting for more uniform formatting across all user documentation. + +**Task:** +- Convert the documentation to a mark up/down language to reduce the VCS + footprint, to be able to actually use the VCS to see what changed, and + improve the formatting consistency. + +**Dependencies:** +- None + +**Status:** +- Started with this document. + +## Grammar Check ## {#doc_grammar} +**Goal:** + +Improve user documentation readability and make life easier to for translators. + +**Task:** +- Review and revise all of the English documentation so that it is update with + the current functionality of the code. +- Translate the update documentation into other languages. + +**Dependencies:** +- None + +**Status:** +- No progress. + +## Maintenance ## {#doc_maintenance} +**Task:** +- Keep screen shots current with the source changes. + +**Dependencies:** +- None. + +**Status:** +- No progress. + +## Convert Developer Documentation to Markup/down Format ## {#dev_doc_format} +**Goal:** + +Improve developers documentation to make life easier for new developers to get +involved with the project. + +**Task:** +- Convert platform build instructions from plain text to new format to be + merged with the developer documentation. +- Convert how to contribute to KiCad instructions from plain text to the new + format to merged with the developer documentation. + +**Dependencies:** +- None. + +**Status:** +- No progress. + + +# Unit Testing # {#unittest} +**Goal:** + +Improve the quality of KiCad and ensure changes do no break existing +capabilities. + +**Task:** +- Explore the possibility of including a C++ unit test framework in addition + to the existing Python framework. +- Create robust enough test coverage to determine if code changes break any + core functionality. + +**Dependencies:** +- Completion of the initial release of this document. + +**Status:** +- In progress. + + +# Circuit Simulation # {#simulation} +**Goal:** + +Provide quality circuit simulation capabilities similar to commercial products. + +**Task:** +- Evaluate and select simulation library (spice, gnucap, qucs, etc). +- Evaluate and select plotting library with wxWidgets support. +- Confirm current spice netlist export is up to the task and add missing + support for simulations. +- Use plotting library to handle simulator output in a consistent manor similar + to LTSpice. +- Develop a tool that allows fine tuning of components on the fly. +- Use plugin for the simulation code to allow support of different simulation + libraries. +- Create a library of simulation components such as voltage source, current + source, current probe, etc. + +**Dependencies:** +- [Dynamic library plugin](#plugin_base). + +**Status:** +- No progress. diff --git a/Doxyfile b/Doxyfile index eb1f77c06c..2ebbf2d951 100644 --- a/Doxyfile +++ b/Doxyfile @@ -338,7 +338,7 @@ TYPEDEF_HIDES_STRUCT = NO # 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, # corresponding to a cache size of 2^16 = 65536 symbols. -SYMBOL_CACHE_SIZE = 0 +SYMBOL_CACHE_SIZE = 4 # Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be # set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given @@ -349,7 +349,7 @@ SYMBOL_CACHE_SIZE = 0 # formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0, # corresponding to a cache size of 2^16 = 65536 symbols. -LOOKUP_CACHE_SIZE = 0 +LOOKUP_CACHE_SIZE = 6 #--------------------------------------------------------------------------- # Build related configuration options @@ -661,7 +661,8 @@ WARN_LOGFILE = # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = kicad \ +INPUT = Documentation/development/road-map.md \ + kicad \ pcbnew \ cvpcb \ eeschema \ From cfa67aa218da7a4450bcd56d0f203edcb6e04140 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 19 May 2014 20:24:07 +0200 Subject: [PATCH 433/741] Pcbnew: plot dialog: remove obscure and useless option about texts which are not value or reference. cosmetic enhancement in dialog. page layout: fix bug Bug #1320839 (canvas refresh countinously called when moving an item) --- .../page_layout/class_worksheet_dataitem.cpp | 4 +- gerbview/files.cpp | 10 +- gerbview/gerbview.cpp | 7 - gerbview/gerbview_frame.cpp | 2 + kicad/mainframe.cpp | 12 +- pagelayout_editor/events_functions.cpp | 17 +- pcbnew/dialogs/dialog_plot.cpp | 6 +- pcbnew/dialogs/dialog_plot_base.cpp | 27 +- pcbnew/dialogs/dialog_plot_base.fbp | 276 ++++++------------ pcbnew/dialogs/dialog_plot_base.h | 5 +- pcbnew/pcb_plot_params.cpp | 9 +- pcbnew/pcb_plot_params.h | 5 - pcbnew/plot_brditems_plotter.cpp | 5 +- 13 files changed, 140 insertions(+), 245 deletions(-) diff --git a/common/page_layout/class_worksheet_dataitem.cpp b/common/page_layout/class_worksheet_dataitem.cpp index 66683d191a..6032f39ef3 100644 --- a/common/page_layout/class_worksheet_dataitem.cpp +++ b/common/page_layout/class_worksheet_dataitem.cpp @@ -249,7 +249,7 @@ const wxPoint WORKSHEET_DATAITEM::GetStartPosUi( int ii ) const { DPOINT pos = GetStartPos( ii ); pos = pos * m_WSunits2Iu; - return wxPoint( int(pos.x), int(pos.y) ); + return wxPoint( KiROUND(pos.x), KiROUND(pos.y) ); } const DPOINT WORKSHEET_DATAITEM::GetEndPos( int ii ) const @@ -285,7 +285,7 @@ const wxPoint WORKSHEET_DATAITEM::GetEndPosUi( int ii ) const { DPOINT pos = GetEndPos( ii ); pos = pos * m_WSunits2Iu; - return wxPoint( int(pos.x), int(pos.y) ); + return wxPoint( KiROUND(pos.x), KiROUND(pos.y) ); } diff --git a/gerbview/files.cpp b/gerbview/files.cpp index a4e22938aa..6d219cd131 100644 --- a/gerbview/files.cpp +++ b/gerbview/files.cpp @@ -5,7 +5,7 @@ /* * 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) 2012 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 2004-2012 KiCad Developers, see change_log.txt for contributors. * * This program is free software; you can redistribute it and/or @@ -184,8 +184,8 @@ bool GERBVIEW_FRAME::LoadGerberFiles( const wxString& aFullFileName ) if( layer == NO_AVAILABLE_LAYERS ) { - wxString msg = wxT( "No more empty layers are available. The remaining gerber " ); - msg += wxT( "files will not be loaded." ); + wxString msg = wxT( "No more empty available layers.\n" + "The remaining gerber files will not be loaded." ); wxMessageBox( msg ); break; } @@ -266,8 +266,8 @@ bool GERBVIEW_FRAME::LoadExcellonFiles( const wxString& aFullFileName ) if( layer == NO_AVAILABLE_LAYERS ) { - wxString msg = wxT( "No more empty layers are available. The remaining gerber " ); - msg += wxT( "files will not be loaded." ); + wxString msg = wxT( "No more empty available layers.\n" + "The remaining gerber files will not be loaded." ); wxMessageBox( msg ); break; } diff --git a/gerbview/gerbview.cpp b/gerbview/gerbview.cpp index 0423cd6b72..fbdc0288bc 100644 --- a/gerbview/gerbview.cpp +++ b/gerbview/gerbview.cpp @@ -84,13 +84,6 @@ static struct IFACE : public KIFACE_I case FRAME_GERBER: { GERBVIEW_FRAME* frame = new GERBVIEW_FRAME( aKiway, aParent ); - - /* Is this really needed since at this point there is no open file? - frame->Zoom_Automatique( true ); // Zoom fit in frame - - if so, why is the constructor not doing it? - */ - return frame; } break; diff --git a/gerbview/gerbview_frame.cpp b/gerbview/gerbview_frame.cpp index b6d6d412e4..0674be6c1e 100644 --- a/gerbview/gerbview_frame.cpp +++ b/gerbview/gerbview_frame.cpp @@ -166,6 +166,8 @@ GERBVIEW_FRAME::GERBVIEW_FRAME( KIWAY* aKiway, wxWindow* aParent ): ReFillLayerWidget(); // this is near end because contents establish size m_LayersManager->ReFillRender(); // Update colors in Render after the config is read m_auimgr.Update(); + + Zoom_Automatique( true ); // Gives a default zoom value } diff --git a/kicad/mainframe.cpp b/kicad/mainframe.cpp index 0d965c0af8..942f0fe975 100644 --- a/kicad/mainframe.cpp +++ b/kicad/mainframe.cpp @@ -305,18 +305,12 @@ void KICAD_MANAGER_FRAME::OnRunEeschema( wxCommandEvent& event ) void KICAD_MANAGER_FRAME::OnRunGerbview( wxCommandEvent& event ) { - wxFileName fn( m_ProjectFileName ); - - wxString path = wxT( "\"" ); - - path += fn.GetPath( wxPATH_GET_SEPARATOR | wxPATH_GET_VOLUME ) + wxT( "\"" ); - + // Gerbview is called without any file to open, because we do not know + // the list and the name of files to open (if any...). #if USE_KIFACE && 0 - // I cannot make sense of the fn. - #else - Execute( this, GERBVIEW_EXE, path ); + Execute( this, GERBVIEW_EXE, wxEmptyString ); #endif } diff --git a/pagelayout_editor/events_functions.cpp b/pagelayout_editor/events_functions.cpp index c2fd6982dc..0bec641c0e 100644 --- a/pagelayout_editor/events_functions.cpp +++ b/pagelayout_editor/events_functions.cpp @@ -331,16 +331,29 @@ static void moveItem( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPositio wxCHECK_RET( (item != NULL), wxT( "Cannot move NULL item." ) ); wxPoint position = aPanel->GetParent()->GetCrossHairPosition() - ( initialCursorPosition - initialPositionUi ); + wxPoint previous_position; if( (item->GetFlags() & LOCATE_STARTPOINT) ) + { + previous_position = item->GetStartPosUi(); item->MoveStartPointToUi( position ); + } else if( (item->GetFlags() & LOCATE_ENDPOINT) ) + { + previous_position = item->GetEndPosUi(); item->MoveEndPointToUi( position ); + } else + { + previous_position = item->GetStartPosUi(); item->MoveToUi( position ); + } - // Draw the item item at it's new position. - if( aPanel ) + // Draw the item item at it's new position, if it is modified, + // (does not happen each time the mouse is moved, because the + // item is placed on grid) + // to avoid useless computation time. + if( aPanel && ( previous_position != position ) ) aPanel->Refresh(); } diff --git a/pcbnew/dialogs/dialog_plot.cpp b/pcbnew/dialogs/dialog_plot.cpp index 4c9f615ed7..6e66dff99f 100644 --- a/pcbnew/dialogs/dialog_plot.cpp +++ b/pcbnew/dialogs/dialog_plot.cpp @@ -187,7 +187,6 @@ void DIALOG_PLOT::Init_Dialog() // Options to plot texts on footprints m_plotModuleValueOpt->SetValue( m_plotOpts.GetPlotValue() ); m_plotModuleRefOpt->SetValue( m_plotOpts.GetPlotReference() ); - m_plotTextOther->SetValue( m_plotOpts.GetPlotOtherText() ); m_plotInvisibleText->SetValue( m_plotOpts.GetPlotInvisibleText() ); // Options to plot pads and vias holes @@ -480,7 +479,7 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event ) case PLOT_FORMAT_DXF: m_drillShapeOpt->Enable( true ); - m_plotModeOpt->Enable( true ); + m_plotModeOpt->Enable( false ); m_plotMirrorOpt->Enable( false ); m_plotMirrorOpt->SetValue( false ); m_useAuxOriginCheckBox->Enable( true ); @@ -502,7 +501,7 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event ) m_forcePSA4OutputOpt->Enable( false ); m_forcePSA4OutputOpt->SetValue( false ); - m_PlotOptionsSizer->Show( m_GerberOptionsSizer ); + m_PlotOptionsSizer->Hide( m_GerberOptionsSizer ); m_PlotOptionsSizer->Hide( m_HPGLOptionsSizer ); m_PlotOptionsSizer->Hide( m_PSOptionsSizer ); break; @@ -570,7 +569,6 @@ void DIALOG_PLOT::applyPlotSettings() tempOptions.SetUseAuxOrigin( m_useAuxOriginCheckBox->GetValue() ); tempOptions.SetPlotValue( m_plotModuleValueOpt->GetValue() ); tempOptions.SetPlotReference( m_plotModuleRefOpt->GetValue() ); - tempOptions.SetPlotOtherText( m_plotTextOther->GetValue() ); tempOptions.SetPlotInvisibleText( m_plotInvisibleText->GetValue() ); tempOptions.SetScaleSelection( m_scaleOpt->GetSelection() ); tempOptions.SetDrillMarksType( static_cast diff --git a/pcbnew/dialogs/dialog_plot_base.cpp b/pcbnew/dialogs/dialog_plot_base.cpp index 7d1e54bec4..4b7b5695d4 100644 --- a/pcbnew/dialogs/dialog_plot_base.cpp +++ b/pcbnew/dialogs/dialog_plot_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 8 2012) +// C++ code generated with wxFormBuilder (version Nov 6 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -94,7 +94,7 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr m_plotPads_on_Silkscreen = new wxCheckBox( this, ID_ALLOW_PRINT_PAD_ON_SILKSCREEN, _("Plot pads on silkscreen"), wxDefaultPosition, wxDefaultSize, 0 ); m_plotPads_on_Silkscreen->SetToolTip( _("Enable/disable print/plot pads on silkscreen layers\nWhen disable, pads are never potted on silkscreen layers\nWhen enable, pads are potted only if they appear on silkscreen layers") ); - bSizerPlotItems->Add( m_plotPads_on_Silkscreen, 0, wxTOP|wxRIGHT|wxLEFT, 2 ); + bSizerPlotItems->Add( m_plotPads_on_Silkscreen, 0, wxALL, 2 ); m_plotModuleValueOpt = new wxCheckBox( this, wxID_ANY, _("Plot module value on silkscreen"), wxDefaultPosition, wxDefaultSize, 0 ); bSizerPlotItems->Add( m_plotModuleValueOpt, 0, wxTOP|wxRIGHT|wxLEFT, 2 ); @@ -102,20 +102,15 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr m_plotModuleRefOpt = new wxCheckBox( this, ID_PRINT_REF, _("Plot module reference on silkscreen"), wxDefaultPosition, wxDefaultSize, 0 ); bSizerPlotItems->Add( m_plotModuleRefOpt, 0, wxTOP|wxRIGHT|wxLEFT, 2 ); - m_plotTextOther = new wxCheckBox( this, wxID_ANY, _("Plot other module texts on silkscreen"), wxDefaultPosition, wxDefaultSize, 0 ); - m_plotTextOther->SetToolTip( _("Enable/disable print/plot module field texts on silkscreen layers") ); - - bSizerPlotItems->Add( m_plotTextOther, 0, wxTOP|wxRIGHT|wxLEFT, 2 ); - - m_plotInvisibleText = new wxCheckBox( this, wxID_ANY, _("Plot invisible texts on silkscreen"), wxDefaultPosition, wxDefaultSize, 0 ); - m_plotInvisibleText->SetToolTip( _("Force print/plot module invisible texts on silkscreen layers") ); + m_plotInvisibleText = new wxCheckBox( this, wxID_ANY, _("Force plot invisible values/refrences"), wxDefaultPosition, wxDefaultSize, 0 ); + m_plotInvisibleText->SetToolTip( _("Force plot invisible values and/or references") ); bSizerPlotItems->Add( m_plotInvisibleText, 0, wxALL, 2 ); m_plotNoViaOnMaskOpt = new wxCheckBox( this, wxID_ANY, _("Do not tent vias"), wxDefaultPosition, wxDefaultSize, 0 ); m_plotNoViaOnMaskOpt->SetToolTip( _("Remove soldermask on vias.") ); - bSizerPlotItems->Add( m_plotNoViaOnMaskOpt, 0, wxALL, 2 ); + bSizerPlotItems->Add( m_plotNoViaOnMaskOpt, 0, wxTOP|wxRIGHT|wxLEFT, 2 ); m_excludeEdgeLayerOpt = new wxCheckBox( this, wxID_ANY, _("Exclude PCB edge layer from other layers"), wxDefaultPosition, wxDefaultSize, 0 ); m_excludeEdgeLayerOpt->SetToolTip( _("Exclude contents of the pcb edge layer from all other layers") ); @@ -123,11 +118,16 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr bSizerPlotItems->Add( m_excludeEdgeLayerOpt, 0, wxALL, 2 ); m_plotMirrorOpt = new wxCheckBox( this, ID_MIROR_OPT, _("Mirrored plot"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizerPlotItems->Add( m_plotMirrorOpt, 0, wxALL, 2 ); + bSizerPlotItems->Add( m_plotMirrorOpt, 0, wxTOP|wxRIGHT|wxLEFT, 2 ); m_plotPSNegativeOpt = new wxCheckBox( this, wxID_ANY, _("Negative plot"), wxDefaultPosition, wxDefaultSize, 0 ); bSizerPlotItems->Add( m_plotPSNegativeOpt, 0, wxALL, 2 ); + m_useAuxOriginCheckBox = new wxCheckBox( this, wxID_ANY, _("Use auxiliary axis as origin"), wxDefaultPosition, wxDefaultSize, 0 ); + m_useAuxOriginCheckBox->SetToolTip( _("Use auxiliary axis as coordinates origin in Gerber files.") ); + + bSizerPlotItems->Add( m_useAuxOriginCheckBox, 0, wxTOP|wxRIGHT|wxLEFT, 2 ); + bSizer192->Add( bSizerPlotItems, 0, wxEXPAND, 5 ); @@ -231,11 +231,6 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr m_GerberOptionsSizer->Add( m_subtractMaskFromSilk, 0, wxTOP|wxRIGHT|wxLEFT, 2 ); - m_useAuxOriginCheckBox = new wxCheckBox( this, wxID_ANY, _("Use auxiliary axis as origin"), wxDefaultPosition, wxDefaultSize, 0 ); - m_useAuxOriginCheckBox->SetToolTip( _("Use auxiliary axis as coordinates origin in Gerber files.") ); - - m_GerberOptionsSizer->Add( m_useAuxOriginCheckBox, 0, wxALL, 2 ); - m_PlotOptionsSizer->Add( m_GerberOptionsSizer, 0, wxALL|wxEXPAND, 3 ); diff --git a/pcbnew/dialogs/dialog_plot_base.fbp b/pcbnew/dialogs/dialog_plot_base.fbp index 2137a6813a..b9e5800cc9 100644 --- a/pcbnew/dialogs/dialog_plot_base.fbp +++ b/pcbnew/dialogs/dialog_plot_base.fbp @@ -20,8 +20,10 @@ . 1 + 1 1 1 + UI 1 0 @@ -818,7 +820,7 @@ 2 - wxTOP|wxRIGHT|wxLEFT + wxALL 0 1 @@ -1080,94 +1082,6 @@ - - 2 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Plot other module texts on silkscreen - - 0 - - - 0 - - 1 - m_plotTextOther - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Enable/disable print/plot module field texts on silkscreen layers - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 2 wxALL @@ -1201,7 +1115,7 @@ 0 0 wxID_ANY - Plot invisible texts on silkscreen + Force plot invisible values/refrences 0 @@ -1222,7 +1136,7 @@ 0 - Force print/plot module invisible texts on silkscreen layers + Force plot invisible values and/or references wxFILTER_NONE wxDefaultValidator @@ -1258,7 +1172,7 @@ 2 - wxALL + wxTOP|wxRIGHT|wxLEFT 0 1 @@ -1434,7 +1348,7 @@ 2 - wxALL + wxTOP|wxRIGHT|wxLEFT 0 1 @@ -1608,6 +1522,94 @@ + + 2 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Use auxiliary axis as origin + + 0 + + + 0 + + 1 + m_useAuxOriginCheckBox + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Use auxiliary axis as coordinates origin in Gerber files. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2864,94 +2866,6 @@
- - 2 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Use auxiliary axis as origin - - 0 - - - 0 - - 1 - m_useAuxOriginCheckBox - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Use auxiliary axis as coordinates origin in Gerber files. - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

diff --git a/pcbnew/dialogs/dialog_plot_base.h b/pcbnew/dialogs/dialog_plot_base.h index f435dd1107..aac7fb470f 100644 --- a/pcbnew/dialogs/dialog_plot_base.h +++ b/pcbnew/dialogs/dialog_plot_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 8 2012) +// C++ code generated with wxFormBuilder (version Nov 6 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -69,12 +69,12 @@ class DIALOG_PLOT_BASE : public DIALOG_SHIM wxCheckBox* m_plotPads_on_Silkscreen; wxCheckBox* m_plotModuleValueOpt; wxCheckBox* m_plotModuleRefOpt; - wxCheckBox* m_plotTextOther; wxCheckBox* m_plotInvisibleText; wxCheckBox* m_plotNoViaOnMaskOpt; wxCheckBox* m_excludeEdgeLayerOpt; wxCheckBox* m_plotMirrorOpt; wxCheckBox* m_plotPSNegativeOpt; + wxCheckBox* m_useAuxOriginCheckBox; wxStaticText* m_staticText11; wxChoice* m_drillShapeOpt; wxStaticText* m_staticText12; @@ -90,7 +90,6 @@ class DIALOG_PLOT_BASE : public DIALOG_SHIM wxStaticBoxSizer* m_GerberOptionsSizer; wxCheckBox* m_useGerberExtensions; wxCheckBox* m_subtractMaskFromSilk; - wxCheckBox* m_useAuxOriginCheckBox; wxStaticBoxSizer* m_HPGLOptionsSizer; wxStaticText* m_textPenSize; wxTextCtrl* m_HPGLPenSizeOpt; diff --git a/pcbnew/pcb_plot_params.cpp b/pcbnew/pcb_plot_params.cpp index 326c33d056..e8a1d8e3e0 100644 --- a/pcbnew/pcb_plot_params.cpp +++ b/pcbnew/pcb_plot_params.cpp @@ -93,7 +93,6 @@ PCB_PLOT_PARAMS::PCB_PLOT_PARAMS() m_A4Output = false; m_plotReference = true; m_plotValue = true; - m_plotOtherText = true; m_plotInvisibleText = false; m_plotPadsOnSilkLayer = false; m_subtractMaskFromSilk = false; @@ -162,8 +161,6 @@ void PCB_PLOT_PARAMS::Format( OUTPUTFORMATTER* aFormatter, m_plotReference ? trueStr : falseStr ); aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_plotvalue ), m_plotValue ? trueStr : falseStr ); - aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_plotothertext ), - m_plotOtherText ? trueStr : falseStr ); aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_plotinvisibletext ), m_plotInvisibleText ? trueStr : falseStr ); aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_padsonsilk ), @@ -225,8 +222,6 @@ bool PCB_PLOT_PARAMS::operator==( const PCB_PLOT_PARAMS &aPcbPlotParams ) const return false; if( m_plotValue != aPcbPlotParams.m_plotValue ) return false; - if( m_plotOtherText != aPcbPlotParams.m_plotOtherText ) - return false; if( m_plotInvisibleText != aPcbPlotParams.m_plotInvisibleText ) return false; if( m_plotPadsOnSilkLayer != aPcbPlotParams.m_plotPadsOnSilkLayer ) @@ -390,8 +385,8 @@ void PCB_PLOT_PARAMS_PARSER::Parse( PCB_PLOT_PARAMS* aPcbPlotParams ) case T_plotvalue: aPcbPlotParams->m_plotValue = parseBool(); break; - case T_plotothertext: - aPcbPlotParams->m_plotOtherText = parseBool(); + case T_plotothertext: // no more in use: keep for compatibility + parseBool(); // skip param value break; case T_plotinvisibletext: aPcbPlotParams->m_plotInvisibleText = parseBool(); diff --git a/pcbnew/pcb_plot_params.h b/pcbnew/pcb_plot_params.h index 6e314352e0..60f2b137cc 100644 --- a/pcbnew/pcb_plot_params.h +++ b/pcbnew/pcb_plot_params.h @@ -152,9 +152,6 @@ private: /// Enable plotting of part values bool m_plotValue; - /// Enable plotting of other fields - bool m_plotOtherText; - /// Force plotting of fields marked invisible bool m_plotInvisibleText; @@ -237,8 +234,6 @@ public: void SetPlotInvisibleText( bool aFlag ) { m_plotInvisibleText = aFlag; } bool GetPlotInvisibleText() const { return m_plotInvisibleText; } - void SetPlotOtherText( bool aFlag ) { m_plotOtherText = aFlag; } - bool GetPlotOtherText() const { return m_plotOtherText; } void SetPlotValue( bool aFlag ) { m_plotValue = aFlag; } bool GetPlotValue() const { return m_plotValue; } void SetPlotReference( bool aFlag ) { m_plotReference = aFlag; } diff --git a/pcbnew/plot_brditems_plotter.cpp b/pcbnew/plot_brditems_plotter.cpp index 3926012958..be7ac83311 100644 --- a/pcbnew/plot_brditems_plotter.cpp +++ b/pcbnew/plot_brditems_plotter.cpp @@ -155,10 +155,7 @@ bool BRDITEMS_PLOTTER::PlotAllTextsModule( MODULE* aModule ) if( !textModule ) continue; - if( !GetPlotOtherText() ) - continue; - - if( !textModule->IsVisible() && !GetPlotInvisibleText() ) + if( !textModule->IsVisible() ) continue; textLayer = textModule->GetLayer(); From f49e9a285ff91cbed81e84255d3cffe9aeaca5db Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Mon, 19 May 2014 17:27:09 -0500 Subject: [PATCH 434/741] fix compiler warnings --- pcbnew/tools/common_actions.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 539de05ceb..2a6aa25305 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -208,11 +208,11 @@ TOOL_ACTION COMMON_ACTIONS::layerAlphaDec( "pcbnew.layerAlphaDec", // Grid control TOOL_ACTION COMMON_ACTIONS::gridFast1( "pcbnew.gridFast1", - AS_GLOBAL, MD_ALT + '1', + AS_GLOBAL, MD_ALT + int( '1' ), "", "" ); TOOL_ACTION COMMON_ACTIONS::gridFast2( "pcbnew.gridFast2", - AS_GLOBAL, MD_ALT + '2', + AS_GLOBAL, MD_ALT + int( '2' ), "", "" ); TOOL_ACTION COMMON_ACTIONS::gridNext( "pcbnew.gridNext", @@ -220,7 +220,7 @@ TOOL_ACTION COMMON_ACTIONS::gridNext( "pcbnew.gridNext", "", "" ); TOOL_ACTION COMMON_ACTIONS::gridPrev( "pcbnew.gridPrev", - AS_GLOBAL, MD_CTRL + '`', + AS_GLOBAL, MD_CTRL + int( '`' ), "", "" ); @@ -249,7 +249,7 @@ TOOL_ACTION COMMON_ACTIONS::resetCoords( "pcbnew.resetCoords", "", "" ); TOOL_ACTION COMMON_ACTIONS::switchUnits( "pcbnew.switchUnits", - AS_GLOBAL, MD_CTRL + 'U', + AS_GLOBAL, MD_CTRL + int( 'U' ), "", "" ); TOOL_ACTION COMMON_ACTIONS::showHelp( "pcbnew.showHelp", From f31f92e45e495339d979109dcaa019a1c9ea3ce1 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 20 May 2014 11:29:37 +0200 Subject: [PATCH 435/741] Fixes the bug that causes pcbnew crash, when there are multiple net classes and the plot dialog was opened. Changed NETCLASS* to boost::shared_ptr. --- include/class_board_design_settings.h | 2 +- pcbnew/autorouter/routing_matrix.cpp | 2 +- pcbnew/class_board.cpp | 2 +- pcbnew/class_board_connected_item.cpp | 14 ++--- pcbnew/class_board_connected_item.h | 2 +- pcbnew/class_board_design_settings.cpp | 12 ++-- pcbnew/class_netclass.cpp | 57 ++++++------------- pcbnew/class_netclass.h | 26 +++++---- pcbnew/class_netinfo.h | 10 ++-- pcbnew/class_netinfo_item.cpp | 1 - pcbnew/class_track.cpp | 4 +- pcbnew/class_zone.cpp | 2 +- pcbnew/dialogs/dialog_design_rules.cpp | 18 +++--- .../dialog_global_edit_tracks_and_vias.cpp | 2 +- pcbnew/dialogs/dialog_plot.h | 2 +- pcbnew/drc.cpp | 4 +- pcbnew/drc_clearance_test_functions.cpp | 2 +- pcbnew/drc_stuff.h | 4 +- pcbnew/eagle_plugin.cpp | 2 +- pcbnew/editrack.cpp | 2 +- pcbnew/legacy_plugin.cpp | 18 +++--- pcbnew/legacy_plugin.h | 3 +- pcbnew/pcb_parser.cpp | 12 ++-- pcbnew/router/pns_router.cpp | 2 +- pcbnew/router/router_tool.cpp | 2 +- pcbnew/specctra.h | 3 +- pcbnew/specctra_export.cpp | 8 +-- 27 files changed, 97 insertions(+), 121 deletions(-) diff --git a/include/class_board_design_settings.h b/include/class_board_design_settings.h index 8d04fe0922..28201dd866 100644 --- a/include/class_board_design_settings.h +++ b/include/class_board_design_settings.h @@ -105,7 +105,7 @@ public: * Function GetDefault * @return the default netclass. */ - inline NETCLASS* GetDefault() const + inline NETCLASSPTR GetDefault() const { return m_NetClasses.GetDefault(); } diff --git a/pcbnew/autorouter/routing_matrix.cpp b/pcbnew/autorouter/routing_matrix.cpp index ee1890bf2a..8c9e3b2cbd 100644 --- a/pcbnew/autorouter/routing_matrix.cpp +++ b/pcbnew/autorouter/routing_matrix.cpp @@ -201,7 +201,7 @@ void PlaceCells( BOARD* aPcb, int net_code, int flag ) LAYER_MSK layerMask; // use the default NETCLASS? - NETCLASS* nc = aPcb->GetDesignSettings().GetDefault(); + NETCLASSPTR nc = aPcb->GetDesignSettings().GetDefault(); int trackWidth = nc->GetTrackWidth(); int clearance = nc->GetClearance(); diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index 2fc5fa7d3e..9a1456a7b0 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -91,7 +91,7 @@ BOARD::BOARD() : m_Layer[layer].m_Type = LT_UNDEFINED; } - NETCLASS* defaultClass = m_designSettings.GetDefault(); + NETCLASSPTR defaultClass = m_designSettings.GetDefault(); defaultClass->SetDescription( _( "This is the default net class." ) ); // Initialize default values in default netclass. diff --git a/pcbnew/class_board_connected_item.cpp b/pcbnew/class_board_connected_item.cpp index 0b91036802..eaaa3390ca 100644 --- a/pcbnew/class_board_connected_item.cpp +++ b/pcbnew/class_board_connected_item.cpp @@ -89,7 +89,7 @@ const wxString& BOARD_CONNECTED_ITEM::GetShortNetname() const int BOARD_CONNECTED_ITEM::GetClearance( BOARD_CONNECTED_ITEM* aItem ) const { - NETCLASS* myclass = GetNetClass(); + NETCLASSPTR myclass = GetNetClass(); // DO NOT use wxASSERT, because GetClearance is called inside an OnPaint event // and a call to wxASSERT can crash the application. @@ -116,7 +116,7 @@ int BOARD_CONNECTED_ITEM::GetClearance( BOARD_CONNECTED_ITEM* aItem ) const } -NETCLASS* BOARD_CONNECTED_ITEM::GetNetClass() const +NETCLASSPTR BOARD_CONNECTED_ITEM::GetNetClass() const { // It is important that this be implemented without any sequential searching. // Simple array lookups should be fine, performance-wise. @@ -128,10 +128,11 @@ NETCLASS* BOARD_CONNECTED_ITEM::GetNetClass() const if( board == NULL ) // Should not occur { DBG(printf( "%s: NULL board,type %d", __func__, Type() );) - return NULL; + + return NETCLASSPTR(); } - NETCLASS* netclass = NULL; + NETCLASSPTR netclass; NETINFO_ITEM* net = board->FindNet( GetNetCode() ); if( net ) @@ -151,15 +152,12 @@ NETCLASS* BOARD_CONNECTED_ITEM::GetNetClass() const wxString BOARD_CONNECTED_ITEM::GetNetClassName() const { wxString name; - NETCLASS* myclass = GetNetClass(); + NETCLASSPTR myclass = GetNetClass(); if( myclass ) name = myclass->GetName(); else - { - BOARD* board = GetBoard(); name = NETCLASS::Default; - } return name; } diff --git a/pcbnew/class_board_connected_item.h b/pcbnew/class_board_connected_item.h index 2742fa3106..a3972185d0 100644 --- a/pcbnew/class_board_connected_item.h +++ b/pcbnew/class_board_connected_item.h @@ -142,7 +142,7 @@ public: * Function GetNetClass * returns the NETCLASS for this item. */ - NETCLASS* GetNetClass() const; + boost::shared_ptr GetNetClass() const; /** * Function GetNetClassName diff --git a/pcbnew/class_board_design_settings.cpp b/pcbnew/class_board_design_settings.cpp index aac977d827..b4017ae21d 100644 --- a/pcbnew/class_board_design_settings.cpp +++ b/pcbnew/class_board_design_settings.cpp @@ -176,8 +176,8 @@ void BOARD_DESIGN_SETTINGS::AppendConfigs( PARAM_CFG_ARRAY* aResult ) bool BOARD_DESIGN_SETTINGS::SetCurrentNetClass( const wxString& aNetClassName ) { - NETCLASS* netClass = m_NetClasses.Find( aNetClassName ); - bool lists_sizes_modified = false; + NETCLASSPTR netClass = m_NetClasses.Find( aNetClassName ); + bool lists_sizes_modified = false; // if not found (should not happen) use the default if( netClass == NULL ) @@ -229,7 +229,7 @@ int BOARD_DESIGN_SETTINGS::GetBiggestClearanceValue() //Read list of Net Classes for( NETCLASSES::const_iterator nc = m_NetClasses.begin(); nc != m_NetClasses.end(); nc++ ) { - NETCLASS* netclass = nc->second; + NETCLASSPTR netclass = nc->second; clearance = std::max( clearance, netclass->GetClearance() ); } @@ -244,7 +244,7 @@ int BOARD_DESIGN_SETTINGS::GetSmallestClearanceValue() //Read list of Net Classes for( NETCLASSES::const_iterator nc = m_NetClasses.begin(); nc != m_NetClasses.end(); nc++ ) { - NETCLASS* netclass = nc->second; + NETCLASSPTR netclass = nc->second; clearance = std::min( clearance, netclass->GetClearance() ); } @@ -254,7 +254,7 @@ int BOARD_DESIGN_SETTINGS::GetSmallestClearanceValue() int BOARD_DESIGN_SETTINGS::GetCurrentMicroViaSize() { - NETCLASS* netclass = m_NetClasses.Find( m_currentNetClassName ); + NETCLASSPTR netclass = m_NetClasses.Find( m_currentNetClassName ); return netclass->GetuViaDiameter(); } @@ -262,7 +262,7 @@ int BOARD_DESIGN_SETTINGS::GetCurrentMicroViaSize() int BOARD_DESIGN_SETTINGS::GetCurrentMicroViaDrill() { - NETCLASS* netclass = m_NetClasses.Find( m_currentNetClassName ); + NETCLASSPTR netclass = m_NetClasses.Find( m_currentNetClassName ); return netclass->GetuViaDrill(); } diff --git a/pcbnew/class_netclass.cpp b/pcbnew/class_netclass.cpp index daa72ff32b..e300f6087f 100644 --- a/pcbnew/class_netclass.cpp +++ b/pcbnew/class_netclass.cpp @@ -23,6 +23,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ +#include #include #include @@ -84,52 +85,25 @@ NETCLASS::~NETCLASS() } -NETCLASSES::NETCLASSES() : - m_Default( NETCLASS::Default ) +NETCLASSES::NETCLASSES() { + m_Default = boost::make_shared( NETCLASS::Default ); } NETCLASSES::~NETCLASSES() { - Clear(); } -void NETCLASSES::Clear() -{ - // Although std::map<> will destroy the items that it contains, in this - // case we have NETCLASS* (pointers) and "destroying" a pointer does not - // delete the object that the pointer points to. - - // this NETCLASSES is owner of its NETCLASS pointers, - // so delete NETCLASSes pointed to by them. - for( iterator i = begin(); i!=end(); ) - { - // http://www.sgi.com/tech/stl/Map.html says: - // "Erasing an element from a map also does not invalidate any iterators, - // except, of course, for iterators that actually point to the element that - // is being erased." - - iterator e = i++; // copy, then advance. - - delete e->second; // delete the NETCLASS, which 'second' points to. - - m_NetClasses.erase( e ); - } -} - - -bool NETCLASSES::Add( NETCLASS* aNetClass ) +bool NETCLASSES::Add( NETCLASSPTR aNetClass ) { const wxString& name = aNetClass->GetName(); if( name == NETCLASS::Default ) { // invoke operator=(), which is currently generated by compiler. - m_Default = *aNetClass; - - delete aNetClass; // we own aNetClass, must delete it since we copied it. + m_Default = aNetClass; return true; } @@ -139,6 +113,7 @@ bool NETCLASSES::Add( NETCLASS* aNetClass ) { // name not found, take ownership m_NetClasses[name] = aNetClass; + return true; } else @@ -150,30 +125,30 @@ bool NETCLASSES::Add( NETCLASS* aNetClass ) } -NETCLASS* NETCLASSES::Remove( const wxString& aNetName ) +NETCLASSPTR NETCLASSES::Remove( const wxString& aNetName ) { NETCLASSMAP::iterator found = m_NetClasses.find( aNetName ); if( found != m_NetClasses.end() ) { - NETCLASS* netclass = found->second; + boost::shared_ptr netclass = found->second; m_NetClasses.erase( found ); return netclass; } - return NULL; + return NETCLASSPTR(); } -NETCLASS* NETCLASSES::Find( const wxString& aName ) const +NETCLASSPTR NETCLASSES::Find( const wxString& aName ) const { if( aName == NETCLASS::Default ) - return (NETCLASS*) &m_Default; + return m_Default; NETCLASSMAP::const_iterator found = m_NetClasses.find( aName ); if( found == m_NetClasses.end() ) - return NULL; + return NETCLASSPTR(); else return found->second; } @@ -197,9 +172,9 @@ void BOARD::SynchronizeNetsAndNetClasses() // and therefore bogus netclass memberships will be deleted in logic below this loop. for( NETCLASSES::iterator clazz = netClasses.begin(); clazz != netClasses.end(); ++clazz ) { - NETCLASS* netclass = clazz->second; + NETCLASSPTR netclass = clazz->second; - for( NETCLASS::iterator member = netclass->begin(); member != netclass->end(); ++member ) + for( NETCLASS::const_iterator member = netclass->begin(); member != netclass->end(); ++member ) { const wxString& netname = *member; @@ -222,7 +197,7 @@ void BOARD::SynchronizeNetsAndNetClasses() for( NETCLASSES::iterator clazz = netClasses.begin(); clazz != netClasses.end(); ++clazz ) { - NETCLASS* netclass = clazz->second; + NETCLASSPTR netclass = clazz->second; netclass->Clear(); } @@ -236,7 +211,7 @@ void BOARD::SynchronizeNetsAndNetClasses() // because of the std:map<> this should be fast, and because of // prior logic, netclass should not be NULL. - NETCLASS* netclass = netClasses.Find( classname ); + NETCLASSPTR netclass = netClasses.Find( classname ); wxASSERT( netclass ); diff --git a/pcbnew/class_netclass.h b/pcbnew/class_netclass.h index 0d79013df8..74a915d635 100644 --- a/pcbnew/class_netclass.h +++ b/pcbnew/class_netclass.h @@ -33,6 +33,7 @@ #include #include +#include #include @@ -210,6 +211,7 @@ public: #endif }; +typedef boost::shared_ptr NETCLASSPTR; /** * Class NETCLASSES @@ -220,13 +222,13 @@ public: class NETCLASSES { private: - typedef std::map NETCLASSMAP; + typedef std::map NETCLASSMAP; /// all the NETCLASSes except the default one. NETCLASSMAP m_NetClasses; /// the default NETCLASS. - NETCLASS m_Default; + NETCLASSPTR m_Default; public: NETCLASSES(); @@ -236,7 +238,10 @@ public: * Function Clear * destroys any contained NETCLASS instances except the Default one. */ - void Clear(); + void Clear() + { + m_NetClasses.clear(); + } typedef NETCLASSMAP::iterator iterator; iterator begin() { return m_NetClasses.begin(); } @@ -259,9 +264,9 @@ public: * Function GetDefault * @return the default net class. */ - NETCLASS* GetDefault() const + NETCLASSPTR GetDefault() const { - return (NETCLASS*) &m_Default; + return m_Default; } /** @@ -271,24 +276,23 @@ public: * @return true if the name within aNetclass is unique and it could be inserted OK, * else false because the name was not unique and caller still owns aNetclass. */ - bool Add( NETCLASS* aNetclass ); + bool Add( NETCLASSPTR aNetclass ); /** * Function Remove * removes a NETCLASS from this container but does not destroy/delete it. * @param aNetName is the name of the net to delete, and it may not be NETCLASS::Default. - * @return NETCLASS* - the NETCLASS associated with aNetName if found and removed, else NULL. - * You have to delete the returned value if you intend to destroy the NETCLASS. + * @return NETCLASSPTR - the NETCLASS associated with aNetName if found and removed, else NULL. */ - NETCLASS* Remove( const wxString& aNetName ); + NETCLASSPTR Remove( const wxString& aNetName ); /** * Function Find * searches this container for a NETCLASS given by \a aName. * @param aName is the name of the NETCLASS to search for. - * @return NETCLASS* - if found, else NULL. + * @return NETCLASSPTR - if found, else NULL. */ - NETCLASS* Find( const wxString& aName ) const; + NETCLASSPTR Find( const wxString& aName ) const; }; diff --git a/pcbnew/class_netinfo.h b/pcbnew/class_netinfo.h index 88e77df440..253ca9c48b 100644 --- a/pcbnew/class_netinfo.h +++ b/pcbnew/class_netinfo.h @@ -452,7 +452,7 @@ private: wxString m_NetClassName; // Net Class name. if void this is equivalent // to "default" (the first // item of the net classes list - NETCLASS* m_NetClass; + NETCLASSPTR m_NetClass; BOARD_ITEM* m_parent; ///< The parent board item object the net belongs to. @@ -474,9 +474,9 @@ public: * Function SetClass * sets \a aNetclass into this NET */ - void SetClass( const NETCLASS* aNetClass ) + void SetClass( NETCLASSPTR aNetClass ) { - m_NetClass = (NETCLASS*) aNetClass; + m_NetClass = aNetClass; if( aNetClass ) m_NetClassName = aNetClass->GetName(); @@ -484,7 +484,7 @@ public: m_NetClassName = NETCLASS::Default; } - NETCLASS* GetNetClass() + NETCLASSPTR GetNetClass() { return m_NetClass; } @@ -630,7 +630,7 @@ public: // general buffer of ratsnest m_RatsnestEndIdx = 0; // Ending point of ratsnests of this net - SetClass( NULL ); + SetClass( NETCLASSPTR() ); } }; diff --git a/pcbnew/class_netinfo_item.cpp b/pcbnew/class_netinfo_item.cpp index 447cf8a503..d4917568e6 100644 --- a/pcbnew/class_netinfo_item.cpp +++ b/pcbnew/class_netinfo_item.cpp @@ -58,7 +58,6 @@ NETINFO_ITEM::NETINFO_ITEM( BOARD_ITEM* aParent, const wxString& aNetName, int a m_RatsnestEndIdx = 0; // Ending point of ratsnests of this net m_NetClassName = NETCLASS::Default; - m_NetClass = NULL; } diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index ace8ca96ef..c9f19462ba 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -226,7 +226,7 @@ int VIA::GetDrillValue() const return m_Drill; // Use the default value from the Netclass - NETCLASS* netclass = GetNetClass(); + NETCLASSPTR netclass = GetNetClass(); if( GetViaType() == VIA_MICROVIA ) return netclass->GetuViaDrill(); @@ -1008,7 +1008,7 @@ void TRACK::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) } } - NETCLASS* netclass = GetNetClass(); + NETCLASSPTR netclass = GetNetClass(); if( netclass ) { diff --git a/pcbnew/class_zone.cpp b/pcbnew/class_zone.cpp index a6b360f98a..6c2008bf73 100644 --- a/pcbnew/class_zone.cpp +++ b/pcbnew/class_zone.cpp @@ -548,7 +548,7 @@ int ZONE_CONTAINER::GetClearance( BOARD_CONNECTED_ITEM* aItem ) const // "zone clearance" setting in the zone properties dialog. (At least // until there is a UI boolean for this.) - NETCLASS* myClass = GetNetClass(); + NETCLASSPTR myClass = GetNetClass(); if( myClass ) myClearance = std::max( myClearance, myClass->GetClearance() ); diff --git a/pcbnew/dialogs/dialog_design_rules.cpp b/pcbnew/dialogs/dialog_design_rules.cpp index 13f6da13c9..9ba9f05f6b 100644 --- a/pcbnew/dialogs/dialog_design_rules.cpp +++ b/pcbnew/dialogs/dialog_design_rules.cpp @@ -46,6 +46,8 @@ #include #include +#include + // Column labels for net lists #define NET_TITLE _( "Net" ) #define CLASS_TITLE _( "Class" ) @@ -221,10 +223,10 @@ void DIALOG_DESIGN_RULES::InitDialogRules() // @todo go fix m_Pcb->SynchronizeNetsAndNetClasses() so that the netcode==0 is not present in the BOARD::m_NetClasses NETCLASSES& netclasses = m_BrdSettings->m_NetClasses; - NETCLASS* netclass = netclasses.GetDefault(); + NETCLASSPTR netclass = netclasses.GetDefault(); // Initialize list of nets for Default Net Class - for( NETCLASS::const_iterator name = netclass->begin(); name != netclass->end(); ++name ) + for( NETCLASS::iterator name = netclass->begin(); name != netclass->end(); ++name ) { m_AllNets.push_back( NETCUP( *name, netclass->GetName() ) ); } @@ -446,7 +448,7 @@ void DIALOG_DESIGN_RULES::InitializeRulesSelectionBoxes() /* Initialize the rules list from board */ -static void class2gridRow( wxGrid* grid, int row, NETCLASS* nc ) +static void class2gridRow( wxGrid* grid, int row, NETCLASSPTR nc ) { wxString msg; @@ -494,14 +496,14 @@ void DIALOG_DESIGN_RULES::InitRulesList() int row = 1; for( NETCLASSES::iterator i = netclasses.begin(); i!=netclasses.end(); ++i, ++row ) { - NETCLASS* netclass = i->second; + NETCLASSPTR netclass = i->second; class2gridRow( m_grid, row, netclass ); } } -static void gridRow2class( wxGrid* grid, int row, NETCLASS* nc ) +static void gridRow2class( wxGrid* grid, int row, NETCLASSPTR nc ) { #define MYCELL( col ) \ ValueFromString( g_UserUnit, grid->GetCellValue( row, col ) ) @@ -530,7 +532,7 @@ void DIALOG_DESIGN_RULES::CopyRulesListToBoard() // Copy other NetClasses : for( int row = 1; row < m_grid->GetNumberRows(); ++row ) { - NETCLASS* nc = new NETCLASS( m_grid->GetRowLabelValue( row ) ); + NETCLASSPTR nc = boost::make_shared( m_grid->GetRowLabelValue( row ) ); if( !m_BrdSettings->m_NetClasses.Add( nc ) ) { @@ -540,7 +542,7 @@ void DIALOG_DESIGN_RULES::CopyRulesListToBoard() msg.Printf( wxT( "CopyRulesListToBoard(): The NetClass \"%s\" already exists. Skip" ), GetChars( m_grid->GetRowLabelValue( row ) ) ); wxMessageBox( msg ); - delete nc; + continue; } @@ -550,7 +552,7 @@ void DIALOG_DESIGN_RULES::CopyRulesListToBoard() // Now read all nets and push them in the corresponding netclass net buffer for( NETCUPS::const_iterator netcup = m_AllNets.begin(); netcup != m_AllNets.end(); ++netcup ) { - NETCLASS* nc = netclasses.Find( netcup->clazz ); + NETCLASSPTR nc = netclasses.Find( netcup->clazz ); wxASSERT( nc ); nc->Add( netcup->net ); } diff --git a/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp b/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp index 5f3afd55f1..3697dd6cba 100644 --- a/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp +++ b/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp @@ -48,7 +48,7 @@ void DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::MyInit() BOARD* board = m_Parent->GetBoard(); BOARD_DESIGN_SETTINGS& dsnSettings = board->GetDesignSettings(); NETCLASSES& netclasses = dsnSettings.m_NetClasses; - NETCLASS* netclass = netclasses.GetDefault(); + NETCLASSPTR netclass = netclasses.GetDefault(); NETINFO_ITEM* net = board->FindNet( m_Netcode ); if( net ) diff --git a/pcbnew/dialogs/dialog_plot.h b/pcbnew/dialogs/dialog_plot.h index 4be5e712d5..d198a9a023 100644 --- a/pcbnew/dialogs/dialog_plot.h +++ b/pcbnew/dialogs/dialog_plot.h @@ -42,7 +42,7 @@ private: PCB_EDIT_FRAME* m_parent; BOARD* m_board; BOARD_DESIGN_SETTINGS m_brdSettings; - wxConfigBase* m_config; + wxConfigBase* m_config; std::vector m_layerList; // List to hold CheckListBox layer numbers double m_XScaleAdjust; // X scale factor adjust to compensate // plotter X scaling error diff --git a/pcbnew/drc.cpp b/pcbnew/drc.cpp index 67c451c721..62ffcf4153 100644 --- a/pcbnew/drc.cpp +++ b/pcbnew/drc.cpp @@ -295,7 +295,7 @@ void DRC::updatePointers() } -bool DRC::doNetClass( NETCLASS* nc, wxString& msg ) +bool DRC::doNetClass( NETCLASSPTR nc, wxString& msg ) { bool ret = true; @@ -412,7 +412,7 @@ bool DRC::testNetClasses() for( NETCLASSES::const_iterator i = netclasses.begin(); i != netclasses.end(); ++i ) { - NETCLASS* nc = i->second; + NETCLASSPTR nc = i->second; if( !doNetClass( nc, msg ) ) ret = false; diff --git a/pcbnew/drc_clearance_test_functions.cpp b/pcbnew/drc_clearance_test_functions.cpp index ed48f149ab..31df052a2a 100644 --- a/pcbnew/drc_clearance_test_functions.cpp +++ b/pcbnew/drc_clearance_test_functions.cpp @@ -153,7 +153,7 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads ) int net_code_ref; wxPoint shape_pos; - NETCLASS* netclass = aRefSeg->GetNetClass(); + NETCLASSPTR netclass = aRefSeg->GetNetClass(); BOARD_DESIGN_SETTINGS& dsnSettings = m_pcb->GetDesignSettings(); /* In order to make some calculations more easier or faster, diff --git a/pcbnew/drc_stuff.h b/pcbnew/drc_stuff.h index 927e94936a..569fcd87ad 100644 --- a/pcbnew/drc_stuff.h +++ b/pcbnew/drc_stuff.h @@ -29,8 +29,8 @@ #ifndef _DRC_STUFF_H #define _DRC_STUFF_H - #include +#include #define OK_DRC 0 #define BAD_DRC 1 @@ -283,7 +283,7 @@ private: //---------------------------------------------- - bool doNetClass( NETCLASS* aNetClass, wxString& msg ); + bool doNetClass( boost::shared_ptr aNetClass, wxString& msg ); /** * Function doPadToPadsDrc diff --git a/pcbnew/eagle_plugin.cpp b/pcbnew/eagle_plugin.cpp index 2e59478403..4e48b04098 100644 --- a/pcbnew/eagle_plugin.cpp +++ b/pcbnew/eagle_plugin.cpp @@ -1146,7 +1146,7 @@ BOARD* EAGLE_PLUGIN::Load( const wxString& aFileName, BOARD* aAppendToMe, const if( m_rules->mdWireWire ) { - NETCLASS* defaultNetclass = designSettings.GetDefault(); + NETCLASSPTR defaultNetclass = designSettings.GetDefault(); int clearance = KiROUND( m_rules->mdWireWire ); if( clearance < defaultNetclass->GetClearance() ) diff --git a/pcbnew/editrack.cpp b/pcbnew/editrack.cpp index 715ac98f8d..02f02f782c 100644 --- a/pcbnew/editrack.cpp +++ b/pcbnew/editrack.cpp @@ -685,7 +685,7 @@ void ShowNewTrackWhenMovingCursor( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPo if ( g_FirstTrackSegment == NULL ) return; - NETCLASS* netclass = g_FirstTrackSegment->GetNetClass(); + NETCLASSPTR netclass = g_FirstTrackSegment->GetNetClass(); if( showTrackClearanceMode != DO_NOT_SHOW_CLEARANCE ) DisplayOpt.ShowTrackClearanceMode = SHOW_CLEARANCE_ALWAYS; diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index f2f174267b..e6ba98c812 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -86,6 +86,8 @@ #include #include +#include + typedef LEGACY_PLUGIN::BIU BIU; @@ -632,7 +634,7 @@ void LEGACY_PLUGIN::loadSHEET() void LEGACY_PLUGIN::loadSETUP() { - NETCLASS* netclass_default = m_board->GetDesignSettings().GetDefault(); + NETCLASSPTR netclass_default = m_board->GetDesignSettings().GetDefault(); // TODO Orson: is it really necessary to first operate on a copy and then apply it? // would not it be better to use reference here and apply all the changes instantly? BOARD_DESIGN_SETTINGS bds = m_board->GetDesignSettings(); @@ -2113,7 +2115,7 @@ void LEGACY_PLUGIN::loadNETCLASS() // yet since that would bypass duplicate netclass name checking within the BOARD. // store it temporarily in an auto_ptr until successfully inserted into the BOARD // just before returning. - auto_ptr nc( new NETCLASS( wxEmptyString ) ); + NETCLASSPTR nc = boost::make_shared( wxEmptyString ); while( ( line = READLINE( m_reader ) ) != NULL ) { @@ -2175,11 +2177,7 @@ void LEGACY_PLUGIN::loadNETCLASS() else if( TESTLINE( "$EndNCLASS" ) ) { - if( m_board->GetDesignSettings().m_NetClasses.Add( nc.get() ) ) - { - nc.release(); - } - else + if( !m_board->GetDesignSettings().m_NetClasses.Add( nc ) ) { // Must have been a name conflict, this is a bad board file. // User may have done a hand edit to the file. @@ -2985,7 +2983,7 @@ void LEGACY_PLUGIN::saveSHEET( const BOARD* aBoard ) const void LEGACY_PLUGIN::saveSETUP( const BOARD* aBoard ) const { const BOARD_DESIGN_SETTINGS& bds = aBoard->GetDesignSettings(); - NETCLASS* netclass_default = bds.GetDefault(); + NETCLASSPTR netclass_default = bds.GetDefault(); fprintf( m_fp, "$SETUP\n" ); @@ -3170,7 +3168,7 @@ void LEGACY_PLUGIN::saveNETCLASSES( const NETCLASSES* aNetClasses ) const // the rest will be alphabetical in the *.brd file. for( NETCLASSES::const_iterator it = aNetClasses->begin(); it != aNetClasses->end(); ++it ) { - NETCLASS* netclass = it->second; + NETCLASSPTR netclass = it->second; saveNETCLASS( netclass ); } @@ -3178,7 +3176,7 @@ void LEGACY_PLUGIN::saveNETCLASSES( const NETCLASSES* aNetClasses ) const } -void LEGACY_PLUGIN::saveNETCLASS( const NETCLASS* nc ) const +void LEGACY_PLUGIN::saveNETCLASS( const NETCLASSPTR nc ) const { fprintf( m_fp, "$NCLASS\n" ); fprintf( m_fp, "Name %s\n", EscapedUTF8( nc->GetName() ).c_str() ); diff --git a/pcbnew/legacy_plugin.h b/pcbnew/legacy_plugin.h index a9efbaa053..ee05599591 100644 --- a/pcbnew/legacy_plugin.h +++ b/pcbnew/legacy_plugin.h @@ -26,6 +26,7 @@ */ #include +#include #include @@ -256,7 +257,7 @@ protected: void saveNETINFO_ITEM( const NETINFO_ITEM* aNet ) const; void saveNETCLASSES( const NETCLASSES* aNetClasses ) const; - void saveNETCLASS( const NETCLASS* aNetclass ) const; + void saveNETCLASS( const boost::shared_ptr aNetclass ) const; void savePCB_TEXT( const TEXTE_PCB* aText ) const; void savePCB_TARGET( const PCB_TARGET* aTarget ) const; diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index 547120fa9b..a96034c48d 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -51,6 +51,8 @@ #include #include +#include + void PCB_PARSER::init() { @@ -808,7 +810,7 @@ void PCB_PARSER::parseSetup() throw( IO_ERROR, PARSE_ERROR ) wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as setup." ) ); T token; - NETCLASS* defaultNetClass = m_board->GetDesignSettings().GetDefault(); + NETCLASSPTR defaultNetClass = m_board->GetDesignSettings().GetDefault(); // TODO Orson: is it really necessary to first operate on a copy and then apply it? // would not it be better to use reference here and apply all the changes instantly? BOARD_DESIGN_SETTINGS designSettings = m_board->GetDesignSettings(); @@ -1082,7 +1084,7 @@ void PCB_PARSER::parseNETCLASS() throw( IO_ERROR, PARSE_ERROR ) T token; - std::auto_ptr nc( new NETCLASS( wxEmptyString ) ); + NETCLASSPTR nc = boost::make_shared( wxEmptyString ); // Read netclass name (can be a name or just a number like track width) NeedSYMBOLorNUMBER(); @@ -1135,11 +1137,7 @@ void PCB_PARSER::parseNETCLASS() throw( IO_ERROR, PARSE_ERROR ) NeedRIGHT(); } - if( m_board->GetDesignSettings().m_NetClasses.Add( nc.get() ) ) - { - nc.release(); - } - else + if( !m_board->GetDesignSettings().m_NetClasses.Add( nc ) ) { // Must have been a name conflict, this is a bad board file. // User may have done a hand edit to the file. diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index b233cba9ea..7508ead1e6 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -72,7 +72,7 @@ public: continue; wxString netClassName = ni->GetClassName(); - NETCLASS* nc = aBoard->GetDesignSettings().m_NetClasses.Find( netClassName ); + NETCLASSPTR nc = aBoard->GetDesignSettings().m_NetClasses.Find( netClassName ); int clearance = nc->GetClearance(); m_clearanceCache[i] = clearance; TRACE( 1, "Add net %d netclass %s clearance %d", i % netClassName.mb_str() % diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index eace67a44f..583fd477e4 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -269,7 +269,7 @@ int& aViaDiameter, int& aViaDrill ) BOARD* board = getModel( PCB_T ); BOARD_DESIGN_SETTINGS &bds = board->GetDesignSettings(); - NETCLASS* netClass = NULL; + NETCLASSPTR netClass; NETINFO_ITEM* ni = board->FindNet( aNetCode ); if( ni ) diff --git a/pcbnew/specctra.h b/pcbnew/specctra.h index d2a5104d95..2a584864bb 100644 --- a/pcbnew/specctra.h +++ b/pcbnew/specctra.h @@ -31,6 +31,7 @@ // see http://www.boost.org/libs/ptr_container/doc/ptr_set.html #include +#include #include #include @@ -3813,7 +3814,7 @@ class SPECCTRA_DB : public SPECCTRA_LEXER * Function exportNETCLASS * exports \a aNetClass to the DSN file. */ - void exportNETCLASS( NETCLASS* aNetClass, BOARD* aBoard ); + void exportNETCLASS( boost::shared_ptr aNetClass, BOARD* aBoard ); //----------------------------------------------------------- diff --git a/pcbnew/specctra_export.cpp b/pcbnew/specctra_export.cpp index 089925576c..d81d2c66ec 100644 --- a/pcbnew/specctra_export.cpp +++ b/pcbnew/specctra_export.cpp @@ -1476,7 +1476,7 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IO_ERROR ) //------------------------------------------------------------- { char rule[80]; - NETCLASS* defaultClass = aBoard->GetDesignSettings().m_NetClasses.GetDefault(); + NETCLASSPTR defaultClass = aBoard->GetDesignSettings().GetDefault(); int defaultTrackWidth = defaultClass->GetTrackWidth(); int defaultClearance = defaultClass->GetClearance(); @@ -1854,7 +1854,7 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IO_ERROR ) // Add the via from the Default netclass first. The via container // in pcb->library preserves the sequence of addition. - NETCLASS* netclass = nclasses.GetDefault(); + NETCLASSPTR netclass = nclasses.GetDefault(); PADSTACK* via = makeVia( netclass->GetViaDiameter(), netclass->GetViaDrill(), m_top_via_layer, m_bot_via_layer ); @@ -2046,13 +2046,13 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IO_ERROR ) for( NETCLASSES::iterator nc = nclasses.begin(); nc != nclasses.end(); ++nc ) { - NETCLASS* netclass = nc->second; + NETCLASSPTR netclass = nc->second; exportNETCLASS( netclass, aBoard ); } } -void SPECCTRA_DB::exportNETCLASS( NETCLASS* aNetClass, BOARD* aBoard ) +void SPECCTRA_DB::exportNETCLASS( NETCLASSPTR aNetClass, BOARD* aBoard ) { /* From page 11 of specctra spec: * From 2fa082f698e35d204ba000a674ef5aba92474dd8 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Wed, 21 May 2014 01:06:52 -0500 Subject: [PATCH 436/741] fix bug lp:1319839 --- pcbnew/dialogs/dialog_fp_lib_table.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pcbnew/dialogs/dialog_fp_lib_table.cpp b/pcbnew/dialogs/dialog_fp_lib_table.cpp index a2ed8f5d38..6d5bf405da 100644 --- a/pcbnew/dialogs/dialog_fp_lib_table.cpp +++ b/pcbnew/dialogs/dialog_fp_lib_table.cpp @@ -166,7 +166,9 @@ public: bool DeleteRows( size_t aPos, size_t aNumRows ) { - if( aPos + aNumRows <= rows.size() ) + // aPos may be a large positive, e.g. size_t(-1), and the sum of + // aPos+aNumRows may wrap here, so both ends of the range are tested. + if( aPos < rows.size() && aPos + aNumRows <= rows.size() ) { ROWS_ITER start = rows.begin() + aPos; rows.erase( start, start + aNumRows ); @@ -512,10 +514,13 @@ private: int rowCount = m_cur_grid->GetNumberRows(); int curRow = getCursorRow(); - m_cur_grid->DeleteRows( curRow ); + if( curRow >= 0 ) + { + m_cur_grid->DeleteRows( curRow ); - if( curRow && curRow == rowCount - 1 ) - m_cur_grid->SetGridCursor( curRow-1, getCursorCol() ); + if( curRow && curRow == rowCount - 1 ) + m_cur_grid->SetGridCursor( curRow-1, getCursorCol() ); + } } void moveUpHandler( wxMouseEvent& event ) From f7c1372d580fcb53b85de99e904cab482b308d26 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Wed, 21 May 2014 08:36:59 -0500 Subject: [PATCH 437/741] set( wxWidgets_CONFIG_OPTIONS --static=no ) for platforms using wx-config --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 31a00ad1ec..5276a854d8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -494,6 +494,9 @@ endif() # application. You can figure out what libraries you need here; # http://www.wxwidgets.org/manuals/2.8/wx_librarieslist.html +# See line 41 of CMakeModules/FindwxWidgets.cmake +set( wxWidgets_CONFIG_OPTIONS --static=no ) + # On Apple only wxwidgets 2.9 or higher doesn't need to find aui part of base # Seems no more needed on wx-3 if( APPLE AND ( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES OR KICAD_SCRIPTING_WXPYTHON) ) From 07877f90440c06990e48b76ecfc841831a0fd48b Mon Sep 17 00:00:00 2001 From: Lorenzo Marcantonio Date: Wed, 21 May 2014 19:02:32 +0200 Subject: [PATCH 438/741] Replaced the display line clipper with the way simpler (and faster) Cohen-Sutherland one. A couple of trivial accessors made inline --- common/gr_basic.cpp | 275 +++++++------------------- pcbnew/class_board_connected_item.cpp | 18 -- pcbnew/class_board_connected_item.h | 17 +- 3 files changed, 82 insertions(+), 228 deletions(-) diff --git a/common/gr_basic.cpp b/common/gr_basic.cpp index b0ff4b6ff2..f82d997789 100644 --- a/common/gr_basic.cpp +++ b/common/gr_basic.cpp @@ -79,6 +79,26 @@ static EDA_COLOR_T s_DC_lastbrushcolor = UNSPECIFIED_COLOR; static bool s_DC_lastbrushfill = false; static wxDC* s_DC_lastDC = NULL; +/*** + * Utility for the line clipping code, returns the boundary code of + * a point. Bit allocation is arbitrary + */ +static inline int clipOutCode( const EDA_RECT *aClipBox, int x, int y ) +{ + int code; + if( y < aClipBox->GetY() ) + code = 2; + else if( y > aClipBox->GetBottom() ) + code = 1; + else + code = 0; + if( x < aClipBox->GetX() ) + code |= 4; + else if( x > aClipBox->GetRight() ) + code |= 8; + return code; +} + /** * Test if any part of a line falls within the bounds of a rectangle. @@ -93,225 +113,68 @@ static wxDC* s_DC_lastDC = NULL; * * @return - False if any part of the line lies within the rectangle. */ -static bool clipLine( EDA_RECT* aClipBox, int& x1, int& y1, int& x2, int& y2 ) +static bool clipLine( const EDA_RECT *aClipBox, int &x1, int &y1, int &x2, int &y2 ) { - if( aClipBox->Contains( x1, y1 ) && aClipBox->Contains( x2, y2 ) ) - return false; + // Stock Cohen-Sutherland algorithm; check *any* CG book for details + int outcode1 = clipOutCode( aClipBox, x1, y1 ); + int outcode2 = clipOutCode( aClipBox, x2, y2 ); - wxRect rect = *aClipBox; - int minX = rect.GetLeft(); - int maxX = rect.GetRight(); - int minY = rect.GetTop(); - int maxY = rect.GetBottom(); - int clippedX, clippedY; - -#if DEBUG_DUMP_CLIP_COORDS - int tmpX1, tmpY1, tmpX2, tmpY2; - tmpX1 = x1; - tmpY1 = y1; - tmpX2 = x2; - tmpY2 = y2; -#endif - - if( aClipBox->Contains( x1, y1 ) ) + while( outcode1 || outcode2 ) { - if( x1 == x2 ) /* Vertical line, clip Y. */ - { - if( y2 < minY ) - { - y2 = minY; - return false; - } + // Fast reject + if( outcode1 & outcode2 ) + return true; + + // Choose a side to clip + int thisoutcode, x, y; + if( outcode1 ) + thisoutcode = outcode1; + else + thisoutcode = outcode2; - if( y2 > maxY ) - { - y2 = maxY; - return false; - } + /* One clip round + * Since we use the full range of 32 bit ints, the proportion + * computation has to be done in 64 bits to avoid horrible + * results */ + if( thisoutcode & 1 ) // Clip the bottom + { + y = aClipBox->GetBottom(); + x = x1 + (x2 - x1) * int64_t(y - y1) / (y2 - y1); + } + else if( thisoutcode & 2 ) // Clip the top + { + y = aClipBox->GetY(); + x = x1 + (x2 - x1) * int64_t(y - y1) / (y2 - y1); + } + else if( thisoutcode & 8 ) // Clip the right + { + x = aClipBox->GetRight(); + y = y1 + (y2 - y1) * int64_t(x - x1) / (x2 - x1); } - else if( y1 == y2 ) /* Horizontal line, clip X. */ + else // if( thisoutcode & 4), obviously, clip the left { - if( x2 < minX ) - { - x2 = minX; - return false; - } - - if( x2 > maxX ) - { - x2 = maxX; - return false; - } + x = aClipBox->GetX(); + y = y1 + (y2 - y1) * int64_t(x - x1) / (x2 - x1); } - /* If we're here, it's a diagonal line. */ - - if( TestForIntersectionOfStraightLineSegments( x1, y1, x2, y2, minX, minY, minX, maxY, - &clippedX, &clippedY ) /* Left */ - || TestForIntersectionOfStraightLineSegments( x1, y1, x2, y2, minX, minY, maxX, minY, - &clippedX, &clippedY ) /* Top */ - || TestForIntersectionOfStraightLineSegments( x1, y1, x2, y2, maxX, minY, maxX, maxY, - &clippedX, &clippedY ) /* Right */ - || TestForIntersectionOfStraightLineSegments( x1, y1, x2, y2, minX, maxY, maxX, maxY, - &clippedX, &clippedY ) ) /* Bottom */ + // Put the result back and update the boundary code + // No ambiguity, otherwise it would have been a fast reject + if( thisoutcode == outcode1 ) { - if( x2 != clippedX ) - x2 = clippedX; - if( y2 != clippedY ) - y2 = clippedY; - return false; + x1 = x; + y1 = y; + outcode1 = clipOutCode( aClipBox, x1, y1 ); + } + else + { + x2 = x; + y2 = y; + outcode2 = clipOutCode( aClipBox, x2, y2 ); } - - /* If we're here, something has gone terribly wrong. */ -#if DEBUG_DUMP_CLIP_ERROR_COORDS - wxLogDebug( wxT( "Line (%d,%d):(%d,%d) in rectangle (%d,%d,%d,%d) clipped to (%d,%d,%d,%d)" ), - tmpX1, tmpY1, tmpX2, tmpY2, minX, minY, maxX, maxY, x1, y1, x2, y2 ); -#endif - return false; } - else if( aClipBox->Contains( x2, y2 ) ) - { - if( x1 == x2 ) /* Vertical line, clip Y. */ - { - if( y2 < minY ) - { - y2 = minY; - return false; - } - - if( y2 > maxY ) - { - y2 = maxY; - return false; - } - } - else if( y1 == y2 ) /* Horizontal line, clip X. */ - { - if( x2 < minX ) - { - x2 = minX; - return false; - } - - if( x2 > maxX ) - { - x2 = maxX; - return false; - } - } - - if( TestForIntersectionOfStraightLineSegments( x1, y1, x2, y2, minX, minY, minX, maxY, - &clippedX, &clippedY ) /* Left */ - || TestForIntersectionOfStraightLineSegments( x1, y1, x2, y2, minX, minY, maxX, minY, - &clippedX, &clippedY ) /* Top */ - || TestForIntersectionOfStraightLineSegments( x1, y1, x2, y2, maxX, minY, maxX, maxY, - &clippedX, &clippedY ) /* Right */ - || TestForIntersectionOfStraightLineSegments( x1, y1, x2, y2, minX, maxY, maxX, maxY, - &clippedX, &clippedY ) ) /* Bottom */ - { - if( x1 != clippedX ) - x1 = clippedX; - if( y1 != clippedY ) - y1 = clippedY; - return false; - } - - /* If we're here, something has gone terribly wrong. */ -#if DEBUG_DUMP_CLIP_ERROR_COORDS - wxLogDebug( wxT( "Line (%d,%d):(%d,%d) in rectangle (%d,%d,%d,%d) clipped to (%d,%d,%d,%d)" ), - tmpX1, tmpY1, tmpX2, tmpY2, minX, minY, maxX, maxY, x1, y1, x2, y2 ); -#endif - return false; - } - else - { - int* intersectX; - int* intersectY; - int intersectX1, intersectY1, intersectX2, intersectY2; - bool haveFirstPoint = false; - - intersectX = &intersectX1; - intersectY = &intersectY1; - - /* Left clip rectangle line. */ - if( TestForIntersectionOfStraightLineSegments( x1, y1, x2, y2, minX, minY, minX, maxY, - intersectX, intersectY ) ) - { - intersectX = &intersectX2; - intersectY = &intersectY2; - haveFirstPoint = true; - } - - /* Top clip rectangle line. */ - if( TestForIntersectionOfStraightLineSegments( x1, y1, x2, y2, minX, minY, maxX, minY, - intersectX, intersectY ) ) - { - intersectX = &intersectX2; - intersectY = &intersectY2; - if( haveFirstPoint ) - { - x1 = intersectX1; - y1 = intersectY1; - x2 = intersectX2; - y2 = intersectY2; - return false; - } - haveFirstPoint = true; - } - - /* Right clip rectangle line. */ - if( TestForIntersectionOfStraightLineSegments( x1, y1, x2, y2, maxX, minY, maxX, maxY, - intersectX, intersectY ) ) - { - intersectX = &intersectX2; - intersectY = &intersectY2; - if( haveFirstPoint ) - { - x1 = intersectX1; - y1 = intersectY1; - x2 = intersectX2; - y2 = intersectY2; - return false; - } - haveFirstPoint = true; - } - - /* Bottom clip rectangle line. */ - if( TestForIntersectionOfStraightLineSegments( x1, y1, x2, y2, minX, maxY, maxX, maxY, - intersectX, intersectY ) ) - { - intersectX = &intersectX2; - intersectY = &intersectY2; - if( haveFirstPoint ) - { - x1 = intersectX1; - y1 = intersectY1; - x2 = intersectX2; - y2 = intersectY2; - return false; - } - } - - /* If we're here and only one line of the clip box has been intersected, - * something has gone terribly wrong. */ -#if DEBUG_DUMP_CLIP_ERROR_COORDS - if( haveFirstPoint ) - wxLogDebug( wxT( "Line (%d,%d):(%d,%d) in rectangle (%d,%d,%d,%d) clipped to (%d,%d,%d,%d)" ), - tmpX1, tmpY1, tmpX2, tmpY2, minX, minY, maxX, maxY, x1, y1, x2, y2 ); -#endif - } - - /* Set this to one to verify that diagonal lines get clipped properly. */ -#if DEBUG_DUMP_CLIP_COORDS - if( !( x1 == x2 || y1 == y2 ) ) - wxLogDebug( wxT( "Clipped line (%d,%d):(%d,%d) from rectangle (%d,%d,%d,%d)" ), - tmpX1, tmpY1, tmpX2, tmpY2, minX, minY, maxX, maxY ); -#endif - - return true; + return false; } - static void WinClipAndDrawLine( EDA_RECT* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2, EDA_COLOR_T Color, int width = 1 ) { diff --git a/pcbnew/class_board_connected_item.cpp b/pcbnew/class_board_connected_item.cpp index eaaa3390ca..d7c54e7925 100644 --- a/pcbnew/class_board_connected_item.cpp +++ b/pcbnew/class_board_connected_item.cpp @@ -50,12 +50,6 @@ BOARD_CONNECTED_ITEM::BOARD_CONNECTED_ITEM( const BOARD_CONNECTED_ITEM& aItem ) } -int BOARD_CONNECTED_ITEM::GetNetCode() const -{ - return m_netinfo->GetNet(); -} - - void BOARD_CONNECTED_ITEM::SetNetCode( int aNetCode ) { BOARD* board = GetBoard(); @@ -75,18 +69,6 @@ void BOARD_CONNECTED_ITEM::SetNetCode( int aNetCode ) } -const wxString& BOARD_CONNECTED_ITEM::GetNetname() const -{ - return m_netinfo->GetNetname(); -} - - -const wxString& BOARD_CONNECTED_ITEM::GetShortNetname() const -{ - return m_netinfo->GetShortNetname(); -} - - int BOARD_CONNECTED_ITEM::GetClearance( BOARD_CONNECTED_ITEM* aItem ) const { NETCLASSPTR myclass = GetNetClass(); diff --git a/pcbnew/class_board_connected_item.h b/pcbnew/class_board_connected_item.h index a3972185d0..a0a4a46dfc 100644 --- a/pcbnew/class_board_connected_item.h +++ b/pcbnew/class_board_connected_item.h @@ -32,8 +32,8 @@ #define BOARD_CONNECTED_ITEM_H #include +#include -class NETINFO_ITEM; class NETCLASS; class TRACK; class D_PAD; @@ -77,7 +77,10 @@ public: * Function GetNetCode * @return int - the net code. */ - int GetNetCode() const; + int GetNetCode() const + { + return m_netinfo->GetNet(); + } /** * Function SetNetCode @@ -119,13 +122,19 @@ public: * Function GetNetname * @return wxString - the full netname */ - const wxString& GetNetname() const; + const wxString& GetNetname() const + { + return m_netinfo->GetNetname(); + } /** * Function GetShortNetname * @return wxString - the short netname */ - const wxString& GetShortNetname() const; + const wxString& GetShortNetname() const + { + return m_netinfo->GetShortNetname(); + } /** * Function GetClearance From 69816d8704168aa3b7a1d961db92419b6c9d8454 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 21 May 2014 23:13:30 +0200 Subject: [PATCH 439/741] The GAL view uses colors settings from the legacy canvas. Minor refactoring of PAINTER & RENDER_SETTINGS classes. --- common/class_colors_design_settings.cpp | 5 +- common/painter.cpp | 6 --- include/class_colors_design_settings.h | 6 +-- include/painter.h | 50 ++++++++---------- pcbnew/basepcbframe.cpp | 13 ----- pcbnew/class_pcb_layer_widget.cpp | 8 +++ pcbnew/pcb_painter.cpp | 67 +++++++++++++------------ pcbnew/pcb_painter.h | 38 +++++++------- pcbnew/pcbframe.cpp | 15 +++++- 9 files changed, 104 insertions(+), 104 deletions(-) diff --git a/common/class_colors_design_settings.cpp b/common/class_colors_design_settings.cpp index df35c9427d..ffa6c45577 100644 --- a/common/class_colors_design_settings.cpp +++ b/common/class_colors_design_settings.cpp @@ -100,12 +100,13 @@ void COLORS_DESIGN_SETTINGS::SetLayerColor( LAYER_NUM aLayer, EDA_COLOR_T aColor * @return the color for an item which is one of the item indices given * in pcbstruct.h, enum PCB_VISIBLE or in schematic */ -EDA_COLOR_T COLORS_DESIGN_SETTINGS::GetItemColor( int aItemIdx ) +EDA_COLOR_T COLORS_DESIGN_SETTINGS::GetItemColor( int aItemIdx ) const { - if( (unsigned) aItemIdx < DIM(m_ItemsColors) ) + if( (unsigned) aItemIdx < DIM( m_ItemsColors ) ) { return m_ItemsColors[aItemIdx]; } + return UNSPECIFIED_COLOR; } diff --git a/common/painter.cpp b/common/painter.cpp index 47efd47425..785d479a1f 100644 --- a/common/painter.cpp +++ b/common/painter.cpp @@ -73,9 +73,3 @@ PAINTER::PAINTER( GAL* aGal ) : PAINTER::~PAINTER() { } - - -void PAINTER::SetGAL( GAL* aGal ) -{ - m_gal = aGal; -} diff --git a/include/class_colors_design_settings.h b/include/class_colors_design_settings.h index 7d472a3871..e0523b9564 100644 --- a/include/class_colors_design_settings.h +++ b/include/class_colors_design_settings.h @@ -26,7 +26,7 @@ public: EDA_COLOR_T m_ItemsColors[ITEMSCOLORSBUFFERSIZE]; ///< All others items but layers public: - COLORS_DESIGN_SETTINGS( ); + COLORS_DESIGN_SETTINGS(); /** * Function GetLayerColor @@ -47,14 +47,14 @@ public: * @return the color for an item which is one of the item indices given * in pcbstruct.h, enum PCB_VISIBLE or in schematic */ - EDA_COLOR_T GetItemColor( int aItemIdx ); + EDA_COLOR_T GetItemColor( int aItemIdx ) const; /** * Function SetItemColor * sets the color for an item which is one of the item indices given * in pcbstruct.h, enum PCB_VISIBLE or in schematic */ - void SetItemColor( int aItemIdx, EDA_COLOR_T aColor ); + void SetItemColor( int aItemIdx, EDA_COLOR_T aColor ); /** * Function SetAllColorsAs diff --git a/include/painter.h b/include/painter.h index afa74aa482..3f56e1037d 100644 --- a/include/painter.h +++ b/include/painter.h @@ -64,7 +64,7 @@ public: * Loads a list of color settings for layers. * @param aSettings is a list of color settings. */ - virtual void ImportLegacyColors( COLORS_DESIGN_SETTINGS* aSettings ) = 0; + virtual void ImportLegacyColors( const COLORS_DESIGN_SETTINGS* aSettings ) = 0; /** * Function SetActiveLayer @@ -114,7 +114,7 @@ public: * Returns current highlight setting. * @return True if highlight is enabled, false otherwise. */ - bool GetHighlight() const + inline bool GetHighlight() const { return m_highlightEnabled; } @@ -124,7 +124,7 @@ public: * Returns netcode of currently highlighted net. * @return Netcode of currently highlighted net. */ - int GetHighlightNetCode() const + inline int GetHighlightNetCode() const { return m_highlightNetcode; } @@ -182,7 +182,7 @@ public: * Returns the color responding to the one of EDA_COLOR_T enum values. * @param EDA_COLOR_T color equivalent. */ - const COLOR4D& TranslateColor( EDA_COLOR_T aColor ) + inline const COLOR4D& TranslateColor( EDA_COLOR_T aColor ) { return m_legacyColorMap[aColor]; } @@ -192,7 +192,7 @@ public: * Returns current background color settings. * @return Background color. */ - const COLOR4D& GetBackgroundColor() const + inline const COLOR4D& GetBackgroundColor() const { return m_backgroundColor; } @@ -202,7 +202,7 @@ public: * Sets new color for background. * @param aColor is the new background color. */ - void SetBackgroundColor( const COLOR4D& aColor ) + inline void SetBackgroundColor( const COLOR4D& aColor ) { m_backgroundColor = aColor; } @@ -210,12 +210,12 @@ public: protected: /** * Function update - * Precalculates extra colors for layers (eg. highlighted, darkened and any needed version + * Precalculates extra colors for layers (e.g. highlighted, darkened and any needed version * of base colors). */ virtual void update(); - std::set m_activeLayers; /// Stores active layers number + std::set m_activeLayers; ///< Stores active layers number /// Parameters for display modes bool m_hiContrastEnabled; ///< High contrast display mode on/off @@ -267,32 +267,29 @@ public: PAINTER( GAL* aGal ); virtual ~PAINTER(); - /** - * Function ApplySettings - * Loads colors and display modes settings that are going to be used when drawing items. - * @param aSettings are settings to be applied. - */ - virtual void ApplySettings( RENDER_SETTINGS* aSettings ) - { - m_settings.reset( aSettings ); - } - /** * Function SetGAL * Changes Graphics Abstraction Layer used for drawing items for a new one. * @param aGal is the new GAL instance. */ - void SetGAL( GAL* aGal ); + void SetGAL( GAL* aGal ) + { + m_gal = aGal; + } + + /** + * Function ApplySettings + * Loads colors and display modes settings that are going to be used when drawing items. + * @param aSettings are settings to be applied. + */ + virtual void ApplySettings( const RENDER_SETTINGS* aSettings ) = 0; /** * Function GetSettings * Returns pointer to current settings that are going to be used when drawing items. * @return Current rendering settings. */ - virtual RENDER_SETTINGS* GetSettings() const - { - return m_settings.get(); - } + virtual RENDER_SETTINGS* GetSettings() = 0; /** * Function Draw @@ -307,13 +304,10 @@ public: protected: /// Instance of graphic abstraction layer that gives an interface to call /// commands used to draw (eg. DrawLine, DrawCircle, etc.) - GAL* m_gal; - - /// Colors and display modes settings that are going to be used when drawing items. - boost::shared_ptr m_settings; + GAL* m_gal; /// Color of brightened item frame - COLOR4D m_brightenedColor; + COLOR4D m_brightenedColor; }; } // namespace KIGFX diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 5577650436..fafecf16f4 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -855,19 +855,6 @@ void PCB_BASE_FRAME::LoadSettings( wxConfigBase* aCfg ) view->SetLayerTarget( ITEM_GAL_LAYER( GP_OVERLAY ), KIGFX::TARGET_OVERLAY ); view->SetLayerTarget( ITEM_GAL_LAYER( RATSNEST_VISIBLE ), KIGFX::TARGET_OVERLAY ); - // Apply layer coloring scheme & display options - if( view->GetPainter() ) - { - KIGFX::PCB_RENDER_SETTINGS* settings = new KIGFX::PCB_RENDER_SETTINGS(); - - // Load layers' colors from PCB data - settings->ImportLegacyColors( m_Pcb->GetColorsSettings() ); - view->GetPainter()->ApplySettings( settings ); - - // Load display options (such as filled/outline display of items) - settings->LoadDisplayOptions( DisplayOpt ); - } - // WxWidgets 2.9.1 seems call setlocale( LC_NUMERIC, "" ) // when reading doubles in config, // but forget to back to current locale. So we call SetLocaleTo_Default diff --git a/pcbnew/class_pcb_layer_widget.cpp b/pcbnew/class_pcb_layer_widget.cpp index 41e346a2a0..ce7bc0f6e6 100644 --- a/pcbnew/class_pcb_layer_widget.cpp +++ b/pcbnew/class_pcb_layer_widget.cpp @@ -348,6 +348,14 @@ void PCB_LAYER_WIDGET::OnLayerColorChange( LAYER_NUM aLayer, EDA_COLOR_T aColor { myframe->GetBoard()->SetLayerColor( aLayer, aColor ); myframe->ReCreateLayerBox( false ); + + if( myframe->IsGalCanvasActive() ) + { + KIGFX::VIEW* view = myframe->GetGalCanvas()->GetView(); + view->GetPainter()->GetSettings()->ImportLegacyColors( myframe->GetBoard()->GetColorsSettings() ); + view->UpdateLayerColor( aLayer ); + } + myframe->GetCanvas()->Refresh(); } diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 7b72b47497..db939b832a 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -44,6 +44,10 @@ using namespace KIGFX; PCB_RENDER_SETTINGS::PCB_RENDER_SETTINGS() { m_backgroundColor = COLOR4D( 0.0, 0.0, 0.0, 1.0 ); + m_padNumbers = true; + m_netNamesOnPads = true; + m_netNamesOnTracks = true; + m_displayZoneMode = DZ_SHOW_FILLED; // By default everything should be displayed as filled for( unsigned int i = 0; i < END_PCB_VISIBLE_LIST; ++i ) @@ -55,7 +59,7 @@ PCB_RENDER_SETTINGS::PCB_RENDER_SETTINGS() } -void PCB_RENDER_SETTINGS::ImportLegacyColors( COLORS_DESIGN_SETTINGS* aSettings ) +void PCB_RENDER_SETTINGS::ImportLegacyColors( const COLORS_DESIGN_SETTINGS* aSettings ) { for( int i = 0; i < NB_LAYERS; i++ ) { @@ -82,7 +86,6 @@ void PCB_RENDER_SETTINGS::ImportLegacyColors( COLORS_DESIGN_SETTINGS* aSettings // Netnames for copper layers for( LAYER_NUM layer = FIRST_COPPER_LAYER; layer <= LAST_COPPER_LAYER; ++layer ) { - // Quick, dirty hack, netnames layers should be stored in usual layers m_layerColors[GetNetnameLayer( layer )] = COLOR4D( 0.8, 0.8, 0.8, 0.7 ); } @@ -192,8 +195,6 @@ void PCB_RENDER_SETTINGS::update() PCB_PAINTER::PCB_PAINTER( GAL* aGal ) : PAINTER( aGal ) { - m_settings.reset( new PCB_RENDER_SETTINGS() ); - m_pcbSettings = (PCB_RENDER_SETTINGS*) m_settings.get(); } @@ -260,7 +261,7 @@ void PCB_PAINTER::draw( const TRACK* aTrack, int aLayer ) VECTOR2D end( aTrack->GetEnd() ); int width = aTrack->GetWidth(); - if( m_pcbSettings->m_netNamesOnTracks && IsNetnameLayer( aLayer ) ) + if( m_pcbSettings.m_netNamesOnTracks && IsNetnameLayer( aLayer ) ) { // If there is a net name - display it on the track if( aTrack->GetNetCode() > NETINFO_LIST::UNCONNECTED ) @@ -278,8 +279,8 @@ void PCB_PAINTER::draw( const TRACK* aTrack, int aLayer ) double textSize = std::min( static_cast( width ), length / netName.length() ); // Set a proper color for the label - const COLOR4D& color = m_pcbSettings->GetColor( aTrack, aTrack->GetLayer() ); - COLOR4D labelColor = m_pcbSettings->GetColor( NULL, aLayer ); + const COLOR4D& color = m_pcbSettings.GetColor( aTrack, aTrack->GetLayer() ); + COLOR4D labelColor = m_pcbSettings.GetColor( NULL, aLayer ); if( color.GetBrightness() > 0.5 ) m_gal->SetStrokeColor( labelColor.Inverted() ); @@ -299,14 +300,14 @@ void PCB_PAINTER::draw( const TRACK* aTrack, int aLayer ) else if( IsCopperLayer( aLayer ) ) { // Draw a regular track - const COLOR4D& color = m_pcbSettings->GetColor( aTrack, aLayer ); + const COLOR4D& color = m_pcbSettings.GetColor( aTrack, aLayer ); m_gal->SetStrokeColor( color ); m_gal->SetIsStroke( true ); - if( m_pcbSettings->m_sketchMode[TRACKS_VISIBLE] ) + if( m_pcbSettings.m_sketchMode[TRACKS_VISIBLE] ) { // Outline mode - m_gal->SetLineWidth( m_pcbSettings->m_outlineWidth ); + m_gal->SetLineWidth( m_pcbSettings.m_outlineWidth ); m_gal->SetIsFill( false ); } else @@ -337,14 +338,14 @@ void PCB_PAINTER::draw( const VIA* aVia, int aLayer ) else return; - const COLOR4D& color = m_pcbSettings->GetColor( aVia, aLayer ); + const COLOR4D& color = m_pcbSettings.GetColor( aVia, aLayer ); - if( m_pcbSettings->m_sketchMode[VIA_THROUGH_VISIBLE] ) + if( m_pcbSettings.m_sketchMode[VIA_THROUGH_VISIBLE] ) { // Outline mode m_gal->SetIsFill( false ); m_gal->SetIsStroke( true ); - m_gal->SetLineWidth( m_pcbSettings->m_outlineWidth ); + m_gal->SetLineWidth( m_pcbSettings.m_outlineWidth ); m_gal->SetStrokeColor( color ); m_gal->DrawCircle( center, radius ); } @@ -372,12 +373,12 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) if( IsNetnameLayer( aLayer ) ) { // Is anything that we can display enabled? - if( m_pcbSettings->m_netNamesOnPads || m_pcbSettings->m_padNumbers ) + if( m_pcbSettings.m_netNamesOnPads || m_pcbSettings.m_padNumbers ) { // Min char count to calculate string size const int MIN_CHAR_COUNT = 3; - bool displayNetname = ( m_pcbSettings->m_netNamesOnPads && + bool displayNetname = ( m_pcbSettings.m_netNamesOnPads && !aPad->GetNetname().empty() ); VECTOR2D padsize = VECTOR2D( aPad->GetSize() ); double maxSize = PCB_RENDER_SETTINGS::MAX_FONT_SIZE; @@ -415,8 +416,8 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) m_gal->SetMirrored( false ); // Set a proper color for the label - const COLOR4D& color = m_pcbSettings->GetColor( aPad, aPad->GetLayer() ); - COLOR4D labelColor = m_pcbSettings->GetColor( NULL, aLayer ); + const COLOR4D& color = m_pcbSettings.GetColor( aPad, aPad->GetLayer() ); + COLOR4D labelColor = m_pcbSettings.GetColor( NULL, aLayer ); if( color.GetBrightness() > 0.5 ) m_gal->SetStrokeColor( labelColor.Inverted() ); @@ -427,7 +428,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) // Divide the space, to display both pad numbers and netnames // and set the Y text position to display 2 lines - if( displayNetname && m_pcbSettings->m_padNumbers ) + if( displayNetname && m_pcbSettings.m_padNumbers ) { size = size / 2.0; textpos.y = size / 2.0; @@ -446,7 +447,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) m_gal->StrokeText( aPad->GetShortNetname(), textpos, 0.0 ); } - if( m_pcbSettings->m_padNumbers ) + if( m_pcbSettings.m_padNumbers ) { textpos.y = -textpos.y; aPad->StringPadName( buffer ); @@ -469,13 +470,13 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) } // Pad drawing - const COLOR4D& color = m_pcbSettings->GetColor( aPad, aLayer ); - if( m_pcbSettings->m_sketchMode[PADS_VISIBLE] ) + const COLOR4D& color = m_pcbSettings.GetColor( aPad, aLayer ); + if( m_pcbSettings.m_sketchMode[PADS_VISIBLE] ) { // Outline mode m_gal->SetIsFill( false ); m_gal->SetIsStroke( true ); - m_gal->SetLineWidth( m_pcbSettings->m_outlineWidth ); + m_gal->SetLineWidth( m_pcbSettings.m_outlineWidth ); m_gal->SetStrokeColor( color ); } else @@ -533,7 +534,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) m = ( size.y - size.x ); n = size.x; - if( m_pcbSettings->m_sketchMode[PADS_VISIBLE] ) + if( m_pcbSettings.m_sketchMode[PADS_VISIBLE] ) { // Outline mode m_gal->DrawArc( VECTOR2D( 0, -m ), n, -M_PI, 0 ); @@ -554,7 +555,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) m = ( size.x - size.y ); n = size.y; - if( m_pcbSettings->m_sketchMode[PADS_VISIBLE] ) + if( m_pcbSettings.m_sketchMode[PADS_VISIBLE] ) { // Outline mode m_gal->DrawArc( VECTOR2D( -m, 0 ), n, M_PI / 2, 3 * M_PI / 2 ); @@ -590,7 +591,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) pointList.push_back( VECTOR2D( corners[2] ) ); pointList.push_back( VECTOR2D( corners[3] ) ); - if( m_pcbSettings->m_sketchMode[PADS_VISIBLE] ) + if( m_pcbSettings.m_sketchMode[PADS_VISIBLE] ) { // Add the beginning point to close the outline pointList.push_back( pointList.front() ); @@ -614,7 +615,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) void PCB_PAINTER::draw( const DRAWSEGMENT* aSegment ) { - const COLOR4D& color = m_pcbSettings->GetColor( aSegment, aSegment->GetLayer() ); + const COLOR4D& color = m_pcbSettings.GetColor( aSegment, aSegment->GetLayer() ); m_gal->SetIsFill( false ); m_gal->SetIsStroke( true ); @@ -694,7 +695,7 @@ void PCB_PAINTER::draw( const TEXTE_PCB* aText, int aLayer ) if( aText->GetText().Length() == 0 ) return; - const COLOR4D& strokeColor = m_pcbSettings->GetColor( aText, aText->GetLayer() ); + const COLOR4D& strokeColor = m_pcbSettings.GetColor( aText, aText->GetLayer() ); VECTOR2D position( aText->GetTextPosition().x, aText->GetTextPosition().y ); double orientation = aText->GetOrientation() * M_PI / 1800.0; @@ -710,7 +711,7 @@ void PCB_PAINTER::draw( const TEXTE_MODULE* aText, int aLayer ) if( aText->GetLength() == 0 ) return; - const COLOR4D& strokeColor = m_pcbSettings->GetColor( aText, aLayer ); + const COLOR4D& strokeColor = m_pcbSettings.GetColor( aText, aLayer ); VECTOR2D position( aText->GetTextPosition().x, aText->GetTextPosition().y ); double orientation = aText->GetDrawRotation() * M_PI / 1800.0; @@ -723,15 +724,15 @@ void PCB_PAINTER::draw( const TEXTE_MODULE* aText, int aLayer ) void PCB_PAINTER::draw( const ZONE_CONTAINER* aZone ) { - const COLOR4D& color = m_pcbSettings->GetColor( aZone, aZone->GetLayer() ); + const COLOR4D& color = m_pcbSettings.GetColor( aZone, aZone->GetLayer() ); std::deque corners; - PCB_RENDER_SETTINGS::DisplayZonesMode displayMode = m_pcbSettings->m_displayZoneMode; + PCB_RENDER_SETTINGS::DisplayZonesMode displayMode = m_pcbSettings.m_displayZoneMode; // Draw the outline m_gal->SetStrokeColor( color ); m_gal->SetIsFill( false ); m_gal->SetIsStroke( true ); - m_gal->SetLineWidth( m_pcbSettings->m_outlineWidth ); + m_gal->SetLineWidth( m_pcbSettings.m_outlineWidth ); const CPolyLine* outline = aZone->Outline(); for( int i = 0; i < outline->GetCornersCount(); ++i ) @@ -796,7 +797,7 @@ void PCB_PAINTER::draw( const ZONE_CONTAINER* aZone ) void PCB_PAINTER::draw( const DIMENSION* aDimension, int aLayer ) { - const COLOR4D& strokeColor = m_pcbSettings->GetColor( aDimension, aLayer ); + const COLOR4D& strokeColor = m_pcbSettings.GetColor( aDimension, aLayer ); m_gal->SetStrokeColor( strokeColor ); m_gal->SetIsFill( false ); @@ -827,7 +828,7 @@ void PCB_PAINTER::draw( const DIMENSION* aDimension, int aLayer ) void PCB_PAINTER::draw( const PCB_TARGET* aTarget ) { - const COLOR4D& strokeColor = m_pcbSettings->GetColor( aTarget, aTarget->GetLayer() ); + const COLOR4D& strokeColor = m_pcbSettings.GetColor( aTarget, aTarget->GetLayer() ); VECTOR2D position( aTarget->GetPosition() ); double size, radius; diff --git a/pcbnew/pcb_painter.h b/pcbnew/pcb_painter.h index d9ef81b4e1..46e7bb7da3 100644 --- a/pcbnew/pcb_painter.h +++ b/pcbnew/pcb_painter.h @@ -79,7 +79,7 @@ public: PCB_RENDER_SETTINGS(); /// @copydoc RENDER_SETTINGS::ImportLegacyColors() - void ImportLegacyColors( COLORS_DESIGN_SETTINGS* aSettings ); + void ImportLegacyColors( const COLORS_DESIGN_SETTINGS* aSettings ); /** * Function LoadDisplayOptions @@ -97,7 +97,7 @@ public: * Returns the color used to draw a layer. * @param aLayer is the layer number. */ - const COLOR4D& GetLayerColor( int aLayer ) const + inline const COLOR4D& GetLayerColor( int aLayer ) const { return m_layerColors[aLayer]; } @@ -108,7 +108,7 @@ public: * @param aLayer is the layer number. * @param aColor is the new color. */ - void SetLayerColor( int aLayer, const COLOR4D& aColor ) + inline void SetLayerColor( int aLayer, const COLOR4D& aColor ) { m_layerColors[aLayer] = aColor; @@ -122,7 +122,7 @@ public: * @param aEnabled decides if it is drawn in sketch mode (true for sketched mode, * false for filled mode). */ - void SetSketchMode( int aItemLayer, bool aEnabled ) + inline void SetSketchMode( int aItemLayer, bool aEnabled ) { // It is supposed to work only with item layers assert( aItemLayer >= ITEM_GAL_LAYER( 0 ) ); @@ -135,7 +135,7 @@ public: * Returns sketch mode setting for a given item layer. * @param aItemLayer is the item layer that is changed. */ - bool GetSketchMode( int aItemLayer ) const + inline bool GetSketchMode( int aItemLayer ) const { // It is supposed to work only with item layers assert( aItemLayer >= ITEM_GAL_LAYER( 0 ) ); @@ -148,13 +148,13 @@ protected: void update(); ///> Colors for all layers (normal) - COLOR4D m_layerColors [TOTAL_LAYER_COUNT]; + COLOR4D m_layerColors[TOTAL_LAYER_COUNT]; ///> Colors for all layers (highlighted) - COLOR4D m_layerColorsHi [TOTAL_LAYER_COUNT]; + COLOR4D m_layerColorsHi[TOTAL_LAYER_COUNT]; ///> Colors for all layers (selected) - COLOR4D m_layerColorsSel [TOTAL_LAYER_COUNT]; + COLOR4D m_layerColorsSel[TOTAL_LAYER_COUNT]; ///> Colors for all layers (darkened) COLOR4D m_layerColorsDark[TOTAL_LAYER_COUNT]; @@ -188,21 +188,23 @@ class PCB_PAINTER : public PAINTER public: PCB_PAINTER( GAL* aGal ); - /// @copydoc PAINTER::Draw() - virtual bool Draw( const VIEW_ITEM*, int ); - /// @copydoc PAINTER::ApplySettings() - virtual void ApplySettings( RENDER_SETTINGS* aSettings ) + virtual void ApplySettings( const RENDER_SETTINGS* aSettings ) { - PAINTER::ApplySettings( aSettings ); - - // Store PCB specific render settings - m_pcbSettings = (PCB_RENDER_SETTINGS*) m_settings.get(); + m_pcbSettings = *static_cast( aSettings ); } + /// @copydoc PAINTER::GetSettings() + virtual RENDER_SETTINGS* GetSettings() + { + return &m_pcbSettings; + } + + /// @copydoc PAINTER::Draw() + virtual bool Draw( const VIEW_ITEM* aItem, int aLayer ); + protected: - /// Just a properly casted pointer to settings - PCB_RENDER_SETTINGS* m_pcbSettings; + PCB_RENDER_SETTINGS m_pcbSettings; // Drawing functions for various types of PCB-specific items void draw( const TRACK* aTrack, int aLayer ); diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index e8d4232b40..d613206802 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -58,7 +58,7 @@ #include #include #include -#include +#include #include #include @@ -548,6 +548,19 @@ void PCB_EDIT_FRAME::ViewReloadBoard( const BOARD* aBoard ) const view->Add( aBoard->GetRatsnestViewItem() ); aBoard->GetRatsnest()->Recalculate(); + // Apply layer coloring scheme & display options + if( view->GetPainter() ) + { + KIGFX::PCB_RENDER_SETTINGS* settings = + static_cast( view->GetPainter()->GetSettings() ); + + // Load layers' colors from PCB data + settings->ImportLegacyColors( m_Pcb->GetColorsSettings() ); + + // Load display options (such as filled/outline display of items) + settings->LoadDisplayOptions( DisplayOpt ); + } + // Limit panning to the size of worksheet frame GetGalCanvas()->GetViewControls()->SetPanBoundary( aBoard->GetWorksheetViewItem()->ViewBBox() ); view->RecacheAllItems( true ); From 957f959e9008b2dc565f64bde1b4bc918f4a1959 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 22 May 2014 12:06:45 +0200 Subject: [PATCH 440/741] Fixed bug 1321936: changing a footprint for a set of modules relocates them in GAL canvas. Changes introduced by the module editor are updated in GAL canvas. --- pcbnew/tools/edit_tool.cpp | 69 +++++++++++++++++++++++++++++++++----- pcbnew/tools/edit_tool.h | 3 ++ pcbnew/xchgmod.cpp | 7 ++-- 3 files changed, 66 insertions(+), 13 deletions(-) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index c0e30627dc..727f20b9b3 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -229,6 +229,8 @@ int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) // Check if user wants to edit pad or module properties if( item->Type() == PCB_MODULE_T ) { + item->ClearFlags(); // Necessary for having an undo entry + for( D_PAD* pad = static_cast( item )->Pads(); pad; pad = pad->Next() ) { if( pad->ViewBBox().Contains( getViewControls()->GetCursorPosition() ) ) @@ -240,20 +242,34 @@ int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) } } - editFrame->SaveCopyInUndoList( item, UR_CHANGED ); - editFrame->OnModify(); + std::vector& undoList = editFrame->GetScreen()->m_UndoList.m_CommandsList; + + // It is necessary to determine if anything has changed + PICKED_ITEMS_LIST* lastChange = undoList.empty() ? NULL : undoList.back(); + + // Display properties dialog editFrame->OnEditItemRequest( NULL, item ); - item->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + PICKED_ITEMS_LIST* currentChange = undoList.empty() ? NULL : undoList.back(); - updateRatsnest( true ); - getModel( PCB_T )->GetRatsnest()->Recalculate(); - - if( unselect ) + if( lastChange != currentChange ) // Something has changed + { + // Some of properties dialogs alter pointers, so we should deselect them m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + + processChanges( currentChange ); + + // Seems unnecessary, as the items are removed/added to the board + // updateRatsnest( true ); + // getModel( PCB_T )->GetRatsnest()->Recalculate(); + + m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate ); + } } - m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate ); + if( unselect ) + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + setTransitions(); return 0; @@ -509,3 +525,40 @@ bool EDIT_TOOL::makeSelection( const SELECTION_TOOL::SELECTION& aSelection ) return !aSelection.Empty(); } + + +void EDIT_TOOL::processChanges( const PICKED_ITEMS_LIST* aList ) +{ + for( unsigned int i = 0; i < aList->GetCount(); ++i ) + { + UNDO_REDO_T operation = aList->GetPickedItemStatus( i ); + EDA_ITEM* updItem = aList->GetPickedItem( i ); + + switch( operation ) + { + case UR_CHANGED: + updItem->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + break; + + case UR_DELETED: + if( updItem->Type() == PCB_MODULE_T ) + static_cast( updItem )->RunOnChildren( boost::bind( &KIGFX::VIEW::Remove, + getView(), _1 ) ); + + getView()->Remove( updItem ); + break; + + case UR_NEW: + if( updItem->Type() == PCB_MODULE_T ) + static_cast( updItem )->RunOnChildren( boost::bind( &KIGFX::VIEW::Add, + getView(), _1 ) ); + + getView()->Add( updItem ); + break; + + default: + assert( false ); // Not handled + break; + } + } +} diff --git a/pcbnew/tools/edit_tool.h b/pcbnew/tools/edit_tool.h index b23f076e96..207e446493 100644 --- a/pcbnew/tools/edit_tool.h +++ b/pcbnew/tools/edit_tool.h @@ -133,6 +133,9 @@ private: ///> If there are no items currently selected, it tries to choose the item that is under ///> the cursor or displays a disambiguation menu if there are multpile items. bool makeSelection( const SELECTION_TOOL::SELECTION& aSelection ); + + ///> Updates view with the changes in the list. + void processChanges( const PICKED_ITEMS_LIST* aList ); }; #endif diff --git a/pcbnew/xchgmod.cpp b/pcbnew/xchgmod.cpp index 7fafc6a914..1343ed9fb2 100644 --- a/pcbnew/xchgmod.cpp +++ b/pcbnew/xchgmod.cpp @@ -428,10 +428,8 @@ void PCB_EDIT_FRAME::Exchange_Module( MODULE* aOldModule, /* place module without ratsnest refresh: this will be made later * when all modules are on board */ - wxPoint oldpos = GetCrossHairPosition(); - SetCrossHairPosition( aOldModule->GetPosition(), false ); PlaceModule( aNewModule, NULL, true ); - SetCrossHairPosition( oldpos, false ); + aNewModule->SetPosition( aOldModule->GetPosition() ); // Flip footprint if needed if( aOldModule->GetLayer() != aNewModule->GetLayer() ) @@ -457,9 +455,8 @@ void PCB_EDIT_FRAME::Exchange_Module( MODULE* aOldModule, for( D_PAD* pad = aNewModule->Pads(); pad != NULL; pad = pad->Next() ) { pad->SetNetCode( NETINFO_LIST::UNCONNECTED ); - D_PAD* old_pad = aOldModule->Pads(); - for( ; old_pad != NULL; old_pad = old_pad->Next() ) + for( D_PAD* old_pad = aOldModule->Pads(); old_pad != NULL; old_pad = old_pad->Next() ) { if( pad->PadNameEqual( old_pad ) ) pad->SetNetCode( old_pad->GetNetCode() ); From 655721d9ae8d1539a67f453e3f824ad5dbeaeddd Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 22 May 2014 15:01:58 +0200 Subject: [PATCH 441/741] Added missing changes required for updating footprints with the module editor. --- pcbnew/tools/edit_tool.cpp | 18 ++++++++++-------- pcbnew/xchgmod.cpp | 15 +++++++++++++++ 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 727f20b9b3..3badc60fb2 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -229,8 +229,6 @@ int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) // Check if user wants to edit pad or module properties if( item->Type() == PCB_MODULE_T ) { - item->ClearFlags(); // Necessary for having an undo entry - for( D_PAD* pad = static_cast( item )->Pads(); pad; pad = pad->Next() ) { if( pad->ViewBBox().Contains( getViewControls()->GetCursorPosition() ) ) @@ -244,6 +242,11 @@ int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) std::vector& undoList = editFrame->GetScreen()->m_UndoList.m_CommandsList; + // Some of properties dialogs alter pointers, so we should deselect them + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + STATUS_FLAGS flags = item->GetFlags(); + item->ClearFlags(); + // It is necessary to determine if anything has changed PICKED_ITEMS_LIST* lastChange = undoList.empty() ? NULL : undoList.back(); @@ -254,17 +257,15 @@ int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) if( lastChange != currentChange ) // Something has changed { - // Some of properties dialogs alter pointers, so we should deselect them - m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); - processChanges( currentChange ); - // Seems unnecessary, as the items are removed/added to the board - // updateRatsnest( true ); - // getModel( PCB_T )->GetRatsnest()->Recalculate(); + updateRatsnest( true ); + getModel( PCB_T )->GetRatsnest()->Recalculate(); m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate ); } + + item->SetFlags( flags ); } if( unselect ) @@ -554,6 +555,7 @@ void EDIT_TOOL::processChanges( const PICKED_ITEMS_LIST* aList ) getView(), _1 ) ); getView()->Add( updItem ); + updItem->ViewUpdate(); break; default: diff --git a/pcbnew/xchgmod.cpp b/pcbnew/xchgmod.cpp index 1343ed9fb2..9f4ba54c72 100644 --- a/pcbnew/xchgmod.cpp +++ b/pcbnew/xchgmod.cpp @@ -30,6 +30,7 @@ #include #include +#include #include #include #include @@ -44,6 +45,8 @@ #include #include +#include + static bool RecreateCmpFile( BOARD * aBrd, const wxString& aFullCmpFileName ); class DIALOG_EXCHANGE_MODULE : public DIALOG_EXCHANGE_MODULE_BASE @@ -470,9 +473,21 @@ void PCB_EDIT_FRAME::Exchange_Module( MODULE* aOldModule, ITEM_PICKER picker_new( aNewModule, UR_NEW ); aUndoPickList->PushItem( picker_old ); aUndoPickList->PushItem( picker_new ); + + if( IsGalCanvasActive() ) + { + KIGFX::VIEW* view = GetGalCanvas()->GetView(); + + aOldModule->RunOnChildren( boost::bind( &KIGFX::VIEW::Remove, view, _1 ) ); + view->Remove( aOldModule ); + + aNewModule->RunOnChildren( boost::bind( &KIGFX::VIEW::Add, view, _1 ) ); + view->Add( aNewModule ); + } } else { + GetGalCanvas()->GetView()->Remove( aOldModule ); aOldModule->DeleteStructure(); } From b688f9bc20e08547a195850fe1eea8162e451bb8 Mon Sep 17 00:00:00 2001 From: Tomasz Wlostowski Date: Thu, 22 May 2014 15:07:28 +0200 Subject: [PATCH 442/741] math_util: speed up rescaling on 64-bit platforms by using native 128-bit types --- common/math/math_util.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/common/math/math_util.cpp b/common/math/math_util.cpp index d3f69e81a7..81dafc3a74 100644 --- a/common/math/math_util.cpp +++ b/common/math/math_util.cpp @@ -27,20 +27,24 @@ #include #include #include +#include -template <> +template<> int rescale( int aNumerator, int aValue, int aDenominator ) { return (int) ( (int64_t) aNumerator * (int64_t) aValue / (int64_t) aDenominator ); } -template <> +template<> int64_t rescale( int64_t aNumerator, int64_t aValue, int64_t aDenominator ) { +#ifdef __x86_64__ + return ( (__int128_t) aNumerator * (__int128_t) aValue ) / aDenominator; +#else int64_t r = 0; int64_t sign = ( ( aNumerator < 0 ) ? -1 : 1 ) * ( aDenominator < 0 ? -1 : 1 ) * - ( aValue < 0 ? -1 : 1 ); + ( aValue < 0 ? -1 : 1 ); int64_t a = std::abs( aNumerator ); int64_t b = std::abs( aValue ); @@ -84,4 +88,5 @@ int64_t rescale( int64_t aNumerator, int64_t aValue, int64_t aDenominator ) return t1 * sign; } +#endif } From dd1fcd05884c8be9951aa611db7a188b7eac219c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 22 May 2014 17:59:36 +0200 Subject: [PATCH 443/741] Fix for context menu hanging up in GAL. --- common/tool/tool_manager.cpp | 6 +----- include/tool/context_menu.h | 2 +- pcbnew/tools/selection_tool.cpp | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index a0bba9c51f..605f8505b3 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -493,7 +493,7 @@ bool TOOL_MANAGER::ProcessEvent( TOOL_EVENT& aEvent ) // If nothing was chosen from the context menu, we must notify the tool as well if( menu->GetSelected() < 0 ) { - TOOL_EVENT evt( TC_COMMAND, TA_CONTEXT_MENU_CHOICE ); + TOOL_EVENT evt( TC_COMMAND, TA_CONTEXT_MENU_CHOICE, -1 ); dispatchInternal( evt ); } @@ -518,10 +518,6 @@ void TOOL_MANAGER::ScheduleContextMenu( TOOL_BASE* aTool, CONTEXT_MENU* aMenu, st->contextMenu = aMenu; st->contextMenuTrigger = aTrigger; - - // the tool wants the menu immediately? Preempt it and do so :) - if( aTrigger == CMENU_NOW ) - st->cofunc->Yield(); } diff --git a/include/tool/context_menu.h b/include/tool/context_menu.h index 709e0d34e7..9090702f8c 100644 --- a/include/tool/context_menu.h +++ b/include/tool/context_menu.h @@ -97,7 +97,7 @@ protected: m_customHandler = aHandler; } - virtual OPT_TOOL_EVENT handleCustomEvent(const wxEvent& aEvent ) + virtual OPT_TOOL_EVENT handleCustomEvent( const wxEvent& aEvent ) { return OPT_TOOL_EVENT(); } diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 1917076f59..48d1b36412 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -451,12 +451,10 @@ BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector ) { brightBox.reset( new BRIGHT_BOX( current ) ); getView()->Add( brightBox.get() ); + // BRIGHT_BOX is removed from view on destruction } } - // Removes possible brighten mark - getView()->MarkTargetDirty( KIGFX::TARGET_OVERLAY ); - return current; } From 537a97cf52bdf55fabab9af49e1f0163cc30a56d Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 22 May 2014 19:34:28 +0200 Subject: [PATCH 444/741] Ratsnest is computed for legacy boards in GAL view. --- pcbnew/legacy_plugin.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index e6ba98c812..9b51a10706 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -2054,24 +2054,21 @@ void LEGACY_PLUGIN::loadTrackList( int aStructType ) else makeType = aStructType; - TRACK* newTrack; // BOARD insert this new one immediately after instantiation + TRACK* newTrack; switch( makeType ) { default: case PCB_TRACE_T: newTrack = new TRACK( m_board ); - m_board->m_Track.Append( newTrack ); break; case PCB_VIA_T: newTrack = new VIA( m_board ); - m_board->m_Track.Append( newTrack ); break; case PCB_ZONE_T: // this is now deprecated, but exist in old boards newTrack = new SEGZONE( m_board ); - m_board->m_Zone.Append( (SEGZONE*) newTrack ); break; } @@ -2099,6 +2096,8 @@ void LEGACY_PLUGIN::loadTrackList( int aStructType ) newTrack->SetNetCode( net_code ); newTrack->SetState( flags, true ); + + m_board->Add( newTrack ); } THROW_IO_ERROR( "Missing '$EndTRACK'" ); From 012b508622dba4cae0407e2fa410f7fc73751d13 Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Thu, 22 May 2014 15:50:49 -0400 Subject: [PATCH 445/741] Add DRC and website improvements to road map. --- Documentation/development/road-map.md | 37 +++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/Documentation/development/road-map.md b/Documentation/development/road-map.md index 16aef94e5c..40603aa1c5 100644 --- a/Documentation/development/road-map.md +++ b/Documentation/development/road-map.md @@ -49,6 +49,24 @@ developers. - Initial planning stages. +## Website Improvements ## {#website_improvements} +**Goal:** + +Make the website at www.kicad-pcb.org as the definitive resource for both +users and developers which will provide a single point of reference instead +of the many separate websites currently in used. + +**Task:** +- Define the content and design of the website. +- Implement the new design. + +**Dependencies:** +- None + +**Status:** +- No progress. + + # General # {#general} This section defines the tasks that affect all or most of KiCad or do not fit under as specific part of the code such as the board editor or the @@ -578,6 +596,25 @@ Provide clipboard cut and paste for footprints.. **Status:** - No progress. +## Design Rule Check (DRC) Improvements. ## {#drc_improvements} +**Goal:** + +Create additional DRC tests for improved error checking. + +**Task:** +- Replace geometry code with [unified geometry library](#geometry_lib). +- Remove floating point code from clearance calculations to prevent rounding + errors. +- Add checks for component, silk screen, and mask clearances. +- Remove DRC related limitations such as no arc or text on copper layers. +- Add option for saving and loading DRC options. + +**Dependencies:** +- [Unified geometry library.](#geometry_lib) + +**Progress:** +- Planning + # GerbView: Gerber File Viewer # {#gerbview} From 0db76ecb1416162da3c789324874e0931276c2f3 Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Thu, 22 May 2014 16:10:49 -0400 Subject: [PATCH 446/741] Add gerber file attributes to road map. --- Documentation/development/road-map.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Documentation/development/road-map.md b/Documentation/development/road-map.md index 40603aa1c5..9c3cbd6d64 100644 --- a/Documentation/development/road-map.md +++ b/Documentation/development/road-map.md @@ -615,6 +615,24 @@ Create additional DRC tests for improved error checking. **Progress:** - Planning +## Gerber File Attributes ## {#gerber_attributes} +**Goal:** + +Add file attributes to gerber files for defining layer stacks. See +[this](http://www.ucamco.com/files/downloads/file/5/Extending_the_Gerber_Format_with_Attributes.pdf) +document and [this](http://www.ucamco.com/files/downloads/file/22/Kick_Starting_a_Revolution_IPC-2581_Meets_Gerber.pdf) +document for more information. + +**Task:** +- Implement gerber file attributes as an optional setting when plotting gerber + files. + +**Dependencies:** +- None + +**Progress:** +- Under investigation. + # GerbView: Gerber File Viewer # {#gerbview} From c87baa9d2290ea640627e4cb94d614c17e2a5545 Mon Sep 17 00:00:00 2001 From: Tomasz Wlostowski Date: Fri, 23 May 2014 11:57:43 +0200 Subject: [PATCH 447/741] router: fix segfault when trying to shove a line that forms a closed loop. --- pcbnew/router/pns_node.cpp | 34 +++++++++++++++++++++++----------- pcbnew/router/pns_node.h | 3 ++- 2 files changed, 25 insertions(+), 12 deletions(-) diff --git a/pcbnew/router/pns_node.cpp b/pcbnew/router/pns_node.cpp index df63612ab6..1692ae1e8d 100644 --- a/pcbnew/router/pns_node.cpp +++ b/pcbnew/router/pns_node.cpp @@ -715,25 +715,34 @@ void PNS_NODE::Remove( PNS_ITEM* aItem ) void PNS_NODE::followLine( PNS_SEGMENT* aCurrent, bool aScanDirection, int& aPos, - int aLimit, VECTOR2I* aCorners, PNS_SEGMENT** aSegments ) + int aLimit, VECTOR2I* aCorners, PNS_SEGMENT** aSegments, bool& aGuardHit ) { bool prevReversed = false; - for( ; ; ) + const VECTOR2I guard = aScanDirection ? aCurrent->Seg().B : aCurrent->Seg().A; + + for( int count = 0 ; ; ++count ) { const VECTOR2I p = ( aScanDirection ^ prevReversed ) ? aCurrent->Seg().B : aCurrent->Seg().A; const PNS_JOINT* jt = FindJoint( p, aCurrent ); assert( jt ); - assert( aPos > 0 && aPos < aLimit ); aCorners[aPos] = jt->Pos(); - aSegments[aPos] = aCurrent; + if( count && guard == p ) + { + aSegments[aPos] = NULL; + aGuardHit = true; + break; + } + + aSegments[aPos] = aCurrent; + aPos += ( aScanDirection ? 1 : -1 ); - if( !jt->IsLineCorner() ) + if( !jt->IsLineCorner() || aPos < 0 || aPos == aLimit ) break; aCurrent = jt->NextSegment( aCurrent ); @@ -752,6 +761,8 @@ PNS_LINE* PNS_NODE::AssembleLine( PNS_SEGMENT* aSeg, int* aOriginSegmentIndex) PNS_SEGMENT* segs[MaxVerts + 1]; PNS_LINE* pl = new PNS_LINE; + bool guardHit = false; + int i_start = MaxVerts / 2, i_end = i_start + 1; pl->SetWidth( aSeg->Width() ); @@ -759,9 +770,11 @@ PNS_LINE* PNS_NODE::AssembleLine( PNS_SEGMENT* aSeg, int* aOriginSegmentIndex) pl->SetNet( aSeg->Net() ); pl->SetOwner( this ); - followLine( aSeg, false, i_start, MaxVerts, corners, segs ); - followLine( aSeg, true, i_end, MaxVerts, corners, segs ); - + followLine( aSeg, false, i_start, MaxVerts, corners, segs, guardHit ); + + if( !guardHit ) + followLine( aSeg, true, i_end, MaxVerts, corners, segs, guardHit ); + int n = 0; PNS_SEGMENT* prev_seg = NULL; @@ -772,7 +785,7 @@ PNS_LINE* PNS_NODE::AssembleLine( PNS_SEGMENT* aSeg, int* aOriginSegmentIndex) pl->Line().Append( p ); - if( prev_seg != segs[i] ) + if( segs[i] && prev_seg != segs[i] ) { pl->LinkSegment( segs[i] ); @@ -785,10 +798,9 @@ PNS_LINE* PNS_NODE::AssembleLine( PNS_SEGMENT* aSeg, int* aOriginSegmentIndex) prev_seg = segs[i]; } - assert( pl->SegmentCount() != 0 ); assert( pl->SegmentCount() == (int) pl->LinkedSegments()->size() ); - + return pl; } diff --git a/pcbnew/router/pns_node.h b/pcbnew/router/pns_node.h index f4d728a3d6..93d590195c 100644 --- a/pcbnew/router/pns_node.h +++ b/pcbnew/router/pns_node.h @@ -380,7 +380,8 @@ private: int& aPos, int aLimit, VECTOR2I* aCorners, - PNS_SEGMENT** aSegments ); + PNS_SEGMENT** aSegments, + bool& aGuardHit ); ///> hash table with the joints, linking the items. Joints are hashed by ///> their position, layer set and net. From 3087c05a5d2b4ee2307846a3f93fb5abfacb40d2 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Sun, 25 May 2014 17:36:24 +0200 Subject: [PATCH 448/741] Bugfix #1322914: pcbnew crashes when opening a file --- pcbnew/kicad_plugin.cpp | 1161 +++++++++++++++++++------------------- pcbnew/legacy_plugin.cpp | 7 +- 2 files changed, 581 insertions(+), 587 deletions(-) diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index f77c4dfbb4..9de2aa9091 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -83,27 +83,38 @@ void filterNetClass( const BOARD& aBoard, NETCLASS& aNetClass ) */ class FP_CACHE_ITEM { - wxFileName m_file_name; ///< The the full file name and path of the footprint to cache. - bool m_writable; ///< Writability status of the footprint file. - wxDateTime m_mod_time; ///< The last file modified time stamp. - std::auto_ptr m_module; + wxFileName m_file_name; ///< The the full file name and path of the footprint to cache. + bool m_writable; ///< Writability status of the footprint file. + wxDateTime m_mod_time; ///< The last file modified time stamp. + std::auto_ptr m_module; public: FP_CACHE_ITEM( MODULE* aModule, const wxFileName& aFileName ); - wxString GetName() const { return m_file_name.GetDirs().Last(); } - wxFileName GetFileName() const { return m_file_name; } + wxString GetName() const + { + return m_file_name.GetDirs().Last(); + } + wxFileName GetFileName() const + { + return m_file_name; + } /// Tell if the disk content or the lib_path has changed. - bool IsModified() const; + bool IsModified() const; - MODULE* GetModule() const { return m_module.get(); } - void UpdateModificationTime() { m_mod_time = m_file_name.GetModificationTime(); } + MODULE* GetModule() const + { + return m_module.get(); + } + void UpdateModificationTime() + { + m_mod_time = m_file_name.GetModificationTime(); + } }; - FP_CACHE_ITEM::FP_CACHE_ITEM( MODULE* aModule, const wxFileName& aFileName ) : - m_module( aModule ) + m_module( aModule ) { m_file_name = aFileName; @@ -113,41 +124,50 @@ FP_CACHE_ITEM::FP_CACHE_ITEM( MODULE* aModule, const wxFileName& aFileName ) : m_mod_time.Now(); } - bool FP_CACHE_ITEM::IsModified() const { if( !m_file_name.FileExists() ) return false; wxLogTrace( traceFootprintLibrary, wxT( "File '%s', m_mod_time %s-%s, file mod time: %s-%s." ), - GetChars( m_file_name.GetFullPath() ), - GetChars( m_mod_time.FormatDate() ), GetChars( m_mod_time.FormatTime() ), - GetChars( m_file_name.GetModificationTime().FormatDate() ), - GetChars( m_file_name.GetModificationTime().FormatTime() ) ); + GetChars( m_file_name.GetFullPath() ), GetChars( m_mod_time.FormatDate() ), + GetChars( m_mod_time.FormatTime() ), + GetChars( m_file_name.GetModificationTime().FormatDate() ), + GetChars( m_file_name.GetModificationTime().FormatTime() ) ); return m_file_name.GetModificationTime() != m_mod_time; } - -typedef boost::ptr_map< std::string, FP_CACHE_ITEM > MODULE_MAP; -typedef MODULE_MAP::iterator MODULE_ITER; -typedef MODULE_MAP::const_iterator MODULE_CITER; - +typedef boost::ptr_map MODULE_MAP; +typedef MODULE_MAP::iterator MODULE_ITER; +typedef MODULE_MAP::const_iterator MODULE_CITER; class FP_CACHE { - PCB_IO* m_owner; /// Plugin object that owns the cache. - wxFileName m_lib_path; /// The path of the library. - wxDateTime m_mod_time; /// Footprint library path modified time stamp. - MODULE_MAP m_modules; /// Map of footprint file name per MODULE*. + PCB_IO* m_owner; /// Plugin object that owns the cache. + wxFileName m_lib_path; /// The path of the library. + wxDateTime m_mod_time; /// Footprint library path modified time stamp. + MODULE_MAP m_modules; /// Map of footprint file name per MODULE*. public: FP_CACHE( PCB_IO* aOwner, const wxString& aLibraryPath ); - wxString GetPath() const { return m_lib_path.GetPath(); } - wxDateTime GetLastModificationTime() const { return m_mod_time; } - bool IsWritable() const { return m_lib_path.IsOk() && m_lib_path.IsDirWritable(); } - MODULE_MAP& GetModules() { return m_modules; } + wxString GetPath() const + { + return m_lib_path.GetPath(); + } + wxDateTime GetLastModificationTime() const + { + return m_mod_time; + } + bool IsWritable() const + { + return m_lib_path.IsOk() && m_lib_path.IsDirWritable(); + } + MODULE_MAP& GetModules() + { + return m_modules; + } // Most all functions in this class throw IO_ERROR exceptions. There are no // error codes nor user interface calls from here, nor in any PLUGIN. @@ -191,35 +211,34 @@ public: bool IsPath( const wxString& aPath ) const; }; - FP_CACHE::FP_CACHE( PCB_IO* aOwner, const wxString& aLibraryPath ) { m_owner = aOwner; m_lib_path.SetPath( aLibraryPath ); } - wxDateTime FP_CACHE::GetLibModificationTime() const { return m_lib_path.GetModificationTime(); } - void FP_CACHE::Save() { if( !m_lib_path.DirExists() && !m_lib_path.Mkdir() ) { - THROW_IO_ERROR( wxString::Format( _( "Cannot create footprint library path '%s'" ), - m_lib_path.GetPath().GetData() ) ); + THROW_IO_ERROR( + wxString::Format( _( "Cannot create footprint library path '%s'" ), + m_lib_path.GetPath().GetData() ) ); } if( !m_lib_path.IsDirWritable() ) { - THROW_IO_ERROR( wxString::Format( _( "Footprint library path '%s' is read only" ), - GetChars( m_lib_path.GetPath() ) ) ); + THROW_IO_ERROR( + wxString::Format( _( "Footprint library path '%s' is read only" ), + GetChars( m_lib_path.GetPath() ) ) ); } - for( MODULE_ITER it = m_modules.begin(); it != m_modules.end(); ++it ) + for( MODULE_ITER it = m_modules.begin(); it != m_modules.end(); ++it ) { wxFileName fn = it->second->GetFileName(); @@ -232,7 +251,7 @@ void FP_CACHE::Save() // renaming the file. { wxLogTrace( traceFootprintLibrary, wxT( "Creating temporary library file %s" ), - GetChars( tempFileName ) ); + GetChars( tempFileName ) ); FILE_OUTPUTFORMATTER formatter( tempFileName ); @@ -246,9 +265,7 @@ void FP_CACHE::Save() { wxString msg = wxString::Format( _( "Cannot rename temporary file '%s' to footprint library file '%s'" ), - GetChars( tempFileName ), - GetChars( fn.GetFullPath() ) - ); + GetChars( tempFileName ), GetChars( fn.GetFullPath() ) ); THROW_IO_ERROR( msg ); } @@ -257,17 +274,14 @@ void FP_CACHE::Save() } } - void FP_CACHE::Load() { wxDir dir( m_lib_path.GetPath() ); if( !dir.IsOpened() ) { - wxString msg = wxString::Format( - _( "Footprint library path '%s' does not exist" ), - GetChars( m_lib_path.GetPath() ) - ); + wxString msg = wxString::Format( _( "Footprint library path '%s' does not exist" ), + GetChars( m_lib_path.GetPath() ) ); THROW_IO_ERROR( msg ); } @@ -282,12 +296,12 @@ void FP_CACHE::Load() // prepend the libpath into fullPath wxFileName fullPath( m_lib_path.GetPath(), fpFileName ); - FILE_LINE_READER reader( fullPath.GetFullPath() ); + FILE_LINE_READER reader( fullPath.GetFullPath() ); m_owner->m_parser->SetLineReader( &reader ); std::string name = TO_UTF8( fullPath.GetName() ); - MODULE* footprint = (MODULE*) m_owner->m_parser->Parse(); + MODULE* footprint = (MODULE*) m_owner->m_parser->Parse(); // The footprint name is the file name without the extension. footprint->SetFPID( FPID( fullPath.GetName() ) ); @@ -302,7 +316,6 @@ void FP_CACHE::Load() } } - void FP_CACHE::Remove( const wxString& aFootprintName ) { @@ -312,11 +325,8 @@ void FP_CACHE::Remove( const wxString& aFootprintName ) if( it == m_modules.end() ) { - wxString msg = wxString::Format( - _( "library '%s' has no footprint '%s' to delete" ), - GetChars( m_lib_path.GetPath() ), - GetChars( aFootprintName ) - ); + wxString msg = wxString::Format( _( "library '%s' has no footprint '%s' to delete" ), + GetChars( m_lib_path.GetPath() ), GetChars( aFootprintName ) ); THROW_IO_ERROR( msg ); } @@ -326,7 +336,6 @@ void FP_CACHE::Remove( const wxString& aFootprintName ) wxRemoveFile( fullPath ); } - bool FP_CACHE::IsPath( const wxString& aPath ) const { // Converts path separators to native path separators @@ -336,7 +345,6 @@ bool FP_CACHE::IsPath( const wxString& aPath ) const return m_lib_path == newPath; } - bool FP_CACHE::IsModified( const wxString& aLibPath, const wxString& aFootprintName ) const { // The library is modified if the library path got deleted or changed. @@ -347,7 +355,7 @@ bool FP_CACHE::IsModified( const wxString& aLibPath, const wxString& aFootprintN // it was loaded. if( aFootprintName.IsEmpty() ) { - for( MODULE_CITER it = m_modules.begin(); it != m_modules.end(); ++it ) + for( MODULE_CITER it = m_modules.begin(); it != m_modules.end(); ++it ) { wxFileName fn = m_lib_path; @@ -357,21 +365,20 @@ bool FP_CACHE::IsModified( const wxString& aLibPath, const wxString& aFootprintN if( !fn.FileExists() ) { wxLogTrace( traceFootprintLibrary, - wxT( "Footprint cache file '%s' does not exist." ), - fn.GetFullPath().GetData() ); + wxT( "Footprint cache file '%s' does not exist." ), + fn.GetFullPath().GetData() ); return true; } if( it->second->IsModified() ) { wxLogTrace( traceFootprintLibrary, - wxT( "Footprint cache file '%s' has been modified." ), - fn.GetFullPath().GetData() ); + wxT( "Footprint cache file '%s' has been modified." ), + fn.GetFullPath().GetData() ); return true; } } - } - else + } else { MODULE_CITER it = m_modules.find( TO_UTF8( aFootprintName ) ); @@ -382,10 +389,9 @@ bool FP_CACHE::IsModified( const wxString& aLibPath, const wxString& aFootprintN return false; } - void PCB_IO::Save( const wxString& aFileName, BOARD* aBoard, const PROPERTIES* aProperties ) { - LOCALE_IO toggle; // toggles on, then off, the C locale. + LOCALE_IO toggle; // toggles on, then off, the C locale. init( aProperties ); @@ -394,44 +400,41 @@ void PCB_IO::Save( const wxString& aFileName, BOARD* aBoard, const PROPERTIES* a // Prepare net mapping that assures that net codes saved in a file are consecutive integers m_mapping->SetBoard( aBoard ); - FILE_OUTPUTFORMATTER formatter( aFileName ); + FILE_OUTPUTFORMATTER formatter( aFileName ); m_out = &formatter; // no ownership m_out->Print( 0, "(kicad_pcb (version %d) (host pcbnew %s)\n", SEXPR_BOARD_FILE_VERSION, - formatter.Quotew( GetBuildVersion() ).c_str() ); + formatter.Quotew( GetBuildVersion() ).c_str() ); Format( aBoard, 1 ); m_out->Print( 0, ")\n" ); } - BOARD_ITEM* PCB_IO::Parse( const wxString& aClipboardSourceInput ) throw( PARSE_ERROR, IO_ERROR ) { std::string input = TO_UTF8( aClipboardSourceInput ); - STRING_LINE_READER reader( input, wxT( "clipboard" ) ); + STRING_LINE_READER reader( input, wxT( "clipboard" ) ); m_parser->SetLineReader( &reader ); return m_parser->Parse(); } - -void PCB_IO::Format( BOARD_ITEM* aItem, int aNestLevel ) const - throw( IO_ERROR ) +void PCB_IO::Format( BOARD_ITEM* aItem, int aNestLevel ) const throw( IO_ERROR ) { - LOCALE_IO toggle; // public API function, perform anything convenient for caller + LOCALE_IO toggle; // public API function, perform anything convenient for caller - switch( aItem->Type() ) + switch (aItem->Type()) { case PCB_T: format( (BOARD*) aItem, aNestLevel ); break; case PCB_DIMENSION_T: - format( ( DIMENSION*) aItem, aNestLevel ); + format( (DIMENSION*) aItem, aNestLevel ); break; case PCB_LINE_T: @@ -476,7 +479,6 @@ void PCB_IO::Format( BOARD_ITEM* aItem, int aNestLevel ) const } } - void PCB_IO::formatLayer( const BOARD_ITEM* aItem ) const { if( m_ctl & CTL_STD_LAYER_NAMES ) @@ -485,37 +487,34 @@ void PCB_IO::formatLayer( const BOARD_ITEM* aItem ) const // English layer names should never need quoting. m_out->Print( 0, " (layer %s)", TO_UTF8( BOARD::GetStandardLayerName( layer ) ) ); - } - else + } else m_out->Print( 0, " (layer %s)", m_out->Quotew( aItem->GetLayerName() ).c_str() ); } - -void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const - throw( IO_ERROR ) +void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const throw( IO_ERROR ) { const BOARD_DESIGN_SETTINGS& dsnSettings = aBoard->GetDesignSettings(); m_out->Print( 0, "\n" ); m_out->Print( aNestLevel, "(general\n" ); - m_out->Print( aNestLevel+1, "(links %d)\n", aBoard->GetRatsnestsCount() ); - m_out->Print( aNestLevel+1, "(no_connects %d)\n", aBoard->GetUnconnectedNetCount() ); + m_out->Print( aNestLevel + 1, "(links %d)\n", aBoard->GetRatsnestsCount() ); + m_out->Print( aNestLevel + 1, "(no_connects %d)\n", aBoard->GetUnconnectedNetCount() ); // Write Bounding box info - m_out->Print( aNestLevel+1, "(area %s %s %s %s)\n", - FMTIU( aBoard->GetBoundingBox().GetX() ).c_str(), - FMTIU( aBoard->GetBoundingBox().GetY() ).c_str(), - FMTIU( aBoard->GetBoundingBox().GetRight() ).c_str(), - FMTIU( aBoard->GetBoundingBox().GetBottom() ).c_str() ); - m_out->Print( aNestLevel+1, "(thickness %s)\n", - FMTIU( dsnSettings.GetBoardThickness() ).c_str() ); + m_out->Print( aNestLevel + 1, "(area %s %s %s %s)\n", + FMTIU( aBoard->GetBoundingBox().GetX() ).c_str(), + FMTIU( aBoard->GetBoundingBox().GetY() ).c_str(), + FMTIU( aBoard->GetBoundingBox().GetRight() ).c_str(), + FMTIU( aBoard->GetBoundingBox().GetBottom() ).c_str() ); + m_out->Print( aNestLevel + 1, "(thickness %s)\n", + FMTIU( dsnSettings.GetBoardThickness() ).c_str() ); - m_out->Print( aNestLevel+1, "(drawings %d)\n", aBoard->m_Drawings.GetCount() ); - m_out->Print( aNestLevel+1, "(tracks %d)\n", aBoard->GetNumSegmTrack() ); - m_out->Print( aNestLevel+1, "(zones %d)\n", aBoard->GetNumSegmZone() ); - m_out->Print( aNestLevel+1, "(modules %d)\n", aBoard->m_Modules.GetCount() ); - m_out->Print( aNestLevel+1, "(nets %d)\n", (int) m_mapping->GetSize() ); + m_out->Print( aNestLevel + 1, "(drawings %d)\n", aBoard->m_Drawings.GetCount() ); + m_out->Print( aNestLevel + 1, "(tracks %d)\n", aBoard->GetNumSegmTrack() ); + m_out->Print( aNestLevel + 1, "(zones %d)\n", aBoard->GetNumSegmZone() ); + m_out->Print( aNestLevel + 1, "(modules %d)\n", aBoard->m_Modules.GetCount() ); + m_out->Print( aNestLevel + 1, "(nets %d)\n", (int) m_mapping->GetSize() ); m_out->Print( aNestLevel, ")\n\n" ); aBoard->GetPageSettings().Format( m_out, aNestLevel, m_ctl ); @@ -525,16 +524,16 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const m_out->Print( aNestLevel, "(layers\n" ); // Save only the used copper layers from front to back. - for( LAYER_NUM layer = LAST_COPPER_LAYER; layer >= FIRST_COPPER_LAYER; --layer) + for( LAYER_NUM layer = LAST_COPPER_LAYER; layer >= FIRST_COPPER_LAYER; --layer ) { LAYER_MSK mask = GetLayerMask( layer ); if( mask & aBoard->GetEnabledLayers() ) { - m_out->Print( aNestLevel+1, "(%d %s %s", layer, - m_out->Quotew( aBoard->GetLayerName( layer ) ).c_str(), - LAYER::ShowType( aBoard->GetLayerType( layer ) ) ); + m_out->Print( aNestLevel + 1, "(%d %s %s", layer, + m_out->Quotew( aBoard->GetLayerName( layer ) ).c_str(), + LAYER::ShowType( aBoard->GetLayerType( layer ) ) ); - if( !( aBoard->GetVisibleLayers() & mask ) ) + if( ! ( aBoard->GetVisibleLayers() & mask ) ) m_out->Print( 0, " hide" ); m_out->Print( 0, ")\n" ); @@ -542,15 +541,15 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const } // Save used non-copper layers in the order they are defined. - for( LAYER_NUM layer = FIRST_NON_COPPER_LAYER; layer <= LAST_NON_COPPER_LAYER; ++layer) + for( LAYER_NUM layer = FIRST_NON_COPPER_LAYER; layer <= LAST_NON_COPPER_LAYER; ++layer ) { LAYER_MSK mask = GetLayerMask( layer ); if( mask & aBoard->GetEnabledLayers() ) { - m_out->Print( aNestLevel+1, "(%d %s user", layer, - m_out->Quotew( aBoard->GetLayerName( layer ) ).c_str() ); + m_out->Print( aNestLevel + 1, "(%d %s user", layer, + m_out->Quotew( aBoard->GetLayerName( layer ) ).c_str() ); - if( !( aBoard->GetVisibleLayers() & mask ) ) + if( ! ( aBoard->GetVisibleLayers() & mask ) ) m_out->Print( 0, " hide" ); m_out->Print( 0, ")\n" ); @@ -563,111 +562,110 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const m_out->Print( aNestLevel, "(setup\n" ); // Save current default track width, for compatibility with older Pcbnew version; - m_out->Print( aNestLevel+1, "(last_trace_width %s)\n", - FMTIU( dsnSettings.GetCurrentTrackWidth() ).c_str() ); + m_out->Print( aNestLevel + 1, "(last_trace_width %s)\n", + FMTIU( dsnSettings.GetCurrentTrackWidth() ).c_str() ); // Save custom tracks width list (the first is not saved here: this is the netclass value for( unsigned ii = 1; ii < dsnSettings.m_TrackWidthList.size(); ii++ ) - m_out->Print( aNestLevel+1, "(user_trace_width %s)\n", - FMTIU( dsnSettings.m_TrackWidthList[ii] ).c_str() ); + m_out->Print( aNestLevel + 1, "(user_trace_width %s)\n", + FMTIU( dsnSettings.m_TrackWidthList[ii] ).c_str() ); - m_out->Print( aNestLevel+1, "(trace_clearance %s)\n", - FMTIU( dsnSettings.GetDefault()->GetClearance() ).c_str() ); + m_out->Print( aNestLevel + 1, "(trace_clearance %s)\n", + FMTIU( dsnSettings.GetDefault()->GetClearance() ).c_str() ); // ZONE_SETTINGS - m_out->Print( aNestLevel+1, "(zone_clearance %s)\n", - FMTIU( aBoard->GetZoneSettings().m_ZoneClearance ).c_str() ); - m_out->Print( aNestLevel+1, "(zone_45_only %s)\n", - aBoard->GetZoneSettings().m_Zone_45_Only ? "yes" : "no" ); + m_out->Print( aNestLevel + 1, "(zone_clearance %s)\n", + FMTIU( aBoard->GetZoneSettings().m_ZoneClearance ).c_str() ); + m_out->Print( aNestLevel + 1, "(zone_45_only %s)\n", + aBoard->GetZoneSettings().m_Zone_45_Only ? "yes" : "no" ); - m_out->Print( aNestLevel+1, "(trace_min %s)\n", - FMTIU( dsnSettings.m_TrackMinWidth ).c_str() ); + m_out->Print( aNestLevel + 1, "(trace_min %s)\n", + FMTIU( dsnSettings.m_TrackMinWidth ).c_str() ); - m_out->Print( aNestLevel+1, "(segment_width %s)\n", - FMTIU( dsnSettings.m_DrawSegmentWidth ).c_str() ); - m_out->Print( aNestLevel+1, "(edge_width %s)\n", - FMTIU( dsnSettings.m_EdgeSegmentWidth ).c_str() ); + m_out->Print( aNestLevel + 1, "(segment_width %s)\n", + FMTIU( dsnSettings.m_DrawSegmentWidth ).c_str() ); + m_out->Print( aNestLevel + 1, "(edge_width %s)\n", + FMTIU( dsnSettings.m_EdgeSegmentWidth ).c_str() ); // Save current default via size, for compatibility with older Pcbnew version; - m_out->Print( aNestLevel+1, "(via_size %s)\n", - FMTIU( dsnSettings.GetDefault()->GetViaDiameter() ).c_str() ); - m_out->Print( aNestLevel+1, "(via_drill %s)\n", - FMTIU( dsnSettings.GetDefault()->GetViaDrill() ).c_str() ); - m_out->Print( aNestLevel+1, "(via_min_size %s)\n", - FMTIU( dsnSettings.m_ViasMinSize ).c_str() ); - m_out->Print( aNestLevel+1, "(via_min_drill %s)\n", - FMTIU( dsnSettings.m_ViasMinDrill ).c_str() ); + m_out->Print( aNestLevel + 1, "(via_size %s)\n", + FMTIU( dsnSettings.GetDefault()->GetViaDiameter() ).c_str() ); + m_out->Print( aNestLevel + 1, "(via_drill %s)\n", + FMTIU( dsnSettings.GetDefault()->GetViaDrill() ).c_str() ); + m_out->Print( aNestLevel + 1, "(via_min_size %s)\n", + FMTIU( dsnSettings.m_ViasMinSize ).c_str() ); + m_out->Print( aNestLevel + 1, "(via_min_drill %s)\n", + FMTIU( dsnSettings.m_ViasMinDrill ).c_str() ); // Save custom vias diameters list (the first is not saved here: this is // the netclass value for( unsigned ii = 1; ii < dsnSettings.m_ViasDimensionsList.size(); ii++ ) - m_out->Print( aNestLevel+1, "(user_via %s %s)\n", - FMTIU( dsnSettings.m_ViasDimensionsList[ii].m_Diameter ).c_str(), - FMTIU( dsnSettings.m_ViasDimensionsList[ii].m_Drill ).c_str() ); + m_out->Print( aNestLevel + 1, "(user_via %s %s)\n", + FMTIU( dsnSettings.m_ViasDimensionsList[ii].m_Diameter ).c_str(), + FMTIU( dsnSettings.m_ViasDimensionsList[ii].m_Drill ).c_str() ); - // for old versions compatibility: + // for old versions compatibility: if( dsnSettings.m_BlindBuriedViaAllowed ) - m_out->Print( aNestLevel+1, "(blind_buried_vias_allowed yes)\n" ); + m_out->Print( aNestLevel + 1, "(blind_buried_vias_allowed yes)\n" ); - m_out->Print( aNestLevel+1, "(uvia_size %s)\n", - FMTIU( dsnSettings.GetDefault()->GetuViaDiameter() ).c_str() ); - m_out->Print( aNestLevel+1, "(uvia_drill %s)\n", - FMTIU( dsnSettings.GetDefault()->GetuViaDrill() ).c_str() ); - m_out->Print( aNestLevel+1, "(uvias_allowed %s)\n", - ( dsnSettings.m_MicroViasAllowed ) ? "yes" : "no" ); - m_out->Print( aNestLevel+1, "(uvia_min_size %s)\n", - FMTIU( dsnSettings.m_MicroViasMinSize ).c_str() ); - m_out->Print( aNestLevel+1, "(uvia_min_drill %s)\n", - FMTIU( dsnSettings.m_MicroViasMinDrill ).c_str() ); + m_out->Print( aNestLevel + 1, "(uvia_size %s)\n", + FMTIU( dsnSettings.GetDefault()->GetuViaDiameter() ).c_str() ); + m_out->Print( aNestLevel + 1, "(uvia_drill %s)\n", + FMTIU( dsnSettings.GetDefault()->GetuViaDrill() ).c_str() ); + m_out->Print( aNestLevel + 1, "(uvias_allowed %s)\n", + ( dsnSettings.m_MicroViasAllowed ) ? "yes" : "no" ); + m_out->Print( aNestLevel + 1, "(uvia_min_size %s)\n", + FMTIU( dsnSettings.m_MicroViasMinSize ).c_str() ); + m_out->Print( aNestLevel + 1, "(uvia_min_drill %s)\n", + FMTIU( dsnSettings.m_MicroViasMinDrill ).c_str() ); - m_out->Print( aNestLevel+1, "(pcb_text_width %s)\n", - FMTIU( dsnSettings.m_PcbTextWidth ).c_str() ); - m_out->Print( aNestLevel+1, "(pcb_text_size %s %s)\n", - FMTIU( dsnSettings.m_PcbTextSize.x ).c_str(), - FMTIU( dsnSettings.m_PcbTextSize.y ).c_str() ); + m_out->Print( aNestLevel + 1, "(pcb_text_width %s)\n", + FMTIU( dsnSettings.m_PcbTextWidth ).c_str() ); + m_out->Print( aNestLevel + 1, "(pcb_text_size %s %s)\n", + FMTIU( dsnSettings.m_PcbTextSize.x ).c_str(), + FMTIU( dsnSettings.m_PcbTextSize.y ).c_str() ); - m_out->Print( aNestLevel+1, "(mod_edge_width %s)\n", - FMTIU( dsnSettings.m_ModuleSegmentWidth ).c_str() ); - m_out->Print( aNestLevel+1, "(mod_text_size %s %s)\n", - FMTIU( dsnSettings.m_ModuleTextSize.x ).c_str(), - FMTIU( dsnSettings.m_ModuleTextSize.y ).c_str() ); - m_out->Print( aNestLevel+1, "(mod_text_width %s)\n", - FMTIU( dsnSettings.m_ModuleTextWidth ).c_str() ); + m_out->Print( aNestLevel + 1, "(mod_edge_width %s)\n", + FMTIU( dsnSettings.m_ModuleSegmentWidth ).c_str() ); + m_out->Print( aNestLevel + 1, "(mod_text_size %s %s)\n", + FMTIU( dsnSettings.m_ModuleTextSize.x ).c_str(), + FMTIU( dsnSettings.m_ModuleTextSize.y ).c_str() ); + m_out->Print( aNestLevel + 1, "(mod_text_width %s)\n", + FMTIU( dsnSettings.m_ModuleTextWidth ).c_str() ); - m_out->Print( aNestLevel+1, "(pad_size %s %s)\n", - FMTIU( dsnSettings.m_Pad_Master.GetSize().x ).c_str(), - FMTIU( dsnSettings.m_Pad_Master.GetSize().y ).c_str() ); - m_out->Print( aNestLevel+1, "(pad_drill %s)\n", - FMTIU( dsnSettings.m_Pad_Master.GetDrillSize().x ).c_str() ); + m_out->Print( aNestLevel + 1, "(pad_size %s %s)\n", + FMTIU( dsnSettings.m_Pad_Master.GetSize().x ).c_str(), + FMTIU( dsnSettings.m_Pad_Master.GetSize().y ).c_str() ); + m_out->Print( aNestLevel + 1, "(pad_drill %s)\n", + FMTIU( dsnSettings.m_Pad_Master.GetDrillSize().x ).c_str() ); - m_out->Print( aNestLevel+1, "(pad_to_mask_clearance %s)\n", - FMTIU( dsnSettings.m_SolderMaskMargin ).c_str() ); + m_out->Print( aNestLevel + 1, "(pad_to_mask_clearance %s)\n", + FMTIU( dsnSettings.m_SolderMaskMargin ).c_str() ); if( dsnSettings.m_SolderMaskMinWidth ) - m_out->Print( aNestLevel+1, "(solder_mask_min_width %s)\n", - FMTIU( dsnSettings.m_SolderMaskMinWidth ).c_str() ); + m_out->Print( aNestLevel + 1, "(solder_mask_min_width %s)\n", + FMTIU( dsnSettings.m_SolderMaskMinWidth ).c_str() ); if( dsnSettings.m_SolderPasteMargin != 0 ) - m_out->Print( aNestLevel+1, "(pad_to_paste_clearance %s)\n", - FMTIU( dsnSettings.m_SolderPasteMargin ).c_str() ); + m_out->Print( aNestLevel + 1, "(pad_to_paste_clearance %s)\n", + FMTIU( dsnSettings.m_SolderPasteMargin ).c_str() ); if( dsnSettings.m_SolderPasteMarginRatio != 0 ) - m_out->Print( aNestLevel+1, "(pad_to_paste_clearance_ratio %s)\n", - Double2Str( dsnSettings.m_SolderPasteMarginRatio ).c_str() ); + m_out->Print( aNestLevel + 1, "(pad_to_paste_clearance_ratio %s)\n", + Double2Str( dsnSettings.m_SolderPasteMarginRatio ).c_str() ); - m_out->Print( aNestLevel+1, "(aux_axis_origin %s %s)\n", - FMTIU( aBoard->GetAuxOrigin().x ).c_str(), - FMTIU( aBoard->GetAuxOrigin().y ).c_str() ); + m_out->Print( aNestLevel + 1, "(aux_axis_origin %s %s)\n", + FMTIU( aBoard->GetAuxOrigin().x ).c_str(), + FMTIU( aBoard->GetAuxOrigin().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, "(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", - dsnSettings.GetVisibleElements() ); + m_out->Print( aNestLevel + 1, "(visible_elements %X)\n", dsnSettings.GetVisibleElements() ); - aBoard->GetPlotOptions().Format( m_out, aNestLevel+1 ); + aBoard->GetPlotOptions().Format( m_out, aNestLevel + 1 ); m_out->Print( aNestLevel, ")\n\n" ); @@ -675,9 +673,8 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const for( NETINFO_MAPPING::iterator net = m_mapping->begin(), netEnd = m_mapping->end(); net != netEnd; ++net ) { - m_out->Print( aNestLevel, "(net %d %s)\n", - m_mapping->Translate( net->GetNet() ), - m_out->Quotew( net->GetNetname() ).c_str() ); + m_out->Print( aNestLevel, "(net %d %s)\n", m_mapping->Translate( net->GetNet() ), + m_out->Quotew( net->GetNetname() ).c_str() ); } m_out->Print( 0, "\n" ); @@ -689,8 +686,7 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const // Save the rest of the net classes alphabetically. for( NETCLASSES::const_iterator it = dsnSettings.m_NetClasses.begin(); - it != dsnSettings.m_NetClasses.end(); - ++it ) + it != dsnSettings.m_NetClasses.end(); ++it ) { NETCLASS netclass = *it->second; filterNetClass( *aBoard, netclass ); // Remove empty nets (from a copy of a netclass) @@ -698,14 +694,14 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const } // Save the modules. - for( MODULE* module = aBoard->m_Modules; module; module = (MODULE*) module->Next() ) + for( MODULE* module = aBoard->m_Modules; module; module = (MODULE*) module->Next() ) { Format( module, aNestLevel ); m_out->Print( 0, "\n" ); } // Save the graphical items on the board (not owned by a module) - for( BOARD_ITEM* item = aBoard->m_Drawings; item; item = item->Next() ) + for( BOARD_ITEM* item = aBoard->m_Drawings; item; item = item->Next() ) Format( item, aNestLevel ); if( aBoard->m_Drawings.GetCount() ) @@ -714,7 +710,7 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const // Do not save MARKER_PCBs, they can be regenerated easily. // Save the tracks and vias. - for( TRACK* track = aBoard->m_Track; track; track = track->Next() ) + for( TRACK* track = aBoard->m_Track; track; track = track->Next() ) Format( track, aNestLevel ); if( aBoard->m_Track.GetCount() ) @@ -724,121 +720,117 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const /// will not be saved. // Save the polygon (which are the newer technology) zones. - for( int i = 0; i < aBoard->GetAreaCount(); ++i ) + for( int i = 0; i < aBoard->GetAreaCount(); ++i ) Format( aBoard->GetArea( i ), aNestLevel ); } - -void PCB_IO::format( DIMENSION* aDimension, int aNestLevel ) const - throw( IO_ERROR ) +void PCB_IO::format( DIMENSION* aDimension, int aNestLevel ) const throw( IO_ERROR ) { m_out->Print( aNestLevel, "(dimension %s (width %s)", - FMT_IU( aDimension->GetValue() ).c_str(), - FMT_IU( aDimension->GetWidth() ).c_str() ); + FMT_IU( aDimension->GetValue() ).c_str(), + FMT_IU( aDimension->GetWidth() ).c_str() ); formatLayer( aDimension ); if( aDimension->GetTimeStamp() ) - m_out->Print( 0, " (tstamp %lX)", aDimension->GetTimeStamp() ); + m_out->Print( 0, " (tstamp %lX)", aDimension->GetTimeStamp() ); m_out->Print( 0, "\n" ); Format( (TEXTE_PCB*) &aDimension->Text(), aNestLevel+1 ); m_out->Print( aNestLevel+1, "(feature1 (pts (xy %s %s) (xy %s %s)))\n", - FMT_IU( aDimension->m_featureLineDO.x ).c_str(), - FMT_IU( aDimension->m_featureLineDO.y ).c_str(), - FMT_IU( aDimension->m_featureLineDF.x ).c_str(), - FMT_IU( aDimension->m_featureLineDF.y ).c_str() ); + FMT_IU( aDimension->m_featureLineDO.x ).c_str(), + FMT_IU( aDimension->m_featureLineDO.y ).c_str(), + FMT_IU( aDimension->m_featureLineDF.x ).c_str(), + FMT_IU( aDimension->m_featureLineDF.y ).c_str() ); m_out->Print( aNestLevel+1, "(feature2 (pts (xy %s %s) (xy %s %s)))\n", - FMT_IU( aDimension->m_featureLineGO.x ).c_str(), - FMT_IU( aDimension->m_featureLineGO.y ).c_str(), - FMT_IU( aDimension->m_featureLineGF.x ).c_str(), - FMT_IU( aDimension->m_featureLineGF.y ).c_str() ); + FMT_IU( aDimension->m_featureLineGO.x ).c_str(), + FMT_IU( aDimension->m_featureLineGO.y ).c_str(), + FMT_IU( aDimension->m_featureLineGF.x ).c_str(), + FMT_IU( aDimension->m_featureLineGF.y ).c_str() ); m_out->Print( aNestLevel+1, "(crossbar (pts (xy %s %s) (xy %s %s)))\n", - FMT_IU( aDimension->m_crossBarO.x ).c_str(), - FMT_IU( aDimension->m_crossBarO.y ).c_str(), - FMT_IU( aDimension->m_crossBarF.x ).c_str(), - FMT_IU( aDimension->m_crossBarF.y ).c_str() ); + FMT_IU( aDimension->m_crossBarO.x ).c_str(), + FMT_IU( aDimension->m_crossBarO.y ).c_str(), + FMT_IU( aDimension->m_crossBarF.x ).c_str(), + FMT_IU( aDimension->m_crossBarF.y ).c_str() ); m_out->Print( aNestLevel+1, "(arrow1a (pts (xy %s %s) (xy %s %s)))\n", - FMT_IU( aDimension->m_crossBarF.x ).c_str(), - FMT_IU( aDimension->m_crossBarF.y ).c_str(), - FMT_IU( aDimension->m_arrowD1F.x ).c_str(), - FMT_IU( aDimension->m_arrowD1F.y ).c_str() ); + FMT_IU( aDimension->m_crossBarF.x ).c_str(), + FMT_IU( aDimension->m_crossBarF.y ).c_str(), + FMT_IU( aDimension->m_arrowD1F.x ).c_str(), + FMT_IU( aDimension->m_arrowD1F.y ).c_str() ); m_out->Print( aNestLevel+1, "(arrow1b (pts (xy %s %s) (xy %s %s)))\n", - FMT_IU( aDimension->m_crossBarF.x ).c_str(), - FMT_IU( aDimension->m_crossBarF.y ).c_str(), - FMT_IU( aDimension->m_arrowD2F.x ).c_str(), - FMT_IU( aDimension->m_arrowD2F.y ).c_str() ); + FMT_IU( aDimension->m_crossBarF.x ).c_str(), + FMT_IU( aDimension->m_crossBarF.y ).c_str(), + FMT_IU( aDimension->m_arrowD2F.x ).c_str(), + FMT_IU( aDimension->m_arrowD2F.y ).c_str() ); m_out->Print( aNestLevel+1, "(arrow2a (pts (xy %s %s) (xy %s %s)))\n", - FMT_IU( aDimension->m_crossBarO.x ).c_str(), - FMT_IU( aDimension->m_crossBarO.y ).c_str(), - FMT_IU( aDimension->m_arrowG1F.x ).c_str(), - FMT_IU( aDimension->m_arrowG1F.y ).c_str() ); + FMT_IU( aDimension->m_crossBarO.x ).c_str(), + FMT_IU( aDimension->m_crossBarO.y ).c_str(), + FMT_IU( aDimension->m_arrowG1F.x ).c_str(), + FMT_IU( aDimension->m_arrowG1F.y ).c_str() ); m_out->Print( aNestLevel+1, "(arrow2b (pts (xy %s %s) (xy %s %s)))\n", - FMT_IU( aDimension->m_crossBarO.x ).c_str(), - FMT_IU( aDimension->m_crossBarO.y ).c_str(), - FMT_IU( aDimension->m_arrowG2F.x ).c_str(), - FMT_IU( aDimension->m_arrowG2F.y ).c_str() ); + FMT_IU( aDimension->m_crossBarO.x ).c_str(), + FMT_IU( aDimension->m_crossBarO.y ).c_str(), + FMT_IU( aDimension->m_arrowG2F.x ).c_str(), + FMT_IU( aDimension->m_arrowG2F.y ).c_str() ); m_out->Print( aNestLevel, ")\n" ); } - -void PCB_IO::format( DRAWSEGMENT* aSegment, int aNestLevel ) const - throw( IO_ERROR ) +void PCB_IO::format( DRAWSEGMENT* aSegment, int aNestLevel ) const throw( IO_ERROR ) { unsigned i; - switch( aSegment->GetShape() ) + switch (aSegment->GetShape()) { case S_SEGMENT: // Line m_out->Print( aNestLevel, "(gr_line (start %s) (end %s)", - FMT_IU( aSegment->GetStart() ).c_str(), - FMT_IU( aSegment->GetEnd() ).c_str() ); + FMT_IU( aSegment->GetStart() ).c_str(), + FMT_IU( aSegment->GetEnd() ).c_str() ); if( aSegment->GetAngle() != 0.0 ) - m_out->Print( 0, " (angle %s)", FMT_ANGLE( aSegment->GetAngle() ).c_str() ); + m_out->Print( 0, " (angle %s)", FMT_ANGLE( aSegment->GetAngle() ).c_str() ); break; - case S_CIRCLE: // Circle + case S_CIRCLE: // Circle m_out->Print( aNestLevel, "(gr_circle (center %s) (end %s)", - FMT_IU( aSegment->GetStart() ).c_str(), - FMT_IU( aSegment->GetEnd() ).c_str() ); + FMT_IU( aSegment->GetStart() ).c_str(), + FMT_IU( aSegment->GetEnd() ).c_str() ); break; - case S_ARC: // Arc + case S_ARC:// Arc m_out->Print( aNestLevel, "(gr_arc (start %s) (end %s) (angle %s)", - FMT_IU( aSegment->GetStart() ).c_str(), - FMT_IU( aSegment->GetEnd() ).c_str(), - FMT_ANGLE( aSegment->GetAngle() ).c_str() ); + FMT_IU( aSegment->GetStart() ).c_str(), + FMT_IU( aSegment->GetEnd() ).c_str(), + FMT_ANGLE( aSegment->GetAngle() ).c_str() ); break; - case S_POLYGON: // Polygon + case S_POLYGON:// Polygon m_out->Print( aNestLevel, "(gr_poly (pts" ); - for( i = 0; i < aSegment->GetPolyPoints().size(); ++i ) - m_out->Print( 0, " (xy %s)", FMT_IU( aSegment->GetPolyPoints()[i] ).c_str() ); + for( i = 0; i < aSegment->GetPolyPoints().size(); ++i ) + m_out->Print( 0, " (xy %s)", FMT_IU( aSegment->GetPolyPoints()[i] ).c_str() ); m_out->Print( 0, ")" ); break; - case S_CURVE: // Bezier curve + case S_CURVE:// Bezier curve m_out->Print( aNestLevel, "(gr_curve (pts (xy %s) (xy %s) (xy %s) (xy %s))", - FMT_IU( aSegment->GetStart() ).c_str(), - FMT_IU( aSegment->GetBezControl1() ).c_str(), - FMT_IU( aSegment->GetBezControl2() ).c_str(), - FMT_IU( aSegment->GetEnd() ).c_str() ); + FMT_IU( aSegment->GetStart() ).c_str(), + FMT_IU( aSegment->GetBezControl1() ).c_str(), + FMT_IU( aSegment->GetBezControl2() ).c_str(), + FMT_IU( aSegment->GetEnd() ).c_str() ); break; - default: + default: wxFAIL_MSG( wxT( "Cannot format invalid DRAWSEGMENT type." ) ); }; @@ -856,35 +848,33 @@ void PCB_IO::format( DRAWSEGMENT* aSegment, int aNestLevel ) const m_out->Print( 0, ")\n" ); } - -void PCB_IO::format( EDGE_MODULE* aModuleDrawing, int aNestLevel ) const - throw( IO_ERROR ) +void PCB_IO::format( EDGE_MODULE* aModuleDrawing, int aNestLevel ) const throw( IO_ERROR ) { - switch( aModuleDrawing->GetShape() ) + switch (aModuleDrawing->GetShape()) { case S_SEGMENT: // Line m_out->Print( aNestLevel, "(fp_line (start %s) (end %s)", - FMT_IU( aModuleDrawing->GetStart0() ).c_str(), - FMT_IU( aModuleDrawing->GetEnd0() ).c_str() ); + FMT_IU( aModuleDrawing->GetStart0() ).c_str(), + FMT_IU( aModuleDrawing->GetEnd0() ).c_str() ); break; - case S_CIRCLE: // Circle + case S_CIRCLE: // Circle m_out->Print( aNestLevel, "(fp_circle (center %s) (end %s)", - FMT_IU( aModuleDrawing->GetStart0() ).c_str(), - FMT_IU( aModuleDrawing->GetEnd0() ).c_str() ); + FMT_IU( aModuleDrawing->GetStart0() ).c_str(), + FMT_IU( aModuleDrawing->GetEnd0() ).c_str() ); break; - case S_ARC: // Arc + case S_ARC:// Arc m_out->Print( aNestLevel, "(fp_arc (start %s) (end %s) (angle %s)", - FMT_IU( aModuleDrawing->GetStart0() ).c_str(), - FMT_IU( aModuleDrawing->GetEnd0() ).c_str(), - FMT_ANGLE( aModuleDrawing->GetAngle() ).c_str() ); + FMT_IU( aModuleDrawing->GetStart0() ).c_str(), + FMT_IU( aModuleDrawing->GetEnd0() ).c_str(), + FMT_ANGLE( aModuleDrawing->GetAngle() ).c_str() ); break; - case S_POLYGON: // Polygon + case S_POLYGON:// Polygon m_out->Print( aNestLevel, "(fp_poly (pts" ); - for( unsigned i = 0; i < aModuleDrawing->GetPolyPoints().size(); ++i ) + for( unsigned i = 0; i < aModuleDrawing->GetPolyPoints().size(); ++i ) { int nestLevel = 0; @@ -895,80 +885,75 @@ void PCB_IO::format( EDGE_MODULE* aModuleDrawing, int aNestLevel ) const } m_out->Print( nestLevel, "%s(xy %s)", - nestLevel ? "" : " ", - FMT_IU( aModuleDrawing->GetPolyPoints()[i] ).c_str() ); + nestLevel ? "" : " ", + FMT_IU( aModuleDrawing->GetPolyPoints()[i] ).c_str() ); } m_out->Print( 0, ")" ); break; - case S_CURVE: // Bezier curve + case S_CURVE: // Bezier curve m_out->Print( aNestLevel, "(fp_curve (pts (xy %s) (xy %s) (xy %s) (xy %s))", - FMT_IU( aModuleDrawing->GetStart0() ).c_str(), - FMT_IU( aModuleDrawing->GetBezControl1() ).c_str(), - FMT_IU( aModuleDrawing->GetBezControl2() ).c_str(), - FMT_IU( aModuleDrawing->GetEnd0() ).c_str() ); + FMT_IU( aModuleDrawing->GetStart0() ).c_str(), + FMT_IU( aModuleDrawing->GetBezControl1() ).c_str(), + FMT_IU( aModuleDrawing->GetBezControl2() ).c_str(), + FMT_IU( aModuleDrawing->GetEnd0() ).c_str() ); break; - default: + default: wxFAIL_MSG( wxT( "Cannot format invalid DRAWSEGMENT type." ) ); }; formatLayer( aModuleDrawing ); if( aModuleDrawing->GetWidth() != 0 ) - m_out->Print( 0, " (width %s)", FMT_IU( aModuleDrawing->GetWidth() ).c_str() ); + m_out->Print( 0, " (width %s)", FMT_IU( aModuleDrawing->GetWidth() ).c_str() ); /* 11-Nov-2021 remove if no one whines after a couple of months. Simple graphic items - perhaps do not need these. - if( aModuleDrawing->GetTimeStamp() ) - m_out->Print( 0, " (tstamp %lX)", aModuleDrawing->GetTimeStamp() ); + perhaps do not need these. + if( aModuleDrawing->GetTimeStamp() ) + m_out->Print( 0, " (tstamp %lX)", aModuleDrawing->GetTimeStamp() ); - if( aModuleDrawing->GetStatus() ) - m_out->Print( 0, " (status %X)", aModuleDrawing->GetStatus() ); - */ + if( aModuleDrawing->GetStatus() ) + m_out->Print( 0, " (status %X)", aModuleDrawing->GetStatus() ); + */ m_out->Print( 0, ")\n" ); } - -void PCB_IO::format( PCB_TARGET* aTarget, int aNestLevel ) const - throw( IO_ERROR ) +void PCB_IO::format( PCB_TARGET* aTarget, int aNestLevel ) const throw( IO_ERROR ) { m_out->Print( aNestLevel, "(target %s (at %s) (size %s)", - ( aTarget->GetShape() ) ? "x" : "plus", - FMT_IU( aTarget->GetPosition() ).c_str(), - FMT_IU( aTarget->GetSize() ).c_str() ); + ( aTarget->GetShape() ) ? "x" : "plus", + FMT_IU( aTarget->GetPosition() ).c_str(), + FMT_IU( aTarget->GetSize() ).c_str() ); if( aTarget->GetWidth() != 0 ) - m_out->Print( 0, " (width %s)", FMT_IU( aTarget->GetWidth() ).c_str() ); + m_out->Print( 0, " (width %s)", FMT_IU( aTarget->GetWidth() ).c_str() ); formatLayer( aTarget ); if( aTarget->GetTimeStamp() ) - m_out->Print( 0, " (tstamp %lX)", aTarget->GetTimeStamp() ); + m_out->Print( 0, " (tstamp %lX)", aTarget->GetTimeStamp() ); m_out->Print( 0, ")\n" ); } - -void PCB_IO::format( MODULE* aModule, int aNestLevel ) const - throw( IO_ERROR ) +void PCB_IO::format( MODULE* aModule, int aNestLevel ) const throw( IO_ERROR ) { - if( !( m_ctl & CTL_OMIT_INITIAL_COMMENTS ) ) + if( ! ( m_ctl & CTL_OMIT_INITIAL_COMMENTS ) ) { const wxArrayString* initial_comments = aModule->GetInitialComments(); if( initial_comments ) { - for( unsigned i=0; iGetCount(); ++i ) - m_out->Print( aNestLevel, "%s\n", TO_UTF8( (*initial_comments)[i] ) ); + for( unsigned i = 0; i < initial_comments->GetCount(); ++i ) + m_out->Print( aNestLevel, "%s\n", TO_UTF8( ( *initial_comments )[i] ) ); m_out->Print( 0, "\n" ); // improve readability? } } - m_out->Print( aNestLevel, "(module %s", - m_out->Quotes( aModule->GetFPID().Format() ).c_str() ); + m_out->Print( aNestLevel, "(module %s", m_out->Quotes( aModule->GetFPID().Format() ).c_str() ); if( aModule->IsLocked() ) m_out->Print( 0, " locked" ); @@ -978,73 +963,71 @@ void PCB_IO::format( MODULE* aModule, int aNestLevel ) const formatLayer( aModule ); - if( !( m_ctl & CTL_OMIT_TSTAMPS ) ) + if( ! ( m_ctl & CTL_OMIT_TSTAMPS ) ) { - m_out->Print( 0, " (tedit %lX) (tstamp %lX)\n", - aModule->GetLastEditTime(), aModule->GetTimeStamp() ); - } - else + m_out->Print( 0, " (tedit %lX) (tstamp %lX)\n", aModule->GetLastEditTime(), + aModule->GetTimeStamp() ); + } else m_out->Print( 0, "\n" ); - if( !( m_ctl & CTL_OMIT_AT ) ) + if( ! ( m_ctl & CTL_OMIT_AT ) ) { - m_out->Print( aNestLevel+1, "(at %s", FMT_IU( aModule->GetPosition() ).c_str() ); + m_out->Print( aNestLevel + 1, "(at %s", FMT_IU( aModule->GetPosition() ).c_str() ); if( aModule->GetOrientation() != 0.0 ) - m_out->Print( 0, " %s", FMT_ANGLE( aModule->GetOrientation() ).c_str() ); + m_out->Print( 0, " %s", FMT_ANGLE( aModule->GetOrientation() ).c_str() ); m_out->Print( 0, ")\n" ); } if( !aModule->GetDescription().IsEmpty() ) - m_out->Print( aNestLevel+1, "(descr %s)\n", - m_out->Quotew( aModule->GetDescription() ).c_str() ); + m_out->Print( aNestLevel + 1, "(descr %s)\n", + m_out->Quotew( aModule->GetDescription() ).c_str() ); if( !aModule->GetKeywords().IsEmpty() ) - m_out->Print( aNestLevel+1, "(tags %s)\n", - m_out->Quotew( aModule->GetKeywords() ).c_str() ); + m_out->Print( aNestLevel + 1, "(tags %s)\n", + m_out->Quotew( aModule->GetKeywords() ).c_str() ); - if( !( m_ctl & CTL_OMIT_PATH ) && !!aModule->GetPath() ) - m_out->Print( aNestLevel+1, "(path %s)\n", - m_out->Quotew( aModule->GetPath() ).c_str() ); + if( ! ( m_ctl & CTL_OMIT_PATH ) && !!aModule->GetPath() ) + m_out->Print( aNestLevel + 1, "(path %s)\n", m_out->Quotew( aModule->GetPath() ).c_str() ); if( aModule->GetPlacementCost90() != 0 ) - m_out->Print( aNestLevel+1, "(autoplace_cost90 %d)\n", aModule->GetPlacementCost90() ); + m_out->Print( aNestLevel + 1, "(autoplace_cost90 %d)\n", aModule->GetPlacementCost90() ); if( aModule->GetPlacementCost180() != 0 ) - m_out->Print( aNestLevel+1, "(autoplace_cost180 %d)\n", aModule->GetPlacementCost180() ); + m_out->Print( aNestLevel + 1, "(autoplace_cost180 %d)\n", aModule->GetPlacementCost180() ); if( aModule->GetLocalSolderMaskMargin() != 0 ) - m_out->Print( aNestLevel+1, "(solder_mask_margin %s)\n", - FMT_IU( aModule->GetLocalSolderMaskMargin() ).c_str() ); + m_out->Print( aNestLevel + 1, "(solder_mask_margin %s)\n", + FMT_IU( aModule->GetLocalSolderMaskMargin() ).c_str() ); if( aModule->GetLocalSolderPasteMargin() != 0 ) - m_out->Print( aNestLevel+1, "(solder_paste_margin %s)\n", - FMT_IU( aModule->GetLocalSolderPasteMargin() ).c_str() ); + m_out->Print( aNestLevel + 1, "(solder_paste_margin %s)\n", + FMT_IU( aModule->GetLocalSolderPasteMargin() ).c_str() ); if( aModule->GetLocalSolderPasteMarginRatio() != 0 ) - m_out->Print( aNestLevel+1, "(solder_paste_ratio %s)\n", - Double2Str( aModule->GetLocalSolderPasteMarginRatio() ).c_str() ); + m_out->Print( aNestLevel + 1, "(solder_paste_ratio %s)\n", + Double2Str( aModule->GetLocalSolderPasteMarginRatio() ).c_str() ); if( aModule->GetLocalClearance() != 0 ) - m_out->Print( aNestLevel+1, "(clearance %s)\n", - FMT_IU( aModule->GetLocalClearance() ).c_str() ); + m_out->Print( aNestLevel + 1, "(clearance %s)\n", + FMT_IU( aModule->GetLocalClearance() ).c_str() ); if( aModule->GetZoneConnection() != UNDEFINED_CONNECTION ) - m_out->Print( aNestLevel+1, "(zone_connect %d)\n", aModule->GetZoneConnection() ); + m_out->Print( aNestLevel + 1, "(zone_connect %d)\n", aModule->GetZoneConnection() ); if( aModule->GetThermalWidth() != 0 ) - m_out->Print( aNestLevel+1, "(thermal_width %s)\n", - FMT_IU( aModule->GetThermalWidth() ).c_str() ); + m_out->Print( aNestLevel + 1, "(thermal_width %s)\n", + FMT_IU( aModule->GetThermalWidth() ).c_str() ); if( aModule->GetThermalGap() != 0 ) - m_out->Print( aNestLevel+1, "(thermal_gap %s)\n", - FMT_IU( aModule->GetThermalGap() ).c_str() ); + m_out->Print( aNestLevel + 1, "(thermal_gap %s)\n", + FMT_IU( aModule->GetThermalGap() ).c_str() ); - // Attributes + // Attributes if( aModule->GetAttributes() != MOD_DEFAULT ) { - m_out->Print( aNestLevel+1, "(attr" ); + m_out->Print( aNestLevel + 1, "(attr" ); if( aModule->GetAttributes() & MOD_CMS ) m_out->Print( 0, " smd" ); @@ -1055,52 +1038,50 @@ void PCB_IO::format( MODULE* aModule, int aNestLevel ) const m_out->Print( 0, ")\n" ); } - Format( (BOARD_ITEM*) &aModule->Reference(), aNestLevel+1 ); - Format( (BOARD_ITEM*) &aModule->Value(), aNestLevel+1 ); + Format( (BOARD_ITEM*) &aModule->Reference(), aNestLevel + 1 ); + Format( (BOARD_ITEM*) &aModule->Value(), aNestLevel + 1 ); // Save drawing elements. - for( BOARD_ITEM* gr = aModule->GraphicalItems(); gr; gr = gr->Next() ) - Format( gr, aNestLevel+1 ); + for( BOARD_ITEM* gr = aModule->GraphicalItems(); gr; gr = gr->Next() ) + Format( gr, aNestLevel + 1 ); // Save pads. - for( D_PAD* pad = aModule->Pads(); pad; pad = pad->Next() ) - format( pad, aNestLevel+1 ); + for( D_PAD* pad = aModule->Pads(); pad; pad = pad->Next() ) + format( pad, aNestLevel + 1 ); // Save 3D info. - for( S3D_MASTER* t3D = aModule->Models(); t3D; t3D = t3D->Next() ) + for( S3D_MASTER* t3D = aModule->Models(); t3D; t3D = t3D->Next() ) { if( !t3D->GetShape3DName().IsEmpty() ) { - m_out->Print( aNestLevel+1, "(model %s\n", - m_out->Quotew( t3D->GetShape3DName() ).c_str() ); + m_out->Print( aNestLevel + 1, "(model %s\n", + m_out->Quotew( t3D->GetShape3DName() ).c_str() ); - m_out->Print( aNestLevel+2, "(at (xyz %s %s %s))\n", - Double2Str( t3D->m_MatPosition.x ).c_str(), - Double2Str( t3D->m_MatPosition.y ).c_str(), - Double2Str( t3D->m_MatPosition.z ).c_str() ); + m_out->Print( aNestLevel + 2, "(at (xyz %s %s %s))\n", + Double2Str( t3D->m_MatPosition.x ).c_str(), + Double2Str( t3D->m_MatPosition.y ).c_str(), + Double2Str( t3D->m_MatPosition.z ).c_str() ); - m_out->Print( aNestLevel+2, "(scale (xyz %s %s %s))\n", - Double2Str( t3D->m_MatScale.x ).c_str(), - Double2Str( t3D->m_MatScale.y ).c_str(), - Double2Str( t3D->m_MatScale.z ).c_str() ); + m_out->Print( aNestLevel + 2, "(scale (xyz %s %s %s))\n", + Double2Str( t3D->m_MatScale.x ).c_str(), + Double2Str( t3D->m_MatScale.y ).c_str(), + Double2Str( t3D->m_MatScale.z ).c_str() ); - m_out->Print( aNestLevel+2, "(rotate (xyz %s %s %s))\n", - Double2Str( t3D->m_MatRotation.x ).c_str(), - Double2Str( t3D->m_MatRotation.y ).c_str(), - Double2Str( t3D->m_MatRotation.z ).c_str() ); + m_out->Print( aNestLevel + 2, "(rotate (xyz %s %s %s))\n", + Double2Str( t3D->m_MatRotation.x ).c_str(), + Double2Str( t3D->m_MatRotation.y ).c_str(), + Double2Str( t3D->m_MatRotation.z ).c_str() ); - m_out->Print( aNestLevel+1, ")\n" ); + m_out->Print( aNestLevel + 1, ")\n" ); } } m_out->Print( aNestLevel, ")\n" ); } - -void PCB_IO::formatLayers( LAYER_MSK aLayerMask, int aNestLevel ) const - throw( IO_ERROR ) +void PCB_IO::formatLayers( LAYER_MSK aLayerMask, int aNestLevel ) const throw( IO_ERROR ) { - std::string output; + std::string output; if( aNestLevel == 0 ) output += ' '; @@ -1118,35 +1099,38 @@ void PCB_IO::formatLayers( LAYER_MSK aLayerMask, int aNestLevel ) const { output += " *.Cu"; aLayerMask &= ~ALL_CU_LAYERS; // clear bits, so they are not output again below - } - else if( ( aLayerMask & cuMask ) == (LAYER_BACK | LAYER_FRONT) ) + } else if( ( aLayerMask & cuMask ) == ( LAYER_BACK | LAYER_FRONT ) ) { output += " F&B.Cu"; - aLayerMask &= ~(LAYER_BACK | LAYER_FRONT); + aLayerMask &= ~ ( LAYER_BACK | LAYER_FRONT ); } - if( ( aLayerMask & (ADHESIVE_LAYER_BACK | ADHESIVE_LAYER_FRONT)) == (ADHESIVE_LAYER_BACK | ADHESIVE_LAYER_FRONT) ) + if( ( aLayerMask & ( ADHESIVE_LAYER_BACK | ADHESIVE_LAYER_FRONT ) ) + == ( ADHESIVE_LAYER_BACK | ADHESIVE_LAYER_FRONT ) ) { output += " *.Adhes"; - aLayerMask &= ~(ADHESIVE_LAYER_BACK | ADHESIVE_LAYER_FRONT); + aLayerMask &= ~ ( ADHESIVE_LAYER_BACK | ADHESIVE_LAYER_FRONT ); } - if( ( aLayerMask & (SOLDERPASTE_LAYER_BACK | SOLDERPASTE_LAYER_FRONT)) == (SOLDERPASTE_LAYER_BACK | SOLDERPASTE_LAYER_FRONT) ) + if( ( aLayerMask & ( SOLDERPASTE_LAYER_BACK | SOLDERPASTE_LAYER_FRONT ) ) + == ( SOLDERPASTE_LAYER_BACK | SOLDERPASTE_LAYER_FRONT ) ) { output += " *.Paste"; - aLayerMask &= ~(SOLDERPASTE_LAYER_BACK | SOLDERPASTE_LAYER_FRONT); + aLayerMask &= ~ ( SOLDERPASTE_LAYER_BACK | SOLDERPASTE_LAYER_FRONT ); } - if( ( aLayerMask & (SILKSCREEN_LAYER_BACK | SILKSCREEN_LAYER_FRONT)) == (SILKSCREEN_LAYER_BACK | SILKSCREEN_LAYER_FRONT) ) + if( ( aLayerMask & ( SILKSCREEN_LAYER_BACK | SILKSCREEN_LAYER_FRONT ) ) + == ( SILKSCREEN_LAYER_BACK | SILKSCREEN_LAYER_FRONT ) ) { output += " *.SilkS"; - aLayerMask &= ~(SILKSCREEN_LAYER_BACK | SILKSCREEN_LAYER_FRONT); + aLayerMask &= ~ ( SILKSCREEN_LAYER_BACK | SILKSCREEN_LAYER_FRONT ); } - if( ( aLayerMask & (SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT)) == (SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT) ) + if( ( aLayerMask & ( SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT ) ) + == ( SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT ) ) { output += " *.Mask"; - aLayerMask &= ~(SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT); + aLayerMask &= ~ ( SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT ); } // output any individual layers not handled in wildcard combos above @@ -1160,10 +1144,11 @@ void PCB_IO::formatLayers( LAYER_MSK aLayerMask, int aNestLevel ) const { if( aLayerMask & GetLayerMask( layer ) ) { - if( m_board && !( m_ctl & CTL_STD_LAYER_NAMES ) ) + if( m_board && ! ( m_ctl & CTL_STD_LAYER_NAMES ) ) layerName = m_board->GetLayerName( layer ); - else // I am being called from FootprintSave() + else + // I am being called from FootprintSave() layerName = BOARD::GetStandardLayerName( layer ); output += ' '; @@ -1174,40 +1159,53 @@ void PCB_IO::formatLayers( LAYER_MSK aLayerMask, int aNestLevel ) const m_out->Print( aNestLevel, "%s)", output.c_str() ); } - -void PCB_IO::format( D_PAD* aPad, int aNestLevel ) const - throw( IO_ERROR ) +void PCB_IO::format( D_PAD* aPad, int aNestLevel ) const throw( IO_ERROR ) { const char* shape; - switch( aPad->GetShape() ) + switch (aPad->GetShape()) { - case PAD_CIRCLE: shape = "circle"; break; - case PAD_RECT: shape = "rect"; break; - case PAD_OVAL: shape = "oval"; break; - case PAD_TRAPEZOID: shape = "trapezoid"; break; + case PAD_CIRCLE: + shape = "circle"; + break; + case PAD_RECT: + shape = "rect"; + break; + case PAD_OVAL: + shape = "oval"; + break; + case PAD_TRAPEZOID: + shape = "trapezoid"; + break; default: - THROW_IO_ERROR( wxString::Format( _( "unknown pad type: %d"), aPad->GetShape() ) ); + THROW_IO_ERROR( wxString::Format( _( "unknown pad type: %d" ), aPad->GetShape() ) ); } const char* type; - switch( aPad->GetAttribute() ) + switch (aPad->GetAttribute()) { - case PAD_STANDARD: type = "thru_hole"; break; - case PAD_SMD: type = "smd"; break; - case PAD_CONN: type = "connect"; break; - case PAD_HOLE_NOT_PLATED: type = "np_thru_hole"; break; + case PAD_STANDARD: + type = "thru_hole"; + break; + case PAD_SMD: + type = "smd"; + break; + case PAD_CONN: + type = "connect"; + break; + case PAD_HOLE_NOT_PLATED: + type = "np_thru_hole"; + break; default: - THROW_IO_ERROR( wxString::Format( _( "unknown pad attribute: %d" ), - aPad->GetAttribute() ) ); + THROW_IO_ERROR( + wxString::Format( _( "unknown pad attribute: %d" ), aPad->GetAttribute() ) ); } - m_out->Print( aNestLevel, "(pad %s %s %s", - m_out->Quotew( aPad->GetPadName() ).c_str(), - type, shape ); + m_out->Print( aNestLevel, "(pad %s %s %s", m_out->Quotew( aPad->GetPadName() ).c_str(), type, + shape ); m_out->Print( 0, " (at %s", FMT_IU( aPad->GetPos0() ).c_str() ); if( aPad->GetOrientation() != 0.0 ) @@ -1216,14 +1214,14 @@ void PCB_IO::format( D_PAD* aPad, int aNestLevel ) const m_out->Print( 0, ")" ); m_out->Print( 0, " (size %s)", FMT_IU( aPad->GetSize() ).c_str() ); - if( (aPad->GetDelta().GetWidth()) != 0 || (aPad->GetDelta().GetHeight() != 0 ) ) + if( ( aPad->GetDelta().GetWidth() ) != 0 || ( aPad->GetDelta().GetHeight() != 0 ) ) m_out->Print( 0, " (rect_delta %s )", FMT_IU( aPad->GetDelta() ).c_str() ); wxSize sz = aPad->GetDrillSize(); wxPoint shapeoffset = aPad->GetOffset(); - if( (sz.GetWidth() > 0) || (sz.GetHeight() > 0) || - (shapeoffset.x != 0) || (shapeoffset.y != 0) ) + if( ( sz.GetWidth() > 0 ) || ( sz.GetHeight() > 0 ) || ( shapeoffset.x != 0 ) + || ( shapeoffset.y != 0 ) ) { m_out->Print( 0, " (drill" ); @@ -1231,12 +1229,12 @@ void PCB_IO::format( D_PAD* aPad, int aNestLevel ) const m_out->Print( 0, " oval" ); if( sz.GetWidth() > 0 ) - m_out->Print( 0, " %s", FMT_IU( sz.GetWidth() ).c_str() ); + m_out->Print( 0, " %s", FMT_IU( sz.GetWidth() ).c_str() ); - if( sz.GetHeight() > 0 && sz.GetWidth() != sz.GetHeight() ) - m_out->Print( 0, " %s", FMT_IU( sz.GetHeight() ).c_str() ); + if( sz.GetHeight() > 0 && sz.GetWidth() != sz.GetHeight() ) + m_out->Print( 0, " %s", FMT_IU( sz.GetHeight() ).c_str() ); - if( (shapeoffset.x != 0) || (shapeoffset.y != 0) ) + if( ( shapeoffset.x != 0 ) || ( shapeoffset.y != 0 ) ) m_out->Print( 0, " (offset %s)", FMT_IU( aPad->GetOffset() ).c_str() ); m_out->Print( 0, ")" ); @@ -1247,9 +1245,9 @@ void PCB_IO::format( D_PAD* aPad, int aNestLevel ) const std::string output; // Unconnected pad is default net so don't save it. - if( !(m_ctl & CTL_OMIT_NETS) && aPad->GetNetCode() != 0 ) + if( ! ( m_ctl & CTL_OMIT_NETS ) && aPad->GetNetCode() != NETINFO_LIST::UNCONNECTED ) StrPrintf( &output, " (net %d %s)", m_mapping->Translate( aPad->GetNetCode() ), - m_out->Quotew( aPad->GetNetname() ).c_str() ); + m_out->Quotew( aPad->GetNetname() ).c_str() ); if( aPad->GetPadToDieLength() != 0 ) StrPrintf( &output, " (die_length %s)", FMT_IU( aPad->GetPadToDieLength() ).c_str() ); @@ -1279,29 +1277,26 @@ void PCB_IO::format( D_PAD* aPad, int aNestLevel ) const if( output.size() ) { m_out->Print( 0, "\n" ); - m_out->Print( aNestLevel+1, "%s", output.c_str()+1 ); // +1 skips 1st space on 1st element + m_out->Print( aNestLevel + 1, "%s", output.c_str() + 1 ); // +1 skips 1st space on 1st element } m_out->Print( 0, ")\n" ); } - -void PCB_IO::format( TEXTE_PCB* aText, int aNestLevel ) const - throw( IO_ERROR ) +void PCB_IO::format( TEXTE_PCB* aText, int aNestLevel ) const throw( IO_ERROR ) { - m_out->Print( aNestLevel, "(gr_text %s (at %s", - m_out->Quotew( aText->GetText() ).c_str(), - FMT_IU( aText->GetTextPosition() ).c_str() ); + m_out->Print( aNestLevel, "(gr_text %s (at %s", m_out->Quotew( aText->GetText() ).c_str(), + FMT_IU( aText->GetTextPosition() ).c_str() ); if( aText->GetOrientation() != 0.0 ) - m_out->Print( 0, " %s", FMT_ANGLE( aText->GetOrientation() ).c_str() ); + m_out->Print( 0, " %s", FMT_ANGLE( aText->GetOrientation() ).c_str() ); m_out->Print( 0, ")" ); formatLayer( aText ); if( aText->GetTimeStamp() ) - m_out->Print( 0, " (tstamp %lX)", aText->GetTimeStamp() ); + m_out->Print( 0, " (tstamp %lX)", aText->GetTimeStamp() ); m_out->Print( 0, "\n" ); @@ -1310,19 +1305,22 @@ void PCB_IO::format( TEXTE_PCB* aText, int aNestLevel ) const m_out->Print( aNestLevel, ")\n" ); } - -void PCB_IO::format( TEXTE_MODULE* aText, int aNestLevel ) const - throw( IO_ERROR ) +void PCB_IO::format( TEXTE_MODULE* aText, int aNestLevel ) const throw( IO_ERROR ) { - MODULE* parent = (MODULE*) aText->GetParent(); - double orient = aText->GetOrientation(); + MODULE* parent = (MODULE*) aText->GetParent(); + double orient = aText->GetOrientation(); wxString type; - switch( aText->GetType() ) + switch (aText->GetType()) { - case TEXTE_MODULE::TEXT_is_REFERENCE: type = wxT( "reference" ); break; - case TEXTE_MODULE::TEXT_is_VALUE: type = wxT( "value" ); break; - default: type = wxT( "user" ); + case TEXTE_MODULE::TEXT_is_REFERENCE: + type = wxT( "reference" ); + break; + case TEXTE_MODULE::TEXT_is_VALUE: + type = wxT( "value" ); + break; + default: + type = wxT( "user" ); } // Due to the Pcbnew history, m_Orient is saved in screen value @@ -1330,10 +1328,9 @@ void PCB_IO::format( TEXTE_MODULE* aText, int aNestLevel ) const if( parent ) orient += parent->GetOrientation(); - m_out->Print( aNestLevel, "(fp_text %s %s (at %s", - m_out->Quotew( type ).c_str(), - m_out->Quotew( aText->GetText() ).c_str(), - FMT_IU( aText->GetPos0() ).c_str() ); + m_out->Print( aNestLevel, "(fp_text %s %s (at %s", m_out->Quotew( type ).c_str(), + m_out->Quotew( aText->GetText() ).c_str(), + FMT_IU( aText->GetPos0() ).c_str() ); if( orient != 0.0 ) m_out->Print( 0, " %s", FMT_ANGLE( orient ).c_str() ); @@ -1351,25 +1348,23 @@ void PCB_IO::format( TEXTE_MODULE* aText, int aNestLevel ) const m_out->Print( aNestLevel, ")\n" ); } - -void PCB_IO::format( TRACK* aTrack, int aNestLevel ) const - throw( IO_ERROR ) +void PCB_IO::format( TRACK* aTrack, int aNestLevel ) const throw( IO_ERROR ) { if( aTrack->Type() == PCB_VIA_T ) { LAYER_NUM layer1, layer2; - const VIA* via = static_cast(aTrack); - BOARD* board = (BOARD*) via->GetParent(); + const VIA* via = static_cast( aTrack ); + BOARD* board = (BOARD*) via->GetParent(); - wxCHECK_RET( board != 0, wxT( "Via " ) + via->GetSelectMenuText() + - wxT( " has no parent." ) ); + wxCHECK_RET( board != 0, + wxT( "Via " ) + via->GetSelectMenuText() + wxT( " has no parent." ) ); m_out->Print( aNestLevel, "(via" ); via->LayerPair( &layer1, &layer2 ); - switch( via->GetViaType() ) + switch (via->GetViaType()) { case VIA_THROUGH: // Default shape not saved. break; @@ -1383,25 +1378,24 @@ void PCB_IO::format( TRACK* aTrack, int aNestLevel ) const break; default: - THROW_IO_ERROR( wxString::Format( _( "unknown via type %d" ), via->GetViaType() ) ); + THROW_IO_ERROR( wxString::Format( _( "unknown via type %d" ), via->GetViaType() ) ); } m_out->Print( 0, " (at %s) (size %s)", - FMT_IU( aTrack->GetStart() ).c_str(), - FMT_IU( aTrack->GetWidth() ).c_str() ); + FMT_IU( aTrack->GetStart() ).c_str(), + FMT_IU( aTrack->GetWidth() ).c_str() ); if( via->GetDrill() != UNDEFINED_DRILL_DIAMETER ) m_out->Print( 0, " (drill %s)", FMT_IU( via->GetDrill() ).c_str() ); m_out->Print( 0, " (layers %s %s)", - m_out->Quotew( m_board->GetLayerName( layer1 ) ).c_str(), - m_out->Quotew( m_board->GetLayerName( layer2 ) ).c_str() ); - } - else + m_out->Quotew( m_board->GetLayerName( layer1 ) ).c_str(), + m_out->Quotew( m_board->GetLayerName( layer2 ) ).c_str() ); + } else { m_out->Print( aNestLevel, "(segment (start %s) (end %s) (width %s)", - FMT_IU( aTrack->GetStart() ).c_str(), FMT_IU( aTrack->GetEnd() ).c_str(), - FMT_IU( aTrack->GetWidth() ).c_str() ); + FMT_IU( aTrack->GetStart() ).c_str(), FMT_IU( aTrack->GetEnd() ).c_str(), + FMT_IU( aTrack->GetWidth() ).c_str() ); m_out->Print( 0, " (layer %s)", m_out->Quotew( aTrack->GetLayerName() ).c_str() ); } @@ -1409,24 +1403,22 @@ void PCB_IO::format( TRACK* aTrack, int aNestLevel ) const m_out->Print( 0, " (net %d)", m_mapping->Translate( aTrack->GetNetCode() ) ); if( aTrack->GetTimeStamp() != 0 ) - m_out->Print( 0, " (tstamp %lX)", aTrack->GetTimeStamp() ); + m_out->Print( 0, " (tstamp %lX)", aTrack->GetTimeStamp() ); if( aTrack->GetStatus() != 0 ) - m_out->Print( 0, " (status %X)", aTrack->GetStatus() ); + m_out->Print( 0, " (status %X)", aTrack->GetStatus() ); m_out->Print( 0, ")\n" ); } - -void PCB_IO::format( ZONE_CONTAINER* aZone, int aNestLevel ) const - throw( IO_ERROR ) +void PCB_IO::format( ZONE_CONTAINER* aZone, int aNestLevel ) const throw( IO_ERROR ) { // Save the NET info; For keepout zones, net code and net name are irrelevant // so be sure a dummy value is stored, just for ZONE_CONTAINER compatibility // (perhaps netcode and netname should be not stored) m_out->Print( aNestLevel, "(zone (net %d) (net_name %s)", - aZone->GetIsKeepout() ? 0 : m_mapping->Translate( aZone->GetNetCode() ), - m_out->Quotew( aZone->GetIsKeepout() ? wxT("") : aZone->GetNetname() ).c_str() ); + aZone->GetIsKeepout() ? 0 : m_mapping->Translate( aZone->GetNetCode() ), + m_out->Quotew( aZone->GetIsKeepout() ? wxT( "" ) : aZone->GetNetname() ).c_str() ); formatLayer( aZone ); @@ -1435,23 +1427,29 @@ void PCB_IO::format( ZONE_CONTAINER* aZone, int aNestLevel ) const // Save the outline aux info std::string hatch; - switch( aZone->GetHatchStyle() ) + switch (aZone->GetHatchStyle()) { default: - case CPolyLine::NO_HATCH: hatch = "none"; break; - case CPolyLine::DIAGONAL_EDGE: hatch = "edge"; break; - case CPolyLine::DIAGONAL_FULL: hatch = "full"; break; + case CPolyLine::NO_HATCH: + hatch = "none"; + break; + case CPolyLine::DIAGONAL_EDGE: + hatch = "edge"; + break; + case CPolyLine::DIAGONAL_FULL: + hatch = "full"; + break; } m_out->Print( 0, " (hatch %s %s)\n", hatch.c_str(), - FMT_IU( aZone->Outline()->GetHatchPitch() ).c_str() ); + FMT_IU( aZone->Outline()->GetHatchPitch() ).c_str() ); if( aZone->GetPriority() > 0 ) - m_out->Print( aNestLevel+1, "(priority %d)\n", aZone->GetPriority() ); + m_out->Print( aNestLevel + 1, "(priority %d)\n", aZone->GetPriority() ); - m_out->Print( aNestLevel+1, "(connect_pads" ); + m_out->Print( aNestLevel + 1, "(connect_pads" ); - switch( aZone->GetPadConnection() ) + switch (aZone->GetPadConnection()) { default: case THERMAL_PAD: // Default option not saved or loaded. @@ -1471,20 +1469,20 @@ void PCB_IO::format( ZONE_CONTAINER* aZone, int aNestLevel ) const } m_out->Print( 0, " (clearance %s))\n", - FMT_IU( aZone->GetZoneClearance() ).c_str() ); + FMT_IU( aZone->GetZoneClearance() ).c_str() ); - m_out->Print( aNestLevel+1, "(min_thickness %s)\n", - FMT_IU( aZone->GetMinThickness() ).c_str() ); + m_out->Print( aNestLevel + 1, "(min_thickness %s)\n", + FMT_IU( aZone->GetMinThickness() ).c_str() ); if( aZone->GetIsKeepout() ) { - m_out->Print( aNestLevel+1, "(keepout (tracks %s) (vias %s) (copperpour %s))\n", - aZone->GetDoNotAllowTracks() ? "not_allowed" : "allowed", - aZone->GetDoNotAllowVias() ? "not_allowed" : "allowed", - aZone->GetDoNotAllowCopperPour() ? "not_allowed" : "allowed" ); + m_out->Print( aNestLevel + 1, "(keepout (tracks %s) (vias %s) (copperpour %s))\n", + aZone->GetDoNotAllowTracks() ? "not_allowed" : "allowed", + aZone->GetDoNotAllowVias() ? "not_allowed" : "allowed", + aZone->GetDoNotAllowCopperPour() ? "not_allowed" : "allowed" ); } - m_out->Print( aNestLevel+1, "(fill" ); + m_out->Print( aNestLevel + 1, "(fill" ); // Default is not filled. if( aZone->IsFilled() ) @@ -1495,34 +1493,35 @@ void PCB_IO::format( ZONE_CONTAINER* aZone, int aNestLevel ) const m_out->Print( 0, " (mode segment)" ); m_out->Print( 0, " (arc_segments %d) (thermal_gap %s) (thermal_bridge_width %s)", - aZone->GetArcSegmentCount(), - FMT_IU( aZone->GetThermalReliefGap() ).c_str(), - FMT_IU( aZone->GetThermalReliefCopperBridge() ).c_str() ); + aZone->GetArcSegmentCount(), + FMT_IU( aZone->GetThermalReliefGap() ).c_str(), + FMT_IU( aZone->GetThermalReliefCopperBridge() ).c_str() ); if( aZone->GetCornerSmoothingType() != ZONE_SETTINGS::SMOOTHING_NONE ) { m_out->Print( 0, " (smoothing" ); - switch( aZone->GetCornerSmoothingType() ) + switch (aZone->GetCornerSmoothingType()) { case ZONE_SETTINGS::SMOOTHING_CHAMFER: m_out->Print( 0, " chamfer" ); break; case ZONE_SETTINGS::SMOOTHING_FILLET: - m_out->Print( 0, " fillet" ); + m_out->Print( 0, " fillet" ); break; default: - THROW_IO_ERROR( wxString::Format( _( "unknown zone corner smoothing type %d" ), - aZone->GetCornerSmoothingType() ) ); + THROW_IO_ERROR( + wxString::Format( _( "unknown zone corner smoothing type %d" ), + aZone->GetCornerSmoothingType() ) ); } m_out->Print( 0, ")" ); if( aZone->GetCornerRadius() != 0 ) m_out->Print( 0, " (radius %s)", - FMT_IU( aZone->GetCornerRadius() ).c_str() ); - } + FMT_IU( aZone->GetCornerRadius() ).c_str() ); + } m_out->Print( 0, ")\n" ); @@ -1531,46 +1530,46 @@ void PCB_IO::format( ZONE_CONTAINER* aZone, int aNestLevel ) const if( cv.GetCornersCount() ) { - m_out->Print( aNestLevel+1, "(polygon\n"); - m_out->Print( aNestLevel+2, "(pts\n" ); + m_out->Print( aNestLevel + 1, "(polygon\n" ); + m_out->Print( aNestLevel + 2, "(pts\n" ); for( unsigned it = 0; it < cv.GetCornersCount(); ++it ) { if( newLine == 0 ) - m_out->Print( aNestLevel+3, "(xy %s %s)", - FMT_IU( cv.GetX( it ) ).c_str(), FMT_IU( cv.GetY( it ) ).c_str() ); - else + m_out->Print( aNestLevel + 3, "(xy %s %s)", + FMT_IU( cv.GetX( it ) ).c_str(), FMT_IU( cv.GetY( it ) ).c_str() ); + else m_out->Print( 0, " (xy %s %s)", - FMT_IU( cv.GetX( it ) ).c_str(), FMT_IU( cv.GetY( it ) ).c_str() ); + FMT_IU( cv.GetX( it ) ).c_str(), FMT_IU( cv.GetY( it ) ).c_str() ); - if( newLine < 4 ) - { - newLine += 1; - } - else - { - newLine = 0; - m_out->Print( 0, "\n" ); - } - - if( cv.IsEndContour( it ) ) - { - if( newLine != 0 ) - m_out->Print( 0, "\n" ); - - m_out->Print( aNestLevel+2, ")\n" ); - - if( it+1 != cv.GetCornersCount() ) + if( newLine < 4 ) + { + newLine += 1; + } + else { newLine = 0; - m_out->Print( aNestLevel+1, ")\n" ); - m_out->Print( aNestLevel+1, "(polygon\n" ); - m_out->Print( aNestLevel+2, "(pts" ); + m_out->Print( 0, "\n" ); + } + + if( cv.IsEndContour( it ) ) + { + if( newLine != 0 ) + m_out->Print( 0, "\n" ); + + m_out->Print( aNestLevel+2, ")\n" ); + + if( it+1 != cv.GetCornersCount() ) + { + newLine = 0; + m_out->Print( aNestLevel+1, ")\n" ); + m_out->Print( aNestLevel+1, "(polygon\n" ); + m_out->Print( aNestLevel+2, "(pts" ); + } } } - } - m_out->Print( aNestLevel+1, ")\n" ); + m_out->Print( aNestLevel + 1, ")\n" ); } // Save the PolysList @@ -1579,80 +1578,76 @@ void PCB_IO::format( ZONE_CONTAINER* aZone, int aNestLevel ) const if( fv.GetCornersCount() ) { - m_out->Print( aNestLevel+1, "(filled_polygon\n" ); - m_out->Print( aNestLevel+2, "(pts\n" ); + m_out->Print( aNestLevel + 1, "(filled_polygon\n" ); + m_out->Print( aNestLevel + 2, "(pts\n" ); - for( unsigned it = 0; it < fv.GetCornersCount(); ++it ) + for( unsigned it = 0; it < fv.GetCornersCount(); ++it ) { if( newLine == 0 ) - m_out->Print( aNestLevel+3, "(xy %s %s)", - FMT_IU( fv.GetX( it ) ).c_str(), FMT_IU( fv.GetY( it ) ).c_str() ); - else + m_out->Print( aNestLevel + 3, "(xy %s %s)", + FMT_IU( fv.GetX( it ) ).c_str(), FMT_IU( fv.GetY( it ) ).c_str() ); + else m_out->Print( 0, " (xy %s %s)", - FMT_IU( fv.GetX( it ) ).c_str(), FMT_IU( fv.GetY( it ) ).c_str() ); + FMT_IU( fv.GetX( it ) ).c_str(), FMT_IU( fv.GetY( it ) ).c_str() ); - if( newLine < 4 ) - { - newLine += 1; - } - else - { - newLine = 0; - m_out->Print( 0, "\n" ); - } - - if( fv.IsEndContour( it ) ) - { - if( newLine != 0 ) - m_out->Print( 0, "\n" ); - - m_out->Print( aNestLevel+2, ")\n" ); - - if( it+1 != fv.GetCornersCount() ) + if( newLine < 4 ) + { + newLine += 1; + } + else { newLine = 0; - m_out->Print( aNestLevel+1, ")\n" ); - m_out->Print( aNestLevel+1, "(filled_polygon\n" ); - m_out->Print( aNestLevel+2, "(pts\n" ); + m_out->Print( 0, "\n" ); + } + + if( fv.IsEndContour( it ) ) + { + if( newLine != 0 ) + m_out->Print( 0, "\n" ); + + m_out->Print( aNestLevel+2, ")\n" ); + + if( it+1 != fv.GetCornersCount() ) + { + newLine = 0; + m_out->Print( aNestLevel+1, ")\n" ); + m_out->Print( aNestLevel+1, "(filled_polygon\n" ); + m_out->Print( aNestLevel+2, "(pts\n" ); + } } } - } - m_out->Print( aNestLevel+1, ")\n" ); + m_out->Print( aNestLevel + 1, ")\n" ); } // Save the filling segments list - const std::vector< SEGMENT >& segs = aZone->FillSegments(); + const std::vector& segs = aZone->FillSegments(); if( segs.size() ) { - m_out->Print( aNestLevel+1, "(fill_segments\n" ); + m_out->Print( aNestLevel + 1, "(fill_segments\n" ); - for( std::vector< SEGMENT >::const_iterator it = segs.begin(); it != segs.end(); ++it ) + for( std::vector::const_iterator it = segs.begin(); it != segs.end(); ++it ) { - m_out->Print( aNestLevel+2, "(pts (xy %s) (xy %s))\n", - FMT_IU( it->m_Start ).c_str(), - FMT_IU( it->m_End ).c_str() ); + m_out->Print( aNestLevel + 2, "(pts (xy %s) (xy %s))\n", + FMT_IU( it->m_Start ).c_str(), + FMT_IU( it->m_End ).c_str() ); } - m_out->Print( aNestLevel+1, ")\n" ); + m_out->Print( aNestLevel + 1, ")\n" ); } m_out->Print( aNestLevel, ")\n" ); } - PCB_IO::PCB_IO( int aControlFlags ) : - m_cache( 0 ), - m_ctl( aControlFlags ), - m_parser( new PCB_PARSER() ), - m_mapping( new NETINFO_MAPPING() ) + m_cache( 0 ), m_ctl( aControlFlags ), m_parser( new PCB_PARSER() ), + m_mapping( new NETINFO_MAPPING() ) { init( 0 ); m_out = &m_sf; } - PCB_IO::~PCB_IO() { delete m_cache; @@ -1660,10 +1655,9 @@ PCB_IO::~PCB_IO() delete m_mapping; } - BOARD* PCB_IO::Load( const wxString& aFileName, BOARD* aAppendToMe, const PROPERTIES* aProperties ) { - FILE_LINE_READER reader( aFileName ); + FILE_LINE_READER reader( aFileName ); init( aProperties ); @@ -1680,14 +1674,12 @@ BOARD* PCB_IO::Load( const wxString& aFileName, BOARD* aAppendToMe, const PROPER return board; } - void PCB_IO::init( const PROPERTIES* aProperties ) { m_board = NULL; m_props = aProperties; } - void PCB_IO::cacheLib( const wxString& aLibraryPath, const wxString& aFootprintName ) { if( !m_cache || m_cache->IsModified( aLibraryPath, aFootprintName ) ) @@ -1699,18 +1691,18 @@ void PCB_IO::cacheLib( const wxString& aLibraryPath, const wxString& aFootprintN } } - -wxArrayString PCB_IO::FootprintEnumerate( const wxString& aLibraryPath, +wxArrayString PCB_IO::FootprintEnumerate( const wxString& aLibraryPath, const PROPERTIES* aProperties ) { - LOCALE_IO toggle; // toggles on, then off, the C locale. + LOCALE_IO toggle; // toggles on, then off, the C locale. wxArrayString ret; - wxDir dir( aLibraryPath ); + wxDir dir( aLibraryPath ); if( !dir.IsOpened() ) { - THROW_IO_ERROR( wxString::Format( _( "footprint library path '%s' does not exist" ), - GetChars( aLibraryPath ) ) ); + THROW_IO_ERROR( + wxString::Format( _( "footprint library path '%s' does not exist" ), + GetChars( aLibraryPath ) ) ); } init( aProperties ); @@ -1720,8 +1712,7 @@ wxArrayString PCB_IO::FootprintEnumerate( const wxString& aLibraryPath, const MODULE_MAP& mods = m_cache->GetModules(); - - for( MODULE_CITER it = mods.begin(); it != mods.end(); ++it ) + for( MODULE_CITER it = mods.begin(); it != mods.end(); ++it ) { ret.Add( FROM_UTF8( it->first.c_str() ) ); } @@ -1735,18 +1726,17 @@ wxArrayString PCB_IO::FootprintEnumerate( const wxString& aLibraryPath, { wxFileName fn( aLibraryPath, fpFileName ); ret.Add( fn.GetName() ); - } while( dir.GetNext( &fpFileName ) ); + }while( dir.GetNext( &fpFileName ) ); } #endif return ret; } - MODULE* PCB_IO::FootprintLoad( const wxString& aLibraryPath, const wxString& aFootprintName, const PROPERTIES* aProperties ) { - LOCALE_IO toggle; // toggles on, then off, the C locale. + LOCALE_IO toggle; // toggles on, then off, the C locale. init( aProperties ); @@ -1765,11 +1755,10 @@ MODULE* PCB_IO::FootprintLoad( const wxString& aLibraryPath, const wxString& aFo return new MODULE( *it->second->GetModule() ); } - void PCB_IO::FootprintSave( const wxString& aLibraryPath, const MODULE* aFootprint, const PROPERTIES* aProperties ) { - LOCALE_IO toggle; // toggles on, then off, the C locale. + LOCALE_IO toggle; // toggles on, then off, the C locale. init( aProperties ); @@ -1781,10 +1770,8 @@ void PCB_IO::FootprintSave( const wxString& aLibraryPath, const MODULE* aFootpri if( !m_cache->IsWritable() ) { - wxString msg = wxString::Format( - _( "Library '%s' is read only" ), - GetChars( aLibraryPath ) - ); + wxString msg = wxString::Format( _( "Library '%s' is read only" ), + GetChars( aLibraryPath ) ); THROW_IO_ERROR( msg ); } @@ -1794,18 +1781,21 @@ void PCB_IO::FootprintSave( const wxString& aLibraryPath, const MODULE* aFootpri MODULE_MAP& mods = m_cache->GetModules(); // Quietly overwrite module and delete module file from path for any by same name. - wxFileName fn( aLibraryPath, aFootprint->GetFPID().GetFootprintName(), KiCadFootprintFileExtension ); + wxFileName fn( aLibraryPath, aFootprint->GetFPID().GetFootprintName(), + KiCadFootprintFileExtension ); if( !fn.IsOk() ) { - THROW_IO_ERROR( wxString::Format( _( "Footprint file name '%s' is not valid." ), - GetChars( fn.GetFullPath() ) ) ); + THROW_IO_ERROR( + wxString::Format( _( "Footprint file name '%s' is not valid." ), + GetChars( fn.GetFullPath() ) ) ); } if( fn.FileExists() && !fn.IsFileWritable() ) { - THROW_IO_ERROR( wxString::Format( _( "user does not have write permission to delete file '%s' " ), - GetChars( fn.GetFullPath() ) ) ); + THROW_IO_ERROR( + wxString::Format( _( "user does not have write permission to delete file '%s' " ), + GetChars( fn.GetFullPath() ) ) ); } MODULE_CITER it = mods.find( footprintName ); @@ -1813,7 +1803,7 @@ void PCB_IO::FootprintSave( const wxString& aLibraryPath, const MODULE* aFootpri if( it != mods.end() ) { wxLogTrace( traceFootprintLibrary, wxT( "Removing footprint library file '%s'." ), - fn.GetFullPath().GetData() ); + fn.GetFullPath().GetData() ); mods.erase( footprintName ); wxRemoveFile( fn.GetFullPath() ); } @@ -1831,15 +1821,15 @@ void PCB_IO::FootprintSave( const wxString& aLibraryPath, const MODULE* aFootpri module->Flip( module->GetPosition() ); wxLogTrace( traceFootprintLibrary, wxT( "Creating s-expression footprint file: %s." ), - fn.GetFullPath().GetData() ); + fn.GetFullPath().GetData() ); mods.insert( footprintName, new FP_CACHE_ITEM( module, fn ) ); m_cache->Save(); } - -void PCB_IO::FootprintDelete( const wxString& aLibraryPath, const wxString& aFootprintName, const PROPERTIES* aProperties ) +void PCB_IO::FootprintDelete( const wxString& aLibraryPath, const wxString& aFootprintName, + const PROPERTIES* aProperties ) { - LOCALE_IO toggle; // toggles on, then off, the C locale. + LOCALE_IO toggle; // toggles on, then off, the C locale. init( aProperties ); @@ -1847,23 +1837,23 @@ void PCB_IO::FootprintDelete( const wxString& aLibraryPath, const wxString& aFoo if( !m_cache->IsWritable() ) { - THROW_IO_ERROR( wxString::Format( _( "Library '%s' is read only" ), - aLibraryPath.GetData() ) ); + THROW_IO_ERROR( + wxString::Format( _( "Library '%s' is read only" ), aLibraryPath.GetData() ) ); } m_cache->Remove( aFootprintName ); } - void PCB_IO::FootprintLibCreate( const wxString& aLibraryPath, const PROPERTIES* aProperties ) { if( wxDir::Exists( aLibraryPath ) ) { - THROW_IO_ERROR( wxString::Format( _( "cannot overwrite library path '%s'" ), - aLibraryPath.GetData() ) ); + THROW_IO_ERROR( + wxString::Format( _( "cannot overwrite library path '%s'" ), + aLibraryPath.GetData() ) ); } - LOCALE_IO toggle; + LOCALE_IO toggle; init( aProperties ); @@ -1872,7 +1862,6 @@ void PCB_IO::FootprintLibCreate( const wxString& aLibraryPath, const PROPERTIES* m_cache->Save(); } - bool PCB_IO::FootprintLibDelete( const wxString& aLibraryPath, const PROPERTIES* aProperties ) { wxFileName fn; @@ -1884,53 +1873,58 @@ bool PCB_IO::FootprintLibDelete( const wxString& aLibraryPath, const PROPERTIES* if( !fn.IsDirWritable() ) { - THROW_IO_ERROR( wxString::Format( _( "user does not have permission to delete directory '%s'" ), - aLibraryPath.GetData() ) ); + THROW_IO_ERROR( + wxString::Format( _( "user does not have permission to delete directory '%s'" ), + aLibraryPath.GetData() ) ); } wxDir dir( aLibraryPath ); if( dir.HasSubDirs() ) { - THROW_IO_ERROR( wxString::Format( _( "library directory '%s' has unexpected sub-directories" ), - aLibraryPath.GetData() ) ); + THROW_IO_ERROR( + wxString::Format( _( "library directory '%s' has unexpected sub-directories" ), + aLibraryPath.GetData() ) ); } // All the footprint files must be deleted before the directory can be deleted. if( dir.HasFiles() ) { - unsigned i; - wxFileName tmp; + unsigned i; + wxFileName tmp; wxArrayString files; wxDir::GetAllFiles( aLibraryPath, &files ); - for( i = 0; i < files.GetCount(); i++ ) + for( i = 0; i < files.GetCount(); i++ ) { tmp = files[i]; if( tmp.GetExt() != KiCadFootprintFileExtension ) { - THROW_IO_ERROR( wxString::Format( _( "unexpected file '%s' was found in library path '%s'" ), - files[i].GetData(), aLibraryPath.GetData() ) ); + THROW_IO_ERROR( + wxString::Format( + _( "unexpected file '%s' was found in library path '%s'" ), + files[i].GetData(), aLibraryPath.GetData() ) ); } } - for( i = 0; i < files.GetCount(); i++ ) + for( i = 0; i < files.GetCount(); i++ ) { wxRemoveFile( files[i] ); } } wxLogTrace( traceFootprintLibrary, wxT( "Removing footprint library '%s'" ), - aLibraryPath.GetData() ); + aLibraryPath.GetData() ); // Some of the more elaborate wxRemoveFile() crap puts up its own wxLog dialog // we don't want that. we want bare metal portability with no UI here. if( !wxRmdir( aLibraryPath ) ) { - THROW_IO_ERROR( wxString::Format( _( "footprint library '%s' cannot be deleted" ), - aLibraryPath.GetData() ) ); + THROW_IO_ERROR( + wxString::Format( _( "footprint library '%s' cannot be deleted" ), + aLibraryPath.GetData() ) ); } // For some reason removing a directory in Windows is not immediately updated. This delay @@ -1949,10 +1943,9 @@ bool PCB_IO::FootprintLibDelete( const wxString& aLibraryPath, const PROPERTIES* return true; } - bool PCB_IO::IsFootprintLibWritable( const wxString& aLibraryPath ) { - LOCALE_IO toggle; + LOCALE_IO toggle; init( NULL ); diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index 9b51a10706..9ddd1c9c4a 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -3368,7 +3368,8 @@ void LEGACY_PLUGIN::savePAD( const D_PAD* me ) const fprintf( m_fp, "At %s N %08X\n", texttype, me->GetLayerMask() ); - fprintf( m_fp, "Ne %d %s\n", me->GetNetCode(), EscapedUTF8( me->GetNetname() ).c_str() ); + fprintf( m_fp, "Ne %d %s\n", m_mapping->Translate( me->GetNetCode() ), + EscapedUTF8( me->GetNetname() ).c_str() ); fprintf( m_fp, "Po %s\n", fmtBIUPoint( me->GetPos0() ).c_str() ); @@ -3635,7 +3636,7 @@ void LEGACY_PLUGIN::saveTRACK( const TRACK* me ) const "-1" : fmtBIU( drill ).c_str() ); fprintf(m_fp, "De %d %d %d %lX %X\n", - me->GetLayer(), type, me->GetNetCode(), + me->GetLayer(), type, m_mapping->Translate( me->GetNetCode() ), me->GetTimeStamp(), me->GetStatus() ); } @@ -3649,7 +3650,7 @@ void LEGACY_PLUGIN::saveZONE_CONTAINER( const ZONE_CONTAINER* me ) const // just for ZONE_CONTAINER compatibility fprintf( m_fp, "ZInfo %lX %d %s\n", me->GetTimeStamp(), - me->GetIsKeepout() ? 0 : me->GetNetCode(), + me->GetIsKeepout() ? 0 : m_mapping->Translate( me->GetNetCode() ), EscapedUTF8( me->GetIsKeepout() ? wxT("") : me->GetNetname() ).c_str() ); // Save the outline layer info From 0d5c7f446157b16e9ca92804020f90124cfc218d Mon Sep 17 00:00:00 2001 From: Bernhard Stegmaier Date: Sun, 25 May 2014 11:02:52 -0500 Subject: [PATCH 449/741] mac fixes --- eeschema/CMakeLists.txt | 6 +++++- pcb_calculator/CMakeLists.txt | 9 --------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/eeschema/CMakeLists.txt b/eeschema/CMakeLists.txt index a57179691d..f857ed1891 100644 --- a/eeschema/CMakeLists.txt +++ b/eeschema/CMakeLists.txt @@ -191,9 +191,13 @@ if( APPLE ) set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/eeschema.icns" PROPERTIES MACOSX_PACKAGE_LOCATION Resources ) + set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/eeschema_doc.icns" PROPERTIES + MACOSX_PACKAGE_LOCATION Resources + ) set( MACOSX_BUNDLE_ICON_FILE eeschema.icns ) set( MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.eeschema ) + set( MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist ) endif() @@ -291,7 +295,7 @@ if( USE_KIWAY_DLLS ) add_dependencies( eeschema eeschema_kiface ) if( APPLE ) - set_target_properties( eeschema_kiface PROPERTIES + set_target_properties( eeschema PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist ) endif() diff --git a/pcb_calculator/CMakeLists.txt b/pcb_calculator/CMakeLists.txt index 8e1dad619c..b602c361cf 100644 --- a/pcb_calculator/CMakeLists.txt +++ b/pcb_calculator/CMakeLists.txt @@ -134,15 +134,6 @@ if( USE_KIWAY_DLLS ) ) endif() - if( APPLE ) - # copies kiface into the bundle - add_custom_target( _pcb_calculator_kiface_copy ALL - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/pcb_calculator/_pcb_calculator.kiface "${CMAKE_BINARY_DIR}/pcb_calculator/pcb_calculator.app/Contents/MacOS/" - DEPENDS pcb_calculator_kiface - COMMENT "Copying kiface into pcb_calculator" - ) - endif() - else() add_executable( pcb_calculator WIN32 MACOSX_BUNDLE From 3802629adcc6a48de16692fa7a5790f77d5976ca Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 26 May 2014 08:21:25 +0200 Subject: [PATCH 450/741] Fix kicad_plugin.cpp coding style fully broken by commit 4887 (patch from Orson, AKA maciej suminski). --- pcbnew/kicad_plugin.cpp | 1175 ++++++++++++++++++++------------------- 1 file changed, 591 insertions(+), 584 deletions(-) diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index 9de2aa9091..fe5bf4cc9b 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -83,38 +83,27 @@ void filterNetClass( const BOARD& aBoard, NETCLASS& aNetClass ) */ class FP_CACHE_ITEM { - wxFileName m_file_name; ///< The the full file name and path of the footprint to cache. - bool m_writable; ///< Writability status of the footprint file. - wxDateTime m_mod_time; ///< The last file modified time stamp. - std::auto_ptr m_module; + wxFileName m_file_name; ///< The the full file name and path of the footprint to cache. + bool m_writable; ///< Writability status of the footprint file. + wxDateTime m_mod_time; ///< The last file modified time stamp. + std::auto_ptr m_module; public: FP_CACHE_ITEM( MODULE* aModule, const wxFileName& aFileName ); - wxString GetName() const - { - return m_file_name.GetDirs().Last(); - } - wxFileName GetFileName() const - { - return m_file_name; - } + wxString GetName() const { return m_file_name.GetDirs().Last(); } + wxFileName GetFileName() const { return m_file_name; } /// Tell if the disk content or the lib_path has changed. - bool IsModified() const; + bool IsModified() const; - MODULE* GetModule() const - { - return m_module.get(); - } - void UpdateModificationTime() - { - m_mod_time = m_file_name.GetModificationTime(); - } + MODULE* GetModule() const { return m_module.get(); } + void UpdateModificationTime() { m_mod_time = m_file_name.GetModificationTime(); } }; + FP_CACHE_ITEM::FP_CACHE_ITEM( MODULE* aModule, const wxFileName& aFileName ) : - m_module( aModule ) + m_module( aModule ) { m_file_name = aFileName; @@ -124,50 +113,41 @@ FP_CACHE_ITEM::FP_CACHE_ITEM( MODULE* aModule, const wxFileName& aFileName ) : m_mod_time.Now(); } + bool FP_CACHE_ITEM::IsModified() const { if( !m_file_name.FileExists() ) return false; wxLogTrace( traceFootprintLibrary, wxT( "File '%s', m_mod_time %s-%s, file mod time: %s-%s." ), - GetChars( m_file_name.GetFullPath() ), GetChars( m_mod_time.FormatDate() ), - GetChars( m_mod_time.FormatTime() ), - GetChars( m_file_name.GetModificationTime().FormatDate() ), - GetChars( m_file_name.GetModificationTime().FormatTime() ) ); + GetChars( m_file_name.GetFullPath() ), + GetChars( m_mod_time.FormatDate() ), GetChars( m_mod_time.FormatTime() ), + GetChars( m_file_name.GetModificationTime().FormatDate() ), + GetChars( m_file_name.GetModificationTime().FormatTime() ) ); return m_file_name.GetModificationTime() != m_mod_time; } -typedef boost::ptr_map MODULE_MAP; -typedef MODULE_MAP::iterator MODULE_ITER; -typedef MODULE_MAP::const_iterator MODULE_CITER; + +typedef boost::ptr_map< std::string, FP_CACHE_ITEM > MODULE_MAP; +typedef MODULE_MAP::iterator MODULE_ITER; +typedef MODULE_MAP::const_iterator MODULE_CITER; + class FP_CACHE { - PCB_IO* m_owner; /// Plugin object that owns the cache. - wxFileName m_lib_path; /// The path of the library. - wxDateTime m_mod_time; /// Footprint library path modified time stamp. - MODULE_MAP m_modules; /// Map of footprint file name per MODULE*. + PCB_IO* m_owner; /// Plugin object that owns the cache. + wxFileName m_lib_path; /// The path of the library. + wxDateTime m_mod_time; /// Footprint library path modified time stamp. + MODULE_MAP m_modules; /// Map of footprint file name per MODULE*. public: FP_CACHE( PCB_IO* aOwner, const wxString& aLibraryPath ); - wxString GetPath() const - { - return m_lib_path.GetPath(); - } - wxDateTime GetLastModificationTime() const - { - return m_mod_time; - } - bool IsWritable() const - { - return m_lib_path.IsOk() && m_lib_path.IsDirWritable(); - } - MODULE_MAP& GetModules() - { - return m_modules; - } + wxString GetPath() const { return m_lib_path.GetPath(); } + wxDateTime GetLastModificationTime() const { return m_mod_time; } + bool IsWritable() const { return m_lib_path.IsOk() && m_lib_path.IsDirWritable(); } + MODULE_MAP& GetModules() { return m_modules; } // Most all functions in this class throw IO_ERROR exceptions. There are no // error codes nor user interface calls from here, nor in any PLUGIN. @@ -211,34 +191,35 @@ public: bool IsPath( const wxString& aPath ) const; }; + FP_CACHE::FP_CACHE( PCB_IO* aOwner, const wxString& aLibraryPath ) { m_owner = aOwner; m_lib_path.SetPath( aLibraryPath ); } + wxDateTime FP_CACHE::GetLibModificationTime() const { return m_lib_path.GetModificationTime(); } + void FP_CACHE::Save() { if( !m_lib_path.DirExists() && !m_lib_path.Mkdir() ) { - THROW_IO_ERROR( - wxString::Format( _( "Cannot create footprint library path '%s'" ), - m_lib_path.GetPath().GetData() ) ); + THROW_IO_ERROR( wxString::Format( _( "Cannot create footprint library path '%s'" ), + m_lib_path.GetPath().GetData() ) ); } if( !m_lib_path.IsDirWritable() ) { - THROW_IO_ERROR( - wxString::Format( _( "Footprint library path '%s' is read only" ), - GetChars( m_lib_path.GetPath() ) ) ); + THROW_IO_ERROR( wxString::Format( _( "Footprint library path '%s' is read only" ), + GetChars( m_lib_path.GetPath() ) ) ); } - for( MODULE_ITER it = m_modules.begin(); it != m_modules.end(); ++it ) + for( MODULE_ITER it = m_modules.begin(); it != m_modules.end(); ++it ) { wxFileName fn = it->second->GetFileName(); @@ -251,7 +232,7 @@ void FP_CACHE::Save() // renaming the file. { wxLogTrace( traceFootprintLibrary, wxT( "Creating temporary library file %s" ), - GetChars( tempFileName ) ); + GetChars( tempFileName ) ); FILE_OUTPUTFORMATTER formatter( tempFileName ); @@ -265,7 +246,9 @@ void FP_CACHE::Save() { wxString msg = wxString::Format( _( "Cannot rename temporary file '%s' to footprint library file '%s'" ), - GetChars( tempFileName ), GetChars( fn.GetFullPath() ) ); + GetChars( tempFileName ), + GetChars( fn.GetFullPath() ) + ); THROW_IO_ERROR( msg ); } @@ -274,14 +257,17 @@ void FP_CACHE::Save() } } + void FP_CACHE::Load() { wxDir dir( m_lib_path.GetPath() ); if( !dir.IsOpened() ) { - wxString msg = wxString::Format( _( "Footprint library path '%s' does not exist" ), - GetChars( m_lib_path.GetPath() ) ); + wxString msg = wxString::Format( + _( "Footprint library path '%s' does not exist" ), + GetChars( m_lib_path.GetPath() ) + ); THROW_IO_ERROR( msg ); } @@ -296,12 +282,12 @@ void FP_CACHE::Load() // prepend the libpath into fullPath wxFileName fullPath( m_lib_path.GetPath(), fpFileName ); - FILE_LINE_READER reader( fullPath.GetFullPath() ); + FILE_LINE_READER reader( fullPath.GetFullPath() ); m_owner->m_parser->SetLineReader( &reader ); std::string name = TO_UTF8( fullPath.GetName() ); - MODULE* footprint = (MODULE*) m_owner->m_parser->Parse(); + MODULE* footprint = (MODULE*) m_owner->m_parser->Parse(); // The footprint name is the file name without the extension. footprint->SetFPID( FPID( fullPath.GetName() ) ); @@ -316,6 +302,7 @@ void FP_CACHE::Load() } } + void FP_CACHE::Remove( const wxString& aFootprintName ) { @@ -325,8 +312,11 @@ void FP_CACHE::Remove( const wxString& aFootprintName ) if( it == m_modules.end() ) { - wxString msg = wxString::Format( _( "library '%s' has no footprint '%s' to delete" ), - GetChars( m_lib_path.GetPath() ), GetChars( aFootprintName ) ); + wxString msg = wxString::Format( + _( "library '%s' has no footprint '%s' to delete" ), + GetChars( m_lib_path.GetPath() ), + GetChars( aFootprintName ) + ); THROW_IO_ERROR( msg ); } @@ -336,6 +326,7 @@ void FP_CACHE::Remove( const wxString& aFootprintName ) wxRemoveFile( fullPath ); } + bool FP_CACHE::IsPath( const wxString& aPath ) const { // Converts path separators to native path separators @@ -345,6 +336,7 @@ bool FP_CACHE::IsPath( const wxString& aPath ) const return m_lib_path == newPath; } + bool FP_CACHE::IsModified( const wxString& aLibPath, const wxString& aFootprintName ) const { // The library is modified if the library path got deleted or changed. @@ -355,7 +347,7 @@ bool FP_CACHE::IsModified( const wxString& aLibPath, const wxString& aFootprintN // it was loaded. if( aFootprintName.IsEmpty() ) { - for( MODULE_CITER it = m_modules.begin(); it != m_modules.end(); ++it ) + for( MODULE_CITER it = m_modules.begin(); it != m_modules.end(); ++it ) { wxFileName fn = m_lib_path; @@ -365,20 +357,21 @@ bool FP_CACHE::IsModified( const wxString& aLibPath, const wxString& aFootprintN if( !fn.FileExists() ) { wxLogTrace( traceFootprintLibrary, - wxT( "Footprint cache file '%s' does not exist." ), - fn.GetFullPath().GetData() ); + wxT( "Footprint cache file '%s' does not exist." ), + fn.GetFullPath().GetData() ); return true; } if( it->second->IsModified() ) { wxLogTrace( traceFootprintLibrary, - wxT( "Footprint cache file '%s' has been modified." ), - fn.GetFullPath().GetData() ); + wxT( "Footprint cache file '%s' has been modified." ), + fn.GetFullPath().GetData() ); return true; } } - } else + } + else { MODULE_CITER it = m_modules.find( TO_UTF8( aFootprintName ) ); @@ -389,9 +382,10 @@ bool FP_CACHE::IsModified( const wxString& aLibPath, const wxString& aFootprintN return false; } + void PCB_IO::Save( const wxString& aFileName, BOARD* aBoard, const PROPERTIES* aProperties ) { - LOCALE_IO toggle; // toggles on, then off, the C locale. + LOCALE_IO toggle; // toggles on, then off, the C locale. init( aProperties ); @@ -400,41 +394,44 @@ void PCB_IO::Save( const wxString& aFileName, BOARD* aBoard, const PROPERTIES* a // Prepare net mapping that assures that net codes saved in a file are consecutive integers m_mapping->SetBoard( aBoard ); - FILE_OUTPUTFORMATTER formatter( aFileName ); + FILE_OUTPUTFORMATTER formatter( aFileName ); m_out = &formatter; // no ownership m_out->Print( 0, "(kicad_pcb (version %d) (host pcbnew %s)\n", SEXPR_BOARD_FILE_VERSION, - formatter.Quotew( GetBuildVersion() ).c_str() ); + formatter.Quotew( GetBuildVersion() ).c_str() ); Format( aBoard, 1 ); m_out->Print( 0, ")\n" ); } + BOARD_ITEM* PCB_IO::Parse( const wxString& aClipboardSourceInput ) throw( PARSE_ERROR, IO_ERROR ) { std::string input = TO_UTF8( aClipboardSourceInput ); - STRING_LINE_READER reader( input, wxT( "clipboard" ) ); + STRING_LINE_READER reader( input, wxT( "clipboard" ) ); m_parser->SetLineReader( &reader ); return m_parser->Parse(); } -void PCB_IO::Format( BOARD_ITEM* aItem, int aNestLevel ) const throw( IO_ERROR ) -{ - LOCALE_IO toggle; // public API function, perform anything convenient for caller - switch (aItem->Type()) +void PCB_IO::Format( BOARD_ITEM* aItem, int aNestLevel ) const + throw( IO_ERROR ) +{ + LOCALE_IO toggle; // public API function, perform anything convenient for caller + + switch( aItem->Type() ) { case PCB_T: format( (BOARD*) aItem, aNestLevel ); break; case PCB_DIMENSION_T: - format( (DIMENSION*) aItem, aNestLevel ); + format( ( DIMENSION*) aItem, aNestLevel ); break; case PCB_LINE_T: @@ -479,6 +476,7 @@ void PCB_IO::Format( BOARD_ITEM* aItem, int aNestLevel ) const throw( IO_ERROR ) } } + void PCB_IO::formatLayer( const BOARD_ITEM* aItem ) const { if( m_ctl & CTL_STD_LAYER_NAMES ) @@ -487,34 +485,37 @@ void PCB_IO::formatLayer( const BOARD_ITEM* aItem ) const // English layer names should never need quoting. m_out->Print( 0, " (layer %s)", TO_UTF8( BOARD::GetStandardLayerName( layer ) ) ); - } else + } + else m_out->Print( 0, " (layer %s)", m_out->Quotew( aItem->GetLayerName() ).c_str() ); } -void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const throw( IO_ERROR ) + +void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const + throw( IO_ERROR ) { const BOARD_DESIGN_SETTINGS& dsnSettings = aBoard->GetDesignSettings(); m_out->Print( 0, "\n" ); m_out->Print( aNestLevel, "(general\n" ); - m_out->Print( aNestLevel + 1, "(links %d)\n", aBoard->GetRatsnestsCount() ); - m_out->Print( aNestLevel + 1, "(no_connects %d)\n", aBoard->GetUnconnectedNetCount() ); + m_out->Print( aNestLevel+1, "(links %d)\n", aBoard->GetRatsnestsCount() ); + m_out->Print( aNestLevel+1, "(no_connects %d)\n", aBoard->GetUnconnectedNetCount() ); // Write Bounding box info - m_out->Print( aNestLevel + 1, "(area %s %s %s %s)\n", - FMTIU( aBoard->GetBoundingBox().GetX() ).c_str(), - FMTIU( aBoard->GetBoundingBox().GetY() ).c_str(), - FMTIU( aBoard->GetBoundingBox().GetRight() ).c_str(), - FMTIU( aBoard->GetBoundingBox().GetBottom() ).c_str() ); - m_out->Print( aNestLevel + 1, "(thickness %s)\n", - FMTIU( dsnSettings.GetBoardThickness() ).c_str() ); + m_out->Print( aNestLevel+1, "(area %s %s %s %s)\n", + FMTIU( aBoard->GetBoundingBox().GetX() ).c_str(), + FMTIU( aBoard->GetBoundingBox().GetY() ).c_str(), + FMTIU( aBoard->GetBoundingBox().GetRight() ).c_str(), + FMTIU( aBoard->GetBoundingBox().GetBottom() ).c_str() ); + m_out->Print( aNestLevel+1, "(thickness %s)\n", + FMTIU( dsnSettings.GetBoardThickness() ).c_str() ); - m_out->Print( aNestLevel + 1, "(drawings %d)\n", aBoard->m_Drawings.GetCount() ); - m_out->Print( aNestLevel + 1, "(tracks %d)\n", aBoard->GetNumSegmTrack() ); - m_out->Print( aNestLevel + 1, "(zones %d)\n", aBoard->GetNumSegmZone() ); - m_out->Print( aNestLevel + 1, "(modules %d)\n", aBoard->m_Modules.GetCount() ); - m_out->Print( aNestLevel + 1, "(nets %d)\n", (int) m_mapping->GetSize() ); + m_out->Print( aNestLevel+1, "(drawings %d)\n", aBoard->m_Drawings.GetCount() ); + m_out->Print( aNestLevel+1, "(tracks %d)\n", aBoard->GetNumSegmTrack() ); + m_out->Print( aNestLevel+1, "(zones %d)\n", aBoard->GetNumSegmZone() ); + m_out->Print( aNestLevel+1, "(modules %d)\n", aBoard->m_Modules.GetCount() ); + m_out->Print( aNestLevel+1, "(nets %d)\n", (int) m_mapping->GetSize() ); m_out->Print( aNestLevel, ")\n\n" ); aBoard->GetPageSettings().Format( m_out, aNestLevel, m_ctl ); @@ -524,16 +525,16 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const throw( IO_ERROR ) m_out->Print( aNestLevel, "(layers\n" ); // Save only the used copper layers from front to back. - for( LAYER_NUM layer = LAST_COPPER_LAYER; layer >= FIRST_COPPER_LAYER; --layer ) + for( LAYER_NUM layer = LAST_COPPER_LAYER; layer >= FIRST_COPPER_LAYER; --layer) { LAYER_MSK mask = GetLayerMask( layer ); if( mask & aBoard->GetEnabledLayers() ) { - m_out->Print( aNestLevel + 1, "(%d %s %s", layer, - m_out->Quotew( aBoard->GetLayerName( layer ) ).c_str(), - LAYER::ShowType( aBoard->GetLayerType( layer ) ) ); + m_out->Print( aNestLevel+1, "(%d %s %s", layer, + m_out->Quotew( aBoard->GetLayerName( layer ) ).c_str(), + LAYER::ShowType( aBoard->GetLayerType( layer ) ) ); - if( ! ( aBoard->GetVisibleLayers() & mask ) ) + if( !( aBoard->GetVisibleLayers() & mask ) ) m_out->Print( 0, " hide" ); m_out->Print( 0, ")\n" ); @@ -541,15 +542,15 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const throw( IO_ERROR ) } // Save used non-copper layers in the order they are defined. - for( LAYER_NUM layer = FIRST_NON_COPPER_LAYER; layer <= LAST_NON_COPPER_LAYER; ++layer ) + for( LAYER_NUM layer = FIRST_NON_COPPER_LAYER; layer <= LAST_NON_COPPER_LAYER; ++layer) { LAYER_MSK mask = GetLayerMask( layer ); if( mask & aBoard->GetEnabledLayers() ) { - m_out->Print( aNestLevel + 1, "(%d %s user", layer, - m_out->Quotew( aBoard->GetLayerName( layer ) ).c_str() ); + m_out->Print( aNestLevel+1, "(%d %s user", layer, + m_out->Quotew( aBoard->GetLayerName( layer ) ).c_str() ); - if( ! ( aBoard->GetVisibleLayers() & mask ) ) + if( !( aBoard->GetVisibleLayers() & mask ) ) m_out->Print( 0, " hide" ); m_out->Print( 0, ")\n" ); @@ -562,110 +563,111 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const throw( IO_ERROR ) m_out->Print( aNestLevel, "(setup\n" ); // Save current default track width, for compatibility with older Pcbnew version; - m_out->Print( aNestLevel + 1, "(last_trace_width %s)\n", - FMTIU( dsnSettings.GetCurrentTrackWidth() ).c_str() ); + m_out->Print( aNestLevel+1, "(last_trace_width %s)\n", + FMTIU( dsnSettings.GetCurrentTrackWidth() ).c_str() ); // Save custom tracks width list (the first is not saved here: this is the netclass value for( unsigned ii = 1; ii < dsnSettings.m_TrackWidthList.size(); ii++ ) - m_out->Print( aNestLevel + 1, "(user_trace_width %s)\n", - FMTIU( dsnSettings.m_TrackWidthList[ii] ).c_str() ); + m_out->Print( aNestLevel+1, "(user_trace_width %s)\n", + FMTIU( dsnSettings.m_TrackWidthList[ii] ).c_str() ); - m_out->Print( aNestLevel + 1, "(trace_clearance %s)\n", - FMTIU( dsnSettings.GetDefault()->GetClearance() ).c_str() ); + m_out->Print( aNestLevel+1, "(trace_clearance %s)\n", + FMTIU( dsnSettings.GetDefault()->GetClearance() ).c_str() ); // ZONE_SETTINGS - m_out->Print( aNestLevel + 1, "(zone_clearance %s)\n", - FMTIU( aBoard->GetZoneSettings().m_ZoneClearance ).c_str() ); - m_out->Print( aNestLevel + 1, "(zone_45_only %s)\n", - aBoard->GetZoneSettings().m_Zone_45_Only ? "yes" : "no" ); + m_out->Print( aNestLevel+1, "(zone_clearance %s)\n", + FMTIU( aBoard->GetZoneSettings().m_ZoneClearance ).c_str() ); + m_out->Print( aNestLevel+1, "(zone_45_only %s)\n", + aBoard->GetZoneSettings().m_Zone_45_Only ? "yes" : "no" ); - m_out->Print( aNestLevel + 1, "(trace_min %s)\n", - FMTIU( dsnSettings.m_TrackMinWidth ).c_str() ); + m_out->Print( aNestLevel+1, "(trace_min %s)\n", + FMTIU( dsnSettings.m_TrackMinWidth ).c_str() ); - m_out->Print( aNestLevel + 1, "(segment_width %s)\n", - FMTIU( dsnSettings.m_DrawSegmentWidth ).c_str() ); - m_out->Print( aNestLevel + 1, "(edge_width %s)\n", - FMTIU( dsnSettings.m_EdgeSegmentWidth ).c_str() ); + m_out->Print( aNestLevel+1, "(segment_width %s)\n", + FMTIU( dsnSettings.m_DrawSegmentWidth ).c_str() ); + m_out->Print( aNestLevel+1, "(edge_width %s)\n", + FMTIU( dsnSettings.m_EdgeSegmentWidth ).c_str() ); // Save current default via size, for compatibility with older Pcbnew version; - m_out->Print( aNestLevel + 1, "(via_size %s)\n", - FMTIU( dsnSettings.GetDefault()->GetViaDiameter() ).c_str() ); - m_out->Print( aNestLevel + 1, "(via_drill %s)\n", - FMTIU( dsnSettings.GetDefault()->GetViaDrill() ).c_str() ); - m_out->Print( aNestLevel + 1, "(via_min_size %s)\n", - FMTIU( dsnSettings.m_ViasMinSize ).c_str() ); - m_out->Print( aNestLevel + 1, "(via_min_drill %s)\n", - FMTIU( dsnSettings.m_ViasMinDrill ).c_str() ); + m_out->Print( aNestLevel+1, "(via_size %s)\n", + FMTIU( dsnSettings.GetDefault()->GetViaDiameter() ).c_str() ); + m_out->Print( aNestLevel+1, "(via_drill %s)\n", + FMTIU( dsnSettings.GetDefault()->GetViaDrill() ).c_str() ); + m_out->Print( aNestLevel+1, "(via_min_size %s)\n", + FMTIU( dsnSettings.m_ViasMinSize ).c_str() ); + m_out->Print( aNestLevel+1, "(via_min_drill %s)\n", + FMTIU( dsnSettings.m_ViasMinDrill ).c_str() ); // Save custom vias diameters list (the first is not saved here: this is // the netclass value for( unsigned ii = 1; ii < dsnSettings.m_ViasDimensionsList.size(); ii++ ) - m_out->Print( aNestLevel + 1, "(user_via %s %s)\n", - FMTIU( dsnSettings.m_ViasDimensionsList[ii].m_Diameter ).c_str(), - FMTIU( dsnSettings.m_ViasDimensionsList[ii].m_Drill ).c_str() ); + m_out->Print( aNestLevel+1, "(user_via %s %s)\n", + FMTIU( dsnSettings.m_ViasDimensionsList[ii].m_Diameter ).c_str(), + FMTIU( dsnSettings.m_ViasDimensionsList[ii].m_Drill ).c_str() ); - // for old versions compatibility: + // for old versions compatibility: if( dsnSettings.m_BlindBuriedViaAllowed ) - m_out->Print( aNestLevel + 1, "(blind_buried_vias_allowed yes)\n" ); + m_out->Print( aNestLevel+1, "(blind_buried_vias_allowed yes)\n" ); - m_out->Print( aNestLevel + 1, "(uvia_size %s)\n", - FMTIU( dsnSettings.GetDefault()->GetuViaDiameter() ).c_str() ); - m_out->Print( aNestLevel + 1, "(uvia_drill %s)\n", - FMTIU( dsnSettings.GetDefault()->GetuViaDrill() ).c_str() ); - m_out->Print( aNestLevel + 1, "(uvias_allowed %s)\n", - ( dsnSettings.m_MicroViasAllowed ) ? "yes" : "no" ); - m_out->Print( aNestLevel + 1, "(uvia_min_size %s)\n", - FMTIU( dsnSettings.m_MicroViasMinSize ).c_str() ); - m_out->Print( aNestLevel + 1, "(uvia_min_drill %s)\n", - FMTIU( dsnSettings.m_MicroViasMinDrill ).c_str() ); + m_out->Print( aNestLevel+1, "(uvia_size %s)\n", + FMTIU( dsnSettings.GetDefault()->GetuViaDiameter() ).c_str() ); + m_out->Print( aNestLevel+1, "(uvia_drill %s)\n", + FMTIU( dsnSettings.GetDefault()->GetuViaDrill() ).c_str() ); + m_out->Print( aNestLevel+1, "(uvias_allowed %s)\n", + ( dsnSettings.m_MicroViasAllowed ) ? "yes" : "no" ); + m_out->Print( aNestLevel+1, "(uvia_min_size %s)\n", + FMTIU( dsnSettings.m_MicroViasMinSize ).c_str() ); + m_out->Print( aNestLevel+1, "(uvia_min_drill %s)\n", + FMTIU( dsnSettings.m_MicroViasMinDrill ).c_str() ); - m_out->Print( aNestLevel + 1, "(pcb_text_width %s)\n", - FMTIU( dsnSettings.m_PcbTextWidth ).c_str() ); - m_out->Print( aNestLevel + 1, "(pcb_text_size %s %s)\n", - FMTIU( dsnSettings.m_PcbTextSize.x ).c_str(), - FMTIU( dsnSettings.m_PcbTextSize.y ).c_str() ); + m_out->Print( aNestLevel+1, "(pcb_text_width %s)\n", + FMTIU( dsnSettings.m_PcbTextWidth ).c_str() ); + m_out->Print( aNestLevel+1, "(pcb_text_size %s %s)\n", + FMTIU( dsnSettings.m_PcbTextSize.x ).c_str(), + FMTIU( dsnSettings.m_PcbTextSize.y ).c_str() ); - m_out->Print( aNestLevel + 1, "(mod_edge_width %s)\n", - FMTIU( dsnSettings.m_ModuleSegmentWidth ).c_str() ); - m_out->Print( aNestLevel + 1, "(mod_text_size %s %s)\n", - FMTIU( dsnSettings.m_ModuleTextSize.x ).c_str(), - FMTIU( dsnSettings.m_ModuleTextSize.y ).c_str() ); - m_out->Print( aNestLevel + 1, "(mod_text_width %s)\n", - FMTIU( dsnSettings.m_ModuleTextWidth ).c_str() ); + m_out->Print( aNestLevel+1, "(mod_edge_width %s)\n", + FMTIU( dsnSettings.m_ModuleSegmentWidth ).c_str() ); + m_out->Print( aNestLevel+1, "(mod_text_size %s %s)\n", + FMTIU( dsnSettings.m_ModuleTextSize.x ).c_str(), + FMTIU( dsnSettings.m_ModuleTextSize.y ).c_str() ); + m_out->Print( aNestLevel+1, "(mod_text_width %s)\n", + FMTIU( dsnSettings.m_ModuleTextWidth ).c_str() ); - m_out->Print( aNestLevel + 1, "(pad_size %s %s)\n", - FMTIU( dsnSettings.m_Pad_Master.GetSize().x ).c_str(), - FMTIU( dsnSettings.m_Pad_Master.GetSize().y ).c_str() ); - m_out->Print( aNestLevel + 1, "(pad_drill %s)\n", - FMTIU( dsnSettings.m_Pad_Master.GetDrillSize().x ).c_str() ); + m_out->Print( aNestLevel+1, "(pad_size %s %s)\n", + FMTIU( dsnSettings.m_Pad_Master.GetSize().x ).c_str(), + FMTIU( dsnSettings.m_Pad_Master.GetSize().y ).c_str() ); + m_out->Print( aNestLevel+1, "(pad_drill %s)\n", + FMTIU( dsnSettings.m_Pad_Master.GetDrillSize().x ).c_str() ); - m_out->Print( aNestLevel + 1, "(pad_to_mask_clearance %s)\n", - FMTIU( dsnSettings.m_SolderMaskMargin ).c_str() ); + m_out->Print( aNestLevel+1, "(pad_to_mask_clearance %s)\n", + FMTIU( dsnSettings.m_SolderMaskMargin ).c_str() ); if( dsnSettings.m_SolderMaskMinWidth ) - m_out->Print( aNestLevel + 1, "(solder_mask_min_width %s)\n", - FMTIU( dsnSettings.m_SolderMaskMinWidth ).c_str() ); + m_out->Print( aNestLevel+1, "(solder_mask_min_width %s)\n", + FMTIU( dsnSettings.m_SolderMaskMinWidth ).c_str() ); if( dsnSettings.m_SolderPasteMargin != 0 ) - m_out->Print( aNestLevel + 1, "(pad_to_paste_clearance %s)\n", - FMTIU( dsnSettings.m_SolderPasteMargin ).c_str() ); + m_out->Print( aNestLevel+1, "(pad_to_paste_clearance %s)\n", + FMTIU( dsnSettings.m_SolderPasteMargin ).c_str() ); if( dsnSettings.m_SolderPasteMarginRatio != 0 ) - m_out->Print( aNestLevel + 1, "(pad_to_paste_clearance_ratio %s)\n", - Double2Str( dsnSettings.m_SolderPasteMarginRatio ).c_str() ); + m_out->Print( aNestLevel+1, "(pad_to_paste_clearance_ratio %s)\n", + Double2Str( dsnSettings.m_SolderPasteMarginRatio ).c_str() ); - m_out->Print( aNestLevel + 1, "(aux_axis_origin %s %s)\n", - FMTIU( aBoard->GetAuxOrigin().x ).c_str(), - FMTIU( aBoard->GetAuxOrigin().y ).c_str() ); + m_out->Print( aNestLevel+1, "(aux_axis_origin %s %s)\n", + FMTIU( aBoard->GetAuxOrigin().x ).c_str(), + FMTIU( aBoard->GetAuxOrigin().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, "(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", dsnSettings.GetVisibleElements() ); + m_out->Print( aNestLevel+1, "(visible_elements %X)\n", + dsnSettings.GetVisibleElements() ); - aBoard->GetPlotOptions().Format( m_out, aNestLevel + 1 ); + aBoard->GetPlotOptions().Format( m_out, aNestLevel+1 ); m_out->Print( aNestLevel, ")\n\n" ); @@ -673,8 +675,9 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const throw( IO_ERROR ) for( NETINFO_MAPPING::iterator net = m_mapping->begin(), netEnd = m_mapping->end(); net != netEnd; ++net ) { - m_out->Print( aNestLevel, "(net %d %s)\n", m_mapping->Translate( net->GetNet() ), - m_out->Quotew( net->GetNetname() ).c_str() ); + m_out->Print( aNestLevel, "(net %d %s)\n", + m_mapping->Translate( net->GetNet() ), + m_out->Quotew( net->GetNetname() ).c_str() ); } m_out->Print( 0, "\n" ); @@ -686,7 +689,8 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const throw( IO_ERROR ) // Save the rest of the net classes alphabetically. for( NETCLASSES::const_iterator it = dsnSettings.m_NetClasses.begin(); - it != dsnSettings.m_NetClasses.end(); ++it ) + it != dsnSettings.m_NetClasses.end(); + ++it ) { NETCLASS netclass = *it->second; filterNetClass( *aBoard, netclass ); // Remove empty nets (from a copy of a netclass) @@ -694,14 +698,14 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const throw( IO_ERROR ) } // Save the modules. - for( MODULE* module = aBoard->m_Modules; module; module = (MODULE*) module->Next() ) + for( MODULE* module = aBoard->m_Modules; module; module = (MODULE*) module->Next() ) { Format( module, aNestLevel ); m_out->Print( 0, "\n" ); } // Save the graphical items on the board (not owned by a module) - for( BOARD_ITEM* item = aBoard->m_Drawings; item; item = item->Next() ) + for( BOARD_ITEM* item = aBoard->m_Drawings; item; item = item->Next() ) Format( item, aNestLevel ); if( aBoard->m_Drawings.GetCount() ) @@ -710,7 +714,7 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const throw( IO_ERROR ) // Do not save MARKER_PCBs, they can be regenerated easily. // Save the tracks and vias. - for( TRACK* track = aBoard->m_Track; track; track = track->Next() ) + for( TRACK* track = aBoard->m_Track; track; track = track->Next() ) Format( track, aNestLevel ); if( aBoard->m_Track.GetCount() ) @@ -720,117 +724,121 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const throw( IO_ERROR ) /// will not be saved. // Save the polygon (which are the newer technology) zones. - for( int i = 0; i < aBoard->GetAreaCount(); ++i ) + for( int i = 0; i < aBoard->GetAreaCount(); ++i ) Format( aBoard->GetArea( i ), aNestLevel ); } -void PCB_IO::format( DIMENSION* aDimension, int aNestLevel ) const throw( IO_ERROR ) + +void PCB_IO::format( DIMENSION* aDimension, int aNestLevel ) const + throw( IO_ERROR ) { m_out->Print( aNestLevel, "(dimension %s (width %s)", - FMT_IU( aDimension->GetValue() ).c_str(), - FMT_IU( aDimension->GetWidth() ).c_str() ); + FMT_IU( aDimension->GetValue() ).c_str(), + FMT_IU( aDimension->GetWidth() ).c_str() ); formatLayer( aDimension ); if( aDimension->GetTimeStamp() ) - m_out->Print( 0, " (tstamp %lX)", aDimension->GetTimeStamp() ); + m_out->Print( 0, " (tstamp %lX)", aDimension->GetTimeStamp() ); m_out->Print( 0, "\n" ); Format( (TEXTE_PCB*) &aDimension->Text(), aNestLevel+1 ); m_out->Print( aNestLevel+1, "(feature1 (pts (xy %s %s) (xy %s %s)))\n", - FMT_IU( aDimension->m_featureLineDO.x ).c_str(), - FMT_IU( aDimension->m_featureLineDO.y ).c_str(), - FMT_IU( aDimension->m_featureLineDF.x ).c_str(), - FMT_IU( aDimension->m_featureLineDF.y ).c_str() ); + FMT_IU( aDimension->m_featureLineDO.x ).c_str(), + FMT_IU( aDimension->m_featureLineDO.y ).c_str(), + FMT_IU( aDimension->m_featureLineDF.x ).c_str(), + FMT_IU( aDimension->m_featureLineDF.y ).c_str() ); m_out->Print( aNestLevel+1, "(feature2 (pts (xy %s %s) (xy %s %s)))\n", - FMT_IU( aDimension->m_featureLineGO.x ).c_str(), - FMT_IU( aDimension->m_featureLineGO.y ).c_str(), - FMT_IU( aDimension->m_featureLineGF.x ).c_str(), - FMT_IU( aDimension->m_featureLineGF.y ).c_str() ); + FMT_IU( aDimension->m_featureLineGO.x ).c_str(), + FMT_IU( aDimension->m_featureLineGO.y ).c_str(), + FMT_IU( aDimension->m_featureLineGF.x ).c_str(), + FMT_IU( aDimension->m_featureLineGF.y ).c_str() ); m_out->Print( aNestLevel+1, "(crossbar (pts (xy %s %s) (xy %s %s)))\n", - FMT_IU( aDimension->m_crossBarO.x ).c_str(), - FMT_IU( aDimension->m_crossBarO.y ).c_str(), - FMT_IU( aDimension->m_crossBarF.x ).c_str(), - FMT_IU( aDimension->m_crossBarF.y ).c_str() ); + FMT_IU( aDimension->m_crossBarO.x ).c_str(), + FMT_IU( aDimension->m_crossBarO.y ).c_str(), + FMT_IU( aDimension->m_crossBarF.x ).c_str(), + FMT_IU( aDimension->m_crossBarF.y ).c_str() ); m_out->Print( aNestLevel+1, "(arrow1a (pts (xy %s %s) (xy %s %s)))\n", - FMT_IU( aDimension->m_crossBarF.x ).c_str(), - FMT_IU( aDimension->m_crossBarF.y ).c_str(), - FMT_IU( aDimension->m_arrowD1F.x ).c_str(), - FMT_IU( aDimension->m_arrowD1F.y ).c_str() ); + FMT_IU( aDimension->m_crossBarF.x ).c_str(), + FMT_IU( aDimension->m_crossBarF.y ).c_str(), + FMT_IU( aDimension->m_arrowD1F.x ).c_str(), + FMT_IU( aDimension->m_arrowD1F.y ).c_str() ); m_out->Print( aNestLevel+1, "(arrow1b (pts (xy %s %s) (xy %s %s)))\n", - FMT_IU( aDimension->m_crossBarF.x ).c_str(), - FMT_IU( aDimension->m_crossBarF.y ).c_str(), - FMT_IU( aDimension->m_arrowD2F.x ).c_str(), - FMT_IU( aDimension->m_arrowD2F.y ).c_str() ); + FMT_IU( aDimension->m_crossBarF.x ).c_str(), + FMT_IU( aDimension->m_crossBarF.y ).c_str(), + FMT_IU( aDimension->m_arrowD2F.x ).c_str(), + FMT_IU( aDimension->m_arrowD2F.y ).c_str() ); m_out->Print( aNestLevel+1, "(arrow2a (pts (xy %s %s) (xy %s %s)))\n", - FMT_IU( aDimension->m_crossBarO.x ).c_str(), - FMT_IU( aDimension->m_crossBarO.y ).c_str(), - FMT_IU( aDimension->m_arrowG1F.x ).c_str(), - FMT_IU( aDimension->m_arrowG1F.y ).c_str() ); + FMT_IU( aDimension->m_crossBarO.x ).c_str(), + FMT_IU( aDimension->m_crossBarO.y ).c_str(), + FMT_IU( aDimension->m_arrowG1F.x ).c_str(), + FMT_IU( aDimension->m_arrowG1F.y ).c_str() ); m_out->Print( aNestLevel+1, "(arrow2b (pts (xy %s %s) (xy %s %s)))\n", - FMT_IU( aDimension->m_crossBarO.x ).c_str(), - FMT_IU( aDimension->m_crossBarO.y ).c_str(), - FMT_IU( aDimension->m_arrowG2F.x ).c_str(), - FMT_IU( aDimension->m_arrowG2F.y ).c_str() ); + FMT_IU( aDimension->m_crossBarO.x ).c_str(), + FMT_IU( aDimension->m_crossBarO.y ).c_str(), + FMT_IU( aDimension->m_arrowG2F.x ).c_str(), + FMT_IU( aDimension->m_arrowG2F.y ).c_str() ); m_out->Print( aNestLevel, ")\n" ); } -void PCB_IO::format( DRAWSEGMENT* aSegment, int aNestLevel ) const throw( IO_ERROR ) + +void PCB_IO::format( DRAWSEGMENT* aSegment, int aNestLevel ) const + throw( IO_ERROR ) { unsigned i; - switch (aSegment->GetShape()) + switch( aSegment->GetShape() ) { case S_SEGMENT: // Line m_out->Print( aNestLevel, "(gr_line (start %s) (end %s)", - FMT_IU( aSegment->GetStart() ).c_str(), - FMT_IU( aSegment->GetEnd() ).c_str() ); + FMT_IU( aSegment->GetStart() ).c_str(), + FMT_IU( aSegment->GetEnd() ).c_str() ); if( aSegment->GetAngle() != 0.0 ) - m_out->Print( 0, " (angle %s)", FMT_ANGLE( aSegment->GetAngle() ).c_str() ); + m_out->Print( 0, " (angle %s)", FMT_ANGLE( aSegment->GetAngle() ).c_str() ); break; - case S_CIRCLE: // Circle + case S_CIRCLE: // Circle m_out->Print( aNestLevel, "(gr_circle (center %s) (end %s)", - FMT_IU( aSegment->GetStart() ).c_str(), - FMT_IU( aSegment->GetEnd() ).c_str() ); + FMT_IU( aSegment->GetStart() ).c_str(), + FMT_IU( aSegment->GetEnd() ).c_str() ); break; - case S_ARC:// Arc + case S_ARC: // Arc m_out->Print( aNestLevel, "(gr_arc (start %s) (end %s) (angle %s)", - FMT_IU( aSegment->GetStart() ).c_str(), - FMT_IU( aSegment->GetEnd() ).c_str(), - FMT_ANGLE( aSegment->GetAngle() ).c_str() ); + FMT_IU( aSegment->GetStart() ).c_str(), + FMT_IU( aSegment->GetEnd() ).c_str(), + FMT_ANGLE( aSegment->GetAngle() ).c_str() ); break; - case S_POLYGON:// Polygon + case S_POLYGON: // Polygon m_out->Print( aNestLevel, "(gr_poly (pts" ); - for( i = 0; i < aSegment->GetPolyPoints().size(); ++i ) - m_out->Print( 0, " (xy %s)", FMT_IU( aSegment->GetPolyPoints()[i] ).c_str() ); + for( i = 0; i < aSegment->GetPolyPoints().size(); ++i ) + m_out->Print( 0, " (xy %s)", FMT_IU( aSegment->GetPolyPoints()[i] ).c_str() ); m_out->Print( 0, ")" ); break; - case S_CURVE:// Bezier curve + case S_CURVE: // Bezier curve m_out->Print( aNestLevel, "(gr_curve (pts (xy %s) (xy %s) (xy %s) (xy %s))", - FMT_IU( aSegment->GetStart() ).c_str(), - FMT_IU( aSegment->GetBezControl1() ).c_str(), - FMT_IU( aSegment->GetBezControl2() ).c_str(), - FMT_IU( aSegment->GetEnd() ).c_str() ); + FMT_IU( aSegment->GetStart() ).c_str(), + FMT_IU( aSegment->GetBezControl1() ).c_str(), + FMT_IU( aSegment->GetBezControl2() ).c_str(), + FMT_IU( aSegment->GetEnd() ).c_str() ); break; - default: + default: wxFAIL_MSG( wxT( "Cannot format invalid DRAWSEGMENT type." ) ); }; @@ -848,33 +856,35 @@ void PCB_IO::format( DRAWSEGMENT* aSegment, int aNestLevel ) const throw( IO_ERR m_out->Print( 0, ")\n" ); } -void PCB_IO::format( EDGE_MODULE* aModuleDrawing, int aNestLevel ) const throw( IO_ERROR ) + +void PCB_IO::format( EDGE_MODULE* aModuleDrawing, int aNestLevel ) const + throw( IO_ERROR ) { - switch (aModuleDrawing->GetShape()) + switch( aModuleDrawing->GetShape() ) { case S_SEGMENT: // Line m_out->Print( aNestLevel, "(fp_line (start %s) (end %s)", - FMT_IU( aModuleDrawing->GetStart0() ).c_str(), - FMT_IU( aModuleDrawing->GetEnd0() ).c_str() ); + FMT_IU( aModuleDrawing->GetStart0() ).c_str(), + FMT_IU( aModuleDrawing->GetEnd0() ).c_str() ); break; - case S_CIRCLE: // Circle + case S_CIRCLE: // Circle m_out->Print( aNestLevel, "(fp_circle (center %s) (end %s)", - FMT_IU( aModuleDrawing->GetStart0() ).c_str(), - FMT_IU( aModuleDrawing->GetEnd0() ).c_str() ); + FMT_IU( aModuleDrawing->GetStart0() ).c_str(), + FMT_IU( aModuleDrawing->GetEnd0() ).c_str() ); break; - case S_ARC:// Arc + case S_ARC: // Arc m_out->Print( aNestLevel, "(fp_arc (start %s) (end %s) (angle %s)", - FMT_IU( aModuleDrawing->GetStart0() ).c_str(), - FMT_IU( aModuleDrawing->GetEnd0() ).c_str(), - FMT_ANGLE( aModuleDrawing->GetAngle() ).c_str() ); + FMT_IU( aModuleDrawing->GetStart0() ).c_str(), + FMT_IU( aModuleDrawing->GetEnd0() ).c_str(), + FMT_ANGLE( aModuleDrawing->GetAngle() ).c_str() ); break; - case S_POLYGON:// Polygon + case S_POLYGON: // Polygon m_out->Print( aNestLevel, "(fp_poly (pts" ); - for( unsigned i = 0; i < aModuleDrawing->GetPolyPoints().size(); ++i ) + for( unsigned i = 0; i < aModuleDrawing->GetPolyPoints().size(); ++i ) { int nestLevel = 0; @@ -885,75 +895,80 @@ void PCB_IO::format( EDGE_MODULE* aModuleDrawing, int aNestLevel ) const throw( } m_out->Print( nestLevel, "%s(xy %s)", - nestLevel ? "" : " ", - FMT_IU( aModuleDrawing->GetPolyPoints()[i] ).c_str() ); + nestLevel ? "" : " ", + FMT_IU( aModuleDrawing->GetPolyPoints()[i] ).c_str() ); } m_out->Print( 0, ")" ); break; - case S_CURVE: // Bezier curve + case S_CURVE: // Bezier curve m_out->Print( aNestLevel, "(fp_curve (pts (xy %s) (xy %s) (xy %s) (xy %s))", - FMT_IU( aModuleDrawing->GetStart0() ).c_str(), - FMT_IU( aModuleDrawing->GetBezControl1() ).c_str(), - FMT_IU( aModuleDrawing->GetBezControl2() ).c_str(), - FMT_IU( aModuleDrawing->GetEnd0() ).c_str() ); + FMT_IU( aModuleDrawing->GetStart0() ).c_str(), + FMT_IU( aModuleDrawing->GetBezControl1() ).c_str(), + FMT_IU( aModuleDrawing->GetBezControl2() ).c_str(), + FMT_IU( aModuleDrawing->GetEnd0() ).c_str() ); break; - default: + default: wxFAIL_MSG( wxT( "Cannot format invalid DRAWSEGMENT type." ) ); }; formatLayer( aModuleDrawing ); if( aModuleDrawing->GetWidth() != 0 ) - m_out->Print( 0, " (width %s)", FMT_IU( aModuleDrawing->GetWidth() ).c_str() ); + m_out->Print( 0, " (width %s)", FMT_IU( aModuleDrawing->GetWidth() ).c_str() ); /* 11-Nov-2021 remove if no one whines after a couple of months. Simple graphic items - perhaps do not need these. - if( aModuleDrawing->GetTimeStamp() ) - m_out->Print( 0, " (tstamp %lX)", aModuleDrawing->GetTimeStamp() ); + perhaps do not need these. + if( aModuleDrawing->GetTimeStamp() ) + m_out->Print( 0, " (tstamp %lX)", aModuleDrawing->GetTimeStamp() ); - if( aModuleDrawing->GetStatus() ) - m_out->Print( 0, " (status %X)", aModuleDrawing->GetStatus() ); - */ + if( aModuleDrawing->GetStatus() ) + m_out->Print( 0, " (status %X)", aModuleDrawing->GetStatus() ); + */ m_out->Print( 0, ")\n" ); } -void PCB_IO::format( PCB_TARGET* aTarget, int aNestLevel ) const throw( IO_ERROR ) + +void PCB_IO::format( PCB_TARGET* aTarget, int aNestLevel ) const + throw( IO_ERROR ) { m_out->Print( aNestLevel, "(target %s (at %s) (size %s)", - ( aTarget->GetShape() ) ? "x" : "plus", - FMT_IU( aTarget->GetPosition() ).c_str(), - FMT_IU( aTarget->GetSize() ).c_str() ); + ( aTarget->GetShape() ) ? "x" : "plus", + FMT_IU( aTarget->GetPosition() ).c_str(), + FMT_IU( aTarget->GetSize() ).c_str() ); if( aTarget->GetWidth() != 0 ) - m_out->Print( 0, " (width %s)", FMT_IU( aTarget->GetWidth() ).c_str() ); + m_out->Print( 0, " (width %s)", FMT_IU( aTarget->GetWidth() ).c_str() ); formatLayer( aTarget ); if( aTarget->GetTimeStamp() ) - m_out->Print( 0, " (tstamp %lX)", aTarget->GetTimeStamp() ); + m_out->Print( 0, " (tstamp %lX)", aTarget->GetTimeStamp() ); m_out->Print( 0, ")\n" ); } -void PCB_IO::format( MODULE* aModule, int aNestLevel ) const throw( IO_ERROR ) + +void PCB_IO::format( MODULE* aModule, int aNestLevel ) const + throw( IO_ERROR ) { - if( ! ( m_ctl & CTL_OMIT_INITIAL_COMMENTS ) ) + if( !( m_ctl & CTL_OMIT_INITIAL_COMMENTS ) ) { const wxArrayString* initial_comments = aModule->GetInitialComments(); if( initial_comments ) { - for( unsigned i = 0; i < initial_comments->GetCount(); ++i ) - m_out->Print( aNestLevel, "%s\n", TO_UTF8( ( *initial_comments )[i] ) ); + for( unsigned i=0; iGetCount(); ++i ) + m_out->Print( aNestLevel, "%s\n", TO_UTF8( (*initial_comments)[i] ) ); m_out->Print( 0, "\n" ); // improve readability? } } - m_out->Print( aNestLevel, "(module %s", m_out->Quotes( aModule->GetFPID().Format() ).c_str() ); + m_out->Print( aNestLevel, "(module %s", + m_out->Quotes( aModule->GetFPID().Format() ).c_str() ); if( aModule->IsLocked() ) m_out->Print( 0, " locked" ); @@ -963,71 +978,73 @@ void PCB_IO::format( MODULE* aModule, int aNestLevel ) const throw( IO_ERROR ) formatLayer( aModule ); - if( ! ( m_ctl & CTL_OMIT_TSTAMPS ) ) + if( !( m_ctl & CTL_OMIT_TSTAMPS ) ) { - m_out->Print( 0, " (tedit %lX) (tstamp %lX)\n", aModule->GetLastEditTime(), - aModule->GetTimeStamp() ); - } else + m_out->Print( 0, " (tedit %lX) (tstamp %lX)\n", + aModule->GetLastEditTime(), aModule->GetTimeStamp() ); + } + else m_out->Print( 0, "\n" ); - if( ! ( m_ctl & CTL_OMIT_AT ) ) + if( !( m_ctl & CTL_OMIT_AT ) ) { - m_out->Print( aNestLevel + 1, "(at %s", FMT_IU( aModule->GetPosition() ).c_str() ); + m_out->Print( aNestLevel+1, "(at %s", FMT_IU( aModule->GetPosition() ).c_str() ); if( aModule->GetOrientation() != 0.0 ) - m_out->Print( 0, " %s", FMT_ANGLE( aModule->GetOrientation() ).c_str() ); + m_out->Print( 0, " %s", FMT_ANGLE( aModule->GetOrientation() ).c_str() ); m_out->Print( 0, ")\n" ); } if( !aModule->GetDescription().IsEmpty() ) - m_out->Print( aNestLevel + 1, "(descr %s)\n", - m_out->Quotew( aModule->GetDescription() ).c_str() ); + m_out->Print( aNestLevel+1, "(descr %s)\n", + m_out->Quotew( aModule->GetDescription() ).c_str() ); if( !aModule->GetKeywords().IsEmpty() ) - m_out->Print( aNestLevel + 1, "(tags %s)\n", - m_out->Quotew( aModule->GetKeywords() ).c_str() ); + m_out->Print( aNestLevel+1, "(tags %s)\n", + m_out->Quotew( aModule->GetKeywords() ).c_str() ); - if( ! ( m_ctl & CTL_OMIT_PATH ) && !!aModule->GetPath() ) - m_out->Print( aNestLevel + 1, "(path %s)\n", m_out->Quotew( aModule->GetPath() ).c_str() ); + if( !( m_ctl & CTL_OMIT_PATH ) && !!aModule->GetPath() ) + m_out->Print( aNestLevel+1, "(path %s)\n", + m_out->Quotew( aModule->GetPath() ).c_str() ); if( aModule->GetPlacementCost90() != 0 ) - m_out->Print( aNestLevel + 1, "(autoplace_cost90 %d)\n", aModule->GetPlacementCost90() ); + m_out->Print( aNestLevel+1, "(autoplace_cost90 %d)\n", aModule->GetPlacementCost90() ); if( aModule->GetPlacementCost180() != 0 ) - m_out->Print( aNestLevel + 1, "(autoplace_cost180 %d)\n", aModule->GetPlacementCost180() ); + m_out->Print( aNestLevel+1, "(autoplace_cost180 %d)\n", aModule->GetPlacementCost180() ); if( aModule->GetLocalSolderMaskMargin() != 0 ) - m_out->Print( aNestLevel + 1, "(solder_mask_margin %s)\n", - FMT_IU( aModule->GetLocalSolderMaskMargin() ).c_str() ); + m_out->Print( aNestLevel+1, "(solder_mask_margin %s)\n", + FMT_IU( aModule->GetLocalSolderMaskMargin() ).c_str() ); if( aModule->GetLocalSolderPasteMargin() != 0 ) - m_out->Print( aNestLevel + 1, "(solder_paste_margin %s)\n", - FMT_IU( aModule->GetLocalSolderPasteMargin() ).c_str() ); + m_out->Print( aNestLevel+1, "(solder_paste_margin %s)\n", + FMT_IU( aModule->GetLocalSolderPasteMargin() ).c_str() ); if( aModule->GetLocalSolderPasteMarginRatio() != 0 ) - m_out->Print( aNestLevel + 1, "(solder_paste_ratio %s)\n", - Double2Str( aModule->GetLocalSolderPasteMarginRatio() ).c_str() ); + m_out->Print( aNestLevel+1, "(solder_paste_ratio %s)\n", + Double2Str( aModule->GetLocalSolderPasteMarginRatio() ).c_str() ); if( aModule->GetLocalClearance() != 0 ) - m_out->Print( aNestLevel + 1, "(clearance %s)\n", - FMT_IU( aModule->GetLocalClearance() ).c_str() ); + m_out->Print( aNestLevel+1, "(clearance %s)\n", + FMT_IU( aModule->GetLocalClearance() ).c_str() ); if( aModule->GetZoneConnection() != UNDEFINED_CONNECTION ) - m_out->Print( aNestLevel + 1, "(zone_connect %d)\n", aModule->GetZoneConnection() ); + m_out->Print( aNestLevel+1, "(zone_connect %d)\n", aModule->GetZoneConnection() ); if( aModule->GetThermalWidth() != 0 ) - m_out->Print( aNestLevel + 1, "(thermal_width %s)\n", - FMT_IU( aModule->GetThermalWidth() ).c_str() ); + m_out->Print( aNestLevel+1, "(thermal_width %s)\n", + FMT_IU( aModule->GetThermalWidth() ).c_str() ); if( aModule->GetThermalGap() != 0 ) - m_out->Print( aNestLevel + 1, "(thermal_gap %s)\n", - FMT_IU( aModule->GetThermalGap() ).c_str() ); + m_out->Print( aNestLevel+1, "(thermal_gap %s)\n", + FMT_IU( aModule->GetThermalGap() ).c_str() ); - // Attributes + // Attributes if( aModule->GetAttributes() != MOD_DEFAULT ) { - m_out->Print( aNestLevel + 1, "(attr" ); + m_out->Print( aNestLevel+1, "(attr" ); if( aModule->GetAttributes() & MOD_CMS ) m_out->Print( 0, " smd" ); @@ -1038,50 +1055,52 @@ void PCB_IO::format( MODULE* aModule, int aNestLevel ) const throw( IO_ERROR ) m_out->Print( 0, ")\n" ); } - Format( (BOARD_ITEM*) &aModule->Reference(), aNestLevel + 1 ); - Format( (BOARD_ITEM*) &aModule->Value(), aNestLevel + 1 ); + Format( (BOARD_ITEM*) &aModule->Reference(), aNestLevel+1 ); + Format( (BOARD_ITEM*) &aModule->Value(), aNestLevel+1 ); // Save drawing elements. - for( BOARD_ITEM* gr = aModule->GraphicalItems(); gr; gr = gr->Next() ) - Format( gr, aNestLevel + 1 ); + for( BOARD_ITEM* gr = aModule->GraphicalItems(); gr; gr = gr->Next() ) + Format( gr, aNestLevel+1 ); // Save pads. - for( D_PAD* pad = aModule->Pads(); pad; pad = pad->Next() ) - format( pad, aNestLevel + 1 ); + for( D_PAD* pad = aModule->Pads(); pad; pad = pad->Next() ) + format( pad, aNestLevel+1 ); // Save 3D info. - for( S3D_MASTER* t3D = aModule->Models(); t3D; t3D = t3D->Next() ) + for( S3D_MASTER* t3D = aModule->Models(); t3D; t3D = t3D->Next() ) { if( !t3D->GetShape3DName().IsEmpty() ) { - m_out->Print( aNestLevel + 1, "(model %s\n", - m_out->Quotew( t3D->GetShape3DName() ).c_str() ); + m_out->Print( aNestLevel+1, "(model %s\n", + m_out->Quotew( t3D->GetShape3DName() ).c_str() ); - m_out->Print( aNestLevel + 2, "(at (xyz %s %s %s))\n", - Double2Str( t3D->m_MatPosition.x ).c_str(), - Double2Str( t3D->m_MatPosition.y ).c_str(), - Double2Str( t3D->m_MatPosition.z ).c_str() ); + m_out->Print( aNestLevel+2, "(at (xyz %s %s %s))\n", + Double2Str( t3D->m_MatPosition.x ).c_str(), + Double2Str( t3D->m_MatPosition.y ).c_str(), + Double2Str( t3D->m_MatPosition.z ).c_str() ); - m_out->Print( aNestLevel + 2, "(scale (xyz %s %s %s))\n", - Double2Str( t3D->m_MatScale.x ).c_str(), - Double2Str( t3D->m_MatScale.y ).c_str(), - Double2Str( t3D->m_MatScale.z ).c_str() ); + m_out->Print( aNestLevel+2, "(scale (xyz %s %s %s))\n", + Double2Str( t3D->m_MatScale.x ).c_str(), + Double2Str( t3D->m_MatScale.y ).c_str(), + Double2Str( t3D->m_MatScale.z ).c_str() ); - m_out->Print( aNestLevel + 2, "(rotate (xyz %s %s %s))\n", - Double2Str( t3D->m_MatRotation.x ).c_str(), - Double2Str( t3D->m_MatRotation.y ).c_str(), - Double2Str( t3D->m_MatRotation.z ).c_str() ); + m_out->Print( aNestLevel+2, "(rotate (xyz %s %s %s))\n", + Double2Str( t3D->m_MatRotation.x ).c_str(), + Double2Str( t3D->m_MatRotation.y ).c_str(), + Double2Str( t3D->m_MatRotation.z ).c_str() ); - m_out->Print( aNestLevel + 1, ")\n" ); + m_out->Print( aNestLevel+1, ")\n" ); } } m_out->Print( aNestLevel, ")\n" ); } -void PCB_IO::formatLayers( LAYER_MSK aLayerMask, int aNestLevel ) const throw( IO_ERROR ) + +void PCB_IO::formatLayers( LAYER_MSK aLayerMask, int aNestLevel ) const + throw( IO_ERROR ) { - std::string output; + std::string output; if( aNestLevel == 0 ) output += ' '; @@ -1099,38 +1118,35 @@ void PCB_IO::formatLayers( LAYER_MSK aLayerMask, int aNestLevel ) const throw( I { output += " *.Cu"; aLayerMask &= ~ALL_CU_LAYERS; // clear bits, so they are not output again below - } else if( ( aLayerMask & cuMask ) == ( LAYER_BACK | LAYER_FRONT ) ) + } + else if( ( aLayerMask & cuMask ) == (LAYER_BACK | LAYER_FRONT) ) { output += " F&B.Cu"; - aLayerMask &= ~ ( LAYER_BACK | LAYER_FRONT ); + aLayerMask &= ~(LAYER_BACK | LAYER_FRONT); } - if( ( aLayerMask & ( ADHESIVE_LAYER_BACK | ADHESIVE_LAYER_FRONT ) ) - == ( ADHESIVE_LAYER_BACK | ADHESIVE_LAYER_FRONT ) ) + if( ( aLayerMask & (ADHESIVE_LAYER_BACK | ADHESIVE_LAYER_FRONT)) == (ADHESIVE_LAYER_BACK | ADHESIVE_LAYER_FRONT) ) { output += " *.Adhes"; - aLayerMask &= ~ ( ADHESIVE_LAYER_BACK | ADHESIVE_LAYER_FRONT ); + aLayerMask &= ~(ADHESIVE_LAYER_BACK | ADHESIVE_LAYER_FRONT); } - if( ( aLayerMask & ( SOLDERPASTE_LAYER_BACK | SOLDERPASTE_LAYER_FRONT ) ) - == ( SOLDERPASTE_LAYER_BACK | SOLDERPASTE_LAYER_FRONT ) ) + if( ( aLayerMask & (SOLDERPASTE_LAYER_BACK | SOLDERPASTE_LAYER_FRONT)) == (SOLDERPASTE_LAYER_BACK | SOLDERPASTE_LAYER_FRONT) ) { output += " *.Paste"; - aLayerMask &= ~ ( SOLDERPASTE_LAYER_BACK | SOLDERPASTE_LAYER_FRONT ); + aLayerMask &= ~(SOLDERPASTE_LAYER_BACK | SOLDERPASTE_LAYER_FRONT); } - if( ( aLayerMask & ( SILKSCREEN_LAYER_BACK | SILKSCREEN_LAYER_FRONT ) ) - == ( SILKSCREEN_LAYER_BACK | SILKSCREEN_LAYER_FRONT ) ) + if( ( aLayerMask & (SILKSCREEN_LAYER_BACK | SILKSCREEN_LAYER_FRONT)) == (SILKSCREEN_LAYER_BACK | SILKSCREEN_LAYER_FRONT) ) { output += " *.SilkS"; - aLayerMask &= ~ ( SILKSCREEN_LAYER_BACK | SILKSCREEN_LAYER_FRONT ); + aLayerMask &= ~(SILKSCREEN_LAYER_BACK | SILKSCREEN_LAYER_FRONT); } - if( ( aLayerMask & ( SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT ) ) - == ( SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT ) ) + if( ( aLayerMask & (SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT)) == (SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT) ) { output += " *.Mask"; - aLayerMask &= ~ ( SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT ); + aLayerMask &= ~(SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT); } // output any individual layers not handled in wildcard combos above @@ -1144,11 +1160,10 @@ void PCB_IO::formatLayers( LAYER_MSK aLayerMask, int aNestLevel ) const throw( I { if( aLayerMask & GetLayerMask( layer ) ) { - if( m_board && ! ( m_ctl & CTL_STD_LAYER_NAMES ) ) + if( m_board && !( m_ctl & CTL_STD_LAYER_NAMES ) ) layerName = m_board->GetLayerName( layer ); - else - // I am being called from FootprintSave() + else // I am being called from FootprintSave() layerName = BOARD::GetStandardLayerName( layer ); output += ' '; @@ -1159,53 +1174,40 @@ void PCB_IO::formatLayers( LAYER_MSK aLayerMask, int aNestLevel ) const throw( I m_out->Print( aNestLevel, "%s)", output.c_str() ); } -void PCB_IO::format( D_PAD* aPad, int aNestLevel ) const throw( IO_ERROR ) + +void PCB_IO::format( D_PAD* aPad, int aNestLevel ) const + throw( IO_ERROR ) { const char* shape; - switch (aPad->GetShape()) + switch( aPad->GetShape() ) { - case PAD_CIRCLE: - shape = "circle"; - break; - case PAD_RECT: - shape = "rect"; - break; - case PAD_OVAL: - shape = "oval"; - break; - case PAD_TRAPEZOID: - shape = "trapezoid"; - break; + case PAD_CIRCLE: shape = "circle"; break; + case PAD_RECT: shape = "rect"; break; + case PAD_OVAL: shape = "oval"; break; + case PAD_TRAPEZOID: shape = "trapezoid"; break; default: - THROW_IO_ERROR( wxString::Format( _( "unknown pad type: %d" ), aPad->GetShape() ) ); + THROW_IO_ERROR( wxString::Format( _( "unknown pad type: %d"), aPad->GetShape() ) ); } const char* type; - switch (aPad->GetAttribute()) + switch( aPad->GetAttribute() ) { - case PAD_STANDARD: - type = "thru_hole"; - break; - case PAD_SMD: - type = "smd"; - break; - case PAD_CONN: - type = "connect"; - break; - case PAD_HOLE_NOT_PLATED: - type = "np_thru_hole"; - break; + case PAD_STANDARD: type = "thru_hole"; break; + case PAD_SMD: type = "smd"; break; + case PAD_CONN: type = "connect"; break; + case PAD_HOLE_NOT_PLATED: type = "np_thru_hole"; break; default: - THROW_IO_ERROR( - wxString::Format( _( "unknown pad attribute: %d" ), aPad->GetAttribute() ) ); + THROW_IO_ERROR( wxString::Format( _( "unknown pad attribute: %d" ), + aPad->GetAttribute() ) ); } - m_out->Print( aNestLevel, "(pad %s %s %s", m_out->Quotew( aPad->GetPadName() ).c_str(), type, - shape ); + m_out->Print( aNestLevel, "(pad %s %s %s", + m_out->Quotew( aPad->GetPadName() ).c_str(), + type, shape ); m_out->Print( 0, " (at %s", FMT_IU( aPad->GetPos0() ).c_str() ); if( aPad->GetOrientation() != 0.0 ) @@ -1214,14 +1216,14 @@ void PCB_IO::format( D_PAD* aPad, int aNestLevel ) const throw( IO_ERROR ) m_out->Print( 0, ")" ); m_out->Print( 0, " (size %s)", FMT_IU( aPad->GetSize() ).c_str() ); - if( ( aPad->GetDelta().GetWidth() ) != 0 || ( aPad->GetDelta().GetHeight() != 0 ) ) + if( (aPad->GetDelta().GetWidth()) != 0 || (aPad->GetDelta().GetHeight() != 0 ) ) m_out->Print( 0, " (rect_delta %s )", FMT_IU( aPad->GetDelta() ).c_str() ); wxSize sz = aPad->GetDrillSize(); wxPoint shapeoffset = aPad->GetOffset(); - if( ( sz.GetWidth() > 0 ) || ( sz.GetHeight() > 0 ) || ( shapeoffset.x != 0 ) - || ( shapeoffset.y != 0 ) ) + if( (sz.GetWidth() > 0) || (sz.GetHeight() > 0) || + (shapeoffset.x != 0) || (shapeoffset.y != 0) ) { m_out->Print( 0, " (drill" ); @@ -1229,12 +1231,12 @@ void PCB_IO::format( D_PAD* aPad, int aNestLevel ) const throw( IO_ERROR ) m_out->Print( 0, " oval" ); if( sz.GetWidth() > 0 ) - m_out->Print( 0, " %s", FMT_IU( sz.GetWidth() ).c_str() ); + m_out->Print( 0, " %s", FMT_IU( sz.GetWidth() ).c_str() ); - if( sz.GetHeight() > 0 && sz.GetWidth() != sz.GetHeight() ) - m_out->Print( 0, " %s", FMT_IU( sz.GetHeight() ).c_str() ); + if( sz.GetHeight() > 0 && sz.GetWidth() != sz.GetHeight() ) + m_out->Print( 0, " %s", FMT_IU( sz.GetHeight() ).c_str() ); - if( ( shapeoffset.x != 0 ) || ( shapeoffset.y != 0 ) ) + if( (shapeoffset.x != 0) || (shapeoffset.y != 0) ) m_out->Print( 0, " (offset %s)", FMT_IU( aPad->GetOffset() ).c_str() ); m_out->Print( 0, ")" ); @@ -1245,9 +1247,9 @@ void PCB_IO::format( D_PAD* aPad, int aNestLevel ) const throw( IO_ERROR ) std::string output; // Unconnected pad is default net so don't save it. - if( ! ( m_ctl & CTL_OMIT_NETS ) && aPad->GetNetCode() != NETINFO_LIST::UNCONNECTED ) + if( !( m_ctl & CTL_OMIT_NETS ) && aPad->GetNetCode() != NETINFO_LIST::UNCONNECTED ) StrPrintf( &output, " (net %d %s)", m_mapping->Translate( aPad->GetNetCode() ), - m_out->Quotew( aPad->GetNetname() ).c_str() ); + m_out->Quotew( aPad->GetNetname() ).c_str() ); if( aPad->GetPadToDieLength() != 0 ) StrPrintf( &output, " (die_length %s)", FMT_IU( aPad->GetPadToDieLength() ).c_str() ); @@ -1277,26 +1279,29 @@ void PCB_IO::format( D_PAD* aPad, int aNestLevel ) const throw( IO_ERROR ) if( output.size() ) { m_out->Print( 0, "\n" ); - m_out->Print( aNestLevel + 1, "%s", output.c_str() + 1 ); // +1 skips 1st space on 1st element + m_out->Print( aNestLevel+1, "%s", output.c_str()+1 ); // +1 skips 1st space on 1st element } m_out->Print( 0, ")\n" ); } -void PCB_IO::format( TEXTE_PCB* aText, int aNestLevel ) const throw( IO_ERROR ) + +void PCB_IO::format( TEXTE_PCB* aText, int aNestLevel ) const + throw( IO_ERROR ) { - m_out->Print( aNestLevel, "(gr_text %s (at %s", m_out->Quotew( aText->GetText() ).c_str(), - FMT_IU( aText->GetTextPosition() ).c_str() ); + m_out->Print( aNestLevel, "(gr_text %s (at %s", + m_out->Quotew( aText->GetText() ).c_str(), + FMT_IU( aText->GetTextPosition() ).c_str() ); if( aText->GetOrientation() != 0.0 ) - m_out->Print( 0, " %s", FMT_ANGLE( aText->GetOrientation() ).c_str() ); + m_out->Print( 0, " %s", FMT_ANGLE( aText->GetOrientation() ).c_str() ); m_out->Print( 0, ")" ); formatLayer( aText ); if( aText->GetTimeStamp() ) - m_out->Print( 0, " (tstamp %lX)", aText->GetTimeStamp() ); + m_out->Print( 0, " (tstamp %lX)", aText->GetTimeStamp() ); m_out->Print( 0, "\n" ); @@ -1305,22 +1310,19 @@ void PCB_IO::format( TEXTE_PCB* aText, int aNestLevel ) const throw( IO_ERROR ) m_out->Print( aNestLevel, ")\n" ); } -void PCB_IO::format( TEXTE_MODULE* aText, int aNestLevel ) const throw( IO_ERROR ) + +void PCB_IO::format( TEXTE_MODULE* aText, int aNestLevel ) const + throw( IO_ERROR ) { - MODULE* parent = (MODULE*) aText->GetParent(); - double orient = aText->GetOrientation(); + MODULE* parent = (MODULE*) aText->GetParent(); + double orient = aText->GetOrientation(); wxString type; - switch (aText->GetType()) + switch( aText->GetType() ) { - case TEXTE_MODULE::TEXT_is_REFERENCE: - type = wxT( "reference" ); - break; - case TEXTE_MODULE::TEXT_is_VALUE: - type = wxT( "value" ); - break; - default: - type = wxT( "user" ); + case TEXTE_MODULE::TEXT_is_REFERENCE: type = wxT( "reference" ); break; + case TEXTE_MODULE::TEXT_is_VALUE: type = wxT( "value" ); break; + default: type = wxT( "user" ); } // Due to the Pcbnew history, m_Orient is saved in screen value @@ -1328,9 +1330,10 @@ void PCB_IO::format( TEXTE_MODULE* aText, int aNestLevel ) const throw( IO_ERROR if( parent ) orient += parent->GetOrientation(); - m_out->Print( aNestLevel, "(fp_text %s %s (at %s", m_out->Quotew( type ).c_str(), - m_out->Quotew( aText->GetText() ).c_str(), - FMT_IU( aText->GetPos0() ).c_str() ); + m_out->Print( aNestLevel, "(fp_text %s %s (at %s", + m_out->Quotew( type ).c_str(), + m_out->Quotew( aText->GetText() ).c_str(), + FMT_IU( aText->GetPos0() ).c_str() ); if( orient != 0.0 ) m_out->Print( 0, " %s", FMT_ANGLE( orient ).c_str() ); @@ -1348,23 +1351,25 @@ void PCB_IO::format( TEXTE_MODULE* aText, int aNestLevel ) const throw( IO_ERROR m_out->Print( aNestLevel, ")\n" ); } -void PCB_IO::format( TRACK* aTrack, int aNestLevel ) const throw( IO_ERROR ) + +void PCB_IO::format( TRACK* aTrack, int aNestLevel ) const + throw( IO_ERROR ) { if( aTrack->Type() == PCB_VIA_T ) { LAYER_NUM layer1, layer2; - const VIA* via = static_cast( aTrack ); - BOARD* board = (BOARD*) via->GetParent(); + const VIA* via = static_cast(aTrack); + BOARD* board = (BOARD*) via->GetParent(); - wxCHECK_RET( board != 0, - wxT( "Via " ) + via->GetSelectMenuText() + wxT( " has no parent." ) ); + wxCHECK_RET( board != 0, wxT( "Via " ) + via->GetSelectMenuText() + + wxT( " has no parent." ) ); m_out->Print( aNestLevel, "(via" ); via->LayerPair( &layer1, &layer2 ); - switch (via->GetViaType()) + switch( via->GetViaType() ) { case VIA_THROUGH: // Default shape not saved. break; @@ -1378,24 +1383,25 @@ void PCB_IO::format( TRACK* aTrack, int aNestLevel ) const throw( IO_ERROR ) break; default: - THROW_IO_ERROR( wxString::Format( _( "unknown via type %d" ), via->GetViaType() ) ); + THROW_IO_ERROR( wxString::Format( _( "unknown via type %d" ), via->GetViaType() ) ); } m_out->Print( 0, " (at %s) (size %s)", - FMT_IU( aTrack->GetStart() ).c_str(), - FMT_IU( aTrack->GetWidth() ).c_str() ); + FMT_IU( aTrack->GetStart() ).c_str(), + FMT_IU( aTrack->GetWidth() ).c_str() ); if( via->GetDrill() != UNDEFINED_DRILL_DIAMETER ) m_out->Print( 0, " (drill %s)", FMT_IU( via->GetDrill() ).c_str() ); m_out->Print( 0, " (layers %s %s)", - m_out->Quotew( m_board->GetLayerName( layer1 ) ).c_str(), - m_out->Quotew( m_board->GetLayerName( layer2 ) ).c_str() ); - } else + m_out->Quotew( m_board->GetLayerName( layer1 ) ).c_str(), + m_out->Quotew( m_board->GetLayerName( layer2 ) ).c_str() ); + } + else { m_out->Print( aNestLevel, "(segment (start %s) (end %s) (width %s)", - FMT_IU( aTrack->GetStart() ).c_str(), FMT_IU( aTrack->GetEnd() ).c_str(), - FMT_IU( aTrack->GetWidth() ).c_str() ); + FMT_IU( aTrack->GetStart() ).c_str(), FMT_IU( aTrack->GetEnd() ).c_str(), + FMT_IU( aTrack->GetWidth() ).c_str() ); m_out->Print( 0, " (layer %s)", m_out->Quotew( aTrack->GetLayerName() ).c_str() ); } @@ -1403,22 +1409,24 @@ void PCB_IO::format( TRACK* aTrack, int aNestLevel ) const throw( IO_ERROR ) m_out->Print( 0, " (net %d)", m_mapping->Translate( aTrack->GetNetCode() ) ); if( aTrack->GetTimeStamp() != 0 ) - m_out->Print( 0, " (tstamp %lX)", aTrack->GetTimeStamp() ); + m_out->Print( 0, " (tstamp %lX)", aTrack->GetTimeStamp() ); if( aTrack->GetStatus() != 0 ) - m_out->Print( 0, " (status %X)", aTrack->GetStatus() ); + m_out->Print( 0, " (status %X)", aTrack->GetStatus() ); m_out->Print( 0, ")\n" ); } -void PCB_IO::format( ZONE_CONTAINER* aZone, int aNestLevel ) const throw( IO_ERROR ) + +void PCB_IO::format( ZONE_CONTAINER* aZone, int aNestLevel ) const + throw( IO_ERROR ) { // Save the NET info; For keepout zones, net code and net name are irrelevant // so be sure a dummy value is stored, just for ZONE_CONTAINER compatibility // (perhaps netcode and netname should be not stored) m_out->Print( aNestLevel, "(zone (net %d) (net_name %s)", - aZone->GetIsKeepout() ? 0 : m_mapping->Translate( aZone->GetNetCode() ), - m_out->Quotew( aZone->GetIsKeepout() ? wxT( "" ) : aZone->GetNetname() ).c_str() ); + aZone->GetIsKeepout() ? 0 : m_mapping->Translate( aZone->GetNetCode() ), + m_out->Quotew( aZone->GetIsKeepout() ? wxT("") : aZone->GetNetname() ).c_str() ); formatLayer( aZone ); @@ -1427,29 +1435,23 @@ void PCB_IO::format( ZONE_CONTAINER* aZone, int aNestLevel ) const throw( IO_ERR // Save the outline aux info std::string hatch; - switch (aZone->GetHatchStyle()) + switch( aZone->GetHatchStyle() ) { default: - case CPolyLine::NO_HATCH: - hatch = "none"; - break; - case CPolyLine::DIAGONAL_EDGE: - hatch = "edge"; - break; - case CPolyLine::DIAGONAL_FULL: - hatch = "full"; - break; + case CPolyLine::NO_HATCH: hatch = "none"; break; + case CPolyLine::DIAGONAL_EDGE: hatch = "edge"; break; + case CPolyLine::DIAGONAL_FULL: hatch = "full"; break; } m_out->Print( 0, " (hatch %s %s)\n", hatch.c_str(), - FMT_IU( aZone->Outline()->GetHatchPitch() ).c_str() ); + FMT_IU( aZone->Outline()->GetHatchPitch() ).c_str() ); if( aZone->GetPriority() > 0 ) - m_out->Print( aNestLevel + 1, "(priority %d)\n", aZone->GetPriority() ); + m_out->Print( aNestLevel+1, "(priority %d)\n", aZone->GetPriority() ); - m_out->Print( aNestLevel + 1, "(connect_pads" ); + m_out->Print( aNestLevel+1, "(connect_pads" ); - switch (aZone->GetPadConnection()) + switch( aZone->GetPadConnection() ) { default: case THERMAL_PAD: // Default option not saved or loaded. @@ -1469,20 +1471,20 @@ void PCB_IO::format( ZONE_CONTAINER* aZone, int aNestLevel ) const throw( IO_ERR } m_out->Print( 0, " (clearance %s))\n", - FMT_IU( aZone->GetZoneClearance() ).c_str() ); + FMT_IU( aZone->GetZoneClearance() ).c_str() ); - m_out->Print( aNestLevel + 1, "(min_thickness %s)\n", - FMT_IU( aZone->GetMinThickness() ).c_str() ); + m_out->Print( aNestLevel+1, "(min_thickness %s)\n", + FMT_IU( aZone->GetMinThickness() ).c_str() ); if( aZone->GetIsKeepout() ) { - m_out->Print( aNestLevel + 1, "(keepout (tracks %s) (vias %s) (copperpour %s))\n", - aZone->GetDoNotAllowTracks() ? "not_allowed" : "allowed", - aZone->GetDoNotAllowVias() ? "not_allowed" : "allowed", - aZone->GetDoNotAllowCopperPour() ? "not_allowed" : "allowed" ); + m_out->Print( aNestLevel+1, "(keepout (tracks %s) (vias %s) (copperpour %s))\n", + aZone->GetDoNotAllowTracks() ? "not_allowed" : "allowed", + aZone->GetDoNotAllowVias() ? "not_allowed" : "allowed", + aZone->GetDoNotAllowCopperPour() ? "not_allowed" : "allowed" ); } - m_out->Print( aNestLevel + 1, "(fill" ); + m_out->Print( aNestLevel+1, "(fill" ); // Default is not filled. if( aZone->IsFilled() ) @@ -1493,35 +1495,34 @@ void PCB_IO::format( ZONE_CONTAINER* aZone, int aNestLevel ) const throw( IO_ERR m_out->Print( 0, " (mode segment)" ); m_out->Print( 0, " (arc_segments %d) (thermal_gap %s) (thermal_bridge_width %s)", - aZone->GetArcSegmentCount(), - FMT_IU( aZone->GetThermalReliefGap() ).c_str(), - FMT_IU( aZone->GetThermalReliefCopperBridge() ).c_str() ); + aZone->GetArcSegmentCount(), + FMT_IU( aZone->GetThermalReliefGap() ).c_str(), + FMT_IU( aZone->GetThermalReliefCopperBridge() ).c_str() ); if( aZone->GetCornerSmoothingType() != ZONE_SETTINGS::SMOOTHING_NONE ) { m_out->Print( 0, " (smoothing" ); - switch (aZone->GetCornerSmoothingType()) + switch( aZone->GetCornerSmoothingType() ) { case ZONE_SETTINGS::SMOOTHING_CHAMFER: m_out->Print( 0, " chamfer" ); break; case ZONE_SETTINGS::SMOOTHING_FILLET: - m_out->Print( 0, " fillet" ); + m_out->Print( 0, " fillet" ); break; default: - THROW_IO_ERROR( - wxString::Format( _( "unknown zone corner smoothing type %d" ), - aZone->GetCornerSmoothingType() ) ); + THROW_IO_ERROR( wxString::Format( _( "unknown zone corner smoothing type %d" ), + aZone->GetCornerSmoothingType() ) ); } m_out->Print( 0, ")" ); if( aZone->GetCornerRadius() != 0 ) m_out->Print( 0, " (radius %s)", - FMT_IU( aZone->GetCornerRadius() ).c_str() ); - } + FMT_IU( aZone->GetCornerRadius() ).c_str() ); + } m_out->Print( 0, ")\n" ); @@ -1530,46 +1531,46 @@ void PCB_IO::format( ZONE_CONTAINER* aZone, int aNestLevel ) const throw( IO_ERR if( cv.GetCornersCount() ) { - m_out->Print( aNestLevel + 1, "(polygon\n" ); - m_out->Print( aNestLevel + 2, "(pts\n" ); + m_out->Print( aNestLevel+1, "(polygon\n"); + m_out->Print( aNestLevel+2, "(pts\n" ); for( unsigned it = 0; it < cv.GetCornersCount(); ++it ) { if( newLine == 0 ) - m_out->Print( aNestLevel + 3, "(xy %s %s)", - FMT_IU( cv.GetX( it ) ).c_str(), FMT_IU( cv.GetY( it ) ).c_str() ); - else + m_out->Print( aNestLevel+3, "(xy %s %s)", + FMT_IU( cv.GetX( it ) ).c_str(), FMT_IU( cv.GetY( it ) ).c_str() ); + else m_out->Print( 0, " (xy %s %s)", - FMT_IU( cv.GetX( it ) ).c_str(), FMT_IU( cv.GetY( it ) ).c_str() ); + FMT_IU( cv.GetX( it ) ).c_str(), FMT_IU( cv.GetY( it ) ).c_str() ); - if( newLine < 4 ) - { - newLine += 1; - } - else - { - newLine = 0; - m_out->Print( 0, "\n" ); - } - - if( cv.IsEndContour( it ) ) - { - if( newLine != 0 ) - m_out->Print( 0, "\n" ); - - m_out->Print( aNestLevel+2, ")\n" ); - - if( it+1 != cv.GetCornersCount() ) - { - newLine = 0; - m_out->Print( aNestLevel+1, ")\n" ); - m_out->Print( aNestLevel+1, "(polygon\n" ); - m_out->Print( aNestLevel+2, "(pts" ); - } - } + if( newLine < 4 ) + { + newLine += 1; + } + else + { + newLine = 0; + m_out->Print( 0, "\n" ); } - m_out->Print( aNestLevel + 1, ")\n" ); + if( cv.IsEndContour( it ) ) + { + if( newLine != 0 ) + m_out->Print( 0, "\n" ); + + m_out->Print( aNestLevel+2, ")\n" ); + + if( it+1 != cv.GetCornersCount() ) + { + newLine = 0; + m_out->Print( aNestLevel+1, ")\n" ); + m_out->Print( aNestLevel+1, "(polygon\n" ); + m_out->Print( aNestLevel+2, "(pts" ); + } + } + } + + m_out->Print( aNestLevel+1, ")\n" ); } // Save the PolysList @@ -1578,76 +1579,80 @@ void PCB_IO::format( ZONE_CONTAINER* aZone, int aNestLevel ) const throw( IO_ERR if( fv.GetCornersCount() ) { - m_out->Print( aNestLevel + 1, "(filled_polygon\n" ); - m_out->Print( aNestLevel + 2, "(pts\n" ); + m_out->Print( aNestLevel+1, "(filled_polygon\n" ); + m_out->Print( aNestLevel+2, "(pts\n" ); - for( unsigned it = 0; it < fv.GetCornersCount(); ++it ) + for( unsigned it = 0; it < fv.GetCornersCount(); ++it ) { if( newLine == 0 ) - m_out->Print( aNestLevel + 3, "(xy %s %s)", - FMT_IU( fv.GetX( it ) ).c_str(), FMT_IU( fv.GetY( it ) ).c_str() ); - else + m_out->Print( aNestLevel+3, "(xy %s %s)", + FMT_IU( fv.GetX( it ) ).c_str(), FMT_IU( fv.GetY( it ) ).c_str() ); + else m_out->Print( 0, " (xy %s %s)", - FMT_IU( fv.GetX( it ) ).c_str(), FMT_IU( fv.GetY( it ) ).c_str() ); + FMT_IU( fv.GetX( it ) ).c_str(), FMT_IU( fv.GetY( it ) ).c_str() ); - if( newLine < 4 ) - { - newLine += 1; - } - else - { - newLine = 0; - m_out->Print( 0, "\n" ); - } - - if( fv.IsEndContour( it ) ) - { - if( newLine != 0 ) - m_out->Print( 0, "\n" ); - - m_out->Print( aNestLevel+2, ")\n" ); - - if( it+1 != fv.GetCornersCount() ) - { - newLine = 0; - m_out->Print( aNestLevel+1, ")\n" ); - m_out->Print( aNestLevel+1, "(filled_polygon\n" ); - m_out->Print( aNestLevel+2, "(pts\n" ); - } - } + if( newLine < 4 ) + { + newLine += 1; + } + else + { + newLine = 0; + m_out->Print( 0, "\n" ); } - m_out->Print( aNestLevel + 1, ")\n" ); + if( fv.IsEndContour( it ) ) + { + if( newLine != 0 ) + m_out->Print( 0, "\n" ); + + m_out->Print( aNestLevel+2, ")\n" ); + + if( it+1 != fv.GetCornersCount() ) + { + newLine = 0; + m_out->Print( aNestLevel+1, ")\n" ); + m_out->Print( aNestLevel+1, "(filled_polygon\n" ); + m_out->Print( aNestLevel+2, "(pts\n" ); + } + } + } + + m_out->Print( aNestLevel+1, ")\n" ); } // Save the filling segments list - const std::vector& segs = aZone->FillSegments(); + const std::vector< SEGMENT >& segs = aZone->FillSegments(); if( segs.size() ) { - m_out->Print( aNestLevel + 1, "(fill_segments\n" ); + m_out->Print( aNestLevel+1, "(fill_segments\n" ); - for( std::vector::const_iterator it = segs.begin(); it != segs.end(); ++it ) + for( std::vector< SEGMENT >::const_iterator it = segs.begin(); it != segs.end(); ++it ) { - m_out->Print( aNestLevel + 2, "(pts (xy %s) (xy %s))\n", - FMT_IU( it->m_Start ).c_str(), - FMT_IU( it->m_End ).c_str() ); + m_out->Print( aNestLevel+2, "(pts (xy %s) (xy %s))\n", + FMT_IU( it->m_Start ).c_str(), + FMT_IU( it->m_End ).c_str() ); } - m_out->Print( aNestLevel + 1, ")\n" ); + m_out->Print( aNestLevel+1, ")\n" ); } m_out->Print( aNestLevel, ")\n" ); } + PCB_IO::PCB_IO( int aControlFlags ) : - m_cache( 0 ), m_ctl( aControlFlags ), m_parser( new PCB_PARSER() ), - m_mapping( new NETINFO_MAPPING() ) + m_cache( 0 ), + m_ctl( aControlFlags ), + m_parser( new PCB_PARSER() ), + m_mapping( new NETINFO_MAPPING() ) { init( 0 ); m_out = &m_sf; } + PCB_IO::~PCB_IO() { delete m_cache; @@ -1655,9 +1660,10 @@ PCB_IO::~PCB_IO() delete m_mapping; } + BOARD* PCB_IO::Load( const wxString& aFileName, BOARD* aAppendToMe, const PROPERTIES* aProperties ) { - FILE_LINE_READER reader( aFileName ); + FILE_LINE_READER reader( aFileName ); init( aProperties ); @@ -1674,12 +1680,14 @@ BOARD* PCB_IO::Load( const wxString& aFileName, BOARD* aAppendToMe, const PROPER return board; } + void PCB_IO::init( const PROPERTIES* aProperties ) { m_board = NULL; m_props = aProperties; } + void PCB_IO::cacheLib( const wxString& aLibraryPath, const wxString& aFootprintName ) { if( !m_cache || m_cache->IsModified( aLibraryPath, aFootprintName ) ) @@ -1691,18 +1699,18 @@ void PCB_IO::cacheLib( const wxString& aLibraryPath, const wxString& aFootprintN } } -wxArrayString PCB_IO::FootprintEnumerate( const wxString& aLibraryPath, + +wxArrayString PCB_IO::FootprintEnumerate( const wxString& aLibraryPath, const PROPERTIES* aProperties ) { - LOCALE_IO toggle; // toggles on, then off, the C locale. + LOCALE_IO toggle; // toggles on, then off, the C locale. wxArrayString ret; - wxDir dir( aLibraryPath ); + wxDir dir( aLibraryPath ); if( !dir.IsOpened() ) { - THROW_IO_ERROR( - wxString::Format( _( "footprint library path '%s' does not exist" ), - GetChars( aLibraryPath ) ) ); + THROW_IO_ERROR( wxString::Format( _( "footprint library path '%s' does not exist" ), + GetChars( aLibraryPath ) ) ); } init( aProperties ); @@ -1712,7 +1720,8 @@ wxArrayString PCB_IO::FootprintEnumerate( const wxString& aLibraryPath, const MODULE_MAP& mods = m_cache->GetModules(); - for( MODULE_CITER it = mods.begin(); it != mods.end(); ++it ) + + for( MODULE_CITER it = mods.begin(); it != mods.end(); ++it ) { ret.Add( FROM_UTF8( it->first.c_str() ) ); } @@ -1726,17 +1735,18 @@ wxArrayString PCB_IO::FootprintEnumerate( const wxString& aLibraryPath, { wxFileName fn( aLibraryPath, fpFileName ); ret.Add( fn.GetName() ); - }while( dir.GetNext( &fpFileName ) ); + } while( dir.GetNext( &fpFileName ) ); } #endif return ret; } + MODULE* PCB_IO::FootprintLoad( const wxString& aLibraryPath, const wxString& aFootprintName, const PROPERTIES* aProperties ) { - LOCALE_IO toggle; // toggles on, then off, the C locale. + LOCALE_IO toggle; // toggles on, then off, the C locale. init( aProperties ); @@ -1755,10 +1765,11 @@ MODULE* PCB_IO::FootprintLoad( const wxString& aLibraryPath, const wxString& aFo return new MODULE( *it->second->GetModule() ); } + void PCB_IO::FootprintSave( const wxString& aLibraryPath, const MODULE* aFootprint, const PROPERTIES* aProperties ) { - LOCALE_IO toggle; // toggles on, then off, the C locale. + LOCALE_IO toggle; // toggles on, then off, the C locale. init( aProperties ); @@ -1770,8 +1781,10 @@ void PCB_IO::FootprintSave( const wxString& aLibraryPath, const MODULE* aFootpri if( !m_cache->IsWritable() ) { - wxString msg = wxString::Format( _( "Library '%s' is read only" ), - GetChars( aLibraryPath ) ); + wxString msg = wxString::Format( + _( "Library '%s' is read only" ), + GetChars( aLibraryPath ) + ); THROW_IO_ERROR( msg ); } @@ -1781,21 +1794,18 @@ void PCB_IO::FootprintSave( const wxString& aLibraryPath, const MODULE* aFootpri MODULE_MAP& mods = m_cache->GetModules(); // Quietly overwrite module and delete module file from path for any by same name. - wxFileName fn( aLibraryPath, aFootprint->GetFPID().GetFootprintName(), - KiCadFootprintFileExtension ); + wxFileName fn( aLibraryPath, aFootprint->GetFPID().GetFootprintName(), KiCadFootprintFileExtension ); if( !fn.IsOk() ) { - THROW_IO_ERROR( - wxString::Format( _( "Footprint file name '%s' is not valid." ), - GetChars( fn.GetFullPath() ) ) ); + THROW_IO_ERROR( wxString::Format( _( "Footprint file name '%s' is not valid." ), + GetChars( fn.GetFullPath() ) ) ); } if( fn.FileExists() && !fn.IsFileWritable() ) { - THROW_IO_ERROR( - wxString::Format( _( "user does not have write permission to delete file '%s' " ), - GetChars( fn.GetFullPath() ) ) ); + THROW_IO_ERROR( wxString::Format( _( "user does not have write permission to delete file '%s' " ), + GetChars( fn.GetFullPath() ) ) ); } MODULE_CITER it = mods.find( footprintName ); @@ -1803,7 +1813,7 @@ void PCB_IO::FootprintSave( const wxString& aLibraryPath, const MODULE* aFootpri if( it != mods.end() ) { wxLogTrace( traceFootprintLibrary, wxT( "Removing footprint library file '%s'." ), - fn.GetFullPath().GetData() ); + fn.GetFullPath().GetData() ); mods.erase( footprintName ); wxRemoveFile( fn.GetFullPath() ); } @@ -1821,15 +1831,15 @@ void PCB_IO::FootprintSave( const wxString& aLibraryPath, const MODULE* aFootpri module->Flip( module->GetPosition() ); wxLogTrace( traceFootprintLibrary, wxT( "Creating s-expression footprint file: %s." ), - fn.GetFullPath().GetData() ); + fn.GetFullPath().GetData() ); mods.insert( footprintName, new FP_CACHE_ITEM( module, fn ) ); m_cache->Save(); } -void PCB_IO::FootprintDelete( const wxString& aLibraryPath, const wxString& aFootprintName, - const PROPERTIES* aProperties ) + +void PCB_IO::FootprintDelete( const wxString& aLibraryPath, const wxString& aFootprintName, const PROPERTIES* aProperties ) { - LOCALE_IO toggle; // toggles on, then off, the C locale. + LOCALE_IO toggle; // toggles on, then off, the C locale. init( aProperties ); @@ -1837,23 +1847,23 @@ void PCB_IO::FootprintDelete( const wxString& aLibraryPath, const wxString& aFoo if( !m_cache->IsWritable() ) { - THROW_IO_ERROR( - wxString::Format( _( "Library '%s' is read only" ), aLibraryPath.GetData() ) ); + THROW_IO_ERROR( wxString::Format( _( "Library '%s' is read only" ), + aLibraryPath.GetData() ) ); } m_cache->Remove( aFootprintName ); } + void PCB_IO::FootprintLibCreate( const wxString& aLibraryPath, const PROPERTIES* aProperties ) { if( wxDir::Exists( aLibraryPath ) ) { - THROW_IO_ERROR( - wxString::Format( _( "cannot overwrite library path '%s'" ), - aLibraryPath.GetData() ) ); + THROW_IO_ERROR( wxString::Format( _( "cannot overwrite library path '%s'" ), + aLibraryPath.GetData() ) ); } - LOCALE_IO toggle; + LOCALE_IO toggle; init( aProperties ); @@ -1862,6 +1872,7 @@ void PCB_IO::FootprintLibCreate( const wxString& aLibraryPath, const PROPERTIES* m_cache->Save(); } + bool PCB_IO::FootprintLibDelete( const wxString& aLibraryPath, const PROPERTIES* aProperties ) { wxFileName fn; @@ -1873,58 +1884,53 @@ bool PCB_IO::FootprintLibDelete( const wxString& aLibraryPath, const PROPERTIES* if( !fn.IsDirWritable() ) { - THROW_IO_ERROR( - wxString::Format( _( "user does not have permission to delete directory '%s'" ), - aLibraryPath.GetData() ) ); + THROW_IO_ERROR( wxString::Format( _( "user does not have permission to delete directory '%s'" ), + aLibraryPath.GetData() ) ); } wxDir dir( aLibraryPath ); if( dir.HasSubDirs() ) { - THROW_IO_ERROR( - wxString::Format( _( "library directory '%s' has unexpected sub-directories" ), - aLibraryPath.GetData() ) ); + THROW_IO_ERROR( wxString::Format( _( "library directory '%s' has unexpected sub-directories" ), + aLibraryPath.GetData() ) ); } // All the footprint files must be deleted before the directory can be deleted. if( dir.HasFiles() ) { - unsigned i; - wxFileName tmp; + unsigned i; + wxFileName tmp; wxArrayString files; wxDir::GetAllFiles( aLibraryPath, &files ); - for( i = 0; i < files.GetCount(); i++ ) + for( i = 0; i < files.GetCount(); i++ ) { tmp = files[i]; if( tmp.GetExt() != KiCadFootprintFileExtension ) { - THROW_IO_ERROR( - wxString::Format( - _( "unexpected file '%s' was found in library path '%s'" ), - files[i].GetData(), aLibraryPath.GetData() ) ); + THROW_IO_ERROR( wxString::Format( _( "unexpected file '%s' was found in library path '%s'" ), + files[i].GetData(), aLibraryPath.GetData() ) ); } } - for( i = 0; i < files.GetCount(); i++ ) + for( i = 0; i < files.GetCount(); i++ ) { wxRemoveFile( files[i] ); } } wxLogTrace( traceFootprintLibrary, wxT( "Removing footprint library '%s'" ), - aLibraryPath.GetData() ); + aLibraryPath.GetData() ); // Some of the more elaborate wxRemoveFile() crap puts up its own wxLog dialog // we don't want that. we want bare metal portability with no UI here. if( !wxRmdir( aLibraryPath ) ) { - THROW_IO_ERROR( - wxString::Format( _( "footprint library '%s' cannot be deleted" ), - aLibraryPath.GetData() ) ); + THROW_IO_ERROR( wxString::Format( _( "footprint library '%s' cannot be deleted" ), + aLibraryPath.GetData() ) ); } // For some reason removing a directory in Windows is not immediately updated. This delay @@ -1943,9 +1949,10 @@ bool PCB_IO::FootprintLibDelete( const wxString& aLibraryPath, const PROPERTIES* return true; } + bool PCB_IO::IsFootprintLibWritable( const wxString& aLibraryPath ) { - LOCALE_IO toggle; + LOCALE_IO toggle; init( NULL ); From afc5d13172eee7a883552313b03d004b124812c0 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 26 May 2014 08:54:04 +0200 Subject: [PATCH 451/741] Apply a workaround in 3D_draw.cpp to avoid crash in boost::polygon (try to fix Bug #1322804) This workaround was already used (bzr 4301, in file plot_board_layers.cpp) also to avoid similar crashes (uses 18 segments instead of 16 to approximate a circle by segments). Minor code cleanup in dialog_plot. --- 3d-viewer/3d_draw.cpp | 9 ++++++++- pcbnew/dialogs/dialog_plot.cpp | 6 ++---- pcbnew/dialogs/dialog_plot.h | 3 +-- polygon/PolyLine.cpp | 4 ++-- polygon/PolyLine.h | 4 ++-- 5 files changed, 15 insertions(+), 11 deletions(-) diff --git a/3d-viewer/3d_draw.cpp b/3d-viewer/3d_draw.cpp index 82abd0b0de..f653ad27da 100644 --- a/3d-viewer/3d_draw.cpp +++ b/3d-viewer/3d_draw.cpp @@ -240,7 +240,12 @@ void EDA_3D_CANVAS::BuildBoard3DView() bool realistic_mode = g_Parm_3D_Visu.IsRealisticMode(); // Number of segments to convert a circle to polygon - const int segcountforcircle = 16; + // Boost polygon (at least v 1.54, v1.55 and previous) in very rare cases crashes + // when using 16 segments to approximate a circle. + // So using 18 segments is a workaround to try to avoid these crashes + // ( We already used this trick in plot_board_layers.cpp, + // see PlotSolderMaskLayer() ) + const int segcountforcircle = 18; double correctionFactor = 1.0 / cos( M_PI / (segcountforcircle * 2) ); const int segcountLowQuality = 12; // segments to draw a circle with low quality // to reduce time calculations @@ -355,9 +360,11 @@ void EDA_3D_CANVAS::BuildBoard3DView() LAYER_NUM zonelayer = zone->GetLayer(); if( zonelayer == layer ) + { zone->TransformSolidAreasShapesToPolygonSet( hightQualityMode ? bufferPolys : bufferZonesPolys, segcountLowQuality, correctionFactorLQ ); + } } } diff --git a/pcbnew/dialogs/dialog_plot.cpp b/pcbnew/dialogs/dialog_plot.cpp index 6e66dff99f..230f170b65 100644 --- a/pcbnew/dialogs/dialog_plot.cpp +++ b/pcbnew/dialogs/dialog_plot.cpp @@ -46,8 +46,6 @@ DIALOG_PLOT::DIALOG_PLOT( PCB_EDIT_FRAME* aParent ) : m_plotOpts( aParent->GetPlotSettings() ) { m_config = Kiface().KifaceSettings(); - m_brdSettings = m_board->GetDesignSettings(); - Init_Dialog(); GetSizer()->Fit( this ); @@ -101,9 +99,9 @@ void DIALOG_PLOT::Init_Dialog() break; } - msg = StringFromValue( g_UserUnit, m_brdSettings.m_SolderMaskMargin, true ); + msg = StringFromValue( g_UserUnit, m_board->GetDesignSettings().m_SolderMaskMargin, true ); m_SolderMaskMarginCurrValue->SetLabel( msg ); - msg = StringFromValue( g_UserUnit, m_brdSettings.m_SolderMaskMinWidth, true ); + msg = StringFromValue( g_UserUnit, m_board->GetDesignSettings().m_SolderMaskMinWidth, true ); m_SolderMaskMinWidthCurrValue->SetLabel( msg ); // Set units and value for HPGL pen size (this param in in mils). diff --git a/pcbnew/dialogs/dialog_plot.h b/pcbnew/dialogs/dialog_plot.h index d198a9a023..b5cd562590 100644 --- a/pcbnew/dialogs/dialog_plot.h +++ b/pcbnew/dialogs/dialog_plot.h @@ -41,8 +41,7 @@ public: private: PCB_EDIT_FRAME* m_parent; BOARD* m_board; - BOARD_DESIGN_SETTINGS m_brdSettings; - wxConfigBase* m_config; + wxConfigBase* m_config; std::vector m_layerList; // List to hold CheckListBox layer numbers double m_XScaleAdjust; // X scale factor adjust to compensate // plotter X scaling error diff --git a/polygon/PolyLine.cpp b/polygon/PolyLine.cpp index 3ea299c330..c9ca85356d 100644 --- a/polygon/PolyLine.cpp +++ b/polygon/PolyLine.cpp @@ -1222,7 +1222,7 @@ int CPolyLine::HitTestForCorner( const wxPoint& aPos, int aDistMax ) const * Copy the contours to a KI_POLYGON_WITH_HOLES * The first contour is the main outline, others are holes */ -void CPOLYGONS_LIST::ExportTo( KI_POLYGON_WITH_HOLES& aPolygoneWithHole ) +void CPOLYGONS_LIST::ExportTo( KI_POLYGON_WITH_HOLES& aPolygoneWithHole ) const { unsigned corners_count = m_cornersList.size(); @@ -1273,7 +1273,7 @@ void CPOLYGONS_LIST::ExportTo( KI_POLYGON_WITH_HOLES& aPolygoneWithHole ) * Each contour is copied into a KI_POLYGON, and each KI_POLYGON * is append to aPolygons */ -void CPOLYGONS_LIST::ExportTo( KI_POLYGON_SET& aPolygons ) +void CPOLYGONS_LIST::ExportTo( KI_POLYGON_SET& aPolygons ) const { std::vector cornerslist; unsigned corners_count = GetCornersCount(); diff --git a/polygon/PolyLine.h b/polygon/PolyLine.h index 2610a5d765..23a747edab 100644 --- a/polygon/PolyLine.h +++ b/polygon/PolyLine.h @@ -164,7 +164,7 @@ public: * Copy all contours to a KI_POLYGON_SET * @param aPolygons = the KI_POLYGON_WITH_HOLES to populate */ - void ExportTo( KI_POLYGON_SET& aPolygons ); + void ExportTo( KI_POLYGON_SET& aPolygons ) const; /** * Function ExportTo @@ -172,7 +172,7 @@ public: * The first contour is the main outline, others are holes * @param aPolygoneWithHole = the KI_POLYGON_WITH_HOLES to populate */ - void ExportTo( KI_POLYGON_WITH_HOLES& aPolygoneWithHole ); + void ExportTo( KI_POLYGON_WITH_HOLES& aPolygoneWithHole ) const; /** * Function ImportFrom From b9b80b48b722748dcfa7aaac7d0a72f16354966b Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Tue, 27 May 2014 00:05:41 -0500 Subject: [PATCH 452/741] change to fatal error in kicad/kicad.cpp Kiface() stub. --- kicad/kicad.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kicad/kicad.cpp b/kicad/kicad.cpp index 5b696f5715..693c0cfa8f 100644 --- a/kicad/kicad.cpp +++ b/kicad/kicad.cpp @@ -79,7 +79,11 @@ static void set_lib_env_var( const wxString& aAbsoluteArgv0 ) #include KIFACE_I& Kiface() { - wxASSERT( 0 ); // should never be called, only reference is from EDA_BASE_FRAME::config(); + // This function should never be called. It is only referenced from + // EDA_BASE_FRAME::config() and this is only provided to satisfy the linker, + // not to be actually called. + wxLogFatalError( wxT( "Unexpected call to Kiface() in kicad/kicad.cpp" ) ); + return (KIFACE_I&) *(KIFACE_I*) 0; } From c8479cdd2b088667f5bdc6d336f55a9cf1b19518 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Tue, 27 May 2014 23:30:38 -0500 Subject: [PATCH 453/741] remove unused single_top.c function. --- common/single_top.cpp | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/common/single_top.cpp b/common/single_top.cpp index 7d7c816590..26e260651b 100644 --- a/common/single_top.cpp +++ b/common/single_top.cpp @@ -84,41 +84,6 @@ static void set_lib_env_var( const wxString& aAbsoluteArgv0 ) } -// POLICY CHOICE 1: return the full path of the DSO to load from single_top. -static const wxString dso_full_path( const wxString& aAbsoluteArgv0 ) -{ - // Prefix basename with ${KIFACE_PREFIX} and change extension to ${KIFACE_SUFFIX} - - // POLICY CHOICE 1: Keep same path, and therefore installer must put the kiface DSO - // in same dir as top process module. Obviously alternatives are possible - // and that is why this is a separate function. One alternative would be to use - // a portion of CMAKE_INSTALL_PREFIX and navigate to a "lib" dir, but that - // would require a recompile any time you chose to install into a different place. - - // It is my decision to treat _eeschema.kiface and _pcbnew.kiface as "executables", - // not "libraries" in this regard, since most all program functionality lives - // in them. They are basically spin-offs from what was once a top process module. - // That may not make linux package maintainers happy, but that is not my job. - // Get over it. KiCad is not a trivial suite, and multiple platforms come - // into play, not merely linux. For starters they will use extension ".kiface", - // but later in time morph to ".so". They are not purely libraries, else they - // would begin with "lib" in basename. Like I said, get over it, we're serving - // too many masters here: python, windows, linux, OSX, multiple versions of wx... - - wxFileName fn( aAbsoluteArgv0 ); - wxString basename( KIFACE_PREFIX ); // start with special prefix - - basename += fn.GetName(); // add argv[0]'s basename - fn.SetName( basename ); - - // Here a "suffix" == an extension with a preceding '.', - // so skip the preceding '.' to get an extension - fn.SetExt( KIFACE_SUFFIX + 1 ); // + 1 => &KIFACE_SUFFIX[1] - - return fn.GetFullPath(); -} - - // Only a single KIWAY is supported in this single_top top level component, // which is dedicated to loading only a single DSO. KIWAY Kiway( &Pgm(), KFCTL_STANDALONE ); From e585f2d205fcae6f145c920df5a0c98fa9a4c7e0 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Tue, 27 May 2014 23:33:00 -0500 Subject: [PATCH 454/741] A hopeful fix for bug lp:1322354 --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5276a854d8..542667f1fc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -203,12 +203,17 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PIC_FLAG}" ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PIC_FLAG}" ) - # Thou shalt not link vaporware and tell us it's a valid DSO (apple ld doesn't support it) if( NOT APPLE ) + # Thou shalt not link vaporware and tell us it's a valid DSO (apple ld doesn't support it) set( CMAKE_SHARED_LINKER_FLAGS "${TO_LINKER},--no-undefined" ) set( CMAKE_MODULE_LINKER_FLAGS "${TO_LINKER},--no-undefined" ) set( CMAKE_EXE_LINKER_FLAGS_RELEASE "-s" ) + + # Defeat ELF's ability to use the GOT to replace locally implemented functions + # with ones from another module. + set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${TO_LINKER},-Bsymbolic" ) + set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${TO_LINKER},-Bsymbolic" ) endif() endif() From 6652bcdc5fb28c9ec5c91643b6b77d793ae5980f Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 28 May 2014 08:26:46 +0200 Subject: [PATCH 455/741] Add patch about idf export (from cirilo_bernardo) --- utils/idftools/CMakeLists.txt | 35 +- utils/idftools/dxf2idfmain.cpp | 3 +- utils/idftools/idf2vrml.cpp | 842 ++++ utils/idftools/idf_common.cpp | 1376 ++++++ utils/idftools/idf_common.h | 705 +++ utils/idftools/idf_cylinder.cpp | 28 +- .../idf_examples/Arduino_MEGA_2560-Rev3.emn | 149 + .../idf_examples/Arduino_MEGA_2560-Rev3.emp | 4 + utils/idftools/idf_examples/idf_example.emn | 269 ++ utils/idftools/idf_examples/idf_example.emp | 69 + utils/idftools/idf_examples/test_idf2.emn | 71 + utils/idftools/idf_examples/test_idf2.emp | 290 ++ utils/idftools/idf_helpers.cpp | 295 ++ utils/idftools/idf_helpers.h | 171 + utils/idftools/idf_outlines.cpp | 2614 +++++++++++ utils/idftools/idf_outlines.h | 754 ++++ utils/idftools/idf_parser.cpp | 3819 +++++++++++++++++ utils/idftools/idf_parser.h | 657 +++ utils/idftools/idf_rect.cpp | 24 +- utils/idftools/vrml_layer.cpp | 1578 +++++++ utils/idftools/vrml_layer.h | 429 ++ 21 files changed, 14152 insertions(+), 30 deletions(-) create mode 100644 utils/idftools/idf2vrml.cpp create mode 100644 utils/idftools/idf_common.cpp create mode 100644 utils/idftools/idf_common.h create mode 100644 utils/idftools/idf_examples/Arduino_MEGA_2560-Rev3.emn create mode 100644 utils/idftools/idf_examples/Arduino_MEGA_2560-Rev3.emp create mode 100644 utils/idftools/idf_examples/idf_example.emn create mode 100644 utils/idftools/idf_examples/idf_example.emp create mode 100644 utils/idftools/idf_examples/test_idf2.emn create mode 100644 utils/idftools/idf_examples/test_idf2.emp create mode 100644 utils/idftools/idf_helpers.cpp create mode 100644 utils/idftools/idf_helpers.h create mode 100644 utils/idftools/idf_outlines.cpp create mode 100644 utils/idftools/idf_outlines.h create mode 100644 utils/idftools/idf_parser.cpp create mode 100644 utils/idftools/idf_parser.h create mode 100644 utils/idftools/vrml_layer.cpp create mode 100644 utils/idftools/vrml_layer.h diff --git a/utils/idftools/CMakeLists.txt b/utils/idftools/CMakeLists.txt index a36fa45878..d934baf6e8 100644 --- a/utils/idftools/CMakeLists.txt +++ b/utils/idftools/CMakeLists.txt @@ -1,29 +1,32 @@ include_directories( - "${CMAKE_SOURCE_DIR}/include" "${CMAKE_SOURCE_DIR}/lib_dxf" - "${CMAKE_SOURCE_DIR}/pcbnew/exporters" "${CMAKE_SOURCE_DIR}/utils/idftools" ) link_directories( "${CMAKE_BINARY_DIR}/lib_dxf" -) - -add_executable( idfcyl idf_cylinder.cpp ) - -add_executable( idfrect idf_rect.cpp ) - -add_executable( dxf2idf dxf2idfmain.cpp dxf2idf.cpp - "${CMAKE_SOURCE_DIR}/pcbnew/exporters/idf_common.cpp" - "${CMAKE_SOURCE_DIR}/common/richio.cpp" ) -add_dependencies( idfcyl lib-dependencies ) -add_dependencies( idfrect lib-dependencies ) -add_dependencies( dxf2idf lib-dependencies ) +add_library( idf3 STATIC + idf_helpers.cpp idf_common.cpp idf_outlines.cpp + idf_parser.cpp vrml_layer.cpp ) -target_link_libraries( dxf2idf lib_dxf ${wxWidgets_LIBRARIES} ) +add_executable( idfcyl idf_cylinder.cpp ) +add_executable( idfrect idf_rect.cpp ) +add_executable( dxf2idf dxf2idfmain.cpp dxf2idf.cpp ) +add_executable( idf2vrml idf2vrml.cpp ) -install( TARGETS idfcyl idfrect dxf2idf +target_link_libraries( dxf2idf lib_dxf idf3 ${wxWidgets_LIBRARIES} ) + +if( WIN32 ) + set ( LIB_GLU glu32 ) +else() + set ( LIB_GLU GLU ) +endif() + +target_link_libraries( idf2vrml idf3 ${LIB_GLU} ${wxWidgets_LIBRARIES} ) + + +install( TARGETS idfcyl idfrect dxf2idf idf2vrml DESTINATION ${KICAD_BIN} COMPONENT binary ) diff --git a/utils/idftools/dxf2idfmain.cpp b/utils/idftools/dxf2idfmain.cpp index 6d4f4a6143..df804c15be 100644 --- a/utils/idftools/dxf2idfmain.cpp +++ b/utils/idftools/dxf2idfmain.cpp @@ -123,7 +123,8 @@ int main( int argc, char **argv ) tstr.clear(); tstr.str( line ); - if( (tstr >> height ) && height > 0.001 ) + tstr >> height; + if( !tstr.fail() && height > 0.001 ) ok = true; } diff --git a/utils/idftools/idf2vrml.cpp b/utils/idftools/idf2vrml.cpp new file mode 100644 index 0000000000..0032e39b61 --- /dev/null +++ b/utils/idftools/idf2vrml.cpp @@ -0,0 +1,842 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 Cirilo Bernardo + * + * 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 + */ + +/* + * This program takes an IDF base name, loads the board outline + * and component outine files, and creates a single VRML file. + * The VRML file can be used to visually verify the IDF files + * before sending them to a mechanical designer. The output scale + * is 10:1; this scale was chosen because VRML was originally + * intended to describe large virtual worlds and rounding errors + * would be more likely if we used a 1:1 scale. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#ifndef MIN_ANG +#define MIN_ANG 0.01 +#endif + +extern char* optarg; +extern int optopt; + +using namespace std; + +#define CLEANUP do { \ +setlocale( LC_ALL, "C" ); \ +} while( 0 ); + +// define colors +struct VRML_COLOR +{ + double diff[3]; + double emis[3]; + double spec[3]; + double ambi; + double tran; + double shin; +}; + +struct VRML_IDS +{ + int colorIndex; + std::string objectName; + bool used; + bool bottom; + double dX, dY, dZ, dA; + + VRML_IDS() + { + colorIndex = 0; + used = false; + bottom = false; + dX = 0.0; + dY = 0.0; + dZ = 0.0; + dA = 0.0; + } +}; + +#define NCOLORS 7 +VRML_COLOR colors[NCOLORS] = { \ + { 0, 0.82, 0.247, 0, 0, 0, 0, 0.82, 0.247, 0.9, 0, 0.1}, \ + { 1, 0, 0, 1, 0, 0, 1, 0, 0, 0.9, 0, 0.1}, \ + { 0.659, 0, 0.463, 0, 0, 0, 0.659, 0, 0.463, 0.9, 0, 0.1}, \ + { 0.659, 0.294, 0, 0, 0, 0, 0.659, 0.294, 0, 0.9, 0, 0.1}, \ + { 0, 0.918, 0.659, 0, 0, 0, 0, 0.918, 0.659, 0.9, 0, 0.1}, \ + { 0.808, 0.733 , 0.071, 0, 0, 0, 0.808, 0.733 , 0.071, 0.9, 0, 0.1}, \ + { 0.102, 1, 0.984, 0, 0, 0, 0.102, 1, 0.984, 0.9, 0, 0.1} +}; + +bool WriteHeader( IDF3_BOARD& board, std::ofstream& file ); +bool MakeBoard( IDF3_BOARD& board, std::ofstream& file ); +bool MakeComponents( IDF3_BOARD& board, std::ofstream& file, bool compact ); +bool PopulateVRML( VRML_LAYER& model, const std::list< IDF_OUTLINE* >* items, bool bottom, + double scale, double dX = 0.0, double dY = 0.0, double angle = 0.0 ); +bool AddSegment( VRML_LAYER& model, IDF_SEGMENT* seg, int icont, int iseg ); +bool WriteTriangles( std::ofstream& file, VRML_IDS* vID, VRML_LAYER* layer, bool plane, + bool top, double top_z, double bottom_z, int precision, bool compact ); +inline void TransformPoint( IDF_SEGMENT& seg, double frac, bool bottom, + double dX, double dY, double angle ); +VRML_IDS* GetColor( std::map& cmap, + int& index, const std::string& uid ); + + +void PrintUsage( void ) +{ + cout << "-\nUsage: idf2vrml -f input_file.emn -s scale_factor -k\n"; + cout << "flags: -k: produce KiCad-firendly VRML output; default is compact VRML\n-\n"; + cout << "example to produce a model for use by KiCad: idf2vrml -f input.emn -s 0.3937008 -k\n\n"; + return; +} + +int main( int argc, char **argv ) +{ + // IDF implicitly requires the C locale + setlocale( LC_ALL, "C" ); + + // Essential inputs: + // 1. IDF file + // 2. Output scale: internal IDF units are mm, so 1 = 1mm per VRML unit, + // 0.1 = 1cm per VRML unit, 0.01 = 1m per VRML unit, + // 1/25.4 = 1in per VRML unit, 1/2.54 = 0.1in per VRML unit (KiCad model) + // 3. KiCad-friendly output (do not reuse features via DEF+USE) + // Render each component to VRML; if the user wants + // a KiCad friendly output then we must avoid DEF+USE; + // otherwise we employ DEF+USE to minimize file size + + std::string inputFilename; + double scaleFactor = 1.0; + bool compact = true; + int ichar; + + while( ( ichar = getopt( argc, argv, ":f:s:k" ) ) != -1 ) + { + switch( ichar ) + { + case 'f': + inputFilename = optarg; + break; + + case 's': + do + { + errno = 0; + char* cp = NULL; + scaleFactor = strtod( optarg, &cp ); + + if( errno || cp == optarg ) + { + cerr << "* invalid scale factor: '" << optarg << "'\n"; + return -1; + } + + if( scaleFactor < 0.001 || scaleFactor > 10 ) + { + cerr << "* scale factor out of range (" << scaleFactor << "); range is 0.001 to 10.0\n"; + return -1; + } + + } while( 0 ); + break; + + case 'k': + compact = false; + break; + + case ':': + cerr << "* Missing parameter to option '-" << ((char) optopt) << "'\n"; + PrintUsage(); + return -1; + break; + + default: + cerr << "* Unexpected option: '-"; + + if( ichar == '?' ) + cerr << ((char) optopt) << "'\n"; + else + cerr << ((char) ichar) << "'\n"; + + PrintUsage(); + return -1; + break; + } + } + + if( inputFilename.empty() ) + { + cerr << "* no IDF filename supplied\n"; + PrintUsage(); + return -1; + } + + IDF3_BOARD pcb( IDF3::CAD_ELEC ); + + cout << "** Reading file: " << inputFilename << "\n"; + + if( !pcb.ReadFile( FROM_UTF8( inputFilename.c_str() ) ) ) + { + CLEANUP; + cerr << "* Could not read file: " << inputFilename << "\n"; + return -1; + } + + // set the scale and output precision ( scale 1 == precision 5) + pcb.SetUserScale( scaleFactor ); + + if( scaleFactor < 0.01 ) + pcb.SetUserPrecision( 8 ); + else if( scaleFactor < 0.1 ) + pcb.SetUserPrecision( 7 ); + else if( scaleFactor < 1.0 ) + pcb.SetUserPrecision( 6 ); + else if( scaleFactor < 10.0 ) + pcb.SetUserPrecision( 5 ); + else + pcb.SetUserPrecision( 4 ); + + // Create the VRML file and write the header + char* bnp = (char*) malloc( inputFilename.size() + 1 ); + strcpy( bnp, inputFilename.c_str() ); + + std::string fname = basename( bnp ); + free( bnp ); + std::string::iterator itf = fname.end(); + *(--itf) = 'l'; + *(--itf) = 'r'; + *(--itf) = 'w'; + + cout << "Writing file: '" << fname << "'\n"; + + std::ofstream ofile; + ofile.open( fname.c_str(), std::ios_base::out ); + + ofile << fixed; // do not use exponents in VRML output + WriteHeader( pcb, ofile ); + + // STEP 1: Render the PCB alone + MakeBoard( pcb, ofile ); + + // STEP 2: Render the components + MakeComponents( pcb, ofile, compact ); + + ofile << "]\n}\n"; + ofile.close(); + + // restore the locale + setlocale( LC_ALL, "" ); + return 0; +} + + +bool WriteHeader( IDF3_BOARD& board, std::ofstream& file ) +{ + std::string bname = board.GetBoardName(); + + if( bname.empty() ) + { + bname = "BoardWithNoName"; + } + else + { + std::string::iterator ss = bname.begin(); + std::string::iterator se = bname.end(); + + while( ss != se ) + { + if( *ss == '/' || *ss == ' ' || *ss == ':' ) + *ss = '_'; + + ++ss; + } + } + + file << "#VRML V2.0 utf8\n\n"; + file << "WorldInfo {\n"; + file << " title \"" << bname << "\"\n}\n\n"; + file << "Transform {\n"; + file << "children [\n"; + + return !file.fail(); +} + + +bool MakeBoard( IDF3_BOARD& board, std::ofstream& file ) +{ + VRML_LAYER vpcb; + + if( board.GetBoardOutlinesSize() < 1 ) + { + ERROR_IDF << "\n"; + cerr << "* Cannot proceed; no board outline in IDF object\n"; + return false; + } + + double scale = board.GetUserScale(); + + // set the arc parameters according to output scale + int tI; + double tMin, tMax; + vpcb.GetArcParams( tI, tMin, tMax ); + vpcb.SetArcParams( tI, tMin * scale, tMax * scale ); + + if( !PopulateVRML( vpcb, board.GetBoardOutline()->GetOutlines(), false, board.GetUserScale() ) ) + { + return false; + } + + vpcb.EnsureWinding( 0, false ); + + int nvcont = vpcb.GetNContours(); + + while( nvcont > 0 ) + vpcb.EnsureWinding( nvcont--, true ); + + // Add the drill holes + const std::list* drills = &board.GetBoardDrills(); + + std::list::const_iterator sd = drills->begin(); + std::list::const_iterator ed = drills->end(); + + while( sd != ed ) + { + vpcb.AddCircle( (*sd)->GetDrillXPos() * scale, (*sd)->GetDrillYPos() * scale, + (*sd)->GetDrillDia() * scale / 2.0, true ); + ++sd; + } + + std::map< std::string, IDF3_COMPONENT* >*const comp = board.GetComponents(); + std::map< std::string, IDF3_COMPONENT* >::const_iterator sc = comp->begin(); + std::map< std::string, IDF3_COMPONENT* >::const_iterator ec = comp->end(); + + while( sc != ec ) + { + drills = sc->second->GetDrills(); + sd = drills->begin(); + ed = drills->end(); + + while( sd != ed ) + { + vpcb.AddCircle( (*sd)->GetDrillXPos() * scale, (*sd)->GetDrillYPos() * scale, + (*sd)->GetDrillDia() * scale / 2.0, true ); + ++sd; + } + + ++sc; + } + + // tesselate and write out + vpcb.Tesselate( NULL ); + + double thick = board.GetBoardThickness() / 2.0 * scale; + + VRML_IDS tvid; + tvid.colorIndex = 0; + + WriteTriangles( file, &tvid, &vpcb, false, false, + thick, -thick, board.GetUserPrecision(), false ); + + return true; +} + +bool PopulateVRML( VRML_LAYER& model, const std::list< IDF_OUTLINE* >* items, bool bottom, double scale, + double dX, double dY, double angle ) +{ + // empty outlines are not unusual so we fail quietly + if( items->size() < 1 ) + return false; + + int nvcont = 0; + int iseg = 0; + + std::list< IDF_OUTLINE* >::const_iterator scont = items->begin(); + std::list< IDF_OUTLINE* >::const_iterator econt = items->end(); + std::list::iterator sseg; + std::list::iterator eseg; + + IDF_SEGMENT lseg; + + while( scont != econt ) + { + nvcont = model.NewContour(); + + if( nvcont < 0 ) + { + ERROR_IDF << "\n"; + cerr << "* cannot create an outline\n"; + return false; + } + + if( (*scont)->size() < 1 ) + { + ERROR_IDF << "invalid contour: no vertices\n"; + return false; + } + + sseg = (*scont)->begin(); + eseg = (*scont)->end(); + + iseg = 0; + while( sseg != eseg ) + { + lseg = **sseg; + TransformPoint( lseg, scale, bottom, dX, dY, angle ); + + if( !AddSegment( model, &lseg, nvcont, iseg ) ) + return false; + + ++iseg; + ++sseg; + } + + ++scont; + } + + return true; +} + + +bool AddSegment( VRML_LAYER& model, IDF_SEGMENT* seg, int icont, int iseg ) +{ + // note: in all cases we must add all but the last point in the segment + // to avoid redundant points + + if( seg->angle != 0.0 ) + { + if( seg->IsCircle() ) + { + if( iseg != 0 ) + { + ERROR_IDF << "adding a circle to an existing vertex list\n"; + return false; + } + + return model.AppendCircle( seg->center.x, seg->center.y, seg->radius, icont ); + } + else + { + return model.AppendArc( seg->center.x, seg->center.y, seg->radius, + seg->offsetAngle, seg->angle, icont ); + } + } + + if( !model.AddVertex( icont, seg->startPoint.x, seg->startPoint.y ) ) + return false; + + return true; +} + + +bool WriteTriangles( std::ofstream& file, VRML_IDS* vID, VRML_LAYER* layer, bool plane, + bool top, double top_z, double bottom_z, int precision, bool compact ) +{ + if( vID == NULL || layer == NULL ) + return false; + + file << "Transform {\n"; + + if( compact && !vID->objectName.empty() ) + { + file << "translation " << setprecision( precision ) << vID->dX; + file << " " << vID->dY << " "; + + if( vID->bottom ) + { + file << -vID->dZ << "\n"; + + double tx, ty; + + // calculate the rotation axis and angle + tx = cos( M_PI2 - vID->dA / 2.0 ); + ty = sin( M_PI2 - vID->dA / 2.0 ); + + file << "rotation " << setprecision( precision ); + file << tx << " " << ty << " 0 "; + file << setprecision(5) << M_PI << "\n"; + } + else + { + file << vID->dZ << "\n"; + file << "rotation 0 0 1 " << setprecision(5) << vID->dA << "\n"; + } + + file << "children [\n"; + + if( vID->used ) + { + file << "USE " << vID->objectName << "\n"; + file << "]\n"; + file << "}\n"; + return true; + } + + file << "DEF " << vID->objectName << " Transform {\n"; + + if( !plane && top_z <= bottom_z ) + { + // the height specification is faulty; make the component + // a bright red to highlight it + vID->colorIndex = 1; + // we don't know the scale, but 5 units is huge in most situations + top_z = bottom_z + 5.0; + } + + } + + VRML_COLOR* color = &colors[vID->colorIndex]; + + vID->used = true; + + file << "children [\n"; + file << "Group {\n"; + file << "children [\n"; + file << "Shape {\n"; + file << "appearance Appearance {\n"; + file << "material Material {\n"; + + // material definition + file << "diffuseColor " << setprecision(3) << color->diff[0] << " "; + file << color->diff[1] << " " << color->diff[2] << "\n"; + file << "specularColor " << color->spec[0] << " " << color->spec[1]; + file << " " << color->spec[2] << "\n"; + file << "emissiveColor " << color->emis[0] << " " << color->emis[1]; + file << " " << color->emis[2] << "\n"; + file << "ambientIntensity " << color->ambi << "\n"; + file << "transparency " << color->tran << "\n"; + file << "shininess " << color->shin << "\n"; + + file << "}\n"; + file << "}\n"; + file << "geometry IndexedFaceSet {\n"; + file << "solid TRUE\n"; + file << "coord Coordinate {\n"; + file << "point [\n"; + + // XXX: TODO: check return values of Write() routines; they may fail + // even though the stream is good (bad internal data) + + // Coordinates (vertices) + if( plane ) + { + if( ! layer->WriteVertices( top_z, file, precision ) ) + { + cerr << "* errors writing planar vertices to " << vID->objectName << "\n"; + cerr << "** " << layer->GetError() << "\n"; + } + } + else + { + if( ! layer->Write3DVertices( top_z, bottom_z, file, precision ) ) + { + cerr << "* errors writing 3D vertices to " << vID->objectName << "\n"; + cerr << "** " << layer->GetError() << "\n"; + } + } + + file << "\n"; + + file << "]\n"; + file << "}\n"; + file << "coordIndex [\n"; + + // Indices + if( plane ) + layer->WriteIndices( top, file ); + else + layer->Write3DIndices( file ); + + file << "\n"; + file << "]\n"; + file << "}\n"; + file << "}\n"; + file << "]\n"; + file << "}\n"; + file << "]\n"; + file << "}\n"; + + if( compact && !vID->objectName.empty() ) + { + file << "]\n"; + file << "}\n"; + } + + return !file.fail(); +} + +inline void TransformPoint( IDF_SEGMENT& seg, double frac, bool bottom, + double dX, double dY, double angle ) +{ + dX *= frac; + dY *= frac; + + if( bottom ) + { + // mirror points on the Y axis + seg.startPoint.x = -seg.startPoint.x; + seg.endPoint.x = -seg.endPoint.x; + seg.center.x = -seg.center.x; + angle = -angle; + } + + seg.startPoint.x *= frac; + seg.startPoint.y *= frac; + seg.endPoint.x *= frac; + seg.endPoint.y *= frac; + seg.center.x *= frac; + seg.center.y *= frac; + + double tsin = 0.0; + double tcos = 0.0; + + if( angle > MIN_ANG || angle < -MIN_ANG ) + { + double ta = angle * M_PI / 180.0; + double tx, ty; + + tsin = sin( ta ); + tcos = cos( ta ); + + tx = seg.startPoint.x * tcos - seg.startPoint.y * tsin; + ty = seg.startPoint.x * tsin + seg.startPoint.y * tcos; + seg.startPoint.x = tx; + seg.startPoint.y = ty; + + tx = seg.endPoint.x * tcos - seg.endPoint.y * tsin; + ty = seg.endPoint.x * tsin + seg.endPoint.y * tcos; + seg.endPoint.x = tx; + seg.endPoint.y = ty; + + if( seg.angle != 0 ) + { + tx = seg.center.x * tcos - seg.center.y * tsin; + ty = seg.center.x * tsin + seg.center.y * tcos; + seg.center.x = tx; + seg.center.y = ty; + } + } + + seg.startPoint.x += dX; + seg.startPoint.y += dY; + seg.endPoint.x += dX; + seg.endPoint.y += dY; + seg.center.x += dX; + seg.center.y += dY; + + if( seg.angle != 0 ) + { + seg.radius *= frac; + + if( bottom ) + { + if( !seg.IsCircle() ) + { + seg.angle = -seg.angle; + if( seg.offsetAngle > 0.0 ) + seg.offsetAngle = 180 - seg.offsetAngle; + else + seg.offsetAngle = -seg.offsetAngle - 180; + } + } + + if( angle > MIN_ANG || angle < -MIN_ANG ) + seg.offsetAngle += angle; + } + + return; +} + +bool MakeComponents( IDF3_BOARD& board, std::ofstream& file, bool compact ) +{ + int cidx = 2; // color index; start at 2 since 0,1 are special (board, NOGEOM_NOPART) + + VRML_LAYER vpcb; + + double scale = board.GetUserScale(); + double thick = board.GetBoardThickness() / 2.0; + + // set the arc parameters according to output scale + int tI; + double tMin, tMax; + vpcb.GetArcParams( tI, tMin, tMax ); + vpcb.SetArcParams( tI, tMin * scale, tMax * scale ); + + // Add the component outlines + const std::map< std::string, IDF3_COMPONENT* >*const comp = board.GetComponents(); + std::map< std::string, IDF3_COMPONENT* >::const_iterator sc = comp->begin(); + std::map< std::string, IDF3_COMPONENT* >::const_iterator ec = comp->end(); + + std::list< IDF3_COMP_OUTLINE_DATA* >::const_iterator so; + std::list< IDF3_COMP_OUTLINE_DATA* >::const_iterator eo; + + double vX, vY, vA; + double tX, tY, tZ, tA; + double top, bot; + bool bottom; + IDF3::IDF_LAYER lyr; + + std::map< std::string, VRML_IDS*> cmap; // map colors by outline UID + VRML_IDS* vcp; + + while( sc != ec ) + { + sc->second->GetPosition( vX, vY, vA, lyr ); + + if( lyr == IDF3::LYR_BOTTOM ) + bottom = true; + else + bottom = false; + + so = sc->second->GetOutlinesData()->begin(); + eo = sc->second->GetOutlinesData()->end(); + + while( so != eo ) + { + (*so)->GetOffsets( tX, tY, tZ, tA ); + tX += vX; + tY += vY; + tA += vA; + + vcp = GetColor( cmap, cidx, ((IDF3_COMP_OUTLINE*)((*so)->GetOutline()))->GetUID() ); + + if( !compact ) + { + if( !PopulateVRML( vpcb, (*so)->GetOutline()->GetOutlines(), bottom, + board.GetUserScale(), tX, tY, tA ) ) + { + return false; + } + } + else + { + if( !vcp->used && !PopulateVRML( vpcb, (*so)->GetOutline()->GetOutlines(), false, + board.GetUserScale() ) ) + { + return false; + } + + vcp->dX = tX * scale; + vcp->dY = tY * scale; + vcp->dZ = tZ * scale; + vcp->dA = tA * M_PI / 180.0; + } + + if( !compact || !vcp->used ) + { + vpcb.EnsureWinding( 0, false ); + vpcb.Tesselate( NULL ); + } + + if( !compact ) + { + if( bottom ) + { + top = -thick - tZ; + bot = (top - (*so)->GetOutline()->GetThickness() ) * scale; + top *= scale; + } + else + { + bot = thick + tZ; + top = (bot + (*so)->GetOutline()->GetThickness() ) * scale; + bot *= scale; + } + } + else + { + bot = thick; + top = (bot + (*so)->GetOutline()->GetThickness() ) * scale; + bot *= scale; + } + + vcp = GetColor( cmap, cidx, ((IDF3_COMP_OUTLINE*)((*so)->GetOutline()))->GetUID() ); + vcp->bottom = bottom; + + WriteTriangles( file, vcp, &vpcb, false, + false, top, bot, board.GetUserPrecision(), compact ); + + vpcb.Clear(); + ++so; + } + + ++sc; + } + + return true; +} + + +VRML_IDS* GetColor( std::map& cmap, int& index, const std::string& uid ) +{ + static int refnum = 0; + + if( index < 2 ) + index = 2; // 0 and 1 are special (BOARD, UID=NOGEOM_NOPART) + + std::map::iterator cit = cmap.find( uid ); + + if( cit == cmap.end() ) + { + VRML_IDS* id = new VRML_IDS; + + if( !uid.compare( "NOGEOM_NOPART" ) ) + id->colorIndex = 1; + else + id->colorIndex = index++; + + std::ostringstream ostr; + ostr << "OBJECTn" << refnum++; + id->objectName = ostr.str(); + + cout << "* " << ostr.str() << " = '" << uid << "'\n"; + + cmap.insert( std::pair(uid, id) ); + + if( index >= NCOLORS ) + index = 2; + + return id; + } + + return cit->second; +} diff --git a/utils/idftools/idf_common.cpp b/utils/idftools/idf_common.cpp new file mode 100644 index 0000000000..492ca928ce --- /dev/null +++ b/utils/idftools/idf_common.cpp @@ -0,0 +1,1376 @@ +/** + * file: idf_common.cpp + * + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013-2014 Cirilo Bernardo + * + * 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace IDF3; +using namespace std; + + +std::string source; +std::string message; + +IDF_ERROR::IDF_ERROR( const char* aSourceFile, + const char* aSourceMethod, + int aSourceLine, + const std::string& aMessage ) throw() +{ + ostringstream ostr; + + if( aSourceFile ) + ostr << "* " << aSourceFile << ":"; + else + ostr << "* [BUG: No Source File]:"; + + ostr << aSourceLine << ":"; + + if( aSourceMethod ) + ostr << aSourceMethod << "(): "; + else + ostr << "[BUG: No Source Method]:\n* "; + + ostr << aMessage; + message = ostr.str(); + + return; +} + + +IDF_ERROR::~IDF_ERROR() throw() +{ + return; +} + + +const char* IDF_ERROR::what() const throw() +{ + return message.c_str(); +} + + +IDF_NOTE::IDF_NOTE() +{ + xpos = 0.0; + ypos = 0.0; + height = 0.0; + length = 0.0; +} + + +bool IDF_NOTE::ReadNote( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBoardState, + IDF3::IDF_UNIT aBoardUnit ) +{ + std::string iline; // the input line + bool isComment; // true if a line just read in is a comment line + std::streampos pos; + int idx = 0; + bool quoted = false; + std::string token; + + // RECORD 2: X, Y, text Height, text Length, "TEXT" + while( !FetchIDFLine( aBoardFile, iline, isComment, pos ) && aBoardFile.good() ); + + if( ( !aBoardFile.good() && !aBoardFile.eof() ) || iline.empty() ) + { + ERROR_IDF; + cerr << "problems reading board notes\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( isComment ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: comment within a section (NOTES)\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + idx = 0; + GetIDFString( iline, token, quoted, idx ); + + if( quoted ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: X position in NOTES section must not be in quotes\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( CompareToken( ".END_NOTES", token ) ) + { + // the end of the note section is a special case; although we return 'false' + // we do not change the board's state variable and we ensure that errno is 0; + // all other false returns set the state to FILE_INVALID + errno = 0; + return false; + } + + istringstream istr; + istr.str( token ); + + istr >> xpos; + if( istr.fail() ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: X position in NOTES section is not numeric\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: Y position in NOTES section is missing\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( quoted ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: Y position in NOTES section must not be in quotes\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + istr.clear(); + istr.str( token ); + + istr >> ypos; + if( istr.fail() ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: Y position in NOTES section is not numeric\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: text height in NOTES section is missing\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( quoted ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: text height in NOTES section must not be in quotes\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + istr.clear(); + istr.str( token ); + + istr >> height; + if( istr.fail() ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: text height in NOTES section is not numeric\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: text length in NOTES section is missing\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( quoted ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: text length in NOTES section must not be in quotes\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + istr.clear(); + istr.str( token ); + + istr >> length; + if( istr.fail() ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: text length in NOTES section is not numeric\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: text value in NOTES section is missing\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + text = token; + + if( aBoardUnit == UNIT_THOU ) + { + xpos *= IDF_MM_TO_THOU; + ypos *= IDF_MM_TO_THOU; + height *= IDF_MM_TO_THOU; + length *= IDF_MM_TO_THOU; + } + + return true; +} + + +bool IDF_NOTE::WriteNote( std::ofstream& aBoardFile, IDF3::IDF_UNIT aBoardUnit ) +{ + if( aBoardUnit == UNIT_THOU ) + { + aBoardFile << setiosflags(ios::fixed) << setprecision(1) + << (xpos / IDF_MM_TO_THOU) << " " + << (ypos / IDF_MM_TO_THOU) << " " + << (height / IDF_MM_TO_THOU) << " " + << (length / IDF_MM_TO_THOU) << " "; + } + else + { + aBoardFile << setiosflags(ios::fixed) << setprecision(5) + << xpos << " " << ypos << " " << height << " " << length << " "; + } + + aBoardFile << "\"" << text << "\"\n"; + + return !aBoardFile.bad(); +} + + +void IDF_NOTE::SetText( const std::string& aText ) +{ + text = aText; + return; +} + +void IDF_NOTE::SetPosition( double aXpos, double aYpos ) +{ + xpos = aXpos; + ypos = aYpos; + return; +} + +void IDF_NOTE::SetSize( double aHeight, double aLength ) +{ + height = aHeight; + length = aLength; + return; +} + +const std::string& IDF_NOTE::GetText( void ) +{ + return text; +} + +void IDF_NOTE::GetPosition( double& aXpos, double& aYpos ) +{ + aXpos = xpos; + aYpos = ypos; + return; +} + +void IDF_NOTE::GetSize( double& aHeight, double& aLength ) +{ + aHeight = height; + aLength = length; + return; +} + + +/* + * CLASS: IDF_DRILL_DATA + */ +IDF_DRILL_DATA::IDF_DRILL_DATA() +{ + dia = 0.0; + x = 0.0; + y = 0.0; + plating = NPTH; + kref = NOREFDES; + khole = MTG; + owner = UNOWNED; + + return; +} + + +IDF_DRILL_DATA::IDF_DRILL_DATA( double aDrillDia, double aPosX, double aPosY, + IDF3::KEY_PLATING aPlating, + const std::string aRefDes, + const std::string aHoleType, + IDF3::KEY_OWNER aOwner ) +{ + if( aDrillDia < 0.3 ) + dia = 0.3; + else + dia = aDrillDia; + + x = aPosX; + y = aPosY; + plating = aPlating; + + if( !aRefDes.compare( "BOARD" ) ) + { + kref = BOARD; + } + else if( aRefDes.empty() || !aRefDes.compare( "NOREFDES" ) ) + { + kref = NOREFDES; + } + else if( !aRefDes.compare( "PANEL" ) ) + { + kref = PANEL; + } + else + { + kref = REFDES; + refdes = aRefDes; + } + + if( !aHoleType.compare( "PIN" ) ) + { + khole = PIN; + } + else if( !aHoleType.compare( "VIA" ) ) + { + khole = VIA; + } + else if( aHoleType.empty() || !aHoleType.compare( "MTG" ) ) + { + khole = MTG; + } + else if( !aHoleType.compare( "TOOL" ) ) + { + khole = TOOL; + } + else + { + khole = OTHER; + holetype = aHoleType; + } + + owner = aOwner; +} // IDF_DRILL_DATA::IDF_DRILL_DATA( ... ) + +bool IDF_DRILL_DATA::Matches( double aDrillDia, double aPosX, double aPosY ) +{ + double ddia = aDrillDia - dia; + IDF_POINT p1, p2; + + p1.x = x; + p1.y = y; + p2.x = aPosX; + p2.y = aPosY; + + if( ddia > -0.00001 && ddia < 0.00001 && p1.Matches( p2, 0.00001 ) ) + return true; + + return false; +} + +bool IDF_DRILL_DATA::Read( std::ifstream& aBoardFile, IDF3::IDF_UNIT aBoardUnit, + IDF3::FILE_STATE aBoardState ) +{ + std::string iline; // the input line + bool isComment; // true if a line just read in is a comment line + std::streampos pos; + int idx = 0; + bool quoted = false; + std::string token; + + // RECORD 2: DIA, X, Y, Plating Style, REFDES, HOLE TYPE, HOLE OWNER + while( !FetchIDFLine( aBoardFile, iline, isComment, pos ) && aBoardFile.good() ); + + if( ( !aBoardFile.good() && !aBoardFile.eof() ) || iline.empty() ) + { + ERROR_IDF; + cerr << "problems reading board drilled holes\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( isComment ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: comment within a section (DRILLED HOLES)\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + idx = 0; + GetIDFString( iline, token, quoted, idx ); + + if( quoted ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: drill diameter must not be in quotes\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( CompareToken( ".END_DRILLED_HOLES", token ) ) + { + // the end of the section is a special case; although we return 'false' + // we do not change the board's state variable and we ensure that errno is 0; + // all other false returns set the state to FILE_INVALID + errno = 0; + return false; + } + + istringstream istr; + istr.str( token ); + + istr >> dia; + if( istr.fail() ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: drill diameter is not numeric\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( ( aBoardUnit == UNIT_MM && dia < IDF_MIN_DIA_MM ) + || ( aBoardUnit != UNIT_MM && dia < IDF_MIN_DIA_THOU ) ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Invalid drill diameter (too small): " << token << "\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: missing X position for drilled hole\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( quoted ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: X position in DRILLED HOLES section must not be in quotes\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + istr.clear(); + istr.str( token ); + + istr >> x; + if( istr.fail() ) + { + ERROR_IDF; + cerr << "* Violation of specification: X position in DRILLED HOLES section is not numeric\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: missing Y position for drilled hole\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( quoted ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: Y position in DRILLED HOLES section must not be in quotes\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + istr.clear(); + istr.str( token ); + + istr >> y; + if( istr.fail() ) + { + ERROR_IDF; + cerr << "* Violation of specification: Y position in DRILLED HOLES section is not numeric\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: missing PLATING for drilled hole\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( CompareToken( "PTH", token ) ) + { + plating = IDF3::PTH; + } + else if( CompareToken( "NPTH", token ) ) + { + plating = IDF3::NPTH; + } + else + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: invalid PLATING type ('" << token << "')\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: missing REFDES for drilled hole\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( CompareToken( "BOARD", token ) ) + { + kref = IDF3::BOARD; + } + else if( CompareToken( "NOREFDES", token ) ) + { + kref = IDF3::NOREFDES; + } + else if( CompareToken( "PANEL", token ) ) + { + kref = IDF3::PANEL; + } + else + { + kref = IDF3::REFDES; + refdes = token; + } + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: missing HOLE TYPE for drilled hole\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( CompareToken( "PIN", token ) ) + { + khole = IDF3::PIN; + } + else if( CompareToken( "VIA", token ) ) + { + khole = IDF3::VIA; + } + else if( CompareToken( "MTG", token ) ) + { + khole = IDF3::MTG; + } + else if( CompareToken( "TOOL", token ) ) + { + khole = IDF3::TOOL; + } + else + { + khole = IDF3::OTHER; + holetype = token; + } + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: missing OWNER for drilled hole\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( !ParseOwner( token, owner ) ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: invalid OWNER for drilled hole ('" << token << "')\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( aBoardUnit == UNIT_THOU ) + { + dia *= IDF_MM_TO_THOU; + x *= IDF_MM_TO_THOU; + y *= IDF_MM_TO_THOU; + } + + return true; +} + +bool IDF_DRILL_DATA::Write( std::ofstream& aBoardFile, IDF3::IDF_UNIT aBoardUnit ) +{ + std::string holestr; + std::string refstr; + std::string ownstr; + std::string pltstr; + + switch( khole ) + { + case PIN: + holestr = "PIN"; + break; + + case VIA: + holestr = "VIA"; + break; + + case TOOL: + holestr = "TOOL"; + break; + + case OTHER: + holestr = "\"" + holetype + "\""; + break; + + default: + holestr = "MTG"; + break; + } + + switch( kref ) + { + case BOARD: + refstr = "BOARD"; + break; + + case PANEL: + refstr = "PANEL"; + break; + + case REFDES: + refstr = "\"" + refdes + "\""; + break; + + default: + refstr = "NOREFDES"; + break; + } + + if( plating == PTH ) + pltstr = "PTH"; + else + pltstr = "NPTH"; + + switch( owner ) + { + case MCAD: + ownstr = "MCAD"; + break; + + case ECAD: + ownstr = "ECAD"; + break; + + default: + ownstr = "UNOWNED"; + break; + } + + if( aBoardUnit == UNIT_MM ) + { + aBoardFile << std::setiosflags( std::ios::fixed ) << std::setprecision( 3 ) << dia << " " + << std::setprecision( 5 ) << x << " " << y << " " + << pltstr.c_str() << " " << refstr.c_str() << " " + << holestr.c_str() << " " << ownstr.c_str() << "\n"; + } + else + { + aBoardFile << std::setiosflags( std::ios::fixed ) << std::setprecision( 1 ) << (dia / IDF_MM_TO_THOU) << " " + << std::setprecision( 1 ) << (x / IDF_MM_TO_THOU) << " " << (y / IDF_MM_TO_THOU) << " " + << pltstr.c_str() << " " << refstr.c_str() << " " + << holestr.c_str() << " " << ownstr.c_str() << "\n"; + } + + return ! aBoardFile.fail(); +} // IDF_DRILL_DATA::Write( aBoardFile, unitMM ) + + +double IDF_DRILL_DATA::GetDrillDia() +{ + return dia; +} + +double IDF_DRILL_DATA::GetDrillXPos() +{ + return x; +} + +double IDF_DRILL_DATA::GetDrillYPos() +{ + return y; +} + +IDF3::KEY_PLATING IDF_DRILL_DATA::GetDrillPlating() +{ + return plating; +} + +const std::string& IDF_DRILL_DATA::GetDrillRefDes() +{ + switch( kref ) + { + case BOARD: + refdes = "BOARD"; + break; + + case PANEL: + refdes = "PANEL"; + break; + + case REFDES: + break; + + default: + refdes = "NOREFDES"; + break; + } + + return refdes; +} + +const std::string& IDF_DRILL_DATA::GetDrillHoleType() +{ + switch( khole ) + { + case PIN: + holetype = "PIN"; + break; + + case VIA: + holetype = "VIA"; + break; + + case TOOL: + holetype = "TOOL"; + break; + + case OTHER: + break; + + default: + holetype = "MTG"; + break; + } + + return holetype; +} + + +#ifdef DEBUG_IDF +void IDF3::PrintSeg( IDF_SEGMENT* aSegment ) +{ + if( aSegment->IsCircle() ) + { + fprintf(stdout, "printSeg(): CIRCLE: C(%.3f, %.3f) P(%.3f, %.3f) rad. %.3f\n", + aSegment->startPoint.x, aSegment->startPoint.y, + aSegment->endPoint.x, aSegment->endPoint.y, + aSegment->radius ); + return; + } + + if( aSegment->angle < -MIN_ANG || aSegment->angle > MIN_ANG ) + { + fprintf(stdout, "printSeg(): ARC: p1(%.3f, %.3f) p2(%.3f, %.3f) ang. %.3f\n", + aSegment->startPoint.x, aSegment->startPoint.y, + aSegment->endPoint.x, aSegment->endPoint.y, + aSegment->angle ); + return; + } + + fprintf(stdout, "printSeg(): LINE: p1(%.3f, %.3f) p2(%.3f, %.3f)\n", + aSegment->startPoint.x, aSegment->startPoint.y, + aSegment->endPoint.x, aSegment->endPoint.y ); + + return; +} +#endif + + +bool IDF_POINT::Matches( const IDF_POINT& aPoint, double aRadius ) +{ + double dx = x - aPoint.x; + double dy = y - aPoint.y; + + double d2 = dx * dx + dy * dy; + + if( d2 <= aRadius * aRadius ) + return true; + + return false; +} + + +double IDF_POINT::CalcDistance( const IDF_POINT& aPoint ) const +{ + double dx = aPoint.x - x; + double dy = aPoint.y - y; + double dist = sqrt( dx * dx + dy * dy ); + + return dist; +} + + +double IDF3::CalcAngleRad( const IDF_POINT& aStartPoint, const IDF_POINT& aEndPoint ) +{ + return atan2( aEndPoint.y - aStartPoint.y, aEndPoint.x - aStartPoint.x ); +} + + +double IDF3::CalcAngleDeg( const IDF_POINT& aStartPoint, const IDF_POINT& aEndPoint ) +{ + double ang = CalcAngleRad( aStartPoint, aEndPoint ); + + // round to thousandths of a degree + int iang = int (ang / M_PI * 1800000.0); + + ang = iang / 10000.0; + + return ang; +} + + +void IDF3::GetOutline( std::list& aLines, + IDF_OUTLINE& aOutline ) +{ + aOutline.Clear(); + + // NOTE: To tell if the point order is CCW or CW, + // sum all: (endPoint.X[n] - startPoint.X[n])*(endPoint[n] + startPoint.Y[n]) + // If the result is >0, the direction is CW, otherwise + // it is CCW. Note that the result cannot be 0 unless + // we have a bounded area of 0. + + // First we find the segment with the leftmost point + std::list::iterator bl = aLines.begin(); + std::list::iterator el = aLines.end(); + std::list::iterator idx = bl++; // iterator for the object with minX + + double minx = (*idx)->GetMinX(); + double curx; + + while( bl != el ) + { + curx = (*bl)->GetMinX(); + + if( curx < minx ) + { + minx = curx; + idx = bl; + } + + ++bl; + } + + aOutline.push( *idx ); +#ifdef DEBUG_IDF + PrintSeg( *idx ); +#endif + aLines.erase( idx ); + + // If the item is a circle then we're done + if( aOutline.front()->IsCircle() ) + return; + + // Assemble the loop + bool complete = false; // set if loop is complete + bool matched; // set if a segment's end point was matched + + while( !complete ) + { + matched = false; + bl = aLines.begin(); + el = aLines.end(); + + while( bl != el && !matched ) + { + if( (*bl)->MatchesStart( aOutline.back()->endPoint ) ) + { + if( (*bl)->IsCircle() ) + { + // a circle on the perimeter is pathological but we just ignore it + ++bl; + } + else + { + matched = true; +#ifdef DEBUG_IDF + PrintSeg( *bl ); +#endif + aOutline.push( *bl ); + aLines.erase( bl ); + } + + continue; + } + + ++bl; + } + + if( !matched ) + { + // attempt to match the end points + bl = aLines.begin(); + el = aLines.end(); + + while( bl != el && !matched ) + { + if( (*bl)->MatchesEnd( aOutline.back()->endPoint ) ) + { + if( (*bl)->IsCircle() ) + { + // a circle on the perimeter is pathological but we just ignore it + ++bl; + } + else + { + matched = true; + (*bl)->SwapEnds(); +#ifdef DEBUG_IDF + printSeg( *bl ); +#endif + aOutline.push( *bl ); + aLines.erase( bl ); + } + + continue; + } + + ++bl; + } + } + + if( !matched ) + { + // still no match - attempt to close the loop + if( (aOutline.size() > 1) || ( aOutline.front()->angle < -MIN_ANG ) + || ( aOutline.front()->angle > MIN_ANG ) ) + { + // close the loop + IDF_SEGMENT* seg = new IDF_SEGMENT( aOutline.back()->endPoint, + aOutline.front()->startPoint ); + + if( seg ) + { + complete = true; +#ifdef DEBUG_IDF + printSeg( seg ); +#endif + aOutline.push( seg ); + break; + } + } + + // the outline is bad; drop the segments + aOutline.Clear(); + + return; + } + + // check if the loop is complete + if( aOutline.front()->MatchesStart( aOutline.back()->endPoint ) ) + { + complete = true; + break; + } + } +} + + +IDF_SEGMENT::IDF_SEGMENT() +{ + angle = 0.0; + offsetAngle = 0.0; + radius = 0.0; +} + + +IDF_SEGMENT::IDF_SEGMENT( const IDF_POINT& aStartPoint, const IDF_POINT& aEndPoint ) +{ + angle = 0.0; + offsetAngle = 0.0; + radius = 0.0; + startPoint = aStartPoint; + endPoint = aEndPoint; +} + + +IDF_SEGMENT::IDF_SEGMENT( const IDF_POINT& aStartPoint, + const IDF_POINT& aEndPoint, + double aAngle, + bool aFromKicad ) +{ + double diff = abs( aAngle ) - 360.0; + + if( ( diff < MIN_ANG + && diff > -MIN_ANG ) || ( aAngle < MIN_ANG && aAngle > -MIN_ANG ) || (!aFromKicad) ) + { + angle = 0.0; + startPoint = aStartPoint; + endPoint = aEndPoint; + + if( diff < MIN_ANG && diff > -MIN_ANG ) + { + angle = 360.0; + center = aStartPoint; + offsetAngle = 0.0; + radius = aStartPoint.CalcDistance( aEndPoint ); + } + else if( aAngle > MIN_ANG || aAngle < -MIN_ANG ) + { + angle = aAngle; + CalcCenterAndRadius(); + } + + return; + } + + // we need to convert from the KiCad arc convention + angle = aAngle; + + center = aStartPoint; + + offsetAngle = IDF3::CalcAngleDeg( aStartPoint, aEndPoint ); + + radius = aStartPoint.CalcDistance( aEndPoint ); + + startPoint = aEndPoint; + + double ang = offsetAngle + aAngle; + ang = (ang / 180.0) * M_PI; + + endPoint.x = ( radius * cos( ang ) ) + center.x; + endPoint.y = ( radius * sin( ang ) ) + center.y; +} + + +bool IDF_SEGMENT::MatchesStart( const IDF_POINT& aPoint, double aRadius ) +{ + return startPoint.Matches( aPoint, aRadius ); +} + + +bool IDF_SEGMENT::MatchesEnd( const IDF_POINT& aPoint, double aRadius ) +{ + return endPoint.Matches( aPoint, aRadius ); +} + + +void IDF_SEGMENT::CalcCenterAndRadius( void ) +{ + // NOTE: this routine does not check if the points are the same + // or too close to be sensible in a production setting. + + double offAng = IDF3::CalcAngleRad( startPoint, endPoint ); + double d = startPoint.CalcDistance( endPoint ) / 2.0; + double xm = ( startPoint.x + endPoint.x ) * 0.5; + double ym = ( startPoint.y + endPoint.y ) * 0.5; + + radius = d / sin( angle * M_PI / 360.0 ); + + if( radius < 0.0 ) + { + radius = -radius; + } + + // calculate the height of the triangle with base d and hypotenuse r + double dh2 = radius * radius - d * d; + + if( dh2 < 0 ) + { + // this should only ever happen due to rounding errors when r == d + dh2 = 0; + } + + double h = sqrt( dh2 ); + + if( angle > 0.0 ) + offAng += M_PI2; + else + offAng -= M_PI2; + + if( ( angle > 180.0 ) || ( angle < -180.0 ) ) + offAng += M_PI; + + center.x = h * cos( offAng ) + xm; + center.y = h * sin( offAng ) + ym; + + offsetAngle = IDF3::CalcAngleDeg( center, startPoint ); +} + + +bool IDF_SEGMENT::IsCircle( void ) +{ + double diff = abs( angle ) - 360.0; + + if( ( diff < MIN_ANG ) && ( diff > -MIN_ANG ) ) + return true; + + return false; +} + + +double IDF_SEGMENT::GetMinX( void ) +{ + if( angle == 0.0 ) + return std::min( startPoint.x, endPoint.x ); + + // Calculate the leftmost point of the circle or arc + + if( IsCircle() ) + { + // if only everything were this easy + return center.x - radius; + } + + // cases: + // 1. CCW arc: if offset + included angle >= 180 deg then + // MinX = center.x - radius, otherwise MinX is the + // same as for the case of a line. + // 2. CW arc: if offset + included angle <= -180 deg then + // MinX = center.x - radius, otherwise MinX is the + // same as for the case of a line. + + if( angle > 0 ) + { + // CCW case + if( ( offsetAngle + angle ) >= 180.0 ) + { + return center.x - radius; + } + else + { + return std::min( startPoint.x, endPoint.x ); + } + } + + // CW case + if( ( offsetAngle + angle ) <= -180.0 ) + { + return center.x - radius; + } + + return std::min( startPoint.x, endPoint.x ); +} + + +void IDF_SEGMENT::SwapEnds( void ) +{ + if( IsCircle() ) + { + // reverse the direction + angle = -angle; + return; + } + + IDF_POINT tmp = startPoint; + startPoint = endPoint; + endPoint = tmp; + + if( ( angle < MIN_ANG ) && ( angle > -MIN_ANG ) ) + return; // nothing more to do + + // change the direction of the arc + angle = -angle; + // calculate the new offset angle + offsetAngle = IDF3::CalcAngleDeg( center, startPoint ); +} + + +bool IDF_OUTLINE::IsCCW( void ) +{ + // note: when outlines are not valid, 'false' is returned + switch( outline.size() ) + { + case 0: + // no outline + return false; + break; + + case 1: + // circles are always reported as CCW + if( outline.front()->IsCircle() ) + return true; + else + return false; + break; + + case 2: + // we may have a closed outline consisting of: + // 1. arc and line, winding depends on the arc + // 2. 2 arcs, winding depends on larger arc + { + double a1 = outline.front()->angle; + double a2 = outline.back()->angle; + + if( ( a1 < -MIN_ANG || a1 > MIN_ANG ) + && ( a2 < -MIN_ANG || a2 > MIN_ANG ) ) + { + // we have 2 arcs + if( abs( a1 ) >= abs( a2 ) ) + { + // winding depends on a1 + if( a1 < 0.0 ) + return false; + else + return true; + } + else + { + if( a2 < 0.0 ) + return false; + else + return true; + } + } + + // we may have a line + arc (or 2 lines) + if( a1 < -MIN_ANG ) + return false; + + if( a1 > MIN_ANG ) + return true; + + if( a2 < -MIN_ANG ) + return false; + + if( a2 > MIN_ANG ) + return true; + + // we have 2 lines (invalid outline) + return false; + } + break; + + default: + break; + } + + double winding = dir + ( outline.front()->startPoint.x - outline.back()->endPoint.x ) + * ( outline.front()->startPoint.y + outline.back()->endPoint.y ); + + if( winding > 0.0 ) + return false; + + return true; +} + + +// returns true if the outline is a circle +bool IDF_OUTLINE::IsCircle( void ) +{ + if( outline.front()->IsCircle() ) + return true; + + return false; +} + + +bool IDF_OUTLINE::push( IDF_SEGMENT* item ) +{ + if( !outline.empty() ) + { + if( item->IsCircle() ) + { + // not allowed + ERROR_IDF << "INVALID GEOMETRY\n"; + cerr << "* a circle is being added to a non-empty outline\n"; + return false; + } + else + { + if( outline.back()->IsCircle() ) + { + // we can't add lines to a circle + ERROR_IDF << "INVALID GEOMETRY\n"; + cerr << "* a line is being added to a circular outline\n"; + return false; + } + else if( !item->MatchesStart( outline.back()->endPoint ) ) + { + // startPoint[N] != endPoint[N -1] + ERROR_IDF << "INVALID GEOMETRY\n"; + cerr << "* disjoint segments (current start point != last end point)\n"; + cerr << "* start point: " << item->startPoint.x << ", " << item->startPoint.y << "\n"; + cerr << "* end point: " << outline.back()->endPoint.x << ", " << outline.back()->endPoint.y << "\n"; + return false; + } + } + } + + outline.push_back( item ); + dir += ( outline.back()->endPoint.x - outline.back()->startPoint.x ) + * ( outline.back()->endPoint.y + outline.back()->startPoint.y ); + + return true; +} diff --git a/utils/idftools/idf_common.h b/utils/idftools/idf_common.h new file mode 100644 index 0000000000..ffa9faf7f2 --- /dev/null +++ b/utils/idftools/idf_common.h @@ -0,0 +1,705 @@ +/** + * @file idf_common.h + */ + +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013-2014 Cirilo Bernardo + * + * 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 IDF_COMMON_H +#define IDF_COMMON_H + +#include +#include +#include +#include + +#ifndef M_PI +#define M_PI 3.1415926535897932384626433832795028841 +#endif + +#ifndef M_PI2 +#define M_PI2 ( M_PI / 2.0 ) +#endif + +#ifndef M_PI4 +#define M_PI4 ( M_PI / 4.0 ) +#endif + +// differences in angle smaller than MIN_ANG are considered equal +#define MIN_ANG (0.01) + +class IDF_POINT; +class IDF_SEGMENT; +class IDF_DRILL_DATA; +class IDF_OUTLINE; +class IDF_LIB; + + +struct IDF_ERROR : std::exception +{ + std::string message; + + IDF_ERROR( const char* aSourceFile, + const char* aSourceMethod, + int aSourceLine, + const std::string& aMessage ) throw(); + + virtual ~IDF_ERROR() throw(); + + virtual const char* what() const throw(); +}; + + +namespace IDF3 { + + /** + * ENUM FILE_STATE + * represents state values for the IDF parser's input + */ + enum FILE_STATE + { + FILE_START = 0, // no data has been read; expecting .HEADER + FILE_HEADER, // header has been read; expecting .BOARD_OUTLINE + FILE_OUTLINE, // board outline has been read; most sections can be accepted + FILE_PLACEMENT, // placement has been read; no further sections can be accepted + FILE_INVALID, // file is invalid + FILE_ERROR // other errors while processing the file + }; + + /** + * ENUM KEY_OWNER + * represents the type of CAD which has ownership an object + */ + enum KEY_OWNER + { + UNOWNED = 0, //< either MCAD or ECAD may modify a feature + MCAD, //< only MCAD may modify a feature + ECAD //< only ECAD may modify a feature + }; + + /** + * ENUM KEY_HOLETYPE + * represents the purpose of an IDF hole + */ + enum KEY_HOLETYPE + { + PIN = 0, //< drill hole is for a pin + VIA, //< drill hole is for a via + MTG, //< drill hole is for mounting + TOOL, //< drill hole is for tooling + OTHER //< user has specified a custom type + }; + + /** + * ENUM KEY_PLATING + * represents the plating condition of a hole + */ + enum KEY_PLATING + { + PTH = 0, //< Plate-Through Hole + NPTH //< Non-Plate-Through Hole + }; + + /** + * ENUM KEY_REFDES + * represents a component's Reference Designator + */ + enum KEY_REFDES + { + BOARD = 0, //< feature is associated with the board + NOREFDES, //< feature is associated with a component with no RefDes + PANEL, //< feature is associated with an IDF panel + REFDES //< reference designator as assigned by the CAD software + }; + + /** + * ENUM CAD_TYPE + * represents the class of CAD program which is opening or modifying a file + */ + enum CAD_TYPE + { + CAD_ELEC = 0, //< An Electrical CAD is opening/modifying the file + CAD_MECH, //< A Mechanical CAD is opening/modifying the file + CAD_INVALID + }; + + /** + * ENUM IDF_LAYER + * represents the various IDF layer classes and groupings + */ + enum IDF_LAYER + { + LYR_TOP = 0, + LYR_BOTTOM, + LYR_BOTH, + LYR_INNER, + LYR_ALL, + LYR_INVALID + }; + + /** + * ENUM OUTLINE_TYPE + * identifies the class of outline + */ + enum OUTLINE_TYPE + { + OTLN_BOARD = 0, + OTLN_OTHER, + OTLN_PLACE, + OTLN_ROUTE, + OTLN_PLACE_KEEPOUT, + OTLN_ROUTE_KEEPOUT, + OTLN_VIA_KEEPOUT, + OTLN_GROUP_PLACE, + OTLN_COMPONENT, + OTLN_INVALID + }; + + /** + * ENUM COMP_TYPE + * identifies whether a component is a mechanical or electrical part + */ + enum COMP_TYPE + { + COMP_ELEC = 0, //< Component library object is an electrical part + COMP_MECH, //< Component library object is a mechanical part + COMP_INVALID + }; + + /** + * ENUM IDF_UNIT + * represents the native unit of the board and of component outlines + */ + enum IDF_UNIT + { + UNIT_MM = 0, //< Units in the file are in millimeters + UNIT_THOU, //< Units in the file are in mils (aka thou) + UNIT_INVALID + }; + + /** + * ENUM IDF_PLACEMENT + * represents the placement status of a component + */ + enum IDF_PLACEMENT + { + PS_UNPLACED = 0, //< component location on the board has not been specified + PS_PLACED, //< component location has been specified and may be modified by ECAD or MCAD + PS_MCAD, //< component location has been specified and may only be modified by MCAD + PS_ECAD, //< component location has been specified and may only be modified by ECAD + PS_INVALID + }; + + /** + * Function CalcAngleRad + * calculates the angle (radians) between the horizon and the segment aStartPoint to aEndPoint + * + * @param aStartPoint is the start point of a line segment + * @param aEndPoint is the end point of a line segment + * + * @return double: the angle in radians + */ + double CalcAngleRad( const IDF_POINT& aStartPoint, const IDF_POINT& aEndPoint ); + + + /** + * Function CalcAngleDeg + * calculates the angle (degrees) between the horizon and the segment aStartPoint to aEndPoint + * + * @param aStartPoint is the start point of a line segment + * @param aEndPoint is the end point of a line segment + * + * @return double: the angle in degrees + */ + double CalcAngleDeg( const IDF_POINT& aStartPoint, const IDF_POINT& aEndPoint ); + + /** + * Function GetOutline + * takes contiguous elements from 'aLines' and stuffs them into 'aOutline'; elements put + * into the outline are deleted from aLines. This function is useful for sorting the jumbled + * mess of line segments and arcs which represent a board outline and cutouts in KiCad. + * The function will determine which segment element within aLines contains the leftmost + * point and retrieve the outline of which that segment is part. + * + * @param aLines (input/output) is a list of IDF segments which comprise an outline and + * cutouts. + * @param aOutline (output) is the ordered set of segments + */ + void GetOutline( std::list& aLines, + IDF_OUTLINE& aOutline ); + +#ifdef DEBUG_IDF + // prints out segment information for debug purposes + void PrintSeg( IDF_SEGMENT* aSegment ); +#endif +} + + +/** + * Class IDF_NOTE + * represents an entry in the NOTE section of an IDF file + */ +class IDF_NOTE +{ +private: + std::string text; // note text as per IDFv3 + double xpos; // text X position as per IDFv3 + double ypos; // text Y position as per IDFv3 + double height; // text height as per IDFv3 + double length; // text length as per IDFv3 + +public: + IDF_NOTE(); + + /** + * Function ReadNote + * reads a note entry from an IDFv3 file + * + * @param aBoardFile is an open BOARD file; the file position must be set to the start of a NOTE entry + * @param aBoardState is the parser's current state value + * @param aBoardUnit is the BOARD file's native units (MM or THOU) + * + * @return bool: true if a note item was read, false otherwise. In case of unrecoverable errors + * an exception is thrown + */ + bool ReadNote( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBoardState, IDF3::IDF_UNIT aBoardUnit ); + + /** + * Function WriteNote + * writes a note entry to an IDFv3 file + * + * @param aBoardFile is an open BOARD file; the file position must be within a NOTE section + * @param aBoardUnit is the BOARD file's native units (MM or THOU) + * + * @return bool: true if the item was successfully written, false otherwise. In case of + * unrecoverable errors an exception is thrown + */ + bool WriteNote( std::ofstream& aBoardFile, IDF3::IDF_UNIT aBoardUnit ); + + /** + * Function SetText + * sets the text to be stored as a NOTE entry + */ + void SetText( const std::string& aText ); + + /** + * Function SetPosition + * sets the position (mm) of the NOTE entry + */ + void SetPosition( double aXpos, double aYpos ); + + /** + * Function SetSize + * sets the height and length (mm) of the NOTE entry + */ + void SetSize( double aHeight, double aLength ); + + /** + * Function GetText + * returns the string stored in the note entry + */ + const std::string& GetText( void ); + + /** + * Function GetText + * returns the position (mm) of the note entry + */ + void GetPosition( double& aXpos, double& aYpos ); + + /** + * Function GetText + * returns the height and length (mm) of the note entry + */ + void GetSize( double& aHeight, double& aLength ); +}; + + +/** + * @Class IDF_DRILL_DATA + * contains information describing a drilled hole and is responsible for + * writing this information to a file in compliance with the IDFv3 specification. + */ +class IDF_DRILL_DATA +{ +private: + double dia; + double x; + double y; + IDF3::KEY_PLATING plating; + IDF3::KEY_REFDES kref; + IDF3::KEY_HOLETYPE khole; + std::string refdes; + std::string holetype; + IDF3::KEY_OWNER owner; + +public: + /** + * Constructor IDF_DRILL_DATA + * creates an empty drill entry which can be populated by the + * Read() function + */ + IDF_DRILL_DATA(); + + /** + * Constructor IDF_DRILL_DATA + * creates a drill entry with information compliant with the + * IDFv3 specifications. + * @param aDrillDia : drill diameter + * @param aPosX : X coordinate of the drill center + * @param aPosY : Y coordinate of the drill center + * @param aPlating : flag, PTH or NPTH + * @param aRefDes : component Reference Designator + * @param aHoleType : purpose of hole + * @param aOwner : one of MCAD, ECAD, UNOWNED + */ + IDF_DRILL_DATA( double aDrillDia, double aPosX, double aPosY, + IDF3::KEY_PLATING aPlating, + const std::string aRefDes, + const std::string aHoleType, + IDF3::KEY_OWNER aOwner ); + + /** + * Function Matches + * returns true if the given drill diameter and location + * matches the diameter and location of this IDF_DRILL_DATA object + * + * @param aDrillDia is the drill diameter (mm) + * @param aPosX is the X position (mm) of the drilled hole + * @param aPosY is the Y position (mm) of the drilled hole + * + * @return bool: true if the diameter and position match this object + */ + bool Matches( double aDrillDia, double aPosX, double aPosY ); + + /** + * Function Read + * read a drill entry from an IDFv3 file + * + * @param aBoardFile is an open IDFv3 file; the file position must be within the DRILLED_HOLES section + * @param aBoardUnit is the board file's native unit (MM or THOU) + * @param aBoardState is the state value of the parser + * + * @return bool: true if data was successfully read, otherwise false. In case of an + * unrecoverable error an exception is thrown + */ + bool Read( std::ifstream& aBoardFile, IDF3::IDF_UNIT aBoardUnit, IDF3::FILE_STATE aBoardState ); + + /** + * Function Write + * writes a single line representing a hole within a .DRILLED_HOLES section + * + * @param aBoardFile is an open BOARD file + * @param aBoardUnit is the native unit of the output file + * + * @return bool: true if the data was successfully written, otherwise false. In case of + * an unrecoverable error an exception is thrown + */ + bool Write( std::ofstream& aBoardFile, IDF3::IDF_UNIT aBoardUnit ); + + /** + * Function GettDrillDia + * returns the drill diameter in mm + */ + double GetDrillDia(); + + + /** + * Function GettDrillXPos + * returns the drill's X position in mm + */ + double GetDrillXPos(); + + /** + * Function GettDrillYPos + * returns the drill's Y position in mm + */ + double GetDrillYPos(); + + /** + * Function GetDrillPlating + * returns the plating value (PTH, NPTH) + */ + IDF3::KEY_PLATING GetDrillPlating(); + + /** + * Function GetDrillRefDes + * returns the reference designator of the hole; this + * may be a component reference designator, BOARD, or + * NOREFDES as per IDFv3. + */ + const std::string& GetDrillRefDes(); + + /** + * Function GetDrillHoleType + * returns the classification of the hole; this may be one of + * PIN, VIA, MTG, TOOL, or a user-specified string + */ + const std::string& GetDrillHoleType(); +}; + + +/** + * @Class IDF_POINT + * represents a point as used by the various IDF related classes + */ +class IDF_POINT +{ +public: + double x; // < X coordinate + double y; // < Y coordinate + + IDF_POINT() + { + x = 0.0; + y = 0.0; + } + + /** + * Function Matches() + * returns true if the given coordinate point is within the given radius + * of the point. + * + * @param aPoint : coordinates of the point being compared + * @param aRadius : radius (mm) within which the points are considered the same + * + * @return bool: true if this point matches the given point + */ + bool Matches( const IDF_POINT& aPoint, double aRadius = 1e-5 ); + + /** + * Function CalcDistance() + * returns the Euclidean distance between this point and the given point + * + * @param aPoint : coordinates of the point whose distance is to be determined + * + * @return double: distance between this point and aPoint + */ + double CalcDistance( const IDF_POINT& aPoint ) const; +}; + + +/** + * @Class IDF_SEGMENT + * represents a geometry segment as used in IDFv3 outlines; it may be any of + * an arc, line segment, or circle + */ +class IDF_SEGMENT +{ +private: + /** + * Function CalcCenterAndRadius() + * Calculates the center, radius, and angle between center and start point given the + * IDF compliant points and included angle. + * + * @var startPoint, @var endPoint, and @var angle must be set prior as per IDFv3 + */ + void CalcCenterAndRadius( void ); + +public: + IDF_POINT startPoint; ///< starting point coordinates in mm + IDF_POINT endPoint; ///< end point coordinates in mm + IDF_POINT center; ///< center of an arc or circle; internally calculated and not to be set by the user + double angle; ///< included angle (degrees) according to IDFv3 specification + double offsetAngle; ///< angle between center and start of arc; internally calculated + double radius; ///< radius of the arc or circle; internally calculated + + /** + * Constructor IDF_SEGMENT + * initializes the internal variables + */ + IDF_SEGMENT(); + + /** + * Function IDF_SEGMENT + * creates a straight segment + */ + IDF_SEGMENT( const IDF_POINT& aStartPoint, const IDF_POINT& aEndPoint ); + + /** + * Constructor IDF_SEGMENT + * creates a straight segment, arc, or circle depending on the angle + * + * @param aStartPoint : start point (center if using KiCad convention, otherwise IDF convention) + * @param aEndPoint : end point (start of arc if using KiCad convention, otherwise IDF convention) + * @param aAngle : included angle; the KiCad convention is equivalent to the IDF convention + * @param fromKicad : set true if we need to convert from KiCad to IDF convention + */ + IDF_SEGMENT( const IDF_POINT& aStartPoint, + const IDF_POINT& aEndPoint, + double aAngle, + bool aFromKicad ); + + /** + * Function MatchesStart + * returns true if the given coordinate is within a radius 'rad' + * of the start point. + * + * @param aPoint : coordinates of the point (mm) being compared + * @param aRadius : radius (mm) within which the points are considered the same + * + * @return bool: true if the given point matches the start point of this segment + */ + bool MatchesStart( const IDF_POINT& aPoint, double aRadius = 1e-3 ); + + /** + * Function MatchesEnd + * returns true if the given coordinate is within a radius 'rad' + * of the end point. + * + * @param aPoint : coordinates (mm) of the point being compared + * @param aRadius : radius (mm) within which the points are considered the same + * + * @return bool: true if the given point matches the end point of this segment + */ + bool MatchesEnd( const IDF_POINT& aPoint, double aRadius = 1e-3 ); + + /** + * Function IsCircle + * returns true if this segment is a circle + */ + bool IsCircle( void ); + + /** + * Function GetMinX() + * returns the minimum X coordinate of this segment + */ + double GetMinX( void ); + + /** + * Function SwapEnds() + * Swaps the start and end points and alters internal + * variables as necessary for arcs + */ + void SwapEnds( void ); +}; + + +/** + * @Class IDF_OUTLINE + * contains segment and winding information for an IDF outline + */ +class IDF_OUTLINE +{ +private: + double dir; // accumulator to help determine winding direction + std::list outline; // sequential segments comprising an outline + +public: + IDF_OUTLINE() { dir = 0.0; } + ~IDF_OUTLINE() { Clear(); } + + /** + * Function IsCCW + * returns true if the current list of points represents a counterclockwise winding + */ + bool IsCCW( void ); + + /** + * Function IsCircle + * returns true if this outline is a circle + */ + bool IsCircle( void ); + + /** + * Function Clear + * clears the internal list of outline segments + */ + void Clear( void ) + { + dir = 0.0; + + while( !outline.empty() ) + { + delete outline.front(); + outline.pop_front(); + } + } + + /** + * Function size + * returns the size of the internal segment list + */ + size_t size( void ) + { + return outline.size(); + } + + /** + * Function empty + * returns true if the internal segment list is empty + */ + bool empty( void ) + { + return outline.empty(); + } + + /** + * Function front + * returns the front() iterator of the internal segment list + */ + IDF_SEGMENT*& front( void ) + { + return outline.front(); + } + + /** + * Function back + * returns the back() iterator of the internal segment list + */ + IDF_SEGMENT*& back( void ) + { + return outline.back(); + } + + /** + * Function begin + * returns the begin() iterator of the internal segment list + */ + std::list::iterator begin( void ) + { + return outline.begin(); + } + + /** + * Function end + * returns the end() iterator of the internal segment list + */ + std::list::iterator end( void ) + { + return outline.end(); + } + + /** + * Function push + * adds a segment to the internal segment list; segments must be added + * in order so that startPoint[N] == endPoint[N - 1] + * + * @param item is a pointer to the segment to add to the outline + * + * @return bool: true if the segment was added, otherwise false + * (outline restrictions have been violated) + */ + bool push( IDF_SEGMENT* item ); +}; + +#endif // IDF_COMMON_H diff --git a/utils/idftools/idf_cylinder.cpp b/utils/idftools/idf_cylinder.cpp index f64a9b3d5c..3c164f7ead 100644 --- a/utils/idftools/idf_cylinder.cpp +++ b/utils/idftools/idf_cylinder.cpp @@ -149,7 +149,9 @@ int main( int argc, char **argv ) tstr.clear(); tstr.str( line ); - if( (tstr >> dia) && dia > 0.0 ) + + tstr >> dia; + if( !tstr.fail() && dia > 0.0 ) ok = true; } @@ -163,7 +165,9 @@ int main( int argc, char **argv ) tstr.clear(); tstr.str( line ); - if( (tstr >> length) && length > 0.0 ) + + tstr >> length; + if( !tstr.fail() && length > 0.0 ) ok = true; } @@ -177,7 +181,9 @@ int main( int argc, char **argv ) tstr.clear(); tstr.str( line ); - if( (tstr >> extraZ) && extraZ >= 0.0 ) + + tstr >> extraZ; + if( !tstr.fail() && extraZ >= 0.0 ) ok = true; } @@ -191,7 +197,9 @@ int main( int argc, char **argv ) tstr.clear(); tstr.str( line ); - if( (tstr >> wireDia) && wireDia > 0.0 ) + + tstr >> wireDia; + if( !tstr.fail() && wireDia > 0.0 ) { if( wireDia < dia ) ok = true; @@ -236,7 +244,9 @@ void make_vcyl( bool inch, bool axial, double dia, double length, tstr.clear(); tstr.str( line ); - if( (tstr >> pitch) && pitch > 0.0 ) + + tstr >> pitch; + if( !tstr.fail() && pitch > 0.0 ) { if( (pitch - wireDia) <= (dia / 2.0) ) { @@ -436,7 +446,9 @@ void make_hcyl( bool inch, bool axial, double dia, double length, tstr.clear(); tstr.str( line ); - if( (tstr >> pitch) && pitch > 0.0 ) + + tstr >> pitch; + if( !tstr.fail() && pitch > 0.0 ) { if( axial ) { @@ -477,7 +489,9 @@ void make_hcyl( bool inch, bool axial, double dia, double length, tstr.clear(); tstr.str( line ); - if( (tstr >> lead) && lead > 0.0 ) + + tstr >> lead; + if( !tstr.fail() && lead > 0.0 ) { if( lead < wireDia ) cout << "* WARNING: lead length must be >= wireDia\n"; diff --git a/utils/idftools/idf_examples/Arduino_MEGA_2560-Rev3.emn b/utils/idftools/idf_examples/Arduino_MEGA_2560-Rev3.emn new file mode 100644 index 0000000000..4c21583dca --- /dev/null +++ b/utils/idftools/idf_examples/Arduino_MEGA_2560-Rev3.emn @@ -0,0 +1,149 @@ +.HEADER +BOARD_FILE 3.0 "Created by KiCad (2014-01-21 BZR 4629)-product" 2014/01/23.09:19:46 1 +"Arduino_MEGA_2560-Rev3.kicad_pcb" MM +.END_HEADER + +.BOARD_OUTLINE ECAD +1.60000 +0 246.20220 -25.67000 0 +0 247.20220 -26.67000 0 +0 344.26220 -26.67000 0 +0 345.26220 -25.67000 0 +0 345.26220 -25.40000 0 +0 347.80220 -22.86000 0 +0 347.80220 11.43000 0 +0 345.26220 13.97000 0 +0 345.26220 24.13000 0 +0 342.72220 26.67000 0 +0 247.20220 26.67000 0 +0 246.20220 25.67000 0 +0 246.20220 -25.67000 0 +.END_BOARD_OUTLINE + +.DRILLED_HOLES +3.200 342.72220 -24.13000 NPTH "@HOLE0" MTG ECAD +3.200 261.44220 24.13000 NPTH "@HOLE1" MTG ECAD +3.200 336.37220 24.13000 NPTH "@HOLE2" MTG ECAD +3.200 260.17220 -24.13000 NPTH "@HOLE3" MTG ECAD +3.200 312.24220 8.89000 NPTH "@HOLE4" MTG ECAD +3.200 312.24220 -19.05000 NPTH "@HOLE5" MTG ECAD +0.950 309.82920 3.81000 PTH "ICSP" PIN ECAD +0.950 312.36920 3.81000 PTH "ICSP" PIN ECAD +0.950 309.82920 1.27000 PTH "ICSP" PIN ECAD +0.950 312.36920 1.27000 PTH "ICSP" PIN ECAD +0.950 309.82920 -1.27000 PTH "ICSP" PIN ECAD +0.950 312.36920 -1.27000 PTH "ICSP" PIN ECAD +0.850 309.70220 24.13000 PTH "PWML" PIN ECAD +0.850 307.16220 24.13000 PTH "PWML" PIN ECAD +0.850 304.62220 24.13000 PTH "PWML" PIN ECAD +0.850 302.08220 24.13000 PTH "PWML" PIN ECAD +0.850 299.54220 24.13000 PTH "PWML" PIN ECAD +0.850 297.00220 24.13000 PTH "PWML" PIN ECAD +0.850 294.46220 24.13000 PTH "PWML" PIN ECAD +0.850 291.92220 24.13000 PTH "PWML" PIN ECAD +1.400 254.88900 -23.36800 PTH "X1" PIN ECAD +1.400 257.88620 -18.36420 PTH "X1" PIN ECAD +1.400 251.89180 -18.36420 PTH "X1" PIN ECAD +1.400 255.65100 -23.36800 PTH "X1" PIN ECAD +1.400 254.12700 -23.36800 PTH "X1" PIN ECAD +1.400 251.89180 -19.12620 PTH "X1" PIN ECAD +1.400 251.89180 -17.60220 PTH "X1" PIN ECAD +1.400 257.88620 -19.12620 PTH "X1" PIN ECAD +1.400 257.88620 -17.60220 PTH "X1" PIN ECAD +0.850 297.00220 -24.13000 PTH "ADCL" PIN ECAD +0.850 299.54220 -24.13000 PTH "ADCL" PIN ECAD +0.850 302.08220 -24.13000 PTH "ADCL" PIN ECAD +0.850 304.62220 -24.13000 PTH "ADCL" PIN ECAD +0.850 307.16220 -24.13000 PTH "ADCL" PIN ECAD +0.850 309.70220 -24.13000 PTH "ADCL" PIN ECAD +0.850 312.24220 -24.13000 PTH "ADCL" PIN ECAD +0.850 314.78220 -24.13000 PTH "ADCL" PIN ECAD +0.850 332.56220 24.13000 PTH "COMMUNICATION" PIN ECAD +0.850 330.02220 24.13000 PTH "COMMUNICATION" PIN ECAD +0.850 327.48220 24.13000 PTH "COMMUNICATION" PIN ECAD +0.850 324.94220 24.13000 PTH "COMMUNICATION" PIN ECAD +0.850 322.40220 24.13000 PTH "COMMUNICATION" PIN ECAD +0.850 319.86220 24.13000 PTH "COMMUNICATION" PIN ECAD +0.850 317.32220 24.13000 PTH "COMMUNICATION" PIN ECAD +0.850 314.78220 24.13000 PTH "COMMUNICATION" PIN ECAD +0.850 319.86220 -24.13000 PTH "ADCH" PIN ECAD +0.850 322.40220 -24.13000 PTH "ADCH" PIN ECAD +0.850 324.94220 -24.13000 PTH "ADCH" PIN ECAD +0.850 327.48220 -24.13000 PTH "ADCH" PIN ECAD +0.850 330.02220 -24.13000 PTH "ADCH" PIN ECAD +0.850 332.56220 -24.13000 PTH "ADCH" PIN ECAD +0.850 335.10220 -24.13000 PTH "ADCH" PIN ECAD +0.850 337.64220 -24.13000 PTH "ADCH" PIN ECAD +0.950 254.72220 10.18000 PTH "X2" PIN ECAD +0.950 254.72220 12.68000 PTH "X2" PIN ECAD +0.950 252.72220 12.68000 PTH "X2" PIN ECAD +0.950 252.72220 10.18000 PTH "X2" PIN ECAD +2.200 250.01220 17.43000 PTH "X2" PIN ECAD +2.200 250.01220 5.43000 PTH "X2" PIN ECAD +0.950 267.03020 20.82800 PTH "ICSP1" PIN ECAD +0.950 267.03020 18.28800 PTH "ICSP1" PIN ECAD +0.950 264.49020 20.82800 PTH "ICSP1" PIN ECAD +0.950 264.49020 18.28800 PTH "ICSP1" PIN ECAD +0.950 261.95020 20.82800 PTH "ICSP1" PIN ECAD +0.950 261.95020 18.28800 PTH "ICSP1" PIN ECAD +0.850 267.15720 -0.63500 PTH "Y2" PIN ECAD +0.850 262.07720 -0.63500 PTH "Y2" PIN ECAD +0.950 267.03020 13.20800 PTH "JP5" PIN ECAD +0.950 264.49020 13.20800 PTH "JP5" PIN ECAD +0.950 267.03020 15.74800 PTH "JP5" PIN ECAD +0.950 264.49020 15.74800 PTH "JP5" PIN ECAD +0.950 340.18220 24.13000 PTH "XIO" PIN ECAD +0.950 342.72220 24.13000 PTH "XIO" PIN ECAD +0.950 340.18220 21.59000 PTH "XIO" PIN ECAD +0.950 342.72220 21.59000 PTH "XIO" PIN ECAD +0.950 340.18220 19.05000 PTH "XIO" PIN ECAD +0.950 342.72220 19.05000 PTH "XIO" PIN ECAD +0.950 340.18220 16.51000 PTH "XIO" PIN ECAD +0.950 342.72220 16.51000 PTH "XIO" PIN ECAD +0.950 340.18220 13.97000 PTH "XIO" PIN ECAD +0.950 342.72220 13.97000 PTH "XIO" PIN ECAD +0.950 340.18220 11.43000 PTH "XIO" PIN ECAD +0.950 342.72220 11.43000 PTH "XIO" PIN ECAD +0.950 340.18220 8.89000 PTH "XIO" PIN ECAD +0.950 342.72220 8.89000 PTH "XIO" PIN ECAD +0.950 340.18220 6.35000 PTH "XIO" PIN ECAD +0.950 342.72220 6.35000 PTH "XIO" PIN ECAD +0.950 340.18220 3.81000 PTH "XIO" PIN ECAD +0.950 342.72220 3.81000 PTH "XIO" PIN ECAD +0.950 340.18220 1.27000 PTH "XIO" PIN ECAD +0.950 342.72220 1.27000 PTH "XIO" PIN ECAD +0.950 340.18220 -1.27000 PTH "XIO" PIN ECAD +0.950 342.72220 -1.27000 PTH "XIO" PIN ECAD +0.950 340.18220 -3.81000 PTH "XIO" PIN ECAD +0.950 342.72220 -3.81000 PTH "XIO" PIN ECAD +0.950 340.18220 -6.35000 PTH "XIO" PIN ECAD +0.950 342.72220 -6.35000 PTH "XIO" PIN ECAD +0.950 340.18220 -8.89000 PTH "XIO" PIN ECAD +0.950 342.72220 -8.89000 PTH "XIO" PIN ECAD +0.950 340.18220 -11.43000 PTH "XIO" PIN ECAD +0.950 342.72220 -11.43000 PTH "XIO" PIN ECAD +0.950 340.18220 -13.97000 PTH "XIO" PIN ECAD +0.950 342.72220 -13.97000 PTH "XIO" PIN ECAD +0.950 340.18220 -16.51000 PTH "XIO" PIN ECAD +0.950 342.72220 -16.51000 PTH "XIO" PIN ECAD +0.950 340.18220 -19.05000 PTH "XIO" PIN ECAD +0.950 342.72220 -19.05000 PTH "XIO" PIN ECAD +0.850 264.99820 24.13000 PTH "JP6" PIN ECAD +0.850 267.53820 24.13000 PTH "JP6" PIN ECAD +0.850 270.07820 24.13000 PTH "JP6" PIN ECAD +0.850 272.61820 24.13000 PTH "JP6" PIN ECAD +0.850 275.15820 24.13000 PTH "JP6" PIN ECAD +0.850 277.69820 24.13000 PTH "JP6" PIN ECAD +0.850 280.23820 24.13000 PTH "JP6" PIN ECAD +0.850 282.77820 24.13000 PTH "JP6" PIN ECAD +0.850 285.31820 24.13000 PTH "JP6" PIN ECAD +0.850 287.85820 24.13000 PTH "JP6" PIN ECAD +0.850 274.14220 -24.13000 PTH "POWER" PIN ECAD +0.850 276.68220 -24.13000 PTH "POWER" PIN ECAD +0.850 279.22220 -24.13000 PTH "POWER" PIN ECAD +0.850 281.76220 -24.13000 PTH "POWER" PIN ECAD +0.850 284.30220 -24.13000 PTH "POWER" PIN ECAD +0.850 286.84220 -24.13000 PTH "POWER" PIN ECAD +0.850 289.38220 -24.13000 PTH "POWER" PIN ECAD +0.850 291.92220 -24.13000 PTH "POWER" PIN ECAD +.END_DRILLED_HOLES diff --git a/utils/idftools/idf_examples/Arduino_MEGA_2560-Rev3.emp b/utils/idftools/idf_examples/Arduino_MEGA_2560-Rev3.emp new file mode 100644 index 0000000000..693ae28c6f --- /dev/null +++ b/utils/idftools/idf_examples/Arduino_MEGA_2560-Rev3.emp @@ -0,0 +1,4 @@ +.HEADER +LIBRARY_FILE 3.0 "Created by KiCad (2014-01-21 BZR 4629)-product" 2014/01/23.09:19:46 1 +.END_HEADER + diff --git a/utils/idftools/idf_examples/idf_example.emn b/utils/idftools/idf_examples/idf_example.emn new file mode 100644 index 0000000000..417e5dd5af --- /dev/null +++ b/utils/idftools/idf_examples/idf_example.emn @@ -0,0 +1,269 @@ +.HEADER +BOARD_FILE 3.0 "Sample File Generator" 10/22/96.16:02:44 1 +sample_board THOU +.END_HEADER + +# This is the first BOARD section +# SEC1-0 +# SEC1-1 +.BOARD_OUTLINE MCAD +62.0 +0 5030.5 -120.0 0.0 +0 5187.5 -120.0 0.0 +0 5187.5 2130.0 0.0 +0 5155.0 2130.0 0.0 +0 5155.0 2550.0 -180.0 +0 5187.5 2550.0 0.0 +0 5187.5 4935.0 0.0 +0 4945.0 5145.0 0.0 +0 4945.0 5420.0 0.0 +0 4865.0 5500.0 0.0 +0 210.0 5500.0 0.0 +0 130.0 5420.0 0.0 +0 130.0 5145.0 0.0 +0 -112.5 4935.0 0.0 +0 -112.5 2550.0 0.0 +0 -80.0 2550.0 0.0 +0 -80.0 2130.0 -180.0 +0 -112.5 2130.0 0.0 +0 -112.5 -140.0 0.0 +0 45.5 -140.0 0.0 +0 45.5 -400.0 0.0 +0 2442.5 -400.0 0.0 +0 2442.5 -140.0 0.0 +0 2631.5 -140.0 0.0 +0 2631.5 -400.0 0.0 +0 5030.5 -400.0 0.0 +0 5030.5 -120.0 0.0 +1 2650.0 2350.0 0.0 +1 3000.0 2350.0 360.0 +.END_BOARD_OUTLINE + + +# This is the second BOARD section +# SEC2-0 +# SEC2-1 +# NOT SEC1-1 +.ROUTE_OUTLINE ECAD +ALL +0 5112.5 150.0 0.0 +0 5112.5 2058.2 0.0 +0 5112.5 2621.8 -162.9 +0 5112.5 4863.2 0.0 +0 4878.8 5075.0 0.0 +0 226.4 5075.0 0.0 +0 138.0 4910.3 0.0 +0 138.0 4800.0 0.0 +0 -37.5 4662.5 0.0 +0 -37.5 2621.8 0.0 +0 -37.5 2058.2 -162.9 +0 -37.5 150.0 0.0 +0 162.5 0.0 0.0 +0 4912.5 0.0 0.0 +0 5112.5 150.0 0.0 +.END_ROUTE_OUTLINE + + +# This is the third BOARD section +# SEC3-0 +# SEC3-1 +.PLACE_OUTLINE MCAD +TOP 1000.0 +0 5080.0 2034.9 0.0 +0 5080.0 2645.1 -152.9 +0 5080.0 4837.3 0.0 +0 4855.3 5042.5 0.0 +0 252.9 5042.5 0.0 +0 170.5 4896.9 0.0 +0 170.5 4798.4 0.0 +0 -5.0 4659.0 0.0 +0 -5.0 2645.1 0.0 +0 -5.0 2034.9 -152.9 +0 -5.0 182.5 0.0 +0 192.0 32.5 0.0 +0 4883.1 32.5 0.0 +0 5080.0 182.5 0.0 +0 5080.0 2034.9 0.0 +.END_PLACE_OUTLINE + +# This is the fourth BOARD section +# SEC4-0 +# SEC4-1 +.PLACE_OUTLINE UNOWNED +BOTTOM 200.0 +0 300.0 200.0 0.0 +0 4800.0 200.0 0.0 +0 4800.0 4800.0 0.0 +0 300.0 4800.0 0.0 +0 300.0 200.0 0.0 +.END_PLACE_OUTLINE + + +# This is the fifth BOARD section +# SEC5-0 +# SEC5-1 +.ROUTE_KEEPOUT ECAD +ALL +0 2650.0 2350.0 0.0 +0 3100.0 2350.0 360.0 +.END_ROUTE_KEEPOUT + +# This is the sixth BOARD section +# SEC6-0 +# SEC6-1 +.PLACE_KEEPOUT MCAD +BOTH 0.0 +0 2650.0 2350.0 0.0 +0 3100.0 2350.0 360.0 +.END_PLACE_KEEPOUT + +# This is the seventh BOARD section +# SEC7-0 +# SEC7-1 +.PLACE_KEEPOUT MCAD +TOP 300.0 +0 3700.0 5000.0 0.0 +0 3700.0 4300.0 0.0 +0 4000.0 4300.0 0.0 +0 4000.0 3700.0 0.0 +0 5000.0 3700.0 0.0 +0 5000.0 4800.0 0.0 +0 4800.0 5000.0 0.0 +0 3700.0 5000.0 0.0 +.END_PLACE_KEEPOUT + + +# This is the eighth BOARD section +# SEC8-0 +# SEC8-1 +.DRILLED_HOLES +30.0 1800.0 100.0 PTH J1 PIN ECAD +30.0 1700.0 100.0 PTH J1 PIN ECAD +30.0 1600.0 100.0 PTH J1 PIN ECAD +30.0 1500.0 100.0 PTH J1 PIN ECAD +30.0 1400.0 100.0 PTH J1 PIN ECAD +30.0 1300.0 100.0 PTH J1 PIN ECAD +30.0 1200.0 100.0 PTH J1 PIN ECAD +30.0 1100.0 100.0 PTH J1 PIN ECAD +30.0 1000.0 100.0 PTH J1 PIN ECAD +30.0 0900.0 100.0 PTH J1 PIN ECAD +30.0 0800.0 100.0 PTH J1 PIN ECAD +30.0 0700.0 100.0 PTH J1 PIN ECAD +30.0 0700.0 200.0 PTH J1 PIN ECAD +30.0 0800.0 200.0 PTH J1 PIN ECAD +30.0 0900.0 200.0 PTH J1 PIN ECAD +30.0 1000.0 200.0 PTH J1 PIN ECAD +30.0 1100.0 200.0 PTH J1 PIN ECAD +30.0 1200.0 200.0 PTH J1 PIN ECAD +30.0 1300.0 200.0 PTH J1 PIN ECAD +30.0 1400.0 200.0 PTH J1 PIN ECAD +30.0 1500.0 200.0 PTH J1 PIN ECAD +30 1600 200 PTH J1 PIN ECAD +30 1700 200 PTH J1 PIN ECAD +30 1800 200 PTH J1 PIN ECAD +30 4400 100 PTH J2 PIN ECAD +30 4300 100 PTH J2 PIN ECAD +30 4200 100 PTH J2 PIN ECAD +30 4100 100 PTH J2 PIN ECAD +30 4000 100 PTH J2 PIN ECAD +30 3900 100 PTH J2 PIN ECAD +30 3800 100 PTH J2 PIN ECAD +30 3700 100 PTH J2 PIN ECAD +30 3600 100 PTH J2 PIN ECAD +30 3500 100 PTH J2 PIN ECAD +30 3400 100 PTH J2 PIN ECAD +30 3300 100 PTH J2 PIN ECAD +30 3300 200 PTH J2 PIN ECAD +30 3400 200 PTH J2 PIN ECAD +30 3500 200 PTH J2 PIN ECAD +30 3600 200 PTH J2 PIN ECAD +30 3700 200 PTH J2 PIN ECAD +30 3800 200 PTH J2 PIN ECAD +30 3900 200 PTH J2 PIN ECAD +30 4000 200 PTH J2 PIN ECAD +30 4100 200 PTH J2 PIN ECAD +30 4200 200 PTH J2 PIN ECAD +30 4300 200 PTH J2 PIN ECAD +30 4400 200 PTH J2 PIN ECAD +30 3000 3300 PTH U3 PIN ECAD +30 3024.2 3203 PTH U3 PIN ECAD +30 3048.4 3105.9 PTH U3 PIN ECAD +30 3072.6 3008.9 PTH U3 PIN ECAD +30 3096.8 2911.9 PTH U3 PIN ECAD +30 3121 2814.9 PTH U3 PIN ECAD +30 3145.2 2717.8 PTH U3 PIN ECAD +30 3436.2 2790.4 PTH U3 PIN ECAD +30 3412.1 2887.4 PTH U3 PIN ECAD +30 3387.9 2984.5 PTH U3 PIN ECAD +30 3363.7 3081.5 PTH U3 PIN ECAD +30 3339.5 3178.5 PTH U3 PIN ECAD +30 3315.3 3275.6 PTH U3 PIN ECAD +30 3291.1 3372.6 PTH U3 PIN ECAD +30 2200 2500 PTH U4 PIN ECAD +30 2100 2500 PTH U4 PIN ECAD +30 2000 2500 PTH U4 PIN ECAD +30 1900 2500 PTH U4 PIN ECAD +30 1800 2500 PTH U4 PIN ECAD +30 1700 2500 PTH U4 PIN ECAD +30 1600 2500 PTH U4 PIN ECAD +30 1600 2200 PTH U4 PIN ECAD +30 1700 2200 PTH U4 PIN ECAD +30 1800 2200 PTH U4 PIN ECAD +30 1900 2200 PTH U4 PIN ECAD +30 2000 2200 PTH U4 PIN ECAD +30 2100 2200 PTH U4 PIN ECAD +30 2200 2200 PTH U4 PIN ECAD +20 2500 3100 PTH BOARD VIA ECAD +20 2500 3200 PTH BOARD VIA ECAD +20 2500 3300 PTH BOARD VIA ECAD +20 2000 1600 PTH BOARD VIA ECAD +20 1100 900 PTH BOARD VIA ECAD +20 1200 1600 PTH BOARD VIA ECAD +20 3900 3800 PTH BOARD VIA ECAD +20 3900 2300 PTH BOARD VIA ECAD +100.0 3100.0 -50.0 NPTH J2 MTG ECAD +100.0 4600.0 -50.0 NPTH J2 MTG ECAD +100.0 500.0 -50.0 NPTH J1 MTG ECAD +100.0 2000.0 -50.0 NPTH J1 MTG ECAD +93.0 5075.0 0.0 PTH BOARD MTG UNOWNED +93.0 0.0 4800.0 NPTH BOARD TOOL MCAD +93.0 0.0 0.0 PTH BOARD MTG UNOWNED +.END_DRILLED_HOLES + + +# This is the ninth BOARD section +# SEC9-0 +# SEC9-1 +.NOTES +3500.0 3300.0 75.0 2500.0 "This component rotated 14 degrees" +400.0 4400.0 75.0 3200.0 "Component height limited by enclosure latch" +1800.0 300.0 75.0 1700.0 "Do not move connectors!" +.END_NOTES + +# This is the tenth and ALWAYS FINAL BOARD section +# SEC10-0 +# SEC10-1 +.PLACEMENT +cs13_a pn-cap C1 +4000.0 1000.0 100.0 0.0 TOP PLACED +cc1210 pn-cc1210 C2 +3000.0 3500.0 0.0 0.0 TOP PLACED +cc1210 pn-cc1210 C3 +3200.0 1800.0 0.0 0.0 BOTTOM PLACED +cc1210 pn-cc1210 C4 +1400.0 2300.0 0.0 270.0 TOP PLACED +cc1210 pn-cc1210 C5 +1799.5 3518.1 0.0 0.0 BOTTOM PLACED +conn_din24 connector J1 +1800.0 100.0 0.0 0.0 TOP MCAD +conn_din24 connector J2 +4400.0 100.0 0.0 0.0 TOP MCAD +plcc_20 pn-pal16l8-plcc U1 +1800.0 3200.0 0.0 0.0 BOTTOM ECAD +plcc_20 pn-pal16l8-plcc U2 +3200.0 1800.0 0.0 0.0 TOP PLACED +dip_14w pn-hs346-dip U3 +3000.0 3300.0 0.0 14.0 TOP PLACED +dip_14w pn-hs346-dip U4 +2200.0 2500.0 0.0 270.0 TOP PLACED +.END_PLACEMENT diff --git a/utils/idftools/idf_examples/idf_example.emp b/utils/idftools/idf_examples/idf_example.emp new file mode 100644 index 0000000000..b25b00056e --- /dev/null +++ b/utils/idftools/idf_examples/idf_example.emp @@ -0,0 +1,69 @@ +.HEADER +LIBRARY_file 3.0 "Sample File Generator" 10/22/96.16:41:37 1 +.END_HEADER + +# Component #1/5 +.ELECTRICAL +cs13_a pn-cap THOU 150.0 +0 -55.0 55.0 0.0 +0 -55.0 -55.0 0.0 +0 135.0 -55.0 0.0 +0 135.0 -80.0 0.0 +0 565.0 -80.0 0.0 +0 565.0 -55.0 0.0 +0 755.0 -55.0 0.0 +0 755.0 55.0 0.0 +0 565.0 55.0 0.0 +0 565.0 80.0 0.0 +0 135.0 80.0 0.0 +0 135.0 55.0 0.0 +0 -55.0 55.0 0.0 +PROP CAPACITANCE 100.0 +PROP TOLERANCE 5.0 +.END_ELECTRICAL + + +# Component #2/5 +.ELECTRICAL +cc1210 pn-cc1210 THOU 67.0 +0 -40.0 56.0 0.0 +0 -40.0 -56.0 0.0 +0 182.0 -56.0 0.0 +0 182.0 56.0 0.0 +0 -40.0 56.0 0.0 +PROP CAPACITANCE 0.1 +PROP TOLERANCE 5.0 +.END_ELECTRICAL + +# Component #3/5 +.ELECTRICAL +conn_din24 connector THOU 435.0 +0 -1400.0 -500.0 0.0 +0 300.0 -500.0 0.0 +0 300.0 150.0 0.0 +0 -1400.0 150.0 0.0 +0 -1400.0 -500.0 0.0 +.END_ELECTRICAL + + +# Component #4/5 +.ELECTRICAL +dip_14w pn-hs346-dip THOU 200.0 +0 350.0 50.0 0.0 +0 -50.0 50.0 0.0 +0 -50.0 -650.0 0.0 +0 350.0 -650.0 0.0 +0 350.0 50.0 0.0 +.END_ELECTRICAL + + +# Component #5/5 +.ELECTRICAL +plcc_20 pn-pal16l8-plcc THOU 14.0 +0 -200.0 240.0 0.0 +0 -240.0 200.0 0.0 +0 -240.0 -240.0 0.0 +0 240.0 -240.0 0.0 +0 240.0 240.0 0.0 +0 -200.0 240.0 0.0 +.END_ELECTRICAL diff --git a/utils/idftools/idf_examples/test_idf2.emn b/utils/idftools/idf_examples/test_idf2.emn new file mode 100644 index 0000000000..b317a007fe --- /dev/null +++ b/utils/idftools/idf_examples/test_idf2.emn @@ -0,0 +1,71 @@ +.HEADER +BOARD_FILE 3.0 "Created by KiCad (2014-01-25 BZR 4633)-product" 2014/02/01.15:09:15 1 +"test_idf2.kicad_pcb" MM +.END_HEADER + +.BOARD_OUTLINE ECAD +1.60000 +0 -86.00000 42.00000 0 +0 -86.00000 -42.00000 0 +0 86.00000 -42.00000 0 +0 86.00000 42.00000 0 +0 -86.00000 42.00000 0 +.END_BOARD_OUTLINE + +.DRILLED_HOLES +0.800 -74.00000 16.00000 PTH BOARD PIN ECAD +0.800 -74.00000 -28.00000 PTH BOARD PIN ECAD +0.850 -55.75000 16.00000 PTH BOARD PIN ECAD +0.850 -52.25000 16.00000 PTH BOARD PIN ECAD +0.850 -35.75000 16.00000 PTH BOARD PIN ECAD +0.850 -32.25000 16.00000 PTH BOARD PIN ECAD +1.575 -57.17500 -28.00000 PTH BOARD PIN ECAD +1.575 -50.82500 -28.00000 PTH BOARD PIN ECAD +1.575 -37.17500 -28.00000 PTH BOARD PIN ECAD +1.575 -30.82500 -28.00000 PTH BOARD PIN ECAD +0.800 -14.00000 16.00000 PTH BOARD PIN ECAD +0.800 -14.00000 -28.00000 PTH BOARD PIN ECAD +0.800 6.00000 16.00000 PTH BOARD PIN ECAD +0.800 6.00000 -28.00000 PTH BOARD PIN ECAD +0.800 26.00000 16.00000 PTH BOARD PIN ECAD +0.800 26.00000 -28.00000 PTH BOARD PIN ECAD +0.800 46.00000 16.00000 PTH BOARD PIN ECAD +0.800 46.00000 -28.00000 PTH BOARD PIN ECAD +0.800 66.00000 16.00000 PTH BOARD PIN ECAD +0.800 66.00000 -28.00000 PTH BOARD PIN ECAD +.END_DRILLED_HOLES + +.PLACEMENT +"CYLV_MM" "D5.000_H8.000_Z3.000" "NOREFDES_0" +-74.000000 16.000000 0.000000 0.000 TOP ECAD +"CYLV_IN" "D0.250_H0.250_Z0.127" "NOREFDES_1" +-74.000000 -28.000000 0.000000 0.000 TOP ECAD +"CYLV_MM_L" "D5.000_H8.000_Z3.000_WD0.800_P3.500" "NOREFDES_2" +-54.000000 16.000000 0.000000 0.000 TOP ECAD +"CYLV_MM_R" "D5.000_H8.000_Z3.000_WD0.800_P3.500" "NOREFDES_3" +-34.000000 16.000000 0.000000 0.000 TOP ECAD +"CYLV_IN_L" "D0.250_H0.250_Z0.127_WD0.062_P0.250" "NOREFDES_4" +-54.000000 -28.000000 0.000000 0.000 TOP ECAD +"CYLV_IN_R" "D0.250_H0.250_Z0.127_WD0.062_P0.250" "NOREFDES_5" +-34.000000 -28.000000 0.000000 0.000 TOP ECAD +"CYLH_MM_AXI" "D2.500_H4.000_Z0.500_WD0.600_P8.000" "NOREFDES_6" +-14.000000 16.000000 0.000000 0.000 TOP ECAD +"CYLH_IN_AXI" "D0.098_H0.157_Z0.020_WD0.024_P0.315" "NOREFDES_7" +-14.000000 -28.000000 0.000000 0.000 TOP ECAD +"CYLH_MM_RAD" "D5.000_H6.000_Z0.200_WD0.600_P2.500_L3.000" "NOREFDES_8" +6.000000 16.000000 0.000000 0.000 TOP ECAD +"CYLH_IN_RAD" "D0.197_H0.236_Z0.008_WD0.024_P0.098_L0.118" "NOREFDES_9" +6.000000 -28.000000 0.000000 0.000 TOP ECAD +"RECTMM" "W10.000_L10.000_H6.000_C0.000" "NOREFDES_10" +26.000000 16.000000 0.000000 0.000 TOP ECAD +"RECTIN" "W393_L393_H236_C0" "NOREFDES_11" +26.000000 -28.000000 0.000000 0.000 TOP ECAD +"RECTMM" "W10.000_L10.000_H2.000_C0.500" "NOREFDES_12" +46.000000 16.000000 0.000000 0.000 TOP ECAD +"RECTIN" "W393_L393_H78_C19" "NOREFDES_13" +46.000000 -28.000000 0.000000 0.000 TOP ECAD +"RECTLMM" "W10.000_L10.000_H12.000_D0.800_P6.000" "NOREFDES_14" +66.000000 16.000000 0.000000 0.000 TOP ECAD +"RECTLIN" "W393_L393_H472_D31_P236" "NOREFDES_15" +66.000000 -28.000000 0.000000 0.000 TOP ECAD +.END_PLACEMENT diff --git a/utils/idftools/idf_examples/test_idf2.emp b/utils/idftools/idf_examples/test_idf2.emp new file mode 100644 index 0000000000..9777025663 --- /dev/null +++ b/utils/idftools/idf_examples/test_idf2.emp @@ -0,0 +1,290 @@ +.HEADER +LIBRARY_FILE 3.0 "Created by KiCad (2014-01-25 BZR 4633)-product" 2014/02/01.15:09:15 1 +.END_HEADER + +# cylindrical outline, vertical, no pins +# file: "cylvmm_0_D5_L8_Z3.idf" +# dia: 5.000 mm +# length: 8.000 mm +# extra height: 3.000 mm +.ELECTRICAL +"CYLV_MM" "D5.000_H8.000_Z3.000" MM 11.000 +0 0 0 0 +0 5.000 0 360 +.END_ELECTRICAL + +# cylindrical outline, vertical, no pins +# file: "cylvin_0_D0.25_L0.25_Z0.127.idf" +# dia: 250 THOU +# length: 250 THOU +# extra height: 127 THOU +.ELECTRICAL +"CYLV_IN" "D0.250_H0.250_Z0.127" THOU 377 +0 0 0 0 +0 250 0 360 +.END_ELECTRICAL + +# cylindrical outline, vertical, 1 pin on left +# file: "cylvmm_1L_D5_L8_Z3_WD0.8_P3.5.idf" +# dia: 5.000 mm +# length: 8.000 mm +# extra height: 3.000 mm +# wire dia: 0.800 mm +# pitch: 3.500 mm +.ELECTRICAL +"CYLV_MM_L" "D5.000_H8.000_Z3.000_WD0.800_P3.500" MM 11.000 +1 -0.718 0.400 0 +1 -0.718 -0.400 -341.586 +1 -1.750 -0.400 0 +1 -1.750 0.400 -180 +1 -0.718 0.400 0 +.END_ELECTRICAL + +# cylindrical outline, vertical, 1 pin on right +# file: "cylvmm_1R_D5_L8_Z3_WD0.8_P3.5.idf" +# dia: 5.000 mm +# length: 8.000 mm +# extra height: 3.000 mm +# wire dia: 0.800 mm +# pitch: 3.500 mm +.ELECTRICAL +"CYLV_MM_R" "D5.000_H8.000_Z3.000_WD0.800_P3.500" MM 11.000 +0 0.718 0.400 0 +0 0.718 -0.400 341.586 +0 1.750 -0.400 0 +0 1.750 0.400 180 +0 0.718 0.400 0 +.END_ELECTRICAL + +# cylindrical outline, vertical, 1 pin on left +# file: "cylvin_1L_D0.25_L0.25_Z0.127_WD0.062_P0.25.idf" +# dia: 250 THOU +# length: 250 THOU +# extra height: 127 THOU +# wire dia: 62 THOU +# pitch: 250 THOU +.ELECTRICAL +"CYLV_IN_L" "D0.250_H0.250_Z0.127_WD0.062_P0.250" THOU 377 +1 3 31 0 +1 3 -31 -331.282 +1 -125 -31 0 +1 -125 31 -180 +1 3 31 0 +.END_ELECTRICAL + +# cylindrical outline, vertical, 1 pin on right +# file: "cylvin_1R_D0.25_L0.25_Z0.127_WD0.062_P0.25.idf" +# dia: 250 THOU +# length: 250 THOU +# extra height: 127 THOU +# wire dia: 62 THOU +# pitch: 250 THOU +.ELECTRICAL +"CYLV_IN_R" "D0.250_H0.250_Z0.127_WD0.062_P0.250" THOU 377 +0 -3 31 0 +0 -3 -31 331.282 +0 125 -31 0 +0 125 31 180 +0 -3 31 0 +.END_ELECTRICAL + +# cylindrical outline, horiz., axial pins +# file: "resistor.idf" +# dia: 2.500 mm +# length: 4.000 mm +# extra height: 0.500 mm +# wire dia: 0.600 mm +# pitch: 8.000 mm +.ELECTRICAL +"CYLH_MM_AXI" "D2.500_H4.000_Z0.500_WD0.600_P8.000" MM 3.000 +0 -2.000 1.250 0 +0 -2.000 0.300 0 +0 -4.000 0.300 0 +0 -4.000 -0.300 180 +0 -2.000 -0.300 0 +0 -2.000 -1.250 0 +0 2.000 -1.250 0 +0 2.000 -0.300 0 +0 4.000 -0.300 0 +0 4.000 0.300 180 +0 2.000 0.300 0 +0 2.000 1.250 0 +0 -2.000 1.250 0 +.END_ELECTRICAL + +# cylindrical outline, horiz., axial pins +# file: "resistor_in.idf" +# dia: 98 THOU +# length: 157 THOU +# extra height: 20 THOU +# wire dia: 24 THOU +# pitch: 315 THOU +.ELECTRICAL +"CYLH_IN_AXI" "D0.098_H0.157_Z0.020_WD0.024_P0.315" THOU 118 +0 -78 49 0 +0 -78 12 0 +0 -157 12 0 +0 -157 -12 180 +0 -78 -12 0 +0 -78 -49 0 +0 78 -49 0 +0 78 -12 0 +0 157 -12 0 +0 157 12 180 +0 78 12 0 +0 78 49 0 +0 -78 49 0 +.END_ELECTRICAL + +# cylindrical outline, horiz., radial pins +# file: "capacitor.idf" +# dia: 5.000 mm +# length: 6.000 mm +# extra height: 0.200 mm +# wire dia: 0.600 mm +# pitch: 2.500 mm +# lead: 3.000 mm +.ELECTRICAL +"CYLH_MM_RAD" "D5.000_H6.000_Z0.200_WD0.600_P2.500_L3.000" MM 5.200 +0 -2.500 9.000 0 +0 -2.500 3.000 0 +0 -1.550 3.000 0 +0 -1.550 0 0 +0 -0.950 0 180 +0 -0.950 3.000 0 +0 0.950 3.000 0 +0 0.950 0 0 +0 1.550 0 180 +0 1.550 3.000 0 +0 2.500 3.000 0 +0 2.500 9.000 0 +0 -2.500 9.000 0 +.END_ELECTRICAL + +# cylindrical outline, horiz., radial pins +# file: "capacitor_in.idf" +# dia: 197 THOU +# length: 236 THOU +# extra height: 8 THOU +# wire dia: 24 THOU +# pitch: 98 THOU +# lead: 118 THOU +.ELECTRICAL +"CYLH_IN_RAD" "D0.197_H0.236_Z0.008_WD0.024_P0.098_L0.118" THOU 205 +0 -98 354 0 +0 -98 118 0 +0 -61 118 0 +0 -61 0 0 +0 -37 0 180 +0 -37 118 0 +0 37 118 0 +0 37 0 0 +0 61 0 180 +0 61 118 0 +0 98 118 0 +0 98 354 0 +0 -98 354 0 +.END_ELECTRICAL + +# rectangular outline +# file: "rectMM_10x10x6_C0.idf" +# width: 10.000 mm +# length: 10.000 mm +# height: 6.000 mm +# chamfer: 0.000 mm +.ELECTRICAL +"RECTMM" "W10.000_L10.000_H6.000_C0.000" MM 6.000 +0 5.000 5.000 0 +0 -5.000 5.000 0 +0 -5.000 -5.000 0 +0 5.000 -5.000 0 +0 5.000 5.000 0 +.END_ELECTRICAL + +# rectangular outline +# file: "rectIN_10x10x6mm_C0mm.idf" +# width: 393 THOU +# length: 393 THOU +# height: 236 THOU +# chamfer: 0 THOU +.ELECTRICAL +"RECTIN" "W393_L393_H236_C0" THOU 236 +0 196 196 0 +0 -196 196 0 +0 -196 -196 0 +0 196 -196 0 +0 196 196 0 +.END_ELECTRICAL + +# rectangular outline +# file: "rectMM_10x10x2_C0.5.idf" +# width: 10.000 mm +# length: 10.000 mm +# height: 2.000 mm +# chamfer: 0.500 mm +.ELECTRICAL +"RECTMM" "W10.000_L10.000_H2.000_C0.500" MM 2.000 +0 5.000 5.000 0 +0 -4.500 5.000 0 +0 -5.000 4.500 0 +0 -5.000 -5.000 0 +0 5.000 -5.000 0 +0 5.000 5.000 0 +.END_ELECTRICAL + +# rectangular outline +# file: "rectIN_10x10x2mm_C0.5mm.idf" +# width: 393 THOU +# length: 393 THOU +# height: 78 THOU +# chamfer: 19 THOU +.ELECTRICAL +"RECTIN" "W393_L393_H78_C19" THOU 78 +0 196 196 0 +0 -176 196 0 +0 -196 176 0 +0 -196 -196 0 +0 196 -196 0 +0 196 196 0 +.END_ELECTRICAL + +# rectangular outline, leaded +# file: "rectLMM_10x10x12_D0.8_P6.0.idf" +# width: 10.000 mm +# length: 10.000 mm +# height: 12.000 mm +# wire dia: 0.800 mm +# pitch: 6.000 mm +.ELECTRICAL +"RECTLMM" "W10.000_L10.000_H12.000_D0.800_P6.000" MM 12.000 +0 3.000 0.400 0 +0 2.000 0.400 0 +0 2.000 5.000 0 +0 -8.000 5.000 0 +0 -8.000 -5.000 0 +0 2.000 -5.000 0 +0 2.000 -0.400 0 +0 3.000 -0.400 0 +0 3.000 0.400 180 +.END_ELECTRICAL + +# rectangular outline, leaded +# file: "rectLIN_10x10x12mm_D0.8mm_P6.0mm.idf" +# width: 393 THOU +# length: 393 THOU +# height: 472 THOU +# wire dia: 31 THOU +# pitch: 236 THOU +.ELECTRICAL +"RECTLIN" "W393_L393_H472_D31_P236" THOU 472 +0 118 15 0 +0 78 15 0 +0 78 196 0 +0 -315 196 0 +0 -315 -196 0 +0 78 -196 0 +0 78 -15 0 +0 118 -15 0 +0 118 15 180 +.END_ELECTRICAL + diff --git a/utils/idftools/idf_helpers.cpp b/utils/idftools/idf_helpers.cpp new file mode 100644 index 0000000000..a1c7141acb --- /dev/null +++ b/utils/idftools/idf_helpers.cpp @@ -0,0 +1,295 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 Cirilo Bernardo + * + * 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 +#include + +#include +#include + +using namespace std; +using namespace IDF3; + +// fetch a line from the given input file and trim the ends +bool IDF3::FetchIDFLine( std::ifstream& aModel, std::string& aLine, bool& isComment, std::streampos& aFilePos ) +{ + aLine = ""; + aFilePos = aModel.tellg(); + + if( aFilePos == -1 ) + return false; + + std::getline( aModel, aLine ); + + isComment = false; + + // A comment begins with a '#' and must be the first character on the line + if( aLine[0] == '#' ) + { + // opening '#' is stripped + isComment = true; + aLine.erase( aLine.begin() ); + } + + // strip leading and trailing spaces + while( !aLine.empty() && isspace( *aLine.begin() ) ) + aLine.erase( aLine.begin() ); + + while( !aLine.empty() && isspace( *aLine.rbegin() ) ) + aLine.erase( --aLine.end() ); + + // a comment line may be empty to improve human readability + if( aLine.empty() && !isComment ) + return false; + + return true; +} + + +// extract an IDF string and move the index to point to the character after the substring +bool IDF3::GetIDFString( const std::string& aLine, std::string& aIDFString, + bool& hasQuotes, int& aIndex ) +{ + // 1. drop all leading spaces + // 2. if the first character is '"', read until the next '"', + // otherwise read until the next space or EOL. + + std::ostringstream ostr; + + int len = aLine.length(); + int idx = aIndex; + + if( idx < 0 || idx >= len ) + return false; + + while( isspace( aLine[idx] ) && idx < len ) ++idx; + + if( idx == len ) + { + aIndex = idx; + return false; + } + + if( aLine[idx] == '"' ) + { + hasQuotes = true; + ++idx; + while( aLine[idx] != '"' && idx < len ) + ostr << aLine[idx++]; + + if( idx == len ) + { + ERROR_IDF << "unterminated quote mark in line:\n"; + std::cerr << "LINE: " << aLine << "\n"; + aIndex = idx; + return false; + } + + ++idx; + } + else + { + hasQuotes = false; + + while( !isspace( aLine[idx] ) && idx < len ) + ostr << aLine[idx++]; + + } + + aIDFString = ostr.str(); + aIndex = idx; + + return true; +} + + +// perform a comparison between a fixed token string and an input string. +// the token is assumed to be an upper case IDF token and the input string +// is data from an IDF file. Since IDF tokens are case-insensitive, we cannot +// assume anything about the case of the input string. +bool IDF3::CompareToken( const char* aTokenString, const std::string& aInputString ) +{ + std::string::size_type i, j; + std::string bigToken = aInputString; + j = aInputString.length(); + + for( i = 0; i < j; ++i ) + bigToken[i] = std::toupper( bigToken[i] ); + + if( !bigToken.compare( aTokenString ) ) + return true; + + return false; +} + + +// parse a string for an IDF3::KEY_OWNER +bool IDF3::ParseOwner( const std::string& aToken, IDF3::KEY_OWNER& aOwner ) +{ + if( CompareToken( "UNOWNED", aToken ) ) + { + aOwner = UNOWNED; + return true; + } + else if( CompareToken( "ECAD", aToken ) ) + { + aOwner = ECAD; + return true; + } + else if( CompareToken( "MCAD", aToken ) ) + { + aOwner = MCAD; + return true; + } + + ERROR_IDF << "unrecognized IDF OWNER: '" << aToken << "'\n"; + + return false; +} + + +bool IDF3::ParseIDFLayer( const std::string& aToken, IDF3::IDF_LAYER& aLayer ) +{ + if( CompareToken( "TOP", aToken ) ) + { + aLayer = LYR_TOP; + return true; + } + else if( CompareToken( "BOTTOM", aToken ) ) + { + aLayer = LYR_BOTTOM; + return true; + } + else if( CompareToken( "BOTH", aToken ) ) + { + aLayer = LYR_BOTH; + return true; + } + else if( CompareToken( "INNER", aToken ) ) + { + aLayer = LYR_INNER; + return true; + } + else if( CompareToken( "ALL", aToken ) ) + { + aLayer = LYR_ALL; + return true; + } + + ERROR_IDF << "unrecognized IDF LAYER: '" << aToken << "'\n"; + + aLayer = LYR_INVALID; + return false; +} + + +bool IDF3::WriteLayersText( std::ofstream& aBoardFile, IDF3::IDF_LAYER aLayer ) +{ + switch( aLayer ) + { + case LYR_TOP: + aBoardFile << "TOP"; + break; + + case LYR_BOTTOM: + aBoardFile << "BOTTOM"; + break; + + case LYR_BOTH: + aBoardFile << "BOTH"; + break; + + case LYR_INNER: + aBoardFile << "INNER"; + break; + + case LYR_ALL: + aBoardFile << "ALL"; + break; + + default: + ERROR_IDF << "Invalid IDF layer" << aLayer << "\n"; + return false; + break; + } + + return !aBoardFile.fail(); +} + + +std::string IDF3::GetPlacementString( IDF3::IDF_PLACEMENT aPlacement ) +{ + switch( aPlacement ) + { + case PS_UNPLACED: + return "UNPLACED"; + + case PS_PLACED: + return "PLACED"; + + case PS_MCAD: + return "MCAD"; + + case PS_ECAD: + return "ECAD"; + + default: + break; + } + + std::ostringstream ostr; + ostr << "[INVALID PLACEMENT VALUE]:" << aPlacement; + + return ostr.str(); +} + + +std::string IDF3::GetLayerString( IDF3::IDF_LAYER aLayer ) +{ + switch( aLayer ) + { + case LYR_TOP: + return "TOP"; + + case LYR_BOTTOM: + return "BOTTOM"; + + case LYR_BOTH: + return "BOTH"; + + case LYR_INNER: + return "INNER"; + + case LYR_ALL: + return "ALL"; + + default: + break; + } + + std::ostringstream ostr; + ostr << "[INVALID LAYER VALUE]:" << aLayer; + + return ostr.str(); +} diff --git a/utils/idftools/idf_helpers.h b/utils/idftools/idf_helpers.h new file mode 100644 index 0000000000..da392f0774 --- /dev/null +++ b/utils/idftools/idf_helpers.h @@ -0,0 +1,171 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 Cirilo Bernardo + * + * 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 IDF_HELPERS_H +#define IDF_HELPERS_H + +#include +#include +#include +#include + +/** + * Macro TO_UTF8 + * converts a wxString to a UTF8 encoded C string for all wxWidgets build modes. + * wxstring is a wxString, not a wxT() or _(). The scope of the return value + * is very limited and volatile, but can be used with printf() style functions well. + * NOTE: Taken from KiCad include/macros.h + */ +#define TO_UTF8( wxstring ) ( (const char*) (wxstring).utf8_str() ) + +/** + * function FROM_UTF8 + * converts a UTF8 encoded C string to a wxString for all wxWidgets build modes. + * NOTE: Taken from KiCad include/macros.h + */ +static inline wxString FROM_UTF8( const char* cstring ) +{ + wxString line = wxString::FromUTF8( cstring ); + + if( line.IsEmpty() ) // happens when cstring is not a valid UTF8 sequence + line = wxConvCurrent->cMB2WC( cstring ); // try to use locale conversion + + return line; +} + + +#define ERROR_IDF std::cerr << "* " << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "(): " + +// minimum drill diameters / slot widths to be represented in the IDF output +#define IDF_MIN_DIA_MM ( 0.001 ) +#define IDF_MIN_DIA_THOU ( 0.00039 ) + +// conversion between mm and thou +#define IDF_MM_TO_THOU 0.0254 + +namespace IDF3 +{ + +/** + * Function FetchIDFLine + * retrieves a single line from an IDF file and performs minimal processing. If a comment symbol + * is encountered then it is removed and a single leading space is removed if present; all trailing + * spaces are removed. If the line is not a comment then all leading and trailing spaces are stripped. + * + * @param aModel is an open IDFv3 file + * @param aLine (output) is the line retrieved from the file + * @param isComment (output) is set to true if the line is a comment + * @param aFilePos (output) is set to the beginning of the line in case the file needs to be rewound + * + * @return bool: true if a line was read and was not empty; otherwise false + */ +bool FetchIDFLine( std::ifstream& aModel, std::string& aLine, bool& isComment, std::streampos& aFilePos ); + + +/** + * Function GetIDFString + * parses a line retrieved via FetchIDFLine() and returns the first IDF string found from the starting + * point aIndex + * + * @param aLine is the line to parse + * @param aIDFString (output) is the IDF string retrieved + * @param hasQuotes (output) is true if the string was in quotation marks + * @param aIndex (input/output) is the index into the input line + * + * @return bool: true if a string was retrieved, otherwise false + */ +bool GetIDFString( const std::string& aLine, std::string& aIDFString, + bool& hasQuotes, int& aIndex ); + +/** + * Function CompareToken + * performs a case-insensitive comparison of a token string and an input string + * + * @param aToken is an IDF token such as ".HEADER" + * @param aInputString is a string typically retrieved via GetIDFString + * + * @return bool: true if the token and input string match + */ +bool CompareToken( const char* aTokenString, const std::string& aInputString ); + + +/** + * Function ParseOwner + * parses the input string for a valid IDF Owner type + * + * @param aToken is the string to be parsed + * @param aOwner (output) is the IDF Owner class + * + * @return bool: true if a valid OWNER was found, otherwise false + */ +bool ParseOwner( const std::string& aToken, IDF3::KEY_OWNER& aOwner ); + + +/** + * Function ParseIDFLayer + * parses an input string for a valid IDF layer specification + * + * @param aToken is the string to be parsed + * @param aLayer (output) is the IDF Layer type or group + * + * @return bool: true if a valid IDF Layer type was found, otherwise false + */ +bool ParseIDFLayer( const std::string& aToken, IDF3::IDF_LAYER& aLayer ); + + +/** + * Function WriteLayersText + * writes out text corresponding to the given IDF Layer type + * + * @param aBoardFile is an IDFv3 file open for output + * @param aLayer is the IDF Layer type + * + * @return bool: true if the data was successfully written, otherwise false + */ +bool WriteLayersText( std::ofstream& aBoardFile, IDF3::IDF_LAYER aLayer ); + + +/** + * Function GetPlacementString + * returns a string representing the given IDF Placement type + * + * @param aPlacement is the IDF placement type to encode as a string + * + * @return string: the string representation of aPlacement + */ +std::string GetPlacementString( IDF3::IDF_PLACEMENT aPlacement ); + + +/** + * Function GetLayerString + * returns a string representing the given IDF Layer type + * + * @param aLayer is the IDF layer type to encode as a string + * + * @return string: the string representation of aLayer + */ +std::string GetLayerString( IDF3::IDF_LAYER aLayer ); + +} + +#endif // IDF_HELPERS_H diff --git a/utils/idftools/idf_outlines.cpp b/utils/idftools/idf_outlines.cpp new file mode 100644 index 0000000000..67779a407b --- /dev/null +++ b/utils/idftools/idf_outlines.cpp @@ -0,0 +1,2614 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 Cirilo Bernardo + * + * 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 +#include +#include + +#include +#include +#include + +using namespace IDF3; +using namespace std; + + +/* + * CLASS: BOARD OUTLINE + */ +BOARD_OUTLINE::BOARD_OUTLINE() +{ + outlineType = OTLN_BOARD; + single = false; + owner = UNOWNED; + parent = NULL; + thickness = 0.0; + unit = UNIT_MM; + return; +} + +BOARD_OUTLINE::~BOARD_OUTLINE() +{ + Clear(); + return; +} + +IDF3::OUTLINE_TYPE BOARD_OUTLINE::GetOutlineType( void ) +{ + return outlineType; +} + +bool BOARD_OUTLINE::readOutlines( std::ifstream& aBoardFile ) +{ + // reads the outline data from a file + double x, y, ang; + double dLoc = 1e-5; // distances are equal when closer than 0.1 micron + bool comment = false; + bool quoted = false; + bool closed = false; + int idx = 0; + int loopidx = -1; + int tmp = 0; + int npts = 0; + std::string iline; + std::string entry; + std::stringstream tstr; + IDF_OUTLINE* op = NULL; + IDF_SEGMENT* sp = NULL; + IDF_POINT prePt; + IDF_POINT curPt; + std::streampos pos; + + // destroy any existing outline data + ClearOutlines(); + + while( aBoardFile.good() ) + { + if( !FetchIDFLine( aBoardFile, iline, comment, pos ) ) + continue; + + idx = 0; + GetIDFString( iline, entry, quoted, idx ); + + if( quoted ) + { + ERROR_IDF << "invalid outline; FIELD 1 is quoted\n"; + std::cerr << " LINE: " << iline << "\n"; + return false; + } + + // check for the end of the section + if( entry.size() >= 5 && CompareToken( ".END_", entry.substr( 0, 5 ) ) ) + { + // rewind to the start of the last line; the routine invoking + // this is responsible for checking that the current '.END_ ...' + // matches the section header. + aBoardFile.seekg( pos ); + + if( outlines.size() > 0 ) + { + if( npts > 0 && !closed ) + { + ERROR_IDF << "invalid outline (not closed)\n"; + return false; + } + + // verify winding + if( !single ) + { + if( !outlines.front()->IsCCW() ) + { + ERROR_IDF << "invalid IDF3 file (BOARD_OUTLINE)\n"; + cerr << "* first outline is not in CCW order\n"; +//#warning TO BE IMPLEMENTED + // outlines.front()->EnsureWinding( false ); + return true; + } + + if( outlines.size() > 1 && outlines.back()->IsCCW() && !outlines.back()->IsCircle() ) + { + ERROR_IDF << "invalid IDF3 file (BOARD_OUTLINE)\n"; + cerr << "* cutout points are not in CW order\n"; +//#warning TO BE IMPLEMENTED + // outlines.front()->EnsureWinding( true ); + return true; + } + } + } + + return true; + } + + tstr.clear(); + tstr << entry; + + tstr >> tmp; + if( tstr.fail() ) + { + if( outlineType == OTLN_COMPONENT && CompareToken( "PROP", entry ) ) + { + aBoardFile.seekg( pos ); + return true; + } + + ERROR_IDF << "invalid outline; FIELD 1 is not numeric\n"; + std::cerr << " LINE: " << iline << "\n"; + return false; + } + + if( tmp != loopidx ) + { + // index change + + if( tmp < 0 ) + { + ERROR_IDF << "invalid outline; FIELD 1 is invalid\n"; + std::cerr << " LINE: " << iline << "\n"; + return false; + } + + if( loopidx == -1 ) + { + // first outline + if( single ) + { + // outline may have a Loop Index of 0 or 1 + if( tmp == 0 || tmp == 1 ) + { + op = new IDF_OUTLINE; + if( op == NULL ) + { + ERROR_IDF << "memory allocation failed\n"; + return false; + } + outlines.push_back( op ); + loopidx = tmp; + } + else + { + ERROR_IDF << "invalid outline; FIELD 1 is invalid (must be 0 or 1)\n"; + std::cerr << " LINE: " << iline << "\n"; + return false; + } + } + else + { + // outline *MUST* have a Loop Index of 0 + if( tmp != 0 ) + { + ERROR_IDF << "invalid outline; first outline of a BOARD or PANEL must have a Loop Index of 0\n"; + std::cerr << " LINE: " << iline << "\n"; + return false; + } + + op = new IDF_OUTLINE; + + if( op == NULL ) + { + ERROR_IDF << "memory allocation failed\n"; + return false; + } + + outlines.push_back( op ); + loopidx = tmp; + } + // end of block for first outline + } + else + { + // outline for cutout + if( single ) + { + ERROR_IDF << "invalid outline; a simple outline type may only have one outline\n"; + std::cerr << " LINE: " << iline << "\n"; + return false; + } + + if( tmp - loopidx != 1 ) + { + ERROR_IDF << "invalid outline; cutouts must be numbered in order from 1 onwards\n"; + std::cerr << " LINE: " << iline << "\n"; + return false; + } + + // verify winding of previous outline + if( ( loopidx = 0 && !op->IsCCW() ) + || ( loopidx > 0 && op->IsCCW() ) ) + { + ERROR_IDF << "invalid outline (violation of loop point order rules by Loop Index " + << loopidx << ")\n"; + return false; + } + + op = new IDF_OUTLINE; + + if( op == NULL ) + { + ERROR_IDF << "memory allocation failed\n"; + return false; + } + + outlines.push_back( op ); + loopidx = tmp; + } + // end of index change code + npts = 0; + closed = false; + } + + if( op == NULL ) + { + ERROR_IDF << "invalid outline; FIELD 1 is invalid\n"; + std::cerr << " LINE: " << iline << "\n"; + return false; + } + + if( !GetIDFString( iline, entry, quoted, idx ) ) + { + ERROR_IDF << "invalid RECORD 3, FIELD 2 does not exist\n"; + std::cerr << " LINE: " << iline << "\n"; + return false; + } + + if( quoted ) + { + ERROR_IDF << "invalid RECORD 3, FIELD 2 is quoted\n"; + std::cerr << " LINE: " << iline << "\n"; + return false; + } + + tstr.clear(); + tstr << entry; + + tstr >> x; + if( tstr.fail() ) + { + ERROR_IDF << "invalid RECORD 3, invalid X value in FIELD 2\n"; + std::cerr << " LINE: " << iline << "\n"; + return false; + } + + if( !GetIDFString( iline, entry, quoted, idx ) ) + { + ERROR_IDF << "invalid RECORD 3, FIELD 3 does not exist\n"; + std::cerr << " LINE: " << iline << "\n"; + return false; + } + + if( quoted ) + { + ERROR_IDF << "invalid RECORD 3, FIELD 3 is quoted\n"; + std::cerr << " LINE: " << iline << "\n"; + return false; + } + + tstr.clear(); + tstr << entry; + + tstr >> y; + if( tstr.fail() ) + { + ERROR_IDF << "invalid RECORD 3, invalid Y value in FIELD 3\n"; + std::cerr << " LINE: " << iline << "\n"; + return false; + } + + if( !GetIDFString( iline, entry, quoted, idx ) ) + { + ERROR_IDF << "invalid RECORD 3, FIELD 4 does not exist\n"; + std::cerr << " LINE: " << iline << "\n"; + return false; + } + + if( quoted ) + { + ERROR_IDF << "invalid RECORD 3, FIELD 4 is quoted\n"; + std::cerr << " LINE: " << iline << "\n"; + return false; + } + + tstr.clear(); + tstr << entry; + + tstr >> ang; + if( tstr.fail() ) + { + ERROR_IDF << "invalid ANGLE value in FIELD 3\n"; + std::cerr << " LINE: " << iline << "\n"; + return false; + } + + // the line was successfully read; convert to mm if necessary + if( unit == UNIT_THOU ) + { + x *= IDF_MM_TO_THOU; + y *= IDF_MM_TO_THOU; + } + + if( npts++ == 0 ) + { + // first point + prePt.x = x; + prePt.y = y; + + // ensure that the first point is not an arc specification + if( ang < -MIN_ANG || ang > MIN_ANG ) + { + ERROR_IDF << "invalid RECORD 3, first point has non-zero angle\n"; + std::cerr << " LINE: " << iline << "\n"; + return false; + } + } + else + { + // Nth point + if( closed ) + { + ERROR_IDF << "invalid RECORD 3; adding a segment to a closed outline\n"; + std::cerr << " LINE: " << iline << "\n"; + return false; + } + + curPt.x = x; + curPt.y = y; + + if( ang > -MIN_ANG && ang < MIN_ANG ) + { + sp = new IDF_SEGMENT( prePt, curPt ); + } + else + { + sp = new IDF_SEGMENT( prePt, curPt, ang, false ); + } + + if( sp == NULL ) + { + ERROR_IDF << "memory allocation failure\n"; + return false; + } + + if( sp->IsCircle() ) + { + // this is a circle; the loop is closed + if( op->size() != 0 ) + { + ERROR_IDF << "invalid RECORD 3; adding a circle to a non-empty outline\n"; + std::cerr << " LINE: " << iline << "\n"; + delete sp; + return false; + } + + closed = true; + } + else if( op->size() != 0 ) + { + if( curPt.Matches( op->front()->startPoint, dLoc ) ) + closed = true; + } + + op->push( sp ); + prePt.x = x; + prePt.y = y; + } + } // while( aBoardFile.good() ) + + // NOTE: + // 1. ideally we would ensure that there are no arcs with a radius of 0; this entails + // actively calculating the last point as the previous entry could have been an instruction + + return false; +} + +bool BOARD_OUTLINE::writeComments( std::ofstream& aBoardFile ) +{ + if( comments.empty() ) + return true; + + list< string >::const_iterator itS = comments.begin(); + list< string >::const_iterator itE = comments.end(); + + while( itS != itE ) + { + aBoardFile << "# " << *itS << "\n"; + ++itS; + } + + return !aBoardFile.fail(); +} + +bool BOARD_OUTLINE::writeOwner( std::ofstream& aBoardFile ) +{ + switch( owner ) + { + case ECAD: + aBoardFile << "ECAD\n"; + break; + + case MCAD: + aBoardFile << "MCAD\n"; + break; + + default: + aBoardFile << "UNOWNED\n"; + break; + } + + return !aBoardFile.fail(); +} + +bool BOARD_OUTLINE::writeOutline( std::ofstream& aBoardFile, IDF_OUTLINE* aOutline, size_t aIndex ) +{ + // TODO: check the stream integrity + + std::list::iterator bo; + std::list::iterator eo; + + if( aOutline->size() == 1 ) + { + if( !aOutline->front()->IsCircle() ) + { + // this is a bad outline + ERROR_IDF << "bad outline (single segment item, not circle)\n"; + return false; + } + + if( single ) + aIndex = 0; + + // NOTE: a circle always has an angle of 360, never -360, + // otherwise SolidWorks chokes on the file. + if( unit == UNIT_MM ) + { + aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(5) + << aOutline->front()->startPoint.x << " " + << aOutline->front()->startPoint.y << " 0\n"; + + aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(5) + << aOutline->front()->endPoint.x << " " + << aOutline->front()->endPoint.y << " 360\n"; + } + else + { + aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(1) + << (aOutline->front()->startPoint.x / IDF_MM_TO_THOU) << " " + << (aOutline->front()->startPoint.y / IDF_MM_TO_THOU) << " 0\n"; + + aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(1) + << (aOutline->front()->endPoint.x / IDF_MM_TO_THOU) << " " + << (aOutline->front()->endPoint.y / IDF_MM_TO_THOU) << " 360\n"; + } + + return !aBoardFile.fail(); + } + + // ensure that the very last point is the same as the very first point + aOutline->back()-> endPoint = aOutline->front()->startPoint; + + if( single ) + { + // only indices 0 (CCW) and 1 (CW) are valid; set the index according to + // the outline's winding + if( aOutline->IsCCW() ) + aIndex = 0; + else + aIndex = 1; + } + + // check if we must reverse things + if( ( aOutline->IsCCW() && ( aIndex > 0 ) ) + || ( ( !aOutline->IsCCW() ) && ( aIndex == 0 ) ) ) + { + eo = aOutline->begin(); + bo = aOutline->end(); + --bo; + + // for the first item we write out both points + if( unit == UNIT_MM ) + { + if( aOutline->front()->angle < MIN_ANG && aOutline->front()->angle > -MIN_ANG ) + { + aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(5) + << aOutline->front()->endPoint.x << " " + << aOutline->front()->endPoint.y << " 0\n"; + + aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(5) + << aOutline->front()->startPoint.x << " " + << aOutline->front()->startPoint.y << " 0\n"; + } + else + { + aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(5) + << aOutline->front()->endPoint.x << " " + << aOutline->front()->endPoint.y << " 0\n"; + + aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(5) + << aOutline->front()->startPoint.x << " " + << aOutline->front()->startPoint.y << " " + << setprecision(5) << -aOutline->front()->angle << "\n"; + } + } + else + { + if( aOutline->front()->angle < MIN_ANG && aOutline->front()->angle > -MIN_ANG ) + { + aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(1) + << (aOutline->front()->endPoint.x / IDF_MM_TO_THOU) << " " + << (aOutline->front()->endPoint.y / IDF_MM_TO_THOU) << " 0\n"; + + aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(1) + << (aOutline->front()->startPoint.x / IDF_MM_TO_THOU) << " " + << (aOutline->front()->startPoint.y / IDF_MM_TO_THOU) << " 0\n"; + } + else + { + aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(1) + << (aOutline->front()->endPoint.x / IDF_MM_TO_THOU) << " " + << (aOutline->front()->endPoint.y / IDF_MM_TO_THOU) << " 0\n"; + + aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(1) + << (aOutline->front()->startPoint.x / IDF_MM_TO_THOU) << " " + << (aOutline->front()->startPoint.y / IDF_MM_TO_THOU) << " " + << setprecision(5) << -aOutline->front()->angle << "\n"; + } + } + + // for all other segments we only write out the start point + while( bo != eo ) + { + if( unit == UNIT_MM ) + { + if( (*bo)->angle < MIN_ANG && (*bo)->angle > -MIN_ANG ) + { + aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(5) + << (*bo)->startPoint.x << " " + << (*bo)->startPoint.y << " 0\n"; + } + else + { + aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(5) + << (*bo)->startPoint.x << " " + << (*bo)->startPoint.y << " " + << setprecision(5) << -(*bo)->angle << "\n"; + } + } + else + { + if( (*bo)->angle < MIN_ANG && (*bo)->angle > -MIN_ANG ) + { + aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(1) + << ((*bo)->startPoint.x / IDF_MM_TO_THOU) << " " + << ((*bo)->startPoint.y / IDF_MM_TO_THOU) << " 0\n"; + } + else + { + aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(1) + << ((*bo)->startPoint.x / IDF_MM_TO_THOU) << " " + << ((*bo)->startPoint.y / IDF_MM_TO_THOU) << " " + << setprecision(5) << -(*bo)->angle << "\n"; + } + } + + --bo; + } + } + else + { + bo = aOutline->begin(); + eo = aOutline->end(); + + // for the first item we write out both points + if( unit == UNIT_MM ) + { + if( (*bo)->angle < MIN_ANG && (*bo)->angle > -MIN_ANG ) + { + aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(5) + << (*bo)->startPoint.x << " " + << (*bo)->startPoint.y << " 0\n"; + + aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(5) + << (*bo)->endPoint.x << " " + << (*bo)->endPoint.y << " 0\n"; + } + else + { + aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(5) + << (*bo)->startPoint.x << " " + << (*bo)->startPoint.y << " 0\n"; + + aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(5) + << (*bo)->endPoint.x << " " + << (*bo)->endPoint.y << " " + << setprecision(5) << (*bo)->angle << "\n"; + } + } + else + { + if( (*bo)->angle < MIN_ANG && (*bo)->angle > -MIN_ANG ) + { + aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(1) + << ((*bo)->startPoint.x / IDF_MM_TO_THOU) << " " + << ((*bo)->startPoint.y / IDF_MM_TO_THOU) << " 0\n"; + + aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(1) + << ((*bo)->endPoint.x / IDF_MM_TO_THOU) << " " + << ((*bo)->endPoint.y / IDF_MM_TO_THOU) << " 0\n"; + } + else + { + aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(1) + << ((*bo)->startPoint.x / IDF_MM_TO_THOU) << " " + << ((*bo)->startPoint.y / IDF_MM_TO_THOU) << " 0\n"; + + aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(1) + << ((*bo)->endPoint.x / IDF_MM_TO_THOU) << " " + << ((*bo)->endPoint.y / IDF_MM_TO_THOU) << " " + << setprecision(5) << (*bo)->angle << "\n"; + } + } + + ++bo; + + // for all other segments we only write out the last point + while( bo != eo ) + { + if( unit == UNIT_MM ) + { + if( (*bo)->angle < MIN_ANG && (*bo)->angle > -MIN_ANG ) + { + aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(5) + << (*bo)->endPoint.x << " " + << (*bo)->endPoint.y << " 0\n"; + } + else + { + aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(5) + << (*bo)->endPoint.x << " " + << (*bo)->endPoint.y << " " + << setprecision(5) << (*bo)->angle << "\n"; + } + } + else + { + if( (*bo)->angle < MIN_ANG && (*bo)->angle > -MIN_ANG ) + { + aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(1) + << ((*bo)->endPoint.x / IDF_MM_TO_THOU) << " " + << ((*bo)->endPoint.y / IDF_MM_TO_THOU) << " 0\n"; + } + else + { + aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(1) + << ((*bo)->endPoint.x / IDF_MM_TO_THOU) << " " + << ((*bo)->endPoint.y / IDF_MM_TO_THOU) << " " + << setprecision(5) << (*bo)->angle << "\n"; + } + } + + ++bo; + } + } + + return !aBoardFile.fail(); +} + +bool BOARD_OUTLINE::writeOutlines( std::ofstream& aBoardFile ) +{ + if( outlines.empty() ) + return true; + + int idx = 0; + std::list< IDF_OUTLINE* >::iterator itS = outlines.begin(); + std::list< IDF_OUTLINE* >::iterator itE = outlines.end(); + + while( itS != itE ) + { + if( !writeOutline( aBoardFile, *itS, idx++ ) ) + return false; + + ++itS; + } + + return true; +} + +void BOARD_OUTLINE::SetUnit( IDF3::IDF_UNIT aUnit ) +{ + unit = aUnit; + return; +} + +IDF3::IDF_UNIT BOARD_OUTLINE::GetUnit( void ) +{ + return unit; +} + +bool BOARD_OUTLINE::SetThickness( double aThickness ) +{ + if( aThickness < 0.0 ) + return false; + + thickness = aThickness; + return true; +} + +double BOARD_OUTLINE::GetThickness( void ) +{ + return thickness; +} + +bool BOARD_OUTLINE::ReadData( std::ifstream& aBoardFile, const std::string& aHeader ) +{ + // BOARD_OUTLINE (PANEL_OUTLINE) + // .BOARD_OUTLINE [OWNER] + // [thickness] + // [outlines] + + // check RECORD 1 + std::string token; + bool quoted = false; + int idx = 0; + + if( !GetIDFString( aHeader, token, quoted, idx ) ) + { + ERROR_IDF << "invalid invocation; blank header line\n"; + return false; + } + + if( quoted ) + { + ERROR_IDF << "section names may not be quoted:\n"; + std::cerr << "\tLINE: " << aHeader << "\n"; + return false; + } + + if( !CompareToken( ".BOARD_OUTLINE", token ) ) + { + ERROR_IDF << "not a board outline:\n"; + std::cerr << "\tLINE: " << aHeader << "\n"; + return false; + } + + if( !GetIDFString( aHeader, token, quoted, idx ) ) + { + ERROR_IDF << "no OWNER; setting to UNOWNED\n"; + owner = UNOWNED; + } + else + { + if( !ParseOwner( token, owner ) ) + { + ERROR_IDF << "invalid OWNER (reverting to UNOWNED): " << token << "\n"; + owner = UNOWNED; + } + } + + // check RECORD 2 + std::string iline; + bool comment = false; + std::streampos pos; + + while( aBoardFile.good() && !FetchIDFLine( aBoardFile, iline, comment, pos ) ); + + if( ( !aBoardFile.good() && !aBoardFile.eof() ) || iline.empty() ) + { + ERROR_IDF << "bad .BOARD_OUTLINE section (premature end)\n"; + return false; + } + + idx = 0; + if( comment ) + { + ERROR_IDF << "comment within .BOARD_OUTLINE section\n"; + return false; + } + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF << "bad .BOARD_OUTLINE section (no thickness)\n"; + return false; + } + + std::stringstream teststr; + teststr << token; + + teststr >> thickness; + if( teststr.fail() ) + { + ERROR_IDF << "bad .BOARD_OUTLINE section (invalid RECORD 2)\n"; + std::cerr << "\tLINE: " << iline << "\n"; + return false; + } + + if( unit == UNIT_THOU ) + thickness *= IDF_MM_TO_THOU; + + // read RECORD 3 values + // XXX - check the return value - we may have empty lines and what-not + readOutlines( aBoardFile ); + + // check RECORD 4 + while( aBoardFile.good() && !FetchIDFLine( aBoardFile, iline, comment, pos ) ); + + if( ( !aBoardFile.good() && aBoardFile.eof() ) || iline.empty() ) + { + ERROR_IDF << "bad .BOARD_OUTLINE section (premature end)\n"; + return false; + } + + idx = 0; + if( comment ) + { + ERROR_IDF << "comment within .BOARD_OUTLINE section\n"; + return false; + } + + if( !CompareToken( ".END_BOARD_OUTLINE", iline ) ) + { + ERROR_IDF << "bad .BOARD_OUTLINE section (no .END_BOARD_OUTLINE)\n"; + return false; + } + + return true; +} + +bool BOARD_OUTLINE::WriteData( std::ofstream& aBoardFile ) +{ + writeComments( aBoardFile ); + + // note: a BOARD_OUTLINE section is required, even if it is empty + aBoardFile << ".BOARD_OUTLINE "; + + writeOwner( aBoardFile ); + + if( unit == UNIT_MM ) + aBoardFile << setiosflags(ios::fixed) << setprecision(5) << thickness << "\n"; + else + aBoardFile << setiosflags(ios::fixed) << setprecision(1) << (thickness / IDF_MM_TO_THOU) << "\n"; + + if( !writeOutlines( aBoardFile ) ) + return false; + + aBoardFile << ".END_BOARD_OUTLINE\n\n"; + + return !aBoardFile.fail(); +} + +void BOARD_OUTLINE::Clear( void ) +{ + comments.clear(); + ClearOutlines(); + + owner = UNOWNED; + return; +} + +void BOARD_OUTLINE::SetParent( IDF3_BOARD* aParent ) +{ + parent = aParent; +} + +IDF3_BOARD* BOARD_OUTLINE::GetParent( void ) +{ + return parent; +} + +bool BOARD_OUTLINE::AddOutline( IDF_OUTLINE* aOutline ) +{ + std::list< IDF_OUTLINE* >::iterator itS = outlines.begin(); + std::list< IDF_OUTLINE* >::iterator itE = outlines.end(); + + while( itS != itE ) + { + if( *itS == aOutline ) + return false; + + ++itS; + } + + outlines.push_back( aOutline ); + return true; +} + +bool BOARD_OUTLINE::DelOutline( IDF_OUTLINE* aOutline ) +{ + std::list< IDF_OUTLINE* >::iterator itS = outlines.begin(); + std::list< IDF_OUTLINE* >::iterator itE = outlines.end(); + + if( outlines.empty() ) + return false; + + // if there are more than 1 outlines it makes no sense to delete + // the first outline (board outline) since that would have the + // undesirable effect of substituting a cutout outline as the board outline + if( aOutline == outlines.front() ) + { + if( outlines.size() > 1 ) + return false; + + outlines.clear(); + return true; + } + + while( itS != itE ) + { + if( *itS == aOutline ) + { + outlines.erase( itS ); + return true; + } + + ++itS; + } + + return false; +} + +bool BOARD_OUTLINE::DelOutline( size_t aIndex ) +{ + std::list< IDF_OUTLINE* >::iterator itS = outlines.begin(); + std::list< IDF_OUTLINE* >::iterator itE = outlines.end(); + + if( outlines.empty() ) + return false; + + if( aIndex >= outlines.size() ) + return false; + + if( aIndex == 0 ) + { + // if there are more than 1 outlines it makes no sense to delete + // the first outline (board outline) since that would have the + // undesirable effect of substituting a cutout outline as the board outline + if( outlines.size() > 1 ) + return false; + + delete *itS; + outlines.clear(); + + return true; + } + + for( ; aIndex > 0; --aIndex ) + ++itS; + + delete *itS; + outlines.erase( itS ); + + return true; +} + +const std::list< IDF_OUTLINE* >*const BOARD_OUTLINE::GetOutlines( void ) +{ + return &outlines; +} + +size_t BOARD_OUTLINE::OutlinesSize( void ) +{ + return outlines.size(); +} + +IDF_OUTLINE* BOARD_OUTLINE::GetOutline( size_t aIndex ) +{ + if( aIndex >= outlines.size() ) + return NULL; + + std::list< IDF_OUTLINE* >::iterator itS = outlines.begin(); + + for( ; aIndex > 0; --aIndex ) + ++itS; + + return *itS; +} + +IDF3::KEY_OWNER BOARD_OUTLINE::GetOwner( void ) +{ + return owner; +} + +bool BOARD_OUTLINE::SetOwner( IDF3::KEY_OWNER aOwner ) +{ + // if this is a COMPONENT OUTLINE there can be no owner + if( outlineType == IDF3::OTLN_COMPONENT ) + return true; + + // if no one owns the outline, any system may + // set the owner + if( owner == UNOWNED ) + { + owner = aOwner; + return true; + } + + // if the outline is owned, only the owning + // CAD system can make alterations + if( parent == NULL ) + return false; + + if( owner == MCAD && parent->GetCadType() == CAD_MECH ) + { + owner = aOwner; + return true; + } + + if( owner == ECAD && parent->GetCadType() == CAD_ELEC ) + { + owner = aOwner; + return true; + } + + return false; +} + +bool BOARD_OUTLINE::IsSingle( void ) +{ + return single; +} + +void BOARD_OUTLINE::ClearOutlines( void ) +{ + std::list< IDF_OUTLINE* >::iterator itS = outlines.begin(); + std::list< IDF_OUTLINE* >::iterator itE = outlines.end(); + + while( itS != itE ) + { + delete *itS; + ++itS; + } + + outlines.clear(); + return; +} + +void BOARD_OUTLINE::AddComment( const std::string& aComment ) +{ + if( aComment.empty() ) + return; + + comments.push_back( aComment ); + return; +} + +size_t BOARD_OUTLINE::CommentsSize( void ) +{ + return comments.size(); +} + +std::list< std::string >* BOARD_OUTLINE::GetComments( void ) +{ + return &comments; +} + +const std::string* BOARD_OUTLINE::GetComment( size_t aIndex ) +{ + if( aIndex >= comments.size() ) + return NULL; + + std::list< std::string >::iterator itS = comments.begin(); + + for( ; aIndex > 0; --aIndex ) + ++itS; + + return &(*itS); +} + +bool BOARD_OUTLINE::DeleteComment( size_t aIndex ) +{ + if( aIndex >= comments.size() ) + return false; + + std::list< std::string >::iterator itS = comments.begin(); + + for( ; aIndex > 0; --aIndex ) + ++itS; + + comments.erase( itS ); + return true; +} + +void BOARD_OUTLINE::ClearComments( void ) +{ + comments.clear(); + return; +} + + +/* + * CLASS: OTHER_OUTLINE + */ +OTHER_OUTLINE::OTHER_OUTLINE() +{ + outlineType = OTLN_OTHER; + side = LYR_INVALID; + single = true; + + return; +} + +void OTHER_OUTLINE::SetOutlineIdentifier( const std::string aUniqueID ) +{ + uniqueID = aUniqueID; + return; +} + +const std::string& OTHER_OUTLINE::GetOutlineIdentifier( void ) +{ + return uniqueID; +} + +bool OTHER_OUTLINE::SetSide( IDF3::IDF_LAYER aSide ) +{ + switch( aSide ) + { + case LYR_TOP: + case LYR_BOTTOM: + side = aSide; + break; + + default: + ERROR_IDF << "invalid side (" << aSide << "); must be one of TOP/BOTTOM\n"; + side = LYR_INVALID; + return false; + break; + } + + return true; +} + +IDF3::IDF_LAYER OTHER_OUTLINE::GetSide( void ) +{ + return side; +} + +bool OTHER_OUTLINE::ReadData( std::ifstream& aBoardFile, const std::string& aHeader ) +{ + // OTHER_OUTLINE/VIA_KEEPOUT + // .OTHER_OUTLINE [OWNER] + // [outline identifier] [thickness] [board side: Top/Bot] {not present in VA\IA KEEPOUT} + // [outline] + + // check RECORD 1 + std::string token; + bool quoted = false; + int idx = 0; + + if( !GetIDFString( aHeader, token, quoted, idx ) ) + { + ERROR_IDF << "invalid invocation; blank header line\n"; + return false; + } + + if( quoted ) + { + ERROR_IDF << "section names may not be quoted:\n"; + std::cerr << "\tLINE: " << aHeader << "\n"; + return false; + } + + if( outlineType == OTLN_OTHER ) + { + if( !CompareToken( ".OTHER_OUTLINE", token ) ) + { + ERROR_IDF << "not an OTHER outline:\n"; + std::cerr << "\tLINE: " << aHeader << "\n"; + return false; + } + } + else + { + if( !CompareToken( ".VIA_KEEPOUT", token ) ) + { + ERROR_IDF << "not a VIA_KEEPOUT outline:\n"; + std::cerr << "\tLINE: " << aHeader << "\n"; + return false; + } + } + + if( !GetIDFString( aHeader, token, quoted, idx ) ) + { + ERROR_IDF << "no OWNER; setting to UNOWNED\n"; + owner = UNOWNED; + } + else + { + if( !ParseOwner( token, owner ) ) + { + ERROR_IDF << "invalid OWNER (reverting to UNOWNED): " << token << "\n"; + owner = UNOWNED; + } + } + + std::string iline; + bool comment = false; + std::streampos pos; + + if( outlineType == OTLN_OTHER ) + { + // check RECORD 2 + // [outline identifier] [thickness] [board side: Top/Bot] + while( aBoardFile.good() && !FetchIDFLine( aBoardFile, iline, comment, pos ) ); + + if( ( !aBoardFile.good() && aBoardFile.eof() ) || iline.empty() ) + { + ERROR_IDF << "bad .OTHER_OUTLINE section (premature end)\n"; + return false; + } + + idx = 0; + if( comment ) + { + ERROR_IDF << "comment within .OTHER_OUTLINE section\n"; + return false; + } + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF << "bad .OTHER_OUTLINE section (no outline identifier)\n"; + return false; + } + + uniqueID = token; + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF << "bad .OTHER_OUTLINE section (no thickness)\n"; + return false; + } + + std::stringstream teststr; + teststr << token; + + teststr >> thickness; + if( teststr.fail() ) + { + ERROR_IDF << "bad .OTHER_OUTLINE section (invalid RECORD 2 reading thickness)\n"; + std::cerr << "\tLINE: " << iline << "\n"; + return false; + } + + if( unit == UNIT_THOU ) + thickness *= IDF_MM_TO_THOU; + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF << "bad .OTHER_OUTLINE section (no board side)\n"; + return false; + } + + if( !ParseIDFLayer( token, side ) || ( side != LYR_TOP && side != LYR_BOTTOM ) ) + { + ERROR_IDF << "bad .OTHER_OUTLINE section (invalid side, must be TOP/BOTTOM only)\n"; + std::cerr << "\tLINE: " << iline << "\n"; + return false; + } + } + + // read RECORD 3 values + readOutlines( aBoardFile ); + + // check RECORD 4 + while( aBoardFile.good() && !FetchIDFLine( aBoardFile, iline, comment, pos ) ); + + if( ( !aBoardFile.good() && aBoardFile.eof() ) || iline.empty() ) + { + ERROR_IDF << "bad .OTHER_OUTLINE/.VIA_KEEPOUT section (premature end)\n"; + return false; + } + + idx = 0; + if( comment ) + { + ERROR_IDF << "comment within .OTHER_OUTLINE/.VIA_KEEPOUT section\n"; + return false; + } + + if( outlineType == OTLN_OTHER ) + { + if( !CompareToken( ".END_OTHER_OUTLINE", iline ) ) + { + ERROR_IDF << "bad .OTHER_OUTLINE section (no .END_OTHER_OUTLINE)\n"; + return false; + } + } + else + { + if( !CompareToken( ".END_VIA_KEEPOUT", iline ) ) + { + ERROR_IDF << "bad .VIA_KEEPOUT section (no .END_VIA_KEEPOUT)\n"; + return false; + } + } + + return true; +} + +bool OTHER_OUTLINE::WriteData( std::ofstream& aBoardFile ) +{ + // this section is optional; do not write if not required + if( outlines.empty() ) + return true; + + writeComments( aBoardFile ); + + // write RECORD 1 + if( outlineType == OTLN_OTHER ) + aBoardFile << ".OTHER_OUTLINE "; + else + aBoardFile << ".VIA_KEEPOUT "; + + writeOwner( aBoardFile ); + + // write RECORD 2 + if( outlineType == OTLN_OTHER ) + { + aBoardFile << "\"" << uniqueID << "\" "; + + if( unit == UNIT_MM ) + aBoardFile << setiosflags(ios::fixed) << setprecision(5) << thickness << " "; + else + aBoardFile << setiosflags(ios::fixed) << setprecision(1) << (thickness / IDF_MM_TO_THOU) << " "; + + switch( side ) + { + case LYR_TOP: + case LYR_BOTTOM: + WriteLayersText( aBoardFile, side ); + break; + + default: + ERROR_IDF << "Invalid OTHER_OUTLINE side (neither top nor bottom): " << side << "\n"; + return false; + break; + } + } + + // write RECORD 3 + if( !writeOutlines( aBoardFile ) ) + return false; + + // write RECORD 4 + if( outlineType == OTLN_OTHER ) + aBoardFile << ".END_OTHER_OUTLINE\n\n"; + else + aBoardFile << ".END_VIA_KEEPOUT\n\n"; + + return !aBoardFile.fail(); +} + +void OTHER_OUTLINE::Clear( void ) +{ + side = LYR_INVALID; + uniqueID.clear(); + + BOARD_OUTLINE::Clear(); + + return; +} + + +/* + * CLASS: ROUTE_OUTLINE + */ +ROUTE_OUTLINE::ROUTE_OUTLINE() +{ + outlineType = OTLN_ROUTE; + single = true; + layers = LYR_INVALID; +} + +void ROUTE_OUTLINE::SetLayers( IDF3::IDF_LAYER aLayer ) +{ + layers = aLayer; +} + +IDF3::IDF_LAYER ROUTE_OUTLINE::GetLayers( void ) +{ + return layers; +} + +bool ROUTE_OUTLINE::ReadData( std::ifstream& aBoardFile, const std::string& aHeader ) +{ + // ROUTE_OUTLINE (or ROUTE_KEEPOUT) + // .ROUTE_OUTLINE [OWNER] + // [layers] + // [outline] + + // check RECORD 1 + std::string token; + bool quoted = false; + int idx = 0; + + if( !GetIDFString( aHeader, token, quoted, idx ) ) + { + ERROR_IDF << "invalid invocation; blank header line\n"; + return false; + } + + if( quoted ) + { + ERROR_IDF << "section names may not be quoted:\n"; + std::cerr << "\tLINE: " << aHeader << "\n"; + return false; + } + + if( outlineType == OTLN_ROUTE ) + { + if( !CompareToken( ".ROUTE_OUTLINE", token ) ) + { + ERROR_IDF << "not a ROUTE outline:\n"; + std::cerr << "\tLINE: " << aHeader << "\n"; + return false; + } + } + else + { + if( !CompareToken( ".ROUTE_KEEPOUT", token ) ) + { + ERROR_IDF << "not a ROUTE KEEPOUT outline:\n"; + std::cerr << "\tLINE: " << aHeader << "\n"; + return false; + } + } + + if( !GetIDFString( aHeader, token, quoted, idx ) ) + { + ERROR_IDF << "no OWNER; setting to UNOWNED\n"; + owner = UNOWNED; + } + else + { + if( !ParseOwner( token, owner ) ) + { + ERROR_IDF << "invalid OWNER (reverting to UNOWNED): " << token << "\n"; + owner = UNOWNED; + } + } + + // check RECORD 2 + // [layers: TOP, BOTTOM, BOTH, INNER, ALL] + std::string iline; + bool comment = false; + std::streampos pos; + + while( aBoardFile.good() && !FetchIDFLine( aBoardFile, iline, comment, pos ) ); + + if( !aBoardFile.good() ) + { + ERROR_IDF << "bad .ROUTE_OUTLINE/KEEPOUT section (premature end)\n"; + return false; + } + + idx = 0; + if( comment ) + { + ERROR_IDF << "comment within .ROUTE_OUTLINE/KEEPOUT section\n"; + return false; + } + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF << "bad .ROUTE_OUTLINE/KEEPOUT section (no layers specification)\n"; + return false; + } + + if( quoted ) + { + ERROR_IDF << "bad .ROUTE_OUTLINE/KEEPOUT section (layers may not be quoted)\n"; + std::cerr << "\tLINE: " << iline << "\n"; + return false; + } + + if( !ParseIDFLayer( token, layers ) ) + { + ERROR_IDF << "bad .ROUTE_OUTLINE/KEEPOUT section (invalid layer)\n"; + std::cerr << "\tLINE: " << iline << "\n"; + return false; + } + + // read RECORD 3 values + readOutlines( aBoardFile ); + + // check RECORD 4 + while( aBoardFile.good() && !FetchIDFLine( aBoardFile, iline, comment, pos ) ); + + if( ( !aBoardFile.good() && aBoardFile.eof() ) || iline.empty() ) + { + ERROR_IDF << "bad .ROUTE_OUTLINE/KEEPOUT section (premature end)\n"; + return false; + } + + idx = 0; + if( comment ) + { + ERROR_IDF << "comment within .ROUTE_OUTLINE/KEEPOUT section\n"; + return false; + } + + if( outlineType == OTLN_ROUTE ) + { + if( !CompareToken( ".END_ROUTE_OUTLINE", iline ) ) + { + ERROR_IDF << "bad .ROUTE_OUTLINE section (no .END_ROUTE_OUTLINE)\n"; + return false; + } + } + else + { + if( !CompareToken( ".END_ROUTE_KEEPOUT", iline ) ) + { + ERROR_IDF << "bad .ROUTE_KEEPOUT section (no .END_ROUTE_KEEPOUT)\n"; + return false; + } + } + + return true; +} + + +bool ROUTE_OUTLINE::WriteData( std::ofstream& aBoardFile ) +{ + // this section is optional; do not write if not required + if( outlines.empty() ) + return true; + + if( layers == LYR_INVALID ) + { + ERROR_IDF << "layer not specified\n"; + return false; + } + + writeComments( aBoardFile ); + + // write RECORD 1 + if( outlineType == OTLN_ROUTE ) + aBoardFile << ".ROUTE_OUTLINE "; + else + aBoardFile << ".ROUTE_KEEPOUT "; + + writeOwner( aBoardFile ); + + // write RECORD 2 + WriteLayersText( aBoardFile, layers ); + aBoardFile << "\n"; + + // write RECORD 3 + if( !writeOutlines( aBoardFile ) ) + return false; + + // write RECORD 4 + if( outlineType == OTLN_ROUTE ) + aBoardFile << ".END_ROUTE_OUTLINE\n\n"; + else + aBoardFile << ".END_ROUTE_KEEPOUT\n\n"; + + return !aBoardFile.fail(); +} + + +void ROUTE_OUTLINE::Clear( void ) +{ + BOARD_OUTLINE::Clear(); + layers = LYR_INVALID; + return; +} + + +/* + * CLASS: PLACE_OUTLINE + */ +PLACE_OUTLINE::PLACE_OUTLINE() +{ + outlineType = OTLN_PLACE; + single = true; + thickness = 0.0; + side = LYR_INVALID; +} + +void PLACE_OUTLINE::SetSide( IDF3::IDF_LAYER aSide ) +{ + switch( aSide ) + { + case LYR_TOP: + case LYR_BOTTOM: + case LYR_BOTH: + side = aSide; + break; + + default: + // XXX - throw + ERROR_IDF << "invalid layer (" << aSide << "): must be one of TOP/BOTTOM/BOTH\n"; + side = LYR_INVALID; + return; + break; + } + + return; +} + +IDF3::IDF_LAYER PLACE_OUTLINE::GetSide( void ) +{ + return side; +} + +void PLACE_OUTLINE::SetMaxHeight( double aHeight ) +{ + if( aHeight < 0.0 ) + { + ERROR_IDF << "invalid height (must be >= 0.0); default to 0\n"; + thickness = 0.0; + return; + } + + thickness = aHeight; + return; +} + +double PLACE_OUTLINE::GetMaxHeight( void ) +{ + return thickness; +} + +bool PLACE_OUTLINE::ReadData( std::ifstream& aBoardFile, const std::string& aHeader ) +{ + // PLACE_OUTLINE/KEEPOUT + // .PLACE_OUTLINE [OWNER] + // [board side: Top/Bot/Both] [height] + // [outline] + + // check RECORD 1 + std::string token; + bool quoted = false; + int idx = 0; + + if( !GetIDFString( aHeader, token, quoted, idx ) ) + { + ERROR_IDF << "invalid invocation; blank header line\n"; + return false; + } + + if( quoted ) + { + ERROR_IDF << "section names may not be quoted:\n"; + std::cerr << "\tLINE: " << aHeader << "\n"; + return false; + } + + if( outlineType == OTLN_PLACE ) + { + if( !CompareToken( ".PLACE_OUTLINE", token ) ) + { + ERROR_IDF << "not a PLACE outline:\n"; + std::cerr << "\tLINE: " << aHeader << "\n"; + return false; + } + } + else + { + if( !CompareToken( ".PLACE_KEEPOUT", token ) ) + { + ERROR_IDF << "not a PLACE_KEEPOUT outline:\n"; + std::cerr << "\tLINE: " << aHeader << "\n"; + return false; + } + } + + if( !GetIDFString( aHeader, token, quoted, idx ) ) + { + ERROR_IDF << "no OWNER; setting to UNOWNED\n"; + owner = UNOWNED; + } + else + { + if( !ParseOwner( token, owner ) ) + { + ERROR_IDF << "invalid OWNER (reverting to UNOWNED): " << token << "\n"; + owner = UNOWNED; + } + } + + // check RECORD 2 + // [board side: Top/Bot/Both] [height] + std::string iline; + bool comment = false; + std::streampos pos; + + while( aBoardFile.good() && !FetchIDFLine( aBoardFile, iline, comment, pos ) ); + + if( !aBoardFile.good() ) + { + ERROR_IDF << "bad .PLACE_OUTLINE/KEEPOUT section (premature end)\n"; + return false; + } + + idx = 0; + if( comment ) + { + ERROR_IDF << "comment within .PLACE_OUTLINE/KEEPOUT section\n"; + return false; + } + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF << "bad .PLACE_OUTLINE/KEEPOUT section (no board side information)\n"; + return false; + } + + if( !ParseIDFLayer( token, side ) || + ( side != LYR_TOP && side != LYR_BOTTOM && side != LYR_BOTH ) ) + { + ERROR_IDF << "bad .PLACE_OUTLINE/KEEPOUT section (invalid side, must be one of TOP/BOTTOM/BOTH)\n"; + std::cerr << "\tLINE: " << iline << "\n"; + return false; + } + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF << "bad .PLACE_OUTLINE/KEEPOUT section (no height)\n"; + return false; + } + + std::stringstream teststr; + teststr << token; + + teststr >> thickness; + if( teststr.fail() ) + { + ERROR_IDF << "bad .PLACE_OUTLINE/KEEPOUT section (invalid RECORD 2 reading height)\n"; + std::cerr << "\tLINE: " << iline << "\n"; + return false; + } + + if( unit == UNIT_THOU ) + thickness *= IDF_MM_TO_THOU; + + // read RECORD 3 values + readOutlines( aBoardFile ); + + // check RECORD 4 + while( aBoardFile.good() && !FetchIDFLine( aBoardFile, iline, comment, pos ) ); + + if( ( !aBoardFile.good() && aBoardFile.eof() ) || iline.empty() ) + { + ERROR_IDF << "bad .PLACE_OUTLINE/KEEPOUT section (premature end)\n"; + return false; + } + + idx = 0; + if( comment ) + { + ERROR_IDF << "comment within .PLACE_OUTLINE/KEEPOUT section\n"; + return false; + } + + if( outlineType == OTLN_PLACE ) + { + if( !GetIDFString( iline, token, quoted, idx ) + || !CompareToken( ".END_PLACE_OUTLINE", token ) ) + { + ERROR_IDF << "bad .PLACE_OUTLINE section (no .END_PLACE_OUTLINE)\n"; + return false; + } + } + else + { + if( !GetIDFString( iline, token, quoted, idx ) + || !CompareToken( ".END_PLACE_KEEPOUT", token ) ) + { + ERROR_IDF << "bad .PLACE_KEEPOUT section (no .END_PLACE_KEEPOUT)\n"; + return false; + } + } + + return true; +} + +bool PLACE_OUTLINE::WriteData( std::ofstream& aBoardFile ) +{ + // this section is optional; do not write if not required + if( outlines.empty() ) + return true; + + writeComments( aBoardFile ); + + // write RECORD 1 + if( outlineType == OTLN_PLACE ) + aBoardFile << ".PLACE_OUTLINE "; + else + aBoardFile << ".PLACE_KEEPOUT "; + + writeOwner( aBoardFile ); + + // write RECORD 2 + switch( side ) + { + case LYR_TOP: + case LYR_BOTTOM: + case LYR_BOTH: + WriteLayersText( aBoardFile, side ); + break; + + default: + ERROR_IDF << "Invalid PLACE_OUTLINE/KEEPOUT side (" << side << "); must be one of TOP/BOTTOM/BOTH\n"; + return false; + break; + } + + aBoardFile << " "; + + if( unit == UNIT_MM ) + aBoardFile << setiosflags(ios::fixed) << setprecision(5) << thickness << "\n"; + else + aBoardFile << setiosflags(ios::fixed) << setprecision(1) << (thickness / IDF_MM_TO_THOU) << "\n"; + + // write RECORD 3 + if( !writeOutlines( aBoardFile ) ) + return false; + + // write RECORD 4 + if( outlineType == OTLN_PLACE ) + aBoardFile << ".END_PLACE_OUTLINE\n\n"; + else + aBoardFile << ".END_PLACE_KEEPOUT\n\n"; + + return !aBoardFile.fail(); +} + +void PLACE_OUTLINE::Clear( void ) +{ + BOARD_OUTLINE::Clear(); + thickness = 0.0; + side = LYR_INVALID; + return; +} + + +/* + * CLASS: ROUTE_KEEPOUT + */ +ROUTE_KO_OUTLINE::ROUTE_KO_OUTLINE() +{ + outlineType = OTLN_ROUTE_KEEPOUT; + return; +} + + +/* + * CLASS: PLACE_KEEPOUT + */ +PLACE_KO_OUTLINE::PLACE_KO_OUTLINE() +{ + outlineType = OTLN_PLACE_KEEPOUT; + return; +} + + +/* + * CLASS: VIA_KEEPOUT + */ +VIA_KO_OUTLINE::VIA_KO_OUTLINE() +{ + outlineType = OTLN_VIA_KEEPOUT; +} + + +/* + * CLASS: PLACEMENT GROUP (PLACE_REGION) + */ +GROUP_OUTLINE::GROUP_OUTLINE() +{ + outlineType = OTLN_GROUP_PLACE; + thickness = 0.0; + side = LYR_INVALID; + single = true; + return; +} + +void GROUP_OUTLINE::SetSide( IDF3::IDF_LAYER aSide ) +{ + switch( aSide ) + { + case LYR_TOP: + case LYR_BOTTOM: + case LYR_BOTH: + side = aSide; + break; + + default: + // XXX throw + ERROR_IDF << "invalid side (" << aSide << "); must be one of TOP/BOTTOM/BOTH\n"; + return; + break; + } + + return; +} + +IDF3::IDF_LAYER GROUP_OUTLINE::GetSide( void ) +{ + return side; +} + +void GROUP_OUTLINE::SetGroupName( std::string aGroupName ) +{ + groupName = aGroupName; + return; +} + +const std::string& GROUP_OUTLINE::GetGroupName( void ) +{ + return groupName; +} + +bool GROUP_OUTLINE::ReadData( std::ifstream& aBoardFile, const std::string& aHeader ) +{ + // Placement Group + // .PLACE_REGION [OWNER] + // [side: Top/Bot/Both ] [component group name] + // [outline] + + // check RECORD 1 + std::string token; + bool quoted = false; + int idx = 0; + + if( !GetIDFString( aHeader, token, quoted, idx ) ) + { + ERROR_IDF << "invalid invocation; blank header line\n"; + return false; + } + + if( quoted ) + { + ERROR_IDF << "section names may not be quoted:\n"; + std::cerr << "\tLINE: " << aHeader << "\n"; + return false; + } + + if( !CompareToken( ".PLACE_REGION", token ) ) + { + ERROR_IDF << "not a PLACE_REGION outline:\n"; + std::cerr << "\tLINE: " << aHeader << "\n"; + return false; + } + + if( !GetIDFString( aHeader, token, quoted, idx ) ) + { + ERROR_IDF << "no OWNER; setting to UNOWNED\n"; + owner = UNOWNED; + } + else + { + if( !ParseOwner( token, owner ) ) + { + ERROR_IDF << "invalid OWNER (reverting to UNOWNED): " << token << "\n"; + owner = UNOWNED; + } + } + + std::string iline; + bool comment = false; + std::streampos pos; + + // check RECORD 2 + // [side: Top/Bot/Both ] [component group name] + while( aBoardFile.good() && !FetchIDFLine( aBoardFile, iline, comment, pos ) ); + + if( !aBoardFile.good() ) + { + ERROR_IDF << "bad .PLACE_REGION section (premature end)\n"; + return false; + } + + idx = 0; + if( comment ) + { + ERROR_IDF << "comment within .PLACE_REGION section\n"; + return false; + } + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF << "bad .PLACE_REGION section (no board side)\n"; + return false; + } + + if( !ParseIDFLayer( token, side ) || + ( side != LYR_TOP && side != LYR_BOTTOM && side != LYR_BOTH ) ) + { + ERROR_IDF << "bad .PLACE_REGION section (invalid side, must be TOP/BOTTOM/BOTH)\n"; + std::cerr << "\tLINE: " << iline << "\n"; + return false; + } + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF << "bad .PLACE_REGION section (no outline identifier)\n"; + return false; + } + + groupName = token; + + // read RECORD 3 values + readOutlines( aBoardFile ); + + // check RECORD 4 + while( aBoardFile.good() && !FetchIDFLine( aBoardFile, iline, comment, pos ) ); + + if( ( !aBoardFile.good() && aBoardFile.eof() ) || iline.empty() ) + { + ERROR_IDF << "bad .PLACE_REGION section (premature end)\n"; + return false; + } + + idx = 0; + if( comment ) + { + ERROR_IDF << "comment within .PLACE_REGION section\n"; + return false; + } + + if( !GetIDFString( iline, token, quoted, idx ) + || !CompareToken( ".END_PLACE_REGION", token ) ) + { + ERROR_IDF << "bad .PLACE_REGION section (no .END_PLACE_REGION)\n"; + return false; + } + + return true; +} + +bool GROUP_OUTLINE::WriteData( std::ofstream& aBoardFile ) +{ + // this section is optional; do not write if not required + if( outlines.empty() ) + return true; + + writeComments( aBoardFile ); + + // write RECORD 1 + aBoardFile << ".PLACE_REGION "; + + writeOwner( aBoardFile ); + + // write RECORD 2 + switch( side ) + { + case LYR_TOP: + case LYR_BOTTOM: + case LYR_BOTH: + WriteLayersText( aBoardFile, side ); + break; + + default: + ERROR_IDF << "Invalid PLACE_REGION side (must be TOP/BOTTOM/BOTH): " << side << "\n"; + return false; + break; + } + + aBoardFile << " \"" << groupName << "\"\n"; + + // write RECORD 3 + if( !writeOutlines( aBoardFile ) ) + return false; + + // write RECORD 4 + aBoardFile << ".END_PLACE_REGION\n\n"; + + return !aBoardFile.fail(); +} + +void GROUP_OUTLINE::Clear( void ) +{ + BOARD_OUTLINE::Clear(); + thickness = 0.0; + side = LYR_INVALID; + groupName.clear(); + return; +} + +/* + * CLASS: COMPONENT OUTLINE + */ +IDF3_COMP_OUTLINE::IDF3_COMP_OUTLINE() +{ + single = true; + outlineType = OTLN_COMPONENT; + compType = COMP_INVALID; + refNum = 0; + return; +} + +bool IDF3_COMP_OUTLINE::readProperties( std::ifstream& aLibFile ) +{ + bool quoted = false; + bool comment = false; + std::string iline; + std::string token; + std::streampos pos; + std::string pname; // property name + std::string pval; // property value + int idx = 0; + + while( aLibFile.good() ) + { + if( !FetchIDFLine( aLibFile, iline, comment, pos ) ) + continue; + + idx = 0; + if( comment ) + { + ERROR_IDF << "comment within component outline section\n"; + return false; + } + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF << "bad component outline section (no PROP)\n"; + return false; + } + + if( quoted ) + { + ERROR_IDF << "bad component outline section (PROP or .END may not be quoted)\n"; + return false; + } + + if( token.size() >= 5 && CompareToken( ".END_", token.substr( 0, 5 ) ) ) + { + aLibFile.seekg( pos ); + return true; + } + + if( !CompareToken( "PROP", token ) ) + { + ERROR_IDF << "invalid electrical outline; expecting PROP or .END_ELECTRICAL\n"; + std::cerr << "\tLINE: " << iline << "\n"; + return false; + } + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF << "bad component outline section (no prop name)\n"; + return false; + } + + pname = token; + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF << "bad component outline section (no prop value)\n"; + return false; + } + + pval = token; + + if( props.insert( pair< string, string >(pname, pval) ).second == false ) + { + ERROR_IDF << "bad component outline: duplicate property name '" << pname << "'\n"; + return false; + } + } + + return !aLibFile.fail(); +} + +bool IDF3_COMP_OUTLINE::writeProperties( std::ofstream& aLibFile ) +{ + if( props.empty() ) + return true; + std::map< std::string, std::string >::const_iterator itS = props.begin(); + std::map< std::string, std::string >::const_iterator itE = props.end(); + + while( itS != itE ) + { + aLibFile << "PROP " << "\"" << itS->first << "\" \"" + << itS->second << "\"\n"; + ++itS; + } + + return !aLibFile.fail(); +} + +bool IDF3_COMP_OUTLINE::ReadData( std::ifstream& aLibFile, const std::string& aHeader ) +{ + // .ELECTRICAL/.MECHANICAL + // [GEOM] [PART] [UNIT] [HEIGHT] + // [outline] + // [PROP] [prop name] [prop value] + // check RECORD 1 + std::string token; + bool quoted = false; + int idx = 0; + + if( !GetIDFString( aHeader, token, quoted, idx ) ) + { + ERROR_IDF << "invalid invocation; blank header line\n"; + return false; + } + + if( quoted ) + { + ERROR_IDF << "section names may not be quoted:\n"; + std::cerr << "\tLINE: " << aHeader << "\n"; + return false; + } + + if( CompareToken( ".ELECTRICAL", token ) ) + { + compType = COMP_ELEC; + } + else if( CompareToken( ".MECHANICAL", token ) ) + { + compType = COMP_MECH; + } + else + { + ERROR_IDF << "not a component outline:\n"; + std::cerr << "\tLINE: " << aHeader << "\n"; + return false; + } + + // check RECORD 2 + // [GEOM] [PART] [UNIT] [HEIGHT] + std::string iline; + bool comment = false; + std::streampos pos; + + while( aLibFile.good() && !FetchIDFLine( aLibFile, iline, comment, pos ) ); + + if( !aLibFile.good() ) + { + ERROR_IDF << "bad component outline data (premature end)\n"; + return false; + } + + idx = 0; + if( comment ) + { + ERROR_IDF << "comment within a component outline section\n"; + return false; + } + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF << "bad component outline (no GEOMETRY NAME)\n"; + return false; + } + + geometry = token; + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF << "bad component outline (no PART NAME)\n"; + return false; + } + + part = token; + + if( part.empty() && geometry.empty() ) + { + ERROR_IDF << "bad component outline (both GEOMETRY and PART names are empty)\n"; + return false; + } + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF << "bad component outline (no unit type)\n"; + return false; + } + + if( CompareToken( "MM", token ) ) + { + unit = UNIT_MM; + } + else if( CompareToken( "THOU", token ) ) + { + unit = UNIT_THOU; + } + else + { + ERROR_IDF << "bad component outline (invalid unit type)\n"; + std::cerr << "\tLINE: " << iline << "\n"; + return false; + } + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF << "bad component outline (no height)\n"; + return false; + } + + std::istringstream teststr; + teststr.str( token ); + + teststr >> thickness; + if( teststr.fail() ) + { + ERROR_IDF << "bad component outline (invalid height)\n"; + std::cerr << "\tLINE: " << iline << "\n"; + return false; + } + + if( unit == UNIT_THOU ) + thickness *= IDF_MM_TO_THOU; + + // read RECORD 3 values + readOutlines( aLibFile ); + + if( compType == COMP_ELEC ) + { + if( !readProperties( aLibFile ) ) + return false; + } + + // check RECORD 4 + while( aLibFile.good() && !FetchIDFLine( aLibFile, iline, comment, pos ) ); + + if( ( !aLibFile.good() && aLibFile.eof() ) || iline.empty() ) + { + ERROR_IDF << "bad component outline data (premature end)\n"; + return false; + } + + idx = 0; + if( comment ) + { + ERROR_IDF << "comment within component outline section\n"; + return false; + } + + if( compType == COMP_ELEC ) + { + if( !CompareToken( ".END_ELECTRICAL", iline ) ) + { + ERROR_IDF << "bad component outline (no .END_ELECTRICAL)\n"; + return false; + } + } + else + { + if( !CompareToken( ".END_MECHANICAL", iline ) ) + { + ERROR_IDF << "corrupt .MECHANICAL outline\n"; + return false; + } + } + + return true; +} + +bool IDF3_COMP_OUTLINE::WriteData( std::ofstream& aLibFile ) +{ + if( compType != COMP_ELEC && compType != COMP_MECH ) + { + ERROR_IDF << "component type not set or invalid\n"; + return false; + } + + if( refNum == 0 ) + return true; // nothing to do + + writeComments( aLibFile ); + + // note: the outline section is required, even if it is empty + if( compType == COMP_ELEC ) + aLibFile << ".ELECTRICAL\n"; + else + aLibFile << ".MECHANICAL\n"; + + // RECORD 2 + // [GEOM] [PART] [UNIT] [HEIGHT] + aLibFile << "\"" << geometry << "\" \"" << part << "\" "; + + if( unit == UNIT_MM ) + aLibFile << "MM " << setiosflags(ios::fixed) << setprecision(5) << thickness << "\n"; + else + aLibFile << "THOU " << setiosflags(ios::fixed) << setprecision(1) << (thickness / IDF_MM_TO_THOU) << "\n"; + + if( !writeOutlines( aLibFile ) ) + return false; + + if( compType == COMP_ELEC ) + { + writeProperties( aLibFile ); + aLibFile << ".END_ELECTRICAL\n\n"; + } + else + { + aLibFile << ".END_MECHANICAL\n\n"; + } + + return !aLibFile.fail(); +} + +void IDF3_COMP_OUTLINE::Clear( void ) +{ + BOARD_OUTLINE::Clear(); + uid.clear(); + geometry.clear(); + part.clear(); + compType = COMP_INVALID; + refNum = 0; + props.clear(); + return; +} + +void IDF3_COMP_OUTLINE::SetComponentClass( IDF3::COMP_TYPE aCompClass ) +{ + switch( aCompClass ) + { + case COMP_ELEC: + case COMP_MECH: + compType = aCompClass; + break; + + default: + // XXX - throw + ERROR_IDF << "invalid component class (must be ELECTRICAL or MECHANICAL)\n"; + return; + break; + } + + return; +} + +IDF3::COMP_TYPE IDF3_COMP_OUTLINE::GetComponentClass( void ) +{ + return compType; +} + + +void IDF3_COMP_OUTLINE::SetGeomName( const std::string& aGeomName ) +{ + geometry = aGeomName; + uid.clear(); + return; +} + +const std::string& IDF3_COMP_OUTLINE::GetGeomName( void ) +{ + return geometry; +} + +void IDF3_COMP_OUTLINE::SetPartName( const std::string& aPartName ) +{ + part = aPartName; + uid.clear(); + return; +} + +const std::string& IDF3_COMP_OUTLINE::GetPartName( void ) +{ + return part; +} + +const std::string& IDF3_COMP_OUTLINE::GetUID( void ) +{ + if( !uid.empty() ) + return uid; + + if( geometry.empty() && part.empty() ) + return uid; + + uid = geometry + "_" + part; + + return uid; +} + + +int IDF3_COMP_OUTLINE::IncrementRef( void ) +{ + return ++refNum; +} + +int IDF3_COMP_OUTLINE::DecrementRef( void ) +{ + if( refNum == 0 ) + { + ERROR_IDF << "BUG: decrementing refNum beyond 0\n"; + return 0; + } + + --refNum; + return refNum; +} + +bool IDF3_COMP_OUTLINE::CreateDefaultOutline( const std::string &aGeom, const std::string &aPart ) +{ + Clear(); + + if( aGeom.empty() && aPart.empty() ) + { + geometry = "NOGEOM"; + part = "NOPART"; + uid = "NOGEOM_NOPART"; + } + else + { + geometry = aGeom; + part = aPart; + uid = aGeom + "_" + aPart; + } + + compType = COMP_ELEC; + thickness = 5.0; + unit = UNIT_MM; + + // Create a star shape 5mm high with points on 5 and 3 mm circles + double a, da; + da = M_PI / 5.0; + a = da / 2.0; + + IDF_POINT p1, p2; + IDF_OUTLINE* ol = new IDF_OUTLINE; + IDF_SEGMENT* sp; + + p1.x = 1.5 * cos( a ); + p1.y = 1.5 * sin( a ); + + if( ol == NULL ) + return false; + + for( int i = 0; i < 10; ++i ) + { + if( i & 1 ) + { + p2.x = 2.5 * cos( a ); + p2.y = 2.5 * sin( a ); + } + else + { + p2.x = 1.5 * cos( a ); + p2.y = 1.5 * sin( a ); + } + + sp = new IDF_SEGMENT( p1, p2 ); + + if( sp == NULL ) + { + Clear(); + return false; + } + + ol->push( sp ); + a += da; + p1 = p2; + } + + a = da / 2.0; + p2.x = 1.5 * cos( a ); + p2.y = 1.5 * sin( a ); + + sp = new IDF_SEGMENT( p1, p2 ); + + if( sp == NULL ) + { + Clear(); + return false; + } + + ol->push( sp ); + outlines.push_back( ol ); + + return true; +} diff --git a/utils/idftools/idf_outlines.h b/utils/idftools/idf_outlines.h new file mode 100644 index 0000000000..4f360e51e9 --- /dev/null +++ b/utils/idftools/idf_outlines.h @@ -0,0 +1,754 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 Cirilo Bernardo + * + * 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 IDF_OUTLINES_H +#define IDF_OUTLINES_H + +#include +#include +#include +#include +#include + +#include + +/* + * NOTES ON OUTLINE TYPES: + * + * BOARD_OUTLINE (PANEL_OUTLINE) + * .BOARD_OUTLINE [OWNER] + * [thickness] + * [outlines] + * + * OTHER_OUTLINE + * .OTHER_OUTLINE [OWNER] + * [outline identifier] [thickness] [board side: Top/Bot] + * [outline] + * + * ROUTE_OUTLINE + * .ROUTE_OUTLINE [OWNER] + * [layers] + * [outline] + * + * PLACE_OUTLINE + * .PLACE_OUTLINE [OWNER] + * [board side: Top/Bot/Both] [height] + * [outline] + * + * ROUTE_KEEPOUT + * .ROUTE_KEEPOUT [OWNER] + * [layers] + * [outline] + * + * VIA_KEEPOUT + * .VIA_KEEPOUT [OWNER] + * [outline] + * + * PLACE_KEEPOUT + * .PLACE_KEEPOUT [OWNER] + * [board side: Top/Bot/Both] [height] + * [outline] + * + * Placement Group + * .PLACE_REGION [OWNER] + * [side: Top/Bot/Both ] [component group name] + * [outline] + * + * Component Outline: + * .ELECTRICAL/.MECHANICAL + * [GEOM] [PART] [UNIT] [HEIGHT] + * [outline] + * [PROP] [prop name] [prop value] + */ + +class IDF3_BOARD; + + +/** + * Class BOARD_OUTLINE + * supports the IDFv3 BOARD OUTLINE data and is the basis of other IDFv3 outline classes + */ +class BOARD_OUTLINE +{ +protected: + std::list< IDF_OUTLINE* > outlines; + IDF3::KEY_OWNER owner; // indicates the owner of this outline (MCAD, ECAD, UNOWNED) + IDF3::OUTLINE_TYPE outlineType;// type of IDF outline + bool single; // true if only a single outline is accepted + std::list< std::string > comments; // associated comment list + IDF3::IDF_UNIT unit; // outline's native unit (MM or THOU) + IDF3_BOARD* parent; // BOARD which contains this outline + double thickness; // Board/Extrude Thickness or Height (IDF spec) + + // Read outline data from a BOARD or LIBRARY file's outline section + bool readOutlines( std::ifstream& aBoardFile ); + // Write comments to a BOARD or LIBRARY file (must not be within a SECTION as per IDFv3 spec) + bool writeComments( std::ofstream& aBoardFile ); + // Write the outline owner to a BOARD file + bool writeOwner( std::ofstream& aBoardFile ); + // Write the data of a single outline object + bool writeOutline( std::ofstream& aBoardFile, IDF_OUTLINE* aOutline, size_t aIndex ); + // Iterate through the outlines and write out all data + bool writeOutlines( std::ofstream& aBoardFile ); // write outline data (no headers) + +public: + BOARD_OUTLINE(); + virtual ~BOARD_OUTLINE(); + + /** + * Function SetUnit + * sets the native unit of the outline; except for component outlines this must + * be the same as the native unit of the parent IDF_BOARD object + * + * @param aUnit is the native unit (UNIT_MM or UNIT_THOU) + */ + virtual void SetUnit( IDF3::IDF_UNIT aUnit ); + + /** + * Function GetUnit + * returns the native unit type of the outline + * + * @return IDF_UNIT is the native unit (UNIT_MM or UNIT_THOU) + */ + virtual IDF3::IDF_UNIT GetUnit( void ); + + /** + * Function SetThickness + * sets the thickness or height of the outline (mm) + * + * @param aThickness is the thickness or height of the outline in mm + */ + virtual bool SetThickness( double aThickness ); + + /** + * Function GetThickness + * returns the thickness or height of an outline (mm) + */ + virtual double GetThickness( void ); + + /** + * Function ReadData + * reads data from a .BOARD_OUTLINE section + * + * @param aBoardFile is an IDFv3 file opened for reading + * @param aHeader is the ".BOARD_OUTLINE" header line as read by FetchIDFLine + * + * @return bool: true if the BOARD_OUTLINE section was successfully read, otherwise + * false. In case of an unrecoverable error an exception is thrown. On a successful + * return the file pointer will be at the line following .END_BOARD_OUTLINE + */ + virtual bool ReadData( std::ifstream& aBoardFile, const std::string& aHeader ); + + /** + * Function WriteData + * writes the comments and .BOARD_OUTLINE section to an IDFv3 file + * + * @param aBoardFile is an IDFv3 file opened for writing + * + * @return bool: true if the data had been successfully written, otherwise false. + */ + virtual bool WriteData( std::ofstream& aBoardFile ); + + /** + * Function Clear + * frees memory and reinitializes all internal data except for the parent pointer + */ + virtual void Clear( void ); + + /** + * Function GetOutlineType + * returns the type of outline according to the IDFv3 classification + */ + IDF3::OUTLINE_TYPE GetOutlineType( void ); + + /** + * Function SetParent + * sets the parent IDF_BOARD object + */ + void SetParent( IDF3_BOARD* aParent ); + + /** + * Function GetParent + * returns the parent IDF_BOARD object + */ + IDF3_BOARD* GetParent( void ); + + + /** + * Function AddOutline + * adds the specified outline to this object. + * + * @param aOutline is a valid IDF outline + * + * @return bool: true if the outline was added; false if the outline + * already existed. If the outline cannot be added due to a violation + * of the IDF specification (multiple outlines for anything other than + * a BOARD_OUTLINE, or the ownership rules are violated) an exception is + * thrown. + */ + bool AddOutline( IDF_OUTLINE* aOutline ); + + /** + * Function DelOutline( IDF_OUTLINE* aOutline ) + * removes the given outline, subject to IDF ownership rules, + * if it is owned by this object. The outline pointer remains + * valid and it is the user's responsibility to delete the object. + * The first outline in the list will never be deleted unless it + * is the sole remaining outline; this is to ensure that a board + * outline is not removed while the cutouts remain. + * + * @param aOutline is a pointer to the outline to remove from the list + * + * @return bool: true if the outline was found and removed; false if + * the outline was not found. If an ownership violation occurs an + * exception is thrown. + */ + bool DelOutline( IDF_OUTLINE* aOutline ); + + /** + * Function DelOutline( IDF_OUTLINE* aOutline ) + * deletes the outline specified by the given index, subject to + * IDF ownership rules. The outline data is destroyed. + * The first outline in the list will never be deleted unless it + * is the sole remaining outline; this is to ensure that a board + * outline is not removed while the cutouts remain. + * + * @param aIndex is an index to the outline to delete + * + * @return bool: true if the outline was found and deleted; false if + * the outline was not found. If an ownership violation or indexation + * error occurs an exception is thrown. + */ + bool DelOutline( size_t aIndex ); + + /** + * Function GetOutlines + * returns a pointer to the internal outlines list. It is up to the + * user to respect the IDFv3 specification and avoid changes to this + * list which are in violation of the specification. + */ + const std::list< IDF_OUTLINE* >*const GetOutlines( void ); + + /** + * Function OutlinesSize + * returns the number of items in the internal outline list + */ + size_t OutlinesSize( void ); + + /** + * Function GetOutline + * returns a pointer to the outline as specified by aIndex. + * If the index is out of bounds an error is thrown. It is the + * responsibility of the user to observe IDF ownership rules. + */ + IDF_OUTLINE* GetOutline( size_t aIndex ); + + /** + * Function GetOwner + * returns the ownership status of the outline ( ECAD, MCAD, UNOWNED) + */ + IDF3::KEY_OWNER GetOwner( void ); + + /** + * Function SetOwner + * sets the ownership status of the outline subject to IDF + * ownership rules. The return value is true if the ownership + * was changed and false if a specification violation occurred. + */ + bool SetOwner( IDF3::KEY_OWNER aOwner ); + + /** + * Function IsSingle + * return true if this type of outline only supports a single + * outline. All outlines except for BOARD_OUTLINE are single. + */ + bool IsSingle( void ); + + /** + * Function ClearOutlines + * clears internal data except for the parent pointer + */ + void ClearOutlines( void ); + + /** + * Function AddComment + * adds a comment to the outline data; this function is not + * subject to IDF ownership rules. + */ + void AddComment( const std::string& aComment ); + + /** + * Function CommentSize + * returns the number of comments in the internal list + */ + size_t CommentsSize( void ); + + /** + * Function GetComments + * returns a pointer to the internal list of comments + */ + std::list< std::string >* GetComments( void ); + + /** + * Function GetComment + * returns the string representing the indexed comment or + * NULL if the index is out of bounds + */ + const std::string* GetComment( size_t aIndex ); + + /** + * Function DeleteComment + * deletes a comment based on the given index. + * + * @return bool: true if a comment was deleted, false if + * the index is out of bounds. + */ + bool DeleteComment( size_t aIndex ); + + /** + * Function ClearComments + * deletes all comments + */ + void ClearComments( void ); +}; + + +/** + * Class OTHER_OUTLINE + * describes miscellaneous extrusions on the board + */ +class OTHER_OUTLINE : public BOARD_OUTLINE +{ +private: + std::string uniqueID; // Outline Identifier (IDF spec) + IDF3::IDF_LAYER side; // Board Side [TOP/BOTTOM ONLY] (IDF spec) + +public: + OTHER_OUTLINE(); + + /** + * Function SetOutlineIdentifier + * sets the Outline Identifier string of this OTHER_OUTLINE object + * as per IDFv3 spec. + */ + virtual void SetOutlineIdentifier( const std::string aUniqueID ); + + /** + * Function GetOutlineIdentifier + * returns the object's Outline Identifier + */ + virtual const std::string& GetOutlineIdentifier( void ); + + /** + * Function SetSide + * sets the side which this outline is applicable to (TOP, BOTTOM). + * + * @return bool: true if the side was set, false if the side is invalid. + * An exception is thrown if there is a violation of IDF ownership rules. + */ + virtual bool SetSide( IDF3::IDF_LAYER aSide ); + + /** + * Function GetSide + * returns the side which this outline is applicable to + */ + virtual IDF3::IDF_LAYER GetSide( void ); + + /** + * Function ReadData + * reads an OTHER_OUTLINE data from an IDFv3 file. + * + * @param aBoardFile is an IDFv3 file open for reading + * @param aHeader is the .OTHER_OUTLINE header as read via FetchIDFLine + * + * @return bool: true if data was read, otherwise false. If an unrecoverable + * error occurs an exception is thrown. + */ + virtual bool ReadData( std::ifstream& aBoardFile, const std::string& aHeader ); + + /** + * Function WriteData + * writes the OTHER_OUTLINE data to an open IDFv3 file + * + * @param aBoardFile is an IDFv3 file open for writing + * + * @return bool: true if the data was successfully written, otherwise false. + */ + virtual bool WriteData( std::ofstream& aBoardFile ); + + /** + * Function Clear + * deletes internal data except for the parent object + */ + virtual void Clear( void ); +}; + + +/** + * Class ROUTE_OUTLINE + * describes routing areas on the board + */ +class ROUTE_OUTLINE : public BOARD_OUTLINE +{ +protected: + IDF3::IDF_LAYER layers; // Routing layers (IDF spec) + +public: + ROUTE_OUTLINE(); + + /** + * Function SetLayers + * sets the layer or group of layers this outline is applicable to. + * This function is subject to IDF ownership rules. An exception is + * thrown if an invalid layer is provided or an IDF ownership violation + * occurs. + */ + virtual void SetLayers( IDF3::IDF_LAYER aLayer ); + + /** + * Function GetLayers + * returns the layer or group of layers which this outline is applicable to + */ + virtual IDF3::IDF_LAYER GetLayers( void ); + + /** + * Function ReadData + * reads ROUTE_OUTLINE data from an IDFv3 file + * + * @param aBoardFile is an open IDFv3 board file + * @param aHeader is the .ROUTE_OUTLINE header as returned by FetchIDFLine + * + * @return bool: true if data was read, otherwise false. If unrecoverable + * errors occur an exception is thrown. + */ + virtual bool ReadData( std::ifstream& aBoardFile, const std::string& aHeader ); + + /** + * Function WriteData + * writes the ROUTE_OUTLINE data to an open IDFv3 file + */ + virtual bool WriteData( std::ofstream& aBoardFile ); + + /** + * Function Clear + * deletes internal data except for the parent object + */ + virtual void Clear( void ); +}; + +/** + * Class PLACE_OUTLINE + * describes areas on the board for placing components + */ +class PLACE_OUTLINE : public BOARD_OUTLINE +{ +protected: + IDF3::IDF_LAYER side; // Board Side [TOP/BOTTOM/BOTH ONLY] (IDF spec) + double height; // Max Height (IDF spec) + +public: + PLACE_OUTLINE(); + + /** + * Function SetSide + * sets the side (TOP, BOTTOM, BOTH) which this outline applies to, + * subject to IDF ownership rules. An exception is thrown if there is + * an ownership violation or an invalid layer is passed. + */ + virtual void SetSide( IDF3::IDF_LAYER aSide ); + + /** + * Function GetSide + * returns the side which this outline is applicable to + */ + virtual IDF3::IDF_LAYER GetSide( void ); + + /** + * Function SetMaxHeight + * sets the maximum height of a component within this outline, + * subject to IDF ownership rules. An exception is thrown if + * there is an ownership violation or aHeight is negative. + */ + virtual void SetMaxHeight( double aHeight ); + + /** + * Function GetMaxHeight + * returns the maximum allowable height for a component in this region + */ + virtual double GetMaxHeight( void ); + + /** + * Function ReadData + * reads PLACE_OUTLINE data from an open IDFv3 file. + * + * @param aBoardFile is an IDFv3 file opened for reading + * @param aHeader is the .PLACE_OUTLINE header as returned by FetchIDFLine + * + * @return bool: true if data was read, otherwise false. If there are + * unrecoverable errors an exception is thrown. + */ + virtual bool ReadData( std::ifstream& aBoardFile, const std::string& aHeader ); + + /** + * Function WriteData + * writes the PLACE_OUTLINE data to an open IDFv3 file + * + * @param aBoardFile is an IDFv3 file opened for writing + * + * @return bool: true if the data was successfully written, otherwise false + */ + virtual bool WriteData( std::ofstream& aBoardFile ); + + /** + * Function Clear + * deletes all internal data + */ + virtual void Clear( void ); +}; + + +/** + * Class ROUTE_KO_OUTLINE + * describes regions and layers where no electrical routing is permitted + */ +class ROUTE_KO_OUTLINE : public ROUTE_OUTLINE +{ +public: + ROUTE_KO_OUTLINE(); +}; + +/** + * Class VIA_KO_OUTLINE + * describes regions in which vias are prohibited. Note: IDFv3 only considers + * thru-hole vias and makes no statement regarding behavior with blind or buried + * vias. + */ +class VIA_KO_OUTLINE : public OTHER_OUTLINE +{ +public: + VIA_KO_OUTLINE(); +}; + + +/** + * Class PLACE_KO_OUTLINE + * represents regions and layers in which no component may + * be placed or on which a maximum component height is in effect. + */ +class PLACE_KO_OUTLINE : public PLACE_OUTLINE +{ +public: + PLACE_KO_OUTLINE(); +}; + +/** + * Class GROUP_OUTLINE + * represents regions and layers in which user-specified features or components + * may be placed. + */ +class GROUP_OUTLINE : public BOARD_OUTLINE +{ +private: + IDF3::IDF_LAYER side; // Board Side [TOP/BOTTOM/BOTH ONLY] (IDF spec) + std::string groupName; // non-unique string + +public: + GROUP_OUTLINE(); + + /** + * Function SetSide + * sets the side which this outline applies to (TOP, BOTTOM, BOTH), + * subject to IDF ownership rules. If an ownership violation occurs + * or an invalid side is specified, an exception is thrown. + */ + virtual void SetSide( IDF3::IDF_LAYER aSide ); + + /** + * Function GetSide + * returns the side which this outline applies to + */ + virtual IDF3::IDF_LAYER GetSide( void ); + + /** + * Function SetGroupName + * sets the name of the group, subject to IDF ownership rules. + * An empty name or an ownership violation results in a thrown + * exception. + */ + virtual void SetGroupName( std::string aGroupName ); + + /** + * Function GetGroupName + * returns a reference to the (non-unique) group name + */ + virtual const std::string& GetGroupName( void ); + + /** + * Function ReadData + * reads GROUP_OUTLINE data from an open IDFv3 file + * + * @param aBoardFile is an open IDFv3 file + * @param aHeader is the .PLACE_REGION header as returned by FetchIDFLine + * + * @return bool: true if data was read, otherwise false. If an unrecoverable + * error occurs an exception is thrown. + */ + virtual bool ReadData( std::ifstream& aBoardFile, const std::string& aHeader ); + + /** + * Function WriteData + * writes the data to a .PLACE_REGION section of an IDFv3 file + * + * @param aBoardFile is an IDFv3 file open for writing + * + * @return bool: true if the data is successfully written, otherwise false + */ + virtual bool WriteData( std::ofstream& aBoardFile ); + + /** + * Function Clear + * deletes internal data, subject to IDF ownership rules + */ + virtual void Clear( void ); +}; + + +/** + * class IDF3_COMP_OUTLINE + * represents a component's outline as stored in an IDF library file + */ +class IDF3_COMP_OUTLINE : public BOARD_OUTLINE +{ +private: + std::string uid; // unique ID + std::string geometry; // geometry name (IDF) + std::string part; // part name (IDF) + IDF3::COMP_TYPE compType; // component type + int refNum; // number of components referring to this outline + + std::map< std::string, std::string > props; // properties list + + bool readProperties( std::ifstream& aLibFile ); + bool writeProperties( std::ofstream& aLibFile ); + +public: + IDF3_COMP_OUTLINE(); + + /** + * Function ReadData + * reads a component outline from an open IDFv3 file + * + * @param aLibFile is an open IDFv3 Library file + * @param aHeader is the .ELECTRICAL or .MECHANICAL header as returned by FetchIDFLine + * + * @return bool: true if data was read, otherwise false. If unrecoverable errors + * occur, an exception is thrown. + */ + virtual bool ReadData( std::ifstream& aLibFile, const std::string& aHeader ); + + /** + * Function WriteData + * writes comments and component outline data to an IDFv3 Library file + * + * @param aLibFile is an IDFv3 library file open for writing + * + * @return bool: true if the data was successfully written, otherwise false + */ + virtual bool WriteData( std::ofstream& aLibFile ); + + /** + * Function Clear + * deletes internal outline data + */ + virtual void Clear( void ); + + /** + * Function SetComponentClass + * sets the type of component outline (.ELECTRICAL or .MECHANICAL) + * If the specified class is invalid an exception is thrown. + */ + void SetComponentClass( IDF3::COMP_TYPE aCompClass ); + + /** + * Function GetComponentClass + * returns the class of component represented by this outline + */ + IDF3::COMP_TYPE GetComponentClass( void ); + + /** + * Function SetGeomName + * sets the Geometry Name (Package Name, IDFv3 spec) of the component outline + */ + void SetGeomName( const std::string& aGeomName ); + + /** + * Function GetGeomName + * returns the Geometry Name (Package Name) of the component outline + */ + const std::string& GetGeomName( void ); + + /** + * Function SetPartName + * sets the Part Name (Part Number, IDFv3 spec) of the component outline + */ + void SetPartName( const std::string& aPartName ); + + /** + * Function GetPartName + * returns the Part Name (Part Number) of the component outline + */ + const std::string& GetPartName( void ); + + /** + * Function GetUID + * returns the unique identifier for this component outline; + * this is equal to GEOM_NAME + "_" + PART_NAME + */ + const std::string& GetUID( void ); + + /** + * Function IncrementRef + * increments the internal reference counter to keep track of the number of + * components referring to this outline. + */ + int IncrementRef( void ); + + /** + * Function DecrementRef + * decrements the internal reference counter to keep track of the number of + * components referring to this outline. + */ + int DecrementRef( void ); + + /** + * Function CreateDefaultOutline + * creates a default outline with the given Geometry and Part names. + * This outline is a star with outer radius 5mm and inner radius 2.5mm. + */ + bool CreateDefaultOutline( const std::string &aGeom, const std::string &aPart ); + + // XXX: property manipulators +}; + +#endif // IDF_OUTLINES_H \ No newline at end of file diff --git a/utils/idftools/idf_parser.cpp b/utils/idftools/idf_parser.cpp new file mode 100644 index 0000000000..8582cc0321 --- /dev/null +++ b/utils/idftools/idf_parser.cpp @@ -0,0 +1,3819 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 Cirilo Bernardo + * + * 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 +#include +#include +#include +#include +#include + +#include +#include + +using namespace std; +using namespace IDF3; + +/* + * CLASS: IDF3_COMP_OUTLINE_DATA + * This represents the outline placement + * information and other data specific to + * each component instance. + */ +IDF3_COMP_OUTLINE_DATA::IDF3_COMP_OUTLINE_DATA() +{ + parent = NULL; + outline = NULL; + xoff = 0.0; + yoff = 0.0; + zoff = 0.0; + aoff = 0.0; + + return; +} + +IDF3_COMP_OUTLINE_DATA::IDF3_COMP_OUTLINE_DATA( IDF3_COMPONENT* aParent, + IDF3_COMP_OUTLINE* aOutline ) +{ + parent = aParent; + outline = aOutline; + xoff = 0.0; + yoff = 0.0; + zoff = 0.0; + aoff = 0.0; + + if( aOutline ) + aOutline->IncrementRef(); + + return; +} + +IDF3_COMP_OUTLINE_DATA::IDF3_COMP_OUTLINE_DATA( IDF3_COMPONENT* aParent, + IDF3_COMP_OUTLINE* aOutline, + double aXoff, double aYoff, + double aZoff, double aAngleOff ) +{ + parent = aParent; + outline = aOutline; + xoff = aXoff; + yoff = aYoff; + zoff = aZoff; + aoff = aAngleOff; + return; +} + +IDF3_COMP_OUTLINE_DATA::~IDF3_COMP_OUTLINE_DATA() +{ + if( outline ) + outline->DecrementRef(); + + return; +} + +void IDF3_COMP_OUTLINE_DATA::SetOffsets( double aXoff, double aYoff, + double aZoff, double aAngleOff ) +{ + xoff = aXoff; + yoff = aYoff; + zoff = aZoff; + aoff = aAngleOff; + return; +} + +void IDF3_COMP_OUTLINE_DATA::GetOffsets( double& aXoff, double& aYoff, + double& aZoff, double& aAngleOff ) +{ + aXoff = xoff; + aYoff = yoff; + aZoff = zoff; + aAngleOff = aoff; + return; +} + + +void IDF3_COMP_OUTLINE_DATA::SetParent( IDF3_COMPONENT* aParent ) +{ + parent = aParent; +} + +void IDF3_COMP_OUTLINE_DATA::SetOutline( IDF3_COMP_OUTLINE* aOutline ) +{ + if( outline ) + outline->DecrementRef(); + + outline = aOutline; + + if( outline ) + outline->IncrementRef(); + + return; +} + +bool IDF3_COMP_OUTLINE_DATA::ReadPlaceData( std::ifstream &aBoardFile, + IDF3::FILE_STATE& aBoardState, IDF3_BOARD *aBoard ) +{ + if( !aBoard ) + { + ERROR_IDF; + cerr << "BUG: invoked with no reference to the parent IDF_BOARD\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + // clear out data possibly left over from previous use of the object + outline = NULL; + parent = NULL; + + std::string iline; // the input line + bool isComment; // true if a line just read in is a comment line + std::streampos pos; + int idx = 0; + bool quoted = false; + std::string token; + std::string uid; + std::string refdes; + IDF3::IDF_PLACEMENT placement = IDF3::PS_UNPLACED; + IDF3::IDF_LAYER side = IDF3::LYR_TOP; + + // RECORD 2: 'package name', 'part number', 'Refdes' (any, NOREFDES, BOARD) + while( !FetchIDFLine( aBoardFile, iline, isComment, pos ) && aBoardFile.good() ); + + if( ( !aBoardFile.good() && !aBoardFile.eof() ) || iline.empty() ) + { + ERROR_IDF; + cerr << "problems reading PLACEMENT SECTION\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( isComment ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: comment within a section (PLACEMENT)\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + idx = 0; + GetIDFString( iline, token, quoted, idx ); + + if( !quoted && CompareToken( ".END_PLACEMENT", token ) ) + { + errno = 0; + aBoardState = IDF3::FILE_PLACEMENT; + return false; + } + + std::string ngeom = token; + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: no PART NAME in PLACEMENT RECORD2\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + std::string npart = token; + uid = ngeom + "_" + npart; + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: no REFDES in PLACEMENT RECORD2\n"; + cerr << "* Line: '" << iline << "'\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( CompareToken( "NOREFDES", token ) ) + { + // according to the IDF3.0 specification, this is a + // mechanical component. The specification is defective + // since it is impossible to associate mechanical + // components with their holes unless the mechanical + // component is given a unique RefDes. This class of defect + // is one reason IDF does not work well in faithfully + // conveying information between ECAD and MCAD. + refdes = token; + } + else if( CompareToken( "BOARD", token ) ) + { + ERROR_IDF; + cerr << "unsupported feature\n"; + cerr << "* RefDes is 'BOARD', indicating this is a PANEL FILE (not supported)\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + else if( CompareToken( "PANEL", token ) ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: RefDes in PLACEMENT RECORD2 is 'PANEL'\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + else if( token.empty() ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: empty RefDes string in PLACEMENT RECORD2\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + else + { + // note: perversely, spaces can be a valid RefDes + refdes = token; + } + + // RECORD 3: X, Y, Z, ROT, SIDE (top/bot), PLACEMENT (placed, unplaced, mcad, ecad) + while( !FetchIDFLine( aBoardFile, iline, isComment, pos ) && aBoardFile.good() ); + + if( !aBoardFile.good() ) + { + ERROR_IDF; + cerr << "problems reading PLACEMENT SECTION, RECORD 3\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( isComment ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: comment within a section (PLACEMENT)\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + idx = 0; + GetIDFString( iline, token, quoted, idx ); + + if( quoted ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: X value must not be in quotes (PLACEMENT RECORD 3)\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + istringstream istr; + istr.str( token ); + + istr >> xoff; + if( istr.fail() ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: X value is not numeric (PLACEMENT RECORD 3)\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: no Y value in PLACEMENT RECORD 3\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + istr.clear(); + istr.str( token ); + + istr >> yoff; + if( istr.fail() ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: Y value is not numeric (PLACEMENT RECORD 3)\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: no Z value in PLACEMENT RECORD 3\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + istr.clear(); + istr.str( token ); + + istr >> zoff; + if( istr.fail() ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: Z value is not numeric (PLACEMENT RECORD 3)\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: no rotation value in PLACEMENT RECORD 3\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + istr.clear(); + istr.str( token ); + + istr >> aoff; + if( istr.fail() ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: rotation value is not numeric (PLACEMENT RECORD 3)\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: no SIDE value in PLACEMENT RECORD 3\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( CompareToken( "TOP", token ) ) + { + side = IDF3::LYR_TOP; + } + else if( CompareToken( "BOTTOM", token ) ) + { + side = IDF3::LYR_BOTTOM; + } + else + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: SIDE value in PLACEMENT RECORD 3 is invalid ('"; + cerr << token << "')\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: no PLACEMENT value in PLACEMENT RECORD 3\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( CompareToken( "PLACED", token ) ) + { + placement = IDF3::PS_PLACED; + } + else if( CompareToken( "UNPLACED", token ) ) + { + placement = IDF3::PS_UNPLACED; + } + else if( CompareToken( "MCAD", token ) ) + { + placement = IDF3::PS_MCAD; + } + else if( CompareToken( "ECAD", token ) ) + { + placement = IDF3::PS_ECAD; + } + else + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: PLACEMENT value in PLACEMENT RECORD 3 is invalid ('"; + cerr << token << "')\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + outline = aBoard->GetComponentOutline( uid ); + + if( outline == NULL ) + { + ERROR_IDF << "MISSING OUTLINE\n"; + cerr << "* GeomName( " << ngeom << " ), PartName( " << npart << " )\n"; + cerr << "* Substituting default outline.\n"; + outline = aBoard->GetInvalidOutline( ngeom, npart ); + + if( outline == NULL ) + { + ERROR_IDF << "cannot create outline object\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + } + + if( aBoard->GetUnit() == IDF3::UNIT_THOU ) + { + xoff *= IDF_MM_TO_THOU; + yoff *= IDF_MM_TO_THOU; + zoff *= IDF_MM_TO_THOU; + } + + parent = aBoard->FindComponent( refdes ); + + if( parent == NULL ) + { + IDF3_COMPONENT* cp = new IDF3_COMPONENT( aBoard ); + + if( cp == NULL ) + { + ERROR_IDF << "cannot create component object\n"; + aBoardState = IDF3::FILE_INVALID; + outline = NULL; + return false; + } + + cp->SetRefDes( refdes ); + cp->SetPosition( xoff, yoff, aoff, side ); + cp->SetPlacement( placement ); + + xoff = 0; + yoff = 0; + aoff = 0; + + aBoard->AddComponent( cp ); + + parent = cp; + } + else + { + double tX, tY, tA; + IDF3::IDF_LAYER tL; + + if( parent->GetPosition( tX, tY, tA, tL ) ) + { + if( side != tL ) + { + ERROR_IDF << "inconsistent PLACEMENT data\n"; + cerr << "* SIDE value has changed from " << GetLayerString( tL ); + cerr << " to " << GetLayerString( side ) << "\n"; + aBoardState = IDF3::FILE_INVALID; + outline = NULL; + return false; + } + + xoff -= tX; + yoff -= tY; + aoff -= tA; + } + else + { + parent->SetPosition( xoff, yoff, aoff, side ); + parent->SetPlacement( placement ); + + xoff = 0; + yoff = 0; + aoff = 0; + } + + if( placement != parent->GetPlacement() ) + { + ERROR_IDF << "inconsistent PLACEMENT data\n"; + cerr << "* placement value has changed from " << GetPlacementString( parent->GetPlacement() ); + cerr << " to " << GetPlacementString( placement ) << "\n"; + cerr << "* line: '" << iline << "'\n"; + aBoardState = IDF3::FILE_INVALID; + outline = NULL; + return false; + } + + } + + // copy internal data to a new object and push it into the component's outline list + IDF3_COMP_OUTLINE_DATA* cdp = new IDF3_COMP_OUTLINE_DATA; + *cdp = *this; + outline->IncrementRef(); + outline = NULL; + + if( !parent->AddOutlineData( cdp ) ) + { + ERROR_IDF << "could not add outline data object\n"; + aBoardState = IDF3::FILE_INVALID; + delete cdp; + return false; + } + + return true; +} + +bool IDF3_COMP_OUTLINE_DATA::WritePlaceData( std::ofstream& aBoardFile, + double aXpos, double aYpos, double aAngle, + const std::string aRefDes, + IDF3::IDF_PLACEMENT aPlacement, + IDF3::IDF_LAYER aSide ) +{ + if( outline == NULL ) + return true; + + if( outline->GetUID().empty() ) + { + ERROR_IDF << "invalid GEOM/PART names\n"; + return false; + } + + if( aPlacement == PS_INVALID ) + { + ERROR_IDF << "placement invalid; defaulting to PLACED\n"; + aPlacement = PS_PLACED; + } + + if( aSide != LYR_TOP && aSide != LYR_BOTTOM ) + { + ERROR_IDF << "invalid side (" << aSide << "); must be TOP or BOTTOM\n"; + return false; + } + + // calculate the final position based on layer + double xpos, ypos, ang; + + switch( aSide ) + { + case LYR_TOP: + xpos = aXpos + xoff; + ypos = aYpos + yoff; + ang = aAngle + aoff; + break; + + default: + xpos = aXpos - xoff; + ypos = aYpos + yoff; + ang = aAngle - aoff; + break; + } + + std::string arefdes = aRefDes; + + if( arefdes.empty() || !arefdes.compare( "~" ) + || ( arefdes.size() >= 8 && CompareToken( "NOREFDES", arefdes.substr(0, 8) ) ) ) + arefdes = "NOREFDES"; + + aBoardFile << "\"" << outline->GetGeomName() << "\" \"" << outline->GetPartName() << "\" " + << arefdes << "\n"; + + IDF3::IDF_UNIT unit = UNIT_MM; + + if( parent ) + unit = parent->GetUnit(); + + if( unit == UNIT_MM ) + { + aBoardFile << setiosflags(ios::fixed) << setprecision(5) << xpos << " " + << ypos << " " << setprecision(3) << zoff << " " + << ang << " "; + } + else + { + aBoardFile << setiosflags(ios::fixed) << setprecision(1) << (xpos / IDF_MM_TO_THOU) << " " + << (ypos / IDF_MM_TO_THOU) << " " << (zoff / IDF_MM_TO_THOU) << " " + << setprecision(3) << ang << " "; + } + + WriteLayersText( aBoardFile, aSide ); + + switch( aPlacement ) + { + case PS_PLACED: + aBoardFile << " PLACED\n"; + break; + + case PS_UNPLACED: + aBoardFile << " UNPLACED\n"; + break; + + case PS_MCAD: + aBoardFile << " MCAD\n"; + break; + + default: + aBoardFile << " ECAD\n"; + break; + } + + return !aBoardFile.fail(); +} + + +/* + * CLASS: IDF3_COMPONENT + * + * This represents a component and its associated + * IDF outlines and ancillary data (position, etc) + */ +IDF3_COMPONENT::IDF3_COMPONENT() +{ + xpos = 0.0; + ypos = 0.0; + angle = 0.0; + parent = NULL; + + hasPosition = false; + placement = PS_INVALID; + layer = LYR_INVALID; + return; +} + +IDF3_COMPONENT::IDF3_COMPONENT( IDF3_BOARD* aParent ) +{ + xpos = 0.0; + ypos = 0.0; + angle = 0.0; + + hasPosition = false; + placement = PS_INVALID; + layer = LYR_INVALID; + + parent = aParent; + return; +} + +IDF3_COMPONENT::~IDF3_COMPONENT() +{ + std::list< IDF3_COMP_OUTLINE_DATA* >::iterator itcS = components.begin(); + std::list< IDF3_COMP_OUTLINE_DATA* >::iterator itcE = components.end(); + + while( itcS != itcE ) + { + delete *itcS; + ++itcS; + } + + components.clear(); + + std::list< IDF_DRILL_DATA* >::iterator itdS = drills.begin(); + std::list< IDF_DRILL_DATA* >::iterator itdE = drills.end(); + + while( itdS != itdE ) + { + delete *itdS; + ++itdS; + } + + drills.clear(); + + return; +} + +void IDF3_COMPONENT::SetParent( IDF3_BOARD* aParent ) +{ + parent = aParent; + return; +} + +IDF3::CAD_TYPE IDF3_COMPONENT::GetCadType( void ) +{ + if( parent ) + return parent->GetCadType(); + + return CAD_INVALID; +} + +IDF3::IDF_UNIT IDF3_COMPONENT::GetUnit( void ) +{ + if( parent ) + return parent->GetUnit(); + + return UNIT_INVALID; +} + + +bool IDF3_COMPONENT::SetRefDes( const std::string& aRefDes ) +{ + if( aRefDes.empty() ) + { + ERROR_IDF << "invalid RefDes (empty)\n"; + return false; + } + + if( CompareToken( "PANEL", aRefDes ) ) + { + ERROR_IDF; + cerr << "\n*BUG: PANEL is a reserved designator and may not be used by components\n"; + return false; + } + + refdes = aRefDes; + return true; +} + +const std::string& IDF3_COMPONENT::GetRefDes( void ) +{ + return refdes; +} + +IDF_DRILL_DATA* IDF3_COMPONENT::AddDrill( double aDia, double aXpos, double aYpos, + IDF3::KEY_PLATING aPlating, + const std::string aHoleType, + IDF3::KEY_OWNER aOwner ) +{ + IDF_DRILL_DATA* dp = new IDF_DRILL_DATA( aDia, aXpos, aYpos, aPlating, + refdes, aHoleType, aOwner ); + + if( dp == NULL ) + return NULL; + + drills.push_back( dp ); + + return dp; +} + +IDF_DRILL_DATA* IDF3_COMPONENT::AddDrill( IDF_DRILL_DATA* aDrilledHole ) +{ + if( !aDrilledHole ) + return NULL; + + if( CompareToken( "PANEL", refdes ) ) + { + ERROR_IDF; + cerr << "\n*BUG: PANEL drills not supported\n"; + return NULL; + } + + if( refdes.compare( aDrilledHole->GetDrillRefDes() ) ) + { + ERROR_IDF; + cerr << "\n*BUG: pushing an incorrect REFDES ('" << aDrilledHole->GetDrillRefDes(); + cerr << "') to component ('" << refdes << "')\n"; + return NULL; + } + + drills.push_back( aDrilledHole ); + + return aDrilledHole; +} + + +bool IDF3_COMPONENT::DelDrill( double aDia, double aXpos, double aYpos ) +{ + if( drills.empty() ) + return false; + + // XXX - throw on ownership violation + + bool val = false; + + list< IDF_DRILL_DATA* >::iterator itS = drills.begin(); + list< IDF_DRILL_DATA* >::iterator itE = drills.end(); + + while( !drills.empty() && itS != itE ) + { + if( (*itS)->Matches( aDia, aXpos, aYpos ) ) + { + val = true; + delete *itS; + drills.erase( itS ); + itS = drills.begin(); + itE = drills.end(); + continue; + } + ++itS; + } + + return val; +} + +bool IDF3_COMPONENT::DelDrill( IDF_DRILL_DATA* aDrill ) +{ + if( drills.empty() ) + return false; + + // XXX - throw on ownership violation + + list< IDF_DRILL_DATA* >::iterator itS = drills.begin(); + list< IDF_DRILL_DATA* >::iterator itE = drills.end(); + + while( !drills.empty() && itS != itE ) + { + if( *itS == aDrill ) + { + delete *itS; + drills.erase( itS ); + return true; + } + ++itS; + } + + return false; +} + +const std::list< IDF_DRILL_DATA* >*const IDF3_COMPONENT::GetDrills( void ) +{ + return &drills; +} + +bool IDF3_COMPONENT::AddOutlineData( IDF3_COMP_OUTLINE_DATA* aComponentOutline ) +{ + if( aComponentOutline == NULL ) + return false; + + components.push_back( aComponentOutline ); + + return true; +} + +bool IDF3_COMPONENT::DeleteOutlineData( IDF3_COMP_OUTLINE_DATA* aComponentOutline ) +{ + if( components.empty() || aComponentOutline == NULL ) + return false; + + std::list< IDF3_COMP_OUTLINE_DATA* >::iterator itS = components.begin(); + std::list< IDF3_COMP_OUTLINE_DATA* >::iterator itE = components.end(); + + while( itS != itE ) + { + if( *itS == aComponentOutline ) + { + delete *itS; + components.erase( itS ); + return true; + } + + ++itS; + } + + return false; +} + +bool IDF3_COMPONENT::DeleteOutlineData( size_t aIndex ) +{ + if( aIndex >= components.size() ) + return false; + + std::list< IDF3_COMP_OUTLINE_DATA* >::iterator itS = components.begin(); + std::list< IDF3_COMP_OUTLINE_DATA* >::iterator itE = components.end(); + size_t idx = 0; + + while( itS != itE ) + { + if( idx == aIndex ) + { + delete *itS; + components.erase( itS ); + return true; + } + + ++idx; + ++itS; + } + + return false; +} + +size_t IDF3_COMPONENT::GetOutlinesSize( void ) +{ + return components.size(); +} + +const std::list< IDF3_COMP_OUTLINE_DATA* >*const IDF3_COMPONENT::GetOutlinesData( void ) +{ + return &components; +} + +bool IDF3_COMPONENT::GetPosition( double& aXpos, double& aYpos, double& aAngle, + IDF3::IDF_LAYER& aLayer ) +{ + if( !hasPosition ) + { + aXpos = 0.0; + aYpos = 0.0; + aAngle = 0.0; + aLayer = IDF3::LYR_INVALID; + return false; + } + + aXpos = xpos; + aYpos = ypos; + aAngle = angle; + aLayer = layer; + return true; +} + +bool IDF3_COMPONENT::SetPosition( double aXpos, double aYpos, double aAngle, IDF3::IDF_LAYER aLayer ) +{ + switch( aLayer ) + { + case LYR_TOP: + case LYR_BOTTOM: + break; + + default: + ERROR_IDF << "invalid side (must be TOP or BOTTOM only): " << aLayer << "\n"; + return false; + break; + } + + if( hasPosition ) + return false; + + hasPosition = true; + xpos = aXpos; + ypos = aYpos; + angle = aAngle; + layer = aLayer; + return true; +} + + +IDF3::IDF_PLACEMENT IDF3_COMPONENT::GetPlacement( void ) +{ + return placement; +} + + +void IDF3_COMPONENT::SetPlacement( IDF3::IDF_PLACEMENT aPlacementValue ) +{ + // XXX - throw on ownership violation or invalid placement value + if( aPlacementValue < PS_UNPLACED || aPlacementValue >= PS_INVALID ) + return; + + placement = aPlacementValue; + return; +} + +bool IDF3_COMPONENT::WriteDrillData( std::ofstream& aBoardFile ) +{ + if( drills.empty() ) + return true; + + std::list< IDF_DRILL_DATA* >::iterator itS = drills.begin(); + std::list< IDF_DRILL_DATA* >::iterator itE = drills.end(); + + while( itS != itE ) + { + if( !(*itS)->Write( aBoardFile, GetUnit() ) ) + return false; + + ++itS; + } + + return true; +} + +bool IDF3_COMPONENT::WritePlaceData( std::ofstream& aBoardFile ) +{ + if( components.empty() ) + return true; + + std::list< IDF3_COMP_OUTLINE_DATA* >::iterator itS = components.begin(); + std::list< IDF3_COMP_OUTLINE_DATA* >::iterator itE = components.end(); + + while( itS != itE ) + { + if( !(*itS)->WritePlaceData( aBoardFile, xpos, ypos, angle, refdes, placement, layer ) ) + return false; + + ++itS; + } + + return true; +} + + +IDF3_BOARD::IDF3_BOARD( IDF3::CAD_TYPE aCadType ) +{ + state = FILE_START; + cadType = aCadType; + userPrec = 5; + userScale = 1.0; + userXoff = 0.0; + userYoff = 0.0; + brdFileVersion = 0; + libFileVersion = 0; + + // unlike other outlines which are created as necessary, + // the board outline always exists and its parent must + // be set here + olnBoard.SetParent( this ); + olnBoard.SetThickness( 1.6 ); + + return; +} + +IDF3_BOARD::~IDF3_BOARD() +{ + Clear(); + + return; +} + +IDF3::CAD_TYPE IDF3_BOARD::GetCadType( void ) +{ + return cadType; +} + +void IDF3_BOARD::SetBoardName( std::string aBoardName ) +{ + boardName = aBoardName; + return; +} + +const std::string& IDF3_BOARD::GetBoardName( void ) +{ + return boardName; +} + +bool IDF3_BOARD::setUnit( IDF3::IDF_UNIT aUnit, bool convert ) +{ + switch( aUnit ) + { + case UNIT_MM: + case UNIT_THOU: + unit = aUnit; + break; + + default: + ERROR_IDF << "invalid board unit\n"; + return false; + break; + } + + // iterate through all owned OUTLINE objects (except IDF3_COMP_OUTLINE) + // and set to the same unit + + olnBoard.SetUnit( aUnit ); + + do + { + std::map< std::string, OTHER_OUTLINE*>::iterator its = olnOther.begin(); + std::map< std::string, OTHER_OUTLINE*>::iterator ite = olnOther.end(); + + while( its != ite ) + { + its->second->SetUnit( aUnit ); + ++its; + } + + } while( 0 ); + + do + { + std::list::iterator its = olnRoute.begin(); + std::list::iterator ite = olnRoute.end(); + + while( its != ite ) + { + (*its)->SetUnit( aUnit ); + ++its; + } + + } while( 0 ); + + do + { + std::list::iterator its = olnPlace.begin(); + std::list::iterator ite = olnPlace.end(); + + while( its != ite ) + { + (*its)->SetUnit( aUnit ); + ++its; + } + + } while( 0 ); + + do + { + std::list::iterator its = olnRouteKeepout.begin(); + std::list::iterator ite = olnRouteKeepout.end(); + + while( its != ite ) + { + (*its)->SetUnit( aUnit ); + ++its; + } + + } while( 0 ); + + do + { + std::list::iterator its = olnViaKeepout.begin(); + std::list::iterator ite = olnViaKeepout.end(); + + while( its != ite ) + { + (*its)->SetUnit( aUnit ); + ++its; + } + + } while( 0 ); + + do + { + std::list::iterator its = olnPlaceKeepout.begin(); + std::list::iterator ite = olnPlaceKeepout.end(); + + while( its != ite ) + { + (*its)->SetUnit( aUnit ); + ++its; + } + + } while( 0 ); + + do + { + std::map::iterator its = olnGroup.begin(); + std::map::iterator ite = olnGroup.end(); + + while( its != ite ) + { + its->second->SetUnit( aUnit ); + ++its; + } + + } while( 0 ); + + //iterate through all owned IDF3_COMP_OUTLINE objects and + // set to the same unit IF convert = true + if( convert ) + { + std::map::iterator its = compOutlines.begin(); + std::map::iterator ite = compOutlines.end(); + + while( its != ite ) + { + its->second->SetUnit( aUnit ); + ++its; + } + + } + + return true; +} + + +IDF3::IDF_UNIT IDF3_BOARD::GetUnit( void ) +{ + return unit; +} + + +bool IDF3_BOARD::SetBoardThickness( double aBoardThickness ) +{ + if( aBoardThickness <= 0.0 ) + { + ERROR_IDF << "board thickness must be > 0\n"; + return false; + } + + return olnBoard.SetThickness( aBoardThickness ); +} + + +double IDF3_BOARD::GetBoardThickness( void ) +{ + return olnBoard.GetThickness(); +} + + +// read the DRILLED HOLES section +bool IDF3_BOARD::readBrdDrills( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBoardState ) +{ + IDF_DRILL_DATA drill; + + while( drill.Read( aBoardFile, unit, aBoardState ) ) + { + if( CompareToken( "PANEL", drill.GetDrillRefDes() ) ) + { + ERROR_IDF; + cerr << "\n[INFO]: Dropping unsupported drill refdes: 'PANEL' (not supported)\n"; + continue; + } + + IDF_DRILL_DATA *dp = new IDF_DRILL_DATA; + *dp = drill; + if( AddDrill( dp ) == NULL ) + { + delete dp; + ERROR_IDF; + cerr << "\n* BUG: could not add drill data; cannot continue reading the file\n"; + aBoardState = FILE_INVALID; + return false; + } + } + + if( errno == 0 && aBoardState != IDF3::FILE_INVALID ) + return true; + + return false; + +} + + +// read the NOTES section +bool IDF3_BOARD::readBrdNotes( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBoardState ) +{ + IDF_NOTE note; + + while( note.ReadNote( aBoardFile, aBoardState, unit ) ) + { + IDF_NOTE *np = new IDF_NOTE; + *np = note; + notes.push_back( np ); + } + + if( errno == 0 && aBoardState != IDF3::FILE_INVALID ) + return true; + + return false; +} + + +// read the component placement section +bool IDF3_BOARD::readBrdPlacement( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBoardState ) +{ + IDF3_COMP_OUTLINE_DATA oldata; + + while( oldata.ReadPlaceData( aBoardFile, aBoardState, this ) ); + + if( errno == 0 && aBoardState != IDF3::FILE_INVALID ) + return true; + + ERROR_IDF << "problems reading board PLACEMENT section\n"; + + return false; + +} + + +// read the board HEADER +bool IDF3_BOARD::readBrdHeader( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBoardState ) +{ + std::string iline; // the input line + bool isComment; // true if a line just read in is a comment line + std::streampos pos; + int idx = 0; + bool quoted = false; + std::string token; + + // RECORD 1: ".HEADER" must be the very first line + while( !FetchIDFLine( aBoardFile, iline, isComment, pos ) && aBoardFile.good() ); + + if( !aBoardFile.good() ) + { + ERROR_IDF; + cerr << "problems reading board header\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( isComment ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: first line must be .HEADER\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( !CompareToken( ".HEADER", iline ) ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: first line must be .HEADER and have no quotes or trailing text\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + // RECORD 2: + // File Type [str]: BOARD_FILE (PANEL_FILE not supported) + // IDF Version Number [float]: must be 3.0 + // Source System [str]: ignored + // Date [str]: ignored + // Board File Version [int]: ignored + while( !FetchIDFLine( aBoardFile, iline, isComment, pos ) && aBoardFile.good() ); + + if( !aBoardFile.good() ) + { + ERROR_IDF; + cerr << "problems reading board header, RECORD 2\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( isComment ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: comment within .HEADER section\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + idx = 0; + GetIDFString( iline, token, quoted, idx ); + + if( quoted ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: File Type in HEADER section must not be in quotes\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( !CompareToken( "BOARD_FILE", token ) ) + { + ERROR_IDF; + + if( CompareToken( "PANEL_FILE", token ) ) + { + cerr << "not a board file\n"; + cerr << "* PANEL_FILE is not supported (expecting BOARD_FILE)\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + else + { + cerr << "invalid IDFv3 file\n"; + cerr << "* Expecting string: BOARD_FILE\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + } + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification for HEADER section, RECORD 2: no FIELD 2\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( quoted ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: IDF Version must not be in quotes\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( token.compare( "3.0" ) && token.compare( "3." ) && token.compare( "3" ) ) + { + ERROR_IDF; + cerr << "unsupported IDF version\n"; + cerr << "* Expecting version to be one of '3.0', '3.', or '3' (value: '" << token << "')\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification for HEADER section, RECORD 2, FIELD 3: no Source System string\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + brdSource = token; + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification for HEADER section, RECORD 2, FIELD 4: no Date string\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + brdDate = token; + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification for HEADER section, RECORD 2, FIELD 5: no Board File Version number\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + std::istringstream istr; + istr.str( token ); + + istr >> brdFileVersion; + + if( istr.fail() ) + { + ERROR_IDF << "invalid Board File Version in header\n"; + cerr << "* Setting default version of 1\n"; + brdFileVersion = 1; + } + + if( quoted ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: HEADER section, RECORD 2, FIELD 5: Board File Version must not be in quotes\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + // RECORD 3: + // Board Name [str]: stored + // Units [str]: MM or THOU + while( !FetchIDFLine( aBoardFile, iline, isComment, pos ) && aBoardFile.good() ); + + if( !aBoardFile.good() ) + { + ERROR_IDF; + cerr << "problems reading board header, RECORD 2\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( isComment ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: comment within .HEADER section\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + idx = 0; + GetIDFString( iline, token, quoted, idx ); + + boardName = token; + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification for HEADER section, RECORD 3, FIELD 1: no Board Name\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( quoted ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: HEADER section, RECORD 3, FIELD 2: UNIT may not be in quotes\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( CompareToken( "MM", token ) ) + { + unit = IDF3::UNIT_MM; + } + else if( CompareToken( "THOU", token ) ) + { + unit = IDF3::UNIT_THOU; + } + else + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* HEADER section, RECORD 3, FIELD 2: expecting MM or THOU (got '" << token << "')\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + olnBoard.SetUnit( unit ); + + // RECORD 4: + // .END_HEADER + while( !FetchIDFLine( aBoardFile, iline, isComment, pos ) && aBoardFile.good() ); + + if( ( !aBoardFile.good() && !aBoardFile.eof() ) || iline.empty() ) + { + ERROR_IDF; + cerr << "problems reading board header, RECORD 4\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( isComment ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: comment within .HEADER section\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( !CompareToken( ".END_HEADER", iline ) ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: expected .END_HEADER (got '" << iline << "')\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + aBoardState = IDF3::FILE_HEADER; + return true; +} + + +// read individual board sections; pay attention to IDFv3 section specifications +bool IDF3_BOARD::readBrdSection( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBoardState ) +{ + std::list< std::string > comments; // comments associated with a section + + // Reads in .SECTION_ID or #COMMENTS + // Expected SECTION IDs: + // .BOARD_OUTLINE + // .PANEL_OUTLINE (NOT SUPPORTED) + // .OTHER_OUTLINE + // .ROUTE_OUTLINE + // .PLACE_OUTLINE + // .ROUTE_KEEPOUT + // .VIA_KEEPOUT + // .PLACE_KEEPOUT + // .PLACE_REGION + // .DRILLED_HOLES + // .NOTES (NOT YET SUPPORTED: NOTES SECTION WILL BE SKIPPED FOR NOW) + // .PLACEMENT + std::string iline; // the input line + bool isComment; // true if a line just read in is a comment line + std::streampos pos; + int idx = 0; + bool quoted = false; + std::string token; + + while( aBoardFile.good() ) + { + while( !FetchIDFLine( aBoardFile, iline, isComment, pos ) && aBoardFile.good() ); + + if( !aBoardFile.good() ) + { + if( aBoardFile.eof() && aBoardState >= IDF3::FILE_HEADER && aBoardState < IDF3::FILE_INVALID ) + return true; + + ERROR_IDF; + cerr << "problems reading board section\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( isComment ) + { + comments.push_back( iline ); + continue; + } + + // This must be a header + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF; + cerr << "problems reading board section\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( quoted ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: quoted string where SECTION HEADER expected\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( CompareToken( ".BOARD_OUTLINE", token ) ) + { + if( aBoardState != IDF3::FILE_HEADER ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: no HEADER section\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( !olnBoard.ReadData( aBoardFile, iline ) ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( !comments.empty() ) + { + std::list::iterator its = comments.begin(); + std::list::iterator ite = comments.end(); + + while( its != ite ) + { + olnBoard.AddComment( *its ); + ++its; + } + } + + aBoardState = IDF3::FILE_OUTLINE; + return true; + } + + if( CompareToken( ".PANEL_OUTLINE", token ) ) + { + ERROR_IDF; + cerr << "PANEL_OUTLINE not supported\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( CompareToken( ".OTHER_OUTLINE", token ) ) + { + if( aBoardState != IDF3::FILE_OUTLINE ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: expecting .BOARD_OUTLINE, have .OTHER_OUTLINE\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + OTHER_OUTLINE* op = new OTHER_OUTLINE; + + if( op == NULL ) + { + ERROR_IDF; + cerr << "could not create OTHER_OUTLINE object\n"; + aBoardState = IDF3::FILE_ERROR; + return false; + } + + op->SetUnit( unit ); + + if( !op->ReadData( aBoardFile, iline ) ) + { + ERROR_IDF; + cerr << "problems reading the OTHER_OUTLINE section\n"; + aBoardState = IDF3::FILE_ERROR; + return false; + } + + if( !comments.empty() ) + { + std::list::iterator its = comments.begin(); + std::list::iterator ite = comments.end(); + + while( its != ite ) + { + op->AddComment( *its ); + ++its; + } + } + + if( olnOther.insert( pair(op->GetOutlineIdentifier(), op) ).second == false ) + { + ERROR_IDF; + cerr << "* Violation of specification. Non-unique ID in OTHER_OUTLINE '"; + cerr << op->GetOutlineIdentifier() << "'\n"; + delete op; + aBoardState = IDF3::FILE_ERROR; + return false; + } + + return true; + } + + if( CompareToken( ".ROUTE_OUTLINE", token ) ) + { + if( aBoardState != IDF3::FILE_OUTLINE ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: expecting .BOARD_OUTLINE, have .ROUTE_OUTLINE\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + ROUTE_OUTLINE* op = new ROUTE_OUTLINE; + + if( op == NULL ) + { + ERROR_IDF; + cerr << "could not create ROUTE_OUTLINE object\n"; + aBoardState = IDF3::FILE_ERROR; + return false; + } + + op->SetUnit( unit ); + + if( !op->ReadData( aBoardFile, iline ) ) + { + ERROR_IDF; + cerr << "problems reading the ROUTE_OUTLINE section\n"; + aBoardState = IDF3::FILE_ERROR; + return false; + } + + if( !comments.empty() ) + { + std::list::iterator its = comments.begin(); + std::list::iterator ite = comments.end(); + + while( its != ite ) + { + op->AddComment( *its ); + ++its; + } + } + + olnRoute.push_back( op ); + + return true; + } + + if( CompareToken( ".PLACE_OUTLINE", token ) ) + { + if( aBoardState != IDF3::FILE_OUTLINE ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: expecting .BOARD_OUTLINE, have .PLACE_OUTLINE\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + PLACE_OUTLINE* op = new PLACE_OUTLINE; + + if( op == NULL ) + { + ERROR_IDF; + cerr << "could not create PLACE_OUTLINE object\n"; + aBoardState = IDF3::FILE_ERROR; + return false; + } + + op->SetUnit( unit ); + + if( !op->ReadData( aBoardFile, iline ) ) + { + ERROR_IDF; + cerr << "problems reading the PLACE_OUTLINE section\n"; + aBoardState = IDF3::FILE_ERROR; + return false; + } + + if( !comments.empty() ) + { + std::list::iterator its = comments.begin(); + std::list::iterator ite = comments.end(); + + while( its != ite ) + { + op->AddComment( *its ); + ++its; + } + } + + olnPlace.push_back( op ); + + return true; + } + + if( CompareToken( ".ROUTE_KEEPOUT", token ) ) + { + if( aBoardState != IDF3::FILE_OUTLINE ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: expecting .BOARD_OUTLINE, have .ROUTE_KEEPOUT\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + ROUTE_KO_OUTLINE* op = new ROUTE_KO_OUTLINE; + + if( op == NULL ) + { + ERROR_IDF; + cerr << "could not create ROUTE_KEEPOUT object\n"; + aBoardState = IDF3::FILE_ERROR; + return false; + } + + op->SetUnit( unit ); + + if( !op->ReadData( aBoardFile, iline ) ) + { + ERROR_IDF; + cerr << "problems reading the ROUTE_KEEPOUT section\n"; + aBoardState = IDF3::FILE_ERROR; + return false; + } + + if( !comments.empty() ) + { + std::list::iterator its = comments.begin(); + std::list::iterator ite = comments.end(); + + while( its != ite ) + { + op->AddComment( *its ); + ++its; + } + } + + olnRouteKeepout.push_back( op ); + + return true; + } + + if( CompareToken( ".VIA_KEEPOUT", token ) ) + { + if( aBoardState != IDF3::FILE_OUTLINE ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: expecting .BOARD_OUTLINE, have .VIA_KEEPOUT\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + VIA_KO_OUTLINE* op = new VIA_KO_OUTLINE; + + if( op == NULL ) + { + ERROR_IDF; + cerr << "could not create VIA_KEEPOUT object\n"; + aBoardState = IDF3::FILE_ERROR; + return false; + } + + op->SetUnit( unit ); + + if( !op->ReadData( aBoardFile, iline ) ) + { + ERROR_IDF; + cerr << "problems reading the VIA_KEEPOUT section\n"; + aBoardState = IDF3::FILE_ERROR; + return false; + } + + if( !comments.empty() ) + { + std::list::iterator its = comments.begin(); + std::list::iterator ite = comments.end(); + + while( its != ite ) + { + op->AddComment( *its ); + ++its; + } + } + + olnViaKeepout.push_back( op ); + + return true; + } + + if( CompareToken( ".PLACE_KEEPOUT", token ) ) + { + if( aBoardState != IDF3::FILE_OUTLINE ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: expecting .BOARD_OUTLINE, have .PLACE_KEEPOUT\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + PLACE_KO_OUTLINE* op = new PLACE_KO_OUTLINE; + + if( op == NULL ) + { + ERROR_IDF; + cerr << "could not create PLACE_KEEPOUT object\n"; + aBoardState = IDF3::FILE_ERROR; + return false; + } + + op->SetUnit( unit ); + + if( !op->ReadData( aBoardFile, iline ) ) + { + ERROR_IDF; + cerr << "problems reading the PLACE_KEEPOUT section\n"; + aBoardState = IDF3::FILE_ERROR; + return false; + } + + if( !comments.empty() ) + { + std::list::iterator its = comments.begin(); + std::list::iterator ite = comments.end(); + + while( its != ite ) + { + op->AddComment( *its ); + ++its; + } + } + + olnPlaceKeepout.push_back( op ); + + return true; + } + + if( CompareToken( ".PLACE_REGION", token ) ) + { + if( aBoardState != IDF3::FILE_OUTLINE ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: expecting .BOARD_OUTLINE, have .PLACE_REGION\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + GROUP_OUTLINE* op = new GROUP_OUTLINE; + + if( op == NULL ) + { + ERROR_IDF; + cerr << "could not create PLACE_REGION object\n"; + aBoardState = IDF3::FILE_ERROR; + return false; + } + + op->SetUnit( unit ); + + if( !op->ReadData( aBoardFile, iline ) ) + { + ERROR_IDF; + cerr << "problems reading the PLACE_REGION section\n"; + aBoardState = IDF3::FILE_ERROR; + return false; + } + + if( !comments.empty() ) + { + std::list::iterator its = comments.begin(); + std::list::iterator ite = comments.end(); + + while( its != ite ) + { + op->AddComment( *its ); + ++its; + } + } + + olnGroup.insert( pair(op->GetGroupName(), op) ); + + return true; + } + + if( CompareToken( ".DRILLED_HOLES", token ) ) + { + if( aBoardState != IDF3::FILE_OUTLINE ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: expecting .BOARD_OUTLINE, have .DRILLED_HOLES\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( !readBrdDrills( aBoardFile, aBoardState ) ) + { + if( !aBoardFile.good() || aBoardState == IDF3::FILE_INVALID ) + { + ERROR_IDF << "could not read board DRILLED HOLES section\n"; + return false; + } + } + + if( !comments.empty() ) + { + std::list::iterator its = comments.begin(); + std::list::iterator ite = comments.end(); + + while( its != ite ) + { + drillComments.push_back( *its ); + ++its; + } + } + + return true; + } + + if( CompareToken( ".NOTES", token ) ) + { + if( aBoardState != IDF3::FILE_OUTLINE ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: expecting .BOARD_OUTLINE, have .NOTES\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( !readBrdNotes( aBoardFile, aBoardState ) ) + { + if( !aBoardFile.good() || aBoardState == IDF3::FILE_INVALID ) + { + ERROR_IDF << "could not read board NOTES section\n"; + return false; + } + } + + if( !comments.empty() ) + { + std::list::iterator its = comments.begin(); + std::list::iterator ite = comments.end(); + + while( its != ite ) + { + noteComments.push_back( *its ); + ++its; + } + } + + return true; + } + + if( CompareToken( ".PLACEMENT", token ) ) + { + if( aBoardState != IDF3::FILE_OUTLINE ) + { + ERROR_IDF; + cerr << "invalid IDFv3 file\n"; + cerr << "* Violation of specification: expecting .BOARD_OUTLINE, have .PLACEMENT\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + + if( !readBrdPlacement( aBoardFile, aBoardState ) ) + { + if( !aBoardFile.good() || aBoardState == IDF3::FILE_INVALID ) + { + ERROR_IDF << "could not read board PLACEMENT section\n"; + return false; + } + } + + if( !comments.empty() ) + { + std::list::iterator its = comments.begin(); + std::list::iterator ite = comments.end(); + + while( its != ite ) + { + placeComments.push_back( *its ); + ++its; + } + } + + return true; + } + } // while( aBoardFile.good() + + if( !aBoardFile.good() ) + { + if( !aBoardFile.eof() || aBoardState < IDF3::FILE_OUTLINE || aBoardState >= IDF3::FILE_INVALID ) + { + ERROR_IDF; + cerr << "problems reading board section\n"; + aBoardState = IDF3::FILE_INVALID; + return false; + } + } + + return true; +} // readBrdSection() + + +// read the board file data +bool IDF3_BOARD::readBoardFile( const std::string& aFileName ) +{ + std::ifstream brd; + + brd.open( aFileName.c_str(), std::ios_base::in ); + + if( !brd.is_open() ) + { + ERROR_IDF; + cerr << "could not open file: '" << aFileName << "'\n"; + return false; + } + + std::string iline; // the input line + bool isComment; // true if a line just read in is a comment line + std::streampos pos; + IDF3::FILE_STATE state = IDF3::FILE_START; + + // note: as per IDFv3 specification: + // "The Header section must be the first section in the file, the second + // section must be the Outline section, and the last section must be the + // Placement section. All other sections may be in any order." + + // further notes: Except for the HEADER section, sections may be preceeded by + // comment lines which will be copied back out on write(). No comments may + // be associated with the board file itself since the only logical location + // for unambiguous association is at the end of the file, which is inconvenient + // for large files. + + if( !readBrdHeader( brd, state ) ) + { + ERROR_IDF; + cerr << "could not find a valid header\n"; + brd.close(); + return false; + } + + // read the various sections + while( readBrdSection( brd, state ) && state != IDF3::FILE_PLACEMENT && !brd.eof() ); + + if( state == IDF3::FILE_INVALID ) + { + brd.close(); + ERROR_IDF; + cerr << "problems reading file: '" << aFileName << "'\n"; + return false; + } + + if( !brd.good() ) + { + // check if we have valid data + if( brd.eof() && state >= IDF3::FILE_OUTLINE && state < IDF3::FILE_INVALID ) + { + brd.close(); + return true; + } + + brd.close(); + ERROR_IDF; + cerr << "problems reading file: '" << aFileName << "'\n"; + return false; + } + + if( brd.good() && state == IDF3::FILE_PLACEMENT ) + { + // read in any trailing lines and report on ignored comments (minor fault) + // and any non-comment item (non-compliance with IDFv3) + while( brd.good() ) + { + while( !FetchIDFLine( brd, iline, isComment, pos ) && brd.good() ); + + // normally this is a fault but we have all the data in accordance with specs + if( ( !brd.good() && !brd.eof() ) || iline.empty() ) + break; + + if( isComment ) + { + ERROR_IDF << "[warning]: trailing comments after PLACEMENT\n"; + } + else + { + ERROR_IDF << "invalid IDF3 file\n"; + cerr << "* Violation of specification: non-comment lines after PLACEMENT section\n"; + Clear(); + brd.close(); + return false; + } + } + } + + brd.close(); + return true; +} // readBoardFile() + + +// read the library sections (outlines) +bool IDF3_BOARD::readLibSection( std::ifstream& aLibFile, IDF3::FILE_STATE& aLibState, IDF3_BOARD* aBoard ) +{ + if( aBoard == NULL ) + { + ERROR_IDF << "BUG: invoked with NULL reference aBoard\n"; + aLibState = IDF3::FILE_INVALID; + return false; + } + + std::list< std::string > comments; // comments associated with a section + + // Reads in .ELECTRICAL, .MECHANICAL or #COMMENTS + std::string iline; // the input line + bool isComment; // true if a line just read in is a comment line + std::streampos pos; + int idx = 0; + bool quoted = false; + std::string token; + IDF3_COMP_OUTLINE *pout = new IDF3_COMP_OUTLINE; + + while( aLibFile.good() ) + { + while( !FetchIDFLine( aLibFile, iline, isComment, pos ) && aLibFile.good() ); + + if( !aLibFile.good() && !aLibFile.eof() ) + { + ERROR_IDF; + cerr << "problems reading library section\n"; + aLibState = IDF3::FILE_INVALID; + return false; + } + + // no data was read; this only happens at eof() + if( iline.empty() ) + return true; + + if( isComment ) + { + comments.push_back( iline ); + continue; + } + + // This must be a header + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF; + cerr << "problems reading library section\n"; + aLibState = IDF3::FILE_INVALID; + return false; + } + + if( quoted ) + { + ERROR_IDF; + cerr << "invalid IDFv3 library\n"; + cerr << "* Violation of specification: quoted string where .ELECTRICAL or .MECHANICAL expected\n"; + aLibState = IDF3::FILE_INVALID; + return false; + } + + if( CompareToken( ".ELECTRICAL", token ) || CompareToken( ".MECHANICAL", token ) ) + { + if( !pout->ReadData( aLibFile, token ) ) + { + ERROR_IDF; + cerr << "invalid IDFv3 library [faulty section]\n"; + aLibState = IDF3::FILE_INVALID; + return false; + } + + if( !comments.empty() ) + { + std::list::iterator its = comments.begin(); + std::list::iterator ite = comments.end(); + + while( its != ite ) + { + pout->AddComment( *its ); + ++its; + } + } + + IDF3_COMP_OUTLINE* cop = aBoard->GetComponentOutline( pout->GetUID() ); + + if( cop == NULL ) + { + compOutlines.insert( pair( pout->GetUID(), pout ) ); + } + else + { + ERROR_IDF; + cerr << "duplicate Component Outline: '" << pout->GetUID() << "'\n"; + delete pout; + } + + return true; + } + else + { + ERROR_IDF; + cerr << "invalid IDFv3 library\n"; + cerr << "* Expecting .ELECTRICAL or .MECHANICAL, got '" << token << "'\n"; + aLibState = IDF3::FILE_INVALID; + return false; + } + + } + + ERROR_IDF; + cerr << "problems reading library section\n"; + aLibState = IDF3::FILE_INVALID; + return false; +} + + +// read the library HEADER +bool IDF3_BOARD::readLibHeader( std::ifstream& aLibFile, IDF3::FILE_STATE& aLibState ) +{ + std::string iline; // the input line + bool isComment; // true if a line just read in is a comment line + std::streampos pos; + int idx = 0; + bool quoted = false; + std::string token; + + // RECORD 1: ".HEADER" must be the very first line + while( !FetchIDFLine( aLibFile, iline, isComment, pos ) && aLibFile.good() ); + + if( !aLibFile.good() ) + { + ERROR_IDF; + cerr << "problems reading library header\n"; + aLibState = IDF3::FILE_INVALID; + return false; + } + + if( isComment ) + { + ERROR_IDF; + cerr << "invalid IDFv3 library\n"; + cerr << "* Violation of specification: first line must be .HEADER\n"; + aLibState = IDF3::FILE_INVALID; + return false; + } + + if( !CompareToken( ".HEADER", iline ) ) + { + ERROR_IDF; + cerr << "invalid IDFv3 library\n"; + cerr << "* Violation of specification: first line must be .HEADER and have no quotes or trailing text\n"; + aLibState = IDF3::FILE_INVALID; + return false; + } + + // RECORD 2: + // File Type [str]: LIBRARY_FILE + // IDF Version Number [float]: must be 3.0 + // Source System [str]: ignored + // Date [str]: ignored + // Library File Version [int]: ignored + while( !FetchIDFLine( aLibFile, iline, isComment, pos ) && aLibFile.good() ); + + if( !aLibFile.good() ) + { + ERROR_IDF; + cerr << "problems reading library header, RECORD 2\n"; + aLibState = IDF3::FILE_INVALID; + return false; + } + + if( isComment ) + { + ERROR_IDF; + cerr << "invalid IDFv3 library\n"; + cerr << "* Violation of specification: comment within .HEADER section\n"; + aLibState = IDF3::FILE_INVALID; + return false; + } + + idx = 0; + GetIDFString( iline, token, quoted, idx ); + + if( quoted ) + { + ERROR_IDF; + cerr << "invalid IDFv3 library\n"; + cerr << "* Violation of specification: File Type in HEADER section must not be in quotes\n"; + aLibState = IDF3::FILE_INVALID; + return false; + } + + if( !CompareToken( "LIBRARY_FILE", token ) ) + { + ERROR_IDF; + cerr << "invalid IDFv3 library\n"; + cerr << "* Expecting string: LIBRARY_FILE (got '" << token << "')\n"; + aLibState = IDF3::FILE_INVALID; + return false; + } + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF; + cerr << "invalid IDFv3 library\n"; + cerr << "* Violation of specification for HEADER section, RECORD 2: no FIELD 2\n"; + aLibState = IDF3::FILE_INVALID; + return false; + } + + if( quoted ) + { + ERROR_IDF; + cerr << "invalid IDFv3 library\n"; + cerr << "* Violation of specification: IDF Version must not be in quotes\n"; + aLibState = IDF3::FILE_INVALID; + return false; + } + + if( token.compare( "3.0" ) && token.compare( "3." ) && token.compare( "3" ) ) + { + ERROR_IDF; + cerr << "unsupported IDF library version\n"; + cerr << "* Expecting version to be one of '3.0', '3.', or '3' (value: '" << token << "')\n"; + aLibState = IDF3::FILE_INVALID; + return false; + } + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF; + cerr << "invalid IDFv3 library\n"; + cerr << "* Violation of specification for HEADER section, RECORD 2, FIELD 3: no Source System string\n"; + aLibState = IDF3::FILE_INVALID; + return false; + } + libSource = token; + + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF; + cerr << "invalid IDFv3 library\n"; + cerr << "* Violation of specification for HEADER section, RECORD 2, FIELD 4: no Date string\n"; + aLibState = IDF3::FILE_INVALID; + return false; + } + libDate = token; + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ERROR_IDF; + cerr << "invalid IDFv3 library\n"; + cerr << "* Violation of specification for HEADER section, RECORD 2, FIELD 5: no Board File Version number\n"; + aLibState = IDF3::FILE_INVALID; + return false; + } + std::istringstream istr; + istr.str( token ); + + istr >> libFileVersion; + + if( istr.fail() ) + { + ERROR_IDF << "invalid Library File Version in header\n"; + cerr << "* Setting default version of 1\n"; + libFileVersion = 1; + } + + if( quoted ) + { + ERROR_IDF; + cerr << "invalid IDFv3 library\n"; + cerr << "* Violation of specification: HEADER section, RECORD 2, FIELD 5: Library File Version must not be in quotes\n"; + aLibState = IDF3::FILE_INVALID; + return false; + } + + // RECORD 3: + // .END_HEADER + while( !FetchIDFLine( aLibFile, iline, isComment, pos ) && aLibFile.good() ); + + if( ( !aLibFile.good() && !aLibFile.eof() ) || iline.empty() ) + { + ERROR_IDF; + cerr << "problems reading library header, RECORD 3\n"; + aLibState = IDF3::FILE_INVALID; + return false; + } + + if( isComment ) + { + ERROR_IDF; + cerr << "invalid IDFv3 library\n"; + cerr << "* Violation of specification: comment within .HEADER section\n"; + aLibState = IDF3::FILE_INVALID; + return false; + } + + if( !CompareToken( ".END_HEADER", iline ) ) + { + ERROR_IDF; + cerr << "invalid IDFv3 header\n"; + cerr << "* Violation of specification: expected .END_HEADER (got '" << iline << "')\n"; + aLibState = IDF3::FILE_INVALID; + return false; + } + + aLibState = IDF3::FILE_HEADER; + return true; +} + + +// read the library file data +bool IDF3_BOARD::readLibFile( const std::string& aFileName ) +{ + std::ifstream lib; + + lib.open( aFileName.c_str(), std::ios_base::in ); + + if( !lib.is_open() ) + { + ERROR_IDF; + cerr << "could not open file: '" << aFileName << "'\n"; + return false; + } + + IDF3::FILE_STATE state = IDF3::FILE_START; + + if( !readLibHeader( lib, state ) ) + { + ERROR_IDF; + cerr << "[IDF library] could not find a valid header\n"; + lib.close(); + return false; + } + + // read the library sections + while( readLibSection( lib, state, this ) && lib.good() ); + + if( state <= IDF3::FILE_START || state >= IDF3::FILE_INVALID ) + { + lib.close(); + ERROR_IDF; + cerr << "problems reading file: '" << aFileName << "'\n"; + return false; + } + + lib.close(); + return true; +} + + +bool IDF3_BOARD::ReadFile( const wxString& aFullFileName ) +{ + // 1. Check that the file extension is 'emn' + // 2. Check if a file with extension 'emp' exists and read it + // 3. Open the specified filename and read it + + std::string fname = TO_UTF8( aFullFileName ); + + wxFileName brdname( aFullFileName ); + wxFileName libname( aFullFileName ); + + brdname.SetExt( wxT( "emn" ) ); + libname.SetExt( wxT( "emp" ) ); + + std::string bfname = TO_UTF8( aFullFileName ); + + if( !brdname.IsOk() ) + { + ERROR_IDF; + cerr << "invalid file name: '" << bfname << "'\n"; + return false; + } + + if( !brdname.IsOk() ) + { + ERROR_IDF; + cerr << "invalid file name: '" << bfname << "'\n"; + return false; + } + + if( !brdname.FileExists() ) + { + ERROR_IDF; + cerr << "no such file: '" << bfname << "'\n"; + return false; + } + + if( !brdname.IsFileReadable() ) + { + ERROR_IDF; + cerr << "cannot read file: '" << bfname << "'\n"; + return false; + } + + bfname = TO_UTF8( brdname.GetFullPath() ); + std::string lfname = TO_UTF8( libname.GetFullPath() ); + + if( !libname.FileExists() ) + { + ERROR_IDF; + cerr << "no associated library file (*.emp)\n"; + } + else if( !libname.IsFileReadable() ) + { + ERROR_IDF; + cerr << "cannot read library file: '" << lfname << "'\n"; + } + else + { + // read the library file before proceeding + if( !readLibFile( lfname ) ) + { + ERROR_IDF; + cerr << "problems reading library file: '" << lfname << "'\n"; + return false; + } + } + + // read the board file + if( !readBoardFile( bfname ) ) + { + Clear(); + ERROR_IDF; + cerr << "problems reading board file: '" << lfname << "'\n"; + return false; + } + + return true; +} + +// write the library file data +bool IDF3_BOARD::writeLibFile( const std::string& aFileName ) +{ + std::ofstream lib; + + lib.open( aFileName.c_str(), std::ios_base::out ); + + if( !lib.is_open() ) + { + ERROR_IDF; + cerr << "could not open library file: '" << aFileName << "'\n"; + return false; + } + + wxDateTime tdate( time( NULL ) ); + + if( idfSource.empty() ) + idfSource = "KiCad-IDF Framework"; + + ostringstream fileDate; + fileDate << setfill( '0' ) << setw(4) << tdate.GetYear(); + fileDate << "/" << setw(2) << tdate.GetMonth() << "/" << tdate.GetDay(); + fileDate << "." << tdate.GetHour() << ":" << tdate.GetMinute() << ":" << tdate.GetSecond(); + libDate = fileDate.str(); + + lib << ".HEADER\n"; + lib << "LIBRARY_FILE 3.0 \"Created by " << idfSource; + lib << "\" " << libDate << " " << (++libFileVersion) << "\n"; + lib << ".END_HEADER\n\n"; + + std::map< std::string, IDF3_COMP_OUTLINE*>::iterator its = compOutlines.begin(); + std::map< std::string, IDF3_COMP_OUTLINE*>::iterator ite = compOutlines.end(); + + while( its != ite ) + { + its->second->WriteData( lib ); + ++its; + } + + bool ok = !lib.fail(); + + lib.close(); + + return ok; +} + +// write the board file data +bool IDF3_BOARD::writeBoardFile( const std::string& aFileName ) +{ + std::ofstream brd; + + brd.open( aFileName.c_str(), std::ios_base::out ); + + if( !brd.is_open() ) + { + ERROR_IDF; + cerr << "could not open board file: '" << aFileName << "'\n"; + return false; + } + + wxDateTime tdate( time( NULL ) ); + + if( idfSource.empty() ) + idfSource = "KiCad-IDF Framework"; + + ostringstream fileDate; + fileDate << setfill( '0' ) << setw(4) << tdate.GetYear(); + fileDate << "/" << setw(2) << tdate.GetMonth() << "/" << tdate.GetDay(); + fileDate << "." << tdate.GetHour() << ":" << tdate.GetMinute() << ":" << tdate.GetSecond(); + brdDate = fileDate.str(); + + brd << ".HEADER\n"; + brd << "BOARD_FILE 3.0 \"Created by " << idfSource; + brd << "\" " << brdDate << " " << (++brdFileVersion) << "\n"; + + if( boardName.empty() ) + brd << "\"BOARD WITH NO NAME\" "; + else + brd << "\"" << boardName << "\" "; + + brd << setw(1) << setfill( ' ' ); + + if( unit == IDF3::UNIT_MM ) + brd << "MM\n"; + else + brd << "THOU\n"; + + brd << ".END_HEADER\n\n"; + + // write the BOARD_OUTLINE + if( !olnBoard.WriteData( brd ) ) + { + ERROR_IDF << "problems writing BOARD OUTLINE\n"; + brd.close(); + return false; + } + + // OTHER outlines + do + { + std::map::iterator its = olnOther.begin(); + std::map::iterator ite = olnOther.end(); + + while( (its != ite) && its->second->WriteData( brd ) ) ++its; + + } while( 0 ); + + // ROUTE outlines + do + { + std::list::iterator its = olnRoute.begin(); + std::list::iterator ite = olnRoute.end(); + + while( (its != ite) && (*its)->WriteData( brd ) ) ++its; + + } while( 0 ); + + // PLACEMENT outlines + do + { + std::list::iterator its = olnPlace.begin(); + std::list::iterator ite = olnPlace.end(); + + while( (its != ite) && (*its)->WriteData( brd ) ) ++its; + + } while( 0 ); + + // ROUTE KEEPOUT outlines + do + { + std::list::iterator its = olnRouteKeepout.begin(); + std::list::iterator ite = olnRouteKeepout.end(); + + while( (its != ite) && (*its)->WriteData( brd ) ) ++its; + + } while( 0 ); + + // VIA KEEPOUT outlines + do + { + std::list::iterator its = olnViaKeepout.begin(); + std::list::iterator ite = olnViaKeepout.end(); + + while( (its != ite) && (*its)->WriteData( brd ) ) ++its; + + } while( 0 ); + + // PLACE KEEPOUT outlines + do + { + std::list::iterator its = olnPlaceKeepout.begin(); + std::list::iterator ite = olnPlaceKeepout.end(); + + while( (its != ite) && (*its)->WriteData( brd ) ) ++its; + + } while( 0 ); + + // PLACEMENT GROUP outlines + do + { + std::map::iterator its = olnGroup.begin(); + std::map::iterator ite = olnGroup.end(); + + while( (its != ite) && its->second->WriteData( brd ) ) ++its; + + } while( 0 ); + + // Drilled holes + do + { + std::list::iterator itds = drillComments.begin(); + std::list::iterator itde = drillComments.end(); + + while( itds != itde ) + { + brd << "# " << *itds << "\n"; + ++itds; + } + + brd << ".DRILLED_HOLES\n"; + + std::list::iterator itbs = board_drills.begin(); + std::list::iterator itbe = board_drills.end(); + + while( itbs != itbe ) + { + (*itbs)->Write( brd, unit ); + ++itbs; + } + + std::map< std::string, IDF3_COMPONENT*>::iterator itcs = components.begin(); + std::map< std::string, IDF3_COMPONENT*>::iterator itce = components.end(); + + while( itcs != itce ) + { + itcs->second->WriteDrillData( brd ); + ++itcs; + } + + brd << ".END_DRILLED_HOLES\n\n"; + } while( 0 ); + + // Notes + if( !notes.empty() ) + { + std::list::iterator itncs = noteComments.begin(); + std::list::iterator itnce = noteComments.end(); + + while( itncs != itnce ) + { + brd << "# " << *itncs << "\n"; + ++itncs; + } + + brd << ".NOTES\n"; + + std::list::iterator itns = notes.begin(); + std::list::iterator itne = notes.end(); + + while( itns != itne ) + { + (*itns)->WriteNote( brd, unit ); + ++itns; + } + + brd << ".END_NOTES\n\n"; + + } + + // Placement + if( !components.empty() ) + { + std::list::iterator itpcs = placeComments.begin(); + std::list::iterator itpce = placeComments.end(); + + while( itpcs != itpce ) + { + brd << "# " << *itpcs << "\n"; + ++itpcs; + } + + std::map< std::string, IDF3_COMPONENT*>::iterator itcs = components.begin(); + std::map< std::string, IDF3_COMPONENT*>::iterator itce = components.end(); + + brd << ".PLACEMENT\n"; + + while( itcs != itce ) + { + itcs->second->WritePlaceData( brd ); + ++itcs; + } + + brd << ".END_PLACEMENT\n"; + } + + bool ok = !brd.fail(); + brd.close(); + + return ok; +} + +bool IDF3_BOARD::WriteFile( const wxString& aFullFileName, bool aUnitMM, bool aForceUnitFlag ) +{ + if( aUnitMM == IDF3::UNIT_MM ) + setUnit( IDF3::UNIT_MM, aForceUnitFlag ); + else + setUnit( IDF3::UNIT_THOU, aForceUnitFlag ); + + // 1. Check that the file extension is 'emn' + // 2. Write the *.emn file according to the IDFv3 spec + // 3. Write the *.emp file according to the IDFv3 spec + + std::string fname = TO_UTF8( aFullFileName ); + + wxFileName brdname( aFullFileName ); + wxFileName libname( aFullFileName ); + + brdname.SetExt( wxT( "emn" ) ); + libname.SetExt( wxT( "emp" ) ); + + std::string bfname = TO_UTF8( aFullFileName ); + + if( !brdname.IsOk() ) + { + ERROR_IDF; + cerr << "invalid file name: '" << bfname << "'\n"; + errno = EINVAL; + return false; + } + + if( brdname.FileExists() && !brdname.IsFileWritable() ) + { + ERROR_IDF; + cerr << "cannot overwrite existing board file\n"; + cerr << "* Filename: '" << bfname << "'\n"; + errno = EACCES; + return false; + } + + bfname = TO_UTF8( brdname.GetFullPath() ); + std::string lfname = TO_UTF8( libname.GetFullPath() ); + + if( libname.FileExists() && !libname.IsFileWritable() ) + { + ERROR_IDF; + cerr << "cannot overwrite existing library file\n"; + cerr << "* Filename: '" << lfname << "'\n"; + errno = EACCES; + return false; + } + + if( !writeLibFile( lfname ) ) + { + ERROR_IDF; + cerr << "problems writing library file: '" << lfname << "'\n"; + return false; + } + + if( !writeBoardFile( bfname ) ) + { + ERROR_IDF; + cerr << "problems writing board file: '" << bfname << "'\n"; + return false; + } + + return true; +} + + +const std::string& IDF3_BOARD::GetIDFSource( void ) +{ + return idfSource; +} + + +void IDF3_BOARD::SetIDFSource( const std::string& aIDFSource ) +{ + idfSource = aIDFSource; + return; +} + +const std::string& IDF3_BOARD::GetBoardSource( void ) +{ + return brdSource; +} + +const std::string& IDF3_BOARD::GetLibrarySource( void ) +{ + return libSource; +} + +const std::string& IDF3_BOARD::GetBoardDate( void ) +{ + return brdDate; +} + +const std::string& IDF3_BOARD::GetLibraryDate( void ) +{ + return libDate; +} + +int IDF3_BOARD::GetBoardVersion( void ) +{ + return brdFileVersion; +} + +bool IDF3_BOARD::SetBoardVersion( int aVersion ) +{ + if( aVersion < 0 ) + return false; + + brdFileVersion = aVersion; + + return true; +} + + +int IDF3_BOARD::GetLibraryVersion( void ) +{ + return libFileVersion; +} + + +bool IDF3_BOARD::SetLibraryVersion( int aVersion ) +{ + if( aVersion < 0 ) + return false; + + libFileVersion = aVersion; + + return true; +} + + +double IDF3_BOARD::GetUserScale( void ) +{ + return userScale; +} + + +bool IDF3_BOARD::SetUserScale( double aScaleFactor ) +{ + if( aScaleFactor <= 0.0 ) + { + ERROR_IDF << "user scale factor must be > 0\n"; + return false; + } + + userScale = aScaleFactor; + return true; +} + +int IDF3_BOARD::GetUserPrecision( void ) +{ + return userPrec; +} + +bool IDF3_BOARD::SetUserPrecision( int aPrecision ) +{ + if( aPrecision < 0 || aPrecision > 8 ) + return false; + + userPrec = aPrecision; + return true; +} + + +void IDF3_BOARD::GetUserOffset( double& aXoff, double& aYoff ) +{ + aXoff = userXoff; + aYoff = userYoff; + return; +} + + +void IDF3_BOARD::SetUserOffset( double aXoff, double aYoff ) +{ + userXoff = aXoff; + userYoff = aYoff; + return; +} + + +bool IDF3_BOARD::AddBoardOutline( IDF_OUTLINE* aOutline ) +{ + return olnBoard.AddOutline( aOutline ); +} + + +bool IDF3_BOARD::DelBoardOutline( IDF_OUTLINE* aOutline ) +{ + return olnBoard.DelOutline( aOutline ); +} + + +bool IDF3_BOARD::DelBoardOutline( size_t aIndex ) +{ + return olnBoard.DelOutline( aIndex ); +} + + +size_t IDF3_BOARD::GetBoardOutlinesSize( void ) +{ + return olnBoard.OutlinesSize(); +} + + +BOARD_OUTLINE* IDF3_BOARD::GetBoardOutline( void ) +{ + return &olnBoard; +} + + +const std::list< IDF_OUTLINE* >*const IDF3_BOARD::GetBoardOutlines( void ) +{ + return olnBoard.GetOutlines(); +} + + +IDF_DRILL_DATA* IDF3_BOARD::AddBoardDrill( double aDia, double aXpos, double aYpos, + IDF3::KEY_PLATING aPlating, + const std::string aHoleType, + IDF3::KEY_OWNER aOwner ) +{ + IDF_DRILL_DATA* drill = new IDF_DRILL_DATA( aDia, aXpos, aYpos, aPlating, + "BOARD", aHoleType, aOwner ); + + if( drill != NULL ) + board_drills.push_back( drill ); + + return drill; +} + +IDF_DRILL_DATA* IDF3_BOARD::AddDrill( IDF_DRILL_DATA* aDrilledHole ) +{ + if( !aDrilledHole ) + return NULL; + + if( CompareToken( "PANEL", aDrilledHole->GetDrillRefDes() ) ) + { + ERROR_IDF; + cerr << "\n*BUG: PANEL drilled holes are not supported\n"; + return NULL; + } + + if( CompareToken( "BOARD", aDrilledHole->GetDrillRefDes() ) ) + { + board_drills.push_back( aDrilledHole ); + return aDrilledHole; + } + + return addCompDrill( aDrilledHole ); +} + + +bool IDF3_BOARD::DelBoardDrill( double aDia, double aXpos, double aYpos ) +{ + std::list::iterator sp = board_drills.begin(); + std::list::iterator ep = board_drills.end(); + bool rval = false; + + while( sp != ep ) + { + if( (*sp)->Matches( aDia, aXpos, aYpos ) ) + { + rval = true; + delete *sp; + sp = board_drills.erase( sp ); + continue; + } + ++sp; + } + + return rval; +} + + +// a slot is a deficient representation of a kicad slotted hole; +// it is usually associated with a component but IDFv3 does not +// provide for such an association. +bool IDF3_BOARD::AddSlot( double aWidth, double aLength, double aOrientation, double aX, double aY ) +{ + if( aWidth < IDF_MIN_DIA_MM ) + return true; + + IDF_POINT c[2]; // centers + IDF_POINT pt[4]; + + // make sure the user isn't giving us dud information + if( aLength < aWidth ) + std::swap( aLength, aWidth ); + + if( aLength == aWidth ) + { + ERROR_IDF; + cerr << "length == width (" << aWidth << ")\n"; + return false; + } + + double a1 = aOrientation / 180.0 * M_PI; + double a2 = a1 + M_PI2; + double d1 = aLength / 2.0; + double d2 = aWidth / 2.0; + double sa1 = sin( a1 ); + double ca1 = cos( a1 ); + double dsa2 = d2 * sin( a2 ); + double dca2 = d2 * cos( a2 ); + + c[0].x = aX + d1 * ca1; + c[0].y = aY + d1 * sa1; + + c[1].x = aX - d1 * ca1; + c[1].y = aY - d1 * sa1; + + pt[0].x = c[0].x - dca2; + pt[0].y = c[0].y - dsa2; + + pt[1].x = c[1].x - dca2; + pt[1].y = c[1].y - dsa2; + + pt[2].x = c[1].x + dca2; + pt[2].y = c[1].y + dsa2; + + pt[3].x = c[0].x + dca2; + pt[3].y = c[0].y + dsa2; + + IDF_OUTLINE* outline = new IDF_OUTLINE; + + if( outline == NULL ) + { + ERROR_IDF; + cerr << "could not create an outline object\n"; + return false; + } + + // first straight run + IDF_SEGMENT* seg = new IDF_SEGMENT( pt[0], pt[1] ); + outline->push( seg ); + // first 180 degree cap + seg = new IDF_SEGMENT( c[1], pt[1], -180.0, true ); + outline->push( seg ); + // final straight run + seg = new IDF_SEGMENT( pt[2], pt[3] ); + outline->push( seg ); + // final 180 degree cap + seg = new IDF_SEGMENT( c[0], pt[3], -180.0, true ); + outline->push( seg ); + + return AddBoardOutline( outline ); +} + + +IDF_DRILL_DATA* IDF3_BOARD::addCompDrill( double aDia, double aXpos, double aYpos, + IDF3::KEY_PLATING aPlating, + const std::string aHoleType, + IDF3::KEY_OWNER aOwner, + const std::string& aRefDes ) +{ + // first find the matching component; if it doesn't exist we must create it somehow - + // question is, do we need a component outline at this stage or can those be added later? + // + // Presumably we can create a component with no outline and add the outlines later. + // If a component is created and an outline specified but the outline is not loaded, + // we're screwed if (a) we have already read the library file (*.emp) or (b) we don't + // know the filename + + std::string refdes = aRefDes; + + // note: for components 'NOREFDES' would be assigned a Unique ID, but for holes + // there is no way of associating the hole with the correct entity (if any) + // so a hole added with "NOREFDES" goes to a generic component "NOREFDES" + if( refdes.empty() ) + refdes = "NOREFDES"; + + // check if the target is BOARD or PANEL + if( CompareToken( "BOARD", refdes ) ) + return AddBoardDrill( aDia, aXpos, aYpos, aPlating, aHoleType, aOwner ); + + if( CompareToken( "PANEL", refdes ) ) + { + ERROR_IDF; + cerr << "PANEL data not supported\n"; + return NULL; + } + + std::map::iterator ref = components.find( refdes ); + + if( ref == components.end() ) + { + // create the item + IDF3_COMPONENT* comp = new IDF3_COMPONENT( this ); + + if( comp == NULL ) + { + ERROR_IDF; + cerr << "could not create new component object\n"; + return NULL; + } + + comp->SetParent( this ); + comp->SetRefDes( refdes ); + ref = components.insert( std::pair< std::string, IDF3_COMPONENT*> ( comp->GetRefDes(), comp ) ).first; + } + + // add the drill + return ref->second->AddDrill( aDia, aXpos, aYpos, aPlating, aHoleType, aOwner ); +} + + +IDF_DRILL_DATA* IDF3_BOARD::addCompDrill( IDF_DRILL_DATA* aDrilledHole ) +{ + if( !aDrilledHole ) + return NULL; + + if( CompareToken( "PANEL", aDrilledHole->GetDrillRefDes() ) ) + { + ERROR_IDF; + cerr << "PANEL data not supported\n"; + return NULL; + } + + std::map::iterator ref = components.find( aDrilledHole->GetDrillRefDes() ); + + if( ref == components.end() ) + { + // create the item + IDF3_COMPONENT* comp = new IDF3_COMPONENT( this ); + + if( comp == NULL ) + { + ERROR_IDF; + cerr << "could not create new component object\n"; + return NULL; + } + + comp->SetParent( this ); + comp->SetRefDes( aDrilledHole->GetDrillRefDes() ); + ref = components.insert( std::pair< std::string, IDF3_COMPONENT*> ( comp->GetRefDes(), comp ) ).first; + } + + // add the drill + return ref->second->AddDrill( aDrilledHole ); +} + + +bool IDF3_BOARD::delCompDrill( double aDia, double aXpos, double aYpos, std::string aRefDes ) +{ + std::map::iterator ref = components.find( aRefDes ); + + if( ref == components.end() ) + return false; + + return ref->second->DelDrill( aDia, aXpos, aYpos ); +} + + +bool IDF3_BOARD::AddComponent( IDF3_COMPONENT* aComponent ) +{ + if( !aComponent ) + { + ERROR_IDF << "Invalid component pointer (NULL)\n"; + return false; + } + + if( components.insert( std::pair + ( aComponent->GetRefDes(), aComponent ) ).second == false ) + { + ERROR_IDF << "Duplicate RefDes ('" << aComponent->GetRefDes() << "')\n"; + return false; + } + + return true; +} + + +bool IDF3_BOARD::DelComponent( IDF3_COMPONENT* aComponent ) +{ + if( !aComponent ) + { + ERROR_IDF << "Invalid component pointer (NULL)\n"; + return false; + } + + std::map::iterator it = + components.find( aComponent->GetRefDes() ); + + if( it == components.end() ) + return false; + + delete it->second; + components.erase( it ); + + return true; +} + + +bool IDF3_BOARD::DelComponent( size_t aIndex ) +{ + if( aIndex >= components.size() ) + { + ERROR_IDF << "index (" << aIndex << ") >= components size (" + << components.size() << ")\n"; + return false; + } + + std::map::iterator it = components.begin(); + + while( aIndex-- > 0 ) ++it; + + delete it->second; + components.erase( it ); + + return false; +} + + +size_t IDF3_BOARD::GetComponentsSize( void ) +{ + return components.size(); +} + + +std::map< std::string, IDF3_COMPONENT* >*const IDF3_BOARD::GetComponents( void ) +{ + return &components; +} + + +IDF3_COMPONENT* IDF3_BOARD::FindComponent( std::string aRefDes ) +{ + std::map::iterator it = components.find( aRefDes ); + + if( it == components.end() ) + return NULL; + + return it->second; +} + + +// returns a pointer to a component outline object or NULL +// if the object doesn't exist +IDF3_COMP_OUTLINE* IDF3_BOARD::GetComponentOutline( const std::string aGeomName, + const std::string aPartName, + wxString aFullFileName ) +{ + std::ostringstream ostr; + ostr << aGeomName << "_" << aPartName; + + IDF3_COMP_OUTLINE* cp = GetComponentOutline( ostr.str() ); + + if( cp != NULL ) + return cp; + + std::string fname = TO_UTF8( aFullFileName ); + + cp = new IDF3_COMP_OUTLINE; + + if( cp == NULL ) + { + ERROR_IDF; + cerr << "failed to create outline with UID '" << aGeomName << "_"; + cerr << aPartName << "'\n"; + cerr << "* filename: '" << fname << "'\n"; + return NULL; + } + + wxFileName idflib( aFullFileName ); + + if( !idflib.IsOk() ) + { + ERROR_IDF; + cerr << "invalid file name: '" << fname << "'\n"; + delete cp; + return NULL; + } + + if( !idflib.FileExists() ) + { + ERROR_IDF; + cerr << "no such file: '" << fname << "'\n"; + delete cp; + return NULL; + } + + if( !idflib.IsFileReadable() ) + { + ERROR_IDF; + cerr << "cannot read file: '" << fname << "'\n"; + delete cp; + return NULL; + } + + std::ifstream model; + + model.open( fname.c_str(), std::ios_base::in ); + + if( !model.is_open() ) + { + ERROR_IDF; + cerr << "could not open file: '" << fname << "'\n"; + delete cp; + return NULL; + } + + std::string iline; // the input line + bool isComment; // true if a line just read in is a comment line + std::streampos pos; + + while( true ) + { + while( !FetchIDFLine( model, iline, isComment, pos ) && model.good() ); + + if( !model.good() ) + { + ERROR_IDF; + cerr << "problems reading file: '" << fname << "'\n"; + delete cp; + model.close(); + return NULL; + } + + // accept comment lines, .ELECTRICAL, or .MECHANICAL only + if( isComment ) + { + cp->AddComment( iline ); + continue; + } + + if( CompareToken( ".ELECTRICAL", iline ) || CompareToken( ".MECHANICAL", iline ) ) + { + if( !cp->ReadData( model, iline ) ) + { + ERROR_IDF; + cerr << "problems reading file: '" << fname << "'\n"; + delete cp; + model.close(); + return NULL; + } + else + { + break; + } + } + else + { + ERROR_IDF << "faulty IDF component definition\n"; + cerr << "* Expecting .ELECTRICAL or .MECHANICAL, got '" << iline << "'\n"; + cerr << "* File: '" << fname << "'\n"; + delete cp; + model.close(); + return NULL; + } + } // while( true ) + + model.close(); + + return cp; +} + + +// returns a pointer to the component outline object with the +// unique ID aComponentID +IDF3_COMP_OUTLINE* IDF3_BOARD::GetComponentOutline( std::string aComponentID ) +{ + std::map< std::string, IDF3_COMP_OUTLINE*>::iterator its = compOutlines.find( aComponentID ); + + if( its != compOutlines.end() ) + return its->second; + + return NULL; +} + + +// returns a pointer to the outline which is substituted +// whenever a true outline cannot be found or is defective +IDF3_COMP_OUTLINE* IDF3_BOARD::GetInvalidOutline( const std::string& aGeomName, const std::string& aPartName ) +{ + std::string uid; + bool empty = false; + + if( aGeomName.empty() && aPartName.empty() ) + { + uid = "NOGEOM_NOPART"; + empty = true; + } + else + { + uid = aGeomName + "_" + aPartName; + } + + IDF3_COMP_OUTLINE* cp = GetComponentOutline( uid ); + + if( cp != NULL ) + return cp; + + cp = new IDF3_COMP_OUTLINE; + + if( cp == NULL ) + { + ERROR_IDF << "could not create new outline\n"; + return NULL; + } + + if( empty ) + cp->CreateDefaultOutline( "", "" ); + else + cp->CreateDefaultOutline( aGeomName, aPartName ); + + compOutlines.insert( pair(cp->GetUID(), cp) ); + + return cp; +} + + +// clears all data +void IDF3_BOARD::Clear( void ) +{ + // preserve the board thickness + double thickness = olnBoard.GetThickness(); + + idfSource.clear(); + brdSource.clear(); + libSource.clear(); + brdDate.clear(); + libDate.clear(); + brdFileVersion = 0; + libFileVersion = 0; + + // delete comment lists + noteComments.clear(); + drillComments.clear(); + placeComments.clear(); + + // delete notes + while( !notes.empty() ) + { + delete notes.front(); + notes.pop_front(); + } + + // delete drill list + do + { + std::list::iterator ds = board_drills.begin(); + std::list::iterator de = board_drills.end(); + + while( ds != de ) + { + delete *ds; + ++ds; + } + + board_drills.clear(); + } while(0); + + + // delete components + do + { + std::map::iterator cs = components.begin(); + std::map::iterator ce = components.end(); + + while( cs != ce ) + { + delete cs->second; + ++cs; + } + + components.clear(); + } while(0); + + + // delete component outlines + do + { + std::map::iterator cs = compOutlines.begin(); + std::map::iterator ce = compOutlines.end(); + + while( cs != ce ) + { + delete cs->second; + ++cs; + } + + compOutlines.clear(); + } while(0); + + + // delete OTHER outlines + do + { + std::map::iterator os = olnOther.begin(); + std::map::iterator oe = olnOther.end(); + + while( os != oe ) + { + delete os->second; + ++os; + } + + olnOther.clear(); + } while(0); + + + // delete ROUTE outlines + do + { + std::list::iterator os = olnRoute.begin(); + std::list::iterator oe = olnRoute.end(); + + while( os != oe ) + { + delete *os; + ++os; + } + + olnRoute.clear(); + } while(0); + + + // delete PLACE outlines + do + { + std::list::iterator os = olnPlace.begin(); + std::list::iterator oe = olnPlace.end(); + + while( os != oe ) + { + delete *os; + ++os; + } + + olnPlace.clear(); + } while(0); + + + // delete ROUTE KEEPOUT outlines + do + { + std::list::iterator os = olnRouteKeepout.begin(); + std::list::iterator oe = olnRouteKeepout.end(); + + while( os != oe ) + { + delete *os; + ++os; + } + + olnRouteKeepout.clear(); + } while(0); + + + // delete VIA KEEPOUT outlines + do + { + std::list::iterator os = olnViaKeepout.begin(); + std::list::iterator oe = olnViaKeepout.end(); + + while( os != oe ) + { + delete *os; + ++os; + } + + olnViaKeepout.clear(); + } while(0); + + + // delete PLACEMENT KEEPOUT outlines + do + { + std::list::iterator os = olnPlaceKeepout.begin(); + std::list::iterator oe = olnPlaceKeepout.end(); + + while( os != oe ) + { + delete *os; + ++os; + } + + olnPlaceKeepout.clear(); + } while(0); + + + // delete PLACEMENT GROUP outlines + do + { + std::map::iterator os = olnGroup.begin(); + std::map::iterator oe = olnGroup.end(); + + while( os != oe ) + { + delete os->second; + ++os; + } + + olnGroup.clear(); + } while(0); + + boardName.clear(); + olnBoard.SetThickness( thickness ); + + state = FILE_START; + unit = UNIT_MM; + userScale = 1.0; + userXoff = 0.0; + userYoff = 0.0; + + return; +} diff --git a/utils/idftools/idf_parser.h b/utils/idftools/idf_parser.h new file mode 100644 index 0000000000..eb812a997c --- /dev/null +++ b/utils/idftools/idf_parser.h @@ -0,0 +1,657 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 Cirilo Bernardo + * + * 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 + */ + +// NOTE: +// 1. Due to the complexity of objects and the risk of accumulated +// position errors, CAD packages should only delete or add complete +// components. If a component being added already exists, it is +// replaced by the new component IF and only if the CAD type is +// permitted to make such changes. +// +// 2. Internally all units shall be in mm and by default we shall +// write files with mm units. The internal flags mm/thou shall only +// be used to translate data being read from or written to files. +// This avoids the painful management of a mixture of mm and thou. +// The API shall require all dimensions in mm; for people using any +// other unit, it is their responsibility to perform the conversion +// to mm. Conversion back to thou may incur small rounding errors. + +// BUGS: +// 1. IDF compliance: On DELETE operations, ensure that the CAD +// has permission to make these deletions. This is no small task; +// however this compliance task can be deferred since it is not +// essential to the immediate needs of KiCad which are IDF +// export and IDF->VRML conversion + +#ifndef IDF_PARSER_H +#define IDF_PARSER_H + +#include + +class IDF3_COMPONENT; + +class IDF3_COMP_OUTLINE_DATA +{ +private: + double xoff; // X offset from KiCad or X placement from IDF file + double yoff; // Y offset from KiCad or Y placement from IDF file + double zoff; // height offset (specified in IDFv3 spec, corresponds to KiCad Z offset) + double aoff; // angular offset from KiCad or Rotation Angle from IDF file + + IDF3_COMP_OUTLINE* outline; // component outline to use + IDF3_COMPONENT* parent; // associated component + +public: + /** + * Constructor + * creates an object with default settings and no parent or associated outline + */ + IDF3_COMP_OUTLINE_DATA(); + + /** + * Constructor + * creates an object with default settings and the specified parent and associated outline + * + * @param aParent is the owning IDF3_COMPONENT object + * @param aOutline is the outline for this placed component + */ + IDF3_COMP_OUTLINE_DATA( IDF3_COMPONENT* aParent, IDF3_COMP_OUTLINE* aOutline ); + + /** + * Constructor + * creates an object the specified parent and associated outline and the specified + * data. + * + * @param aParent is the owning IDF3_COMPONENT object + * @param aOutline is the outline for this placed component + * @param aXoff is the X offset of this outline in relation to its parent + * @param aYoff is the Y offset of this outline in relation to its parent + * @param aZoff is the board offset of this outline as per IDFv3 specification + * @param aAoff is the rotational offset of this outline in relation to its parent + */ + IDF3_COMP_OUTLINE_DATA( IDF3_COMPONENT* aParent, IDF3_COMP_OUTLINE* aOutline, + double aXoff, double aYoff, double aZoff, double aAngleOff ); + + ~IDF3_COMP_OUTLINE_DATA(); + + /** + * Function SetOffsets + * sets the position and orientation of this outline item in relation to its parent + * + * @param aXoff is the X offset of this outline in relation to its parent + * @param aYoff is the Y offset of this outline in relation to its parent + * @param aZoff is the board offset of this outline as per IDFv3 specification + * @param aAoff is the rotational offset of this outline in relation to its parent + */ + void SetOffsets( double aXoff, double aYoff, double aZoff, double aAngleOff ); + + /** + * Function GetOffsets + * retrieves the position and orientation of this outline item in relation to its parent + * + * @param aXoff is the X offset of this outline in relation to its parent + * @param aYoff is the Y offset of this outline in relation to its parent + * @param aZoff is the board offset of this outline as per IDFv3 specification + * @param aAoff is the rotational offset of this outline in relation to its parent + */ + void GetOffsets( double& aXoff, double& aYoff, double& aZoff, double& aAngleOff ); + + /** + * Function SetParent + * sets the parent object + * + * @param aParent is the owning IDF3_COMPONENT object + */ + void SetParent( IDF3_COMPONENT* aParent ); + + /** + * Function SetOutline + * sets the outline whose position is managed by this object + * + * @param aOutline is the outline for this component + */ + void SetOutline( IDF3_COMP_OUTLINE* aOutline ); + + /** + * Function GetOutline + * retrieves the outline whose position is managed by this object + * + * @return IDF3_COMP_OUTLINE*: the outline for this component + */ + IDF3_COMP_OUTLINE* GetOutline( void ) + { + return outline; + } + + /** + * Function ReadPlaceData + * reads placement data from an open IDFv3 file + * + * @param aBoardFile is the open IDFv3 file + * @param aBoardState is the internal status flag of the IDF parser + * @param aBoard is the IDF3_BOARD object which will store the data + * + * @return bool: true if placement data was successfully read. false if + * no placement data was read; this may happen if the end of the placement + * data was encountered or an error occurred. if an error occurred then + * aBoardState is set to IDF3::FILE_INVALID or IDF3::FILE_ERROR. + */ + bool ReadPlaceData( std::ifstream &aBoardFile, IDF3::FILE_STATE& aBoardState, + IDF3_BOARD *aBoard ); + + /** + * Function WritePlaceData + * writes RECORD 2 and RECORD 3 of a PLACEMENT section as per IDFv3 specification + * + * @param aBoardFile is the open IDFv3 file + * @param aXpos is the X location of the parent component + * @param aYpos is the Y location of the parent component + * @param aAngle is the rotation of the parent component + * @param aRefDes is the reference designator of the parent component + * @param aPlacement is the IDF Placement Status of the parent component + * @param aSide is the IDF Layer Designator (TOP or BOTTOM) + * + * @return bool: true if data was successfully written, otherwise false + */ + bool WritePlaceData( std::ofstream& aBoardFile, double aXpos, double aYpos, double aAngle, + const std::string aRefDes, IDF3::IDF_PLACEMENT aPlacement, + IDF3::IDF_LAYER aSide ); +}; + + +class IDF3_COMPONENT +{ +private: + std::list< IDF3_COMP_OUTLINE_DATA* > components; + std::list< IDF_DRILL_DATA* > drills; + + double xpos; + double ypos; + double angle; + IDF3::IDF_PLACEMENT placement; + IDF3::IDF_LAYER layer; // [TOP/BOTTOM ONLY as per IDF spec] + bool hasPosition; ///< True after SetPosition is called once + std::string refdes; ///< Reference Description (MUST BE UNIQUE) + IDF3_BOARD* parent; + +public: + /** + * Constructor + * sets internal parameters to default values + */ + IDF3_COMPONENT(); + + /** + * Constructor + * sets the parent object and initializes other internal parameters to default values + * + * @param aParent is the owning IDF3_BOARD object + */ + IDF3_COMPONENT( IDF3_BOARD* aParent ); + + ~IDF3_COMPONENT(); + + /** + * Function SetParent + * sets the parent object + * + * @param aParent is the owning IDF3_BOARD object + */ + void SetParent( IDF3_BOARD* aParent ); + + /** + * Function GetCadType + * returns the type of CAD (IDF3::CAD_ELEC, IDF3::CAD_MECH) which instantiated this object + * + * @return IDF3::CAD_TYPE + */ + IDF3::CAD_TYPE GetCadType( void ); + + /** + * Function GetCadType + * returns the IDF UNIT type of the parent object or IDF3::UNIT_INVALID if + * the parent was not set + * + * @return IDF3::IDF_UNIT + */ + IDF3::IDF_UNIT GetUnit( void ); + + /** + * Function SetRefDes + * sets the Reference Designator (RefDes) of this component; the RefDes is shared + * by all outlines associated with this component. + * + * @return bool: true if the RefDes was accepted, otherwise false. Prohibited + * values include empty strings and the word PANEL. + */ + bool SetRefDes( const std::string& aRefDes ); + + /** + * Function GetRefDes + * Retrieves the Reference Designator (RefDes) of this component + * + * @return string: the Reference Designator + */ + const std::string& GetRefDes( void ); + + /** + * Function AddDrill + * adds a drill entry to the component and returns its pointer + * + * @param aDia diameter of the drill (mm) + * @param aXpos X position of the drill (mm) + * @param aYpos Y position of the drill (mm) + * @param aPlating plating type (PTH, NPTH) + * @param aHoleType hole class (PIN, VIA, MTG, TOOL, etc) + * @param aOwner owning CAD system (ECAD, MCAD, UNOWNED) + * + * @return pointer: a pointer to the newly created drill entry or NULL + */ + IDF_DRILL_DATA* AddDrill( double aDia, double aXpos, double aYpos, + IDF3::KEY_PLATING aPlating, + const std::string aHoleType, + IDF3::KEY_OWNER aOwner ); + + /** + * Function AddDrill + * adds the given drill entry to the component and returns the pointer + * to indicate success. A return value of NULL indicates that the item + * was not added and it is the user's responsibility to delete the + * object if necessary. + * + * @param aDrilledHole pointer to a drill entry + * + * @return pointer: aDrilledHole if the function succeeds, otherwise NULL + */ + IDF_DRILL_DATA* AddDrill( IDF_DRILL_DATA* aDrilledHole ); + + /** + * Function DelDrill( double aDia, double aXpos, double aYpos ) + * deletes a drill entry based on its size and location. This operation is + * subject to IDF ownership rules. + * + * @param aDia diameter (mm) of the drilled hole to be deleted + * @param aXpos X position (mm) of the hole to be deleted + * @param aYpos X position (mm) of the hole to be deleted + * + * @return bool: true if a drill was found and deleted, otherwise false. + * If an ownership violation occurs an exception is thrown. + */ + bool DelDrill( double aDia, double aXpos, double aYpos ); + + /** + * Function DelDrill( IDF_DRILL_DATA* aDrill ) + * deletes a drill entry based on pointer. This operation is + * subject to IDF ownership rules. + * + * @param aDrill the pointer associated with the drill entry to be deleted + * + * @return bool: true if a drill was found and deleted, otherwise false. + * If an ownership violation occurs an exception is thrown. + */ + bool DelDrill( IDF_DRILL_DATA* aDrill ); + + /** + * Function GetDrills + * returns a pointer to the internal list of drills. To avoid IDF + * violations, the user should not alter these entries. + */ + const std::list< IDF_DRILL_DATA* >*const GetDrills( void ); + + /** + * Function AddOutlineData + * adds the given component outline data to this component + * + * @param aComponentOutline is a pointer to the outline data to be added + * + * @return true if the operation succeedes, otherwise false + */ + bool AddOutlineData( IDF3_COMP_OUTLINE_DATA* aComponentOutline ); + + /** + * Function DeleteOutlineData( IDF3_COMP_OUTLINE_DATA* aComponentOutline ) + * removes outline data based on the pointer provided. + * + * @param aComponentOutline is a pointer to be deleted from the internal list + * + * @return bool: true if the data was found and deleted, otherwise false + */ + bool DeleteOutlineData( IDF3_COMP_OUTLINE_DATA* aComponentOutline ); + + /** + * Function DeleteOutlineData( size_t aIndex ) + * removes outline data based on the provided index. + * + * @param aIndex is an index to the internal outline list + * + * @return bool: true if the data was deleted, false if the + * index was out of bounds. + */ + bool DeleteOutlineData( size_t aIndex ); + + /** + * Function GetOutlineSize + * returns the number of outlines in the internal list + */ + size_t GetOutlinesSize( void ); + + + /** + * Function GetOutlinesData + * returns a pointer to the internal list of outline data + */ + const std::list< IDF3_COMP_OUTLINE_DATA* >*const GetOutlinesData( void ); + + /** + * Function GetPosition + * retrieves the internal position parameters and returns true if the + * position was previously set, otherwise false. + */ + bool GetPosition( double& aXpos, double& aYpos, double& aAngle, IDF3::IDF_LAYER& aLayer ); + + // NOTE: it may be possible to extend this so that internal drills and outlines + // are moved when the component is moved. However there is always a danger of + // position creep due to the relative position updates. + /** + * Function SetPosition + * sets the internal position parameters and returns true if the + * position was set, false if the position was previously set. This object + * does not allow modification of the position once it is set since this may + * adversely affect the relationship with its internal objects. + * + * @param aXpos is the X position (mm) of the component + * @param aYpos is the Y position (mm) of the component + * @param aAngle is the rotation of the component (degrees) + * @param aLayer is the layer on which the component is places (TOP, BOTTOM) + * + * @return bool: true if the position was set, otherwise false + */ + bool SetPosition( double aXpos, double aYpos, double aAngle, IDF3::IDF_LAYER aLayer ); + + /** + * Function GetPlacement + * returns the IDF placement value of this component (UNPLACED, PLACED, ECAD, MCAD) + */ + IDF3::IDF_PLACEMENT GetPlacement( void ); + + /** + * Function SetPlacement + * sets the placement value of the component subject to ownership rules. + * An exception is thrown if aPlacementValue is invalid or an ownership + * violation occurs. + */ + void SetPlacement( IDF3::IDF_PLACEMENT aPlacementValue ); + + /** + * Function WriteDrillData + * writes the internal drill data to an IDFv3 .DRILLED_HOLES section + * + * @param aBoardFile is an IDFv3 file opened for writing + * + * @return bool: true if the operation succeeded, otherwise false + */ + bool WriteDrillData( std::ofstream& aBoardFile ); + + /** + * Function WritePlaceData + * writes the component placement data to an IDFv3 .PLACEMENT section + * + * @param aBoardFile is an IDFv3 file opened for writing + * + * @return bool: true if the operation succeeded, otherwise false + */ + bool WritePlaceData( std::ofstream& aBoardFile ); +}; + +class IDF3_BOARD +{ +private: + std::list< IDF_NOTE* > notes; // IDF notes + std::list< std::string > noteComments; // comment list for NOTES section + std::list< std::string > drillComments; // comment list for DRILL section + std::list< std::string > placeComments; // comment list for PLACEMENT section + std::list board_drills; + std::map< std::string, IDF3_COMPONENT*> components; // drill and placement data for components + std::map< std::string, IDF3_COMP_OUTLINE*> compOutlines; // component outlines (data for library file) + std::string boardName; + IDF3::FILE_STATE state; + IDF3::CAD_TYPE cadType; + IDF3::IDF_UNIT unit; + + std::string idfSource; // SOURCE string to use when writing BOARD and LIBRARY headers + std::string brdSource; // SOURCE string as retrieved from a BOARD file + std::string libSource; // SOURCE string as retrieved from a LIBRARY file + std::string brdDate; // DATE string from BOARD file + std::string libDate; // DATE string from LIBRARY file + int brdFileVersion; // File Version from BOARD file + int libFileVersion; // File Version from LIBRARY file + + int userPrec; // user may store any integer here + double userScale; // user may store a scale for translating to arbitrary units + double userXoff; // user may specify an arbitrary X/Y offset + double userYoff; + + // main board outline and cutouts + BOARD_OUTLINE olnBoard; + // OTHER outlines + std::map olnOther; + // ROUTE outlines + std::list olnRoute; + // PLACEMENT outlines + std::list olnPlace; + // ROUTE KEEPOUT outlines + std::list olnRouteKeepout; + // VIA KEEPOUT outlines + std::list olnViaKeepout; + // PLACE KEEPOUT outlines + std::list olnPlaceKeepout; + // PLACEMENT GROUP outlines + std::multimap olnGroup; + + // Set the unit; this can only be done internally upon + // reading a file or saving + bool setUnit( IDF3::IDF_UNIT aUnit, bool convert = false ); + + IDF_DRILL_DATA* addCompDrill( double aDia, double aXpos, double aYpos, + IDF3::KEY_PLATING aPlating, + const std::string aHoleType, + IDF3::KEY_OWNER aOwner, + const std::string& aRefDes ); + + IDF_DRILL_DATA* addCompDrill( IDF_DRILL_DATA* aDrilledHole ); + + bool delCompDrill( double aDia, double aXpos, double aYpos, std::string aRefDes ); + + // read the DRILLED HOLES section + bool readBrdDrills( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBoardState ); + // read the NOTES section + bool readBrdNotes( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBoardState ); + // read the component placement section + bool readBrdPlacement( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBoardState ); + // read the board HEADER + bool readBrdHeader( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBoardState ); + // read individual board sections; pay attention to IDFv3 section specifications + bool readBrdSection( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBoardState ); + // read the board file data + bool readBoardFile( const std::string& aFileName ); + + // write the board file data + bool writeBoardFile( const std::string& aFileName ); + + // read the library sections (outlines) + bool readLibSection( std::ifstream& aLibFile, IDF3::FILE_STATE& aLibState, IDF3_BOARD* aBoard ); + // read the library HEADER + bool readLibHeader( std::ifstream& aLibFile, IDF3::FILE_STATE& aLibState ); + // read the library file data + bool readLibFile( const std::string& aFileName ); + + // write the library file data + bool writeLibFile( const std::string& aFileName ); + +public: + IDF3_BOARD( IDF3::CAD_TYPE aCadType ); + virtual ~IDF3_BOARD(); + + IDF3::CAD_TYPE GetCadType( void ); + + // retrieve the nominal unit used in reading/writing + // data. This is primarily for use by owned objects + // and is only of informational use for the end user. + // Internally all data is represented in mm and the + // end user must use only mm in the API. + IDF3::IDF_UNIT GetUnit( void ); + + void SetBoardName( std::string aBoardName ); + const std::string& GetBoardName( void ); + + bool SetBoardThickness( double aBoardThickness ); + double GetBoardThickness( void ); + + bool ReadFile( const wxString& aFullFileName ); + bool WriteFile( const wxString& aFullFileName, bool aUnitMM = true, bool aForceUnitFlag = false ); + + const std::string& GetIDFSource( void ); + void SetIDFSource( const std::string& aIDFSource); + const std::string& GetBoardSource( void ); + const std::string& GetLibrarySource( void ); + const std::string& GetBoardDate( void ); + const std::string& GetLibraryDate( void ); + int GetBoardVersion( void ); + bool SetBoardVersion( int aVersion ); + int GetLibraryVersion( void ); + bool SetLibraryVersion( int aVersion ); + + double GetUserScale( void ); + bool SetUserScale( double aScaleFactor ); + + int GetUserPrecision( void ); + bool SetUserPrecision( int aPrecision ); + + void GetUserOffset( double& aXoff, double& aYoff ); + void SetUserOffset( double aXoff, double aYoff ); + + bool AddBoardOutline( IDF_OUTLINE* aOutline ); + bool DelBoardOutline( IDF_OUTLINE* aOutline ); + bool DelBoardOutline( size_t aIndex ); + size_t GetBoardOutlinesSize( void ); + BOARD_OUTLINE* GetBoardOutline( void ); + const std::list< IDF_OUTLINE* >*const GetBoardOutlines( void ); + + /// XXX - TO BE IMPLEMENTED + // AddDrillComment + // AddPlacementComment + // GetDrillComments() + // GetPlacementComments() + // ClearDrillComments() + // ClearPlacementComments() + // AddNoteComment + // GetNoteComments + // AddNote + // + // const std::map*const GetOtherOutlines() + // size_t GetOtherOutlinesSize() + // OTHER_OUTLINE* AddOtherOutline( OTHER_OUTLINE* aOtherOutline ) + // bool DelOtherOutline( int aIndex ) + // bool DelOtherOutline( OTHER_OUTLINE* aOtherOutline ) + // + // const std::list*const GetRouteOutlines() + // size_t GetRouteOutlinesSize() + // ROUTE_OUTLINE* AddRouteOutline( ROUTE_OUTLINE* aRouteOutline ) + // bool DelRouteOutline( int aIndex ) + // bool DelRouteOutline( ROUTE_OUTLINE* aRouteOutline ) + // + // const std::list*const GetPlacementOutlines() + // size_t GetPlacementOutlinesSize() + // PLACE_OUTLINE* AddPlacementOutline( PLACE_OUTLINE* aPlaceOutline ) + // bool DelPlacementOutline( int aIndex ) + // bool DelPlacementOutline( PLACE_OUTLINE* aPlaceOutline ) + // + // const std::list*const GetRouteKeepOutOutlines() + // size_t GetRouteKeepOutOutlinesSize() + // ROUTE_KO_OUTLINE* AddRouteKeepoutOutline( ROUTE_KO_OUTLINE* aRouteKeepOut ) + // bool DelRouteKeepOutOutline( int aIndex ) + // bool DelRouteKeepOutOutline( ROUTE_KO_OUTLINE* aRouteKeepOut ) + // + // const std::list*const GetViaKeepOutOutlines() + // size_t GetViaKeepOutOutlinesSize() + // VIA_KO_OUTLINE* AddViaKeepoutOutline( VIA_KO_OUTLINE* aViaKeepOut ) + // bool DelViaKeepOutOutline( int aIndex ) + // bool DelViaKeepOutOutline( VIA_KO_OUTLINE* aViaKeepOut ) + // + // const std::list*const GetPlacementKeepOutOutlines() + // size_t GetPlacementKeepOutOutlinesSize() + // PLACE_KO_OUTLINE* AddPlacementKeepoutOutline( PLACE_KO_OUTLINE* aPlaceKeepOut ) + // bool DelPlacementKeepOutOutline( int aIndex ) + // bool DelPlacementKeepOutOutline( PLACE_KO_OUTLINE* aPlaceKeepOut ) + // + // const std::multimap*const GetGroupOutlines() + // size_t GetGroupOutlinesSize() + // GROUP_OUTLINE* AddGroupOutline( GROUP_OUTLINE* aGroupOutline ) + // bool DelGroupOutline( int aIndex ) + // bool DelGroupOutline( GROUP_OUTLINE* aGroupOutline ) + + std::list& GetBoardDrills( void ) + { + return board_drills; + } + + IDF_DRILL_DATA* AddBoardDrill( double aDia, double aXpos, double aYpos, + IDF3::KEY_PLATING aPlating, + const std::string aHoleType, + IDF3::KEY_OWNER aOwner ); + + IDF_DRILL_DATA* AddDrill( IDF_DRILL_DATA* aDrilledHole ); + + bool DelBoardDrill( double aDia, double aXpos, double aYpos ); + + // a slot is a deficient representation of a kicad slotted hole; + // it is usually associated with a component but IDFv3 does not + // provide for such an association. + bool AddSlot( double aWidth, double aLength, double aOrientation, double aX, double aY ); + + bool AddComponent( IDF3_COMPONENT* aComponent ); + bool DelComponent( IDF3_COMPONENT* aComponent ); + bool DelComponent( size_t aIndex ); + size_t GetComponentsSize( void ); + std::map< std::string, IDF3_COMPONENT* >*const GetComponents( void ); + IDF3_COMPONENT* FindComponent( std::string aRefDes ); + + // returns a pointer to a component outline object or NULL + // if the object doesn't exist + IDF3_COMP_OUTLINE* GetComponentOutline( const std::string aGeomName, + const std::string aPartName, + wxString aFullFileName ); + + // returns a pointer to the component outline object with the + // unique ID aComponentID + IDF3_COMP_OUTLINE* GetComponentOutline( std::string aComponentID ); + + // returns a pointer to the outline "NOGEOM NOPART" which is substituted + // whenever a true outline cannot be found or is defective + IDF3_COMP_OUTLINE* GetInvalidOutline( const std::string& aGeomName, const std::string& aPartName ); + + // clears all data + void Clear( void ); +}; + +#endif // IDF_PARSER_H diff --git a/utils/idftools/idf_rect.cpp b/utils/idftools/idf_rect.cpp index 7a9392ab5c..17b145b255 100644 --- a/utils/idftools/idf_rect.cpp +++ b/utils/idftools/idf_rect.cpp @@ -98,7 +98,9 @@ int main( int argc, char **argv ) tstr.clear(); tstr.str( line ); - if( (tstr >> width) && width >= 0.001 ) + + tstr >> width; + if( !tstr.fail() && width >= 0.001 ) ok = true; } @@ -112,7 +114,9 @@ int main( int argc, char **argv ) tstr.clear(); tstr.str( line ); - if( (tstr >> length) && length > 0.0 ) + + tstr >> length; + if( !tstr.fail() && length > 0.0 ) ok = true; } @@ -126,7 +130,9 @@ int main( int argc, char **argv ) tstr.clear(); tstr.str( line ); - if( (tstr >> height) && height >= 0.001 ) + + tstr >> height; + if( !tstr.fail() && height >= 0.001 ) ok = true; } @@ -140,7 +146,9 @@ int main( int argc, char **argv ) tstr.clear(); tstr.str( line ); - if( (tstr >> chamfer) && chamfer >= 0.0 ) + + tstr >> chamfer; + if( !tstr.fail() && chamfer >= 0.0 ) { if( chamfer > width / 3.0 || chamfer > length / 3.0 ) cout << "* WARNING: chamfer must be <= MIN( width, length )/3\n"; @@ -182,7 +190,9 @@ int main( int argc, char **argv ) tstr.clear(); tstr.str( line ); - if( (tstr >> wireDia) && wireDia >= 0.001 ) + + tstr >> wireDia; + if( !tstr.fail() && wireDia >= 0.001 ) { if( wireDia >= length ) cout << "* WARNING: wire diameter must be < length\n"; @@ -201,7 +211,9 @@ int main( int argc, char **argv ) tstr.clear(); tstr.str( line ); - if( (tstr >> pitch) && pitch >= 0.001 ) + + tstr >> pitch; + if( !tstr.fail() && pitch >= 0.001 ) { if( pitch <= ( length + wireDia ) / 2.0 ) cout << "* WARNING: pitch must be > (length + wireDia)/2\n"; diff --git a/utils/idftools/vrml_layer.cpp b/utils/idftools/vrml_layer.cpp new file mode 100644 index 0000000000..3e736a41bc --- /dev/null +++ b/utils/idftools/vrml_layer.cpp @@ -0,0 +1,1578 @@ +/* + * file: vrml_layer.cpp + * + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 Cirilo Bernardo + * + * 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 + */ + +/* + * NOTES ON OUTPUT PRECISION: + * + * If we use %.6f then we have no need for special unit dependent formatting: + * + * inch: .0254 microns + * mm: 0.001 microns + * m: 1 micron + * + */ + +#include +#include +#include +#include +#include + +#include // CALLBACK definition, needed on Windows + +#ifndef CALLBACK +#define CALLBACK +#endif + +#define GLCALLBACK(x) (( void (CALLBACK*)() )&(x)) + +// minimum sides to a circle +#define MIN_NSIDES 6 + +static void FormatDoublet( double x, double y, int precision, std::string& strx, std::string& stry ) +{ + std::ostringstream ostr; + + ostr << std::fixed << std::setprecision( precision ); + + ostr << x; + strx = ostr.str(); + + ostr.str( "" ); + ostr << y; + stry = ostr.str(); + + while( *strx.rbegin() == '0' ) + strx.erase( strx.size() - 1 ); + + while( *stry.rbegin() == '0' ) + stry.erase( stry.size() - 1 ); +} + + +static void FormatSinglet( double x, int precision, std::string& strx ) +{ + std::ostringstream ostr; + + ostr << std::fixed << std::setprecision( precision ); + + ostr << x; + strx = ostr.str(); + + while( *strx.rbegin() == '0' ) + strx.erase( strx.size() - 1 ); +} + + +int VRML_LAYER::calcNSides( double aRadius, double aAngle ) +{ + // check #segments on ends of arc + int maxSeg = maxArcSeg * aAngle / M_PI; + + if( maxSeg < 3 ) + maxSeg = 3; + + int csides = aRadius * M_PI / minSegLength; + + if( csides < 0 ) + csides = -csides; + + if( csides > maxSeg ) + { + if( csides < 2 * maxSeg ) + csides /= 2; + else + csides = (((double) csides) * minSegLength / maxSegLength ); + } + + if( csides < 3 ) + csides = 3; + + if( (csides & 1) == 0 ) + csides += 1; + + return csides; +} + + +static void CALLBACK vrml_tess_begin( GLenum cmd, void* user_data ) +{ + VRML_LAYER* lp = (VRML_LAYER*) user_data; + + lp->glStart( cmd ); +} + + +static void CALLBACK vrml_tess_end( void* user_data ) +{ + VRML_LAYER* lp = (VRML_LAYER*) user_data; + + lp->glEnd(); +} + + +static void CALLBACK vrml_tess_vertex( void* vertex_data, void* user_data ) +{ + VRML_LAYER* lp = (VRML_LAYER*) user_data; + + lp->glPushVertex( (VERTEX_3D*) vertex_data ); +} + + +static void CALLBACK vrml_tess_err( GLenum errorID, void* user_data ) +{ + VRML_LAYER* lp = (VRML_LAYER*) user_data; + + lp->Fault = true; + lp->SetGLError( errorID ); +} + + +static void CALLBACK vrml_tess_combine( GLdouble coords[3], void* vertex_data[4], + GLfloat weight[4], void** outData, void* user_data ) +{ + VRML_LAYER* lp = (VRML_LAYER*) user_data; + + *outData = lp->AddExtraVertex( coords[0], coords[1] ); +} + + +VRML_LAYER::VRML_LAYER() +{ + // arc parameters suitable to mm measurements + maxArcSeg = 48; + minSegLength = 0.1; + maxSegLength = 0.5; + + fix = false; + Fault = false; + idx = 0; + ord = 0; + glcmd = 0; + pholes = NULL; + + tess = gluNewTess(); + + if( !tess ) + return; + + // set up the tesselator callbacks + gluTessCallback( tess, GLU_TESS_BEGIN_DATA, GLCALLBACK( vrml_tess_begin ) ); + + gluTessCallback( tess, GLU_TESS_VERTEX_DATA, GLCALLBACK( vrml_tess_vertex ) ); + + gluTessCallback( tess, GLU_TESS_END_DATA, GLCALLBACK( vrml_tess_end ) ); + + gluTessCallback( tess, GLU_TESS_ERROR_DATA, GLCALLBACK( vrml_tess_err ) ); + + gluTessCallback( tess, GLU_TESS_COMBINE_DATA, GLCALLBACK( vrml_tess_combine ) ); + + gluTessProperty( tess, GLU_TESS_WINDING_RULE, GLU_TESS_WINDING_POSITIVE ); + + gluTessNormal( tess, 0, 0, 1 ); +} + + +VRML_LAYER::~VRML_LAYER() +{ + Clear(); + + if( tess ) + { + gluDeleteTess( tess ); + tess = NULL; + } +} + + +void VRML_LAYER::GetArcParams( int& aMaxSeg, double& aMinLength, double& aMaxLength ) +{ + aMaxSeg = maxArcSeg; + aMinLength = minSegLength; + aMaxLength = maxSegLength; +} + +bool VRML_LAYER::SetArcParams( int aMaxSeg, double aMinLength, double aMaxLength ) +{ + if( aMaxSeg < 8 ) + aMaxSeg = 8; + + if( aMinLength <= 0 || aMaxLength <= aMinLength ) + return false; + + maxArcSeg = aMaxSeg; + minSegLength = aMinLength; + maxSegLength = aMaxLength; + return true; +} + + +// clear all data +void VRML_LAYER::Clear( void ) +{ + int i; + + fix = false; + idx = 0; + + for( i = contours.size(); i > 0; --i ) + { + delete contours.back(); + contours.pop_back(); + } + + while( !areas.empty() ) + areas.pop_back(); + + for( i = vertices.size(); i > 0; --i ) + { + delete vertices.back(); + vertices.pop_back(); + } + + clearTmp(); +} + + +// clear ephemeral data in between invocations of the tesselation routine +void VRML_LAYER::clearTmp( void ) +{ + unsigned int i; + + Fault = false; + hidx = 0; + eidx = 0; + ord = 0; + glcmd = 0; + + while( !triplets.empty() ) + triplets.pop_back(); + + for( i = outline.size(); i > 0; --i ) + { + delete outline.back(); + outline.pop_back(); + } + + for( i = ordmap.size(); i > 0; --i ) + ordmap.pop_back(); + + for( i = extra_verts.size(); i > 0; --i ) + { + delete extra_verts.back(); + extra_verts.pop_back(); + } + + // note: unlike outline and extra_verts, + // vlist is not responsible for memory management + for( i = vlist.size(); i > 0; --i ) + vlist.pop_back(); + + // go through the vertex list and reset ephemeral parameters + for( i = 0; i < vertices.size(); ++i ) + { + vertices[i]->o = -1; + } +} + + +// create a new contour to be populated; returns an index +// into the contour list or -1 if there are problems +int VRML_LAYER::NewContour( void ) +{ + if( fix ) + return -1; + + std::list* contour = new std::list; + + if( !contour ) + return -1; + + contours.push_back( contour ); + areas.push_back( 0.0 ); + + return contours.size() - 1; +} + + +// adds a vertex to the existing list and places its index in +// an existing contour; returns true if OK, +// false otherwise (indexed contour does not exist) +bool VRML_LAYER::AddVertex( int aContourID, double aXpos, double aYpos ) +{ + if( fix ) + { + error = "AddVertex(): no more vertices may be added (Tesselate was previously executed)"; + return false; + } + + if( aContourID < 0 || (unsigned int) aContourID >= contours.size() ) + { + error = "AddVertex(): aContour is not within a valid range"; + return false; + } + + VERTEX_3D* vertex = new VERTEX_3D; + + if( !vertex ) + { + error = "AddVertex(): a new vertex could not be allocated"; + return false; + } + + vertex->x = aXpos; + vertex->y = aYpos; + vertex->i = idx++; + vertex->o = -1; + + VERTEX_3D* v2 = NULL; + + if( contours[aContourID]->size() > 0 ) + v2 = vertices[ contours[aContourID]->back() ]; + + vertices.push_back( vertex ); + contours[aContourID]->push_back( vertex->i ); + + if( v2 ) + areas[aContourID] += ( aXpos - v2->x ) * ( aYpos + v2->y ); + + return true; +} + + +// ensure the winding of a contour with respect to the normal (0, 0, 1); +// set 'hole' to true to ensure a hole (clockwise winding) +bool VRML_LAYER::EnsureWinding( int aContourID, bool aHoleFlag ) +{ + if( aContourID < 0 || (unsigned int) aContourID >= contours.size() ) + { + error = "EnsureWinding(): aContour is outside the valid range"; + return false; + } + + std::list* cp = contours[aContourID]; + + if( cp->size() < 3 ) + { + error = "EnsureWinding(): there are fewer than 3 vertices"; + return false; + } + + double dir = areas[aContourID]; + + VERTEX_3D* vp0 = vertices[ cp->back() ]; + VERTEX_3D* vp1 = vertices[ cp->front() ]; + + dir += ( vp1->x - vp0->x ) * ( vp1->y + vp0->y ); + + // if dir is positive, winding is CW + if( ( aHoleFlag && dir < 0 ) || ( !aHoleFlag && dir > 0 ) ) + { + cp->reverse(); + areas[aContourID] = -areas[aContourID]; + } + + return true; +} + + +bool VRML_LAYER::AppendCircle( double aXpos, double aYpos, + double aRadius, int aContourID, + bool aHoleFlag ) +{ + if( aContourID < 0 || (unsigned int) aContourID >= contours.size() ) + { + error = "AppendCircle(): invalid contour (out of range)"; + return false; + } + + int nsides = M_PI * 2.0 * aRadius / minSegLength; + + if( nsides > maxArcSeg ) + { + if( nsides > 2 * maxArcSeg ) + { + // use segments approx. maxAr + nsides = M_PI * 2.0 * aRadius / maxSegLength; + } + else + { + nsides /= 2; + } + } + + if( nsides < MIN_NSIDES ) + nsides = MIN_NSIDES; + + // even numbers give prettier results for circles + if( nsides & 1 ) + nsides += 1; + + double da = M_PI * 2.0 / nsides; + + bool fail = false; + + if( aHoleFlag ) + { + fail |= !AddVertex( aContourID, aXpos + aRadius, aYpos ); + + for( double angle = da; angle < M_PI * 2; angle += da ) + fail |= !AddVertex( aContourID, aXpos + aRadius * cos( angle ), + aYpos - aRadius * sin( angle ) ); + } + else + { + fail |= !AddVertex( aContourID, aXpos + aRadius, aYpos ); + + for( double angle = da; angle < M_PI * 2; angle += da ) + fail |= !AddVertex( aContourID, aXpos + aRadius * cos( angle ), + aYpos + aRadius * sin( angle ) ); + } + + return !fail; +} + + +// adds a circle the existing list; if 'hole' is true the contour is +// a hole. Returns true if OK. +bool VRML_LAYER::AddCircle( double aXpos, double aYpos, double aRadius, bool aHoleFlag ) +{ + int pad = NewContour(); + + if( pad < 0 ) + { + error = "AddCircle(): failed to add a contour"; + return false; + } + + return AppendCircle( aXpos, aYpos, aRadius, pad, aHoleFlag ); +} + + +// adds a slotted pad with orientation given by angle; if 'hole' is true the +// contour is a hole. Returns true if OK. +bool VRML_LAYER::AddSlot( double aCenterX, double aCenterY, + double aSlotLength, double aSlotWidth, + double aAngle, bool aHoleFlag ) +{ + aAngle *= M_PI / 180.0; + + if( aSlotWidth > aSlotLength ) + { + aAngle += M_PI2; + std::swap( aSlotLength, aSlotWidth ); + } + + aSlotWidth /= 2.0; + aSlotLength = aSlotLength / 2.0 - aSlotWidth; + + int csides = calcNSides( aSlotWidth, M_PI ); + + double capx, capy; + + capx = aCenterX + cos( aAngle ) * aSlotLength; + capy = aCenterY + sin( aAngle ) * aSlotLength; + + double ang, da; + int i; + int pad = NewContour(); + + if( pad < 0 ) + { + error = "AddCircle(): failed to add a contour"; + return false; + } + + da = M_PI / csides; + bool fail = false; + + if( aHoleFlag ) + { + for( ang = aAngle + M_PI2, i = 0; i < csides; ang -= da, ++i ) + fail |= !AddVertex( pad, capx + aSlotWidth * cos( ang ), + capy + aSlotWidth * sin( ang ) ); + + ang = aAngle - M_PI2; + fail |= !AddVertex( pad, capx + aSlotWidth * cos( ang ), + capy + aSlotWidth * sin( ang ) ); + + capx = aCenterX - cos( aAngle ) * aSlotLength; + capy = aCenterY - sin( aAngle ) * aSlotLength; + + for( ang = aAngle - M_PI2, i = 0; i < csides; ang -= da, ++i ) + fail |= !AddVertex( pad, capx + aSlotWidth * cos( ang ), + capy + aSlotWidth * sin( ang ) ); + + ang = aAngle + M_PI2; + fail |= !AddVertex( pad, capx + aSlotWidth * cos( ang ), + capy + aSlotWidth * sin( ang ) ); + } + else + { + for( ang = aAngle - M_PI2, i = 0; i < csides; ang += da, ++i ) + fail |= !AddVertex( pad, capx + aSlotWidth * cos( ang ), + capy + aSlotWidth * sin( ang ) ); + + ang = aAngle + M_PI2; + fail |= !AddVertex( pad, capx + aSlotWidth * cos( ang ), + capy + aSlotWidth * sin( ang ) ); + + capx = aCenterX - cos( aAngle ) * aSlotLength; + capy = aCenterY - sin( aAngle ) * aSlotLength; + + for( ang = aAngle + M_PI2, i = 0; i < csides; ang += da, ++i ) + fail |= !AddVertex( pad, capx + aSlotWidth * cos( ang ), + capy + aSlotWidth * sin( ang ) ); + + ang = aAngle - M_PI2; + fail |= !AddVertex( pad, capx + aSlotWidth * cos( ang ), + capy + aSlotWidth * sin( ang ) ); + } + + return !fail; +} + + +// adds an arc to the given center, start point, pen width, and angle (degrees). +bool VRML_LAYER::AppendArc( double aCenterX, double aCenterY, double aRadius, + double aStartAngle, double aAngle, int aContourID ) +{ + if( aContourID < 0 || (unsigned int) aContourID >= contours.size() ) + { + error = "AppendArc(): invalid contour (out of range)"; + return false; + } + + aAngle = aAngle / 180.0 * M_PI; + aStartAngle = aStartAngle / 180.0 * M_PI; + + int nsides = calcNSides( aRadius, aAngle ); + + double da = aAngle / nsides; + + bool fail = false; + + if( aAngle > 0 ) + { + aAngle += aStartAngle; + for( double ang = aStartAngle; ang < aAngle; ang += da ) + fail |= !AddVertex( aContourID, aCenterX + aRadius * cos( ang ), + aCenterY + aRadius * sin( ang ) ); + } + else + { + aAngle += aStartAngle; + for( double ang = aStartAngle; ang > aAngle; ang += da ) + fail |= !AddVertex( aContourID, aCenterX + aRadius * cos( ang ), + aCenterY + aRadius * sin( ang ) ); + } + + return !fail; +} + + +// adds an arc with the given center, start point, pen width, and angle (degrees). +bool VRML_LAYER::AddArc( double aCenterX, double aCenterY, double aStartX, double aStartY, + double aArcWidth, double aAngle, bool aHoleFlag ) +{ + aAngle *= M_PI / 180.0; + + // we don't accept small angles; in fact, 1 degree ( 0.01745 ) is already + // way too small but we must set a limit somewhere + if( aAngle < 0.01745 && aAngle > -0.01745 ) + { + error = "AddArc(): angle is too small: abs( angle ) < 1 degree"; + return false; + } + + double rad = sqrt( (aStartX - aCenterX) * (aStartX - aCenterX) + + (aStartY - aCenterY) * (aStartY - aCenterY) ); + + aArcWidth /= 2.0; // this is the radius of the caps + + // we will not accept an arc with an inner radius close to zero so we + // set a limit here. the end result will vary somewhat depending on + // the output units + if( aArcWidth >= ( rad * 1.01 ) ) + { + error = "AddArc(): width/2 exceeds radius*1.01"; + return false; + } + + // calculate the radii of the outer and inner arcs + double orad = rad + aArcWidth; + double irad = rad - aArcWidth; + + int osides = calcNSides( orad, aAngle ); + int isides = calcNSides( irad, aAngle ); + int csides = calcNSides( aArcWidth, M_PI ); + + double stAngle = atan2( aStartY - aCenterY, aStartX - aCenterX ); + double endAngle = stAngle + aAngle; + + // calculate ends of inner and outer arc + double oendx = aCenterX + orad* cos( endAngle ); + double oendy = aCenterY + orad* sin( endAngle ); + double ostx = aCenterX + orad* cos( stAngle ); + double osty = aCenterY + orad* sin( stAngle ); + + double iendx = aCenterX + irad* cos( endAngle ); + double iendy = aCenterY + irad* sin( endAngle ); + double istx = aCenterX + irad* cos( stAngle ); + double isty = aCenterY + irad* sin( stAngle ); + + if( ( aAngle < 0 && !aHoleFlag ) || ( aAngle > 0 && aHoleFlag ) ) + { + aAngle = -aAngle; + std::swap( stAngle, endAngle ); + std::swap( oendx, ostx ); + std::swap( oendy, osty ); + std::swap( iendx, istx ); + std::swap( iendy, isty ); + } + + int arc = NewContour(); + + if( arc < 0 ) + { + error = "AddArc(): could not create a contour"; + return false; + } + + // trace the outer arc: + int i; + double ang; + double da = aAngle / osides; + + for( ang = stAngle, i = 0; i < osides; ang += da, ++i ) + AddVertex( arc, aCenterX + orad * cos( ang ), aCenterY + orad * sin( ang ) ); + + // trace the first cap + double capx = ( iendx + oendx ) / 2.0; + double capy = ( iendy + oendy ) / 2.0; + + if( aHoleFlag ) + da = -M_PI / csides; + else + da = M_PI / csides; + + for( ang = endAngle, i = 0; i < csides; ang += da, ++i ) + AddVertex( arc, capx + aArcWidth * cos( ang ), capy + aArcWidth * sin( ang ) ); + + // trace the inner arc: + da = -aAngle / isides; + + for( ang = endAngle, i = 0; i < isides; ang += da, ++i ) + AddVertex( arc, aCenterX + irad * cos( ang ), aCenterY + irad * sin( ang ) ); + + // trace the final cap + capx = ( istx + ostx ) / 2.0; + capy = ( isty + osty ) / 2.0; + + if( aHoleFlag ) + da = -M_PI / csides; + else + da = M_PI / csides; + + for( ang = stAngle + M_PI, i = 0; i < csides; ang += da, ++i ) + AddVertex( arc, capx + aArcWidth * cos( ang ), capy + aArcWidth * sin( ang ) ); + + return true; +} + + +// tesselates the contours in preparation for a 3D output; +// returns true if all was fine, false otherwise +bool VRML_LAYER::Tesselate( VRML_LAYER* holes ) +{ + if( !tess ) + { + error = "Tesselate(): GLU tesselator was not initialized"; + return false; + } + + pholes = holes; + Fault = false; + + if( contours.size() < 1 || vertices.size() < 3 ) + { + error = "Tesselate(): not enough vertices"; + return false; + } + + // finish the winding calculation on all vertices prior to setting 'fix' + if( !fix ) + { + for( unsigned int i = 0; i < contours.size(); ++i ) + { + if( contours[i]->size() < 3 ) + continue; + + VERTEX_3D* vp0 = vertices[ contours[i]->back() ]; + VERTEX_3D* vp1 = vertices[ contours[i]->front() ]; + areas[i] += ( vp1->x - vp0->x ) * ( vp1->y + vp0->y ); + } + } + + // prevent the addition of any further contours and contour vertices + fix = true; + + // clear temporary internals which may have been used in a previous run + clearTmp(); + + // request an outline + gluTessProperty( tess, GLU_TESS_BOUNDARY_ONLY, GL_TRUE ); + + // adjust internal indices for extra points and holes + if( holes ) + hidx = holes->GetSize(); + else + hidx = 0; + + eidx = idx + hidx; + + // open the polygon + gluTessBeginPolygon( tess, this ); + + pushVertices( false ); + + // close the polygon + gluTessEndPolygon( tess ); + + if( Fault ) + return false; + + // push the (solid) outline to the tesselator + if( !pushOutline( holes ) ) + return false; + + // add the holes contained by this object + pushVertices( true ); + + // import external holes (if any) + if( hidx && ( holes->Import( idx, tess ) < 0 ) ) + { + std::ostringstream ostr; + ostr << "Tesselate():FAILED: " << holes->GetError(); + error = ostr.str(); + return NULL; + } + + if( Fault ) + return false; + + // erase the previous outline data and vertex order + // but preserve the extra vertices + for( int i = outline.size(); i > 0; --i ) + { + delete outline.back(); + outline.pop_back(); + } + + for( unsigned int i = ordmap.size(); i > 0; --i ) + ordmap.pop_back(); + + // go through the vertex lists and reset ephemeral parameters + for( unsigned int i = 0; i < vertices.size(); ++i ) + { + vertices[i]->o = -1; + } + + for( unsigned int i = 0; i < extra_verts.size(); ++i ) + { + extra_verts[i]->o = -1; + } + + ord = 0; + + // close the polygon; we now have all the data necessary for the tesselation + gluTessEndPolygon( tess ); + + // request a tesselated surface + gluTessProperty( tess, GLU_TESS_BOUNDARY_ONLY, GL_FALSE ); + + if( !pushOutline( holes ) ) + return false; + + gluTessEndPolygon( tess ); + + if( Fault ) + return false; + + return true; +} + + +bool VRML_LAYER::pushOutline( VRML_LAYER* holes ) +{ + // traverse the outline list to push all used vertices + if( outline.size() < 1 ) + { + error = "pushOutline() failed: no vertices to push"; + return false; + } + + gluTessBeginPolygon( tess, this ); + + std::list*>::const_iterator obeg = outline.begin(); + std::list*>::const_iterator oend = outline.end(); + + int pi; + std::list::const_iterator begin; + std::list::const_iterator end; + GLdouble pt[3]; + VERTEX_3D* vp; + + while( obeg != oend ) + { + if( (*obeg)->size() < 3 ) + { + ++obeg; + continue; + } + + gluTessBeginContour( tess ); + + begin = (*obeg)->begin(); + end = (*obeg)->end(); + + while( begin != end ) + { + pi = *begin; + + if( pi < 0 || (unsigned int) pi > ordmap.size() ) + { + error = "pushOutline():BUG: *outline.begin() is not a valid index to ordmap"; + return false; + } + + // retrieve the actual index + pi = ordmap[pi]; + + vp = getVertexByIndex( pi, holes ); + + if( !vp ) + { + error = "pushOutline():: BUG: ordmap[n] is not a valid index to vertices[]"; + return false; + } + + pt[0] = vp->x; + pt[1] = vp->y; + pt[2] = 0.0; + gluTessVertex( tess, pt, vp ); + ++begin; + } + + gluTessEndContour( tess ); + ++obeg; + } + + return true; +} + + +// writes out the vertex list for a planar feature +bool VRML_LAYER::WriteVertices( double aZcoord, std::ofstream& aOutFile, int aPrecision ) +{ + if( ordmap.size() < 3 ) + { + error = "WriteVertices(): not enough vertices"; + return false; + } + + if( aPrecision < 4 ) + aPrecision = 4; + + int i, j; + + VERTEX_3D* vp = getVertexByIndex( ordmap[0], pholes ); + + if( !vp ) + return false; + + std::string strx, stry, strz; + FormatDoublet( vp->x, vp->y, aPrecision, strx, stry ); + FormatSinglet( aZcoord, aPrecision, strz ); + + aOutFile << strx << " " << stry << " " << strz; + + for( i = 1, j = ordmap.size(); i < j; ++i ) + { + vp = getVertexByIndex( ordmap[i], pholes ); + + if( !vp ) + return false; + + FormatDoublet( vp->x, vp->y, aPrecision, strx, stry ); + + if( i & 1 ) + aOutFile << ", " << strx << " " << stry << " " << strz; + else + aOutFile << ",\n" << strx << " " << stry << " " << strz; + } + + return !aOutFile.fail(); +} + + +// writes out the vertex list for a 3D feature; top and bottom are the +// Z values for the top and bottom; top must be > bottom +bool VRML_LAYER::Write3DVertices( double aTopZ, double aBottomZ, + std::ofstream& aOutFile, int aPrecision ) +{ + if( ordmap.size() < 3 ) + { + error = "Write3DVertices(): insufficient vertices"; + return false; + } + + if( aPrecision < 4 ) + aPrecision = 4; + + if( aTopZ <= aBottomZ ) + { + error = "Write3DVertices(): top <= bottom"; + return false; + } + + int i, j; + + VERTEX_3D* vp = getVertexByIndex( ordmap[0], pholes ); + + if( !vp ) + return false; + + std::string strx, stry, strz; + FormatDoublet( vp->x, vp->y, aPrecision, strx, stry ); + FormatSinglet( aTopZ, aPrecision, strz ); + + aOutFile << strx << " " << stry << " " << strz; + + for( i = 1, j = ordmap.size(); i < j; ++i ) + { + vp = getVertexByIndex( ordmap[i], pholes ); + + if( !vp ) + return false; + + FormatDoublet( vp->x, vp->y, aPrecision, strx, stry ); + + if( i & 1 ) + aOutFile << ", " << strx << " " << stry << " " << strz; + else + aOutFile << ",\n" << strx << " " << stry << " " << strz; + } + + // repeat for the bottom layer + vp = getVertexByIndex( ordmap[0], pholes ); + FormatDoublet( vp->x, vp->y, aPrecision, strx, stry ); + FormatSinglet( aBottomZ, aPrecision, strz ); + + bool endl; + + if( i & 1 ) + { + aOutFile << ", " << strx << " " << stry << " " << strz; + endl = false; + } + else + { + aOutFile << ",\n" << strx << " " << stry << " " << strz; + endl = true; + } + + for( i = 1, j = ordmap.size(); i < j; ++i ) + { + vp = getVertexByIndex( ordmap[i], pholes ); + FormatDoublet( vp->x, vp->y, aPrecision, strx, stry ); + + if( endl ) + { + aOutFile << ", " << strx << " " << stry << " " << strz; + endl = false; + } + else + { + aOutFile << ",\n" << strx << " " << stry << " " << strz; + endl = true; + } + } + + return !aOutFile.fail(); +} + + +// writes out the index list; +// 'top' indicates the vertex ordering and should be +// true for a polygon visible from above the PCB +bool VRML_LAYER::WriteIndices( bool aTopFlag, std::ofstream& aOutFile ) +{ + if( triplets.empty() ) + { + error = "WriteIndices(): no triplets (triangular facets) to write"; + return false; + } + + // go through the triplet list and write out the indices based on order + std::list::const_iterator tbeg = triplets.begin(); + std::list::const_iterator tend = triplets.end(); + + int i = 1; + + if( aTopFlag ) + aOutFile << tbeg->i1 << ", " << tbeg->i2 << ", " << tbeg->i3 << ", -1"; + else + aOutFile << tbeg->i2 << ", " << tbeg->i1 << ", " << tbeg->i3 << ", -1"; + + ++tbeg; + + while( tbeg != tend ) + { + if( (i++ & 7) == 4 ) + { + i = 1; + + if( aTopFlag ) + aOutFile << ",\n" << tbeg->i1 << ", " << tbeg->i2 << ", " << tbeg->i3 << ", -1"; + else + aOutFile << ",\n" << tbeg->i2 << ", " << tbeg->i1 << ", " << tbeg->i3 << ", -1"; + } + else + { + if( aTopFlag ) + aOutFile << ", " << tbeg->i1 << ", " << tbeg->i2 << ", " << tbeg->i3 << ", -1"; + else + aOutFile << ", " << tbeg->i2 << ", " << tbeg->i1 << ", " << tbeg->i3 << ", -1"; + } + + ++tbeg; + } + + return !aOutFile.fail(); +} + + +// writes out the index list for a 3D feature +bool VRML_LAYER::Write3DIndices( std::ofstream& aOutFile ) +{ + if( triplets.empty() ) + { + error = "Write3DIndices(): no triplets (triangular facets) to write"; + return false; + } + + if( outline.empty() ) + { + error = "WriteIndices(): no outline available"; + return false; + } + + // go through the triplet list and write out the indices based on order + std::list::const_iterator tbeg = triplets.begin(); + std::list::const_iterator tend = triplets.end(); + + int i = 1; + int idx2 = ordmap.size(); // index to the bottom vertices + + // print out the top vertices + aOutFile << tbeg->i1 << ", " << tbeg->i2 << ", " << tbeg->i3 << ", -1"; + ++tbeg; + + while( tbeg != tend ) + { + if( (i++ & 7) == 4 ) + { + i = 1; + aOutFile << ",\n" << tbeg->i1 << ", " << tbeg->i2 << ", " << tbeg->i3 << ", -1"; + } + else + { + aOutFile << ", " << tbeg->i1 << ", " << tbeg->i2 << ", " << tbeg->i3 << ", -1"; + } + + ++tbeg; + } + + // print out the bottom vertices + tbeg = triplets.begin(); + + while( tbeg != tend ) + { + if( (i++ & 7) == 4 ) + { + i = 1; + aOutFile << ",\n" << (tbeg->i2 + idx2) << ", " << (tbeg->i1 + idx2) << ", " << (tbeg->i3 + idx2) << ", -1"; + } + else + { + aOutFile << ", " << (tbeg->i2 + idx2) << ", " << (tbeg->i1 + idx2) << ", " << (tbeg->i3 + idx2) << ", -1"; + } + + ++tbeg; + } + + // print out indices for the walls joining top to bottom + int firstPoint; + int lastPoint; + int curPoint; + + std::list*>::const_iterator obeg = outline.begin(); + std::list*>::const_iterator oend = outline.end(); + std::list* cp; + std::list::const_iterator cbeg; + std::list::const_iterator cend; + + i = 2; + while( obeg != oend ) + { + cp = *obeg; + + if( cp->size() < 3 ) + { + ++obeg; + continue; + } + + cbeg = cp->begin(); + cend = cp->end(); + + firstPoint = *(cbeg++); + lastPoint = firstPoint; + + while( cbeg != cend ) + { + curPoint = *(cbeg++); + + if( (i++ & 3) == 2 ) + { + i = 1; + aOutFile << ",\n" << curPoint << ", " << lastPoint << ", " << curPoint + idx2; + aOutFile << ", -1, " << curPoint + idx2 << ", " << lastPoint << ", " << lastPoint + idx2 << ", -1"; + } + else + { + aOutFile << ", " << curPoint << ", " << lastPoint << ", " << curPoint + idx2; + aOutFile << ", -1, " << curPoint + idx2 << ", " << lastPoint << ", " << lastPoint + idx2 << ", -1"; + } + lastPoint = curPoint; + } + + if( (i++ & 3) == 2 ) + { + aOutFile << ",\n" << firstPoint << ", " << lastPoint << ", " << firstPoint + idx2; + aOutFile << ", -1, " << firstPoint + idx2 << ", " << lastPoint << ", " << lastPoint + idx2 << ", -1"; + } + else + { + aOutFile << ", " << firstPoint << ", " << lastPoint << ", " << firstPoint + idx2; + aOutFile << ", -1, " << firstPoint + idx2 << ", " << lastPoint << ", " << lastPoint + idx2 << ", -1"; + } + + ++obeg; + } + + return !aOutFile.fail(); +} + + +// add a triangular facet (triplet) to the ouptut index list +bool VRML_LAYER::addTriplet( VERTEX_3D* p0, VERTEX_3D* p1, VERTEX_3D* p2 ) +{ + double dx0 = p1->x - p0->x; + double dx1 = p2->x - p0->x; + + double dy0 = p1->y - p0->y; + double dy1 = p2->y - p0->y; + + // this number is chosen because we shall only write 6 decimal places + // on the VRML output + double err = 0.000001; + + // test if the triangles are degenerate (parallel sides) + + if( dx0 < err && dx0 > -err && dx1 < err && dx1 > -err ) + return false; + + if( dy0 < err && dy0 > -err && dy1 < err && dy1 > -err ) + return false; + + double sl0 = dy0 / dx0; + double sl1 = dy1 / dx1; + + double dsl = sl1 - sl0; + + if( dsl < err && dsl > -err ) + return false; + + triplets.push_back( TRIPLET_3D( p0->o, p1->o, p2->o ) ); + + return true; +} + + +// add an extra vertex (to be called only by the COMBINE callback) +VERTEX_3D* VRML_LAYER::AddExtraVertex( double aXpos, double aYpos ) +{ + VERTEX_3D* vertex = new VERTEX_3D; + + if( !vertex ) + { + error = "AddExtraVertex(): could not allocate a new vertex"; + return NULL; + } + + if( eidx == 0 ) + eidx = idx + hidx; + + vertex->x = aXpos; + vertex->y = aYpos; + vertex->i = eidx++; + vertex->o = -1; + + extra_verts.push_back( vertex ); + + return vertex; +} + + +// start a GL command list +void VRML_LAYER::glStart( GLenum cmd ) +{ + glcmd = cmd; + + while( !vlist.empty() ) + vlist.pop_back(); +} + + +// process a vertex +void VRML_LAYER::glPushVertex( VERTEX_3D* vertex ) +{ + if( vertex->o < 0 ) + { + vertex->o = ord++; + ordmap.push_back( vertex->i ); + } + + vlist.push_back( vertex ); +} + + +// end a GL command list +void VRML_LAYER::glEnd( void ) +{ + switch( glcmd ) + { + case GL_LINE_LOOP: + { + // add the loop to the list of outlines + std::list* loop = new std::list; + + if( !loop ) + break; + + for( unsigned int i = 0; i < vlist.size(); ++i ) + { + loop->push_back( vlist[i]->o ); + } + + outline.push_back( loop ); + } + break; + + case GL_TRIANGLE_FAN: + processFan(); + break; + + case GL_TRIANGLE_STRIP: + processStrip(); + break; + + case GL_TRIANGLES: + processTri(); + break; + + default: + break; + } + + while( !vlist.empty() ) + vlist.pop_back(); + + glcmd = 0; +} + + +// set the error message +void VRML_LAYER::SetGLError( GLenum errorID ) +{ + error = ""; + error = (const char*)gluGetString( errorID ); + + if( error.empty() ) + { + std::ostringstream ostr; + ostr << "Unknown OpenGL error: " << errorID; + error = ostr.str(); + } +} + + +// process a GL_TRIANGLE_FAN list +void VRML_LAYER::processFan( void ) +{ + if( vlist.size() < 3 ) + return; + + VERTEX_3D* p0 = vlist[0]; + + int i; + int end = vlist.size(); + + for( i = 2; i < end; ++i ) + { + addTriplet( p0, vlist[i - 1], vlist[i] ); + } +} + + +// process a GL_TRIANGLE_STRIP list +void VRML_LAYER::processStrip( void ) +{ + // note: (source: http://www.opengl.org/wiki/Primitive) + // GL_TRIANGLE_STRIP​: Every group of 3 adjacent vertices forms a triangle. + // The face direction of the strip is determined by the winding of the + // first triangle. Each successive triangle will have its effective face + // order reverse, so the system compensates for that by testing it in the + // opposite way. A vertex stream of n length will generate n-2 triangles. + + if( vlist.size() < 3 ) + return; + + int i; + int end = vlist.size(); + bool flip = false; + + for( i = 2; i < end; ++i ) + { + if( flip ) + { + addTriplet( vlist[i - 1], vlist[i - 2], vlist[i] ); + flip = false; + } + else + { + addTriplet( vlist[i - 2], vlist[i - 1], vlist[i] ); + flip = true; + } + } +} + + +// process a GL_TRIANGLES list +void VRML_LAYER::processTri( void ) +{ + // notes: + // 1. each successive group of 3 vertices is a triangle + // 2. as per OpenGL specification, any incomplete triangles are to be ignored + + if( vlist.size() < 3 ) + return; + + int i; + int end = vlist.size(); + + for( i = 2; i < end; i += 3 ) + addTriplet( vlist[i - 2], vlist[i - 1], vlist[i] ); +} + + +// push the internally held vertices +void VRML_LAYER::pushVertices( bool holes ) +{ + // push the internally held vertices + unsigned int i; + + std::list::const_iterator begin; + std::list::const_iterator end; + GLdouble pt[3]; + VERTEX_3D* vp; + + for( i = 0; i < contours.size(); ++i ) + { + if( contours[i]->size() < 3 ) + continue; + + if( ( holes && areas[i] <= 0.0 ) || ( !holes && areas[i] > 0.0 ) ) + continue; + + gluTessBeginContour( tess ); + + begin = contours[i]->begin(); + end = contours[i]->end(); + + while( begin != end ) + { + vp = vertices[ *begin ]; + pt[0] = vp->x; + pt[1] = vp->y; + pt[2] = 0.0; + gluTessVertex( tess, pt, vp ); + ++begin; + } + + gluTessEndContour( tess ); + } +} + + +VERTEX_3D* VRML_LAYER::getVertexByIndex( int aPointIndex, VRML_LAYER* holes ) +{ + if( aPointIndex < 0 || (unsigned int) aPointIndex >= ( idx + hidx + extra_verts.size() ) ) + { + error = "getVertexByIndex():BUG: invalid index"; + return NULL; + } + + if( aPointIndex < idx ) + { + // vertex is in the vertices[] list + return vertices[ aPointIndex ]; + } + else if( aPointIndex >= idx + hidx ) + { + // vertex is in the extra_verts[] list + return extra_verts[aPointIndex - idx - hidx]; + } + + // vertex is in the holes object + if( !holes ) + { + error = "getVertexByIndex():BUG: invalid index"; + return NULL; + } + + VERTEX_3D* vp = holes->GetVertexByIndex( aPointIndex ); + + if( !vp ) + { + std::ostringstream ostr; + ostr << "getVertexByIndex():FAILED: " << holes->GetError(); + error = ostr.str(); + return NULL; + } + + return vp; +} + + +// retrieve the total number of vertices +int VRML_LAYER::GetSize( void ) +{ + return vertices.size(); +} + + +// Inserts all contours into the given tesselator; this results in the +// renumbering of all vertices from 'start'. Returns the end number. +// Take care when using this call since tesselators cannot work on +// the internal data concurrently +int VRML_LAYER::Import( int start, GLUtesselator* tess ) +{ + if( start < 0 ) + { + error = "Import(): invalid index ( start < 0 )"; + return -1; + } + + if( !tess ) + { + error = "Import(): NULL tesselator pointer"; + return -1; + } + + unsigned int i, j; + + // renumber from 'start' + for( i = 0, j = vertices.size(); i < j; ++i ) + { + vertices[i]->i = start++; + vertices[i]->o = -1; + } + + // push each contour to the tesselator + VERTEX_3D* vp; + GLdouble pt[3]; + + std::list::const_iterator cbeg; + std::list::const_iterator cend; + + for( i = 0; i < contours.size(); ++i ) + { + if( contours[i]->size() < 3 ) + continue; + + cbeg = contours[i]->begin(); + cend = contours[i]->end(); + + gluTessBeginContour( tess ); + + while( cbeg != cend ) + { + vp = vertices[ *cbeg++ ]; + pt[0] = vp->x; + pt[1] = vp->y; + pt[2] = 0.0; + gluTessVertex( tess, pt, vp ); + } + + gluTessEndContour( tess ); + } + + return start; +} + + +// return the vertex identified by index +VERTEX_3D* VRML_LAYER::GetVertexByIndex( int aPointIndex ) +{ + int i0 = vertices[0]->i; + + if( aPointIndex < i0 || aPointIndex >= ( i0 + (int) vertices.size() ) ) + { + error = "GetVertexByIndex(): invalid index"; + return NULL; + } + + return vertices[aPointIndex - i0]; +} + + +// return the error string +const std::string& VRML_LAYER::GetError( void ) +{ + return error; +} diff --git a/utils/idftools/vrml_layer.h b/utils/idftools/vrml_layer.h new file mode 100644 index 0000000000..20a315665a --- /dev/null +++ b/utils/idftools/vrml_layer.h @@ -0,0 +1,429 @@ +/* + * file: vrml_layer.h + * + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 Cirilo Bernardo + * + * 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 vrml_layer.h + */ + +/* + * Classes and structures to support the tesselation of a + * PCB for VRML output. + */ + +#ifndef VRML_BOARD_H +#define VRML_BOARD_H + +#ifdef __WXMAC__ +# ifdef __DARWIN__ +# include +# else +# include +# endif +#else +# include +#endif + +#include +#include +#include +#include + +#ifndef M_PI2 +#define M_PI2 ( M_PI / 2.0 ) +#endif + +#ifndef M_PI4 +#define M_PI4 ( M_PI / 4.0 ) +#endif + +struct GLUtesselator; + +struct VERTEX_3D +{ + double x; + double y; + int i; // vertex index + int o; // vertex order +}; + +struct TRIPLET_3D +{ + int i1, i2, i3; + + TRIPLET_3D( int p1, int p2, int p3 ) + { + i1 = p1; + i2 = p2; + i3 = p3; + } +}; + + +class VRML_LAYER +{ +private: + // Arc parameters + int maxArcSeg; // maximum number of arc segments in a small circle + double minSegLength; // min. segment length + double maxSegLength; // max. segment length + + bool fix; // when true, no more vertices may be added by the user + int idx; // vertex index (number of contained vertices) + int ord; // vertex order (number of ordered vertices) + std::vector vertices; // vertices of all contours + std::vector*> contours; // lists of vertices for each contour + std::vector< double > areas; // area of the contours (positive if winding is CCW) + std::list triplets; // output facet triplet list (triplet of ORDER values) + std::list*> outline; // indices for outline outputs (index by ORDER values) + std::vector ordmap; // mapping of ORDER to INDEX + + std::string error; // error message + + int hidx; // number of vertices in the holes + int eidx; // index for extra vertices + std::vector extra_verts; // extra vertices added for outlines and facets + std::vector vlist; // vertex list for the GL command in progress + VRML_LAYER* pholes; // pointer to another layer object used for tesselation; + // this object is normally expected to hold only holes + + GLUtesselator* tess; // local instance of the GLU tesselator + + GLenum glcmd; // current GL command type ( fan, triangle, tri-strip, loop ) + + void clearTmp( void ); // clear ephemeral data used by the tesselation routine + + // add a triangular facet (triplet) to the output index list + bool addTriplet( VERTEX_3D* p0, VERTEX_3D* p1, VERTEX_3D* p2 ); + + // retrieve a vertex given its index; the vertex may be contained in the + // vertices vector, extra_verts vector, or foreign VRML_LAYER object + VERTEX_3D* getVertexByIndex( int aPointIndex, VRML_LAYER* holes ); + + void processFan( void ); // process a GL_TRIANGLE_FAN list + void processStrip( void ); // process a GL_TRIANGLE_STRIP list + void processTri( void ); // process a GL_TRIANGLES list + + void pushVertices( bool holes ); // push the internal vertices + bool pushOutline( VRML_LAYER* holes ); // push the outline vertices + + // calculate number of sides on an arc (angle is in radians) + int calcNSides( double aRadius, double aAngle ); + +public: + /// set to true when a fault is encountered during tesselation + bool Fault; + + VRML_LAYER(); + virtual ~VRML_LAYER(); + + /** + * Function GetArcParams + * retieves the parameters used in calculating the number of vertices in an arc + * + * @param aMaxSeg is the maximum number of segments for an arc with cords of length aMinLength + * @param aMinLength is the minimum length of cords in an arc + * @param aMaxLength is the maximum length of cords in an arc + */ + void GetArcParams( int& aMaxSeg, double& aMinLength, double& aMaxLength ); + + /** + * Function SetArcParams + * sets the parameters used in calculating the number of vertices in an arc. + * The default settings are reasonable for rendering for unit lengths of 1mm + * + * @param aMaxSeg is the maximum number of segments for an arc with cords of length aMinLength + * @param aMinLength is the minimum length of cords in an arc + * @param aMaxLength is the maximum length of cords in an arc + * + * @return bool: true if the parameters were accepted + */ + bool SetArcParams( int aMaxSeg, double aMinLength, double aMaxLength ); + + /** + * Function Clear + * erases all data except for arc parameters. + */ + void Clear( void ); + + /** + * Function GetSize + * returns the total number of vertices indexed + */ + int GetSize( void ); + + /** + * Function GetNConours + * returns the number of stored contours + */ + int GetNContours( void ) + { + return contours.size(); + } + + /** + * Function NewContour + * creates a new list of vertices and returns an index to the list + * + * @return int: index to the list or -1 if the operation failed + */ + int NewContour( void ); + + /** + * Function AddVertex + * adds a point to the requested contour + * + * @param aContour is an index previously returned by a call to NewContour() + * @param aXpos is the X coordinate of the vertex + * @param aYpos is the Y coordinate of the vertex + * + * @return bool: true if the vertex was added + */ + bool AddVertex( int aContourID, double aXpos, double aYpos ); + + /** + * Function EnsureWinding + * checks the winding of a contour and ensures that it is a hole or + * a solid depending on the value of @param hole + * + * @param aContour is an index to a contour as returned by NewContour() + * @param aHoleFlag determines if the contour must be a hole + * + * @return bool: true if the operation suceeded + */ + bool EnsureWinding( int aContourID, bool aHoleFlag ); + + /** + * Function AppendCircle + * adds a circular contour to the specified (empty) contour + * + * @param aXpos is the X coordinate of the hole center + * @param aYpos is the Y coordinate of the hole center + * @param aRadius is the radius of the hole + * @param aContourID is the contour index + * @param aHoleFlag determines if the contour to be created is a cutout + * + * @return bool: true if the new contour was successfully created + */ + bool AppendCircle( double aXpos, double aYpos, double aRadius, int aContourID, bool aHoleFlag = false ); + + /** + * Function AddCircle + * creates a circular contour and adds it to the internal list + * + * @param aXpos is the X coordinate of the hole center + * @param aYpos is the Y coordinate of the hole center + * @param aRadius is the radius of the hole + * @param aHoleFlag determines if the contour to be created is a cutout + * + * @return bool: true if the new contour was successfully created + */ + bool AddCircle( double aXpos, double aYpos, double aRadius, bool aHoleFlag = false ); + + /** + * Function AddSlot + * creates and adds a slot feature to the list of contours + * + * @param aCenterX is the X coordinate of the slot's center + * @param aCenterY is the Y coordinate of the slot's center + * @param aSlotLength is the length of the slot along the major axis + * @param aSlotWidth is the width of the slot along the minor axis + * @param aAngle (degrees) is the orientation of the slot + * @param aHoleFlag determines whether the slot is a hole or a solid + * + * @return bool: true if the slot was successfully created + */ + bool AddSlot( double aCenterX, double aCenterY, double aSlotLength, double aSlotWidth, + double aAngle, bool aHoleFlag = false ); + + /** + * Function AppendArc + * adds an arc to the specified contour + * + * @param aCenterX is the X coordinate of the arc's center + * @param aCenterY is the Y coordinate of the arc's center + * @param aRadius is the radius of the arc + * @param aStartAngle (degrees) is the starting angle of the arc + * @param aAngle (degrees) is the measure of the arc + * @param aContourID is the contour's index + * + * @return bool: true if the slot was successfully created + */ + bool AppendArc( double aCenterX, double aCenterY, double aRadius, + double aStartAngle, double aAngle, int aContourID ); + + /** + * Function AddArc + * creates a slotted arc and adds it to the internal list of contours + * + * @param aCenterX is the X coordinate of the arc's center + * @param aCenterY is the Y coordinate of the arc's center + * @param aStartX is the X coordinate of the starting point + * @param aStartY is the Y coordinate of the starting point + * @param aArcWidth is the width of the arc + * @param aAngle is the included angle (degrees) + * @param aHoleFlag determines whether the arc is to be a hole or a solid + * + * @return bool: true if the feature was successfully created + */ + bool AddArc( double aCenterX, double aCenterY, double aStartX, double aStartY, + double aArcWidth, double aAngle, bool aHoleFlag = false ); + + /** + * Function Tesselate + * creates a list of outline vertices as well as the + * vertex sets required to render the surface. + * + * @param holes is an optional pointer to cutouts to be imposed on the + * surface. + * + * @return bool: true if the operation succeeded + */ + bool Tesselate( VRML_LAYER* holes = NULL ); + + /** + * Function WriteVertices + * writes out the list of vertices required to render a + * planar surface. + * + * @param aZcoord is the Z coordinate of the plane + * @param aOutFile is the file to write to + * @param aPrecision is the precision of the output coordinates + * + * @return bool: true if the operation succeeded + */ + bool WriteVertices( double aZcoord, std::ofstream& aOutFile, int aPrecision ); + + /** + * Function Write3DVertices + * writes out the list of vertices required to render an extruded solid + * + * @param aTopZ is the Z coordinate of the top plane + * @param aBottomZ is the Z coordinate of the bottom plane + * @param aOutFile is the file to write to + * @param aPrecision is the precision of the output coordinates + * + * @return bool: true if the operation succeeded + */ + bool Write3DVertices( double aTopZ, double aBottomZ, std::ofstream& aOutFile, int aPrecision ); + + /** + * Function WriteIndices + * writes out the vertex sets required to render a planar + * surface. + * + * @param aTopFlag is true if the surface is to be visible from above; + * if false the surface will be visible from below. + * @param aOutFile is the file to write to + * + * @return bool: true if the operation succeeded + */ + bool WriteIndices( bool aTopFlag, std::ofstream& aOutFile ); + + /** + * Function Write3DIndices + * writes out the vertex sets required to render an extruded solid + * + * @param aOutFile is the file to write to + * + * @return bool: true if the operation succeeded + */ + bool Write3DIndices( std::ofstream& aOutFile ); + + /** + * Function AddExtraVertex + * adds an extra vertex as required by the GLU tesselator + * + * @return VERTEX_3D*: is the new vertex or NULL if a vertex + * could not be created. + */ + VERTEX_3D* AddExtraVertex( double aXpos, double aYpos ); + + /** + * Function glStart + * is invoked by the GLU tesselator callback to notify this object + * of the type of GL command which is applicable to the upcoming + * vertex list. + * + * @param cmd is the GL command + */ + void glStart( GLenum cmd ); + + /** + * Function glPushVertex + * is invoked by the GLU tesselator callback; the supplied vertex is + * added to the internal list of vertices awaiting processing upon + * execution of glEnd() + * + * @param vertex is a vertex forming part of the GL command as previously + * set by glStart + */ + void glPushVertex( VERTEX_3D* vertex ); + + /** + * Function glEnd + * is invoked by the GLU tesselator callback to notify this object + * that the vertex list is complete and ready for processing + */ + void glEnd( void ); + + /** + * Function SetGLError + * sets the error message according to the specified OpenGL error + */ + void SetGLError( GLenum error_id ); + + /** + * Function Import + * inserts all contours into the given tesselator; this + * results in the renumbering of all vertices from @param start. + * Take care when using this call since tesselators cannot work on + * the internal data concurrently. + * + * @param start is the starting number for vertex indices + * @param tess is a pointer to a GLU Tesselator object + * + * @return int: the number of vertices exported + */ + int Import( int start, GLUtesselator* tess ); + + /** + * Function GetVertexByIndex + * returns a pointer to the requested vertex or + * NULL if no such vertex exists. + * + * @param aPointIndex is a vertex index + * + * @return VERTEX_3D*: the requested vertex or NULL + */ + VERTEX_3D* GetVertexByIndex( int aPointIndex ); + + /* + * Function GetError + * Returns the error message related to the last failed operation + */ + const std::string& GetError( void ); +}; + +#endif // VRML_BOARD_H From b9246dd46386a33d1d2a99cda97c31681959df93 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 28 May 2014 13:16:15 +0200 Subject: [PATCH 456/741] bugfix #1323135: PNS creates vias with giant holes. --- pcbnew/router/pns_line_placer.cpp | 13 +++++-------- pcbnew/router/pns_via.h | 4 +++- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/pcbnew/router/pns_line_placer.cpp b/pcbnew/router/pns_line_placer.cpp index a79993249f..a0869dab9f 100644 --- a/pcbnew/router/pns_line_placer.cpp +++ b/pcbnew/router/pns_line_placer.cpp @@ -380,8 +380,7 @@ bool PNS_LINE_PLACER::handleViaPlacement( PNS_LINE& aHead ) return true; PNS_LAYERSET allLayers( 0, 15 ); - PNS_VIA v( aHead.CPoint( -1 ), allLayers, m_viaDiameter, aHead.Net() ); - v.SetDrill( m_viaDrill ); + PNS_VIA v( aHead.CPoint( -1 ), allLayers, m_viaDiameter, m_viaDrill, aHead.Net() ); VECTOR2I force; VECTOR2I lead = aHead.CPoint( -1 ) - aHead.CPoint( 0 ); @@ -441,7 +440,7 @@ bool PNS_LINE_PLACER::rhWalkOnly ( const VECTOR2I& aP, PNS_LINE& aNewHead ) else if( m_placingVia && viaOk ) { PNS_LAYERSET allLayers( 0, 15 ); - PNS_VIA v1( walkFull.CPoint( -1 ), allLayers, m_viaDiameter ); + PNS_VIA v1( walkFull.CPoint( -1 ), allLayers, m_viaDiameter, m_viaDrill ); walkFull.AppendVia( v1 ); } @@ -466,7 +465,7 @@ bool PNS_LINE_PLACER::rhMarkObstacles( const VECTOR2I& aP, PNS_LINE& aNewHead ) if( m_placingVia ) { PNS_LAYERSET allLayers( 0, 15 ); - PNS_VIA v1( m_head.CPoint( -1 ), allLayers, m_viaDiameter ); + PNS_VIA v1( m_head.CPoint( -1 ), allLayers, m_viaDiameter, m_viaDrill ); m_head.AppendVia( v1 ); } @@ -509,10 +508,8 @@ bool PNS_LINE_PLACER::rhShoveOnly ( const VECTOR2I& aP, PNS_LINE& aNewHead ) if( m_placingVia ) { PNS_LAYERSET allLayers( 0, 15 ); - PNS_VIA v1( l.CPoint( -1 ), allLayers, m_viaDiameter ); - PNS_VIA v2( l2.CPoint( -1 ), allLayers, m_viaDiameter ); - v1.SetDrill( m_viaDrill ); - v2.SetDrill( m_viaDrill ); + PNS_VIA v1( l.CPoint( -1 ), allLayers, m_viaDiameter, m_viaDrill ); + PNS_VIA v2( l2.CPoint( -1 ), allLayers, m_viaDiameter, m_viaDrill ); l.AppendVia( v1 ); l2.AppendVia( v2 ); diff --git a/pcbnew/router/pns_via.h b/pcbnew/router/pns_via.h index 00a4587b74..8ebb5a0de1 100644 --- a/pcbnew/router/pns_via.h +++ b/pcbnew/router/pns_via.h @@ -35,13 +35,15 @@ public: PNS_ITEM( VIA ) {} - PNS_VIA( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, int aDiameter, int aNet = -1 ) : + PNS_VIA( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, + int aDiameter, int aDrill, int aNet = -1 ) : PNS_ITEM( VIA ) { SetNet( aNet ); SetLayers( aLayers ); m_pos = aPos; m_diameter = aDiameter; + m_drill = aDrill; m_shape = SHAPE_CIRCLE( aPos, aDiameter / 2 ); } From 707f5cd6e64e33dc5ead0a51b6e4a3f514b1146e Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 28 May 2014 19:21:12 +0200 Subject: [PATCH 457/741] bugfix 1324144: broken PNS dragging --- pcbnew/router/pns_router.cpp | 1 + pcbnew/router/pns_via.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index 7508ead1e6..596b5a5cd7 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -232,6 +232,7 @@ PNS_ITEM* PNS_ROUTER::syncVia( VIA* aVia ) aVia->GetPosition(), PNS_LAYERSET( 0, 15 ), aVia->GetWidth(), + aVia->GetDrillValue(), aVia->GetNetCode() ); v->SetDrill ( aVia->GetDrill() ); diff --git a/pcbnew/router/pns_via.h b/pcbnew/router/pns_via.h index 8ebb5a0de1..914ea758cb 100644 --- a/pcbnew/router/pns_via.h +++ b/pcbnew/router/pns_via.h @@ -105,7 +105,7 @@ public: return &m_shape; } - PNS_VIA* Clone ( ) const; + PNS_VIA* Clone() const; const SHAPE_LINE_CHAIN Hull( int aClearance = 0, int aWalkaroundThickness = 0 ) const; From 771ac33c807ee407524c0ef878a7ca532b790b85 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 29 May 2014 13:48:14 +0200 Subject: [PATCH 458/741] Pcbnew: fix a minor bug: in zones with no net, only the zone clerance was used to created clearence, regardless the pad or footprint local clerance. Very minor other fixes. --- common/class_marker_base.cpp | 4 +- ...board_items_to_polygon_shape_transform.cpp | 2 +- pcbnew/router/pns_router.cpp | 42 +++++++++---------- pcbnew/router/pns_via.h | 4 +- ...nvert_brd_items_to_polygons_with_Boost.cpp | 14 ++++--- 5 files changed, 35 insertions(+), 31 deletions(-) diff --git a/common/class_marker_base.cpp b/common/class_marker_base.cpp index 6e54012fd4..358975ff8e 100644 --- a/common/class_marker_base.cpp +++ b/common/class_marker_base.cpp @@ -19,8 +19,8 @@ // Default marquer shape: -const int M_SHAPE_SCALE = 6; // default scaling factor for MarkerShapeCorners coordinates -const int CORNERS_COUNT = 8; +const int M_SHAPE_SCALE = 6; // default scaling factor for MarkerShapeCorners coordinates +const unsigned CORNERS_COUNT = 8; /* corners of the default shape * actual coordinates are these values * .m_ScalingFactor */ diff --git a/pcbnew/board_items_to_polygon_shape_transform.cpp b/pcbnew/board_items_to_polygon_shape_transform.cpp index d4122e7b93..0651f00efe 100644 --- a/pcbnew/board_items_to_polygon_shape_transform.cpp +++ b/pcbnew/board_items_to_polygon_shape_transform.cpp @@ -54,7 +54,7 @@ static void addTextSegmToPoly( int x0, int y0, int xf, int yf ) void BOARD::ConvertBrdLayerToPolygonalContours( LAYER_NUM aLayer, CPOLYGONS_LIST& aOutlines ) { // Number of segments to convert a circle to a polygon - const int segcountforcircle = 16; + const int segcountforcircle = 18; double correctionFactor = 1.0 / cos( M_PI / (segcountforcircle * 2) ); // convert tracks and vias: diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index 596b5a5cd7..a41c9b9b49 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -131,13 +131,13 @@ PNS_ITEM* PNS_ROUTER::syncPad( D_PAD* aPad ) int i; for( i = FIRST_COPPER_LAYER; i <= LAST_COPPER_LAYER; i++ ) - { + { if( lmsk & ( 1 << i ) ) { layers = PNS_LAYERSET( i ); break; } - } + } break; } @@ -189,7 +189,7 @@ PNS_ITEM* PNS_ROUTER::syncPad( D_PAD* aPad ) if( sz.x > sz.y ) delta = VECTOR2I( ( sz.x - sz.y ) / 2, 0 ); - else + else delta = VECTOR2I( 0, ( sz.y - sz.x ) / 2 ); SHAPE_SEGMENT* shape = new SHAPE_SEGMENT( c - delta, c + delta, @@ -284,11 +284,11 @@ void PNS_ROUTER::SyncWorld() ClearWorld(); int worstClearance = m_board->GetDesignSettings().GetBiggestClearanceValue(); - + m_clearanceFunc = new PCBNEW_CLEARANCE_FUNC( m_board ); m_world = new PNS_NODE(); m_world->SetClearanceFunctor( m_clearanceFunc ); - m_world->SetMaxClearance( 4 * worstClearance ); + m_world->SetMaxClearance( 4 * worstClearance ); for( MODULE* module = m_board->m_Modules; module; module = module->Next() ) { @@ -462,7 +462,7 @@ bool PNS_ROUTER::StartDragging( const VECTOR2I& aP, PNS_ITEM* aStartItem ) { if( !aStartItem || aStartItem->OfKind( PNS_ITEM::SOLID ) ) return false; - + m_dragger = new PNS_DRAGGER ( this ); m_dragger->SetWorld( m_world ); @@ -474,7 +474,7 @@ bool PNS_ROUTER::StartDragging( const VECTOR2I& aP, PNS_ITEM* aStartItem ) m_state = IDLE; return false; } - + return true; } @@ -489,7 +489,7 @@ bool PNS_ROUTER::StartRouting( const VECTOR2I& aP, PNS_ITEM* aStartItem ) m_placer->Start( aP, aStartItem ); m_currentEnd = aP; m_currentEndItem = NULL; - + return true; } @@ -603,7 +603,7 @@ void PNS_ROUTER::markViolations( PNS_NODE* aNode, PNS_ITEMSET& aCurrent, PNS_NODE::OBSTACLES obstacles; aNode->QueryColliding( item, obstacles, PNS_ITEM::ANY ); - + if( item->OfKind( PNS_ITEM::LINE ) ) { PNS_LINE *l = static_cast( item ); @@ -617,7 +617,7 @@ void PNS_ROUTER::markViolations( PNS_NODE* aNode, PNS_ITEMSET& aCurrent, BOOST_FOREACH( PNS_OBSTACLE& obs, obstacles ) { - int clearance = aNode->GetClearance( item, obs.m_item ); + int clearance = aNode->GetClearance( item, obs.m_item ); std::auto_ptr tmp( obs.m_item->Clone() ); tmp->Mark( MK_VIOLATION ); DisplayItem( tmp.get(), -1, clearance ); @@ -631,13 +631,13 @@ void PNS_ROUTER::updateView( PNS_NODE* aNode, PNS_ITEMSET& aCurrent ) { PNS_NODE::ITEM_VECTOR removed, added; PNS_NODE::OBSTACLES obstacles; - + if( !aNode ) return; - + if( Settings().Mode() == RM_MarkObstacles ) markViolations(aNode, aCurrent, removed); - + aNode->GetUpdatedItems( removed, added ); BOOST_FOREACH( PNS_ITEM* item, added ) @@ -679,7 +679,7 @@ void PNS_ROUTER::movePlacing( const VECTOR2I& aP, PNS_ITEM* aEndItem ) m_placer->Move( aP, aEndItem ); PNS_LINE current = m_placer->Trace(); - + DisplayItem( ¤t ); if( current.EndsWithVia() ) @@ -790,18 +790,18 @@ bool PNS_ROUTER::FixRoute( const VECTOR2I& aP, PNS_ITEM* aEndItem ) rv = m_placer->FixRoute( aP, aEndItem ); m_placingVia = false; break; - + case DRAG_SEGMENT: rv = m_dragger->FixRoute(); break; - + default: - break; - } + break; + } if( rv ) StopRouting(); - + return rv; } @@ -909,10 +909,10 @@ void PNS_ROUTER::DumpLog() case DRAG_SEGMENT: logger = m_dragger->Logger(); break; - + default: break; - } + } if( logger ) logger->Save ( "/tmp/shove.log" ); diff --git a/pcbnew/router/pns_via.h b/pcbnew/router/pns_via.h index 914ea758cb..dcf7abdf1f 100644 --- a/pcbnew/router/pns_via.h +++ b/pcbnew/router/pns_via.h @@ -108,13 +108,13 @@ public: PNS_VIA* Clone() const; const SHAPE_LINE_CHAIN Hull( int aClearance = 0, int aWalkaroundThickness = 0 ) const; - + virtual VECTOR2I Anchor( int n ) const { return m_pos; } - virtual int AnchorCount() const + virtual int AnchorCount() const { return 1; } diff --git a/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp b/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp index b41d859b65..8b46ad8e8b 100644 --- a/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp +++ b/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp @@ -199,9 +199,11 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb ) */ MODULE dummymodule( aPcb ); // Creates a dummy parent D_PAD dummypad( &dummymodule ); - D_PAD* nextpad; + for( MODULE* module = aPcb->m_Modules; module; module = module->Next() ) { + D_PAD* nextpad; + for( D_PAD* pad = module->Pads(); pad != NULL; pad = nextpad ) { nextpad = pad->Next(); // pad pointer can be modified by next code, so @@ -228,7 +230,8 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb ) pad = &dummypad; } - if( pad->GetNetCode() != GetNetCode() ) + // Note: netcode <=0 means not connected item + if( ( pad->GetNetCode() != GetNetCode() ) || ( pad->GetNetCode() <= 0 ) ) { item_clearance = pad->GetClearance() + margin; item_boundingbox = pad->GetBoundingBox(); @@ -246,14 +249,15 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb ) continue; } - int gap = zone_clearance; - if( ( GetPadConnection( pad ) == PAD_NOT_IN_ZONE ) - || ( GetNetCode() == 0 ) || ( pad->GetShape() == PAD_TRAPEZOID ) ) + || ( pad->GetShape() == PAD_TRAPEZOID ) ) // PAD_TRAPEZOID shapes are not in zones because they are used in microwave apps // and i think it is good that shapes are not changed by thermal pads or others { + int gap = zone_clearance; + int thermalGap = GetThermalReliefGap( pad ); + gap = std::max( gap, thermalGap ); item_boundingbox = pad->GetBoundingBox(); if( item_boundingbox.Intersects( zone_boundingbox ) ) From 3af4bf66a2cef3335dba69abf89cc4321e9f6fbb Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 29 May 2014 18:04:54 +0200 Subject: [PATCH 459/741] Idf tools: Minor change for OSX compatibility --- utils/idftools/CMakeLists.txt | 9 +-------- utils/idftools/vrml_layer.cpp | 2 -- utils/idftools/vrml_layer.h | 10 +++++++--- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/utils/idftools/CMakeLists.txt b/utils/idftools/CMakeLists.txt index d934baf6e8..997534ec31 100644 --- a/utils/idftools/CMakeLists.txt +++ b/utils/idftools/CMakeLists.txt @@ -18,14 +18,7 @@ add_executable( idf2vrml idf2vrml.cpp ) target_link_libraries( dxf2idf lib_dxf idf3 ${wxWidgets_LIBRARIES} ) -if( WIN32 ) - set ( LIB_GLU glu32 ) -else() - set ( LIB_GLU GLU ) -endif() - -target_link_libraries( idf2vrml idf3 ${LIB_GLU} ${wxWidgets_LIBRARIES} ) - +target_link_libraries( idf2vrml idf3 ${OPENGL_LIBRARIES} ${wxWidgets_LIBRARIES} ) install( TARGETS idfcyl idfrect dxf2idf idf2vrml DESTINATION ${KICAD_BIN} diff --git a/utils/idftools/vrml_layer.cpp b/utils/idftools/vrml_layer.cpp index 3e736a41bc..cebeb2fa97 100644 --- a/utils/idftools/vrml_layer.cpp +++ b/utils/idftools/vrml_layer.cpp @@ -40,8 +40,6 @@ #include #include -#include // CALLBACK definition, needed on Windows - #ifndef CALLBACK #define CALLBACK #endif diff --git a/utils/idftools/vrml_layer.h b/utils/idftools/vrml_layer.h index 20a315665a..5f7f456a59 100644 --- a/utils/idftools/vrml_layer.h +++ b/utils/idftools/vrml_layer.h @@ -32,8 +32,12 @@ * PCB for VRML output. */ -#ifndef VRML_BOARD_H -#define VRML_BOARD_H +#ifndef VRML_LAYER_H +#define VRML_LAYER_H + + +#include // CALLBACK definition, needed on Windows + // alse needed on OSX to define __DARWIN__ #ifdef __WXMAC__ # ifdef __DARWIN__ @@ -426,4 +430,4 @@ public: const std::string& GetError( void ); }; -#endif // VRML_BOARD_H +#endif // VRML_LAYER_H From 764c18bde1a4c071b411583964b981b213070f4a Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 29 May 2014 20:35:49 +0200 Subject: [PATCH 460/741] OSX install script fixes. --- CMakeLists.txt | 2 +- scripts/osx_fixbundle.sh | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 542667f1fc..575ddf773d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -451,7 +451,7 @@ if( KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC ) if( KICAD_BUILD_DYNAMIC AND APPLE ) add_custom_target( osx_fix_bundles ALL DEPENDS cvpcb eeschema gerbview kicad pcbnew bitmap2component pcb_calculator pl_editor) - add_custom_command(TARGET osx_fix_bundles POST_BUILD COMMAND scripts/osx_fixbundle.sh COMMENT "Migrating dylibs to bundles") + add_custom_command(TARGET osx_fix_bundles POST_BUILD COMMAND ${PROJECT_SOURCE_DIR}/scripts/osx_fixbundle.sh ${PROJECT_SOURCE_DIR} COMMENT "Migrating dylibs to bundles") endif() endif( KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC) diff --git a/scripts/osx_fixbundle.sh b/scripts/osx_fixbundle.sh index d2c8726963..a1f21de16a 100755 --- a/scripts/osx_fixbundle.sh +++ b/scripts/osx_fixbundle.sh @@ -20,8 +20,9 @@ function fixbundle() { exec="$1" bzroot="$2" execpath="$3" + binary="$4" - LIBRARIES="`otool -L ${execpath}${exec}.app/Contents/MacOS/${exec} | cut -d' ' -f1`" + LIBRARIES="`otool -L ${binary} | cut -d' ' -f1`" for library in $LIBRARIES; do @@ -35,7 +36,7 @@ function fixbundle() { resolvelink "$library" "`dirname $library`" "${execpath}/${exec}.app/Contents/Frameworks" fi fi - install_name_tool -change $library @executable_path/../Frameworks/`basename $library` ${execpath}${exec}.app/Contents/MacOS/${exec} + install_name_tool -change $library @executable_path/../Frameworks/`basename $library` ${binary} fi done @@ -122,5 +123,7 @@ for executable in $EXECUTABLES; do myexecpath="`dirname ${executable}`/" myexec="`basename ${executable}|sed -e 's/\.app//'`" - fixbundle "${myexec}" "`pwd`" "${myexecpath}" + + fixbundle "${myexec}" "$1" "${myexecpath}" "${myexecpath}${myexec}.app/Contents/MacOS/${myexec}" + fixbundle "${myexec}" "$1" "${myexecpath}" "${myexecpath}${myexec}.app/Contents/MacOS/_${myexec}.kiface" done From 4f678a919c03f46e55c841ab6a1826d703d64545 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 30 May 2014 15:31:30 +0200 Subject: [PATCH 461/741] Fixed invisible buttons in PNS settings dialog (at least for some GTK themes). --- pcbnew/dialogs/dialog_pns_settings_base.cpp | 28 +-- pcbnew/dialogs/dialog_pns_settings_base.fbp | 247 ++++---------------- pcbnew/dialogs/dialog_pns_settings_base.h | 9 +- 3 files changed, 60 insertions(+), 224 deletions(-) diff --git a/pcbnew/dialogs/dialog_pns_settings_base.cpp b/pcbnew/dialogs/dialog_pns_settings_base.cpp index b675f8fd9d..82318f7e32 100644 --- a/pcbnew/dialogs/dialog_pns_settings_base.cpp +++ b/pcbnew/dialogs/dialog_pns_settings_base.cpp @@ -89,20 +89,16 @@ DIALOG_PNS_SETTINGS_BASE::DIALOG_PNS_SETTINGS_BASE( wxWindow* parent, wxWindowID bEffort->Add( bSlider, 1, wxEXPAND, 5 ); - bOptions->Add( bEffort, 1, wxALL|wxEXPAND, 5 ); + bOptions->Add( bEffort, 1, wxEXPAND, 5 ); - wxBoxSizer* bButtons; - bButtons = new wxBoxSizer( wxHORIZONTAL ); + m_stdButtons = new wxStdDialogButtonSizer(); + m_stdButtonsOK = new wxButton( this, wxID_OK ); + m_stdButtons->AddButton( m_stdButtonsOK ); + m_stdButtonsCancel = new wxButton( this, wxID_CANCEL ); + m_stdButtons->AddButton( m_stdButtonsCancel ); + m_stdButtons->Realize(); - m_ok = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 ); - m_ok->SetDefault(); - bButtons->Add( m_ok, 1, wxALL, 5 ); - - m_cancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); - bButtons->Add( m_cancel, 1, wxALL, 5 ); - - - bOptions->Add( bButtons, 1, wxEXPAND, 5 ); + bOptions->Add( m_stdButtons, 1, wxEXPAND, 5 ); bMainSizer->Add( bOptions, 1, wxEXPAND, 5 ); @@ -113,15 +109,15 @@ DIALOG_PNS_SETTINGS_BASE::DIALOG_PNS_SETTINGS_BASE( wxWindow* parent, wxWindowID // Connect Events this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PNS_SETTINGS_BASE::OnClose ) ); - m_ok->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PNS_SETTINGS_BASE::OnOkClick ), NULL, this ); - m_cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PNS_SETTINGS_BASE::OnCancelClick ), NULL, this ); + m_stdButtonsCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PNS_SETTINGS_BASE::OnCancelClick ), NULL, this ); + m_stdButtonsOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PNS_SETTINGS_BASE::OnOkClick ), NULL, this ); } DIALOG_PNS_SETTINGS_BASE::~DIALOG_PNS_SETTINGS_BASE() { // Disconnect Events this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PNS_SETTINGS_BASE::OnClose ) ); - m_ok->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PNS_SETTINGS_BASE::OnOkClick ), NULL, this ); - m_cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PNS_SETTINGS_BASE::OnCancelClick ), NULL, this ); + m_stdButtonsCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PNS_SETTINGS_BASE::OnCancelClick ), NULL, this ); + m_stdButtonsOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PNS_SETTINGS_BASE::OnOkClick ), NULL, this ); } diff --git a/pcbnew/dialogs/dialog_pns_settings_base.fbp b/pcbnew/dialogs/dialog_pns_settings_base.fbp index dd008e9e25..729449a9c0 100644 --- a/pcbnew/dialogs/dialog_pns_settings_base.fbp +++ b/pcbnew/dialogs/dialog_pns_settings_base.fbp @@ -42,7 +42,7 @@ DIALOG_PNS_SETTINGS_BASE - 289,504 + 313,528 wxDEFAULT_DIALOG_STYLE Interactive Router settings @@ -193,11 +193,11 @@ wxVERTICAL none - + 5 wxALL 0 - + 1 1 1 @@ -281,11 +281,11 @@ - + 5 wxALL 0 - + 1 1 1 @@ -369,11 +369,11 @@ - + 5 wxALL 0 - + 1 1 1 @@ -457,11 +457,11 @@ - + 5 wxALL 0 - + 1 1 1 @@ -545,11 +545,11 @@ - + 5 wxALL 0 - + 1 1 1 @@ -633,11 +633,11 @@ - + 5 wxALL 0 - + 1 1 1 @@ -721,11 +721,11 @@ - + 5 wxALL 0 - + 1 1 1 @@ -809,11 +809,11 @@ - + 5 - wxALL|wxEXPAND + wxEXPAND 1 - + bEffort wxHORIZONTAL @@ -901,21 +901,21 @@ - + 5 wxEXPAND 0 - + 0 protected 0 - + 5 wxEXPAND 1 - + bSlider wxVERTICAL @@ -1028,11 +1028,11 @@ - + 5 wxEXPAND 1 - + bSliderLabels wxHORIZONTAL @@ -1223,187 +1223,26 @@ 5 wxEXPAND 1 - + + 0 + 1 + 0 + 0 + 0 + 1 + 0 + 0 - bButtons - wxHORIZONTAL - none - - 5 - wxALL - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_OK - OK - - 0 - - - 0 - - 1 - m_ok - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnOkClick - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_CANCEL - Cancel - - 0 - - - 0 - - 1 - m_cancel - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnCancelClick - - - - - - - - - - - - - - - - - - - - - - - - - + m_stdButtons + protected + + OnCancelClick + + + + OnOkClick + + diff --git a/pcbnew/dialogs/dialog_pns_settings_base.h b/pcbnew/dialogs/dialog_pns_settings_base.h index ceb135dc58..e67d0a72a6 100644 --- a/pcbnew/dialogs/dialog_pns_settings_base.h +++ b/pcbnew/dialogs/dialog_pns_settings_base.h @@ -48,18 +48,19 @@ class DIALOG_PNS_SETTINGS_BASE : public wxDialog wxSlider* m_effort; wxStaticText* m_lowLabel; wxStaticText* m_highLabel; - wxButton* m_ok; - wxButton* m_cancel; + wxStdDialogButtonSizer* m_stdButtons; + wxButton* m_stdButtonsOK; + wxButton* m_stdButtonsCancel; // Virtual event handlers, overide them in your derived class virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } - virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } + virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); } public: - DIALOG_PNS_SETTINGS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Interactive Router settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 289,504 ), long style = wxDEFAULT_DIALOG_STYLE ); + DIALOG_PNS_SETTINGS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Interactive Router settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 313,528 ), long style = wxDEFAULT_DIALOG_STYLE ); ~DIALOG_PNS_SETTINGS_BASE(); }; From 0e69277074137dfc6c2d1cf693a28848ae1a4ace Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Sat, 31 May 2014 11:48:27 +0200 Subject: [PATCH 462/741] Fix for vertical/horizontal (using Ctrl/Shift + mousewheel) panning in GAL canvas. --- common/view/wx_view_controls.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/view/wx_view_controls.cpp b/common/view/wx_view_controls.cpp index acd88316fa..5dc14ca1cf 100644 --- a/common/view/wx_view_controls.cpp +++ b/common/view/wx_view_controls.cpp @@ -134,8 +134,8 @@ void WX_VIEW_CONTROLS::onWheel( wxMouseEvent& aEvent ) if( aEvent.ControlDown() || aEvent.ShiftDown() ) { // Scrolling - VECTOR2D scrollVec = m_view->ToWorld( m_view->GetScreenPixelSize() * - ( (double) aEvent.GetWheelRotation() * wheelPanSpeed ), false ); + VECTOR2D scrollVec = m_view->ToWorld( m_view->GetScreenPixelSize(), false ) * + ( (double) aEvent.GetWheelRotation() * wheelPanSpeed ); double scrollSpeed; if( abs( scrollVec.x ) > abs( scrollVec.y ) ) From 3ef78c66bf634f1ee1fe101b0e15bc6f08ff4dce Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Sat, 31 May 2014 11:50:01 +0200 Subject: [PATCH 463/741] Brighter colors for pad net labels. --- pcbnew/pcb_painter.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index db939b832a..8b64daa0af 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -74,11 +74,11 @@ void PCB_RENDER_SETTINGS::ImportLegacyColors( const COLORS_DESIGN_SETTINGS* aSet // Default colors for specific layers m_layerColors[ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE )] = COLOR4D( 0.5, 0.4, 0.0, 0.8 ); m_layerColors[ITEM_GAL_LAYER( PADS_HOLES_VISIBLE )] = COLOR4D( 0.0, 0.5, 0.5, 0.8 ); - m_layerColors[ITEM_GAL_LAYER( VIA_THROUGH_VISIBLE )] = COLOR4D( 0.7, 0.7, 0.7, 0.8 ); - m_layerColors[ITEM_GAL_LAYER( PADS_VISIBLE )] = COLOR4D( 0.7, 0.7, 0.7, 0.8 ); - m_layerColors[NETNAMES_GAL_LAYER( PADS_NETNAMES_VISIBLE )] = COLOR4D( 0.8, 0.8, 0.8, 0.8 ); - m_layerColors[NETNAMES_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE )] = COLOR4D( 0.8, 0.8, 0.8, 0.8 ); - m_layerColors[NETNAMES_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE )] = COLOR4D( 0.8, 0.8, 0.8, 0.8 ); + m_layerColors[ITEM_GAL_LAYER( VIA_THROUGH_VISIBLE )] = COLOR4D( 0.6, 0.6, 0.6, 0.8 ); + m_layerColors[ITEM_GAL_LAYER( PADS_VISIBLE )] = COLOR4D( 0.6, 0.6, 0.6, 0.8 ); + m_layerColors[NETNAMES_GAL_LAYER( PADS_NETNAMES_VISIBLE )] = COLOR4D( 1.0, 1.0, 1.0, 0.9 ); + m_layerColors[NETNAMES_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE )] = COLOR4D( 1.0, 1.0, 1.0, 0.9 ); + m_layerColors[NETNAMES_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE )] = COLOR4D( 1.0, 1.0, 1.0, 0.9 ); m_layerColors[ITEM_GAL_LAYER( RATSNEST_VISIBLE )] = COLOR4D( 0.4, 0.4, 0.4, 0.8 ); m_layerColors[ITEM_GAL_LAYER( WORKSHEET )] = COLOR4D( 0.5, 0.0, 0.0, 0.8 ); m_layerColors[ITEM_GAL_LAYER( DRC_VISIBLE )] = COLOR4D( 1.0, 0.0, 0.0, 0.8 ); From b1a19b122500f1bc7e5574de5a17d7611a0386c2 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Sat, 31 May 2014 16:04:10 +0200 Subject: [PATCH 464/741] Setting proper tool for submenus of CONTEXT_MENU class. --- common/tool/context_menu.cpp | 17 +++++++++++++++++ include/tool/context_menu.h | 9 +++------ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/common/tool/context_menu.cpp b/common/tool/context_menu.cpp index b6277e16a7..e68473dd6c 100644 --- a/common/tool/context_menu.cpp +++ b/common/tool/context_menu.cpp @@ -193,6 +193,23 @@ void CONTEXT_MENU::onMenuEvent( wxEvent& aEvent ) } +void CONTEXT_MENU::setTool( TOOL_INTERACTIVE* aTool ) +{ + m_tool = aTool; + + for( unsigned i = 0; i < GetMenuItemCount(); ++i ) + { + wxMenuItem* item = FindItemByPosition( i ); + + if( item->IsSubMenu() ) + { + CONTEXT_MENU* menu = static_cast( item->GetSubMenu() ); + menu->setTool( aTool ); + } + } +} + + void CONTEXT_MENU::copyItem( const wxMenuItem* aSource, wxMenuItem* aDest ) const { assert( !aSource->IsSubMenu() ); // it does not transfer submenus diff --git a/include/tool/context_menu.h b/include/tool/context_menu.h index 9090702f8c..e50ef207c2 100644 --- a/include/tool/context_menu.h +++ b/include/tool/context_menu.h @@ -115,17 +115,12 @@ private: ///> Event handler. void onMenuEvent( wxEvent& aEvent ); - friend class TOOL_INTERACTIVE; - /** * Function setTool() * Sets a tool that is the creator of the menu. * @param aTool is the tool that created the menu. */ - void setTool( TOOL_INTERACTIVE* aTool ) - { - m_tool = aTool; - } + void setTool( TOOL_INTERACTIVE* aTool ); ///> Flag indicating that the menu title was set up. bool m_titleSet; @@ -147,6 +142,8 @@ private: /// Custom events handler, allows to translate wxEvents to TOOL_EVENTs. boost::function m_customHandler; + + friend class TOOL_INTERACTIVE; }; #endif From 2619ceae0385a03abf2dece009f8af7ba03ed679 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Sat, 31 May 2014 16:04:25 +0200 Subject: [PATCH 465/741] PNS formatting code. --- pcbnew/router/pns_line_placer.cpp | 6 +++--- pcbnew/router/pns_router.cpp | 21 ++++++++++----------- pcbnew/router/router_tool.cpp | 2 +- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/pcbnew/router/pns_line_placer.cpp b/pcbnew/router/pns_line_placer.cpp index a0869dab9f..3b94a2ed1f 100644 --- a/pcbnew/router/pns_line_placer.cpp +++ b/pcbnew/router/pns_line_placer.cpp @@ -402,7 +402,7 @@ bool PNS_LINE_PLACER::handleViaPlacement( PNS_LINE& aHead ) } -bool PNS_LINE_PLACER::rhWalkOnly ( const VECTOR2I& aP, PNS_LINE& aNewHead ) +bool PNS_LINE_PLACER::rhWalkOnly( const VECTOR2I& aP, PNS_LINE& aNewHead ) { SHAPE_LINE_CHAIN line = m_direction.BuildInitialTrace( m_p_start, aP ); PNS_LINE initTrack( m_head, line ), walkFull; @@ -829,9 +829,9 @@ void PNS_LINE_PLACER::Move( const VECTOR2I& aP, PNS_ITEM* aEndItem ) if( !current.PointCount() ) m_currentEnd = m_p_start; else - m_currentEnd = current.CLine().CPoint(-1); + m_currentEnd = current.CLine().CPoint( -1 ); - PNS_NODE *latestNode = m_currentNode; + PNS_NODE* latestNode = m_currentNode; m_lastNode = latestNode->Branch(); if( eiDepth >= 0 && aEndItem && latestNode->Depth() > eiDepth && diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index a41c9b9b49..b45ec0deff 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -235,7 +235,6 @@ PNS_ITEM* PNS_ROUTER::syncVia( VIA* aVia ) aVia->GetDrillValue(), aVia->GetNetCode() ); - v->SetDrill ( aVia->GetDrill() ); v->SetParent( aVia ); return v; @@ -463,7 +462,7 @@ bool PNS_ROUTER::StartDragging( const VECTOR2I& aP, PNS_ITEM* aStartItem ) if( !aStartItem || aStartItem->OfKind( PNS_ITEM::SOLID ) ) return false; - m_dragger = new PNS_DRAGGER ( this ); + m_dragger = new PNS_DRAGGER( this ); m_dragger->SetWorld( m_world ); if( m_dragger->Start ( aP, aStartItem ) ) @@ -485,7 +484,7 @@ bool PNS_ROUTER::StartRouting( const VECTOR2I& aP, PNS_ITEM* aStartItem ) m_placer = new PNS_LINE_PLACER( this ); m_placer->SetLayer( m_currentLayer ); - m_placer->SetWidth ( m_settings.GetTrackWidth() ); + m_placer->SetWidth( m_settings.GetTrackWidth() ); m_placer->Start( aP, aStartItem ); m_currentEnd = aP; m_currentEndItem = NULL; @@ -575,7 +574,7 @@ void PNS_ROUTER::Move( const VECTOR2I& aP, PNS_ITEM* endItem ) break; case DRAG_SEGMENT: - moveDragging (aP, endItem ); + moveDragging( aP, endItem ); break; default: @@ -598,7 +597,7 @@ void PNS_ROUTER::moveDragging( const VECTOR2I& aP, PNS_ITEM* aEndItem ) void PNS_ROUTER::markViolations( PNS_NODE* aNode, PNS_ITEMSET& aCurrent, PNS_NODE::ITEM_VECTOR& aRemoved ) { - BOOST_FOREACH( PNS_ITEM *item, aCurrent.Items() ) + BOOST_FOREACH( PNS_ITEM* item, aCurrent.Items() ) { PNS_NODE::OBSTACLES obstacles; @@ -606,11 +605,11 @@ void PNS_ROUTER::markViolations( PNS_NODE* aNode, PNS_ITEMSET& aCurrent, if( item->OfKind( PNS_ITEM::LINE ) ) { - PNS_LINE *l = static_cast( item ); + PNS_LINE* l = static_cast( item ); if( l->EndsWithVia() ) { - PNS_VIA v ( l->Via() ); + PNS_VIA v( l->Via() ); aNode->QueryColliding( &v, obstacles, PNS_ITEM::ANY ); } } @@ -685,8 +684,8 @@ void PNS_ROUTER::movePlacing( const VECTOR2I& aP, PNS_ITEM* aEndItem ) if( current.EndsWithVia() ) DisplayItem( ¤t.Via() ); - PNS_ITEMSET tmp ( ¤t ); - updateView ( m_placer->CurrentNode ( true ), tmp ); + PNS_ITEMSET tmp( ¤t ); + updateView( m_placer->CurrentNode( true ), tmp ); } @@ -836,7 +835,7 @@ void PNS_ROUTER::FlipPosture() if( m_state == ROUTE_TRACK ) { m_placer->FlipPosture(); - m_placer->Move ( m_currentEnd, m_currentEndItem ); + m_placer->Move( m_currentEnd, m_currentEndItem ); } } @@ -915,5 +914,5 @@ void PNS_ROUTER::DumpLog() } if( logger ) - logger->Save ( "/tmp/shove.log" ); + logger->Save( "/tmp/shove.log" ); } diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index 583fd477e4..c332b9a2ed 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -264,7 +264,7 @@ int ROUTER_TOOL::getDefaultWidth( int aNetCode ) void ROUTER_TOOL::getNetclassDimensions( int aNetCode, int& aWidth, -int& aViaDiameter, int& aViaDrill ) + int& aViaDiameter, int& aViaDrill ) { BOARD* board = getModel( PCB_T ); BOARD_DESIGN_SETTINGS &bds = board->GetDesignSettings(); From 59dfc053c29a3283b7411f218d3838b40df5f025 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 31 May 2014 17:49:15 +0200 Subject: [PATCH 466/741] Cosmetic enhancements: fix incorrect icons. --- bitmaps_png/CMakeLists.txt | 7 +- bitmaps_png/cpp_26/invert_module.cpp | 63 ---- bitmaps_png/cpp_26/lang_sl.cpp | 39 +- bitmaps_png/cpp_26/mirror_footprint_axisX.cpp | 64 ++++ bitmaps_png/cpp_26/mirror_footprint_axisY.cpp | 64 ++++ ...e_module_neg.cpp => rotate_module_ccw.cpp} | 2 +- ...te_module_pos.cpp => rotate_module_cw.cpp} | 2 +- bitmaps_png/sources/invert_module.svg | 59 --- bitmaps_png/sources/lang_sl.svg | 119 ++++-- .../sources/mirror_footprint_axisX.svg | 353 ++++++++++++++++++ .../sources/mirror_footprint_axisY.svg | 353 ++++++++++++++++++ ...e_module_neg.svg => rotate_module_ccw.svg} | 0 ...te_module_pos.svg => rotate_module_cw.svg} | 0 include/bitmaps.h | 7 +- pcbnew/modedit_onclick.cpp | 4 +- pcbnew/onrightclick.cpp | 12 +- 16 files changed, 965 insertions(+), 183 deletions(-) delete mode 100644 bitmaps_png/cpp_26/invert_module.cpp create mode 100644 bitmaps_png/cpp_26/mirror_footprint_axisX.cpp create mode 100644 bitmaps_png/cpp_26/mirror_footprint_axisY.cpp rename bitmaps_png/cpp_26/{rotate_module_neg.cpp => rotate_module_ccw.cpp} (98%) rename bitmaps_png/cpp_26/{rotate_module_pos.cpp => rotate_module_cw.cpp} (98%) delete mode 100644 bitmaps_png/sources/invert_module.svg create mode 100644 bitmaps_png/sources/mirror_footprint_axisX.svg create mode 100644 bitmaps_png/sources/mirror_footprint_axisY.svg rename bitmaps_png/sources/{rotate_module_neg.svg => rotate_module_ccw.svg} (100%) rename bitmaps_png/sources/{rotate_module_pos.svg => rotate_module_cw.svg} (100%) diff --git a/bitmaps_png/CMakeLists.txt b/bitmaps_png/CMakeLists.txt index c8a79d784f..152b1abef4 100644 --- a/bitmaps_png/CMakeLists.txt +++ b/bitmaps_png/CMakeLists.txt @@ -287,7 +287,6 @@ set( BMAPS_MID import info insert_module_board - invert_module invisible_text kicad_icon_small label2glabel @@ -335,6 +334,8 @@ set( BMAPS_MID mirepcb mirror_h mirror_v + mirror_footprint_axisX + mirror_footprint_axisY mode_module mode_track modratsnest @@ -459,8 +460,8 @@ set( BMAPS_MID right rotate_field rotate_glabel - rotate_module_neg - rotate_module_pos + rotate_module_cw + rotate_module_ccw rotate_pin rotate_ccw rotate_cw diff --git a/bitmaps_png/cpp_26/invert_module.cpp b/bitmaps_png/cpp_26/invert_module.cpp deleted file mode 100644 index 1fe9f8e980..0000000000 --- a/bitmaps_png/cpp_26/invert_module.cpp +++ /dev/null @@ -1,63 +0,0 @@ - -/* Do not modify this file, it was automatically generated by the - * PNG2cpp CMake script, using a *.png file as input. - */ - -#include - -static const unsigned char png[] = { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, - 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c, - 0xce, 0x00, 0x00, 0x02, 0xde, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0x63, 0xf8, 0xff, 0xff, 0x3f, - 0x03, 0x3d, 0x30, 0xe9, 0x1a, 0x18, 0x18, 0x2c, 0x81, 0xd8, 0x9d, 0x1e, 0x16, 0x25, 0x00, 0x71, - 0xc5, 0xb0, 0xb2, 0x88, 0x07, 0x88, 0xf9, 0xc9, 0xb6, 0x08, 0x08, 0xf8, 0x80, 0x58, 0x00, 0x07, - 0xe6, 0x42, 0x52, 0x67, 0x00, 0xc4, 0x36, 0x48, 0x7c, 0x69, 0x20, 0x56, 0xc7, 0x81, 0xd5, 0x80, - 0x98, 0x09, 0xdd, 0xa2, 0x28, 0x20, 0x4e, 0xc1, 0x81, 0xbd, 0x71, 0x05, 0x5d, 0x69, 0x69, 0xe9, - 0xa1, 0xf3, 0xe7, 0xcf, 0x7f, 0x03, 0xe1, 0xe6, 0xe6, 0xe6, 0x6f, 0x87, 0x0e, 0x1d, 0xfa, 0xd6, - 0xd5, 0xd5, 0x05, 0xe6, 0x2f, 0x58, 0xb0, 0xe0, 0x13, 0x50, 0xad, 0x3c, 0x54, 0x1f, 0x83, 0x02, - 0x10, 0xeb, 0x00, 0x71, 0x2c, 0x1e, 0x8b, 0x42, 0xa0, 0x6a, 0x24, 0x60, 0x16, 0xc5, 0xe8, 0xb0, - 0xb8, 0x16, 0x98, 0x30, 0x15, 0xd4, 0xc4, 0xb9, 0xdc, 0xd8, 0xbf, 0xa4, 0xef, 0xd7, 0xe3, 0xbb, - 0xd7, 0xbe, 0xbf, 0x7c, 0xf9, 0xf2, 0xdb, 0xfa, 0xf5, 0xeb, 0xbf, 0xfd, 0xfe, 0xfd, 0xfb, 0xdb, - 0xae, 0x25, 0x93, 0x7e, 0xcd, 0x6f, 0xc9, 0xfd, 0x9e, 0xa8, 0xcb, 0xd4, 0x18, 0xa7, 0xcb, 0x94, - 0x03, 0xb2, 0xc8, 0x0d, 0x8f, 0x05, 0xe8, 0xd8, 0x02, 0x88, 0x45, 0x81, 0x58, 0x6a, 0xba, 0x3b, - 0xd3, 0xac, 0xbb, 0x79, 0x5c, 0xff, 0xe7, 0x15, 0x7a, 0xfe, 0xff, 0x57, 0xc1, 0xf0, 0x7f, 0xff, - 0xf2, 0x29, 0xbf, 0x80, 0x2e, 0xff, 0x06, 0xc3, 0x07, 0x32, 0x65, 0xff, 0xed, 0x2b, 0xd2, 0xff, - 0x0f, 0xc2, 0x3b, 0xc2, 0x19, 0x1f, 0x81, 0x2c, 0x72, 0x27, 0xd1, 0x22, 0x50, 0xd8, 0x1b, 0xf4, - 0xbb, 0x30, 0xcd, 0xbd, 0x9d, 0xc9, 0xf2, 0x7f, 0x69, 0x96, 0xe9, 0xff, 0xf7, 0x85, 0x0c, 0xff, - 0xf7, 0x2e, 0x9b, 0x8c, 0x62, 0xd1, 0xd6, 0x14, 0x99, 0x7f, 0x07, 0x72, 0x14, 0xff, 0x83, 0xf0, - 0x9a, 0x20, 0xc6, 0xc7, 0x0c, 0xd0, 0xc8, 0x06, 0x05, 0x49, 0x34, 0x1e, 0x0b, 0xfc, 0xa0, 0x6a, - 0xb8, 0x61, 0x41, 0x67, 0x21, 0xc1, 0xa0, 0x60, 0x2d, 0xcb, 0x62, 0x5b, 0x94, 0x99, 0x74, 0xfa, - 0xfc, 0x89, 0x83, 0x3f, 0x3e, 0xbe, 0x7b, 0xfb, 0x1d, 0xd9, 0xa2, 0x4b, 0x67, 0x8e, 0xff, 0x58, - 0x3c, 0x67, 0xda, 0x17, 0x2d, 0x51, 0xe6, 0x50, 0x63, 0x71, 0x56, 0x73, 0x90, 0x45, 0x66, 0xd0, - 0xe0, 0x4b, 0xc0, 0x63, 0x51, 0x0c, 0x54, 0x8d, 0x16, 0xcc, 0xa2, 0x22, 0x33, 0xa6, 0xf2, 0xa5, - 0xfe, 0x8c, 0x9b, 0xa6, 0x84, 0x2b, 0xbc, 0xd9, 0xdf, 0xec, 0xf3, 0xe7, 0xcc, 0xde, 0x8d, 0x3f, - 0x91, 0x2d, 0x5a, 0x5a, 0x11, 0xf8, 0x67, 0x65, 0x9e, 0xe5, 0xef, 0x69, 0xee, 0x8c, 0x7b, 0x6b, - 0xac, 0x19, 0xd7, 0x92, 0x13, 0x47, 0x72, 0x40, 0xac, 0x0a, 0x8a, 0xa3, 0xb3, 0xe9, 0xbc, 0xff, - 0x27, 0x57, 0xa5, 0xe0, 0x8c, 0xa3, 0xf5, 0x25, 0x8e, 0xff, 0x41, 0x18, 0x16, 0x47, 0xb6, 0x40, - 0x1c, 0x08, 0xc4, 0x49, 0x78, 0x2c, 0x00, 0xf9, 0x22, 0x00, 0x88, 0x0d, 0x81, 0x58, 0x11, 0x88, - 0x35, 0x4b, 0xcd, 0x99, 0xda, 0x81, 0x61, 0x7f, 0xba, 0x2f, 0x44, 0xe9, 0xeb, 0x81, 0x32, 0xd3, - 0xbf, 0x47, 0x37, 0x2f, 0x45, 0xf1, 0xd1, 0xbc, 0x6c, 0xdb, 0xbf, 0x4b, 0x52, 0xb4, 0xff, 0xce, - 0xf4, 0xe3, 0xb9, 0xde, 0x60, 0xcb, 0x78, 0x10, 0x64, 0x11, 0x0b, 0x10, 0xb3, 0x01, 0x71, 0x24, - 0x1e, 0x8b, 0x3c, 0xa1, 0x6a, 0x98, 0x61, 0x41, 0x07, 0xc4, 0x1c, 0xa0, 0xf8, 0xad, 0xab, 0xab, - 0xdb, 0xf7, 0xee, 0xdd, 0xbb, 0xef, 0xa0, 0x24, 0x8d, 0x6c, 0xd1, 0xc7, 0x8f, 0x1f, 0xbf, 0xed, - 0xdc, 0xb9, 0x13, 0x94, 0x8f, 0x74, 0xa1, 0x85, 0x01, 0x38, 0xd5, 0x81, 0x34, 0x27, 0xe3, 0xb2, - 0x88, 0x99, 0x99, 0x19, 0x44, 0xc7, 0x43, 0x4b, 0x6e, 0xb0, 0x45, 0xf5, 0x36, 0x4c, 0x73, 0x0f, - 0xc7, 0x32, 0x7d, 0x99, 0x1b, 0xa7, 0xf1, 0xf7, 0x7c, 0x06, 0xef, 0xff, 0xdd, 0x4b, 0x51, 0x83, - 0x6e, 0x7e, 0x8c, 0xe2, 0xbf, 0xcd, 0xc9, 0xb2, 0xff, 0x37, 0xc5, 0x8b, 0x7f, 0x9f, 0xe8, 0xca, - 0x78, 0x8f, 0x9c, 0x38, 0x02, 0x27, 0x6f, 0x50, 0x1c, 0x5d, 0xc9, 0xe2, 0xfe, 0x3f, 0xb1, 0x20, - 0x18, 0x67, 0x1c, 0x6d, 0x2a, 0xb4, 0xf8, 0x0f, 0xc2, 0xb0, 0x38, 0xd2, 0x04, 0x62, 0x53, 0xa8, - 0x8b, 0x71, 0x59, 0x10, 0x0e, 0x55, 0x23, 0x0f, 0x4d, 0xe6, 0x72, 0x19, 0x86, 0xcc, 0x11, 0x9d, - 0x0e, 0x4c, 0x1d, 0x9d, 0xb1, 0xe6, 0xf7, 0xf7, 0x4f, 0x2f, 0xfb, 0x7d, 0xeb, 0xe2, 0xf1, 0x1f, - 0xc8, 0x16, 0x6d, 0x9e, 0x52, 0xf9, 0x7b, 0x69, 0x6d, 0xf4, 0x8f, 0x1a, 0x2b, 0xa6, 0x69, 0xf9, - 0x66, 0x4c, 0xad, 0xc8, 0x65, 0x5d, 0x04, 0x1e, 0x8b, 0xdc, 0x71, 0x95, 0x75, 0xc0, 0x72, 0x6d, - 0x17, 0xb2, 0x05, 0xc8, 0xf8, 0xd8, 0xb1, 0x63, 0x1f, 0xe1, 0x65, 0x1d, 0x92, 0x01, 0x36, 0xd0, - 0x14, 0x88, 0x0d, 0x1b, 0xe0, 0xb2, 0x28, 0x24, 0x24, 0xa4, 0xb6, 0xa0, 0xa0, 0x60, 0x1a, 0x36, - 0x1c, 0x1f, 0x1f, 0x3f, 0x1b, 0x94, 0x10, 0xc8, 0xad, 0x8f, 0x40, 0xa9, 0xc8, 0x82, 0x1e, 0x15, - 0x1f, 0x3f, 0x10, 0x0b, 0x8d, 0xb6, 0x19, 0xc8, 0xb1, 0x08, 0x54, 0x08, 0x3b, 0xd3, 0xdc, 0x22, - 0x72, 0x31, 0x00, 0x9d, 0xf1, 0x4b, 0xb7, 0xf6, 0x3d, 0xa2, 0xb6, 0x00, 0x00, 0x00, 0x00, 0x49, - 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, -}; - -const BITMAP_OPAQUE invert_module_xpm[1] = {{ png, sizeof( png ), "invert_module_xpm" }}; - -//EOF diff --git a/bitmaps_png/cpp_26/lang_sl.cpp b/bitmaps_png/cpp_26/lang_sl.cpp index 09c096cf3d..235e59f7f5 100644 --- a/bitmaps_png/cpp_26/lang_sl.cpp +++ b/bitmaps_png/cpp_26/lang_sl.cpp @@ -8,28 +8,23 @@ static const unsigned char png[] = { 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c, - 0xce, 0x00, 0x00, 0x01, 0x3f, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0x63, 0x78, 0xf6, 0xec, 0xd9, - 0x7f, 0x7a, 0x60, 0x86, 0x51, 0x8b, 0xc8, 0xb6, 0xe8, 0xe5, 0xcb, 0x97, 0xff, 0xdf, 0xbf, 0x7f, - 0x4f, 0x73, 0xcc, 0x00, 0x22, 0xe8, 0x01, 0x46, 0x2d, 0xa2, 0xb2, 0x45, 0x5f, 0xbf, 0xfe, 0xff, - 0x2f, 0x2f, 0x0f, 0xc1, 0x81, 0x81, 0xff, 0xff, 0x87, 0x85, 0x21, 0xf8, 0xcf, 0x9f, 0x93, 0x67, - 0xd1, 0x82, 0x65, 0x27, 0xfe, 0x5b, 0xb8, 0xcd, 0x45, 0xc1, 0x7d, 0x4d, 0x5b, 0x80, 0x32, 0x0c, - 0xff, 0xff, 0xfb, 0xfb, 0xff, 0xff, 0x3f, 0x7f, 0xfe, 0xff, 0xff, 0xcb, 0x96, 0xfd, 0xff, 0x1f, - 0x1a, 0x0a, 0x16, 0x9b, 0x55, 0xbb, 0x12, 0x43, 0x3d, 0x31, 0x98, 0x61, 0xea, 0xec, 0xc3, 0xff, - 0xf9, 0x15, 0xbb, 0x51, 0x70, 0x6b, 0xe1, 0x72, 0x84, 0x45, 0x25, 0x25, 0xff, 0xff, 0xd7, 0xd7, - 0xff, 0xff, 0x1f, 0x1c, 0x0c, 0x16, 0x9b, 0x9c, 0x37, 0x0f, 0x43, 0x3d, 0x31, 0x18, 0xab, 0x45, - 0xdd, 0x45, 0x4b, 0x21, 0x16, 0xcd, 0x9a, 0xf5, 0xff, 0xff, 0xba, 0x75, 0xff, 0xff, 0x6f, 0x01, - 0xfa, 0x70, 0xe1, 0x42, 0x88, 0x8f, 0xf2, 0xe7, 0x50, 0xcf, 0xa2, 0xd0, 0xf8, 0x55, 0xff, 0xff, - 0x73, 0x71, 0x81, 0x0d, 0x7e, 0x6b, 0x62, 0xf3, 0xff, 0xa5, 0x83, 0x17, 0xc4, 0x62, 0x26, 0xa6, - 0xff, 0x49, 0x49, 0xcb, 0xa9, 0x67, 0x91, 0x8c, 0xee, 0xc4, 0xff, 0x17, 0x83, 0xd2, 0xfe, 0x27, - 0x8a, 0xc5, 0xfc, 0xd7, 0x92, 0xad, 0xfe, 0xaf, 0x2c, 0xd7, 0xf0, 0x3f, 0x59, 0x34, 0xea, 0xff, - 0x69, 0xb7, 0xd8, 0xff, 0x0a, 0x86, 0x93, 0xc9, 0xb3, 0xe8, 0xd4, 0xdc, 0xb5, 0xff, 0xf7, 0x3a, - 0xc6, 0x60, 0xe0, 0x33, 0x39, 0x0d, 0xff, 0x03, 0xb5, 0xca, 0xe1, 0x0a, 0x7d, 0x34, 0xca, 0xff, - 0x9f, 0x2f, 0x68, 0xc1, 0xaa, 0x96, 0x18, 0xcc, 0xf0, 0xbe, 0xbf, 0x1f, 0x12, 0x2c, 0xd8, 0x30, - 0x30, 0x39, 0xcf, 0x0f, 0xa8, 0xfa, 0x3f, 0xcd, 0xa7, 0xea, 0xff, 0x3f, 0x35, 0x35, 0xdc, 0xea, - 0x88, 0xc0, 0xf8, 0x2d, 0x02, 0x61, 0x46, 0x46, 0x70, 0xdc, 0x50, 0x62, 0x09, 0x71, 0x16, 0x51, - 0x09, 0xd3, 0xd1, 0xa2, 0x19, 0x33, 0xfe, 0xff, 0x15, 0x15, 0xa5, 0x39, 0x1e, 0x6d, 0x33, 0x8c, - 0x5a, 0x04, 0xc7, 0x00, 0x6c, 0x3e, 0x11, 0x8b, 0x7d, 0x56, 0xa5, 0xec, 0x00, 0x00, 0x00, 0x00, - 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, + 0xce, 0x00, 0x00, 0x00, 0xf4, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0x63, 0xf8, 0xff, 0xff, 0x3f, + 0x03, 0x3d, 0x30, 0xc3, 0xb0, 0xb4, 0xc8, 0x0c, 0x88, 0x2d, 0x68, 0x8d, 0x41, 0x16, 0xfd, 0xf8, + 0x4f, 0x07, 0x30, 0xb0, 0x16, 0xfd, 0xfe, 0xf3, 0xef, 0xff, 0xc5, 0x87, 0xaf, 0xff, 0xef, 0xbc, + 0xf4, 0xf8, 0xff, 0xab, 0x4f, 0x3f, 0x68, 0x67, 0x91, 0x71, 0xf9, 0x86, 0xff, 0x22, 0xe9, 0xd3, + 0xff, 0xab, 0x15, 0x76, 0xff, 0x67, 0x88, 0x5d, 0xf2, 0x7f, 0xd3, 0xce, 0xf3, 0xb4, 0xb1, 0xc8, + 0xa6, 0x7a, 0x13, 0xd8, 0x02, 0xf5, 0xb2, 0xf5, 0x60, 0x7a, 0xf7, 0xae, 0x73, 0x94, 0x5b, 0xd4, + 0xb9, 0xe5, 0xea, 0xef, 0xf6, 0xcd, 0x57, 0xfe, 0x23, 0x63, 0xdb, 0xaa, 0x0d, 0xff, 0xf7, 0x5c, + 0x79, 0xfe, 0xff, 0xde, 0xab, 0xcf, 0xff, 0xf3, 0x97, 0x9c, 0xf9, 0x5f, 0xdd, 0xbf, 0xe5, 0x3f, + 0xba, 0x1a, 0x52, 0x31, 0x03, 0x7b, 0xe2, 0x32, 0xb0, 0xab, 0x91, 0x71, 0x40, 0xdd, 0xfa, 0xff, + 0x1b, 0xce, 0x3e, 0xfe, 0xbf, 0xe9, 0xdc, 0x93, 0xff, 0xb3, 0xf6, 0xdd, 0xfa, 0xcf, 0x17, 0x39, + 0x07, 0x43, 0x0d, 0xc9, 0x18, 0x9b, 0x45, 0xfc, 0x40, 0x83, 0xab, 0x96, 0x9d, 0xfe, 0xbf, 0xef, + 0xda, 0x8b, 0xff, 0x36, 0x59, 0x0b, 0x29, 0xb7, 0x04, 0x97, 0x45, 0x20, 0xcc, 0x1d, 0x35, 0xef, + 0xbf, 0x42, 0xd8, 0x24, 0xea, 0x58, 0x82, 0xcf, 0x22, 0xaa, 0x63, 0xba, 0x59, 0xb4, 0x21, 0xae, + 0xf4, 0xdf, 0xba, 0x98, 0x92, 0xff, 0xb4, 0xc6, 0x0c, 0x6f, 0x95, 0xb4, 0xfe, 0xbf, 0x95, 0x51, + 0xa1, 0x39, 0x1e, 0xb5, 0x68, 0x28, 0x58, 0x34, 0x69, 0x12, 0xdf, 0xfb, 0xfe, 0x7e, 0x01, 0x5a, + 0x63, 0x86, 0xd1, 0x56, 0xd0, 0xa0, 0xb7, 0x08, 0x00, 0x49, 0xfd, 0x55, 0x27, 0xb8, 0xb7, 0x24, + 0x27, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, }; const BITMAP_OPAQUE lang_sl_xpm[1] = {{ png, sizeof( png ), "lang_sl_xpm" }}; diff --git a/bitmaps_png/cpp_26/mirror_footprint_axisX.cpp b/bitmaps_png/cpp_26/mirror_footprint_axisX.cpp new file mode 100644 index 0000000000..0c574d7db0 --- /dev/null +++ b/bitmaps_png/cpp_26/mirror_footprint_axisX.cpp @@ -0,0 +1,64 @@ + +/* Do not modify this file, it was automatically generated by the + * PNG2cpp CMake script, using a *.png file as input. + */ + +#include + +static const unsigned char png[] = { + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, + 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c, + 0xce, 0x00, 0x00, 0x02, 0xf6, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xdd, 0x94, 0x5d, 0x48, 0x93, + 0x51, 0x18, 0xc7, 0x77, 0x4a, 0xa7, 0x16, 0x6c, 0x19, 0xae, 0x95, 0x31, 0x15, 0xf3, 0x26, 0x2a, + 0x31, 0x8c, 0x3e, 0xdd, 0x10, 0x9d, 0x91, 0x5a, 0x2b, 0x12, 0xdb, 0x9c, 0xf3, 0xb3, 0xd0, 0x96, + 0x77, 0x96, 0x2b, 0xe8, 0xc3, 0x09, 0x11, 0x91, 0x10, 0x42, 0x31, 0x93, 0xb5, 0x51, 0x0b, 0x51, + 0x87, 0xb1, 0x44, 0xc1, 0xcb, 0x8a, 0x6e, 0x86, 0x5d, 0x34, 0x88, 0x1a, 0x14, 0x36, 0xd9, 0xd4, + 0x8a, 0x40, 0x52, 0x6a, 0x1f, 0xae, 0xbd, 0xa7, 0xf3, 0xbc, 0x3c, 0xd2, 0x2e, 0x52, 0x37, 0x41, + 0x89, 0x06, 0x7f, 0xc6, 0xef, 0x7f, 0x9e, 0xf3, 0xfc, 0xf7, 0x9e, 0xf7, 0xec, 0x11, 0x50, 0x4a, + 0x05, 0x7f, 0x13, 0xfb, 0x08, 0x3b, 0x14, 0x64, 0xdc, 0x51, 0x41, 0x7c, 0x57, 0x0e, 0x91, 0xe7, + 0xe0, 0xb5, 0xee, 0x27, 0x2e, 0xe0, 0xb6, 0x83, 0xe4, 0x2d, 0xf0, 0xc5, 0x03, 0xe4, 0x25, 0xb0, + 0x51, 0x4e, 0xc6, 0x59, 0xbd, 0x68, 0xb1, 0x5e, 0x7c, 0xbf, 0x45, 0x42, 0x44, 0x4c, 0x52, 0x87, + 0x56, 0x3c, 0xfb, 0xac, 0x55, 0x4e, 0x6d, 0x27, 0xc8, 0x18, 0x63, 0xb1, 0xf9, 0xb8, 0xf0, 0xd3, + 0x70, 0x5b, 0x21, 0x35, 0xab, 0x52, 0x7c, 0xc0, 0x0f, 0xcb, 0xc8, 0xeb, 0x91, 0x36, 0x39, 0x1d, + 0xd4, 0xa6, 0xce, 0x32, 0xce, 0x00, 0x8f, 0x29, 0x21, 0xa6, 0x20, 0x08, 0xd1, 0xeb, 0xf5, 0x1f, + 0x6d, 0x36, 0x9b, 0xaf, 0xaf, 0x4e, 0x16, 0x19, 0x6a, 0xaf, 0xa0, 0x8f, 0xea, 0x72, 0x82, 0xfd, + 0xfd, 0xfd, 0xde, 0x1e, 0xb5, 0x2c, 0x3c, 0x7a, 0x53, 0x43, 0x7b, 0x34, 0xb2, 0x5f, 0xc0, 0x16, + 0xdd, 0x8e, 0xd0, 0x30, 0x5b, 0xef, 0xad, 0xcf, 0x8a, 0x58, 0x2c, 0x96, 0x49, 0xf0, 0x14, 0x0a, + 0xc5, 0xd5, 0x58, 0x83, 0xc4, 0xb0, 0x21, 0x10, 0x08, 0xf8, 0x07, 0xd4, 0x9b, 0x38, 0x77, 0x93, + 0x80, 0x0e, 0xb4, 0xe4, 0x47, 0xd8, 0x9a, 0xdf, 0xaa, 0xcb, 0xe6, 0xd9, 0x5a, 0x25, 0xe3, 0x80, + 0x6d, 0xcd, 0x7b, 0x23, 0xfc, 0x3a, 0xab, 0x9b, 0x99, 0x99, 0x09, 0x80, 0x57, 0x52, 0x52, 0x72, + 0x23, 0xe6, 0x20, 0xa3, 0xd1, 0xf8, 0x39, 0x1c, 0x0e, 0xfb, 0x27, 0x26, 0x26, 0x02, 0x1e, 0x8f, + 0x27, 0x30, 0x3d, 0x3d, 0xcd, 0x37, 0xf1, 0xf9, 0x7c, 0x3c, 0x7b, 0xbd, 0x5e, 0x9e, 0xc1, 0x07, + 0x06, 0x01, 0xc7, 0x1d, 0x64, 0x32, 0x99, 0x26, 0xcd, 0x66, 0xb3, 0x7f, 0x61, 0x73, 0x3c, 0x8a, + 0x2b, 0xc8, 0x60, 0x30, 0x7c, 0xb1, 0xdb, 0xed, 0xab, 0x1f, 0x64, 0xb5, 0x5a, 0x7d, 0xb0, 0x29, + 0x18, 0x0c, 0xfa, 0xe1, 0x5d, 0xcd, 0xcf, 0xcf, 0xf3, 0x4d, 0x42, 0xa1, 0x10, 0xcf, 0xf0, 0x0d, + 0x0c, 0x3e, 0x30, 0xd4, 0xad, 0x28, 0x08, 0x2e, 0x03, 0x6c, 0xee, 0x56, 0x67, 0x72, 0x2f, 0x9a, + 0xa4, 0x9c, 0xa5, 0x45, 0xce, 0x5f, 0x86, 0x2e, 0xdd, 0xee, 0x08, 0x70, 0x97, 0x76, 0x27, 0xcf, + 0xdd, 0xcd, 0x47, 0x78, 0x86, 0xba, 0xb9, 0xb9, 0xb9, 0xf8, 0x83, 0x3a, 0x3b, 0x3b, 0xa7, 0x5c, + 0x2e, 0x97, 0xdf, 0xd1, 0xb0, 0x9d, 0x1b, 0xbc, 0x54, 0x4c, 0x9f, 0x5e, 0xc8, 0x8b, 0xb8, 0xdd, + 0x6e, 0xff, 0x93, 0xda, 0x6c, 0xce, 0x71, 0xf9, 0x28, 0x7d, 0x5c, 0x93, 0xc5, 0x01, 0x0f, 0x9c, + 0xcf, 0x8d, 0x0c, 0x19, 0x8a, 0xe9, 0x60, 0x7d, 0x06, 0xe7, 0x74, 0x3a, 0x03, 0xe0, 0x29, 0x95, + 0xca, 0xf6, 0x58, 0x83, 0x48, 0x7a, 0x7a, 0xfa, 0x61, 0xa9, 0x54, 0x5a, 0xd4, 0xa7, 0x95, 0xfc, + 0x18, 0xba, 0xa6, 0xa2, 0x0f, 0x4a, 0x13, 0xdf, 0x31, 0xaf, 0xe0, 0x5e, 0xf9, 0x86, 0xa9, 0xd1, + 0x8e, 0x0a, 0x6a, 0x52, 0x89, 0xbe, 0x02, 0xdf, 0x2f, 0x4d, 0x78, 0x3f, 0x72, 0x5d, 0x45, 0x7b, + 0xab, 0xb7, 0xfd, 0x94, 0x48, 0x24, 0xc7, 0xc0, 0x13, 0x89, 0x44, 0x9b, 0x63, 0x9e, 0x0c, 0x18, + 0x98, 0x64, 0x2e, 0x23, 0xdf, 0xde, 0x34, 0x92, 0xd0, 0x5d, 0x25, 0x71, 0x82, 0x77, 0xbb, 0x90, + 0x7c, 0x00, 0xbe, 0x53, 0x44, 0x3c, 0xc0, 0xb7, 0x0a, 0xc9, 0x18, 0x30, 0xd4, 0xc1, 0x49, 0xc4, + 0x3d, 0x82, 0xa2, 0xc2, 0xb6, 0x30, 0x6d, 0x65, 0x4a, 0x45, 0x4e, 0x43, 0x4e, 0x43, 0x4e, 0x45, + 0x96, 0x2e, 0xd5, 0x07, 0x6b, 0x05, 0xdf, 0xa3, 0x94, 0xc4, 0xa4, 0x8f, 0x62, 0x13, 0x16, 0x8d, + 0x45, 0x79, 0xfb, 0x98, 0x0a, 0xa2, 0xf8, 0x15, 0xd6, 0x58, 0xa2, 0xbc, 0x06, 0x9c, 0x7b, 0x7f, + 0x7a, 0x2f, 0xf3, 0x2b, 0x52, 0x50, 0x49, 0xc8, 0xc9, 0xc8, 0xc9, 0x0b, 0xc7, 0xbb, 0x50, 0xb3, + 0xec, 0x13, 0x2d, 0x11, 0xb2, 0x9e, 0x49, 0xc7, 0xd4, 0xc8, 0xa4, 0x42, 0xaf, 0x12, 0x59, 0x8d, + 0x7c, 0x12, 0x19, 0xea, 0x84, 0x71, 0x05, 0xc1, 0xad, 0x63, 0xda, 0xc5, 0x94, 0x8b, 0x47, 0x70, + 0x8e, 0x49, 0xc3, 0xb4, 0x87, 0xa9, 0x06, 0xb9, 0x16, 0x59, 0x83, 0x0c, 0x61, 0x79, 0xe8, 0x89, + 0x63, 0x0d, 0x12, 0x32, 0x55, 0x63, 0x83, 0x95, 0x28, 0xff, 0x9f, 0x0c, 0x6a, 0x58, 0xab, 0xa0, + 0xb3, 0x6b, 0x15, 0x54, 0xf7, 0xdf, 0xbd, 0x23, 0xdd, 0xaa, 0x07, 0x61, 0x58, 0x26, 0x53, 0x36, + 0x53, 0x3d, 0x6e, 0x86, 0x3f, 0x6a, 0x56, 0xd4, 0x93, 0xd6, 0x20, 0x57, 0x22, 0xc3, 0xe5, 0xc9, + 0x41, 0x6f, 0x63, 0xbc, 0x93, 0x61, 0x1d, 0xd3, 0x19, 0xa6, 0x2a, 0xa6, 0x32, 0xf4, 0x4e, 0x21, + 0x9f, 0x46, 0x2e, 0x47, 0x86, 0xba, 0xc4, 0xa5, 0x26, 0xc3, 0x6f, 0xb6, 0xf0, 0x43, 0xa9, 0x3d, + 0xc3, 0xa5, 0x58, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, +}; + +const BITMAP_OPAQUE mirror_footprint_axisX_xpm[1] = {{ png, sizeof( png ), "mirror_footprint_axisX_xpm" }}; + +//EOF diff --git a/bitmaps_png/cpp_26/mirror_footprint_axisY.cpp b/bitmaps_png/cpp_26/mirror_footprint_axisY.cpp new file mode 100644 index 0000000000..ae18471632 --- /dev/null +++ b/bitmaps_png/cpp_26/mirror_footprint_axisY.cpp @@ -0,0 +1,64 @@ + +/* Do not modify this file, it was automatically generated by the + * PNG2cpp CMake script, using a *.png file as input. + */ + +#include + +static const unsigned char png[] = { + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, + 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c, + 0xce, 0x00, 0x00, 0x02, 0xeb, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xed, 0x96, 0x5f, 0x48, 0x53, + 0x51, 0x1c, 0xc7, 0x77, 0xb6, 0xca, 0x86, 0x9a, 0xa6, 0xa5, 0x19, 0x65, 0xf6, 0x87, 0x0c, 0xd4, + 0xb2, 0x20, 0xc2, 0x14, 0x57, 0x2e, 0xff, 0x2e, 0x2b, 0xc2, 0x9c, 0x3a, 0xaf, 0x34, 0x8b, 0x1c, + 0xf8, 0x56, 0x42, 0xb3, 0x21, 0x83, 0x32, 0xea, 0xa5, 0x84, 0x5a, 0x98, 0xb1, 0x35, 0x72, 0x19, + 0x35, 0x03, 0xb7, 0x90, 0xf6, 0x10, 0xbe, 0xec, 0xa5, 0x41, 0xc4, 0xa0, 0x07, 0x21, 0x7a, 0x89, + 0x8a, 0xb9, 0xb5, 0x31, 0xff, 0x8d, 0xdd, 0x51, 0xee, 0x9e, 0x7e, 0x47, 0xee, 0xbd, 0x4c, 0x71, + 0xbb, 0x59, 0xb0, 0x97, 0x3a, 0xf0, 0x79, 0xd8, 0xe5, 0xfc, 0xf6, 0xd9, 0xef, 0x7c, 0x0f, 0xbf, + 0x3b, 0x11, 0xc6, 0x58, 0xf4, 0xbb, 0xc0, 0x5a, 0x0f, 0xe0, 0xd5, 0xd4, 0xf0, 0xb5, 0xff, 0xb6, + 0xe8, 0x6f, 0x88, 0xfd, 0xb5, 0xeb, 0x12, 0x80, 0xd8, 0x3d, 0x12, 0x40, 0x1b, 0x53, 0x83, 0x80, + 0xdc, 0x04, 0xe4, 0x2c, 0x11, 0xc1, 0xda, 0x0e, 0x74, 0x00, 0x14, 0x70, 0x1e, 0xb8, 0x00, 0x74, + 0xb2, 0x9f, 0x09, 0x25, 0x2b, 0x1d, 0x1d, 0xac, 0xe2, 0x81, 0x81, 0x01, 0x9f, 0xdd, 0x6e, 0xf7, + 0x58, 0xad, 0xd6, 0x29, 0x9d, 0x4e, 0xf7, 0xdd, 0x62, 0xb1, 0x4c, 0xf5, 0xf7, 0xf7, 0x2f, 0x3e, + 0xd3, 0xeb, 0xf5, 0x5f, 0xc9, 0x77, 0xb3, 0x7b, 0x45, 0x6b, 0x81, 0x5d, 0xc0, 0xc5, 0x04, 0x1c, + 0x62, 0x3b, 0xe3, 0x45, 0xb0, 0x32, 0x80, 0x72, 0xa7, 0xd3, 0x49, 0x4f, 0x4f, 0x4f, 0xd3, 0xf0, + 0x2c, 0x3c, 0x3e, 0x3e, 0x1e, 0x36, 0x9b, 0xcd, 0xe1, 0x48, 0x24, 0x12, 0x9e, 0x99, 0x99, 0xa1, + 0x6d, 0x36, 0x5b, 0x00, 0x21, 0x54, 0x22, 0x91, 0x48, 0xc8, 0x5e, 0x91, 0x12, 0x50, 0x0b, 0x88, + 0x3a, 0xd9, 0x8e, 0x33, 0x81, 0x87, 0x44, 0x62, 0xac, 0x47, 0x01, 0xab, 0x6a, 0x73, 0xe4, 0x65, + 0x47, 0x1e, 0x36, 0x35, 0xe7, 0x32, 0x9c, 0x8c, 0xe0, 0xf5, 0x7a, 0x69, 0x8b, 0x32, 0x9b, 0x79, + 0x4e, 0xe5, 0x31, 0xa3, 0x6d, 0x59, 0xf4, 0x1d, 0x39, 0xf2, 0x11, 0x51, 0xab, 0x80, 0x24, 0x56, + 0x96, 0xce, 0x76, 0x93, 0xf9, 0x5e, 0x8d, 0xe6, 0x5f, 0xf7, 0x29, 0xb0, 0x4d, 0x5b, 0x83, 0x5d, + 0x9a, 0x2c, 0x26, 0x18, 0x0c, 0xf2, 0x22, 0x8f, 0xc7, 0x43, 0xbb, 0x35, 0xe9, 0x8c, 0x5d, 0xa7, + 0xc0, 0x8e, 0x6b, 0xb5, 0xf8, 0x4d, 0x2b, 0x0a, 0x92, 0xa2, 0x7a, 0xa0, 0x49, 0x40, 0xd2, 0x02, + 0x34, 0xb2, 0x1d, 0x7d, 0x06, 0x52, 0xaf, 0x57, 0x22, 0xe7, 0xdd, 0xea, 0x35, 0x6e, 0x4b, 0xd7, + 0xc1, 0xa8, 0xb1, 0xbb, 0x32, 0x1a, 0x0a, 0x85, 0xc2, 0x9c, 0x88, 0x74, 0xf7, 0xb8, 0xbb, 0x22, + 0x6a, 0x52, 0x17, 0xfd, 0xb8, 0x57, 0x2d, 0x7e, 0xa7, 0x2d, 0x13, 0x3b, 0xb9, 0x50, 0xf3, 0x05, + 0x44, 0x07, 0xe2, 0x5c, 0x86, 0xfd, 0x6e, 0xb7, 0x9b, 0x17, 0x2c, 0x67, 0x62, 0x62, 0xc2, 0x0f, + 0x7b, 0x76, 0x70, 0x97, 0xe1, 0x2c, 0xd0, 0x2e, 0x20, 0x22, 0xf9, 0x34, 0x03, 0xd9, 0x44, 0x44, + 0x8e, 0xf0, 0xf6, 0x71, 0xf4, 0x69, 0xf0, 0xa4, 0x74, 0x6a, 0x98, 0x2a, 0x60, 0x0c, 0x6d, 0x85, + 0xcc, 0xdc, 0xdc, 0x1c, 0x2f, 0xf0, 0xfb, 0xfd, 0xf4, 0x90, 0x6a, 0x0f, 0x63, 0x6c, 0xd9, 0xb6, + 0x30, 0xd4, 0x28, 0xf5, 0xf4, 0x55, 0x88, 0x3f, 0xae, 0x36, 0xa3, 0x0d, 0x40, 0x29, 0x97, 0x91, + 0x43, 0x7f, 0x1a, 0x8f, 0x69, 0xeb, 0xe3, 0x66, 0x34, 0xa6, 0x6b, 0xc4, 0x8e, 0xbe, 0x06, 0x3e, + 0xa3, 0x33, 0x80, 0x4a, 0x40, 0x42, 0xb1, 0x39, 0xa6, 0x01, 0x75, 0xa4, 0xa3, 0x5b, 0xc7, 0xd0, + 0xa4, 0x41, 0x91, 0xfa, 0xcd, 0x4c, 0xed, 0x66, 0x0c, 0x54, 0x51, 0x34, 0xb6, 0xa3, 0x40, 0x20, + 0x40, 0x0f, 0x51, 0xfb, 0x18, 0xa3, 0x6a, 0xe7, 0xc2, 0x83, 0x06, 0xe9, 0x17, 0x5d, 0xb9, 0x78, + 0x32, 0xa9, 0x19, 0x35, 0x00, 0xe7, 0x04, 0x44, 0xe4, 0x78, 0x4f, 0x01, 0x1b, 0xd9, 0x8c, 0x52, + 0x6f, 0x54, 0x22, 0x97, 0xa1, 0x06, 0x7d, 0x78, 0x76, 0xa9, 0x38, 0xfa, 0xa8, 0xab, 0x6c, 0xc9, + 0xad, 0x23, 0xc7, 0x68, 0xd2, 0x1c, 0x89, 0x3e, 0x51, 0x17, 0xfe, 0x1c, 0xac, 0x43, 0xee, 0xde, + 0xa3, 0xe2, 0xb7, 0xab, 0xcd, 0x88, 0x5c, 0x06, 0x17, 0x97, 0x91, 0xbd, 0xb7, 0x0e, 0x8f, 0xf6, + 0xc8, 0xe3, 0x66, 0xf4, 0xa2, 0xa7, 0x16, 0xbf, 0xba, 0x7a, 0x82, 0xcf, 0xa8, 0x99, 0x9d, 0x6f, + 0x42, 0x12, 0x72, 0x33, 0xd3, 0xb8, 0xf1, 0x73, 0xbf, 0x06, 0x79, 0x87, 0x95, 0x39, 0xa1, 0x91, + 0xf6, 0x7c, 0x3c, 0xd8, 0xb4, 0x95, 0x99, 0x9d, 0x9d, 0xe5, 0x3b, 0xf2, 0xf9, 0x7c, 0xb4, 0x49, + 0xb9, 0x85, 0x19, 0x6e, 0xcf, 0x67, 0x9e, 0x2a, 0x37, 0xcd, 0xdf, 0x94, 0x21, 0x0f, 0x29, 0x12, + 0x03, 0x05, 0x02, 0xa2, 0x52, 0x76, 0x72, 0x93, 0xb9, 0x68, 0x63, 0x65, 0x29, 0xc0, 0x61, 0x97, + 0xcb, 0xb5, 0x38, 0xdb, 0x96, 0xe7, 0x43, 0x9e, 0x39, 0x1c, 0x0e, 0x32, 0xeb, 0xf6, 0xc2, 0xac, + 0x4b, 0x49, 0xde, 0x65, 0x60, 0x0b, 0xa4, 0xe4, 0xcb, 0x12, 0x90, 0x11, 0x47, 0x94, 0x5e, 0x55, + 0x55, 0xd5, 0x23, 0x97, 0xcb, 0xaf, 0xac, 0x84, 0x4c, 0x26, 0xbb, 0x4c, 0x6a, 0xfe, 0xe4, 0x55, + 0x4e, 0x8e, 0x4f, 0x93, 0x94, 0x57, 0x39, 0xb9, 0x71, 0xff, 0xff, 0x05, 0x25, 0x55, 0xf4, 0x0b, + 0x47, 0x10, 0x1b, 0x88, 0xb6, 0x78, 0xc3, 0xad, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, + 0xae, 0x42, 0x60, 0x82, +}; + +const BITMAP_OPAQUE mirror_footprint_axisY_xpm[1] = {{ png, sizeof( png ), "mirror_footprint_axisY_xpm" }}; + +//EOF diff --git a/bitmaps_png/cpp_26/rotate_module_neg.cpp b/bitmaps_png/cpp_26/rotate_module_ccw.cpp similarity index 98% rename from bitmaps_png/cpp_26/rotate_module_neg.cpp rename to bitmaps_png/cpp_26/rotate_module_ccw.cpp index 0277523641..f485595314 100644 --- a/bitmaps_png/cpp_26/rotate_module_neg.cpp +++ b/bitmaps_png/cpp_26/rotate_module_ccw.cpp @@ -86,6 +86,6 @@ static const unsigned char png[] = { 0xb8, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, }; -const BITMAP_OPAQUE rotate_module_neg_xpm[1] = {{ png, sizeof( png ), "rotate_module_neg_xpm" }}; +const BITMAP_OPAQUE rotate_module_ccw_xpm[1] = {{ png, sizeof( png ), "rotate_module_ccw_xpm" }}; //EOF diff --git a/bitmaps_png/cpp_26/rotate_module_pos.cpp b/bitmaps_png/cpp_26/rotate_module_cw.cpp similarity index 98% rename from bitmaps_png/cpp_26/rotate_module_pos.cpp rename to bitmaps_png/cpp_26/rotate_module_cw.cpp index 899f47bec9..e327f721b9 100644 --- a/bitmaps_png/cpp_26/rotate_module_pos.cpp +++ b/bitmaps_png/cpp_26/rotate_module_cw.cpp @@ -88,6 +88,6 @@ static const unsigned char png[] = { 0x33, 0x99, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, }; -const BITMAP_OPAQUE rotate_module_pos_xpm[1] = {{ png, sizeof( png ), "rotate_module_pos_xpm" }}; +const BITMAP_OPAQUE rotate_module_cw_xpm[1] = {{ png, sizeof( png ), "rotate_module_cw_xpm" }}; //EOF diff --git a/bitmaps_png/sources/invert_module.svg b/bitmaps_png/sources/invert_module.svg deleted file mode 100644 index cb8749171c..0000000000 --- a/bitmaps_png/sources/invert_module.svg +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/bitmaps_png/sources/lang_sl.svg b/bitmaps_png/sources/lang_sl.svg index 3dc4604a7c..c6eccffb97 100644 --- a/bitmaps_png/sources/lang_sl.svg +++ b/bitmaps_png/sources/lang_sl.svg @@ -1,23 +1,96 @@ - - Flag of Brazil - - - - - - - - - - - - - - - - - - - - - + + + +image/svg+xml \ No newline at end of file diff --git a/bitmaps_png/sources/mirror_footprint_axisX.svg b/bitmaps_png/sources/mirror_footprint_axisX.svg new file mode 100644 index 0000000000..360f07f5bf --- /dev/null +++ b/bitmaps_png/sources/mirror_footprint_axisX.svg @@ -0,0 +1,353 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bitmaps_png/sources/mirror_footprint_axisY.svg b/bitmaps_png/sources/mirror_footprint_axisY.svg new file mode 100644 index 0000000000..c4270a3d06 --- /dev/null +++ b/bitmaps_png/sources/mirror_footprint_axisY.svg @@ -0,0 +1,353 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bitmaps_png/sources/rotate_module_neg.svg b/bitmaps_png/sources/rotate_module_ccw.svg similarity index 100% rename from bitmaps_png/sources/rotate_module_neg.svg rename to bitmaps_png/sources/rotate_module_ccw.svg diff --git a/bitmaps_png/sources/rotate_module_pos.svg b/bitmaps_png/sources/rotate_module_cw.svg similarity index 100% rename from bitmaps_png/sources/rotate_module_pos.svg rename to bitmaps_png/sources/rotate_module_cw.svg diff --git a/include/bitmaps.h b/include/bitmaps.h index 280942ebc9..3cb1f2691d 100644 --- a/include/bitmaps.h +++ b/include/bitmaps.h @@ -225,7 +225,6 @@ EXTERN_BITMAP( import_xpm ) EXTERN_BITMAP( import3d_xpm ) EXTERN_BITMAP( info_xpm ) EXTERN_BITMAP( insert_module_board_xpm ) -EXTERN_BITMAP( invert_module_xpm ) EXTERN_BITMAP( invisible_text_xpm ) EXTERN_BITMAP( kicad_icon_small_xpm ) EXTERN_BITMAP( label2glabel_xpm ) @@ -274,6 +273,8 @@ EXTERN_BITMAP( macros_record_xpm ) EXTERN_BITMAP( mirepcb_xpm ) EXTERN_BITMAP( mirror_h_xpm ) EXTERN_BITMAP( mirror_v_xpm ) +EXTERN_BITMAP( mirror_footprint_axisX_xpm ) +EXTERN_BITMAP( mirror_footprint_axisY_xpm ) EXTERN_BITMAP( mode_module_xpm ) EXTERN_BITMAP( mode_track_xpm ) EXTERN_BITMAP( modratsnest_xpm ) @@ -424,8 +425,8 @@ EXTERN_BITMAP( resize_sheet_xpm ) EXTERN_BITMAP( right_xpm ) EXTERN_BITMAP( rotate_field_xpm ) EXTERN_BITMAP( rotate_glabel_xpm ) -EXTERN_BITMAP( rotate_module_neg_xpm ) -EXTERN_BITMAP( rotate_module_pos_xpm ) +EXTERN_BITMAP( rotate_module_cw_xpm ) +EXTERN_BITMAP( rotate_module_ccw_xpm ) EXTERN_BITMAP( rotate_pin_xpm ) EXTERN_BITMAP( rotate_cw_xpm ) EXTERN_BITMAP( rotate_ccw_xpm ) diff --git a/pcbnew/modedit_onclick.cpp b/pcbnew/modedit_onclick.cpp index e4ff4eb701..5fa0abb448 100644 --- a/pcbnew/modedit_onclick.cpp +++ b/pcbnew/modedit_onclick.cpp @@ -259,9 +259,9 @@ bool FOOTPRINT_EDIT_FRAME::OnRightClick( const wxPoint& MousePos, wxMenu* PopMen { wxMenu* transform_choice = new wxMenu; AddMenuItem( transform_choice, ID_MODEDIT_MODULE_ROTATE, _( "Rotate" ), - KiBitmap( rotate_module_pos_xpm ) ); + KiBitmap( rotate_module_ccw_xpm ) ); AddMenuItem( transform_choice, ID_MODEDIT_MODULE_MIRROR, _( "Mirror" ), - KiBitmap( mirror_h_xpm ) ); + KiBitmap( mirror_footprint_axisY_xpm ) ); msg = AddHotkeyName( _( "Edit Module" ), g_Module_Editor_Hokeys_Descr, HK_EDIT_ITEM ); AddMenuItem( PopMenu, ID_POPUP_PCB_EDIT_MODULE_PRMS, msg, KiBitmap( edit_module_xpm ) ); AddMenuItem( PopMenu, transform_choice, ID_MODEDIT_TRANSFORM_MODULE, diff --git a/pcbnew/onrightclick.cpp b/pcbnew/onrightclick.cpp index ffb14ac90a..aa210034a3 100644 --- a/pcbnew/onrightclick.cpp +++ b/pcbnew/onrightclick.cpp @@ -401,7 +401,7 @@ bool PCB_EDIT_FRAME::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu ) _( "Automatically Place Next Footprints" ) ); commands->AppendSeparator(); AddMenuItem( commands, ID_POPUP_PCB_REORIENT_ALL_MODULES, - _( "Orient All Footprints" ), KiBitmap( rotate_module_pos_xpm ) ); + _( "Orient All Footprints" ), KiBitmap( rotate_module_cw_xpm ) ); aPopMenu->AppendSeparator(); } @@ -450,7 +450,7 @@ void PCB_EDIT_FRAME::createPopUpBlockMenu( wxMenu* menu ) menu->AppendSeparator(); AddMenuItem( menu, ID_POPUP_PLACE_BLOCK, _( "Place Block" ), KiBitmap( checked_ok_xpm ) ); AddMenuItem( menu, ID_POPUP_COPY_BLOCK, _( "Copy Block" ), KiBitmap( copyblock_xpm ) ); - AddMenuItem( menu, ID_POPUP_FLIP_BLOCK, _( "Flip Block" ), KiBitmap( invert_module_xpm ) ); + AddMenuItem( menu, ID_POPUP_FLIP_BLOCK, _( "Flip Block" ), KiBitmap( mirror_footprint_axisX_xpm ) ); AddMenuItem( menu, ID_POPUP_ROTATE_BLOCK, _( "Rotate Block" ), KiBitmap( rotate_ccw_xpm ) ); AddMenuItem( menu, ID_POPUP_DELETE_BLOCK, _( "Delete Block" ), KiBitmap( delete_xpm ) ); } @@ -746,12 +746,12 @@ void PCB_EDIT_FRAME::createPopUpMenuForFootprints( MODULE* aModule, wxMenu* menu msg = AddHotkeyName( _( "Rotate +" ), g_Board_Editor_Hokeys_Descr, HK_ROTATE_ITEM ); AddMenuItem( sub_menu_footprint, ID_POPUP_PCB_ROTATE_MODULE_COUNTERCLOCKWISE, - msg, KiBitmap( rotate_module_pos_xpm ) ); + msg, KiBitmap( rotate_module_ccw_xpm ) ); AddMenuItem( sub_menu_footprint, ID_POPUP_PCB_ROTATE_MODULE_CLOCKWISE, - _( "Rotate -" ), KiBitmap( rotate_module_neg_xpm ) ); + _( "Rotate -" ), KiBitmap( rotate_module_cw_xpm ) ); msg = AddHotkeyName( _( "Flip" ), g_Board_Editor_Hokeys_Descr, HK_FLIP_ITEM ); AddMenuItem( sub_menu_footprint, ID_POPUP_PCB_CHANGE_SIDE_MODULE, - msg, KiBitmap( invert_module_xpm ) ); + msg, KiBitmap( mirror_footprint_axisX_xpm ) ); if( !flags ) { @@ -913,7 +913,7 @@ void PCB_EDIT_FRAME::createPopUpMenuForTexts( TEXTE_PCB* Text, wxMenu* menu ) msg = AddHotkeyName( _( "Rotate" ), g_Board_Editor_Hokeys_Descr, HK_ROTATE_ITEM ); AddMenuItem( sub_menu_Text, ID_POPUP_PCB_ROTATE_TEXTEPCB, msg, KiBitmap( rotate_ccw_xpm ) ); msg = AddHotkeyName( _( "Flip" ), g_Board_Editor_Hokeys_Descr, HK_FLIP_ITEM ); - AddMenuItem( sub_menu_Text, ID_POPUP_PCB_FLIP_TEXTEPCB, msg, KiBitmap( invert_module_xpm ) ); + AddMenuItem( sub_menu_Text, ID_POPUP_PCB_FLIP_TEXTEPCB, msg, KiBitmap( mirror_h_xpm ) ); msg = AddHotkeyName( _( "Edit" ), g_Board_Editor_Hokeys_Descr, HK_EDIT_ITEM ); AddMenuItem( sub_menu_Text, ID_POPUP_PCB_EDIT_TEXTEPCB, msg, KiBitmap( edit_text_xpm ) ); if( !flags ) From 218cb8e7c13638d730830128a156378a18394e82 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sun, 1 Jun 2014 16:58:17 +0200 Subject: [PATCH 467/741] Pcbnew: fix Bug #1325311 ("New Board" warning refusal broken) --- pcbnew/files.cpp | 3 +- pcbnew/initpcb.cpp | 28 ++++++------------- pcbnew/modedit.cpp | 70 ++++++++++++++++++++++++++-------------------- 3 files changed, 50 insertions(+), 51 deletions(-) diff --git a/pcbnew/files.cpp b/pcbnew/files.cpp index 10eaa4be0a..4677983e31 100644 --- a/pcbnew/files.cpp +++ b/pcbnew/files.cpp @@ -170,7 +170,8 @@ void PCB_EDIT_FRAME::Files_io( wxCommandEvent& event ) case ID_NEW_BOARD: { - Clear_Pcb( true ); + if( ! Clear_Pcb( true ) ) + break; // Clear footprint library table for the new board. Prj().PcbFootprintLibs()->Clear(); diff --git a/pcbnew/initpcb.cpp b/pcbnew/initpcb.cpp index dba920d780..f20737ff7d 100644 --- a/pcbnew/initpcb.cpp +++ b/pcbnew/initpcb.cpp @@ -3,10 +3,6 @@ */ #include -#include -#include -#include -#include #include #include @@ -21,19 +17,16 @@ bool PCB_EDIT_FRAME::Clear_Pcb( bool aQuery ) if( GetBoard() == NULL ) return false; - if( aQuery ) + if( aQuery && GetScreen()->IsModify() && !GetBoard()->IsEmpty() ) { - if( GetBoard()->m_Drawings || GetBoard()->m_Modules - || GetBoard()->m_Track || GetBoard()->m_Zone ) - { - if( !IsOK( this, - _( "Current Board will be lost and this operation cannot be undone. Continue ?" ) ) ) - return false; - } + if( !IsOK( this, + _( "Current Board will be lost and this operation cannot be undone. Continue ?" ) ) ) + return false; } // Clear undo and redo lists because we want a full deletion GetScreen()->ClearUndoRedoList(); + GetScreen()->ClrModify(); // Items visibility flags will be set becuse a new board will be created. // Grid and ratsnest can be left to their previous state @@ -84,14 +77,11 @@ bool FOOTPRINT_EDIT_FRAME::Clear_Pcb( bool aQuery ) if( GetBoard() == NULL ) return false; - if( aQuery && GetScreen()->IsModify() ) + if( aQuery && GetScreen()->IsModify() && !GetBoard()->IsEmpty() ) { - if( GetBoard()->m_Modules ) - { - if( !IsOK( this, - _( "Current Footprint will be lost and this operation cannot be undone. Continue ?" ) ) ) - return false; - } + if( !IsOK( this, + _( "Current Footprint will be lost and this operation cannot be undone. Continue ?" ) ) ) + return false; } // Clear undo and redo lists diff --git a/pcbnew/modedit.cpp b/pcbnew/modedit.cpp index 7150c85bcf..1fe0e4ddf5 100644 --- a/pcbnew/modedit.cpp +++ b/pcbnew/modedit.cpp @@ -264,6 +264,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) case ID_OPEN_MODULE_VIEWER: { FOOTPRINT_VIEWER_FRAME* viewer = (FOOTPRINT_VIEWER_FRAME*) Kiway().Player( FRAME_PCB_MODULE_VIEWER, false ); + if( !viewer ) { viewer = (FOOTPRINT_VIEWER_FRAME*) Kiway().Player( FRAME_PCB_MODULE_VIEWER, true ); @@ -272,11 +273,6 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) } else { - /* - if( viewer->IsIconized() ) - viewer->Iconize( false ); - */ - viewer->Raise(); // Raising the window does not set the focus on Linux. This should work on @@ -293,7 +289,9 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) case ID_MODEDIT_NEW_MODULE: { - Clear_Pcb( true ); + if( ! Clear_Pcb( true ) ) + break; + GetScreen()->ClearUndoRedoList(); SetCurItem( NULL ); SetCrossHairPosition( wxPoint( 0, 0 ) ); @@ -319,35 +317,46 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) case ID_MODEDIT_NEW_MODULE_FROM_WIZARD: { + if( GetScreen()->IsModify() && !GetBoard()->IsEmpty() ) + { + if( !IsOK( this, + _( "Current Footprint will be lost and this operation cannot be undone. Continue ?" ) ) ) + break; + } + FOOTPRINT_WIZARD_FRAME* wizard = (FOOTPRINT_WIZARD_FRAME*) Kiway().Player( FRAME_PCB_FOOTPRINT_WIZARD_MODAL, true ); - wizard->Zoom_Automatique( false ); - - if( wizard->ShowModal() ) + if( wizard->ShowModal( NULL, this ) ) { // Creates the new footprint from python script wizard MODULE* module = wizard->GetBuiltFootprint(); - if( module ) // i.e. if create module command not aborted - { - Clear_Pcb( true ); - GetScreen()->ClearUndoRedoList(); - SetCurItem( NULL ); - SetCrossHairPosition( wxPoint( 0, 0 ) ); + if( module == NULL ) // i.e. if create module command aborted + break; - // Add the new object to board - module->SetParent( (EDA_ITEM*)GetBoard() ); - GetBoard()->m_Modules.Append( module ); + Clear_Pcb( false ); - // 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 ) ); - module->ClearFlags(); - } + GetScreen()->ClearUndoRedoList(); + SetCurItem( NULL ); + SetCrossHairPosition( wxPoint( 0, 0 ) ); + + // Add the new object 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 ) ); + module->ClearFlags(); + + Zoom_Automatique( false ); + + if( m_Draw3DFrame ) + m_Draw3DFrame->NewDisplay(); } wizard->Destroy(); @@ -492,9 +501,9 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) case ID_MODEDIT_LOAD_MODULE: wxLogDebug( wxT( "Loading module from library " ) + getLibPath() ); - GetScreen()->ClearUndoRedoList(); - SetCurItem( NULL ); - Clear_Pcb( true ); + if( ! Clear_Pcb( true ) ) + break; + SetCrossHairPosition( wxPoint( 0, 0 ) ); LoadModuleFromLibrary( getLibNickName(), Prj().PcbFootprintLibs(), true ); @@ -520,11 +529,10 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) val->SetType( TEXTE_MODULE::TEXT_is_VALUE ); // just in case ... if( val->GetLength() == 0 ) - val->SetText( L"Val**" ); + val->SetText( wxT( "Val**" ) ); } } - GetScreen()->ClrModify(); Zoom_Automatique( false ); if( m_Draw3DFrame ) From a90680aa1525c9470904c4aec4f99c508cc6e0cc Mon Sep 17 00:00:00 2001 From: Tomasz Wlostowski Date: Sun, 1 Jun 2014 18:44:38 +0200 Subject: [PATCH 468/741] router: fix segfault on route-undo-route --- pcbnew/router/router_tool.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index c332b9a2ed..177660798a 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -659,6 +659,7 @@ int ROUTER_TOOL::Main( TOOL_EVENT& aEvent ) if( m_needsSync ) { m_router->SyncWorld(); + m_router->SetView( getView() ); m_needsSync = false; } From 8e3b896bf76f5825225b2f94dcb64f193f8f05d9 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 1 Jun 2014 18:55:53 +0200 Subject: [PATCH 469/741] idf tools: code cleanup and debugging --- utils/idftools/dxf2idfmain.cpp | 2 +- utils/idftools/idf2vrml.cpp | 173 +- utils/idftools/idf_common.cpp | 390 ++-- utils/idftools/idf_common.h | 85 +- utils/idftools/idf_helpers.cpp | 32 +- utils/idftools/idf_helpers.h | 8 +- utils/idftools/idf_outlines.cpp | 2162 +++++++++++++++------- utils/idftools/idf_outlines.h | 400 +++-- utils/idftools/idf_parser.cpp | 2983 +++++++++++++++++-------------- utils/idftools/idf_parser.h | 246 ++- 10 files changed, 4006 insertions(+), 2475 deletions(-) diff --git a/utils/idftools/dxf2idfmain.cpp b/utils/idftools/dxf2idfmain.cpp index 30ad09a527..df804c15be 100644 --- a/utils/idftools/dxf2idfmain.cpp +++ b/utils/idftools/dxf2idfmain.cpp @@ -187,4 +187,4 @@ int main( int argc, char **argv ) fprintf( fp, ".END_ELECTRICAL\n" ); return 0; -} +} \ No newline at end of file diff --git a/utils/idftools/idf2vrml.cpp b/utils/idftools/idf2vrml.cpp index 0032e39b61..dce24f41db 100644 --- a/utils/idftools/idf2vrml.cpp +++ b/utils/idftools/idf2vrml.cpp @@ -31,6 +31,7 @@ * would be more likely if we used a 1:1 scale. */ + #include #include #include @@ -45,6 +46,7 @@ #include #include #include +#include #include #include @@ -111,6 +113,7 @@ VRML_COLOR colors[NCOLORS] = { \ bool WriteHeader( IDF3_BOARD& board, std::ofstream& file ); bool MakeBoard( IDF3_BOARD& board, std::ofstream& file ); bool MakeComponents( IDF3_BOARD& board, std::ofstream& file, bool compact ); +bool MakeOtherOutlines( IDF3_BOARD& board, std::ofstream& file ); bool PopulateVRML( VRML_LAYER& model, const std::list< IDF_OUTLINE* >* items, bool bottom, double scale, double dX = 0.0, double dY = 0.0, double angle = 0.0 ); bool AddSegment( VRML_LAYER& model, IDF_SEGMENT* seg, int icont, int iseg ); @@ -124,12 +127,19 @@ VRML_IDS* GetColor( std::map& cmap, void PrintUsage( void ) { - cout << "-\nUsage: idf2vrml -f input_file.emn -s scale_factor -k\n"; - cout << "flags: -k: produce KiCad-firendly VRML output; default is compact VRML\n-\n"; + cout << "-\nUsage: idf2vrml -f input_file.emn -s scale_factor {-k} {-d} {-z} {-m}\n"; + cout << "flags:\n"; + cout << " -k: produce KiCad-friendly VRML output; default is compact VRML\n"; + cout << " -d: suppress substitution of default outlines\n"; + cout << " -z: suppress rendering of zero-height outlines\n"; + cout << " -m: print object mapping to stdout for debugging purposes\n"; cout << "example to produce a model for use by KiCad: idf2vrml -f input.emn -s 0.3937008 -k\n\n"; return; } +bool nozeroheights; +bool showObjectMapping; + int main( int argc, char **argv ) { // IDF implicitly requires the C locale @@ -148,9 +158,13 @@ int main( int argc, char **argv ) std::string inputFilename; double scaleFactor = 1.0; bool compact = true; + bool nooutlinesubs = false; int ichar; - while( ( ichar = getopt( argc, argv, ":f:s:k" ) ) != -1 ) + nozeroheights = false; + showObjectMapping = false; + + while( ( ichar = getopt( argc, argv, ":f:s:kdzm" ) ) != -1 ) { switch( ichar ) { @@ -184,6 +198,18 @@ int main( int argc, char **argv ) compact = false; break; + case 'd': + nooutlinesubs = true; + break; + + case 'z': + nozeroheights = true; + break; + + case 'm': + showObjectMapping = true; + break; + case ':': cerr << "* Missing parameter to option '-" << ((char) optopt) << "'\n"; PrintUsage(); @@ -215,10 +241,11 @@ int main( int argc, char **argv ) cout << "** Reading file: " << inputFilename << "\n"; - if( !pcb.ReadFile( FROM_UTF8( inputFilename.c_str() ) ) ) + if( !pcb.ReadFile( FROM_UTF8( inputFilename.c_str() ), nooutlinesubs ) ) { - CLEANUP; - cerr << "* Could not read file: " << inputFilename << "\n"; + cerr << "** Failed to read IDF data:\n"; + cerr << pcb.GetError() << "\n\n"; + return -1; } @@ -261,6 +288,9 @@ int main( int argc, char **argv ) // STEP 2: Render the components MakeComponents( pcb, ofile, compact ); + // STEP 3: Render the OTHER outlines + MakeOtherOutlines( pcb, ofile ); + ofile << "]\n}\n"; ofile.close(); @@ -328,7 +358,7 @@ bool MakeBoard( IDF3_BOARD& board, std::ofstream& file ) vpcb.EnsureWinding( 0, false ); - int nvcont = vpcb.GetNContours(); + int nvcont = vpcb.GetNContours() - 1; while( nvcont > 0 ) vpcb.EnsureWinding( nvcont--, true ); @@ -553,13 +583,10 @@ bool WriteTriangles( std::ofstream& file, VRML_IDS* vID, VRML_LAYER* layer, bool file << "coord Coordinate {\n"; file << "point [\n"; - // XXX: TODO: check return values of Write() routines; they may fail - // even though the stream is good (bad internal data) - // Coordinates (vertices) if( plane ) { - if( ! layer->WriteVertices( top_z, file, precision ) ) + if( !layer->WriteVertices( top_z, file, precision ) ) { cerr << "* errors writing planar vertices to " << vID->objectName << "\n"; cerr << "** " << layer->GetError() << "\n"; @@ -567,7 +594,7 @@ bool WriteTriangles( std::ofstream& file, VRML_IDS* vID, VRML_LAYER* layer, bool } else { - if( ! layer->Write3DVertices( top_z, bottom_z, file, precision ) ) + if( !layer->Write3DVertices( top_z, bottom_z, file, precision ) ) { cerr << "* errors writing 3D vertices to " << vID->objectName << "\n"; cerr << "** " << layer->GetError() << "\n"; @@ -717,6 +744,7 @@ bool MakeComponents( IDF3_BOARD& board, std::ofstream& file, bool compact ) std::map< std::string, VRML_IDS*> cmap; // map colors by outline UID VRML_IDS* vcp; + IDF3_COMP_OUTLINE* pout; while( sc != ec ) { @@ -732,12 +760,28 @@ bool MakeComponents( IDF3_BOARD& board, std::ofstream& file, bool compact ) while( so != eo ) { + if( (*so)->GetOutline()->GetThickness() < 0.00000001 && nozeroheights ) + { + vpcb.Clear(); + ++so; + continue; + } + (*so)->GetOffsets( tX, tY, tZ, tA ); tX += vX; tY += vY; tA += vA; - vcp = GetColor( cmap, cidx, ((IDF3_COMP_OUTLINE*)((*so)->GetOutline()))->GetUID() ); + if( ( pout = (IDF3_COMP_OUTLINE*)((*so)->GetOutline()) ) ) + { + vcp = GetColor( cmap, cidx, pout->GetUID() ); + } + else + { + vpcb.Clear(); + ++so; + continue; + } if( !compact ) { @@ -764,6 +808,12 @@ bool MakeComponents( IDF3_BOARD& board, std::ofstream& file, bool compact ) if( !compact || !vcp->used ) { vpcb.EnsureWinding( 0, false ); + + int nvcont = vpcb.GetNContours() - 1; + + while( nvcont > 0 ) + vpcb.EnsureWinding( nvcont--, true ); + vpcb.Tesselate( NULL ); } @@ -792,6 +842,10 @@ bool MakeComponents( IDF3_BOARD& board, std::ofstream& file, bool compact ) vcp = GetColor( cmap, cidx, ((IDF3_COMP_OUTLINE*)((*so)->GetOutline()))->GetUID() ); vcp->bottom = bottom; + // note: this can happen because IDF allows some negative heights/thicknesses + if( bot > top ) + std::swap( bot, top ); + WriteTriangles( file, vcp, &vpcb, false, false, top, bot, board.GetUserPrecision(), compact ); @@ -828,7 +882,8 @@ VRML_IDS* GetColor( std::map& cmap, int& index, const st ostr << "OBJECTn" << refnum++; id->objectName = ostr.str(); - cout << "* " << ostr.str() << " = '" << uid << "'\n"; + if( showObjectMapping ) + cout << "* " << ostr.str() << " = '" << uid << "'\n"; cmap.insert( std::pair(uid, id) ); @@ -840,3 +895,93 @@ VRML_IDS* GetColor( std::map& cmap, int& index, const st return cit->second; } + + +bool MakeOtherOutlines( IDF3_BOARD& board, std::ofstream& file ) +{ + int cidx = 2; // color index; start at 2 since 0,1 are special (board, NOGEOM_NOPART) + + VRML_LAYER vpcb; + + double scale = board.GetUserScale(); + double thick = board.GetBoardThickness() / 2.0; + + // set the arc parameters according to output scale + int tI; + double tMin, tMax; + vpcb.GetArcParams( tI, tMin, tMax ); + vpcb.SetArcParams( tI, tMin * scale, tMax * scale ); + + // Add the component outlines + const std::map< std::string, OTHER_OUTLINE* >*const comp = board.GetOtherOutlines(); + std::map< std::string, OTHER_OUTLINE* >::const_iterator sc = comp->begin(); + std::map< std::string, OTHER_OUTLINE* >::const_iterator ec = comp->end(); + + double top, bot; + bool bottom; + int nvcont; + + std::map< std::string, VRML_IDS*> cmap; // map colors by outline UID + VRML_IDS* vcp; + OTHER_OUTLINE* pout; + + while( sc != ec ) + { + pout = sc->second; + + if( pout->GetSide() == IDF3::LYR_BOTTOM ) + bottom = true; + else + bottom = false; + + if( pout->GetThickness() < 0.00000001 && nozeroheights ) + { + vpcb.Clear(); + ++sc; + continue; + } + + vcp = GetColor( cmap, cidx, pout->GetOutlineIdentifier() ); + + if( !PopulateVRML( vpcb, pout->GetOutlines(), bottom, + board.GetUserScale(), 0, 0, 0 ) ) + { + return false; + } + + vpcb.EnsureWinding( 0, false ); + + nvcont = vpcb.GetNContours() - 1; + + while( nvcont > 0 ) + vpcb.EnsureWinding( nvcont--, true ); + + vpcb.Tesselate( NULL ); + + if( bottom ) + { + top = -thick; + bot = ( top - pout->GetThickness() ) * scale; + top *= scale; + } + else + { + bot = thick; + top = (bot + pout->GetThickness() ) * scale; + bot *= scale; + } + + // note: this can happen because IDF allows some negative heights/thicknesses + if( bot > top ) + std::swap( bot, top ); + + vcp->bottom = bottom; + WriteTriangles( file, vcp, &vpcb, false, + false, top, bot, board.GetUserPrecision(), false ); + + vpcb.Clear(); + ++sc; + } + + return true; +} diff --git a/utils/idftools/idf_common.cpp b/utils/idftools/idf_common.cpp index 492ca928ce..948bf23c66 100644 --- a/utils/idftools/idf_common.cpp +++ b/utils/idftools/idf_common.cpp @@ -23,6 +23,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ + #include #include #include @@ -89,7 +90,7 @@ IDF_NOTE::IDF_NOTE() } -bool IDF_NOTE::ReadNote( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBoardState, +bool IDF_NOTE::readNote( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBoardState, IDF3::IDF_UNIT aBoardUnit ) { std::string iline; // the input line @@ -104,19 +105,16 @@ bool IDF_NOTE::ReadNote( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBoardStat if( ( !aBoardFile.good() && !aBoardFile.eof() ) || iline.empty() ) { - ERROR_IDF; - cerr << "problems reading board notes\n"; aBoardState = IDF3::FILE_INVALID; - return false; + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, "problems reading board notes" ) ); } if( isComment ) { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: comment within a section (NOTES)\n"; aBoardState = IDF3::FILE_INVALID; - return false; + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDFv3 file\n" + "* Violation of specification: comment within a section (NOTES)" ) ); } idx = 0; @@ -124,21 +122,14 @@ bool IDF_NOTE::ReadNote( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBoardStat if( quoted ) { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: X position in NOTES section must not be in quotes\n"; aBoardState = IDF3::FILE_INVALID; - return false; + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDFv3 file\n" + "* Violation of specification: X position in NOTES section must not be in quotes" ) ); } if( CompareToken( ".END_NOTES", token ) ) - { - // the end of the note section is a special case; although we return 'false' - // we do not change the board's state variable and we ensure that errno is 0; - // all other false returns set the state to FILE_INVALID - errno = 0; return false; - } istringstream istr; istr.str( token ); @@ -146,29 +137,26 @@ bool IDF_NOTE::ReadNote( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBoardStat istr >> xpos; if( istr.fail() ) { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: X position in NOTES section is not numeric\n"; aBoardState = IDF3::FILE_INVALID; - return false; + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDFv3 file\n" + "* Violation of specification: X position in NOTES section is not numeric" ) ); } if( !GetIDFString( iline, token, quoted, idx ) ) { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: Y position in NOTES section is missing\n"; aBoardState = IDF3::FILE_INVALID; - return false; + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDFv3 file\n" + "* Violation of specification: Y position in NOTES section is missing" ) ); } if( quoted ) { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: Y position in NOTES section must not be in quotes\n"; aBoardState = IDF3::FILE_INVALID; - return false; + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDFv3 file\n" + "* Violation of specification: Y position in NOTES section must not be in quotes" ) ); } istr.clear(); @@ -177,29 +165,26 @@ bool IDF_NOTE::ReadNote( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBoardStat istr >> ypos; if( istr.fail() ) { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: Y position in NOTES section is not numeric\n"; aBoardState = IDF3::FILE_INVALID; - return false; + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDFv3 file\n" + "* Violation of specification: Y position in NOTES section is not numeric" ) ); } if( !GetIDFString( iline, token, quoted, idx ) ) { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: text height in NOTES section is missing\n"; aBoardState = IDF3::FILE_INVALID; - return false; + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDFv3 file\n" + "* Violation of specification: text height in NOTES section is missing" ) ); } if( quoted ) { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: text height in NOTES section must not be in quotes\n"; aBoardState = IDF3::FILE_INVALID; - return false; + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDFv3 file\n" + "* Violation of specification: text height in NOTES section must not be in quotes" ) ); } istr.clear(); @@ -208,29 +193,26 @@ bool IDF_NOTE::ReadNote( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBoardStat istr >> height; if( istr.fail() ) { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: text height in NOTES section is not numeric\n"; aBoardState = IDF3::FILE_INVALID; - return false; + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDFv3 file\n" + "* Violation of specification: text height in NOTES section is not numeric" ) ); } if( !GetIDFString( iline, token, quoted, idx ) ) { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: text length in NOTES section is missing\n"; aBoardState = IDF3::FILE_INVALID; - return false; + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDFv3 file\n" + "* Violation of specification: text length in NOTES section is missing" ) ); } if( quoted ) { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: text length in NOTES section must not be in quotes\n"; aBoardState = IDF3::FILE_INVALID; - return false; + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDFv3 file\n" + "* Violation of specification: text length in NOTES section must not be in quotes" ) ); } istr.clear(); @@ -239,45 +221,43 @@ bool IDF_NOTE::ReadNote( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBoardStat istr >> length; if( istr.fail() ) { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: text length in NOTES section is not numeric\n"; aBoardState = IDF3::FILE_INVALID; - return false; + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDFv3 file\n" + "* Violation of specification: text length in NOTES section is not numeric" ) ); } if( !GetIDFString( iline, token, quoted, idx ) ) { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: text value in NOTES section is missing\n"; aBoardState = IDF3::FILE_INVALID; - return false; + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDFv3 file\n" + "* Violation of specification: text value in NOTES section is missing" ) ); } text = token; if( aBoardUnit == UNIT_THOU ) { - xpos *= IDF_MM_TO_THOU; - ypos *= IDF_MM_TO_THOU; - height *= IDF_MM_TO_THOU; - length *= IDF_MM_TO_THOU; + xpos *= IDF_THOU_TO_MM; + ypos *= IDF_THOU_TO_MM; + height *= IDF_THOU_TO_MM; + length *= IDF_THOU_TO_MM; } return true; } -bool IDF_NOTE::WriteNote( std::ofstream& aBoardFile, IDF3::IDF_UNIT aBoardUnit ) +bool IDF_NOTE::writeNote( std::ofstream& aBoardFile, IDF3::IDF_UNIT aBoardUnit ) { if( aBoardUnit == UNIT_THOU ) { aBoardFile << setiosflags(ios::fixed) << setprecision(1) - << (xpos / IDF_MM_TO_THOU) << " " - << (ypos / IDF_MM_TO_THOU) << " " - << (height / IDF_MM_TO_THOU) << " " - << (length / IDF_MM_TO_THOU) << " "; + << (xpos / IDF_THOU_TO_MM) << " " + << (ypos / IDF_THOU_TO_MM) << " " + << (height / IDF_THOU_TO_MM) << " " + << (length / IDF_THOU_TO_MM) << " "; } else { @@ -422,8 +402,8 @@ bool IDF_DRILL_DATA::Matches( double aDrillDia, double aPosX, double aPosY ) return false; } -bool IDF_DRILL_DATA::Read( std::ifstream& aBoardFile, IDF3::IDF_UNIT aBoardUnit, - IDF3::FILE_STATE aBoardState ) +bool IDF_DRILL_DATA::read( std::ifstream& aBoardFile, IDF3::IDF_UNIT aBoardUnit, + IDF3::FILE_STATE aBoardState, IDF3::IDF_VERSION aIdfVersion ) { std::string iline; // the input line bool isComment; // true if a line just read in is a comment line @@ -436,161 +416,151 @@ bool IDF_DRILL_DATA::Read( std::ifstream& aBoardFile, IDF3::IDF_UNIT aBoardUnit, while( !FetchIDFLine( aBoardFile, iline, isComment, pos ) && aBoardFile.good() ); if( ( !aBoardFile.good() && !aBoardFile.eof() ) || iline.empty() ) - { - ERROR_IDF; - cerr << "problems reading board drilled holes\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "problems reading board drilled holes" ) ); if( isComment ) - { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: comment within a section (DRILLED HOLES)\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF file\n" + "* Violation of specification: comment within a section (DRILLED HOLES)" ) ); idx = 0; GetIDFString( iline, token, quoted, idx ); if( quoted ) - { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: drill diameter must not be in quotes\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF file\n" + "* Violation of specification: drill diameter must not be in quotes" ) ); if( CompareToken( ".END_DRILLED_HOLES", token ) ) - { - // the end of the section is a special case; although we return 'false' - // we do not change the board's state variable and we ensure that errno is 0; - // all other false returns set the state to FILE_INVALID - errno = 0; return false; - } istringstream istr; istr.str( token ); istr >> dia; if( istr.fail() ) - { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: drill diameter is not numeric\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF file\n" + "* Violation of specification: drill diameter is not numeric" ) ); if( ( aBoardUnit == UNIT_MM && dia < IDF_MIN_DIA_MM ) - || ( aBoardUnit != UNIT_MM && dia < IDF_MIN_DIA_THOU ) ) + || ( aBoardUnit == UNIT_THOU && dia < IDF_MIN_DIA_THOU ) + || ( aBoardUnit == UNIT_TNM && dia < IDF_MIN_DIA_TNM ) ) { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Invalid drill diameter (too small): " << token << "\n"; - aBoardState = IDF3::FILE_INVALID; - return false; + ostringstream ostr; + ostr << "invalid IDF file\n"; + ostr << "* Invalid drill diameter (too small): '" << token << "'"; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( !GetIDFString( iline, token, quoted, idx ) ) - { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: missing X position for drilled hole\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF file\n" + "* Violation of specification: missing X position for drilled hole" ) ); if( quoted ) - { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: X position in DRILLED HOLES section must not be in quotes\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF file\n" + "* Violation of specification: X position in DRILLED HOLES section must not be in quotes" ) ); istr.clear(); istr.str( token ); istr >> x; if( istr.fail() ) - { - ERROR_IDF; - cerr << "* Violation of specification: X position in DRILLED HOLES section is not numeric\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF file\n" + "* Violation of specification: X position in DRILLED HOLES section is not numeric" ) ); if( !GetIDFString( iline, token, quoted, idx ) ) - { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: missing Y position for drilled hole\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF file\n" + "* Violation of specification: missing Y position for drilled hole" ) ); if( quoted ) - { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: Y position in DRILLED HOLES section must not be in quotes\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF file\n" + "* Violation of specification: Y position in DRILLED HOLES section must not be in quotes" ) ); istr.clear(); istr.str( token ); istr >> y; if( istr.fail() ) - { - ERROR_IDF; - cerr << "* Violation of specification: Y position in DRILLED HOLES section is not numeric\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF file\n" + "* Violation of specification: Y position in DRILLED HOLES section is not numeric" ) ); - if( !GetIDFString( iline, token, quoted, idx ) ) + if( aIdfVersion > IDF_V2 ) { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: missing PLATING for drilled hole\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + if( !GetIDFString( iline, token, quoted, idx ) ) + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDFv3 file\n" + "* Violation of specification: missing PLATING for drilled hole" ) ); - if( CompareToken( "PTH", token ) ) - { - plating = IDF3::PTH; - } - else if( CompareToken( "NPTH", token ) ) - { - plating = IDF3::NPTH; + if( CompareToken( "PTH", token ) ) + { + plating = IDF3::PTH; + } + else if( CompareToken( "NPTH", token ) ) + { + plating = IDF3::NPTH; + } + else + { + ostringstream ostr; + ostr << "invalid IDFv3 file\n"; + ostr << "* Violation of specification: invalid PLATING type ('" << token << "')"; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); + } } else { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: invalid PLATING type ('" << token << "')\n"; - aBoardState = IDF3::FILE_INVALID; - return false; + plating = IDF3::PTH; } if( !GetIDFString( iline, token, quoted, idx ) ) { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: missing REFDES for drilled hole\n"; - aBoardState = IDF3::FILE_INVALID; - return false; + if( aIdfVersion > IDF_V2 ) + { + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDFv3 file\n" + "* Violation of specification: missing REFDES for drilled hole" ) ); + } + else + { + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDFv2 file\n" + "* Violation of specification: missing HOLE TYPE for drilled hole" ) ); + } } + std::string tok1 = token; + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + if( aIdfVersion > IDF_V2 ) + { + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDFv3 file\n" + "* Violation of specification: missing HOLE TYPE for drilled hole" ) ); + } + else + { + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDFv2 file\n" + "* Violation of specification: missing REFDES for drilled hole" ) ); + } + } + + std::string tok2 = token; + + if( aIdfVersion > IDF_V2 ) + token = tok1; + if( CompareToken( "BOARD", token ) ) { kref = IDF3::BOARD; @@ -609,14 +579,10 @@ bool IDF_DRILL_DATA::Read( std::ifstream& aBoardFile, IDF3::IDF_UNIT aBoardUnit, refdes = token; } - if( !GetIDFString( iline, token, quoted, idx ) ) - { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: missing HOLE TYPE for drilled hole\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + if( aIdfVersion > IDF_V2 ) + token = tok2; + else + token = tok1; if( CompareToken( "PIN", token ) ) { @@ -640,35 +606,51 @@ bool IDF_DRILL_DATA::Read( std::ifstream& aBoardFile, IDF3::IDF_UNIT aBoardUnit, holetype = token; } - if( !GetIDFString( iline, token, quoted, idx ) ) + if( aIdfVersion > IDF_V2 ) { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: missing OWNER for drilled hole\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + if( !GetIDFString( iline, token, quoted, idx ) ) + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDFv3 file\n" + "* Violation of specification: missing OWNER for drilled hole" ) ); - if( !ParseOwner( token, owner ) ) + if( !ParseOwner( token, owner ) ) + { + ostringstream ostr; + ostr << "invalid IDFv3 file\n"; + ostr << "* Violation of specification: invalid OWNER for drilled hole ('" << token << "')"; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); + } + } + else { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: invalid OWNER for drilled hole ('" << token << "')\n"; - aBoardState = IDF3::FILE_INVALID; - return false; + owner = IDF3::UNOWNED; } if( aBoardUnit == UNIT_THOU ) { - dia *= IDF_MM_TO_THOU; - x *= IDF_MM_TO_THOU; - y *= IDF_MM_TO_THOU; + dia *= IDF_THOU_TO_MM; + x *= IDF_THOU_TO_MM; + y *= IDF_THOU_TO_MM; + } + else if( ( aIdfVersion == IDF_V2 ) && ( aBoardUnit == UNIT_TNM ) ) + { + dia *= IDF_TNM_TO_MM; + x *= IDF_TNM_TO_MM; + y *= IDF_TNM_TO_MM; + } + else if( aBoardUnit != UNIT_MM ) + { + ostringstream ostr; + ostr << "\n* BUG: invalid UNIT type: " << aBoardUnit; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } return true; } -bool IDF_DRILL_DATA::Write( std::ofstream& aBoardFile, IDF3::IDF_UNIT aBoardUnit ) +void IDF_DRILL_DATA::write( std::ofstream& aBoardFile, IDF3::IDF_UNIT aBoardUnit ) { std::string holestr; std::string refstr; @@ -746,13 +728,13 @@ bool IDF_DRILL_DATA::Write( std::ofstream& aBoardFile, IDF3::IDF_UNIT aBoardUnit } else { - aBoardFile << std::setiosflags( std::ios::fixed ) << std::setprecision( 1 ) << (dia / IDF_MM_TO_THOU) << " " - << std::setprecision( 1 ) << (x / IDF_MM_TO_THOU) << " " << (y / IDF_MM_TO_THOU) << " " + aBoardFile << std::setiosflags( std::ios::fixed ) << std::setprecision( 1 ) << (dia / IDF_THOU_TO_MM) << " " + << std::setprecision( 1 ) << (x / IDF_THOU_TO_MM) << " " << (y / IDF_THOU_TO_MM) << " " << pltstr.c_str() << " " << refstr.c_str() << " " << holestr.c_str() << " " << ownstr.c_str() << "\n"; } - return ! aBoardFile.fail(); + return; } // IDF_DRILL_DATA::Write( aBoardFile, unitMM ) diff --git a/utils/idftools/idf_common.h b/utils/idftools/idf_common.h index ffa9faf7f2..ac8a4db382 100644 --- a/utils/idftools/idf_common.h +++ b/utils/idftools/idf_common.h @@ -86,6 +86,16 @@ namespace IDF3 { FILE_ERROR // other errors while processing the file }; + /** + * ENUM IDF_VERSION + * represents the supported IDF versions (3.0 and 2.0 ONLY) + */ + enum IDF_VERSION + { + IDF_V2 = 0, // version 2 has read support only; files written as IDFv3 + IDF_V3 // version 3 has full read/write support + }; + /** * ENUM KEY_OWNER * represents the type of CAD which has ownership an object @@ -194,6 +204,7 @@ namespace IDF3 { { UNIT_MM = 0, //< Units in the file are in millimeters UNIT_THOU, //< Units in the file are in mils (aka thou) + UNIT_TNM, //< Deprecated Ten Nanometer Units from IDFv2 UNIT_INVALID }; @@ -261,6 +272,7 @@ namespace IDF3 { */ class IDF_NOTE { +friend class IDF3_BOARD; private: std::string text; // note text as per IDFv3 double xpos; // text X position as per IDFv3 @@ -268,11 +280,8 @@ private: double height; // text height as per IDFv3 double length; // text length as per IDFv3 -public: - IDF_NOTE(); - /** - * Function ReadNote + * Function readNote * reads a note entry from an IDFv3 file * * @param aBoardFile is an open BOARD file; the file position must be set to the start of a NOTE entry @@ -282,10 +291,10 @@ public: * @return bool: true if a note item was read, false otherwise. In case of unrecoverable errors * an exception is thrown */ - bool ReadNote( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBoardState, IDF3::IDF_UNIT aBoardUnit ); + bool readNote( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBoardState, IDF3::IDF_UNIT aBoardUnit ); /** - * Function WriteNote + * Function writeNote * writes a note entry to an IDFv3 file * * @param aBoardFile is an open BOARD file; the file position must be within a NOTE section @@ -294,7 +303,10 @@ public: * @return bool: true if the item was successfully written, false otherwise. In case of * unrecoverable errors an exception is thrown */ - bool WriteNote( std::ofstream& aBoardFile, IDF3::IDF_UNIT aBoardUnit ); + bool writeNote( std::ofstream& aBoardFile, IDF3::IDF_UNIT aBoardUnit ); + +public: + IDF_NOTE(); /** * Function SetText @@ -341,6 +353,8 @@ public: */ class IDF_DRILL_DATA { +friend class IDF3_BOARD; +friend class IDF3_COMPONENT; private: double dia; double x; @@ -352,11 +366,35 @@ private: std::string holetype; IDF3::KEY_OWNER owner; + /** + * Function read + * read a drill entry from an IDFv3 file + * + * @param aBoardFile is an open IDFv3 file; the file position must be within the DRILLED_HOLES section + * @param aBoardUnit is the board file's native unit (MM or THOU) + * @param aBoardState is the state value of the parser + * + * @return bool: true if data was successfully read, otherwise false. In case of an + * unrecoverable error an exception is thrown + */ + bool read( std::ifstream& aBoardFile, IDF3::IDF_UNIT aBoardUnit, IDF3::FILE_STATE aBoardState, + IDF3::IDF_VERSION aIdfVersion ); + + /** + * Function write + * writes a single line representing a hole within a .DRILLED_HOLES section + * In case of an unrecoverable error an exception is thrown. + * + * @param aBoardFile is an open BOARD file + * @param aBoardUnit is the native unit of the output file + */ + void write( std::ofstream& aBoardFile, IDF3::IDF_UNIT aBoardUnit ); + public: /** * Constructor IDF_DRILL_DATA * creates an empty drill entry which can be populated by the - * Read() function + * read() function */ IDF_DRILL_DATA(); @@ -391,38 +429,12 @@ public: */ bool Matches( double aDrillDia, double aPosX, double aPosY ); - /** - * Function Read - * read a drill entry from an IDFv3 file - * - * @param aBoardFile is an open IDFv3 file; the file position must be within the DRILLED_HOLES section - * @param aBoardUnit is the board file's native unit (MM or THOU) - * @param aBoardState is the state value of the parser - * - * @return bool: true if data was successfully read, otherwise false. In case of an - * unrecoverable error an exception is thrown - */ - bool Read( std::ifstream& aBoardFile, IDF3::IDF_UNIT aBoardUnit, IDF3::FILE_STATE aBoardState ); - - /** - * Function Write - * writes a single line representing a hole within a .DRILLED_HOLES section - * - * @param aBoardFile is an open BOARD file - * @param aBoardUnit is the native unit of the output file - * - * @return bool: true if the data was successfully written, otherwise false. In case of - * an unrecoverable error an exception is thrown - */ - bool Write( std::ofstream& aBoardFile, IDF3::IDF_UNIT aBoardUnit ); - /** * Function GettDrillDia * returns the drill diameter in mm */ double GetDrillDia(); - /** * Function GettDrillXPos * returns the drill's X position in mm @@ -455,6 +467,11 @@ public: * PIN, VIA, MTG, TOOL, or a user-specified string */ const std::string& GetDrillHoleType(); + + IDF3::KEY_OWNER GetDrillOwner( void ) + { + return owner; + } }; diff --git a/utils/idftools/idf_helpers.cpp b/utils/idftools/idf_helpers.cpp index a1c7141acb..cad1852732 100644 --- a/utils/idftools/idf_helpers.cpp +++ b/utils/idftools/idf_helpers.cpp @@ -229,8 +229,13 @@ bool IDF3::WriteLayersText( std::ofstream& aBoardFile, IDF3::IDF_LAYER aLayer ) break; default: - ERROR_IDF << "Invalid IDF layer" << aLayer << "\n"; - return false; + do{ + std::ostringstream ostr; + ostr << "invalid IDF layer: " << aLayer; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); + } while( 0 ); + break; } @@ -293,3 +298,26 @@ std::string IDF3::GetLayerString( IDF3::IDF_LAYER aLayer ) return ostr.str(); } + +std::string IDF3::GetOwnerString( IDF3::KEY_OWNER aOwner ) +{ + switch( aOwner ) + { + case IDF3::UNOWNED: + return "UNOWNED"; + + case IDF3::MCAD: + return "MCAD"; + + case IDF3::ECAD: + return "ECAD"; + + default: + break; + } + + ostringstream ostr; + ostr << "UNKNOWN: " << aOwner; + + return ostr.str(); +} diff --git a/utils/idftools/idf_helpers.h b/utils/idftools/idf_helpers.h index da392f0774..9b0c33fc6e 100644 --- a/utils/idftools/idf_helpers.h +++ b/utils/idftools/idf_helpers.h @@ -59,9 +59,12 @@ static inline wxString FROM_UTF8( const char* cstring ) // minimum drill diameters / slot widths to be represented in the IDF output #define IDF_MIN_DIA_MM ( 0.001 ) #define IDF_MIN_DIA_THOU ( 0.00039 ) +#define IDF_MIN_DIA_TNM ( 100 ) -// conversion between mm and thou -#define IDF_MM_TO_THOU 0.0254 +// conversion from thou to mm +#define IDF_THOU_TO_MM 0.0254 +// conversion from TNM to mm +#define IDF_TNM_TO_MM 0.00001 namespace IDF3 { @@ -166,6 +169,7 @@ std::string GetPlacementString( IDF3::IDF_PLACEMENT aPlacement ); */ std::string GetLayerString( IDF3::IDF_LAYER aLayer ); +std::string GetOwnerString( IDF3::KEY_OWNER aOwner ); } #endif // IDF_HELPERS_H diff --git a/utils/idftools/idf_outlines.cpp b/utils/idftools/idf_outlines.cpp index 67779a407b..9558d7dab2 100644 --- a/utils/idftools/idf_outlines.cpp +++ b/utils/idftools/idf_outlines.cpp @@ -34,6 +34,98 @@ using namespace IDF3; using namespace std; +static std::string GetOutlineTypeString( IDF3::OUTLINE_TYPE aOutlineType ) +{ + switch( aOutlineType ) + { + case OTLN_BOARD: + return ".BOARD_OUTLINE"; + + case OTLN_OTHER: + return ".OTHER_OUTLINE"; + + case OTLN_PLACE: + return ".PLACEMENT_OUTLINE"; + + case OTLN_ROUTE: + return ".ROUTE_OUTLINE"; + + case OTLN_PLACE_KEEPOUT: + return ".PLACE_KEEPOUT"; + + case OTLN_ROUTE_KEEPOUT: + return ".ROUTE_KEEPOUT"; + + case OTLN_VIA_KEEPOUT: + return ".VIA_KEEPOUT"; + + case OTLN_GROUP_PLACE: + return ".PLACE_REGION"; + + case OTLN_COMPONENT: + return "COMPONENT OUTLINE"; + + default: + break; + } + + std::ostringstream ostr; + ostr << "[INVALID OUTLINE TYPE VALUE]:" << aOutlineType; + + return ostr.str(); +} + +#ifndef DISABLE_IDF_OWNERSHIP +static bool CheckOwnership( int aSourceLine, const char* aSourceFunc, + IDF3_BOARD* aParent, IDF3::KEY_OWNER aOwnerCAD, + IDF3::OUTLINE_TYPE aOutlineType, std::string& aErrorString ) +{ + if( aParent == NULL ) + { + ostringstream ostr; + ostr << "* " << __FILE__ << ":" << aSourceLine << ":" << aSourceFunc << "():\n"; + ostr << "* BUG: outline's parent not set; cannot enforce ownership rules\n"; + ostr << "* outline type: " << GetOutlineTypeString( aOutlineType ); + aErrorString = ostr.str(); + + return false; + } + + // note: component outlines have no owner so we don't care about + // who modifies them + if( aOwnerCAD == UNOWNED || aOutlineType == IDF3::OTLN_COMPONENT ) + return true; + + IDF3::CAD_TYPE parentCAD = aParent->GetCadType(); + + if( aOwnerCAD == MCAD && parentCAD == CAD_MECH ) + return true; + + if( aOwnerCAD == ECAD && parentCAD == CAD_ELEC ) + return true; + + do + { + ostringstream ostr; + ostr << __FILE__ << ":" << aSourceLine << ":" << aSourceFunc << "():\n"; + ostr << "* ownership violation; CAD type is "; + + if( parentCAD == CAD_MECH ) + ostr << "MCAD "; + else + ostr << "ECAD "; + + ostr << "while outline owner is " << GetOwnerString( aOwnerCAD ) << "\n"; + ostr << "* outline type: " << GetOutlineTypeString( aOutlineType ); + aErrorString = ostr.str(); + + } while( 0 ); + + return false; +} +#endif + + /* * CLASS: BOARD OUTLINE */ @@ -50,7 +142,7 @@ BOARD_OUTLINE::BOARD_OUTLINE() BOARD_OUTLINE::~BOARD_OUTLINE() { - Clear(); + clear(); return; } @@ -59,7 +151,7 @@ IDF3::OUTLINE_TYPE BOARD_OUTLINE::GetOutlineType( void ) return outlineType; } -bool BOARD_OUTLINE::readOutlines( std::ifstream& aBoardFile ) +void BOARD_OUTLINE::readOutlines( std::ifstream& aBoardFile, IDF3::IDF_VERSION aIdfVersion ) { // reads the outline data from a file double x, y, ang; @@ -81,7 +173,7 @@ bool BOARD_OUTLINE::readOutlines( std::ifstream& aBoardFile ) std::streampos pos; // destroy any existing outline data - ClearOutlines(); + clearOutlines(); while( aBoardFile.good() ) { @@ -93,9 +185,13 @@ bool BOARD_OUTLINE::readOutlines( std::ifstream& aBoardFile ) if( quoted ) { - ERROR_IDF << "invalid outline; FIELD 1 is quoted\n"; - std::cerr << " LINE: " << iline << "\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: RECORD 3, FIELD 1 of " << GetOutlineTypeString( outlineType ); + ostr << " is quoted\n"; + ostr << "* line: '" << iline << "'"; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } // check for the end of the section @@ -110,8 +206,11 @@ bool BOARD_OUTLINE::readOutlines( std::ifstream& aBoardFile ) { if( npts > 0 && !closed ) { - ERROR_IDF << "invalid outline (not closed)\n"; - return false; + ostringstream ostr; + ostr << "invalid outline (not closed)\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } // verify winding @@ -120,24 +219,21 @@ bool BOARD_OUTLINE::readOutlines( std::ifstream& aBoardFile ) if( !outlines.front()->IsCCW() ) { ERROR_IDF << "invalid IDF3 file (BOARD_OUTLINE)\n"; - cerr << "* first outline is not in CCW order\n"; -//#warning TO BE IMPLEMENTED - // outlines.front()->EnsureWinding( false ); - return true; + cerr << "* WARNING: first outline is not in CCW order\n"; + return; } if( outlines.size() > 1 && outlines.back()->IsCCW() && !outlines.back()->IsCircle() ) { ERROR_IDF << "invalid IDF3 file (BOARD_OUTLINE)\n"; - cerr << "* cutout points are not in CW order\n"; -//#warning TO BE IMPLEMENTED - // outlines.front()->EnsureWinding( true ); - return true; + cerr << "* WARNING: final cutout does not have points in CW order\n"; + cerr << "* file position: " << pos << "\n"; + return; } } } - return true; + return; } tstr.clear(); @@ -149,23 +245,44 @@ bool BOARD_OUTLINE::readOutlines( std::ifstream& aBoardFile ) if( outlineType == OTLN_COMPONENT && CompareToken( "PROP", entry ) ) { aBoardFile.seekg( pos ); - return true; + return; } - ERROR_IDF << "invalid outline; FIELD 1 is not numeric\n"; - std::cerr << " LINE: " << iline << "\n"; - return false; + do{ + ostringstream ostr; + + ostr << "\n* invalid outline: RECORD 3, FIELD 1 of " << GetOutlineTypeString( outlineType ); + ostr << " is not numeric\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); + + } while( 0 ); } if( tmp != loopidx ) { // index change + if( npts > 0 && !closed ) + { + ostringstream ostr; + ostr << "invalid outline ( outline # " << loopidx << " not closed)\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); + } if( tmp < 0 ) { - ERROR_IDF << "invalid outline; FIELD 1 is invalid\n"; - std::cerr << " LINE: " << iline << "\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: RECORD 3, FIELD 1 of " << GetOutlineTypeString( outlineType ); + ostr << " is invalid\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( loopidx == -1 ) @@ -177,19 +294,27 @@ bool BOARD_OUTLINE::readOutlines( std::ifstream& aBoardFile ) if( tmp == 0 || tmp == 1 ) { op = new IDF_OUTLINE; + if( op == NULL ) { - ERROR_IDF << "memory allocation failed\n"; - return false; + clearOutlines(); + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "memory allocation failed" ) ); } + outlines.push_back( op ); loopidx = tmp; } else { - ERROR_IDF << "invalid outline; FIELD 1 is invalid (must be 0 or 1)\n"; - std::cerr << " LINE: " << iline << "\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: RECORD 3, FIELD 1 of " << GetOutlineTypeString( outlineType ); + ostr << " is invalid (must be 0 or 1)\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } } else @@ -197,17 +322,23 @@ bool BOARD_OUTLINE::readOutlines( std::ifstream& aBoardFile ) // outline *MUST* have a Loop Index of 0 if( tmp != 0 ) { - ERROR_IDF << "invalid outline; first outline of a BOARD or PANEL must have a Loop Index of 0\n"; - std::cerr << " LINE: " << iline << "\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: RECORD 3, FIELD 1 of " << GetOutlineTypeString( outlineType ); + ostr << " is invalid (must be 0)\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } op = new IDF_OUTLINE; if( op == NULL ) { - ERROR_IDF << "memory allocation failed\n"; - return false; + clearOutlines(); + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "memory allocation failed" ) ); } outlines.push_back( op ); @@ -220,33 +351,49 @@ bool BOARD_OUTLINE::readOutlines( std::ifstream& aBoardFile ) // outline for cutout if( single ) { - ERROR_IDF << "invalid outline; a simple outline type may only have one outline\n"; - std::cerr << " LINE: " << iline << "\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ); + ostr << " section may only have one outline\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( tmp - loopidx != 1 ) { - ERROR_IDF << "invalid outline; cutouts must be numbered in order from 1 onwards\n"; - std::cerr << " LINE: " << iline << "\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ); + ostr << " section must have cutouts in numeric order from 1 onwards\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } // verify winding of previous outline if( ( loopidx = 0 && !op->IsCCW() ) || ( loopidx > 0 && op->IsCCW() ) ) { - ERROR_IDF << "invalid outline (violation of loop point order rules by Loop Index " - << loopidx << ")\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation of loop point order rules by Loop Index " << loopidx << "\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } op = new IDF_OUTLINE; if( op == NULL ) { - ERROR_IDF << "memory allocation failed\n"; - return false; + clearOutlines(); + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "memory allocation failed" ) ); } outlines.push_back( op ); @@ -259,23 +406,38 @@ bool BOARD_OUTLINE::readOutlines( std::ifstream& aBoardFile ) if( op == NULL ) { - ERROR_IDF << "invalid outline; FIELD 1 is invalid\n"; - std::cerr << " LINE: " << iline << "\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: RECORD 3, FIELD 1 of " << GetOutlineTypeString( outlineType ); + ostr << " is invalid\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( !GetIDFString( iline, entry, quoted, idx ) ) { - ERROR_IDF << "invalid RECORD 3, FIELD 2 does not exist\n"; - std::cerr << " LINE: " << iline << "\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: RECORD 3, FIELD 2 of "; + ostr << GetOutlineTypeString( outlineType ) << " does not exist\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( quoted ) { - ERROR_IDF << "invalid RECORD 3, FIELD 2 is quoted\n"; - std::cerr << " LINE: " << iline << "\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: RECORD 3, FIELD 2 of "; + ostr << GetOutlineTypeString( outlineType ) << " must not be in quotes\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } tstr.clear(); @@ -284,23 +446,38 @@ bool BOARD_OUTLINE::readOutlines( std::ifstream& aBoardFile ) tstr >> x; if( tstr.fail() ) { - ERROR_IDF << "invalid RECORD 3, invalid X value in FIELD 2\n"; - std::cerr << " LINE: " << iline << "\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: RECORD 3, FIELD 2 of "; + ostr << GetOutlineTypeString( outlineType ) << " is an invalid X value\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( !GetIDFString( iline, entry, quoted, idx ) ) { - ERROR_IDF << "invalid RECORD 3, FIELD 3 does not exist\n"; - std::cerr << " LINE: " << iline << "\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: RECORD 3, FIELD 3 of "; + ostr << GetOutlineTypeString( outlineType ) << " does not exist\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( quoted ) { - ERROR_IDF << "invalid RECORD 3, FIELD 3 is quoted\n"; - std::cerr << " LINE: " << iline << "\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: RECORD 3, FIELD 3 of "; + ostr << GetOutlineTypeString( outlineType ) << " must not be in quotes\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } tstr.clear(); @@ -309,23 +486,38 @@ bool BOARD_OUTLINE::readOutlines( std::ifstream& aBoardFile ) tstr >> y; if( tstr.fail() ) { - ERROR_IDF << "invalid RECORD 3, invalid Y value in FIELD 3\n"; - std::cerr << " LINE: " << iline << "\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: RECORD 3, FIELD 3 of "; + ostr << GetOutlineTypeString( outlineType ) << " is an invalid Y value\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( !GetIDFString( iline, entry, quoted, idx ) ) { - ERROR_IDF << "invalid RECORD 3, FIELD 4 does not exist\n"; - std::cerr << " LINE: " << iline << "\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: RECORD 3, FIELD 4 of "; + ostr << GetOutlineTypeString( outlineType ) << " does not exist\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( quoted ) { - ERROR_IDF << "invalid RECORD 3, FIELD 4 is quoted\n"; - std::cerr << " LINE: " << iline << "\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: RECORD 3, FIELD 4 of "; + ostr << GetOutlineTypeString( outlineType ) << " must not be in quotes\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } tstr.clear(); @@ -334,16 +526,33 @@ bool BOARD_OUTLINE::readOutlines( std::ifstream& aBoardFile ) tstr >> ang; if( tstr.fail() ) { - ERROR_IDF << "invalid ANGLE value in FIELD 3\n"; - std::cerr << " LINE: " << iline << "\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: RECORD 3, FIELD 4 of "; + ostr << GetOutlineTypeString( outlineType ) << " is not a valid angle\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } // the line was successfully read; convert to mm if necessary if( unit == UNIT_THOU ) { - x *= IDF_MM_TO_THOU; - y *= IDF_MM_TO_THOU; + x *= IDF_THOU_TO_MM; + y *= IDF_THOU_TO_MM; + } + else if( ( aIdfVersion == IDF_V2 ) && ( unit == UNIT_TNM ) ) + { + x *= IDF_TNM_TO_MM; + y *= IDF_TNM_TO_MM; + } + else if( unit != UNIT_MM ) + { + ostringstream ostr; + ostr << "\n* BUG: invalid UNIT type: " << unit; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( npts++ == 0 ) @@ -355,9 +564,15 @@ bool BOARD_OUTLINE::readOutlines( std::ifstream& aBoardFile ) // ensure that the first point is not an arc specification if( ang < -MIN_ANG || ang > MIN_ANG ) { - ERROR_IDF << "invalid RECORD 3, first point has non-zero angle\n"; - std::cerr << " LINE: " << iline << "\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: RECORD 3 of "; + ostr << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: first point of an outline has a non-zero angle\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } } else @@ -365,9 +580,15 @@ bool BOARD_OUTLINE::readOutlines( std::ifstream& aBoardFile ) // Nth point if( closed ) { - ERROR_IDF << "invalid RECORD 3; adding a segment to a closed outline\n"; - std::cerr << " LINE: " << iline << "\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: RECORD 3 of "; + ostr << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: adding a segment to a closed outline\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } curPt.x = x; @@ -384,8 +605,9 @@ bool BOARD_OUTLINE::readOutlines( std::ifstream& aBoardFile ) if( sp == NULL ) { - ERROR_IDF << "memory allocation failure\n"; - return false; + clearOutlines(); + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "memory allocation failed" ) ); } if( sp->IsCircle() ) @@ -393,10 +615,17 @@ bool BOARD_OUTLINE::readOutlines( std::ifstream& aBoardFile ) // this is a circle; the loop is closed if( op->size() != 0 ) { - ERROR_IDF << "invalid RECORD 3; adding a circle to a non-empty outline\n"; - std::cerr << " LINE: " << iline << "\n"; delete sp; - return false; + + ostringstream ostr; + + ostr << "\n* invalid outline: RECORD 3 of "; + ostr << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: adding a circle to a non-empty outline\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } closed = true; @@ -414,10 +643,12 @@ bool BOARD_OUTLINE::readOutlines( std::ifstream& aBoardFile ) } // while( aBoardFile.good() ) // NOTE: - // 1. ideally we would ensure that there are no arcs with a radius of 0; this entails - // actively calculating the last point as the previous entry could have been an instruction + // 1. ideally we would ensure that there are no arcs with a radius of 0 - return false; + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "problems reading file (premature end of outline)" ) ); + + return; } bool BOARD_OUTLINE::writeComments( std::ofstream& aBoardFile ) @@ -457,28 +688,23 @@ bool BOARD_OUTLINE::writeOwner( std::ofstream& aBoardFile ) return !aBoardFile.fail(); } -bool BOARD_OUTLINE::writeOutline( std::ofstream& aBoardFile, IDF_OUTLINE* aOutline, size_t aIndex ) +void BOARD_OUTLINE::writeOutline( std::ofstream& aBoardFile, IDF_OUTLINE* aOutline, size_t aIndex ) { - // TODO: check the stream integrity - std::list::iterator bo; std::list::iterator eo; if( aOutline->size() == 1 ) { if( !aOutline->front()->IsCircle() ) - { - // this is a bad outline - ERROR_IDF << "bad outline (single segment item, not circle)\n"; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "bad outline (single segment item, not circle)" ) ); if( single ) aIndex = 0; // NOTE: a circle always has an angle of 360, never -360, // otherwise SolidWorks chokes on the file. - if( unit == UNIT_MM ) + if( unit != UNIT_THOU ) { aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(5) << aOutline->front()->startPoint.x << " " @@ -491,15 +717,15 @@ bool BOARD_OUTLINE::writeOutline( std::ofstream& aBoardFile, IDF_OUTLINE* aOutli else { aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(1) - << (aOutline->front()->startPoint.x / IDF_MM_TO_THOU) << " " - << (aOutline->front()->startPoint.y / IDF_MM_TO_THOU) << " 0\n"; + << (aOutline->front()->startPoint.x / IDF_THOU_TO_MM) << " " + << (aOutline->front()->startPoint.y / IDF_THOU_TO_MM) << " 0\n"; aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(1) - << (aOutline->front()->endPoint.x / IDF_MM_TO_THOU) << " " - << (aOutline->front()->endPoint.y / IDF_MM_TO_THOU) << " 360\n"; + << (aOutline->front()->endPoint.x / IDF_THOU_TO_MM) << " " + << (aOutline->front()->endPoint.y / IDF_THOU_TO_MM) << " 360\n"; } - return !aBoardFile.fail(); + return; } // ensure that the very last point is the same as the very first point @@ -524,7 +750,7 @@ bool BOARD_OUTLINE::writeOutline( std::ofstream& aBoardFile, IDF_OUTLINE* aOutli --bo; // for the first item we write out both points - if( unit == UNIT_MM ) + if( unit != UNIT_THOU ) { if( aOutline->front()->angle < MIN_ANG && aOutline->front()->angle > -MIN_ANG ) { @@ -553,22 +779,22 @@ bool BOARD_OUTLINE::writeOutline( std::ofstream& aBoardFile, IDF_OUTLINE* aOutli if( aOutline->front()->angle < MIN_ANG && aOutline->front()->angle > -MIN_ANG ) { aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(1) - << (aOutline->front()->endPoint.x / IDF_MM_TO_THOU) << " " - << (aOutline->front()->endPoint.y / IDF_MM_TO_THOU) << " 0\n"; + << (aOutline->front()->endPoint.x / IDF_THOU_TO_MM) << " " + << (aOutline->front()->endPoint.y / IDF_THOU_TO_MM) << " 0\n"; aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(1) - << (aOutline->front()->startPoint.x / IDF_MM_TO_THOU) << " " - << (aOutline->front()->startPoint.y / IDF_MM_TO_THOU) << " 0\n"; + << (aOutline->front()->startPoint.x / IDF_THOU_TO_MM) << " " + << (aOutline->front()->startPoint.y / IDF_THOU_TO_MM) << " 0\n"; } else { aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(1) - << (aOutline->front()->endPoint.x / IDF_MM_TO_THOU) << " " - << (aOutline->front()->endPoint.y / IDF_MM_TO_THOU) << " 0\n"; + << (aOutline->front()->endPoint.x / IDF_THOU_TO_MM) << " " + << (aOutline->front()->endPoint.y / IDF_THOU_TO_MM) << " 0\n"; aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(1) - << (aOutline->front()->startPoint.x / IDF_MM_TO_THOU) << " " - << (aOutline->front()->startPoint.y / IDF_MM_TO_THOU) << " " + << (aOutline->front()->startPoint.x / IDF_THOU_TO_MM) << " " + << (aOutline->front()->startPoint.y / IDF_THOU_TO_MM) << " " << setprecision(5) << -aOutline->front()->angle << "\n"; } } @@ -576,7 +802,7 @@ bool BOARD_OUTLINE::writeOutline( std::ofstream& aBoardFile, IDF_OUTLINE* aOutli // for all other segments we only write out the start point while( bo != eo ) { - if( unit == UNIT_MM ) + if( unit != UNIT_THOU ) { if( (*bo)->angle < MIN_ANG && (*bo)->angle > -MIN_ANG ) { @@ -597,14 +823,14 @@ bool BOARD_OUTLINE::writeOutline( std::ofstream& aBoardFile, IDF_OUTLINE* aOutli if( (*bo)->angle < MIN_ANG && (*bo)->angle > -MIN_ANG ) { aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(1) - << ((*bo)->startPoint.x / IDF_MM_TO_THOU) << " " - << ((*bo)->startPoint.y / IDF_MM_TO_THOU) << " 0\n"; + << ((*bo)->startPoint.x / IDF_THOU_TO_MM) << " " + << ((*bo)->startPoint.y / IDF_THOU_TO_MM) << " 0\n"; } else { aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(1) - << ((*bo)->startPoint.x / IDF_MM_TO_THOU) << " " - << ((*bo)->startPoint.y / IDF_MM_TO_THOU) << " " + << ((*bo)->startPoint.x / IDF_THOU_TO_MM) << " " + << ((*bo)->startPoint.y / IDF_THOU_TO_MM) << " " << setprecision(5) << -(*bo)->angle << "\n"; } } @@ -618,7 +844,7 @@ bool BOARD_OUTLINE::writeOutline( std::ofstream& aBoardFile, IDF_OUTLINE* aOutli eo = aOutline->end(); // for the first item we write out both points - if( unit == UNIT_MM ) + if( unit != UNIT_THOU ) { if( (*bo)->angle < MIN_ANG && (*bo)->angle > -MIN_ANG ) { @@ -647,22 +873,22 @@ bool BOARD_OUTLINE::writeOutline( std::ofstream& aBoardFile, IDF_OUTLINE* aOutli if( (*bo)->angle < MIN_ANG && (*bo)->angle > -MIN_ANG ) { aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(1) - << ((*bo)->startPoint.x / IDF_MM_TO_THOU) << " " - << ((*bo)->startPoint.y / IDF_MM_TO_THOU) << " 0\n"; + << ((*bo)->startPoint.x / IDF_THOU_TO_MM) << " " + << ((*bo)->startPoint.y / IDF_THOU_TO_MM) << " 0\n"; aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(1) - << ((*bo)->endPoint.x / IDF_MM_TO_THOU) << " " - << ((*bo)->endPoint.y / IDF_MM_TO_THOU) << " 0\n"; + << ((*bo)->endPoint.x / IDF_THOU_TO_MM) << " " + << ((*bo)->endPoint.y / IDF_THOU_TO_MM) << " 0\n"; } else { aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(1) - << ((*bo)->startPoint.x / IDF_MM_TO_THOU) << " " - << ((*bo)->startPoint.y / IDF_MM_TO_THOU) << " 0\n"; + << ((*bo)->startPoint.x / IDF_THOU_TO_MM) << " " + << ((*bo)->startPoint.y / IDF_THOU_TO_MM) << " 0\n"; aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(1) - << ((*bo)->endPoint.x / IDF_MM_TO_THOU) << " " - << ((*bo)->endPoint.y / IDF_MM_TO_THOU) << " " + << ((*bo)->endPoint.x / IDF_THOU_TO_MM) << " " + << ((*bo)->endPoint.y / IDF_THOU_TO_MM) << " " << setprecision(5) << (*bo)->angle << "\n"; } } @@ -672,7 +898,7 @@ bool BOARD_OUTLINE::writeOutline( std::ofstream& aBoardFile, IDF_OUTLINE* aOutli // for all other segments we only write out the last point while( bo != eo ) { - if( unit == UNIT_MM ) + if( unit != UNIT_THOU ) { if( (*bo)->angle < MIN_ANG && (*bo)->angle > -MIN_ANG ) { @@ -693,14 +919,14 @@ bool BOARD_OUTLINE::writeOutline( std::ofstream& aBoardFile, IDF_OUTLINE* aOutli if( (*bo)->angle < MIN_ANG && (*bo)->angle > -MIN_ANG ) { aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(1) - << ((*bo)->endPoint.x / IDF_MM_TO_THOU) << " " - << ((*bo)->endPoint.y / IDF_MM_TO_THOU) << " 0\n"; + << ((*bo)->endPoint.x / IDF_THOU_TO_MM) << " " + << ((*bo)->endPoint.y / IDF_THOU_TO_MM) << " 0\n"; } else { aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(1) - << ((*bo)->endPoint.x / IDF_MM_TO_THOU) << " " - << ((*bo)->endPoint.y / IDF_MM_TO_THOU) << " " + << ((*bo)->endPoint.x / IDF_THOU_TO_MM) << " " + << ((*bo)->endPoint.y / IDF_THOU_TO_MM) << " " << setprecision(5) << (*bo)->angle << "\n"; } } @@ -709,13 +935,13 @@ bool BOARD_OUTLINE::writeOutline( std::ofstream& aBoardFile, IDF_OUTLINE* aOutli } } - return !aBoardFile.fail(); + return; } -bool BOARD_OUTLINE::writeOutlines( std::ofstream& aBoardFile ) +void BOARD_OUTLINE::writeOutlines( std::ofstream& aBoardFile ) { if( outlines.empty() ) - return true; + return; int idx = 0; std::list< IDF_OUTLINE* >::iterator itS = outlines.begin(); @@ -723,19 +949,30 @@ bool BOARD_OUTLINE::writeOutlines( std::ofstream& aBoardFile ) while( itS != itE ) { - if( !writeOutline( aBoardFile, *itS, idx++ ) ) - return false; - + writeOutline( aBoardFile, *itS, idx++ ); ++itS; } - return true; + return; } -void BOARD_OUTLINE::SetUnit( IDF3::IDF_UNIT aUnit ) +bool BOARD_OUTLINE::SetUnit( IDF3::IDF_UNIT aUnit ) { + // note: although UNIT_TNM is accepted here without reservation, + // this can only affect data being read from a file. + if( aUnit != UNIT_MM && aUnit != UNIT_THOU && aUnit != UNIT_TNM ) + { + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "():\n"; + ostr << "* BUG: invalid IDF UNIT (must be one of UNIT_MM or UNIT_THOU): " << aUnit << "\n"; + ostr << "* outline type: " << GetOutlineTypeString( outlineType ); + errormsg = ostr.str(); + + return false; + } + unit = aUnit; - return; + return true; } IDF3::IDF_UNIT BOARD_OUTLINE::GetUnit( void ) @@ -743,21 +980,40 @@ IDF3::IDF_UNIT BOARD_OUTLINE::GetUnit( void ) return unit; } -bool BOARD_OUTLINE::SetThickness( double aThickness ) +bool BOARD_OUTLINE::setThickness( double aThickness ) { if( aThickness < 0.0 ) + { + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "():\n"; + ostr << "* BUG: aThickness < 0.0\n"; + ostr << "* outline type: " << GetOutlineTypeString( outlineType ); + errormsg = ostr.str(); + return false; + } thickness = aThickness; return true; } +bool BOARD_OUTLINE::SetThickness( double aThickness ) +{ +#ifndef DISABLE_IDF_OWNERSHIP + if( !CheckOwnership( __LINE__, __FUNCTION__, parent, owner, outlineType, errormsg ) ) + return false; +#endif + + return setThickness( aThickness ); +} + double BOARD_OUTLINE::GetThickness( void ) { return thickness; } -bool BOARD_OUTLINE::ReadData( std::ifstream& aBoardFile, const std::string& aHeader ) +void BOARD_OUTLINE::readData( std::ifstream& aBoardFile, const std::string& aHeader, + IDF3::IDF_VERSION aIdfVersion ) { // BOARD_OUTLINE (PANEL_OUTLINE) // .BOARD_OUTLINE [OWNER] @@ -768,30 +1024,42 @@ bool BOARD_OUTLINE::ReadData( std::ifstream& aBoardFile, const std::string& aHea std::string token; bool quoted = false; int idx = 0; + std::streampos pos; + + pos = aBoardFile.tellg(); if( !GetIDFString( aHeader, token, quoted, idx ) ) - { - ERROR_IDF << "invalid invocation; blank header line\n"; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, "invalid invocation: blank header line" ) ); if( quoted ) { - ERROR_IDF << "section names may not be quoted:\n"; - std::cerr << "\tLINE: " << aHeader << "\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: section names may not be in quotes\n"; + ostr << "* line: '" << aHeader << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( !CompareToken( ".BOARD_OUTLINE", token ) ) { - ERROR_IDF << "not a board outline:\n"; - std::cerr << "\tLINE: " << aHeader << "\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: not a board outline\n"; + ostr << "* line: '" << aHeader << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( !GetIDFString( aHeader, token, quoted, idx ) ) { - ERROR_IDF << "no OWNER; setting to UNOWNED\n"; + if( aIdfVersion > IDF_V2 ) + ERROR_IDF << "no OWNER; setting to UNOWNED\n"; + owner = UNOWNED; } else @@ -806,27 +1074,41 @@ bool BOARD_OUTLINE::ReadData( std::ifstream& aBoardFile, const std::string& aHea // check RECORD 2 std::string iline; bool comment = false; - std::streampos pos; - while( aBoardFile.good() && !FetchIDFLine( aBoardFile, iline, comment, pos ) ); if( ( !aBoardFile.good() && !aBoardFile.eof() ) || iline.empty() ) { - ERROR_IDF << "bad .BOARD_OUTLINE section (premature end)\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: premature end\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } idx = 0; if( comment ) { - ERROR_IDF << "comment within .BOARD_OUTLINE section\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: comment within .BOARD_OUTLINE section\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( !GetIDFString( iline, token, quoted, idx ) ) { - ERROR_IDF << "bad .BOARD_OUTLINE section (no thickness)\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: no thickness specified\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } std::stringstream teststr; @@ -835,44 +1117,96 @@ bool BOARD_OUTLINE::ReadData( std::ifstream& aBoardFile, const std::string& aHea teststr >> thickness; if( teststr.fail() ) { - ERROR_IDF << "bad .BOARD_OUTLINE section (invalid RECORD 2)\n"; - std::cerr << "\tLINE: " << iline << "\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: invalid RECORD 2 (thickness)\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( unit == UNIT_THOU ) - thickness *= IDF_MM_TO_THOU; + { + thickness *= IDF_THOU_TO_MM; + } + else if( ( aIdfVersion == IDF_V2 ) && ( unit == UNIT_TNM ) ) + { + thickness *= IDF_TNM_TO_MM; + } + else if( unit != UNIT_MM ) + { + ostringstream ostr; + ostr << "\n* BUG: invalid UNIT type: " << unit; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); + } + + // for some unknown reason IDF allows 0 or negative thickness, but this + // is a problem so we fix it here + if( thickness <= 0.0 ) + { + if( thickness == 0.0 ) + { + ERROR_IDF << "\n* WARNING: setting board thickness to default 1.6mm ("; + cerr << thickness << ")\n"; + thickness = 1.6; + } + else + { + thickness = -thickness; + ERROR_IDF << "\n* WARNING: setting board thickness to positive number ("; + cerr << thickness << ")\n"; + } + } // read RECORD 3 values - // XXX - check the return value - we may have empty lines and what-not - readOutlines( aBoardFile ); + readOutlines( aBoardFile, aIdfVersion ); // check RECORD 4 while( aBoardFile.good() && !FetchIDFLine( aBoardFile, iline, comment, pos ) ); if( ( !aBoardFile.good() && aBoardFile.eof() ) || iline.empty() ) { - ERROR_IDF << "bad .BOARD_OUTLINE section (premature end)\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: premature end\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } idx = 0; if( comment ) { - ERROR_IDF << "comment within .BOARD_OUTLINE section\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: comment within section\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( !CompareToken( ".END_BOARD_OUTLINE", iline ) ) { - ERROR_IDF << "bad .BOARD_OUTLINE section (no .END_BOARD_OUTLINE)\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: no .END_BOARD_OUTLINE found\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } - return true; + return; } -bool BOARD_OUTLINE::WriteData( std::ofstream& aBoardFile ) + +void BOARD_OUTLINE::writeData( std::ofstream& aBoardFile ) { writeComments( aBoardFile ); @@ -881,29 +1215,40 @@ bool BOARD_OUTLINE::WriteData( std::ofstream& aBoardFile ) writeOwner( aBoardFile ); - if( unit == UNIT_MM ) + if( unit != UNIT_THOU ) aBoardFile << setiosflags(ios::fixed) << setprecision(5) << thickness << "\n"; else - aBoardFile << setiosflags(ios::fixed) << setprecision(1) << (thickness / IDF_MM_TO_THOU) << "\n"; + aBoardFile << setiosflags(ios::fixed) << setprecision(1) << (thickness / IDF_THOU_TO_MM) << "\n"; - if( !writeOutlines( aBoardFile ) ) - return false; + writeOutlines( aBoardFile ); aBoardFile << ".END_BOARD_OUTLINE\n\n"; - return !aBoardFile.fail(); + return; } -void BOARD_OUTLINE::Clear( void ) +void BOARD_OUTLINE::clear( void ) { comments.clear(); - ClearOutlines(); + clearOutlines(); owner = UNOWNED; return; } -void BOARD_OUTLINE::SetParent( IDF3_BOARD* aParent ) +bool BOARD_OUTLINE::Clear( void ) +{ +#ifndef DISABLE_IDF_OWNERSHIP + if( !CheckOwnership( __LINE__, __FUNCTION__, parent, owner, outlineType, errormsg ) ) + return false; +#endif + + clear(); + + return true; +} + +void BOARD_OUTLINE::setParent( IDF3_BOARD* aParent ) { parent = aParent; } @@ -913,30 +1258,66 @@ IDF3_BOARD* BOARD_OUTLINE::GetParent( void ) return parent; } -bool BOARD_OUTLINE::AddOutline( IDF_OUTLINE* aOutline ) +bool BOARD_OUTLINE::addOutline( IDF_OUTLINE* aOutline ) { std::list< IDF_OUTLINE* >::iterator itS = outlines.begin(); std::list< IDF_OUTLINE* >::iterator itE = outlines.end(); - while( itS != itE ) + try { - if( *itS == aOutline ) - return false; + while( itS != itE ) + { + if( *itS == aOutline ) + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "duplicate outline pointer" ) ); - ++itS; + ++itS; + } + + outlines.push_back( aOutline ); + + } + catch( std::exception& e ) + { + errormsg = e.what(); + + return false; } - outlines.push_back( aOutline ); return true; } +bool BOARD_OUTLINE::AddOutline( IDF_OUTLINE* aOutline ) +{ +#ifndef DISABLE_IDF_OWNERSHIP + if( !CheckOwnership( __LINE__, __FUNCTION__, parent, owner, outlineType, errormsg ) ) + return false; +#endif + + return addOutline( aOutline ); +} + bool BOARD_OUTLINE::DelOutline( IDF_OUTLINE* aOutline ) { std::list< IDF_OUTLINE* >::iterator itS = outlines.begin(); std::list< IDF_OUTLINE* >::iterator itE = outlines.end(); - if( outlines.empty() ) + if( !aOutline ) + { + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "():\n"; + ostr << "* BUG: NULL aOutline pointer\n"; + ostr << "* outline type: " << GetOutlineTypeString( outlineType ); + errormsg = ostr.str(); + return false; + } + + if( outlines.empty() ) + { + errormsg.clear(); + return false; + } // if there are more than 1 outlines it makes no sense to delete // the first outline (board outline) since that would have the @@ -944,7 +1325,15 @@ bool BOARD_OUTLINE::DelOutline( IDF_OUTLINE* aOutline ) if( aOutline == outlines.front() ) { if( outlines.size() > 1 ) + { + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "():\n"; + ostr << "* BUG: attempting to delete first outline in list\n"; + ostr << "* outline type: " << GetOutlineTypeString( outlineType ); + errormsg = ostr.str(); + return false; + } outlines.clear(); return true; @@ -961,19 +1350,32 @@ bool BOARD_OUTLINE::DelOutline( IDF_OUTLINE* aOutline ) ++itS; } + errormsg.clear(); return false; } + bool BOARD_OUTLINE::DelOutline( size_t aIndex ) { std::list< IDF_OUTLINE* >::iterator itS = outlines.begin(); std::list< IDF_OUTLINE* >::iterator itE = outlines.end(); if( outlines.empty() ) + { + errormsg.clear(); return false; + } if( aIndex >= outlines.size() ) + { + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "():\n"; + ostr << "* BUG: index out of bounds (" << aIndex << " / " << outlines.size() << ")\n"; + ostr << "* outline type: " << GetOutlineTypeString( outlineType ); + errormsg = ostr.str(); + return false; + } if( aIndex == 0 ) { @@ -981,7 +1383,15 @@ bool BOARD_OUTLINE::DelOutline( size_t aIndex ) // the first outline (board outline) since that would have the // undesirable effect of substituting a cutout outline as the board outline if( outlines.size() > 1 ) + { + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "():\n"; + ostr << "* BUG: attempting to delete first outline in list\n"; + ostr << "* outline type: " << GetOutlineTypeString( outlineType ); + errormsg = ostr.str(); + return false; + } delete *itS; outlines.clear(); @@ -1011,7 +1421,14 @@ size_t BOARD_OUTLINE::OutlinesSize( void ) IDF_OUTLINE* BOARD_OUTLINE::GetOutline( size_t aIndex ) { if( aIndex >= outlines.size() ) + { + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "():\n"; + ostr << "* aIndex (" << aIndex << ") is out of range (" << outlines.size() << ")"; + errormsg = ostr.str(); + return NULL; + } std::list< IDF_OUTLINE* >::iterator itS = outlines.begin(); @@ -1028,36 +1445,13 @@ IDF3::KEY_OWNER BOARD_OUTLINE::GetOwner( void ) bool BOARD_OUTLINE::SetOwner( IDF3::KEY_OWNER aOwner ) { - // if this is a COMPONENT OUTLINE there can be no owner - if( outlineType == IDF3::OTLN_COMPONENT ) - return true; - - // if no one owns the outline, any system may - // set the owner - if( owner == UNOWNED ) - { - owner = aOwner; - return true; - } - - // if the outline is owned, only the owning - // CAD system can make alterations - if( parent == NULL ) +#ifndef DISABLE_IDF_OWNERSHIP + if( !CheckOwnership( __LINE__, __FUNCTION__, parent, owner, outlineType, errormsg ) ) return false; +#endif - if( owner == MCAD && parent->GetCadType() == CAD_MECH ) - { - owner = aOwner; - return true; - } - - if( owner == ECAD && parent->GetCadType() == CAD_ELEC ) - { - owner = aOwner; - return true; - } - - return false; + owner = aOwner; + return true; } bool BOARD_OUTLINE::IsSingle( void ) @@ -1065,7 +1459,7 @@ bool BOARD_OUTLINE::IsSingle( void ) return single; } -void BOARD_OUTLINE::ClearOutlines( void ) +void BOARD_OUTLINE::clearOutlines( void ) { std::list< IDF_OUTLINE* >::iterator itS = outlines.begin(); std::list< IDF_OUTLINE* >::iterator itE = outlines.end(); @@ -1136,19 +1530,26 @@ void BOARD_OUTLINE::ClearComments( void ) /* * CLASS: OTHER_OUTLINE */ -OTHER_OUTLINE::OTHER_OUTLINE() +OTHER_OUTLINE::OTHER_OUTLINE( IDF3_BOARD* aParent ) { + setParent( aParent ); outlineType = OTLN_OTHER; side = LYR_INVALID; - single = true; + single = false; return; } -void OTHER_OUTLINE::SetOutlineIdentifier( const std::string aUniqueID ) +bool OTHER_OUTLINE::SetOutlineIdentifier( const std::string aUniqueID ) { +#ifndef DISABLE_IDF_OWNERSHIP + if( !CheckOwnership( __LINE__, __FUNCTION__, parent, owner, outlineType, errormsg ) ) + return false; +#endif + uniqueID = aUniqueID; - return; + + return true; } const std::string& OTHER_OUTLINE::GetOutlineIdentifier( void ) @@ -1158,6 +1559,11 @@ const std::string& OTHER_OUTLINE::GetOutlineIdentifier( void ) bool OTHER_OUTLINE::SetSide( IDF3::IDF_LAYER aSide ) { +#ifndef DISABLE_IDF_OWNERSHIP + if( !CheckOwnership( __LINE__, __FUNCTION__, parent, owner, outlineType, errormsg ) ) + return false; +#endif + switch( aSide ) { case LYR_TOP: @@ -1166,9 +1572,17 @@ bool OTHER_OUTLINE::SetSide( IDF3::IDF_LAYER aSide ) break; default: - ERROR_IDF << "invalid side (" << aSide << "); must be one of TOP/BOTTOM\n"; + do{ + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "():\n"; + ostr << "* BUG: invalid side (" << aSide << "); must be one of TOP/BOTTOM\n"; + ostr << "* outline type: " << GetOutlineTypeString( outlineType ); + errormsg = ostr.str(); + } while( 0 ); + side = LYR_INVALID; return false; + break; } @@ -1180,7 +1594,8 @@ IDF3::IDF_LAYER OTHER_OUTLINE::GetSide( void ) return side; } -bool OTHER_OUTLINE::ReadData( std::ifstream& aBoardFile, const std::string& aHeader ) +void OTHER_OUTLINE::readData( std::ifstream& aBoardFile, const std::string& aHeader, + IDF3::IDF_VERSION aIdfVersion ) { // OTHER_OUTLINE/VIA_KEEPOUT // .OTHER_OUTLINE [OWNER] @@ -1191,42 +1606,58 @@ bool OTHER_OUTLINE::ReadData( std::ifstream& aBoardFile, const std::string& aHea std::string token; bool quoted = false; int idx = 0; + std::streampos pos = aBoardFile.tellg(); if( !GetIDFString( aHeader, token, quoted, idx ) ) { - ERROR_IDF << "invalid invocation; blank header line\n"; - return false; + ostringstream ostr; + ostr << "\n* BUG: invalid invocation: blank header line\n"; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( quoted ) { - ERROR_IDF << "section names may not be quoted:\n"; - std::cerr << "\tLINE: " << aHeader << "\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: section names must not be in quotes\n"; + ostr << "* line: '" << aHeader << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( outlineType == OTLN_OTHER ) { if( !CompareToken( ".OTHER_OUTLINE", token ) ) { - ERROR_IDF << "not an OTHER outline:\n"; - std::cerr << "\tLINE: " << aHeader << "\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* BUG: not an .OTHER outline\n"; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } } else { if( !CompareToken( ".VIA_KEEPOUT", token ) ) { - ERROR_IDF << "not a VIA_KEEPOUT outline:\n"; - std::cerr << "\tLINE: " << aHeader << "\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* BUG: not a .VIA_KEEPOUT outline\n"; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } } if( !GetIDFString( aHeader, token, quoted, idx ) ) { - ERROR_IDF << "no OWNER; setting to UNOWNED\n"; + if( aIdfVersion > IDF_V2 ) + ERROR_IDF << "no OWNER; setting to UNOWNED\n"; + owner = UNOWNED; } else @@ -1240,7 +1671,6 @@ bool OTHER_OUTLINE::ReadData( std::ifstream& aBoardFile, const std::string& aHea std::string iline; bool comment = false; - std::streampos pos; if( outlineType == OTLN_OTHER ) { @@ -1250,29 +1680,52 @@ bool OTHER_OUTLINE::ReadData( std::ifstream& aBoardFile, const std::string& aHea if( ( !aBoardFile.good() && aBoardFile.eof() ) || iline.empty() ) { - ERROR_IDF << "bad .OTHER_OUTLINE section (premature end)\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: premature end\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } idx = 0; if( comment ) { - ERROR_IDF << "comment within .OTHER_OUTLINE section\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: comment within .OTHER_OUTLINE section\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( !GetIDFString( iline, token, quoted, idx ) ) { - ERROR_IDF << "bad .OTHER_OUTLINE section (no outline identifier)\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: no outline identifier\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } uniqueID = token; if( !GetIDFString( iline, token, quoted, idx ) ) { - ERROR_IDF << "bad .OTHER_OUTLINE section (no thickness)\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: no thickness\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } std::stringstream teststr; @@ -1281,72 +1734,130 @@ bool OTHER_OUTLINE::ReadData( std::ifstream& aBoardFile, const std::string& aHea teststr >> thickness; if( teststr.fail() ) { - ERROR_IDF << "bad .OTHER_OUTLINE section (invalid RECORD 2 reading thickness)\n"; - std::cerr << "\tLINE: " << iline << "\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: invalid thickness\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( unit == UNIT_THOU ) - thickness *= IDF_MM_TO_THOU; - - if( !GetIDFString( iline, token, quoted, idx ) ) { - ERROR_IDF << "bad .OTHER_OUTLINE section (no board side)\n"; - return false; + thickness *= IDF_THOU_TO_MM; + } + else if( ( aIdfVersion == IDF_V2 ) && ( unit == UNIT_TNM ) ) + { + thickness *= IDF_TNM_TO_MM; + } + else if( unit != UNIT_MM ) + { + ostringstream ostr; + ostr << "\n* BUG: invalid UNIT type: " << unit; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } - if( !ParseIDFLayer( token, side ) || ( side != LYR_TOP && side != LYR_BOTTOM ) ) + if( aIdfVersion == IDF_V2 ) { - ERROR_IDF << "bad .OTHER_OUTLINE section (invalid side, must be TOP/BOTTOM only)\n"; - std::cerr << "\tLINE: " << iline << "\n"; - return false; + side = LYR_TOP; } + else + { + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: no board side\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); + } + + if( !ParseIDFLayer( token, side ) || ( side != LYR_TOP && side != LYR_BOTTOM ) ) + { + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: invalid side (must be TOP or BOTTOM only)\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); + } + } + } // read RECORD 3 values - readOutlines( aBoardFile ); + readOutlines( aBoardFile, aIdfVersion ); // check RECORD 4 while( aBoardFile.good() && !FetchIDFLine( aBoardFile, iline, comment, pos ) ); if( ( !aBoardFile.good() && aBoardFile.eof() ) || iline.empty() ) { - ERROR_IDF << "bad .OTHER_OUTLINE/.VIA_KEEPOUT section (premature end)\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: premature end\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } idx = 0; if( comment ) { - ERROR_IDF << "comment within .OTHER_OUTLINE/.VIA_KEEPOUT section\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: comment within section\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( outlineType == OTLN_OTHER ) { if( !CompareToken( ".END_OTHER_OUTLINE", iline ) ) { - ERROR_IDF << "bad .OTHER_OUTLINE section (no .END_OTHER_OUTLINE)\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: no .END_OTHER_OUTLINE found\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } } else { if( !CompareToken( ".END_VIA_KEEPOUT", iline ) ) { - ERROR_IDF << "bad .VIA_KEEPOUT section (no .END_VIA_KEEPOUT)\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: no .END_VIA_KEEPOUT found\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } } - return true; + return; } -bool OTHER_OUTLINE::WriteData( std::ofstream& aBoardFile ) +void OTHER_OUTLINE::writeData( std::ofstream& aBoardFile ) { // this section is optional; do not write if not required if( outlines.empty() ) - return true; + return; writeComments( aBoardFile ); @@ -1363,10 +1874,10 @@ bool OTHER_OUTLINE::WriteData( std::ofstream& aBoardFile ) { aBoardFile << "\"" << uniqueID << "\" "; - if( unit == UNIT_MM ) + if( unit != UNIT_THOU ) aBoardFile << setiosflags(ios::fixed) << setprecision(5) << thickness << " "; else - aBoardFile << setiosflags(ios::fixed) << setprecision(1) << (thickness / IDF_MM_TO_THOU) << " "; + aBoardFile << setiosflags(ios::fixed) << setprecision(1) << (thickness / IDF_THOU_TO_MM) << " "; switch( side ) { @@ -1376,15 +1887,19 @@ bool OTHER_OUTLINE::WriteData( std::ofstream& aBoardFile ) break; default: - ERROR_IDF << "Invalid OTHER_OUTLINE side (neither top nor bottom): " << side << "\n"; - return false; + do{ + ostringstream ostr; + ostr << "\n* invalid OTHER_OUTLINE side (neither top nor bottom): "; + ostr << side; + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); + } while( 0 ); + break; } } // write RECORD 3 - if( !writeOutlines( aBoardFile ) ) - return false; + writeOutlines( aBoardFile ); // write RECORD 4 if( outlineType == OTLN_OTHER ) @@ -1392,33 +1907,46 @@ bool OTHER_OUTLINE::WriteData( std::ofstream& aBoardFile ) else aBoardFile << ".END_VIA_KEEPOUT\n\n"; - return !aBoardFile.fail(); + return; } -void OTHER_OUTLINE::Clear( void ) + +bool OTHER_OUTLINE::Clear( void ) { +#ifndef DISABLE_IDF_OWNERSHIP + if( !CheckOwnership( __LINE__, __FUNCTION__, parent, owner, outlineType, errormsg ) ) + return false; +#endif + + clear(); side = LYR_INVALID; uniqueID.clear(); - BOARD_OUTLINE::Clear(); - - return; + return true; } /* * CLASS: ROUTE_OUTLINE */ -ROUTE_OUTLINE::ROUTE_OUTLINE() +ROUTE_OUTLINE::ROUTE_OUTLINE( IDF3_BOARD* aParent ) { + setParent( aParent ); outlineType = OTLN_ROUTE; single = true; layers = LYR_INVALID; } -void ROUTE_OUTLINE::SetLayers( IDF3::IDF_LAYER aLayer ) +bool ROUTE_OUTLINE::SetLayers( IDF3::IDF_LAYER aLayer ) { +#ifndef DISABLE_IDF_OWNERSHIP + if( !CheckOwnership( __LINE__, __FUNCTION__, parent, owner, outlineType, errormsg ) ) + return false; +#endif + layers = aLayer; + + return true; } IDF3::IDF_LAYER ROUTE_OUTLINE::GetLayers( void ) @@ -1426,7 +1954,8 @@ IDF3::IDF_LAYER ROUTE_OUTLINE::GetLayers( void ) return layers; } -bool ROUTE_OUTLINE::ReadData( std::ifstream& aBoardFile, const std::string& aHeader ) +void ROUTE_OUTLINE::readData( std::ifstream& aBoardFile, const std::string& aHeader, + IDF3::IDF_VERSION aIdfVersion ) { // ROUTE_OUTLINE (or ROUTE_KEEPOUT) // .ROUTE_OUTLINE [OWNER] @@ -1437,42 +1966,44 @@ bool ROUTE_OUTLINE::ReadData( std::ifstream& aBoardFile, const std::string& aHea std::string token; bool quoted = false; int idx = 0; + std::streampos pos = aBoardFile.tellg(); if( !GetIDFString( aHeader, token, quoted, idx ) ) { - ERROR_IDF << "invalid invocation; blank header line\n"; - return false; + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "\n* BUG: invalid invocation; blank header line" ) ); } if( quoted ) { - ERROR_IDF << "section names may not be quoted:\n"; - std::cerr << "\tLINE: " << aHeader << "\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: section names must not be in quotes\n"; + ostr << "* line: '" << aHeader << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( outlineType == OTLN_ROUTE ) { if( !CompareToken( ".ROUTE_OUTLINE", token ) ) - { - ERROR_IDF << "not a ROUTE outline:\n"; - std::cerr << "\tLINE: " << aHeader << "\n"; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "\n* BUG: not a ROUTE outline" ) ); } else { if( !CompareToken( ".ROUTE_KEEPOUT", token ) ) - { - ERROR_IDF << "not a ROUTE KEEPOUT outline:\n"; - std::cerr << "\tLINE: " << aHeader << "\n"; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "\n* BUG: not a ROUTE KEEPOUT outline" ) ); } if( !GetIDFString( aHeader, token, quoted, idx ) ) { - ERROR_IDF << "no OWNER; setting to UNOWNED\n"; + if( aIdfVersion > IDF_V2 ) + ERROR_IDF << "no OWNER; setting to UNOWNED\n"; + owner = UNOWNED; } else @@ -1488,94 +2019,163 @@ bool ROUTE_OUTLINE::ReadData( std::ifstream& aBoardFile, const std::string& aHea // [layers: TOP, BOTTOM, BOTH, INNER, ALL] std::string iline; bool comment = false; - std::streampos pos; - while( aBoardFile.good() && !FetchIDFLine( aBoardFile, iline, comment, pos ) ); - - if( !aBoardFile.good() ) + if( aIdfVersion > IDF_V2 || outlineType == OTLN_ROUTE_KEEPOUT ) { - ERROR_IDF << "bad .ROUTE_OUTLINE/KEEPOUT section (premature end)\n"; - return false; - } + while( aBoardFile.good() && !FetchIDFLine( aBoardFile, iline, comment, pos ) ); - idx = 0; - if( comment ) - { - ERROR_IDF << "comment within .ROUTE_OUTLINE/KEEPOUT section\n"; - return false; - } + if( !aBoardFile.good() ) + { + ostringstream ostr; - if( !GetIDFString( iline, token, quoted, idx ) ) - { - ERROR_IDF << "bad .ROUTE_OUTLINE/KEEPOUT section (no layers specification)\n"; - return false; - } + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: premature end\n"; + ostr << "* file position: " << pos; - if( quoted ) - { - ERROR_IDF << "bad .ROUTE_OUTLINE/KEEPOUT section (layers may not be quoted)\n"; - std::cerr << "\tLINE: " << iline << "\n"; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); + } - if( !ParseIDFLayer( token, layers ) ) + idx = 0; + if( comment ) + { + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: comment within a section\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); + } + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: no layers specification\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); + } + + if( quoted ) + { + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: layers specification must not be in quotes\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); + } + + if( !ParseIDFLayer( token, layers ) ) + { + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: invalid layers specification\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); + } + + if( aIdfVersion == IDF_V2 ) + { + if( layers == LYR_INNER || layers == LYR_ALL ) + { + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: IDFv2 allows only TOP/BOTTOM/BOTH; layer was '"; + ostr << token << "'\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); + } + } + + } // RECORD 2, conditional > IDFv2 or ROUTE_KO_OUTLINE + else { - ERROR_IDF << "bad .ROUTE_OUTLINE/KEEPOUT section (invalid layer)\n"; - std::cerr << "\tLINE: " << iline << "\n"; - return false; + layers = LYR_ALL; } // read RECORD 3 values - readOutlines( aBoardFile ); + readOutlines( aBoardFile, aIdfVersion ); // check RECORD 4 while( aBoardFile.good() && !FetchIDFLine( aBoardFile, iline, comment, pos ) ); if( ( !aBoardFile.good() && aBoardFile.eof() ) || iline.empty() ) { - ERROR_IDF << "bad .ROUTE_OUTLINE/KEEPOUT section (premature end)\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: premature end\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } idx = 0; if( comment ) { - ERROR_IDF << "comment within .ROUTE_OUTLINE/KEEPOUT section\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: comment within section\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( outlineType == OTLN_ROUTE ) { if( !CompareToken( ".END_ROUTE_OUTLINE", iline ) ) { - ERROR_IDF << "bad .ROUTE_OUTLINE section (no .END_ROUTE_OUTLINE)\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: no .END_ROUTE_OUTLINE found\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } } else { if( !CompareToken( ".END_ROUTE_KEEPOUT", iline ) ) { - ERROR_IDF << "bad .ROUTE_KEEPOUT section (no .END_ROUTE_KEEPOUT)\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: no .END_ROUTE_KEEPOUT found\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } } - return true; + return; } -bool ROUTE_OUTLINE::WriteData( std::ofstream& aBoardFile ) +void ROUTE_OUTLINE::writeData( std::ofstream& aBoardFile ) { // this section is optional; do not write if not required if( outlines.empty() ) - return true; + return; if( layers == LYR_INVALID ) - { - ERROR_IDF << "layer not specified\n"; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "layer not specified" ) ); writeComments( aBoardFile ); @@ -1592,8 +2192,7 @@ bool ROUTE_OUTLINE::WriteData( std::ofstream& aBoardFile ) aBoardFile << "\n"; // write RECORD 3 - if( !writeOutlines( aBoardFile ) ) - return false; + writeOutlines( aBoardFile ); // write RECORD 4 if( outlineType == OTLN_ROUTE ) @@ -1601,31 +2200,43 @@ bool ROUTE_OUTLINE::WriteData( std::ofstream& aBoardFile ) else aBoardFile << ".END_ROUTE_KEEPOUT\n\n"; - return !aBoardFile.fail(); + return; } -void ROUTE_OUTLINE::Clear( void ) +bool ROUTE_OUTLINE::Clear( void ) { - BOARD_OUTLINE::Clear(); +#ifndef DISABLE_IDF_OWNERSHIP + if( !CheckOwnership( __LINE__, __FUNCTION__, parent, owner, outlineType, errormsg ) ) + return false; +#endif + + clear(); layers = LYR_INVALID; - return; + + return true; } /* * CLASS: PLACE_OUTLINE */ -PLACE_OUTLINE::PLACE_OUTLINE() +PLACE_OUTLINE::PLACE_OUTLINE( IDF3_BOARD* aParent ) { + setParent( aParent ); outlineType = OTLN_PLACE; single = true; thickness = 0.0; side = LYR_INVALID; } -void PLACE_OUTLINE::SetSide( IDF3::IDF_LAYER aSide ) +bool PLACE_OUTLINE::SetSide( IDF3::IDF_LAYER aSide ) { +#ifndef DISABLE_IDF_OWNERSHIP + if( !CheckOwnership( __LINE__, __FUNCTION__, parent, owner, outlineType, errormsg ) ) + return false; +#endif + switch( aSide ) { case LYR_TOP: @@ -1635,32 +2246,54 @@ void PLACE_OUTLINE::SetSide( IDF3::IDF_LAYER aSide ) break; default: - // XXX - throw - ERROR_IDF << "invalid layer (" << aSide << "): must be one of TOP/BOTTOM/BOTH\n"; - side = LYR_INVALID; - return; + do{ + side = LYR_INVALID; + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "():\n"; + ostr << "* BUG: invalid layer (" << aSide << "): must be one of TOP/BOTTOM/BOTH\n"; + ostr << "* outline type: " << GetOutlineTypeString( outlineType ); + errormsg = ostr.str(); + + return false; + } while( 0 ); + break; } - return; + return true; } + IDF3::IDF_LAYER PLACE_OUTLINE::GetSide( void ) { return side; } -void PLACE_OUTLINE::SetMaxHeight( double aHeight ) + +bool PLACE_OUTLINE::SetMaxHeight( double aHeight ) { +#ifndef DISABLE_IDF_OWNERSHIP + if( !CheckOwnership( __LINE__, __FUNCTION__, parent, owner, outlineType, errormsg ) ) + return false; +#endif + if( aHeight < 0.0 ) { - ERROR_IDF << "invalid height (must be >= 0.0); default to 0\n"; thickness = 0.0; - return; + + do{ + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "():\n"; + ostr << "* BUG: invalid height (" << aHeight << "): must be >= 0.0"; + ostr << "* outline type: " << GetOutlineTypeString( outlineType ); + errormsg = ostr.str(); + + return false; + } while( 0 ); } thickness = aHeight; - return; + return true; } double PLACE_OUTLINE::GetMaxHeight( void ) @@ -1668,7 +2301,8 @@ double PLACE_OUTLINE::GetMaxHeight( void ) return thickness; } -bool PLACE_OUTLINE::ReadData( std::ifstream& aBoardFile, const std::string& aHeader ) +void PLACE_OUTLINE::readData( std::ifstream& aBoardFile, const std::string& aHeader, + IDF3::IDF_VERSION aIdfVersion ) { // PLACE_OUTLINE/KEEPOUT // .PLACE_OUTLINE [OWNER] @@ -1679,42 +2313,42 @@ bool PLACE_OUTLINE::ReadData( std::ifstream& aBoardFile, const std::string& aHea std::string token; bool quoted = false; int idx = 0; + std::streampos pos = aBoardFile.tellg(); if( !GetIDFString( aHeader, token, quoted, idx ) ) - { - ERROR_IDF << "invalid invocation; blank header line\n"; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "\n* BUG: invalid invocation: blank header line\n" ) ); if( quoted ) { - ERROR_IDF << "section names may not be quoted:\n"; - std::cerr << "\tLINE: " << aHeader << "\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: section name must not be in quotes\n"; + ostr << "* line: '" << aHeader << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( outlineType == OTLN_PLACE ) { if( !CompareToken( ".PLACE_OUTLINE", token ) ) - { - ERROR_IDF << "not a PLACE outline:\n"; - std::cerr << "\tLINE: " << aHeader << "\n"; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "\n* BUG: not a .PLACE_OUTLINE" ) ); } else { if( !CompareToken( ".PLACE_KEEPOUT", token ) ) - { - ERROR_IDF << "not a PLACE_KEEPOUT outline:\n"; - std::cerr << "\tLINE: " << aHeader << "\n"; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "\n* BUG: not a .PLACE_KEEPOUT" ) ); } if( !GetIDFString( aHeader, token, quoted, idx ) ) { - ERROR_IDF << "no OWNER; setting to UNOWNED\n"; + if( aIdfVersion > IDF_V2 ) + ERROR_IDF << "no OWNER; setting to UNOWNED\n"; + owner = UNOWNED; } else @@ -1730,103 +2364,178 @@ bool PLACE_OUTLINE::ReadData( std::ifstream& aBoardFile, const std::string& aHea // [board side: Top/Bot/Both] [height] std::string iline; bool comment = false; - std::streampos pos; - while( aBoardFile.good() && !FetchIDFLine( aBoardFile, iline, comment, pos ) ); - - if( !aBoardFile.good() ) + if( aIdfVersion > IDF_V2 || outlineType == OTLN_PLACE_KEEPOUT ) { - ERROR_IDF << "bad .PLACE_OUTLINE/KEEPOUT section (premature end)\n"; - return false; - } + while( aBoardFile.good() && !FetchIDFLine( aBoardFile, iline, comment, pos ) ); - idx = 0; - if( comment ) + if( !aBoardFile.good() ) + { + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: premature end\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); + } + + idx = 0; + if( comment ) + { + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: comment within the section\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); + } + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: no board side information\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); + } + + if( !ParseIDFLayer( token, side ) || + ( side != LYR_TOP && side != LYR_BOTTOM && side != LYR_BOTH ) ) + { + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: invalid board side: must be one of TOP/BOTTOM/BOTH\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); + } + + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: no height specified\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); + } + + std::stringstream teststr; + teststr << token; + + teststr >> thickness; + if( teststr.fail() ) + { + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: invalid height\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); + } + + if( thickness < 0.0 ) + { + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: thickness < 0\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); + } + + if( unit == UNIT_THOU ) + { + thickness *= IDF_THOU_TO_MM; + } + else if( ( aIdfVersion == IDF_V2 ) && ( unit == UNIT_TNM ) ) + { + thickness *= IDF_TNM_TO_MM; + } + else if( unit != UNIT_MM ) + { + ostringstream ostr; + ostr << "\n* BUG: invalid UNIT type: " << unit; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); + } + + if( thickness < 0.0 ) + thickness = 0.0; + } + else { - ERROR_IDF << "comment within .PLACE_OUTLINE/KEEPOUT section\n"; - return false; + side = LYR_TOP; + thickness = 0.0; } - if( !GetIDFString( iline, token, quoted, idx ) ) - { - ERROR_IDF << "bad .PLACE_OUTLINE/KEEPOUT section (no board side information)\n"; - return false; - } - - if( !ParseIDFLayer( token, side ) || - ( side != LYR_TOP && side != LYR_BOTTOM && side != LYR_BOTH ) ) - { - ERROR_IDF << "bad .PLACE_OUTLINE/KEEPOUT section (invalid side, must be one of TOP/BOTTOM/BOTH)\n"; - std::cerr << "\tLINE: " << iline << "\n"; - return false; - } - - if( !GetIDFString( iline, token, quoted, idx ) ) - { - ERROR_IDF << "bad .PLACE_OUTLINE/KEEPOUT section (no height)\n"; - return false; - } - - std::stringstream teststr; - teststr << token; - - teststr >> thickness; - if( teststr.fail() ) - { - ERROR_IDF << "bad .PLACE_OUTLINE/KEEPOUT section (invalid RECORD 2 reading height)\n"; - std::cerr << "\tLINE: " << iline << "\n"; - return false; - } - - if( unit == UNIT_THOU ) - thickness *= IDF_MM_TO_THOU; - // read RECORD 3 values - readOutlines( aBoardFile ); + readOutlines( aBoardFile, aIdfVersion ); // check RECORD 4 while( aBoardFile.good() && !FetchIDFLine( aBoardFile, iline, comment, pos ) ); if( ( !aBoardFile.good() && aBoardFile.eof() ) || iline.empty() ) { - ERROR_IDF << "bad .PLACE_OUTLINE/KEEPOUT section (premature end)\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: premature end\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } idx = 0; if( comment ) { - ERROR_IDF << "comment within .PLACE_OUTLINE/KEEPOUT section\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: comment within section\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( outlineType == OTLN_PLACE ) { if( !GetIDFString( iline, token, quoted, idx ) || !CompareToken( ".END_PLACE_OUTLINE", token ) ) - { - ERROR_IDF << "bad .PLACE_OUTLINE section (no .END_PLACE_OUTLINE)\n"; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid .PLACE_OUTLINE section: no .END_PLACE_OUTLINE found" ) ); } else { if( !GetIDFString( iline, token, quoted, idx ) || !CompareToken( ".END_PLACE_KEEPOUT", token ) ) - { - ERROR_IDF << "bad .PLACE_KEEPOUT section (no .END_PLACE_KEEPOUT)\n"; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid .PLACE_KEEPOUT section: no .END_PLACE_KEEPOUT found" ) ); } - return true; + return; } -bool PLACE_OUTLINE::WriteData( std::ofstream& aBoardFile ) +void PLACE_OUTLINE::writeData( std::ofstream& aBoardFile ) { // this section is optional; do not write if not required if( outlines.empty() ) - return true; + return; writeComments( aBoardFile ); @@ -1848,21 +2557,26 @@ bool PLACE_OUTLINE::WriteData( std::ofstream& aBoardFile ) break; default: - ERROR_IDF << "Invalid PLACE_OUTLINE/KEEPOUT side (" << side << "); must be one of TOP/BOTTOM/BOTH\n"; - return false; + do + { + ostringstream ostr; + ostr << "\n* invalid PLACE_OUTLINE/KEEPOUT side ("; + ostr << side << "); must be one of TOP/BOTTOM/BOTH"; + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); + } while( 0 ); + break; } aBoardFile << " "; - if( unit == UNIT_MM ) + if( unit != UNIT_THOU ) aBoardFile << setiosflags(ios::fixed) << setprecision(5) << thickness << "\n"; else - aBoardFile << setiosflags(ios::fixed) << setprecision(1) << (thickness / IDF_MM_TO_THOU) << "\n"; + aBoardFile << setiosflags(ios::fixed) << setprecision(1) << (thickness / IDF_THOU_TO_MM) << "\n"; // write RECORD 3 - if( !writeOutlines( aBoardFile ) ) - return false; + writeOutlines( aBoardFile ); // write RECORD 4 if( outlineType == OTLN_PLACE ) @@ -1870,22 +2584,30 @@ bool PLACE_OUTLINE::WriteData( std::ofstream& aBoardFile ) else aBoardFile << ".END_PLACE_KEEPOUT\n\n"; - return !aBoardFile.fail(); + return; } -void PLACE_OUTLINE::Clear( void ) + +bool PLACE_OUTLINE::Clear( void ) { - BOARD_OUTLINE::Clear(); +#ifndef DISABLE_IDF_OWNERSHIP + if( !CheckOwnership( __LINE__, __FUNCTION__, parent, owner, outlineType, errormsg ) ) + return false; +#endif + + clear(); thickness = 0.0; side = LYR_INVALID; - return; + + return true; } /* * CLASS: ROUTE_KEEPOUT */ -ROUTE_KO_OUTLINE::ROUTE_KO_OUTLINE() +ROUTE_KO_OUTLINE::ROUTE_KO_OUTLINE( IDF3_BOARD* aParent ) + : ROUTE_OUTLINE( aParent ) { outlineType = OTLN_ROUTE_KEEPOUT; return; @@ -1895,7 +2617,8 @@ ROUTE_KO_OUTLINE::ROUTE_KO_OUTLINE() /* * CLASS: PLACE_KEEPOUT */ -PLACE_KO_OUTLINE::PLACE_KO_OUTLINE() +PLACE_KO_OUTLINE::PLACE_KO_OUTLINE( IDF3_BOARD* aParent ) + : PLACE_OUTLINE( aParent ) { outlineType = OTLN_PLACE_KEEPOUT; return; @@ -1905,8 +2628,10 @@ PLACE_KO_OUTLINE::PLACE_KO_OUTLINE() /* * CLASS: VIA_KEEPOUT */ -VIA_KO_OUTLINE::VIA_KO_OUTLINE() +VIA_KO_OUTLINE::VIA_KO_OUTLINE( IDF3_BOARD* aParent ) + : OTHER_OUTLINE( aParent ) { + single = true; outlineType = OTLN_VIA_KEEPOUT; } @@ -1914,8 +2639,9 @@ VIA_KO_OUTLINE::VIA_KO_OUTLINE() /* * CLASS: PLACEMENT GROUP (PLACE_REGION) */ -GROUP_OUTLINE::GROUP_OUTLINE() +GROUP_OUTLINE::GROUP_OUTLINE( IDF3_BOARD* aParent ) { + setParent( aParent ); outlineType = OTLN_GROUP_PLACE; thickness = 0.0; side = LYR_INVALID; @@ -1923,8 +2649,14 @@ GROUP_OUTLINE::GROUP_OUTLINE() return; } -void GROUP_OUTLINE::SetSide( IDF3::IDF_LAYER aSide ) + +bool GROUP_OUTLINE::SetSide( IDF3::IDF_LAYER aSide ) { +#ifndef DISABLE_IDF_OWNERSHIP + if( !CheckOwnership( __LINE__, __FUNCTION__, parent, owner, outlineType, errormsg ) ) + return false; +#endif + switch( aSide ) { case LYR_TOP: @@ -1934,32 +2666,49 @@ void GROUP_OUTLINE::SetSide( IDF3::IDF_LAYER aSide ) break; default: - // XXX throw - ERROR_IDF << "invalid side (" << aSide << "); must be one of TOP/BOTTOM/BOTH\n"; - return; + do{ + ostringstream ostr; + ostr << "invalid side (" << aSide << "); must be one of TOP/BOTTOM/BOTH\n"; + ostr << "* outline type: " << GetOutlineTypeString( outlineType ); + errormsg = ostr.str(); + + return false; + } while( 0 ); + break; } - return; + return true; } + IDF3::IDF_LAYER GROUP_OUTLINE::GetSide( void ) { return side; } -void GROUP_OUTLINE::SetGroupName( std::string aGroupName ) + +bool GROUP_OUTLINE::SetGroupName( std::string aGroupName ) { +#ifndef DISABLE_IDF_OWNERSHIP + if( !CheckOwnership( __LINE__, __FUNCTION__, parent, owner, outlineType, errormsg ) ) + return false; +#endif + groupName = aGroupName; - return; + + return true; } + const std::string& GROUP_OUTLINE::GetGroupName( void ) { return groupName; } -bool GROUP_OUTLINE::ReadData( std::ifstream& aBoardFile, const std::string& aHeader ) + +void GROUP_OUTLINE::readData( std::ifstream& aBoardFile, const std::string& aHeader, + IDF3::IDF_VERSION aIdfVersion ) { // Placement Group // .PLACE_REGION [OWNER] @@ -1970,30 +2719,33 @@ bool GROUP_OUTLINE::ReadData( std::ifstream& aBoardFile, const std::string& aHea std::string token; bool quoted = false; int idx = 0; + std::streampos pos = aBoardFile.tellg(); if( !GetIDFString( aHeader, token, quoted, idx ) ) - { - ERROR_IDF << "invalid invocation; blank header line\n"; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "\n* BUG: invalid invocation: blank header line" ) ); if( quoted ) { - ERROR_IDF << "section names may not be quoted:\n"; - std::cerr << "\tLINE: " << aHeader << "\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: section name must not be in quotes\n"; + ostr << "* line: '" << aHeader << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( !CompareToken( ".PLACE_REGION", token ) ) - { - ERROR_IDF << "not a PLACE_REGION outline:\n"; - std::cerr << "\tLINE: " << aHeader << "\n"; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "\n* BUG: not a .PLACE_REGION" ) ); if( !GetIDFString( aHeader, token, quoted, idx ) ) { - ERROR_IDF << "no OWNER; setting to UNOWNED\n"; + if( aIdfVersion > IDF_V2 ) + ERROR_IDF << "no OWNER; setting to UNOWNED\n"; + owner = UNOWNED; } else @@ -2007,7 +2759,6 @@ bool GROUP_OUTLINE::ReadData( std::ifstream& aBoardFile, const std::string& aHea std::string iline; bool comment = false; - std::streampos pos; // check RECORD 2 // [side: Top/Bot/Both ] [component group name] @@ -2015,73 +2766,111 @@ bool GROUP_OUTLINE::ReadData( std::ifstream& aBoardFile, const std::string& aHea if( !aBoardFile.good() ) { - ERROR_IDF << "bad .PLACE_REGION section (premature end)\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: premature end\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } idx = 0; if( comment ) { - ERROR_IDF << "comment within .PLACE_REGION section\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: comment within section\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( !GetIDFString( iline, token, quoted, idx ) ) { - ERROR_IDF << "bad .PLACE_REGION section (no board side)\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: no board side specified\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( !ParseIDFLayer( token, side ) || ( side != LYR_TOP && side != LYR_BOTTOM && side != LYR_BOTH ) ) { - ERROR_IDF << "bad .PLACE_REGION section (invalid side, must be TOP/BOTTOM/BOTH)\n"; - std::cerr << "\tLINE: " << iline << "\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: invalid board side, must be one of TOP/BOTTOM/BOTH\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( !GetIDFString( iline, token, quoted, idx ) ) { - ERROR_IDF << "bad .PLACE_REGION section (no outline identifier)\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: no outline identifier\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } groupName = token; // read RECORD 3 values - readOutlines( aBoardFile ); + readOutlines( aBoardFile, aIdfVersion ); // check RECORD 4 while( aBoardFile.good() && !FetchIDFLine( aBoardFile, iline, comment, pos ) ); if( ( !aBoardFile.good() && aBoardFile.eof() ) || iline.empty() ) { - ERROR_IDF << "bad .PLACE_REGION section (premature end)\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: premature end\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } idx = 0; if( comment ) { - ERROR_IDF << "comment within .PLACE_REGION section\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: comment within section\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( !GetIDFString( iline, token, quoted, idx ) || !CompareToken( ".END_PLACE_REGION", token ) ) - { - ERROR_IDF << "bad .PLACE_REGION section (no .END_PLACE_REGION)\n"; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "\n* invalid .PLACE_REGION section: no .END_PLACE_REGION found" ) ); - return true; + return; } -bool GROUP_OUTLINE::WriteData( std::ofstream& aBoardFile ) + +void GROUP_OUTLINE::writeData( std::ofstream& aBoardFile ) { // this section is optional; do not write if not required if( outlines.empty() ) - return true; + return; writeComments( aBoardFile ); @@ -2100,37 +2889,49 @@ bool GROUP_OUTLINE::WriteData( std::ofstream& aBoardFile ) break; default: - ERROR_IDF << "Invalid PLACE_REGION side (must be TOP/BOTTOM/BOTH): " << side << "\n"; - return false; + do{ + ostringstream ostr; + ostr << "\n* invalid PLACE_REGION side (must be TOP/BOTTOM/BOTH): "; + ostr << side; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); + } while( 0 ); + break; } aBoardFile << " \"" << groupName << "\"\n"; // write RECORD 3 - if( !writeOutlines( aBoardFile ) ) - return false; + writeOutlines( aBoardFile ); // write RECORD 4 aBoardFile << ".END_PLACE_REGION\n\n"; - return !aBoardFile.fail(); + return; } -void GROUP_OUTLINE::Clear( void ) +bool GROUP_OUTLINE::Clear( void ) { - BOARD_OUTLINE::Clear(); +#ifndef DISABLE_IDF_OWNERSHIP + if( !CheckOwnership( __LINE__, __FUNCTION__, parent, owner, outlineType, errormsg ) ) + return false; +#endif + + clear(); thickness = 0.0; side = LYR_INVALID; groupName.clear(); - return; + + return true; } /* * CLASS: COMPONENT OUTLINE */ -IDF3_COMP_OUTLINE::IDF3_COMP_OUTLINE() +IDF3_COMP_OUTLINE::IDF3_COMP_OUTLINE( IDF3_BOARD* aParent ) { + setParent( aParent ); single = true; outlineType = OTLN_COMPONENT; compType = COMP_INVALID; @@ -2138,7 +2939,7 @@ IDF3_COMP_OUTLINE::IDF3_COMP_OUTLINE() return; } -bool IDF3_COMP_OUTLINE::readProperties( std::ifstream& aLibFile ) +void IDF3_COMP_OUTLINE::readProperties( std::ifstream& aLibFile ) { bool quoted = false; bool comment = false; @@ -2155,63 +2956,106 @@ bool IDF3_COMP_OUTLINE::readProperties( std::ifstream& aLibFile ) continue; idx = 0; + if( comment ) { - ERROR_IDF << "comment within component outline section\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: comment within section\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( !GetIDFString( iline, token, quoted, idx ) ) { - ERROR_IDF << "bad component outline section (no PROP)\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: bad property section (no PROP)\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( quoted ) { - ERROR_IDF << "bad component outline section (PROP or .END may not be quoted)\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: PROP or .END must not be quoted\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( token.size() >= 5 && CompareToken( ".END_", token.substr( 0, 5 ) ) ) { aLibFile.seekg( pos ); - return true; + return; } if( !CompareToken( "PROP", token ) ) { - ERROR_IDF << "invalid electrical outline; expecting PROP or .END_ELECTRICAL\n"; - std::cerr << "\tLINE: " << iline << "\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: expecting PROP or .END_ELECTRICAL\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( !GetIDFString( iline, token, quoted, idx ) ) { - ERROR_IDF << "bad component outline section (no prop name)\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: no PROP name\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } pname = token; if( !GetIDFString( iline, token, quoted, idx ) ) { - ERROR_IDF << "bad component outline section (no prop value)\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: no PROP value\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } pval = token; if( props.insert( pair< string, string >(pname, pval) ).second == false ) { - ERROR_IDF << "bad component outline: duplicate property name '" << pname << "'\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: duplicate property name \"" << pname << "\"\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } } - return !aLibFile.fail(); + return; } + bool IDF3_COMP_OUTLINE::writeProperties( std::ofstream& aLibFile ) { if( props.empty() ) @@ -2229,7 +3073,8 @@ bool IDF3_COMP_OUTLINE::writeProperties( std::ofstream& aLibFile ) return !aLibFile.fail(); } -bool IDF3_COMP_OUTLINE::ReadData( std::ifstream& aLibFile, const std::string& aHeader ) +void IDF3_COMP_OUTLINE::readData( std::ifstream& aLibFile, const std::string& aHeader, + IDF3::IDF_VERSION aIdfVersion ) { // .ELECTRICAL/.MECHANICAL // [GEOM] [PART] [UNIT] [HEIGHT] @@ -2239,18 +3084,22 @@ bool IDF3_COMP_OUTLINE::ReadData( std::ifstream& aLibFile, const std::string& aH std::string token; bool quoted = false; int idx = 0; + std::streampos pos = aLibFile.tellg(); if( !GetIDFString( aHeader, token, quoted, idx ) ) - { - ERROR_IDF << "invalid invocation; blank header line\n"; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "\n* BUG: invalid invocation: blank header line" ) ); if( quoted ) { - ERROR_IDF << "section names may not be quoted:\n"; - std::cerr << "\tLINE: " << aHeader << "\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: section name must not be in quotes\n"; + ostr << "* line: '" << aHeader << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( CompareToken( ".ELECTRICAL", token ) ) @@ -2263,58 +3112,97 @@ bool IDF3_COMP_OUTLINE::ReadData( std::ifstream& aLibFile, const std::string& aH } else { - ERROR_IDF << "not a component outline:\n"; - std::cerr << "\tLINE: " << aHeader << "\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: expecting .ELECTRICAL or .MECHANICAL header\n"; + ostr << "* line: '" << aHeader << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } // check RECORD 2 // [GEOM] [PART] [UNIT] [HEIGHT] std::string iline; bool comment = false; - std::streampos pos; while( aLibFile.good() && !FetchIDFLine( aLibFile, iline, comment, pos ) ); if( !aLibFile.good() ) { - ERROR_IDF << "bad component outline data (premature end)\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: premature end\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } idx = 0; if( comment ) { - ERROR_IDF << "comment within a component outline section\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: comment within section\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( !GetIDFString( iline, token, quoted, idx ) ) { - ERROR_IDF << "bad component outline (no GEOMETRY NAME)\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: no GEOMETRY NAME\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } geometry = token; if( !GetIDFString( iline, token, quoted, idx ) ) { - ERROR_IDF << "bad component outline (no PART NAME)\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: no PART NAME\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } part = token; if( part.empty() && geometry.empty() ) { - ERROR_IDF << "bad component outline (both GEOMETRY and PART names are empty)\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: both GEOMETRY and PART names are empty\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( !GetIDFString( iline, token, quoted, idx ) ) { - ERROR_IDF << "bad component outline (no unit type)\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: no UNIT type\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( CompareToken( "MM", token ) ) @@ -2325,17 +3213,32 @@ bool IDF3_COMP_OUTLINE::ReadData( std::ifstream& aLibFile, const std::string& aH { unit = UNIT_THOU; } + else if( aIdfVersion == IDF_V2 && !CompareToken( "TNM", token ) ) + { + unit = UNIT_TNM; + } else { - ERROR_IDF << "bad component outline (invalid unit type)\n"; - std::cerr << "\tLINE: " << iline << "\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: invalid UNIT '" << token << "': must be one of MM or THOU\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( !GetIDFString( iline, token, quoted, idx ) ) { - ERROR_IDF << "bad component outline (no height)\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: no height specified\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } std::istringstream teststr; @@ -2344,69 +3247,110 @@ bool IDF3_COMP_OUTLINE::ReadData( std::ifstream& aLibFile, const std::string& aH teststr >> thickness; if( teststr.fail() ) { - ERROR_IDF << "bad component outline (invalid height)\n"; - std::cerr << "\tLINE: " << iline << "\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: invalid height '" << token << "'\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( unit == UNIT_THOU ) - thickness *= IDF_MM_TO_THOU; + { + thickness *= IDF_THOU_TO_MM; + } + else if( ( aIdfVersion == IDF_V2 ) && ( unit == UNIT_TNM ) ) + { + thickness *= IDF_TNM_TO_MM; + } + else if( unit != UNIT_MM ) + { + ostringstream ostr; + ostr << "\n* BUG: invalid UNIT type: " << unit; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); + } // read RECORD 3 values - readOutlines( aLibFile ); + readOutlines( aLibFile, aIdfVersion ); - if( compType == COMP_ELEC ) - { - if( !readProperties( aLibFile ) ) - return false; - } + if( compType == COMP_ELEC && aIdfVersion > IDF_V2 ) + readProperties( aLibFile ); // check RECORD 4 while( aLibFile.good() && !FetchIDFLine( aLibFile, iline, comment, pos ) ); if( ( !aLibFile.good() && aLibFile.eof() ) || iline.empty() ) { - ERROR_IDF << "bad component outline data (premature end)\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: premature end\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } idx = 0; if( comment ) { - ERROR_IDF << "comment within component outline section\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: comment within section\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( compType == COMP_ELEC ) { if( !CompareToken( ".END_ELECTRICAL", iline ) ) { - ERROR_IDF << "bad component outline (no .END_ELECTRICAL)\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: no .END_ELECTRICAL found\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } } else { if( !CompareToken( ".END_MECHANICAL", iline ) ) { - ERROR_IDF << "corrupt .MECHANICAL outline\n"; - return false; + ostringstream ostr; + + ostr << "\n* invalid outline: " << GetOutlineTypeString( outlineType ) << "\n"; + ostr << "* violation: no .END_MECHANICAL found\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } } - return true; + return; } -bool IDF3_COMP_OUTLINE::WriteData( std::ofstream& aLibFile ) + +void IDF3_COMP_OUTLINE::writeData( std::ofstream& aLibFile ) { + if( refNum == 0 ) + return; // nothing to do + if( compType != COMP_ELEC && compType != COMP_MECH ) { - ERROR_IDF << "component type not set or invalid\n"; - return false; - } + ostringstream ostr; + ostr << "\n* component type not set or invalid: " << compType; - if( refNum == 0 ) - return true; // nothing to do + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); + } writeComments( aLibFile ); @@ -2420,13 +3364,12 @@ bool IDF3_COMP_OUTLINE::WriteData( std::ofstream& aLibFile ) // [GEOM] [PART] [UNIT] [HEIGHT] aLibFile << "\"" << geometry << "\" \"" << part << "\" "; - if( unit == UNIT_MM ) + if( unit != UNIT_THOU ) aLibFile << "MM " << setiosflags(ios::fixed) << setprecision(5) << thickness << "\n"; else - aLibFile << "THOU " << setiosflags(ios::fixed) << setprecision(1) << (thickness / IDF_MM_TO_THOU) << "\n"; + aLibFile << "THOU " << setiosflags(ios::fixed) << setprecision(1) << (thickness / IDF_THOU_TO_MM) << "\n"; - if( !writeOutlines( aLibFile ) ) - return false; + writeOutlines( aLibFile ); if( compType == COMP_ELEC ) { @@ -2438,22 +3381,29 @@ bool IDF3_COMP_OUTLINE::WriteData( std::ofstream& aLibFile ) aLibFile << ".END_MECHANICAL\n\n"; } - return !aLibFile.fail(); + return; } -void IDF3_COMP_OUTLINE::Clear( void ) + +bool IDF3_COMP_OUTLINE::Clear( void ) { - BOARD_OUTLINE::Clear(); +#ifndef DISABLE_IDF_OWNERSHIP + if( !CheckOwnership( __LINE__, __FUNCTION__, parent, owner, outlineType, errormsg ) ) + return false; +#endif + + clear(); uid.clear(); geometry.clear(); part.clear(); compType = COMP_INVALID; refNum = 0; props.clear(); - return; + + return true; } -void IDF3_COMP_OUTLINE::SetComponentClass( IDF3::COMP_TYPE aCompClass ) +bool IDF3_COMP_OUTLINE::SetComponentClass( IDF3::COMP_TYPE aCompClass ) { switch( aCompClass ) { @@ -2463,15 +3413,23 @@ void IDF3_COMP_OUTLINE::SetComponentClass( IDF3::COMP_TYPE aCompClass ) break; default: - // XXX - throw - ERROR_IDF << "invalid component class (must be ELECTRICAL or MECHANICAL)\n"; - return; + do{ + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "():\n"; + ostr << "* BUG: invalid component class (must be ELECTRICAL or MECHANICAL): "; + ostr << aCompClass << "\n"; + errormsg = ostr.str(); + + return false; + } while( 0 ); + break; } - return; + return true; } + IDF3::COMP_TYPE IDF3_COMP_OUTLINE::GetComponentClass( void ) { return compType; @@ -2516,17 +3474,21 @@ const std::string& IDF3_COMP_OUTLINE::GetUID( void ) } -int IDF3_COMP_OUTLINE::IncrementRef( void ) +int IDF3_COMP_OUTLINE::incrementRef( void ) { return ++refNum; } -int IDF3_COMP_OUTLINE::DecrementRef( void ) +int IDF3_COMP_OUTLINE::decrementRef( void ) { if( refNum == 0 ) { - ERROR_IDF << "BUG: decrementing refNum beyond 0\n"; - return 0; + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "():\n"; + ostr << "* BUG: decrementing refNum beyond 0"; + errormsg = ostr.str(); + + return -1; } --refNum; diff --git a/utils/idftools/idf_outlines.h b/utils/idftools/idf_outlines.h index 4ca55ca329..d52c9ff052 100644 --- a/utils/idftools/idf_outlines.h +++ b/utils/idftools/idf_outlines.h @@ -91,7 +91,9 @@ class IDF3_BOARD; */ class BOARD_OUTLINE { +friend class IDF3_BOARD; protected: + std::string errormsg; std::list< IDF_OUTLINE* > outlines; IDF3::KEY_OWNER owner; // indicates the owner of this outline (MCAD, ECAD, UNOWNED) IDF3::OUTLINE_TYPE outlineType;// type of IDF outline @@ -102,15 +104,48 @@ protected: double thickness; // Board/Extrude Thickness or Height (IDF spec) // Read outline data from a BOARD or LIBRARY file's outline section - bool readOutlines( std::ifstream& aBoardFile ); + void readOutlines( std::ifstream& aBoardFile, IDF3::IDF_VERSION aIdfVersion ); // Write comments to a BOARD or LIBRARY file (must not be within a SECTION as per IDFv3 spec) bool writeComments( std::ofstream& aBoardFile ); // Write the outline owner to a BOARD file bool writeOwner( std::ofstream& aBoardFile ); // Write the data of a single outline object - bool writeOutline( std::ofstream& aBoardFile, IDF_OUTLINE* aOutline, size_t aIndex ); + void writeOutline( std::ofstream& aBoardFile, IDF_OUTLINE* aOutline, size_t aIndex ); // Iterate through the outlines and write out all data - bool writeOutlines( std::ofstream& aBoardFile ); // write outline data (no headers) + void writeOutlines( std::ofstream& aBoardFile ); // write outline data (no headers) + // Clear internal list of outlines + void clearOutlines( void ); + /** + * Function SetParent + * sets the parent IDF_BOARD object + */ + void setParent( IDF3_BOARD* aParent ); + + // Shadow routines used by friends to bypass ownership checks + bool addOutline( IDF_OUTLINE* aOutline ); + virtual bool setThickness( double aThickness ); + virtual void clear( void ); + + /** + * Function readData + * reads data from a .BOARD_OUTLINE section + * In case of an unrecoverable error an exception is thrown. On a successful + * return the file pointer will be at the line following .END_BOARD_OUTLINE + * + * @param aBoardFile is an IDFv3 file opened for reading + * @param aHeader is the ".BOARD_OUTLINE" header line as read by FetchIDFLine + */ + virtual void readData( std::ifstream& aBoardFile, const std::string& aHeader, + IDF3::IDF_VERSION aIdfVersion ); + + /** + * Function writeData + * writes the comments and .BOARD_OUTLINE section to an IDFv3 file. + * Throws exceptions. + * + * @param aBoardFile is an IDFv3 file opened for writing + */ + virtual void writeData( std::ofstream& aBoardFile ); public: BOARD_OUTLINE(); @@ -123,7 +158,7 @@ public: * * @param aUnit is the native unit (UNIT_MM or UNIT_THOU) */ - virtual void SetUnit( IDF3::IDF_UNIT aUnit ); + virtual bool SetUnit( IDF3::IDF_UNIT aUnit ); /** * Function GetUnit @@ -147,34 +182,13 @@ public: */ virtual double GetThickness( void ); - /** - * Function ReadData - * reads data from a .BOARD_OUTLINE section - * - * @param aBoardFile is an IDFv3 file opened for reading - * @param aHeader is the ".BOARD_OUTLINE" header line as read by FetchIDFLine - * - * @return bool: true if the BOARD_OUTLINE section was successfully read, otherwise - * false. In case of an unrecoverable error an exception is thrown. On a successful - * return the file pointer will be at the line following .END_BOARD_OUTLINE - */ - virtual bool ReadData( std::ifstream& aBoardFile, const std::string& aHeader ); - - /** - * Function WriteData - * writes the comments and .BOARD_OUTLINE section to an IDFv3 file - * - * @param aBoardFile is an IDFv3 file opened for writing - * - * @return bool: true if the data had been successfully written, otherwise false. - */ - virtual bool WriteData( std::ofstream& aBoardFile ); - /** * Function Clear - * frees memory and reinitializes all internal data except for the parent pointer + * frees memory and reinitializes all internal data except for the parent pointer. + * + * @return bool: true if OK, false on ownership violations */ - virtual void Clear( void ); + virtual bool Clear( void ); /** * Function GetOutlineType @@ -182,12 +196,6 @@ public: */ IDF3::OUTLINE_TYPE GetOutlineType( void ); - /** - * Function SetParent - * sets the parent IDF_BOARD object - */ - void SetParent( IDF3_BOARD* aParent ); - /** * Function GetParent * returns the parent IDF_BOARD object @@ -202,10 +210,7 @@ public: * @param aOutline is a valid IDF outline * * @return bool: true if the outline was added; false if the outline - * already existed. If the outline cannot be added due to a violation - * of the IDF specification (multiple outlines for anything other than - * a BOARD_OUTLINE, or the ownership rules are violated) an exception is - * thrown. + * already existed or an ownership violation occurs. */ bool AddOutline( IDF_OUTLINE* aOutline ); @@ -221,8 +226,7 @@ public: * @param aOutline is a pointer to the outline to remove from the list * * @return bool: true if the outline was found and removed; false if - * the outline was not found. If an ownership violation occurs an - * exception is thrown. + * the outline was not found or an ownership violation occurs. */ bool DelOutline( IDF_OUTLINE* aOutline ); @@ -237,8 +241,8 @@ public: * @param aIndex is an index to the outline to delete * * @return bool: true if the outline was found and deleted; false if - * the outline was not found. If an ownership violation or indexation - * error occurs an exception is thrown. + * the outline was not found or an ownership violation or indexation + * error occurs. */ bool DelOutline( size_t aIndex ); @@ -259,8 +263,9 @@ public: /** * Function GetOutline * returns a pointer to the outline as specified by aIndex. - * If the index is out of bounds an error is thrown. It is the - * responsibility of the user to observe IDF ownership rules. + * If the index is out of bounds NULL is returned and the + * error message is set. It is the responsibility of the + * user to observe IDF ownership rules. */ IDF_OUTLINE* GetOutline( size_t aIndex ); @@ -331,6 +336,11 @@ public: * deletes all comments */ void ClearComments( void ); + + const std::string& GetError( void ) + { + return errormsg; + } }; @@ -340,19 +350,41 @@ public: */ class OTHER_OUTLINE : public BOARD_OUTLINE { +friend class IDF3_BOARD; private: std::string uniqueID; // Outline Identifier (IDF spec) IDF3::IDF_LAYER side; // Board Side [TOP/BOTTOM ONLY] (IDF spec) + /** + * Function readData + * reads an OTHER_OUTLINE data from an IDFv3 file. + * If an unrecoverable error occurs an exception is thrown. + * + * @param aBoardFile is an IDFv3 file open for reading + * @param aHeader is the .OTHER_OUTLINE header as read via FetchIDFLine + */ + virtual void readData( std::ifstream& aBoardFile, const std::string& aHeader, + IDF3::IDF_VERSION aIdfVersion ); + + /** + * Function writeData + * writes the OTHER_OUTLINE data to an open IDFv3 file + * + * @param aBoardFile is an IDFv3 file open for writing + * + * @return bool: true if the data was successfully written, otherwise false. + */ + virtual void writeData( std::ofstream& aBoardFile ); + public: - OTHER_OUTLINE(); + OTHER_OUTLINE( IDF3_BOARD* aParent ); /** * Function SetOutlineIdentifier * sets the Outline Identifier string of this OTHER_OUTLINE object * as per IDFv3 spec. */ - virtual void SetOutlineIdentifier( const std::string aUniqueID ); + virtual bool SetOutlineIdentifier( const std::string aUniqueID ); /** * Function GetOutlineIdentifier @@ -364,8 +396,8 @@ public: * Function SetSide * sets the side which this outline is applicable to (TOP, BOTTOM). * - * @return bool: true if the side was set, false if the side is invalid. - * An exception is thrown if there is a violation of IDF ownership rules. + * @return bool: true if the side was set, false if the side is invalid + * or there is a violation of IDF ownership rules. */ virtual bool SetSide( IDF3::IDF_LAYER aSide ); @@ -375,33 +407,11 @@ public: */ virtual IDF3::IDF_LAYER GetSide( void ); - /** - * Function ReadData - * reads an OTHER_OUTLINE data from an IDFv3 file. - * - * @param aBoardFile is an IDFv3 file open for reading - * @param aHeader is the .OTHER_OUTLINE header as read via FetchIDFLine - * - * @return bool: true if data was read, otherwise false. If an unrecoverable - * error occurs an exception is thrown. - */ - virtual bool ReadData( std::ifstream& aBoardFile, const std::string& aHeader ); - - /** - * Function WriteData - * writes the OTHER_OUTLINE data to an open IDFv3 file - * - * @param aBoardFile is an IDFv3 file open for writing - * - * @return bool: true if the data was successfully written, otherwise false. - */ - virtual bool WriteData( std::ofstream& aBoardFile ); - /** * Function Clear * deletes internal data except for the parent object */ - virtual void Clear( void ); + virtual bool Clear( void ); }; @@ -411,20 +421,38 @@ public: */ class ROUTE_OUTLINE : public BOARD_OUTLINE { +friend class IDF3_BOARD; +private: + /** + * Function readData + * reads ROUTE_OUTLINE data from an IDFv3 file + * If an unrecoverable error occurs an exception is thrown. + * + * @param aBoardFile is an open IDFv3 board file + * @param aHeader is the .ROUTE_OUTLINE header as returned by FetchIDFLine + */ + virtual void readData( std::ifstream& aBoardFile, const std::string& aHeader, + IDF3::IDF_VERSION aIdfVersion ); + + /** + * Function writeData + * writes the ROUTE_OUTLINE data to an open IDFv3 file + */ + virtual void writeData( std::ofstream& aBoardFile ); + protected: IDF3::IDF_LAYER layers; // Routing layers (IDF spec) public: - ROUTE_OUTLINE(); + ROUTE_OUTLINE( IDF3_BOARD* aParent ); /** * Function SetLayers * sets the layer or group of layers this outline is applicable to. - * This function is subject to IDF ownership rules. An exception is - * thrown if an invalid layer is provided or an IDF ownership violation - * occurs. + * This function is subject to IDF ownership rules; true is returned + * on success, otherwise false is returned and the error message is set. */ - virtual void SetLayers( IDF3::IDF_LAYER aLayer ); + virtual bool SetLayers( IDF3::IDF_LAYER aLayer ); /** * Function GetLayers @@ -432,29 +460,11 @@ public: */ virtual IDF3::IDF_LAYER GetLayers( void ); - /** - * Function ReadData - * reads ROUTE_OUTLINE data from an IDFv3 file - * - * @param aBoardFile is an open IDFv3 board file - * @param aHeader is the .ROUTE_OUTLINE header as returned by FetchIDFLine - * - * @return bool: true if data was read, otherwise false. If unrecoverable - * errors occur an exception is thrown. - */ - virtual bool ReadData( std::ifstream& aBoardFile, const std::string& aHeader ); - - /** - * Function WriteData - * writes the ROUTE_OUTLINE data to an open IDFv3 file - */ - virtual bool WriteData( std::ofstream& aBoardFile ); - /** * Function Clear * deletes internal data except for the parent object */ - virtual void Clear( void ); + virtual bool Clear( void ); }; /** @@ -463,20 +473,43 @@ public: */ class PLACE_OUTLINE : public BOARD_OUTLINE { +friend class IDF3_BOARD; +private: + /** + * Function readData + * reads PLACE_OUTLINE data from an open IDFv3 file. + * If an unrecoverable error occurs an exception is thrown. + * + * @param aBoardFile is an IDFv3 file opened for reading + * @param aHeader is the .PLACE_OUTLINE header as returned by FetchIDFLine + */ + virtual void readData( std::ifstream& aBoardFile, const std::string& aHeader, + IDF3::IDF_VERSION aIdfVersion ); + + /** + * Function writeData + * writes the PLACE_OUTLINE data to an open IDFv3 file + * + * @param aBoardFile is an IDFv3 file opened for writing + * + * @return bool: true if the data was successfully written, otherwise false + */ + virtual void writeData( std::ofstream& aBoardFile ); + protected: IDF3::IDF_LAYER side; // Board Side [TOP/BOTTOM/BOTH ONLY] (IDF spec) double height; // Max Height (IDF spec) public: - PLACE_OUTLINE(); + PLACE_OUTLINE( IDF3_BOARD* aParent ); /** * Function SetSide - * sets the side (TOP, BOTTOM, BOTH) which this outline applies to, - * subject to IDF ownership rules. An exception is thrown if there is - * an ownership violation or an invalid layer is passed. + * sets the side (TOP, BOTTOM, BOTH) which this outline applies to. + * This function is subject to IDF ownership rules; true is returned + * on success, otherwise false is returned and the error message is set. */ - virtual void SetSide( IDF3::IDF_LAYER aSide ); + virtual bool SetSide( IDF3::IDF_LAYER aSide ); /** * Function GetSide @@ -486,11 +519,11 @@ public: /** * Function SetMaxHeight - * sets the maximum height of a component within this outline, - * subject to IDF ownership rules. An exception is thrown if - * there is an ownership violation or aHeight is negative. + * sets the maximum height of a component within this outline. + * This function is subject to IDF ownership rules; true is returned + * on success, otherwise false is returned and the error message is set. */ - virtual void SetMaxHeight( double aHeight ); + virtual bool SetMaxHeight( double aHeight ); /** * Function GetMaxHeight @@ -498,33 +531,11 @@ public: */ virtual double GetMaxHeight( void ); - /** - * Function ReadData - * reads PLACE_OUTLINE data from an open IDFv3 file. - * - * @param aBoardFile is an IDFv3 file opened for reading - * @param aHeader is the .PLACE_OUTLINE header as returned by FetchIDFLine - * - * @return bool: true if data was read, otherwise false. If there are - * unrecoverable errors an exception is thrown. - */ - virtual bool ReadData( std::ifstream& aBoardFile, const std::string& aHeader ); - - /** - * Function WriteData - * writes the PLACE_OUTLINE data to an open IDFv3 file - * - * @param aBoardFile is an IDFv3 file opened for writing - * - * @return bool: true if the data was successfully written, otherwise false - */ - virtual bool WriteData( std::ofstream& aBoardFile ); - /** * Function Clear * deletes all internal data */ - virtual void Clear( void ); + virtual bool Clear( void ); }; @@ -535,7 +546,7 @@ public: class ROUTE_KO_OUTLINE : public ROUTE_OUTLINE { public: - ROUTE_KO_OUTLINE(); + ROUTE_KO_OUTLINE( IDF3_BOARD* aParent ); }; /** @@ -547,7 +558,7 @@ public: class VIA_KO_OUTLINE : public OTHER_OUTLINE { public: - VIA_KO_OUTLINE(); + VIA_KO_OUTLINE( IDF3_BOARD* aParent ); }; @@ -559,7 +570,7 @@ public: class PLACE_KO_OUTLINE : public PLACE_OUTLINE { public: - PLACE_KO_OUTLINE(); + PLACE_KO_OUTLINE( IDF3_BOARD* aParent ); }; /** @@ -569,20 +580,42 @@ public: */ class GROUP_OUTLINE : public BOARD_OUTLINE { +friend class IDF3_BOARD; private: IDF3::IDF_LAYER side; // Board Side [TOP/BOTTOM/BOTH ONLY] (IDF spec) std::string groupName; // non-unique string + /** + * Function readData + * reads GROUP_OUTLINE data from an open IDFv3 file + * If an unrecoverable error occurs an exception is thrown. + * + * @param aBoardFile is an open IDFv3 file + * @param aHeader is the .PLACE_REGION header as returned by FetchIDFLine + */ + virtual void readData( std::ifstream& aBoardFile, const std::string& aHeader, + IDF3::IDF_VERSION aIdfVersion ); + + /** + * Function writeData + * writes the data to a .PLACE_REGION section of an IDFv3 file + * + * @param aBoardFile is an IDFv3 file open for writing + * + * @return bool: true if the data is successfully written, otherwise false + */ + virtual void writeData( std::ofstream& aBoardFile ); + public: - GROUP_OUTLINE(); + GROUP_OUTLINE( IDF3_BOARD* aParent ); /** * Function SetSide - * sets the side which this outline applies to (TOP, BOTTOM, BOTH), - * subject to IDF ownership rules. If an ownership violation occurs - * or an invalid side is specified, an exception is thrown. + * sets the side which this outline applies to (TOP, BOTTOM, BOTH). + * This function is subject to IDF ownership rules; true is returned + * on success, otherwise false is returned and the error message is set. */ - virtual void SetSide( IDF3::IDF_LAYER aSide ); + virtual bool SetSide( IDF3::IDF_LAYER aSide ); /** * Function GetSide @@ -593,10 +626,10 @@ public: /** * Function SetGroupName * sets the name of the group, subject to IDF ownership rules. - * An empty name or an ownership violation results in a thrown - * exception. + * This function is subject to IDF ownership rules; true is returned + * on success, otherwise false is returned and the error message is set. */ - virtual void SetGroupName( std::string aGroupName ); + virtual bool SetGroupName( std::string aGroupName ); /** * Function GetGroupName @@ -604,33 +637,11 @@ public: */ virtual const std::string& GetGroupName( void ); - /** - * Function ReadData - * reads GROUP_OUTLINE data from an open IDFv3 file - * - * @param aBoardFile is an open IDFv3 file - * @param aHeader is the .PLACE_REGION header as returned by FetchIDFLine - * - * @return bool: true if data was read, otherwise false. If an unrecoverable - * error occurs an exception is thrown. - */ - virtual bool ReadData( std::ifstream& aBoardFile, const std::string& aHeader ); - - /** - * Function WriteData - * writes the data to a .PLACE_REGION section of an IDFv3 file - * - * @param aBoardFile is an IDFv3 file open for writing - * - * @return bool: true if the data is successfully written, otherwise false - */ - virtual bool WriteData( std::ofstream& aBoardFile ); - /** * Function Clear * deletes internal data, subject to IDF ownership rules */ - virtual void Clear( void ); + virtual bool Clear( void ); }; @@ -640,6 +651,8 @@ public: */ class IDF3_COMP_OUTLINE : public BOARD_OUTLINE { +friend class IDF3_BOARD; +friend class IDF3_COMP_OUTLINE_DATA; private: std::string uid; // unique ID std::string geometry; // geometry name (IDF) @@ -649,46 +662,65 @@ private: std::map< std::string, std::string > props; // properties list - bool readProperties( std::ifstream& aLibFile ); + void readProperties( std::ifstream& aLibFile ); bool writeProperties( std::ofstream& aLibFile ); -public: - IDF3_COMP_OUTLINE(); - /** - * Function ReadData + * Function readData * reads a component outline from an open IDFv3 file + * If an unrecoverable error occurs, an exception is thrown. * * @param aLibFile is an open IDFv3 Library file * @param aHeader is the .ELECTRICAL or .MECHANICAL header as returned by FetchIDFLine - * - * @return bool: true if data was read, otherwise false. If unrecoverable errors - * occur, an exception is thrown. */ - virtual bool ReadData( std::ifstream& aLibFile, const std::string& aHeader ); + virtual void readData( std::ifstream& aLibFile, const std::string& aHeader, + IDF3::IDF_VERSION aIdfVersion ); /** - * Function WriteData + * Function writeData * writes comments and component outline data to an IDFv3 Library file * * @param aLibFile is an IDFv3 library file open for writing * * @return bool: true if the data was successfully written, otherwise false */ - virtual bool WriteData( std::ofstream& aLibFile ); + virtual void writeData( std::ofstream& aLibFile ); + + /** + * Function incrementRef + * increments the internal reference counter to keep track of the number of + * components referring to this outline. + * + * @return int: the number of current references to this component outline + */ + int incrementRef( void ); + + /** + * Function decrementRef + * decrements the internal reference counter to keep track of the number of + * components referring to this outline. + * + * @return int: the number of remaining references or -1 if there were no + * references when the function was invoked, in which case the error message + * is also set. + */ + int decrementRef( void ); + +public: + IDF3_COMP_OUTLINE( IDF3_BOARD* aParent ); /** * Function Clear * deletes internal outline data */ - virtual void Clear( void ); + virtual bool Clear( void ); /** * Function SetComponentClass - * sets the type of component outline (.ELECTRICAL or .MECHANICAL) - * If the specified class is invalid an exception is thrown. + * sets the type of component outline (.ELECTRICAL or .MECHANICAL). + * Returns true on success, otherwise false and the error message is set */ - void SetComponentClass( IDF3::COMP_TYPE aCompClass ); + bool SetComponentClass( IDF3::COMP_TYPE aCompClass ); /** * Function GetComponentClass @@ -727,20 +759,6 @@ public: */ const std::string& GetUID( void ); - /** - * Function IncrementRef - * increments the internal reference counter to keep track of the number of - * components referring to this outline. - */ - int IncrementRef( void ); - - /** - * Function DecrementRef - * decrements the internal reference counter to keep track of the number of - * components referring to this outline. - */ - int DecrementRef( void ); - /** * Function CreateDefaultOutline * creates a default outline with the given Geometry and Part names. diff --git a/utils/idftools/idf_parser.cpp b/utils/idftools/idf_parser.cpp index 8582cc0321..37d4b0a24a 100644 --- a/utils/idftools/idf_parser.cpp +++ b/utils/idftools/idf_parser.cpp @@ -21,6 +21,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ + #include #include #include @@ -64,7 +65,7 @@ IDF3_COMP_OUTLINE_DATA::IDF3_COMP_OUTLINE_DATA( IDF3_COMPONENT* aParent, aoff = 0.0; if( aOutline ) - aOutline->IncrementRef(); + aOutline->incrementRef(); return; } @@ -86,19 +87,69 @@ IDF3_COMP_OUTLINE_DATA::IDF3_COMP_OUTLINE_DATA( IDF3_COMPONENT* aParent, IDF3_COMP_OUTLINE_DATA::~IDF3_COMP_OUTLINE_DATA() { if( outline ) - outline->DecrementRef(); + outline->decrementRef(); return; } -void IDF3_COMP_OUTLINE_DATA::SetOffsets( double aXoff, double aYoff, +#ifndef DISABLE_IDF_OWNERSHIP +bool IDF3_COMP_OUTLINE_DATA::checkOwnership( int aSourceLine, const char* aSourceFunc ) +{ + if( !parent ) + { + ostringstream ostr; + ostr << __FILE__ << ":" << aSourceLine << ":" << aSourceFunc << "():\n"; + ostr << "* BUG: IDF3_COMP_OUTLINE_DATA::parent not set; cannot enforce ownership rules\n"; + errormsg = ostr.str(); + + return false; + } + + IDF3::IDF_PLACEMENT placement = parent->GetPlacement(); + IDF3::CAD_TYPE parentCAD = parent->GetCadType(); + + if( placement == PS_PLACED || placement == PS_UNPLACED ) + return true; + + if( placement == PS_MCAD && parentCAD == CAD_MECH ) + return true; + + if( placement == PS_ECAD && parentCAD == CAD_ELEC ) + return true; + + do + { + ostringstream ostr; + ostr << "* " << __FILE__ << ":" << aSourceLine << ":" << aSourceFunc << "():\n"; + ostr << "* ownership violation; CAD type is "; + + if( parentCAD == CAD_MECH ) + ostr << "MCAD "; + else + ostr << "ECAD "; + + ostr << "while outline owner is " << GetPlacementString( placement ) << "\n"; + errormsg = ostr.str(); + + } while( 0 ); + + return false; +} +#endif + +bool IDF3_COMP_OUTLINE_DATA::SetOffsets( double aXoff, double aYoff, double aZoff, double aAngleOff ) { +#ifndef DISABLE_IDF_OWNERSHIP + if( !checkOwnership( __LINE__, __FUNCTION__ ) ) + return false; +#endif + xoff = aXoff; yoff = aYoff; zoff = aZoff; aoff = aAngleOff; - return; + return true; } void IDF3_COMP_OUTLINE_DATA::GetOffsets( double& aXoff, double& aYoff, @@ -117,29 +168,34 @@ void IDF3_COMP_OUTLINE_DATA::SetParent( IDF3_COMPONENT* aParent ) parent = aParent; } -void IDF3_COMP_OUTLINE_DATA::SetOutline( IDF3_COMP_OUTLINE* aOutline ) +bool IDF3_COMP_OUTLINE_DATA::SetOutline( IDF3_COMP_OUTLINE* aOutline ) { +#ifndef DISABLE_IDF_OWNERSHIP + if( !checkOwnership( __LINE__, __FUNCTION__ ) ) + return false; +#endif + if( outline ) - outline->DecrementRef(); + outline->decrementRef(); outline = aOutline; if( outline ) - outline->IncrementRef(); + outline->incrementRef(); - return; + return true; } -bool IDF3_COMP_OUTLINE_DATA::ReadPlaceData( std::ifstream &aBoardFile, - IDF3::FILE_STATE& aBoardState, IDF3_BOARD *aBoard ) + +bool IDF3_COMP_OUTLINE_DATA::readPlaceData( std::ifstream &aBoardFile, + IDF3::FILE_STATE& aBoardState, + IDF3_BOARD *aBoard, + IDF3::IDF_VERSION aIdfVersion, + bool aNoSubstituteOutlines ) { if( !aBoard ) - { - ERROR_IDF; - cerr << "BUG: invoked with no reference to the parent IDF_BOARD\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "\n* BUG: invoked with no reference to the parent IDF_BOARD" ) ); // clear out data possibly left over from previous use of the object outline = NULL; @@ -161,19 +217,25 @@ bool IDF3_COMP_OUTLINE_DATA::ReadPlaceData( std::ifstream &aBoardFile, if( ( !aBoardFile.good() && !aBoardFile.eof() ) || iline.empty() ) { - ERROR_IDF; - cerr << "problems reading PLACEMENT SECTION\n"; - aBoardState = IDF3::FILE_INVALID; - return false; + ostringstream ostr; + + ostr << "invalid IDF file\n"; + ostr << "* violation: could not read PLACEMENT section\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( isComment ) { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: comment within a section (PLACEMENT)\n"; - aBoardState = IDF3::FILE_INVALID; - return false; + ostringstream ostr; + + ostr << "invalid IDF file\n"; + ostr << "* violation: comment within PLACEMENT section\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } idx = 0; @@ -181,7 +243,6 @@ bool IDF3_COMP_OUTLINE_DATA::ReadPlaceData( std::ifstream &aBoardFile, if( !quoted && CompareToken( ".END_PLACEMENT", token ) ) { - errno = 0; aBoardState = IDF3::FILE_PLACEMENT; return false; } @@ -190,11 +251,14 @@ bool IDF3_COMP_OUTLINE_DATA::ReadPlaceData( std::ifstream &aBoardFile, if( !GetIDFString( iline, token, quoted, idx ) ) { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: no PART NAME in PLACEMENT RECORD2\n"; - aBoardState = IDF3::FILE_INVALID; - return false; + ostringstream ostr; + + ostr << "invalid IDF file\n"; + ostr << "* violation: no PART NAME in PLACEMENT RECORD2\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } std::string npart = token; @@ -202,12 +266,14 @@ bool IDF3_COMP_OUTLINE_DATA::ReadPlaceData( std::ifstream &aBoardFile, if( !GetIDFString( iline, token, quoted, idx ) ) { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: no REFDES in PLACEMENT RECORD2\n"; - cerr << "* Line: '" << iline << "'\n"; - aBoardState = IDF3::FILE_INVALID; - return false; + ostringstream ostr; + + ostr << "invalid IDF file\n"; + ostr << "* violation: no REFDES in PLACEMENT RECORD2\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( CompareToken( "NOREFDES", token ) ) @@ -223,27 +289,36 @@ bool IDF3_COMP_OUTLINE_DATA::ReadPlaceData( std::ifstream &aBoardFile, } else if( CompareToken( "BOARD", token ) ) { - ERROR_IDF; - cerr << "unsupported feature\n"; - cerr << "* RefDes is 'BOARD', indicating this is a PANEL FILE (not supported)\n"; - aBoardState = IDF3::FILE_INVALID; - return false; + ostringstream ostr; + + ostr << "UNSUPPORTED FEATURE\n"; + ostr << "* RefDes is 'BOARD', indicating this is a PANEL FILE (not supported)\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } else if( CompareToken( "PANEL", token ) ) { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: RefDes in PLACEMENT RECORD2 is 'PANEL'\n"; - aBoardState = IDF3::FILE_INVALID; - return false; + ostringstream ostr; + + ostr << "invalid IDF file\n"; + ostr << "* violation: RefDes in PLACEMENT RECORD2 is 'PANEL'\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } else if( token.empty() ) { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: empty RefDes string in PLACEMENT RECORD2\n"; - aBoardState = IDF3::FILE_INVALID; - return false; + ostringstream ostr; + + ostr << "invalid IDF file\n"; + ostr << "* violation: empty RefDes string in PLACEMENT RECORD2\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } else { @@ -251,24 +326,31 @@ bool IDF3_COMP_OUTLINE_DATA::ReadPlaceData( std::ifstream &aBoardFile, refdes = token; } - // RECORD 3: X, Y, Z, ROT, SIDE (top/bot), PLACEMENT (placed, unplaced, mcad, ecad) + // V2: RECORD 3: X, Y, ROT, SIDE (top/bot), PLACEMENT (fixed, placed, unplaced) + // V3: RECORD 3: X, Y, Z, ROT, SIDE (top/bot), PLACEMENT (placed, unplaced, mcad, ecad) while( !FetchIDFLine( aBoardFile, iline, isComment, pos ) && aBoardFile.good() ); if( !aBoardFile.good() ) { - ERROR_IDF; - cerr << "problems reading PLACEMENT SECTION, RECORD 3\n"; - aBoardState = IDF3::FILE_INVALID; - return false; + ostringstream ostr; + + ostr << "invalid IDF file\n"; + ostr << "* problems reading PLACEMENT SECTION, RECORD 3\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( isComment ) { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: comment within a section (PLACEMENT)\n"; - aBoardState = IDF3::FILE_INVALID; - return false; + ostringstream ostr; + + ostr << "invalid IDF file\n"; + ostr << "* violation: comment within PLACEMENT section\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } idx = 0; @@ -276,11 +358,14 @@ bool IDF3_COMP_OUTLINE_DATA::ReadPlaceData( std::ifstream &aBoardFile, if( quoted ) { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: X value must not be in quotes (PLACEMENT RECORD 3)\n"; - aBoardState = IDF3::FILE_INVALID; - return false; + ostringstream ostr; + + ostr << "invalid IDF file\n"; + ostr << "* violation: X value must not be in quotes (PLACEMENT RECORD 3)\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } istringstream istr; @@ -289,20 +374,26 @@ bool IDF3_COMP_OUTLINE_DATA::ReadPlaceData( std::ifstream &aBoardFile, istr >> xoff; if( istr.fail() ) { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: X value is not numeric (PLACEMENT RECORD 3)\n"; - aBoardState = IDF3::FILE_INVALID; - return false; + ostringstream ostr; + + ostr << "invalid IDF file\n"; + ostr << "* violation: X value is not numeric (PLACEMENT RECORD 3)\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( !GetIDFString( iline, token, quoted, idx ) ) { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: no Y value in PLACEMENT RECORD 3\n"; - aBoardState = IDF3::FILE_INVALID; - return false; + ostringstream ostr; + + ostr << "invalid IDF file\n"; + ostr << "* violation: no Y value (PLACEMENT RECORD 3)\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } istr.clear(); @@ -311,42 +402,57 @@ bool IDF3_COMP_OUTLINE_DATA::ReadPlaceData( std::ifstream &aBoardFile, istr >> yoff; if( istr.fail() ) { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: Y value is not numeric (PLACEMENT RECORD 3)\n"; - aBoardState = IDF3::FILE_INVALID; - return false; + ostringstream ostr; + + ostr << "invalid IDF file\n"; + ostr << "* violation: Y value is not numeric (PLACEMENT RECORD 3)\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); + } + + if( aIdfVersion > IDF_V2 ) + { + if( !GetIDFString( iline, token, quoted, idx ) ) + { + ostringstream ostr; + + ostr << "invalid IDFv3 file\n"; + ostr << "* violation: no Z value (PLACEMENT RECORD 3)\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); + } + + istr.clear(); + istr.str( token ); + + istr >> zoff; + if( istr.fail() ) + { + ostringstream ostr; + + ostr << "invalid IDFv3 file\n"; + ostr << "* violation: Z value is not numeric (PLACEMENT RECORD 3)\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); + } } if( !GetIDFString( iline, token, quoted, idx ) ) { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: no Z value in PLACEMENT RECORD 3\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + ostringstream ostr; - istr.clear(); - istr.str( token ); + ostr << "invalid IDF file\n"; + ostr << "* violation: no rotation value (PLACEMENT RECORD 3)\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; - istr >> zoff; - if( istr.fail() ) - { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: Z value is not numeric (PLACEMENT RECORD 3)\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } - - if( !GetIDFString( iline, token, quoted, idx ) ) - { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: no rotation value in PLACEMENT RECORD 3\n"; - aBoardState = IDF3::FILE_INVALID; - return false; + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } istr.clear(); @@ -355,20 +461,26 @@ bool IDF3_COMP_OUTLINE_DATA::ReadPlaceData( std::ifstream &aBoardFile, istr >> aoff; if( istr.fail() ) { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: rotation value is not numeric (PLACEMENT RECORD 3)\n"; - aBoardState = IDF3::FILE_INVALID; - return false; + ostringstream ostr; + + ostr << "invalid IDF file\n"; + ostr << "* violation: rotation value is not numeric (PLACEMENT RECORD 3)\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( !GetIDFString( iline, token, quoted, idx ) ) { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: no SIDE value in PLACEMENT RECORD 3\n"; - aBoardState = IDF3::FILE_INVALID; - return false; + ostringstream ostr; + + ostr << "invalid IDF file\n"; + ostr << "* violation: no SIDE value (PLACEMENT RECORD 3)\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( CompareToken( "TOP", token ) ) @@ -381,21 +493,27 @@ bool IDF3_COMP_OUTLINE_DATA::ReadPlaceData( std::ifstream &aBoardFile, } else { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: SIDE value in PLACEMENT RECORD 3 is invalid ('"; - cerr << token << "')\n"; - aBoardState = IDF3::FILE_INVALID; - return false; + ostringstream ostr; + + ostr << "invalid IDF file\n"; + ostr << "* violation: invalid SIDE value in PLACEMENT RECORD 3 ('"; + ostr << token << "'); must be one of TOP/BOTTOM\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( !GetIDFString( iline, token, quoted, idx ) ) { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: no PLACEMENT value in PLACEMENT RECORD 3\n"; - aBoardState = IDF3::FILE_INVALID; - return false; + ostringstream ostr; + + ostr << "invalid IDF file\n"; + ostr << "* violation: no PLACEMENT value in PLACEMENT RECORD 3\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( CompareToken( "PLACED", token ) ) @@ -406,27 +524,37 @@ bool IDF3_COMP_OUTLINE_DATA::ReadPlaceData( std::ifstream &aBoardFile, { placement = IDF3::PS_UNPLACED; } - else if( CompareToken( "MCAD", token ) ) + else if( aIdfVersion > IDF_V2 && CompareToken( "MCAD", token ) ) { placement = IDF3::PS_MCAD; } - else if( CompareToken( "ECAD", token ) ) + else if( aIdfVersion > IDF_V2 && CompareToken( "ECAD", token ) ) { placement = IDF3::PS_ECAD; } + else if( aIdfVersion < IDF_V3 && CompareToken( "FIXED", token ) ) + { + if( aBoard->GetCadType() == CAD_ELEC ) + placement = IDF3::PS_MCAD; + else + placement = IDF3::PS_ECAD; + } else { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: PLACEMENT value in PLACEMENT RECORD 3 is invalid ('"; - cerr << token << "')\n"; - aBoardState = IDF3::FILE_INVALID; - return false; + ostringstream ostr; + + ostr << "invalid IDF file\n"; + ostr << "* violation: invalid PLACEMENT value ('"; + ostr << token << "') in PLACEMENT RECORD 3\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } outline = aBoard->GetComponentOutline( uid ); - if( outline == NULL ) + if( outline == NULL && !aNoSubstituteOutlines ) { ERROR_IDF << "MISSING OUTLINE\n"; cerr << "* GeomName( " << ngeom << " ), PartName( " << npart << " )\n"; @@ -434,18 +562,15 @@ bool IDF3_COMP_OUTLINE_DATA::ReadPlaceData( std::ifstream &aBoardFile, outline = aBoard->GetInvalidOutline( ngeom, npart ); if( outline == NULL ) - { - ERROR_IDF << "cannot create outline object\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "\n* missing outline: cannot create default" ) ); } if( aBoard->GetUnit() == IDF3::UNIT_THOU ) { - xoff *= IDF_MM_TO_THOU; - yoff *= IDF_MM_TO_THOU; - zoff *= IDF_MM_TO_THOU; + xoff *= IDF_THOU_TO_MM; + yoff *= IDF_THOU_TO_MM; + zoff *= IDF_THOU_TO_MM; } parent = aBoard->FindComponent( refdes ); @@ -456,10 +581,10 @@ bool IDF3_COMP_OUTLINE_DATA::ReadPlaceData( std::ifstream &aBoardFile, if( cp == NULL ) { - ERROR_IDF << "cannot create component object\n"; - aBoardState = IDF3::FILE_INVALID; outline = NULL; - return false; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "cannot create component object" ) ); } cp->SetRefDes( refdes ); @@ -483,12 +608,17 @@ bool IDF3_COMP_OUTLINE_DATA::ReadPlaceData( std::ifstream &aBoardFile, { if( side != tL ) { - ERROR_IDF << "inconsistent PLACEMENT data\n"; - cerr << "* SIDE value has changed from " << GetLayerString( tL ); - cerr << " to " << GetLayerString( side ) << "\n"; - aBoardState = IDF3::FILE_INVALID; outline = NULL; - return false; + ostringstream ostr; + + ostr << "invalid IDF file\n"; + ostr << "* violation: inconsistent PLACEMENT data; "; + ostr << "* SIDE value has changed from " << GetLayerString( tL ); + ostr << " to " << GetLayerString( side ) << "\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } xoff -= tX; @@ -507,13 +637,18 @@ bool IDF3_COMP_OUTLINE_DATA::ReadPlaceData( std::ifstream &aBoardFile, if( placement != parent->GetPlacement() ) { - ERROR_IDF << "inconsistent PLACEMENT data\n"; - cerr << "* placement value has changed from " << GetPlacementString( parent->GetPlacement() ); - cerr << " to " << GetPlacementString( placement ) << "\n"; - cerr << "* line: '" << iline << "'\n"; - aBoardState = IDF3::FILE_INVALID; outline = NULL; - return false; + ostringstream ostr; + + ostr << "invalid IDF file\n"; + ostr << "* violation: inconsistent PLACEMENT data; "; + ostr << "* PLACEMENT value has changed from "; + ostr << GetPlacementString( parent->GetPlacement() ); + ostr << " to " << GetPlacementString( placement ) << "\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* file position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } } @@ -521,34 +656,33 @@ bool IDF3_COMP_OUTLINE_DATA::ReadPlaceData( std::ifstream &aBoardFile, // copy internal data to a new object and push it into the component's outline list IDF3_COMP_OUTLINE_DATA* cdp = new IDF3_COMP_OUTLINE_DATA; *cdp = *this; - outline->IncrementRef(); + if( outline ) outline->incrementRef(); outline = NULL; if( !parent->AddOutlineData( cdp ) ) { - ERROR_IDF << "could not add outline data object\n"; - aBoardState = IDF3::FILE_INVALID; delete cdp; - return false; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "could not add outline data object" ) ); } return true; -} +} // IDF3_COMP_OUTLINE_DATA::readPlaceData -bool IDF3_COMP_OUTLINE_DATA::WritePlaceData( std::ofstream& aBoardFile, + +void IDF3_COMP_OUTLINE_DATA::writePlaceData( std::ofstream& aBoardFile, double aXpos, double aYpos, double aAngle, const std::string aRefDes, IDF3::IDF_PLACEMENT aPlacement, IDF3::IDF_LAYER aSide ) { if( outline == NULL ) - return true; + return; if( outline->GetUID().empty() ) - { - ERROR_IDF << "invalid GEOM/PART names\n"; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "empty GEOM and PART names" ) ); if( aPlacement == PS_INVALID ) { @@ -558,8 +692,11 @@ bool IDF3_COMP_OUTLINE_DATA::WritePlaceData( std::ofstream& aBoardFile, if( aSide != LYR_TOP && aSide != LYR_BOTTOM ) { - ERROR_IDF << "invalid side (" << aSide << "); must be TOP or BOTTOM\n"; - return false; + ostringstream ostr; + ostr << "\n* invalid side (" << GetLayerString( aSide ) << "); "; + ostr << "must be TOP or BOTTOM\n"; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } // calculate the final position based on layer @@ -602,8 +739,8 @@ bool IDF3_COMP_OUTLINE_DATA::WritePlaceData( std::ofstream& aBoardFile, } else { - aBoardFile << setiosflags(ios::fixed) << setprecision(1) << (xpos / IDF_MM_TO_THOU) << " " - << (ypos / IDF_MM_TO_THOU) << " " << (zoff / IDF_MM_TO_THOU) << " " + aBoardFile << setiosflags(ios::fixed) << setprecision(1) << (xpos / IDF_THOU_TO_MM) << " " + << (ypos / IDF_THOU_TO_MM) << " " << (zoff / IDF_THOU_TO_MM) << " " << setprecision(3) << ang << " "; } @@ -628,7 +765,7 @@ bool IDF3_COMP_OUTLINE_DATA::WritePlaceData( std::ofstream& aBoardFile, break; } - return !aBoardFile.fail(); + return; } @@ -638,19 +775,6 @@ bool IDF3_COMP_OUTLINE_DATA::WritePlaceData( std::ofstream& aBoardFile, * This represents a component and its associated * IDF outlines and ancillary data (position, etc) */ -IDF3_COMPONENT::IDF3_COMPONENT() -{ - xpos = 0.0; - ypos = 0.0; - angle = 0.0; - parent = NULL; - - hasPosition = false; - placement = PS_INVALID; - layer = LYR_INVALID; - return; -} - IDF3_COMPONENT::IDF3_COMPONENT( IDF3_BOARD* aParent ) { xpos = 0.0; @@ -692,6 +816,73 @@ IDF3_COMPONENT::~IDF3_COMPONENT() return; } +#ifndef DISABLE_IDF_OWNERSHIP +bool IDF3_COMPONENT::checkOwnership( int aSourceLine, const char* aSourceFunc ) +{ + if( !parent ) + { + ostringstream ostr; + ostr << __FILE__ << ":" << aSourceLine << ":" << aSourceFunc << "():\n"; + ostr << "\n* BUG: parent not set"; + errormsg = ostr.str(); + + return false; + } + + IDF3::CAD_TYPE pcad = parent->GetCadType(); + + switch( placement ) + { + case PS_UNPLACED: + case PS_PLACED: + case PS_INVALID: + break; + + case PS_MCAD: + + if( pcad != CAD_MECH ) + { + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "():\n"; + ostr << "\n* ownership violation; internal CAD type (MCAD) conflicts with PLACEMENT ("; + ostr << GetPlacementString( placement ) << ")"; + errormsg = ostr.str(); + + return false; + } + break; + + case PS_ECAD: + + if( pcad != CAD_ELEC ) + { + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "():\n"; + ostr << "\n* ownership violation; internal CAD type (MCAD) conflicts with PLACEMENT ("; + ostr << GetPlacementString( placement ) << ")"; + errormsg = ostr.str(); + + return false; + } + break; + + default: + do{ + ostringstream ostr; + ostr << "\n* BUG: unhandled internal placement value (" << placement << ")"; + errormsg = ostr.str(); + + return false; + } while( 0 ); + + break; + } + + return true; +} +#endif + + void IDF3_COMPONENT::SetParent( IDF3_BOARD* aParent ) { parent = aParent; @@ -714,19 +905,29 @@ IDF3::IDF_UNIT IDF3_COMPONENT::GetUnit( void ) return UNIT_INVALID; } - bool IDF3_COMPONENT::SetRefDes( const std::string& aRefDes ) { +#ifndef DISABLE_IDF_OWNERSHIP + if( !checkOwnership( __LINE__, __FUNCTION__ ) ) + return false; +#endif + if( aRefDes.empty() ) { - ERROR_IDF << "invalid RefDes (empty)\n"; + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "(): invalid RefDes (empty)"; + errormsg = ostr.str(); + return false; } if( CompareToken( "PANEL", aRefDes ) ) { - ERROR_IDF; - cerr << "\n*BUG: PANEL is a reserved designator and may not be used by components\n"; + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "():\n"; + ostr << "* BUG: PANEL is a reserved designator and may not be used by components"; + errormsg = ostr.str(); + return false; } @@ -734,6 +935,7 @@ bool IDF3_COMPONENT::SetRefDes( const std::string& aRefDes ) return true; } + const std::string& IDF3_COMPONENT::GetRefDes( void ) { return refdes; @@ -755,6 +957,7 @@ IDF_DRILL_DATA* IDF3_COMPONENT::AddDrill( double aDia, double aXpos, double aYpo return dp; } + IDF_DRILL_DATA* IDF3_COMPONENT::AddDrill( IDF_DRILL_DATA* aDrilledHole ) { if( !aDrilledHole ) @@ -763,14 +966,14 @@ IDF_DRILL_DATA* IDF3_COMPONENT::AddDrill( IDF_DRILL_DATA* aDrilledHole ) if( CompareToken( "PANEL", refdes ) ) { ERROR_IDF; - cerr << "\n*BUG: PANEL drills not supported\n"; + cerr << "\n* BUG: PANEL drills not supported at component level\n"; return NULL; } if( refdes.compare( aDrilledHole->GetDrillRefDes() ) ) { ERROR_IDF; - cerr << "\n*BUG: pushing an incorrect REFDES ('" << aDrilledHole->GetDrillRefDes(); + cerr << "\n* BUG: pushing an incorrect REFDES ('" << aDrilledHole->GetDrillRefDes(); cerr << "') to component ('" << refdes << "')\n"; return NULL; } @@ -783,11 +986,16 @@ IDF_DRILL_DATA* IDF3_COMPONENT::AddDrill( IDF_DRILL_DATA* aDrilledHole ) bool IDF3_COMPONENT::DelDrill( double aDia, double aXpos, double aYpos ) { +#ifndef DISABLE_IDF_OWNERSHIP + if( !checkOwnership( __LINE__, __FUNCTION__ ) ) + return false; +#endif + + errormsg.clear(); + if( drills.empty() ) return false; - // XXX - throw on ownership violation - bool val = false; list< IDF_DRILL_DATA* >::iterator itS = drills.begin(); @@ -810,13 +1018,19 @@ bool IDF3_COMPONENT::DelDrill( double aDia, double aXpos, double aYpos ) return val; } + bool IDF3_COMPONENT::DelDrill( IDF_DRILL_DATA* aDrill ) { +#ifndef DISABLE_IDF_OWNERSHIP + if( !checkOwnership( __LINE__, __FUNCTION__ ) ) + return false; +#endif + + errormsg.clear(); + if( drills.empty() ) return false; - // XXX - throw on ownership violation - list< IDF_DRILL_DATA* >::iterator itS = drills.begin(); list< IDF_DRILL_DATA* >::iterator itE = drills.end(); @@ -842,7 +1056,14 @@ const std::list< IDF_DRILL_DATA* >*const IDF3_COMPONENT::GetDrills( void ) bool IDF3_COMPONENT::AddOutlineData( IDF3_COMP_OUTLINE_DATA* aComponentOutline ) { if( aComponentOutline == NULL ) + { + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "(): invalid aComponentOutline (NULL)"; + errormsg = ostr.str(); + return false; + } + components.push_back( aComponentOutline ); @@ -851,8 +1072,30 @@ bool IDF3_COMPONENT::AddOutlineData( IDF3_COMP_OUTLINE_DATA* aComponentOutline ) bool IDF3_COMPONENT::DeleteOutlineData( IDF3_COMP_OUTLINE_DATA* aComponentOutline ) { - if( components.empty() || aComponentOutline == NULL ) +#ifndef DISABLE_IDF_OWNERSHIP + if( !checkOwnership( __LINE__, __FUNCTION__ ) ) return false; +#endif + + if( components.empty() ) + { + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "(): component list is empty"; + errormsg = ostr.str(); + + return false; + } + + if( aComponentOutline == NULL ) + { + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "(): invalid aComponentOutline (NULL)"; + errormsg = ostr.str(); + + return false; + } + + errormsg.clear(); std::list< IDF3_COMP_OUTLINE_DATA* >::iterator itS = components.begin(); std::list< IDF3_COMP_OUTLINE_DATA* >::iterator itE = components.end(); @@ -874,8 +1117,20 @@ bool IDF3_COMPONENT::DeleteOutlineData( IDF3_COMP_OUTLINE_DATA* aComponentOutlin bool IDF3_COMPONENT::DeleteOutlineData( size_t aIndex ) { - if( aIndex >= components.size() ) +#ifndef DISABLE_IDF_OWNERSHIP + if( !checkOwnership( __LINE__, __FUNCTION__ ) ) return false; +#endif + + if( aIndex >= components.size() ) + { + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "():\n"; + ostr << "* aIndex (" << aIndex << ") out of range; list size is " << components.size(); + errormsg = ostr.str(); + + return false; + } std::list< IDF3_COMP_OUTLINE_DATA* >::iterator itS = components.begin(); std::list< IDF3_COMP_OUTLINE_DATA* >::iterator itE = components.end(); @@ -910,6 +1165,8 @@ const std::list< IDF3_COMP_OUTLINE_DATA* >*const IDF3_COMPONENT::GetOutlinesData bool IDF3_COMPONENT::GetPosition( double& aXpos, double& aYpos, double& aAngle, IDF3::IDF_LAYER& aLayer ) { + errormsg.clear(); + if( !hasPosition ) { aXpos = 0.0; @@ -928,6 +1185,13 @@ bool IDF3_COMPONENT::GetPosition( double& aXpos, double& aYpos, double& aAngle, bool IDF3_COMPONENT::SetPosition( double aXpos, double aYpos, double aAngle, IDF3::IDF_LAYER aLayer ) { +#ifndef DISABLE_IDF_OWNERSHIP + if( !checkOwnership( __LINE__, __FUNCTION__ ) ) + return false; +#endif + + errormsg.clear(); + switch( aLayer ) { case LYR_TOP: @@ -935,8 +1199,14 @@ bool IDF3_COMPONENT::SetPosition( double aXpos, double aYpos, double aAngle, IDF break; default: - ERROR_IDF << "invalid side (must be TOP or BOTTOM only): " << aLayer << "\n"; - return false; + do{ + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "():\n"; + ostr << "\n* invalid side (must be TOP or BOTTOM only): " << GetLayerString( aLayer ); + errormsg = ostr.str(); + + return false; + } while( 0 ); break; } @@ -958,17 +1228,29 @@ IDF3::IDF_PLACEMENT IDF3_COMPONENT::GetPlacement( void ) } -void IDF3_COMPONENT::SetPlacement( IDF3::IDF_PLACEMENT aPlacementValue ) +bool IDF3_COMPONENT::SetPlacement( IDF3::IDF_PLACEMENT aPlacementValue ) { - // XXX - throw on ownership violation or invalid placement value if( aPlacementValue < PS_UNPLACED || aPlacementValue >= PS_INVALID ) - return; + { + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "():\n"; + ostr << "\n* invalid PLACEMENT value (" << aPlacementValue << ")"; + errormsg = ostr.str(); + + return false; + } + +#ifndef DISABLE_IDF_OWNERSHIP + if( !checkOwnership( __LINE__, __FUNCTION__ ) ) + return false; +#endif placement = aPlacementValue; - return; + + return true; } -bool IDF3_COMPONENT::WriteDrillData( std::ofstream& aBoardFile ) +bool IDF3_COMPONENT::writeDrillData( std::ofstream& aBoardFile ) { if( drills.empty() ) return true; @@ -978,16 +1260,15 @@ bool IDF3_COMPONENT::WriteDrillData( std::ofstream& aBoardFile ) while( itS != itE ) { - if( !(*itS)->Write( aBoardFile, GetUnit() ) ) - return false; - + (*itS)->write( aBoardFile, GetUnit() ); ++itS; } return true; } -bool IDF3_COMPONENT::WritePlaceData( std::ofstream& aBoardFile ) + +bool IDF3_COMPONENT::writePlaceData( std::ofstream& aBoardFile ) { if( components.empty() ) return true; @@ -997,9 +1278,7 @@ bool IDF3_COMPONENT::WritePlaceData( std::ofstream& aBoardFile ) while( itS != itE ) { - if( !(*itS)->WritePlaceData( aBoardFile, xpos, ypos, angle, refdes, placement, layer ) ) - return false; - + (*itS)->writePlaceData( aBoardFile, xpos, ypos, angle, refdes, placement, layer ); ++itS; } @@ -1009,6 +1288,7 @@ bool IDF3_COMPONENT::WritePlaceData( std::ofstream& aBoardFile ) IDF3_BOARD::IDF3_BOARD( IDF3::CAD_TYPE aCadType ) { + idfVer = IDF_V3; state = FILE_START; cadType = aCadType; userPrec = 5; @@ -1021,8 +1301,8 @@ IDF3_BOARD::IDF3_BOARD( IDF3::CAD_TYPE aCadType ) // unlike other outlines which are created as necessary, // the board outline always exists and its parent must // be set here - olnBoard.SetParent( this ); - olnBoard.SetThickness( 1.6 ); + olnBoard.setParent( this ); + olnBoard.setThickness( 1.6 ); return; } @@ -1034,6 +1314,51 @@ IDF3_BOARD::~IDF3_BOARD() return; } +#ifndef DISABLE_IDF_OWNERSHIP +bool IDF3_BOARD::checkComponentOwnership( int aSourceLine, const char* aSourceFunc, + IDF3_COMPONENT* aComponent ) +{ + if( !aComponent ) + { + ostringstream ostr; + ostr << __FILE__ << ":" << aSourceLine << ":" << aSourceFunc; + ostr << "(): Invalid component pointer (NULL)"; + errormsg = ostr.str(); + + return false; + } + + IDF3::IDF_PLACEMENT place = aComponent->GetPlacement(); + + if( place == PS_PLACED || place == PS_UNPLACED ) + return true; + + if( place == PS_MCAD && cadType == CAD_MECH ) + return true; + + if( place == PS_ECAD && cadType == CAD_ELEC ) + return true; + + do + { + ostringstream ostr; + ostr << "* " << __FILE__ << ":" << aSourceLine << ":" << aSourceFunc << "():\n"; + ostr << "* ownership violation; CAD type is "; + + if( cadType == CAD_MECH ) + ostr << "MCAD "; + else + ostr << "ECAD "; + + ostr << "while outline owner is " << GetPlacementString( place ) << "\n"; + errormsg = ostr.str(); + + } while( 0 ); + + return false; +} +#endif + IDF3::CAD_TYPE IDF3_BOARD::GetCadType( void ) { return cadType; @@ -1059,9 +1384,22 @@ bool IDF3_BOARD::setUnit( IDF3::IDF_UNIT aUnit, bool convert ) unit = aUnit; break; + case UNIT_TNM: + ERROR_IDF << "\n* TNM unit is not supported; defaulting to mm\n"; + unit = UNIT_MM; + break; + default: - ERROR_IDF << "invalid board unit\n"; - return false; + do + { + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "():\n"; + ostr << "* invalid board unit (" << aUnit << ")"; + errormsg = ostr.str(); + + return false; + } while( 0 ); + break; } @@ -1190,11 +1528,21 @@ bool IDF3_BOARD::SetBoardThickness( double aBoardThickness ) { if( aBoardThickness <= 0.0 ) { - ERROR_IDF << "board thickness must be > 0\n"; + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "(): "; + ostr << "board thickness (" << aBoardThickness << ") must be > 0"; + errormsg = ostr.str(); + return false; } - return olnBoard.SetThickness( aBoardThickness ); + if(! olnBoard.SetThickness( aBoardThickness ) ) + { + errormsg = olnBoard.GetError(); + return false; + } + + return true; } @@ -1205,77 +1553,57 @@ double IDF3_BOARD::GetBoardThickness( void ) // read the DRILLED HOLES section -bool IDF3_BOARD::readBrdDrills( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBoardState ) +void IDF3_BOARD::readBrdDrills( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBoardState ) { IDF_DRILL_DATA drill; - while( drill.Read( aBoardFile, unit, aBoardState ) ) + while( drill.read( aBoardFile, unit, aBoardState, idfVer ) ) { - if( CompareToken( "PANEL", drill.GetDrillRefDes() ) ) - { - ERROR_IDF; - cerr << "\n[INFO]: Dropping unsupported drill refdes: 'PANEL' (not supported)\n"; - continue; - } - IDF_DRILL_DATA *dp = new IDF_DRILL_DATA; *dp = drill; + if( AddDrill( dp ) == NULL ) { delete dp; - ERROR_IDF; - cerr << "\n* BUG: could not add drill data; cannot continue reading the file\n"; - aBoardState = FILE_INVALID; - return false; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "\n* BUG: could not add drill data; cannot continue reading the file" ) ); } } - if( errno == 0 && aBoardState != IDF3::FILE_INVALID ) - return true; - - return false; - + return; } // read the NOTES section -bool IDF3_BOARD::readBrdNotes( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBoardState ) +void IDF3_BOARD::readBrdNotes( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBoardState ) { IDF_NOTE note; - while( note.ReadNote( aBoardFile, aBoardState, unit ) ) + while( note.readNote( aBoardFile, aBoardState, unit ) ) { IDF_NOTE *np = new IDF_NOTE; *np = note; notes.push_back( np ); } - if( errno == 0 && aBoardState != IDF3::FILE_INVALID ) - return true; - - return false; + return; } // read the component placement section -bool IDF3_BOARD::readBrdPlacement( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBoardState ) +void IDF3_BOARD::readBrdPlacement( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBoardState, bool aNoSubstituteOutlines ) { IDF3_COMP_OUTLINE_DATA oldata; - while( oldata.ReadPlaceData( aBoardFile, aBoardState, this ) ); - - if( errno == 0 && aBoardState != IDF3::FILE_INVALID ) - return true; - - ERROR_IDF << "problems reading board PLACEMENT section\n"; - - return false; + while( oldata.readPlaceData( aBoardFile, aBoardState, this, idfVer, aNoSubstituteOutlines ) ); + return; } // read the board HEADER -bool IDF3_BOARD::readBrdHeader( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBoardState ) +void IDF3_BOARD::readBrdHeader( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBoardState ) { std::string iline; // the input line bool isComment; // true if a line just read in is a comment line @@ -1288,30 +1616,19 @@ bool IDF3_BOARD::readBrdHeader( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBo while( !FetchIDFLine( aBoardFile, iline, isComment, pos ) && aBoardFile.good() ); if( !aBoardFile.good() ) - { - ERROR_IDF; - cerr << "problems reading board header\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "problems reading board header" ) ); if( isComment ) - { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: first line must be .HEADER\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF file\n" + "* Violation of specification: first line must be .HEADER\n" ) ); if( !CompareToken( ".HEADER", iline ) ) - { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: first line must be .HEADER and have no quotes or trailing text\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF file\n" + "* Violation of specification:\n" + "* first line must be .HEADER and have no quotes or trailing text" ) ); // RECORD 2: // File Type [str]: BOARD_FILE (PANEL_FILE not supported) @@ -1322,109 +1639,83 @@ bool IDF3_BOARD::readBrdHeader( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBo while( !FetchIDFLine( aBoardFile, iline, isComment, pos ) && aBoardFile.good() ); if( !aBoardFile.good() ) - { - ERROR_IDF; - cerr << "problems reading board header, RECORD 2\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "problems reading board header, RECORD 2" ) ); if( isComment ) - { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: comment within .HEADER section\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF file\n" + "* Violation of specification: comment within .HEADER section" ) ); idx = 0; GetIDFString( iline, token, quoted, idx ); if( quoted ) - { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: File Type in HEADER section must not be in quotes\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF file\n" + "* Violation of specification:\n" + "* File Type in HEADER section must not be in quotes" ) ); if( !CompareToken( "BOARD_FILE", token ) ) { ERROR_IDF; if( CompareToken( "PANEL_FILE", token ) ) - { - cerr << "not a board file\n"; - cerr << "* PANEL_FILE is not supported (expecting BOARD_FILE)\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "not a board file\n" + "* PANEL_FILE is not supported (expecting BOARD_FILE)" ) ); else - { - cerr << "invalid IDFv3 file\n"; - cerr << "* Expecting string: BOARD_FILE\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF file\n" + "* Expecting string: BOARD_FILE" ) ); } if( !GetIDFString( iline, token, quoted, idx ) ) - { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification for HEADER section, RECORD 2: no FIELD 2\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF file\n" + "* Violation of specification: HEADER section, RECORD 2: no FIELD 2" ) ); if( quoted ) - { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: IDF Version must not be in quotes\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF file\n" + "* Violation of specification: IDF Version must not be in quotes" ) ); - if( token.compare( "3.0" ) && token.compare( "3." ) && token.compare( "3" ) ) + if( !token.compare( "3.0" ) || !token.compare( "3." ) || !token.compare( "3" ) ) + idfVer = IDF_V3; + else if( !token.compare( "2.0" ) || !token.compare( "2." ) || !token.compare( "2" ) ) + idfVer = IDF_V2; + else { - ERROR_IDF; - cerr << "unsupported IDF version\n"; - cerr << "* Expecting version to be one of '3.0', '3.', or '3' (value: '" << token << "')\n"; - aBoardState = IDF3::FILE_INVALID; - return false; + ostringstream ostr; + + ostr << "unsupported IDF version\n"; + ostr << "* Expecting version to be a variant of '3.0', '2.0' (value: '" << token << "')\n"; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( !GetIDFString( iline, token, quoted, idx ) ) - { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification for HEADER section, RECORD 2, FIELD 3: no Source System string\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF file\n" + "* Violation of specification:\n" + "* HEADER section, RECORD 2, FIELD 3: no Source System string" ) ); + brdSource = token; if( !GetIDFString( iline, token, quoted, idx ) ) - { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification for HEADER section, RECORD 2, FIELD 4: no Date string\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF file\n" + "* Violation of specification:\n" + "* HEADER section, RECORD 2, FIELD 4: no Date string" ) ); + brdDate = token; if( !GetIDFString( iline, token, quoted, idx ) ) - { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification for HEADER section, RECORD 2, FIELD 5: no Board File Version number\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF file\n" + "* Violation of specification:\n" + "* HEADER section, RECORD 2, FIELD 5: no Board File Version number" ) ); + std::istringstream istr; istr.str( token ); @@ -1438,13 +1729,10 @@ bool IDF3_BOARD::readBrdHeader( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBo } if( quoted ) - { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: HEADER section, RECORD 2, FIELD 5: Board File Version must not be in quotes\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF file\n" + "* Violation of specification:\n" + "* HEADER section, RECORD 2, FIELD 5: Board File Version must not be in quotes" ) ); // RECORD 3: // Board Name [str]: stored @@ -1452,21 +1740,13 @@ bool IDF3_BOARD::readBrdHeader( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBo while( !FetchIDFLine( aBoardFile, iline, isComment, pos ) && aBoardFile.good() ); if( !aBoardFile.good() ) - { - ERROR_IDF; - cerr << "problems reading board header, RECORD 2\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "\n* problems reading board header, RECORD 2" ) ); if( isComment ) - { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: comment within .HEADER section\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF file\n" + "* Violation of specification: comment within .HEADER section" ) ); idx = 0; GetIDFString( iline, token, quoted, idx ); @@ -1474,22 +1754,16 @@ bool IDF3_BOARD::readBrdHeader( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBo boardName = token; if( !GetIDFString( iline, token, quoted, idx ) ) - { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification for HEADER section, RECORD 3, FIELD 1: no Board Name\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF file\n" + "* Violation of specification:\n" + "* HEADER section, RECORD 3, FIELD 1: no Board Name" ) ); if( quoted ) - { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: HEADER section, RECORD 3, FIELD 2: UNIT may not be in quotes\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF file\n" + "* Violation of specification:\n" + "* HEADER section, RECORD 3, FIELD 2: UNIT may not be in quotes" ) ); if( CompareToken( "MM", token ) ) { @@ -1499,13 +1773,18 @@ bool IDF3_BOARD::readBrdHeader( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBo { unit = IDF3::UNIT_THOU; } + else if( ( idfVer == IDF_V2 ) && CompareToken( "TNM", token ) ) + { + unit = IDF3::UNIT_TNM; + } else { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* HEADER section, RECORD 3, FIELD 2: expecting MM or THOU (got '" << token << "')\n"; - aBoardState = IDF3::FILE_INVALID; - return false; + ostringstream ostr; + + ostr << "invalid IDF file\n"; + ostr << "* HEADER section, RECORD 3, FIELD 2: expecting MM or THOU (got '" << token << "')\n"; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } olnBoard.SetUnit( unit ); @@ -1515,38 +1794,33 @@ bool IDF3_BOARD::readBrdHeader( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBo while( !FetchIDFLine( aBoardFile, iline, isComment, pos ) && aBoardFile.good() ); if( ( !aBoardFile.good() && !aBoardFile.eof() ) || iline.empty() ) - { - ERROR_IDF; - cerr << "problems reading board header, RECORD 4\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "problems reading board header, RECORD 4" ) ); if( isComment ) - { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: comment within .HEADER section\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF file\n" + "* Violation of specification: comment within .HEADER section\n" ) ); if( !CompareToken( ".END_HEADER", iline ) ) { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: expected .END_HEADER (got '" << iline << "')\n"; - aBoardState = IDF3::FILE_INVALID; - return false; + ostringstream ostr; + + ostr << "invalid IDF file\n"; + ostr << "* Violation of specification: expected .END_HEADER\n"; + ostr << "* line: '" << iline << "'"; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } aBoardState = IDF3::FILE_HEADER; - return true; + return; } // read individual board sections; pay attention to IDFv3 section specifications -bool IDF3_BOARD::readBrdSection( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBoardState ) +void IDF3_BOARD::readBrdSection( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBoardState, + bool aNoSubstituteOutlines ) { std::list< std::string > comments; // comments associated with a section @@ -1562,7 +1836,7 @@ bool IDF3_BOARD::readBrdSection( std::ifstream& aBoardFile, IDF3::FILE_STATE& aB // .PLACE_KEEPOUT // .PLACE_REGION // .DRILLED_HOLES - // .NOTES (NOT YET SUPPORTED: NOTES SECTION WILL BE SKIPPED FOR NOW) + // .NOTES // .PLACEMENT std::string iline; // the input line bool isComment; // true if a line just read in is a comment line @@ -1578,12 +1852,15 @@ bool IDF3_BOARD::readBrdSection( std::ifstream& aBoardFile, IDF3::FILE_STATE& aB if( !aBoardFile.good() ) { if( aBoardFile.eof() && aBoardState >= IDF3::FILE_HEADER && aBoardState < IDF3::FILE_INVALID ) - return true; + { + if( !comments.empty() ) + ERROR_IDF << "[warning]: trailing comments in IDF file (comments will be lost)\n"; - ERROR_IDF; - cerr << "problems reading board section\n"; - aBoardState = IDF3::FILE_INVALID; - return false; + return; + } + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "problems reading board section" ) ); } if( isComment ) @@ -1593,41 +1870,31 @@ bool IDF3_BOARD::readBrdSection( std::ifstream& aBoardFile, IDF3::FILE_STATE& aB } // This must be a header - if( !GetIDFString( iline, token, quoted, idx ) ) - { - ERROR_IDF; - cerr << "problems reading board section\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + GetIDFString( iline, token, quoted, idx ); if( quoted ) { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: quoted string where SECTION HEADER expected\n"; - aBoardState = IDF3::FILE_INVALID; - return false; + ostringstream ostr; + + ostr << "invalid IDF file\n"; + ostr << "* Violation of specification: quoted string where SECTION HEADER expected\n"; + ostr << "* line: '" << iline << "'"; + ostr << "* position: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( CompareToken( ".BOARD_OUTLINE", token ) ) { if( aBoardState != IDF3::FILE_HEADER ) { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: no HEADER section\n"; aBoardState = IDF3::FILE_INVALID; - return false; + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF file\n" + "* Violation of specification: no HEADER section" ) ); } - if( !olnBoard.ReadData( aBoardFile, iline ) ) - { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + olnBoard.readData( aBoardFile, iline, idfVer ); if( !comments.empty() ) { @@ -1642,47 +1909,28 @@ bool IDF3_BOARD::readBrdSection( std::ifstream& aBoardFile, IDF3::FILE_STATE& aB } aBoardState = IDF3::FILE_OUTLINE; - return true; + return; } if( CompareToken( ".PANEL_OUTLINE", token ) ) - { - ERROR_IDF; - cerr << "PANEL_OUTLINE not supported\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "PANEL_OUTLINE not supported" ) ); if( CompareToken( ".OTHER_OUTLINE", token ) ) { if( aBoardState != IDF3::FILE_OUTLINE ) - { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: expecting .BOARD_OUTLINE, have .OTHER_OUTLINE\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF file\n" + "* Violation of specification: expecting .BOARD_OUTLINE, have .OTHER_OUTLINE" ) ); - OTHER_OUTLINE* op = new OTHER_OUTLINE; + OTHER_OUTLINE* op = new OTHER_OUTLINE( this ); if( op == NULL ) - { - ERROR_IDF; - cerr << "could not create OTHER_OUTLINE object\n"; - aBoardState = IDF3::FILE_ERROR; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "could not create OTHER_OUTLINE object" ) ); op->SetUnit( unit ); - - if( !op->ReadData( aBoardFile, iline ) ) - { - ERROR_IDF; - cerr << "problems reading the OTHER_OUTLINE section\n"; - aBoardState = IDF3::FILE_ERROR; - return false; - } + op->readData( aBoardFile, iline, idfVer ); if( !comments.empty() ) { @@ -1698,47 +1946,36 @@ bool IDF3_BOARD::readBrdSection( std::ifstream& aBoardFile, IDF3::FILE_STATE& aB if( olnOther.insert( pair(op->GetOutlineIdentifier(), op) ).second == false ) { - ERROR_IDF; - cerr << "* Violation of specification. Non-unique ID in OTHER_OUTLINE '"; - cerr << op->GetOutlineIdentifier() << "'\n"; delete op; - aBoardState = IDF3::FILE_ERROR; - return false; + + ostringstream ostr; + ostr << "invalid IDF file\n"; + ostr << "* Violation of specification. Non-unique ID in OTHER_OUTLINE '"; + ostr << op->GetOutlineIdentifier() << "'\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* pos: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } - return true; + return; } if( CompareToken( ".ROUTE_OUTLINE", token ) ) { if( aBoardState != IDF3::FILE_OUTLINE ) - { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: expecting .BOARD_OUTLINE, have .ROUTE_OUTLINE\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF file\n" + "* Violation of specification: expecting .BOARD_OUTLINE, have .ROUTE_OUTLINE" ) ); - ROUTE_OUTLINE* op = new ROUTE_OUTLINE; + ROUTE_OUTLINE* op = new ROUTE_OUTLINE( this ); if( op == NULL ) - { - ERROR_IDF; - cerr << "could not create ROUTE_OUTLINE object\n"; - aBoardState = IDF3::FILE_ERROR; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "could not create ROUTE_OUTLINE object" ) ); op->SetUnit( unit ); - - if( !op->ReadData( aBoardFile, iline ) ) - { - ERROR_IDF; - cerr << "problems reading the ROUTE_OUTLINE section\n"; - aBoardState = IDF3::FILE_ERROR; - return false; - } + op->readData( aBoardFile, iline, idfVer ); if( !comments.empty() ) { @@ -1754,39 +1991,24 @@ bool IDF3_BOARD::readBrdSection( std::ifstream& aBoardFile, IDF3::FILE_STATE& aB olnRoute.push_back( op ); - return true; + return; } if( CompareToken( ".PLACE_OUTLINE", token ) ) { if( aBoardState != IDF3::FILE_OUTLINE ) - { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: expecting .BOARD_OUTLINE, have .PLACE_OUTLINE\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF file\n" + "* Violation of specification: expecting .BOARD_OUTLINE, have .PLACE_OUTLINE" ) ); - PLACE_OUTLINE* op = new PLACE_OUTLINE; + PLACE_OUTLINE* op = new PLACE_OUTLINE( this ); if( op == NULL ) - { - ERROR_IDF; - cerr << "could not create PLACE_OUTLINE object\n"; - aBoardState = IDF3::FILE_ERROR; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "could not create PLACE_OUTLINE object" ) ); op->SetUnit( unit ); - - if( !op->ReadData( aBoardFile, iline ) ) - { - ERROR_IDF; - cerr << "problems reading the PLACE_OUTLINE section\n"; - aBoardState = IDF3::FILE_ERROR; - return false; - } + op->readData( aBoardFile, iline, idfVer ); if( !comments.empty() ) { @@ -1802,39 +2024,24 @@ bool IDF3_BOARD::readBrdSection( std::ifstream& aBoardFile, IDF3::FILE_STATE& aB olnPlace.push_back( op ); - return true; + return; } if( CompareToken( ".ROUTE_KEEPOUT", token ) ) { if( aBoardState != IDF3::FILE_OUTLINE ) - { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: expecting .BOARD_OUTLINE, have .ROUTE_KEEPOUT\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF file\n" + "* Violation of specification: expecting .BOARD_OUTLINE, have .ROUTE_KEEPOUT" ) ); - ROUTE_KO_OUTLINE* op = new ROUTE_KO_OUTLINE; + ROUTE_KO_OUTLINE* op = new ROUTE_KO_OUTLINE( this ); if( op == NULL ) - { - ERROR_IDF; - cerr << "could not create ROUTE_KEEPOUT object\n"; - aBoardState = IDF3::FILE_ERROR; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "could not create ROUTE_KEEPOUT object" ) ); op->SetUnit( unit ); - - if( !op->ReadData( aBoardFile, iline ) ) - { - ERROR_IDF; - cerr << "problems reading the ROUTE_KEEPOUT section\n"; - aBoardState = IDF3::FILE_ERROR; - return false; - } + op->readData( aBoardFile, iline, idfVer ); if( !comments.empty() ) { @@ -1850,39 +2057,24 @@ bool IDF3_BOARD::readBrdSection( std::ifstream& aBoardFile, IDF3::FILE_STATE& aB olnRouteKeepout.push_back( op ); - return true; + return; } if( CompareToken( ".VIA_KEEPOUT", token ) ) { if( aBoardState != IDF3::FILE_OUTLINE ) - { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: expecting .BOARD_OUTLINE, have .VIA_KEEPOUT\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF file\n" + "* Violation of specification: expecting .BOARD_OUTLINE, have .VIA_KEEPOUT" ) ); - VIA_KO_OUTLINE* op = new VIA_KO_OUTLINE; + VIA_KO_OUTLINE* op = new VIA_KO_OUTLINE( this ); if( op == NULL ) - { - ERROR_IDF; - cerr << "could not create VIA_KEEPOUT object\n"; - aBoardState = IDF3::FILE_ERROR; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "could not create VIA_KEEPOUT object" ) ); op->SetUnit( unit ); - - if( !op->ReadData( aBoardFile, iline ) ) - { - ERROR_IDF; - cerr << "problems reading the VIA_KEEPOUT section\n"; - aBoardState = IDF3::FILE_ERROR; - return false; - } + op->readData( aBoardFile, iline, idfVer ); if( !comments.empty() ) { @@ -1898,39 +2090,24 @@ bool IDF3_BOARD::readBrdSection( std::ifstream& aBoardFile, IDF3::FILE_STATE& aB olnViaKeepout.push_back( op ); - return true; + return; } if( CompareToken( ".PLACE_KEEPOUT", token ) ) { if( aBoardState != IDF3::FILE_OUTLINE ) - { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: expecting .BOARD_OUTLINE, have .PLACE_KEEPOUT\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF file\n" + "* Violation of specification: expecting .BOARD_OUTLINE, have .PLACE_KEEPOUT" ) ); - PLACE_KO_OUTLINE* op = new PLACE_KO_OUTLINE; + PLACE_KO_OUTLINE* op = new PLACE_KO_OUTLINE( this ); if( op == NULL ) - { - ERROR_IDF; - cerr << "could not create PLACE_KEEPOUT object\n"; - aBoardState = IDF3::FILE_ERROR; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "could not create PLACE_KEEPOUT object" ) ); op->SetUnit( unit ); - - if( !op->ReadData( aBoardFile, iline ) ) - { - ERROR_IDF; - cerr << "problems reading the PLACE_KEEPOUT section\n"; - aBoardState = IDF3::FILE_ERROR; - return false; - } + op->readData( aBoardFile, iline, idfVer ); if( !comments.empty() ) { @@ -1946,39 +2123,24 @@ bool IDF3_BOARD::readBrdSection( std::ifstream& aBoardFile, IDF3::FILE_STATE& aB olnPlaceKeepout.push_back( op ); - return true; + return; } if( CompareToken( ".PLACE_REGION", token ) ) { if( aBoardState != IDF3::FILE_OUTLINE ) - { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: expecting .BOARD_OUTLINE, have .PLACE_REGION\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF file\n" + "* Violation of specification: expecting .BOARD_OUTLINE, have .PLACE_REGION" ) ); - GROUP_OUTLINE* op = new GROUP_OUTLINE; + GROUP_OUTLINE* op = new GROUP_OUTLINE( this ); if( op == NULL ) - { - ERROR_IDF; - cerr << "could not create PLACE_REGION object\n"; - aBoardState = IDF3::FILE_ERROR; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "could not create PLACE_REGION object" ) ); op->SetUnit( unit ); - - if( !op->ReadData( aBoardFile, iline ) ) - { - ERROR_IDF; - cerr << "problems reading the PLACE_REGION section\n"; - aBoardState = IDF3::FILE_ERROR; - return false; - } + op->readData( aBoardFile, iline, idfVer ); if( !comments.empty() ) { @@ -1994,28 +2156,17 @@ bool IDF3_BOARD::readBrdSection( std::ifstream& aBoardFile, IDF3::FILE_STATE& aB olnGroup.insert( pair(op->GetGroupName(), op) ); - return true; + return; } if( CompareToken( ".DRILLED_HOLES", token ) ) { if( aBoardState != IDF3::FILE_OUTLINE ) - { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: expecting .BOARD_OUTLINE, have .DRILLED_HOLES\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF file\n" + "* Violation of specification: expecting .BOARD_OUTLINE, have .DRILLED_HOLES" ) ); - if( !readBrdDrills( aBoardFile, aBoardState ) ) - { - if( !aBoardFile.good() || aBoardState == IDF3::FILE_INVALID ) - { - ERROR_IDF << "could not read board DRILLED HOLES section\n"; - return false; - } - } + readBrdDrills( aBoardFile, aBoardState ); if( !comments.empty() ) { @@ -2029,28 +2180,22 @@ bool IDF3_BOARD::readBrdSection( std::ifstream& aBoardFile, IDF3::FILE_STATE& aB } } - return true; + return; } if( CompareToken( ".NOTES", token ) ) { if( aBoardState != IDF3::FILE_OUTLINE ) - { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: expecting .BOARD_OUTLINE, have .NOTES\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF file\n" + "* Violation of specification: expecting .BOARD_OUTLINE, have .NOTES" ) ); - if( !readBrdNotes( aBoardFile, aBoardState ) ) - { - if( !aBoardFile.good() || aBoardState == IDF3::FILE_INVALID ) - { - ERROR_IDF << "could not read board NOTES section\n"; - return false; - } - } + if( idfVer < IDF_V3 ) + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDFv2 file\n" + "* Violation of specification: NOTES section not in specification" ) ); + + readBrdNotes( aBoardFile, aBoardState ); if( !comments.empty() ) { @@ -2064,28 +2209,17 @@ bool IDF3_BOARD::readBrdSection( std::ifstream& aBoardFile, IDF3::FILE_STATE& aB } } - return true; + return; } if( CompareToken( ".PLACEMENT", token ) ) { if( aBoardState != IDF3::FILE_OUTLINE ) - { - ERROR_IDF; - cerr << "invalid IDFv3 file\n"; - cerr << "* Violation of specification: expecting .BOARD_OUTLINE, have .PLACEMENT\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF file\n" + "* Violation of specification: expecting .BOARD_OUTLINE, have .PLACEMENT" ) ); - if( !readBrdPlacement( aBoardFile, aBoardState ) ) - { - if( !aBoardFile.good() || aBoardState == IDF3::FILE_INVALID ) - { - ERROR_IDF << "could not read board PLACEMENT section\n"; - return false; - } - } + readBrdPlacement( aBoardFile, aBoardState, aNoSubstituteOutlines ); if( !comments.empty() ) { @@ -2099,129 +2233,122 @@ bool IDF3_BOARD::readBrdSection( std::ifstream& aBoardFile, IDF3::FILE_STATE& aB } } - return true; + return; } } // while( aBoardFile.good() - if( !aBoardFile.good() ) - { - if( !aBoardFile.eof() || aBoardState < IDF3::FILE_OUTLINE || aBoardState >= IDF3::FILE_INVALID ) - { - ERROR_IDF; - cerr << "problems reading board section\n"; - aBoardState = IDF3::FILE_INVALID; - return false; - } - } - - return true; + return; } // readBrdSection() // read the board file data -bool IDF3_BOARD::readBoardFile( const std::string& aFileName ) +void IDF3_BOARD::readBoardFile( const std::string& aFileName, bool aNoSubstituteOutlines ) { std::ifstream brd; - brd.open( aFileName.c_str(), std::ios_base::in ); + brd.exceptions ( std::ifstream::badbit ); - if( !brd.is_open() ) + try { - ERROR_IDF; - cerr << "could not open file: '" << aFileName << "'\n"; - return false; - } + brd.open( aFileName.c_str(), std::ios_base::in ); - std::string iline; // the input line - bool isComment; // true if a line just read in is a comment line - std::streampos pos; - IDF3::FILE_STATE state = IDF3::FILE_START; - - // note: as per IDFv3 specification: - // "The Header section must be the first section in the file, the second - // section must be the Outline section, and the last section must be the - // Placement section. All other sections may be in any order." - - // further notes: Except for the HEADER section, sections may be preceeded by - // comment lines which will be copied back out on write(). No comments may - // be associated with the board file itself since the only logical location - // for unambiguous association is at the end of the file, which is inconvenient - // for large files. - - if( !readBrdHeader( brd, state ) ) - { - ERROR_IDF; - cerr << "could not find a valid header\n"; - brd.close(); - return false; - } - - // read the various sections - while( readBrdSection( brd, state ) && state != IDF3::FILE_PLACEMENT && !brd.eof() ); - - if( state == IDF3::FILE_INVALID ) - { - brd.close(); - ERROR_IDF; - cerr << "problems reading file: '" << aFileName << "'\n"; - return false; - } - - if( !brd.good() ) - { - // check if we have valid data - if( brd.eof() && state >= IDF3::FILE_OUTLINE && state < IDF3::FILE_INVALID ) + if( !brd.is_open() ) { - brd.close(); - return true; + ostringstream ostr; + ostr << "\n* could not open file: '" << aFileName << "'"; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } - brd.close(); - ERROR_IDF; - cerr << "problems reading file: '" << aFileName << "'\n"; - return false; - } + std::string iline; // the input line + bool isComment; // true if a line just read in is a comment line + std::streampos pos; + IDF3::FILE_STATE state = IDF3::FILE_START; - if( brd.good() && state == IDF3::FILE_PLACEMENT ) - { - // read in any trailing lines and report on ignored comments (minor fault) - // and any non-comment item (non-compliance with IDFv3) - while( brd.good() ) + // note: as per IDFv3 specification: + // "The Header section must be the first section in the file, the second + // section must be the Outline section, and the last section must be the + // Placement section. All other sections may be in any order." + + // further notes: Except for the HEADER section, sections may be preceeded by + // comment lines which will be copied back out on write(). No comments may + // be associated with the board file itself since the only logical location + // for unambiguous association is at the end of the file, which is inconvenient + // for large files. + + readBrdHeader( brd, state ); + + // read the various sections + while( state != IDF3::FILE_PLACEMENT && brd.good() ) + readBrdSection( brd, state, aNoSubstituteOutlines ); + + if( !brd.good() ) { - while( !FetchIDFLine( brd, iline, isComment, pos ) && brd.good() ); - - // normally this is a fault but we have all the data in accordance with specs - if( ( !brd.good() && !brd.eof() ) || iline.empty() ) - break; - - if( isComment ) + // check if we have valid data + if( brd.eof() && state >= IDF3::FILE_OUTLINE && state < IDF3::FILE_INVALID ) { - ERROR_IDF << "[warning]: trailing comments after PLACEMENT\n"; - } - else - { - ERROR_IDF << "invalid IDF3 file\n"; - cerr << "* Violation of specification: non-comment lines after PLACEMENT section\n"; - Clear(); brd.close(); - return false; + return; + } + + brd.close(); + + ostringstream ostr; + ostr << "\n* empty IDF file: '" << aFileName << "'"; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); + } + + if( brd.good() && state == IDF3::FILE_PLACEMENT ) + { + // read in any trailing lines and report on ignored comments (minor fault) + // and any non-comment item (non-compliance with IDFv3) + while( brd.good() ) + { + while( !FetchIDFLine( brd, iline, isComment, pos ) && brd.good() ); + + // normally this is a fault but we have all the data in accordance with specs + if( ( !brd.good() && !brd.eof() ) || iline.empty() ) + break; + + if( isComment ) + { + ERROR_IDF << "[warning]: trailing comments after PLACEMENT\n"; + } + else + { + ostringstream ostr; + ostr << "\n* problems reading file: '" << aFileName << "'"; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF file\n" + "* Violation of specification: non-comment lines after PLACEMENT section" ) ); + } } } } + catch( std::exception& e ) + { + brd.exceptions ( std::ios_base::goodbit ); + + if( brd.is_open() ) + brd.close(); + + throw; + } brd.close(); - return true; + return; } // readBoardFile() // read the library sections (outlines) -bool IDF3_BOARD::readLibSection( std::ifstream& aLibFile, IDF3::FILE_STATE& aLibState, IDF3_BOARD* aBoard ) +void IDF3_BOARD::readLibSection( std::ifstream& aLibFile, IDF3::FILE_STATE& aLibState, IDF3_BOARD* aBoard ) { if( aBoard == NULL ) { - ERROR_IDF << "BUG: invoked with NULL reference aBoard\n"; - aLibState = IDF3::FILE_INVALID; - return false; + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "\n* BUG: invoked with NULL reference aBoard" ) ); } std::list< std::string > comments; // comments associated with a section @@ -2233,23 +2360,23 @@ bool IDF3_BOARD::readLibSection( std::ifstream& aLibFile, IDF3::FILE_STATE& aLib int idx = 0; bool quoted = false; std::string token; - IDF3_COMP_OUTLINE *pout = new IDF3_COMP_OUTLINE; + IDF3_COMP_OUTLINE *pout = new IDF3_COMP_OUTLINE( this ); + + if( !pout ) + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "\n* memory allocation failure" ) ); while( aLibFile.good() ) { while( !FetchIDFLine( aLibFile, iline, isComment, pos ) && aLibFile.good() ); if( !aLibFile.good() && !aLibFile.eof() ) - { - ERROR_IDF; - cerr << "problems reading library section\n"; - aLibState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "problems reading library section" ) ); // no data was read; this only happens at eof() if( iline.empty() ) - return true; + return; if( isComment ) { @@ -2258,32 +2385,22 @@ bool IDF3_BOARD::readLibSection( std::ifstream& aLibFile, IDF3::FILE_STATE& aLib } // This must be a header - if( !GetIDFString( iline, token, quoted, idx ) ) - { - ERROR_IDF; - cerr << "problems reading library section\n"; - aLibState = IDF3::FILE_INVALID; - return false; - } + GetIDFString( iline, token, quoted, idx ); if( quoted ) { - ERROR_IDF; - cerr << "invalid IDFv3 library\n"; - cerr << "* Violation of specification: quoted string where .ELECTRICAL or .MECHANICAL expected\n"; - aLibState = IDF3::FILE_INVALID; - return false; + ostringstream ostr; + ostr << "invalid IDF library\n"; + ostr << "* Violation of specification: quoted string where .ELECTRICAL or .MECHANICAL expected\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* pos: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( CompareToken( ".ELECTRICAL", token ) || CompareToken( ".MECHANICAL", token ) ) { - if( !pout->ReadData( aLibFile, token ) ) - { - ERROR_IDF; - cerr << "invalid IDFv3 library [faulty section]\n"; - aLibState = IDF3::FILE_INVALID; - return false; - } + pout->readData( aLibFile, token, idfVer ); if( !comments.empty() ) { @@ -2305,33 +2422,42 @@ bool IDF3_BOARD::readLibSection( std::ifstream& aLibFile, IDF3::FILE_STATE& aLib } else { - ERROR_IDF; - cerr << "duplicate Component Outline: '" << pout->GetUID() << "'\n"; delete pout; + + ostringstream ostr; + ostr << "invalid IDF library\n"; + ostr << "duplicate Component Outline: '" << pout->GetUID() << "'\n"; + ostr << "* Violation of specification: multiple outlines have the same GEOM and PART name\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* pos: " << pos; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } - return true; + return; } else { - ERROR_IDF; - cerr << "invalid IDFv3 library\n"; - cerr << "* Expecting .ELECTRICAL or .MECHANICAL, got '" << token << "'\n"; - aLibState = IDF3::FILE_INVALID; - return false; - } + ostringstream ostr; + ostr << "invalid IDF library\n"; + ostr << "* Expecting .ELECTRICAL or .MECHANICAL, got '" << token << "'\n"; + ostr << "* line: '" << iline << "'\n"; + ostr << "* pos: " << pos; + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); + } } - ERROR_IDF; - cerr << "problems reading library section\n"; - aLibState = IDF3::FILE_INVALID; - return false; + if( !aLibFile.eof() ) + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "problems reading IDF library file" ) ); + + return; } // read the library HEADER -bool IDF3_BOARD::readLibHeader( std::ifstream& aLibFile, IDF3::FILE_STATE& aLibState ) +void IDF3_BOARD::readLibHeader( std::ifstream& aLibFile, IDF3::FILE_STATE& aLibState ) { std::string iline; // the input line bool isComment; // true if a line just read in is a comment line @@ -2344,30 +2470,20 @@ bool IDF3_BOARD::readLibHeader( std::ifstream& aLibFile, IDF3::FILE_STATE& aLibS while( !FetchIDFLine( aLibFile, iline, isComment, pos ) && aLibFile.good() ); if( !aLibFile.good() ) - { - ERROR_IDF; - cerr << "problems reading library header\n"; - aLibState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF library file\n" + "* premature end of file (no HEADER)" ) ); if( isComment ) - { - ERROR_IDF; - cerr << "invalid IDFv3 library\n"; - cerr << "* Violation of specification: first line must be .HEADER\n"; - aLibState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF library file\n" + "* Violation of specification: first line must be .HEADER" ) ); if( !CompareToken( ".HEADER", iline ) ) - { - ERROR_IDF; - cerr << "invalid IDFv3 library\n"; - cerr << "* Violation of specification: first line must be .HEADER and have no quotes or trailing text\n"; - aLibState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF library file\n" + "* Violation of specification:\n" + "* first line must be .HEADER and have no quotes or trailing text" ) ); // RECORD 2: // File Type [str]: LIBRARY_FILE @@ -2378,99 +2494,79 @@ bool IDF3_BOARD::readLibHeader( std::ifstream& aLibFile, IDF3::FILE_STATE& aLibS while( !FetchIDFLine( aLibFile, iline, isComment, pos ) && aLibFile.good() ); if( !aLibFile.good() ) - { - ERROR_IDF; - cerr << "problems reading library header, RECORD 2\n"; - aLibState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF library file\n" + "* premature end of HEADER" ) ); if( isComment ) - { - ERROR_IDF; - cerr << "invalid IDFv3 library\n"; - cerr << "* Violation of specification: comment within .HEADER section\n"; - aLibState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF library file\n" + "* Violation of specification: comment within .HEADER section" ) ); idx = 0; GetIDFString( iline, token, quoted, idx ); if( quoted ) - { - ERROR_IDF; - cerr << "invalid IDFv3 library\n"; - cerr << "* Violation of specification: File Type in HEADER section must not be in quotes\n"; - aLibState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF library file\n" + "* Violation of specification:\n" + "* file Type in HEADER section must not be in quotes" ) ); if( !CompareToken( "LIBRARY_FILE", token ) ) { - ERROR_IDF; - cerr << "invalid IDFv3 library\n"; - cerr << "* Expecting string: LIBRARY_FILE (got '" << token << "')\n"; - aLibState = IDF3::FILE_INVALID; - return false; + ostringstream ostr; + ostr << "invalid IDF library\n"; + ostr << "* Expecting string: LIBRARY_FILE (got '" << token << "')\n"; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( !GetIDFString( iline, token, quoted, idx ) ) - { - ERROR_IDF; - cerr << "invalid IDFv3 library\n"; - cerr << "* Violation of specification for HEADER section, RECORD 2: no FIELD 2\n"; - aLibState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF library file\n" + "* Violation of specification: HEADER section, RECORD 2: no FIELD 2" ) ); if( quoted ) - { - ERROR_IDF; - cerr << "invalid IDFv3 library\n"; - cerr << "* Violation of specification: IDF Version must not be in quotes\n"; - aLibState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF library file\n" + "* Violation of specification: IDF Version must not be in quotes" ) ); - if( token.compare( "3.0" ) && token.compare( "3." ) && token.compare( "3" ) ) + if( !token.compare( "3.0" ) || !token.compare( "3." ) || !token.compare( "3" ) ) + idfVer = IDF_V3; + else if( !token.compare( "2.0" ) || !token.compare( "2." ) || !token.compare( "2" ) ) + idfVer = IDF_V2; + else { - ERROR_IDF; - cerr << "unsupported IDF library version\n"; - cerr << "* Expecting version to be one of '3.0', '3.', or '3' (value: '" << token << "')\n"; - aLibState = IDF3::FILE_INVALID; - return false; + ostringstream ostr; + + ostr << "unsupported IDF version\n"; + ostr << "* Expecting version to be a variant of '3.0', '2.0' (value: '" << token << "')\n"; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } if( !GetIDFString( iline, token, quoted, idx ) ) - { - ERROR_IDF; - cerr << "invalid IDFv3 library\n"; - cerr << "* Violation of specification for HEADER section, RECORD 2, FIELD 3: no Source System string\n"; - aLibState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF library file\n" + "* Violation of specification:\n" + "* HEADER section, RECORD 2, FIELD 3: no Source System string" ) ); + libSource = token; - if( !GetIDFString( iline, token, quoted, idx ) ) - { - ERROR_IDF; - cerr << "invalid IDFv3 library\n"; - cerr << "* Violation of specification for HEADER section, RECORD 2, FIELD 4: no Date string\n"; - aLibState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF library file\n" + "* Violation of specification:\n" + "* HEADER section, RECORD 2, FIELD 4: no Date string" ) ); + libDate = token; if( !GetIDFString( iline, token, quoted, idx ) ) - { - ERROR_IDF; - cerr << "invalid IDFv3 library\n"; - cerr << "* Violation of specification for HEADER section, RECORD 2, FIELD 5: no Board File Version number\n"; - aLibState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF library file\n" + "* Violation of specification:\n" + "* HEADER section, RECORD 2, FIELD 5: no Board File Version number" ) ); + std::istringstream istr; istr.str( token ); @@ -2484,90 +2580,71 @@ bool IDF3_BOARD::readLibHeader( std::ifstream& aLibFile, IDF3::FILE_STATE& aLibS } if( quoted ) - { - ERROR_IDF; - cerr << "invalid IDFv3 library\n"; - cerr << "* Violation of specification: HEADER section, RECORD 2, FIELD 5: Library File Version must not be in quotes\n"; - aLibState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF library file\n" + "* Violation of specification:\n" + "* HEADER section, RECORD 2, FIELD 5: Library File Version must not be in quotes" ) ); // RECORD 3: // .END_HEADER while( !FetchIDFLine( aLibFile, iline, isComment, pos ) && aLibFile.good() ); if( ( !aLibFile.good() && !aLibFile.eof() ) || iline.empty() ) - { - ERROR_IDF; - cerr << "problems reading library header, RECORD 3\n"; - aLibState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "problems reading library header, RECORD 3" ) ); if( isComment ) - { - ERROR_IDF; - cerr << "invalid IDFv3 library\n"; - cerr << "* Violation of specification: comment within .HEADER section\n"; - aLibState = IDF3::FILE_INVALID; - return false; - } + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "invalid IDF library file\n" + "* Violation of specification: comment within .HEADER section" ) ); if( !CompareToken( ".END_HEADER", iline ) ) { - ERROR_IDF; - cerr << "invalid IDFv3 header\n"; - cerr << "* Violation of specification: expected .END_HEADER (got '" << iline << "')\n"; - aLibState = IDF3::FILE_INVALID; - return false; + ostringstream ostr; + ostr << "invalid IDF header\n"; + ostr << "* Violation of specification: expected .END_HEADER (got '" << iline << "')\n"; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } aLibState = IDF3::FILE_HEADER; - return true; + return; } // read the library file data -bool IDF3_BOARD::readLibFile( const std::string& aFileName ) +void IDF3_BOARD::readLibFile( const std::string& aFileName ) { std::ifstream lib; - lib.open( aFileName.c_str(), std::ios_base::in ); + lib.exceptions ( std::ifstream::badbit ); - if( !lib.is_open() ) + try { - ERROR_IDF; - cerr << "could not open file: '" << aFileName << "'\n"; - return false; + lib.open( aFileName.c_str(), std::ios_base::in ); + + IDF3::FILE_STATE state = IDF3::FILE_START; + + readLibHeader( lib, state ); + + while( lib.good() ) readLibSection( lib, state, this ); } - - IDF3::FILE_STATE state = IDF3::FILE_START; - - if( !readLibHeader( lib, state ) ) + catch( std::exception& e ) { - ERROR_IDF; - cerr << "[IDF library] could not find a valid header\n"; - lib.close(); - return false; - } + lib.exceptions ( std::ios_base::goodbit ); - // read the library sections - while( readLibSection( lib, state, this ) && lib.good() ); + if( lib.is_open() ) + lib.close(); - if( state <= IDF3::FILE_START || state >= IDF3::FILE_INVALID ) - { - lib.close(); - ERROR_IDF; - cerr << "problems reading file: '" << aFileName << "'\n"; - return false; + throw; } lib.close(); - return true; + return; } -bool IDF3_BOARD::ReadFile( const wxString& aFullFileName ) +bool IDF3_BOARD::ReadFile( const wxString& aFullFileName, bool aNoSubstituteOutlines ) { // 1. Check that the file extension is 'emn' // 2. Check if a file with extension 'emp' exists and read it @@ -2583,334 +2660,370 @@ bool IDF3_BOARD::ReadFile( const wxString& aFullFileName ) std::string bfname = TO_UTF8( aFullFileName ); - if( !brdname.IsOk() ) + try { - ERROR_IDF; - cerr << "invalid file name: '" << bfname << "'\n"; - return false; - } - - if( !brdname.IsOk() ) - { - ERROR_IDF; - cerr << "invalid file name: '" << bfname << "'\n"; - return false; - } - - if( !brdname.FileExists() ) - { - ERROR_IDF; - cerr << "no such file: '" << bfname << "'\n"; - return false; - } - - if( !brdname.IsFileReadable() ) - { - ERROR_IDF; - cerr << "cannot read file: '" << bfname << "'\n"; - return false; - } - - bfname = TO_UTF8( brdname.GetFullPath() ); - std::string lfname = TO_UTF8( libname.GetFullPath() ); - - if( !libname.FileExists() ) - { - ERROR_IDF; - cerr << "no associated library file (*.emp)\n"; - } - else if( !libname.IsFileReadable() ) - { - ERROR_IDF; - cerr << "cannot read library file: '" << lfname << "'\n"; - } - else - { - // read the library file before proceeding - if( !readLibFile( lfname ) ) + if( !brdname.IsOk() ) { - ERROR_IDF; - cerr << "problems reading library file: '" << lfname << "'\n"; - return false; - } - } + ostringstream ostr; + ostr << "\n* invalid file name: '" << bfname << "'"; - // read the board file - if( !readBoardFile( bfname ) ) + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); + } + + if( !brdname.FileExists() ) + { + ostringstream ostr; + ostr << "\n* no such file: '" << bfname << "'"; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); + } + + if( !brdname.IsFileReadable() ) + { + ostringstream ostr; + ostr << "\n* cannot read file: '" << bfname << "'"; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); + } + + bfname = TO_UTF8( brdname.GetFullPath() ); + std::string lfname = TO_UTF8( libname.GetFullPath() ); + + if( !libname.FileExists() ) + { + // NOTE: Since this is a common case we simply proceed + // with the assumption that there is no library file; + // however we print a message to inform the user. + ERROR_IDF; + cerr << "no associated library file (*.emp)\n"; + } + else if( !libname.IsFileReadable() ) + { + ostringstream ostr; + ostr << "\n* cannot read library file: '" << lfname << "'"; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); + } + else + { + // read the library file before proceeding + readLibFile( lfname ); + } + + // read the board file + readBoardFile( bfname, aNoSubstituteOutlines ); + } + catch( std::exception& e ) { Clear(); - ERROR_IDF; - cerr << "problems reading board file: '" << lfname << "'\n"; + errormsg = e.what(); + return false; } return true; } + // write the library file data bool IDF3_BOARD::writeLibFile( const std::string& aFileName ) { std::ofstream lib; + lib.exceptions( std::ofstream::failbit ); - lib.open( aFileName.c_str(), std::ios_base::out ); - - if( !lib.is_open() ) + try { - ERROR_IDF; - cerr << "could not open library file: '" << aFileName << "'\n"; - return false; + lib.open( aFileName.c_str(), std::ios_base::out ); + + wxDateTime tdate( time( NULL ) ); + + if( idfSource.empty() ) + idfSource = "KiCad-IDF Framework"; + + ostringstream fileDate; + fileDate << setfill( '0' ) << setw(4) << tdate.GetYear(); + fileDate << "/" << setw(2) << tdate.GetMonth() << "/" << tdate.GetDay(); + fileDate << "." << tdate.GetHour() << ":" << tdate.GetMinute() << ":" << tdate.GetSecond(); + libDate = fileDate.str(); + + lib << ".HEADER\n"; + lib << "LIBRARY_FILE 3.0 \"Created by " << idfSource; + lib << "\" " << libDate << " " << (++libFileVersion) << "\n"; + lib << ".END_HEADER\n\n"; + + std::map< std::string, IDF3_COMP_OUTLINE*>::iterator its = compOutlines.begin(); + std::map< std::string, IDF3_COMP_OUTLINE*>::iterator ite = compOutlines.end(); + + while( its != ite ) + { + its->second->writeData( lib ); + ++its; + } + } - - wxDateTime tdate( time( NULL ) ); - - if( idfSource.empty() ) - idfSource = "KiCad-IDF Framework"; - - ostringstream fileDate; - fileDate << setfill( '0' ) << setw(4) << tdate.GetYear(); - fileDate << "/" << setw(2) << tdate.GetMonth() << "/" << tdate.GetDay(); - fileDate << "." << tdate.GetHour() << ":" << tdate.GetMinute() << ":" << tdate.GetSecond(); - libDate = fileDate.str(); - - lib << ".HEADER\n"; - lib << "LIBRARY_FILE 3.0 \"Created by " << idfSource; - lib << "\" " << libDate << " " << (++libFileVersion) << "\n"; - lib << ".END_HEADER\n\n"; - - std::map< std::string, IDF3_COMP_OUTLINE*>::iterator its = compOutlines.begin(); - std::map< std::string, IDF3_COMP_OUTLINE*>::iterator ite = compOutlines.end(); - - while( its != ite ) + catch( std::exception& e ) { - its->second->WriteData( lib ); - ++its; - } + lib.exceptions( std::ios_base::goodbit ); - bool ok = !lib.fail(); + if( lib.is_open() ) + lib.close(); + + throw; + } lib.close(); - return ok; + return true; } // write the board file data -bool IDF3_BOARD::writeBoardFile( const std::string& aFileName ) +void IDF3_BOARD::writeBoardFile( const std::string& aFileName ) { std::ofstream brd; + brd.exceptions( std::ofstream::failbit ); - brd.open( aFileName.c_str(), std::ios_base::out ); - - if( !brd.is_open() ) + try { - ERROR_IDF; - cerr << "could not open board file: '" << aFileName << "'\n"; - return false; - } + brd.open( aFileName.c_str(), std::ios_base::out ); - wxDateTime tdate( time( NULL ) ); + wxDateTime tdate( time( NULL ) ); - if( idfSource.empty() ) - idfSource = "KiCad-IDF Framework"; + if( idfSource.empty() ) + idfSource = "KiCad-IDF Framework"; - ostringstream fileDate; - fileDate << setfill( '0' ) << setw(4) << tdate.GetYear(); - fileDate << "/" << setw(2) << tdate.GetMonth() << "/" << tdate.GetDay(); - fileDate << "." << tdate.GetHour() << ":" << tdate.GetMinute() << ":" << tdate.GetSecond(); - brdDate = fileDate.str(); + ostringstream fileDate; + fileDate << setfill( '0' ) << setw(4) << tdate.GetYear(); + fileDate << "/" << setw(2) << tdate.GetMonth() << "/" << tdate.GetDay(); + fileDate << "." << tdate.GetHour() << ":" << tdate.GetMinute() << ":" << tdate.GetSecond(); + brdDate = fileDate.str(); - brd << ".HEADER\n"; - brd << "BOARD_FILE 3.0 \"Created by " << idfSource; - brd << "\" " << brdDate << " " << (++brdFileVersion) << "\n"; + brd << ".HEADER\n"; + brd << "BOARD_FILE 3.0 \"Created by " << idfSource; + brd << "\" " << brdDate << " " << (++brdFileVersion) << "\n"; - if( boardName.empty() ) - brd << "\"BOARD WITH NO NAME\" "; - else - brd << "\"" << boardName << "\" "; + if( boardName.empty() ) + brd << "\"BOARD WITH NO NAME\" "; + else + brd << "\"" << boardName << "\" "; - brd << setw(1) << setfill( ' ' ); + brd << setw(1) << setfill( ' ' ); - if( unit == IDF3::UNIT_MM ) - brd << "MM\n"; - else - brd << "THOU\n"; + if( unit == IDF3::UNIT_MM ) + brd << "MM\n"; + else + brd << "THOU\n"; - brd << ".END_HEADER\n\n"; + brd << ".END_HEADER\n\n"; - // write the BOARD_OUTLINE - if( !olnBoard.WriteData( brd ) ) - { - ERROR_IDF << "problems writing BOARD OUTLINE\n"; - brd.close(); - return false; - } + // write the BOARD_OUTLINE + olnBoard.writeData( brd ); - // OTHER outlines - do - { - std::map::iterator its = olnOther.begin(); - std::map::iterator ite = olnOther.end(); - - while( (its != ite) && its->second->WriteData( brd ) ) ++its; - - } while( 0 ); - - // ROUTE outlines - do - { - std::list::iterator its = olnRoute.begin(); - std::list::iterator ite = olnRoute.end(); - - while( (its != ite) && (*its)->WriteData( brd ) ) ++its; - - } while( 0 ); - - // PLACEMENT outlines - do - { - std::list::iterator its = olnPlace.begin(); - std::list::iterator ite = olnPlace.end(); - - while( (its != ite) && (*its)->WriteData( brd ) ) ++its; - - } while( 0 ); - - // ROUTE KEEPOUT outlines - do - { - std::list::iterator its = olnRouteKeepout.begin(); - std::list::iterator ite = olnRouteKeepout.end(); - - while( (its != ite) && (*its)->WriteData( brd ) ) ++its; - - } while( 0 ); - - // VIA KEEPOUT outlines - do - { - std::list::iterator its = olnViaKeepout.begin(); - std::list::iterator ite = olnViaKeepout.end(); - - while( (its != ite) && (*its)->WriteData( brd ) ) ++its; - - } while( 0 ); - - // PLACE KEEPOUT outlines - do - { - std::list::iterator its = olnPlaceKeepout.begin(); - std::list::iterator ite = olnPlaceKeepout.end(); - - while( (its != ite) && (*its)->WriteData( brd ) ) ++its; - - } while( 0 ); - - // PLACEMENT GROUP outlines - do - { - std::map::iterator its = olnGroup.begin(); - std::map::iterator ite = olnGroup.end(); - - while( (its != ite) && its->second->WriteData( brd ) ) ++its; - - } while( 0 ); - - // Drilled holes - do - { - std::list::iterator itds = drillComments.begin(); - std::list::iterator itde = drillComments.end(); - - while( itds != itde ) + // OTHER outlines + do { - brd << "# " << *itds << "\n"; - ++itds; + std::map::iterator its = olnOther.begin(); + std::map::iterator ite = olnOther.end(); + + while(its != ite ) + { + its->second->writeData( brd ); + ++its; + } + + } while( 0 ); + + // ROUTE outlines + do + { + std::list::iterator its = olnRoute.begin(); + std::list::iterator ite = olnRoute.end(); + + while( its != ite ) + { + (*its)->writeData( brd ); + ++its; + } + + } while( 0 ); + + // PLACEMENT outlines + do + { + std::list::iterator its = olnPlace.begin(); + std::list::iterator ite = olnPlace.end(); + + while( its != ite ) + { + (*its)->writeData( brd ); + ++its; + } + + } while( 0 ); + + // ROUTE KEEPOUT outlines + do + { + std::list::iterator its = olnRouteKeepout.begin(); + std::list::iterator ite = olnRouteKeepout.end(); + + while( its != ite ) + { + (*its)->writeData( brd ); + ++its; + } + + } while( 0 ); + + // VIA KEEPOUT outlines + do + { + std::list::iterator its = olnViaKeepout.begin(); + std::list::iterator ite = olnViaKeepout.end(); + + while( its != ite ) + { + (*its)->writeData( brd ); + ++its; + } + + } while( 0 ); + + // PLACE KEEPOUT outlines + do + { + std::list::iterator its = olnPlaceKeepout.begin(); + std::list::iterator ite = olnPlaceKeepout.end(); + + while( its != ite ) + { + (*its)->writeData( brd ); + ++its; + } + + } while( 0 ); + + // PLACEMENT GROUP outlines + do + { + std::map::iterator its = olnGroup.begin(); + std::map::iterator ite = olnGroup.end(); + + while( its != ite ) + { + its->second->writeData( brd ); + ++its; + } + + } while( 0 ); + + // Drilled holes + do + { + std::list::iterator itds = drillComments.begin(); + std::list::iterator itde = drillComments.end(); + + while( itds != itde ) + { + brd << "# " << *itds << "\n"; + ++itds; + } + + brd << ".DRILLED_HOLES\n"; + + std::list::iterator itbs = board_drills.begin(); + std::list::iterator itbe = board_drills.end(); + + while( itbs != itbe ) + { + (*itbs)->write( brd, unit ); + ++itbs; + } + + std::map< std::string, IDF3_COMPONENT*>::iterator itcs = components.begin(); + std::map< std::string, IDF3_COMPONENT*>::iterator itce = components.end(); + + while( itcs != itce ) + { + itcs->second->writeDrillData( brd ); + ++itcs; + } + + brd << ".END_DRILLED_HOLES\n\n"; + } while( 0 ); + + // Notes + if( !notes.empty() ) + { + std::list::iterator itncs = noteComments.begin(); + std::list::iterator itnce = noteComments.end(); + + while( itncs != itnce ) + { + brd << "# " << *itncs << "\n"; + ++itncs; + } + + brd << ".NOTES\n"; + + std::list::iterator itns = notes.begin(); + std::list::iterator itne = notes.end(); + + while( itns != itne ) + { + (*itns)->writeNote( brd, unit ); + ++itns; + } + + brd << ".END_NOTES\n\n"; + } - brd << ".DRILLED_HOLES\n"; - - std::list::iterator itbs = board_drills.begin(); - std::list::iterator itbe = board_drills.end(); - - while( itbs != itbe ) + // Placement + if( !components.empty() ) { - (*itbs)->Write( brd, unit ); - ++itbs; + std::list::iterator itpcs = placeComments.begin(); + std::list::iterator itpce = placeComments.end(); + + while( itpcs != itpce ) + { + brd << "# " << *itpcs << "\n"; + ++itpcs; + } + + std::map< std::string, IDF3_COMPONENT*>::iterator itcs = components.begin(); + std::map< std::string, IDF3_COMPONENT*>::iterator itce = components.end(); + + brd << ".PLACEMENT\n"; + + while( itcs != itce ) + { + itcs->second->writePlaceData( brd ); + ++itcs; + } + + brd << ".END_PLACEMENT\n"; } - std::map< std::string, IDF3_COMPONENT*>::iterator itcs = components.begin(); - std::map< std::string, IDF3_COMPONENT*>::iterator itce = components.end(); - - while( itcs != itce ) - { - itcs->second->WriteDrillData( brd ); - ++itcs; - } - - brd << ".END_DRILLED_HOLES\n\n"; - } while( 0 ); - - // Notes - if( !notes.empty() ) - { - std::list::iterator itncs = noteComments.begin(); - std::list::iterator itnce = noteComments.end(); - - while( itncs != itnce ) - { - brd << "# " << *itncs << "\n"; - ++itncs; - } - - brd << ".NOTES\n"; - - std::list::iterator itns = notes.begin(); - std::list::iterator itne = notes.end(); - - while( itns != itne ) - { - (*itns)->WriteNote( brd, unit ); - ++itns; - } - - brd << ".END_NOTES\n\n"; - } - - // Placement - if( !components.empty() ) + catch( std::exception& e ) { - std::list::iterator itpcs = placeComments.begin(); - std::list::iterator itpce = placeComments.end(); + brd.exceptions( std::ios_base::goodbit ); - while( itpcs != itpce ) - { - brd << "# " << *itpcs << "\n"; - ++itpcs; - } + if( brd.is_open() ) + brd.close(); - std::map< std::string, IDF3_COMPONENT*>::iterator itcs = components.begin(); - std::map< std::string, IDF3_COMPONENT*>::iterator itce = components.end(); - - brd << ".PLACEMENT\n"; - - while( itcs != itce ) - { - itcs->second->WritePlaceData( brd ); - ++itcs; - } - - brd << ".END_PLACEMENT\n"; + throw; } - bool ok = !brd.fail(); brd.close(); - return ok; + return; } + bool IDF3_BOARD::WriteFile( const wxString& aFullFileName, bool aUnitMM, bool aForceUnitFlag ) { - if( aUnitMM == IDF3::UNIT_MM ) + if( aUnitMM != IDF3::UNIT_THOU ) setUnit( IDF3::UNIT_MM, aForceUnitFlag ); else setUnit( IDF3::UNIT_THOU, aForceUnitFlag ); @@ -2929,46 +3042,45 @@ bool IDF3_BOARD::WriteFile( const wxString& aFullFileName, bool aUnitMM, bool aF std::string bfname = TO_UTF8( aFullFileName ); - if( !brdname.IsOk() ) + try { - ERROR_IDF; - cerr << "invalid file name: '" << bfname << "'\n"; - errno = EINVAL; - return false; + if( !brdname.IsOk() ) + { + ostringstream ostr; + ostr << "\n* invalid file name: '" << bfname << "'"; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); + } + + if( brdname.FileExists() && !brdname.IsFileWritable() ) + { + ostringstream ostr; + ostr << "cannot overwrite existing board file\n"; + ostr << "* filename: '" << bfname << "'"; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); + } + + bfname = TO_UTF8( brdname.GetFullPath() ); + std::string lfname = TO_UTF8( libname.GetFullPath() ); + + if( libname.FileExists() && !libname.IsFileWritable() ) + { + ostringstream ostr; + ostr << "cannot overwrite existing library file\n"; + ostr << "* filename: '" << lfname << "'"; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); + } + + writeLibFile( lfname ); + writeBoardFile( bfname ); + } - - if( brdname.FileExists() && !brdname.IsFileWritable() ) + catch( std::exception& e ) { - ERROR_IDF; - cerr << "cannot overwrite existing board file\n"; - cerr << "* Filename: '" << bfname << "'\n"; - errno = EACCES; - return false; - } + errormsg = e.what(); - bfname = TO_UTF8( brdname.GetFullPath() ); - std::string lfname = TO_UTF8( libname.GetFullPath() ); - - if( libname.FileExists() && !libname.IsFileWritable() ) - { - ERROR_IDF; - cerr << "cannot overwrite existing library file\n"; - cerr << "* Filename: '" << lfname << "'\n"; - errno = EACCES; - return false; - } - - if( !writeLibFile( lfname ) ) - { - ERROR_IDF; - cerr << "problems writing library file: '" << lfname << "'\n"; - return false; - } - - if( !writeBoardFile( bfname ) ) - { - ERROR_IDF; - cerr << "problems writing board file: '" << bfname << "'\n"; return false; } @@ -3016,7 +3128,14 @@ int IDF3_BOARD::GetBoardVersion( void ) bool IDF3_BOARD::SetBoardVersion( int aVersion ) { if( aVersion < 0 ) + { + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "():\n"; + ostr << "* board version (" << aVersion << ") must be > 0"; + errormsg = ostr.str(); + return false; + } brdFileVersion = aVersion; @@ -3033,7 +3152,14 @@ int IDF3_BOARD::GetLibraryVersion( void ) bool IDF3_BOARD::SetLibraryVersion( int aVersion ) { if( aVersion < 0 ) + { + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "():\n"; + ostr << "* library version (" << aVersion << ") must be > 0"; + errormsg = ostr.str(); + return false; + } libFileVersion = aVersion; @@ -3049,9 +3175,13 @@ double IDF3_BOARD::GetUserScale( void ) bool IDF3_BOARD::SetUserScale( double aScaleFactor ) { - if( aScaleFactor <= 0.0 ) + if( aScaleFactor == 0.0 ) { - ERROR_IDF << "user scale factor must be > 0\n"; + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "():\n"; + ostr << "* BUG: user scale factor must not be 0"; + errormsg = ostr.str(); + return false; } @@ -3066,8 +3196,15 @@ int IDF3_BOARD::GetUserPrecision( void ) bool IDF3_BOARD::SetUserPrecision( int aPrecision ) { - if( aPrecision < 0 || aPrecision > 8 ) + if( aPrecision < 1 || aPrecision > 8 ) + { + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "():\n"; + ostr << "* precision value (" << aPrecision << ") must be 1..8"; + errormsg = ostr.str(); + return false; + } userPrec = aPrecision; return true; @@ -3092,19 +3229,38 @@ void IDF3_BOARD::SetUserOffset( double aXoff, double aYoff ) bool IDF3_BOARD::AddBoardOutline( IDF_OUTLINE* aOutline ) { - return olnBoard.AddOutline( aOutline ); + if( !olnBoard.AddOutline( aOutline ) ) + { + errormsg = olnBoard.GetError(); + + return false; + } + + return true; } bool IDF3_BOARD::DelBoardOutline( IDF_OUTLINE* aOutline ) { - return olnBoard.DelOutline( aOutline ); + if( !olnBoard.DelOutline( aOutline ) ) + { + errormsg = olnBoard.GetError(); + return false; + } + + return true; } bool IDF3_BOARD::DelBoardOutline( size_t aIndex ) { - return olnBoard.DelOutline( aIndex ); + if( !olnBoard.DelOutline( aIndex ) ) + { + errormsg = olnBoard.GetError(); + return false; + } + + return true; } @@ -3145,14 +3301,10 @@ IDF_DRILL_DATA* IDF3_BOARD::AddDrill( IDF_DRILL_DATA* aDrilledHole ) if( !aDrilledHole ) return NULL; - if( CompareToken( "PANEL", aDrilledHole->GetDrillRefDes() ) ) - { - ERROR_IDF; - cerr << "\n*BUG: PANEL drilled holes are not supported\n"; - return NULL; - } - - if( CompareToken( "BOARD", aDrilledHole->GetDrillRefDes() ) ) + // note: PANEL drills are essentially BOARD drills which + // the panel requires to be present + if( CompareToken( "BOARD", aDrilledHole->GetDrillRefDes() ) + || CompareToken( "PANEL", aDrilledHole->GetDrillRefDes() ) ) { board_drills.push_back( aDrilledHole ); return aDrilledHole; @@ -3164,6 +3316,8 @@ IDF_DRILL_DATA* IDF3_BOARD::AddDrill( IDF_DRILL_DATA* aDrilledHole ) bool IDF3_BOARD::DelBoardDrill( double aDia, double aXpos, double aYpos ) { + errormsg.clear(); + std::list::iterator sp = board_drills.begin(); std::list::iterator ep = board_drills.end(); bool rval = false; @@ -3172,11 +3326,62 @@ bool IDF3_BOARD::DelBoardDrill( double aDia, double aXpos, double aYpos ) { if( (*sp)->Matches( aDia, aXpos, aYpos ) ) { +#ifndef DISABLE_IDF_OWNERSHIP + IDF3::KEY_OWNER keyo = (*sp)->GetDrillOwner(); + + if( keyo == UNOWNED || ( keyo == MCAD && cadType == CAD_MECH ) + || ( keyo == ECAD && cadType == CAD_ELEC ) ) + { + rval = true; + delete *sp; + sp = board_drills.erase( sp ); + continue; + } + else + { + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "():\n"; + ostr << "* ownership violation; drill owner ("; + + switch( keyo ) + { + case UNOWNED: + ostr << "UNOWNED"; + break; + + case ECAD: + ostr << "ECAD"; + break; + + case MCAD: + ostr << "MCAD"; + break; + + default: + ostr << "invalid: " << keyo; + break; + } + + ostr << ") may not be modified by "; + + if( cadType == CAD_MECH ) + ostr << "MCAD"; + else + ostr << "ECAD"; + + errormsg = ostr.str(); + + ++sp; + continue; + } +#else rval = true; delete *sp; sp = board_drills.erase( sp ); continue; +#endif } + ++sp; } @@ -3186,11 +3391,29 @@ bool IDF3_BOARD::DelBoardDrill( double aDia, double aXpos, double aYpos ) // a slot is a deficient representation of a kicad slotted hole; // it is usually associated with a component but IDFv3 does not -// provide for such an association. +// provide for such an association. Note: this mechanism must bypass +// the BOARD_OUTLINE ownership rules bool IDF3_BOARD::AddSlot( double aWidth, double aLength, double aOrientation, double aX, double aY ) { if( aWidth < IDF_MIN_DIA_MM ) - return true; + { + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "():\n"; + ostr << "* slot width (" << aWidth << ") must be >= " << IDF_MIN_DIA_MM; + errormsg = ostr.str(); + + return false; + } + + if( aLength < IDF_MIN_DIA_MM ) + { + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "():\n"; + ostr << "* slot length (" << aLength << ") must be >= " << IDF_MIN_DIA_MM; + errormsg = ostr.str(); + + return false; + } IDF_POINT c[2]; // centers IDF_POINT pt[4]; @@ -3201,8 +3424,11 @@ bool IDF3_BOARD::AddSlot( double aWidth, double aLength, double aOrientation, do if( aLength == aWidth ) { - ERROR_IDF; - cerr << "length == width (" << aWidth << ")\n"; + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "():\n"; + ostr << "* slot length must not equal width"; + errormsg = ostr.str(); + return false; } @@ -3237,8 +3463,11 @@ bool IDF3_BOARD::AddSlot( double aWidth, double aLength, double aOrientation, do if( outline == NULL ) { - ERROR_IDF; - cerr << "could not create an outline object\n"; + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "():\n"; + ostr << "* could not create an outline object"; + errormsg = ostr.str(); + return false; } @@ -3255,7 +3484,13 @@ bool IDF3_BOARD::AddSlot( double aWidth, double aLength, double aOrientation, do seg = new IDF_SEGMENT( c[0], pt[3], -180.0, true ); outline->push( seg ); - return AddBoardOutline( outline ); + if( !olnBoard.addOutline( outline ) ) + { + errormsg = olnBoard.GetError(); + return false; + } + + return true; } @@ -3287,8 +3522,11 @@ IDF_DRILL_DATA* IDF3_BOARD::addCompDrill( double aDia, double aXpos, double aYpo if( CompareToken( "PANEL", refdes ) ) { - ERROR_IDF; - cerr << "PANEL data not supported\n"; + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "():\n"; + ostr << "* PANEL data not supported"; + errormsg = ostr.str(); + return NULL; } @@ -3301,8 +3539,11 @@ IDF_DRILL_DATA* IDF3_BOARD::addCompDrill( double aDia, double aXpos, double aYpo if( comp == NULL ) { - ERROR_IDF; - cerr << "could not create new component object\n"; + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "():\n"; + ostr << "* could not create new component object"; + errormsg = ostr.str(); + return NULL; } @@ -3312,19 +3553,36 @@ IDF_DRILL_DATA* IDF3_BOARD::addCompDrill( double aDia, double aXpos, double aYpo } // add the drill - return ref->second->AddDrill( aDia, aXpos, aYpos, aPlating, aHoleType, aOwner ); + IDF_DRILL_DATA* dp = ref->second->AddDrill( aDia, aXpos, aYpos, aPlating, aHoleType, aOwner ); + + if( !dp ) + { + errormsg = ref->second->GetError(); + return NULL; + } + + return dp; } IDF_DRILL_DATA* IDF3_BOARD::addCompDrill( IDF_DRILL_DATA* aDrilledHole ) { if( !aDrilledHole ) + { + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "(): NULL pointer"; + errormsg = ostr.str(); + return NULL; + } if( CompareToken( "PANEL", aDrilledHole->GetDrillRefDes() ) ) { - ERROR_IDF; - cerr << "PANEL data not supported\n"; + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "():\n"; + ostr << "* PANEL data not supported"; + errormsg = ostr.str(); + return NULL; } @@ -3337,8 +3595,11 @@ IDF_DRILL_DATA* IDF3_BOARD::addCompDrill( IDF_DRILL_DATA* aDrilledHole ) if( comp == NULL ) { - ERROR_IDF; - cerr << "could not create new component object\n"; + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "():\n"; + ostr << "* could not create new component object"; + errormsg = ostr.str(); + return NULL; } @@ -3347,19 +3608,34 @@ IDF_DRILL_DATA* IDF3_BOARD::addCompDrill( IDF_DRILL_DATA* aDrilledHole ) ref = components.insert( std::pair< std::string, IDF3_COMPONENT*> ( comp->GetRefDes(), comp ) ).first; } - // add the drill - return ref->second->AddDrill( aDrilledHole ); + IDF_DRILL_DATA* dp = ref->second->AddDrill( aDrilledHole ); + + if( !dp ) + { + errormsg = ref->second->GetError(); + return NULL; + } + + return dp; } bool IDF3_BOARD::delCompDrill( double aDia, double aXpos, double aYpos, std::string aRefDes ) { + errormsg.clear(); + std::map::iterator ref = components.find( aRefDes ); if( ref == components.end() ) return false; - return ref->second->DelDrill( aDia, aXpos, aYpos ); + if( !ref->second->DelDrill( aDia, aXpos, aYpos ) ) + { + errormsg = ref->second->GetError(); + return false; + } + + return true; } @@ -3367,14 +3643,22 @@ bool IDF3_BOARD::AddComponent( IDF3_COMPONENT* aComponent ) { if( !aComponent ) { - ERROR_IDF << "Invalid component pointer (NULL)\n"; + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__; + ostr << "(): Invalid component pointer (NULL)"; + errormsg = ostr.str(); + return false; } if( components.insert( std::pair ( aComponent->GetRefDes(), aComponent ) ).second == false ) { - ERROR_IDF << "Duplicate RefDes ('" << aComponent->GetRefDes() << "')\n"; + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "(): \n"; + ostr << "* duplicate RefDes ('" << aComponent->GetRefDes() << "')"; + errormsg = ostr.str(); + return false; } @@ -3384,11 +3668,12 @@ bool IDF3_BOARD::AddComponent( IDF3_COMPONENT* aComponent ) bool IDF3_BOARD::DelComponent( IDF3_COMPONENT* aComponent ) { - if( !aComponent ) - { - ERROR_IDF << "Invalid component pointer (NULL)\n"; + errormsg.clear(); + +#ifndef DISABLE_IDF_OWNERSHIP + if( !checkComponentOwnership( __LINE__, __FUNCTION__, aComponent ) ) return false; - } +#endif std::map::iterator it = components.find( aComponent->GetRefDes() ); @@ -3407,19 +3692,27 @@ bool IDF3_BOARD::DelComponent( size_t aIndex ) { if( aIndex >= components.size() ) { - ERROR_IDF << "index (" << aIndex << ") >= components size (" - << components.size() << ")\n"; - return false; + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "(): \n"; + ostr << "* aIndex (" << aIndex << ") out of range (" << components.size() << ")"; + errormsg = ostr.str(); + + return false; } std::map::iterator it = components.begin(); while( aIndex-- > 0 ) ++it; +#ifndef DISABLE_IDF_OWNERSHIP + if( !checkComponentOwnership( __LINE__, __FUNCTION__, it->second ) ) + return false; +#endif + delete it->second; components.erase( it ); - return false; + return true; } @@ -3462,14 +3755,17 @@ IDF3_COMP_OUTLINE* IDF3_BOARD::GetComponentOutline( const std::string aGeomName, std::string fname = TO_UTF8( aFullFileName ); - cp = new IDF3_COMP_OUTLINE; + cp = new IDF3_COMP_OUTLINE( this ); if( cp == NULL ) { - ERROR_IDF; - cerr << "failed to create outline with UID '" << aGeomName << "_"; + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "(): \n"; + cerr << "* failed to create outline with UID '" << aGeomName << "_"; cerr << aPartName << "'\n"; - cerr << "* filename: '" << fname << "'\n"; + cerr << "* filename: '" << fname << "'"; + errormsg = ostr.str(); + return NULL; } @@ -3477,89 +3773,97 @@ IDF3_COMP_OUTLINE* IDF3_BOARD::GetComponentOutline( const std::string aGeomName, if( !idflib.IsOk() ) { - ERROR_IDF; - cerr << "invalid file name: '" << fname << "'\n"; delete cp; + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "(): \n"; + cerr << "* invalid file name: '" << fname << "'"; + errormsg = ostr.str(); + return NULL; } if( !idflib.FileExists() ) { - ERROR_IDF; - cerr << "no such file: '" << fname << "'\n"; delete cp; + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "(): \n"; + cerr << "* no such file: '" << fname << "'"; + errormsg = ostr.str(); + return NULL; } if( !idflib.IsFileReadable() ) { - ERROR_IDF; - cerr << "cannot read file: '" << fname << "'\n"; delete cp; + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "(): \n"; + cerr << "* cannot read file: '" << fname << "'"; + errormsg = ostr.str(); + return NULL; } std::ifstream model; + model.exceptions ( std::ifstream::badbit ); - model.open( fname.c_str(), std::ios_base::in ); - - if( !model.is_open() ) + try { - ERROR_IDF; - cerr << "could not open file: '" << fname << "'\n"; - delete cp; - return NULL; - } + model.open( fname.c_str(), std::ios_base::in ); - std::string iline; // the input line - bool isComment; // true if a line just read in is a comment line - std::streampos pos; - while( true ) - { - while( !FetchIDFLine( model, iline, isComment, pos ) && model.good() ); + std::string iline; // the input line + bool isComment; // true if a line just read in is a comment line + std::streampos pos; - if( !model.good() ) + + while( true ) { - ERROR_IDF; - cerr << "problems reading file: '" << fname << "'\n"; - delete cp; - model.close(); - return NULL; - } + while( !FetchIDFLine( model, iline, isComment, pos ) && model.good() ); - // accept comment lines, .ELECTRICAL, or .MECHANICAL only - if( isComment ) - { - cp->AddComment( iline ); - continue; - } - - if( CompareToken( ".ELECTRICAL", iline ) || CompareToken( ".MECHANICAL", iline ) ) - { - if( !cp->ReadData( model, iline ) ) + if( !model.good() ) { - ERROR_IDF; - cerr << "problems reading file: '" << fname << "'\n"; - delete cp; - model.close(); - return NULL; + ostringstream ostr; + ostr << "\n* problems reading file: '" << fname << "'"; + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); + } + + // accept comment lines, .ELECTRICAL, or .MECHANICAL only + if( isComment ) + { + cp->AddComment( iline ); + continue; + } + + if( CompareToken( ".ELECTRICAL", iline ) || CompareToken( ".MECHANICAL", iline ) ) + { + cp->readData( model, iline, idfVer ); + break; } else { - break; + ostringstream ostr; + ostr << "faulty IDF component definition\n"; + ostr << "* Expecting .ELECTRICAL or .MECHANICAL, got '" << iline << "'\n"; + cerr << "* File: '" << fname << "'\n"; + + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) ); } - } - else - { - ERROR_IDF << "faulty IDF component definition\n"; - cerr << "* Expecting .ELECTRICAL or .MECHANICAL, got '" << iline << "'\n"; - cerr << "* File: '" << fname << "'\n"; - delete cp; + } // while( true ) + } + catch( std::exception& e ) + { + delete cp; + + model.exceptions ( std::ios_base::goodbit ); + + if( model.is_open() ) model.close(); - return NULL; - } - } // while( true ) + + errormsg = e.what(); + + return NULL; + } model.close(); @@ -3602,11 +3906,15 @@ IDF3_COMP_OUTLINE* IDF3_BOARD::GetInvalidOutline( const std::string& aGeomName, if( cp != NULL ) return cp; - cp = new IDF3_COMP_OUTLINE; + cp = new IDF3_COMP_OUTLINE( this ); if( cp == NULL ) { - ERROR_IDF << "could not create new outline\n"; + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "(): "; + cerr << "could not create new outline"; + errormsg = ostr.str(); + return NULL; } @@ -3807,7 +4115,7 @@ void IDF3_BOARD::Clear( void ) } while(0); boardName.clear(); - olnBoard.SetThickness( thickness ); + olnBoard.setThickness( thickness ); state = FILE_START; unit = UNIT_MM; @@ -3817,3 +4125,10 @@ void IDF3_BOARD::Clear( void ) return; } + + +const std::map*const +IDF3_BOARD::GetOtherOutlines( void ) +{ + return &olnOther; +} diff --git a/utils/idftools/idf_parser.h b/utils/idftools/idf_parser.h index eb812a997c..cc7909f347 100644 --- a/utils/idftools/idf_parser.h +++ b/utils/idftools/idf_parser.h @@ -21,27 +21,36 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -// NOTE: -// 1. Due to the complexity of objects and the risk of accumulated -// position errors, CAD packages should only delete or add complete -// components. If a component being added already exists, it is -// replaced by the new component IF and only if the CAD type is -// permitted to make such changes. -// -// 2. Internally all units shall be in mm and by default we shall -// write files with mm units. The internal flags mm/thou shall only -// be used to translate data being read from or written to files. -// This avoids the painful management of a mixture of mm and thou. -// The API shall require all dimensions in mm; for people using any -// other unit, it is their responsibility to perform the conversion -// to mm. Conversion back to thou may incur small rounding errors. +/* + * NOTE: + * + * Rules to ensure friendly use within a DLL: + * + * 1. all functions which throw exceptions must not be publicly available; + * they must become FRIEND functions instead. + * + * 2. All objects with PRIVATE functions which throw exceptions when + * invoked by a PUBLIC function must indicate success or failure + * and make the exception information available via a GetError() + * routine. + * + * General notes: + * + * 1. Due to the complexity of objects and the risk of accumulated + * position errors, CAD packages should only delete or add complete + * components. If a component being added already exists, it is + * replaced by the new component IF and only if the CAD type is + * permitted to make such changes. + * + * 2. Internally all units shall be in mm and by default we shall + * write files with mm units. The internal flags mm/thou shall only + * be used to translate data being read from or written to files. + * This avoids the painful management of a mixture of mm and thou. + * The API shall require all dimensions in mm; for people using any + * other unit, it is their responsibility to perform the conversion + * to mm. Conversion back to thou may incur small rounding errors. + */ -// BUGS: -// 1. IDF compliance: On DELETE operations, ensure that the CAD -// has permission to make these deletions. This is no small task; -// however this compliance task can be deferred since it is not -// essential to the immediate needs of KiCad which are IDF -// export and IDF->VRML conversion #ifndef IDF_PARSER_H #define IDF_PARSER_H @@ -52,15 +61,58 @@ class IDF3_COMPONENT; class IDF3_COMP_OUTLINE_DATA { +friend class IDF3_BOARD; +friend class IDF3_COMPONENT; private: double xoff; // X offset from KiCad or X placement from IDF file double yoff; // Y offset from KiCad or Y placement from IDF file double zoff; // height offset (specified in IDFv3 spec, corresponds to KiCad Z offset) double aoff; // angular offset from KiCad or Rotation Angle from IDF file + std::string errormsg; IDF3_COMP_OUTLINE* outline; // component outline to use IDF3_COMPONENT* parent; // associated component +#ifndef DISABLE_IDF_OWNERSHIP + bool checkOwnership( int aSourceLine, const char* aSourceFunc ); +#endif + + /** + * Function readPlaceData + * reads placement data from an open IDFv3 file + * + * @param aBoardFile is the open IDFv3 file + * @param aBoardState is the internal status flag of the IDF parser + * @param aIdfVersion is the version of the file currently being parsed + * @param aBoard is the IDF3_BOARD object which will store the data + * + * @return bool: true if placement data was successfully read. false if + * no placement data was read; this may happen if the end of the placement + * data was encountered or an error occurred. if an error occurred then + * an exception is thrown. + */ + bool readPlaceData( std::ifstream &aBoardFile, IDF3::FILE_STATE& aBoardState, + IDF3_BOARD *aBoard, IDF3::IDF_VERSION aIdfVersion, + bool aNoSubstituteOutlines ); + + /** + * Function writePlaceData + * writes RECORD 2 and RECORD 3 of a PLACEMENT section as per IDFv3 specification + * + * @param aBoardFile is the open IDFv3 file + * @param aXpos is the X location of the parent component + * @param aYpos is the Y location of the parent component + * @param aAngle is the rotation of the parent component + * @param aRefDes is the reference designator of the parent component + * @param aPlacement is the IDF Placement Status of the parent component + * @param aSide is the IDF Layer Designator (TOP or BOTTOM) + * + * @return bool: true if data was successfully written, otherwise false + */ + void writePlaceData( std::ofstream& aBoardFile, double aXpos, double aYpos, double aAngle, + const std::string aRefDes, IDF3::IDF_PLACEMENT aPlacement, + IDF3::IDF_LAYER aSide ); + public: /** * Constructor @@ -102,8 +154,11 @@ public: * @param aYoff is the Y offset of this outline in relation to its parent * @param aZoff is the board offset of this outline as per IDFv3 specification * @param aAoff is the rotational offset of this outline in relation to its parent + * + * @return bool: true if the operation succeeded, false if an ownership + * violation occurred */ - void SetOffsets( double aXoff, double aYoff, double aZoff, double aAngleOff ); + bool SetOffsets( double aXoff, double aYoff, double aZoff, double aAngleOff ); /** * Function GetOffsets @@ -129,8 +184,11 @@ public: * sets the outline whose position is managed by this object * * @param aOutline is the outline for this component + * + * @return bool: true if the operation succeeded, false if an ownership + * violation occurred */ - void SetOutline( IDF3_COMP_OUTLINE* aOutline ); + bool SetOutline( IDF3_COMP_OUTLINE* aOutline ); /** * Function GetOutline @@ -143,44 +201,16 @@ public: return outline; } - /** - * Function ReadPlaceData - * reads placement data from an open IDFv3 file - * - * @param aBoardFile is the open IDFv3 file - * @param aBoardState is the internal status flag of the IDF parser - * @param aBoard is the IDF3_BOARD object which will store the data - * - * @return bool: true if placement data was successfully read. false if - * no placement data was read; this may happen if the end of the placement - * data was encountered or an error occurred. if an error occurred then - * aBoardState is set to IDF3::FILE_INVALID or IDF3::FILE_ERROR. - */ - bool ReadPlaceData( std::ifstream &aBoardFile, IDF3::FILE_STATE& aBoardState, - IDF3_BOARD *aBoard ); - - /** - * Function WritePlaceData - * writes RECORD 2 and RECORD 3 of a PLACEMENT section as per IDFv3 specification - * - * @param aBoardFile is the open IDFv3 file - * @param aXpos is the X location of the parent component - * @param aYpos is the Y location of the parent component - * @param aAngle is the rotation of the parent component - * @param aRefDes is the reference designator of the parent component - * @param aPlacement is the IDF Placement Status of the parent component - * @param aSide is the IDF Layer Designator (TOP or BOTTOM) - * - * @return bool: true if data was successfully written, otherwise false - */ - bool WritePlaceData( std::ofstream& aBoardFile, double aXpos, double aYpos, double aAngle, - const std::string aRefDes, IDF3::IDF_PLACEMENT aPlacement, - IDF3::IDF_LAYER aSide ); + const std::string& GetError( void ) + { + return errormsg; + } }; class IDF3_COMPONENT { +friend class IDF3_BOARD; private: std::list< IDF3_COMP_OUTLINE_DATA* > components; std::list< IDF_DRILL_DATA* > drills; @@ -193,14 +223,33 @@ private: bool hasPosition; ///< True after SetPosition is called once std::string refdes; ///< Reference Description (MUST BE UNIQUE) IDF3_BOARD* parent; + std::string errormsg; + + /** + * Function WriteDrillData + * writes the internal drill data to an IDFv3 .DRILLED_HOLES section + * + * @param aBoardFile is an IDFv3 file opened for writing + * + * @return bool: true if the operation succeeded, otherwise false + */ + bool writeDrillData( std::ofstream& aBoardFile ); + + /** + * Function WritePlaceData + * writes the component placement data to an IDFv3 .PLACEMENT section + * + * @param aBoardFile is an IDFv3 file opened for writing + * + * @return bool: true if the operation succeeded, otherwise false + */ + bool writePlaceData( std::ofstream& aBoardFile ); + +#ifndef DISABLE_IDF_OWNERSHIP + bool checkOwnership( int aSourceLine, const char* aSourceFunc ); +#endif public: - /** - * Constructor - * sets internal parameters to default values - */ - IDF3_COMPONENT(); - /** * Constructor * sets the parent object and initializes other internal parameters to default values @@ -399,33 +448,22 @@ public: * sets the placement value of the component subject to ownership rules. * An exception is thrown if aPlacementValue is invalid or an ownership * violation occurs. + * + * @return bool: true if the operation succeeded, otherwise false and the + * error message is set. */ - void SetPlacement( IDF3::IDF_PLACEMENT aPlacementValue ); + bool SetPlacement( IDF3::IDF_PLACEMENT aPlacementValue ); - /** - * Function WriteDrillData - * writes the internal drill data to an IDFv3 .DRILLED_HOLES section - * - * @param aBoardFile is an IDFv3 file opened for writing - * - * @return bool: true if the operation succeeded, otherwise false - */ - bool WriteDrillData( std::ofstream& aBoardFile ); - - /** - * Function WritePlaceData - * writes the component placement data to an IDFv3 .PLACEMENT section - * - * @param aBoardFile is an IDFv3 file opened for writing - * - * @return bool: true if the operation succeeded, otherwise false - */ - bool WritePlaceData( std::ofstream& aBoardFile ); + const std::string& GetError( void ) + { + return errormsg; + } }; class IDF3_BOARD { private: + std::string errormsg; // string for passing error messages to user std::list< IDF_NOTE* > notes; // IDF notes std::list< std::string > noteComments; // comment list for NOTES section std::list< std::string > drillComments; // comment list for DRILL section @@ -437,6 +475,7 @@ private: IDF3::FILE_STATE state; IDF3::CAD_TYPE cadType; IDF3::IDF_UNIT unit; + IDF3::IDF_VERSION idfVer; // IDF version of Board or Library std::string idfSource; // SOURCE string to use when writing BOARD and LIBRARY headers std::string brdSource; // SOURCE string as retrieved from a BOARD file @@ -483,31 +522,40 @@ private: bool delCompDrill( double aDia, double aXpos, double aYpos, std::string aRefDes ); // read the DRILLED HOLES section - bool readBrdDrills( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBoardState ); + void readBrdDrills( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBoardState ); // read the NOTES section - bool readBrdNotes( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBoardState ); + void readBrdNotes( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBoardState ); // read the component placement section - bool readBrdPlacement( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBoardState ); + void readBrdPlacement( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBoardState, + bool aNoSubstituteOutlines ); // read the board HEADER - bool readBrdHeader( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBoardState ); + void readBrdHeader( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBoardState ); // read individual board sections; pay attention to IDFv3 section specifications - bool readBrdSection( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBoardState ); + // exception thrown on unrecoverable errors. state flag set to FILE_PLACEMENT + // upon reading the PLACEMENT file; according to IDFv3 this is the final section + void readBrdSection( std::ifstream& aBoardFile, IDF3::FILE_STATE& aBoardState, + bool aNoSubstituteOutlines ); // read the board file data - bool readBoardFile( const std::string& aFileName ); + void readBoardFile( const std::string& aFileName, bool aNoSubstituteOutlines ); // write the board file data - bool writeBoardFile( const std::string& aFileName ); + void writeBoardFile( const std::string& aFileName ); // read the library sections (outlines) - bool readLibSection( std::ifstream& aLibFile, IDF3::FILE_STATE& aLibState, IDF3_BOARD* aBoard ); + void readLibSection( std::ifstream& aLibFile, IDF3::FILE_STATE& aLibState, IDF3_BOARD* aBoard ); // read the library HEADER - bool readLibHeader( std::ifstream& aLibFile, IDF3::FILE_STATE& aLibState ); + void readLibHeader( std::ifstream& aLibFile, IDF3::FILE_STATE& aLibState ); // read the library file data - bool readLibFile( const std::string& aFileName ); + void readLibFile( const std::string& aFileName ); // write the library file data bool writeLibFile( const std::string& aFileName ); +#ifndef DISABLE_IDF_OWNERSHIP + bool checkComponentOwnership( int aSourceLine, const char* aSourceFunc, + IDF3_COMPONENT* aComponent ); +#endif + public: IDF3_BOARD( IDF3::CAD_TYPE aCadType ); virtual ~IDF3_BOARD(); @@ -527,7 +575,7 @@ public: bool SetBoardThickness( double aBoardThickness ); double GetBoardThickness( void ); - bool ReadFile( const wxString& aFullFileName ); + bool ReadFile( const wxString& aFullFileName, bool aNoSubstituteOutlines = false ); bool WriteFile( const wxString& aFullFileName, bool aUnitMM = true, bool aForceUnitFlag = false ); const std::string& GetIDFSource( void ); @@ -557,7 +605,13 @@ public: BOARD_OUTLINE* GetBoardOutline( void ); const std::list< IDF_OUTLINE* >*const GetBoardOutlines( void ); + // Operations for OTHER OUTLINES + const std::map*const GetOtherOutlines( void ); + /// XXX - TO BE IMPLEMENTED + // + // SetBoardOutlineOwner() + // // AddDrillComment // AddPlacementComment // GetDrillComments() @@ -568,7 +622,7 @@ public: // GetNoteComments // AddNote // - // const std::map*const GetOtherOutlines() + // [IMPLEMENTED] const std::map*const GetOtherOutlines( void ) // size_t GetOtherOutlinesSize() // OTHER_OUTLINE* AddOtherOutline( OTHER_OUTLINE* aOtherOutline ) // bool DelOtherOutline( int aIndex ) @@ -652,6 +706,12 @@ public: // clears all data void Clear( void ); + + // return error string + const std::string& GetError( void ) + { + return errormsg; + } }; #endif // IDF_PARSER_H From 9cfd1dc4ea3eabc593e7fdfe81990f0995ee740f Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sun, 1 Jun 2014 20:22:51 +0200 Subject: [PATCH 470/741] Suppress compil warnings --- utils/idftools/idf2vrml.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/utils/idftools/idf2vrml.cpp b/utils/idftools/idf2vrml.cpp index dce24f41db..e13604fbfb 100644 --- a/utils/idftools/idf2vrml.cpp +++ b/utils/idftools/idf2vrml.cpp @@ -100,14 +100,15 @@ struct VRML_IDS }; #define NCOLORS 7 -VRML_COLOR colors[NCOLORS] = { \ - { 0, 0.82, 0.247, 0, 0, 0, 0, 0.82, 0.247, 0.9, 0, 0.1}, \ - { 1, 0, 0, 1, 0, 0, 1, 0, 0, 0.9, 0, 0.1}, \ - { 0.659, 0, 0.463, 0, 0, 0, 0.659, 0, 0.463, 0.9, 0, 0.1}, \ - { 0.659, 0.294, 0, 0, 0, 0, 0.659, 0.294, 0, 0.9, 0, 0.1}, \ - { 0, 0.918, 0.659, 0, 0, 0, 0, 0.918, 0.659, 0.9, 0, 0.1}, \ - { 0.808, 0.733 , 0.071, 0, 0, 0, 0.808, 0.733 , 0.071, 0.9, 0, 0.1}, \ - { 0.102, 1, 0.984, 0, 0, 0, 0.102, 1, 0.984, 0.9, 0, 0.1} +VRML_COLOR colors[NCOLORS] = +{ + { { 0, 0.82, 0.247 }, { 0, 0, 0 }, { 0, 0.82, 0.247 }, 0.9, 0, 0.1 }, + { { 1, 0, 0 }, { 1, 0, 0 }, { 1, 0, 0 }, 0.9, 0, 0.1 }, + { { 0.659, 0, 0.463}, { 0, 0, 0}, { 0.659, 0, 0.463 }, 0.9, 0, 0.1 }, + { { 0.659, 0.294, 0 }, { 0, 0, 0 }, { 0.659, 0.294, 0 }, 0.9, 0, 0.1}, + { { 0, 0.918, 0.659 }, { 0, 0, 0 }, { 0, 0.918, 0.659 }, 0.9, 0, 0.1}, + { { 0.808, 0.733 , 0.071 }, { 0, 0, 0 }, { 0.808, 0.733 , 0.071 }, 0.9, 0, 0.1}, + { { 0.102, 1, 0.984 }, { 0, 0, 0 }, { 0.102, 1, 0.984 }, 0.9, 0, 0.1} }; bool WriteHeader( IDF3_BOARD& board, std::ofstream& file ); From fa846932c1b38a9600753230b6c490e2f9afc0ed Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 2 Jun 2014 11:41:54 +0200 Subject: [PATCH 471/741] bugfix 1325375: pcbnew crash while append a board --- pcbnew/class_board.h | 5 +++++ pcbnew/class_netinfo.h | 9 +++++++-- pcbnew/class_netinfolist.cpp | 23 ++++++++++++++++++----- pcbnew/legacy_plugin.cpp | 24 ++++++++++++++++-------- pcbnew/legacy_plugin.h | 3 ++- pcbnew/pcb_parser.cpp | 22 +++++++++++++++------- pcbnew/pcb_parser.h | 8 ++++---- pcbnew/ratsnest_data.cpp | 3 +++ 8 files changed, 70 insertions(+), 27 deletions(-) diff --git a/pcbnew/class_board.h b/pcbnew/class_board.h index 41777b60c8..cbe0fe7fd4 100644 --- a/pcbnew/class_board.h +++ b/pcbnew/class_board.h @@ -795,6 +795,11 @@ public: */ NETINFO_ITEM* FindNet( const wxString& aNetname ) const; + /** + * Function AppendNet + * adds a new net description item to the current board. + * @param aNewNet is the new description item. + */ void AppendNet( NETINFO_ITEM* aNewNet ) { m_NetInfo.AppendNet( aNewNet ); diff --git a/pcbnew/class_netinfo.h b/pcbnew/class_netinfo.h index 253ca9c48b..3b28a9ed8f 100644 --- a/pcbnew/class_netinfo.h +++ b/pcbnew/class_netinfo.h @@ -254,6 +254,7 @@ public: NETINFO_ITEM* GetNetItem( int aNetCode ) const { NETCODES_MAP::const_iterator result = m_netCodes.find( aNetCode ); + if( result != m_netCodes.end() ) return (*result).second; @@ -268,6 +269,7 @@ public: NETINFO_ITEM* GetNetItem( const wxString& aNetName ) const { NETNAMES_MAP::const_iterator result = m_netNames.find( aNetName ); + if( result != m_netNames.end() ) return (*result).second; @@ -283,7 +285,8 @@ public: /** * Function Append - * adds \a aNewElement to the end of the list. + * adds \a aNewElement to the end of the list. Negative net code means it is going to be + * auto-assigned. */ void AppendNet( NETINFO_ITEM* aNewElement ); @@ -421,7 +424,7 @@ private: * Function getFreeNetCode * returns the first available net code that is not used by any other net. */ - int getFreeNetCode() const; + int getFreeNetCode(); BOARD* m_Parent; @@ -430,6 +433,8 @@ private: std::vector m_PadsFullList; ///< contains all pads, sorted by pad's netname. ///< can be used in ratsnest calculations. + + int m_newNetCode; ///< possible value for new net code assignment }; diff --git a/pcbnew/class_netinfolist.cpp b/pcbnew/class_netinfolist.cpp index 5f73ca0a98..45e1915e9f 100644 --- a/pcbnew/class_netinfolist.cpp +++ b/pcbnew/class_netinfolist.cpp @@ -45,6 +45,8 @@ NETINFO_LIST::NETINFO_LIST( BOARD* aParent ) : m_Parent( aParent ) { // Make sure that the unconnected net has number 0 AppendNet( new NETINFO_ITEM( aParent, wxEmptyString, 0 ) ); + + m_newNetCode = 0; } @@ -63,14 +65,27 @@ void NETINFO_LIST::clear() m_PadsFullList.clear(); m_netNames.clear(); m_netCodes.clear(); + m_newNetCode = 0; } void NETINFO_LIST::AppendNet( NETINFO_ITEM* aNewElement ) { + // if there is a net with such name then just assign the correct number + NETINFO_ITEM* sameName = GetNetItem( aNewElement->GetNetname() ); + + if( sameName != NULL ) + { + aNewElement->m_NetCode = sameName->GetNet(); + + return; + } + // be sure that net codes are consecutive // negative net code means that it has to be auto assigned - if( aNewElement->m_NetCode < 0 ) - const_cast( aNewElement->m_NetCode ) = getFreeNetCode(); + else if( ( aNewElement->m_NetCode != (int) m_netCodes.size() ) || ( aNewElement->m_NetCode < 0 ) ) + { + aNewElement->m_NetCode = getFreeNetCode(); + } // net names & codes are supposed to be unique assert( GetNetItem( aNewElement->GetNetname() ) == NULL ); @@ -201,10 +216,8 @@ void NETINFO_LIST::buildPadsFullList() } -int NETINFO_LIST::getFreeNetCode() const +int NETINFO_LIST::getFreeNetCode() { - static int m_newNetCode = 0; - do { if( m_newNetCode < 0 ) m_newNetCode = 0; diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index 9ddd1c9c4a..c369ebf65c 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -502,13 +502,12 @@ void LEGACY_PLUGIN::loadGENERAL() else if( TESTLINE( "Nmodule" ) ) { NbMod = intParse( line + SZ( "Nmodule" ) ); - } + }*/ else if( TESTLINE( "Nnets" ) ) { - NbNets = intParse( line + SZ( "Nnets" ) ); + m_netCodes.resize( intParse( line + SZ( "Nnets" ) ) ); } - */ else if( TESTLINE( "$EndGENERAL" ) ) return; // preferred exit @@ -1305,13 +1304,15 @@ void LEGACY_PLUGIN::loadPAD( MODULE* aModule ) char buf[1024]; // can be fairly long int netcode = intParse( line + SZ( "Ne" ), &data ); - pad->SetNetCode( netcode ); + // Store the new code mapping + pad->SetNetCode( m_netCodes[netcode] ); // read Netname ReadDelimitedText( buf, data, sizeof(buf) ); #ifndef NDEBUG if( m_board ) - assert( m_board->FindNet( netcode )->GetNetname() == FROM_UTF8( StrPurge( buf ) ) ); + assert( m_board->FindNet( m_netCodes[netcode] )->GetNetname() == + FROM_UTF8( StrPurge( buf ) ) ); #endif /* NDEBUG */ } @@ -1822,6 +1823,7 @@ void LEGACY_PLUGIN::loadNETINFO_ITEM() NETINFO_ITEM* net = NULL; char* line; + int netCode; while( ( line = READLINE( m_reader ) ) != NULL ) { @@ -1831,7 +1833,7 @@ void LEGACY_PLUGIN::loadNETINFO_ITEM() { // e.g. "Na 58 "/cpu.sch/PAD7"\r\n" - int netCode = intParse( line + SZ( "Na" ), &data ); + netCode = intParse( line + SZ( "Na" ), &data ); ReadDelimitedText( buf, data, sizeof(buf) ); net = new NETINFO_ITEM( m_board, FROM_UTF8( buf ), netCode ); @@ -1842,9 +1844,15 @@ void LEGACY_PLUGIN::loadNETINFO_ITEM() // net 0 should be already in list, so store this net // if it is not the net 0, or if the net 0 does not exists. if( net != NULL && ( net->GetNet() > 0 || m_board->FindNet( 0 ) == NULL ) ) + { m_board->AppendNet( net ); + m_netCodes[netCode] = net->GetNet(); + } else + { delete net; + } + return; // preferred exit } } @@ -2094,7 +2102,7 @@ void LEGACY_PLUGIN::loadTrackList( int aStructType ) via->SetLayerPair( LAYER_N_FRONT, LAYER_N_BACK ); } - newTrack->SetNetCode( net_code ); + newTrack->SetNetCode( m_netCodes[net_code] ); newTrack->SetState( flags, true ); m_board->Add( newTrack ); @@ -2242,7 +2250,7 @@ void LEGACY_PLUGIN::loadZONE_CONTAINER() // Init the net code only, not the netname, to be sure // the zone net name is the name read in file. // (When mismatch, the user will be prompted in DRC, to fix the actual name) - zc->BOARD_CONNECTED_ITEM::SetNetCode( netcode ); + zc->BOARD_CONNECTED_ITEM::SetNetCode( m_netCodes[netcode] ); } else if( TESTLINE( "ZLayer" ) ) // layer found diff --git a/pcbnew/legacy_plugin.h b/pcbnew/legacy_plugin.h index ee05599591..96747bf84d 100644 --- a/pcbnew/legacy_plugin.h +++ b/pcbnew/legacy_plugin.h @@ -126,8 +126,9 @@ protected: int m_loading_format_version; ///< which BOARD_FORMAT_VERSION am I Load()ing? LP_CACHE* m_cache; - NETINFO_MAPPING* m_mapping; ///< mapping for net codes, so only not empty net codes + NETINFO_MAPPING* m_mapping; ///< mapping for net codes, so only not empty nets ///< are stored with consecutive integers as net codes + std::vector m_netCodes; ///< net codes mapping for boards being loaded /// initialize PLUGIN like a constructor would, and futz with fresh BOARD if needed. void init( const PROPERTIES* aProperties ); diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index a96034c48d..8c883099ad 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -504,6 +504,11 @@ void PCB_PARSER::parseGeneralSection() throw( IO_ERROR, PARSE_ERROR ) NeedRIGHT(); break; + case T_nets: + m_netCodes.resize( parseInt( "nets number" ) ); + NeedRIGHT(); + break; + case T_no_connects: m_board->SetUnconnectedNetCount( parseInt( "no connect count" ) ); NeedRIGHT(); @@ -1059,7 +1064,7 @@ void PCB_PARSER::parseNETINFO_ITEM() throw( IO_ERROR, PARSE_ERROR ) wxCHECK_RET( CurTok() == T_net, wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as net." ) ); - int number = parseInt( "net number" ); + int netCode = parseInt( "net number" ); NeedSYMBOLorNUMBER(); wxString name = FromUTF8(); @@ -1069,10 +1074,13 @@ void PCB_PARSER::parseNETINFO_ITEM() throw( IO_ERROR, PARSE_ERROR ) // net 0 should be already in list, so store this net // if it is not the net 0, or if the net 0 does not exists. // (TODO: a better test.) - if( number > 0 || m_board->FindNet( 0 ) == NULL ) + if( netCode > 0 || m_board->FindNet( 0 ) == NULL ) { - NETINFO_ITEM* net = new NETINFO_ITEM( m_board, name, number ); + NETINFO_ITEM* net = new NETINFO_ITEM( m_board, name, netCode ); m_board->AppendNet( net ); + + // Store the new code mapping + m_netCodes[netCode] = net->GetNet(); } } @@ -2193,7 +2201,7 @@ D_PAD* PCB_PARSER::parseD_PAD( MODULE* aParent ) throw( IO_ERROR, PARSE_ERROR ) break; case T_net: - pad->SetNetCode( parseInt( "net number" ) ); + pad->SetNetCode( m_netCodes[parseInt( "net number" )] ); NeedSYMBOLorNUMBER(); assert( FromUTF8() == m_board->FindNet( pad->GetNetCode() )->GetNetname() ); NeedRIGHT(); @@ -2291,7 +2299,7 @@ TRACK* PCB_PARSER::parseTRACK() throw( IO_ERROR, PARSE_ERROR ) break; case T_net: - track->SetNetCode( parseInt( "net number" ) ); + track->SetNetCode( m_netCodes[parseInt( "net number" )] ); break; case T_tstamp: @@ -2369,7 +2377,7 @@ VIA* PCB_PARSER::parseVIA() throw( IO_ERROR, PARSE_ERROR ) break; case T_net: - via->SetNetCode( parseInt( "net number" ) ); + via->SetNetCode( m_netCodes[parseInt( "net number" )] ); NeedRIGHT(); break; @@ -2421,7 +2429,7 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER() throw( IO_ERROR, PARSE_ERROR ) // Init the net code only, not the netname, to be sure // the zone net name is the name read in file. // (When mismatch, the user will be prompted in DRC, to fix the actual name) - zone->SetNetCode( parseInt( "net number" ) ); + zone->SetNetCode( m_netCodes[parseInt( "net number" )] ); NeedRIGHT(); break; diff --git a/pcbnew/pcb_parser.h b/pcbnew/pcb_parser.h index eeb4faf9d6..a07beb3bec 100644 --- a/pcbnew/pcb_parser.h +++ b/pcbnew/pcb_parser.h @@ -64,10 +64,10 @@ class PCB_PARSER : public PCB_LEXER typedef boost::unordered_map< std::string, LAYER_NUM > LAYER_NUM_MAP; typedef boost::unordered_map< std::string, LAYER_MSK > LAYER_MSK_MAP; - BOARD* m_board; - LAYER_NUM_MAP m_layerIndices; ///< map layer name to it's index - LAYER_MSK_MAP m_layerMasks; ///< map layer names to their masks - + BOARD* m_board; + LAYER_NUM_MAP m_layerIndices; ///< map layer name to it's index + LAYER_MSK_MAP m_layerMasks; ///< map layer names to their masks + std::vector m_netCodes; ///< net codes mapping for boards being loaded /** * Function init diff --git a/pcbnew/ratsnest_data.cpp b/pcbnew/ratsnest_data.cpp index 4b4c063485..f6638a3835 100644 --- a/pcbnew/ratsnest_data.cpp +++ b/pcbnew/ratsnest_data.cpp @@ -993,6 +993,9 @@ void RN_DATA::ProcessBoard() void RN_DATA::Recalculate( int aNet ) { + if( m_board->GetNetCount() > m_nets.size() ) + m_nets.resize( m_board->GetNetCount() ); + if( aNet < 0 ) // Recompute everything { unsigned int i, netCount; From ea755a10dbe665b5327efb162c6995ad8364413e Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 2 Jun 2014 12:46:29 +0200 Subject: [PATCH 472/741] .kicad_mod files: always save the "last edited date" because only the footprint editor changes this parameter. Usefull to know if/when a footprint was actually modified. Also fix a minor issue in footprint editor which always set the "modified" flag even when no change was made. --- pcbnew/kicad_plugin.cpp | 5 +++-- pcbnew/kicad_plugin.h | 9 +++++---- pcbnew/modedit.cpp | 12 ++++++------ utils/idftools/idf2vrml.cpp | 12 ++++++------ 4 files changed, 20 insertions(+), 18 deletions(-) diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index fe5bf4cc9b..9b0319f2cb 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -978,10 +978,11 @@ void PCB_IO::format( MODULE* aModule, int aNestLevel ) const formatLayer( aModule ); + m_out->Print( 0, " (tedit %lX)", aModule->GetLastEditTime() ); + if( !( m_ctl & CTL_OMIT_TSTAMPS ) ) { - m_out->Print( 0, " (tedit %lX) (tstamp %lX)\n", - aModule->GetLastEditTime(), aModule->GetTimeStamp() ); + m_out->Print( 0, " (tstamp %lX)\n", aModule->GetTimeStamp() ); } else m_out->Print( 0, "\n" ); diff --git a/pcbnew/kicad_plugin.h b/pcbnew/kicad_plugin.h index 95986e7531..e16129203b 100644 --- a/pcbnew/kicad_plugin.h +++ b/pcbnew/kicad_plugin.h @@ -40,11 +40,12 @@ class NETINFO_MAPPING; #define CTL_STD_LAYER_NAMES (1 << 0) ///< Use English Standard layer names -#define CTL_OMIT_NETS (1 << 1) -#define CTL_OMIT_TSTAMPS (1 << 2) +#define CTL_OMIT_NETS (1 << 1) ///< Omit pads net names (useless in library) +#define CTL_OMIT_TSTAMPS (1 << 2) ///< Omit component time stamp (useless in library) #define CTL_OMIT_INITIAL_COMMENTS (1 << 3) ///< omit MODULE initial comments -#define CTL_OMIT_PATH (1 << 4) -#define CTL_OMIT_AT (1 << 5) +#define CTL_OMIT_PATH (1 << 4) ///< Omit component sheet time stamp (useless in library) +#define CTL_OMIT_AT (1 << 5) ///< Omit position and rotation + // (always saved with potion 0,0 and rotation = 0 in library) // common combinations of the above: diff --git a/pcbnew/modedit.cpp b/pcbnew/modedit.cpp index 1fe0e4ddf5..5557e1f124 100644 --- a/pcbnew/modedit.cpp +++ b/pcbnew/modedit.cpp @@ -292,8 +292,6 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) if( ! Clear_Pcb( true ) ) break; - GetScreen()->ClearUndoRedoList(); - SetCurItem( NULL ); SetCrossHairPosition( wxPoint( 0, 0 ) ); MODULE* module = Create_1_Module( wxEmptyString ); @@ -312,6 +310,8 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) Zoom_Automatique( false ); } + + GetScreen()->ClrModify(); } break; @@ -337,8 +337,6 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) Clear_Pcb( false ); - GetScreen()->ClearUndoRedoList(); - SetCurItem( NULL ); SetCrossHairPosition( wxPoint( 0, 0 ) ); // Add the new object to board @@ -357,6 +355,8 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) if( m_Draw3DFrame ) m_Draw3DFrame->NewDisplay(); + + GetScreen()->ClrModify(); } wizard->Destroy(); @@ -463,8 +463,6 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) if( ! Clear_Pcb( true ) ) break; // //this command is aborted - GetScreen()->ClearUndoRedoList(); - SetCurItem( NULL ); SetCrossHairPosition( wxPoint( 0, 0 ) ); Import_Module(); redraw = true; @@ -538,6 +536,8 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) if( m_Draw3DFrame ) m_Draw3DFrame->NewDisplay(); + GetScreen()->ClrModify(); + break; case ID_MODEDIT_PAD_SETTINGS: diff --git a/utils/idftools/idf2vrml.cpp b/utils/idftools/idf2vrml.cpp index e13604fbfb..b15f68437d 100644 --- a/utils/idftools/idf2vrml.cpp +++ b/utils/idftools/idf2vrml.cpp @@ -102,13 +102,13 @@ struct VRML_IDS #define NCOLORS 7 VRML_COLOR colors[NCOLORS] = { - { { 0, 0.82, 0.247 }, { 0, 0, 0 }, { 0, 0.82, 0.247 }, 0.9, 0, 0.1 }, + { { 0, 0.82, 0.247 }, { 0, 0, 0 }, { 0, 0.82, 0.247 }, 0.9, 0, 0.1 }, { { 1, 0, 0 }, { 1, 0, 0 }, { 1, 0, 0 }, 0.9, 0, 0.1 }, - { { 0.659, 0, 0.463}, { 0, 0, 0}, { 0.659, 0, 0.463 }, 0.9, 0, 0.1 }, - { { 0.659, 0.294, 0 }, { 0, 0, 0 }, { 0.659, 0.294, 0 }, 0.9, 0, 0.1}, - { { 0, 0.918, 0.659 }, { 0, 0, 0 }, { 0, 0.918, 0.659 }, 0.9, 0, 0.1}, - { { 0.808, 0.733 , 0.071 }, { 0, 0, 0 }, { 0.808, 0.733 , 0.071 }, 0.9, 0, 0.1}, - { { 0.102, 1, 0.984 }, { 0, 0, 0 }, { 0.102, 1, 0.984 }, 0.9, 0, 0.1} + { { 0.659, 0, 0.463 }, { 0, 0, 0 }, { 0.659, 0, 0.463 }, 0.9, 0, 0.1 }, + { { 0.659, 0.294, 0 }, { 0, 0, 0 }, { 0.659, 0.294, 0 }, 0.9, 0, 0.1 }, + { { 0, 0.918, 0.659 }, { 0, 0, 0 }, { 0, 0.918, 0.659 }, 0.9, 0, 0.1 }, + { { 0.808, 0.733, 0.071 }, { 0, 0, 0 }, { 0.808, 0.733 , 0.071 }, 0.9, 0, 0.1 }, + { { 0.102, 1, 0.984 }, { 0, 0, 0 }, { 0.102, 1, 0.984 }, 0.9, 0, 0.1 } }; bool WriteHeader( IDF3_BOARD& board, std::ofstream& file ); From 44014b219619b83a1a42e3ac37b92728be229a6f Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 2 Jun 2014 18:16:06 +0200 Subject: [PATCH 473/741] Minor fixes. --- pcbnew/class_track.cpp | 6 +++--- pcbnew/dialogs/dialog_plot_base.cpp | 1 - pcbnew/dialogs/dialog_plot_base.fbp | 2 +- pcbnew/pcbframe.cpp | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index c9f19462ba..183cad4241 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -624,7 +624,7 @@ void TRACK::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, #ifdef USE_WX_OVERLAY // If dragged not draw in OnPaint otherwise remains impressed in wxOverlay - if( (m_Flags && IS_DRAGGED) && aDC->IsKindOf(wxCLASSINFO(wxPaintDC))) + if( (m_Flags & IS_DRAGGED) && aDC->IsKindOf(wxCLASSINFO(wxPaintDC))) return; #endif @@ -691,7 +691,7 @@ void SEGZONE::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, #ifdef USE_WX_OVERLAY // If dragged not draw in OnPaint otherwise remains impressed in wxOverlay - if( (m_Flags && IS_DRAGGED) && aDC->IsKindOf(wxCLASSINFO(wxPaintDC))) + if( (m_Flags & IS_DRAGGED) && aDC->IsKindOf(wxCLASSINFO(wxPaintDC))) return; #endif @@ -1319,7 +1319,7 @@ TRACK* TRACK::GetTrack( TRACK* aStartTrace, TRACK* aEndTrace, ENDPOINT_T aEndPoi if( nextSegment ) { - if ( (nextSegment != this) && + if ( (nextSegment != this) && !nextSegment->GetState( BUSY | IS_DELETED ) && (refLayers & nextSegment->GetLayerMask()) ) { diff --git a/pcbnew/dialogs/dialog_plot_base.cpp b/pcbnew/dialogs/dialog_plot_base.cpp index 4b7b5695d4..b79b361eeb 100644 --- a/pcbnew/dialogs/dialog_plot_base.cpp +++ b/pcbnew/dialogs/dialog_plot_base.cpp @@ -347,7 +347,6 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr sbSizerMsg = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Messages:") ), wxVERTICAL ); m_messagesBox = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY ); - m_messagesBox->SetMaxLength( 0 ); m_messagesBox->SetMinSize( wxSize( -1,70 ) ); sbSizerMsg->Add( m_messagesBox, 1, wxEXPAND, 5 ); diff --git a/pcbnew/dialogs/dialog_plot_base.fbp b/pcbnew/dialogs/dialog_plot_base.fbp index b9e5800cc9..1c97178da6 100644 --- a/pcbnew/dialogs/dialog_plot_base.fbp +++ b/pcbnew/dialogs/dialog_plot_base.fbp @@ -3982,7 +3982,7 @@ 0 - 0 + 0 -1,70 diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index d613206802..d9f4791969 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -605,7 +605,7 @@ void PCB_EDIT_FRAME::OnCloseWindow( wxCloseEvent& Event ) { m_canvas->SetAbortRequest( true ); - if( GetScreen()->IsModify() ) + if( GetScreen()->IsModify() && !GetBoard()->IsEmpty() ) { wxString msg; msg.Printf( _("Save the changes in\n<%s>\nbefore closing?"), From 2af3e5f6e9fcf2b1e6133810f35b58bd1e3722a1 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 3 Jun 2014 09:32:57 +0200 Subject: [PATCH 474/741] bugfix #1325743: cvpcb crashes when opening any netlist. --- pcbnew/legacy_plugin.cpp | 8 ++++---- pcbnew/legacy_plugin.h | 10 ++++++++++ pcbnew/pcb_parser.cpp | 8 ++++---- pcbnew/pcb_parser.h | 10 ++++++++++ 4 files changed, 28 insertions(+), 8 deletions(-) diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index c369ebf65c..42ef2aa80b 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -1305,13 +1305,13 @@ void LEGACY_PLUGIN::loadPAD( MODULE* aModule ) int netcode = intParse( line + SZ( "Ne" ), &data ); // Store the new code mapping - pad->SetNetCode( m_netCodes[netcode] ); + pad->SetNetCode( getNetCode( netcode ) ); // read Netname ReadDelimitedText( buf, data, sizeof(buf) ); #ifndef NDEBUG if( m_board ) - assert( m_board->FindNet( m_netCodes[netcode] )->GetNetname() == + assert( m_board->FindNet( getNetCode( netcode ) )->GetNetname() == FROM_UTF8( StrPurge( buf ) ) ); #endif /* NDEBUG */ } @@ -2102,7 +2102,7 @@ void LEGACY_PLUGIN::loadTrackList( int aStructType ) via->SetLayerPair( LAYER_N_FRONT, LAYER_N_BACK ); } - newTrack->SetNetCode( m_netCodes[net_code] ); + newTrack->SetNetCode( getNetCode( net_code ) ); newTrack->SetState( flags, true ); m_board->Add( newTrack ); @@ -2250,7 +2250,7 @@ void LEGACY_PLUGIN::loadZONE_CONTAINER() // Init the net code only, not the netname, to be sure // the zone net name is the name read in file. // (When mismatch, the user will be prompted in DRC, to fix the actual name) - zc->BOARD_CONNECTED_ITEM::SetNetCode( m_netCodes[netcode] ); + zc->BOARD_CONNECTED_ITEM::SetNetCode( getNetCode( netcode ) ); } else if( TESTLINE( "ZLayer" ) ) // layer found diff --git a/pcbnew/legacy_plugin.h b/pcbnew/legacy_plugin.h index 96747bf84d..37f0ef2f45 100644 --- a/pcbnew/legacy_plugin.h +++ b/pcbnew/legacy_plugin.h @@ -139,6 +139,16 @@ protected: double diskToBiu; ///< convert from disk engineering units to BIUs ///< with this scale factor + ///> Converts net code using the mapping table if available, + ///> otherwise returns unchanged net code + inline int getNetCode( int aNetCode ) + { + if( aNetCode < (int) m_netCodes.size() ) + return m_netCodes[aNetCode]; + + return aNetCode; + } + /** * Function biuParse * parses an ASCII decimal floating point value and scales it into a BIU diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index 8c883099ad..4bf36597af 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -2201,7 +2201,7 @@ D_PAD* PCB_PARSER::parseD_PAD( MODULE* aParent ) throw( IO_ERROR, PARSE_ERROR ) break; case T_net: - pad->SetNetCode( m_netCodes[parseInt( "net number" )] ); + pad->SetNetCode( getNetCode( parseInt( "net number" ) ) ); NeedSYMBOLorNUMBER(); assert( FromUTF8() == m_board->FindNet( pad->GetNetCode() )->GetNetname() ); NeedRIGHT(); @@ -2299,7 +2299,7 @@ TRACK* PCB_PARSER::parseTRACK() throw( IO_ERROR, PARSE_ERROR ) break; case T_net: - track->SetNetCode( m_netCodes[parseInt( "net number" )] ); + track->SetNetCode( getNetCode( parseInt( "net number" ) ) ); break; case T_tstamp: @@ -2377,7 +2377,7 @@ VIA* PCB_PARSER::parseVIA() throw( IO_ERROR, PARSE_ERROR ) break; case T_net: - via->SetNetCode( m_netCodes[parseInt( "net number" )] ); + via->SetNetCode( getNetCode( parseInt( "net number" ) ) ); NeedRIGHT(); break; @@ -2429,7 +2429,7 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER() throw( IO_ERROR, PARSE_ERROR ) // Init the net code only, not the netname, to be sure // the zone net name is the name read in file. // (When mismatch, the user will be prompted in DRC, to fix the actual name) - zone->SetNetCode( m_netCodes[parseInt( "net number" )] ); + zone->SetNetCode( getNetCode( parseInt( "net number" ) ) ); NeedRIGHT(); break; diff --git a/pcbnew/pcb_parser.h b/pcbnew/pcb_parser.h index a07beb3bec..2169bf9ed5 100644 --- a/pcbnew/pcb_parser.h +++ b/pcbnew/pcb_parser.h @@ -69,6 +69,16 @@ class PCB_PARSER : public PCB_LEXER LAYER_MSK_MAP m_layerMasks; ///< map layer names to their masks std::vector m_netCodes; ///< net codes mapping for boards being loaded + ///> Converts net code using the mapping table if available, + ///> otherwise returns unchanged net code + inline int getNetCode( int aNetCode ) + { + if( aNetCode < (int) m_netCodes.size() ) + return m_netCodes[aNetCode]; + + return aNetCode; + } + /** * Function init * clears and re-establishes m_layerMap with the default layer names. From 79631def2c2044c105541b8c614869428e5aab3d Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 3 Jun 2014 16:08:23 +0200 Subject: [PATCH 475/741] Improved ratsnest updating in GAL. --- pcbnew/class_board_connected_item.cpp | 21 ++++++++++++--- pcbnew/netlist.cpp | 9 +++++-- pcbnew/ratsnest_data.cpp | 39 ++++++++++++++++++++------- 3 files changed, 54 insertions(+), 15 deletions(-) diff --git a/pcbnew/class_board_connected_item.cpp b/pcbnew/class_board_connected_item.cpp index d7c54e7925..de349b26fd 100644 --- a/pcbnew/class_board_connected_item.cpp +++ b/pcbnew/class_board_connected_item.cpp @@ -34,6 +34,8 @@ #include #include +#include + BOARD_CONNECTED_ITEM::BOARD_CONNECTED_ITEM( BOARD_ITEM* aParent, KICAD_T idtype ) : BOARD_ITEM( aParent, idtype ), m_netinfo( &NETINFO_LIST::ORPHANED ), m_Subnet( 0 ), m_ZoneSubnet( 0 ) @@ -53,18 +55,29 @@ BOARD_CONNECTED_ITEM::BOARD_CONNECTED_ITEM( const BOARD_CONNECTED_ITEM& aItem ) void BOARD_CONNECTED_ITEM::SetNetCode( int aNetCode ) { BOARD* board = GetBoard(); + NETINFO_ITEM* oldNetInfo = m_netinfo; + NETINFO_ITEM* newNetInfo; + if( board ) { - m_netinfo = board->FindNet( aNetCode ); + newNetInfo = board->FindNet( aNetCode ); // The requested net does not exist, mark it as unconnected - if( m_netinfo == NULL ) - m_netinfo = board->FindNet( NETINFO_LIST::UNCONNECTED ); + if( newNetInfo == NULL ) + newNetInfo = board->FindNet( NETINFO_LIST::UNCONNECTED ); } else { // There is no board that contains list of nets, the item is orphaned - m_netinfo = &NETINFO_LIST::ORPHANED; + newNetInfo = &NETINFO_LIST::ORPHANED; + } + + // Update ratsnest, if necessary + if( oldNetInfo != newNetInfo && board ) + { + board->GetRatsnest()->Remove( this ); + m_netinfo = newNetInfo; + board->GetRatsnest()->Add( this ); } } diff --git a/pcbnew/netlist.cpp b/pcbnew/netlist.cpp index bb840c658f..0d5725cf63 100644 --- a/pcbnew/netlist.cpp +++ b/pcbnew/netlist.cpp @@ -44,6 +44,7 @@ #include #include +#include #include #include @@ -121,7 +122,7 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName, for( MODULE* module = GetBoard()->m_Modules; module; module = module->Next() ) { module->RunOnChildren( boost::bind( &KIGFX::VIEW::Add, view, _1 ) ); - GetGalCanvas()->GetView()->Add( module ); + view->Add( module ); } if( aDeleteUnconnectedTracks && GetBoard()->m_Track ) @@ -131,7 +132,11 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName, } // Rebuild the board connectivity: - Compile_Ratsnest( NULL, true ); + if( IsGalCanvasActive() ) + GetBoard()->GetRatsnest()->Recalculate(); + else + Compile_Ratsnest( NULL, true ); + SetMsgPanel( GetBoard() ); m_canvas->Refresh(); } diff --git a/pcbnew/ratsnest_data.cpp b/pcbnew/ratsnest_data.cpp index f6638a3835..9271f00f42 100644 --- a/pcbnew/ratsnest_data.cpp +++ b/pcbnew/ratsnest_data.cpp @@ -841,8 +841,7 @@ void RN_DATA::Add( const BOARD_ITEM* aItem ) if( net < 1 ) // do not process unconnected items return; - // Autoresize - if( net >= (int) m_nets.size() ) + if( net >= (int) m_nets.size() ) // Autoresize m_nets.resize( net + 1 ); } else if( aItem->Type() == PCB_MODULE_T ) @@ -851,11 +850,11 @@ void RN_DATA::Add( const BOARD_ITEM* aItem ) for( const D_PAD* pad = module->Pads().GetFirst(); pad; pad = pad->Next() ) { net = pad->GetNetCode(); + if( net < 1 ) // do not process unconnected items continue; - // Autoresize - if( net >= (int) m_nets.size() ) + if( net >= (int) m_nets.size() ) // Autoresize m_nets.resize( net + 1 ); m_nets[net].AddItem( pad ); @@ -897,8 +896,19 @@ void RN_DATA::Remove( const BOARD_ITEM* aItem ) if( aItem->IsConnected() ) { net = static_cast( aItem )->GetNetCode(); + if( net < 1 ) // do not process unconnected items return; + +#ifdef NDEBUG + if( net >= (int) m_nets.size() ) // Autoresize + { + m_nets.resize( net + 1 ); + + return; // if it was resized, then surely the item had not been added before + } +#endif + assert( net < (int) m_nets.size() ); } else if( aItem->Type() == PCB_MODULE_T ) { @@ -906,9 +916,20 @@ void RN_DATA::Remove( const BOARD_ITEM* aItem ) for( const D_PAD* pad = module->Pads().GetFirst(); pad; pad = pad->Next() ) { net = pad->GetNetCode(); + if( net < 1 ) // do not process unconnected items continue; +#ifdef NDEBUG + if( net >= (int) m_nets.size() ) // Autoresize + { + m_nets.resize( net + 1 ); + + return; // if it was resized, then surely the item had not been added before + } +#endif + assert( net < (int) m_nets.size() ); + m_nets[net].RemoveItem( pad ); } @@ -993,14 +1014,14 @@ void RN_DATA::ProcessBoard() void RN_DATA::Recalculate( int aNet ) { - if( m_board->GetNetCount() > m_nets.size() ) - m_nets.resize( m_board->GetNetCount() ); + unsigned int netCount = m_board->GetNetCount(); + + if( netCount > m_nets.size() ) + m_nets.resize( netCount ); if( aNet < 0 ) // Recompute everything { - unsigned int i, netCount; - netCount = m_board->GetNetCount(); - + unsigned int i; #ifdef USE_OPENMP #pragma omp parallel shared(netCount) private(i) { From 3480c41caa20271b2a45e3e1025cfc48e847de8b Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 3 Jun 2014 16:09:27 +0200 Subject: [PATCH 476/741] PNS router handles net class settings (dependent on the selected start item). --- include/class_board_design_settings.h | 67 +++++++++++++++++--------- pcbnew/class_board_design_settings.cpp | 4 ++ pcbnew/router/pns_line_placer.cpp | 7 +-- pcbnew/router/pns_line_placer.h | 12 +++-- pcbnew/router/pns_router.cpp | 25 +++++++++- 5 files changed, 80 insertions(+), 35 deletions(-) diff --git a/include/class_board_design_settings.h b/include/class_board_design_settings.h index 28201dd866..4e81ff0652 100644 --- a/include/class_board_design_settings.h +++ b/include/class_board_design_settings.h @@ -114,11 +114,29 @@ public: * Function GetCurrentNetClassName * @return the current net class name. */ - const wxString& GetCurrentNetClassName() const + inline const wxString& GetCurrentNetClassName() const { return m_currentNetClassName; } + /** + * Function UseNetClassTrack + * returns true if netclass values should be used to obtain appropriate track width. + */ + inline bool UseNetClassTrack() const + { + return ( m_trackWidthIndex == 0 && !m_useCustomTrackVia ); + } + + /** + * Function UseNetClassVia + * returns true if netclass values should be used to obtain appropriate via size. + */ + inline bool UseNetClassVia() const + { + return ( m_viaSizeIndex == 0 && !m_useCustomTrackVia ); + } + /** * Function SetCurrentNetClass * Must be called after a netclass selection (or after a netclass parameter change @@ -159,7 +177,7 @@ public: * Function GetTrackWidthIndex * @return the current track width list index. */ - unsigned GetTrackWidthIndex() const { return m_trackWidthIndex; } + inline unsigned GetTrackWidthIndex() const { return m_trackWidthIndex; } /** * Function SetTrackWidthIndex @@ -175,7 +193,7 @@ public: * ( using the default netclass value or a preset/custom value ) * the default netclass is always in m_TrackWidthList[0] */ - int GetCurrentTrackWidth() const + inline int GetCurrentTrackWidth() const { return m_useCustomTrackVia ? m_customTrackWidth : m_TrackWidthList[m_trackWidthIndex]; } @@ -187,7 +205,7 @@ public: * (UseCustomTrackViaSize()). * @param aWidth is the new track width. */ - void SetCustomTrackWidth( int aWidth ) + inline void SetCustomTrackWidth( int aWidth ) { m_customTrackWidth = aWidth; } @@ -196,7 +214,7 @@ public: * Function GetCustomTrackWidth * @return Current custom width for a track. */ - int GetCustomTrackWidth() const + inline int GetCustomTrackWidth() const { return m_customTrackWidth; } @@ -205,7 +223,10 @@ public: * Function GetViaSizeIndex * @return the current via size list index. */ - unsigned GetViaSizeIndex() const { return m_viaSizeIndex; } + inline unsigned GetViaSizeIndex() const + { + return m_viaSizeIndex; + } /** * Function SetViaSizeIndex @@ -221,7 +242,7 @@ public: * ( using the default netclass value or a preset/custom value ) * the default netclass is always in m_TrackWidthList[0] */ - int GetCurrentViaSize() const + inline int GetCurrentViaSize() const { if( m_useCustomTrackVia ) return m_customViaSize.m_Diameter; @@ -236,7 +257,7 @@ public: * (UseCustomTrackViaSize()). * @param aSize is the new drill diameter. */ - void SetCustomViaSize( int aSize ) + inline void SetCustomViaSize( int aSize ) { m_customViaSize.m_Diameter = aSize; } @@ -245,7 +266,7 @@ public: * Function GetCustomViaSize * @return Current custom size for the via diameter. */ - int GetCustomViaSize() const + inline int GetCustomViaSize() const { return m_customViaSize.m_Diameter; } @@ -265,7 +286,7 @@ public: * (UseCustomTrackViaSize()). * @param aDrill is the new drill size. */ - void SetCustomViaDrill( int aDrill ) + inline void SetCustomViaDrill( int aDrill ) { m_customViaSize.m_Drill = aDrill; } @@ -274,7 +295,7 @@ public: * Function GetCustomViaDrill * @return Current custom size for the via drill. */ - int GetCustomViaDrill() const + inline int GetCustomViaDrill() const { return m_customViaSize.m_Drill; } @@ -286,7 +307,7 @@ public: * tracks and vias. * @param aEnabled decides if custom settings should be used for new tracks/vias. */ - void UseCustomTrackViaSize( bool aEnabled ) + inline void UseCustomTrackViaSize( bool aEnabled ) { m_useCustomTrackVia = aEnabled; } @@ -295,7 +316,7 @@ public: * Function UseCustomTrackViaSize * @return True if custom sizes of tracks & vias are enabled, false otherwise. */ - bool UseCustomTrackViaSize() const + inline bool UseCustomTrackViaSize() const { return m_useCustomTrackVia; } @@ -305,7 +326,7 @@ public: * returns a bit-mask of all the layers that are visible * @return int - the visible layers in bit-mapped form. */ - LAYER_MSK GetVisibleLayers() const + inline LAYER_MSK GetVisibleLayers() const { return m_visibleLayers; } @@ -322,7 +343,7 @@ public: * changes the bit-mask of visible layers * @param aMask = The new bit-mask of visible layers */ - void SetVisibleLayers( LAYER_MSK aMask ) + inline void SetVisibleLayers( LAYER_MSK aMask ) { m_visibleLayers = aMask & m_enabledLayers & FULL_LAYERS; } @@ -333,7 +354,7 @@ public: * @param aLayer = The layer to be tested * @return bool - true if the layer is visible. */ - bool IsLayerVisible( LAYER_NUM aLayer ) const + inline bool IsLayerVisible( LAYER_NUM aLayer ) const { // If a layer is disabled, it is automatically invisible return m_visibleLayers & m_enabledLayers & GetLayerMask( aLayer ); @@ -352,7 +373,7 @@ public: * returns a bit-mask of all the element categories that are visible * @return int - the visible element categories in bit-mapped form. */ - int GetVisibleElements() const + inline int GetVisibleElements() const { return m_visibleElements; } @@ -362,7 +383,7 @@ public: * changes the bit-mask of visible element categories * @param aMask = The new bit-mask of visible element categories */ - void SetVisibleElements( int aMask ) + inline void SetVisibleElements( int aMask ) { m_visibleElements = aMask; } @@ -375,7 +396,7 @@ public: * @return bool - true if the element is visible. * @see enum PCB_VISIBLE */ - bool IsElementVisible( int aElementCategory ) const + inline bool IsElementVisible( int aElementCategory ) const { assert( aElementCategory >= 0 && aElementCategory < END_PCB_VISIBLE_LIST ); @@ -414,7 +435,7 @@ public: * @param aLayer = The of the layer to be tested * @return bool - true if the layer is enabled */ - bool IsLayerEnabled( LAYER_NUM aLayer ) const + inline bool IsLayerEnabled( LAYER_NUM aLayer ) const { return m_enabledLayers & GetLayerMask( aLayer ); } @@ -423,7 +444,7 @@ public: * Function GetCopperLayerCount * @return int - the number of neabled copper layers */ - int GetCopperLayerCount() const + inline int GetCopperLayerCount() const { return m_copperLayerCount; } @@ -443,8 +464,8 @@ public: */ void AppendConfigs( PARAM_CFG_ARRAY* aResult ); - int GetBoardThickness() const { return m_boardThickness; } - void SetBoardThickness( int aThickness ) { m_boardThickness = aThickness; } + inline int GetBoardThickness() const { return m_boardThickness; } + inline void SetBoardThickness( int aThickness ) { m_boardThickness = aThickness; } private: /// Index for #m_ViasDimensionsList to select the current via size. diff --git a/pcbnew/class_board_design_settings.cpp b/pcbnew/class_board_design_settings.cpp index b4017ae21d..975972b1aa 100644 --- a/pcbnew/class_board_design_settings.cpp +++ b/pcbnew/class_board_design_settings.cpp @@ -274,6 +274,8 @@ void BOARD_DESIGN_SETTINGS::SetViaSizeIndex( unsigned aIndex ) m_viaSizeIndex = m_ViasDimensionsList.size(); else m_viaSizeIndex = aIndex; + + m_useCustomTrackVia = false; } @@ -296,6 +298,8 @@ void BOARD_DESIGN_SETTINGS::SetTrackWidthIndex( unsigned aIndex ) m_trackWidthIndex = m_TrackWidthList.size(); else m_trackWidthIndex = aIndex; + + m_useCustomTrackVia = false; } diff --git a/pcbnew/router/pns_line_placer.cpp b/pcbnew/router/pns_line_placer.cpp index 3b94a2ed1f..e60729c90c 100644 --- a/pcbnew/router/pns_line_placer.cpp +++ b/pcbnew/router/pns_line_placer.cpp @@ -764,12 +764,6 @@ void PNS_LINE_PLACER::SetLayer(int aLayer) } -void PNS_LINE_PLACER::SetWidth(int aWidth) -{ - m_currentWidth = aWidth; -} - - void PNS_LINE_PLACER::Start( const VECTOR2I& aP, PNS_ITEM* aStartItem ) { VECTOR2I p( aP ); @@ -995,6 +989,7 @@ void PNS_LINE_PLACER::UpdateSizes( const PNS_ROUTING_SETTINGS& aSettings ) m_head.SetWidth( trackWidth ); m_tail.SetWidth( trackWidth ); + m_currentWidth = trackWidth; m_viaDiameter = aSettings.GetViaDiameter(); m_viaDrill = aSettings.GetViaDrill(); } diff --git a/pcbnew/router/pns_line_placer.h b/pcbnew/router/pns_line_placer.h index 66fdb32c17..1ae3b2d69c 100644 --- a/pcbnew/router/pns_line_placer.h +++ b/pcbnew/router/pns_line_placer.h @@ -252,7 +252,7 @@ private: * and redundant vertexes. If a simplification bhas been found, replaces the * old line with the simplified one in aNode. */ - void simplifyNewLine ( PNS_NODE *aNode, PNS_SEGMENT *aLatest ); + void simplifyNewLine( PNS_NODE *aNode, PNS_SEGMENT *aLatest ); /** * Function handleViaPlacement() @@ -338,13 +338,13 @@ private: void routeStep( const VECTOR2I& aP ); ///> route step, walkaround mode - bool rhWalkOnly ( const VECTOR2I& aP, PNS_LINE& aNewHead); + bool rhWalkOnly( const VECTOR2I& aP, PNS_LINE& aNewHead); ///> route step, shove mode - bool rhShoveOnly ( const VECTOR2I& aP, PNS_LINE& aNewHead); + bool rhShoveOnly( const VECTOR2I& aP, PNS_LINE& aNewHead); ///> route step, mark obstacles mode - bool rhMarkObstacles ( const VECTOR2I& aP, PNS_LINE& aNewHead ); + bool rhMarkObstacles( const VECTOR2I& aP, PNS_LINE& aNewHead ); ///> current routing direction DIRECTION_45 m_direction; @@ -386,7 +386,9 @@ private: ///> current via drill int m_viaDrill; + ///> current track width int m_currentWidth; + int m_currentNet; int m_currentLayer; @@ -395,7 +397,7 @@ private: VECTOR2I m_originalStart, m_currentEnd, m_currentStart; PNS_LINE m_currentTrace; - PNS_MODE m_currentMode; + PNS_MODE m_currentMode; }; #endif // __PNS_LINE_PLACER_H diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index b45ec0deff..e10ebd9190 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -484,7 +484,30 @@ bool PNS_ROUTER::StartRouting( const VECTOR2I& aP, PNS_ITEM* aStartItem ) m_placer = new PNS_LINE_PLACER( this ); m_placer->SetLayer( m_currentLayer ); - m_placer->SetWidth( m_settings.GetTrackWidth() ); + + const BOARD_DESIGN_SETTINGS& dsnSettings = m_board->GetDesignSettings(); + + if( dsnSettings.UseNetClassTrack() && aStartItem != NULL ) // netclass value + { + m_settings.SetTrackWidth( aStartItem->Parent()->GetNetClass()->GetTrackWidth() ); + } + else + { + m_settings.SetTrackWidth( dsnSettings.GetCurrentTrackWidth() ); + } + + if( dsnSettings.UseNetClassVia() && aStartItem != NULL ) // netclass value + { + m_settings.SetViaDiameter( aStartItem->Parent()->GetNetClass()->GetViaDiameter() ); + m_settings.SetViaDrill( aStartItem->Parent()->GetNetClass()->GetViaDrill() ); + } + else + { + m_settings.SetViaDiameter( dsnSettings.GetCurrentViaSize() ); + m_settings.SetViaDrill( dsnSettings.GetCurrentViaDrill() ); + } + + m_placer->UpdateSizes( m_settings ); m_placer->Start( aP, aStartItem ); m_currentEnd = aP; m_currentEndItem = NULL; From 093f810df33878f3d241ec55c9b599c3b0b65e40 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Tue, 3 Jun 2014 10:31:58 -0500 Subject: [PATCH 477/741] wxFrame GetParent() strategy is obsolete, use Kiway().Player() --- eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp index 37831227d9..4378cc00c9 100644 --- a/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp +++ b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp @@ -507,8 +507,9 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::initBuffers() // Add template fieldnames: // Now copy in the template fields, in the order that they are present in the // template field editor UI. - const TEMPLATE_FIELDNAMES& tfnames = - ((SCH_EDIT_FRAME*)m_parent->GetParent())->GetTemplateFieldNames(); + SCH_EDIT_FRAME* editor = (SCH_EDIT_FRAME*) Kiway().Player( FRAME_SCH, true ); + + const TEMPLATE_FIELDNAMES& tfnames = editor->GetTemplateFieldNames(); for( TEMPLATE_FIELDNAMES::const_iterator it = tfnames.begin(); it!=tfnames.end(); ++it ) { From 431675933a5ada7676a0d590a9fc98971cae3eaf Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Tue, 3 Jun 2014 10:59:52 -0500 Subject: [PATCH 478/741] remove global g_UserLibDirBuffer which was a project specific global, and no longer used with FP_LIB_TABLE support. --- CMakeLists.txt | 1 + TODO.txt | 4 +++- common/common.cpp | 1 - cvpcb/CMakeLists.txt | 5 ----- cvpcb/cfg.cpp | 8 +------- cvpcb/cvframe.cpp | 1 - cvpcb/cvpcb_mainframe.h | 1 - ...fig.cpp => dialog_cvpcb_config.cpp.notused} | 0 ..._config.h => dialog_cvpcb_config.h.notused} | 0 ...cpp => dialog_cvpcb_config_fbp.cpp.notused} | 0 ...fbp => dialog_cvpcb_config_fbp.fbp.notused} | 0 eeschema/dialogs/dialog_eeschema_config.cpp | 3 +-- include/common.h | 3 --- pcbnew/pcbnew_config.cpp | 2 -- template/kicad.pro | 18 ------------------ 15 files changed, 6 insertions(+), 41 deletions(-) rename cvpcb/dialogs/{dialog_cvpcb_config.cpp => dialog_cvpcb_config.cpp.notused} (100%) rename cvpcb/dialogs/{dialog_cvpcb_config.h => dialog_cvpcb_config.h.notused} (100%) rename cvpcb/dialogs/{dialog_cvpcb_config_fbp.cpp => dialog_cvpcb_config_fbp.cpp.notused} (100%) rename cvpcb/dialogs/{dialog_cvpcb_config_fbp.fbp => dialog_cvpcb_config_fbp.fbp.notused} (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 575ddf773d..1cef80fdb2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -212,6 +212,7 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) # Defeat ELF's ability to use the GOT to replace locally implemented functions # with ones from another module. + # https://bugs.launchpad.net/kicad/+bug/1322354 set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${TO_LINKER},-Bsymbolic" ) set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${TO_LINKER},-Bsymbolic" ) endif() diff --git a/TODO.txt b/TODO.txt index 690c07e01c..671d0b0ee7 100644 --- a/TODO.txt +++ b/TODO.txt @@ -69,4 +69,6 @@ Dick's Final TODO List: https://blueprints.launchpad.net/kicad/+spec/modular-kicad Issues as a result of minimal testing: - Kicad project manager will crash when requesting help file. + If eeschema launched from C++ project manager does not find all libraries, + then the dialog showing the names of missing libraries is not visible, + probably because the wxFrame parent is not yet visible. diff --git a/common/common.cpp b/common/common.cpp index f52e6469b9..40b2df4ee0 100644 --- a/common/common.cpp +++ b/common/common.cpp @@ -59,7 +59,6 @@ */ bool g_ShowPageLimits = true; -wxString g_UserLibDirBuffer; EDA_UNITS_T g_UserUnit; EDA_COLOR_T g_GhostColor; diff --git a/cvpcb/CMakeLists.txt b/cvpcb/CMakeLists.txt index 626c41867b..521e21a5c8 100644 --- a/cvpcb/CMakeLists.txt +++ b/cvpcb/CMakeLists.txt @@ -21,11 +21,6 @@ include_directories( set( CVPCB_DIALOGS - - # These 2 still use search paths, which don't exist in footprint land. -# dialogs/dialog_cvpcb_config.cpp -# dialogs/dialog_cvpcb_config_fbp.cpp - dialogs/dialog_display_options.cpp dialogs/dialog_display_options_base.cpp ../pcbnew/dialogs/dialog_fp_lib_table.cpp diff --git a/cvpcb/cfg.cpp b/cvpcb/cfg.cpp index 1764a7f871..b0b1778ed2 100644 --- a/cvpcb/cfg.cpp +++ b/cvpcb/cfg.cpp @@ -49,18 +49,12 @@ PARAM_CFG_ARRAY& CVPCB_MAINFRAME::GetProjectFileParameters() m_projectFileParams.push_back( new PARAM_CFG_BASE( GROUP_PCB_LIBS, PARAM_COMMAND_ERASE ) ); - m_projectFileParams.push_back( new PARAM_CFG_LIBNAME_LIST( - wxT( "LibName" ), &m_ModuleLibNames, GROUP_PCB_LIBS ) ); - m_projectFileParams.push_back( new PARAM_CFG_LIBNAME_LIST( wxT( "EquName" ), &m_AliasLibNames, GROUP_CVP_EQU ) ); m_projectFileParams.push_back( new PARAM_CFG_WXSTRING( wxT( "NetIExt" ), &m_NetlistFileExtension ) ); - m_projectFileParams.push_back( new PARAM_CFG_FILENAME( - wxT( "LibDir" ), &m_UserLibraryPath, GROUP_PCB_LIBS ) ); - return m_projectFileParams; } @@ -81,7 +75,7 @@ void CVPCB_MAINFRAME::LoadProjectFile( const wxString& aFileName ) if( m_NetlistFileExtension.IsEmpty() ) m_NetlistFileExtension = wxT( "net" ); - // Force it to be loaded on demand. + // Force FP_LIB_TABLE to be loaded on demand. prj.ElemClear( PROJECT::ELEM_FPTBL ); } diff --git a/cvpcb/cvframe.cpp b/cvpcb/cvframe.cpp index 7079e40287..88b3aa688c 100644 --- a/cvpcb/cvframe.cpp +++ b/cvpcb/cvframe.cpp @@ -45,7 +45,6 @@ #include #include #include -#include #include #include diff --git a/cvpcb/cvpcb_mainframe.h b/cvpcb/cvpcb_mainframe.h index 7b136746a9..359c7e20b9 100644 --- a/cvpcb/cvpcb_mainframe.h +++ b/cvpcb/cvpcb_mainframe.h @@ -67,7 +67,6 @@ public: wxFileName m_NetlistFileName; wxArrayString m_ModuleLibNames; wxArrayString m_AliasLibNames; - wxString m_UserLibraryPath; wxString m_NetlistFileExtension; wxString m_DocModulesFileName; FOOTPRINT_LIST m_footprints; diff --git a/cvpcb/dialogs/dialog_cvpcb_config.cpp b/cvpcb/dialogs/dialog_cvpcb_config.cpp.notused similarity index 100% rename from cvpcb/dialogs/dialog_cvpcb_config.cpp rename to cvpcb/dialogs/dialog_cvpcb_config.cpp.notused diff --git a/cvpcb/dialogs/dialog_cvpcb_config.h b/cvpcb/dialogs/dialog_cvpcb_config.h.notused similarity index 100% rename from cvpcb/dialogs/dialog_cvpcb_config.h rename to cvpcb/dialogs/dialog_cvpcb_config.h.notused diff --git a/cvpcb/dialogs/dialog_cvpcb_config_fbp.cpp b/cvpcb/dialogs/dialog_cvpcb_config_fbp.cpp.notused similarity index 100% rename from cvpcb/dialogs/dialog_cvpcb_config_fbp.cpp rename to cvpcb/dialogs/dialog_cvpcb_config_fbp.cpp.notused diff --git a/cvpcb/dialogs/dialog_cvpcb_config_fbp.fbp b/cvpcb/dialogs/dialog_cvpcb_config_fbp.fbp.notused similarity index 100% rename from cvpcb/dialogs/dialog_cvpcb_config_fbp.fbp rename to cvpcb/dialogs/dialog_cvpcb_config_fbp.fbp.notused diff --git a/eeschema/dialogs/dialog_eeschema_config.cpp b/eeschema/dialogs/dialog_eeschema_config.cpp index f4f01e4043..61fa686e63 100644 --- a/eeschema/dialogs/dialog_eeschema_config.cpp +++ b/eeschema/dialogs/dialog_eeschema_config.cpp @@ -57,8 +57,7 @@ private: SCH_EDIT_FRAME* m_Parent; bool m_LibListChanged; bool m_LibPathChanged; - wxString m_UserLibDirBufferImg; // Copy of original g_UserLibDirBuffer - + wxString m_UserLibDirBufferImg; // event handlers, overiding the fbp handlers void Init(); diff --git a/include/common.h b/include/common.h index f7d222adc6..304fdf44a0 100644 --- a/include/common.h +++ b/include/common.h @@ -384,9 +384,6 @@ private: void setMargins(); }; -/// Default user lib path can be left void, if the standard lib path is used -extern wxString g_UserLibDirBuffer; - extern bool g_ShowPageLimits; ///< true to display the page limits extern EDA_UNITS_T g_UserUnit; ///< display units diff --git a/pcbnew/pcbnew_config.cpp b/pcbnew/pcbnew_config.cpp index 00452262ce..45ee46192e 100644 --- a/pcbnew/pcbnew_config.cpp +++ b/pcbnew/pcbnew_config.cpp @@ -301,8 +301,6 @@ PARAM_CFG_ARRAY PCB_EDIT_FRAME::GetProjectFileParameters() pca.push_back( new PARAM_CFG_FILENAME( wxT( "PageLayoutDescrFile" ), &BASE_SCREEN::m_PageLayoutDescrFileName ) ); - pca.push_back( new PARAM_CFG_FILENAME( wxT( "LibDir" ), &g_UserLibDirBuffer, GROUP_PCB_LIBS ) ); - pca.push_back( new PARAM_CFG_FILENAME( wxT( "LastNetListRead" ), &m_lastNetListRead ) ); pca.push_back( new PARAM_CFG_BOOL( wxT( "UseCmpFile" ), &m_useCmpFileForFpNames, true ) ); diff --git a/template/kicad.pro b/template/kicad.pro index 80e5d98dbd..f5795a5b16 100644 --- a/template/kicad.pro +++ b/template/kicad.pro @@ -68,21 +68,3 @@ SolderMaskMinWidth=0.000000000000 DrawSegmentWidth=0.200000000000 BoardOutlineThickness=0.100000000000 ModuleOutlineThickness=0.150000000000 -[pcbnew/libraries] -LibDir= -LibName1=sockets -LibName2=connect -LibName3=discret -LibName4=pin_array -LibName5=divers -LibName6=smd_capacitors -LibName7=smd_resistors -LibName8=smd_crystal&oscillator -LibName9=smd_dil -LibName10=smd_transistors -LibName11=libcms -LibName12=display -LibName13=led -LibName14=dip_sockets -LibName15=pga_sockets -LibName16=valves From f76041e9566867dd3d2595d699dd2062095f03f9 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 4 Jun 2014 19:34:23 +0200 Subject: [PATCH 479/741] Fix some compil warnings and Debug assertions --- common/gal/stroke_font.cpp | 4 +-- cvpcb/class_components_listbox.cpp | 8 ++--- cvpcb/class_footprints_listbox.cpp | 4 +-- cvpcb/class_library_listbox.cpp | 4 +-- cvpcb/cvstruct.h | 6 ++-- eeschema/dialog_erc_listbox.h | 29 +++++++++++++++---- .../dialogs/dialog_lib_edit_text_base.cpp | 2 +- .../dialogs/dialog_lib_edit_text_base.fbp | 2 +- pcbnew/dialogs/dialog_drc_base.cpp | 9 +++++- pcbnew/dialogs/dialog_drc_base.fbp | 4 ++- pcbnew/dialogs/dialog_drc_base.h | 6 ++-- pcbnew/dialogs/dialog_gendrill_base.cpp | 3 +- pcbnew/dialogs/dialog_gendrill_base.fbp | 2 +- pcbnew/dialogs/dialog_gendrill_base.h | 2 +- pcbnew/dialogs/dialog_netlist_fbp.cpp | 3 +- pcbnew/dialogs/dialog_netlist_fbp.fbp | 4 ++- pcbnew/dialogs/dialog_netlist_fbp.h | 2 +- utils/idftools/idf_parser.cpp | 12 ++++---- 18 files changed, 67 insertions(+), 39 deletions(-) diff --git a/common/gal/stroke_font.cpp b/common/gal/stroke_font.cpp index 2020954d61..346769b937 100644 --- a/common/gal/stroke_font.cpp +++ b/common/gal/stroke_font.cpp @@ -268,7 +268,7 @@ void STROKE_FONT::drawSingleLineText( const UTF8& aText ) // If it is a double tilda, just process the second one } - unsigned dd = *chIt - ' '; + int dd = *chIt - ' '; if( dd >= m_glyphBoundingBoxes.size() || dd < 0 ) dd = '?' - ' '; @@ -336,7 +336,7 @@ VECTOR2D STROKE_FONT::computeTextSize( const UTF8& aText ) const } // Index in the bounding boxes table - unsigned dd = *it - ' '; + int dd = *it - ' '; if( dd >= m_glyphBoundingBoxes.size() || dd < 0 ) dd = '?' - ' '; diff --git a/cvpcb/class_components_listbox.cpp b/cvpcb/class_components_listbox.cpp index a99517370b..acc59a1c04 100644 --- a/cvpcb/class_components_listbox.cpp +++ b/cvpcb/class_components_listbox.cpp @@ -71,7 +71,7 @@ void COMPONENTS_LISTBOX::SetString( unsigned linecount, const wxString& text ) if( linecount >= m_ComponentList.Count() ) linecount = m_ComponentList.Count() - 1; - if( linecount >= 0 ) + if( m_ComponentList.Count() > 0 ) m_ComponentList[linecount] = text; } @@ -89,9 +89,9 @@ wxString COMPONENTS_LISTBOX::OnGetItemText( long item, long column ) const } -void COMPONENTS_LISTBOX::SetSelection( unsigned index, bool State ) +void COMPONENTS_LISTBOX::SetSelection( int index, bool State ) { - if( (int) index >= GetCount() ) + if( index >= GetCount() ) index = GetCount() - 1; if( (index >= 0) && (GetCount() > 0) ) @@ -164,7 +164,7 @@ void COMPONENTS_LISTBOX::OnChar( wxKeyEvent& event ) if( key == start_char ) { - SetSelection( ii, true ); // Ensure visible + SetSelection( (int) ii, true ); // Ensure visible break; } } diff --git a/cvpcb/class_footprints_listbox.cpp b/cvpcb/class_footprints_listbox.cpp index d09cee580b..2dfbf93bc5 100644 --- a/cvpcb/class_footprints_listbox.cpp +++ b/cvpcb/class_footprints_listbox.cpp @@ -101,9 +101,9 @@ wxString FOOTPRINTS_LISTBOX::OnGetItemText( long item, long column ) const } -void FOOTPRINTS_LISTBOX::SetSelection( unsigned index, bool State ) +void FOOTPRINTS_LISTBOX::SetSelection( int index, bool State ) { - if( (int) index >= GetCount() ) + if( index >= GetCount() ) index = GetCount() - 1; if( (index >= 0) && (GetCount() > 0) ) diff --git a/cvpcb/class_library_listbox.cpp b/cvpcb/class_library_listbox.cpp index 4149f285ca..e543b81459 100644 --- a/cvpcb/class_library_listbox.cpp +++ b/cvpcb/class_library_listbox.cpp @@ -95,9 +95,9 @@ wxString LIBRARY_LISTBOX::OnGetItemText( long item, long column ) const } -void LIBRARY_LISTBOX::SetSelection( unsigned index, bool State ) +void LIBRARY_LISTBOX::SetSelection( int index, bool State ) { - if( (int) index >= GetCount() ) + if( index >= GetCount() ) index = GetCount() - 1; if( (index >= 0) && (GetCount() > 0) ) diff --git a/cvpcb/cvstruct.h b/cvpcb/cvstruct.h index 7078a8d8a8..fcf9cf419d 100644 --- a/cvpcb/cvstruct.h +++ b/cvpcb/cvstruct.h @@ -78,7 +78,7 @@ public: ~FOOTPRINTS_LISTBOX(); int GetCount(); - void SetSelection( unsigned index, bool State = true ); + void SetSelection( int index, bool State = true ); void SetString( unsigned linecount, const wxString& text ); void AppendLine( const wxString& text ); @@ -127,7 +127,7 @@ public: ~LIBRARY_LISTBOX(); int GetCount(); - void SetSelection( unsigned index, bool State = true ); + void SetSelection( int index, bool State = true ); void SetString( unsigned linecount, const wxString& text ); void AppendLine( const wxString& text ); void SetLibraryList( const wxArrayString& aList ); @@ -187,7 +187,7 @@ public: /* * Enable or disable an item */ - void SetSelection( unsigned index, bool State = true ); + void SetSelection( int index, bool State = true ); void SetString( unsigned linecount, const wxString& text ); void AppendLine( const wxString& text ); diff --git a/eeschema/dialog_erc_listbox.h b/eeschema/dialog_erc_listbox.h index 9bd8a6b33f..3e8e250ca5 100644 --- a/eeschema/dialog_erc_listbox.h +++ b/eeschema/dialog_erc_listbox.h @@ -1,8 +1,25 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dialog_erc.h -// Author: jean-pierre Charras -// Licence: GPL -///////////////////////////////////////////////////////////////////////////// +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 1992-2012 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 + */ #ifndef DIALOG_ERC_LISTBOX_H #define DIALOG_ERC_LISTBOX_H @@ -76,7 +93,7 @@ public: */ wxString OnGetItem( size_t n ) const { - if( m_MarkerList.size() > n && n >= 0 ) + if( m_MarkerList.size() > n ) { const SCH_MARKER* item = m_MarkerList[ n ]; if( item ) diff --git a/eeschema/dialogs/dialog_lib_edit_text_base.cpp b/eeschema/dialogs/dialog_lib_edit_text_base.cpp index 64f93d038a..85e80ca162 100644 --- a/eeschema/dialogs/dialog_lib_edit_text_base.cpp +++ b/eeschema/dialogs/dialog_lib_edit_text_base.cpp @@ -77,7 +77,7 @@ DIALOG_LIB_EDIT_TEXT_BASE::DIALOG_LIB_EDIT_TEXT_BASE( wxWindow* parent, wxWindow sOptionsSizer->Add( m_Invisible, 0, wxALL, 5 ); - bBottomtBoxSizer->Add( sOptionsSizer, 1, wxALL|wxEXPAND, 5 ); + bBottomtBoxSizer->Add( sOptionsSizer, 0, wxALL|wxEXPAND, 5 ); wxString m_TextShapeOptChoices[] = { _("Normal"), _("Italic"), _("Bold"), _("Bold Italic") }; int m_TextShapeOptNChoices = sizeof( m_TextShapeOptChoices ) / sizeof( wxString ); diff --git a/eeschema/dialogs/dialog_lib_edit_text_base.fbp b/eeschema/dialogs/dialog_lib_edit_text_base.fbp index a2a6f9d714..8c53332832 100644 --- a/eeschema/dialogs/dialog_lib_edit_text_base.fbp +++ b/eeschema/dialogs/dialog_lib_edit_text_base.fbp @@ -495,7 +495,7 @@ 5 wxALL|wxEXPAND - 1 + 0 wxID_ANY Options diff --git a/pcbnew/dialogs/dialog_drc_base.cpp b/pcbnew/dialogs/dialog_drc_base.cpp index e5e93c25c5..0bbad3ce9c 100644 --- a/pcbnew/dialogs/dialog_drc_base.cpp +++ b/pcbnew/dialogs/dialog_drc_base.cpp @@ -1,10 +1,12 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 10 2012) +// C++ code generated with wxFormBuilder (version Nov 6 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// +#include "dialog_drclistbox.h" + #include "dialog_drc_base.h" /////////////////////////////////////////////////////////////////////////// @@ -36,6 +38,7 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i fgMinValuesSizer->Add( m_ClearanceTitle, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 ); m_SetClearance = new wxTextCtrl( this, wxID_ANY, _("By Netclass"), wxDefaultPosition, wxDefaultSize, 0 ); + m_SetClearance->SetMaxLength( 0 ); m_SetClearance->Enable( false ); fgMinValuesSizer->Add( m_SetClearance, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 ); @@ -47,6 +50,7 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i fgMinValuesSizer->Add( m_TrackMinWidthTitle, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 ); m_SetTrackMinWidthCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_SetTrackMinWidthCtrl->SetMaxLength( 0 ); fgMinValuesSizer->Add( m_SetTrackMinWidthCtrl, 0, wxALL|wxEXPAND, 5 ); m_ViaMinTitle = new wxStaticText( this, wxID_ANY, _("Min via size"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -56,6 +60,7 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i fgMinValuesSizer->Add( m_ViaMinTitle, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 ); m_SetViaMinSizeCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_SetViaMinSizeCtrl->SetMaxLength( 0 ); fgMinValuesSizer->Add( m_SetViaMinSizeCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 ); m_MicroViaMinTitle = new wxStaticText( this, wxID_ANY, _("Min uVia size"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -65,6 +70,7 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i fgMinValuesSizer->Add( m_MicroViaMinTitle, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 ); m_SetMicroViakMinSizeCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_SetMicroViakMinSizeCtrl->SetMaxLength( 0 ); fgMinValuesSizer->Add( m_SetMicroViakMinSizeCtrl, 0, wxALL|wxEXPAND, 5 ); @@ -79,6 +85,7 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i ReportFileSizer->Add( m_CreateRptCtrl, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); m_RptFilenameCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_RptFilenameCtrl->SetMaxLength( 0 ); m_RptFilenameCtrl->SetToolTip( _("Enter the report filename") ); m_RptFilenameCtrl->SetMinSize( wxSize( 180,-1 ) ); diff --git a/pcbnew/dialogs/dialog_drc_base.fbp b/pcbnew/dialogs/dialog_drc_base.fbp index ecadf69394..567c8e7985 100644 --- a/pcbnew/dialogs/dialog_drc_base.fbp +++ b/pcbnew/dialogs/dialog_drc_base.fbp @@ -20,8 +20,10 @@ . 1 + 1 1 1 + UI 0 0 @@ -1247,7 +1249,7 @@ 0 - 0 + 0 220,-1 diff --git a/pcbnew/dialogs/dialog_drc_base.h b/pcbnew/dialogs/dialog_drc_base.h index 07a1cd1865..e86e117322 100644 --- a/pcbnew/dialogs/dialog_drc_base.h +++ b/pcbnew/dialogs/dialog_drc_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 10 2012) +// C++ code generated with wxFormBuilder (version Nov 6 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -11,7 +11,9 @@ #include #include #include -#include "dialog_drclistbox.h" +class DIALOG_SHIM; +class DRCLISTBOX; + #include "dialog_shim.h" #include #include diff --git a/pcbnew/dialogs/dialog_gendrill_base.cpp b/pcbnew/dialogs/dialog_gendrill_base.cpp index 126fce0196..5f1d4047c7 100644 --- a/pcbnew/dialogs/dialog_gendrill_base.cpp +++ b/pcbnew/dialogs/dialog_gendrill_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Feb 26 2014) +// C++ code generated with wxFormBuilder (version Nov 6 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -190,7 +190,6 @@ DIALOG_GENDRILL_BASE::DIALOG_GENDRILL_BASE( wxWindow* parent, wxWindowID id, con bmsgSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Messages:") ), wxVERTICAL ); m_messagesBox = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY ); - m_messagesBox->SetMaxLength( 0 ); m_messagesBox->SetMinSize( wxSize( -1,90 ) ); bmsgSizer->Add( m_messagesBox, 1, wxALL|wxEXPAND, 5 ); diff --git a/pcbnew/dialogs/dialog_gendrill_base.fbp b/pcbnew/dialogs/dialog_gendrill_base.fbp index 467f67066f..aa0178f3e2 100644 --- a/pcbnew/dialogs/dialog_gendrill_base.fbp +++ b/pcbnew/dialogs/dialog_gendrill_base.fbp @@ -2133,7 +2133,7 @@ 0 - 0 + 0 -1,90 diff --git a/pcbnew/dialogs/dialog_gendrill_base.h b/pcbnew/dialogs/dialog_gendrill_base.h index fc61ef59de..7d5c27a9a7 100644 --- a/pcbnew/dialogs/dialog_gendrill_base.h +++ b/pcbnew/dialogs/dialog_gendrill_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Feb 26 2014) +// C++ code generated with wxFormBuilder (version Nov 6 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! diff --git a/pcbnew/dialogs/dialog_netlist_fbp.cpp b/pcbnew/dialogs/dialog_netlist_fbp.cpp index 243f306f69..716e38c6a1 100644 --- a/pcbnew/dialogs/dialog_netlist_fbp.cpp +++ b/pcbnew/dialogs/dialog_netlist_fbp.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 8 2012) +// C++ code generated with wxFormBuilder (version Nov 6 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -173,7 +173,6 @@ DIALOG_NETLIST_FBP::DIALOG_NETLIST_FBP( wxWindow* parent, wxWindowID id, const w 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 ); m_MessageWindow->SetMinSize( wxSize( 300,150 ) ); bLowerSizer->Add( m_MessageWindow, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); diff --git a/pcbnew/dialogs/dialog_netlist_fbp.fbp b/pcbnew/dialogs/dialog_netlist_fbp.fbp index 35f547a11d..cdc4eb9c25 100644 --- a/pcbnew/dialogs/dialog_netlist_fbp.fbp +++ b/pcbnew/dialogs/dialog_netlist_fbp.fbp @@ -20,8 +20,10 @@ . 1 + 1 1 1 + UI 1 0 @@ -1974,7 +1976,7 @@ 0 - 0 + 0 300,150 diff --git a/pcbnew/dialogs/dialog_netlist_fbp.h b/pcbnew/dialogs/dialog_netlist_fbp.h index 6ecadf84da..72977ac72a 100644 --- a/pcbnew/dialogs/dialog_netlist_fbp.h +++ b/pcbnew/dialogs/dialog_netlist_fbp.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 8 2012) +// C++ code generated with wxFormBuilder (version Nov 6 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! diff --git a/utils/idftools/idf_parser.cpp b/utils/idftools/idf_parser.cpp index 37d4b0a24a..018be43aa2 100644 --- a/utils/idftools/idf_parser.cpp +++ b/utils/idftools/idf_parser.cpp @@ -1488,8 +1488,8 @@ bool IDF3_BOARD::setUnit( IDF3::IDF_UNIT aUnit, bool convert ) do { - std::map::iterator its = olnGroup.begin(); - std::map::iterator ite = olnGroup.end(); + std::multimap::iterator its = olnGroup.begin(); + std::multimap::iterator ite = olnGroup.end(); while( its != ite ) { @@ -2905,8 +2905,8 @@ void IDF3_BOARD::writeBoardFile( const std::string& aFileName ) // PLACEMENT GROUP outlines do { - std::map::iterator its = olnGroup.begin(); - std::map::iterator ite = olnGroup.end(); + std::multimap::iterator its = olnGroup.begin(); + std::multimap::iterator ite = olnGroup.end(); while( its != ite ) { @@ -4102,8 +4102,8 @@ void IDF3_BOARD::Clear( void ) // delete PLACEMENT GROUP outlines do { - std::map::iterator os = olnGroup.begin(); - std::map::iterator oe = olnGroup.end(); + std::multimap::iterator os = olnGroup.begin(); + std::multimap::iterator oe = olnGroup.end(); while( os != oe ) { From 20f512e516dbcf59049d14eeb1f8b02db7990e1c Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Wed, 4 Jun 2014 20:06:52 -0500 Subject: [PATCH 480/741] Fix off by one error in libpart editor when displaying duplicate pins, unit numbers. Fix segfault when deleting last user path from eeschema libpaths and then pressing cancel. --- TODO.txt | 5 +- eeschema/dialogs/dialog_eeschema_config.cpp | 2 +- eeschema/eelibs_read_libraryfiles.cpp | 2 + eeschema/pinedit.cpp | 76 ++++++++++----------- 4 files changed, 42 insertions(+), 43 deletions(-) diff --git a/TODO.txt b/TODO.txt index 671d0b0ee7..2972328835 100644 --- a/TODO.txt +++ b/TODO.txt @@ -69,6 +69,5 @@ Dick's Final TODO List: https://blueprints.launchpad.net/kicad/+spec/modular-kicad Issues as a result of minimal testing: - If eeschema launched from C++ project manager does not find all libraries, - then the dialog showing the names of missing libraries is not visible, - probably because the wxFrame parent is not yet visible. + If eeschema launched from C++ project manager and does not find all libraries, + then the dialog showing the names of missing libraries is shown twice. diff --git a/eeschema/dialogs/dialog_eeschema_config.cpp b/eeschema/dialogs/dialog_eeschema_config.cpp index 61fa686e63..efe5464282 100644 --- a/eeschema/dialogs/dialog_eeschema_config.cpp +++ b/eeschema/dialogs/dialog_eeschema_config.cpp @@ -205,7 +205,7 @@ void DIALOG_EESCHEMA_CONFIG::OnCancelClick( wxCommandEvent& event ) // Recreate the user lib path if( m_LibPathChanged ) { - for( unsigned ii = 0; ii < m_ListLibr->GetCount(); ii++ ) + for( unsigned ii = 0; ii < m_listUserPaths->GetCount(); ii++ ) lib_search.RemovePaths( m_listUserPaths->GetString(ii) ); lib_search.AddPaths( m_Parent->GetUserLibraryPath(), 1 ); diff --git a/eeschema/eelibs_read_libraryfiles.cpp b/eeschema/eelibs_read_libraryfiles.cpp index 56b4e733eb..036599a827 100644 --- a/eeschema/eelibs_read_libraryfiles.cpp +++ b/eeschema/eelibs_read_libraryfiles.cpp @@ -100,7 +100,9 @@ void SCH_EDIT_FRAME::LoadLibraries() // Print the libraries not found if( !libraries_not_found.IsEmpty() ) { + // parent of this dialog cannot be NULL since that breaks the Kiway() chain. HTML_MESSAGE_BOX dialog( this, _("Files not found") ); + dialog.MessageSet( _( "The following libraries could not be found:" ) ); dialog.ListSet( libraries_not_found ); libraries_not_found.empty(); diff --git a/eeschema/pinedit.cpp b/eeschema/pinedit.cpp index 3755109ccd..ad92bd77de 100644 --- a/eeschema/pinedit.cpp +++ b/eeschema/pinedit.cpp @@ -626,20 +626,16 @@ bool sort_by_pin_number( const LIB_PIN* ref, const LIB_PIN* tst ) */ void LIB_EDIT_FRAME::OnCheckComponent( wxCommandEvent& event ) { - #define MIN_GRID_SIZE 25 - int dup_error; - int offgrid_error; - LIB_PIN* Pin; - LIB_PINS PinList; - wxString msg; - wxString aux_msg; - if( m_component == NULL ) return; - m_component->GetPins( PinList ); + const int MIN_GRID_SIZE = 25; - if( PinList.size() == 0 ) + LIB_PINS pinList; + + m_component->GetPins( pinList ); + + if( pinList.size() == 0 ) { DisplayInfoMessage( this, _( "No pins!" ) ); return; @@ -647,48 +643,49 @@ void LIB_EDIT_FRAME::OnCheckComponent( wxCommandEvent& event ) // Sort pins by pin num, so 2 duplicate pins // (pins with the same number) will be consecutive in list - sort( PinList.begin(), PinList.end(), sort_by_pin_number ); + sort( pinList.begin(), pinList.end(), sort_by_pin_number ); // Test for duplicates: - dup_error = 0; DIALOG_DISPLAY_HTML_TEXT_BASE error_display( this, wxID_ANY, _( "Marker Information" ), wxDefaultPosition, wxSize( 750, 600 ) ); - for( unsigned ii = 1; ii < PinList.size(); ii++ ) + int dup_error = 0; + + for( unsigned ii = 1; ii < pinList.size(); ii++ ) { wxString stringPinNum, stringCurrPinNum; - LIB_PIN* curr_pin = PinList[ii]; - Pin = PinList[ii - 1]; + LIB_PIN* curr_pin = pinList[ii]; + LIB_PIN* pin = pinList[ii - 1]; - if( Pin->GetNumber() != curr_pin->GetNumber() - || Pin->GetConvert() != curr_pin->GetConvert() - || Pin->GetUnit() != curr_pin->GetUnit() ) + if( pin->GetNumber() != curr_pin->GetNumber() + || pin->GetConvert() != curr_pin->GetConvert() + || pin->GetUnit() != curr_pin->GetUnit() ) continue; dup_error++; - Pin->PinStringNum( stringPinNum ); + pin->PinStringNum( stringPinNum ); /* TODO I dare someone to find a way to make happy translators on this thing! Lorenzo */ curr_pin->PinStringNum( stringCurrPinNum ); - msg.Printf( _( "Duplicate pin %s \"%s\" at location (%.3f, \ + + wxString msg = wxString::Format( _( "Duplicate pin %s \"%s\" at location (%.3f, \ %.3f) conflicts with pin %s \"%s\" at location (%.3f, %.3f)" ), GetChars( stringCurrPinNum ), GetChars( curr_pin->GetName() ), curr_pin->GetPosition().x / 1000.0, -curr_pin->GetPosition().y / 1000.0, GetChars( stringPinNum ), - GetChars( Pin->GetName() ), - Pin->GetPosition().x / 1000.0, - -Pin->GetPosition().y / 1000.0 ); + GetChars( pin->GetName() ), + pin->GetPosition().x / 1000.0, + -pin->GetPosition().y / 1000.0 ); if( m_component->GetPartCount() > 1 ) { - aux_msg.Printf( _( " in part %c" ), 'A' + curr_pin->GetUnit() ); - msg += aux_msg; + msg += wxString::Format( _( " in part %c" ), 'A' + curr_pin->GetUnit() - 1 ); } if( m_showDeMorgan ) @@ -700,46 +697,47 @@ void LIB_EDIT_FRAME::OnCheckComponent( wxCommandEvent& event ) } msg += wxT( ".
" ); + error_display.m_htmlWindow->AppendToPage( msg ); } // Test for off grid pins: - offgrid_error = 0; + int offgrid_error = 0; - for( unsigned ii = 0; ii < PinList.size(); ii++ ) + for( unsigned ii = 0; ii < pinList.size(); ii++ ) { - Pin = PinList[ii]; + LIB_PIN* pin = pinList[ii]; - if( ( (Pin->GetPosition().x % MIN_GRID_SIZE) == 0 ) && - ( (Pin->GetPosition().y % MIN_GRID_SIZE) == 0 ) ) + if( ( (pin->GetPosition().x % MIN_GRID_SIZE) == 0 ) && + ( (pin->GetPosition().y % MIN_GRID_SIZE) == 0 ) ) continue; - // A pin is found here off grid + // "pin" is off grid here. offgrid_error++; wxString stringPinNum; - Pin->PinStringNum( stringPinNum ); + pin->PinStringNum( stringPinNum ); - msg.Printf( _( "Off grid pin %s \"%s\" at location (%.3f, %.3f)" ), + wxString msg = wxString::Format( _( "Off grid pin %s \"%s\" at location (%.3f, %.3f)" ), GetChars( stringPinNum ), - GetChars( Pin->GetName() ), - Pin->GetPosition().x / 1000.0, - -Pin->GetPosition().y / 1000.0 ); + GetChars( pin->GetName() ), + pin->GetPosition().x / 1000.0, + -pin->GetPosition().y / 1000.0 ); if( m_component->GetPartCount() > 1 ) { - aux_msg.Printf( _( " in part %c" ), 'A' + Pin->GetUnit() ); - msg += aux_msg; + msg += wxString::Format( _( " in part %c" ), 'A' + pin->GetUnit() - 1 ); } if( m_showDeMorgan ) { - if( Pin->GetConvert() ) + if( pin->GetConvert() ) msg += _( " of converted" ); else msg += _( " of normal" ); } msg += wxT( ".
" ); + error_display.m_htmlWindow->AppendToPage( msg ); } From 0d734e8841b765aa9ca565dfd1199581294d69e9 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 4 Jun 2014 17:46:43 +0200 Subject: [PATCH 481/741] Placing the grid origin is possible with GAL. --- pcbnew/tools/common_actions.cpp | 11 ++++++++++- pcbnew/tools/common_actions.h | 1 + pcbnew/tools/pcbnew_control.cpp | 34 +++++++++++++++++++++++++++++++++ pcbnew/tools/pcbnew_control.h | 1 + pcbnew/tools/point_editor.cpp | 2 +- 5 files changed, 47 insertions(+), 2 deletions(-) diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 2a6aa25305..285d662aed 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -223,6 +223,10 @@ TOOL_ACTION COMMON_ACTIONS::gridPrev( "pcbnew.gridPrev", AS_GLOBAL, MD_CTRL + int( '`' ), "", "" ); +TOOL_ACTION COMMON_ACTIONS::gridSetOrigin( "pcbnew.gridSetOrigin", + AS_GLOBAL, 0, + "", "" ); + // Track & via size control TOOL_ACTION COMMON_ACTIONS::trackWidthInc( "pcbnew.trackWidthInc", @@ -241,7 +245,9 @@ TOOL_ACTION COMMON_ACTIONS::viaSizeDec( "pcbnew.viaSizeDec", AS_GLOBAL, '\\', "", "" ); -TOOL_ACTION COMMON_ACTIONS::trackViaSizeChanged( "pcbnew.trackViaSizeChanged", AS_GLOBAL, 0, "", "" ); +TOOL_ACTION COMMON_ACTIONS::trackViaSizeChanged( "pcbnew.trackViaSizeChanged", + AS_GLOBAL, 0, + "", "" ); // Miscellaneous TOOL_ACTION COMMON_ACTIONS::resetCoords( "pcbnew.resetCoords", @@ -290,6 +296,9 @@ std::string COMMON_ACTIONS::TranslateLegacyId( int aId ) case ID_PCB_MIRE_BUTT: return COMMON_ACTIONS::placeTarget.GetName(); + + case ID_PCB_PLACE_GRID_COORD_BUTT: + return COMMON_ACTIONS::gridSetOrigin.GetName(); } return ""; diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index 671a509699..428115bb6e 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -130,6 +130,7 @@ public: static TOOL_ACTION gridFast2; static TOOL_ACTION gridNext; static TOOL_ACTION gridPrev; + static TOOL_ACTION gridSetOrigin; // Track & via size control static TOOL_ACTION trackWidthInc; diff --git a/pcbnew/tools/pcbnew_control.cpp b/pcbnew/tools/pcbnew_control.cpp index 3fb689e71f..f6b52d08bd 100644 --- a/pcbnew/tools/pcbnew_control.cpp +++ b/pcbnew/tools/pcbnew_control.cpp @@ -412,6 +412,39 @@ int PCBNEW_CONTROL::GridPrev( TOOL_EVENT& aEvent ) } +int PCBNEW_CONTROL::GridSetOrigin( TOOL_EVENT& aEvent ) +{ + Activate(); + getEditFrame()->SetToolID( ID_PCB_PLACE_GRID_COORD_BUTT, wxCURSOR_PENCIL, + _( "Adjust grid origin" ) ); + + KIGFX::VIEW_CONTROLS* controls = getViewControls(); + controls->ShowCursor( true ); + controls->SetSnapping( true ); + controls->SetAutoPan( true ); + + while( OPT_TOOL_EVENT evt = Wait() ) + { + if( evt->IsClick( BUT_LEFT ) ) + { + getView()->GetGAL()->SetGridOrigin( controls->GetCursorPosition() ); + getView()->MarkDirty(); + } + + else if( evt->IsCancel() ) + break; + } + + controls->SetAutoPan( false ); + controls->SetSnapping( false ); + controls->ShowCursor( false ); + setTransitions(); + m_frame->SetToolID( ID_NO_TOOL_SELECTED, wxCURSOR_DEFAULT, wxEmptyString ); + + return 0; +} + + // Track & via size control int PCBNEW_CONTROL::TrackWidthInc( TOOL_EVENT& aEvent ) { @@ -574,6 +607,7 @@ void PCBNEW_CONTROL::setTransitions() Go( &PCBNEW_CONTROL::GridFast2, COMMON_ACTIONS::gridFast2.MakeEvent() ); Go( &PCBNEW_CONTROL::GridNext, COMMON_ACTIONS::gridNext.MakeEvent() ); Go( &PCBNEW_CONTROL::GridPrev, COMMON_ACTIONS::gridPrev.MakeEvent() ); + Go( &PCBNEW_CONTROL::GridSetOrigin, COMMON_ACTIONS::gridSetOrigin.MakeEvent() ); // Track & via size control Go( &PCBNEW_CONTROL::TrackWidthInc, COMMON_ACTIONS::trackWidthInc.MakeEvent() ); diff --git a/pcbnew/tools/pcbnew_control.h b/pcbnew/tools/pcbnew_control.h index 8acc0fba8c..e4920484db 100644 --- a/pcbnew/tools/pcbnew_control.h +++ b/pcbnew/tools/pcbnew_control.h @@ -79,6 +79,7 @@ public: int GridFast2( TOOL_EVENT& aEvent ); int GridNext( TOOL_EVENT& aEvent ); int GridPrev( TOOL_EVENT& aEvent ); + int GridSetOrigin( TOOL_EVENT& aEvent ); // Track & via size control int TrackWidthInc( TOOL_EVENT& aEvent ); diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp index f7e5b374c2..3a2e62416a 100644 --- a/pcbnew/tools/point_editor.cpp +++ b/pcbnew/tools/point_editor.cpp @@ -212,7 +212,7 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) PCB_EDIT_FRAME* editFrame = getEditFrame(); EDA_ITEM* item = selection.items.GetPickedItem( 0 ); - m_editPoints = EDIT_POINTS_FACTORY::Make( item, m_toolMgr->GetView()->GetGAL() ); + m_editPoints = EDIT_POINTS_FACTORY::Make( item, getView()->GetGAL() ); if( !m_editPoints ) { setTransitions(); From 35e343597b904730c35e731a6e9a30f96c0b1c3f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 4 Jun 2014 17:56:44 +0200 Subject: [PATCH 482/741] Grid in GAL takes into account grid offset. --- common/gal/graphics_abstraction_layer.cpp | 55 ++++++++++++----------- include/gal/graphics_abstraction_layer.h | 2 + 2 files changed, 30 insertions(+), 27 deletions(-) diff --git a/common/gal/graphics_abstraction_layer.cpp b/common/gal/graphics_abstraction_layer.cpp index 724d14ac9e..6d08461fe0 100644 --- a/common/gal/graphics_abstraction_layer.cpp +++ b/common/gal/graphics_abstraction_layer.cpp @@ -130,8 +130,11 @@ void GAL::DrawGrid() // Draw the grid // For the drawing the start points, end points and increments have // to be calculated in world coordinates - VECTOR2D worldStartPoint = screenWorldMatrix * VECTOR2D( 0.0, 0.0 ); - VECTOR2D worldEndPoint = screenWorldMatrix * VECTOR2D( screenSize ); + gridOffset = VECTOR2D( (long) gridOrigin.x % (long) gridSize.x, + (long) gridOrigin.y % (long) gridSize.y ); + + VECTOR2D worldStartPoint = screenWorldMatrix * VECTOR2D( 0.0, 0.0 ); + VECTOR2D worldEndPoint = screenWorldMatrix * VECTOR2D( screenSize ); int gridScreenSizeDense = round( gridSize.x * worldScale ); int gridScreenSizeCoarse = round( gridSize.x * static_cast( gridTick ) * worldScale ); @@ -144,20 +147,19 @@ void GAL::DrawGrid() if( std::max( gridScreenSizeDense, gridScreenSizeCoarse ) > gridDrawThreshold ) { // Compute grid variables - int gridStartX = round( worldStartPoint.x / gridSize.x ); - int gridEndX = round( worldEndPoint.x / gridSize.x ); - int gridStartY = round( worldStartPoint.y / gridSize.y ); - int gridEndY = round( worldEndPoint.y / gridSize.y ); + int gridStartX = round( worldStartPoint.x / gridSize.x ); + int gridEndX = round( worldEndPoint.x / gridSize.x ); + int gridStartY = round( worldStartPoint.y / gridSize.y ); + int gridEndY = round( worldEndPoint.y / gridSize.y ); - // Swap the coordinates, if they have not the right order - SWAP( gridEndX, <, gridStartX ); - SWAP( gridEndY, <, gridStartY ); + assert( gridEndX >= gridStartX ); + assert( gridEndY >= gridStartY ); // Correct the index, else some lines are not correctly painted - gridStartX -= 1; - gridStartY -= 1; - gridEndX += 1; - gridEndY += 1; + gridStartX -= ( gridOrigin.x / gridSize.x ) + 1; + gridStartY -= ( gridOrigin.y / gridSize.y ) + 1; + gridEndX += ( gridOrigin.x / gridSize.x ) + 1; + gridEndY += ( gridOrigin.y / gridSize.y ) + 1; // Draw the grid behind all other layers SetLayerDepth( depthRange.y * 0.75 ); @@ -169,6 +171,8 @@ void GAL::DrawGrid() SetStrokeColor( gridColor ); // Now draw the grid, every coarse grid line gets the double width + + // Vertical lines for( int j = gridStartY; j < gridEndY; j += 1 ) { if( j % gridTick == 0 && gridScreenSizeDense > gridDrawThreshold ) @@ -179,11 +183,12 @@ void GAL::DrawGrid() if( ( j % gridTick == 0 && gridScreenSizeCoarse > gridDrawThreshold ) || gridScreenSizeDense > gridDrawThreshold ) { - drawGridLine( VECTOR2D( gridStartX * gridSize.x, j * gridSize.y ), - VECTOR2D( gridEndX * gridSize.x, j * gridSize.y ) ); + drawGridLine( VECTOR2D( gridStartX * gridSize.x, j * gridSize.y + gridOrigin.y ), + VECTOR2D( gridEndX * gridSize.x, j * gridSize.y + gridOrigin.y ) ); } } + // Horizontal lines for( int i = gridStartX; i < gridEndX; i += 1 ) { if( i % gridTick == 0 && gridScreenSizeDense > gridDrawThreshold ) @@ -194,8 +199,8 @@ void GAL::DrawGrid() if( ( i % gridTick == 0 && gridScreenSizeCoarse > gridDrawThreshold ) || gridScreenSizeDense > gridDrawThreshold ) { - drawGridLine( VECTOR2D( i * gridSize.x, gridStartY * gridSize.y ), - VECTOR2D( i * gridSize.x, gridEndY * gridSize.y ) ); + drawGridLine( VECTOR2D( i * gridSize.x + gridOrigin.x, gridStartY * gridSize.y ), + VECTOR2D( i * gridSize.x + gridOrigin.x, gridEndY * gridSize.y ) ); } } } @@ -223,10 +228,10 @@ void GAL::DrawGrid() if( tickX || tickY || gridScreenSizeDense > gridDrawThreshold ) { double radius = ( tickX && tickY ) ? doubleMarker : marker; - DrawRectangle( VECTOR2D( i * gridSize.x - radius, - j * gridSize.y - radius ), - VECTOR2D( i * gridSize.x + radius, - j * gridSize.y + radius ) ); + DrawRectangle( VECTOR2D( i * gridSize.x - radius + gridOrigin.x, + j * gridSize.y - radius + gridOrigin.y ), + VECTOR2D( i * gridSize.x + radius + gridOrigin.x, + j * gridSize.y + radius + gridOrigin.y ) ); } } } @@ -237,10 +242,6 @@ void GAL::DrawGrid() VECTOR2D GAL::GetGridPoint( const VECTOR2D& aPoint ) const { - VECTOR2D gridPoint; - - gridPoint.x = round( aPoint.x / gridSize.x ) * gridSize.x; - gridPoint.y = round( aPoint.y / gridSize.y ) * gridSize.y; - - return gridPoint; + return VECTOR2D( round( ( aPoint.x - gridOffset.x ) / gridSize.x ) * gridSize.x + gridOffset.x, + round( ( aPoint.y - gridOffset.y ) / gridSize.y ) * gridSize.y + gridOffset.y ); } diff --git a/include/gal/graphics_abstraction_layer.h b/include/gal/graphics_abstraction_layer.h index 6d904d2016..304634ba2b 100644 --- a/include/gal/graphics_abstraction_layer.h +++ b/include/gal/graphics_abstraction_layer.h @@ -853,6 +853,7 @@ protected: GRID_STYLE gridStyle; ///< Grid display style VECTOR2D gridSize; ///< The grid size VECTOR2D gridOrigin; ///< The grid origin + VECTOR2D gridOffset; ///< The grid offset to compensate cursor position COLOR4D gridColor; ///< Color of the grid int gridTick; ///< Every tick line gets the double width double gridLineWidth; ///< Line width of the grid @@ -860,6 +861,7 @@ protected: ///< below which the grid is not drawn int gridOriginMarkerSize; ///< Grid origin indicator size (pixels) + // Cursor settings bool isCursorEnabled; ///< Is the cursor enabled? COLOR4D cursorColor; ///< Cursor color unsigned int cursorSize; ///< Size of the cursor in pixels From 517bfa3570eac90d065f4aa3e3f6c6a815bcd490 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 4 Jun 2014 18:01:01 +0200 Subject: [PATCH 483/741] Minor code cleaning. --- pcbnew/router/router_tool.cpp | 4 ++-- pcbnew/tools/edit_tool.cpp | 23 ++++++++++------------- pcbnew/tools/selection_tool.cpp | 2 +- pcbnew/tools/selection_tool.h | 7 +++++++ 4 files changed, 20 insertions(+), 16 deletions(-) diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index 177660798a..a81883d3ad 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -385,7 +385,7 @@ void ROUTER_TOOL::handleCommonEvents( TOOL_EVENT& aEvent ) #endif if( aEvent.IsAction( &ACT_RouterOptions ) ) { - DIALOG_PNS_SETTINGS settingsDlg( m_toolMgr->GetEditFrame(), m_router->Settings() ); + DIALOG_PNS_SETTINGS settingsDlg( getEditFrame(), m_router->Settings() ); if( settingsDlg.ShowModal() ) m_router->ApplySettings(); @@ -393,7 +393,7 @@ void ROUTER_TOOL::handleCommonEvents( TOOL_EVENT& aEvent ) else if( aEvent.IsAction( &ACT_CustomTrackWidth ) ) { - DIALOG_TRACK_VIA_SIZE sizeDlg( m_toolMgr->GetEditFrame(), m_router->Settings() ); + DIALOG_TRACK_VIA_SIZE sizeDlg( getEditFrame(), m_router->Settings() ); BOARD_DESIGN_SETTINGS& bds = getModel( PCB_T )->GetDesignSettings(); sizeDlg.ShowModal(); diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 3badc60fb2..05f34d8608 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -93,7 +93,7 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) m_updateFlag = KIGFX::VIEW_ITEM::GEOMETRY; KIGFX::VIEW_CONTROLS* controls = getViewControls(); - PCB_EDIT_FRAME* editFrame = static_cast( m_toolMgr->GetEditFrame() ); + PCB_EDIT_FRAME* editFrame = getEditFrame(); controls->ShowCursor( true ); controls->SetSnapping( true ); controls->SetAutoPan( true ); @@ -208,7 +208,7 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); - PCB_EDIT_FRAME* editFrame = static_cast( m_toolMgr->GetEditFrame() ); + PCB_EDIT_FRAME* editFrame = getEditFrame(); // Shall the selection be cleared at the end? bool unselect = selection.Empty(); @@ -224,7 +224,7 @@ int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) if( selection.Size() == 1 ) { // Display properties dialog - BOARD_ITEM* item = static_cast( selection.items.GetPickedItem( 0 ) ); + BOARD_ITEM* item = selection.Item( 0 ); // Check if user wants to edit pad or module properties if( item->Type() == PCB_MODULE_T ) @@ -280,7 +280,7 @@ int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) int EDIT_TOOL::Rotate( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); - PCB_EDIT_FRAME* editFrame = static_cast( m_toolMgr->GetEditFrame() ); + PCB_EDIT_FRAME* editFrame = getEditFrame(); // Shall the selection be cleared at the end? bool unselect = selection.Empty(); @@ -302,7 +302,7 @@ int EDIT_TOOL::Rotate( TOOL_EVENT& aEvent ) for( unsigned int i = 0; i < selection.items.GetCount(); ++i ) { - BOARD_ITEM* item = static_cast( selection.items.GetPickedItem( i ) ); + BOARD_ITEM* item = selection.Item( i ); item->Rotate( rotatePoint, editFrame->GetRotationAngle() ); @@ -334,7 +334,7 @@ int EDIT_TOOL::Rotate( TOOL_EVENT& aEvent ) int EDIT_TOOL::Flip( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); - PCB_EDIT_FRAME* editFrame = static_cast( m_toolMgr->GetEditFrame() ); + PCB_EDIT_FRAME* editFrame = getEditFrame(); // Shall the selection be cleared at the end? bool unselect = selection.Empty(); @@ -356,7 +356,7 @@ int EDIT_TOOL::Flip( TOOL_EVENT& aEvent ) for( unsigned int i = 0; i < selection.items.GetCount(); ++i ) { - BOARD_ITEM* item = static_cast( selection.items.GetPickedItem( i ) ); + BOARD_ITEM* item = selection.Item( i ); item->Flip( flipPoint ); @@ -398,7 +398,7 @@ int EDIT_TOOL::Remove( TOOL_EVENT& aEvent ) // Get a copy of the selected items set PICKED_ITEMS_LIST selectedItems = selection.items; - PCB_EDIT_FRAME* editFrame = static_cast( m_toolMgr->GetEditFrame() ); + PCB_EDIT_FRAME* editFrame = getEditFrame(); // As we are about to remove items, they have to be removed from the selection first m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); @@ -412,10 +412,7 @@ int EDIT_TOOL::Remove( TOOL_EVENT& aEvent ) // And now remove for( unsigned int i = 0; i < selectedItems.GetCount(); ++i ) - { - BOARD_ITEM* item = static_cast( selectedItems.GetPickedItem( i ) ); - remove( item ); - } + remove( static_cast( selectedItems.GetPickedItem( i ) ) ); getModel( PCB_T )->GetRatsnest()->Recalculate(); @@ -491,7 +488,7 @@ void EDIT_TOOL::updateRatsnest( bool aRedraw ) ratsnest->ClearSimple(); for( unsigned int i = 0; i < selection.items.GetCount(); ++i ) { - BOARD_ITEM* item = static_cast( selection.items.GetPickedItem( i ) ); + BOARD_ITEM* item = selection.Item( i ); ratsnest->Update( item ); diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 48d1b36412..d32f532ef9 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -658,7 +658,7 @@ bool SELECTION_TOOL::selectionContains( const VECTOR2I& aPoint ) const // Check if the point is located within any of the currently selected items bounding boxes for( unsigned int i = 0; i < m_selection.items.GetCount(); ++i ) { - BOARD_ITEM* item = static_cast( m_selection.items.GetPickedItem( i ) ); + BOARD_ITEM* item = m_selection.Item( i ); BOX2I itemBox = item->ViewBBox(); itemBox.Inflate( margin.x, margin.y ); // Give some margin for gripping an item diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index 0850286d24..9fe3d32b53 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -78,6 +78,13 @@ public: return items.GetCount(); } + /// Alias to make code shorter and clearer + template + T* Item( unsigned int aIndex ) const + { + return static_cast( items.GetPickedItem( aIndex ) ); + } + private: /// Clears both the VIEW_GROUP and set of selected items. Please note that it does not /// change properties of selected items (e.g. selection flag). From 9305f77fdcc70e541bd79a5741375822622b069f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 5 Jun 2014 09:54:47 +0200 Subject: [PATCH 484/741] Fixed: Modules become invisible after reloading a netlist, until GAL view is refreshed. --- pcbnew/class_module.h | 2 +- pcbnew/netlist.cpp | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/pcbnew/class_module.h b/pcbnew/class_module.h index 3b378c30a6..a58117a2f9 100644 --- a/pcbnew/class_module.h +++ b/pcbnew/class_module.h @@ -463,7 +463,7 @@ public: void RunOnChildren( boost::function aFunction ); /// @copydoc VIEW_ITEM::ViewUpdate() - void ViewUpdate( int aUpdateFlags ); + void ViewUpdate( int aUpdateFlags = KIGFX::VIEW_ITEM::ALL ); /** * Function CopyNetlistSettings diff --git a/pcbnew/netlist.cpp b/pcbnew/netlist.cpp index 0d5725cf63..8ba8627385 100644 --- a/pcbnew/netlist.cpp +++ b/pcbnew/netlist.cpp @@ -63,6 +63,7 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName, NETLIST netlist; NETLIST_READER* netlistReader; KIGFX::VIEW* view = GetGalCanvas()->GetView(); + BOARD* board = GetBoard(); netlist.SetIsDryRun( aIsDryRun ); netlist.SetFindByTimeStamp( aSelectByTimeStamp ); @@ -100,7 +101,7 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName, if( !netlist.IsDryRun() ) { // Remove old modules - for( MODULE* module = GetBoard()->m_Modules; module; module = module->Next() ) + for( MODULE* module = board->m_Modules; module; module = module->Next() ) { module->RunOnChildren( boost::bind( &KIGFX::VIEW::Remove, view, _1 ) ); view->Remove( module ); @@ -108,7 +109,7 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName, } netlist.SortByReference(); - GetBoard()->ReplaceNetlist( netlist, aDeleteSinglePadNets, aReporter ); + board->ReplaceNetlist( netlist, aDeleteSinglePadNets, aReporter ); // If it was a dry run, nothing has changed so we're done. if( netlist.IsDryRun() ) @@ -119,13 +120,14 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName, SetCurItem( NULL ); // Reload modules - for( MODULE* module = GetBoard()->m_Modules; module; module = module->Next() ) + for( MODULE* module = board->m_Modules; module; module = module->Next() ) { module->RunOnChildren( boost::bind( &KIGFX::VIEW::Add, view, _1 ) ); view->Add( module ); + module->ViewUpdate(); } - if( aDeleteUnconnectedTracks && GetBoard()->m_Track ) + if( aDeleteUnconnectedTracks && board->m_Track ) { // Remove erroneous tracks. This should probably pushed down to the #BOARD object. RemoveMisConnectedTracks(); @@ -133,11 +135,11 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName, // Rebuild the board connectivity: if( IsGalCanvasActive() ) - GetBoard()->GetRatsnest()->Recalculate(); + board->GetRatsnest()->ProcessBoard(); else Compile_Ratsnest( NULL, true ); - SetMsgPanel( GetBoard() ); + SetMsgPanel( board ); m_canvas->Refresh(); } From fe341876eb19176ee007c5f7a788869d76e3fbb8 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 5 Jun 2014 09:55:35 +0200 Subject: [PATCH 485/741] bugfix #1326155: pcbnew shows strange ratsnest lines in OpenGL mode. --- pcbnew/class_board_connected_item.cpp | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/pcbnew/class_board_connected_item.cpp b/pcbnew/class_board_connected_item.cpp index de349b26fd..d7c54e7925 100644 --- a/pcbnew/class_board_connected_item.cpp +++ b/pcbnew/class_board_connected_item.cpp @@ -34,8 +34,6 @@ #include #include -#include - BOARD_CONNECTED_ITEM::BOARD_CONNECTED_ITEM( BOARD_ITEM* aParent, KICAD_T idtype ) : BOARD_ITEM( aParent, idtype ), m_netinfo( &NETINFO_LIST::ORPHANED ), m_Subnet( 0 ), m_ZoneSubnet( 0 ) @@ -55,29 +53,18 @@ BOARD_CONNECTED_ITEM::BOARD_CONNECTED_ITEM( const BOARD_CONNECTED_ITEM& aItem ) void BOARD_CONNECTED_ITEM::SetNetCode( int aNetCode ) { BOARD* board = GetBoard(); - NETINFO_ITEM* oldNetInfo = m_netinfo; - NETINFO_ITEM* newNetInfo; - if( board ) { - newNetInfo = board->FindNet( aNetCode ); + m_netinfo = board->FindNet( aNetCode ); // The requested net does not exist, mark it as unconnected - if( newNetInfo == NULL ) - newNetInfo = board->FindNet( NETINFO_LIST::UNCONNECTED ); + if( m_netinfo == NULL ) + m_netinfo = board->FindNet( NETINFO_LIST::UNCONNECTED ); } else { // There is no board that contains list of nets, the item is orphaned - newNetInfo = &NETINFO_LIST::ORPHANED; - } - - // Update ratsnest, if necessary - if( oldNetInfo != newNetInfo && board ) - { - board->GetRatsnest()->Remove( this ); - m_netinfo = newNetInfo; - board->GetRatsnest()->Add( this ); + m_netinfo = &NETINFO_LIST::ORPHANED; } } From afbe21fe70e02e01b5e873f87f1a0a3d513f2259 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 5 Jun 2014 09:55:53 +0200 Subject: [PATCH 486/741] Single items are dragged by their origin in GAL canvas. --- pcbnew/tools/edit_tool.cpp | 23 ++++++----------------- pcbnew/tools/edit_tool.h | 3 --- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 05f34d8608..8058250e92 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -143,14 +143,11 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) if( m_dragging ) { wxPoint movement = wxPoint( m_cursor.x, m_cursor.y ) - - static_cast( selection.items.GetPickedItem( 0 ) )->GetPosition(); + selection.Item( 0 )->GetPosition(); // Drag items to the current cursor position for( unsigned int i = 0; i < selection.items.GetCount(); ++i ) - { - BOARD_ITEM* item = static_cast( selection.items.GetPickedItem( i ) ); - item->Move( movement + m_offset ); - } + selection.Item( i )->Move( movement ); updateRatsnest( true ); } @@ -160,9 +157,9 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) editFrame->OnModify(); editFrame->SaveCopyInUndoList( selection.items, UR_CHANGED ); - // Update dragging offset (distance between cursor and the first dragged item) - m_offset = static_cast( selection.items.GetPickedItem( 0 ) )->GetPosition() - - wxPoint( m_cursor.x, m_cursor.y ); + // Set the current cursor position to the first dragged item origin, so the + // movement vector could be computed later + m_cursor = VECTOR2I( selection.Item( 0 )->GetPosition() ); m_dragging = true; } @@ -312,10 +309,6 @@ int EDIT_TOOL::Rotate( TOOL_EVENT& aEvent ) updateRatsnest( m_dragging ); - // Update dragging offset (distance between cursor and the first dragged item) - m_offset = static_cast( selection.items.GetPickedItem( 0 ) )->GetPosition() - - rotatePoint; - if( m_dragging ) selection.group->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); else @@ -366,10 +359,6 @@ int EDIT_TOOL::Flip( TOOL_EVENT& aEvent ) updateRatsnest( m_dragging ); - // Update dragging offset (distance between cursor and the first dragged item) - m_offset = static_cast( selection.items.GetPickedItem( 0 ) )->GetPosition() - - flipPoint; - if( m_dragging ) selection.group->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); else @@ -502,7 +491,7 @@ wxPoint EDIT_TOOL::getModificationPoint( const SELECTION_TOOL::SELECTION& aSelec { if( aSelection.Size() == 1 ) { - return static_cast( aSelection.items.GetPickedItem( 0 ) )->GetPosition() - m_offset; + return aSelection.Item( 0 )->GetPosition(); } else { diff --git a/pcbnew/tools/edit_tool.h b/pcbnew/tools/edit_tool.h index 207e446493..fb74135b86 100644 --- a/pcbnew/tools/edit_tool.h +++ b/pcbnew/tools/edit_tool.h @@ -98,9 +98,6 @@ private: ///> Flag determining if anything is being dragged right now bool m_dragging; - ///> Offset from the dragged item's center (anchor) - wxPoint m_offset; - ///> Last cursor position (needed for getModificationPoint() to avoid changes ///> of edit reference point). VECTOR2I m_cursor; From 60a86853ec7f81293c4a96b9763483f7f0e59778 Mon Sep 17 00:00:00 2001 From: Bernhard Stegmaier Date: Thu, 5 Jun 2014 12:40:26 +0200 Subject: [PATCH 487/741] Removed a few warnings. --- common/gal/cairo/cairo_gal.cpp | 4 ++++ common/gal/graphics_abstraction_layer.cpp | 4 ++++ common/view/view.cpp | 2 +- include/gal/cairo/cairo_gal.h | 2 +- include/gal/graphics_abstraction_layer.h | 2 +- pcbnew/router/direction.h | 12 +++++++----- pcbnew/router/pns_line.cpp | 6 +++--- pcbnew/router/pns_shove.cpp | 1 - pcbnew/router/pns_shove.h | 2 -- pcbnew/router/router_tool.h | 2 -- 10 files changed, 21 insertions(+), 16 deletions(-) diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index a6f1429721..73ca64294d 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -35,6 +35,10 @@ using namespace KIGFX; + +const float CAIRO_GAL::LAYER_ALPHA = 0.8; + + CAIRO_GAL::CAIRO_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, wxEvtHandler* aPaintListener, const wxString& aName ) : wxWindow( aParent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxEXPAND, aName ) diff --git a/common/gal/graphics_abstraction_layer.cpp b/common/gal/graphics_abstraction_layer.cpp index 6d08461fe0..821df4969f 100644 --- a/common/gal/graphics_abstraction_layer.cpp +++ b/common/gal/graphics_abstraction_layer.cpp @@ -31,6 +31,10 @@ using namespace KIGFX; + +const double GAL::METRIC_UNIT_LENGTH = 1e9; + + GAL::GAL() : strokeFont( this ) { diff --git a/common/view/view.cpp b/common/view/view.cpp index 5e213c0c1d..2d8556a916 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -893,7 +893,7 @@ void VIEW::updateItemGeometry( VIEW_ITEM* aItem, int aLayer ) group = m_gal->BeginGroup(); aItem->setGroup( aLayer, group ); - if( !m_painter->Draw( static_cast( aItem ), aLayer ) ); + if( !m_painter->Draw( static_cast( aItem ), aLayer ) ) aItem->ViewDraw( aLayer, m_gal ); // Alternative drawing method m_gal->EndGroup(); diff --git a/include/gal/cairo/cairo_gal.h b/include/gal/cairo/cairo_gal.h index 6b44b1d476..e0b1dba963 100644 --- a/include/gal/cairo/cairo_gal.h +++ b/include/gal/cairo/cairo_gal.h @@ -389,7 +389,7 @@ private: static const cairo_format_t GAL_FORMAT = CAIRO_FORMAT_RGB24; ///> Opacity of a single layer - static const float LAYER_ALPHA = 0.8; + static const float LAYER_ALPHA; }; } // namespace KIGFX diff --git a/include/gal/graphics_abstraction_layer.h b/include/gal/graphics_abstraction_layer.h index 304634ba2b..d6dccd0d61 100644 --- a/include/gal/graphics_abstraction_layer.h +++ b/include/gal/graphics_abstraction_layer.h @@ -820,7 +820,7 @@ public: /// Depth level on which the grid is drawn static const int GRID_DEPTH = 1024; - static const double METRIC_UNIT_LENGTH = 1e9; + static const double METRIC_UNIT_LENGTH; protected: std::stack depthStack; ///< Stored depth values diff --git a/pcbnew/router/direction.h b/pcbnew/router/direction.h index cd872fccb5..90edd1be56 100644 --- a/pcbnew/router/direction.h +++ b/pcbnew/router/direction.h @@ -331,13 +331,15 @@ private: if( mag < 0.0 ) mag += 360.0; - m_dir = (Directions)( ( mag + 22.5 ) / 45.0 ); + int dir = ( mag + 22.5 ) / 45.0; - if( m_dir >= 8 ) - m_dir = (Directions)( m_dir - 8 ); + if( dir >= 8 ) + dir = dir - 8; - if( m_dir < 0 ) - m_dir = (Directions)( m_dir + 8 ); + if( dir < 0 ) + dir = dir + 8; + + m_dir = (Directions) dir; return; diff --git a/pcbnew/router/pns_line.cpp b/pcbnew/router/pns_line.cpp index d7663c4e7d..971851c811 100644 --- a/pcbnew/router/pns_line.cpp +++ b/pcbnew/router/pns_line.cpp @@ -626,19 +626,19 @@ void PNS_LINE::DragSegment ( const VECTOR2I& aP, int aIndex, int aSnappingThresh OPT_VECTOR2I ip; - if( ip = s1.Intersect( s_next ) ) + if( (ip = s1.Intersect( s_next )) ) { np.Append ( s1.A ); np.Append ( *ip ); np.Append ( s_next.B ); } - else if( ip = s3.Intersect( s_prev ) ) + else if( (ip = s3.Intersect( s_prev )) ) { np.Append ( s_prev.A ); np.Append ( *ip ); np.Append ( s3.B ); } - else if( ip = s1.Intersect( s3 ) ) + else if( (ip = s1.Intersect( s3 )) ) { np.Append( s_prev.A ); np.Append( *ip ); diff --git a/pcbnew/router/pns_shove.cpp b/pcbnew/router/pns_shove.cpp index 8b46a503db..ed82b947bf 100644 --- a/pcbnew/router/pns_shove.cpp +++ b/pcbnew/router/pns_shove.cpp @@ -560,7 +560,6 @@ PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::onCollidingVia (PNS_ITEM* aCurrent, PNS_VIA* { int clearance = m_currentNode->GetClearance( aCurrent, aObstacleVia ) ; LINE_PAIR_VEC draggedLines; - VECTOR2I p0( aObstacleVia->Pos() ); bool colLine = false, colVia = false; PNS_LINE *currentLine = NULL; VECTOR2I mtvLine, mtvVia, mtv, mtvSolid; diff --git a/pcbnew/router/pns_shove.h b/pcbnew/router/pns_shove.h index 53568ab281..dae355a5f4 100644 --- a/pcbnew/router/pns_shove.h +++ b/pcbnew/router/pns_shove.h @@ -126,8 +126,6 @@ private: PNS_NODE* m_root; PNS_NODE* m_currentNode; - PNS_LINE* m_currentHead; - PNS_LINE* m_collidingLine; OPT_LINE m_newHead; diff --git a/pcbnew/router/router_tool.h b/pcbnew/router/router_tool.h index e2e1119fe3..4ad339f3a5 100644 --- a/pcbnew/router/router_tool.h +++ b/pcbnew/router/router_tool.h @@ -77,8 +77,6 @@ private: PNS_ITEM* m_endItem; VECTOR2I m_endSnapPoint; - CONTEXT_MENU* m_menu; - ///> Flag marking that the router's world needs syncing. bool m_needsSync; }; From 7a110d0ce3e70ef4ae208412a411fb7866396dfd Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 5 Jun 2014 20:37:04 +0200 Subject: [PATCH 488/741] IDF tools: code cleanup and debugging --- pcbnew/CMakeLists.txt | 6 +- pcbnew/dialogs/dialog_export_idf.cpp | 2 +- pcbnew/exporters/export_idf.cpp | 237 +++- pcbnew/exporters/idf.cpp | 1443 -------------------- pcbnew/exporters/idf.h | 321 ----- pcbnew/exporters/idf_common.cpp | 484 ------- pcbnew/exporters/idf_common.h | 290 ---- utils/idftools/idf_examples/test_donut.emn | 45 + utils/idftools/idf_examples/test_donut.emp | 5 + utils/idftools/idf_outlines.cpp | 4 + utils/idftools/idf_parser.cpp | 207 ++- utils/idftools/idf_parser.h | 10 +- utils/idftools/vrml_layer.cpp | 11 - 13 files changed, 441 insertions(+), 2624 deletions(-) delete mode 100644 pcbnew/exporters/idf.cpp delete mode 100644 pcbnew/exporters/idf.h delete mode 100644 pcbnew/exporters/idf_common.cpp delete mode 100644 pcbnew/exporters/idf_common.h create mode 100644 utils/idftools/idf_examples/test_donut.emn create mode 100644 utils/idftools/idf_examples/test_donut.emp diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 2fc30d1fc7..2b71524a1f 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -36,6 +36,7 @@ include_directories( ./exporters ../lib_dxf ./import_dxf + ../utils/idftools ${INC_AFTER} ) @@ -136,8 +137,6 @@ set( PCBNEW_EXPORTERS exporters/export_gencad.cpp exporters/export_idf.cpp exporters/export_vrml.cpp - exporters/idf_common.cpp - exporters/idf.cpp exporters/gen_drill_report_files.cpp exporters/gen_modules_placefile.cpp exporters/gendrill_Excellon_writer.cpp @@ -385,6 +384,7 @@ if( KICAD_SCRIPTING_MODULES ) common pcad2kicadpcb lib_dxf + idf3 ${GITHUB_PLUGIN_LIBRARIES} polygon bitmaps @@ -565,6 +565,7 @@ if( USE_KIWAY_DLLS ) bitmaps gal lib_dxf + idf3 ${GITHUB_PLUGIN_LIBRARIES} ${wxWidgets_LIBRARIES} ${OPENGL_LIBRARIES} @@ -633,6 +634,7 @@ else() # milestone A) kills this off: bitmaps gal lib_dxf + idf3 ${GITHUB_PLUGIN_LIBRARIES} ${wxWidgets_LIBRARIES} ${OPENGL_LIBRARIES} diff --git a/pcbnew/dialogs/dialog_export_idf.cpp b/pcbnew/dialogs/dialog_export_idf.cpp index 955c5e932a..9e3d14d8c0 100644 --- a/pcbnew/dialogs/dialog_export_idf.cpp +++ b/pcbnew/dialogs/dialog_export_idf.cpp @@ -36,7 +36,7 @@ #define OPTKEY_IDF_THOU wxT( "IDFExportThou" ) -bool Export_IDF3( BOARD *aPcb, const wxString & aFullFileName, double aUseThou ); +bool Export_IDF3( BOARD *aPcb, const wxString & aFullFileName, bool aUseThou ); class DIALOG_EXPORT_IDF3: public DIALOG_EXPORT_IDF3_BASE diff --git a/pcbnew/exporters/export_idf.cpp b/pcbnew/exporters/export_idf.cpp index 3e2f3e796e..a236d4a91a 100644 --- a/pcbnew/exporters/export_idf.cpp +++ b/pcbnew/exporters/export_idf.cpp @@ -33,8 +33,9 @@ #include #include #include -#include +#include #include <3d_struct.h> +#include // assumed default graphical line thickness: 10000 IU == 0.1mm #define LINE_WIDTH (100000) @@ -45,15 +46,15 @@ * the data into a form which can be output as an IDFv3 compliant * BOARD_OUTLINE section. */ -static void idf_export_outline( BOARD* aPcb, IDF_BOARD& aIDFBoard ) +static void idf_export_outline( BOARD* aPcb, IDF3_BOARD& aIDFBoard ) { - double scale = aIDFBoard.GetScale(); + double scale = aIDFBoard.GetUserScale(); DRAWSEGMENT* graphic; // KiCad graphical item IDF_POINT sp, ep; // start and end points from KiCad item std::list< IDF_SEGMENT* > lines; // IDF intermediate form of KiCad graphical item - IDF_OUTLINE outline; // graphical items forming an outline or cutout + IDF_OUTLINE* outline = NULL; // graphical items forming an outline or cutout // NOTE: IMPLEMENTATION // If/when component cutouts are allowed, we must implement them separately. Cutouts @@ -61,7 +62,7 @@ static void idf_export_outline( BOARD* aPcb, IDF_BOARD& aIDFBoard ) // The module cutouts should be handled via the idf_export_module() routine. double offX, offY; - aIDFBoard.GetOffset( offX, offY ); + aIDFBoard.GetUserOffset( offX, offY ); // Retrieve segments and arcs from the board for( BOARD_ITEM* item = aPcb->m_Drawings; item; item = item->Next() ) @@ -129,22 +130,31 @@ static void idf_export_outline( BOARD* aPcb, IDF_BOARD& aIDFBoard ) // note: we do not use a try/catch block here since we intend // to simply ignore unclosed loops and continue processing // until we're out of segments to process - IDF3::GetOutline( lines, outline ); + outline = new IDF_OUTLINE; + IDF3::GetOutline( lines, *outline ); - if( outline.empty() ) + if( outline->empty() ) goto UseBoundingBox; - aIDFBoard.AddOutline( outline ); + aIDFBoard.AddBoardOutline( outline ); + outline = NULL; // get all cutouts and write them out while( !lines.empty() ) { - IDF3::GetOutline( lines, outline ); + if( !outline ) + outline = new IDF_OUTLINE; - if( outline.empty() ) + IDF3::GetOutline( lines, *outline ); + + if( outline->empty() ) + { + outline->Clear(); continue; + } - aIDFBoard.AddOutline( outline ); + aIDFBoard.AddBoardOutline( outline ); + outline = NULL; } return; @@ -158,7 +168,10 @@ UseBoundingBox: lines.pop_front(); } - outline.Clear(); + if( outline ) + outline->Clear(); + else + outline = new IDF_OUTLINE; // fetch a rectangular bounding box for the board; // there is always some uncertainty in the board dimensions @@ -192,7 +205,7 @@ UseBoundingBox: p2.x = px[0]; p2.y = py[0]; - outline.push( new IDF_SEGMENT( p1, p2 ) ); + outline->push( new IDF_SEGMENT( p1, p2 ) ); for( int i = 1; i < 4; ++i ) { @@ -201,10 +214,10 @@ UseBoundingBox: p2.x = px[i]; p2.y = py[i]; - outline.push( new IDF_SEGMENT( p1, p2 ) ); + outline->push( new IDF_SEGMENT( p1, p2 ) ); } - aIDFBoard.AddOutline( outline ); + aIDFBoard.AddBoardOutline( outline ); } @@ -216,7 +229,7 @@ UseBoundingBox: * the library ELECTRICAL section. */ static void idf_export_module( BOARD* aPcb, MODULE* aModule, - IDF_BOARD& aIDFBoard ) + IDF3_BOARD& aIDFBoard ) { // Reference Designator std::string crefdes = TO_UTF8( aModule->GetReference() ); @@ -243,14 +256,14 @@ static void idf_export_module( BOARD* aPcb, MODULE* aModule, // Export pads double drill, x, y; - double scale = aIDFBoard.GetScale(); + double scale = aIDFBoard.GetUserScale(); IDF3::KEY_PLATING kplate; std::string pintype; std::string tstr; double dx, dy; - aIDFBoard.GetOffset( dx, dy ); + aIDFBoard.GetUserOffset( dx, dy ); for( D_PAD* pad = aModule->Pads(); pad; pad = pad->Next() ) { @@ -313,7 +326,19 @@ static void idf_export_module( BOARD* aPcb, MODULE* aModule, } else { - aIDFBoard.AddDrill( drill, x, y, kplate, crefdes, pintype, IDF3::ECAD ); + IDF_DRILL_DATA *dp = new IDF_DRILL_DATA( drill, x, y, kplate, crefdes, + pintype, IDF3::ECAD ); + + if( !aIDFBoard.AddDrill( dp ) ) + { + delete dp; + + std::ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__; + ostr << "(): could not add drill"; + + throw std::runtime_error( ostr.str() ); + } } } } @@ -321,6 +346,8 @@ static void idf_export_module( BOARD* aPcb, MODULE* aModule, // add any valid models to the library item list std::string refdes; + IDF3_COMPONENT* comp = NULL; + for( S3D_MASTER* modfile = aModule->Models(); modfile != 0; modfile = modfile->Next() ) { if( !modfile->Is3DType( S3D_MASTER::FILE3D_IDF ) ) @@ -330,14 +357,26 @@ static void idf_export_module( BOARD* aPcb, MODULE* aModule, { refdes = TO_UTF8( aModule->GetReference() ); + // NOREFDES cannot be used or else the software gets confused + // when writing out the placement data due to conflicting + // placement and layer specifications; to work around this we + // create a (hopefully) unique refdes for our exported part. if( refdes.empty() || !refdes.compare( "~" ) ) - refdes = aIDFBoard.GetRefDes(); + refdes = aIDFBoard.GetNewRefDes(); } + IDF3_COMP_OUTLINE* outline; + + outline = aIDFBoard.GetComponentOutline( modfile->GetShape3DName() ); + + if( !outline ) + throw( std::runtime_error( aIDFBoard.GetError() ) ); + double rotz = aModule->GetOrientation()/10.0; double locx = modfile->m_MatPosition.x; double locy = modfile->m_MatPosition.y; double locz = modfile->m_MatPosition.z; + double lrot = modfile->m_MatRotation.z; bool top = ( aModule->GetLayer() == LAYER_N_BACK ) ? false : true; @@ -348,12 +387,12 @@ static void idf_export_module( BOARD* aPcb, MODULE* aModule, RotatePoint( &locx, &locy, aModule->GetOrientation() ); locy = -locy; } + if( !top ) { RotatePoint( &locx, &locy, aModule->GetOrientation() ); locy = -locy; - rotz -= modfile->m_MatRotation.z; rotz = 180.0 - rotz; if( rotz >= 360.0 ) @@ -363,10 +402,97 @@ static void idf_export_module( BOARD* aPcb, MODULE* aModule, while( rotz <= -360.0 ) rotz += 360.0; } - locx += aModule->GetPosition().x * scale + dx; - locy += -aModule->GetPosition().y * scale + dy; + if( comp == NULL ) + comp = aIDFBoard.FindComponent( refdes ); - aIDFBoard.PlaceComponent( modfile->GetShape3DName(), refdes, locx, locy, locz, rotz, top ); + if( comp == NULL ) + { + comp = new IDF3_COMPONENT( &aIDFBoard ); + + if( comp == NULL ) + throw( std::runtime_error( aIDFBoard.GetError() ) ); + + comp->SetRefDes( refdes ); + + if( top ) + comp->SetPosition( aModule->GetPosition().x * scale + dx, + -aModule->GetPosition().y * scale + dy, + rotz, IDF3::LYR_TOP ); + else + comp->SetPosition( aModule->GetPosition().x * scale + dx, + -aModule->GetPosition().y * scale + dy, + rotz, IDF3::LYR_BOTTOM ); + + comp->SetPlacement( IDF3::PS_ECAD ); + + aIDFBoard.AddComponent( comp ); + } + else + { + double refX, refY, refA; + IDF3::IDF_LAYER side; + + if( ! comp->GetPosition( refX, refY, refA, side ) ) + { + // place the item + if( top ) + comp->SetPosition( aModule->GetPosition().x * scale + dx, + -aModule->GetPosition().y * scale + dy, + rotz, IDF3::LYR_TOP ); + else + comp->SetPosition( aModule->GetPosition().x * scale + dx, + -aModule->GetPosition().y * scale + dy, + rotz, IDF3::LYR_BOTTOM ); + } + else + { + // check that the retrieved component matches this one + refX = refX - ( aModule->GetPosition().x * scale + dx ); + refY = refY - ( -aModule->GetPosition().y * scale + dy ); + refA = refA - rotz; + refA *= refA; + refX *= refX; + refY *= refY; + refX += refY; + + // conditions: same side, X,Y coordinates within 10 microns, + // angle within 0.01 degree + if( ( top && side == IDF3::LYR_BOTTOM ) || ( !top && side == IDF3::LYR_TOP ) + || ( refA > 0.0001 ) || ( refX > 0.0001 ) ) + { + comp->GetPosition( refX, refY, refA, side ); + + std::ostringstream ostr; + ostr << "* " << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "():\n"; + ostr << "* conflicting Reference Designator '" << refdes << "'\n"; + ostr << "* X loc: " << (aModule->GetPosition().x * scale + dx); + ostr << " vs. " << refX << "\n"; + ostr << "* Y loc: " << (-aModule->GetPosition().y * scale + dy); + ostr << " vs. " << refY << "\n"; + ostr << "* angle: " << rotz; + ostr << " vs. " << refA << "\n"; + + if( top ) + ostr << "* TOP vs. "; + else + ostr << "* BOTTOM vs. "; + + if( side == IDF3::LYR_TOP ) + ostr << "TOP"; + else + ostr << "BOTTOM"; + + throw( std::runtime_error( ostr.str() ) ); + } + } + } + + + // create the local data ... + IDF3_COMP_OUTLINE_DATA* data = new IDF3_COMP_OUTLINE_DATA( comp, outline ); + + data->SetOffsets( locx, locy, locz, lrot ); + comp->AddOutlineData( data ); } return; @@ -378,21 +504,45 @@ static void idf_export_module( BOARD* aPcb, MODULE* aModule, * generates IDFv3 compliant board (*.emn) and library (*.emp) * files representing the user's PCB design. */ -bool Export_IDF3( BOARD* aPcb, const wxString& aFullFileName, double aUseThou ) +bool Export_IDF3( BOARD* aPcb, const wxString& aFullFileName, bool aUseThou ) { - IDF_BOARD idfBoard; + IDF3_BOARD idfBoard( IDF3::CAD_ELEC ); SetLocaleTo_C_standard(); + bool ok = true; + double scale = 1e-6; // we must scale internal units to mm for IDF + IDF3::IDF_UNIT idfUnit; + + if( aUseThou ) + { + idfUnit = IDF3::UNIT_THOU; + idfBoard.SetUserPrecision( 1 ); + } + else + { + idfUnit = IDF3::UNIT_MM; + idfBoard.SetUserPrecision( 5 ); + } + + wxFileName brdName = aPcb->GetFileName(); + + idfBoard.SetUserScale( scale ); + idfBoard.SetBoardThickness( aPcb->GetDesignSettings().GetBoardThickness() * scale ); + idfBoard.SetBoardName( TO_UTF8( brdName.GetFullName() ) ); + idfBoard.SetBoardVersion( 0 ); + idfBoard.SetLibraryVersion( 0 ); + + std::ostringstream ostr; + ostr << "Created by KiCad " << TO_UTF8( GetBuildVersion() ); + idfBoard.SetIDFSource( ostr.str() ); + try { - idfBoard.Setup( aPcb->GetFileName(), aFullFileName, aUseThou, - aPcb->GetDesignSettings().GetBoardThickness() ); - // set up the global offsets EDA_RECT bbox = aPcb->ComputeBoundingBox( true ); - idfBoard.SetOffset( -bbox.Centre().x * idfBoard.GetScale(), - bbox.Centre().y * idfBoard.GetScale() ); + idfBoard.SetUserOffset( -bbox.Centre().x * scale, + bbox.Centre().y * scale ); // Export the board outline idf_export_outline( aPcb, idfBoard ); @@ -401,15 +551,32 @@ bool Export_IDF3( BOARD* aPcb, const wxString& aFullFileName, double aUseThou ) for( MODULE* module = aPcb->m_Modules; module != 0; module = module->Next() ) idf_export_module( aPcb, module, idfBoard ); - idfBoard.Finish(); + if( !idfBoard.WriteFile( aFullFileName, idfUnit, false ) ) + { + wxString msg; + msg << _( "IDF Export Failed:\n" ) << FROM_UTF8( idfBoard.GetError().c_str() ); + wxMessageBox( msg ); + + ok = false; + } } catch( const IO_ERROR& ioe ) { - wxLogDebug( wxT( "An error occurred attemping export to IDFv3.\n\nError: %s" ), - GetChars( ioe.errorText ) ); + wxString msg; + msg << _( "IDF Export Failed:\n" ) << ioe.errorText; + wxMessageBox( msg ); + + ok = false; + } + catch( std::exception& e ) + { + wxString msg; + msg << _( "IDF Export Failed:\n" ) << FROM_UTF8( e.what() ); + wxMessageBox( msg ); + ok = false; } SetLocaleTo_Default(); - return true; + return ok; } diff --git a/pcbnew/exporters/idf.cpp b/pcbnew/exporters/idf.cpp deleted file mode 100644 index 69d2487c65..0000000000 --- a/pcbnew/exporters/idf.cpp +++ /dev/null @@ -1,1443 +0,0 @@ -/** - * file: idf.cpp - * - * This program source code file is part of KiCad, a free EDA CAD application. - * - * Copyright (C) 2013-2014 Cirilo Bernardo - * - * 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 - */ - -// TODO: Consider using different precision formats for THOU vs MM output -// Keep in mind that THOU cannot represent MM very well although MM can -// represent 1 THOU with 4 decimal places. For modern manufacturing we -// are interested in a resolution of about 0.1 THOU. - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// minimum drill diameter (nanometers) - 10000 is a 0.01mm drill -#define IDF_MIN_DIA ( 10000.0 ) - -// minimum board thickness; this is about 0.012mm (0.5 mils) -// which is about the thickness of a single kapton layer typically -// used in a flexible design. -#define IDF_MIN_BRD_THICKNESS (12000) - - -// START: a few routines to help IDF_LIB but which may be of general use in the future -// as IDF support develops - -// fetch a line from the given input file and trim the ends -static bool FetchIDFLine( std::ifstream& aModel, std::string& aLine, bool& isComment ); - -// extract an IDF string and move the index to point to the character after the substring -static bool GetIDFString( const std::string& aLine, std::string& aIDFString, - bool& hasQuotes, int& aIndex ); - -// END: IDF_LIB helper routines - - -IDF_DRILL_DATA::IDF_DRILL_DATA( double aDrillDia, double aPosX, double aPosY, - IDF3::KEY_PLATING aPlating, - const std::string aRefDes, - const std::string aHoleType, - IDF3::KEY_OWNER aOwner ) -{ - if( aDrillDia < 0.3 ) - dia = 0.3; - else - dia = aDrillDia; - - x = aPosX; - y = aPosY; - plating = aPlating; - - if( !aRefDes.compare( "BOARD" ) ) - { - kref = IDF3::BOARD; - } - else if( aRefDes.empty() || !aRefDes.compare( "NOREFDES" ) ) - { - kref = IDF3::NOREFDES; - } - else if( !aRefDes.compare( "PANEL" ) ) - { - kref = IDF3::PANEL; - } - else - { - kref = IDF3::REFDES; - refdes = aRefDes; - } - - if( !aHoleType.compare( "PIN" ) ) - { - khole = IDF3::PIN; - } - else if( !aHoleType.compare( "VIA" ) ) - { - khole = IDF3::VIA; - } - else if( aHoleType.empty() || !aHoleType.compare( "MTG" ) ) - { - khole = IDF3::MTG; - } - else if( !aHoleType.compare( "TOOL" ) ) - { - khole = IDF3::TOOL; - } - else - { - khole = IDF3::OTHER; - holetype = aHoleType; - } - - owner = aOwner; -} // IDF_DRILL_DATA::IDF_DRILL_DATA( ... ) - - -bool IDF_DRILL_DATA::Write( FILE* aLayoutFile ) -{ - // TODO: check stream integrity and return 'false' as appropriate - - if( !aLayoutFile ) - return false; - - std::string holestr; - std::string refstr; - std::string ownstr; - std::string pltstr; - - switch( khole ) - { - case IDF3::PIN: - holestr = "PIN"; - break; - - case IDF3::VIA: - holestr = "VIA"; - break; - - case IDF3::TOOL: - holestr = "TOOL"; - break; - - case IDF3::OTHER: - holestr = "\"" + holetype + "\""; - break; - - default: - holestr = "MTG"; - break; - } - - switch( kref ) - { - case IDF3::BOARD: - refstr = "BOARD"; - break; - - case IDF3::PANEL: - refstr = "PANEL"; - break; - - case IDF3::REFDES: - refstr = "\"" + refdes + "\""; - break; - - default: - refstr = "NOREFDES"; - break; - } - - if( plating == IDF3::PTH ) - pltstr = "PTH"; - else - pltstr = "NPTH"; - - switch( owner ) - { - case IDF3::MCAD: - ownstr = "MCAD"; - break; - - case IDF3::ECAD: - ownstr = "ECAD"; - break; - - default: - ownstr = "UNOWNED"; - } - - fprintf( aLayoutFile, "%.3f %.5f %.5f %s %s %s %s\n", - dia, x, y, pltstr.c_str(), refstr.c_str(), holestr.c_str(), ownstr.c_str() ); - - return true; -} // IDF_DRILL_DATA::Write( aLayoutFile ) - - -IDF_BOARD::IDF_BOARD() -{ - refdesIndex = 0; - outlineIndex = 0; - scale = 1e-6; - boardThickness = 1.6; // default to 1.6mm thick boards - - useThou = false; // by default we want mm output - hasBrdOutlineHdr = false; - - layoutFile = NULL; - libFile = NULL; -} - - -IDF_BOARD::~IDF_BOARD() -{ - // simply close files if they are open; do not attempt - // anything else since a previous exception may have left - // data in a bad state. - if( layoutFile != NULL ) - { - fclose( layoutFile ); - layoutFile = NULL; - } - - if( libFile != NULL ) - { - fclose( libFile ); - libFile = NULL; - } -} - - -bool IDF_BOARD::Setup( wxString aBoardName, - wxString aFullFileName, - bool aUseThou, - int aBoardThickness ) -{ - if( aBoardThickness < IDF_MIN_BRD_THICKNESS ) - return false; - - if( aUseThou ) - { - useThou = true; - scale = 1e-3 / 25.4; - } - else - { - useThou = false; - scale = 1e-6; - } - - boardThickness = aBoardThickness * scale; - - wxFileName brdname( aBoardName ); - wxFileName idfname( aFullFileName ); - - // open the layout file - idfname.SetExt( wxT( "emn" ) ); - layoutFile = wxFopen( aFullFileName, wxT( "wt" ) ); - - if( layoutFile == NULL ) - return false; - - // open the library file - idfname.SetExt( wxT( "emp" ) ); - libFile = wxFopen( idfname.GetFullPath(), wxT( "wt" ) ); - - if( libFile == NULL ) - { - fclose( layoutFile ); - layoutFile = NULL; - return false; - } - - wxDateTime tdate( time( NULL ) ); - - fprintf( layoutFile, ".HEADER\n" - "BOARD_FILE 3.0 \"Created by KiCad %s\"" - " %.4u/%.2u/%.2u.%.2u:%.2u:%.2u 1\n" - "\"%s\" %s\n" - ".END_HEADER\n\n", - TO_UTF8( GetBuildVersion() ), - tdate.GetYear(), tdate.GetMonth() + 1, tdate.GetDay(), - tdate.GetHour(), tdate.GetMinute(), tdate.GetSecond(), - TO_UTF8( brdname.GetFullName() ), useThou ? "THOU" : "MM" ); - - fprintf( libFile, ".HEADER\n" - "LIBRARY_FILE 3.0 \"Created by KiCad %s\" %.4d/%.2d/%.2d.%.2d:%.2d:%.2d 1\n" - ".END_HEADER\n\n", - TO_UTF8( GetBuildVersion() ), - tdate.GetYear(), tdate.GetMonth() + 1, tdate.GetDay(), - tdate.GetHour(), tdate.GetMinute(), tdate.GetSecond() ); - - return true; -} - - -bool IDF_BOARD::Finish( void ) -{ - // Steps to finalize the board and library files: - // 1. (emn) close the BOARD_OUTLINE section - // 2. (emn) write out the DRILLED_HOLES section - // 3. (emp) finalize the library file - // 4. (emn) write out the COMPONENT_PLACEMENT section - - if( layoutFile == NULL || libFile == NULL ) - return false; - - // Finalize the board outline section - fprintf( layoutFile, ".END_BOARD_OUTLINE\n\n" ); - - // Write out the drill section - bool ok = WriteDrills(); - - // populate the library (*.emp) file and write the - // PLACEMENT section - if( ok ) - ok = IDFLib.WriteFiles( layoutFile, libFile ); - - fclose( libFile ); - libFile = NULL; - - fclose( layoutFile ); - layoutFile = NULL; - - return ok; -} - - -bool IDF_BOARD::AddOutline( IDF_OUTLINE& aOutline ) -{ - if( !layoutFile ) - return false; - - // TODO: check the stream integrity - - std::list::iterator bo; - std::list::iterator eo; - - if( !hasBrdOutlineHdr ) - { - fprintf( layoutFile, ".BOARD_OUTLINE ECAD\n%.5f\n", boardThickness ); - hasBrdOutlineHdr = true; - } - - if( aOutline.size() == 1 ) - { - if( !aOutline.front()->IsCircle() ) - return false; // this is a bad outline - - // NOTE: a circle always has an angle of 360, never -360, - // otherwise SolidWorks chokes on the file. - fprintf( layoutFile, "%d %.5f %.5f 0\n", outlineIndex, - aOutline.front()->startPoint.x, aOutline.front()->startPoint.y ); - fprintf( layoutFile, "%d %.5f %.5f 360\n", outlineIndex, - aOutline.front()->endPoint.x, aOutline.front()->endPoint.y ); - - ++outlineIndex; - return true; - } - - // ensure that the very last point is the same as the very first point - aOutline.back()-> endPoint = aOutline.front()->startPoint; - - // check if we must reverse things - if( ( aOutline.IsCCW() && ( outlineIndex > 0 ) ) - || ( ( !aOutline.IsCCW() ) && ( outlineIndex == 0 ) ) ) - { - eo = aOutline.begin(); - bo = aOutline.end(); - --bo; - - // for the first item we write out both points - if( aOutline.front()->angle < MIN_ANG && aOutline.front()->angle > -MIN_ANG ) - { - fprintf( layoutFile, "%d %.5f %.5f 0\n", outlineIndex, - aOutline.front()->endPoint.x, aOutline.front()->endPoint.y ); - fprintf( layoutFile, "%d %.5f %.5f 0\n", outlineIndex, - aOutline.front()->startPoint.x, aOutline.front()->startPoint.y ); - } - else - { - fprintf( layoutFile, "%d %.5f %.5f 0\n", outlineIndex, - aOutline.front()->endPoint.x, aOutline.front()->endPoint.y ); - fprintf( layoutFile, "%d %.5f %.5f %.5f\n", outlineIndex, - aOutline.front()->startPoint.x, aOutline.front()->startPoint.y, - -aOutline.front()->angle ); - } - - // for all other segments we only write out the start point - while( bo != eo ) - { - if( (*bo)->angle < MIN_ANG && (*bo)->angle > -MIN_ANG ) - { - fprintf( layoutFile, "%d %.5f %.5f 0\n", outlineIndex, - (*bo)->startPoint.x, (*bo)->startPoint.y ); - } - else - { - fprintf( layoutFile, "%d %.5f %.5f %.5f\n", outlineIndex, - (*bo)->startPoint.x, (*bo)->startPoint.y, -(*bo)->angle ); - } - - --bo; - } - } - else - { - bo = aOutline.begin(); - eo = aOutline.end(); - - // for the first item we write out both points - if( (*bo)->angle < MIN_ANG && (*bo)->angle > -MIN_ANG ) - { - fprintf( layoutFile, "%d %.5f %.5f 0\n", outlineIndex, - (*bo)->startPoint.x, (*bo)->startPoint.y ); - fprintf( layoutFile, "%d %.5f %.5f 0\n", outlineIndex, - (*bo)->endPoint.x, (*bo)->endPoint.y ); - } - else - { - fprintf( layoutFile, "%d %.5f %.5f 0\n", outlineIndex, - (*bo)->startPoint.x, (*bo)->startPoint.y ); - fprintf( layoutFile, "%d %.5f %.5f %.5f\n", outlineIndex, - (*bo)->endPoint.x, (*bo)->endPoint.y, (*bo)->angle ); - } - - ++bo; - - // for all other segments we only write out the last point - while( bo != eo ) - { - if( (*bo)->angle < MIN_ANG && (*bo)->angle > -MIN_ANG ) - { - fprintf( layoutFile, "%d %.5f %.5f 0\n", outlineIndex, - (*bo)->endPoint.x, (*bo)->endPoint.y ); - } - else - { - fprintf( layoutFile, "%d %.5f %.5f %.5f\n", outlineIndex, - (*bo)->endPoint.x, (*bo)->endPoint.y, (*bo)->angle ); - } - - ++bo; - } - } - - ++outlineIndex; - - return true; -} - - -bool IDF_BOARD::AddDrill( double dia, double x, double y, - IDF3::KEY_PLATING plating, - const std::string refdes, - const std::string holeType, - IDF3::KEY_OWNER owner ) -{ - if( dia < IDF_MIN_DIA * scale ) - return false; - - IDF_DRILL_DATA* dp = new IDF_DRILL_DATA( dia, x, y, plating, refdes, holeType, owner ); - drills.push_back( dp ); - - return true; -} - - -bool IDF_BOARD::AddSlot( double aWidth, double aLength, double aOrientation, - double aX, double aY ) -{ - if( aWidth < IDF_MIN_DIA * scale ) - return false; - - if( aLength < IDF_MIN_DIA * scale ) - return false; - - IDF_POINT c[2]; // centers - IDF_POINT pt[4]; - - double a1 = aOrientation / 180.0 * M_PI; - double a2 = a1 + M_PI2; - double d1 = aLength / 2.0; - double d2 = aWidth / 2.0; - double sa1 = sin( a1 ); - double ca1 = cos( a1 ); - double dsa2 = d2 * sin( a2 ); - double dca2 = d2 * cos( a2 ); - - c[0].x = aX + d1 * ca1; - c[0].y = aY + d1 * sa1; - - c[1].x = aX - d1 * ca1; - c[1].y = aY - d1 * sa1; - - pt[0].x = c[0].x - dca2; - pt[0].y = c[0].y - dsa2; - - pt[1].x = c[1].x - dca2; - pt[1].y = c[1].y - dsa2; - - pt[2].x = c[1].x + dca2; - pt[2].y = c[1].y + dsa2; - - pt[3].x = c[0].x + dca2; - pt[3].y = c[0].y + dsa2; - - IDF_OUTLINE outline; - - // first straight run - IDF_SEGMENT* seg = new IDF_SEGMENT( pt[0], pt[1] ); - outline.push( seg ); - // first 180 degree cap - seg = new IDF_SEGMENT( c[1], pt[1], -180.0, true ); - outline.push( seg ); - // final straight run - seg = new IDF_SEGMENT( pt[2], pt[3] ); - outline.push( seg ); - // final 180 degree cap - seg = new IDF_SEGMENT( c[0], pt[3], -180.0, true ); - outline.push( seg ); - - return AddOutline( outline ); -} - - -bool IDF_BOARD::PlaceComponent( const wxString aComponentFile, const std::string aRefDes, - double aXLoc, double aYLoc, double aZLoc, - double aRotation, bool isOnTop ) -{ - return IDFLib.PlaceComponent( aComponentFile, aRefDes, - aXLoc, aYLoc, aZLoc, - aRotation, isOnTop ); -} - - -std::string IDF_BOARD::GetRefDes( void ) -{ - std::ostringstream ostr; - - ostr << "NOREFDES_" << refdesIndex++; - - return ostr.str(); -} - - -bool IDF_BOARD::WriteDrills( void ) -{ - if( !layoutFile ) - return false; - - // TODO: check the stream integrity and return false as appropriate - if( drills.empty() ) - return true; - - fprintf( layoutFile, ".DRILLED_HOLES\n" ); - - std::list::iterator ds = drills.begin(); - std::list::iterator de = drills.end(); - - while( ds != de ) - { - if( !(*ds)->Write( layoutFile ) ) - return false; - - ++ds; - } - - fprintf( layoutFile, ".END_DRILLED_HOLES\n" ); - - return true; -} - - -double IDF_BOARD::GetScale( void ) -{ - return scale; -} - - -void IDF_BOARD::SetOffset( double x, double y ) -{ - offsetX = x; - offsetY = y; -} - - -void IDF_BOARD::GetOffset( double& x, double& y ) -{ - x = offsetX; - y = offsetY; -} - - -IDF_LIB::~IDF_LIB() -{ - while( !components.empty() ) - { - delete components.back(); - components.pop_back(); - } -} - - -bool IDF_LIB::writeLib( FILE* aLibFile ) -{ - if( !aLibFile ) - return false; - - // TODO: check stream integrity and return false as appropriate - - // export models - std::list< IDF_COMP* >::const_iterator mbeg = components.begin(); - std::list< IDF_COMP* >::const_iterator mend = components.end(); - - while( mbeg != mend ) - { - if( !(*mbeg)->WriteLib( aLibFile ) ) - return false; - ++mbeg; - } - - libWritten = true; - return true; -} - - -bool IDF_LIB::writeBrd( FILE* aLayoutFile ) -{ - if( !aLayoutFile || !libWritten ) - return false; - - if( components.empty() ) - return true; - - // TODO: check stream integrity and return false as appropriate - - // write out the board placement information - std::list< IDF_COMP* >::const_iterator mbeg = components.begin(); - std::list< IDF_COMP* >::const_iterator mend = components.end(); - - fprintf( aLayoutFile, "\n.PLACEMENT\n" ); - - while( mbeg != mend ) - { - if( !(*mbeg)->WritePlacement( aLayoutFile ) ) - return false; - ++mbeg; - } - - fprintf( aLayoutFile, ".END_PLACEMENT\n" ); - - return true; -} - - -bool IDF_LIB::WriteFiles( FILE* aLayoutFile, FILE* aLibFile ) -{ - if( !aLayoutFile || !aLibFile ) - return false; - - libWritten = false; - regOutlines.clear(); - - if( !writeLib( aLibFile ) ) - return false; - - return writeBrd( aLayoutFile ); -} - - -bool IDF_LIB::RegisterOutline( const std::string aGeomPartString ) -{ - std::set< std::string >::const_iterator it = regOutlines.find( aGeomPartString ); - - if( it != regOutlines.end() ) - return true; - - regOutlines.insert( aGeomPartString ); - - return false; -} - - -bool IDF_LIB::PlaceComponent( const wxString aComponentFile, const std::string aRefDes, - double aXLoc, double aYLoc, double aZLoc, - double aRotation, bool isOnTop ) -{ - IDF_COMP* comp = new IDF_COMP( this ); - - if( comp == NULL ) - { - std::cerr << "IDF_LIB: *ERROR* could not allocate memory for a component\n"; - return false; - } - - components.push_back( comp ); - - if( !comp->PlaceComponent( aComponentFile, aRefDes, - aXLoc, aYLoc, aZLoc, - aRotation, isOnTop ) ) - { - std::cerr << "IDF_LIB: file does not exist (or is symlink):\n"; - std::cerr << " FILE: " << TO_UTF8( aComponentFile ) << "\n"; - return false; - } - - return true; -} - - -IDF_COMP::IDF_COMP( IDF_LIB* aParent ) -{ - parent = aParent; -} - - -bool IDF_COMP::PlaceComponent( const wxString aComponentFile, const std::string aRefDes, - double aXLoc, double aYLoc, double aZLoc, - double aRotation, bool isOnTop ) -{ - componentFile = aComponentFile; - refdes = aRefDes; - - if( refdes.empty() || !refdes.compare( "~" ) || !refdes.compare( "0" ) ) - refdes = "NOREFDES"; - - loc_x = aXLoc; - loc_y = aYLoc; - loc_z = aZLoc; - rotation = aRotation; - top = isOnTop; - - wxString fname = wxExpandEnvVars( aComponentFile ); - - if( !wxFileName::FileExists( fname ) ) - return false; - - componentFile = fname; - - return true; -} - - -bool IDF_COMP::WritePlacement( FILE* aLayoutFile ) -{ - if( aLayoutFile == NULL ) - { - std::cerr << "IDF_COMP: *ERROR* WritePlacement() invoked with aLayoutFile = NULL\n"; - return false; - } - - if( parent == NULL ) - { - std::cerr << "IDF_COMP: *ERROR* no valid pointer \n"; - return false; - } - - if( componentFile.empty() ) - { - std::cerr << "IDF_COMP: *BUG* empty componentFile name in WritePlacement()\n"; - return false; - } - - if( geometry.empty() && partno.empty() ) - { - std::cerr << "IDF_COMP: *BUG* geometry and partno strings are empty in WritePlacement()\n"; - return false; - } - - // TODO: monitor stream integrity and respond accordingly - - // PLACEMENT, RECORD 2: - fprintf( aLayoutFile, "\"%s\" \"%s\" \"%s\"\n", - geometry.c_str(), partno.c_str(), refdes.c_str() ); - - // PLACEMENT, RECORD 3: - if( rotation >= -MIN_ANG && rotation <= -MIN_ANG ) - { - fprintf( aLayoutFile, "%.6f %.6f %.6f 0 %s ECAD\n", - loc_x, loc_y, loc_z, top ? "TOP" : "BOTTOM" ); - } - else - { - fprintf( aLayoutFile, "%.6f %.6f %.6f %.3f %s ECAD\n", - loc_x, loc_y, loc_z, rotation, top ? "TOP" : "BOTTOM" ); - } - - return true; -} - - -bool IDF_COMP::WriteLib( FILE* aLibFile ) -{ - // 1. parse the file for the .ELECTRICAL or .MECHANICAL section - // and extract the Geometry and PartNumber strings - // 2. Register the name; check if it already exists - // 3. parse the rest of the file until .END_ELECTRICAL or - // .END_MECHANICAL; validate that each entry conforms - // to a valid outline - // 4. write lines to library file - // - // NOTE on parsing (the order matters): - // + store each line which begins with '#' - // + strip blanks from both ends of the line - // + drop each blank line - // + the first non-blank non-comment line must be - // .ELECTRICAL or .MECHANICAL (as per spec, case does not matter) - // + the first non-blank line after RECORD 1 must be RECORD 2 - // + following RECORD 2, only blank lines, valid outline entries, - // and .END_{MECHANICAL,ELECTRICAL} are allowed - // + only a single outline may be specified; the order may be - // CW or CCW. - // + all valid lines are stored and written to the library file - // - // return: false if we do could not write model data; we may return - // true even if we could not read an IDF file for some reason, provided - // that the default model was written. In such a case, warnings will be - // written to stderr. - - if( aLibFile == NULL ) - { - std::cerr << "IDF_COMP: *ERROR* WriteLib() invoked with aLibFile = NULL\n"; - return false; - } - - if( parent == NULL ) - { - std::cerr << "IDF_COMP: *ERROR* no valid pointer \n"; - return false; - } - - if( componentFile.empty() ) - { - std::cerr << "IDF_COMP: *BUG* empty componentFile name in WriteLib()\n"; - return false; - } - - std::list< std::string > records; - std::ifstream model; - std::string fname = TO_UTF8( componentFile ); - - model.open( fname.c_str(), std::ios_base::in ); - - if( !model.is_open() ) - { - std::cerr << "* IDF EXPORT: could not open file " << fname << "\n"; - return substituteComponent( aLibFile ); - } - - std::string entryType; // will be one of ELECTRICAL or MECHANICAL - std::string endMark; // will be one of .END_ELECTRICAL or .END_MECHANICAL - std::string iline; // the input line - int state = 1; - bool isComment; // true if a line just read in is a comment line - bool isNewItem = false; // true if the outline is a previously unsaved IDF item - - // some vars for parsing record 3 - int loopIdx = -1; // direction of points in outline (0=CW, 1=CCW, -1=no points yet) - double firstX; - double firstY; - bool lineClosed = false; // true when outline has been closed; only one outline is permitted - - while( state ) - { - while( !FetchIDFLine( model, iline, isComment ) && model.good() ); - - if( !model.good() ) - { - // this should not happen; we should at least - // have encountered the .END_ statement; - // however, we shall make a concession if the - // last line is an .END_ statement which had - // not been correctly terminated - if( !endMark.empty() && !strncasecmp( iline.c_str(), endMark.c_str(), 15 ) ) - { - std::cerr << "IDF EXPORT: *WARNING* IDF file is not properly terminated\n"; - std::cerr << "* FILE: " << fname << "\n"; - records.push_back( endMark ); - break; - } - - std::cerr << "IDF EXPORT: *ERROR* faulty IDF file\n"; - std::cerr << "* FILE: " << fname << "\n"; - return substituteComponent( aLibFile ); - } - - switch( state ) - { - case 1: - // accept comment lines, .ELECTRICAL, or .MECHANICAL; - // all others are simply ignored - if( isComment ) - { - records.push_back( iline ); - break; - } - - if( !strncasecmp( iline.c_str(), ".electrical", 11 ) ) - { - entryType = ".ELECTRICAL"; - endMark = ".END_ELECTRICAL"; - records.push_back( entryType ); - state = 2; - break; - } - - if( !strncasecmp( iline.c_str(), ".mechanical", 11 ) ) - { - entryType = ".MECHANICAL"; - endMark = ".END_MECHANICAL"; - records.push_back( entryType ); - state = 2; - break; - } - - break; - - case 2: - // accept only a RECORD 2 compliant line; - // anything else constitutes a malformed IDF file - if( isComment ) - { - std::cerr << "IDF EXPORT: bad IDF file\n"; - std::cerr << "* LINE: " << iline << "\n"; - std::cerr << "* FILE: " << fname << "\n"; - std::cerr << "* REASON: comment within " - << entryType << " section\n"; - model.close(); - return substituteComponent( aLibFile ); - } - - if( !parseRec2( iline, isNewItem ) ) - { - std::cerr << "IDF EXPORT: bad IDF file\n"; - std::cerr << "* LINE: " << iline << "\n"; - std::cerr << "* FILE: " << fname << "\n"; - std::cerr << "* REASON: expecting RECORD 2 of " - << entryType << " section\n"; - model.close(); - return substituteComponent( aLibFile ); - } - - if( isNewItem ) - { - records.push_back( iline ); - state = 3; - } - else - { - model.close(); - return true; - } - - break; - - case 3: - // accept outline entries or end of section - if( isComment ) - { - std::cerr << "IDF EXPORT: bad IDF file\n"; - std::cerr << "* LINE: " << iline << "\n"; - std::cerr << "* FILE: " << fname << "\n"; - std::cerr << "* REASON: comment within " - << entryType << " section\n"; - model.close(); - return substituteComponent( aLibFile ); - } - - if( !strncasecmp( iline.c_str(), endMark.c_str(), 15 ) ) - { - records.push_back( endMark ); - state = 0; - break; - } - - if( lineClosed ) - { - // there should be no further points - std::cerr << "IDF EXPORT: faulty IDF file\n"; - std::cerr << "* LINE: " << iline << "\n"; - std::cerr << "* FILE: " << fname << "\n"; - std::cerr << "* REASON: more than 1 outline in " - << entryType << " section\n"; - model.close(); - return substituteComponent( aLibFile ); - } - - if( !parseRec3( iline, loopIdx, firstX, firstY, lineClosed ) ) - { - std::cerr << "IDF EXPORT: unexpected line in IDF file\n"; - std::cerr << "* LINE: " << iline << "\n"; - std::cerr << "* FILE: " << fname << "\n"; - model.close(); - return substituteComponent( aLibFile ); - } - - records.push_back( iline ); - break; - - default: - std::cerr << "IDF EXPORT: BUG in " << __FUNCTION__ << ": unexpected state\n"; - model.close(); - return substituteComponent( aLibFile ); - break; - } // switch( state ) - } // while( state ) - - model.close(); - - if( !lineClosed ) - { - std::cerr << "IDF EXPORT: component outline not closed\n"; - std::cerr << "* FILE: " << fname << "\n"; - return substituteComponent( aLibFile ); - } - - std::list< std::string >::iterator lbeg = records.begin(); - std::list< std::string >::iterator lend = records.end(); - - // TODO: check stream integrity - while( lbeg != lend ) - { - fprintf( aLibFile, "%s\n", lbeg->c_str() ); - ++lbeg; - } - fprintf( aLibFile, "\n" ); - - return true; -} - - -bool IDF_COMP::substituteComponent( FILE* aLibFile ) -{ - // the component outline does not exist or could not be - // read; substitute a placeholder - - // TODO: check the stream integrity - geometry = "NOGEOM"; - partno = "NOPART"; - - if( parent->RegisterOutline( "NOGEOM_NOPART" ) ) - return true; - - // Create a star shape 5mm high with points on 5 and 2.5 mm circles - fprintf( aLibFile, ".ELECTRICAL\n" ); - fprintf( aLibFile, "\"NOGEOM\" \"NOPART\" MM 5\n" ); - - double a, da, x, y; - da = M_PI / 5.0; - a = da / 2.0; - - for( int i = 0; i < 10; ++i ) - { - if( i & 1 ) - { - x = 2.5 * cos( a ); - y = 2.5 * sin( a ); - } - else - { - x = 1.5 * cos( a ); - y = 1.5 * sin( a ); - } - - a += da; - fprintf( aLibFile, "0 %.3f %.3f 0\n", x, y ); - } - - a = da / 2.0; - x = 1.5 * cos( a ); - y = 1.5 * sin( a ); - fprintf( aLibFile, "0 %.3f %.3f 0\n", x, y ); - fprintf( aLibFile, ".END_ELECTRICAL\n\n" ); - - return true; -} - - -bool IDF_COMP::parseRec2( const std::string aLine, bool& isNewItem ) -{ - // RECORD 2: - // + "Geometry Name" - // + "Part Number" - // + MM or THOU - // + height (float) - - isNewItem = false; - - int idx = 0; - bool quoted = false; - std::string entry; - - if( !GetIDFString( aLine, entry, quoted, idx ) ) - { - std::cerr << "IDF_COMP: *ERROR* invalid RECORD 2 in model file (no Geometry Name entry)\n"; - return false; - } - - geometry = entry; - - if( !GetIDFString( aLine, entry, quoted, idx ) ) - { - std::cerr << "IDF_COMP: *ERROR* invalid RECORD 2 in model file (no Part No. entry)\n"; - return false; - } - - partno = entry; - - if( geometry.empty() && partno.empty() ) - { - std::cerr << "IDF_COMP: *ERROR* invalid RECORD 2 in model file\n"; - std::cerr << " Geometry Name and Part Number are both empty.\n"; - return false; - } - - if( !GetIDFString( aLine, entry, quoted, idx ) ) - { - std::cerr << "IDF_COMP: *ERROR* invalid RECORD 2, missing FIELD 3\n"; - return false; - } - - if( strcasecmp( "MM", entry.c_str() ) && strcasecmp( "THOU", entry.c_str() ) ) - { - std::cerr << "IDF_COMP: *ERROR* invalid RECORD 2, invalid FIELD 3 \"" - << entry << "\"\n"; - return false; - } - - if( !GetIDFString( aLine, entry, quoted, idx ) ) - { - std::cerr << "IDF_COMP: *ERROR* invalid RECORD 2, missing FIELD 4\n"; - return false; - } - - if( quoted ) - { - std::cerr << "IDF_COMP: *ERROR* invalid RECORD 2, invalid FIELD 4 (quoted)\n"; - std::cerr << " LINE: " << aLine << "\n"; - return false; - } - - // ensure that we have a valid value - double val; - std::stringstream teststr; - teststr << entry; - - if( !( teststr >> val ) ) - { - std::cerr << "IDF_COMP: *ERROR* invalid RECORD 2, invalid FIELD 4 (must be numeric)\n"; - std::cerr << " LINE: " << aLine << "\n"; - return false; - } - - teststr.clear(); - teststr << geometry << "_" << partno; - - if( !parent->RegisterOutline( teststr.str() ) ) - isNewItem = true; - - return true; -} - - -bool IDF_COMP::parseRec3( const std::string aLine, int& aLoopIndex, - double& aX, double& aY, bool& aClosed ) -{ - // RECORD 3: - // + 0,1 (loop label) - // + X coord (float) - // + Y coord (float) - // + included angle (0 for line, +ang for CCW, -ang for CW, +360 for circle) - // - // notes: - // 1. first entry may not be a circle or arc - // 2. it would be nice, but not essential, to ensure that the - // winding is indeed as specified by the loop label - // - - double x, y, ang; - bool ccw = false; - bool quoted = false; - int idx = 0; - std::string entry; - - if( !GetIDFString( aLine, entry, quoted, idx ) ) - { - std::cerr << "IDF_COMP: *ERROR* invalid RECORD 3, no data\n"; - return false; - } - - if( quoted ) - { - std::cerr << "IDF_COMP: *ERROR* invalid RECORD 3, FIELD 1 is quoted\n"; - std::cerr << " LINE: " << aLine << "\n"; - return false; - } - - if( entry.compare( "0" ) && entry.compare( "1" ) ) - { - std::cerr << "IDF_COMP: *ERROR* invalid RECORD 3, FIELD 1 is invalid (must be 0 or 1)\n"; - std::cerr << " LINE: " << aLine << "\n"; - return false; - } - - if( !entry.compare( "0" ) ) - ccw = true; - - if( aLoopIndex == 0 && !ccw ) - { - std::cerr << "IDF_COMP: *ERROR* invalid RECORD 3, LOOP INDEX changed from 0 to 1\n"; - std::cerr << " LINE: " << aLine << "\n"; - return false; - } - - if( aLoopIndex == 1 && ccw ) - { - std::cerr << "IDF_COMP: *ERROR* invalid RECORD 3, LOOP INDEX changed from 1 to 0\n"; - std::cerr << " LINE: " << aLine << "\n"; - return false; - } - - if( !GetIDFString( aLine, entry, quoted, idx ) ) - { - std::cerr << "IDF_COMP: *ERROR* invalid RECORD 3, FIELD 2 does not exist\n"; - std::cerr << " LINE: " << aLine << "\n"; - return false; - } - - if( quoted ) - { - std::cerr << "IDF_COMP: *ERROR* invalid RECORD 3, FIELD 2 is quoted\n"; - std::cerr << " LINE: " << aLine << "\n"; - return false; - } - - std::stringstream tstr; - tstr.str( entry ); - - if( !(tstr >> x ) ) - { - std::cerr << "IDF_COMP: *ERROR* invalid RECORD 3, invalid X value in FIELD 2\n"; - std::cerr << " LINE: " << aLine << "\n"; - return false; - } - - if( !GetIDFString( aLine, entry, quoted, idx ) ) - { - std::cerr << "IDF_COMP: *ERROR* invalid RECORD 3, FIELD 3 does not exist\n"; - std::cerr << " LINE: " << aLine << "\n"; - return false; - } - - if( quoted ) - { - std::cerr << "IDF_COMP: *ERROR* invalid RECORD 3, FIELD 3 is quoted\n"; - std::cerr << " LINE: " << aLine << "\n"; - return false; - } - - tstr.clear(); - tstr.str( entry ); - - if( !(tstr >> y ) ) - { - std::cerr << "IDF_COMP: *ERROR* invalid RECORD 3, invalid Y value in FIELD 3\n"; - std::cerr << " LINE: " << aLine << "\n"; - return false; - } - - if( !GetIDFString( aLine, entry, quoted, idx ) ) - { - std::cerr << "IDF_COMP: *ERROR* invalid RECORD 3, FIELD 4 does not exist\n"; - std::cerr << " LINE: " << aLine << "\n"; - return false; - } - - if( quoted ) - { - std::cerr << "IDF_COMP: *ERROR* invalid RECORD 3, FIELD 4 is quoted\n"; - std::cerr << " LINE: " << aLine << "\n"; - return false; - } - - tstr.clear(); - tstr.str( entry ); - - if( !(tstr >> ang ) ) - { - std::cerr << "IDF_COMP: *ERROR* invalid RECORD 3, invalid ANGLE value in FIELD 3\n"; - std::cerr << " LINE: " << aLine << "\n"; - return false; - } - - if( aLoopIndex == -1 ) - { - // this is the first point; there are some special checks - aLoopIndex = ccw ? 0 : 1; - aX = x; - aY = y; - aClosed = false; - - // ensure that the first point is not an arc specification - if( ang < -MIN_ANG || ang > MIN_ANG ) - { - std::cerr << "IDF_COMP: *ERROR* invalid RECORD 3, first point has non-zero angle\n"; - std::cerr << " LINE: " << aLine << "\n"; - return false; - } - } - else - { - // does this close the outline? - if( ang < 0.0 ) ang = -ang; - - ang -= 360.0; - - if( ang > -MIN_ANG && ang < MIN_ANG ) - { - // this is a circle; the loop is closed - aClosed = true; - } - else - { - x = (aX - x) * (aX - x); - y = (aY - y) * (aY - y) + x; - - if( y <= 1e-6 ) - { - // the points are close enough; the loop is closed - aClosed = true; - } - } - } - - // NOTE: - // 1. ideally we would ensure that there are no arcs with a radius of 0; this entails - // actively calculating the last point as the previous entry could have been an instruction - // to create an arc. This check is sacrificed in the interest of speed. - // 2. a bad outline can be crafted by giving at least one valid segment and then introducing - // a circle; such a condition is not checked for here in the interest of speed. - // 3. a circle specified with an angle of -360 is invalid, but that condition is not - // tested here. - - return true; -} - - -// fetch a line from the given input file and trim the ends -static bool FetchIDFLine( std::ifstream& aModel, std::string& aLine, bool& isComment ) -{ - aLine = ""; - std::getline( aModel, aLine ); - - isComment = false; - - // A comment begins with a '#' and must be the first character on the line - if( aLine[0] == '#' ) - isComment = true; - - - while( !aLine.empty() && isspace( *aLine.begin() ) ) - aLine.erase( aLine.begin() ); - - while( !aLine.empty() && isspace( *aLine.rbegin() ) ) - aLine.erase( --aLine.end() ); - - if( aLine.empty() ) - return false; - - return true; -} - - -// extract an IDF string and move the index to point to the character after the substring -static bool GetIDFString( const std::string& aLine, std::string& aIDFString, - bool& hasQuotes, int& aIndex ) -{ - // 1. drop all leading spaces - // 2. if the first character is '"', read until the next '"', - // otherwise read until the next space or EOL. - - std::ostringstream ostr; - - int len = aLine.length(); - int idx = aIndex; - - if( idx < 0 || idx >= len ) - return false; - - while( isspace( aLine[idx] ) && idx < len ) ++idx; - - if( idx == len ) - { - aIndex = idx; - return false; - } - - if( aLine[idx] == '"' ) - { - hasQuotes = true; - ++idx; - while( aLine[idx] != '"' && idx < len ) - ostr << aLine[idx++]; - - if( idx == len ) - { - std::cerr << "GetIDFString(): *ERROR*: unterminated quote mark in line:\n"; - std::cerr << "LINE: " << aLine << "\n"; - aIndex = idx; - return false; - } - - ++idx; - } - else - { - hasQuotes = false; - - while( !isspace( aLine[idx] ) && idx < len ) - ostr << aLine[idx++]; - - } - - aIDFString = ostr.str(); - aIndex = idx; - - return true; -} diff --git a/pcbnew/exporters/idf.h b/pcbnew/exporters/idf.h deleted file mode 100644 index 30c89ddeff..0000000000 --- a/pcbnew/exporters/idf.h +++ /dev/null @@ -1,321 +0,0 @@ -/** - * @file idf.h - */ - -/* - * This program source code file is part of KiCad, a free EDA CAD application. - * - * Copyright (C) 2013-2014 Cirilo Bernardo - * - * 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 IDF_H -#define IDF_H - -#include -#include -#include -#include - - -/** - * @Class IDF_COMP - * is responsible for parsing individual component files and rewriting relevant - * data to a library file. - */ -class IDF_COMP -{ -private: - /// filename (full path) of the IDF component footprint - wxString componentFile; - - /// reference designator; a valid designator or NOREFDES - std::string refdes; - - /// overall translation of the part (component location + 3D offset) - double loc_x; - double loc_y; - double loc_z; - - /// overall rotation of the part (3D Z rotation + component rotation) - double rotation; - - /// true if the component is on the top of the board - bool top; - - /// geometry of the package; for example, HORIZ, VERT, "HORIZ 0.2 inch" - std::string geometry; - - /// package name or part number; for example "TO92" or "BC107" - std::string partno; - - /// the owning IDF_LIB instance - IDF_LIB* parent; - - /** - * Function substituteComponent - * places a substitute component footprint into the library file - * and creates an appropriate entry for the PLACEMENT section - * @param aLibFile is the library file to write to - * @return bool: true if data was successfully written - */ - bool substituteComponent( FILE* aLibFile ); - - // parse RECORD 2; return TRUE if all is OK, otherwise FALSE - bool parseRec2( const std::string aLine, bool& isNewItem ); - - // parse RECORD 3; return TRUE if all is OK, otherwise FALSE - bool parseRec3( const std::string aLine, int& aLoopIndex, - double& aX, double& aY, bool& aClosed ); - -public: - IDF_COMP( IDF_LIB* aParent ); - - /** - * Function PlaceComponent - * specifies the parameters of an IDF component outline placed on the board - * @param aComponentFile is the IDF component file to include - * @param aRefDes is the component reference designator; an empty string, - * '~' or '0' all default to "NOREFDES". - * @param aLocation is the overall translation of the part (board location + 3D offset) - * @param aRotation is the overall rotation of the part (component rotation + 3D Z rotation) - * @return bool: true if the specified component file exists - */ - bool PlaceComponent( const wxString aComponentFile, const std::string aRefDes, - double aXLoc, double aYLoc, double aZLoc, - double aRotation, bool isOnTop ); - - /** - * Function WriteLib - * parses the model file to extract information needed by the - * PLACEMENT section and writes data (if necessary) to the - * library file - * @param aLibFile is the library file to write to - * @return bool: true if data was successfully written - */ - bool WriteLib( FILE* aLibFile ); - - /** - * Function WritePlacement - * write the .PLACEMENT data of the component to the IDF board @param aLayoutFile - * @return bool: true if data was successfully written - */ - bool WritePlacement( FILE* aLayoutFile ); -}; - - -/** - * @Class IDF_LIB - * stores information on IDF models ( also has an inbuilt NOMODEL model ) - * and is responsible for writing the ELECTRICAL sections of the library file - * (*.emp) and the PLACEMENT section of the board file. - */ -class IDF_LIB -{ - /// a list of component outline names and a flag to indicate their save state - std::set< std::string > regOutlines; - std::list< IDF_COMP* > components; - bool libWritten; - - /** - * Function writeLib - * writes all current library information to the output file - */ - bool writeLib( FILE* aLibFile ); - - /** - * Function writeBrd - * write placement information to the board file - */ - bool writeBrd( FILE* aLayoutFile ); - -public: - virtual ~IDF_LIB(); - - /** - * Function WriteFiles - * writes the library entries to the *.emp file (aLibFile) and the - * .PLACEMENT section to the *.emn file (aLayoutFile) - * @param aLayoutFile IDF board file - * @param aLibFile IDF library file - * @return bool: true if all data was written successfully - */ - bool WriteFiles( FILE* aLayoutFile, FILE* aLibFile ); - - /** - * Function RegisterOutline - * adds the given string to a list of current outline entities. - * @param aGeomPartString is a concatenation of the IDF component's - * geometry name and part name; this is used as a unique identifier - * to prevent redundant entries in the library output. - * @return bool: true if the string was already registered, - * false if it is a new registration. - */ - bool RegisterOutline( const std::string aGeomPartString ); - - bool PlaceComponent( const wxString aComponentFile, const std::string aRefDes, - double aXLoc, double aYLoc, double aZLoc, - double aRotation, bool isOnTop ); -}; - - -/** - * @Class IDF_BOARD - * contains objects necessary for the maintenance of the IDF board and library files. - */ -class IDF_BOARD -{ -private: - IDF_LIB IDFLib; ///< IDF library manager - std::list drills; ///< IDF drill data - int outlineIndex; ///< next outline index to use - bool useThou; ///< true if output is THOU - double scale; ///< scale from KiCad IU to IDF output units - double boardThickness; ///< total thickness of the PCB - bool hasBrdOutlineHdr; ///< true when a board outline header has been written - int refdesIndex; ///< index to generate REFDES for modules which have none - - double offsetX; ///< offset to roughly center the board on the world origin - double offsetY; - - FILE* layoutFile; ///< IDF board file (*.emn) - FILE* libFile; ///< IDF library file (*.emp) - - /** - * Function Write - * outputs a .DRILLED_HOLES section compliant with the - * IDFv3 specification. - * @param aLayoutFile : open file (*.emn) for output - */ - bool WriteDrills( void ); - -public: - IDF_BOARD(); - - ~IDF_BOARD(); - - // Set up the output files and scale factor; - // return TRUE if everything is OK - bool Setup( wxString aBoardName, wxString aFullFileName, bool aUseThou, int aBoardThickness ); - - // Finish a board - // Write out all current data and close files. - // Return true for success - bool Finish( void ); - - /** - * Function GetScale - * returns the output scaling factor - */ - double GetScale( void ); - - /** - * Function SetOffset - * sets the global coordinate offsets - */ - void SetOffset( double x, double y ); - - /** - * Function GetOffset - * returns the global coordinate offsets - */ - void GetOffset( double& x, double& y ); - - // Add an outline; the very first outline is the board perimeter; - // all additional outlines are cutouts. - bool AddOutline( IDF_OUTLINE& aOutline ); - - /** - * Function AddDrill - * creates a drill entry and adds it to the list of PCB holes - * @param dia : drill diameter - * @param x : X coordinate of the drill center - * @param y : Y coordinate of the drill center - * @param plating : flag, PTH or NPTH - * @param refdes : component Reference Designator - * @param holetype : purpose of hole - * @param owner : one of MCAD, ECAD, UNOWNED - */ - bool AddDrill( double dia, double x, double y, - IDF3::KEY_PLATING plating, - const std::string refdes, - const std::string holeType, - IDF3::KEY_OWNER owner ); - - /** - * Function AddSlot - * creates a slot cutout within the IDF BOARD section; this is a deficient representation - * of a KiCad 'oval' drill; IDF is unable to represent a plated slot and unable to - * represent the Reference Designator association with a slot. - */ - bool AddSlot( double aWidth, double aLength, double aOrientation, double aX, double aY ); - - bool PlaceComponent( const wxString aComponentFile, const std::string aRefDes, - double aXLoc, double aYLoc, double aZLoc, - double aRotation, bool isOnTop ); - - std::string GetRefDes( void ); -}; - - -/** - * @Class IDF_DRILL_DATA - * contains information describing a drilled hole and is responsible for - * writing this information to a file in compliance with the IDFv3 specification. - */ -class IDF_DRILL_DATA -{ -private: - double dia; - double x; - double y; - IDF3::KEY_PLATING plating; - IDF3::KEY_REFDES kref; - IDF3::KEY_HOLETYPE khole; - std::string refdes; - std::string holetype; - IDF3::KEY_OWNER owner; - -public: - /** - * Constructor IDF_DRILL_DATA - * creates a drill entry with information compliant with the - * IDFv3 specifications. - * @param aDrillDia : drill diameter - * @param aPosX : X coordinate of the drill center - * @param aPosY : Y coordinate of the drill center - * @param aPlating : flag, PTH or NPTH - * @param aRefDes : component Reference Designator - * @param aHoleType : purpose of hole - * @param aOwner : one of MCAD, ECAD, UNOWNED - */ - IDF_DRILL_DATA( double aDrillDia, double aPosX, double aPosY, - IDF3::KEY_PLATING aPlating, - const std::string aRefDes, - const std::string aHoleType, - IDF3::KEY_OWNER aOwner ); - - /** - * Function Write - * writes a single line representing the hole within a .DRILLED_HOLES section - */ - bool Write( FILE* aLayoutFile ); -}; - -#endif // IDF_H diff --git a/pcbnew/exporters/idf_common.cpp b/pcbnew/exporters/idf_common.cpp deleted file mode 100644 index 47cfcde294..0000000000 --- a/pcbnew/exporters/idf_common.cpp +++ /dev/null @@ -1,484 +0,0 @@ -/** - * file: idf_common.cpp - * - * This program source code file is part of KiCad, a free EDA CAD application. - * - * Copyright (C) 2013-2014 Cirilo Bernardo - * - * 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 -#include -#include -#include -#include -#include -#include - -#ifdef DEBUG_IDF -void IDF3::PrintSeg( IDF_SEGMENT* aSegment ) -{ - if( aSegment->IsCircle() ) - { - fprintf(stdout, "printSeg(): CIRCLE: C(%.3f, %.3f) P(%.3f, %.3f) rad. %.3f\n", - aSegment->startPoint.x, aSegment->startPoint.y, - aSegment->endPoint.x, aSegment->endPoint.y, - aSegment->radius ); - return; - } - - if( aSegment->angle < -MIN_ANG || aSegment->angle > MIN_ANG ) - { - fprintf(stdout, "printSeg(): ARC: p1(%.3f, %.3f) p2(%.3f, %.3f) ang. %.3f\n", - aSegment->startPoint.x, aSegment->startPoint.y, - aSegment->endPoint.x, aSegment->endPoint.y, - aSegment->angle ); - return; - } - - fprintf(stdout, "printSeg(): LINE: p1(%.3f, %.3f) p2(%.3f, %.3f)\n", - aSegment->startPoint.x, aSegment->startPoint.y, - aSegment->endPoint.x, aSegment->endPoint.y ); - - return; -} -#endif - - -bool IDF_POINT::Matches( const IDF_POINT& aPoint, double aRadius ) -{ - double dx = x - aPoint.x; - double dy = y - aPoint.y; - - double d2 = dx * dx + dy * dy; - - if( d2 <= aRadius * aRadius ) - return true; - - return false; -} - - -double IDF_POINT::CalcDistance( const IDF_POINT& aPoint ) const -{ - double dx = aPoint.x - x; - double dy = aPoint.y - y; - double dist = sqrt( dx * dx + dy * dy ); - - return dist; -} - - -double IDF3::CalcAngleRad( const IDF_POINT& aStartPoint, const IDF_POINT& aEndPoint ) -{ - return atan2( aEndPoint.y - aStartPoint.y, aEndPoint.x - aStartPoint.x ); -} - - -double IDF3::CalcAngleDeg( const IDF_POINT& aStartPoint, const IDF_POINT& aEndPoint ) -{ - double ang = CalcAngleRad( aStartPoint, aEndPoint ); - - // round to thousandths of a degree - int iang = int (ang / M_PI * 1800000.0); - - ang = iang / 10000.0; - - return ang; -} - - -void IDF3::GetOutline( std::list& aLines, - IDF_OUTLINE& aOutline ) -{ - aOutline.Clear(); - - // NOTE: To tell if the point order is CCW or CW, - // sum all: (endPoint.X[n] - startPoint.X[n])*(endPoint[n] + startPoint.Y[n]) - // If the result is >0, the direction is CW, otherwise - // it is CCW. Note that the result cannot be 0 unless - // we have a bounded area of 0. - - // First we find the segment with the leftmost point - std::list::iterator bl = aLines.begin(); - std::list::iterator el = aLines.end(); - std::list::iterator idx = bl++; // iterator for the object with minX - - double minx = (*idx)->GetMinX(); - double curx; - - while( bl != el ) - { - curx = (*bl)->GetMinX(); - - if( curx < minx ) - { - minx = curx; - idx = bl; - } - - ++bl; - } - - aOutline.push( *idx ); -#ifdef DEBUG_IDF - PrintSeg( *idx ); -#endif - aLines.erase( idx ); - - // If the item is a circle then we're done - if( aOutline.front()->IsCircle() ) - return; - - // Assemble the loop - bool complete = false; // set if loop is complete - bool matched; // set if a segment's end point was matched - - while( !complete ) - { - matched = false; - bl = aLines.begin(); - el = aLines.end(); - - while( bl != el && !matched ) - { - if( (*bl)->MatchesStart( aOutline.back()->endPoint ) ) - { - if( (*bl)->IsCircle() ) - { - // a circle on the perimeter is pathological but we just ignore it - ++bl; - } - else - { - matched = true; -#ifdef DEBUG_IDF - PrintSeg( *bl ); -#endif - aOutline.push( *bl ); - aLines.erase( bl ); - } - - continue; - } - - ++bl; - } - - if( !matched ) - { - // attempt to match the end points - bl = aLines.begin(); - el = aLines.end(); - - while( bl != el && !matched ) - { - if( (*bl)->MatchesEnd( aOutline.back()->endPoint ) ) - { - if( (*bl)->IsCircle() ) - { - // a circle on the perimeter is pathological but we just ignore it - ++bl; - } - else - { - matched = true; - (*bl)->SwapEnds(); -#ifdef DEBUG_IDF - printSeg( *bl ); -#endif - aOutline.push( *bl ); - aLines.erase( bl ); - } - - continue; - } - - ++bl; - } - } - - if( !matched ) - { - // still no match - attempt to close the loop - if( (aOutline.size() > 1) || ( aOutline.front()->angle < -MIN_ANG ) - || ( aOutline.front()->angle > MIN_ANG ) ) - { - // close the loop - IDF_SEGMENT* seg = new IDF_SEGMENT( aOutline.back()->endPoint, - aOutline.front()->startPoint ); - - if( seg ) - { - complete = true; -#ifdef DEBUG_IDF - printSeg( seg ); -#endif - aOutline.push( seg ); - break; - } - } - - // the outline is bad; drop the segments - aOutline.Clear(); - - return; - } - - // check if the loop is complete - if( aOutline.front()->MatchesStart( aOutline.back()->endPoint ) ) - { - complete = true; - break; - } - } -} - - -IDF_SEGMENT::IDF_SEGMENT() -{ - angle = 0.0; - offsetAngle = 0.0; - radius = 0.0; -} - - -IDF_SEGMENT::IDF_SEGMENT( const IDF_POINT& aStartPoint, const IDF_POINT& aEndPoint ) -{ - angle = 0.0; - offsetAngle = 0.0; - radius = 0.0; - startPoint = aStartPoint; - endPoint = aEndPoint; -} - - -IDF_SEGMENT::IDF_SEGMENT( const IDF_POINT& aStartPoint, - const IDF_POINT& aEndPoint, - double aAngle, - bool aFromKicad ) -{ - double diff = abs( aAngle ) - 360.0; - - if( ( diff < MIN_ANG - && diff > -MIN_ANG ) || ( aAngle < MIN_ANG && aAngle > -MIN_ANG ) || (!aFromKicad) ) - { - angle = 0.0; - startPoint = aStartPoint; - endPoint = aEndPoint; - - if( diff < MIN_ANG && diff > -MIN_ANG ) - { - angle = 360.0; - center = aStartPoint; - offsetAngle = 0.0; - radius = aStartPoint.CalcDistance( aEndPoint ); - } - else if( aAngle < MIN_ANG && aAngle > -MIN_ANG ) - { - CalcCenterAndRadius(); - } - - return; - } - - // we need to convert from the KiCad arc convention - angle = aAngle; - - center = aStartPoint; - - offsetAngle = IDF3::CalcAngleDeg( aStartPoint, aEndPoint ); - - radius = aStartPoint.CalcDistance( aEndPoint ); - - startPoint = aEndPoint; - - double ang = offsetAngle + aAngle; - ang = (ang / 180.0) * M_PI; - - endPoint.x = ( radius * cos( ang ) ) + center.x; - endPoint.y = ( radius * sin( ang ) ) + center.y; -} - - -bool IDF_SEGMENT::MatchesStart( const IDF_POINT& aPoint, double aRadius ) -{ - return startPoint.Matches( aPoint, aRadius ); -} - - -bool IDF_SEGMENT::MatchesEnd( const IDF_POINT& aPoint, double aRadius ) -{ - return endPoint.Matches( aPoint, aRadius ); -} - - -void IDF_SEGMENT::CalcCenterAndRadius( void ) -{ - // NOTE: this routine does not check if the points are the same - // or too close to be sensible in a production setting. - - double offAng = IDF3::CalcAngleRad( startPoint, endPoint ); - double d = startPoint.CalcDistance( endPoint ) / 2.0; - double xm = ( startPoint.x + endPoint.x ) * 0.5; - double ym = ( startPoint.y + endPoint.y ) * 0.5; - - radius = d / sin( angle * M_PI / 180.0 ); - - if( radius < 0.0 ) - { - radius = -radius; - } - - // calculate the height of the triangle with base d and hypotenuse r - double dh2 = radius * radius - d * d; - - if( dh2 < 0 ) - { - // this should only ever happen due to rounding errors when r == d - dh2 = 0; - } - - double h = sqrt( dh2 ); - - if( angle > 0.0 ) - offAng += M_PI2; - else - offAng -= M_PI2; - - if( ( angle > M_PI ) || ( angle < -M_PI ) ) - offAng += M_PI; - - center.x = h * cos( offAng ) + xm; - center.y = h * sin( offAng ) + ym; - - offsetAngle = IDF3::CalcAngleDeg( center, startPoint ); -} - - -bool IDF_SEGMENT::IsCircle( void ) -{ - double diff = abs( angle ) - 360.0; - - if( ( diff < MIN_ANG ) && ( diff > -MIN_ANG ) ) - return true; - - return false; -} - - -double IDF_SEGMENT::GetMinX( void ) -{ - if( angle == 0.0 ) - return std::min( startPoint.x, endPoint.x ); - - // Calculate the leftmost point of the circle or arc - - if( IsCircle() ) - { - // if only everything were this easy - return center.x - radius; - } - - // cases: - // 1. CCW arc: if offset + included angle >= 180 deg then - // MinX = center.x - radius, otherwise MinX is the - // same as for the case of a line. - // 2. CW arc: if offset + included angle <= -180 deg then - // MinX = center.x - radius, otherwise MinX is the - // same as for the case of a line. - - if( angle > 0 ) - { - // CCW case - if( ( offsetAngle + angle ) >= 180.0 ) - { - return center.x - radius; - } - else - { - return std::min( startPoint.x, endPoint.x ); - } - } - - // CW case - if( ( offsetAngle + angle ) <= -180.0 ) - { - return center.x - radius; - } - - return std::min( startPoint.x, endPoint.x ); -} - - -void IDF_SEGMENT::SwapEnds( void ) -{ - if( IsCircle() ) - { - // reverse the direction - angle = -angle; - return; - } - - IDF_POINT tmp = startPoint; - startPoint = endPoint; - endPoint = tmp; - - if( ( angle < MIN_ANG ) && ( angle > -MIN_ANG ) ) - return; // nothing more to do - - // change the direction of the arc - angle = -angle; - // calculate the new offset angle - offsetAngle = IDF3::CalcAngleDeg( center, startPoint ); -} - - -void IDF_OUTLINE::push( IDF_SEGMENT* item ) -{ - if( !outline.empty() ) - { - if( item->IsCircle() ) - { - // not allowed - wxString msg = wxT( "INVALID GEOMETRY: a circle is being added to a non-empty outline" ); - THROW_IO_ERROR( msg ); - } - else - { - if( outline.back()->IsCircle() ) - { - // we can't add lines to a circle - wxString msg = wxT( "INVALID GEOMETRY: a line is being added to a circular outline" ); - THROW_IO_ERROR( msg ); - } - else if( !item->MatchesStart( outline.back()->endPoint ) ) - { - // startPoint[N] != endPoint[N -1] - wxString msg = wxT( "INVALID GEOMETRY: disjoint segments" ); - THROW_IO_ERROR( msg ); - } - } - } - - outline.push_back( item ); - dir += ( outline.back()->endPoint.x - outline.back()->startPoint.x ) - * ( outline.back()->endPoint.y + outline.back()->startPoint.y ); -} diff --git a/pcbnew/exporters/idf_common.h b/pcbnew/exporters/idf_common.h deleted file mode 100644 index ff432de827..0000000000 --- a/pcbnew/exporters/idf_common.h +++ /dev/null @@ -1,290 +0,0 @@ -/** - * @file idf_common.h - */ - -/* - * This program source code file is part of KiCad, a free EDA CAD application. - * - * Copyright (C) 2013-2014 Cirilo Bernardo - * - * 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 IDF_COMMON_H -#define IDF_COMMON_H - -#include - -#ifndef M_PI -#define M_PI 3.1415926535897932384626433832795028841 -#endif - -#ifndef M_PI2 -#define M_PI2 ( M_PI / 2.0 ) -#endif - -#ifndef M_PI4 -#define M_PI4 ( M_PI / 4.0 ) -#endif - -// differences in angle smaller than MIN_ANG are considered equal -#define MIN_ANG (0.01) - -class IDF_POINT; -class IDF_SEGMENT; -class IDF_DRILL_DATA; -class IDF_OUTLINE; -class IDF_LIB; - -namespace IDF3 { - enum KEY_OWNER - { - UNOWNED = 0, // < either MCAD or ECAD may modify a feature - MCAD, // < only MCAD may modify a feature - ECAD // < only ECAD may modify a feature - }; - - enum KEY_HOLETYPE - { - PIN = 0, // < drill hole is for a pin - VIA, // < drill hole is for a via - MTG, // < drill hole is for mounting - TOOL, // < drill hole is for tooling - OTHER // < user has specified a custom type - }; - - enum KEY_PLATING - { - PTH = 0, // < Plate-Through Hole - NPTH // < Non-Plate-Through Hole - }; - - enum KEY_REFDES - { - BOARD = 0, // < feature is associated with the board - NOREFDES, // < feature is associated with a component with no RefDes - PANEL, // < feature is associated with an IDF panel - REFDES // < reference designator as assigned by the CAD software - }; - - // calculate the angle between the horizon and the segment aStartPoint to aEndPoint - double CalcAngleRad( const IDF_POINT& aStartPoint, const IDF_POINT& aEndPoint ); - double CalcAngleDeg( const IDF_POINT& aStartPoint, const IDF_POINT& aEndPoint ); - - // take contiguous elements from 'lines' and stuff them into 'outline' - void GetOutline( std::list& aLines, - IDF_OUTLINE& aOutline ); - -#ifdef DEBUG_IDF - // prints out segment information for debug purposes - void PrintSeg( IDF_SEGMENT* aSegment ); -#endif -} - - -/** - * @Class IDF_POINT - * represents a point - */ -class IDF_POINT -{ -public: - double x; // < X coordinate - double y; // < Y coordinate - - IDF_POINT() - { - x = 0.0; - y = 0.0; - } - - /** - * Function Matches() - * returns true if the given coordinate point is within the given radius - * of the point. - * @param aPoint : coordinates of the point being compared - * @param aRadius : radius within which the points are considered the same - */ - bool Matches( const IDF_POINT& aPoint, double aRadius = 1e-5 ); - double CalcDistance( const IDF_POINT& aPoint ) const; -}; - - -/** - * @Class IDF_SEGMENT - * represents a geometry segment as used in IDFv3 outlines - */ -class IDF_SEGMENT -{ -private: - /** - * Function CalcCenterAndRadius() - * Calculates the center, radius, and angle between center and start point given the - * IDF compliant points and included angle. - * @var startPoint, @var endPoint, and @var angle must be set prior as per IDFv3 - */ - void CalcCenterAndRadius( void ); - -public: - IDF_POINT startPoint; // starting point in IDF coordinates - IDF_POINT endPoint; // end point in IDF coordinates - IDF_POINT center; // center of an arc or circle; used primarily for calculating min X - double angle; // included angle (degrees) according to IDFv3 specification - double offsetAngle; // angle between center and start of arc; used to speed up some calcs. - double radius; // radius of the arc or circle; used to speed up some calcs. - - /** - * Function IDF_SEGMENT() - * initializes the internal variables - */ - IDF_SEGMENT(); - - /** - * Function IDF_SEGMENT( start, end ) - * creates a straight segment - */ - IDF_SEGMENT( const IDF_POINT& aStartPoint, const IDF_POINT& aEndPoint ); - - /** - * Function IDF_SEGMENT( start, end ) - * creates a straight segment, arc, or circle depending on the angle - * @param aStartPoint : start point (center if using KiCad convention, otherwise IDF convention) - * @param aEndPoint : end point (start of arc if using KiCad convention, otherwise IDF convention) - * @param aAngle : included angle; the KiCad convention is equivalent to the IDF convention - * @param fromKicad : set true if we need to convert from KiCad to IDF convention - */ - IDF_SEGMENT( const IDF_POINT& aStartPoint, - const IDF_POINT& aEndPoint, - double aAngle, - bool aFromKicad ); - - /** - * Function MatchesStart() - * returns true if the given coordinate is within a radius 'rad' - * of the start point. - * @param aPoint : coordinates of the point being compared - * @param aRadius : radius within which the points are considered the same - */ - bool MatchesStart( const IDF_POINT& aPoint, double aRadius = 1e-3 ); - - /** - * Function MatchesEnd() - * returns true if the given coordinate is within a radius 'rad' - * of the end point. - * @param aPoint : coordinates of the point being compared - * @param aRadius : radius within which the points are considered the same - */ - bool MatchesEnd( const IDF_POINT& aPoint, double aRadius = 1e-3 ); - - /** - * Function IsCircle() - * returns true if this segment is a circle - */ - bool IsCircle( void ); - - /** - * Function GetMinX() - * returns the minimum X coordinate of this segment - */ - double GetMinX( void ); - - /** - * Function SwapEnds() - * Swaps the start and end points and alters internal - * variables as necessary for arcs - */ - void SwapEnds( void ); -}; - - -/** - * @Class IDF_OUTLINE - * contains segment and winding information for an IDF outline - */ -class IDF_OUTLINE -{ -private: - double dir; - std::list outline; - -public: - IDF_OUTLINE() { dir = 0.0; } - ~IDF_OUTLINE() { Clear(); } - - // returns true if the current list of points represents a counterclockwise winding - bool IsCCW( void ) - { - if( dir > 0.0 ) - return false; - - return true; - } - - // clears the internal list of outline segments - void Clear( void ) - { - dir = 0.0; - - while( !outline.empty() ) - { - delete outline.front(); - outline.pop_front(); - } - } - - // returns the size of the internal segment list - size_t size( void ) - { - return outline.size(); - } - - // returns true if the internal segment list is empty - bool empty( void ) - { - return outline.empty(); - } - - // return the front() of the internal segment list - IDF_SEGMENT*& front( void ) - { - return outline.front(); - } - - // return the back() of the internal segment list - IDF_SEGMENT*& back( void ) - { - return outline.back(); - } - - // return the begin() iterator of the internal segment list - std::list::iterator begin( void ) - { - return outline.begin(); - } - - // return the end() iterator of the internal segment list - std::list::iterator end( void ) - { - return outline.end(); - } - - // push a segment onto the internal list - void push( IDF_SEGMENT* item ); -}; - -#endif // IDF_COMMON_H diff --git a/utils/idftools/idf_examples/test_donut.emn b/utils/idftools/idf_examples/test_donut.emn new file mode 100644 index 0000000000..fd5b87f7cc --- /dev/null +++ b/utils/idftools/idf_examples/test_donut.emn @@ -0,0 +1,45 @@ +.HEADER +BOARD_FILE 3.0 "Created by some software" 2014/02/01.15:09:15 1 +"test_donut" MM +.END_HEADER + +# The board outline is a simple square with a small hole in it +.BOARD_OUTLINE ECAD +1.60000 +0 -100 100 0 +0 -100 -100 0 +0 100 -100 0 +0 100 100 0 +0 -100 100 0 +1 0 0 0 +1 5 0 360 +.END_BOARD_OUTLINE + +# This OTHER OUTLINE is a square toroid +.OTHER_OUTLINE UNOWNED +MY_DONUT 30 TOP +0 0 0 0 +0 75 0 360 +1 0 0 0 +1 30 0 360 +.END_OTHER_OUTLINE + +# This OTHER OUTLINE is a square with a hole +.OTHER_OUTLINE UNOWNED +MY_NOT_DONUT 2 BOTTOM +0 -50 50 0 +0 -50 -50 0 +0 50 -50 0 +0 50 50 0 +0 -50 50 0 +1 0 0 0 +1 10 0 360 +2 0 50 0 +2 0 75 360 +3 50 0 0 +3 75 0 360 +4 0 -50 0 +4 0 -75 360 +5 -50 0 0 +5 -75 0 360 +.END_OTHER_OUTLINE diff --git a/utils/idftools/idf_examples/test_donut.emp b/utils/idftools/idf_examples/test_donut.emp new file mode 100644 index 0000000000..d3c09b7e7b --- /dev/null +++ b/utils/idftools/idf_examples/test_donut.emp @@ -0,0 +1,5 @@ +.HEADER +LIBRARY_FILE 3.0 "Created by some software" 2014/02/01.15:09:15 1 +.END_HEADER + +# This file contains no component outlines \ No newline at end of file diff --git a/utils/idftools/idf_outlines.cpp b/utils/idftools/idf_outlines.cpp index 9558d7dab2..43d1a4cbb2 100644 --- a/utils/idftools/idf_outlines.cpp +++ b/utils/idftools/idf_outlines.cpp @@ -693,6 +693,10 @@ void BOARD_OUTLINE::writeOutline( std::ofstream& aBoardFile, IDF_OUTLINE* aOutli std::list::iterator bo; std::list::iterator eo; + if( !aOutline ) + throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, + "\n* BUG: NULL outline pointer" ) ); + if( aOutline->size() == 1 ) { if( !aOutline->front()->IsCircle() ) diff --git a/utils/idftools/idf_parser.cpp b/utils/idftools/idf_parser.cpp index 018be43aa2..a1ac7da92c 100644 --- a/utils/idftools/idf_parser.cpp +++ b/utils/idftools/idf_parser.cpp @@ -36,6 +36,48 @@ using namespace std; using namespace IDF3; + +static bool MatchCompOutline( IDF3_COMP_OUTLINE* aOutlineA, IDF3_COMP_OUTLINE* aOutlineB ) +{ + if( aOutlineA->GetComponentClass() != aOutlineB->GetComponentClass() ) + return false; + + if( aOutlineA->OutlinesSize() != aOutlineB->OutlinesSize() ) + return false; + + // are both outlines empty? + if( aOutlineA->OutlinesSize() == 0 ) + return true; + + IDF_OUTLINE* opA = aOutlineA->GetOutline( 0 ); + IDF_OUTLINE* opB = aOutlineB->GetOutline( 0 ); + + if( opA->size() != opB->size() ) + return false; + + if( opA->size() == 0 ) + return true; + + std::list::iterator olAs = opA->begin(); + std::list::iterator olAe = opA->end(); + std::list::iterator olBs = opB->begin(); + + while( olAs != olAe ) + { + if( !(*olAs)->MatchesStart( (*olBs)->startPoint ) ) + return false; + + if( !(*olAs)->MatchesEnd( (*olBs)->endPoint ) ) + return false; + + ++olAs; + ++olBs; + } + + return true; +} + + /* * CLASS: IDF3_COMP_OUTLINE_DATA * This represents the outline placement @@ -285,7 +327,7 @@ bool IDF3_COMP_OUTLINE_DATA::readPlaceData( std::ifstream &aBoardFile, // component is given a unique RefDes. This class of defect // is one reason IDF does not work well in faithfully // conveying information between ECAD and MCAD. - refdes = token; + refdes = aBoard->GetNewRefDes(); } else if( CompareToken( "BOARD", token ) ) { @@ -1297,6 +1339,7 @@ IDF3_BOARD::IDF3_BOARD( IDF3::CAD_TYPE aCadType ) userYoff = 0.0; brdFileVersion = 0; libFileVersion = 0; + iRefDes = 0; // unlike other outlines which are created as necessary, // the board outline always exists and its parent must @@ -1314,6 +1357,18 @@ IDF3_BOARD::~IDF3_BOARD() return; } + +const std::string& IDF3_BOARD::GetNewRefDes( void ) +{ + ostringstream ostr; + ostr << "NOREFDESn" << iRefDes++; + + sRefDes = ostr.str(); + + return sRefDes; +} + + #ifndef DISABLE_IDF_OWNERSHIP bool IDF3_BOARD::checkComponentOwnership( int aSourceLine, const char* aSourceFunc, IDF3_COMPONENT* aComponent ) @@ -2422,7 +2477,12 @@ void IDF3_BOARD::readLibSection( std::ifstream& aLibFile, IDF3::FILE_STATE& aLib } else { - delete pout; + if( MatchCompOutline( pout, cop ) ) + { + delete pout; + // everything is fine; the outlines are genuine duplicates + return; + } ostringstream ostr; ostr << "invalid IDF library\n"; @@ -3131,7 +3191,7 @@ bool IDF3_BOARD::SetBoardVersion( int aVersion ) { ostringstream ostr; ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "():\n"; - ostr << "* board version (" << aVersion << ") must be > 0"; + ostr << "* board version (" << aVersion << ") must be >= 0"; errormsg = ostr.str(); return false; @@ -3155,7 +3215,7 @@ bool IDF3_BOARD::SetLibraryVersion( int aVersion ) { ostringstream ostr; ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "():\n"; - ostr << "* library version (" << aVersion << ") must be > 0"; + ostr << "* library version (" << aVersion << ") must be >= 0"; errormsg = ostr.str(); return false; @@ -3741,39 +3801,13 @@ IDF3_COMPONENT* IDF3_BOARD::FindComponent( std::string aRefDes ) // returns a pointer to a component outline object or NULL // if the object doesn't exist -IDF3_COMP_OUTLINE* IDF3_BOARD::GetComponentOutline( const std::string aGeomName, - const std::string aPartName, - wxString aFullFileName ) +IDF3_COMP_OUTLINE* IDF3_BOARD::GetComponentOutline( wxString aFullFileName ) { - std::ostringstream ostr; - ostr << aGeomName << "_" << aPartName; - - IDF3_COMP_OUTLINE* cp = GetComponentOutline( ostr.str() ); - - if( cp != NULL ) - return cp; - std::string fname = TO_UTF8( aFullFileName ); - - cp = new IDF3_COMP_OUTLINE( this ); - - if( cp == NULL ) - { - ostringstream ostr; - ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "(): \n"; - cerr << "* failed to create outline with UID '" << aGeomName << "_"; - cerr << aPartName << "'\n"; - cerr << "* filename: '" << fname << "'"; - errormsg = ostr.str(); - - return NULL; - } - wxFileName idflib( aFullFileName ); if( !idflib.IsOk() ) { - delete cp; ostringstream ostr; ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "(): \n"; cerr << "* invalid file name: '" << fname << "'"; @@ -3784,7 +3818,6 @@ IDF3_COMP_OUTLINE* IDF3_BOARD::GetComponentOutline( const std::string aGeomName, if( !idflib.FileExists() ) { - delete cp; ostringstream ostr; ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "(): \n"; cerr << "* no such file: '" << fname << "'"; @@ -3795,7 +3828,6 @@ IDF3_COMP_OUTLINE* IDF3_BOARD::GetComponentOutline( const std::string aGeomName, if( !idflib.IsFileReadable() ) { - delete cp; ostringstream ostr; ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "(): \n"; cerr << "* cannot read file: '" << fname << "'"; @@ -3804,6 +3836,24 @@ IDF3_COMP_OUTLINE* IDF3_BOARD::GetComponentOutline( const std::string aGeomName, return NULL; } + std::map< std::string, std::string >::iterator itm = uidFileList.find( fname ); + + if( itm != uidFileList.end() ) + return GetComponentOutline( itm->second ); + + IDF3_COMP_OUTLINE* cp = new IDF3_COMP_OUTLINE( this ); + + if( cp == NULL ) + { + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "(): \n"; + cerr << "* failed to create outline\n"; + cerr << "* filename: '" << fname << "'"; + errormsg = ostr.str(); + + return NULL; + } + std::ifstream model; model.exceptions ( std::ifstream::badbit ); @@ -3867,7 +3917,92 @@ IDF3_COMP_OUTLINE* IDF3_BOARD::GetComponentOutline( const std::string aGeomName, model.close(); - return cp; + // check the unique ID against the list from library components + std::list< std::string >::iterator lsts = uidLibList.begin(); + std::list< std::string >::iterator lste = uidLibList.end(); + std::string uid = cp->GetUID(); + IDF3_COMP_OUTLINE* oldp = NULL; + + while( lsts != lste ) + { + if( ! lsts->compare( uid ) ) + { + oldp = GetComponentOutline( uid ); + + if( MatchCompOutline( cp, oldp ) ) + { + // everything is fine; the outlines are genuine duplicates; delete the copy + delete cp; + // make sure we can find the item via its filename + uidFileList.insert( std::pair< std::string, std::string>( fname, uid ) ); + // return the pointer to the original + return oldp; + } + else + { + delete cp; + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "():\n"; + ostr << "* duplicate UID for different Component Outlines: '" << uid << "'\n"; + ostr << "* original loaded from library, duplicate in current file\n"; + ostr << "* file: '" << fname << "'"; + + errormsg = ostr.str(); + return NULL; + } + } + + ++lsts; + } + + // if we got this far then any duplicates are from files previously read + oldp = GetComponentOutline( uid ); + + if( oldp == NULL ) + { + // everything is fine, there are no existing entries + uidFileList.insert( std::pair< std::string, std::string>( fname, uid ) ); + compOutlines.insert( pair( uid, cp ) ); + + return cp; + } + + if( MatchCompOutline( cp, oldp ) ) + { + // everything is fine; the outlines are genuine duplicates; delete the copy + delete cp; + // make sure we can find the item via its other filename + uidFileList.insert( std::pair< std::string, std::string>( fname, uid ) ); + // return the pointer to the original + return oldp; + } + + delete cp; + + // determine the file name of the first instance + std::map< std::string, std::string >::iterator ufls = uidFileList.begin(); + std::map< std::string, std::string >::iterator ufle = uidFileList.end(); + std::string oldfname; + + while( ufls != ufle ) + { + if( ! ufls->second.compare( uid ) ) + { + oldfname = ufls->first; + break; + } + + ++ufls; + } + + ostringstream ostr; + ostr << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "():\n"; + ostr << "* duplicate UID for different Component Outlines: '" << uid << "'\n"; + ostr << "* original file: '" << oldfname << "'\n"; + ostr << "* this file: '" << fname << "'"; + + errormsg = ostr.str(); + return NULL; } @@ -3940,8 +4075,12 @@ void IDF3_BOARD::Clear( void ) libSource.clear(); brdDate.clear(); libDate.clear(); + uidFileList.clear(); + uidLibList.clear(); brdFileVersion = 0; libFileVersion = 0; + iRefDes = 0; + sRefDes.clear(); // delete comment lists noteComments.clear(); diff --git a/utils/idftools/idf_parser.h b/utils/idftools/idf_parser.h index cc7909f347..e666e17c7f 100644 --- a/utils/idftools/idf_parser.h +++ b/utils/idftools/idf_parser.h @@ -463,6 +463,8 @@ public: class IDF3_BOARD { private: + std::map< std::string, std::string > uidFileList; // map of files opened and UIDs + std::list< std::string > uidLibList; // list of UIDs read from a library file std::string errormsg; // string for passing error messages to user std::list< IDF_NOTE* > notes; // IDF notes std::list< std::string > noteComments; // comment list for NOTES section @@ -476,6 +478,8 @@ private: IDF3::CAD_TYPE cadType; IDF3::IDF_UNIT unit; IDF3::IDF_VERSION idfVer; // IDF version of Board or Library + int iRefDes; // counter for automatically numbered NOREFDES items + std::string sRefDes; std::string idfSource; // SOURCE string to use when writing BOARD and LIBRARY headers std::string brdSource; // SOURCE string as retrieved from a BOARD file @@ -569,6 +573,8 @@ public: // end user must use only mm in the API. IDF3::IDF_UNIT GetUnit( void ); + const std::string& GetNewRefDes( void ); + void SetBoardName( std::string aBoardName ); const std::string& GetBoardName( void ); @@ -692,9 +698,7 @@ public: // returns a pointer to a component outline object or NULL // if the object doesn't exist - IDF3_COMP_OUTLINE* GetComponentOutline( const std::string aGeomName, - const std::string aPartName, - wxString aFullFileName ); + IDF3_COMP_OUTLINE* GetComponentOutline( wxString aFullFileName ); // returns a pointer to the component outline object with the // unique ID aComponentID diff --git a/utils/idftools/vrml_layer.cpp b/utils/idftools/vrml_layer.cpp index cebeb2fa97..7cb03dd54a 100644 --- a/utils/idftools/vrml_layer.cpp +++ b/utils/idftools/vrml_layer.cpp @@ -23,17 +23,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -/* - * NOTES ON OUTPUT PRECISION: - * - * If we use %.6f then we have no need for special unit dependent formatting: - * - * inch: .0254 microns - * mm: 0.001 microns - * m: 1 micron - * - */ - #include #include #include From 4121c272690d705dedd124feb43cc91c6412a8bd Mon Sep 17 00:00:00 2001 From: Tomasz Wlostowski Date: Fri, 6 Jun 2014 11:44:21 +0200 Subject: [PATCH 489/741] Clang-alike lightweight RTTI for pcbnew + type casting cleanup. --- include/base_struct.h | 17 ++- include/core/typeinfo.h | 180 ++++++++++++++++++++++++++++ include/sch_item_struct.h | 2 + include/view/view_item.h | 109 ----------------- pcbnew/class_board.h | 4 + pcbnew/class_board_connected_item.h | 15 +++ pcbnew/class_edge_mod.h | 5 + pcbnew/class_module.cpp | 3 +- pcbnew/class_module.h | 5 + pcbnew/class_text_mod.h | 30 +++-- pcbnew/class_track.h | 32 +++-- pcbnew/clean.cpp | 5 +- pcbnew/edgemod.cpp | 5 +- pcbnew/editrack.cpp | 2 +- pcbnew/kicad_plugin.cpp | 2 +- pcbnew/librairi.cpp | 2 +- pcbnew/pcb_painter.cpp | 34 +++--- pcbnew/plot_board_layers.cpp | 6 +- pcbnew/plot_brditems_plotter.cpp | 7 +- 19 files changed, 297 insertions(+), 168 deletions(-) create mode 100644 include/core/typeinfo.h diff --git a/include/base_struct.h b/include/base_struct.h index 38e320ef38..335763ec05 100644 --- a/include/base_struct.h +++ b/include/base_struct.h @@ -32,13 +32,13 @@ #ifndef BASE_STRUCT_H_ #define BASE_STRUCT_H_ +#include + #include #include #include #include -#include - #if defined(DEBUG) #include // needed for Show() extern std::ostream& operator <<( std::ostream& out, const wxSize& size ); @@ -369,8 +369,17 @@ public: EDA_ITEM( const EDA_ITEM& base ); virtual ~EDA_ITEM() { }; - /// @copydoc VIEW_ITEM::Type() - KICAD_T Type() const { return m_StructType; } + /** + * Function Type() + * + * returns the type of object. This attribute should never be changed + * after a constructor sets it, so there is no public "setter" method. + * @return KICAD_T - the type of object. + */ + inline KICAD_T Type() const + { + return m_StructType; + } void SetTimeStamp( time_t aNewTimeStamp ) { m_TimeStamp = aNewTimeStamp; } time_t GetTimeStamp() const { return m_TimeStamp; } diff --git a/include/core/typeinfo.h b/include/core/typeinfo.h new file mode 100644 index 0000000000..9b89ac8b04 --- /dev/null +++ b/include/core/typeinfo.h @@ -0,0 +1,180 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 CERN + * Copyright (C) 2004-2013 KiCad Developers, see change_log.txt for contributors. + * @author Tomasz Wlostowski + * + * 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 __KICAD_TYPEINFO_H +#define __KICAD_TYPEINFO_H + +#include + +class EDA_ITEM; + +/** + * Enum KICAD_T + * is the set of class identification values, stored in EDA_ITEM::m_StructType + */ +enum KICAD_T +{ + NOT_USED = -1, ///< the 3d code uses this value + + EOT = 0, ///< search types array terminator (End Of Types) + + TYPE_NOT_INIT = 0, + PCB_T, + SCREEN_T, ///< not really an item, used to identify a screen + + // Items in pcb + PCB_MODULE_T, ///< class MODULE, a footprint + PCB_PAD_T, ///< class D_PAD, a pad in a footprint + PCB_LINE_T, ///< class DRAWSEGMENT, a segment not on copper layers + PCB_TEXT_T, ///< class TEXTE_PCB, text on a layer + PCB_MODULE_TEXT_T, ///< class TEXTE_MODULE, text in a footprint + PCB_MODULE_EDGE_T, ///< class EDGE_MODULE, a footprint edge + PCB_TRACE_T, ///< class TRACK, a track segment (segment on a copper layer) + PCB_VIA_T, ///< class VIA, a via (like a track segment on a copper layer) + PCB_ZONE_T, ///< class SEGZONE, a segment used to fill a zone area (segment on a + ///< copper layer) + PCB_MARKER_T, ///< class MARKER_PCB, a marker used to show something + PCB_DIMENSION_T, ///< class DIMENSION, a dimension (graphic item) + PCB_TARGET_T, ///< class PCB_TARGET, a target (graphic item) + PCB_ZONE_AREA_T, ///< class ZONE_CONTAINER, a zone area + PCB_ITEM_LIST_T, ///< class BOARD_ITEM_LIST, a list of board items + + // Schematic draw Items. The order of these items effects the sort order. + // It is currently ordered to mimic the old Eeschema locate behavior where + // the smallest item is the selected item. + SCH_MARKER_T, + SCH_JUNCTION_T, + SCH_NO_CONNECT_T, + SCH_BUS_WIRE_ENTRY_T, + SCH_BUS_BUS_ENTRY_T, + SCH_LINE_T, + SCH_BITMAP_T, + SCH_TEXT_T, + SCH_LABEL_T, + SCH_GLOBAL_LABEL_T, + SCH_HIERARCHICAL_LABEL_T, + SCH_FIELD_T, + SCH_COMPONENT_T, + SCH_SHEET_PIN_T, + SCH_SHEET_T, + + // Be prudent with these 3 types: + // they should be used only to locate a specific field type + // among SCH_FIELD_T items types + SCH_FIELD_LOCATE_REFERENCE_T, + SCH_FIELD_LOCATE_VALUE_T, + SCH_FIELD_LOCATE_FOOTPRINT_T, + + // General + SCH_SCREEN_T, + + /* + * Draw items in library component. + * + * The order of these items effects the sort order for items inside the + * "DRAW/ENDDRAW" section of the component definition in a library file. + * If you add a new draw item, type, please make sure you add it so the + * sort order is logical. + */ + LIB_COMPONENT_T, + LIB_ALIAS_T, + LIB_ARC_T, + LIB_CIRCLE_T, + LIB_TEXT_T, + LIB_RECTANGLE_T, + LIB_POLYLINE_T, + LIB_BEZIER_T, + LIB_PIN_T, + + /* + * Fields are not saved inside the "DRAW/ENDDRAW". Add new draw item + * types before this line. + */ + LIB_FIELD_T, + + /* + * For GerbView: items type: + */ + TYPE_GERBER_DRAW_ITEM, + + /* + * for Pl_Editor, in undo/redo commands + */ + TYPE_PL_EDITOR_LAYOUT, + + // End value + MAX_STRUCT_TYPE_ID +}; + +template +struct remove_pointer +{ + typedef T type; +}; + +template +struct remove_pointer +{ + typedef typename remove_pointer::type type; +}; + +/** + * Function IsA() + * + * Checks if the type of aObject is T. + * @param aObject object for type check + * @return true, if aObject type equals T. + */ +template +bool IsA(const I *aObject) +{ + return remove_pointer::type::ClassOf(aObject); +} + +template +bool IsA(const I& aObject) +{ + return remove_pointer::type::ClassOf(&aObject); +} + +/** + * Function dyn_cast() + * + * A lightweight dynamic downcast. Casts aObject to type Casted*. + * Uses EDA_ITEM::Type() and EDA_ITEM::ClassOf() to check if type matches. + * @param aObject object to be casted + * @return down-casted object or NULL if type doesn't match Casted. + */ +template +Casted dyn_cast(From aObject) +{ + if( remove_pointer::type::ClassOf ( aObject ) ) + return static_cast( aObject ); + + return NULL; +} + +#endif // __KICAD_TYPEINFO_H + diff --git a/include/sch_item_struct.h b/include/sch_item_struct.h index 6a3d4913ba..37cc8d4a37 100644 --- a/include/sch_item_struct.h +++ b/include/sch_item_struct.h @@ -34,6 +34,8 @@ #include #include +#include + class SCH_ITEM; class SCH_SHEET_PATH; class LINE_READER; diff --git a/include/view/view_item.h b/include/view/view_item.h index 5dfabd7c33..b2fc558f94 100644 --- a/include/view/view_item.h +++ b/include/view/view_item.h @@ -36,104 +36,6 @@ #include #include -/** - * Enum KICAD_T - * is the set of class identification values, stored in EDA_ITEM::m_StructType - */ -enum KICAD_T -{ - NOT_USED = -1, ///< the 3d code uses this value - - EOT = 0, ///< search types array terminator (End Of Types) - - TYPE_NOT_INIT = 0, - PCB_T, - SCREEN_T, ///< not really an item, used to identify a screen - - // Items in pcb - PCB_MODULE_T, ///< class MODULE, a footprint - PCB_PAD_T, ///< class D_PAD, a pad in a footprint - PCB_LINE_T, ///< class DRAWSEGMENT, a segment not on copper layers - PCB_TEXT_T, ///< class TEXTE_PCB, text on a layer - PCB_MODULE_TEXT_T, ///< class TEXTE_MODULE, text in a footprint - PCB_MODULE_EDGE_T, ///< class EDGE_MODULE, a footprint edge - PCB_TRACE_T, ///< class TRACK, a track segment (segment on a copper layer) - PCB_VIA_T, ///< class VIA, a via (like a track segment on a copper layer) - PCB_ZONE_T, ///< class SEGZONE, a segment used to fill a zone area (segment on a - ///< copper layer) - PCB_MARKER_T, ///< class MARKER_PCB, a marker used to show something - PCB_DIMENSION_T, ///< class DIMENSION, a dimension (graphic item) - PCB_TARGET_T, ///< class PCB_TARGET, a target (graphic item) - PCB_ZONE_AREA_T, ///< class ZONE_CONTAINER, a zone area - PCB_ITEM_LIST_T, ///< class BOARD_ITEM_LIST, a list of board items - - // Schematic draw Items. The order of these items effects the sort order. - // It is currently ordered to mimic the old Eeschema locate behavior where - // the smallest item is the selected item. - SCH_MARKER_T, - SCH_JUNCTION_T, - SCH_NO_CONNECT_T, - SCH_BUS_WIRE_ENTRY_T, - SCH_BUS_BUS_ENTRY_T, - SCH_LINE_T, - SCH_BITMAP_T, - SCH_TEXT_T, - SCH_LABEL_T, - SCH_GLOBAL_LABEL_T, - SCH_HIERARCHICAL_LABEL_T, - SCH_FIELD_T, - SCH_COMPONENT_T, - SCH_SHEET_PIN_T, - SCH_SHEET_T, - - // Be prudent with these 3 types: - // they should be used only to locate a specific field type - // among SCH_FIELD_T items types - SCH_FIELD_LOCATE_REFERENCE_T, - SCH_FIELD_LOCATE_VALUE_T, - SCH_FIELD_LOCATE_FOOTPRINT_T, - - // General - SCH_SCREEN_T, - - /* - * Draw items in library component. - * - * The order of these items effects the sort order for items inside the - * "DRAW/ENDDRAW" section of the component definition in a library file. - * If you add a new draw item, type, please make sure you add it so the - * sort order is logical. - */ - LIB_COMPONENT_T, - LIB_ALIAS_T, - LIB_ARC_T, - LIB_CIRCLE_T, - LIB_TEXT_T, - LIB_RECTANGLE_T, - LIB_POLYLINE_T, - LIB_BEZIER_T, - LIB_PIN_T, - - /* - * Fields are not saved inside the "DRAW/ENDDRAW". Add new draw item - * types before this line. - */ - LIB_FIELD_T, - - /* - * For GerbView: items type: - */ - TYPE_GERBER_DRAW_ITEM, - - /* - * for Pl_Editor, in undo/redo commands - */ - TYPE_PL_EDITOR_LAYOUT, - - // End value - MAX_STRUCT_TYPE_ID -}; - namespace KIGFX { @@ -186,17 +88,6 @@ public: delete[] m_groups; } - /** - * Function Type - * returns the type of object. This attribute should never be changed - * after a constructor sets it, so there is no public "setter" method. - * @return KICAD_T - the type of object. - */ - virtual KICAD_T Type() const - { - return NOT_USED; - } - /** * Function ViewBBox() * returns the bounding box of the item covering all its layers. diff --git a/pcbnew/class_board.h b/pcbnew/class_board.h index cbe0fe7fd4..b8cdc49950 100644 --- a/pcbnew/class_board.h +++ b/pcbnew/class_board.h @@ -220,6 +220,10 @@ private: void chainMarkedSegments( wxPoint aPosition, LAYER_MSK aLayerMask, TRACK_PTRS* aList ); public: + static inline bool ClassOf( const EDA_ITEM* aItem ) + { + return PCB_T == aItem->Type(); + } void SetFileName( const wxString& aFileName ) { m_fileName = aFileName; } diff --git a/pcbnew/class_board_connected_item.h b/pcbnew/class_board_connected_item.h index a0a4a46dfc..7b3f11b511 100644 --- a/pcbnew/class_board_connected_item.h +++ b/pcbnew/class_board_connected_item.h @@ -58,6 +58,21 @@ public: BOARD_CONNECTED_ITEM( const BOARD_CONNECTED_ITEM& aItem ); + static inline bool ClassOf( const EDA_ITEM* aItem ) + { + switch( aItem->Type() ) + { + case PCB_PAD_T: + case PCB_TRACE_T: + case PCB_VIA_T: + case PCB_ZONE_AREA_T: + return true; + + default: + return false; + } + } + ///> @copydoc BOARD_ITEM::IsConnected() bool IsConnected() const { diff --git a/pcbnew/class_edge_mod.h b/pcbnew/class_edge_mod.h index 18790d9b9b..fca427d0ad 100644 --- a/pcbnew/class_edge_mod.h +++ b/pcbnew/class_edge_mod.h @@ -54,6 +54,11 @@ public: /// skip the linked list stuff, and parent const EDGE_MODULE& operator = ( const EDGE_MODULE& rhs ); + static inline bool ClassOf( const EDA_ITEM* aItem ) + { + return PCB_MODULE_EDGE_T == aItem->Type(); + } + void Copy( EDGE_MODULE* source ); // copy structure void SetStart0( const wxPoint& aPoint ) { m_Start0 = aPoint; } diff --git a/pcbnew/class_module.cpp b/pcbnew/class_module.cpp index 5673c06f2d..e755745f24 100644 --- a/pcbnew/class_module.cpp +++ b/pcbnew/class_module.cpp @@ -424,7 +424,8 @@ EDA_RECT MODULE::GetFootprintRect() const for( const BOARD_ITEM* item = m_Drawings.GetFirst(); item; item = item->Next() ) { - const EDGE_MODULE *edge = dynamic_cast( item ); + const EDGE_MODULE* edge = dyn_cast( item ); + if( edge ) area.Merge( edge->GetBoundingBox() ); } diff --git a/pcbnew/class_module.h b/pcbnew/class_module.h index a58117a2f9..5a37ca992c 100644 --- a/pcbnew/class_module.h +++ b/pcbnew/class_module.h @@ -77,6 +77,11 @@ public: ~MODULE(); + static inline bool ClassOf( const EDA_ITEM* aItem ) + { + return PCB_MODULE_T == aItem->Type(); + } + MODULE* Next() const { return static_cast( Pnext ); } MODULE* Back() const { return static_cast( Pback ); } diff --git a/pcbnew/class_text_mod.h b/pcbnew/class_text_mod.h index 8c76e70c22..d3a7d7ecef 100644 --- a/pcbnew/class_text_mod.h +++ b/pcbnew/class_text_mod.h @@ -60,25 +60,18 @@ public: TEXT_is_DIVERS = 2 }; -private: - - /* Note: orientation in 1/10 deg relative to the footprint - * Physical orient is m_Orient + m_Parent->m_Orient - */ - - TEXT_TYPE m_Type; ///< 0=ref, 1=val, etc. - bool m_NoShow; ///< true = invisible - - wxPoint m_Pos0; ///< text coordinates relatives to the footprint anchor, orient 0. - ///< text coordinate ref point is the text centre - -public: TEXTE_MODULE( MODULE* parent, TEXT_TYPE text_type = TEXT_is_DIVERS ); // Do not create a copy constructor. The one generated by the compiler is adequate. ~TEXTE_MODULE(); + static inline bool ClassOf( const EDA_ITEM* aItem ) + { + return PCB_MODULE_TEXT_T == aItem->Type(); + } + + virtual const wxPoint& GetPosition() const { return m_Pos; @@ -172,6 +165,17 @@ public: #if defined(DEBUG) virtual void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override #endif + +private: + /* Note: orientation in 1/10 deg relative to the footprint + * Physical orient is m_Orient + m_Parent->m_Orient + */ + + TEXT_TYPE m_Type; ///< 0=ref, 1=val, etc. + bool m_NoShow; ///< true = invisible + + wxPoint m_Pos0; ///< text coordinates relatives to the footprint anchor, orient 0. + ///< text coordinate ref point is the text centre }; #endif // TEXT_MODULE_H_ diff --git a/pcbnew/class_track.h b/pcbnew/class_track.h index 58994bdff0..258586d3f7 100644 --- a/pcbnew/class_track.h +++ b/pcbnew/class_track.h @@ -79,18 +79,12 @@ extern TRACK* GetTrack( TRACK* aStartTrace, const TRACK* aEndTrace, class TRACK : public BOARD_CONNECTED_ITEM { - // make SetNext() and SetBack() private so that they may not be called from anywhere. - // list management is done on TRACKs using DLIST only. -private: - void SetNext( EDA_ITEM* aNext ) { Pnext = aNext; } - void SetBack( EDA_ITEM* aBack ) { Pback = aBack; } - -protected: - int m_Width; // Thickness of track, or via diameter - wxPoint m_Start; // Line start point - wxPoint m_End; // Line end point - public: + static inline bool ClassOf( const EDA_ITEM* aItem ) + { + return PCB_TRACE_T == aItem->Type(); + } + BOARD_CONNECTED_ITEM* start; // pointers to a connected item (pad or track) BOARD_CONNECTED_ITEM* end; @@ -339,6 +333,16 @@ protected: * Helper for drawing the short netname in tracks */ void DrawShortNetname( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, EDA_COLOR_T aBgColor ); + + int m_Width; ///< Thickness of track, or via diameter + wxPoint m_Start; ///< Line start point + wxPoint m_End; ///< Line end point + +private: + // make SetNext() and SetBack() private so that they may not be called from anywhere. + // list management is done on TRACKs using DLIST only. + void SetNext( EDA_ITEM* aNext ) { Pnext = aNext; } + void SetBack( EDA_ITEM* aBack ) { Pback = aBack; } }; @@ -376,6 +380,11 @@ class VIA : public TRACK public: VIA( BOARD_ITEM* aParent ); + static inline bool ClassOf( const EDA_ITEM *aItem ) + { + return PCB_VIA_T == aItem->Type(); + } + // Do not create a copy constructor. The one generated by the compiler is adequate. void Draw( EDA_DRAW_PANEL* panel, wxDC* DC, @@ -467,7 +476,6 @@ public: */ bool IsDrillDefault() const { return m_Drill <= 0; } - protected: virtual void GetMsgPanelInfoBase( std::vector< MSG_PANEL_ITEM >& aList ); diff --git a/pcbnew/clean.cpp b/pcbnew/clean.cpp index ecf08d4012..d350b5f3f0 100644 --- a/pcbnew/clean.cpp +++ b/pcbnew/clean.cpp @@ -284,7 +284,7 @@ const ZONE_CONTAINER* TRACKS_CLEANER::zoneForTrackEndpoint( const TRACK *aTrack, { // Vias are special cased, since they get a layer range, not a single one LAYER_NUM top_layer, bottom_layer; - const VIA *via = dynamic_cast( aTrack ); + const VIA* via = dyn_cast( aTrack ); if( via ) via->LayerPair( &top_layer, &bottom_layer ); @@ -318,7 +318,8 @@ bool TRACKS_CLEANER::testTrackEndpointDangling( TRACK *aTrack, ENDPOINT_T aEndPo /* If a via is connected to this end, test if this via has a second item connected. * If not, remove the current segment (the via would then become * unconnected and remove on the following pass) */ - VIA* via = dynamic_cast( other ); + VIA* via = dyn_cast( other ); + if( via ) { // search for another segment following the via diff --git a/pcbnew/edgemod.cpp b/pcbnew/edgemod.cpp index 77019494f2..d9dc16fe44 100644 --- a/pcbnew/edgemod.cpp +++ b/pcbnew/edgemod.cpp @@ -171,7 +171,8 @@ void FOOTPRINT_EDIT_FRAME::Edit_Edge_Width( EDGE_MODULE* aEdge ) for( BOARD_ITEM *item = module->GraphicalItems(); item; item = item->Next() ) { - aEdge = dynamic_cast( item ); + aEdge = dyn_cast( item ); + if( aEdge ) aEdge->SetWidth( GetDesignSettings().m_ModuleSegmentWidth ); } @@ -218,7 +219,7 @@ void FOOTPRINT_EDIT_FRAME::Edit_Edge_Layer( EDGE_MODULE* aEdge ) for( BOARD_ITEM *item = module->GraphicalItems() ; item != NULL; item = item->Next() ) { - aEdge = dynamic_cast( item ); + aEdge = dyn_cast( item ); if( aEdge && (aEdge->GetLayer() != new_layer) ) { diff --git a/pcbnew/editrack.cpp b/pcbnew/editrack.cpp index 02f02f782c..5842a921ce 100644 --- a/pcbnew/editrack.cpp +++ b/pcbnew/editrack.cpp @@ -62,7 +62,7 @@ static void Abort_Create_Track( EDA_DRAW_PANEL* Panel, wxDC* DC ) { PCB_EDIT_FRAME* frame = (PCB_EDIT_FRAME*) Panel->GetParent(); BOARD* pcb = frame->GetBoard(); - TRACK* track = dynamic_cast( frame->GetCurItem() ); + TRACK* track = dyn_cast( frame->GetCurItem() ); if( track ) { diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index 9b0319f2cb..d3b0422d32 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -1671,7 +1671,7 @@ BOARD* PCB_IO::Load( const wxString& aFileName, BOARD* aAppendToMe, const PROPER m_parser->SetLineReader( &reader ); m_parser->SetBoard( aAppendToMe ); - BOARD* board = dynamic_cast( m_parser->Parse() ); + BOARD* board = dyn_cast( m_parser->Parse() ); wxASSERT( board ); // Give the filename to the board if it's new diff --git a/pcbnew/librairi.cpp b/pcbnew/librairi.cpp index c55cad44b5..548b4b3a07 100644 --- a/pcbnew/librairi.cpp +++ b/pcbnew/librairi.cpp @@ -249,7 +249,7 @@ MODULE* FOOTPRINT_EDIT_FRAME::Import_Module() f.ReadAll( &fcontents ); - module = dynamic_cast( pcb_io.Parse( fcontents ) ); + module = dyn_cast( pcb_io.Parse( fcontents ) ); if( !module ) { diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 8b64daa0af..06eac0cef5 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -146,18 +146,18 @@ void PCB_RENDER_SETTINGS::LoadDisplayOptions( const DISPLAY_OPTIONS& aOptions ) const COLOR4D& PCB_RENDER_SETTINGS::GetColor( const VIEW_ITEM* aItem, int aLayer ) const { int netCode = -1; + const EDA_ITEM* item = static_cast( aItem ); - if( aItem ) + if( item ) { - if( static_cast( aItem )->IsSelected() ) + if( item->IsSelected() ) { return m_layerColorsSel[aLayer]; } // Try to obtain the netcode for the item - const BOARD_CONNECTED_ITEM* item = dynamic_cast( aItem ); - if( item ) - netCode = item->GetNetCode(); + if( const BOARD_CONNECTED_ITEM* conItem = dyn_cast ( item ) ) + netCode = conItem->GetNetCode(); } // Return grayish color for non-highlighted layers in the high contrast mode @@ -200,49 +200,51 @@ PCB_PAINTER::PCB_PAINTER( GAL* aGal ) : bool PCB_PAINTER::Draw( const VIEW_ITEM* aItem, int aLayer ) { + const EDA_ITEM* item = static_cast( aItem ); + // the "cast" applied in here clarifies which overloaded draw() is called - switch( aItem->Type() ) + switch( item->Type() ) { case PCB_ZONE_T: case PCB_TRACE_T: - draw( (const TRACK*) aItem, aLayer ); + draw( (const TRACK*) item, aLayer ); break; case PCB_VIA_T: - draw( (const VIA*) aItem, aLayer ); + draw( (const VIA*) item, aLayer ); break; case PCB_PAD_T: - draw( (const D_PAD*) aItem, aLayer ); + draw( (const D_PAD*) item, aLayer ); break; case PCB_LINE_T: case PCB_MODULE_EDGE_T: - draw( (DRAWSEGMENT*) aItem ); + draw( (DRAWSEGMENT*) item ); break; case PCB_TEXT_T: - draw( (TEXTE_PCB*) aItem, aLayer ); + draw( (TEXTE_PCB*) item, aLayer ); break; case PCB_MODULE_TEXT_T: - draw( (TEXTE_MODULE*) aItem, aLayer ); + draw( (TEXTE_MODULE*) item, aLayer ); break; case PCB_ZONE_AREA_T: - draw( (ZONE_CONTAINER*) aItem ); + draw( (ZONE_CONTAINER*) item ); break; case PCB_DIMENSION_T: - draw( (DIMENSION*) aItem, aLayer ); + draw( (DIMENSION*) item, aLayer ); break; case PCB_TARGET_T: - draw( (PCB_TARGET*) aItem ); + draw( (PCB_TARGET*) item ); break; case PCB_MARKER_T: - draw( (MARKER_PCB*) aItem ); + draw( (MARKER_PCB*) item ); break; default: diff --git a/pcbnew/plot_board_layers.cpp b/pcbnew/plot_board_layers.cpp index 7bfa48cb36..a0d05647b1 100644 --- a/pcbnew/plot_board_layers.cpp +++ b/pcbnew/plot_board_layers.cpp @@ -377,7 +377,7 @@ void PlotStandardLayer( BOARD *aBoard, PLOTTER* aPlotter, // plot them on solder mask for( TRACK* track = aBoard->m_Track; track; track = track->Next() ) { - const VIA* Via = dynamic_cast( track ); + const VIA* Via = dyn_cast( track ); if( !Via ) continue; @@ -562,7 +562,7 @@ void PlotLayerOutlines( BOARD *aBoard, PLOTTER* aPlotter, // Plot vias holes for( TRACK* track = aBoard->m_Track; track; track = track->Next() ) { - const VIA* via = dynamic_cast( track ); + const VIA* via = dyn_cast( track ); if( via && via->IsOnLayer( layer ) ) // via holes can be not through holes { @@ -663,7 +663,7 @@ void PlotSolderMaskLayer( BOARD *aBoard, PLOTTER* aPlotter, int via_margin = via_clearance + inflate; for( TRACK* track = aBoard->m_Track; track; track = track->Next() ) { - const VIA* via = dynamic_cast( track ); + const VIA* via = dyn_cast( track ); if( !via ) continue; diff --git a/pcbnew/plot_brditems_plotter.cpp b/pcbnew/plot_brditems_plotter.cpp index be7ac83311..7413da3cbc 100644 --- a/pcbnew/plot_brditems_plotter.cpp +++ b/pcbnew/plot_brditems_plotter.cpp @@ -151,7 +151,8 @@ bool BRDITEMS_PLOTTER::PlotAllTextsModule( MODULE* aModule ) for( BOARD_ITEM *item = aModule->GraphicalItems().GetFirst(); item != NULL; item = item->Next() ) { - textModule = dynamic_cast( item ); + textModule = dyn_cast( item ); + if( !textModule ) continue; @@ -350,7 +351,7 @@ void BRDITEMS_PLOTTER::Plot_Edges_Modules() { for( BOARD_ITEM* item = module->GraphicalItems().GetFirst(); item; item = item->Next() ) { - EDGE_MODULE *edge = dynamic_cast( item ); + EDGE_MODULE* edge = dyn_cast( item ); if( !edge || (( GetLayerMask( edge->GetLayer() ) & m_layerMask ) == 0) ) continue; @@ -682,7 +683,7 @@ void BRDITEMS_PLOTTER::PlotDrillMarks() for( TRACK *pts = m_board->m_Track; pts != NULL; pts = pts->Next() ) { - const VIA *via = dynamic_cast( pts ); + const VIA* via = dyn_cast( pts ); if( via ) plotOneDrillMark( PAD_DRILL_CIRCLE, via->GetStart(), From 335f5a57e58eb9bb418cf18fade6e22fbada17b5 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 6 Jun 2014 12:30:07 +0200 Subject: [PATCH 490/741] Pcbnew: fix an issue with very old .brd files. --- pcbnew/dialogs/dialog_drc.h | 2 -- pcbnew/dialogs/dialog_footprint_wizard_list.h | 1 - pcbnew/legacy_plugin.cpp | 15 +++++++++++++-- pcbnew/sel_layer.cpp | 1 - 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/pcbnew/dialogs/dialog_drc.h b/pcbnew/dialogs/dialog_drc.h index 6f299429e1..68ed43c712 100644 --- a/pcbnew/dialogs/dialog_drc.h +++ b/pcbnew/dialogs/dialog_drc.h @@ -118,10 +118,8 @@ private: void OnPopupMenu( wxCommandEvent& event ); - DRC* m_tester; PCB_EDIT_FRAME* m_Parent; - int m_UnconnectedCount; }; #endif // _DIALOG_DRC_H_ diff --git a/pcbnew/dialogs/dialog_footprint_wizard_list.h b/pcbnew/dialogs/dialog_footprint_wizard_list.h index 181bafd819..11e81d3dee 100644 --- a/pcbnew/dialogs/dialog_footprint_wizard_list.h +++ b/pcbnew/dialogs/dialog_footprint_wizard_list.h @@ -11,7 +11,6 @@ class DIALOG_FOOTPRINT_WIZARD_LIST: public DIALOG_FOOTPRINT_WIZARD_LIST_BASE { private: - wxDialog * m_Parent; FOOTPRINT_WIZARD *m_FootprintWizard; public: diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index 42ef2aa80b..64e57d8b17 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -483,7 +483,8 @@ void LEGACY_PLUGIN::loadGENERAL() m_board->SetBoundingBox( bbbox ); } - /* Read the number of segments of type DRAW, TRACK, ZONE + /* This is no more usefull, so this info is no more parsed + // Read the number of segments of type DRAW, TRACK, ZONE else if( TESTLINE( "Ndraw" ) ) { NbDraw = intParse( line + SZ( "Ndraw" ) ); @@ -509,6 +510,11 @@ void LEGACY_PLUGIN::loadGENERAL() m_netCodes.resize( intParse( line + SZ( "Nnets" ) ) ); } + else if( TESTLINE( "Nn" ) ) // id "Nnets" for old .brd files + { + m_netCodes.resize( intParse( line + SZ( "Nn" ) ) ); + } + else if( TESTLINE( "$EndGENERAL" ) ) return; // preferred exit } @@ -1823,7 +1829,7 @@ void LEGACY_PLUGIN::loadNETINFO_ITEM() NETINFO_ITEM* net = NULL; char* line; - int netCode; + int netCode = 0; while( ( line = READLINE( m_reader ) ) != NULL ) { @@ -1846,6 +1852,11 @@ void LEGACY_PLUGIN::loadNETINFO_ITEM() if( net != NULL && ( net->GetNet() > 0 || m_board->FindNet( 0 ) == NULL ) ) { m_board->AppendNet( net ); + + // Be sure we have room to store the net in m_netCodes + if( (int)m_netCodes.size() <= netCode ) + m_netCodes.resize( netCode+1 ); + m_netCodes[netCode] = net->GetNet(); } else diff --git a/pcbnew/sel_layer.cpp b/pcbnew/sel_layer.cpp index 09e954dd7b..4c22c927fa 100644 --- a/pcbnew/sel_layer.cpp +++ b/pcbnew/sel_layer.cpp @@ -252,7 +252,6 @@ class SELECT_COPPER_LAYERS_PAIR_DIALOG: public PCB_LAYER_SELECTOR, public DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE { private: - BOARD* m_brd; LAYER_NUM m_frontLayer; LAYER_NUM m_backLayer; int m_leftRowSelected; From f5de166a7e25e3c140490cf498fdeeb47513902b Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 6 Jun 2014 14:59:25 +0200 Subject: [PATCH 491/741] Removed an unused parameter from TOOL_BASE::getModel() method. --- include/tool/tool_base.h | 2 +- pcbnew/router/router_tool.cpp | 12 ++++++------ pcbnew/tools/drawing_tool.cpp | 2 +- pcbnew/tools/edit_tool.cpp | 14 +++++++------- pcbnew/tools/pcbnew_control.cpp | 14 +++++++------- pcbnew/tools/point_editor.cpp | 2 +- pcbnew/tools/selection_tool.cpp | 6 +++--- 7 files changed, 26 insertions(+), 26 deletions(-) diff --git a/include/tool/tool_base.h b/include/tool/tool_base.h index 681e3099d9..915c649a58 100644 --- a/include/tool/tool_base.h +++ b/include/tool/tool_base.h @@ -185,7 +185,7 @@ protected: * Returns the model object if it matches the requested type. */ template - T* getModel( KICAD_T aModelType ) const + T* getModel() const { EDA_ITEM* m = getModelInt(); diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index a81883d3ad..b1ab9a9abb 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -241,7 +241,7 @@ void ROUTER_TOOL::Reset( RESET_REASON aReason ) TRACEn( 0, "Reset" ); m_router->ClearWorld(); - m_router->SetBoard( getModel( PCB_T ) ); + m_router->SetBoard( getModel() ); m_router->SyncWorld(); m_router->LoadSettings( m_settings ); m_needsSync = false; @@ -266,7 +266,7 @@ int ROUTER_TOOL::getDefaultWidth( int aNetCode ) void ROUTER_TOOL::getNetclassDimensions( int aNetCode, int& aWidth, int& aViaDiameter, int& aViaDrill ) { - BOARD* board = getModel( PCB_T ); + BOARD* board = getModel(); BOARD_DESIGN_SETTINGS &bds = board->GetDesignSettings(); NETCLASSPTR netClass; @@ -394,7 +394,7 @@ void ROUTER_TOOL::handleCommonEvents( TOOL_EVENT& aEvent ) else if( aEvent.IsAction( &ACT_CustomTrackWidth ) ) { DIALOG_TRACK_VIA_SIZE sizeDlg( getEditFrame(), m_router->Settings() ); - BOARD_DESIGN_SETTINGS& bds = getModel( PCB_T )->GetDesignSettings(); + BOARD_DESIGN_SETTINGS& bds = getModel()->GetDesignSettings(); sizeDlg.ShowModal(); @@ -413,7 +413,7 @@ void ROUTER_TOOL::handleCommonEvents( TOOL_EVENT& aEvent ) else if( aEvent.IsAction( &COMMON_ACTIONS::trackViaSizeChanged ) ) { - BOARD_DESIGN_SETTINGS& bds = getModel( PCB_T )->GetDesignSettings(); + BOARD_DESIGN_SETTINGS& bds = getModel()->GetDesignSettings(); m_router->Settings().SetTrackWidth( bds.GetCurrentTrackWidth() ); m_router->Settings().SetViaDiameter( bds.GetCurrentViaSize() ); @@ -526,7 +526,7 @@ void ROUTER_TOOL::performRouting() bool saveUndoBuffer = true; VIEW_CONTROLS* ctls = getViewControls(); - if( getModel( PCB_T )->GetDesignSettings().m_UseConnectedTrackWidth ) + if( getModel()->GetDesignSettings().m_UseConnectedTrackWidth ) { int width = getDefaultWidth( m_startItem ? m_startItem->Net() : -1 ); @@ -632,7 +632,7 @@ void ROUTER_TOOL::performRouting() int ROUTER_TOOL::Main( TOOL_EVENT& aEvent ) { VIEW_CONTROLS* ctls = getViewControls(); - BOARD* board = getModel( PCB_T ); + BOARD* board = getModel(); BOARD_DESIGN_SETTINGS& bds = board->GetDesignSettings(); // Deselect all items diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index c9a5467583..c1591700e5 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -62,7 +62,7 @@ void DRAWING_TOOL::Reset( RESET_REASON aReason ) // Init variables used by every drawing tool m_view = getView(); m_controls = getViewControls(); - m_board = getModel( PCB_T ); + m_board = getModel(); m_frame = getEditFrame(); setTransitions(); diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 8058250e92..93e878031c 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -188,7 +188,7 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) if( unselect ) m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); - RN_DATA* ratsnest = getModel( PCB_T )->GetRatsnest(); + RN_DATA* ratsnest = getModel()->GetRatsnest(); ratsnest->ClearSimple(); ratsnest->Recalculate(); @@ -257,7 +257,7 @@ int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) processChanges( currentChange ); updateRatsnest( true ); - getModel( PCB_T )->GetRatsnest()->Recalculate(); + getModel()->GetRatsnest()->Recalculate(); m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate ); } @@ -312,7 +312,7 @@ int EDIT_TOOL::Rotate( TOOL_EVENT& aEvent ) if( m_dragging ) selection.group->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); else - getModel( PCB_T )->GetRatsnest()->Recalculate(); + getModel()->GetRatsnest()->Recalculate(); if( unselect ) m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); @@ -362,7 +362,7 @@ int EDIT_TOOL::Flip( TOOL_EVENT& aEvent ) if( m_dragging ) selection.group->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); else - getModel( PCB_T )->GetRatsnest()->Recalculate(); + getModel()->GetRatsnest()->Recalculate(); if( unselect ) m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); @@ -403,7 +403,7 @@ int EDIT_TOOL::Remove( TOOL_EVENT& aEvent ) for( unsigned int i = 0; i < selectedItems.GetCount(); ++i ) remove( static_cast( selectedItems.GetPickedItem( i ) ) ); - getModel( PCB_T )->GetRatsnest()->Recalculate(); + getModel()->GetRatsnest()->Recalculate(); setTransitions(); @@ -413,7 +413,7 @@ int EDIT_TOOL::Remove( TOOL_EVENT& aEvent ) void EDIT_TOOL::remove( BOARD_ITEM* aItem ) { - BOARD* board = getModel( PCB_T ); + BOARD* board = getModel(); switch( aItem->Type() ) { @@ -472,7 +472,7 @@ void EDIT_TOOL::setTransitions() void EDIT_TOOL::updateRatsnest( bool aRedraw ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); - RN_DATA* ratsnest = getModel( PCB_T )->GetRatsnest(); + RN_DATA* ratsnest = getModel()->GetRatsnest(); ratsnest->ClearSimple(); for( unsigned int i = 0; i < selection.items.GetCount(); ++i ) diff --git a/pcbnew/tools/pcbnew_control.cpp b/pcbnew/tools/pcbnew_control.cpp index f6b52d08bd..47dea8cf04 100644 --- a/pcbnew/tools/pcbnew_control.cpp +++ b/pcbnew/tools/pcbnew_control.cpp @@ -106,7 +106,7 @@ int PCBNEW_CONTROL::ZoomFitScreen( TOOL_EVENT& aEvent ) { KIGFX::VIEW* view = m_frame->GetGalCanvas()->GetView(); KIGFX::GAL* gal = m_frame->GetGalCanvas()->GetGAL(); - BOX2I boardBBox = getModel( PCB_T )->ViewBBox(); + BOX2I boardBBox = getModel()->ViewBBox(); VECTOR2I screenSize = gal->GetScreenPixelSize(); double iuPerX = screenSize.x ? boardBBox.GetWidth() / screenSize.x : 1.0; @@ -136,7 +136,7 @@ int PCBNEW_CONTROL::TrackDisplayMode( TOOL_EVENT& aEvent ) m_frame->m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill; settings->LoadDisplayOptions( DisplayOpt ); - BOARD* board = getModel( PCB_T ); + BOARD* board = getModel(); for( TRACK* track = board->m_Track; track; track = track->Next() ) track->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); @@ -168,7 +168,7 @@ int PCBNEW_CONTROL::ViaDisplayMode( TOOL_EVENT& aEvent ) m_frame->m_DisplayViaFill = DisplayOpt.DisplayViaFill; settings->LoadDisplayOptions( DisplayOpt ); - BOARD* board = getModel( PCB_T ); + BOARD* board = getModel(); for( TRACK* track = board->m_Track; track; track = track->Next() ) { if( track->Type() == PCB_VIA_T ) @@ -448,7 +448,7 @@ int PCBNEW_CONTROL::GridSetOrigin( TOOL_EVENT& aEvent ) // Track & via size control int PCBNEW_CONTROL::TrackWidthInc( TOOL_EVENT& aEvent ) { - BOARD* board = getModel( PCB_T ); + BOARD* board = getModel(); int widthIndex = board->GetDesignSettings().GetTrackWidthIndex() + 1; if( widthIndex >= (int) board->GetDesignSettings().m_TrackWidthList.size() ) @@ -469,7 +469,7 @@ int PCBNEW_CONTROL::TrackWidthInc( TOOL_EVENT& aEvent ) int PCBNEW_CONTROL::TrackWidthDec( TOOL_EVENT& aEvent ) { - BOARD* board = getModel( PCB_T ); + BOARD* board = getModel(); int widthIndex = board->GetDesignSettings().GetTrackWidthIndex() - 1; if( widthIndex < 0 ) @@ -490,7 +490,7 @@ int PCBNEW_CONTROL::TrackWidthDec( TOOL_EVENT& aEvent ) int PCBNEW_CONTROL::ViaSizeInc( TOOL_EVENT& aEvent ) { - BOARD* board = getModel( PCB_T ); + BOARD* board = getModel(); int sizeIndex = board->GetDesignSettings().GetViaSizeIndex() + 1; if( sizeIndex >= (int) board->GetDesignSettings().m_ViasDimensionsList.size() ) @@ -511,7 +511,7 @@ int PCBNEW_CONTROL::ViaSizeInc( TOOL_EVENT& aEvent ) int PCBNEW_CONTROL::ViaSizeDec( TOOL_EVENT& aEvent ) { - BOARD* board = getModel( PCB_T ); + BOARD* board = getModel(); int sizeIndex = board->GetDesignSettings().GetViaSizeIndex() - 1; if( sizeIndex < 0 ) diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp index 3a2e62416a..eab541add2 100644 --- a/pcbnew/tools/point_editor.cpp +++ b/pcbnew/tools/point_editor.cpp @@ -721,7 +721,7 @@ void POINT_EDITOR::breakOutline( const VECTOR2I& aBreakPoint ) newSegment->SetStart( wxPoint( nearestPoint.x, nearestPoint.y ) ); newSegment->SetEnd( wxPoint( seg.B.x, seg.B.y ) ); - getModel( PCB_T )->Add( newSegment ); + getModel()->Add( newSegment ); getView()->Add( newSegment ); } } diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index d32f532ef9..ada9f09916 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -228,7 +228,7 @@ void SELECTION_TOOL::toggleSelection( BOARD_ITEM* aItem ) bool SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere, bool aAllowDisambiguation ) { - BOARD* pcb = getModel( PCB_T ); + BOARD* pcb = getModel(); BOARD_ITEM* item; GENERAL_COLLECTORS_GUIDE guide = getEditFrame()->GetCollectorsGuide(); GENERAL_COLLECTOR collector; @@ -524,7 +524,7 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) const return false; } - BOARD* board = getModel( PCB_T ); + BOARD* board = getModel(); switch( aItem->Type() ) { @@ -678,7 +678,7 @@ void SELECTION_TOOL::highlightNet( const VECTOR2I& aPoint ) int net = -1; // Find a connected item for which we are going to highlight a net - collector.Collect( getModel( PCB_T ), GENERAL_COLLECTOR::PadsTracksOrZones, + collector.Collect( getModel(), GENERAL_COLLECTOR::PadsTracksOrZones, wxPoint( aPoint.x, aPoint.y ), guide ); bool enableHighlight = ( collector.GetCount() > 0 ); From e7aa9630111a89351dbcb64599cbbc4fe2dbbff6 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 6 Jun 2014 14:59:55 +0200 Subject: [PATCH 492/741] Fixed layers switching in GAL. --- pcbnew/tools/pcbnew_control.cpp | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/pcbnew/tools/pcbnew_control.cpp b/pcbnew/tools/pcbnew_control.cpp index 47dea8cf04..a01ec83802 100644 --- a/pcbnew/tools/pcbnew_control.cpp +++ b/pcbnew/tools/pcbnew_control.cpp @@ -301,8 +301,19 @@ int PCBNEW_CONTROL::LayerNext( TOOL_EVENT& aEvent ) { PCB_EDIT_FRAME* editFrame = getEditFrame(); LAYER_NUM layer = editFrame->GetActiveLayer(); - layer = ( layer + 1 ) % ( LAST_COPPER_LAYER + 1 ); - assert( IsCopperLayer( layer ) ); + + if( ( layer < FIRST_COPPER_LAYER ) || ( layer >= LAST_COPPER_LAYER ) ) + { + setTransitions(); + return 0; + } + + if( getModel()->GetCopperLayerCount() < 2 ) // Single layer + layer = LAYER_N_BACK; + else if( layer >= getModel()->GetCopperLayerCount() - 2 ) + layer = LAYER_N_FRONT; + else + ++layer; editFrame->SwitchLayer( NULL, layer ); editFrame->GetGalCanvas()->SetFocus(); @@ -317,8 +328,18 @@ int PCBNEW_CONTROL::LayerPrev( TOOL_EVENT& aEvent ) PCB_EDIT_FRAME* editFrame = getEditFrame(); LAYER_NUM layer = editFrame->GetActiveLayer(); - if( --layer < 0 ) - layer = LAST_COPPER_LAYER; + if( ( layer <= FIRST_COPPER_LAYER ) || ( layer > LAST_COPPER_LAYER ) ) + { + setTransitions(); + return 0; + } + + if( getModel()->GetCopperLayerCount() < 2 ) // Single layer + layer = LAYER_N_BACK; + else if( layer == LAYER_N_FRONT ) + layer = std::max( LAYER_N_BACK, FIRST_COPPER_LAYER + getModel()->GetCopperLayerCount() - 2 ); + else + --layer; assert( IsCopperLayer( layer ) ); editFrame->SwitchLayer( NULL, layer ); From bd174ebffe8cd1e3f2eb967d4fb742de701925e4 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 7 Jun 2014 18:20:23 +0200 Subject: [PATCH 493/741] Page layout editor: fix bad initialization on startup, which can crash pl_editor when trying to edit an item. Minor other fixes. --- pagelayout_editor/hotkeys.cpp | 2 +- pagelayout_editor/pl_editor.cpp | 7 ------- pagelayout_editor/pl_editor_frame.cpp | 11 +++++++++++ pcbnew/class_pcb_layer_widget.cpp | 2 +- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/pagelayout_editor/hotkeys.cpp b/pagelayout_editor/hotkeys.cpp index 49a9d0e395..74473599b0 100644 --- a/pagelayout_editor/hotkeys.cpp +++ b/pagelayout_editor/hotkeys.cpp @@ -76,7 +76,7 @@ static EDA_HOTKEY HkMoveStartPoint( wxT( "Move Start Point" ), HK_MOVE_START_ ID_POPUP_ITEM_MOVE_START_POINT ); static EDA_HOTKEY HkMoveEndPoint( wxT( "Move End Point" ), HK_MOVE_END_POINT, 'E', ID_POPUP_ITEM_MOVE_END_POINT ); -static EDA_HOTKEY HkDeleteItem( wxT( "Move Item" ), HK_DELETE_ITEM, WXK_DELETE, +static EDA_HOTKEY HkDeleteItem( wxT( "Delete Item" ), HK_DELETE_ITEM, WXK_DELETE, ID_POPUP_ITEM_DELETE ); // Undo Redo diff --git a/pagelayout_editor/pl_editor.cpp b/pagelayout_editor/pl_editor.cpp index f15d34e8ab..012720abc9 100644 --- a/pagelayout_editor/pl_editor.cpp +++ b/pagelayout_editor/pl_editor.cpp @@ -65,13 +65,6 @@ static struct IFACE : public KIFACE_I case FRAME_PL_EDITOR: { PL_EDITOR_FRAME* frame = new PL_EDITOR_FRAME( aKiway, aParent ); - - /* Is this really needed since at this point there is no open file? - frame->Zoom_Automatique( true ); // Zoom fit in frame - - if so, why is the constructor not doing it? - */ - return frame; } break; diff --git a/pagelayout_editor/pl_editor_frame.cpp b/pagelayout_editor/pl_editor_frame.cpp index dd1162b9f3..ab91849c82 100644 --- a/pagelayout_editor/pl_editor_frame.cpp +++ b/pagelayout_editor/pl_editor_frame.cpp @@ -171,6 +171,16 @@ PL_EDITOR_FRAME::PL_EDITOR_FRAME( KIWAY* aKiway, wxWindow* aParent ) : wxAuiPaneInfo( mesg ).Name( wxT( "MsgPanel" ) ).Bottom().Layer( 10 ) ); m_auimgr.Update(); + + // Initialize the current page layout + WORKSHEET_LAYOUT& pglayout = WORKSHEET_LAYOUT::GetTheInstance(); +#if 0 //start with empty layout + pglayout.AllowVoidList( true ); + pglayout.ClearList(); +#else // start with the default Kicad layout + pglayout.SetPageLayout(); +#endif + OnNewPageLayout(); } @@ -744,5 +754,6 @@ void PL_EDITOR_FRAME::OnNewPageLayout() GetScreen()->ClrModify(); m_propertiesPagelayout->CopyPrmsFromGeneralToPanel(); RebuildDesignTree(); + Zoom_Automatique( true ); m_canvas->Refresh(); } diff --git a/pcbnew/class_pcb_layer_widget.cpp b/pcbnew/class_pcb_layer_widget.cpp index ce7bc0f6e6..944019e286 100644 --- a/pcbnew/class_pcb_layer_widget.cpp +++ b/pcbnew/class_pcb_layer_widget.cpp @@ -67,7 +67,7 @@ const LAYER_WIDGET::ROW PCB_LAYER_WIDGET::s_render_rows[] = { RR( _( "Pads Front" ), PAD_FR_VISIBLE, WHITE, _( "Show footprint pads on board's front" ) ), RR( _( "Pads Back" ), PAD_BK_VISIBLE, WHITE, _( "Show footprint pads on board's back" ) ), - RR( _( "Text Front" ), MOD_TEXT_FR_VISIBLE, WHITE, _( "Show footprint text on board's back" ) ), + RR( _( "Text Front" ), MOD_TEXT_FR_VISIBLE, WHITE, _( "Show footprint text on board's front" ) ), RR( _( "Text Back" ), MOD_TEXT_BK_VISIBLE, WHITE, _( "Show footprint text on board's back" ) ), RR( _( "Hidden Text" ), MOD_TEXT_INVISIBLE, WHITE, _( "Show footprint text marked as invisible" ) ), From 53cd19a69b6343a953e3a707f4bf8fb34c762f08 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 8 Jun 2014 12:35:42 +0200 Subject: [PATCH 494/741] VRML export rewritten --- pcbnew/CMakeLists.txt | 1 - pcbnew/exporters/export_idf.cpp | 2 +- pcbnew/exporters/export_vrml.cpp | 512 +++++----- pcbnew/exporters/vrml_board.cpp | 1501 ------------------------------ pcbnew/exporters/vrml_board.h | 379 -------- utils/idftools/idf_outlines.cpp | 18 +- utils/idftools/idf_parser.cpp | 14 +- utils/idftools/vrml_layer.cpp | 45 +- utils/idftools/vrml_layer.h | 1 + 9 files changed, 329 insertions(+), 2144 deletions(-) delete mode 100644 pcbnew/exporters/vrml_board.cpp delete mode 100644 pcbnew/exporters/vrml_board.h diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 2b71524a1f..d01059707e 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -140,7 +140,6 @@ set( PCBNEW_EXPORTERS exporters/gen_drill_report_files.cpp exporters/gen_modules_placefile.cpp exporters/gendrill_Excellon_writer.cpp - exporters/vrml_board.cpp ) set( PCBNEW_AUTOROUTER_SRCS diff --git a/pcbnew/exporters/export_idf.cpp b/pcbnew/exporters/export_idf.cpp index a236d4a91a..64242e77d4 100644 --- a/pcbnew/exporters/export_idf.cpp +++ b/pcbnew/exporters/export_idf.cpp @@ -568,7 +568,7 @@ bool Export_IDF3( BOARD* aPcb, const wxString& aFullFileName, bool aUseThou ) ok = false; } - catch( std::exception& e ) + catch( const std::exception& e ) { wxString msg; msg << _( "IDF Export Failed:\n" ) << FROM_UTF8( e.what() ); diff --git a/pcbnew/exporters/export_vrml.cpp b/pcbnew/exporters/export_vrml.cpp index 2522e813e2..5b8de962d1 100644 --- a/pcbnew/exporters/export_vrml.cpp +++ b/pcbnew/exporters/export_vrml.cpp @@ -24,6 +24,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ + /* * NOTE: * 1. for improved looks, create a DRILL layer for PTH drills. @@ -42,24 +43,17 @@ * * 2. How can we suppress fiducials such as those in the corners of the pic-programmer demo? * - * 3. Export Graphics to Layer objects (see 3d_draw.cpp for clues) to ensure that custom - * tracks/fills/logos are rendered. - * module->TransformGraphicShapesWithClearanceToPolygonSet - * - * For mechanical correctness, we should use the following settings with arcs: - * 1. max. deviation: the number of edges should be determined by the max. - * mechanical deviation and the minimum number of edges shall be 6. - * 2. for very large features we may introduce too many edges in a circle; - * to control this, we should specify a MAX number of edges or a threshold - * radius and a deviation for larger features - * - * For example, many mechanical fits are to within +/-0.05mm, so specifying - * a max. deviation of 0.02mm will yield a hole near the max. material - * condition. Calculating sides for a 10mm radius hole will yield about - * 312 points; such large holes (and arcs) will typically have a specified - * tolerance of +/-0.2mm in which case we can set the MAX edges to 32 - * provided none of the important holes requires > 32 edges. + */ + +/* + * KNOWN BUGS: + * 1. silk outlines are sometimes mangled; this is somehow due to + * many overlapping segments. This does not happen in 3Dviewer + * so it is worth inspecting that code to see what is different. * + * These artefacts can be suppressed for exploratory purposes by + * removing the line width parameter from the length calculation in + * export_vrml_line() */ #include @@ -70,6 +64,9 @@ #include #include <3d_struct.h> #include +#include +#include +#include #include @@ -85,7 +82,13 @@ #include #include -#include +#include + +// minimum width (mm) of a VRML line +#define MIN_VRML_LINEWIDTH 0.12 + +// offset for art layers, mm (silk, paste, etc) +#define ART_OFFSET 0.02 /* helper function: * some characters cannot be used in names, @@ -167,6 +170,9 @@ private: double layer_z[NB_LAYERS]; VRML_COLOR colors[VRML_COLOR_LAST]; + int iMaxSeg; // max. sides to a small circle + double arcMinLen, arcMaxLen; // min and max lengths of an arc chord + public: VRML_LAYER holes; @@ -179,6 +185,8 @@ public: VRML_LAYER bot_tin; double scale; // board internal units to output scaling + double minLineWidth; // minimum width of a VRML line segment + int precision; // precision of output units double tx; // global translation along X double ty; // global translation along Y @@ -193,6 +201,8 @@ public: for( int i = 0; i < NB_LAYERS; ++i ) layer_z[i] = 0; + holes.GetArcParams( iMaxSeg, arcMinLen, arcMaxLen ); + // this default only makes sense if the output is in mm board_thickness = 1.6; @@ -208,6 +218,8 @@ public: // pad silver colors[ VRML_COLOR_TIN ] = VRML_COLOR( .749, .756, .761, .749, .756, .761, 0, 0, 0, 0.8, 0, 0.8 ); + + precision = 5; } VRML_COLOR& GetColor( VRML_COLOR_INDEX aIndex ) @@ -234,31 +246,51 @@ public: layer_z[aLayer] = aValue; } - void SetMaxDev( double dev ) + // set the scaling of the VRML world + bool SetScale( double aWorldScale ) { - holes.SetMaxDev( dev ); - board.SetMaxDev( dev ); - top_copper.SetMaxDev( dev ); - bot_copper.SetMaxDev( dev ); - top_silk.SetMaxDev( dev ); - bot_silk.SetMaxDev( dev ); - top_tin.SetMaxDev( dev ); - bot_tin.SetMaxDev( dev ); + if( aWorldScale < 0.001 || aWorldScale > 10.0 ) + throw( std::runtime_error( "WorldScale out of range (valid range is 0.001 to 10.0)" ) ); + + scale = aWorldScale * MM_PER_IU; + minLineWidth = aWorldScale * MIN_VRML_LINEWIDTH; + + // set the precision of the VRML coordinates + if( aWorldScale < 0.01 ) + precision = 8; + else if( aWorldScale < 0.1 ) + precision = 7; + else if( aWorldScale< 1.0 ) + precision = 6; + else if( aWorldScale < 10.0 ) + precision = 5; + else + precision = 4; + + double smin = arcMinLen * aWorldScale; + double smax = arcMaxLen * aWorldScale; + + holes.SetArcParams( iMaxSeg, smin, smax ); + board.SetArcParams( iMaxSeg, smin, smax ); + top_copper.SetArcParams( iMaxSeg, smin, smax); + bot_copper.SetArcParams( iMaxSeg, smin, smax); + top_silk.SetArcParams( iMaxSeg, smin, smax ); + bot_silk.SetArcParams( iMaxSeg, smin, smax ); + top_tin.SetArcParams( iMaxSeg, smin, smax ); + bot_tin.SetArcParams( iMaxSeg, smin, smax ); + + return true; } + }; // static var. for dealing with text -namespace VRMLEXPORT -{ - static MODEL_VRML* model_vrml; - bool GetLayer( MODEL_VRML& aModel, LAYER_NUM layer, VRML_LAYER** vlayer ); -} - +static MODEL_VRML* model_vrml; // select the VRML layer object to draw on; return true if // a layer has been selected. -bool VRMLEXPORT::GetLayer( MODEL_VRML& aModel, LAYER_NUM layer, VRML_LAYER** vlayer ) +static bool GetLayer( MODEL_VRML& aModel, LAYER_NUM layer, VRML_LAYER** vlayer ) { switch( layer ) { @@ -286,9 +318,9 @@ bool VRMLEXPORT::GetLayer( MODEL_VRML& aModel, LAYER_NUM layer, VRML_LAYER** vla } -static void write_triangle_bag( FILE* output_file, VRML_COLOR& color, +static void write_triangle_bag( std::ofstream& output_file, VRML_COLOR& color, VRML_LAYER* layer, bool plane, bool top, - double top_z, double bottom_z ) + double top_z, double bottom_z, int aPrecision ) { /* A lot of nodes are not required, but blender sometimes chokes * without them */ @@ -328,7 +360,7 @@ static void write_triangle_bag( FILE* output_file, VRML_COLOR& color, while( marker_found < 4 ) { if( shape_boiler[lineno] ) - fputs( shape_boiler[lineno], output_file ); + output_file << shape_boiler[lineno]; else { marker_found++; @@ -336,37 +368,34 @@ static void write_triangle_bag( FILE* output_file, VRML_COLOR& color, switch( marker_found ) { case 1: // Material marker - fprintf( output_file, - " diffuseColor %g %g %g\n", - color.diffuse_red, - color.diffuse_grn, - color.diffuse_blu ); - fprintf( output_file, - " specularColor %g %g %g\n", - color.spec_red, - color.spec_grn, - color.spec_blu ); - fprintf( output_file, - " emissiveColor %g %g %g\n", - color.emit_red, - color.emit_grn, - color.emit_blu ); - fprintf( output_file, - " ambientIntensity %g\n", color.ambient ); - fprintf( output_file, - " transparency %g\n", color.transp ); - fprintf( output_file, - " shininess %g\n", color.shiny ); + output_file << " diffuseColor " << std::setprecision(3); + output_file << color.diffuse_red << " "; + output_file << color.diffuse_grn << " "; + output_file << color.diffuse_blu << "\n"; + + output_file << " specularColor "; + output_file << color.spec_red << " "; + output_file << color.spec_grn << " "; + output_file << color.spec_blu << "\n"; + + output_file << " emissiveColor "; + output_file << color.emit_red << " "; + output_file << color.emit_grn << " "; + output_file << color.emit_blu << "\n"; + + output_file << " ambientIntensity " << color.ambient << "\n"; + output_file << " transparency " << color.transp << "\n"; + output_file << " shininess " << color.shiny << "\n"; break; case 2: if( plane ) - layer->WriteVertices( top_z, output_file ); + layer->WriteVertices( top_z, output_file, aPrecision ); else - layer->Write3DVertices( top_z, bottom_z, output_file ); + layer->Write3DVertices( top_z, bottom_z, output_file, aPrecision ); - fprintf( output_file, "\n" ); + output_file << "\n"; break; case 3: @@ -376,7 +405,7 @@ static void write_triangle_bag( FILE* output_file, VRML_COLOR& color, else layer->Write3DIndices( output_file ); - fprintf( output_file, "\n" ); + output_file << "\n"; break; default: @@ -389,49 +418,54 @@ static void write_triangle_bag( FILE* output_file, VRML_COLOR& color, } -static void write_layers( MODEL_VRML& aModel, FILE* output_file, BOARD* aPcb ) +static void write_layers( MODEL_VRML& aModel, std::ofstream& output_file, BOARD* aPcb ) { // VRML_LAYER board; aModel.board.Tesselate( &aModel.holes ); - double brdz = aModel.board_thickness / 2.0 - 40000 * aModel.scale; + double brdz = aModel.board_thickness / 2.0 + - ( Millimeter2iu( ART_OFFSET / 2.0 ) ) * aModel.scale; write_triangle_bag( output_file, aModel.GetColor( VRML_COLOR_PCB ), - &aModel.board, false, false, brdz, -brdz ); + &aModel.board, false, false, brdz, -brdz, aModel.precision ); // VRML_LAYER top_copper; aModel.top_copper.Tesselate( &aModel.holes ); write_triangle_bag( output_file, aModel.GetColor( VRML_COLOR_TRACK ), &aModel.top_copper, true, true, - aModel.GetLayerZ( LAST_COPPER_LAYER ), 0 ); + aModel.GetLayerZ( LAST_COPPER_LAYER ), 0, aModel.precision ); // VRML_LAYER top_tin; aModel.top_tin.Tesselate( &aModel.holes ); write_triangle_bag( output_file, aModel.GetColor( VRML_COLOR_TIN ), - &aModel.top_tin, true, true, - aModel.GetLayerZ( LAST_COPPER_LAYER ), 0 ); + &aModel.top_tin, true, true, + aModel.GetLayerZ( LAST_COPPER_LAYER ) + + Millimeter2iu( ART_OFFSET / 2.0 ) * aModel.scale, + 0, aModel.precision ); // VRML_LAYER bot_copper; aModel.bot_copper.Tesselate( &aModel.holes ); write_triangle_bag( output_file, aModel.GetColor( VRML_COLOR_TRACK ), &aModel.bot_copper, true, false, - aModel.GetLayerZ( FIRST_COPPER_LAYER ), 0 ); + aModel.GetLayerZ( FIRST_COPPER_LAYER ), 0, aModel.precision ); // VRML_LAYER bot_tin; aModel.bot_tin.Tesselate( &aModel.holes ); write_triangle_bag( output_file, aModel.GetColor( VRML_COLOR_TIN ), &aModel.bot_tin, true, false, - aModel.GetLayerZ( FIRST_COPPER_LAYER ), 0 ); + aModel.GetLayerZ( FIRST_COPPER_LAYER ) + - Millimeter2iu( ART_OFFSET / 2.0 ) * aModel.scale, + 0, aModel.precision ); // VRML_LAYER top_silk; aModel.top_silk.Tesselate( &aModel.holes ); write_triangle_bag( output_file, aModel.GetColor( VRML_COLOR_SILK ), &aModel.top_silk, true, true, - aModel.GetLayerZ( SILKSCREEN_N_FRONT ), 0 ); + aModel.GetLayerZ( SILKSCREEN_N_FRONT ), 0, aModel.precision ); // VRML_LAYER bot_silk; aModel.bot_silk.Tesselate( &aModel.holes ); write_triangle_bag( output_file, aModel.GetColor( VRML_COLOR_SILK ), &aModel.bot_silk, true, false, - aModel.GetLayerZ( SILKSCREEN_N_BACK ), 0 ); + aModel.GetLayerZ( SILKSCREEN_N_BACK ), 0, aModel.precision ); } @@ -454,7 +488,7 @@ static void compute_layer_Zs( MODEL_VRML& aModel, BOARD* pcb ) /* To avoid rounding interference, we apply an epsilon to each * successive layer */ - double epsilon_z = Millimeter2iu( 0.02 ) * aModel.scale; + double epsilon_z = Millimeter2iu( ART_OFFSET ) * aModel.scale; aModel.SetLayerZ( SOLDERPASTE_N_BACK, -half_thickness - epsilon_z * 4 ); aModel.SetLayerZ( ADHESIVE_N_BACK, -half_thickness - epsilon_z * 3 ); aModel.SetLayerZ( SILKSCREEN_N_BACK, -half_thickness - epsilon_z * 2 ); @@ -477,18 +511,22 @@ static void export_vrml_line( MODEL_VRML& aModel, LAYER_NUM layer, { VRML_LAYER* vlayer; - if( !VRMLEXPORT::GetLayer( aModel, layer, &vlayer ) ) + if( !GetLayer( aModel, layer, &vlayer ) ) return; + if( width < aModel.minLineWidth) + width = aModel.minLineWidth; + starty = -starty; endy = -endy; - double angle = atan2( endy - starty, endx - startx ); + double angle = atan2( endy - starty, endx - startx ) * 180.0 / M_PI; double length = Distance( startx, starty, endx, endy ) + width; double cx = ( startx + endx ) / 2.0; double cy = ( starty + endy ) / 2.0; - vlayer->AddSlot( cx, cy, length, width, angle, 1, false ); + if( !vlayer->AddSlot( cx, cy, length, width, angle, false ) ) + throw( std::runtime_error( vlayer->GetError() ) ); } @@ -498,9 +536,12 @@ static void export_vrml_circle( MODEL_VRML& aModel, LAYER_NUM layer, { VRML_LAYER* vlayer; - if( !VRMLEXPORT::GetLayer( aModel, layer, &vlayer ) ) + if( !GetLayer( aModel, layer, &vlayer ) ) return; + if( width < aModel.minLineWidth ) + width = aModel.minLineWidth; + starty = -starty; endy = -endy; @@ -509,11 +550,13 @@ static void export_vrml_circle( MODEL_VRML& aModel, LAYER_NUM layer, radius = Distance( startx, starty, endx, endy ) + ( width / 2); hole = radius - width; - vlayer->AddCircle( startx, starty, radius, 1, false ); + if( !vlayer->AddCircle( startx, starty, radius, false ) ) + throw( std::runtime_error( vlayer->GetError() ) ); if( hole > 0.0001 ) { - vlayer->AddCircle( startx, starty, hole, 1, true ); + if( !vlayer->AddCircle( startx, starty, hole, true ) ) + throw( std::runtime_error( vlayer->GetError() ) ); } } @@ -525,16 +568,19 @@ static void export_vrml_arc( MODEL_VRML& aModel, LAYER_NUM layer, { VRML_LAYER* vlayer; - if( !VRMLEXPORT::GetLayer( aModel, layer, &vlayer ) ) + if( !GetLayer( aModel, layer, &vlayer ) ) return; + if( width < aModel.minLineWidth ) + width = aModel.minLineWidth; + centery = -centery; arc_starty = -arc_starty; - arc_angle *= -M_PI / 180; + if( !vlayer->AddArc( centerx, centery, arc_startx, arc_starty, + width, arc_angle, false ) ) + throw( std::runtime_error( vlayer->GetError() ) ); - vlayer->AddArc( centerx, centery, arc_startx, arc_starty, - width, arc_angle, 1, false ); } @@ -577,13 +623,13 @@ static void export_vrml_drawsegment( MODEL_VRML& aModel, DRAWSEGMENT* drawseg ) * for coupling the vrml_text_callback with the common parameters */ static void vrml_text_callback( int x0, int y0, int xf, int yf ) { - LAYER_NUM s_text_layer = VRMLEXPORT::model_vrml->s_text_layer; - int s_text_width = VRMLEXPORT::model_vrml->s_text_width; - double scale = VRMLEXPORT::model_vrml->scale; - double tx = VRMLEXPORT::model_vrml->tx; - double ty = VRMLEXPORT::model_vrml->ty; + LAYER_NUM s_text_layer = model_vrml->s_text_layer; + int s_text_width = model_vrml->s_text_width; + double scale = model_vrml->scale; + double tx = model_vrml->tx; + double ty = model_vrml->ty; - export_vrml_line( *VRMLEXPORT::model_vrml, s_text_layer, + export_vrml_line( *model_vrml, s_text_layer, x0 * scale + tx, y0 * scale + ty, xf * scale + tx, yf * scale + ty, s_text_width * scale ); @@ -592,8 +638,8 @@ static void vrml_text_callback( int x0, int y0, int xf, int yf ) static void export_vrml_pcbtext( MODEL_VRML& aModel, TEXTE_PCB* text ) { - VRMLEXPORT::model_vrml->s_text_layer = text->GetLayer(); - VRMLEXPORT::model_vrml->s_text_width = text->GetThickness(); + model_vrml->s_text_layer = text->GetLayer(); + model_vrml->s_text_width = text->GetThickness(); wxSize size = text->GetSize(); @@ -707,12 +753,12 @@ static void export_vrml_board( MODEL_VRML& aModel, BOARD* pcb ) while( i < nvert ) { - aModel.board.AddVertex( seg, bufferPcbOutlines[i].x * scale + dx, - -(bufferPcbOutlines[i].y * scale + dy) ); - if( bufferPcbOutlines[i].end_contour ) break; + aModel.board.AddVertex( seg, bufferPcbOutlines[i].x * scale + dx, + -(bufferPcbOutlines[i].y * scale + dy) ); + ++i; } @@ -739,12 +785,12 @@ static void export_vrml_board( MODEL_VRML& aModel, BOARD* pcb ) while( i < nvert ) { - aModel.holes.AddVertex( seg, allLayerHoles[i].x * scale + dx, - -(allLayerHoles[i].y * scale + dy) ); - if( allLayerHoles[i].end_contour ) break; + aModel.holes.AddVertex( seg, allLayerHoles[i].x * scale + dx, + -(allLayerHoles[i].y * scale + dy) ); + ++i; } @@ -766,31 +812,26 @@ static void export_round_padstack( MODEL_VRML& aModel, BOARD* pcb, if( top_layer != LAST_COPPER_LAYER || bottom_layer != FIRST_COPPER_LAYER ) thru = false; + if( thru && hole > 0 ) + aModel.holes.AddCircle( x, -y, hole, true ); + while( 1 ) { if( layer == FIRST_COPPER_LAYER ) { - aModel.bot_copper.AddCircle( x, -y, r, 1 ); + aModel.bot_copper.AddCircle( x, -y, r ); + + if( hole > 0 && !thru ) + aModel.bot_copper.AddCircle( x, -y, hole, true ); - if( hole > 0 ) - { - if( thru ) - aModel.holes.AddCircle( x, -y, hole, 1, true ); - else - aModel.bot_copper.AddCircle( x, -y, hole, 1, true ); - } } else if( layer == LAST_COPPER_LAYER ) { - aModel.top_copper.AddCircle( x, -y, r, 1 ); + aModel.top_copper.AddCircle( x, -y, r ); + + if( hole > 0 && !thru ) + aModel.top_copper.AddCircle( x, -y, hole, true ); - if( hole > 0 ) - { - if( thru ) - aModel.holes.AddCircle( x, -y, hole, 1, true ); - else - aModel.top_copper.AddCircle( x, -y, hole, 1, true ); - } } if( layer == bottom_layer ) @@ -856,7 +897,7 @@ static void export_vrml_zones( MODEL_VRML& aModel, BOARD* aPcb ) VRML_LAYER* vl; - if( !VRMLEXPORT::GetLayer( aModel, zone->GetLayer(), &vl ) ) + if( !GetLayer( aModel, zone->GetLayer(), &vl ) ) continue; if( !zone->IsFilled() ) @@ -881,11 +922,13 @@ static void export_vrml_zones( MODEL_VRML& aModel, BOARD* aPcb ) { x = poly.GetX(i) * scale + dx; y = -(poly.GetY(i) * scale + dy); - vl->AddVertex( seg, x, y ); if( poly.IsEndContour(i) ) break; + if( !vl->AddVertex( seg, x, y ) ) + throw( std::runtime_error( vl->GetError() ) ); + ++i; } @@ -911,8 +954,8 @@ static void export_vrml_text_module( TEXTE_MODULE* module ) if( module->IsMirrored() ) NEGATE( size.x ); // Text is mirrored - VRMLEXPORT::model_vrml->s_text_layer = module->GetLayer(); - VRMLEXPORT::model_vrml->s_text_width = module->GetThickness(); + model_vrml->s_text_layer = module->GetLayer(); + model_vrml->s_text_width = module->GetThickness(); DrawGraphicText( NULL, NULL, module->GetTextPosition(), BLACK, module->GetText(), module->GetDrawRotation(), size, @@ -952,10 +995,10 @@ static void export_vrml_edge_module( MODEL_VRML& aModel, EDGE_MODULE* aOutline, { VRML_LAYER* vl; - if( !VRMLEXPORT::GetLayer( aModel, layer, &vl ) ) + if( !GetLayer( aModel, layer, &vl ) ) break; - int nvert = aOutline->GetPolyPoints().size(); + int nvert = aOutline->GetPolyPoints().size() - 1; int i = 0; if( nvert < 3 ) break; @@ -974,7 +1017,9 @@ static void export_vrml_edge_module( MODEL_VRML& aModel, EDGE_MODULE* aOutline, x = corner.x * aModel.scale + aModel.tx; y = - ( corner.y * aModel.scale + aModel.ty ); - vl->AddVertex( seg, x, y ); + + if( !vl->AddVertex( seg, x, y ) ) + throw( std::runtime_error( vl->GetError() ) ); ++i; } @@ -988,8 +1033,7 @@ static void export_vrml_edge_module( MODEL_VRML& aModel, EDGE_MODULE* aOutline, } -static void export_vrml_padshape( MODEL_VRML& aModel, VRML_LAYER* aLayer, - VRML_LAYER* aTinLayer, D_PAD* aPad ) +static void export_vrml_padshape( MODEL_VRML& aModel, VRML_LAYER* aTinLayer, D_PAD* aPad ) { // The (maybe offset) pad position wxPoint pad_pos = aPad->ShapePos(); @@ -1006,15 +1050,18 @@ static void export_vrml_padshape( MODEL_VRML& aModel, VRML_LAYER* aLayer, switch( aPad->GetShape() ) { case PAD_CIRCLE: - aLayer->AddCircle( pad_x, -pad_y, pad_w, 1, true ); - aTinLayer->AddCircle( pad_x, -pad_y, pad_w, 1, false ); + + if( !aTinLayer->AddCircle( pad_x, -pad_y, pad_w, false ) ) + throw( std::runtime_error( aTinLayer->GetError() ) ); + break; case PAD_OVAL: - aLayer->AddSlot( pad_x, -pad_y, pad_w * 2.0, pad_h * 2.0, - DECIDEG2RAD( aPad->GetOrientation() ), 1, true ); - aTinLayer->AddSlot( pad_x, -pad_y, pad_w * 2.0, pad_h * 2.0, - DECIDEG2RAD( aPad->GetOrientation() ), 1, false ); + + if( !aTinLayer->AddSlot( pad_x, -pad_y, pad_w * 2.0, pad_h * 2.0, + aPad->GetOrientation()/10.0, false ) ) + throw( std::runtime_error( aTinLayer->GetError() ) ); + break; case PAD_RECT: @@ -1039,32 +1086,32 @@ static void export_vrml_padshape( MODEL_VRML& aModel, VRML_LAYER* aLayer, coord[i * 2 + 1] += pad_y; } - int lines = aLayer->NewContour(); - - if( lines < 0 ) - return; - - aLayer->AddVertex( lines, coord[2], -coord[3] ); - aLayer->AddVertex( lines, coord[6], -coord[7] ); - aLayer->AddVertex( lines, coord[4], -coord[5] ); - aLayer->AddVertex( lines, coord[0], -coord[1] ); - aLayer->EnsureWinding( lines, true ); + int lines; lines = aTinLayer->NewContour(); if( lines < 0 ) - return; + throw( std::runtime_error( aTinLayer->GetError() ) ); - aTinLayer->AddVertex( lines, coord[0], -coord[1] ); - aTinLayer->AddVertex( lines, coord[4], -coord[5] ); - aTinLayer->AddVertex( lines, coord[6], -coord[7] ); - aTinLayer->AddVertex( lines, coord[2], -coord[3] ); - aTinLayer->EnsureWinding( lines, false ); + if( !aTinLayer->AddVertex( lines, coord[0], -coord[1] ) ) + throw( std::runtime_error( aTinLayer->GetError() ) ); + + if( !aTinLayer->AddVertex( lines, coord[4], -coord[5] ) ) + throw( std::runtime_error( aTinLayer->GetError() ) ); + + if( !aTinLayer->AddVertex( lines, coord[6], -coord[7] ) ) + throw( std::runtime_error( aTinLayer->GetError() ) ); + + if( !aTinLayer->AddVertex( lines, coord[2], -coord[3] ) ) + throw( std::runtime_error( aTinLayer->GetError() ) ); + + if( !aTinLayer->EnsureWinding( lines, false ) ) + throw( std::runtime_error( aTinLayer->GetError() ) ); } break; default: - ; + break; } } @@ -1084,12 +1131,12 @@ static void export_vrml_pad( MODEL_VRML& aModel, BOARD* pcb, D_PAD* aPad ) { // Oblong hole (slot) aModel.holes.AddSlot( hole_x, -hole_y, hole_drill_w * 2.0, hole_drill_h * 2.0, - DECIDEG2RAD( aPad->GetOrientation() ), 1, true ); + aPad->GetOrientation()/10.0, true ); } else { // Drill a round hole - aModel.holes.AddCircle( hole_x, -hole_y, hole_drill, 1, true ); + aModel.holes.AddCircle( hole_x, -hole_y, hole_drill, true ); } } @@ -1098,12 +1145,12 @@ static void export_vrml_pad( MODEL_VRML& aModel, BOARD* pcb, D_PAD* aPad ) if( layer_mask & LAYER_BACK ) { - export_vrml_padshape( aModel, &aModel.bot_copper, &aModel.bot_tin, aPad ); + export_vrml_padshape( aModel, &aModel.bot_tin, aPad ); } if( layer_mask & LAYER_FRONT ) { - export_vrml_padshape( aModel, &aModel.top_copper, &aModel.top_tin, aPad ); + export_vrml_padshape( aModel, &aModel.top_tin, aPad ); } } @@ -1150,7 +1197,7 @@ static void compose_quat( double q1[4], double q2[4], double qr[4] ) static void export_vrml_module( MODEL_VRML& aModel, BOARD* aPcb, MODULE* aModule, - FILE* aOutputFile, + std::ofstream& aOutputFile, double aVRMLModelsToBiu, bool aExport3DFiles, const wxString& a3D_Subdir ) { @@ -1237,12 +1284,13 @@ static void export_vrml_module( MODEL_VRML& aModel, BOARD* aPcb, MODULE* aModule compose_quat( q1, q2, q1 ); from_quat( q1, rot ); - fprintf( aOutputFile, "Transform {\n" ); + aOutputFile << "Transform {\n"; // A null rotation would fail the acos! if( rot[3] != 0.0 ) { - fprintf( aOutputFile, " rotation %g %g %g %g\n", rot[0], rot[1], rot[2], rot[3] ); + aOutputFile << " rotation " << std::setprecision( 3 ); + aOutputFile << rot[0] << " " << rot[1] << " " << rot[2] << " " << rot[3] << "\n"; } // adjust 3D shape local offset position @@ -1258,15 +1306,15 @@ static void export_vrml_module( MODEL_VRML& aModel, BOARD* aPcb, MODULE* aModule RotatePoint( &offsetx, &offsety, aModule->GetOrientation() ); - fprintf( aOutputFile, " translation %g %g %g\n", - (offsetx + aModule->GetPosition().x) * aModel.scale + aModel.tx, - -(offsety + aModule->GetPosition().y) * aModel.scale - aModel.ty, - (offsetz * aModel.scale ) + aModel.GetLayerZ( aModule->GetLayer() ) ); + aOutputFile << " translation " << std::setprecision( aModel.precision ); + aOutputFile << (( offsetx + aModule->GetPosition().x) * aModel.scale + aModel.tx ) << " "; + aOutputFile << ( -(offsety + aModule->GetPosition().y) * aModel.scale - aModel.ty ) << " "; + aOutputFile << ( (offsetz * aModel.scale ) + aModel.GetLayerZ( aModule->GetLayer() ) ) << "\n"; - fprintf( aOutputFile, " scale %g %g %g\n", - vrmlm->m_MatScale.x * aVRMLModelsToBiu, - vrmlm->m_MatScale.y * aVRMLModelsToBiu, - vrmlm->m_MatScale.z * aVRMLModelsToBiu ); + aOutputFile << " scale "; + aOutputFile << ( vrmlm->m_MatScale.x * aVRMLModelsToBiu ) << " "; + aOutputFile << ( vrmlm->m_MatScale.y * aVRMLModelsToBiu ) << " "; + aOutputFile << ( vrmlm->m_MatScale.z * aVRMLModelsToBiu ) << "\n"; if( fname.EndsWith( wxT( "x3d" ) ) ) { @@ -1276,18 +1324,25 @@ static void export_vrml_module( MODEL_VRML& aModel, BOARD* aPcb, MODULE* aModule { // embed x3d model in vrml format parser->Load( fname ); - fprintf( aOutputFile, - " children [\n %s ]\n", TO_UTF8( parser->VRML_representation() ) ); - fprintf( aOutputFile, " }\n" ); - delete parser; + + try + { + aOutputFile << " children [\n "; + aOutputFile << TO_UTF8( parser->VRML_representation() ) << " ]\n"; + aOutputFile << " }\n"; + } + catch( const std::exception& e ) + { + delete parser; + throw; + } } } else { - fprintf( aOutputFile, - " children [\n Inline {\n url \"%s\"\n } ]\n", - TO_UTF8( fname ) ); - fprintf( aOutputFile, " }\n" ); + aOutputFile << " children [\n Inline {\n url \""; + aOutputFile << TO_UTF8( fname ) << "\"\n } ]\n"; + aOutputFile << " }\n"; } } } @@ -1297,89 +1352,98 @@ bool PCB_EDIT_FRAME::ExportVRML_File( const wxString& aFullFileName, double aMMtoWRMLunit, bool aExport3DFiles, const wxString& a3D_Subdir ) { - wxString msg; - FILE* output_file; - BOARD* pcb = GetBoard(); + wxString msg; + BOARD* pcb = GetBoard(); + bool ok = true; MODEL_VRML model3d; - VRMLEXPORT::model_vrml = &model3d; + model_vrml = &model3d; + std::ofstream output_file; - output_file = wxFopen( aFullFileName, wxT( "wt" ) ); + try + { + output_file.exceptions( std::ofstream::failbit ); + output_file.open( TO_UTF8( aFullFileName ), std::ios_base::out ); - if( output_file == NULL ) - return false; + // Switch the locale to standard C (needed to print floating point numbers like 1.3) + SetLocaleTo_C_standard(); - // Switch the locale to standard C (needed to print floating point numbers like 1.3) - SetLocaleTo_C_standard(); + // Begin with the usual VRML boilerplate + wxString name = aFullFileName; - // Begin with the usual VRML boilerplate - wxString name = aFullFileName; + name.Replace( wxT( "\\" ), wxT( "/" ) ); + ChangeIllegalCharacters( name, false ); - name.Replace( wxT( "\\" ), wxT( "/" ) ); - ChangeIllegalCharacters( name, false ); - fprintf( output_file, "#VRML V2.0 utf8\n" - "WorldInfo {\n" - " title \"%s - Generated by Pcbnew\"\n" - "}\n", TO_UTF8( name ) ); + output_file << "#VRML V2.0 utf8\n"; + output_file << "WorldInfo {\n"; + output_file << " title \"" << TO_UTF8( name ) << " - Generated by Pcbnew\"\n"; + output_file << "}\n"; - // Global VRML scale to export to a different scale. - model3d.scale = aMMtoWRMLunit / MM_PER_IU; + // Set the VRML world scale factor + model3d.SetScale( aMMtoWRMLunit ); - // Set the mechanical deviation limit (in this case 0.02mm) - // XXX - NOTE: the value should be set via the GUI - model3d.SetMaxDev( 20000 * model3d.scale ); + output_file << "Transform {\n"; - fprintf( output_file, "Transform {\n" ); + // compute the offset to center the board on (0, 0, 0) + // XXX - NOTE: we should allow the user a GUI option to specify the offset + EDA_RECT bbbox = pcb->ComputeBoundingBox(); - // compute the offset to center the board on (0, 0, 0) - // XXX - NOTE: we should allow the user a GUI option to specify the offset - EDA_RECT bbbox = pcb->ComputeBoundingBox(); + model3d.SetOffset( -model3d.scale * bbbox.Centre().x, + -model3d.scale * bbbox.Centre().y ); - model3d.SetOffset( -model3d.scale * bbbox.Centre().x, -model3d.scale * bbbox.Centre().y ); + output_file << " children [\n"; - fprintf( output_file, " children [\n" ); + // Preliminary computation: the z value for each layer + compute_layer_Zs( model3d, pcb ); - // Preliminary computation: the z value for each layer - compute_layer_Zs( model3d, pcb ); + // board edges and cutouts + export_vrml_board( model3d, pcb ); - // board edges and cutouts - export_vrml_board( model3d, pcb ); + // Drawing and text on the board + export_vrml_drawings( model3d, pcb ); - // Drawing and text on the board - export_vrml_drawings( model3d, pcb ); + // Export vias and trackage + export_vrml_tracks( model3d, pcb ); - // Export vias and trackage - export_vrml_tracks( model3d, pcb ); + // Export zone fills + export_vrml_zones( model3d, pcb); - // Export zone fills - export_vrml_zones( model3d, pcb); + /* scaling factor to convert 3D models to board units (decimils) + * Usually we use Wings3D to create thems. + * One can consider the 3D units is 0.1 inch (2.54 mm) + * So the scaling factor from 0.1 inch to board units + * is 2.54 * aMMtoWRMLunit + */ + double wrml_3D_models_scaling_factor = 2.54 * aMMtoWRMLunit; - /* scaling factor to convert 3D models to board units (decimils) - * Usually we use Wings3D to create thems. - * One can consider the 3D units is 0.1 inch (2.54 mm) - * So the scaling factor from 0.1 inch to board units - * is 2.54 * aMMtoWRMLunit - */ - double wrml_3D_models_scaling_factor = 2.54 * aMMtoWRMLunit; + // Export footprints + for( MODULE* module = pcb->m_Modules; module != 0; module = module->Next() ) + export_vrml_module( model3d, pcb, module, output_file, + wrml_3D_models_scaling_factor, + aExport3DFiles, a3D_Subdir ); - // Export footprints - for( MODULE* module = pcb->m_Modules; module != 0; module = module->Next() ) - export_vrml_module( model3d, pcb, module, output_file, - wrml_3D_models_scaling_factor, - aExport3DFiles, a3D_Subdir ); + // write out the board and all layers + write_layers( model3d, output_file, pcb ); - // write out the board and all layers - write_layers( model3d, output_file, pcb ); + // Close the outer 'transform' node + output_file << "]\n}\n"; + } + catch( const std::exception& e ) + { + wxString msg; + msg << _( "IDF Export Failed:\n" ) << FROM_UTF8( e.what() ); + wxMessageBox( msg ); - // Close the outer 'transform' node - fputs( "]\n}\n", output_file ); + ok = false; + } // End of work - fclose( output_file ); + output_file.exceptions( std::ios_base::goodbit ); + output_file.close(); SetLocaleTo_Default(); // revert to the current locale - return true; + return ok; } diff --git a/pcbnew/exporters/vrml_board.cpp b/pcbnew/exporters/vrml_board.cpp deleted file mode 100644 index e8b13de36b..0000000000 --- a/pcbnew/exporters/vrml_board.cpp +++ /dev/null @@ -1,1501 +0,0 @@ -/* - * file: vrml_board.cpp - * - * This program source code file is part of KiCad, a free EDA CAD application. - * - * Copyright (C) 2013 Cirilo Bernardo - * - * 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 - */ - -/* - * NOTES ON OUTPUT PRECISION: - * - * If we use %.6f then we have no need for special unit dependent formatting: - * - * inch: .0254 microns - * mm: 0.001 microns - * m: 1 micron - * - */ - - -#include -#include -#include -#include -#include -#include - -#ifndef CALLBACK -#define CALLBACK -#endif - -#define GLCALLBACK(x) (( void (CALLBACK*)() )&(x)) - -void FormatDoublet( double x, double y, int precision, std::string& strx, std::string& stry ) -{ - std::ostringstream ostr; - - ostr << std::fixed << std::setprecision( precision ); - - ostr << x; - strx = ostr.str(); - - ostr.str( "" ); - ostr << y; - stry = ostr.str(); - - while( *strx.rbegin() == '0' ) - strx.erase( strx.size() - 1 ); - - while( *stry.rbegin() == '0' ) - stry.erase( stry.size() - 1 ); -} - - -void FormatSinglet( double x, int precision, std::string& strx ) -{ - std::ostringstream ostr; - - ostr << std::fixed << std::setprecision( precision ); - - ostr << x; - strx = ostr.str(); - - while( *strx.rbegin() == '0' ) - strx.erase( strx.size() - 1 ); -} - - -int CalcNSides( double rad, double dev ) -{ - if( dev <= 0 || rad <= 0 ) - return 6; - - int csides; - double n = dev / rad; - - // note: in the following, the first comparison and csides is chosen to - // yield a maximum of 360 segments; in practice we probably want a smaller limit. - if( n < 0.0001523048 ) - csides = 360; - else if( n >= 0.5 ) // 0.5 yields an angle >= 60 deg. (6 or fewer sides) - csides = 6; - else - csides = M_PI * 2.0 / acos( 1.0 - n ) + 1; - - if( csides < 6 ) - csides = 6; - - return csides; -} - - -static void CALLBACK vrml_tess_begin( GLenum cmd, void* user_data ) -{ - VRML_LAYER* lp = (VRML_LAYER*) user_data; - - lp->glStart( cmd ); -} - - -static void CALLBACK vrml_tess_end( void* user_data ) -{ - VRML_LAYER* lp = (VRML_LAYER*) user_data; - - lp->glEnd(); -} - - -static void CALLBACK vrml_tess_vertex( void* vertex_data, void* user_data ) -{ - VRML_LAYER* lp = (VRML_LAYER*) user_data; - - lp->glPushVertex( (VERTEX_3D*) vertex_data ); -} - - -static void CALLBACK vrml_tess_err( GLenum errorID, void* user_data ) -{ - VRML_LAYER* lp = (VRML_LAYER*) user_data; - - lp->Fault = true; - lp->SetGLError( errorID ); -} - - -static void CALLBACK vrml_tess_combine( GLdouble coords[3], void* vertex_data[4], - GLfloat weight[4], void** outData, void* user_data ) -{ - VRML_LAYER* lp = (VRML_LAYER*) user_data; - - *outData = lp->AddExtraVertex( coords[0], coords[1] ); -} - - -VRML_LAYER::VRML_LAYER() -{ - fix = false; - Fault = false; - idx = 0; - ord = 0; - glcmd = 0; - pholes = NULL; - maxdev = 0.02; - - tess = gluNewTess(); - - if( !tess ) - return; - - // set up the tesselator callbacks - gluTessCallback( tess, GLU_TESS_BEGIN_DATA, GLCALLBACK( vrml_tess_begin ) ); - - gluTessCallback( tess, GLU_TESS_VERTEX_DATA, GLCALLBACK( vrml_tess_vertex ) ); - - gluTessCallback( tess, GLU_TESS_END_DATA, GLCALLBACK( vrml_tess_end ) ); - - gluTessCallback( tess, GLU_TESS_ERROR_DATA, GLCALLBACK( vrml_tess_err ) ); - - gluTessCallback( tess, GLU_TESS_COMBINE_DATA, GLCALLBACK( vrml_tess_combine ) ); - - gluTessProperty( tess, GLU_TESS_WINDING_RULE, GLU_TESS_WINDING_POSITIVE ); - - gluTessNormal( tess, 0, 0, 1 ); -} - - -VRML_LAYER::~VRML_LAYER() -{ - Clear(); - - if( tess ) - { - gluDeleteTess( tess ); - tess = NULL; - } -} - - -// clear all data -void VRML_LAYER::Clear( void ) -{ - int i; - - fix = false; - idx = 0; - - for( i = contours.size(); i > 0; --i ) - { - delete contours.back(); - contours.pop_back(); - } - - while( !areas.empty() ) - areas.pop_back(); - - for( i = vertices.size(); i > 0; --i ) - { - delete vertices.back(); - vertices.pop_back(); - } - - clearTmp(); -} - - -// set the max. deviation of an arc segment -bool VRML_LAYER::SetMaxDev( double max ) -{ - // assure max. dev > 2 microns regardless of the - // prevailing units ( inch, mm, m, 0.1 inch ) - if( max < 0.000002 ) - { - error = "SetMaxDev(): specified value is < 0.000002"; - return false; - } - - maxdev = max; - - return true; -} - - -// clear ephemeral data in between invocations of the tesselation routine -void VRML_LAYER::clearTmp( void ) -{ - unsigned int i; - - Fault = false; - hidx = 0; - eidx = 0; - ord = 0; - glcmd = 0; - - while( !triplets.empty() ) - triplets.pop_back(); - - for( i = outline.size(); i > 0; --i ) - { - delete outline.back(); - outline.pop_back(); - } - - for( i = ordmap.size(); i > 0; --i ) - ordmap.pop_back(); - - for( i = extra_verts.size(); i > 0; --i ) - { - delete extra_verts.back(); - extra_verts.pop_back(); - } - - // note: unlike outline and extra_verts, - // vlist is not responsible for memory management - for( i = vlist.size(); i > 0; --i ) - vlist.pop_back(); - - // go through the vertex list and reset ephemeral parameters - for( i = 0; i < vertices.size(); ++i ) - { - vertices[i]->o = -1; - } -} - - -// create a new contour to be populated; returns an index -// into the contour list or -1 if there are problems -int VRML_LAYER::NewContour( void ) -{ - if( fix ) - return -1; - - std::list* contour = new std::list; - - if( !contour ) - return -1; - - contours.push_back( contour ); - areas.push_back( 0.0 ); - - return contours.size() - 1; -} - - -// adds a vertex to the existing list and places its index in -// an existing contour; returns true if OK, -// false otherwise (indexed contour does not exist) -bool VRML_LAYER::AddVertex( int aContour, double x, double y ) -{ - if( fix ) - { - error = "AddVertex(): no more vertices may be added (Tesselate was previously executed)"; - return false; - } - - if( aContour < 0 || (unsigned int) aContour >= contours.size() ) - { - error = "AddVertex(): aContour is not within a valid range"; - return false; - } - - VERTEX_3D* vertex = new VERTEX_3D; - - if( !vertex ) - { - error = "AddVertex(): a new vertex could not be allocated"; - return false; - } - - vertex->x = x; - vertex->y = y; - vertex->i = idx++; - vertex->o = -1; - - VERTEX_3D* v2 = NULL; - - if( contours[aContour]->size() > 0 ) - v2 = vertices[ contours[aContour]->back() ]; - - vertices.push_back( vertex ); - contours[aContour]->push_back( vertex->i ); - - if( v2 ) - areas[aContour] += ( x - v2->x ) * ( y + v2->y ); - - return true; -} - - -// ensure the winding of a contour with respect to the normal (0, 0, 1); -// set 'hole' to true to ensure a hole (clockwise winding) -bool VRML_LAYER::EnsureWinding( int aContour, bool hole ) -{ - if( aContour < 0 || (unsigned int) aContour >= contours.size() ) - { - error = "EnsureWinding(): aContour is outside the valid range"; - return false; - } - - std::list* cp = contours[aContour]; - - if( cp->size() < 3 ) - { - error = "EnsureWinding(): there are fewer than 3 vertices"; - return false; - } - - double dir = areas[aContour]; - - VERTEX_3D* vp0 = vertices[ cp->back() ]; - VERTEX_3D* vp1 = vertices[ cp->front() ]; - - dir += ( vp1->x - vp0->x ) * ( vp1->y + vp0->y ); - - // if dir is positive, winding is CW - if( ( hole && dir < 0 ) || ( !hole && dir > 0 ) ) - { - cp->reverse(); - areas[aContour] = -areas[aContour]; - } - - return true; -} - - -// adds a circle the existing list; if 'hole' is true the contour is -// a hole. Returns true if OK. -bool VRML_LAYER::AddCircle( double x, double y, double rad, int csides, bool hole ) -{ - int pad = NewContour(); - - if( pad < 0 ) - { - error = "AddCircle(): failed to add a contour"; - return false; - } - - if( csides < 6 ) - csides = CalcNSides( rad, maxdev ); - - // even numbers give prettier results - if( csides & 1 ) - csides += 1; - - double da = M_PI * 2.0 / csides; - - bool fail = false; - - if( hole ) - { - for( double angle = 0; angle < M_PI * 2; angle += da ) - fail |= !AddVertex( pad, x + rad * cos( angle ), y - rad * sin( angle ) ); - } - else - { - for( double angle = 0; angle < M_PI * 2; angle += da ) - fail |= !AddVertex( pad, x + rad * cos( angle ), y + rad * sin( angle ) ); - } - - return !fail; -} - - -// adds a slotted pad with orientation given by angle; if 'hole' is true the -// contour is a hole. Returns true if OK. -bool VRML_LAYER::AddSlot( double cx, double cy, double length, double width, - double angle, int csides, bool hole ) -{ - if( width > length ) - { - angle += M_PI2; - std::swap( length, width ); - } - - width /= 2.0; - length = length / 2.0 - width; - - if( csides < 6 ) - csides = CalcNSides( width, maxdev ); - - if( csides & 1 ) - csides += 1; - - csides /= 2; - - double capx, capy; - - capx = cx + cos( angle ) * length; - capy = cy + sin( angle ) * length; - - double ang, da; - int i; - int pad = NewContour(); - - if( pad < 0 ) - { - error = "AddCircle(): failed to add a contour"; - return false; - } - - da = M_PI / csides; - bool fail = false; - - if( hole ) - { - for( ang = angle + M_PI2, i = 0; i < csides; ang -= da, ++i ) - fail |= !AddVertex( pad, capx + width * cos( ang ), capy + width * sin( ang ) ); - - ang = angle - M_PI2; - fail |= !AddVertex( pad, capx + width * cos( ang ), capy + width * sin( ang ) ); - - capx = cx - cos( angle ) * length; - capy = cy - sin( angle ) * length; - - for( ang = angle - M_PI2, i = 0; i < csides; ang -= da, ++i ) - fail |= !AddVertex( pad, capx + width * cos( ang ), capy + width * sin( ang ) ); - - ang = angle + M_PI2; - fail |= !AddVertex( pad, capx + width * cos( ang ), capy + width * sin( ang ) ); - } - else - { - for( ang = angle - M_PI2, i = 0; i < csides; ang += da, ++i ) - fail |= !AddVertex( pad, capx + width * cos( ang ), capy + width * sin( ang ) ); - - ang = angle + M_PI2; - fail |= !AddVertex( pad, capx + width * cos( ang ), capy + width * sin( ang ) ); - - capx = cx - cos( angle ) * length; - capy = cy - sin( angle ) * length; - - for( ang = angle + M_PI2, i = 0; i < csides; ang += da, ++i ) - fail |= !AddVertex( pad, capx + width * cos( ang ), capy + width * sin( ang ) ); - - ang = angle - M_PI2; - fail |= !AddVertex( pad, capx + width * cos( ang ), capy + width * sin( ang ) ); - } - - return !fail; -} - - -// adds an arc with the given center, start point, pen width, and angle. -bool VRML_LAYER::AddArc( double cx, double cy, double startx, double starty, - double width, double angle, int csides, bool hole ) -{ - // we don't accept small angles; in fact, 1 degree ( 0.01745 ) is already - // way too small but we must set a limit somewhere - if( angle < 0.01745 && angle > -0.01745 ) - { - error = "AddArc(): angle is too small: abs( angle ) < 0.01745"; - return false; - } - - double rad = sqrt( (startx - cx) * (startx - cx) + (starty - cy) * (starty - cy) ); - - width /= 2.0; // this is the radius of the caps - - // we will not accept an arc with an inner radius close to zero so we - // set a limit here. the end result will vary somewhat depending on - // the output units - if( width >= ( rad * 1.01 ) ) - { - error = "AddArc(): width/2 exceeds radius*1.01"; - return false; - } - - // calculate the radii of the outer and inner arcs - double orad = rad + width; - double irad = rad - width; - - int osides = csides * angle / ( M_PI * 2.0 ); - int isides = csides * angle / ( M_PI * 2.0 ); - - if( osides < 0 ) - osides = -osides; - - if( osides < 3 ) - { - osides = CalcNSides( orad, maxdev ) * angle / ( M_PI * 2.0 ); - - if( osides < 0 ) - osides = -osides; - - if( osides < 3 ) - osides = 3; - } - - if( isides < 0 ) - isides = -isides; - - if( isides < 3 ) - { - isides = CalcNSides( irad, maxdev ) * angle / ( M_PI * 2.0 ); - - if( isides < 0 ) - isides = -isides; - - if( isides < 3 ) - isides = 3; - } - - if( csides < 6 ) - csides = CalcNSides( width, maxdev ); - - if( csides & 1 ) - csides += 1; - - csides /= 2; - - double stAngle = atan2( starty - cy, startx - cx ); - double endAngle = stAngle + angle; - - // calculate ends of inner and outer arc - double oendx = cx + orad* cos( endAngle ); - double oendy = cy + orad* sin( endAngle ); - double ostx = cx + orad* cos( stAngle ); - double osty = cy + orad* sin( stAngle ); - - double iendx = cx + irad* cos( endAngle ); - double iendy = cy + irad* sin( endAngle ); - double istx = cx + irad* cos( stAngle ); - double isty = cy + irad* sin( stAngle ); - - if( ( angle < 0 && !hole ) || ( angle > 0 && hole ) ) - { - angle = -angle; - std::swap( stAngle, endAngle ); - std::swap( oendx, ostx ); - std::swap( oendy, osty ); - std::swap( iendx, istx ); - std::swap( iendy, isty ); - } - - int arc = NewContour(); - - if( arc < 0 ) - { - error = "AddArc(): could not create a contour"; - return false; - } - - // trace the outer arc: - int i; - double ang; - double da = angle / osides; - - for( ang = stAngle, i = 0; i < osides; ang += da, ++i ) - AddVertex( arc, cx + orad * cos( ang ), cy + orad * sin( ang ) ); - - // trace the first cap - double capx = ( iendx + oendx ) / 2.0; - double capy = ( iendy + oendy ) / 2.0; - - if( hole ) - da = -M_PI / csides; - else - da = M_PI / csides; - - for( ang = endAngle + da, i = 2; i < csides; ang += da, ++i ) - AddVertex( arc, capx + width * cos( ang ), capy + width * sin( ang ) ); - - // trace the inner arc: - da = -angle / isides; - - for( ang = endAngle, i = 0; i < isides; ang += da, ++i ) - AddVertex( arc, cx + irad * cos( ang ), cy + irad * sin( ang ) ); - - // trace the final cap - capx = ( istx + ostx ) / 2.0; - capy = ( isty + osty ) / 2.0; - - if( hole ) - da = -M_PI / csides; - else - da = M_PI / csides; - - for( ang = stAngle + M_PI + da, i = 2; i < csides; ang += da, ++i ) - AddVertex( arc, capx + width * cos( ang ), capy + width * sin( ang ) ); - - return true; -} - - -// tesselates the contours in preparation for a 3D output; -// returns true if all was fine, false otherwise -bool VRML_LAYER::Tesselate( VRML_LAYER* holes ) -{ - if( !tess ) - { - error = "Tesselate(): GLU tesselator was not initialized"; - return false; - } - - pholes = holes; - Fault = false; - - if( contours.size() < 1 || vertices.size() < 3 ) - { - error = "Tesselate(): not enough vertices"; - return false; - } - - // finish the winding calculation on all vertices prior to setting 'fix' - if( !fix ) - { - for( unsigned int i = 0; i < contours.size(); ++i ) - { - if( contours[i]->size() < 3 ) - continue; - - VERTEX_3D* vp0 = vertices[ contours[i]->back() ]; - VERTEX_3D* vp1 = vertices[ contours[i]->front() ]; - areas[i] += ( vp1->x - vp0->x ) * ( vp1->y + vp0->y ); - } - } - - // prevent the addition of any further contours and contour vertices - fix = true; - - // clear temporary internals which may have been used in a previous run - clearTmp(); - - // request an outline - gluTessProperty( tess, GLU_TESS_BOUNDARY_ONLY, GL_TRUE ); - - // adjust internal indices for extra points and holes - if( holes ) - hidx = holes->GetSize(); - else - hidx = 0; - - eidx = idx + hidx; - - // open the polygon - gluTessBeginPolygon( tess, this ); - - pushVertices( false ); - - // close the polygon - gluTessEndPolygon( tess ); - - if( Fault ) - return false; - - // push the (solid) outline to the tesselator - if( !pushOutline( holes ) ) - return false; - - // add the holes contained by this object - pushVertices( true ); - - // import external holes (if any) - if( hidx && ( holes->Import( idx, tess ) < 0 ) ) - { - std::ostringstream ostr; - ostr << "Tesselate():FAILED: " << holes->GetError(); - error = ostr.str(); - return false; - } - - if( Fault ) - return false; - - // erase the previous outline data and vertex order - // but preserve the extra vertices - for( int i = outline.size(); i > 0; --i ) - { - delete outline.back(); - outline.pop_back(); - } - - for( unsigned int i = ordmap.size(); i > 0; --i ) - ordmap.pop_back(); - - // go through the vertex lists and reset ephemeral parameters - for( unsigned int i = 0; i < vertices.size(); ++i ) - { - vertices[i]->o = -1; - } - - for( unsigned int i = 0; i < extra_verts.size(); ++i ) - { - extra_verts[i]->o = -1; - } - - ord = 0; - - // close the polygon; we now have all the data necessary for the tesselation - gluTessEndPolygon( tess ); - - // request a tesselated surface - gluTessProperty( tess, GLU_TESS_BOUNDARY_ONLY, GL_FALSE ); - - if( !pushOutline( holes ) ) - return false; - - gluTessEndPolygon( tess ); - - if( Fault ) - return false; - - return true; -} - - -bool VRML_LAYER::pushOutline( VRML_LAYER* holes ) -{ - // traverse the outline list to push all used vertices - if( outline.size() < 1 ) - { - error = "pushOutline() failed: no vertices to push"; - return false; - } - - gluTessBeginPolygon( tess, this ); - - std::list*>::const_iterator obeg = outline.begin(); - std::list*>::const_iterator oend = outline.end(); - - int pi; - std::list::const_iterator begin; - std::list::const_iterator end; - GLdouble pt[3]; - VERTEX_3D* vp; - - while( obeg != oend ) - { - if( (*obeg)->size() < 3 ) - { - ++obeg; - continue; - } - - gluTessBeginContour( tess ); - - begin = (*obeg)->begin(); - end = (*obeg)->end(); - - while( begin != end ) - { - pi = *begin; - - if( pi < 0 || (unsigned int) pi > ordmap.size() ) - { - error = "pushOutline():BUG: *outline.begin() is not a valid index to ordmap"; - return false; - } - - // retrieve the actual index - pi = ordmap[pi]; - - vp = getVertexByIndex( pi, holes ); - - if( !vp ) - { - error = "pushOutline():: BUG: ordmap[n] is not a valid index to vertices[]"; - return false; - } - - pt[0] = vp->x; - pt[1] = vp->y; - pt[2] = 0.0; - gluTessVertex( tess, pt, vp ); - ++begin; - } - - gluTessEndContour( tess ); - ++obeg; - } - - return true; -} - - -// writes out the vertex list; -// 'z' is the Z coordinate of every point -bool VRML_LAYER::WriteVertices( double z, FILE* fp ) -{ - if( !fp ) - { - error = "WriteVertices(): invalid file pointer"; - return false; - } - - if( ordmap.size() < 3 ) - { - error = "WriteVertices(): not enough vertices"; - return false; - } - - int i, j; - - VERTEX_3D* vp = getVertexByIndex( ordmap[0], pholes ); - - if( !vp ) - return false; - - std::string strx, stry, strz; - FormatDoublet( vp->x, vp->y, 6, strx, stry ); - FormatSinglet( z, 6, strz ); - - fprintf( fp, "%s %s %s", strx.c_str(), stry.c_str(), strz.c_str() ); - - for( i = 1, j = ordmap.size(); i < j; ++i ) - { - vp = getVertexByIndex( ordmap[i], pholes ); - - if( !vp ) - return false; - - FormatDoublet( vp->x, vp->y, 6, strx, stry ); - - if( i & 1 ) - fprintf( fp, ", %s %s %s", strx.c_str(), stry.c_str(), strz.c_str() ); - else - fprintf( fp, ",\n%s %s %s", strx.c_str(), stry.c_str(), strz.c_str() ); - } - - return true; -} - - -// writes out the vertex list for a 3D feature; top and bottom are the -// Z values for the top and bottom; top must be > bottom -bool VRML_LAYER::Write3DVertices( double top, double bottom, FILE* fp ) -{ - if( !fp ) - { - error = "Write3DVertices(): NULL file pointer"; - return false; - } - - if( ordmap.size() < 3 ) - { - error = "Write3DVertices(): insufficient vertices"; - return false; - } - - if( top <= bottom ) - { - error = "Write3DVertices(): top <= bottom"; - return false; - } - - int i, j; - - VERTEX_3D* vp = getVertexByIndex( ordmap[0], pholes ); - - if( !vp ) - return false; - - std::string strx, stry, strz; - FormatDoublet( vp->x, vp->y, 6, strx, stry ); - FormatSinglet( top, 6, strz ); - - fprintf( fp, "%s %s %s", strx.c_str(), stry.c_str(), strz.c_str() ); - - for( i = 1, j = ordmap.size(); i < j; ++i ) - { - vp = getVertexByIndex( ordmap[i], pholes ); - - if( !vp ) - return false; - - FormatDoublet( vp->x, vp->y, 6, strx, stry ); - - if( i & 1 ) - fprintf( fp, ", %s %s %s", strx.c_str(), stry.c_str(), strz.c_str() ); - else - fprintf( fp, ",\n%s %s %s", strx.c_str(), stry.c_str(), strz.c_str() ); - } - - // repeat for the bottom layer - vp = getVertexByIndex( ordmap[0], pholes ); - FormatDoublet( vp->x, vp->y, 6, strx, stry ); - FormatSinglet( bottom, 6, strz ); - - bool endl; - - if( i & 1 ) - { - fprintf( fp, ", %s %s %s", strx.c_str(), stry.c_str(), strz.c_str() ); - endl = false; - } - else - { - fprintf( fp, ",\n%s %s %s", strx.c_str(), stry.c_str(), strz.c_str() ); - endl = true; - } - - for( i = 1, j = ordmap.size(); i < j; ++i ) - { - vp = getVertexByIndex( ordmap[i], pholes ); - FormatDoublet( vp->x, vp->y, 6, strx, stry ); - - if( endl ) - { - fprintf( fp, ", %s %s %s", strx.c_str(), stry.c_str(), strz.c_str() ); - endl = false; - } - else - { - fprintf( fp, ",\n%s %s %s", strx.c_str(), stry.c_str(), strz.c_str() ); - endl = true; - } - } - - return true; -} - - -// writes out the index list; -// 'top' indicates the vertex ordering and should be -// true for a polygon visible from above the PCB -bool VRML_LAYER::WriteIndices( bool top, FILE* fp ) -{ - if( triplets.empty() ) - { - error = "WriteIndices(): no triplets (triangular facets) to write"; - return false; - } - - // go through the triplet list and write out the indices based on order - std::list::const_iterator tbeg = triplets.begin(); - std::list::const_iterator tend = triplets.end(); - - int i = 1; - - if( top ) - fprintf( fp, "%d, %d, %d, -1", tbeg->i1, tbeg->i2, tbeg->i3 ); - else - fprintf( fp, "%d, %d, %d, -1", tbeg->i2, tbeg->i1, tbeg->i3 ); - - ++tbeg; - - while( tbeg != tend ) - { - if( (i++ & 7) == 4 ) - { - i = 1; - - if( top ) - fprintf( fp, ",\n%d, %d, %d, -1", tbeg->i1, tbeg->i2, tbeg->i3 ); - else - fprintf( fp, ",\n%d, %d, %d, -1", tbeg->i2, tbeg->i1, tbeg->i3 ); - } - else - { - if( top ) - fprintf( fp, ", %d, %d, %d, -1", tbeg->i1, tbeg->i2, tbeg->i3 ); - else - fprintf( fp, ", %d, %d, %d, -1", tbeg->i2, tbeg->i1, tbeg->i3 ); - } - - ++tbeg; - } - - return true; -} - - -// writes out the index list for a 3D feature -bool VRML_LAYER::Write3DIndices( FILE* fp ) -{ - if( triplets.empty() ) - { - error = "Write3DIndices(): no triplets (triangular facets) to write"; - return false; - } - - if( outline.empty() ) - { - error = "WriteIndices(): no outline available"; - return false; - } - - // go through the triplet list and write out the indices based on order - std::list::const_iterator tbeg = triplets.begin(); - std::list::const_iterator tend = triplets.end(); - - int i = 1; - int idx2 = ordmap.size(); // index to the bottom vertices - - // print out the top vertices - fprintf( fp, "%d, %d, %d, -1", tbeg->i1, tbeg->i2, tbeg->i3 ); - ++tbeg; - - while( tbeg != tend ) - { - if( (i++ & 7) == 4 ) - { - i = 1; - fprintf( fp, ",\n%d, %d, %d, -1", tbeg->i1, tbeg->i2, tbeg->i3 ); - } - else - { - fprintf( fp, ", %d, %d, %d, -1", tbeg->i1, tbeg->i2, tbeg->i3 ); - } - - ++tbeg; - } - - // print out the bottom vertices - tbeg = triplets.begin(); - - while( tbeg != tend ) - { - if( (i++ & 7) == 4 ) - { - i = 1; - fprintf( fp, ",\n%d, %d, %d, -1", tbeg->i2 + idx2, tbeg->i1 + idx2, tbeg->i3 + idx2 ); - } - else - { - fprintf( fp, ", %d, %d, %d, -1", tbeg->i2 + idx2, tbeg->i1 + idx2, tbeg->i3 + idx2 ); - } - - ++tbeg; - } - - int firstPoint; - int lastPoint; - int curPoint; - - std::list*>::const_iterator obeg = outline.begin(); - std::list*>::const_iterator oend = outline.end(); - std::list* cp; - std::list::const_iterator cbeg; - std::list::const_iterator cend; - - while( obeg != oend ) - { - cp = *obeg; - - if( cp->size() < 3 ) - { - ++obeg; - continue; - } - - cbeg = cp->begin(); - cend = cp->end(); - - firstPoint = *(cbeg++); - lastPoint = firstPoint; - - while( cbeg != cend ) - { - curPoint = *(cbeg++); - fprintf( fp, ",\n %d, %d, %d, -1, %d, %d, %d, -1", - curPoint, lastPoint, curPoint + idx2, - curPoint + idx2, lastPoint, lastPoint + idx2 ); - lastPoint = curPoint; - } - - fprintf( fp, ",\n %d, %d, %d, -1, %d, %d, %d, -1", - firstPoint, lastPoint, firstPoint + idx2, - firstPoint + idx2, lastPoint, lastPoint + idx2 ); - - ++obeg; - } - - return true; -} - - -// add a triangular facet (triplet) to the ouptut index list -bool VRML_LAYER::addTriplet( VERTEX_3D* p0, VERTEX_3D* p1, VERTEX_3D* p2 ) -{ - double dx0 = p1->x - p0->x; - double dx1 = p2->x - p0->x; - - double dy0 = p1->y - p0->y; - double dy1 = p2->y - p0->y; - - // this number is chosen because we shall only write 6 decimal places - // on the VRML output - double err = 0.000001; - - // test if the triangles are degenerate (parallel sides) - - if( dx0 < err && dx0 > -err && dx1 < err && dx1 > -err ) - return false; - - if( dy0 < err && dy0 > -err && dy1 < err && dy1 > -err ) - return false; - - double sl0 = dy0 / dx0; - double sl1 = dy1 / dx1; - - double dsl = sl1 - sl0; - - if( dsl < err && dsl > -err ) - return false; - - triplets.push_back( TRIPLET_3D( p0->o, p1->o, p2->o ) ); - - return true; -} - - -// add an extra vertex (to be called only by the COMBINE callback) -VERTEX_3D* VRML_LAYER::AddExtraVertex( double x, double y ) -{ - VERTEX_3D* vertex = new VERTEX_3D; - - if( !vertex ) - { - error = "AddExtraVertex(): could not allocate a new vertex"; - return NULL; - } - - if( eidx == 0 ) - eidx = idx + hidx; - - vertex->x = x; - vertex->y = y; - vertex->i = eidx++; - vertex->o = -1; - - extra_verts.push_back( vertex ); - - return vertex; -} - - -// start a GL command list -void VRML_LAYER::glStart( GLenum cmd ) -{ - glcmd = cmd; - - while( !vlist.empty() ) - vlist.pop_back(); -} - - -// process a vertex -void VRML_LAYER::glPushVertex( VERTEX_3D* vertex ) -{ - if( vertex->o < 0 ) - { - vertex->o = ord++; - ordmap.push_back( vertex->i ); - } - - vlist.push_back( vertex ); -} - - -// end a GL command list -void VRML_LAYER::glEnd( void ) -{ - switch( glcmd ) - { - case GL_LINE_LOOP: - { - // add the loop to the list of outlines - std::list* loop = new std::list; - - if( !loop ) - break; - - for( unsigned int i = 0; i < vlist.size(); ++i ) - { - loop->push_back( vlist[i]->o ); - } - - outline.push_back( loop ); - } - break; - - case GL_TRIANGLE_FAN: - processFan(); - break; - - case GL_TRIANGLE_STRIP: - processStrip(); - break; - - case GL_TRIANGLES: - processTri(); - break; - - default: - break; - } - - while( !vlist.empty() ) - vlist.pop_back(); - - glcmd = 0; -} - - -// set the error message -void VRML_LAYER::SetGLError( GLenum errorID ) -{ - error = ""; - error = (const char*)gluGetString( errorID ); - - if( error.empty() ) - { - std::ostringstream ostr; - ostr << "Unknown OpenGL error: " << errorID; - error = ostr.str(); - } -} - - -// process a GL_TRIANGLE_FAN list -void VRML_LAYER::processFan( void ) -{ - if( vlist.size() < 3 ) - return; - - VERTEX_3D* p0 = vlist[0]; - - int i; - int end = vlist.size(); - - for( i = 2; i < end; ++i ) - { - addTriplet( p0, vlist[i - 1], vlist[i] ); - } -} - - -// process a GL_TRIANGLE_STRIP list -void VRML_LAYER::processStrip( void ) -{ - // note: (source: http://www.opengl.org/wiki/Primitive) - // GL_TRIANGLE_STRIP​: Every group of 3 adjacent vertices forms a triangle. - // The face direction of the strip is determined by the winding of the - // first triangle. Each successive triangle will have its effective face - // order reverse, so the system compensates for that by testing it in the - // opposite way. A vertex stream of n length will generate n-2 triangles. - - if( vlist.size() < 3 ) - return; - - int i; - int end = vlist.size(); - bool flip = false; - - for( i = 2; i < end; ++i ) - { - if( flip ) - { - addTriplet( vlist[i - 1], vlist[i - 2], vlist[i] ); - flip = false; - } - else - { - addTriplet( vlist[i - 2], vlist[i - 1], vlist[i] ); - flip = true; - } - } -} - - -// process a GL_TRIANGLES list -void VRML_LAYER::processTri( void ) -{ - // notes: - // 1. each successive group of 3 vertices is a triangle - // 2. as per OpenGL specification, any incomplete triangles are to be ignored - - if( vlist.size() < 3 ) - return; - - int i; - int end = vlist.size(); - - for( i = 2; i < end; i += 3 ) - addTriplet( vlist[i - 2], vlist[i - 1], vlist[i] ); -} - - -// push the internally held vertices -void VRML_LAYER::pushVertices( bool holes ) -{ - // push the internally held vertices - unsigned int i; - - std::list::const_iterator begin; - std::list::const_iterator end; - GLdouble pt[3]; - VERTEX_3D* vp; - - for( i = 0; i < contours.size(); ++i ) - { - if( contours[i]->size() < 3 ) - continue; - - if( ( holes && areas[i] <= 0.0 ) || ( !holes && areas[i] > 0.0 ) ) - continue; - - gluTessBeginContour( tess ); - - begin = contours[i]->begin(); - end = contours[i]->end(); - - while( begin != end ) - { - vp = vertices[ *begin ]; - pt[0] = vp->x; - pt[1] = vp->y; - pt[2] = 0.0; - gluTessVertex( tess, pt, vp ); - ++begin; - } - - gluTessEndContour( tess ); - } -} - - -VERTEX_3D* VRML_LAYER::getVertexByIndex( int index, VRML_LAYER* holes ) -{ - if( index < 0 || (unsigned int) index >= ( idx + hidx + extra_verts.size() ) ) - { - error = "getVertexByIndex():BUG: invalid index"; - return NULL; - } - - if( index < idx ) - { - // vertex is in the vertices[] list - return vertices[ index ]; - } - else if( index >= idx + hidx ) - { - // vertex is in the extra_verts[] list - return extra_verts[index - idx - hidx]; - } - - // vertex is in the holes object - if( !holes ) - { - error = "getVertexByIndex():BUG: invalid index"; - return NULL; - } - - VERTEX_3D* vp = holes->GetVertexByIndex( index ); - - if( !vp ) - { - std::ostringstream ostr; - ostr << "getVertexByIndex():FAILED: " << holes->GetError(); - error = ostr.str(); - return NULL; - } - - return vp; -} - - -// retrieve the total number of vertices -int VRML_LAYER::GetSize( void ) -{ - return vertices.size(); -} - - -// Inserts all contours into the given tesselator; this results in the -// renumbering of all vertices from 'start'. Returns the end number. -// Take care when using this call since tesselators cannot work on -// the internal data concurrently -int VRML_LAYER::Import( int start, GLUtesselator* tess ) -{ - if( start < 0 ) - { - error = "Import(): invalid index ( start < 0 )"; - return -1; - } - - if( !tess ) - { - error = "Import(): NULL tesselator pointer"; - return -1; - } - - unsigned int i, j; - - // renumber from 'start' - for( i = 0, j = vertices.size(); i < j; ++i ) - { - vertices[i]->i = start++; - vertices[i]->o = -1; - } - - // push each contour to the tesselator - VERTEX_3D* vp; - GLdouble pt[3]; - - std::list::const_iterator cbeg; - std::list::const_iterator cend; - - for( i = 0; i < contours.size(); ++i ) - { - if( contours[i]->size() < 3 ) - continue; - - cbeg = contours[i]->begin(); - cend = contours[i]->end(); - - gluTessBeginContour( tess ); - - while( cbeg != cend ) - { - vp = vertices[ *cbeg++ ]; - pt[0] = vp->x; - pt[1] = vp->y; - pt[2] = 0.0; - gluTessVertex( tess, pt, vp ); - } - - gluTessEndContour( tess ); - } - - return start; -} - - -// return the vertex identified by index -VERTEX_3D* VRML_LAYER::GetVertexByIndex( int index ) -{ - int i0 = vertices[0]->i; - - if( index < i0 || index >= ( i0 + (int) vertices.size() ) ) - { - error = "GetVertexByIndex(): invalid index"; - return NULL; - } - - return vertices[index - i0]; -} - - -// return the error string -const std::string& VRML_LAYER::GetError( void ) -{ - return error; -} diff --git a/pcbnew/exporters/vrml_board.h b/pcbnew/exporters/vrml_board.h deleted file mode 100644 index 9cb4a26f4f..0000000000 --- a/pcbnew/exporters/vrml_board.h +++ /dev/null @@ -1,379 +0,0 @@ -/* - * file: vrml_board.h - * - * This program source code file is part of KiCad, a free EDA CAD application. - * - * Copyright (C) 2013 Cirilo Bernardo - * - * 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 vrml_board.h - */ - -/* - * Classes and structures to support the tesselation of a - * PCB for VRML output. - */ - -#ifndef VRML_BOARD_H -#define VRML_BOARD_H - -#ifdef __WXMAC__ -# ifdef __DARWIN__ -# include -# else -# include -# endif -#else -# include -#endif - -#include -#include -#include -#include - -#ifndef M_PI2 -#define M_PI2 ( M_PI / 2.0 ) -#endif - -#ifndef M_PI4 -#define M_PI4 ( M_PI / 4.0 ) -#endif - -class GLUtesselator; - -struct VERTEX_3D -{ - double x; - double y; - int i; // vertex index - int o; // vertex order -}; - -struct TRIPLET_3D -{ - int i1, i2, i3; - - TRIPLET_3D( int p1, int p2, int p3 ) - { - i1 = p1; - i2 = p2; - i3 = p3; - } -}; - - -class VRML_LAYER -{ -private: - bool fix; // when true, no more vertices may be added by the user - int idx; // vertex index (number of contained vertices) - int ord; // vertex order (number of ordered vertices) - std::vector vertices; // vertices of all contours - std::vector*> contours; // lists of vertices for each contour - std::vector< double > areas; // area of the contours (positive if winding is CCW) - std::list triplets; // output facet triplet list (triplet of ORDER values) - std::list*> outline; // indices for outline outputs (index by ORDER values) - std::vector ordmap; // mapping of ORDER to INDEX - - std::string error; // error message - - double maxdev; // max. deviation from circle when calculating N sides - - int hidx; // number of vertices in the holes - int eidx; // index for extra vertices - std::vector extra_verts; // extra vertices added for outlines and facets - std::vector vlist; // vertex list for the GL command in progress - VRML_LAYER* pholes; // pointer to another layer object used for tesselation; - // this object is normally expected to hold only holes - - GLUtesselator* tess; // local instance of the GLU tesselator - - GLenum glcmd; // current GL command type ( fan, triangle, tri-strip, loop ) - - void clearTmp( void ); // clear ephemeral data used by the tesselation routine - - // add a triangular facet (triplet) to the output index list - bool addTriplet( VERTEX_3D* p0, VERTEX_3D* p1, VERTEX_3D* p2 ); - - // retrieve a vertex given its index; the vertex may be contained in the - // vertices vector, extra_verts vector, or foreign VRML_LAYER object - VERTEX_3D* getVertexByIndex( int index, VRML_LAYER* holes ); - - void processFan( void ); // process a GL_TRIANGLE_FAN list - void processStrip( void ); // process a GL_TRIANGLE_STRIP list - void processTri( void ); // process a GL_TRIANGLES list - - void pushVertices( bool holes ); // push the internal vertices - bool pushOutline( VRML_LAYER* holes ); // push the outline vertices - -public: - /// set to true when a fault is encountered during tesselation - bool Fault; - - VRML_LAYER(); - virtual ~VRML_LAYER(); - - /** - * Function Clear - * erases all data. - */ - void Clear( void ); - - /** - * Function GetSize - * returns the total number of vertices indexed - */ - int GetSize( void ); - - /** - * Function SetMaxDev - * sets the maximum deviation from a circle; this parameter is - * used for the automatic calculation of segments within a - * circle or an arc. - * - * @param max is the maximum deviation from a perfect circle or arc; - * minimum value is 0.000002 units - * - * @return bool: true if the value was accepted - */ - bool SetMaxDev( double max ); - - /** - * Function NewContour - * creates a new list of vertices and returns an index to the list - * - * @return int: index to the list or -1 if the operation failed - */ - int NewContour( void ); - - /** - * Function AddVertex - * adds a point to the requested contour - * - * @param aContour is an index previously returned by a call to NewContour() - * @param x is the X coordinate of the vertex - * @param y is the Y coordinate of the vertex - * - * @return bool: true if the vertex was added - */ - bool AddVertex( int aContour, double x, double y ); - - /** - * Function EnsureWinding - * checks the winding of a contour and ensures that it is a hole or - * a solid depending on the value of @param hole - * - * @param aContour is an index to a contour as returned by NewContour() - * @param hole determines if the contour must be a hole - * - * @return bool: true if the operation suceeded - */ - bool EnsureWinding( int aContour, bool hole ); - - /** - * Function AddCircle - * creates a circular contour and adds it to the internal list - * - * @param x is the X coordinate of the hole center - * @param y is the Y coordinate of the hole center - * @param rad is the radius of the hole - * @param csides is the number of sides (segments) in a circle; - * use a value of 1 to automatically calculate a suitable number. - * @param hole determines if the contour to be created is a cutout - * - * @return bool: true if the new contour was successfully created - */ - bool AddCircle( double x, double y, double rad, int csides, bool hole = false ); - - /** - * Function AddSlot - * creates and adds a slot feature to the list of contours - * - * @param cx is the X coordinate of the slot - * @param cy is the Y coordinate of the slot - * @param length is the length of the slot along the major axis - * @param width is the width of the slot along the minor axis - * @param angle (radians) is the orientation of the slot - * @param csides is the number of sides to a circle; use 1 to - * take advantage of automatic calculations. - * @param hole determines whether the slot is a hole or a solid - * - * @return bool: true if the slot was successfully created - */ - bool AddSlot( double cx, double cy, double length, double width, - double angle, int csides, bool hole = false ); - - /** - * Function AddArc - * creates an arc and adds it to the internal list of contours - * - * @param cx is the X coordinate of the arc's center - * @param cy is the Y coordinate of the arc's center - * @param startx is the X coordinate of the starting point - * @param starty is the Y coordinate of the starting point - * @param width is the width of the arc - * @param angle is the included angle - * @param csides is the number of segments in a circle; use 1 - * to take advantage of automatic calculations of this number - * @param hole determined whether the arc is to be a hole or a solid - * - * @return bool: true if the feature was successfully created - */ - bool AddArc( double cx, double cy, double startx, double starty, - double width, double angle, int csides, bool hole = false ); - - - /** - * Function Tesselate - * creates a list of outline vertices as well as the - * vertex sets required to render the surface. - * - * @param holes is a pointer to cutouts to be imposed on the - * surface. - * - * @return bool: true if the operation succeeded - */ - bool Tesselate( VRML_LAYER* holes ); - - /** - * Function WriteVertices - * writes out the list of vertices required to render a - * planar surface. - * - * @param z is the Z coordinate of the plane - * @param fp is the file to write to - * - * @return bool: true if the operation succeeded - */ - bool WriteVertices( double z, FILE* fp ); - - /** - * Function Write3DVertices - * writes out the list of vertices required to render an extruded solid - * - * @param top is the Z coordinate of the top plane - * @param bottom is the Z coordinate of the bottom plane - * @param fp is the file to write to - * - * @return bool: true if the operation succeeded - */ - bool Write3DVertices( double top, double bottom, FILE* fp ); - - /** - * Function WriteIndices - * writes out the vertex sets required to render a planar - * surface. - * - * @param top is true if the surface is to be visible from above; - * if false the surface will be visible from below. - * @param fp is the file to write to - * - * @return bool: true if the operation succeeded - */ - bool WriteIndices( bool top, FILE* fp ); - - /** - * Function Write3DIndices - * writes out the vertex sets required to render an extruded solid - * - * @param fp is the file to write to - * - * @return bool: true if the operation succeeded - */ - bool Write3DIndices( FILE* fp ); - - /** - * Function AddExtraVertex - * adds an extra vertex as required by the GLU tesselator - * - * @return VERTEX_3D*: is the new vertex or NULL if a vertex - * could not be created. - */ - VERTEX_3D* AddExtraVertex( double x, double y ); - - /** - * Function glStart - * is invoked by the GLU tesselator callback to notify this object - * of the type of GL command which is applicable to the upcoming - * vertex list. - * - * @param cmd is the GL command - */ - void glStart( GLenum cmd ); - - /** - * Function glPushVertex - * is invoked by the GLU tesselator callback; the supplied vertex is - * added to the internal list of vertices awaiting processing upon - * execution of glEnd() - * - * @param vertex is a vertex forming part of the GL command as previously - * set by glStart - */ - void glPushVertex( VERTEX_3D* vertex ); - - /** - * Function glEnd - * is invoked by the GLU tesselator callback to notify this object - * that the vertex list is complete and ready for processing - */ - void glEnd( void ); - - /** - * Function SetGLError - * sets the error message according to the specified OpenGL error - */ - void SetGLError( GLenum error_id ); - - /** - * Function Import - * inserts all contours into the given tesselator; this - * results in the renumbering of all vertices from @param start. - * Take care when using this call since tesselators cannot work on - * the internal data concurrently. - * - * @param start is the starting number for vertex indices - * @param tess is a pointer to a GLU Tesselator object - * - * @return int: the number of vertices exported - */ - int Import( int start, GLUtesselator* tess ); - - /** - * Function GetVertexByIndex - * returns a pointer to the requested vertex or - * NULL if no such vertex exists. - * - * @param ptindex is a vertex index - * - * @return VERTEX_3D*: the requested vertex or NULL - */ - VERTEX_3D* GetVertexByIndex( int ptindex ); - - /* - * Function GetError - * Returns the error message related to the last failed operation - */ - const std::string& GetError( void ); -}; - -#endif // VRML_BOARD_H diff --git a/utils/idftools/idf_outlines.cpp b/utils/idftools/idf_outlines.cpp index 43d1a4cbb2..456b427c27 100644 --- a/utils/idftools/idf_outlines.cpp +++ b/utils/idftools/idf_outlines.cpp @@ -775,7 +775,7 @@ void BOARD_OUTLINE::writeOutline( std::ofstream& aBoardFile, IDF_OUTLINE* aOutli aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(5) << aOutline->front()->startPoint.x << " " << aOutline->front()->startPoint.y << " " - << setprecision(5) << -aOutline->front()->angle << "\n"; + << setprecision(2) << -aOutline->front()->angle << "\n"; } } else @@ -799,7 +799,7 @@ void BOARD_OUTLINE::writeOutline( std::ofstream& aBoardFile, IDF_OUTLINE* aOutli aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(1) << (aOutline->front()->startPoint.x / IDF_THOU_TO_MM) << " " << (aOutline->front()->startPoint.y / IDF_THOU_TO_MM) << " " - << setprecision(5) << -aOutline->front()->angle << "\n"; + << setprecision(2) << -aOutline->front()->angle << "\n"; } } @@ -819,7 +819,7 @@ void BOARD_OUTLINE::writeOutline( std::ofstream& aBoardFile, IDF_OUTLINE* aOutli aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(5) << (*bo)->startPoint.x << " " << (*bo)->startPoint.y << " " - << setprecision(5) << -(*bo)->angle << "\n"; + << setprecision(2) << -(*bo)->angle << "\n"; } } else @@ -835,7 +835,7 @@ void BOARD_OUTLINE::writeOutline( std::ofstream& aBoardFile, IDF_OUTLINE* aOutli aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(1) << ((*bo)->startPoint.x / IDF_THOU_TO_MM) << " " << ((*bo)->startPoint.y / IDF_THOU_TO_MM) << " " - << setprecision(5) << -(*bo)->angle << "\n"; + << setprecision(2) << -(*bo)->angle << "\n"; } } @@ -869,7 +869,7 @@ void BOARD_OUTLINE::writeOutline( std::ofstream& aBoardFile, IDF_OUTLINE* aOutli aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(5) << (*bo)->endPoint.x << " " << (*bo)->endPoint.y << " " - << setprecision(5) << (*bo)->angle << "\n"; + << setprecision(2) << (*bo)->angle << "\n"; } } else @@ -893,7 +893,7 @@ void BOARD_OUTLINE::writeOutline( std::ofstream& aBoardFile, IDF_OUTLINE* aOutli aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(1) << ((*bo)->endPoint.x / IDF_THOU_TO_MM) << " " << ((*bo)->endPoint.y / IDF_THOU_TO_MM) << " " - << setprecision(5) << (*bo)->angle << "\n"; + << setprecision(2) << (*bo)->angle << "\n"; } } @@ -915,7 +915,7 @@ void BOARD_OUTLINE::writeOutline( std::ofstream& aBoardFile, IDF_OUTLINE* aOutli aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(5) << (*bo)->endPoint.x << " " << (*bo)->endPoint.y << " " - << setprecision(5) << (*bo)->angle << "\n"; + << setprecision(2) << (*bo)->angle << "\n"; } } else @@ -931,7 +931,7 @@ void BOARD_OUTLINE::writeOutline( std::ofstream& aBoardFile, IDF_OUTLINE* aOutli aBoardFile << aIndex << " " << setiosflags(ios::fixed) << setprecision(1) << ((*bo)->endPoint.x / IDF_THOU_TO_MM) << " " << ((*bo)->endPoint.y / IDF_THOU_TO_MM) << " " - << setprecision(5) << (*bo)->angle << "\n"; + << setprecision(2) << (*bo)->angle << "\n"; } } @@ -1281,7 +1281,7 @@ bool BOARD_OUTLINE::addOutline( IDF_OUTLINE* aOutline ) outlines.push_back( aOutline ); } - catch( std::exception& e ) + catch( const std::exception& e ) { errormsg = e.what(); diff --git a/utils/idftools/idf_parser.cpp b/utils/idftools/idf_parser.cpp index a1ac7da92c..afb2320754 100644 --- a/utils/idftools/idf_parser.cpp +++ b/utils/idftools/idf_parser.cpp @@ -2382,7 +2382,7 @@ void IDF3_BOARD::readBoardFile( const std::string& aFileName, bool aNoSubstitute } } } - catch( std::exception& e ) + catch( const std::exception& e ) { brd.exceptions ( std::ios_base::goodbit ); @@ -2689,7 +2689,7 @@ void IDF3_BOARD::readLibFile( const std::string& aFileName ) while( lib.good() ) readLibSection( lib, state, this ); } - catch( std::exception& e ) + catch( const std::exception& e ) { lib.exceptions ( std::ios_base::goodbit ); @@ -2773,7 +2773,7 @@ bool IDF3_BOARD::ReadFile( const wxString& aFullFileName, bool aNoSubstituteOutl // read the board file readBoardFile( bfname, aNoSubstituteOutlines ); } - catch( std::exception& e ) + catch( const std::exception& e ) { Clear(); errormsg = e.what(); @@ -2821,7 +2821,7 @@ bool IDF3_BOARD::writeLibFile( const std::string& aFileName ) } } - catch( std::exception& e ) + catch( const std::exception& e ) { lib.exceptions( std::ios_base::goodbit ); @@ -3065,7 +3065,7 @@ void IDF3_BOARD::writeBoardFile( const std::string& aFileName ) } } - catch( std::exception& e ) + catch( const std::exception& e ) { brd.exceptions( std::ios_base::goodbit ); @@ -3137,7 +3137,7 @@ bool IDF3_BOARD::WriteFile( const wxString& aFullFileName, bool aUnitMM, bool aF writeBoardFile( bfname ); } - catch( std::exception& e ) + catch( const std::exception& e ) { errormsg = e.what(); @@ -3901,7 +3901,7 @@ IDF3_COMP_OUTLINE* IDF3_BOARD::GetComponentOutline( wxString aFullFileName ) } } // while( true ) } - catch( std::exception& e ) + catch( const std::exception& e ) { delete cp; diff --git a/utils/idftools/vrml_layer.cpp b/utils/idftools/vrml_layer.cpp index 7cb03dd54a..32ed105210 100644 --- a/utils/idftools/vrml_layer.cpp +++ b/utils/idftools/vrml_layer.cpp @@ -230,8 +230,7 @@ void VRML_LAYER::Clear( void ) contours.pop_back(); } - while( !areas.empty() ) - areas.pop_back(); + areas.clear(); for( i = vertices.size(); i > 0; --i ) { @@ -254,8 +253,7 @@ void VRML_LAYER::clearTmp( void ) ord = 0; glcmd = 0; - while( !triplets.empty() ) - triplets.pop_back(); + triplets.clear(); for( i = outline.size(); i > 0; --i ) { @@ -263,8 +261,7 @@ void VRML_LAYER::clearTmp( void ) outline.pop_back(); } - for( i = ordmap.size(); i > 0; --i ) - ordmap.pop_back(); + ordmap.clear(); for( i = extra_verts.size(); i > 0; --i ) { @@ -274,8 +271,7 @@ void VRML_LAYER::clearTmp( void ) // note: unlike outline and extra_verts, // vlist is not responsible for memory management - for( i = vlist.size(); i > 0; --i ) - vlist.pop_back(); + vlist.clear(); // go through the vertex list and reset ephemeral parameters for( i = 0; i < vertices.size(); ++i ) @@ -743,6 +739,7 @@ bool VRML_LAYER::Tesselate( VRML_LAYER* holes ) // open the polygon gluTessBeginPolygon( tess, this ); + // add solid outlines pushVertices( false ); // close the polygon @@ -751,8 +748,10 @@ bool VRML_LAYER::Tesselate( VRML_LAYER* holes ) if( Fault ) return false; - // push the (solid) outline to the tesselator - if( !pushOutline( holes ) ) + // at this point we have a solid outline; add it to the tesselator + gluTessBeginPolygon( tess, this ); + + if( !pushOutline( NULL ) ) return false; // add the holes contained by this object @@ -772,14 +771,14 @@ bool VRML_LAYER::Tesselate( VRML_LAYER* holes ) // erase the previous outline data and vertex order // but preserve the extra vertices - for( int i = outline.size(); i > 0; --i ) + while( !outline.empty() ) { delete outline.back(); outline.pop_back(); } - for( unsigned int i = ordmap.size(); i > 0; --i ) - ordmap.pop_back(); + ordmap.clear(); + ord = 0; // go through the vertex lists and reset ephemeral parameters for( unsigned int i = 0; i < vertices.size(); ++i ) @@ -792,14 +791,16 @@ bool VRML_LAYER::Tesselate( VRML_LAYER* holes ) extra_verts[i]->o = -1; } - ord = 0; - - // close the polygon; we now have all the data necessary for the tesselation + // close the polygon; this creates the outline points + // and the point ordering list 'ordmap' gluTessEndPolygon( tess ); - // request a tesselated surface + // repeat the last operation but request a tesselated surface + // rather than an outline; this creates the triangles list. gluTessProperty( tess, GLU_TESS_BOUNDARY_ONLY, GL_FALSE ); + gluTessBeginPolygon( tess, this ); + if( !pushOutline( holes ) ) return false; @@ -821,8 +822,6 @@ bool VRML_LAYER::pushOutline( VRML_LAYER* holes ) return false; } - gluTessBeginPolygon( tess, this ); - std::list*>::const_iterator obeg = outline.begin(); std::list*>::const_iterator oend = outline.end(); @@ -851,6 +850,7 @@ bool VRML_LAYER::pushOutline( VRML_LAYER* holes ) if( pi < 0 || (unsigned int) pi > ordmap.size() ) { + gluTessEndContour( tess ); error = "pushOutline():BUG: *outline.begin() is not a valid index to ordmap"; return false; } @@ -862,6 +862,7 @@ bool VRML_LAYER::pushOutline( VRML_LAYER* holes ) if( !vp ) { + gluTessEndContour( tess ); error = "pushOutline():: BUG: ordmap[n] is not a valid index to vertices[]"; return false; } @@ -1194,9 +1195,9 @@ bool VRML_LAYER::addTriplet( VERTEX_3D* p0, VERTEX_3D* p1, VERTEX_3D* p2 ) double dy0 = p1->y - p0->y; double dy1 = p2->y - p0->y; - // this number is chosen because we shall only write 6 decimal places - // on the VRML output - double err = 0.000001; + // this number is chosen because we shall only write 9 decimal places + // at most on the VRML output + double err = 0.000000001; // test if the triangles are degenerate (parallel sides) diff --git a/utils/idftools/vrml_layer.h b/utils/idftools/vrml_layer.h index 5f7f456a59..5316b62506 100644 --- a/utils/idftools/vrml_layer.h +++ b/utils/idftools/vrml_layer.h @@ -96,6 +96,7 @@ private: bool fix; // when true, no more vertices may be added by the user int idx; // vertex index (number of contained vertices) int ord; // vertex order (number of ordered vertices) + unsigned int idxout; // outline index to first point in 3D outline std::vector vertices; // vertices of all contours std::vector*> contours; // lists of vertices for each contour std::vector< double > areas; // area of the contours (positive if winding is CCW) From 8cb342326241f32a2f1791330a12f6dd303009c3 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Tue, 10 Jun 2014 10:56:43 -0500 Subject: [PATCH 495/741] Remove class RETAINED_PATH, put is main member function into SEARCH_STACK. Change class PROJECT to use a generalized wxString in place of the RETAINED_PATH items, so that new session and project specific strings of any purpose can be saved there, for the life of a session. --- TODO.txt | 6 +++- common/project.cpp | 23 +++++++++--- common/search_stack.cpp | 33 +++++------------ .../dialogs/dialog_edit_component_in_lib.cpp | 7 ++-- eeschema/dialogs/dialog_eeschema_config.cpp | 18 ++++++---- eeschema/libedit.cpp | 8 +++-- eeschema/symbedit.cpp | 12 ++++--- include/project.h | 35 +++++++++++++------ include/search_stack.h | 33 ++++------------- .../dialog_edit_module_for_BoardEditor.cpp | 12 ++++--- .../dialog_edit_module_for_Modedit.cpp | 8 +++-- pcbnew/librairi.cpp | 7 ++-- 12 files changed, 111 insertions(+), 91 deletions(-) diff --git a/TODO.txt b/TODO.txt index 2972328835..ee0b19e8a1 100644 --- a/TODO.txt +++ b/TODO.txt @@ -69,5 +69,9 @@ Dick's Final TODO List: https://blueprints.launchpad.net/kicad/+spec/modular-kicad Issues as a result of minimal testing: - If eeschema launched from C++ project manager and does not find all libraries, + * If eeschema launched from C++ project manager and does not find all libraries, then the dialog showing the names of missing libraries is shown twice. + + * Clear all/some? retained strings on project change. + * Clear the FP_LIB_TABLE when the last KIWAY_PLAYER using it is closed. + diff --git a/common/project.cpp b/common/project.cpp index 2e10d8a661..5ec1245737 100644 --- a/common/project.cpp +++ b/common/project.cpp @@ -133,17 +133,32 @@ const wxString PROJECT::FootprintLibTblName() const } -RETAINED_PATH& PROJECT::RPath( RETPATH_T aIndex ) +void PROJECT::SetRString( RSTRING_T aIndex, const wxString& aString ) { unsigned ndx = unsigned( aIndex ); - if( ndx < DIM( m_rpaths ) ) + if( ndx < DIM( m_rstrings ) ) { - return m_rpaths[ndx]; + m_rstrings[ndx] = aString; } else { - static RETAINED_PATH no_cookie_for_you; + wxASSERT( 0 ); // bad index + } +} + + +const wxString& PROJECT::GetRString( RSTRING_T aIndex ) +{ + unsigned ndx = unsigned( aIndex ); + + if( ndx < DIM( m_rstrings ) ) + { + return m_rstrings[ndx]; + } + else + { + static wxString no_cookie_for_you; wxASSERT( 0 ); // bad index diff --git a/common/search_stack.cpp b/common/search_stack.cpp index d9f6a5c870..a4722a574f 100644 --- a/common/search_stack.cpp +++ b/common/search_stack.cpp @@ -104,42 +104,33 @@ void SEARCH_STACK::AddPaths( const wxString& aPaths, int aIndex ) } -void RETAINED_PATH::Clear() +const wxString SEARCH_STACK::LastVisitedPath( const wxString& aSubPathToSearch ) { - m_retained_path.Clear(); -} - - -wxString RETAINED_PATH::LastVisitedPath( const SEARCH_STACK& aSStack, const wxString& aSubPathToSearch ) -{ - if( !!m_retained_path ) - return m_retained_path; - wxString path; // Initialize default path to the main default lib path - // this is the second path in list (the first is the project path) - unsigned pcount = aSStack.GetCount(); + // this is the second path in list (the first is the project path). + unsigned pcount = GetCount(); if( pcount ) { unsigned ipath = 0; - if( aSStack[0] == wxGetCwd() ) + if( (*this)[0] == wxGetCwd() ) ipath = 1; // First choice of path: if( ipath < pcount ) - path = aSStack[ipath]; + path = (*this)[ipath]; - // Search a sub path matching aSubPathToSearch - if( !aSubPathToSearch.IsEmpty() ) + // Search a sub path matching this SEARCH_PATH + if( !IsEmpty() ) { for( ; ipath < pcount; ipath++ ) { - if( aSStack[ipath].Contains( aSubPathToSearch ) ) + if( (*this)[ipath].Contains( aSubPathToSearch ) ) { - path = aSStack[ipath]; + path = (*this)[ipath]; break; } } @@ -153,12 +144,6 @@ wxString RETAINED_PATH::LastVisitedPath( const SEARCH_STACK& aSStack, const wxSt } -void RETAINED_PATH::SaveLastVisitedPath( const wxString& aPath ) -{ - m_retained_path = aPath; -} - - #if defined(DEBUG) void SEARCH_STACK::Show( const char* aPrefix ) const { diff --git a/eeschema/dialogs/dialog_edit_component_in_lib.cpp b/eeschema/dialogs/dialog_edit_component_in_lib.cpp index 8866b25c1f..de0ff02b11 100644 --- a/eeschema/dialogs/dialog_edit_component_in_lib.cpp +++ b/eeschema/dialogs/dialog_edit_component_in_lib.cpp @@ -439,8 +439,11 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::BrowseAndSelectDocFile( wxCommandEvent& e PROJECT& prj = Prj(); SEARCH_STACK& search = prj.SchSearchS(); - wxString docpath = prj.RPath(PROJECT::DOC).LastVisitedPath( search, wxT( "doc" ) ); wxString mask = wxT( "*" ); + wxString docpath = prj.GetRString( PROJECT::DOC_PATH ); + + if( !docpath ) + docpath = search.LastVisitedPath( wxT( "doc" ) ); wxString fullFileName = EDA_FileSelector( _( "Doc Files" ), docpath, @@ -463,7 +466,7 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::BrowseAndSelectDocFile( wxCommandEvent& e */ wxFileName fn = fullFileName; - prj.RPath(PROJECT::DOC).SaveLastVisitedPath( fn.GetPath() ); + prj.SetRString( PROJECT::DOC_PATH, fn.GetPath() ); wxString filename = search.FilenameWithRelativePathInSearchList( fullFileName ); diff --git a/eeschema/dialogs/dialog_eeschema_config.cpp b/eeschema/dialogs/dialog_eeschema_config.cpp index efe5464282..1e2a85ed9a 100644 --- a/eeschema/dialogs/dialog_eeschema_config.cpp +++ b/eeschema/dialogs/dialog_eeschema_config.cpp @@ -321,8 +321,12 @@ void DIALOG_EESCHEMA_CONFIG::OnAddOrInsertLibClick( wxCommandEvent& event ) wxString libpath = m_DefaultLibraryPathslistBox->GetStringSelection(); - if( libpath.IsEmpty() ) - libpath = prj.RPath(PROJECT::SCH_LIB).LastVisitedPath( search ); + if( !libpath ) + { + libpath = prj.GetRString( PROJECT::SCH_LIB_PATH ); + if( !libpath ) + libpath = search.LastVisitedPath(); + } wxFileDialog filesDialog( this, _( "Library files:" ), libpath, wxEmptyString, SchematicLibraryFileWildcard, @@ -340,7 +344,7 @@ void DIALOG_EESCHEMA_CONFIG::OnAddOrInsertLibClick( wxCommandEvent& event ) fn = filenames[jj]; if( jj == 0 ) - prj.RPath(PROJECT::SCH_LIB).SaveLastVisitedPath( fn.GetPath() ); + prj.SetRString( PROJECT::SCH_LIB_PATH, fn.GetPath() ); /* If the library path is already in the library search paths * list, just add the library name to the list. Otherwise, add @@ -376,12 +380,14 @@ void DIALOG_EESCHEMA_CONFIG::OnAddOrInsertLibClick( wxCommandEvent& event ) } - void DIALOG_EESCHEMA_CONFIG::OnAddOrInsertPath( wxCommandEvent& event ) { PROJECT& prj = Prj(); SEARCH_STACK& search = Prj().SchSearchS(); - wxString path = prj.RPath(PROJECT::SCH_LIB).LastVisitedPath( search ); + wxString path = prj.GetRString( PROJECT::SCH_LIB_PATH ); + + if( !path ) + path = search.LastVisitedPath(); bool select = EDA_DirectorySelector( _( "Default Path for Libraries" ), path, wxDD_DEFAULT_STYLE, @@ -439,7 +445,7 @@ void DIALOG_EESCHEMA_CONFIG::OnAddOrInsertPath( wxCommandEvent& event ) DisplayError( this, _("Path already in use") ); } - prj.RPath(PROJECT::SCH_LIB).SaveLastVisitedPath( path ); + prj.SetRString( PROJECT::SCH_LIB_PATH, path ); } diff --git a/eeschema/libedit.cpp b/eeschema/libedit.cpp index 82afe32532..8e60b0d44e 100644 --- a/eeschema/libedit.cpp +++ b/eeschema/libedit.cpp @@ -308,7 +308,7 @@ bool LIB_EDIT_FRAME::SaveActiveLibrary( bool newFile ) m_canvas->EndMouseCapture( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor() ); - if( m_library == NULL ) + if( !m_library ) { DisplayError( this, _( "No library specified." ) ); return false; @@ -326,7 +326,9 @@ bool LIB_EDIT_FRAME::SaveActiveLibrary( bool newFile ) SEARCH_STACK& search = prj.SchSearchS(); // Get a new name for the library - wxString default_path = prj.RPath(PROJECT::SCH_LIB).LastVisitedPath( search ); + wxString default_path = prj.GetRString( PROJECT::SCH_LIB_PATH ); + if( !default_path ) + default_path = search.LastVisitedPath(); wxFileDialog dlg( this, _( "Component Library Name:" ), default_path, wxEmptyString, SchematicLibraryFileExtension, @@ -342,7 +344,7 @@ bool LIB_EDIT_FRAME::SaveActiveLibrary( bool newFile ) if( fn.GetExt().IsEmpty() ) fn.SetExt( SchematicLibraryFileExtension ); - prj.RPath(PROJECT::SCH_LIB).SaveLastVisitedPath( fn.GetPath() ); + prj.SetRString( PROJECT::SCH_LIB_PATH, fn.GetPath() ); } else { diff --git a/eeschema/symbedit.cpp b/eeschema/symbedit.cpp index 7836f5cbd8..8d6a744cdf 100644 --- a/eeschema/symbedit.cpp +++ b/eeschema/symbedit.cpp @@ -60,7 +60,9 @@ void LIB_EDIT_FRAME::LoadOneSymbol() m_canvas->SetIgnoreMouseEvents( true ); - wxString default_path = prj.RPath(PROJECT::SCH_LIB).LastVisitedPath( search ); + wxString default_path = prj.GetRString( PROJECT::SCH_LIB_PATH ); + if( !default_path ) + default_path = search.LastVisitedPath(); wxFileDialog dlg( this, _( "Import Symbol Drawings" ), default_path, wxEmptyString, SchematicSymbolFileWildcard, @@ -75,7 +77,7 @@ void LIB_EDIT_FRAME::LoadOneSymbol() wxFileName fn = dlg.GetPath(); - prj.RPath(PROJECT::SCH_LIB).SaveLastVisitedPath( fn.GetPath() ); + prj.SetRString( PROJECT::SCH_LIB_PATH, fn.GetPath() ); Lib = new CMP_LIBRARY( LIBRARY_TYPE_SYMBOL, fn ); @@ -143,7 +145,9 @@ void LIB_EDIT_FRAME::SaveOneSymbol() if( m_component->GetDrawItemList().empty() ) return; - wxString default_path = prj.RPath(PROJECT::SCH_LIB).LastVisitedPath( search ); + wxString default_path = prj.GetRString( PROJECT::SCH_LIB_PATH ); + if( !default_path ) + default_path = search.LastVisitedPath(); wxFileDialog dlg( this, _( "Export Symbol Drawings" ), default_path, m_component->GetName(), SchematicSymbolFileWildcard, @@ -159,7 +163,7 @@ void LIB_EDIT_FRAME::SaveOneSymbol() if( fn.GetExt().IsEmpty() ) fn.SetExt( SchematicSymbolFileExtension ); - prj.RPath(PROJECT::SCH_LIB).SaveLastVisitedPath( fn.GetPath() ); + prj.SetRString( PROJECT::SCH_LIB_PATH, fn.GetPath() ); msg.Printf( _( "Saving symbol in '%s'" ), GetChars( fn.GetPath() ) ); SetStatusText( msg ); diff --git a/include/project.h b/include/project.h index c7f7a7f3dd..b4415619f4 100644 --- a/include/project.h +++ b/include/project.h @@ -137,19 +137,32 @@ public: VTBL_ENTRY wxString GetModuleLibraryNickname() { return m_module_library_nickname; } VTBL_ENTRY void SetModuleLibraryNickname( const wxString& aNickName ) { m_module_library_nickname = aNickName; } - /// Retain a number of paths for user convienience, enumerated here: - enum RETPATH_T + /// Retain a number of project specific wxStrings, enumerated here: + enum RSTRING_T { - DOC, - SCH_LIB, - PCB_LIB, - VIEWER_3D, + DOC_PATH, + SCH_LIB_PATH, + PCB_LIB_NICKNAME, + VIEWER_3D_PATH, - RPATH_COUNT + RSTRING_COUNT }; - /// Give acess to a RETAINED_PATH using enum RETPATH_T - VTBL_ENTRY RETAINED_PATH& RPath( RETPATH_T aPath ); + /** + * Function GetRString + * returns a "retained string", which is any session and project specific string + * identified in enum RSTRING_T. Retained strings are not written to disk, and + * are therefore good only for the current session. + */ + VTBL_ENTRY const wxString& GetRString( RSTRING_T aStringId ); + + /** + * Function SetRString + * stores a "retained string", which is any session and project specific string + * identified in enum RSTRING_T. Retained strings are not written to disk, and + * are therefore good only for the current session. + */ + VTBL_ENTRY void SetRString( RSTRING_T aStringId, const wxString& aString ); /** * Enum ELEM_T @@ -241,8 +254,8 @@ private: wxString m_module_library_nickname; ///< @todo move this into m_rpaths[] - /// @see this::RPath() and enum RETPATH_T. - RETAINED_PATH m_rpaths[RPATH_COUNT]; + /// @see this::SetRString(), GetRString(), and enum RSTRING_T. + wxString m_rstrings[RSTRING_COUNT]; /// @see this::Elem() and enum ELEM_T. _ELEM* m_elems[ELEM_COUNT]; diff --git a/include/search_stack.h b/include/search_stack.h index 42534bb74a..8c36c90849 100644 --- a/include/search_stack.h +++ b/include/search_stack.h @@ -57,38 +57,19 @@ public: * ";" on windows, or ":" | ";" on unix. */ void RemovePaths( const wxString& aPaths ); -}; - - -/** - * Class RETAINED_PATH - * is a glamorous way to save a path you might need in the future. - * It is simply a container for the two functions, if you can figure them out. - * This whole concept is awkward, and the two function might have better been - * non-member functions, simply globals. - */ -class RETAINED_PATH -{ -public: /** * Function LastVisitedPath - * returns the last visited directory, or aSubPathToSearch is empty, the first - * path in lib path list ( but not the CWD ). + * is a quirky function inherited from old code that seems to serve particular + * needs in the UI. It returns what is called the last visited directory, or + * if aSubPathToSearch is empty, the first path in this SEARCH_STACK + * ( but not the CWD ). + * * @todo add more here if you can figure it out. * - * @param aSearchStack gives the set of directories to consider. - * @param aSubPathToSearch is the preferred sub path to search in path list + * @param aSubPathToSearch is the preferred sub path to search in path list */ - wxString LastVisitedPath( const SEARCH_STACK& aSStack, - const wxString& aSubPathToSearch = wxEmptyString ); - - void SaveLastVisitedPath( const wxString& aPath ); - - void Clear(); - -private: - wxString m_retained_path; + const wxString LastVisitedPath( const wxString& aSubPathToSearch = wxEmptyString ); }; #endif // SEARCH_STACK_H_ diff --git a/pcbnew/dialogs/dialog_edit_module_for_BoardEditor.cpp b/pcbnew/dialogs/dialog_edit_module_for_BoardEditor.cpp index d8b6648b7a..8f9f822e47 100644 --- a/pcbnew/dialogs/dialog_edit_module_for_BoardEditor.cpp +++ b/pcbnew/dialogs/dialog_edit_module_for_BoardEditor.cpp @@ -440,7 +440,11 @@ void DIALOG_MODULE_BOARD_EDITOR::Browse3DLib( wxCommandEvent& event ) } if( !fullpath ) - fullpath = prj.RPath(PROJECT::VIEWER_3D).LastVisitedPath( search, LIB3D_PATH ); + { + fullpath = prj.GetRString( PROJECT::VIEWER_3D_PATH ); + if( !fullpath ) + fullpath = search.LastVisitedPath( LIB3D_PATH ); + } #ifdef __WINDOWS__ fullpath.Replace( wxT( "/" ), wxT( "\\" ) ); @@ -469,7 +473,7 @@ void DIALOG_MODULE_BOARD_EDITOR::Browse3DLib( wxCommandEvent& event ) wxFileName fn = fullfilename; - prj.RPath(PROJECT::VIEWER_3D).SaveLastVisitedPath( fn.GetPath() ); + prj.SetRString( PROJECT::VIEWER_3D_PATH, fn.GetPath() ); /* If the file path is already in the library search paths * list, just add the library name to the list. Otherwise, add @@ -482,7 +486,7 @@ void DIALOG_MODULE_BOARD_EDITOR::Browse3DLib( wxCommandEvent& event ) wxFileName aux = shortfilename; if( aux.IsAbsolute() ) - { + { // Absolute path, ask if the user wants a relative one int diag = wxMessageBox( _( "Use a relative path?" ), @@ -490,7 +494,7 @@ void DIALOG_MODULE_BOARD_EDITOR::Browse3DLib( wxCommandEvent& event ) wxYES_NO | wxICON_QUESTION, this ); if( diag == wxYES ) - { + { // Make it relative aux.MakeRelativeTo( wxT(".") ); shortfilename = aux.GetPathWithSep() + aux.GetFullName(); diff --git a/pcbnew/dialogs/dialog_edit_module_for_Modedit.cpp b/pcbnew/dialogs/dialog_edit_module_for_Modedit.cpp index 6e0ee4bd19..6cc15e9aa6 100644 --- a/pcbnew/dialogs/dialog_edit_module_for_Modedit.cpp +++ b/pcbnew/dialogs/dialog_edit_module_for_Modedit.cpp @@ -303,7 +303,11 @@ void DIALOG_MODULE_MODULE_EDITOR::BrowseAndAdd3DLib( wxCommandEvent& event ) } if( !fullpath ) - fullpath = prj.RPath(PROJECT::VIEWER_3D).LastVisitedPath( search, LIB3D_PATH ); + { + fullpath = prj.GetRString( PROJECT::VIEWER_3D_PATH ); + if( !fullpath ) + fullpath = search.LastVisitedPath( LIB3D_PATH ); + } #ifdef __WINDOWS__ fullpath.Replace( wxT( "/" ), wxT( "\\" ) ); @@ -330,7 +334,7 @@ void DIALOG_MODULE_MODULE_EDITOR::BrowseAndAdd3DLib( wxCommandEvent& event ) wxFileName fn = fullfilename; - prj.RPath(PROJECT::VIEWER_3D).SaveLastVisitedPath( fn.GetPath() ); + prj.SetRString( PROJECT::VIEWER_3D_PATH, fn.GetPath() ); /* If the file path is already in the library search paths * list, just add the library name to the list. Otherwise, add diff --git a/pcbnew/librairi.cpp b/pcbnew/librairi.cpp index 548b4b3a07..cc682e485d 100644 --- a/pcbnew/librairi.cpp +++ b/pcbnew/librairi.cpp @@ -522,16 +522,15 @@ void PCB_EDIT_FRAME::ArchiveModulesOnBoard( bool aNewModulesOnly ) } PROJECT& prj = Prj(); - SEARCH_STACK& search = Kiface().KifaceSearch(); - wxString last_nickname = prj.RPath(PROJECT::PCB_LIB).LastVisitedPath( search ); + wxString last_nickname = prj.GetRString( PROJECT::PCB_LIB_NICKNAME ); wxString nickname = SelectLibrary( last_nickname ); if( !nickname ) return; - prj.RPath(PROJECT::PCB_LIB).SaveLastVisitedPath( nickname ); + prj.SetRString( PROJECT::PCB_LIB_NICKNAME, nickname ); if( !aNewModulesOnly ) { @@ -545,7 +544,7 @@ void PCB_EDIT_FRAME::ArchiveModulesOnBoard( bool aNewModulesOnly ) try { - FP_LIB_TABLE* tbl = Prj().PcbFootprintLibs(); + FP_LIB_TABLE* tbl = prj.PcbFootprintLibs(); // Delete old library if we're replacing it entirely. if( !aNewModulesOnly ) From 737ef50cc08bf70883a1e21d168bf3310f5d86f6 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 10 Jun 2014 18:21:38 +0200 Subject: [PATCH 496/741] Plot SVG: fix issue with arcs (bug #1328155 ) both in Pcbnew and Eeschema. --- common/common_plotSVG_functions.cpp | 2 +- pcbnew/plot_brditems_plotter.cpp | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/common/common_plotSVG_functions.cpp b/common/common_plotSVG_functions.cpp index e5d00a63e5..b90481eea9 100644 --- a/common/common_plotSVG_functions.cpp +++ b/common/common_plotSVG_functions.cpp @@ -346,7 +346,7 @@ void SVG_PLOTTER::Arc( const wxPoint& centre, double StAngle, double EndAngle, i DPOINT centre_dev = userToDeviceCoordinates( centre ); double radius_dev = userToDeviceSize( radius ); - if( m_yaxisReversed ) // Should be always the case + if( !m_yaxisReversed ) // Should be never the case { double tmp = StAngle; StAngle = -EndAngle; diff --git a/pcbnew/plot_brditems_plotter.cpp b/pcbnew/plot_brditems_plotter.cpp index 7413da3cbc..41f8574cd9 100644 --- a/pcbnew/plot_brditems_plotter.cpp +++ b/pcbnew/plot_brditems_plotter.cpp @@ -394,16 +394,10 @@ void BRDITEMS_PLOTTER::Plot_1_EdgeModule( EDGE_MODULE* aEdge ) case S_ARC: { radius = KiROUND( GetLineLength( end, pos ) ); - double startAngle = ArcTangente( end.y - pos.y, end.x - pos.x ); - double endAngle = startAngle + aEdge->GetAngle(); - if ( ( GetFormat() == PLOT_FORMAT_DXF ) && - ( m_layerMask & ( SILKSCREEN_LAYER_BACK | DRAW_LAYER | COMMENT_LAYER ) ) ) - m_plotter->ThickArc( pos, -startAngle, -endAngle, radius, thickness, GetMode() ); - else - m_plotter->ThickArc( pos, -endAngle, -startAngle, radius, thickness, GetMode() ); + m_plotter->ThickArc( pos, -endAngle, -startAngle, radius, thickness, GetMode() ); } break; From 3d311f831e5613d5965f7465c0927728cdfc750f Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Wed, 11 Jun 2014 00:00:30 -0500 Subject: [PATCH 497/741] *) Remove more wxString static constructors which were crashing in PAGE_INFO assignment to a new BOARD in the footprint editor. This is PAGE_INFO::A4 and company. *) Remove static storage of the BOARD in the module editor. --- common/class_page_info.cpp | 31 ++++++++++++----------- common/dialogs/dialog_page_settings.cpp | 28 ++++++++++----------- include/common.h | 31 ++++++++++++----------- pcbnew/modedit.cpp | 4 +++ pcbnew/module_editor_frame.h | 1 - pcbnew/moduleframe.cpp | 33 ++++--------------------- scripts/kicad-install.sh | 2 +- 7 files changed, 56 insertions(+), 74 deletions(-) diff --git a/common/class_page_info.cpp b/common/class_page_info.cpp index 6e0671dd69..f5dbadf614 100644 --- a/common/class_page_info.cpp +++ b/common/class_page_info.cpp @@ -38,21 +38,22 @@ // Standard paper sizes nicknames. -const wxString PAGE_INFO::A4( wxT( "A4" ) ); -const wxString PAGE_INFO::A3( wxT( "A3" ) ); -const wxString PAGE_INFO::A2( wxT( "A2" ) ); -const wxString PAGE_INFO::A1( wxT( "A1" ) ); -const wxString PAGE_INFO::A0( wxT( "A0" ) ); -const wxString PAGE_INFO::A( wxT( "A" ) ); -const wxString PAGE_INFO::B( wxT( "B" ) ); -const wxString PAGE_INFO::C( wxT( "C" ) ); -const wxString PAGE_INFO::D( wxT( "D" ) ); -const wxString PAGE_INFO::E( wxT( "E" ) ); -const wxString PAGE_INFO::GERBER( wxT( "GERBER" ) ); -const wxString PAGE_INFO::USLetter( wxT( "USLetter" ) ); -const wxString PAGE_INFO::USLegal( wxT( "USLegal" ) ); -const wxString PAGE_INFO::USLedger( wxT( "USLedger" ) ); -const wxString PAGE_INFO::Custom( wxT( "User" ) ); +const wxChar PAGE_INFO::A4[] = wxT( "A4" ); +const wxChar PAGE_INFO::A3[] = wxT( "A3" ); +const wxChar PAGE_INFO::A2[] = wxT( "A2" ); +const wxChar PAGE_INFO::A1[] = wxT( "A1" ); +const wxChar PAGE_INFO::A0[] = wxT( "A0" ); +const wxChar PAGE_INFO::A[] = wxT( "A" ); +const wxChar PAGE_INFO::B[] = wxT( "B" ) ; +const wxChar PAGE_INFO::C[] = wxT( "C" ); +const wxChar PAGE_INFO::D[] = wxT( "D" ); +const wxChar PAGE_INFO::E[] = wxT( "E" ); + +const wxChar PAGE_INFO::GERBER[] = wxT( "GERBER" ); +const wxChar PAGE_INFO::USLetter[] = wxT( "USLetter" ); +const wxChar PAGE_INFO::USLegal[] = wxT( "USLegal" ); +const wxChar PAGE_INFO::USLedger[] = wxT( "USLedger" ); +const wxChar PAGE_INFO::Custom[] = wxT( "User" ); // Standard page sizes in mils, all constants diff --git a/common/dialogs/dialog_page_settings.cpp b/common/dialogs/dialog_page_settings.cpp index ad703b87a1..34af27ef53 100644 --- a/common/dialogs/dialog_page_settings.cpp +++ b/common/dialogs/dialog_page_settings.cpp @@ -703,21 +703,21 @@ void DIALOG_PAGES_SETTINGS::GetPageLayoutInfoFromDialog() { PAGE_INFO pageInfo; // SetType() later to lookup size - static const wxString* papers[] = { + static const wxChar* papers[] = { // longest common string first, since sequential search below - &PAGE_INFO::A4, - &PAGE_INFO::A3, - &PAGE_INFO::A2, - &PAGE_INFO::A1, - &PAGE_INFO::A0, - &PAGE_INFO::A, - &PAGE_INFO::B, - &PAGE_INFO::C, - &PAGE_INFO::D, - &PAGE_INFO::E, - &PAGE_INFO::USLetter, - &PAGE_INFO::USLegal, - &PAGE_INFO::USLedger, + PAGE_INFO::A4, + PAGE_INFO::A3, + PAGE_INFO::A2, + PAGE_INFO::A1, + PAGE_INFO::A0, + PAGE_INFO::A, + PAGE_INFO::B, + PAGE_INFO::C, + PAGE_INFO::D, + PAGE_INFO::E, + PAGE_INFO::USLetter, + PAGE_INFO::USLegal, + PAGE_INFO::USLedger, }; unsigned i; diff --git a/include/common.h b/include/common.h index 304fdf44a0..a647f80d47 100644 --- a/include/common.h +++ b/include/common.h @@ -201,21 +201,22 @@ public: // paper size names which are part of the public API, pass to SetType() or // above constructor. - static const wxString A4; - static const wxString A3; - static const wxString A2; - static const wxString A1; - static const wxString A0; - static const wxString A; - static const wxString B; - static const wxString C; - static const wxString D; - static const wxString E; - static const wxString GERBER; - static const wxString USLetter; - static const wxString USLegal; - static const wxString USLedger; - static const wxString Custom; ///< "User" defined page type + // these were once wxStrings, but it caused static construction sequence problems: + static const wxChar A4[]; + static const wxChar A3[]; + static const wxChar A2[]; + static const wxChar A1[]; + static const wxChar A0[]; + static const wxChar A[]; + static const wxChar B[]; + static const wxChar C[]; + static const wxChar D[]; + static const wxChar E[]; + static const wxChar GERBER[]; + static const wxChar USLetter[]; + static const wxChar USLegal[]; + static const wxChar USLedger[]; + static const wxChar Custom[]; ///< "User" defined page type /** diff --git a/pcbnew/modedit.cpp b/pcbnew/modedit.cpp index 5557e1f124..784fe1c1e4 100644 --- a/pcbnew/modedit.cpp +++ b/pcbnew/modedit.cpp @@ -436,6 +436,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) // 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() ); @@ -445,6 +446,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) else // This is an insert command { wxPoint cursor_pos = pcbframe->GetCrossHairPosition(); + pcbframe->SetCrossHairPosition( wxPoint( 0, 0 ) ); pcbframe->PlaceModule( newmodule, NULL ); pcbframe->SetCrossHairPosition( cursor_pos ); @@ -551,7 +553,9 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) if( GetBoard()->m_Modules ) { SetCurItem( GetBoard()->m_Modules ); + DIALOG_MODULE_MODULE_EDITOR dialog( this, (MODULE*) GetScreen()-> GetCurItem() ); + int ret = dialog.ShowModal(); GetScreen()->GetCurItem()->ClearFlags(); diff --git a/pcbnew/module_editor_frame.h b/pcbnew/module_editor_frame.h index 438c4ed35e..799ebd5b2c 100644 --- a/pcbnew/module_editor_frame.h +++ b/pcbnew/module_editor_frame.h @@ -406,7 +406,6 @@ protected: /// protected so only friend PCB::IFACE::CreateWindow() can act as sole factory. FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ); - static BOARD* s_Pcb; ///< retain board across invocations of module editor /** * Function GetComponentFromUndoList diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index 4ef660f343..4bf4f464fa 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -52,10 +52,6 @@ #include -static PCB_SCREEN* s_screenModule; // the PCB_SCREEN used by the footprint editor - -BOARD* FOOTPRINT_EDIT_FRAME::s_Pcb; - BEGIN_EVENT_TABLE( FOOTPRINT_EDIT_FRAME, PCB_BASE_FRAME ) EVT_MENU_RANGE( ID_POPUP_PCB_ITEM_SELECTION_START, ID_POPUP_PCB_ITEM_SELECTION_END, PCB_BASE_FRAME::ProcessItemSelection ) @@ -170,32 +166,22 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : // Show a title (frame title + footprint name): updateTitle(); - if( !s_Pcb ) - { - s_Pcb = new BOARD(); + SetBoard( new BOARD() ); - // Ensure all layers and items are visible: - s_Pcb->SetVisibleAlls(); - } + // Ensure all layers and items are visible: + GetBoard()->SetVisibleAlls(); - SetBoard( s_Pcb ); - - if( !s_screenModule ) - s_screenModule = new PCB_SCREEN( GetPageSettings().GetSizeIU() ); - - SetScreen( s_screenModule ); + SetScreen( new PCB_SCREEN( GetPageSettings().GetSizeIU() ) ); GetScreen()->SetCurItem( NULL ); LoadSettings( config() ); - GetBoard()->SetVisibleAlls(); - GetScreen()->AddGrid( m_UserGridSize, m_UserGridUnit, ID_POPUP_GRID_USER ); GetScreen()->SetGrid( ID_POPUP_GRID_LEVEL_1000 + m_LastGridSizeId ); // In modedit, set the default paper size to A4: // this should be OK for all footprint to plot/print - SetPageSettings( PAGE_INFO::A4 ); + SetPageSettings( PAGE_INFO( PAGE_INFO::A4 ) ); SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y ); ReCreateMenuBar(); @@ -244,15 +230,6 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : FOOTPRINT_EDIT_FRAME::~FOOTPRINT_EDIT_FRAME() { - // When user reopens the Footprint editor, user would like to find the last edited item. - // Do not delete PCB_SCREEN (by the destructor of EDA_DRAW_FRAME) - SetScreen( NULL ); - - // Do not allow PCB_BASE_FRAME::~PCB_BASE_FRAME() - // to delete our precious BOARD, which is also in static FOOTPRINT_EDIT_FRAME::s_Pcb. - // That function, PCB_BASE_FRAME::~PCB_BASE_FRAME(), runs immediately next - // as we return from here. - m_Pcb = 0; } diff --git a/scripts/kicad-install.sh b/scripts/kicad-install.sh index 7ddd906881..1ff947053b 100755 --- a/scripts/kicad-install.sh +++ b/scripts/kicad-install.sh @@ -46,7 +46,7 @@ REVISION=$STABLE # CMake Options -#OPTS="$OPTS -DBUILD_GITHUB_PLUGIN=OFF" +OPTS="$OPTS -DBUILD_GITHUB_PLUGIN=ON" # needed by $STABLE revision # Python scripting, uncomment to enable #OPTS="$OPTS -DKICAD_SCRIPTING=ON -DKICAD_SCRIPTING_MODULES=ON -DKICAD_SCRIPTING_WXPYTHON=ON" From 1385e39d892e324fea08e0a64bc4a43777642af9 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Wed, 11 Jun 2014 00:18:41 -0500 Subject: [PATCH 498/741] Save the footprint editor's last footprint in the PROJECT RString facility. --- include/project.h | 6 +-- pcbnew/librairi.cpp | 2 +- pcbnew/modedit.cpp | 10 ++--- pcbnew/module_editor_frame.h | 20 ++++----- pcbnew/moduleframe.cpp | 81 ++++++++++++++++++++++++++++-------- pcbnew/tool_pcb.cpp | 23 ++++++---- 6 files changed, 92 insertions(+), 50 deletions(-) diff --git a/include/project.h b/include/project.h index b4415619f4..113aa4e032 100644 --- a/include/project.h +++ b/include/project.h @@ -134,9 +134,6 @@ public: /// Accessor for Eeschema search stack. VTBL_ENTRY SEARCH_STACK& SchSearchS() { return m_sch_search; } - VTBL_ENTRY wxString GetModuleLibraryNickname() { return m_module_library_nickname; } - VTBL_ENTRY void SetModuleLibraryNickname( const wxString& aNickName ) { m_module_library_nickname = aNickName; } - /// Retain a number of project specific wxStrings, enumerated here: enum RSTRING_T { @@ -144,6 +141,7 @@ public: SCH_LIB_PATH, PCB_LIB_NICKNAME, VIEWER_3D_PATH, + PCB_FOOTPRINT, RSTRING_COUNT }; @@ -252,8 +250,6 @@ private: wxFileName m_project_name; ///< /.pro wxString m_pro_date_and_time; - wxString m_module_library_nickname; ///< @todo move this into m_rpaths[] - /// @see this::SetRString(), GetRString(), and enum RSTRING_T. wxString m_rstrings[RSTRING_COUNT]; diff --git a/pcbnew/librairi.cpp b/pcbnew/librairi.cpp index cc682e485d..556726d826 100644 --- a/pcbnew/librairi.cpp +++ b/pcbnew/librairi.cpp @@ -467,7 +467,7 @@ wxString FOOTPRINT_EDIT_FRAME::CreateNewLibrary() bool FOOTPRINT_EDIT_FRAME::DeleteModuleFromCurrentLibrary() { - wxString nickname = getLibNickName(); + wxString nickname = GetCurrentLib(); if( !Prj().PcbFootprintLibs()->IsFootprintLibWritable( nickname ) ) { diff --git a/pcbnew/modedit.cpp b/pcbnew/modedit.cpp index 784fe1c1e4..ed81bc7989 100644 --- a/pcbnew/modedit.cpp +++ b/pcbnew/modedit.cpp @@ -251,11 +251,11 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) case ID_MODEDIT_SELECT_CURRENT_LIB: { - wxString library = SelectLibrary( getLibNickName() ); + wxString library = SelectLibrary( GetCurrentLib() ); if( library.size() ) { - setLibNickName( library ); + Prj().SetRString( PROJECT::PCB_LIB_NICKNAME, library ); updateTitle(); } } @@ -364,9 +364,9 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) break; case ID_MODEDIT_SAVE_LIBMODULE: - if( GetBoard()->m_Modules && getLibNickName().size() ) + if( GetBoard()->m_Modules && GetCurrentLib().size() ) { - Save_Module_In_Library( getLibNickName(), GetBoard()->m_Modules, true, true ); + Save_Module_In_Library( GetCurrentLib(), GetBoard()->m_Modules, true, true ); GetScreen()->ClrModify(); } break; @@ -506,7 +506,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) SetCrossHairPosition( wxPoint( 0, 0 ) ); - LoadModuleFromLibrary( getLibNickName(), Prj().PcbFootprintLibs(), true ); + LoadModuleFromLibrary( GetCurrentLib(), Prj().PcbFootprintLibs(), true ); redraw = true; if( GetBoard()->m_Modules ) diff --git a/pcbnew/module_editor_frame.h b/pcbnew/module_editor_frame.h index 799ebd5b2c..f20c032c12 100644 --- a/pcbnew/module_editor_frame.h +++ b/pcbnew/module_editor_frame.h @@ -245,8 +245,8 @@ public: UNDO_REDO_T aTypeCommand, const wxPoint& aTransformPoint = wxPoint( 0, 0 ) ); - wxString GetCurrentLib() const { return getLibNickName(); }; - + /// Return the current library nickname. + const wxString GetCurrentLib() const; // Footprint edition void RemoveStruct( EDA_ITEM* Item ); @@ -380,7 +380,7 @@ public: * Install a dialog to edit a graphic item of a footprint body. * @param aItem = a pointer to the graphic item to edit */ - void InstallFootprintBodyItemPropertiesDlg(EDGE_MODULE * aItem); + void InstallFootprintBodyItemPropertiesDlg( EDGE_MODULE* aItem ); /** * Function DlgGlobalChange_PadSettings @@ -397,7 +397,7 @@ public: */ bool DeleteModuleFromCurrentLibrary(); - virtual EDA_COLOR_T GetGridColor( void ) const; + virtual EDA_COLOR_T GetGridColor() const; DECLARE_EVENT_TABLE() @@ -429,15 +429,11 @@ protected: */ void updateTitle(); - /// The library nickName is a short string, for now the same as the library path - /// but without path and without extension. After library table support it becomes - /// a lookup key. - const wxString getLibNickName() const; - void setLibNickName( const wxString& aNickname ); - - /// The libPath is not publicly visible, grab it from the FP_LIB_TABLE if we must. - wxString getLibPath(); + const wxString getLibPath(); + + void restoreLastFootprint(); + void retainLastFootprint(); }; #endif // MODULE_EDITOR_FRAME_H_ diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index 4bf4f464fa..e4f2da8d48 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -168,6 +169,9 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : SetBoard( new BOARD() ); + // restore the last footprint from the project, if any + restoreLastFootprint(); + // Ensure all layers and items are visible: GetBoard()->SetVisibleAlls(); @@ -177,7 +181,7 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : LoadSettings( config() ); GetScreen()->AddGrid( m_UserGridSize, m_UserGridUnit, ID_POPUP_GRID_USER ); - GetScreen()->SetGrid( ID_POPUP_GRID_LEVEL_1000 + m_LastGridSizeId ); + GetScreen()->SetGrid( ID_POPUP_GRID_LEVEL_1000 + m_LastGridSizeId ); // In modedit, set the default paper size to A4: // this should be OK for all footprint to plot/print @@ -230,26 +234,16 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : FOOTPRINT_EDIT_FRAME::~FOOTPRINT_EDIT_FRAME() { + // save the footprint in the PROJECT + retainLastFootprint(); } -const wxString FOOTPRINT_EDIT_FRAME::getLibNickName() const -{ - return Prj().GetModuleLibraryNickname(); -} - - -void FOOTPRINT_EDIT_FRAME::setLibNickName( const wxString& aNickname ) -{ - Prj().SetModuleLibraryNickname( aNickname ); -} - - -wxString FOOTPRINT_EDIT_FRAME::getLibPath() +const wxString FOOTPRINT_EDIT_FRAME::getLibPath() { try { - const wxString& nickname = getLibNickName(); + const wxString& nickname = GetCurrentLib(); const FP_LIB_TABLE::ROW* row = Prj().PcbFootprintLibs()->FindRow( nickname ); @@ -262,6 +256,57 @@ wxString FOOTPRINT_EDIT_FRAME::getLibPath() } +const wxString FOOTPRINT_EDIT_FRAME::GetCurrentLib() const +{ + return Prj().GetRString( PROJECT::PCB_LIB_NICKNAME ); +}; + + +void FOOTPRINT_EDIT_FRAME::retainLastFootprint() +{ + PCB_IO pcb_io; + MODULE* module = GetBoard()->m_Modules; + + if( module ) + { + pcb_io.Format( GetBoard()->m_Modules ); + + wxString pretty = FROM_UTF8( pcb_io.GetStringOutput( true ).c_str() ); + + Prj().SetRString( PROJECT::PCB_FOOTPRINT, pretty ); + } +} + + +void FOOTPRINT_EDIT_FRAME::restoreLastFootprint() +{ + wxString pretty = Prj().GetRString( PROJECT::PCB_FOOTPRINT ); + + if( !!pretty ) + { + PCB_IO pcb_io; + MODULE* module = NULL; + + try + { + module = (MODULE*) pcb_io.Parse( pretty ); + } + catch( const PARSE_ERROR& pe ) + { + // unlikely to be a problem, since we produced the pretty string. + wxLogError( wxT( "PARSE_ERROR" ) ); + } + catch( const IO_ERROR& ioe ) + { + // unlikely to be a problem, since we produced the pretty string. + wxLogError( wxT( "IO_ERROR" ) ); + } + + if( module ) + GetBoard()->Add( module ); // assumes BOARD is empty. + } +} + const wxChar* FOOTPRINT_EDIT_FRAME::GetFootprintEditorFrameName() { return FOOTPRINT_EDIT_FRAME_NAME; @@ -334,9 +379,9 @@ void FOOTPRINT_EDIT_FRAME::OnCloseWindow( wxCloseEvent& Event ) case wxID_YES: // code from FOOTPRINT_EDIT_FRAME::Process_Special_Functions, // at case ID_MODEDIT_SAVE_LIBMODULE - if( GetBoard()->m_Modules && getLibNickName().size() ) + if( GetBoard()->m_Modules && GetCurrentLib().size() ) { - if( Save_Module_In_Library( getLibNickName(), GetBoard()->m_Modules, true, true ) ) + if( Save_Module_In_Library( GetCurrentLib(), GetBoard()->m_Modules, true, true ) ) { // save was correct GetScreen()->ClrModify(); @@ -587,7 +632,7 @@ void FOOTPRINT_EDIT_FRAME::updateTitle() { wxString title = _( "Module Editor " ); - wxString nickname = getLibNickName(); + wxString nickname = GetCurrentLib(); if( !nickname ) { diff --git a/pcbnew/tool_pcb.cpp b/pcbnew/tool_pcb.cpp index c115cbcc37..90c2cf6ee8 100644 --- a/pcbnew/tool_pcb.cpp +++ b/pcbnew/tool_pcb.cpp @@ -30,6 +30,7 @@ */ #include +#include #include #include #include @@ -218,10 +219,14 @@ void PCB_EDIT_FRAME::ReCreateHToolbar() wxAUI_TB_DEFAULT_STYLE | wxAUI_TB_HORZ_LAYOUT ); // Set up toolbar - m_mainToolBar->AddTool( ID_NEW_BOARD, wxEmptyString, KiBitmap( new_pcb_xpm ), - _( "New board" ) ); - m_mainToolBar->AddTool( ID_LOAD_FILE, wxEmptyString, KiBitmap( open_brd_file_xpm ), - _( "Open existing board" ) ); + if( Kiface().IsSingle() ) + { + m_mainToolBar->AddTool( ID_NEW_BOARD, wxEmptyString, KiBitmap( new_pcb_xpm ), + _( "New board" ) ); + m_mainToolBar->AddTool( ID_LOAD_FILE, wxEmptyString, KiBitmap( open_brd_file_xpm ), + _( "Open existing board" ) ); + } + m_mainToolBar->AddTool( ID_SAVE_BOARD, wxEmptyString, KiBitmap( save_xpm ), _( "Save board" ) ); @@ -501,29 +506,29 @@ void PCB_EDIT_FRAME::ReCreateMicrowaveVToolbar() m_microWaveToolBar->AddTool( ID_PCB_MUWAVE_TOOL_SELF_CMD, wxEmptyString, KiBitmap( mw_add_line_xpm ), _( "Create line of specified length for microwave applications" ), - wxITEM_CHECK ); + wxITEM_CHECK ); m_microWaveToolBar->AddTool( ID_PCB_MUWAVE_TOOL_GAP_CMD, wxEmptyString, KiBitmap( mw_add_gap_xpm ), _( "Create gap of specified length for microwave applications" ), - wxITEM_CHECK ); + wxITEM_CHECK ); m_microWaveToolBar->AddSeparator(); m_microWaveToolBar->AddTool( ID_PCB_MUWAVE_TOOL_STUB_CMD, wxEmptyString, KiBitmap( mw_add_stub_xpm ), _( "Create stub of specified length for microwave applications" ), - wxITEM_CHECK ); + wxITEM_CHECK ); m_microWaveToolBar->AddTool( ID_PCB_MUWAVE_TOOL_STUB_ARC_CMD, wxEmptyString, KiBitmap( mw_add_stub_arc_xpm ), _( "Create stub (arc) of specified length for microwave applications" ), - wxITEM_CHECK ); + wxITEM_CHECK ); m_microWaveToolBar->AddTool( ID_PCB_MUWAVE_TOOL_FUNCTION_SHAPE_CMD, wxEmptyString, KiBitmap( mw_add_shape_xpm ), _( "Create a polynomial shape for microwave applications" ), - wxITEM_CHECK ); + wxITEM_CHECK ); m_microWaveToolBar->Realize(); } From 21b70093b0c0b24404448085efe087bbe61c1c38 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Wed, 11 Jun 2014 00:57:26 -0500 Subject: [PATCH 499/741] refinements --- pcbnew/moduleframe.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index e4f2da8d48..7bc72218f6 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -269,10 +269,11 @@ void FOOTPRINT_EDIT_FRAME::retainLastFootprint() if( module ) { - pcb_io.Format( GetBoard()->m_Modules ); + pcb_io.Format( module ); wxString pretty = FROM_UTF8( pcb_io.GetStringOutput( true ).c_str() ); + // save the footprint in the RSTRING facility. Prj().SetRString( PROJECT::PCB_FOOTPRINT, pretty ); } } @@ -303,10 +304,21 @@ void FOOTPRINT_EDIT_FRAME::restoreLastFootprint() } if( module ) - GetBoard()->Add( module ); // assumes BOARD is empty. + { + // assumes BOARD is empty. + wxASSERT( GetBoard()->m_Modules == NULL ); + + // no idea, its monkey see monkey do. I would encapsulate this into + // a member function if its actually necessary. + module->SetParent( GetBoard() ); + module->SetLink( 0 ); + + GetBoard()->Add( module ); + } } } + const wxChar* FOOTPRINT_EDIT_FRAME::GetFootprintEditorFrameName() { return FOOTPRINT_EDIT_FRAME_NAME; From 00e18d214437e3faddc4943b107206389da912a9 Mon Sep 17 00:00:00 2001 From: Jean-Samuel Reynaud Date: Thu, 12 Jun 2014 08:57:00 -0500 Subject: [PATCH 500/741] pcbnew crashed on start compiled with KICAD_SCRIPTING_WXPYTHON=ON --- common/kiway.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/kiway.cpp b/common/kiway.cpp index 396c5cb417..39bbdab38f 100644 --- a/common/kiway.cpp +++ b/common/kiway.cpp @@ -157,7 +157,7 @@ KIFACE* KIWAY::KiFACE( FACE_T aFaceId, bool doLoad ) void* addr = NULL; - if( !dso.Load( dname, wxDL_VERBATIM | wxDL_NOW ) ) + if( !dso.Load( dname, wxDL_VERBATIM | wxDL_NOW | wxDL_GLOBAL ) ) { // Failure: error reporting UI was done via wxLogSysError(). // No further reporting required here. From bee6b9f9b743bd87beb88d95c3c4780fcf00ccef Mon Sep 17 00:00:00 2001 From: Lorenzo Marcantonio Date: Thu, 12 Jun 2014 18:12:14 +0200 Subject: [PATCH 501/741] Fixes #1186269 - Refactored the common part of cursor key movement and crosshair update in the various GeneralControl - Add x10 movement with the keyboard (CTRL modifier) - Avoid fixup of the cursor position by dummy mouse movements generated by cursor warping (original analysis and idea Chris Gibson) - Do key handling in a way to permit sub-pixel cursor movement --- common/draw_frame.cpp | 117 +++++++++++++ cvpcb/class_DisplayFootprintsFrame.cpp | 57 ++----- eeschema/controle.cpp | 225 ++++--------------------- gerbview/controle.cpp | 72 +------- include/draw_frame.h | 14 ++ pagelayout_editor/controle.cpp | 68 ++------ pcbnew/controle.cpp | 76 ++------- pcbnew/footprint_wizard_frame.cpp | 58 ++----- pcbnew/moduleframe.cpp | 74 ++------ pcbnew/modview_frame.cpp | 57 ++----- 10 files changed, 239 insertions(+), 579 deletions(-) diff --git a/common/draw_frame.cpp b/common/draw_frame.cpp index 976aa1e60b..1300ff9718 100644 --- a/common/draw_frame.cpp +++ b/common/draw_frame.cpp @@ -119,6 +119,7 @@ EDA_DRAW_FRAME::EDA_DRAW_FRAME( KIWAY* aKiway, wxWindow* aParent, m_GridColor = DARKGRAY; // Grid color m_snapToGrid = true; m_MsgFrameHeight = EDA_MSG_PANEL::GetRequiredHeight(); + m_movingCursorWithKeyboard = false; m_auimgr.SetFlags(wxAUI_MGR_DEFAULT|wxAUI_MGR_LIVE_RESIZE); @@ -1110,3 +1111,119 @@ void EDA_DRAW_FRAME::SetScrollCenterPosition( const wxPoint& aPoint ) } //------------------------------------------------- + +void EDA_DRAW_FRAME::RefreshCrossHair( const wxPoint &aOldPos, + const wxPoint &aEvtPos, + wxDC* aDC ) +{ + wxPoint newpos = GetCrossHairPosition(); + + // Redraw the crosshair if it moved + if( aOldPos != newpos ) + { + SetCrossHairPosition( aOldPos, false ); + m_canvas->CrossHairOff( aDC ); + SetCrossHairPosition( newpos, false ); + m_canvas->CrossHairOn( aDC ); + + if( m_canvas->IsMouseCaptured() ) + { +#ifdef USE_WX_OVERLAY + wxDCOverlay oDC( m_overlay, (wxWindowDC*)aDC ); + oDC.Clear(); + m_canvas->CallMouseCapture( aDC, aEvtPos, false ); +#else + m_canvas->CallMouseCapture( aDC, aEvtPos, true ); +#endif + } +#ifdef USE_WX_OVERLAY + else + { + m_overlay.Reset(); + } +#endif + } +} + +void EDA_DRAW_FRAME::GeneralControlKeyMovement( int aHotKey, wxPoint *aPos, + bool aSnapToGrid ) +{ + + // If requested snap the current position to the grid + if( aSnapToGrid ) + *aPos = GetNearestGridPosition( *aPos ); + + switch( aHotKey ) + { + // All these keys have almost the same treatment + case GR_KB_CTRL | WXK_NUMPAD8: case GR_KB_CTRL | WXK_UP: + case GR_KB_CTRL | WXK_NUMPAD2: case GR_KB_CTRL | WXK_DOWN: + case GR_KB_CTRL | WXK_NUMPAD4: case GR_KB_CTRL | WXK_LEFT: + case GR_KB_CTRL | WXK_NUMPAD6: case GR_KB_CTRL | WXK_RIGHT: + case WXK_NUMPAD8: case WXK_UP: case WXK_NUMPAD2: case WXK_DOWN: + case WXK_NUMPAD4: case WXK_LEFT: case WXK_NUMPAD6: case WXK_RIGHT: + { + /* Here's a tricky part: when doing cursor key movement, the + * 'previous' point should be taken from memory, *not* from the + * freshly computed position in the event. Otherwise you can't do + * sub-pixel movement. The m_movingCursorWithKeyboard oneshot 'eats' + * the automatic motion event generated by cursor warping */ + wxRealPoint gridSize = GetScreen()->GetGridSize(); + *aPos = GetCrossHairPosition(); + + // Bonus: ^key moves faster (x10) + switch( aHotKey ) + { + case GR_KB_CTRL|WXK_NUMPAD8: + case GR_KB_CTRL|WXK_UP: + aPos->y -= KiROUND( 10 * gridSize.y ); + break; + + case GR_KB_CTRL|WXK_NUMPAD2: + case GR_KB_CTRL|WXK_DOWN: + aPos->y += KiROUND( 10 * gridSize.y ); + break; + + case GR_KB_CTRL|WXK_NUMPAD4: + case GR_KB_CTRL|WXK_LEFT: + aPos->x -= KiROUND( 10 * gridSize.x ); + break; + + case GR_KB_CTRL|WXK_NUMPAD6: + case GR_KB_CTRL|WXK_RIGHT: + aPos->x += KiROUND( 10 * gridSize.x ); + break; + + case WXK_NUMPAD8: + case WXK_UP: + aPos->y -= KiROUND( gridSize.y ); + break; + + case WXK_NUMPAD2: + case WXK_DOWN: + aPos->y += KiROUND( gridSize.y ); + break; + + case WXK_NUMPAD4: + case WXK_LEFT: + aPos->x -= KiROUND( gridSize.x ); + break; + + case WXK_NUMPAD6: + case WXK_RIGHT: + aPos->x += KiROUND( gridSize.x ); + break; + + default: /* Can't happen since we entered the statement */ + break; + } + m_canvas->MoveCursor( *aPos ); + m_movingCursorWithKeyboard = true; + } + break; + + default: + break; + } +} + diff --git a/cvpcb/class_DisplayFootprintsFrame.cpp b/cvpcb/class_DisplayFootprintsFrame.cpp index 7b8b836f6f..9ccef06ec1 100644 --- a/cvpcb/class_DisplayFootprintsFrame.cpp +++ b/cvpcb/class_DisplayFootprintsFrame.cpp @@ -327,17 +327,19 @@ void DISPLAY_FOOTPRINTS_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) void DISPLAY_FOOTPRINTS_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aHotKey ) { - wxRealPoint gridSize; - wxPoint oldpos; - PCB_SCREEN* screen = GetScreen(); - wxPoint pos = aPosition; + // Filter out the 'fake' mouse motion after a keyboard movement + if( !aHotKey && m_movingCursorWithKeyboard ) + { + m_movingCursorWithKeyboard = false; + return; + } wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED ); cmd.SetEventObject( this ); - pos = GetNearestGridPosition( pos ); - oldpos = GetCrossHairPosition(); - gridSize = screen->GetGridSize(); + wxPoint pos = aPosition; + wxPoint oldpos = GetCrossHairPosition(); + GeneralControlKeyMovement( aHotKey, &pos, true ); switch( aHotKey ) { @@ -367,49 +369,12 @@ void DISPLAY_FOOTPRINTS_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPositi break; case ' ': - screen->m_O_Curseur = GetCrossHairPosition(); - break; - - 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_DOWN: - pos.y += KiROUND( gridSize.y ); - m_canvas->MoveCursor( pos ); - break; - - 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_RIGHT: - pos.x += KiROUND( gridSize.x ); - m_canvas->MoveCursor( pos ); + GetScreen()->m_O_Curseur = GetCrossHairPosition(); break; } SetCrossHairPosition( pos ); - - if( oldpos != GetCrossHairPosition() ) - { - pos = GetCrossHairPosition(); - SetCrossHairPosition( oldpos ); - m_canvas->CrossHairOff( aDC ); - SetCrossHairPosition( pos ); - m_canvas->CrossHairOn( aDC ); - - if( m_canvas->IsMouseCaptured() ) - { - m_canvas->CallMouseCapture( aDC, aPosition, 0 ); - } - } + RefreshCrossHair( oldpos, aPosition, aDC ); UpdateStatusBar(); /* Display new cursor coordinates */ } diff --git a/eeschema/controle.cpp b/eeschema/controle.cpp index 9e64f9219e..bbb671eaae 100644 --- a/eeschema/controle.cpp +++ b/eeschema/controle.cpp @@ -205,10 +205,12 @@ SCH_ITEM* SCH_EDIT_FRAME::LocateItem( const wxPoint& aPosition, const KICAD_T aF void SCH_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aHotKey ) { - wxRealPoint gridSize; - SCH_SCREEN* screen = GetScreen(); - wxPoint oldpos; - wxPoint pos = aPosition; + // Filter out the 'fake' mouse motion after a keyboard movement + if( !aHotKey && m_movingCursorWithKeyboard ) + { + m_movingCursorWithKeyboard = false; + return; + } // when moving mouse, use the "magnetic" grid, unless the shift+ctrl keys is pressed // for next cursor position @@ -221,76 +223,18 @@ void SCH_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH if( GetScreen()->m_BlockLocate.GetState() != STATE_NO_BLOCK ) snapToGrid = true; - if( snapToGrid ) - pos = GetNearestGridPosition( pos ); - - oldpos = GetCrossHairPosition(); - gridSize = screen->GetGridSize(); - - switch( aHotKey ) - { - case 0: - break; - - case WXK_NUMPAD8: - case WXK_UP: - pos.y -= KiROUND( gridSize.y ); - m_canvas->MoveCursor( pos ); - break; - - case WXK_NUMPAD2: - case WXK_DOWN: - pos.y += KiROUND( gridSize.y ); - m_canvas->MoveCursor( pos ); - break; - - case WXK_NUMPAD4: - case WXK_LEFT: - pos.x -= KiROUND( gridSize.x ); - m_canvas->MoveCursor( pos ); - break; - - case WXK_NUMPAD6: - case WXK_RIGHT: - pos.x += KiROUND( gridSize.x ); - m_canvas->MoveCursor( pos ); - break; - - default: - break; - } + wxPoint pos = aPosition; + wxPoint oldpos = GetCrossHairPosition(); + GeneralControlKeyMovement( aHotKey, &pos, snapToGrid ); // Update cursor position. SetCrossHairPosition( pos, snapToGrid ); - - if( oldpos != GetCrossHairPosition() ) - { - pos = GetCrossHairPosition(); - SetCrossHairPosition( oldpos, false); - m_canvas->CrossHairOff( aDC ); - SetCrossHairPosition( pos, snapToGrid ); - m_canvas->CrossHairOn( aDC ); - - if( m_canvas->IsMouseCaptured() ) - { -#ifdef USE_WX_OVERLAY - wxDCOverlay oDC( m_overlay, (wxWindowDC*)aDC ); - oDC.Clear(); - m_canvas->CallMouseCapture( aDC, aPosition, false ); -#else - m_canvas->CallMouseCapture( aDC, aPosition, true ); -#endif - } -#ifdef USE_WX_OVERLAY - else - { - m_overlay.Reset(); - } -#endif - } + RefreshCrossHair( oldpos, aPosition, aDC ); if( aHotKey ) { + SCH_SCREEN* screen = GetScreen(); + if( screen->GetCurItem() && screen->GetCurItem()->GetFlags() ) OnHotKey( aDC, aHotKey, aPosition, screen->GetCurItem() ); else @@ -303,9 +247,12 @@ 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; - wxPoint oldpos; - wxPoint pos = aPosition; + // Filter out the 'fake' mouse motion after a keyboard movement + if( !aHotKey && m_movingCursorWithKeyboard ) + { + m_movingCursorWithKeyboard = false; + return; + } // when moving mouse, use the "magnetic" grid, unless the shift+ctrl keys is pressed // for next cursor position @@ -318,73 +265,13 @@ void LIB_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH if( GetScreen()->m_BlockLocate.GetState() != STATE_NO_BLOCK ) snapToGrid = true; - if( snapToGrid ) - pos = GetNearestGridPosition( pos ); - - oldpos = GetCrossHairPosition(); - gridSize = GetScreen()->GetGridSize(); - - switch( aHotKey ) - { - case 0: - break; - - case WXK_NUMPAD8: - case WXK_UP: - pos.y -= KiROUND( gridSize.y ); - m_canvas->MoveCursor( pos ); - break; - - case WXK_NUMPAD2: - case WXK_DOWN: - pos.y += KiROUND( gridSize.y ); - m_canvas->MoveCursor( pos ); - break; - - case WXK_NUMPAD4: - case WXK_LEFT: - pos.x -= KiROUND( gridSize.x ); - m_canvas->MoveCursor( pos ); - break; - - case WXK_NUMPAD6: - case WXK_RIGHT: - pos.x += KiROUND( gridSize.x ); - m_canvas->MoveCursor( pos ); - break; - - default: - break; - } + wxPoint pos = aPosition; + wxPoint oldpos = GetCrossHairPosition(); + GeneralControlKeyMovement( aHotKey, &pos, snapToGrid ); // Update the cursor position. SetCrossHairPosition( pos, snapToGrid ); - - if( oldpos != GetCrossHairPosition() ) - { - pos = GetCrossHairPosition(); - SetCrossHairPosition( oldpos, false ); - m_canvas->CrossHairOff( aDC ); - SetCrossHairPosition( pos, snapToGrid ); - m_canvas->CrossHairOn( aDC ); - - if( m_canvas->IsMouseCaptured() ) - { -#ifdef USE_WX_OVERLAY - wxDCOverlay oDC( m_overlay, (wxWindowDC*)aDC ); - oDC.Clear(); - m_canvas->CallMouseCapture( aDC, aPosition, false ); -#else - m_canvas->CallMouseCapture( aDC, aPosition, true ); -#endif - } -#ifdef USE_WX_OVERLAY - else - { - m_overlay.Reset(); - } -#endif - } + RefreshCrossHair( oldpos, aPosition, aDC ); if( aHotKey ) { @@ -397,72 +284,30 @@ void LIB_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH void LIB_VIEW_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aHotKey ) { - wxRealPoint gridSize; - SCH_SCREEN* screen = GetScreen(); - wxPoint oldpos; - wxPoint pos = aPosition; - - pos = GetNearestGridPosition( pos ); - oldpos = GetCrossHairPosition(); - gridSize = screen->GetGridSize(); - - switch( aHotKey ) + // Filter out the 'fake' mouse motion after a keyboard movement + if( !aHotKey && m_movingCursorWithKeyboard ) { - case 0: - break; - - case WXK_NUMPAD8: - case WXK_UP: - pos.y -= KiROUND( gridSize.y ); - m_canvas->MoveCursor( pos ); - break; - - case WXK_NUMPAD2: - case WXK_DOWN: - pos.y += KiROUND( gridSize.y ); - m_canvas->MoveCursor( pos ); - break; - - case WXK_NUMPAD4: - case WXK_LEFT: - pos.x -= KiROUND( gridSize.x ); - m_canvas->MoveCursor( pos ); - break; - - case WXK_NUMPAD6: - case WXK_RIGHT: - pos.x += KiROUND( gridSize.x ); - m_canvas->MoveCursor( pos ); - break; - - default: - break; + m_movingCursorWithKeyboard = false; + return; } + wxPoint pos = aPosition; + wxPoint oldpos = GetCrossHairPosition(); + GeneralControlKeyMovement( aHotKey, &pos, true ); + // Update cursor position. - SetCrossHairPosition( pos ); - - if( oldpos != GetCrossHairPosition() ) - { - pos = GetCrossHairPosition(); - SetCrossHairPosition( oldpos ); - m_canvas->CrossHairOff( aDC ); - SetCrossHairPosition( pos ); - m_canvas->CrossHairOn( aDC ); - - if( m_canvas->IsMouseCaptured() ) - { - m_canvas->CallMouseCapture( aDC, aPosition, true ); - } - } + SetCrossHairPosition( pos, true ); + RefreshCrossHair( oldpos, aPosition, aDC ); if( aHotKey ) { + SCH_SCREEN* screen = GetScreen(); + if( screen->GetCurItem() && screen->GetCurItem()->GetFlags() ) OnHotKey( aDC, aHotKey, aPosition, screen->GetCurItem() ); else OnHotKey( aDC, aHotKey, aPosition, NULL ); } - UpdateStatusBar(); + UpdateStatusBar(); /* Display cursor coordinates info */ } diff --git a/gerbview/controle.cpp b/gerbview/controle.cpp index fedb66b381..150b23d064 100644 --- a/gerbview/controle.cpp +++ b/gerbview/controle.cpp @@ -34,73 +34,19 @@ void GERBVIEW_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aHotKey ) { - wxRealPoint gridSize; - wxPoint oldpos; - wxPoint pos = aPosition; - - pos = GetNearestGridPosition( pos ); - - oldpos = GetCrossHairPosition(); - gridSize = GetScreen()->GetGridSize(); - - switch( aHotKey ) + // Filter out the 'fake' mouse motion after a keyboard movement + if( !aHotKey && m_movingCursorWithKeyboard ) { - case WXK_NUMPAD8: - case WXK_UP: - pos.y -= KiROUND( gridSize.y ); - m_canvas->MoveCursor( pos ); - break; - - case WXK_NUMPAD2: - case WXK_DOWN: - pos.y += KiROUND( gridSize.y ); - m_canvas->MoveCursor( pos ); - break; - - case WXK_NUMPAD4: - case WXK_LEFT: - pos.x -= KiROUND( gridSize.x ); - m_canvas->MoveCursor( pos ); - break; - - case WXK_NUMPAD6: - case WXK_RIGHT: - pos.x += KiROUND( gridSize.x ); - m_canvas->MoveCursor( pos ); - break; - - default: - break; + m_movingCursorWithKeyboard = false; + return; } + wxPoint pos = aPosition; + wxPoint oldpos = GetCrossHairPosition(); + GeneralControlKeyMovement( aHotKey, &pos, true ); + SetCrossHairPosition( pos ); - - if( oldpos != GetCrossHairPosition() ) - { - pos = GetCrossHairPosition(); - SetCrossHairPosition( oldpos ); - m_canvas->CrossHairOff( aDC ); - SetCrossHairPosition( pos ); - m_canvas->CrossHairOn( aDC ); - - if( m_canvas->IsMouseCaptured() ) - { -#ifdef USE_WX_OVERLAY - wxDCOverlay oDC( m_overlay, (wxWindowDC*)aDC ); - oDC.Clear(); - m_canvas->CallMouseCapture( aDC, aPosition, false ); -#else - m_canvas->CallMouseCapture( aDC, aPosition, true ); -#endif - } -#ifdef USE_WX_OVERLAY - else - { - m_overlay.Reset(); - } -#endif - - } + RefreshCrossHair( oldpos, aPosition, aDC ); if( aHotKey ) { diff --git a/include/draw_frame.h b/include/draw_frame.h index a76e1f4cc6..44023def51 100644 --- a/include/draw_frame.h +++ b/include/draw_frame.h @@ -105,6 +105,9 @@ protected: wxOverlay m_overlay; #endif + /// One-shot to avoid a recursive mouse event during hotkey movement + bool m_movingCursorWithKeyboard; + void SetScreen( BASE_SCREEN* aScreen ) { m_currentScreen = aScreen; } /** @@ -116,6 +119,17 @@ protected: */ virtual void unitsChangeRefresh(); + /** + * Function GeneralControlKeyMovement + * Handle the common part of GeneralControl dedicated to global + * cursor keys (i.e. cursor movement by keyboard) */ + void GeneralControlKeyMovement( int aHotKey, wxPoint *aPos, bool aSnapToGrid ); + + /* Function RefreshCrosshair + * Move and refresh the crosshair after movement; also call the + * mouse capture function, if active. + */ + void RefreshCrossHair( const wxPoint &aOldPos, const wxPoint &aEvtPos, wxDC* aDC ); public: EDA_DRAW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrameType, diff --git a/pagelayout_editor/controle.cpp b/pagelayout_editor/controle.cpp index 5225200857..6d593faa16 100644 --- a/pagelayout_editor/controle.cpp +++ b/pagelayout_editor/controle.cpp @@ -35,68 +35,20 @@ void PL_EDITOR_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aHotKey ) { - wxPoint pos = GetNearestGridPosition( aPosition ); - wxPoint oldpos = GetCrossHairPosition(); - wxRealPoint gridSize = GetScreen()->GetGridSize(); - - switch( aHotKey ) + // Filter out the 'fake' mouse motion after a keyboard movement + if( !aHotKey && m_movingCursorWithKeyboard ) { - case WXK_NUMPAD8: - case WXK_UP: - pos.y -= KiROUND( gridSize.y ); - m_canvas->MoveCursor( pos ); - break; - - case WXK_NUMPAD2: - case WXK_DOWN: - pos.y += KiROUND( gridSize.y ); - m_canvas->MoveCursor( pos ); - break; - - case WXK_NUMPAD4: - case WXK_LEFT: - pos.x -= KiROUND( gridSize.x ); - m_canvas->MoveCursor( pos ); - break; - - case WXK_NUMPAD6: - case WXK_RIGHT: - pos.x += KiROUND( gridSize.x ); - m_canvas->MoveCursor( pos ); - break; - - default: - break; + m_movingCursorWithKeyboard = false; + return; } - SetCrossHairPosition( pos ); + wxPoint pos = aPosition; + wxPoint oldpos = GetCrossHairPosition(); + GeneralControlKeyMovement( aHotKey, &pos, true ); - if( oldpos != GetCrossHairPosition() ) - { - pos = GetCrossHairPosition(); - SetCrossHairPosition( oldpos ); - m_canvas->CrossHairOff( aDC ); - SetCrossHairPosition( pos ); - m_canvas->CrossHairOn( aDC ); - - if( m_canvas->IsMouseCaptured() ) - { -#ifdef USE_WX_OVERLAY - wxDCOverlay oDC( m_overlay, (wxWindowDC*)aDC ); - oDC.Clear(); - m_canvas->CallMouseCapture( aDC, aPosition, false ); -#else - m_canvas->CallMouseCapture( aDC, aPosition, true ); -#endif - } -#ifdef USE_WX_OVERLAY - else - { - m_overlay.Reset(); - } -#endif - - } + // Update cursor position. + SetCrossHairPosition( pos, true ); + RefreshCrossHair( oldpos, aPosition, aDC ); if( aHotKey ) { diff --git a/pcbnew/controle.cpp b/pcbnew/controle.cpp index 06f07af712..c5f1d00f9f 100644 --- a/pcbnew/controle.cpp +++ b/pcbnew/controle.cpp @@ -284,9 +284,12 @@ BOARD_ITEM* PCB_BASE_FRAME::PcbGeneralLocateAndDisplay( int aHotKeyCode ) void PCB_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aHotKey ) { - wxRealPoint gridSize; - wxPoint oldpos; - wxPoint pos = aPosition; + // Filter out the 'fake' mouse motion after a keyboard movement + if( !aHotKey && m_movingCursorWithKeyboard ) + { + m_movingCursorWithKeyboard = false; + return; + } // when moving mouse, use the "magnetic" grid, unless the shift+ctrl keys is pressed // for next cursor position @@ -295,42 +298,9 @@ void PCB_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH if( !aHotKey && wxGetKeyState( WXK_SHIFT ) && wxGetKeyState( WXK_CONTROL ) ) snapToGrid = false; - if( snapToGrid ) - pos = GetNearestGridPosition( pos ); - - oldpos = GetCrossHairPosition(); - - gridSize = GetScreen()->GetGridSize(); - - switch( aHotKey ) - { - case WXK_NUMPAD8: - case WXK_UP: - pos.y -= KiROUND( gridSize.y ); - m_canvas->MoveCursor( pos ); - break; - - case WXK_NUMPAD2: - case WXK_DOWN: - pos.y += KiROUND( gridSize.y ); - m_canvas->MoveCursor( pos ); - break; - - case WXK_NUMPAD4: - case WXK_LEFT: - pos.x -= KiROUND( gridSize.x ); - m_canvas->MoveCursor( pos ); - break; - - case WXK_NUMPAD6: - case WXK_RIGHT: - pos.x += KiROUND( gridSize.x ); - m_canvas->MoveCursor( pos ); - break; - - default: - break; - } + wxPoint oldpos = GetCrossHairPosition(); + wxPoint pos = aPosition; + GeneralControlKeyMovement( aHotKey, &pos, snapToGrid ); // Put cursor in new position, according to the zoom keys (if any). SetCrossHairPosition( pos, snapToGrid ); @@ -347,6 +317,7 @@ void PCB_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH wxPoint curs_pos = pos; + wxRealPoint gridSize = GetScreen()->GetGridSize(); wxSize igridsize; igridsize.x = KiROUND( gridSize.x ); igridsize.y = KiROUND( gridSize.y ); @@ -368,32 +339,7 @@ void PCB_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH } } - - if( oldpos != GetCrossHairPosition() ) - { - pos = GetCrossHairPosition(); - SetCrossHairPosition( oldpos, false ); - m_canvas->CrossHairOff( aDC ); - SetCrossHairPosition( pos, false ); - m_canvas->CrossHairOn( aDC ); - - if( m_canvas->IsMouseCaptured() ) - { -#ifdef USE_WX_OVERLAY - wxDCOverlay oDC( m_overlay, (wxWindowDC*)aDC ); - oDC.Clear(); - m_canvas->CallMouseCapture( aDC, aPosition, false ); -#else - m_canvas->CallMouseCapture( aDC, aPosition, true ); -#endif - } -#ifdef USE_WX_OVERLAY - else - { - m_overlay.Reset(); - } -#endif - } + RefreshCrossHair( oldpos, aPosition, aDC ); if( aHotKey ) { diff --git a/pcbnew/footprint_wizard_frame.cpp b/pcbnew/footprint_wizard_frame.cpp index 0cff8d2bb1..0e0c92cc3c 100644 --- a/pcbnew/footprint_wizard_frame.cpp +++ b/pcbnew/footprint_wizard_frame.cpp @@ -457,18 +457,19 @@ void FOOTPRINT_WIZARD_FRAME::OnActivate( wxActivateEvent& event ) void FOOTPRINT_WIZARD_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aHotKey ) { - wxRealPoint gridSize; - wxPoint oldpos; - PCB_SCREEN* screen = GetScreen(); - wxPoint pos = aPosition; + // Filter out the 'fake' mouse motion after a keyboard movement + if( !aHotKey && m_movingCursorWithKeyboard ) + { + m_movingCursorWithKeyboard = false; + return; + } wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED ); - cmd.SetEventObject( this ); - pos = GetNearestGridPosition( pos ); - oldpos = GetCrossHairPosition(); - gridSize = screen->GetGridSize(); + wxPoint pos = aPosition; + wxPoint oldpos = GetCrossHairPosition(); + GeneralControlKeyMovement( aHotKey, &pos, true ); switch( aHotKey ) { @@ -498,49 +499,12 @@ void FOOTPRINT_WIZARD_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition break; case ' ': - screen->m_O_Curseur = GetCrossHairPosition(); - break; - - 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_DOWN: - pos.y += KiROUND( gridSize.y ); - m_canvas->MoveCursor( pos ); - break; - - 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_RIGHT: - pos.x += KiROUND( gridSize.x ); - m_canvas->MoveCursor( pos ); + GetScreen()->m_O_Curseur = GetCrossHairPosition(); break; } SetCrossHairPosition( pos ); - - if( oldpos != GetCrossHairPosition() ) - { - pos = GetCrossHairPosition(); - SetCrossHairPosition( oldpos ); - m_canvas->CrossHairOff( aDC ); - SetCrossHairPosition( pos ); - m_canvas->CrossHairOn( aDC ); - - if( m_canvas->IsMouseCaptured() ) - { - m_canvas->CallMouseCapture( aDC, aPosition, 0 ); - } - } + RefreshCrossHair( oldpos, aPosition, aDC ); UpdateStatusBar(); // Display new cursor coordinates } diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index 7bc72218f6..d844321bdc 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -546,9 +546,12 @@ void FOOTPRINT_EDIT_FRAME::Show3D_Frame( wxCommandEvent& event ) void FOOTPRINT_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aHotKey ) { - wxRealPoint gridSize; - wxPoint oldpos; - wxPoint pos = aPosition; + // Filter out the 'fake' mouse motion after a keyboard movement + if( !aHotKey && m_movingCursorWithKeyboard ) + { + m_movingCursorWithKeyboard = false; + return; + } // when moving mouse, use the "magnetic" grid, unless the shift+ctrl keys is pressed // for next cursor position @@ -558,69 +561,12 @@ void FOOTPRINT_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, if( !aHotKey && wxGetKeyState( WXK_SHIFT ) && wxGetKeyState( WXK_CONTROL ) ) snapToGrid = false; - if( snapToGrid ) - pos = GetNearestGridPosition( pos ); - - oldpos = GetCrossHairPosition(); - gridSize = GetScreen()->GetGridSize(); - - switch( aHotKey ) - { - case WXK_NUMPAD8: - case WXK_UP: - pos.y -= KiROUND( gridSize.y ); - m_canvas->MoveCursor( pos ); - break; - - case WXK_NUMPAD2: - case WXK_DOWN: - pos.y += KiROUND( gridSize.y ); - m_canvas->MoveCursor( pos ); - break; - - case WXK_NUMPAD4: - case WXK_LEFT: - pos.x -= KiROUND( gridSize.x ); - m_canvas->MoveCursor( pos ); - break; - - case WXK_NUMPAD6: - case WXK_RIGHT: - pos.x += KiROUND( gridSize.x ); - m_canvas->MoveCursor( pos ); - break; - - default: - break; - } + wxPoint oldpos = GetCrossHairPosition(); + wxPoint pos = aPosition; + GeneralControlKeyMovement( aHotKey, &pos, snapToGrid ); SetCrossHairPosition( pos, snapToGrid ); - - if( oldpos != GetCrossHairPosition() ) - { - pos = GetCrossHairPosition(); - SetCrossHairPosition( oldpos, false ); - m_canvas->CrossHairOff( aDC ); - SetCrossHairPosition( pos, snapToGrid ); - m_canvas->CrossHairOn( aDC ); - - if( m_canvas->IsMouseCaptured() ) - { -#ifdef USE_WX_OVERLAY - wxDCOverlay oDC( m_overlay, (wxWindowDC*)aDC ); - oDC.Clear(); - m_canvas->CallMouseCapture( aDC, aPosition, false ); -#else - m_canvas->CallMouseCapture( aDC, aPosition, true ); -#endif - } -#ifdef USE_WX_OVERLAY - else - { - m_overlay.Reset(); - } -#endif - } + RefreshCrossHair( oldpos, aPosition, aDC ); if( aHotKey ) { diff --git a/pcbnew/modview_frame.cpp b/pcbnew/modview_frame.cpp index dc24cf3208..e0a5302d19 100644 --- a/pcbnew/modview_frame.cpp +++ b/pcbnew/modview_frame.cpp @@ -533,17 +533,19 @@ void FOOTPRINT_VIEWER_FRAME::OnActivate( wxActivateEvent& event ) void FOOTPRINT_VIEWER_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aHotKey ) { - wxRealPoint gridSize; - wxPoint oldpos; - PCB_SCREEN* screen = GetScreen(); - wxPoint pos = aPosition; + // Filter out the 'fake' mouse motion after a keyboard movement + if( !aHotKey && m_movingCursorWithKeyboard ) + { + m_movingCursorWithKeyboard = false; + return; + } wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED ); cmd.SetEventObject( this ); - pos = GetNearestGridPosition( pos ); - oldpos = GetCrossHairPosition(); - gridSize = screen->GetGridSize(); + wxPoint oldpos = GetCrossHairPosition(); + wxPoint pos = aPosition; + GeneralControlKeyMovement( aHotKey, &pos, true ); switch( aHotKey ) { @@ -573,49 +575,12 @@ void FOOTPRINT_VIEWER_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition break; case ' ': - screen->m_O_Curseur = GetCrossHairPosition(); - break; - - 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_DOWN: - pos.y += KiROUND( gridSize.y ); - m_canvas->MoveCursor( pos ); - break; - - 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_RIGHT: - pos.x += KiROUND( gridSize.x ); - m_canvas->MoveCursor( pos ); + GetScreen()->m_O_Curseur = GetCrossHairPosition(); break; } SetCrossHairPosition( pos ); - - if( oldpos != GetCrossHairPosition() ) - { - pos = GetCrossHairPosition(); - SetCrossHairPosition( oldpos ); - m_canvas->CrossHairOff( aDC ); - SetCrossHairPosition( pos ); - m_canvas->CrossHairOn( aDC ); - - if( m_canvas->IsMouseCaptured() ) - { - m_canvas->CallMouseCapture( aDC, aPosition, 0 ); - } - } + RefreshCrossHair( oldpos, aPosition, aDC ); UpdateStatusBar(); // Display new cursor coordinates } From bb79ec84bc285adfd9cb1f53fc7e33ef3a80a2f3 Mon Sep 17 00:00:00 2001 From: Lorenzo Marcantonio Date: Thu, 12 Jun 2014 20:34:16 +0200 Subject: [PATCH 502/741] In KIFACE_I::end_common save the 'common' configuration variables loaded in KIFACE_I::begin_common (the background color and the page border flag) --- common/kiface_i.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/kiface_i.cpp b/common/kiface_i.cpp index 3693d1998d..42d7799597 100644 --- a/common/kiface_i.cpp +++ b/common/kiface_i.cpp @@ -123,6 +123,11 @@ bool KIFACE_I::start_common( int aCtlBits ) void KIFACE_I::end_common() { + /* Save common preferences; the background still uses the old legacy + * color numbers, not the new names */ + m_bm.m_config->Write( showPageLimitsKey, g_ShowPageLimits ); + m_bm.m_config->Write( backgroundColorKey, int( g_DrawBgColor ) ); + m_bm.End(); } From 52d2e7eb5952bee1d9cc1ff91c861c567de54b65 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 12 Jun 2014 22:03:57 +0200 Subject: [PATCH 503/741] Fix a bug in ClassOf which crashes Pcbnew when its argument is NULL. It fixes bug #1329364. --- include/core/typeinfo.h | 4 ++-- pcbnew/class_board.h | 2 +- pcbnew/class_board_connected_item.h | 5 ++++- pcbnew/class_edge_mod.h | 2 +- pcbnew/class_text_mod.h | 2 +- pcbnew/class_track.h | 4 ++-- pcbnew/editrack.cpp | 1 + 7 files changed, 12 insertions(+), 8 deletions(-) diff --git a/include/core/typeinfo.h b/include/core/typeinfo.h index 9b89ac8b04..d995b14fcb 100644 --- a/include/core/typeinfo.h +++ b/include/core/typeinfo.h @@ -150,11 +150,11 @@ struct remove_pointer template bool IsA(const I *aObject) { - return remove_pointer::type::ClassOf(aObject); + return aObject && remove_pointer::type::ClassOf(aObject); } template -bool IsA(const I& aObject) +bool IsA(const I& aObject) { return remove_pointer::type::ClassOf(&aObject); } diff --git a/pcbnew/class_board.h b/pcbnew/class_board.h index b8cdc49950..90f5e2d655 100644 --- a/pcbnew/class_board.h +++ b/pcbnew/class_board.h @@ -222,7 +222,7 @@ private: public: static inline bool ClassOf( const EDA_ITEM* aItem ) { - return PCB_T == aItem->Type(); + return aItem && PCB_T == aItem->Type(); } void SetFileName( const wxString& aFileName ) { m_fileName = aFileName; } diff --git a/pcbnew/class_board_connected_item.h b/pcbnew/class_board_connected_item.h index 7b3f11b511..15dfe31f54 100644 --- a/pcbnew/class_board_connected_item.h +++ b/pcbnew/class_board_connected_item.h @@ -60,9 +60,12 @@ public: static inline bool ClassOf( const EDA_ITEM* aItem ) { + if( aItem == NULL ) + return false; + switch( aItem->Type() ) { - case PCB_PAD_T: + case PCB_PAD_T: case PCB_TRACE_T: case PCB_VIA_T: case PCB_ZONE_AREA_T: diff --git a/pcbnew/class_edge_mod.h b/pcbnew/class_edge_mod.h index fca427d0ad..7b8d5b09c8 100644 --- a/pcbnew/class_edge_mod.h +++ b/pcbnew/class_edge_mod.h @@ -56,7 +56,7 @@ public: static inline bool ClassOf( const EDA_ITEM* aItem ) { - return PCB_MODULE_EDGE_T == aItem->Type(); + return aItem && PCB_MODULE_EDGE_T == aItem->Type(); } void Copy( EDGE_MODULE* source ); // copy structure diff --git a/pcbnew/class_text_mod.h b/pcbnew/class_text_mod.h index d3a7d7ecef..e9595a307f 100644 --- a/pcbnew/class_text_mod.h +++ b/pcbnew/class_text_mod.h @@ -68,7 +68,7 @@ public: static inline bool ClassOf( const EDA_ITEM* aItem ) { - return PCB_MODULE_TEXT_T == aItem->Type(); + return aItem && PCB_MODULE_TEXT_T == aItem->Type(); } diff --git a/pcbnew/class_track.h b/pcbnew/class_track.h index 258586d3f7..a35b62dcf5 100644 --- a/pcbnew/class_track.h +++ b/pcbnew/class_track.h @@ -82,7 +82,7 @@ class TRACK : public BOARD_CONNECTED_ITEM public: static inline bool ClassOf( const EDA_ITEM* aItem ) { - return PCB_TRACE_T == aItem->Type(); + return aItem && PCB_TRACE_T == aItem->Type(); } BOARD_CONNECTED_ITEM* start; // pointers to a connected item (pad or track) @@ -382,7 +382,7 @@ public: static inline bool ClassOf( const EDA_ITEM *aItem ) { - return PCB_VIA_T == aItem->Type(); + return aItem && PCB_VIA_T == aItem->Type(); } // Do not create a copy constructor. The one generated by the compiler is adequate. diff --git a/pcbnew/editrack.cpp b/pcbnew/editrack.cpp index 5842a921ce..fa5dbacf73 100644 --- a/pcbnew/editrack.cpp +++ b/pcbnew/editrack.cpp @@ -62,6 +62,7 @@ static void Abort_Create_Track( EDA_DRAW_PANEL* Panel, wxDC* DC ) { PCB_EDIT_FRAME* frame = (PCB_EDIT_FRAME*) Panel->GetParent(); BOARD* pcb = frame->GetBoard(); + TRACK* track = dyn_cast( frame->GetCurItem() ); if( track ) From a91eabb805f45035d255a0e5027e0c7e7555c38b Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 16 Jun 2014 14:02:15 +0200 Subject: [PATCH 504/741] Apply vrml_layer_pth, from Cirilo Bernardo --- pcbnew/exporters/export_vrml.cpp | 142 ++++++------ utils/idftools/vrml_layer.cpp | 358 ++++++++++++++++++++++++------- utils/idftools/vrml_layer.h | 51 ++++- 3 files changed, 396 insertions(+), 155 deletions(-) diff --git a/pcbnew/exporters/export_vrml.cpp b/pcbnew/exporters/export_vrml.cpp index 5b8de962d1..4da01357c9 100644 --- a/pcbnew/exporters/export_vrml.cpp +++ b/pcbnew/exporters/export_vrml.cpp @@ -25,37 +25,6 @@ */ -/* - * NOTE: - * 1. for improved looks, create a DRILL layer for PTH drills. - * To render the improved board, render the vertical outline only - * for the board (no added drill holes), then render the - * outline only for PTH, and finally render the top and bottom - * of the board. NOTE: if we don't want extra eye-candy then - * we must maintain the current board export. - * Additional bits needed for improved eyecandy: - * + CalcOutline: calculates only the outline of a VRML_LAYER or - * a VERTICAL_HOLES - * + WriteVerticalIndices: writes the indices of only the vertical - * facets of a VRML_LAYER or a VRML_HOLES. - * + WriteVerticalVertices: writes only the outline vertices to - * form vertical walls; applies to VRML_LAYER and VRML_HOLES - * - * 2. How can we suppress fiducials such as those in the corners of the pic-programmer demo? - * - */ - -/* - * KNOWN BUGS: - * 1. silk outlines are sometimes mangled; this is somehow due to - * many overlapping segments. This does not happen in 3Dviewer - * so it is worth inspecting that code to see what is different. - * - * These artefacts can be suppressed for exploratory purposes by - * removing the line width parameter from the length calculation in - * export_vrml_line() - */ - #include #include #include @@ -88,7 +57,7 @@ #define MIN_VRML_LINEWIDTH 0.12 // offset for art layers, mm (silk, paste, etc) -#define ART_OFFSET 0.02 +#define ART_OFFSET 0.025 /* helper function: * some characters cannot be used in names, @@ -183,6 +152,7 @@ public: VRML_LAYER bot_silk; VRML_LAYER top_tin; VRML_LAYER bot_tin; + VRML_LAYER plated_holes; double scale; // board internal units to output scaling double minLineWidth; // minimum width of a VRML line segment @@ -229,8 +199,18 @@ public: void SetOffset( double aXoff, double aYoff ) { - tx = aXoff; - ty = aYoff; + tx = aXoff; + ty = -aYoff; + + holes.SetVertexOffsets( aXoff, aYoff ); + board.SetVertexOffsets( aXoff, aYoff ); + top_copper.SetVertexOffsets( aXoff, aYoff ); + bot_copper.SetVertexOffsets( aXoff, aYoff ); + top_silk.SetVertexOffsets( aXoff, aYoff ); + bot_silk.SetVertexOffsets( aXoff, aYoff ); + top_tin.SetVertexOffsets( aXoff, aYoff ); + bot_tin.SetVertexOffsets( aXoff, aYoff ); + plated_holes.SetVertexOffsets( aXoff, aYoff ); } double GetLayerZ( LAYER_NUM aLayer ) @@ -278,6 +258,7 @@ public: bot_silk.SetArcParams( iMaxSeg, smin, smax ); top_tin.SetArcParams( iMaxSeg, smin, smax ); bot_tin.SetArcParams( iMaxSeg, smin, smax ); + plated_holes.SetArcParams( iMaxSeg, smin, smax ); return true; } @@ -455,6 +436,16 @@ static void write_layers( MODEL_VRML& aModel, std::ofstream& output_file, BOARD* - Millimeter2iu( ART_OFFSET / 2.0 ) * aModel.scale, 0, aModel.precision ); + // VRML_LAYER PTH; + aModel.plated_holes.Tesselate( NULL, true ); + write_triangle_bag( output_file, aModel.GetColor( VRML_COLOR_TIN ), + &aModel.plated_holes, false, false, + aModel.GetLayerZ( LAST_COPPER_LAYER ) + + Millimeter2iu( ART_OFFSET / 2.0 ) * aModel.scale, + aModel.GetLayerZ( FIRST_COPPER_LAYER ) + - Millimeter2iu( ART_OFFSET / 2.0 ) * aModel.scale, + aModel.precision ); + // VRML_LAYER top_silk; aModel.top_silk.Tesselate( &aModel.holes ); write_triangle_bag( output_file, aModel.GetColor( VRML_COLOR_SILK ), @@ -588,10 +579,10 @@ static void export_vrml_drawsegment( MODEL_VRML& aModel, DRAWSEGMENT* drawseg ) { LAYER_NUM layer = drawseg->GetLayer(); double w = drawseg->GetWidth() * aModel.scale; - double x = drawseg->GetStart().x * aModel.scale + aModel.tx; - double y = drawseg->GetStart().y * aModel.scale + aModel.ty; - double xf = drawseg->GetEnd().x * aModel.scale + aModel.tx; - double yf = drawseg->GetEnd().y * aModel.scale + aModel.ty; + double x = drawseg->GetStart().x * aModel.scale; + double y = drawseg->GetStart().y * aModel.scale; + double xf = drawseg->GetEnd().x * aModel.scale; + double yf = drawseg->GetEnd().y * aModel.scale; // Items on the edge layer are handled elsewhere; just return if( layer == EDGE_N ) @@ -626,12 +617,10 @@ static void vrml_text_callback( int x0, int y0, int xf, int yf ) LAYER_NUM s_text_layer = model_vrml->s_text_layer; int s_text_width = model_vrml->s_text_width; double scale = model_vrml->scale; - double tx = model_vrml->tx; - double ty = model_vrml->ty; export_vrml_line( *model_vrml, s_text_layer, - x0 * scale + tx, y0 * scale + ty, - xf * scale + tx, yf * scale + ty, + x0 * scale, y0 * scale, + xf * scale, yf * scale, s_text_width * scale ); } @@ -729,8 +718,6 @@ static void export_vrml_board( MODEL_VRML& aModel, BOARD* pcb ) } double scale = aModel.scale; - double dx = aModel.tx; - double dy = aModel.ty; int i = 0; int seg; @@ -756,8 +743,8 @@ static void export_vrml_board( MODEL_VRML& aModel, BOARD* pcb ) if( bufferPcbOutlines[i].end_contour ) break; - aModel.board.AddVertex( seg, bufferPcbOutlines[i].x * scale + dx, - -(bufferPcbOutlines[i].y * scale + dy) ); + aModel.board.AddVertex( seg, bufferPcbOutlines[i].x * scale, + -(bufferPcbOutlines[i].y * scale ) ); ++i; } @@ -788,8 +775,8 @@ static void export_vrml_board( MODEL_VRML& aModel, BOARD* pcb ) if( allLayerHoles[i].end_contour ) break; - aModel.holes.AddVertex( seg, allLayerHoles[i].x * scale + dx, - -(allLayerHoles[i].y * scale + dy) ); + aModel.holes.AddVertex( seg, allLayerHoles[i].x * scale, + -(allLayerHoles[i].y * scale ) ); ++i; } @@ -849,8 +836,8 @@ static void export_vrml_via( MODEL_VRML& aModel, BOARD* pcb, const VIA* via ) hole = via->GetDrillValue() * aModel.scale / 2.0; r = via->GetWidth() * aModel.scale / 2.0; - x = via->GetStart().x * aModel.scale + aModel.tx; - y = via->GetStart().y * aModel.scale + aModel.ty; + x = via->GetStart().x * aModel.scale; + y = via->GetStart().y * aModel.scale; via->LayerPair( &top_layer, &bottom_layer ); // do not render a buried via @@ -873,10 +860,10 @@ static void export_vrml_tracks( MODEL_VRML& aModel, BOARD* pcb ) else if( track->GetLayer() == FIRST_COPPER_LAYER || track->GetLayer() == LAST_COPPER_LAYER ) export_vrml_line( aModel, track->GetLayer(), - track->GetStart().x * aModel.scale + aModel.tx, - track->GetStart().y * aModel.scale + aModel.ty, - track->GetEnd().x * aModel.scale + aModel.tx, - track->GetEnd().y * aModel.scale + aModel.ty, + track->GetStart().x * aModel.scale, + track->GetStart().y * aModel.scale, + track->GetEnd().x * aModel.scale, + track->GetEnd().y * aModel.scale, track->GetWidth() * aModel.scale ); } } @@ -886,9 +873,6 @@ static void export_vrml_zones( MODEL_VRML& aModel, BOARD* aPcb ) { double scale = aModel.scale; - double dx = aModel.tx; - double dy = aModel.ty; - double x, y; for( int ii = 0; ii < aPcb->GetAreaCount(); ii++ ) @@ -920,8 +904,8 @@ static void export_vrml_zones( MODEL_VRML& aModel, BOARD* aPcb ) while( i < nvert ) { - x = poly.GetX(i) * scale + dx; - y = -(poly.GetY(i) * scale + dy); + x = poly.GetX(i) * scale; + y = -(poly.GetY(i) * scale); if( poly.IsEndContour(i) ) break; @@ -971,10 +955,10 @@ static void export_vrml_edge_module( MODEL_VRML& aModel, EDGE_MODULE* aOutline, double aOrientation ) { LAYER_NUM layer = aOutline->GetLayer(); - double x = aOutline->GetStart().x * aModel.scale + aModel.tx; - double y = aOutline->GetStart().y * aModel.scale + aModel.ty; - double xf = aOutline->GetEnd().x * aModel.scale + aModel.tx; - double yf = aOutline->GetEnd().y * aModel.scale + aModel.ty; + double x = aOutline->GetStart().x * aModel.scale; + double y = aOutline->GetStart().y * aModel.scale; + double xf = aOutline->GetEnd().x * aModel.scale; + double yf = aOutline->GetEnd().y * aModel.scale; double w = aOutline->GetWidth() * aModel.scale; switch( aOutline->GetShape() ) @@ -1015,8 +999,8 @@ static void export_vrml_edge_module( MODEL_VRML& aModel, EDGE_MODULE* aOutline, corner.x += aOutline->GetPosition().x; corner.y += aOutline->GetPosition().y; - x = corner.x * aModel.scale + aModel.tx; - y = - ( corner.y * aModel.scale + aModel.ty ); + x = corner.x * aModel.scale; + y = - ( corner.y * aModel.scale ); if( !vl->AddVertex( seg, x, y ) ) throw( std::runtime_error( vl->GetError() ) ); @@ -1037,8 +1021,8 @@ static void export_vrml_padshape( MODEL_VRML& aModel, VRML_LAYER* aTinLayer, D_P { // The (maybe offset) pad position wxPoint pad_pos = aPad->ShapePos(); - double pad_x = pad_pos.x * aModel.scale + aModel.tx; - double pad_y = pad_pos.y * aModel.scale + aModel.ty; + double pad_x = pad_pos.x * aModel.scale; + double pad_y = pad_pos.y * aModel.scale; wxSize pad_delta = aPad->GetDelta(); double pad_dx = pad_delta.x * aModel.scale / 2.0; @@ -1121,22 +1105,36 @@ static void export_vrml_pad( MODEL_VRML& aModel, BOARD* pcb, D_PAD* aPad ) double hole_drill_w = (double) aPad->GetDrillSize().x * aModel.scale / 2.0; double hole_drill_h = (double) aPad->GetDrillSize().y * aModel.scale / 2.0; double hole_drill = std::min( hole_drill_w, hole_drill_h ); - double hole_x = aPad->GetPosition().x * aModel.scale + aModel.tx; - double hole_y = aPad->GetPosition().y * aModel.scale + aModel.ty; + double hole_x = aPad->GetPosition().x * aModel.scale; + double hole_y = aPad->GetPosition().y * aModel.scale; // Export the hole on the edge layer if( hole_drill > 0 ) { + bool pth = false; + + if( aPad->GetAttribute() != PAD_HOLE_NOT_PLATED ) + pth = true; + if( aPad->GetDrillShape() == PAD_DRILL_OBLONG ) { // Oblong hole (slot) aModel.holes.AddSlot( hole_x, -hole_y, hole_drill_w * 2.0, hole_drill_h * 2.0, - aPad->GetOrientation()/10.0, true ); + aPad->GetOrientation()/10.0, true, pth ); + + if( pth ) + aModel.plated_holes.AddSlot( hole_x, -hole_y, + hole_drill_w * 2.0, hole_drill_h * 2.0, + aPad->GetOrientation()/10.0, true, false ); } else { // Drill a round hole - aModel.holes.AddCircle( hole_x, -hole_y, hole_drill, true ); + aModel.holes.AddCircle( hole_x, -hole_y, hole_drill, true, pth ); + + if( pth ) + aModel.plated_holes.AddCircle( hole_x, -hole_y, hole_drill, true, false ); + } } @@ -1390,7 +1388,7 @@ bool PCB_EDIT_FRAME::ExportVRML_File( const wxString& aFullFileName, EDA_RECT bbbox = pcb->ComputeBoundingBox(); model3d.SetOffset( -model3d.scale * bbbox.Centre().x, - -model3d.scale * bbbox.Centre().y ); + model3d.scale * bbbox.Centre().y ); output_file << " children [\n"; diff --git a/utils/idftools/vrml_layer.cpp b/utils/idftools/vrml_layer.cpp index 32ed105210..f8405afb10 100644 --- a/utils/idftools/vrml_layer.cpp +++ b/utils/idftools/vrml_layer.cpp @@ -23,6 +23,14 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ +// Wishlist: +// 1. crop anything outside the board outline on PTH, silk, and copper layers +// 2. on the PTH layer, handle cropped holes differently from others; +// these are assumed to be castellated edges and the profile is not +// a closed loop as assumed for all other outlines. +// 3. a scheme is needed to tell a castellated edge from a plain board edge + +#include #include #include #include @@ -137,12 +145,24 @@ static void CALLBACK vrml_tess_err( GLenum errorID, void* user_data ) } -static void CALLBACK vrml_tess_combine( GLdouble coords[3], void* vertex_data[4], +static void CALLBACK vrml_tess_combine( GLdouble coords[3], VERTEX_3D* vertex_data[4], GLfloat weight[4], void** outData, void* user_data ) { VRML_LAYER* lp = (VRML_LAYER*) user_data; - *outData = lp->AddExtraVertex( coords[0], coords[1] ); + // the plating is set to true only if all are plated + bool plated = vertex_data[0]->pth; + + if( !vertex_data[1]->pth ) + plated = false; + + if( vertex_data[2] && !vertex_data[2]->pth ) + plated = false; + + if( vertex_data[3] && !vertex_data[3]->pth ) + plated = false; + + *outData = lp->AddExtraVertex( coords[0], coords[1], plated ); } @@ -152,6 +172,8 @@ VRML_LAYER::VRML_LAYER() maxArcSeg = 48; minSegLength = 0.1; maxSegLength = 0.5; + offsetX = 0.0; + offsetY = 0.0; fix = false; Fault = false; @@ -230,6 +252,8 @@ void VRML_LAYER::Clear( void ) contours.pop_back(); } + pth.clear(); + areas.clear(); for( i = vertices.size(); i > 0; --i ) @@ -254,6 +278,7 @@ void VRML_LAYER::clearTmp( void ) glcmd = 0; triplets.clear(); + solid.clear(); for( i = outline.size(); i > 0; --i ) { @@ -283,7 +308,7 @@ void VRML_LAYER::clearTmp( void ) // create a new contour to be populated; returns an index // into the contour list or -1 if there are problems -int VRML_LAYER::NewContour( void ) +int VRML_LAYER::NewContour( bool aPlatedHole ) { if( fix ) return -1; @@ -296,6 +321,8 @@ int VRML_LAYER::NewContour( void ) contours.push_back( contour ); areas.push_back( 0.0 ); + pth.push_back( aPlatedHole ); + return contours.size() - 1; } @@ -329,6 +356,7 @@ bool VRML_LAYER::AddVertex( int aContourID, double aXpos, double aYpos ) vertex->y = aYpos; vertex->i = idx++; vertex->o = -1; + vertex->pth = pth[ aContourID ]; VERTEX_3D* v2 = NULL; @@ -440,9 +468,15 @@ bool VRML_LAYER::AppendCircle( double aXpos, double aYpos, // adds a circle the existing list; if 'hole' is true the contour is // a hole. Returns true if OK. -bool VRML_LAYER::AddCircle( double aXpos, double aYpos, double aRadius, bool aHoleFlag ) +bool VRML_LAYER::AddCircle( double aXpos, double aYpos, double aRadius, + bool aHoleFlag, bool aPlatedHole ) { - int pad = NewContour(); + int pad; + + if( aHoleFlag && aPlatedHole ) + pad = NewContour( true ); + else + pad = NewContour( false ); if( pad < 0 ) { @@ -458,7 +492,7 @@ bool VRML_LAYER::AddCircle( double aXpos, double aYpos, double aRadius, bool aHo // contour is a hole. Returns true if OK. bool VRML_LAYER::AddSlot( double aCenterX, double aCenterY, double aSlotLength, double aSlotWidth, - double aAngle, bool aHoleFlag ) + double aAngle, bool aHoleFlag, bool aPlatedHole ) { aAngle *= M_PI / 180.0; @@ -480,7 +514,12 @@ bool VRML_LAYER::AddSlot( double aCenterX, double aCenterY, double ang, da; int i; - int pad = NewContour(); + int pad; + + if( aHoleFlag && aPlatedHole ) + pad = NewContour( true ); + else + pad = NewContour( false ); if( pad < 0 ) { @@ -578,7 +617,7 @@ bool VRML_LAYER::AppendArc( double aCenterX, double aCenterY, double aRadius, // adds an arc with the given center, start point, pen width, and angle (degrees). bool VRML_LAYER::AddArc( double aCenterX, double aCenterY, double aStartX, double aStartY, - double aArcWidth, double aAngle, bool aHoleFlag ) + double aArcWidth, double aAngle, bool aHoleFlag, bool aPlatedHole ) { aAngle *= M_PI / 180.0; @@ -636,7 +675,12 @@ bool VRML_LAYER::AddArc( double aCenterX, double aCenterY, double aStartX, doubl std::swap( iendy, isty ); } - int arc = NewContour(); + int arc; + + if( aHoleFlag && aPlatedHole ) + arc = NewContour( true ); + else + arc = NewContour( false ); if( arc < 0 ) { @@ -688,7 +732,7 @@ bool VRML_LAYER::AddArc( double aCenterX, double aCenterY, double aStartX, doubl // tesselates the contours in preparation for a 3D output; // returns true if all was fine, false otherwise -bool VRML_LAYER::Tesselate( VRML_LAYER* holes ) +bool VRML_LAYER::Tesselate( VRML_LAYER* holes, bool aHolesOnly ) { if( !tess ) { @@ -699,6 +743,12 @@ bool VRML_LAYER::Tesselate( VRML_LAYER* holes ) pholes = holes; Fault = false; + if( aHolesOnly ) + gluTessProperty( tess, GLU_TESS_WINDING_RULE, GLU_TESS_WINDING_NEGATIVE ); + else + gluTessProperty( tess, GLU_TESS_WINDING_RULE, GLU_TESS_WINDING_POSITIVE ); + + if( contours.size() < 1 || vertices.size() < 3 ) { error = "Tesselate(): not enough vertices"; @@ -736,9 +786,37 @@ bool VRML_LAYER::Tesselate( VRML_LAYER* holes ) eidx = idx + hidx; + if( aHolesOnly && ( checkNContours( true ) == 0 ) ) + { + error = "tesselate(): no hole contours"; + return false; + } + else if( !aHolesOnly && ( checkNContours( false ) == 0 ) ) + { + error = "tesselate(): no solid contours"; + return false; + } + // open the polygon gluTessBeginPolygon( tess, this ); + if( aHolesOnly ) + { + pholes = NULL; // do not accept foreign holes + hidx = 0; + eidx = idx; + + // add holes + pushVertices( true ); + + gluTessEndPolygon( tess ); + + if( Fault ) + return false; + + return true; + } + // add solid outlines pushVertices( false ); @@ -748,6 +826,13 @@ bool VRML_LAYER::Tesselate( VRML_LAYER* holes ) if( Fault ) return false; + // if there are no outlines we cannot proceed + if( outline.empty() ) + { + error = "tesselate(): no points in result"; + return false; + } + // at this point we have a solid outline; add it to the tesselator gluTessBeginPolygon( tess, this ); @@ -793,6 +878,7 @@ bool VRML_LAYER::Tesselate( VRML_LAYER* holes ) // close the polygon; this creates the outline points // and the point ordering list 'ordmap' + solid.clear(); gluTessEndPolygon( tess ); // repeat the last operation but request a tesselated surface @@ -825,6 +911,8 @@ bool VRML_LAYER::pushOutline( VRML_LAYER* holes ) std::list*>::const_iterator obeg = outline.begin(); std::list*>::const_iterator oend = outline.end(); + int nc = 0; // number of contours pushed + int pi; std::list::const_iterator begin; std::list::const_iterator end; @@ -876,6 +964,13 @@ bool VRML_LAYER::pushOutline( VRML_LAYER* holes ) gluTessEndContour( tess ); ++obeg; + ++nc; + } + + if( !nc ) + { + error = "pushOutline():: no valid contours available"; + return false; } return true; @@ -902,7 +997,7 @@ bool VRML_LAYER::WriteVertices( double aZcoord, std::ofstream& aOutFile, int aPr return false; std::string strx, stry, strz; - FormatDoublet( vp->x, vp->y, aPrecision, strx, stry ); + FormatDoublet( vp->x + offsetX, vp->y + offsetY, aPrecision, strx, stry ); FormatSinglet( aZcoord, aPrecision, strz ); aOutFile << strx << " " << stry << " " << strz; @@ -914,7 +1009,7 @@ bool VRML_LAYER::WriteVertices( double aZcoord, std::ofstream& aOutFile, int aPr if( !vp ) return false; - FormatDoublet( vp->x, vp->y, aPrecision, strx, stry ); + FormatDoublet( vp->x + offsetX, vp->y + offsetY, aPrecision, strx, stry ); if( i & 1 ) aOutFile << ", " << strx << " " << stry << " " << strz; @@ -954,7 +1049,7 @@ bool VRML_LAYER::Write3DVertices( double aTopZ, double aBottomZ, return false; std::string strx, stry, strz; - FormatDoublet( vp->x, vp->y, aPrecision, strx, stry ); + FormatDoublet( vp->x + offsetX, vp->y + offsetY, aPrecision, strx, stry ); FormatSinglet( aTopZ, aPrecision, strz ); aOutFile << strx << " " << stry << " " << strz; @@ -966,7 +1061,7 @@ bool VRML_LAYER::Write3DVertices( double aTopZ, double aBottomZ, if( !vp ) return false; - FormatDoublet( vp->x, vp->y, aPrecision, strx, stry ); + FormatDoublet( vp->x + offsetX, vp->y + offsetY, aPrecision, strx, stry ); if( i & 1 ) aOutFile << ", " << strx << " " << stry << " " << strz; @@ -976,7 +1071,7 @@ bool VRML_LAYER::Write3DVertices( double aTopZ, double aBottomZ, // repeat for the bottom layer vp = getVertexByIndex( ordmap[0], pholes ); - FormatDoublet( vp->x, vp->y, aPrecision, strx, stry ); + FormatDoublet( vp->x + offsetX, vp->y + offsetY, aPrecision, strx, stry ); FormatSinglet( aBottomZ, aPrecision, strz ); bool endl; @@ -995,7 +1090,7 @@ bool VRML_LAYER::Write3DVertices( double aTopZ, double aBottomZ, for( i = 1, j = ordmap.size(); i < j; ++i ) { vp = getVertexByIndex( ordmap[i], pholes ); - FormatDoublet( vp->x, vp->y, aPrecision, strx, stry ); + FormatDoublet( vp->x + offsetX, vp->y + offsetY, aPrecision, strx, stry ); if( endl ) { @@ -1064,68 +1159,73 @@ bool VRML_LAYER::WriteIndices( bool aTopFlag, std::ofstream& aOutFile ) // writes out the index list for a 3D feature -bool VRML_LAYER::Write3DIndices( std::ofstream& aOutFile ) +bool VRML_LAYER::Write3DIndices( std::ofstream& aOutFile, bool aIncludePlatedHoles ) { - if( triplets.empty() ) - { - error = "Write3DIndices(): no triplets (triangular facets) to write"; - return false; - } - if( outline.empty() ) { error = "WriteIndices(): no outline available"; return false; } - // go through the triplet list and write out the indices based on order - std::list::const_iterator tbeg = triplets.begin(); - std::list::const_iterator tend = triplets.end(); + char mark; + bool holes_only = triplets.empty(); int i = 1; int idx2 = ordmap.size(); // index to the bottom vertices - // print out the top vertices - aOutFile << tbeg->i1 << ", " << tbeg->i2 << ", " << tbeg->i3 << ", -1"; - ++tbeg; - - while( tbeg != tend ) + if( !holes_only ) { - if( (i++ & 7) == 4 ) - { - i = 1; - aOutFile << ",\n" << tbeg->i1 << ", " << tbeg->i2 << ", " << tbeg->i3 << ", -1"; - } - else - { - aOutFile << ", " << tbeg->i1 << ", " << tbeg->i2 << ", " << tbeg->i3 << ", -1"; - } + mark = ','; + // go through the triplet list and write out the indices based on order + std::list::const_iterator tbeg = triplets.begin(); + std::list::const_iterator tend = triplets.end(); + + // print out the top vertices + aOutFile << tbeg->i1 << ", " << tbeg->i2 << ", " << tbeg->i3 << ", -1"; ++tbeg; - } - // print out the bottom vertices - tbeg = triplets.begin(); + while( tbeg != tend ) + { + if( (i++ & 7) == 4 ) + { + i = 1; + aOutFile << ",\n" << tbeg->i1 << ", " << tbeg->i2 << ", " << tbeg->i3 << ", -1"; + } + else + { + aOutFile << ", " << tbeg->i1 << ", " << tbeg->i2 << ", " << tbeg->i3 << ", -1"; + } - while( tbeg != tend ) - { - if( (i++ & 7) == 4 ) - { - i = 1; - aOutFile << ",\n" << (tbeg->i2 + idx2) << ", " << (tbeg->i1 + idx2) << ", " << (tbeg->i3 + idx2) << ", -1"; - } - else - { - aOutFile << ", " << (tbeg->i2 + idx2) << ", " << (tbeg->i1 + idx2) << ", " << (tbeg->i3 + idx2) << ", -1"; + ++tbeg; } - ++tbeg; + // print out the bottom vertices + tbeg = triplets.begin(); + + while( tbeg != tend ) + { + if( (i++ & 7) == 4 ) + { + i = 1; + aOutFile << ",\n" << (tbeg->i2 + idx2) << ", " << (tbeg->i1 + idx2) << ", " << (tbeg->i3 + idx2) << ", -1"; + } + else + { + aOutFile << ", " << (tbeg->i2 + idx2) << ", " << (tbeg->i1 + idx2) << ", " << (tbeg->i3 + idx2) << ", -1"; + } + + ++tbeg; + } } + else + mark = ' '; + // print out indices for the walls joining top to bottom - int firstPoint; int lastPoint; int curPoint; + int curContour = 0; std::list*>::const_iterator obeg = outline.begin(); std::list*>::const_iterator oend = outline.end(); @@ -1141,22 +1241,71 @@ bool VRML_LAYER::Write3DIndices( std::ofstream& aOutFile ) if( cp->size() < 3 ) { ++obeg; + ++curContour; continue; } - cbeg = cp->begin(); - cend = cp->end(); + cbeg = cp->begin(); + cend = cp->end(); + lastPoint = *(cbeg++); - firstPoint = *(cbeg++); - lastPoint = firstPoint; + // skip all PTH vertices which are not in a solid outline + if( !aIncludePlatedHoles && !solid[curContour] + && getVertexByIndex( ordmap[lastPoint], pholes )->pth ) + { + ++obeg; + ++curContour; + continue; + } while( cbeg != cend ) { curPoint = *(cbeg++); + if( !holes_only ) + { + if( (i++ & 3) == 2 ) + { + i = 1; + aOutFile << mark << "\n" << curPoint << ", " << lastPoint << ", " << curPoint + idx2; + aOutFile << ", -1, " << curPoint + idx2 << ", " << lastPoint << ", " << lastPoint + idx2 << ", -1"; + } + else + { + aOutFile << mark << " " << curPoint << ", " << lastPoint << ", " << curPoint + idx2; + aOutFile << ", -1, " << curPoint + idx2 << ", " << lastPoint << ", " << lastPoint + idx2 << ", -1"; + } + } + else + { + if( (i++ & 3) == 2 ) + { + i = 1; + aOutFile << mark << "\n" << curPoint << ", " << curPoint + idx2 << ", " << lastPoint; + aOutFile << ", -1, " << curPoint + idx2 << ", " << lastPoint + idx2 << ", " << lastPoint << ", -1"; + } + else + { + aOutFile << mark << " " << curPoint << ", " << curPoint + idx2 << ", " << lastPoint; + aOutFile << ", -1, " << curPoint + idx2 << ", " << lastPoint + idx2 << ", " << lastPoint << ", -1"; + } + } + + mark = ','; + lastPoint = curPoint; + } + + // check if the loop needs to be closed + cbeg = cp->begin(); + cend = --cp->end(); + + curPoint = *(cbeg); + lastPoint = *(cend); + + if( !holes_only ) + { if( (i++ & 3) == 2 ) { - i = 1; aOutFile << ",\n" << curPoint << ", " << lastPoint << ", " << curPoint + idx2; aOutFile << ", -1, " << curPoint + idx2 << ", " << lastPoint << ", " << lastPoint + idx2 << ", -1"; } @@ -1165,21 +1314,23 @@ bool VRML_LAYER::Write3DIndices( std::ofstream& aOutFile ) aOutFile << ", " << curPoint << ", " << lastPoint << ", " << curPoint + idx2; aOutFile << ", -1, " << curPoint + idx2 << ", " << lastPoint << ", " << lastPoint + idx2 << ", -1"; } - lastPoint = curPoint; - } - - if( (i++ & 3) == 2 ) - { - aOutFile << ",\n" << firstPoint << ", " << lastPoint << ", " << firstPoint + idx2; - aOutFile << ", -1, " << firstPoint + idx2 << ", " << lastPoint << ", " << lastPoint + idx2 << ", -1"; } else { - aOutFile << ", " << firstPoint << ", " << lastPoint << ", " << firstPoint + idx2; - aOutFile << ", -1, " << firstPoint + idx2 << ", " << lastPoint << ", " << lastPoint + idx2 << ", -1"; + if( (i++ & 3) == 2 ) + { + aOutFile << ",\n" << curPoint << ", " << curPoint + idx2 << ", " << lastPoint; + aOutFile << ", -1, " << curPoint + idx2 << ", " << lastPoint + idx2 << ", " << lastPoint << ", -1"; + } + else + { + aOutFile << ", " << curPoint << ", " << curPoint + idx2 << ", " << lastPoint; + aOutFile << ", -1, " << curPoint + idx2 << ", " << lastPoint + idx2 << ", " << lastPoint << ", -1"; + } } ++obeg; + ++curContour; } return !aOutFile.fail(); @@ -1222,7 +1373,7 @@ bool VRML_LAYER::addTriplet( VERTEX_3D* p0, VERTEX_3D* p1, VERTEX_3D* p2 ) // add an extra vertex (to be called only by the COMBINE callback) -VERTEX_3D* VRML_LAYER::AddExtraVertex( double aXpos, double aYpos ) +VERTEX_3D* VRML_LAYER::AddExtraVertex( double aXpos, double aYpos, bool aPlatedHole ) { VERTEX_3D* vertex = new VERTEX_3D; @@ -1239,6 +1390,7 @@ VERTEX_3D* VRML_LAYER::AddExtraVertex( double aXpos, double aYpos ) vertex->y = aYpos; vertex->i = eidx++; vertex->o = -1; + vertex->pth = aPlatedHole; extra_verts.push_back( vertex ); @@ -1282,12 +1434,39 @@ void VRML_LAYER::glEnd( void ) if( !loop ) break; - for( unsigned int i = 0; i < vlist.size(); ++i ) + double firstX = 0.0; + double firstY = 0.0; + double lastX, lastY; + double curX, curY; + double area = 0.0; + + if( vlist.size() > 0 ) { - loop->push_back( vlist[i]->o ); + loop->push_back( vlist[0]->o ); + firstX = vlist[0]->x; + firstY = vlist[0]->y; + lastX = firstX; + lastY = firstY; } + for( size_t i = 1; i < vlist.size(); ++i ) + { + loop->push_back( vlist[i]->o ); + curX = vlist[i]->x; + curY = vlist[i]->y; + area += ( curX - lastX ) * ( curY + lastY ); + lastX = curX; + lastY = curY; + } + + area += ( firstX - lastX ) * ( firstY + lastY ); + outline.push_back( loop ); + + if( area <= 0.0 ) + solid.push_back( true ); + else + solid.push_back( false ); } break; @@ -1398,6 +1577,31 @@ void VRML_LAYER::processTri( void ) } +int VRML_LAYER::checkNContours( bool holes ) +{ + int nc = 0; // number of contours + + if( contours.empty() ) + return 0; + + std::list::const_iterator begin; + std::list::const_iterator end; + + for( size_t i = 0; i < contours.size(); ++i ) + { + if( contours[i]->size() < 3 ) + continue; + + if( ( holes && areas[i] <= 0.0 ) || ( !holes && areas[i] > 0.0 ) ) + continue; + + ++nc; + } + + return nc; +} + + // push the internally held vertices void VRML_LAYER::pushVertices( bool holes ) { @@ -1434,6 +1638,8 @@ void VRML_LAYER::pushVertices( bool holes ) gluTessEndContour( tess ); } + + return; } @@ -1564,3 +1770,11 @@ const std::string& VRML_LAYER::GetError( void ) { return error; } + + +void VRML_LAYER::SetVertexOffsets( double aXoffset, double aYoffset ) +{ + offsetX = aXoffset; + offsetY = aYoffset; + return; +} diff --git a/utils/idftools/vrml_layer.h b/utils/idftools/vrml_layer.h index 5316b62506..01e4f343cb 100644 --- a/utils/idftools/vrml_layer.h +++ b/utils/idftools/vrml_layer.h @@ -70,6 +70,7 @@ struct VERTEX_3D double y; int i; // vertex index int o; // vertex order + bool pth; // true for plate-through hole }; struct TRIPLET_3D @@ -93,12 +94,18 @@ private: double minSegLength; // min. segment length double maxSegLength; // max. segment length + // Vertex offsets to work around a suspected GLU tesselator bug + double offsetX; + double offsetY; + bool fix; // when true, no more vertices may be added by the user int idx; // vertex index (number of contained vertices) int ord; // vertex order (number of ordered vertices) unsigned int idxout; // outline index to first point in 3D outline std::vector vertices; // vertices of all contours std::vector*> contours; // lists of vertices for each contour + std::vectorpth; // indicates whether a 'contour' is a PTH or not + std::vectorsolid; // indicates whether a 'contour' is a solid or a hole std::vector< double > areas; // area of the contours (positive if winding is CCW) std::list triplets; // output facet triplet list (triplet of ORDER values) std::list*> outline; // indices for outline outputs (index by ORDER values) @@ -136,6 +143,9 @@ private: // calculate number of sides on an arc (angle is in radians) int calcNSides( double aRadius, double aAngle ); + // returns the number of solid or hole contours + int checkNContours( bool holes ); + public: /// set to true when a fault is encountered during tesselation bool Fault; @@ -191,9 +201,11 @@ public: * Function NewContour * creates a new list of vertices and returns an index to the list * + * @param aPlatedHole is true if the new contour will represent a plated hole + * * @return int: index to the list or -1 if the operation failed */ - int NewContour( void ); + int NewContour( bool aPlatedHole = false ); /** * Function AddVertex @@ -231,7 +243,8 @@ public: * * @return bool: true if the new contour was successfully created */ - bool AppendCircle( double aXpos, double aYpos, double aRadius, int aContourID, bool aHoleFlag = false ); + bool AppendCircle( double aXpos, double aYpos, double aRadius, + int aContourID, bool aHoleFlag = false ); /** * Function AddCircle @@ -241,10 +254,12 @@ public: * @param aYpos is the Y coordinate of the hole center * @param aRadius is the radius of the hole * @param aHoleFlag determines if the contour to be created is a cutout + * @param aPlatedHole is true if this is a plated hole * * @return bool: true if the new contour was successfully created */ - bool AddCircle( double aXpos, double aYpos, double aRadius, bool aHoleFlag = false ); + bool AddCircle( double aXpos, double aYpos, double aRadius, + bool aHoleFlag = false, bool aPlatedHole = false ); /** * Function AddSlot @@ -256,11 +271,12 @@ public: * @param aSlotWidth is the width of the slot along the minor axis * @param aAngle (degrees) is the orientation of the slot * @param aHoleFlag determines whether the slot is a hole or a solid + * @param aPlatedHole is true if this is a plated slot * * @return bool: true if the slot was successfully created */ bool AddSlot( double aCenterX, double aCenterY, double aSlotLength, double aSlotWidth, - double aAngle, bool aHoleFlag = false ); + double aAngle, bool aHoleFlag = false, bool aPlatedHole = false ); /** * Function AppendArc @@ -289,11 +305,14 @@ public: * @param aArcWidth is the width of the arc * @param aAngle is the included angle (degrees) * @param aHoleFlag determines whether the arc is to be a hole or a solid + * @param aPlatedHole is true if this is a plated slotted arc * * @return bool: true if the feature was successfully created */ - bool AddArc( double aCenterX, double aCenterY, double aStartX, double aStartY, - double aArcWidth, double aAngle, bool aHoleFlag = false ); + bool AddArc( double aCenterX, double aCenterY, + double aStartX, double aStartY, + double aArcWidth, double aAngle, + bool aHoleFlag = false, bool aPlatedHole = false ); /** * Function Tesselate @@ -301,11 +320,12 @@ public: * vertex sets required to render the surface. * * @param holes is an optional pointer to cutouts to be imposed on the - * surface. + * surface. + * @param aHolesOnly is true if the outline contains only holes * * @return bool: true if the operation succeeded */ - bool Tesselate( VRML_LAYER* holes = NULL ); + bool Tesselate( VRML_LAYER* holes = NULL, bool aHolesOnly = false ); /** * Function WriteVertices @@ -351,19 +371,26 @@ public: * writes out the vertex sets required to render an extruded solid * * @param aOutFile is the file to write to + * @param aIncludePlatedHoles is true if holes marked as plated should + * be rendered. Default is false since the user will usually + * render these holes in a different color * * @return bool: true if the operation succeeded */ - bool Write3DIndices( std::ofstream& aOutFile ); + bool Write3DIndices( std::ofstream& aOutFile, bool aIncludePlatedHoles = false ); /** * Function AddExtraVertex - * adds an extra vertex as required by the GLU tesselator + * adds an extra vertex as required by the GLU tesselator. + * + * @param aXpos is the X coordinate of the newly created point + * @param aYpos is the Y coordinate of the newly created point + * @param aPlatedHole is true if this point is part of a plated hole * * @return VERTEX_3D*: is the new vertex or NULL if a vertex * could not be created. */ - VERTEX_3D* AddExtraVertex( double aXpos, double aYpos ); + VERTEX_3D* AddExtraVertex( double aXpos, double aYpos, bool aPlatedHole ); /** * Function glStart @@ -429,6 +456,8 @@ public: * Returns the error message related to the last failed operation */ const std::string& GetError( void ); + + void SetVertexOffsets( double aXoffset, double aYoffset ); }; #endif // VRML_LAYER_H From f43cf03789be74f1fbf9afcfbeb4682359a13395 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 16 Jun 2014 14:04:55 +0200 Subject: [PATCH 505/741] Fix specctra export crash, when a non copper zone was found on the board to export. --- pcbnew/specctra_export.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pcbnew/specctra_export.cpp b/pcbnew/specctra_export.cpp index d81d2c66ec..09e63ab089 100644 --- a/pcbnew/specctra_export.cpp +++ b/pcbnew/specctra_export.cpp @@ -1556,6 +1556,10 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IO_ERROR ) if( item->GetIsKeepout() ) continue; + // Currently, we export only copper layers + if( ! IsCopperLayer( item->GetLayer() ) ) + continue; + COPPER_PLANE* plane = new COPPER_PLANE( pcb->structure ); pcb->structure->planes.push_back( plane ); From a457dffd8fe00fa826ff52642b7b20f0dfc9f7b5 Mon Sep 17 00:00:00 2001 From: Bernhard Stegmaier Date: Mon, 16 Jun 2014 11:32:23 -0500 Subject: [PATCH 506/741] OSX drawing artifacts --- eeschema/libedit.cpp | 9 +++ gerbview/draw_gerber_screen.cpp | 9 +++ pagelayout_editor/pl_editor_frame.cpp | 9 +++ patches/wxpython-3.0.0_macosx.patch | 22 ++++--- patches/wxwidgets-3.0.0_macosx.patch | 82 +++++++++++++++++++-------- 5 files changed, 97 insertions(+), 34 deletions(-) diff --git a/eeschema/libedit.cpp b/eeschema/libedit.cpp index 8e60b0d44e..9a27bb8c8a 100644 --- a/eeschema/libedit.cpp +++ b/eeschema/libedit.cpp @@ -281,6 +281,15 @@ void LIB_EDIT_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg ) RedrawComponent( DC, wxPoint( 0, 0 ) ); +#ifdef USE_WX_OVERLAY + if( IsShown() ) + { + m_overlay.Reset(); + wxDCOverlay overlaydc( m_overlay, (wxWindowDC*)DC ); + overlaydc.Clear(); + } +#endif + if( m_canvas->IsMouseCaptured() ) m_canvas->CallMouseCapture( DC, wxDefaultPosition, false ); diff --git a/gerbview/draw_gerber_screen.cpp b/gerbview/draw_gerber_screen.cpp index b2dc3640a8..86add4d293 100644 --- a/gerbview/draw_gerber_screen.cpp +++ b/gerbview/draw_gerber_screen.cpp @@ -112,6 +112,15 @@ void GERBVIEW_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg ) DrawWorkSheet( DC, screen, 0, IU_PER_MILS, wxEmptyString ); +#ifdef USE_WX_OVERLAY + if( IsShown() ) + { + m_overlay.Reset(); + wxDCOverlay overlaydc( m_overlay, (wxWindowDC*)DC ); + overlaydc.Clear(); + } +#endif + if( m_canvas->IsMouseCaptured() ) m_canvas->CallMouseCapture( DC, wxDefaultPosition, false ); diff --git a/pagelayout_editor/pl_editor_frame.cpp b/pagelayout_editor/pl_editor_frame.cpp index ab91849c82..85f52b428d 100644 --- a/pagelayout_editor/pl_editor_frame.cpp +++ b/pagelayout_editor/pl_editor_frame.cpp @@ -534,6 +534,15 @@ void PL_EDITOR_FRAME::RedrawActiveWindow( wxDC* aDC, bool aEraseBg ) DrawWorkSheet( aDC, GetScreen(), 0, IU_PER_MILS, GetCurrFileName() ); +#ifdef USE_WX_OVERLAY + if( IsShown() ) + { + m_overlay.Reset(); + wxDCOverlay overlaydc( m_overlay, (wxWindowDC*)aDC ); + overlaydc.Clear(); + } +#endif + if( m_canvas->IsMouseCaptured() ) m_canvas->CallMouseCapture( aDC, wxDefaultPosition, false ); diff --git a/patches/wxpython-3.0.0_macosx.patch b/patches/wxpython-3.0.0_macosx.patch index 746943f5b4..627faf6c6a 100644 --- a/patches/wxpython-3.0.0_macosx.patch +++ b/patches/wxpython-3.0.0_macosx.patch @@ -1,6 +1,6 @@ === modified file 'Makefile.in' ---- Makefile.in 2014-02-05 21:57:29 +0000 -+++ Makefile.in 2014-02-05 22:00:01 +0000 +--- Makefile.in 2014-06-11 15:08:00 +0000 ++++ Makefile.in 2014-06-11 15:10:36 +0000 @@ -14601,7 +14601,7 @@ monodll_carbon_frame.o \ monodll_carbon_mdi.o \ @@ -92,8 +92,8 @@ @COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/osx/carbon/overlay.cpp === modified file 'include/wx/overlay.h' ---- include/wx/overlay.h 2014-02-05 21:57:29 +0000 -+++ include/wx/overlay.h 2014-02-05 21:57:47 +0000 +--- include/wx/overlay.h 2014-06-11 15:08:00 +0000 ++++ include/wx/overlay.h 2014-06-11 15:10:36 +0000 @@ -13,7 +13,7 @@ #include "wx/defs.h" @@ -105,8 +105,8 @@ #define wxHAS_NATIVE_OVERLAY 1 === modified file 'include/wx/private/overlay.h' ---- include/wx/private/overlay.h 2014-02-05 21:57:29 +0000 -+++ include/wx/private/overlay.h 2014-02-05 21:57:47 +0000 +--- include/wx/private/overlay.h 2014-06-11 15:08:00 +0000 ++++ include/wx/private/overlay.h 2014-06-11 15:10:36 +0000 @@ -16,7 +16,11 @@ #ifdef wxHAS_NATIVE_OVERLAY @@ -121,8 +121,8 @@ #else === modified file 'src/osx/cocoa/overlay.mm' ---- src/osx/cocoa/overlay.mm 2014-02-05 21:57:29 +0000 -+++ src/osx/cocoa/overlay.mm 2014-02-05 21:57:47 +0000 +--- src/osx/cocoa/overlay.mm 2014-06-11 15:08:00 +0000 ++++ src/osx/cocoa/overlay.mm 2014-06-11 15:12:45 +0000 @@ -34,6 +34,7 @@ #include "wx/private/overlay.h" @@ -180,7 +180,7 @@ } void wxOverlayImpl::Init( wxDC* dc, int x , int y , int width , int height ) -@@ -107,84 +66,50 @@ +@@ -107,84 +66,54 @@ wxASSERT_MSG( !IsOk() , _("You cannot Init an overlay twice") ); m_window = dc->GetWindow(); @@ -222,6 +222,8 @@ + m_overlayWindow = m_window->MacGetTopLevelWindowRef(); + + NSRect box = [m_overlayWindow frame]; ++ box.origin.x = 0; ++ box.origin.y = 0; + + if( [m_overlayWindow isVisible] ) + { @@ -280,6 +282,8 @@ - [m_overlayWindow release]; - m_overlayWindow = NULL ; + NSRect box = [m_overlayWindow frame]; ++ box.origin.x = 0; ++ box.origin.y = 0; + + [m_overlayWindow discardCachedImage]; + [m_overlayWindow cacheImageInRect:box]; diff --git a/patches/wxwidgets-3.0.0_macosx.patch b/patches/wxwidgets-3.0.0_macosx.patch index b11eb8519c..9d3db1a85a 100644 --- a/patches/wxwidgets-3.0.0_macosx.patch +++ b/patches/wxwidgets-3.0.0_macosx.patch @@ -1,7 +1,7 @@ === modified file 'Makefile.in' ---- Makefile.in 2014-01-26 11:10:36 +0000 -+++ Makefile.in 2014-01-26 11:15:53 +0000 -@@ -14601,7 +14601,7 @@ +--- Makefile.in 2014-06-08 14:30:42 +0000 ++++ Makefile.in 2014-06-08 14:30:57 +0000 +@@ -14619,7 +14619,7 @@ monodll_carbon_frame.o \ monodll_carbon_mdi.o \ monodll_carbon_metafile.o \ @@ -10,7 +10,7 @@ monodll_carbon_popupwin.o \ monodll_carbon_renderer.o \ monodll_carbon_settings.o \ -@@ -14748,7 +14748,7 @@ +@@ -14766,7 +14766,7 @@ monolib_carbon_frame.o \ monolib_carbon_mdi.o \ monolib_carbon_metafile.o \ @@ -19,7 +19,7 @@ monolib_carbon_popupwin.o \ monolib_carbon_renderer.o \ monolib_carbon_settings.o \ -@@ -14895,7 +14895,7 @@ +@@ -14913,7 +14913,7 @@ coredll_carbon_frame.o \ coredll_carbon_mdi.o \ coredll_carbon_metafile.o \ @@ -28,7 +28,7 @@ coredll_carbon_popupwin.o \ coredll_carbon_renderer.o \ coredll_carbon_settings.o \ -@@ -15027,7 +15027,7 @@ +@@ -15045,7 +15045,7 @@ corelib_carbon_frame.o \ corelib_carbon_mdi.o \ corelib_carbon_metafile.o \ @@ -37,7 +37,7 @@ corelib_carbon_popupwin.o \ corelib_carbon_renderer.o \ corelib_carbon_settings.o \ -@@ -17774,6 +17774,9 @@ +@@ -17792,6 +17792,9 @@ monodll_osx_cocoa_notebook.o: $(srcdir)/src/osx/cocoa/notebook.mm $(MONODLL_ODEP) $(CXXC) -c -o $@ $(MONODLL_OBJCXXFLAGS) $(srcdir)/src/osx/cocoa/notebook.mm @@ -47,7 +47,7 @@ monodll_osx_cocoa_radiobut.o: $(srcdir)/src/osx/cocoa/radiobut.mm $(MONODLL_ODEP) $(CXXC) -c -o $@ $(MONODLL_OBJCXXFLAGS) $(srcdir)/src/osx/cocoa/radiobut.mm -@@ -23642,6 +23645,9 @@ +@@ -23666,6 +23669,9 @@ monolib_osx_cocoa_notebook.o: $(srcdir)/src/osx/cocoa/notebook.mm $(MONOLIB_ODEP) $(CXXC) -c -o $@ $(MONOLIB_OBJCXXFLAGS) $(srcdir)/src/osx/cocoa/notebook.mm @@ -57,7 +57,7 @@ monolib_osx_cocoa_radiobut.o: $(srcdir)/src/osx/cocoa/radiobut.mm $(MONOLIB_ODEP) $(CXXC) -c -o $@ $(MONOLIB_OBJCXXFLAGS) $(srcdir)/src/osx/cocoa/radiobut.mm -@@ -33584,8 +33590,8 @@ +@@ -33620,8 +33626,8 @@ @COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@coredll_carbon_overlay.o: $(srcdir)/src/osx/carbon/overlay.cpp $(COREDLL_ODEP) @COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/osx/carbon/overlay.cpp @@ -68,7 +68,7 @@ @COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1_WXUNIV_0@coredll_carbon_overlay.o: $(srcdir)/src/osx/carbon/overlay.cpp $(COREDLL_ODEP) @COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/osx/carbon/overlay.cpp -@@ -37961,8 +37967,8 @@ +@@ -38003,8 +38009,8 @@ @COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@corelib_carbon_overlay.o: $(srcdir)/src/osx/carbon/overlay.cpp $(CORELIB_ODEP) @COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/osx/carbon/overlay.cpp @@ -80,9 +80,29 @@ @COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1_WXUNIV_0@corelib_carbon_overlay.o: $(srcdir)/src/osx/carbon/overlay.cpp $(CORELIB_ODEP) @COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/osx/carbon/overlay.cpp +=== modified file 'include/wx/osx/cocoa/private/overlay.h' +--- include/wx/osx/cocoa/private/overlay.h 2014-06-08 14:30:42 +0000 ++++ include/wx/osx/cocoa/private/overlay.h 2014-06-11 12:07:05 +0000 +@@ -41,15 +41,8 @@ + void CreateOverlayWindow(); + + WXWindow m_overlayWindow; +- WXWindow m_overlayParentWindow; +- CGContextRef m_overlayContext ; + // we store the window in case we would have to issue a Refresh() + wxWindow* m_window ; +- +- int m_x ; +- int m_y ; +- int m_width ; +- int m_height ; + } ; + + #endif // _WX_MAC_CARBON_PRIVATE_OVERLAY_H_ + === modified file 'include/wx/overlay.h' ---- include/wx/overlay.h 2014-01-26 11:10:36 +0000 -+++ include/wx/overlay.h 2014-01-26 11:10:44 +0000 +--- include/wx/overlay.h 2014-06-08 14:30:42 +0000 ++++ include/wx/overlay.h 2014-06-08 14:30:57 +0000 @@ -13,7 +13,7 @@ #include "wx/defs.h" @@ -94,8 +114,8 @@ #define wxHAS_NATIVE_OVERLAY 1 === modified file 'include/wx/private/overlay.h' ---- include/wx/private/overlay.h 2014-01-26 11:10:36 +0000 -+++ include/wx/private/overlay.h 2014-01-26 11:10:44 +0000 +--- include/wx/private/overlay.h 2014-06-08 14:30:42 +0000 ++++ include/wx/private/overlay.h 2014-06-08 14:30:57 +0000 @@ -16,7 +16,11 @@ #ifdef wxHAS_NATIVE_OVERLAY @@ -110,8 +130,8 @@ #else === modified file 'src/osx/cocoa/overlay.mm' ---- src/osx/cocoa/overlay.mm 2014-01-26 11:10:36 +0000 -+++ src/osx/cocoa/overlay.mm 2014-01-26 11:10:44 +0000 +--- src/osx/cocoa/overlay.mm 2014-06-08 14:30:42 +0000 ++++ src/osx/cocoa/overlay.mm 2014-06-11 12:06:53 +0000 @@ -34,6 +34,7 @@ #include "wx/private/overlay.h" @@ -120,7 +140,15 @@ // ============================================================================ // implementation -@@ -58,48 +59,6 @@ +@@ -42,7 +43,6 @@ + wxOverlayImpl::wxOverlayImpl() + { + m_window = NULL ; +- m_overlayContext = NULL ; + m_overlayWindow = NULL ; + } + +@@ -58,48 +58,6 @@ void wxOverlayImpl::CreateOverlayWindow() { @@ -169,7 +197,7 @@ } void wxOverlayImpl::Init( wxDC* dc, int x , int y , int width , int height ) -@@ -107,84 +66,50 @@ +@@ -107,84 +65,49 @@ wxASSERT_MSG( !IsOk() , _("You cannot Init an overlay twice") ); m_window = dc->GetWindow(); @@ -211,6 +239,8 @@ + m_overlayWindow = m_window->MacGetTopLevelWindowRef(); + + NSRect box = [m_overlayWindow frame]; ++ box.origin.x = 0; ++ box.origin.y = 0; + + if( [m_overlayWindow isVisible] ) + { @@ -228,7 +258,6 @@ - win_impl->SetGraphicsContext( wxGraphicsContext::CreateFromNative( m_overlayContext ) ); - dc->SetClippingRegion( m_x , m_y , m_width , m_height ) ; - } -+ } void wxOverlayImpl::EndDrawing( wxDC* dc) @@ -241,11 +270,13 @@ - CGContextFlush( m_overlayContext ); } - void wxOverlayImpl::Clear(wxDC* WXUNUSED(dc)) +-void wxOverlayImpl::Clear(wxDC* WXUNUSED(dc)) ++void wxOverlayImpl::Clear( wxDC* WXUNUSED(dc) ) { wxASSERT_MSG( IsOk() , _("You cannot Clear an overlay that is not inited") ); - CGRect box = CGRectMake( m_x - 1, m_y - 1 , m_width + 2 , m_height + 2 ); - CGContextClearRect( m_overlayContext, box ); ++ + if( [m_overlayWindow isVisible] ) + { + [m_overlayWindow restoreCachedImage]; @@ -256,11 +287,10 @@ void wxOverlayImpl::Reset() { - if ( m_overlayContext ) -+ if ( m_overlayContext) - { - m_overlayContext = NULL ; - } - +- { +- m_overlayContext = NULL ; +- } +- // todo : don't dispose, only hide and reposition on next run - if (m_overlayWindow) + if (m_overlayWindow && [m_overlayWindow isVisible]) @@ -269,6 +299,8 @@ - [m_overlayWindow release]; - m_overlayWindow = NULL ; + NSRect box = [m_overlayWindow frame]; ++ box.origin.x = 0; ++ box.origin.y = 0; + + [m_overlayWindow discardCachedImage]; + [m_overlayWindow cacheImageInRect:box]; From b22aba2010285675f41140c91831961336540549 Mon Sep 17 00:00:00 2001 From: Bernhard Stegmaier Date: Mon, 16 Jun 2014 11:42:27 -0500 Subject: [PATCH 507/741] Fixes --- common/kiface_i.cpp | 11 +++++++---- pagelayout_editor/pl_editor_frame.h | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/common/kiface_i.cpp b/common/kiface_i.cpp index 42d7799597..f7772a1e35 100644 --- a/common/kiface_i.cpp +++ b/common/kiface_i.cpp @@ -123,10 +123,13 @@ bool KIFACE_I::start_common( int aCtlBits ) void KIFACE_I::end_common() { - /* Save common preferences; the background still uses the old legacy - * color numbers, not the new names */ - m_bm.m_config->Write( showPageLimitsKey, g_ShowPageLimits ); - m_bm.m_config->Write( backgroundColorKey, int( g_DrawBgColor ) ); + if( m_bm.m_config ) + { + // Save common preferences; the background still uses the old legacy + // color numbers, not the new names + m_bm.m_config->Write( showPageLimitsKey, g_ShowPageLimits ); + m_bm.m_config->Write( backgroundColorKey, int( g_DrawBgColor ) ); + } m_bm.End(); } diff --git a/pagelayout_editor/pl_editor_frame.h b/pagelayout_editor/pl_editor_frame.h index e675cb9c9b..e266e1ca26 100644 --- a/pagelayout_editor/pl_editor_frame.h +++ b/pagelayout_editor/pl_editor_frame.h @@ -108,9 +108,9 @@ public: const PAGE_INFO& GetPageSettings () const; // overload EDA_DRAW_FRAME const wxSize GetPageSizeIU() const; // overload EDA_DRAW_FRAME - PL_EDITOR_SCREEN* GetScreen() + PL_EDITOR_SCREEN* GetScreen() const // overload EDA_DRAW_FRAME { - return (PL_EDITOR_SCREEN*) m_canvas->GetScreen(); + return (PL_EDITOR_SCREEN*) EDA_DRAW_FRAME::GetScreen(); } const wxPoint& GetAuxOrigin() const // overload EDA_DRAW_FRAME From 2ff53e95bdbedd3161ea817da292854b7237268f Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Mon, 16 Jun 2014 14:00:26 -0500 Subject: [PATCH 508/741] fix some bugs in FOOTPRINT_VIEWER_FRAME, get rid of statics --- include/project.h | 2 + pcbnew/loadcmp.cpp | 1 - pcbnew/modview_frame.cpp | 150 ++++++++++++++++++++++----------------- pcbnew/modview_frame.h | 18 ++--- 4 files changed, 91 insertions(+), 80 deletions(-) diff --git a/include/project.h b/include/project.h index 113aa4e032..b8828798bf 100644 --- a/include/project.h +++ b/include/project.h @@ -142,6 +142,8 @@ public: PCB_LIB_NICKNAME, VIEWER_3D_PATH, PCB_FOOTPRINT, + PCB_FOOTPRINT_VIEWER_FPNAME, + PCB_FOOTPRINT_VIEWER_NICKNAME, RSTRING_COUNT }; diff --git a/pcbnew/loadcmp.cpp b/pcbnew/loadcmp.cpp index cd3f85d00d..ac355ff6f8 100644 --- a/pcbnew/loadcmp.cpp +++ b/pcbnew/loadcmp.cpp @@ -334,7 +334,6 @@ wxString PCB_BASE_FRAME::SelectFootprint( EDA_DRAW_FRAME* aWindow, wxString fpname; wxString msg; wxArrayString libraries; - FP_LIB_TABLE libTable; std::vector< wxArrayString > rows; diff --git a/pcbnew/modview_frame.cpp b/pcbnew/modview_frame.cpp index e0a5302d19..1f80fe663e 100644 --- a/pcbnew/modview_frame.cpp +++ b/pcbnew/modview_frame.cpp @@ -55,19 +55,9 @@ #include -#define NEXT_PART 1 -#define NEW_PART 0 -#define PREVIOUS_PART -1 - - -/** - * Save previous component library viewer state. - */ -wxString FOOTPRINT_VIEWER_FRAME::m_libraryName; -wxString FOOTPRINT_VIEWER_FRAME::m_footprintName; - -/// When the viewer is used to select a component in schematic, the selected component is here. -wxString FOOTPRINT_VIEWER_FRAME::m_selectedFootprintName; +#define NEXT_PART 1 +#define NEW_PART 0 +#define PREVIOUS_PART -1 BEGIN_EVENT_TABLE( FOOTPRINT_VIEWER_FRAME, EDA_DRAW_FRAME ) @@ -151,8 +141,6 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent m_footprintList = new wxListBox( this, ID_MODVIEW_FOOTPRINT_LIST, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_HSCROLL ); - m_selectedFootprintName.Empty(); - SetBoard( new BOARD() ); // Ensure all layers and items are visible: @@ -173,12 +161,12 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent UpdateTitle(); // If a footprint was previously loaded, reload it - if( !m_libraryName.IsEmpty() && !m_footprintName.IsEmpty() ) + if( getCurNickname().size() && getCurFootprintName().size() ) { FPID id; - id.SetLibNickname( m_libraryName ); - id.SetFootprintName( m_footprintName ); + id.SetLibNickname( getCurNickname() ); + id.SetFootprintName( getCurFootprintName() ); GetBoard()->Add( loadFootprint( id ) ); } @@ -315,7 +303,7 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList() m_libList->Append( nicknames[ii] ); // Search for a previous selection: - int index = m_libList->FindString( m_libraryName ); + int index = m_libList->FindString( getCurNickname() ); if( index != wxNOT_FOUND ) { @@ -325,8 +313,8 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList() { // If not found, clear current library selection because it can be // deleted after a configuration change. - m_libraryName = wxEmptyString; - m_footprintName = wxEmptyString; + setCurNickname( wxEmptyString ); + setCurFootprintName( wxEmptyString ); } ReCreateFootprintList(); @@ -340,15 +328,17 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList() { m_footprintList->Clear(); - if( m_libraryName.IsEmpty() ) + if( !getCurNickname() ) { - m_footprintName = wxEmptyString; + setCurFootprintName( wxEmptyString ); return; } FOOTPRINT_LIST fp_info_list; - fp_info_list.ReadFootprintFiles( Prj().PcbFootprintLibs(), &m_libraryName ); + wxString nickname = getCurNickname(); + + fp_info_list.ReadFootprintFiles( Prj().PcbFootprintLibs(), !nickname ? NULL : &nickname ); if( fp_info_list.GetErrorCount() ) { @@ -361,10 +351,10 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList() m_footprintList->Append( footprint.GetFootprintName() ); } - int index = m_footprintList->FindString( m_footprintName ); + int index = m_footprintList->FindString( getCurFootprintName() ); if( index == wxNOT_FOUND ) - m_footprintName = wxEmptyString; + setCurFootprintName( wxEmptyString ); else m_footprintList->SetSelection( index, true ); } @@ -379,10 +369,10 @@ void FOOTPRINT_VIEWER_FRAME::ClickOnLibList( wxCommandEvent& event ) wxString name = m_libList->GetString( ii ); - if( m_libraryName == name ) + if( getCurNickname() == name ) return; - m_libraryName = name; + setCurNickname( name ); ReCreateFootprintList(); UpdateTitle(); @@ -402,17 +392,18 @@ void FOOTPRINT_VIEWER_FRAME::ClickOnFootprintList( wxCommandEvent& event ) wxString name = m_footprintList->GetString( ii ); - if( m_footprintName.CmpNoCase( name ) != 0 ) + if( getCurFootprintName().CmpNoCase( name ) != 0 ) { - m_footprintName = name; + setCurFootprintName( name ); + SetCurItem( NULL ); // Delete the current footprint GetBoard()->m_Modules.DeleteAll(); FPID id; - id.SetLibNickname( m_libraryName ); - id.SetFootprintName( m_footprintName ); + id.SetLibNickname( getCurNickname() ); + id.SetFootprintName( getCurFootprintName() ); try { @@ -420,10 +411,12 @@ void FOOTPRINT_VIEWER_FRAME::ClickOnFootprintList( wxCommandEvent& event ) } catch( const IO_ERROR& ioe ) { - wxString msg; - msg.Printf( _( "Could not load footprint \"%s\" from library \"%s\".\n\n" - "Error %s." ), GetChars( m_footprintName ), GetChars( m_libraryName ), + wxString msg = wxString::Format( + _( "Could not load footprint \"%s\" from library \"%s\".\n\nError %s." ), + GetChars( getCurFootprintName() ), + GetChars( getCurNickname() ), GetChars( ioe.errorText ) ); + DisplayError( this, msg ); } @@ -466,19 +459,15 @@ void FOOTPRINT_VIEWER_FRAME::ExportSelectedFootprint( wxCommandEvent& event ) { wxString fp_name = m_footprintList->GetString( ii ); - // @todo(DICK) assign to static now, later PROJECT retained string. - m_selectedFootprintName = fp_name; - FPID fpid; - fpid.SetLibNickname( GetSelectedLibrary() ); + fpid.SetLibNickname( getCurNickname() ); fpid.SetFootprintName( fp_name ); DismissModal( true, fpid.Format() ); } else { - m_selectedFootprintName.Empty(); DismissModal( false ); } @@ -498,6 +487,30 @@ void FOOTPRINT_VIEWER_FRAME::SaveSettings( wxConfigBase* aCfg ) } +const wxString FOOTPRINT_VIEWER_FRAME::getCurNickname() +{ + return Prj().GetRString( PROJECT::PCB_FOOTPRINT_VIEWER_NICKNAME ); +} + + +void FOOTPRINT_VIEWER_FRAME::setCurNickname( const wxString& aNickname ) +{ + Prj().SetRString( PROJECT::PCB_FOOTPRINT_VIEWER_NICKNAME, aNickname ); +} + + +const wxString FOOTPRINT_VIEWER_FRAME::getCurFootprintName() +{ + return Prj().GetRString( PROJECT::PCB_FOOTPRINT_VIEWER_FPNAME ); +} + + +void FOOTPRINT_VIEWER_FRAME::setCurFootprintName( const wxString& aName ) +{ + Prj().SetRString( PROJECT::PCB_FOOTPRINT_VIEWER_FPNAME, aName ); +} + + void FOOTPRINT_VIEWER_FRAME::OnActivate( wxActivateEvent& event ) { EDA_DRAW_FRAME::OnActivate( event ); @@ -506,8 +519,6 @@ void FOOTPRINT_VIEWER_FRAME::OnActivate( wxActivateEvent& event ) if( ! m_FrameIsActive ) return; - m_selectedFootprintName.Empty(); - // Ensure we have the right library list: std::vector< wxString > libNicknames = Prj().PcbFootprintLibs()->GetLogicalLibs(); @@ -615,8 +626,10 @@ void FOOTPRINT_VIEWER_FRAME::Update3D_Frame( bool aForceReloadFootprint ) if( m_Draw3DFrame == NULL ) return; - wxString frm3Dtitle; - frm3Dtitle.Printf( _( "ModView: 3D Viewer [%s]" ), GetChars( m_footprintName ) ); + wxString frm3Dtitle = wxString::Format( + _( "ModView: 3D Viewer [%s]" ), + GetChars( getCurFootprintName() ) ); + m_Draw3DFrame->SetTitle( frm3Dtitle ); if( aForceReloadFootprint ) @@ -675,8 +688,8 @@ void FOOTPRINT_VIEWER_FRAME::UpdateTitle() msg = _( "Library Browser" ); msg << wxT( " [" ); - if( ! m_libraryName.IsEmpty() ) - msg << m_libraryName; + if( getCurNickname().size() ) + msg << getCurNickname(); else msg += _( "no library selected" ); @@ -688,16 +701,16 @@ void FOOTPRINT_VIEWER_FRAME::UpdateTitle() void FOOTPRINT_VIEWER_FRAME::SelectCurrentLibrary( wxCommandEvent& event ) { - wxString selection = SelectLibrary( m_libraryName ); + wxString selection = SelectLibrary( getCurNickname() ); - if( !!selection && selection != m_libraryName ) + if( !!selection && selection != getCurNickname() ) { - m_libraryName = selection; + setCurNickname( selection ); UpdateTitle(); ReCreateFootprintList(); - int id = m_libList->FindString( m_libraryName ); + int id = m_libList->FindString( getCurNickname() ); if( id >= 0 ) m_libList->SetSelection( id ); @@ -714,9 +727,9 @@ void FOOTPRINT_VIEWER_FRAME::SelectCurrentFootprint( wxCommandEvent& event ) (void*) parent; #endif - wxString libname = m_libraryName + wxT( "." ) + LegacyFootprintLibPathExtension; + wxString nickname = getCurNickname(); MODULE* oldmodule = GetBoard()->m_Modules; - MODULE* module = LoadModuleFromLibrary( libname, Prj().PcbFootprintLibs(), false ); + MODULE* module = LoadModuleFromLibrary( nickname, Prj().PcbFootprintLibs(), false ); if( module ) { @@ -729,31 +742,37 @@ void FOOTPRINT_VIEWER_FRAME::SelectCurrentFootprint( wxCommandEvent& event ) delete oldmodule; } - m_footprintName = FROM_UTF8( module->GetFPID().GetFootprintName().c_str() ); + setCurFootprintName( module->GetFPID().GetFootprintName() ); + + wxString nickname = module->GetFPID().GetLibNickname(); + + if( !getCurNickname() && nickname.size() ) + { + // Set the listbox + int index = m_libList->FindString( nickname ); + if( index != wxNOT_FOUND ) + m_libList->SetSelection( index, true ); + + setCurNickname( nickname ); + } + module->ClearFlags(); SetCurItem( NULL ); Zoom_Automatique( false ); m_canvas->Refresh(); Update3D_Frame(); - m_footprintList->SetStringSelection( m_footprintName ); + m_footprintList->SetStringSelection( getCurFootprintName() ); } } -const wxString FOOTPRINT_VIEWER_FRAME::GetSelectedLibraryFullName( void ) -{ - wxString fullname = m_libraryName + wxT( "." ) + LegacyFootprintLibPathExtension; - return fullname; -} - - void FOOTPRINT_VIEWER_FRAME::SelectAndViewFootprint( int aMode ) { - if( !m_libraryName ) + if( !getCurNickname() ) return; - int selection = m_footprintList->FindString( m_footprintName ); + int selection = m_footprintList->FindString( getCurFootprintName() ); if( aMode == NEXT_PART ) { @@ -770,13 +789,14 @@ void FOOTPRINT_VIEWER_FRAME::SelectAndViewFootprint( int aMode ) if( selection != wxNOT_FOUND ) { m_footprintList->SetSelection( selection ); - m_footprintName = m_footprintList->GetString( selection ); + setCurFootprintName( m_footprintList->GetString( selection ) ); SetCurItem( NULL ); // Delete the current footprint GetBoard()->m_Modules.DeleteAll(); - MODULE* footprint = Prj().PcbFootprintLibs()->FootprintLoad( m_libraryName, m_footprintName ); + MODULE* footprint = Prj().PcbFootprintLibs()->FootprintLoad( + getCurNickname(), getCurFootprintName() ); if( footprint ) GetBoard()->Add( footprint, ADD_APPEND ); diff --git a/pcbnew/modview_frame.h b/pcbnew/modview_frame.h index 9595866458..aaa04afaf7 100644 --- a/pcbnew/modview_frame.h +++ b/pcbnew/modview_frame.h @@ -59,15 +59,6 @@ public: */ static const wxChar* GetFootprintViewerFrameName(); - wxString& GetSelectedFootprint( void ) const { return m_selectedFootprintName; } - const wxString GetSelectedLibraryFullName(); - - /** - * Function GetSelectedLibrary - * @return the selected library name from the #FP_LIB_TABLE. - */ - const wxString& GetSelectedLibrary() { return m_libraryName; } - virtual EDA_COLOR_T GetGridColor() const; /** @@ -86,10 +77,11 @@ private: wxString m_configPath; // subpath for configuration - static wxString m_libraryName; // Current selected library - static wxString m_footprintName; // Current selected footprint - static wxString m_selectedFootprintName; // When the viewer is used to select a footprint + const wxString getCurNickname(); + void setCurNickname( const wxString& aNickname ); + const wxString getCurFootprintName(); + void setCurFootprintName( const wxString& aName ); void OnSize( wxSizeEvent& event ); @@ -123,8 +115,6 @@ private: void LoadSettings( wxConfigBase* aCfg ); // override virtual void SaveSettings( wxConfigBase* aCfg ); // override virtual - wxString& GetFootprintName( void ) const { return m_footprintName; } - /** * Function OnActivate * is called when the frame frame is activate to reload the libraries and component lists From 688dbe5de12c716c8577593790875e837b122b76 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 17 Jun 2014 20:31:27 +0200 Subject: [PATCH 509/741] Minor cosmetic enhancement, and try to fix an issue with accelerator keys and the Python scripting console --- include/wxPcbStruct.h | 8 ++-- pcbnew/menubar_pcbframe.cpp | 4 +- pcbnew/pcbframe.cpp | 50 +++++++++++------------ pcbnew/tool_pcb.cpp | 10 ++--- pcbnew/toolbars_update_user_interface.cpp | 6 +++ 5 files changed, 42 insertions(+), 36 deletions(-) diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index b9321922a8..b7e23b9b48 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -105,9 +105,7 @@ class PCB_EDIT_FRAME : public PCB_BASE_FRAME protected: #ifdef KICAD_SCRIPTING_WXPYTHON - // Panel used to let user talk with internal scripting - wxWindow* m_pythonPanel; - bool m_pythonPanelHidden; + bool m_pythonPanelShow; ///< Visibility flag for Python Console #endif PCB_LAYER_WIDGET* m_Layers; @@ -1524,7 +1522,9 @@ public: * Function ScriptingConsoleEnableDisable * enables or disabled the scripting console */ - void ScriptingConsoleEnableDisable( wxCommandEvent& event ); + void ScriptingConsoleEnableDisable( wxCommandEvent& aEvent ); + + void OnUpdateScriptingConsoleState( wxUpdateUIEvent& aEvent ); void OnSelectAutoPlaceMode( wxCommandEvent& aEvent ); diff --git a/pcbnew/menubar_pcbframe.cpp b/pcbnew/menubar_pcbframe.cpp index b95b8529fe..649694ac4f 100644 --- a/pcbnew/menubar_pcbframe.cpp +++ b/pcbnew/menubar_pcbframe.cpp @@ -534,8 +534,8 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() #if defined(KICAD_SCRIPTING_WXPYTHON) AddMenuItem( toolsMenu, ID_TOOLBARH_PCB_SCRIPTING_CONSOLE, _( "&Scripting Console" ), - _( "Show/Hide the Scripting console" ), - KiBitmap( book_xpm ) ); + _( "Show/Hide the Python Scripting console" ), + KiBitmap( py_script_xpm ) ); #endif wxMenu* designRulesMenu = new wxMenu; diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index d9f4791969..9401749085 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -72,6 +72,8 @@ #if defined(KICAD_SCRIPTING) || defined(KICAD_SCRIPTING_WXPYTHON) #include +// The name of the pane info handling the python console: +#define PYTHONCONSOLE_STRID wxT( "PythonPanel" ) #endif #include @@ -203,6 +205,8 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME ) EVT_TOOL( ID_TOOLBARH_PCB_FREEROUTE_ACCESS, PCB_EDIT_FRAME::Access_to_External_Tool ) #ifdef KICAD_SCRIPTING_WXPYTHON EVT_TOOL( ID_TOOLBARH_PCB_SCRIPTING_CONSOLE, PCB_EDIT_FRAME::ScriptingConsoleEnableDisable ) + EVT_UPDATE_UI( ID_TOOLBARH_PCB_SCRIPTING_CONSOLE, + PCB_EDIT_FRAME::OnUpdateScriptingConsoleState ) #endif // Option toolbar EVT_TOOL( ID_TB_OPTIONS_DRC_OFF, @@ -319,10 +323,6 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : m_rotationAngle = 900; -#ifdef KICAD_SCRIPTING_WXPYTHON - m_pythonPanel = NULL; -#endif - for ( int i = 0; i < 10; i++ ) m_Macros[i].m_Record.clear(); @@ -415,7 +415,8 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : if( m_microWaveToolBar ) // The auxiliary vertical right toolbar (currently microwave tools) m_auimgr.AddPane( m_microWaveToolBar, - wxAuiPaneInfo( vert ).Name( wxT( "m_microWaveToolBar" ) ).Right().Layer( 1 ).Position(1).Hide() ); + wxAuiPaneInfo( vert ).Name( wxT( "m_microWaveToolBar" ) ). + Right().Layer( 1 ).Position(1).Hide() ); if( m_drawToolBar ) // The main right vertical toolbar m_auimgr.AddPane( m_drawToolBar, @@ -448,18 +449,25 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : #if defined(KICAD_SCRIPTING_WXPYTHON) // Add the scripting panel - EDA_PANEINFO pythonAuiInfo; - pythonAuiInfo.ScriptingToolbarPane(); - pythonAuiInfo.Caption( wxT( "Python Scripting" ) ); - pythonAuiInfo.MinSize( wxSize( 200, 100 ) ); - pythonAuiInfo.BestSize( wxSize( GetClientSize().x/2, 200 ) ); - pythonAuiInfo.Hide(); + EDA_PANEINFO pythonAuiPane; + pythonAuiPane.ScriptingToolbarPane(); + pythonAuiPane.Caption( wxT( "Python Scripting" ) ); + pythonAuiPane.MinSize( 300, 100 ); + pythonAuiPane.BestSize( 600, 200 ); - m_pythonPanel = CreatePythonShellWindow( this ); - m_auimgr.AddPane( m_pythonPanel, - pythonAuiInfo.Name( wxT( "PythonPanel" ) ).Bottom().Layer(9) ); + // The console is not dockable. Reasons: + // * When docked there is an issue with accelerator keys used in the main menu: + // these keys are not sent to the console, even if it has the focus + // * The console is more easy to move, resize, ... if it is not dockable + pythonAuiPane.Float().Dockable( false ); + + pythonAuiPane.Hide(); + m_pythonPanelShow = false; + + wxWindow *pythonPanel = CreatePythonShellWindow( this ); + m_auimgr.AddPane( pythonPanel, + pythonAuiPane.Name( PYTHONCONSOLE_STRID ).Bottom().Layer(9) ); - m_pythonPanelHidden = true; #endif ReFillLayerWidget(); // this is near end because contents establish size @@ -1093,16 +1101,8 @@ void PCB_EDIT_FRAME::UpdateTitle() #if defined(KICAD_SCRIPTING_WXPYTHON) void PCB_EDIT_FRAME::ScriptingConsoleEnableDisable( wxCommandEvent& aEvent ) { - if ( m_pythonPanelHidden ) - { - m_auimgr.GetPane( m_pythonPanel ).Show(); - m_pythonPanelHidden = false; - } - else - { - m_auimgr.GetPane( m_pythonPanel ).Hide(); - m_pythonPanelHidden = true; - } + m_pythonPanelShow = ! m_pythonPanelShow; + m_auimgr.GetPane( PYTHONCONSOLE_STRID ).Show( m_pythonPanelShow ); m_auimgr.Update(); diff --git a/pcbnew/tool_pcb.cpp b/pcbnew/tool_pcb.cpp index 90c2cf6ee8..ab77b42d1f 100644 --- a/pcbnew/tool_pcb.cpp +++ b/pcbnew/tool_pcb.cpp @@ -307,16 +307,16 @@ void PCB_EDIT_FRAME::ReCreateHToolbar() KiBitmap( web_support_xpm ), _( "Fast access to the Web Based FreeROUTE advanced router" ) ); - m_mainToolBar->AddSeparator(); - // Access to the scripting console #ifdef KICAD_SCRIPTING_WXPYTHON + m_mainToolBar->AddSeparator(); + m_mainToolBar->AddTool( ID_TOOLBARH_PCB_SCRIPTING_CONSOLE, wxEmptyString, KiBitmap( py_script_xpm ), - _( "Show/Hide the Scripting console" ) ); - - m_mainToolBar->AddSeparator(); + _( "Show/Hide the Python Scripting console" ), + wxITEM_CHECK ); #endif + // after adding the buttons to the toolbar, must call Realize() to reflect the changes m_mainToolBar->Realize(); } diff --git a/pcbnew/toolbars_update_user_interface.cpp b/pcbnew/toolbars_update_user_interface.cpp index b94bc75d59..a33915fe4b 100644 --- a/pcbnew/toolbars_update_user_interface.cpp +++ b/pcbnew/toolbars_update_user_interface.cpp @@ -109,6 +109,12 @@ void PCB_EDIT_FRAME::OnUpdateLayerSelectBox( wxUpdateUIEvent& aEvent ) m_SelLayerBox->SetLayerSelection( GetActiveLayer() ); } +#ifdef KICAD_SCRIPTING_WXPYTHON +void PCB_EDIT_FRAME::OnUpdateScriptingConsoleState( wxUpdateUIEvent& aEvent ) +{ + aEvent.Check( m_pythonPanelShow ); +} +#endif void PCB_EDIT_FRAME::OnUpdateZoneDisplayStyle( wxUpdateUIEvent& aEvent ) { From 1a47508832197b0478a9cd4262859c91c563988b Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 19 Jun 2014 09:12:48 +0200 Subject: [PATCH 510/741] Gerber X2 patch (Support for the "file function" attribute) from Thiadmer Riemersma, committed in rev 4948: minor fix for better compatibility with older versions of Pcbnew --- pcbnew/pcb_plot_params.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pcbnew/pcb_plot_params.cpp b/pcbnew/pcb_plot_params.cpp index bc9ce8bbb6..20a51562a0 100644 --- a/pcbnew/pcb_plot_params.cpp +++ b/pcbnew/pcb_plot_params.cpp @@ -130,8 +130,11 @@ void PCB_PLOT_PARAMS::Format( OUTPUTFORMATTER* aFormatter, long(m_layerSelection) ); aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_usegerberextensions ), m_useGerberExtensions ? trueStr : falseStr ); - aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_usegerberattributes ), - m_useGerberAttributes ? trueStr : falseStr ); + + if( m_useGerberAttributes ) // save this option only if active, + // to avoid incompatibility with older Pcbnew version + aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_usegerberattributes ), trueStr ); + aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_excludeedgelayer ), m_excludeEdgeLayer ? trueStr : falseStr ); aFormatter->Print( aNestLevel+1, "(%s %f)\n", getTokenName( T_linewidth ), From 94d78047e38e3d3e0c46662a8eedd8926443a2dd Mon Sep 17 00:00:00 2001 From: Lorenzo Marcantonio Date: Fri, 20 Jun 2014 10:55:30 +0200 Subject: [PATCH 511/741] Fixes 1332429 --- common/common_plotPDF_functions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/common_plotPDF_functions.cpp b/common/common_plotPDF_functions.cpp index 7d75be97d4..7de4a6bd6a 100644 --- a/common/common_plotPDF_functions.cpp +++ b/common/common_plotPDF_functions.cpp @@ -723,7 +723,7 @@ bool PDF_PLOTTER::EndPlot() "<< /Size %lu /Root %d 0 R /Info %d 0 R >>\n" "startxref\n" "%ld\n" // The offset we saved before - "%%EOF\n", + "%%%%EOF\n", (unsigned long) xrefTable.size(), catalogHandle, infoDictHandle, xref_start ); fclose( outputFile ); From 7c99a242cf9054d56d218a8be962650bb37ccb25 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 20 Jun 2014 13:13:04 +0200 Subject: [PATCH 512/741] Remove 2 global variables: g_DrawBgColor and g_ShowPageLimits. They are now member of EDA_DRAW_FRAME. This change could fix Bug #1330781 (Background color change in Eeschema affects background color in Pcbnew) Show page limits has meaning only for the schematic editor, the board editor and the page layout editor. Draw background color selection exists only in eeschema and page layout editor. In pcbnew, only a black background is allowed. A side effect is now the user should set the background color in schematic editor, and the library editor (2 different options). The default is still the white color. --- common/draw_frame.cpp | 3 ++ common/draw_panel.cpp | 16 +++++--- common/kiface_i.cpp | 31 -------------- common/worksheet.cpp | 4 +- cvpcb/cvpcb.cpp | 2 - eeschema/dialogs/dialog_color_config.cpp | 10 ++--- eeschema/dialogs/dialog_lib_edit_pin.cpp | 4 +- eeschema/dialogs/dialog_lib_edit_pin.h | 2 +- .../dialogs/dialog_print_using_printer.cpp | 6 +-- eeschema/eeschema_config.cpp | 20 +++++---- eeschema/libeditframe.cpp | 5 +++ eeschema/sch_base_frame.cpp | 2 +- eeschema/schframe.cpp | 1 + eeschema/viewlib_frame.cpp | 9 ++++ gerbview/draw_gerber_screen.cpp | 8 ++-- gerbview/gerbview.cpp | 3 -- gerbview/gerbview_frame.cpp | 2 +- include/common.h | 2 - include/draw_frame.h | 9 ++++ include/gr_basic.h | 3 +- include/wxstruct.h | 7 ++-- .../dialogs/dialogs_for_printing.cpp | 6 +-- pagelayout_editor/menubar.cpp | 2 +- pagelayout_editor/pl_editor.cpp | 7 ---- pagelayout_editor/pl_editor_config.cpp | 8 ++-- pagelayout_editor/pl_editor_frame.cpp | 31 ++++++++------ pcbnew/class_pad_draw_functions.cpp | 2 +- pcbnew/class_track.cpp | 2 +- pcbnew/dialogs/dialog_display_options.cpp | 41 +++++++++++++++---- pcbnew/pcbnew.cpp | 2 - pcbnew/pcbnew_config.cpp | 21 +--------- pcbnew/print_board_functions.cpp | 2 +- pcbnew/printout_controler.cpp | 8 ++-- 33 files changed, 143 insertions(+), 138 deletions(-) diff --git a/common/draw_frame.cpp b/common/draw_frame.cpp index 1300ff9718..b94c2c67b5 100644 --- a/common/draw_frame.cpp +++ b/common/draw_frame.cpp @@ -117,6 +117,9 @@ EDA_DRAW_FRAME::EDA_DRAW_FRAME( KIWAY* aKiway, wxWindow* aParent, m_LastGridSizeId = 0; m_DrawGrid = true; // hide/Show grid. default = show m_GridColor = DARKGRAY; // Grid color + m_showPageLimits = false; + m_drawBgColor = BLACK; // the background color of the draw canvas: + // BLACK for Pcbnew, BLACK or WHITeEfor eeschema m_snapToGrid = true; m_MsgFrameHeight = EDA_MSG_PANEL::GetRequiredHeight(); m_movingCursorWithKeyboard = false; diff --git a/common/draw_panel.cpp b/common/draw_panel.cpp index dedd4f6059..73864ad2db 100644 --- a/common/draw_panel.cpp +++ b/common/draw_panel.cpp @@ -103,7 +103,7 @@ EDA_DRAW_PANEL::EDA_DRAW_PANEL( EDA_DRAW_FRAME* parent, int id, m_scrollIncrementX = std::min( size.x / 8, 10 ); m_scrollIncrementY = std::min( size.y / 8, 10 ); - SetBackgroundColour( MakeColour( g_DrawBgColor ) ); + SetBackgroundColour( MakeColour( parent->GetDrawBgColor() ) ); #if KICAD_USE_BUFFERED_DC || KICAD_USE_BUFFERED_PAINTDC SetBackgroundStyle( wxBG_STYLE_CUSTOM ); @@ -528,9 +528,11 @@ void EDA_DRAW_PANEL::EraseScreen( wxDC* DC ) { GRSetDrawMode( DC, GR_COPY ); + EDA_COLOR_T bgColor = GetParent()->GetDrawBgColor(); + GRSFilledRect( NULL, DC, m_ClipBox.GetX(), m_ClipBox.GetY(), m_ClipBox.GetRight(), m_ClipBox.GetBottom(), - 0, g_DrawBgColor, g_DrawBgColor ); + 0, bgColor, bgColor ); // Set to one (1) to draw bounding box validate bounding box calculation. #if DEBUG_SHOW_CLIP_RECT @@ -583,10 +585,12 @@ void EDA_DRAW_PANEL::ReDraw( wxDC* DC, bool erasebg ) if( Screen == NULL ) return; - if( ( g_DrawBgColor != WHITE ) && ( g_DrawBgColor != BLACK ) ) - g_DrawBgColor = BLACK; + EDA_COLOR_T bgColor = GetParent()->GetDrawBgColor(); - if( g_DrawBgColor == WHITE ) + if( ( bgColor != WHITE ) && ( bgColor != BLACK ) ) + bgColor = BLACK; + + if( bgColor == WHITE ) { g_XorMode = GR_NXOR; g_GhostColor = BLACK; @@ -599,7 +603,7 @@ void EDA_DRAW_PANEL::ReDraw( wxDC* DC, bool erasebg ) GRResetPenAndBrush( DC ); - DC->SetBackground( g_DrawBgColor == BLACK ? *wxBLACK_BRUSH : *wxWHITE_BRUSH ); + DC->SetBackground( bgColor == BLACK ? *wxBLACK_BRUSH : *wxWHITE_BRUSH ); DC->SetBackgroundMode( wxSOLID ); if( erasebg ) diff --git a/common/kiface_i.cpp b/common/kiface_i.cpp index f7772a1e35..53d5f3233e 100644 --- a/common/kiface_i.cpp +++ b/common/kiface_i.cpp @@ -31,12 +31,6 @@ #include #include -#include - - -static const wxChar showPageLimitsKey[] = wxT( "ShowPageLimits" ); -static const wxChar backgroundColorKey[] = wxT( "BackgroundColor" ); - /// Initialize aDst SEARCH_STACK with KIFACE (DSO) specific settings. /// A non-member function so it an be moved easily, plus it's nobody's business. @@ -97,24 +91,7 @@ static void setSearchPaths( SEARCH_STACK* aDst, KIWAY::FACE_T aId ) bool KIFACE_I::start_common( int aCtlBits ) { m_start_flags = aCtlBits; - m_bm.Init(); - - m_bm.m_config->Read( showPageLimitsKey, &g_ShowPageLimits ); - - // FIXME OSX Mountain Lion (10.8) - // Seems that Read doesn't found anything and ColorFromInt - // Asserts - I'm unable to reproduce on 10.7 - - int draw_bg_color = BLACK; // Default for all apps but Eeschema - - if( m_id == KIWAY::FACE_SCH ) - draw_bg_color = WHITE; // Default for Eeschema - - m_bm.m_config->Read( backgroundColorKey, &draw_bg_color ); - - g_DrawBgColor = ColorFromInt( draw_bg_color ); - setSearchPaths( &m_bm.m_search, m_id ); return true; @@ -123,14 +100,6 @@ bool KIFACE_I::start_common( int aCtlBits ) void KIFACE_I::end_common() { - if( m_bm.m_config ) - { - // Save common preferences; the background still uses the old legacy - // color numbers, not the new names - m_bm.m_config->Write( showPageLimitsKey, g_ShowPageLimits ); - m_bm.m_config->Write( backgroundColorKey, int( g_DrawBgColor ) ); - } - m_bm.End(); } diff --git a/common/worksheet.cpp b/common/worksheet.cpp index 215b2dd4b7..eb1ab917d4 100644 --- a/common/worksheet.cpp +++ b/common/worksheet.cpp @@ -83,12 +83,12 @@ void EDA_DRAW_FRAME::DrawWorkSheet( wxDC* aDC, BASE_SCREEN* aScreen, int aLineWi wxSize pageSize = pageInfo.GetSizeMils(); // if not printing, draw the page limits: - if( !aScreen->m_IsPrinting && g_ShowPageLimits ) + if( !aScreen->m_IsPrinting && m_showPageLimits ) { GRSetDrawMode( aDC, GR_COPY ); GRRect( m_canvas->GetClipBox(), aDC, 0, 0, pageSize.x * aScalar, pageSize.y * aScalar, aLineWidth, - g_DrawBgColor == WHITE ? LIGHTGRAY : DARKDARKGRAY ); + m_drawBgColor == WHITE ? LIGHTGRAY : DARKDARKGRAY ); } TITLE_BLOCK t_block = GetTitleBlock(); diff --git a/cvpcb/cvpcb.cpp b/cvpcb/cvpcb.cpp index 78fbebf619..317ef82631 100644 --- a/cvpcb/cvpcb.cpp +++ b/cvpcb/cvpcb.cpp @@ -294,8 +294,6 @@ bool IFACE::OnKifaceStart( PGM_BASE* aProgram, int aCtlBits ) // SetFootprintLibTablePath(); */ - g_DrawBgColor = BLACK; - try { // The global table is not related to a specific project. All projects diff --git a/eeschema/dialogs/dialog_color_config.cpp b/eeschema/dialogs/dialog_color_config.cpp index 1ed7ae72dc..d256a6a7cd 100644 --- a/eeschema/dialogs/dialog_color_config.cpp +++ b/eeschema/dialogs/dialog_color_config.cpp @@ -232,7 +232,7 @@ void DIALOG_COLOR_CONFIG::CreateControls() m_SelBgColor = new wxRadioBox( this, wxID_ANY, _( "Background Color" ), wxDefaultPosition, wxDefaultSize, m_SelBgColorStrings, 1, wxRA_SPECIFY_COLS ); - m_SelBgColor->SetSelection( ( g_DrawBgColor == BLACK ) ? 1 : 0 ); + m_SelBgColor->SetSelection( ( m_parent->GetDrawBgColor() == BLACK ) ? 1 : 0 ); m_columnBoxSizer->Add( m_SelBgColor, 1, wxGROW | wxRIGHT | wxTOP | wxBOTTOM, 5 ); // Provide a line to separate all of the controls added so far from the @@ -318,9 +318,9 @@ bool DIALOG_COLOR_CONFIG::UpdateColorsSettings() { // Update color of background if( m_SelBgColor->GetSelection() == 0 ) - g_DrawBgColor = WHITE; + m_parent->SetDrawBgColor( WHITE ); else - g_DrawBgColor = BLACK; + m_parent->SetDrawBgColor( BLACK ); bool warning = false; @@ -328,13 +328,13 @@ bool DIALOG_COLOR_CONFIG::UpdateColorsSettings() { SetLayerColor( currentColors[ ii ], ii ); - if( g_DrawBgColor == GetLayerColor( ii ) ) + if( m_parent->GetDrawBgColor() == GetLayerColor( ii ) ) warning = true; } m_parent->SetGridColor( GetLayerColor( LAYER_GRID ) ); - if( g_DrawBgColor == GetLayerColor( LAYER_GRID ) ) + if( m_parent->GetDrawBgColor() == GetLayerColor( LAYER_GRID ) ) warning = true; return warning; diff --git a/eeschema/dialogs/dialog_lib_edit_pin.cpp b/eeschema/dialogs/dialog_lib_edit_pin.cpp index 7f3307ad83..f23ea1bc3b 100644 --- a/eeschema/dialogs/dialog_lib_edit_pin.cpp +++ b/eeschema/dialogs/dialog_lib_edit_pin.cpp @@ -9,7 +9,7 @@ #include -DIALOG_LIB_EDIT_PIN::DIALOG_LIB_EDIT_PIN( wxWindow* parent, LIB_PIN* aPin ) : +DIALOG_LIB_EDIT_PIN::DIALOG_LIB_EDIT_PIN( EDA_DRAW_FRAME* parent, LIB_PIN* aPin ) : DIALOG_LIB_EDIT_PIN_BASE( parent ) { // Creates a dummy pin to show on a panel, inside this dialog: @@ -20,7 +20,7 @@ DIALOG_LIB_EDIT_PIN::DIALOG_LIB_EDIT_PIN( wxWindow* parent, LIB_PIN* aPin ) : m_dummyPin->SetParent( NULL ); m_dummyPin->ClearFlags(); - m_panelShowPin->SetBackgroundColour( MakeColour( g_DrawBgColor ) ); + m_panelShowPin->SetBackgroundColour( MakeColour( parent->GetDrawBgColor() ) ); // Set tab order m_textPadName->MoveAfterInTabOrder(m_textPinName); diff --git a/eeschema/dialogs/dialog_lib_edit_pin.h b/eeschema/dialogs/dialog_lib_edit_pin.h index 6c6e15e894..b9169fcacb 100644 --- a/eeschema/dialogs/dialog_lib_edit_pin.h +++ b/eeschema/dialogs/dialog_lib_edit_pin.h @@ -17,7 +17,7 @@ class DIALOG_LIB_EDIT_PIN : public DIALOG_LIB_EDIT_PIN_BASE public: /** Constructor */ - DIALOG_LIB_EDIT_PIN( wxWindow* parent, LIB_PIN* aPin ); + DIALOG_LIB_EDIT_PIN( EDA_DRAW_FRAME* parent, LIB_PIN* aPin ); ~DIALOG_LIB_EDIT_PIN(); void OnCloseDialog( wxCloseEvent& event ); diff --git a/eeschema/dialogs/dialog_print_using_printer.cpp b/eeschema/dialogs/dialog_print_using_printer.cpp index 15fbdc8055..198289d50c 100644 --- a/eeschema/dialogs/dialog_print_using_printer.cpp +++ b/eeschema/dialogs/dialog_print_using_printer.cpp @@ -63,7 +63,7 @@ public: m_Parent = aParent; } - + SCH_EDIT_FRAME* GetSchFrameParent() { return m_Parent->GetParent(); } bool OnPrintPage( int page ); bool HasPage( int page ); bool OnBeginDocument( int startPage, int endPage ); @@ -425,7 +425,7 @@ void SCH_PRINTOUT::DrawPage( SCH_SCREEN* aScreen ) aScreen->m_IsPrinting = true; - EDA_COLOR_T bg_color = g_DrawBgColor; + EDA_COLOR_T bg_color = GetSchFrameParent()->GetDrawBgColor(); aScreen->Draw( panel, dc, GR_DEFAULT_DRAWMODE ); @@ -433,7 +433,7 @@ void SCH_PRINTOUT::DrawPage( SCH_SCREEN* aScreen ) parent->DrawWorkSheet( dc, aScreen, GetDefaultLineThickness(), IU_PER_MILS, aScreen->GetFileName() ); - g_DrawBgColor = bg_color; + GetSchFrameParent()->SetDrawBgColor( bg_color ); aScreen->m_IsPrinting = false; panel->SetClipBox( oldClipBox ); diff --git a/eeschema/eeschema_config.cpp b/eeschema/eeschema_config.cpp index 8ece081b1b..7f1506328b 100644 --- a/eeschema/eeschema_config.cpp +++ b/eeschema/eeschema_config.cpp @@ -76,14 +76,14 @@ void SetDefaultBusThickness( int aThickness) /// Default size for text (not only labels) static int s_defaultTextSize; -int GetDefaultTextSize() -{ +int GetDefaultTextSize() +{ return s_defaultTextSize; } -void SetDefaultTextSize( int aTextSize ) -{ - s_defaultTextSize = aTextSize; +void SetDefaultTextSize( int aTextSize ) +{ + s_defaultTextSize = aTextSize; } /* @@ -311,7 +311,7 @@ void SCH_EDIT_FRAME::OnSetOptions( wxCommandEvent& event ) dlg.SetMiddleButtonPanLimited( m_canvas->GetMiddleButtonPanLimited() ); dlg.SetEnableAutoPan( m_canvas->GetEnableAutoPan() ); dlg.SetEnableHVBusOrientation( GetForceHVLines() ); - dlg.SetShowPageLimits( g_ShowPageLimits ); + dlg.SetShowPageLimits( m_showPageLimits ); dlg.Layout(); dlg.Fit(); dlg.SetMinSize( dlg.GetSize() ); @@ -357,7 +357,7 @@ void SCH_EDIT_FRAME::OnSetOptions( wxCommandEvent& event ) m_canvas->SetMiddleButtonPanLimited( dlg.GetMiddleButtonPanLimited() ); m_canvas->SetEnableAutoPan( dlg.GetEnableAutoPan() ); SetForceHVLines( dlg.GetEnableHVBusOrientation() ); - g_ShowPageLimits = dlg.GetShowPageLimits(); + m_showPageLimits = dlg.GetShowPageLimits(); wxString templateFieldName; @@ -534,8 +534,14 @@ PARAM_CFG_ARRAY& SCH_EDIT_FRAME::GetConfigurationSettings( void ) if( !m_configSettings.empty() ) return m_configSettings; + m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "ShowPageLimits" ), + &m_showPageLimits, true ) ); m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "Units" ), (int*)&g_UserUnit, MILLIMETRES ) ); + m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "SchEditorBgColor" ), + &m_drawBgColor, + WHITE ) ); + m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorWireEx" ), &s_layerColor[LAYER_WIRE], GREEN ) ); diff --git a/eeschema/libeditframe.cpp b/eeschema/libeditframe.cpp index 379c5bb0cd..fd3597d3ac 100644 --- a/eeschema/libeditframe.cpp +++ b/eeschema/libeditframe.cpp @@ -295,6 +295,7 @@ const wxChar* LIB_EDIT_FRAME::GetLibEditFrameName() return LIB_EDIT_FRAME_NAME; } +static const wxChar drawBgColorKey[] = wxT( "LibeditBgColor" ); void LIB_EDIT_FRAME::LoadSettings( wxConfigBase* aCfg ) { @@ -312,6 +313,9 @@ void LIB_EDIT_FRAME::LoadSettings( wxConfigBase* aCfg ) wxConfigPathChanger cpc( aCfg, m_configPath ); + EDA_COLOR_T itmp = ColorByName( aCfg->Read( drawBgColorKey, wxT("WHITE") ) ); + SetDrawBgColor( itmp ); + m_lastLibExportPath = aCfg->Read( lastLibExportPathEntry, ::wxGetCwd() ); m_lastLibImportPath = aCfg->Read( lastLibImportPathEntry, ::wxGetCwd() ); @@ -335,6 +339,7 @@ void LIB_EDIT_FRAME::SaveSettings( wxConfigBase* aCfg ) wxConfigPathChanger cpc( aCfg, m_configPath ); + aCfg->Write( drawBgColorKey, ColorGetName( GetDrawBgColor() ) ); aCfg->Write( lastLibExportPathEntry, m_lastLibExportPath ); aCfg->Write( lastLibImportPathEntry, m_lastLibImportPath ); } diff --git a/eeschema/sch_base_frame.cpp b/eeschema/sch_base_frame.cpp index ca6ac2f9ed..411697ad4c 100644 --- a/eeschema/sch_base_frame.cpp +++ b/eeschema/sch_base_frame.cpp @@ -28,7 +28,6 @@ #include #include - SCH_BASE_FRAME::SCH_BASE_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aWindowType, const wxString& aTitle, const wxPoint& aPosition, const wxSize& aSize, long aStyle, @@ -36,6 +35,7 @@ SCH_BASE_FRAME::SCH_BASE_FRAME( KIWAY* aKiway, wxWindow* aParent, EDA_DRAW_FRAME( aKiway, aParent, aWindowType, aTitle, aPosition, aSize, aStyle, aFrameName ) { + SetDrawBgColor( WHITE ); // the background color of the draw canvas, BLACK or WHITE } diff --git a/eeschema/schframe.cpp b/eeschema/schframe.cpp index 4a46f3047a..abc89e3cf8 100644 --- a/eeschema/schframe.cpp +++ b/eeschema/schframe.cpp @@ -191,6 +191,7 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ): m_previewSize = wxDefaultSize; m_printMonochrome = true; m_printSheetReference = true; + SetShowPageLimits( true ); m_HotkeysZoomAndGridList = s_Schematic_Hokeys_Descr; m_dlgFindReplace = NULL; m_findReplaceData = new wxFindReplaceData( wxFR_DOWN ); diff --git a/eeschema/viewlib_frame.cpp b/eeschema/viewlib_frame.cpp index e8b368c118..0cfbc55a17 100644 --- a/eeschema/viewlib_frame.cpp +++ b/eeschema/viewlib_frame.cpp @@ -496,6 +496,11 @@ void LIB_VIEW_FRAME::ExportToSchematicLibraryPart( wxCommandEvent& event ) #define LIBLIST_WIDTH_KEY wxT( "ViewLiblistWidth" ) #define CMPLIST_WIDTH_KEY wxT( "ViewCmplistWidth" ) +// Currently, the library viewer has no dialog to change the background color +// of the draw canvas. Therefore the background color is here just +// in case of this option is added to some library viewer config dialog +#define LIBVIEW_BGCOLOR wxT( "LibviewBgColor" ) + void LIB_VIEW_FRAME::LoadSettings( wxConfigBase* aCfg ) { @@ -503,6 +508,9 @@ void LIB_VIEW_FRAME::LoadSettings( wxConfigBase* aCfg ) wxConfigPathChanger cpc( aCfg, m_configPath ); + EDA_COLOR_T itmp = ColorByName( aCfg->Read( LIBVIEW_BGCOLOR, wxT( "WHITE" ) ) ); + SetDrawBgColor( itmp ); + aCfg->Read( LIBLIST_WIDTH_KEY, &m_libListWidth, 100 ); aCfg->Read( CMPLIST_WIDTH_KEY, &m_cmpListWidth, 100 ); @@ -529,6 +537,7 @@ void LIB_VIEW_FRAME::SaveSettings( wxConfigBase* aCfg ) m_cmpListWidth = m_cmpList->GetSize().x; aCfg->Write( CMPLIST_WIDTH_KEY, m_cmpListWidth ); + aCfg->Write( LIBVIEW_BGCOLOR, ColorGetName( GetDrawBgColor() ) ); } diff --git a/gerbview/draw_gerber_screen.cpp b/gerbview/draw_gerber_screen.cpp index 86add4d293..e8efa84f68 100644 --- a/gerbview/draw_gerber_screen.cpp +++ b/gerbview/draw_gerber_screen.cpp @@ -138,6 +138,8 @@ void GERBVIEW_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg ) void GBR_LAYOUT::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDrawMode, const wxPoint& aOffset, bool aPrintBlackAndWhite ) { + GERBVIEW_FRAME* gerbFrame = (GERBVIEW_FRAME*) aPanel->GetParent(); + // Because Images can be negative (i.e with background filled in color) items are drawn // graphic layer per graphic layer, after the background is filled // to a temporary bitmap @@ -145,7 +147,7 @@ void GBR_LAYOUT::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDrawMode, // If aDrawMode = UNSPECIFIED_DRAWMODE, items are drawn to the main screen, and therefore // artifacts can happen with negative items or negative images - wxColour bgColor = MakeColour( g_DrawBgColor ); + wxColour bgColor = MakeColour( gerbFrame->GetDrawBgColor() ); #if wxCHECK_VERSION( 3, 0, 0 ) wxBrush bgBrush( bgColor, wxBRUSHSTYLE_SOLID ); @@ -153,8 +155,6 @@ void GBR_LAYOUT::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDrawMode, wxBrush bgBrush( bgColor, wxSOLID ); #endif - GERBVIEW_FRAME* gerbFrame = (GERBVIEW_FRAME*) aPanel->GetParent(); - int bitmapWidth, bitmapHeight; wxDC* plotDC = aDC; @@ -236,7 +236,7 @@ void GBR_LAYOUT::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDrawMode, // Force black and white draw mode on request: if( aPrintBlackAndWhite ) - gerbFrame->SetLayerColor( layer, g_DrawBgColor == BLACK ? WHITE : BLACK ); + gerbFrame->SetLayerColor( layer, gerbFrame->GetDrawBgColor() == BLACK ? WHITE : BLACK ); if( useBufferBitmap ) { diff --git a/gerbview/gerbview.cpp b/gerbview/gerbview.cpp index fbdc0288bc..f7147d20bb 100644 --- a/gerbview/gerbview.cpp +++ b/gerbview/gerbview.cpp @@ -44,7 +44,6 @@ // Colors for layers and items COLORS_DESIGN_SETTINGS g_ColorsSettings; -extern EDA_COLOR_T g_DrawBgColor; int g_Default_GERBER_Format; @@ -146,8 +145,6 @@ bool IFACE::OnKifaceStart( PGM_BASE* aProgram, int aCtlBits ) // display the real hotkeys in menus or tool tips ReadHotkeyConfig( wxT("GerberFrame"), s_Gerbview_Hokeys_Descr ); - g_DrawBgColor = BLACK; - return true; } diff --git a/gerbview/gerbview_frame.cpp b/gerbview/gerbview_frame.cpp index 0674be6c1e..09abe01df2 100644 --- a/gerbview/gerbview_frame.cpp +++ b/gerbview/gerbview_frame.cpp @@ -656,7 +656,7 @@ EDA_COLOR_T GERBVIEW_FRAME::GetNegativeItemsColor() const if( IsElementVisible( NEGATIVE_OBJECTS_VISIBLE ) ) return GetVisibleElementColor( NEGATIVE_OBJECTS_VISIBLE ); else - return g_DrawBgColor; + return GetDrawBgColor(); } diff --git a/include/common.h b/include/common.h index a647f80d47..fcf7c94177 100644 --- a/include/common.h +++ b/include/common.h @@ -385,8 +385,6 @@ private: void setMargins(); }; -extern bool g_ShowPageLimits; ///< true to display the page limits - extern EDA_UNITS_T g_UserUnit; ///< display units /// Draw color for moving objects. diff --git a/include/draw_frame.h b/include/draw_frame.h index 44023def51..a7ee30cd0b 100644 --- a/include/draw_frame.h +++ b/include/draw_frame.h @@ -56,7 +56,10 @@ protected: // 0 is for the grid corresponding to // a wxCommand ID = ID_POPUP_GRID_LEVEL_1000. bool m_DrawGrid; // hide/Show grid + bool m_showPageLimits; ///< true to display the page limits EDA_COLOR_T m_GridColor; // Grid color + EDA_COLOR_T m_drawBgColor; ///< the background color of the draw canvas + ///< BLACK for Pcbnew, BLACK or WHITE for eeschema /// The area to draw on. EDA_DRAW_PANEL* m_canvas; @@ -235,6 +238,10 @@ public: virtual const TITLE_BLOCK& GetTitleBlock() const = 0; virtual void SetTitleBlock( const TITLE_BLOCK& aTitleBlock ) = 0; + // the background color of the draw canvas: + EDA_COLOR_T GetDrawBgColor() const { return m_drawBgColor; } + void SetDrawBgColor( EDA_COLOR_T aColor) { m_drawBgColor= aColor ; } + int GetCursorShape() const { return m_cursorShape; } void SetCursorShape( int aCursorShape ) { m_cursorShape = aCursorShape; } @@ -242,6 +249,8 @@ public: bool GetShowBorderAndTitleBlock() const { return m_showBorderAndTitleBlock; } void SetShowBorderAndTitleBlock( bool aShow ) { m_showBorderAndTitleBlock = aShow; } + bool ShowPageLimits() const { return m_showPageLimits; } + void SetShowPageLimits( bool aShow ) { m_showPageLimits = aShow; } EDA_DRAW_PANEL* GetCanvas() { return m_canvas; } diff --git a/include/gr_basic.h b/include/gr_basic.h index 18cf7692da..d994548e76 100644 --- a/include/gr_basic.h +++ b/include/gr_basic.h @@ -88,7 +88,6 @@ typedef int wxPenStyle; extern GR_DRAWMODE g_XorMode; -extern EDA_COLOR_T g_DrawBgColor; typedef enum { @@ -260,7 +259,7 @@ void GRSFilledRect( EDA_RECT* ClipBox, wxDC* DC, int x1, int y1, void GRLineArray( EDA_RECT* aClipBox, wxDC* aDC,std::vector& aLines, int aWidth, EDA_COLOR_T aColor ); -void GRDrawAnchor( EDA_RECT* aClipBox, wxDC *aDC, int x, int y, int aSize, +void GRDrawAnchor( EDA_RECT* aClipBox, wxDC *aDC, int x, int y, int aSize, EDA_COLOR_T aColor ); #endif /* define GR_BASIC */ diff --git a/include/wxstruct.h b/include/wxstruct.h index daffa56d67..5b6215838a 100644 --- a/include/wxstruct.h +++ b/include/wxstruct.h @@ -486,10 +486,11 @@ public: } /** - * Function ScriptingToolbarPane - * Change *this to a scripting toolbar for KiCad. + * Function ScriptingConsolePane + * Change *this to a python scripting console pane for KiCad. + * Used in Pcbnew */ - EDA_PANEINFO& ScriptingToolbarPane() + EDA_PANEINFO& ScriptingConsolePane() { CloseButton( false ); Floatable( true ); diff --git a/pagelayout_editor/dialogs/dialogs_for_printing.cpp b/pagelayout_editor/dialogs/dialogs_for_printing.cpp index 707b43a2ca..5ed93f4917 100644 --- a/pagelayout_editor/dialogs/dialogs_for_printing.cpp +++ b/pagelayout_editor/dialogs/dialogs_for_printing.cpp @@ -186,13 +186,13 @@ void PLEDITOR_PRINTOUT::DrawPage( int aPageNum ) GRForceBlackPen( true ); screen->m_IsPrinting = true; - EDA_COLOR_T bg_color = g_DrawBgColor; - g_DrawBgColor = WHITE; + EDA_COLOR_T bg_color = m_parent->GetDrawBgColor(); + m_parent->SetDrawBgColor( WHITE ); screen->m_ScreenNumber = aPageNum; m_parent->DrawWorkSheet( dc, screen, 0, IU_PER_MILS, wxEmptyString ); - g_DrawBgColor = bg_color; + m_parent->SetDrawBgColor( bg_color ); screen->m_IsPrinting = false; panel->SetClipBox( oldClipBox ); diff --git a/pagelayout_editor/menubar.cpp b/pagelayout_editor/menubar.cpp index 7544f66dd8..3276af3eb7 100644 --- a/pagelayout_editor/menubar.cpp +++ b/pagelayout_editor/menubar.cpp @@ -117,7 +117,7 @@ void PL_EDITOR_FRAME::ReCreateMenuBar() AddMenuItem( preferencesMenu, ID_MENU_SWITCH_BGCOLOR, - g_DrawBgColor == WHITE ? + GetDrawBgColor() == WHITE ? _( "&BackGround Black" ) : _( "&BackGround White" ), wxEmptyString, KiBitmap( palette_xpm ) ); diff --git a/pagelayout_editor/pl_editor.cpp b/pagelayout_editor/pl_editor.cpp index 012720abc9..2b341364d5 100644 --- a/pagelayout_editor/pl_editor.cpp +++ b/pagelayout_editor/pl_editor.cpp @@ -28,7 +28,6 @@ */ #include -//#include #include #include #include @@ -41,8 +40,6 @@ #include #include -extern EDA_COLOR_T g_DrawBgColor; - namespace PGE { @@ -128,8 +125,6 @@ bool IFACE::OnKifaceStart( PGM_BASE* aProgram, int aCtlBits ) ReadHotkeyConfig( wxT("PlEditorFrame"), s_PlEditor_Hokeys_Descr ); g_UserUnit = MILLIMETRES; - g_DrawBgColor = WHITE; - g_ShowPageLimits = true; return true; } @@ -156,8 +151,6 @@ bool MYFACE::OnKifaceStart( PGM_BASE* aProgram ) } g_UserUnit = MILLIMETRES; - g_DrawBgColor = WHITE; - g_ShowPageLimits = true; // read current setup and reopen last directory if no filename to open in // command line diff --git a/pagelayout_editor/pl_editor_config.cpp b/pagelayout_editor/pl_editor_config.cpp index 1586a5ca2b..98140d10ab 100644 --- a/pagelayout_editor/pl_editor_config.cpp +++ b/pagelayout_editor/pl_editor_config.cpp @@ -51,13 +51,13 @@ void PL_EDITOR_FRAME::Process_Config( wxCommandEvent& event ) switch( id ) { case ID_MENU_SWITCH_BGCOLOR: - if( g_DrawBgColor == WHITE ) - g_DrawBgColor = BLACK; + if( GetDrawBgColor() == WHITE ) + SetDrawBgColor( BLACK ); else - g_DrawBgColor = WHITE; + SetDrawBgColor( WHITE ); GetMenuBar()->SetLabel( ID_MENU_SWITCH_BGCOLOR, - g_DrawBgColor == WHITE ? + GetDrawBgColor() == WHITE ? _( "&BackGround Black" ) : _( "&BackGround White" ) ); m_canvas->Refresh(); diff --git a/pagelayout_editor/pl_editor_frame.cpp b/pagelayout_editor/pl_editor_frame.cpp index 85f52b428d..2c0099f76d 100644 --- a/pagelayout_editor/pl_editor_frame.cpp +++ b/pagelayout_editor/pl_editor_frame.cpp @@ -59,11 +59,13 @@ PL_EDITOR_FRAME::PL_EDITOR_FRAME( KIWAY* aKiway, wxWindow* aParent ) : { m_FrameName = PL_EDITOR_FRAME_NAME; - m_showAxis = false; // true to show X and Y axis on screen + m_showAxis = false; // true to show X and Y axis on screen m_showGridAxis = true; - m_showBorderAndTitleBlock = true; // true for reference drawings. + m_showBorderAndTitleBlock = true; // true for reference drawings. m_HotkeysZoomAndGridList = s_PlEditor_Hokeys_Descr; m_originSelectChoice = 0; + SetDrawBgColor( WHITE ); // default value, user option (WHITE/BLACK) + SetShowPageLimits( true ); m_designTreeWidth = 150; m_propertiesFrameWidth = 200; @@ -295,17 +297,21 @@ double PL_EDITOR_FRAME::BestZoom() return bestzoom; } -#define DESIGN_TREE_WIDTH_KEY wxT("DesignTreeWidth") -#define PROPERTIES_FRAME_WIDTH_KEY wxT("PropertiesFrameWidth") -#define CORNER_ORIGIN_CHOICE_KEY wxT("CornerOriginChoice") +static const wxChar designTreeWidthKey[] = wxT("DesignTreeWidth"); +static const wxChar propertiesFrameWidthKey[] = wxT("PropertiesFrameWidth"); +static const wxChar cornerOriginChoiceKey[] = wxT("CornerOriginChoice"); +static const wxChar blackBgColorKey[] = wxT( "BlackBgColor" ); void PL_EDITOR_FRAME::LoadSettings( wxConfigBase* aCfg ) { EDA_DRAW_FRAME::LoadSettings( aCfg ); - aCfg->Read( DESIGN_TREE_WIDTH_KEY, &m_designTreeWidth, 100); - aCfg->Read( PROPERTIES_FRAME_WIDTH_KEY, &m_propertiesFrameWidth, 150); - aCfg->Read( CORNER_ORIGIN_CHOICE_KEY, &m_originSelectChoice ); + aCfg->Read( designTreeWidthKey, &m_designTreeWidth, 100); + aCfg->Read( propertiesFrameWidthKey, &m_propertiesFrameWidth, 150); + aCfg->Read( cornerOriginChoiceKey, &m_originSelectChoice ); + bool tmp; + aCfg->Read( blackBgColorKey, &tmp, false ); + SetDrawBgColor( tmp ? BLACK : WHITE ); } @@ -316,9 +322,10 @@ void PL_EDITOR_FRAME::SaveSettings( wxConfigBase* aCfg ) m_designTreeWidth = m_treePagelayout->GetSize().x; m_propertiesFrameWidth = m_propertiesPagelayout->GetSize().x; - aCfg->Write( DESIGN_TREE_WIDTH_KEY, m_designTreeWidth); - aCfg->Write( PROPERTIES_FRAME_WIDTH_KEY, m_propertiesFrameWidth); - aCfg->Write( CORNER_ORIGIN_CHOICE_KEY, m_originSelectChoice ); + aCfg->Write( designTreeWidthKey, m_designTreeWidth); + aCfg->Write( propertiesFrameWidthKey, m_propertiesFrameWidth); + aCfg->Write( cornerOriginChoiceKey, m_originSelectChoice ); + aCfg->Write( blackBgColorKey, GetDrawBgColor() == BLACK ); // was: wxGetApp().SaveCurrentSetupValues( GetConfigurationSettings() ); wxConfigSaveSetups( aCfg, GetConfigurationSettings() ); @@ -517,7 +524,7 @@ void PL_EDITOR_FRAME::RedrawActiveWindow( wxDC* aDC, bool aEraseBg ) WORKSHEET_DATAITEM* selecteditem = GetSelectedItem(); // the color to draw selected items - if( g_DrawBgColor == WHITE ) + if( GetDrawBgColor() == WHITE ) WORKSHEET_DATAITEM::m_SelectedColor = DARKCYAN; else WORKSHEET_DATAITEM::m_SelectedColor = YELLOW; diff --git a/pcbnew/class_pad_draw_functions.cpp b/pcbnew/class_pad_draw_functions.cpp index 24113ea52a..ef1ab7f409 100644 --- a/pcbnew/class_pad_draw_functions.cpp +++ b/pcbnew/class_pad_draw_functions.cpp @@ -416,7 +416,7 @@ void D_PAD::DrawShape( EDA_RECT* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo ) { blackpenstate = GetGRForceBlackPenState(); GRForceBlackPen( false ); - aDrawInfo.m_HoleColor = g_DrawBgColor; + aDrawInfo.m_HoleColor = WHITE; } if( aDrawInfo.m_DrawMode != GR_XOR ) diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index 183cad4241..821277a0a2 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -840,7 +840,7 @@ void VIA::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, { blackpenstate = GetGRForceBlackPenState(); GRForceBlackPen( false ); - color = g_DrawBgColor; + color = WHITE; } else { diff --git a/pcbnew/dialogs/dialog_display_options.cpp b/pcbnew/dialogs/dialog_display_options.cpp index 5ad1e752f4..18800c09e0 100644 --- a/pcbnew/dialogs/dialog_display_options.cpp +++ b/pcbnew/dialogs/dialog_display_options.cpp @@ -1,10 +1,35 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dialog_general_options.cpp -// Author: jean-pierre Charras -///////////////////////////////////////////////////////////////////////////// +/** + * @file pcbnew/dialogs/dialog_general_options.cpp + */ + +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 Jean-Pierre Charras, jean-pierre.charras at wanadoo.fr + * Copyright (C) 1992-2014 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 + */ + /* functions relatives to the dialog opened from the main menu : - Prefernces/display + Preferences/display */ + #include #include #include @@ -84,7 +109,7 @@ void DIALOG_DISPLAY_OPTIONS::init() else m_OptDisplayVias->SetSelection( 0 ); - m_Show_Page_Limits->SetSelection( g_ShowPageLimits ? 0 : 1 ); + m_Show_Page_Limits->SetSelection( m_Parent->ShowPageLimits() ? 0 : 1 ); m_OptDisplayViaHole->SetSelection( DisplayOpt.m_DisplayViaMode ); m_OptDisplayModTexts->SetSelection( DisplayOpt.DisplayModText ); @@ -108,9 +133,9 @@ void DIALOG_DISPLAY_OPTIONS::OnCancelClick( wxCommandEvent& event ) void DIALOG_DISPLAY_OPTIONS::OnOkClick(wxCommandEvent& event) { if ( m_Show_Page_Limits->GetSelection() == 0 ) - g_ShowPageLimits = true; + m_Parent->SetShowPageLimits( true ); else - g_ShowPageLimits = false; + m_Parent->SetShowPageLimits( false ); if ( m_OptDisplayTracks->GetSelection() == 1 ) DisplayOpt.DisplayPcbTrackFill = true; diff --git a/pcbnew/pcbnew.cpp b/pcbnew/pcbnew.cpp index 793a537885..e0ae55575f 100644 --- a/pcbnew/pcbnew.cpp +++ b/pcbnew/pcbnew.cpp @@ -436,8 +436,6 @@ bool IFACE::OnKifaceStart( PGM_BASE* aProgram, int aCtlBits ) SetFootprintLibTablePath(); */ - g_DrawBgColor = BLACK; - try { // The global table is not related to a specific project. All projects diff --git a/pcbnew/pcbnew_config.cpp b/pcbnew/pcbnew_config.cpp index 45ee46192e..94f8d72d95 100644 --- a/pcbnew/pcbnew_config.cpp +++ b/pcbnew/pcbnew_config.cpp @@ -240,25 +240,6 @@ bool PCB_EDIT_FRAME::LoadProjectSettings( const wxString& aProjectFileName ) // was: wxGetApp().ReadProjectConfig( fn.GetFullPath(), GROUP, GetProjectFileParameters(), false ); Prj().ConfigLoad( Kiface().KifaceSearch(), fn.GetFullPath(), GROUP_PCB, GetProjectFileParameters(), false ); - // Dick 5-Feb-2012: I don't agree with this, the BOARD contents should dictate - // what is visible or not, even initially. And since PCB_EDIT_FRAME projects settings - // have no control over what is visible (see PCB_EDIT_FRAME::GetProjectFileParameters()) - // this is recklessly turning on things the user may not want to see. -#if 0 - - /* Reset the items visibility flag when loading a new configuration because it could - * create SERIOUS mistakes for the user if board items are not visible after loading - * a board. Grid and ratsnest can be left to their previous state. - */ - bool showGrid = IsElementVisible( GRID_VISIBLE ); - bool showRats = IsElementVisible( RATSNEST_VISIBLE ); - - SetVisibleAlls(); - - SetElementVisibility( GRID_VISIBLE, showGrid ); - SetElementVisibility( RATSNEST_VISIBLE, showRats ); -#endif - Prj().ElemClear( PROJECT::ELEM_FPTBL ); // Force it to be reloaded on demand. // Load the page layout decr file, from the filename stored in @@ -315,6 +296,8 @@ PARAM_CFG_ARRAY& PCB_EDIT_FRAME::GetConfigurationSettings() if( !m_configSettings.empty() ) return m_configSettings; + m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "ShowPageLimits" ), + &m_showPageLimits, true ) ); // Units used in dialogs and toolbars m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "Units" ), (int*)&g_UserUnit, MILLIMETRES ) ); diff --git a/pcbnew/print_board_functions.cpp b/pcbnew/print_board_functions.cpp index 2683e268b5..7162c93618 100644 --- a/pcbnew/print_board_functions.cpp +++ b/pcbnew/print_board_functions.cpp @@ -302,7 +302,7 @@ void PCB_EDIT_FRAME::PrintPage( wxDC* aDC, if( drillShapeOpt != PRINT_PARAMETERS::NO_DRILL_SHAPE ) { TRACK * track = Pcb->m_Track; - EDA_COLOR_T color = g_DrawBgColor; + EDA_COLOR_T color = GetDrawBgColor(); bool blackpenstate = GetGRForceBlackPenState(); GRForceBlackPen( false ); GRSetDrawMode( aDC, GR_COPY ); diff --git a/pcbnew/printout_controler.cpp b/pcbnew/printout_controler.cpp index c553cd83ed..a21dd3bfb0 100644 --- a/pcbnew/printout_controler.cpp +++ b/pcbnew/printout_controler.cpp @@ -299,9 +299,9 @@ void BOARD_PRINTOUT_CONTROLLER::DrawPage() panel->SetClipBox( EDA_RECT( wxPoint( 0, 0 ), wxSize( MAX_VALUE, MAX_VALUE ) ) ); screen->m_IsPrinting = true; - EDA_COLOR_T bg_color = g_DrawBgColor; + EDA_COLOR_T bg_color = m_Parent->GetDrawBgColor(); - // Print frame reference, if reqquested, before + // Print frame reference, if requested, before if( m_PrintParams.m_Print_Black_and_White ) GRForceBlackPen( true ); @@ -351,7 +351,7 @@ void BOARD_PRINTOUT_CONTROLLER::DrawPage() devLeft, devTop, devRight, devBottom ); #endif - g_DrawBgColor = WHITE; + m_Parent->SetDrawBgColor( WHITE ); /* when printing in color mode, we use the graphic OR mode that gives the same look as * the screen but because the background is white when printing, we must use a trick: @@ -380,7 +380,7 @@ void BOARD_PRINTOUT_CONTROLLER::DrawPage() m_Parent->PrintPage( dc, m_PrintParams.m_PrintMaskLayer, printMirror, &m_PrintParams ); - g_DrawBgColor = bg_color; + m_Parent->SetDrawBgColor( bg_color ); screen->m_IsPrinting = false; panel->SetClipBox( tmp ); GRForceBlackPen( false ); From 4cd4990bc2ca13478f5ef3d046e24ba6f4996e04 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 20 Jun 2014 19:29:35 +0200 Subject: [PATCH 513/741] Fix compil issue with KICAD_SCRIPTING_WXPYTHON option ON. Minor enhancements. --- common/draw_frame.cpp | 2 +- common/draw_panel.cpp | 2 +- pcbnew/dialogs/dialog_pns_settings_base.cpp | 29 +++--- pcbnew/dialogs/dialog_pns_settings_base.fbp | 109 +++++++++++++++++--- pcbnew/dialogs/dialog_pns_settings_base.h | 11 +- pcbnew/pcbframe.cpp | 2 +- 6 files changed, 123 insertions(+), 32 deletions(-) diff --git a/common/draw_frame.cpp b/common/draw_frame.cpp index b94c2c67b5..82b65f6c99 100644 --- a/common/draw_frame.cpp +++ b/common/draw_frame.cpp @@ -119,7 +119,7 @@ EDA_DRAW_FRAME::EDA_DRAW_FRAME( KIWAY* aKiway, wxWindow* aParent, m_GridColor = DARKGRAY; // Grid color m_showPageLimits = false; m_drawBgColor = BLACK; // the background color of the draw canvas: - // BLACK for Pcbnew, BLACK or WHITeEfor eeschema + // BLACK for Pcbnew, BLACK or WHITE for eeschema m_snapToGrid = true; m_MsgFrameHeight = EDA_MSG_PANEL::GetRequiredHeight(); m_movingCursorWithKeyboard = false; diff --git a/common/draw_panel.cpp b/common/draw_panel.cpp index 73864ad2db..d977f17c4c 100644 --- a/common/draw_panel.cpp +++ b/common/draw_panel.cpp @@ -114,7 +114,7 @@ EDA_DRAW_PANEL::EDA_DRAW_PANEL( EDA_DRAW_FRAME* parent, int id, m_ClipBox.SetY( 0 ); m_canStartBlock = -1; // Command block can start if >= 0 m_abortRequest = false; - m_enableMiddleButtonPan = false; + m_enableMiddleButtonPan = true; m_enableZoomNoCenter = false; m_panScrollbarLimits = false; m_enableAutoPan = true; diff --git a/pcbnew/dialogs/dialog_pns_settings_base.cpp b/pcbnew/dialogs/dialog_pns_settings_base.cpp index 82318f7e32..2642caf845 100644 --- a/pcbnew/dialogs/dialog_pns_settings_base.cpp +++ b/pcbnew/dialogs/dialog_pns_settings_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 30 2013) +// C++ code generated with wxFormBuilder (version Nov 6 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -9,7 +9,7 @@ /////////////////////////////////////////////////////////////////////////// -DIALOG_PNS_SETTINGS_BASE::DIALOG_PNS_SETTINGS_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +DIALOG_PNS_SETTINGS_BASE::DIALOG_PNS_SETTINGS_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); @@ -19,29 +19,29 @@ DIALOG_PNS_SETTINGS_BASE::DIALOG_PNS_SETTINGS_BASE( wxWindow* parent, wxWindowID wxString m_modeChoices[] = { _("Highlight collisions"), _("Shove"), _("Walk around"), _("Figure out what's best") }; int m_modeNChoices = sizeof( m_modeChoices ) / sizeof( wxString ); m_mode = new wxRadioBox( this, wxID_ANY, _("Mode"), wxDefaultPosition, wxDefaultSize, m_modeNChoices, m_modeChoices, 1, wxRA_SPECIFY_COLS ); - m_mode->SetSelection( 1 ); - bMainSizer->Add( m_mode, 0, wxALL, 5 ); + m_mode->SetSelection( 0 ); + bMainSizer->Add( m_mode, 0, wxALL|wxEXPAND, 5 ); wxStaticBoxSizer* bOptions; bOptions = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxVERTICAL ); m_shoveVias = new wxCheckBox( this, wxID_ANY, _("Shove vias"), wxDefaultPosition, wxDefaultSize, 0 ); - bOptions->Add( m_shoveVias, 0, wxALL, 5 ); + bOptions->Add( m_shoveVias, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_backPressure = new wxCheckBox( this, wxID_ANY, _("Jump over obstacles"), wxDefaultPosition, wxDefaultSize, 0 ); - bOptions->Add( m_backPressure, 0, wxALL, 5 ); + bOptions->Add( m_backPressure, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_removeLoops = new wxCheckBox( this, wxID_ANY, _("Remove redundant tracks"), wxDefaultPosition, wxDefaultSize, 0 ); - bOptions->Add( m_removeLoops, 0, wxALL, 5 ); + bOptions->Add( m_removeLoops, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_autoNeckdown = new wxCheckBox( this, wxID_ANY, _("Automatic neckdown"), wxDefaultPosition, wxDefaultSize, 0 ); - bOptions->Add( m_autoNeckdown, 0, wxALL, 5 ); + bOptions->Add( m_autoNeckdown, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_smoothDragged = new wxCheckBox( this, wxID_ANY, _("Smooth dragged segments"), wxDefaultPosition, wxDefaultSize, 0 ); - bOptions->Add( m_smoothDragged, 0, wxALL, 5 ); + bOptions->Add( m_smoothDragged, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_violateDrc = new wxCheckBox( this, wxID_ANY, _("Allow DRC violations"), wxDefaultPosition, wxDefaultSize, 0 ); - bOptions->Add( m_violateDrc, 0, wxALL, 5 ); + bOptions->Add( m_violateDrc, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_suggestEnding = new wxCheckBox( this, wxID_ANY, _("Suggest track finish"), wxDefaultPosition, wxDefaultSize, 0 ); m_suggestEnding->Enable( false ); @@ -89,7 +89,10 @@ DIALOG_PNS_SETTINGS_BASE::DIALOG_PNS_SETTINGS_BASE( wxWindow* parent, wxWindowID bEffort->Add( bSlider, 1, wxEXPAND, 5 ); - bOptions->Add( bEffort, 1, wxEXPAND, 5 ); + bOptions->Add( bEffort, 0, wxEXPAND, 5 ); + + m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bOptions->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); m_stdButtons = new wxStdDialogButtonSizer(); m_stdButtonsOK = new wxButton( this, wxID_OK ); @@ -98,10 +101,10 @@ DIALOG_PNS_SETTINGS_BASE::DIALOG_PNS_SETTINGS_BASE( wxWindow* parent, wxWindowID m_stdButtons->AddButton( m_stdButtonsCancel ); m_stdButtons->Realize(); - bOptions->Add( m_stdButtons, 1, wxEXPAND, 5 ); + bOptions->Add( m_stdButtons, 0, wxEXPAND, 5 ); - bMainSizer->Add( bOptions, 1, wxEXPAND, 5 ); + bMainSizer->Add( bOptions, 1, wxEXPAND|wxALL, 5 ); this->SetSizer( bMainSizer ); diff --git a/pcbnew/dialogs/dialog_pns_settings_base.fbp b/pcbnew/dialogs/dialog_pns_settings_base.fbp index 729449a9c0..d635feb8ee 100644 --- a/pcbnew/dialogs/dialog_pns_settings_base.fbp +++ b/pcbnew/dialogs/dialog_pns_settings_base.fbp @@ -20,8 +20,10 @@ . 1 + 1 1 1 + UI 0 0 @@ -42,9 +44,9 @@ DIALOG_PNS_SETTINGS_BASE - 313,528 + 277,404 wxDEFAULT_DIALOG_STYLE - + DIALOG_SHIM; dialog_shim.h Interactive Router settings @@ -93,7 +95,7 @@ none 5 - wxALL + wxALL|wxEXPAND 0 1 @@ -141,7 +143,7 @@ 1 Resizable - 1 + 0 1 wxRA_SPECIFY_COLS @@ -183,7 +185,7 @@ 5 - wxEXPAND + wxEXPAND|wxALL 1 wxID_ANY @@ -195,7 +197,7 @@ 5 - wxALL + wxTOP|wxRIGHT|wxLEFT 0 1 @@ -283,7 +285,7 @@ 5 - wxALL + wxTOP|wxRIGHT|wxLEFT 0 1 @@ -371,7 +373,7 @@ 5 - wxALL + wxTOP|wxRIGHT|wxLEFT 0 1 @@ -459,7 +461,7 @@ 5 - wxALL + wxTOP|wxRIGHT|wxLEFT 0 1 @@ -547,7 +549,7 @@ 5 - wxALL + wxTOP|wxRIGHT|wxLEFT 0 1 @@ -635,7 +637,7 @@ 5 - wxALL + wxTOP|wxRIGHT|wxLEFT 0 1 @@ -812,7 +814,7 @@ 5 wxEXPAND - 1 + 0 bEffort @@ -1219,10 +1221,91 @@ + + 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 + 0 0 1 diff --git a/pcbnew/dialogs/dialog_pns_settings_base.h b/pcbnew/dialogs/dialog_pns_settings_base.h index e67d0a72a6..5ba9eb21e3 100644 --- a/pcbnew/dialogs/dialog_pns_settings_base.h +++ b/pcbnew/dialogs/dialog_pns_settings_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 30 2013) +// C++ code generated with wxFormBuilder (version Nov 6 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -11,6 +11,9 @@ #include #include #include +class DIALOG_SHIM; + +#include "dialog_shim.h" #include #include #include @@ -21,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -31,7 +35,7 @@ /////////////////////////////////////////////////////////////////////////////// /// Class DIALOG_PNS_SETTINGS_BASE /////////////////////////////////////////////////////////////////////////////// -class DIALOG_PNS_SETTINGS_BASE : public wxDialog +class DIALOG_PNS_SETTINGS_BASE : public DIALOG_SHIM { private: @@ -48,6 +52,7 @@ class DIALOG_PNS_SETTINGS_BASE : public wxDialog wxSlider* m_effort; wxStaticText* m_lowLabel; wxStaticText* m_highLabel; + wxStaticLine* m_staticline1; wxStdDialogButtonSizer* m_stdButtons; wxButton* m_stdButtonsOK; wxButton* m_stdButtonsCancel; @@ -60,7 +65,7 @@ class DIALOG_PNS_SETTINGS_BASE : public wxDialog public: - DIALOG_PNS_SETTINGS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Interactive Router settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 313,528 ), long style = wxDEFAULT_DIALOG_STYLE ); + DIALOG_PNS_SETTINGS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Interactive Router settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 277,404 ), long style = wxDEFAULT_DIALOG_STYLE ); ~DIALOG_PNS_SETTINGS_BASE(); }; diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 4d9095d040..c5487afa12 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -1085,7 +1085,7 @@ void PCB_EDIT_FRAME::ScriptingConsoleEnableDisable( wxCommandEvent& aEvent ) { // Add the scripting panel EDA_PANEINFO pythonAuiPane; - pythonAuiPane.ScriptingToolbarPane(); + pythonAuiPane.ScriptingConsolePane(); pythonAuiPane.Caption( wxT( "Python Scripting" ) ); pythonAuiPane.MinSize( 300, 150 ); From b4e0a5cbbff30e28811c5cbfea7cf21f6869e260 Mon Sep 17 00:00:00 2001 From: Kirill Mavreshko Date: Mon, 23 Jun 2014 08:50:53 +0200 Subject: [PATCH 514/741] Fixes bug #1332438: PNS router crashes when you another track while routing in "shove" mode --- pcbnew/router/pns_joint.h | 2 +- pcbnew/router/pns_node.cpp | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/pcbnew/router/pns_joint.h b/pcbnew/router/pns_joint.h index 1bee21c06f..bcac27d356 100644 --- a/pcbnew/router/pns_joint.h +++ b/pcbnew/router/pns_joint.h @@ -112,7 +112,7 @@ public: LINKED_ITEMS::iterator f = std::find( m_linkedItems.begin(), m_linkedItems.end(), aItem ); if( f != m_linkedItems.end() ) - m_linkedItems.erase( f ); + f = m_linkedItems.erase( f ); return m_linkedItems.size() == 0; } diff --git a/pcbnew/router/pns_node.cpp b/pcbnew/router/pns_node.cpp index 1692ae1e8d..8ee7feeb3d 100644 --- a/pcbnew/router/pns_node.cpp +++ b/pcbnew/router/pns_node.cpp @@ -1216,14 +1216,21 @@ int PNS_NODE::FindByMarker( int aMarker, PNS_ITEMSET& aItems ) int PNS_NODE::RemoveByMarker( int aMarker ) { + std::list garbage; + for( PNS_INDEX::ITEM_SET::iterator i = m_index->begin(); i != m_index->end(); ++i ) { if ( (*i)->Marker() & aMarker ) { - Remove( *i ); + garbage.push_back( *i ); } } + for( std::list::const_iterator i = garbage.begin(), end = garbage.end(); i != end; ++i ) + { + Remove( *i ); + } + return 0; } From 95a6e8deb2afeb6026ce1166bbbc71a547fc735a Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 23 Jun 2014 16:12:59 +0200 Subject: [PATCH 515/741] Dragging items by their origin is optional (activated by dragging elements with Ctrl held). --- pcbnew/tools/edit_tool.cpp | 30 +++++++++++++++++++++++++----- pcbnew/tools/edit_tool.h | 3 +++ 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 93e878031c..db08a607a5 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -147,7 +147,7 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) // Drag items to the current cursor position for( unsigned int i = 0; i < selection.items.GetCount(); ++i ) - selection.Item( i )->Move( movement ); + selection.Item( i )->Move( movement + m_offset ); updateRatsnest( true ); } @@ -157,9 +157,21 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) editFrame->OnModify(); editFrame->SaveCopyInUndoList( selection.items, UR_CHANGED ); - // Set the current cursor position to the first dragged item origin, so the - // movement vector could be computed later - m_cursor = VECTOR2I( selection.Item( 0 )->GetPosition() ); + if( evt->Modifier( MD_CTRL ) ) + { + // Set the current cursor position to the first dragged item origin, so the + // movement vector could be computed later + m_cursor = VECTOR2I( selection.Item( 0 )->GetPosition() ); + m_offset.x = 0; + m_offset.y = 0; + } + else + { + // Update dragging offset (distance between cursor and the first dragged item) + m_offset = static_cast( selection.items.GetPickedItem( 0 ) )->GetPosition() - + wxPoint( m_cursor.x, m_cursor.y ); + } + m_dragging = true; } @@ -309,6 +321,10 @@ int EDIT_TOOL::Rotate( TOOL_EVENT& aEvent ) updateRatsnest( m_dragging ); + // Update dragging offset (distance between cursor and the first dragged item) + m_offset = static_cast( selection.items.GetPickedItem( 0 ) )->GetPosition() - + rotatePoint; + if( m_dragging ) selection.group->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); else @@ -359,6 +375,10 @@ int EDIT_TOOL::Flip( TOOL_EVENT& aEvent ) updateRatsnest( m_dragging ); + // Update dragging offset (distance between cursor and the first dragged item) + m_offset = static_cast( selection.items.GetPickedItem( 0 ) )->GetPosition() - + flipPoint; + if( m_dragging ) selection.group->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); else @@ -491,7 +511,7 @@ wxPoint EDIT_TOOL::getModificationPoint( const SELECTION_TOOL::SELECTION& aSelec { if( aSelection.Size() == 1 ) { - return aSelection.Item( 0 )->GetPosition(); + return aSelection.Item( 0 )->GetPosition() - m_offset; } else { diff --git a/pcbnew/tools/edit_tool.h b/pcbnew/tools/edit_tool.h index fb74135b86..207e446493 100644 --- a/pcbnew/tools/edit_tool.h +++ b/pcbnew/tools/edit_tool.h @@ -98,6 +98,9 @@ private: ///> Flag determining if anything is being dragged right now bool m_dragging; + ///> Offset from the dragged item's center (anchor) + wxPoint m_offset; + ///> Last cursor position (needed for getModificationPoint() to avoid changes ///> of edit reference point). VECTOR2I m_cursor; From 4578ea8b9eb001394f078d7e4b2d27c7d914d50d Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Tue, 24 Jun 2014 11:17:18 -0500 Subject: [PATCH 516/741] 1) Add 32 Cu Layers. 2) Change from legacy Cu stack to counting down from top=(F_Cu or 0). The old Cu stack required knowing the count of Cu layers to make sense of the layer number when converting to many exported file types. The new Cu stack is more commonly used, although ours still gives B_Cu a fixed number. 3) Introduce class LSET and enum LAYER_ID. 4) Change *.kicad_pcb file format version to 4 from 3. 5) Change fixed names Inner1_Cu-Inner14_Cu to In1_Cu-In30_Cu and their meanings are typically flipped. 6) Moved the #define LAYER_N_* stuff into legacy_plugin.cpp where they can die a quiet death, and switch to enum LAYER_ID symbols throughout. 7) Removed the LEGACY_PLUGIN::Save() and FootprintSave() functions. You will need to convert to the format immediately, *.kicad_pcb and *.kicad_mod (=pretty) since legacy format was never going to know about 32 Cu layers and additional technical layers and the reversed Cu stack. --- 3d-viewer/3d_draw.cpp | 175 +- 3d-viewer/info3d_visu.cpp | 27 +- 3d-viewer/info3d_visu.h | 11 +- bitmap2component/bitmap2component.cpp | 2 +- common/CMakeLists.txt | 1 + common/class_colors_design_settings.cpp | 26 +- common/class_layer_box_selector.cpp | 19 +- common/common_plotSVG_functions.cpp | 14 +- common/draw_frame.cpp | 2 +- common/pcbcommon.cpp | 151 +- eeschema/libedit_plot_component.cpp | 2 +- eeschema/libeditframe.h | 2 +- eeschema/schframe.cpp | 2 +- gerbview/class_gbr_layer_box_selector.h | 14 +- gerbview/class_gbr_layout.h | 4 +- gerbview/class_gbr_screen.cpp | 2 +- gerbview/class_gerber_draw_item.h | 2 +- gerbview/class_gerbview_layer_widget.cpp | 14 +- gerbview/class_gerbview_layer_widget.h | 6 +- .../dialogs/dialog_print_using_printer.cpp | 14 +- .../dialogs/dialog_select_one_pcb_layer.cpp | 30 +- gerbview/draw_gerber_screen.cpp | 4 +- gerbview/gerbview_frame.cpp | 4 +- gerbview/gerbview_frame.h | 6 +- gerbview/select_layers_to_pcb.cpp | 8 +- include/class_board_design_settings.h | 39 +- include/class_board_item.h | 8 +- include/class_colors_design_settings.h | 6 +- include/class_layer_box_selector.h | 29 +- include/class_pcb_screen.h | 6 +- include/draw_frame.h | 2 +- include/layers_id_colors_and_visibility.h | 593 +- include/pcbcommon.h | 3 - include/view/view.h | 2 +- include/wxBasePcbFrame.h | 8 +- include/wxEeschemaStruct.h | 2 +- include/wxPcbStruct.h | 18 +- pagelayout_editor/pl_editor_frame.cpp | 2 +- pagelayout_editor/pl_editor_frame.h | 2 +- pcbnew/autorouter/auto_place_footprints.cpp | 42 +- pcbnew/autorouter/autorout.cpp | 2 +- pcbnew/autorouter/autorout.h | 4 +- pcbnew/autorouter/graphpcb.cpp | 47 +- pcbnew/autorouter/routing_matrix.cpp | 111 +- pcbnew/autorouter/solve.cpp | 218 +- pcbnew/basepcbframe.cpp | 96 +- pcbnew/block.cpp | 20 +- ...board_items_to_polygon_shape_transform.cpp | 41 +- pcbnew/class_board.cpp | 228 +- pcbnew/class_board.h | 121 +- pcbnew/class_board_design_settings.cpp | 28 +- pcbnew/class_dimension.cpp | 4 +- pcbnew/class_dimension.h | 2 +- pcbnew/class_drawsegment.cpp | 2 +- pcbnew/class_edge_mod.cpp | 4 +- pcbnew/class_mire.cpp | 6 +- pcbnew/class_mire.h | 2 +- pcbnew/class_module.cpp | 8 +- pcbnew/class_module.h | 9 +- pcbnew/class_pad.cpp | 88 +- pcbnew/class_pad.h | 44 +- pcbnew/class_pad_draw_functions.cpp | 59 +- pcbnew/class_pcb_layer_box_selector.cpp | 76 +- pcbnew/class_pcb_layer_box_selector.h | 25 +- pcbnew/class_pcb_layer_widget.cpp | 112 +- pcbnew/class_pcb_layer_widget.h | 6 +- pcbnew/class_text_mod.cpp | 18 +- pcbnew/class_track.cpp | 117 +- pcbnew/class_track.h | 25 +- pcbnew/class_zone.h | 4 +- pcbnew/class_zone_settings.cpp | 14 +- pcbnew/class_zone_settings.h | 3 +- pcbnew/classpcb.cpp | 6 +- pcbnew/clean.cpp | 22 +- pcbnew/collectors.cpp | 16 +- pcbnew/collectors.h | 74 +- pcbnew/connect.cpp | 12 +- pcbnew/deltrack.cpp | 2 +- pcbnew/dialogs/dialog_SVG_print.cpp | 314 +- pcbnew/dialogs/dialog_SVG_print.h | 53 - pcbnew/dialogs/dialog_SVG_print_base.cpp | 8 +- pcbnew/dialogs/dialog_SVG_print_base.fbp | 8 +- pcbnew/dialogs/dialog_SVG_print_base.h | 5 +- pcbnew/dialogs/dialog_copper_zones.cpp | 36 +- .../dialog_edit_module_for_BoardEditor.cpp | 6 +- pcbnew/dialogs/dialog_gendrill.cpp | 16 +- pcbnew/dialogs/dialog_global_deletion.cpp | 38 +- .../dialog_graphic_item_properties.cpp | 12 +- ...og_graphic_item_properties_for_Modedit.cpp | 16 +- .../dialog_keepout_area_properties.cpp | 29 +- pcbnew/dialogs/dialog_layers_setup.cpp | 340 +- pcbnew/dialogs/dialog_layers_setup_base.cpp | 1083 +- pcbnew/dialogs/dialog_layers_setup_base.fbp | 9000 ++++++++++++++--- pcbnew/dialogs/dialog_layers_setup_base.h | 375 +- pcbnew/dialogs/dialog_pad_properties.cpp | 193 +- pcbnew/dialogs/dialog_pcb_text_properties.cpp | 5 +- pcbnew/dialogs/dialog_plot.cpp | 176 +- pcbnew/dialogs/dialog_plot.h | 2 +- pcbnew/dialogs/dialog_print_using_printer.cpp | 85 +- pcbnew/dimension.cpp | 8 +- pcbnew/drag.h | 2 +- pcbnew/dragsegm.cpp | 6 +- pcbnew/drc.cpp | 12 +- pcbnew/drc_clearance_test_functions.cpp | 31 +- pcbnew/eagle_plugin.cpp | 154 +- pcbnew/eagle_plugin.h | 2 +- pcbnew/edgemod.cpp | 14 +- pcbnew/edit.cpp | 70 +- pcbnew/edit_pcb_text.cpp | 10 +- pcbnew/editedge.cpp | 6 +- pcbnew/editrack-part2.cpp | 43 +- pcbnew/editrack.cpp | 57 +- pcbnew/exporters/export_d356.cpp | 43 +- pcbnew/exporters/export_gencad.cpp | 308 +- pcbnew/exporters/export_idf.cpp | 8 +- pcbnew/exporters/export_vrml.cpp | 101 +- pcbnew/exporters/gen_drill_report_files.cpp | 21 +- pcbnew/exporters/gen_modules_placefile.cpp | 34 +- pcbnew/exporters/gendrill_Excellon_writer.cpp | 12 +- pcbnew/exporters/gendrill_Excellon_writer.h | 20 +- pcbnew/files.cpp | 9 +- pcbnew/globaleditpad.cpp | 6 +- pcbnew/gpcb_plugin.cpp | 21 +- pcbnew/hotkeys_board_editor.cpp | 50 +- pcbnew/import_dxf/dialog_dxf_import.cpp | 14 +- pcbnew/import_dxf/dxf2brd_items.cpp | 21 +- pcbnew/initpcb.cpp | 4 +- pcbnew/invoke_pcb_dialog.h | 10 + pcbnew/kicad_plugin.cpp | 125 +- pcbnew/kicad_plugin.h | 6 +- pcbnew/layer_widget.cpp | 2 +- pcbnew/layer_widget.h | 5 +- pcbnew/legacy_plugin.cpp | 587 +- pcbnew/legacy_plugin.h | 34 +- pcbnew/loadcmp.cpp | 2 +- pcbnew/magnetic_tracks_functions.cpp | 12 +- pcbnew/module_editor_frame.h | 2 +- pcbnew/modules.cpp | 2 +- pcbnew/move_or_drag_track.cpp | 11 +- pcbnew/muonde.cpp | 8 +- pcbnew/onleftclick.cpp | 9 +- pcbnew/pad_edition_functions.cpp | 4 +- pcbnew/pcad2kicadpcb_plugin/pcb.cpp | 56 +- pcbnew/pcad2kicadpcb_plugin/pcb.h | 2 +- pcbnew/pcad2kicadpcb_plugin/pcb_callbacks.h | 4 +- pcbnew/pcad2kicadpcb_plugin/pcb_component.cpp | 2 +- pcbnew/pcad2kicadpcb_plugin/pcb_component.h | 4 +- pcbnew/pcad2kicadpcb_plugin/pcb_module.cpp | 4 +- pcbnew/pcad2kicadpcb_plugin/pcb_pad.cpp | 24 +- pcbnew/pcb_painter.cpp | 10 +- pcbnew/pcb_parser.cpp | 275 +- pcbnew/pcb_parser.h | 18 +- pcbnew/pcb_plot_params.cpp | 84 +- pcbnew/pcb_plot_params.h | 7 +- pcbnew/pcbframe.cpp | 51 +- pcbnew/pcbnew.cpp | 4 +- pcbnew/pcbnew.h | 38 +- pcbnew/pcbnew_config.cpp | 244 +- pcbnew/pcbplot.cpp | 85 +- pcbnew/pcbplot.h | 23 +- pcbnew/plot_board_layers.cpp | 318 +- pcbnew/plot_brditems_plotter.cpp | 30 +- pcbnew/print_board_functions.cpp | 98 +- pcbnew/printout_controler.cpp | 36 +- pcbnew/printout_controler.h | 2 +- pcbnew/router/pns_index.h | 27 +- pcbnew/router/pns_router.cpp | 39 +- pcbnew/router/router_tool.cpp | 36 +- pcbnew/sel_layer.cpp | 178 +- pcbnew/specctra.cpp | 36 +- pcbnew/specctra.h | 2 +- pcbnew/specctra_export.cpp | 22 +- pcbnew/specctra_import.cpp | 12 +- pcbnew/swap_layers.cpp | 151 +- pcbnew/target_edit.cpp | 2 +- pcbnew/tools/drawing_tool.cpp | 196 +- pcbnew/tools/pcbnew_control.cpp | 38 +- pcbnew/tools/selection_tool.cpp | 19 +- pcbnew/tr_modif.cpp | 14 +- pcbnew/tracepcb.cpp | 20 +- pcbnew/zones_by_polygon.cpp | 6 +- ...nvert_brd_items_to_polygons_with_Boost.cpp | 2 +- pcbnew/zones_non_copper_type_functions.cpp | 25 +- polygon/PolyLine.cpp | 2 +- 184 files changed, 13161 insertions(+), 5771 deletions(-) delete mode 100644 pcbnew/dialogs/dialog_SVG_print.h diff --git a/3d-viewer/3d_draw.cpp b/3d-viewer/3d_draw.cpp index f653ad27da..93f88ebd16 100644 --- a/3d-viewer/3d_draw.cpp +++ b/3d-viewer/3d_draw.cpp @@ -55,11 +55,11 @@ extern void CheckGLError(); /* Helper function * returns true if aLayer should be displayed, false otherwise */ -static bool Is3DLayerEnabled( LAYER_NUM aLayer ); +static bool Is3DLayerEnabled( LAYER_ID aLayer ); /* returns the Z orientation parameter 1.0 or -1.0 for aLayer * Z orientation is 1.0 for all layers but "back" layers: - * LAYER_N_BACK , ADHESIVE_N_BACK, SOLDERPASTE_N_BACK ), SILKSCREEN_N_BACK + * B_Cu , B_Adhes, B_Paste ), B_SilkS * used to calculate the Z orientation parameter for glNormal3f */ static GLfloat Get3DLayer_Z_Orientation( LAYER_NUM aLayer ); @@ -205,18 +205,18 @@ static inline void SetGLTechLayersColor( LAYER_NUM aLayer ) { switch( aLayer ) { - case SOLDERPASTE_N_BACK: - case SOLDERPASTE_N_FRONT: + case B_Paste: + case F_Paste: SetGLColor( DARKGRAY, 0.7 ); break; - case SILKSCREEN_N_BACK: - case SILKSCREEN_N_FRONT: + case B_SilkS: + case F_SilkS: SetGLColor( LIGHTGRAY, 0.9 ); break; - case SOLDERMASK_N_BACK: - case SOLDERMASK_N_FRONT: + case B_Mask: + case F_Mask: SetGLEpoxyColor( 0.7 ); break; @@ -278,12 +278,21 @@ void EDA_3D_CANVAS::BuildBoard3DView() bool throughHolesListBuilt = false; // flag to build the through hole polygon list only once bool hightQualityMode = false; - for( LAYER_NUM layer = FIRST_COPPER_LAYER; layer <= LAST_COPPER_LAYER; - ++layer ) + LSET cu_set = LSET::AllCuMask( g_Parm_3D_Visu.m_CopperLayersCount ); + +#if 1 + LAYER_ID cu_seq[MAX_CU_LAYERS]; // preferred sequence, could have called CuStack() + // but I assume that's backwards + + for( unsigned i=0; i= g_Parm_3D_Visu.m_CopperLayersCount ) - continue; + LAYER_ID layer = *cu; // Skip non enabled layers in normal mode, // and internal layers in realistic mode @@ -295,7 +304,7 @@ void EDA_3D_CANVAS::BuildBoard3DView() currLayerHoles.RemoveAllContours(); // Draw tracks: - for( TRACK* track = pcb->m_Track; track != NULL; track = track->Next() ) + for( TRACK* track = pcb->m_Track; track; track = track->Next() ) { if( !track->IsOnLayer( layer ) ) continue; @@ -325,7 +334,7 @@ void EDA_3D_CANVAS::BuildBoard3DView() } // draw pads - for( MODULE* module = pcb->m_Modules; module != NULL; module = module->Next() ) + for( MODULE* module = pcb->m_Modules; module; module = module->Next() ) { module->TransformPadsShapesWithClearanceToPolygon( layer, bufferPolys, @@ -345,7 +354,7 @@ void EDA_3D_CANVAS::BuildBoard3DView() { D_PAD* pad = module->Pads(); - for( ; pad != NULL; pad = pad->Next() ) + for( ; pad; pad = pad->Next() ) pad->BuildPadDrillShapePolygon( allLayerHoles, 0, segcountLowQuality ); } @@ -439,7 +448,7 @@ void EDA_3D_CANVAS::BuildBoard3DView() } // Draw vias holes (vertical cylinders) - for( const TRACK* track = pcb->m_Track; track != NULL; track = track->Next() ) + for( const TRACK* track = pcb->m_Track; track; track = track->Next() ) { const VIA *via = dynamic_cast(track); @@ -448,9 +457,9 @@ void EDA_3D_CANVAS::BuildBoard3DView() } // Draw pads holes (vertical cylinders) - for( const MODULE* module = pcb->m_Modules; module != NULL; module = module->Next() ) + for( const MODULE* module = pcb->m_Modules; module; module = module->Next() ) { - for( D_PAD* pad = module->Pads(); pad != NULL; pad = pad->Next() ) + for( D_PAD* pad = module->Pads(); pad; pad = pad->Next() ) Draw3DPadHole( pad ); } @@ -459,12 +468,14 @@ void EDA_3D_CANVAS::BuildBoard3DView() ( realistic_mode || g_Parm_3D_Visu.GetFlag( FL_SHOW_BOARD_BODY ) ) ) { int copper_thickness = g_Parm_3D_Visu.GetCopperThicknessBIU(); + // a small offset between substrate and external copper layer to avoid artifacts // when drawing copper items on board int epsilon = Millimeter2iu( 0.01 ); - int zpos = g_Parm_3D_Visu.GetLayerZcoordBIU( LAYER_N_BACK ); - int board_thickness = g_Parm_3D_Visu.GetLayerZcoordBIU( LAYER_N_FRONT ) - - g_Parm_3D_Visu.GetLayerZcoordBIU( LAYER_N_BACK ); + int zpos = g_Parm_3D_Visu.GetLayerZcoordBIU( B_Cu ); + int board_thickness = g_Parm_3D_Visu.GetLayerZcoordBIU( F_Cu ) + - g_Parm_3D_Visu.GetLayerZcoordBIU( B_Cu ); + // items on copper layers and having a thickness = copper_thickness // are drawn from zpos - copper_thickness/2 to zpos + copper_thickness // therefore substrate position is copper_thickness/2 to @@ -476,11 +487,11 @@ void EDA_3D_CANVAS::BuildBoard3DView() SetGLEpoxyColor(); else { - EDA_COLOR_T color = g_ColorsSettings.GetLayerColor( EDGE_N ); + EDA_COLOR_T color = g_ColorsSettings.GetLayerColor( Edge_Cuts ); SetGLColor( color, 0.7 ); } - glNormal3f( 0.0, 0.0, Get3DLayer_Z_Orientation( LAYER_N_FRONT ) ); + glNormal3f( 0.0, 0.0, Get3DLayer_Z_Orientation( F_Cu ) ); KI_POLYGON_SET currLayerPolyset; KI_POLYGON_SET polysetHoles; @@ -515,6 +526,7 @@ void EDA_3D_CANVAS::BuildTechLayers3DView() // to reduce time calculations // for holes and items which do not need // a fine representation + double correctionFactorLQ = 1.0 / cos( M_PI / (segcountLowQuality * 2) ); CPOLYGONS_LIST bufferPolys; @@ -537,7 +549,7 @@ void EDA_3D_CANVAS::BuildTechLayers3DView() int thickness = g_Parm_3D_Visu.GetCopperThicknessBIU(); // Add via holes - for( VIA* via = GetFirstVia( pcb->m_Track ); via != NULL; + for( VIA* via = GetFirstVia( pcb->m_Track ); via; via = GetFirstVia( via->Next() ) ) { VIATYPE_T viatype = via->GetViaType(); @@ -551,12 +563,12 @@ void EDA_3D_CANVAS::BuildTechLayers3DView() } // draw pads holes - for( MODULE* module = pcb->m_Modules; module != NULL; module = module->Next() ) + for( MODULE* module = pcb->m_Modules; module; module = module->Next() ) { // Add pad hole, if any D_PAD* pad = module->Pads(); - for( ; pad != NULL; pad = pad->Next() ) + for( ; pad; pad = pad->Next() ) pad->BuildPadDrillShapePolygon( allLayerHoles, 0, segcountLowQuality ); } @@ -566,9 +578,21 @@ void EDA_3D_CANVAS::BuildTechLayers3DView() KI_POLYGON_SET brdpolysetHoles; allLayerHoles.ExportTo( brdpolysetHoles ); - for( LAYER_NUM layer = FIRST_NON_COPPER_LAYER; layer <= LAST_NON_COPPER_LAYER; - ++layer ) + static const LAYER_ID sequence[] = { + B_Adhes, + F_Adhes, + B_Paste, + F_Paste, + B_SilkS, + F_SilkS, + B_Mask, + F_Mask, + }; + + for( LSEQ seq = pcb->GetEnabledLayers().Seq( sequence, DIM( sequence ) ); seq; ++seq ) { + LAYER_ID layer = *seq; + // Skip user layers, which are not drawn here if( IsUserLayer( layer) ) continue; @@ -576,7 +600,7 @@ void EDA_3D_CANVAS::BuildTechLayers3DView() if( !Is3DLayerEnabled( layer ) ) continue; - if( layer == EDGE_N && g_Parm_3D_Visu.GetFlag( FL_SHOW_BOARD_BODY ) ) + if( layer == Edge_Cuts && g_Parm_3D_Visu.GetFlag( FL_SHOW_BOARD_BODY ) ) continue; bufferPolys.RemoveAllContours(); @@ -603,14 +627,14 @@ void EDA_3D_CANVAS::BuildTechLayers3DView() } } - for( MODULE* module = pcb->m_Modules; module != NULL; module = module->Next() ) + for( MODULE* module = pcb->m_Modules; module; module = module->Next() ) { - if( layer == SILKSCREEN_N_FRONT || layer == SILKSCREEN_N_BACK ) + if( layer == F_SilkS || layer == B_SilkS ) { D_PAD* pad = module->Pads(); int linewidth = g_DrawDefaultLineThickness; - for( ; pad != NULL; pad = pad->Next() ) + for( ; pad; pad = pad->Next() ) { if( !pad->IsOnLayer( layer ) ) continue; @@ -651,7 +675,7 @@ void EDA_3D_CANVAS::BuildTechLayers3DView() // Solder mask layers are "negative" layers. // Shapes should be removed from the full board area. - if( layer == SOLDERMASK_N_BACK || layer == SOLDERMASK_N_FRONT ) + if( layer == B_Mask || layer == F_Mask ) { bufferPcbOutlines.ExportTo( currLayerPolyset ); bufferPolys.Append( allLayerHoles ); @@ -659,8 +683,8 @@ void EDA_3D_CANVAS::BuildTechLayers3DView() currLayerPolyset -= polyset; } // Remove holes from Solder paste layers and siklscreen - else if( layer == SOLDERPASTE_N_BACK || layer == SOLDERPASTE_N_FRONT - || layer == SILKSCREEN_N_BACK || layer == SILKSCREEN_N_FRONT ) + else if( layer == B_Paste || layer == F_Paste + || layer == B_SilkS || layer == F_SilkS ) { bufferPolys.ExportTo( currLayerPolyset ); currLayerPolyset -= brdpolysetHoles; @@ -674,11 +698,11 @@ void EDA_3D_CANVAS::BuildTechLayers3DView() int thickness = g_Parm_3D_Visu.GetLayerObjectThicknessBIU( layer ); int zpos = g_Parm_3D_Visu.GetLayerZcoordBIU( layer ); - if( layer == EDGE_N ) + if( layer == Edge_Cuts ) { - thickness = g_Parm_3D_Visu.GetLayerZcoordBIU( LAYER_N_FRONT ) - - g_Parm_3D_Visu.GetLayerZcoordBIU( LAYER_N_BACK ); - zpos = g_Parm_3D_Visu.GetLayerZcoordBIU( LAYER_N_BACK ) + thickness = g_Parm_3D_Visu.GetLayerZcoordBIU( F_Cu ) + - g_Parm_3D_Visu.GetLayerZcoordBIU( B_Cu ); + zpos = g_Parm_3D_Visu.GetLayerZcoordBIU( B_Cu ) + (thickness / 2); } else @@ -703,6 +727,7 @@ void EDA_3D_CANVAS::BuildTechLayers3DView() } } + /** * Function BuildBoard3DAuxLayers * Called by CreateDrawGL_List() @@ -713,13 +738,25 @@ void EDA_3D_CANVAS::BuildBoard3DAuxLayers() { const int segcountforcircle = 16; double correctionFactor = 1.0 / cos( M_PI / (segcountforcircle * 2) ); - BOARD* pcb = GetBoard(); + BOARD* pcb = GetBoard(); + CPOLYGONS_LIST bufferPolys; + bufferPolys.reserve( 5000 ); // Reserve for items not on board - for( LAYER_NUM layer = FIRST_USER_LAYER; layer <= LAST_USER_LAYER; - ++layer ) + static const LAYER_ID sequence[] = { + Dwgs_User, + Cmts_User, + Eco1_User, + Eco2_User, + Edge_Cuts, + Margin + }; + + for( LSEQ aux( sequence, sequence+DIM(sequence) ); aux; ++aux ) { + LAYER_ID layer = *aux; + if( !Is3DLayerEnabled( layer ) ) continue; @@ -747,7 +784,7 @@ void EDA_3D_CANVAS::BuildBoard3DAuxLayers() } } - for( MODULE* module = pcb->m_Modules; module != NULL; module = module->Next() ) + for( MODULE* module = pcb->m_Modules; module; module = module->Next() ) { module->TransformPadsShapesWithClearanceToPolygon( layer, bufferPolys, @@ -1067,7 +1104,7 @@ void EDA_3D_CANVAS::Draw3DGrid( double aGriSizeMM ) void EDA_3D_CANVAS::Draw3DViaHole( const VIA* aVia ) { - LAYER_NUM top_layer, bottom_layer; + LAYER_ID top_layer, bottom_layer; int inner_radius = aVia->GetDrillValue() / 2; int thickness = g_Parm_3D_Visu.GetCopperThicknessBIU(); @@ -1115,7 +1152,7 @@ void MODULE::ReadAndInsert3DComponentShape( EDA_3D_CANVAS* glcanvas, glRotatef( 180.0, 0.0, 0.0, 1.0 ); } - for( ; shape3D != NULL; shape3D = shape3D->Next() ) + for( ; shape3D; shape3D = shape3D->Next() ) { shape3D->SetLoadNonTransparentObjects( aAllowNonTransparentObjects ); shape3D->SetLoadTransparentObjects( aAllowTransparentObjects ); @@ -1141,15 +1178,15 @@ void EDA_3D_CANVAS::Draw3DPadHole( const D_PAD* aPad ) // Store here the points to approximate hole by segments CPOLYGONS_LIST holecornersBuffer; int thickness = g_Parm_3D_Visu.GetCopperThicknessBIU(); - int height = g_Parm_3D_Visu.GetLayerZcoordBIU( LAYER_N_FRONT ) - - g_Parm_3D_Visu.GetLayerZcoordBIU( LAYER_N_BACK ); + int height = g_Parm_3D_Visu.GetLayerZcoordBIU( F_Cu ) - + g_Parm_3D_Visu.GetLayerZcoordBIU( B_Cu ); if( g_Parm_3D_Visu.IsRealisticMode() ) SetGLCopperColor(); else SetGLColor( DARKGRAY ); - int holeZpoz = g_Parm_3D_Visu.GetLayerZcoordBIU( LAYER_N_BACK ) + thickness / 2; + int holeZpoz = g_Parm_3D_Visu.GetLayerZcoordBIU( B_Cu ) + thickness / 2; int holeHeight = height - thickness; if( drillsize.x == drillsize.y ) // usual round hole @@ -1187,7 +1224,7 @@ void EDA_3D_CANVAS::Draw3DPadHole( const D_PAD* aPad ) } -bool Is3DLayerEnabled( LAYER_NUM aLayer ) +static bool Is3DLayerEnabled( LAYER_ID aLayer ) { DISPLAY3D_FLG flg; bool realistic_mode = g_Parm_3D_Visu.IsRealisticMode(); @@ -1196,44 +1233,44 @@ bool Is3DLayerEnabled( LAYER_NUM aLayer ) // check the flags switch( aLayer ) { - case ADHESIVE_N_BACK: - case ADHESIVE_N_FRONT: + case B_Adhes: + case F_Adhes: flg = FL_ADHESIVE; break; - case SOLDERPASTE_N_BACK: - case SOLDERPASTE_N_FRONT: + case B_Paste: + case F_Paste: flg = FL_SOLDERPASTE; break; - case SILKSCREEN_N_BACK: - case SILKSCREEN_N_FRONT: + case B_SilkS: + case F_SilkS: flg = FL_SILKSCREEN; break; - case SOLDERMASK_N_BACK: - case SOLDERMASK_N_FRONT: + case B_Mask: + case F_Mask: flg = FL_SOLDERMASK; break; - case DRAW_N: - case COMMENT_N: + case Dwgs_User: + case Cmts_User: if( realistic_mode ) return false; flg = FL_COMMENTS; break; - case ECO1_N: - case ECO2_N: + case Eco1_User: + case Eco2_User: if( realistic_mode ) return false; flg = FL_ECO; break; - case LAYER_N_BACK: - case LAYER_N_FRONT: + case B_Cu: + case F_Cu: return g_Parm_3D_Visu.m_BoardSettings->IsLayerVisible( aLayer ) || realistic_mode; break; @@ -1256,11 +1293,11 @@ GLfloat Get3DLayer_Z_Orientation( LAYER_NUM aLayer ) { double nZ = 1.0; - if( ( aLayer == LAYER_N_BACK ) - || ( aLayer == ADHESIVE_N_BACK ) - || ( aLayer == SOLDERPASTE_N_BACK ) - || ( aLayer == SILKSCREEN_N_BACK ) - || ( aLayer == SOLDERMASK_N_BACK ) ) + if( ( aLayer == B_Cu ) + || ( aLayer == B_Adhes ) + || ( aLayer == B_Paste ) + || ( aLayer == B_SilkS ) + || ( aLayer == B_Mask ) ) nZ = -1.0; return nZ; diff --git a/3d-viewer/info3d_visu.cpp b/3d-viewer/info3d_visu.cpp index 3e0afc43c1..aeb245f193 100644 --- a/3d-viewer/info3d_visu.cpp +++ b/3d-viewer/info3d_visu.cpp @@ -132,53 +132,52 @@ void INFO3D_VISU::InitSettings( BOARD* aBoard ) // Fill remaining unused copper layers and front layer zpos // with m_EpoxyThickness // Solder mask and Solder paste have the same Z position - for( ; layer <= LAST_COPPER_LAYER; layer++ ) + for( ; layer < MAX_CU_LAYERS; layer++ ) { m_LayerZcoord[layer] = m_EpoxyThickness; } // calculate z position for each non copper layer - for( int layer_id = FIRST_NON_COPPER_LAYER; layer_id < NB_PCB_LAYERS; layer_id++ ) + for( int layer_id = MAX_CU_LAYERS; layer_id < LAYER_ID_COUNT; layer_id++ ) { double zpos; switch( layer_id ) { - case ADHESIVE_N_BACK: + case B_Adhes: zpos = zpos_copper_back - 3 * zpos_offset; break; - case ADHESIVE_N_FRONT: + case F_Adhes: zpos = zpos_copper_front + 3 * zpos_offset; break; - case SOLDERPASTE_N_BACK: + case B_Paste: zpos = zpos_copper_back - 1 * zpos_offset; break; - case SOLDERPASTE_N_FRONT: + case F_Paste: zpos = zpos_copper_front + 1 * zpos_offset; break; - case SOLDERMASK_N_BACK: + case B_Mask: zpos = zpos_copper_back - 1 * zpos_offset; break; - case SOLDERMASK_N_FRONT: + case F_Mask: zpos = zpos_copper_front + 1 * zpos_offset; break; - case SILKSCREEN_N_BACK: + case B_SilkS: zpos = zpos_copper_back - 2 * zpos_offset; break; - case SILKSCREEN_N_FRONT: + case F_SilkS: zpos = zpos_copper_front + 2 * zpos_offset; break; default: - zpos = zpos_copper_front + - (layer_id - FIRST_NON_COPPER_LAYER + 4) * zpos_offset; + zpos = zpos_copper_front + (layer_id - MAX_CU_LAYERS + 4) * zpos_offset; break; } @@ -196,8 +195,8 @@ void INFO3D_VISU::InitSettings( BOARD* aBoard ) double INFO3D_VISU::GetModulesZcoord3DIU( bool aIsFlipped ) { if( aIsFlipped ) - return m_LayerZcoord[LAYER_N_BACK] - ( m_CopperThickness / 2 ); + return m_LayerZcoord[B_Cu] - ( m_CopperThickness / 2 ); else - return m_LayerZcoord[LAYER_N_FRONT] + ( m_CopperThickness / 2 ); + return m_LayerZcoord[F_Cu] + ( m_CopperThickness / 2 ); } diff --git a/3d-viewer/info3d_visu.h b/3d-viewer/info3d_visu.h index 7c7fe02918..10149d2ed8 100644 --- a/3d-viewer/info3d_visu.h +++ b/3d-viewer/info3d_visu.h @@ -95,7 +95,7 @@ public: double m_CurrentZpos; // temporary storage of current value of Z position, // used in some calculation private: - double m_LayerZcoord[NB_LAYERS]; // Z position of each layer (normalized) + double m_LayerZcoord[LAYER_ID_COUNT]; // Z position of each layer (normalized) double m_CopperThickness; // Copper thickness (normalized) double m_EpoxyThickness; // Epoxy thickness (normalized) double m_NonCopperLayerThickness; // Non copper layers thickness @@ -188,11 +188,12 @@ public: INFO3D_VISU(); * * Note: if m_drawFlags[FL_USE_COPPER_THICKNESS] is not set, returns 0 */ - int GetLayerObjectThicknessBIU( int aLayerId) const + int GetLayerObjectThicknessBIU( int aLayerId ) const { - return aLayerId >= FIRST_NON_COPPER_LAYER ? - GetNonCopperLayerThicknessBIU() : - GetCopperThicknessBIU(); + return IsCopperLayer( aLayerId ) ? + GetCopperThicknessBIU() : + GetNonCopperLayerThicknessBIU() + ; } bool IsRealisticMode() { return GetFlag( FL_USE_REALISTIC_MODE ); } diff --git a/bitmap2component/bitmap2component.cpp b/bitmap2component/bitmap2component.cpp index 83014cfa93..e0c22fbf20 100644 --- a/bitmap2component/bitmap2component.cpp +++ b/bitmap2component/bitmap2component.cpp @@ -355,7 +355,7 @@ void BITMAPCONV_INFO::OuputOnePolygon( KPolygon & aPolygon ) case PCBNEW_LEGACY_EMP: { - LAYER_NUM layer = SILKSCREEN_N_FRONT; + LAYER_NUM layer = F_SilkS; int width = 1; fprintf( m_Outfile, "DP %d %d %d %d %d %d %d\n", 0, 0, 0, 0, diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index d24c37bdfe..88db67da3b 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -250,6 +250,7 @@ set( PCB_COMMON_SRCS eda_text.cpp class_page_info.cpp pcbcommon.cpp + lset.cpp footprint_info.cpp ../pcbnew/basepcbframe.cpp ../pcbnew/class_board.cpp diff --git a/common/class_colors_design_settings.cpp b/common/class_colors_design_settings.cpp index ffa6c45577..42d8e79a71 100644 --- a/common/class_colors_design_settings.cpp +++ b/common/class_colors_design_settings.cpp @@ -15,8 +15,7 @@ /* Initial colors values: optimized for Pcbnew, but are also Ok for Eeschema * these values are superseded by config reading */ -static const EDA_COLOR_T default_layer_color[LAYERSCOLORSBUFFERSIZE] = -{ +static const EDA_COLOR_T default_layer_color[] = { GREEN, BLUE, LIGHTGRAY, BROWN, RED, MAGENTA, LIGHTGRAY, MAGENTA, DARKGRAY, BLUE, GREEN, CYAN, @@ -34,8 +33,8 @@ static const EDA_COLOR_T default_layer_color[LAYERSCOLORSBUFFERSIZE] = DARKGRAY }; -static const EDA_COLOR_T default_items_color[LAYERSCOLORSBUFFERSIZE] = -{ + +static const EDA_COLOR_T default_items_color[] = { LIGHTGRAY, // unused CYAN, // VIA_MICROVIA_VISIBLE BROWN, // VIA_BBLIND_VISIBLE @@ -56,13 +55,24 @@ static const EDA_COLOR_T default_items_color[LAYERSCOLORSBUFFERSIZE] = LIGHTGRAY, LIGHTGRAY, LIGHTGRAY }; + COLORS_DESIGN_SETTINGS::COLORS_DESIGN_SETTINGS() { - for( unsigned ii = 0; ii < DIM(m_LayersColors); ii++ ) - m_LayersColors[ii] = default_layer_color[ii]; + for( unsigned src = 0, dst = 0; dst < DIM(m_LayersColors); ++dst ) + { + m_LayersColors[dst] = default_layer_color[src++]; - for( unsigned ii = 0; ii < DIM(m_ItemsColors); ii++ ) - m_ItemsColors[ii] = default_items_color[ii]; + if( src >= DIM( default_layer_color ) ) + src = 0; // wrap the source. + } + + for( unsigned src = 0, dst = 0; dst < DIM(m_ItemsColors); ++dst ) + { + m_ItemsColors[dst] = default_items_color[src++]; + + if( src >= DIM( default_items_color ) ) + src = 0; + } } diff --git a/common/class_layer_box_selector.cpp b/common/class_layer_box_selector.cpp index 12f88f8b6a..aca58e6228 100644 --- a/common/class_layer_box_selector.cpp +++ b/common/class_layer_box_selector.cpp @@ -13,19 +13,11 @@ LAYER_SELECTOR::LAYER_SELECTOR() { - m_layerorder = true; m_layerhotkeys = true; m_hotkeys = NULL; } -bool LAYER_SELECTOR::SetLayersOrdered( bool value ) -{ - m_layerorder = value; - return m_layerorder; -} - - bool LAYER_SELECTOR::SetLayersHotkeys( bool value ) { m_layerhotkeys = value; @@ -33,7 +25,7 @@ bool LAYER_SELECTOR::SetLayersHotkeys( bool value ) } -void LAYER_SELECTOR::SetBitmapLayer( wxBitmap& aLayerbmp, LAYER_NUM aLayer ) +void LAYER_SELECTOR::SetBitmapLayer( wxBitmap& aLayerbmp, LAYER_ID aLayer ) { wxMemoryDC bmpDC; wxBrush brush; @@ -120,12 +112,15 @@ int LAYER_BOX_SELECTOR::SetLayerSelection( LAYER_NUM layer ) return -1; } + void LAYER_BOX_SELECTOR::ResyncBitmapOnly() { - LAYER_NUM elements = GetCount(); - for( LAYER_NUM i = FIRST_LAYER; i < elements; ++i ) + int elements = GetCount(); + + for( LAYER_NUM i = 0; i < elements; ++i ) { wxBitmap layerbmp( 14, 14 ); - SetBitmapLayer( layerbmp, i ); + SetBitmapLayer( layerbmp, LAYER_ID( i ) ); } } + diff --git a/common/common_plotSVG_functions.cpp b/common/common_plotSVG_functions.cpp index b90481eea9..857d93f67b 100644 --- a/common/common_plotSVG_functions.cpp +++ b/common/common_plotSVG_functions.cpp @@ -420,14 +420,14 @@ void SVG_PLOTTER::PlotPoly( const std::vector& aCornerList, switch( aFill ) { - case NO_FILL: - fprintf( outputFile, " general copper layer - * mask: */ -LAYER_MSK g_TabAllCopperLayerMask[NB_COPPER_LAYERS] = { - 0x0001, 0x8001, 0x8003, 0x8007, - 0x800F, 0x801F, 0x803F, 0x807F, - 0x80FF, 0x81FF, 0x83FF, 0x87FF, - 0x8FFF, 0x9FFF, 0xCFFF, 0xFFFF -}; - - DISPLAY_OPTIONS DisplayOpt; // Display options for board items int g_AnchorColor = BLUE; @@ -71,124 +61,20 @@ int g_PadCMPColor = RED; */ DLIST g_CurrentTrackList; -LAYER_NUM FlipLayer( LAYER_NUM oldlayer ) +void AccumulateDescription( wxString &aDesc, const wxString &aItem ) { - switch( oldlayer ) - { - case LAYER_N_BACK: - return LAYER_N_FRONT; - - case LAYER_N_FRONT: - return LAYER_N_BACK; - - case SILKSCREEN_N_BACK: - return SILKSCREEN_N_FRONT; - - case SILKSCREEN_N_FRONT: - return SILKSCREEN_N_BACK; - - case ADHESIVE_N_BACK: - return ADHESIVE_N_FRONT; - - case ADHESIVE_N_FRONT: - return ADHESIVE_N_BACK; - - case SOLDERMASK_N_BACK: - return SOLDERMASK_N_FRONT; - - case SOLDERMASK_N_FRONT: - return SOLDERMASK_N_BACK; - - case SOLDERPASTE_N_BACK: - return SOLDERPASTE_N_FRONT; - - case SOLDERPASTE_N_FRONT: - return SOLDERPASTE_N_BACK; - - // No change for the other layers - default: - return oldlayer; - } + if( !aDesc.IsEmpty() ) + aDesc << wxT(", "); + aDesc << aItem; } -LAYER_MSK FlipLayerMask( LAYER_MSK aMask ) -{ - LAYER_MSK newMask; - - newMask = aMask & ~(LAYER_BACK | LAYER_FRONT | - SILKSCREEN_LAYER_BACK | SILKSCREEN_LAYER_FRONT | - ADHESIVE_LAYER_BACK | ADHESIVE_LAYER_FRONT | - SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT | - SOLDERPASTE_LAYER_BACK | SOLDERPASTE_LAYER_FRONT | - ADHESIVE_LAYER_BACK | ADHESIVE_LAYER_FRONT); - - if( aMask & LAYER_BACK ) - newMask |= LAYER_FRONT; - - if( aMask & LAYER_FRONT ) - newMask |= LAYER_BACK; - - if( aMask & SILKSCREEN_LAYER_BACK ) - newMask |= SILKSCREEN_LAYER_FRONT; - - if( aMask & SILKSCREEN_LAYER_FRONT ) - newMask |= SILKSCREEN_LAYER_BACK; - - if( aMask & ADHESIVE_LAYER_BACK ) - newMask |= ADHESIVE_LAYER_FRONT; - - if( aMask & ADHESIVE_LAYER_FRONT ) - newMask |= ADHESIVE_LAYER_BACK; - - if( aMask & SOLDERMASK_LAYER_BACK ) - newMask |= SOLDERMASK_LAYER_FRONT; - - if( aMask & SOLDERMASK_LAYER_FRONT ) - newMask |= SOLDERMASK_LAYER_BACK; - - if( aMask & SOLDERPASTE_LAYER_BACK ) - newMask |= SOLDERPASTE_LAYER_FRONT; - - if( aMask & SOLDERPASTE_LAYER_FRONT ) - newMask |= SOLDERPASTE_LAYER_BACK; - - if( aMask & ADHESIVE_LAYER_BACK ) - newMask |= ADHESIVE_LAYER_FRONT; - - if( aMask & ADHESIVE_LAYER_FRONT ) - newMask |= ADHESIVE_LAYER_BACK; - - return newMask; -} - -LAYER_NUM ExtractLayer( LAYER_MSK aMask ) -{ - if( aMask == NO_LAYERS ) - return UNSELECTED_LAYER; - - LAYER_NUM candidate = UNDEFINED_LAYER; - - // Scan all the layers and take note of the first set; if other are - // then found return UNDEFINED_LAYER - for( LAYER_NUM i = FIRST_LAYER; i < NB_LAYERS; ++i ) - { - if( aMask & GetLayerMask( i ) ) - { - if( candidate == UNDEFINED_LAYER ) - candidate = i; - else - return UNDEFINED_LAYER; - } - } - return candidate; -} - -wxString LayerMaskDescribe( const BOARD *aBoard, LAYER_MSK aMask ) +wxString LayerMaskDescribe( const BOARD *aBoard, LSET aMask ) { // Try the single or no- layer case (easy) - LAYER_NUM layer = ExtractLayer( aMask ); - switch( layer ) + LAYER_ID layer = aMask.ExtractLayer(); + + switch( (int) layer ) { case UNSELECTED_LAYER: return _( "No layers" ); @@ -203,24 +89,19 @@ wxString LayerMaskDescribe( const BOARD *aBoard, LAYER_MSK aMask ) // Try to be smart and useful, starting with outer copper // (which are more important than internal ones) wxString layerInfo; - if( aMask & LAYER_FRONT ) - AccumulateDescription( layerInfo, aBoard->GetLayerName( LAYER_N_FRONT ) ); - if( aMask & LAYER_BACK ) - AccumulateDescription( layerInfo, aBoard->GetLayerName( LAYER_N_BACK ) ); - - if( aMask & INTERNAL_CU_LAYERS ) + if( aMask[F_Cu] ) + AccumulateDescription( layerInfo, aBoard->GetLayerName( F_Cu ) ); + + if( aMask[B_Cu] ) + AccumulateDescription( layerInfo, aBoard->GetLayerName( B_Cu ) ); + + if( ( aMask & LSET::InternalCuMask() ).any() ) AccumulateDescription( layerInfo, _("Internal" ) ); - if( aMask & ALL_NO_CU_LAYERS ) + if( ( aMask & LSET::AllNonCuMask() ).any() ) AccumulateDescription( layerInfo, _("Non-copper" ) ); return layerInfo; } -void AccumulateDescription( wxString &aDesc, const wxString &aItem ) -{ - if( !aDesc.IsEmpty() ) - aDesc << wxT(", "); - aDesc << aItem; -} diff --git a/eeschema/libedit_plot_component.cpp b/eeschema/libedit_plot_component.cpp index 39d3dbafcb..45cc109de1 100644 --- a/eeschema/libedit_plot_component.cpp +++ b/eeschema/libedit_plot_component.cpp @@ -183,7 +183,7 @@ void LIB_EDIT_FRAME::SVG_PlotComponent( const wxString& aFullFileName ) delete plotter; } -void LIB_EDIT_FRAME::PrintPage( wxDC* aDC, LAYER_MSK aPrintMask, bool aPrintMirrorMode, void* aData) +void LIB_EDIT_FRAME::PrintPage( wxDC* aDC, LSET aPrintMask, bool aPrintMirrorMode, void* aData) { if( ! m_component ) return; diff --git a/eeschema/libeditframe.h b/eeschema/libeditframe.h index 106ef8830b..b328785980 100644 --- a/eeschema/libeditframe.h +++ b/eeschema/libeditframe.h @@ -608,7 +608,7 @@ public: * @param aPrintMirrorMode = not used here (Set when printing in mirror mode) * @param aData = a pointer on an auxiliary data (not always used, NULL if not used) */ - virtual void PrintPage( wxDC* aDC, LAYER_MSK aPrintMask, + virtual void PrintPage( wxDC* aDC, LSET aPrintMask, bool aPrintMirrorMode, void* aData = NULL ); /** diff --git a/eeschema/schframe.cpp b/eeschema/schframe.cpp index 4a46f3047a..1ed61a476e 100644 --- a/eeschema/schframe.cpp +++ b/eeschema/schframe.cpp @@ -931,7 +931,7 @@ void SCH_EDIT_FRAME::OnPrint( wxCommandEvent& event ) } -void SCH_EDIT_FRAME::PrintPage( wxDC* aDC, LAYER_MSK aPrintMask, bool aPrintMirrorMode, +void SCH_EDIT_FRAME::PrintPage( wxDC* aDC, LSET aPrintMask, bool aPrintMirrorMode, void* aData ) { GetScreen()->Draw( m_canvas, aDC, GR_DEFAULT_DRAWMODE ); diff --git a/gerbview/class_gbr_layer_box_selector.h b/gerbview/class_gbr_layer_box_selector.h index dc78cf93b7..ff7878ae09 100644 --- a/gerbview/class_gbr_layer_box_selector.h +++ b/gerbview/class_gbr_layer_box_selector.h @@ -9,14 +9,12 @@ class GBR_LAYER_BOX_SELECTOR : public LAYER_BOX_SELECTOR { public: GBR_LAYER_BOX_SELECTOR( wxWindow* parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL ) - :LAYER_BOX_SELECTOR( parent, id, pos, size, n, choices ) - { - m_layerhotkeys = false; - m_layerorder = false; - } + const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL ) : + LAYER_BOX_SELECTOR( parent, id, pos, size, n, choices ) + { + m_layerhotkeys = false; + } // Reload the Layers names and bitmaps // Virtual function diff --git a/gerbview/class_gbr_layout.h b/gerbview/class_gbr_layout.h index da0c511604..62397de9c7 100644 --- a/gerbview/class_gbr_layout.h +++ b/gerbview/class_gbr_layout.h @@ -27,7 +27,7 @@ private: PAGE_INFO m_paper; TITLE_BLOCK m_titles; wxPoint m_originAxisPosition; - LAYER_MSK m_printLayersMask; // When printing: the list of layers to print + LSET m_printLayersMask; // When printing: the list of layers to print public: DLIST m_Drawings; // linked list of Gerber Items @@ -93,7 +93,7 @@ public: * changes the bit-mask of visible layers * @param aLayerMask = The new bit-mask of visible layers */ - void SetVisibleLayers( LAYER_MSK aLayerMask ) + void SetVisibleLayers( LSET aLayerMask ) { m_printLayersMask = aLayerMask; } diff --git a/gerbview/class_gbr_screen.cpp b/gerbview/class_gbr_screen.cpp index aaf96275ff..efa06d4365 100644 --- a/gerbview/class_gbr_screen.cpp +++ b/gerbview/class_gbr_screen.cpp @@ -86,7 +86,7 @@ GBR_SCREEN::GBR_SCREEN( const wxSize& aPageSizeIU ) : // Set the working grid size to a reasonable value (in 1/10000 inch) SetGrid( DMIL_GRID( 500 ) ); - m_Active_Layer = LAYER_N_BACK; // default active layer = bottom layer + m_Active_Layer = B_Cu; // default active layer = bottom layer SetZoom( ZOOM_FACTOR( 350 ) ); // a default value for zoom diff --git a/gerbview/class_gerber_draw_item.h b/gerbview/class_gerber_draw_item.h index c7a0b695cc..13d15e62e6 100644 --- a/gerbview/class_gerber_draw_item.h +++ b/gerbview/class_gerber_draw_item.h @@ -134,7 +134,7 @@ public: */ void SetLayer( LAYER_NUM aLayer ) { m_Layer = aLayer; } - LAYER_MSK GetLayerMask() + LSET GetLayerMask() { return ::GetLayerMask( m_Layer ); } diff --git a/gerbview/class_gerbview_layer_widget.cpp b/gerbview/class_gerbview_layer_widget.cpp index 911f2594f3..533232fd41 100644 --- a/gerbview/class_gerbview_layer_widget.cpp +++ b/gerbview/class_gerbview_layer_widget.cpp @@ -169,7 +169,7 @@ void GERBER_LAYER_WIDGET::onPopupSelection( wxCommandEvent& event ) int rowCount; int menuId = event.GetId(); bool visible = (menuId == ID_SHOW_ALL_LAYERS) ? true : false;; - LAYER_MSK visibleLayers = NO_LAYERS; + LSET visibleLayers = NO_LAYERS; bool force_active_layer_visible; m_alwaysShowActiveLayer = ( menuId == ID_ALWAYS_SHOW_NO_LAYERS_BUT_ACTIVE ); @@ -195,9 +195,9 @@ void GERBER_LAYER_WIDGET::onPopupSelection( wxCommandEvent& event ) cb->SetValue( loc_visible ); if( loc_visible ) - visibleLayers |= GetLayerMask( row ); + visibleLayers |= GetLayerSet( row ); else - visibleLayers &= ~GetLayerMask( row ); + visibleLayers &= ~GetLayerSet( row ); } myframe->SetVisibleLayers( visibleLayers ); @@ -237,7 +237,7 @@ void GERBER_LAYER_WIDGET::ReFill() //------------------------------------------------ -void GERBER_LAYER_WIDGET::OnLayerColorChange( LAYER_NUM aLayer, EDA_COLOR_T aColor ) +void GERBER_LAYER_WIDGET::OnLayerColorChange( int aLayer, EDA_COLOR_T aColor ) { myframe->SetLayerColor( aLayer, aColor ); myframe->m_SelLayerBox->ResyncBitmapOnly(); @@ -263,12 +263,12 @@ bool GERBER_LAYER_WIDGET::OnLayerSelect( LAYER_NUM aLayer ) void GERBER_LAYER_WIDGET::OnLayerVisible( LAYER_NUM aLayer, bool isVisible, bool isFinal ) { - LAYER_MSK visibleLayers = myframe->GetVisibleLayers(); + LSET visibleLayers = myframe->GetVisibleLayers(); if( isVisible ) - visibleLayers |= GetLayerMask( aLayer ); + visibleLayers |= GetLayerSet( aLayer ); else - visibleLayers &= ~GetLayerMask( aLayer ); + visibleLayers &= ~GetLayerSet( aLayer ); myframe->SetVisibleLayers( visibleLayers ); diff --git a/gerbview/class_gerbview_layer_widget.h b/gerbview/class_gerbview_layer_widget.h index 4d343ce121..ebb4eb16b5 100644 --- a/gerbview/class_gerbview_layer_widget.h +++ b/gerbview/class_gerbview_layer_widget.h @@ -91,9 +91,9 @@ public: void ReFillRender(); //---------------- - void OnLayerColorChange( LAYER_NUM aLayer, EDA_COLOR_T aColor ); - bool OnLayerSelect( LAYER_NUM aLayer ); - void OnLayerVisible( LAYER_NUM aLayer, bool isVisible, bool isFinal ); + void OnLayerColorChange( int aLayer, EDA_COLOR_T aColor ); + bool OnLayerSelect( int aLayer ); + void OnLayerVisible( int aLayer, bool isVisible, bool isFinal ); void OnRenderColorChange( int aId, EDA_COLOR_T aColor ); void OnRenderEnable( int aId, bool isEnabled ); /** diff --git a/gerbview/dialogs/dialog_print_using_printer.cpp b/gerbview/dialogs/dialog_print_using_printer.cpp index 3f9f338416..1bd58a195e 100644 --- a/gerbview/dialogs/dialog_print_using_printer.cpp +++ b/gerbview/dialogs/dialog_print_using_printer.cpp @@ -63,7 +63,7 @@ private: public: bool IsMirrored() { return m_Print_Mirror->IsChecked(); } bool PrintUsingSinglePage() { return true; } - int SetLayerMaskFromListSelection(); + int SetLayerSetFromListSelection(); }; @@ -136,7 +136,7 @@ void DIALOG_PRINT_USING_PRINTER::InitValues( ) // Create layer list for( LAYER_NUM ii = FIRST_LAYER; ii < layer_max; ++ii ) { - LAYER_MSK mask = GetLayerMask( ii ); + LSET mask = GetLayerSet( ii ); msg = _( "Layer" ); msg << wxT( " " ) << ii + 1; m_BoxSelectLayer[ii] = new wxCheckBox( this, -1, msg ); @@ -183,7 +183,7 @@ void DIALOG_PRINT_USING_PRINTER::InitValues( ) { m_BoxSelectLayer[layer]->SetValue( option ); if( option ) - s_SelectedLayers |= GetLayerMask( layer ); + s_SelectedLayers |= GetLayerSet( layer ); } } } @@ -215,7 +215,7 @@ void DIALOG_PRINT_USING_PRINTER::InitValues( ) } /**************************************************************/ -int DIALOG_PRINT_USING_PRINTER::SetLayerMaskFromListSelection() +int DIALOG_PRINT_USING_PRINTER::SetLayerSetFromListSelection() /**************************************************************/ { int page_count = 0; @@ -225,7 +225,7 @@ int DIALOG_PRINT_USING_PRINTER::SetLayerMaskFromListSelection() if( m_BoxSelectLayer[ii]->IsChecked() ) { page_count++; - s_Parameters.m_PrintMaskLayer |= GetLayerMask( ii ); + s_Parameters.m_PrintMaskLayer |= GetLayerSet( ii ); } } @@ -271,7 +271,7 @@ void DIALOG_PRINT_USING_PRINTER::SetPrintParameters( ) // because these objects create artefact when they are printed on an existing image. s_Parameters.m_OptionPrintPage = false; - SetLayerMaskFromListSelection(); + SetLayerSetFromListSelection(); int idx = m_ScaleOption->GetSelection(); s_Parameters.m_PrintScale = s_ScaleList[idx]; @@ -342,7 +342,7 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event ) return; } - SetLayerMaskFromListSelection(); + SetLayerSetFromListSelection(); // If no layer selected, we have no plot. prompt user if it happens // because he could think there is a bug in Pcbnew: diff --git a/gerbview/dialogs/dialog_select_one_pcb_layer.cpp b/gerbview/dialogs/dialog_select_one_pcb_layer.cpp index 80dd1b46cc..cfadefe3ea 100644 --- a/gerbview/dialogs/dialog_select_one_pcb_layer.cpp +++ b/gerbview/dialogs/dialog_select_one_pcb_layer.cpp @@ -189,7 +189,7 @@ const wxString GetPCBDefaultLayerName( LAYER_NUM aLayerNumber ) // Use a switch to explicitly show the mapping more clearly switch( aLayerNumber ) { - case LAYER_N_FRONT: txt = wxT( "F.Cu" ); break; + case F_Cu: txt = wxT( "F.Cu" ); break; case LAYER_N_2: txt = wxT( "Inner1.Cu" ); break; case LAYER_N_3: txt = wxT( "Inner2.Cu" ); break; case LAYER_N_4: txt = wxT( "Inner3.Cu" ); break; @@ -204,20 +204,20 @@ const wxString GetPCBDefaultLayerName( LAYER_NUM aLayerNumber ) case LAYER_N_13: txt = wxT( "Inner12.Cu" ); break; case LAYER_N_14: txt = wxT( "Inner13.Cu" ); break; case LAYER_N_15: txt = wxT( "Inner14.Cu" ); break; - case LAYER_N_BACK: txt = wxT( "B.Cu" ); break; - case ADHESIVE_N_BACK: txt = wxT( "B.Adhes" ); break; - case ADHESIVE_N_FRONT: txt = wxT( "F.Adhes" ); break; - case SOLDERPASTE_N_BACK: txt = wxT( "B.Paste" ); break; - case SOLDERPASTE_N_FRONT: txt = wxT( "F.Paste" ); break; - case SILKSCREEN_N_BACK: txt = wxT( "B.SilkS" ); break; - case SILKSCREEN_N_FRONT: txt = wxT( "F.SilkS" ); break; - case SOLDERMASK_N_BACK: txt = wxT( "B.Mask" ); break; - case SOLDERMASK_N_FRONT: txt = wxT( "F.Mask" ); break; - case DRAW_N: txt = wxT( "Dwgs.User" ); break; - case COMMENT_N: txt = wxT( "Cmts.User" ); break; - case ECO1_N: txt = wxT( "Eco1.User" ); break; - case ECO2_N: txt = wxT( "Eco2.User" ); break; - case EDGE_N: txt = wxT( "Edge.Cuts" ); break; + case B_Cu: txt = wxT( "B.Cu" ); break; + case B_Adhes: txt = wxT( "B.Adhes" ); break; + case F_Adhes: txt = wxT( "F.Adhes" ); break; + case B_Paste: txt = wxT( "B.Paste" ); break; + case F_Paste: txt = wxT( "F.Paste" ); break; + case B_SilkS: txt = wxT( "B.SilkS" ); break; + case F_SilkS: txt = wxT( "F.SilkS" ); break; + case B_Mask: txt = wxT( "B.Mask" ); break; + case F_Mask: txt = wxT( "F.Mask" ); break; + case Dwgs_User: txt = wxT( "Dwgs.User" ); break; + case Cmts_User: txt = wxT( "Cmts.User" ); break; + case Eco1_User: txt = wxT( "Eco1.User" ); break; + case Eco2_User: txt = wxT( "Eco2.User" ); break; + case Edge_Cuts: txt = wxT( "Edge.Cuts" ); break; default: txt = wxT( "BAD_INDEX" ); break; } diff --git a/gerbview/draw_gerber_screen.cpp b/gerbview/draw_gerber_screen.cpp index b2dc3640a8..da9e793679 100644 --- a/gerbview/draw_gerber_screen.cpp +++ b/gerbview/draw_gerber_screen.cpp @@ -42,11 +42,11 @@ #include -void GERBVIEW_FRAME::PrintPage( wxDC* aDC, LAYER_MSK aPrintMasklayer, +void GERBVIEW_FRAME::PrintPage( wxDC* aDC, LSET aPrintMasklayer, bool aPrintMirrorMode, void* aData ) { // Save current draw options, because print mode has specific options: - LAYER_MSK visiblemask = GetVisibleLayers(); + LSET visiblemask = GetVisibleLayers(); GBR_DISPLAY_OPTIONS imgDisplayOptions = m_DisplayOptions; // Set draw options for printing: diff --git a/gerbview/gerbview_frame.cpp b/gerbview/gerbview_frame.cpp index 0674be6c1e..632ce929c6 100644 --- a/gerbview/gerbview_frame.cpp +++ b/gerbview/gerbview_frame.cpp @@ -551,7 +551,7 @@ void GERBVIEW_FRAME::SetVisibleAlls() * Returns a bit-mask of all the layers that are visible * @return int - the visible layers in bit-mapped form. */ -LAYER_MSK GERBVIEW_FRAME::GetVisibleLayers() const +LSET GERBVIEW_FRAME::GetVisibleLayers() const { return FULL_LAYERS; // TODO } @@ -563,7 +563,7 @@ LAYER_MSK GERBVIEW_FRAME::GetVisibleLayers() const * changes the bit-mask of visible layers * @param aLayerMask = The new bit-mask of visible layers */ -void GERBVIEW_FRAME::SetVisibleLayers( LAYER_MSK aLayerMask ) +void GERBVIEW_FRAME::SetVisibleLayers( LSET aLayerMask ) { GetGerberLayout()->SetVisibleLayers( aLayerMask ); } diff --git a/gerbview/gerbview_frame.h b/gerbview/gerbview_frame.h index df14fdaa4b..81a076e361 100644 --- a/gerbview/gerbview_frame.h +++ b/gerbview/gerbview_frame.h @@ -308,7 +308,7 @@ public: * Returns a bit-mask of all the layers that are visible * @return int - the visible layers in bit-mapped form. */ - LAYER_MSK GetVisibleLayers() const; + LSET GetVisibleLayers() const; /** * Function SetVisibleLayers @@ -316,7 +316,7 @@ public: * changes the bit-mask of visible layers * @param aLayerMask = The new bit-mask of visible layers */ - void SetVisibleLayers( LAYER_MSK aLayerMask ); + void SetVisibleLayers( LSET aLayerMask ); /** * Function IsLayerVisible @@ -667,7 +667,7 @@ public: * @param aPrintMirrorMode = not used here (Set when printing in mirror mode) * @param aData = a pointer on an auxiliary data (not always used, NULL if not used) */ - virtual void PrintPage( wxDC* aDC, LAYER_MSK aPrintMasklayer, bool aPrintMirrorMode, + virtual void PrintPage( wxDC* aDC, LSET aPrintMasklayer, bool aPrintMirrorMode, void* aData = NULL ); /** diff --git a/gerbview/select_layers_to_pcb.cpp b/gerbview/select_layers_to_pcb.cpp index 058dfd5d54..b6f1cf8f15 100644 --- a/gerbview/select_layers_to_pcb.cpp +++ b/gerbview/select_layers_to_pcb.cpp @@ -128,7 +128,7 @@ void LAYERS_MAP_DIALOG::initDialog() if( (pcb_layer_num == m_exportBoardCopperLayersCount - 1) && (m_exportBoardCopperLayersCount > 1) ) - pcb_layer_num = LAYER_N_FRONT; + pcb_layer_num = F_Cu; m_buttonTable[m_itemsCount] = ii; m_layersLookUpTable[ii] = pcb_layer_num; @@ -288,7 +288,7 @@ void LAYERS_MAP_DIALOG::OnResetClick( wxCommandEvent& event ) { if( (layer == m_exportBoardCopperLayersCount - 1) && (m_exportBoardCopperLayersCount > 1) ) - layer = LAYER_N_FRONT; + layer = F_Cu; m_layersLookUpTable[ii] = layer; msg = GetPCBDefaultLayerName( layer ); m_layersList[ii]->SetLabel( msg ); @@ -362,7 +362,7 @@ void LAYERS_MAP_DIALOG::OnSelectLayer( wxCommandEvent& event ) LAYER_NUM jj = m_layersLookUpTable[m_buttonTable[ii]]; if( !IsValidLayer( jj ) ) - jj = LAYER_N_BACK; // (Defaults to "Copper" layer.) + jj = B_Cu; // (Defaults to "Copper" layer.) jj = m_Parent->SelectPCBLayer( jj, m_exportBoardCopperLayersCount, true ); @@ -408,7 +408,7 @@ void LAYERS_MAP_DIALOG::OnOkClick( wxCommandEvent& event ) int inner_layer_max = 0; for( LAYER_NUM ii = FIRST_LAYER; ii < NB_GERBER_LAYERS; ++ii ) { - if( m_layersLookUpTable[ii] < LAYER_N_FRONT ) + if( m_layersLookUpTable[ii] < F_Cu ) { if( m_layersLookUpTable[ii ] > inner_layer_max ) inner_layer_max = m_layersLookUpTable[ii]; diff --git a/include/class_board_design_settings.h b/include/class_board_design_settings.h index 4e81ff0652..4f3c34ee77 100644 --- a/include/class_board_design_settings.h +++ b/include/class_board_design_settings.h @@ -47,6 +47,7 @@ struct VIA_DIMENSION } }; + /** * Class BOARD_DESIGN_SETTINGS * contains design settings for a BOARD object. @@ -326,7 +327,7 @@ public: * returns a bit-mask of all the layers that are visible * @return int - the visible layers in bit-mapped form. */ - inline LAYER_MSK GetVisibleLayers() const + inline LSET GetVisibleLayers() const { return m_visibleLayers; } @@ -343,30 +344,30 @@ public: * changes the bit-mask of visible layers * @param aMask = The new bit-mask of visible layers */ - inline void SetVisibleLayers( LAYER_MSK aMask ) + inline void SetVisibleLayers( LSET aMask ) { - m_visibleLayers = aMask & m_enabledLayers & FULL_LAYERS; + m_visibleLayers = aMask & m_enabledLayers; } /** * Function IsLayerVisible * tests whether a given layer is visible - * @param aLayer = The layer to be tested + * @param aLayerId = The layer to be tested * @return bool - true if the layer is visible. */ - inline bool IsLayerVisible( LAYER_NUM aLayer ) const + inline bool IsLayerVisible( LAYER_ID aLayerId ) const { // If a layer is disabled, it is automatically invisible - return m_visibleLayers & m_enabledLayers & GetLayerMask( aLayer ); + return (m_visibleLayers & m_enabledLayers)[aLayerId]; } /** * Function SetLayerVisibility * changes the visibility of a given layer - * @param aLayer = The layer to be changed + * @param aLayerId = The layer to be changed * @param aNewState = The new visibility state of the layer */ - void SetLayerVisibility( LAYER_NUM aLayer, bool aNewState ); + void SetLayerVisibility( LAYER_ID aLayerId, bool aNewState ); /** * Function GetVisibleElements @@ -417,7 +418,7 @@ public: * returns a bit-mask of all the layers that are enabled * @return int - the enabled layers in bit-mapped form. */ - inline LAYER_MSK GetEnabledLayers() const + inline LSET GetEnabledLayers() const { return m_enabledLayers; } @@ -427,17 +428,17 @@ public: * changes the bit-mask of enabled layers * @param aMask = The new bit-mask of enabled layers */ - void SetEnabledLayers( LAYER_MSK aMask ); + void SetEnabledLayers( LSET aMask ); /** * Function IsLayerEnabled * tests whether a given layer is enabled - * @param aLayer = The of the layer to be tested + * @param aLayerId = The layer to be tested * @return bool - true if the layer is enabled */ - inline bool IsLayerEnabled( LAYER_NUM aLayer ) const + inline bool IsLayerEnabled( LAYER_ID aLayerId ) const { - return m_enabledLayers & GetLayerMask( aLayer ); + return m_enabledLayers[aLayerId]; } /** @@ -485,11 +486,13 @@ private: ///> Custom via size (used after UseCustomTrackViaSize( true ) was called). VIA_DIMENSION m_customViaSize; - int m_copperLayerCount; ///< Number of copper layers for this design - LAYER_MSK m_enabledLayers; ///< Bit-mask for layer enabling - LAYER_MSK m_visibleLayers; ///< Bit-mask for layer visibility - int m_visibleElements; ///< Bit-mask for element category visibility - int m_boardThickness; ///< Board thickness for 3D viewer + int m_copperLayerCount; ///< Number of copper layers for this design + + LSET m_enabledLayers; ///< Bit-mask for layer enabling + LSET m_visibleLayers; ///< Bit-mask for layer visibility + + int m_visibleElements; ///< Bit-mask for element category visibility + int m_boardThickness; ///< Board thickness for 3D viewer /// Current net class name used to display netclass info. /// This is also the last used netclass after starting a track. diff --git a/include/class_board_item.h b/include/class_board_item.h index 0527a33c91..1aa224e412 100644 --- a/include/class_board_item.h +++ b/include/class_board_item.h @@ -76,12 +76,12 @@ class BOARD_ITEM : public EDA_ITEM void SetBack( EDA_ITEM* aBack ) { Pback = aBack; } protected: - LAYER_NUM m_Layer; + LAYER_ID m_Layer; public: BOARD_ITEM( BOARD_ITEM* aParent, KICAD_T idtype ) : - EDA_ITEM( aParent, idtype ), m_Layer( FIRST_LAYER ) + EDA_ITEM( aParent, idtype ), m_Layer( F_Cu ) { } @@ -114,7 +114,7 @@ public: * Function GetLayer * returns the layer this item is on. */ - LAYER_NUM GetLayer() const { return m_Layer; } + LAYER_ID GetLayer() const { return m_Layer; } /** * Function SetLayer @@ -123,7 +123,7 @@ public: * is virtual because some items (in fact: class DIMENSION) * have a slightly different initialization */ - virtual void SetLayer( LAYER_NUM aLayer ) + virtual void SetLayer( LAYER_ID aLayer ) { // trap any invalid layers, then go find the caller and fix it. // wxASSERT( unsigned( aLayer ) < unsigned( NB_PCB_LAYERS ) ); diff --git a/include/class_colors_design_settings.h b/include/class_colors_design_settings.h index e0523b9564..e1900baff3 100644 --- a/include/class_colors_design_settings.h +++ b/include/class_colors_design_settings.h @@ -7,8 +7,6 @@ #define _COLORS_DESIGN_SETTING_H #include -#define LAYERSCOLORSBUFFERSIZE NB_LAYERS -#define ITEMSCOLORSBUFFERSIZE 32 /** * Class COLORS_DESIGN_SETTINGS @@ -20,10 +18,10 @@ public: // Color options for screen display of the Printed Board and schematic: // Common to Eeschema, Pcbnew, GerbView - EDA_COLOR_T m_LayersColors[LAYERSCOLORSBUFFERSIZE]; ///< Layer colors (tracks and graphic items) + EDA_COLOR_T m_LayersColors[LAYER_ID_COUNT]; ///< Layer colors (tracks and graphic items) // Common to Eeschema, Pcbnew - EDA_COLOR_T m_ItemsColors[ITEMSCOLORSBUFFERSIZE]; ///< All others items but layers + EDA_COLOR_T m_ItemsColors[32]; ///< All others items but layers public: COLORS_DESIGN_SETTINGS(); diff --git a/include/class_layer_box_selector.h b/include/class_layer_box_selector.h index 4a130c8654..e61301ea98 100644 --- a/include/class_layer_box_selector.h +++ b/include/class_layer_box_selector.h @@ -15,7 +15,6 @@ class LAYER_SELECTOR { protected: bool m_layerhotkeys; - bool m_layerorder; public: // Hotkey Info @@ -41,12 +40,13 @@ public: protected: // Fills the layer bitmap aLayerbmp with the layer color - void SetBitmapLayer( wxBitmap& aLayerbmp, LAYER_NUM aLayer ); + void SetBitmapLayer( wxBitmap& aLayerbmp, LAYER_ID aLayer ); }; + /* class to display a layer list in a wxBitmapComboBox. */ -class LAYER_BOX_SELECTOR :public wxBitmapComboBox, public LAYER_SELECTOR +class LAYER_BOX_SELECTOR : public wxBitmapComboBox, public LAYER_SELECTOR { public: // Hotkey Info @@ -69,7 +69,7 @@ public: LAYER_NUM GetLayerSelection() const; // Set Layer # - int SetLayerSelection(LAYER_NUM layer); + int SetLayerSelection( LAYER_NUM layer ); // Reload the Layers // Virtual pure function because GerbView uses its own functions in a derived class @@ -79,23 +79,4 @@ public: void ResyncBitmapOnly(); }; -#define DECLARE_LAYERS_HOTKEY(list) int list[NB_LAYERS] = \ - { \ - HK_SWITCH_LAYER_TO_COPPER, \ - HK_SWITCH_LAYER_TO_INNER1, \ - HK_SWITCH_LAYER_TO_INNER2, \ - HK_SWITCH_LAYER_TO_INNER3, \ - HK_SWITCH_LAYER_TO_INNER4, \ - HK_SWITCH_LAYER_TO_INNER5, \ - HK_SWITCH_LAYER_TO_INNER6, \ - HK_SWITCH_LAYER_TO_INNER7, \ - HK_SWITCH_LAYER_TO_INNER8, \ - HK_SWITCH_LAYER_TO_INNER9, \ - HK_SWITCH_LAYER_TO_INNER10, \ - HK_SWITCH_LAYER_TO_INNER11, \ - HK_SWITCH_LAYER_TO_INNER12, \ - HK_SWITCH_LAYER_TO_INNER13, \ - HK_SWITCH_LAYER_TO_INNER14, \ - HK_SWITCH_LAYER_TO_COMPONENT \ - }; -#endif //CLASS_LAYER_BOX_SELECTOR_H +#endif // CLASS_LAYER_BOX_SELECTOR_H diff --git a/include/class_pcb_screen.h b/include/class_pcb_screen.h index 59f3f3d592..e445a53ca0 100644 --- a/include/class_pcb_screen.h +++ b/include/class_pcb_screen.h @@ -17,9 +17,9 @@ class UNDO_REDO_CONTAINER; class PCB_SCREEN : public BASE_SCREEN { public: - LAYER_NUM m_Active_Layer; - LAYER_NUM m_Route_Layer_TOP; - LAYER_NUM m_Route_Layer_BOTTOM; + LAYER_ID m_Active_Layer; + LAYER_ID m_Route_Layer_TOP; + LAYER_ID m_Route_Layer_BOTTOM; public: diff --git a/include/draw_frame.h b/include/draw_frame.h index a76e1f4cc6..6b77593801 100644 --- a/include/draw_frame.h +++ b/include/draw_frame.h @@ -613,7 +613,7 @@ public: * @param aPrintMirrorMode = not used here (Set when printing in mirror mode) * @param aData = a pointer on an auxiliary data (not always used, NULL if not used) */ - virtual void PrintPage( wxDC* aDC, LAYER_MSK aPrintMask, bool aPrintMirrorMode, void* aData = NULL ); + virtual void PrintPage( wxDC* aDC, LSET aPrintMask, bool aPrintMirrorMode, void* aData = NULL ); /** * Function CoordinateToString diff --git a/include/layers_id_colors_and_visibility.h b/include/layers_id_colors_and_visibility.h index 5b73d4f266..0886481da8 100644 --- a/include/layers_id_colors_and_visibility.h +++ b/include/layers_id_colors_and_visibility.h @@ -27,190 +27,336 @@ * @brief Board layer functions and definitions. */ -#ifndef _LAYERS_ID_AND_VISIBILITY_H_ -#define _LAYERS_ID_AND_VISIBILITY_H_ +#ifndef LAYERS_ID_AND_VISIBILITY_H_ +#define LAYERS_ID_AND_VISIBILITY_H_ + +#include +#include +#include +#include +#include class BOARD; -/* NOTE: the idea here is to have LAYER_NUM and LAYER_MSK as abstract - * type as possible (even if they're currently implemented as int and - * unsigned int, respectively). In this way it would be reasonably easy - * to overcome the current 32 layer limit. For example switching to a 64 - * bit mask or even some kind of bit array */ - -/* Layer identification (layer number) */ -typedef int LAYER_NUM; -#define UNDEFINED_LAYER -1 -#define FIRST_LAYER 0 -#define FIRST_COPPER_LAYER 0 -#define LAYER_N_BACK 0 -#define LAYER_N_2 1 -#define LAYER_N_3 2 -#define LAYER_N_4 3 -#define LAYER_N_5 4 -#define LAYER_N_6 5 -#define LAYER_N_7 6 -#define LAYER_N_8 7 -#define LAYER_N_9 8 -#define LAYER_N_10 9 -#define LAYER_N_11 10 -#define LAYER_N_12 11 -#define LAYER_N_13 12 -#define LAYER_N_14 13 -#define LAYER_N_15 14 -#define LAYER_N_FRONT 15 -#define LAST_COPPER_LAYER LAYER_N_FRONT -#define NB_COPPER_LAYERS (LAST_COPPER_LAYER - FIRST_COPPER_LAYER + 1) - -#define FIRST_NON_COPPER_LAYER 16 -#define FIRST_TECHNICAL_LAYER 16 -#define FIRST_USER_LAYER 24 -#define ADHESIVE_N_BACK 16 -#define ADHESIVE_N_FRONT 17 -#define SOLDERPASTE_N_BACK 18 -#define SOLDERPASTE_N_FRONT 19 -#define SILKSCREEN_N_BACK 20 -#define SILKSCREEN_N_FRONT 21 -#define SOLDERMASK_N_BACK 22 -#define SOLDERMASK_N_FRONT 23 -#define DRAW_N 24 -#define COMMENT_N 25 -#define ECO1_N 26 -#define ECO2_N 27 -#define EDGE_N 28 -#define LAST_NON_COPPER_LAYER 28 -#define LAST_TECHNICAL_LAYER 23 -#define LAST_USER_LAYER 27 -#define NB_PCB_LAYERS (LAST_NON_COPPER_LAYER + 1) -#define UNUSED_LAYER_29 29 -#define UNUSED_LAYER_30 30 -#define UNUSED_LAYER_31 31 -#define NB_GERBER_LAYERS 32 -#define NB_LAYERS 32 -#define UNSELECTED_LAYER 32 - -// Masks to identify a layer by a bit map -typedef unsigned LAYER_MSK; -#define LAYER_BACK (1 << LAYER_N_BACK) ///< bit mask for copper layer -#define LAYER_2 (1 << LAYER_N_2) ///< bit mask for layer 2 -#define LAYER_3 (1 << LAYER_N_3) ///< bit mask for layer 3 -#define LAYER_4 (1 << LAYER_N_4) ///< bit mask for layer 4 -#define LAYER_5 (1 << LAYER_N_5) ///< bit mask for layer 5 -#define LAYER_6 (1 << LAYER_N_6) ///< bit mask for layer 6 -#define LAYER_7 (1 << LAYER_N_7) ///< bit mask for layer 7 -#define LAYER_8 (1 << LAYER_N_8) ///< bit mask for layer 8 -#define LAYER_9 (1 << LAYER_N_9) ///< bit mask for layer 9 -#define LAYER_10 (1 << LAYER_N_10) ///< bit mask for layer 10 -#define LAYER_11 (1 << LAYER_N_11) ///< bit mask for layer 11 -#define LAYER_12 (1 << LAYER_N_12) ///< bit mask for layer 12 -#define LAYER_13 (1 << LAYER_N_13) ///< bit mask for layer 13 -#define LAYER_14 (1 << LAYER_N_14) ///< bit mask for layer 14 -#define LAYER_15 (1 << LAYER_N_15) ///< bit mask for layer 15 -#define LAYER_FRONT (1 << LAYER_N_FRONT) ///< bit mask for component layer -#define ADHESIVE_LAYER_BACK (1 << ADHESIVE_N_BACK) -#define ADHESIVE_LAYER_FRONT (1 << ADHESIVE_N_FRONT) -#define SOLDERPASTE_LAYER_BACK (1 << SOLDERPASTE_N_BACK) -#define SOLDERPASTE_LAYER_FRONT (1 << SOLDERPASTE_N_FRONT) -#define SILKSCREEN_LAYER_BACK (1 << SILKSCREEN_N_BACK) -#define SILKSCREEN_LAYER_FRONT (1 << SILKSCREEN_N_FRONT) -#define SOLDERMASK_LAYER_BACK (1 << SOLDERMASK_N_BACK) -#define SOLDERMASK_LAYER_FRONT (1 << SOLDERMASK_N_FRONT) -#define DRAW_LAYER (1 << DRAW_N) -#define COMMENT_LAYER (1 << COMMENT_N) -#define ECO1_LAYER (1 << ECO1_N) -#define ECO2_LAYER (1 << ECO2_N) -#define EDGE_LAYER (1 << EDGE_N) - -// extra bits 0xE0000000 - -// Helpful global layer masks: -// ALL_AUX_LAYERS layers are technical layers, ALL_NO_CU_LAYERS has user -// and edge layers too! -#define ALL_LAYERS 0x1FFFFFFF // Pcbnew used 29 layers -#define FULL_LAYERS 0xFFFFFFFF // Gerbview used 32 layers -#define ALL_NO_CU_LAYERS 0x1FFF0000 -#define ALL_CU_LAYERS 0x0000FFFF -#define INTERNAL_CU_LAYERS 0x00007FFE -#define EXTERNAL_CU_LAYERS 0x00008001 -#define FRONT_TECH_LAYERS (SILKSCREEN_LAYER_FRONT | SOLDERMASK_LAYER_FRONT \ - | ADHESIVE_LAYER_FRONT | SOLDERPASTE_LAYER_FRONT) -#define BACK_TECH_LAYERS (SILKSCREEN_LAYER_BACK | SOLDERMASK_LAYER_BACK \ - | ADHESIVE_LAYER_BACK | SOLDERPASTE_LAYER_BACK) -#define ALL_TECH_LAYERS (FRONT_TECH_LAYERS | BACK_TECH_LAYERS) -#define BACK_LAYERS (LAYER_BACK | BACK_TECH_LAYERS) -#define FRONT_LAYERS (LAYER_FRONT | FRONT_TECH_LAYERS) - -#define ALL_USER_LAYERS (DRAW_LAYER | COMMENT_LAYER |\ - ECO1_LAYER | ECO2_LAYER ) - -#define NO_LAYERS 0x00000000 /** - * @return a one bit layer mask from a layer number - * @param aLayerNumber = the layer number to convert (0 .. LAYERS-1) + * Type LAYER_NUM + * can be replaced with int and removed. Until then, it is something you can increment, + * and its meaning is only advisory but can extend beyond PCB layers into view layers + * and gerber layers. */ -inline LAYER_MSK GetLayerMask( LAYER_NUM aLayerNumber ) -{ - return 1 << aLayerNumber; -} +typedef int LAYER_NUM; + /** - * @return bool if aLayerNumber is a layer contained in aMask - * @param aMask = a layer mask - * @param aLayerNumber is the layer id to test + * Enum LAYER_ID + * is the set of PCB layers. It has nothing to do with gerbers or view layers. + * One of these cannot be "incremented". */ -inline bool IsLayerInList( LAYER_MSK aMask, LAYER_NUM aLayerNumber ) +enum LAYER_ID +#if __cplusplus >= 201103L + : unsigned char +#endif { - return (aMask & GetLayerMask( aLayerNumber )) != 0; -} + F_Cu, // 0 + In1_Cu, + In2_Cu, + In3_Cu, + In4_Cu, + In5_Cu, + In6_Cu, + In7_Cu, + In8_Cu, + In9_Cu, + In10_Cu, + In11_Cu, + In12_Cu, + In13_Cu, + In14_Cu, + In15_Cu, + In16_Cu, + In17_Cu, + In18_Cu, + In19_Cu, + In20_Cu, + In21_Cu, + In22_Cu, + In23_Cu, + In24_Cu, + In25_Cu, + In26_Cu, + In27_Cu, + In28_Cu, + In29_Cu, + In30_Cu, + B_Cu, // 31 + + B_Adhes, // 32 + F_Adhes, + B_Paste, + F_Paste, + B_SilkS, + F_SilkS, + B_Mask, + F_Mask, + Dwgs_User, + Cmts_User, + Eco1_User, + Eco2_User, + Edge_Cuts, + Margin, + + F_CrtYd, // CrtYd & Body are footprint only + B_CrtYd, + F_Fab, + B_Fab, + + LAYER_ID_COUNT +}; + + +#define UNDEFINED_LAYER LAYER_ID(-1) +#define UNSELECTED_LAYER LAYER_ID(-2) + +#define MAX_CU_LAYERS (B_Cu - F_Cu + 1) + +/* These were moved to legacy_plugin.cpp, please don't ever use them + outside there. Now with the advent of class LSEQ, we don't iterate over + LAYER_ID any more, so therefore FIRST_COPPER_LAYER and LAST_COPPER_LAYER are + dead concepts. They in fact failed to do what they were intended to do because + they implied a particular sequence which in and of itself was subject to change + and actually did when we flipped the pretty and *.kicad_pcb copper layer stack. + LSEQ is the way to go, use it. It gives a level of manipulation between + LAYER_ID and iteration. +#define FIRST_COPPER_LAYER brain dead +#define LAST_COPPER_LAYER brain dead +#define FIRST_LAYER brain dead +#define NB_LAYERS use LAYER_ID_COUNT instead +#define NB_COPPER_LAYERS was always a max, not a number, use MAX_CU_COUNT now. +*/ + + +/// A sequence of layers, a sequence provides a certain order. +typedef std::vector BASE_SEQ; + + +/** + * Class LSEQ + * is a sequence (and therefore also a set) of LAYER_IDs. A sequence provides + * a certain order. + *

+ * It can also be used as an iterator: + * + * + * for( LSEQ cu_stack = aSet.CuStack(); cu_stack; ++cu_stack ) + * layer_id = *cu_stack; + * + * + */ +class LSEQ : public BASE_SEQ +{ + unsigned m_index; + +public: + + LSEQ() : + m_index( 0 ) + {} + + template + LSEQ( InputIterator start, InputIterator end ) : + BASE_SEQ( start, end ), + m_index( 0 ) + {} + + void Rewind() { m_index = 0; } + + void operator ++ () { ++m_index; } // returns nothing, used in simple statements only. + + void operator ++ (int) { ++m_index; } + + operator bool () { return m_index < size(); } + + LAYER_ID operator * () const + { + return at( m_index ); // throws std::out_of_range + } +}; + + +typedef std::bitset BASE_SET; + + +/** + * Class LSET + * is a set of LAYER_IDs. It can be converted to numerous purpose LSEQs using + * the various member functions, most of which are based on Seq(). The advantage + * of converting to LSEQ using purposeful code, is it removes any dependency + * on order/sequence inherent in this set. + */ +class LSET : public BASE_SET +{ +public: + + LSET() : + BASE_SET() + {} + + LSET( const BASE_SET& aOther ) : + BASE_SET( aOther ) + { + } + + /** + * Constructor LSET( LAYER_ID ) + * takes a LAYER_ID and sets that bit. + */ + LSET( int aLayer ) + { + set( aLayer ); + } + + /** + * Constructor LSET( const LAYER_ID* aArray, unsigned aCount ) + * works well with an arry or LSEQ. + */ + LSET( const LAYER_ID* aArray, unsigned aCount ); + + /** + * Constructor LSET( int, ...) + * takes a variable number of LAYER_IDs in the argument list to construct + * the set. + * @param aIdCount is the number of LAYER_IDs which follow. + */ + LSET( size_t aIdCount, ... ); + + /** + * Function Name + * returns the fixed name association with aLayerId. + */ + static const wxChar* Name( LAYER_ID aLayerId ); + + /** + * Function InternalCuMask() + * returns a complete set of internal copper layers, which is all Cu layers + * except F_Cu and B_Cu. + */ + static LSET InternalCuMask(); + + /** + * Function AllCuMask + * returns a mask holding the requested number of Cu LAYER_IDs. + */ + static LSET AllCuMask( int aCuLayerCount = MAX_CU_LAYERS ); + + /** + * Function AllNonCuMask + * returns a mask holding all layer minus CU layers. + */ + static LSET AllNonCuMask(); + + static LSET AllLayersMask(); + + static LSET FrontTechMask(); + static LSET BackTechMask(); + static LSET AllTechMask(); + + static LSET FrontMask(); + + static LSET BackMask(); + + static LSET UserMask(); + + + /** + * Function CuStack + * returns a sequence of copper layers in starting from the front/top + * and extending to the back/bottom. This specific sequence is depended upon + * in numerous places. + */ + LSEQ CuStack() const; + + /** + * Function Technicals + * returns a sequence of technical layers. A sequence provides a certain + * order. + * @param aSubToOmit is the subset of the techical layers to omit, defaults to none. + */ + LSEQ Technicals( LSET aSubToOmit = LSET() ) const; + + /// *_User layers. + LSEQ Users() const; + + LSEQ UIOrder() const; + + /** + * Function Seq + * returns an LSEQ from the union of this LSET and a desired sequence. The LSEQ + * element will be in the same sequence as aWishListSequence if they are present. + * @param aWishListSequence establishes the order of the returned LSEQ, and the LSEQ will only + * contiain LAYER_IDs which are present in this set. + * @param aCount is the length of aWishListSequence array. + */ + LSEQ Seq( const LAYER_ID* aWishListSequence, unsigned aCount ) const; + + /** + * Function Seq + * returns a LSEQ from this LSET in ascending LAYER_ID order. Each LSEQ + * element will be in the same sequence as in LAYER_ID and only present + * in the resultant LSEQ if present in this set. Therefore the sequence is + * subject to change, use it only when enumeration and not order is important. + */ + LSEQ Seq() const; + + /** + * Function SVG + * returns the sequence used to output an SVG plot. + LSEQ SVG() const; + put this in the needed source file using Seq() there. + */ + + /** + * Function FmtHex + * returns a hex string showing contents of this LSEQ. + */ + std::string FmtHex() const; + + /** + * Function ParseHex + * understands the output of FmtHex() and replaces this set's values + * with those given in the input string. Parsing stops at the first + * non hex ASCII byte, except that marker bytes output from FmtHex are + * not terminators. + * @return int - number of bytes consumed + */ + int ParseHex( const char* aStart, int aCount ); + + /** + * Function FmtBin + * returns a binary string showing contents of this LSEQ. + */ + std::string FmtBin() const; + + /** + * Find the first set LAYER_ID. Returns UNDEFINED_LAYER if more + * than one is set or UNSELECTED_LAYER if none is set. + */ + LAYER_ID ExtractLayer(); + +private: +}; + /** * @return bool if 2 layer masks have a comman layer * @param aMask1 = a layer mask * @param aMask2 = an other layer mask */ -inline bool IsLayerMasksIntersect( LAYER_MSK aMask1, LAYER_MSK aMask2 ) +inline bool IsLayerMasksIntersect( LSET aMask1, LSET aMask2 ) { - return (aMask1 & aMask2) != 0; + return (aMask1 & aMask2).any(); } -/** - * Count the number of set layers in the mask - */ -inline int LayerMaskCountSet( LAYER_MSK aMask ) -{ - int count = 0; - - for( LAYER_NUM i = FIRST_LAYER; i < NB_LAYERS; ++i ) - { - if( aMask & GetLayerMask( i ) ) - ++count; - } - return count; -} - - -// layers order in dialogs (plot, print and toolbars) -// in same order than in setup layers dialog -// (Front or Top to Back or Bottom) -#define DECLARE_LAYERS_ORDER_LIST(list) const LAYER_NUM list[NB_LAYERS] =\ -{ LAYER_N_FRONT,\ - LAYER_N_15, LAYER_N_14, LAYER_N_13, LAYER_N_12,\ - LAYER_N_11, LAYER_N_10, LAYER_N_9, LAYER_N_8,\ - LAYER_N_7, LAYER_N_6, LAYER_N_5, LAYER_N_4,\ - LAYER_N_3, LAYER_N_2,\ - LAYER_N_BACK,\ - ADHESIVE_N_FRONT , ADHESIVE_N_BACK,\ - SOLDERPASTE_N_FRONT, SOLDERPASTE_N_BACK,\ - SILKSCREEN_N_FRONT, SILKSCREEN_N_BACK,\ - SOLDERMASK_N_FRONT, SOLDERMASK_N_BACK,\ - DRAW_N,\ - COMMENT_N,\ - ECO1_N, ECO2_N,\ - EDGE_N,\ - UNUSED_LAYER_29, UNUSED_LAYER_30, UNUSED_LAYER_31\ -}; - /** * Enum PCB_VISIBLE @@ -253,12 +399,15 @@ enum PCB_VISIBLE END_PCB_VISIBLE_LIST // sentinel }; + /** * Enum NETNAMES_VISIBLE * is a set of layers specific for displaying net names. * Their visiblity is not supposed to be saved in a board file, * they are only to be used by the GAL. */ +#if 0 +// was: enum NETNAMES_VISIBLE { LAYER_1_NETNAMES_VISIBLE, // bottom layer @@ -284,26 +433,37 @@ enum NETNAMES_VISIBLE END_NETNAMES_VISIBLE_LIST // sentinel }; +#else +enum NETNAMES_VISIBLE +{ + PAD_FR_NETNAMES_VISIBLE = B_Cu+1, + PAD_BK_NETNAMES_VISIBLE, + PADS_NETNAMES_VISIBLE, + + END_NETNAMES_VISIBLE_LIST // sentinel +}; +#endif + /// macro for obtaining layer number for specific item (eg. pad or text) -#define ITEM_GAL_LAYER(layer) (NB_LAYERS + layer) +#define ITEM_GAL_LAYER(layer) (LAYER_ID_COUNT + layer) -#define NETNAMES_GAL_LAYER(layer) (NB_LAYERS + END_PCB_VISIBLE_LIST + layer ) +#define NETNAMES_GAL_LAYER(layer) (LAYER_ID_COUNT + END_PCB_VISIBLE_LIST + layer ) -/// number of *all* layers including PCB and item layers -#define TOTAL_LAYER_COUNT (NB_LAYERS + END_PCB_VISIBLE_LIST + END_NETNAMES_VISIBLE_LIST) +/// number of *all* GAL layers including PCB and item layers +#define TOTAL_LAYER_COUNT (LAYER_ID_COUNT + END_PCB_VISIBLE_LIST + END_NETNAMES_VISIBLE_LIST) /** * Function IsValidLayer * tests whether a given integer is a valid layer index, i.e. can - * be safely put in a LAYER_NUM - * @param aLayerIndex = Layer index to test. It can be an int, so its + * be safely put in a LAYER_ID + * @param aLayerId = Layer index to test. It can be an int, so its * useful during I/O * @return true if aLayerIndex is a valid layer index */ -inline bool IsValidLayer( int aLayerIndex ) +inline bool IsValidLayer( LAYER_NUM aLayerId ) { - return aLayerIndex >= FIRST_LAYER && aLayerIndex < NB_LAYERS; + return unsigned( aLayerId ) < LAYER_ID_COUNT; } /** @@ -314,41 +474,40 @@ inline bool IsValidLayer( int aLayerIndex ) */ inline bool IsPcbLayer( LAYER_NUM aLayer ) { - return aLayer >= FIRST_LAYER && aLayer < NB_PCB_LAYERS; + return aLayer >= F_Cu && aLayer < LAYER_ID_COUNT; } /** * Function IsCopperLayer * tests whether a layer is a copper layer - * @param aLayer = Layer to test + * @param aLayerId = Layer to test * @return true if aLayer is a valid copper layer */ -inline bool IsCopperLayer( LAYER_NUM aLayer ) +inline bool IsCopperLayer( LAYER_NUM aLayerId ) { - return aLayer >= FIRST_COPPER_LAYER - && aLayer <= LAST_COPPER_LAYER; + return aLayerId >= F_Cu && aLayerId <= B_Cu; } /** * Function IsNonCopperLayer * tests whether a layer is a non copper layer - * @param aLayer = Layer to test + * @param aLayerId = Layer to test * @return true if aLayer is a non copper layer */ -inline bool IsNonCopperLayer( LAYER_NUM aLayer ) +inline bool IsNonCopperLayer( LAYER_NUM aLayerId ) { - return aLayer >= FIRST_NON_COPPER_LAYER && aLayer <= LAST_NON_COPPER_LAYER; + return aLayerId > B_Cu && aLayerId <= LAYER_ID_COUNT; } /** * Function IsUserLayer * tests whether a layer is a non copper and a non tech layer - * @param aLayer = Layer to test + * @param aLayerId = Layer to test * @return true if aLayer is a user layer */ -inline bool IsUserLayer( LAYER_NUM aLayer ) +inline bool IsUserLayer( LAYER_ID aLayerId ) { - return aLayer >= FIRST_USER_LAYER && aLayer <= LAST_USER_LAYER; + return aLayerId >= Dwgs_User && aLayerId <= Eco2_User; } /* IMPORTANT: If a layer is not a front layer not necessarily is true @@ -364,58 +523,74 @@ inline bool IsUserLayer( LAYER_NUM aLayer ) /** * Layer classification: check if it's a front layer */ -inline bool IsFrontLayer( LAYER_NUM aLayer ) +inline bool IsFrontLayer( LAYER_ID aLayerId ) { - return ( aLayer == LAYER_N_FRONT || - aLayer == ADHESIVE_N_FRONT || - aLayer == SOLDERPASTE_N_FRONT || - aLayer == SILKSCREEN_N_FRONT || - aLayer == SOLDERPASTE_N_FRONT ); + switch( aLayerId ) + { + case F_Cu: + case F_Adhes: + case F_Paste: + case F_SilkS: + case F_Mask: + case F_CrtYd: + case F_Fab: + return true; + default: + ; + } + + return false; } + /** * Layer classification: check if it's a back layer */ -inline bool IsBackLayer( LAYER_NUM aLayer ) +inline bool IsBackLayer( LAYER_ID aLayerId ) { - return ( aLayer == LAYER_N_BACK || - aLayer == ADHESIVE_N_BACK || - aLayer == SOLDERPASTE_N_BACK || - aLayer == SILKSCREEN_N_BACK || - aLayer == SOLDERPASTE_N_BACK ); + switch( aLayerId ) + { + case B_Cu: + case B_Adhes: + case B_Paste: + case B_SilkS: + case B_Mask: + case B_CrtYd: + case B_Fab: + return true; + default: + ; + } + + return false; } + /** * Function FlippedLayerNumber * @return the layer number after flipping an item * some (not all) layers: external copper, Mask, Paste, and solder * are swapped between front and back sides */ -LAYER_NUM FlipLayer( LAYER_NUM oldlayer ); +LAYER_ID FlipLayer( LAYER_ID oldlayer ); /** * Calculate the mask layer when flipping a footprint * BACK and FRONT copper layers, mask, paste, solder layers are swapped */ -LAYER_MSK FlipLayerMask( LAYER_MSK aMask ); - -/** - * Extract the set layer from a mask. Returns UNDEFINED_LAYER if more - * than one is set or UNSELECTED_LAYER if none is - */ -LAYER_NUM ExtractLayer( LAYER_MSK aMask ); +LSET FlipLayerMask( LSET aMask ); /** * Return a string (to be shown to the user) describing a layer mask. * Useful for showing where is a pad, track, entity, etc. * The BOARD is needed because layer names are (somewhat) customizable */ -wxString LayerMaskDescribe( const BOARD *aBoard, LAYER_MSK aMask ); +wxString LayerMaskDescribe( const BOARD* aBoard, LSET aMask ); /** * Returns a netname layer corresponding to the given layer. */ -inline LAYER_NUM GetNetnameLayer( LAYER_NUM aLayer ) +inline int GetNetnameLayer( int aLayer ) { if( IsCopperLayer( aLayer ) ) return NETNAMES_GAL_LAYER( aLayer ); @@ -427,7 +602,7 @@ inline LAYER_NUM GetNetnameLayer( LAYER_NUM aLayer ) return NETNAMES_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ); // Fallback - return COMMENT_N; + return Cmts_User; } /** @@ -438,8 +613,8 @@ inline LAYER_NUM GetNetnameLayer( LAYER_NUM aLayer ) */ inline bool IsNetnameLayer( LAYER_NUM aLayer ) { - return aLayer >= NETNAMES_GAL_LAYER( LAYER_1_NETNAMES_VISIBLE ) && + return aLayer >= NETNAMES_GAL_LAYER( F_Cu ) && aLayer < NETNAMES_GAL_LAYER( END_NETNAMES_VISIBLE_LIST ); } -#endif // _LAYERS_ID_AND_VISIBILITY_H_ +#endif // LAYERS_ID_AND_VISIBILITY_H_ diff --git a/include/pcbcommon.h b/include/pcbcommon.h index cdec3783b5..2e18cc6bff 100644 --- a/include/pcbcommon.h +++ b/include/pcbcommon.h @@ -18,9 +18,6 @@ class TRACK; class BOARD; class DISPLAY_OPTIONS; -/// Look up Table for conversion copper layer count -> general copper layer mask: -extern LAYER_MSK g_TabAllCopperLayerMask[NB_COPPER_LAYERS]; - extern DISPLAY_OPTIONS DisplayOpt; extern int g_CurrentVersionPCB; diff --git a/include/view/view.h b/include/view/view.h index 2930af1844..1857664af9 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -507,7 +507,7 @@ public: */ void UpdateItems(); - const BOX2I CalculateExtents() ; + const BOX2I CalculateExtents() ; static const int VIEW_MAX_LAYERS = 128; ///< maximum number of layers that may be shown diff --git a/include/wxBasePcbFrame.h b/include/wxBasePcbFrame.h index 19d66214ac..908de4f4b4 100644 --- a/include/wxBasePcbFrame.h +++ b/include/wxBasePcbFrame.h @@ -606,16 +606,16 @@ public: * @param aDlgPosition = position of dialog ( defualt = centered) * @return the selected layer id */ - LAYER_NUM SelectLayer( LAYER_NUM aDefaultLayer, - LAYER_MSK aNotAllowedLayersMask = 0, - wxPoint aDlgPosition = wxDefaultPosition ); + LAYER_ID SelectLayer( LAYER_ID aDefaultLayer, + LSET aNotAllowedLayersMask = 0, + wxPoint aDlgPosition = wxDefaultPosition ); /* Display a list of two copper layers to choose a pair of copper layers * the layer pair is used to fast switch between copper layers when placing vias */ void SelectCopperLayerPair(); - virtual void SwitchLayer( wxDC* DC, LAYER_NUM layer ); + virtual void SwitchLayer( wxDC* DC, LAYER_ID layer ); void LoadSettings( wxConfigBase* aCfg ); // override virtual void SaveSettings( wxConfigBase* aCfg ); // override virtual diff --git a/include/wxEeschemaStruct.h b/include/wxEeschemaStruct.h index 34d8dc8555..c8961f697b 100644 --- a/include/wxEeschemaStruct.h +++ b/include/wxEeschemaStruct.h @@ -1257,7 +1257,7 @@ public: * @param aPrintMirrorMode = not used here (Set when printing in mirror mode) * @param aData = a pointer on an auxiliary data (not always used, NULL if not used) */ - virtual void PrintPage( wxDC* aDC, LAYER_MSK aPrintMask, + virtual void PrintPage( wxDC* aDC, LSET aPrintMask, bool aPrintMirrorMode, void* aData = NULL ); void SetSimulatorCommand( const wxString& aCommand ) { m_simulatorCommand = aCommand; } diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index b9321922a8..6acdb810cc 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -283,8 +283,8 @@ public: * @param aPrintMirrorMode = true to plot mirrored * @param aData = a pointer on an auxiliary data (NULL if not used) */ - virtual void PrintPage( wxDC* aDC, LAYER_MSK aPrintMaskLayer, bool aPrintMirrorMode, - void * aData = NULL ); + virtual void PrintPage( wxDC* aDC, LSET aPrintMaskLayer, bool aPrintMirrorMode, + void* aData = NULL ); void GetKicadAbout( wxCommandEvent& event ); @@ -535,26 +535,26 @@ public: * Function SetHighContrastLayer * takes care of display settings for the given layer to be displayed in high contrast mode. */ - void SetHighContrastLayer( LAYER_NUM aLayer ); + void SetHighContrastLayer( LAYER_ID aLayer ); /** * Function SetTopLayer * moves the selected layer to the top, so it is displayed above all others. */ - void SetTopLayer( LAYER_NUM aLayer ); + void SetTopLayer( LAYER_ID aLayer ); /** * Function SetActiveLayer * will change the currently active layer to \a aLayer and also * update the PCB_LAYER_WIDGET. */ - void SetActiveLayer( LAYER_NUM aLayer, bool doLayerWidgetUpdate = true ); + void SetActiveLayer( LAYER_ID aLayer, bool doLayerWidgetUpdate = true ); /** * Function GetActiveLayer * returns the active layer */ - LAYER_NUM GetActiveLayer() const + LAYER_ID GetActiveLayer() const { return ( (PCB_SCREEN*) GetScreen() )->m_Active_Layer; } @@ -784,8 +784,6 @@ public: void InstallDisplayOptionsDialog( wxCommandEvent& aEvent ); void InstallPcbGlobalDeleteFrame( const wxPoint& pos ); - void InstallDialogLayerSetup(); - /** * Function GenFootprintsPositionFile * Calls DoGenFootprintsPositionFile to create a footprint position file @@ -1263,7 +1261,7 @@ public: bool MergeCollinearTracks( TRACK* track, wxDC* DC, int end ); void Start_DragTrackSegmentAndKeepSlope( TRACK* track, wxDC* DC ); - void SwitchLayer( wxDC* DC, LAYER_NUM layer ); + void SwitchLayer( wxDC* DC, LAYER_ID layer ); /** * Function Add45DegreeSegment @@ -1463,7 +1461,7 @@ public: DRAWSEGMENT* Begin_DrawSegment( DRAWSEGMENT* Segment, STROKE_T shape, wxDC* DC ); void End_Edge( DRAWSEGMENT* Segment, wxDC* DC ); void Delete_Segment_Edge( DRAWSEGMENT* Segment, wxDC* DC ); - void Delete_Drawings_All_Layer( LAYER_NUM aLayer ); + void Delete_Drawings_All_Layer( LAYER_ID aLayer ); // Dimension handling: void ShowDimensionPropertyDialog( DIMENSION* aDimension, wxDC* aDC ); diff --git a/pagelayout_editor/pl_editor_frame.cpp b/pagelayout_editor/pl_editor_frame.cpp index ab91849c82..de63f4097d 100644 --- a/pagelayout_editor/pl_editor_frame.cpp +++ b/pagelayout_editor/pl_editor_frame.cpp @@ -496,7 +496,7 @@ void PL_EDITOR_FRAME::UpdateStatusBar() // Display units } -void PL_EDITOR_FRAME::PrintPage( wxDC* aDC, LAYER_MSK aPrintMasklayer, +void PL_EDITOR_FRAME::PrintPage( wxDC* aDC, LSET aPrintMasklayer, bool aPrintMirrorMode, void * aData ) { GetScreen()-> m_ScreenNumber = GetPageNumberOption() ? 1 : 2; diff --git a/pagelayout_editor/pl_editor_frame.h b/pagelayout_editor/pl_editor_frame.h index e675cb9c9b..b2c86792e0 100644 --- a/pagelayout_editor/pl_editor_frame.h +++ b/pagelayout_editor/pl_editor_frame.h @@ -263,7 +263,7 @@ public: * @param aPrintMirrorMode = not used here (Set when printing in mirror mode) * @param aData = a pointer on an auxiliary data (not always used, NULL if not used) */ - virtual void PrintPage( wxDC* aDC, LAYER_MSK aPrintMasklayer, + virtual void PrintPage( wxDC* aDC, LSET aPrintMasklayer, bool aPrintMirrorMode, void * aData ); void OnFileHistory( wxCommandEvent& event ); diff --git a/pcbnew/autorouter/auto_place_footprints.cpp b/pcbnew/autorouter/auto_place_footprints.cpp index a49ccd1b2c..f14a2385f9 100644 --- a/pcbnew/autorouter/auto_place_footprints.cpp +++ b/pcbnew/autorouter/auto_place_footprints.cpp @@ -122,7 +122,7 @@ static void drawPlacementRoutingMatrix( BOARD* aBrd, wxDC* DC ); static int TstModuleOnBoard( BOARD* Pcb, MODULE* Module, bool TstOtherSide ); static void CreateKeepOutRectangle( int ux0, int uy0, int ux1, int uy1, - int marge, int aKeepOut, int aLayerMask ); + int marge, int aKeepOut, LSET aLayerMask ); static MODULE* PickModule( PCB_EDIT_FRAME* pcbframe, wxDC* DC ); static int propagate(); @@ -133,7 +133,7 @@ void PCB_EDIT_FRAME::AutoPlaceModule( MODULE* Module, int place_mode, wxDC* DC ) wxPoint PosOK; wxPoint memopos; int error; - LAYER_NUM lay_tmp_TOP, lay_tmp_BOTTOM; + LAYER_ID lay_tmp_TOP, lay_tmp_BOTTOM; // Undo: init list PICKED_ITEMS_LIST newList; @@ -488,12 +488,12 @@ int genPlacementRoutingMatrix( BOARD* aBrd, EDA_MSG_PANEL* messagePanel ) msg.Printf( wxT( "%d" ), RoutingMatrix.m_MemSize / 1024 ); messagePanel->SetMessage( 24, wxT( "Mem(Kb)" ), msg, CYAN ); - g_Route_Layer_BOTTOM = LAYER_N_FRONT; + g_Route_Layer_BOTTOM = F_Cu; if( RoutingMatrix.m_RoutingLayersCount > 1 ) - g_Route_Layer_BOTTOM = LAYER_N_BACK; + g_Route_Layer_BOTTOM = B_Cu; - g_Route_Layer_TOP = LAYER_N_FRONT; + g_Route_Layer_TOP = F_Cu; // Place the edge layer segments TRACK TmpSegm( NULL ); @@ -513,7 +513,7 @@ int genPlacementRoutingMatrix( BOARD* aBrd, EDA_MSG_PANEL* messagePanel ) case PCB_LINE_T: DrawSegm = (DRAWSEGMENT*) PtStruct; - if( DrawSegm->GetLayer() != EDGE_N ) + if( DrawSegm->GetLayer() != Edge_Cuts ) break; TraceSegmentPcb( DrawSegm, HOLE | CELL_is_EDGE, @@ -550,7 +550,7 @@ int genPlacementRoutingMatrix( BOARD* aBrd, EDA_MSG_PANEL* messagePanel ) void genModuleOnRoutingMatrix( MODULE* Module ) { int ox, oy, fx, fy; - int layerMask; + LSET layerMask; D_PAD* Pad; EDA_RECT fpBBox = Module->GetBoundingBox(); @@ -585,13 +585,11 @@ void genModuleOnRoutingMatrix( MODULE* Module ) if( fy > RoutingMatrix.m_BrdBox.GetBottom() ) fy = RoutingMatrix.m_BrdBox.GetBottom(); - layerMask = 0; + if( Module->GetLayer() == F_Cu ) + layerMask.set( F_Cu ); - if( Module->GetLayer() == LAYER_N_FRONT ) - layerMask = LAYER_FRONT; - - if( Module->GetLayer() == LAYER_N_BACK ) - layerMask = LAYER_BACK; + if( Module->GetLayer() == B_Cu ) + layerMask.set( B_Cu ); TraceFilledRectangle( ox, oy, fx, fy, layerMask, CELL_is_MODULE, WRITE_OR_CELL ); @@ -666,15 +664,11 @@ int getOptimalModulePlacement( PCB_EDIT_FRAME* aFrame, MODULE* aModule, wxDC* aD if( RoutingMatrix.m_RoutingLayersCount > 1 ) { - D_PAD* Pad; - int otherLayerMask = LAYER_BACK; + LSET other( aModule->GetLayer() == B_Cu ? F_Cu : B_Cu ); - if( aModule->GetLayer() == LAYER_N_BACK ) - otherLayerMask = LAYER_FRONT; - - for( Pad = aModule->Pads(); Pad != NULL; Pad = Pad->Next() ) + for( D_PAD* pad = aModule->Pads(); pad; pad = pad->Next() ) { - if( ( Pad->GetLayerMask() & otherLayerMask ) == 0 ) + if( !( pad->GetLayerSet() & other ).any() ) continue; TstOtherSide = true; @@ -875,7 +869,7 @@ int TstModuleOnBoard( BOARD* Pcb, MODULE* aModule, bool TstOtherSide ) int side = TOP; int otherside = BOTTOM; - if( aModule->GetLayer() == LAYER_N_BACK ) + if( aModule->GetLayer() == B_Cu ) { side = BOTTOM; otherside = TOP; } @@ -966,7 +960,7 @@ double compute_Ratsnest_PlaceModule( BOARD* aBrd ) * Therefore the cost is high in rect x0,y0 to x1,y1, and decrease outside this rectangle */ void CreateKeepOutRectangle( int ux0, int uy0, int ux1, int uy1, - int marge, int aKeepOut, int aLayerMask ) + int marge, int aKeepOut, LSET aLayerMask ) { int row, col; int row_min, row_max, col_min, col_max, pmarge; @@ -974,10 +968,10 @@ void CreateKeepOutRectangle( int ux0, int uy0, int ux1, int uy1, DIST_CELL data, LocalKeepOut; int lgain, cgain; - if( aLayerMask & GetLayerMask( g_Route_Layer_BOTTOM ) ) + if( aLayerMask[g_Route_Layer_BOTTOM] ) trace = 1; // Trace on bottom layer. - if( ( aLayerMask & GetLayerMask( g_Route_Layer_TOP ) ) && RoutingMatrix.m_RoutingLayersCount ) + if( aLayerMask[g_Route_Layer_TOP] && RoutingMatrix.m_RoutingLayersCount ) trace |= 2; // Trace on top layer. if( trace == 0 ) diff --git a/pcbnew/autorouter/autorout.cpp b/pcbnew/autorouter/autorout.cpp index 88f2e12e6e..cc3c4720d2 100644 --- a/pcbnew/autorouter/autorout.cpp +++ b/pcbnew/autorouter/autorout.cpp @@ -66,7 +66,7 @@ void PCB_EDIT_FRAME::Autoroute( wxDC* DC, int mode ) } else { - g_Route_Layer_TOP = g_Route_Layer_BOTTOM = LAYER_N_BACK; + g_Route_Layer_TOP = g_Route_Layer_BOTTOM = B_Cu; } switch( mode ) diff --git a/pcbnew/autorouter/autorout.h b/pcbnew/autorouter/autorout.h index b284b63ab8..02d004c4ab 100644 --- a/pcbnew/autorouter/autorout.h +++ b/pcbnew/autorouter/autorout.h @@ -206,12 +206,12 @@ void TraceSegmentPcb( DRAWSEGMENT* pt_segm, int type, int marge, int op_logic ); * op_logic = WRITE_CELL, WRITE_OR_CELL, WRITE_XOR_CELL, WRITE_AND_CELL */ void TraceFilledRectangle( int ux0, int uy0, int ux1, int uy1, - int side, int color, int op_logic); + LSET side, int color, int op_logic); /* Same as above, but the rectangle is inclined angle angle. */ void TraceFilledRectangle( int ux0, int uy0, int ux1, int uy1, - double angle, LAYER_MSK masque_layer, + double angle, LSET masque_layer, int color, int op_logic ); /* QUEUE.CPP */ diff --git a/pcbnew/autorouter/graphpcb.cpp b/pcbnew/autorouter/graphpcb.cpp index 54b94a01f7..15e9d2f94a 100644 --- a/pcbnew/autorouter/graphpcb.cpp +++ b/pcbnew/autorouter/graphpcb.cpp @@ -59,7 +59,7 @@ static void DrawSegmentQcq( int ux0, int uy0, int op_logic ); static void TraceFilledCircle( int cx, int cy, int radius, - LAYER_MSK aLayerMask, + LSET aLayerMask, int color, int op_logic ); @@ -96,7 +96,7 @@ void PlacePad( D_PAD* aPad, int color, int marge, int op_logic ) if( aPad->GetShape() == PAD_CIRCLE ) { TraceFilledCircle( shape_pos.x, shape_pos.y, dx, - aPad->GetLayerMask(), color, op_logic ); + aPad->GetLayerSet(), color, op_logic ); return; } @@ -120,14 +120,14 @@ void PlacePad( D_PAD* aPad, int color, int marge, int op_logic ) TraceFilledRectangle( shape_pos.x - dx, shape_pos.y - dy, shape_pos.x + dx, shape_pos.y + dy, - aPad->GetLayerMask(), color, op_logic ); + aPad->GetLayerSet(), color, op_logic ); } else { TraceFilledRectangle( shape_pos.x - dx, shape_pos.y - dy, shape_pos.x + dx, shape_pos.y + dy, aPad->GetOrientation(), - aPad->GetLayerMask(), color, op_logic ); + aPad->GetLayerSet(), color, op_logic ); } } @@ -140,10 +140,8 @@ void PlacePad( D_PAD* aPad, int color, int marge, int op_logic ) * color: mask write in cells * op_logic: type of writing in the cell (WRITE, OR) */ -void TraceFilledCircle( int cx, int cy, int radius, - LAYER_MSK aLayerMask, - int color, - int op_logic ) +void TraceFilledCircle( int cx, int cy, int radius, + LSET aLayerMask, int color, int op_logic ) { int row, col; int ux0, uy0, ux1, uy1; @@ -153,10 +151,10 @@ void TraceFilledCircle( int cx, int cy, int radius, int tstwrite = 0; int distmin; - if( aLayerMask & GetLayerMask( g_Route_Layer_BOTTOM ) ) + if( aLayerMask[g_Route_Layer_BOTTOM] ) trace = 1; // Trace on BOTTOM - if( aLayerMask & GetLayerMask( g_Route_Layer_TOP ) ) + if( aLayerMask[g_Route_Layer_TOP] ) if( RoutingMatrix.m_RoutingLayersCount > 1 ) trace |= 2; // Trace on TOP @@ -297,23 +295,23 @@ void TraceSegmentPcb( TRACK* aTrack, int color, int marge, int op_logic ) // Test if VIA (filled circle need to be drawn) if( aTrack->Type() == PCB_VIA_T ) { - LAYER_MSK layer_mask = NO_LAYERS; + LSET layer_mask; if( aTrack->IsOnLayer( g_Route_Layer_BOTTOM ) ) - layer_mask = GetLayerMask( g_Route_Layer_BOTTOM ); + layer_mask.set( g_Route_Layer_BOTTOM ); if( aTrack->IsOnLayer( g_Route_Layer_TOP ) ) { - if( layer_mask == 0 ) - layer_mask = GetLayerMask( g_Route_Layer_TOP ); + if( !layer_mask.any() ) + layer_mask = LSET( g_Route_Layer_TOP ); else - layer_mask = FULL_LAYERS; + layer_mask.set(); } if( color == VIA_IMPOSSIBLE ) - layer_mask = FULL_LAYERS; + layer_mask.set(); - if( layer_mask ) + if( layer_mask.any() ) TraceFilledCircle( aTrack->GetStart().x, aTrack->GetStart().y, half_width, layer_mask, color, op_logic ); } @@ -326,7 +324,7 @@ void TraceSegmentPcb( TRACK* aTrack, int color, int marge, int op_logic ) int uy1 = aTrack->GetEnd().y - RoutingMatrix.GetBrdCoordOrigin().y; // Ordinary track - LAYER_NUM layer = aTrack->GetLayer(); + LAYER_ID layer = aTrack->GetLayer(); if( color == VIA_IMPOSSIBLE ) layer = UNDEFINED_LAYER; @@ -478,17 +476,16 @@ void TracePcbLine( int x0, int y0, int x1, int y1, LAYER_NUM layer, int color, i void TraceFilledRectangle( int ux0, int uy0, int ux1, int uy1, - int aLayerMask, int color, int op_logic ) + LSET aLayerMask, int color, int op_logic ) { int row, col; int row_min, row_max, col_min, col_max; int trace = 0; - if( ( aLayerMask & GetLayerMask( g_Route_Layer_BOTTOM ) ) ) + if( aLayerMask[g_Route_Layer_BOTTOM] ) trace = 1; // Trace on BOTTOM - if( ( aLayerMask & GetLayerMask( g_Route_Layer_TOP ) ) && - RoutingMatrix.m_RoutingLayersCount > 1 ) + if( aLayerMask[g_Route_Layer_TOP] && RoutingMatrix.m_RoutingLayersCount > 1 ) trace |= 2; // Trace on TOP if( trace == 0 ) @@ -541,7 +538,7 @@ void TraceFilledRectangle( int ux0, int uy0, int ux1, int uy1, void TraceFilledRectangle( int ux0, int uy0, int ux1, int uy1, - double angle, LAYER_MSK aLayerMask, int color, int op_logic ) + double angle, LSET aLayerMask, int color, int op_logic ) { int row, col; int cx, cy; // Center of rectangle @@ -550,10 +547,10 @@ void TraceFilledRectangle( int ux0, int uy0, int ux1, int uy1, int rotrow, rotcol; int trace = 0; - if( aLayerMask & GetLayerMask( g_Route_Layer_BOTTOM ) ) + if( aLayerMask[g_Route_Layer_BOTTOM] ) trace = 1; // Trace on BOTTOM - if( aLayerMask & GetLayerMask( g_Route_Layer_TOP ) ) + if( aLayerMask[g_Route_Layer_TOP] ) { if( RoutingMatrix.m_RoutingLayersCount > 1 ) trace |= 2; // Trace on TOP diff --git a/pcbnew/autorouter/routing_matrix.cpp b/pcbnew/autorouter/routing_matrix.cpp index 8c9e3b2cbd..7875afb13c 100644 --- a/pcbnew/autorouter/routing_matrix.cpp +++ b/pcbnew/autorouter/routing_matrix.cpp @@ -115,7 +115,7 @@ int MATRIX_ROUTING_HEAD::InitRoutingMatrix() m_DistSide[side] = NULL; m_DirSide[side] = NULL; - /* allocate matrix & initialize everything to empty */ + // allocate matrix & initialize everything to empty m_BoardSide[side] = (MATRIX_CELL*) operator new( ii * sizeof(MATRIX_CELL) ); memset( m_BoardSide[side], 0, ii * sizeof(MATRIX_CELL) ); @@ -196,16 +196,16 @@ void MATRIX_ROUTING_HEAD::UnInitRoutingMatrix() */ void PlaceCells( BOARD* aPcb, int net_code, int flag ) { - int ux0 = 0, uy0 = 0, ux1, uy1, dx, dy; - int marge, via_marge; - LAYER_MSK layerMask; + int ux0 = 0, uy0 = 0, ux1, uy1, dx, dy; + int marge, via_marge; + LSET layerMask; // use the default NETCLASS? NETCLASSPTR nc = aPcb->GetDesignSettings().GetDefault(); - int trackWidth = nc->GetTrackWidth(); - int clearance = nc->GetClearance(); - int viaSize = nc->GetViaDiameter(); + int trackWidth = nc->GetTrackWidth(); + int clearance = nc->GetClearance(); + int viaSize = nc->GetViaDiameter(); marge = clearance + (trackWidth / 2); via_marge = clearance + (viaSize / 2); @@ -237,7 +237,7 @@ void PlaceCells( BOARD* aPcb, int net_code, int flag ) EDGE_MODULE* edge = (EDGE_MODULE*) item; EDGE_MODULE tmpEdge( *edge ); - if( tmpEdge.GetLayer() == EDGE_N ) + if( tmpEdge.GetLayer() == Edge_Cuts ) tmpEdge.SetLayer( UNDEFINED_LAYER ); TraceSegmentPcb( &tmpEdge, HOLE, marge, WRITE_CELL ); @@ -257,66 +257,65 @@ void PlaceCells( BOARD* aPcb, int net_code, int flag ) switch( item->Type() ) { case PCB_LINE_T: - { - DRAWSEGMENT* DrawSegm; - - int type_cell = HOLE; - DrawSegm = (DRAWSEGMENT*) item; - DRAWSEGMENT tmpSegm( DrawSegm ); - - if( DrawSegm->GetLayer() == EDGE_N ) { - tmpSegm.SetLayer( UNDEFINED_LAYER ); - type_cell |= CELL_is_EDGE; - } + DRAWSEGMENT* DrawSegm; - TraceSegmentPcb( &tmpSegm, type_cell, marge, WRITE_CELL ); - } - break; + int type_cell = HOLE; + DrawSegm = (DRAWSEGMENT*) item; + DRAWSEGMENT tmpSegm( DrawSegm ); + + if( DrawSegm->GetLayer() == Edge_Cuts ) + { + tmpSegm.SetLayer( UNDEFINED_LAYER ); + type_cell |= CELL_is_EDGE; + } + + TraceSegmentPcb( &tmpSegm, type_cell, marge, WRITE_CELL ); + } + break; case PCB_TEXT_T: - { - TEXTE_PCB* PtText; - PtText = (TEXTE_PCB*) item; + { + TEXTE_PCB* PtText = (TEXTE_PCB*) item; - if( PtText->GetText().Length() == 0 ) - break; + if( PtText->GetText().Length() == 0 ) + break; - EDA_RECT textbox = PtText->GetTextBox( -1 ); - ux0 = textbox.GetX(); - uy0 = textbox.GetY(); - dx = textbox.GetWidth(); - dy = textbox.GetHeight(); + EDA_RECT textbox = PtText->GetTextBox( -1 ); + ux0 = textbox.GetX(); + uy0 = textbox.GetY(); + dx = textbox.GetWidth(); + dy = textbox.GetHeight(); - /* Put bounding box (rectangle) on matrix */ - dx /= 2; - dy /= 2; + // Put bounding box (rectangle) on matrix + dx /= 2; + dy /= 2; - ux1 = ux0 + dx; - uy1 = uy0 + dy; + ux1 = ux0 + dx; + uy1 = uy0 + dy; - ux0 -= dx; - uy0 -= dy; + ux0 -= dx; + uy0 -= dy; - layerMask = GetLayerMask( PtText->GetLayer() ); + layerMask = LSET( PtText->GetLayer() ); - TraceFilledRectangle( ux0 - marge, uy0 - marge, ux1 + marge, - uy1 + marge, PtText->GetOrientation(), - layerMask, HOLE, WRITE_CELL ); + TraceFilledRectangle( ux0 - marge, uy0 - marge, ux1 + marge, + uy1 + marge, PtText->GetOrientation(), + layerMask, HOLE, WRITE_CELL ); - TraceFilledRectangle( ux0 - via_marge, uy0 - via_marge, - ux1 + via_marge, uy1 + via_marge, - PtText->GetOrientation(), - layerMask, VIA_IMPOSSIBLE, WRITE_OR_CELL ); - } - break; + TraceFilledRectangle( ux0 - via_marge, uy0 - via_marge, + ux1 + via_marge, uy1 + via_marge, + PtText->GetOrientation(), + layerMask, VIA_IMPOSSIBLE, WRITE_OR_CELL ); + } + break; default: break; } } - /* Put tracks and vias on matrix */ + // Put tracks and vias on matrix for( TRACK* track = aPcb->m_Track; track; track = track->Next() ) { if( net_code == track->GetNetCode() ) @@ -337,7 +336,7 @@ int Build_Work( BOARD* Pcb ) int demi_pas = RoutingMatrix.m_GridRouting / 2; wxString msg; - InitWork(); /* clear work list */ + InitWork(); // clear work list int cellCount = 0; for( unsigned ii = 0; ii < Pcb->GetRatsnestsCount(); ii++ ) @@ -509,8 +508,8 @@ void MATRIX_ROUTING_HEAD::AddCell( int aRow, int aCol, int aSide, MATRIX_CELL x } -/* fetch distance cell */ -DIST_CELL MATRIX_ROUTING_HEAD::GetDist( int aRow, int aCol, int aSide ) /* fetch distance cell */ +// fetch distance cell +DIST_CELL MATRIX_ROUTING_HEAD::GetDist( int aRow, int aCol, int aSide ) // fetch distance cell { DIST_CELL* p; @@ -519,7 +518,7 @@ DIST_CELL MATRIX_ROUTING_HEAD::GetDist( int aRow, int aCol, int aSide ) /* fetch } -/* store distance cell */ +// store distance cell void MATRIX_ROUTING_HEAD::SetDist( int aRow, int aCol, int aSide, DIST_CELL x ) { DIST_CELL* p; @@ -529,7 +528,7 @@ void MATRIX_ROUTING_HEAD::SetDist( int aRow, int aCol, int aSide, DIST_CELL x ) } -/* fetch direction cell */ +// fetch direction cell int MATRIX_ROUTING_HEAD::GetDir( int aRow, int aCol, int aSide ) { DIR_CELL* p; @@ -539,7 +538,7 @@ int MATRIX_ROUTING_HEAD::GetDir( int aRow, int aCol, int aSide ) } -/* store direction cell */ +// store direction cell void MATRIX_ROUTING_HEAD::SetDir( int aRow, int aCol, int aSide, int x ) { DIR_CELL* p; diff --git a/pcbnew/autorouter/solve.cpp b/pcbnew/autorouter/solve.cpp index 0e0120c458..a88395e189 100644 --- a/pcbnew/autorouter/solve.cpp +++ b/pcbnew/autorouter/solve.cpp @@ -86,10 +86,10 @@ static int s_Clearance; // Clearance value used in autorouter static PICKED_ITEMS_LIST s_ItemsListPicker; -int OpenNodes; /* total number of nodes opened */ -int ClosNodes; /* total number of nodes closed */ -int MoveNodes; /* total number of nodes moved */ -int MaxNodes; /* maximum number of nodes opened at one time */ +int OpenNodes; // total number of nodes opened +int ClosNodes; // total number of nodes closed +int MoveNodes; // total number of nodes moved +int MaxNodes; // maximum number of nodes opened at one time #define NOSUCCESS 0 #define STOP_FROM_ESC -1 @@ -115,25 +115,25 @@ int MaxNodes; /* maximum number of nodes opened at one time */ */ static const int delta[8][2] = { - { 1, -1 }, /* northwest */ - { 1, 0 }, /* north */ - { 1, 1 }, /* northeast */ - { 0, -1 }, /* west */ - { 0, 1 }, /* east */ - { -1, -1 }, /* southwest */ - { -1, 0 }, /* south */ - { -1, 1 } /* southeast */ + { 1, -1 }, // northwest + { 1, 0 }, // north + { 1, 1 }, // northeast + { 0, -1 }, // west + { 0, 1 }, // east + { -1, -1 }, // southwest + { -1, 0 }, // south + { -1, 1 } // southeast }; static const int ndir[8] = { - /* for building paths back to source */ + // for building paths back to source FROM_SOUTHEAST, FROM_SOUTH, FROM_SOUTHWEST, FROM_EAST, FROM_WEST, FROM_NORTHEAST, FROM_NORTH, FROM_NORTHWEST }; -/* blocking masks for neighboring cells */ +// blocking masks for neighboring cells #define BLOCK_NORTHEAST ( DIAG_NEtoSW | BENT_StoNE | BENT_WtoNE \ | ANGLE_NEtoSE | ANGLE_NWtoNE \ | SHARP_NtoNE | SHARP_EtoNE | HOLE ) @@ -187,7 +187,7 @@ struct block long b2; }; -/* blocking masks for diagonal traces */ +// blocking masks for diagonal traces static struct block blocking[8] = { { 0, -1, @@ -230,7 +230,7 @@ static struct block blocking[8] = BLOCK_SOUTHWEST } }; -/* mask for hole-related blocking effects */ +// mask for hole-related blocking effects static struct { long trace; @@ -249,7 +249,7 @@ static struct static long newmask[8] = { - /* patterns to mask out in neighbor cells */ + // patterns to mask out in neighbor cells 0, CORNER_NORTHWEST | CORNER_NORTHEAST, 0, @@ -285,7 +285,7 @@ int PCB_EDIT_FRAME::Solve( wxDC* DC, int aLayersCount ) // Prepare the undo command info s_ItemsListPicker.ClearListAndDeleteItems(); // Should not be necessary, but... - /* go until no more work to do */ + // go until no more work to do GetWork( &row_source, &col_source, ¤t_net_code, &row_target, &col_target, &pt_cur_ch ); // First net to route. @@ -294,7 +294,7 @@ int PCB_EDIT_FRAME::Solve( wxDC* DC, int aLayersCount ) &col_target, &pt_cur_ch ) ) { - /* Test to stop routing ( escape key pressed ) */ + // Test to stop routing ( escape key pressed ) wxYield(); if( m_canvas->GetAbortRequest() ) @@ -329,7 +329,7 @@ int PCB_EDIT_FRAME::Solve( wxDC* DC, int aLayersCount ) segm_fX = GetBoard()->GetBoundingBox().GetX() + (RoutingMatrix.m_GridRouting * col_target); segm_fY = GetBoard()->GetBoundingBox().GetY() + (RoutingMatrix.m_GridRouting * row_target); - /* Draw segment. */ + // Draw segment. GRLine( m_canvas->GetClipBox(), DC, segm_oX, segm_oY, segm_fX, segm_fY, 0, WHITE ); @@ -367,7 +367,7 @@ int PCB_EDIT_FRAME::Solve( wxDC* DC, int aLayersCount ) msg.Printf( wxT( " %d" ), GetBoard()->GetUnconnectedNetCount() ); AppendMsgPanel( wxT( "Not Connected" ), msg, CYAN ); - /* Delete routing from display. */ + // Delete routing from display. pt_cur_ch->m_PadStart->Draw( m_canvas, DC, GR_AND ); pt_cur_ch->m_PadEnd->Draw( m_canvas, DC, GR_AND ); @@ -413,16 +413,23 @@ static int Autoroute_One_Track( PCB_EDIT_FRAME* pcbframe, int newdist, olddir, _self; int current_net_code; int marge; - int padLayerMaskStart; /* Mask layers belonging to the starting pad. */ - int padLayerMaskEnd; /* Mask layers belonging to the ending pad. */ - int topLayerMask = GetLayerMask( g_Route_Layer_TOP ); - int bottomLayerMask = GetLayerMask( g_Route_Layer_BOTTOM ); - int routeLayerMask; /* Mask two layers for routing. */ - int tab_mask[2]; /* Enables the calculation of the mask layer being - * tested. (side = TOP or BOTTOM) */ + LSET padLayerMaskStart; // Mask layers belonging to the starting pad. + LSET padLayerMaskEnd; // Mask layers belonging to the ending pad. + + LSET topLayerMask( g_Route_Layer_TOP ); + + LSET bottomLayerMask( g_Route_Layer_BOTTOM ); + + LSET routeLayerMask; // Mask two layers for routing. + + LSET tab_mask[2]; // Enables the calculation of the mask layer being + // tested. (side = TOP or BOTTOM) int start_mask_layer = 0; wxString msg; + // @todo this could be a bottle neck + LSET all_cu = LSET::AllCuMask( pcbframe->GetBoard()->GetCopperLayerCount() ); + wxBusyCursor dummy_cursor; // Set an hourglass cursor while routing a // track @@ -430,7 +437,7 @@ static int Autoroute_One_Track( PCB_EDIT_FRAME* pcbframe, marge = s_Clearance + ( pcbframe->GetDesignSettings().GetCurrentTrackWidth() / 2 ); - /* clear direction flags */ + // clear direction flags i = RoutingMatrix.m_Nrows * RoutingMatrix.m_Ncols * sizeof(DIR_CELL); if( two_sides ) @@ -439,20 +446,20 @@ static int Autoroute_One_Track( PCB_EDIT_FRAME* pcbframe, lastopen = lastclos = lastmove = 0; - /* Set tab_masque[side] for final test of routing. */ + // Set tab_masque[side] for final test of routing. if( two_sides ) - tab_mask[TOP] = topLayerMask; + tab_mask[TOP] = topLayerMask; tab_mask[BOTTOM] = bottomLayerMask; - /* Set active layers mask. */ + // Set active layers mask. routeLayerMask = topLayerMask | bottomLayerMask; pt_cur_ch = pt_rat; current_net_code = pt_rat->GetNet(); - padLayerMaskStart = pt_cur_ch->m_PadStart->GetLayerMask(); + padLayerMaskStart = pt_cur_ch->m_PadStart->GetLayerSet(); - padLayerMaskEnd = pt_cur_ch->m_PadEnd->GetLayerMask(); + padLayerMaskEnd = pt_cur_ch->m_PadEnd->GetLayerSet(); /* First Test if routing possible ie if the pads are accessible @@ -499,23 +506,22 @@ static int Autoroute_One_Track( PCB_EDIT_FRAME* pcbframe, goto end_of_route; } - /* Test the trivial case: direct connection overlay pads. */ - if( ( row_source == row_target ) && ( col_source == col_target ) - && ( padLayerMaskEnd & padLayerMaskStart & - g_TabAllCopperLayerMask[pcbframe->GetBoard()->GetCopperLayerCount() - 1] ) ) + // Test the trivial case: direct connection overlay pads. + if( row_source == row_target && col_source == col_target && + ( padLayerMaskEnd & padLayerMaskStart & all_cu ).any() ) { result = TRIVIAL_SUCCESS; goto end_of_route; } - /* Placing the bit to remove obstacles on 2 pads to a link. */ + // Placing the bit to remove obstacles on 2 pads to a link. pcbframe->SetStatusText( wxT( "Gen Cells" ) ); PlacePad( pt_cur_ch->m_PadStart, CURRENT_PAD, marge, WRITE_OR_CELL ); PlacePad( pt_cur_ch->m_PadEnd, CURRENT_PAD, marge, WRITE_OR_CELL ); - /* Regenerates the remaining barriers (which may encroach on the placement bits precedent) - */ + // Regenerates the remaining barriers (which may encroach on the + // placement bits precedent) i = pcbframe->GetBoard()->GetPadCount(); for( unsigned ii = 0; ii < pcbframe->GetBoard()->GetPadCount(); ii++ ) @@ -528,15 +534,15 @@ static int Autoroute_One_Track( PCB_EDIT_FRAME* pcbframe, } } - InitQueue(); /* initialize the search queue */ + InitQueue(); // initialize the search queue apx_dist = RoutingMatrix.GetApxDist( row_source, col_source, row_target, col_target ); - /* Initialize first search. */ - if( two_sides ) /* Preferred orientation. */ + // Initialize first search. + if( two_sides ) // Preferred orientation. { if( abs( row_target - row_source ) > abs( col_target - col_source ) ) { - if( padLayerMaskStart & topLayerMask ) + if( ( padLayerMaskStart & topLayerMask ).any() ) { start_mask_layer = 2; @@ -547,7 +553,7 @@ static int Autoroute_One_Track( PCB_EDIT_FRAME* pcbframe, } } - if( padLayerMaskStart & bottomLayerMask ) + if( ( padLayerMaskStart & bottomLayerMask ).any() ) { start_mask_layer |= 1; @@ -560,7 +566,7 @@ static int Autoroute_One_Track( PCB_EDIT_FRAME* pcbframe, } else { - if( padLayerMaskStart & bottomLayerMask ) + if( ( padLayerMaskStart & bottomLayerMask ).any() ) { start_mask_layer = 1; @@ -571,7 +577,7 @@ static int Autoroute_One_Track( PCB_EDIT_FRAME* pcbframe, } } - if( padLayerMaskStart & topLayerMask ) + if( ( padLayerMaskStart & topLayerMask ).any() ) { start_mask_layer |= 2; @@ -583,7 +589,7 @@ static int Autoroute_One_Track( PCB_EDIT_FRAME* pcbframe, } } } - else if( padLayerMaskStart & bottomLayerMask ) + else if( ( padLayerMaskStart & bottomLayerMask ).any() ) { start_mask_layer = 1; @@ -593,7 +599,7 @@ static int Autoroute_One_Track( PCB_EDIT_FRAME* pcbframe, } } - /* search until success or we exhaust all possibilities */ + // search until success or we exhaust all possibilities GetQueue( &r, &c, &side, &d, &apx_dist ); for( ; r != ILLEGAL; GetQueue( &r, &c, &side, &d, &apx_dist ) ) @@ -603,10 +609,10 @@ static int Autoroute_One_Track( PCB_EDIT_FRAME* pcbframe, if( curcell & CURRENT_PAD ) curcell &= ~HOLE; - if( (r == row_target) && (c == col_target) /* success if layer OK */ - && ( tab_mask[side] & padLayerMaskEnd) ) + if( (r == row_target) && (c == col_target) // success if layer OK + && (tab_mask[side] & padLayerMaskEnd).any() ) { - /* Remove link. */ + // Remove link. GRSetDrawMode( DC, GR_XOR ); GRLine( pcbframe->GetCanvas()->GetClipBox(), DC, @@ -617,14 +623,14 @@ static int Autoroute_One_Track( PCB_EDIT_FRAME* pcbframe, 0, WHITE ); - /* Generate trace. */ + // Generate trace. if( Retrace( pcbframe, DC, row_source, col_source, row_target, col_target, side, current_net_code ) ) { - result = SUCCESS; /* Success : Route OK */ + result = SUCCESS; // Success : Route OK } - break; /* Routing complete. */ + break; // Routing complete. } if( pcbframe->GetCanvas()->GetAbortRequest() ) @@ -633,7 +639,7 @@ static int Autoroute_One_Track( PCB_EDIT_FRAME* pcbframe, break; } - /* report every COUNT new nodes or so */ + // report every COUNT new nodes or so #define COUNT 20000 if( ( OpenNodes - lastopen > COUNT ) @@ -654,7 +660,7 @@ static int Autoroute_One_Track( PCB_EDIT_FRAME* pcbframe, { _self = 5; - /* set 'present' bits */ + // set 'present' bits for( i = 0; i < 8; i++ ) { selfok2[i].present = 0; @@ -664,15 +670,15 @@ static int Autoroute_One_Track( PCB_EDIT_FRAME* pcbframe, } } - for( i = 0; i < 8; i++ ) /* consider neighbors */ + for( i = 0; i < 8; i++ ) // consider neighbors { nr = r + delta[i][0]; nc = c + delta[i][1]; - /* off the edge? */ + // off the edge? if( nr < 0 || nr >= RoutingMatrix.m_Nrows || nc < 0 || nc >= RoutingMatrix.m_Ncols ) - continue; /* off the edge */ + continue; // off the edge if( _self == 5 && selfok2[i].present ) continue; @@ -682,22 +688,22 @@ static int Autoroute_One_Track( PCB_EDIT_FRAME* pcbframe, if( newcell & CURRENT_PAD ) newcell &= ~HOLE; - /* check for non-target hole */ + // check for non-target hole if( newcell & HOLE ) { if( nr != row_target || nc != col_target ) continue; } - /* check for traces */ + // check for traces else if( newcell & HOLE & ~(newmask[i]) ) { continue; } - /* check blocking on corner neighbors */ + // check blocking on corner neighbors if( delta[i][0] && delta[i][1] ) { - /* check first buddy */ + // check first buddy buddy = RoutingMatrix.GetCell( r + blocking[i].r1, c + blocking[i].c1, side ); if( buddy & CURRENT_PAD ) @@ -707,7 +713,7 @@ static int Autoroute_One_Track( PCB_EDIT_FRAME* pcbframe, continue; // if (buddy & (blocking[i].b1)) continue; - /* check second buddy */ + // check second buddy buddy = RoutingMatrix.GetCell( r + blocking[i].r2, c + blocking[i].c2, side ); if( buddy & CURRENT_PAD ) @@ -724,8 +730,8 @@ static int Autoroute_One_Track( PCB_EDIT_FRAME* pcbframe, ( olddir == FROM_OTHERSIDE ) ? RoutingMatrix.GetDir( r, c, 1 - side ) : 0, side ); - /* if (a) not visited yet, or (b) we have */ - /* found a better path, add it to queue */ + // if (a) not visited yet, or (b) we have + // found a better path, add it to queue if( !RoutingMatrix.GetDir( nr, nc, side ) ) { RoutingMatrix.SetDir( nr, nc, side, ndir[i] ); @@ -748,45 +754,45 @@ static int Autoroute_One_Track( PCB_EDIT_FRAME* pcbframe, } } - /** Test the other layer. **/ + //* Test the other layer. * if( two_sides ) { olddir = RoutingMatrix.GetDir( r, c, side ); if( olddir == FROM_OTHERSIDE ) - continue; /* useless move, so don't bother */ + continue; // useless move, so don't bother - if( curcell ) /* can't drill via if anything here */ + if( curcell ) // can't drill via if anything here continue; - /* check for holes or traces on other side */ + // check for holes or traces on other side if( ( newcell = RoutingMatrix.GetCell( r, c, 1 - side ) ) != 0 ) continue; - /* check for nearby holes or traces on both sides */ + // check for nearby holes or traces on both sides for( skip = 0, i = 0; i < 8; i++ ) { nr = r + delta[i][0]; nc = c + delta[i][1]; if( nr < 0 || nr >= RoutingMatrix.m_Nrows || nc < 0 || nc >= RoutingMatrix.m_Ncols ) - continue; /* off the edge !! */ + continue; // off the edge !! - if( RoutingMatrix.GetCell( nr, nc, side ) /* & blocking2[i]*/ ) + if( RoutingMatrix.GetCell( nr, nc, side ) /* & blocking2[i] */ ) { - skip = 1; /* can't drill via here */ + skip = 1; // can't drill via here break; } - if( RoutingMatrix.GetCell( nr, nc, 1 - side ) /* & blocking2[i]*/ ) + if( RoutingMatrix.GetCell( nr, nc, 1 - side ) /* & blocking2[i] */ ) { - skip = 1; /* can't drill via here */ + skip = 1; // can't drill via here break; } } - if( skip ) /* neighboring hole or trace? */ - continue; /* yes, can't drill via here */ + if( skip ) // neighboring hole or trace? + continue; // yes, can't drill via here newdist = d + RoutingMatrix.CalcDist( FROM_OTHERSIDE, olddir, 0, side ); @@ -814,7 +820,7 @@ static int Autoroute_One_Track( PCB_EDIT_FRAME* pcbframe, row_target, col_target ); } - } /* Finished attempt to route on other layer. */ + } // Finished attempt to route on other layer. } end_of_route: @@ -831,9 +837,9 @@ end_of_route: static long bit[8][9] = { - /* OT=Otherside */ - /* N, NE, E, SE, S, SW, W, NW, OT */ -/* N */ + // OT=Otherside + // N, NE, E, SE, S, SW, W, NW, OT +// N { LINE_VERTICAL, BENT_StoNE, CORNER_SOUTHEAST, @@ -844,7 +850,7 @@ static long bit[8][9] = BENT_StoNW, ( HOLE | HOLE_SOUTH ) }, -/* NE */ +// NE { BENT_NtoSW, DIAG_NEtoSW, @@ -856,7 +862,7 @@ static long bit[8][9] = ANGLE_SWtoNW, ( HOLE | HOLE_SOUTHWEST ) }, -/* E */ +// E { CORNER_NORTHWEST, BENT_WtoNE, @@ -868,7 +874,7 @@ static long bit[8][9] = SHARP_WtoNW, ( HOLE | HOLE_WEST ) }, -/* SE */ +// SE { SHARP_NtoNW, ANGLE_NWtoNE, @@ -880,7 +886,7 @@ static long bit[8][9] = 0, ( HOLE | HOLE_NORTHWEST ) }, -/* S */ +// S { 0, SHARP_NtoNE, @@ -892,7 +898,7 @@ static long bit[8][9] = SHARP_NtoNW, ( HOLE | HOLE_NORTH ) }, -/* SW */ +// SW { SHARP_NtoNE, 0, @@ -904,7 +910,7 @@ static long bit[8][9] = ANGLE_NWtoNE, ( HOLE | HOLE_NORTHEAST ) }, -/* W */ +// W { CORNER_NORTHEAST, SHARP_EtoNE, @@ -916,7 +922,7 @@ static long bit[8][9] = BENT_EtoNW, ( HOLE | HOLE_EAST ) }, -/* NW */ +// NW { BENT_NtoSE, ANGLE_NEtoSE, @@ -952,13 +958,13 @@ static int Retrace( PCB_EDIT_FRAME* pcbframe, wxDC* DC, int current_net_code ) { int r0, c0, s0; - int r1, c1, s1; /* row, col, starting side. */ - int r2, c2, s2; /* row, col, ending side. */ + int r1, c1, s1; // row, col, starting side. + int r2, c2, s2; // row, col, ending side. int x, y = -1; long b; r1 = row_target; - c1 = col_target; /* start point is target ( end point is source )*/ + c1 = col_target; // start point is target ( end point is source ) s1 = target_side; r0 = c0 = s0 = ILLEGAL; @@ -966,7 +972,7 @@ static int Retrace( PCB_EDIT_FRAME* pcbframe, wxDC* DC, do { - /* find where we came from to get here */ + // find where we came from to get here r2 = r1; c2 = c1; s2 = s1; x = RoutingMatrix.GetDir( r1, c1, s1 ); @@ -1020,7 +1026,7 @@ static int Retrace( PCB_EDIT_FRAME* pcbframe, wxDC* DC, if( r0 != ILLEGAL ) y = RoutingMatrix.GetDir( r0, c0, s0 ); - /* see if target or hole */ + // see if target or hole if( ( ( r1 == row_target ) && ( c1 == col_target ) ) || ( s1 != s0 ) ) { int p_dir; @@ -1092,7 +1098,7 @@ static int Retrace( PCB_EDIT_FRAME* pcbframe, wxDC* DC, } } - if( ( r2 == row_source ) && ( c2 == col_source ) ) /* see if source */ + if( ( r2 == row_source ) && ( c2 == col_source ) ) // see if source { int p_dir; @@ -1139,7 +1145,7 @@ static int Retrace( PCB_EDIT_FRAME* pcbframe, wxDC* DC, OrCell_Trace( pcbframe->GetBoard(), r2, c2, s2, p_dir, current_net_code ); } - /* move to next cell */ + // move to next cell r0 = r1; c0 = c1; s0 = s1; @@ -1166,7 +1172,7 @@ static void OrCell_Trace( BOARD* pcb, int col, int row, g_CurrentTrackList.PushBack( newVia ); g_CurrentTrackSegment->SetState( TRACK_AR, true ); - g_CurrentTrackSegment->SetLayer( 0x0F ); + g_CurrentTrackSegment->SetLayer( F_Cu ); g_CurrentTrackSegment->SetStart(wxPoint( pcb->GetBoundingBox().GetX() + ( RoutingMatrix.m_GridRouting * row ), @@ -1199,18 +1205,18 @@ static void OrCell_Trace( BOARD* pcb, int col, int row, ( RoutingMatrix.m_GridRouting * col ))); g_CurrentTrackSegment->SetNetCode( current_net_code ); - if( g_CurrentTrackSegment->Back() == NULL ) /* Start trace. */ + if( g_CurrentTrackSegment->Back() == NULL ) // Start trace. { g_CurrentTrackSegment->SetStart( wxPoint( segm_fX, segm_fY ) ); - /* Placement on the center of the pad if outside grid. */ + // Placement on the center of the pad if outside grid. dx1 = g_CurrentTrackSegment->GetEnd().x - g_CurrentTrackSegment->GetStart().x; dy1 = g_CurrentTrackSegment->GetEnd().y - g_CurrentTrackSegment->GetStart().y; dx0 = pt_cur_ch->m_PadEnd->GetPosition().x - g_CurrentTrackSegment->GetStart().x; dy0 = pt_cur_ch->m_PadEnd->GetPosition().y - g_CurrentTrackSegment->GetStart().y; - /* If aligned, change the origin point. */ + // If aligned, change the origin point. if( abs( dx0 * dy1 ) == abs( dx1 * dy0 ) ) { g_CurrentTrackSegment->SetStart( pt_cur_ch->m_PadEnd->GetPosition() ); @@ -1237,7 +1243,7 @@ static void OrCell_Trace( BOARD* pcb, int col, int row, if( g_CurrentTrackSegment->GetStart() != g_CurrentTrackSegment->GetEnd() ) { - /* Reduce aligned segments by one. */ + // Reduce aligned segments by one. TRACK* oldTrack = g_CurrentTrackSegment->Back(); if( oldTrack && oldTrack->Type() != PCB_VIA_T ) @@ -1281,11 +1287,11 @@ static void AddNewTrace( PCB_EDIT_FRAME* pcbframe, wxDC* DC ) dx1 = g_CurrentTrackSegment->GetEnd().x - g_CurrentTrackSegment->GetStart().x; dy1 = g_CurrentTrackSegment->GetEnd().y - g_CurrentTrackSegment->GetStart().y; - /* Place on center of pad if off grid. */ + // Place on center of pad if off grid. dx0 = pt_cur_ch->m_PadStart->GetPosition().x - g_CurrentTrackSegment->GetStart().x; dy0 = pt_cur_ch->m_PadStart->GetPosition().y - g_CurrentTrackSegment->GetStart().y; - /* If aligned, change the origin point. */ + // If aligned, change the origin point. if( abs( dx0 * dy1 ) == abs( dx1 * dy0 ) ) { g_CurrentTrackSegment->SetEnd( pt_cur_ch->m_PadStart->GetPosition() ); @@ -1312,7 +1318,7 @@ static void AddNewTrace( PCB_EDIT_FRAME* pcbframe, wxDC* DC ) if( g_CurrentTrackSegment->end ) g_CurrentTrackSegment->SetState( END_ONPAD, true ); - /* Out the new track on the matrix board */ + // Out the new track on the matrix board for( TRACK* track = g_FirstTrackSegment; track; track = track->Next() ) { TraceSegmentPcb( track, HOLE, marge, WRITE_CELL ); diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index fafecf16f4..f45df75edb 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -64,24 +64,26 @@ #include // Configuration entry names. -static const wxString UserGridSizeXEntry( wxT( "PcbUserGrid_X" ) ); -static const wxString UserGridSizeYEntry( wxT( "PcbUserGrid_Y" ) ); -static const wxString UserGridUnitsEntry( wxT( "PcbUserGrid_Unit" ) ); -static const wxString DisplayPadFillEntry( wxT( "DiPadFi" ) ); -static const wxString DisplayViaFillEntry( wxT( "DiViaFi" ) ); -static const wxString DisplayPadNumberEntry( wxT( "DiPadNu" ) ); -static const wxString DisplayModuleEdgeEntry( wxT( "DiModEd" ) ); -static const wxString DisplayModuleTextEntry( wxT( "DiModTx" ) ); -static const wxString FastGrid1Entry( wxT( "FastGrid1" ) ); -static const wxString FastGrid2Entry( wxT( "FastGrid2" ) ); +static const wxChar UserGridSizeXEntry[] = wxT( "PcbUserGrid_X" ); +static const wxChar UserGridSizeYEntry[] = wxT( "PcbUserGrid_Y" ); +static const wxChar UserGridUnitsEntry[] = wxT( "PcbUserGrid_Unit" ); +static const wxChar DisplayPadFillEntry[] = wxT( "DiPadFi" ); +static const wxChar DisplayViaFillEntry[] = wxT( "DiViaFi" ); +static const wxChar DisplayPadNumberEntry[] = wxT( "DiPadNu" ); +static const wxChar DisplayModuleEdgeEntry[] = wxT( "DiModEd" ); +static const wxChar DisplayModuleTextEntry[] = wxT( "DiModTx" ); +static const wxChar FastGrid1Entry[] = wxT( "FastGrid1" ); +static const wxChar FastGrid2Entry[] = wxT( "FastGrid2" ); const LAYER_NUM PCB_BASE_FRAME::GAL_LAYER_ORDER[] = { ITEM_GAL_LAYER( GP_OVERLAY ), ITEM_GAL_LAYER( DRC_VISIBLE ), NETNAMES_GAL_LAYER( PADS_NETNAMES_VISIBLE ), - DRAW_N, COMMENT_N, ECO1_N, ECO2_N, EDGE_N, - UNUSED_LAYER_29, UNUSED_LAYER_30, UNUSED_LAYER_31, + Dwgs_User, Cmts_User, Eco1_User, Eco2_User, Edge_Cuts, + + // UNUSED_LAYER_29, UNUSED_LAYER_30, UNUSED_LAYER_31, + ITEM_GAL_LAYER( MOD_TEXT_FR_VISIBLE ), ITEM_GAL_LAYER( MOD_REFERENCES_VISIBLE), ITEM_GAL_LAYER( MOD_VALUES_VISIBLE ), @@ -89,9 +91,11 @@ const LAYER_NUM PCB_BASE_FRAME::GAL_LAYER_ORDER[] = ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), ITEM_GAL_LAYER( VIA_THROUGH_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), - NETNAMES_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_FR_VISIBLE ), SOLDERMASK_N_FRONT, - NETNAMES_GAL_LAYER( LAYER_16_NETNAMES_VISIBLE ), LAYER_N_FRONT, - SILKSCREEN_N_FRONT, SOLDERPASTE_N_FRONT, ADHESIVE_N_FRONT, + NETNAMES_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_FR_VISIBLE ), F_Mask, + NETNAMES_GAL_LAYER( F_Cu ), F_Cu, + F_SilkS, F_Paste, F_Adhes, + +#if 0 // was: NETNAMES_GAL_LAYER( LAYER_15_NETNAMES_VISIBLE ), LAYER_N_15, NETNAMES_GAL_LAYER( LAYER_14_NETNAMES_VISIBLE ), LAYER_N_14, NETNAMES_GAL_LAYER( LAYER_13_NETNAMES_VISIBLE ), LAYER_N_13, @@ -106,14 +110,48 @@ const LAYER_NUM PCB_BASE_FRAME::GAL_LAYER_ORDER[] = NETNAMES_GAL_LAYER( LAYER_4_NETNAMES_VISIBLE ), LAYER_N_4, NETNAMES_GAL_LAYER( LAYER_3_NETNAMES_VISIBLE ), LAYER_N_3, NETNAMES_GAL_LAYER( LAYER_2_NETNAMES_VISIBLE ), LAYER_N_2, - NETNAMES_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_BK_VISIBLE ), SOLDERMASK_N_BACK, - NETNAMES_GAL_LAYER( LAYER_1_NETNAMES_VISIBLE ), LAYER_N_BACK, +#else - ADHESIVE_N_BACK, SOLDERPASTE_N_BACK, SILKSCREEN_N_BACK, + NETNAMES_GAL_LAYER( In1_Cu ), In1_Cu, + NETNAMES_GAL_LAYER( In2_Cu ), In2_Cu, + NETNAMES_GAL_LAYER( In3_Cu ), In3_Cu, + NETNAMES_GAL_LAYER( In4_Cu ), In4_Cu, + NETNAMES_GAL_LAYER( In5_Cu ), In5_Cu, + NETNAMES_GAL_LAYER( In6_Cu ), In6_Cu, + NETNAMES_GAL_LAYER( In7_Cu ), In7_Cu, + NETNAMES_GAL_LAYER( In8_Cu ), In8_Cu, + NETNAMES_GAL_LAYER( In9_Cu ), In9_Cu, + NETNAMES_GAL_LAYER( In10_Cu ), In10_Cu, + NETNAMES_GAL_LAYER( In11_Cu ), In11_Cu, + NETNAMES_GAL_LAYER( In12_Cu ), In12_Cu, + NETNAMES_GAL_LAYER( In13_Cu ), In13_Cu, + NETNAMES_GAL_LAYER( In14_Cu ), In14_Cu, + NETNAMES_GAL_LAYER( In15_Cu ), In15_Cu, + NETNAMES_GAL_LAYER( In16_Cu ), In16_Cu, + NETNAMES_GAL_LAYER( In17_Cu ), In17_Cu, + NETNAMES_GAL_LAYER( In18_Cu ), In18_Cu, + NETNAMES_GAL_LAYER( In19_Cu ), In19_Cu, + NETNAMES_GAL_LAYER( In20_Cu ), In20_Cu, + NETNAMES_GAL_LAYER( In21_Cu ), In21_Cu, + NETNAMES_GAL_LAYER( In22_Cu ), In22_Cu, + NETNAMES_GAL_LAYER( In23_Cu ), In23_Cu, + NETNAMES_GAL_LAYER( In24_Cu ), In24_Cu, + NETNAMES_GAL_LAYER( In25_Cu ), In25_Cu, + NETNAMES_GAL_LAYER( In26_Cu ), In26_Cu, + NETNAMES_GAL_LAYER( In27_Cu ), In27_Cu, + NETNAMES_GAL_LAYER( In28_Cu ), In28_Cu, + NETNAMES_GAL_LAYER( In29_Cu ), In29_Cu, + NETNAMES_GAL_LAYER( In30_Cu ), In30_Cu, +#endif + NETNAMES_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_BK_VISIBLE ), B_Mask, + NETNAMES_GAL_LAYER( B_Cu ), B_Cu, + + B_Adhes, B_Paste, B_SilkS, ITEM_GAL_LAYER( MOD_TEXT_BK_VISIBLE ), ITEM_GAL_LAYER( WORKSHEET ) }; + BEGIN_EVENT_TABLE( PCB_BASE_FRAME, EDA_DRAW_FRAME ) EVT_MENU_RANGE( ID_POPUP_PCB_ITEM_SELECTION_START, ID_POPUP_PCB_ITEM_SELECTION_END, PCB_BASE_FRAME::ProcessItemSelection ) @@ -417,9 +455,9 @@ void PCB_BASE_FRAME::Show3D_Frame( wxCommandEvent& event ) // Note: virtual, overridden in PCB_EDIT_FRAME; -void PCB_BASE_FRAME::SwitchLayer( wxDC* DC, LAYER_NUM layer ) +void PCB_BASE_FRAME::SwitchLayer( wxDC* DC, LAYER_ID layer ) { - LAYER_NUM preslayer = ((PCB_SCREEN*)GetScreen())->m_Active_Layer; + LAYER_ID preslayer = ((PCB_SCREEN*)GetScreen())->m_Active_Layer; // Check if the specified layer matches the present layer if( layer == preslayer ) @@ -434,7 +472,7 @@ void PCB_BASE_FRAME::SwitchLayer( wxDC* DC, LAYER_NUM layer ) // selection of any other copper layer is disregarded). if( m_Pcb->GetCopperLayerCount() < 2 ) { - if( layer != LAYER_N_BACK ) + if( layer != B_Cu ) { return; } @@ -446,7 +484,7 @@ void PCB_BASE_FRAME::SwitchLayer( wxDC* DC, LAYER_NUM layer ) // layers are also capable of being selected. else { - if( ( layer != LAYER_N_BACK ) && ( layer != LAYER_N_FRONT ) + if( ( layer != B_Cu ) && ( layer != F_Cu ) && ( layer >= m_Pcb->GetCopperLayerCount() - 1 ) ) { return; @@ -813,7 +851,7 @@ void PCB_BASE_FRAME::LoadSettings( wxConfigBase* aCfg ) KIGFX::VIEW* view = GetGalCanvas()->GetView(); // Set rendering order and properties of layers - for( LAYER_NUM i = 0; (unsigned) i < sizeof(GAL_LAYER_ORDER) / sizeof(LAYER_NUM); ++i ) + for( LAYER_NUM i = 0; i < (int) DIM(GAL_LAYER_ORDER); ++i ) { LAYER_NUM layer = GAL_LAYER_ORDER[i]; wxASSERT( layer < KIGFX::VIEW::VIEW_MAX_LAYERS ); @@ -840,14 +878,14 @@ void PCB_BASE_FRAME::LoadSettings( wxConfigBase* aCfg ) view->SetRequired( NETNAMES_GAL_LAYER( PADS_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ) ); view->SetRequired( NETNAMES_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_FR_VISIBLE ) ); - view->SetRequired( ADHESIVE_N_FRONT, ITEM_GAL_LAYER( PAD_FR_VISIBLE ) ); - view->SetRequired( SOLDERPASTE_N_FRONT, ITEM_GAL_LAYER( PAD_FR_VISIBLE ) ); - view->SetRequired( SOLDERMASK_N_FRONT, ITEM_GAL_LAYER( PAD_FR_VISIBLE ) ); + view->SetRequired( F_Adhes, ITEM_GAL_LAYER( PAD_FR_VISIBLE ) ); + view->SetRequired( F_Paste, ITEM_GAL_LAYER( PAD_FR_VISIBLE ) ); + view->SetRequired( F_Mask, ITEM_GAL_LAYER( PAD_FR_VISIBLE ) ); view->SetRequired( NETNAMES_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); - view->SetRequired( ADHESIVE_N_BACK, ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); - view->SetRequired( SOLDERPASTE_N_BACK, ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); - view->SetRequired( SOLDERMASK_N_BACK, ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); + view->SetRequired( B_Adhes, ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); + view->SetRequired( B_Paste, ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); + view->SetRequired( B_Mask, ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); view->SetRequired( ITEM_GAL_LAYER( PAD_FR_VISIBLE ), ITEM_GAL_LAYER( MOD_FR_VISIBLE ) ); view->SetRequired( ITEM_GAL_LAYER( PAD_BK_VISIBLE ), ITEM_GAL_LAYER( MOD_BK_VISIBLE ) ); diff --git a/pcbnew/block.cpp b/pcbnew/block.cpp index b2924676b9..33254ac942 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() { - LAYER_MSK layerMask; + LSET layerMask; bool selectOnlyComplete = GetScreen()->m_BlockLocate.GetWidth() > 0 ; GetScreen()->m_BlockLocate.Normalize(); @@ -392,9 +392,9 @@ void PCB_EDIT_FRAME::Block_SelectItems() // Add modules if( blockIncludeModules ) { - for( MODULE* module = m_Pcb->m_Modules; module != NULL; module = module->Next() ) + for( MODULE* module = m_Pcb->m_Modules; module; module = module->Next() ) { - LAYER_NUM layer = module->GetLayer(); + LAYER_ID layer = module->GetLayer(); if( module->HitTest( GetScreen()->m_BlockLocate, selectOnlyComplete ) && ( !module->IsLocked() || blockIncludeLockedModules ) ) @@ -418,7 +418,7 @@ void PCB_EDIT_FRAME::Block_SelectItems() if( blockIncludeItemsOnInvisibleLayers || m_Pcb->IsLayerVisible( track->GetLayer() ) ) { - picker.SetItem ( track ); + picker.SetItem( track ); itemsList->PushItem( picker ); } } @@ -426,13 +426,13 @@ void PCB_EDIT_FRAME::Block_SelectItems() } // Add graphic items - layerMask = EDGE_LAYER; + layerMask = LSET( Edge_Cuts ); if( blockIncludeItemsOnTechLayers ) - layerMask = ALL_LAYERS; + layerMask.set(); if( !blockIncludeBoardOutlineLayer ) - layerMask &= ~EDGE_LAYER; + layerMask.set( Edge_Cuts, false ); for( BOARD_ITEM* PtStruct = m_Pcb->m_Drawings; PtStruct != NULL; PtStruct = PtStruct->Next() ) { @@ -444,7 +444,7 @@ void PCB_EDIT_FRAME::Block_SelectItems() switch( PtStruct->Type() ) { case PCB_LINE_T: - if( (GetLayerMask( PtStruct->GetLayer() ) & layerMask) == 0 ) + if( !layerMask[PtStruct->GetLayer()] ) break; if( !PtStruct->HitTest( GetScreen()->m_BlockLocate, selectOnlyComplete ) ) @@ -464,7 +464,7 @@ void PCB_EDIT_FRAME::Block_SelectItems() break; case PCB_TARGET_T: - if( ( GetLayerMask( PtStruct->GetLayer() ) & layerMask ) == 0 ) + if( !layerMask[PtStruct->GetLayer()] ) break; if( !PtStruct->HitTest( GetScreen()->m_BlockLocate, selectOnlyComplete ) ) @@ -474,7 +474,7 @@ void PCB_EDIT_FRAME::Block_SelectItems() break; case PCB_DIMENSION_T: - if( ( GetLayerMask( PtStruct->GetLayer() ) & layerMask ) == 0 ) + if( !layerMask[PtStruct->GetLayer()] ) break; if( !PtStruct->HitTest( GetScreen()->m_BlockLocate, selectOnlyComplete ) ) diff --git a/pcbnew/board_items_to_polygon_shape_transform.cpp b/pcbnew/board_items_to_polygon_shape_transform.cpp index 0651f00efe..caba91ca6c 100644 --- a/pcbnew/board_items_to_polygon_shape_transform.cpp +++ b/pcbnew/board_items_to_polygon_shape_transform.cpp @@ -39,19 +39,8 @@ static void addTextSegmToPoly( int x0, int y0, int xf, int yf ) s_textCircle2SegmentCount, s_textWidth ); } -/** - * Function ConvertBrdLayerToPolygonalContours - * Build a set of polygons which are the outlines of copper items - * (pads, tracks, texts, zones) - * the holes in vias or pads are ignored - * Usefull to export the shape of copper layers to dxf polygons - * or 3D viewer - * the polygons are not merged. - * @param aLayer = A layer, like LAYER_N_BACK, etc. - * @param aOutlines The CPOLYGONS_LIST to fill in with main outlines. - * @return true if success, false if a contour is not valid - */ -void BOARD::ConvertBrdLayerToPolygonalContours( LAYER_NUM aLayer, CPOLYGONS_LIST& aOutlines ) + +void BOARD::ConvertBrdLayerToPolygonalContours( LAYER_ID aLayer, CPOLYGONS_LIST& aOutlines ) { // Number of segments to convert a circle to a polygon const int segcountforcircle = 18; @@ -82,7 +71,7 @@ void BOARD::ConvertBrdLayerToPolygonalContours( LAYER_NUM aLayer, CPOLYGONS_LIST for( int ii = 0; ii < GetAreaCount(); ii++ ) { ZONE_CONTAINER* zone = GetArea( ii ); - LAYER_NUM zonelayer = zone->GetLayer(); + LAYER_ID zonelayer = zone->GetLayer(); if( zonelayer == aLayer ) zone->TransformSolidAreasShapesToPolygonSet( @@ -113,18 +102,8 @@ void BOARD::ConvertBrdLayerToPolygonalContours( LAYER_NUM aLayer, CPOLYGONS_LIST } } -/* generate pads shapes on layer aLayer as polygons, - * and adds these polygons to aCornerBuffer - * aCornerBuffer = the buffer to store polygons - * aInflateValue = an additionnal size to add to pad shapes - * aCircleToSegmentsCount = number of segments to approximate a circle - * aCorrectionFactor = the correction to apply to a circle radius - * to generate the polygon. - * if aCorrectionFactor = 1.0, the polygon is inside the circle - * the radius of circle approximated by segments is - * initial radius * aCorrectionFactor - */ -void MODULE::TransformPadsShapesWithClearanceToPolygon( LAYER_NUM aLayer, + +void MODULE::TransformPadsShapesWithClearanceToPolygon( LAYER_ID aLayer, CPOLYGONS_LIST& aCornerBuffer, int aInflateValue, int aCircleToSegmentsCount, @@ -141,13 +120,13 @@ void MODULE::TransformPadsShapesWithClearanceToPolygon( LAYER_NUM aLayer, switch( aLayer ) { - case SOLDERMASK_N_FRONT: - case SOLDERMASK_N_BACK: + case F_Mask: + case B_Mask: margin.x = margin.y = pad->GetSolderMaskMargin() + aInflateValue; break; - case SOLDERPASTE_N_FRONT: - case SOLDERPASTE_N_BACK: + case F_Paste: + case B_Paste: margin = pad->GetSolderPasteMargin(); margin.x += aInflateValue; margin.y += aInflateValue; @@ -175,7 +154,7 @@ void MODULE::TransformPadsShapesWithClearanceToPolygon( LAYER_NUM aLayer, * initial radius * aCorrectionFactor */ void MODULE::TransformGraphicShapesWithClearanceToPolygonSet( - LAYER_NUM aLayer, + LAYER_ID aLayer, CPOLYGONS_LIST& aCornerBuffer, int aInflateValue, int aCircleToSegmentsCount, diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index 9a1456a7b0..cb34bb3ce6 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -81,14 +81,14 @@ BOARD::BOARD() : BuildListOfNets(); // prepare pad and netlist containers. - for( LAYER_NUM layer = FIRST_LAYER; layer < NB_LAYERS; ++layer ) + for( LAYER_NUM layer = 0; layer < LAYER_ID_COUNT; ++layer ) { - m_Layer[layer].m_Name = GetStandardLayerName( layer ); + m_Layer[layer].m_name = GetStandardLayerName( LAYER_ID( layer ) ); - if( layer <= LAST_COPPER_LAYER ) - m_Layer[layer].m_Type = LT_SIGNAL; + if( IsCopperLayer( layer ) ) + m_Layer[layer].m_type = LT_SIGNAL; else - m_Layer[layer].m_Type = LT_UNDEFINED; + m_Layer[layer].m_type = LT_UNDEFINED; } NETCLASSPTR defaultClass = m_designSettings.GetDefault(); @@ -188,14 +188,14 @@ void BOARD::Move( const wxPoint& aMoveVector ) // overload } -void BOARD::chainMarkedSegments( wxPoint aPosition, LAYER_MSK aLayerMask, TRACK_PTRS* aList ) +void BOARD::chainMarkedSegments( wxPoint aPosition, LSET aLayerMask, TRACK_PTRS* aList ) { - TRACK* segment; // The current segment being analyzed. - TRACK* via; // The via identified, eventually destroy - TRACK* candidate; // The end segment to destroy (or NULL = segment) - int NbSegm; + TRACK* segment; // The current segment being analyzed. + TRACK* via; // The via identified, eventually destroy + TRACK* candidate; // The end segment to destroy (or NULL = segment) + int NbSegm; - if( m_Track == NULL ) + if( !m_Track ) return; /* Set the BUSY flag of all connected segments, first search starting at @@ -227,7 +227,7 @@ void BOARD::chainMarkedSegments( wxPoint aPosition, LAYER_MSK aLayerMask, TRACK_ if( via ) { - aLayerMask = via->GetLayerMask(); + aLayerMask = via->GetLayerSet(); aList->push_back( via ); } @@ -273,7 +273,7 @@ void BOARD::chainMarkedSegments( wxPoint aPosition, LAYER_MSK aLayerMask, TRACK_ * candidate: * we must analyze connections to its other end */ - aLayerMask = candidate->GetLayerMask(); + aLayerMask = candidate->GetLayerSet(); if( aPosition == candidate->GetStart() ) { @@ -311,9 +311,9 @@ void BOARD::PopHighLight() } -bool BOARD::SetLayer( LAYER_NUM aIndex, const LAYER& aLayer ) +bool BOARD::SetLayer( LAYER_ID aIndex, const LAYER& aLayer ) { - if( aIndex < NB_COPPER_LAYERS ) + if( unsigned( aIndex ) < DIM( m_Layer ) ) { m_Layer[ aIndex ] = aLayer; return true; @@ -323,7 +323,7 @@ bool BOARD::SetLayer( LAYER_NUM aIndex, const LAYER& aLayer ) } -wxString BOARD::GetLayerName( LAYER_NUM aLayer ) const +wxString BOARD::GetLayerName( LAYER_ID aLayer ) const { if( !IsPcbLayer( aLayer ) ) return wxEmptyString; @@ -336,60 +336,14 @@ wxString BOARD::GetLayerName( LAYER_NUM aLayer ) const // For copper layers, return the actual copper layer name, // otherwise return the Standard English layer name. if( IsCopperLayer( aLayer ) ) - return m_Layer[aLayer].m_Name; + return m_Layer[aLayer].m_name; } return GetStandardLayerName( aLayer ); } -wxString BOARD::GetStandardLayerName( LAYER_NUM aLayerNumber ) -{ - const wxChar* txt; - - // These are only default layer names. For Pcbnew the copper names - // may be over-ridden in the BOARD (*.brd) file. - - // Use a switch to explicitly show the mapping more clearly - switch( aLayerNumber ) - { - case LAYER_N_FRONT: txt = wxT( "F.Cu" ); break; - case LAYER_N_2: txt = wxT( "Inner1.Cu" ); break; - case LAYER_N_3: txt = wxT( "Inner2.Cu" ); break; - case LAYER_N_4: txt = wxT( "Inner3.Cu" ); break; - case LAYER_N_5: txt = wxT( "Inner4.Cu" ); break; - case LAYER_N_6: txt = wxT( "Inner5.Cu" ); break; - case LAYER_N_7: txt = wxT( "Inner6.Cu" ); break; - case LAYER_N_8: txt = wxT( "Inner7.Cu" ); break; - case LAYER_N_9: txt = wxT( "Inner8.Cu" ); break; - case LAYER_N_10: txt = wxT( "Inner9.Cu" ); break; - case LAYER_N_11: txt = wxT( "Inner10.Cu" ); break; - case LAYER_N_12: txt = wxT( "Inner11.Cu" ); break; - case LAYER_N_13: txt = wxT( "Inner12.Cu" ); break; - case LAYER_N_14: txt = wxT( "Inner13.Cu" ); break; - case LAYER_N_15: txt = wxT( "Inner14.Cu" ); break; - case LAYER_N_BACK: txt = wxT( "B.Cu" ); break; - case ADHESIVE_N_BACK: txt = wxT( "B.Adhes" ); break; - case ADHESIVE_N_FRONT: txt = wxT( "F.Adhes" ); break; - case SOLDERPASTE_N_BACK: txt = wxT( "B.Paste" ); break; - case SOLDERPASTE_N_FRONT: txt = wxT( "F.Paste" ); break; - case SILKSCREEN_N_BACK: txt = wxT( "B.SilkS" ); break; - case SILKSCREEN_N_FRONT: txt = wxT( "F.SilkS" ); break; - case SOLDERMASK_N_BACK: txt = wxT( "B.Mask" ); break; - case SOLDERMASK_N_FRONT: txt = wxT( "F.Mask" ); break; - case DRAW_N: txt = wxT( "Dwgs.User" ); break; - case COMMENT_N: txt = wxT( "Cmts.User" ); break; - case ECO1_N: txt = wxT( "Eco1.User" ); break; - case ECO2_N: txt = wxT( "Eco2.User" ); break; - case EDGE_N: txt = wxT( "Edge.Cuts" ); break; - default: txt = wxT( "BAD_INDEX" ); break; - } - - return txt; // wxString constructed once here -} - - -bool BOARD::SetLayerName( LAYER_NUM aLayer, const wxString& aLayerName ) +bool BOARD::SetLayerName( LAYER_ID aLayer, const wxString& aLayerName ) { if( !IsCopperLayer( aLayer ) ) return false; @@ -401,20 +355,31 @@ bool BOARD::SetLayerName( LAYER_NUM aLayer, const wxString& aLayerName ) if( aLayerName.Find( wxChar( '"' ) ) != wxNOT_FOUND ) return false; - wxString NameTemp = aLayerName; + wxString nameTemp = aLayerName; // replace any spaces with underscores before we do any comparing - NameTemp.Replace( wxT( " " ), wxT( "_" ) ); + nameTemp.Replace( wxT( " " ), wxT( "_" ) ); if( IsLayerEnabled( aLayer ) ) { +#if 0 for( LAYER_NUM i = FIRST_COPPER_LAYER; i < NB_COPPER_LAYERS; ++i ) { - if( i != aLayer && IsLayerEnabled( i ) && NameTemp == m_Layer[i].m_Name ) + if( i != aLayer && IsLayerEnabled( i ) && nameTemp == m_Layer[i].m_Name ) return false; } +#else + for( LSEQ cu = GetEnabledLayers().CuStack(); cu; ++cu ) + { + LAYER_ID id = *cu; - m_Layer[aLayer].m_Name = NameTemp; + // veto changing the name if it exists elsewhere. + if( id != aLayer && nameTemp == m_Layer[id].m_name ) + return false; + } +#endif + + m_Layer[aLayer].m_name = nameTemp; return true; } @@ -423,7 +388,7 @@ bool BOARD::SetLayerName( LAYER_NUM aLayer, const wxString& aLayerName ) } -LAYER_T BOARD::GetLayerType( LAYER_NUM aLayer ) const +LAYER_T BOARD::GetLayerType( LAYER_ID aLayer ) const { if( !IsCopperLayer( aLayer ) ) return LT_SIGNAL; @@ -431,13 +396,13 @@ LAYER_T BOARD::GetLayerType( LAYER_NUM aLayer ) const //@@IMB: The original test was broken due to the discontinuity // in the layer sequence. if( IsLayerEnabled( aLayer ) ) - return m_Layer[aLayer].m_Type; + return m_Layer[aLayer].m_type; return LT_SIGNAL; } -bool BOARD::SetLayerType( LAYER_NUM aLayer, LAYER_T aLayerType ) +bool BOARD::SetLayerType( LAYER_ID aLayer, LAYER_T aLayerType ) { if( !IsCopperLayer( aLayer ) ) return false; @@ -446,7 +411,7 @@ bool BOARD::SetLayerType( LAYER_NUM aLayer, LAYER_T aLayerType ) // in the layer sequence. if( IsLayerEnabled( aLayer ) ) { - m_Layer[aLayer].m_Type = aLayerType; + m_Layer[aLayer].m_type = aLayerType; return true; } @@ -509,25 +474,25 @@ void BOARD::SetCopperLayerCount( int aCount ) } -LAYER_MSK BOARD::GetEnabledLayers() const +LSET BOARD::GetEnabledLayers() const { return m_designSettings.GetEnabledLayers(); } -LAYER_MSK BOARD::GetVisibleLayers() const +LSET BOARD::GetVisibleLayers() const { return m_designSettings.GetVisibleLayers(); } -void BOARD::SetEnabledLayers( LAYER_MSK aLayerMask ) +void BOARD::SetEnabledLayers( LSET aLayerMask ) { m_designSettings.SetEnabledLayers( aLayerMask ); } -void BOARD::SetVisibleLayers( LAYER_MSK aLayerMask ) +void BOARD::SetVisibleLayers( LSET aLayerMask ) { m_designSettings.SetVisibleLayers( aLayerMask ); } @@ -548,7 +513,7 @@ void BOARD::SetVisibleElements( int aMask ) void BOARD::SetVisibleAlls() { - SetVisibleLayers( FULL_LAYERS ); + SetVisibleLayers( LSET().set() ); // Call SetElementVisibility for each item, // to ensure specific calculations that can be needed by some items @@ -652,26 +617,26 @@ void BOARD::SetVisibleElementColor( int aPCB_VISIBLE, EDA_COLOR_T aColor ) } -void BOARD::SetLayerColor( LAYER_NUM aLayer, EDA_COLOR_T aColor ) +void BOARD::SetLayerColor( LAYER_ID aLayer, EDA_COLOR_T aColor ) { GetColorsSettings()->SetLayerColor( aLayer, aColor ); } -EDA_COLOR_T BOARD::GetLayerColor( LAYER_NUM aLayer ) const +EDA_COLOR_T BOARD::GetLayerColor( LAYER_ID aLayer ) const { return GetColorsSettings()->GetLayerColor( aLayer ); } -bool BOARD::IsModuleLayerVisible( LAYER_NUM layer ) +bool BOARD::IsModuleLayerVisible( LAYER_ID layer ) { switch( layer ) { - case LAYER_N_FRONT: + case F_Cu: return IsElementVisible( PCB_VISIBLE(MOD_FR_VISIBLE) ); - case LAYER_N_BACK: + case B_Cu: return IsElementVisible( PCB_VISIBLE(MOD_BK_VISIBLE) ); default: @@ -873,7 +838,7 @@ EDA_RECT BOARD::ComputeBoundingBox( bool aBoardEdgesOnly ) // Check segments, dimensions, texts, and fiducials for( BOARD_ITEM* item = m_Drawings; item; item = item->Next() ) { - if( aBoardEdgesOnly && (item->Type() != PCB_LINE_T || item->GetLayer() != EDGE_N ) ) + if( aBoardEdgesOnly && (item->Type() != PCB_LINE_T || item->GetLayer() != Edge_Cuts ) ) continue; if( !hasItems ) @@ -1198,7 +1163,7 @@ SEARCH_RESULT BOARD::Visit( INSPECTOR* inspector, const void* testData, * D_PAD* pad = (D_PAD*) item; * if( pad->HitTest( refPos ) ) * { - * if( layer_mask & pad->GetLayerMask() ) + * if( layer_mask & pad->GetLayerSet() ) * { * found = item; * return SEARCH_QUIT; @@ -1367,7 +1332,7 @@ int BOARD::SortedNetnamesList( wxArrayString& aNames, bool aSortbyPadsCount ) } -void BOARD::RedrawAreasOutlines( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, LAYER_NUM aLayer ) +void BOARD::RedrawAreasOutlines( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, LAYER_ID aLayer ) { if( !aDC ) return; @@ -1382,7 +1347,7 @@ void BOARD::RedrawAreasOutlines( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE a } -void BOARD::RedrawFilledAreas( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, LAYER_NUM aLayer ) +void BOARD::RedrawFilledAreas( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, LAYER_ID aLayer ) { if( !aDC ) return; @@ -1398,9 +1363,7 @@ void BOARD::RedrawFilledAreas( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDr ZONE_CONTAINER* BOARD::HitTestForAnyFilledArea( const wxPoint& aRefPos, - LAYER_NUM aStartLayer, - LAYER_NUM aEndLayer, - int aNetCode ) + LAYER_ID aStartLayer, LAYER_ID aEndLayer, int aNetCode ) { if( aEndLayer < 0 ) aEndLayer = aStartLayer; @@ -1413,7 +1376,7 @@ ZONE_CONTAINER* BOARD::HitTestForAnyFilledArea( const wxPoint& aRefPos, ZONE_CONTAINER* area = m_ZoneDescriptorList[ia]; LAYER_NUM layer = area->GetLayer(); - if( (layer < aStartLayer) || (layer > aEndLayer) ) + if( layer < aStartLayer || layer > aEndLayer ) continue; // In locate functions we must skip tagged items with BUSY flag set. @@ -1431,7 +1394,7 @@ ZONE_CONTAINER* BOARD::HitTestForAnyFilledArea( const wxPoint& aRefPos, } -int BOARD::SetAreasNetCodesFromNetNames( void ) +int BOARD::SetAreasNetCodesFromNetNames() { int error_count = 0; @@ -1465,7 +1428,7 @@ int BOARD::SetAreasNetCodesFromNetNames( void ) } -VIA* BOARD::GetViaByPosition( const wxPoint& aPosition, LAYER_NUM aLayer) const +VIA* BOARD::GetViaByPosition( const wxPoint& aPosition, LAYER_ID aLayer) const { for( VIA *via = GetFirstVia( m_Track); via; via = GetFirstVia( via->Next() ) ) { @@ -1479,42 +1442,42 @@ VIA* BOARD::GetViaByPosition( const wxPoint& aPosition, LAYER_NUM aLayer) const } -D_PAD* BOARD::GetPad( const wxPoint& aPosition, LAYER_MSK aLayerMask ) +D_PAD* BOARD::GetPad( const wxPoint& aPosition, LSET aLayerMask ) { - D_PAD* pad = NULL; + if( !aLayerMask.any() ) + aLayerMask = LSET::AllCuMask(); - for( MODULE* module = m_Modules; module && ( pad == NULL ); module = module->Next() ) + for( MODULE* module = m_Modules; module; module = module->Next() ) { - if( aLayerMask ) - pad = module->GetPad( aPosition, aLayerMask ); - else - pad = module->GetPad( aPosition, ALL_LAYERS ); + D_PAD* pad = module->GetPad( aPosition, aLayerMask ); + + if( pad ) + return pad; } - return pad; + return NULL; } D_PAD* BOARD::GetPad( TRACK* aTrace, ENDPOINT_T aEndPoint ) { - D_PAD* pad = NULL; - const wxPoint &aPosition = aTrace->GetEndPoint( aEndPoint ); + const wxPoint& aPosition = aTrace->GetEndPoint( aEndPoint ); - LAYER_MSK aLayerMask = GetLayerMask( aTrace->GetLayer() ); + LSET aLayerMask( aTrace->GetLayer() ); for( MODULE* module = m_Modules; module; module = module->Next() ) { - pad = module->GetPad( aPosition, aLayerMask ); + D_PAD* pad = module->GetPad( aPosition, aLayerMask ); - if( pad != NULL ) - break; + if( pad ) + return pad; } - return pad; + return NULL; } -D_PAD* BOARD::GetPadFast( const wxPoint& aPosition, LAYER_MSK aLayerMask ) +D_PAD* BOARD::GetPadFast( const wxPoint& aPosition, LSET aLayerMask ) { for( unsigned i=0; iGetPosition() != aPosition ) continue; - /* Pad found, it must be on the correct layer */ - if( pad->GetLayerMask() & aLayerMask ) + // Pad found, it must be on the correct layer + if( ( pad->GetLayerSet() & aLayerMask ).any() ) return pad; } @@ -1532,7 +1495,7 @@ D_PAD* BOARD::GetPadFast( const wxPoint& aPosition, LAYER_MSK aLayerMask ) } -D_PAD* BOARD::GetPad( std::vector& aPadList, const wxPoint& aPosition, LAYER_MSK aLayerMask ) +D_PAD* BOARD::GetPad( std::vector& aPadList, const wxPoint& aPosition, LSET aLayerMask ) { // Search the aPoint coordinates in aPadList // aPadList is sorted by X then Y values, and a fast binary search is used @@ -1556,7 +1519,7 @@ D_PAD* BOARD::GetPad( std::vector& aPadList, const wxPoint& aPosition, L if( pad->GetPosition() == aPosition ) // candidate found { // The pad must match the layer mask: - if( aLayerMask & pad->GetLayerMask()) + if( ( aLayerMask & pad->GetLayerSet() ).any() ) return pad; // More than one pad can be at aPosition @@ -1570,7 +1533,7 @@ D_PAD* BOARD::GetPad( std::vector& aPadList, const wxPoint& aPosition, L if( pad->GetPosition() != aPosition ) break; - if( (aLayerMask & pad->GetLayerMask()) != 0 ) + if( (aLayerMask & pad->GetLayerSet()) != 0 ) return pad; } // search previous @@ -1581,7 +1544,7 @@ D_PAD* BOARD::GetPad( std::vector& aPadList, const wxPoint& aPosition, L if( pad->GetPosition() != aPosition ) break; - if( (aLayerMask & pad->GetLayerMask()) != 0 ) + if( (aLayerMask & pad->GetLayerSet()) != 0 ) return pad; } @@ -1661,11 +1624,11 @@ void BOARD::GetSortedPadListByXthenYCoord( std::vector& aVector, int aNe TRACK* BOARD::GetTrack( TRACK* aTrace, const wxPoint& aPosition, - LAYER_MSK aLayerMask ) const + LSET aLayerMask ) const { for( TRACK* track = aTrace; track; track = track->Next() ) { - LAYER_NUM layer = track->GetLayer(); + LAYER_ID layer = track->GetLayer(); if( track->GetState( BUSY | IS_DELETED ) ) continue; @@ -1680,8 +1643,8 @@ TRACK* BOARD::GetTrack( TRACK* aTrace, const wxPoint& aPosition, } else { - if( (GetLayerMask( layer ) & aLayerMask) == 0 ) - continue; /* Segments on different layers. */ + if( !aLayerMask[layer] ) + continue; // Segments on different layers. if( track->HitTest( aPosition ) ) return track; @@ -1714,9 +1677,9 @@ TRACK* BOARD::MarkTrace( TRACK* aTrace, int* aCount, for( TRACK* track = m_Track; track; track = track->Next() ) track->SetState( BUSY, false ); - /* Set flags of the initial track segment */ + // Set flags of the initial track segment aTrace->SetState( BUSY, true ); - LAYER_MSK layerMask = aTrace->GetLayerMask(); + LSET layerMask = aTrace->GetLayerSet(); trackList.push_back( aTrace ); @@ -1752,13 +1715,13 @@ TRACK* BOARD::MarkTrace( TRACK* aTrace, int* aCount, if( Segm1 ) // search for others segments connected to the initial segment start point { - layerMask = Segm1->GetLayerMask(); + layerMask = Segm1->GetLayerSet(); chainMarkedSegments( aTrace->GetStart(), layerMask, &trackList ); } if( Segm2 ) // search for others segments connected to the initial segment end point { - layerMask = Segm2->GetLayerMask(); + layerMask = Segm2->GetLayerSet(); chainMarkedSegments( aTrace->GetStart(), layerMask, &trackList ); } } @@ -1785,7 +1748,7 @@ TRACK* BOARD::MarkTrace( TRACK* aTrace, int* aCount, via->SetState( BUSY, true ); // Try to flag it. the flag will be cleared later if needed - layerMask = via->GetLayerMask(); + layerMask = via->GetLayerSet(); TRACK* track = ::GetTrack( m_Track, NULL, via->GetStart(), layerMask ); @@ -1932,7 +1895,7 @@ TRACK* BOARD::MarkTrace( TRACK* aTrace, int* aCount, } -MODULE* BOARD::GetFootprint( const wxPoint& aPosition, LAYER_NUM aActiveLayer, +MODULE* BOARD::GetFootprint( const wxPoint& aPosition, LAYER_ID aActiveLayer, bool aVisibleOnly, bool aIgnoreLocked ) { MODULE* pt_module; @@ -1952,12 +1915,13 @@ MODULE* BOARD::GetFootprint( const wxPoint& aPosition, LAYER_NUM aActiveLayer, if( aIgnoreLocked && pt_module->IsLocked() ) continue; - LAYER_NUM layer = pt_module->GetLayer(); + LAYER_ID layer = pt_module->GetLayer(); // Filter non visible modules if requested - if( (!aVisibleOnly) || IsModuleLayerVisible( layer ) ) + if( !aVisibleOnly || IsModuleLayerVisible( layer ) ) { EDA_RECT bb = pt_module->GetFootprintRect(); + int offx = bb.GetX() + bb.GetWidth() / 2; int offy = bb.GetY() + bb.GetHeight() / 2; @@ -2000,7 +1964,7 @@ MODULE* BOARD::GetFootprint( const wxPoint& aPosition, LAYER_NUM aActiveLayer, } -BOARD_CONNECTED_ITEM* BOARD::GetLockPoint( const wxPoint& aPosition, LAYER_MSK aLayerMask ) +BOARD_CONNECTED_ITEM* BOARD::GetLockPoint( const wxPoint& aPosition, LSET aLayerMask ) { for( MODULE* module = m_Modules; module; module = module->Next() ) { @@ -2010,7 +1974,7 @@ BOARD_CONNECTED_ITEM* BOARD::GetLockPoint( const wxPoint& aPosition, LAYER_MSK a return pad; } - /* No pad has been located so check for a segment of the trace. */ + // No pad has been located so check for a segment of the trace. TRACK* segment = ::GetTrack( m_Track, NULL, aPosition, aLayerMask ); if( segment == NULL ) @@ -2030,7 +1994,7 @@ TRACK* BOARD::CreateLockPoint( wxPoint& aPosition, TRACK* aSegment, PICKED_ITEMS if( aSegment->GetStart() == aPosition || aSegment->GetEnd() == aPosition ) return NULL; - /* A via is a good lock point */ + // A via is a good lock point if( aSegment->Type() == PCB_VIA_T ) { aPosition = aSegment->GetStart(); @@ -2046,7 +2010,7 @@ TRACK* BOARD::CreateLockPoint( wxPoint& aPosition, TRACK* aSegment, PICKED_ITEMS // lockPoint must be on aSegment: // Ensure lockPoint.y/lockPoint.y = delta.y/delta.x if( delta.x == 0 ) - lockPoint.x = 0; /* horizontal segment*/ + lockPoint.x = 0; // horizontal segment else lockPoint.y = KiROUND( ( (double)lockPoint.x * delta.y ) / delta.x ); @@ -2099,7 +2063,7 @@ TRACK* BOARD::CreateLockPoint( wxPoint& aPosition, TRACK* aSegment, PICKED_ITEMS ZONE_CONTAINER* BOARD::AddArea( PICKED_ITEMS_LIST* aNewZonesList, int aNetcode, - LAYER_NUM aLayer, wxPoint aStartPointPosition, int aHatch ) + LAYER_ID aLayer, wxPoint aStartPointPosition, int aHatch ) { ZONE_CONTAINER* new_area = InsertArea( aNetcode, m_ZoneDescriptorList.size( ) - 1, @@ -2134,7 +2098,7 @@ void BOARD::RemoveArea( PICKED_ITEMS_LIST* aDeletedList, ZONE_CONTAINER* area_to } -ZONE_CONTAINER* BOARD::InsertArea( int netcode, int iarea, LAYER_NUM layer, int x, int y, int hatch ) +ZONE_CONTAINER* BOARD::InsertArea( int netcode, int iarea, LAYER_ID layer, int x, int y, int hatch ) { ZONE_CONTAINER* new_area = new ZONE_CONTAINER( this ); diff --git a/pcbnew/class_board.h b/pcbnew/class_board.h index b8cdc49950..981450c070 100644 --- a/pcbnew/class_board.h +++ b/pcbnew/class_board.h @@ -87,29 +87,34 @@ enum LAYER_T * Class LAYER * holds information pertinent to a layer of a BOARD. */ -class LAYER +struct LAYER { -public: - LAYER( const wxString& aName = wxEmptyString, LAYER_T aType = LT_SIGNAL, - bool aVisible = true ) : - m_Name( aName ), - m_Type( aType ), + LAYER() : + m_type( LT_SIGNAL ), + m_visible( true ), + m_number( 0 ) + {} + + /* + LAYER( const wxString& aName = wxEmptyString, + LAYER_T aType = LT_SIGNAL, bool aVisible = true, int aNumber = -1 ) : + m_name( aName ), + m_type( aType ), m_visible( aVisible ), - m_fixedListIndex( UNDEFINED_LAYER ) + m_number( aNumber ) { } - - void SetVisible( bool aEnable ) { m_visible = aEnable; } - bool IsVisible() const { return m_visible; } - - void SetFixedListIndex( int aIndex ) { m_fixedListIndex = aIndex; } - int GetFixedListIndex() const { return m_fixedListIndex; } + */ /** The name of the layer, there should be no spaces in this name. */ - wxString m_Name; + UTF8 m_name; /** The type of the layer */ - LAYER_T m_Type; + LAYER_T m_type; + + bool m_visible; + + int m_number; /** * Function ShowType @@ -127,10 +132,6 @@ public: * LAYER_T(-1) if the string is invalid */ static LAYER_T ParseType( const char* aType ); - -private: - bool m_visible; - int m_fixedListIndex; }; @@ -180,7 +181,7 @@ private: /// edge zone descriptors, owned by pointer. ZONE_CONTAINERS m_ZoneDescriptorList; - LAYER m_Layer[NB_LAYERS]; + LAYER m_Layer[LAYER_ID_COUNT]; wxPoint m_grid_origin; // if true m_highLight_NetCode is used @@ -217,7 +218,7 @@ private: * @param aLayerMask The allowed layers for segments to search. * @param aList The track list to fill with points of flagged segments. */ - void chainMarkedSegments( wxPoint aPosition, LAYER_MSK aLayerMask, TRACK_PTRS* aList ); + void chainMarkedSegments( wxPoint aPosition, LSET aLayerMask, TRACK_PTRS* aList ); public: static inline bool ClassOf( const EDA_ITEM* aItem ) @@ -440,11 +441,11 @@ public: /** * Function GetEnabledLayers - * is a proxy function that calls the correspondent function in m_BoardSettings + * is a proxy function that calls the corresponding function in m_BoardSettings * Returns a bit-mask of all the layers that are enabled * @return int - the enabled layers in bit-mapped form. */ - LAYER_MSK GetEnabledLayers() const; + LSET GetEnabledLayers() const; /** * Function SetEnabledLayers @@ -452,7 +453,7 @@ public: * Changes the bit-mask of enabled layers * @param aLayerMask = The new bit-mask of enabled layers */ - void SetEnabledLayers( LAYER_MSK aLayerMask ); + void SetEnabledLayers( LSET aLayerMask ); /** * Function IsLayerEnabled @@ -461,7 +462,7 @@ public: * @param aLayer = The layer to be tested * @return bool - true if the layer is visible. */ - bool IsLayerEnabled( LAYER_NUM aLayer ) const + bool IsLayerEnabled( LAYER_ID aLayer ) const { return m_designSettings.IsLayerEnabled( aLayer ); } @@ -473,7 +474,7 @@ public: * @param aLayer = The layer to be tested * @return bool - true if the layer is visible. */ - bool IsLayerVisible( LAYER_NUM aLayer ) const + bool IsLayerVisible( LAYER_ID aLayer ) const { return m_designSettings.IsLayerVisible( aLayer ); } @@ -484,7 +485,7 @@ public: * Returns a bit-mask of all the layers that are visible * @return int - the visible layers in bit-mapped form. */ - LAYER_MSK GetVisibleLayers() const; + LSET GetVisibleLayers() const; /** * Function SetVisibleLayers @@ -492,7 +493,7 @@ public: * changes the bit-mask of visible layers * @param aLayerMask = The new bit-mask of visible layers */ - void SetVisibleLayers( LAYER_MSK aLayerMask ); + void SetVisibleLayers( LSET aLayerMask ); // these 2 functions are not tidy at this time, since there are PCB_VISIBLEs that // are not stored in the bitmap. @@ -545,10 +546,10 @@ public: * Function IsModuleLayerVisible * expects either of the two layers on which a module can reside, and returns * whether that layer is visible. - * @param layer One of the two allowed layers for modules: LAYER_N_FRONT or LAYER_N_BACK + * @param layer One of the two allowed layers for modules: F_Cu or B_Cu * @return bool - true if the layer is visible, else false. */ - bool IsModuleLayerVisible( LAYER_NUM layer ); + bool IsModuleLayerVisible( LAYER_ID layer ); /** * Function GetVisibleElementColor @@ -630,33 +631,33 @@ public: * Usefull to export the shape of copper layers to dxf polygons * or 3D viewer * the polygons are not merged. - * @param aLayer = A copper layer, like LAYER_N_BACK, etc. + * @param aLayer = A copper layer, like B_Cu, etc. * @param aOutlines The CPOLYGONS_LIST to fill in with items outline. */ - void ConvertBrdLayerToPolygonalContours( LAYER_NUM aLayer, CPOLYGONS_LIST& aOutlines ); + void ConvertBrdLayerToPolygonalContours( LAYER_ID aLayer, CPOLYGONS_LIST& aOutlines ); /** * Function GetLayerName * returns the name of a layer given by aLayer. Copper layers may * have custom names. * - * @param aLayer = A layer, like LAYER_N_BACK, etc. + * @param aLayer = A layer, like B_Cu, etc. * * @return wxString - the layer name, which for copper layers may * be custom, else standard. */ - wxString GetLayerName( LAYER_NUM aLayer ) const; + wxString GetLayerName( LAYER_ID aLayer ) const; /** * Function SetLayerName * changes the name of the layer given by aLayer. * - * @param aLayer A layer, like LAYER_N_BACK, etc. + * @param aLayer A layer, like B_Cu, etc. * @param aLayerName The new layer name * @return bool - true if aLayerName was legal and unique among other * layer names at other layer indices and aLayer was within range, else false. */ - bool SetLayerName( LAYER_NUM aLayer, const wxString& aLayerName ); + bool SetLayerName( LAYER_ID aLayer, const wxString& aLayerName ); /** * Function GetStandardLayerName @@ -666,44 +667,48 @@ public: * be different than the default if the user has renamed any copper layers. * * @param aLayerNumber is the layer number to fetch - * @return wxString - containing the layer name or "BAD INDEX" if aLayerNumber + * @return const wxString - containing the layer name or "BAD INDEX" if aLayerNumber * is not legal */ - static wxString GetStandardLayerName( LAYER_NUM aLayerNumber ); + static const wxString GetStandardLayerName( LAYER_ID aLayerId ) + { + // a BOARD's standard layer name is the LAYER_ID fixed name + return LSET::Name( aLayerId ); + } - bool SetLayer( LAYER_NUM aIndex, const LAYER& aLayer ); + bool SetLayer( LAYER_ID aIndex, const LAYER& aLayer ); /** * Function GetLayerType * returns the type of the copper layer given by aLayer. * - * @param aLayer A layer index, like LAYER_N_BACK, etc. + * @param aLayer A layer index, like B_Cu, etc. * @return LAYER_T - the layer type, or LAYER_T(-1) if the * index was out of range. */ - LAYER_T GetLayerType( LAYER_NUM aLayer ) const; + LAYER_T GetLayerType( LAYER_ID aLayer ) const; /** * Function SetLayerType * changes the type of the layer given by aLayer. * - * @param aLayer A layer index, like LAYER_N_BACK, etc. + * @param aLayer A layer index, like B_Cu, etc. * @param aLayerType The new layer type. * @return bool - true if aLayerType was legal and aLayer was within range, else false. */ - bool SetLayerType( LAYER_NUM aLayer, LAYER_T aLayerType ); + bool SetLayerType( LAYER_ID aLayer, LAYER_T aLayerType ); /** * Function SetLayerColor * changes a layer color for any valid layer, including non-copper ones. */ - void SetLayerColor( LAYER_NUM aLayer, EDA_COLOR_T aColor ); + void SetLayerColor( LAYER_ID aLayer, EDA_COLOR_T aColor ); /** * Function GetLayerColor * gets a layer color for any valid layer, including non-copper ones. */ - EDA_COLOR_T GetLayerColor( LAYER_NUM aLayer ) const; + EDA_COLOR_T GetLayerColor( LAYER_ID aLayer ) const; /** Functions to get some items count */ int GetNumSegmTrack() const; @@ -998,8 +1003,8 @@ public: * @return ZONE_CONTAINER* return a pointer to the ZONE_CONTAINER found, else NULL */ ZONE_CONTAINER* HitTestForAnyFilledArea( const wxPoint& aRefPos, - LAYER_NUM aStartLayer, - LAYER_NUM aEndLayer, + LAYER_ID aStartLayer, + LAYER_ID aEndLayer, int aNetCode ); /** @@ -1009,14 +1014,14 @@ public: void RedrawAreasOutlines( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDrawMode, - LAYER_NUM aLayer ); + LAYER_ID aLayer ); /** * Function RedrawFilledAreas * Redraw all filled areas on layer aLayer ( redraw all if aLayer < 0 ) */ void RedrawFilledAreas( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDrawMode, - LAYER_NUM aLayer ); + LAYER_ID aLayer ); /** * Function SetAreasNetCodesFromNetNames @@ -1084,14 +1089,14 @@ public: * @return a reference to the new area */ ZONE_CONTAINER* AddArea( PICKED_ITEMS_LIST* aNewZonesList, int aNetcode, - LAYER_NUM aLayer, wxPoint aStartPointPosition, int aHatch ); + LAYER_ID aLayer, wxPoint aStartPointPosition, int aHatch ); /** * Function InsertArea * add empty copper area to net, inserting after m_ZoneDescriptorList[iarea] * @return pointer to the new area */ - ZONE_CONTAINER* InsertArea( int netcode, int iarea, LAYER_NUM layer, int x, int y, int hatch ); + ZONE_CONTAINER* InsertArea( int netcode, int iarea, LAYER_ID layer, int x, int y, int hatch ); /** * Function NormalizeAreaPolygon @@ -1207,7 +1212,7 @@ public: * @param aLayer The layer to search. Use -1 for a don't care. * @return VIA* A point a to the VIA object if found, else NULL. */ - VIA* GetViaByPosition( const wxPoint& aPosition, LAYER_NUM aLayer = UNDEFINED_LAYER ) const; + VIA* GetViaByPosition( const wxPoint& aPosition, LAYER_ID aLayer = UNDEFINED_LAYER ) const; /** * Function GetPad @@ -1217,7 +1222,7 @@ public: * @param aLayerMask A layer or layers to mask the hit test. * @return A pointer to a D_PAD object if found or NULL if not found. */ - D_PAD* GetPad( const wxPoint& aPosition, LAYER_MSK aLayerMask = ALL_LAYERS ); + D_PAD* GetPad( const wxPoint& aPosition, LSET aLayerMask = LSET().set() ); /** * Function GetPad @@ -1239,7 +1244,7 @@ public: * @param aLayerMask A layer or layers to mask the hit test. * @return A pointer to a D_PAD object if found or NULL if not found. */ - D_PAD* GetPadFast( const wxPoint& aPosition, LAYER_MSK aLayerMask ); + D_PAD* GetPadFast( const wxPoint& aPosition, LSET aLayerMask ); /** * Function GetPad @@ -1256,7 +1261,7 @@ public: * @param aLayerMask A layer or layers to mask the hit test. * @return a D_PAD object pointer to the connected pad. */ - D_PAD* GetPad( std::vector& aPadList, const wxPoint& aPosition, LAYER_MSK aLayerMask ); + D_PAD* GetPad( std::vector& aPadList, const wxPoint& aPosition, LSET aLayerMask ); /** * Function GetSortedPadListByXthenYCoord @@ -1283,7 +1288,7 @@ public: * layer mask. * @return A TRACK object pointer if found otherwise NULL. */ - TRACK* GetTrack( TRACK* aTrace, const wxPoint& aPosition, LAYER_MSK aLayerMask ) const; + TRACK* GetTrack( TRACK* aTrace, const wxPoint& aPosition, LSET aLayerMask ) const; /** * Function MarkTrace @@ -1326,7 +1331,7 @@ public: * @param aIgnoreLocked Ignore locked modules when true. * @return MODULE* The best module or NULL if none. */ - MODULE* GetFootprint( const wxPoint& aPosition, LAYER_NUM aActiveLayer, + MODULE* GetFootprint( const wxPoint& aPosition, LAYER_ID aActiveLayer, bool aVisibleOnly, bool aIgnoreLocked = false ); /** @@ -1342,7 +1347,7 @@ public: * layer mask. * @return A pointer to a BOARD_ITEM object if found otherwise NULL. */ - BOARD_CONNECTED_ITEM* GetLockPoint( const wxPoint& aPosition, LAYER_MSK aLayerMask ); + BOARD_CONNECTED_ITEM* GetLockPoint( const wxPoint& aPosition, LSET aLayerMask ); /** * Function CreateLockPoint diff --git a/pcbnew/class_board_design_settings.cpp b/pcbnew/class_board_design_settings.cpp index 975972b1aa..f3596ced4b 100644 --- a/pcbnew/class_board_design_settings.cpp +++ b/pcbnew/class_board_design_settings.cpp @@ -54,10 +54,11 @@ BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS() : m_Pad_Master( NULL ) { - m_enabledLayers = ALL_LAYERS; // All layers enabled at first. - // SetCopperLayerCount() will adjust this. + LSET all_set = LSET().set(); - SetVisibleLayers( FULL_LAYERS ); + m_enabledLayers = all_set; // All layers enabled at first. + // SetCopperLayerCount() will adjust this. + SetVisibleLayers( all_set ); // set all but hidden text as visible. m_visibleElements = ~( 1 << MOD_TEXT_INVISIBLE ); @@ -305,17 +306,17 @@ void BOARD_DESIGN_SETTINGS::SetTrackWidthIndex( unsigned aIndex ) void BOARD_DESIGN_SETTINGS::SetVisibleAlls() { - SetVisibleLayers( FULL_LAYERS ); + SetVisibleLayers( LSET().set() ); m_visibleElements = -1; } -void BOARD_DESIGN_SETTINGS::SetLayerVisibility( LAYER_NUM aLayer, bool aNewState ) +void BOARD_DESIGN_SETTINGS::SetLayerVisibility( LAYER_ID aLayer, bool aNewState ) { if( aNewState && IsLayerEnabled( aLayer ) ) - m_visibleLayers |= GetLayerMask( aLayer ); + m_visibleLayers.set( aLayer, true ); else - m_visibleLayers &= ~GetLayerMask( aLayer ); + m_visibleLayers.set( aLayer, false ); } @@ -338,6 +339,8 @@ void BOARD_DESIGN_SETTINGS::SetCopperLayerCount( int aNewLayerCount ) m_copperLayerCount = aNewLayerCount; // ensure consistency with the m_EnabledLayers member +#if 0 + // was: m_enabledLayers &= ~ALL_CU_LAYERS; m_enabledLayers |= LAYER_BACK; @@ -345,14 +348,17 @@ void BOARD_DESIGN_SETTINGS::SetCopperLayerCount( int aNewLayerCount ) m_enabledLayers |= LAYER_FRONT; for( LAYER_NUM ii = LAYER_N_2; ii < aNewLayerCount - 1; ++ii ) - m_enabledLayers |= GetLayerMask( ii ); + m_enabledLayers |= GetLayerSet( ii ); +#else + m_enabledLayers = LSET::AllCuMask( aNewLayerCount ); +#endif } -void BOARD_DESIGN_SETTINGS::SetEnabledLayers( LAYER_MSK aMask ) +void BOARD_DESIGN_SETTINGS::SetEnabledLayers( LSET aMask ) { // Back and front layers are always enabled. - aMask |= LAYER_BACK | LAYER_FRONT; + aMask.set( B_Cu ).set( F_Cu ); m_enabledLayers = aMask; @@ -360,7 +366,7 @@ void BOARD_DESIGN_SETTINGS::SetEnabledLayers( LAYER_MSK aMask ) m_visibleLayers &= aMask; // update m_CopperLayerCount to ensure its consistency with m_EnabledLayers - m_copperLayerCount = LayerMaskCountSet( aMask & ALL_CU_LAYERS); + m_copperLayerCount = ( aMask & LSET::AllCuMask() ).count(); } diff --git a/pcbnew/class_dimension.cpp b/pcbnew/class_dimension.cpp index 2d554fc737..07a984b3d6 100644 --- a/pcbnew/class_dimension.cpp +++ b/pcbnew/class_dimension.cpp @@ -49,7 +49,7 @@ DIMENSION::DIMENSION( BOARD_ITEM* aParent ) : BOARD_ITEM( aParent, PCB_DIMENSION_T ), m_Width( Millimeter2iu( 0.2 ) ), m_Unit( INCHES ), m_Value( 0 ), m_Height( 0 ), m_Text( this ) { - m_Layer = DRAW_N; + m_Layer = Dwgs_User; } @@ -82,7 +82,7 @@ const wxString DIMENSION::GetText() const } -void DIMENSION::SetLayer( LAYER_NUM aLayer ) +void DIMENSION::SetLayer( LAYER_ID aLayer ) { m_Layer = aLayer; m_Text.SetLayer( aLayer ); diff --git a/pcbnew/class_dimension.h b/pcbnew/class_dimension.h index 440199353d..d12a597741 100644 --- a/pcbnew/class_dimension.h +++ b/pcbnew/class_dimension.h @@ -95,7 +95,7 @@ public: m_Text.SetSize( aTextSize ); } - void SetLayer( LAYER_NUM aLayer ); + void SetLayer( LAYER_ID aLayer ); void SetShape( int aShape ) { m_Shape = aShape; } int GetShape() const { return m_Shape; } diff --git a/pcbnew/class_drawsegment.cpp b/pcbnew/class_drawsegment.cpp index 2c976e90ee..0d22b34b85 100644 --- a/pcbnew/class_drawsegment.cpp +++ b/pcbnew/class_drawsegment.cpp @@ -185,7 +185,7 @@ void DRAWSEGMENT::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE draw_mode, if( ( draw_mode & GR_ALLOW_HIGHCONTRAST ) && DisplayOpt.ContrastModeDisplay ) { - if( !IsOnLayer( curr_layer ) && !IsOnLayer( EDGE_N ) ) + if( !IsOnLayer( curr_layer ) && !IsOnLayer( Edge_Cuts ) ) ColorTurnToDarkDarkGray( &color ); } diff --git a/pcbnew/class_edge_mod.cpp b/pcbnew/class_edge_mod.cpp index ede9d43564..5f14f0e1a7 100644 --- a/pcbnew/class_edge_mod.cpp +++ b/pcbnew/class_edge_mod.cpp @@ -57,7 +57,7 @@ EDGE_MODULE::EDGE_MODULE( MODULE* parent, STROKE_T aShape ) : { m_Shape = aShape; m_Angle = 0; - m_Layer = SILKSCREEN_N_FRONT; + m_Layer = F_SilkS; } @@ -149,7 +149,7 @@ void EDGE_MODULE::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE draw_mode, GRSetDrawMode( DC, draw_mode ); typeaff = frame->m_DisplayModEdge; - if( m_Layer <= LAST_COPPER_LAYER ) + if( IsCopperLayer( m_Layer ) ) { typeaff = frame->m_DisplayPcbTrackFill; diff --git a/pcbnew/class_mire.cpp b/pcbnew/class_mire.cpp index 3abeaf95d0..ba59dda554 100644 --- a/pcbnew/class_mire.cpp +++ b/pcbnew/class_mire.cpp @@ -51,11 +51,11 @@ PCB_TARGET::PCB_TARGET( BOARD_ITEM* aParent ) : m_Shape = 0; m_Size = Millimeter2iu( 5 ); // Gives a decent size m_Width = Millimeter2iu( 0.15 ); // Gives a decent width - m_Layer = EDGE_N; // a target is on all layers + m_Layer = Edge_Cuts; // a target is on all layers } -PCB_TARGET::PCB_TARGET( BOARD_ITEM* aParent, int aShape, LAYER_NUM aLayer, - const wxPoint& aPos, int aSize, int aWidth ) : +PCB_TARGET::PCB_TARGET( BOARD_ITEM* aParent, int aShape, LAYER_ID aLayer, + const wxPoint& aPos, int aSize, int aWidth ) : BOARD_ITEM( aParent, PCB_TARGET_T ) { m_Shape = aShape; diff --git a/pcbnew/class_mire.h b/pcbnew/class_mire.h index 9f12ac7d73..01bbf40302 100644 --- a/pcbnew/class_mire.h +++ b/pcbnew/class_mire.h @@ -51,7 +51,7 @@ public: // Do not create a copy constructor. The one generated by the compiler is adequate. - PCB_TARGET( BOARD_ITEM* aParent, int aShape, LAYER_NUM aLayer, + PCB_TARGET( BOARD_ITEM* aParent, int aShape, LAYER_ID aLayer, const wxPoint& aPos, int aSize, int aWidth ); ~PCB_TARGET(); diff --git a/pcbnew/class_module.cpp b/pcbnew/class_module.cpp index e755745f24..50fbc9d086 100644 --- a/pcbnew/class_module.cpp +++ b/pcbnew/class_module.cpp @@ -57,7 +57,7 @@ MODULE::MODULE( BOARD* parent ) : m_initial_comments( 0 ) { m_Attributs = MOD_DEFAULT; - m_Layer = LAYER_N_FRONT; + m_Layer = F_Cu; m_Orient = 0; m_ModuleStatus = 0; flag = 0; @@ -424,7 +424,7 @@ EDA_RECT MODULE::GetFootprintRect() const for( const BOARD_ITEM* item = m_Drawings.GetFirst(); item; item = item->Next() ) { - const EDGE_MODULE* edge = dyn_cast( item ); + const EDGE_MODULE* edge = dyn_cast( item ); if( edge ) area.Merge( edge->GetBoundingBox() ); @@ -590,12 +590,12 @@ D_PAD* MODULE::FindPadByName( const wxString& aPadName ) const } -D_PAD* MODULE::GetPad( const wxPoint& aPosition, LAYER_MSK aLayerMask ) +D_PAD* MODULE::GetPad( const wxPoint& aPosition, LSET aLayerMask ) { for( D_PAD* pad = m_Pads; pad; pad = pad->Next() ) { // ... and on the correct layer. - if( ( pad->GetLayerMask() & aLayerMask ) == 0 ) + if( ( pad->GetLayerSet() & aLayerMask ) == 0 ) continue; if( pad->HitTest( aPosition ) ) diff --git a/pcbnew/class_module.h b/pcbnew/class_module.h index 5a37ca992c..8eac8a87d8 100644 --- a/pcbnew/class_module.h +++ b/pcbnew/class_module.h @@ -189,7 +189,7 @@ public: * function IsFlipped * @return true if the module is flipped, i.e. on the back side of the board */ - bool IsFlipped() const {return GetLayer() == LAYER_N_BACK; } + bool IsFlipped() const {return GetLayer() == B_Cu; } // m_ModuleStatus bits: #define MODULE_is_LOCKED 0x01 ///< module LOCKED: no autoplace allowed @@ -282,7 +282,7 @@ public: * the radius of circle approximated by segments is * initial radius * aCorrectionFactor */ - void TransformPadsShapesWithClearanceToPolygon( LAYER_NUM aLayer, + void TransformPadsShapesWithClearanceToPolygon( LAYER_ID aLayer, CPOLYGONS_LIST& aCornerBuffer, int aInflateValue, int aCircleToSegmentsCount, @@ -306,13 +306,12 @@ public: * initial radius * aCorrectionFactor */ void TransformGraphicShapesWithClearanceToPolygonSet( - LAYER_NUM aLayer, + LAYER_ID aLayer, CPOLYGONS_LIST& aCornerBuffer, int aInflateValue, int aCircleToSegmentsCount, double aCorrectionFactor ); - /** * Function DrawEdgesOnly * Draws the footprint edges only to the current Device Context @@ -400,7 +399,7 @@ public: * @param aLayerMask A layer or layers to mask the hit test. * @return A pointer to a D_PAD object if found otherwise NULL. */ - D_PAD* GetPad( const wxPoint& aPosition, LAYER_MSK aLayerMask = ALL_LAYERS ); + D_PAD* GetPad( const wxPoint& aPosition, LSET aLayerMask = LSET::AllLayersMask() ); enum INCLUDE_NPTH_T { diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index 2d2342d4e8..c47f5844ce 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -78,7 +78,7 @@ D_PAD::D_PAD( MODULE* parent ) : m_ThermalGap = 0; // Use parent setting by default // Set layers mask to default for a standard thru hole pad. - m_layerMask = PAD_STANDARD_DEFAULT_LAYERS; + m_layerMask = StandardMask(); SetSubRatsnest( 0 ); // used in ratsnest calculations @@ -86,6 +86,38 @@ D_PAD::D_PAD( MODULE* parent ) : } +LSET D_PAD::StandardMask() +{ + static LSET saved = LSET::AllCuMask() | LSET( 3, F_SilkS, B_Mask, F_Mask ); + return saved; +} + + +LSET D_PAD::ConnMask() +{ + // was: #define PAD_CONN_DEFAULT_LAYERS LAYER_FRONT | SOLDERPASTE_LAYER_FRONT | SOLDERMASK_LAYER_FRONT + static LSET saved( 3, F_Cu, F_Paste, F_Mask ); + return saved; +} + + +LSET D_PAD::SMDMask() +{ + // was: #define PAD_SMD_DEFAULT_LAYERS LAYER_FRONT | SOLDERMASK_LAYER_FRONT + static LSET saved( 2, F_Cu, F_Mask ); + return saved; +} + + +LSET D_PAD::UnplatedHoleMask() +{ + // was #define PAD_HOLE_NOT_PLATED_DEFAULT_LAYERS ALL_CU_LAYERS | + // SILKSCREEN_LAYER_FRONT | SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT + static LSET saved = LSET::AllCuMask() | LSET( 3, F_SilkS, B_Mask, F_Mask ); + return saved; +} + + int D_PAD::boundingRadius() const { int x, y; @@ -231,7 +263,7 @@ void D_PAD::Flip( const wxPoint& aCentre ) SetOrientation( -GetOrientation() ); // flip pads layers - SetLayerMask( FlipLayerMask( m_layerMask ) ); + SetLayerSet( FlipLayerMask( m_layerMask ) ); // m_boundingRadius = -1; the shape has not been changed } @@ -630,13 +662,6 @@ void D_PAD::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM>& aList ) } -// see class_pad.h -bool D_PAD::IsOnLayer( LAYER_NUM aLayer ) const -{ - return ::GetLayerMask( aLayer ) & m_layerMask; -} - - void D_PAD::GetOblongDrillGeometry( wxPoint& aStartPoint, wxPoint& aEndPoint, int& aWidth ) const { @@ -773,10 +798,21 @@ int D_PAD::Compare( const D_PAD* padref, const D_PAD* padcmp ) // Dick: specctra_export needs this // Lorenzo: gencad also needs it to implement padstacks! - if( ( diff = padref->m_layerMask - padcmp->m_layerMask ) != 0 ) - return diff; + +#if __cplusplus >= 201103L + long long d = padref->m_layerMask.to_ullong() - padcmp->m_layerMask.to_ullong(); + if( d < 0 ) + return -1; + else if( d > 0 ) + return 1; return 0; +#else + // these strings are not typically constructed, since we don't get here often. + std::string s1 = padref->m_layerMask.to_string(); + std::string s2 = padcmp->m_layerMask.to_string(); + return s1.compare( s2 ); +#endif } @@ -861,40 +897,40 @@ void D_PAD::ViewGetLayers( int aLayers[], int& aCount ) const if( m_Attribute == PAD_STANDARD || m_Attribute == PAD_HOLE_NOT_PLATED ) aLayers[aCount++] = ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ); - if( IsOnLayer( LAYER_N_FRONT ) && IsOnLayer( LAYER_N_BACK ) ) + if( IsOnLayer( F_Cu ) && IsOnLayer( B_Cu ) ) { // Multi layer pad aLayers[aCount++] = ITEM_GAL_LAYER( PADS_VISIBLE ); aLayers[aCount++] = NETNAMES_GAL_LAYER( PADS_NETNAMES_VISIBLE ); } - else if( IsOnLayer( LAYER_N_FRONT ) ) + else if( IsOnLayer( F_Cu ) ) { aLayers[aCount++] = ITEM_GAL_LAYER( PAD_FR_VISIBLE ); aLayers[aCount++] = NETNAMES_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ); } - else if( IsOnLayer( LAYER_N_BACK ) ) + else if( IsOnLayer( B_Cu ) ) { aLayers[aCount++] = ITEM_GAL_LAYER( PAD_BK_VISIBLE ); aLayers[aCount++] = NETNAMES_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ); } - if( IsOnLayer( SOLDERMASK_N_FRONT ) ) - aLayers[aCount++] = SOLDERMASK_N_FRONT; + if( IsOnLayer( F_Mask ) ) + aLayers[aCount++] = F_Mask; - if( IsOnLayer( SOLDERMASK_N_BACK ) ) - aLayers[aCount++] = SOLDERMASK_N_BACK; + if( IsOnLayer( B_Mask ) ) + aLayers[aCount++] = B_Mask; - if( IsOnLayer( SOLDERPASTE_N_FRONT ) ) - aLayers[aCount++] = SOLDERPASTE_N_FRONT; + if( IsOnLayer( F_Paste ) ) + aLayers[aCount++] = F_Paste; - if( IsOnLayer( SOLDERPASTE_N_BACK ) ) - aLayers[aCount++] = SOLDERPASTE_N_BACK; + if( IsOnLayer( B_Paste ) ) + aLayers[aCount++] = B_Paste; - if( IsOnLayer( ADHESIVE_N_BACK ) ) - aLayers[aCount++] = ADHESIVE_N_BACK; + if( IsOnLayer( B_Adhes ) ) + aLayers[aCount++] = B_Adhes; - if( IsOnLayer( ADHESIVE_N_FRONT ) ) - aLayers[aCount++] = ADHESIVE_N_FRONT; + if( IsOnLayer( F_Adhes ) ) + aLayers[aCount++] = F_Adhes; #ifdef __WXDEBUG__ if( aCount == 0 ) // Should not occur diff --git a/pcbnew/class_pad.h b/pcbnew/class_pad.h index 61a8c73575..4b10040241 100644 --- a/pcbnew/class_pad.h +++ b/pcbnew/class_pad.h @@ -47,25 +47,6 @@ class TRACK; class MSG_PANEL_INFO; -/* Default layers used for pads, according to the pad type. - * this is default values only, they can be changed for a given pad - */ - -// PAD_STANDARD: -#define PAD_STANDARD_DEFAULT_LAYERS ALL_CU_LAYERS | SILKSCREEN_LAYER_FRONT | \ - SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT - -// PAD_CONN: -#define PAD_CONN_DEFAULT_LAYERS LAYER_FRONT | SOLDERPASTE_LAYER_FRONT | SOLDERMASK_LAYER_FRONT - -// PAD_SMD: -#define PAD_SMD_DEFAULT_LAYERS LAYER_FRONT | SOLDERMASK_LAYER_FRONT - -//PAD_HOLE_NOT_PLATED: -#define PAD_HOLE_NOT_PLATED_DEFAULT_LAYERS ALL_CU_LAYERS | SILKSCREEN_LAYER_FRONT | \ - SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT - - // Helper class to store parameters used to draw a pad class PAD_DRAWINFO { @@ -104,6 +85,14 @@ public: // Do not create a copy constructor. The one generated by the compiler is adequate. // D_PAD( const D_PAD& o ); + /* Default layers used for pads, according to the pad type. + * this is default values only, they can be changed for a given pad + */ + static LSET StandardMask(); + static LSET ConnMask(); + static LSET SMDMask(); + static LSET UnplatedHoleMask(); + void Copy( D_PAD* source ); D_PAD* Next() const { return static_cast( Pnext ); } @@ -180,8 +169,8 @@ public: */ void GetOblongDrillGeometry( wxPoint& aStartPoint, wxPoint& aEndPoint, int& aWidth ) const; - void SetLayerMask( LAYER_MSK aLayerMask ) { m_layerMask = aLayerMask; } - LAYER_MSK GetLayerMask() const { return m_layerMask; } + void SetLayerSet( LSET aLayerMask ) { m_layerMask = aLayerMask; } + LSET GetLayerSet() const { return m_layerMask; } void SetAttribute( PAD_ATTR_T aAttribute ); PAD_ATTR_T GetAttribute() const { return m_Attribute; } @@ -189,7 +178,7 @@ public: void SetPadToDieLength( int aLength ) { m_LengthPadToDie = aLength; } int GetPadToDieLength() const { return m_LengthPadToDie; } - int GetLocalSolderMaskMargin() const { return m_LocalSolderMaskMargin; } + int GetLocalSolderMaskMargin() const { return m_LocalSolderMaskMargin; } void SetLocalSolderMaskMargin( int aMargin ) { m_LocalSolderMaskMargin = aMargin; } int GetLocalClearance() const { return m_LocalClearance; } @@ -371,13 +360,16 @@ public: * Function GetSubRatsnest * @return int - the netcode */ - int GetSubRatsnest() const { return m_SubRatsnest; } - void SetSubRatsnest( int aSubRatsnest ) { m_SubRatsnest = aSubRatsnest; } + int GetSubRatsnest() const { return m_SubRatsnest; } + void SetSubRatsnest( int aSubRatsnest ) { m_SubRatsnest = aSubRatsnest; } void GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ); - bool IsOnLayer( LAYER_NUM aLayer ) const; + bool IsOnLayer( LAYER_ID aLayer ) const + { + return m_layerMask[aLayer]; + } bool HitTest( const wxPoint& aPosition ) const; @@ -506,7 +498,7 @@ private: */ wxPoint m_Offset; - LAYER_MSK m_layerMask; ///< Bitwise layer :1= copper layer, 15= cmp, + LSET m_layerMask; ///< Bitwise layer :1= copper layer, 15= cmp, ///< 2..14 = internal layers ///< 16 .. 31 = technical layers diff --git a/pcbnew/class_pad_draw_functions.cpp b/pcbnew/class_pad_draw_functions.cpp index 24113ea52a..82ae51ccc9 100644 --- a/pcbnew/class_pad_draw_functions.cpp +++ b/pcbnew/class_pad_draw_functions.cpp @@ -107,19 +107,16 @@ void D_PAD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDraw_mode, if( !frontVisible && !backVisible ) return; - /* If pad are only on front side (no layer on back side) - * and if hide front side pads is enabled, do not draw - */ - if( !frontVisible && ( (m_layerMask & BACK_LAYERS) == 0 ) ) + // If pad is only on front side (no layer on back side) + // and if hide front side pads is enabled, do not draw + if( !frontVisible && !( m_layerMask & LSET::BackMask() ).any() ) return; - /* If pad are only on back side (no layer on front side) - * and if hide back side pads is enabled, do not draw - */ - if( !backVisible && ( (m_layerMask & FRONT_LAYERS) == 0 ) ) + // If pad is only on back side (no layer on front side) + // and if hide back side pads is enabled, do not draw + if( !backVisible && !( m_layerMask & LSET::FrontMask() ).any() ) return; - PCB_BASE_FRAME* frame = (PCB_BASE_FRAME*) aPanel->GetParent(); PCB_SCREEN* screen = frame->GetScreen(); @@ -129,12 +126,12 @@ void D_PAD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDraw_mode, drawInfo.m_ShowPadFilled = false; EDA_COLOR_T color = BLACK; - if( m_layerMask & LAYER_FRONT ) + if( ( m_layerMask & LSET::FrontMask() ).any() ) { color = brd->GetVisibleElementColor( PAD_FR_VISIBLE ); } - if( m_layerMask & LAYER_BACK ) + if( ( m_layerMask & LSET::BackMask() ).any() ) { color = ColorMix( color, brd->GetVisibleElementColor( PAD_BK_VISIBLE ) ); } @@ -142,12 +139,14 @@ void D_PAD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDraw_mode, if( color == BLACK ) // Not on a visible copper layer (i.e. still nothing to show) { // If the pad is on only one tech layer, use the layer color else use DARKGRAY - LAYER_MSK mask_non_copper_layers = m_layerMask & ~ALL_CU_LAYERS; + LSET mask_non_copper_layers = m_layerMask & ~LSET::AllCuMask(); + #ifdef SHOW_PADMASK_REAL_SIZE_AND_COLOR mask_non_copper_layers &= brd->GetVisibleLayers(); #endif - LAYER_NUM pad_layer = ExtractLayer( mask_non_copper_layers ); - switch( pad_layer ) + LAYER_ID pad_layer = mask_non_copper_layers.ExtractLayer(); + + switch( (int) pad_layer ) { case UNDEFINED_LAYER: // More than one layer color = DARKGRAY; @@ -172,14 +171,16 @@ void D_PAD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDraw_mode, // when routing tracks if( frame && frame->GetToolId() == ID_TRACK_BUTT ) { - LAYER_NUM routeTop = screen->m_Route_Layer_TOP; - LAYER_NUM routeBot = screen->m_Route_Layer_BOTTOM; + LAYER_ID routeTop = screen->m_Route_Layer_TOP; + LAYER_ID routeBot = screen->m_Route_Layer_BOTTOM; // if routing between copper and component layers, // or the current layer is one of said 2 external copper layers, // then highlight only the current layer. - if( ( ::GetLayerMask( routeTop ) | ::GetLayerMask( routeBot ) ) == ( LAYER_BACK | LAYER_FRONT ) - || ( ::GetLayerMask( screen->m_Active_Layer ) & ( LAYER_BACK | LAYER_FRONT ) ) ) + if( ( screen->m_Active_Layer == F_Cu || screen->m_Active_Layer == B_Cu ) || + ( routeTop==F_Cu && routeBot==B_Cu ) || + ( routeTop==B_Cu && routeBot==F_Cu ) + ) { if( !IsOnLayer( screen->m_Active_Layer ) ) ColorTurnToDarkDarkGray( &color ); @@ -208,13 +209,13 @@ void D_PAD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDraw_mode, { switch( showActualMaskSize ) { - case SOLDERMASK_N_BACK: - case SOLDERMASK_N_FRONT: + case B_Mask: + case F_Mask: mask_margin.x = mask_margin.y = GetSolderMaskMargin(); break; - case SOLDERPASTE_N_BACK: - case SOLDERPASTE_N_FRONT: + case B_Paste: + case F_Paste: mask_margin = GetSolderPasteMargin(); break; @@ -239,13 +240,13 @@ void D_PAD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDraw_mode, // layer shows the pad size with the mask clearance switch( screen->m_Active_Layer ) { - case SOLDERMASK_N_BACK: - case SOLDERMASK_N_FRONT: + case B_Mask: + case F_Mask: mask_margin.x = mask_margin.y = GetSolderMaskMargin(); break; - case SOLDERPASTE_N_BACK: - case SOLDERPASTE_N_FRONT: + case B_Paste: + case F_Paste: mask_margin = GetSolderPasteMargin(); break; @@ -265,7 +266,7 @@ void D_PAD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDraw_mode, bool DisplayIsol = DisplayOpt.DisplayPadIsol; - if( ( m_layerMask & ALL_CU_LAYERS ) == 0 ) + if( !( m_layerMask & LSET::AllCuMask() ).any() ) DisplayIsol = false; if( ( GetAttribute() == PAD_HOLE_NOT_PLATED ) && @@ -462,11 +463,11 @@ void D_PAD::DrawShape( EDA_RECT* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo ) int dx0 = std::min( halfsize.x, halfsize.y ); EDA_COLOR_T nc_color = BLUE; - if( m_layerMask & LAYER_FRONT ) /* Draw \ */ + if( m_layerMask[F_Cu] ) /* Draw \ */ GRLine( aClipBox, aDC, holepos.x - dx0, holepos.y - dx0, holepos.x + dx0, holepos.y + dx0, 0, nc_color ); - if( m_layerMask & LAYER_BACK ) // Draw / + if( m_layerMask[B_Cu] ) // Draw / GRLine( aClipBox, aDC, holepos.x + dx0, holepos.y - dx0, holepos.x - dx0, holepos.y + dx0, 0, nc_color ); } diff --git a/pcbnew/class_pcb_layer_box_selector.cpp b/pcbnew/class_pcb_layer_box_selector.cpp index fb68ddbdb7..7b56b7d27e 100644 --- a/pcbnew/class_pcb_layer_box_selector.cpp +++ b/pcbnew/class_pcb_layer_box_selector.cpp @@ -40,6 +40,28 @@ #include + +#define DECLARE_LAYERS_HOTKEY(list) int list[] = \ + { \ + HK_SWITCH_LAYER_TO_COPPER, \ + HK_SWITCH_LAYER_TO_INNER1, \ + HK_SWITCH_LAYER_TO_INNER2, \ + HK_SWITCH_LAYER_TO_INNER3, \ + HK_SWITCH_LAYER_TO_INNER4, \ + HK_SWITCH_LAYER_TO_INNER5, \ + HK_SWITCH_LAYER_TO_INNER6, \ + HK_SWITCH_LAYER_TO_INNER7, \ + HK_SWITCH_LAYER_TO_INNER8, \ + HK_SWITCH_LAYER_TO_INNER9, \ + HK_SWITCH_LAYER_TO_INNER10, \ + HK_SWITCH_LAYER_TO_INNER11, \ + HK_SWITCH_LAYER_TO_INNER12, \ + HK_SWITCH_LAYER_TO_INNER13, \ + HK_SWITCH_LAYER_TO_INNER14, \ + HK_SWITCH_LAYER_TO_COMPONENT \ + }; + + // class to display a layer list in a wxBitmapComboBox. // Reload the Layers @@ -47,38 +69,35 @@ void PCB_LAYER_BOX_SELECTOR::Resync() { Clear(); - static DECLARE_LAYERS_ORDER_LIST( layertranscode ); - static DECLARE_LAYERS_HOTKEY( layerhk ); + static const DECLARE_LAYERS_HOTKEY( layerhk ); // Tray to fix a minimum width fot the BitmapComboBox int minwidth = 80, h; + wxClientDC dc( GetParent() ); // The DC for "this" is not always initialized #define BM_SIZE 14 - for( LAYER_NUM i = FIRST_LAYER; i < NB_LAYERS; ++i ) + + LSET show = getEnabledLayers() & ~m_layerMaskDisable; + + for( LSEQ seq = show.UIOrder(); seq; ++seq ) { + LAYER_ID layerid = *seq; + wxBitmap layerbmp( BM_SIZE, BM_SIZE ); - wxString layername; - LAYER_NUM layerid = i; - - if( m_layerorder ) - layerid = layertranscode[i]; - - if( ! IsLayerEnabled( layerid ) ) - continue; - - if( ( m_layerMaskDisable & GetLayerMask( layerid ) ) ) - continue; SetBitmapLayer( layerbmp, layerid ); - layername = GetLayerName( layerid ); + wxString layername = GetLayerName( layerid ); - if( m_layerhotkeys && m_hotkeys != NULL ) + if( m_layerhotkeys && m_hotkeys && layerid < DIM(layerhk) ) + { layername = AddHotkeyName( layername, m_hotkeys, layerhk[layerid], IS_COMMENT ); + } Append( layername, layerbmp, (void*)(intptr_t) layerid ); + int w; dc.GetTextExtent ( layername, &w, &h ); minwidth = std::max( minwidth, w ); @@ -96,27 +115,38 @@ bool PCB_LAYER_BOX_SELECTOR::IsLayerEnabled( LAYER_NUM aLayer ) const BOARD* board = m_boardFrame->GetBoard(); wxASSERT( board != NULL ); - return board->IsLayerEnabled( aLayer ); + return board->IsLayerEnabled( (LAYER_ID) aLayer ); +} + + +LSET PCB_LAYER_BOX_SELECTOR::getEnabledLayers() const +{ + wxASSERT( m_boardFrame != NULL ); + BOARD* board = m_boardFrame->GetBoard(); + wxASSERT( board != NULL ); + + return board->GetEnabledLayers(); } // Returns a color index from the layer id EDA_COLOR_T PCB_LAYER_BOX_SELECTOR::GetLayerColor( LAYER_NUM aLayer ) const { - wxASSERT( m_boardFrame != NULL ); + wxASSERT( m_boardFrame ); BOARD* board = m_boardFrame->GetBoard(); - wxASSERT( board != NULL ); + wxASSERT( board ); - return board->GetLayerColor( aLayer ); + return board->GetLayerColor( (LAYER_ID) aLayer ); } // Returns the name of the layer id wxString PCB_LAYER_BOX_SELECTOR::GetLayerName( LAYER_NUM aLayer ) const { - wxASSERT( m_boardFrame != NULL ); + wxASSERT( m_boardFrame ); BOARD* board = m_boardFrame->GetBoard(); - wxASSERT( board != NULL ); + wxASSERT( board ); - return board->GetLayerName( aLayer ); + return board->GetLayerName( (LAYER_ID) aLayer ); } + diff --git a/pcbnew/class_pcb_layer_box_selector.h b/pcbnew/class_pcb_layer_box_selector.h index 5ac87e5da4..7dbad7000f 100644 --- a/pcbnew/class_pcb_layer_box_selector.h +++ b/pcbnew/class_pcb_layer_box_selector.h @@ -5,17 +5,18 @@ class PCB_BASE_FRAME; -/* class to display a pcb layer list in a wxBitmapComboBox. +/** + * Class to display a pcb layer list in a wxBitmapComboBox. */ - class PCB_LAYER_BOX_SELECTOR : public LAYER_BOX_SELECTOR { - PCB_BASE_FRAME * m_boardFrame; - LAYER_MSK m_layerMaskDisable; // A mask to remove some layers from layer list + PCB_BASE_FRAME* m_boardFrame; + + LSET m_layerMaskDisable; // A mask to remove some layers from layer list public: // Hotkey Info - struct EDA_HOTKEY_CONFIG* m_hotkeys; + EDA_HOTKEY_CONFIG* m_hotkeys; public: // If you are thinking the constructor is a bit curious, @@ -27,8 +28,8 @@ public: const wxString& value = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL, int style = 0 ) - :LAYER_BOX_SELECTOR( parent, id, pos, size, n, choices ) + int n = 0, const wxString choices[] = NULL, int style = 0 ) : + LAYER_BOX_SELECTOR( parent, id, pos, size, n, choices ) { m_boardFrame = NULL; m_layerMaskDisable = 0; @@ -39,11 +40,11 @@ public: // SetBoardFrame should be called after creating a PCB_LAYER_BOX_SELECTOR // It is not passed through the constructor because when using wxFormBuilder // we should use a constructor compatible with a wxBitmapComboBox - void SetBoardFrame( PCB_BASE_FRAME * aFrame ) { m_boardFrame = aFrame; }; + void SetBoardFrame( PCB_BASE_FRAME* aFrame ) { m_boardFrame = aFrame; }; - // SetLayerMask allows disableing some layers, whiech are not + // SetLayerSet allows disableing some layers, which are not // shown in list; - void SetLayerMask( LAYER_MSK aMask ) { m_layerMaskDisable = aMask; } + void SetLayerSet( LSET aMask ) { m_layerMaskDisable = aMask; } // Reload the Layers names and bitmaps // Virtual function @@ -61,6 +62,8 @@ private: // Returns the name of the layer id // Virtual function wxString GetLayerName( LAYER_NUM aLayer ) const; + + LSET getEnabledLayers() const; }; -#endif //CLASS_PCB_PCB_LAYER_BOX_SELECTOR_H +#endif // CLASS_PCB_PCB_LAYER_BOX_SELECTOR_H diff --git a/pcbnew/class_pcb_layer_widget.cpp b/pcbnew/class_pcb_layer_widget.cpp index 944019e286..3e70199ae7 100644 --- a/pcbnew/class_pcb_layer_widget.cpp +++ b/pcbnew/class_pcb_layer_widget.cpp @@ -168,7 +168,8 @@ void PCB_LAYER_WIDGET::onPopupSelection( wxCommandEvent& event ) for( int row = rowCount-1; row>=0; --row ) { wxCheckBox* cb = (wxCheckBox*) getLayerComp( row, 3 ); - LAYER_NUM layer = getDecodedId( cb->GetId() ); + LAYER_ID layer = (LAYER_ID) getDecodedId( cb->GetId() ); + if( IsCopperLayer( layer ) ) { lastCu = row; @@ -180,11 +181,12 @@ void PCB_LAYER_WIDGET::onPopupSelection( wxCommandEvent& event ) for( int row=0; rowGetId() ); + LAYER_ID layer = (LAYER_ID) getDecodedId( cb->GetId() ); if( IsCopperLayer( layer ) ) { bool loc_visible = visible; + if( force_active_layer_visible && (layer == myframe->GetActiveLayer() ) ) loc_visible = true; @@ -221,14 +223,16 @@ void PCB_LAYER_WIDGET::ReFillRender() for( unsigned row=0; rowGetVisibleElementColor( renderRow.id ); } + renderRow.state = board->IsElementVisible( renderRow.id ); AppendRenderRow( renderRow ); @@ -262,7 +266,7 @@ void PCB_LAYER_WIDGET::SyncLayerVisibilities() wxWindow* w = getLayerComp( row, 0 ); - LAYER_NUM layerId = getDecodedId( w->GetId() ); + LAYER_ID layerId = (LAYER_ID) getDecodedId( w->GetId() ); // this does not fire a UI event SetLayerVisible( layerId, board->IsLayerVisible( layerId ) ); @@ -273,35 +277,35 @@ void PCB_LAYER_WIDGET::SyncLayerVisibilities() void PCB_LAYER_WIDGET::ReFill() { BOARD* brd = myframe->GetBoard(); - int enabledLayers = brd->GetEnabledLayers(); + LSET enabled = brd->GetEnabledLayers(); ClearLayerRows(); + wxString dsc; + // show all coppers first, with front on top, back on bottom, then technical layers - for( LAYER_NUM layer = LAYER_N_FRONT; layer >= FIRST_LAYER; --layer ) + for( LSEQ cu_stack = enabled.CuStack(); cu_stack; ++cu_stack ) { - if( enabledLayers & GetLayerMask( layer ) ) + LAYER_ID layer = *cu_stack; + + switch( layer ) { - wxString dsc; - switch( layer ) - { - case LAYER_N_FRONT: - dsc = _("Front copper layer"); - break; + case F_Cu: + dsc = _("Front copper layer"); + break; - case LAYER_N_BACK: - dsc = _("Back copper layer"); - break; + case B_Cu: + dsc = _("Back copper layer"); + break; - default: - dsc = _("Inner copper layer"); - break; - } - - AppendLayerRow( LAYER_WIDGET::ROW( - brd->GetLayerName( layer ), layer, brd->GetLayerColor( layer ), - dsc, true ) ); + default: + dsc = _("Inner copper layer"); + break; } + + AppendLayerRow( LAYER_WIDGET::ROW( + brd->GetLayerName( layer ), layer, brd->GetLayerColor( layer ), + dsc, true ) ); } @@ -309,34 +313,35 @@ void PCB_LAYER_WIDGET::ReFill() // Because they are static, wxGetTranslation must be explicitely // called for tooltips. static const struct { - LAYER_NUM layerId; + LAYER_ID layerId; wxString tooltip; - } techLayerSeq[] = { - { ADHESIVE_N_FRONT, _( "Adhesive on board's front" ) }, - { ADHESIVE_N_BACK, _( "Adhesive on board's back" ) }, - { SOLDERPASTE_N_FRONT, _( "Solder paste on board's front" )}, - { SOLDERPASTE_N_BACK, _( "Solder paste on board's back" ) }, - { SILKSCREEN_N_FRONT, _( "Silkscreen on board's front" ) }, - { SILKSCREEN_N_BACK, _( "Silkscreen on board's back" ) }, - { SOLDERMASK_N_FRONT, _( "Solder mask on board's front" ) }, - { SOLDERMASK_N_BACK, _( "Solder mask on board's back" ) }, - { DRAW_N, _( "Explanatory drawings" ) }, - { COMMENT_N, _( "Explanatory comments" ) }, - { ECO1_N, _( "User defined meaning" ) }, - { ECO2_N, _( "User defined meaning" ) }, - { EDGE_N, _( "Board's perimeter definition" ) }, + } non_cu_seq[] = { + { F_Adhes, _( "Adhesive on board's front" ) }, + { B_Adhes, _( "Adhesive on board's back" ) }, + { F_Paste, _( "Solder paste on board's front" ) }, + { B_Paste, _( "Solder paste on board's back" ) }, + { F_SilkS, _( "Silkscreen on board's front" ) }, + { B_SilkS, _( "Silkscreen on board's back" ) }, + { F_Mask, _( "Solder mask on board's front" ) }, + { B_Mask, _( "Solder mask on board's back" ) }, + { Dwgs_User, _( "Explanatory drawings" ) }, + { Cmts_User, _( "Explanatory comments" ) }, + { Eco1_User, _( "User defined meaning" ) }, + { Eco2_User, _( "User defined meaning" ) }, + { Edge_Cuts, _( "Board's perimeter definition" ) }, + { Margin, _( "Board's edge setback outline" ) }, }; - for( unsigned i=0; iGetLayerName( layer ), layer, brd->GetLayerColor( layer ), - wxGetTranslation( techLayerSeq[i].tooltip ), true ) ); + wxGetTranslation( non_cu_seq[i].tooltip ), true ) ); } installRightLayerClickHandler(); @@ -344,9 +349,9 @@ void PCB_LAYER_WIDGET::ReFill() //------------------------------------------------ -void PCB_LAYER_WIDGET::OnLayerColorChange( LAYER_NUM aLayer, EDA_COLOR_T aColor ) +void PCB_LAYER_WIDGET::OnLayerColorChange( int aLayer, EDA_COLOR_T aColor ) { - myframe->GetBoard()->SetLayerColor( aLayer, aColor ); + myframe->GetBoard()->SetLayerColor( (LAYER_ID) aLayer, aColor ); myframe->ReCreateLayerBox( false ); if( myframe->IsGalCanvasActive() ) @@ -360,11 +365,11 @@ void PCB_LAYER_WIDGET::OnLayerColorChange( LAYER_NUM aLayer, EDA_COLOR_T aColor } -bool PCB_LAYER_WIDGET::OnLayerSelect( LAYER_NUM aLayer ) +bool PCB_LAYER_WIDGET::OnLayerSelect( int aLayer ) { // the layer change from the PCB_LAYER_WIDGET can be denied by returning // false from this function. - myframe->SetActiveLayer( aLayer, false ); + myframe->SetActiveLayer( (LAYER_ID) aLayer, false ); if( m_alwaysShowActiveCopperLayer ) OnLayerSelected(); @@ -390,16 +395,13 @@ bool PCB_LAYER_WIDGET::OnLayerSelected() } -void PCB_LAYER_WIDGET::OnLayerVisible( LAYER_NUM aLayer, bool isVisible, bool isFinal ) +void PCB_LAYER_WIDGET::OnLayerVisible( int aLayer, bool isVisible, bool isFinal ) { BOARD* brd = myframe->GetBoard(); - LAYER_MSK visibleLayers = brd->GetVisibleLayers(); + LSET visibleLayers = brd->GetVisibleLayers(); - if( isVisible ) - visibleLayers |= GetLayerMask( aLayer ); - else - visibleLayers &= ~GetLayerMask( aLayer ); + visibleLayers.set( aLayer, isVisible ); brd->SetVisibleLayers( visibleLayers ); @@ -425,9 +427,11 @@ void PCB_LAYER_WIDGET::OnRenderColorChange( int aId, EDA_COLOR_T aColor ) void PCB_LAYER_WIDGET::OnRenderEnable( int aId, bool isEnabled ) { BOARD* brd = myframe->GetBoard(); + brd->SetElementVisibility( aId, isEnabled ); EDA_DRAW_PANEL_GAL* galCanvas = myframe->GetGalCanvas(); + if( galCanvas ) { if( aId == GRID_VISIBLE ) diff --git a/pcbnew/class_pcb_layer_widget.h b/pcbnew/class_pcb_layer_widget.h index b825875291..4f7d715367 100644 --- a/pcbnew/class_pcb_layer_widget.h +++ b/pcbnew/class_pcb_layer_widget.h @@ -82,9 +82,9 @@ public: void SetLayersManagerTabsText(); //---------------- - void OnLayerColorChange( LAYER_NUM aLayer, EDA_COLOR_T aColor ); - bool OnLayerSelect( LAYER_NUM aLayer ); - void OnLayerVisible( LAYER_NUM aLayer, bool isVisible, bool isFinal ); + void OnLayerColorChange( int aLayer, EDA_COLOR_T aColor ); + bool OnLayerSelect( int aLayer ); + void OnLayerVisible( int aLayer, bool isVisible, bool isFinal ); void OnRenderColorChange( int aId, EDA_COLOR_T aColor ); void OnRenderEnable( int aId, bool isEnabled ); //--------------- diff --git a/pcbnew/class_text_mod.cpp b/pcbnew/class_text_mod.cpp index b103869775..5eda7cba6e 100644 --- a/pcbnew/class_text_mod.cpp +++ b/pcbnew/class_text_mod.cpp @@ -62,7 +62,7 @@ TEXTE_MODULE::TEXTE_MODULE( MODULE* parent, TEXT_TYPE text_type ) : // Set text tickness to a default value m_Thickness = Millimeter2iu( 0.15 ); - SetLayer( SILKSCREEN_N_FRONT ); + SetLayer( F_SilkS ); if( module && ( module->Type() == PCB_MODULE_T ) ) { @@ -70,12 +70,12 @@ TEXTE_MODULE::TEXTE_MODULE( MODULE* parent, TEXT_TYPE text_type ) : if( IsBackLayer( module->GetLayer() ) ) { - SetLayer( SILKSCREEN_N_BACK ); + SetLayer( B_SilkS ); m_Mirror = true; } else { - SetLayer( SILKSCREEN_N_FRONT ); + SetLayer( F_SilkS ); m_Mirror = false; } } @@ -224,13 +224,13 @@ void TEXTE_MODULE::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE draw_mode, // Determine the element color or suppress it element if hidden switch( module->GetLayer() ) { - case LAYER_N_BACK: + case B_Cu: if( !brd->IsElementVisible( MOD_TEXT_BK_VISIBLE ) ) return; color = brd->GetVisibleElementColor( MOD_TEXT_BK_VISIBLE ); break; - case LAYER_N_FRONT: + case F_Cu: if( !brd->IsElementVisible( MOD_TEXT_FR_VISIBLE ) ) return; color = brd->GetVisibleElementColor( MOD_TEXT_FR_VISIBLE ); @@ -448,12 +448,12 @@ void TEXTE_MODULE::ViewGetLayers( int aLayers[], int& aCount ) const default: switch( GetParent()->GetLayer() ) { - case LAYER_N_BACK: - aLayers[0] = ITEM_GAL_LAYER( MOD_TEXT_BK_VISIBLE ); // how about SILKSCREEN_N_BACK? + case B_Cu: + aLayers[0] = ITEM_GAL_LAYER( MOD_TEXT_BK_VISIBLE ); // how about B_SilkS? break; - case LAYER_N_FRONT: - aLayers[0] = ITEM_GAL_LAYER( MOD_TEXT_FR_VISIBLE ); // how about SILKSCREEN_N_FRONT? + case F_Cu: + aLayers[0] = ITEM_GAL_LAYER( MOD_TEXT_FR_VISIBLE ); // how about F_SilkS? break; default: diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index 183cad4241..d449c614fd 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -67,7 +67,7 @@ static bool ShowClearance( const TRACK* aTrack ) TRACK* GetTrack( TRACK* aStartTrace, const TRACK* aEndTrace, - const wxPoint& aPosition, LAYER_MSK aLayerMask ) + const wxPoint& aPosition, LSET aLayerMask ) { for( TRACK *PtSegm = aStartTrace; PtSegm != NULL; PtSegm = PtSegm->Next() ) { @@ -75,13 +75,13 @@ TRACK* GetTrack( TRACK* aStartTrace, const TRACK* aEndTrace, { if( aPosition == PtSegm->GetStart() ) { - if( aLayerMask & PtSegm->GetLayerMask() ) + if( ( aLayerMask & PtSegm->GetLayerSet() ).any() ) return PtSegm; } if( aPosition == PtSegm->GetEnd() ) { - if( aLayerMask & PtSegm->GetLayerMask() ) + if( ( aLayerMask & PtSegm->GetLayerSet() ).any() ) return PtSegm; } } @@ -154,7 +154,7 @@ VIA::VIA( BOARD_ITEM* aParent ) : TRACK( aParent, PCB_VIA_T ) { SetViaType( VIA_THROUGH ); - m_BottomLayer = LAYER_N_BACK; + m_BottomLayer = B_Cu; SetDrillDefault(); } @@ -191,8 +191,8 @@ wxString VIA::GetSelectMenuText() const wxString netname = GetNetname(); // say which layers, only two for now - LAYER_NUM topLayer; - LAYER_NUM botLayer; + LAYER_ID topLayer; + LAYER_ID botLayer; LayerPair( &topLayer, &botLayer ); text.Printf( format.GetData(), GetChars( ShowWidth() ), GetChars( netname ), GetNetCode(), @@ -371,9 +371,9 @@ SEARCH_RESULT TRACK::Visit( INSPECTOR* inspector, const void* testData, } -bool VIA::IsOnLayer( LAYER_NUM layer_number ) const +bool VIA::IsOnLayer( LAYER_ID layer_number ) const { - LAYER_NUM bottom_layer, top_layer; + LAYER_ID bottom_layer, top_layer; LayerPair( &top_layer, &bottom_layer ); @@ -383,41 +383,43 @@ bool VIA::IsOnLayer( LAYER_NUM layer_number ) const return false; } -LAYER_MSK VIA::GetLayerMask() const + +LSET VIA::GetLayerSet() const { if( GetViaType() == VIA_THROUGH ) - return ALL_CU_LAYERS; + return LSET::AllCuMask(); // VIA_BLIND_BURIED or VIA_MICRVIA: - LAYER_NUM bottom_layer, top_layer; + LAYER_ID bottom_layer, top_layer; // LayerPair() knows how layers are stored LayerPair( &top_layer, &bottom_layer ); - LAYER_MSK layermask = NO_LAYERS; + LSET layermask; - while( bottom_layer <= top_layer ) + // LAYER_IDs are numbered from front to back, this is top to bottom. + for( LAYER_NUM id = top_layer; id <= bottom_layer; ++id ) { - layermask |= ::GetLayerMask( bottom_layer ); - ++bottom_layer; + layermask.set( id ); } return layermask; } -LAYER_MSK TRACK::GetLayerMask() const + +LSET TRACK::GetLayerSet() const { - return ::GetLayerMask( m_Layer ); + return LSET( m_Layer ); } -void VIA::SetLayerPair( LAYER_NUM aTopLayer, LAYER_NUM aBottomLayer ) +void VIA::SetLayerPair( LAYER_ID aTopLayer, LAYER_ID aBottomLayer ) { if( GetViaType() == VIA_THROUGH ) { - aTopLayer = LAYER_N_FRONT; - aBottomLayer = LAYER_N_BACK; + aTopLayer = F_Cu; + aBottomLayer = B_Cu; } if( aBottomLayer > aTopLayer ) @@ -428,10 +430,10 @@ void VIA::SetLayerPair( LAYER_NUM aTopLayer, LAYER_NUM aBottomLayer ) } -void VIA::LayerPair( LAYER_NUM* top_layer, LAYER_NUM* bottom_layer ) const +void VIA::LayerPair( LAYER_ID* top_layer, LAYER_ID* bottom_layer ) const { - LAYER_NUM b_layer = LAYER_N_BACK; - LAYER_NUM t_layer = LAYER_N_FRONT; + LAYER_ID b_layer = B_Cu; + LAYER_ID t_layer = F_Cu; if( GetViaType() != VIA_THROUGH ) { @@ -594,7 +596,7 @@ void TRACK::DrawShortNetname( EDA_DRAW_PANEL* panel, } } - LAYER_NUM curr_layer = ( (PCB_SCREEN*) panel->GetScreen() )->m_Active_Layer; + LAYER_ID curr_layer = ( (PCB_SCREEN*) panel->GetScreen() )->m_Active_Layer; if( ( aDC->LogicalToDeviceXRel( tsize ) >= MIN_TEXT_SIZE ) && ( !(!IsOnLayer( curr_layer )&& DisplayOpt.ContrastModeDisplay) ) ) { @@ -630,7 +632,7 @@ void TRACK::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, if( ( aDrawMode & GR_ALLOW_HIGHCONTRAST ) && DisplayOpt.ContrastModeDisplay ) { - LAYER_NUM curr_layer = ( (PCB_SCREEN*) panel->GetScreen() )->m_Active_Layer; + LAYER_ID curr_layer = ( (PCB_SCREEN*) panel->GetScreen() )->m_Active_Layer; if( !IsOnLayer( curr_layer ) ) ColorTurnToDarkDarkGray( &color ); @@ -697,7 +699,7 @@ void SEGZONE::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, if( ( aDrawMode & GR_ALLOW_HIGHCONTRAST ) && DisplayOpt.ContrastModeDisplay ) { - LAYER_NUM curr_layer = ( (PCB_SCREEN*) panel->GetScreen() )->m_Active_Layer; + LAYER_ID curr_layer = ( (PCB_SCREEN*) panel->GetScreen() )->m_Active_Layer; if( !IsOnLayer( curr_layer ) ) ColorTurnToDarkDarkGray( &color ); @@ -761,7 +763,7 @@ void VIA::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, const wxPoint& aOffset ) { int radius; - LAYER_NUM curr_layer = ( (PCB_SCREEN*) panel->GetScreen() )->m_Active_Layer; + LAYER_ID curr_layer = ( (PCB_SCREEN*) panel->GetScreen() )->m_Active_Layer; int fillvia = 0; PCB_BASE_FRAME* frame = (PCB_BASE_FRAME*) panel->GetParent(); @@ -876,7 +878,7 @@ void VIA::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, { int ax, ay, bx, by; - if( IsOnLayer( LAYER_N_BACK ) ) + if( IsOnLayer( B_Cu ) ) { ax = radius; ay = 0; bx = drill_radius; by = 0; @@ -887,7 +889,7 @@ void VIA::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, bx = by = (drill_radius * 707) / 1000; } - /* lines | or \ */ + // lines '|' or '\' GRLine( panel->GetClipBox(), aDC, m_Start.x + aOffset.x - ax, m_Start.y + aOffset.y - ay, m_Start.x + aOffset.x - bx, @@ -897,7 +899,7 @@ void VIA::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, m_Start.x + aOffset.x + ax, m_Start.y + aOffset.y + ay, 0, color ); - // lines - or / + // lines - or '/' GRLine( panel->GetClipBox(), aDC, m_Start.x + aOffset.x + ay, m_Start.y + aOffset.y - ax, m_Start.x + aOffset.x + by, @@ -913,7 +915,7 @@ void VIA::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, if( GetViaType() == VIA_BLIND_BURIED ) { int ax = 0, ay = radius, bx = 0, by = drill_radius; - LAYER_NUM layer_top, layer_bottom; + LAYER_ID layer_top, layer_bottom; ( (VIA*) this )->LayerPair( &layer_top, &layer_bottom ); @@ -1175,7 +1177,7 @@ void VIA::GetMsgPanelInfoBase( std::vector< MSG_PANEL_ITEM >& aList ) // Display layer pair - LAYER_NUM top_layer, bottom_layer; + LAYER_ID top_layer, bottom_layer; LayerPair( &top_layer, &bottom_layer ); if( board ) @@ -1253,9 +1255,10 @@ bool VIA::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const return arect.Intersects( box ); } -VIA* TRACK::GetVia( const wxPoint& aPosition, LAYER_NUM aLayer) + +VIA* TRACK::GetVia( const wxPoint& aPosition, LAYER_ID aLayer) { - for( VIA *via = GetFirstVia( this ); via; via = GetFirstVia( via->Next() ) ) + for( VIA* via = GetFirstVia( this ); via; via = GetFirstVia( via->Next() ) ) { if( via->HitTest( aPosition ) && !via->GetState( BUSY | IS_DELETED ) && @@ -1267,14 +1270,17 @@ VIA* TRACK::GetVia( const wxPoint& aPosition, LAYER_NUM aLayer) } -VIA* TRACK::GetVia( TRACK* aEndTrace, const wxPoint& aPosition, LAYER_MSK aLayerMask ) +VIA* TRACK::GetVia( TRACK* aEndTrace, const wxPoint& aPosition, LSET aLayerMask ) { - for( VIA *via = GetFirstVia( this, aEndTrace ); via; via = GetFirstVia( via->Next() ) ) + for( VIA* via = GetFirstVia( this, aEndTrace ); via; via = GetFirstVia( via->Next() ) ) { if( via->HitTest( aPosition ) && - !via->GetState( BUSY | IS_DELETED ) && - (aLayerMask & via->GetLayerMask()) ) + !via->GetState( BUSY | IS_DELETED ) && + ( aLayerMask & via->GetLayerSet() ).any() + ) + { return via; + } } return NULL; @@ -1284,10 +1290,10 @@ VIA* TRACK::GetVia( TRACK* aEndTrace, const wxPoint& aPosition, LAYER_MSK aLayer TRACK* TRACK::GetTrack( TRACK* aStartTrace, TRACK* aEndTrace, ENDPOINT_T aEndPoint, bool aSameNetOnly, bool aSequential ) { - const wxPoint &position = GetEndPoint( aEndPoint ); - LAYER_MSK refLayers = GetLayerMask(); - TRACK *previousSegment; - TRACK *nextSegment; + const wxPoint& position = GetEndPoint( aEndPoint ); + LSET refLayers = GetLayerSet(); + TRACK* previousSegment; + TRACK* nextSegment; if( aSequential ) { @@ -1321,7 +1327,7 @@ TRACK* TRACK::GetTrack( TRACK* aStartTrace, TRACK* aEndTrace, ENDPOINT_T aEndPoi { if ( (nextSegment != this) && !nextSegment->GetState( BUSY | IS_DELETED ) && - (refLayers & nextSegment->GetLayerMask()) ) + ( refLayers & nextSegment->GetLayerSet() ).any() ) { if( (position == nextSegment->m_Start) || (position == nextSegment->m_End) ) @@ -1338,9 +1344,10 @@ TRACK* TRACK::GetTrack( TRACK* aStartTrace, TRACK* aEndTrace, ENDPOINT_T aEndPoi // Same as above, looking back. During sequential search this branch is inactive if( previousSegment ) { - if ( (previousSegment != this) && - !previousSegment->GetState( BUSY | IS_DELETED ) && - (refLayers & previousSegment->GetLayerMask()) ) + if( (previousSegment != this) && + !previousSegment->GetState( BUSY | IS_DELETED ) && + ( refLayers & previousSegment->GetLayerSet() ).any() + ) { if( (position == previousSegment->m_Start) || (position == previousSegment->m_End) ) @@ -1362,7 +1369,7 @@ int TRACK::GetEndSegments( int aCount, TRACK** aStartTrace, TRACK** aEndTrace ) { TRACK* Track, * via, * segm, * TrackListEnd; int NbEnds, ii, ok = 0; - LAYER_MSK layerMask; + LSET layerMask; if( aCount <= 1 ) { @@ -1370,7 +1377,7 @@ int TRACK::GetEndSegments( int aCount, TRACK** aStartTrace, TRACK** aEndTrace ) return 1; } - /* Calculation of the limit analysis. */ + // Calculation of the limit analysis. *aStartTrace = *aEndTrace = NULL; TrackListEnd = Track = this; ii = 0; @@ -1381,7 +1388,7 @@ int TRACK::GetEndSegments( int aCount, TRACK** aStartTrace, TRACK** aEndTrace ) Track->m_Param = 0; } - /* Calculate the extremes. */ + // Calculate the extremes. NbEnds = 0; Track = this; ii = 0; @@ -1391,12 +1398,12 @@ int TRACK::GetEndSegments( int aCount, TRACK** aStartTrace, TRACK** aEndTrace ) if( Track->Type() == PCB_VIA_T ) continue; - layerMask = Track->GetLayerMask(); + layerMask = Track->GetLayerSet(); via = GetVia( TrackListEnd, Track->m_Start, layerMask ); if( via ) { - layerMask |= via->GetLayerMask(); + layerMask |= via->GetLayerSet(); via->SetState( BUSY, true ); } @@ -1419,7 +1426,7 @@ int TRACK::GetEndSegments( int aCount, TRACK** aStartTrace, TRACK** aEndTrace ) int BeginPad, EndPad; *aEndTrace = Track; - /* Swap ox, oy with fx, fy */ + // Swap ox, oy with fx, fy BeginPad = Track->GetState( BEGIN_ONPAD ); EndPad = Track->GetState( END_ONPAD ); @@ -1438,12 +1445,12 @@ int TRACK::GetEndSegments( int aCount, TRACK** aStartTrace, TRACK** aEndTrace ) } } - layerMask = Track->GetLayerMask(); + layerMask = Track->GetLayerSet(); via = GetVia( TrackListEnd, Track->m_End, layerMask ); if( via ) { - layerMask |= via->GetLayerMask(); + layerMask |= via->GetLayerSet(); via->SetState( BUSY, true ); } @@ -1463,7 +1470,7 @@ int TRACK::GetEndSegments( int aCount, TRACK** aStartTrace, TRACK** aEndTrace ) *aStartTrace = Track; NbEnds++; - /* Swap ox, oy with fx, fy */ + // Swap ox, oy with fx, fy BeginPad = Track->GetState( BEGIN_ONPAD ); EndPad = Track->GetState( END_ONPAD ); diff --git a/pcbnew/class_track.h b/pcbnew/class_track.h index 258586d3f7..32f61295cb 100644 --- a/pcbnew/class_track.h +++ b/pcbnew/class_track.h @@ -74,8 +74,8 @@ enum VIATYPE_T * layer mask. * @return A TRACK object pointer if found otherwise NULL. */ -extern TRACK* GetTrack( TRACK* aStartTrace, const TRACK* aEndTrace, - const wxPoint& aPosition, LAYER_MSK aLayerMask ); +TRACK* GetTrack( TRACK* aStartTrace, const TRACK* aEndTrace, + const wxPoint& aPosition, LSET aLayerMask ); class TRACK : public BOARD_CONNECTED_ITEM { @@ -188,7 +188,7 @@ public: * TRACK segment or VIA physically resides. * @return int - a layer mask, see pcbstruct.h's LAYER_BACK, etc. */ - virtual LAYER_MSK GetLayerMask() const; + virtual LSET GetLayerSet() const; /** * Function IsPointOnEnds @@ -232,7 +232,7 @@ public: * @param aLayer The layer to match, pass -1 for a don't care. * @return A pointer to a VIA object if found, else NULL. */ - VIA* GetVia( const wxPoint& aPosition, LAYER_NUM aLayer = UNDEFINED_LAYER ); + VIA* GetVia( const wxPoint& aPosition, LAYER_ID aLayer = UNDEFINED_LAYER ); /** * Function GetVia @@ -244,7 +244,7 @@ public: * @param aLayerMask The layers to match, pass -1 for a don't care. * @return A pointer to a VIA object if found, else NULL. */ - VIA* GetVia( TRACK* aEndTrace, const wxPoint& aPosition, LAYER_MSK aLayerMask ); + VIA* GetVia( TRACK* aEndTrace, const wxPoint& aPosition, LSET aLayerMask ); /** * Function GetTrack @@ -390,9 +390,9 @@ public: void Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE aDrawMode, const wxPoint& aOffset = ZeroOffset ); - bool IsOnLayer( LAYER_NUM aLayer ) const; + bool IsOnLayer( LAYER_ID aLayer ) const; - virtual LAYER_MSK GetLayerMask() const; + virtual LSET GetLayerSet() const; /** * Function SetLayerPair @@ -401,7 +401,7 @@ public: * @param top_layer = first layer connected by the via * @param bottom_layer = last layer connected by the via */ - void SetLayerPair( LAYER_NUM aTopLayer, LAYER_NUM aBottomLayer ); + void SetLayerPair( LAYER_ID aTopLayer, LAYER_ID aBottomLayer ); /** * Function LayerPair @@ -410,7 +410,7 @@ public: * @param top_layer = pointer to the first layer (can be null) * @param bottom_layer = pointer to the last layer (can be null) */ - void LayerPair( LAYER_NUM* top_layer, LAYER_NUM* bottom_layer ) const; + void LayerPair( LAYER_ID* top_layer, LAYER_ID* bottom_layer ) const; const wxPoint& GetPosition() const { return m_Start; } // was overload void SetPosition( const wxPoint& aPoint ) { m_Start = aPoint; m_End = aPoint; } // was overload @@ -481,15 +481,16 @@ protected: private: /// The bottom layer of the via (the top layer is in m_Layer) - LAYER_NUM m_BottomLayer; + LAYER_ID m_BottomLayer; VIATYPE_T m_ViaType; // Type of via int m_Drill; // for vias: via drill (- 1 for default value) }; + /// Scan a track list for the first VIA o NULL if not found (or NULL passed) -inline VIA *GetFirstVia( TRACK *aTrk, const TRACK *aStopPoint = NULL ) +inline VIA* GetFirstVia( TRACK* aTrk, const TRACK* aStopPoint = NULL ) { while( aTrk && (aTrk != aStopPoint) && (aTrk->Type() != PCB_VIA_T) ) aTrk = aTrk->Next(); @@ -501,4 +502,4 @@ inline VIA *GetFirstVia( TRACK *aTrk, const TRACK *aStopPoint = NULL ) return NULL; } -#endif /* CLASS_TRACK_H */ +#endif // CLASS_TRACK_H diff --git a/pcbnew/class_zone.h b/pcbnew/class_zone.h index 332fc84144..9203b0757b 100644 --- a/pcbnew/class_zone.h +++ b/pcbnew/class_zone.h @@ -181,9 +181,9 @@ public: * Function IsOnCopperLayer * @return true if this zone is on a copper layer, false if on a technical layer */ - bool IsOnCopperLayer( void ) const + bool IsOnCopperLayer() const { - return ( GetLayer() < FIRST_NON_COPPER_LAYER ) ? true : false; + return LSET::AllNonCuMask()[GetLayer()]; } /// How to fill areas: 0 = use filled polygons, 1 => fill with segments. diff --git a/pcbnew/class_zone_settings.cpp b/pcbnew/class_zone_settings.cpp index b17968123f..5615c6740e 100644 --- a/pcbnew/class_zone_settings.cpp +++ b/pcbnew/class_zone_settings.cpp @@ -38,18 +38,18 @@ ZONE_SETTINGS::ZONE_SETTINGS() { m_ZonePriority = 0; - m_FillMode = 0; // Mode for filling zone : 1 use segments, 0 use polygons + m_FillMode = 0; // Mode for filling zone : 1 use segments, 0 use polygons // Clearance value m_ZoneClearance = Mils2iu( ZONE_CLEARANCE_MIL ); // Min thickness value in filled areas (this is the minimum width of copper to fill solid areas) : m_ZoneMinThickness = Mils2iu( ZONE_THICKNESS_MIL ); - m_NetcodeSelection = 0; // Net code selection for the current zone - m_CurrentZone_Layer = FIRST_LAYER; // Layer used to create the current zone - m_Zone_HatchingStyle = CPolyLine::DIAGONAL_EDGE; // Option to show the zone area (outlines only, short hatches or full hatches + m_NetcodeSelection = 0; // Net code selection for the current zone + m_CurrentZone_Layer = F_Cu; // Layer used to create the current zone + m_Zone_HatchingStyle = CPolyLine::DIAGONAL_EDGE; // Option to show the zone area (outlines only, short hatches or full hatches - m_ArcToSegmentsCount = ARC_APPROX_SEGMENTS_COUNT_LOW_DEF; // Option to select number of segments to approximate a circle - // ARC_APPROX_SEGMENTS_COUNT_LOW_DEF - // or ARC_APPROX_SEGMENTS_COUNT_HIGHT_DEF segments + m_ArcToSegmentsCount = ARC_APPROX_SEGMENTS_COUNT_LOW_DEF; // Option to select number of segments to approximate a circle + // ARC_APPROX_SEGMENTS_COUNT_LOW_DEF + // or ARC_APPROX_SEGMENTS_COUNT_HIGHT_DEF segments // thickness of the gap in thermal reliefs: m_ThermalReliefGap = Mils2iu( ZONE_THERMAL_RELIEF_GAP_MIL ); diff --git a/pcbnew/class_zone_settings.h b/pcbnew/class_zone_settings.h index 0ec12f32df..a99d6b274e 100644 --- a/pcbnew/class_zone_settings.h +++ b/pcbnew/class_zone_settings.h @@ -39,7 +39,8 @@ public: int m_ZoneClearance; ///< Clearance value int m_ZoneMinThickness; ///< Min thickness value in filled areas int m_NetcodeSelection; ///< Net code selection for the current zone - LAYER_NUM m_CurrentZone_Layer; ///< Layer used to create the current zone + + LAYER_ID m_CurrentZone_Layer; ///< Layer used to create the current zone /// Option to show the zone area (outlines only, short hatches or full hatches int m_Zone_HatchingStyle; diff --git a/pcbnew/classpcb.cpp b/pcbnew/classpcb.cpp index 1bba2e67dd..a697a33292 100644 --- a/pcbnew/classpcb.cpp +++ b/pcbnew/classpcb.cpp @@ -175,9 +175,9 @@ PCB_SCREEN::PCB_SCREEN( const wxSize& aPageSizeIU ) : // Set the working grid size to a reasonable value (in 1/10000 inch) SetGrid( DMIL_GRID( 500 ) ); - m_Active_Layer = LAYER_N_BACK; // default active layer = bottom layer - m_Route_Layer_TOP = LAYER_N_FRONT; // default layers pair for vias (bottom to top) - m_Route_Layer_BOTTOM = LAYER_N_BACK; + m_Active_Layer = B_Cu; // default active layer = bottom layer + m_Route_Layer_TOP = F_Cu; // default layers pair for vias (bottom to top) + m_Route_Layer_BOTTOM = B_Cu; SetZoom( ZOOM_FACTOR( 120 ) ); // a default value for zoom diff --git a/pcbnew/clean.cpp b/pcbnew/clean.cpp index d350b5f3f0..fbb1b79da0 100644 --- a/pcbnew/clean.cpp +++ b/pcbnew/clean.cpp @@ -226,7 +226,7 @@ bool TRACKS_CLEANER::remove_duplicates_of_via( const VIA *aVia ) (alt_via->GetStart() == aVia->GetStart()) ) { // delete via - m_Brd->GetRatsnest()->Remove( alt_via ); + m_Brd->GetRatsnest()->Remove( alt_via ); alt_via->ViewRelease(); alt_via->DeleteStructure(); modified = true; @@ -262,7 +262,9 @@ bool TRACKS_CLEANER::clean_vias() { const D_PAD *pad = via->m_PadsConnected[ii]; - if( (pad->GetLayerMask() & ALL_CU_LAYERS) == ALL_CU_LAYERS ) + const LSET all_cu = LSET::AllCuMask(); + + if( (pad->GetLayerSet() & all_cu) == all_cu ) { // redundant: delete the via m_Brd->GetRatsnest()->Remove( via ); @@ -283,8 +285,8 @@ const ZONE_CONTAINER* TRACKS_CLEANER::zoneForTrackEndpoint( const TRACK *aTrack, ENDPOINT_T aEndPoint ) { // Vias are special cased, since they get a layer range, not a single one - LAYER_NUM top_layer, bottom_layer; - const VIA* via = dyn_cast( aTrack ); + LAYER_ID top_layer, bottom_layer; + const VIA* via = dyn_cast( aTrack ); if( via ) via->LayerPair( &top_layer, &bottom_layer ); @@ -318,7 +320,7 @@ bool TRACKS_CLEANER::testTrackEndpointDangling( TRACK *aTrack, ENDPOINT_T aEndPo /* If a via is connected to this end, test if this via has a second item connected. * If not, remove the current segment (the via would then become * unconnected and remove on the following pass) */ - VIA* via = dyn_cast( other ); + VIA* via = dyn_cast( other ); if( via ) { @@ -436,10 +438,10 @@ bool TRACKS_CLEANER::remove_duplicates_of_track( const TRACK *aTrack ) if( ((aTrack->GetStart() == other->GetStart()) && (aTrack->GetEnd() == other->GetEnd())) || ((aTrack->GetStart() == other->GetEnd()) && - (aTrack->GetEnd() == other->GetStart()))) + (aTrack->GetEnd() == other->GetStart()))) { - m_Brd->GetRatsnest()->Remove( other ); - other->ViewRelease(); + m_Brd->GetRatsnest()->Remove( other ); + other->ViewRelease(); other->DeleteStructure(); modified = true; } @@ -466,7 +468,7 @@ bool TRACKS_CLEANER::merge_collinear_of_track( TRACK *aSegment ) { // the two segments must have the same width and the other // cannot be a via - if( (aSegment->GetWidth() == other->GetWidth()) && + if( (aSegment->GetWidth() == other->GetWidth()) && (other->Type() == PCB_TRACE_T) ) { // There can be only one segment connected @@ -551,7 +553,7 @@ static bool parallelism_test( int dx1, int dy1, int dx2, int dy2 ) if( dy2 == 0 ) return dy1 == 0; - /* test for alignment in other cases: Do the usual cross product test + /* test for alignment in other cases: Do the usual cross product test * (the same as testing the slope, but without a division) */ return ((double)dy1 * dx2 == (double)dx1 * dy2); } diff --git a/pcbnew/collectors.cpp b/pcbnew/collectors.cpp index 2470684c6d..a2e1d845f8 100644 --- a/pcbnew/collectors.cpp +++ b/pcbnew/collectors.cpp @@ -284,10 +284,10 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_ITEM* testItem, const void* testDa if( module ) { - if( m_Guide->IgnoreMTextsOnCopper() && module->GetLayer()==LAYER_N_BACK ) + if( m_Guide->IgnoreMTextsOnCopper() && module->GetLayer()==B_Cu ) goto exit; - if( m_Guide->IgnoreMTextsOnCmp() && module->GetLayer()==LAYER_N_FRONT ) + if( m_Guide->IgnoreMTextsOnCmp() && module->GetLayer()==F_Cu ) goto exit; if( m_Guide->IgnoreModulesVals() && item == &module->Value() ) @@ -314,10 +314,10 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_ITEM* testItem, const void* testDa if( module ) // true from case PCB_PAD_T, PCB_MODULE_TEXT_T, or PCB_MODULE_T { - if( m_Guide->IgnoreModulesOnCu() && module->GetLayer()==LAYER_N_BACK ) + if( m_Guide->IgnoreModulesOnCu() && module->GetLayer()==B_Cu ) goto exit; - if( m_Guide->IgnoreModulesOnCmp() && module->GetLayer()==LAYER_N_FRONT ) + if( m_Guide->IgnoreModulesOnCmp() && module->GetLayer()==F_Cu ) goto exit; } @@ -331,10 +331,10 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_ITEM* testItem, const void* testDa if( ! pad_through ) { - if( m_Guide->IgnorePadsOnFront() && pad->IsOnLayer(LAYER_N_FRONT ) ) + if( m_Guide->IgnorePadsOnFront() && pad->IsOnLayer(F_Cu ) ) goto exit; - if( m_Guide->IgnorePadsOnBack() && pad->IsOnLayer(LAYER_N_BACK ) ) + if( m_Guide->IgnorePadsOnBack() && pad->IsOnLayer(B_Cu ) ) goto exit; } } @@ -350,7 +350,7 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_ITEM* testItem, const void* testDa if( item->IsOnLayer( m_Guide->GetPreferredLayer() ) || m_Guide->IgnorePreferredLayer() ) { - LAYER_NUM layer = item->GetLayer(); + LAYER_ID layer = item->GetLayer(); // Modules and their subcomponents: text and pads are not sensitive to the layer // visibility controls. They all have their own separate visibility controls @@ -378,7 +378,7 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_ITEM* testItem, const void* testDa // no effect on other criteria, since there is a separate "ignore" control for // those in the COLLECTORS_GUIDE - LAYER_NUM layer = item->GetLayer(); + LAYER_ID layer = item->GetLayer(); // Modules and their subcomponents: text and pads are not sensitive to the layer // visibility controls. They all have their own separate visibility controls diff --git a/pcbnew/collectors.h b/pcbnew/collectors.h index 8eef56af40..267ec20034 100644 --- a/pcbnew/collectors.h +++ b/pcbnew/collectors.h @@ -71,13 +71,13 @@ public: * Function IsLayerLocked * @return bool - true if the given layer is locked, else false. */ - virtual bool IsLayerLocked( LAYER_NUM layer ) const = 0; + virtual bool IsLayerLocked( LAYER_ID layer ) const = 0; /** * Function IsLayerVisible * @return bool - true if the given layer is visible, else false. */ - virtual bool IsLayerVisible( LAYER_NUM layer ) const = 0; + virtual bool IsLayerVisible( LAYER_ID layer ) const = 0; /** * Function IgnoreLockedLayers @@ -95,7 +95,7 @@ public: * Function GetPreferredLayer * @return int - the preferred layer for HitTest()ing. */ - virtual LAYER_NUM GetPreferredLayer() const = 0; + virtual LAYER_ID GetPreferredLayer() const = 0; /** * Function IgnorePreferredLayer @@ -206,7 +206,7 @@ public: * Philosophy: this class knows nothing of the context in which a BOARD is used * and that means it knows nothing about which layers are visible or current, * but can handle those concerns by the SetPreferredLayer() function and the - * SetLayerMask() function. + * SetLayerSet() function. */ class GENERAL_COLLECTOR : public COLLECTOR { @@ -376,13 +376,13 @@ private: // the storage architecture here is not important, since this is only // a carrier object and its functions are what is used, and data only indirectly. - LAYER_NUM m_PreferredLayer; + LAYER_ID m_PreferredLayer; bool m_IgnorePreferredLayer; - LAYER_MSK m_LayerLocked; ///< bit-mapped layer locked bits + LSET m_LayerLocked; ///< bit-mapped layer locked bits bool m_IgnoreLockedLayers; - LAYER_MSK m_LayerVisible; ///< bit-mapped layer visible bits + LSET m_LayerVisible; ///< bit-mapped layer visible bits bool m_IgnoreNonVisibleLayers; bool m_IgnoreLockedItems; @@ -407,11 +407,10 @@ public: * @param aVisibleLayerMask = current visible layers (bit mask) * @param aPreferredLayer = the layer to search first */ - GENERAL_COLLECTORS_GUIDE( LAYER_MSK aVisibleLayerMask, LAYER_NUM aPreferredLayer ) + GENERAL_COLLECTORS_GUIDE( LSET aVisibleLayerMask, LAYER_ID aPreferredLayer ) { - m_PreferredLayer = LAYER_N_FRONT; + m_PreferredLayer = aPreferredLayer; m_IgnorePreferredLayer = false; - m_LayerLocked = NO_LAYERS; m_LayerVisible = aVisibleLayerMask; m_IgnoreLockedLayers = true; m_IgnoreNonVisibleLayers = true; @@ -423,8 +422,6 @@ public: m_IncludeSecondary = true; #endif - m_PreferredLayer = aPreferredLayer; - m_IgnoreMTextsMarkedNoShow = true; // g_ModuleTextNOVColor; m_IgnoreMTextsOnCopper = true; m_IgnoreMTextsOnCmp = false; @@ -443,59 +440,52 @@ public: * Function IsLayerLocked * @return bool - true if the given layer is locked, else false. */ - bool IsLayerLocked( LAYER_NUM aLayer ) const - { - return GetLayerMask( aLayer ) & m_LayerLocked; - } - void SetLayerLocked( LAYER_NUM aLayer, bool isLocked ) + bool IsLayerLocked( LAYER_ID aLayerId ) const { - if( isLocked ) - m_LayerLocked |= GetLayerMask( aLayer ); - else - m_LayerLocked &= ~GetLayerMask( aLayer ); + return m_LayerLocked[aLayerId]; } + void SetLayerLocked( LAYER_ID aLayerId, bool isLocked ) + { + m_LayerLocked.set( aLayerId, isLocked ); + } /** * Function IsLayerVisible * @return bool - true if the given layer is visible, else false. */ - bool IsLayerVisible( LAYER_NUM aLayer ) const - { - return GetLayerMask( aLayer ) & m_LayerVisible; - } - void SetLayerVisible( LAYER_NUM aLayer, bool isVisible ) + bool IsLayerVisible( LAYER_ID aLayerId ) const { - if( isVisible ) - m_LayerVisible |= GetLayerMask( aLayer ); - else - m_LayerVisible &= ~GetLayerMask( aLayer ); + return m_LayerVisible[aLayerId]; } - void SetLayerVisibleBits( LAYER_MSK aLayerBits ) { m_LayerVisible = aLayerBits; } - + void SetLayerVisible( LAYER_ID aLayerId, bool isVisible ) + { + m_LayerVisible.set( aLayerId, isVisible ); + } + void SetLayerVisibleBits( LSET aLayerBits ) { m_LayerVisible = aLayerBits; } /** * Function IgnoreLockedLayers * @return bool - true if should ignore locked layers, else false. */ - bool IgnoreLockedLayers() const { return m_IgnoreLockedLayers; } - void SetIgnoreLockedLayers( bool ignore ) { m_IgnoreLockedLayers = ignore; } + bool IgnoreLockedLayers() const { return m_IgnoreLockedLayers; } + void SetIgnoreLockedLayers( bool ignore ) { m_IgnoreLockedLayers = ignore; } /** * Function IgnoredNonVisibleLayers * @return bool - true if should ignore non-visible layers, else false. */ - bool IgnoreNonVisibleLayers() const { return m_IgnoreNonVisibleLayers; } - void SetIgnoreNonVisibleLayers( bool ignore ) { m_IgnoreLockedLayers = ignore; } + bool IgnoreNonVisibleLayers() const { return m_IgnoreNonVisibleLayers; } + void SetIgnoreNonVisibleLayers( bool ignore ) { m_IgnoreLockedLayers = ignore; } /** * Function GetPreferredLayer * @return int - the preferred layer for HitTest()ing. */ - LAYER_NUM GetPreferredLayer() const { return m_PreferredLayer; } - void SetPreferredLayer( LAYER_NUM aLayer ) { m_PreferredLayer = aLayer; } + LAYER_ID GetPreferredLayer() const { return m_PreferredLayer; } + void SetPreferredLayer( LAYER_ID aLayer ) { m_PreferredLayer = aLayer; } /** @@ -503,16 +493,16 @@ public: * provides wildcard behavior regarding the preferred layer. * @return bool - true if should ignore preferred layer, else false. */ - bool IgnorePreferredLayer() const { return m_IgnorePreferredLayer; } - void SetIgnorePreferredLayer( bool ignore ) { m_IgnorePreferredLayer = ignore; } + bool IgnorePreferredLayer() const { return m_IgnorePreferredLayer; } + void SetIgnorePreferredLayer( bool ignore ) { m_IgnorePreferredLayer = ignore; } /** * Function IgnoreLockedItems * @return bool - true if should ignore locked items, else false. */ - bool IgnoreLockedItems() const { return m_IgnoreLockedItems; } - void SetIgnoreLockedItems( bool ignore ) { m_IgnoreLockedItems = ignore; } + bool IgnoreLockedItems() const { return m_IgnoreLockedItems; } + void SetIgnoreLockedItems( bool ignore ) { m_IgnoreLockedItems = ignore; } /** diff --git a/pcbnew/connect.cpp b/pcbnew/connect.cpp index 4623c5e932..f03d19c6f1 100644 --- a/pcbnew/connect.cpp +++ b/pcbnew/connect.cpp @@ -89,7 +89,7 @@ void CONNECTIONS::SearchConnectionsPadsToIntersectingPads() if( pad == candidate_pad ) continue; - if( (pad->GetLayerMask() & candidate_pad->GetLayerMask()) == 0 ) + if( (pad->GetLayerSet() & candidate_pad->GetLayerSet()) == 0 ) continue; if( pad->HitTest( item->GetPoint() ) ) { @@ -122,7 +122,7 @@ void CONNECTIONS::SearchTracksConnectedToPads( bool add_to_padlist, bool add_to_ { CONNECTED_POINT* cp_item = candidates[jj]; - if( (pad->GetLayerMask() & cp_item->GetTrack()->GetLayerMask()) == 0 ) + if( (pad->GetLayerSet() & cp_item->GetTrack()->GetLayerSet()) == 0 ) continue; if( pad->HitTest( cp_item->GetPoint() ) ) @@ -296,7 +296,7 @@ int CONNECTIONS::SearchConnectedTracks( const TRACK * aTrack ) int count = 0; m_connected.clear(); - LAYER_MSK layerMask = aTrack->GetLayerMask(); + LSET layerMask = aTrack->GetLayerSet(); // Search for connections to starting point: #define USE_EXTENDED_SEARCH @@ -318,7 +318,7 @@ int CONNECTIONS::SearchConnectedTracks( const TRACK * aTrack ) continue; if( m_candidates[ii].GetPoint() != position ) break; - if( m_candidates[ii].GetTrack()->GetLayerMask() & layerMask ) + if( m_candidates[ii].GetTrack()->GetLayerSet() & layerMask ) m_connected.push_back( m_candidates[ii].GetTrack() ); } // search before: @@ -328,7 +328,7 @@ int CONNECTIONS::SearchConnectedTracks( const TRACK * aTrack ) continue; if( m_candidates[ii].GetPoint() != position ) break; - if( m_candidates[ii].GetTrack()->GetLayerMask() & layerMask ) + if( m_candidates[ii].GetTrack()->GetLayerSet() & layerMask ) m_connected.push_back( m_candidates[ii].GetTrack() ); } } @@ -339,7 +339,7 @@ int CONNECTIONS::SearchConnectedTracks( const TRACK * aTrack ) { TRACK * ctrack = tracks_candidates[ii]->GetTrack(); - if( ( ctrack->GetLayerMask() & layerMask ) == 0 ) + if( ( ctrack->GetLayerSet() & layerMask ) == 0 ) continue; if( ctrack == aTrack ) diff --git a/pcbnew/deltrack.cpp b/pcbnew/deltrack.cpp index 42c98cd605..ed514b3f7c 100644 --- a/pcbnew/deltrack.cpp +++ b/pcbnew/deltrack.cpp @@ -54,7 +54,7 @@ TRACK* PCB_EDIT_FRAME::Delete_Segment( wxDC* DC, TRACK* aTrack ) { if( g_CurrentTrackList.GetCount() > 0 ) { - LAYER_NUM previous_layer = GetActiveLayer(); + LAYER_ID previous_layer = GetActiveLayer(); DBG( g_CurrentTrackList.VerifyListIntegrity(); ) diff --git a/pcbnew/dialogs/dialog_SVG_print.cpp b/pcbnew/dialogs/dialog_SVG_print.cpp index 5fb3757479..0d6bd1c804 100644 --- a/pcbnew/dialogs/dialog_SVG_print.cpp +++ b/pcbnew/dialogs/dialog_SVG_print.cpp @@ -28,7 +28,6 @@ #include -//#include #include #include #include @@ -45,7 +44,56 @@ #include #include #include -#include +#include +#include + + +class DIALOG_SVG_PRINT : public DIALOG_SVG_PRINT_base +{ +public: + DIALOG_SVG_PRINT( wxTopLevelWindow* aParent, BOARD* aBoard, PCB_PLOT_PARAMS* aSettings ); + +private: + bool m_did_print; + BOARD* m_board; + PCB_PLOT_PARAMS* m_callers_params; + wxConfigBase* m_config; + LSET m_printMaskLayer; + wxCheckBox* m_boxSelectLayer[LAYER_ID_COUNT]; + bool m_printBW; + wxString m_outputDirectory; + + // Static member to store options + static bool m_printMirror; + static bool m_oneFileOnly; + + void initDialog(); + + void OnCloseWindow( wxCloseEvent& event ); + void OnButtonPlot( wxCommandEvent& event ); + + void OnButtonCloseClick( wxCommandEvent& event ); + + void OnOutputDirectoryBrowseClicked( wxCommandEvent& event ); + void SetPenWidth(); + void ExportSVGFile( bool aOnlyOneFile ); + + bool PageIsBoardBoundarySize() + { + return m_rbSvgPageSizeOpt->GetSelection() == 2; + } + + bool PrintPageRef() + { + return m_rbSvgPageSizeOpt->GetSelection() == 0; + } + + bool CreateSVGFile( const wxString& FullFileName ); + + LSET getCheckBoxSelectedLayers() const; +}; + + // Keys for configuration #define PLOTSVGMODECOLOR_KEY wxT( "PlotSVGModeColor" ) @@ -53,33 +101,36 @@ #define PLOTSVGPLOT_BRD_EDGE_KEY wxT( "PlotSVGBrdEdge" ) // reasonable values for default pen width -#define WIDTH_MAX_VALUE (2 * IU_PER_MM) -#define WIDTH_MIN_VALUE (0.05 * IU_PER_MM) +#define WIDTH_MAX_VALUE (2 * IU_PER_MM) +#define WIDTH_MIN_VALUE (0.05 * IU_PER_MM) // Local variables: -static long s_SelectedLayers = LAYER_BACK | LAYER_FRONT | - SILKSCREEN_LAYER_FRONT | SILKSCREEN_LAYER_BACK; +static LSET s_SelectedLayers( 4, B_Cu, F_Cu, F_SilkS, B_SilkS ); /* * DIALOG_SVG_PRINT functions */ -DIALOG_SVG_PRINT::DIALOG_SVG_PRINT( EDA_DRAW_FRAME* parent ) : - DIALOG_SVG_PRINT_base( parent ) +DIALOG_SVG_PRINT::DIALOG_SVG_PRINT( wxTopLevelWindow* aParent, BOARD* aBoard, PCB_PLOT_PARAMS* aSettings ) : + DIALOG_SVG_PRINT_base( aParent ), + m_did_print( false ), + m_callers_params( aSettings ) { - m_parent = (PCB_BASE_FRAME*) parent; - m_config = Kiface().KifaceSettings(); + m_board = aBoard; + m_config = Kiface().KifaceSettings(); + + memset( m_boxSelectLayer, 0, sizeof( m_boxSelectLayer ) ); + initDialog(); GetSizer()->SetSizeHints( this ); Centre(); } + bool DIALOG_SVG_PRINT::m_printMirror = false; bool DIALOG_SVG_PRINT::m_oneFileOnly = false; void DIALOG_SVG_PRINT::initDialog() { - m_board = m_parent->GetBoard(); - if( m_config ) { m_config->Read( PLOTSVGMODECOLOR_KEY, &m_printBW, false ); @@ -90,7 +141,7 @@ void DIALOG_SVG_PRINT::initDialog() m_PrintBoardEdgesCtrl->SetValue( ltmp ); } - m_outputDirectory = m_parent->GetPlotSettings().GetOutputDirectory(); + m_outputDirectory = m_callers_params->GetOutputDirectory(); m_outputDirectoryName->SetValue( m_outputDirectory ); if( m_printBW ) @@ -101,63 +152,38 @@ void DIALOG_SVG_PRINT::initDialog() m_printMirrorOpt->SetValue( m_printMirror ); m_rbFileOpt->SetSelection( m_oneFileOnly ? 1 : 0 ); - AddUnitSymbol( *m_TextPenWidth, g_UserUnit ); - m_DialogDefaultPenSize->SetValue( - StringFromValue( g_UserUnit, g_DrawDefaultLineThickness ) ); - // Create layers list - LAYER_NUM layer; - for( layer = FIRST_LAYER; layer < NB_PCB_LAYERS; ++layer ) + m_DialogDefaultPenSize->SetValue( StringFromValue( g_UserUnit, g_DrawDefaultLineThickness ) ); + + LSEQ seq = m_board->GetEnabledLayers().UIOrder(); + + for( ; seq; ++seq ) { - if( !m_board->IsLayerEnabled( layer ) ) - m_boxSelectLayer[layer] = NULL; - else - m_boxSelectLayer[layer] = - new wxCheckBox( this, -1, m_board->GetLayerName( layer ) ); - } + LAYER_ID layer = *seq; - // Add wxCheckBoxes in layers lists dialog - // List layers in same order than in setup layers dialog - // (Front or Top to Back or Bottom) - DECLARE_LAYERS_ORDER_LIST( layersOrder ); + // The layers in m_boxSelectLayer[] are in LAYER_ID order. This may be + // different than the order on screen. + m_boxSelectLayer[layer] = new wxCheckBox( this, -1, m_board->GetLayerName( layer ) ); - for( LAYER_NUM layer_idx = FIRST_LAYER; layer_idx < NB_PCB_LAYERS; ++layer_idx ) - { - layer = layersOrder[layer_idx]; - - wxASSERT( layer < NB_PCB_LAYERS ); - - if( m_boxSelectLayer[layer] == NULL ) - continue; - - LAYER_MSK mask = GetLayerMask( layer ); - - if( mask & s_SelectedLayers ) + if( s_SelectedLayers[layer] ) m_boxSelectLayer[layer]->SetValue( true ); - if( layer <= LAST_COPPER_LAYER ) - m_CopperLayersBoxSizer->Add( m_boxSelectLayer[layer], - 0, - wxGROW | wxALL, - 1 ); + if( IsCopperLayer( layer ) ) + m_CopperLayersBoxSizer->Add( m_boxSelectLayer[layer], 0, wxGROW | wxALL, 1 ); else - m_TechnicalBoxSizer->Add( m_boxSelectLayer[layer], - 0, - wxGROW | wxALL, - 1 ); + m_TechnicalBoxSizer->Add( m_boxSelectLayer[layer], 0, wxGROW | wxALL, 1 ); } if( m_config ) { wxString layerKey; - for( LAYER_NUM layer = FIRST_LAYER; layer < NB_PCB_LAYERS; ++layer ) + for( seq.Rewind(); seq; ++seq ) { bool option; - if( m_boxSelectLayer[layer] == NULL ) - continue; + LAYER_NUM layer = *seq; layerKey.Printf( OPTKEY_LAYERBASE, layer ); @@ -168,6 +194,21 @@ void DIALOG_SVG_PRINT::initDialog() } +LSET DIALOG_SVG_PRINT::getCheckBoxSelectedLayers() const +{ + LSET ret; + + // the layers in m_boxSelectLayer[] are in LAYER_ID order. + for( unsigned layer=0; layerGetValue() ) + ret.set( layer ); + } + + return ret; +} + + void DIALOG_SVG_PRINT::OnOutputDirectoryBrowseClicked( wxCommandEvent& event ) { // Build the absolute path of current output plot directory @@ -232,13 +273,15 @@ void DIALOG_SVG_PRINT::ExportSVGFile( bool aOnlyOneFile ) // absolute form). Bail if it fails wxFileName outputDir = wxFileName::DirName( m_outputDirectory ); wxString boardFilename = m_board->GetFileName(); + WX_TEXT_CTRL_REPORTER reporter( m_messagesBox ); if( !EnsureOutputDirectory( &outputDir, boardFilename, &reporter ) ) { - wxString msg; - msg.Printf( _( "Could not write plot files to folder \"%s\"." ), - GetChars( outputDir.GetPath() ) ); + wxString msg = wxString::Format( + _( "Could not write plot files to folder \"%s\"." ), + GetChars( outputDir.GetPath() ) + ); DisplayError( this, msg ); return; } @@ -247,48 +290,35 @@ void DIALOG_SVG_PRINT::ExportSVGFile( bool aOnlyOneFile ) m_printBW = m_ModeColorOption->GetSelection(); SetPenWidth(); - // Build layers mask - LAYER_MSK printMaskLayer = NO_LAYERS; + LSET all_selected = getCheckBoxSelectedLayers(); - for( LAYER_NUM layer = FIRST_LAYER; layer < NB_PCB_LAYERS; ++layer ) + for( LSEQ seq = all_selected.Seq(); seq; ++seq ) { - if( m_boxSelectLayer[layer] && m_boxSelectLayer[layer]->GetValue() ) - printMaskLayer |= GetLayerMask( layer ); - } + LAYER_ID layer = *seq; - wxString msg; + wxFileName fn( boardFilename ); - for( LAYER_NUM layer = FIRST_LAYER; layer < NB_PCB_LAYERS; ++layer ) - { - LAYER_MSK currlayer_mask = GetLayerMask( layer ); + wxString suffix = aOnlyOneFile ? wxT( "brd" ) : m_board->GetStandardLayerName( layer ); - if( (printMaskLayer & currlayer_mask ) == 0 ) - continue; - - wxString suffix = m_board->GetStandardLayerName( layer ); - - if( aOnlyOneFile ) - { - m_printMaskLayer = printMaskLayer; - suffix = wxT( "brd" ); - } - else - { - m_printMaskLayer = currlayer_mask; - suffix = m_board->GetStandardLayerName( layer ); - } - - wxFileName fn(boardFilename); BuildPlotFileName( &fn, outputDir.GetPath(), suffix, SVGFileExtension ); + m_printMaskLayer = aOnlyOneFile ? LSET( layer ) : all_selected; + if( m_PrintBoardEdgesCtrl->IsChecked() ) - m_printMaskLayer |= EDGE_LAYER; + m_printMaskLayer.set( Edge_Cuts ); if( CreateSVGFile( fn.GetFullPath() ) ) - msg.Printf( _( "Plot: %s OK\n" ), GetChars( fn.GetFullPath() ) ); + { + m_messagesBox->AppendText( + wxString::Format( _( "Plot: %s OK\n" ), GetChars( fn.GetFullPath() ) ) + ); + } else // Error - msg.Printf( _( "** Unable to create %s **\n" ), GetChars( fn.GetFullPath() ) ); - m_messagesBox->AppendText( msg ); + { + m_messagesBox->AppendText( + wxString::Format( _( "** Unable to create %s **\n" ), GetChars( fn.GetFullPath() ) ) + ); + } if( aOnlyOneFile ) break; @@ -299,66 +329,74 @@ void DIALOG_SVG_PRINT::ExportSVGFile( bool aOnlyOneFile ) // Actual SVG file export function. bool DIALOG_SVG_PRINT::CreateSVGFile( const wxString& aFullFileName ) { - PCB_PLOT_PARAMS m_plotOpts; + PCB_PLOT_PARAMS plot_opts; - m_plotOpts.SetPlotFrameRef( PrintPageRef() ); + plot_opts.SetPlotFrameRef( PrintPageRef() ); // Adding drill marks, for copper layers - if( (m_printMaskLayer & ALL_CU_LAYERS) ) - m_plotOpts.SetDrillMarksType( PCB_PLOT_PARAMS::FULL_DRILL_SHAPE ); + if( ( m_printMaskLayer & LSET::AllCuMask() ).any() ) + plot_opts.SetDrillMarksType( PCB_PLOT_PARAMS::FULL_DRILL_SHAPE ); else - m_plotOpts.SetDrillMarksType( PCB_PLOT_PARAMS::NO_DRILL_SHAPE ); + plot_opts.SetDrillMarksType( PCB_PLOT_PARAMS::NO_DRILL_SHAPE ); - m_plotOpts.SetSkipPlotNPTH_Pads( false ); + plot_opts.SetSkipPlotNPTH_Pads( false ); + + plot_opts.SetMirror( m_printMirror ); + plot_opts.SetFormat( PLOT_FORMAT_SVG ); - m_plotOpts.SetMirror( m_printMirror ); - m_plotOpts.SetFormat( PLOT_FORMAT_SVG ); EDA_COLOR_T color = UNSPECIFIED_COLOR; // Used layer color to plot ref and value - m_plotOpts.SetReferenceColor( color ); - m_plotOpts.SetValueColor( color ); - PAGE_INFO pageInfo = m_board->GetPageSettings(); - wxPoint axisorigin = m_board->GetAuxOrigin(); + plot_opts.SetReferenceColor( color ); + plot_opts.SetValueColor( color ); + + PAGE_INFO pageInfo = m_board->GetPageSettings(); + wxPoint axisorigin = m_board->GetAuxOrigin(); if( PageIsBoardBoundarySize() ) { - EDA_RECT bbox = m_board->ComputeBoundingBox(); - PAGE_INFO currpageInfo = m_board->GetPageSettings(); + EDA_RECT bbox = m_board->ComputeBoundingBox(); + PAGE_INFO currpageInfo = m_board->GetPageSettings(); + currpageInfo.SetWidthMils( bbox.GetWidth() / IU_PER_MILS ); currpageInfo.SetHeightMils( bbox.GetHeight() / IU_PER_MILS ); m_board->SetPageSettings( currpageInfo ); - m_plotOpts.SetUseAuxOrigin( true ); + plot_opts.SetUseAuxOrigin( true ); wxPoint origin = bbox.GetOrigin(); m_board->SetAuxOrigin( origin ); } LOCALE_IO toggle; SVG_PLOTTER* plotter = (SVG_PLOTTER*) StartPlotBoard( m_board, - &m_plotOpts, aFullFileName, + &plot_opts, aFullFileName, wxEmptyString ); if( plotter ) { plotter->SetColorMode( m_ModeColorOption->GetSelection() == 0 ); - PlotStandardLayer( m_board, plotter, m_printMaskLayer, m_plotOpts ); + PlotStandardLayer( m_board, plotter, m_printMaskLayer, plot_opts ); plotter->EndPlot(); } delete plotter; - m_board->SetAuxOrigin( axisorigin ); + + m_board->SetAuxOrigin( axisorigin ); // really, without a message saying so? + m_board->SetPageSettings( pageInfo ); return true; } + void DIALOG_SVG_PRINT::OnButtonPlot( wxCommandEvent& event ) { m_oneFileOnly = m_rbFileOpt->GetSelection() == 1; ExportSVGFile( m_oneFileOnly ); + + m_did_print = true; } -void DIALOG_SVG_PRINT::OnButtonCancelClick( wxCommandEvent& event ) +void DIALOG_SVG_PRINT::OnButtonCloseClick( wxCommandEvent& event ) { Close(); } @@ -366,40 +404,48 @@ void DIALOG_SVG_PRINT::OnButtonCancelClick( wxCommandEvent& event ) void DIALOG_SVG_PRINT::OnCloseWindow( wxCloseEvent& event ) { - SetPenWidth(); - m_printBW = m_ModeColorOption->GetSelection(); - m_oneFileOnly = m_rbFileOpt->GetSelection() == 1; - - if( m_config ) + if( m_did_print ) // unless output was created, this is tantamount to a cancel. { - m_config->Write( PLOTSVGMODECOLOR_KEY, m_printBW ); - m_config->Write( PLOTSVGPAGESIZEOPT_KEY, m_rbSvgPageSizeOpt->GetSelection() ); - m_config->Write( PLOTSVGPLOT_BRD_EDGE_KEY, m_PrintBoardEdgesCtrl->GetValue() ); + SetPenWidth(); + m_printBW = m_ModeColorOption->GetSelection(); + m_oneFileOnly = m_rbFileOpt->GetSelection() == 1; - wxString layerKey; + // 1) Why is configuration data saved in two places: m_config and PCB_PLOT_OPTIONS? + // 2) Why are SVG layer choices co-mingled with other plot layer choices in the config file? + // The string OPTKEY_LAYERBASE is used in multiple places. + // fix these. - for( LAYER_NUM layer = FIRST_LAYER; layer < NB_PCB_LAYERS; ++layer ) + wxString dirStr = m_outputDirectoryName->GetValue(); + dirStr.Replace( wxT( "\\" ), wxT( "/" ) ); + + m_callers_params->SetOutputDirectory( dirStr ); + + if( m_config ) { - if( m_boxSelectLayer[layer] == NULL ) - continue; + m_config->Write( PLOTSVGMODECOLOR_KEY, m_printBW ); + m_config->Write( PLOTSVGPAGESIZEOPT_KEY, m_rbSvgPageSizeOpt->GetSelection() ); + m_config->Write( PLOTSVGPLOT_BRD_EDGE_KEY, m_PrintBoardEdgesCtrl->GetValue() ); - layerKey.Printf( OPTKEY_LAYERBASE, layer ); - m_config->Write( layerKey, m_boxSelectLayer[layer]->IsChecked() ); + wxString layerKey; + + for( unsigned layer = 0; layer < DIM(m_boxSelectLayer); ++layer ) + { + if( !m_boxSelectLayer[layer] ) + continue; + + layerKey.Printf( OPTKEY_LAYERBASE, layer ); + m_config->Write( layerKey, m_boxSelectLayer[layer]->IsChecked() ); + } } } - // Set output directory and replace backslashes with forward ones - wxString dirStr; - dirStr = m_outputDirectoryName->GetValue(); - dirStr.Replace( wxT( "\\" ), wxT( "/" ) ); - - if( dirStr != m_parent->GetPlotSettings().GetOutputDirectory() ) - { - PCB_PLOT_PARAMS tempOptions( m_parent->GetPlotSettings() ); - tempOptions.SetOutputDirectory( dirStr ); - m_parent->SetPlotSettings( tempOptions ); - m_parent->OnModify(); - } - - EndModal( 0 ); + EndModal( m_did_print ? wxID_OK : wxID_CANCEL ); +} + + +bool InvokeSVGPrint( wxTopLevelWindow* aCaller, BOARD* aBoard, PCB_PLOT_PARAMS* aSettings ) +{ + DIALOG_SVG_PRINT dlg( aCaller, aBoard, aSettings ); + + return dlg.ShowModal() == wxID_OK; } diff --git a/pcbnew/dialogs/dialog_SVG_print.h b/pcbnew/dialogs/dialog_SVG_print.h deleted file mode 100644 index bf7309c409..0000000000 --- a/pcbnew/dialogs/dialog_SVG_print.h +++ /dev/null @@ -1,53 +0,0 @@ - -#ifndef _DIALOG_SVG_PRINT_H_ -#define _DIALOG_SVG_PRINT_H_ - - -#include - - -class BASE_SCREEN; -class PCB_BASE_FRAME; -class wxConfig; - - -class DIALOG_SVG_PRINT : public DIALOG_SVG_PRINT_base -{ -private: - PCB_BASE_FRAME* m_parent; - BOARD* m_board; - wxConfigBase* m_config; - LAYER_MSK m_printMaskLayer; - wxCheckBox* m_boxSelectLayer[32]; - bool m_printBW; - wxString m_outputDirectory; - - // Static member to store options - static bool m_printMirror; - static bool m_oneFileOnly; - -public: - DIALOG_SVG_PRINT( EDA_DRAW_FRAME* parent ); - ~DIALOG_SVG_PRINT() {} - -private: - void OnCloseWindow( wxCloseEvent& event ); - void initDialog( ); - void OnButtonPlot( wxCommandEvent& event ); - void OnButtonCancelClick( wxCommandEvent& event ); - void OnOutputDirectoryBrowseClicked( wxCommandEvent& event ); - void SetPenWidth(); - void ExportSVGFile( bool aOnlyOneFile ); - bool PageIsBoardBoundarySize() - { - return m_rbSvgPageSizeOpt->GetSelection() == 2; - } - bool PrintPageRef() - { - return m_rbSvgPageSizeOpt->GetSelection() == 0; - } - bool CreateSVGFile( const wxString& FullFileName ); -}; - - -#endif // _DIALOG_SVG_PRINT_H_ diff --git a/pcbnew/dialogs/dialog_SVG_print_base.cpp b/pcbnew/dialogs/dialog_SVG_print_base.cpp index 015b9d8282..f3dabf6d3a 100644 --- a/pcbnew/dialogs/dialog_SVG_print_base.cpp +++ b/pcbnew/dialogs/dialog_SVG_print_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 8 2012) +// C++ code generated with wxFormBuilder (version Jun 6 2014) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -130,18 +130,16 @@ DIALOG_SVG_PRINT_base::DIALOG_SVG_PRINT_base( wxWindow* parent, wxWindowID id, c this->Layout(); // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_SVG_PRINT_base::OnCloseWindow ) ); m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnOutputDirectoryBrowseClicked ), NULL, this ); m_buttonCreateFile->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonPlot ), NULL, this ); - m_buttonQuit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonCancelClick ), NULL, this ); + m_buttonQuit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonCloseClick ), NULL, this ); } DIALOG_SVG_PRINT_base::~DIALOG_SVG_PRINT_base() { // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_SVG_PRINT_base::OnCloseWindow ) ); m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnOutputDirectoryBrowseClicked ), NULL, this ); m_buttonCreateFile->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonPlot ), NULL, this ); - m_buttonQuit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonCancelClick ), NULL, this ); + m_buttonQuit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonCloseClick ), NULL, this ); } diff --git a/pcbnew/dialogs/dialog_SVG_print_base.fbp b/pcbnew/dialogs/dialog_SVG_print_base.fbp index 8b942ffdcc..cb65010311 100644 --- a/pcbnew/dialogs/dialog_SVG_print_base.fbp +++ b/pcbnew/dialogs/dialog_SVG_print_base.fbp @@ -1,6 +1,6 @@ - + C++ @@ -20,8 +20,10 @@ . 1 + 1 1 1 + UI 1 0 @@ -59,7 +61,7 @@ - OnCloseWindow + @@ -1208,7 +1210,7 @@ - OnButtonCancelClick + OnButtonCloseClick diff --git a/pcbnew/dialogs/dialog_SVG_print_base.h b/pcbnew/dialogs/dialog_SVG_print_base.h index e82ea7e389..d0667f655c 100644 --- a/pcbnew/dialogs/dialog_SVG_print_base.h +++ b/pcbnew/dialogs/dialog_SVG_print_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 8 2012) +// C++ code generated with wxFormBuilder (version Jun 6 2014) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -61,10 +61,9 @@ class DIALOG_SVG_PRINT_base : public DIALOG_SHIM wxTextCtrl* m_messagesBox; // Virtual event handlers, overide them in your derived class - virtual void OnCloseWindow( wxCloseEvent& event ) { event.Skip(); } virtual void OnOutputDirectoryBrowseClicked( wxCommandEvent& event ) { event.Skip(); } virtual void OnButtonPlot( wxCommandEvent& event ) { event.Skip(); } - virtual void OnButtonCancelClick( wxCommandEvent& event ) { event.Skip(); } + virtual void OnButtonCloseClick( wxCommandEvent& event ) { event.Skip(); } public: diff --git a/pcbnew/dialogs/dialog_copper_zones.cpp b/pcbnew/dialogs/dialog_copper_zones.cpp index a343c60198..eadc3fa26b 100644 --- a/pcbnew/dialogs/dialog_copper_zones.cpp +++ b/pcbnew/dialogs/dialog_copper_zones.cpp @@ -71,7 +71,8 @@ private: ///< true = pad count sort. long m_NetFiltering; - std::vector m_LayerId; ///< Handle the real layer number from layer + + std::vector m_LayerId; ///< Handle the real layer number from layer ///< name position in m_LayerSelectionCtrl static wxString m_netNameShowFilter; ///< the filter to show nets (default * "*"). @@ -247,28 +248,29 @@ void DIALOG_COPPER_ZONE::initDialog() wxListItem column0; column0.SetId( 0 ); m_LayerSelectionCtrl->InsertColumn( 0, column0 ); - // Build copper layer list and append to layer widget - 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 ) + + LSET cu_set = LSET::AllCuMask( board->GetCopperLayerCount() ); + + for( LSEQ cu_stack = cu_set.UIOrder(); cu_stack; ++cu_stack ) { - LAYER_NUM layerNumber = LAYER_N_BACK; + LAYER_ID layer = *cu_stack; - if( layerCount <= 1 || ii < layerCount - 1 ) - layerNumber = ii; - else if( ii == layerCount - 1 ) - layerNumber = LAYER_N_FRONT; + m_LayerId.push_back( layer ); - m_LayerId.insert( m_LayerId.begin(), layerNumber ); + msg = board->GetLayerName( layer ).Trim(); + + EDA_COLOR_T layerColor = board->GetLayerColor( layer ); - msg = board->GetLayerName( layerNumber ).Trim(); - EDA_COLOR_T layerColor = board->GetLayerColor( layerNumber ); imageList->Add( makeLayerBitmap( layerColor ) ); - int itemIndex = m_LayerSelectionCtrl->InsertItem( 0, msg, ii ); - if( m_settings.m_CurrentZone_Layer == layerNumber ) + int itemIndex = m_LayerSelectionCtrl->InsertItem( 0, msg, layer ); + + if( m_settings.m_CurrentZone_Layer == layer ) m_LayerSelectionCtrl->Select( itemIndex ); wxSize tsize( GetTextSize( msg, m_LayerSelectionCtrl ) ); @@ -281,8 +283,10 @@ void DIALOG_COPPER_ZONE::initDialog() // 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)); + + m_LayerSelectionCtrl->SetMinSize( wxSize( ctrlWidth, -1 ) ); wxString netNameDoNotShowFilter = wxT( "Net-*" ); if( m_Config ) @@ -464,7 +468,7 @@ bool DIALOG_COPPER_ZONE::AcceptOptions( bool aPromptForErrors, bool aUseExportab return false; } - m_settings.m_CurrentZone_Layer = m_LayerId[ii]; + m_settings.m_CurrentZone_Layer = (LAYER_ID) m_LayerId[ii]; // Get the net name selection for this zone ii = m_ListNetNameSelection->GetSelection(); diff --git a/pcbnew/dialogs/dialog_edit_module_for_BoardEditor.cpp b/pcbnew/dialogs/dialog_edit_module_for_BoardEditor.cpp index 8f9f822e47..96915ab88d 100644 --- a/pcbnew/dialogs/dialog_edit_module_for_BoardEditor.cpp +++ b/pcbnew/dialogs/dialog_edit_module_for_BoardEditor.cpp @@ -96,7 +96,7 @@ void DIALOG_MODULE_BOARD_EDITOR::InitBoardProperties() m_YPosUnit->SetLabel( GetAbbreviatedUnitsLabel( g_UserUnit ) ); m_LayerCtrl->SetSelection( - (m_CurrentModule->GetLayer() == LAYER_N_BACK) ? 1 : 0 ); + (m_CurrentModule->GetLayer() == B_Cu) ? 1 : 0 ); bool select = false; switch( int( m_CurrentModule->GetOrientation() ) ) @@ -619,10 +619,10 @@ void DIALOG_MODULE_BOARD_EDITOR::OnOkClick( wxCommandEvent& event ) bool change_layer = false; if( m_LayerCtrl->GetSelection() == 0 ) // layer req = COMPONENT { - if( m_CurrentModule->GetLayer() == LAYER_N_BACK ) + if( m_CurrentModule->GetLayer() == B_Cu ) change_layer = true; } - else if( m_CurrentModule->GetLayer() == LAYER_N_FRONT ) + else if( m_CurrentModule->GetLayer() == F_Cu ) change_layer = true; if( change_layer ) diff --git a/pcbnew/dialogs/dialog_gendrill.cpp b/pcbnew/dialogs/dialog_gendrill.cpp index 6daa73471e..7567d3d2c1 100644 --- a/pcbnew/dialogs/dialog_gendrill.cpp +++ b/pcbnew/dialogs/dialog_gendrill.cpp @@ -361,8 +361,8 @@ void DIALOG_GENDRILL::GenDrillAndMapFiles(bool aGenDrill, bool aGenMap) bool hasBuriedVias = false; /* If true, drill files are created * layer pair by layer pair for * buried vias */ - int layer1 = LAYER_N_BACK; - int layer2 = LAYER_N_FRONT; + int layer1 = B_Cu; + int layer2 = F_Cu; bool gen_through_holes = true; bool gen_NPTH_holes = false; @@ -400,12 +400,12 @@ void DIALOG_GENDRILL::GenDrillAndMapFiles(bool aGenDrill, bool aGenMap) } else if( !gen_through_holes ) { - if( layer1 == LAYER_N_BACK ) + if( layer1 == B_Cu ) layer_extend << wxT( "-back" ); else layer_extend << wxT( "-inner" ) << layer1; - if( layer2 == LAYER_N_FRONT ) + if( layer2 == F_Cu ) layer_extend << wxT( "-front" ); else layer_extend << wxT( "-inner" ) << layer2; @@ -472,10 +472,10 @@ void DIALOG_GENDRILL::GenDrillAndMapFiles(bool aGenDrill, bool aGenMap) layer2 = layer1 + 1; // prepare generation of first layer pair else { - if( layer2 >= LAYER_N_FRONT ) // no more layer pair to consider + if( layer2 >= F_Cu ) // no more layer pair to consider { - layer1 = LAYER_N_BACK; - layer2 = LAYER_N_FRONT; + layer1 = B_Cu; + layer2 = F_Cu; gen_NPTH_holes = true; continue; } @@ -484,7 +484,7 @@ void DIALOG_GENDRILL::GenDrillAndMapFiles(bool aGenDrill, bool aGenMap) layer2++; // use next layer pair if( layer2 == m_parent->GetBoard()->GetCopperLayerCount() - 1 ) - layer2 = LAYER_N_FRONT; // the last layer is always the + layer2 = F_Cu; // the last layer is always the // Front layer } diff --git a/pcbnew/dialogs/dialog_global_deletion.cpp b/pcbnew/dialogs/dialog_global_deletion.cpp index 318da30d64..f3fed257e7 100644 --- a/pcbnew/dialogs/dialog_global_deletion.cpp +++ b/pcbnew/dialogs/dialog_global_deletion.cpp @@ -39,11 +39,11 @@ #include -DIALOG_GLOBAL_DELETION::DIALOG_GLOBAL_DELETION( PCB_EDIT_FRAME* parent ) - : DIALOG_GLOBAL_DELETION_BASE( parent ) +DIALOG_GLOBAL_DELETION::DIALOG_GLOBAL_DELETION( PCB_EDIT_FRAME* parent ) : + DIALOG_GLOBAL_DELETION_BASE( parent ) { m_Parent = parent; - m_currentLayer = FIRST_LAYER; + m_currentLayer = F_Cu; m_TrackFilterAR->Enable( m_DelTracks->GetValue() ); m_TrackFilterLocked->Enable( m_DelTracks->GetValue() ); m_TrackFilterNormal->Enable( m_DelTracks->GetValue() ); @@ -69,7 +69,7 @@ void PCB_EDIT_FRAME::InstallPcbGlobalDeleteFrame( const wxPoint& pos ) void DIALOG_GLOBAL_DELETION::SetCurrentLayer( LAYER_NUM aLayer ) { m_currentLayer = aLayer; - m_textCtrlCurrLayer->SetValue( m_Parent->GetBoard()->GetLayerName( aLayer ) ); + m_textCtrlCurrLayer->SetValue( m_Parent->GetBoard()->GetLayerName( LAYER_ID( aLayer ) ) ); } @@ -111,19 +111,19 @@ void DIALOG_GLOBAL_DELETION::AcceptPcbDelete( ) BOARD_ITEM* nextitem; RN_DATA* ratsnest = pcb->GetRatsnest(); - LAYER_MSK layers_filter = ALL_LAYERS; + LSET layers_filter = LSET().set(); if( m_rbLayersOption->GetSelection() != 0 ) // Use current layer only - layers_filter = GetLayerMask( m_currentLayer ); + layers_filter = LSET( m_currentLayer ); if( m_DelZones->GetValue() ) { int area_index = 0; item = pcb->GetArea( area_index ); - while( item != NULL ) + while( item ) { - if( GetLayerMask( item->GetLayer() ) & layers_filter ) + if( layers_filter[item->GetLayer()] ) { itemPicker.SetItem( item ); pickersList.PushItem( itemPicker ); @@ -143,21 +143,21 @@ void DIALOG_GLOBAL_DELETION::AcceptPcbDelete( ) if( m_DelDrawings->GetValue() || m_DelBoardEdges->GetValue() ) { - LAYER_MSK masque_layer = NO_LAYERS; + LSET masque_layer; if( m_DelDrawings->GetValue() ) - masque_layer = (~EDGE_LAYER) & ALL_NO_CU_LAYERS; + masque_layer = LSET::AllNonCuMask().set( Edge_Cuts, false ); if( m_DelBoardEdges->GetValue() ) - masque_layer |= EDGE_LAYER; + masque_layer.set( Edge_Cuts ); masque_layer &= layers_filter; - for( item = pcb->m_Drawings; item != NULL; item = nextitem ) + for( item = pcb->m_Drawings; item; item = nextitem ) { nextitem = item->Next(); - if( ( item->Type() == PCB_LINE_T ) && ( GetLayerMask( item->GetLayer() ) & masque_layer) ) + if( item->Type() == PCB_LINE_T && masque_layer[item->GetLayer()] ) { itemPicker.SetItem( item ); pickersList.PushItem( itemPicker ); @@ -169,13 +169,13 @@ void DIALOG_GLOBAL_DELETION::AcceptPcbDelete( ) if( m_DelTexts->GetValue() ) { - LAYER_MSK del_text_layers = ALL_LAYERS & layers_filter; + LSET del_text_layers = layers_filter; - for( item = pcb->m_Drawings; item != NULL; item = nextitem ) + for( item = pcb->m_Drawings; item; item = nextitem ) { nextitem = item->Next(); - if( ( item->Type() == PCB_TEXT_T ) && ( GetLayerMask( item->GetLayer() ) & del_text_layers ) ) + if( item->Type() == PCB_TEXT_T && del_text_layers[item->GetLayer()] ) { itemPicker.SetItem( item ); pickersList.PushItem( itemPicker ); @@ -191,7 +191,7 @@ void DIALOG_GLOBAL_DELETION::AcceptPcbDelete( ) { nextitem = item->Next(); - if( ( GetLayerMask( item->GetLayer() ) & layers_filter ) && + if( layers_filter[item->GetLayer()] && ( ( m_ModuleFilterNormal->GetValue() && !item->IsLocked() ) || ( m_ModuleFilterLocked->GetValue() && item->IsLocked() ) ) ) { @@ -219,7 +219,7 @@ void DIALOG_GLOBAL_DELETION::AcceptPcbDelete( ) TRACK* nexttrack; - for( TRACK *track = pcb->m_Track; track != NULL; track = nexttrack ) + for( TRACK *track = pcb->m_Track; track; track = nexttrack ) { nexttrack = track->Next(); @@ -233,7 +233,7 @@ void DIALOG_GLOBAL_DELETION::AcceptPcbDelete( ) if( ( track->Type() == PCB_VIA_T ) && !m_TrackFilterVias->GetValue() ) continue; - if( ( track->GetLayerMask() & layers_filter ) == 0 ) + if( ( track->GetLayerSet() & layers_filter ) == 0 ) continue; itemPicker.SetItem( track ); diff --git a/pcbnew/dialogs/dialog_graphic_item_properties.cpp b/pcbnew/dialogs/dialog_graphic_item_properties.cpp index ea133794b8..d9cb7818c9 100644 --- a/pcbnew/dialogs/dialog_graphic_item_properties.cpp +++ b/pcbnew/dialogs/dialog_graphic_item_properties.cpp @@ -170,7 +170,7 @@ void DIALOG_GRAPHIC_ITEM_PROPERTIES::initDlg( ) int thickness; - if( m_Item->GetLayer() == EDGE_N ) + if( m_Item->GetLayer() == Edge_Cuts ) thickness = m_brdSettings.m_EdgeSegmentWidth; else thickness = m_brdSettings.m_DrawSegmentWidth; @@ -179,7 +179,7 @@ void DIALOG_GRAPHIC_ITEM_PROPERTIES::initDlg( ) // Configure the layers list selector m_LayerSelectionCtrl->SetLayersHotkeys( false ); - m_LayerSelectionCtrl->SetLayerMask( ALL_CU_LAYERS ); + m_LayerSelectionCtrl->SetLayerSet( LSET::AllCuMask() ); m_LayerSelectionCtrl->SetBoardFrame( m_parent ); m_LayerSelectionCtrl->Resync(); @@ -187,7 +187,7 @@ void DIALOG_GRAPHIC_ITEM_PROPERTIES::initDlg( ) { wxMessageBox( _( "This item has an illegal layer id.\n" "Now, forced on the drawings layer. Please, fix it" ) ); - m_LayerSelectionCtrl->SetLayerSelection( DRAW_N ); + m_LayerSelectionCtrl->SetLayerSelection( Dwgs_User ); } } @@ -196,7 +196,7 @@ void DIALOG_GRAPHIC_ITEM_PROPERTIES::OnLayerChoice( wxCommandEvent& event ) { int thickness; - if( m_LayerSelectionCtrl->GetLayerSelection() == EDGE_N ) + if( m_LayerSelectionCtrl->GetLayerSelection() == Edge_Cuts ) thickness = m_brdSettings.m_EdgeSegmentWidth; else thickness = m_brdSettings.m_DrawSegmentWidth; @@ -232,9 +232,9 @@ void DIALOG_GRAPHIC_ITEM_PROPERTIES::OnOkClick( wxCommandEvent& event ) msg = m_DefaultThicknessCtrl->GetValue(); int thickness = ValueFromString( g_UserUnit, msg ); - m_Item->SetLayer( m_LayerSelectionCtrl->GetLayerSelection() ); + m_Item->SetLayer( (LAYER_ID) m_LayerSelectionCtrl->GetLayerSelection() ); - if( m_Item->GetLayer() == EDGE_N ) + if( m_Item->GetLayer() == Edge_Cuts ) m_brdSettings.m_EdgeSegmentWidth = thickness; else m_brdSettings.m_DrawSegmentWidth = thickness; diff --git a/pcbnew/dialogs/dialog_graphic_item_properties_for_Modedit.cpp b/pcbnew/dialogs/dialog_graphic_item_properties_for_Modedit.cpp index c04fb03acd..25c4328580 100644 --- a/pcbnew/dialogs/dialog_graphic_item_properties_for_Modedit.cpp +++ b/pcbnew/dialogs/dialog_graphic_item_properties_for_Modedit.cpp @@ -81,10 +81,8 @@ void FOOTPRINT_EDIT_FRAME::InstallFootprintBodyItemPropertiesDlg(EDGE_MODULE * a m_canvas->SetIgnoreMouseEvents( false ); } + void DIALOG_MODEDIT_FP_BODY_ITEM_PROPERTIES::initDlg() -/* Initialize messages and values in text control, - * according to the item parameters values -*/ { SetFocus(); m_StandardButtonsSizerOK->SetDefault(); @@ -105,6 +103,7 @@ void DIALOG_MODEDIT_FP_BODY_ITEM_PROPERTIES::initDlg() { if( texts_unit[ii] == NULL ) break; + texts_unit[ii]->SetLabel( GetAbbreviatedUnitsLabel() ); } @@ -156,14 +155,15 @@ void DIALOG_MODEDIT_FP_BODY_ITEM_PROPERTIES::initDlg() // Configure the layers list selector m_LayerSelectionCtrl->SetLayersHotkeys( false ); - m_LayerSelectionCtrl->SetLayerMask( INTERNAL_CU_LAYERS|EDGE_LAYER ); + m_LayerSelectionCtrl->SetLayerSet( LSET::InternalCuMask().set( Edge_Cuts ) ); m_LayerSelectionCtrl->SetBoardFrame( m_parent ); m_LayerSelectionCtrl->Resync(); + if( m_LayerSelectionCtrl->SetLayerSelection( m_item->GetLayer() ) < 0 ) { - wxMessageBox( _("This item has an illegal layer id.\n" - "Now, forced on the front silk screen layer. Please, fix it") ); - m_LayerSelectionCtrl->SetLayerSelection( SILKSCREEN_N_FRONT ); + wxMessageBox( _( "This item has an illegal layer id.\n" + "Now, forced on the front silk screen layer. Please, fix it" ) ); + m_LayerSelectionCtrl->SetLayerSelection( F_SilkS ); } } @@ -220,7 +220,7 @@ void DIALOG_MODEDIT_FP_BODY_ITEM_PROPERTIES::OnOkClick( wxCommandEvent& event ) m_brdSettings.m_ModuleSegmentWidth = thickness; m_parent->SetDesignSettings( m_brdSettings ); - m_item->SetLayer( layer ); + m_item->SetLayer( LAYER_ID( layer ) ); if( m_item->GetShape() == S_ARC ) { diff --git a/pcbnew/dialogs/dialog_keepout_area_properties.cpp b/pcbnew/dialogs/dialog_keepout_area_properties.cpp index af5ba6ff24..ac2c8d08db 100644 --- a/pcbnew/dialogs/dialog_keepout_area_properties.cpp +++ b/pcbnew/dialogs/dialog_keepout_area_properties.cpp @@ -148,27 +148,28 @@ void DIALOG_KEEPOUT_AREA_PROPERTIES::initDialog() wxListItem column0; column0.SetId( 0 ); m_LayerSelectionCtrl->InsertColumn( 0, column0 ); - // Build copper layer list and append to layer widget - int layerCount = board->GetCopperLayerCount(); + wxImageList* imageList = new wxImageList( LAYER_BITMAP_SIZE_X, LAYER_BITMAP_SIZE_Y ); m_LayerSelectionCtrl->AssignImageList( imageList, wxIMAGE_LIST_SMALL ); - for( int ii = 0; ii < layerCount; ii++ ) + + // Build copper layer list and append to layer widget + LSET show = LSET::AllCuMask( board->GetCopperLayerCount() ); + + for( LSEQ cu_stack = show.UIOrder(); cu_stack; ++cu_stack ) { - LAYER_NUM layerNumber = LAYER_N_BACK; + LAYER_ID layer = *cu_stack; - if( layerCount <= 1 || ii < layerCount - 1 ) - layerNumber = ii; - else if( ii == layerCount - 1 ) - layerNumber = LAYER_N_FRONT; + m_layerId.push_back( layer ); - m_layerId.insert( m_layerId.begin(), layerNumber ); + msg = board->GetLayerName( layer ); + + EDA_COLOR_T layerColor = board->GetLayerColor( layer ); - msg = board->GetLayerName( layerNumber ); - EDA_COLOR_T layerColor = board->GetLayerColor( layerNumber ); imageList->Add( makeLayerBitmap( layerColor ) ); - int itemIndex = m_LayerSelectionCtrl->InsertItem( 0, msg, ii ); - if( m_zonesettings.m_CurrentZone_Layer == layerNumber ) + int itemIndex = m_LayerSelectionCtrl->InsertItem( 0, msg, layer ); + + if( m_zonesettings.m_CurrentZone_Layer == layer ) m_LayerSelectionCtrl->Select( itemIndex ); } @@ -221,7 +222,7 @@ bool DIALOG_KEEPOUT_AREA_PROPERTIES::AcceptOptionsForKeepOut() return false; } - m_zonesettings.m_CurrentZone_Layer = m_layerId[ii]; + m_zonesettings.m_CurrentZone_Layer = (LAYER_ID) m_layerId[ii]; switch( m_OutlineAppearanceCtrl->GetSelection() ) { case 0: diff --git a/pcbnew/dialogs/dialog_layers_setup.cpp b/pcbnew/dialogs/dialog_layers_setup.cpp index 636cea9687..5b57412ee5 100644 --- a/pcbnew/dialogs/dialog_layers_setup.cpp +++ b/pcbnew/dialogs/dialog_layers_setup.cpp @@ -25,12 +25,11 @@ #include -#include #include #include #include -#include +#include #include @@ -70,32 +69,92 @@ struct CTLs }; +static LSEQ dlg_layers() +{ + // layers that are put out into the dialog UI, coordinate with wxformbuilder and + // getCTLs( LAYER_NUM aLayerNumber ) + static const LAYER_ID layers[] = { + F_Adhes, + F_Paste, + F_SilkS, + F_Mask, + F_Cu, + + In2_Cu, + In3_Cu, + In4_Cu, + In5_Cu, + In6_Cu, + In7_Cu, + In8_Cu, + In9_Cu, + In10_Cu, + In11_Cu, + In12_Cu, + In13_Cu, + In14_Cu, + In15_Cu, + + In16_Cu, + In17_Cu, + In18_Cu, + In19_Cu, + In20_Cu, + In21_Cu, + In22_Cu, + In23_Cu, + In24_Cu, + In25_Cu, + In26_Cu, + In27_Cu, + In28_Cu, + In29_Cu, + In30_Cu, + + B_Cu, + B_Mask, + B_SilkS, + B_Paste, + B_Adhes, + + Edge_Cuts, + Margin, + Eco2_User, + Eco1_User, + Cmts_User, + Dwgs_User, + }; + + return LSEQ( layers, layers + DIM( layers ) ); +} + + class DIALOG_LAYERS_SETUP : public DIALOG_LAYERS_SETUP_BASE { -private: - PCB_EDIT_FRAME* m_Parent; +public: + DIALOG_LAYERS_SETUP( wxTopLevelWindow* aCaller, BOARD* aBoard ); - int m_CopperLayerCount; - LAYER_MSK m_EnabledLayers; +protected: + int m_CopperLayerCount; + LSET m_EnabledLayers; - BOARD* m_Pcb; - - wxStaticText* m_NameStaticText; - wxStaticText* m_EnabledStaticText; - wxStaticText* m_TypeStaticText; + BOARD* m_Pcb; + wxStaticText* m_NameStaticText; + wxStaticText* m_EnabledStaticText; + wxStaticText* m_TypeStaticText; void setLayerCheckBox( LAYER_NUM layer, bool isChecked ); void setCopperLayerCheckBoxes( int copperCount ); void showCopperChoice( int copperCount ); void showBoardLayerNames(); - void showSelectedLayerCheckBoxes( LAYER_MSK enableLayerMask ); + void showSelectedLayerCheckBoxes( LSET enableLayerMask ); void showLayerTypes(); - void showPresets( LAYER_MSK enabledLayerMask ); + void showPresets( LSET enabledLayerMask ); /** return the selected layer mask within the UI checkboxes */ - LAYER_MSK getUILayerMask(); + LSET getUILayerMask(); wxString getLayerName( LAYER_NUM layer ); int getLayerTypeIndex( LAYER_NUM layer ); @@ -150,11 +209,6 @@ private: m_TypeStaticText->Move( offset + (widths[2] - txtz.x)/2, 5 ); } - -public: - DIALOG_LAYERS_SETUP( PCB_EDIT_FRAME* parent ); - ~DIALOG_LAYERS_SETUP( ) { }; - /** * Function Layout * overrides the standard Layout() function so that the column titles can @@ -171,27 +225,27 @@ public: // Layer bit masks for each defined "Preset Layer Grouping" -static const LAYER_MSK presets[] = +static const LSET presets[] = { - NO_LAYERS, // shift the array index up by one, matches with "Custom". + LSET(), // shift the array index up by one, matches with "Custom". // "Two layers, parts on Front only" - EDGE_LAYER | LAYER_FRONT | LAYER_BACK | FRONT_TECH_LAYERS, + LSET( 2, F_Cu, B_Cu ) | LSET::FrontTechMask() | LSET::UserMask(), // "Two layers, parts on Back only", - EDGE_LAYER | LAYER_FRONT | LAYER_BACK | BACK_TECH_LAYERS, + LSET( 2, F_Cu, B_Cu ) | LSET::BackTechMask() | LSET::UserMask(), // "Two layers, parts on Front and Back", - EDGE_LAYER | LAYER_FRONT | LAYER_BACK | ALL_TECH_LAYERS, + LSET( 2, F_Cu, B_Cu ) | LSET::FrontTechMask() | LSET::BackTechMask() | LSET::UserMask(), // "Four layers, parts on Front only" - EDGE_LAYER | LAYER_FRONT | LAYER_BACK | LAYER_2 | LAYER_3 | FRONT_TECH_LAYERS, + LSET( 4, F_Cu, B_Cu, In1_Cu, In2_Cu ) | LSET::FrontTechMask() | LSET::UserMask(), // "Four layers, parts on Front and Back" - EDGE_LAYER | LAYER_FRONT | LAYER_BACK | LAYER_2 | LAYER_3 | ALL_TECH_LAYERS, + LSET( 4, F_Cu, B_Cu, In1_Cu, In2_Cu ) | LSET::FrontTechMask() | LSET::BackTechMask() | LSET::UserMask(), // "All layers on", - ALL_LAYERS, + LSET().set(), }; @@ -202,54 +256,58 @@ CTLs DIALOG_LAYERS_SETUP::getCTLs( LAYER_NUM aLayerNumber ) switch( aLayerNumber ) { - case ADHESIVE_N_FRONT: RETAUX( m_AdhesFront ); - case SOLDERPASTE_N_FRONT: RETAUX( m_SoldPFront ); - case SILKSCREEN_N_FRONT: RETAUX( m_SilkSFront ); - case SOLDERMASK_N_FRONT: RETAUX( m_MaskFront ); - case LAYER_N_FRONT: RETCOP( m_Front ); -#ifdef USE_LAYER_MANAGER_COPPER_LAYERS_ORDER - case LAYER_N_15: RETCOP( m_Inner2 ); - case LAYER_N_14: RETCOP( m_Inner3 ); - case LAYER_N_13: RETCOP( m_Inner4 ); - case LAYER_N_12: RETCOP( m_Inner5 ); - case LAYER_N_11: RETCOP( m_Inner6 ); - case LAYER_N_10: RETCOP( m_Inner7 ); - case LAYER_N_9: RETCOP( m_Inner8 ); - case LAYER_N_8: RETCOP( m_Inner9 ); - case LAYER_N_7: RETCOP( m_Inner10 ); - case LAYER_N_6: RETCOP( m_Inner11 ); - case LAYER_N_5: RETCOP( m_Inner12 ); - case LAYER_N_4: RETCOP( m_Inner13 ); - case LAYER_N_3: RETCOP( m_Inner14 ); - case LAYER_N_2: RETCOP( m_Inner15 ); -#else - case LAYER_N_2: RETCOP( m_Inner2 ); - case LAYER_N_3: RETCOP( m_Inner3 ); - case LAYER_N_4: RETCOP( m_Inner4 ); - case LAYER_N_5: RETCOP( m_Inner5 ); - case LAYER_N_6: RETCOP( m_Inner6 ); - case LAYER_N_7: RETCOP( m_Inner7 ); - case LAYER_N_8: RETCOP( m_Inner8 ); - case LAYER_N_9: RETCOP( m_Inner9 ); - case LAYER_N_10: RETCOP( m_Inner10 ); - case LAYER_N_11: RETCOP( m_Inner11 ); - case LAYER_N_12: RETCOP( m_Inner12 ); - case LAYER_N_13: RETCOP( m_Inner13 ); - case LAYER_N_14: RETCOP( m_Inner14 ); - case LAYER_N_15: RETCOP( m_Inner15 ); -#endif - case LAYER_N_BACK: RETCOP( m_Back ); - case SOLDERMASK_N_BACK: RETAUX( m_MaskBack ); - case SILKSCREEN_N_BACK: RETAUX( m_SilkSBack ); - case SOLDERPASTE_N_BACK: RETAUX( m_SoldPBack ); - case ADHESIVE_N_BACK: RETAUX( m_AdhesBack ); - case EDGE_N: RETAUX( m_PCBEdges ); - case ECO2_N: RETAUX( m_Eco2 ); - case ECO1_N: RETAUX( m_Eco1 ); - case COMMENT_N: RETAUX( m_Comments ); - case DRAW_N: RETAUX( m_Drawings ); + case F_Adhes: RETAUX( m_AdhesFront ); + case F_Paste: RETAUX( m_SoldPFront ); + case F_SilkS: RETAUX( m_SilkSFront ); + case F_Mask: RETAUX( m_MaskFront ); + case F_Cu: RETCOP( m_Front ); + + case In1_Cu: RETCOP( m_In1 ); + case In2_Cu: RETCOP( m_In2 ); + case In3_Cu: RETCOP( m_In3 ); + case In4_Cu: RETCOP( m_In4 ); + case In5_Cu: RETCOP( m_In5 ); + case In6_Cu: RETCOP( m_In6 ); + case In7_Cu: RETCOP( m_In7 ); + case In8_Cu: RETCOP( m_In8 ); + case In9_Cu: RETCOP( m_In9 ); + case In10_Cu: RETCOP( m_In10 ); + case In11_Cu: RETCOP( m_In11 ); + case In12_Cu: RETCOP( m_In12 ); + case In13_Cu: RETCOP( m_In13 ); + case In14_Cu: RETCOP( m_In14 ); + case In15_Cu: RETCOP( m_In15 ); + + case In16_Cu: RETCOP( m_In16 ); + case In17_Cu: RETCOP( m_In17 ); + case In18_Cu: RETCOP( m_In18 ); + case In19_Cu: RETCOP( m_In19 ); + case In20_Cu: RETCOP( m_In20 ); + case In21_Cu: RETCOP( m_In21 ); + case In22_Cu: RETCOP( m_In22 ); + case In23_Cu: RETCOP( m_In23 ); + case In24_Cu: RETCOP( m_In24 ); + case In25_Cu: RETCOP( m_In25 ); + case In26_Cu: RETCOP( m_In26 ); + case In27_Cu: RETCOP( m_In27 ); + case In28_Cu: RETCOP( m_In28 ); + case In29_Cu: RETCOP( m_In29 ); + case In30_Cu: RETCOP( m_In30 ); + + case B_Cu: RETCOP( m_Back ); + case B_Mask: RETAUX( m_MaskBack ); + case B_SilkS: RETAUX( m_SilkSBack ); + case B_Paste: RETAUX( m_SoldPBack ); + case B_Adhes: RETAUX( m_AdhesBack ); + + case Edge_Cuts: RETAUX( m_PCBEdges ); + case Margin: RETAUX( m_Margin ); + case Eco2_User: RETAUX( m_Eco2 ); + case Eco1_User: RETAUX( m_Eco1 ); + case Cmts_User: RETAUX( m_Comments ); + case Dwgs_User: RETAUX( m_Drawings ); default: - // wxDEBUGMSG( "bad layer id" ); + wxASSERT_MSG( 0, wxT( "bad layer id" ) ); return CTLs( 0, 0, 0 ); } @@ -258,13 +316,10 @@ CTLs DIALOG_LAYERS_SETUP::getCTLs( LAYER_NUM aLayerNumber ) } -/***********************************************************************************/ -DIALOG_LAYERS_SETUP::DIALOG_LAYERS_SETUP( PCB_EDIT_FRAME* parent ) : - DIALOG_LAYERS_SETUP_BASE( parent ) -/***********************************************************************************/ +DIALOG_LAYERS_SETUP::DIALOG_LAYERS_SETUP( wxTopLevelWindow* aParent, BOARD* aBoard ) : + DIALOG_LAYERS_SETUP_BASE( aParent ) { - m_Parent = parent; - m_Pcb = m_Parent->GetBoard(); + m_Pcb = aBoard; m_CopperLayerCount = m_Pcb->GetCopperLayerCount(); showCopperChoice( m_CopperLayerCount ); @@ -325,8 +380,10 @@ void DIALOG_LAYERS_SETUP::showBoardLayerNames() // obtaining them from BOARD::GetLayerName() which calls // BOARD::GetStandardLayerName() for non-coppers. - for( LAYER_NUM layer=FIRST_LAYER; layerSetSelection( m_Pcb->GetLayerType( copperLayer ) ); + LAYER_ID cu_layer = *seq; + + wxChoice* ctl = getChoice( cu_layer ); + ctl->SetSelection( m_Pcb->GetLayerType( cu_layer ) ); } } -LAYER_MSK DIALOG_LAYERS_SETUP::getUILayerMask() +LSET DIALOG_LAYERS_SETUP::getUILayerMask() { - LAYER_MSK layerMaskResult = NO_LAYERS; + LSET layerMaskResult; - for( LAYER_NUM layer=FIRST_LAYER; layerGetValue() ) { - layerMaskResult |= GetLayerMask( layer ); + layerMaskResult.set( layer ); } } @@ -411,23 +474,20 @@ void DIALOG_LAYERS_SETUP::setCopperLayerCheckBoxes( int copperCount ) { if( copperCount > 0 ) { - setLayerCheckBox( LAYER_N_BACK, true ); + setLayerCheckBox( F_Cu, true ); --copperCount; } if( copperCount > 0 ) { - setLayerCheckBox( LAYER_N_FRONT, true ); + setLayerCheckBox( B_Cu, true ); --copperCount; } - else - { - setLayerCheckBox( LAYER_N_FRONT, false ); - } - for( LAYER_NUM layer=LAYER_N_2; layer < NB_COPPER_LAYERS-1; ++layer, --copperCount ) + for( LSEQ seq = LSET::InternalCuMask().Seq(); seq; ++seq, --copperCount ) { - bool state = copperCount > 0; + LAYER_ID layer = *seq; + bool state = copperCount > 0; #ifdef HIDE_INACTIVE_LAYERS // This code hides non-active copper layers, or redisplays hidden @@ -448,10 +508,9 @@ void DIALOG_LAYERS_SETUP::setCopperLayerCheckBoxes( int copperCount ) #ifdef HIDE_INACTIVE_LAYERS // Send an size event to force sizers to be updated, // because the number of copper layers can have changed. - wxSizeEvent evt_size(m_LayersListPanel->GetSize() ); + wxSizeEvent evt_size( m_LayersListPanel->GetSize() ); m_LayersListPanel->GetEventHandler()->ProcessEvent( evt_size ); #endif - } @@ -486,16 +545,9 @@ void DIALOG_LAYERS_SETUP::OnPresetsChoice( wxCommandEvent& event ) { m_EnabledLayers = presets[ presetNdx ]; - int coppersMask = m_EnabledLayers & ALL_CU_LAYERS; + LSET copperSet = m_EnabledLayers & LSET::AllCuMask(); - int copperCount = 0; - while( coppersMask ) - { - if( coppersMask & 1 ) - ++copperCount; - - coppersMask >>= 1; - } + int copperCount = copperSet.count(); m_CopperLayerCount = copperCount; @@ -520,17 +572,13 @@ void DIALOG_LAYERS_SETUP::OnCopperLayersChoice( wxCommandEvent& event ) } -/*****************************************************************/ void DIALOG_LAYERS_SETUP::OnCancelButtonClick( wxCommandEvent& event ) -/*****************************************************************/ { EndModal( wxID_CANCEL ); } -/**************************************************************************/ void DIALOG_LAYERS_SETUP::OnOkButtonClick( wxCommandEvent& event ) -/**************************************************************************/ { if( testLayerNames() ) { @@ -545,29 +593,27 @@ void DIALOG_LAYERS_SETUP::OnOkButtonClick( wxCommandEvent& event ) */ m_Pcb->SetVisibleLayers( m_EnabledLayers ); - for( LAYER_NUM layer = FIRST_COPPER_LAYER; - layer <= LAST_COPPER_LAYER; ++layer ) + for( LSEQ seq = LSET::AllCuMask().Seq(); seq; ++seq ) { - if( GetLayerMask( layer ) & m_EnabledLayers ) + LAYER_ID layer = *seq; + + if( m_EnabledLayers[layer] ) { name = getLayerName( layer ); m_Pcb->SetLayerName( layer, name ); - LAYER_T t = (LAYER_T) getLayerTypeIndex(layer); + LAYER_T t = (LAYER_T) getLayerTypeIndex( layer ); m_Pcb->SetLayerType( layer, t ); } } - m_Parent->OnModify(); - m_Parent->ReCreateLayerBox(); - m_Parent->ReFillLayerWidget(); - EndModal( wxID_OK ); } } + int DIALOG_LAYERS_SETUP::getLayerTypeIndex( LAYER_NUM aLayer ) { wxChoice* ctl = getChoice( aLayer ); @@ -577,6 +623,7 @@ int DIALOG_LAYERS_SETUP::getLayerTypeIndex( LAYER_NUM aLayer ) return ret; } + wxString DIALOG_LAYERS_SETUP::getLayerName( LAYER_NUM aLayer ) { wxString ret; @@ -590,6 +637,7 @@ wxString DIALOG_LAYERS_SETUP::getLayerName( LAYER_NUM aLayer ) return ret; } + static bool hasOneOf( const wxString& str, const wxString& chars ) { for( unsigned i=0; i names; wxTextCtrl* ctl; - for( LAYER_NUM layer=FIRST_LAYER; layer<=LAST_COPPER_LAYER; ++layer ) + for( LSEQ seq = LSET::AllCuMask().Seq(); seq; ++seq ) { + LAYER_ID layer = *seq; + // we _can_ rely on m_EnabledLayers being current here: - if( !(m_EnabledLayers & GetLayerMask( layer )) ) + if( !m_EnabledLayers[layer] ) continue; wxString name = getLayerName( layer ); @@ -625,7 +676,7 @@ bool DIALOG_LAYERS_SETUP::testLayerNames() // 6) cannot have illegal chars in filenames ( some filenames are built from layer names ) static const wxString badchars( wxT("%$\" /\\") ); - if( name == wxEmptyString ) + if( !name ) { DisplayError( this, _("Layer name may not be empty" ) ); ctl->SetFocus(); // on the bad name @@ -663,36 +714,9 @@ bool DIALOG_LAYERS_SETUP::testLayerNames() } -void PCB_EDIT_FRAME::InstallDialogLayerSetup() +bool InvokeLayerSetup( wxTopLevelWindow* aCaller, BOARD* aBoard ) { - DIALOG_LAYERS_SETUP dlg( this ); + DIALOG_LAYERS_SETUP dlg( aCaller, aBoard ); - if( dlg.ShowModal() == wxID_CANCEL ) - return; - - wxLogDebug( wxT( "Current layer selected %d." ), GetActiveLayer() ); - - // If the current active layer was removed, find the next avaiable layer to set as the - // active layer. - if( !( GetLayerMask( GetActiveLayer() ) & GetBoard()->GetEnabledLayers() ) ) - { - for( LAYER_NUM i = FIRST_LAYER; i < NB_LAYERS; ++i ) - { - LAYER_NUM tmp = i; - - if( i >= NB_LAYERS ) - tmp = i - NB_LAYERS; - - if( GetLayerMask( tmp ) & GetBoard()->GetEnabledLayers() ) - { - wxLogDebug( wxT( "Setting current layer to %d." ), GetActiveLayer() ); - SetActiveLayer( tmp, true ); - break; - } - } - } - else - { - SetActiveLayer( GetActiveLayer(), true ); - } + return dlg.ShowModal() == wxID_OK; } diff --git a/pcbnew/dialogs/dialog_layers_setup_base.cpp b/pcbnew/dialogs/dialog_layers_setup_base.cpp index f4cccb0019..f0e5978dba 100644 --- a/pcbnew/dialogs/dialog_layers_setup_base.cpp +++ b/pcbnew/dialogs/dialog_layers_setup_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 8 2012) +// C++ code generated with wxFormBuilder (version Jun 6 2014) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -42,10 +42,10 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID m_staticTextCopperLayers->Wrap( -1 ); bCopperLayersSizer->Add( m_staticTextCopperLayers, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - wxString m_CopperLayersChoiceChoices[] = { _("2"), _("4"), _("6"), _("8"), _("10"), _("12"), _("14"), _("16") }; + wxString m_CopperLayersChoiceChoices[] = { _("2"), _("4"), _("6"), _("8"), _("10"), _("12"), _("14"), _("16"), _("18"), _("20"), _("22"), _("24"), _("26"), _("27"), _("28"), _("30"), _("32") }; int m_CopperLayersChoiceNChoices = sizeof( m_CopperLayersChoiceChoices ) / sizeof( wxString ); m_CopperLayersChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_CopperLayersChoiceNChoices, m_CopperLayersChoiceChoices, 0 ); - m_CopperLayersChoice->SetSelection( 0 ); + m_CopperLayersChoice->SetSelection( 3 ); bCopperLayersSizer->Add( m_CopperLayersChoice, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); @@ -212,383 +212,815 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID m_LayerListFlexGridSizer->Add( m_FrontChoice, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); - m_Inner2Name = new wxTextCtrl( m_LayersListPanel, ID_INNER2NAME, _("Inner2"), wxDefaultPosition, wxDefaultSize, 0 ); - m_Inner2Name->SetMaxLength( 20 ); - m_LayerListFlexGridSizer->Add( m_Inner2Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + m_In1Name = new wxTextCtrl( m_LayersListPanel, ID_IN1NAME, _("In1"), wxDefaultPosition, wxDefaultSize, 0 ); + m_In1Name->SetMaxLength( 20 ); + m_LayerListFlexGridSizer->Add( m_In1Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); - m_Inner2Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_Inner2Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); + m_In1Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_In1Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); - wxBoxSizer* bInner2Sizer; - bInner2Sizer = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bIn1Sizer; + bIn1Sizer = new wxBoxSizer( wxVERTICAL ); - m_Inner2CheckBox = new wxCheckBox( m_Inner2Panel, ID_INNER2CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bInner2Sizer->Add( m_Inner2CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + m_In1CheckBox = new wxCheckBox( m_In1Panel, ID_IN1CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bIn1Sizer->Add( m_In1CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - m_Inner2Panel->SetSizer( bInner2Sizer ); - m_Inner2Panel->Layout(); - bInner2Sizer->Fit( m_Inner2Panel ); - m_LayerListFlexGridSizer->Add( m_Inner2Panel, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + m_In1Panel->SetSizer( bIn1Sizer ); + m_In1Panel->Layout(); + bIn1Sizer->Fit( m_In1Panel ); + m_LayerListFlexGridSizer->Add( m_In1Panel, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - wxString m_Inner2ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; - int m_Inner2ChoiceNChoices = sizeof( m_Inner2ChoiceChoices ) / sizeof( wxString ); - m_Inner2Choice = new wxChoice( m_LayersListPanel, ID_INNER2CHOICE, wxDefaultPosition, wxDefaultSize, m_Inner2ChoiceNChoices, m_Inner2ChoiceChoices, 0 ); - m_Inner2Choice->SetSelection( 0 ); - m_Inner2Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); + wxString m_In1ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; + int m_In1ChoiceNChoices = sizeof( m_In1ChoiceChoices ) / sizeof( wxString ); + m_In1Choice = new wxChoice( m_LayersListPanel, ID_IN1CHOICE, wxDefaultPosition, wxDefaultSize, m_In1ChoiceNChoices, m_In1ChoiceChoices, 0 ); + m_In1Choice->SetSelection( 0 ); + m_In1Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); - m_LayerListFlexGridSizer->Add( m_Inner2Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + m_LayerListFlexGridSizer->Add( m_In1Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); - m_Inner3Name = new wxTextCtrl( m_LayersListPanel, ID_INNER3NAME, _("Inner3"), wxDefaultPosition, wxDefaultSize, 0 ); - m_Inner3Name->SetMaxLength( 20 ); - m_LayerListFlexGridSizer->Add( m_Inner3Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + m_In2Name = new wxTextCtrl( m_LayersListPanel, ID_IN2NAME, _("In2"), wxDefaultPosition, wxDefaultSize, 0 ); + m_In2Name->SetMaxLength( 20 ); + m_LayerListFlexGridSizer->Add( m_In2Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); - m_Inner3Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_Inner3Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); + m_In2Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_In2Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); - wxBoxSizer* bInner3Sizer; - bInner3Sizer = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bIn2Sizer; + bIn2Sizer = new wxBoxSizer( wxVERTICAL ); - m_Inner3CheckBox = new wxCheckBox( m_Inner3Panel, ID_INNER3CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bInner3Sizer->Add( m_Inner3CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + m_In2CheckBox = new wxCheckBox( m_In2Panel, ID_IN2CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bIn2Sizer->Add( m_In2CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - m_Inner3Panel->SetSizer( bInner3Sizer ); - m_Inner3Panel->Layout(); - bInner3Sizer->Fit( m_Inner3Panel ); - m_LayerListFlexGridSizer->Add( m_Inner3Panel, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + m_In2Panel->SetSizer( bIn2Sizer ); + m_In2Panel->Layout(); + bIn2Sizer->Fit( m_In2Panel ); + m_LayerListFlexGridSizer->Add( m_In2Panel, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - wxString m_Inner3ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; - int m_Inner3ChoiceNChoices = sizeof( m_Inner3ChoiceChoices ) / sizeof( wxString ); - m_Inner3Choice = new wxChoice( m_LayersListPanel, ID_INNER3CHOICE, wxDefaultPosition, wxDefaultSize, m_Inner3ChoiceNChoices, m_Inner3ChoiceChoices, 0 ); - m_Inner3Choice->SetSelection( 0 ); - m_Inner3Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); + wxString m_In2ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; + int m_In2ChoiceNChoices = sizeof( m_In2ChoiceChoices ) / sizeof( wxString ); + m_In2Choice = new wxChoice( m_LayersListPanel, ID_IN2CHOICE, wxDefaultPosition, wxDefaultSize, m_In2ChoiceNChoices, m_In2ChoiceChoices, 0 ); + m_In2Choice->SetSelection( 0 ); + m_In2Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); - m_LayerListFlexGridSizer->Add( m_Inner3Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + m_LayerListFlexGridSizer->Add( m_In2Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); - m_Inner4Name = new wxTextCtrl( m_LayersListPanel, ID_INNER4NAME, _("Inner4"), wxDefaultPosition, wxDefaultSize, 0 ); - m_Inner4Name->SetMaxLength( 20 ); - m_LayerListFlexGridSizer->Add( m_Inner4Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + m_In3Name = new wxTextCtrl( m_LayersListPanel, ID_IN3NAME, _("In3"), wxDefaultPosition, wxDefaultSize, 0 ); + m_In3Name->SetMaxLength( 20 ); + m_LayerListFlexGridSizer->Add( m_In3Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); - m_Inner4Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_Inner4Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); + m_In3Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_In3Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); - wxBoxSizer* bInner4Sizer; - bInner4Sizer = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bIn3Sizer; + bIn3Sizer = new wxBoxSizer( wxVERTICAL ); - m_Inner4CheckBox = new wxCheckBox( m_Inner4Panel, ID_INNER4CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bInner4Sizer->Add( m_Inner4CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + m_In3CheckBox = new wxCheckBox( m_In3Panel, ID_IN3CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bIn3Sizer->Add( m_In3CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - m_Inner4Panel->SetSizer( bInner4Sizer ); - m_Inner4Panel->Layout(); - bInner4Sizer->Fit( m_Inner4Panel ); - m_LayerListFlexGridSizer->Add( m_Inner4Panel, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + m_In3Panel->SetSizer( bIn3Sizer ); + m_In3Panel->Layout(); + bIn3Sizer->Fit( m_In3Panel ); + m_LayerListFlexGridSizer->Add( m_In3Panel, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - wxString m_Inner4ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; - int m_Inner4ChoiceNChoices = sizeof( m_Inner4ChoiceChoices ) / sizeof( wxString ); - m_Inner4Choice = new wxChoice( m_LayersListPanel, ID_INNER4CHOICE, wxDefaultPosition, wxDefaultSize, m_Inner4ChoiceNChoices, m_Inner4ChoiceChoices, 0 ); - m_Inner4Choice->SetSelection( 0 ); - m_Inner4Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); + wxString m_In3ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; + int m_In3ChoiceNChoices = sizeof( m_In3ChoiceChoices ) / sizeof( wxString ); + m_In3Choice = new wxChoice( m_LayersListPanel, ID_IN3CHOICE, wxDefaultPosition, wxDefaultSize, m_In3ChoiceNChoices, m_In3ChoiceChoices, 0 ); + m_In3Choice->SetSelection( 0 ); + m_In3Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); - m_LayerListFlexGridSizer->Add( m_Inner4Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + m_LayerListFlexGridSizer->Add( m_In3Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); - m_Inner5Name = new wxTextCtrl( m_LayersListPanel, ID_INNER5NAME, _("Inner5"), wxDefaultPosition, wxDefaultSize, 0 ); - m_Inner5Name->SetMaxLength( 20 ); - m_LayerListFlexGridSizer->Add( m_Inner5Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + m_In4Name = new wxTextCtrl( m_LayersListPanel, ID_IN4NAME, _("In4"), wxDefaultPosition, wxDefaultSize, 0 ); + m_In4Name->SetMaxLength( 20 ); + m_LayerListFlexGridSizer->Add( m_In4Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); - m_Inner5Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_Inner5Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); + m_In4Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_In4Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); - wxBoxSizer* bInner5Sizer; - bInner5Sizer = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bIn4Sizer; + bIn4Sizer = new wxBoxSizer( wxVERTICAL ); - m_Inner5CheckBox = new wxCheckBox( m_Inner5Panel, ID_INNER5CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bInner5Sizer->Add( m_Inner5CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + m_In4CheckBox = new wxCheckBox( m_In4Panel, ID_IN4CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bIn4Sizer->Add( m_In4CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - m_Inner5Panel->SetSizer( bInner5Sizer ); - m_Inner5Panel->Layout(); - bInner5Sizer->Fit( m_Inner5Panel ); - m_LayerListFlexGridSizer->Add( m_Inner5Panel, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + m_In4Panel->SetSizer( bIn4Sizer ); + m_In4Panel->Layout(); + bIn4Sizer->Fit( m_In4Panel ); + m_LayerListFlexGridSizer->Add( m_In4Panel, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - wxString m_Inner5ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; - int m_Inner5ChoiceNChoices = sizeof( m_Inner5ChoiceChoices ) / sizeof( wxString ); - m_Inner5Choice = new wxChoice( m_LayersListPanel, ID_INNER5CHOICE, wxDefaultPosition, wxDefaultSize, m_Inner5ChoiceNChoices, m_Inner5ChoiceChoices, 0 ); - m_Inner5Choice->SetSelection( 0 ); - m_Inner5Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); + wxString m_In4ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; + int m_In4ChoiceNChoices = sizeof( m_In4ChoiceChoices ) / sizeof( wxString ); + m_In4Choice = new wxChoice( m_LayersListPanel, ID_IN4CHOICE, wxDefaultPosition, wxDefaultSize, m_In4ChoiceNChoices, m_In4ChoiceChoices, 0 ); + m_In4Choice->SetSelection( 0 ); + m_In4Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); - m_LayerListFlexGridSizer->Add( m_Inner5Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + m_LayerListFlexGridSizer->Add( m_In4Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); - m_Inner6Name = new wxTextCtrl( m_LayersListPanel, ID_INNER6NAME, _("Inner6"), wxDefaultPosition, wxDefaultSize, 0 ); - m_Inner6Name->SetMaxLength( 20 ); - m_LayerListFlexGridSizer->Add( m_Inner6Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + m_In5Name = new wxTextCtrl( m_LayersListPanel, ID_IN5NAME, _("In5"), wxDefaultPosition, wxDefaultSize, 0 ); + m_In5Name->SetMaxLength( 20 ); + m_LayerListFlexGridSizer->Add( m_In5Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); - m_Inner6Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_Inner6Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); + m_In5Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_In5Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); - wxBoxSizer* bInner6Sizer; - bInner6Sizer = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bIn5Sizer; + bIn5Sizer = new wxBoxSizer( wxVERTICAL ); - m_Inner6CheckBox = new wxCheckBox( m_Inner6Panel, ID_INNER6CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bInner6Sizer->Add( m_Inner6CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + m_In5CheckBox = new wxCheckBox( m_In5Panel, ID_IN5CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bIn5Sizer->Add( m_In5CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - m_Inner6Panel->SetSizer( bInner6Sizer ); - m_Inner6Panel->Layout(); - bInner6Sizer->Fit( m_Inner6Panel ); - m_LayerListFlexGridSizer->Add( m_Inner6Panel, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + m_In5Panel->SetSizer( bIn5Sizer ); + m_In5Panel->Layout(); + bIn5Sizer->Fit( m_In5Panel ); + m_LayerListFlexGridSizer->Add( m_In5Panel, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - wxString m_Inner6ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; - int m_Inner6ChoiceNChoices = sizeof( m_Inner6ChoiceChoices ) / sizeof( wxString ); - m_Inner6Choice = new wxChoice( m_LayersListPanel, ID_INNER6CHOICE, wxDefaultPosition, wxDefaultSize, m_Inner6ChoiceNChoices, m_Inner6ChoiceChoices, 0 ); - m_Inner6Choice->SetSelection( 0 ); - m_Inner6Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); + wxString m_In5ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; + int m_In5ChoiceNChoices = sizeof( m_In5ChoiceChoices ) / sizeof( wxString ); + m_In5Choice = new wxChoice( m_LayersListPanel, ID_IN5CHOICE, wxDefaultPosition, wxDefaultSize, m_In5ChoiceNChoices, m_In5ChoiceChoices, 0 ); + m_In5Choice->SetSelection( 0 ); + m_In5Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); - m_LayerListFlexGridSizer->Add( m_Inner6Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + m_LayerListFlexGridSizer->Add( m_In5Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); - m_Inner7Name = new wxTextCtrl( m_LayersListPanel, ID_INNER7NAME, _("Inner7"), wxDefaultPosition, wxDefaultSize, 0 ); - m_Inner7Name->SetMaxLength( 20 ); - m_LayerListFlexGridSizer->Add( m_Inner7Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + m_In6Name = new wxTextCtrl( m_LayersListPanel, ID_IN6NAME, _("In6"), wxDefaultPosition, wxDefaultSize, 0 ); + m_In6Name->SetMaxLength( 20 ); + m_LayerListFlexGridSizer->Add( m_In6Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); - m_Inner7Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_Inner7Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); + m_In6Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_In6Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); - wxBoxSizer* bInner7Sizer; - bInner7Sizer = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bIn6Sizer; + bIn6Sizer = new wxBoxSizer( wxVERTICAL ); - m_Inner7CheckBox = new wxCheckBox( m_Inner7Panel, ID_INNER7CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bInner7Sizer->Add( m_Inner7CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + m_In6CheckBox = new wxCheckBox( m_In6Panel, ID_IN6CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bIn6Sizer->Add( m_In6CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - m_Inner7Panel->SetSizer( bInner7Sizer ); - m_Inner7Panel->Layout(); - bInner7Sizer->Fit( m_Inner7Panel ); - m_LayerListFlexGridSizer->Add( m_Inner7Panel, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + m_In6Panel->SetSizer( bIn6Sizer ); + m_In6Panel->Layout(); + bIn6Sizer->Fit( m_In6Panel ); + m_LayerListFlexGridSizer->Add( m_In6Panel, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - wxString m_Inner7ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; - int m_Inner7ChoiceNChoices = sizeof( m_Inner7ChoiceChoices ) / sizeof( wxString ); - m_Inner7Choice = new wxChoice( m_LayersListPanel, ID_INNER7CHOICE, wxDefaultPosition, wxDefaultSize, m_Inner7ChoiceNChoices, m_Inner7ChoiceChoices, 0 ); - m_Inner7Choice->SetSelection( 0 ); - m_Inner7Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); + wxString m_In6ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; + int m_In6ChoiceNChoices = sizeof( m_In6ChoiceChoices ) / sizeof( wxString ); + m_In6Choice = new wxChoice( m_LayersListPanel, ID_IN6CHOICE, wxDefaultPosition, wxDefaultSize, m_In6ChoiceNChoices, m_In6ChoiceChoices, 0 ); + m_In6Choice->SetSelection( 0 ); + m_In6Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); - m_LayerListFlexGridSizer->Add( m_Inner7Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + m_LayerListFlexGridSizer->Add( m_In6Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); - m_Inner8Name = new wxTextCtrl( m_LayersListPanel, ID_INNER8NAME, _("Inner8"), wxDefaultPosition, wxDefaultSize, 0 ); - m_Inner8Name->SetMaxLength( 20 ); - m_LayerListFlexGridSizer->Add( m_Inner8Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + m_In7Name = new wxTextCtrl( m_LayersListPanel, ID_IN7NAME, _("In7"), wxDefaultPosition, wxDefaultSize, 0 ); + m_In7Name->SetMaxLength( 20 ); + m_LayerListFlexGridSizer->Add( m_In7Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); - m_Inner8Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_Inner8Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); + m_In7Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_In7Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); - wxBoxSizer* bInner8Sizer; - bInner8Sizer = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bIn7Sizer; + bIn7Sizer = new wxBoxSizer( wxVERTICAL ); - m_Inner8CheckBox = new wxCheckBox( m_Inner8Panel, ID_INNER8CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bInner8Sizer->Add( m_Inner8CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + m_In7CheckBox = new wxCheckBox( m_In7Panel, ID_IN7CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bIn7Sizer->Add( m_In7CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - m_Inner8Panel->SetSizer( bInner8Sizer ); - m_Inner8Panel->Layout(); - bInner8Sizer->Fit( m_Inner8Panel ); - m_LayerListFlexGridSizer->Add( m_Inner8Panel, 1, wxEXPAND, 5 ); + m_In7Panel->SetSizer( bIn7Sizer ); + m_In7Panel->Layout(); + bIn7Sizer->Fit( m_In7Panel ); + m_LayerListFlexGridSizer->Add( m_In7Panel, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - wxString m_Inner8ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; - int m_Inner8ChoiceNChoices = sizeof( m_Inner8ChoiceChoices ) / sizeof( wxString ); - m_Inner8Choice = new wxChoice( m_LayersListPanel, ID_INNER8CHOICE, wxDefaultPosition, wxDefaultSize, m_Inner8ChoiceNChoices, m_Inner8ChoiceChoices, 0 ); - m_Inner8Choice->SetSelection( 0 ); - m_Inner8Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); + wxString m_In7ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; + int m_In7ChoiceNChoices = sizeof( m_In7ChoiceChoices ) / sizeof( wxString ); + m_In7Choice = new wxChoice( m_LayersListPanel, ID_IN7CHOICE, wxDefaultPosition, wxDefaultSize, m_In7ChoiceNChoices, m_In7ChoiceChoices, 0 ); + m_In7Choice->SetSelection( 0 ); + m_In7Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); - m_LayerListFlexGridSizer->Add( m_Inner8Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + m_LayerListFlexGridSizer->Add( m_In7Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); - m_Inner9Name = new wxTextCtrl( m_LayersListPanel, ID_INNER9NAME, _("Inner9"), wxDefaultPosition, wxDefaultSize, 0 ); - m_Inner9Name->SetMaxLength( 20 ); - m_LayerListFlexGridSizer->Add( m_Inner9Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + m_In8Name = new wxTextCtrl( m_LayersListPanel, ID_IN8NAME, _("In8"), wxDefaultPosition, wxDefaultSize, 0 ); + m_In8Name->SetMaxLength( 20 ); + m_LayerListFlexGridSizer->Add( m_In8Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); - m_Inner9Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_Inner9Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); + m_In8Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_In8Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); - wxBoxSizer* bInner9Sizer; - bInner9Sizer = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bIn8Sizer; + bIn8Sizer = new wxBoxSizer( wxVERTICAL ); - m_Inner9CheckBox = new wxCheckBox( m_Inner9Panel, ID_INNER9CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bInner9Sizer->Add( m_Inner9CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + m_In8CheckBox = new wxCheckBox( m_In8Panel, ID_IN8CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bIn8Sizer->Add( m_In8CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - m_Inner9Panel->SetSizer( bInner9Sizer ); - m_Inner9Panel->Layout(); - bInner9Sizer->Fit( m_Inner9Panel ); - m_LayerListFlexGridSizer->Add( m_Inner9Panel, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + m_In8Panel->SetSizer( bIn8Sizer ); + m_In8Panel->Layout(); + bIn8Sizer->Fit( m_In8Panel ); + m_LayerListFlexGridSizer->Add( m_In8Panel, 1, wxEXPAND, 5 ); - wxString m_Inner9ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; - int m_Inner9ChoiceNChoices = sizeof( m_Inner9ChoiceChoices ) / sizeof( wxString ); - m_Inner9Choice = new wxChoice( m_LayersListPanel, ID_INNER9CHOICE, wxDefaultPosition, wxDefaultSize, m_Inner9ChoiceNChoices, m_Inner9ChoiceChoices, 0 ); - m_Inner9Choice->SetSelection( 0 ); - m_Inner9Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); + wxString m_In8ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; + int m_In8ChoiceNChoices = sizeof( m_In8ChoiceChoices ) / sizeof( wxString ); + m_In8Choice = new wxChoice( m_LayersListPanel, ID_IN8CHOICE, wxDefaultPosition, wxDefaultSize, m_In8ChoiceNChoices, m_In8ChoiceChoices, 0 ); + m_In8Choice->SetSelection( 0 ); + m_In8Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); - m_LayerListFlexGridSizer->Add( m_Inner9Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + m_LayerListFlexGridSizer->Add( m_In8Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); - m_Inner10Name = new wxTextCtrl( m_LayersListPanel, ID_INNER10NAME, _("Inner10"), wxDefaultPosition, wxDefaultSize, 0 ); - m_Inner10Name->SetMaxLength( 20 ); - m_LayerListFlexGridSizer->Add( m_Inner10Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + m_In9Name = new wxTextCtrl( m_LayersListPanel, ID_IN9NAME, _("In9"), wxDefaultPosition, wxDefaultSize, 0 ); + m_In9Name->SetMaxLength( 20 ); + m_LayerListFlexGridSizer->Add( m_In9Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); - m_Inner10Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_Inner10Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); + m_In9Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_In9Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); - wxBoxSizer* bInner10Sizer; - bInner10Sizer = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bIn9Sizer; + bIn9Sizer = new wxBoxSizer( wxVERTICAL ); - m_Inner10CheckBox = new wxCheckBox( m_Inner10Panel, ID_INNER10CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bInner10Sizer->Add( m_Inner10CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + m_In9CheckBox = new wxCheckBox( m_In9Panel, ID_IN9CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bIn9Sizer->Add( m_In9CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - m_Inner10Panel->SetSizer( bInner10Sizer ); - m_Inner10Panel->Layout(); - bInner10Sizer->Fit( m_Inner10Panel ); - m_LayerListFlexGridSizer->Add( m_Inner10Panel, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + m_In9Panel->SetSizer( bIn9Sizer ); + m_In9Panel->Layout(); + bIn9Sizer->Fit( m_In9Panel ); + m_LayerListFlexGridSizer->Add( m_In9Panel, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - wxString m_Inner10ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; - int m_Inner10ChoiceNChoices = sizeof( m_Inner10ChoiceChoices ) / sizeof( wxString ); - m_Inner10Choice = new wxChoice( m_LayersListPanel, ID_INNER10CHOICE, wxDefaultPosition, wxDefaultSize, m_Inner10ChoiceNChoices, m_Inner10ChoiceChoices, 0 ); - m_Inner10Choice->SetSelection( 0 ); - m_Inner10Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); + wxString m_In9ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; + int m_In9ChoiceNChoices = sizeof( m_In9ChoiceChoices ) / sizeof( wxString ); + m_In9Choice = new wxChoice( m_LayersListPanel, ID_IN9CHOICE, wxDefaultPosition, wxDefaultSize, m_In9ChoiceNChoices, m_In9ChoiceChoices, 0 ); + m_In9Choice->SetSelection( 0 ); + m_In9Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); - m_LayerListFlexGridSizer->Add( m_Inner10Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + m_LayerListFlexGridSizer->Add( m_In9Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); - m_Inner11Name = new wxTextCtrl( m_LayersListPanel, ID_INNER11NAME, _("Inner11"), wxDefaultPosition, wxDefaultSize, 0 ); - m_Inner11Name->SetMaxLength( 20 ); - m_LayerListFlexGridSizer->Add( m_Inner11Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + m_In10Name = new wxTextCtrl( m_LayersListPanel, ID_IN10NAME, _("In10"), wxDefaultPosition, wxDefaultSize, 0 ); + m_In10Name->SetMaxLength( 20 ); + m_LayerListFlexGridSizer->Add( m_In10Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); - m_Inner11Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_Inner11Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); + m_In10Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_In10Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); - wxBoxSizer* bInner11Sizer; - bInner11Sizer = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bIn10Sizer; + bIn10Sizer = new wxBoxSizer( wxVERTICAL ); - m_Inner11CheckBox = new wxCheckBox( m_Inner11Panel, ID_INNER11CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bInner11Sizer->Add( m_Inner11CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + m_In10CheckBox = new wxCheckBox( m_In10Panel, ID_IN10CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bIn10Sizer->Add( m_In10CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - m_Inner11Panel->SetSizer( bInner11Sizer ); - m_Inner11Panel->Layout(); - bInner11Sizer->Fit( m_Inner11Panel ); - m_LayerListFlexGridSizer->Add( m_Inner11Panel, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + m_In10Panel->SetSizer( bIn10Sizer ); + m_In10Panel->Layout(); + bIn10Sizer->Fit( m_In10Panel ); + m_LayerListFlexGridSizer->Add( m_In10Panel, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - wxString m_Inner11ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; - int m_Inner11ChoiceNChoices = sizeof( m_Inner11ChoiceChoices ) / sizeof( wxString ); - m_Inner11Choice = new wxChoice( m_LayersListPanel, ID_INNER11CHOICE, wxDefaultPosition, wxDefaultSize, m_Inner11ChoiceNChoices, m_Inner11ChoiceChoices, 0 ); - m_Inner11Choice->SetSelection( 0 ); - m_Inner11Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); + wxString m_In10ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; + int m_In10ChoiceNChoices = sizeof( m_In10ChoiceChoices ) / sizeof( wxString ); + m_In10Choice = new wxChoice( m_LayersListPanel, ID_IN10CHOICE, wxDefaultPosition, wxDefaultSize, m_In10ChoiceNChoices, m_In10ChoiceChoices, 0 ); + m_In10Choice->SetSelection( 0 ); + m_In10Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); - m_LayerListFlexGridSizer->Add( m_Inner11Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + m_LayerListFlexGridSizer->Add( m_In10Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); - m_Inner12Name = new wxTextCtrl( m_LayersListPanel, ID_INNER12NAME, _("Inner12"), wxDefaultPosition, wxDefaultSize, 0 ); - m_Inner12Name->SetMaxLength( 20 ); - m_LayerListFlexGridSizer->Add( m_Inner12Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + m_In11Name = new wxTextCtrl( m_LayersListPanel, ID_IN11NAME, _("In11"), wxDefaultPosition, wxDefaultSize, 0 ); + m_In11Name->SetMaxLength( 20 ); + m_LayerListFlexGridSizer->Add( m_In11Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); - m_Inner12Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_Inner12Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); + m_In11Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_In11Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); - wxBoxSizer* bInner12Sizer; - bInner12Sizer = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bIn11Sizer; + bIn11Sizer = new wxBoxSizer( wxVERTICAL ); - m_Inner12CheckBox = new wxCheckBox( m_Inner12Panel, ID_INNER12CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bInner12Sizer->Add( m_Inner12CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + m_In11CheckBox = new wxCheckBox( m_In11Panel, ID_IN11CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bIn11Sizer->Add( m_In11CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - m_Inner12Panel->SetSizer( bInner12Sizer ); - m_Inner12Panel->Layout(); - bInner12Sizer->Fit( m_Inner12Panel ); - m_LayerListFlexGridSizer->Add( m_Inner12Panel, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + m_In11Panel->SetSizer( bIn11Sizer ); + m_In11Panel->Layout(); + bIn11Sizer->Fit( m_In11Panel ); + m_LayerListFlexGridSizer->Add( m_In11Panel, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - wxString m_Inner12ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; - int m_Inner12ChoiceNChoices = sizeof( m_Inner12ChoiceChoices ) / sizeof( wxString ); - m_Inner12Choice = new wxChoice( m_LayersListPanel, ID_INNER12CHOICE, wxDefaultPosition, wxDefaultSize, m_Inner12ChoiceNChoices, m_Inner12ChoiceChoices, 0 ); - m_Inner12Choice->SetSelection( 0 ); - m_Inner12Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); + wxString m_In11ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; + int m_In11ChoiceNChoices = sizeof( m_In11ChoiceChoices ) / sizeof( wxString ); + m_In11Choice = new wxChoice( m_LayersListPanel, ID_IN11CHOICE, wxDefaultPosition, wxDefaultSize, m_In11ChoiceNChoices, m_In11ChoiceChoices, 0 ); + m_In11Choice->SetSelection( 0 ); + m_In11Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); - m_LayerListFlexGridSizer->Add( m_Inner12Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + m_LayerListFlexGridSizer->Add( m_In11Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); - m_Inner13Name = new wxTextCtrl( m_LayersListPanel, ID_INNER13NAME, _("Inner13"), wxDefaultPosition, wxDefaultSize, 0 ); - m_Inner13Name->SetMaxLength( 20 ); - m_LayerListFlexGridSizer->Add( m_Inner13Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + m_In12Name = new wxTextCtrl( m_LayersListPanel, ID_IN12NAME, _("In12"), wxDefaultPosition, wxDefaultSize, 0 ); + m_In12Name->SetMaxLength( 20 ); + m_LayerListFlexGridSizer->Add( m_In12Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); - m_Inner13Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_Inner13Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); + m_In12Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_In12Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); - wxBoxSizer* bInner13Sizer; - bInner13Sizer = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bIn12Sizer; + bIn12Sizer = new wxBoxSizer( wxVERTICAL ); - m_Inner13CheckBox = new wxCheckBox( m_Inner13Panel, ID_INNER13CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bInner13Sizer->Add( m_Inner13CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + m_In12CheckBox = new wxCheckBox( m_In12Panel, ID_IN12CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bIn12Sizer->Add( m_In12CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - m_Inner13Panel->SetSizer( bInner13Sizer ); - m_Inner13Panel->Layout(); - bInner13Sizer->Fit( m_Inner13Panel ); - m_LayerListFlexGridSizer->Add( m_Inner13Panel, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + m_In12Panel->SetSizer( bIn12Sizer ); + m_In12Panel->Layout(); + bIn12Sizer->Fit( m_In12Panel ); + m_LayerListFlexGridSizer->Add( m_In12Panel, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - wxString m_Inner13ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; - int m_Inner13ChoiceNChoices = sizeof( m_Inner13ChoiceChoices ) / sizeof( wxString ); - m_Inner13Choice = new wxChoice( m_LayersListPanel, ID_INNER13CHOICE, wxDefaultPosition, wxDefaultSize, m_Inner13ChoiceNChoices, m_Inner13ChoiceChoices, 0 ); - m_Inner13Choice->SetSelection( 0 ); - m_Inner13Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); + wxString m_In12ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; + int m_In12ChoiceNChoices = sizeof( m_In12ChoiceChoices ) / sizeof( wxString ); + m_In12Choice = new wxChoice( m_LayersListPanel, ID_IN12CHOICE, wxDefaultPosition, wxDefaultSize, m_In12ChoiceNChoices, m_In12ChoiceChoices, 0 ); + m_In12Choice->SetSelection( 0 ); + m_In12Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); - m_LayerListFlexGridSizer->Add( m_Inner13Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + m_LayerListFlexGridSizer->Add( m_In12Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); - m_Inner14Name = new wxTextCtrl( m_LayersListPanel, ID_INNER14NAME, _("Inner14"), wxDefaultPosition, wxDefaultSize, 0 ); - m_Inner14Name->SetMaxLength( 20 ); - m_LayerListFlexGridSizer->Add( m_Inner14Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + m_In13Name = new wxTextCtrl( m_LayersListPanel, ID_IN13NAME, _("In13"), wxDefaultPosition, wxDefaultSize, 0 ); + m_In13Name->SetMaxLength( 20 ); + m_LayerListFlexGridSizer->Add( m_In13Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); - m_Inner14Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_Inner14Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); + m_In13Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_In13Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); - wxBoxSizer* bInner14Sizer; - bInner14Sizer = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bIn13Sizer; + bIn13Sizer = new wxBoxSizer( wxVERTICAL ); - m_Inner14CheckBox = new wxCheckBox( m_Inner14Panel, ID_INNER14CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bInner14Sizer->Add( m_Inner14CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + m_In13CheckBox = new wxCheckBox( m_In13Panel, ID_IN13CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bIn13Sizer->Add( m_In13CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - m_Inner14Panel->SetSizer( bInner14Sizer ); - m_Inner14Panel->Layout(); - bInner14Sizer->Fit( m_Inner14Panel ); - m_LayerListFlexGridSizer->Add( m_Inner14Panel, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + m_In13Panel->SetSizer( bIn13Sizer ); + m_In13Panel->Layout(); + bIn13Sizer->Fit( m_In13Panel ); + m_LayerListFlexGridSizer->Add( m_In13Panel, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - wxString m_Inner14ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; - int m_Inner14ChoiceNChoices = sizeof( m_Inner14ChoiceChoices ) / sizeof( wxString ); - m_Inner14Choice = new wxChoice( m_LayersListPanel, ID_INNER14CHOICE, wxDefaultPosition, wxDefaultSize, m_Inner14ChoiceNChoices, m_Inner14ChoiceChoices, 0 ); - m_Inner14Choice->SetSelection( 0 ); - m_Inner14Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); + wxString m_In13ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; + int m_In13ChoiceNChoices = sizeof( m_In13ChoiceChoices ) / sizeof( wxString ); + m_In13Choice = new wxChoice( m_LayersListPanel, ID_IN13CHOICE, wxDefaultPosition, wxDefaultSize, m_In13ChoiceNChoices, m_In13ChoiceChoices, 0 ); + m_In13Choice->SetSelection( 0 ); + m_In13Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); - m_LayerListFlexGridSizer->Add( m_Inner14Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + m_LayerListFlexGridSizer->Add( m_In13Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); - m_Inner15Name = new wxTextCtrl( m_LayersListPanel, ID_INNER15NAME, _("Inner15"), wxDefaultPosition, wxDefaultSize, 0 ); - m_Inner15Name->SetMaxLength( 20 ); - m_LayerListFlexGridSizer->Add( m_Inner15Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + m_In14Name = new wxTextCtrl( m_LayersListPanel, ID_IN14NAME, _("In14"), wxDefaultPosition, wxDefaultSize, 0 ); + m_In14Name->SetMaxLength( 20 ); + m_LayerListFlexGridSizer->Add( m_In14Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); - m_Inner15Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_Inner15Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); + m_In14Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_In14Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); - wxBoxSizer* bInner15Sizer; - bInner15Sizer = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bIn14Sizer; + bIn14Sizer = new wxBoxSizer( wxVERTICAL ); - m_Inner15CheckBox = new wxCheckBox( m_Inner15Panel, ID_INNER15CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bInner15Sizer->Add( m_Inner15CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + m_In14CheckBox = new wxCheckBox( m_In14Panel, ID_IN14CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bIn14Sizer->Add( m_In14CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - m_Inner15Panel->SetSizer( bInner15Sizer ); - m_Inner15Panel->Layout(); - bInner15Sizer->Fit( m_Inner15Panel ); - m_LayerListFlexGridSizer->Add( m_Inner15Panel, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + m_In14Panel->SetSizer( bIn14Sizer ); + m_In14Panel->Layout(); + bIn14Sizer->Fit( m_In14Panel ); + m_LayerListFlexGridSizer->Add( m_In14Panel, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - wxString m_Inner15ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; - int m_Inner15ChoiceNChoices = sizeof( m_Inner15ChoiceChoices ) / sizeof( wxString ); - m_Inner15Choice = new wxChoice( m_LayersListPanel, ID_INNER15CHOICE, wxDefaultPosition, wxDefaultSize, m_Inner15ChoiceNChoices, m_Inner15ChoiceChoices, 0 ); - m_Inner15Choice->SetSelection( 0 ); - m_Inner15Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); + wxString m_In14ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; + int m_In14ChoiceNChoices = sizeof( m_In14ChoiceChoices ) / sizeof( wxString ); + m_In14Choice = new wxChoice( m_LayersListPanel, ID_IN14CHOICE, wxDefaultPosition, wxDefaultSize, m_In14ChoiceNChoices, m_In14ChoiceChoices, 0 ); + m_In14Choice->SetSelection( 0 ); + m_In14Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); - m_LayerListFlexGridSizer->Add( m_Inner15Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + m_LayerListFlexGridSizer->Add( m_In14Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + + m_In15Name = new wxTextCtrl( m_LayersListPanel, ID_IN15NAME, _("In15"), wxDefaultPosition, wxDefaultSize, 0 ); + m_In15Name->SetMaxLength( 20 ); + m_LayerListFlexGridSizer->Add( m_In15Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + + m_In15Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_In15Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); + + wxBoxSizer* bIn15Sizer; + bIn15Sizer = new wxBoxSizer( wxVERTICAL ); + + m_In15CheckBox = new wxCheckBox( m_In15Panel, ID_IN15CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bIn15Sizer->Add( m_In15CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + + m_In15Panel->SetSizer( bIn15Sizer ); + m_In15Panel->Layout(); + bIn15Sizer->Fit( m_In15Panel ); + m_LayerListFlexGridSizer->Add( m_In15Panel, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + wxString m_In15ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; + int m_In15ChoiceNChoices = sizeof( m_In15ChoiceChoices ) / sizeof( wxString ); + m_In15Choice = new wxChoice( m_LayersListPanel, ID_IN15CHOICE, wxDefaultPosition, wxDefaultSize, m_In15ChoiceNChoices, m_In15ChoiceChoices, 0 ); + m_In15Choice->SetSelection( 0 ); + m_In15Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); + + m_LayerListFlexGridSizer->Add( m_In15Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + + m_In16Name = new wxTextCtrl( m_LayersListPanel, ID_IN16NAME, _("In16"), wxDefaultPosition, wxDefaultSize, 0 ); + m_In16Name->SetMaxLength( 20 ); + m_LayerListFlexGridSizer->Add( m_In16Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + + m_In16Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_In16Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); + + wxBoxSizer* bIn16Sizer; + bIn16Sizer = new wxBoxSizer( wxVERTICAL ); + + m_In16CheckBox = new wxCheckBox( m_In16Panel, ID_IN16CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bIn16Sizer->Add( m_In16CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + + m_In16Panel->SetSizer( bIn16Sizer ); + m_In16Panel->Layout(); + bIn16Sizer->Fit( m_In16Panel ); + m_LayerListFlexGridSizer->Add( m_In16Panel, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + wxString m_In16ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; + int m_In16ChoiceNChoices = sizeof( m_In16ChoiceChoices ) / sizeof( wxString ); + m_In16Choice = new wxChoice( m_LayersListPanel, ID_IN16CHOICE, wxDefaultPosition, wxDefaultSize, m_In16ChoiceNChoices, m_In16ChoiceChoices, 0 ); + m_In16Choice->SetSelection( 0 ); + m_In16Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); + + m_LayerListFlexGridSizer->Add( m_In16Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + + m_In17Name = new wxTextCtrl( m_LayersListPanel, ID_IN17NAME, _("In17"), wxDefaultPosition, wxDefaultSize, 0 ); + m_In17Name->SetMaxLength( 20 ); + m_LayerListFlexGridSizer->Add( m_In17Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + + m_In17Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_In17Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); + + wxBoxSizer* bIn17Sizer; + bIn17Sizer = new wxBoxSizer( wxVERTICAL ); + + m_In17CheckBox = new wxCheckBox( m_In17Panel, ID_IN17CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bIn17Sizer->Add( m_In17CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + + m_In17Panel->SetSizer( bIn17Sizer ); + m_In17Panel->Layout(); + bIn17Sizer->Fit( m_In17Panel ); + m_LayerListFlexGridSizer->Add( m_In17Panel, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + wxString m_In17ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; + int m_In17ChoiceNChoices = sizeof( m_In17ChoiceChoices ) / sizeof( wxString ); + m_In17Choice = new wxChoice( m_LayersListPanel, ID_IN17CHOICE, wxDefaultPosition, wxDefaultSize, m_In17ChoiceNChoices, m_In17ChoiceChoices, 0 ); + m_In17Choice->SetSelection( 0 ); + m_In17Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); + + m_LayerListFlexGridSizer->Add( m_In17Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + + m_In18Name = new wxTextCtrl( m_LayersListPanel, ID_IN18NAME, _("In18"), wxDefaultPosition, wxDefaultSize, 0 ); + m_In18Name->SetMaxLength( 20 ); + m_LayerListFlexGridSizer->Add( m_In18Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + + m_In18Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_In18Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); + + wxBoxSizer* bIn18Sizer; + bIn18Sizer = new wxBoxSizer( wxVERTICAL ); + + m_In18CheckBox = new wxCheckBox( m_In18Panel, ID_IN18CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bIn18Sizer->Add( m_In18CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + + m_In18Panel->SetSizer( bIn18Sizer ); + m_In18Panel->Layout(); + bIn18Sizer->Fit( m_In18Panel ); + m_LayerListFlexGridSizer->Add( m_In18Panel, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + wxString m_In18ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; + int m_In18ChoiceNChoices = sizeof( m_In18ChoiceChoices ) / sizeof( wxString ); + m_In18Choice = new wxChoice( m_LayersListPanel, ID_IN18CHOICE, wxDefaultPosition, wxDefaultSize, m_In18ChoiceNChoices, m_In18ChoiceChoices, 0 ); + m_In18Choice->SetSelection( 0 ); + m_In18Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); + + m_LayerListFlexGridSizer->Add( m_In18Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + + m_In19Name = new wxTextCtrl( m_LayersListPanel, ID_IN19NAME, _("In19"), wxDefaultPosition, wxDefaultSize, 0 ); + m_In19Name->SetMaxLength( 20 ); + m_LayerListFlexGridSizer->Add( m_In19Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + + m_In19Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_In19Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); + + wxBoxSizer* bIn19Sizer; + bIn19Sizer = new wxBoxSizer( wxVERTICAL ); + + m_In19CheckBox = new wxCheckBox( m_In19Panel, ID_IN19CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bIn19Sizer->Add( m_In19CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + + m_In19Panel->SetSizer( bIn19Sizer ); + m_In19Panel->Layout(); + bIn19Sizer->Fit( m_In19Panel ); + m_LayerListFlexGridSizer->Add( m_In19Panel, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + wxString m_In19ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; + int m_In19ChoiceNChoices = sizeof( m_In19ChoiceChoices ) / sizeof( wxString ); + m_In19Choice = new wxChoice( m_LayersListPanel, ID_IN19CHOICE, wxDefaultPosition, wxDefaultSize, m_In19ChoiceNChoices, m_In19ChoiceChoices, 0 ); + m_In19Choice->SetSelection( 0 ); + m_In19Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); + + m_LayerListFlexGridSizer->Add( m_In19Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + + m_In20Name = new wxTextCtrl( m_LayersListPanel, ID_IN20NAME, _("In20"), wxDefaultPosition, wxDefaultSize, 0 ); + m_In20Name->SetMaxLength( 20 ); + m_LayerListFlexGridSizer->Add( m_In20Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + + m_In20Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_In20Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); + + wxBoxSizer* bIn20Sizer; + bIn20Sizer = new wxBoxSizer( wxVERTICAL ); + + m_In20CheckBox = new wxCheckBox( m_In20Panel, ID_IN20CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bIn20Sizer->Add( m_In20CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + + m_In20Panel->SetSizer( bIn20Sizer ); + m_In20Panel->Layout(); + bIn20Sizer->Fit( m_In20Panel ); + m_LayerListFlexGridSizer->Add( m_In20Panel, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + wxString m_In20ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; + int m_In20ChoiceNChoices = sizeof( m_In20ChoiceChoices ) / sizeof( wxString ); + m_In20Choice = new wxChoice( m_LayersListPanel, ID_IN20CHOICE, wxDefaultPosition, wxDefaultSize, m_In20ChoiceNChoices, m_In20ChoiceChoices, 0 ); + m_In20Choice->SetSelection( 0 ); + m_In20Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); + + m_LayerListFlexGridSizer->Add( m_In20Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + + m_In21Name = new wxTextCtrl( m_LayersListPanel, ID_IN21NAME, _("In21"), wxDefaultPosition, wxDefaultSize, 0 ); + m_In21Name->SetMaxLength( 20 ); + m_LayerListFlexGridSizer->Add( m_In21Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + + m_In21Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_In21Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); + + wxBoxSizer* bIn21Sizer; + bIn21Sizer = new wxBoxSizer( wxVERTICAL ); + + m_In21CheckBox = new wxCheckBox( m_In21Panel, ID_IN21CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bIn21Sizer->Add( m_In21CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + + m_In21Panel->SetSizer( bIn21Sizer ); + m_In21Panel->Layout(); + bIn21Sizer->Fit( m_In21Panel ); + m_LayerListFlexGridSizer->Add( m_In21Panel, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + wxString m_In21ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; + int m_In21ChoiceNChoices = sizeof( m_In21ChoiceChoices ) / sizeof( wxString ); + m_In21Choice = new wxChoice( m_LayersListPanel, ID_IN21CHOICE, wxDefaultPosition, wxDefaultSize, m_In21ChoiceNChoices, m_In21ChoiceChoices, 0 ); + m_In21Choice->SetSelection( 0 ); + m_In21Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); + + m_LayerListFlexGridSizer->Add( m_In21Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + + m_In22Name = new wxTextCtrl( m_LayersListPanel, ID_IN22NAME, _("In22"), wxDefaultPosition, wxDefaultSize, 0 ); + m_In22Name->SetMaxLength( 20 ); + m_LayerListFlexGridSizer->Add( m_In22Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + + m_In22Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_In22Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); + + wxBoxSizer* bIn22Sizer; + bIn22Sizer = new wxBoxSizer( wxVERTICAL ); + + m_In22CheckBox = new wxCheckBox( m_In22Panel, ID_IN22CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bIn22Sizer->Add( m_In22CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + + m_In22Panel->SetSizer( bIn22Sizer ); + m_In22Panel->Layout(); + bIn22Sizer->Fit( m_In22Panel ); + m_LayerListFlexGridSizer->Add( m_In22Panel, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + wxString m_In22ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; + int m_In22ChoiceNChoices = sizeof( m_In22ChoiceChoices ) / sizeof( wxString ); + m_In22Choice = new wxChoice( m_LayersListPanel, ID_IN22CHOICE, wxDefaultPosition, wxDefaultSize, m_In22ChoiceNChoices, m_In22ChoiceChoices, 0 ); + m_In22Choice->SetSelection( 0 ); + m_In22Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); + + m_LayerListFlexGridSizer->Add( m_In22Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + + m_In23Name = new wxTextCtrl( m_LayersListPanel, ID_IN23NAME, _("In23"), wxDefaultPosition, wxDefaultSize, 0 ); + m_In23Name->SetMaxLength( 20 ); + m_LayerListFlexGridSizer->Add( m_In23Name, 0, wxALL|wxEXPAND, 5 ); + + m_In23Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_In23Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); + + wxBoxSizer* bIn23Sizer; + bIn23Sizer = new wxBoxSizer( wxVERTICAL ); + + m_In23CheckBox = new wxCheckBox( m_In23Panel, ID_IN23CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bIn23Sizer->Add( m_In23CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + + m_In23Panel->SetSizer( bIn23Sizer ); + m_In23Panel->Layout(); + bIn23Sizer->Fit( m_In23Panel ); + m_LayerListFlexGridSizer->Add( m_In23Panel, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + wxString m_In23ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; + int m_In23ChoiceNChoices = sizeof( m_In23ChoiceChoices ) / sizeof( wxString ); + m_In23Choice = new wxChoice( m_LayersListPanel, ID_IN22CHOICE, wxDefaultPosition, wxDefaultSize, m_In23ChoiceNChoices, m_In23ChoiceChoices, 0 ); + m_In23Choice->SetSelection( 0 ); + m_In23Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); + + m_LayerListFlexGridSizer->Add( m_In23Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + + m_In24Name = new wxTextCtrl( m_LayersListPanel, ID_IN24NAME, _("In24"), wxDefaultPosition, wxDefaultSize, 0 ); + m_In24Name->SetMaxLength( 20 ); + m_LayerListFlexGridSizer->Add( m_In24Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + + m_In24Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_In24Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); + + wxBoxSizer* bIn24Sizer; + bIn24Sizer = new wxBoxSizer( wxVERTICAL ); + + m_In24CheckBox = new wxCheckBox( m_In24Panel, ID_IN24CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bIn24Sizer->Add( m_In24CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + + m_In24Panel->SetSizer( bIn24Sizer ); + m_In24Panel->Layout(); + bIn24Sizer->Fit( m_In24Panel ); + m_LayerListFlexGridSizer->Add( m_In24Panel, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + wxString m_In24ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; + int m_In24ChoiceNChoices = sizeof( m_In24ChoiceChoices ) / sizeof( wxString ); + m_In24Choice = new wxChoice( m_LayersListPanel, ID_IN24CHOICE, wxDefaultPosition, wxDefaultSize, m_In24ChoiceNChoices, m_In24ChoiceChoices, 0 ); + m_In24Choice->SetSelection( 0 ); + m_In24Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); + + m_LayerListFlexGridSizer->Add( m_In24Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + + m_In25Name = new wxTextCtrl( m_LayersListPanel, ID_IN25NAME, _("In25"), wxDefaultPosition, wxDefaultSize, 0 ); + m_In25Name->SetMaxLength( 20 ); + m_LayerListFlexGridSizer->Add( m_In25Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + + m_In25Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_In25Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); + + wxBoxSizer* bIn25Sizer; + bIn25Sizer = new wxBoxSizer( wxVERTICAL ); + + m_In25CheckBox = new wxCheckBox( m_In25Panel, ID_IN25CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bIn25Sizer->Add( m_In25CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + + m_In25Panel->SetSizer( bIn25Sizer ); + m_In25Panel->Layout(); + bIn25Sizer->Fit( m_In25Panel ); + m_LayerListFlexGridSizer->Add( m_In25Panel, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + wxString m_In25ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; + int m_In25ChoiceNChoices = sizeof( m_In25ChoiceChoices ) / sizeof( wxString ); + m_In25Choice = new wxChoice( m_LayersListPanel, ID_IN25CHOICE, wxDefaultPosition, wxDefaultSize, m_In25ChoiceNChoices, m_In25ChoiceChoices, 0 ); + m_In25Choice->SetSelection( 0 ); + m_In25Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); + + m_LayerListFlexGridSizer->Add( m_In25Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + + m_In26Name = new wxTextCtrl( m_LayersListPanel, ID_IN26NAME, _("In26"), wxDefaultPosition, wxDefaultSize, 0 ); + m_In26Name->SetMaxLength( 20 ); + m_LayerListFlexGridSizer->Add( m_In26Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + + m_In26Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_In26Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); + + wxBoxSizer* bIn26Sizer; + bIn26Sizer = new wxBoxSizer( wxVERTICAL ); + + m_In26CheckBox = new wxCheckBox( m_In26Panel, ID_IN26CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bIn26Sizer->Add( m_In26CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + + m_In26Panel->SetSizer( bIn26Sizer ); + m_In26Panel->Layout(); + bIn26Sizer->Fit( m_In26Panel ); + m_LayerListFlexGridSizer->Add( m_In26Panel, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + wxString m_In26ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; + int m_In26ChoiceNChoices = sizeof( m_In26ChoiceChoices ) / sizeof( wxString ); + m_In26Choice = new wxChoice( m_LayersListPanel, ID_IN26CHOICE, wxDefaultPosition, wxDefaultSize, m_In26ChoiceNChoices, m_In26ChoiceChoices, 0 ); + m_In26Choice->SetSelection( 0 ); + m_In26Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); + + m_LayerListFlexGridSizer->Add( m_In26Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + + m_In27Name = new wxTextCtrl( m_LayersListPanel, ID_IN27NAME, _("In27"), wxDefaultPosition, wxDefaultSize, 0 ); + m_In27Name->SetMaxLength( 20 ); + m_LayerListFlexGridSizer->Add( m_In27Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + + m_In27Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_In27Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); + + wxBoxSizer* bIn27Sizer; + bIn27Sizer = new wxBoxSizer( wxVERTICAL ); + + m_In27CheckBox = new wxCheckBox( m_In27Panel, ID_IN27CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bIn27Sizer->Add( m_In27CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + + m_In27Panel->SetSizer( bIn27Sizer ); + m_In27Panel->Layout(); + bIn27Sizer->Fit( m_In27Panel ); + m_LayerListFlexGridSizer->Add( m_In27Panel, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + wxString m_In27ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; + int m_In27ChoiceNChoices = sizeof( m_In27ChoiceChoices ) / sizeof( wxString ); + m_In27Choice = new wxChoice( m_LayersListPanel, ID_IN27CHOICE, wxDefaultPosition, wxDefaultSize, m_In27ChoiceNChoices, m_In27ChoiceChoices, 0 ); + m_In27Choice->SetSelection( 0 ); + m_In27Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); + + m_LayerListFlexGridSizer->Add( m_In27Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + + m_In28Name = new wxTextCtrl( m_LayersListPanel, ID_IN28NAME, _("In28"), wxDefaultPosition, wxDefaultSize, 0 ); + m_In28Name->SetMaxLength( 20 ); + m_LayerListFlexGridSizer->Add( m_In28Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + + m_In28Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_In28Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); + + wxBoxSizer* bIn28Sizer; + bIn28Sizer = new wxBoxSizer( wxVERTICAL ); + + m_In28CheckBox = new wxCheckBox( m_In28Panel, ID_IN28CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bIn28Sizer->Add( m_In28CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + + m_In28Panel->SetSizer( bIn28Sizer ); + m_In28Panel->Layout(); + bIn28Sizer->Fit( m_In28Panel ); + m_LayerListFlexGridSizer->Add( m_In28Panel, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + wxString m_In28ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; + int m_In28ChoiceNChoices = sizeof( m_In28ChoiceChoices ) / sizeof( wxString ); + m_In28Choice = new wxChoice( m_LayersListPanel, ID_IN28CHOICE, wxDefaultPosition, wxDefaultSize, m_In28ChoiceNChoices, m_In28ChoiceChoices, 0 ); + m_In28Choice->SetSelection( 0 ); + m_In28Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); + + m_LayerListFlexGridSizer->Add( m_In28Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + + m_In29Name = new wxTextCtrl( m_LayersListPanel, ID_IN29NAME, _("In29"), wxDefaultPosition, wxDefaultSize, 0 ); + m_In29Name->SetMaxLength( 20 ); + m_LayerListFlexGridSizer->Add( m_In29Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + + m_In29Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_In29Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); + + wxBoxSizer* bIn29Sizer; + bIn29Sizer = new wxBoxSizer( wxVERTICAL ); + + m_In29CheckBox = new wxCheckBox( m_In29Panel, ID_IN29CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bIn29Sizer->Add( m_In29CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + + m_In29Panel->SetSizer( bIn29Sizer ); + m_In29Panel->Layout(); + bIn29Sizer->Fit( m_In29Panel ); + m_LayerListFlexGridSizer->Add( m_In29Panel, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + wxString m_In29ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; + int m_In29ChoiceNChoices = sizeof( m_In29ChoiceChoices ) / sizeof( wxString ); + m_In29Choice = new wxChoice( m_LayersListPanel, ID_IN29CHOICE, wxDefaultPosition, wxDefaultSize, m_In29ChoiceNChoices, m_In29ChoiceChoices, 0 ); + m_In29Choice->SetSelection( 0 ); + m_In29Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); + + m_LayerListFlexGridSizer->Add( m_In29Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + + m_In30Name = new wxTextCtrl( m_LayersListPanel, ID_IN30NAME, _("In30"), wxDefaultPosition, wxDefaultSize, 0 ); + m_In30Name->SetMaxLength( 20 ); + m_LayerListFlexGridSizer->Add( m_In30Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + + m_In30Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_In30Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) ); + + wxBoxSizer* bIn30Sizer; + bIn30Sizer = new wxBoxSizer( wxVERTICAL ); + + m_In30CheckBox = new wxCheckBox( m_In30Panel, ID_IN30CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bIn30Sizer->Add( m_In30CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + + m_In30Panel->SetSizer( bIn30Sizer ); + m_In30Panel->Layout(); + bIn30Sizer->Fit( m_In30Panel ); + m_LayerListFlexGridSizer->Add( m_In30Panel, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + wxString m_In30ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") }; + int m_In30ChoiceNChoices = sizeof( m_In30ChoiceChoices ) / sizeof( wxString ); + m_In30Choice = new wxChoice( m_LayersListPanel, ID_IN30CHOICE, wxDefaultPosition, wxDefaultSize, m_In30ChoiceNChoices, m_In30ChoiceChoices, 0 ); + m_In30Choice->SetSelection( 0 ); + m_In30Choice->SetToolTip( _("Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus.") ); + + m_LayerListFlexGridSizer->Add( m_In30Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); m_BackName = new wxTextCtrl( m_LayersListPanel, ID_BACKNAME, _("Back"), wxDefaultPosition, wxDefaultSize, 0 ); m_BackName->SetMaxLength( 20 ); @@ -746,6 +1178,29 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID m_PCBEdgesStaticText->Wrap( -1 ); m_LayerListFlexGridSizer->Add( m_PCBEdgesStaticText, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 ); + m_MarginName = new wxStaticText( m_LayersListPanel, ID_MARGINNAME, _("Margin_later"), wxDefaultPosition, wxDefaultSize, 0 ); + m_MarginName->Wrap( -1 ); + m_LayerListFlexGridSizer->Add( m_MarginName, 0, wxALL, 5 ); + + m_MarginPanel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_MarginPanel->SetBackgroundColour( wxColour( 236, 233, 255 ) ); + + wxBoxSizer* bSizer291; + bSizer291 = new wxBoxSizer( wxVERTICAL ); + + m_MarginCheckBox = new wxCheckBox( m_MarginPanel, ID_MARGINCHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer291->Add( m_MarginCheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + + m_MarginPanel->SetSizer( bSizer291 ); + m_MarginPanel->Layout(); + bSizer291->Fit( m_MarginPanel ); + m_LayerListFlexGridSizer->Add( m_MarginPanel, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + m_MarginStaticText = new wxStaticText( m_LayersListPanel, ID_ECO2CHOICE, _("Edge_Cuts setback"), wxDefaultPosition, wxDefaultSize, 0 ); + m_MarginStaticText->Wrap( -1 ); + m_LayerListFlexGridSizer->Add( m_MarginStaticText, 0, wxALL, 5 ); + m_Eco1Name = new wxStaticText( m_LayersListPanel, ID_ECO2NAME, _("Eco1_later"), wxDefaultPosition, wxDefaultSize, 0 ); m_Eco1Name->Wrap( -1 ); m_LayerListFlexGridSizer->Add( m_Eco1Name, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 ); @@ -873,26 +1328,43 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID m_SilkSFrontCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::OnCheckBox ), NULL, this ); m_MaskFrontCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::OnCheckBox ), NULL, this ); m_FrontCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); - m_Inner2CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); - m_Inner3CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); - m_Inner4CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); - m_Inner5CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); - m_Inner6CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); - m_Inner7CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); - m_Inner8CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); - m_Inner9CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); - m_Inner10CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); - m_Inner11CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); - m_Inner12CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); - m_Inner13CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); - m_Inner14CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); - m_Inner15CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In1CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In2CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In3CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In4CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In5CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In6CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In7CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In8CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In9CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In10CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In11CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In12CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In13CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In14CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In15CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In16CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In17CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In18CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In19CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In20CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In21CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In22CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In23CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In24CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In25CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In26CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In27CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In28CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In29CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In30CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); m_BackCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); m_MaskBackCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::OnCheckBox ), NULL, this ); m_SilkSBackCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::OnCheckBox ), NULL, this ); m_SoldPBackCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::OnCheckBox ), NULL, this ); m_AdhesBackCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::OnCheckBox ), NULL, this ); m_PCBEdgesCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::OnCheckBox ), NULL, this ); + m_MarginCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::OnCheckBox ), NULL, this ); m_Eco1CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::OnCheckBox ), NULL, this ); m_Eco2CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::OnCheckBox ), NULL, this ); m_CommentsCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::OnCheckBox ), NULL, this ); @@ -911,26 +1383,43 @@ DIALOG_LAYERS_SETUP_BASE::~DIALOG_LAYERS_SETUP_BASE() m_SilkSFrontCheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::OnCheckBox ), NULL, this ); m_MaskFrontCheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::OnCheckBox ), NULL, this ); m_FrontCheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); - m_Inner2CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); - m_Inner3CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); - m_Inner4CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); - m_Inner5CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); - m_Inner6CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); - m_Inner7CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); - m_Inner8CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); - m_Inner9CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); - m_Inner10CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); - m_Inner11CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); - m_Inner12CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); - m_Inner13CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); - m_Inner14CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); - m_Inner15CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In1CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In2CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In3CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In4CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In5CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In6CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In7CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In8CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In9CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In10CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In11CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In12CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In13CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In14CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In15CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In16CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In17CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In18CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In19CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In20CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In21CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In22CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In23CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In24CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In25CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In26CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In27CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In28CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In29CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); + m_In30CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); m_BackCheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::DenyChangeCheckBox ), NULL, this ); m_MaskBackCheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::OnCheckBox ), NULL, this ); m_SilkSBackCheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::OnCheckBox ), NULL, this ); m_SoldPBackCheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::OnCheckBox ), NULL, this ); m_AdhesBackCheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::OnCheckBox ), NULL, this ); m_PCBEdgesCheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::OnCheckBox ), NULL, this ); + m_MarginCheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::OnCheckBox ), NULL, this ); m_Eco1CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::OnCheckBox ), NULL, this ); m_Eco2CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::OnCheckBox ), NULL, this ); m_CommentsCheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::OnCheckBox ), NULL, this ); diff --git a/pcbnew/dialogs/dialog_layers_setup_base.fbp b/pcbnew/dialogs/dialog_layers_setup_base.fbp index ec98facb32..6fc6a4d396 100644 --- a/pcbnew/dialogs/dialog_layers_setup_base.fbp +++ b/pcbnew/dialogs/dialog_layers_setup_base.fbp @@ -1,6 +1,6 @@ - + C++ @@ -20,8 +20,10 @@ . 1 + 1 1 1 + UI 0 0 @@ -392,7 +394,7 @@ 1 0 - "2" "4" "6" "8" "10" "12" "14" "16" + "2" "4" "6" "8" "10" "12" "14" "16" "18" "20" "22" "24" "26" "27" "28" "30" "32" 1 1 @@ -422,7 +424,7 @@ 1 Resizable - 0 + 3 1 @@ -2485,7 +2487,7 @@ 0 0 - ID_INNER2NAME + ID_IN1NAME 0 @@ -2494,7 +2496,7 @@ 0 1 - m_Inner2Name + m_In1Name 1 @@ -2512,7 +2514,7 @@ wxFILTER_NONE wxDefaultValidator - Inner2 + In1 @@ -2584,7 +2586,7 @@ 0 1 - m_Inner2Panel + m_In1Panel 1 @@ -2625,7 +2627,7 @@ - bInner2Sizer + bIn1Sizer wxVERTICAL none @@ -2660,7 +2662,7 @@ 0 0 - ID_INNER2CHECKBOX + ID_IN1CHECKBOX 0 @@ -2669,7 +2671,7 @@ 0 1 - m_Inner2CheckBox + m_In1CheckBox 1 @@ -2751,7 +2753,7 @@ 0 0 - ID_INNER2CHOICE + ID_IN1CHOICE 0 @@ -2759,7 +2761,7 @@ 0 1 - m_Inner2Choice + m_In1Choice 1 @@ -2838,7 +2840,7 @@ 0 0 - ID_INNER3NAME + ID_IN2NAME 0 @@ -2847,7 +2849,7 @@ 0 1 - m_Inner3Name + m_In2Name 1 @@ -2865,1419 +2867,7 @@ wxFILTER_NONE wxDefaultValidator - Inner3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL - 1 - - 1 - 1 - 1 - 1 - - - - - - 236,253,216 - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_Inner3Panel - 1 - - - protected - 1 - - Resizable - 1 - - - 0 - - - - wxTAB_TRAVERSAL - - - - - - - - - - - - - - - - - - - - - - - - - - bInner3Sizer - wxVERTICAL - none - - 5 - wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_INNER3CHECKBOX - - - 0 - - - 0 - - 1 - m_Inner3CheckBox - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - DenyChangeCheckBox - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "signal" "power" "mixed" "jumper" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_INNER3CHOICE - - 0 - - - 0 - - 1 - m_Inner3Choice - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - - 0 - Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus. - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_INNER4NAME - - 0 - - 20 - - 0 - - 1 - m_Inner4Name - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - Inner4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL - 1 - - 1 - 1 - 1 - 1 - - - - - - 236,253,216 - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_Inner4Panel - 1 - - - protected - 1 - - Resizable - 1 - - - 0 - - - - wxTAB_TRAVERSAL - - - - - - - - - - - - - - - - - - - - - - - - - - bInner4Sizer - wxVERTICAL - none - - 5 - wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_INNER4CHECKBOX - - - 0 - - - 0 - - 1 - m_Inner4CheckBox - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - DenyChangeCheckBox - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "signal" "power" "mixed" "jumper" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_INNER4CHOICE - - 0 - - - 0 - - 1 - m_Inner4Choice - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - - 0 - Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus. - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_INNER5NAME - - 0 - - 20 - - 0 - - 1 - m_Inner5Name - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - Inner5 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL - 1 - - 1 - 1 - 1 - 1 - - - - - - 236,253,216 - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_Inner5Panel - 1 - - - protected - 1 - - Resizable - 1 - - - 0 - - - - wxTAB_TRAVERSAL - - - - - - - - - - - - - - - - - - - - - - - - - - bInner5Sizer - wxVERTICAL - none - - 5 - wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_INNER5CHECKBOX - - - 0 - - - 0 - - 1 - m_Inner5CheckBox - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - DenyChangeCheckBox - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "signal" "power" "mixed" "jumper" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_INNER5CHOICE - - 0 - - - 0 - - 1 - m_Inner5Choice - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - - 0 - Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus. - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_INNER6NAME - - 0 - - 20 - - 0 - - 1 - m_Inner6Name - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - Inner6 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL - 1 - - 1 - 1 - 1 - 1 - - - - - - 236,253,216 - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_Inner6Panel - 1 - - - protected - 1 - - Resizable - 1 - - - 0 - - - - wxTAB_TRAVERSAL - - - - - - - - - - - - - - - - - - - - - - - - - - bInner6Sizer - wxVERTICAL - none - - 5 - wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_INNER6CHECKBOX - - - 0 - - - 0 - - 1 - m_Inner6CheckBox - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - DenyChangeCheckBox - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "signal" "power" "mixed" "jumper" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_INNER6CHOICE - - 0 - - - 0 - - 1 - m_Inner6Choice - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - - 0 - Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus. - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_INNER7NAME - - 0 - - 20 - - 0 - - 1 - m_Inner7Name - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - Inner7 + In2 @@ -4349,7 +2939,7 @@ 0 1 - m_Inner7Panel + m_In2Panel 1 @@ -4390,7 +2980,7 @@ - bInner7Sizer + bIn2Sizer wxVERTICAL none @@ -4425,7 +3015,7 @@ 0 0 - ID_INNER7CHECKBOX + ID_IN2CHECKBOX 0 @@ -4434,7 +3024,7 @@ 0 1 - m_Inner7CheckBox + m_In2CheckBox 1 @@ -4516,7 +3106,7 @@ 0 0 - ID_INNER7CHOICE + ID_IN2CHOICE 0 @@ -4524,7 +3114,7 @@ 0 1 - m_Inner7Choice + m_In2Choice 1 @@ -4603,7 +3193,7 @@ 0 0 - ID_INNER8NAME + ID_IN3NAME 0 @@ -4612,7 +3202,7 @@ 0 1 - m_Inner8Name + m_In3Name 1 @@ -4630,7 +3220,1772 @@ wxFILTER_NONE wxDefaultValidator - Inner8 + In3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL + 1 + + 1 + 1 + 1 + 1 + + + + + + 236,253,216 + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_In3Panel + 1 + + + protected + 1 + + Resizable + 1 + + + 0 + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bIn3Sizer + wxVERTICAL + none + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN3CHECKBOX + + + 0 + + + 0 + + 1 + m_In3CheckBox + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + DenyChangeCheckBox + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "signal" "power" "mixed" "jumper" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN3CHOICE + + 0 + + + 0 + + 1 + m_In3Choice + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN4NAME + + 0 + + 20 + + 0 + + 1 + m_In4Name + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + In4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL + 1 + + 1 + 1 + 1 + 1 + + + + + + 236,253,216 + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_In4Panel + 1 + + + protected + 1 + + Resizable + 1 + + + 0 + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bIn4Sizer + wxVERTICAL + none + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN4CHECKBOX + + + 0 + + + 0 + + 1 + m_In4CheckBox + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + DenyChangeCheckBox + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "signal" "power" "mixed" "jumper" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN4CHOICE + + 0 + + + 0 + + 1 + m_In4Choice + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN5NAME + + 0 + + 20 + + 0 + + 1 + m_In5Name + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + In5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL + 1 + + 1 + 1 + 1 + 1 + + + + + + 236,253,216 + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_In5Panel + 1 + + + protected + 1 + + Resizable + 1 + + + 0 + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bIn5Sizer + wxVERTICAL + none + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN5CHECKBOX + + + 0 + + + 0 + + 1 + m_In5CheckBox + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + DenyChangeCheckBox + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "signal" "power" "mixed" "jumper" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN5CHOICE + + 0 + + + 0 + + 1 + m_In5Choice + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN6NAME + + 0 + + 20 + + 0 + + 1 + m_In6Name + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + In6 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL + 1 + + 1 + 1 + 1 + 1 + + + + + + 236,253,216 + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_In6Panel + 1 + + + protected + 1 + + Resizable + 1 + + + 0 + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bIn6Sizer + wxVERTICAL + none + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN6CHECKBOX + + + 0 + + + 0 + + 1 + m_In6CheckBox + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + DenyChangeCheckBox + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "signal" "power" "mixed" "jumper" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN6CHOICE + + 0 + + + 0 + + 1 + m_In6Choice + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN7NAME + + 0 + + 20 + + 0 + + 1 + m_In7Name + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + In7 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 1 + + 1 + 1 + 1 + 1 + + + + + + 236,253,216 + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_In7Panel + 1 + + + protected + 1 + + Resizable + 1 + + + 0 + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bIn7Sizer + wxVERTICAL + none + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN7CHECKBOX + + + 0 + + + 0 + + 1 + m_In7CheckBox + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + DenyChangeCheckBox + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "signal" "power" "mixed" "jumper" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN7CHOICE + + 0 + + + 0 + + 1 + m_In7Choice + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN8NAME + + 0 + + 20 + + 0 + + 1 + m_In8Name + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + In8 @@ -4702,7 +5057,7 @@ 0 1 - m_Inner8Panel + m_In8Panel 1 @@ -4743,7 +5098,7 @@ - bInner8Sizer + bIn8Sizer wxVERTICAL none @@ -4778,7 +5133,7 @@ 0 0 - ID_INNER8CHECKBOX + ID_IN8CHECKBOX 0 @@ -4787,7 +5142,7 @@ 0 1 - m_Inner8CheckBox + m_In8CheckBox 1 @@ -4869,7 +5224,7 @@ 0 0 - ID_INNER8CHOICE + ID_IN8CHOICE 0 @@ -4877,7 +5232,7 @@ 0 1 - m_Inner8Choice + m_In8Choice 1 @@ -4956,7 +5311,7 @@ 0 0 - ID_INNER9NAME + ID_IN9NAME 0 @@ -4965,7 +5320,7 @@ 0 1 - m_Inner9Name + m_In9Name 1 @@ -4983,7 +5338,7 @@ wxFILTER_NONE wxDefaultValidator - Inner9 + In9 @@ -5055,7 +5410,7 @@ 0 1 - m_Inner9Panel + m_In9Panel 1 @@ -5096,7 +5451,7 @@ - bInner9Sizer + bIn9Sizer wxVERTICAL none @@ -5131,7 +5486,7 @@ 0 0 - ID_INNER9CHECKBOX + ID_IN9CHECKBOX 0 @@ -5140,7 +5495,7 @@ 0 1 - m_Inner9CheckBox + m_In9CheckBox 1 @@ -5222,7 +5577,7 @@ 0 0 - ID_INNER9CHOICE + ID_IN9CHOICE 0 @@ -5230,7 +5585,7 @@ 0 1 - m_Inner9Choice + m_In9Choice 1 @@ -5309,7 +5664,7 @@ 0 0 - ID_INNER10NAME + ID_IN10NAME 0 @@ -5318,7 +5673,7 @@ 0 1 - m_Inner10Name + m_In10Name 1 @@ -5336,7 +5691,7 @@ wxFILTER_NONE wxDefaultValidator - Inner10 + In10 @@ -5408,7 +5763,7 @@ 0 1 - m_Inner10Panel + m_In10Panel 1 @@ -5449,7 +5804,7 @@ - bInner10Sizer + bIn10Sizer wxVERTICAL none @@ -5484,7 +5839,7 @@ 0 0 - ID_INNER10CHECKBOX + ID_IN10CHECKBOX 0 @@ -5493,7 +5848,7 @@ 0 1 - m_Inner10CheckBox + m_In10CheckBox 1 @@ -5575,7 +5930,7 @@ 0 0 - ID_INNER10CHOICE + ID_IN10CHOICE 0 @@ -5583,7 +5938,7 @@ 0 1 - m_Inner10Choice + m_In10Choice 1 @@ -5662,7 +6017,7 @@ 0 0 - ID_INNER11NAME + ID_IN11NAME 0 @@ -5671,7 +6026,7 @@ 0 1 - m_Inner11Name + m_In11Name 1 @@ -5689,7 +6044,7 @@ wxFILTER_NONE wxDefaultValidator - Inner11 + In11 @@ -5761,7 +6116,7 @@ 0 1 - m_Inner11Panel + m_In11Panel 1 @@ -5802,7 +6157,7 @@ - bInner11Sizer + bIn11Sizer wxVERTICAL none @@ -5837,7 +6192,7 @@ 0 0 - ID_INNER11CHECKBOX + ID_IN11CHECKBOX 0 @@ -5846,7 +6201,7 @@ 0 1 - m_Inner11CheckBox + m_In11CheckBox 1 @@ -5928,7 +6283,7 @@ 0 0 - ID_INNER11CHOICE + ID_IN11CHOICE 0 @@ -5936,7 +6291,7 @@ 0 1 - m_Inner11Choice + m_In11Choice 1 @@ -6015,7 +6370,7 @@ 0 0 - ID_INNER12NAME + ID_IN12NAME 0 @@ -6024,7 +6379,7 @@ 0 1 - m_Inner12Name + m_In12Name 1 @@ -6042,7 +6397,7 @@ wxFILTER_NONE wxDefaultValidator - Inner12 + In12 @@ -6114,7 +6469,7 @@ 0 1 - m_Inner12Panel + m_In12Panel 1 @@ -6155,7 +6510,7 @@ - bInner12Sizer + bIn12Sizer wxVERTICAL none @@ -6190,7 +6545,7 @@ 0 0 - ID_INNER12CHECKBOX + ID_IN12CHECKBOX 0 @@ -6199,7 +6554,7 @@ 0 1 - m_Inner12CheckBox + m_In12CheckBox 1 @@ -6281,7 +6636,7 @@ 0 0 - ID_INNER12CHOICE + ID_IN12CHOICE 0 @@ -6289,7 +6644,7 @@ 0 1 - m_Inner12Choice + m_In12Choice 1 @@ -6368,7 +6723,7 @@ 0 0 - ID_INNER13NAME + ID_IN13NAME 0 @@ -6377,7 +6732,7 @@ 0 1 - m_Inner13Name + m_In13Name 1 @@ -6395,7 +6750,7 @@ wxFILTER_NONE wxDefaultValidator - Inner13 + In13 @@ -6467,7 +6822,7 @@ 0 1 - m_Inner13Panel + m_In13Panel 1 @@ -6508,7 +6863,7 @@ - bInner13Sizer + bIn13Sizer wxVERTICAL none @@ -6543,7 +6898,7 @@ 0 0 - ID_INNER13CHECKBOX + ID_IN13CHECKBOX 0 @@ -6552,7 +6907,7 @@ 0 1 - m_Inner13CheckBox + m_In13CheckBox 1 @@ -6634,7 +6989,7 @@ 0 0 - ID_INNER13CHOICE + ID_IN13CHOICE 0 @@ -6642,7 +6997,7 @@ 0 1 - m_Inner13Choice + m_In13Choice 1 @@ -6721,7 +7076,7 @@ 0 0 - ID_INNER14NAME + ID_IN14NAME 0 @@ -6730,7 +7085,7 @@ 0 1 - m_Inner14Name + m_In14Name 1 @@ -6748,7 +7103,7 @@ wxFILTER_NONE wxDefaultValidator - Inner14 + In14 @@ -6820,7 +7175,7 @@ 0 1 - m_Inner14Panel + m_In14Panel 1 @@ -6861,7 +7216,7 @@ - bInner14Sizer + bIn14Sizer wxVERTICAL none @@ -6896,7 +7251,7 @@ 0 0 - ID_INNER14CHECKBOX + ID_IN14CHECKBOX 0 @@ -6905,7 +7260,7 @@ 0 1 - m_Inner14CheckBox + m_In14CheckBox 1 @@ -6987,7 +7342,7 @@ 0 0 - ID_INNER14CHOICE + ID_IN14CHOICE 0 @@ -6995,7 +7350,7 @@ 0 1 - m_Inner14Choice + m_In14Choice 1 @@ -7074,7 +7429,7 @@ 0 0 - ID_INNER15NAME + ID_IN15NAME 0 @@ -7083,7 +7438,7 @@ 0 1 - m_Inner15Name + m_In15Name 1 @@ -7101,7 +7456,7 @@ wxFILTER_NONE wxDefaultValidator - Inner15 + In15 @@ -7173,7 +7528,7 @@ 0 1 - m_Inner15Panel + m_In15Panel 1 @@ -7214,7 +7569,7 @@ - bInner15Sizer + bIn15Sizer wxVERTICAL none @@ -7249,7 +7604,7 @@ 0 0 - ID_INNER15CHECKBOX + ID_IN15CHECKBOX 0 @@ -7258,7 +7613,7 @@ 0 1 - m_Inner15CheckBox + m_In15CheckBox 1 @@ -7340,7 +7695,7 @@ 0 0 - ID_INNER15CHOICE + ID_IN15CHOICE 0 @@ -7348,7 +7703,5302 @@ 0 1 - m_Inner15Choice + m_In15Choice + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN16NAME + + 0 + + 20 + + 0 + + 1 + m_In16Name + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + In16 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 1 + + 1 + 1 + 1 + 1 + + + + + + 236,253,216 + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_In16Panel + 1 + + + protected + 1 + + Resizable + 1 + + + 0 + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bIn16Sizer + wxVERTICAL + none + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN16CHECKBOX + + + 0 + + + 0 + + 1 + m_In16CheckBox + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + DenyChangeCheckBox + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "signal" "power" "mixed" "jumper" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN16CHOICE + + 0 + + + 0 + + 1 + m_In16Choice + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN17NAME + + 0 + + 20 + + 0 + + 1 + m_In17Name + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + In17 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 1 + + 1 + 1 + 1 + 1 + + + + + + 236,253,216 + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_In17Panel + 1 + + + protected + 1 + + Resizable + 1 + + + 0 + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bIn17Sizer + wxVERTICAL + none + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN17CHECKBOX + + + 0 + + + 0 + + 1 + m_In17CheckBox + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + DenyChangeCheckBox + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "signal" "power" "mixed" "jumper" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN17CHOICE + + 0 + + + 0 + + 1 + m_In17Choice + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN18NAME + + 0 + + 20 + + 0 + + 1 + m_In18Name + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + In18 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 1 + + 1 + 1 + 1 + 1 + + + + + + 236,253,216 + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_In18Panel + 1 + + + protected + 1 + + Resizable + 1 + + + 0 + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bIn18Sizer + wxVERTICAL + none + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN18CHECKBOX + + + 0 + + + 0 + + 1 + m_In18CheckBox + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + DenyChangeCheckBox + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "signal" "power" "mixed" "jumper" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN18CHOICE + + 0 + + + 0 + + 1 + m_In18Choice + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN19NAME + + 0 + + 20 + + 0 + + 1 + m_In19Name + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + In19 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 1 + + 1 + 1 + 1 + 1 + + + + + + 236,253,216 + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_In19Panel + 1 + + + protected + 1 + + Resizable + 1 + + + 0 + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bIn19Sizer + wxVERTICAL + none + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN19CHECKBOX + + + 0 + + + 0 + + 1 + m_In19CheckBox + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + DenyChangeCheckBox + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "signal" "power" "mixed" "jumper" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN19CHOICE + + 0 + + + 0 + + 1 + m_In19Choice + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN20NAME + + 0 + + 20 + + 0 + + 1 + m_In20Name + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + In20 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 1 + + 1 + 1 + 1 + 1 + + + + + + 236,253,216 + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_In20Panel + 1 + + + protected + 1 + + Resizable + 1 + + + 0 + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bIn20Sizer + wxVERTICAL + none + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN20CHECKBOX + + + 0 + + + 0 + + 1 + m_In20CheckBox + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + DenyChangeCheckBox + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "signal" "power" "mixed" "jumper" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN20CHOICE + + 0 + + + 0 + + 1 + m_In20Choice + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN21NAME + + 0 + + 20 + + 0 + + 1 + m_In21Name + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + In21 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 1 + + 1 + 1 + 1 + 1 + + + + + + 236,253,216 + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_In21Panel + 1 + + + protected + 1 + + Resizable + 1 + + + 0 + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bIn21Sizer + wxVERTICAL + none + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN21CHECKBOX + + + 0 + + + 0 + + 1 + m_In21CheckBox + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + DenyChangeCheckBox + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "signal" "power" "mixed" "jumper" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN21CHOICE + + 0 + + + 0 + + 1 + m_In21Choice + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN22NAME + + 0 + + 20 + + 0 + + 1 + m_In22Name + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + In22 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 1 + + 1 + 1 + 1 + 1 + + + + + + 236,253,216 + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_In22Panel + 1 + + + protected + 1 + + Resizable + 1 + + + 0 + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bIn22Sizer + wxVERTICAL + none + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN22CHECKBOX + + + 0 + + + 0 + + 1 + m_In22CheckBox + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + DenyChangeCheckBox + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "signal" "power" "mixed" "jumper" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN22CHOICE + + 0 + + + 0 + + 1 + m_In22Choice + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN23NAME + + 0 + + 20 + + 0 + + 1 + m_In23Name + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + In23 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 1 + + 1 + 1 + 1 + 1 + + + + + + 236,253,216 + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_In23Panel + 1 + + + protected + 1 + + Resizable + 1 + + + 0 + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bIn23Sizer + wxVERTICAL + none + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN23CHECKBOX + + + 0 + + + 0 + + 1 + m_In23CheckBox + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + DenyChangeCheckBox + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "signal" "power" "mixed" "jumper" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN22CHOICE + + 0 + + + 0 + + 1 + m_In23Choice + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN24NAME + + 0 + + 20 + + 0 + + 1 + m_In24Name + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + In24 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 1 + + 1 + 1 + 1 + 1 + + + + + + 236,253,216 + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_In24Panel + 1 + + + protected + 1 + + Resizable + 1 + + + 0 + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bIn24Sizer + wxVERTICAL + none + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN24CHECKBOX + + + 0 + + + 0 + + 1 + m_In24CheckBox + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + DenyChangeCheckBox + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "signal" "power" "mixed" "jumper" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN24CHOICE + + 0 + + + 0 + + 1 + m_In24Choice + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN25NAME + + 0 + + 20 + + 0 + + 1 + m_In25Name + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + In25 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 1 + + 1 + 1 + 1 + 1 + + + + + + 236,253,216 + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_In25Panel + 1 + + + protected + 1 + + Resizable + 1 + + + 0 + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bIn25Sizer + wxVERTICAL + none + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN25CHECKBOX + + + 0 + + + 0 + + 1 + m_In25CheckBox + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + DenyChangeCheckBox + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "signal" "power" "mixed" "jumper" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN25CHOICE + + 0 + + + 0 + + 1 + m_In25Choice + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN26NAME + + 0 + + 20 + + 0 + + 1 + m_In26Name + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + In26 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 1 + + 1 + 1 + 1 + 1 + + + + + + 236,253,216 + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_In26Panel + 1 + + + protected + 1 + + Resizable + 1 + + + 0 + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bIn26Sizer + wxVERTICAL + none + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN26CHECKBOX + + + 0 + + + 0 + + 1 + m_In26CheckBox + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + DenyChangeCheckBox + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "signal" "power" "mixed" "jumper" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN26CHOICE + + 0 + + + 0 + + 1 + m_In26Choice + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN27NAME + + 0 + + 20 + + 0 + + 1 + m_In27Name + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + In27 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 1 + + 1 + 1 + 1 + 1 + + + + + + 236,253,216 + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_In27Panel + 1 + + + protected + 1 + + Resizable + 1 + + + 0 + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bIn27Sizer + wxVERTICAL + none + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN27CHECKBOX + + + 0 + + + 0 + + 1 + m_In27CheckBox + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + DenyChangeCheckBox + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "signal" "power" "mixed" "jumper" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN27CHOICE + + 0 + + + 0 + + 1 + m_In27Choice + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN28NAME + + 0 + + 20 + + 0 + + 1 + m_In28Name + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + In28 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 1 + + 1 + 1 + 1 + 1 + + + + + + 236,253,216 + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_In28Panel + 1 + + + protected + 1 + + Resizable + 1 + + + 0 + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bIn28Sizer + wxVERTICAL + none + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN28CHECKBOX + + + 0 + + + 0 + + 1 + m_In28CheckBox + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + DenyChangeCheckBox + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "signal" "power" "mixed" "jumper" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN28CHOICE + + 0 + + + 0 + + 1 + m_In28Choice + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN29NAME + + 0 + + 20 + + 0 + + 1 + m_In29Name + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + In29 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 1 + + 1 + 1 + 1 + 1 + + + + + + 236,253,216 + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_In29Panel + 1 + + + protected + 1 + + Resizable + 1 + + + 0 + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bIn29Sizer + wxVERTICAL + none + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN29CHECKBOX + + + 0 + + + 0 + + 1 + m_In29CheckBox + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + DenyChangeCheckBox + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "signal" "power" "mixed" "jumper" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN29CHOICE + + 0 + + + 0 + + 1 + m_In29Choice + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + Copper layer type for Freerouter. Power layers are removed from Freerouter's layer menus. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN30NAME + + 0 + + 20 + + 0 + + 1 + m_In30Name + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + In30 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 1 + + 1 + 1 + 1 + 1 + + + + + + 236,253,216 + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_In30Panel + 1 + + + protected + 1 + + Resizable + 1 + + + 0 + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bIn30Sizer + wxVERTICAL + none + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN30CHECKBOX + + + 0 + + + 0 + + 1 + m_In30CheckBox + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + DenyChangeCheckBox + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "signal" "power" "mixed" "jumper" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_IN30CHOICE + + 0 + + + 0 + + 1 + m_In30Choice 1 @@ -9449,6 +15099,346 @@ + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_MARGINNAME + Margin_later + + 0 + + + 0 + + 1 + m_MarginName + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + + 236,233,255 + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_MarginPanel + 1 + + + protected + 1 + + Resizable + 1 + + + 0 + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer291 + wxVERTICAL + none + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_MARGINCHECKBOX + + + 0 + + + 0 + + 1 + m_MarginCheckBox + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnCheckBox + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_ECO2CHOICE + Edge_Cuts setback + + 0 + + + 0 + + 1 + m_MarginStaticText + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + 5 wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT diff --git a/pcbnew/dialogs/dialog_layers_setup_base.h b/pcbnew/dialogs/dialog_layers_setup_base.h index df94eace1f..acd1bb95a0 100644 --- a/pcbnew/dialogs/dialog_layers_setup_base.h +++ b/pcbnew/dialogs/dialog_layers_setup_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 8 2012) +// C++ code generated with wxFormBuilder (version Jun 6 2014) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -46,78 +46,127 @@ class DIALOG_SHIM; #define ID_FRONTNAME 1012 #define ID_FRONTCHECKBOX 1013 #define ID_FRONTCHOICE 1014 -#define ID_INNER2NAME 1015 -#define ID_INNER2CHECKBOX 1016 -#define ID_INNER2CHOICE 1017 -#define ID_INNER3NAME 1018 -#define ID_INNER3CHECKBOX 1019 -#define ID_INNER3CHOICE 1020 -#define ID_INNER4NAME 1021 -#define ID_INNER4CHECKBOX 1022 -#define ID_INNER4CHOICE 1023 -#define ID_INNER5NAME 1024 -#define ID_INNER5CHECKBOX 1025 -#define ID_INNER5CHOICE 1026 -#define ID_INNER6NAME 1027 -#define ID_INNER6CHECKBOX 1028 -#define ID_INNER6CHOICE 1029 -#define ID_INNER7NAME 1030 -#define ID_INNER7CHECKBOX 1031 -#define ID_INNER7CHOICE 1032 -#define ID_INNER8NAME 1033 -#define ID_INNER8CHECKBOX 1034 -#define ID_INNER8CHOICE 1035 -#define ID_INNER9NAME 1036 -#define ID_INNER9CHECKBOX 1037 -#define ID_INNER9CHOICE 1038 -#define ID_INNER10NAME 1039 -#define ID_INNER10CHECKBOX 1040 -#define ID_INNER10CHOICE 1041 -#define ID_INNER11NAME 1042 -#define ID_INNER11CHECKBOX 1043 -#define ID_INNER11CHOICE 1044 -#define ID_INNER12NAME 1045 -#define ID_INNER12CHECKBOX 1046 -#define ID_INNER12CHOICE 1047 -#define ID_INNER13NAME 1048 -#define ID_INNER13CHECKBOX 1049 -#define ID_INNER13CHOICE 1050 -#define ID_INNER14NAME 1051 -#define ID_INNER14CHECKBOX 1052 -#define ID_INNER14CHOICE 1053 -#define ID_INNER15NAME 1054 -#define ID_INNER15CHECKBOX 1055 -#define ID_INNER15CHOICE 1056 -#define ID_BACKNAME 1057 -#define ID_BACKCHECKBOX 1058 -#define ID_BACKCHOICE 1059 -#define ID_MASKBACKNAME 1060 -#define ID_MASKBACKCHECKBOX 1061 -#define ID_MASKBACKCHOICE 1062 -#define ID_SILKSBACKNAME 1063 -#define ID_SILKSBACKCHECKBOX 1064 -#define ID_SILKSBACKCHOICE 1065 -#define ID_SOLDPBACKNAME 1066 -#define ID_SOLDPBACKCHECKBOX 1067 -#define ID_SOLDPBACKCHOICE 1068 -#define ID_ADHESBACKNAME 1069 -#define ID_ADHESBACKCHECKBOX 1070 -#define ID_ADHESBACKCHOICE 1071 -#define ID_PCBEDGESNAME 1072 -#define ID_PCBEDGESCHECKBOX 1073 -#define ID_PCBEDGESCHOICE 1074 -#define ID_ECO2NAME 1075 -#define ID_ECO2CHECKBOX 1076 -#define ID_ECO2CHOICE 1077 -#define ID_ECO1NAME 1078 -#define ID_ECO1CHECKBOX 1079 -#define ID_ECO1CHOICE 1080 -#define ID_COMMENTSNAME 1081 -#define ID_COMMENTSCHECKBOX 1082 -#define ID_COMMENTSCHOICE 1083 -#define ID_DRAWINGSNAME 1084 -#define ID_DRAWINGSCHECKBOX 1085 -#define ID_DRAWINGSCHOICE 1086 +#define ID_IN1NAME 1015 +#define ID_IN1CHECKBOX 1016 +#define ID_IN1CHOICE 1017 +#define ID_IN2NAME 1018 +#define ID_IN2CHECKBOX 1019 +#define ID_IN2CHOICE 1020 +#define ID_IN3NAME 1021 +#define ID_IN3CHECKBOX 1022 +#define ID_IN3CHOICE 1023 +#define ID_IN4NAME 1024 +#define ID_IN4CHECKBOX 1025 +#define ID_IN4CHOICE 1026 +#define ID_IN5NAME 1027 +#define ID_IN5CHECKBOX 1028 +#define ID_IN5CHOICE 1029 +#define ID_IN6NAME 1030 +#define ID_IN6CHECKBOX 1031 +#define ID_IN6CHOICE 1032 +#define ID_IN7NAME 1033 +#define ID_IN7CHECKBOX 1034 +#define ID_IN7CHOICE 1035 +#define ID_IN8NAME 1036 +#define ID_IN8CHECKBOX 1037 +#define ID_IN8CHOICE 1038 +#define ID_IN9NAME 1039 +#define ID_IN9CHECKBOX 1040 +#define ID_IN9CHOICE 1041 +#define ID_IN10NAME 1042 +#define ID_IN10CHECKBOX 1043 +#define ID_IN10CHOICE 1044 +#define ID_IN11NAME 1045 +#define ID_IN11CHECKBOX 1046 +#define ID_IN11CHOICE 1047 +#define ID_IN12NAME 1048 +#define ID_IN12CHECKBOX 1049 +#define ID_IN12CHOICE 1050 +#define ID_IN13NAME 1051 +#define ID_IN13CHECKBOX 1052 +#define ID_IN13CHOICE 1053 +#define ID_IN14NAME 1054 +#define ID_IN14CHECKBOX 1055 +#define ID_IN14CHOICE 1056 +#define ID_IN15NAME 1057 +#define ID_IN15CHECKBOX 1058 +#define ID_IN15CHOICE 1059 +#define ID_IN16NAME 1060 +#define ID_IN16CHECKBOX 1061 +#define ID_IN16CHOICE 1062 +#define ID_IN17NAME 1063 +#define ID_IN17CHECKBOX 1064 +#define ID_IN17CHOICE 1065 +#define ID_IN18NAME 1066 +#define ID_IN18CHECKBOX 1067 +#define ID_IN18CHOICE 1068 +#define ID_IN19NAME 1069 +#define ID_IN19CHECKBOX 1070 +#define ID_IN19CHOICE 1071 +#define ID_IN20NAME 1072 +#define ID_IN20CHECKBOX 1073 +#define ID_IN20CHOICE 1074 +#define ID_IN21NAME 1075 +#define ID_IN21CHECKBOX 1076 +#define ID_IN21CHOICE 1077 +#define ID_IN22NAME 1078 +#define ID_IN22CHECKBOX 1079 +#define ID_IN22CHOICE 1080 +#define ID_IN23NAME 1081 +#define ID_IN23CHECKBOX 1082 +#define ID_IN24NAME 1083 +#define ID_IN24CHECKBOX 1084 +#define ID_IN24CHOICE 1085 +#define ID_IN25NAME 1086 +#define ID_IN25CHECKBOX 1087 +#define ID_IN25CHOICE 1088 +#define ID_IN26NAME 1089 +#define ID_IN26CHECKBOX 1090 +#define ID_IN26CHOICE 1091 +#define ID_IN27NAME 1092 +#define ID_IN27CHECKBOX 1093 +#define ID_IN27CHOICE 1094 +#define ID_IN28NAME 1095 +#define ID_IN28CHECKBOX 1096 +#define ID_IN28CHOICE 1097 +#define ID_IN29NAME 1098 +#define ID_IN29CHECKBOX 1099 +#define ID_IN29CHOICE 1100 +#define ID_IN30NAME 1101 +#define ID_IN30CHECKBOX 1102 +#define ID_IN30CHOICE 1103 +#define ID_BACKNAME 1104 +#define ID_BACKCHECKBOX 1105 +#define ID_BACKCHOICE 1106 +#define ID_MASKBACKNAME 1107 +#define ID_MASKBACKCHECKBOX 1108 +#define ID_MASKBACKCHOICE 1109 +#define ID_SILKSBACKNAME 1110 +#define ID_SILKSBACKCHECKBOX 1111 +#define ID_SILKSBACKCHOICE 1112 +#define ID_SOLDPBACKNAME 1113 +#define ID_SOLDPBACKCHECKBOX 1114 +#define ID_SOLDPBACKCHOICE 1115 +#define ID_ADHESBACKNAME 1116 +#define ID_ADHESBACKCHECKBOX 1117 +#define ID_ADHESBACKCHOICE 1118 +#define ID_PCBEDGESNAME 1119 +#define ID_PCBEDGESCHECKBOX 1120 +#define ID_PCBEDGESCHOICE 1121 +#define ID_MARGINNAME 1122 +#define ID_MARGINCHECKBOX 1123 +#define ID_ECO2CHOICE 1124 +#define ID_ECO2NAME 1125 +#define ID_ECO2CHECKBOX 1126 +#define ID_ECO1NAME 1127 +#define ID_ECO1CHECKBOX 1128 +#define ID_ECO1CHOICE 1129 +#define ID_COMMENTSNAME 1130 +#define ID_COMMENTSCHECKBOX 1131 +#define ID_COMMENTSCHOICE 1132 +#define ID_DRAWINGSNAME 1133 +#define ID_DRAWINGSCHECKBOX 1134 +#define ID_DRAWINGSCHOICE 1135 /////////////////////////////////////////////////////////////////////////////// /// Class DIALOG_LAYERS_SETUP_BASE @@ -155,62 +204,126 @@ class DIALOG_LAYERS_SETUP_BASE : public DIALOG_SHIM wxPanel* m_FrontPanel; wxCheckBox* m_FrontCheckBox; wxChoice* m_FrontChoice; - wxTextCtrl* m_Inner2Name; - wxPanel* m_Inner2Panel; - wxCheckBox* m_Inner2CheckBox; - wxChoice* m_Inner2Choice; - wxTextCtrl* m_Inner3Name; - wxPanel* m_Inner3Panel; - wxCheckBox* m_Inner3CheckBox; - wxChoice* m_Inner3Choice; - wxTextCtrl* m_Inner4Name; - wxPanel* m_Inner4Panel; - wxCheckBox* m_Inner4CheckBox; - wxChoice* m_Inner4Choice; - wxTextCtrl* m_Inner5Name; - wxPanel* m_Inner5Panel; - wxCheckBox* m_Inner5CheckBox; - wxChoice* m_Inner5Choice; - wxTextCtrl* m_Inner6Name; - wxPanel* m_Inner6Panel; - wxCheckBox* m_Inner6CheckBox; - wxChoice* m_Inner6Choice; - wxTextCtrl* m_Inner7Name; - wxPanel* m_Inner7Panel; - wxCheckBox* m_Inner7CheckBox; - wxChoice* m_Inner7Choice; - wxTextCtrl* m_Inner8Name; - wxPanel* m_Inner8Panel; - wxCheckBox* m_Inner8CheckBox; - wxChoice* m_Inner8Choice; - wxTextCtrl* m_Inner9Name; - wxPanel* m_Inner9Panel; - wxCheckBox* m_Inner9CheckBox; - wxChoice* m_Inner9Choice; - wxTextCtrl* m_Inner10Name; - wxPanel* m_Inner10Panel; - wxCheckBox* m_Inner10CheckBox; - wxChoice* m_Inner10Choice; - wxTextCtrl* m_Inner11Name; - wxPanel* m_Inner11Panel; - wxCheckBox* m_Inner11CheckBox; - wxChoice* m_Inner11Choice; - wxTextCtrl* m_Inner12Name; - wxPanel* m_Inner12Panel; - wxCheckBox* m_Inner12CheckBox; - wxChoice* m_Inner12Choice; - wxTextCtrl* m_Inner13Name; - wxPanel* m_Inner13Panel; - wxCheckBox* m_Inner13CheckBox; - wxChoice* m_Inner13Choice; - wxTextCtrl* m_Inner14Name; - wxPanel* m_Inner14Panel; - wxCheckBox* m_Inner14CheckBox; - wxChoice* m_Inner14Choice; - wxTextCtrl* m_Inner15Name; - wxPanel* m_Inner15Panel; - wxCheckBox* m_Inner15CheckBox; - wxChoice* m_Inner15Choice; + wxTextCtrl* m_In1Name; + wxPanel* m_In1Panel; + wxCheckBox* m_In1CheckBox; + wxChoice* m_In1Choice; + wxTextCtrl* m_In2Name; + wxPanel* m_In2Panel; + wxCheckBox* m_In2CheckBox; + wxChoice* m_In2Choice; + wxTextCtrl* m_In3Name; + wxPanel* m_In3Panel; + wxCheckBox* m_In3CheckBox; + wxChoice* m_In3Choice; + wxTextCtrl* m_In4Name; + wxPanel* m_In4Panel; + wxCheckBox* m_In4CheckBox; + wxChoice* m_In4Choice; + wxTextCtrl* m_In5Name; + wxPanel* m_In5Panel; + wxCheckBox* m_In5CheckBox; + wxChoice* m_In5Choice; + wxTextCtrl* m_In6Name; + wxPanel* m_In6Panel; + wxCheckBox* m_In6CheckBox; + wxChoice* m_In6Choice; + wxTextCtrl* m_In7Name; + wxPanel* m_In7Panel; + wxCheckBox* m_In7CheckBox; + wxChoice* m_In7Choice; + wxTextCtrl* m_In8Name; + wxPanel* m_In8Panel; + wxCheckBox* m_In8CheckBox; + wxChoice* m_In8Choice; + wxTextCtrl* m_In9Name; + wxPanel* m_In9Panel; + wxCheckBox* m_In9CheckBox; + wxChoice* m_In9Choice; + wxTextCtrl* m_In10Name; + wxPanel* m_In10Panel; + wxCheckBox* m_In10CheckBox; + wxChoice* m_In10Choice; + wxTextCtrl* m_In11Name; + wxPanel* m_In11Panel; + wxCheckBox* m_In11CheckBox; + wxChoice* m_In11Choice; + wxTextCtrl* m_In12Name; + wxPanel* m_In12Panel; + wxCheckBox* m_In12CheckBox; + wxChoice* m_In12Choice; + wxTextCtrl* m_In13Name; + wxPanel* m_In13Panel; + wxCheckBox* m_In13CheckBox; + wxChoice* m_In13Choice; + wxTextCtrl* m_In14Name; + wxPanel* m_In14Panel; + wxCheckBox* m_In14CheckBox; + wxChoice* m_In14Choice; + wxTextCtrl* m_In15Name; + wxPanel* m_In15Panel; + wxCheckBox* m_In15CheckBox; + wxChoice* m_In15Choice; + wxTextCtrl* m_In16Name; + wxPanel* m_In16Panel; + wxCheckBox* m_In16CheckBox; + wxChoice* m_In16Choice; + wxTextCtrl* m_In17Name; + wxPanel* m_In17Panel; + wxCheckBox* m_In17CheckBox; + wxChoice* m_In17Choice; + wxTextCtrl* m_In18Name; + wxPanel* m_In18Panel; + wxCheckBox* m_In18CheckBox; + wxChoice* m_In18Choice; + wxTextCtrl* m_In19Name; + wxPanel* m_In19Panel; + wxCheckBox* m_In19CheckBox; + wxChoice* m_In19Choice; + wxTextCtrl* m_In20Name; + wxPanel* m_In20Panel; + wxCheckBox* m_In20CheckBox; + wxChoice* m_In20Choice; + wxTextCtrl* m_In21Name; + wxPanel* m_In21Panel; + wxCheckBox* m_In21CheckBox; + wxChoice* m_In21Choice; + wxTextCtrl* m_In22Name; + wxPanel* m_In22Panel; + wxCheckBox* m_In22CheckBox; + wxChoice* m_In22Choice; + wxTextCtrl* m_In23Name; + wxPanel* m_In23Panel; + wxCheckBox* m_In23CheckBox; + wxChoice* m_In23Choice; + wxTextCtrl* m_In24Name; + wxPanel* m_In24Panel; + wxCheckBox* m_In24CheckBox; + wxChoice* m_In24Choice; + wxTextCtrl* m_In25Name; + wxPanel* m_In25Panel; + wxCheckBox* m_In25CheckBox; + wxChoice* m_In25Choice; + wxTextCtrl* m_In26Name; + wxPanel* m_In26Panel; + wxCheckBox* m_In26CheckBox; + wxChoice* m_In26Choice; + wxTextCtrl* m_In27Name; + wxPanel* m_In27Panel; + wxCheckBox* m_In27CheckBox; + wxChoice* m_In27Choice; + wxTextCtrl* m_In28Name; + wxPanel* m_In28Panel; + wxCheckBox* m_In28CheckBox; + wxChoice* m_In28Choice; + wxTextCtrl* m_In29Name; + wxPanel* m_In29Panel; + wxCheckBox* m_In29CheckBox; + wxChoice* m_In29Choice; + wxTextCtrl* m_In30Name; + wxPanel* m_In30Panel; + wxCheckBox* m_In30CheckBox; + wxChoice* m_In30Choice; wxTextCtrl* m_BackName; wxPanel* m_BackPanel; wxCheckBox* m_BackCheckBox; @@ -235,6 +348,10 @@ class DIALOG_LAYERS_SETUP_BASE : public DIALOG_SHIM wxPanel* m_PCBEdgesPanel; wxCheckBox* m_PCBEdgesCheckBox; wxStaticText* m_PCBEdgesStaticText; + wxStaticText* m_MarginName; + wxPanel* m_MarginPanel; + wxCheckBox* m_MarginCheckBox; + wxStaticText* m_MarginStaticText; wxStaticText* m_Eco1Name; wxPanel* m_Eco1Panel; wxCheckBox* m_Eco1CheckBox; diff --git a/pcbnew/dialogs/dialog_pad_properties.cpp b/pcbnew/dialogs/dialog_pad_properties.cpp index fe5faeba66..f1db6bf28c 100644 --- a/pcbnew/dialogs/dialog_pad_properties.cpp +++ b/pcbnew/dialogs/dialog_pad_properties.cpp @@ -51,32 +51,35 @@ // list of pad shapes. -static PAD_SHAPE_T CodeShape[] = { - PAD_CIRCLE, PAD_OVAL, PAD_RECT, PAD_TRAPEZOID +static PAD_SHAPE_T code_shape[] = { + PAD_CIRCLE, + PAD_OVAL, + PAD_RECT, + PAD_TRAPEZOID }; -static PAD_ATTR_T CodeType[] = { - PAD_STANDARD, PAD_SMD, PAD_CONN, PAD_HOLE_NOT_PLATED +static PAD_ATTR_T code_type[] = { + PAD_STANDARD, + PAD_SMD, + PAD_CONN, + PAD_HOLE_NOT_PLATED }; -#define NBTYPES DIM(CodeType) - // Default mask layers setup for pads according to the pad type -static const LAYER_MSK Std_Pad_Layers[] = { - +static const LSET std_pad_layers[] = { // PAD_STANDARD: - PAD_STANDARD_DEFAULT_LAYERS, + D_PAD::StandardMask(), // PAD_CONN: - PAD_CONN_DEFAULT_LAYERS, + D_PAD::ConnMask(), // PAD_SMD: - PAD_SMD_DEFAULT_LAYERS, + D_PAD::SMDMask(), - //PAD_HOLE_NOT_PLATED: - PAD_HOLE_NOT_PLATED_DEFAULT_LAYERS + // PAD_HOLE_NOT_PLATED: + D_PAD::UnplatedHoleMask() }; @@ -119,7 +122,7 @@ private: * updates the CheckBox states in pad layers list, * @param layer_mask = pad layer mask (ORed layers bit mask) */ - void setPadLayersList( LAYER_MSK layer_mask ); + void setPadLayersList( LSET layer_mask ); /// Copy values from dialog field to aPad's members bool transferDataToPad( D_PAD* aPad ); @@ -188,12 +191,12 @@ void DIALOG_PAD_PROPERTIES::OnPaintShowPanel( wxPaintEvent& event ) EDA_COLOR_T color = BLACK; - if( m_dummyPad->GetLayerMask() & LAYER_FRONT ) + if( m_dummyPad->GetLayerSet()[F_Cu] ) { color = m_board->GetVisibleElementColor( PAD_FR_VISIBLE ); } - if( m_dummyPad->GetLayerMask() & LAYER_BACK ) + if( m_dummyPad->GetLayerSet()[B_Cu] ) { color = ColorMix( color, m_board->GetVisibleElementColor( PAD_BK_VISIBLE ) ); } @@ -262,20 +265,20 @@ void DIALOG_PAD_PROPERTIES::initValues() // Setup layers names from board // Should be made first, before calling m_rbCopperLayersSel->SetSelection() - m_rbCopperLayersSel->SetString( 0, m_board->GetLayerName( LAYER_N_FRONT ) ); - m_rbCopperLayersSel->SetString( 1, m_board->GetLayerName( LAYER_N_BACK ) ); + m_rbCopperLayersSel->SetString( 0, m_board->GetLayerName( F_Cu ) ); + m_rbCopperLayersSel->SetString( 1, m_board->GetLayerName( B_Cu ) ); - m_PadLayerAdhCmp->SetLabel( m_board->GetLayerName( ADHESIVE_N_FRONT ) ); - m_PadLayerAdhCu->SetLabel( m_board->GetLayerName( ADHESIVE_N_BACK ) ); - m_PadLayerPateCmp->SetLabel( m_board->GetLayerName( SOLDERPASTE_N_FRONT ) ); - m_PadLayerPateCu->SetLabel( m_board->GetLayerName( SOLDERPASTE_N_BACK ) ); - m_PadLayerSilkCmp->SetLabel( m_board->GetLayerName( SILKSCREEN_N_FRONT ) ); - m_PadLayerSilkCu->SetLabel( m_board->GetLayerName( SILKSCREEN_N_BACK ) ); - m_PadLayerMaskCmp->SetLabel( m_board->GetLayerName( SOLDERMASK_N_FRONT ) ); - m_PadLayerMaskCu->SetLabel( m_board->GetLayerName( SOLDERMASK_N_BACK ) ); - m_PadLayerECO1->SetLabel( m_board->GetLayerName( ECO1_N ) ); - m_PadLayerECO2->SetLabel( m_board->GetLayerName( ECO2_N ) ); - m_PadLayerDraft->SetLabel( m_board->GetLayerName( DRAW_N ) ); + m_PadLayerAdhCmp->SetLabel( m_board->GetLayerName( F_Adhes ) ); + m_PadLayerAdhCu->SetLabel( m_board->GetLayerName( B_Adhes ) ); + m_PadLayerPateCmp->SetLabel( m_board->GetLayerName( F_Paste ) ); + m_PadLayerPateCu->SetLabel( m_board->GetLayerName( B_Paste ) ); + m_PadLayerSilkCmp->SetLabel( m_board->GetLayerName( F_SilkS ) ); + m_PadLayerSilkCu->SetLabel( m_board->GetLayerName( B_SilkS ) ); + m_PadLayerMaskCmp->SetLabel( m_board->GetLayerName( F_Mask ) ); + m_PadLayerMaskCu->SetLabel( m_board->GetLayerName( B_Mask ) ); + m_PadLayerECO1->SetLabel( m_board->GetLayerName( Eco1_User ) ); + m_PadLayerECO2->SetLabel( m_board->GetLayerName( Eco2_User ) ); + m_PadLayerDraft->SetLabel( m_board->GetLayerName( Dwgs_User ) ); m_isFlipped = false; @@ -283,7 +286,7 @@ void DIALOG_PAD_PROPERTIES::initValues() { MODULE* module = m_currentPad->GetParent(); - if( module->GetLayer() == LAYER_N_BACK ) + if( module->GetLayer() == B_Cu ) { m_isFlipped = true; m_staticModuleSideValue->SetLabel( _( "Back side (footprint is mirrored)" ) ); @@ -304,7 +307,7 @@ void DIALOG_PAD_PROPERTIES::initValues() m_dummyPad->SetDelta( sz ); // flip pad's layers - m_dummyPad->SetLayerMask( FlipLayerMask( m_dummyPad->GetLayerMask() ) ); + m_dummyPad->SetLayerSet( FlipLayerMask( m_dummyPad->GetLayerSet() ) ); } m_staticTextWarningPadFlipped->Show(m_isFlipped); @@ -413,7 +416,7 @@ void DIALOG_PAD_PROPERTIES::initValues() NORMALIZE_ANGLE_180( angle ); // ? normalizing is in D_PAD::SetOrientation() // Set layers used by this pad: : - setPadLayersList( m_dummyPad->GetLayerMask() ); + setPadLayersList( m_dummyPad->GetLayerSet() ); // Pad Orient switch( int( angle ) ) @@ -466,9 +469,9 @@ void DIALOG_PAD_PROPERTIES::initValues() // Type of pad selection m_PadType->SetSelection( 0 ); - for( unsigned ii = 0; ii < NBTYPES; ii++ ) + for( unsigned ii = 0; ii < DIM( code_type ); ii++ ) { - if( CodeType[ii] == m_dummyPad->GetAttribute() ) + if( code_type[ii] == m_dummyPad->GetAttribute() ) { m_PadType->SetSelection( ii ); break; @@ -490,7 +493,7 @@ void DIALOG_PAD_PROPERTIES::initValues() // Update some dialog widgets state (Enable/disable options): wxCommandEvent cmd_event; - setPadLayersList( m_dummyPad->GetLayerMask() ); + setPadLayersList( m_dummyPad->GetLayerSet() ); OnDrillShapeSelected( cmd_event ); OnPadShapeSelection( cmd_event ); } @@ -604,17 +607,17 @@ void DIALOG_PAD_PROPERTIES::PadTypeSelected( wxCommandEvent& event ) { unsigned ii = m_PadType->GetSelection(); - if( ii >= NBTYPES ) // catches < 0 also + if( ii >= DIM( code_type ) ) // catches < 0 also ii = 0; - LAYER_MSK layer_mask = Std_Pad_Layers[ii]; + LSET layer_mask = std_pad_layers[ii]; setPadLayersList( layer_mask ); // Enable/disable drill dialog items: event.SetId( m_DrillShapeCtrl->GetSelection() ); OnDrillShapeSelected( event ); - if( ii == 0 || ii == NBTYPES-1 ) + if( ii == 0 || ii == DIM( code_type )-1 ) m_DrillShapeCtrl->Enable( true ); else m_DrillShapeCtrl->Enable( false ); @@ -628,33 +631,35 @@ void DIALOG_PAD_PROPERTIES::PadTypeSelected( wxCommandEvent& event ) } -void DIALOG_PAD_PROPERTIES::setPadLayersList( LAYER_MSK layer_mask ) +void DIALOG_PAD_PROPERTIES::setPadLayersList( LSET layer_mask ) { - if( ( layer_mask & ALL_CU_LAYERS ) == LAYER_FRONT ) + LSET cu_set = layer_mask & LSET::AllCuMask(); + + if( cu_set == LSET( F_Cu ) ) m_rbCopperLayersSel->SetSelection(0); - else if( ( layer_mask & ALL_CU_LAYERS ) == LAYER_BACK) + else if( cu_set == LSET( B_Cu ) ) m_rbCopperLayersSel->SetSelection(1); - else if( ( layer_mask & ALL_CU_LAYERS ) != 0 ) + else if( cu_set.any() ) m_rbCopperLayersSel->SetSelection(2); else m_rbCopperLayersSel->SetSelection(3); - m_PadLayerAdhCmp->SetValue( bool( layer_mask & ADHESIVE_LAYER_FRONT ) ); - m_PadLayerAdhCu->SetValue( bool( layer_mask & ADHESIVE_LAYER_BACK ) ); + m_PadLayerAdhCmp->SetValue( layer_mask[F_Adhes] ); + m_PadLayerAdhCu->SetValue( layer_mask[B_Adhes] ); - m_PadLayerPateCmp->SetValue( bool( layer_mask & SOLDERPASTE_LAYER_FRONT ) ); - m_PadLayerPateCu->SetValue( bool( layer_mask & SOLDERPASTE_LAYER_BACK ) ); + m_PadLayerPateCmp->SetValue( layer_mask[F_Paste] ); + m_PadLayerPateCu->SetValue( layer_mask[B_Paste] ); - m_PadLayerSilkCmp->SetValue( bool( layer_mask & SILKSCREEN_LAYER_FRONT ) ); - m_PadLayerSilkCu->SetValue( bool( layer_mask & SILKSCREEN_LAYER_BACK ) ); + m_PadLayerSilkCmp->SetValue( layer_mask[F_SilkS] ); + m_PadLayerSilkCu->SetValue( layer_mask[B_SilkS] ); - m_PadLayerMaskCmp->SetValue( bool( layer_mask & SOLDERMASK_LAYER_FRONT ) ); - m_PadLayerMaskCu->SetValue( bool( layer_mask & SOLDERMASK_LAYER_BACK ) ); + m_PadLayerMaskCmp->SetValue( layer_mask[F_Mask] ); + m_PadLayerMaskCu->SetValue( layer_mask[B_Mask] ); - m_PadLayerECO1->SetValue( bool( layer_mask & ECO1_LAYER ) ); - m_PadLayerECO2->SetValue( bool( layer_mask & ECO2_LAYER ) ); + m_PadLayerECO1->SetValue( layer_mask[Eco1_User] ); + m_PadLayerECO2->SetValue( layer_mask[Eco2_User] ); - m_PadLayerDraft->SetValue( bool( layer_mask & DRAW_LAYER ) ); + m_PadLayerDraft->SetValue( layer_mask[Dwgs_User] ); } @@ -681,12 +686,12 @@ bool DIALOG_PAD_PROPERTIES::padValuesOK() error_msgs.Add( _( "Incorrect value for pad drill: pad drill bigger than pad size" ) ); } - LAYER_MSK padlayers_mask = m_dummyPad->GetLayerMask(); + LSET padlayers_mask = m_dummyPad->GetLayerSet(); if( padlayers_mask == 0 ) error_msgs.Add( _( "Error: pad has no layer" ) ); - if( ( padlayers_mask & (LAYER_BACK | LAYER_FRONT) ) == 0 ) + if( !padlayers_mask[F_Cu] && !padlayers_mask[B_Cu] ) { if( m_dummyPad->GetDrillSize().x || m_dummyPad->GetDrillSize().y ) { @@ -731,13 +736,13 @@ bool DIALOG_PAD_PROPERTIES::padValuesOK() break; case PAD_CONN: // Connector pads are smd pads, just they do not have solder paste. - if( (padlayers_mask & SOLDERPASTE_LAYER_BACK) || - (padlayers_mask & SOLDERPASTE_LAYER_FRONT) ) + if( padlayers_mask[B_Paste] || padlayers_mask[F_Paste] ) error_msgs.Add( _( "Error: Connector pads are not on the solder paste layer\n" "Use SMD pads instead" ) ); // Fall trough + case PAD_SMD: // SMD and Connector pads (One external copper layer only) - if( (padlayers_mask & LAYER_BACK) && (padlayers_mask & LAYER_FRONT) ) + if( padlayers_mask[B_Cu] && padlayers_mask[F_Cu] ) error_msgs.Add( _( "Error: only one copper layer allowed for SMD or Connector pads" ) ); break; } @@ -813,14 +818,14 @@ void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event ) m_currentPad->SetPadToDieLength( m_padMaster->GetPadToDieLength() ); - if( m_currentPad->GetLayerMask() != m_padMaster->GetLayerMask() ) + if( m_currentPad->GetLayerSet() != m_padMaster->GetLayerSet() ) { rastnestIsChanged = true; - m_currentPad->SetLayerMask( m_padMaster->GetLayerMask() ); + m_currentPad->SetLayerSet( m_padMaster->GetLayerSet() ); } if( m_isFlipped ) - m_currentPad->SetLayerMask( FlipLayerMask( m_currentPad->GetLayerMask() ) ); + m_currentPad->SetLayerSet( FlipLayerMask( m_currentPad->GetLayerSet() ) ); m_currentPad->SetPadName( m_padMaster->GetPadName() ); @@ -873,8 +878,8 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( D_PAD* aPad ) wxString msg; int x, y; - aPad->SetAttribute( CodeType[m_PadType->GetSelection()] ); - aPad->SetShape( CodeShape[m_PadShape->GetSelection()] ); + aPad->SetAttribute( code_type[m_PadType->GetSelection()] ); + aPad->SetShape( code_shape[m_PadShape->GetSelection()] ); // Read pad clearances values: aPad->SetLocalClearance( ValueFromTextCtrl( *m_NetClearanceValueCtrl ) ); @@ -1063,20 +1068,20 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( D_PAD* aPad ) break; } - LAYER_MSK padLayerMask = NO_LAYERS; + LSET padLayerMask; switch( m_rbCopperLayersSel->GetSelection() ) { case 0: - padLayerMask |= LAYER_FRONT; + padLayerMask.set( F_Cu ); break; case 1: - padLayerMask |= LAYER_BACK; + padLayerMask.set( B_Cu ); break; case 2: - padLayerMask |= ALL_CU_LAYERS; + padLayerMask |= LSET::AllCuMask(); break; case 3: // No copper layers @@ -1084,29 +1089,39 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( D_PAD* aPad ) } if( m_PadLayerAdhCmp->GetValue() ) - padLayerMask |= ADHESIVE_LAYER_FRONT; - if( m_PadLayerAdhCu->GetValue() ) - padLayerMask |= ADHESIVE_LAYER_BACK; - if( m_PadLayerPateCmp->GetValue() ) - padLayerMask |= SOLDERPASTE_LAYER_FRONT; - if( m_PadLayerPateCu->GetValue() ) - padLayerMask |= SOLDERPASTE_LAYER_BACK; - if( m_PadLayerSilkCmp->GetValue() ) - padLayerMask |= SILKSCREEN_LAYER_FRONT; - if( m_PadLayerSilkCu->GetValue() ) - padLayerMask |= SILKSCREEN_LAYER_BACK; - if( m_PadLayerMaskCmp->GetValue() ) - padLayerMask |= SOLDERMASK_LAYER_FRONT; - if( m_PadLayerMaskCu->GetValue() ) - padLayerMask |= SOLDERMASK_LAYER_BACK; - if( m_PadLayerECO1->GetValue() ) - padLayerMask |= ECO1_LAYER; - if( m_PadLayerECO2->GetValue() ) - padLayerMask |= ECO2_LAYER; - if( m_PadLayerDraft->GetValue() ) - padLayerMask |= DRAW_LAYER; + padLayerMask.set( F_Adhes ); - aPad->SetLayerMask( padLayerMask ); + if( m_PadLayerAdhCu->GetValue() ) + padLayerMask.set( B_Adhes ); + + if( m_PadLayerPateCmp->GetValue() ) + padLayerMask.set( F_Paste ); + + if( m_PadLayerPateCu->GetValue() ) + padLayerMask.set( B_Paste ); + + if( m_PadLayerSilkCmp->GetValue() ) + padLayerMask.set( F_SilkS ); + + if( m_PadLayerSilkCu->GetValue() ) + padLayerMask.set( B_SilkS ); + + if( m_PadLayerMaskCmp->GetValue() ) + padLayerMask.set( F_Mask ); + + if( m_PadLayerMaskCu->GetValue() ) + padLayerMask.set( B_Mask ); + + if( m_PadLayerECO1->GetValue() ) + padLayerMask.set( Eco1_User ); + + if( m_PadLayerECO2->GetValue() ) + padLayerMask.set( Eco2_User ); + + if( m_PadLayerDraft->GetValue() ) + padLayerMask.set( Dwgs_User ); + + aPad->SetLayerSet( padLayerMask ); return error; } diff --git a/pcbnew/dialogs/dialog_pcb_text_properties.cpp b/pcbnew/dialogs/dialog_pcb_text_properties.cpp index 9f58be5e1d..bb0d207555 100644 --- a/pcbnew/dialogs/dialog_pcb_text_properties.cpp +++ b/pcbnew/dialogs/dialog_pcb_text_properties.cpp @@ -128,8 +128,9 @@ void DIALOG_PCB_TEXT_PROPERTIES::MyInit() // Configure the layers list selector m_LayerSelectionCtrl->SetLayersHotkeys( false ); + // A text has no sense on edge cut layer - m_LayerSelectionCtrl->SetLayerMask( EDGE_LAYER ); + m_LayerSelectionCtrl->SetLayerSet( Edge_Cuts ); m_LayerSelectionCtrl->SetBoardFrame( m_Parent ); m_LayerSelectionCtrl->Resync(); m_LayerSelectionCtrl->SetLayerSelection( m_SelectedPCBText->GetLayer() ); @@ -249,7 +250,7 @@ void DIALOG_PCB_TEXT_PROPERTIES::OnOkClick( wxCommandEvent& event ) } // Set the layer on which the PCB text is laying - m_SelectedPCBText->SetLayer( m_LayerSelectionCtrl->GetLayerSelection() ); + m_SelectedPCBText->SetLayer( (LAYER_ID) m_LayerSelectionCtrl->GetLayerSelection() ); // Set whether the PCB text is mirrored (faced down from layer face perspective) m_SelectedPCBText->SetMirrored( m_DisplayCtrl->GetSelection() == 1 ); diff --git a/pcbnew/dialogs/dialog_plot.cpp b/pcbnew/dialogs/dialog_plot.cpp index 230f170b65..6e6234ea9a 100644 --- a/pcbnew/dialogs/dialog_plot.cpp +++ b/pcbnew/dialogs/dialog_plot.cpp @@ -146,25 +146,18 @@ void DIALOG_PLOT::Init_Dialog() m_plotPSNegativeOpt->SetValue( m_plotOpts.GetNegative() ); m_forcePSA4OutputOpt->SetValue( m_plotOpts.GetA4Output() ); - // List layers in same order than in setup layers dialog - // (Front or Top to Back or Bottom) - DECLARE_LAYERS_ORDER_LIST( layersOrder ); - int layerIndex, checkIndex; - LAYER_NUM layer; + // Could devote a PlotOrder() function in place of UIOrder(). + m_layerList = m_board->GetEnabledLayers().UIOrder(); - for( layerIndex = 0; layerIndex < NB_LAYERS; layerIndex++ ) + for( LSEQ seq = m_layerList; seq; ++seq ) { - layer = layersOrder[layerIndex]; - - wxASSERT( layer < NB_LAYERS ); - - if( !m_board->IsLayerEnabled( layer ) ) - continue; + LAYER_ID layer = *seq; m_layerList.push_back( layer ); - checkIndex = m_layerCheckListBox->Append( m_board->GetLayerName( layer ) ); - if( m_plotOpts.GetLayerSelection() & GetLayerMask( layer ) ) + int checkIndex = m_layerCheckListBox->Append( m_board->GetLayerName( layer ) ); + + if( m_plotOpts.GetLayerSelection()[layer] ) m_layerCheckListBox->Check( checkIndex ); } @@ -240,48 +233,46 @@ void DIALOG_PLOT::OnPopUpLayers( wxCommandEvent& event ) switch( event.GetId() ) { - case ID_LAYER_FAB: // Select layers usually needed to build a board - for( i = 0; i < m_layerList.size(); i++ ) - { - LAYER_MSK layermask = GetLayerMask( m_layerList[ i ] ); - if( layermask & ( ALL_CU_LAYERS | ALL_TECH_LAYERS ) ) - m_layerCheckListBox->Check( i, true ); - else - m_layerCheckListBox->Check( i, false ); + case ID_LAYER_FAB: // Select layers usually needed to build a board + for( i = 0; i < m_layerList.size(); i++ ) + { + LSET layermask( m_layerList[ i ] ); - } - break; - - case ID_SELECT_COPPER_LAYERS: - for( i = 0; i < m_layerList.size(); i++ ) - { - if( m_layerList[i] <= LAST_COPPER_LAYER ) - m_layerCheckListBox->Check( i, true ); - - } - break; - - case ID_DESELECT_COPPER_LAYERS: - for( i = 0; i < m_layerList.size(); i++ ) - { - if( m_layerList[i] <= LAST_COPPER_LAYER ) - m_layerCheckListBox->Check( i, false ); - - } - break; - - case ID_SELECT_ALL_LAYERS: - for( i = 0; i < m_layerList.size(); i++ ) + if( ( layermask & ( LSET::AllCuMask() | LSET::AllTechMask() ) ).any() ) m_layerCheckListBox->Check( i, true ); - break; - - case ID_DESELECT_ALL_LAYERS: - for( i = 0; i < m_layerList.size(); i++ ) + else m_layerCheckListBox->Check( i, false ); - break; + } + break; - default: - break; + case ID_SELECT_COPPER_LAYERS: + for( i = 0; i < m_layerList.size(); i++ ) + { + if( IsCopperLayer( m_layerList[i] ) ) + m_layerCheckListBox->Check( i, true ); + } + break; + + case ID_DESELECT_COPPER_LAYERS: + for( i = 0; i < m_layerList.size(); i++ ) + { + if( IsCopperLayer( m_layerList[i] ) ) + m_layerCheckListBox->Check( i, false ); + } + break; + + case ID_SELECT_ALL_LAYERS: + for( i = 0; i < m_layerList.size(); i++ ) + m_layerCheckListBox->Check( i, true ); + break; + + case ID_DESELECT_ALL_LAYERS: + for( i = 0; i < m_layerList.size(); i++ ) + m_layerCheckListBox->Check( i, false ); + break; + + default: + break; } } @@ -669,13 +660,12 @@ void DIALOG_PLOT::applyPlotSettings() tempOptions.SetFormat( GetPlotFormat() ); - long selectedLayers = 0; - unsigned int i; + LSET selectedLayers; - for( i = 0; i < m_layerList.size(); i++ ) + for( unsigned i = 0; i < m_layerList.size(); i++ ) { if( m_layerCheckListBox->IsChecked( i ) ) - selectedLayers |= GetLayerMask( m_layerList[i] ); + selectedLayers.set( m_layerList[i] ); } tempOptions.SetLayerSelection( selectedLayers ); @@ -773,51 +763,49 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event ) wxBusyCursor dummy; - for( LAYER_NUM layer = FIRST_LAYER; layer < NB_PCB_LAYERS; ++layer ) + for( LSEQ seq = m_plotOpts.GetLayerSelection().UIOrder(); seq; ++seq ) { - if( m_plotOpts.GetLayerSelection() & GetLayerMask( layer ) ) + LAYER_ID layer = *seq; + + // Pick the basename from the board file + wxFileName fn( boardFilename ); + + // Use Gerber Extensions based on layer number + // (See http://en.wikipedia.org/wiki/Gerber_File) + if( m_plotOpts.GetFormat() == PLOT_FORMAT_GERBER && m_useGerberExtensions->GetValue() ) + file_ext = GetGerberExtension( layer ); + + // Create file name (from the English layer name for non copper layers). + BuildPlotFileName( &fn, outputDir.GetPath(), + m_board->GetStandardLayerName( layer ), + file_ext ); + + LOCALE_IO toggle; + + BOARD* board = m_parent->GetBoard(); + PLOTTER* plotter = StartPlotBoard( board, &m_plotOpts, fn.GetFullPath(), wxEmptyString ); + + // Print diags in messages box: + wxString msg; + + if( plotter ) { - // Pick the basename from the board file - wxFileName fn( boardFilename ); + PlotOneBoardLayer( board, plotter, layer, m_plotOpts ); + plotter->EndPlot(); + delete plotter; - // Use Gerber Extensions based on layer number - // (See http://en.wikipedia.org/wiki/Gerber_File) - if( ( m_plotOpts.GetFormat() == PLOT_FORMAT_GERBER ) - && m_useGerberExtensions->GetValue() ) - file_ext = GetGerberExtension( layer ); - - // Create file name (from the English layer name for non copper layers). - BuildPlotFileName( &fn, outputDir.GetPath(), - m_board->GetStandardLayerName( layer ), - file_ext ); - - LOCALE_IO toggle; - BOARD *board = m_parent->GetBoard(); - PLOTTER *plotter = StartPlotBoard( board, &m_plotOpts, - fn.GetFullPath(), - wxEmptyString ); - - // Print diags in messages box: - wxString msg; - - if( plotter ) - { - PlotOneBoardLayer( board, plotter, layer, m_plotOpts ); - plotter->EndPlot(); - delete plotter; - - msg.Printf( _( "Plot file <%s> created" ), GetChars( fn.GetFullPath() ) ); - } - else - msg.Printf( _( "Unable to create <%s>" ), GetChars( fn.GetFullPath() ) ); - - msg << wxT( "\n" ); - m_messagesBox->AppendText( msg ); + msg.Printf( _( "Plot file <%s> created" ), GetChars( fn.GetFullPath() ) ); } + else + msg.Printf( _( "Unable to create <%s>" ), GetChars( fn.GetFullPath() ) ); + + msg << wxT( "\n" ); + m_messagesBox->AppendText( msg ); } // If no layer selected, we have nothing plotted. // Prompt user if it happens because he could think there is a bug in Pcbnew. - if( !m_plotOpts.GetLayerSelection() ) + if( !m_plotOpts.GetLayerSelection().any() ) DisplayError( this, _( "No layer selected" ) ); } + diff --git a/pcbnew/dialogs/dialog_plot.h b/pcbnew/dialogs/dialog_plot.h index b5cd562590..b041ba7a55 100644 --- a/pcbnew/dialogs/dialog_plot.h +++ b/pcbnew/dialogs/dialog_plot.h @@ -42,7 +42,7 @@ private: PCB_EDIT_FRAME* m_parent; BOARD* m_board; wxConfigBase* m_config; - std::vector m_layerList; // List to hold CheckListBox layer numbers + LSEQ m_layerList; // List to hold CheckListBox layer numbers double m_XScaleAdjust; // X scale factor adjust to compensate // plotter X scaling error double m_YScaleAdjust; // X scale factor adjust to compensate diff --git a/pcbnew/dialogs/dialog_print_using_printer.cpp b/pcbnew/dialogs/dialog_print_using_printer.cpp index fae82d0625..4b4312c975 100644 --- a/pcbnew/dialogs/dialog_print_using_printer.cpp +++ b/pcbnew/dialogs/dialog_print_using_printer.cpp @@ -29,7 +29,7 @@ extern int g_DrawDefaultLineThickness; // Local variables -static LAYER_MSK s_SelectedLayers; +static LSET s_SelectedLayers; static double s_ScaleList[] = { 0, 0.5, 0.7, 0.999, 1.0, 1.4, 2.0, 3.0, 4.0 }; @@ -56,14 +56,14 @@ public: bool IsMirrored() { return m_Print_Mirror->IsChecked(); } bool ExcludeEdges() { return m_Exclude_Edges_Pcb->IsChecked(); } bool PrintUsingSinglePage() { return m_PagesOption->GetSelection(); } - int SetLayerMaskFromListSelection(); + int SetLayerSetFromListSelection(); private: PCB_EDIT_FRAME* m_parent; - wxConfigBase* m_config; - wxCheckBox* m_BoxSelectLayer[32]; + wxConfigBase* m_config; + wxCheckBox* m_BoxSelectLayer[LAYER_ID_COUNT]; static bool m_ExcludeEdgeLayer; void OnCloseWindow( wxCloseEvent& event ); @@ -75,7 +75,7 @@ private: void OnButtonCancelClick( wxCommandEvent& event ) { Close(); } void SetPrintParameters( ); void SetPenWidth(); - void InitValues( ); + void initValues( ); }; @@ -127,7 +127,9 @@ DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER( PCB_EDIT_FRAME* parent ) m_parent = parent; m_config = Kiface().KifaceSettings(); - InitValues( ); + memset( m_BoxSelectLayer, 0, sizeof( m_BoxSelectLayer ) ); + + initValues( ); if( GetSizer() ) { @@ -143,54 +145,40 @@ DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER( PCB_EDIT_FRAME* parent ) } -void DIALOG_PRINT_USING_PRINTER::InitValues( ) +void DIALOG_PRINT_USING_PRINTER::initValues( ) { wxString msg; BOARD* board = m_parent->GetBoard(); s_Parameters.m_PageSetupData = s_pageSetupData; - // Create layer list. - LAYER_NUM layer; + // Create layer list. wxString layerKey; - for( layer = FIRST_LAYER; layer < NB_PCB_LAYERS; ++layer ) + + LSEQ seq = board->GetEnabledLayers().UIOrder(); + + for( ; seq; ++seq ) { - if( !board->IsLayerEnabled( layer ) ) - m_BoxSelectLayer[layer] = NULL; - else - m_BoxSelectLayer[layer] = - new wxCheckBox( this, -1, board->GetLayerName( layer ) ); - } + LAYER_ID layer = *seq; - // Add wxCheckBoxes in layers lists dialog - // List layers in same order than in setup layers dialog - // (Front or Top to Back or Bottom) - DECLARE_LAYERS_ORDER_LIST(layersOrder); - for( LAYER_NUM layer_idx = FIRST_LAYER; layer_idx < NB_PCB_LAYERS; ++layer_idx ) - { - layer = layersOrder[layer_idx]; + m_BoxSelectLayer[layer] = new wxCheckBox( this, -1, board->GetLayerName( layer ) ); - wxASSERT(layer < NB_PCB_LAYERS); - - if( m_BoxSelectLayer[layer] == NULL ) - continue; - - if( layer <= LAST_COPPER_LAYER ) + if( IsCopperLayer( layer ) ) m_CopperLayersBoxSizer->Add( m_BoxSelectLayer[layer], 0, wxGROW | wxALL, 1 ); else m_TechnicalLayersBoxSizer->Add( m_BoxSelectLayer[layer], 0, wxGROW | wxALL, 1 ); - layerKey.Printf( OPTKEY_LAYERBASE, layer ); + bool option; + if( m_config->Read( layerKey, &option ) ) m_BoxSelectLayer[layer]->SetValue( option ); else { - LAYER_MSK mask = GetLayerMask( layer ); - if( mask & s_SelectedLayers ) + if( s_SelectedLayers[layer] ) m_BoxSelectLayer[layer]->SetValue( true ); } } @@ -220,11 +208,11 @@ void DIALOG_PRINT_USING_PRINTER::InitValues( ) s_Parameters.m_YScaleAdjust > MAX_SCALE ) s_Parameters.m_XScaleAdjust = s_Parameters.m_YScaleAdjust = 1.0; - s_SelectedLayers = NO_LAYERS; - for( LAYER_NUM layer = FIRST_LAYER; layer< NB_PCB_LAYERS; ++layer ) + s_SelectedLayers = LSET(); + + for( seq.Rewind(); seq; ++seq ) { - if( m_BoxSelectLayer[layer] == NULL ) - continue; + LAYER_ID layer = *seq; wxString layerKey; bool option; @@ -236,7 +224,7 @@ void DIALOG_PRINT_USING_PRINTER::InitValues( ) { m_BoxSelectLayer[layer]->SetValue( option ); if( option ) - s_SelectedLayers |= GetLayerMask( layer ); + s_SelectedLayers.set( layer ); } } } @@ -277,20 +265,21 @@ void DIALOG_PRINT_USING_PRINTER::InitValues( ) } -int DIALOG_PRINT_USING_PRINTER::SetLayerMaskFromListSelection() +int DIALOG_PRINT_USING_PRINTER::SetLayerSetFromListSelection() { - int page_count; + int page_count = 0; - s_Parameters.m_PrintMaskLayer = NO_LAYERS; - LAYER_NUM ii; - for( ii = FIRST_LAYER, page_count = 0; ii < NB_PCB_LAYERS; ++ii ) + s_Parameters.m_PrintMaskLayer = LSET(); + + for( unsigned ii = 0; ii < DIM(m_BoxSelectLayer); ++ii ) { - if( m_BoxSelectLayer[ii] == NULL ) + if( !m_BoxSelectLayer[ii] ) continue; + if( m_BoxSelectLayer[ii]->IsChecked() ) { page_count++; - s_Parameters.m_PrintMaskLayer |= GetLayerMask( ii ); + s_Parameters.m_PrintMaskLayer.set( ii ); } } @@ -323,10 +312,12 @@ void DIALOG_PRINT_USING_PRINTER::OnCloseWindow( wxCloseEvent& event ) m_config->Write( OPTKEY_PRINT_PAGE_PER_LAYER, s_Parameters.m_OptionPrintPage ); m_config->Write( OPTKEY_PRINT_PADS_DRILL, (long) s_Parameters.m_DrillShapeOpt ); wxString layerKey; - for( LAYER_NUM layer = FIRST_LAYER; layer < NB_PCB_LAYERS; ++layer ) + + for( unsigned layer = 0; layer < DIM(m_BoxSelectLayer); ++layer ) { - if( m_BoxSelectLayer[layer] == NULL ) + if( !m_BoxSelectLayer[layer] ) continue; + layerKey.Printf( OPTKEY_LAYERBASE, layer ); m_config->Write( layerKey, m_BoxSelectLayer[layer]->IsChecked() ); } @@ -350,7 +341,7 @@ void DIALOG_PRINT_USING_PRINTER::SetPrintParameters( ) if( m_PagesOption ) s_Parameters.m_OptionPrintPage = m_PagesOption->GetSelection() != 0; - SetLayerMaskFromListSelection(); + SetLayerSetFromListSelection(); int idx = m_ScaleOption->GetSelection(); s_Parameters.m_PrintScale = s_ScaleList[idx]; diff --git a/pcbnew/dimension.cpp b/pcbnew/dimension.cpp index fc1f828a89..1058804938 100644 --- a/pcbnew/dimension.cpp +++ b/pcbnew/dimension.cpp @@ -135,7 +135,7 @@ DIALOG_DIMENSION_EDITOR::DIALOG_DIMENSION_EDITOR( PCB_EDIT_FRAME* aParent, // Configure the layers list selector m_SelLayerBox->SetLayersHotkeys( false ); - m_SelLayerBox->SetLayerMask( ALL_CU_LAYERS | EDGE_LAYER ); + m_SelLayerBox->SetLayerSet( LSET::AllCuMask().set( Edge_Cuts ) ); m_SelLayerBox->SetBoardFrame( m_Parent ); m_SelLayerBox->Resync(); @@ -143,7 +143,7 @@ DIALOG_DIMENSION_EDITOR::DIALOG_DIMENSION_EDITOR( PCB_EDIT_FRAME* aParent, { wxMessageBox( _("This item has an illegal layer id.\n" "Now, forced on the drawings layer. Please, fix it") ); - m_SelLayerBox->SetLayerSelection( DRAW_N ); + m_SelLayerBox->SetLayerSelection( Dwgs_User ); } GetSizer()->Fit( this ); @@ -165,7 +165,7 @@ void DIALOG_DIMENSION_EDITOR::OnOKClick( wxCommandEvent& event ) { CurrentDimension->Draw( m_Parent->GetCanvas(), m_DC, GR_XOR ); } -#endif +#endif m_Parent->SaveCopyInUndoList(CurrentDimension, UR_CHANGED); @@ -208,7 +208,7 @@ void DIALOG_DIMENSION_EDITOR::OnOKClick( wxCommandEvent& event ) CurrentDimension->Text().SetMirrored( ( m_rbMirror->GetSelection() == 1 ) ? true : false ); - CurrentDimension->SetLayer( m_SelLayerBox->GetLayerSelection() ); + CurrentDimension->SetLayer( (LAYER_ID) m_SelLayerBox->GetLayerSelection() ); #ifndef USE_WX_OVERLAY if( m_DC ) // Display new text { diff --git a/pcbnew/drag.h b/pcbnew/drag.h index beb87b62c5..72a27ac34a 100644 --- a/pcbnew/drag.h +++ b/pcbnew/drag.h @@ -183,7 +183,7 @@ void EraseDragList(); * @param aNetCode = the net code to consider * @param aMaxDist = max distance from aRefPos to a track end candidate to collect the track */ -void Collect_TrackSegmentsToDrag( BOARD* aPcb, const wxPoint& aRefPos, LAYER_MSK aLayerMask, +void Collect_TrackSegmentsToDrag( BOARD* aPcb, const wxPoint& aRefPos, LSET aLayerMask, int aNetCode, int aMaxDist ); /* Add aTrack to the drag list diff --git a/pcbnew/dragsegm.cpp b/pcbnew/dragsegm.cpp index 122d1ea110..8964f6c783 100644 --- a/pcbnew/dragsegm.cpp +++ b/pcbnew/dragsegm.cpp @@ -335,7 +335,7 @@ void AddSegmentToDragList( int flag, TRACK* aTrack ) } -void Collect_TrackSegmentsToDrag( BOARD* aPcb, const wxPoint& aRefPos, LAYER_MSK aLayerMask, +void Collect_TrackSegmentsToDrag( BOARD* aPcb, const wxPoint& aRefPos, LSET aLayerMask, int aNetCode, int aMaxDist ) { TRACK* track = aPcb->m_Track->GetStartNetCode( aNetCode ); @@ -345,7 +345,7 @@ void Collect_TrackSegmentsToDrag( BOARD* aPcb, const wxPoint& aRefPos, LAYER_MSK if( track->GetNetCode() != aNetCode ) // not the same netcode: all candidates tested break; - if( ( aLayerMask & track->GetLayerMask() ) == 0 ) + if( ( aLayerMask & track->GetLayerSet() ) == 0 ) continue; // Cannot be connected, not on the same layer if( track->IsDragging() ) @@ -394,7 +394,7 @@ void Collect_TrackSegmentsToDrag( BOARD* aPcb, const wxPoint& aRefPos, LAYER_MSK // If a connected via is found at location aRefPos, // collect also tracks connected by this via. if( track->Type() == PCB_VIA_T ) - Collect_TrackSegmentsToDrag( aPcb, aRefPos, track->GetLayerMask(), + Collect_TrackSegmentsToDrag( aPcb, aRefPos, track->GetLayerSet(), aNetCode, track->GetWidth() / 2 ); } } diff --git a/pcbnew/drc.cpp b/pcbnew/drc.cpp index 62ffcf4153..9f01fb1f13 100644 --- a/pcbnew/drc.cpp +++ b/pcbnew/drc.cpp @@ -676,7 +676,9 @@ bool DRC::doTrackKeepoutDrc( TRACK* aRefSeg ) bool DRC::doPadToPadsDrc( D_PAD* aRefPad, D_PAD** aStart, D_PAD** aEnd, int x_limit ) { - LAYER_MSK layerMask = aRefPad->GetLayerMask() & ALL_CU_LAYERS; + const static LSET all_cu = LSET::AllCuMask(); + + LSET layerMask = aRefPad->GetLayerSet() & all_cu; /* used to test DRC pad to holes: this dummy pad has the size and shape of the hole * to test pad to pad hole DRC, using the pad to pad DRC test function. @@ -684,11 +686,11 @@ bool DRC::doPadToPadsDrc( D_PAD* aRefPad, D_PAD** aStart, D_PAD** aEnd, int x_li * A pad must have a parent because some functions expect a non null parent * to find the parent board, and some other data */ - MODULE dummymodule( m_pcb ); // Creates a dummy parent - D_PAD dummypad( &dummymodule ); + MODULE dummymodule( m_pcb ); // Creates a dummy parent + D_PAD dummypad( &dummymodule ); // Ensure the hole is on all copper layers - dummypad.SetLayerMask( ALL_CU_LAYERS | dummypad.GetLayerMask() ); + dummypad.SetLayerSet( all_cu | dummypad.GetLayerSet() ); // Use the minimal local clearance value for the dummy pad. // The clearance of the active pad will be used as minimum distance to a hole @@ -710,7 +712,7 @@ bool DRC::doPadToPadsDrc( D_PAD* aRefPad, D_PAD** aStart, D_PAD** aEnd, int x_li // No problem if pads are on different copper layers, // but their hole (if any ) can create DRC error because they are on all // copper layers, so we test them - if( ( pad->GetLayerMask() & layerMask ) == 0 ) + if( ( pad->GetLayerSet() & layerMask ) == 0 ) { // if holes are in the same location and have the same size and shape, // this can be accepted diff --git a/pcbnew/drc_clearance_test_functions.cpp b/pcbnew/drc_clearance_test_functions.cpp index 31df052a2a..3578045d91 100644 --- a/pcbnew/drc_clearance_test_functions.cpp +++ b/pcbnew/drc_clearance_test_functions.cpp @@ -145,11 +145,12 @@ bool trapezoid2pointDRC( wxPoint aTref[4], wxPoint aPcompare, int aDist ) return true; } + bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads ) { TRACK* track; wxPoint delta; // lenght on X and Y axis of segments - LAYER_MSK layerMask; + LSET layerMask; int net_code_ref; wxPoint shape_pos; @@ -164,7 +165,7 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads ) m_segmEnd = delta = aRefSeg->GetEnd() - origin; m_segmAngle = 0; - layerMask = aRefSeg->GetLayerMask(); + layerMask = aRefSeg->GetLayerSet(); net_code_ref = aRefSeg->GetNetCode(); // Phase 0 : Test vias @@ -206,21 +207,29 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads ) // and **only one layer** can be drilled if( refvia->GetViaType() == VIA_MICROVIA ) { - LAYER_NUM layer1, layer2; - bool err = true; + LAYER_ID layer1, layer2; + bool err = true; refvia->LayerPair( &layer1, &layer2 ); if( layer1 > layer2 ) EXCHG( layer1, layer2 ); +#if 0 // was: // test: - if( layer1 == LAYER_N_BACK && layer2 == LAYER_N_2 ) + if( layer1 == B_Cu && layer2 == LAYER_N_2 ) err = false; if( layer1 == (m_pcb->GetDesignSettings().GetCopperLayerCount() - 2 ) - && layer2 == LAYER_N_FRONT ) + && layer2 == F_Cu ) err = false; +#else + if( layer2 == B_Cu && layer1 == m_pcb->GetDesignSettings().GetCopperLayerCount() - 2 ) + err = false; + + else if( layer1 == F_Cu && layer2 == In1_Cu ) + err = false; +#endif if( err ) { @@ -266,10 +275,10 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads ) * A pad must have a parent because some functions expect a non null parent * to find the parent board, and some other data */ - MODULE dummymodule( m_pcb ); // Creates a dummy parent - D_PAD dummypad( &dummymodule ); + MODULE dummymodule( m_pcb ); // Creates a dummy parent + D_PAD dummypad( &dummymodule ); - dummypad.SetLayerMask( ALL_CU_LAYERS ); // Ensure the hole is on all layers + dummypad.SetLayerSet( LSET::AllCuMask() ); // Ensure the hole is on all layers // Compute the min distance to pads if( testPads ) @@ -282,7 +291,7 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads ) * But if a drill hole exists (a pad on a single layer can have a hole!) * we must test the hole */ - if( (pad->GetLayerMask() & layerMask ) == 0 ) + if( !( pad->GetLayerSet() & layerMask ).any() ) { /* We must test the pad hole. In order to use the function * checkClearanceSegmToPad(),a pseudo pad is used, with a shape and a @@ -345,7 +354,7 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads ) continue; // No problem if segment are on different layers : - if( ( layerMask & track->GetLayerMask() ) == 0 ) + if( ( layerMask & track->GetLayerSet() ) == 0 ) continue; // the minimum distance = clearance plus half the reference track diff --git a/pcbnew/eagle_plugin.cpp b/pcbnew/eagle_plugin.cpp index 4e48b04098..1d307e9ede 100644 --- a/pcbnew/eagle_plugin.cpp +++ b/pcbnew/eagle_plugin.cpp @@ -1293,12 +1293,19 @@ void EAGLE_PLUGIN::loadLayerDefs( CPTREE& aLayers ) for( EITER it = cu.begin(); it != cu.end(); ++it, ++ki_layer_count ) { if( ki_layer_count == 0 ) - m_cu_map[it->number] = LAYER_N_FRONT; + m_cu_map[it->number] = F_Cu; else if( ki_layer_count == int( cu.size()-1 ) ) - m_cu_map[it->number] = LAYER_N_BACK; + m_cu_map[it->number] = B_Cu; else + { // some eagle boards do not have contiguous layer number sequences. + +#if 0 // pre LAYER_ID & LSET: m_cu_map[it->number] = cu.size() - 1 - ki_layer_count; +#else + m_cu_map[it->number] = ki_layer_count; +#endif + } } #if 0 && defined(DEBUG) @@ -1316,7 +1323,7 @@ void EAGLE_PLUGIN::loadLayerDefs( CPTREE& aLayers ) for( EITER it = cu.begin(); it != cu.end(); ++it ) { - LAYER_NUM layer = kicad_layer( it->number ); + LAYER_ID layer = kicad_layer( it->number ); // these function provide their own protection against UNDEFINED_LAYER: m_board->SetLayerName( layer, FROM_UTF8( it->name.c_str() ) ); @@ -1340,7 +1347,7 @@ void EAGLE_PLUGIN::loadPlain( CPTREE& aGraphics ) m_xpath->push( "wire" ); EWIRE w( gr->second ); - LAYER_NUM layer = kicad_layer( w.layer ); + LAYER_ID layer = kicad_layer( w.layer ); if( layer != UNDEFINED_LAYER ) { @@ -1368,7 +1375,7 @@ void EAGLE_PLUGIN::loadPlain( CPTREE& aGraphics ) m_xpath->push( "text" ); ETEXT t( gr->second ); - LAYER_NUM layer = kicad_layer( t.layer ); + LAYER_ID layer = kicad_layer( t.layer ); if( layer != UNDEFINED_LAYER ) { @@ -1459,7 +1466,7 @@ void EAGLE_PLUGIN::loadPlain( CPTREE& aGraphics ) m_xpath->push( "circle" ); ECIRCLE c( gr->second ); - LAYER_NUM layer = kicad_layer( c.layer ); + LAYER_ID layer = kicad_layer( c.layer ); if( layer != UNDEFINED_LAYER ) // unsupported layer { @@ -1483,7 +1490,7 @@ void EAGLE_PLUGIN::loadPlain( CPTREE& aGraphics ) m_xpath->push( "rectangle" ); ERECT r( gr->second ); - LAYER_NUM layer = kicad_layer( r.layer ); + LAYER_ID layer = kicad_layer( r.layer ); if( IsCopperLayer( layer ) ) { @@ -1550,7 +1557,7 @@ void EAGLE_PLUGIN::loadPlain( CPTREE& aGraphics ) pad->SetDrillSize( sz ); pad->SetSize( sz ); - pad->SetLayerMask( ALL_CU_LAYERS /* | SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT */ ); + pad->SetLayerSet( LSET::AllCuMask() ); m_xpath->pop(); } @@ -1923,7 +1930,7 @@ MODULE* EAGLE_PLUGIN::makeModule( CPTREE& aPackage, const string& aPkgName ) con void EAGLE_PLUGIN::packageWire( MODULE* aModule, CPTREE& aTree ) const { EWIRE w( aTree ); - LAYER_NUM layer = kicad_layer( w.layer ); + LAYER_ID layer = kicad_layer( w.layer ); if( IsNonCopperLayer( layer ) ) // only valid non-copper wires, skip copper package wires { @@ -1966,7 +1973,7 @@ void EAGLE_PLUGIN::packagePad( MODULE* aModule, CPTREE& aTree ) const pad->SetDrillSize( wxSize( kicad( e.drill ), kicad( e.drill ) ) ); - pad->SetLayerMask( ALL_CU_LAYERS | SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT ); + pad->SetLayerSet( LSET::AllCuMask().set( B_Mask ).set( F_Mask ) ); if( e.shape ) { @@ -2030,11 +2037,11 @@ void EAGLE_PLUGIN::packagePad( MODULE* aModule, CPTREE& aTree ) const void EAGLE_PLUGIN::packageText( MODULE* aModule, CPTREE& aTree ) const { ETEXT t( aTree ); - LAYER_NUM layer = kicad_layer( t.layer ); + LAYER_ID layer = kicad_layer( t.layer ); if( layer == UNDEFINED_LAYER ) { - layer = COMMENT_N; + layer = Cmts_User; } TEXTE_MODULE* txt; @@ -2138,7 +2145,7 @@ void EAGLE_PLUGIN::packageText( MODULE* aModule, CPTREE& aTree ) const void EAGLE_PLUGIN::packageRectangle( MODULE* aModule, CPTREE& aTree ) const { ERECT r( aTree ); - LAYER_NUM layer = kicad_layer( r.layer ); + LAYER_ID layer = kicad_layer( r.layer ); if( IsNonCopperLayer( layer ) ) // skip copper "package.rectangle"s { @@ -2171,7 +2178,7 @@ void EAGLE_PLUGIN::packageRectangle( MODULE* aModule, CPTREE& aTree ) const void EAGLE_PLUGIN::packagePolygon( MODULE* aModule, CPTREE& aTree ) const { EPOLYGON p( aTree ); - LAYER_NUM layer = kicad_layer( p.layer ); + LAYER_ID layer = kicad_layer( p.layer ); if( IsNonCopperLayer( layer ) ) // skip copper "package.rectangle"s { @@ -2183,12 +2190,12 @@ void EAGLE_PLUGIN::packagePolygon( MODULE* aModule, CPTREE& aTree ) const /* switch( layer ) { - case ECO1_N: layer = SILKSCREEN_N_FRONT; break; - case ECO2_N: layer = SILKSCREEN_N_BACK; break; + case Eco1_User: layer = F_SilkS; break; + case Eco2_User: layer = B_SilkS; break; // all MODULE templates (created from eagle packages) are on front layer // until cloned. - case COMMENT_N: layer = SILKSCREEN_N_FRONT; break; + case Cmts_User: layer = F_SilkS; break; } */ @@ -2220,19 +2227,19 @@ void EAGLE_PLUGIN::packagePolygon( MODULE* aModule, CPTREE& aTree ) const void EAGLE_PLUGIN::packageCircle( MODULE* aModule, CPTREE& aTree ) const { ECIRCLE e( aTree ); - LAYER_NUM layer = kicad_layer( e.layer ); + LAYER_ID layer = kicad_layer( e.layer ); EDGE_MODULE* gr = new EDGE_MODULE( aModule, S_CIRCLE ); aModule->GraphicalItems().PushBack( gr ); gr->SetWidth( kicad( e.width ) ); - switch( layer ) + switch( (int) layer ) { - case UNDEFINED_LAYER: layer = COMMENT_N; break; + case UNDEFINED_LAYER: layer = Cmts_User; break; /* - case ECO1_N: layer = SILKSCREEN_N_FRONT; break; - case ECO2_N: layer = SILKSCREEN_N_BACK; break; + case Eco1_User: layer = F_SilkS; break; + case Eco2_User: layer = B_SilkS; break; */ default: break; @@ -2272,14 +2279,14 @@ void EAGLE_PLUGIN::packageHole( MODULE* aModule, CPTREE& aTree ) const pad->SetDrillSize( sz ); pad->SetSize( sz ); - pad->SetLayerMask( ALL_CU_LAYERS /* | SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT */ ); + pad->SetLayerSet( LSET::AllCuMask() /* | SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT */ ); } void EAGLE_PLUGIN::packageSMD( MODULE* aModule, CPTREE& aTree ) const { ESMD e( aTree ); - LAYER_NUM layer = kicad_layer( e.layer ); + LAYER_ID layer = kicad_layer( e.layer ); if( !IsCopperLayer( layer ) ) { @@ -2308,10 +2315,13 @@ void EAGLE_PLUGIN::packageSMD( MODULE* aModule, CPTREE& aTree ) const pad->SetLayer( layer ); - if( layer == LAYER_N_FRONT ) - pad->SetLayerMask( LAYER_FRONT | SOLDERPASTE_LAYER_FRONT | SOLDERMASK_LAYER_FRONT ); - else if( layer == LAYER_N_BACK ) - pad->SetLayerMask( LAYER_BACK | SOLDERPASTE_LAYER_BACK | SOLDERMASK_LAYER_BACK ); + static const LSET front( 3, F_Cu, F_Paste, F_Mask ); + static const LSET back( 3, B_Cu, B_Paste, B_Mask ); + + if( layer == F_Cu ) + pad->SetLayerSet( front ); + else if( layer == B_Cu ) + pad->SetLayerSet( back ); // Optional according to DTD if( e.roundness ) // set set shape to PAD_RECT above, in case roundness is not present @@ -2372,7 +2382,7 @@ void EAGLE_PLUGIN::loadSignals( CPTREE& aSignals ) { m_xpath->push( "wire" ); EWIRE w( it->second ); - LAYER_NUM layer = kicad_layer( w.layer ); + LAYER_ID layer = kicad_layer( w.layer ); if( IsCopperLayer( layer ) ) { @@ -2406,8 +2416,8 @@ void EAGLE_PLUGIN::loadSignals( CPTREE& aSignals ) m_xpath->push( "via" ); EVIA v( it->second ); - LAYER_NUM layer_front_most = kicad_layer( v.layer_front_most ); - LAYER_NUM layer_back_most = kicad_layer( v.layer_back_most ); + LAYER_ID layer_front_most = kicad_layer( v.layer_front_most ); + LAYER_ID layer_back_most = kicad_layer( v.layer_back_most ); if( IsCopperLayer( layer_front_most ) && IsCopperLayer( layer_back_most ) ) @@ -2440,9 +2450,9 @@ void EAGLE_PLUGIN::loadSignals( CPTREE& aSignals ) if( drillz < m_min_via_hole ) m_min_via_hole = drillz; - if( layer_front_most == LAYER_N_FRONT && layer_back_most == LAYER_N_BACK ) + if( layer_front_most == F_Cu && layer_back_most == B_Cu ) via->SetViaType( VIA_THROUGH ); - else if( layer_front_most == LAYER_N_FRONT || layer_back_most == LAYER_N_BACK ) + else if( layer_front_most == F_Cu || layer_back_most == B_Cu ) via->SetViaType( VIA_MICROVIA ); else via->SetViaType( VIA_BLIND_BURIED ); @@ -2484,7 +2494,7 @@ void EAGLE_PLUGIN::loadSignals( CPTREE& aSignals ) m_xpath->push( "polygon" ); EPOLYGON p( it->second ); - LAYER_NUM layer = kicad_layer( p.layer ); + LAYER_ID layer = kicad_layer( p.layer ); if( IsCopperLayer( layer ) ) { @@ -2563,7 +2573,7 @@ void EAGLE_PLUGIN::loadSignals( CPTREE& aSignals ) } -int EAGLE_PLUGIN::kicad_layer( int aEagleLayer ) const +LAYER_ID EAGLE_PLUGIN::kicad_layer( int aEagleLayer ) const { /* will assume this is a valid mapping for all eagle boards until I get paid more: @@ -2637,26 +2647,26 @@ int EAGLE_PLUGIN::kicad_layer( int aEagleLayer ) const // eagle copper layer: if( aEagleLayer >= 1 && aEagleLayer < int( DIM( m_cu_map ) ) ) { - return m_cu_map[aEagleLayer]; + kiLayer = m_cu_map[aEagleLayer]; } else { /* #define FIRST_NON_COPPER_LAYER 16 -#define ADHESIVE_N_BACK 16 -#define ADHESIVE_N_FRONT 17 -#define SOLDERPASTE_N_BACK 18 -#define SOLDERPASTE_N_FRONT 19 -#define SILKSCREEN_N_BACK 20 -#define SILKSCREEN_N_FRONT 21 -#define SOLDERMASK_N_BACK 22 -#define SOLDERMASK_N_FRONT 23 -#define DRAW_N 24 -#define COMMENT_N 25 -#define ECO1_N 26 -#define ECO2_N 27 -#define EDGE_N 28 +#define B_Adhes 16 +#define F_Adhes 17 +#define B_Paste 18 +#define F_Paste 19 +#define B_SilkS 20 +#define F_SilkS 21 +#define B_Mask 22 +#define F_Mask 23 +#define Dwgs_User 24 +#define Cmts_User 25 +#define Eco1_User 26 +#define Eco2_User 27 +#define Edge_Cuts 28 #define LAST_NON_COPPER_LAYER 28 #define UNUSED_LAYER_29 29 #define UNUSED_LAYER_30 30 @@ -2665,40 +2675,40 @@ int EAGLE_PLUGIN::kicad_layer( int aEagleLayer ) const // translate non-copper eagle layer to pcbnew layer switch( aEagleLayer ) { - case 20: kiLayer = EDGE_N; break; // eagle says "Dimension" layer, but it's for board perimeter - case 21: kiLayer = SILKSCREEN_N_FRONT; break; - case 22: kiLayer = SILKSCREEN_N_BACK; break; - case 25: kiLayer = SILKSCREEN_N_FRONT; break; - case 26: kiLayer = SILKSCREEN_N_BACK; break; - case 27: kiLayer = SILKSCREEN_N_FRONT; break; - case 28: kiLayer = SILKSCREEN_N_BACK; break; - case 29: kiLayer = SOLDERMASK_N_FRONT; break; - case 30: kiLayer = SOLDERMASK_N_BACK; break; - case 31: kiLayer = SOLDERPASTE_N_FRONT; break; - case 32: kiLayer = SOLDERPASTE_N_BACK; break; - case 33: kiLayer = SOLDERMASK_N_FRONT; break; - case 34: kiLayer = SOLDERMASK_N_BACK; break; - case 35: kiLayer = ADHESIVE_N_FRONT; break; - case 36: kiLayer = ADHESIVE_N_BACK; break; - case 49: kiLayer = COMMENT_N; break; - case 50: kiLayer = COMMENT_N; break; + case 20: kiLayer = Edge_Cuts; break; // eagle says "Dimension" layer, but it's for board perimeter + case 21: kiLayer = F_SilkS; break; + case 22: kiLayer = B_SilkS; break; + case 25: kiLayer = F_SilkS; break; + case 26: kiLayer = B_SilkS; break; + case 27: kiLayer = F_SilkS; break; + case 28: kiLayer = B_SilkS; break; + case 29: kiLayer = F_Mask; break; + case 30: kiLayer = B_Mask; break; + case 31: kiLayer = F_Paste; break; + case 32: kiLayer = B_Paste; break; + case 33: kiLayer = F_Mask; break; + case 34: kiLayer = B_Mask; break; + case 35: kiLayer = F_Adhes; break; + case 36: kiLayer = B_Adhes; break; + case 49: kiLayer = Cmts_User; break; + case 50: kiLayer = Cmts_User; break; // Packages show the future chip pins on SMD parts using layer 51. // This is an area slightly smaller than the PAD/SMD copper area. // Carry those visual aids into the MODULE on the drawing layer, not silkscreen. - case 51: kiLayer = DRAW_N; break; - case 52: kiLayer = DRAW_N; break; + case 51: kiLayer = Dwgs_User; break; + case 52: kiLayer = Dwgs_User; break; - case 95: kiLayer = ECO1_N; break; - case 96: kiLayer = ECO2_N; break; + case 95: kiLayer = Eco1_User; break; + case 96: kiLayer = Eco2_User; break; default: // some layers do not map to KiCad // DBG( printf( "unsupported eagle layer: %d\n", aEagleLayer );) - kiLayer = UNDEFINED_LAYER; break; + kiLayer = UNDEFINED_LAYER; break; } } - return kiLayer; + return LAYER_ID( kiLayer ); } diff --git a/pcbnew/eagle_plugin.h b/pcbnew/eagle_plugin.h index 1dde4a94e5..4966ccb433 100644 --- a/pcbnew/eagle_plugin.h +++ b/pcbnew/eagle_plugin.h @@ -160,7 +160,7 @@ private: wxSize kicad_fontz( double d ) const; /// Convert an Eagle layer to a KiCad layer. - LAYER_NUM kicad_layer( int aLayer ) const; + LAYER_ID kicad_layer( int aLayer ) const; /// Convert a KiCad distance to an Eagle distance. double eagle( BIU d ) const { return mm_per_biu * d; } diff --git a/pcbnew/edgemod.cpp b/pcbnew/edgemod.cpp index d9dc16fe44..3c1e901f5f 100644 --- a/pcbnew/edgemod.cpp +++ b/pcbnew/edgemod.cpp @@ -192,15 +192,15 @@ void FOOTPRINT_EDIT_FRAME::Edit_Edge_Layer( EDGE_MODULE* aEdge ) { // note: if aEdge == NULL, all outline segments will be modified - MODULE* module = GetBoard()->m_Modules; - LAYER_NUM layer = SILKSCREEN_N_FRONT; - bool modified = false; + MODULE* module = GetBoard()->m_Modules; + LAYER_ID layer = F_SilkS; + bool modified = false; if( aEdge ) layer = aEdge->GetLayer(); // Ask for the new layer - LAYER_NUM new_layer = SelectLayer(layer, EDGE_LAYER ); + LAYER_ID new_layer = SelectLayer( layer, Edge_Cuts ); if( layer < 0 ) return; @@ -214,7 +214,7 @@ void FOOTPRINT_EDIT_FRAME::Edit_Edge_Layer( EDGE_MODULE* aEdge ) return; } - if( aEdge == NULL ) + if( !aEdge ) { for( BOARD_ITEM *item = module->GraphicalItems() ; item != NULL; item = item->Next() ) @@ -350,9 +350,9 @@ EDGE_MODULE* FOOTPRINT_EDIT_FRAME::Begin_Edge_Module( EDGE_MODULE* aEdge, // The default layer for an edge is the corresponding silk layer if( module->IsFlipped() ) - aEdge->SetLayer( SILKSCREEN_N_BACK ); + aEdge->SetLayer( B_SilkS ); else - aEdge->SetLayer( SILKSCREEN_N_FRONT ); + aEdge->SetLayer( F_SilkS ); // Initialize the starting point of the new segment or arc aEdge->SetStart( GetCrossHairPosition() ); diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index 7c2a02804f..9606618a0f 100644 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -62,7 +62,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) { int id = event.GetId(); - LAYER_NUM itmp; + INSTALL_UNBUFFERED_DC( dc, m_canvas ); MODULE* module; @@ -420,10 +420,13 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) id == ID_POPUP_PCB_SELECT_CU_LAYER_AND_PLACE_BLIND_BURIED_VIA ) { m_canvas->SetIgnoreMouseEvents( true ); + wxPoint dlgPosition; + wxGetMousePosition( &dlgPosition.x, &dlgPosition.y ); - LAYER_NUM layer = SelectLayer( GetActiveLayer(), ALL_NO_CU_LAYERS, - dlgPosition ); + + LAYER_ID layer = SelectLayer( GetActiveLayer(), LSET::AllNonCuMask(), dlgPosition ); + m_canvas->SetIgnoreMouseEvents( false ); m_canvas->MoveCursorToCrossHair(); @@ -956,20 +959,22 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) break; case ID_POPUP_PCB_SELECT_LAYER: - itmp = SelectLayer( GetActiveLayer() ); - - if( itmp >= 0 ) { - // if user changed colors and we are in high contrast mode, then redraw - // because the PAD_SMD pads may change color. - if( DisplayOpt.ContrastModeDisplay && GetActiveLayer() != itmp ) - { - m_canvas->Refresh(); - } - SetActiveLayer( itmp ); - } + LAYER_ID itmp = SelectLayer( GetActiveLayer() ); - m_canvas->MoveCursorToCrossHair(); + if( itmp >= 0 ) + { + // if user changed colors and we are in high contrast mode, then redraw + // because the PAD_SMD pads may change color. + if( DisplayOpt.ContrastModeDisplay && GetActiveLayer() != itmp ) + { + m_canvas->Refresh(); + } + SetActiveLayer( itmp ); + } + + m_canvas->MoveCursorToCrossHair(); + } break; case ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR: @@ -977,20 +982,23 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) break; case ID_POPUP_PCB_SELECT_NO_CU_LAYER: - itmp = SelectLayer( GetActiveLayer(), ALL_CU_LAYERS ); + { + LAYER_ID itmp = SelectLayer( GetActiveLayer(), LSET::AllCuMask() ); - if( itmp >= 0 ) - SetActiveLayer( itmp ); + if( itmp >= 0 ) + SetActiveLayer( itmp ); - m_canvas->MoveCursorToCrossHair(); + m_canvas->MoveCursorToCrossHair(); + } break; case ID_POPUP_PCB_SELECT_CU_LAYER: - itmp = SelectLayer( GetActiveLayer(), ALL_NO_CU_LAYERS ); - - if( itmp >= 0 ) - SetActiveLayer( itmp ); + { + LAYER_ID itmp = SelectLayer( GetActiveLayer(), LSET::AllNonCuMask() ); + if( itmp >= 0 ) + SetActiveLayer( itmp ); + } break; case ID_POPUP_PCB_SELECT_LAYER_PAIR: @@ -999,11 +1007,10 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) break; case ID_TOOLBARH_PCB_SELECT_LAYER: - SetActiveLayer( m_SelLayerBox->GetLayerSelection() ); + SetActiveLayer( (LAYER_ID) m_SelLayerBox->GetLayerSelection() ); if( DisplayOpt.ContrastModeDisplay ) m_canvas->Refresh( true ); - break; case ID_POPUP_PCB_EDIT_TEXTEPCB: @@ -1300,9 +1307,9 @@ void PCB_EDIT_FRAME::RemoveStruct( BOARD_ITEM* Item, wxDC* DC ) } -void PCB_EDIT_FRAME::SwitchLayer( wxDC* DC, LAYER_NUM layer ) +void PCB_EDIT_FRAME::SwitchLayer( wxDC* DC, LAYER_ID layer ) { - LAYER_NUM curLayer = GetActiveLayer(); + LAYER_ID curLayer = GetActiveLayer(); // Check if the specified layer matches the present layer if( layer == curLayer ) @@ -1317,7 +1324,7 @@ void PCB_EDIT_FRAME::SwitchLayer( wxDC* DC, LAYER_NUM layer ) // selection of any other copper layer is disregarded). if( GetBoard()->GetCopperLayerCount() < 2 ) { - if( layer != LAYER_N_BACK ) + if( layer != B_Cu ) return; } // If more than one copper layer is enabled, the "Copper" @@ -1326,17 +1333,16 @@ void PCB_EDIT_FRAME::SwitchLayer( wxDC* DC, LAYER_NUM layer ) // layers are also capable of being selected. else { - if( ( layer != LAYER_N_BACK ) && ( layer != LAYER_N_FRONT ) - && ( layer >= GetBoard()->GetCopperLayerCount() - 1 ) ) + if( layer != B_Cu && layer != F_Cu && layer >= GetBoard()->GetCopperLayerCount() - 1 ) return; } EDA_ITEM* current = GetScreen()->GetCurItem(); // See if we are drawing a segment; if so, add a via? - if( GetToolId() == ID_TRACK_BUTT && current != NULL ) + if( GetToolId() == ID_TRACK_BUTT && current ) { - if( current->Type() == PCB_TRACE_T && ( current->IsNew() ) ) + if( current->Type() == PCB_TRACE_T && current->IsNew() ) { // Want to set the routing layers so that it switches properly - // see the implementation of Other_Layer_Route - the working diff --git a/pcbnew/edit_pcb_text.cpp b/pcbnew/edit_pcb_text.cpp index 277159a5ee..8c6e257dc8 100644 --- a/pcbnew/edit_pcb_text.cpp +++ b/pcbnew/edit_pcb_text.cpp @@ -202,13 +202,15 @@ TEXTE_PCB* PCB_EDIT_FRAME::CreateTextePcb( wxDC* aDC, TEXTE_PCB* aText ) { GetBoard()->Add( textePcb ); textePcb->SetFlags( IS_NEW ); - LAYER_NUM layer = ( (PCB_SCREEN*) GetScreen() )->m_Active_Layer; + + LAYER_ID layer = ( (PCB_SCREEN*) GetScreen() )->m_Active_Layer; + textePcb->SetLayer( layer ); // Set the mirrored option for layers on the BACK side of the board - if( layer == LAYER_N_BACK || layer == SILKSCREEN_N_BACK || - layer == SOLDERPASTE_N_BACK || layer == SOLDERMASK_N_BACK || - layer == ADHESIVE_N_BACK + if( layer == B_Cu || layer == B_SilkS || + layer == B_Paste || layer == B_Mask || + layer == B_Adhes ) textePcb->SetMirrored( true ); diff --git a/pcbnew/editedge.cpp b/pcbnew/editedge.cpp index 207b515e66..ee6af0fd1a 100644 --- a/pcbnew/editedge.cpp +++ b/pcbnew/editedge.cpp @@ -145,9 +145,9 @@ void PCB_EDIT_FRAME::Delete_Segment_Edge( DRAWSEGMENT* Segment, wxDC* DC ) } -void PCB_EDIT_FRAME::Delete_Drawings_All_Layer( LAYER_NUM aLayer ) +void PCB_EDIT_FRAME::Delete_Drawings_All_Layer( LAYER_ID aLayer ) { - if( aLayer <= LAST_COPPER_LAYER ) + if( IsCopperLayer( aLayer ) ) { DisplayError( this, _( "Copper layer global delete not allowed!" ) ); return; @@ -246,7 +246,7 @@ DRAWSEGMENT* PCB_EDIT_FRAME::Begin_DrawSegment( DRAWSEGMENT* Segment, STROKE_T s s_large = GetDesignSettings().m_DrawSegmentWidth; - if( GetActiveLayer() == EDGE_N ) + if( GetActiveLayer() == Edge_Cuts ) { s_large = GetDesignSettings().m_EdgeSegmentWidth; } diff --git a/pcbnew/editrack-part2.cpp b/pcbnew/editrack-part2.cpp index 07967de9c9..a9475c5c78 100644 --- a/pcbnew/editrack-part2.cpp +++ b/pcbnew/editrack-part2.cpp @@ -104,12 +104,12 @@ bool PCB_EDIT_FRAME::Other_Layer_Route( TRACK* aTrack, wxDC* DC ) via->SetStart( g_CurrentTrackSegment->GetEnd() ); // Usual via is from copper to component. - // layer pair is LAYER_N_BACK and LAYER_N_FRONT. - via->SetLayerPair( LAYER_N_BACK, LAYER_N_FRONT ); + // layer pair is B_Cu and F_Cu. + via->SetLayerPair( B_Cu, F_Cu ); via->SetDrill( GetDesignSettings().GetCurrentViaDrill() ); - LAYER_NUM first_layer = GetActiveLayer(); - LAYER_NUM last_layer; + LAYER_ID first_layer = GetActiveLayer(); + LAYER_ID last_layer; // prepare switch to new active layer: if( first_layer != GetScreen()->m_Route_Layer_TOP ) @@ -118,31 +118,32 @@ bool PCB_EDIT_FRAME::Other_Layer_Route( TRACK* aTrack, wxDC* DC ) last_layer = GetScreen()->m_Route_Layer_BOTTOM; // Adjust the actual via layer pair - switch ( via->GetViaType() ) + switch( via->GetViaType() ) { case VIA_BLIND_BURIED: via->SetLayerPair( first_layer, last_layer ); break; case VIA_MICROVIA: // from external to the near neighbor inner layer - { - LAYER_NUM last_inner_layer = FIRST_LAYER + (GetBoard()->GetCopperLayerCount() - 2); - if ( first_layer == LAYER_N_BACK ) - last_layer = LAYER_N_2; - else if ( first_layer == LAYER_N_FRONT ) - last_layer = last_inner_layer; - else if ( first_layer == LAYER_N_2 ) - last_layer = LAYER_N_BACK; - else if ( first_layer == last_inner_layer ) - last_layer = LAYER_N_FRONT; - - // else error: will be removed later - via->SetLayerPair( first_layer, last_layer ); { - NETINFO_ITEM* net = via->GetNet(); - via->SetWidth( net->GetMicroViaSize() ); + LAYER_ID last_inner_layer = (LAYER_ID) ( GetBoard()->GetCopperLayerCount() - 2 ); + + if( first_layer == B_Cu ) + last_layer = last_inner_layer; + else if( first_layer == F_Cu ) + last_layer = In1_Cu; + else if( first_layer == last_inner_layer ) + last_layer = B_Cu; + else if( first_layer == In1_Cu ) + last_layer = F_Cu; + + // else error: will be removed later + via->SetLayerPair( first_layer, last_layer ); + { + NETINFO_ITEM* net = via->GetNet(); + via->SetWidth( net->GetMicroViaSize() ); + } } - } break; default: diff --git a/pcbnew/editrack.cpp b/pcbnew/editrack.cpp index 5842a921ce..ade0736df6 100644 --- a/pcbnew/editrack.cpp +++ b/pcbnew/editrack.cpp @@ -62,7 +62,7 @@ static void Abort_Create_Track( EDA_DRAW_PANEL* Panel, wxDC* DC ) { PCB_EDIT_FRAME* frame = (PCB_EDIT_FRAME*) Panel->GetParent(); BOARD* pcb = frame->GetBoard(); - TRACK* track = dyn_cast( frame->GetCurItem() ); + TRACK* track = dyn_cast( frame->GetCurItem() ); if( track ) { @@ -98,10 +98,11 @@ static void Abort_Create_Track( EDA_DRAW_PANEL* Panel, wxDC* DC ) */ 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 = GetCrossHairPosition(); + TRACK* trackOnStartPoint = NULL; + LSET layerMask( GetScreen()->m_Active_Layer ); + wxPoint pos = GetCrossHairPosition(); + + BOARD_CONNECTED_ITEM* lockPoint; if( aTrack == NULL ) // Starting a new track segment { @@ -122,14 +123,14 @@ TRACK* PCB_EDIT_FRAME::Begin_Route( TRACK* aTrack, wxDC* aDC ) GetBoard()->SetHighLightNet( 0 ); // Search for a starting point of the new track, a track or pad - LockPoint = GetBoard()->GetLockPoint( pos, layerMask ); + lockPoint = GetBoard()->GetLockPoint( pos, layerMask ); D_PAD* pad = NULL; - if( LockPoint ) // An item (pad or track) is found + if( lockPoint ) // An item (pad or track) is found { - if( LockPoint->Type() == PCB_PAD_T ) + if( lockPoint->Type() == PCB_PAD_T ) { - pad = (D_PAD*) LockPoint; + pad = (D_PAD*) lockPoint; // A pad is found: put the starting point on pad center pos = pad->GetPosition(); @@ -137,9 +138,9 @@ TRACK* PCB_EDIT_FRAME::Begin_Route( TRACK* aTrack, wxDC* aDC ) } else // A track segment is found { - TrackOnStartPoint = (TRACK*) LockPoint; - GetBoard()->SetHighLightNet( TrackOnStartPoint->GetNetCode() ); - GetBoard()->CreateLockPoint( pos, TrackOnStartPoint, &s_ItemsListPicker ); + trackOnStartPoint = (TRACK*) lockPoint; + GetBoard()->SetHighLightNet( trackOnStartPoint->GetNetCode() ); + GetBoard()->CreateLockPoint( pos, trackOnStartPoint, &s_ItemsListPicker ); } } else @@ -158,7 +159,7 @@ TRACK* PCB_EDIT_FRAME::Begin_Route( TRACK* aTrack, wxDC* aDC ) DBG( g_CurrentTrackList.VerifyListIntegrity() ); - BuildAirWiresTargetsList( LockPoint, wxPoint( 0, 0 ), true ); + BuildAirWiresTargetsList( lockPoint, wxPoint( 0, 0 ), true ); DBG( g_CurrentTrackList.VerifyListIntegrity() ); @@ -174,8 +175,8 @@ TRACK* PCB_EDIT_FRAME::Begin_Route( TRACK* aTrack, wxDC* aDC ) if( GetDesignSettings().m_UseConnectedTrackWidth ) { - if( TrackOnStartPoint && TrackOnStartPoint->Type() == PCB_TRACE_T ) - g_CurrentTrackSegment->SetWidth( TrackOnStartPoint->GetWidth()); + if( trackOnStartPoint && trackOnStartPoint->Type() == PCB_TRACE_T ) + g_CurrentTrackSegment->SetWidth( trackOnStartPoint->GetWidth()); } g_CurrentTrackSegment->SetStart( pos ); @@ -414,7 +415,7 @@ bool PCB_EDIT_FRAME::Add45DegreeSegment( wxDC* aDC ) bool PCB_EDIT_FRAME::End_Route( TRACK* aTrack, wxDC* aDC ) { - LAYER_MSK layerMask = GetLayerMask( GetScreen()->m_Active_Layer ); + LSET layerMask( GetScreen()->m_Active_Layer ); if( aTrack == NULL ) return false; @@ -451,20 +452,20 @@ bool PCB_EDIT_FRAME::End_Route( TRACK* aTrack, wxDC* aDC ) * This helps to reduce the computing time */ // Attaching the end point of the new track to a pad or a track - BOARD_CONNECTED_ITEM* LockPoint = GetBoard()->GetLockPoint( pos, layerMask ); + BOARD_CONNECTED_ITEM* lockPoint = GetBoard()->GetLockPoint( pos, layerMask ); - if( LockPoint ) + if( lockPoint ) { - if( LockPoint->Type() == PCB_PAD_T ) // End of track is on a pad. + if( lockPoint->Type() == PCB_PAD_T ) // End of track is on a pad. { - EnsureEndTrackOnPad( (D_PAD*) LockPoint ); + EnsureEndTrackOnPad( (D_PAD*) lockPoint ); } else // If end point of is on a different track, // creates a lock point if not exists { // Creates a lock point, if not already exists: wxPoint hp = g_CurrentTrackSegment->GetEnd(); - LockPoint = GetBoard()->CreateLockPoint( hp, (TRACK*) LockPoint, &s_ItemsListPicker ); + lockPoint = GetBoard()->CreateLockPoint( hp, (TRACK*) lockPoint, &s_ItemsListPicker ); g_CurrentTrackSegment->SetEnd(hp); } } @@ -1009,7 +1010,7 @@ void DeleteNullTrackSegments( BOARD* pcb, DLIST& aTrackList ) TRACK* firsttrack = track; TRACK* oldtrack; - BOARD_CONNECTED_ITEM* LockPoint = track->start; + BOARD_CONNECTED_ITEM* lockPoint = track->start; while( track != NULL ) { @@ -1047,9 +1048,9 @@ void DeleteNullTrackSegments( BOARD* pcb, DLIST& aTrackList ) oldtrack->SetStatus( 0 ); } - firsttrack->start = LockPoint; + firsttrack->start = lockPoint; - if( LockPoint && LockPoint->Type()==PCB_PAD_T ) + if( lockPoint && lockPoint->Type()==PCB_PAD_T ) firsttrack->SetState( BEGIN_ONPAD, true ); track = firsttrack; @@ -1057,16 +1058,16 @@ void DeleteNullTrackSegments( BOARD* pcb, DLIST& aTrackList ) while( track != NULL ) { TRACK* next_track = track->Next(); - LockPoint = pcb->GetPad( track, ENDPOINT_END ); + lockPoint = pcb->GetPad( track, ENDPOINT_END ); - if( LockPoint ) + if( lockPoint ) { - track->end = LockPoint; + track->end = lockPoint; track->SetState( END_ONPAD, true ); if( next_track ) { - next_track->start = LockPoint; + next_track->start = lockPoint; next_track->SetState( BEGIN_ONPAD, true ); } } diff --git a/pcbnew/exporters/export_d356.cpp b/pcbnew/exporters/export_d356.cpp index f75dfbdeba..2c3d433873 100644 --- a/pcbnew/exporters/export_d356.cpp +++ b/pcbnew/exporters/export_d356.cpp @@ -69,34 +69,32 @@ struct D356_RECORD }; // Compute the access code for a pad. Returns -1 if there is no copper -static int compute_pad_access_code( BOARD *aPcb, LAYER_MSK aLayerMask ) +static int compute_pad_access_code( BOARD *aPcb, LSET aLayerMask ) { // Non-copper is not interesting here - aLayerMask &= ALL_CU_LAYERS; - if( aLayerMask == 0 ) + aLayerMask &= LSET::AllCuMask(); + if( !aLayerMask.any() ) return -1; // Traditional TH pad - if( (aLayerMask & LAYER_FRONT) && (aLayerMask & LAYER_BACK) ) + if( aLayerMask[F_Cu] && aLayerMask[B_Cu] ) return 0; // Front SMD pad - if( (aLayerMask & LAYER_FRONT) ) + if( aLayerMask[F_Cu] ) return 1; // Back SMD pad - if( (aLayerMask & LAYER_BACK) ) + if( aLayerMask[B_Cu] ) return aPcb->GetCopperLayerCount(); // OK, we have an inner-layer only pad (and I have no idea about // what could be used for); anyway, find the first copper layer // it's on - for (LAYER_NUM scan_layer = LAYER_N_2; - scan_layer < LAYER_N_BACK; - ++scan_layer) + for( LAYER_NUM layer = In1_Cu; layer < B_Cu; ++layer ) { - if( GetLayerMask( scan_layer ) & aLayerMask ) - return scan_layer + 1; + if( aLayerMask[layer] ) + return layer + 1; } // This shouldn't happen @@ -119,12 +117,12 @@ static void build_pad_testpoints( BOARD *aPcb, wxPoint origin = aPcb->GetAuxOrigin(); for( MODULE *module = aPcb->m_Modules; - module != NULL; module = module->Next() ) + module; module = module->Next() ) { - for( D_PAD *pad = module->Pads(); pad != NULL; pad = pad->Next() ) + for( D_PAD *pad = module->Pads(); pad; pad = pad->Next() ) { D356_RECORD rk; - rk.access = compute_pad_access_code( aPcb, pad->GetLayerMask() ); + rk.access = compute_pad_access_code( aPcb, pad->GetLayerSet() ); // It could be a mask only pad, we only handle pads with copper here if( rk.access != -1 ) @@ -153,9 +151,9 @@ static void build_pad_testpoints( BOARD *aPcb, // the value indicates which sides are *not* accessible rk.soldermask = 3; - if( pad->GetLayerMask() & SOLDERMASK_LAYER_FRONT) + if( pad->GetLayerSet()[F_Mask] ) rk.soldermask &= ~1; - if( pad->GetLayerMask() & SOLDERMASK_LAYER_BACK) + if( pad->GetLayerSet()[B_Mask] ) rk.soldermask &= ~2; aRecords.push_back( rk ); @@ -171,15 +169,15 @@ static int via_access_code( BOARD *aPcb, int top_layer, int bottom_layer ) { // Easy case for through vias: top_layer is component, bottom_layer is // solder, access code is 0 - if( (top_layer == LAYER_N_FRONT) && (bottom_layer == LAYER_N_BACK) ) + if( (top_layer == F_Cu) && (bottom_layer == B_Cu) ) return 0; // Blind via, reachable from front - if( top_layer == LAYER_N_FRONT ) + if( top_layer == F_Cu ) return 1; // Blind via, reachable from bottom - if( bottom_layer == LAYER_N_BACK ) + if( bottom_layer == B_Cu ) return aPcb->GetCopperLayerCount(); // It's a buried via, accessible from some inner layer @@ -194,7 +192,7 @@ static void build_via_testpoints( BOARD *aPcb, wxPoint origin = aPcb->GetAuxOrigin(); // Enumerate all the track segments and keep the vias - for( TRACK *track = aPcb->m_Track; track != NULL; track = track->Next() ) + for( TRACK *track = aPcb->m_Track; track; track = track->Next() ) { if( track->Type() == PCB_VIA_T ) { @@ -213,8 +211,11 @@ static void build_via_testpoints( BOARD *aPcb, rk.midpoint = true; // Vias are always midpoints rk.drill = via->GetDrillValue(); rk.mechanical = false; - LAYER_NUM top_layer, bottom_layer; + + LAYER_ID top_layer, bottom_layer; + via->LayerPair( &top_layer, &bottom_layer ); + rk.access = via_access_code( aPcb, top_layer, bottom_layer ); rk.x_location = via->GetPosition().x - origin.x; rk.y_location = origin.y - via->GetPosition().y; diff --git a/pcbnew/exporters/export_gencad.cpp b/pcbnew/exporters/export_gencad.cpp index c1895cbc7b..4f54a9d587 100644 --- a/pcbnew/exporters/export_gencad.cpp +++ b/pcbnew/exporters/export_gencad.cpp @@ -59,8 +59,10 @@ static void CreateShapesSection( FILE* aFile, BOARD* aPcb ); static void CreatePadsShapesSection( FILE* aFile, BOARD* aPcb ); static void FootprintWriteShape( FILE* File, MODULE* module ); -// layer name for Gencad export -static const wxString GenCADLayerName[32] = +// layer names for Gencad export + +#if 0 // was: +static const wxString GenCADLayerName[] = { wxT( "BOTTOM" ), wxT( "INNER1" ), wxT( "INNER2" ), wxT( "INNER3" ), wxT( "INNER4" ), wxT( "INNER5" ), @@ -93,6 +95,140 @@ static const wxString GenCADLayerNameFlipped[32] = wxT( "LAYER32" ) }; +#else + +static std::string GenCADLayerName( int aCuCount, LAYER_ID aId ) +{ + char tmp[60]; + + if( IsCopperLayer( aId ) ) + { + if( aId == F_Cu ) + return "TOP"; + else if( aId == B_Cu ) + return "BOTTON"; + + else if( aId <= 14 ) + { + int len = sprintf( tmp, "INNER%d", aCuCount - aId ); + return std::string( tmp, len ); + } + else + { + int len = sprintf( tmp, "LAYER%d", aId ); + return std::string( tmp, len ); + } + } + + else + { + const char* txt; + + // using a switch to clearly show mapping & catch out of bounds index. + switch( aId ) + { + // Technicals + case B_Adhes: txt = "B.Adhes"; break; + case F_Adhes: txt = "F.Adhes"; break; + case B_Paste: txt = "SOLDERPASTE_BOTTOM"; break; + case F_Paste: txt = "SOLDERPASTE_TOP"; break; + case B_SilkS: txt = "SILKSCREEN_BOTTOM"; break; + case F_SilkS: txt = "SILKSCREEN_TOP"; break; + case B_Mask: txt = "SOLDERMASK_BOTTOM"; break; + case F_Mask: txt = "SOLDERMASK_TOP"; break; + + // Users + case Dwgs_User: txt = "Dwgs.User"; break; + case Cmts_User: txt = "Cmts.User"; break; + case Eco1_User: txt = "Eco1.User"; break; + case Eco2_User: txt = "Eco2.User"; break; + case Edge_Cuts: txt = "Edge.Cuts"; break; + case Margin: txt = "Margin"; break; + + // Footprint + case F_CrtYd: txt = "F_CrtYd"; break; + case B_CrtYd: txt = "B_CrtYd"; break; + case F_Fab: txt = "F_Fab"; break; + case B_Fab: txt = "B_Fab"; break; + + default: + wxASSERT_MSG( 0, wxT( "aId UNEXPECTED" ) ); + txt = "BAD-INDEX!"; break; + } + + return txt; + } +}; + + +// flipped layer name for Gencad export (to make CAM350 imports correct) +static std::string GenCADLayerNameFlipped( int aCuCount, LAYER_ID aId ) +{ + char tmp[60]; + + if( IsCopperLayer( aId ) ) + { + if( aId == F_Cu ) + return "BOTTOM"; + else if( aId == B_Cu ) + return "TOP"; + + else if( aId <= 14 ) + { + int len = sprintf( tmp, "INNER%d", aId ); + return std::string( tmp, len ); + } + else + { + int len = sprintf( tmp, "LAYER%d", aId ); // this is probably wrong, need help. + return std::string( tmp, len ); + } + } + + else + { + const char* txt; + + // using a switch to clearly show mapping & catch out of bounds index. + switch( aId ) + { + // Technicals + case F_Adhes: txt = "B.Adhes"; break; + case B_Adhes: txt = "F.Adhes"; break; + case F_Paste: txt = "SOLDERPASTE_BOTTOM"; break; + case B_Paste: txt = "SOLDERPASTE_TOP"; break; + case F_SilkS: txt = "SILKSCREEN_BOTTOM"; break; + case B_SilkS: txt = "SILKSCREEN_TOP"; break; + case F_Mask: txt = "SOLDERMASK_BOTTOM"; break; + case B_Mask: txt = "SOLDERMASK_TOP"; break; + + // Users + case Dwgs_User: txt = "Dwgs.User"; break; + case Cmts_User: txt = "Cmts.User"; break; + case Eco1_User: txt = "Eco1.User"; break; + case Eco2_User: txt = "Eco2.User"; break; + case Edge_Cuts: txt = "Edge.Cuts"; break; + case Margin: txt = "Margin"; break; + + // Footprint + case B_CrtYd: txt = "F_CrtYd"; break; + case F_CrtYd: txt = "B_CrtYd"; break; + case B_Fab: txt = "F_Fab"; break; + case F_Fab: txt = "B_Fab"; break; + + default: + wxASSERT_MSG( 0, wxT( "aId UNEXPECTED" ) ); + txt = "BAD-INDEX!"; break; + } + + return txt; + } +}; + + +#endif + + // These are the export origin (the auxiliary axis) static int GencadOffsetX, GencadOffsetY; @@ -119,12 +255,12 @@ static double MapYTo( int aY ) /* Driver function: processing starts here */ void PCB_EDIT_FRAME::ExportToGenCAD( wxCommandEvent& aEvent ) { - wxFileName fn = GetBoard()->GetFileName(); - wxString msg, ext, wildcard; - FILE* file; + wxFileName fn = GetBoard()->GetFileName(); + FILE* file; + + wxString ext = wxT( "cad" ); + wxString wildcard = _( "GenCAD 1.4 board files (.cad)|*.cad" ); - ext = wxT( "cad" ); - wildcard = _( "GenCAD 1.4 board files (.cad)|*.cad" ); fn.SetExt( ext ); wxFileDialog dlg( this, _( "Save GenCAD Board File" ), wxGetCwd(), @@ -136,6 +272,8 @@ void PCB_EDIT_FRAME::ExportToGenCAD( wxCommandEvent& aEvent ) if( ( file = wxFopen( dlg.GetPath(), wxT( "wt" ) ) ) == NULL ) { + wxString msg; + msg.Printf( _( "Unable to create <%s>" ), GetChars( dlg.GetPath() ) ); DisplayError( this, msg ); return; } @@ -161,11 +299,11 @@ void PCB_EDIT_FRAME::ExportToGenCAD( wxCommandEvent& aEvent ) BOARD* pcb = GetBoard(); MODULE* module; - for( module = pcb->m_Modules; module != NULL; module = module->Next() ) + for( module = pcb->m_Modules; module; module = module->Next() ) { module->SetFlag( 0 ); - if( module->GetLayer() == LAYER_N_BACK ) + if( module->GetLayer() == B_Cu ) { module->Flip( module->GetPosition() ); module->SetFlag( 1 ); @@ -198,7 +336,7 @@ void PCB_EDIT_FRAME::ExportToGenCAD( wxCommandEvent& aEvent ) SetLocaleTo_Default(); // revert to the current locale // Undo the footprints modifications (flipped footprints) - for( module = pcb->m_Modules; module != NULL; module = module->Next() ) + for( module = pcb->m_Modules; module; module = module->Next() ) { if( module->GetFlag() ) { @@ -231,8 +369,8 @@ static int ViaSort( const void* aRefptr, const void* aObjptr ) if( padref->GetDrillValue() != padcmp->GetDrillValue() ) return padref->GetDrillValue() - padcmp->GetDrillValue(); - if( padref->GetLayerMask() != padcmp->GetLayerMask() ) - return padref->GetLayerMask() - padcmp->GetLayerMask(); + if( padref->GetLayerSet() != padcmp->GetLayerSet() ) + return padref->GetLayerSet().FmtBin().compare( padcmp->GetLayerSet().FmtBin() ); return 0; } @@ -253,12 +391,14 @@ static void CreatePadsShapesSection( FILE* aFile, BOARD* aPcb ) { std::vector pads; std::vector padstacks; - std::vector vias; - std::vector viastacks; + std::vector vias; + std::vector viastacks; + padstacks.resize( 1 ); // We count pads from 1 // The master layermask (i.e. the enabled layers) for padstack generation - LAYER_MSK master_layermask = aPcb->GetDesignSettings().GetEnabledLayers(); + LSET master_layermask = aPcb->GetDesignSettings().GetEnabledLayers(); + int cu_count = aPcb->GetCopperLayerCount(); fputs( "$PADS\n", aFile ); @@ -271,7 +411,7 @@ static void CreatePadsShapesSection( FILE* aFile, BOARD* aPcb ) } // The same for vias - for( VIA* via = GetFirstVia( aPcb->m_Track ); via != NULL; + for( VIA* via = GetFirstVia( aPcb->m_Track ); via; via = GetFirstVia( via->Next() ) ) { vias.push_back( via ); @@ -289,9 +429,9 @@ static void CreatePadsShapesSection( FILE* aFile, BOARD* aPcb ) old_via = via; viastacks.push_back( via ); - fprintf( aFile, "PAD V%d.%d.%X ROUND %g\nCIRCLE 0 0 %g\n", + fprintf( aFile, "PAD V%d.%d.%s ROUND %g\nCIRCLE 0 0 %g\n", via->GetWidth(), via->GetDrillValue(), - via->GetLayerMask(), + via->GetLayerSet().FmtHex().c_str(), via->GetDrillValue() / SCALE_FACTOR, via->GetWidth() / (SCALE_FACTOR * 2) ); } @@ -299,6 +439,7 @@ static void CreatePadsShapesSection( FILE* aFile, BOARD* aPcb ) // Emit component pads D_PAD* old_pad = 0; int pad_name_number = 0; + for( unsigned i = 0; iGetLayerMask() & master_layermask; - fprintf( aFile, "PADSTACK VIA%d.%d.%X %g\n", - via->GetWidth(), via->GetDrillValue(), mask, + + LSET mask = via->GetLayerSet() & master_layermask; + + fprintf( aFile, "PADSTACK VIA%d.%d.%s %g\n", + via->GetWidth(), via->GetDrillValue(), + mask.FmtHex().c_str(), via->GetDrillValue() / SCALE_FACTOR ); - for( LAYER_NUM layer = FIRST_LAYER; layer < NB_LAYERS; ++layer ) + for( LSEQ seq = mask.Seq(); seq; ++seq ) { - if( mask & GetLayerMask( layer ) ) - { - fprintf( aFile, "PAD V%d.%d.%X %s 0 0\n", - via->GetWidth(), via->GetDrillValue(), - mask, - TO_UTF8( GenCADLayerName[layer] ) ); - } + LAYER_ID layer = *seq; + + fprintf( aFile, "PAD V%d.%d.%s %s 0 0\n", + via->GetWidth(), via->GetDrillValue(), + mask.FmtHex().c_str(), + GenCADLayerName( cu_count, layer ).c_str() + ); } } @@ -459,27 +603,25 @@ static void CreatePadsShapesSection( FILE* aFile, BOARD* aPcb ) D_PAD* pad = padstacks[i]; // Straight padstack - fprintf( aFile, "PADSTACK PAD%d %g\n", i, - pad->GetDrillSize().x / SCALE_FACTOR ); - for( LAYER_NUM layer = FIRST_LAYER; layer < NB_LAYERS; ++layer ) + fprintf( aFile, "PADSTACK PAD%d %g\n", i, pad->GetDrillSize().x / SCALE_FACTOR ); + + LSET pad_set = pad->GetLayerSet() & master_layermask; + + for( LSEQ seq = pad_set.Seq(); seq; ++seq ) { - if( pad->GetLayerMask() & GetLayerMask( layer ) & master_layermask ) - { - fprintf( aFile, "PAD P%d %s 0 0\n", i, - TO_UTF8( GenCADLayerName[layer] ) ); - } + LAYER_ID layer = *seq; + + fprintf( aFile, "PAD P%d %s 0 0\n", i, GenCADLayerName( cu_count, layer ).c_str() ); } // Flipped padstack - fprintf( aFile, "PADSTACK PAD%dF %g\n", i, - pad->GetDrillSize().x / SCALE_FACTOR ); - for( LAYER_NUM layer = FIRST_LAYER; layer < NB_LAYERS; ++layer ) + fprintf( aFile, "PADSTACK PAD%dF %g\n", i, pad->GetDrillSize().x / SCALE_FACTOR ); + + for( LSEQ seq = pad_set.Seq(); seq; ++seq ) { - if( pad->GetLayerMask() & GetLayerMask( layer ) & master_layermask ) - { - fprintf( aFile, "PAD P%d %s 0 0\n", i, - TO_UTF8( GenCADLayerNameFlipped[layer] ) ); - } + LAYER_ID layer = *seq; + + fprintf( aFile, "PAD P%d %s 0 0\n", i, GenCADLayerNameFlipped( cu_count, layer ).c_str() ); } } @@ -501,11 +643,13 @@ static void CreateShapesSection( FILE* aFile, BOARD* aPcb ) fputs( "$SHAPES\n", aFile ); - for( module = aPcb->m_Modules; module != NULL; module = module->Next() ) + const LSET all_cu = LSET::AllCuMask(); + + for( module = aPcb->m_Modules; module; module = module->Next() ) { FootprintWriteShape( aFile, module ); - for( pad = module->Pads(); pad != NULL; pad = pad->Next() ) + for( pad = module->Pads(); pad; pad = pad->Next() ) { /* Funny thing: GenCAD requires the pad side even if you use * padstacks (which are theorically optional but gerbtools @@ -514,13 +658,13 @@ static void CreateShapesSection( FILE* aFile, BOARD* aPcb ) * if the spec explicitly says it's not... */ layer = "ALL"; - if( ( pad->GetLayerMask() & ALL_CU_LAYERS ) == LAYER_BACK ) + if( ( pad->GetLayerSet() & all_cu ) == LSET( B_Cu ) ) { - layer = ( module->GetFlag() ) ? "TOP" : "BOTTOM"; + layer = module->GetFlag() ? "TOP" : "BOTTOM"; } - else if( ( pad->GetLayerMask() & ALL_CU_LAYERS ) == LAYER_FRONT ) + else if( ( pad->GetLayerSet() & all_cu ) == LSET( F_Cu ) ) { - layer = ( module->GetFlag() ) ? "BOTTOM" : "TOP"; + layer = module->GetFlag() ? "BOTTOM" : "TOP"; } pad->StringPadName( pinname ); @@ -555,7 +699,9 @@ static void CreateComponentsSection( FILE* aFile, BOARD* aPcb ) { fputs( "$COMPONENTS\n", aFile ); - for( MODULE* module = aPcb->m_Modules; module != NULL; module = module->Next() ) + int cu_count = aPcb->GetCopperLayerCount(); + + for( MODULE* module = aPcb->m_Modules; module; module = module->Next() ) { TEXTE_MODULE* textmod; const char* mirror; @@ -595,9 +741,8 @@ static void CreateComponentsSection( FILE* aFile, BOARD* aPcb ) for( int ii = 0; ii < 2; ii++ ) { - double orient = textmod->GetOrientation(); - wxString layer = GenCADLayerName[(module->GetFlag()) ? - SILKSCREEN_N_BACK : SILKSCREEN_N_FRONT]; + double orient = textmod->GetOrientation(); + std::string layer = GenCADLayerName( cu_count, module->GetFlag() ? B_SilkS : F_SilkS ); fprintf( aFile, "TEXT %g %g %g %g %s %s \"%s\"", textmod->GetPos0().x / SCALE_FACTOR, @@ -605,7 +750,7 @@ static void CreateComponentsSection( FILE* aFile, BOARD* aPcb ) textmod->GetSize().x / SCALE_FACTOR, orient / 10.0, mirror, - TO_UTF8( layer ), + layer.c_str(), TO_UTF8( textmod->GetText() ) ); // Please note, the width is approx @@ -655,9 +800,9 @@ static void CreateSignalsSection( FILE* aFile, BOARD* aPcb ) fputs( TO_UTF8( msg ), aFile ); fputs( "\n", aFile ); - for( module = aPcb->m_Modules; module != NULL; module = module->Next() ) + for( module = aPcb->m_Modules; module; module = module->Next() ) { - for( pad = module->Pads(); pad != NULL; pad = pad->Next() ) + for( pad = module->Pads(); pad; pad = pad->Next() ) { wxString padname; @@ -752,19 +897,21 @@ static int TrackListSortByNetcode( const void* refptr, const void* objptr ) */ static void CreateRoutesSection( FILE* aFile, BOARD* aPcb ) { - TRACK* track, ** tracklist; - int vianum = 1; - int old_netcode, old_width, old_layer; - int nbitems, ii; - LAYER_MSK master_layermask = aPcb->GetDesignSettings().GetEnabledLayers(); + TRACK* track, ** tracklist; + int vianum = 1; + int old_netcode, old_width, old_layer; + int nbitems, ii; + LSET master_layermask = aPcb->GetDesignSettings().GetEnabledLayers(); + + int cu_count = aPcb->GetCopperLayerCount(); // Count items nbitems = 0; - for( track = aPcb->m_Track; track != NULL; track = track->Next() ) + for( track = aPcb->m_Track; track; track = track->Next() ) nbitems++; - for( track = aPcb->m_Zone; track != NULL; track = track->Next() ) + for( track = aPcb->m_Zone; track; track = track->Next() ) { if( track->Type() == PCB_ZONE_T ) nbitems++; @@ -774,10 +921,10 @@ static void CreateRoutesSection( FILE* aFile, BOARD* aPcb ) nbitems = 0; - for( track = aPcb->m_Track; track != NULL; track = track->Next() ) + for( track = aPcb->m_Track; track; track = track->Next() ) tracklist[nbitems++] = track; - for( track = aPcb->m_Zone; track != NULL; track = track->Next() ) + for( track = aPcb->m_Zone; track; track = track->Next() ) { if( track->Type() == PCB_ZONE_T ) tracklist[nbitems++] = track; @@ -821,19 +968,24 @@ static void CreateRoutesSection( FILE* aFile, BOARD* aPcb ) { old_layer = track->GetLayer(); fprintf( aFile, "LAYER %s\n", - TO_UTF8( GenCADLayerName[track->GetLayer() & 0x1F] ) ); + GenCADLayerName( cu_count, track->GetLayer() ).c_str() + ); } fprintf( aFile, "LINE %g %g %g %g\n", MapXTo( track->GetStart().x ), MapYTo( track->GetStart().y ), MapXTo( track->GetEnd().x ), MapYTo( track->GetEnd().y ) ); } + if( track->Type() == PCB_VIA_T ) { - const VIA *via = static_cast(track); - fprintf( aFile, "VIA VIA%d.%d.%X %g %g ALL %g via%d\n", + const VIA* via = static_cast(track); + + LSET vset = via->GetLayerSet() & master_layermask; + + fprintf( aFile, "VIA VIA%d.%d.%s %g %g ALL %g via%d\n", via->GetWidth(), via->GetDrillValue(), - via->GetLayerMask() & master_layermask, + vset.FmtHex().c_str(), MapXTo( via->GetStart().x ), MapYTo( via->GetStart().y ), via->GetDrillValue() / SCALE_FACTOR, vianum++ ); } @@ -855,7 +1007,7 @@ static void CreateDevicesSection( FILE* aFile, BOARD* aPcb ) fputs( "$DEVICES\n", aFile ); - for( module = aPcb->m_Modules; module != NULL; module = module->Next() ) + for( module = aPcb->m_Modules; module; module = module->Next() ) { fprintf( aFile, "DEVICE \"%s\"\n", TO_UTF8( module->GetReference() ) ); fprintf( aFile, "PART \"%s\"\n", TO_UTF8( module->GetValue() ) ); @@ -892,7 +1044,7 @@ static void CreateBoardSection( FILE* aFile, BOARD* aPcb ) if( drawing->Type() == PCB_LINE_T ) { DRAWSEGMENT* drawseg = dynamic_cast( drawing ); - if( drawseg->GetLayer() == EDGE_N ) + if( drawseg->GetLayer() == Edge_Cuts ) { // XXX GenCAD supports arc boundaries but I've seen nothing that reads them fprintf( aFile, "LINE %g %g %g %g\n", @@ -928,7 +1080,7 @@ static void CreateTracksInfoData( FILE* aFile, BOARD* aPcb ) unsigned ii; - for( track = aPcb->m_Track; track != NULL; track = track->Next() ) + for( track = aPcb->m_Track; track; track = track->Next() ) { if( last_width != track->GetWidth() ) // Find a thickness already used. { @@ -945,7 +1097,7 @@ static void CreateTracksInfoData( FILE* aFile, BOARD* aPcb ) } } - for( track = aPcb->m_Zone; track != NULL; track = track->Next() ) + for( track = aPcb->m_Zone; track; track = track->Next() ) { if( last_width != track->GetWidth() ) // Find a thickness already used. { @@ -1032,7 +1184,7 @@ static void FootprintWriteShape( FILE* aFile, MODULE* module ) // CAM350 read it right but only closed shapes // ProntoPlace double-flip it (at least the pads are correct) // GerberTool usually get it right... - for( PtStruct = module->GraphicalItems(); PtStruct != NULL; PtStruct = PtStruct->Next() ) + for( PtStruct = module->GraphicalItems(); PtStruct; PtStruct = PtStruct->Next() ) { switch( PtStruct->Type() ) { @@ -1043,8 +1195,8 @@ static void FootprintWriteShape( FILE* aFile, MODULE* module ) case PCB_MODULE_EDGE_T: PtEdge = (EDGE_MODULE*) PtStruct; - if( PtEdge->GetLayer() == SILKSCREEN_N_FRONT - || PtEdge->GetLayer() == SILKSCREEN_N_BACK ) + if( PtEdge->GetLayer() == F_SilkS + || PtEdge->GetLayer() == B_SilkS ) { switch( PtEdge->GetShape() ) { diff --git a/pcbnew/exporters/export_idf.cpp b/pcbnew/exporters/export_idf.cpp index 64242e77d4..d77e20d573 100644 --- a/pcbnew/exporters/export_idf.cpp +++ b/pcbnew/exporters/export_idf.cpp @@ -67,7 +67,7 @@ static void idf_export_outline( BOARD* aPcb, IDF3_BOARD& aIDFBoard ) // Retrieve segments and arcs from the board for( BOARD_ITEM* item = aPcb->m_Drawings; item; item = item->Next() ) { - if( item->Type() != PCB_LINE_T || item->GetLayer() != EDGE_N ) + if( item->Type() != PCB_LINE_T || item->GetLayer() != Edge_Cuts ) continue; graphic = (DRAWSEGMENT*) item; @@ -250,7 +250,7 @@ static void idf_export_module( BOARD* aPcb, MODULE* aModule, // for( EDA_ITEM* item = aModule->GraphicalItems(); item != NULL; item = item->Next() ) // { // if( ( item->Type() != PCB_MODULE_EDGE_T ) - // || (item->GetLayer() != EDGE_N ) ) continue; + // || (item->GetLayer() != Edge_Cuts ) ) continue; // code to export cutouts // } @@ -378,7 +378,7 @@ static void idf_export_module( BOARD* aPcb, MODULE* aModule, double locz = modfile->m_MatPosition.z; double lrot = modfile->m_MatRotation.z; - bool top = ( aModule->GetLayer() == LAYER_N_BACK ) ? false : true; + bool top = ( aModule->GetLayer() == B_Cu ) ? false : true; if( top ) { @@ -481,7 +481,7 @@ static void idf_export_module( BOARD* aPcb, MODULE* aModule, ostr << "TOP"; else ostr << "BOTTOM"; - + throw( std::runtime_error( ostr.str() ) ); } } diff --git a/pcbnew/exporters/export_vrml.cpp b/pcbnew/exporters/export_vrml.cpp index 5b8de962d1..faedd362b6 100644 --- a/pcbnew/exporters/export_vrml.cpp +++ b/pcbnew/exporters/export_vrml.cpp @@ -166,12 +166,11 @@ enum VRML_COLOR_INDEX class MODEL_VRML { private: + double layer_z[LAYER_ID_COUNT]; + VRML_COLOR colors[VRML_COLOR_LAST]; - double layer_z[NB_LAYERS]; - VRML_COLOR colors[VRML_COLOR_LAST]; - - int iMaxSeg; // max. sides to a small circle - double arcMinLen, arcMaxLen; // min and max lengths of an arc chord + int iMaxSeg; // max. sides to a small circle + double arcMinLen, arcMaxLen; // min and max lengths of an arc chord public: @@ -198,7 +197,7 @@ public: MODEL_VRML() { - for( int i = 0; i < NB_LAYERS; ++i ) + for( unsigned i = 0; i < DIM( layer_z ); ++i ) layer_z[i] = 0; holes.GetArcParams( iMaxSeg, arcMinLen, arcMaxLen ); @@ -235,7 +234,7 @@ public: double GetLayerZ( LAYER_NUM aLayer ) { - if( aLayer >= NB_LAYERS ) + if( unsigned( aLayer ) >= DIM( layer_z ) ) return 0; return layer_z[ aLayer ]; @@ -294,19 +293,19 @@ static bool GetLayer( MODEL_VRML& aModel, LAYER_NUM layer, VRML_LAYER** vlayer ) { switch( layer ) { - case FIRST_COPPER_LAYER: + case B_Cu: *vlayer = &aModel.bot_copper; break; - case LAST_COPPER_LAYER: + case F_Cu: *vlayer = &aModel.top_copper; break; - case SILKSCREEN_N_BACK: + case B_SilkS: *vlayer = &aModel.bot_silk; break; - case SILKSCREEN_N_FRONT: + case F_SilkS: *vlayer = &aModel.top_silk; break; @@ -431,13 +430,13 @@ static void write_layers( MODEL_VRML& aModel, std::ofstream& output_file, BOARD* aModel.top_copper.Tesselate( &aModel.holes ); write_triangle_bag( output_file, aModel.GetColor( VRML_COLOR_TRACK ), &aModel.top_copper, true, true, - aModel.GetLayerZ( LAST_COPPER_LAYER ), 0, aModel.precision ); + aModel.GetLayerZ( F_Cu ), 0, aModel.precision ); // VRML_LAYER top_tin; aModel.top_tin.Tesselate( &aModel.holes ); write_triangle_bag( output_file, aModel.GetColor( VRML_COLOR_TIN ), &aModel.top_tin, true, true, - aModel.GetLayerZ( LAST_COPPER_LAYER ) + aModel.GetLayerZ( F_Cu ) + Millimeter2iu( ART_OFFSET / 2.0 ) * aModel.scale, 0, aModel.precision ); @@ -445,13 +444,13 @@ static void write_layers( MODEL_VRML& aModel, std::ofstream& output_file, BOARD* aModel.bot_copper.Tesselate( &aModel.holes ); write_triangle_bag( output_file, aModel.GetColor( VRML_COLOR_TRACK ), &aModel.bot_copper, true, false, - aModel.GetLayerZ( FIRST_COPPER_LAYER ), 0, aModel.precision ); + aModel.GetLayerZ( B_Cu ), 0, aModel.precision ); // VRML_LAYER bot_tin; aModel.bot_tin.Tesselate( &aModel.holes ); write_triangle_bag( output_file, aModel.GetColor( VRML_COLOR_TIN ), &aModel.bot_tin, true, false, - aModel.GetLayerZ( FIRST_COPPER_LAYER ) + aModel.GetLayerZ( B_Cu ) - Millimeter2iu( ART_OFFSET / 2.0 ) * aModel.scale, 0, aModel.precision ); @@ -459,13 +458,13 @@ static void write_layers( MODEL_VRML& aModel, std::ofstream& output_file, BOARD* aModel.top_silk.Tesselate( &aModel.holes ); write_triangle_bag( output_file, aModel.GetColor( VRML_COLOR_SILK ), &aModel.top_silk, true, true, - aModel.GetLayerZ( SILKSCREEN_N_FRONT ), 0, aModel.precision ); + aModel.GetLayerZ( F_SilkS ), 0, aModel.precision ); // VRML_LAYER bot_silk; aModel.bot_silk.Tesselate( &aModel.holes ); write_triangle_bag( output_file, aModel.GetColor( VRML_COLOR_SILK ), &aModel.bot_silk, true, false, - aModel.GetLayerZ( SILKSCREEN_N_BACK ), 0, aModel.precision ); + aModel.GetLayerZ( B_SilkS ), 0, aModel.precision ); } @@ -478,8 +477,10 @@ static void compute_layer_Zs( MODEL_VRML& aModel, BOARD* pcb ) double half_thickness = aModel.board_thickness / 2; // Compute each layer's Z value, more or less like the 3d view - for( LAYER_NUM i = FIRST_LAYER; i <= LAYER_N_FRONT; ++i ) + for( LSEQ seq = LSET::AllCuMask().Seq(); seq; ++seq ) { + LAYER_ID i = *seq; + if( i < copper_layers ) aModel.SetLayerZ( i, aModel.board_thickness * i / (copper_layers - 1) - half_thickness ); else @@ -489,19 +490,19 @@ static void compute_layer_Zs( MODEL_VRML& aModel, BOARD* pcb ) /* To avoid rounding interference, we apply an epsilon to each * successive layer */ double epsilon_z = Millimeter2iu( ART_OFFSET ) * aModel.scale; - aModel.SetLayerZ( SOLDERPASTE_N_BACK, -half_thickness - epsilon_z * 4 ); - aModel.SetLayerZ( ADHESIVE_N_BACK, -half_thickness - epsilon_z * 3 ); - aModel.SetLayerZ( SILKSCREEN_N_BACK, -half_thickness - epsilon_z * 2 ); - aModel.SetLayerZ( SOLDERMASK_N_BACK, -half_thickness - epsilon_z ); - aModel.SetLayerZ( SOLDERMASK_N_FRONT, half_thickness + epsilon_z ); - aModel.SetLayerZ( SILKSCREEN_N_FRONT, half_thickness + epsilon_z * 2 ); - aModel.SetLayerZ( ADHESIVE_N_FRONT, half_thickness + epsilon_z * 3 ); - aModel.SetLayerZ( SOLDERPASTE_N_FRONT, half_thickness + epsilon_z * 4 ); - aModel.SetLayerZ( DRAW_N, half_thickness + epsilon_z * 5 ); - aModel.SetLayerZ( COMMENT_N, half_thickness + epsilon_z * 6 ); - aModel.SetLayerZ( ECO1_N, half_thickness + epsilon_z * 7 ); - aModel.SetLayerZ( ECO2_N, half_thickness + epsilon_z * 8 ); - aModel.SetLayerZ( EDGE_N, 0 ); + aModel.SetLayerZ( B_Paste, -half_thickness - epsilon_z * 4 ); + aModel.SetLayerZ( B_Adhes, -half_thickness - epsilon_z * 3 ); + aModel.SetLayerZ( B_SilkS, -half_thickness - epsilon_z * 2 ); + aModel.SetLayerZ( B_Mask, -half_thickness - epsilon_z ); + aModel.SetLayerZ( F_Mask, half_thickness + epsilon_z ); + aModel.SetLayerZ( F_SilkS, half_thickness + epsilon_z * 2 ); + aModel.SetLayerZ( F_Adhes, half_thickness + epsilon_z * 3 ); + aModel.SetLayerZ( F_Paste, half_thickness + epsilon_z * 4 ); + aModel.SetLayerZ( Dwgs_User, half_thickness + epsilon_z * 5 ); + aModel.SetLayerZ( Cmts_User, half_thickness + epsilon_z * 6 ); + aModel.SetLayerZ( Eco1_User, half_thickness + epsilon_z * 7 ); + aModel.SetLayerZ( Eco2_User, half_thickness + epsilon_z * 8 ); + aModel.SetLayerZ( Edge_Cuts, 0 ); } @@ -594,7 +595,7 @@ static void export_vrml_drawsegment( MODEL_VRML& aModel, DRAWSEGMENT* drawseg ) double yf = drawseg->GetEnd().y * aModel.scale + aModel.ty; // Items on the edge layer are handled elsewhere; just return - if( layer == EDGE_N ) + if( layer == Edge_Cuts ) return; switch( drawseg->GetShape() ) @@ -685,10 +686,9 @@ static void export_vrml_drawings( MODEL_VRML& aModel, BOARD* pcb ) // draw graphic items for( EDA_ITEM* drawing = pcb->m_Drawings; drawing != 0; drawing = drawing->Next() ) { - LAYER_NUM layer = ( (DRAWSEGMENT*) drawing )->GetLayer(); + LAYER_ID layer = ( (DRAWSEGMENT*) drawing )->GetLayer(); - if( layer != FIRST_COPPER_LAYER && layer != LAST_COPPER_LAYER - && layer != SILKSCREEN_N_BACK && layer != SILKSCREEN_N_FRONT ) + if( layer != F_Cu && layer != B_Cu && layer != B_SilkS && layer != F_SilkS ) continue; switch( drawing->Type() ) @@ -805,11 +805,11 @@ static void export_round_padstack( MODEL_VRML& aModel, BOARD* pcb, LAYER_NUM bottom_layer, LAYER_NUM top_layer, double hole ) { - LAYER_NUM layer = top_layer; - bool thru = true; + LAYER_NUM layer = top_layer; + bool thru = true; // if not a thru hole do not put a hole in the board - if( top_layer != LAST_COPPER_LAYER || bottom_layer != FIRST_COPPER_LAYER ) + if( top_layer != F_Cu || bottom_layer != B_Cu ) thru = false; if( thru && hole > 0 ) @@ -817,7 +817,7 @@ static void export_round_padstack( MODEL_VRML& aModel, BOARD* pcb, while( 1 ) { - if( layer == FIRST_COPPER_LAYER ) + if( layer == B_Cu ) { aModel.bot_copper.AddCircle( x, -y, r ); @@ -825,7 +825,7 @@ static void export_round_padstack( MODEL_VRML& aModel, BOARD* pcb, aModel.bot_copper.AddCircle( x, -y, hole, true ); } - else if( layer == LAST_COPPER_LAYER ) + else if( layer == F_Cu ) { aModel.top_copper.AddCircle( x, -y, r ); @@ -844,8 +844,8 @@ static void export_round_padstack( MODEL_VRML& aModel, BOARD* pcb, static void export_vrml_via( MODEL_VRML& aModel, BOARD* pcb, const VIA* via ) { - double x, y, r, hole; - LAYER_NUM top_layer, bottom_layer; + double x, y, r, hole; + LAYER_ID top_layer, bottom_layer; hole = via->GetDrillValue() * aModel.scale / 2.0; r = via->GetWidth() * aModel.scale / 2.0; @@ -854,7 +854,7 @@ static void export_vrml_via( MODEL_VRML& aModel, BOARD* pcb, const VIA* via ) via->LayerPair( &top_layer, &bottom_layer ); // do not render a buried via - if( top_layer != LAST_COPPER_LAYER && bottom_layer != FIRST_COPPER_LAYER ) + if( top_layer != F_Cu && bottom_layer != B_Cu ) return; // Export the via padstack @@ -864,14 +864,13 @@ static void export_vrml_via( MODEL_VRML& aModel, BOARD* pcb, const VIA* via ) static void export_vrml_tracks( MODEL_VRML& aModel, BOARD* pcb ) { - for( TRACK* track = pcb->m_Track; track != NULL; track = track->Next() ) + for( TRACK* track = pcb->m_Track; track; track = track->Next() ) { if( track->Type() == PCB_VIA_T ) { export_vrml_via( aModel, pcb, (const VIA*) track ); } - else if( track->GetLayer() == FIRST_COPPER_LAYER - || track->GetLayer() == LAST_COPPER_LAYER ) + else if( track->GetLayer() == B_Cu || track->GetLayer() == F_Cu ) export_vrml_line( aModel, track->GetLayer(), track->GetStart().x * aModel.scale + aModel.tx, track->GetStart().y * aModel.scale + aModel.ty, @@ -1141,14 +1140,14 @@ static void export_vrml_pad( MODEL_VRML& aModel, BOARD* pcb, D_PAD* aPad ) } // The pad proper, on the selected layers - LAYER_MSK layer_mask = aPad->GetLayerMask(); + LSET layer_mask = aPad->GetLayerSet(); - if( layer_mask & LAYER_BACK ) + if( layer_mask[B_Cu] ) { export_vrml_padshape( aModel, &aModel.bot_tin, aPad ); } - if( layer_mask & LAYER_FRONT ) + if( layer_mask[F_Cu] ) { export_vrml_padshape( aModel, &aModel.top_tin, aPad ); } @@ -1209,7 +1208,7 @@ static void export_vrml_module( MODEL_VRML& aModel, BOARD* aPcb, MODULE* aModule export_vrml_text_module( &aModule->Value() ); // Export module edges - for( EDA_ITEM* item = aModule->GraphicalItems(); item != NULL; item = item->Next() ) + for( EDA_ITEM* item = aModule->GraphicalItems(); item; item = item->Next() ) { switch( item->Type() ) { @@ -1231,7 +1230,7 @@ static void export_vrml_module( MODEL_VRML& aModel, BOARD* aPcb, MODULE* aModule for( D_PAD* pad = aModule->Pads(); pad; pad = pad->Next() ) export_vrml_pad( aModel, aPcb, pad ); - bool isFlipped = aModule->GetLayer() == LAYER_N_BACK; + bool isFlipped = aModule->GetLayer() == B_Cu; // Export the object VRML model(s) for( S3D_MASTER* vrmlm = aModule->Models(); vrmlm; vrmlm = vrmlm->Next() ) diff --git a/pcbnew/exporters/gen_drill_report_files.cpp b/pcbnew/exporters/gen_drill_report_files.cpp index c378353e11..6c5ddb9dc9 100644 --- a/pcbnew/exporters/gen_drill_report_files.cpp +++ b/pcbnew/exporters/gen_drill_report_files.cpp @@ -168,7 +168,7 @@ bool EXCELLON_WRITER::GenDrillMapFile( const wxString& aFullFileName, // Draw items on edge layer (not all, only items useful for drill map BRDITEMS_PLOTTER itemplotter( plotter, m_pcb, plot_opts ); - itemplotter.SetLayerMask( EDGE_LAYER ); + itemplotter.SetLayerSet( Edge_Cuts ); for( EDA_ITEM* PtStruct = m_pcb->m_Drawings; PtStruct != NULL; PtStruct = PtStruct->Next() ) { @@ -283,8 +283,8 @@ bool EXCELLON_WRITER::GenDrillReportFile( const wxString& aFullFileName ) { unsigned totalHoleCount; char line[1024]; - LAYER_NUM layer1 = LAYER_N_BACK; - LAYER_NUM layer2 = LAYER_N_FRONT; + LAYER_NUM layer1 = B_Cu; + LAYER_NUM layer2 = F_Cu; bool gen_through_holes = true; bool gen_NPTH_holes = false; @@ -317,12 +317,12 @@ bool EXCELLON_WRITER::GenDrillReportFile( const wxString& aFullFileName ) else { // If this is the first partial hole list: print a title - if( layer1 == LAYER_N_BACK ) + if( layer1 == B_Cu ) fputs( "Drill report for buried and blind vias :\n\n", m_file ); sprintf( line, "Drill report for holes from layer %s to layer %s :\n", - TO_UTF8( m_pcb->GetLayerName( layer1 ) ), - TO_UTF8( m_pcb->GetLayerName( layer2 ) ) ); + TO_UTF8( m_pcb->GetLayerName( (LAYER_ID) layer1 ) ), + TO_UTF8( m_pcb->GetLayerName( (LAYER_ID) layer2 ) ) ); } fputs( line, m_file ); @@ -378,22 +378,23 @@ bool EXCELLON_WRITER::GenDrillReportFile( const wxString& aFullFileName ) continue; } - if( gen_through_holes ) + if( gen_through_holes ) { layer2 = layer1 + 1; } else { - if( layer2 >= LAYER_N_FRONT ) // no more layer pair to consider + if( layer2 >= F_Cu ) // no more layer pair to consider { gen_NPTH_holes = true; continue; } - ++layer1; ++layer2; // use next layer pair + ++layer1; + ++layer2; // use next layer pair if( layer2 == m_pcb->GetCopperLayerCount() - 1 ) - layer2 = LAYER_N_FRONT; // the last layer is always the + layer2 = F_Cu; // the last layer is always the // component layer } diff --git a/pcbnew/exporters/gen_modules_placefile.cpp b/pcbnew/exporters/gen_modules_placefile.cpp index 4507d65394..fd9cdebab3 100644 --- a/pcbnew/exporters/gen_modules_placefile.cpp +++ b/pcbnew/exporters/gen_modules_placefile.cpp @@ -57,7 +57,7 @@ public: MODULE* m_Module; // Link to the actual footprint wxString m_Reference; // Its schematic reference wxString m_Value; // Its schematic value - LAYER_NUM m_Layer; // its side (LAYER_N_BACK, or LAYER_N_FRONT) + LAYER_NUM m_Layer; // its side (B_Cu, or F_Cu) }; @@ -211,8 +211,8 @@ bool DIALOG_GEN_MODULE_POSITION::CreateFiles() fn = m_parent->GetBoard()->GetFileName(); fn.SetPath( GetOutputDirectory() ); - frontLayerName = brd->GetLayerName( LAYER_N_FRONT ); - backLayerName = brd->GetLayerName( LAYER_N_BACK ); + frontLayerName = brd->GetLayerName( F_Cu ); + backLayerName = brd->GetLayerName( B_Cu ); // Create the the Front or Top side placement file, // or the single file @@ -374,9 +374,9 @@ int PCB_EDIT_FRAME::DoGenFootprintsPositionFile( const wxString& aFullFileName, { if( aSide < 2 ) { - if( module->GetLayer() == LAYER_N_BACK && aSide == 1) + if( module->GetLayer() == B_Cu && aSide == 1) continue; - if( module->GetLayer() == LAYER_N_FRONT && aSide == 0) + if( module->GetLayer() == F_Cu && aSide == 0) continue; } @@ -429,9 +429,9 @@ int PCB_EDIT_FRAME::DoGenFootprintsPositionFile( const wxString& aFullFileName, { if( aSide < 2 ) { - if( module->GetLayer() == LAYER_N_BACK && aSide == 1) + if( module->GetLayer() == B_Cu && aSide == 1) continue; - if( module->GetLayer() == LAYER_N_FRONT && aSide == 0) + if( module->GetLayer() == F_Cu && aSide == 0) continue; } @@ -452,8 +452,8 @@ int PCB_EDIT_FRAME::DoGenFootprintsPositionFile( const wxString& aFullFileName, if( list.size() > 1 ) sort( list.begin(), list.end(), sortFPlist ); - wxString frontLayerName = GetBoard()->GetLayerName( LAYER_N_FRONT ); - wxString backLayerName = GetBoard()->GetLayerName( LAYER_N_BACK ); + wxString frontLayerName = GetBoard()->GetLayerName( F_Cu ); + wxString backLayerName = GetBoard()->GetLayerName( B_Cu ); // Switch the locale to standard C (needed to print floating point numbers) LOCALE_IO toggle; @@ -500,15 +500,15 @@ int PCB_EDIT_FRAME::DoGenFootprintsPositionFile( const wxString& aFullFileName, LAYER_NUM layer = list[ii].m_Module->GetLayer(); - wxASSERT( layer==LAYER_N_FRONT || layer==LAYER_N_BACK ); + wxASSERT( layer==F_Cu || layer==B_Cu ); - if( layer == LAYER_N_FRONT ) + if( layer == F_Cu ) { strcat( line, TO_UTF8( frontLayerName ) ); strcat( line, "\n" ); fputs( line, file ); } - else if( layer == LAYER_N_BACK ) + else if( layer == B_Cu ) { strcat( line, TO_UTF8( backLayerName ) ); strcat( line, "\n" ); @@ -654,9 +654,9 @@ bool PCB_EDIT_FRAME::DoGenFootprintsReport( const wxString& aFullFilename, bool sprintf( line, "orientation %.2f\n", Module->GetOrientation() / 10.0 ); - if( Module->GetLayer() == LAYER_N_FRONT ) + if( Module->GetLayer() == F_Cu ) strcat( line, "layer component\n" ); - else if( Module->GetLayer() == LAYER_N_BACK ) + else if( Module->GetLayer() == B_Cu ) strcat( line, "layer copper\n" ); else strcat( line, "layer other\n" ); @@ -697,10 +697,10 @@ bool PCB_EDIT_FRAME::DoGenFootprintsReport( const wxString& aFullFilename, bool int layer = 0; - if( pad->GetLayerMask() & LAYER_BACK ) + if( pad->GetLayerSet()[B_Cu] ) layer = 1; - if( pad->GetLayerMask() & LAYER_FRONT ) + if( pad->GetLayerSet()[F_Cu] ) layer |= 2; static const char* layer_name[4] = { "none", "back", "front", "both" }; @@ -726,7 +726,7 @@ bool PCB_EDIT_FRAME::DoGenFootprintsReport( const wxString& aFullFilename, bool if( PtStruct->Type() != PCB_LINE_T ) continue; - if( ( (DRAWSEGMENT*) PtStruct )->GetLayer() != EDGE_N ) + if( ( (DRAWSEGMENT*) PtStruct )->GetLayer() != Edge_Cuts ) continue; WriteDrawSegmentPcb( (DRAWSEGMENT*) PtStruct, rptfile, conv_unit ); diff --git a/pcbnew/exporters/gendrill_Excellon_writer.cpp b/pcbnew/exporters/gendrill_Excellon_writer.cpp index 679df5bed1..2e73c915b8 100644 --- a/pcbnew/exporters/gendrill_Excellon_writer.cpp +++ b/pcbnew/exporters/gendrill_Excellon_writer.cpp @@ -453,8 +453,7 @@ void EXCELLON_WRITER::BuildHolesList( int aFirstLayer, // build hole list for vias if( ! aGenerateNPTH_list ) // vias are always plated ! { - for( VIA* via = GetFirstVia( m_pcb->m_Track ); via; - via = GetFirstVia( via->Next() ) ) + for( VIA* via = GetFirstVia( m_pcb->m_Track ); via; via = GetFirstVia( via->Next() ) ) { hole_value = via->GetDrillValue(); @@ -468,6 +467,7 @@ void EXCELLON_WRITER::BuildHolesList( int aFirstLayer, new_hole.m_Hole_Shape = 0; // hole shape: round new_hole.m_Hole_Pos = via->GetStart(); + via->LayerPair( &new_hole.m_Hole_Top_Layer, &new_hole.m_Hole_Bottom_Layer ); // LayerPair return params with m_Hole_Bottom_Layer < m_Hole_Top_Layer @@ -477,8 +477,8 @@ void EXCELLON_WRITER::BuildHolesList( int aFirstLayer, if( (new_hole.m_Hole_Top_Layer < aLastLayer) && (aLastLayer >= 0) ) continue; - if( aExcludeThroughHoles && (new_hole.m_Hole_Bottom_Layer == LAYER_N_BACK) - && (new_hole.m_Hole_Top_Layer == LAYER_N_FRONT) ) + if( aExcludeThroughHoles && (new_hole.m_Hole_Bottom_Layer == B_Cu) + && (new_hole.m_Hole_Top_Layer == F_Cu) ) continue; m_holeListBuffer.push_back( new_hole ); @@ -514,8 +514,8 @@ void EXCELLON_WRITER::BuildHolesList( int aFirstLayer, new_hole.m_Hole_Size = pad->GetDrillSize(); new_hole.m_Hole_Pos = pad->GetPosition(); // hole position - new_hole.m_Hole_Bottom_Layer = LAYER_N_BACK; - new_hole.m_Hole_Top_Layer = LAYER_N_FRONT;// pad holes are through holes + new_hole.m_Hole_Bottom_Layer = B_Cu; + new_hole.m_Hole_Top_Layer = F_Cu;// pad holes are through holes m_holeListBuffer.push_back( new_hole ); } } diff --git a/pcbnew/exporters/gendrill_Excellon_writer.h b/pcbnew/exporters/gendrill_Excellon_writer.h index d198187711..ff2901975f 100644 --- a/pcbnew/exporters/gendrill_Excellon_writer.h +++ b/pcbnew/exporters/gendrill_Excellon_writer.h @@ -64,16 +64,16 @@ public: class HOLE_INFO { public: - int m_Hole_Diameter; // hole value, and for oblong: min(hole size x, hole size y) - int m_Tool_Reference; // Tool reference for this hole = 1 ... n (values <=0 must not be used) - wxSize m_Hole_Size; // hole size for oblong holes - double m_Hole_Orient; // Hole rotation (= pad rotation) for oblong holes - int m_Hole_Shape; // hole shape: round (0) or oval (1) - wxPoint m_Hole_Pos; // hole position - LAYER_NUM m_Hole_Bottom_Layer; // hole starting layer (usually back layer) - LAYER_NUM m_Hole_Top_Layer; // hole ending layer (usually front layer): - // m_Hole_First_Layer < m_Hole_Last_Layer - bool m_Hole_NotPlated; // hole not plated. Must be in a specific drill file + int m_Hole_Diameter; // hole value, and for oblong: min(hole size x, hole size y) + int m_Tool_Reference; // Tool reference for this hole = 1 ... n (values <=0 must not be used) + wxSize m_Hole_Size; // hole size for oblong holes + double m_Hole_Orient; // Hole rotation (= pad rotation) for oblong holes + int m_Hole_Shape; // hole shape: round (0) or oval (1) + wxPoint m_Hole_Pos; // hole position + LAYER_ID m_Hole_Bottom_Layer; // hole starting layer (usually back layer) + LAYER_ID m_Hole_Top_Layer; // hole ending layer (usually front layer): + // m_Hole_First_Layer < m_Hole_Last_Layer + bool m_Hole_NotPlated; // hole not plated. Must be in a specific drill file public: HOLE_INFO() diff --git a/pcbnew/files.cpp b/pcbnew/files.cpp index 4677983e31..b5693e0e6b 100644 --- a/pcbnew/files.cpp +++ b/pcbnew/files.cpp @@ -556,8 +556,9 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool aCreateBackupF if( aFileName == wxEmptyString ) { wxString wildcard; - wildcard << wxGetTranslation( PcbFileWildcard ) << wxChar( '|' ) << - wxGetTranslation( LegacyPcbFileWildcard ); + wildcard << wxGetTranslation( PcbFileWildcard ) + // << wxChar( '|' ) << wxGetTranslation( LegacyPcbFileWildcard ) + ; isSaveAs = true; pcbFileName = GetBoard()->GetFileName(); @@ -583,9 +584,13 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool aCreateBackupF if( dlg.ShowModal() != wxID_OK ) return false; +#if 0 // no more LEGACY_PLUGIN::Save() int filterNdx = dlg.GetFilterIndex(); pluginType = ( filterNdx == 1 ) ? IO_MGR::LEGACY : IO_MGR::KICAD; +#else + pluginType = IO_MGR::KICAD; +#endif // Note: on Linux wxFileDialog is not reliable for noticing a changed filename. // We probably need to file a bug report or implement our own derivation. diff --git a/pcbnew/globaleditpad.cpp b/pcbnew/globaleditpad.cpp index 01719f9ff4..7e0b895135 100644 --- a/pcbnew/globaleditpad.cpp +++ b/pcbnew/globaleditpad.cpp @@ -257,7 +257,7 @@ void PCB_BASE_FRAME::GlobalChange_PadSettings( D_PAD* aPad, if( aPadOrientFilter && ( currpad_orient != pad_orient ) ) continue; - if( aPadLayerFilter && pad->GetLayerMask() != aPad->GetLayerMask() ) + if( aPadLayerFilter && pad->GetLayerSet() != aPad->GetLayerSet() ) continue; saveMe = true; @@ -302,7 +302,7 @@ void PCB_BASE_FRAME::GlobalChange_PadSettings( D_PAD* aPad, if( aPadLayerFilter ) { - if( pad->GetLayerMask() != aPad->GetLayerMask() ) + if( pad->GetLayerSet() != aPad->GetLayerSet() ) continue; else m_Pcb->m_Status_Pcb &= ~( LISTE_RATSNEST_ITEM_OK | CONNEXION_OK); @@ -312,7 +312,7 @@ void PCB_BASE_FRAME::GlobalChange_PadSettings( D_PAD* aPad, pad->SetAttribute( aPad->GetAttribute() ); pad->SetShape( aPad->GetShape() ); - pad->SetLayerMask( aPad->GetLayerMask() ); + pad->SetLayerSet( aPad->GetLayerSet() ); pad->SetSize( aPad->GetSize() ); pad->SetDelta( aPad->GetDelta() ); diff --git a/pcbnew/gpcb_plugin.cpp b/pcbnew/gpcb_plugin.cpp index 1f207eaaa6..def86f32ff 100644 --- a/pcbnew/gpcb_plugin.cpp +++ b/pcbnew/gpcb_plugin.cpp @@ -505,7 +505,7 @@ MODULE* GPCB_FPL_CACHE::parseMODULE( LINE_READER* aLineReader ) throw( IO_ERROR, } EDGE_MODULE* drawSeg = new EDGE_MODULE( module.get() ); - drawSeg->SetLayer( SILKSCREEN_N_FRONT ); + drawSeg->SetLayer( F_SilkS ); drawSeg->SetShape( S_SEGMENT ); drawSeg->SetStart0( wxPoint( parseInt( parameters[2], conv_unit ), parseInt( parameters[3], conv_unit ) ) ); @@ -529,7 +529,7 @@ MODULE* GPCB_FPL_CACHE::parseMODULE( LINE_READER* aLineReader ) throw( IO_ERROR, // Pcbnew does know ellipse so we must have Width = Height EDGE_MODULE* drawSeg = new EDGE_MODULE( module.get() ); - drawSeg->SetLayer( SILKSCREEN_N_FRONT ); + drawSeg->SetLayer( F_SilkS ); drawSeg->SetShape( S_ARC ); module->GraphicalItems().PushBack( drawSeg ); @@ -580,12 +580,16 @@ MODULE* GPCB_FPL_CACHE::parseMODULE( LINE_READER* aLineReader ) throw( IO_ERROR, } D_PAD* pad = new D_PAD( module.get() ); + + static const LSET pad_front( 3, F_Cu, F_Mask, F_Paste ); + static const LSET pad_back( 3, B_Cu, B_Mask, B_Paste ); + pad->SetShape( PAD_RECT ); pad->SetAttribute( PAD_SMD ); - pad->SetLayerMask( LAYER_FRONT | SOLDERMASK_LAYER_FRONT | SOLDERPASTE_LAYER_FRONT ); + pad->SetLayerSet( pad_front ); if( testFlags( parameters[paramCnt-2], 0x0080, wxT( "onsolder" ) ) ) - pad->SetLayerMask( LAYER_BACK | SOLDERMASK_LAYER_BACK | SOLDERPASTE_LAYER_BACK ); + pad->SetLayerSet( pad_back ); // Read pad number: if( paramCnt > 10 ) @@ -653,11 +657,12 @@ MODULE* GPCB_FPL_CACHE::parseMODULE( LINE_READER* aLineReader ) throw( IO_ERROR, } D_PAD* pad = new D_PAD( module.get() ); + pad->SetShape( PAD_ROUND ); - pad->SetLayerMask( ALL_CU_LAYERS | - SILKSCREEN_LAYER_FRONT | - SOLDERMASK_LAYER_FRONT | - SOLDERMASK_LAYER_BACK ); + + static const LSET pad_set = LSET::AllCuMask() | LSET( 3, F_SilkS, F_Mask, B_Mask ); + + pad->SetLayerSet( pad_set ); if( testFlags( parameters[paramCnt-2], 0x0100, wxT( "square" ) ) ) pad->SetShape( PAD_RECT ); diff --git a/pcbnew/hotkeys_board_editor.cpp b/pcbnew/hotkeys_board_editor.cpp index 1cffe09577..cde7e7820e 100644 --- a/pcbnew/hotkeys_board_editor.cpp +++ b/pcbnew/hotkeys_board_editor.cpp @@ -151,7 +151,7 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED ); cmd.SetEventObject( this ); - LAYER_NUM ll; + LAYER_NUM ll; switch( hk_id ) { @@ -242,65 +242,63 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit case HK_SWITCH_LAYER_TO_PREVIOUS: ll = GetActiveLayer(); - if( (ll <= LAYER_N_BACK) || (ll > LAYER_N_FRONT) ) + if( !IsCopperLayer( ll ) ) break; - if( GetBoard()->GetCopperLayerCount() < 2 ) // Single layer - ll = LAYER_N_BACK; - else if( ll == LAYER_N_FRONT ) - ll = std::max( LAYER_N_BACK, FIRST_COPPER_LAYER + GetBoard()->GetCopperLayerCount() - 2 ); + if( ll == F_Cu ) + ll = B_Cu; + else if( ll == B_Cu ) + ll = (LAYER_ID) GetBoard()->GetCopperLayerCount() - 2; else - --ll; + ll = ll - 1; - SwitchLayer( aDC, ll ); + SwitchLayer( aDC, (LAYER_ID) ll ); break; case HK_SWITCH_LAYER_TO_NEXT: ll = GetActiveLayer(); - if( (ll < LAYER_N_BACK) || (ll >= LAYER_N_FRONT) ) + if( !IsCopperLayer( ll ) ) break; - if( GetBoard()->GetCopperLayerCount() < 2 ) // Single layer - ll = LAYER_N_BACK; - else if( ll >= GetBoard()->GetCopperLayerCount() - 2 ) - ll = LAYER_N_FRONT; - else - ++ll; + if( ll == B_Cu ) + ll = F_Cu; + else if( ++ll >= GetBoard()->GetCopperLayerCount() - 1 ) + ll = B_Cu; - SwitchLayer( aDC, ll ); + SwitchLayer( aDC, (LAYER_ID) ll ); break; case HK_SWITCH_LAYER_TO_COMPONENT: - SwitchLayer( aDC, LAYER_N_FRONT ); + SwitchLayer( aDC, F_Cu ); break; case HK_SWITCH_LAYER_TO_COPPER: - SwitchLayer( aDC, LAYER_N_BACK ); + SwitchLayer( aDC, B_Cu ); break; case HK_SWITCH_LAYER_TO_INNER1: - SwitchLayer( aDC, LAYER_N_2 ); + SwitchLayer( aDC, In1_Cu ); break; case HK_SWITCH_LAYER_TO_INNER2: - SwitchLayer( aDC, LAYER_N_3 ); + SwitchLayer( aDC, In2_Cu ); break; case HK_SWITCH_LAYER_TO_INNER3: - SwitchLayer( aDC, LAYER_N_4 ); + SwitchLayer( aDC, In3_Cu ); break; case HK_SWITCH_LAYER_TO_INNER4: - SwitchLayer( aDC, LAYER_N_5 ); + SwitchLayer( aDC, In4_Cu ); break; case HK_SWITCH_LAYER_TO_INNER5: - SwitchLayer( aDC, LAYER_N_6 ); + SwitchLayer( aDC, In5_Cu ); break; case HK_SWITCH_LAYER_TO_INNER6: - SwitchLayer( aDC, LAYER_N_7 ); + SwitchLayer( aDC, In6_Cu ); break; case HK_HELP: // Display Current hotkey list @@ -588,7 +586,7 @@ bool PCB_EDIT_FRAME::OnHotkeyDeleteItem( wxDC* aDC ) switch( GetToolId() ) { case ID_TRACK_BUTT: - if( GetActiveLayer() > LAYER_N_FRONT ) + if( GetActiveLayer() > F_Cu ) return false; if( ItemFree ) @@ -949,7 +947,7 @@ bool PCB_EDIT_FRAME::OnHotkeyPlaceItem( wxDC* aDC ) TRACK * PCB_EDIT_FRAME::OnHotkeyBeginRoute( wxDC* aDC ) { - if( GetActiveLayer() > LAYER_N_FRONT ) + if( GetActiveLayer() > F_Cu ) return NULL; bool itemCurrentlyEdited = (GetCurItem() && GetCurItem()->GetFlags()); diff --git a/pcbnew/import_dxf/dialog_dxf_import.cpp b/pcbnew/import_dxf/dialog_dxf_import.cpp index aaeeba403a..f442b9a352 100644 --- a/pcbnew/import_dxf/dialog_dxf_import.cpp +++ b/pcbnew/import_dxf/dialog_dxf_import.cpp @@ -67,18 +67,18 @@ private: // the user's choices during the session wxString DIALOG_DXF_IMPORT::m_dxfFilename; int DIALOG_DXF_IMPORT::m_offsetSelection = 4; -LAYER_NUM DIALOG_DXF_IMPORT::m_layer = DRAW_N; +LAYER_NUM DIALOG_DXF_IMPORT::m_layer = Dwgs_User; -DIALOG_DXF_IMPORT::DIALOG_DXF_IMPORT( PCB_EDIT_FRAME* aParent ) - : DIALOG_DXF_IMPORT_BASE( aParent ) +DIALOG_DXF_IMPORT::DIALOG_DXF_IMPORT( PCB_EDIT_FRAME* aParent ) : + DIALOG_DXF_IMPORT_BASE( aParent ) { m_parent = aParent; m_config = Kiface().KifaceSettings(); if( m_config ) { - m_layer = m_config->Read( DXF_IMPORT_LAYER_OPTION_KEY, (long)DRAW_N ); + m_layer = m_config->Read( DXF_IMPORT_LAYER_OPTION_KEY, (long)Dwgs_User ); m_offsetSelection = m_config->Read( DXF_IMPORT_COORD_ORIGIN_KEY, 3 ); m_dxfFilename = m_config->Read( DXF_IMPORT_LAST_FILE_KEY, wxEmptyString ); } @@ -87,14 +87,14 @@ DIALOG_DXF_IMPORT::DIALOG_DXF_IMPORT( PCB_EDIT_FRAME* aParent ) m_rbOffsetOption->SetSelection( m_offsetSelection ); // Configure the layers list selector - m_SelLayerBox->SetLayersHotkeys( false ); // Do not display hotkeys - m_SelLayerBox->SetLayerMask( ALL_CU_LAYERS ); // Do not use copper layers + m_SelLayerBox->SetLayersHotkeys( false ); // Do not display hotkeys + m_SelLayerBox->SetLayerSet( LSET::AllCuMask() ); // Do not use copper layers m_SelLayerBox->SetBoardFrame( m_parent ); m_SelLayerBox->Resync(); if( m_SelLayerBox->SetLayerSelection( m_layer ) < 0 ) { - m_layer = DRAW_N; + m_layer = Dwgs_User; m_SelLayerBox->SetLayerSelection( m_layer ); } diff --git a/pcbnew/import_dxf/dxf2brd_items.cpp b/pcbnew/import_dxf/dxf2brd_items.cpp index e143830ee3..0f484fca53 100644 --- a/pcbnew/import_dxf/dxf2brd_items.cpp +++ b/pcbnew/import_dxf/dxf2brd_items.cpp @@ -55,7 +55,7 @@ DXF2BRD_CONVERTER::DXF2BRD_CONVERTER() : DRW_Interface() m_brd = NULL; m_version = 0; m_defaultThickness = 0.1; - m_brdLayer = DRAW_N; + m_brdLayer = Dwgs_User; } @@ -124,13 +124,17 @@ void DXF2BRD_CONVERTER::addLine( const DRW_Line& data ) { DRAWSEGMENT* segm = new DRAWSEGMENT( m_brd ); - segm->SetLayer( m_brdLayer ); + segm->SetLayer( (LAYER_ID) m_brdLayer ); + wxPoint start( mapX( data.basePoint.x ), mapY( data.basePoint.y ) ); + segm->SetStart( start ); + wxPoint end( mapX( data.secPoint.x ), mapY( data.secPoint.y ) ); + segm->SetEnd( end ); - segm->SetWidth( mapDim( data.thickness == 0 ? m_defaultThickness - : data.thickness ) ); + + segm->SetWidth( mapDim( data.thickness == 0 ? m_defaultThickness : data.thickness ) ); appendToBoard( segm ); } @@ -142,7 +146,7 @@ void DXF2BRD_CONVERTER::addCircle( const DRW_Circle& data ) { DRAWSEGMENT* segm = new DRAWSEGMENT( m_brd ); - segm->SetLayer( m_brdLayer ); + segm->SetLayer( (LAYER_ID) m_brdLayer ); segm->SetShape( S_CIRCLE ); wxPoint center( mapX( data.basePoint.x ), mapY( data.basePoint.y ) ); segm->SetCenter( center ); @@ -162,7 +166,7 @@ void DXF2BRD_CONVERTER::addArc( const DRW_Arc& data ) { DRAWSEGMENT* segm = new DRAWSEGMENT( m_brd ); - segm->SetLayer( m_brdLayer ); + segm->SetLayer( (LAYER_ID) m_brdLayer ); segm->SetShape( S_ARC ); // Init arc centre: @@ -199,7 +203,7 @@ void DXF2BRD_CONVERTER::addArc( const DRW_Arc& data ) void DXF2BRD_CONVERTER::addText(const DRW_Text& data) { TEXTE_PCB* pcb_text = new TEXTE_PCB( m_brd ); - pcb_text->SetLayer( m_brdLayer ); + pcb_text->SetLayer( (LAYER_ID) m_brdLayer ); wxPoint refPoint( mapX(data.basePoint.x), mapY(data.basePoint.y) ); wxPoint secPoint( mapX(data.secPoint.x), mapY(data.secPoint.y) ); @@ -327,7 +331,8 @@ void DXF2BRD_CONVERTER::addMText( const DRW_MText& data ) } TEXTE_PCB* pcb_text = new TEXTE_PCB( m_brd ); - pcb_text->SetLayer( m_brdLayer ); + pcb_text->SetLayer( (LAYER_ID) m_brdLayer ); + wxPoint textpos( mapX( data.basePoint.x ), mapY( data.basePoint.y ) ); pcb_text->SetTextPosition( textpos ); pcb_text->SetOrientation( data.angle * 10 ); diff --git a/pcbnew/initpcb.cpp b/pcbnew/initpcb.cpp index f20737ff7d..05ac3198f4 100644 --- a/pcbnew/initpcb.cpp +++ b/pcbnew/initpcb.cpp @@ -53,13 +53,13 @@ bool PCB_EDIT_FRAME::Clear_Pcb( bool aQuery ) GetBoard()->ResetHighLight(); // Enable all layers (SetCopperLayerCount() will adjust the copper layers enabled) - GetBoard()->SetEnabledLayers( ALL_LAYERS ); + GetBoard()->SetEnabledLayers( LSET().set() ); // Default copper layers count set to 2: double layer board GetBoard()->SetCopperLayerCount( 2 ); // Update display - GetBoard()->SetVisibleLayers( ALL_LAYERS ); + GetBoard()->SetVisibleLayers( LSET().set() ); // Set currently selected layer to be shown in high contrast mode, when enabled` SetHighContrastLayer( GetScreen()->m_Active_Layer ); diff --git a/pcbnew/invoke_pcb_dialog.h b/pcbnew/invoke_pcb_dialog.h index e45724a380..ff9e89e40a 100644 --- a/pcbnew/invoke_pcb_dialog.h +++ b/pcbnew/invoke_pcb_dialog.h @@ -54,6 +54,8 @@ class wxString; // represent maximum information hiding. class PCB_EDIT_FRAME; class FP_LIB_TABLE; +class BOARD; +class PCB_PLOT_PARAMS; /** @@ -87,5 +89,13 @@ void InvokePluginOptionsEditor( wxTopLevelWindow* aCaller, const wxString& aNick */ bool InvokeDXFDialogImport( PCB_EDIT_FRAME* aCaller ); +/** + * Function InvokeLayerSetup + * shows the layer setup dialog + * @return bool - true if user pressed OK (did not abort), else false. + */ +bool InvokeLayerSetup( wxTopLevelWindow* aCaller, BOARD* aBoard ); + +bool InvokeSVGPrint( wxTopLevelWindow* aCaller, BOARD* aBoard, PCB_PLOT_PARAMS* aSettings ); #endif // INVOKE_A_DIALOG_H_ diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index d3b0422d32..50d6fd121e 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -481,7 +481,7 @@ void PCB_IO::formatLayer( const BOARD_ITEM* aItem ) const { if( m_ctl & CTL_STD_LAYER_NAMES ) { - LAYER_NUM layer = aItem->GetLayer(); + LAYER_ID layer = aItem->GetLayer(); // English layer names should never need quoting. m_out->Print( 0, " (layer %s)", TO_UTF8( BOARD::GetStandardLayerName( layer ) ) ); @@ -525,9 +525,10 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const m_out->Print( aNestLevel, "(layers\n" ); // Save only the used copper layers from front to back. +#if 0 // was: for( LAYER_NUM layer = LAST_COPPER_LAYER; layer >= FIRST_COPPER_LAYER; --layer) { - LAYER_MSK mask = GetLayerMask( layer ); + LSET mask = GetLayerSet( layer ); if( mask & aBoard->GetEnabledLayers() ) { m_out->Print( aNestLevel+1, "(%d %s %s", layer, @@ -540,8 +541,27 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const m_out->Print( 0, ")\n" ); } } +#else + LSET visible_layers = aBoard->GetVisibleLayers(); + + for( LSEQ cu = aBoard->GetEnabledLayers().CuStack(); cu; ++cu ) + { + LAYER_ID layer = *cu; + + m_out->Print( aNestLevel+1, "(%d %s %s", layer, + m_out->Quotew( aBoard->GetLayerName( layer ) ).c_str(), + LAYER::ShowType( aBoard->GetLayerType( layer ) ) ); + + if( !visible_layers[layer] ) + m_out->Print( 0, " hide" ); + + m_out->Print( 0, ")\n" ); + } +#endif + // Save used non-copper layers in the order they are defined. +#if 0 // was: for( LAYER_NUM layer = FIRST_NON_COPPER_LAYER; layer <= LAST_NON_COPPER_LAYER; ++layer) { LAYER_MSK mask = GetLayerMask( layer ); @@ -556,6 +576,38 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const m_out->Print( 0, ")\n" ); } } +#else + // desired sequence for non Cu BOARD layers. + static const LAYER_ID non_cu[] = { + B_Adhes, // 32 + F_Adhes, + B_Paste, + F_Paste, + B_SilkS, + F_SilkS, + B_Mask, + F_Mask, + Dwgs_User, + Cmts_User, + Eco1_User, + Eco2_User, + Edge_Cuts, + Margin, + }; + + for( LSEQ seq = aBoard->GetEnabledLayers().Seq( non_cu, DIM( non_cu ) ); seq; ++seq ) + { + LAYER_ID layer = *seq; + + m_out->Print( aNestLevel+1, "(%d %s user", layer, + m_out->Quotew( aBoard->GetLayerName( layer ) ).c_str() ); + + if( !visible_layers[layer] ) + m_out->Print( 0, " hide" ); + + m_out->Print( 0, ")\n" ); + } +#endif m_out->Print( aNestLevel, ")\n\n" ); @@ -1098,7 +1150,7 @@ void PCB_IO::format( MODULE* aModule, int aNestLevel ) const } -void PCB_IO::formatLayers( LAYER_MSK aLayerMask, int aNestLevel ) const +void PCB_IO::formatLayers( LSET aLayerMask, int aNestLevel ) const throw( IO_ERROR ) { std::string output; @@ -1108,46 +1160,67 @@ void PCB_IO::formatLayers( LAYER_MSK aLayerMask, int aNestLevel ) const output += "(layers"; - LAYER_MSK cuMask = ALL_CU_LAYERS; + static const LSET cu_all( LSET::AllCuMask() ); + static const LSET fr_bk( 2, B_Cu, F_Cu ); + static const LSET adhes( 2, B_Adhes, F_Adhes ); + static const LSET paste( 2, B_Paste, F_Paste ); + static const LSET silks( 2, B_SilkS, F_SilkS ); + static const LSET mask( 2, B_Mask, F_Mask ); + static const LSET crt_yd(2, B_CrtYd, F_CrtYd ); + static const LSET fab( 2, B_Fab, F_Fab ); + + LSET cu_mask = cu_all; if( m_board ) - cuMask &= m_board->GetEnabledLayers(); + cu_mask &= m_board->GetEnabledLayers(); // output copper layers first, then non copper - if( ( aLayerMask & cuMask ) == cuMask ) + if( ( aLayerMask & cu_mask ) == cu_mask ) { output += " *.Cu"; - aLayerMask &= ~ALL_CU_LAYERS; // clear bits, so they are not output again below + aLayerMask &= ~cu_all; // clear bits, so they are not output again below } - else if( ( aLayerMask & cuMask ) == (LAYER_BACK | LAYER_FRONT) ) + else if( ( aLayerMask & cu_mask ) == fr_bk ) { output += " F&B.Cu"; - aLayerMask &= ~(LAYER_BACK | LAYER_FRONT); + aLayerMask &= ~fr_bk; } - if( ( aLayerMask & (ADHESIVE_LAYER_BACK | ADHESIVE_LAYER_FRONT)) == (ADHESIVE_LAYER_BACK | ADHESIVE_LAYER_FRONT) ) + if( ( aLayerMask & adhes ) == adhes ) { output += " *.Adhes"; - aLayerMask &= ~(ADHESIVE_LAYER_BACK | ADHESIVE_LAYER_FRONT); + aLayerMask &= ~adhes; } - if( ( aLayerMask & (SOLDERPASTE_LAYER_BACK | SOLDERPASTE_LAYER_FRONT)) == (SOLDERPASTE_LAYER_BACK | SOLDERPASTE_LAYER_FRONT) ) + if( ( aLayerMask & paste ) == paste ) { output += " *.Paste"; - aLayerMask &= ~(SOLDERPASTE_LAYER_BACK | SOLDERPASTE_LAYER_FRONT); + aLayerMask &= ~paste; } - if( ( aLayerMask & (SILKSCREEN_LAYER_BACK | SILKSCREEN_LAYER_FRONT)) == (SILKSCREEN_LAYER_BACK | SILKSCREEN_LAYER_FRONT) ) + if( ( aLayerMask & silks ) == silks ) { output += " *.SilkS"; - aLayerMask &= ~(SILKSCREEN_LAYER_BACK | SILKSCREEN_LAYER_FRONT); + aLayerMask &= ~silks; } - if( ( aLayerMask & (SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT)) == (SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT) ) + if( ( aLayerMask & mask ) == mask ) { output += " *.Mask"; - aLayerMask &= ~(SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT); + aLayerMask &= ~mask; + } + + if( ( aLayerMask & crt_yd ) == crt_yd ) + { + output += " *.CrtYd"; + aLayerMask &= ~crt_yd; + } + + if( ( aLayerMask & fab ) == fab ) + { + output += " *.Fab"; + aLayerMask &= ~fab; } // output any individual layers not handled in wildcard combos above @@ -1157,15 +1230,15 @@ void PCB_IO::formatLayers( LAYER_MSK aLayerMask, int aNestLevel ) const wxString layerName; - for( LAYER_NUM layer = FIRST_LAYER; layer < NB_PCB_LAYERS; ++layer ) + for( LAYER_NUM layer = 0; layer < LAYER_ID_COUNT; ++layer ) { - if( aLayerMask & GetLayerMask( layer ) ) + if( aLayerMask[layer] ) { if( m_board && !( m_ctl & CTL_STD_LAYER_NAMES ) ) - layerName = m_board->GetLayerName( layer ); + layerName = m_board->GetLayerName( LAYER_ID( layer ) ); else // I am being called from FootprintSave() - layerName = BOARD::GetStandardLayerName( layer ); + layerName = BOARD::GetStandardLayerName( LAYER_ID( layer ) ); output += ' '; output += m_out->Quotew( layerName ); @@ -1243,7 +1316,7 @@ void PCB_IO::format( D_PAD* aPad, int aNestLevel ) const m_out->Print( 0, ")" ); } - formatLayers( aPad->GetLayerMask(), 0 ); + formatLayers( aPad->GetLayerSet(), 0 ); std::string output; @@ -1358,10 +1431,10 @@ void PCB_IO::format( TRACK* aTrack, int aNestLevel ) const { if( aTrack->Type() == PCB_VIA_T ) { - LAYER_NUM layer1, layer2; + LAYER_ID layer1, layer2; - const VIA* via = static_cast(aTrack); - BOARD* board = (BOARD*) via->GetParent(); + const VIA* via = static_cast(aTrack); + BOARD* board = (BOARD*) via->GetParent(); wxCHECK_RET( board != 0, wxT( "Via " ) + via->GetSelectMenuText() + wxT( " has no parent." ) ); @@ -1828,7 +1901,7 @@ void PCB_IO::FootprintSave( const wxString& aLibraryPath, const MODULE* aFootpri module->SetParent( 0 ); module->SetOrientation( 0 ); - if( module->GetLayer() != LAYER_N_FRONT ) + if( module->GetLayer() != F_Cu ) module->Flip( module->GetPosition() ); wxLogTrace( traceFootprintLibrary, wxT( "Creating s-expression footprint file: %s." ), diff --git a/pcbnew/kicad_plugin.h b/pcbnew/kicad_plugin.h index e16129203b..1655293617 100644 --- a/pcbnew/kicad_plugin.h +++ b/pcbnew/kicad_plugin.h @@ -36,8 +36,10 @@ class NETINFO_MAPPING; /// Current s-expression file format version. 2 was the last legacy format version. -#define SEXPR_BOARD_FILE_VERSION 3 +//#define SEXPR_BOARD_FILE_VERSION 3 // first s-expression format, used legacy cu stack +#define SEXPR_BOARD_FILE_VERSION 4 // reversed cu stack, changed Inner* to In* in reverse order + // went to 32 Cu layers from 16. #define CTL_STD_LAYER_NAMES (1 << 0) ///< Use English Standard layer names #define CTL_OMIT_NETS (1 << 1) ///< Omit pads net names (useless in library) @@ -215,7 +217,7 @@ private: void formatLayer( const BOARD_ITEM* aItem ) const; - void formatLayers( LAYER_MSK aLayerMask, int aNestLevel = 0 ) const + void formatLayers( LSET aLayerMask, int aNestLevel = 0 ) const throw( IO_ERROR ); }; diff --git a/pcbnew/layer_widget.cpp b/pcbnew/layer_widget.cpp index 92def47cea..9403b4efae 100644 --- a/pcbnew/layer_widget.cpp +++ b/pcbnew/layer_widget.cpp @@ -881,7 +881,7 @@ class MYFRAME : public wxFrame { } - void OnLayerColorChange( LAYER aLayer, EDA_COLOR_T aColor ) + void OnLayerColorChange( int aLayer, EDA_COLOR_T aColor ) { printf( "OnLayerColorChange( aLayer:%d, aColor:%d )\n", aLayer, aColor ); diff --git a/pcbnew/layer_widget.h b/pcbnew/layer_widget.h index 151a1c4127..4f8575f1ec 100644 --- a/pcbnew/layer_widget.h +++ b/pcbnew/layer_widget.h @@ -350,7 +350,6 @@ public: */ bool GetRenderState( int aId ); - void UpdateLayouts(); /* did not help: @@ -378,7 +377,7 @@ public: * @param aLayer is the board layer to change * @param aColor is the new color */ - virtual void OnLayerColorChange( LAYER_NUM aLayer, EDA_COLOR_T aColor ) = 0; + virtual void OnLayerColorChange( int aLayer, EDA_COLOR_T aColor ) = 0; /** * Function OnLayerSelect @@ -387,7 +386,7 @@ public: * the change by returning false. * @param aLayer is the board layer to select */ - virtual bool OnLayerSelect( LAYER_NUM aLayer ) = 0; + virtual bool OnLayerSelect( int aLayer ) = 0; /** * Function OnLayerVisible diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index 64e57d8b17..002313c868 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -98,6 +98,109 @@ typedef LEGACY_PLUGIN::BIU BIU; #define UNKNOWN_PAD_ATTRIBUTE _( "unknown pad attribute: %d" ) +typedef unsigned LAYER_MASK; + +#define FIRST_LAYER 0 +#define FIRST_COPPER_LAYER 0 +#define LAYER_N_BACK 0 +#define LAYER_N_2 1 +#define LAYER_N_3 2 +#define LAYER_N_4 3 +#define LAYER_N_5 4 +#define LAYER_N_6 5 +#define LAYER_N_7 6 +#define LAYER_N_8 7 +#define LAYER_N_9 8 +#define LAYER_N_10 9 +#define LAYER_N_11 10 +#define LAYER_N_12 11 +#define LAYER_N_13 12 +#define LAYER_N_14 13 +#define LAYER_N_15 14 +#define LAYER_N_FRONT 15 +#define LAST_COPPER_LAYER LAYER_N_FRONT +#define NB_COPPER_LAYERS (LAST_COPPER_LAYER - FIRST_COPPER_LAYER + 1) + +#define FIRST_NON_COPPER_LAYER 16 +#define FIRST_TECHNICAL_LAYER 16 +#define FIRST_USER_LAYER 24 +#define ADHESIVE_N_BACK 16 +#define ADHESIVE_N_FRONT 17 +#define SOLDERPASTE_N_BACK 18 +#define SOLDERPASTE_N_FRONT 19 +#define SILKSCREEN_N_BACK 20 +#define SILKSCREEN_N_FRONT 21 +#define SOLDERMASK_N_BACK 22 +#define SOLDERMASK_N_FRONT 23 +#define DRAW_N 24 +#define COMMENT_N 25 +#define ECO1_N 26 +#define ECO2_N 27 +#define EDGE_N 28 +#define LAST_NON_COPPER_LAYER 28 +#define LAST_TECHNICAL_LAYER 23 +#define LAST_USER_LAYER 27 +#define NB_PCB_LAYERS (LAST_NON_COPPER_LAYER + 1) +#define UNUSED_LAYER_29 29 +#define UNUSED_LAYER_30 30 +#define UNUSED_LAYER_31 31 +#define NB_GERBER_LAYERS 32 +#define NB_LAYERS 32 + +// Masks to identify a layer by a bit map +typedef unsigned LAYER_MSK; +#define LAYER_BACK (1 << LAYER_N_BACK) ///< bit mask for copper layer +#define LAYER_2 (1 << LAYER_N_2) ///< bit mask for layer 2 +#define LAYER_3 (1 << LAYER_N_3) ///< bit mask for layer 3 +#define LAYER_4 (1 << LAYER_N_4) ///< bit mask for layer 4 +#define LAYER_5 (1 << LAYER_N_5) ///< bit mask for layer 5 +#define LAYER_6 (1 << LAYER_N_6) ///< bit mask for layer 6 +#define LAYER_7 (1 << LAYER_N_7) ///< bit mask for layer 7 +#define LAYER_8 (1 << LAYER_N_8) ///< bit mask for layer 8 +#define LAYER_9 (1 << LAYER_N_9) ///< bit mask for layer 9 +#define LAYER_10 (1 << LAYER_N_10) ///< bit mask for layer 10 +#define LAYER_11 (1 << LAYER_N_11) ///< bit mask for layer 11 +#define LAYER_12 (1 << LAYER_N_12) ///< bit mask for layer 12 +#define LAYER_13 (1 << LAYER_N_13) ///< bit mask for layer 13 +#define LAYER_14 (1 << LAYER_N_14) ///< bit mask for layer 14 +#define LAYER_15 (1 << LAYER_N_15) ///< bit mask for layer 15 +#define LAYER_FRONT (1 << LAYER_N_FRONT) ///< bit mask for component layer +#define ADHESIVE_LAYER_BACK (1 << ADHESIVE_N_BACK) +#define ADHESIVE_LAYER_FRONT (1 << ADHESIVE_N_FRONT) +#define SOLDERPASTE_LAYER_BACK (1 << SOLDERPASTE_N_BACK) +#define SOLDERPASTE_LAYER_FRONT (1 << SOLDERPASTE_N_FRONT) +#define SILKSCREEN_LAYER_BACK (1 << SILKSCREEN_N_BACK) +#define SILKSCREEN_LAYER_FRONT (1 << SILKSCREEN_N_FRONT) +#define SOLDERMASK_LAYER_BACK (1 << SOLDERMASK_N_BACK) +#define SOLDERMASK_LAYER_FRONT (1 << SOLDERMASK_N_FRONT) +#define DRAW_LAYER (1 << DRAW_N) +#define COMMENT_LAYER (1 << COMMENT_N) +#define ECO1_LAYER (1 << ECO1_N) +#define ECO2_LAYER (1 << ECO2_N) +#define EDGE_LAYER (1 << EDGE_N) + +// extra bits 0xE0000000 + +// Helpful global layer masks: +// ALL_AUX_LAYERS layers are technical layers, ALL_NO_CU_LAYERS has user +// and edge layers too! +#define ALL_LAYERS 0x1FFFFFFF // Pcbnew used 29 layers +#define FULL_LAYERS 0xFFFFFFFF // Gerbview used 32 layers +#define ALL_NO_CU_LAYERS 0x1FFF0000 +#define ALL_CU_LAYERS 0x0000FFFF +#define INTERNAL_CU_LAYERS 0x00007FFE +#define EXTERNAL_CU_LAYERS 0x00008001 +#define FRONT_TECH_LAYERS (SILKSCREEN_LAYER_FRONT | SOLDERMASK_LAYER_FRONT \ + | ADHESIVE_LAYER_FRONT | SOLDERPASTE_LAYER_FRONT) +#define BACK_TECH_LAYERS (SILKSCREEN_LAYER_BACK | SOLDERMASK_LAYER_BACK \ + | ADHESIVE_LAYER_BACK | SOLDERPASTE_LAYER_BACK) +#define ALL_TECH_LAYERS (FRONT_TECH_LAYERS | BACK_TECH_LAYERS) +#define BACK_LAYERS (LAYER_BACK | BACK_TECH_LAYERS) +#define FRONT_LAYERS (LAYER_FRONT | FRONT_TECH_LAYERS) + +#define ALL_USER_LAYERS (DRAW_LAYER | COMMENT_LAYER | ECO1_LAYER | ECO2_LAYER ) + +#define NO_LAYERS 0x00000000 // Old internal units definition (UI = decimil) @@ -112,6 +215,7 @@ static const char delims[] = " \t\r\n"; static bool inline isSpace( int c ) { return strchr( delims, c ) != 0; } +#define MASK(x) (1<<(x)) //-------------------------------------------------------- @@ -149,6 +253,17 @@ static inline char* ReadLine( LINE_READER* rdr, const char* caller ) #endif +/* corrected old junk, element 14 was wrong. can delete. +// Look up Table for conversion copper layer count -> general copper layer mask: +static const LAYER_MASK all_cu_mask[] = { + 0x0001, 0x8001, 0x8003, 0x8007, + 0x800F, 0x801F, 0x803F, 0x807F, + 0x80FF, 0x81FF, 0x83FF, 0x87FF, + 0x8FFF, 0x9FFF, 0xBFFF, 0xFFFF +}; +*/ + + using namespace std; // auto_ptr @@ -197,6 +312,80 @@ static EDA_TEXT_VJUSTIFY_T vertJustify( const char* vertical ) } +/// Count the number of set layers in the mask +inline int layerMaskCountSet( LAYER_MASK aMask ) +{ + int count = 0; + + for( int i = 0; i < NB_PCB_LAYERS && aMask; ++i, aMask >>= 1 ) + { + if( aMask & 1 ) + ++count; + } + + return count; +} + + +LAYER_ID LEGACY_PLUGIN::leg_layer2new( int cu_count, LAYER_NUM aLayerNum ) +{ + int newid; + unsigned old = aLayerNum; + + // this is a speed critical function, be careful. + + if( old <= LAYER_N_FRONT ) + { + if( old == LAYER_N_FRONT ) + newid = F_Cu; + else + { + newid = cu_count - 1 - old; + + wxASSERT( newid >= 0 ); + } + } + else + { + switch( old ) + { + case ADHESIVE_N_BACK: newid = B_Adhes; break; + case ADHESIVE_N_FRONT: newid = F_Adhes; break; + case SOLDERPASTE_N_BACK: newid = B_Paste; break; + case SOLDERPASTE_N_FRONT: newid = F_Paste; break; + case SILKSCREEN_N_BACK: newid = B_SilkS; break; + case SILKSCREEN_N_FRONT: newid = F_SilkS; break; + case SOLDERMASK_N_BACK: newid = B_Mask; break; + case SOLDERMASK_N_FRONT: newid = F_Mask; break; + case DRAW_N: newid = Dwgs_User; break; + case COMMENT_N: newid = Cmts_User; break; + case ECO1_N: newid = Eco1_User; break; + case ECO2_N: newid = Eco2_User; break; + case EDGE_N: newid = Edge_Cuts; break; + default: + wxASSERT( 0 ); + newid = 0; + } + } + + return LAYER_ID( newid ); +} + + +LSET LEGACY_PLUGIN::leg_mask2new( int cu_count, unsigned aMask ) +{ + LSET ret; + + for( int i=0; i>= 1 ) + { + if( aMask & 1 ) + ret.set( leg_layer2new( cu_count, i ) ); + } + + return ret; +} + + /** * Function intParse * parses an ASCII integer string with possible leading whitespace into @@ -292,7 +481,7 @@ void LEGACY_PLUGIN::loadAllSections( bool doAppend ) module->SetFPID( fpid ); - LoadMODULE( module.get() ); + loadMODULE( module.get() ); m_board->Add( module.release(), ADD_APPEND ); } @@ -430,26 +619,33 @@ void LEGACY_PLUGIN::loadGENERAL() else if( TESTLINE( "EnabledLayers" ) ) { - LAYER_MSK enabledLayers = hexParse( line + SZ( "EnabledLayers" ) ); + LAYER_MASK enabledLayers = hexParse( line + SZ( "EnabledLayers" ) ); + + LSET new_mask = leg_mask2new( m_cu_count, enabledLayers ); // layer usage - m_board->SetEnabledLayers( enabledLayers ); + m_board->SetEnabledLayers( new_mask ); // layer visibility equals layer usage, unless overridden later via "VisibleLayers" - m_board->SetVisibleLayers( enabledLayers ); + m_board->SetVisibleLayers( new_mask ); } else if( TESTLINE( "VisibleLayers" ) ) { - LAYER_MSK visibleLayers = hexParse( line + SZ( "VisibleLayers" ) ); - m_board->SetVisibleLayers( visibleLayers ); + LAYER_MASK visibleLayers = hexParse( line + SZ( "VisibleLayers" ) ); + + LSET new_mask = leg_mask2new( m_cu_count, visibleLayers ); + + m_board->SetVisibleLayers( new_mask ); } else if( TESTLINE( "Ly" ) ) // Old format for Layer count { - LAYER_MSK layer_mask = hexParse( line + SZ( "Ly" ) ); + LAYER_MASK layer_mask = hexParse( line + SZ( "Ly" ) ); - m_board->SetCopperLayerCount( LayerMaskCountSet( layer_mask & ALL_CU_LAYERS ) ); + m_cu_count = layerMaskCountSet( layer_mask & ALL_CU_LAYERS ); + + m_board->SetCopperLayerCount( m_cu_count ); } else if( TESTLINE( "BoardThickness" ) ) @@ -681,19 +877,20 @@ void LEGACY_PLUGIN::loadSETUP() { // eg: "Layer[n] " - LAYER_NUM layer = layerParse( line + SZ( "Layer[" ), &data ); + LAYER_NUM layer_num = layerParse( line + SZ( "Layer[" ), &data ); + LAYER_ID layer_id = leg_layer2new( m_cu_count, layer_num ); data = strtok_r( (char*) data+1, delims, &saveptr ); // +1 for ']' if( data ) { wxString layerName = FROM_UTF8( data ); - m_board->SetLayerName( layer, layerName ); + m_board->SetLayerName( layer_id, layerName ); data = strtok_r( NULL, delims, &saveptr ); if( data ) // optional in old board files { LAYER_T type = LAYER::ParseType( data ); - m_board->SetLayerType( layer, type ); + m_board->SetLayerType( layer_id, type ); } } } @@ -941,7 +1138,7 @@ void LEGACY_PLUGIN::loadSETUP() } -void LEGACY_PLUGIN::LoadMODULE( MODULE* aModule ) +void LEGACY_PLUGIN::loadMODULE( MODULE* aModule ) { char* line; char* saveptr; @@ -999,7 +1196,9 @@ void LEGACY_PLUGIN::LoadMODULE( MODULE* aModule ) BIU pos_x = biuParse( line + SZ( "Po" ), &data ); BIU pos_y = biuParse( data, &data ); int orient = intParse( data, &data ); - LAYER_NUM layer = layerParse( data, &data ); + + LAYER_NUM layer_num = layerParse( data, &data ); + LAYER_ID layer_id = leg_layer2new( m_cu_count, layer_num ); long edittime = hexParse( data, &data ); time_t timestamp = hexParse( data, &data ); @@ -1015,7 +1214,7 @@ void LEGACY_PLUGIN::LoadMODULE( MODULE* aModule ) aModule->SetIsPlaced( true ); aModule->SetPosition( wxPoint( pos_x, pos_y ) ); - aModule->SetLayer( layer ); + aModule->SetLayer( layer_id ); aModule->SetOrientation( orient ); aModule->SetTimeStamp( timestamp ); aModule->SetLastEditTime( edittime ); @@ -1297,9 +1496,9 @@ void LEGACY_PLUGIN::loadPAD( MODULE* aModule ) data = strtok_r( NULL, delims, &saveptr ); // skip BufCar data = strtok_r( NULL, delims, &saveptr ); - LAYER_MSK layer_mask = hexParse( data ); + LAYER_MASK layer_mask = hexParse( data ); - pad->SetLayerMask( layer_mask ); + pad->SetLayerSet( leg_mask2new( m_cu_count, layer_mask ) ); pad->SetAttribute( attribute ); } @@ -1428,8 +1627,8 @@ void LEGACY_PLUGIN::loadMODULE_EDGE( MODULE* aModule ) const char* data; // common to all cases, and we have to check their values uniformly at end - BIU width = 1; - LAYER_NUM layer = FIRST_NON_COPPER_LAYER; + BIU width = 1; + LAYER_NUM layer = FIRST_NON_COPPER_LAYER; switch( shape ) { @@ -1537,7 +1736,7 @@ void LEGACY_PLUGIN::loadMODULE_EDGE( MODULE* aModule ) layer = SILKSCREEN_N_FRONT; dwg->SetWidth( width ); - dwg->SetLayer( layer ); + dwg->SetLayer( leg_layer2new( m_cu_count, layer ) ); EDGE_MODULE* em = dwg.release(); @@ -1597,7 +1796,9 @@ void LEGACY_PLUGIN::loadMODULE_TEXT( TEXTE_MODULE* aText ) char* mirror = strtok_r( (char*) data, delims, &saveptr ); char* hide = strtok_r( NULL, delims, &saveptr ); char* tmp = strtok_r( NULL, delims, &saveptr ); - LAYER_NUM layer = tmp ? layerParse( tmp ) : SILKSCREEN_N_FRONT; + + LAYER_NUM layer_num = tmp ? layerParse( tmp ) : SILKSCREEN_N_FRONT; + char* italic = strtok_r( NULL, delims, &saveptr ); char* hjust = strtok_r( (char*) txt_end, delims, &saveptr ); @@ -1639,16 +1840,16 @@ void LEGACY_PLUGIN::loadMODULE_TEXT( TEXTE_MODULE* aText ) if( vjust ) aText->SetVertJustify( vertJustify( vjust ) ); - if( layer < FIRST_LAYER ) - layer = FIRST_LAYER; - else if( layer > LAST_NON_COPPER_LAYER ) - layer = LAST_NON_COPPER_LAYER; - else if( layer == LAYER_N_BACK ) - layer = SILKSCREEN_N_BACK; - else if( layer == LAYER_N_FRONT ) - layer = SILKSCREEN_N_FRONT; + if( layer_num < FIRST_LAYER ) + layer_num = FIRST_LAYER; + else if( layer_num > LAST_NON_COPPER_LAYER ) + layer_num = LAST_NON_COPPER_LAYER; + else if( layer_num == LAYER_N_BACK ) + layer_num = SILKSCREEN_N_BACK; + else if( layer_num == LAYER_N_FRONT ) + layer_num = SILKSCREEN_N_FRONT; - aText->SetLayer( layer ); + aText->SetLayer( leg_layer2new( m_cu_count, layer_num ) ); // Calculate the actual position. aText->SetDrawCoord(); @@ -1767,7 +1968,7 @@ void LEGACY_PLUGIN::loadPCB_LINE() else if( layer > LAST_NON_COPPER_LAYER ) layer = LAST_NON_COPPER_LAYER; - dseg->SetLayer( layer ); + dseg->SetLayer( leg_layer2new( m_cu_count, layer ) ); break; case 1: int mtype; @@ -1962,7 +2163,7 @@ void LEGACY_PLUGIN::loadPCB_TEXT() // e.g. "De 21 1 0 Normal C\r\n" // sscanf( line + 2, " %d %d %lX %s %c\n", &m_Layer, &normal_display, &m_TimeStamp, style, &hJustify ); - LAYER_NUM layer = layerParse( line + SZ( "De" ), &data ); + LAYER_NUM layer_num = layerParse( line + SZ( "De" ), &data ); int notMirrored = intParse( data, &data ); time_t timestamp = hexParse( data, &data ); char* style = strtok_r( (char*) data, delims, &saveptr ); @@ -1984,12 +2185,12 @@ void LEGACY_PLUGIN::loadPCB_TEXT() if( vJustify ) pcbtxt->SetVertJustify( vertJustify( vJustify ) ); - if( layer < FIRST_COPPER_LAYER ) - layer = FIRST_COPPER_LAYER; - else if( layer > LAST_NON_COPPER_LAYER ) - layer = LAST_NON_COPPER_LAYER; + if( layer_num < FIRST_COPPER_LAYER ) + layer_num = FIRST_COPPER_LAYER; + else if( layer_num > LAST_NON_COPPER_LAYER ) + layer_num = LAST_NON_COPPER_LAYER; - pcbtxt->SetLayer( layer ); + pcbtxt->SetLayer( leg_layer2new( m_cu_count, layer_num ) ); } else if( TESTLINE( "$EndTEXTPCB" ) ) @@ -2059,13 +2260,16 @@ void LEGACY_PLUGIN::loadTrackList( int aStructType ) int makeType; time_t timeStamp; - int layer, type, net_code, flags_int; + LAYER_NUM layer_num; + int type, net_code, flags_int; // parse the 2nd line to determine the type of object // e.g. "De 15 1 7 0 0" for a via - sscanf( line + SZ( "De" ), " %d %d %d %lX %X", &layer, &type, &net_code, + sscanf( line + SZ( "De" ), " %d %d %d %lX %X", &layer_num, &type, &net_code, &timeStamp, &flags_int ); + STATUS_FLAGS flags; + flags = static_cast( flags_int ); if( aStructType==PCB_TRACE_T && type==1 ) @@ -2097,7 +2301,7 @@ void LEGACY_PLUGIN::loadTrackList( int aStructType ) newTrack->SetEnd( wxPoint( end_x, end_y ) ); newTrack->SetWidth( width ); - newTrack->SetLayer( layer ); + newTrack->SetLayer( leg_layer2new( m_cu_count, layer_num ) ); if( makeType == PCB_VIA_T ) // Ensure layers are OK when possible: { @@ -2110,7 +2314,7 @@ void LEGACY_PLUGIN::loadTrackList( int aStructType ) via->SetDrill( drill ); if( via->GetViaType() == VIA_THROUGH ) - via->SetLayerPair( LAYER_N_FRONT, LAYER_N_BACK ); + via->SetLayerPair( F_Cu, B_Cu ); } newTrack->SetNetCode( getNetCode( net_code ) ); @@ -2266,8 +2470,8 @@ void LEGACY_PLUGIN::loadZONE_CONTAINER() else if( TESTLINE( "ZLayer" ) ) // layer found { - LAYER_NUM layer = layerParse( line + SZ( "ZLayer" ) ); - zc->SetLayer( layer ); + LAYER_NUM layer_num = layerParse( line + SZ( "ZLayer" ) ); + zc->SetLayer( leg_layer2new( m_cu_count, layer_num ) ); } else if( TESTLINE( "ZAux" ) ) // aux info found @@ -2500,7 +2704,7 @@ void LEGACY_PLUGIN::loadDIMENSION() else if( TESTLINE( "Ge" ) ) { - LAYER_NUM layer; + LAYER_NUM layer_num; time_t timestamp; int shape; int ilayer; @@ -2508,12 +2712,13 @@ void LEGACY_PLUGIN::loadDIMENSION() sscanf( line + SZ( "Ge" ), " %d %d %lX", &shape, &ilayer, ×tamp ); if( ilayer < FIRST_NON_COPPER_LAYER ) - layer = FIRST_NON_COPPER_LAYER; + layer_num = FIRST_NON_COPPER_LAYER; else if( ilayer > LAST_NON_COPPER_LAYER ) - layer = LAST_NON_COPPER_LAYER; - else layer = ilayer; + layer_num = LAST_NON_COPPER_LAYER; + else + layer_num = ilayer; - dim->SetLayer( layer ); + dim->SetLayer( leg_layer2new( m_cu_count, layer_num ) ); dim->SetTimeStamp( timestamp ); dim->SetShape( shape ); } @@ -2683,20 +2888,23 @@ void LEGACY_PLUGIN::loadPCB_TARGET() // sscanf( Line + 2, " %X %d %d %d %d %d %lX", &m_Shape, &m_Layer, &m_Pos.x, &m_Pos.y, &m_Size, &m_Width, &m_TimeStamp ); int shape = intParse( line + SZ( "Po" ), &data ); - LAYER_NUM layer = layerParse( data, &data ); + + LAYER_NUM layer_num = layerParse( data, &data ); + BIU pos_x = biuParse( data, &data ); BIU pos_y = biuParse( data, &data ); BIU size = biuParse( data, &data ); BIU width = biuParse( data, &data ); time_t timestamp = hexParse( data ); - if( layer < FIRST_NON_COPPER_LAYER ) - layer = FIRST_NON_COPPER_LAYER; + if( layer_num < FIRST_NON_COPPER_LAYER ) + layer_num = FIRST_NON_COPPER_LAYER; - else if( layer > LAST_NON_COPPER_LAYER ) - layer = LAST_NON_COPPER_LAYER; + else if( layer_num > LAST_NON_COPPER_LAYER ) + layer_num = LAST_NON_COPPER_LAYER; - PCB_TARGET* t = new PCB_TARGET( m_board, shape, layer, wxPoint( pos_x, pos_y ), size, width ); + PCB_TARGET* t = new PCB_TARGET( m_board, shape, leg_layer2new( m_cu_count, layer_num ), + wxPoint( pos_x, pos_y ), size, width ); m_board->Add( t, ADD_APPEND ); t->SetTimeStamp( timestamp ); @@ -2707,77 +2915,6 @@ void LEGACY_PLUGIN::loadPCB_TARGET() } -#define SPBUFZ 50 // wire all usages of this together. - -int LEGACY_PLUGIN::biuSprintf( char* buf, BIU aValue ) const -{ - double engUnits = biuToDisk * aValue; - int len; - - if( engUnits != 0.0 && fabsl( engUnits ) <= 0.0001 ) - { - len = snprintf( buf, SPBUFZ, "%.10f", engUnits ); - - while( --len > 0 && buf[len] == '0' ) - buf[len] = '\0'; - - ++len; - } - else - { - // The %.10g is about optimal since we are dealing with a bounded - // range on aValue, and we can be sure that there will never - // be a reason to have more than 6 digits to the right of the - // decimal point because we are converting from integer - // (signed whole numbers) nanometers to mm. A value of - // 0.000001 is one nanometer, the smallest positive nonzero value - // that we can ever have here. If you ever see a board file with - // more digits to the right of the decimal point than 6, this is a - // possibly a bug in a formatting string nearby. - len = snprintf( buf, SPBUFZ, "%.10g", engUnits ); - } - return len; -} - - -std::string LEGACY_PLUGIN::fmtBIU( BIU aValue ) const -{ - char temp[SPBUFZ]; - - int len = biuSprintf( temp, aValue ); - - return std::string( temp, len ); -} - - -std::string LEGACY_PLUGIN::fmtDEG( double aAngle ) const -{ - char temp[50]; - - // @todo a hook site to convert from tenths degrees to degrees for BOARD_FORMAT_VERSION 2. - - // MINGW: snprintf() comes from gcc folks, sprintf() comes from Microsoft. - int len = snprintf( temp, sizeof( temp ), "%.10g", aAngle ); - - return std::string( temp, len ); -} - - -std::string LEGACY_PLUGIN::fmtBIUPair( BIU first, BIU second ) const -{ - char temp[2*SPBUFZ+2]; - char* cp = temp; - - cp += biuSprintf( cp, first ); - - *cp++ = ' '; - - cp += biuSprintf( cp, second ); - - return std::string( temp, cp - temp ); -} - - BIU LEGACY_PLUGIN::biuParse( const char* aValue, const char** nptrptr ) { char* nptr; @@ -2848,6 +2985,7 @@ double LEGACY_PLUGIN::degParse( const char* aValue, const char** nptrptr ) void LEGACY_PLUGIN::init( const PROPERTIES* aProperties ) { + m_cu_count = 16; m_board = NULL; m_props = aProperties; @@ -2865,8 +3003,128 @@ void LEGACY_PLUGIN::init( const PROPERTIES* aProperties ) } +void LEGACY_PLUGIN::SaveModule3D( const MODULE* me ) const +{ + for( S3D_MASTER* t3D = me->Models(); t3D; t3D = t3D->Next() ) + { + if( !t3D->GetShape3DName().IsEmpty() ) + { + fprintf( m_fp, "$SHAPE3D\n" ); + + fprintf( m_fp, "Na %s\n", EscapedUTF8( t3D->GetShape3DName() ).c_str() ); + + fprintf(m_fp, +#if defined(DEBUG) + // use old formats for testing, just to verify compatibility + // using "diff", then switch to more concise form for release builds. + "Sc %lf %lf %lf\n", +#else + "Sc %.10g %.10g %.10g\n", +#endif + t3D->m_MatScale.x, + t3D->m_MatScale.y, + t3D->m_MatScale.z ); + + fprintf(m_fp, +#if defined(DEBUG) + "Of %lf %lf %lf\n", +#else + "Of %.10g %.10g %.10g\n", +#endif + t3D->m_MatPosition.x, + t3D->m_MatPosition.y, + t3D->m_MatPosition.z ); + + fprintf(m_fp, +#if defined(DEBUG) + "Ro %lf %lf %lf\n", +#else + "Ro %.10g %.10g %.10g\n", +#endif + t3D->m_MatRotation.x, + t3D->m_MatRotation.y, + t3D->m_MatRotation.z ); + + fprintf( m_fp, "$EndSHAPE3D\n" ); + } + } +} + + +#if 0 + //-------------------------------------------------------- +#define SPBUFZ 50 // wire all usages of this together. + +int LEGACY_PLUGIN::biuSprintf( char* buf, BIU aValue ) const +{ + double engUnits = biuToDisk * aValue; + int len; + + if( engUnits != 0.0 && fabsl( engUnits ) <= 0.0001 ) + { + len = snprintf( buf, SPBUFZ, "%.10f", engUnits ); + + while( --len > 0 && buf[len] == '0' ) + buf[len] = '\0'; + + ++len; + } + else + { + // The %.10g is about optimal since we are dealing with a bounded + // range on aValue, and we can be sure that there will never + // be a reason to have more than 6 digits to the right of the + // decimal point because we are converting from integer + // (signed whole numbers) nanometers to mm. A value of + // 0.000001 is one nanometer, the smallest positive nonzero value + // that we can ever have here. If you ever see a board file with + // more digits to the right of the decimal point than 6, this is a + // possibly a bug in a formatting string nearby. + len = snprintf( buf, SPBUFZ, "%.10g", engUnits ); + } + return len; +} + + +std::string LEGACY_PLUGIN::fmtBIU( BIU aValue ) const +{ + char temp[SPBUFZ]; + + int len = biuSprintf( temp, aValue ); + + return std::string( temp, len ); +} + + +std::string LEGACY_PLUGIN::fmtDEG( double aAngle ) const +{ + char temp[50]; + + // @todo a hook site to convert from tenths degrees to degrees for BOARD_FORMAT_VERSION 2. + + // MINGW: snprintf() comes from gcc folks, sprintf() comes from Microsoft. + int len = snprintf( temp, sizeof( temp ), "%.10g", aAngle ); + + return std::string( temp, len ); +} + + +std::string LEGACY_PLUGIN::fmtBIUPair( BIU first, BIU second ) const +{ + char temp[2*SPBUFZ+2]; + char* cp = temp; + + cp += biuSprintf( cp, first ); + + *cp++ = ' '; + + cp += biuSprintf( cp, second ); + + return std::string( temp, cp - temp ); +} + void LEGACY_PLUGIN::Save( const wxString& aFileName, BOARD* aBoard, const PROPERTIES* aProperties ) { LOCALE_IO toggle; // toggles on, then off, the C locale. @@ -2913,6 +3171,9 @@ do { \ } while(0) +// With the advent of the LSET expansion it was agreed to abort the legacy save since +// we'd have to expand the old format in order to suppor the new LAYER_IDs. + void LEGACY_PLUGIN::SaveBOARD( const BOARD* aBoard ) const { m_mapping->SetBoard( aBoard ); @@ -3016,7 +3277,7 @@ void LEGACY_PLUGIN::saveSETUP( const BOARD* aBoard ) const for( LAYER_NUM layer = FIRST_LAYER; layer <= LAST_COPPER_LAYER; ++layer ) { - if( layerMask & GetLayerMask( layer ) ) + if( layerMask & MASK( layer ) ) { fprintf( m_fp, "Layer[%d] %s %s\n", layer, TO_UTF8( aBoard->GetLayerName( layer ) ), @@ -3118,7 +3379,7 @@ void LEGACY_PLUGIN::saveBOARD_ITEMS( const BOARD* aBoard ) const // save the modules for( MODULE* m = aBoard->m_Modules; m; m = (MODULE*) m->Next() ) - SaveMODULE( m ); + saveMODULE( m ); // save the graphics owned by the board (not owned by a module) for( BOARD_ITEM* gr = aBoard->m_Drawings; gr; gr = gr->Next() ) @@ -3385,7 +3646,7 @@ void LEGACY_PLUGIN::savePAD( const D_PAD* me ) const THROW_IO_ERROR( wxString::Format( UNKNOWN_PAD_ATTRIBUTE, me->GetAttribute() ) ); } - fprintf( m_fp, "At %s N %08X\n", texttype, me->GetLayerMask() ); + fprintf( m_fp, "At %s N %08X\n", texttype, me->GetLayerSet() ); fprintf( m_fp, "Ne %d %s\n", m_mapping->Translate( me->GetNetCode() ), EscapedUTF8( me->GetNetname() ).c_str() ); @@ -3423,7 +3684,7 @@ void LEGACY_PLUGIN::savePAD( const D_PAD* me ) const } -void LEGACY_PLUGIN::SaveMODULE( const MODULE* me ) const +void LEGACY_PLUGIN::saveMODULE( const MODULE* me ) const { char statusTxt[3]; double orient = me->GetOrientation(); @@ -3527,54 +3788,6 @@ void LEGACY_PLUGIN::SaveMODULE( const MODULE* me ) const } -void LEGACY_PLUGIN::SaveModule3D( const MODULE* me ) const -{ - for( S3D_MASTER* t3D = me->Models(); t3D; t3D = t3D->Next() ) - { - if( !t3D->GetShape3DName().IsEmpty() ) - { - fprintf( m_fp, "$SHAPE3D\n" ); - - fprintf( m_fp, "Na %s\n", EscapedUTF8( t3D->GetShape3DName() ).c_str() ); - - fprintf(m_fp, -#if defined(DEBUG) - // use old formats for testing, just to verify compatibility - // using "diff", then switch to more concise form for release builds. - "Sc %lf %lf %lf\n", -#else - "Sc %.10g %.10g %.10g\n", -#endif - t3D->m_MatScale.x, - t3D->m_MatScale.y, - t3D->m_MatScale.z ); - - fprintf(m_fp, -#if defined(DEBUG) - "Of %lf %lf %lf\n", -#else - "Of %.10g %.10g %.10g\n", -#endif - t3D->m_MatPosition.x, - t3D->m_MatPosition.y, - t3D->m_MatPosition.z ); - - fprintf(m_fp, -#if defined(DEBUG) - "Ro %lf %lf %lf\n", -#else - "Ro %.10g %.10g %.10g\n", -#endif - t3D->m_MatRotation.x, - t3D->m_MatRotation.y, - t3D->m_MatRotation.z ); - - fprintf( m_fp, "$EndSHAPE3D\n" ); - } - } -} - - void LEGACY_PLUGIN::savePCB_TARGET( const PCB_TARGET* me ) const { fprintf( m_fp, "$PCB_TARGET\n" ); @@ -3891,6 +4104,8 @@ void LEGACY_PLUGIN::savePCB_TEXT( const TEXTE_PCB* me ) const fprintf( m_fp, "$EndTEXTPCB\n" ); } +#endif // NO LEGACY_PLUGIN::Save() + //------------------------------------------------- @@ -3925,7 +4140,7 @@ typedef MODULE_MAP::const_iterator MODULE_CITER; */ struct LP_CACHE { - LEGACY_PLUGIN* m_owner; // my owner, I need its LEGACY_PLUGIN::LoadMODULE() + LEGACY_PLUGIN* m_owner; // my owner, I need its LEGACY_PLUGIN::loadMODULE() wxString m_lib_path; wxDateTime m_mod_time; MODULE_MAP m_modules; // map or tuple of footprint_name vs. MODULE* @@ -4091,7 +4306,7 @@ void LP_CACHE::LoadModules( LINE_READER* aReader ) } #endif - m_owner->LoadMODULE( module.get() ); + m_owner->loadMODULE( module.get() ); MODULE* m = module.release(); // exceptions after this are not expected. @@ -4158,6 +4373,7 @@ void LP_CACHE::LoadModules( LINE_READER* aReader ) } +#if 0 void LP_CACHE::Save() { if( !m_writable ) @@ -4242,10 +4458,10 @@ void LP_CACHE::SaveModules( FILE* aFile ) for( MODULE_CITER it = m_modules.begin(); it != m_modules.end(); ++it ) { - m_owner->SaveMODULE( it->second ); + m_owner->saveMODULE( it->second ); } } - +#endif void LEGACY_PLUGIN::cacheLib( const wxString& aLibraryPath ) { @@ -4310,6 +4526,8 @@ MODULE* LEGACY_PLUGIN::FootprintLoad( const wxString& aLibraryPath, } +#if 0 // omit FootprintSave() + void LEGACY_PLUGIN::FootprintSave( const wxString& aLibraryPath, const MODULE* aFootprint, const PROPERTIES* aProperties ) { @@ -4346,7 +4564,7 @@ void LEGACY_PLUGIN::FootprintSave( const wxString& aLibraryPath, my_module->SetOrientation( 0 ); - if( my_module->GetLayer() != LAYER_N_FRONT ) + if( my_module->GetLayer() != F_Cu ) my_module->Flip( my_module->GetPosition() ); mods.insert( footprintName, my_module ); @@ -4403,6 +4621,8 @@ void LEGACY_PLUGIN::FootprintLibCreate( const wxString& aLibraryPath, const PROP m_cache->Load(); // update m_writable and m_mod_time } +#endif // omit FootprintSave() + bool LEGACY_PLUGIN::FootprintLibDelete( const wxString& aLibraryPath, const PROPERTIES* aProperties ) { @@ -4432,6 +4652,9 @@ bool LEGACY_PLUGIN::FootprintLibDelete( const wxString& aLibraryPath, const PROP bool LEGACY_PLUGIN::IsFootprintLibWritable( const wxString& aLibraryPath ) { +#if 0 // no support for 32 Cu layers in legacy format + return false; +#else LOCALE_IO toggle; init( NULL ); @@ -4439,10 +4662,12 @@ bool LEGACY_PLUGIN::IsFootprintLibWritable( const wxString& aLibraryPath ) cacheLib( aLibraryPath ); return m_cache->m_writable; +#endif } LEGACY_PLUGIN::LEGACY_PLUGIN() : + m_cu_count( 16 ), // for FootprintLoad() m_board( 0 ), m_props( 0 ), m_reader( 0 ), diff --git a/pcbnew/legacy_plugin.h b/pcbnew/legacy_plugin.h index 37f0ef2f45..519eecfa76 100644 --- a/pcbnew/legacy_plugin.h +++ b/pcbnew/legacy_plugin.h @@ -28,7 +28,7 @@ #include #include #include - +#include #define FOOTPRINT_LIBRARY_HEADER "PCBNEW-LibModule-V1" #define FOOTPRINT_LIBRARY_HEADER_CNT 18 @@ -61,8 +61,9 @@ struct LP_CACHE; */ class LEGACY_PLUGIN : public PLUGIN { -public: + friend struct LP_CACHE; +public: //--------------------------------------------------- @@ -78,20 +79,21 @@ public: BOARD* Load( const wxString& aFileName, BOARD* aAppendToMe, const PROPERTIES* aProperties = NULL ); + /* we let go of "save" support when the number of CU layers were expanded from 16 to 32. void Save( const wxString& aFileName, BOARD* aBoard, const PROPERTIES* aProperties = NULL ); + void FootprintSave( const wxString& aLibraryPath, const MODULE* aFootprint, + const PROPERTIES* aProperties = NULL ); + void FootprintDelete( const wxString& aLibraryPath, const wxString& aFootprintName, const PROPERTIES* aProperties = NULL ); + + void FootprintLibCreate( const wxString& aLibraryPath, const PROPERTIES* aProperties = NULL ); + */ + wxArrayString FootprintEnumerate( const wxString& aLibraryPath, const PROPERTIES* aProperties = NULL); MODULE* FootprintLoad( const wxString& aLibraryPath, const wxString& aFootprintName, const PROPERTIES* aProperties = NULL ); - void FootprintSave( const wxString& aLibraryPath, const MODULE* aFootprint, - const PROPERTIES* aProperties = NULL ); - - void FootprintDelete( const wxString& aLibraryPath, const wxString& aFootprintName, const PROPERTIES* aProperties = NULL ); - - void FootprintLibCreate( const wxString& aLibraryPath, const PROPERTIES* aProperties = NULL ); - bool FootprintLibDelete( const wxString& aLibraryPath, const PROPERTIES* aProperties = NULL ); bool IsFootprintLibWritable( const wxString& aLibraryPath ); @@ -106,14 +108,15 @@ public: void SetReader( LINE_READER* aReader ) { m_reader = aReader; } void SetFilePtr( FILE* aFile ) { m_fp = aFile; } - void LoadMODULE( MODULE* aModule ); - void SaveMODULE( const MODULE* aModule ) const; void SaveModule3D( const MODULE* aModule ) const; - void SaveBOARD( const BOARD* aBoard ) const; + static LAYER_ID leg_layer2new( int cu_count, LAYER_NUM aLayerNum ); + static LSET leg_mask2new( int cu_count, unsigned aMask ); protected: + int m_cu_count; + wxString m_error; ///< for throwing exceptions BOARD* m_board; ///< which BOARD, no ownership here const PROPERTIES* m_props; ///< passed via Save() or Load(), no ownership, may be NULL. @@ -200,6 +203,7 @@ protected: void loadNETINFO_ITEM(); void loadPCB_TEXT(); void loadNETCLASS(); + void loadMODULE( MODULE* aModule ); /** * Function loadTrackList @@ -218,7 +222,7 @@ protected: //---------------------------------------------------------- - +#if 0 /** * Function writeError * returns an error message wxString containing the filename being @@ -275,6 +279,7 @@ protected: void savePCB_LINE( const DRAWSEGMENT* aStroke ) const; void saveDIMENSION( const DIMENSION* aDimension ) const; void saveTRACK( const TRACK* aTrack ) const; + void saveBOARD( const BOARD* aBoard ) const; /** * Function saveZONE_CONTAINER @@ -283,11 +288,10 @@ protected: void saveZONE_CONTAINER( const ZONE_CONTAINER* aZone ) const; //--------------------------------------------------------- +#endif /// we only cache one footprint library for now, this determines which one. void cacheLib( const wxString& aLibraryPath ); - - friend struct LP_CACHE; }; #endif // LEGACY_PLUGIN_H_ diff --git a/pcbnew/loadcmp.cpp b/pcbnew/loadcmp.cpp index cd3f85d00d..baaf21f3c0 100644 --- a/pcbnew/loadcmp.cpp +++ b/pcbnew/loadcmp.cpp @@ -108,7 +108,7 @@ bool FOOTPRINT_EDIT_FRAME::Load_Module_From_BOARD( MODULE* aModule ) // Put it on FRONT layer, // because this is the default in ModEdit, and in libs - if( newModule->GetLayer() != LAYER_N_FRONT ) + if( newModule->GetLayer() != F_Cu ) newModule->Flip( newModule->GetPosition() ); // Put it in orientation 0, diff --git a/pcbnew/magnetic_tracks_functions.cpp b/pcbnew/magnetic_tracks_functions.cpp index 1c901cf760..3400c2b0d8 100644 --- a/pcbnew/magnetic_tracks_functions.cpp +++ b/pcbnew/magnetic_tracks_functions.cpp @@ -156,8 +156,8 @@ bool Magnetize( PCB_EDIT_FRAME* frame, int aCurrentTool, wxSize aGridSize, if( doPad ) { - LAYER_MSK layer_mask = GetLayerMask( screen->m_Active_Layer ); - D_PAD* pad = m_Pcb->GetPad( pos, layer_mask ); + LSET layer_mask( screen->m_Active_Layer ); + D_PAD* pad = m_Pcb->GetPad( pos, layer_mask ); if( pad ) { @@ -172,11 +172,11 @@ bool Magnetize( PCB_EDIT_FRAME* frame, int aCurrentTool, wxSize aGridSize, // after pads, only track & via tests remain, skip them if not desired if( doTrack ) { - LAYER_NUM layer = screen->m_Active_Layer; + LAYER_ID layer = screen->m_Active_Layer; for( TRACK* via = m_Pcb->m_Track; - via && (via = via->GetVia( *curpos, layer )) != NULL; - via = via->Next() ) + via && (via = via->GetVia( *curpos, layer )) != NULL; + via = via->Next() ) { if( via != currTrack ) // a via cannot influence itself { @@ -191,7 +191,7 @@ bool Magnetize( PCB_EDIT_FRAME* frame, int aCurrentTool, wxSize aGridSize, if( !currTrack ) { - LAYER_MSK layer_mask = GetLayerMask( layer ); + LSET layer_mask( layer ); TRACK* track = m_Pcb->GetTrack( m_Pcb->m_Track, pos, layer_mask ); diff --git a/pcbnew/module_editor_frame.h b/pcbnew/module_editor_frame.h index f20c032c12..1e10a01b09 100644 --- a/pcbnew/module_editor_frame.h +++ b/pcbnew/module_editor_frame.h @@ -178,7 +178,7 @@ public: * @param aPrintMirrorMode = not used here (Set when printing in mirror mode) * @param aData = a pointer on an auxiliary data (NULL if not used) */ - virtual void PrintPage( wxDC* aDC, LAYER_MSK aPrintMaskLayer, bool aPrintMirrorMode, + virtual void PrintPage( wxDC* aDC, LSET aPrintMaskLayer, bool aPrintMirrorMode, void * aData = NULL); // BOARD handling diff --git a/pcbnew/modules.cpp b/pcbnew/modules.cpp index 477feacaf6..d6a357e1bc 100644 --- a/pcbnew/modules.cpp +++ b/pcbnew/modules.cpp @@ -296,7 +296,7 @@ void PCB_EDIT_FRAME::Change_Side_Module( MODULE* Module, wxDC* DC ) if( Module == NULL ) return; - if( ( Module->GetLayer() != LAYER_N_FRONT ) && ( Module->GetLayer() != LAYER_N_BACK ) ) + if( ( Module->GetLayer() != F_Cu ) && ( Module->GetLayer() != B_Cu ) ) return; OnModify(); diff --git a/pcbnew/move_or_drag_track.cpp b/pcbnew/move_or_drag_track.cpp index 8156764d9b..6a36f6ade2 100644 --- a/pcbnew/move_or_drag_track.cpp +++ b/pcbnew/move_or_drag_track.cpp @@ -626,7 +626,7 @@ void PCB_EDIT_FRAME::StartMoveOneNodeOrSegment( TRACK* aTrack, wxDC* aDC, int aC if( aCommand != ID_POPUP_PCB_MOVE_TRACK_SEGMENT ) { Collect_TrackSegmentsToDrag( GetBoard(), aTrack->GetStart(), - aTrack->GetLayerMask(), + aTrack->GetLayerSet(), aTrack->GetNetCode(), aTrack->GetWidth() / 2 ); } @@ -646,17 +646,17 @@ void PCB_EDIT_FRAME::StartMoveOneNodeOrSegment( TRACK* aTrack, wxDC* aDC, int aC case ID_POPUP_PCB_DRAG_TRACK_SEGMENT: // drag a segment pos = aTrack->GetStart(); - Collect_TrackSegmentsToDrag( GetBoard(), pos, aTrack->GetLayerMask(), + Collect_TrackSegmentsToDrag( GetBoard(), pos, aTrack->GetLayerSet(), aTrack->GetNetCode(), aTrack->GetWidth() / 2 ); pos = aTrack->GetEnd(); aTrack->SetFlags( IS_DRAGGED | ENDPOINT | STARTPOINT ); - Collect_TrackSegmentsToDrag( GetBoard(), pos, aTrack->GetLayerMask(), + Collect_TrackSegmentsToDrag( GetBoard(), pos, aTrack->GetLayerSet(), aTrack->GetNetCode(), aTrack->GetWidth() / 2 ); break; case ID_POPUP_PCB_MOVE_TRACK_NODE: // Drag via or move node pos = (diag & STARTPOINT) ? aTrack->GetStart() : aTrack->GetEnd(); - Collect_TrackSegmentsToDrag( GetBoard(), pos, aTrack->GetLayerMask(), + Collect_TrackSegmentsToDrag( GetBoard(), pos, aTrack->GetLayerSet(), aTrack->GetNetCode(), aTrack->GetWidth() / 2 ); PosInit = pos; break; @@ -862,7 +862,8 @@ bool PCB_EDIT_FRAME::PlaceDraggedOrMovedTrackSegment( TRACK* Track, wxDC* DC ) /* Test the connections modified by the move * (only pad connection must be tested, track connection will be * tested by TestNetConnection() ) */ - LAYER_MSK layerMask = GetLayerMask( Track->GetLayer() ); + LSET layerMask( Track->GetLayer() ); + Track->start = GetBoard()->GetPadFast( Track->GetStart(), layerMask ); if( Track->start ) diff --git a/pcbnew/muonde.cpp b/pcbnew/muonde.cpp index ba2be9e2b4..3ac2545545 100644 --- a/pcbnew/muonde.cpp +++ b/pcbnew/muonde.cpp @@ -265,7 +265,7 @@ MODULE* PCB_EDIT_FRAME::Genere_Self( wxDC* DC ) pad->SetSize( wxSize( Mself.m_Width, Mself.m_Width ) ); - pad->SetLayerMask( GetLayerMask( module->GetLayer() ) ); + pad->SetLayerSet( LSET( module->GetLayer() ) ); pad->SetAttribute( PAD_SMD ); pad->SetShape( PAD_CIRCLE ); @@ -567,7 +567,7 @@ MODULE* PCB_EDIT_FRAME::Create_MuWaveBasicShape( const wxString& name, int pad_c pad->SetPosition( module->GetPosition() ); pad->SetShape( PAD_RECT ); pad->SetAttribute( PAD_SMD ); - pad->SetLayerMask( LAYER_FRONT ); + pad->SetLayerSet( F_Cu ); Line.Printf( wxT( "%d" ), pad_num ); pad->SetPadName( Line ); @@ -692,7 +692,7 @@ MODULE* PCB_EDIT_FRAME::Create_MuWaveComponent( int shape_type ) module->GraphicalItems().PushFront( edge ); edge->SetShape( S_POLYGON ); - edge->SetLayer( LAYER_N_FRONT ); + edge->SetLayer( F_Cu ); int numPoints = angle / 50 + 3; // Note: angles are in 0.1 degrees std::vector polyPoints = edge->GetPolyPoints(); @@ -992,7 +992,7 @@ MODULE* PCB_EDIT_FRAME::Create_MuWavePolygonShape() module->GraphicalItems().PushFront( edge ); edge->SetShape( S_POLYGON ); - edge->SetLayer( LAYER_N_FRONT ); + edge->SetLayer( F_Cu ); std::vector polyPoints = edge->GetPolyPoints(); polyPoints.reserve( 2 * PolyEdges.size() + 2 ); diff --git a/pcbnew/onleftclick.cpp b/pcbnew/onleftclick.cpp index 922d04e727..f423ff9889 100644 --- a/pcbnew/onleftclick.cpp +++ b/pcbnew/onleftclick.cpp @@ -326,7 +326,7 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition ) break; case ID_PCB_ADD_TEXT_BUTT: - if( IsLayerInList( EDGE_LAYER, GetActiveLayer() ) ) + if( Edge_Cuts == GetActiveLayer() ) { DisplayError( this, _( "Texts not allowed on Edge Cut layer" ) ); @@ -376,14 +376,13 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition ) break; case ID_PCB_DIMENSION_BUTT: - if( IsLayerInList( EDGE_LAYER|ALL_CU_LAYERS, GetActiveLayer() ) ) + if( IsCopperLayer( GetActiveLayer() ) || GetActiveLayer() == Edge_Cuts ) { - DisplayError( this, - _( "Dimension not allowed on Copper or Edge Cut layers" ) ); + DisplayError( this, _( "Dimension not allowed on Copper or Edge Cut layers" ) ); break; } - if( (DrawStruct == NULL) || (DrawStruct->GetFlags() == 0) ) + if( !DrawStruct || !DrawStruct->GetFlags() ) { DrawStruct = (BOARD_ITEM*) EditDimension( NULL, aDC ); SetCurItem( DrawStruct ); diff --git a/pcbnew/pad_edition_functions.cpp b/pcbnew/pad_edition_functions.cpp index 57907ad142..df4fc49c29 100644 --- a/pcbnew/pad_edition_functions.cpp +++ b/pcbnew/pad_edition_functions.cpp @@ -54,7 +54,7 @@ void PCB_BASE_FRAME::Export_Pad_Settings( D_PAD* aPad ) mp.SetShape( aPad->GetShape() ); mp.SetAttribute( aPad->GetAttribute() ); - mp.SetLayerMask( aPad->GetLayerMask() ); + mp.SetLayerSet( aPad->GetLayerSet() ); mp.SetOrientation( aPad->GetOrientation() - aPad->GetParent()->GetOrientation() ); @@ -82,7 +82,7 @@ void PCB_BASE_FRAME::Import_Pad_Settings( D_PAD* aPad, bool aDraw ) D_PAD& mp = GetDesignSettings().m_Pad_Master; aPad->SetShape( mp.GetShape() ); - aPad->SetLayerMask( mp.GetLayerMask() ); + aPad->SetLayerSet( mp.GetLayerSet() ); aPad->SetAttribute( mp.GetAttribute() ); aPad->SetOrientation( mp.GetOrientation() + aPad->GetParent()->GetOrientation() ); aPad->SetSize( mp.GetSize() ); diff --git a/pcbnew/pcad2kicadpcb_plugin/pcb.cpp b/pcbnew/pcad2kicadpcb_plugin/pcb.cpp index 6afde99801..4cfcbe48e4 100644 --- a/pcbnew/pcad2kicadpcb_plugin/pcb.cpp +++ b/pcbnew/pcad2kicadpcb_plugin/pcb.cpp @@ -48,7 +48,7 @@ namespace PCAD2KICAD { -LAYER_NUM PCB::GetKiCadLayer( int aPCadLayer ) +LAYER_ID PCB::GetKiCadLayer( int aPCadLayer ) { wxASSERT( aPCadLayer >= 0 && aPCadLayer < MAX_PCAD_LAYER_QTY ); return m_layersMap[aPCadLayer].KiCadLayer; @@ -74,23 +74,23 @@ PCB::PCB( BOARD* aBoard ) : PCB_MODULE( this, aBoard ) for( i = 0; i < MAX_PCAD_LAYER_QTY; i++ ) { - m_layersMap[i].KiCadLayer = SOLDERMASK_N_FRONT; // default - m_layersMap[i].layerType = LAYER_TYPE_NONSIGNAL; // default + m_layersMap[i].KiCadLayer = F_Mask; // default + m_layersMap[i].layerType = LAYER_TYPE_NONSIGNAL; // default m_layersMap[i].netNameRef = wxT( "" ); // default } m_sizeX = 0; m_sizeY = 0; - m_layersMap[1].KiCadLayer = LAST_COPPER_LAYER; - m_layersMap[1].layerType = LAYER_TYPE_SIGNAL; + m_layersMap[1].KiCadLayer = F_Cu; + m_layersMap[1].layerType = LAYER_TYPE_SIGNAL; - m_layersMap[2].KiCadLayer = FIRST_COPPER_LAYER; - m_layersMap[2].layerType = LAYER_TYPE_SIGNAL; + m_layersMap[2].KiCadLayer = B_Cu; + m_layersMap[2].layerType = LAYER_TYPE_SIGNAL; - m_layersMap[3].KiCadLayer = ECO2_N; - m_layersMap[6].KiCadLayer = SILKSCREEN_N_FRONT; - m_layersMap[7].KiCadLayer = SILKSCREEN_N_BACK; + m_layersMap[3].KiCadLayer = Eco2_User; + m_layersMap[6].KiCadLayer = F_SilkS; + m_layersMap[7].KiCadLayer = B_SilkS; m_timestamp_cnt = 0x10000000; } @@ -445,9 +445,10 @@ void PCB::ConnectPinToNet( wxString aCompRef, wxString aPinRef, wxString aNetNam } } + int PCB::FindLayer( wxString aLayerName ) { - for ( LAYER_NUM i = FIRST_COPPER_LAYER; i < (int)m_layersStackup.GetCount(); ++i ) + for( LAYER_NUM i = 0; i < (int)m_layersStackup.GetCount(); ++i ) { if( m_layersStackup[i] == aLayerName ) return i; @@ -456,6 +457,7 @@ int PCB::FindLayer( wxString aLayerName ) return -1; } + /* KiCad layers * 0 Copper layer * 1 to 14 Inner layers @@ -477,42 +479,46 @@ int PCB::FindLayer( wxString aLayerName ) void PCB::MapLayer( XNODE* aNode ) { wxString lName, layerType; - LAYER_NUM KiCadLayer; + LAYER_ID KiCadLayer; long num = 0; aNode->GetAttribute( wxT( "Name" ), &lName ); lName = lName.MakeUpper(); if( lName == wxT( "TOP ASSY" ) ) - KiCadLayer = COMMENT_N; + KiCadLayer = Cmts_User; else if( lName == wxT( "TOP SILK" ) ) - KiCadLayer = SILKSCREEN_N_FRONT; + KiCadLayer = F_SilkS; else if( lName == wxT( "TOP PASTE" ) ) - KiCadLayer = SOLDERPASTE_N_FRONT; + KiCadLayer = F_Paste; else if( lName == wxT( "TOP MASK" ) ) - KiCadLayer = SOLDERMASK_N_FRONT; + KiCadLayer = F_Mask; else if( lName == wxT( "TOP" ) ) - KiCadLayer = LAST_COPPER_LAYER; + KiCadLayer = F_Cu; else if( lName == wxT( "BOTTOM" ) ) - KiCadLayer = FIRST_COPPER_LAYER; + KiCadLayer = B_Cu; else if( lName == wxT( "BOT MASK" ) ) - KiCadLayer = SOLDERMASK_N_BACK; + KiCadLayer = B_Mask; else if( lName == wxT( "BOT PASTE" ) ) - KiCadLayer = SOLDERPASTE_N_BACK; + KiCadLayer = B_Paste; else if( lName == wxT( "BOT SILK" ) ) - KiCadLayer = SILKSCREEN_N_BACK; + KiCadLayer = B_SilkS; else if( lName == wxT( "BOT ASSY" ) ) - KiCadLayer = DRAW_N; + KiCadLayer = Dwgs_User; else if( lName == wxT( "BOARD" ) ) - KiCadLayer = EDGE_N; + KiCadLayer = Edge_Cuts; else { int layernum = FindLayer( lName ); if( layernum == -1 ) - KiCadLayer = DRAW_N; // default + KiCadLayer = Dwgs_User; // default else +#if 0 // was: KiCadLayer = FIRST_COPPER_LAYER + m_layersStackup.GetCount() - 1 - layernum; +#else + KiCadLayer = LAYER_ID( layernum ); +#endif } if( FindNode( aNode, wxT( "layerNum" ) ) ) @@ -591,7 +597,7 @@ void PCB::GetBoardOutline( wxXmlDocument* aXmlDoc, wxString aActualConversion ) if( FindNode( iNode, wxT( "layerNumRef" ) ) ) FindNode( iNode, wxT( "layerNumRef" ) )->GetNodeContent().ToLong( &PCadLayer ); - if( GetKiCadLayer( PCadLayer ) == EDGE_N ) + if( GetKiCadLayer( PCadLayer ) == Edge_Cuts ) { lNode = iNode->GetChildren(); while( lNode ) diff --git a/pcbnew/pcad2kicadpcb_plugin/pcb.h b/pcbnew/pcad2kicadpcb_plugin/pcb.h index baedea0e55..5d566ff29c 100644 --- a/pcbnew/pcad2kicadpcb_plugin/pcb.h +++ b/pcbnew/pcad2kicadpcb_plugin/pcb.h @@ -53,7 +53,7 @@ public: PCB( BOARD* aBoard ); ~PCB(); - LAYER_NUM GetKiCadLayer( int aPCadLayer ); + LAYER_ID GetKiCadLayer( int aPCadLayer ); LAYER_TYPE_T GetLayerType( int aPCadLayer ); wxString GetLayerNetNameRef( int aPCadLayer ); int GetNewTimestamp(); diff --git a/pcbnew/pcad2kicadpcb_plugin/pcb_callbacks.h b/pcbnew/pcad2kicadpcb_plugin/pcb_callbacks.h index a12dc70343..2c2b5f8a4b 100644 --- a/pcbnew/pcad2kicadpcb_plugin/pcb_callbacks.h +++ b/pcbnew/pcad2kicadpcb_plugin/pcb_callbacks.h @@ -42,7 +42,7 @@ enum LAYER_TYPE_T typedef struct _TLAYER { - LAYER_NUM KiCadLayer; + LAYER_ID KiCadLayer; LAYER_TYPE_T layerType; wxString netNameRef; } TLAYER; @@ -53,7 +53,7 @@ namespace PCAD2KICAD class PCB_CALLBACKS { public: - virtual LAYER_NUM GetKiCadLayer( int aPCadLayer ) = 0; + virtual LAYER_ID GetKiCadLayer( int aPCadLayer ) = 0; virtual LAYER_TYPE_T GetLayerType( int aPCadLayer ) = 0; virtual wxString GetLayerNetNameRef( int aPCadLayer ) = 0; virtual int GetNewTimestamp() = 0; diff --git a/pcbnew/pcad2kicadpcb_plugin/pcb_component.cpp b/pcbnew/pcad2kicadpcb_plugin/pcb_component.cpp index f551919ad8..44f5cd9467 100644 --- a/pcbnew/pcad2kicadpcb_plugin/pcb_component.cpp +++ b/pcbnew/pcad2kicadpcb_plugin/pcb_component.cpp @@ -43,7 +43,7 @@ PCB_COMPONENT::PCB_COMPONENT( PCB_CALLBACKS* aCallbacks, m_tag = 0; m_objType = wxT( '?' ); m_PCadLayer = 0; - m_KiCadLayer = LAYER_N_FRONT; // It *has* to be somewhere... + m_KiCadLayer = F_Cu; // It *has* to be somewhere... m_timestamp = 0; m_positionX = 0; m_positionY = 0; diff --git a/pcbnew/pcad2kicadpcb_plugin/pcb_component.h b/pcbnew/pcad2kicadpcb_plugin/pcb_component.h index 97c769f63e..41c55abf09 100644 --- a/pcbnew/pcad2kicadpcb_plugin/pcb_component.h +++ b/pcbnew/pcad2kicadpcb_plugin/pcb_component.h @@ -51,7 +51,7 @@ public: int m_tag; char m_objType; int m_PCadLayer; - LAYER_NUM m_KiCadLayer; + LAYER_ID m_KiCadLayer; int m_timestamp; int m_positionX; int m_positionY; @@ -70,7 +70,7 @@ public: virtual void AddToModule( MODULE* aModule ); virtual void AddToBoard() = 0; - LAYER_NUM GetKiCadLayer() { return m_callbacks->GetKiCadLayer( m_PCadLayer ); } + LAYER_ID GetKiCadLayer() { return m_callbacks->GetKiCadLayer( m_PCadLayer ); } int GetNewTimestamp() { return m_callbacks->GetNewTimestamp(); } int GetNetCode( wxString aNetName ) { return m_callbacks->GetNetCode( aNetName ); } diff --git a/pcbnew/pcad2kicadpcb_plugin/pcb_module.cpp b/pcbnew/pcad2kicadpcb_plugin/pcb_module.cpp index a04155d5a2..ce9020babd 100644 --- a/pcbnew/pcad2kicadpcb_plugin/pcb_module.cpp +++ b/pcbnew/pcad2kicadpcb_plugin/pcb_module.cpp @@ -51,7 +51,7 @@ PCB_MODULE::PCB_MODULE( PCB_CALLBACKS* aCallbacks, BOARD* aBoard ) : PCB_COMPONE InitTTextValue( &m_value ); m_mirror = 0; m_objType = wxT( 'M' ); // MODULE - m_KiCadLayer = SILKSCREEN_N_FRONT; // default + m_KiCadLayer = F_SilkS; // default } @@ -506,7 +506,7 @@ void PCB_MODULE::AddToBoard() m_board->Add( module, ADD_APPEND ); module->SetPosition( wxPoint( m_positionX, m_positionY ) ); - module->SetLayer( m_mirror ? LAYER_N_BACK : LAYER_N_FRONT ); + module->SetLayer( m_mirror ? B_Cu : F_Cu ); module->SetOrientation( m_rotation ); module->SetTimeStamp( 0 ); module->SetLastEditTime( 0 ); diff --git a/pcbnew/pcad2kicadpcb_plugin/pcb_pad.cpp b/pcbnew/pcad2kicadpcb_plugin/pcb_pad.cpp index c1e7c416b2..ca1346dab6 100644 --- a/pcbnew/pcad2kicadpcb_plugin/pcb_pad.cpp +++ b/pcbnew/pcad2kicadpcb_plugin/pcb_pad.cpp @@ -194,6 +194,7 @@ void PCB_PAD::AddToModule( MODULE* aModule, int aRotation, bool aEncapsulatedPad int height = 0; D_PAD* pad = new D_PAD( aModule ); + aModule->Pads().PushBack( pad ); if( !m_isHolePlated && m_hole ) @@ -206,7 +207,7 @@ void PCB_PAD::AddToModule( MODULE* aModule, int aRotation, bool aEncapsulatedPad pad->SetDrillSize( wxSize( m_hole, m_hole ) ); pad->SetSize( wxSize( m_hole, m_hole ) ); - pad->SetLayerMask( ALL_CU_LAYERS | SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT ); + pad->SetLayerSet( LSET::AllCuMask() | LSET( 3, B_Mask, F_Mask ) ); } else { @@ -219,21 +220,18 @@ void PCB_PAD::AddToModule( MODULE* aModule, int aRotation, bool aEncapsulatedPad if( padShape->m_width > 0 && padShape->m_height > 0 ) { - if( padShape->m_KiCadLayer == LAYER_N_FRONT - || padShape->m_KiCadLayer == LAYER_N_BACK ) + if( padShape->m_KiCadLayer == F_Cu || + padShape->m_KiCadLayer == B_Cu ) { padShapeName = padShape->m_shape; width = padShape->m_width; height = padShape->m_height; // assume this is SMD pad - if( padShape->m_KiCadLayer == LAYER_N_FRONT ) - pad->SetLayerMask( LAYER_FRONT | SOLDERPASTE_LAYER_FRONT | - SOLDERMASK_LAYER_FRONT ); + if( padShape->m_KiCadLayer == F_Cu ) + pad->SetLayerSet( LSET( 3, F_Cu, F_Paste, F_Mask ) ); else - pad->SetLayerMask( LAYER_BACK | SOLDERPASTE_LAYER_BACK | - SOLDERMASK_LAYER_BACK ); - + pad->SetLayerSet( LSET( 3, B_Cu, B_Paste, B_Mask ) ); break; } } @@ -241,7 +239,7 @@ void PCB_PAD::AddToModule( MODULE* aModule, int aRotation, bool aEncapsulatedPad if( padType == PAD_STANDARD ) // actually this is a thru-hole pad - pad->SetLayerMask( ALL_CU_LAYERS | SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT ); + pad->SetLayerSet( LSET::AllCuMask() | LSET( 2, B_Mask, F_Mask ) ); if( width == 0 || height == 0 ) THROW_IO_ERROR( wxT( "pad with zero size" ) ); @@ -313,8 +311,8 @@ void PCB_PAD::AddToBoard() if( padShape->m_width > 0 && padShape->m_height > 0 ) { - if( padShape->m_KiCadLayer == LAYER_N_FRONT - || padShape->m_KiCadLayer == LAYER_N_BACK ) + if( padShape->m_KiCadLayer == F_Cu + || padShape->m_KiCadLayer == B_Cu ) { width = padShape->m_width; height = padShape->m_height; @@ -339,7 +337,7 @@ void PCB_PAD::AddToBoard() via->SetWidth( height ); via->SetViaType( VIA_THROUGH ); - via->SetLayerPair( LAYER_N_FRONT, LAYER_N_BACK ); + via->SetLayerPair( F_Cu, B_Cu ); via->SetDrill( m_hole ); via->SetLayer( m_KiCadLayer ); diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 06eac0cef5..9a9ac26e31 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -61,7 +61,7 @@ PCB_RENDER_SETTINGS::PCB_RENDER_SETTINGS() void PCB_RENDER_SETTINGS::ImportLegacyColors( const COLORS_DESIGN_SETTINGS* aSettings ) { - for( int i = 0; i < NB_LAYERS; i++ ) + for( int i = 0; i < LAYER_ID_COUNT; i++ ) { m_layerColors[i] = m_legacyColorMap[aSettings->GetLayerColor( i )]; } @@ -84,8 +84,10 @@ void PCB_RENDER_SETTINGS::ImportLegacyColors( const COLORS_DESIGN_SETTINGS* aSet m_layerColors[ITEM_GAL_LAYER( DRC_VISIBLE )] = COLOR4D( 1.0, 0.0, 0.0, 0.8 ); // Netnames for copper layers - for( LAYER_NUM layer = FIRST_COPPER_LAYER; layer <= LAST_COPPER_LAYER; ++layer ) + for( LSEQ cu = LSET::AllCuMask().CuStack(); cu; ++cu ) { + LAYER_ID layer = *cu; + m_layerColors[GetNetnameLayer( layer )] = COLOR4D( 0.8, 0.8, 0.8, 0.7 ); } @@ -500,7 +502,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) size = VECTOR2D( aPad->GetDrillSize() ) / 2.0; shape = aPad->GetDrillShape() == PAD_DRILL_OBLONG ? PAD_OVAL : PAD_CIRCLE; } - else if( aLayer == SOLDERMASK_N_FRONT || aLayer == SOLDERMASK_N_BACK ) + else if( aLayer == F_Mask || aLayer == B_Mask ) { // Drawing soldermask int soldermaskMargin = aPad->GetSolderMaskMargin(); @@ -510,7 +512,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) aPad->GetSize().y / 2.0 + soldermaskMargin ); shape = aPad->GetShape(); } - else if( aLayer == SOLDERPASTE_N_FRONT || aLayer == SOLDERPASTE_N_BACK ) + else if( aLayer == F_Paste || aLayer == B_Paste ) { // Drawing solderpaste int solderpasteMargin = aPad->GetLocalSolderPasteMargin(); diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index 4bf36597af..d6f4b8fd31 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -62,20 +62,35 @@ void PCB_PARSER::init() // Add untranslated default (i.e. english) layernames. // Some may be overridden later if parsing a board rather than a footprint. // The english name will survive if parsing only a footprint. - for( LAYER_NUM layerNdx = FIRST_LAYER; layerNdx < NB_PCB_LAYERS; ++layerNdx ) + for( LAYER_NUM layer = 0; layer < LAYER_ID_COUNT; ++layer ) { - std::string untranslated = TO_UTF8( BOARD::GetStandardLayerName( layerNdx ) ); + std::string untranslated = TO_UTF8( wxString( LSET::Name( LAYER_ID( layer ) ) ) ); - m_layerIndices[ untranslated ] = layerNdx; - m_layerMasks[ untranslated ] = GetLayerMask( layerNdx ); + m_layerIndices[ untranslated ] = LAYER_ID( layer ); + m_layerMasks[ untranslated ] = LSET( layer ); } - m_layerMasks[ "*.Cu" ] = ALL_CU_LAYERS; - m_layerMasks[ "F&B.Cu" ] = LAYER_BACK | LAYER_FRONT; - m_layerMasks[ "*.Adhes" ] = ADHESIVE_LAYER_BACK | ADHESIVE_LAYER_FRONT; - m_layerMasks[ "*.Paste" ] = SOLDERPASTE_LAYER_BACK | SOLDERPASTE_LAYER_FRONT; - m_layerMasks[ "*.Mask" ] = SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT; - m_layerMasks[ "*.SilkS" ] = SILKSCREEN_LAYER_BACK | SILKSCREEN_LAYER_FRONT; + m_layerMasks[ "*.Cu" ] = LSET::AllCuMask(); + m_layerMasks[ "F&B.Cu" ] = LSET( 2, F_Cu, B_Cu ); + m_layerMasks[ "*.Adhes" ] = LSET( 2, B_Adhes, F_Adhes ); + m_layerMasks[ "*.Paste" ] = LSET( 2, B_Paste, F_Paste ); + m_layerMasks[ "*.Mask" ] = LSET( 2, B_Mask, F_Mask ); + m_layerMasks[ "*.SilkS" ] = LSET( 2, B_SilkS, F_SilkS ); + m_layerMasks[ "*.Fab" ] = LSET( 2, B_Fab, F_Fab ); + + // This is for the first pretty format, which had Inner1_Cu-Inner14_Cu with the numbering + // sequence reversed from the In1_Cu-In30_Cu version 2 pretty numbering scheme. + // Version 2 brought in an additional 16 Cu layers and flipped the cu stack but + // kept the gap between one of the outside layers and the last cu internal. + + for( int i=1; i<=14; ++i ) + { + char tmp[60]; + + sprintf( tmp, "Inner%d", i ); + + m_layerMasks[ tmp ] = LSET( In15_Cu - i ); + } } @@ -623,39 +638,38 @@ void PCB_PARSER::parseTITLE_BLOCK() throw( IO_ERROR, PARSE_ERROR ) break; case T_comment: - { - int commentNumber = parseInt( "comment" ); - - switch( commentNumber ) { - case 1: - NextTok(); - titleBlock.SetComment1( FromUTF8() ); - break; + int commentNumber = parseInt( "comment" ); - case 2: - NextTok(); - titleBlock.SetComment2( FromUTF8() ); - break; + switch( commentNumber ) + { + case 1: + NextTok(); + titleBlock.SetComment1( FromUTF8() ); + break; - case 3: - NextTok(); - titleBlock.SetComment3( FromUTF8() ); - break; + case 2: + NextTok(); + titleBlock.SetComment2( FromUTF8() ); + break; - case 4: - NextTok(); - titleBlock.SetComment4( FromUTF8() ); - break; + case 3: + NextTok(); + titleBlock.SetComment3( FromUTF8() ); + break; - default: - wxString err; - err.Printf( wxT( "%d is not a valid title block comment number" ), commentNumber ); - THROW_PARSE_ERROR( err, CurSource(), CurLine(), CurLineNumber(), CurOffset() ); + case 4: + NextTok(); + titleBlock.SetComment4( FromUTF8() ); + break; + + default: + wxString err; + err.Printf( wxT( "%d is not a valid title block comment number" ), commentNumber ); + THROW_PARSE_ERROR( err, CurSource(), CurLine(), CurLineNumber(), CurOffset() ); + } } - break; - } default: Expecting( "title, date, rev, company, or comment" ); @@ -668,72 +682,136 @@ void PCB_PARSER::parseTITLE_BLOCK() throw( IO_ERROR, PARSE_ERROR ) } +void PCB_PARSER::parseLayer( LAYER* aLayer ) throw( IO_ERROR, PARSE_ERROR ) +{ + T token; + + std::string name; + std::string type; + bool isVisible = true; + + if( CurTok() != T_LEFT ) + Expecting( T_LEFT ); + + // this layer_num is not used, we DO depend on LAYER_T however. + LAYER_NUM layer_num = parseInt( "layer index" ); + + NeedSYMBOL(); + name = CurText(); + + NeedSYMBOL(); + type = CurText(); + + token = NextTok(); + + if( token == T_hide ) + { + isVisible = false; + NeedRIGHT(); + } + else if( token != T_RIGHT ) + { + Expecting( "hide or )" ); + } + + aLayer->m_name = FROM_UTF8( name.c_str() ); + aLayer->m_type = LAYER::ParseType( type.c_str() ); + aLayer->m_number = layer_num; + aLayer->m_visible = isVisible; +} + + void PCB_PARSER::parseLayers() throw( IO_ERROR, PARSE_ERROR ) { wxCHECK_RET( CurTok() == T_layers, wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as layers." ) ); - T token; - std::string name; - std::string type; - LAYER_NUM layerIndex; - bool isVisible = true; - LAYER_MSK visibleLayers = NO_LAYERS; - LAYER_MSK enabledLayers = NO_LAYERS; - int copperLayerCount = 0; + T token; + LSET visibleLayers; + LSET enabledLayers; + int copperLayerCount = 0; + + std::vector cu; for( token = NextTok(); token != T_RIGHT; token = NextTok() ) { - if( token != T_LEFT ) - Expecting( T_LEFT ); + LAYER layer; - layerIndex = parseInt( "layer index" ); + parseLayer( &layer ); - NeedSYMBOL(); - name = CurText(); - - NeedSYMBOL(); - type = CurText(); - - token = NextTok(); - - if( token == T_hide ) + if( layer.m_type != LT_UNDEFINED ) // it's a copper layer { - isVisible = false; - NeedRIGHT(); + cu.push_back( layer ); + + DBG( printf( "cop m_visible:%s\n", cu.back().m_visible ? "true" : "false" );) } - else if( token == T_RIGHT ) + else // all non-copper are fixed names, simply look up LAYER_ID. { - isVisible = true; + // This is an edge triggered one shot if( test ) that happens on + // the first non copper layer, which follow all the Cu layers. + // This is the feature that the original *.kicad_pcb file format and + // the inverted Cu stack format had in common and is therefore a trick + // used to handle either. The layer number in the (layers ..) + // s-expression element are ignored. + if( cu.size() ) + { + // Rework the layer numbers, which changed when the Cu stack + // was flipped. So we instead use position in the list. + cu[cu.size()-1].m_number = B_Cu; + + for( unsigned i=0; i < cu.size()-1; ++i ) + { + cu[i].m_number = i; + } + + for( std::vector::const_iterator it = cu.begin(); itm_number ); + + if( it->m_visible ) + visibleLayers.set( it->m_number ); + + m_board->SetLayer( LAYER_ID( it->m_number ), *it ); + + m_layerIndices[ it->m_name ] = LAYER_ID( it->m_number ); + m_layerMasks[ it->m_name ] = LSET( it->m_number ); + } + + copperLayerCount = cu.size(); + + cu.clear(); // this marks the list as "one time processed". + } + + LAYER_ID_MAP::const_iterator it = m_layerIndices.find( layer.m_name ); + + if( it == m_layerIndices.end() ) + { + wxString error = wxString::Format( + _( "Layer '%s' in file <%s> at line %d, is not in fixed layer hash" ), + GetChars( layer.m_name ), + GetChars( CurSource() ), + CurLineNumber(), + CurOffset() + ); + + THROW_IO_ERROR( error ); + } + + layer.m_number = it->second; + + enabledLayers.set( layer.m_number ); + + if( layer.m_visible ) + visibleLayers.set( layer.m_number ); + + DBG( printf( "aux m_visible:%s\n", layer.m_visible ? "true" : "false" );) + + m_board->SetLayer( LAYER_ID( layer.m_number ), layer ); } - else - { - Expecting( "hide or )" ); - } - - enabledLayers |= GetLayerMask( layerIndex ); - - if( isVisible ) - visibleLayers |= GetLayerMask( layerIndex ); - - m_layerIndices[ name ] = layerIndex; - m_layerMasks[ name ] = GetLayerMask(layerIndex); - - wxString wname = FROM_UTF8( name.c_str() ); - enum LAYER_T layerType = LAYER::ParseType( type.c_str() ); - LAYER layer( wname, layerType, isVisible ); - - layer.SetFixedListIndex( layerIndex ); - m_board->SetLayer( layerIndex, layer ); - -// wxLogDebug( wxT( "Mapping layer %s to index %d" ), GetChars( wname ), layerIndex ); - - if( layerType != LT_UNDEFINED ) - copperLayerCount++; } // We need at least 2 copper layers and there must be an even number of them. - if( (copperLayerCount < 2) || ((copperLayerCount % 2) != 0) ) + if( copperLayerCount < 2 || (copperLayerCount % 2) != 0 ) { wxString err = wxString::Format( _( "%d is not a valid layer count" ), copperLayerCount ); @@ -742,8 +820,10 @@ void PCB_PARSER::parseLayers() throw( IO_ERROR, PARSE_ERROR ) } m_board->SetCopperLayerCount( copperLayerCount ); - m_board->SetVisibleLayers( visibleLayers ); m_board->SetEnabledLayers( enabledLayers ); + + // call SetEnabledLayers before SetVisibleLayers() + m_board->SetVisibleLayers( visibleLayers ); } @@ -776,14 +856,14 @@ T PCB_PARSER::lookUpLayer( const M& aMap ) throw( PARSE_ERROR, IO_ERROR ) } -LAYER_NUM PCB_PARSER::parseBoardItemLayer() throw( PARSE_ERROR, IO_ERROR ) +LAYER_ID PCB_PARSER::parseBoardItemLayer() throw( PARSE_ERROR, IO_ERROR ) { wxCHECK_MSG( CurTok() == T_layer, UNDEFINED_LAYER, wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as layer." ) ); NextTok(); - LAYER_NUM layerIndex = lookUpLayer( m_layerIndices ); + LAYER_ID layerIndex = lookUpLayer( m_layerIndices ); // Handle closing ) in object parser. @@ -791,17 +871,17 @@ LAYER_NUM PCB_PARSER::parseBoardItemLayer() throw( PARSE_ERROR, IO_ERROR ) } -LAYER_MSK PCB_PARSER::parseBoardItemLayersAsMask() throw( PARSE_ERROR, IO_ERROR ) +LSET PCB_PARSER::parseBoardItemLayersAsMask() throw( PARSE_ERROR, IO_ERROR ) { - wxCHECK_MSG( CurTok() == T_layers, NO_LAYERS, + wxCHECK_MSG( CurTok() == T_layers, LSET(), wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as item layer mask." ) ); - LAYER_MSK layerMask = NO_LAYERS; + LSET layerMask; for( T token = NextTok(); token != T_RIGHT; token = NextTok() ) { - LAYER_MSK mask = lookUpLayer( m_layerMasks ); + LSET mask = lookUpLayer( m_layerMasks ); layerMask |= mask; } @@ -2195,8 +2275,8 @@ D_PAD* PCB_PARSER::parseD_PAD( MODULE* aParent ) throw( IO_ERROR, PARSE_ERROR ) case T_layers: { - LAYER_MSK layerMask = parseBoardItemLayersAsMask(); - pad->SetLayerMask( layerMask ); + LSET layerMask = parseBoardItemLayersAsMask(); + pad->SetLayerSet( layerMask ); } break; @@ -2366,11 +2446,11 @@ VIA* PCB_PARSER::parseVIA() throw( IO_ERROR, PARSE_ERROR ) case T_layers: { - LAYER_NUM layer1, layer2; + LAYER_ID layer1, layer2; NextTok(); - layer1 = lookUpLayer( m_layerIndices ); + layer1 = lookUpLayer( m_layerIndices ); NextTok(); - layer2 = lookUpLayer( m_layerIndices ); + layer2 = lookUpLayer( m_layerIndices ); via->SetLayerPair( layer1, layer2 ); NeedRIGHT(); } @@ -2407,6 +2487,7 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER() throw( IO_ERROR, PARSE_ERROR ) wxT( " as ZONE_CONTAINER." ) ); CPolyLine::HATCH_STYLE hatchStyle = CPolyLine::NO_HATCH; + int hatchPitch = Mils2iu( CPolyLine::GetDefaultHatchPitchMils() ); wxPoint pt; T token; diff --git a/pcbnew/pcb_parser.h b/pcbnew/pcb_parser.h index 2169bf9ed5..4b223fc62c 100644 --- a/pcbnew/pcb_parser.h +++ b/pcbnew/pcb_parser.h @@ -31,7 +31,7 @@ #include #include -#include // LAYER_NUM +#include // LAYER_ID #include // KiROUND using namespace PCB_KEYS_T; @@ -52,6 +52,7 @@ class PCB_TARGET; class VIA; class S3D_MASTER; class ZONE_CONTAINER; +struct LAYER; /** @@ -61,12 +62,12 @@ class ZONE_CONTAINER; */ class PCB_PARSER : public PCB_LEXER { - typedef boost::unordered_map< std::string, LAYER_NUM > LAYER_NUM_MAP; - typedef boost::unordered_map< std::string, LAYER_MSK > LAYER_MSK_MAP; + typedef boost::unordered_map< std::string, LAYER_ID > LAYER_ID_MAP; + typedef boost::unordered_map< std::string, LSET > LSET_MAP; BOARD* m_board; - LAYER_NUM_MAP m_layerIndices; ///< map layer name to it's index - LAYER_MSK_MAP m_layerMasks; ///< map layer names to their masks + LAYER_ID_MAP m_layerIndices; ///< map layer name to it's index + LSET_MAP m_layerMasks; ///< map layer names to their masks std::vector m_netCodes; ///< net codes mapping for boards being loaded ///> Converts net code using the mapping table if available, @@ -91,7 +92,10 @@ class PCB_PARSER : public PCB_LEXER void parseGeneralSection() throw( IO_ERROR, PARSE_ERROR ); void parsePAGE_INFO() throw( IO_ERROR, PARSE_ERROR ); void parseTITLE_BLOCK() throw( IO_ERROR, PARSE_ERROR ); + void parseLayers() throw( IO_ERROR, PARSE_ERROR ); + void parseLayer( LAYER* aLayer ) throw( IO_ERROR, PARSE_ERROR ); + void parseSetup() throw( IO_ERROR, PARSE_ERROR ); void parseNETINFO_ITEM() throw( IO_ERROR, PARSE_ERROR ); void parseNETCLASS() throw( IO_ERROR, PARSE_ERROR ); @@ -138,7 +142,7 @@ class PCB_PARSER : public PCB_LEXER * @throw PARSE_ERROR if the layer syntax is incorrect. * @return The index the parsed #BOARD_ITEM layer. */ - LAYER_NUM parseBoardItemLayer() throw( IO_ERROR, PARSE_ERROR ); + LAYER_ID parseBoardItemLayer() throw( IO_ERROR, PARSE_ERROR ); /** * Function parseBoardItemLayersAsMask @@ -148,7 +152,7 @@ class PCB_PARSER : public PCB_LEXER * @throw PARSE_ERROR if the layers syntax is incorrect. * @return The mask of layers the parsed #BOARD_ITEM is on. */ - LAYER_MSK parseBoardItemLayersAsMask() throw( PARSE_ERROR, IO_ERROR ); + LSET parseBoardItemLayersAsMask() throw( PARSE_ERROR, IO_ERROR ); /** * Function parseXY diff --git a/pcbnew/pcb_plot_params.cpp b/pcbnew/pcb_plot_params.cpp index e8a1d8e3e0..77a15d112c 100644 --- a/pcbnew/pcb_plot_params.cpp +++ b/pcbnew/pcb_plot_params.cpp @@ -74,10 +74,9 @@ static bool setInt( int* aInt, int aValue, int aMin, int aMax ) // PCB_PLOT_PARAMS -PCB_PLOT_PARAMS::PCB_PLOT_PARAMS() +PCB_PLOT_PARAMS::PCB_PLOT_PARAMS() : + m_layerSelection( 4, B_Cu, F_Cu, F_SilkS, B_SilkS ) { - m_layerSelection = LAYER_BACK | LAYER_FRONT - | SILKSCREEN_LAYER_FRONT | SILKSCREEN_LAYER_BACK; m_useGerberExtensions = true; m_excludeEdgeLayer = true; m_lineWidth = g_DrawDefaultLineThickness; @@ -125,8 +124,10 @@ void PCB_PLOT_PARAMS::Format( OUTPUTFORMATTER* aFormatter, const char* trueStr = getTokenName( T_true ); aFormatter->Print( aNestLevel, "(%s\n", getTokenName( T_pcbplotparams ) ); - aFormatter->Print( aNestLevel+1, "(%s %ld)\n", getTokenName( T_layerselection ), - long(m_layerSelection) ); + + aFormatter->Print( aNestLevel+1, "(%s 0x%s)\n", getTokenName( T_layerselection ), + m_layerSelection.FmtHex().c_str() ); + aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_usegerberextensions ), m_useGerberExtensions ? trueStr : falseStr ); aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_excludeedgelayer ), @@ -306,7 +307,8 @@ PCB_PLOT_PARAMS_PARSER::PCB_PLOT_PARAMS_PARSER( char* aLine, const wxString& aSo void PCB_PLOT_PARAMS_PARSER::Parse( PCB_PLOT_PARAMS* aPcbPlotParams ) throw( PARSE_ERROR, IO_ERROR ) { - T token; + T token; + while( ( token = NextTok() ) != T_RIGHT ) { if( token == T_EOF) @@ -321,42 +323,75 @@ void PCB_PLOT_PARAMS_PARSER::Parse( PCB_PLOT_PARAMS* aPcbPlotParams ) switch( token ) { case T_layerselection: - token = NextTok(); - if( token != T_NUMBER ) - Expecting( T_NUMBER ); - aPcbPlotParams->m_layerSelection = atol( CurText() ); + { + token = NeedSYMBOLorNUMBER(); + + const std::string& cur = CurStr(); + + if( token == T_NUMBER ) // pretty 3 format had legacy Cu stack. + { + // unsigned legacy_mask = atol( cur.c_str() ); + + /* It's not possible to convert a legacy Cu layer number to a new + Cu layer number without knowing the number or total Cu layers + in the legacy board. We do not have that information here. + So simply set all layers ON. User can turn them off in the UI. + This is one of the superiorities of the new Cu sequence. + aPcbPlotParams->m_layerSelection = LEGACY_PLUGIN::leg_mask2new( cu_count, legacy_mask ); + */ + + // sorry, use the UI once to fix: + aPcbPlotParams->m_layerSelection = LSET( 4, B_Cu, F_Cu, F_SilkS, B_SilkS ); + } + else if( cur.find_first_of( "0x" ) == 0 ) // pretty ver. 4. + { + // skip the leading 2 0x bytes. + aPcbPlotParams->m_layerSelection.ParseHex( cur.c_str()+2, cur.size()-2 ); + } + else + Expecting( "integer or hex layerSelection" ); + } break; + case T_usegerberextensions: aPcbPlotParams->m_useGerberExtensions = parseBool(); break; + case T_psa4output: aPcbPlotParams->m_A4Output = parseBool(); break; + case T_excludeedgelayer: aPcbPlotParams->m_excludeEdgeLayer = parseBool(); break; + case T_linewidth: - { - // Due to a bug, this (minor) parameter was saved in biu - // and now is saved in mm - // If the read value is outside bounds, force a default value - double tmp = parseDouble(); - if( !aPcbPlotParams->SetLineWidth( KiROUND( tmp * IU_PER_MM ) ) ) - aPcbPlotParams->SetLineWidth( PLOT_LINEWIDTH_DEFAULT ); - } + { + // Due to a bug, this (minor) parameter was saved in biu + // and now is saved in mm + // If the read value is outside bounds, force a default value + double tmp = parseDouble(); + if( !aPcbPlotParams->SetLineWidth( KiROUND( tmp * IU_PER_MM ) ) ) + aPcbPlotParams->SetLineWidth( PLOT_LINEWIDTH_DEFAULT ); + } break; + case T_plotframeref: aPcbPlotParams->m_plotFrameRef = parseBool(); break; + case T_viasonmask: aPcbPlotParams->m_plotViaOnMaskLayer = parseBool(); break; + case T_mode: aPcbPlotParams->m_mode = static_cast( parseInt( 0, 2 ) ); break; + case T_useauxorigin: aPcbPlotParams->m_useAuxOrigin = parseBool(); break; + case T_hpglpennumber: aPcbPlotParams->m_HPGLPenNum = parseInt( HPGL_PEN_NUMBER_MIN, HPGL_PEN_NUMBER_MAX ); @@ -376,45 +411,58 @@ void PCB_PLOT_PARAMS_PARSER::Parse( PCB_PLOT_PARAMS* aPcbPlotParams ) case T_pscolor: NeedSYMBOL(); // This actually was never used... break; + case T_psnegative: aPcbPlotParams->m_negative = parseBool(); break; + case T_plotreference: aPcbPlotParams->m_plotReference = parseBool(); break; + case T_plotvalue: aPcbPlotParams->m_plotValue = parseBool(); break; + case T_plotothertext: // no more in use: keep for compatibility parseBool(); // skip param value break; + case T_plotinvisibletext: aPcbPlotParams->m_plotInvisibleText = parseBool(); break; + case T_padsonsilk: aPcbPlotParams->m_plotPadsOnSilkLayer= parseBool(); break; + case T_subtractmaskfromsilk: aPcbPlotParams->m_subtractMaskFromSilk = parseBool(); break; + case T_outputformat: aPcbPlotParams->m_format = static_cast( parseInt( PLOT_FIRST_FORMAT, PLOT_LAST_FORMAT ) ); break; + case T_mirror: aPcbPlotParams->m_mirror = parseBool(); break; + case T_drillshape: aPcbPlotParams->m_drillMarks = static_cast ( parseInt( 0, 2 ) ); break; + case T_scaleselection: aPcbPlotParams->m_scaleSelection = parseInt( 0, 4 ); break; + case T_outputdirectory: NeedSYMBOL(); aPcbPlotParams->m_outputDirectory = FROM_UTF8( CurText() ); break; + default: Unexpected( CurText() ); break; diff --git a/pcbnew/pcb_plot_params.h b/pcbnew/pcb_plot_params.h index 60f2b137cc..5a96864993 100644 --- a/pcbnew/pcb_plot_params.h +++ b/pcbnew/pcb_plot_params.h @@ -125,7 +125,7 @@ private: bool m_excludeEdgeLayer; /// Set of layers to plot - LAYER_MSK m_layerSelection; + LSET m_layerSelection; /** When plotting gerbers use a conventional set of extensions instead of * appending a suffix to the board name */ @@ -263,9 +263,8 @@ public: void SetSubtractMaskFromSilk( bool aSubtract ) { m_subtractMaskFromSilk = aSubtract; }; bool GetSubtractMaskFromSilk() const { return m_subtractMaskFromSilk; }; - void SetLayerSelection( long aSelection ) - { m_layerSelection = aSelection; }; - long GetLayerSelection() const { return m_layerSelection; }; + void SetLayerSelection( LSET aSelection ) { m_layerSelection = aSelection; }; + LSET GetLayerSelection() const { return m_layerSelection; }; void SetUseAuxOrigin( bool aAux ) { m_useAuxOrigin = aAux; }; bool GetUseAuxOrigin() const { return m_useAuxOrigin; }; diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index d9f4791969..7fd27d8807 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -52,13 +52,13 @@ #include #include #include -#include #include #include #include #include #include #include +#include #include #include @@ -818,7 +818,7 @@ void PCB_EDIT_FRAME::SetGridColor(EDA_COLOR_T aColor) bool PCB_EDIT_FRAME::IsMicroViaAcceptable() { int copperlayercnt = GetBoard()->GetCopperLayerCount( ); - LAYER_NUM currLayer = GetActiveLayer(); + LAYER_ID currLayer = GetActiveLayer(); if( !GetDesignSettings().m_MicroViasAllowed ) return false; // Obvious.. @@ -826,17 +826,17 @@ bool PCB_EDIT_FRAME::IsMicroViaAcceptable() if( copperlayercnt < 4 ) return false; // Only on multilayer boards.. - if( ( currLayer == LAYER_N_BACK ) - || ( currLayer == LAYER_N_FRONT ) + if( ( currLayer == B_Cu ) + || ( currLayer == F_Cu ) || ( currLayer == copperlayercnt - 2 ) - || ( currLayer == LAYER_N_2 ) ) + || ( currLayer == In1_Cu ) ) return true; return false; } -void PCB_EDIT_FRAME::SetHighContrastLayer( LAYER_NUM aLayer ) +void PCB_EDIT_FRAME::SetHighContrastLayer( LAYER_ID aLayer ) { // Set display settings for high contrast mode KIGFX::VIEW* view = GetGalCanvas()->GetView(); @@ -859,16 +859,16 @@ void PCB_EDIT_FRAME::SetHighContrastLayer( LAYER_NUM aLayer ) ITEM_GAL_LAYER( GP_OVERLAY ), ITEM_GAL_LAYER( RATSNEST_VISIBLE ) }; - for( unsigned int i = 0; i < sizeof( layers ) / sizeof( LAYER_NUM ); ++i ) + for( unsigned i = 0; i < DIM( layers ); ++i ) rSettings->SetActiveLayer( layers[i] ); // Pads should be shown too - if( aLayer == FIRST_COPPER_LAYER ) + if( aLayer == B_Cu ) { rSettings->SetActiveLayer( ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); rSettings->SetActiveLayer( NETNAMES_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ) ); } - else if( aLayer == LAST_COPPER_LAYER ) + else if( aLayer == F_Cu ) { rSettings->SetActiveLayer( ITEM_GAL_LAYER( PAD_FR_VISIBLE ) ); rSettings->SetActiveLayer( NETNAMES_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ) ); @@ -879,7 +879,7 @@ void PCB_EDIT_FRAME::SetHighContrastLayer( LAYER_NUM aLayer ) } -void PCB_EDIT_FRAME::SetTopLayer( LAYER_NUM aLayer ) +void PCB_EDIT_FRAME::SetTopLayer( LAYER_ID aLayer ) { // Set display settings for high contrast mode KIGFX::VIEW* view = GetGalCanvas()->GetView(); @@ -896,22 +896,22 @@ void PCB_EDIT_FRAME::SetTopLayer( LAYER_NUM aLayer ) GetNetnameLayer( aLayer ), ITEM_GAL_LAYER( VIA_THROUGH_VISIBLE ), ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), NETNAMES_GAL_LAYER( PADS_NETNAMES_VISIBLE ), - ITEM_GAL_LAYER( GP_OVERLAY ), ITEM_GAL_LAYER( RATSNEST_VISIBLE ), DRAW_N, + ITEM_GAL_LAYER( GP_OVERLAY ), ITEM_GAL_LAYER( RATSNEST_VISIBLE ), Dwgs_User, ITEM_GAL_LAYER( DRC_VISIBLE ) }; - for( unsigned int i = 0; i < sizeof( layers ) / sizeof( LAYER_NUM ); ++i ) + for( unsigned i = 0; i < DIM( layers ); ++i ) { view->SetTopLayer( layers[i] ); } // Pads should be shown too - if( aLayer == FIRST_COPPER_LAYER ) + if( aLayer == B_Cu ) { view->SetTopLayer( ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); view->SetTopLayer( NETNAMES_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ) ); } - else if( aLayer == LAST_COPPER_LAYER ) + else if( aLayer == F_Cu ) { view->SetTopLayer( ITEM_GAL_LAYER( PAD_FR_VISIBLE ) ); view->SetTopLayer( NETNAMES_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ) ); @@ -922,7 +922,7 @@ void PCB_EDIT_FRAME::SetTopLayer( LAYER_NUM aLayer ) } -void PCB_EDIT_FRAME::SetActiveLayer( LAYER_NUM aLayer, bool doLayerWidgetUpdate ) +void PCB_EDIT_FRAME::SetActiveLayer( LAYER_ID aLayer, bool doLayerWidgetUpdate ) { ( (PCB_SCREEN*) GetScreen() )->m_Active_Layer = aLayer; @@ -956,18 +956,18 @@ void PCB_EDIT_FRAME::syncLayerVisibilities() KIGFX::VIEW* view = GetGalCanvas()->GetView(); // Load layer & elements visibility settings - for( LAYER_NUM i = 0; i < NB_LAYERS; ++i ) + for( LAYER_NUM i = 0; i < LAYER_ID_COUNT; ++i ) { - view->SetLayerVisible( i, m_Pcb->IsLayerVisible( i ) ); + view->SetLayerVisible( i, m_Pcb->IsLayerVisible( LAYER_ID( i ) ) ); // Synchronize netname layers as well if( IsCopperLayer( i ) ) - view->SetLayerVisible( GetNetnameLayer( i ), m_Pcb->IsLayerVisible( i ) ); + view->SetLayerVisible( GetNetnameLayer( i ), m_Pcb->IsLayerVisible( LAYER_ID( i ) ) ); } for( LAYER_NUM i = 0; i < END_PCB_VISIBLE_LIST; ++i ) { - view->SetLayerVisible( ITEM_GAL_LAYER( i ), m_Pcb->IsElementVisible( i ) ); + view->SetLayerVisible( ITEM_GAL_LAYER( i ), m_Pcb->IsElementVisible( LAYER_ID( i ) ) ); } // Enable some layers that are GAL specific @@ -1064,9 +1064,18 @@ void PCB_EDIT_FRAME::OnModify( ) void PCB_EDIT_FRAME::SVG_Print( wxCommandEvent& event ) { - DIALOG_SVG_PRINT frame( this ); + PCB_PLOT_PARAMS tmp = GetPlotSettings(); - frame.ShowModal(); + // we don't want dialogs knowing about complex wxFrame functions so + // pass everything the dialog needs without reference to *this frame's class. + if( InvokeSVGPrint( this, GetBoard(), &tmp ) ) + { + if( tmp != GetPlotSettings() ) + { + SetPlotSettings( tmp ); + OnModify(); + } + } } diff --git a/pcbnew/pcbnew.cpp b/pcbnew/pcbnew.cpp index 793a537885..52d119f7ad 100644 --- a/pcbnew/pcbnew.cpp +++ b/pcbnew/pcbnew.cpp @@ -75,8 +75,8 @@ bool g_Track_45_Only_Allowed = true; // True to allow horiz, vert. and 4 bool g_Segments_45_Only; // True to allow horiz, vert. and 45deg only graphic segments bool g_TwoSegmentTrackBuild = true; -LAYER_NUM g_Route_Layer_TOP; -LAYER_NUM g_Route_Layer_BOTTOM; +LAYER_ID g_Route_Layer_TOP; +LAYER_ID g_Route_Layer_BOTTOM; int g_MaxLinksShowed; int g_MagneticPadOption = capture_cursor_in_track_tool; int g_MagneticTrackOption = capture_cursor_in_track_tool; diff --git a/pcbnew/pcbnew.h b/pcbnew/pcbnew.h index d2c6427ea6..59bdcbe799 100644 --- a/pcbnew/pcbnew.h +++ b/pcbnew/pcbnew.h @@ -27,7 +27,7 @@ /// Flag used in locate routines (from which endpoint work) enum ENDPOINT_T { - ENDPOINT_START = 0, + ENDPOINT_START = 0, ENDPOINT_END = 1 }; @@ -39,7 +39,7 @@ enum ENDPOINT_T { #define TEXTS_MAX_WIDTH DMils2iu( 5000 ) ///< Maximum text width in Pcbnew units value (0.5 inches) -/* Flag to force the SKETCH mode to display items (.m_Flags member) */ +// Flag to force the SKETCH mode to display items (.m_Flags member) #define FORCE_SKETCH ( IS_DRAGGED | IN_EDIT ) /* Name of the document footprint list @@ -50,26 +50,26 @@ enum ENDPOINT_T { */ extern wxString g_DocModulesFileName; -/* variables */ -extern bool g_Drc_On; -extern bool g_AutoDeleteOldTrack; -extern bool g_Show_Module_Ratsnest; -extern bool g_Raccord_45_Auto; -extern bool g_Track_45_Only_Allowed; -extern bool g_Alternate_Track_Posture; -extern bool g_Segments_45_Only; +// variables +extern bool g_Drc_On; +extern bool g_AutoDeleteOldTrack; +extern bool g_Show_Module_Ratsnest; +extern bool g_Raccord_45_Auto; +extern bool g_Track_45_Only_Allowed; +extern bool g_Alternate_Track_Posture; +extern bool g_Segments_45_Only; -/* Layer pair for auto routing and switch layers by hotkey */ -extern LAYER_NUM g_Route_Layer_TOP; -extern LAYER_NUM g_Route_Layer_BOTTOM; +// Layer pair for auto routing and switch layers by hotkey +extern LAYER_ID g_Route_Layer_TOP; +extern LAYER_ID g_Route_Layer_BOTTOM; -extern int g_MaxLinksShowed; // Max count links showed in routing -extern bool g_TwoSegmentTrackBuild; +extern int g_MaxLinksShowed; // Max count links showed in routing +extern bool g_TwoSegmentTrackBuild; -extern int g_MagneticPadOption; -extern int g_MagneticTrackOption; +extern int g_MagneticPadOption; +extern int g_MagneticTrackOption; -extern wxPoint g_Offset_Module; /* Offset trace when moving footprint. */ +extern wxPoint g_Offset_Module; // Offset trace when moving footprint. enum MagneticPadOptionValues { no_effect, @@ -78,4 +78,4 @@ enum MagneticPadOptionValues { }; -#endif /* PCBNEW_H */ +#endif // PCBNEW_H diff --git a/pcbnew/pcbnew_config.cpp b/pcbnew/pcbnew_config.cpp index 45ee46192e..e6c4b9c5e5 100644 --- a/pcbnew/pcbnew_config.cpp +++ b/pcbnew/pcbnew_config.cpp @@ -90,7 +90,21 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event ) case ID_PCB_LAYERS_SETUP: - InstallDialogLayerSetup(); + if( InvokeLayerSetup( this, GetBoard() ) ) + { + LAYER_ID cur_layer = GetActiveLayer(); + + // If after showing the dialog the user removed the active layer, + // then use a sensible alternative layer to set as the active layer. + if( !GetBoard()->GetEnabledLayers()[ cur_layer ] ) + cur_layer = F_Cu; + + SetActiveLayer( cur_layer, true ); + + OnModify(); + ReCreateLayerBox(); + ReFillLayerWidget(); + } break; case ID_PCB_LIB_TABLE_EDIT: @@ -312,151 +326,97 @@ PARAM_CFG_ARRAY PCB_EDIT_FRAME::GetProjectFileParameters() PARAM_CFG_ARRAY& PCB_EDIT_FRAME::GetConfigurationSettings() { - if( !m_configSettings.empty() ) - return m_configSettings; + if( m_configSettings.empty() ) + { + COLORS_DESIGN_SETTINGS cds; // constructor fills this with sensible colors - // Units used in dialogs and toolbars - m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "Units" ), - (int*)&g_UserUnit, MILLIMETRES ) ); + // Units used in dialogs and toolbars + m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "Units" ), + (int*)&g_UserUnit, MILLIMETRES ) ); - m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "DisplayPolarCoords" ), - &DisplayOpt.DisplayPolarCood, false ) ); - // Display options and modes: - m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "ViaHoleDisplayMode" ), - (int*) &DisplayOpt.m_DisplayViaMode, - VIA_SPECIAL_HOLE_SHOW, VIA_HOLE_NOT_SHOW, - OPT_VIA_HOLE_END - 1 ) ); - m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "ShowNetNamesMode" ), - &DisplayOpt.DisplayNetNamesMode, 3, 0, 3 ) ); - m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "DisplayTrackFilled" ), - &DisplayOpt.DisplayPcbTrackFill, true ) ); - m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "TrackDisplayClearance" ), - (int*) &DisplayOpt.ShowTrackClearanceMode, - SHOW_CLEARANCE_NEW_TRACKS_AND_VIA_AREAS ) ); - m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "PadFill" ), - &DisplayOpt.DisplayPadFill, true ) ); - m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "ViaFill" ), - &DisplayOpt.DisplayViaFill, true ) ); - m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "PadAffG" ), - &DisplayOpt.DisplayPadIsol, true ) ); - m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "PadSNum" ), - &DisplayOpt.DisplayPadNum, true ) ); - m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "ModAffC" ), - &DisplayOpt.DisplayModEdge, FILLED, 0, 2 ) ); - m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "ModAffT" ), - &DisplayOpt.DisplayModText, FILLED, 0, 2 ) ); - m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "PcbAffT" ), - &DisplayOpt.DisplayDrawItems, FILLED, 0, 2 ) ); - m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "PcbShowZonesMode" ), - &DisplayOpt.DisplayZonesMode, 0, 0, 2 ) ); + m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "DisplayPolarCoords" ), + &DisplayOpt.DisplayPolarCood, false ) ); + // Display options and modes: + m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "ViaHoleDisplayMode" ), + (int*) &DisplayOpt.m_DisplayViaMode, + VIA_SPECIAL_HOLE_SHOW, VIA_HOLE_NOT_SHOW, + OPT_VIA_HOLE_END - 1 ) ); + m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "ShowNetNamesMode" ), + &DisplayOpt.DisplayNetNamesMode, 3, 0, 3 ) ); + m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "DisplayTrackFilled" ), + &DisplayOpt.DisplayPcbTrackFill, true ) ); + m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "TrackDisplayClearance" ), + (int*) &DisplayOpt.ShowTrackClearanceMode, + SHOW_CLEARANCE_NEW_TRACKS_AND_VIA_AREAS ) ); + m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "PadFill" ), + &DisplayOpt.DisplayPadFill, true ) ); + m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "ViaFill" ), + &DisplayOpt.DisplayViaFill, true ) ); + m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "PadAffG" ), + &DisplayOpt.DisplayPadIsol, true ) ); + m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "PadSNum" ), + &DisplayOpt.DisplayPadNum, true ) ); + m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "ModAffC" ), + &DisplayOpt.DisplayModEdge, FILLED, 0, 2 ) ); + m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "ModAffT" ), + &DisplayOpt.DisplayModText, FILLED, 0, 2 ) ); + m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "PcbAffT" ), + &DisplayOpt.DisplayDrawItems, FILLED, 0, 2 ) ); + m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "PcbShowZonesMode" ), + &DisplayOpt.DisplayZonesMode, 0, 0, 2 ) ); - // Colors: - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorLayer0Ex" ), LOC_COLOR( 0 ), - GREEN ) ); - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorLayer1Ex" ), LOC_COLOR( 1 ), - BLUE ) ); - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorLayer2Ex" ), LOC_COLOR( 2 ), - LIGHTGRAY ) ); - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorLayer3Ex" ), LOC_COLOR( 3 ), - MAGENTA ) ); - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorLayer4Ex" ), LOC_COLOR( 4 ), - RED ) ); - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorLayer5Ex" ), LOC_COLOR( 5 ), - MAGENTA ) ); - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorLayer6Ex" ), LOC_COLOR( 6 ), - BROWN ) ); - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorLayer7Ex" ), LOC_COLOR( 7 ), - MAGENTA ) ); - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorLayer8Ex" ), LOC_COLOR( 8 ), - LIGHTGRAY ) ); - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorLayer9Ex" ), LOC_COLOR( 9 ), - BLUE ) ); - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorLayer10Ex" ), LOC_COLOR( 10 ), - GREEN ) ); - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorLayer11Ex" ), LOC_COLOR( 11 ), - CYAN ) ); - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorLayer12Ex" ), LOC_COLOR( 12 ), - LIGHTRED ) ); - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorLayer13Ex" ), LOC_COLOR( 13 ), - LIGHTMAGENTA ) ); - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorLayer14Ex" ), LOC_COLOR( 14 ), - YELLOW ) ); - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorLayer15Ex" ), LOC_COLOR( 15 ), - RED ) ); - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorLayer16Ex" ), LOC_COLOR( 16 ), - BLUE ) ); - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorLayer17Ex" ), LOC_COLOR( 17 ), - MAGENTA ) ); - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorLayer18Ex" ), LOC_COLOR( 18 ), - LIGHTCYAN ) ); - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorLayer19Ex" ), LOC_COLOR( 19 ), - RED ) ); - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorLayer20Ex" ), LOC_COLOR( 20 ), - MAGENTA ) ); - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorLayer21Ex" ), LOC_COLOR( 21 ), - CYAN ) ); - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorLayer22Ex" ), LOC_COLOR( 22 ), - BROWN ) ); - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorLayer23Ex" ), LOC_COLOR( 23 ), - MAGENTA ) ); - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorLayer24Ex" ), LOC_COLOR( 24 ), - LIGHTGRAY ) ); - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorLayer25Ex" ), LOC_COLOR( 25 ), - BLUE ) ); - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorLayer26Ex" ), LOC_COLOR( 26 ), - GREEN ) ); - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorLayer27Ex" ), LOC_COLOR( 27 ), - YELLOW ) ); - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorLayer28Ex" ), LOC_COLOR( 28 ), - YELLOW ) ); - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorLayer29Ex" ), LOC_COLOR( 29 ), - LIGHTMAGENTA ) ); - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorLayer30Ex" ), LOC_COLOR( 30 ), - YELLOW ) ); - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorLayer31Ex" ), LOC_COLOR( 31 ), - LIGHTGRAY ) ); - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorTxtFrontEx" ), - ITEM_COLOR( MOD_TEXT_FR_VISIBLE ), - LIGHTGRAY ) ); - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorTxtBackEx" ), - ITEM_COLOR( MOD_TEXT_BK_VISIBLE ), - BLUE ) ); - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorTxtInvisEx" ), - ITEM_COLOR( MOD_TEXT_INVISIBLE ), - DARKGRAY ) ); - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorAnchorEx" ), - ITEM_COLOR( ANCHOR_VISIBLE ), BLUE ) ); - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorPadBackEx" ), - ITEM_COLOR( PAD_BK_VISIBLE ), GREEN ) ); - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorPadFrontEx" ), - ITEM_COLOR( PAD_FR_VISIBLE ), RED ) ); - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorViaThruEx" ), - ITEM_COLOR( VIA_THROUGH_VISIBLE ), - LIGHTGRAY ) ); - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorViaBBlindEx" ), - ITEM_COLOR( VIA_BBLIND_VISIBLE ), - BROWN ) ); - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorViaMicroEx" ), - ITEM_COLOR( VIA_MICROVIA_VISIBLE ), - CYAN ) ); - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorNonPlatedEx" ), - ITEM_COLOR( NON_PLATED_VISIBLE ), - YELLOW ) ); - m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorRatsEx" ), - ITEM_COLOR( RATSNEST_VISIBLE ), - WHITE ) ); + // layer colors: + for( int i = 0; i -wxString GetGerberExtension( LAYER_NUM layer ) +const wxString GetGerberExtension( LAYER_NUM aLayer ) { - switch( layer ) + if( IsCopperLayer( aLayer ) ) { - case LAYER_N_FRONT: - return wxString( wxT( "gtl" ) ); + if( aLayer == F_Cu ) + return wxT( "gtl" ); + else if( aLayer == B_Cu ) + return wxT( "gbl" ); + else + { + return wxT( "gbr" ); + } + } + else + { + switch( aLayer ) + { + case B_Adhes: return wxT( "gba" ); + case F_Adhes: return wxT( "gta" ); - case LAYER_N_2: - case LAYER_N_3: - case LAYER_N_4: - case LAYER_N_5: - case LAYER_N_6: - case LAYER_N_7: - case LAYER_N_8: - case LAYER_N_9: - case LAYER_N_10: - case LAYER_N_11: - case LAYER_N_12: - case LAYER_N_13: - case LAYER_N_14: - case LAYER_N_15: + case B_Paste: return wxT( "gbp" ); + case F_Paste: return wxT( "gtp" ); - // TODO: see if we use .gbr or a layer identifier (gb1 .. gbnn ?) - // according to the new internal layers designation - // (1 is the first internal layer from the front layer) - return wxString( wxT( "gbr" ) ); + case B_SilkS: return wxT( "gbo" ); + case F_SilkS: return wxT( "gto" ); - case LAYER_N_BACK: - return wxString( wxT( "gbl" ) ); + case B_Mask: return wxT( "gbs" ); + case F_Mask: return wxT( "gts" ); - case ADHESIVE_N_BACK: - return wxString( wxT( "gba" ) ); - - case ADHESIVE_N_FRONT: - return wxString( wxT( "gta" ) ); - - case SOLDERPASTE_N_BACK: - return wxString( wxT( "gbp" ) ); - - case SOLDERPASTE_N_FRONT: - return wxString( wxT( "gtp" ) ); - - case SILKSCREEN_N_BACK: - return wxString( wxT( "gbo" ) ); - - case SILKSCREEN_N_FRONT: - return wxString( wxT( "gto" ) ); - - case SOLDERMASK_N_BACK: - return wxString( wxT( "gbs" ) ); - - case SOLDERMASK_N_FRONT: - return wxString( wxT( "gts" ) ); - - case DRAW_N: - case COMMENT_N: - case ECO1_N: - case ECO2_N: - case EDGE_N: - default: - return wxString( wxT( "gbr" ) ); + case Dwgs_User: + case Cmts_User: + case Eco1_User: + case Eco2_User: + case Edge_Cuts: + default: return wxT( "gbr" ); + } } } diff --git a/pcbnew/pcbplot.h b/pcbnew/pcbplot.h index 50c607e25f..51ef72342f 100644 --- a/pcbnew/pcbplot.h +++ b/pcbnew/pcbplot.h @@ -69,16 +69,15 @@ class REPORTER; // A helper class to plot board items -class BRDITEMS_PLOTTER: public PCB_PLOT_PARAMS +class BRDITEMS_PLOTTER : public PCB_PLOT_PARAMS { - PLOTTER* m_plotter; - BOARD* m_board; - int m_layerMask; - + PLOTTER* m_plotter; + BOARD* m_board; + LSET m_layerMask; public: - BRDITEMS_PLOTTER( PLOTTER* aPlotter, BOARD* aBoard, const PCB_PLOT_PARAMS& aPlotOpts ) - : PCB_PLOT_PARAMS( aPlotOpts ) + BRDITEMS_PLOTTER( PLOTTER* aPlotter, BOARD* aBoard, const PCB_PLOT_PARAMS& aPlotOpts ) : + PCB_PLOT_PARAMS( aPlotOpts ) { m_plotter = aPlotter; m_board = aBoard; @@ -99,7 +98,7 @@ public: } // Basic functions to plot a board item - void SetLayerMask( int aLayerMask ){ m_layerMask = aLayerMask; } + void SetLayerSet( LSET aLayerMask ) { m_layerMask = aLayerMask; } void Plot_Edges_Modules(); void Plot_1_EdgeModule( EDGE_MODULE* aEdge ); void PlotTextModule( TEXTE_MODULE* aTextMod, EDA_COLOR_T aColor ); @@ -201,7 +200,7 @@ void PlotOneBoardLayer( BOARD *aBoard, PLOTTER* aPlotter, LAYER_NUM aLayer, * SetDrillMarksType( DrillMarksType aVal ) controle the actual hole: * no hole, small hole, actual hole */ -void PlotStandardLayer( BOARD* aBoard, PLOTTER* aPlotter, LAYER_MSK aLayerMask, +void PlotStandardLayer( BOARD* aBoard, PLOTTER* aPlotter, LSET aLayerMask, const PCB_PLOT_PARAMS& aPlotOpt ); /** @@ -213,7 +212,7 @@ void PlotStandardLayer( BOARD* aBoard, PLOTTER* aPlotter, LAYER_MSK aLayerMask, * @param aPlotOpt = the plot options. Has meaning for some formats only */ void PlotLayerOutlines( BOARD *aBoard, PLOTTER* aPlotter, - LAYER_MSK aLayerMask, const PCB_PLOT_PARAMS& aPlotOpt ); + LSET aLayerMask, const PCB_PLOT_PARAMS& aPlotOpt ); /** * Function PlotSilkScreen @@ -224,7 +223,7 @@ void PlotLayerOutlines( BOARD *aBoard, PLOTTER* aPlotter, * @param aLayerMask = the mask to define the layers to plot (silkscreen Front and/or Back) * @param aPlotOpt = the plot options (files, sketch). Has meaning for some formats only */ -void PlotSilkScreen( BOARD* aBoard, PLOTTER* aPlotter, LAYER_MSK aLayerMask, +void PlotSilkScreen( BOARD* aBoard, PLOTTER* aPlotter, LSET aLayerMask, const PCB_PLOT_PARAMS& aPlotOpt ); @@ -263,7 +262,7 @@ void BuildPlotFileName( wxFileName* aFilename, * Function GetGerberExtension * @return the appropriate Gerber file extension for \a aLayer */ -extern wxString GetGerberExtension( LAYER_NUM aLayer ); +const wxString GetGerberExtension( LAYER_NUM aLayer ); // PLOTGERB.CPP diff --git a/pcbnew/plot_board_layers.cpp b/pcbnew/plot_board_layers.cpp index a0d05647b1..083be5d1b7 100644 --- a/pcbnew/plot_board_layers.cpp +++ b/pcbnew/plot_board_layers.cpp @@ -58,18 +58,18 @@ * unless the minimum thickness is 0. */ static void PlotSolderMaskLayer( BOARD *aBoard, PLOTTER* aPlotter, - LAYER_MSK aLayerMask, const PCB_PLOT_PARAMS& aPlotOpt, + LSET aLayerMask, const PCB_PLOT_PARAMS& aPlotOpt, int aMinThickness ); /* Creates the plot for silkscreen layers * Silkscreen layers have specific requirement for pads (not filled) and texts * (with option to remove them from some copper areas (pads...) */ -void PlotSilkScreen( BOARD *aBoard, PLOTTER* aPlotter, LAYER_MSK aLayerMask, +void PlotSilkScreen( BOARD *aBoard, PLOTTER* aPlotter, LSET aLayerMask, const PCB_PLOT_PARAMS& aPlotOpt ) { BRDITEMS_PLOTTER itemplotter( aPlotter, aBoard, aPlotOpt ); - itemplotter.SetLayerMask( aLayerMask ); + itemplotter.SetLayerSet( aLayerMask ); // Plot edge layer and graphic items itemplotter.PlotBoardGraphicItems(); @@ -78,29 +78,31 @@ void PlotSilkScreen( BOARD *aBoard, PLOTTER* aPlotter, LAYER_MSK aLayerMask, itemplotter.Plot_Edges_Modules(); // Plot pads (creates pads outlines, for pads on silkscreen layers) - int layersmask_plotpads = aLayerMask; + LSET layersmask_plotpads = aLayerMask; + // Calculate the mask layers of allowed layers for pads if( !aPlotOpt.GetPlotPadsOnSilkLayer() ) // Do not plot pads on silk screen layers - layersmask_plotpads &= ~(SILKSCREEN_LAYER_BACK | SILKSCREEN_LAYER_FRONT ); + layersmask_plotpads.set( B_SilkS, false ).set( F_SilkS, false ); - if( layersmask_plotpads ) + if( layersmask_plotpads.any() ) { for( MODULE* Module = aBoard->m_Modules; Module; Module = Module->Next() ) { - for( D_PAD * pad = Module->Pads(); pad != NULL; pad = pad->Next() ) + for( D_PAD * pad = Module->Pads(); pad; pad = pad->Next() ) { // See if the pad is on this layer - LAYER_MSK masklayer = pad->GetLayerMask(); - if( (masklayer & layersmask_plotpads) == 0 ) + LSET masklayer = pad->GetLayerSet(); + if( !( masklayer & layersmask_plotpads ).any() ) continue; - EDA_COLOR_T color = ColorFromInt(0); - if( (layersmask_plotpads & SILKSCREEN_LAYER_BACK) ) - color = aBoard->GetLayerColor( SILKSCREEN_N_BACK ); + EDA_COLOR_T color = ColorFromInt( 0 ); - if((layersmask_plotpads & SILKSCREEN_LAYER_FRONT ) ) - color = ColorFromInt( color | aBoard->GetLayerColor( SILKSCREEN_N_FRONT ) ); + if( layersmask_plotpads[B_SilkS] ) + color = aBoard->GetLayerColor( B_SilkS ); + + if( layersmask_plotpads[F_SilkS] ) + color = ColorFromInt( color | aBoard->GetLayerColor( F_SilkS ) ); itemplotter.PlotPad( pad, color, LINE ); } @@ -122,7 +124,7 @@ void PlotSilkScreen( BOARD *aBoard, PLOTTER* aPlotter, LAYER_MSK aLayerMask, { ZONE_CONTAINER* edge_zone = aBoard->GetArea( ii ); - if( ( GetLayerMask( edge_zone->GetLayer() ) & aLayerMask ) == 0 ) + if( !aLayerMask[ edge_zone->GetLayer() ] ) continue; itemplotter.PlotFilledAreas( edge_zone ); @@ -130,9 +132,9 @@ void PlotSilkScreen( BOARD *aBoard, PLOTTER* aPlotter, LAYER_MSK aLayerMask, // Plot segments used to fill zone areas (outdated, but here for old boards // compatibility): - for( SEGZONE* seg = aBoard->m_Zone; seg != NULL; seg = seg->Next() ) + for( SEGZONE* seg = aBoard->m_Zone; seg; seg = seg->Next() ) { - if( ( GetLayerMask( seg->GetLayer() ) & aLayerMask ) == 0 ) + if( !aLayerMask[ seg->GetLayer() ] ) continue; aPlotter->ThickSegment( seg->GetStart(), seg->GetEnd(), seg->GetWidth(), @@ -152,29 +154,13 @@ void PlotOneBoardLayer( BOARD *aBoard, PLOTTER* aPlotter, LAYER_NUM aLayer, // Specify that the contents of the "Edges Pcb" layer are to be plotted // in addition to the contents of the currently specified layer. - LAYER_MSK layer_mask = GetLayerMask( aLayer ); + LSET layer_mask( aLayer ); if( !aPlotOpt.GetExcludeEdgeLayer() ) - layer_mask |= EDGE_LAYER; + layer_mask.set( Edge_Cuts ); - switch( aLayer ) + if( IsCopperLayer( aLayer ) ) { - case FIRST_COPPER_LAYER: - case LAYER_N_2: - case LAYER_N_3: - case LAYER_N_4: - case LAYER_N_5: - case LAYER_N_6: - case LAYER_N_7: - case LAYER_N_8: - case LAYER_N_9: - case LAYER_N_10: - case LAYER_N_11: - case LAYER_N_12: - case LAYER_N_13: - case LAYER_N_14: - case LAYER_N_15: - case LAST_COPPER_LAYER: // Skip NPTH pads on copper layers ( only if hole size == pad size ): // Drill mark will be plotted, // if drill mark is SMALL_DRILL_SHAPE or FULL_DRILL_SHAPE @@ -188,68 +174,74 @@ void PlotOneBoardLayer( BOARD *aBoard, PLOTTER* aPlotter, LAYER_NUM aLayer, plotOpt.SetSkipPlotNPTH_Pads( true ); PlotStandardLayer( aBoard, aPlotter, layer_mask, plotOpt ); } - break; - - case SOLDERMASK_N_BACK: - case SOLDERMASK_N_FRONT: - plotOpt.SetSkipPlotNPTH_Pads( false ); - // Disable plot pad holes - plotOpt.SetDrillMarksType( PCB_PLOT_PARAMS::NO_DRILL_SHAPE ); - - // Plot solder mask: - if( soldermask_min_thickness == 0 ) + } + else + { + switch( aLayer ) { + case B_Mask: + case F_Mask: + plotOpt.SetSkipPlotNPTH_Pads( false ); + // Disable plot pad holes + plotOpt.SetDrillMarksType( PCB_PLOT_PARAMS::NO_DRILL_SHAPE ); + + // Plot solder mask: + if( soldermask_min_thickness == 0 ) + { + if( plotOpt.GetFormat() == PLOT_FORMAT_DXF ) + PlotLayerOutlines( aBoard, aPlotter, layer_mask, plotOpt ); + else + PlotStandardLayer( aBoard, aPlotter, layer_mask, plotOpt ); + } + else + PlotSolderMaskLayer( aBoard, aPlotter, layer_mask, plotOpt, + soldermask_min_thickness ); + + break; + + case B_Paste: + case F_Paste: + plotOpt.SetSkipPlotNPTH_Pads( false ); + // Disable plot pad holes + plotOpt.SetDrillMarksType( PCB_PLOT_PARAMS::NO_DRILL_SHAPE ); + if( plotOpt.GetFormat() == PLOT_FORMAT_DXF ) PlotLayerOutlines( aBoard, aPlotter, layer_mask, plotOpt ); else PlotStandardLayer( aBoard, aPlotter, layer_mask, plotOpt ); - } - else - PlotSolderMaskLayer( aBoard, aPlotter, layer_mask, plotOpt, - soldermask_min_thickness ); + break; - break; - - case SOLDERPASTE_N_BACK: - case SOLDERPASTE_N_FRONT: - plotOpt.SetSkipPlotNPTH_Pads( false ); - // Disable plot pad holes - plotOpt.SetDrillMarksType( PCB_PLOT_PARAMS::NO_DRILL_SHAPE ); - - if( plotOpt.GetFormat() == PLOT_FORMAT_DXF ) - PlotLayerOutlines( aBoard, aPlotter, layer_mask, plotOpt ); - else - PlotStandardLayer( aBoard, aPlotter, layer_mask, plotOpt ); - break; - - case SILKSCREEN_N_FRONT: - case SILKSCREEN_N_BACK: - if( plotOpt.GetFormat() == PLOT_FORMAT_DXF ) - PlotLayerOutlines( aBoard, aPlotter, layer_mask, plotOpt ); - else - PlotSilkScreen( aBoard, aPlotter, layer_mask, plotOpt ); - - // Gerber: Subtract soldermask from silkscreen if enabled - if( aPlotter->GetPlotterType() == PLOT_FORMAT_GERBER - && plotOpt.GetSubtractMaskFromSilk() ) - { - if( aLayer == SILKSCREEN_N_FRONT ) - layer_mask = GetLayerMask( SOLDERMASK_N_FRONT ); + case F_SilkS: + case B_SilkS: + if( plotOpt.GetFormat() == PLOT_FORMAT_DXF ) + PlotLayerOutlines( aBoard, aPlotter, layer_mask, plotOpt ); else - layer_mask = GetLayerMask( SOLDERMASK_N_BACK ); + PlotSilkScreen( aBoard, aPlotter, layer_mask, plotOpt ); - // Create the mask to subtract by creating a negative layer polarity - aPlotter->SetLayerPolarity( false ); - // Disable plot pad holes - plotOpt.SetDrillMarksType( PCB_PLOT_PARAMS::NO_DRILL_SHAPE ); - // Plot the mask - PlotStandardLayer( aBoard, aPlotter, layer_mask, plotOpt ); + // Gerber: Subtract soldermask from silkscreen if enabled + if( aPlotter->GetPlotterType() == PLOT_FORMAT_GERBER + && plotOpt.GetSubtractMaskFromSilk() ) + { + if( aLayer == F_SilkS ) + layer_mask = LSET( F_Mask ); + else + layer_mask = LSET( B_Mask ); + + // Create the mask to subtract by creating a negative layer polarity + aPlotter->SetLayerPolarity( false ); + + // Disable plot pad holes + plotOpt.SetDrillMarksType( PCB_PLOT_PARAMS::NO_DRILL_SHAPE ); + + // Plot the mask + PlotStandardLayer( aBoard, aPlotter, layer_mask, plotOpt ); + } + break; + + default: + PlotSilkScreen( aBoard, aPlotter, layer_mask, plotOpt ); + break; } - break; - - default: - PlotSilkScreen( aBoard, aPlotter, layer_mask, plotOpt ); - break; } } @@ -258,11 +250,11 @@ void PlotOneBoardLayer( BOARD *aBoard, PLOTTER* aPlotter, LAYER_NUM aLayer, * Silk screen layers are not plotted here. */ void PlotStandardLayer( BOARD *aBoard, PLOTTER* aPlotter, - LAYER_MSK aLayerMask, const PCB_PLOT_PARAMS& aPlotOpt ) + LSET aLayerMask, const PCB_PLOT_PARAMS& aPlotOpt ) { - BRDITEMS_PLOTTER itemplotter( aPlotter, aBoard, aPlotOpt ); - itemplotter.SetLayerMask( aLayerMask ); + + itemplotter.SetLayerSet( aLayerMask ); EDA_DRAW_MODE_T plotMode = aPlotOpt.GetMode(); @@ -286,7 +278,7 @@ void PlotStandardLayer( BOARD *aBoard, PLOTTER* aPlotter, { for( BOARD_ITEM* item = module->GraphicalItems(); item; item = item->Next() ) { - if( ! (aLayerMask & GetLayerMask( item->GetLayer() ) ) ) + if( !aLayerMask[ item->GetLayer() ] ) continue; switch( item->Type() ) @@ -306,32 +298,45 @@ void PlotStandardLayer( BOARD *aBoard, PLOTTER* aPlotter, { for( D_PAD* pad = module->Pads(); pad; pad = pad->Next() ) { - if( (pad->GetLayerMask() & aLayerMask) == 0 ) + if( (pad->GetLayerSet() & aLayerMask) == 0 ) continue; wxSize margin; double width_adj = 0; - if( aLayerMask & ALL_CU_LAYERS ) + if( ( aLayerMask & LSET::AllCuMask() ).any() ) width_adj = itemplotter.getFineWidthAdj(); +#if 0 // was: switch( aLayerMask & ( SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT | SOLDERPASTE_LAYER_BACK | SOLDERPASTE_LAYER_FRONT ) ) { case SOLDERMASK_LAYER_FRONT: case SOLDERMASK_LAYER_BACK: - margin.x = margin.y = pad->GetSolderMaskMargin(); break; case SOLDERPASTE_LAYER_FRONT: case SOLDERPASTE_LAYER_BACK: - margin = pad->GetSolderPasteMargin(); break; default: break; } +#else + static const LSET speed( 4, B_Mask, F_Mask, B_Paste, F_Paste ); + + LSET anded = ( speed & aLayerMask ); + + if( anded == LSET( F_Mask ) || anded == LSET( B_Mask ) ) + { + margin.x = margin.y = pad->GetSolderMaskMargin(); + } + else if( anded == LSET( F_Paste ) || anded == LSET( B_Paste ) ) + { + margin = pad->GetSolderPasteMargin(); + } +#endif wxSize padPlotsSize; padPlotsSize.x = pad->GetSize().x + ( 2 * margin.x ) + width_adj; @@ -343,10 +348,10 @@ void PlotStandardLayer( BOARD *aBoard, PLOTTER* aPlotter, EDA_COLOR_T color = BLACK; - if( (pad->GetLayerMask() & LAYER_BACK) ) + if( pad->GetLayerSet()[B_Cu] ) color = aBoard->GetVisibleElementColor( PAD_BK_VISIBLE ); - if((pad->GetLayerMask() & LAYER_FRONT ) ) + if( pad->GetLayerSet()[F_Cu] ) color = ColorFromInt( color | aBoard->GetVisibleElementColor( PAD_FR_VISIBLE ) ); // Temporary set the pad size to the required plot size: @@ -385,18 +390,18 @@ void PlotStandardLayer( BOARD *aBoard, PLOTTER* aPlotter, // vias are not plotted if not on selected layer, but if layer // is SOLDERMASK_LAYER_BACK or SOLDERMASK_LAYER_FRONT,vias are drawn, // only if they are on the corresponding external copper layer - int via_mask_layer = Via->GetLayerMask(); + LSET via_mask_layer = Via->GetLayerSet(); if( aPlotOpt.GetPlotViaOnMaskLayer() ) { - if( via_mask_layer & LAYER_BACK ) - via_mask_layer |= SOLDERMASK_LAYER_BACK; + if( via_mask_layer[B_Cu] ) + via_mask_layer.set( B_Mask ); - if( via_mask_layer & LAYER_FRONT ) - via_mask_layer |= SOLDERMASK_LAYER_FRONT; + if( via_mask_layer[F_Cu] ) + via_mask_layer.set( F_Mask ); } - if( ( via_mask_layer & aLayerMask ) == 0 ) + if( !( via_mask_layer & aLayerMask ).any() ) continue; int via_margin = 0; @@ -404,10 +409,10 @@ void PlotStandardLayer( BOARD *aBoard, PLOTTER* aPlotter, // If the current layer is a solder mask, use the global mask // clearance for vias - if( ( aLayerMask & ( SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT ) ) ) + if( aLayerMask[B_Mask] || aLayerMask[F_Mask] ) via_margin = aBoard->GetDesignSettings().m_SolderMaskMargin; - if( aLayerMask & ALL_CU_LAYERS ) + if( ( aLayerMask & LSET::AllCuMask() ).any() ) width_adj = itemplotter.getFineWidthAdj(); int diameter = Via->GetWidth() + 2 * via_margin + width_adj; @@ -429,7 +434,7 @@ void PlotStandardLayer( BOARD *aBoard, PLOTTER* aPlotter, if( track->Type() == PCB_VIA_T ) continue; - if( (GetLayerMask( track->GetLayer() ) & aLayerMask) == 0 ) + if( !aLayerMask[track->GetLayer()] ) continue; int width = track->GetWidth() + itemplotter.getFineWidthAdj(); @@ -440,7 +445,7 @@ void PlotStandardLayer( BOARD *aBoard, PLOTTER* aPlotter, // Plot zones (outdated, for old boards compatibility): for( TRACK* track = aBoard->m_Zone; track; track = track->Next() ) { - if( (GetLayerMask( track->GetLayer() ) & aLayerMask) == 0 ) + if( !aLayerMask[track->GetLayer()] ) continue; int width = track->GetWidth() + itemplotter.getFineWidthAdj(); @@ -453,7 +458,7 @@ void PlotStandardLayer( BOARD *aBoard, PLOTTER* aPlotter, { ZONE_CONTAINER* zone = aBoard->GetArea( ii ); - if( ( GetLayerMask(zone->GetLayer() ) & aLayerMask ) == 0 ) + if( !aLayerMask[zone->GetLayer()] ) continue; itemplotter.PlotFilledAreas( zone ); @@ -464,24 +469,81 @@ void PlotStandardLayer( BOARD *aBoard, PLOTTER* aPlotter, itemplotter.PlotDrillMarks(); } + +// Seems like we want to plot from back to front? +static const LAYER_ID plot_seq[] = { + + B_Adhes, // 32 + F_Adhes, + B_Paste, + F_Paste, + B_SilkS, + B_Mask, + F_Mask, + Dwgs_User, + Cmts_User, + Eco1_User, + Eco2_User, + Edge_Cuts, + Margin, + + F_CrtYd, // CrtYd & Body are footprint only + B_CrtYd, + F_Fab, + B_Fab, + + B_Cu, + In30_Cu, + In29_Cu, + In28_Cu, + In27_Cu, + In26_Cu, + In25_Cu, + In24_Cu, + In23_Cu, + In22_Cu, + In21_Cu, + In20_Cu, + In19_Cu, + In18_Cu, + In17_Cu, + In16_Cu, + In15_Cu, + In14_Cu, + In13_Cu, + In12_Cu, + In11_Cu, + In10_Cu, + In9_Cu, + In8_Cu, + In7_Cu, + In6_Cu, + In5_Cu, + In4_Cu, + In3_Cu, + In2_Cu, + In1_Cu, + F_Cu, + + F_SilkS, +}; + + /* Plot outlines of copper, for copper layer */ #include "clipper.hpp" void PlotLayerOutlines( BOARD *aBoard, PLOTTER* aPlotter, - LAYER_MSK aLayerMask, const PCB_PLOT_PARAMS& aPlotOpt ) + LSET aLayerMask, const PCB_PLOT_PARAMS& aPlotOpt ) { BRDITEMS_PLOTTER itemplotter( aPlotter, aBoard, aPlotOpt ); - itemplotter.SetLayerMask( aLayerMask ); + itemplotter.SetLayerSet( aLayerMask ); CPOLYGONS_LIST outlines; - for( LAYER_NUM layer = FIRST_LAYER; layer < NB_PCB_LAYERS; layer++ ) + for( LSEQ seq = aLayerMask.Seq( plot_seq, DIM( plot_seq ) ); seq; ++seq ) { - LAYER_MSK layer_mask = GetLayerMask( layer ); - - if( (aLayerMask & layer_mask ) == 0 ) - continue; + LAYER_ID layer = *seq; outlines.RemoveAllContours(); aBoard->ConvertBrdLayerToPolygonalContours( layer, outlines ); @@ -592,15 +654,14 @@ void PlotLayerOutlines( BOARD *aBoard, PLOTTER* aPlotter, * (shapes will be better, and calculations faster) */ void PlotSolderMaskLayer( BOARD *aBoard, PLOTTER* aPlotter, - LAYER_MSK aLayerMask, const PCB_PLOT_PARAMS& aPlotOpt, + LSET aLayerMask, const PCB_PLOT_PARAMS& aPlotOpt, int aMinThickness ) { - LAYER_NUM layer = ( aLayerMask & SOLDERMASK_LAYER_BACK ) ? - SOLDERMASK_N_BACK : SOLDERMASK_N_FRONT; - int inflate = aMinThickness/2; + LAYER_ID layer = aLayerMask[B_Mask] ? B_Mask : F_Mask; + int inflate = aMinThickness/2; BRDITEMS_PLOTTER itemplotter( aPlotter, aBoard, aPlotOpt ); - itemplotter.SetLayerMask( aLayerMask ); + itemplotter.SetLayerSet( aLayerMask ); // Plot edge layer and graphic items itemplotter.PlotBoardGraphicItems(); @@ -661,6 +722,7 @@ void PlotSolderMaskLayer( BOARD *aBoard, PLOTTER* aPlotter, // use the global mask clearance for vias int via_clearance = aBoard->GetDesignSettings().m_SolderMaskMargin; int via_margin = via_clearance + inflate; + for( TRACK* track = aBoard->m_Track; track; track = track->Next() ) { const VIA* via = dyn_cast( track ); @@ -670,15 +732,15 @@ void PlotSolderMaskLayer( BOARD *aBoard, PLOTTER* aPlotter, // vias are plotted only if they are on the corresponding // external copper layer - LAYER_MSK via_mask_layer = via->GetLayerMask(); + LSET via_set = via->GetLayerSet(); - if( via_mask_layer & LAYER_BACK ) - via_mask_layer |= SOLDERMASK_LAYER_BACK; + if( via_set[B_Cu] ) + via_set.set( B_Mask ); - if( via_mask_layer & LAYER_FRONT ) - via_mask_layer |= SOLDERMASK_LAYER_FRONT; + if( via_set[F_Cu] ) + via_set.set( F_Mask ); - if( ( via_mask_layer & aLayerMask ) == 0 ) + if( !( via_set & aLayerMask ).any() ) continue; via->TransformShapeWithClearanceToPolygon( bufferPolys, via_margin, diff --git a/pcbnew/plot_brditems_plotter.cpp b/pcbnew/plot_brditems_plotter.cpp index 41f8574cd9..f806648dd1 100644 --- a/pcbnew/plot_brditems_plotter.cpp +++ b/pcbnew/plot_brditems_plotter.cpp @@ -57,7 +57,7 @@ EDA_COLOR_T BRDITEMS_PLOTTER::getColor( LAYER_NUM aLayer ) { - EDA_COLOR_T color = m_board->GetLayerColor( aLayer ); + EDA_COLOR_T color = m_board->GetLayerColor( (LAYER_ID) aLayer ); if (color == WHITE) color = LIGHTGRAY; return color; @@ -110,10 +110,10 @@ bool BRDITEMS_PLOTTER::PlotAllTextsModule( MODULE* aModule ) TEXTE_MODULE* textModule = &aModule->Reference(); LAYER_NUM textLayer = textModule->GetLayer(); - if( textLayer >= NB_LAYERS ) + if( textLayer >= LAYER_ID_COUNT ) // how will this ever be true? return false; - if( ( GetLayerMask( textLayer ) & m_layerMask ) == 0 ) + if( !m_layerMask[textLayer] ) trace_ref = false; if( !textModule->IsVisible() && !GetPlotInvisibleText() ) @@ -122,10 +122,10 @@ bool BRDITEMS_PLOTTER::PlotAllTextsModule( MODULE* aModule ) textModule = &aModule->Value(); textLayer = textModule->GetLayer(); - if( textLayer > NB_LAYERS ) + if( textLayer > LAYER_ID_COUNT ) // how will this ever be true? return false; - if( ( GetLayerMask( textLayer ) & m_layerMask ) == 0 ) + if( !m_layerMask[textLayer] ) trace_val = false; if( !textModule->IsVisible() && !GetPlotInvisibleText() ) @@ -148,8 +148,7 @@ bool BRDITEMS_PLOTTER::PlotAllTextsModule( MODULE* aModule ) PlotTextModule( &aModule->Value(), GetValueColor() ); } - for( BOARD_ITEM *item = aModule->GraphicalItems().GetFirst(); - item != NULL; item = item->Next() ) + for( BOARD_ITEM *item = aModule->GraphicalItems().GetFirst(); item; item = item->Next() ) { textModule = dyn_cast( item ); @@ -161,10 +160,10 @@ bool BRDITEMS_PLOTTER::PlotAllTextsModule( MODULE* aModule ) textLayer = textModule->GetLayer(); - if( textLayer >= NB_LAYERS ) + if( textLayer >= LAYER_ID_COUNT ) return false; - if( !( GetLayerMask( textLayer ) & m_layerMask ) ) + if( !m_layerMask[textLayer] ) continue; PlotTextModule( textModule, getColor( textLayer ) ); @@ -246,7 +245,7 @@ void BRDITEMS_PLOTTER::PlotTextModule( TEXTE_MODULE* pt_texte, EDA_COLOR_T aColo void BRDITEMS_PLOTTER::PlotDimension( DIMENSION* aDim ) { - if( (GetLayerMask( aDim->GetLayer() ) & m_layerMask) == 0 ) + if( !m_layerMask[aDim->GetLayer()] ) return; DRAWSEGMENT draw; @@ -255,6 +254,7 @@ void BRDITEMS_PLOTTER::PlotDimension( DIMENSION* aDim ) draw.SetLayer( aDim->GetLayer() ); EDA_COLOR_T color = aDim->GetBoard()->GetLayerColor( aDim->GetLayer() ); + // Set plot color (change WHITE to LIGHTGRAY because // the white items are not seen on a white paper or screen m_plotter->SetColor( color != WHITE ? color : LIGHTGRAY); @@ -295,7 +295,7 @@ void BRDITEMS_PLOTTER::PlotPcbTarget( PCB_TARGET* aMire ) { int dx1, dx2, dy1, dy2, radius; - if( (GetLayerMask( aMire->GetLayer() ) & m_layerMask) == 0 ) + if( !m_layerMask[aMire->GetLayer()] ) return; m_plotter->SetColor( getColor( aMire->GetLayer() ) ); @@ -353,7 +353,7 @@ void BRDITEMS_PLOTTER::Plot_Edges_Modules() { EDGE_MODULE* edge = dyn_cast( item ); - if( !edge || (( GetLayerMask( edge->GetLayer() ) & m_layerMask ) == 0) ) + if( !edge || !m_layerMask[edge->GetLayer()] ) continue; Plot_1_EdgeModule( edge ); @@ -447,7 +447,7 @@ void BRDITEMS_PLOTTER::PlotTextePcb( TEXTE_PCB* pt_texte ) if( pt_texte->GetText().IsEmpty() ) return; - if( ( GetLayerMask( pt_texte->GetLayer() ) & m_layerMask ) == 0 ) + if( !m_layerMask[pt_texte->GetLayer()] ) return; m_plotter->SetColor( getColor( pt_texte->GetLayer() ) ); @@ -575,13 +575,13 @@ void BRDITEMS_PLOTTER::PlotFilledAreas( ZONE_CONTAINER* aZone ) /* Plot items type DRAWSEGMENT on layers allowed by aLayerMask */ -void BRDITEMS_PLOTTER::PlotDrawSegment( DRAWSEGMENT* aSeg ) +void BRDITEMS_PLOTTER::PlotDrawSegment( DRAWSEGMENT* aSeg ) { int thickness; int radius = 0; double StAngle = 0, EndAngle = 0; - if( (GetLayerMask( aSeg->GetLayer() ) & m_layerMask) == 0 ) + if( !m_layerMask[aSeg->GetLayer()] ) return; if( GetMode() == LINE ) diff --git a/pcbnew/print_board_functions.cpp b/pcbnew/print_board_functions.cpp index 2683e268b5..59ad38945d 100644 --- a/pcbnew/print_board_functions.cpp +++ b/pcbnew/print_board_functions.cpp @@ -44,11 +44,11 @@ static void Print_Module( EDA_DRAW_PANEL* aPanel, wxDC* aDC, MODULE* aModule, - GR_DRAWMODE aDraw_mode, LAYER_MSK aMasklayer, + GR_DRAWMODE aDraw_mode, LSET aMasklayer, PRINT_PARAMETERS::DrillShapeOptT aDrillShapeOpt ); void FOOTPRINT_EDIT_FRAME::PrintPage( wxDC* aDC, - LAYER_MSK aPrintMaskLayer, + LSET aPrintMaskLayer, bool aPrintMirrorMode, void * aData) { @@ -120,28 +120,18 @@ void FOOTPRINT_EDIT_FRAME::PrintPage( wxDC* aDC, } -/** - * Function PrintPage - * is used to print the board (on printer, or when creating SVF files). - * Print the board, but only layers allowed by aPrintMaskLayer - * @param aDC = the print device context - * @param aPrintMaskLayer = a 32 bits mask: bit n = 1 -> layer n is printed - * @param aPrintMirrorMode = true to plot mirrored - * @param aData = a pointer to an optional data (NULL if not used) - */ void PCB_EDIT_FRAME::PrintPage( wxDC* aDC, - LAYER_MSK aPrintMaskLayer, + LSET aPrintMask, bool aPrintMirrorMode, void* aData) { - MODULE* Module; GR_DRAWMODE drawmode = GR_COPY; DISPLAY_OPTIONS save_opt; BOARD* Pcb = GetBoard(); int defaultPenSize = Millimeter2iu( 0.2 ); bool onePagePerLayer = false; - PRINT_PARAMETERS * printParameters = (PRINT_PARAMETERS*) aData; // can be null + PRINT_PARAMETERS* printParameters = (PRINT_PARAMETERS*) aData; // can be null if( printParameters && printParameters->m_OptionPrintPage == 0 ) onePagePerLayer = true; @@ -161,32 +151,34 @@ void PCB_EDIT_FRAME::PrintPage( wxDC* aDC, DisplayOpt.DisplayPadFill = true; DisplayOpt.DisplayViaFill = true; - if( (aPrintMaskLayer & ALL_CU_LAYERS) == 0 ) + if( !( aPrintMask & LSET::AllCuMask() ).any() ) { if( onePagePerLayer ) - { // We can print mask layers (solder mask and solder paste) with the actual + { + // We can print mask layers (solder mask and solder paste) with the actual // pad sizes. To do that, we must set ContrastModeDisplay to true and set - //the GetScreen()->m_Active_Layer to the current printed layer + // the GetScreen()->m_Active_Layer to the current printed layer DisplayOpt.ContrastModeDisplay = true; DisplayOpt.DisplayPadFill = true; // Calculate the active layer number to print from its mask layer: - GetScreen()->m_Active_Layer = FIRST_LAYER; + GetScreen()->m_Active_Layer = B_Cu; - for( LAYER_NUM kk = FIRST_LAYER; kk < NB_LAYERS; ++kk ) + for( LAYER_NUM id = LAYER_ID_COUNT-1; id >= 0; --id ) { - if( GetLayerMask( kk ) & aPrintMaskLayer ) + if( aPrintMask[id] ) { - GetScreen()->m_Active_Layer = kk; + GetScreen()->m_Active_Layer = LAYER_ID( id ); break; } } // pads on Silkscreen layer are usually plot in sketch mode: - if( (GetScreen()->m_Active_Layer == SILKSCREEN_N_BACK) - || (GetScreen()->m_Active_Layer == SILKSCREEN_N_FRONT) ) + if( GetScreen()->m_Active_Layer == B_SilkS || + GetScreen()->m_Active_Layer == F_SilkS ) + { DisplayOpt.DisplayPadFill = false; - + } } else { @@ -194,14 +186,18 @@ void PCB_EDIT_FRAME::PrintPage( wxDC* aDC, } } - m_DisplayPadFill = DisplayOpt.DisplayPadFill; m_DisplayViaFill = DisplayOpt.DisplayViaFill; m_DisplayPadNum = DisplayOpt.DisplayPadNum = false; + bool nctmp = GetBoard()->IsElementVisible( NO_CONNECTS_VISIBLE ); + GetBoard()->SetElementVisibility( NO_CONNECTS_VISIBLE, false ); + bool anchorsTmp = GetBoard()->IsElementVisible( ANCHOR_VISIBLE ); + GetBoard()->SetElementVisibility( ANCHOR_VISIBLE, false ); + DisplayOpt.DisplayPadIsol = false; m_DisplayModEdge = DisplayOpt.DisplayModEdge = FILLED; m_DisplayModText = DisplayOpt.DisplayModText = FILLED; @@ -231,7 +227,7 @@ void PCB_EDIT_FRAME::PrintPage( wxDC* aDC, case PCB_DIMENSION_T: case PCB_TEXT_T: case PCB_TARGET_T: - if( GetLayerMask( item->GetLayer() ) & aPrintMaskLayer ) + if( aPrintMask[item->GetLayer()] ) item->Draw( m_canvas, aDC, drawmode ); break; @@ -242,17 +238,18 @@ void PCB_EDIT_FRAME::PrintPage( wxDC* aDC, } // Print tracks - for( TRACK * track = Pcb->m_Track; track; track = track->Next() ) + for( TRACK* track = Pcb->m_Track; track; track = track->Next() ) { - if( !( aPrintMaskLayer & track->GetLayerMask() ) ) + if( !( aPrintMask & track->GetLayerSet() ).any() ) continue; if( track->Type() == PCB_VIA_T ) // VIA encountered. { - int radius = track->GetWidth() / 2; - const VIA *via = static_cast( track ); + int radius = track->GetWidth() / 2; + const VIA* via = static_cast( track ); EDA_COLOR_T color = g_ColorsSettings.GetItemColor( VIAS_VISIBLE + via->GetViaType() ); + GRSetDrawMode( aDC, drawmode ); GRFilledCircle( m_canvas->GetClipBox(), aDC, via->GetStart().x, @@ -267,9 +264,9 @@ void PCB_EDIT_FRAME::PrintPage( wxDC* aDC, } // Outdated: only for compatibility to old boards - for( TRACK * track = Pcb->m_Zone; track != NULL; track = track->Next() ) + for( TRACK* track = Pcb->m_Zone; track; track = track->Next() ) { - if( !( aPrintMaskLayer & track->GetLayerMask() ) ) + if( !( aPrintMask & track->GetLayerSet() ).any() ) continue; track->Draw( m_canvas, aDC, drawmode ); @@ -280,19 +277,18 @@ void PCB_EDIT_FRAME::PrintPage( wxDC* aDC, { ZONE_CONTAINER* zone = Pcb->GetArea( ii ); - if( aPrintMaskLayer & GetLayerMask( zone->GetLayer() ) ) + if( aPrintMask[zone->GetLayer()] ) zone->DrawFilledArea( m_canvas, aDC, drawmode ); } // Draw footprints, this is done at last in order to print the pad holes in // white (or g_DrawBgColor) after the tracks and zones - Module = (MODULE*) Pcb->m_Modules; int tmp = D_PAD::m_PadSketchModePenSize; D_PAD::m_PadSketchModePenSize = defaultPenSize; - for( ; Module != NULL; Module = Module->Next() ) + for( MODULE* module = (MODULE*) Pcb->m_Modules; module; module = module->Next() ) { - Print_Module( m_canvas, aDC, Module, drawmode, aPrintMaskLayer, drillShapeOpt ); + Print_Module( m_canvas, aDC, module, drawmode, aPrintMask, drillShapeOpt ); } D_PAD::m_PadSketchModePenSize = tmp; @@ -301,15 +297,17 @@ void PCB_EDIT_FRAME::PrintPage( wxDC* aDC, * vias */ if( drillShapeOpt != PRINT_PARAMETERS::NO_DRILL_SHAPE ) { - TRACK * track = Pcb->m_Track; + TRACK* track = Pcb->m_Track; EDA_COLOR_T color = g_DrawBgColor; + bool blackpenstate = GetGRForceBlackPenState(); + GRForceBlackPen( false ); GRSetDrawMode( aDC, GR_COPY ); - for( ; track != NULL; track = track->Next() ) + for( ; track; track = track->Next() ) { - if( !( aPrintMaskLayer & track->GetLayerMask() ) ) + if( !( aPrintMask & track->GetLayerSet() ).any() ) continue; if( track->Type() == PCB_VIA_T ) // VIA encountered. @@ -335,7 +333,7 @@ void PCB_EDIT_FRAME::PrintPage( wxDC* aDC, m_canvas->SetPrintMirrored( false ); DisplayOpt = save_opt; - GetScreen()->m_Active_Layer = activeLayer; + GetScreen()->m_Active_Layer = LAYER_ID( activeLayer ); m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill; m_DisplayPadFill = DisplayOpt.DisplayPadFill; m_DisplayViaFill = DisplayOpt.DisplayViaFill; @@ -348,13 +346,13 @@ void PCB_EDIT_FRAME::PrintPage( wxDC* aDC, static void Print_Module( EDA_DRAW_PANEL* aPanel, wxDC* aDC, MODULE* aModule, - GR_DRAWMODE aDraw_mode, LAYER_MSK aMasklayer, + GR_DRAWMODE aDraw_mode, LSET aMask, PRINT_PARAMETERS::DrillShapeOptT aDrillShapeOpt ) { // Print pads for( D_PAD* pad = aModule->Pads(); pad; pad = pad->Next() ) { - if( !(pad->GetLayerMask() & aMasklayer ) ) + if( !( pad->GetLayerSet() & aMask ).any() ) continue; // Manage hole according to the print drill option @@ -385,14 +383,14 @@ static void Print_Module( EDA_DRAW_PANEL* aPanel, wxDC* aDC, MODULE* aModule, } // Print footprint graphic shapes - LAYER_MSK mlayer = GetLayerMask( aModule->GetLayer() ); + LSET mlayer( aModule->GetLayer() ); - if( aModule->GetLayer() == LAYER_N_BACK ) - mlayer = SILKSCREEN_LAYER_BACK; - else if( aModule->GetLayer() == LAYER_N_FRONT ) - mlayer = SILKSCREEN_LAYER_FRONT; + if( aModule->GetLayer() == B_Cu ) + mlayer = LSET( B_SilkS ); + else if( aModule->GetLayer() == F_Cu ) + mlayer = LSET( F_SilkS ); - if( mlayer & aMasklayer ) + if( ( mlayer & aMask ).any() ) { if( aModule->Reference().IsVisible() ) aModule->Reference().Draw( aPanel, aDC, aDraw_mode ); @@ -406,7 +404,7 @@ static void Print_Module( EDA_DRAW_PANEL* aPanel, wxDC* aDC, MODULE* aModule, switch( item->Type() ) { case PCB_MODULE_TEXT_T: - if( ( mlayer & aMasklayer ) == 0 ) + if( !( mlayer & aMask ).any() ) break; TEXTE_MODULE* textMod; @@ -418,7 +416,7 @@ static void Print_Module( EDA_DRAW_PANEL* aPanel, wxDC* aDC, MODULE* aModule, { EDGE_MODULE* edge = (EDGE_MODULE*) item; - if( ( GetLayerMask( edge->GetLayer() ) & aMasklayer ) == 0 ) + if( !aMask[edge->GetLayer()] ) break; edge->Draw( aPanel, aDC, aDraw_mode ); diff --git a/pcbnew/printout_controler.cpp b/pcbnew/printout_controler.cpp index c553cd83ed..b7e503c2c1 100644 --- a/pcbnew/printout_controler.cpp +++ b/pcbnew/printout_controler.cpp @@ -65,7 +65,7 @@ PRINT_PARAMETERS::PRINT_PARAMETERS() m_XScaleAdjust = 1.0; m_YScaleAdjust = 1.0; m_Print_Sheet_Ref = false; - m_PrintMaskLayer = FULL_LAYERS; + m_PrintMaskLayer.set(); m_PrintMirror = false; m_Print_Black_and_White = true; m_OptionPrintPage = 1; @@ -89,46 +89,32 @@ BOARD_PRINTOUT_CONTROLLER::BOARD_PRINTOUT_CONTROLLER( const PRINT_PARAMETERS& aP bool BOARD_PRINTOUT_CONTROLLER::OnPrintPage( int aPage ) { -#ifdef PCBNEW - LAYER_NUM layers_count = NB_PCB_LAYERS; -#else - LAYER_NUM layers_count = NB_LAYERS; -#endif - - LAYER_MSK mask_layer = m_PrintParams.m_PrintMaskLayer; + LSET lset = m_PrintParams.m_PrintMaskLayer; // compute layer mask from page number if we want one page per layer if( m_PrintParams.m_OptionPrintPage == 0 ) // One page per layer { - int jj; - LAYER_NUM ii; + // This sequence is TBD, call a different + // sequencer if needed, such as Seq(). Could not find documentation on + // page order. + LSEQ seq = lset.UIOrder(); - for( ii = FIRST_LAYER, jj = 0; ii < layers_count; ++ii ) - { - LAYER_MSK mask = GetLayerMask( ii ); - if( mask_layer & mask ) - jj++; - - if( jj == aPage ) - { - m_PrintParams.m_PrintMaskLayer = mask; - break; - } - } + if( unsigned( aPage ) < seq.size() ) + m_PrintParams.m_PrintMaskLayer = LSET( seq[aPage] ); } - if( m_PrintParams.m_PrintMaskLayer == 0 ) + if( !m_PrintParams.m_PrintMaskLayer.any() ) return false; #ifdef PCBNEW // In Pcbnew we can want the layer EDGE always printed if( m_PrintParams.m_Flags == 1 ) - m_PrintParams.m_PrintMaskLayer |= EDGE_LAYER; + m_PrintParams.m_PrintMaskLayer.set( Edge_Cuts ); #endif DrawPage(); - m_PrintParams.m_PrintMaskLayer = mask_layer; + m_PrintParams.m_PrintMaskLayer = lset; return true; } diff --git a/pcbnew/printout_controler.h b/pcbnew/printout_controler.h index 83745c70e1..a9cd6c2ece 100644 --- a/pcbnew/printout_controler.h +++ b/pcbnew/printout_controler.h @@ -53,7 +53,7 @@ public: double m_XScaleAdjust; // fine scale adjust for X axis double m_YScaleAdjust; // fine scale adjust for Y axis bool m_Print_Sheet_Ref; // Option: print page references - LAYER_MSK m_PrintMaskLayer; // Layers to print + LSET m_PrintMaskLayer; // Layers to print bool m_PrintMirror; // Option: Print mirrored bool m_Print_Black_and_White; // Option: Print in B&W or Color int m_OptionPrintPage; // Option: 0 = a layer per page, 1 = all layers at once diff --git a/pcbnew/router/pns_index.h b/pcbnew/router/pns_index.h index edb58b33e4..3f4d27794a 100644 --- a/pcbnew/router/pns_index.h +++ b/pcbnew/router/pns_index.h @@ -23,7 +23,7 @@ #include #include - + #include #include @@ -49,14 +49,14 @@ public: PNS_INDEX(); ~PNS_INDEX(); - /** + /** * Function Add() * * Adds item to the spatial index. */ void Add( PNS_ITEM* aItem ); - - /** + + /** * Function Remove() * * Removes an item from the spatial index. @@ -70,7 +70,7 @@ public: */ void Replace( PNS_ITEM* aOldItem, PNS_ITEM* aNewItem ); - /** + /** * Function Query() * * Searches items in the index that are in proximity of aItem. @@ -86,7 +86,7 @@ public: template int Query( const PNS_ITEM* aItem, int aMinDistance, Visitor& aVisitor ); - /** + /** * Function Query() * * Searches items in the index that are in proximity of aShape. @@ -115,7 +115,7 @@ public: * Returns list of all items in a given net. */ NET_ITEMS_LIST* GetItemsForNet( int aNet ); - + /** * Function Contains() * @@ -128,7 +128,7 @@ public: /** * Function Size() - * + * * Returns number of items stored in the index. */ int Size() const { return m_allItems.size(); } @@ -177,13 +177,12 @@ PNS_INDEX::ITEM_SHAPE_INDEX* PNS_INDEX::getSubindex( const PNS_ITEM* aItem ) { if( l.IsMultilayer() ) idx_n = SI_Multilayer; - else if( l.Start() == LAYER_N_BACK) // fixme: use kicad layer codes + else if( l.Start() == B_Cu ) // fixme: use kicad layer codes idx_n = SI_PadsTop; - else if( l.Start() == LAYER_N_FRONT ) + else if( l.Start() == F_Cu ) idx_n = SI_PadsBottom; - - break; } + break; case PNS_ITEM::SEGMENT: case PNS_ITEM::LINE: @@ -271,9 +270,9 @@ int PNS_INDEX::Query( const PNS_ITEM* aItem, int aMinDistance, Visitor& aVisitor { int l = layers.Start(); - if( l == LAYER_N_BACK ) + if( l == B_Cu ) total += querySingle( SI_PadsTop, shape, aMinDistance, aVisitor ); - else if( l == LAYER_N_FRONT ) + else if( l == F_Cu ) total += querySingle( SI_PadsBottom, shape, aMinDistance, aVisitor ); total += querySingle( SI_Traces + 2 * l + SI_SegStraight, shape, aMinDistance, aVisitor ); diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index e10ebd9190..32812e760b 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -126,20 +126,19 @@ PNS_ITEM* PNS_ROUTER::syncPad( D_PAD* aPad ) case PAD_SMD: case PAD_CONN: - { - LAYER_MSK lmsk = aPad->GetLayerMask(); - int i; - - for( i = FIRST_COPPER_LAYER; i <= LAST_COPPER_LAYER; i++ ) { - if( lmsk & ( 1 << i ) ) + LSET lmsk = aPad->GetLayerSet(); + + for( int i = 0; i < MAX_CU_LAYERS; i++ ) { - layers = PNS_LAYERSET( i ); - break; + if( lmsk[i] ) + { + layers = PNS_LAYERSET( i ); + break; + } } } break; - } default: TRACE( 0, "unsupported pad type 0x%x", aPad->GetAttribute() ); @@ -250,20 +249,20 @@ void PNS_ROUTER::SetBoard( BOARD* aBoard ) int PNS_ROUTER::NextCopperLayer( bool aUp ) { - LAYER_MSK mask = m_board->GetEnabledLayers() & m_board->GetVisibleLayers(); - LAYER_NUM l = m_currentLayer; + LSET mask = m_board->GetEnabledLayers() & m_board->GetVisibleLayers(); + LAYER_NUM l = m_currentLayer; do { l += ( aUp ? 1 : -1 ); - if( l > LAST_COPPER_LAYER ) - l = FIRST_COPPER_LAYER; + if( l >= MAX_CU_LAYERS ) + l = 0; - if( l < FIRST_COPPER_LAYER ) - l = LAST_COPPER_LAYER; + if( l < 0 ) + l = MAX_CU_LAYERS-1; - if( mask & GetLayerMask( l ) ) + if( mask[l] ) return l; } while( l != m_currentLayer ); @@ -525,7 +524,7 @@ const VECTOR2I PNS_ROUTER::CurrentEnd() const void PNS_ROUTER::eraseView() { BOOST_FOREACH( BOARD_ITEM* item, m_hiddenItems ) - { + { item->ViewSetVisible( true ); } @@ -600,8 +599,8 @@ void PNS_ROUTER::Move( const VECTOR2I& aP, PNS_ITEM* endItem ) moveDragging( aP, endItem ); break; - default: - break; + default: + break; } } @@ -745,7 +744,7 @@ void PNS_ROUTER::CommitRouting( PNS_NODE* aNode ) track->SetStart( wxPoint( s.A.x, s.A.y ) ); track->SetEnd( wxPoint( s.B.x, s.B.y ) ); track->SetWidth( seg->Width() ); - track->SetLayer( seg->Layers().Start() ); + track->SetLayer( (LAYER_ID) seg->Layers().Start() ); track->SetNetCode( seg->Net() ); newBI = track; break; diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index b1ab9a9abb..fb06dc35a2 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -18,7 +18,7 @@ * with this program. If not, see . */ -#include +#include #include #include @@ -95,10 +95,10 @@ public: void SetBoard( BOARD* aBoard ) { BOARD_DESIGN_SETTINGS& bds = aBoard->GetDesignSettings(); - + wxString msg; m_board = aBoard; - + Append( ID_POPUP_PCB_SELECT_CUSTOM_WIDTH, _( "Custom size" ), wxEmptyString, wxITEM_CHECK ); @@ -111,8 +111,8 @@ public: for( unsigned i = 0; i < bds.m_TrackWidthList.size(); i++ ) { msg = _( "Track "); - msg << StringFromValue( g_UserUnit, bds.m_TrackWidthList[i], true ); - + msg << StringFromValue( g_UserUnit, bds.m_TrackWidthList[i], true ); + if( i == 0 ) msg << _( " (from netclass)" ); @@ -213,7 +213,7 @@ public: Add( ACT_SwitchPosture ); AppendSeparator ( ); - + CONTEXT_TRACK_WIDTH_MENU* trackMenu = new CONTEXT_TRACK_WIDTH_MENU; trackMenu->SetBoard( aBoard ); AppendSubMenu( trackMenu, wxT( "Select Track Width" ) ); @@ -298,7 +298,7 @@ PNS_ITEM* ROUTER_TOOL::pickSingleItem( const VECTOR2I& aWhere, int aNet, int aLa for(int i = 0; i < 4; i++) prioritized[i] = 0; - + PNS_ITEMSET candidates = m_router->QueryHoverItems( aWhere ); BOOST_FOREACH( PNS_ITEM* item, candidates.Items() ) @@ -333,7 +333,7 @@ PNS_ITEM* ROUTER_TOOL::pickSingleItem( const VECTOR2I& aWhere, int aNet, int aLa for( int i = 0; i < 4; i++ ) { PNS_ITEM* item = prioritized[i]; - + if( DisplayOpt.ContrastModeDisplay ) if( item && !item->Layers().Overlaps( tl ) ) item = NULL; @@ -381,7 +381,7 @@ void ROUTER_TOOL::handleCommonEvents( TOOL_EVENT& aEvent ) break; } } - else + else #endif if( aEvent.IsAction( &ACT_RouterOptions ) ) { @@ -444,7 +444,7 @@ void ROUTER_TOOL::updateStartItem( TOOL_EVENT& aEvent ) { bool dummy; VECTOR2I psnap = m_router->SnapToItem( startItem, p, dummy ); - + if( snapEnabled ) { m_startSnapPoint = psnap; @@ -538,7 +538,7 @@ void ROUTER_TOOL::performRouting() m_router->SwitchLayer( m_startLayer ); - frame->SetActiveLayer( m_startLayer ); + frame->SetActiveLayer( (LAYER_ID) m_startLayer ); frame->GetGalCanvas()->SetFocus(); if( m_startItem && m_startItem->Net() >= 0 ) @@ -578,7 +578,7 @@ void ROUTER_TOOL::performRouting() else if( evt->IsAction( &ACT_PlaceThroughVia ) ) { m_router->ToggleViaPlacement(); - frame->SetTopLayer( m_router->GetCurrentLayer() ); + frame->SetTopLayer( (LAYER_ID) m_router->GetCurrentLayer() ); m_router->Move( m_endSnapPoint, m_endItem ); } else if( evt->IsAction( &ACT_SwitchPosture ) ) @@ -590,13 +590,13 @@ void ROUTER_TOOL::performRouting() { m_router->SwitchLayer( m_router->NextCopperLayer( true ) ); updateEndItem( *evt ); - frame->SetActiveLayer( m_router->GetCurrentLayer() ); + frame->SetActiveLayer( (LAYER_ID) m_router->GetCurrentLayer() ); m_router->Move( m_endSnapPoint, m_endItem ); } else if( evt->IsAction( &COMMON_ACTIONS::layerPrev ) ) { m_router->SwitchLayer( m_router->NextCopperLayer( false ) ); - frame->SetActiveLayer( m_router->GetCurrentLayer() ); + frame->SetActiveLayer( (LAYER_ID) m_router->GetCurrentLayer() ); m_router->Move( m_endSnapPoint, m_endItem ); } else if( evt->IsAction( &ACT_EndTrack ) ) @@ -604,7 +604,7 @@ void ROUTER_TOOL::performRouting() if( m_router->FixRoute( m_endSnapPoint, m_endItem ) ) break; } - + handleCommonEvents(*evt); } @@ -652,7 +652,7 @@ int ROUTER_TOOL::Main( TOOL_EVENT& aEvent ) ROUTER_TOOL_MENU *ctxMenu = new ROUTER_TOOL_MENU( board ); SetContextMenu ( ctxMenu ); - + // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { @@ -703,7 +703,7 @@ void ROUTER_TOOL::performDragging() VIEW_CONTROLS* ctls = getViewControls(); bool dragStarted = m_router->StartDragging( m_startSnapPoint, m_startItem ); - + if( !dragStarted ) return; @@ -712,7 +712,7 @@ void ROUTER_TOOL::performDragging() ctls->ForceCursorPosition( false ); ctls->SetAutoPan( true ); - + while( OPT_TOOL_EVENT evt = Wait() ) { if( evt->IsCancel() ) diff --git a/pcbnew/sel_layer.cpp b/pcbnew/sel_layer.cpp index 4c22c927fa..8444695289 100644 --- a/pcbnew/sel_layer.cpp +++ b/pcbnew/sel_layer.cpp @@ -42,36 +42,37 @@ */ class PCB_LAYER_SELECTOR: public LAYER_SELECTOR { - BOARD * m_brd; - public: - PCB_LAYER_SELECTOR( BOARD* aBrd ):LAYER_SELECTOR() + PCB_LAYER_SELECTOR( BOARD* aBrd ) : + LAYER_SELECTOR() { m_brd = aBrd; } protected: + BOARD* m_brd; + // Returns true if the layer id is enabled (i.e. is it should be displayed) bool IsLayerEnabled( LAYER_NUM aLayer ) const { - return m_brd->IsLayerEnabled( aLayer ); + return m_brd->IsLayerEnabled( LAYER_ID( aLayer ) ); } // Returns a color index from the layer id // Virtual function EDA_COLOR_T GetLayerColor( LAYER_NUM aLayer ) const { - return m_brd->GetLayerColor( aLayer ); + return m_brd->GetLayerColor( LAYER_ID( aLayer ) ); } // Returns the name of the layer id - // Virtual function - wxString GetLayerName( LAYER_NUM aLayer ) const + wxString GetLayerName( LAYER_NUM aLayer ) const // overrides LAYER_SELECTOR { - return m_brd->GetLayerName( aLayer ); + return m_brd->GetLayerName( LAYER_ID( aLayer ) ); } }; + /* * This class display a pcb layers list in a dialog, * to select one layer from this list @@ -79,74 +80,69 @@ protected: class PCB_ONE_LAYER_SELECTOR : public PCB_LAYER_SELECTOR, public DIALOG_LAYER_SELECTION_BASE { - LAYER_NUM m_layerSelected; - LAYER_MSK m_notAllowedLayersMask; - std::vector m_layersIdLeftColumn; - std::vector m_layersIdRightColumn; + LAYER_ID m_layerSelected; + LSET m_notAllowedLayersMask; + + std::vector m_layersIdLeftColumn; + std::vector m_layersIdRightColumn; public: PCB_ONE_LAYER_SELECTOR( wxWindow* aParent, BOARD * aBrd, - LAYER_NUM aDefaultLayer, - LAYER_MSK aNotAllowedLayersMask ); + LAYER_ID aDefaultLayer, + LSET aNotAllowedLayersMask ); - LAYER_NUM GetLayerSelection() { return m_layerSelected; } + LAYER_NUM GetLayerSelection() { return m_layerSelected; } private: // Event handlers void OnLeftGridCellClick( wxGridEvent& event ); void OnRightGridCellClick( wxGridEvent& event ); - void BuildList(); + void buildList(); }; + PCB_ONE_LAYER_SELECTOR::PCB_ONE_LAYER_SELECTOR( wxWindow* aParent, - BOARD * aBrd, - LAYER_NUM aDefaultLayer, - LAYER_MSK aNotAllowedLayersMask ) + BOARD* aBrd, LAYER_ID aDefaultLayer, LSET aNotAllowedLayersMask ) : PCB_LAYER_SELECTOR( aBrd ), DIALOG_LAYER_SELECTION_BASE( aParent ) { - m_layerSelected = (int) aDefaultLayer; + m_layerSelected = aDefaultLayer; m_notAllowedLayersMask = aNotAllowedLayersMask; - BuildList(); + buildList(); Layout(); - GetSizer()->SetSizeHints(this); + GetSizer()->SetSizeHints( this ); SetFocus(); } + // Build the layers list // Column position by function: -#define SELECT_COLNUM 0 -#define COLOR_COLNUM 1 -#define LAYERNAME_COLNUM 2 -static DECLARE_LAYERS_ORDER_LIST( layertranscode ); +#define SELECT_COLNUM 0 +#define COLOR_COLNUM 1 +#define LAYERNAME_COLNUM 2 -void PCB_ONE_LAYER_SELECTOR::BuildList() +void PCB_ONE_LAYER_SELECTOR::buildList() { // Hide layerid column which is used only to know the layer id // not to be shown in dialogs m_leftGridLayers->SetColSize( COLOR_COLNUM, 20 ); m_rightGridLayers->SetColSize( COLOR_COLNUM, 20 ); - int left_row = 0; - int right_row = 0; - wxString layername; - for( LAYER_NUM i = FIRST_LAYER; i < NB_LAYERS; ++i ) + int left_row = 0; + int right_row = 0; + wxString layername; + + for( LSEQ ui_seq = m_brd->GetEnabledLayers().UIOrder(); ui_seq; ++ui_seq ) { - LAYER_NUM layerid = i; + LAYER_ID layerid = *ui_seq; - if( m_layerorder ) - layerid = layertranscode[i]; - - if( ! IsLayerEnabled( layerid ) ) - continue; - - if( (m_notAllowedLayersMask & GetLayerMask( layerid )) != 0 ) + if( m_notAllowedLayersMask[layerid] ) continue; wxColour color = MakeColour( GetLayerColor( layerid ) ); layername = GetLayerName( layerid ); - if( layerid <= LAST_COPPER_LAYER ) + if( IsCopperLayer( layerid ) ) { if( left_row ) m_leftGridLayers->AppendRows( 1 ); @@ -205,6 +201,7 @@ void PCB_ONE_LAYER_SELECTOR::BuildList() m_rightGridLayers->AutoSizeColumn(SELECT_COLNUM); } + void PCB_ONE_LAYER_SELECTOR::OnLeftGridCellClick( wxGridEvent& event ) { m_layerSelected = m_layersIdLeftColumn[ event.GetRow() ]; @@ -212,6 +209,7 @@ void PCB_ONE_LAYER_SELECTOR::OnLeftGridCellClick( wxGridEvent& event ) EndModal( 1 ); } + void PCB_ONE_LAYER_SELECTOR::OnRightGridCellClick( wxGridEvent& event ) { m_layerSelected = m_layersIdRightColumn[ event.GetRow() ]; @@ -219,18 +217,12 @@ void PCB_ONE_LAYER_SELECTOR::OnRightGridCellClick( wxGridEvent& event ) EndModal( 2 ); } -/** Install the dialog box for layer selection - * @param aDefaultLayer = Preselection (NB_PCB_LAYERS for "(Deselect)" layer) - * @param aNotAllowedLayers = a layer mask for not allowed layers - * (= 0 to show all layers in use) - * @return the selected layer id - */ -LAYER_NUM PCB_BASE_FRAME::SelectLayer( LAYER_NUM aDefaultLayer, - LAYER_MSK aNotAllowedLayersMask, - wxPoint aDlgPosition ) + +LAYER_ID PCB_BASE_FRAME::SelectLayer( LAYER_ID aDefaultLayer, + LSET aNotAllowedLayersMask, wxPoint aDlgPosition ) { - PCB_ONE_LAYER_SELECTOR dlg( this, GetBoard(), - aDefaultLayer, aNotAllowedLayersMask ); + PCB_ONE_LAYER_SELECTOR dlg( this, GetBoard(), aDefaultLayer, aNotAllowedLayersMask ); + if( aDlgPosition != wxDefaultPosition ) { wxSize dlgSize = dlg.GetSize(); @@ -238,31 +230,35 @@ LAYER_NUM PCB_BASE_FRAME::SelectLayer( LAYER_NUM aDefaultLayer, aDlgPosition.y -= dlgSize.y/2; dlg.SetPosition( aDlgPosition ); } + dlg.ShowModal(); - LAYER_NUM layer = dlg.GetLayerSelection(); + + LAYER_ID layer = (LAYER_ID) dlg.GetLayerSelection(); return layer; } -/* - * This class display a double pcb copper layers list in a dialog, +/** + * Class SELECT_COPPER_LAYERS_PAIR_DIALOG + * displays a double pcb copper layers list in a dialog, * to select a layer pair from these lists */ class SELECT_COPPER_LAYERS_PAIR_DIALOG: public PCB_LAYER_SELECTOR, public DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE { private: - LAYER_NUM m_frontLayer; - LAYER_NUM m_backLayer; - int m_leftRowSelected; - int m_rightRowSelected; - std::vector m_layersId; + LAYER_ID m_frontLayer; + LAYER_ID m_backLayer; + int m_leftRowSelected; + int m_rightRowSelected; + + std::vector m_layersId; public: - SELECT_COPPER_LAYERS_PAIR_DIALOG( wxWindow* aParent, BOARD * aPcb, - LAYER_NUM aFrontLayer, LAYER_NUM aBackLayer ); + SELECT_COPPER_LAYERS_PAIR_DIALOG( wxWindow* aParent, BOARD* aPcb, + LAYER_ID aFrontLayer, LAYER_ID aBackLayer ); - void GetLayerPair( LAYER_NUM& aFrontLayer, LAYER_NUM& aBackLayer ) + void GetLayerPair( LAYER_ID& aFrontLayer, LAYER_ID& aBackLayer ) { aFrontLayer = m_frontLayer; aBackLayer = m_backLayer; @@ -282,16 +278,15 @@ private: EndModal( wxID_CANCEL ); } - void BuildList(); + void buildList(); void SetGridCursor( wxGrid* aGrid, int aRow, bool aEnable ); }; -/* Display a list of two copper layers to choose a pair of copper layers - * the layer pair is used to fast switch between copper layers when placing vias - */ + void PCB_BASE_FRAME::SelectCopperLayerPair() { PCB_SCREEN* screen = GetScreen(); + SELECT_COPPER_LAYERS_PAIR_DIALOG dlg( this, GetBoard(), screen->m_Route_Layer_TOP, screen->m_Route_Layer_BOTTOM ); @@ -310,9 +305,9 @@ void PCB_BASE_FRAME::SelectCopperLayerPair() m_canvas->MoveCursorToCrossHair(); } -SELECT_COPPER_LAYERS_PAIR_DIALOG:: - SELECT_COPPER_LAYERS_PAIR_DIALOG( wxWindow* aParent, BOARD * aPcb, - LAYER_NUM aFrontLayer, LAYER_NUM aBackLayer) : + +SELECT_COPPER_LAYERS_PAIR_DIALOG::SELECT_COPPER_LAYERS_PAIR_DIALOG( + wxWindow* aParent, BOARD * aPcb, LAYER_ID aFrontLayer, LAYER_ID aBackLayer) : PCB_LAYER_SELECTOR( aPcb ), DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE( aParent ) { @@ -320,45 +315,39 @@ SELECT_COPPER_LAYERS_PAIR_DIALOG:: m_backLayer = aBackLayer; m_leftRowSelected = 0; m_rightRowSelected = 0; - BuildList(); + buildList(); SetFocus(); GetSizer()->SetSizeHints( this ); Center(); } -void SELECT_COPPER_LAYERS_PAIR_DIALOG::BuildList() + +void SELECT_COPPER_LAYERS_PAIR_DIALOG::buildList() { m_leftGridLayers->SetColSize( COLOR_COLNUM, 20 ); m_rightGridLayers->SetColSize( COLOR_COLNUM, 20 ); // Select a not show cell, to avoid a wrong cell selection for user - int row = 0; - wxString layername; + int row = 0; + wxString layername; - for( LAYER_NUM i = FIRST_LAYER; i < NB_LAYERS; ++i ) + for( LSEQ ui_seq = m_brd->GetEnabledLayers().UIOrder(); ui_seq; ++ui_seq ) { - LAYER_NUM layerid = i; + LAYER_ID layerid = *ui_seq; - if( m_layerorder ) - layerid = layertranscode[i]; - - if( ! IsLayerEnabled( layerid ) ) - continue; - - if( layerid > LAST_COPPER_LAYER ) - continue; + if( !IsCopperLayer( layerid ) ) + break; wxColour color = MakeColour( GetLayerColor( layerid ) ); + layername = GetLayerName( layerid ); if( row ) m_leftGridLayers->AppendRows( 1 ); - m_leftGridLayers->SetCellBackgroundColour ( row, COLOR_COLNUM, - color ); - m_leftGridLayers->SetCellValue( row, LAYERNAME_COLNUM, - layername ); + m_leftGridLayers->SetCellBackgroundColour( row, COLOR_COLNUM, color ); + m_leftGridLayers->SetCellValue( row, LAYERNAME_COLNUM, layername ); m_layersId.push_back( layerid ); if( m_frontLayer == layerid ) @@ -389,12 +378,13 @@ void SELECT_COPPER_LAYERS_PAIR_DIALOG::BuildList() m_rightGridLayers->AutoSizeColumn(SELECT_COLNUM); } + void SELECT_COPPER_LAYERS_PAIR_DIALOG::SetGridCursor( wxGrid* aGrid, int aRow, bool aEnable ) { if( aEnable ) { - LAYER_NUM layerid = m_layersId[aRow]; + LAYER_ID layerid = m_layersId[aRow]; wxColour color = MakeColour( GetLayerColor( layerid ) ); aGrid->SetCellValue( aRow, SELECT_COLNUM, wxT("X") ); aGrid->SetCellBackgroundColour( aRow, SELECT_COLNUM, color ); @@ -409,10 +399,11 @@ void SELECT_COPPER_LAYERS_PAIR_DIALOG::SetGridCursor( wxGrid* aGrid, int aRow, } } + void SELECT_COPPER_LAYERS_PAIR_DIALOG::OnLeftGridCellClick( wxGridEvent& event ) { - int row = event.GetRow(); - LAYER_NUM layer = m_layersId[row]; + int row = event.GetRow(); + LAYER_ID layer = m_layersId[row]; if( m_frontLayer == layer ) return; @@ -423,12 +414,13 @@ void SELECT_COPPER_LAYERS_PAIR_DIALOG::OnLeftGridCellClick( wxGridEvent& event ) SetGridCursor( m_leftGridLayers, m_leftRowSelected, true ); } + void SELECT_COPPER_LAYERS_PAIR_DIALOG::OnRightGridCellClick( wxGridEvent& event ) { - int row = event.GetRow(); - LAYER_NUM layer = m_layersId[row]; + int row = event.GetRow(); + LAYER_ID layer = m_layersId[row]; - if( m_backLayer == layer ) + if( m_backLayer == layer ) return; SetGridCursor( m_rightGridLayers, m_rightRowSelected, false ); diff --git a/pcbnew/specctra.cpp b/pcbnew/specctra.cpp index b1018a58a8..4f521ee2a9 100644 --- a/pcbnew/specctra.cpp +++ b/pcbnew/specctra.cpp @@ -75,25 +75,51 @@ void SPECCTRA_DB::buildLayerMaps( BOARD* aBoard ) { // specctra wants top physical layer first, then going down to the // bottom most physical layer in physical sequence. - // @question : why does KiCad not display layers in that order? - int layerCount = aBoard->GetCopperLayerCount(); + // Same as KiCad now except for B_Cu + unsigned layerCount = aBoard->GetCopperLayerCount(); layerIds.clear(); pcbLayer2kicad.resize( layerCount ); - kicadLayer2pcb.resize( LAYER_N_FRONT + 1 ); + kicadLayer2pcb.resize( B_Cu + 1 ); +#if 0 // was: for( LAYER_NUM kiNdx = layerCount - 1, pcbNdx=FIRST_LAYER; kiNdx >= 0; --kiNdx, ++pcbNdx ) { - LAYER_NUM kilayer = (kiNdx>0 && kiNdx==layerCount-1) ? LAYER_N_FRONT : kiNdx; + LAYER_NUM kilayer = (kiNdx>0 && kiNdx==layerCount-1) ? F_Cu : kiNdx; // establish bi-directional mapping between KiCad's BOARD layer and PCB layer pcbLayer2kicad[pcbNdx] = kilayer; kicadLayer2pcb[kilayer] = pcbNdx; // save the specctra layer name in SPECCTRA_DB::layerIds for later. - layerIds.push_back( TO_UTF8( aBoard->GetLayerName( kilayer ) ) ); + layerIds.push_back( TO_UTF8( aBoard->GetLayerName( LAYER_ID( kilayer ) ) ) ); } +#else + + // establish bi-directional mapping between KiCad's BOARD layer and PCB layer + + for( unsigned i = 0; i < kicadLayer2pcb.size(); ++i ) + { + if( i < layerCount-1 ) + kicadLayer2pcb[i] = i; + else + kicadLayer2pcb[i] = layerCount - 1; + } + + for( unsigned i = 0; i < pcbLayer2kicad.size(); ++i ) + { + if( i < layerCount-1 ) + pcbLayer2kicad[i] = LAYER_ID( i ); + else + pcbLayer2kicad[i] = B_Cu; + + // save the specctra layer name in SPECCTRA_DB::layerIds for later. + layerIds.push_back( TO_UTF8( aBoard->GetLayerName( LAYER_ID( i ) ) ) ); + } + + +#endif } diff --git a/pcbnew/specctra.h b/pcbnew/specctra.h index 2a584864bb..94b3154515 100644 --- a/pcbnew/specctra.h +++ b/pcbnew/specctra.h @@ -3620,7 +3620,7 @@ class SPECCTRA_DB : public SPECCTRA_LEXER std::vector kicadLayer2pcb; /// maps PCB layer number to BOARD layer numbers - std::vector pcbLayer2kicad; + std::vector pcbLayer2kicad; /// used during FromSESSION() only, memory for it is not owned here. UNIT_RES* routeResolution; diff --git a/pcbnew/specctra_export.cpp b/pcbnew/specctra_export.cpp index d81d2c66ec..e20b613441 100644 --- a/pcbnew/specctra_export.cpp +++ b/pcbnew/specctra_export.cpp @@ -359,7 +359,7 @@ static bool isRoundKeepout( D_PAD* aPad ) if( aPad->GetDrillSize().x >= aPad->GetSize().x ) return true; - if( (aPad->GetLayerMask() & ALL_CU_LAYERS) == 0 ) + if( !( aPad->GetLayerSet() & LSET::AllCuMask() ).any() ) return true; } @@ -393,11 +393,13 @@ PADSTACK* SPECCTRA_DB::makePADSTACK( BOARD* aBoard, D_PAD* aPad ) PADSTACK* padstack = new PADSTACK(); int reportedLayers = 0; // how many in reported padstack - const char* layerName[NB_COPPER_LAYERS]; + const char* layerName[MAX_CU_LAYERS]; uniqifier = '['; - bool onAllCopperLayers = ( (aPad->GetLayerMask() & ALL_CU_LAYERS) == ALL_CU_LAYERS ); + static const LSET all_cu = LSET::AllCuMask(); + + bool onAllCopperLayers = ( (aPad->GetLayerSet() & all_cu) == all_cu ); if( onAllCopperLayers ) uniqifier += 'A'; // A for all layers @@ -405,7 +407,7 @@ PADSTACK* SPECCTRA_DB::makePADSTACK( BOARD* aBoard, D_PAD* aPad ) const int copperCount = aBoard->GetCopperLayerCount(); for( int layer=0; layerIsOnLayer( kilayer ) ) { @@ -836,8 +838,8 @@ PADSTACK* SPECCTRA_DB::makeVia( int aCopperDiameter, int aDrillDiameter, PADSTACK* SPECCTRA_DB::makeVia( const ::VIA* aVia ) { - LAYER_NUM topLayerNum; - LAYER_NUM botLayerNum; + LAYER_ID topLayerNum; + LAYER_ID botLayerNum; aVia->LayerPair( &topLayerNum, &botLayerNum ); @@ -890,7 +892,7 @@ void SPECCTRA_DB::fillBOUNDARY( BOARD* aBoard, BOUNDARY* boundary ) throw( IO_ER const int STEPS = 36; // for a segmentation of an arc of 360 degrees // Get all the DRAWSEGMENTS and module graphics into 'items', - // then keep only those on layer == EDGE_N. + // then keep only those on layer == Edge_Cuts. static const KICAD_T scan_graphics[] = { PCB_LINE_T, PCB_MODULE_EDGE_T, EOT }; @@ -898,11 +900,11 @@ void SPECCTRA_DB::fillBOUNDARY( BOARD* aBoard, BOUNDARY* boundary ) throw( IO_ER for( int i = 0; iGetLayer() != EDGE_N ) + if( items[i]->GetLayer() != Edge_Cuts ) { items.Remove( i ); } - else // remove graphics not on EDGE_N layer + else // remove graphics not on Edge_Cuts layer { DBG( items[i]->Show( 0, std::cout );) ++i; @@ -2133,7 +2135,7 @@ void SPECCTRA_DB::FlipMODULEs( BOARD* aBoard ) for( MODULE* module = aBoard->m_Modules; module; module = module->Next() ) { module->SetFlag( 0 ); - if( module->GetLayer() == LAYER_N_BACK ) + if( module->GetLayer() == B_Cu ) { module->Flip( module->GetPosition() ); module->SetFlag( 1 ); diff --git a/pcbnew/specctra_import.cpp b/pcbnew/specctra_import.cpp index dbe998375c..a7a4d8ff5f 100644 --- a/pcbnew/specctra_import.cpp +++ b/pcbnew/specctra_import.cpp @@ -266,7 +266,7 @@ TRACK* SPECCTRA_DB::makeTRACK( PATH* aPath, int aPointIndex, int aNetcode ) thro via->SetDrill( drillDiam ); via->SetViaType( VIA_THROUGH ); via->SetWidth( viaDiam ); - via->SetLayerPair( LAYER_N_FRONT, LAYER_N_BACK ); + via->SetLayerPair( F_Cu, B_Cu ); } else if( shapeCount == copperLayerCount ) { @@ -284,7 +284,7 @@ TRACK* SPECCTRA_DB::makeTRACK( PATH* aPath, int aPointIndex, int aNetcode ) thro via->SetDrill( drillDiam ); via->SetViaType( VIA_THROUGH ); via->SetWidth( viaDiam ); - via->SetLayerPair( LAYER_N_FRONT, LAYER_N_BACK ); + via->SetLayerPair( F_Cu, B_Cu ); } else // VIA_MICROVIA or VIA_BLIND_BURIED { @@ -333,8 +333,8 @@ TRACK* SPECCTRA_DB::makeTRACK( PATH* aPath, int aPointIndex, int aNetcode ) thro via->SetWidth( viaDiam ); - LAYER_NUM topLayer = pcbLayer2kicad[topLayerNdx]; - LAYER_NUM botLayer = pcbLayer2kicad[botLayerNdx]; + LAYER_ID topLayer = pcbLayer2kicad[topLayerNdx]; + LAYER_ID botLayer = pcbLayer2kicad[botLayerNdx]; via->SetLayerPair( topLayer, botLayer ); } @@ -410,7 +410,7 @@ void SPECCTRA_DB::FromSESSION( BOARD* aBoard ) throw( IO_ERROR ) // convert from degrees to tenths of degrees used in KiCad. int orientation = KiROUND( place->rotation * 10.0 ); - if( module->GetLayer() != LAYER_N_FRONT ) + if( module->GetLayer() != F_Cu ) { // module is on copper layer (back) module->Flip( module->GetPosition() ); @@ -422,7 +422,7 @@ void SPECCTRA_DB::FromSESSION( BOARD* aBoard ) throw( IO_ERROR ) { int orientation = KiROUND( (place->rotation + 180.0) * 10.0 ); - if( module->GetLayer() != LAYER_N_BACK ) + if( module->GetLayer() != B_Cu ) { // module is on component layer (front) module->Flip( module->GetPosition() ); diff --git a/pcbnew/swap_layers.cpp b/pcbnew/swap_layers.cpp index e3bf92bc59..32f00e817d 100644 --- a/pcbnew/swap_layers.cpp +++ b/pcbnew/swap_layers.cpp @@ -18,20 +18,22 @@ #include -#define LAYER_NO_CHANGE NB_LAYERS -static LAYER_NUM New_Layer[NB_PCB_LAYERS]; -wxStaticText* layer_list[NB_PCB_LAYERS]; +#define NO_CHANGE LAYER_ID(-3) enum swap_layer_id { ID_WINEDA_SWAPLAYERFRAME = 1800, ID_BUTTON_0, - ID_TEXT_0 = ID_BUTTON_0 + NB_PCB_LAYERS + ID_TEXT_0 = ID_BUTTON_0 + LAYER_ID_COUNT }; class SWAP_LAYERS_DIALOG : public DIALOG_SHIM { +public: + SWAP_LAYERS_DIALOG( PCB_BASE_FRAME* parent, LAYER_ID* aArray ); + // ~SWAP_LAYERS_DIALOG() { }; + private: PCB_BASE_FRAME* m_Parent; wxBoxSizer* OuterBoxSizer; @@ -43,12 +45,9 @@ private: wxStaticLine* Line; wxStdDialogButtonSizer* StdDialogButtonSizer; -public: + LAYER_ID* m_callers_nlayers; // DIM() is LAYER_ID_COUNT + wxStaticText* layer_list[LAYER_ID_COUNT]; - SWAP_LAYERS_DIALOG( PCB_BASE_FRAME* parent ); - ~SWAP_LAYERS_DIALOG() { }; - -private: void Sel_Layer( wxCommandEvent& event ); void OnOkClick( wxCommandEvent& event ); void OnCancelClick( wxCommandEvent& event ); @@ -58,18 +57,22 @@ private: BEGIN_EVENT_TABLE( SWAP_LAYERS_DIALOG, wxDialog ) - EVT_COMMAND_RANGE( ID_BUTTON_0, ID_BUTTON_0 + NB_PCB_LAYERS - 1, - wxEVT_COMMAND_BUTTON_CLICKED, - SWAP_LAYERS_DIALOG::Sel_Layer ) + EVT_COMMAND_RANGE( ID_BUTTON_0, ID_BUTTON_0 + LAYER_ID_COUNT - 1, + wxEVT_COMMAND_BUTTON_CLICKED, SWAP_LAYERS_DIALOG::Sel_Layer ) + EVT_BUTTON( wxID_OK, SWAP_LAYERS_DIALOG::OnOkClick ) + EVT_BUTTON( wxID_CANCEL, SWAP_LAYERS_DIALOG::OnCancelClick ) END_EVENT_TABLE() -SWAP_LAYERS_DIALOG::SWAP_LAYERS_DIALOG( PCB_BASE_FRAME* parent ) : +SWAP_LAYERS_DIALOG::SWAP_LAYERS_DIALOG( PCB_BASE_FRAME* parent, LAYER_ID* aArray ) : DIALOG_SHIM( parent, -1, _( "Swap Layers:" ), wxPoint( -1, -1 ), - wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER ) + wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER ), + m_callers_nlayers( aArray ) { + memset( layer_list, 0, sizeof( layer_list ) ); + BOARD* board = parent->GetBoard(); OuterBoxSizer = NULL; @@ -113,10 +116,10 @@ SWAP_LAYERS_DIALOG::SWAP_LAYERS_DIALOG( PCB_BASE_FRAME* parent ) : MainBoxSizer = new wxBoxSizer( wxHORIZONTAL ); OuterBoxSizer->Add( MainBoxSizer, 1, wxGROW | wxLEFT | wxRIGHT | wxTOP, 5 ); - for( LAYER_NUM ii = FIRST_LAYER; ii < NB_PCB_LAYERS; ++ii ) + for( unsigned layer = 0; layer < DIM( layer_list ); ++layer ) { // Provide a vertical line to separate the two FlexGrid sizers - if( ii == 16 ) + if( layer == 32 ) { Line = new wxStaticLine( this, -1, @@ -127,7 +130,7 @@ SWAP_LAYERS_DIALOG::SWAP_LAYERS_DIALOG( PCB_BASE_FRAME* parent ) : } // Provide a separate FlexGrid sizer for every sixteen sets of controls - if( ii % 16 == 0 ) + if( layer % 16 == 0 ) { /* Each layer has an associated static text string (to identify * that layer), a button (for invoking a child dialog box to @@ -168,16 +171,17 @@ SWAP_LAYERS_DIALOG::SWAP_LAYERS_DIALOG( PCB_BASE_FRAME* parent ) : /* Provide a text string to identify this layer (with trailing spaces * within that string being purged). */ - label = new wxStaticText( this, wxID_STATIC, board->GetLayerName( ii ), + label = new wxStaticText( this, wxID_STATIC, board->GetLayerName( LAYER_ID( layer ) ), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT ); + FlexColumnBoxSizer->Add( label, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL | wxLEFT | wxBOTTOM, 5 ); // Provide a button for this layer (which will invoke a child dialog box) - item_ID = ID_BUTTON_0 + ii; + item_ID = ID_BUTTON_0 + layer; Button = new wxButton( this, item_ID, wxT( "..." ), wxDefaultPosition, wxSize( w, h ), 0 ); @@ -191,7 +195,7 @@ SWAP_LAYERS_DIALOG::SWAP_LAYERS_DIALOG( PCB_BASE_FRAME* parent ) : * foreground color of the text to blue (which also indicates that the * layer is currently unmapped to any other layer). */ - item_ID = ID_TEXT_0 + ii; + item_ID = ID_TEXT_0 + layer; /* When the first of these text strings is being added, determine * what size is necessary to to be able to display the longest @@ -200,15 +204,15 @@ SWAP_LAYERS_DIALOG::SWAP_LAYERS_DIALOG( PCB_BASE_FRAME* parent ) : * size is not this size, strings can be truncated after * some other layer is selected.) */ - if( ii == 0 ) + if( layer == 0 ) { - text = new wxStaticText( this, item_ID, board->GetLayerName( FIRST_LAYER ), + text = new wxStaticText( this, item_ID, board->GetLayerName( LAYER_ID( 0 ) ), wxDefaultPosition, wxDefaultSize, 0 ); goodSize = text->GetSize(); - for( LAYER_NUM jj = LAYER_N_2; jj < NB_PCB_LAYERS; ++jj ) + for( unsigned jj = 1; jj < DIM( layer_list ); ++jj ) { - text->SetLabel( board->GetLayerName( jj ) ); + text->SetLabel( board->GetLayerName( LAYER_ID( jj ) ) ); if( goodSize.x < text->GetSize().x ) goodSize.x = text->GetSize().x; @@ -229,19 +233,19 @@ SWAP_LAYERS_DIALOG::SWAP_LAYERS_DIALOG( PCB_BASE_FRAME* parent ) : FlexColumnBoxSizer->Add( text, 1, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT | wxBOTTOM, 5 ); - layer_list[ii] = text; + layer_list[layer] = text; } /* Provide spacers to occupy otherwise blank cells within the second * FlexGrid sizer. (Becuse there are three columns, three spacers * are thus required for each unused row.) - */ for( int ii = 3 * NB_PCB_LAYERS; ii < 96; ii++ ) { FlexColumnBoxSizer->Add( 5, h, 0, wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT | wxBOTTOM, 5 ); } + */ // Provide a line to separate the controls which have been provided so far // from the OK and Cancel buttons (which will be provided after this line) @@ -279,29 +283,25 @@ void SWAP_LAYERS_DIALOG::Sel_Layer( wxCommandEvent& event ) ii = event.GetId(); - if( ii < ID_BUTTON_0 || ii >= ID_BUTTON_0 + NB_PCB_LAYERS ) + if( ii < ID_BUTTON_0 || ii >= ID_BUTTON_0 + LAYER_ID_COUNT ) return; ii = event.GetId() - ID_BUTTON_0; - LAYER_NUM layer = New_Layer[ii]; + LAYER_ID layer = m_callers_nlayers[ii]; - if( (layer < 0) || (layer > NB_PCB_LAYERS) ) - layer = LAYER_NO_CHANGE; // (Defaults to "No Change".) + LSET notallowed_mask = IsCopperLayer( ii ) ? LSET::AllNonCuMask() : LSET::AllCuMask(); - LAYER_MSK notallowed_mask = ii < NB_COPPER_LAYERS ? - ALL_NO_CU_LAYERS : ALL_CU_LAYERS; - layer = m_Parent->SelectLayer( layer == LAYER_NO_CHANGE ? ii : layer, - notallowed_mask ); + layer = m_Parent->SelectLayer( layer == NO_CHANGE ? LAYER_ID( ii ): layer, notallowed_mask ); if( !IsValidLayer( layer ) ) return; - if( layer != New_Layer[ii] ) + if( layer != m_callers_nlayers[ii] ) { - New_Layer[ii] = layer; + m_callers_nlayers[ii] = layer; - if( layer >= LAYER_NO_CHANGE || layer == ii ) + if( layer == NO_CHANGE || layer == ii ) { layer_list[ii]->SetLabel( _( "No Change" ) ); @@ -335,80 +335,71 @@ void SWAP_LAYERS_DIALOG::OnOkClick( wxCommandEvent& event ) void PCB_EDIT_FRAME::Swap_Layers( wxCommandEvent& event ) { - int ii, jj; - TRACK* pt_segm; - DRAWSEGMENT* pt_drawsegm; - EDA_ITEM* PtStruct; + LAYER_ID new_layer[LAYER_ID_COUNT]; - /* Init default values */ - for( ii = FIRST_LAYER; ii < NB_PCB_LAYERS; ii++ ) - New_Layer[ii] = LAYER_NO_CHANGE; + for( unsigned i = 0; i < DIM( new_layer ); ++i ) + new_layer[i] = NO_CHANGE; - SWAP_LAYERS_DIALOG dlg( this ); + SWAP_LAYERS_DIALOG dlg( this, new_layer ); - ii = dlg.ShowModal(); + if( dlg.ShowModal() != 1 ) + return; // (Canceled dialog box returns -1 instead) - if( ii != 1 ) - return; // (Canceled dialog box returns -1 instead) - - /* Change traces. */ - pt_segm = GetBoard()->m_Track; - - for( ; pt_segm != NULL; pt_segm = pt_segm->Next() ) + // Change traces. + for( TRACK* segm = GetBoard()->m_Track; segm; segm = segm->Next() ) { OnModify(); - if( pt_segm->Type() == PCB_VIA_T ) + if( segm->Type() == PCB_VIA_T ) { - VIA* Via = (VIA*) pt_segm; + VIA* via = (VIA*) segm; - if( Via->GetViaType() == VIA_THROUGH ) + if( via->GetViaType() == VIA_THROUGH ) continue; - LAYER_NUM top_layer, bottom_layer; + LAYER_ID top_layer, bottom_layer; - Via->LayerPair( &top_layer, &bottom_layer ); + via->LayerPair( &top_layer, &bottom_layer ); - if( New_Layer[bottom_layer] >= 0 && New_Layer[bottom_layer] < LAYER_NO_CHANGE ) - bottom_layer = New_Layer[bottom_layer]; + if( new_layer[bottom_layer] != NO_CHANGE ) + bottom_layer = new_layer[bottom_layer]; - if( New_Layer[top_layer] >= 0 && New_Layer[top_layer] < LAYER_NO_CHANGE ) - top_layer = New_Layer[top_layer]; + if( new_layer[top_layer] != NO_CHANGE ) + top_layer = new_layer[top_layer]; - Via->SetLayerPair( top_layer, bottom_layer ); + via->SetLayerPair( top_layer, bottom_layer ); } else { - jj = pt_segm->GetLayer(); + int jj = segm->GetLayer(); - if( New_Layer[jj] >= 0 && New_Layer[jj] < LAYER_NO_CHANGE ) - pt_segm->SetLayer( New_Layer[jj] ); + if( new_layer[jj] != NO_CHANGE ) + segm->SetLayer( new_layer[jj] ); } } - /* Change zones. */ - for( pt_segm = GetBoard()->m_Zone; pt_segm; pt_segm = pt_segm->Next() ) + // Change zones. + for( TRACK* segm = GetBoard()->m_Zone; segm; segm = segm->Next() ) { OnModify(); - jj = pt_segm->GetLayer(); + int jj = segm->GetLayer(); - if( New_Layer[jj] >= 0 && New_Layer[jj] < LAYER_NO_CHANGE ) - pt_segm->SetLayer( New_Layer[jj] ); + if( new_layer[jj] != NO_CHANGE ) + segm->SetLayer( new_layer[jj] ); } - /* Change other segments. */ - PtStruct = GetBoard()->m_Drawings; - - for( ; PtStruct != NULL; PtStruct = PtStruct->Next() ) + // Change other segments. + for( EDA_ITEM* item = GetBoard()->m_Drawings; item; item = item->Next() ) { - if( PtStruct->Type() == PCB_LINE_T ) + if( item->Type() == PCB_LINE_T ) { OnModify(); - pt_drawsegm = (DRAWSEGMENT*) PtStruct; - jj = pt_drawsegm->GetLayer(); - if( New_Layer[jj] >= 0 && New_Layer[jj] < LAYER_NO_CHANGE ) - pt_drawsegm->SetLayer( New_Layer[jj] ); + DRAWSEGMENT* drawsegm = (DRAWSEGMENT*) item; + int jj = drawsegm->GetLayer(); + + if( new_layer[jj] != NO_CHANGE ) + drawsegm->SetLayer( new_layer[jj] ); } } diff --git a/pcbnew/target_edit.cpp b/pcbnew/target_edit.cpp index 5a0d860d30..4e2e77bb48 100644 --- a/pcbnew/target_edit.cpp +++ b/pcbnew/target_edit.cpp @@ -209,7 +209,7 @@ PCB_TARGET* PCB_EDIT_FRAME::CreateTarget( wxDC* DC ) GetBoard()->Add( target ); - target->SetLayer( EDGE_N ); + target->SetLayer( Edge_Cuts ); target->SetWidth( GetDesignSettings().m_EdgeSegmentWidth ); target->SetSize( MireDefaultSize ); target->SetPosition( GetCrossHairPosition() ); diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index c1591700e5..db5d6900e8 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -94,7 +94,7 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) DRAWSEGMENT* arc = NULL; DRAWSEGMENT helperLine; helperLine.SetShape( S_SEGMENT ); - helperLine.SetLayer( DRAW_N ); + helperLine.SetLayer( Dwgs_User ); helperLine.SetWidth( 1 ); // Add a VIEW_GROUP that serves as a preview for the new item @@ -163,71 +163,71 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) switch( step ) { case SET_ORIGIN: - { - LAYER_NUM layer = m_frame->GetScreen()->m_Active_Layer; - - if( IsCopperLayer( layer ) ) { - DisplayInfoMessage( NULL, _( "Graphic not allowed on Copper layers" ) ); - --step; + LAYER_ID layer = m_frame->GetScreen()->m_Active_Layer; + + if( IsCopperLayer( layer ) ) + { + DisplayInfoMessage( NULL, _( "Graphic not allowed on Copper layers" ) ); + --step; + } + else + { + // Init the new item attributes + arc = new DRAWSEGMENT( m_board ); + arc->SetShape( S_ARC ); + arc->SetAngle( 0.0 ); + arc->SetWidth( m_board->GetDesignSettings().m_DrawSegmentWidth ); + arc->SetCenter( wxPoint( cursorPos.x, cursorPos.y ) ); + arc->SetLayer( layer ); + + helperLine.SetStart( arc->GetCenter() ); + helperLine.SetEnd( arc->GetCenter() ); + + preview.Add( arc ); + preview.Add( &helperLine ); + + m_controls->SetAutoPan( true ); + } } - else - { - // Init the new item attributes - arc = new DRAWSEGMENT( m_board ); - arc->SetShape( S_ARC ); - arc->SetAngle( 0.0 ); - arc->SetWidth( m_board->GetDesignSettings().m_DrawSegmentWidth ); - arc->SetCenter( wxPoint( cursorPos.x, cursorPos.y ) ); - arc->SetLayer( layer ); - - helperLine.SetStart( arc->GetCenter() ); - helperLine.SetEnd( arc->GetCenter() ); - - preview.Add( arc ); - preview.Add( &helperLine ); - - m_controls->SetAutoPan( true ); - } - } - break; + break; case SET_END: - { - if( wxPoint( cursorPos.x, cursorPos.y ) != arc->GetCenter() ) { - VECTOR2D startLine( arc->GetArcStart() - arc->GetCenter() ); - startAngle = startLine.Angle(); - arc->SetArcStart( wxPoint( cursorPos.x, cursorPos.y ) ); - } - else - --step; // one another chance to draw a proper arc + if( wxPoint( cursorPos.x, cursorPos.y ) != arc->GetCenter() ) + { + VECTOR2D startLine( arc->GetArcStart() - arc->GetCenter() ); + startAngle = startLine.Angle(); + arc->SetArcStart( wxPoint( cursorPos.x, cursorPos.y ) ); + } + else + --step; // one another chance to draw a proper arc - } - break; + } + break; case SET_ANGLE: - { - if( wxPoint( cursorPos.x, cursorPos.y ) != arc->GetArcStart() ) { - assert( arc->GetAngle() != 0 ); - assert( arc->GetArcStart() != arc->GetArcEnd() ); - assert( arc->GetWidth() > 0 ); + if( wxPoint( cursorPos.x, cursorPos.y ) != arc->GetArcStart() ) + { + assert( arc->GetAngle() != 0 ); + assert( arc->GetArcStart() != arc->GetArcEnd() ); + assert( arc->GetWidth() > 0 ); - m_view->Add( arc ); - m_board->Add( arc ); - arc->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + m_view->Add( arc ); + m_board->Add( arc ); + arc->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - m_frame->OnModify(); - m_frame->SaveCopyInUndoList( arc, UR_NEW ); + m_frame->OnModify(); + m_frame->SaveCopyInUndoList( arc, UR_NEW ); - preview.Remove( arc ); - preview.Remove( &helperLine ); + preview.Remove( arc ); + preview.Remove( &helperLine ); + } + else + --step; // one another chance to draw a proper arc } - else - --step; // one another chance to draw a proper arc - } - break; + break; } if( ++step == FINISHED ) @@ -446,39 +446,39 @@ int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent ) switch( step ) { case SET_ORIGIN: - { - LAYER_NUM layer = m_frame->GetScreen()->m_Active_Layer; - - if( IsCopperLayer( layer ) || layer == EDGE_N ) { - DisplayInfoMessage( NULL, _( "Dimension not allowed on Copper or Edge Cut layers" ) ); - --step; + LAYER_ID layer = m_frame->GetScreen()->m_Active_Layer; + + if( IsCopperLayer( layer ) || layer == Edge_Cuts ) + { + DisplayInfoMessage( NULL, _( "Dimension not allowed on Copper or Edge Cut layers" ) ); + --step; + } + else + { + // Init the new item attributes + dimension = new DIMENSION( m_board ); + dimension->SetLayer( layer ); + dimension->SetOrigin( wxPoint( cursorPos.x, cursorPos.y ) ); + dimension->SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); + dimension->Text().SetSize( m_board->GetDesignSettings().m_PcbTextSize ); + + width = m_board->GetDesignSettings().m_PcbTextWidth; + maxThickness = Clamp_Text_PenSize( width, dimension->Text().GetSize() ); + + if( width > maxThickness ) + width = maxThickness; + + dimension->Text().SetThickness( width ); + dimension->SetWidth( width ); + dimension->AdjustDimensionDetails(); + + preview.Add( dimension ); + + m_controls->SetAutoPan( true ); + } } - else - { - // Init the new item attributes - dimension = new DIMENSION( m_board ); - dimension->SetLayer( layer ); - dimension->SetOrigin( wxPoint( cursorPos.x, cursorPos.y ) ); - dimension->SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); - dimension->Text().SetSize( m_board->GetDesignSettings().m_PcbTextSize ); - - width = m_board->GetDesignSettings().m_PcbTextWidth; - maxThickness = Clamp_Text_PenSize( width, dimension->Text().GetSize() ); - - if( width > maxThickness ) - width = maxThickness; - - dimension->Text().SetThickness( width ); - dimension->SetWidth( width ); - dimension->AdjustDimensionDetails(); - - preview.Add( dimension ); - - m_controls->SetAutoPan( true ); - } - } - break; + break; case SET_END: dimension->SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); @@ -489,23 +489,23 @@ int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent ) break; case SET_HEIGHT: - { - if( wxPoint( cursorPos.x, cursorPos.y ) != dimension->GetPosition() ) { - assert( dimension->GetOrigin() != dimension->GetEnd() ); - assert( dimension->GetWidth() > 0 ); + if( wxPoint( cursorPos.x, cursorPos.y ) != dimension->GetPosition() ) + { + assert( dimension->GetOrigin() != dimension->GetEnd() ); + assert( dimension->GetWidth() > 0 ); - m_view->Add( dimension ); - m_board->Add( dimension ); - dimension->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + m_view->Add( dimension ); + m_board->Add( dimension ); + dimension->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - m_frame->OnModify(); - m_frame->SaveCopyInUndoList( dimension, UR_NEW ); + m_frame->OnModify(); + m_frame->SaveCopyInUndoList( dimension, UR_NEW ); - preview.Remove( dimension ); + preview.Remove( dimension ); + } } - } - break; + break; } if( ++step == FINISHED ) @@ -577,7 +577,7 @@ int DRAWING_TOOL::PlaceTarget( TOOL_EVENT& aEvent ) PCB_TARGET* target = new PCB_TARGET( m_board ); // Init the new item attributes - target->SetLayer( EDGE_N ); + target->SetLayer( Edge_Cuts ); target->SetWidth( m_board->GetDesignSettings().m_EdgeSegmentWidth ); target->SetSize( Millimeter2iu( 5 ) ); VECTOR2I cursorPos = m_controls->GetCursorPosition(); @@ -840,7 +840,7 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) { if( !graphic ) { - LAYER_NUM layer = m_frame->GetScreen()->m_Active_Layer; + LAYER_ID layer = m_frame->GetScreen()->m_Active_Layer; if( IsCopperLayer( layer ) ) { diff --git a/pcbnew/tools/pcbnew_control.cpp b/pcbnew/tools/pcbnew_control.cpp index a01ec83802..745c2be7bc 100644 --- a/pcbnew/tools/pcbnew_control.cpp +++ b/pcbnew/tools/pcbnew_control.cpp @@ -219,7 +219,7 @@ int PCBNEW_CONTROL::HighContrastDec( TOOL_EVENT& aEvent ) // Layer control int PCBNEW_CONTROL::LayerTop( TOOL_EVENT& aEvent ) { - getEditFrame()->SwitchLayer( NULL, LAYER_N_FRONT ); + getEditFrame()->SwitchLayer( NULL, F_Cu ); getEditFrame()->GetGalCanvas()->SetFocus(); setTransitions(); @@ -229,7 +229,7 @@ int PCBNEW_CONTROL::LayerTop( TOOL_EVENT& aEvent ) int PCBNEW_CONTROL::LayerInner1( TOOL_EVENT& aEvent ) { - getEditFrame()->SwitchLayer( NULL, LAYER_N_2 ); + getEditFrame()->SwitchLayer( NULL, In1_Cu ); getEditFrame()->GetGalCanvas()->SetFocus(); setTransitions(); @@ -239,7 +239,7 @@ int PCBNEW_CONTROL::LayerInner1( TOOL_EVENT& aEvent ) int PCBNEW_CONTROL::LayerInner2( TOOL_EVENT& aEvent ) { - getEditFrame()->SwitchLayer( NULL, LAYER_N_3 ); + getEditFrame()->SwitchLayer( NULL, In2_Cu ); getEditFrame()->GetGalCanvas()->SetFocus(); setTransitions(); @@ -249,7 +249,7 @@ int PCBNEW_CONTROL::LayerInner2( TOOL_EVENT& aEvent ) int PCBNEW_CONTROL::LayerInner3( TOOL_EVENT& aEvent ) { - getEditFrame()->SwitchLayer( NULL, LAYER_N_4 ); + getEditFrame()->SwitchLayer( NULL, In3_Cu ); getEditFrame()->GetGalCanvas()->SetFocus(); setTransitions(); @@ -259,7 +259,7 @@ int PCBNEW_CONTROL::LayerInner3( TOOL_EVENT& aEvent ) int PCBNEW_CONTROL::LayerInner4( TOOL_EVENT& aEvent ) { - getEditFrame()->SwitchLayer( NULL, LAYER_N_5 ); + getEditFrame()->SwitchLayer( NULL, In4_Cu ); getEditFrame()->GetGalCanvas()->SetFocus(); setTransitions(); @@ -269,7 +269,7 @@ int PCBNEW_CONTROL::LayerInner4( TOOL_EVENT& aEvent ) int PCBNEW_CONTROL::LayerInner5( TOOL_EVENT& aEvent ) { - getEditFrame()->SwitchLayer( NULL, LAYER_N_6 ); + getEditFrame()->SwitchLayer( NULL, In5_Cu ); getEditFrame()->GetGalCanvas()->SetFocus(); setTransitions(); @@ -279,7 +279,7 @@ int PCBNEW_CONTROL::LayerInner5( TOOL_EVENT& aEvent ) int PCBNEW_CONTROL::LayerInner6( TOOL_EVENT& aEvent ) { - getEditFrame()->SwitchLayer( NULL, LAYER_N_7 ); + getEditFrame()->SwitchLayer( NULL, In6_Cu ); getEditFrame()->GetGalCanvas()->SetFocus(); setTransitions(); @@ -289,7 +289,7 @@ int PCBNEW_CONTROL::LayerInner6( TOOL_EVENT& aEvent ) int PCBNEW_CONTROL::LayerBottom( TOOL_EVENT& aEvent ) { - getEditFrame()->SetActiveLayer( LAYER_N_BACK, true ); + getEditFrame()->SetActiveLayer( B_Cu, true ); getEditFrame()->GetGalCanvas()->SetFocus(); setTransitions(); @@ -300,22 +300,22 @@ int PCBNEW_CONTROL::LayerBottom( TOOL_EVENT& aEvent ) int PCBNEW_CONTROL::LayerNext( TOOL_EVENT& aEvent ) { PCB_EDIT_FRAME* editFrame = getEditFrame(); - LAYER_NUM layer = editFrame->GetActiveLayer(); + LAYER_NUM layer = editFrame->GetActiveLayer(); - if( ( layer < FIRST_COPPER_LAYER ) || ( layer >= LAST_COPPER_LAYER ) ) + if( layer < F_Cu || layer >= B_Cu ) { setTransitions(); return 0; } if( getModel()->GetCopperLayerCount() < 2 ) // Single layer - layer = LAYER_N_BACK; + layer = B_Cu; else if( layer >= getModel()->GetCopperLayerCount() - 2 ) - layer = LAYER_N_FRONT; + layer = B_Cu; else ++layer; - editFrame->SwitchLayer( NULL, layer ); + editFrame->SwitchLayer( NULL, LAYER_ID( layer ) ); editFrame->GetGalCanvas()->SetFocus(); setTransitions(); @@ -326,23 +326,23 @@ int PCBNEW_CONTROL::LayerNext( TOOL_EVENT& aEvent ) int PCBNEW_CONTROL::LayerPrev( TOOL_EVENT& aEvent ) { PCB_EDIT_FRAME* editFrame = getEditFrame(); - LAYER_NUM layer = editFrame->GetActiveLayer(); + LAYER_NUM layer = editFrame->GetActiveLayer(); - if( ( layer <= FIRST_COPPER_LAYER ) || ( layer > LAST_COPPER_LAYER ) ) + if( layer <= F_Cu || layer > B_Cu ) { setTransitions(); return 0; } if( getModel()->GetCopperLayerCount() < 2 ) // Single layer - layer = LAYER_N_BACK; - else if( layer == LAYER_N_FRONT ) - layer = std::max( LAYER_N_BACK, FIRST_COPPER_LAYER + getModel()->GetCopperLayerCount() - 2 ); + layer = B_Cu; + else if( layer == B_Cu ) + layer = std::max( int( F_Cu ), getModel()->GetCopperLayerCount() - 2 ); else --layer; assert( IsCopperLayer( layer ) ); - editFrame->SwitchLayer( NULL, layer ); + editFrame->SwitchLayer( NULL, LAYER_ID( layer ) ); editFrame->GetGalCanvas()->SetFocus(); setTransitions(); diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index ada9f09916..34f8c5b6f9 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -529,20 +529,21 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) const switch( aItem->Type() ) { case PCB_VIA_T: - { - // For vias it is enough if only one of layers is visible - LAYER_NUM top, bottom; - static_cast( aItem )->LayerPair( &top, &bottom ); + { + // For vias it is enough if only one of layers is visible + LAYER_ID top, bottom; - return board->IsLayerVisible( top ) || board->IsLayerVisible( bottom ); - } - break; + static_cast( aItem )->LayerPair( &top, &bottom ); + + return board->IsLayerVisible( top ) || board->IsLayerVisible( bottom ); + } + break; case PCB_MODULE_T: - if( aItem->IsOnLayer( LAYER_N_FRONT ) && board->IsElementVisible( MOD_FR_VISIBLE ) ) + if( aItem->IsOnLayer( F_Cu ) && board->IsElementVisible( MOD_FR_VISIBLE ) ) return true; - if( aItem->IsOnLayer( LAYER_N_BACK ) && board->IsElementVisible( MOD_BK_VISIBLE ) ) + if( aItem->IsOnLayer( B_Cu ) && board->IsElementVisible( MOD_BK_VISIBLE ) ) return true; return false; diff --git a/pcbnew/tr_modif.cpp b/pcbnew/tr_modif.cpp index 2e929fc9a1..5c5d5e299a 100644 --- a/pcbnew/tr_modif.cpp +++ b/pcbnew/tr_modif.cpp @@ -70,7 +70,7 @@ int PCB_EDIT_FRAME::EraseRedundantTrack( wxDC* aDC, int ii, jj, nb_segm, nbconnect; wxPoint start; wxPoint end; - LAYER_MSK startmasklayer, endmasklayer; + LSET startmasklayer, endmasklayer; int netcode = aNewTrack->GetNetCode(); @@ -135,31 +135,31 @@ int PCB_EDIT_FRAME::EraseRedundantTrack( wxDC* aDC, return 0; // Determine layers interconnected these points. - startmasklayer = StartTrack->GetLayerMask(); - endmasklayer = EndTrack->GetLayerMask(); + startmasklayer = StartTrack->GetLayerSet(); + endmasklayer = EndTrack->GetLayerSet(); // There may be a via or a pad on the end points. pt_segm = m_Pcb->m_Track->GetVia( NULL, start, startmasklayer ); if( pt_segm ) - startmasklayer |= pt_segm->GetLayerMask(); + startmasklayer |= pt_segm->GetLayerSet(); if( StartTrack->start && ( StartTrack->start->Type() == PCB_PAD_T ) ) { // Start on pad. D_PAD* pad = (D_PAD*) StartTrack->start; - startmasklayer |= pad->GetLayerMask(); + startmasklayer |= pad->GetLayerSet(); } pt_segm = m_Pcb->m_Track->GetVia( NULL, end, endmasklayer ); if( pt_segm ) - endmasklayer |= pt_segm->GetLayerMask(); + endmasklayer |= pt_segm->GetLayerSet(); if( EndTrack->end && ( EndTrack->end->Type() == PCB_PAD_T ) ) { D_PAD* pad = (D_PAD*) EndTrack->end; - endmasklayer |= pad->GetLayerMask(); + endmasklayer |= pad->GetLayerSet(); } // Mark as deleted a new track (which is not involved in the search for other connections) diff --git a/pcbnew/tracepcb.cpp b/pcbnew/tracepcb.cpp index 06ffe75859..e4992ba937 100644 --- a/pcbnew/tracepcb.cpp +++ b/pcbnew/tracepcb.cpp @@ -54,7 +54,7 @@ * The pads must appear on the layers selected in LayerMask */ static void Trace_Pads_Only( EDA_DRAW_PANEL* panel, wxDC* DC, MODULE* Module, - int ox, int oy, LAYER_MSK LayerMask, GR_DRAWMODE draw_mode ); + int ox, int oy, LSET LayerMask, GR_DRAWMODE draw_mode ); void FOOTPRINT_EDIT_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg ) @@ -195,28 +195,30 @@ void BOARD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* DC, GR_DRAWMODE aDrawMode, const } } + LSET all_cu = LSET::AllCuMask(); + for( MODULE* module = m_Modules; module; module = module->Next() ) { - bool display = true; - LAYER_MSK layerMask = ALL_CU_LAYERS; + bool display = true; + LSET layerMask = all_cu; if( module->IsMoving() ) continue; if( !IsElementVisible( PCB_VISIBLE( MOD_FR_VISIBLE ) ) ) { - if( module->GetLayer() == LAYER_N_FRONT ) + if( module->GetLayer() == F_Cu ) display = false; - layerMask &= ~LAYER_FRONT; + layerMask.set( F_Cu, false ); } if( !IsElementVisible( PCB_VISIBLE( MOD_BK_VISIBLE ) ) ) { - if( module->GetLayer() == LAYER_N_BACK ) + if( module->GetLayer() == B_Cu ) display = false; - layerMask &= ~LAYER_BACK; + layerMask.set( B_Cu, false ); } if( display ) @@ -285,7 +287,7 @@ void BOARD::DrawHighLight( EDA_DRAW_PANEL* am_canvas, wxDC* DC, int aNetCode ) * The pads must appear on the layers selected in LayerMask */ static void Trace_Pads_Only( EDA_DRAW_PANEL* panel, wxDC* DC, MODULE* aModule, - int ox, int oy, LAYER_MSK aLayerMask, GR_DRAWMODE draw_mode ) + int ox, int oy, LSET aLayerMask, GR_DRAWMODE draw_mode ) { PCB_BASE_FRAME* frame = (PCB_BASE_FRAME*) panel->GetParent(); @@ -296,7 +298,7 @@ static void Trace_Pads_Only( EDA_DRAW_PANEL* panel, wxDC* DC, MODULE* aModule, // Draw pads. for( D_PAD* pad = aModule->Pads(); pad; pad = pad->Next() ) { - if( (pad->GetLayerMask() & aLayerMask) == 0 ) + if( (pad->GetLayerSet() & aLayerMask) == 0 ) continue; pad->Draw( panel, DC, draw_mode, wxPoint( ox, oy ) ); diff --git a/pcbnew/zones_by_polygon.cpp b/pcbnew/zones_by_polygon.cpp index 00492f4334..512141d5fc 100644 --- a/pcbnew/zones_by_polygon.cpp +++ b/pcbnew/zones_by_polygon.cpp @@ -376,7 +376,7 @@ void PCB_EDIT_FRAME::Remove_Zone_Corner( wxDC* DC, ZONE_CONTAINER* aZone ) return; } - LAYER_NUM layer = aZone->GetLayer(); + LAYER_ID layer = aZone->GetLayer(); if( DC ) { @@ -745,7 +745,7 @@ bool PCB_EDIT_FRAME::End_Zone( wxDC* DC ) m_canvas->SetMouseCapture( NULL, NULL ); // Undraw old drawings, because they can have important changes - LAYER_NUM layer = zone->GetLayer(); + LAYER_ID layer = zone->GetLayer(); GetBoard()->RedrawAreasOutlines( m_canvas, DC, GR_XOR, layer ); GetBoard()->RedrawFilledAreas( m_canvas, DC, GR_XOR, layer ); @@ -865,7 +865,7 @@ void PCB_EDIT_FRAME::Edit_Zone_Params( wxDC* DC, ZONE_CONTAINER* aZone ) zoneInfo << *aZone; edited = InvokeKeepoutAreaEditor( this, &zoneInfo ); } - else if( aZone->GetLayer() < FIRST_NON_COPPER_LAYER ) + else if( IsCopperLayer( aZone->GetLayer() ) ) { // edit a zone on a copper layer diff --git a/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp b/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp index 8b46ad8e8b..13b1203b66 100644 --- a/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp +++ b/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp @@ -323,7 +323,7 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb ) // Add graphic items (copper texts) and board edges for( BOARD_ITEM* item = aPcb->m_Drawings; item; item = item->Next() ) { - if( item->GetLayer() != GetLayer() && item->GetLayer() != EDGE_N ) + if( item->GetLayer() != GetLayer() && item->GetLayer() != Edge_Cuts ) continue; switch( item->Type() ) diff --git a/pcbnew/zones_non_copper_type_functions.cpp b/pcbnew/zones_non_copper_type_functions.cpp index a8420eaaa2..8b35156828 100644 --- a/pcbnew/zones_non_copper_type_functions.cpp +++ b/pcbnew/zones_non_copper_type_functions.cpp @@ -99,25 +99,24 @@ void DIALOG_NON_COPPER_ZONES_EDITOR::Init() break; } - int ii; - LAYER_NUM layer_number; - for( layer_number = FIRST_NON_COPPER_LAYER, ii = 0; - layer_number <= LAST_NON_COPPER_LAYER; - ++layer_number, ++ii ) - { - wxString msg; + int ii = 0; + + for( LSEQ seq = LSET::AllNonCuMask().Seq(); seq; ++seq, ++ii ) + { + LAYER_ID layer = *seq; + + wxString msg = m_Parent->GetBoard()->GetLayerName( layer ).Trim(); - msg = m_Parent->GetBoard()->GetLayerName( layer_number ).Trim(); m_LayerSelectionCtrl->InsertItems( 1, &msg, ii ); if( m_zone ) { - if( m_zone->GetLayer() == layer_number ) + if( m_zone->GetLayer() == layer ) m_LayerSelectionCtrl->SetSelection( ii ); } else { - if( ( (PCB_SCREEN*)( m_Parent->GetScreen() ) )->m_Active_Layer == layer_number ) + if( ( (PCB_SCREEN*) m_Parent->GetScreen() )->m_Active_Layer == layer ) m_LayerSelectionCtrl->SetSelection( ii ); } } @@ -126,7 +125,7 @@ void DIALOG_NON_COPPER_ZONES_EDITOR::Init() void DIALOG_NON_COPPER_ZONES_EDITOR::OnOkClick( wxCommandEvent& event ) { - wxString txtvalue = m_ZoneMinThicknessCtrl->GetValue(); + wxString txtvalue = m_ZoneMinThicknessCtrl->GetValue(); m_settings.m_ZoneMinThickness = ValueFromString( g_UserUnit, txtvalue ); @@ -173,7 +172,9 @@ void DIALOG_NON_COPPER_ZONES_EDITOR::OnOkClick( wxCommandEvent& event ) return; } - m_settings.m_CurrentZone_Layer = FIRST_NON_COPPER_LAYER + ii; + LSEQ seq = LSET::AllNonCuMask().Seq(); + + m_settings.m_CurrentZone_Layer = seq[ii]; *m_ptr = m_settings; diff --git a/polygon/PolyLine.cpp b/polygon/PolyLine.cpp index c9ca85356d..1a8b141200 100644 --- a/polygon/PolyLine.cpp +++ b/polygon/PolyLine.cpp @@ -22,7 +22,7 @@ CPolyLine::CPolyLine() { m_hatchStyle = NO_HATCH; m_hatchPitch = 0; - m_layer = LAYER_N_FRONT; + m_layer = F_Cu; m_utility = 0; } From 96b6e1a5cbef1a0d5fad739ea53a0c89a5d3f47c Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 24 Jun 2014 20:04:16 +0200 Subject: [PATCH 517/741] Make dialog pns properties resizable. DXF import: add very basic polyline import. --- common/draw_panel.cpp | 2 +- pcbnew/dialogs/dialog_pns_settings_base.cpp | 11 +- pcbnew/dialogs/dialog_pns_settings_base.fbp | 143 +++++--------------- pcbnew/dialogs/dialog_pns_settings_base.h | 6 +- pcbnew/import_dxf/dxf2brd_items.cpp | 60 ++++++++ pcbnew/import_dxf/dxf2brd_items.h | 4 +- 6 files changed, 100 insertions(+), 126 deletions(-) diff --git a/common/draw_panel.cpp b/common/draw_panel.cpp index d977f17c4c..0367238bd6 100644 --- a/common/draw_panel.cpp +++ b/common/draw_panel.cpp @@ -128,7 +128,7 @@ EDA_DRAW_PANEL::EDA_DRAW_PANEL( EDA_DRAW_FRAME* parent, int id, if( cfg ) { - cfg->Read( ENBL_MIDDLE_BUTT_PAN_KEY, &m_enableMiddleButtonPan, false ); + cfg->Read( ENBL_MIDDLE_BUTT_PAN_KEY, &m_enableMiddleButtonPan, true ); cfg->Read( ENBL_ZOOM_NO_CENTER_KEY, &m_enableZoomNoCenter, false ); cfg->Read( MIDDLE_BUTT_PAN_LIMITED_KEY, &m_panScrollbarLimits, false ); cfg->Read( ENBL_AUTO_PAN_KEY, &m_enableAutoPan, true ); diff --git a/pcbnew/dialogs/dialog_pns_settings_base.cpp b/pcbnew/dialogs/dialog_pns_settings_base.cpp index 2642caf845..fb1214e740 100644 --- a/pcbnew/dialogs/dialog_pns_settings_base.cpp +++ b/pcbnew/dialogs/dialog_pns_settings_base.cpp @@ -11,7 +11,7 @@ DIALOG_PNS_SETTINGS_BASE::DIALOG_PNS_SETTINGS_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) { - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + this->SetSizeHints( wxSize( 280,380 ), wxDefaultSize ); wxBoxSizer* bMainSizer; bMainSizer = new wxBoxSizer( wxVERTICAL ); @@ -91,8 +91,8 @@ DIALOG_PNS_SETTINGS_BASE::DIALOG_PNS_SETTINGS_BASE( wxWindow* parent, wxWindowID bOptions->Add( bEffort, 0, wxEXPAND, 5 ); - m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bOptions->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); + + bMainSizer->Add( bOptions, 1, wxEXPAND|wxALL, 5 ); m_stdButtons = new wxStdDialogButtonSizer(); m_stdButtonsOK = new wxButton( this, wxID_OK ); @@ -101,10 +101,7 @@ DIALOG_PNS_SETTINGS_BASE::DIALOG_PNS_SETTINGS_BASE( wxWindow* parent, wxWindowID m_stdButtons->AddButton( m_stdButtonsCancel ); m_stdButtons->Realize(); - bOptions->Add( m_stdButtons, 0, wxEXPAND, 5 ); - - - bMainSizer->Add( bOptions, 1, wxEXPAND|wxALL, 5 ); + bMainSizer->Add( m_stdButtons, 0, wxEXPAND|wxALL, 5 ); this->SetSizer( bMainSizer ); diff --git a/pcbnew/dialogs/dialog_pns_settings_base.fbp b/pcbnew/dialogs/dialog_pns_settings_base.fbp index d635feb8ee..7350038cd1 100644 --- a/pcbnew/dialogs/dialog_pns_settings_base.fbp +++ b/pcbnew/dialogs/dialog_pns_settings_base.fbp @@ -41,11 +41,11 @@ 0 wxID_ANY - + 280,380 DIALOG_PNS_SETTINGS_BASE - 277,404 - wxDEFAULT_DIALOG_STYLE + 298,410 + wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER DIALOG_SHIM; dialog_shim.h Interactive Router settings @@ -811,11 +811,11 @@ - + 5 wxEXPAND 0 - + bEffort wxHORIZONTAL @@ -1221,113 +1221,32 @@ - - 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 - 0 - - 0 - 1 - 0 - 0 - 0 - 1 - 0 - 0 - - m_stdButtons - protected - - OnCancelClick - - - - OnOkClick - - - - + + + + 5 + wxEXPAND|wxALL + 0 + + 0 + 1 + 0 + 0 + 0 + 1 + 0 + 0 + + m_stdButtons + protected + + OnCancelClick + + + + OnOkClick + + diff --git a/pcbnew/dialogs/dialog_pns_settings_base.h b/pcbnew/dialogs/dialog_pns_settings_base.h index 5ba9eb21e3..22f07b2bb4 100644 --- a/pcbnew/dialogs/dialog_pns_settings_base.h +++ b/pcbnew/dialogs/dialog_pns_settings_base.h @@ -24,9 +24,8 @@ class DIALOG_SHIM; #include #include #include -#include -#include #include +#include #include /////////////////////////////////////////////////////////////////////////// @@ -52,7 +51,6 @@ class DIALOG_PNS_SETTINGS_BASE : public DIALOG_SHIM wxSlider* m_effort; wxStaticText* m_lowLabel; wxStaticText* m_highLabel; - wxStaticLine* m_staticline1; wxStdDialogButtonSizer* m_stdButtons; wxButton* m_stdButtonsOK; wxButton* m_stdButtonsCancel; @@ -65,7 +63,7 @@ class DIALOG_PNS_SETTINGS_BASE : public DIALOG_SHIM public: - DIALOG_PNS_SETTINGS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Interactive Router settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 277,404 ), long style = wxDEFAULT_DIALOG_STYLE ); + DIALOG_PNS_SETTINGS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Interactive Router settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 298,410 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_PNS_SETTINGS_BASE(); }; diff --git a/pcbnew/import_dxf/dxf2brd_items.cpp b/pcbnew/import_dxf/dxf2brd_items.cpp index e143830ee3..3a31fd0297 100644 --- a/pcbnew/import_dxf/dxf2brd_items.cpp +++ b/pcbnew/import_dxf/dxf2brd_items.cpp @@ -134,6 +134,66 @@ void DXF2BRD_CONVERTER::addLine( const DRW_Line& data ) appendToBoard( segm ); } +void DXF2BRD_CONVERTER::addPolyline(const DRW_Polyline& data ) +{ + // Currently, Pcbnew does not know polylines, for boards. + // So we have to convert a polyline to a set of segments. + // Obviously, the z coordinate is ignored + + wxPoint startpoint; + for( unsigned ii = 0; ii < data.vertlist.size(); ii++ ) + { + DRW_Vertex* vertex = data.vertlist[ii]; + + if( ii == 0 ) + { + startpoint.x = mapX( vertex->basePoint.x ); + startpoint.y = mapY( vertex->basePoint.y ); + continue; + } + + DRAWSEGMENT* segm = new DRAWSEGMENT( m_brd ); + segm->SetLayer( m_brdLayer ); + segm->SetStart( startpoint ); + wxPoint endpoint( mapX( vertex->basePoint.x ), mapY( vertex->basePoint.y ) ); + segm->SetEnd( endpoint ); + segm->SetWidth( mapDim( data.thickness == 0 ? m_defaultThickness + : data.thickness ) ); + appendToBoard( segm ); + startpoint = endpoint; + } +} + +void DXF2BRD_CONVERTER::addLWPolyline(const DRW_LWPolyline& data ) +{ + // Currently, Pcbnew does not know polylines, for boards. + // So we have to convert a polyline to a set of segments. + // The import is a simplified import: the width of segment is + // (obviously contant and is the width of the DRW_LWPolyline. + // the variable width of each vertex (when exists) is not used. + wxPoint startpoint; + for( unsigned ii = 0; ii < data.vertlist.size(); ii++ ) + { + DRW_Vertex2D* vertex = data.vertlist[ii]; + + if( ii == 0 ) + { + startpoint.x = mapX( vertex->x ); + startpoint.y = mapY( vertex->y ); + continue; + } + + DRAWSEGMENT* segm = new DRAWSEGMENT( m_brd ); + segm->SetLayer( m_brdLayer ); + segm->SetStart( startpoint ); + wxPoint endpoint( mapX( vertex->x ), mapY( vertex->y ) ); + segm->SetEnd( endpoint ); + segm->SetWidth( mapDim( data.thickness == 0 ? m_defaultThickness + : data.thickness ) ); + appendToBoard( segm ); + startpoint = endpoint; + } +} /* * Import Circle entities. diff --git a/pcbnew/import_dxf/dxf2brd_items.h b/pcbnew/import_dxf/dxf2brd_items.h index 0dcd676571..ecc8b14e1b 100644 --- a/pcbnew/import_dxf/dxf2brd_items.h +++ b/pcbnew/import_dxf/dxf2brd_items.h @@ -123,9 +123,9 @@ private: virtual void addCircle(const DRW_Circle& data ); virtual void addArc(const DRW_Arc& data ); virtual void addEllipse(const DRW_Ellipse& data ){} - virtual void addLWPolyline(const DRW_LWPolyline& data ){} + virtual void addLWPolyline(const DRW_LWPolyline& data ); virtual void addText(const DRW_Text& data ); - virtual void addPolyline(const DRW_Polyline& data ){} + virtual void addPolyline(const DRW_Polyline& data ); virtual void addSpline(const DRW_Spline* data ){} virtual void addKnot(const DRW_Entity&) {} virtual void addInsert(const DRW_Insert& data ){} From ab51a49c5a938cd735609afbaaef379b8546759c Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Tue, 24 Jun 2014 13:30:39 -0500 Subject: [PATCH 518/741] fix zones --- pcbnew/class_module.cpp | 2 +- pcbnew/class_zone.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pcbnew/class_module.cpp b/pcbnew/class_module.cpp index 50fbc9d086..0e3f015d39 100644 --- a/pcbnew/class_module.cpp +++ b/pcbnew/class_module.cpp @@ -595,7 +595,7 @@ D_PAD* MODULE::GetPad( const wxPoint& aPosition, LSET aLayerMask ) for( D_PAD* pad = m_Pads; pad; pad = pad->Next() ) { // ... and on the correct layer. - if( ( pad->GetLayerSet() & aLayerMask ) == 0 ) + if( !( pad->GetLayerSet() & aLayerMask ).any() ) continue; if( pad->HitTest( aPosition ) ) diff --git a/pcbnew/class_zone.h b/pcbnew/class_zone.h index 9203b0757b..332e3c5141 100644 --- a/pcbnew/class_zone.h +++ b/pcbnew/class_zone.h @@ -183,7 +183,7 @@ public: */ bool IsOnCopperLayer() const { - return LSET::AllNonCuMask()[GetLayer()]; + return IsCopperLayer( GetLayer() ); } /// How to fill areas: 0 = use filled polygons, 1 => fill with segments. From b76d0c533b88ef11765578855210917f20389de8 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Tue, 24 Jun 2014 13:31:41 -0500 Subject: [PATCH 519/741] add lset.cpp --- common/lset.cpp | 634 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 634 insertions(+) create mode 100644 common/lset.cpp diff --git a/common/lset.cpp b/common/lset.cpp new file mode 100644 index 0000000000..b7776c6902 --- /dev/null +++ b/common/lset.cpp @@ -0,0 +1,634 @@ + + +#include +#include + + + +LSET::LSET( const LAYER_ID* aArray, unsigned aCount ) +{ + for( unsigned i=0; i +#include + +LSET::LSET( size_t aIdCount, ... ) +{ + va_list ap; + + va_start( ap, aIdCount ); + + for( size_t i=0; i rend ) + { + int cc = *rstart--; + + if( cc == '_' ) + continue; + + int nibble; + + if( cc >= '0' && cc <= '9' ) + nibble = cc - '0'; + else if( cc >= 'a' && cc <= 'f' ) + nibble = cc - 'a' + 10; + else + break; + + int bit = nibble_ndx * 4; + + for( int ndx=0; bit= bitcount ) + break; + + ++nibble_ndx; + } + + int byte_count = aStart + aCount - 1 - rstart; + + assert( byte_count >= 0 ); + + if( byte_count > 0 ) + *this = tmp; + + return byte_count; +} + + +LSEQ LSET::Seq( const LAYER_ID* aWishListSequence, unsigned aCount ) const +{ + LSEQ ret; + +#if defined(DEBUG) + LSET dup_detector; + + for( unsigned i=0; i 1 ) + return UNDEFINED_LAYER; + + for( unsigned i=0; i < size(); ++i ) + { + if( test( i ) ) + return LAYER_ID( i ); + } + + wxASSERT( 0 ); // set_count was verified as 1 above, what did you break? + + return UNDEFINED_LAYER; +} + + +LSET LSET::InternalCuMask() +{ + static const LAYER_ID cu_internals[] = { + In1_Cu, + In2_Cu, + In3_Cu, + In4_Cu, + In5_Cu, + In6_Cu, + In7_Cu, + In8_Cu, + In9_Cu, + In10_Cu, + In11_Cu, + In12_Cu, + In13_Cu, + In14_Cu, + In15_Cu, + In16_Cu, + In17_Cu, + In18_Cu, + In19_Cu, + In20_Cu, + In21_Cu, + In22_Cu, + In23_Cu, + In24_Cu, + In25_Cu, + In26_Cu, + In27_Cu, + In28_Cu, + In29_Cu, + In30_Cu, + }; + + static const LSET saved( cu_internals, DIM( cu_internals ) ); + return saved; +} + + +LSET LSET::AllCuMask( int aCuLayerCount ) +{ + // retain all in static as the full set, which is a common case. + static const LSET all = InternalCuMask().set( F_Cu ).set( B_Cu ); + + if( aCuLayerCount == MAX_CU_LAYERS ) + return all; + + // subtract out some Cu layers not wanted in the mask. + LSET ret = all; + int clear_count = MAX_CU_LAYERS - aCuLayerCount; + + clear_count = Clamp( 0, clear_count, MAX_CU_LAYERS - 2 ); + + for( LAYER_NUM elem=In30_Cu; clear_count; --elem, --clear_count ) + { + ret.set( elem, false ); + } + + return ret; +} + + +LSET LSET::AllNonCuMask() +{ + static const LSET saved = LSET().set() & ~AllCuMask(); + return saved; +} + + +LSET LSET::AllLayersMask() +{ + static const LSET saved = LSET().set(); + return saved; +} + + +LSET LSET::BackTechMask() +{ + // (SILKSCREEN_LAYER_BACK | SOLDERMASK_LAYER_BACK | ADHESIVE_LAYER_BACK | SOLDERPASTE_LAYER_BACK) + static const LSET saved( 6, B_SilkS, B_Mask, B_Adhes, B_Paste, B_CrtYd, B_Fab ); + return saved; +} + + +LSET LSET::FrontTechMask() +{ + // (SILKSCREEN_LAYER_FRONT | SOLDERMASK_LAYER_FRONT | ADHESIVE_LAYER_FRONT | SOLDERPASTE_LAYER_FRONT) + static const LSET saved( 6, F_SilkS, F_Mask, F_Adhes, F_Paste, F_CrtYd, F_Fab ); + return saved; +} + + +LSET LSET::AllTechMask() +{ + static const LSET saved = BackTechMask() | FrontTechMask(); + return saved; +} + + +LSET LSET::UserMask() +{ + static const LSET saved( 6, + Dwgs_User, + Cmts_User, + Eco1_User, + Eco2_User, + Edge_Cuts, + Margin + ); + + return saved; +} + + +LSET LSET::FrontMask() +{ + static const LSET saved = FrontTechMask().set( F_Cu ); + return saved; +} + + +LSET LSET::BackMask() +{ + static const LSET saved = BackTechMask().set( B_Cu ); + return saved; +} + + +#if 0 +// layers order in dialogs (plot, print and toolbars) +// in same order than in setup layers dialog +// (Front or Top to Back or Bottom) +#define DECLARE_LAYERS_ORDER_LIST(list) const LAYER_ID list[] = {\ + F_Cu,\ + LAYER_N_15, LAYER_N_14, LAYER_N_13, LAYER_N_12,\ + LAYER_N_11, LAYER_N_10, LAYER_N_9, LAYER_N_8,\ + LAYER_N_7, LAYER_N_6, LAYER_N_5, LAYER_N_4,\ + LAYER_N_3, LAYER_N_2,\ + B_Cu,\ + F_Adhes , B_Adhes,\ + F_Paste, B_Paste,\ + F_SilkS, B_SilkS,\ + F_Mask, B_Mask,\ + Dwgs_User,\ + Cmts_User,\ + Eco1_User, Eco2_User,\ + Edge_Cuts,\ + UNUSED_LAYER_29, UNUSED_LAYER_30, UNUSED_LAYER_31\ +}; +#endif + + +LSEQ LSET::UIOrder() const +{ + LAYER_ID order[Margin+1]; + + // Assmuming that the LAYER_ID order is according to preferred UI order, as of + // today this is true. When that becomes not true, its easy to change the order + // in here to compensate. + + for( unsigned i=0; i Date: Tue, 24 Jun 2014 23:36:02 -0500 Subject: [PATCH 520/741] 1) Fix compiles using wx 3.x and 2.8. 2) Fix passing wxString to common/config_params so lookup keys can be dynamically generated. This gives ~/.kicad files all the colors. 3) Fix LEGACY_PLUGIN so it loads all layer types and masks properly. 4) Extend the table in router/pns_index.h to 128 from 64. --- common/config_params.cpp | 38 +++++++++---------- include/config_params.h | 43 ++++++++++++---------- pcbnew/class_board.h | 10 ++--- pcbnew/legacy_plugin.cpp | 77 +++++++++++++++++++++++++++++++++------ pcbnew/pcb_parser.cpp | 14 ++++--- pcbnew/router/pns_index.h | 2 +- 6 files changed, 121 insertions(+), 63 deletions(-) diff --git a/common/config_params.cpp b/common/config_params.cpp index 6f7fabcbbc..a5ec23f7c4 100644 --- a/common/config_params.cpp +++ b/common/config_params.cpp @@ -47,7 +47,7 @@ void wxConfigSaveParams( wxConfigBase* aCfg, BOOST_FOREACH( const PARAM_CFG_BASE& param, aList ) { - if( param.m_Group ) + if( !!param.m_Group ) aCfg->SetPath( param.m_Group ); else aCfg->SetPath( aGroup ); @@ -57,7 +57,7 @@ void wxConfigSaveParams( wxConfigBase* aCfg, if( param.m_Type == PARAM_COMMAND_ERASE ) // Erase all data { - if( param.m_Ident ) + if( !!param.m_Ident ) aCfg->DeleteGroup( param.m_Ident ); } else @@ -75,7 +75,7 @@ void wxConfigLoadParams( wxConfigBase* aCfg, BOOST_FOREACH( const PARAM_CFG_BASE& param, aList ) { - if( param.m_Group ) + if( !!param.m_Group ) aCfg->SetPath( param.m_Group ); else aCfg->SetPath( aGroup ); @@ -99,7 +99,7 @@ void wxConfigSaveSetups( wxConfigBase* aCfg, const PARAM_CFG_ARRAY& aList ) if( param.m_Type == PARAM_COMMAND_ERASE ) // Erase all data { - if( param.m_Ident ) + if( !!param.m_Ident ) aCfg->DeleteGroup( param.m_Ident ); } else @@ -137,7 +137,7 @@ void ConfigBaseWriteDouble( wxConfigBase* aConfig, const wxString& aKey, double } -PARAM_CFG_BASE::PARAM_CFG_BASE( const wxChar* ident, const paramcfg_id type, +PARAM_CFG_BASE::PARAM_CFG_BASE( const wxString& ident, const paramcfg_id type, const wxChar* group ) { m_Ident = ident; @@ -147,7 +147,7 @@ PARAM_CFG_BASE::PARAM_CFG_BASE( const wxChar* ident, const paramcfg_id type, } -PARAM_CFG_INT::PARAM_CFG_INT( const wxChar* ident, int* ptparam, +PARAM_CFG_INT::PARAM_CFG_INT( const wxString& ident, int* ptparam, int default_val, int min, int max, const wxChar* group ) : PARAM_CFG_BASE( ident, PARAM_INT, group ) @@ -159,7 +159,7 @@ PARAM_CFG_INT::PARAM_CFG_INT( const wxChar* ident, int* ptparam, } -PARAM_CFG_INT::PARAM_CFG_INT( bool Insetup, const wxChar* ident, int* ptparam, +PARAM_CFG_INT::PARAM_CFG_INT( bool Insetup, const wxString& ident, int* ptparam, int default_val, int min, int max, const wxChar* group ) : PARAM_CFG_BASE( ident, PARAM_INT, group ) @@ -195,7 +195,7 @@ void PARAM_CFG_INT::SaveParam( wxConfigBase* aConfig ) const } -PARAM_CFG_INT_WITH_SCALE::PARAM_CFG_INT_WITH_SCALE( const wxChar* ident, int* ptparam, +PARAM_CFG_INT_WITH_SCALE::PARAM_CFG_INT_WITH_SCALE( const wxString& ident, int* ptparam, int default_val, int min, int max, const wxChar* group, double aBiu2cfgunit ) : PARAM_CFG_INT( ident, ptparam, default_val, min, max, group ) @@ -206,7 +206,7 @@ PARAM_CFG_INT_WITH_SCALE::PARAM_CFG_INT_WITH_SCALE( const wxChar* ident, int* pt PARAM_CFG_INT_WITH_SCALE::PARAM_CFG_INT_WITH_SCALE( bool Insetup, - const wxChar* ident, int* ptparam, + const wxString& ident, int* ptparam, int default_val, int min, int max, const wxChar* group, double aBiu2cfgunit ) : PARAM_CFG_INT( Insetup, ident, ptparam, default_val, min, max, group ) @@ -246,7 +246,7 @@ void PARAM_CFG_INT_WITH_SCALE::SaveParam( wxConfigBase* aConfig ) const } -PARAM_CFG_SETCOLOR::PARAM_CFG_SETCOLOR( const wxChar* ident, EDA_COLOR_T* ptparam, +PARAM_CFG_SETCOLOR::PARAM_CFG_SETCOLOR( const wxString& ident, EDA_COLOR_T* ptparam, EDA_COLOR_T default_val, const wxChar* group ) : PARAM_CFG_BASE( ident, PARAM_SETCOLOR, group ) @@ -257,7 +257,7 @@ PARAM_CFG_SETCOLOR::PARAM_CFG_SETCOLOR( const wxChar* ident, EDA_COLOR_T* ptpara PARAM_CFG_SETCOLOR::PARAM_CFG_SETCOLOR( bool Insetup, - const wxChar* ident, + const wxString& ident, EDA_COLOR_T* ptparam, EDA_COLOR_T default_val, const wxChar* group ) : @@ -291,7 +291,7 @@ void PARAM_CFG_SETCOLOR::SaveParam( wxConfigBase* aConfig ) const } -PARAM_CFG_DOUBLE::PARAM_CFG_DOUBLE( const wxChar* ident, double* ptparam, +PARAM_CFG_DOUBLE::PARAM_CFG_DOUBLE( const wxString& ident, double* ptparam, double default_val, double min, double max, const wxChar* group ) : PARAM_CFG_BASE( ident, PARAM_DOUBLE, group ) @@ -304,7 +304,7 @@ PARAM_CFG_DOUBLE::PARAM_CFG_DOUBLE( const wxChar* ident, double* ptparam, PARAM_CFG_DOUBLE::PARAM_CFG_DOUBLE( bool Insetup, - const wxChar* ident, + const wxString& ident, double* ptparam, double default_val, double min, @@ -348,7 +348,7 @@ void PARAM_CFG_DOUBLE::SaveParam( wxConfigBase* aConfig ) const } -PARAM_CFG_BOOL::PARAM_CFG_BOOL( const wxChar* ident, bool* ptparam, +PARAM_CFG_BOOL::PARAM_CFG_BOOL( const wxString& ident, bool* ptparam, int default_val, const wxChar* group ) : PARAM_CFG_BASE( ident, PARAM_BOOL, group ) { @@ -358,7 +358,7 @@ PARAM_CFG_BOOL::PARAM_CFG_BOOL( const wxChar* ident, bool* ptparam, PARAM_CFG_BOOL::PARAM_CFG_BOOL( bool Insetup, - const wxChar* ident, + const wxString& ident, bool* ptparam, int default_val, const wxChar* group ) : @@ -390,7 +390,7 @@ void PARAM_CFG_BOOL::SaveParam( wxConfigBase* aConfig ) const } -PARAM_CFG_WXSTRING::PARAM_CFG_WXSTRING( const wxChar* ident, +PARAM_CFG_WXSTRING::PARAM_CFG_WXSTRING( const wxString& ident, wxString* ptparam, const wxChar* group ) : PARAM_CFG_BASE( ident, PARAM_WXSTRING, group ) @@ -399,7 +399,7 @@ PARAM_CFG_WXSTRING::PARAM_CFG_WXSTRING( const wxChar* ident, } -PARAM_CFG_WXSTRING::PARAM_CFG_WXSTRING( bool Insetup, const wxChar* ident, +PARAM_CFG_WXSTRING::PARAM_CFG_WXSTRING( bool Insetup, const wxString& ident, wxString* ptparam, const wxString& default_val, const wxChar* group ) : @@ -407,7 +407,7 @@ PARAM_CFG_WXSTRING::PARAM_CFG_WXSTRING( bool Insetup, const wxChar* ident, { m_Pt_param = ptparam; m_Setup = Insetup; - m_default = default_val; + m_default = default_val; } @@ -429,7 +429,7 @@ void PARAM_CFG_WXSTRING::SaveParam( wxConfigBase* aConfig ) const } -PARAM_CFG_FILENAME::PARAM_CFG_FILENAME( const wxChar* ident, +PARAM_CFG_FILENAME::PARAM_CFG_FILENAME( const wxString& ident, wxString* ptparam, const wxChar* group ) : PARAM_CFG_BASE( ident, PARAM_FILENAME, group ) diff --git a/include/config_params.h b/include/config_params.h index 5529fbfce5..81fd617c62 100644 --- a/include/config_params.h +++ b/include/config_params.h @@ -89,13 +89,14 @@ enum paramcfg_id { class PARAM_CFG_BASE { public: - const wxChar* m_Ident; ///< Keyword in config data - paramcfg_id m_Type; ///< Type of parameter - const wxChar* m_Group; ///< Group name (this is like a path in the config data) - bool m_Setup; ///< Install or Project based parameter, true == install + wxString m_Ident; ///< Keyword in config data + paramcfg_id m_Type; ///< Type of parameter + wxString m_Group; ///< Group name (this is like a path in the config data) + bool m_Setup; ///< Install or Project based parameter, true == install public: - PARAM_CFG_BASE( const wxChar* ident, const paramcfg_id type, const wxChar* group = NULL ); + PARAM_CFG_BASE( const wxString& ident, const paramcfg_id type, + const wxChar* group = NULL ); virtual ~PARAM_CFG_BASE() {} /** @@ -126,12 +127,12 @@ public: int m_Default; ///< The default value of the parameter public: - PARAM_CFG_INT( const wxChar* ident, int* ptparam, + PARAM_CFG_INT( const wxString& ident, int* ptparam, int default_val = 0, int min = std::numeric_limits::min(), int max = std::numeric_limits::max(), const wxChar* group = NULL ); - PARAM_CFG_INT( bool Insetup, const wxChar* ident, int* ptparam, + PARAM_CFG_INT( bool Insetup, const wxString& ident, int* ptparam, int default_val = 0, int min = std::numeric_limits::min(), int max = std::numeric_limits::max(), @@ -154,13 +155,13 @@ public: double m_BIU_to_cfgunit; ///< the factor to convert the saved value in internal value public: - PARAM_CFG_INT_WITH_SCALE( const wxChar* ident, int* ptparam, + PARAM_CFG_INT_WITH_SCALE( const wxString& ident, int* ptparam, int default_val = 0, int min = std::numeric_limits::min(), int max = std::numeric_limits::max(), const wxChar* group = NULL, double aBiu2cfgunit = 1.0); - PARAM_CFG_INT_WITH_SCALE( bool Insetup, const wxChar* ident, int* ptparam, + PARAM_CFG_INT_WITH_SCALE( bool Insetup, const wxString& ident, int* ptparam, int default_val = 0, int min = std::numeric_limits::min(), int max = std::numeric_limits::max(), @@ -183,9 +184,9 @@ public: EDA_COLOR_T m_Default; ///< The default value of the parameter public: - PARAM_CFG_SETCOLOR( const wxChar* ident, EDA_COLOR_T* ptparam, + PARAM_CFG_SETCOLOR( const wxString& ident, EDA_COLOR_T* ptparam, EDA_COLOR_T default_val, const wxChar* group = NULL ); - PARAM_CFG_SETCOLOR( bool Insetup, const wxChar* ident, EDA_COLOR_T* ptparam, + PARAM_CFG_SETCOLOR( bool Insetup, const wxString& ident, EDA_COLOR_T* ptparam, EDA_COLOR_T default_val, const wxChar* group = NULL ); virtual void ReadParam( wxConfigBase* aConfig ) const; @@ -205,10 +206,10 @@ public: double m_Min, m_Max; ///< Minimum and maximum values of the param type public: - PARAM_CFG_DOUBLE( const wxChar* ident, double* ptparam, + PARAM_CFG_DOUBLE( const wxString& ident, double* ptparam, double default_val = 0.0, double min = 0.0, double max = 10000.0, const wxChar* group = NULL ); - PARAM_CFG_DOUBLE( bool Insetup, const wxChar* ident, double* ptparam, + PARAM_CFG_DOUBLE( bool Insetup, const wxString& ident, double* ptparam, double default_val = 0.0, double min = 0.0, double max = 10000.0, const wxChar* group = NULL ); @@ -228,9 +229,9 @@ public: int m_Default; ///< The default value of the parameter public: - PARAM_CFG_BOOL( const wxChar* ident, bool* ptparam, + PARAM_CFG_BOOL( const wxString& ident, bool* ptparam, int default_val = false, const wxChar* group = NULL ); - PARAM_CFG_BOOL( bool Insetup, const wxChar* ident, bool* ptparam, + PARAM_CFG_BOOL( bool Insetup, const wxString& ident, bool* ptparam, int default_val = false, const wxChar* group = NULL ); virtual void ReadParam( wxConfigBase* aConfig ) const; @@ -242,19 +243,20 @@ public: * Configuration parameter - wxString Class * */ -class PARAM_CFG_WXSTRING : public PARAM_CFG_BASE +class PARAM_CFG_WXSTRING : public PARAM_CFG_BASE { public: wxString* m_Pt_param; ///< Pointer to the parameter value wxString m_default; ///< The default value of the parameter public: - PARAM_CFG_WXSTRING( const wxChar* ident, wxString* ptparam, const wxChar* group = NULL ); + PARAM_CFG_WXSTRING( const wxString& ident, wxString* ptparam, const wxChar* group = NULL ); + PARAM_CFG_WXSTRING( bool Insetup, - const wxChar* ident, + const wxString& ident, wxString* ptparam, const wxString& default_val = wxEmptyString, - const wxChar* group = NULL ); + const wxChar* group = NULL ); virtual void ReadParam( wxConfigBase* aConfig ) const; virtual void SaveParam( wxConfigBase* aConfig ) const; @@ -273,7 +275,8 @@ public: wxString* m_Pt_param; ///< Pointer to the parameter value public: - PARAM_CFG_FILENAME( const wxChar* ident, wxString* ptparam, const wxChar* group = NULL ); + PARAM_CFG_FILENAME( const wxString& ident, wxString* ptparam, + const wxChar* group = NULL ); virtual void ReadParam( wxConfigBase* aConfig ) const; virtual void SaveParam( wxConfigBase* aConfig ) const; }; diff --git a/pcbnew/class_board.h b/pcbnew/class_board.h index 981450c070..e61c824992 100644 --- a/pcbnew/class_board.h +++ b/pcbnew/class_board.h @@ -106,15 +106,13 @@ struct LAYER } */ - /** The name of the layer, there should be no spaces in this name. */ - UTF8 m_name; + wxString m_name; ///< The name of the layer, there should be no spaces in this name. - /** The type of the layer */ - LAYER_T m_type; + LAYER_T m_type; ///< The type of the layer - bool m_visible; + bool m_visible; - int m_number; + int m_number; /** * Function ShowType diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index 002313c868..344df0173a 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -98,7 +98,7 @@ typedef LEGACY_PLUGIN::BIU BIU; #define UNKNOWN_PAD_ATTRIBUTE _( "unknown pad attribute: %d" ) -typedef unsigned LAYER_MASK; +typedef unsigned LEG_MASK; #define FIRST_LAYER 0 #define FIRST_COPPER_LAYER 0 @@ -255,7 +255,7 @@ static inline char* ReadLine( LINE_READER* rdr, const char* caller ) /* corrected old junk, element 14 was wrong. can delete. // Look up Table for conversion copper layer count -> general copper layer mask: -static const LAYER_MASK all_cu_mask[] = { +static const LEG_MASK all_cu_mask[] = { 0x0001, 0x8001, 0x8003, 0x8007, 0x800F, 0x801F, 0x803F, 0x807F, 0x80FF, 0x81FF, 0x83FF, 0x87FF, @@ -313,7 +313,7 @@ static EDA_TEXT_VJUSTIFY_T vertJustify( const char* vertical ) /// Count the number of set layers in the mask -inline int layerMaskCountSet( LAYER_MASK aMask ) +inline int layerMaskCountSet( LEG_MASK aMask ) { int count = 0; @@ -338,6 +338,8 @@ LAYER_ID LEGACY_PLUGIN::leg_layer2new( int cu_count, LAYER_NUM aLayerNum ) { if( old == LAYER_N_FRONT ) newid = F_Cu; + else if( old == LAYER_N_BACK ) + newid = B_Cu; else { newid = cu_count - 1 - old; @@ -376,6 +378,13 @@ LSET LEGACY_PLUGIN::leg_mask2new( int cu_count, unsigned aMask ) { LSET ret; + if( ( aMask & ALL_CU_LAYERS ) == ALL_CU_LAYERS ) + { + ret = LSET::AllCuMask(); + + aMask &= ~ALL_CU_LAYERS; + } + for( int i=0; i>= 1 ) { if( aMask & 1 ) @@ -601,6 +610,7 @@ void LEGACY_PLUGIN::loadGENERAL() { char* line; char* saveptr; + bool saw_LayerCount = false; while( ( line = READLINE( m_reader ) ) != NULL ) { @@ -617,22 +627,42 @@ void LEGACY_PLUGIN::loadGENERAL() } } + else if( TESTLINE( "LayerCount" ) ) + { + int tmp = intParse( line + SZ( "LayerCount" ) ); + m_board->SetCopperLayerCount( tmp ); + + // This has to be set early so that leg_layer2new() works OK, and + // that means before parsing "EnabledLayers" and "VisibleLayers". + m_cu_count = tmp; + + saw_LayerCount = true; + } + else if( TESTLINE( "EnabledLayers" ) ) { - LAYER_MASK enabledLayers = hexParse( line + SZ( "EnabledLayers" ) ); + if( !saw_LayerCount ) + THROW_IO_ERROR( "Missing '$GENERAL's LayerCount" ); + + LEG_MASK enabledLayers = hexParse( line + SZ( "EnabledLayers" ) ); LSET new_mask = leg_mask2new( m_cu_count, enabledLayers ); - // layer usage + //DBG( printf( "EnabledLayers: %s\n", new_mask.FmtHex().c_str() );) + m_board->SetEnabledLayers( new_mask ); // layer visibility equals layer usage, unless overridden later via "VisibleLayers" + // Must call SetEnabledLayers() before calling SetVisibleLayers(). m_board->SetVisibleLayers( new_mask ); } else if( TESTLINE( "VisibleLayers" ) ) { - LAYER_MASK visibleLayers = hexParse( line + SZ( "VisibleLayers" ) ); + if( !saw_LayerCount ) + THROW_IO_ERROR( "Missing '$GENERAL's LayerCount" ); + + LEG_MASK visibleLayers = hexParse( line + SZ( "VisibleLayers" ) ); LSET new_mask = leg_mask2new( m_cu_count, visibleLayers ); @@ -641,11 +671,16 @@ void LEGACY_PLUGIN::loadGENERAL() else if( TESTLINE( "Ly" ) ) // Old format for Layer count { - LAYER_MASK layer_mask = hexParse( line + SZ( "Ly" ) ); + if( !saw_LayerCount ) + { + LEG_MASK layer_mask = hexParse( line + SZ( "Ly" ) ); - m_cu_count = layerMaskCountSet( layer_mask & ALL_CU_LAYERS ); + m_cu_count = layerMaskCountSet( layer_mask & ALL_CU_LAYERS ); - m_board->SetCopperLayerCount( m_cu_count ); + m_board->SetCopperLayerCount( m_cu_count ); + + saw_LayerCount = true; + } } else if( TESTLINE( "BoardThickness" ) ) @@ -867,18 +902,38 @@ void LEGACY_PLUGIN::loadSETUP() bds.m_AuxOrigin = wxPoint( gx, gy ); } + /* Done from $General above's "LayerCount" else if( TESTLINE( "Layers" ) ) { int tmp = intParse( line + SZ( "Layers" ) ); m_board->SetCopperLayerCount( tmp ); + + m_cu_count = tmp; } + */ else if( TESTSUBSTR( "Layer[" ) ) { // eg: "Layer[n] " LAYER_NUM layer_num = layerParse( line + SZ( "Layer[" ), &data ); - LAYER_ID layer_id = leg_layer2new( m_cu_count, layer_num ); + LAYER_ID layer_id = leg_layer2new( m_cu_count, layer_num ); + + /* + switch( layer_num ) + { + case LAYER_N_BACK: + layer_id = B_Cu; + break; + + case LAYER_N_FRONT: + layer_id = F_Cu; + break; + + default: + layer_id = LAYER_ID( layer_num ); + } + */ data = strtok_r( (char*) data+1, delims, &saveptr ); // +1 for ']' if( data ) @@ -1496,7 +1551,7 @@ void LEGACY_PLUGIN::loadPAD( MODULE* aModule ) data = strtok_r( NULL, delims, &saveptr ); // skip BufCar data = strtok_r( NULL, delims, &saveptr ); - LAYER_MASK layer_mask = hexParse( data ); + LEG_MASK layer_mask = hexParse( data ); pad->SetLayerSet( leg_mask2new( m_cu_count, layer_mask ) ); pad->SetAttribute( attribute ); diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index d6f4b8fd31..06fe19edcf 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -743,7 +743,7 @@ void PCB_PARSER::parseLayers() throw( IO_ERROR, PARSE_ERROR ) { cu.push_back( layer ); - DBG( printf( "cop m_visible:%s\n", cu.back().m_visible ? "true" : "false" );) + //DBG( printf( "cop m_visible:%s\n", cu.back().m_visible ? "true" : "false" );) } else // all non-copper are fixed names, simply look up LAYER_ID. { @@ -773,8 +773,10 @@ void PCB_PARSER::parseLayers() throw( IO_ERROR, PARSE_ERROR ) m_board->SetLayer( LAYER_ID( it->m_number ), *it ); - m_layerIndices[ it->m_name ] = LAYER_ID( it->m_number ); - m_layerMasks[ it->m_name ] = LSET( it->m_number ); + UTF8 name = it->m_name; + + m_layerIndices[ name ] = LAYER_ID( it->m_number ); + m_layerMasks[ name ] = LSET( it->m_number ); } copperLayerCount = cu.size(); @@ -782,12 +784,12 @@ void PCB_PARSER::parseLayers() throw( IO_ERROR, PARSE_ERROR ) cu.clear(); // this marks the list as "one time processed". } - LAYER_ID_MAP::const_iterator it = m_layerIndices.find( layer.m_name ); + LAYER_ID_MAP::const_iterator it = m_layerIndices.find( UTF8( layer.m_name ) ); if( it == m_layerIndices.end() ) { wxString error = wxString::Format( - _( "Layer '%s' in file <%s> at line %d, is not in fixed layer hash" ), + _( "Layer '%s' in file '%s' at line %d, is not in fixed layer hash" ), GetChars( layer.m_name ), GetChars( CurSource() ), CurLineNumber(), @@ -804,7 +806,7 @@ void PCB_PARSER::parseLayers() throw( IO_ERROR, PARSE_ERROR ) if( layer.m_visible ) visibleLayers.set( layer.m_number ); - DBG( printf( "aux m_visible:%s\n", layer.m_visible ? "true" : "false" );) + //DBG( printf( "aux m_visible:%s\n", layer.m_visible ? "true" : "false" );) m_board->SetLayer( LAYER_ID( layer.m_number ), layer ); } diff --git a/pcbnew/router/pns_index.h b/pcbnew/router/pns_index.h index 3f4d27794a..9e1ef37db0 100644 --- a/pcbnew/router/pns_index.h +++ b/pcbnew/router/pns_index.h @@ -137,7 +137,7 @@ public: ITEM_SET::iterator end() { return m_allItems.end(); } private: - static const int MaxSubIndices = 64; + static const int MaxSubIndices = 128; static const int SI_Multilayer = 2; static const int SI_SegDiagonal = 0; static const int SI_SegStraight = 1; From 8b6c569aefcd2c43643b22141d06edf95d227560 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Wed, 25 Jun 2014 09:24:02 -0500 Subject: [PATCH 521/741] copyright --- common/lset.cpp | 62 ++++++++++++++++++++-------------------- pcbnew/legacy_plugin.cpp | 6 ++-- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/common/lset.cpp b/common/lset.cpp index b7776c6902..1c49af19eb 100644 --- a/common/lset.cpp +++ b/common/lset.cpp @@ -1,18 +1,41 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2014 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 + */ +#include +#include + #include #include - LSET::LSET( const LAYER_ID* aArray, unsigned aCount ) { for( unsigned i=0; i -#include LSET::LSET( size_t aIdCount, ... ) { @@ -224,7 +247,7 @@ std::string LSET::FmtHex() const for( int nibble=0; nibble= 'a' && cc <= 'f' ) nibble = cc - 'a' + 10; + else if( cc >= 'A' && cc <= 'F' ) + nibble = cc - 'A' + 10; else break; @@ -300,7 +325,7 @@ LSEQ LSET::Seq( const LAYER_ID* aWishListSequence, unsigned aCount ) const { LSEQ ret; -#if defined(DEBUG) +#if defined(DEBUG) && 0 LSET dup_detector; for( unsigned i=0; i>= 1 ) + for( int i = 0; aMask; ++i, aMask >>= 1 ) { if( aMask & 1 ) ++count; @@ -334,7 +334,7 @@ LAYER_ID LEGACY_PLUGIN::leg_layer2new( int cu_count, LAYER_NUM aLayerNum ) // this is a speed critical function, be careful. - if( old <= LAYER_N_FRONT ) + if( unsigned( old ) <= unsigned( LAYER_N_FRONT ) ) { if( old == LAYER_N_FRONT ) newid = F_Cu; @@ -385,7 +385,7 @@ LSET LEGACY_PLUGIN::leg_mask2new( int cu_count, unsigned aMask ) aMask &= ~ALL_CU_LAYERS; } - for( int i=0; i>= 1 ) + for( int i=0; aMask; ++i, aMask >>= 1 ) { if( aMask & 1 ) ret.set( leg_layer2new( cu_count, i ) ); From 8627684122745abd3f63e66fa541741aa43b40ce Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Wed, 25 Jun 2014 12:01:50 -0500 Subject: [PATCH 522/741] use LSET::any() whereever possible and avoid conversion to integral type --- TODO.txt | 9 +++++++++ include/layers_id_colors_and_visibility.h | 1 + pcbnew/class_track.cpp | 10 +++++++--- pcbnew/class_track.h | 2 +- pcbnew/connect.cpp | 15 +++++++++------ pcbnew/dragsegm.cpp | 2 +- pcbnew/drc_clearance_test_functions.cpp | 2 +- pcbnew/legacy_plugin.cpp | 12 +++++++++++- 8 files changed, 40 insertions(+), 13 deletions(-) diff --git a/TODO.txt b/TODO.txt index ee0b19e8a1..e24a546a3f 100644 --- a/TODO.txt +++ b/TODO.txt @@ -60,6 +60,8 @@ PCBNew *) Paste (module ...) from clipboard into module editor. + + Dick's Final TODO List: ====================== *) Get licensing cleaned up. @@ -75,3 +77,10 @@ Dick's Final TODO List: * Clear all/some? retained strings on project change. * Clear the FP_LIB_TABLE when the last KIWAY_PLAYER using it is closed. + +Known Cu32 problems: + +*) layer combo box does not show the first layer numbered 0. +*) ratsnest is broken + + diff --git a/include/layers_id_colors_and_visibility.h b/include/layers_id_colors_and_visibility.h index 0886481da8..8e9d9dc600 100644 --- a/include/layers_id_colors_and_visibility.h +++ b/include/layers_id_colors_and_visibility.h @@ -344,6 +344,7 @@ public: LAYER_ID ExtractLayer(); private: + }; diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index d449c614fd..59693fdc02 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -398,6 +398,8 @@ LSET VIA::GetLayerSet() const LSET layermask; + wxASSERT( top_layer <= bottom_layer ); + // LAYER_IDs are numbered from front to back, this is top to bottom. for( LAYER_NUM id = top_layer; id <= bottom_layer; ++id ) { @@ -422,7 +424,7 @@ void VIA::SetLayerPair( LAYER_ID aTopLayer, LAYER_ID aBottomLayer ) aBottomLayer = B_Cu; } - if( aBottomLayer > aTopLayer ) + if( aBottomLayer < aTopLayer ) EXCHG( aBottomLayer, aTopLayer ); m_Layer = aTopLayer; @@ -432,15 +434,15 @@ void VIA::SetLayerPair( LAYER_ID aTopLayer, LAYER_ID aBottomLayer ) void VIA::LayerPair( LAYER_ID* top_layer, LAYER_ID* bottom_layer ) const { - LAYER_ID b_layer = B_Cu; LAYER_ID t_layer = F_Cu; + LAYER_ID b_layer = B_Cu; if( GetViaType() != VIA_THROUGH ) { b_layer = m_BottomLayer; t_layer = m_Layer; - if( b_layer > t_layer ) + if( b_layer < t_layer ) EXCHG( b_layer, t_layer ); } @@ -615,6 +617,7 @@ void TRACK::DrawShortNetname( EDA_DRAW_PANEL* panel, } } + void TRACK::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, const wxPoint& aOffset ) { @@ -679,6 +682,7 @@ void TRACK::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, DrawShortNetname( panel, aDC, aDrawMode, color ); } + void SEGZONE::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, const wxPoint& aOffset ) { diff --git a/pcbnew/class_track.h b/pcbnew/class_track.h index 32f61295cb..edb3d7a396 100644 --- a/pcbnew/class_track.h +++ b/pcbnew/class_track.h @@ -281,7 +281,7 @@ public: return wxT( "TRACK" ); } - /** + /** * Function GetClearance * returns the clearance in internal units. If \a aItem is not NULL then the * returned clearance is the greater of this object's clearance and diff --git a/pcbnew/connect.cpp b/pcbnew/connect.cpp index f03d19c6f1..481c7f9de3 100644 --- a/pcbnew/connect.cpp +++ b/pcbnew/connect.cpp @@ -75,7 +75,8 @@ void CONNECTIONS::SearchConnectionsPadsToIntersectingPads() for( unsigned ii = 0; ii < m_sortedPads.size(); ii++ ) { - D_PAD * pad = m_sortedPads[ii]; + D_PAD* pad = m_sortedPads[ii]; + pad->m_PadsConnected.clear(); candidates.clear(); @@ -84,12 +85,14 @@ void CONNECTIONS::SearchConnectionsPadsToIntersectingPads() // add pads to pad.m_PadsConnected, if they are connected for( unsigned jj = 0; jj < candidates.size(); jj++ ) { - CONNECTED_POINT * item = candidates[jj]; - D_PAD * candidate_pad = item->GetPad(); + CONNECTED_POINT* item = candidates[jj]; + + D_PAD* candidate_pad = item->GetPad(); + if( pad == candidate_pad ) continue; - if( (pad->GetLayerSet() & candidate_pad->GetLayerSet()) == 0 ) + if( !( pad->GetLayerSet() & candidate_pad->GetLayerSet() ).any() ) continue; if( pad->HitTest( item->GetPoint() ) ) { @@ -122,7 +125,7 @@ void CONNECTIONS::SearchTracksConnectedToPads( bool add_to_padlist, bool add_to_ { CONNECTED_POINT* cp_item = candidates[jj]; - if( (pad->GetLayerSet() & cp_item->GetTrack()->GetLayerSet()) == 0 ) + if( !( pad->GetLayerSet() & cp_item->GetTrack()->GetLayerSet() ).any() ) continue; if( pad->HitTest( cp_item->GetPoint() ) ) @@ -339,7 +342,7 @@ int CONNECTIONS::SearchConnectedTracks( const TRACK * aTrack ) { TRACK * ctrack = tracks_candidates[ii]->GetTrack(); - if( ( ctrack->GetLayerSet() & layerMask ) == 0 ) + if( !( ctrack->GetLayerSet() & layerMask ).any() ) continue; if( ctrack == aTrack ) diff --git a/pcbnew/dragsegm.cpp b/pcbnew/dragsegm.cpp index 8964f6c783..82764600aa 100644 --- a/pcbnew/dragsegm.cpp +++ b/pcbnew/dragsegm.cpp @@ -345,7 +345,7 @@ void Collect_TrackSegmentsToDrag( BOARD* aPcb, const wxPoint& aRefPos, LSET aLay if( track->GetNetCode() != aNetCode ) // not the same netcode: all candidates tested break; - if( ( aLayerMask & track->GetLayerSet() ) == 0 ) + if( !( aLayerMask & track->GetLayerSet() ).any() ) continue; // Cannot be connected, not on the same layer if( track->IsDragging() ) diff --git a/pcbnew/drc_clearance_test_functions.cpp b/pcbnew/drc_clearance_test_functions.cpp index 3578045d91..87acf726dd 100644 --- a/pcbnew/drc_clearance_test_functions.cpp +++ b/pcbnew/drc_clearance_test_functions.cpp @@ -354,7 +354,7 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads ) continue; // No problem if segment are on different layers : - if( ( layerMask & track->GetLayerSet() ) == 0 ) + if( !( layerMask & track->GetLayerSet() ).any() ) continue; // the minimum distance = clearance plus half the reference track diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index 5ee8755212..e92c20454c 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -2356,7 +2356,6 @@ void LEGACY_PLUGIN::loadTrackList( int aStructType ) newTrack->SetEnd( wxPoint( end_x, end_y ) ); newTrack->SetWidth( width ); - newTrack->SetLayer( leg_layer2new( m_cu_count, layer_num ) ); if( makeType == PCB_VIA_T ) // Ensure layers are OK when possible: { @@ -2370,6 +2369,17 @@ void LEGACY_PLUGIN::loadTrackList( int aStructType ) if( via->GetViaType() == VIA_THROUGH ) via->SetLayerPair( F_Cu, B_Cu ); + else + { + LAYER_ID back = leg_layer2new( m_cu_count, (layer_num >> 4) & 0xf ); + LAYER_ID front = leg_layer2new( m_cu_count, layer_num & 0xf ); + + via->SetLayerPair( front, back ); + } + } + else + { + newTrack->SetLayer( leg_layer2new( m_cu_count, layer_num ) ); } newTrack->SetNetCode( getNetCode( net_code ) ); From d4a7685761d81608a155456d3f564307b803a164 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 26 Jun 2014 21:20:05 +0200 Subject: [PATCH 523/741] Pspice netlist generator: add option to use net numbers as net names (feature removed a long time ago, but needed by Oscad team) Note these options are saved in project config. --- eeschema/dialogs/dialog_netlist.cpp | 83 +++++++---------------------- eeschema/eeschema_config.cpp | 5 ++ eeschema/netform.cpp | 24 ++++++--- eeschema/netlist.cpp | 44 +++++++++++++++ eeschema/netlist.h | 5 +- eeschema/schframe.cpp | 2 + include/wxEeschemaStruct.h | 13 +++-- 7 files changed, 102 insertions(+), 74 deletions(-) diff --git a/eeschema/dialogs/dialog_netlist.cpp b/eeschema/dialogs/dialog_netlist.cpp index 90a6babe90..83bc84dfbe 100644 --- a/eeschema/dialogs/dialog_netlist.cpp +++ b/eeschema/dialogs/dialog_netlist.cpp @@ -41,7 +41,6 @@ #include #include #include -#include #include #include @@ -79,6 +78,7 @@ public: NETLIST_TYPE_ID m_IdNetType; wxCheckBox* m_IsCurrentFormat; wxCheckBox* m_AddSubPrefix; + wxCheckBox* m_SpiceUseNetcodeAsNetname; wxTextCtrl* m_CommandStringCtrl; wxTextCtrl* m_TitleStringCtrl; wxButton* m_ButtonCancel; @@ -144,7 +144,6 @@ private: void OnCancelClick( wxCommandEvent& event ); void OnNetlistTypeSelection( wxNotebookEvent& event ); void SelectDefaultNetlistType( wxCommandEvent& event ); - void EnableSubcircuitPrefix( wxCommandEvent& event ); /** * Function OnAddPlugin @@ -232,11 +231,10 @@ enum id_netlist { ID_CREATE_NETLIST = ID_END_EESCHEMA_ID_LIST + 1, ID_CURRENT_FORMAT_IS_DEFAULT, ID_RUN_SIMULATOR, - ID_ADD_SUBCIRCUIT_PREFIX + ID_ADD_SUBCIRCUIT_PREFIX, + ID_USE_NETCODE_AS_NETNAME }; -//Imported function: -int TestDuplicateSheetNames( bool aCreateMarker ); // ID for configuration: #define CUSTOM_NETLIST_TITLE wxT( "CustomNetlistTitle" ) @@ -252,8 +250,6 @@ BEGIN_EVENT_TABLE( NETLIST_DIALOG, NETLIST_DIALOG_BASE ) EVT_BUTTON( ID_CREATE_NETLIST, NETLIST_DIALOG::GenNetlist ) EVT_CHECKBOX( ID_CURRENT_FORMAT_IS_DEFAULT, NETLIST_DIALOG::SelectDefaultNetlistType ) - EVT_CHECKBOX( ID_ADD_SUBCIRCUIT_PREFIX, - NETLIST_DIALOG::EnableSubcircuitPrefix ) EVT_BUTTON( ID_RUN_SIMULATOR, NETLIST_DIALOG::RunSimulator ) END_EVENT_TABLE() @@ -271,6 +267,7 @@ NETLIST_PAGE_DIALOG::NETLIST_PAGE_DIALOG( wxNotebook* parent, m_TitleStringCtrl = NULL; m_IsCurrentFormat = NULL; m_AddSubPrefix = NULL; + m_SpiceUseNetcodeAsNetname = NULL; m_ButtonCancel = NULL; m_NetOption = NULL; @@ -417,12 +414,16 @@ void NETLIST_DIALOG::InstallPageSpice() page = m_PanelNetType[PANELSPICE] = new NETLIST_PAGE_DIALOG( m_NoteBook, title, NET_TYPE_SPICE ); - page->m_AddSubPrefix = new wxCheckBox( page, ID_ADD_SUBCIRCUIT_PREFIX, _( "Prefix references 'U' and 'IC' with 'X'" ) ); - page->m_AddSubPrefix->SetValue( m_Parent->GetAddReferencePrefix() ); + page->m_AddSubPrefix->SetValue( m_Parent->GetSpiceAddReferencePrefix() ); page->m_LeftBoxSizer->Add( page->m_AddSubPrefix, 0, wxGROW | wxALL, 5 ); + page->m_SpiceUseNetcodeAsNetname = new wxCheckBox( page, ID_USE_NETCODE_AS_NETNAME, + _( "Use net number as net name" ) ); + page->m_SpiceUseNetcodeAsNetname->SetValue( m_Parent->GetSpiceUseNetcodeAsNetname() ); + page->m_LeftBoxSizer->Add( page->m_SpiceUseNetcodeAsNetname, 0, wxGROW | wxALL, 5 ); + page->m_LowBoxSizer->Add( new wxStaticText( page, -1, _( "Simulator command:" ) ), 0, wxGROW | wxLEFT | wxRIGHT | wxTOP, 5 ); @@ -544,24 +545,12 @@ void NETLIST_DIALOG::OnNetlistTypeSelection( wxNotebookEvent& event ) } -void NETLIST_DIALOG::EnableSubcircuitPrefix( wxCommandEvent& event ) -{ - - NETLIST_PAGE_DIALOG* currPage; - - currPage = (NETLIST_PAGE_DIALOG*) m_NoteBook->GetCurrentPage(); - - if( currPage == NULL || currPage->m_AddSubPrefix == NULL ) - return; - - m_Parent->SetAddReferencePrefix( currPage->m_AddSubPrefix->IsChecked() ); -} - - void NETLIST_DIALOG::NetlistUpdateOpt() { int ii; + m_Parent->SetSpiceAddReferencePrefix( m_PanelNetType[PANELSPICE]->m_AddSubPrefix->IsChecked() ); + m_Parent->SetSpiceUseNetcodeAsNetname( m_PanelNetType[PANELSPICE]->m_SpiceUseNetcodeAsNetname->IsChecked() ); m_Parent->SetSimulatorCommand( m_PanelNetType[PANELSPICE]->m_CommandStringCtrl->GetValue() ); m_Parent->SetNetListFormatName( wxEmptyString ); @@ -601,6 +590,9 @@ void NETLIST_DIALOG::GenNetlist( wxCommandEvent& event ) // Set spice netlist options: if( currPage->m_AddSubPrefix->GetValue() ) netlist_opt |= NET_USE_X_PREFIX; + + if( currPage->m_SpiceUseNetcodeAsNetname->GetValue() ) + netlist_opt |= NET_USE_NETCODES_AS_NETNAMES; break; case NET_TYPE_CADSTAR: @@ -695,46 +687,6 @@ bool NETLIST_DIALOG::FilenamePrms( NETLIST_TYPE_ID aNetTypeId, } -bool SCH_EDIT_FRAME::CreateNetlist( int aFormat, const wxString& aFullFileName, - unsigned aNetlistOptions ) -{ - SCH_SHEET_LIST sheets; - sheets.AnnotatePowerSymbols(); - - // Performs some controls: - if( CheckAnnotate( NULL, 0 ) ) - { - if( !IsOK( NULL, _( "Some items are not annotated\n\ -Do you want to annotate schematic?" ) ) ) - return false; - - // Schematic must be annotated: call Annotate dialog: - wxCommandEvent event; - OnAnnotate( event ); - - if( CheckAnnotate( NULL, 0 ) ) - return false; - } - - // Test duplicate sheet names: - if( TestDuplicateSheetNames( false ) > 0 ) - { - if( !IsOK( NULL, _( "Error: duplicate sheet names. Continue?" ) ) ) - return false; - } - - // Cleanup the entire hierarchy - SCH_SCREENS screens; - screens.SchematicCleanUp(); - - NETLIST_OBJECT_LIST * connectedItemsList = BuildNetListBase(); - bool success = WriteNetListFile( connectedItemsList, aFormat, - aFullFileName, aNetlistOptions ); - - return success; -} - - void NETLIST_DIALOG::OnCancelClick( wxCommandEvent& event ) { EndModal( wxID_CANCEL ); @@ -746,6 +698,8 @@ void NETLIST_DIALOG::RunSimulator( wxCommandEvent& event ) wxFileName fn; wxString ExecFile, CommandLine; + NetlistUpdateOpt(); + wxString tmp = m_PanelNetType[PANELSPICE]->m_CommandStringCtrl->GetValue(); tmp.Trim( false ); tmp.Trim( true ); @@ -767,6 +721,9 @@ void NETLIST_DIALOG::RunSimulator( wxCommandEvent& event ) if( currPage->m_AddSubPrefix && currPage->m_AddSubPrefix->GetValue() ) netlist_opt |= NET_USE_X_PREFIX; + if( currPage->m_SpiceUseNetcodeAsNetname && currPage->m_SpiceUseNetcodeAsNetname->GetValue() ) + netlist_opt |= NET_USE_NETCODES_AS_NETNAMES; + if( ! m_Parent->CreateNetlist( currPage->m_IdNetType, fn.GetFullPath(), netlist_opt ) ) return; diff --git a/eeschema/eeschema_config.cpp b/eeschema/eeschema_config.cpp index 7f1506328b..7f29dc041c 100644 --- a/eeschema/eeschema_config.cpp +++ b/eeschema/eeschema_config.cpp @@ -404,8 +404,13 @@ PARAM_CFG_ARRAY& SCH_EDIT_FRAME::GetProjectFileParametersList() m_projectFileParams.push_back( new PARAM_CFG_LIBNAME_LIST( wxT( "LibName" ), &m_componentLibFiles, GROUP_SCH_LIBS ) ); + m_projectFileParams.push_back( new PARAM_CFG_WXSTRING( wxT( "NetFmtName" ), &m_netListFormat) ); + m_projectFileParams.push_back( new PARAM_CFG_BOOL( wxT( "SpiceForceRefPrefix" ), + &m_spiceNetlistAddReferencePrefix, false ) ); + m_projectFileParams.push_back( new PARAM_CFG_BOOL( wxT( "SpiceUseNetNumbers" ), + &m_spiceNetlistUseNetcodeAsNetname, false ) ); m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "RptD_X" ), &g_RepeatStep.x, diff --git a/eeschema/netform.cpp b/eeschema/netform.cpp index 6201f4a538..13cc927694 100644 --- a/eeschema/netform.cpp +++ b/eeschema/netform.cpp @@ -119,9 +119,10 @@ class NETLIST_EXPORT_TOOL *
  • "netname" for global net (like gnd, vcc .. *
  • "/path/netname" for the usual nets * + * if aUseNetcodeAsNetName is true, the net name is just the net code (SPICE only) */ static void sprintPinNetName( wxString& aResult, const wxString& aNetNameFormat, - NETLIST_OBJECT* aPin ); + NETLIST_OBJECT* aPin, bool aUseNetcodeAsNetName = false ); /** * Function findNextComponentAndCreatePinList @@ -303,8 +304,10 @@ public: * @param f = the file to write to * @param aUsePrefix = true, adds an 'X' prefix to any reference designator starting with "U" or "IC", * false to leave reference designator unchanged. + * @param aUseNetcodeAsNetName = true to use numbers (net codes) as net names. + * false to use net names from schematic. */ - bool WriteNetListPspice( FILE* f, bool aUsePrefix ); + bool WriteNetListPspice( FILE* f, bool aUsePrefix, bool aUseNetcodeAsNetName ); /** * Function MakeCommandLine @@ -415,7 +418,8 @@ bool SCH_EDIT_FRAME::WriteNetListFile( NETLIST_OBJECT_LIST * aConnectedItemsList break; case NET_TYPE_SPICE: - ret = helper.WriteNetListPspice( f, aNetlistOptions & NET_USE_X_PREFIX ); + ret = helper.WriteNetListPspice( f, aNetlistOptions & NET_USE_X_PREFIX, + aNetlistOptions & NET_USE_NETCODES_AS_NETNAMES ); fclose( f ); break; @@ -468,7 +472,8 @@ static bool sortPinsByNumber( LIB_PIN* aPin1, LIB_PIN* aPin2 ) void NETLIST_EXPORT_TOOL::sprintPinNetName( wxString& aResult, - const wxString& aNetNameFormat, NETLIST_OBJECT* aPin ) + const wxString& aNetNameFormat, NETLIST_OBJECT* aPin, + bool aUseNetcodeAsNetName ) { int netcode = aPin->GetNet(); @@ -479,10 +484,17 @@ void NETLIST_EXPORT_TOOL::sprintPinNetName( wxString& aResult, if( netcode != 0 && aPin->GetConnectionType() == PAD_CONNECT ) { + if( aUseNetcodeAsNetName ) + { + aResult.Printf( wxT("%d"), netcode ); + } + else + { aResult = aPin->GetNetName(); if( aResult.IsEmpty() ) // No net name: give a name from net code aResult.Printf( aNetNameFormat.GetData(), netcode ); + } } } @@ -1073,7 +1085,7 @@ bool NETLIST_EXPORT_TOOL::WriteGENERICNetList( const wxString& aOutFileName ) } -bool NETLIST_EXPORT_TOOL::WriteNetListPspice( FILE* f, bool aUsePrefix ) +bool NETLIST_EXPORT_TOOL::WriteNetListPspice( FILE* f, bool aUsePrefix, bool aUseNetcodeAsNetName ) { int ret = 0; int nbitems; @@ -1285,7 +1297,7 @@ bool NETLIST_EXPORT_TOOL::WriteNetListPspice( FILE* f, bool aUsePrefix ) if( !pin ) continue; - sprintPinNetName( netName , wxT( "N-%.6d" ), pin ); + sprintPinNetName( netName , wxT( "N-%.6d" ), pin, aUseNetcodeAsNetName ); //Replace parenthesis with underscore to prevent parse issues with Simulators: netName.Replace(wxT("("),wxT("_")); diff --git a/eeschema/netlist.cpp b/eeschema/netlist.cpp index ef2cf12f2c..016ff5387f 100644 --- a/eeschema/netlist.cpp +++ b/eeschema/netlist.cpp @@ -29,6 +29,7 @@ #include #include +#include #include #include @@ -47,6 +48,49 @@ #define IS_WIRE false #define IS_BUS true +//Imported function: +int TestDuplicateSheetNames( bool aCreateMarker ); + +bool SCH_EDIT_FRAME::CreateNetlist( int aFormat, const wxString& aFullFileName, + unsigned aNetlistOptions ) +{ + SCH_SHEET_LIST sheets; + sheets.AnnotatePowerSymbols(); + + // Performs some controls: + if( CheckAnnotate( NULL, 0 ) ) + { + if( !IsOK( NULL, _( "Some items are not annotated\n" + "Do you want to annotate schematic?" ) ) ) + return false; + + // Schematic must be annotated: call Annotate dialog: + wxCommandEvent event; + OnAnnotate( event ); + + if( CheckAnnotate( NULL, 0 ) ) + return false; + } + + // Test duplicate sheet names: + if( TestDuplicateSheetNames( false ) > 0 ) + { + if( !IsOK( NULL, _( "Error: duplicate sheet names. Continue?" ) ) ) + return false; + } + + // Cleanup the entire hierarchy + SCH_SCREENS screens; + screens.SchematicCleanUp(); + + NETLIST_OBJECT_LIST * connectedItemsList = BuildNetListBase(); + bool success = WriteNetListFile( connectedItemsList, aFormat, + aFullFileName, aNetlistOptions ); + + return success; +} + + // Buffer to build the list of items used in netlist and erc calculations NETLIST_OBJECT_LIST s_NetObjectslist( true ); diff --git a/eeschema/netlist.h b/eeschema/netlist.h index bed55d2c80..d315739a36 100644 --- a/eeschema/netlist.h +++ b/eeschema/netlist.h @@ -58,8 +58,9 @@ enum NETLIST_TYPE_ID { /// Options for Spice netlist generation (OR'ed bits enum netlistOptions { - NET_USE_X_PREFIX = 2, // for Spice netlist : change "U" and "IC" reference prefix to "X" - NET_PCBNEW_USE_NEW_FORMAT = 1, // For Pcbnew use the new format (S expression and SWEET) + NET_PCBNEW_USE_NEW_FORMAT = 1, // For Pcbnew use the new format (S expression and SWEET) + NET_USE_X_PREFIX = 2, // for Spice netlist : change "U" and "IC" reference prefix to "X" + NET_USE_NETCODES_AS_NETNAMES = 4 // for Spice netlist : use netcode numbers as netnames }; diff --git a/eeschema/schframe.cpp b/eeschema/schframe.cpp index abc89e3cf8..b0e8c74011 100644 --- a/eeschema/schframe.cpp +++ b/eeschema/schframe.cpp @@ -199,6 +199,8 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ): m_hasAutoSave = true; SetForceHVLines( true ); + SetSpiceAddReferencePrefix( false ); + SetSpiceUseNetcodeAsNetname( false ); CreateScreens(); diff --git a/include/wxEeschemaStruct.h b/include/wxEeschemaStruct.h index 34d8dc8555..9545bfc9a7 100644 --- a/include/wxEeschemaStruct.h +++ b/include/wxEeschemaStruct.h @@ -156,7 +156,10 @@ private: wxString m_netListFormat; /// Add X prefix to component references when generating spice net lists. - bool m_addReferencPrefix; + bool m_spiceNetlistAddReferencePrefix; + + /// Use netcodes (net number) as net names when generating spice net lists. + bool m_spiceNetlistUseNetcodeAsNetname; wxString m_userLibraryPath; @@ -218,9 +221,13 @@ public: void SetNetListFormatName( const wxString& aFormat ) { m_netListFormat = aFormat; } - bool GetAddReferencePrefix() const { return m_addReferencPrefix; } + bool GetSpiceAddReferencePrefix() const { return m_spiceNetlistAddReferencePrefix; } - void SetAddReferencePrefix( bool aEnable ) { m_addReferencPrefix = aEnable; } + void SetSpiceAddReferencePrefix( bool aEnable ) { m_spiceNetlistAddReferencePrefix = aEnable; } + + bool GetSpiceUseNetcodeAsNetname() const { return m_spiceNetlistUseNetcodeAsNetname; } + + void SetSpiceUseNetcodeAsNetname( bool aEnable ) { m_spiceNetlistUseNetcodeAsNetname = aEnable; } wxString GetUserLibraryPath() const { return m_userLibraryPath; } From 013296cb1a89daf2dc4d53c6d09595eeef21a1db Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 27 Jun 2014 19:07:42 +0200 Subject: [PATCH 524/741] Make gerbview compilable and working (does not use now layers and layer masks from Pcbnew). Export to Pcbnew is broken, but it is a very rarely used feature. It will be fixed later. --- common/copy_to_clipboard.cpp | 3 +- gerbview/block.cpp | 1 + gerbview/class_DCodeSelectionbox.cpp | 1 + gerbview/class_GERBER.cpp | 1 + gerbview/class_excellon.h | 2 +- gerbview/class_gbr_layer_box_selector.cpp | 8 +- gerbview/class_gbr_layer_box_selector.h | 7 +- gerbview/class_gbr_layout.cpp | 12 +- gerbview/class_gbr_layout.h | 36 ++-- gerbview/class_gerber_draw_item.cpp | 3 +- gerbview/class_gerber_draw_item.h | 11 +- gerbview/class_gerbview_layer_widget.cpp | 29 ++-- gerbview/controle.cpp | 1 + gerbview/dcode.cpp | 1 + .../dialogs/dialog_print_using_printer.cpp | 158 ++++++++---------- .../dialogs/dialog_select_one_pcb_layer.cpp | 59 ++++--- gerbview/dialogs/dialog_show_page_borders.cpp | 1 + .../gerbview_dialog_display_options_frame.cpp | 1 + gerbview/draw_gerber_screen.cpp | 17 +- gerbview/events_called_functions.cpp | 5 +- gerbview/excellon_read_drill_file.cpp | 7 +- gerbview/export_to_pcbnew.cpp | 19 +-- gerbview/files.cpp | 5 +- gerbview/gerbview.cpp | 1 + gerbview/gerbview.h | 17 +- gerbview/gerbview_config.cpp | 3 +- gerbview/gerbview_frame.cpp | 43 ++--- gerbview/gerbview_frame.h | 21 ++- gerbview/hotkeys.cpp | 1 + gerbview/initpcb.cpp | 9 +- gerbview/locate.cpp | 3 +- gerbview/menubar.cpp | 1 + gerbview/onleftclick.cpp | 1 + gerbview/onrightclick.cpp | 1 + gerbview/pcbplot.cpp | 1 + gerbview/readgerb.cpp | 3 +- gerbview/rs274d.cpp | 12 +- gerbview/rs274x.cpp | 1 + gerbview/select_layers_to_pcb.cpp | 48 +++--- gerbview/select_layers_to_pcb.h | 11 +- gerbview/toolbars_gerber.cpp | 3 +- pcbnew/class_board.cpp | 1 + pcbnew/printout_controler.cpp | 8 +- 43 files changed, 284 insertions(+), 293 deletions(-) diff --git a/common/copy_to_clipboard.cpp b/common/copy_to_clipboard.cpp index 5e710d81a7..fef6bb90cc 100644 --- a/common/copy_to_clipboard.cpp +++ b/common/copy_to_clipboard.cpp @@ -109,7 +109,8 @@ bool DrawPageOnClipboard( EDA_DRAW_FRAME* aFrame ) dc.SetClippingRegion( DrawArea ); } - aFrame->PrintPage( &dc, FULL_LAYERS, false ); + const LSET allLayersMask = LSET().set(); + aFrame->PrintPage( &dc, allLayersMask, false ); screen->m_IsPrinting = false; aFrame->GetCanvas()->SetClipBox( tmp ); wxMetafile* mf = dc.Close(); diff --git a/gerbview/block.cpp b/gerbview/block.cpp index 912113538a..1218322b54 100644 --- a/gerbview/block.cpp +++ b/gerbview/block.cpp @@ -35,6 +35,7 @@ #include #include +#include #include #include diff --git a/gerbview/class_DCodeSelectionbox.cpp b/gerbview/class_DCodeSelectionbox.cpp index 84cf9cdc54..fc98ae6b55 100644 --- a/gerbview/class_DCodeSelectionbox.cpp +++ b/gerbview/class_DCodeSelectionbox.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include diff --git a/gerbview/class_GERBER.cpp b/gerbview/class_GERBER.cpp index 5ae04d5083..eeb10ff0e8 100644 --- a/gerbview/class_GERBER.cpp +++ b/gerbview/class_GERBER.cpp @@ -34,6 +34,7 @@ #include #include +#include #include diff --git a/gerbview/class_excellon.h b/gerbview/class_excellon.h index 07d2800b0d..555d2a310e 100644 --- a/gerbview/class_excellon.h +++ b/gerbview/class_excellon.h @@ -76,7 +76,7 @@ private: excellon_state m_State; // state of excellon file analysis bool m_SlotOn; // true during an oval driil definition -public: EXCELLON_IMAGE( GERBVIEW_FRAME* aParent, LAYER_NUM layer ) : +public: EXCELLON_IMAGE( GERBVIEW_FRAME* aParent, int layer ) : GERBER_IMAGE( aParent, layer ) { m_State = READ_HEADER_STATE; diff --git a/gerbview/class_gbr_layer_box_selector.cpp b/gerbview/class_gbr_layer_box_selector.cpp index cd598482b2..11d2b9fa5f 100644 --- a/gerbview/class_gbr_layer_box_selector.cpp +++ b/gerbview/class_gbr_layer_box_selector.cpp @@ -40,7 +40,7 @@ void GBR_LAYER_BOX_SELECTOR::Resync() { Clear(); - for( LAYER_NUM layerid = FIRST_LAYER; layerid < NB_LAYERS; ++layerid ) + for( int layerid = 0; layerid < GERBER_DRAWLAYERS_COUNT; ++layerid ) { wxBitmap layerbmp( 14, 14 ); wxString layername; @@ -49,7 +49,7 @@ void GBR_LAYER_BOX_SELECTOR::Resync() continue; // Prepare Bitmap - SetBitmapLayer( layerbmp, layerid ); + SetBitmapLayer( layerbmp, (LAYER_ID)layerid ); layername = GetLayerName( layerid ); @@ -59,7 +59,7 @@ void GBR_LAYER_BOX_SELECTOR::Resync() // Returns a color index from the layer id -EDA_COLOR_T GBR_LAYER_BOX_SELECTOR::GetLayerColor( LAYER_NUM aLayer ) const +EDA_COLOR_T GBR_LAYER_BOX_SELECTOR::GetLayerColor( int aLayer ) const { GERBVIEW_FRAME* frame = (GERBVIEW_FRAME*) GetParent()->GetParent(); @@ -68,7 +68,7 @@ EDA_COLOR_T GBR_LAYER_BOX_SELECTOR::GetLayerColor( LAYER_NUM aLayer ) const // Returns the name of the layer id -wxString GBR_LAYER_BOX_SELECTOR::GetLayerName( LAYER_NUM aLayer ) const +wxString GBR_LAYER_BOX_SELECTOR::GetLayerName( int aLayer ) const { wxString name; name.Printf( _( "Layer %d" ), aLayer + 1 ); diff --git a/gerbview/class_gbr_layer_box_selector.h b/gerbview/class_gbr_layer_box_selector.h index ff7878ae09..f404566ebc 100644 --- a/gerbview/class_gbr_layer_box_selector.h +++ b/gerbview/class_gbr_layer_box_selector.h @@ -22,15 +22,14 @@ public: // Returns a color index from the layer id // Virtual function - EDA_COLOR_T GetLayerColor( LAYER_NUM aLayer ) const; + EDA_COLOR_T GetLayerColor( int aLayer ) const; // Returns true if the layer id is enabled (i.e. is it should be displayed) // Virtual function - bool IsLayerEnabled( LAYER_NUM aLayer ) const { return true; }; + bool IsLayerEnabled( int aLayer ) const { return true; }; // Returns the name of the layer id - // Virtual function - wxString GetLayerName( LAYER_NUM aLayer ) const; + wxString GetLayerName( int aLayer ) const; }; #endif //CLASS_GBR_LAYER_BOX_SELECTOR_H diff --git a/gerbview/class_gbr_layout.cpp b/gerbview/class_gbr_layout.cpp index ad475e07f6..2d96bf8f40 100644 --- a/gerbview/class_gbr_layout.cpp +++ b/gerbview/class_gbr_layout.cpp @@ -14,7 +14,7 @@ GBR_LAYOUT::GBR_LAYOUT() { PAGE_INFO pageInfo( wxT( "GERBER" ) ); SetPageSettings( pageInfo ); - m_printLayersMask = FULL_LAYERS; + m_printLayersMask = -1; } @@ -22,16 +22,6 @@ GBR_LAYOUT::~GBR_LAYOUT() { } -/* Function IsLayerVisible - * tests whether a given layer is visible - * param aLayer = The layer to be tested - * return bool - true if the layer is visible. - */ -bool GBR_LAYOUT::IsLayerVisible( LAYER_NUM aLayer ) const -{ - return m_printLayersMask & GetLayerMask( aLayer ); -} - EDA_RECT GBR_LAYOUT::ComputeBoundingBox() { diff --git a/gerbview/class_gbr_layout.h b/gerbview/class_gbr_layout.h index 62397de9c7..2bce7de431 100644 --- a/gerbview/class_gbr_layout.h +++ b/gerbview/class_gbr_layout.h @@ -11,6 +11,7 @@ #include #include // PAGE_INFO +#include // GERBER_DRAWLAYERS_COUNT #include #include @@ -23,11 +24,11 @@ class GBR_LAYOUT { private: - EDA_RECT m_BoundingBox; - PAGE_INFO m_paper; - TITLE_BLOCK m_titles; - wxPoint m_originAxisPosition; - LSET m_printLayersMask; // When printing: the list of layers to print + EDA_RECT m_BoundingBox; + PAGE_INFO m_paper; + TITLE_BLOCK m_titles; + wxPoint m_originAxisPosition; + std::bitset m_printLayersMask; // When printing: the list of layers to print public: DLIST m_Drawings; // linked list of Gerber Items @@ -87,24 +88,35 @@ public: void Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDrawMode, const wxPoint& aOffset, bool aPrintBlackAndWhite = false ); - /** - * Function SetVisibleLayers - * changes the bit-mask of visible layers - * @param aLayerMask = The new bit-mask of visible layers + * Function SetPrintableLayers + * changes the list of printable layers + * @param aLayerMask = The new bit-mask of printable layers */ - void SetVisibleLayers( LSET aLayerMask ) + void SetPrintableLayers( const std::bitset & aLayerMask ) { m_printLayersMask = aLayerMask; } /** - * Function IsLayerVisible + * Function GetPrintableLayers + * @return the bit-mask of printable layers + */ + std::bitset GetPrintableLayers() + { + return m_printLayersMask; + } + + /** + * Function IsLayerPrintable * tests whether a given layer is visible * @param aLayer = The layer to be tested * @return bool - true if the layer is visible. */ - bool IsLayerVisible( LAYER_NUM aLayer ) const; + bool IsLayerPrintable( int aLayer ) const + { + return m_printLayersMask[ aLayer ]; + } #if defined(DEBUG) void Show( int nestLevel, std::ostream& os ) const; // overload diff --git a/gerbview/class_gerber_draw_item.cpp b/gerbview/class_gerber_draw_item.cpp index f01f3d5d55..e7e2341f8c 100644 --- a/gerbview/class_gerber_draw_item.cpp +++ b/gerbview/class_gerber_draw_item.cpp @@ -36,6 +36,7 @@ #include #include +#include #include #include @@ -44,7 +45,7 @@ GERBER_DRAW_ITEM::GERBER_DRAW_ITEM( GBR_LAYOUT* aParent, GERBER_IMAGE* aGerberpa EDA_ITEM( (EDA_ITEM*)aParent, TYPE_GERBER_DRAW_ITEM ) { m_imageParams = aGerberparams; - m_Layer = FIRST_LAYER; + m_Layer = 0; m_Shape = GBR_SEGMENT; m_Flashed = false; m_DCode = 0; diff --git a/gerbview/class_gerber_draw_item.h b/gerbview/class_gerber_draw_item.h index 13d15e62e6..49e3340c6c 100644 --- a/gerbview/class_gerber_draw_item.h +++ b/gerbview/class_gerber_draw_item.h @@ -90,7 +90,7 @@ public: * redundancy for these parameters */ private: - LAYER_NUM m_Layer; + int m_Layer; // These values are used to draw this item, according to gerber layers parameters // Because they can change inside a gerber image, they are stored here @@ -123,7 +123,7 @@ public: * Function GetLayer * returns the layer this item is on. */ - LAYER_NUM GetLayer() const { return m_Layer; } + int GetLayer() const { return m_Layer; } /** * Function SetLayer @@ -132,12 +132,7 @@ public: * is virtual because some items (in fact: class DIMENSION) * have a slightly different initialization */ - void SetLayer( LAYER_NUM aLayer ) { m_Layer = aLayer; } - - LSET GetLayerMask() - { - return ::GetLayerMask( m_Layer ); - } + void SetLayer( int aLayer ) { m_Layer = aLayer; } bool GetLayerPolarity() { diff --git a/gerbview/class_gerbview_layer_widget.cpp b/gerbview/class_gerbview_layer_widget.cpp index 533232fd41..6101db824d 100644 --- a/gerbview/class_gerbview_layer_widget.cpp +++ b/gerbview/class_gerbview_layer_widget.cpp @@ -37,6 +37,7 @@ #include #include +#include #include #include #include @@ -166,10 +167,10 @@ void GERBER_LAYER_WIDGET::onRightDownLayers( wxMouseEvent& event ) void GERBER_LAYER_WIDGET::onPopupSelection( wxCommandEvent& event ) { - int rowCount; - int menuId = event.GetId(); - bool visible = (menuId == ID_SHOW_ALL_LAYERS) ? true : false;; - LSET visibleLayers = NO_LAYERS; + int rowCount; + int menuId = event.GetId(); + bool visible = (menuId == ID_SHOW_ALL_LAYERS) ? true : false;; + long visibleLayers = 0; bool force_active_layer_visible; m_alwaysShowActiveLayer = ( menuId == ID_ALWAYS_SHOW_NO_LAYERS_BUT_ACTIVE ); @@ -186,7 +187,7 @@ void GERBER_LAYER_WIDGET::onPopupSelection( wxCommandEvent& event ) for( int row=0; row < rowCount; ++row ) { wxCheckBox* cb = (wxCheckBox*) getLayerComp( row, 3 ); - LAYER_NUM layer = getDecodedId( cb->GetId() ); + int layer = getDecodedId( cb->GetId() ); bool loc_visible = visible; if( force_active_layer_visible && (layer == myframe->getActiveLayer() ) ) @@ -195,9 +196,9 @@ void GERBER_LAYER_WIDGET::onPopupSelection( wxCommandEvent& event ) cb->SetValue( loc_visible ); if( loc_visible ) - visibleLayers |= GetLayerSet( row ); + visibleLayers |= 1 << row; else - visibleLayers &= ~GetLayerSet( row ); + visibleLayers &= ~( 1 << row ); } myframe->SetVisibleLayers( visibleLayers ); @@ -224,7 +225,7 @@ void GERBER_LAYER_WIDGET::ReFill() { ClearLayerRows(); - for( LAYER_NUM layer = FIRST_LAYER; layer < NB_GERBER_LAYERS; ++layer ) + for( int layer = 0; layer < GERBER_DRAWLAYERS_COUNT; ++layer ) { wxString msg; msg.Printf( _("Layer %d"), layer+1 ); @@ -244,11 +245,11 @@ void GERBER_LAYER_WIDGET::OnLayerColorChange( int aLayer, EDA_COLOR_T aColor ) myframe->GetCanvas()->Refresh(); } -bool GERBER_LAYER_WIDGET::OnLayerSelect( LAYER_NUM aLayer ) +bool GERBER_LAYER_WIDGET::OnLayerSelect( int aLayer ) { // the layer change from the GERBER_LAYER_WIDGET can be denied by returning // false from this function. - LAYER_NUM layer = myframe->getActiveLayer( ); + int layer = myframe->getActiveLayer( ); myframe->setActiveLayer( aLayer, false ); myframe->syncLayerBox(); @@ -261,14 +262,14 @@ bool GERBER_LAYER_WIDGET::OnLayerSelect( LAYER_NUM aLayer ) return true; } -void GERBER_LAYER_WIDGET::OnLayerVisible( LAYER_NUM aLayer, bool isVisible, bool isFinal ) +void GERBER_LAYER_WIDGET::OnLayerVisible( int aLayer, bool isVisible, bool isFinal ) { - LSET visibleLayers = myframe->GetVisibleLayers(); + long visibleLayers = myframe->GetVisibleLayers(); if( isVisible ) - visibleLayers |= GetLayerSet( aLayer ); + visibleLayers |= 1 << aLayer; else - visibleLayers &= ~GetLayerSet( aLayer ); + visibleLayers &= ~( 1 << aLayer ); myframe->SetVisibleLayers( visibleLayers ); diff --git a/gerbview/controle.cpp b/gerbview/controle.cpp index fedb66b381..86999c5df0 100644 --- a/gerbview/controle.cpp +++ b/gerbview/controle.cpp @@ -30,6 +30,7 @@ #include #include #include +#include void GERBVIEW_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aHotKey ) diff --git a/gerbview/dcode.cpp b/gerbview/dcode.cpp index 5e1dc793c3..8063b81b0c 100644 --- a/gerbview/dcode.cpp +++ b/gerbview/dcode.cpp @@ -38,6 +38,7 @@ #include #include +#include #include #include diff --git a/gerbview/dialogs/dialog_print_using_printer.cpp b/gerbview/dialogs/dialog_print_using_printer.cpp index 1bd58a195e..95e938282a 100644 --- a/gerbview/dialogs/dialog_print_using_printer.cpp +++ b/gerbview/dialogs/dialog_print_using_printer.cpp @@ -6,7 +6,7 @@ #define wxTEST_POSTSCRIPT_IN_MSW 1 #include -//#include + #include #include #include @@ -16,9 +16,9 @@ #include #include +#include #include -static long s_SelectedLayers; static double s_ScaleList[] = { 0, 0.5, 0.7, 0.999, 1.0, 1.4, 2.0, 3.0, 4.0 }; @@ -27,8 +27,8 @@ static double s_ScaleList[] = #define MAX_SCALE 100.0 // static print data and page setup data, to remember settings during the session -static wxPrintData* g_PrintData; -static wxPageSetupDialogData* g_pageSetupData = (wxPageSetupDialogData*) NULL; +static wxPrintData* s_printData; +static wxPageSetupDialogData* s_pageSetupData = (wxPageSetupDialogData*) NULL; // Variables locales static PRINT_PARAMETERS s_Parameters; @@ -41,8 +41,8 @@ class DIALOG_PRINT_USING_PRINTER : public DIALOG_PRINT_USING_PRINTER_BASE { private: GERBVIEW_FRAME* m_Parent; - wxConfigBase* m_Config; - wxCheckBox* m_BoxSelectLayer[32]; + wxConfigBase* m_Config; + wxCheckBox* m_BoxSelectLayer[32]; public: DIALOG_PRINT_USING_PRINTER( GERBVIEW_FRAME* parent ); @@ -63,7 +63,10 @@ private: public: bool IsMirrored() { return m_Print_Mirror->IsChecked(); } bool PrintUsingSinglePage() { return true; } - int SetLayerSetFromListSelection(); + int SetLayerSetFromListSelection(); + // Prepare print parameters. return true if OK, + // false if there is an issue (mainly no printable layers) + bool PreparePrintPrms(); }; @@ -75,17 +78,17 @@ void GERBVIEW_FRAME::ToPrinter( wxCommandEvent& event ) * Display the print dialog */ { - if( g_PrintData == NULL ) // First print - g_PrintData = new wxPrintData(); + if( s_printData == NULL ) // First print + s_printData = new wxPrintData(); - if( !g_PrintData->Ok() ) + if( !s_printData->Ok() ) { DisplayError( this, _( "Error Init Printer info" ) ); return; } - g_PrintData->SetQuality( wxPRINT_QUALITY_HIGH ); - g_PrintData->SetOrientation( GetPageSettings().IsPortrait() ? + s_printData->SetQuality( wxPRINT_QUALITY_HIGH ); + s_printData->SetOrientation( GetPageSettings().IsPortrait() ? wxPORTRAIT : wxLANDSCAPE ); DIALOG_PRINT_USING_PRINTER* frame = new DIALOG_PRINT_USING_PRINTER( this ); @@ -118,31 +121,29 @@ void DIALOG_PRINT_USING_PRINTER::InitValues( ) /************************************************************************/ { SetFocus(); - LAYER_NUM layer_max = NB_GERBER_LAYERS; wxString msg; - if( g_pageSetupData == NULL ) + if( s_pageSetupData == NULL ) { - g_pageSetupData = new wxPageSetupDialogData; + s_pageSetupData = new wxPageSetupDialogData; // Set initial page margins. - // Margins are already set in Pcbnew, so we can use 0 - g_pageSetupData->SetMarginTopLeft(wxPoint(0, 0)); - g_pageSetupData->SetMarginBottomRight(wxPoint(0, 0)); + // Margins are already set in Gerbview, so we can use 0 + s_pageSetupData->SetMarginTopLeft(wxPoint(0, 0)); + s_pageSetupData->SetMarginBottomRight(wxPoint(0, 0)); } - s_Parameters.m_PageSetupData = g_pageSetupData; + s_Parameters.m_PageSetupData = s_pageSetupData; - layer_max = NB_LAYERS; // Create layer list - for( LAYER_NUM ii = FIRST_LAYER; ii < layer_max; ++ii ) + for( int ii = 0; ii < GERBER_DRAWLAYERS_COUNT; ++ii ) { - LSET mask = GetLayerSet( ii ); msg = _( "Layer" ); msg << wxT( " " ) << ii + 1; m_BoxSelectLayer[ii] = new wxCheckBox( this, -1, msg ); - if( mask & s_SelectedLayers ) - m_BoxSelectLayer[ii]->SetValue( true ); + if( g_GERBER_List[ii] == NULL ) // Nothing loaded on this draw layer + m_BoxSelectLayer[ii]->Enable( false ); + if( ii < 16 ) m_leftLayersBoxSizer->Add( m_BoxSelectLayer[ii], wxGROW | wxLEFT | wxRIGHT | wxTOP ); @@ -170,21 +171,14 @@ void DIALOG_PRINT_USING_PRINTER::InitValues( ) s_Parameters.m_YScaleAdjust > MAX_SCALE ) s_Parameters.m_XScaleAdjust = s_Parameters.m_YScaleAdjust = 1.0; - s_SelectedLayers = 0; - for( LAYER_NUM layer = FIRST_LAYER; layer < layer_max; ++layer ) + for( int layer = 0; layer < GERBER_DRAWLAYERS_COUNT; ++layer ) { wxString layerKey; bool option; layerKey.Printf( OPTKEY_LAYERBASE, layer ); - - option = false; - if( m_Config->Read( layerKey, &option ) ) - { - m_BoxSelectLayer[layer]->SetValue( option ); - if( option ) - s_SelectedLayers |= GetLayerSet( layer ); - } + m_Config->Read( layerKey, &option, false ); + m_BoxSelectLayer[layer]->SetValue( option ); } } @@ -214,30 +208,29 @@ void DIALOG_PRINT_USING_PRINTER::InitValues( ) m_FineAdjustYscaleOpt->Enable(enable); } -/**************************************************************/ int DIALOG_PRINT_USING_PRINTER::SetLayerSetFromListSelection() -/**************************************************************/ { int page_count = 0; - s_Parameters.m_PrintMaskLayer = NO_LAYERS; - for( LAYER_NUM ii = FIRST_LAYER; ii < NB_GERBER_LAYERS; ++ii ) + std::bitset layerMask; + for( int ii = 0; ii < GERBER_DRAWLAYERS_COUNT; ++ii ) { - if( m_BoxSelectLayer[ii]->IsChecked() ) + if( m_BoxSelectLayer[ii]->IsChecked() && m_BoxSelectLayer[ii]->IsEnabled() ) { page_count++; - s_Parameters.m_PrintMaskLayer |= GetLayerSet( ii ); + layerMask[ii] = true; } + else + layerMask[ii] = false; } + m_Parent->GetGerberLayout()->SetPrintableLayers( layerMask ); s_Parameters.m_PageCount = page_count; return page_count; } -/********************************************************************/ void DIALOG_PRINT_USING_PRINTER::OnCloseWindow( wxCloseEvent& event ) -/********************************************************************/ { SetPrintParameters(); @@ -249,19 +242,18 @@ void DIALOG_PRINT_USING_PRINTER::OnCloseWindow( wxCloseEvent& event ) m_Config->Write( OPTKEY_PRINT_PAGE_FRAME, s_Parameters.m_Print_Sheet_Ref); m_Config->Write( OPTKEY_PRINT_MONOCHROME_MODE, s_Parameters.m_Print_Black_and_White); wxString layerKey; - for( LAYER_NUM layer = FIRST_LAYER; layer < NB_GERBER_LAYERS; ++layer ) + for( int layer = 0; layer < GERBER_DRAWLAYERS_COUNT; ++layer ) { layerKey.Printf( OPTKEY_LAYERBASE, layer ); m_Config->Write( layerKey, m_BoxSelectLayer[layer]->IsChecked() ); } } + EndModal( 0 ); } -/******************************************************************/ void DIALOG_PRINT_USING_PRINTER::SetPrintParameters( ) -/******************************************************************/ { s_Parameters.m_PrintMirror = m_Print_Mirror->GetValue(); s_Parameters.m_Print_Black_and_White = @@ -303,38 +295,45 @@ void DIALOG_PRINT_USING_PRINTER::OnScaleSelectionClick( wxCommandEvent& event ) m_FineAdjustYscaleOpt->Enable(enable); } -/**********************************************************/ +// Open a dialog box for printer setup (printer options, page size ...) void DIALOG_PRINT_USING_PRINTER::OnPageSetup( wxCommandEvent& event ) -/**********************************************************/ - -/* Open a dialog box for printer setup (printer options, page size ...) - */ { - *g_pageSetupData = *g_PrintData; + *s_pageSetupData = *s_printData; - wxPageSetupDialog pageSetupDialog(this, g_pageSetupData); + wxPageSetupDialog pageSetupDialog(this, s_pageSetupData); pageSetupDialog.ShowModal(); - (*g_PrintData) = pageSetupDialog.GetPageSetupDialogData().GetPrintData(); - (*g_pageSetupData) = pageSetupDialog.GetPageSetupDialogData(); + (*s_printData) = pageSetupDialog.GetPageSetupDialogData().GetPrintData(); + (*s_pageSetupData) = pageSetupDialog.GetPageSetupDialogData(); } - -/************************************************************/ -void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event ) -/************************************************************/ - -/* Open and display a previewer frame for printing - */ +bool DIALOG_PRINT_USING_PRINTER::PreparePrintPrms() { SetPrintParameters( ); + // If no layer selected, we have no plot. prompt user if it happens + // because he could think there is a bug in Pcbnew: + if( m_Parent->GetGerberLayout()->GetPrintableLayers().none() ) + { + DisplayError( this, _( "No layer selected" ) ); + return false; + } + + return true; +} + +// Open and display a previewer frame for printing +void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event ) +{ + if( !PreparePrintPrms() ) + return; + // Pass two printout objects: for preview, and possible printing. wxString title = _( "Print Preview" ); wxPrintPreview* preview = new wxPrintPreview( new BOARD_PRINTOUT_CONTROLLER( s_Parameters, m_Parent, title ), new BOARD_PRINTOUT_CONTROLLER( s_Parameters, m_Parent, title ), - g_PrintData ); + s_printData ); if( preview == NULL ) { @@ -342,16 +341,6 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event ) return; } - SetLayerSetFromListSelection(); - - // If no layer selected, we have no plot. prompt user if it happens - // because he could think there is a bug in Pcbnew: - if( s_Parameters.m_PrintMaskLayer == 0 ) - { - DisplayError( this, _( "No layer selected" ) ); - return; - } - // Uses the parent position and size. // @todo uses last position and size ans store them when exit in m_Config @@ -365,29 +354,16 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event ) } -/***************************************************************************/ void DIALOG_PRINT_USING_PRINTER::OnPrintButtonClick( wxCommandEvent& event ) -/***************************************************************************/ - -/* Called on activate Print button - */ { - SetPrintParameters( ); - - // If no layer selected, we have no plot. prompt user if it happens - // because he could think there is a bug in Pcbnew: - if( s_Parameters.m_PrintMaskLayer == 0 ) - { - DisplayError( this, _( "No layer selected" ) ); + if( !PreparePrintPrms() ) return; - } - wxPrintDialogData printDialogData( *g_PrintData ); + wxPrintDialogData printDialogData( *s_printData ); - wxPrinter printer( &printDialogData ); - - wxString title = _( "Print" ); - BOARD_PRINTOUT_CONTROLLER printout( s_Parameters, m_Parent, title ); + wxPrinter printer( &printDialogData ); + wxString title = _( "Print" ); + BOARD_PRINTOUT_CONTROLLER printout( s_Parameters, m_Parent, title ); #if !defined(__WINDOWS__) && !wxCHECK_VERSION(2,9,0) wxDC* dc = printout.GetDC(); @@ -402,7 +378,7 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintButtonClick( wxCommandEvent& event ) } else { - *g_PrintData = printer.GetPrintDialogData().GetPrintData(); + *s_printData = printer.GetPrintDialogData().GetPrintData(); } } diff --git a/gerbview/dialogs/dialog_select_one_pcb_layer.cpp b/gerbview/dialogs/dialog_select_one_pcb_layer.cpp index cfadefe3ea..00dcc9b657 100644 --- a/gerbview/dialogs/dialog_select_one_pcb_layer.cpp +++ b/gerbview/dialogs/dialog_select_one_pcb_layer.cpp @@ -8,7 +8,7 @@ #include // Exported function -const wxString GetPCBDefaultLayerName( LAYER_NUM aLayerNumber ); +const wxString GetPCBDefaultLayerName( int aLayerNumber ); enum layer_sel_id { @@ -23,11 +23,11 @@ class SELECT_LAYER_DIALOG : public wxDialog private: GERBVIEW_FRAME* m_Parent; wxRadioBox* m_LayerList; - LAYER_NUM m_LayerId[int(NB_LAYERS) + 1]; // One extra element for "(Deselect)" radiobutton + int m_LayerId[int(GERBER_DRAWLAYERS_COUNT) + 1]; // One extra element for "(Deselect)" radiobutton public: // Constructor and destructor - SELECT_LAYER_DIALOG( GERBVIEW_FRAME* parent, LAYER_NUM aDefaultLayer, + SELECT_LAYER_DIALOG( GERBVIEW_FRAME* parent, int aDefaultLayer, int aCopperLayerCount, bool aShowDeselectOption ); ~SELECT_LAYER_DIALOG() { }; @@ -47,10 +47,10 @@ END_EVENT_TABLE() /** Install the dialog box for layer selection - * @param aDefaultLayer = Preselection (NB_LAYERS for "(Deselect)" layer) + * @param aDefaultLayer = Preselection (GERBER_DRAWLAYERS_COUNT for "(Deselect)" layer) * @param aCopperLayerCount = number of copper layers * @param aShowDeselectOption = display a "(Deselect)" radiobutton (when set to true) - * @return new layer value (NB_LAYERS when "(Deselect)" radiobutton selected), + * @return new layer value (GERBER_DRAWLAYERS_COUNT when "(Deselect)" radiobutton selected), * or -1 if canceled * * Providing the option to also display a "(Deselect)" radiobutton makes the @@ -61,10 +61,10 @@ END_EVENT_TABLE() * different radiobutton is clicked on) prior to then clicking on the "Deselect" * button provided within the "Layer selection:" dialog box). */ -LAYER_NUM GERBVIEW_FRAME::SelectPCBLayer( LAYER_NUM aDefaultLayer, int aCopperLayerCount, +int GERBVIEW_FRAME::SelectPCBLayer( int aDefaultLayer, int aCopperLayerCount, bool aShowDeselectOption ) { - LAYER_NUM layer; + int layer; SELECT_LAYER_DIALOG* frame = new SELECT_LAYER_DIALOG( this, aDefaultLayer, aCopperLayerCount, aShowDeselectOption ); @@ -82,14 +82,17 @@ LAYER_NUM GERBVIEW_FRAME::SelectPCBLayer( LAYER_NUM aDefaultLayer, int aCopperLa * to the right of that radiobox. */ SELECT_LAYER_DIALOG::SELECT_LAYER_DIALOG( GERBVIEW_FRAME* parent, - LAYER_NUM aDefaultLayer, int aCopperLayerCount, + int aDefaultLayer, int aCopperLayerCount, bool aShowDeselectOption ) : wxDialog( parent, -1, _( "Select Layer:" ), wxPoint( -1, -1 ), wxSize( 470, 250 ), wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER ) { + #define NB_PCB_LAYERS 64 + #define FIRST_COPPER_LAYER 0 + #define LAST_COPPER_LAYER 31 wxButton* Button; - LAYER_NUM ii; + int ii; wxString LayerList[NB_PCB_LAYERS + 1]; // One extra element for "(Deselect)" // radiobutton int LayerCount, LayerSelect = -1; @@ -98,9 +101,10 @@ SELECT_LAYER_DIALOG::SELECT_LAYER_DIALOG( GERBVIEW_FRAME* parent, // Build the layer list; first build copper layers list LayerCount = 0; - for( ii = FIRST_COPPER_LAYER; ii < NB_COPPER_LAYERS; ++ii ) + + for( ii = FIRST_COPPER_LAYER; ii <= LAST_COPPER_LAYER; ++ii ) { - m_LayerId[ii] = FIRST_LAYER; + m_LayerId[ii] = 0; if( ii == FIRST_COPPER_LAYER || ii == LAST_COPPER_LAYER || ii < aCopperLayerCount-1 ) { @@ -113,10 +117,11 @@ SELECT_LAYER_DIALOG::SELECT_LAYER_DIALOG( GERBVIEW_FRAME* parent, LayerCount++; } } + // Build the layer list; build non copper layers list for( ; ii < NB_PCB_LAYERS; ++ii ) { - m_LayerId[ii] = FIRST_LAYER; + m_LayerId[ii] = 0; LayerList[LayerCount] = GetPCBDefaultLayerName( ii ); @@ -182,7 +187,7 @@ void SELECT_LAYER_DIALOG::OnCancelClick( wxCommandEvent& event ) EndModal( -1 ); } -const wxString GetPCBDefaultLayerName( LAYER_NUM aLayerNumber ) +const wxString GetPCBDefaultLayerName( int aLayerNumber ) { const wxChar* txt; @@ -190,20 +195,20 @@ const wxString GetPCBDefaultLayerName( LAYER_NUM aLayerNumber ) switch( aLayerNumber ) { case F_Cu: txt = wxT( "F.Cu" ); break; - case LAYER_N_2: txt = wxT( "Inner1.Cu" ); break; - case LAYER_N_3: txt = wxT( "Inner2.Cu" ); break; - case LAYER_N_4: txt = wxT( "Inner3.Cu" ); break; - case LAYER_N_5: txt = wxT( "Inner4.Cu" ); break; - case LAYER_N_6: txt = wxT( "Inner5.Cu" ); break; - case LAYER_N_7: txt = wxT( "Inner6.Cu" ); break; - case LAYER_N_8: txt = wxT( "Inner7.Cu" ); break; - case LAYER_N_9: txt = wxT( "Inner8.Cu" ); break; - case LAYER_N_10: txt = wxT( "Inner9.Cu" ); break; - case LAYER_N_11: txt = wxT( "Inner10.Cu" ); break; - case LAYER_N_12: txt = wxT( "Inner11.Cu" ); break; - case LAYER_N_13: txt = wxT( "Inner12.Cu" ); break; - case LAYER_N_14: txt = wxT( "Inner13.Cu" ); break; - case LAYER_N_15: txt = wxT( "Inner14.Cu" ); break; + case In1_Cu: txt = wxT( "In1.Cu" ); break; + case In2_Cu: txt = wxT( "In2.Cu" ); break; + case In3_Cu: txt = wxT( "In3.Cu" ); break; + case In4_Cu: txt = wxT( "In4.Cu" ); break; + case In5_Cu: txt = wxT( "In5.Cu" ); break; + case In6_Cu: txt = wxT( "In6.Cu" ); break; + case In7_Cu: txt = wxT( "In7.Cu" ); break; + case In8_Cu: txt = wxT( "In8.Cu" ); break; + case In9_Cu: txt = wxT( "In9.Cu" ); break; + case In10_Cu: txt = wxT( "In10.Cu" ); break; + case In11_Cu: txt = wxT( "In11.Cu" ); break; + case In12_Cu: txt = wxT( "In12.Cu" ); break; + case In13_Cu: txt = wxT( "In13.Cu" ); break; + case In14_Cu: txt = wxT( "In14.Cu" ); break; case B_Cu: txt = wxT( "B.Cu" ); break; case B_Adhes: txt = wxT( "B.Adhes" ); break; case F_Adhes: txt = wxT( "F.Adhes" ); break; diff --git a/gerbview/dialogs/dialog_show_page_borders.cpp b/gerbview/dialogs/dialog_show_page_borders.cpp index 210291792a..7c2dcfd7ea 100644 --- a/gerbview/dialogs/dialog_show_page_borders.cpp +++ b/gerbview/dialogs/dialog_show_page_borders.cpp @@ -32,6 +32,7 @@ #include #include +#include #include diff --git a/gerbview/dialogs/gerbview_dialog_display_options_frame.cpp b/gerbview/dialogs/gerbview_dialog_display_options_frame.cpp index 24928c9f75..b2d52c851a 100644 --- a/gerbview/dialogs/gerbview_dialog_display_options_frame.cpp +++ b/gerbview/dialogs/gerbview_dialog_display_options_frame.cpp @@ -11,6 +11,7 @@ #include #include +#include #include diff --git a/gerbview/draw_gerber_screen.cpp b/gerbview/draw_gerber_screen.cpp index da9e793679..8da86a78aa 100644 --- a/gerbview/draw_gerber_screen.cpp +++ b/gerbview/draw_gerber_screen.cpp @@ -36,6 +36,7 @@ #include #include +#include #include #include #include @@ -46,11 +47,10 @@ void GERBVIEW_FRAME::PrintPage( wxDC* aDC, LSET aPrintMasklayer, bool aPrintMirrorMode, void* aData ) { // Save current draw options, because print mode has specific options: - LSET visiblemask = GetVisibleLayers(); GBR_DISPLAY_OPTIONS imgDisplayOptions = m_DisplayOptions; + std::bitset printLayersMask = GetGerberLayout()->GetPrintableLayers(); // Set draw options for printing: - SetVisibleLayers( aPrintMasklayer ); m_DisplayOptions.m_DisplayFlashedItemsFill = true; m_DisplayOptions.m_DisplayLinesFill = true; m_DisplayOptions.m_DisplayPolygonsFill = true; @@ -58,7 +58,10 @@ void GERBVIEW_FRAME::PrintPage( wxDC* aDC, LSET aPrintMasklayer, m_DisplayOptions.m_IsPrinting = true; PRINT_PARAMETERS* printParameters = (PRINT_PARAMETERS*)aData; - + std::bitset printCurrLayerMask; + printCurrLayerMask.reset(); + printCurrLayerMask.set(printParameters->m_Flags); // m_Flags contains the draw layer number + GetGerberLayout()->SetPrintableLayers( printCurrLayerMask ); m_canvas->SetPrintMirrored( aPrintMirrorMode ); bool printBlackAndWhite = printParameters && printParameters->m_Print_Black_and_White; @@ -68,7 +71,7 @@ void GERBVIEW_FRAME::PrintPage( wxDC* aDC, LSET aPrintMasklayer, m_canvas->SetPrintMirrored( false ); // Restore draw options: - SetVisibleLayers( visiblemask ); + GetGerberLayout()->SetPrintableLayers( printLayersMask ); m_DisplayOptions = imgDisplayOptions; } @@ -202,14 +205,14 @@ void GBR_LAYOUT::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDrawMode, bool end = false; - for( LAYER_NUM layer = FIRST_LAYER; !end; ++layer ) + for( int layer = 0; !end; ++layer ) { - LAYER_NUM active_layer = gerbFrame->getActiveLayer(); + int active_layer = gerbFrame->getActiveLayer(); if( layer == active_layer ) // active layer will be drawn after other layers continue; - if( layer == NB_GERBER_LAYERS ) // last loop: draw active layer + if( layer == GERBER_DRAWLAYERS_COUNT ) // last loop: draw active layer { end = true; layer = active_layer; diff --git a/gerbview/events_called_functions.cpp b/gerbview/events_called_functions.cpp index 6f258ab2b8..bfbff86459 100644 --- a/gerbview/events_called_functions.cpp +++ b/gerbview/events_called_functions.cpp @@ -11,6 +11,7 @@ #include #include +#include #include #include #include @@ -226,7 +227,7 @@ void GERBVIEW_FRAME::OnSelectActiveDCode( wxCommandEvent& event ) void GERBVIEW_FRAME::OnSelectActiveLayer( wxCommandEvent& event ) { - LAYER_NUM layer = getActiveLayer(); + int layer = getActiveLayer(); setActiveLayer( event.GetSelection() ); @@ -240,7 +241,7 @@ void GERBVIEW_FRAME::OnSelectActiveLayer( wxCommandEvent& event ) void GERBVIEW_FRAME::OnShowGerberSourceFile( wxCommandEvent& event ) { - LAYER_NUM layer = getActiveLayer(); + int layer = getActiveLayer(); GERBER_IMAGE* gerber_layer = g_GERBER_List[layer]; if( gerber_layer ) diff --git a/gerbview/excellon_read_drill_file.cpp b/gerbview/excellon_read_drill_file.cpp index 952d89c8d3..7c9726d2b0 100644 --- a/gerbview/excellon_read_drill_file.cpp +++ b/gerbview/excellon_read_drill_file.cpp @@ -67,6 +67,7 @@ #include #include +#include #include #include #include @@ -92,13 +93,13 @@ extern double ReadDouble( char*& text, bool aSkipSeparator = true ); extern void fillFlashedGBRITEM( GERBER_DRAW_ITEM* aGbrItem, APERTURE_T aAperture, int Dcode_index, - LAYER_NUM aLayer, + int aLayer, const wxPoint& aPos, wxSize aSize, bool aLayerNegative ); void fillLineGBRITEM( GERBER_DRAW_ITEM* aGbrItem, int Dcode_index, - LAYER_NUM aLayer, + int aLayer, const wxPoint& aStart, const wxPoint& aEnd, wxSize aPenSize, @@ -167,7 +168,7 @@ static EXCELLON_CMD excellon_G_CmdList[] = bool GERBVIEW_FRAME::Read_EXCELLON_File( const wxString& aFullFileName ) { wxString msg; - LAYER_NUM layer = getActiveLayer(); // current layer used in GerbView + int layer = getActiveLayer(); // current layer used in GerbView if( g_GERBER_List[layer] == NULL ) { diff --git a/gerbview/export_to_pcbnew.cpp b/gerbview/export_to_pcbnew.cpp index 1594f5d7af..f770256667 100644 --- a/gerbview/export_to_pcbnew.cpp +++ b/gerbview/export_to_pcbnew.cpp @@ -7,13 +7,13 @@ #include #include -// #include #include #include #include #include #include #include +#include #include #include #include @@ -123,7 +123,7 @@ void GERBVIEW_FRAME::ExportDataInPcbnewFormat( wxCommandEvent& event ) int layercount = 0; // Count the Gerber layers which are actually currently used - for( LAYER_NUM ii = FIRST_LAYER; ii < NB_GERBER_LAYERS; ++ii ) + for( LAYER_NUM ii = 0; ii < GERBER_DRAWLAYERS_COUNT; ++ii ) { if( g_GERBER_List[ii] != NULL ) layercount++; @@ -190,16 +190,17 @@ bool GBR_TO_PCB_EXPORTER::ExportPcb( LAYER_NUM* LayerLookUpTable, int aCopperLay // create an image of gerber data // First: non copper layers: GERBER_DRAW_ITEM* gerb_item = m_gerbview_frame->GetItemsList(); + int pcbCopperLayerMax = 31; for( ; gerb_item; gerb_item = gerb_item->Next() ) { - LAYER_NUM layer = gerb_item->GetLayer(); + int layer = gerb_item->GetLayer(); LAYER_NUM pcb_layer_number = LayerLookUpTable[layer]; if( !IsPcbLayer( pcb_layer_number ) ) continue; - if( pcb_layer_number > LAST_COPPER_LAYER ) + if( pcb_layer_number > pcbCopperLayerMax ) export_non_copper_item( gerb_item, pcb_layer_number ); } @@ -209,10 +210,10 @@ bool GBR_TO_PCB_EXPORTER::ExportPcb( LAYER_NUM* LayerLookUpTable, int aCopperLay for( ; gerb_item; gerb_item = gerb_item->Next() ) { - LAYER_NUM layer = gerb_item->GetLayer(); + int layer = gerb_item->GetLayer(); LAYER_NUM pcb_layer_number = LayerLookUpTable[layer]; - if( pcb_layer_number < 0 || pcb_layer_number > LAST_COPPER_LAYER ) + if( pcb_layer_number < 0 || pcb_layer_number > pcbCopperLayerMax ) continue; else @@ -398,13 +399,7 @@ void GBR_TO_PCB_EXPORTER::writePcbHeader() // Write copper layer count fprintf( m_fp, "LayerCount %d\n", m_pcbCopperLayersCount ); - // Write enabled layer mask: - int lmask = ALL_NO_CU_LAYERS | EXTERNAL_CU_LAYERS; - for( int ii = 0; ii < m_pcbCopperLayersCount - 2; ii++ ) - lmask |= 2 << ii; - - fprintf( m_fp, "EnabledLayers %08X\n", lmask ); fprintf( m_fp, "$EndGENERAL\n\n" ); // Creates void setup diff --git a/gerbview/files.cpp b/gerbview/files.cpp index 6d219cd131..5b016e87a9 100644 --- a/gerbview/files.cpp +++ b/gerbview/files.cpp @@ -33,6 +33,7 @@ #include #include +#include #include #include #include @@ -163,7 +164,7 @@ bool GERBVIEW_FRAME::LoadGerberFiles( const wxString& aFullFileName ) } // Read gerber files: each file is loaded on a new GerbView layer - LAYER_NUM layer = getActiveLayer(); + int layer = getActiveLayer(); for( unsigned ii = 0; ii < filenamesList.GetCount(); ii++ ) { @@ -244,7 +245,7 @@ bool GERBVIEW_FRAME::LoadExcellonFiles( const wxString& aFullFileName ) } // Read gerber files: each file is loaded on a new GerbView layer - LAYER_NUM layer = getActiveLayer(); + int layer = getActiveLayer(); for( unsigned ii = 0; ii < filenamesList.GetCount(); ii++ ) { diff --git a/gerbview/gerbview.cpp b/gerbview/gerbview.cpp index fbdc0288bc..6e30d8a7c2 100644 --- a/gerbview/gerbview.cpp +++ b/gerbview/gerbview.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #include diff --git a/gerbview/gerbview.h b/gerbview/gerbview.h index 42a469a631..89385344f1 100644 --- a/gerbview/gerbview.h +++ b/gerbview/gerbview.h @@ -8,9 +8,6 @@ #include #include -#include -#include -#include #define CURSEUR_ON_GRILLE 0 #define CURSEUR_OFF_GRILLE 1 @@ -32,6 +29,8 @@ extern const wxChar* g_GerberPageSizeList[8]; #define GERB_STOP_DRAW 2 // Extinguish light (lift pen) #define GERB_FLASH 3 // Flash +// number fo draw layers in Gerbview +#define GERBER_DRAWLAYERS_COUNT 32 /** * Enum GERBER_VISIBLE_ID @@ -47,9 +46,6 @@ enum GERBER_VISIBLE_ID END_GERBER_VISIBLE_LIST // sentinel }; -extern const wxString GerbviewProjectFileExt; -extern const wxString GerbviewProjectFileWildcard; - // Interpolation type enum Gerb_Interpolation { @@ -93,13 +89,6 @@ enum Gerb_Analyse_Cmd ENTER_RS274X_CMD }; - -/**************/ -/* rs274x.cpp */ -/**************/ -bool GetEndOfBlock( char buff[GERBER_BUFZ], char*& text, FILE* gerber_file ); -extern GERBER_IMAGE* g_GERBER_List[32]; - -#include +extern GERBER_IMAGE* g_GERBER_List[GERBER_DRAWLAYERS_COUNT]; #endif // ifndef GERBVIEW_H diff --git a/gerbview/gerbview_config.cpp b/gerbview/gerbview_config.cpp index db1ed29f3e..4202284555 100644 --- a/gerbview/gerbview_config.cpp +++ b/gerbview/gerbview_config.cpp @@ -38,14 +38,13 @@ #include #include +#include #include #include #define GROUP wxT("/gerbview") -#define INSETUP true - void GERBVIEW_FRAME::Process_Config( wxCommandEvent& event ) { diff --git a/gerbview/gerbview_frame.cpp b/gerbview/gerbview_frame.cpp index 632ce929c6..a26c5c378a 100644 --- a/gerbview/gerbview_frame.cpp +++ b/gerbview/gerbview_frame.cpp @@ -27,7 +27,6 @@ */ #include -//#include #include #include #include @@ -40,6 +39,7 @@ #include #include +#include #include #include #include @@ -92,7 +92,7 @@ GERBVIEW_FRAME::GERBVIEW_FRAME( KIWAY* aKiway, wxWindow* aParent ): SetLayout( new GBR_LAYOUT() ); - SetVisibleLayers( FULL_LAYERS ); // All 32 layers visible. + SetVisibleLayers( -1 ); // All draw layers visible. SetScreen( new GBR_SCREEN( GetGerberLayout()->GetPageSettings().GetSizeIU() ) ); @@ -167,6 +167,7 @@ GERBVIEW_FRAME::GERBVIEW_FRAME( KIWAY* aKiway, wxWindow* aParent ): m_LayersManager->ReFillRender(); // Update colors in Render after the config is read m_auimgr.Update(); + setActiveLayer( 0, true ); Zoom_Automatique( true ); // Gives a default zoom value } @@ -184,9 +185,9 @@ void GERBVIEW_FRAME::OnCloseWindow( wxCloseEvent& Event ) bool GERBVIEW_FRAME::OpenProjectFiles( const std::vector& aFileSet, int aCtl ) { - const unsigned limit = std::min( unsigned( aFileSet.size() ), unsigned( NB_GERBER_LAYERS ) ); + const unsigned limit = std::min( unsigned( aFileSet.size() ), unsigned( GERBER_DRAWLAYERS_COUNT ) ); - LAYER_NUM layer = FIRST_LAYER; + int layer = 0; for( unsigned i=0; i= NB_GERBER_LAYERS ) - layer = FIRST_LAYER; + if( layer >= GERBER_DRAWLAYERS_COUNT ) + layer = 0; } return NO_AVAILABLE_LAYERS; @@ -398,9 +399,9 @@ void GERBVIEW_FRAME::Liste_D_Codes() wxArrayString list; double scale = g_UserUnit == INCHES ? IU_PER_MILS * 1000 : IU_PER_MM; - LAYER_NUM curr_layer = getActiveLayer(); + int curr_layer = getActiveLayer(); - for( LAYER_NUM layer = FIRST_LAYER; layer < NB_LAYERS; ++layer ) + for( int layer = 0; layer < GERBER_DRAWLAYERS_COUNT; ++layer ) { GERBER_IMAGE* gerber = g_GERBER_List[layer]; @@ -551,9 +552,9 @@ void GERBVIEW_FRAME::SetVisibleAlls() * Returns a bit-mask of all the layers that are visible * @return int - the visible layers in bit-mapped form. */ -LSET GERBVIEW_FRAME::GetVisibleLayers() const +long GERBVIEW_FRAME::GetVisibleLayers() const { - return FULL_LAYERS; // TODO + return -1; // TODO } @@ -563,9 +564,9 @@ LSET GERBVIEW_FRAME::GetVisibleLayers() const * changes the bit-mask of visible layers * @param aLayerMask = The new bit-mask of visible layers */ -void GERBVIEW_FRAME::SetVisibleLayers( LSET aLayerMask ) +void GERBVIEW_FRAME::SetVisibleLayers( long aLayerMask ) { - GetGerberLayout()->SetVisibleLayers( aLayerMask ); +// GetGerberLayout()->SetVisibleLayers( aLayerMask ); } @@ -575,12 +576,12 @@ void GERBVIEW_FRAME::SetVisibleLayers( LSET aLayerMask ) * @param aLayer = The layer to be tested * @return bool - true if the layer is visible. */ -bool GERBVIEW_FRAME::IsLayerVisible( LAYER_NUM aLayer ) const +bool GERBVIEW_FRAME::IsLayerVisible( int aLayer ) const { if( ! m_DisplayOptions.m_IsPrinting ) return m_LayersManager->IsLayerVisible( aLayer ); else - return GetGerberLayout()->IsLayerVisible( aLayer ); + return GetGerberLayout()->IsLayerPrintable( aLayer ); } @@ -664,7 +665,7 @@ EDA_COLOR_T GERBVIEW_FRAME::GetNegativeItemsColor() const * Function GetLayerColor * gets a layer color for any valid layer. */ -EDA_COLOR_T GERBVIEW_FRAME::GetLayerColor( LAYER_NUM aLayer ) const +EDA_COLOR_T GERBVIEW_FRAME::GetLayerColor( int aLayer ) const { return m_colorsSettings->GetLayerColor( aLayer ); } @@ -674,7 +675,7 @@ EDA_COLOR_T GERBVIEW_FRAME::GetLayerColor( LAYER_NUM aLayer ) const * Function SetLayerColor * changes a layer color for any valid layer. */ -void GERBVIEW_FRAME::SetLayerColor( LAYER_NUM aLayer, EDA_COLOR_T aColor ) +void GERBVIEW_FRAME::SetLayerColor( int aLayer, EDA_COLOR_T aColor ) { m_colorsSettings->SetLayerColor( aLayer, aColor ); } @@ -684,7 +685,7 @@ void GERBVIEW_FRAME::SetLayerColor( LAYER_NUM aLayer, EDA_COLOR_T aColor ) * Function getActiveLayer * returns the active layer */ -LAYER_NUM GERBVIEW_FRAME::getActiveLayer() +int GERBVIEW_FRAME::getActiveLayer() { return ( (GBR_SCREEN*) GetScreen() )->m_Active_Layer; } @@ -695,7 +696,7 @@ LAYER_NUM GERBVIEW_FRAME::getActiveLayer() * will change the currently active layer to \a aLayer and also * update the PCB_LAYER_WIDGET. */ -void GERBVIEW_FRAME::setActiveLayer( LAYER_NUM aLayer, bool doLayerWidgetUpdate ) +void GERBVIEW_FRAME::setActiveLayer( int aLayer, bool doLayerWidgetUpdate ) { ( (GBR_SCREEN*) GetScreen() )->m_Active_Layer = aLayer; diff --git a/gerbview/gerbview_frame.h b/gerbview/gerbview_frame.h index 81a076e361..fc35c3d4a5 100644 --- a/gerbview/gerbview_frame.h +++ b/gerbview/gerbview_frame.h @@ -37,7 +37,6 @@ #include #include #include -#include #define NO_AVAILABLE_LAYERS UNDEFINED_LAYER @@ -167,7 +166,7 @@ public: * different radiobutton is clicked on) prior to then clicking on the "Deselect" * button provided within the "Layer selection:" dialog box). */ - LAYER_NUM SelectPCBLayer( LAYER_NUM aDefaultLayer, int aOpperLayerCount, bool aNullLayer = false ); + int SelectPCBLayer( int aDefaultLayer, int aOpperLayerCount, bool aNullLayer = false ); protected: GERBER_LAYER_WIDGET* m_LayersManager; @@ -306,9 +305,9 @@ public: * Function GetVisibleLayers * is a proxy function that calls the correspondent function in m_BoardSettings * Returns a bit-mask of all the layers that are visible - * @return int - the visible layers in bit-mapped form. + * @return long - the visible layers in bit-mapped form. */ - LSET GetVisibleLayers() const; + long GetVisibleLayers() const; /** * Function SetVisibleLayers @@ -316,7 +315,7 @@ public: * changes the bit-mask of visible layers * @param aLayerMask = The new bit-mask of visible layers */ - void SetVisibleLayers( LSET aLayerMask ); + void SetVisibleLayers( long aLayerMask ); /** * Function IsLayerVisible @@ -324,7 +323,7 @@ public: * @param aLayer = The layer to be tested * @return bool - true if the layer is visible. */ - bool IsLayerVisible( LAYER_NUM aLayer ) const; + bool IsLayerVisible( int aLayer ) const; /** * Function GetVisibleElementColor @@ -338,13 +337,13 @@ public: * Function GetLayerColor * gets a layer color for any valid layer. */ - EDA_COLOR_T GetLayerColor( LAYER_NUM aLayer ) const; + EDA_COLOR_T GetLayerColor( int aLayer ) const; /** * Function SetLayerColor * changes a layer color for any valid layer. */ - void SetLayerColor( LAYER_NUM aLayer, EDA_COLOR_T aColor ); + void SetLayerColor( int aLayer, EDA_COLOR_T aColor ); /** * Function GetNegativeItemsColor @@ -396,13 +395,13 @@ public: * will change the currently active layer to \a aLayer and also * update the GERBER_LAYER_WIDGET. */ - void setActiveLayer( LAYER_NUM aLayer, bool doLayerWidgetUpdate = true ); + void setActiveLayer( int aLayer, bool doLayerWidgetUpdate = true ); /** * Function getActiveLayer * returns the active layer */ - LAYER_NUM getActiveLayer(); + int getActiveLayer(); /** * Function getNextAvailableLayer @@ -411,7 +410,7 @@ public: * @param aLayer The first layer to search. * @return The first empty layer found or NO_AVAILABLE_LAYERS. */ - LAYER_NUM getNextAvailableLayer( LAYER_NUM aLayer = FIRST_LAYER ) const; + int getNextAvailableLayer( int aLayer = 0 ) const; bool hasAvailableLayers() const { diff --git a/gerbview/hotkeys.cpp b/gerbview/hotkeys.cpp index 29082a6349..76bae66e51 100644 --- a/gerbview/hotkeys.cpp +++ b/gerbview/hotkeys.cpp @@ -8,6 +8,7 @@ #include #include +#include #include #include diff --git a/gerbview/initpcb.cpp b/gerbview/initpcb.cpp index 1ae5090a3c..f428dd9a54 100644 --- a/gerbview/initpcb.cpp +++ b/gerbview/initpcb.cpp @@ -32,6 +32,7 @@ #include #include +#include #include #include #include @@ -39,7 +40,7 @@ bool GERBVIEW_FRAME::Clear_Pcb( bool query ) { - LAYER_NUM layer; + int layer; if( GetGerberLayout() == NULL ) return false; @@ -52,7 +53,7 @@ bool GERBVIEW_FRAME::Clear_Pcb( bool query ) GetGerberLayout()->m_Drawings.DeleteAll(); - for( layer = FIRST_LAYER; layer < NB_GERBER_LAYERS; ++layer ) + for( layer = 0; layer < GERBER_DRAWLAYERS_COUNT; ++layer ) { if( g_GERBER_List[layer] ) { @@ -65,7 +66,7 @@ bool GERBVIEW_FRAME::Clear_Pcb( bool query ) SetScreen( new GBR_SCREEN( GetPageSettings().GetSizeIU() ) ); - setActiveLayer( FIRST_LAYER ); + setActiveLayer( 0 ); m_LayersManager->UpdateLayerIcons(); syncLayerBox(); return true; @@ -74,7 +75,7 @@ bool GERBVIEW_FRAME::Clear_Pcb( bool query ) void GERBVIEW_FRAME::Erase_Current_Layer( bool query ) { - LAYER_NUM layer = getActiveLayer(); + int layer = getActiveLayer(); wxString msg; msg.Printf( _( "Clear layer %d?" ), layer + 1 ); diff --git a/gerbview/locate.cpp b/gerbview/locate.cpp index 7e6ba30737..f2fb2a4d50 100644 --- a/gerbview/locate.cpp +++ b/gerbview/locate.cpp @@ -31,6 +31,7 @@ #include #include +#include #include @@ -46,7 +47,7 @@ GERBER_DRAW_ITEM* GERBVIEW_FRAME::Locate( const wxPoint& aPosition, int aTypeloc if( aTypeloc == CURSEUR_ON_GRILLE ) ref = GetNearestGridPosition( ref ); - LAYER_NUM layer = getActiveLayer(); + int layer = getActiveLayer(); // Search first on active layer GERBER_DRAW_ITEM* gerb_item = GetItemsList(); diff --git a/gerbview/menubar.cpp b/gerbview/menubar.cpp index fd2b6c0abf..4703b6da66 100644 --- a/gerbview/menubar.cpp +++ b/gerbview/menubar.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include diff --git a/gerbview/onleftclick.cpp b/gerbview/onleftclick.cpp index dc73fbac08..ceedc7f39b 100644 --- a/gerbview/onleftclick.cpp +++ b/gerbview/onleftclick.cpp @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/gerbview/onrightclick.cpp b/gerbview/onrightclick.cpp index aefc0e006b..ca9224b5a4 100644 --- a/gerbview/onrightclick.cpp +++ b/gerbview/onrightclick.cpp @@ -8,6 +8,7 @@ #include #include +#include #include diff --git a/gerbview/pcbplot.cpp b/gerbview/pcbplot.cpp index e13b1de974..0e39eb48bb 100644 --- a/gerbview/pcbplot.cpp +++ b/gerbview/pcbplot.cpp @@ -6,6 +6,7 @@ #include #include +#include #include /** TODO */ diff --git a/gerbview/readgerb.cpp b/gerbview/readgerb.cpp index ac374bb5c7..cb932db050 100644 --- a/gerbview/readgerb.cpp +++ b/gerbview/readgerb.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include @@ -25,7 +26,7 @@ bool GERBVIEW_FRAME::Read_GERBER_File( const wxString& GERBER_FullFileName, wxString msg; char* text; - LAYER_NUM layer; // current layer used in GerbView + int layer; // current layer used in GerbView layer = getActiveLayer(); diff --git a/gerbview/rs274d.cpp b/gerbview/rs274d.cpp index 7023d63930..74cb464cb9 100644 --- a/gerbview/rs274d.cpp +++ b/gerbview/rs274d.cpp @@ -30,6 +30,7 @@ #include #include +#include #include #include #include @@ -107,7 +108,7 @@ void fillFlashedGBRITEM( GERBER_DRAW_ITEM* aGbrItem, APERTURE_T aAperture, int Dcode_index, - LAYER_NUM aLayer, + int aLayer, const wxPoint& aPos, wxSize aSize, bool aLayerNegative ) @@ -159,7 +160,7 @@ void fillFlashedGBRITEM( GERBER_DRAW_ITEM* aGbrItem, */ void fillLineGBRITEM( GERBER_DRAW_ITEM* aGbrItem, int Dcode_index, - LAYER_NUM aLayer, + int aLayer, const wxPoint& aStart, const wxPoint& aEnd, wxSize aPenSize, @@ -208,7 +209,7 @@ void fillLineGBRITEM( GERBER_DRAW_ITEM* aGbrItem, * false when arc is inside one quadrant * @param aLayerNegative = true if the current layer is negative */ -static void fillArcGBRITEM( GERBER_DRAW_ITEM* aGbrItem, int Dcode_index, LAYER_NUM aLayer, +static void fillArcGBRITEM( GERBER_DRAW_ITEM* aGbrItem, int Dcode_index, int aLayer, const wxPoint& aStart, const wxPoint& aEnd, const wxPoint& aRelCenter, wxSize aPenSize, bool aClockwise, bool aMultiquadrant, @@ -344,10 +345,11 @@ static void fillArcPOLY( GERBER_DRAW_ITEM* aGbrItem, * so we muse create a dummy track and use its geometric parameters */ static GERBER_DRAW_ITEM dummyGbrItem( NULL, NULL ); + static const int drawlayer = 0; aGbrItem->SetLayerPolarity( aLayerNegative ); - fillArcGBRITEM( &dummyGbrItem, 0, FIRST_LAYER, + fillArcGBRITEM( &dummyGbrItem, 0, drawlayer, aStart, aEnd, rel_center, wxSize(0, 0), aClockwise, aMultiquadrant, aLayerNegative ); @@ -568,7 +570,7 @@ bool GERBER_IMAGE::Execute_DCODE_Command( char*& text, int D_commande ) GERBER_DRAW_ITEM* gbritem; GBR_LAYOUT* layout = m_Parent->GetGerberLayout(); - LAYER_NUM activeLayer = m_Parent->getActiveLayer(); + int activeLayer = m_Parent->getActiveLayer(); int dcode = 0; D_CODE* tool = NULL; diff --git a/gerbview/rs274x.cpp b/gerbview/rs274x.cpp index e35c94bd2e..aeb7871429 100644 --- a/gerbview/rs274x.cpp +++ b/gerbview/rs274x.cpp @@ -12,6 +12,7 @@ extern int ReadInt( char*& text, bool aSkipSeparator = true ); extern double ReadDouble( char*& text, bool aSkipSeparator = true ); +extern bool GetEndOfBlock( char buff[GERBER_BUFZ], char*& text, FILE* gerber_file ); #define CODE( x, y ) ( ( (x) << 8 ) + (y) ) diff --git a/gerbview/select_layers_to_pcb.cpp b/gerbview/select_layers_to_pcb.cpp index b6f1cf8f15..03e48aa3c9 100644 --- a/gerbview/select_layers_to_pcb.cpp +++ b/gerbview/select_layers_to_pcb.cpp @@ -27,9 +27,9 @@ */ #include -//#include #include #include +#include #include #include @@ -41,7 +41,7 @@ extern const wxString GetPCBDefaultLayerName( LAYER_NUM aLayerNumber ); enum swap_layer_id { ID_LAYERS_MAP_DIALOG = ID_GERBER_END_LIST, ID_BUTTON_0, - ID_TEXT_0 = ID_BUTTON_0 + NB_GERBER_LAYERS + ID_TEXT_0 = ID_BUTTON_0 + GERBER_DRAWLAYERS_COUNT }; @@ -55,7 +55,7 @@ int LAYERS_MAP_DIALOG::m_exportBoardCopperLayersCount = 2; BEGIN_EVENT_TABLE( LAYERS_MAP_DIALOG, LAYERS_MAP_DIALOG_BASE ) - EVT_COMMAND_RANGE( ID_BUTTON_0, ID_BUTTON_0 + NB_GERBER_LAYERS-1, + EVT_COMMAND_RANGE( ID_BUTTON_0, ID_BUTTON_0 + GERBER_DRAWLAYERS_COUNT-1, wxEVT_COMMAND_BUTTON_CLICKED, LAYERS_MAP_DIALOG::OnSelectLayer ) END_EVENT_TABLE() @@ -102,8 +102,7 @@ void LAYERS_MAP_DIALOG::initDialog() // version are also 26 pixels wide and 26 pixels high. If appropriate, // the above code should be modified as required in the event that those // buttons should be some other size in that version. - - for( LAYER_NUM ii = FIRST_LAYER; ii < NB_GERBER_LAYERS; ++ii ) + for( int ii = 0; ii < GERBER_DRAWLAYERS_COUNT; ++ii ) { // Specify the default value for each member of these arrays. m_buttonTable[ii] = -1; @@ -111,32 +110,31 @@ void LAYERS_MAP_DIALOG::initDialog() } // Ensure we have: - // at least 2 copper layers and BOARD_COPPER_LAYERS_MAX_COUNT copper layers max + // at least 2 copper layers and less than max pacb copper layers count // and even layers count because a board *must* have even layers count - // and maxi BOARD_COPPER_LAYERS_MAX_COUNT copper layers count normalizeBrdLayersCount(); int idx = ( m_exportBoardCopperLayersCount / 2 ) - 1; m_comboCopperLayersCount->SetSelection( idx ); - LAYER_NUM pcb_layer_num = FIRST_LAYER; - m_itemsCount = 0; - for( LAYER_NUM ii = FIRST_LAYER; ii < NB_GERBER_LAYERS; ++ii ) + LAYER_NUM pcb_layer_num = 0; + m_gerberActiveLayersCount = 0; + for( int ii = 0; ii < GERBER_DRAWLAYERS_COUNT; ++ii ) { if( g_GERBER_List[ii] == NULL ) - continue; + break; if( (pcb_layer_num == m_exportBoardCopperLayersCount - 1) && (m_exportBoardCopperLayersCount > 1) ) pcb_layer_num = F_Cu; - m_buttonTable[m_itemsCount] = ii; + m_buttonTable[m_gerberActiveLayersCount] = ii; m_layersLookUpTable[ii] = pcb_layer_num; - m_itemsCount++; + m_gerberActiveLayersCount++; ++pcb_layer_num; } - if( m_itemsCount <= NB_GERBER_LAYERS/2 ) // Only one list is enough + if( m_gerberActiveLayersCount <= GERBER_DRAWLAYERS_COUNT/2 ) // Only one list is enough { m_staticlineSep->Hide(); } @@ -151,7 +149,7 @@ void LAYERS_MAP_DIALOG::initDialog() } wxFlexGridSizer* flexColumnBoxSizer = m_flexLeftColumnBoxSizer; - for( int ii = 0; ii < m_itemsCount; ii++ ) + for( int ii = 0; ii < m_gerberActiveLayersCount; ii++ ) { // Each Gerber layer has an associated static text string (to // identify that layer), a button (for invoking a child dialog @@ -178,7 +176,7 @@ void LAYERS_MAP_DIALOG::initDialog() // is nb_items; otherwise, the number of rows is 16 (with two // separate columns of controls being used if nb_items > 16). - if( ii == NB_GERBER_LAYERS/2 ) + if( ii == GERBER_DRAWLAYERS_COUNT/2 ) flexColumnBoxSizer = m_flexRightColumnBoxSizer; // Provide a text string to identify the Gerber layer @@ -226,7 +224,7 @@ void LAYERS_MAP_DIALOG::initDialog() wxDefaultSize, 0 ); goodSize = text->GetSize(); - for( LAYER_NUM jj = FIRST_LAYER; jj < NB_LAYERS; ++jj ) + for( LAYER_NUM jj = 0; jj < GERBER_DRAWLAYERS_COUNT; ++jj ) { text->SetLabel( GetPCBDefaultLayerName( jj ) ); if( goodSize.x < text->GetSize().x ) @@ -259,8 +257,8 @@ void LAYERS_MAP_DIALOG::normalizeBrdLayersCount() if( ( m_exportBoardCopperLayersCount & 1 ) ) m_exportBoardCopperLayersCount++; - if( m_exportBoardCopperLayersCount > NB_LAYERS ) - m_exportBoardCopperLayersCount = NB_LAYERS; + if( m_exportBoardCopperLayersCount > GERBER_DRAWLAYERS_COUNT ) + m_exportBoardCopperLayersCount = GERBER_DRAWLAYERS_COUNT; if( m_exportBoardCopperLayersCount < 2 ) m_exportBoardCopperLayersCount = 2; @@ -284,7 +282,7 @@ void LAYERS_MAP_DIALOG::OnResetClick( wxCommandEvent& event ) wxString msg; int ii; LAYER_NUM layer; - for( ii = 0, layer = FIRST_LAYER; ii < m_itemsCount; ii++, ++layer ) + for( ii = 0, layer = 0; ii < m_gerberActiveLayersCount; ii++, ++layer ) { if( (layer == m_exportBoardCopperLayersCount - 1) && (m_exportBoardCopperLayersCount > 1) ) @@ -306,7 +304,7 @@ void LAYERS_MAP_DIALOG::OnStoreSetup( wxCommandEvent& event ) config->Write( wxT("BrdLayersCount"), m_exportBoardCopperLayersCount ); wxString key; - for( LAYER_NUM ii = FIRST_LAYER; ii < NB_GERBER_LAYERS; ++ii ) + for( int ii = 0; ii < GERBER_DRAWLAYERS_COUNT; ++ii ) { key.Printf( wxT("GbrLyr%dToPcb"), ii ); config->Write( key, m_layersLookUpTable[ii] ); @@ -324,7 +322,7 @@ void LAYERS_MAP_DIALOG::OnGetSetup( wxCommandEvent& event ) m_comboCopperLayersCount->SetSelection( idx ); wxString key; - for( LAYER_NUM ii = FIRST_LAYER; ii < NB_GERBER_LAYERS; ++ii ) + for( int ii = 0; ii < GERBER_DRAWLAYERS_COUNT; ++ii ) { key.Printf( wxT("GbrLyr%dToPcb"), ii ); int ilayer; @@ -332,7 +330,7 @@ void LAYERS_MAP_DIALOG::OnGetSetup( wxCommandEvent& event ) m_layersLookUpTable[ii] = ilayer; } - for( int ii = 0; ii < m_itemsCount; ii++ ) + for( int ii = 0; ii < m_gerberActiveLayersCount; ii++ ) { LAYER_NUM layer = m_layersLookUpTable[ii]; if( layer == UNSELECTED_LAYER ) @@ -354,7 +352,7 @@ void LAYERS_MAP_DIALOG::OnSelectLayer( wxCommandEvent& event ) ii = event.GetId() - ID_BUTTON_0; - if( (ii < FIRST_LAYER) || (ii >= NB_GERBER_LAYERS) ) + if( (ii < 0) || (ii >= GERBER_DRAWLAYERS_COUNT) ) { wxFAIL_MSG( wxT("Bad layer id") ); return; @@ -406,7 +404,7 @@ void LAYERS_MAP_DIALOG::OnOkClick( wxCommandEvent& event ) normalizeBrdLayersCount(); int inner_layer_max = 0; - for( LAYER_NUM ii = FIRST_LAYER; ii < NB_GERBER_LAYERS; ++ii ) + for( int ii = 0; ii < GERBER_DRAWLAYERS_COUNT; ++ii ) { if( m_layersLookUpTable[ii] < F_Cu ) { diff --git a/gerbview/select_layers_to_pcb.h b/gerbview/select_layers_to_pcb.h index dd27ee28ea..08dd56326b 100644 --- a/gerbview/select_layers_to_pcb.h +++ b/gerbview/select_layers_to_pcb.h @@ -6,24 +6,23 @@ #define _SELECT_LAYERS_TO_PCB_H_ #include -#include /* * This dialog shows the gerber files loaded, and allows user to choose - * equivalence tbetween gerber layers and pcb layers + * equivalence between gerber layers and pcb layers */ class LAYERS_MAP_DIALOG : public LAYERS_MAP_DIALOG_BASE { private: GERBVIEW_FRAME* m_Parent; - int m_itemsCount; + int m_gerberActiveLayersCount; // Number of initialized gerber layers static int m_exportBoardCopperLayersCount; wxFlexGridSizer* m_flexRightColumnBoxSizer; // An extra wxFlexGridSizer used // when we have more than 16 gerber files loaded - LAYER_NUM m_layersLookUpTable[NB_GERBER_LAYERS]; // Indexes Gerber layers to PCB file layers + LAYER_NUM m_layersLookUpTable[GERBER_DRAWLAYERS_COUNT]; // Indexes Gerber layers to PCB file layers // the last value in table is the number of copper layers - int m_buttonTable[int(NB_GERBER_LAYERS)+1]; // Indexes buttons to Gerber layers - wxStaticText* m_layersList[int(NB_GERBER_LAYERS)+1]; // Indexes text strings to buttons + int m_buttonTable[int(GERBER_DRAWLAYERS_COUNT)+1]; // Indexes buttons to Gerber layers + wxStaticText* m_layersList[int(GERBER_DRAWLAYERS_COUNT)+1]; // Indexes text strings to buttons public: LAYERS_MAP_DIALOG( GERBVIEW_FRAME* parent ); ~LAYERS_MAP_DIALOG() {}; diff --git a/gerbview/toolbars_gerber.cpp b/gerbview/toolbars_gerber.cpp index bc878db1d4..7ad3b5e7b2 100644 --- a/gerbview/toolbars_gerber.cpp +++ b/gerbview/toolbars_gerber.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -292,7 +293,7 @@ void GERBVIEW_FRAME::OnUpdateShowLayerManager( wxUpdateUIEvent& aEvent ) void GERBVIEW_FRAME::OnUpdateSelectDCode( wxUpdateUIEvent& aEvent ) { - LAYER_NUM layer = getActiveLayer(); + int layer = getActiveLayer(); GERBER_IMAGE* gerber = g_GERBER_List[layer]; int selected = ( gerber ) ? gerber->m_Selected_Tool : 0; diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index cb34bb3ce6..86e404330e 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -375,6 +375,7 @@ bool BOARD::SetLayerName( LAYER_ID aLayer, const wxString& aLayerName ) // veto changing the name if it exists elsewhere. if( id != aLayer && nameTemp == m_Layer[id].m_name ) +// if( id != aLayer && nameTemp == wxString( m_Layer[id].m_name ) ) return false; } #endif diff --git a/pcbnew/printout_controler.cpp b/pcbnew/printout_controler.cpp index b7e503c2c1..88509163e0 100644 --- a/pcbnew/printout_controler.cpp +++ b/pcbnew/printout_controler.cpp @@ -89,6 +89,7 @@ BOARD_PRINTOUT_CONTROLLER::BOARD_PRINTOUT_CONTROLLER( const PRINT_PARAMETERS& aP bool BOARD_PRINTOUT_CONTROLLER::OnPrintPage( int aPage ) { +#ifdef PCBNEW LSET lset = m_PrintParams.m_PrintMaskLayer; // compute layer mask from page number if we want one page per layer @@ -106,15 +107,18 @@ bool BOARD_PRINTOUT_CONTROLLER::OnPrintPage( int aPage ) if( !m_PrintParams.m_PrintMaskLayer.any() ) return false; -#ifdef PCBNEW // In Pcbnew we can want the layer EDGE always printed if( m_PrintParams.m_Flags == 1 ) m_PrintParams.m_PrintMaskLayer.set( Edge_Cuts ); -#endif DrawPage(); m_PrintParams.m_PrintMaskLayer = lset; +#else // GERBVIEW + // in gerbview, draw layers are printed on separate pages + m_PrintParams.m_Flags = aPage-1; // = gerber draw layer id + DrawPage(); +#endif return true; } From 33776f28683f92ea53739e3de7bfe75c99a6a44b Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sun, 29 Jun 2014 11:24:42 +0200 Subject: [PATCH 525/741] Fix Pl_Editor scrollbars incorrect position. --- pagelayout_editor/class_pl_editor_screen.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pagelayout_editor/class_pl_editor_screen.cpp b/pagelayout_editor/class_pl_editor_screen.cpp index 711bac3d7c..be5056fe54 100644 --- a/pagelayout_editor/class_pl_editor_screen.cpp +++ b/pagelayout_editor/class_pl_editor_screen.cpp @@ -84,6 +84,9 @@ PL_EDITOR_SCREEN::PL_EDITOR_SCREEN( const wxSize& aPageSizeIU ) : for( unsigned i = 0; i < DIM( pl_editorGridList ); ++i ) AddGrid( pl_editorGridList[i] ); + // pl_editor uses the same frame position as schematic and board editors + m_Center = false; + // Set the working grid size to a reasonable value SetGrid( MM_GRID( 1.0 ) ); From ad750defb6dbe8f5ea26c1406729ee7fba59aa28 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Sun, 29 Jun 2014 08:05:51 -0500 Subject: [PATCH 526/741] LAYER_ID work --- 3d-viewer/3d_draw.cpp | 2 +- common/class_layer_box_selector.cpp | 2 +- common/lset.cpp | 4 +- gerbview/class_gbr_layer_box_selector.cpp | 2 +- gerbview/class_gbr_layout.cpp | 4 +- include/class_board_item.h | 2 +- include/layers_id_colors_and_visibility.h | 38 ++++---- pcbnew/class_board.cpp | 2 +- pcbnew/class_drawsegment.cpp | 8 +- pcbnew/class_edge_mod.cpp | 18 ++-- pcbnew/class_pcb_layer_box_selector.cpp | 70 ++++++++------- pcbnew/class_pcb_layer_box_selector.h | 1 - pcbnew/class_pcb_layer_widget.cpp | 10 +-- pcbnew/class_zone.cpp | 18 ++-- pcbnew/dialogs/dialog_copper_zones.cpp | 2 +- pcbnew/dialogs/dialog_global_deletion.cpp | 2 +- .../dialog_graphic_item_properties.cpp | 2 +- ...og_graphic_item_properties_for_Modedit.cpp | 2 +- .../dialog_keepout_area_properties.cpp | 2 +- pcbnew/dialogs/dialog_pcb_text_properties.cpp | 2 +- pcbnew/dimension.cpp | 2 +- pcbnew/eagle_plugin.cpp | 2 +- pcbnew/edit.cpp | 90 +++++++++---------- pcbnew/editrack-part2.cpp | 2 +- pcbnew/exporters/gen_drill_report_files.cpp | 4 +- pcbnew/hotkeys.cpp | 6 +- pcbnew/hotkeys_board_editor.cpp | 6 +- pcbnew/import_dxf/dxf2brd_items.cpp | 10 +-- pcbnew/pcad2kicadpcb_plugin/pcb.cpp | 2 +- pcbnew/pcbframe.cpp | 2 +- pcbnew/plot_brditems_plotter.cpp | 2 +- pcbnew/print_board_functions.cpp | 10 ++- pcbnew/router/pns_router.cpp | 2 +- pcbnew/router/router_tool.cpp | 8 +- pcbnew/sel_layer.cpp | 6 +- pcbnew/specctra.cpp | 7 +- pcbnew/swap_layers.cpp | 6 +- pcbnew/tool_pcb.cpp | 1 + pcbnew/tools/pcbnew_control.cpp | 4 +- 39 files changed, 193 insertions(+), 172 deletions(-) diff --git a/3d-viewer/3d_draw.cpp b/3d-viewer/3d_draw.cpp index 93f88ebd16..f8ba411577 100644 --- a/3d-viewer/3d_draw.cpp +++ b/3d-viewer/3d_draw.cpp @@ -285,7 +285,7 @@ void EDA_3D_CANVAS::BuildBoard3DView() // but I assume that's backwards for( unsigned i=0; i LSET s = 0; + * + * since that will call this constructor and set bit zero, probably not what was + * intended. Use + * + * + * LSET s; + * + * + * for an empty set. */ - LSET( int aLayer ) + LSET( LAYER_ID aLayer ) // LAYER_ID deliberately exludes int and relatives { set( aLayer ); } @@ -225,7 +241,7 @@ public: /** * Constructor LSET( int, ...) * takes a variable number of LAYER_IDs in the argument list to construct - * the set. + * the set. Typically used only in static construction. * @param aIdCount is the number of LAYER_IDs which follow. */ LSET( size_t aIdCount, ... ); @@ -341,24 +357,13 @@ public: * Find the first set LAYER_ID. Returns UNDEFINED_LAYER if more * than one is set or UNSELECTED_LAYER if none is set. */ - LAYER_ID ExtractLayer(); + LAYER_ID ExtractLayer() const; private: }; -/** - * @return bool if 2 layer masks have a comman layer - * @param aMask1 = a layer mask - * @param aMask2 = an other layer mask - */ -inline bool IsLayerMasksIntersect( LSET aMask1, LSET aMask2 ) -{ - return (aMask1 & aMask2).any(); -} - - /** * Enum PCB_VISIBLE * is a set of visible PCB elements. @@ -618,4 +623,7 @@ inline bool IsNetnameLayer( LAYER_NUM aLayer ) aLayer < NETNAMES_GAL_LAYER( END_NETNAMES_VISIBLE_LIST ); } + +LAYER_ID ToLAYER_ID( int aLayer ); + #endif // LAYERS_ID_AND_VISIBILITY_H_ diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index 86e404330e..8897255f9c 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -83,7 +83,7 @@ BOARD::BOARD() : for( LAYER_NUM layer = 0; layer < LAYER_ID_COUNT; ++layer ) { - m_Layer[layer].m_name = GetStandardLayerName( LAYER_ID( layer ) ); + m_Layer[layer].m_name = GetStandardLayerName( ToLAYER_ID( layer ) ); if( IsCopperLayer( layer ) ) m_Layer[layer].m_type = LT_SIGNAL; diff --git a/pcbnew/class_drawsegment.cpp b/pcbnew/class_drawsegment.cpp index 0d22b34b85..96cb0ff53f 100644 --- a/pcbnew/class_drawsegment.cpp +++ b/pcbnew/class_drawsegment.cpp @@ -173,7 +173,8 @@ void DRAWSEGMENT::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE draw_mode, int l_trace; int mode; int radius; - LAYER_NUM curr_layer = ( (PCB_SCREEN*) panel->GetScreen() )->m_Active_Layer; + + LAYER_ID curr_layer = ( (PCB_SCREEN*) panel->GetScreen() )->m_Active_Layer; EDA_COLOR_T color; BOARD * brd = GetBoard( ); @@ -189,9 +190,8 @@ void DRAWSEGMENT::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE draw_mode, ColorTurnToDarkDarkGray( &color ); } - GRSetDrawMode( DC, draw_mode ); - l_trace = m_Width >> 1; /* half trace width */ + l_trace = m_Width >> 1; // half trace width // Line start point or Circle and Arc center ux0 = m_Start.x + aOffset.x; @@ -247,7 +247,6 @@ void DRAWSEGMENT::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE draw_mode, EXCHG( StAngle, EndAngle ); } - if( mode == LINE ) GRArc( panel->GetClipBox(), DC, ux0, uy0, StAngle, EndAngle, radius, color ); @@ -612,4 +611,3 @@ EDA_ITEM* DRAWSEGMENT::Clone() const { return new DRAWSEGMENT( *this ); } - diff --git a/pcbnew/class_edge_mod.cpp b/pcbnew/class_edge_mod.cpp index 5f14f0e1a7..2d1ba56e57 100644 --- a/pcbnew/class_edge_mod.cpp +++ b/pcbnew/class_edge_mod.cpp @@ -111,18 +111,17 @@ void EDGE_MODULE::SetDrawCoord() void EDGE_MODULE::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE draw_mode, const wxPoint& offset ) { - int ux0, uy0, dx, dy, radius, StAngle, EndAngle; - int type_trace; - int typeaff; - LAYER_NUM curr_layer = ( (PCB_SCREEN*) panel->GetScreen() )->m_Active_Layer; - PCB_BASE_FRAME* frame; + int ux0, uy0, dx, dy, radius, StAngle, EndAngle; + int type_trace; + int typeaff; + LAYER_ID curr_layer = ( (PCB_SCREEN*) panel->GetScreen() )->m_Active_Layer; + MODULE* module = (MODULE*) m_Parent; - if( module == NULL ) + if( !module ) return; - - BOARD * brd = GetBoard( ); + BOARD* brd = GetBoard( ); if( brd->IsLayerVisible( m_Layer ) == false ) return; @@ -135,8 +134,7 @@ void EDGE_MODULE::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE draw_mode, ColorTurnToDarkDarkGray( &color ); } - - frame = (PCB_BASE_FRAME*) panel->GetParent(); + PCB_BASE_FRAME* frame = (PCB_BASE_FRAME*) panel->GetParent(); type_trace = m_Shape; diff --git a/pcbnew/class_pcb_layer_box_selector.cpp b/pcbnew/class_pcb_layer_box_selector.cpp index 7b56b7d27e..7de31f47a8 100644 --- a/pcbnew/class_pcb_layer_box_selector.cpp +++ b/pcbnew/class_pcb_layer_box_selector.cpp @@ -40,26 +40,34 @@ #include +// translate aLayer to its hotkey +static int layer2hotkey_id( LAYER_ID aLayer ) +{ + switch( aLayer ) + { + case F_Cu: return HK_SWITCH_LAYER_TO_COMPONENT; -#define DECLARE_LAYERS_HOTKEY(list) int list[] = \ - { \ - HK_SWITCH_LAYER_TO_COPPER, \ - HK_SWITCH_LAYER_TO_INNER1, \ - HK_SWITCH_LAYER_TO_INNER2, \ - HK_SWITCH_LAYER_TO_INNER3, \ - HK_SWITCH_LAYER_TO_INNER4, \ - HK_SWITCH_LAYER_TO_INNER5, \ - HK_SWITCH_LAYER_TO_INNER6, \ - HK_SWITCH_LAYER_TO_INNER7, \ - HK_SWITCH_LAYER_TO_INNER8, \ - HK_SWITCH_LAYER_TO_INNER9, \ - HK_SWITCH_LAYER_TO_INNER10, \ - HK_SWITCH_LAYER_TO_INNER11, \ - HK_SWITCH_LAYER_TO_INNER12, \ - HK_SWITCH_LAYER_TO_INNER13, \ - HK_SWITCH_LAYER_TO_INNER14, \ - HK_SWITCH_LAYER_TO_COMPONENT \ - }; + case B_Cu: return HK_SWITCH_LAYER_TO_COPPER; + + case In1_Cu: return HK_SWITCH_LAYER_TO_INNER1; + case In2_Cu: return HK_SWITCH_LAYER_TO_INNER2; + case In3_Cu: return HK_SWITCH_LAYER_TO_INNER3; + case In4_Cu: return HK_SWITCH_LAYER_TO_INNER4; + case In5_Cu: return HK_SWITCH_LAYER_TO_INNER5; + case In6_Cu: return HK_SWITCH_LAYER_TO_INNER6; + case In7_Cu: return HK_SWITCH_LAYER_TO_INNER7; + case In8_Cu: return HK_SWITCH_LAYER_TO_INNER8; + case In9_Cu: return HK_SWITCH_LAYER_TO_INNER9; + case In10_Cu: return HK_SWITCH_LAYER_TO_INNER10; + case In11_Cu: return HK_SWITCH_LAYER_TO_INNER11; + case In12_Cu: return HK_SWITCH_LAYER_TO_INNER12; + case In13_Cu: return HK_SWITCH_LAYER_TO_INNER13; + case In14_Cu: return HK_SWITCH_LAYER_TO_INNER14; + + default: + return -1; + } +} // class to display a layer list in a wxBitmapComboBox. @@ -69,14 +77,12 @@ void PCB_LAYER_BOX_SELECTOR::Resync() { Clear(); - static const DECLARE_LAYERS_HOTKEY( layerhk ); - // Tray to fix a minimum width fot the BitmapComboBox - int minwidth = 80, h; + int minwidth = 80; wxClientDC dc( GetParent() ); // The DC for "this" is not always initialized - #define BM_SIZE 14 + const int BM_SIZE = 14; LSET show = getEnabledLayers() & ~m_layerMaskDisable; @@ -90,16 +96,20 @@ void PCB_LAYER_BOX_SELECTOR::Resync() wxString layername = GetLayerName( layerid ); - if( m_layerhotkeys && m_hotkeys && layerid < DIM(layerhk) ) + if( m_layerhotkeys && m_hotkeys ) { - layername = AddHotkeyName( layername, m_hotkeys, - layerhk[layerid], IS_COMMENT ); + int id = layer2hotkey_id( layerid ); + + if( id != -1 ) + layername = AddHotkeyName( layername, m_hotkeys, id, IS_COMMENT ); } Append( layername, layerbmp, (void*)(intptr_t) layerid ); - int w; + int w, h; + dc.GetTextExtent ( layername, &w, &h ); + minwidth = std::max( minwidth, w ); } @@ -115,7 +125,7 @@ bool PCB_LAYER_BOX_SELECTOR::IsLayerEnabled( LAYER_NUM aLayer ) const BOARD* board = m_boardFrame->GetBoard(); wxASSERT( board != NULL ); - return board->IsLayerEnabled( (LAYER_ID) aLayer ); + return board->IsLayerEnabled( ToLAYER_ID( aLayer ) ); } @@ -136,7 +146,7 @@ EDA_COLOR_T PCB_LAYER_BOX_SELECTOR::GetLayerColor( LAYER_NUM aLayer ) const BOARD* board = m_boardFrame->GetBoard(); wxASSERT( board ); - return board->GetLayerColor( (LAYER_ID) aLayer ); + return board->GetLayerColor( ToLAYER_ID( aLayer ) ); } @@ -147,6 +157,6 @@ wxString PCB_LAYER_BOX_SELECTOR::GetLayerName( LAYER_NUM aLayer ) const BOARD* board = m_boardFrame->GetBoard(); wxASSERT( board ); - return board->GetLayerName( (LAYER_ID) aLayer ); + return board->GetLayerName( ToLAYER_ID( aLayer ) ); } diff --git a/pcbnew/class_pcb_layer_box_selector.h b/pcbnew/class_pcb_layer_box_selector.h index 7dbad7000f..07790861a8 100644 --- a/pcbnew/class_pcb_layer_box_selector.h +++ b/pcbnew/class_pcb_layer_box_selector.h @@ -32,7 +32,6 @@ public: LAYER_BOX_SELECTOR( parent, id, pos, size, n, choices ) { m_boardFrame = NULL; - m_layerMaskDisable = 0; } // Accessors diff --git a/pcbnew/class_pcb_layer_widget.cpp b/pcbnew/class_pcb_layer_widget.cpp index 3e70199ae7..4004ca9715 100644 --- a/pcbnew/class_pcb_layer_widget.cpp +++ b/pcbnew/class_pcb_layer_widget.cpp @@ -168,7 +168,7 @@ void PCB_LAYER_WIDGET::onPopupSelection( wxCommandEvent& event ) for( int row = rowCount-1; row>=0; --row ) { wxCheckBox* cb = (wxCheckBox*) getLayerComp( row, 3 ); - LAYER_ID layer = (LAYER_ID) getDecodedId( cb->GetId() ); + LAYER_ID layer = ToLAYER_ID( getDecodedId( cb->GetId() ) ); if( IsCopperLayer( layer ) ) { @@ -181,7 +181,7 @@ void PCB_LAYER_WIDGET::onPopupSelection( wxCommandEvent& event ) for( int row=0; rowGetId() ); + LAYER_ID layer = ToLAYER_ID( getDecodedId( cb->GetId() ) ); if( IsCopperLayer( layer ) ) { @@ -266,7 +266,7 @@ void PCB_LAYER_WIDGET::SyncLayerVisibilities() wxWindow* w = getLayerComp( row, 0 ); - LAYER_ID layerId = (LAYER_ID) getDecodedId( w->GetId() ); + LAYER_ID layerId = ToLAYER_ID( getDecodedId( w->GetId() ) ); // this does not fire a UI event SetLayerVisible( layerId, board->IsLayerVisible( layerId ) ); @@ -351,7 +351,7 @@ void PCB_LAYER_WIDGET::ReFill() void PCB_LAYER_WIDGET::OnLayerColorChange( int aLayer, EDA_COLOR_T aColor ) { - myframe->GetBoard()->SetLayerColor( (LAYER_ID) aLayer, aColor ); + myframe->GetBoard()->SetLayerColor( ToLAYER_ID( aLayer ), aColor ); myframe->ReCreateLayerBox( false ); if( myframe->IsGalCanvasActive() ) @@ -369,7 +369,7 @@ bool PCB_LAYER_WIDGET::OnLayerSelect( int aLayer ) { // the layer change from the PCB_LAYER_WIDGET can be denied by returning // false from this function. - myframe->SetActiveLayer( (LAYER_ID) aLayer, false ); + myframe->SetActiveLayer( ToLAYER_ID( aLayer ), false ); if( m_alwaysShowActiveCopperLayer ) OnLayerSelected(); diff --git a/pcbnew/class_zone.cpp b/pcbnew/class_zone.cpp index 6c2008bf73..104dd19e72 100644 --- a/pcbnew/class_zone.cpp +++ b/pcbnew/class_zone.cpp @@ -140,13 +140,13 @@ const wxPoint& ZONE_CONTAINER::GetPosition() const void ZONE_CONTAINER::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE aDrawMode, const wxPoint& offset ) { - if( DC == NULL ) + if( !DC ) return; - wxPoint seg_start, seg_end; - LAYER_NUM curr_layer = ( (PCB_SCREEN*) panel->GetScreen() )->m_Active_Layer; + wxPoint seg_start, seg_end; + LAYER_ID curr_layer = ( (PCB_SCREEN*) panel->GetScreen() )->m_Active_Layer; + BOARD* brd = GetBoard(); - BOARD* brd = GetBoard(); EDA_COLOR_T color = brd->GetLayerColor( m_Layer ); if( brd->IsLayerVisible( m_Layer ) == false && ( color & HIGHLIGHT_FLAG ) != HIGHLIGHT_FLAG ) @@ -227,8 +227,8 @@ void ZONE_CONTAINER::DrawFilledArea( EDA_DRAW_PANEL* panel, if( m_FilledPolysList.GetCornersCount() == 0 ) // Nothing to draw return; - BOARD* brd = GetBoard(); - LAYER_NUM curr_layer = ( (PCB_SCREEN*) panel->GetScreen() )->m_Active_Layer; + BOARD* brd = GetBoard(); + LAYER_ID curr_layer = ( (PCB_SCREEN*) panel->GetScreen() )->m_Active_Layer; EDA_COLOR_T color = brd->GetLayerColor( m_Layer ); if( brd->IsLayerVisible( m_Layer ) == false && ( color & HIGHLIGHT_FLAG ) != HIGHLIGHT_FLAG ) @@ -366,11 +366,11 @@ void ZONE_CONTAINER::DrawWhileCreateOutline( EDA_DRAW_PANEL* panel, wxDC* DC, bool is_close_segment = false; wxPoint seg_start, seg_end; - if( DC == NULL ) + if( !DC ) return; - LAYER_NUM curr_layer = ( (PCB_SCREEN*) panel->GetScreen() )->m_Active_Layer; - BOARD* brd = GetBoard(); + LAYER_ID curr_layer = ( (PCB_SCREEN*) panel->GetScreen() )->m_Active_Layer; + BOARD* brd = GetBoard(); EDA_COLOR_T color = brd->GetLayerColor( m_Layer ); if( DisplayOpt.ContrastModeDisplay ) diff --git a/pcbnew/dialogs/dialog_copper_zones.cpp b/pcbnew/dialogs/dialog_copper_zones.cpp index eadc3fa26b..a6685e3d6b 100644 --- a/pcbnew/dialogs/dialog_copper_zones.cpp +++ b/pcbnew/dialogs/dialog_copper_zones.cpp @@ -468,7 +468,7 @@ bool DIALOG_COPPER_ZONE::AcceptOptions( bool aPromptForErrors, bool aUseExportab return false; } - m_settings.m_CurrentZone_Layer = (LAYER_ID) m_LayerId[ii]; + m_settings.m_CurrentZone_Layer = ToLAYER_ID( m_LayerId[ii] ); // Get the net name selection for this zone ii = m_ListNetNameSelection->GetSelection(); diff --git a/pcbnew/dialogs/dialog_global_deletion.cpp b/pcbnew/dialogs/dialog_global_deletion.cpp index f3fed257e7..feafe844ca 100644 --- a/pcbnew/dialogs/dialog_global_deletion.cpp +++ b/pcbnew/dialogs/dialog_global_deletion.cpp @@ -69,7 +69,7 @@ void PCB_EDIT_FRAME::InstallPcbGlobalDeleteFrame( const wxPoint& pos ) void DIALOG_GLOBAL_DELETION::SetCurrentLayer( LAYER_NUM aLayer ) { m_currentLayer = aLayer; - m_textCtrlCurrLayer->SetValue( m_Parent->GetBoard()->GetLayerName( LAYER_ID( aLayer ) ) ); + m_textCtrlCurrLayer->SetValue( m_Parent->GetBoard()->GetLayerName( ToLAYER_ID( aLayer ) ) ); } diff --git a/pcbnew/dialogs/dialog_graphic_item_properties.cpp b/pcbnew/dialogs/dialog_graphic_item_properties.cpp index d9cb7818c9..fff88b87af 100644 --- a/pcbnew/dialogs/dialog_graphic_item_properties.cpp +++ b/pcbnew/dialogs/dialog_graphic_item_properties.cpp @@ -232,7 +232,7 @@ void DIALOG_GRAPHIC_ITEM_PROPERTIES::OnOkClick( wxCommandEvent& event ) msg = m_DefaultThicknessCtrl->GetValue(); int thickness = ValueFromString( g_UserUnit, msg ); - m_Item->SetLayer( (LAYER_ID) m_LayerSelectionCtrl->GetLayerSelection() ); + m_Item->SetLayer( ToLAYER_ID( m_LayerSelectionCtrl->GetLayerSelection() ) ); if( m_Item->GetLayer() == Edge_Cuts ) m_brdSettings.m_EdgeSegmentWidth = thickness; diff --git a/pcbnew/dialogs/dialog_graphic_item_properties_for_Modedit.cpp b/pcbnew/dialogs/dialog_graphic_item_properties_for_Modedit.cpp index 25c4328580..02f9c551b1 100644 --- a/pcbnew/dialogs/dialog_graphic_item_properties_for_Modedit.cpp +++ b/pcbnew/dialogs/dialog_graphic_item_properties_for_Modedit.cpp @@ -220,7 +220,7 @@ void DIALOG_MODEDIT_FP_BODY_ITEM_PROPERTIES::OnOkClick( wxCommandEvent& event ) m_brdSettings.m_ModuleSegmentWidth = thickness; m_parent->SetDesignSettings( m_brdSettings ); - m_item->SetLayer( LAYER_ID( layer ) ); + m_item->SetLayer( ToLAYER_ID( layer ) ); if( m_item->GetShape() == S_ARC ) { diff --git a/pcbnew/dialogs/dialog_keepout_area_properties.cpp b/pcbnew/dialogs/dialog_keepout_area_properties.cpp index ac2c8d08db..9c2141b7ff 100644 --- a/pcbnew/dialogs/dialog_keepout_area_properties.cpp +++ b/pcbnew/dialogs/dialog_keepout_area_properties.cpp @@ -222,7 +222,7 @@ bool DIALOG_KEEPOUT_AREA_PROPERTIES::AcceptOptionsForKeepOut() return false; } - m_zonesettings.m_CurrentZone_Layer = (LAYER_ID) m_layerId[ii]; + m_zonesettings.m_CurrentZone_Layer = ToLAYER_ID( m_layerId[ii] ); switch( m_OutlineAppearanceCtrl->GetSelection() ) { case 0: diff --git a/pcbnew/dialogs/dialog_pcb_text_properties.cpp b/pcbnew/dialogs/dialog_pcb_text_properties.cpp index bb0d207555..eca91a1935 100644 --- a/pcbnew/dialogs/dialog_pcb_text_properties.cpp +++ b/pcbnew/dialogs/dialog_pcb_text_properties.cpp @@ -250,7 +250,7 @@ void DIALOG_PCB_TEXT_PROPERTIES::OnOkClick( wxCommandEvent& event ) } // Set the layer on which the PCB text is laying - m_SelectedPCBText->SetLayer( (LAYER_ID) m_LayerSelectionCtrl->GetLayerSelection() ); + m_SelectedPCBText->SetLayer( ToLAYER_ID( m_LayerSelectionCtrl->GetLayerSelection() ) ); // Set whether the PCB text is mirrored (faced down from layer face perspective) m_SelectedPCBText->SetMirrored( m_DisplayCtrl->GetSelection() == 1 ); diff --git a/pcbnew/dimension.cpp b/pcbnew/dimension.cpp index 1058804938..043dc10776 100644 --- a/pcbnew/dimension.cpp +++ b/pcbnew/dimension.cpp @@ -208,7 +208,7 @@ void DIALOG_DIMENSION_EDITOR::OnOKClick( wxCommandEvent& event ) CurrentDimension->Text().SetMirrored( ( m_rbMirror->GetSelection() == 1 ) ? true : false ); - CurrentDimension->SetLayer( (LAYER_ID) m_SelLayerBox->GetLayerSelection() ); + CurrentDimension->SetLayer( ToLAYER_ID( m_SelLayerBox->GetLayerSelection() ) ); #ifndef USE_WX_OVERLAY if( m_DC ) // Display new text { diff --git a/pcbnew/eagle_plugin.cpp b/pcbnew/eagle_plugin.cpp index 1d307e9ede..b79e51b944 100644 --- a/pcbnew/eagle_plugin.cpp +++ b/pcbnew/eagle_plugin.cpp @@ -2708,7 +2708,7 @@ LAYER_ID EAGLE_PLUGIN::kicad_layer( int aEagleLayer ) const } } - return LAYER_ID( kiLayer ); + return ToLAYER_ID( kiLayer ); } diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index 9606618a0f..eb6bb85843 100644 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -523,11 +523,11 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) break; case ID_POPUP_PCB_ZONE_DUPLICATE: - { - ZONE_CONTAINER* zone = (ZONE_CONTAINER*) GetCurItem(); - duplicateZone( &dc, zone ); - } - break; + { + ZONE_CONTAINER* zone = (ZONE_CONTAINER*) GetCurItem(); + duplicateZone( &dc, zone ); + } + break; case ID_POPUP_PCB_ZONE_ADD_SIMILAR_ZONE: m_canvas->MoveCursorToCrossHair(); @@ -559,60 +559,60 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) break; case ID_POPUP_PCB_MOVE_ZONE_CORNER: - { - m_canvas->MoveCursorToCrossHair(); - ZONE_CONTAINER* zone_cont = (ZONE_CONTAINER*) GetCurItem(); - m_canvas->SetAutoPanRequest( true ); - Start_Move_Zone_Corner( &dc, zone_cont, zone_cont->GetSelectedCorner(), false ); + { + m_canvas->MoveCursorToCrossHair(); + ZONE_CONTAINER* zone_cont = (ZONE_CONTAINER*) GetCurItem(); + m_canvas->SetAutoPanRequest( true ); + Start_Move_Zone_Corner( &dc, zone_cont, zone_cont->GetSelectedCorner(), false ); + } break; - } case ID_POPUP_PCB_DRAG_ZONE_OUTLINE_SEGMENT: - { - m_canvas->MoveCursorToCrossHair(); - ZONE_CONTAINER* zone_cont = (ZONE_CONTAINER*) GetCurItem(); - m_canvas->SetAutoPanRequest( true ); - Start_Move_Zone_Drag_Outline_Edge( &dc, zone_cont, zone_cont->GetSelectedCorner() ); + { + m_canvas->MoveCursorToCrossHair(); + ZONE_CONTAINER* zone_cont = (ZONE_CONTAINER*) GetCurItem(); + m_canvas->SetAutoPanRequest( true ); + Start_Move_Zone_Drag_Outline_Edge( &dc, zone_cont, zone_cont->GetSelectedCorner() ); + } break; - } case ID_POPUP_PCB_MOVE_ZONE_OUTLINES: - { - m_canvas->MoveCursorToCrossHair(); - ZONE_CONTAINER* zone_cont = (ZONE_CONTAINER*) GetCurItem(); - m_canvas->SetAutoPanRequest( true ); - Start_Move_Zone_Outlines( &dc, zone_cont ); + { + m_canvas->MoveCursorToCrossHair(); + ZONE_CONTAINER* zone_cont = (ZONE_CONTAINER*) GetCurItem(); + m_canvas->SetAutoPanRequest( true ); + Start_Move_Zone_Outlines( &dc, zone_cont ); + } break; - } case ID_POPUP_PCB_ADD_ZONE_CORNER: - { - m_canvas->MoveCursorToCrossHair(); - ZONE_CONTAINER* zone_cont = (ZONE_CONTAINER*) GetCurItem(); - wxPoint pos = GetCrossHairPosition(); + { + m_canvas->MoveCursorToCrossHair(); + ZONE_CONTAINER* zone_cont = (ZONE_CONTAINER*) GetCurItem(); + wxPoint pos = GetCrossHairPosition(); - /* add corner between zone_cont->m_CornerSelection - * and zone_cont->m_CornerSelection+1 - * and start move the new corner - */ - zone_cont->Draw( m_canvas, &dc, GR_XOR ); - zone_cont->Outline()->InsertCorner( zone_cont->GetSelectedCorner(), pos.x, pos.y ); - zone_cont->SetSelectedCorner( zone_cont->GetSelectedCorner() + 1 ); - zone_cont->Draw( m_canvas, &dc, GR_XOR ); - m_canvas->SetAutoPanRequest( true ); - Start_Move_Zone_Corner( &dc, zone_cont, zone_cont->GetSelectedCorner(), true ); + /* add corner between zone_cont->m_CornerSelection + * and zone_cont->m_CornerSelection+1 + * and start move the new corner + */ + zone_cont->Draw( m_canvas, &dc, GR_XOR ); + zone_cont->Outline()->InsertCorner( zone_cont->GetSelectedCorner(), pos.x, pos.y ); + zone_cont->SetSelectedCorner( zone_cont->GetSelectedCorner() + 1 ); + zone_cont->Draw( m_canvas, &dc, GR_XOR ); + m_canvas->SetAutoPanRequest( true ); + Start_Move_Zone_Corner( &dc, zone_cont, zone_cont->GetSelectedCorner(), true ); + } break; - } case ID_POPUP_PCB_PLACE_ZONE_OUTLINES: case ID_POPUP_PCB_PLACE_ZONE_CORNER: - { - m_canvas->MoveCursorToCrossHair(); - ZONE_CONTAINER* zone_cont = (ZONE_CONTAINER*) GetCurItem(); - End_Move_Zone_Corner_Or_Outlines( &dc, zone_cont ); - m_canvas->SetAutoPanRequest( false ); + { + m_canvas->MoveCursorToCrossHair(); + ZONE_CONTAINER* zone_cont = (ZONE_CONTAINER*) GetCurItem(); + End_Move_Zone_Corner_Or_Outlines( &dc, zone_cont ); + m_canvas->SetAutoPanRequest( false ); + } break; - } case ID_POPUP_PCB_FILL_ALL_ZONES: m_canvas->MoveCursorToCrossHair(); @@ -1007,7 +1007,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) break; case ID_TOOLBARH_PCB_SELECT_LAYER: - SetActiveLayer( (LAYER_ID) m_SelLayerBox->GetLayerSelection() ); + SetActiveLayer( ToLAYER_ID( m_SelLayerBox->GetLayerSelection() ) ); if( DisplayOpt.ContrastModeDisplay ) m_canvas->Refresh( true ); diff --git a/pcbnew/editrack-part2.cpp b/pcbnew/editrack-part2.cpp index a9475c5c78..d690135f22 100644 --- a/pcbnew/editrack-part2.cpp +++ b/pcbnew/editrack-part2.cpp @@ -126,7 +126,7 @@ bool PCB_EDIT_FRAME::Other_Layer_Route( TRACK* aTrack, wxDC* DC ) case VIA_MICROVIA: // from external to the near neighbor inner layer { - LAYER_ID last_inner_layer = (LAYER_ID) ( GetBoard()->GetCopperLayerCount() - 2 ); + LAYER_ID last_inner_layer = ToLAYER_ID( ( GetBoard()->GetCopperLayerCount() - 2 ) ); if( first_layer == B_Cu ) last_layer = last_inner_layer; diff --git a/pcbnew/exporters/gen_drill_report_files.cpp b/pcbnew/exporters/gen_drill_report_files.cpp index 6c5ddb9dc9..7c474553c3 100644 --- a/pcbnew/exporters/gen_drill_report_files.cpp +++ b/pcbnew/exporters/gen_drill_report_files.cpp @@ -321,8 +321,8 @@ bool EXCELLON_WRITER::GenDrillReportFile( const wxString& aFullFileName ) fputs( "Drill report for buried and blind vias :\n\n", m_file ); sprintf( line, "Drill report for holes from layer %s to layer %s :\n", - TO_UTF8( m_pcb->GetLayerName( (LAYER_ID) layer1 ) ), - TO_UTF8( m_pcb->GetLayerName( (LAYER_ID) layer2 ) ) ); + TO_UTF8( m_pcb->GetLayerName( ToLAYER_ID( layer1 ) ) ), + TO_UTF8( m_pcb->GetLayerName( ToLAYER_ID( layer2 ) ) ) ); } fputs( line, m_file ); diff --git a/pcbnew/hotkeys.cpp b/pcbnew/hotkeys.cpp index 6e63856363..bfd91c7bf0 100644 --- a/pcbnew/hotkeys.cpp +++ b/pcbnew/hotkeys.cpp @@ -37,10 +37,12 @@ static EDA_HOTKEY HkMouseLeftClick( wxT( "Mouse Left Click" ), static EDA_HOTKEY HkMouseLeftDClick( wxT( "Mouse Left DClick" ), HK_LEFT_DCLICK, WXK_END, 0 ); -static EDA_HOTKEY HkSwitch2CopperLayer( wxT( "Switch to Copper layer" ), +static EDA_HOTKEY HkSwitch2CopperLayer( wxT( "Switch to Copper (B.Cu) layer" ), HK_SWITCH_LAYER_TO_COPPER, WXK_PAGEDOWN ); -static EDA_HOTKEY HkSwitch2ComponentLayer( wxT( "Switch to Component layer" ), + +static EDA_HOTKEY HkSwitch2ComponentLayer( wxT( "Switch to Component (F.Cu) layer" ), HK_SWITCH_LAYER_TO_COMPONENT, WXK_PAGEUP ); + static EDA_HOTKEY HkSwitch2InnerLayer1( wxT( "Switch to Inner layer 1" ), HK_SWITCH_LAYER_TO_INNER1, WXK_F5 ); static EDA_HOTKEY HkSwitch2InnerLayer2( wxT( "Switch to Inner layer 2" ), diff --git a/pcbnew/hotkeys_board_editor.cpp b/pcbnew/hotkeys_board_editor.cpp index cde7e7820e..15b42f134d 100644 --- a/pcbnew/hotkeys_board_editor.cpp +++ b/pcbnew/hotkeys_board_editor.cpp @@ -248,11 +248,11 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit if( ll == F_Cu ) ll = B_Cu; else if( ll == B_Cu ) - ll = (LAYER_ID) GetBoard()->GetCopperLayerCount() - 2; + ll = ToLAYER_ID( GetBoard()->GetCopperLayerCount() - 2 ); else ll = ll - 1; - SwitchLayer( aDC, (LAYER_ID) ll ); + SwitchLayer( aDC, ToLAYER_ID( ll ) ); break; case HK_SWITCH_LAYER_TO_NEXT: @@ -266,7 +266,7 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit else if( ++ll >= GetBoard()->GetCopperLayerCount() - 1 ) ll = B_Cu; - SwitchLayer( aDC, (LAYER_ID) ll ); + SwitchLayer( aDC, ToLAYER_ID( ll ) ); break; case HK_SWITCH_LAYER_TO_COMPONENT: diff --git a/pcbnew/import_dxf/dxf2brd_items.cpp b/pcbnew/import_dxf/dxf2brd_items.cpp index 0f484fca53..0fe7913fa6 100644 --- a/pcbnew/import_dxf/dxf2brd_items.cpp +++ b/pcbnew/import_dxf/dxf2brd_items.cpp @@ -124,7 +124,7 @@ void DXF2BRD_CONVERTER::addLine( const DRW_Line& data ) { DRAWSEGMENT* segm = new DRAWSEGMENT( m_brd ); - segm->SetLayer( (LAYER_ID) m_brdLayer ); + segm->SetLayer( ToLAYER_ID( m_brdLayer ) ); wxPoint start( mapX( data.basePoint.x ), mapY( data.basePoint.y ) ); @@ -146,7 +146,7 @@ void DXF2BRD_CONVERTER::addCircle( const DRW_Circle& data ) { DRAWSEGMENT* segm = new DRAWSEGMENT( m_brd ); - segm->SetLayer( (LAYER_ID) m_brdLayer ); + segm->SetLayer( ToLAYER_ID( m_brdLayer ) ); segm->SetShape( S_CIRCLE ); wxPoint center( mapX( data.basePoint.x ), mapY( data.basePoint.y ) ); segm->SetCenter( center ); @@ -166,7 +166,7 @@ void DXF2BRD_CONVERTER::addArc( const DRW_Arc& data ) { DRAWSEGMENT* segm = new DRAWSEGMENT( m_brd ); - segm->SetLayer( (LAYER_ID) m_brdLayer ); + segm->SetLayer( ToLAYER_ID( m_brdLayer ) ); segm->SetShape( S_ARC ); // Init arc centre: @@ -203,7 +203,7 @@ void DXF2BRD_CONVERTER::addArc( const DRW_Arc& data ) void DXF2BRD_CONVERTER::addText(const DRW_Text& data) { TEXTE_PCB* pcb_text = new TEXTE_PCB( m_brd ); - pcb_text->SetLayer( (LAYER_ID) m_brdLayer ); + pcb_text->SetLayer( ToLAYER_ID( m_brdLayer ) ); wxPoint refPoint( mapX(data.basePoint.x), mapY(data.basePoint.y) ); wxPoint secPoint( mapX(data.secPoint.x), mapY(data.secPoint.y) ); @@ -331,7 +331,7 @@ void DXF2BRD_CONVERTER::addMText( const DRW_MText& data ) } TEXTE_PCB* pcb_text = new TEXTE_PCB( m_brd ); - pcb_text->SetLayer( (LAYER_ID) m_brdLayer ); + pcb_text->SetLayer( ToLAYER_ID( m_brdLayer ) ); wxPoint textpos( mapX( data.basePoint.x ), mapY( data.basePoint.y ) ); pcb_text->SetTextPosition( textpos ); diff --git a/pcbnew/pcad2kicadpcb_plugin/pcb.cpp b/pcbnew/pcad2kicadpcb_plugin/pcb.cpp index 4cfcbe48e4..75c2ffed0c 100644 --- a/pcbnew/pcad2kicadpcb_plugin/pcb.cpp +++ b/pcbnew/pcad2kicadpcb_plugin/pcb.cpp @@ -517,7 +517,7 @@ void PCB::MapLayer( XNODE* aNode ) #if 0 // was: KiCadLayer = FIRST_COPPER_LAYER + m_layersStackup.GetCount() - 1 - layernum; #else - KiCadLayer = LAYER_ID( layernum ); + KiCadLayer = ToLAYER_ID( layernum ); #endif } diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 7fd27d8807..9592ca3a43 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -967,7 +967,7 @@ void PCB_EDIT_FRAME::syncLayerVisibilities() for( LAYER_NUM i = 0; i < END_PCB_VISIBLE_LIST; ++i ) { - view->SetLayerVisible( ITEM_GAL_LAYER( i ), m_Pcb->IsElementVisible( LAYER_ID( i ) ) ); + view->SetLayerVisible( ITEM_GAL_LAYER( i ), m_Pcb->IsElementVisible( i ) ); } // Enable some layers that are GAL specific diff --git a/pcbnew/plot_brditems_plotter.cpp b/pcbnew/plot_brditems_plotter.cpp index f806648dd1..e1d965dbc4 100644 --- a/pcbnew/plot_brditems_plotter.cpp +++ b/pcbnew/plot_brditems_plotter.cpp @@ -57,7 +57,7 @@ EDA_COLOR_T BRDITEMS_PLOTTER::getColor( LAYER_NUM aLayer ) { - EDA_COLOR_T color = m_board->GetLayerColor( (LAYER_ID) aLayer ); + EDA_COLOR_T color = m_board->GetLayerColor( ToLAYER_ID( aLayer ) ); if (color == WHITE) color = LIGHTGRAY; return color; diff --git a/pcbnew/print_board_functions.cpp b/pcbnew/print_board_functions.cpp index 59ad38945d..b6a0ff904a 100644 --- a/pcbnew/print_board_functions.cpp +++ b/pcbnew/print_board_functions.cpp @@ -145,7 +145,8 @@ void PCB_EDIT_FRAME::PrintPage( wxDC* aDC, } save_opt = DisplayOpt; - LAYER_NUM activeLayer = GetScreen()->m_Active_Layer; + + LAYER_ID activeLayer = GetScreen()->m_Active_Layer; DisplayOpt.ContrastModeDisplay = false; DisplayOpt.DisplayPadFill = true; @@ -333,15 +334,16 @@ void PCB_EDIT_FRAME::PrintPage( wxDC* aDC, m_canvas->SetPrintMirrored( false ); DisplayOpt = save_opt; - GetScreen()->m_Active_Layer = LAYER_ID( activeLayer ); + GetScreen()->m_Active_Layer = activeLayer; m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill; m_DisplayPadFill = DisplayOpt.DisplayPadFill; m_DisplayViaFill = DisplayOpt.DisplayViaFill; m_DisplayPadNum = DisplayOpt.DisplayPadNum; m_DisplayModEdge = DisplayOpt.DisplayModEdge; m_DisplayModText = DisplayOpt.DisplayModText; - GetBoard()->SetElementVisibility(NO_CONNECTS_VISIBLE, nctmp); - GetBoard()->SetElementVisibility(ANCHOR_VISIBLE, anchorsTmp); + + GetBoard()->SetElementVisibility( NO_CONNECTS_VISIBLE, nctmp ); + GetBoard()->SetElementVisibility( ANCHOR_VISIBLE, anchorsTmp ); } diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index 32812e760b..70e3c5d36a 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -744,7 +744,7 @@ void PNS_ROUTER::CommitRouting( PNS_NODE* aNode ) track->SetStart( wxPoint( s.A.x, s.A.y ) ); track->SetEnd( wxPoint( s.B.x, s.B.y ) ); track->SetWidth( seg->Width() ); - track->SetLayer( (LAYER_ID) seg->Layers().Start() ); + track->SetLayer( ToLAYER_ID( seg->Layers().Start() ) ); track->SetNetCode( seg->Net() ); newBI = track; break; diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index fb06dc35a2..e1c7f90ab8 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -538,7 +538,7 @@ void ROUTER_TOOL::performRouting() m_router->SwitchLayer( m_startLayer ); - frame->SetActiveLayer( (LAYER_ID) m_startLayer ); + frame->SetActiveLayer( ToLAYER_ID( m_startLayer ) ); frame->GetGalCanvas()->SetFocus(); if( m_startItem && m_startItem->Net() >= 0 ) @@ -578,7 +578,7 @@ void ROUTER_TOOL::performRouting() else if( evt->IsAction( &ACT_PlaceThroughVia ) ) { m_router->ToggleViaPlacement(); - frame->SetTopLayer( (LAYER_ID) m_router->GetCurrentLayer() ); + frame->SetTopLayer( ToLAYER_ID( m_router->GetCurrentLayer() ) ); m_router->Move( m_endSnapPoint, m_endItem ); } else if( evt->IsAction( &ACT_SwitchPosture ) ) @@ -590,13 +590,13 @@ void ROUTER_TOOL::performRouting() { m_router->SwitchLayer( m_router->NextCopperLayer( true ) ); updateEndItem( *evt ); - frame->SetActiveLayer( (LAYER_ID) m_router->GetCurrentLayer() ); + frame->SetActiveLayer( ToLAYER_ID( m_router->GetCurrentLayer() ) ); m_router->Move( m_endSnapPoint, m_endItem ); } else if( evt->IsAction( &COMMON_ACTIONS::layerPrev ) ) { m_router->SwitchLayer( m_router->NextCopperLayer( false ) ); - frame->SetActiveLayer( (LAYER_ID) m_router->GetCurrentLayer() ); + frame->SetActiveLayer( ToLAYER_ID( m_router->GetCurrentLayer() ) ); m_router->Move( m_endSnapPoint, m_endItem ); } else if( evt->IsAction( &ACT_EndTrack ) ) diff --git a/pcbnew/sel_layer.cpp b/pcbnew/sel_layer.cpp index 8444695289..576806f483 100644 --- a/pcbnew/sel_layer.cpp +++ b/pcbnew/sel_layer.cpp @@ -62,13 +62,13 @@ protected: // Virtual function EDA_COLOR_T GetLayerColor( LAYER_NUM aLayer ) const { - return m_brd->GetLayerColor( LAYER_ID( aLayer ) ); + return m_brd->GetLayerColor( ToLAYER_ID( aLayer ) ); } // Returns the name of the layer id wxString GetLayerName( LAYER_NUM aLayer ) const // overrides LAYER_SELECTOR { - return m_brd->GetLayerName( LAYER_ID( aLayer ) ); + return m_brd->GetLayerName( ToLAYER_ID( aLayer ) ); } }; @@ -233,7 +233,7 @@ LAYER_ID PCB_BASE_FRAME::SelectLayer( LAYER_ID aDefaultLayer, dlg.ShowModal(); - LAYER_ID layer = (LAYER_ID) dlg.GetLayerSelection(); + LAYER_ID layer = ToLAYER_ID( dlg.GetLayerSelection() ); return layer; } diff --git a/pcbnew/specctra.cpp b/pcbnew/specctra.cpp index 4f521ee2a9..b2ecc0ab7f 100644 --- a/pcbnew/specctra.cpp +++ b/pcbnew/specctra.cpp @@ -93,7 +93,7 @@ void SPECCTRA_DB::buildLayerMaps( BOARD* aBoard ) kicadLayer2pcb[kilayer] = pcbNdx; // save the specctra layer name in SPECCTRA_DB::layerIds for later. - layerIds.push_back( TO_UTF8( aBoard->GetLayerName( LAYER_ID( kilayer ) ) ) ); + layerIds.push_back( TO_UTF8( aBoard->GetLayerName( ToLAYER_ID( kilayer ) ) ) ); } #else @@ -110,15 +110,14 @@ void SPECCTRA_DB::buildLayerMaps( BOARD* aBoard ) for( unsigned i = 0; i < pcbLayer2kicad.size(); ++i ) { if( i < layerCount-1 ) - pcbLayer2kicad[i] = LAYER_ID( i ); + pcbLayer2kicad[i] = ToLAYER_ID( i ); else pcbLayer2kicad[i] = B_Cu; // save the specctra layer name in SPECCTRA_DB::layerIds for later. - layerIds.push_back( TO_UTF8( aBoard->GetLayerName( LAYER_ID( i ) ) ) ); + layerIds.push_back( TO_UTF8( aBoard->GetLayerName( ToLAYER_ID( i ) ) ) ); } - #endif } diff --git a/pcbnew/swap_layers.cpp b/pcbnew/swap_layers.cpp index 32f00e817d..8073245dc9 100644 --- a/pcbnew/swap_layers.cpp +++ b/pcbnew/swap_layers.cpp @@ -171,7 +171,7 @@ SWAP_LAYERS_DIALOG::SWAP_LAYERS_DIALOG( PCB_BASE_FRAME* parent, LAYER_ID* aArray /* Provide a text string to identify this layer (with trailing spaces * within that string being purged). */ - label = new wxStaticText( this, wxID_STATIC, board->GetLayerName( LAYER_ID( layer ) ), + label = new wxStaticText( this, wxID_STATIC, board->GetLayerName( ToLAYER_ID( layer ) ), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT ); @@ -212,7 +212,7 @@ SWAP_LAYERS_DIALOG::SWAP_LAYERS_DIALOG( PCB_BASE_FRAME* parent, LAYER_ID* aArray for( unsigned jj = 1; jj < DIM( layer_list ); ++jj ) { - text->SetLabel( board->GetLayerName( LAYER_ID( jj ) ) ); + text->SetLabel( board->GetLayerName( ToLAYER_ID( jj ) ) ); if( goodSize.x < text->GetSize().x ) goodSize.x = text->GetSize().x; @@ -292,7 +292,7 @@ void SWAP_LAYERS_DIALOG::Sel_Layer( wxCommandEvent& event ) LSET notallowed_mask = IsCopperLayer( ii ) ? LSET::AllNonCuMask() : LSET::AllCuMask(); - layer = m_Parent->SelectLayer( layer == NO_CHANGE ? LAYER_ID( ii ): layer, notallowed_mask ); + layer = m_Parent->SelectLayer( layer == NO_CHANGE ? ToLAYER_ID( ii ): layer, notallowed_mask ); if( !IsValidLayer( layer ) ) return; diff --git a/pcbnew/tool_pcb.cpp b/pcbnew/tool_pcb.cpp index 90c2cf6ee8..4a88cb6115 100644 --- a/pcbnew/tool_pcb.cpp +++ b/pcbnew/tool_pcb.cpp @@ -286,6 +286,7 @@ void PCB_EDIT_FRAME::ReCreateHToolbar() m_SelLayerBox = new PCB_LAYER_BOX_SELECTOR( m_mainToolBar, ID_TOOLBARH_PCB_SELECT_LAYER ); m_SelLayerBox->SetBoardFrame( this ); } + ReCreateLayerBox( false ); m_mainToolBar->AddControl( m_SelLayerBox ); diff --git a/pcbnew/tools/pcbnew_control.cpp b/pcbnew/tools/pcbnew_control.cpp index 745c2be7bc..80cf1511d5 100644 --- a/pcbnew/tools/pcbnew_control.cpp +++ b/pcbnew/tools/pcbnew_control.cpp @@ -315,7 +315,7 @@ int PCBNEW_CONTROL::LayerNext( TOOL_EVENT& aEvent ) else ++layer; - editFrame->SwitchLayer( NULL, LAYER_ID( layer ) ); + editFrame->SwitchLayer( NULL, ToLAYER_ID( layer ) ); editFrame->GetGalCanvas()->SetFocus(); setTransitions(); @@ -342,7 +342,7 @@ int PCBNEW_CONTROL::LayerPrev( TOOL_EVENT& aEvent ) --layer; assert( IsCopperLayer( layer ) ); - editFrame->SwitchLayer( NULL, LAYER_ID( layer ) ); + editFrame->SwitchLayer( NULL, ToLAYER_ID( layer ) ); editFrame->GetGalCanvas()->SetFocus(); setTransitions(); From 0a1665d5aaef8c7daffd92fc43a7c79e32598f0f Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Sun, 29 Jun 2014 08:12:30 -0500 Subject: [PATCH 527/741] class_marker IsOnLayer() --- pcbnew/class_marker_pcb.cpp | 2 +- pcbnew/class_marker_pcb.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pcbnew/class_marker_pcb.cpp b/pcbnew/class_marker_pcb.cpp index 9222698696..dd7d4e17a8 100644 --- a/pcbnew/class_marker_pcb.cpp +++ b/pcbnew/class_marker_pcb.cpp @@ -85,7 +85,7 @@ MARKER_PCB::~MARKER_PCB() * param aLayer The layer to test for. * return bool - true if on given layer, else false. */ -bool MARKER_PCB::IsOnLayer( LAYER_NUM aLayer ) const +bool MARKER_PCB::IsOnLayer( LAYER_ID aLayer ) const { return IsCopperLayer( aLayer ); } diff --git a/pcbnew/class_marker_pcb.h b/pcbnew/class_marker_pcb.h index 05e73ef3da..d1e7790323 100644 --- a/pcbnew/class_marker_pcb.h +++ b/pcbnew/class_marker_pcb.h @@ -79,7 +79,7 @@ public: return HitTestMarker( aPosition ); } - bool IsOnLayer( LAYER_NUM aLayer ) const; + bool IsOnLayer( LAYER_ID aLayer ) const; void GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ); From add4d5eb6fa5e575111aeaf42ea4aec6f704589f Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Sun, 29 Jun 2014 13:09:32 -0500 Subject: [PATCH 528/741] re-work the LSET(int,...) constructor --- common/class_layer_box_selector.cpp | 4 +-- common/lset.cpp | 38 +++++++++++++++------ gerbview/class_gbr_layer_box_selector.cpp | 2 +- include/class_layer_box_selector.h | 6 ++-- include/layers_id_colors_and_visibility.h | 36 ++++++++++++++----- include/wxBasePcbFrame.h | 2 +- pcbnew/class_pad.h | 1 - pcbnew/dialogs/dialog_copper_zones.cpp | 3 +- pcbnew/dialogs/dialog_layers_setup.cpp | 14 +++++--- pcbnew/dialogs/dialog_layers_setup_base.cpp | 2 +- pcbnew/dialogs/dialog_layers_setup_base.fbp | 2 +- pcbnew/pcb_parser.cpp | 2 +- pcbnew/pcbnew_config.cpp | 5 ++- pcbnew/pcbplot.h | 1 - 14 files changed, 80 insertions(+), 38 deletions(-) diff --git a/common/class_layer_box_selector.cpp b/common/class_layer_box_selector.cpp index c7ffce1c8b..9bfdd84ac4 100644 --- a/common/class_layer_box_selector.cpp +++ b/common/class_layer_box_selector.cpp @@ -25,7 +25,7 @@ bool LAYER_SELECTOR::SetLayersHotkeys( bool value ) } -void LAYER_SELECTOR::SetBitmapLayer( wxBitmap& aLayerbmp, LAYER_ID aLayer ) +void LAYER_SELECTOR::SetBitmapLayer( wxBitmap& aLayerbmp, LAYER_NUM aLayer ) { wxMemoryDC bmpDC; wxBrush brush; @@ -120,7 +120,7 @@ void LAYER_BOX_SELECTOR::ResyncBitmapOnly() for( LAYER_NUM i = 0; i < elements; ++i ) { wxBitmap layerbmp( 14, 14 ); - SetBitmapLayer( layerbmp, ToLAYER_ID( i ) ); + SetBitmapLayer( layerbmp, i ); } } diff --git a/common/lset.cpp b/common/lset.cpp index 06ca945268..d76dcb1c5f 100644 --- a/common/lset.cpp +++ b/common/lset.cpp @@ -37,24 +37,34 @@ LSET::LSET( const LAYER_ID* aArray, unsigned aCount ) } -LSET::LSET( size_t aIdCount, ... ) +LSET::LSET( unsigned aIdCount, LAYER_ID aFirst, ... ) { - va_list ap; + // The constructor, without the mandatory aFirst argument, could have been confused + // by the compiler with the LSET( LAYER_ID ). With aFirst, that ambiguity is not + // present. Therefore aIdCount must always be >=1. + wxASSERT_MSG( aIdCount > 0, wxT( "aIdCount must be >= 1" ) ); - va_start( ap, aIdCount ); + set( aFirst ); - for( size_t i=0; i BASE_SEQ; * * * for( LSEQ cu_stack = aSet.CuStack(); cu_stack; ++cu_stack ) + * { * layer_id = *cu_stack; + * : + * things to do with layer_id; + * } * * */ @@ -198,13 +202,24 @@ class LSET : public BASE_SET { public: + // The constructor flavors are carefully chosen to prevent LSET( int ) from compiling. + // That excludes "LSET s = 0;" and excludes "LSET s = -1;", etc. + // LSET s = 0; needs to be removed from the code, this accomplishes that. + // Remember LSET( LAYER_ID(0) ) sets bit 0, so "LSET s = 0;" is illegal + // to prevent that surprize. Therefore LSET's constructor suite is significantly + // different than the base class from which it is derived. + + // Other member functions (non-constructor functions) are identical to the base + // class's and therefore are re-used from the base class. + /** * Constructor LSET() * creates an empty (cleared) set. */ LSET() : - BASE_SET() - {} + BASE_SET() // all bits are set to zero in BASE_SET() + { + } LSET( const BASE_SET& aOther ) : BASE_SET( aOther ) @@ -214,12 +229,11 @@ public: /** * Constructor LSET( LAYER_ID ) * takes a LAYER_ID and sets that bit. This makes the following code into - * a bug typically: + * a bug: * * LSET s = 0; * - * since that will call this constructor and set bit zero, probably not what was - * intended. Use + * Instead use: * * * LSET s; @@ -239,12 +253,16 @@ public: LSET( const LAYER_ID* aArray, unsigned aCount ); /** - * Constructor LSET( int, ...) - * takes a variable number of LAYER_IDs in the argument list to construct - * the set. Typically used only in static construction. + * Constructor LSET( unsigned, LAYER_ID, ...) + * takes one or more LAYER_IDs in the argument list to construct + * the set. Typically only used in static construction. + * * @param aIdCount is the number of LAYER_IDs which follow. + * @param aFirst is the first included in @a aIdCount and must always be present, and can + * be followed by any number of additional LAYER_IDs so long as @a aIdCount accurately + * reflects the count. */ - LSET( size_t aIdCount, ... ); + LSET( unsigned aIdCount, LAYER_ID aFirst, ... ); // args chosen to prevent LSET( int ) from compiling /** * Function Name diff --git a/include/wxBasePcbFrame.h b/include/wxBasePcbFrame.h index 908de4f4b4..d95bdfc64c 100644 --- a/include/wxBasePcbFrame.h +++ b/include/wxBasePcbFrame.h @@ -607,7 +607,7 @@ public: * @return the selected layer id */ LAYER_ID SelectLayer( LAYER_ID aDefaultLayer, - LSET aNotAllowedLayersMask = 0, + LSET aNotAllowedLayersMask = LSET(), wxPoint aDlgPosition = wxDefaultPosition ); /* Display a list of two copper layers to choose a pair of copper layers diff --git a/pcbnew/class_pad.h b/pcbnew/class_pad.h index 4b10040241..621c1ad477 100644 --- a/pcbnew/class_pad.h +++ b/pcbnew/class_pad.h @@ -363,7 +363,6 @@ public: int GetSubRatsnest() const { return m_SubRatsnest; } void SetSubRatsnest( int aSubRatsnest ) { m_SubRatsnest = aSubRatsnest; } - void GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ); bool IsOnLayer( LAYER_ID aLayer ) const diff --git a/pcbnew/dialogs/dialog_copper_zones.cpp b/pcbnew/dialogs/dialog_copper_zones.cpp index a6685e3d6b..b39505a713 100644 --- a/pcbnew/dialogs/dialog_copper_zones.cpp +++ b/pcbnew/dialogs/dialog_copper_zones.cpp @@ -268,7 +268,8 @@ void DIALOG_COPPER_ZONE::initDialog() imageList->Add( makeLayerBitmap( layerColor ) ); - int itemIndex = m_LayerSelectionCtrl->InsertItem( 0, msg, layer ); + int itemIndex = m_LayerSelectionCtrl->InsertItem( + m_LayerSelectionCtrl->GetItemCount(), msg, layer ); if( m_settings.m_CurrentZone_Layer == layer ) m_LayerSelectionCtrl->Select( itemIndex ); diff --git a/pcbnew/dialogs/dialog_layers_setup.cpp b/pcbnew/dialogs/dialog_layers_setup.cpp index 5b57412ee5..74f20e6500 100644 --- a/pcbnew/dialogs/dialog_layers_setup.cpp +++ b/pcbnew/dialogs/dialog_layers_setup.cpp @@ -80,6 +80,7 @@ static LSEQ dlg_layers() F_Mask, F_Cu, + In1_Cu, In2_Cu, In3_Cu, In4_Cu, @@ -360,14 +361,19 @@ DIALOG_LAYERS_SETUP::DIALOG_LAYERS_SETUP( wxTopLevelWindow* aParent, BOARD* aBoa void DIALOG_LAYERS_SETUP::showCopperChoice( int copperCount ) { - static const int copperCounts[] = { 2,4,6,8,10,12,14,16 }; + if( copperCount > MAX_CU_LAYERS ) + copperCount = MAX_CU_LAYERS; - for( unsigned i = 0; iSetSelection(i); + int idx = lyrCnt/2 - 1; + m_CopperLayersChoice->SetSelection(idx); break; } } diff --git a/pcbnew/dialogs/dialog_layers_setup_base.cpp b/pcbnew/dialogs/dialog_layers_setup_base.cpp index f0e5978dba..c67da1bc62 100644 --- a/pcbnew/dialogs/dialog_layers_setup_base.cpp +++ b/pcbnew/dialogs/dialog_layers_setup_base.cpp @@ -42,7 +42,7 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID m_staticTextCopperLayers->Wrap( -1 ); bCopperLayersSizer->Add( m_staticTextCopperLayers, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - wxString m_CopperLayersChoiceChoices[] = { _("2"), _("4"), _("6"), _("8"), _("10"), _("12"), _("14"), _("16"), _("18"), _("20"), _("22"), _("24"), _("26"), _("27"), _("28"), _("30"), _("32") }; + wxString m_CopperLayersChoiceChoices[] = { _("2"), _("4"), _("6"), _("8"), _("10"), _("12"), _("14"), _("16"), _("18"), _("20"), _("22"), _("24"), _("26"), _("28"), _("30"), _("32") }; int m_CopperLayersChoiceNChoices = sizeof( m_CopperLayersChoiceChoices ) / sizeof( wxString ); m_CopperLayersChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_CopperLayersChoiceNChoices, m_CopperLayersChoiceChoices, 0 ); m_CopperLayersChoice->SetSelection( 3 ); diff --git a/pcbnew/dialogs/dialog_layers_setup_base.fbp b/pcbnew/dialogs/dialog_layers_setup_base.fbp index 6fc6a4d396..4769253a1d 100644 --- a/pcbnew/dialogs/dialog_layers_setup_base.fbp +++ b/pcbnew/dialogs/dialog_layers_setup_base.fbp @@ -394,7 +394,7 @@ 1 0 - "2" "4" "6" "8" "10" "12" "14" "16" "18" "20" "22" "24" "26" "27" "28" "30" "32" + "2" "4" "6" "8" "10" "12" "14" "16" "18" "20" "22" "24" "26" "28" "30" "32" 1 1 diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index 06fe19edcf..e16280b904 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -67,7 +67,7 @@ void PCB_PARSER::init() std::string untranslated = TO_UTF8( wxString( LSET::Name( LAYER_ID( layer ) ) ) ); m_layerIndices[ untranslated ] = LAYER_ID( layer ); - m_layerMasks[ untranslated ] = LSET( layer ); + m_layerMasks[ untranslated ] = LSET( LAYER_ID( layer ) ); } m_layerMasks[ "*.Cu" ] = LSET::AllCuMask(); diff --git a/pcbnew/pcbnew_config.cpp b/pcbnew/pcbnew_config.cpp index e6c4b9c5e5..8e95ba46a2 100644 --- a/pcbnew/pcbnew_config.cpp +++ b/pcbnew/pcbnew_config.cpp @@ -366,9 +366,12 @@ PARAM_CFG_ARRAY& PCB_EDIT_FRAME::GetConfigurationSettings() &DisplayOpt.DisplayZonesMode, 0, 0, 2 ) ); // layer colors: + wxASSERT( DIM( cds.m_LayersColors ) == LAYER_ID_COUNT ); for( int i = 0; i Date: Sun, 29 Jun 2014 15:33:29 -0500 Subject: [PATCH 529/741] fix LSET() constructors, formatting --- common/lset.cpp | 6 +- include/layers_id_colors_and_visibility.h | 8 +- pcbnew/connect.cpp | 52 ++++-- pcbnew/dialogs/dialog_global_deletion.cpp | 2 +- pcbnew/drc.cpp | 1 + pcbnew/editrack-part2.cpp | 49 +++--- pcbnew/minimun_spanning_tree.cpp | 3 +- pcbnew/pcb_parser.cpp | 196 ++++++++++++---------- pcbnew/pcbnew_config.cpp | 2 +- pcbnew/plot_board_layers.cpp | 2 +- pcbnew/ratsnest.cpp | 42 +++-- 11 files changed, 208 insertions(+), 155 deletions(-) diff --git a/common/lset.cpp b/common/lset.cpp index d76dcb1c5f..3ec3607a92 100644 --- a/common/lset.cpp +++ b/common/lset.cpp @@ -30,14 +30,16 @@ #include -LSET::LSET( const LAYER_ID* aArray, unsigned aCount ) +LSET::LSET( const LAYER_ID* aArray, unsigned aCount ) : + BASE_SET() { for( unsigned i=0; iGetWidth() / 2; static std::vector tracks_candidates; @@ -312,26 +313,28 @@ int CONNECTIONS::SearchConnectedTracks( const TRACK * aTrack ) { #ifndef USE_EXTENDED_SEARCH int idx = searchEntryPointInCandidatesList( position ); - if ( idx >= 0 ) + + if( idx >= 0 ) { // search after: - for ( unsigned ii = idx; ii < m_candidates.size(); ii ++ ) + for( unsigned ii = idx; ii < m_candidates.size(); ii ++ ) { if( m_candidates[ii].GetTrack() == aTrack ) continue; if( m_candidates[ii].GetPoint() != position ) break; - if( m_candidates[ii].GetTrack()->GetLayerSet() & layerMask ) + if( ( m_candidates[ii].GetTrack()->GetLayerSet() & layerMask ).any() ) m_connected.push_back( m_candidates[ii].GetTrack() ); } + // search before: - for ( int ii = idx-1; ii >= 0; ii -- ) + for( int ii = idx-1; ii >= 0; ii -- ) { if( m_candidates[ii].GetTrack() == aTrack ) continue; if( m_candidates[ii].GetPoint() != position ) break; - if( m_candidates[ii].GetTrack()->GetLayerSet() & layerMask ) + if( ( m_candidates[ii].GetTrack()->GetLayerSet() & layerMask ).any() ) m_connected.push_back( m_candidates[ii].GetTrack() ); } } @@ -370,7 +373,8 @@ int CONNECTIONS::SearchConnectedTracks( const TRACK * aTrack ) return count; } -int CONNECTIONS::searchEntryPointInCandidatesList( const wxPoint & aPoint) + +int CONNECTIONS::searchEntryPointInCandidatesList( const wxPoint& aPoint ) { // Search the aPoint coordinates in m_Candidates // m_Candidates is sorted by X then Y values, and a fast binary search is used @@ -379,15 +383,18 @@ int CONNECTIONS::searchEntryPointInCandidatesList( const wxPoint & aPoint) int delta = m_candidates.size(); int idx = 0; // Starting index is the beginning of list + while( delta ) { // Calculate half size of remaining interval to test. // Ensure the computed value is not truncated (too small) - if( (delta & 1) && ( delta > 1 ) ) + if( ( delta & 1 ) && ( delta > 1 ) ) delta++; + delta /= 2; - CONNECTED_POINT & candidate = m_candidates[idx]; + CONNECTED_POINT& candidate = m_candidates[idx]; + if( candidate.GetPoint() == aPoint ) // candidate found { return idx; @@ -607,6 +614,7 @@ void CONNECTIONS::Propagate_SubNets() for( unsigned ii = 0; ii < curr_track->m_TracksConnected.size(); ii++ ) { BOARD_CONNECTED_ITEM* track = curr_track->m_TracksConnected[ii]; + if( curr_track->GetSubNet() ) // The current track is already a cluster member { // The other track is already a cluster member, so we can merge the 2 clusters @@ -616,8 +624,8 @@ void CONNECTIONS::Propagate_SubNets() } else { - /* The other track is not yet attached to a cluster , so we can add this - * other track to the cluster */ + // The other track is not yet attached to a cluster , so we can add this + // other track to the cluster track->SetSubNet( curr_track->GetSubNet() ); } } @@ -631,8 +639,8 @@ void CONNECTIONS::Propagate_SubNets() } else { - /* it is connected to an other segment not in a cluster, so we must - * create a new cluster (only with the 2 track segments) */ + // it is connected to an other segment not in a cluster, so we must + // create a new cluster (only with the 2 track segments) sub_netcode++; curr_track->SetSubNet( sub_netcode ); track->SetSubNet( curr_track->GetSubNet() ); @@ -648,10 +656,12 @@ void CONNECTIONS::Propagate_SubNets() // sub_netcodes to intersecting pads for( unsigned ii = 0; ii < m_sortedPads.size(); ii++ ) { - D_PAD * curr_pad = m_sortedPads[ii]; + D_PAD* curr_pad = m_sortedPads[ii]; + for( unsigned jj = 0; jj < curr_pad->m_PadsConnected.size(); jj++ ) { - D_PAD * pad = curr_pad->m_PadsConnected[jj]; + D_PAD* pad = curr_pad->m_PadsConnected[jj]; + if( curr_pad->GetSubNet() ) // the current pad is already attached to a cluster { if( pad->GetSubNet() > 0 ) @@ -660,8 +670,10 @@ void CONNECTIONS::Propagate_SubNets() // Store the initial subnets, which will be modified by Merge_PadsSubNets int subnet1 = pad->GetSubNet(); int subnet2 = curr_pad->GetSubNet(); + // merge subnets of pads only, even those not connected by tracks Merge_PadsSubNets( subnet1, subnet2 ); + // merge subnets of tracks (and pads, which are already merged) Merge_SubNets( subnet1, subnet2 ); } @@ -716,12 +728,15 @@ void PCB_BASE_FRAME::TestConnections() // note some nets can have no tracks, and pads intersecting // so Build_CurrNet_SubNets_Connections must be called for each net CONNECTIONS connections( m_Pcb ); + int last_net_tested = 0; int current_net_code = 0; + for( TRACK* track = m_Pcb->m_Track; track; ) { // At this point, track is the first track of a given net current_net_code = track->GetNetCode(); + // Get last track of the current net TRACK* lastTrack = track->GetEndNetCode( current_net_code ); @@ -780,6 +795,7 @@ void PCB_BASE_FRAME::TestNetConnection( wxDC* aDC, int aNetCode ) if( m_Pcb->m_Track ) { CONNECTIONS connections( m_Pcb ); + TRACK* firstTrack; TRACK* lastTrack = NULL; firstTrack = m_Pcb->m_Track.GetFirst()->GetStartNetCode( aNetCode ); @@ -887,8 +903,10 @@ void PCB_BASE_FRAME::RecalculateAllTracksNetcode() for( curr_track = m_Pcb->m_Track; curr_track; curr_track = curr_track->Next() ) { int netcode = curr_track->GetNetCode(); + if( netcode == 0 ) - { // try to find a connected item having a netcode + { + // try to find a connected item having a netcode for( unsigned kk = 0; kk < curr_track->m_TracksConnected.size(); kk++ ) { int altnetcode = curr_track->m_TracksConnected[kk]->GetNetCode(); @@ -901,8 +919,10 @@ void PCB_BASE_FRAME::RecalculateAllTracksNetcode() } } } + if( netcode ) // this track has a netcode - { // propagate this netcode to connected tracks having no netcode + { + // propagate this netcode to connected tracks having no netcode for( unsigned kk = 0; kk < curr_track->m_TracksConnected.size(); kk++ ) { int altnetcode = curr_track->m_TracksConnected[kk]->GetNetCode(); diff --git a/pcbnew/dialogs/dialog_global_deletion.cpp b/pcbnew/dialogs/dialog_global_deletion.cpp index feafe844ca..e06f990b29 100644 --- a/pcbnew/dialogs/dialog_global_deletion.cpp +++ b/pcbnew/dialogs/dialog_global_deletion.cpp @@ -114,7 +114,7 @@ void DIALOG_GLOBAL_DELETION::AcceptPcbDelete( ) LSET layers_filter = LSET().set(); if( m_rbLayersOption->GetSelection() != 0 ) // Use current layer only - layers_filter = LSET( m_currentLayer ); + layers_filter = LSET( ToLAYER_ID( m_currentLayer ) ); if( m_DelZones->GetValue() ) { diff --git a/pcbnew/drc.cpp b/pcbnew/drc.cpp index 9f01fb1f13..0860d623d5 100644 --- a/pcbnew/drc.cpp +++ b/pcbnew/drc.cpp @@ -536,6 +536,7 @@ void DRC::testUnconnected() D_PAD* padEnd = rat.m_PadEnd; msg = padStart->GetSelectMenuText() + wxT( " net " ) + padStart->GetNetname(); + DRC_ITEM* uncItem = new DRC_ITEM( DRCE_UNCONNECTED_PADS, msg, padEnd->GetSelectMenuText(), diff --git a/pcbnew/editrack-part2.cpp b/pcbnew/editrack-part2.cpp index d690135f22..7312a741d2 100644 --- a/pcbnew/editrack-part2.cpp +++ b/pcbnew/editrack-part2.cpp @@ -120,34 +120,34 @@ bool PCB_EDIT_FRAME::Other_Layer_Route( TRACK* aTrack, wxDC* DC ) // Adjust the actual via layer pair switch( via->GetViaType() ) { - case VIA_BLIND_BURIED: + case VIA_BLIND_BURIED: + via->SetLayerPair( first_layer, last_layer ); + break; + + case VIA_MICROVIA: // from external to the near neighbor inner layer + { + LAYER_ID last_inner_layer = ToLAYER_ID( ( GetBoard()->GetCopperLayerCount() - 2 ) ); + + if( first_layer == B_Cu ) + last_layer = last_inner_layer; + else if( first_layer == F_Cu ) + last_layer = In1_Cu; + else if( first_layer == last_inner_layer ) + last_layer = B_Cu; + else if( first_layer == In1_Cu ) + last_layer = F_Cu; + + // else error: will be removed later via->SetLayerPair( first_layer, last_layer ); - break; - - case VIA_MICROVIA: // from external to the near neighbor inner layer { - LAYER_ID last_inner_layer = ToLAYER_ID( ( GetBoard()->GetCopperLayerCount() - 2 ) ); - - if( first_layer == B_Cu ) - last_layer = last_inner_layer; - else if( first_layer == F_Cu ) - last_layer = In1_Cu; - else if( first_layer == last_inner_layer ) - last_layer = B_Cu; - else if( first_layer == In1_Cu ) - last_layer = F_Cu; - - // else error: will be removed later - via->SetLayerPair( first_layer, last_layer ); - { - NETINFO_ITEM* net = via->GetNet(); - via->SetWidth( net->GetMicroViaSize() ); - } + NETINFO_ITEM* net = via->GetNet(); + via->SetWidth( net->GetMicroViaSize() ); } - break; + } + break; - default: - break; + default: + break; } if( g_Drc_On && BAD_DRC == m_drc->Drc( via, GetBoard()->m_Track ) ) @@ -311,4 +311,3 @@ void PCB_EDIT_FRAME::Show_1_Ratsnest( EDA_ITEM* item, wxDC* DC ) GetBoard()->m_FullRatsnest[ii].m_Status &= ~CH_VISIBLE; } } - diff --git a/pcbnew/minimun_spanning_tree.cpp b/pcbnew/minimun_spanning_tree.cpp index 8d683f7786..5e608d3ea9 100644 --- a/pcbnew/minimun_spanning_tree.cpp +++ b/pcbnew/minimun_spanning_tree.cpp @@ -121,7 +121,7 @@ void MIN_SPAN_TREE::updateDistances( int target ) void MIN_SPAN_TREE::BuildTree() { - /* Add the first node to the tree */ + // Add the first node to the tree inTree[0] = 1; updateDistances( 0 ); @@ -129,6 +129,7 @@ void MIN_SPAN_TREE::BuildTree() { // Find the node with the smallest distance to the tree int min = -1; + for( int ii = 0; ii < m_Size; ++ii ) { if( !inTree[ii] ) diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index e16280b904..c5d9a36492 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -85,12 +85,25 @@ void PCB_PARSER::init() for( int i=1; i<=14; ++i ) { - char tmp[60]; + std::string key = StrPrintf( "Inner%d", i ); - sprintf( tmp, "Inner%d", i ); - - m_layerMasks[ tmp ] = LSET( In15_Cu - i ); + m_layerMasks[ key ] = LSET( LAYER_ID( In15_Cu - i ) ); } + +#if defined(DEBUG) && 0 + printf( "m_layerMasks:\n" ); + for( LSET_MAP::const_iterator it = m_layerMasks.begin(); it != m_layerMasks.end(); ++it ) + { + printf( " [%s] == 0x%s\n", it->first.c_str(), it->second.FmtHex().c_str() ); + } + + printf( "m_layerIndices:\n" ); + for( LAYER_ID_MAP::const_iterator it = m_layerIndices.begin(); it != m_layerIndices.end(); ++it ) + { + printf( " [%s] == %d\n", it->first.c_str(), it->second ); + } +#endif + } @@ -776,7 +789,7 @@ void PCB_PARSER::parseLayers() throw( IO_ERROR, PARSE_ERROR ) UTF8 name = it->m_name; m_layerIndices[ name ] = LAYER_ID( it->m_number ); - m_layerMasks[ name ] = LSET( it->m_number ); + m_layerMasks[ name ] = LSET( LAYER_ID( it->m_number ) ); } copperLayerCount = cu.size(); @@ -1783,55 +1796,55 @@ MODULE* PCB_PARSER::parseMODULE( wxArrayString* aInitialComments ) throw( IO_ERR break; case T_fp_text: - { - TEXTE_MODULE* text = parseTEXTE_MODULE(); - text->SetParent( module.get() ); - double orientation = text->GetOrientation(); - orientation -= module->GetOrientation(); - text->SetOrientation( orientation ); - text->SetDrawCoord(); - - switch( text->GetType() ) { - case TEXTE_MODULE::TEXT_is_REFERENCE: - module->Reference() = *text; - delete text; - break; + TEXTE_MODULE* text = parseTEXTE_MODULE(); + text->SetParent( module.get() ); + double orientation = text->GetOrientation(); + orientation -= module->GetOrientation(); + text->SetOrientation( orientation ); + text->SetDrawCoord(); - case TEXTE_MODULE::TEXT_is_VALUE: - module->Value() = *text; - delete text; - break; + switch( text->GetType() ) + { + case TEXTE_MODULE::TEXT_is_REFERENCE: + module->Reference() = *text; + delete text; + break; - default: - module->GraphicalItems().PushBack( text ); + case TEXTE_MODULE::TEXT_is_VALUE: + module->Value() = *text; + delete text; + break; + + default: + module->GraphicalItems().PushBack( text ); + } } - break; - } case T_fp_arc: case T_fp_circle: case T_fp_curve: case T_fp_line: case T_fp_poly: - { - EDGE_MODULE* em = parseEDGE_MODULE(); - em->SetParent( module.get() ); - em->SetDrawCoord(); - module->GraphicalItems().PushBack( em ); + { + EDGE_MODULE* em = parseEDGE_MODULE(); + em->SetParent( module.get() ); + em->SetDrawCoord(); + module->GraphicalItems().PushBack( em ); + } break; - } case T_pad: - { - D_PAD* pad = parseD_PAD( module.get() ); - wxPoint pt = pad->GetPos0(); - RotatePoint( &pt, module->GetOrientation() ); - pad->SetPosition( pt + module->GetPosition() ); - module->AddPad( pad ); + { + D_PAD* pad = parseD_PAD( module.get() ); + wxPoint pt = pad->GetPos0(); + + RotatePoint( &pt, module->GetOrientation() ); + pad->SetPosition( pt + module->GetPosition() ); + module->AddPad( pad ); + } break; - } case T_model: module->Add3DModel( parse3DModel() ); @@ -2110,8 +2123,9 @@ D_PAD* PCB_PARSER::parseD_PAD( MODULE* aParent ) throw( IO_ERROR, PARSE_ERROR ) wxCHECK_MSG( CurTok() == T_pad, NULL, wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as D_PAD." ) ); - wxSize sz; + wxSize sz; wxPoint pt; + std::auto_ptr< D_PAD > pad( new D_PAD( aParent ) ); NeedSYMBOLorNUMBER(); @@ -2208,72 +2222,72 @@ D_PAD* PCB_PARSER::parseD_PAD( MODULE* aParent ) throw( IO_ERROR, PARSE_ERROR ) break; case T_rect_delta: - { - wxSize delta; - delta.SetWidth( parseBoardUnits( "rectangle delta width" ) ); - delta.SetHeight( parseBoardUnits( "rectangle delta height" ) ); - pad->SetDelta( delta ); - NeedRIGHT(); + { + wxSize delta; + delta.SetWidth( parseBoardUnits( "rectangle delta width" ) ); + delta.SetHeight( parseBoardUnits( "rectangle delta height" ) ); + pad->SetDelta( delta ); + NeedRIGHT(); + } break; - } case T_drill: - { - bool haveWidth = false; - wxSize drillSize = pad->GetDrillSize(); - - for( token = NextTok(); token != T_RIGHT; token = NextTok() ) { - if( token == T_LEFT ) - token = NextTok(); + bool haveWidth = false; + wxSize drillSize = pad->GetDrillSize(); - switch( token ) + for( token = NextTok(); token != T_RIGHT; token = NextTok() ) { - case T_oval: - pad->SetDrillShape( PAD_DRILL_OBLONG ); - break; + if( token == T_LEFT ) + token = NextTok(); - case T_NUMBER: - { - if( !haveWidth ) + switch( token ) { - drillSize.SetWidth( parseBoardUnits() ); + case T_oval: + pad->SetDrillShape( PAD_DRILL_OBLONG ); + break; - // If height is not defined the width and height are the same. - drillSize.SetHeight( drillSize.GetWidth() ); - haveWidth = true; - } - else - { - drillSize.SetHeight( parseBoardUnits() ); - } + case T_NUMBER: + { + if( !haveWidth ) + { + drillSize.SetWidth( parseBoardUnits() ); - break; + // If height is not defined the width and height are the same. + drillSize.SetHeight( drillSize.GetWidth() ); + haveWidth = true; + } + else + { + drillSize.SetHeight( parseBoardUnits() ); + } + + } + break; + + case T_offset: + pt.x = parseBoardUnits( "drill offset x" ); + pt.y = parseBoardUnits( "drill offset y" ); + pad->SetOffset( pt ); + NeedRIGHT(); + break; + + default: + Expecting( "oval, size, or offset" ); + } } - case T_offset: - pt.x = parseBoardUnits( "drill offset x" ); - pt.y = parseBoardUnits( "drill offset y" ); - pad->SetOffset( pt ); - NeedRIGHT(); - break; + // This fixes a bug caused by setting the default D_PAD drill size to a value + // other than 0 used to fix a bunch of debug assertions even though it is defined + // as a through hole pad. Wouldn't a though hole pad with no drill be a surface + // mount pad (or a conn pad which is a smd pad with no solder paste)? + if( ( pad->GetAttribute() != PAD_SMD ) && ( pad->GetAttribute() != PAD_CONN ) ) + pad->SetDrillSize( drillSize ); + else + pad->SetDrillSize( wxSize( 0, 0 ) ); - default: - Expecting( "oval, size, or offset" ); - } } - - // This fixes a bug caused by setting the default D_PAD drill size to a value - // other than 0 used to fix a bunch of debug assertions even though it is defined - // as a through hole pad. Wouldn't a though hole pad with no drill be a surface - // mount pad (or a conn pad which is a smd pad with no solder paste)? - if( ( pad->GetAttribute() != PAD_SMD ) && ( pad->GetAttribute() != PAD_CONN ) ) - pad->SetDrillSize( drillSize ); - else - pad->SetDrillSize( wxSize( 0, 0 ) ); - break; - } case T_layers: { diff --git a/pcbnew/pcbnew_config.cpp b/pcbnew/pcbnew_config.cpp index 8e95ba46a2..442900f31a 100644 --- a/pcbnew/pcbnew_config.cpp +++ b/pcbnew/pcbnew_config.cpp @@ -370,7 +370,7 @@ PARAM_CFG_ARRAY& PCB_EDIT_FRAME::GetConfigurationSettings() for( int i = 0; i /** - * @brief class MIN_SPAN_TREE_PADS (derived from MIN_SPAN_TREE) specialize - * the basic class to calculate a minimum spanning tree from a list of pads, + * @brief class MIN_SPAN_TREE_PADS (derived from MIN_SPAN_TREE) specializes + * the base class to calculate a minimum spanning tree from a list of pads, * and to add this tree as ratsnest to the main ratsnest list. */ class MIN_SPAN_TREE_PADS: public MIN_SPAN_TREE @@ -52,9 +52,9 @@ public: * Function AddTreeToRatsnest * Adds the current minimum spanning tree as ratsnest items * to the main ratsnest list - * @param aRatsnestList = the main ratsnest list + * @param aRatsnestList = a ratsnest list to add to */ - void AddTreeToRatsnest( std::vector &aRatsnestList ); + void AddTreeToRatsnest( std::vector* aRatsnestList ); /** * Function GetWeight @@ -68,13 +68,15 @@ public: }; -void MIN_SPAN_TREE_PADS::AddTreeToRatsnest( std::vector &aRatsnestList ) +void MIN_SPAN_TREE_PADS::AddTreeToRatsnest( std::vector* aRatsnestList ) { std::vector& padsBuffer = *m_PadsList; + if( padsBuffer.empty() ) return; int netcode = padsBuffer[0]->GetNetCode(); + // Note: to get edges in minimum spanning tree, // the index value 0 is not used: it is just // the entry point of the minimum spanning tree. @@ -83,12 +85,14 @@ void MIN_SPAN_TREE_PADS::AddTreeToRatsnest( std::vector &aRatsnes { // Create the new ratsnest RATSNEST_ITEM net; + net.SetNet( netcode ); net.m_Status = CH_ACTIF | CH_VISIBLE; net.m_Lenght = GetDist(ii); net.m_PadStart = padsBuffer[ii]; net.m_PadEnd = padsBuffer[ GetWhoTo(ii) ]; - aRatsnestList.push_back( net ); + + aRatsnestList->push_back( net ); } } @@ -110,13 +114,13 @@ int MIN_SPAN_TREE_PADS::GetWeight( int aItem1, int aItem2 ) if( pad1 == pad2 ) return 0; + int weight = abs( pad2->GetPosition().x - pad1->GetPosition().x ) + abs( pad2->GetPosition().y - pad1->GetPosition().y ); return weight + 1; } - /* Note about the ratsnest computation: * Building the general ratsnest: * For each net, the ratsnest is the set of lines connecting pads, @@ -230,6 +234,7 @@ void PCB_BASE_FRAME::Build_Board_Ratsnest() // (net_code = 0 -> no connect) noconn = 0; MIN_SPAN_TREE_PADS min_spanning_tree; + for( ; current_net_code < m_Pcb->GetNetCount(); current_net_code++ ) { NETINFO_ITEM* net = m_Pcb->FindNet( current_net_code ); @@ -245,7 +250,7 @@ void PCB_BASE_FRAME::Build_Board_Ratsnest() min_spanning_tree.MSP_Init( &net->m_PadInNetList ); min_spanning_tree.BuildTree(); - min_spanning_tree.AddTreeToRatsnest( m_Pcb->m_FullRatsnest ); + min_spanning_tree.AddTreeToRatsnest( &m_Pcb->m_FullRatsnest ); net->m_RatsnestEndIdx = m_Pcb->GetRatsnestsCount(); } @@ -255,7 +260,7 @@ void PCB_BASE_FRAME::Build_Board_Ratsnest() // Update the ratsnest display option (visible/invisible) flag for( unsigned ii = 0; ii < m_Pcb->GetRatsnestsCount(); ii++ ) { - if( !GetBoard()->IsElementVisible(RATSNEST_VISIBLE) ) // Clear VISIBLE flag + if( !GetBoard()->IsElementVisible( RATSNEST_VISIBLE ) ) // Clear VISIBLE flag m_Pcb->m_FullRatsnest[ii].m_Status &= ~CH_VISIBLE; } } @@ -532,14 +537,13 @@ void PCB_BASE_FRAME::build_ratsnest_module( MODULE* aModule ) */ if( (m_Pcb->m_Status_Pcb & RATSNEST_ITEM_LOCAL_OK) == 0 ) { - /* Compute the "internal" ratsnest, i.e the links between the current - * footprint pads - */ + // Compute the "internal" ratsnest, i.e the links between the current + // footprint pads localPadList.clear(); m_Pcb->m_LocalRatsnest.clear(); // collect active pads of the module: - for( pad_ref = aModule->Pads(); pad_ref != NULL; pad_ref = pad_ref->Next() ) + for( pad_ref = aModule->Pads(); pad_ref; pad_ref = pad_ref->Next() ) { if( pad_ref->GetNetCode() == NETINFO_LIST::UNCONNECTED ) continue; @@ -600,8 +604,9 @@ void PCB_BASE_FRAME::build_ratsnest_module( MODULE* aModule ) */ current_net_code = localPadList[0]->GetNetCode(); - MIN_SPAN_TREE_PADS min_spanning_tree; + MIN_SPAN_TREE_PADS min_spanning_tree; std::vector padsBuffer; // contains pads of only one net + for( unsigned ii = 0; ii < pads_module_count; ii++ ) { // Search the end of pad list relative to the current net @@ -616,16 +621,20 @@ void PCB_BASE_FRAME::build_ratsnest_module( MODULE* aModule ) break; } - for(unsigned kk = ii; kk < jj; kk++ ) + for( unsigned kk = ii; kk < jj; kk++ ) padsBuffer.push_back( localPadList[kk] ); + min_spanning_tree.MSP_Init( &padsBuffer ); min_spanning_tree.BuildTree(); - min_spanning_tree.AddTreeToRatsnest( m_Pcb->m_LocalRatsnest ); + min_spanning_tree.AddTreeToRatsnest( &m_Pcb->m_LocalRatsnest ); padsBuffer.clear(); + ii = jj; + if( ii < localPadList.size() ) current_net_code = localPadList[ii]->GetNetCode(); } + internalRatsCount = m_Pcb->m_LocalRatsnest.size(); // set the flag LOCAL_RATSNEST_ITEM of the ratsnest status: @@ -647,6 +656,7 @@ void PCB_BASE_FRAME::build_ratsnest_module( MODULE* aModule ) * so, for each net, only one rats nest item is created */ RATSNEST_ITEM local_rats; + local_rats.m_Lenght = INT_MAX; local_rats.m_Status = 0; bool addRats = false; From 3aa880dedbc6e86e12faca722ae0318d8847a021 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Sun, 29 Jun 2014 16:50:06 -0500 Subject: [PATCH 530/741] fix pcb_parser for new board, coding standards --- pcbnew/connect.cpp | 25 ++++++++++++--- pcbnew/pcb_parser.cpp | 74 +++++++++++++++++++++++-------------------- 2 files changed, 60 insertions(+), 39 deletions(-) diff --git a/pcbnew/connect.cpp b/pcbnew/connect.cpp index ff9242c619..5b5b06497e 100644 --- a/pcbnew/connect.cpp +++ b/pcbnew/connect.cpp @@ -245,12 +245,13 @@ static bool sortConnectedPointByXthenYCoordinates( const CONNECTED_POINT & aRef, return aRef.GetPoint().x < aTst.GetPoint().x; } -void CONNECTIONS::BuildTracksCandidatesList( TRACK * aBegin, TRACK * aEnd) +void CONNECTIONS::BuildTracksCandidatesList( TRACK* aBegin, TRACK* aEnd) { m_candidates.clear(); m_firstTrack = m_lastTrack = aBegin; unsigned ii = 0; + // Count candidates ( i.e. end points ) for( const TRACK* track = aBegin; track; track = track->Next() ) { @@ -260,14 +261,17 @@ void CONNECTIONS::BuildTracksCandidatesList( TRACK * aBegin, TRACK * aEnd) ii += 2; m_lastTrack = track; + if( track == aEnd ) break; } + // Build candidate list m_candidates.reserve( ii ); for( TRACK* track = aBegin; track; track = track->Next() ) { - CONNECTED_POINT candidate( track, track->GetStart()); + CONNECTED_POINT candidate( track, track->GetStart() ); + m_candidates.push_back( candidate ); if( track->Type() != PCB_VIA_T ) { @@ -285,6 +289,7 @@ void CONNECTIONS::BuildTracksCandidatesList( TRACK * aBegin, TRACK * aEnd) sort( m_candidates.begin(), m_candidates.end(), sortConnectedPointByXthenYCoordinates ); } + /* Populates .m_connected with tracks/vias connected to aTrack * param aTrack = track or via to use as reference * For calculation time reason, an exhaustive search cannot be made @@ -294,7 +299,7 @@ void CONNECTIONS::BuildTracksCandidatesList( TRACK * aBegin, TRACK * aEnd) * because with this constraint we can make a fast search in track list * m_candidates is expected to be populated by the track candidates ends list */ -int CONNECTIONS::SearchConnectedTracks( const TRACK * aTrack ) +int CONNECTIONS::SearchConnectedTracks( const TRACK* aTrack ) { int count = 0; m_connected.clear(); @@ -308,7 +313,9 @@ int CONNECTIONS::SearchConnectedTracks( const TRACK * aTrack ) int dist_max = aTrack->GetWidth() / 2; static std::vector tracks_candidates; #endif + wxPoint position = aTrack->GetStart(); + for( int kk = 0; kk < 2; kk++ ) { #ifndef USE_EXTENDED_SEARCH @@ -321,8 +328,10 @@ int CONNECTIONS::SearchConnectedTracks( const TRACK * aTrack ) { if( m_candidates[ii].GetTrack() == aTrack ) continue; + if( m_candidates[ii].GetPoint() != position ) break; + if( ( m_candidates[ii].GetTrack()->GetLayerSet() & layerMask ).any() ) m_connected.push_back( m_candidates[ii].GetTrack() ); } @@ -332,18 +341,23 @@ int CONNECTIONS::SearchConnectedTracks( const TRACK * aTrack ) { if( m_candidates[ii].GetTrack() == aTrack ) continue; + if( m_candidates[ii].GetPoint() != position ) break; + if( ( m_candidates[ii].GetTrack()->GetLayerSet() & layerMask ).any() ) m_connected.push_back( m_candidates[ii].GetTrack() ); } } #else + tracks_candidates.clear(); + CollectItemsNearTo( tracks_candidates, position, dist_max ); - for ( unsigned ii = 0; ii < tracks_candidates.size(); ii ++ ) + + for( unsigned ii = 0; ii < tracks_candidates.size(); ii++ ) { - TRACK * ctrack = tracks_candidates[ii]->GetTrack(); + TRACK* ctrack = tracks_candidates[ii]->GetTrack(); if( !( ctrack->GetLayerSet() & layerMask ).any() ) continue; @@ -354,6 +368,7 @@ int CONNECTIONS::SearchConnectedTracks( const TRACK * aTrack ) // We have a good candidate: calculate the actual distance // between ends, which should be <= dist max. wxPoint delta = tracks_candidates[ii]->GetPoint() - position; + int dist = KiROUND( EuclideanNorm( delta ) ); if( dist > dist_max ) diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index c5d9a36492..db912bfb7b 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -734,6 +734,7 @@ void PCB_PARSER::parseLayer( LAYER* aLayer ) throw( IO_ERROR, PARSE_ERROR ) } + void PCB_PARSER::parseLayers() throw( IO_ERROR, PARSE_ERROR ) { wxCHECK_RET( CurTok() == T_layers, @@ -752,50 +753,55 @@ void PCB_PARSER::parseLayers() throw( IO_ERROR, PARSE_ERROR ) parseLayer( &layer ); - if( layer.m_type != LT_UNDEFINED ) // it's a copper layer - { - cu.push_back( layer ); + if( layer.m_type == LT_UNDEFINED ) // it's a non-copper layer + break; - //DBG( printf( "cop m_visible:%s\n", cu.back().m_visible ? "true" : "false" );) + cu.push_back( layer ); // it's copper + } + + // All Cu layers are parsed, but not the non-cu layers here. + + // The original *.kicad_pcb file format and the inverted + // Cu stack format both have all the Cu layers first, so use this + // trick to handle either. The layer number in the (layers ..) + // s-expression element are ignored. + if( cu.size() ) + { + // Rework the layer numbers, which changed when the Cu stack + // was flipped. So we instead use position in the list. + cu[cu.size()-1].m_number = B_Cu; + + for( unsigned i=0; i < cu.size()-1; ++i ) + { + cu[i].m_number = i; } - else // all non-copper are fixed names, simply look up LAYER_ID. + + for( std::vector::const_iterator it = cu.begin(); itm_number ); - for( unsigned i=0; i < cu.size()-1; ++i ) - { - cu[i].m_number = i; - } + if( it->m_visible ) + visibleLayers.set( it->m_number ); - for( std::vector::const_iterator it = cu.begin(); itm_number ); + m_board->SetLayer( LAYER_ID( it->m_number ), *it ); - if( it->m_visible ) - visibleLayers.set( it->m_number ); + UTF8 name = it->m_name; - m_board->SetLayer( LAYER_ID( it->m_number ), *it ); + m_layerIndices[ name ] = LAYER_ID( it->m_number ); + m_layerMasks[ name ] = LSET( LAYER_ID( it->m_number ) ); + } - UTF8 name = it->m_name; + copperLayerCount = cu.size(); + } - m_layerIndices[ name ] = LAYER_ID( it->m_number ); - m_layerMasks[ name ] = LSET( LAYER_ID( it->m_number ) ); - } + if( token != T_RIGHT ) + { + // read any non-copper layers + for( token = NextTok(); token != T_RIGHT; token = NextTok() ) + { + LAYER layer; - copperLayerCount = cu.size(); - - cu.clear(); // this marks the list as "one time processed". - } + parseLayer( &layer ); LAYER_ID_MAP::const_iterator it = m_layerIndices.find( UTF8( layer.m_name ) ); From 575f13d887c4747767fb30b32c65501de391f0fb Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Sun, 29 Jun 2014 23:40:16 -0500 Subject: [PATCH 531/741] fix VIA::IsOnLayer() --- pcbnew/class_board.cpp | 14 +-- pcbnew/class_track.cpp | 4 +- pcbnew/connect.cpp | 53 ++++++------ pcbnew/pcb_parser.cpp | 99 +++++++++++----------- pcbnew/ratsnest.cpp | 1 + pcbnew/zones_polygons_test_connections.cpp | 59 ++++++++----- 6 files changed, 121 insertions(+), 109 deletions(-) diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index 8897255f9c..fa5a5325e2 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -1401,26 +1401,28 @@ int BOARD::SetAreasNetCodesFromNetNames() for( int ii = 0; ii < GetAreaCount(); ii++ ) { - if( !GetArea( ii )->IsOnCopperLayer() ) + ZONE_CONTAINER* it = GetArea( ii ); + + if( !it->IsOnCopperLayer() ) { - GetArea( ii )->SetNetCode( NETINFO_LIST::UNCONNECTED ); + it->SetNetCode( NETINFO_LIST::UNCONNECTED ); continue; } - if( GetArea( ii )->GetNetCode() != 0 ) // i.e. if this zone is connected to a net + if( it->GetNetCode() != 0 ) // i.e. if this zone is connected to a net { - const NETINFO_ITEM* net = GetArea( ii )->GetNet(); + const NETINFO_ITEM* net = it->GetNet(); if( net ) { - GetArea( ii )->SetNetCode( net->GetNet() ); + it->SetNetCode( net->GetNet() ); } else { error_count++; // keep Net Name and set m_NetCode to -1 : error flag. - GetArea( ii )->SetNetCode( -1 ); + it->SetNetCode( -1 ); } } } diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index 59693fdc02..4f98cc3eb2 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -377,7 +377,9 @@ bool VIA::IsOnLayer( LAYER_ID layer_number ) const LayerPair( &top_layer, &bottom_layer ); - if( bottom_layer <= layer_number && layer_number <= top_layer ) + wxASSERT( top_layer <= bottom_layer ); + + if( top_layer <= layer_number && layer_number <= bottom_layer ) return true; else return false; diff --git a/pcbnew/connect.cpp b/pcbnew/connect.cpp index 5b5b06497e..fc2a679346 100644 --- a/pcbnew/connect.cpp +++ b/pcbnew/connect.cpp @@ -861,22 +861,19 @@ void PCB_BASE_FRAME::TestNetConnection( wxDC* aDC, int aNetCode ) */ void PCB_BASE_FRAME::RecalculateAllTracksNetcode() { - TRACK* curr_track; - // Build the net info list GetBoard()->BuildListOfNets(); // Reset variables and flags used in computation - curr_track = m_Pcb->m_Track; - for( ; curr_track != NULL; curr_track = curr_track->Next() ) + for( TRACK* t = m_Pcb->m_Track; t; t = t->Next() ) { - curr_track->m_TracksConnected.clear(); - curr_track->m_PadsConnected.clear(); - curr_track->start = NULL; - curr_track->end = NULL; - curr_track->SetState( BUSY | IN_EDIT | BEGIN_ONPAD | END_ONPAD, false ); - curr_track->SetZoneSubNet( 0 ); - curr_track->SetNetCode( NETINFO_LIST::UNCONNECTED ); + t->m_TracksConnected.clear(); + t->m_PadsConnected.clear(); + t->start = NULL; + t->end = NULL; + t->SetState( BUSY | IN_EDIT | BEGIN_ONPAD | END_ONPAD, false ); + t->SetZoneSubNet( 0 ); + t->SetNetCode( NETINFO_LIST::UNCONNECTED ); } // If no pad, reset pointers and netcode, and do nothing else @@ -890,21 +887,19 @@ void PCB_BASE_FRAME::RecalculateAllTracksNetcode() // First pass: build connections between track segments and pads. connections.SearchTracksConnectedToPads(); - /* For tracks connected to at least one pad, - * set the track net code to the pad netcode - */ - curr_track = m_Pcb->m_Track; - for( ; curr_track != NULL; curr_track = curr_track->Next() ) + // For tracks connected to at least one pad, + // set the track net code to the pad netcode + for( TRACK* t = m_Pcb->m_Track; t; t = t->Next() ) { - if( curr_track->m_PadsConnected.size() ) - curr_track->SetNetCode( curr_track->m_PadsConnected[0]->GetNetCode() ); + if( t->m_PadsConnected.size() ) + t->SetNetCode( t->m_PadsConnected[0]->GetNetCode() ); } // Pass 2: build connections between track ends - for( curr_track = m_Pcb->m_Track; curr_track != NULL; curr_track = curr_track->Next() ) + for( TRACK* t = m_Pcb->m_Track; t; t = t->Next() ) { - connections.SearchConnectedTracks( curr_track ); - connections.GetConnectedTracks( curr_track ); + connections.SearchConnectedTracks( t ); + connections.GetConnectedTracks( t ); } // Propagate net codes from a segment to other connected segments @@ -915,21 +910,21 @@ void PCB_BASE_FRAME::RecalculateAllTracksNetcode() { new_pass_request = false; - for( curr_track = m_Pcb->m_Track; curr_track; curr_track = curr_track->Next() ) + for( TRACK* t = m_Pcb->m_Track; t; t = t->Next() ) { - int netcode = curr_track->GetNetCode(); + int netcode = t->GetNetCode(); if( netcode == 0 ) { // try to find a connected item having a netcode - for( unsigned kk = 0; kk < curr_track->m_TracksConnected.size(); kk++ ) + for( unsigned kk = 0; kk < t->m_TracksConnected.size(); kk++ ) { - int altnetcode = curr_track->m_TracksConnected[kk]->GetNetCode(); + int altnetcode = t->m_TracksConnected[kk]->GetNetCode(); if( altnetcode ) { new_pass_request = true; netcode = altnetcode; - curr_track->SetNetCode(netcode); + t->SetNetCode(netcode); break; } } @@ -938,12 +933,12 @@ void PCB_BASE_FRAME::RecalculateAllTracksNetcode() if( netcode ) // this track has a netcode { // propagate this netcode to connected tracks having no netcode - for( unsigned kk = 0; kk < curr_track->m_TracksConnected.size(); kk++ ) + for( unsigned kk = 0; kk < t->m_TracksConnected.size(); kk++ ) { - int altnetcode = curr_track->m_TracksConnected[kk]->GetNetCode(); + int altnetcode = t->m_TracksConnected[kk]->GetNetCode(); if( altnetcode == 0 ) { - curr_track->m_TracksConnected[kk]->SetNetCode(netcode); + t->m_TracksConnected[kk]->SetNetCode(netcode); new_pass_request = true; } } diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index db912bfb7b..9c0f597ada 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -2734,68 +2734,65 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER() throw( IO_ERROR, PARSE_ERROR ) break; case T_polygon: - { - std::vector< wxPoint > corners; - - NeedLEFT(); - token = NextTok(); - - if( token != T_pts ) - Expecting( T_pts ); - - for( token = NextTok(); token != T_RIGHT; token = NextTok() ) { - corners.push_back( parseXY() ); - } - - NeedRIGHT(); - zone->AddPolygon( corners ); - } - - break; - - case T_filled_polygon: - { - // "(filled_polygon (pts" - NeedLEFT(); - token = NextTok(); - - if( token != T_pts ) - Expecting( T_pts ); - - for( token = NextTok(); token != T_RIGHT; token = NextTok() ) - { - pts.Append( CPolyPt( parseXY() ) ); - } - - NeedRIGHT(); - pts.CloseLastContour(); - } - - break; - - case T_fill_segments: - { - std::vector< SEGMENT > segs; - - for( token = NextTok(); token != T_RIGHT; token = NextTok() ) - { - if( token != T_LEFT ) - Expecting( T_LEFT ); + std::vector< wxPoint > corners; + NeedLEFT(); token = NextTok(); if( token != T_pts ) Expecting( T_pts ); - SEGMENT segment( parseXY(), parseXY() ); + for( token = NextTok(); token != T_RIGHT; token = NextTok() ) + { + corners.push_back( parseXY() ); + } + NeedRIGHT(); - segs.push_back( segment ); + zone->AddPolygon( corners ); } + break; - zone->AddFillSegments( segs ); - } + case T_filled_polygon: + { + // "(filled_polygon (pts" + NeedLEFT(); + token = NextTok(); + if( token != T_pts ) + Expecting( T_pts ); + + for( token = NextTok(); token != T_RIGHT; token = NextTok() ) + { + pts.Append( CPolyPt( parseXY() ) ); + } + + NeedRIGHT(); + pts.CloseLastContour(); + } + break; + + case T_fill_segments: + { + std::vector< SEGMENT > segs; + + for( token = NextTok(); token != T_RIGHT; token = NextTok() ) + { + if( token != T_LEFT ) + Expecting( T_LEFT ); + + token = NextTok(); + + if( token != T_pts ) + Expecting( T_pts ); + + SEGMENT segment( parseXY(), parseXY() ); + NeedRIGHT(); + segs.push_back( segment ); + } + + zone->AddFillSegments( segs ); + } break; default: diff --git a/pcbnew/ratsnest.cpp b/pcbnew/ratsnest.cpp index 8d6bd15bca..2deb23d175 100644 --- a/pcbnew/ratsnest.cpp +++ b/pcbnew/ratsnest.cpp @@ -790,6 +790,7 @@ static bool sort_by_distance( const wxPoint& ref, const wxPoint& compare ) return lengthref < lengthcmp; } + static bool sort_by_point( const wxPoint& ref, const wxPoint& compare ) { if( ref.x == compare.x ) diff --git a/pcbnew/zones_polygons_test_connections.cpp b/pcbnew/zones_polygons_test_connections.cpp index b1d69d0455..50127d0dfb 100644 --- a/pcbnew/zones_polygons_test_connections.cpp +++ b/pcbnew/zones_polygons_test_connections.cpp @@ -71,15 +71,15 @@ void BOARD::Test_Connections_To_Copper_Areas( int aNetcode ) // clear .m_ZoneSubnet parameter for pads for( MODULE* module = m_Modules; module; module = module->Next() ) { - for( D_PAD* pad = module->Pads(); pad != NULL; pad = pad->Next() ) - if( (aNetcode < 0) || ( aNetcode == pad->GetNetCode() ) ) + for( D_PAD* pad = module->Pads(); pad; pad = pad->Next() ) + if( aNetcode < 0 || aNetcode == pad->GetNetCode() ) pad->SetZoneSubNet( 0 ); } // clear .m_ZoneSubnet parameter for tracks and vias for( TRACK* track = m_Track; track; track = track->Next() ) { - if( (aNetcode < 0) || ( aNetcode == track->GetNetCode() ) ) + if( aNetcode < 0 || aNetcode == track->GetNetCode() ) track->SetZoneSubNet( 0 ); } @@ -88,40 +88,50 @@ void BOARD::Test_Connections_To_Copper_Areas( int aNetcode ) // Build zones candidates list std::vector zones_candidates; + + zones_candidates.reserve( GetAreaCount() ); + for( int index = 0; index < GetAreaCount(); index++ ) { - ZONE_CONTAINER* curr_zone = GetArea( index ); - if( !curr_zone->IsOnCopperLayer() ) + ZONE_CONTAINER* zone = GetArea( index ); + + if( !zone->IsOnCopperLayer() ) continue; - if( (aNetcode >= 0) && ( aNetcode != curr_zone->GetNetCode() ) ) + + if( aNetcode >= 0 && aNetcode != zone->GetNetCode() ) continue; - if( curr_zone->GetFilledPolysList().GetCornersCount() == 0 ) + + if( zone->GetFilledPolysList().GetCornersCount() == 0 ) continue; - zones_candidates.push_back(curr_zone); + + zones_candidates.push_back( zone ); } + // sort them by netcode then vertices count. // For a given net, examine the smaller zones first slightly speed up calculation // (25% faster) // this is only noticeable with very large boards and depends on board zones topology // This is due to the fact some items are connected by small zones ares, // before examining large zones areas and these items are not tested after a connection is found - sort(zones_candidates.begin(), zones_candidates.end(), sort_areas ); + sort( zones_candidates.begin(), zones_candidates.end(), sort_areas ); int oldnetcode = -1; for( unsigned idx = 0; idx < zones_candidates.size(); idx++ ) { - ZONE_CONTAINER* curr_zone = zones_candidates[idx]; + ZONE_CONTAINER* zone = zones_candidates[idx]; - int netcode = curr_zone->GetNetCode(); + int netcode = zone->GetNetCode(); // Build a list of candidates connected to the net: // At this point, layers are not considered, because areas on different layers can // be connected by a via or a pad. // (because zones are sorted by netcode, there is made only once per net) NETINFO_ITEM* net = FindNet( netcode ); + wxASSERT( net ); if( net == NULL ) continue; + if( oldnetcode != netcode ) { oldnetcode = netcode; @@ -129,38 +139,43 @@ void BOARD::Test_Connections_To_Copper_Areas( int aNetcode ) // Build the list of pads candidates connected to the net: candidates.reserve( net->m_PadInNetList.size() ); + for( unsigned ii = 0; ii < net->m_PadInNetList.size(); ii++ ) candidates.push_back( net->m_PadInNetList[ii] ); // Build the list of track candidates connected to the net: TRACK* track = m_Track.GetFirst()->GetStartNetCode( netcode ); + for( ; track; track = track->Next() ) { if( track->GetNetCode() != netcode ) break; + candidates.push_back( track ); } } // test if a candidate is inside a filled area of this zone unsigned indexstart = 0, indexend; - const CPOLYGONS_LIST& polysList = curr_zone->GetFilledPolysList(); + const CPOLYGONS_LIST& polysList = zone->GetFilledPolysList(); + for( indexend = 0; indexend < polysList.GetCornersCount(); indexend++ ) { // end of a filled sub-area found if( polysList.IsEndContour( indexend ) ) { subnet++; - EDA_RECT bbox = curr_zone->CalculateSubAreaBoundaryBox( indexstart, indexend ); + EDA_RECT bbox = zone->CalculateSubAreaBoundaryBox( indexstart, indexend ); for( unsigned ic = 0; ic < candidates.size(); ic++ ) - { // test if this area is connected to a board item: + { + // test if this area is connected to a board item: BOARD_CONNECTED_ITEM* item = candidates[ic]; if( item->GetZoneSubNet() == subnet ) // Already merged continue; - if( !item->IsOnLayer( curr_zone->GetLayer() ) ) + if( !item->IsOnLayer( zone->GetLayer() ) ) continue; wxPoint pos1, pos2; @@ -236,7 +251,7 @@ void BOARD::Test_Connections_To_Copper_Areas( int aNetcode ) // End test candidates for the current filled area indexstart = indexend + 1; // prepare test next area, starting at indexend+1 // (if exists). End read one area in - // curr_zone->m_FilledPolysList + // zone->m_FilledPolysList } } // End read all segments in zone } // End read all zones candidates @@ -253,15 +268,15 @@ void Merge_SubNets_Connected_By_CopperAreas( BOARD* aPcb ) { for( int index = 0; index < aPcb->GetAreaCount(); index++ ) { - ZONE_CONTAINER* curr_zone = aPcb->GetArea( index ); + ZONE_CONTAINER* zone = aPcb->GetArea( index ); - if ( ! curr_zone->IsOnCopperLayer() ) + if ( ! zone->IsOnCopperLayer() ) continue; - if ( curr_zone->GetNetCode() <= 0 ) + if ( zone->GetNetCode() <= 0 ) continue; - Merge_SubNets_Connected_By_CopperAreas( aPcb, curr_zone->GetNetCode() ); + Merge_SubNets_Connected_By_CopperAreas( aPcb, zone->GetNetCode() ); } } @@ -285,9 +300,9 @@ void Merge_SubNets_Connected_By_CopperAreas( BOARD* aPcb, int aNetcode ) for( int index = 0; index < aPcb->GetAreaCount(); index++ ) { - ZONE_CONTAINER* curr_zone = aPcb->GetArea( index ); + ZONE_CONTAINER* zone = aPcb->GetArea( index ); - if( aNetcode == curr_zone->GetNetCode() ) + if( aNetcode == zone->GetNetCode() ) { found = true; break; From 60140dfbcf63e82f51563907357f6196ed2f797b Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Mon, 30 Jun 2014 01:44:46 -0500 Subject: [PATCH 532/741] merge --- include/gr_basic.h | 2 + pcbnew/dialogs/dialog_SVG_print.cpp | 16 +----- pcbnew/dialogs/dialog_plot.cpp | 2 +- pcbnew/exporters/export_gencad.cpp | 5 ++ pcbnew/exporters/export_vrml.cpp | 4 +- pcbnew/import_dxf/dxf2brd_items.cpp | 8 ++- pcbnew/pcbplot.cpp | 85 ++++++++++++++--------------- 7 files changed, 59 insertions(+), 63 deletions(-) diff --git a/include/gr_basic.h b/include/gr_basic.h index d994548e76..6c4da5ba74 100644 --- a/include/gr_basic.h +++ b/include/gr_basic.h @@ -88,6 +88,8 @@ typedef int wxPenStyle; extern GR_DRAWMODE g_XorMode; +extern EDA_COLOR_T g_DrawBgColor; + typedef enum { diff --git a/pcbnew/dialogs/dialog_SVG_print.cpp b/pcbnew/dialogs/dialog_SVG_print.cpp index d4425c7807..6ba70d8baa 100644 --- a/pcbnew/dialogs/dialog_SVG_print.cpp +++ b/pcbnew/dialogs/dialog_SVG_print.cpp @@ -320,18 +320,6 @@ void DIALOG_SVG_PRINT::ExportSVGFile( bool aOnlyOneFile ) ); } - wxFileName fn(boardFilename); - BuildPlotFileName( &fn, outputDir.GetPath(), suffix, SVGFileExtension ); - - if( m_PrintBoardEdgesCtrl->IsChecked() ) - m_printMaskLayer |= EDGE_LAYER; - - if( CreateSVGFile( fn.GetFullPath() ) ) - msg.Printf( _( "Plot: %s OK\n" ), GetChars( fn.GetFullPath() ) ); - else // Error - msg.Printf( _( "** Unable to create %s **\n" ), GetChars( fn.GetFullPath() ) ); - m_messagesBox->AppendText( msg ); - if( aOnlyOneFile ) break; } @@ -378,9 +366,9 @@ bool DIALOG_SVG_PRINT::CreateSVGFile( const wxString& aFullFileName ) } LOCALE_IO toggle; + SVG_PLOTTER* plotter = (SVG_PLOTTER*) StartPlotBoard( m_board, - &plot_opts, aFullFileName, - wxEmptyString ); + &plot_opts, UNDEFINED_LAYER, aFullFileName, wxEmptyString ); if( plotter ) { diff --git a/pcbnew/dialogs/dialog_plot.cpp b/pcbnew/dialogs/dialog_plot.cpp index c6c70a567a..4cffce5151 100644 --- a/pcbnew/dialogs/dialog_plot.cpp +++ b/pcbnew/dialogs/dialog_plot.cpp @@ -797,7 +797,7 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event ) LOCALE_IO toggle; BOARD* board = m_parent->GetBoard(); - PLOTTER* plotter = StartPlotBoard( board, &m_plotOpts, fn.GetFullPath(), wxEmptyString ); + PLOTTER* plotter = StartPlotBoard( board, &m_plotOpts, layer, fn.GetFullPath(), wxEmptyString ); // Print diags in messages box: wxString msg; diff --git a/pcbnew/exporters/export_gencad.cpp b/pcbnew/exporters/export_gencad.cpp index 4f54a9d587..5d166c5882 100644 --- a/pcbnew/exporters/export_gencad.cpp +++ b/pcbnew/exporters/export_gencad.cpp @@ -255,6 +255,9 @@ static double MapYTo( int aY ) /* Driver function: processing starts here */ void PCB_EDIT_FRAME::ExportToGenCAD( wxCommandEvent& aEvent ) { + +#if 0 // working on this 30-Jun-14, not ready yet, failed the initial testing. + wxFileName fn = GetBoard()->GetFileName(); FILE* file; @@ -344,6 +347,8 @@ void PCB_EDIT_FRAME::ExportToGenCAD( wxCommandEvent& aEvent ) module->SetFlag( 0 ); } } +#endif + } diff --git a/pcbnew/exporters/export_vrml.cpp b/pcbnew/exporters/export_vrml.cpp index 341166c7ad..4a6c71d24b 100644 --- a/pcbnew/exporters/export_vrml.cpp +++ b/pcbnew/exporters/export_vrml.cpp @@ -439,9 +439,9 @@ static void write_layers( MODEL_VRML& aModel, std::ofstream& output_file, BOARD* aModel.plated_holes.Tesselate( NULL, true ); write_triangle_bag( output_file, aModel.GetColor( VRML_COLOR_TIN ), &aModel.plated_holes, false, false, - aModel.GetLayerZ( LAST_COPPER_LAYER ) + aModel.GetLayerZ( F_Cu ) + Millimeter2iu( ART_OFFSET / 2.0 ) * aModel.scale, - aModel.GetLayerZ( FIRST_COPPER_LAYER ) + aModel.GetLayerZ( B_Cu ) - Millimeter2iu( ART_OFFSET / 2.0 ) * aModel.scale, aModel.precision ); diff --git a/pcbnew/import_dxf/dxf2brd_items.cpp b/pcbnew/import_dxf/dxf2brd_items.cpp index 67d3ba1a8c..6cd7e86fc4 100644 --- a/pcbnew/import_dxf/dxf2brd_items.cpp +++ b/pcbnew/import_dxf/dxf2brd_items.cpp @@ -145,6 +145,7 @@ void DXF2BRD_CONVERTER::addPolyline(const DRW_Polyline& data ) // Obviously, the z coordinate is ignored wxPoint startpoint; + for( unsigned ii = 0; ii < data.vertlist.size(); ii++ ) { DRW_Vertex* vertex = data.vertlist[ii]; @@ -157,7 +158,8 @@ void DXF2BRD_CONVERTER::addPolyline(const DRW_Polyline& data ) } DRAWSEGMENT* segm = new DRAWSEGMENT( m_brd ); - segm->SetLayer( m_brdLayer ); + + segm->SetLayer( ToLAYER_ID( m_brdLayer ) ); segm->SetStart( startpoint ); wxPoint endpoint( mapX( vertex->basePoint.x ), mapY( vertex->basePoint.y ) ); segm->SetEnd( endpoint ); @@ -176,6 +178,7 @@ void DXF2BRD_CONVERTER::addLWPolyline(const DRW_LWPolyline& data ) // (obviously contant and is the width of the DRW_LWPolyline. // the variable width of each vertex (when exists) is not used. wxPoint startpoint; + for( unsigned ii = 0; ii < data.vertlist.size(); ii++ ) { DRW_Vertex2D* vertex = data.vertlist[ii]; @@ -188,7 +191,8 @@ void DXF2BRD_CONVERTER::addLWPolyline(const DRW_LWPolyline& data ) } DRAWSEGMENT* segm = new DRAWSEGMENT( m_brd ); - segm->SetLayer( m_brdLayer ); + + segm->SetLayer( ToLAYER_ID( m_brdLayer ) ); segm->SetStart( startpoint ); wxPoint endpoint( mapX( vertex->x ), mapY( vertex->y ) ); segm->SetEnd( endpoint ); diff --git a/pcbnew/pcbplot.cpp b/pcbnew/pcbplot.cpp index 5c97c36ca2..830ffee636 100644 --- a/pcbnew/pcbplot.cpp +++ b/pcbnew/pcbplot.cpp @@ -90,87 +90,83 @@ wxString GetGerberFileFunction( const BOARD *aBoard, LAYER_NUM aLayer ) switch( aLayer ) { - case LAYER_N_BACK: - attrib = wxString::Format( wxT( "Copper,L%d" ), aBoard->GetCopperLayerCount() ); - break; - - case LAYER_N_2: - case LAYER_N_3: - case LAYER_N_4: - case LAYER_N_5: - case LAYER_N_6: - case LAYER_N_7: - case LAYER_N_8: - case LAYER_N_9: - case LAYER_N_10: - case LAYER_N_11: - case LAYER_N_12: - case LAYER_N_13: - case LAYER_N_14: - case LAYER_N_15: - // LAYER_N_2 is the first inner layer counting from the bottom; this - // must be converted to a 1-based number starting from the top - attrib = wxString::Format( wxT( "Copper,L%d" ), - aBoard->GetCopperLayerCount() - ( aLayer - LAYER_N_2 + 1 ) ); - break; - - case LAYER_N_FRONT: - attrib = wxString( wxT( "Copper,L1" ) ); - break; - - case ADHESIVE_N_FRONT: + case F_Adhes: attrib = wxString( wxT( "Glue,Top" ) ); break; - case ADHESIVE_N_BACK: + case B_Adhes: attrib = wxString( wxT( "Glue,Bot" ) ); break; - case SILKSCREEN_N_FRONT: + case F_SilkS: attrib = wxString( wxT( "Legend,Top" ) ); break; - case SILKSCREEN_N_BACK: + case B_SilkS: attrib = wxString( wxT( "Legend,Bot" ) ); break; - case SOLDERMASK_N_FRONT: + case F_Mask: attrib = wxString( wxT( "Soldermask,Top" ) ); break; - case SOLDERMASK_N_BACK: + case B_Mask: attrib = wxString( wxT( "Soldermask,Bot" ) ); break; - case SOLDERPASTE_N_FRONT: + case F_Paste: attrib = wxString( wxT( "Paste,Top" ) ); break; - case SOLDERPASTE_N_BACK: + case B_Paste: attrib = wxString( wxT( "Paste,Bot" ) ); break; - case EDGE_N: + case Edge_Cuts: attrib = wxString( wxT( "Profile" ) ); break; - case DRAW_N: + case Dwgs_User: attrib = wxString( wxT( "Drawing" ) ); break; - case COMMENT_N: + case Cmts_User: attrib = wxString( wxT( "Other,Comment" ) ); break; - case ECO1_N: - case ECO2_N: - attrib = wxString::Format( wxT( "Other,ECO%d" ), aLayer - ECO1_N + 1 ); + case Eco1_User: + case Eco2_User: + attrib = wxString::Format( wxT( "Other,ECO%d" ), aLayer - Eco1_User + 1 ); + break; + + case F_Cu: + attrib = wxString( wxT( "Copper,L1" ) ); + break; + + case B_Cu: + attrib = wxString::Format( wxT( "Copper,L%d" ), aBoard->GetCopperLayerCount() ); + break; + + default: + if( IsCopperLayer( aLayer ) ) + { +#if 0 // was: + // LAYER_N_2 is the first inner layer counting from the bottom; this + // must be converted to a 1-based number starting from the top + attrib = wxString::Format( wxT( "Copper,L%d" ), + aBoard->GetCopperLayerCount() - ( aLayer - LAYER_N_2 + 1 ) ); +#else + attrib = wxString::Format( wxT( "Copper,L%d" ), aLayer ); +#endif + } break; } // Add the signal type of the layer, if relevant - if( FIRST_COPPER_LAYER <= aLayer && aLayer <= LAST_COPPER_LAYER ) { - LAYER_T type = aBoard->GetLayerType( aLayer ); + if( IsCopperLayer( aLayer ) ) + { + LAYER_T type = aBoard->GetLayerType( ToLAYER_ID( aLayer ) ); + switch( type ) { case LT_SIGNAL: @@ -190,6 +186,7 @@ wxString GetGerberFileFunction( const BOARD *aBoard, LAYER_NUM aLayer ) return attrib; } + void BuildPlotFileName( wxFileName* aFilename, const wxString& aOutputDir, const wxString& aSuffix, From b50872edca3f41d914f4250b99e0c78822446d7e Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 30 Jun 2014 12:00:21 +0200 Subject: [PATCH 533/741] Gerber output: Some changes after evaluation of Gerber files by Ucamco (the manager of GERBER format): * default file ext is now .gbr (the "official extension") * some outdated commands remoded. * mainly use mm and 4.5 format instead of inches and 3.4 format. this is mandatory, because the 3.4 format (comming from old pcbned internal units) creates truncations in coordinates. (with serious issues in polygons which can appear self-intersecting afer truncation) --- common/class_colors_design_settings.cpp | 17 +++++-- common/common_plotGERBER_functions.cpp | 63 ++++++++++++++++++------- gerbview/files.cpp | 6 ++- include/plot_common.h | 15 +++--- kicad/files-io.cpp | 2 +- kicad/tree_project_frame.cpp | 2 +- pcbnew/class_board.h | 6 ++- 7 files changed, 79 insertions(+), 32 deletions(-) diff --git a/common/class_colors_design_settings.cpp b/common/class_colors_design_settings.cpp index 42d8e79a71..19fa76ac4a 100644 --- a/common/class_colors_design_settings.cpp +++ b/common/class_colors_design_settings.cpp @@ -12,14 +12,21 @@ * in Eeschema, Pcbnew and GerbView */ -/* Initial colors values: optimized for Pcbnew, but are also Ok for Eeschema +/* Initial colors values: optimized for Pcbnew 64 layers. + * The table is not actually used by Eeschema. * these values are superseded by config reading */ static const EDA_COLOR_T default_layer_color[] = { - GREEN, BLUE, LIGHTGRAY, BROWN, - RED, MAGENTA, LIGHTGRAY, MAGENTA, - DARKGRAY, BLUE, GREEN, CYAN, - LIGHTRED, LIGHTMAGENTA, YELLOW, RED, + RED, YELLOW, LIGHTMAGENTA, LIGHTRED, + CYAN, GREEN, BLUE, DARKGRAY, + MAGENTA, LIGHTGRAY, MAGENTA, RED, + BROWN, LIGHTGRAY, BLUE, GREEN, + + RED, YELLOW, LIGHTMAGENTA, LIGHTRED, + CYAN, GREEN, BLUE, DARKGRAY, + MAGENTA, LIGHTGRAY, MAGENTA, RED, + BROWN, LIGHTGRAY, BLUE, GREEN, + BLUE, MAGENTA, LIGHTCYAN, RED, MAGENTA, CYAN, diff --git a/common/common_plotGERBER_functions.cpp b/common/common_plotGERBER_functions.cpp index 99e47c27bf..6937351149 100644 --- a/common/common_plotGERBER_functions.cpp +++ b/common/common_plotGERBER_functions.cpp @@ -23,10 +23,23 @@ void GERBER_PLOTTER::SetViewport( const wxPoint& aOffset, double aIusPerDecimil, wxASSERT( aMirror == false ); m_plotMirror = false; plotOffset = aOffset; - wxASSERT( aScale == 1 ); - plotScale = 1; + wxASSERT( aScale == 1 ); // aScale parameter is not used in Gerber + plotScale = 1; // Plot scale is *always* 1.0 + + m_gerberUnitInch = false; // Currently fixed, but could be an option + + // number of digits after the point (number of digits of the mantissa + // Be carefull: the coordinates are stored in an integer + // so 6 digits (inches) or 5 digits (mm) is the best value + // to avoid truncations and overflow + m_gerberUnitFmt = m_gerberUnitInch ? 6 : 5; + m_IUsPerDecimil = aIusPerDecimil; - iuPerDeviceUnit = 1.0 / aIusPerDecimil; + iuPerDeviceUnit = pow( 10.0, m_gerberUnitFmt ) / ( aIusPerDecimil * 10000.0 ); + + if( ! m_gerberUnitInch ) + iuPerDeviceUnit *= 25.4; // gerber output in mm + /* We don't handle the filmbox, and it's more useful to keep the * origin at the origin */ paperSize.x = 0; @@ -67,25 +80,38 @@ bool GERBER_PLOTTER::StartPlot() if( outputFile == NULL ) return false; - if( !attribFunction.IsEmpty() ) + if( ! m_attribFunction.IsEmpty() ) { - fputs( "%TF.GerberVersion,J1*%\n", outputFile ); - fprintf( outputFile, "%%TF.FileFunction,%s*%%\n", TO_UTF8( attribFunction ) ); + fprintf( outputFile, "%%TF.FileFunction,%s*%%\n", + TO_UTF8( m_attribFunction ) ); } - /* Set coordinate format to 3.4 absolute, leading zero omitted */ - fputs( "%FSLAX34Y34*%\n", outputFile ); - fputs( "G04 Gerber Fmt 3.4, Leading zero omitted, Abs format*\n", outputFile ); + // Set coordinate format to 3.6 or 4.5 absolute, leading zero omitted + // the number of digits for the integer part of coordintes is needed + // in gerber format, but is not very important when omitting leading zeros + // It is fixed here to 3 (inch) or 4 (mm), but is not actually used + int leadingDigitCount = m_gerberUnitInch ? 3 : 4; + + fprintf( outputFile, "%%FSLAX%d%dY%d%d*%%\n", + leadingDigitCount, m_gerberUnitFmt, + leadingDigitCount, m_gerberUnitFmt ); + fprintf( outputFile, + "G04 Gerber Fmt %d.%d, Leading zero omitted, Abs format (unit %s)*\n", + leadingDigitCount, m_gerberUnitFmt, + m_gerberUnitInch ? "inch" : "mm" ); wxString Title = creator + wxT( " " ) + GetBuildVersion(); fprintf( outputFile, "G04 (created by %s) date %s*\n", TO_UTF8( Title ), TO_UTF8( DateAndTime() ) ); - /* Mass parameter: unit = INCHES */ - fputs( "%MOIN*%\n", outputFile ); + /* Mass parameter: unit = INCHES/MM */ + if( m_gerberUnitInch ) + fputs( "%MOIN*%\n", outputFile ); + else + fputs( "%MOMM*%\n", outputFile ); - /* Specify linear interpol (G01), unit = INCH (G70), abs format (G90) */ - fputs( "G01*\nG70*\nG90*\n", outputFile ); + /* Specify linear interpol (G01) */ + fputs( "G01*\n", outputFile ); fputs( "G04 APERTURE LIST*\n", outputFile ); /* Select the default aperture */ SetCurrentLineWidth( -1 ); @@ -191,7 +217,7 @@ void GERBER_PLOTTER::selectAperture( const wxSize& size, { // Pick an existing aperture or create a new one currentAperture = getAperture( size, type ); - fprintf( outputFile, "G54D%d*\n", currentAperture->DCode ); + fprintf( outputFile, "D%d*\n", currentAperture->DCode ); } } @@ -208,8 +234,13 @@ void GERBER_PLOTTER::writeApertureList() for( std::vector::iterator tool = apertures.begin(); tool != apertures.end(); tool++ ) { - const double fscale = 0.0001f * plotScale - * iuPerDeviceUnit ; + // apertude sizes are in inch or mm, regardless the + // coordinates format + double fscale = 0.0001 * plotScale / m_IUsPerDecimil; // inches + + if(! m_gerberUnitInch ) + fscale *= 25.4; // size in mm + char* text = cbuf + sprintf( cbuf, "%%ADD%d", tool->DCode ); /* Please note: the Gerber specs for mass parameters say that diff --git a/gerbview/files.cpp b/gerbview/files.cpp index 5b016e87a9..7daa9d9b80 100644 --- a/gerbview/files.cpp +++ b/gerbview/files.cpp @@ -109,15 +109,17 @@ bool GERBVIEW_FRAME::LoadGerberFiles( const wxString& aFullFileName ) { /* Standard gerber filetypes * (See http://en.wikipedia.org/wiki/Gerber_File) - * the .pho extension is the default used in Pcbnew + * the .gbr (.pho in legacy files) extension is the default used in Pcbnew * However there are a lot of other extensions used for gerber files * Because the first letter is usually g, we accept g* as extension * (Mainly internal copper layers do not have specific extention, * and filenames are like *.g1, *.g2 *.gb1 ...). + * Now (2014) Ucamco (the company which manager the Gerber format) encourage + * use of .gbr only and the Gerber X2 file format. */ filetypes = _( "Gerber files (.g* .lgr .pho)" ); filetypes << wxT("|"); - filetypes += wxT("*.g*;*.G*;*.lgr;*.LGR;*.pho;*.PHO" ); + filetypes += wxT("*.g*;*.G*;*.pho;*.PHO" ); filetypes << wxT("|"); /* Special gerber filetypes */ diff --git a/include/plot_common.h b/include/plot_common.h index 1a259fa378..f7732db7cf 100644 --- a/include/plot_common.h +++ b/include/plot_common.h @@ -314,13 +314,13 @@ protected: /// Plot scale - chosen by the user (even implicitly with 'fit in a4') double plotScale; - /* Device scale (how many IUs in a decimil - always); it's a double + /* Caller scale (how many IUs in a decimil - always); it's a double * because in eeschema there are 0.1 IUs in a decimil (eeschema * always works in mils internally) while pcbnew can work in decimil * or nanometers, so this value would be >= 1 */ double m_IUsPerDecimil; - /// Device scale (from IUs to device units - usually decimils) + /// Device scale (from IUs to plotter device units - usually decimils) double iuPerDeviceUnit; /// Plot offset (in IUs) @@ -774,7 +774,6 @@ public: workFile = 0; finalFile = 0; currentAperture = apertures.end(); - attribFunction = wxEmptyString; } virtual PlotFormat GetPlotterType() const @@ -784,7 +783,7 @@ public: static wxString GetDefaultFileExtension() { - return wxString( wxT( "pho" ) ); + return wxString( wxT( "gbr" ) ); } virtual bool StartPlot(); @@ -821,7 +820,7 @@ public: virtual void SetLayerAttribFunction( const wxString& function ) { - attribFunction = function; + m_attribFunction = function; } protected: @@ -840,7 +839,11 @@ protected: std::vector apertures; std::vector::iterator currentAperture; - wxString attribFunction; /* the layer "function", it is linked with the layer id */ + wxString m_attribFunction; // the layer "function", in GERBER X2 extention + // it is linked with the layer id + bool m_gerberUnitInch; // true if the gerber units are inches, false for mm + int m_gerberUnitFmt; // number of digits in mantissa. + // usually 6 in Inches and 5 or 6 in mm }; diff --git a/kicad/files-io.cpp b/kicad/files-io.cpp index 4943e359f3..f0eed253e2 100644 --- a/kicad/files-io.cpp +++ b/kicad/files-io.cpp @@ -133,7 +133,7 @@ void KICAD_MANAGER_FRAME::OnArchiveFiles( wxCommandEvent& event ) /* List of file extensions to save. */ static const wxChar* extentionList[] = { wxT( "*.sch" ), wxT( "*.lib" ), wxT( "*.mod" ), wxT( "*.cmp" ), - wxT( "*.brd" ), wxT( "*.kicad_pcb" ), + wxT( "*.brd" ), wxT( "*.kicad_pcb" ), wxT( "*.gbr" ), wxT( "*.net" ), wxT( "*.pro" ), wxT( "*.pho" ), wxT( "*.py" ), wxT( "*.pdf" ), wxT( "*.txt" ), wxT( "*.dcm" ), wxT( "*.kicad_wks" ), NULL diff --git a/kicad/tree_project_frame.cpp b/kicad/tree_project_frame.cpp index 0cc4add54d..e4e6d362af 100644 --- a/kicad/tree_project_frame.cpp +++ b/kicad/tree_project_frame.cpp @@ -69,7 +69,7 @@ static const wxChar* s_allowedExtensionsToList[] = wxT( "^[^$].*\\.kicad_wks$" ), // S format kicad page layout descr files wxT( "^.*\\.net$" ), wxT( "^.*\\.txt$" ), - wxT( "^.*\\.pho$" ), // Gerber file (Kicad extension) + wxT( "^.*\\.pho$" ), // Gerber file (Old Kicad extension) wxT( "^.*\\.gbr$" ), // Gerber file wxT( "^.*\\.gb[alops]$" ), // Gerber back (or bottom) layer file wxT( "^.*\\.gt[alops]$" ), // Gerber front (or top) layer file diff --git a/pcbnew/class_board.h b/pcbnew/class_board.h index 0460e39445..07d2e41b49 100644 --- a/pcbnew/class_board.h +++ b/pcbnew/class_board.h @@ -1220,7 +1220,11 @@ public: * @param aLayerMask A layer or layers to mask the hit test. * @return A pointer to a D_PAD object if found or NULL if not found. */ - D_PAD* GetPad( const wxPoint& aPosition, LSET aLayerMask = LSET().set() ); + D_PAD* GetPad( const wxPoint& aPosition, LSET aLayerMask ); + D_PAD* GetPad( const wxPoint& aPosition ) + { + return GetPad( aPosition, LSET().set() ); + } /** * Function GetPad From 516c386a51edfb93982210543c5d56d1d44a664e Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 30 Jun 2014 14:18:52 +0200 Subject: [PATCH 534/741] Update complex_hierarchy.kicad_pcb file, used in qa tests, which was created by a test version of Pcbnew, and was not currently readable. --- qa/data/complex_hierarchy.kicad_pcb | 2506 ++++++++++++--------------- 1 file changed, 1065 insertions(+), 1441 deletions(-) diff --git a/qa/data/complex_hierarchy.kicad_pcb b/qa/data/complex_hierarchy.kicad_pcb index baa3337eeb..66dbd634bb 100644 --- a/qa/data/complex_hierarchy.kicad_pcb +++ b/qa/data/complex_hierarchy.kicad_pcb @@ -1,9 +1,9 @@ -(kicad_pcb (version 3) (host pcbnew "(2013-01-12 BZR 3902)-testing") +(kicad_pcb (version 4) (host pcbnew "(2014-06-30 BZR 4958)-product") (general (links 112) (no_connects 0) - (area 84.518499 48.069499 193.226266 137.3886) + (area 84.518499 48.069499 192.960172 137.5918) (thickness 1.6002) (drawings 6) (tracks 361) @@ -13,21 +13,24 @@ ) (page A4) - (title_block + (title_block (title Actionneur_piezo) ) (layers - (15 Composant power) - (0 Cuivre signal) - (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) - (28 Contours.Ci user) + (0 Composant power) + (31 Cuivre signal) + (34 B.Paste user) + (35 F.Paste user) + (36 B.SilkS user) + (37 F.SilkS user) + (38 B.Mask user) + (39 F.Mask user) + (40 Dwgs.User user) + (41 Cmts.User user) + (42 Eco1.User user) + (43 Eco2.User user) + (44 Edge.Cuts user) ) (setup @@ -56,12 +59,13 @@ (pad_drill 0.8128) (pad_to_mask_clearance 0.254) (aux_axis_origin 0 0) - (visible_elements FFFFFFBF) + (visible_elements 7FFFFFFF) (pcbplotparams - (layerselection 3178497) - (usegerberextensions true) + (layerselection 0x000f0_80000001) + (usegerberextensions false) + (usegerberextensions false) (excludeedgelayer true) - (linewidth 79) + (linewidth 0.150000) (plotframeref false) (viasonmask false) (mode 1) @@ -74,13 +78,12 @@ (psa4output false) (plotreference true) (plotvalue true) - (plotothertext true) (plotinvisibletext false) (padsonsilk false) (subtractmaskfromsilk false) (outputformat 1) (mirror false) - (drillshape 1) + (drillshape 0) (scaleselection 1) (outputdirectory "")) ) @@ -144,7 +147,6 @@ (via_drill 0.635) (uvia_dia 0.508) (uvia_drill 0.2032) - (add_net "") (add_net +12V) (add_net /ampli_h1) (add_net /ampli_h2) @@ -211,25 +213,21 @@ (descr "Bornier d'alimentation 2 pins") (tags DEV) (path /4B3A12F4) - (fp_text reference P1 (at 0 -5.08 270) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text reference P1 (at 0 -5.08 270) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) - (fp_text value CONN_2 (at 0 5.08 270) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) - ) - (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 3.81) (end 5.08 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 -3.81) (end -5.08 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 -3.81) (end -5.08 3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 3.81) (end 5.08 3.81) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at -2.54 0 270) (size 2.54 2.54) (drill 1.524) - (layers *.Cu *.Mask Dessus.SilkS) - (net 13 HT) - ) - (pad 2 thru_hole circle (at 2.54 0 270) (size 2.54 2.54) (drill 1.524) - (layers *.Cu *.Mask Dessus.SilkS) - (net 12 GND) + (fp_text value CONN_2 (at 0 5.08 270) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) + (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 3.81) (end 5.08 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 -3.81) (end -5.08 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 -3.81) (end -5.08 3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 3.81) (end 5.08 3.81) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole rect (at -2.54 0 270) (size 2.54 2.54) (drill 1.524) (layers *.Cu *.Mask F.SilkS) + (net 13 HT)) + (pad 2 thru_hole circle (at 2.54 0 270) (size 2.54 2.54) (drill 1.524) (layers *.Cu *.Mask F.SilkS) + (net 12 GND)) (model device/bornier_2.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -242,25 +240,21 @@ (descr "Bornier d'alimentation 2 pins") (tags DEV) (path /4B3A1333/4B3A136C) - (fp_text reference P3 (at 0 -5.08 90) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text reference P3 (at 0 -5.08 90) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) - (fp_text value CONN_2 (at 0 5.08 90) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) - ) - (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 3.81) (end 5.08 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 -3.81) (end -5.08 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 -3.81) (end -5.08 3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 3.81) (end 5.08 3.81) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at -2.54 0 90) (size 2.54 2.54) (drill 1.524) - (layers *.Cu *.Mask Dessus.SilkS) - (net 6 /ampli_h3) - ) - (pad 2 thru_hole circle (at 2.54 0 90) (size 2.54 2.54) (drill 1.524) - (layers *.Cu *.Mask Dessus.SilkS) - (net 12 GND) + (fp_text value CONN_2 (at 0 5.08 90) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) + (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 3.81) (end 5.08 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 -3.81) (end -5.08 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 -3.81) (end -5.08 3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 3.81) (end 5.08 3.81) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole rect (at -2.54 0 90) (size 2.54 2.54) (drill 1.524) (layers *.Cu *.Mask F.SilkS) + (net 6 /ampli_h3)) + (pad 2 thru_hole circle (at 2.54 0 90) (size 2.54 2.54) (drill 1.524) (layers *.Cu *.Mask F.SilkS) + (net 12 GND)) (model device/bornier_2.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -273,30 +267,26 @@ (descr "Condensateur polarise") (tags CP) (path /4AE173CF) - (fp_text reference C2 (at 0 0 180) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text reference C2 (at 0 0 180) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) - (fp_text value 47uF/20V (at 0.635 0 180) (layer Dessus.SilkS) hide - (effects (font (size 1.524 1.524) (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)) - (pad 1 thru_hole rect (at -7.62 0 180) (size 2.159 2.159) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 1 +12V) - ) - (pad 2 thru_hole circle (at 7.62 0 180) (size 2.159 2.159) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 12 GND) + (fp_text value 47uF/20V (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 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 2.159 2.159) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 1 +12V)) + (pad 2 thru_hole circle (at 7.62 0 180) (size 2.159 2.159) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 12 GND)) (model discret/c_pol.wrl (at (xyz 0 0 0)) (scale (xyz 0.6 0.6 0.6)) @@ -309,30 +299,26 @@ (descr "Condensateur polarise") (tags CP) (path /4B03CEC2) - (fp_text reference C1 (at 0 0 180) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text reference C1 (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_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)) - (pad 1 thru_hole rect (at -7.62 0 180) (size 2.159 2.159) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 50 VCC) - ) - (pad 2 thru_hole circle (at 7.62 0 180) (size 2.159 2.159) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 12 GND) + (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 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 2.159 2.159) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 50 VCC)) + (pad 2 thru_hole circle (at 7.62 0 180) (size 2.159 2.159) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 12 GND)) (model discret/c_pol.wrl (at (xyz 0 0 0)) (scale (xyz 0.6 0.6 0.6)) @@ -345,30 +331,26 @@ (descr "Diode 5 pas") (tags "DIODE DEV") (path /4AE172F4) - (fp_text reference D1 (at 0 0) (layer Dessus.SilkS) + (fp_text reference D1 (at 0 0) (layer F.SilkS) (effects (font (size 1.524 1.016) (thickness 0.254))) ) - (fp_text value 1N4007 (at -0.254 0) (layer Dessus.SilkS) hide + (fp_text value 1N4007 (at -0.254 0) (layer F.SilkS) hide (effects (font (size 1.524 1.016) (thickness 0.254))) ) - (fp_line (start 6.35 0) (end 5.08 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 5.08 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 -1.27) (end -5.08 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 -1.27) (end -5.08 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 0) (end -6.35 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 0) (end -5.08 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 1.27) (end 5.08 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 1.27) (end 5.08 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.81 -1.27) (end 3.81 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.27) (end 4.064 1.27) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -6.35 0) (size 2.032 2.032) (drill 1.143) - (layers *.Cu *.Mask Dessus.SilkS) - (net 3 /12Vext) - ) - (pad 2 thru_hole rect (at 6.35 0) (size 2.032 2.032) (drill 1.143) - (layers *.Cu *.Mask Dessus.SilkS) - (net 1 +12V) - ) + (fp_line (start 6.35 0) (end 5.08 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 5.08 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 -1.27) (end -5.08 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 -1.27) (end -5.08 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 0) (end -6.35 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 0) (end -5.08 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 1.27) (end 5.08 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 1.27) (end 5.08 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.81 -1.27) (end 3.81 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.27) (end 4.064 1.27) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -6.35 0) (size 2.032 2.032) (drill 1.143) (layers *.Cu *.Mask F.SilkS) + (net 3 /12Vext)) + (pad 2 thru_hole rect (at 6.35 0) (size 2.032 2.032) (drill 1.143) (layers *.Cu *.Mask F.SilkS) + (net 1 +12V)) (model discret/diode.wrl (at (xyz 0 0 0)) (scale (xyz 0.5 0.5 0.5)) @@ -381,32 +363,26 @@ (descr "Transistor TO92 brochage type BC237") (tags "TR TO92") (path /4B3A1333/4B3A137C) - (fp_text reference Q3 (at 0.762 0.635 180) (layer Dessus.SilkS) + (fp_text reference Q3 (at 0.762 0.635 180) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value MPAS92 (at 0.254 -3.048 180) (layer Dessus.SilkS) + (fp_text value MPAS92 (at 0.254 -3.048 180) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start -1.27 2.54) (end 2.54 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.27) (end 2.54 -2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -2.54) (end 1.27 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 1.27 -3.81) (end -1.27 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -1.27 -3.81) (end -3.81 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.81 1.27) (end -2.54 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -2.54 2.54) (end -1.27 2.54) (layer Dessus.SilkS) (width 0.3048)) - (pad E thru_hole rect (at -1.27 1.27 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 22 N-000017) - ) - (pad B thru_hole circle (at -1.27 -1.27 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 30 N-000025) - ) - (pad C thru_hole circle (at 1.27 -1.27 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 12 GND) - ) + (fp_line (start -1.27 2.54) (end 2.54 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.27) (end 2.54 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -2.54) (end 1.27 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 1.27 -3.81) (end -1.27 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -1.27 -3.81) (end -3.81 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.81 1.27) (end -2.54 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -2.54 2.54) (end -1.27 2.54) (layer F.SilkS) (width 0.3048)) + (pad E thru_hole rect (at -1.27 1.27 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 22 N-000017)) + (pad B thru_hole circle (at -1.27 -1.27 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 30 N-000025)) + (pad C thru_hole circle (at 1.27 -1.27 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 12 GND)) (model discret/to98.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -419,32 +395,26 @@ (descr "Transistor TO92 brochage type BC237") (tags "TR TO92") (path /4B3A13A4/4B3A1360) - (fp_text reference Q5 (at 0.762 0.635) (layer Dessus.SilkS) + (fp_text reference Q5 (at 0.762 0.635) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value MPAS92 (at 0.254 -3.048) (layer Dessus.SilkS) + (fp_text value MPAS92 (at 0.254 -3.048) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start -1.27 2.54) (end 2.54 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.27) (end 2.54 -2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -2.54) (end 1.27 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 1.27 -3.81) (end -1.27 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -1.27 -3.81) (end -3.81 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.81 1.27) (end -2.54 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -2.54 2.54) (end -1.27 2.54) (layer Dessus.SilkS) (width 0.3048)) - (pad E thru_hole rect (at -1.27 1.27) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 49 N-000048) - ) - (pad B thru_hole circle (at -1.27 -1.27) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 41 N-000040) - ) - (pad C thru_hole circle (at 1.27 -1.27) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 48 N-000047) - ) + (fp_line (start -1.27 2.54) (end 2.54 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.27) (end 2.54 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -2.54) (end 1.27 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 1.27 -3.81) (end -1.27 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -1.27 -3.81) (end -3.81 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.81 1.27) (end -2.54 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -2.54 2.54) (end -1.27 2.54) (layer F.SilkS) (width 0.3048)) + (pad E thru_hole rect (at -1.27 1.27) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 49 N-000048)) + (pad B thru_hole circle (at -1.27 -1.27) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 41 N-000040)) + (pad C thru_hole circle (at 1.27 -1.27) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 48 N-000047)) (model discret/to98.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -457,32 +427,26 @@ (descr "Transistor TO92 brochage type BC237") (tags "TR TO92") (path /4B3A13A4/4B3A137C) - (fp_text reference Q7 (at 0.762 0.635 180) (layer Dessus.SilkS) + (fp_text reference Q7 (at 0.762 0.635 180) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value MPAS92 (at 0.254 -3.048 180) (layer Dessus.SilkS) + (fp_text value MPAS92 (at 0.254 -3.048 180) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start -1.27 2.54) (end 2.54 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.27) (end 2.54 -2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -2.54) (end 1.27 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 1.27 -3.81) (end -1.27 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -1.27 -3.81) (end -3.81 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.81 1.27) (end -2.54 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -2.54 2.54) (end -1.27 2.54) (layer Dessus.SilkS) (width 0.3048)) - (pad E thru_hole rect (at -1.27 1.27 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 39 N-000038) - ) - (pad B thru_hole circle (at -1.27 -1.27 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 47 N-000046) - ) - (pad C thru_hole circle (at 1.27 -1.27 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 12 GND) - ) + (fp_line (start -1.27 2.54) (end 2.54 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.27) (end 2.54 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -2.54) (end 1.27 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 1.27 -3.81) (end -1.27 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -1.27 -3.81) (end -3.81 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.81 1.27) (end -2.54 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -2.54 2.54) (end -1.27 2.54) (layer F.SilkS) (width 0.3048)) + (pad E thru_hole rect (at -1.27 1.27 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 39 N-000038)) + (pad B thru_hole circle (at -1.27 -1.27 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 47 N-000046)) + (pad C thru_hole circle (at 1.27 -1.27 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 12 GND)) (model discret/to98.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -495,32 +459,26 @@ (descr "Transistor TO92 brochage type BC237") (tags "TR TO92") (path /4B3A13A4/4B3A137D) - (fp_text reference Q6 (at 0.762 0.635) (layer Dessus.SilkS) + (fp_text reference Q6 (at 0.762 0.635) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value MPAS42 (at 0.254 -3.048) (layer Dessus.SilkS) + (fp_text value MPAS42 (at 0.254 -3.048) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start -1.27 2.54) (end 2.54 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.27) (end 2.54 -2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -2.54) (end 1.27 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 1.27 -3.81) (end -1.27 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -1.27 -3.81) (end -3.81 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.81 1.27) (end -2.54 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -2.54 2.54) (end -1.27 2.54) (layer Dessus.SilkS) (width 0.3048)) - (pad E thru_hole rect (at -1.27 1.27) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 38 N-000037) - ) - (pad B thru_hole circle (at -1.27 -1.27) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 48 N-000047) - ) - (pad C thru_hole circle (at 1.27 -1.27) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 13 HT) - ) + (fp_line (start -1.27 2.54) (end 2.54 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.27) (end 2.54 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -2.54) (end 1.27 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 1.27 -3.81) (end -1.27 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -1.27 -3.81) (end -3.81 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.81 1.27) (end -2.54 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -2.54 2.54) (end -1.27 2.54) (layer F.SilkS) (width 0.3048)) + (pad E thru_hole rect (at -1.27 1.27) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 38 N-000037)) + (pad B thru_hole circle (at -1.27 -1.27) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 48 N-000047)) + (pad C thru_hole circle (at 1.27 -1.27) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 13 HT)) (model discret/to98.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -533,32 +491,26 @@ (descr "Transistor TO92 brochage type BC237") (tags "TR TO92") (path /4B3A1333/4B3A1360) - (fp_text reference Q1 (at 0.762 0.635) (layer Dessus.SilkS) + (fp_text reference Q1 (at 0.762 0.635) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value MPAS92 (at 0.254 -3.048) (layer Dessus.SilkS) + (fp_text value MPAS92 (at 0.254 -3.048) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start -1.27 2.54) (end 2.54 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.27) (end 2.54 -2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -2.54) (end 1.27 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 1.27 -3.81) (end -1.27 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -1.27 -3.81) (end -3.81 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.81 1.27) (end -2.54 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -2.54 2.54) (end -1.27 2.54) (layer Dessus.SilkS) (width 0.3048)) - (pad E thru_hole rect (at -1.27 1.27) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 32 N-000027) - ) - (pad B thru_hole circle (at -1.27 -1.27) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 24 N-000019) - ) - (pad C thru_hole circle (at 1.27 -1.27) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 31 N-000026) - ) + (fp_line (start -1.27 2.54) (end 2.54 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.27) (end 2.54 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -2.54) (end 1.27 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 1.27 -3.81) (end -1.27 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -1.27 -3.81) (end -3.81 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.81 1.27) (end -2.54 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -2.54 2.54) (end -1.27 2.54) (layer F.SilkS) (width 0.3048)) + (pad E thru_hole rect (at -1.27 1.27) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 32 N-000027)) + (pad B thru_hole circle (at -1.27 -1.27) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 24 N-000019)) + (pad C thru_hole circle (at 1.27 -1.27) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 31 N-000026)) (model discret/to98.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -571,32 +523,26 @@ (descr "Transistor TO92 brochage type BC237") (tags "TR TO92") (path /4B3A1333/4B3A137D) - (fp_text reference Q2 (at 0.762 0.635) (layer Dessus.SilkS) + (fp_text reference Q2 (at 0.762 0.635) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value MPAS42 (at 0.254 -3.048) (layer Dessus.SilkS) + (fp_text value MPAS42 (at 0.254 -3.048) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start -1.27 2.54) (end 2.54 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.27) (end 2.54 -2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -2.54) (end 1.27 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 1.27 -3.81) (end -1.27 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -1.27 -3.81) (end -3.81 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.81 1.27) (end -2.54 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -2.54 2.54) (end -1.27 2.54) (layer Dessus.SilkS) (width 0.3048)) - (pad E thru_hole rect (at -1.27 1.27) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 21 N-000016) - ) - (pad B thru_hole circle (at -1.27 -1.27) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 31 N-000026) - ) - (pad C thru_hole circle (at 1.27 -1.27) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 13 HT) - ) + (fp_line (start -1.27 2.54) (end 2.54 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.27) (end 2.54 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -2.54) (end 1.27 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 1.27 -3.81) (end -1.27 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -1.27 -3.81) (end -3.81 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.81 1.27) (end -2.54 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -2.54 2.54) (end -1.27 2.54) (layer F.SilkS) (width 0.3048)) + (pad E thru_hole rect (at -1.27 1.27) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 21 N-000016)) + (pad B thru_hole circle (at -1.27 -1.27) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 31 N-000026)) + (pad C thru_hole circle (at 1.27 -1.27) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 13 HT)) (model discret/to98.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -609,32 +555,26 @@ (descr "Transistor TO92 brochage type BC237") (tags "TR TO92") (path /4B3A1333/4B3A1379) - (fp_text reference Q4 (at 0.762 0.635) (layer Dessus.SilkS) + (fp_text reference Q4 (at 0.762 0.635) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value MPAS42 (at 0.254 -3.048) (layer Dessus.SilkS) + (fp_text value MPAS42 (at 0.254 -3.048) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start -1.27 2.54) (end 2.54 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.27) (end 2.54 -2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -2.54) (end 1.27 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 1.27 -3.81) (end -1.27 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -1.27 -3.81) (end -3.81 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.81 1.27) (end -2.54 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -2.54 2.54) (end -1.27 2.54) (layer Dessus.SilkS) (width 0.3048)) - (pad E thru_hole rect (at -1.27 1.27) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 16 N-000011) - ) - (pad B thru_hole circle (at -1.27 -1.27) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 25 N-000020) - ) - (pad C thru_hole circle (at 1.27 -1.27) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 30 N-000025) - ) + (fp_line (start -1.27 2.54) (end 2.54 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.27) (end 2.54 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -2.54) (end 1.27 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 1.27 -3.81) (end -1.27 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -1.27 -3.81) (end -3.81 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.81 1.27) (end -2.54 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -2.54 2.54) (end -1.27 2.54) (layer F.SilkS) (width 0.3048)) + (pad E thru_hole rect (at -1.27 1.27) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 16 N-000011)) + (pad B thru_hole circle (at -1.27 -1.27) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 25 N-000020)) + (pad C thru_hole circle (at 1.27 -1.27) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 30 N-000025)) (model discret/to98.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -647,32 +587,26 @@ (descr "Transistor TO92 brochage type BC237") (tags "TR TO92") (path /4B3A13A4/4B3A1379) - (fp_text reference Q8 (at 0.762 0.635) (layer Dessus.SilkS) + (fp_text reference Q8 (at 0.762 0.635) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value MPAS42 (at 0.254 -3.048) (layer Dessus.SilkS) + (fp_text value MPAS42 (at 0.254 -3.048) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start -1.27 2.54) (end 2.54 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.27) (end 2.54 -2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -2.54) (end 1.27 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 1.27 -3.81) (end -1.27 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -1.27 -3.81) (end -3.81 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.81 1.27) (end -2.54 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -2.54 2.54) (end -1.27 2.54) (layer Dessus.SilkS) (width 0.3048)) - (pad E thru_hole rect (at -1.27 1.27) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 33 N-000032) - ) - (pad B thru_hole circle (at -1.27 -1.27) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 42 N-000041) - ) - (pad C thru_hole circle (at 1.27 -1.27) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 47 N-000046) - ) + (fp_line (start -1.27 2.54) (end 2.54 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.27) (end 2.54 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -2.54) (end 1.27 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 1.27 -3.81) (end -1.27 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -1.27 -3.81) (end -3.81 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.81 1.27) (end -2.54 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -2.54 2.54) (end -1.27 2.54) (layer F.SilkS) (width 0.3048)) + (pad E thru_hole rect (at -1.27 1.27) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 33 N-000032)) + (pad B thru_hole circle (at -1.27 -1.27) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 42 N-000041)) + (pad C thru_hole circle (at 1.27 -1.27) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 47 N-000046)) (model discret/to98.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -685,25 +619,21 @@ (descr "Bornier d'alimentation 2 pins") (tags DEV) (path /4AD71B06) - (fp_text reference P2 (at 0 -5.08 270) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text reference P2 (at 0 -5.08 270) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) - (fp_text value CONN_2 (at 0 5.08 270) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) - ) - (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 3.81) (end 5.08 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 -3.81) (end -5.08 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 -3.81) (end -5.08 3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 3.81) (end 5.08 3.81) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at -2.54 0 270) (size 2.54 2.54) (drill 1.524) - (layers *.Cu *.Mask Dessus.SilkS) - (net 3 /12Vext) - ) - (pad 2 thru_hole circle (at 2.54 0 270) (size 2.54 2.54) (drill 1.524) - (layers *.Cu *.Mask Dessus.SilkS) - (net 12 GND) + (fp_text value CONN_2 (at 0 5.08 270) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) + (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 3.81) (end 5.08 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 -3.81) (end -5.08 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 -3.81) (end -5.08 3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 3.81) (end 5.08 3.81) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole rect (at -2.54 0 270) (size 2.54 2.54) (drill 1.524) (layers *.Cu *.Mask F.SilkS) + (net 3 /12Vext)) + (pad 2 thru_hole circle (at 2.54 0 270) (size 2.54 2.54) (drill 1.524) (layers *.Cu *.Mask F.SilkS) + (net 12 GND)) (model device/bornier_2.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -716,48 +646,32 @@ (descr "8 pins DIL package, elliptical pads") (tags DIL) (path /4B4B1230) - (fp_text reference U1 (at -6.35 0 90) (layer Dessus.SilkS) + (fp_text reference U1 (at -6.35 0 90) (layer F.SilkS) (effects (font (size 1.778 1.143) (thickness 0.28702))) ) - (fp_text value ICL7660 (at 0 0) (layer Dessus.SilkS) + (fp_text value ICL7660 (at 0 0) (layer F.SilkS) (effects (font (size 1.778 1.016) (thickness 0.254))) ) - (fp_line (start -5.08 -1.27) (end -3.81 -1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -3.81 1.27) (end -5.08 1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -5.08 -2.54) (end 5.08 -2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 5.08 -2.54) (end 5.08 2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -5.08 2.54) (end -5.08 -2.54) (layer Dessus.SilkS) (width 0.381)) - (pad 1 thru_hole rect (at -3.81 3.81) (size 1.5748 2.286) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 2 thru_hole oval (at -1.27 3.81) (size 1.5748 2.286) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 15 N-000010) - ) - (pad 3 thru_hole oval (at 1.27 3.81) (size 1.5748 2.286) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 12 GND) - ) - (pad 4 thru_hole oval (at 3.81 3.81) (size 1.5748 2.286) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 14 N-000005) - ) - (pad 5 thru_hole oval (at 3.81 -3.81) (size 1.5748 2.286) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 2 -VAA) - ) - (pad 6 thru_hole oval (at 1.27 -3.81) (size 1.5748 2.286) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 7 thru_hole oval (at -1.27 -3.81) (size 1.5748 2.286) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 8 thru_hole oval (at -3.81 -3.81) (size 1.5748 2.286) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 50 VCC) - ) + (fp_line (start -5.08 -1.27) (end -3.81 -1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -3.81 1.27) (end -5.08 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -5.08 -2.54) (end 5.08 -2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 5.08 -2.54) (end 5.08 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start -5.08 2.54) (end -5.08 -2.54) (layer F.SilkS) (width 0.381)) + (pad 1 thru_hole rect (at -3.81 3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS)) + (pad 2 thru_hole oval (at -1.27 3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 15 N-000010)) + (pad 3 thru_hole oval (at 1.27 3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 12 GND)) + (pad 4 thru_hole oval (at 3.81 3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 14 N-000005)) + (pad 5 thru_hole oval (at 3.81 -3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 2 -VAA)) + (pad 6 thru_hole oval (at 1.27 -3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS)) + (pad 7 thru_hole oval (at -1.27 -3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS)) + (pad 8 thru_hole oval (at -3.81 -3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 50 VCC)) (model dil/dil_8.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -770,51 +684,35 @@ (descr "8 pins DIL package, elliptical pads") (tags DIL) (path /4B3A13A4/4B3A1368) - (fp_text reference U4 (at -6.35 0 90) (layer Dessus.SilkS) + (fp_text reference U4 (at -6.35 0 90) (layer F.SilkS) (effects (font (size 1.778 1.143) (thickness 0.28702))) ) - (fp_text value LM358N (at 0 0) (layer Dessus.SilkS) + (fp_text value LM358N (at 0 0) (layer F.SilkS) (effects (font (size 1.778 1.016) (thickness 0.254))) ) - (fp_line (start -5.08 -1.27) (end -3.81 -1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -3.81 1.27) (end -5.08 1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -5.08 -2.54) (end 5.08 -2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 5.08 -2.54) (end 5.08 2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -5.08 2.54) (end -5.08 -2.54) (layer Dessus.SilkS) (width 0.381)) - (pad 1 thru_hole rect (at -3.81 3.81) (size 1.5748 2.286) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 43 N-000042) - ) - (pad 2 thru_hole oval (at -1.27 3.81) (size 1.5748 2.286) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 44 N-000043) - ) - (pad 3 thru_hole oval (at 1.27 3.81) (size 1.5748 2.286) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 5 /ampli_h2) - ) - (pad 4 thru_hole oval (at 3.81 3.81) (size 1.5748 2.286) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 2 -VAA) - ) - (pad 5 thru_hole oval (at 3.81 -3.81) (size 1.5748 2.286) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 46 N-000045) - ) - (pad 6 thru_hole oval (at 1.27 -3.81) (size 1.5748 2.286) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 5 /ampli_h2) - ) - (pad 7 thru_hole oval (at -1.27 -3.81) (size 1.5748 2.286) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 5 /ampli_h2) - ) - (pad 8 thru_hole oval (at -3.81 -3.81) (size 1.5748 2.286) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 1 +12V) - ) + (fp_line (start -5.08 -1.27) (end -3.81 -1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -3.81 1.27) (end -5.08 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -5.08 -2.54) (end 5.08 -2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 5.08 -2.54) (end 5.08 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start -5.08 2.54) (end -5.08 -2.54) (layer F.SilkS) (width 0.381)) + (pad 1 thru_hole rect (at -3.81 3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 43 N-000042)) + (pad 2 thru_hole oval (at -1.27 3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 44 N-000043)) + (pad 3 thru_hole oval (at 1.27 3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 5 /ampli_h2)) + (pad 4 thru_hole oval (at 3.81 3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 2 -VAA)) + (pad 5 thru_hole oval (at 3.81 -3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 46 N-000045)) + (pad 6 thru_hole oval (at 1.27 -3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 5 /ampli_h2)) + (pad 7 thru_hole oval (at -1.27 -3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 5 /ampli_h2)) + (pad 8 thru_hole oval (at -3.81 -3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 1 +12V)) (model dil/dil_8.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -827,25 +725,21 @@ (descr "Bornier d'alimentation 2 pins") (tags DEV) (path /4B3A1333/4B3A1367) - (fp_text reference P4 (at 0 -5.08 270) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text reference P4 (at 0 -5.08 270) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) - (fp_text value CONN_2 (at 0 5.08 270) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) - ) - (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 3.81) (end 5.08 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 -3.81) (end -5.08 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 -3.81) (end -5.08 3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 3.81) (end 5.08 3.81) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at -2.54 0 270) (size 2.54 2.54) (drill 1.524) - (layers *.Cu *.Mask Dessus.SilkS) - (net 7 /ampli_h4) - ) - (pad 2 thru_hole circle (at 2.54 0 270) (size 2.54 2.54) (drill 1.524) - (layers *.Cu *.Mask Dessus.SilkS) - (net 12 GND) + (fp_text value CONN_2 (at 0 5.08 270) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) + (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 3.81) (end 5.08 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 -3.81) (end -5.08 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 -3.81) (end -5.08 3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 3.81) (end 5.08 3.81) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole rect (at -2.54 0 270) (size 2.54 2.54) (drill 1.524) (layers *.Cu *.Mask F.SilkS) + (net 7 /ampli_h4)) + (pad 2 thru_hole circle (at 2.54 0 270) (size 2.54 2.54) (drill 1.524) (layers *.Cu *.Mask F.SilkS) + (net 12 GND)) (model device/bornier_2.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -858,25 +752,21 @@ (descr "Bornier d'alimentation 2 pins") (tags DEV) (path /4B3A13A4/4B3A136C) - (fp_text reference P5 (at 0 -5.08 90) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text reference P5 (at 0 -5.08 90) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) - (fp_text value CONN_2 (at 0 5.08 90) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) - ) - (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 3.81) (end 5.08 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 -3.81) (end -5.08 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 -3.81) (end -5.08 3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 3.81) (end 5.08 3.81) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at -2.54 0 90) (size 2.54 2.54) (drill 1.524) - (layers *.Cu *.Mask Dessus.SilkS) - (net 8 /ampli_h5) - ) - (pad 2 thru_hole circle (at 2.54 0 90) (size 2.54 2.54) (drill 1.524) - (layers *.Cu *.Mask Dessus.SilkS) - (net 12 GND) + (fp_text value CONN_2 (at 0 5.08 90) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) + (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 3.81) (end 5.08 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 -3.81) (end -5.08 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 -3.81) (end -5.08 3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 3.81) (end 5.08 3.81) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole rect (at -2.54 0 90) (size 2.54 2.54) (drill 1.524) (layers *.Cu *.Mask F.SilkS) + (net 8 /ampli_h5)) + (pad 2 thru_hole circle (at 2.54 0 90) (size 2.54 2.54) (drill 1.524) (layers *.Cu *.Mask F.SilkS) + (net 12 GND)) (model device/bornier_2.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -889,25 +779,21 @@ (descr "Bornier d'alimentation 2 pins") (tags DEV) (path /4B3A13A4/4B3A1367) - (fp_text reference P6 (at 0 -5.08 270) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text reference P6 (at 0 -5.08 270) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) - (fp_text value CONN_2 (at 0 5.08 270) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) - ) - (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 3.81) (end 5.08 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 -3.81) (end -5.08 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 -3.81) (end -5.08 3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 3.81) (end 5.08 3.81) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at -2.54 0 270) (size 2.54 2.54) (drill 1.524) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 /ampli_h6) - ) - (pad 2 thru_hole circle (at 2.54 0 270) (size 2.54 2.54) (drill 1.524) - (layers *.Cu *.Mask Dessus.SilkS) - (net 12 GND) + (fp_text value CONN_2 (at 0 5.08 270) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) + (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 3.81) (end 5.08 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 -3.81) (end -5.08 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 -3.81) (end -5.08 3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 3.81) (end 5.08 3.81) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole rect (at -2.54 0 270) (size 2.54 2.54) (drill 1.524) (layers *.Cu *.Mask F.SilkS) + (net 9 /ampli_h6)) + (pad 2 thru_hole circle (at 2.54 0 270) (size 2.54 2.54) (drill 1.524) (layers *.Cu *.Mask F.SilkS) + (net 12 GND)) (model device/bornier_2.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -920,51 +806,35 @@ (descr "8 pins DIL package, elliptical pads") (tags DIL) (path /4B3A1333/4B3A1368) - (fp_text reference U3 (at -6.35 0 90) (layer Dessus.SilkS) + (fp_text reference U3 (at -6.35 0 90) (layer F.SilkS) (effects (font (size 1.778 1.143) (thickness 0.28702))) ) - (fp_text value LM358N (at 0 0) (layer Dessus.SilkS) + (fp_text value LM358N (at 0 0) (layer F.SilkS) (effects (font (size 1.778 1.016) (thickness 0.254))) ) - (fp_line (start -5.08 -1.27) (end -3.81 -1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -3.81 1.27) (end -5.08 1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -5.08 -2.54) (end 5.08 -2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 5.08 -2.54) (end 5.08 2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -5.08 2.54) (end -5.08 -2.54) (layer Dessus.SilkS) (width 0.381)) - (pad 1 thru_hole rect (at -3.81 3.81) (size 1.5748 2.286) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 26 N-000021) - ) - (pad 2 thru_hole oval (at -1.27 3.81) (size 1.5748 2.286) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 27 N-000022) - ) - (pad 3 thru_hole oval (at 1.27 3.81) (size 1.5748 2.286) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 4 /ampli_h1) - ) - (pad 4 thru_hole oval (at 3.81 3.81) (size 1.5748 2.286) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 2 -VAA) - ) - (pad 5 thru_hole oval (at 3.81 -3.81) (size 1.5748 2.286) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 29 N-000024) - ) - (pad 6 thru_hole oval (at 1.27 -3.81) (size 1.5748 2.286) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 4 /ampli_h1) - ) - (pad 7 thru_hole oval (at -1.27 -3.81) (size 1.5748 2.286) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 4 /ampli_h1) - ) - (pad 8 thru_hole oval (at -3.81 -3.81) (size 1.5748 2.286) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 1 +12V) - ) + (fp_line (start -5.08 -1.27) (end -3.81 -1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -3.81 1.27) (end -5.08 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -5.08 -2.54) (end 5.08 -2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 5.08 -2.54) (end 5.08 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start -5.08 2.54) (end -5.08 -2.54) (layer F.SilkS) (width 0.381)) + (pad 1 thru_hole rect (at -3.81 3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 26 N-000021)) + (pad 2 thru_hole oval (at -1.27 3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 27 N-000022)) + (pad 3 thru_hole oval (at 1.27 3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 4 /ampli_h1)) + (pad 4 thru_hole oval (at 3.81 3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 2 -VAA)) + (pad 5 thru_hole oval (at 3.81 -3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 29 N-000024)) + (pad 6 thru_hole oval (at 1.27 -3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 4 /ampli_h1)) + (pad 7 thru_hole oval (at -1.27 -3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 4 /ampli_h1)) + (pad 8 thru_hole oval (at -3.81 -3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 1 +12V)) (model dil/dil_8.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -978,28 +848,24 @@ (tags R) (path /4B3A1333/4B3A136D) (autoplace_cost180 10) - (fp_text reference R9 (at 0 0 180) (layer Dessus.SilkS) + (fp_text reference R9 (at 0 0 180) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 1K (at 0 0 180) (layer Dessus.SilkS) hide + (fp_text value 1K (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)) - (pad 1 thru_hole circle (at -3.81 0 180) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 16 N-000011) - ) - (pad 2 thru_hole circle (at 3.81 0 180) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 26 N-000021) - ) + (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.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 16 N-000011)) + (pad 2 thru_hole circle (at 3.81 0 180) (size 1.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 26 N-000021)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -1013,28 +879,24 @@ (tags R) (path /4B3A13A4/4B3A1364) (autoplace_cost180 10) - (fp_text reference R15 (at 0 0 180) (layer Dessus.SilkS) + (fp_text reference R15 (at 0 0 180) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 47 (at 0 0 180) (layer Dessus.SilkS) hide + (fp_text value 47 (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)) - (pad 1 thru_hole circle (at -3.81 0 180) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 8 /ampli_h5) - ) - (pad 2 thru_hole circle (at 3.81 0 180) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 38 N-000037) - ) + (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.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 8 /ampli_h5)) + (pad 2 thru_hole circle (at 3.81 0 180) (size 1.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 38 N-000037)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -1049,25 +911,19 @@ (path /4B3A1333/4B3A1357) (autoplace_cost90 10) (autoplace_cost180 10) - (fp_text reference RV1 (at 0 -5.08) (layer Dessus.SilkS) + (fp_text reference RV1 (at 0 -5.08) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 4,7K (at -0.254 5.207) (layer Dessus.SilkS) + (fp_text value 4,7K (at -0.254 5.207) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_circle (center 0 0.381) (end 0 -3.175) (layer Dessus.SilkS) (width 0.2032)) - (pad 1 thru_hole circle (at -2.54 1.27) (size 1.524 1.524) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 23 N-000018) - ) - (pad 2 thru_hole circle (at 0 -1.27) (size 1.524 1.524) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 27 N-000022) - ) - (pad 3 thru_hole circle (at 2.54 1.27) (size 1.524 1.524) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 10 /ampli_h7) - ) + (fp_circle (center 0 0.381) (end 0 -3.175) (layer F.SilkS) (width 0.2032)) + (pad 1 thru_hole circle (at -2.54 1.27) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 23 N-000018)) + (pad 2 thru_hole circle (at 0 -1.27) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 27 N-000022)) + (pad 3 thru_hole circle (at 2.54 1.27) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 10 /ampli_h7)) (model discret/adjustable_rx2.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -1082,25 +938,19 @@ (path /4B3A13A4/4B3A1357) (autoplace_cost90 10) (autoplace_cost180 10) - (fp_text reference RV2 (at 0 -5.08) (layer Dessus.SilkS) + (fp_text reference RV2 (at 0 -5.08) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 4,7K (at -0.254 5.207) (layer Dessus.SilkS) + (fp_text value 4,7K (at -0.254 5.207) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_circle (center 0 0.381) (end 0 -3.175) (layer Dessus.SilkS) (width 0.2032)) - (pad 1 thru_hole circle (at -2.54 1.27) (size 1.524 1.524) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 40 N-000039) - ) - (pad 2 thru_hole circle (at 0 -1.27) (size 1.524 1.524) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 44 N-000043) - ) - (pad 3 thru_hole circle (at 2.54 1.27) (size 1.524 1.524) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 11 /ampli_h8) - ) + (fp_circle (center 0 0.381) (end 0 -3.175) (layer F.SilkS) (width 0.2032)) + (pad 1 thru_hole circle (at -2.54 1.27) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 40 N-000039)) + (pad 2 thru_hole circle (at 0 -1.27) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 44 N-000043)) + (pad 3 thru_hole circle (at 2.54 1.27) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 11 /ampli_h8)) (model discret/adjustable_rx2.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -1113,25 +963,21 @@ (descr "Condensateur = 2 pas") (tags C) (path /4B3A1333/4B3A1358) - (fp_text reference C3 (at 0 0 180) (layer Dessus.SilkS) + (fp_text reference C3 (at 0 0 180) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value 15nF (at 0 0 180) (layer Dessus.SilkS) hide + (fp_text value 15nF (at 0 0 180) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start -3.556 -1.016) (end 3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.556 -1.016) (end 3.556 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.556 1.016) (end -3.556 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.556 1.016) (end -3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.556 -0.508) (end -3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -2.54 0 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 4 /ampli_h1) - ) - (pad 2 thru_hole circle (at 2.54 0 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 18 N-000013) - ) + (fp_line (start -3.556 -1.016) (end 3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.556 -1.016) (end 3.556 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.556 1.016) (end -3.556 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.556 1.016) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.556 -0.508) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -2.54 0 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 4 /ampli_h1)) + (pad 2 thru_hole circle (at 2.54 0 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 18 N-000013)) (model discret/capa_2pas_5x5mm.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -1144,25 +990,21 @@ (descr "Condensateur = 2 pas") (tags C) (path /4B3A1333/4B3A1366) - (fp_text reference C4 (at 0 0) (layer Dessus.SilkS) + (fp_text reference C4 (at 0 0) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value 4,7nF (at 0 0) (layer Dessus.SilkS) hide + (fp_text value 4,7nF (at 0 0) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start -3.556 -1.016) (end 3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.556 -1.016) (end 3.556 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.556 1.016) (end -3.556 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.556 1.016) (end -3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.556 -0.508) (end -3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -2.54 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 29 N-000024) - ) - (pad 2 thru_hole circle (at 2.54 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 12 GND) - ) + (fp_line (start -3.556 -1.016) (end 3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.556 -1.016) (end 3.556 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.556 1.016) (end -3.556 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.556 1.016) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.556 -0.508) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -2.54 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 29 N-000024)) + (pad 2 thru_hole circle (at 2.54 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 12 GND)) (model discret/capa_2pas_5x5mm.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -1175,25 +1017,21 @@ (descr "Condensateur = 2 pas") (tags C) (path /4B3A1333/4B3A1365) - (fp_text reference C5 (at 0 0) (layer Dessus.SilkS) + (fp_text reference C5 (at 0 0) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value 820pF (at 0 0) (layer Dessus.SilkS) hide + (fp_text value 820pF (at 0 0) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start -3.556 -1.016) (end 3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.556 -1.016) (end 3.556 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.556 1.016) (end -3.556 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.556 1.016) (end -3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.556 -0.508) (end -3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -2.54 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 20 N-000015) - ) - (pad 2 thru_hole circle (at 2.54 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 12 GND) - ) + (fp_line (start -3.556 -1.016) (end 3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.556 -1.016) (end 3.556 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.556 1.016) (end -3.556 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.556 1.016) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.556 -0.508) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -2.54 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 20 N-000015)) + (pad 2 thru_hole circle (at 2.54 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 12 GND)) (model discret/capa_2pas_5x5mm.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -1206,25 +1044,21 @@ (descr "Condensateur = 2 pas") (tags C) (path /4B3A13A4/4B3A1358) - (fp_text reference C6 (at 0 0 180) (layer Dessus.SilkS) + (fp_text reference C6 (at 0 0 180) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value 15nF (at 0 0 180) (layer Dessus.SilkS) hide + (fp_text value 15nF (at 0 0 180) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start -3.556 -1.016) (end 3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.556 -1.016) (end 3.556 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.556 1.016) (end -3.556 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.556 1.016) (end -3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.556 -0.508) (end -3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -2.54 0 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 5 /ampli_h2) - ) - (pad 2 thru_hole circle (at 2.54 0 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 35 N-000034) - ) + (fp_line (start -3.556 -1.016) (end 3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.556 -1.016) (end 3.556 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.556 1.016) (end -3.556 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.556 1.016) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.556 -0.508) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -2.54 0 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 5 /ampli_h2)) + (pad 2 thru_hole circle (at 2.54 0 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 35 N-000034)) (model discret/capa_2pas_5x5mm.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -1237,25 +1071,21 @@ (descr "Condensateur = 2 pas") (tags C) (path /4B3A13A4/4B3A1366) - (fp_text reference C7 (at 0 0) (layer Dessus.SilkS) + (fp_text reference C7 (at 0 0) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value 4,7nF (at 0 0) (layer Dessus.SilkS) hide + (fp_text value 4,7nF (at 0 0) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start -3.556 -1.016) (end 3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.556 -1.016) (end 3.556 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.556 1.016) (end -3.556 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.556 1.016) (end -3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.556 -0.508) (end -3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -2.54 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 46 N-000045) - ) - (pad 2 thru_hole circle (at 2.54 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 12 GND) - ) + (fp_line (start -3.556 -1.016) (end 3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.556 -1.016) (end 3.556 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.556 1.016) (end -3.556 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.556 1.016) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.556 -0.508) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -2.54 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 46 N-000045)) + (pad 2 thru_hole circle (at 2.54 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 12 GND)) (model discret/capa_2pas_5x5mm.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -1268,25 +1098,21 @@ (descr "Condensateur = 2 pas") (tags C) (path /4B3A13A4/4B3A1365) - (fp_text reference C8 (at 0 0) (layer Dessus.SilkS) + (fp_text reference C8 (at 0 0) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value 820pF (at 0 0) (layer Dessus.SilkS) hide + (fp_text value 820pF (at 0 0) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start -3.556 -1.016) (end 3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.556 -1.016) (end 3.556 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.556 1.016) (end -3.556 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.556 1.016) (end -3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.556 -0.508) (end -3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -2.54 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 37 N-000036) - ) - (pad 2 thru_hole circle (at 2.54 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 12 GND) - ) + (fp_line (start -3.556 -1.016) (end 3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.556 -1.016) (end 3.556 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.556 1.016) (end -3.556 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.556 1.016) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.556 -0.508) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -2.54 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 37 N-000036)) + (pad 2 thru_hole circle (at 2.54 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 12 GND)) (model discret/capa_2pas_5x5mm.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -1299,31 +1125,27 @@ (descr "Condensateur polarise") (tags CP) (path /4B3A1558) - (fp_text reference C9 (at 1.27 1.27 180) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text reference C9 (at 1.27 1.27 180) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) - (fp_text value 47uF/63V (at 1.27 -1.27 180) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) - ) - (fp_line (start -10.16 0) (end -8.89 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -7.62 1.27) (end -8.89 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -8.89 1.27) (end -8.89 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -8.89 -1.27) (end -7.62 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -7.62 2.54) (end -7.62 -2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -7.62 -2.54) (end 8.89 -2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 8.89 -2.54) (end 8.89 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 8.89 2.54) (end -7.62 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 8.89 0) (end 10.16 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 -2.54) (end -5.08 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -6.35 2.54) (end -6.35 -2.54) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at -10.16 0 180) (size 1.778 1.778) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 13 HT) - ) - (pad 2 thru_hole circle (at 10.16 0 180) (size 1.778 1.778) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 12 GND) + (fp_text value 47uF/63V (at 1.27 -1.27 180) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) + (fp_line (start -10.16 0) (end -8.89 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -7.62 1.27) (end -8.89 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -8.89 1.27) (end -8.89 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -8.89 -1.27) (end -7.62 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -7.62 2.54) (end -7.62 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -7.62 -2.54) (end 8.89 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 8.89 -2.54) (end 8.89 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 8.89 2.54) (end -7.62 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 8.89 0) (end 10.16 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 -2.54) (end -5.08 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -6.35 2.54) (end -6.35 -2.54) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole rect (at -10.16 0 180) (size 1.778 1.778) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 13 HT)) + (pad 2 thru_hole circle (at 10.16 0 180) (size 1.778 1.778) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 12 GND)) (model discret/c_pol.wrl (at (xyz 0 0 0)) (scale (xyz 0.8 0.8 0.8)) @@ -1336,30 +1158,26 @@ (descr "Diode 3 pas") (tags "DIODE DEV") (path /4B3A1333/4B3A1375) - (fp_text reference D2 (at 0 0 180) (layer Dessus.SilkS) + (fp_text reference D2 (at 0 0 180) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value 1N4148 (at 0 0 180) (layer Dessus.SilkS) hide + (fp_text value 1N4148 (at 0 0 180) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start 3.81 0) (end 3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 0) (end 3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 -1.016) (end -3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.81 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.048 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 1.016) (end 3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (pad 2 thru_hole rect (at 3.81 0 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 17 N-000012) - ) - (pad 1 thru_hole circle (at -3.81 0 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 13 HT) - ) + (fp_line (start 3.81 0) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 0) (end 3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 -1.016) (end -3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.81 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 1.016) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 2 thru_hole rect (at 3.81 0 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 17 N-000012)) + (pad 1 thru_hole circle (at -3.81 0 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 13 HT)) (model discret/diode.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -1372,30 +1190,26 @@ (descr "Diode 3 pas") (tags "DIODE DEV") (path /4B3A1333/4B3A1377) - (fp_text reference D3 (at 0 0 180) (layer Dessus.SilkS) + (fp_text reference D3 (at 0 0 180) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value 1N4148 (at 0 0 180) (layer Dessus.SilkS) hide + (fp_text value 1N4148 (at 0 0 180) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start 3.81 0) (end 3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 0) (end 3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 -1.016) (end -3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.81 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.048 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 1.016) (end 3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (pad 2 thru_hole rect (at 3.81 0 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 24 N-000019) - ) - (pad 1 thru_hole circle (at -3.81 0 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 17 N-000012) - ) + (fp_line (start 3.81 0) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 0) (end 3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 -1.016) (end -3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.81 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 1.016) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 2 thru_hole rect (at 3.81 0 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 24 N-000019)) + (pad 1 thru_hole circle (at -3.81 0 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 17 N-000012)) (model discret/diode.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -1408,30 +1222,26 @@ (descr "Diode 3 pas") (tags "DIODE DEV") (path /4B3A1333/4B3A137B) - (fp_text reference D4 (at 0 0 270) (layer Dessus.SilkS) + (fp_text reference D4 (at 0 0 270) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value 1N4148 (at 0 0 270) (layer Dessus.SilkS) hide + (fp_text value 1N4148 (at 0 0 270) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start 3.81 0) (end 3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 0) (end 3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 -1.016) (end -3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.81 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.048 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 1.016) (end 3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (pad 2 thru_hole rect (at 3.81 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 30 N-000025) - ) - (pad 1 thru_hole circle (at -3.81 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 28 N-000023) - ) + (fp_line (start 3.81 0) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 0) (end 3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 -1.016) (end -3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.81 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 1.016) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 2 thru_hole rect (at 3.81 0 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 30 N-000025)) + (pad 1 thru_hole circle (at -3.81 0 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 28 N-000023)) (model discret/diode.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -1444,30 +1254,26 @@ (descr "Diode 3 pas") (tags "DIODE DEV") (path /4B3A13A4/4B3A1375) - (fp_text reference D5 (at 0 0 180) (layer Dessus.SilkS) + (fp_text reference D5 (at 0 0 180) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value 1N4148 (at 0 0 180) (layer Dessus.SilkS) hide + (fp_text value 1N4148 (at 0 0 180) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start 3.81 0) (end 3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 0) (end 3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 -1.016) (end -3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.81 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.048 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 1.016) (end 3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (pad 2 thru_hole rect (at 3.81 0 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 34 N-000033) - ) - (pad 1 thru_hole circle (at -3.81 0 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 13 HT) - ) + (fp_line (start 3.81 0) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 0) (end 3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 -1.016) (end -3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.81 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 1.016) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 2 thru_hole rect (at 3.81 0 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 34 N-000033)) + (pad 1 thru_hole circle (at -3.81 0 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 13 HT)) (model discret/diode.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -1480,30 +1286,26 @@ (descr "Diode 3 pas") (tags "DIODE DEV") (path /4B3A13A4/4B3A1377) - (fp_text reference D6 (at 0 0) (layer Dessus.SilkS) + (fp_text reference D6 (at 0 0) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value 1N4148 (at 0 0) (layer Dessus.SilkS) hide + (fp_text value 1N4148 (at 0 0) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start 3.81 0) (end 3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 0) (end 3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 -1.016) (end -3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.81 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.048 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 1.016) (end 3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (pad 2 thru_hole rect (at 3.81 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 41 N-000040) - ) - (pad 1 thru_hole circle (at -3.81 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 34 N-000033) - ) + (fp_line (start 3.81 0) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 0) (end 3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 -1.016) (end -3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.81 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 1.016) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 2 thru_hole rect (at 3.81 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 41 N-000040)) + (pad 1 thru_hole circle (at -3.81 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 34 N-000033)) (model discret/diode.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -1516,30 +1318,26 @@ (descr "Diode 3 pas") (tags "DIODE DEV") (path /4B3A13A4/4B3A137B) - (fp_text reference D7 (at 0 0 270) (layer Dessus.SilkS) + (fp_text reference D7 (at 0 0 270) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value 1N4148 (at 0 0 270) (layer Dessus.SilkS) hide + (fp_text value 1N4148 (at 0 0 270) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start 3.81 0) (end 3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 0) (end 3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 -1.016) (end -3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.81 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.048 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 1.016) (end 3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (pad 2 thru_hole rect (at 3.81 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 47 N-000046) - ) - (pad 1 thru_hole circle (at -3.81 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 45 N-000044) - ) + (fp_line (start 3.81 0) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 0) (end 3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 -1.016) (end -3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.81 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 1.016) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 2 thru_hole rect (at 3.81 0 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 47 N-000046)) + (pad 1 thru_hole circle (at -3.81 0 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 45 N-000044)) (model discret/diode.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -1553,28 +1351,24 @@ (tags R) (path /4B3A1333/4B3A1376) (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 470 (at 0 0 180) (layer Dessus.SilkS) hide + (fp_text value 470 (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)) - (pad 1 thru_hole circle (at -3.81 0 180) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 13 HT) - ) - (pad 2 thru_hole circle (at 3.81 0 180) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 32 N-000027) - ) + (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.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 13 HT)) + (pad 2 thru_hole circle (at 3.81 0 180) (size 1.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 32 N-000027)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -1588,28 +1382,24 @@ (tags R) (path /4B3A1333/4B3A1374) (autoplace_cost180 10) - (fp_text reference R4 (at 0 0 270) (layer Dessus.SilkS) + (fp_text reference R4 (at 0 0 270) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 220K (at 0 0 270) (layer Dessus.SilkS) hide + (fp_text value 220K (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)) - (pad 1 thru_hole circle (at -3.81 0 270) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 24 N-000019) - ) - (pad 2 thru_hole circle (at 3.81 0 270) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 12 GND) - ) + (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.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 24 N-000019)) + (pad 2 thru_hole circle (at 3.81 0 270) (size 1.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 12 GND)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -1623,28 +1413,24 @@ (tags R) (path /4B3A1333/4B3A1364) (autoplace_cost180 10) - (fp_text reference R5 (at 0 0 180) (layer Dessus.SilkS) + (fp_text reference R5 (at 0 0 180) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 47 (at 0 0 180) (layer Dessus.SilkS) hide + (fp_text value 47 (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)) - (pad 1 thru_hole circle (at -3.81 0 180) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 6 /ampli_h3) - ) - (pad 2 thru_hole circle (at 3.81 0 180) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 21 N-000016) - ) + (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.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 6 /ampli_h3)) + (pad 2 thru_hole circle (at 3.81 0 180) (size 1.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 21 N-000016)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -1658,28 +1444,24 @@ (tags R) (path /4B3A1333/4B3A136B) (autoplace_cost180 10) - (fp_text reference R6 (at 0 0 180) (layer Dessus.SilkS) + (fp_text reference R6 (at 0 0 180) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 22K (at 0 0 180) (layer Dessus.SilkS) hide + (fp_text value 22K (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)) - (pad 1 thru_hole circle (at -3.81 0 180) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 18 N-000013) - ) - (pad 2 thru_hole circle (at 3.81 0 180) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 19 N-000014) - ) + (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.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 18 N-000013)) + (pad 2 thru_hole circle (at 3.81 0 180) (size 1.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 19 N-000014)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -1693,28 +1475,24 @@ (tags R) (path /4B3A1333/4B3A1359) (autoplace_cost180 10) - (fp_text reference R7 (at 0 0 180) (layer Dessus.SilkS) + (fp_text reference R7 (at 0 0 180) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 22K (at 0 0 180) (layer Dessus.SilkS) hide + (fp_text value 22K (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)) - (pad 1 thru_hole circle (at -3.81 0 180) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 29 N-000024) - ) - (pad 2 thru_hole circle (at 3.81 0 180) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 18 N-000013) - ) + (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.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 29 N-000024)) + (pad 2 thru_hole circle (at 3.81 0 180) (size 1.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 18 N-000013)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -1728,28 +1506,24 @@ (tags R) (path /4B3A1333/4B3A1371) (autoplace_cost180 10) - (fp_text reference R8 (at 0 0 180) (layer Dessus.SilkS) + (fp_text reference R8 (at 0 0 180) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 1K (at 0 0 180) (layer Dessus.SilkS) hide + (fp_text value 1K (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)) - (pad 1 thru_hole circle (at -3.81 0 180) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 25 N-000020) - ) - (pad 2 thru_hole circle (at 3.81 0 180) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 12 GND) - ) + (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.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 25 N-000020)) + (pad 2 thru_hole circle (at 3.81 0 180) (size 1.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 12 GND)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -1763,28 +1537,24 @@ (tags R) (path /4B3A1333/4B61688C) (autoplace_cost180 10) - (fp_text reference R10 (at 0 0 180) (layer Dessus.SilkS) + (fp_text reference R10 (at 0 0 180) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 5,6K (at 0 0 180) (layer Dessus.SilkS) hide + (fp_text value 5,6K (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)) - (pad 1 thru_hole circle (at -3.81 0 180) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 30 N-000025) - ) - (pad 2 thru_hole circle (at 3.81 0 180) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 20 N-000015) - ) + (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.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 30 N-000025)) + (pad 2 thru_hole circle (at 3.81 0 180) (size 1.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 20 N-000015)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -1798,28 +1568,24 @@ (tags R) (path /4B3A1333/4B3A1362) (autoplace_cost180 10) - (fp_text reference R11 (at 0 0 90) (layer Dessus.SilkS) + (fp_text reference R11 (at 0 0 90) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 4,7K (at 0 0 90) (layer Dessus.SilkS) hide + (fp_text value 4,7K (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)) - (pad 1 thru_hole circle (at -3.81 0 90) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 23 N-000018) - ) - (pad 2 thru_hole circle (at 3.81 0 90) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 12 GND) - ) + (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.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 23 N-000018)) + (pad 2 thru_hole circle (at 3.81 0 90) (size 1.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 12 GND)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -1833,28 +1599,24 @@ (tags R) (path /4B3A1333/4B3A1370) (autoplace_cost180 10) - (fp_text reference R12 (at 0 0 270) (layer Dessus.SilkS) + (fp_text reference R12 (at 0 0 270) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 220K (at 0 0 270) (layer Dessus.SilkS) hide + (fp_text value 220K (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)) - (pad 1 thru_hole circle (at -3.81 0 270) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 10 /ampli_h7) - ) - (pad 2 thru_hole circle (at 3.81 0 270) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 22 N-000017) - ) + (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.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 10 /ampli_h7)) + (pad 2 thru_hole circle (at 3.81 0 270) (size 1.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 22 N-000017)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -1868,28 +1630,24 @@ (tags R) (path /4B3A13A4/4B3A1376) (autoplace_cost180 10) - (fp_text reference R13 (at 0 0 180) (layer Dessus.SilkS) + (fp_text reference R13 (at 0 0 180) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 470 (at 0 0 180) (layer Dessus.SilkS) hide + (fp_text value 470 (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)) - (pad 1 thru_hole circle (at -3.81 0 180) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 13 HT) - ) - (pad 2 thru_hole circle (at 3.81 0 180) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 49 N-000048) - ) + (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.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 13 HT)) + (pad 2 thru_hole circle (at 3.81 0 180) (size 1.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 49 N-000048)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -1903,28 +1661,24 @@ (tags R) (path /4B3A13A4/4B3A1374) (autoplace_cost180 10) - (fp_text reference R14 (at 0 0) (layer Dessus.SilkS) + (fp_text reference R14 (at 0 0) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 220K (at 0 0) (layer Dessus.SilkS) hide + (fp_text value 220K (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)) - (pad 1 thru_hole circle (at -3.81 0) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 41 N-000040) - ) - (pad 2 thru_hole circle (at 3.81 0) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 12 GND) - ) + (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.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 41 N-000040)) + (pad 2 thru_hole circle (at 3.81 0) (size 1.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 12 GND)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -1938,28 +1692,24 @@ (tags R) (path /4B3A13A4/4B3A136B) (autoplace_cost180 10) - (fp_text reference R16 (at 0 0 180) (layer Dessus.SilkS) + (fp_text reference R16 (at 0 0 180) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 22K (at 0 0 180) (layer Dessus.SilkS) hide + (fp_text value 22K (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)) - (pad 1 thru_hole circle (at -3.81 0 180) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 35 N-000034) - ) - (pad 2 thru_hole circle (at 3.81 0 180) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 36 N-000035) - ) + (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.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 35 N-000034)) + (pad 2 thru_hole circle (at 3.81 0 180) (size 1.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 36 N-000035)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -1973,28 +1723,24 @@ (tags R) (path /4B3A13A4/4B3A1359) (autoplace_cost180 10) - (fp_text reference R17 (at 0 0) (layer Dessus.SilkS) + (fp_text reference R17 (at 0 0) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 22K (at 0 0) (layer Dessus.SilkS) hide + (fp_text value 22K (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)) - (pad 1 thru_hole circle (at -3.81 0) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 46 N-000045) - ) - (pad 2 thru_hole circle (at 3.81 0) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 35 N-000034) - ) + (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.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 46 N-000045)) + (pad 2 thru_hole circle (at 3.81 0) (size 1.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 35 N-000034)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -2008,28 +1754,24 @@ (tags R) (path /4B3A13A4/4B3A1371) (autoplace_cost180 10) - (fp_text reference R18 (at 0 0 180) (layer Dessus.SilkS) + (fp_text reference R18 (at 0 0 180) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 1K (at 0 0 180) (layer Dessus.SilkS) hide + (fp_text value 1K (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)) - (pad 1 thru_hole circle (at -3.81 0 180) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 42 N-000041) - ) - (pad 2 thru_hole circle (at 3.81 0 180) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 12 GND) - ) + (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.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 42 N-000041)) + (pad 2 thru_hole circle (at 3.81 0 180) (size 1.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 12 GND)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -2043,28 +1785,24 @@ (tags R) (path /4B3A13A4/4B3A136D) (autoplace_cost180 10) - (fp_text reference R19 (at 0 0 180) (layer Dessus.SilkS) + (fp_text reference R19 (at 0 0 180) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 1K (at 0 0 180) (layer Dessus.SilkS) hide + (fp_text value 1K (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)) - (pad 1 thru_hole circle (at -3.81 0 180) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 33 N-000032) - ) - (pad 2 thru_hole circle (at 3.81 0 180) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 43 N-000042) - ) + (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.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 33 N-000032)) + (pad 2 thru_hole circle (at 3.81 0 180) (size 1.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 43 N-000042)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -2078,28 +1816,24 @@ (tags R) (path /4B3A13A4/4B61688C) (autoplace_cost180 10) - (fp_text reference R20 (at 0 0 180) (layer Dessus.SilkS) + (fp_text reference R20 (at 0 0 180) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 5,6K (at 0 0 180) (layer Dessus.SilkS) hide + (fp_text value 5,6K (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)) - (pad 1 thru_hole circle (at -3.81 0 180) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 47 N-000046) - ) - (pad 2 thru_hole circle (at 3.81 0 180) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 37 N-000036) - ) + (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.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 47 N-000046)) + (pad 2 thru_hole circle (at 3.81 0 180) (size 1.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 37 N-000036)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -2113,28 +1847,24 @@ (tags R) (path /4B3A13A4/4B3A1362) (autoplace_cost180 10) - (fp_text reference R21 (at 0 0 90) (layer Dessus.SilkS) + (fp_text reference R21 (at 0 0 90) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 4,7K (at 0 0 90) (layer Dessus.SilkS) hide + (fp_text value 4,7K (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)) - (pad 1 thru_hole circle (at -3.81 0 90) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 40 N-000039) - ) - (pad 2 thru_hole circle (at 3.81 0 90) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 12 GND) - ) + (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.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 40 N-000039)) + (pad 2 thru_hole circle (at 3.81 0 90) (size 1.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 12 GND)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -2148,28 +1878,24 @@ (tags R) (path /4B3A13A4/4B3A1370) (autoplace_cost180 10) - (fp_text reference R22 (at 0 0 270) (layer Dessus.SilkS) + (fp_text reference R22 (at 0 0 270) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 220K (at 0 0 270) (layer Dessus.SilkS) hide + (fp_text value 220K (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)) - (pad 1 thru_hole circle (at -3.81 0 270) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 11 /ampli_h8) - ) - (pad 2 thru_hole circle (at 3.81 0 270) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 39 N-000038) - ) + (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.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 11 /ampli_h8)) + (pad 2 thru_hole circle (at 3.81 0 270) (size 1.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 39 N-000038)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -2179,118 +1905,70 @@ (module MIRE (layer Composant) (tedit 200000) (tstamp 4B3A2B8E) (at 188.595 51.816) - (fp_text reference MIRE (at -0.127 4.572) (layer Dessus.SilkS) hide + (fp_text reference MIRE (at -0.127 4.572) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value * (at 3.302 2.794) (layer Dessus.SilkS) hide - (effects (font (size 1.524 1.524) (thickness 0.2032))) - ) - (fp_circle (center 0 0) (end 2.54 1.905) (layer Dessus.SilkS) (width 0.381)) - (pad "" thru_hole rect (at -1.524 0) (size 2.794 0.254) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole rect (at 0 -1.524) (size 0.254 2.794) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole circle (at 0 0) (size 0.254 0.254) (drill 0.0508) - (layers *.Cu *.Mask) - ) - (pad "" thru_hole rect (at -1.524 0) (size 2.286 0.254) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole rect (at 0 1.524) (size 0.254 2.794) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole rect (at 1.524 0) (size 2.794 0.254) - (layers *.Cu *.Mask Dessus.SilkS) + (fp_text value * (at 3.302 2.794) (layer F.SilkS) hide + (effects (font (thickness 0.2032))) ) + (fp_circle (center 0 0) (end 2.54 1.905) (layer F.SilkS) (width 0.381)) + (pad "" thru_hole rect (at -1.524 0) (size 2.794 0.254) (drill 0.762) (layers *.Cu *.Mask F.SilkS)) + (pad "" thru_hole rect (at 0 -1.524) (size 0.254 2.794) (drill 0.762) (layers *.Cu *.Mask F.SilkS)) + (pad "" thru_hole circle (at 0 0) (size 0.254 0.254) (drill 0.0508) (layers *.Cu *.Mask)) + (pad "" thru_hole rect (at -1.524 0) (size 2.286 0.254) (drill 0.762) (layers *.Cu *.Mask F.SilkS)) + (pad "" thru_hole rect (at 0 1.524) (size 0.254 2.794) (drill 0.762) (layers *.Cu *.Mask F.SilkS)) + (pad "" thru_hole rect (at 1.524 0) (size 2.794 0.254) (drill 0.762) (layers *.Cu *.Mask F.SilkS)) ) (module MIRE (layer Composant) (tedit 200000) (tstamp 4B3A2B9E) (at 88.265 51.816) - (fp_text reference MIRE (at -0.127 4.572) (layer Dessus.SilkS) hide + (fp_text reference MIRE (at -0.127 4.572) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value * (at 3.302 2.794) (layer Dessus.SilkS) hide - (effects (font (size 1.524 1.524) (thickness 0.2032))) - ) - (fp_circle (center 0 0) (end 2.54 1.905) (layer Dessus.SilkS) (width 0.381)) - (pad "" thru_hole rect (at -1.524 0) (size 2.794 0.254) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole rect (at 0 -1.524) (size 0.254 2.794) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole circle (at 0 0) (size 0.254 0.254) (drill 0.0508) - (layers *.Cu *.Mask) - ) - (pad "" thru_hole rect (at -1.524 0) (size 2.286 0.254) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole rect (at 0 1.524) (size 0.254 2.794) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole rect (at 1.524 0) (size 2.794 0.254) - (layers *.Cu *.Mask Dessus.SilkS) + (fp_text value * (at 3.302 2.794) (layer F.SilkS) hide + (effects (font (thickness 0.2032))) ) + (fp_circle (center 0 0) (end 2.54 1.905) (layer F.SilkS) (width 0.381)) + (pad "" thru_hole rect (at -1.524 0) (size 2.794 0.254) (drill 0.762) (layers *.Cu *.Mask F.SilkS)) + (pad "" thru_hole rect (at 0 -1.524) (size 0.254 2.794) (drill 0.762) (layers *.Cu *.Mask F.SilkS)) + (pad "" thru_hole circle (at 0 0) (size 0.254 0.254) (drill 0.0508) (layers *.Cu *.Mask)) + (pad "" thru_hole rect (at -1.524 0) (size 2.286 0.254) (drill 0.762) (layers *.Cu *.Mask F.SilkS)) + (pad "" thru_hole rect (at 0 1.524) (size 0.254 2.794) (drill 0.762) (layers *.Cu *.Mask F.SilkS)) + (pad "" thru_hole rect (at 1.524 0) (size 2.794 0.254) (drill 0.762) (layers *.Cu *.Mask F.SilkS)) ) (module MIRE (layer Composant) (tedit 200000) (tstamp 4B3A2BA7) (at 88.265 131.826) - (fp_text reference MIRE (at -0.127 4.572) (layer Dessus.SilkS) hide + (fp_text reference MIRE (at -0.127 4.572) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value * (at 3.302 2.794) (layer Dessus.SilkS) hide - (effects (font (size 1.524 1.524) (thickness 0.2032))) - ) - (fp_circle (center 0 0) (end 2.54 1.905) (layer Dessus.SilkS) (width 0.381)) - (pad "" thru_hole rect (at -1.524 0) (size 2.794 0.254) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole rect (at 0 -1.524) (size 0.254 2.794) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole circle (at 0 0) (size 0.254 0.254) (drill 0.0508) - (layers *.Cu *.Mask) - ) - (pad "" thru_hole rect (at -1.524 0) (size 2.286 0.254) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole rect (at 0 1.524) (size 0.254 2.794) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole rect (at 1.524 0) (size 2.794 0.254) - (layers *.Cu *.Mask Dessus.SilkS) + (fp_text value * (at 3.302 2.794) (layer F.SilkS) hide + (effects (font (thickness 0.2032))) ) + (fp_circle (center 0 0) (end 2.54 1.905) (layer F.SilkS) (width 0.381)) + (pad "" thru_hole rect (at -1.524 0) (size 2.794 0.254) (drill 0.762) (layers *.Cu *.Mask F.SilkS)) + (pad "" thru_hole rect (at 0 -1.524) (size 0.254 2.794) (drill 0.762) (layers *.Cu *.Mask F.SilkS)) + (pad "" thru_hole circle (at 0 0) (size 0.254 0.254) (drill 0.0508) (layers *.Cu *.Mask)) + (pad "" thru_hole rect (at -1.524 0) (size 2.286 0.254) (drill 0.762) (layers *.Cu *.Mask F.SilkS)) + (pad "" thru_hole rect (at 0 1.524) (size 0.254 2.794) (drill 0.762) (layers *.Cu *.Mask F.SilkS)) + (pad "" thru_hole rect (at 1.524 0) (size 2.794 0.254) (drill 0.762) (layers *.Cu *.Mask F.SilkS)) ) (module MIRE (layer Composant) (tedit 200000) (tstamp 4B3A2BAD) (at 188.595 131.826) - (fp_text reference MIRE (at -0.127 4.572) (layer Dessus.SilkS) hide + (fp_text reference MIRE (at -0.127 4.572) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value * (at 3.302 2.794) (layer Dessus.SilkS) hide - (effects (font (size 1.524 1.524) (thickness 0.2032))) - ) - (fp_circle (center 0 0) (end 2.54 1.905) (layer Dessus.SilkS) (width 0.381)) - (pad "" thru_hole rect (at -1.524 0) (size 2.794 0.254) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole rect (at 0 -1.524) (size 0.254 2.794) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole circle (at 0 0) (size 0.254 0.254) (drill 0.0508) - (layers *.Cu *.Mask) - ) - (pad "" thru_hole rect (at -1.524 0) (size 2.286 0.254) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole rect (at 0 1.524) (size 0.254 2.794) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole rect (at 1.524 0) (size 2.794 0.254) - (layers *.Cu *.Mask Dessus.SilkS) + (fp_text value * (at 3.302 2.794) (layer F.SilkS) hide + (effects (font (thickness 0.2032))) ) + (fp_circle (center 0 0) (end 2.54 1.905) (layer F.SilkS) (width 0.381)) + (pad "" thru_hole rect (at -1.524 0) (size 2.794 0.254) (drill 0.762) (layers *.Cu *.Mask F.SilkS)) + (pad "" thru_hole rect (at 0 -1.524) (size 0.254 2.794) (drill 0.762) (layers *.Cu *.Mask F.SilkS)) + (pad "" thru_hole circle (at 0 0) (size 0.254 0.254) (drill 0.0508) (layers *.Cu *.Mask)) + (pad "" thru_hole rect (at -1.524 0) (size 2.286 0.254) (drill 0.762) (layers *.Cu *.Mask F.SilkS)) + (pad "" thru_hole rect (at 0 1.524) (size 0.254 2.794) (drill 0.762) (layers *.Cu *.Mask F.SilkS)) + (pad "" thru_hole rect (at 1.524 0) (size 2.794 0.254) (drill 0.762) (layers *.Cu *.Mask F.SilkS)) ) (module CP6 (layer Composant) (tedit 200000) (tstamp 4B4B1727) @@ -2298,30 +1976,26 @@ (descr "Condensateur polarise") (tags CP) (path /4B4B15E7) - (fp_text reference C10 (at 0 0) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text reference C10 (at 0 0) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) - (fp_text value 10uF (at 0.635 0) (layer Dessus.SilkS) hide - (effects (font (size 1.524 1.524) (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)) - (pad 1 thru_hole rect (at -7.62 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 15 N-000010) - ) - (pad 2 thru_hole circle (at 7.62 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 14 N-000005) + (fp_text value 10uF (at 0.635 0) (layer F.SilkS) hide + (effects (font (thickness 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.8128) (layers *.Cu *.Mask F.SilkS) + (net 15 N-000010)) + (pad 2 thru_hole circle (at 7.62 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 14 N-000005)) (model discret/c_pol.wrl (at (xyz 0 0 0)) (scale (xyz 0.6 0.6 0.6)) @@ -2334,30 +2008,26 @@ (descr "Condensateur polarise") (tags CP) (path /4B4B15D9) - (fp_text reference C11 (at 0 0 90) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text reference C11 (at 0 0 90) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) - (fp_text value 10uF (at 0.635 0 90) (layer Dessus.SilkS) hide - (effects (font (size 1.524 1.524) (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)) - (pad 1 thru_hole rect (at -7.62 0 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 12 GND) - ) - (pad 2 thru_hole circle (at 7.62 0 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 2 -VAA) + (fp_text value 10uF (at 0.635 0 90) (layer F.SilkS) hide + (effects (font (thickness 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 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 12 GND)) + (pad 2 thru_hole circle (at 7.62 0 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 2 -VAA)) (model discret/c_pol.wrl (at (xyz 0 0 0)) (scale (xyz 0.6 0.6 0.6)) @@ -2370,32 +2040,26 @@ (descr "Regulateur TO92 serie LM78Lxx") (tags "TR TO92") (path /4B4B1532) - (fp_text reference U2 (at -1.905 3.81 90) (layer Dessus.SilkS) + (fp_text reference U2 (at -1.905 3.81 90) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value 78L05 (at -1.27 -5.08 90) (layer Dessus.SilkS) + (fp_text value 78L05 (at -1.27 -5.08 90) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start -1.27 2.54) (end 2.54 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.27) (end 2.54 -2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -2.54) (end 1.27 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 1.27 -3.81) (end -1.27 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -1.27 -3.81) (end -3.81 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.81 1.27) (end -2.54 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -2.54 2.54) (end -1.27 2.54) (layer Dessus.SilkS) (width 0.3048)) - (pad VI thru_hole circle (at 1.27 -1.27 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 1 +12V) - ) - (pad GND thru_hole rect (at -1.27 -1.397 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 12 GND) - ) - (pad VO thru_hole circle (at -1.27 1.27 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 50 VCC) - ) + (fp_line (start -1.27 2.54) (end 2.54 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.27) (end 2.54 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -2.54) (end 1.27 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 1.27 -3.81) (end -1.27 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -1.27 -3.81) (end -3.81 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.81 1.27) (end -2.54 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -2.54 2.54) (end -1.27 2.54) (layer F.SilkS) (width 0.3048)) + (pad VI thru_hole circle (at 1.27 -1.27 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 1 +12V)) + (pad GND thru_hole rect (at -1.27 -1.397 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 12 GND)) + (pad VO thru_hole circle (at -1.27 1.27 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 50 VCC)) (model discret/to98.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -2408,25 +2072,21 @@ (descr "Condensateur = 2 pas") (tags C) (path /4B3A13A4/4B4F3641) - (fp_text reference C14 (at 0 0) (layer Dessus.SilkS) + (fp_text reference C14 (at 0 0) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value 150nF (at 0 0) (layer Dessus.SilkS) hide + (fp_text value 150nF (at 0 0) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start -3.556 -1.016) (end 3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.556 -1.016) (end 3.556 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.556 1.016) (end -3.556 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.556 1.016) (end -3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.556 -0.508) (end -3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -2.54 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 36 N-000035) - ) - (pad 2 thru_hole circle (at 2.54 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 12 GND) - ) + (fp_line (start -3.556 -1.016) (end 3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.556 -1.016) (end 3.556 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.556 1.016) (end -3.556 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.556 1.016) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.556 -0.508) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -2.54 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 36 N-000035)) + (pad 2 thru_hole circle (at 2.54 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 12 GND)) (model discret/capa_2pas_5x5mm.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -2439,25 +2099,21 @@ (descr "Condensateur = 2 pas") (tags C) (path /4B3A1333/4B4F3641) - (fp_text reference C12 (at 0 0) (layer Dessus.SilkS) + (fp_text reference C12 (at 0 0) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value 150nF (at 0 0) (layer Dessus.SilkS) hide + (fp_text value 150nF (at 0 0) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start -3.556 -1.016) (end 3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.556 -1.016) (end 3.556 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.556 1.016) (end -3.556 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.556 1.016) (end -3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.556 -0.508) (end -3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -2.54 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 19 N-000014) - ) - (pad 2 thru_hole circle (at 2.54 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 12 GND) - ) + (fp_line (start -3.556 -1.016) (end 3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.556 -1.016) (end 3.556 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.556 1.016) (end -3.556 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.556 1.016) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.556 -0.508) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -2.54 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 19 N-000014)) + (pad 2 thru_hole circle (at 2.54 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 12 GND)) (model discret/capa_2pas_5x5mm.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -2471,28 +2127,24 @@ (tags R) (path /4B3A1333/4B4F363E) (autoplace_cost180 10) - (fp_text reference R23 (at 0 0 180) (layer Dessus.SilkS) + (fp_text reference R23 (at 0 0 180) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 1K (at 0 0 180) (layer Dessus.SilkS) hide + (fp_text value 1K (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)) - (pad 1 thru_hole circle (at -3.81 0 180) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 19 N-000014) - ) - (pad 2 thru_hole circle (at 3.81 0 180) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 7 /ampli_h4) - ) + (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.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 19 N-000014)) + (pad 2 thru_hole circle (at 3.81 0 180) (size 1.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 7 /ampli_h4)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -2506,28 +2158,24 @@ (tags R) (path /4B3A13A4/4B4F363E) (autoplace_cost180 10) - (fp_text reference R24 (at 0 0 180) (layer Dessus.SilkS) + (fp_text reference R24 (at 0 0 180) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 1K (at 0 0 180) (layer Dessus.SilkS) hide + (fp_text value 1K (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)) - (pad 1 thru_hole circle (at -3.81 0 180) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 36 N-000035) - ) - (pad 2 thru_hole circle (at 3.81 0 180) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 /ampli_h6) - ) + (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.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 36 N-000035)) + (pad 2 thru_hole circle (at 3.81 0 180) (size 1.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 9 /ampli_h6)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -2540,30 +2188,26 @@ (descr "Diode 3 pas") (tags "DIODE DEV") (path /4B3A13A4/4B616AFA) - (fp_text reference D9 (at 0 0 270) (layer Dessus.SilkS) + (fp_text reference D9 (at 0 0 270) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value 1N4148 (at 0 0 270) (layer Dessus.SilkS) hide + (fp_text value 1N4148 (at 0 0 270) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start 3.81 0) (end 3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 0) (end 3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 -1.016) (end -3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.81 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.048 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 1.016) (end 3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (pad 2 thru_hole rect (at 3.81 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 45 N-000044) - ) - (pad 1 thru_hole circle (at -3.81 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 48 N-000047) - ) + (fp_line (start 3.81 0) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 0) (end 3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 -1.016) (end -3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.81 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 1.016) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 2 thru_hole rect (at 3.81 0 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 45 N-000044)) + (pad 1 thru_hole circle (at -3.81 0 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 48 N-000047)) (model discret/diode.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -2576,30 +2220,26 @@ (descr "Diode 3 pas") (tags "DIODE DEV") (path /4B3A1333/4B616AFA) - (fp_text reference D8 (at 0 0 270) (layer Dessus.SilkS) + (fp_text reference D8 (at 0 0 270) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value 1N4148 (at 0 0 270) (layer Dessus.SilkS) hide + (fp_text value 1N4148 (at 0 0 270) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start 3.81 0) (end 3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 0) (end 3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 -1.016) (end -3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.81 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.048 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 1.016) (end 3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (pad 2 thru_hole rect (at 3.81 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 28 N-000023) - ) - (pad 1 thru_hole circle (at -3.81 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 31 N-000026) - ) + (fp_line (start 3.81 0) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 0) (end 3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 -1.016) (end -3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.81 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 1.016) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 2 thru_hole rect (at 3.81 0 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 28 N-000023)) + (pad 1 thru_hole circle (at -3.81 0 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 31 N-000026)) (model discret/diode.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -2613,28 +2253,24 @@ (tags R) (path /4B3A1333/4B616B96) (autoplace_cost180 10) - (fp_text reference R25 (at 0 0 180) (layer Dessus.SilkS) + (fp_text reference R25 (at 0 0 180) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 47 (at 0 0 180) (layer Dessus.SilkS) hide + (fp_text value 47 (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)) - (pad 1 thru_hole circle (at -3.81 0 180) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 6 /ampli_h3) - ) - (pad 2 thru_hole circle (at 3.81 0 180) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 22 N-000017) - ) + (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.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 6 /ampli_h3)) + (pad 2 thru_hole circle (at 3.81 0 180) (size 1.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 22 N-000017)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -2648,28 +2284,24 @@ (tags R) (path /4B3A1333/4B617B88) (autoplace_cost180 10) - (fp_text reference R26 (at 0 0 270) (layer Dessus.SilkS) + (fp_text reference R26 (at 0 0 270) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 220K (at 0 0 270) (layer Dessus.SilkS) hide + (fp_text value 220K (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)) - (pad 1 thru_hole circle (at -3.81 0 270) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 10 /ampli_h7) - ) - (pad 2 thru_hole circle (at 3.81 0 270) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 21 N-000016) - ) + (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.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 10 /ampli_h7)) + (pad 2 thru_hole circle (at 3.81 0 270) (size 1.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 21 N-000016)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -2683,28 +2315,24 @@ (tags R) (path /4B3A13A4/4B616B96) (autoplace_cost180 10) - (fp_text reference R27 (at 0 0 180) (layer Dessus.SilkS) + (fp_text reference R27 (at 0 0 180) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 47 (at 0 0 180) (layer Dessus.SilkS) hide + (fp_text value 47 (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)) - (pad 1 thru_hole circle (at -3.81 0 180) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 8 /ampli_h5) - ) - (pad 2 thru_hole circle (at 3.81 0 180) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 39 N-000038) - ) + (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.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 8 /ampli_h5)) + (pad 2 thru_hole circle (at 3.81 0 180) (size 1.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 39 N-000038)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -2718,28 +2346,24 @@ (tags R) (path /4B3A13A4/4B617B88) (autoplace_cost180 10) - (fp_text reference R28 (at 0 0 270) (layer Dessus.SilkS) + (fp_text reference R28 (at 0 0 270) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 220K (at 0 0 270) (layer Dessus.SilkS) hide + (fp_text value 220K (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)) - (pad 1 thru_hole circle (at -3.81 0 270) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 11 /ampli_h8) - ) - (pad 2 thru_hole circle (at 3.81 0 270) (size 1.651 1.651) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 38 N-000037) - ) + (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.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 11 /ampli_h8)) + (pad 2 thru_hole circle (at 3.81 0 270) (size 1.651 1.651) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 38 N-000037)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -2753,10 +2377,10 @@ (gr_text "Actionneur\nPiezo New Amp\nV02" (at 176.149 64.643) (layer Cuivre) (effects (font (size 2.032 1.524) (thickness 0.3048)) (justify mirror)) ) - (gr_line (start 88.265 131.826) (end 88.265 51.816) (angle 90) (layer Contours.Ci) (width 0.2032)) - (gr_line (start 188.595 131.826) (end 88.265 131.826) (angle 90) (layer Contours.Ci) (width 0.2032)) - (gr_line (start 188.595 51.816) (end 188.595 131.826) (angle 90) (layer Contours.Ci) (width 0.2032)) - (gr_line (start 88.265 51.816) (end 188.595 51.816) (angle 90) (layer Contours.Ci) (width 0.2032)) + (gr_line (start 88.265 131.826) (end 88.265 51.816) (angle 90) (layer Edge.Cuts) (width 0.2032)) + (gr_line (start 188.595 131.826) (end 88.265 131.826) (angle 90) (layer Edge.Cuts) (width 0.2032)) + (gr_line (start 188.595 51.816) (end 188.595 131.826) (angle 90) (layer Edge.Cuts) (width 0.2032)) + (gr_line (start 88.265 51.816) (end 188.595 51.816) (angle 90) (layer Edge.Cuts) (width 0.2032)) (segment (start 91.6686 87.249) (end 98.298 87.249) (width 0.6096) (layer Cuivre) (net 1)) (segment (start 99.695 88.646) (end 107.315 88.646) (width 0.6096) (layer Cuivre) (net 1) (status 400)) From e460b4a5240130caa6b44157bfad42867080f24d Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Mon, 30 Jun 2014 10:03:20 -0500 Subject: [PATCH 535/741] fix export_gencad.cpp --- include/layers_id_colors_and_visibility.h | 3 +- pcbnew/class_board.cpp | 5 +- pcbnew/class_board.h | 2 +- pcbnew/dialogs/dialog_copper_zones.cpp | 4 +- pcbnew/exporters/export_gencad.cpp | 261 ++++++++++----------- pcbnew/pcb_plot_params.cpp | 15 +- pcbnew/zones_non_copper_type_functions.cpp | 4 +- 7 files changed, 141 insertions(+), 153 deletions(-) diff --git a/include/layers_id_colors_and_visibility.h b/include/layers_id_colors_and_visibility.h index 095d8281ba..fa71f9b8c9 100644 --- a/include/layers_id_colors_and_visibility.h +++ b/include/layers_id_colors_and_visibility.h @@ -1,6 +1,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * + * Copyright (C) 2014 SoftPLC Corporation, Dick Hollenbeck * Copyright (C) 2010 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 2007 KiCad Developers, see change_log.txt for contributors. * @@ -106,7 +107,7 @@ enum LAYER_ID Edge_Cuts, Margin, - F_CrtYd, // CrtYd & Body are footprint only + F_CrtYd, // CrtYd & Fab are footprint only B_CrtYd, F_Fab, B_Fab, diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index fa5a5325e2..8e3ac850cd 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -323,11 +323,8 @@ bool BOARD::SetLayer( LAYER_ID aIndex, const LAYER& aLayer ) } -wxString BOARD::GetLayerName( LAYER_ID aLayer ) const +const wxString BOARD::GetLayerName( LAYER_ID aLayer ) const { - if( !IsPcbLayer( aLayer ) ) - return wxEmptyString; - // All layer names are stored in the BOARD. if( IsLayerEnabled( aLayer ) ) { diff --git a/pcbnew/class_board.h b/pcbnew/class_board.h index 07d2e41b49..d7b1a0c245 100644 --- a/pcbnew/class_board.h +++ b/pcbnew/class_board.h @@ -644,7 +644,7 @@ public: * @return wxString - the layer name, which for copper layers may * be custom, else standard. */ - wxString GetLayerName( LAYER_ID aLayer ) const; + const wxString GetLayerName( LAYER_ID aLayer ) const; /** * Function SetLayerName diff --git a/pcbnew/dialogs/dialog_copper_zones.cpp b/pcbnew/dialogs/dialog_copper_zones.cpp index b39505a713..f92b132202 100644 --- a/pcbnew/dialogs/dialog_copper_zones.cpp +++ b/pcbnew/dialogs/dialog_copper_zones.cpp @@ -262,7 +262,9 @@ void DIALOG_COPPER_ZONE::initDialog() m_LayerId.push_back( layer ); - msg = board->GetLayerName( layer ).Trim(); + msg = board->GetLayerName( layer ); + + msg.Trim(); EDA_COLOR_T layerColor = board->GetLayerColor( layer ); diff --git a/pcbnew/exporters/export_gencad.cpp b/pcbnew/exporters/export_gencad.cpp index 5d166c5882..648aebc60d 100644 --- a/pcbnew/exporters/export_gencad.cpp +++ b/pcbnew/exporters/export_gencad.cpp @@ -99,24 +99,20 @@ static const wxString GenCADLayerNameFlipped[32] = static std::string GenCADLayerName( int aCuCount, LAYER_ID aId ) { - char tmp[60]; - if( IsCopperLayer( aId ) ) { if( aId == F_Cu ) return "TOP"; else if( aId == B_Cu ) - return "BOTTON"; + return "BOTTOM"; else if( aId <= 14 ) { - int len = sprintf( tmp, "INNER%d", aCuCount - aId ); - return std::string( tmp, len ); + return StrPrintf( "INNER%d", aCuCount - aId - 1 ); } else { - int len = sprintf( tmp, "LAYER%d", aId ); - return std::string( tmp, len ); + return StrPrintf( "LAYER%d", aId ); } } @@ -161,73 +157,65 @@ static std::string GenCADLayerName( int aCuCount, LAYER_ID aId ) }; +static const LAYER_ID gc_seq[] = { + B_Cu, + In30_Cu, + In29_Cu, + In28_Cu, + In27_Cu, + In26_Cu, + In25_Cu, + In24_Cu, + In23_Cu, + In22_Cu, + In21_Cu, + In20_Cu, + In19_Cu, + In18_Cu, + In17_Cu, + In16_Cu, + In15_Cu, + In14_Cu, + In13_Cu, + In12_Cu, + In11_Cu, + In10_Cu, + In9_Cu, + In8_Cu, + In7_Cu, + In6_Cu, + In5_Cu, + In4_Cu, + In3_Cu, + In2_Cu, + In1_Cu, + F_Cu, +}; + + // flipped layer name for Gencad export (to make CAM350 imports correct) static std::string GenCADLayerNameFlipped( int aCuCount, LAYER_ID aId ) { - char tmp[60]; - - if( IsCopperLayer( aId ) ) + if( 1<= aId && aId <= 14 ) { - if( aId == F_Cu ) - return "BOTTOM"; - else if( aId == B_Cu ) - return "TOP"; - - else if( aId <= 14 ) - { - int len = sprintf( tmp, "INNER%d", aId ); - return std::string( tmp, len ); - } - else - { - int len = sprintf( tmp, "LAYER%d", aId ); // this is probably wrong, need help. - return std::string( tmp, len ); - } + return StrPrintf( "INNER%d", 14 - aId ); } - else - { - const char* txt; - - // using a switch to clearly show mapping & catch out of bounds index. - switch( aId ) - { - // Technicals - case F_Adhes: txt = "B.Adhes"; break; - case B_Adhes: txt = "F.Adhes"; break; - case F_Paste: txt = "SOLDERPASTE_BOTTOM"; break; - case B_Paste: txt = "SOLDERPASTE_TOP"; break; - case F_SilkS: txt = "SILKSCREEN_BOTTOM"; break; - case B_SilkS: txt = "SILKSCREEN_TOP"; break; - case F_Mask: txt = "SOLDERMASK_BOTTOM"; break; - case B_Mask: txt = "SOLDERMASK_TOP"; break; - - // Users - case Dwgs_User: txt = "Dwgs.User"; break; - case Cmts_User: txt = "Cmts.User"; break; - case Eco1_User: txt = "Eco1.User"; break; - case Eco2_User: txt = "Eco2.User"; break; - case Edge_Cuts: txt = "Edge.Cuts"; break; - case Margin: txt = "Margin"; break; - - // Footprint - case B_CrtYd: txt = "F_CrtYd"; break; - case F_CrtYd: txt = "B_CrtYd"; break; - case B_Fab: txt = "F_Fab"; break; - case F_Fab: txt = "B_Fab"; break; - - default: - wxASSERT_MSG( 0, wxT( "aId UNEXPECTED" ) ); - txt = "BAD-INDEX!"; break; - } - - return txt; - } + return GenCADLayerName( aCuCount, aId ); }; #endif +static std::string fmt_mask( LSET aSet ) +{ +#if 0 + return aSet.FmtHex(); +#else + return StrPrintf( "%08x", (unsigned) ( aSet & LSET::AllCuMask() ).to_ulong() ); +#endif +} + // These are the export origin (the auxiliary axis) static int GencadOffsetX, GencadOffsetY; @@ -255,9 +243,6 @@ static double MapYTo( int aY ) /* Driver function: processing starts here */ void PCB_EDIT_FRAME::ExportToGenCAD( wxCommandEvent& aEvent ) { - -#if 0 // working on this 30-Jun-14, not ready yet, failed the initial testing. - wxFileName fn = GetBoard()->GetFileName(); FILE* file; @@ -347,8 +332,6 @@ void PCB_EDIT_FRAME::ExportToGenCAD( wxCommandEvent& aEvent ) module->SetFlag( 0 ); } } -#endif - } @@ -426,9 +409,11 @@ static void CreatePadsShapesSection( FILE* aFile, BOARD* aPcb ) // Emit vias pads TRACK* old_via = 0; + for( unsigned i = 0; i < vias.size(); i++ ) { VIA* via = vias[i]; + if( old_via && 0 == ViaSort( &old_via, &via ) ) continue; @@ -436,7 +421,7 @@ static void CreatePadsShapesSection( FILE* aFile, BOARD* aPcb ) viastacks.push_back( via ); fprintf( aFile, "PAD V%d.%d.%s ROUND %g\nCIRCLE 0 0 %g\n", via->GetWidth(), via->GetDrillValue(), - via->GetLayerSet().FmtHex().c_str(), + fmt_mask( via->GetLayerSet() ).c_str(), via->GetDrillValue() / SCALE_FACTOR, via->GetWidth() / (SCALE_FACTOR * 2) ); } @@ -490,75 +475,75 @@ static void CreatePadsShapesSection( FILE* aFile, BOARD* aPcb ) break; case PAD_OVAL: // Create outline by 2 lines and 2 arcs - { - // OrCAD Layout call them OVAL or OBLONG - GenCAD call them FINGERs - fprintf( aFile, " FINGER %g\n", - pad->GetDrillSize().x / SCALE_FACTOR ); - int dr = dx - dy; - - if( dr >= 0 ) // Horizontal oval { - int radius = dy; - fprintf( aFile, "LINE %g %g %g %g\n", - (-dr + pad->GetOffset().x) / SCALE_FACTOR, - (-pad->GetOffset().y - radius) / SCALE_FACTOR, - (dr + pad->GetOffset().x ) / SCALE_FACTOR, - (-pad->GetOffset().y - radius) / SCALE_FACTOR ); + // OrCAD Layout call them OVAL or OBLONG - GenCAD call them FINGERs + fprintf( aFile, " FINGER %g\n", + pad->GetDrillSize().x / SCALE_FACTOR ); + int dr = dx - dy; - // GenCAD arcs are (start, end, center) - fprintf( aFile, "ARC %g %g %g %g %g %g\n", - (dr + pad->GetOffset().x) / SCALE_FACTOR, - (-pad->GetOffset().y - radius) / SCALE_FACTOR, - (dr + pad->GetOffset().x) / SCALE_FACTOR, - (-pad->GetOffset().y + radius) / SCALE_FACTOR, - (dr + pad->GetOffset().x) / SCALE_FACTOR, - -pad->GetOffset().y / SCALE_FACTOR ); + if( dr >= 0 ) // Horizontal oval + { + int radius = dy; + fprintf( aFile, "LINE %g %g %g %g\n", + (-dr + pad->GetOffset().x) / SCALE_FACTOR, + (-pad->GetOffset().y - radius) / SCALE_FACTOR, + (dr + pad->GetOffset().x ) / SCALE_FACTOR, + (-pad->GetOffset().y - radius) / SCALE_FACTOR ); - fprintf( aFile, "LINE %g %g %g %g\n", - (dr + pad->GetOffset().x) / SCALE_FACTOR, - (-pad->GetOffset().y + radius) / SCALE_FACTOR, - (-dr + pad->GetOffset().x) / SCALE_FACTOR, - (-pad->GetOffset().y + radius) / SCALE_FACTOR ); - fprintf( aFile, "ARC %g %g %g %g %g %g\n", - (-dr + pad->GetOffset().x) / SCALE_FACTOR, - (-pad->GetOffset().y + radius) / SCALE_FACTOR, - (-dr + pad->GetOffset().x) / SCALE_FACTOR, - (-pad->GetOffset().y - radius) / SCALE_FACTOR, - (-dr + pad->GetOffset().x) / SCALE_FACTOR, - -pad->GetOffset().y / SCALE_FACTOR ); - } - else // Vertical oval - { - dr = -dr; - int radius = dx; - fprintf( aFile, "LINE %g %g %g %g\n", - (-radius + pad->GetOffset().x) / SCALE_FACTOR, - (-pad->GetOffset().y - dr) / SCALE_FACTOR, - (-radius + pad->GetOffset().x ) / SCALE_FACTOR, - (-pad->GetOffset().y + dr) / SCALE_FACTOR ); - fprintf( aFile, "ARC %g %g %g %g %g %g\n", - (-radius + pad->GetOffset().x ) / SCALE_FACTOR, - (-pad->GetOffset().y + dr) / SCALE_FACTOR, - (radius + pad->GetOffset().x ) / SCALE_FACTOR, - (-pad->GetOffset().y + dr) / SCALE_FACTOR, - pad->GetOffset().x / SCALE_FACTOR, - (-pad->GetOffset().y + dr) / SCALE_FACTOR ); + // GenCAD arcs are (start, end, center) + fprintf( aFile, "ARC %g %g %g %g %g %g\n", + (dr + pad->GetOffset().x) / SCALE_FACTOR, + (-pad->GetOffset().y - radius) / SCALE_FACTOR, + (dr + pad->GetOffset().x) / SCALE_FACTOR, + (-pad->GetOffset().y + radius) / SCALE_FACTOR, + (dr + pad->GetOffset().x) / SCALE_FACTOR, + -pad->GetOffset().y / SCALE_FACTOR ); - fprintf( aFile, "LINE %g %g %g %g\n", - (radius + pad->GetOffset().x) / SCALE_FACTOR, - (-pad->GetOffset().y + dr) / SCALE_FACTOR, - (radius + pad->GetOffset().x) / SCALE_FACTOR, - (-pad->GetOffset().y - dr) / SCALE_FACTOR ); - fprintf( aFile, "ARC %g %g %g %g %g %g\n", - (radius + pad->GetOffset().x) / SCALE_FACTOR, - (-pad->GetOffset().y - dr) / SCALE_FACTOR, - (-radius + pad->GetOffset().x) / SCALE_FACTOR, - (-pad->GetOffset().y - dr) / SCALE_FACTOR, - pad->GetOffset().x / SCALE_FACTOR, - (-pad->GetOffset().y - dr) / SCALE_FACTOR ); + fprintf( aFile, "LINE %g %g %g %g\n", + (dr + pad->GetOffset().x) / SCALE_FACTOR, + (-pad->GetOffset().y + radius) / SCALE_FACTOR, + (-dr + pad->GetOffset().x) / SCALE_FACTOR, + (-pad->GetOffset().y + radius) / SCALE_FACTOR ); + fprintf( aFile, "ARC %g %g %g %g %g %g\n", + (-dr + pad->GetOffset().x) / SCALE_FACTOR, + (-pad->GetOffset().y + radius) / SCALE_FACTOR, + (-dr + pad->GetOffset().x) / SCALE_FACTOR, + (-pad->GetOffset().y - radius) / SCALE_FACTOR, + (-dr + pad->GetOffset().x) / SCALE_FACTOR, + -pad->GetOffset().y / SCALE_FACTOR ); + } + else // Vertical oval + { + dr = -dr; + int radius = dx; + fprintf( aFile, "LINE %g %g %g %g\n", + (-radius + pad->GetOffset().x) / SCALE_FACTOR, + (-pad->GetOffset().y - dr) / SCALE_FACTOR, + (-radius + pad->GetOffset().x ) / SCALE_FACTOR, + (-pad->GetOffset().y + dr) / SCALE_FACTOR ); + fprintf( aFile, "ARC %g %g %g %g %g %g\n", + (-radius + pad->GetOffset().x ) / SCALE_FACTOR, + (-pad->GetOffset().y + dr) / SCALE_FACTOR, + (radius + pad->GetOffset().x ) / SCALE_FACTOR, + (-pad->GetOffset().y + dr) / SCALE_FACTOR, + pad->GetOffset().x / SCALE_FACTOR, + (-pad->GetOffset().y + dr) / SCALE_FACTOR ); + + fprintf( aFile, "LINE %g %g %g %g\n", + (radius + pad->GetOffset().x) / SCALE_FACTOR, + (-pad->GetOffset().y + dr) / SCALE_FACTOR, + (radius + pad->GetOffset().x) / SCALE_FACTOR, + (-pad->GetOffset().y - dr) / SCALE_FACTOR ); + fprintf( aFile, "ARC %g %g %g %g %g %g\n", + (radius + pad->GetOffset().x) / SCALE_FACTOR, + (-pad->GetOffset().y - dr) / SCALE_FACTOR, + (-radius + pad->GetOffset().x) / SCALE_FACTOR, + (-pad->GetOffset().y - dr) / SCALE_FACTOR, + pad->GetOffset().x / SCALE_FACTOR, + (-pad->GetOffset().y - dr) / SCALE_FACTOR ); + } } break; - } case PAD_TRAPEZOID: fprintf( aFile, " POLYGON %g\n", @@ -583,16 +568,16 @@ static void CreatePadsShapesSection( FILE* aFile, BOARD* aPcb ) fprintf( aFile, "PADSTACK VIA%d.%d.%s %g\n", via->GetWidth(), via->GetDrillValue(), - mask.FmtHex().c_str(), + fmt_mask( mask ).c_str(), via->GetDrillValue() / SCALE_FACTOR ); - for( LSEQ seq = mask.Seq(); seq; ++seq ) + for( LSEQ seq = mask.Seq( gc_seq, DIM( gc_seq ) ); seq; ++seq ) { LAYER_ID layer = *seq; fprintf( aFile, "PAD V%d.%d.%s %s 0 0\n", via->GetWidth(), via->GetDrillValue(), - mask.FmtHex().c_str(), + fmt_mask( mask ).c_str(), GenCADLayerName( cu_count, layer ).c_str() ); } @@ -612,7 +597,8 @@ static void CreatePadsShapesSection( FILE* aFile, BOARD* aPcb ) LSET pad_set = pad->GetLayerSet() & master_layermask; - for( LSEQ seq = pad_set.Seq(); seq; ++seq ) + // the special gc_seq + for( LSEQ seq = pad_set.Seq( gc_seq, DIM( gc_seq ) ); seq; ++seq ) { LAYER_ID layer = *seq; @@ -622,6 +608,7 @@ static void CreatePadsShapesSection( FILE* aFile, BOARD* aPcb ) // Flipped padstack fprintf( aFile, "PADSTACK PAD%dF %g\n", i, pad->GetDrillSize().x / SCALE_FACTOR ); + // the normal LAYER_ID sequence is inverted from gc_seq[] for( LSEQ seq = pad_set.Seq(); seq; ++seq ) { LAYER_ID layer = *seq; @@ -990,7 +977,7 @@ static void CreateRoutesSection( FILE* aFile, BOARD* aPcb ) fprintf( aFile, "VIA VIA%d.%d.%s %g %g ALL %g via%d\n", via->GetWidth(), via->GetDrillValue(), - vset.FmtHex().c_str(), + fmt_mask( vset ).c_str(), MapXTo( via->GetStart().x ), MapYTo( via->GetStart().y ), via->GetDrillValue() / SCALE_FACTOR, vianum++ ); } diff --git a/pcbnew/pcb_plot_params.cpp b/pcbnew/pcb_plot_params.cpp index 9508956010..ea2993fe1e 100644 --- a/pcbnew/pcb_plot_params.cpp +++ b/pcbnew/pcb_plot_params.cpp @@ -129,13 +129,10 @@ void PCB_PLOT_PARAMS::Format( OUTPUTFORMATTER* aFormatter, aFormatter->Print( aNestLevel+1, "(%s 0x%s)\n", getTokenName( T_layerselection ), m_layerSelection.FmtHex().c_str() ); - aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_usegerberextensions ), - m_useGerberExtensions ? trueStr : falseStr ); - aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_usegerberextensions ), m_useGerberExtensions ? trueStr : falseStr ); - if( m_useGerberAttributes ) // save this option only if active, + if( m_useGerberAttributes ) // save this option only if active, // to avoid incompatibility with older Pcbnew version aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_usegerberattributes ), trueStr ); @@ -153,10 +150,12 @@ void PCB_PLOT_PARAMS::Format( OUTPUTFORMATTER* aFormatter, m_useAuxOrigin ? trueStr : falseStr ); aFormatter->Print( aNestLevel+1, "(%s %d)\n", getTokenName( T_hpglpennumber ), m_HPGLPenNum ); -// Obsolete parameter, pen speed is no more managed, because hpgl format -// is now an export format, and for this, pen speed has no meaning -// aFormatter->Print( aNestLevel+1, "(%s %d)\n", getTokenName( T_hpglpenspeed ), -// m_HPGLPenSpeed ); + + // Obsolete parameter, pen speed is no more managed, because hpgl format + // is now an export format, and for this, pen speed has no meaning + // aFormatter->Print( aNestLevel+1, "(%s %d)\n", getTokenName( T_hpglpenspeed ), + // m_HPGLPenSpeed ); + aFormatter->Print( aNestLevel+1, "(%s %d)\n", getTokenName( T_hpglpenspeed ), m_HPGLPenSpeed ); aFormatter->Print( aNestLevel+1, "(%s %d)\n", getTokenName( T_hpglpendiameter ), diff --git a/pcbnew/zones_non_copper_type_functions.cpp b/pcbnew/zones_non_copper_type_functions.cpp index 8b35156828..a6b5e17f9c 100644 --- a/pcbnew/zones_non_copper_type_functions.cpp +++ b/pcbnew/zones_non_copper_type_functions.cpp @@ -105,7 +105,9 @@ void DIALOG_NON_COPPER_ZONES_EDITOR::Init() { LAYER_ID layer = *seq; - wxString msg = m_Parent->GetBoard()->GetLayerName( layer ).Trim(); + wxString msg = m_Parent->GetBoard()->GetLayerName( layer ); + + msg.Trim(); m_LayerSelectionCtrl->InsertItems( 1, &msg, ii ); From a543f99eb30bff3f73189a2270c1be1dd6cbe102 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 30 Jun 2014 17:46:47 +0200 Subject: [PATCH 536/741] Enable technical layers when starting Pcbnew with no board. Use format 4.6 (full resolution of Pcbnew) in Gerber files to avoid the creation of self-intersecting polygons. --- common/common_plotGERBER_functions.cpp | 11 +++++++---- pcbnew/class_board_design_settings.cpp | 10 ++++++---- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/common/common_plotGERBER_functions.cpp b/common/common_plotGERBER_functions.cpp index 6937351149..fbed464092 100644 --- a/common/common_plotGERBER_functions.cpp +++ b/common/common_plotGERBER_functions.cpp @@ -29,10 +29,13 @@ void GERBER_PLOTTER::SetViewport( const wxPoint& aOffset, double aIusPerDecimil, m_gerberUnitInch = false; // Currently fixed, but could be an option // number of digits after the point (number of digits of the mantissa - // Be carefull: the coordinates are stored in an integer - // so 6 digits (inches) or 5 digits (mm) is the best value - // to avoid truncations and overflow - m_gerberUnitFmt = m_gerberUnitInch ? 6 : 5; + // Be carefull: the Gerber coordinates are stored in an integer + // so 6 digits (inches) or 5 digits (mm) is a good value + // To avoid overflow, 7 digits (inches) or 6 digits is a max. + // with lower values than 6 digits (inches) or 5 digits (mm), + // Creating self-intersecting polygons from non-intersecting polygons + // happen easily. + m_gerberUnitFmt = m_gerberUnitInch ? 7 : 6; m_IUsPerDecimil = aIusPerDecimil; iuPerDeviceUnit = pow( 10.0, m_gerberUnitFmt ) / ( aIusPerDecimil * 10000.0 ); diff --git a/pcbnew/class_board_design_settings.cpp b/pcbnew/class_board_design_settings.cpp index f3596ced4b..844eb4211f 100644 --- a/pcbnew/class_board_design_settings.cpp +++ b/pcbnew/class_board_design_settings.cpp @@ -56,14 +56,14 @@ BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS() : { LSET all_set = LSET().set(); - m_enabledLayers = all_set; // All layers enabled at first. - // SetCopperLayerCount() will adjust this. + m_enabledLayers = all_set; // All layers enabled at first. + // SetCopperLayerCount() will adjust this. SetVisibleLayers( all_set ); // set all but hidden text as visible. m_visibleElements = ~( 1 << MOD_TEXT_INVISIBLE ); - SetCopperLayerCount( 2 ); // Default design is a double sided board + SetCopperLayerCount( 2 ); // Default design is a double sided board // via type (VIA_BLIND_BURIED, VIA_THROUGH VIA_MICROVIA). m_CurrentViaType = VIA_THROUGH; @@ -350,7 +350,9 @@ void BOARD_DESIGN_SETTINGS::SetCopperLayerCount( int aNewLayerCount ) for( LAYER_NUM ii = LAYER_N_2; ii < aNewLayerCount - 1; ++ii ) m_enabledLayers |= GetLayerSet( ii ); #else - m_enabledLayers = LSET::AllCuMask( aNewLayerCount ); + // Update only enabled copper layers mask + m_enabledLayers &= ~LSET::AllCuMask(); + m_enabledLayers |= LSET::AllCuMask( aNewLayerCount ); #endif } From c6af2a7974903020d07f1ca6262508d7ac114ba6 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 30 Jun 2014 20:14:06 +0200 Subject: [PATCH 537/741] Fix a double minor bug about layers occupied by SMD pads and CONN pad: The default layer stack between these 2 types was swaped in pad definition, and also in the dialog pad properties. This double swap creates no bug, but creates bugs in the footprint wizards (SMD or CONN pads do not have the right layer stack) FYI, the CONN pad type should be removed soon. --- pcbnew/class_pad.cpp | 25 ++++-------------------- pcbnew/dialogs/dialog_pad_properties.cpp | 6 +++--- 2 files changed, 7 insertions(+), 24 deletions(-) diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index c47f5844ce..99baa92dfc 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -93,17 +93,17 @@ LSET D_PAD::StandardMask() } -LSET D_PAD::ConnMask() +LSET D_PAD::SMDMask() { - // was: #define PAD_CONN_DEFAULT_LAYERS LAYER_FRONT | SOLDERPASTE_LAYER_FRONT | SOLDERMASK_LAYER_FRONT + // was: #define PAD_SMD_DEFAULT_LAYERS LAYER_FRONT | SOLDERPASTE_LAYER_FRONT | SOLDERMASK_LAYER_FRONT static LSET saved( 3, F_Cu, F_Paste, F_Mask ); return saved; } -LSET D_PAD::SMDMask() +LSET D_PAD::ConnMask() { - // was: #define PAD_SMD_DEFAULT_LAYERS LAYER_FRONT | SOLDERMASK_LAYER_FRONT + // was: #define PAD_CONN_DEFAULT_LAYERS LAYER_FRONT | SOLDERMASK_LAYER_FRONT static LSET saved( 2, F_Cu, F_Mask ); return saved; } @@ -348,22 +348,6 @@ const wxString D_PAD::GetPadName() const void D_PAD::StringPadName( wxString& text ) const { -#if 0 // m_Padname is not ASCII and not UTF8, it is LATIN1 basically, whatever - // 8 bit font is supported in KiCad plotting and drawing. - - // Return pad name as wxString, assume it starts as a non-terminated - // utf8 character sequence - - char temp[sizeof(m_Padname)+1]; // a place to terminate with '\0' - - strncpy( temp, m_Padname, sizeof(m_Padname) ); - - temp[sizeof(m_Padname)] = 0; - - text = FROM_UTF8( temp ); - -#else - text.Empty(); for( int ii = 0; ii < PADNAMEZ && m_Padname[ii]; ii++ ) @@ -371,7 +355,6 @@ void D_PAD::StringPadName( wxString& text ) const // m_Padname is 8 bit KiCad font junk, do not sign extend text.Append( (unsigned char) m_Padname[ii] ); } -#endif } diff --git a/pcbnew/dialogs/dialog_pad_properties.cpp b/pcbnew/dialogs/dialog_pad_properties.cpp index f1db6bf28c..ea26681a7c 100644 --- a/pcbnew/dialogs/dialog_pad_properties.cpp +++ b/pcbnew/dialogs/dialog_pad_properties.cpp @@ -72,12 +72,12 @@ static const LSET std_pad_layers[] = { // PAD_STANDARD: D_PAD::StandardMask(), - // PAD_CONN: - D_PAD::ConnMask(), - // PAD_SMD: D_PAD::SMDMask(), + // PAD_CONN: + D_PAD::ConnMask(), + // PAD_HOLE_NOT_PLATED: D_PAD::UnplatedHoleMask() }; From 4d9f87bf0bf6f2f212b42bb2ff673235169e35da Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Mon, 30 Jun 2014 13:45:43 -0500 Subject: [PATCH 538/741] fix BUG parsing the kicad_pcb (layers ..) declaration section. First non-cu was being dropped. --- pcbnew/class_board.h | 17 +++++++---- pcbnew/pcb_parser.cpp | 67 ++++++++++++++++++++++--------------------- 2 files changed, 46 insertions(+), 38 deletions(-) diff --git a/pcbnew/class_board.h b/pcbnew/class_board.h index d7b1a0c245..3bc5c0b73f 100644 --- a/pcbnew/class_board.h +++ b/pcbnew/class_board.h @@ -89,11 +89,18 @@ enum LAYER_T */ struct LAYER { - LAYER() : - m_type( LT_SIGNAL ), - m_visible( true ), - m_number( 0 ) - {} + LAYER() + { + clear(); + } + + void clear() + { + m_type = LT_SIGNAL; + m_visible = true; + m_number = 0; + m_name.clear(); + } /* LAYER( const wxString& aName = wxEmptyString, diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index 9c0f597ada..4f1a16c328 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -703,6 +703,8 @@ void PCB_PARSER::parseLayer( LAYER* aLayer ) throw( IO_ERROR, PARSE_ERROR ) std::string type; bool isVisible = true; + aLayer->clear(); + if( CurTok() != T_LEFT ) Expecting( T_LEFT ); @@ -744,13 +746,12 @@ void PCB_PARSER::parseLayers() throw( IO_ERROR, PARSE_ERROR ) LSET visibleLayers; LSET enabledLayers; int copperLayerCount = 0; + LAYER layer; std::vector cu; for( token = NextTok(); token != T_RIGHT; token = NextTok() ) { - LAYER layer; - parseLayer( &layer ); if( layer.m_type == LT_UNDEFINED ) // it's a non-copper layer @@ -794,41 +795,41 @@ void PCB_PARSER::parseLayers() throw( IO_ERROR, PARSE_ERROR ) copperLayerCount = cu.size(); } - if( token != T_RIGHT ) + // process non-copper layers + while( token != T_RIGHT ) { - // read any non-copper layers - for( token = NextTok(); token != T_RIGHT; token = NextTok() ) + LAYER_ID_MAP::const_iterator it = m_layerIndices.find( UTF8( layer.m_name ) ); + + if( it == m_layerIndices.end() ) { - LAYER layer; + wxString error = wxString::Format( + _( "Layer '%s' in file '%s' at line %d, is not in fixed layer hash" ), + GetChars( layer.m_name ), + GetChars( CurSource() ), + CurLineNumber(), + CurOffset() + ); - parseLayer( &layer ); - - LAYER_ID_MAP::const_iterator it = m_layerIndices.find( UTF8( layer.m_name ) ); - - if( it == m_layerIndices.end() ) - { - wxString error = wxString::Format( - _( "Layer '%s' in file '%s' at line %d, is not in fixed layer hash" ), - GetChars( layer.m_name ), - GetChars( CurSource() ), - CurLineNumber(), - CurOffset() - ); - - THROW_IO_ERROR( error ); - } - - layer.m_number = it->second; - - enabledLayers.set( layer.m_number ); - - if( layer.m_visible ) - visibleLayers.set( layer.m_number ); - - //DBG( printf( "aux m_visible:%s\n", layer.m_visible ? "true" : "false" );) - - m_board->SetLayer( LAYER_ID( layer.m_number ), layer ); + THROW_IO_ERROR( error ); } + + layer.m_number = it->second; + + enabledLayers.set( layer.m_number ); + + if( layer.m_visible ) + visibleLayers.set( layer.m_number ); + + // DBG( printf( "aux m_visible:%s\n", layer.m_visible ? "true" : "false" );) + + m_board->SetLayer( it->second, layer ); + + token = NextTok(); + + if( token != T_LEFT ) + break; + + parseLayer( &layer ); } // We need at least 2 copper layers and there must be an even number of them. From dc38c50258a9f26d8a1820d2facff58763d5f97c Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 30 Jun 2014 21:19:58 +0200 Subject: [PATCH 539/741] Fix Bug #1335914 (Export SVG menu) hangs pcbnew permanently. Also a minor cosmetic enhancement in SVG export and plot dialogs. --- pcbnew/dialogs/dialog_SVG_print_base.cpp | 9 +++++---- pcbnew/dialogs/dialog_SVG_print_base.fbp | 12 ++++++------ pcbnew/dialogs/dialog_SVG_print_base.h | 5 +++-- pcbnew/dialogs/dialog_plot_base.cpp | 4 ++-- pcbnew/dialogs/dialog_plot_base.fbp | 8 ++++++-- pcbnew/dialogs/dialog_plot_base.h | 2 +- 6 files changed, 23 insertions(+), 17 deletions(-) diff --git a/pcbnew/dialogs/dialog_SVG_print_base.cpp b/pcbnew/dialogs/dialog_SVG_print_base.cpp index f3dabf6d3a..a1d4a10149 100644 --- a/pcbnew/dialogs/dialog_SVG_print_base.cpp +++ b/pcbnew/dialogs/dialog_SVG_print_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Jun 6 2014) +// C++ code generated with wxFormBuilder (version Nov 6 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -119,9 +119,8 @@ DIALOG_SVG_PRINT_base::DIALOG_SVG_PRINT_base( wxWindow* parent, wxWindowID id, c m_staticText2->Wrap( -1 ); bMainSizer->Add( m_staticText2, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - m_messagesBox = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE ); - m_messagesBox->SetMaxLength( 0 ); - m_messagesBox->SetMinSize( wxSize( -1,100 ) ); + m_messagesBox = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY ); + m_messagesBox->SetMinSize( wxSize( -1,150 ) ); bMainSizer->Add( m_messagesBox, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); @@ -130,6 +129,7 @@ DIALOG_SVG_PRINT_base::DIALOG_SVG_PRINT_base( wxWindow* parent, wxWindowID id, c this->Layout(); // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_SVG_PRINT_base::OnCloseWindow ) ); m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnOutputDirectoryBrowseClicked ), NULL, this ); m_buttonCreateFile->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonPlot ), NULL, this ); m_buttonQuit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonCloseClick ), NULL, this ); @@ -138,6 +138,7 @@ DIALOG_SVG_PRINT_base::DIALOG_SVG_PRINT_base( wxWindow* parent, wxWindowID id, c DIALOG_SVG_PRINT_base::~DIALOG_SVG_PRINT_base() { // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_SVG_PRINT_base::OnCloseWindow ) ); m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnOutputDirectoryBrowseClicked ), NULL, this ); m_buttonCreateFile->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonPlot ), NULL, this ); m_buttonQuit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonCloseClick ), NULL, this ); diff --git a/pcbnew/dialogs/dialog_SVG_print_base.fbp b/pcbnew/dialogs/dialog_SVG_print_base.fbp index cb65010311..fe98a01908 100644 --- a/pcbnew/dialogs/dialog_SVG_print_base.fbp +++ b/pcbnew/dialogs/dialog_SVG_print_base.fbp @@ -1,6 +1,6 @@ - + C++ @@ -44,7 +44,7 @@ -1,350 DIALOG_SVG_PRINT_base - 507,420 + 507,451 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER DIALOG_SHIM; dialog_shim.h Export SVG file @@ -61,7 +61,7 @@ - + OnCloseWindow @@ -1358,10 +1358,10 @@ 0 - 0 + 0 - -1,100 + -1,150 1 m_messagesBox 1 @@ -1373,7 +1373,7 @@ Resizable 1 - wxTE_MULTILINE + wxTE_MULTILINE|wxTE_READONLY 0 diff --git a/pcbnew/dialogs/dialog_SVG_print_base.h b/pcbnew/dialogs/dialog_SVG_print_base.h index d0667f655c..e3858e6d0b 100644 --- a/pcbnew/dialogs/dialog_SVG_print_base.h +++ b/pcbnew/dialogs/dialog_SVG_print_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Jun 6 2014) +// C++ code generated with wxFormBuilder (version Nov 6 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -61,6 +61,7 @@ class DIALOG_SVG_PRINT_base : public DIALOG_SHIM wxTextCtrl* m_messagesBox; // Virtual event handlers, overide them in your derived class + virtual void OnCloseWindow( wxCloseEvent& event ) { event.Skip(); } virtual void OnOutputDirectoryBrowseClicked( wxCommandEvent& event ) { event.Skip(); } virtual void OnButtonPlot( wxCommandEvent& event ) { event.Skip(); } virtual void OnButtonCloseClick( wxCommandEvent& event ) { event.Skip(); } @@ -68,7 +69,7 @@ class DIALOG_SVG_PRINT_base : public DIALOG_SHIM public: - DIALOG_SVG_PRINT_base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Export SVG file"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 507,420 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + DIALOG_SVG_PRINT_base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Export SVG file"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 507,451 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_SVG_PRINT_base(); }; diff --git a/pcbnew/dialogs/dialog_plot_base.cpp b/pcbnew/dialogs/dialog_plot_base.cpp index e252a8a6fa..e8daf4c482 100644 --- a/pcbnew/dialogs/dialog_plot_base.cpp +++ b/pcbnew/dialogs/dialog_plot_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Feb 26 2014) +// C++ code generated with wxFormBuilder (version Jun 5 2014) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -352,7 +352,7 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr sbSizerMsg = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Messages:") ), wxVERTICAL ); m_messagesBox = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY ); - m_messagesBox->SetMinSize( wxSize( -1,70 ) ); + m_messagesBox->SetMinSize( wxSize( -1,150 ) ); sbSizerMsg->Add( m_messagesBox, 1, wxEXPAND, 5 ); diff --git a/pcbnew/dialogs/dialog_plot_base.fbp b/pcbnew/dialogs/dialog_plot_base.fbp index 752ae33811..76d0fc9262 100644 --- a/pcbnew/dialogs/dialog_plot_base.fbp +++ b/pcbnew/dialogs/dialog_plot_base.fbp @@ -1,6 +1,6 @@ - + C++ @@ -2833,6 +2833,10 @@ 0 Include extended attributes for non-image data in the Gerber file + + wxFILTER_NONE + wxDefaultValidator + @@ -4069,7 +4073,7 @@ 0 - -1,70 + -1,150 1 m_messagesBox 1 diff --git a/pcbnew/dialogs/dialog_plot_base.h b/pcbnew/dialogs/dialog_plot_base.h index 61ba907191..f710b095cb 100644 --- a/pcbnew/dialogs/dialog_plot_base.h +++ b/pcbnew/dialogs/dialog_plot_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Feb 26 2014) +// C++ code generated with wxFormBuilder (version Jun 5 2014) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! From 8a1fd49377a6bc1d5cabebcaf569e60f8546d6cd Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 1 Jul 2014 21:20:38 +0200 Subject: [PATCH 540/741] Minor fixes in Gerber files, in file attribute for copper layers. --- common/common_plotGERBER_functions.cpp | 2 +- pcbnew/pcbplot.cpp | 17 +++++------------ 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/common/common_plotGERBER_functions.cpp b/common/common_plotGERBER_functions.cpp index fbed464092..bfbe00c3a7 100644 --- a/common/common_plotGERBER_functions.cpp +++ b/common/common_plotGERBER_functions.cpp @@ -104,7 +104,7 @@ bool GERBER_PLOTTER::StartPlot() m_gerberUnitInch ? "inch" : "mm" ); wxString Title = creator + wxT( " " ) + GetBuildVersion(); - fprintf( outputFile, "G04 (created by %s) date %s*\n", + fprintf( outputFile, "G04 Created by KiCad (%s) date %s*\n", TO_UTF8( Title ), TO_UTF8( DateAndTime() ) ); /* Mass parameter: unit = INCHES/MM */ diff --git a/pcbnew/pcbplot.cpp b/pcbnew/pcbplot.cpp index 830ffee636..7b492ad349 100644 --- a/pcbnew/pcbplot.cpp +++ b/pcbnew/pcbplot.cpp @@ -135,29 +135,22 @@ wxString GetGerberFileFunction( const BOARD *aBoard, LAYER_NUM aLayer ) break; case Eco1_User: - case Eco2_User: - attrib = wxString::Format( wxT( "Other,ECO%d" ), aLayer - Eco1_User + 1 ); + attrib = wxString( wxT( "Other,ECO1" ) ); break; - case F_Cu: - attrib = wxString( wxT( "Copper,L1" ) ); + case Eco2_User: + attrib = wxString( wxT( "Other,ECO2" ) ); break; case B_Cu: attrib = wxString::Format( wxT( "Copper,L%d" ), aBoard->GetCopperLayerCount() ); break; + case F_Cu: default: if( IsCopperLayer( aLayer ) ) { -#if 0 // was: - // LAYER_N_2 is the first inner layer counting from the bottom; this - // must be converted to a 1-based number starting from the top - attrib = wxString::Format( wxT( "Copper,L%d" ), - aBoard->GetCopperLayerCount() - ( aLayer - LAYER_N_2 + 1 ) ); -#else - attrib = wxString::Format( wxT( "Copper,L%d" ), aLayer ); -#endif + attrib = wxString::Format( wxT( "Copper,L%d" ), aLayer+1 ); } break; } From 74df72e9a9b7d17ba45d04388e6dee70d454a5a0 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 2 Jul 2014 08:45:42 +0200 Subject: [PATCH 541/741] Fix Bug #1336534 pcbnew 3D viewer wrong vertical model offset. --- 3d-viewer/info3d_visu.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/3d-viewer/info3d_visu.cpp b/3d-viewer/info3d_visu.cpp index aeb245f193..ee8b7ab2ed 100644 --- a/3d-viewer/info3d_visu.cpp +++ b/3d-viewer/info3d_visu.cpp @@ -115,29 +115,32 @@ void INFO3D_VISU::InitSettings( BOARD* aBoard ) // Init Z position of each layer // calculate z position for each copper layer + // Z = 0 is the z position of the back (bottom) layer (layer id = 31) + // Z = m_EpoxyThickness is the z position of the front (top) layer (layer id = 0) + // all unused copper layer z position are set to 0 int layer; int copper_layers_cnt = m_CopperLayersCount; for( layer = 0; layer < copper_layers_cnt; layer++ ) { m_LayerZcoord[layer] = - m_EpoxyThickness * layer / (copper_layers_cnt - 1); + m_EpoxyThickness - (m_EpoxyThickness * layer / (copper_layers_cnt - 1)); } #define layerThicknessMargin 1.1 double zpos_offset = m_NonCopperLayerThickness * layerThicknessMargin; - double zpos_copper_back = m_LayerZcoord[0] - layerThicknessMargin*m_CopperThickness/2; + double zpos_copper_back = - layerThicknessMargin*m_CopperThickness/2; double zpos_copper_front = m_EpoxyThickness + layerThicknessMargin*m_CopperThickness/2; - // Fill remaining unused copper layers and front layer zpos - // with m_EpoxyThickness - // Solder mask and Solder paste have the same Z position + // Fill remaining unused copper layers and back layer zpos + // with 0 for( ; layer < MAX_CU_LAYERS; layer++ ) { - m_LayerZcoord[layer] = m_EpoxyThickness; + m_LayerZcoord[layer] = 0; } // calculate z position for each non copper layer + // Solder mask and Solder paste have the same Z position for( int layer_id = MAX_CU_LAYERS; layer_id < LAYER_ID_COUNT; layer_id++ ) { double zpos; From 39216b4b3ad6ae0dcbdd5f58491a1aa91acccd20 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 2 Jul 2014 09:05:29 +0200 Subject: [PATCH 542/741] Fix Bug #1336614 (Vias missing from drill export) --- pcbnew/exporters/gendrill_Excellon_writer.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pcbnew/exporters/gendrill_Excellon_writer.cpp b/pcbnew/exporters/gendrill_Excellon_writer.cpp index 2e73c915b8..a369b2b5f4 100644 --- a/pcbnew/exporters/gendrill_Excellon_writer.cpp +++ b/pcbnew/exporters/gendrill_Excellon_writer.cpp @@ -457,7 +457,7 @@ void EXCELLON_WRITER::BuildHolesList( int aFirstLayer, { hole_value = via->GetDrillValue(); - if( hole_value == 0 ) + if( hole_value == 0 ) // Should not occur. continue; new_hole.m_Tool_Reference = -1; // Flag value for Not initialized @@ -470,11 +470,12 @@ void EXCELLON_WRITER::BuildHolesList( int aFirstLayer, via->LayerPair( &new_hole.m_Hole_Top_Layer, &new_hole.m_Hole_Bottom_Layer ); - // LayerPair return params with m_Hole_Bottom_Layer < m_Hole_Top_Layer - if( (new_hole.m_Hole_Bottom_Layer > aFirstLayer) && (aFirstLayer >= 0) ) + // LayerPair return params with m_Hole_Bottom_Layer > m_Hole_Top_Layer + // (remember top layer = 0 and bottom layer = 31 for through hole vias) + if( (new_hole.m_Hole_Top_Layer < aFirstLayer) && (aFirstLayer >= 0) ) continue; - if( (new_hole.m_Hole_Top_Layer < aLastLayer) && (aLastLayer >= 0) ) + if( (new_hole.m_Hole_Bottom_Layer > aLastLayer) && (aLastLayer >= 0) ) continue; if( aExcludeThroughHoles && (new_hole.m_Hole_Bottom_Layer == B_Cu) From eb396a5e8897c1c535c123031f5523404cd9e3cb Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 2 Jul 2014 15:08:28 +0200 Subject: [PATCH 543/741] Fix footprint wizard issues. Fix export vrml incorrect Z position of items. --- pcbnew/class_pad.cpp | 4 +--- pcbnew/class_pad.h | 19 ++++++++++++---- pcbnew/dialogs/dialog_pad_properties.cpp | 2 +- pcbnew/exporters/export_vrml.cpp | 4 ++-- .../plugins/FPC_(SMD_type)_footprintwizard.py | 4 ++-- pcbnew/scripting/plugins/PadArray.py | 22 ++++--------------- pcbnew/scripting/plugins/qfp_wizard.py | 7 ++++-- .../scripting/plugins/touch_slider_wizard.py | 6 ++--- scripting/kicad.i | 2 +- 9 files changed, 34 insertions(+), 36 deletions(-) diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index 99baa92dfc..36239b7be0 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -95,15 +95,13 @@ LSET D_PAD::StandardMask() LSET D_PAD::SMDMask() { - // was: #define PAD_SMD_DEFAULT_LAYERS LAYER_FRONT | SOLDERPASTE_LAYER_FRONT | SOLDERMASK_LAYER_FRONT static LSET saved( 3, F_Cu, F_Paste, F_Mask ); return saved; } -LSET D_PAD::ConnMask() +LSET D_PAD::ConnSMDMask() { - // was: #define PAD_CONN_DEFAULT_LAYERS LAYER_FRONT | SOLDERMASK_LAYER_FRONT static LSET saved( 2, F_Cu, F_Mask ); return saved; } diff --git a/pcbnew/class_pad.h b/pcbnew/class_pad.h index 621c1ad477..1687989462 100644 --- a/pcbnew/class_pad.h +++ b/pcbnew/class_pad.h @@ -88,10 +88,11 @@ public: /* Default layers used for pads, according to the pad type. * this is default values only, they can be changed for a given pad */ - static LSET StandardMask(); - static LSET ConnMask(); - static LSET SMDMask(); - static LSET UnplatedHoleMask(); + static LSET StandardMask(); ///< layer set for a through hole pad + static LSET SMDMask(); ///< layer set for a SMD pad on Front layer + static LSET ConnSMDMask(); ///< layer set for a SMD pad on Front layer + ///< used for edge board connectors + static LSET UnplatedHoleMask(); ///< layer set for a mechanical unplated through hole pad void Copy( D_PAD* source ); @@ -419,6 +420,16 @@ public: EDA_ITEM* Clone() const; + /** + * same as Clone, but returns a D_PAD item. + * Useful mainly for pythons scripts, because Clone (virtual function) + * returns an EDA_ITEM. + */ + D_PAD* Duplicate() const + { + return (D_PAD*) Clone(); + } + /// @copydoc VIEW_ITEM::ViewGetLayers() virtual void ViewGetLayers( int aLayers[], int& aCount ) const; diff --git a/pcbnew/dialogs/dialog_pad_properties.cpp b/pcbnew/dialogs/dialog_pad_properties.cpp index ea26681a7c..b962b670c0 100644 --- a/pcbnew/dialogs/dialog_pad_properties.cpp +++ b/pcbnew/dialogs/dialog_pad_properties.cpp @@ -76,7 +76,7 @@ static const LSET std_pad_layers[] = { D_PAD::SMDMask(), // PAD_CONN: - D_PAD::ConnMask(), + D_PAD::ConnSMDMask(), // PAD_HOLE_NOT_PLATED: D_PAD::UnplatedHoleMask() diff --git a/pcbnew/exporters/export_vrml.cpp b/pcbnew/exporters/export_vrml.cpp index 4a6c71d24b..94413fe66e 100644 --- a/pcbnew/exporters/export_vrml.cpp +++ b/pcbnew/exporters/export_vrml.cpp @@ -473,9 +473,9 @@ static void compute_layer_Zs( MODEL_VRML& aModel, BOARD* pcb ) LAYER_ID i = *seq; if( i < copper_layers ) - aModel.SetLayerZ( i, aModel.board_thickness * i / (copper_layers - 1) - half_thickness ); + aModel.SetLayerZ( i, half_thickness - aModel.board_thickness * i / (copper_layers - 1) ); else - aModel.SetLayerZ( i, half_thickness ); // component layer + aModel.SetLayerZ( i, - half_thickness ); // bottom layer } /* To avoid rounding interference, we apply an epsilon to each diff --git a/pcbnew/scripting/plugins/FPC_(SMD_type)_footprintwizard.py b/pcbnew/scripting/plugins/FPC_(SMD_type)_footprintwizard.py index f751c47f38..8a43a34b89 100644 --- a/pcbnew/scripting/plugins/FPC_(SMD_type)_footprintwizard.py +++ b/pcbnew/scripting/plugins/FPC_(SMD_type)_footprintwizard.py @@ -30,7 +30,7 @@ class FPCFootprintWizard(FootprintWizardPlugin): pad.SetSize(size) pad.SetShape(PAD_RECT) pad.SetAttribute(PAD_SMD) - pad.SetLayerMask(PAD_SMD_DEFAULT_LAYERS) + pad.SetLayerSet( pad.StandardMask() ) pad.SetPos0(pos) pad.SetPosition(pos) pad.SetPadName(name) @@ -126,7 +126,7 @@ class FPCFootprintWizard(FootprintWizardPlugin): xstart = - pad_pitch*0.5-offsetX xend = pad_pitch * pads + xstart; outline.SetStartEnd( wxPoint(xstart, posy), wxPoint( xend, posy) ) - outline.SetLayer(SILKSCREEN_N_FRONT) #default: not needed + outline.SetLayer(F_SilkS) #default: not needed outline.SetShape(S_SEGMENT) module.Add(outline) diff --git a/pcbnew/scripting/plugins/PadArray.py b/pcbnew/scripting/plugins/PadArray.py index 3c5d5f7cb1..9e4d9b3572 100644 --- a/pcbnew/scripting/plugins/PadArray.py +++ b/pcbnew/scripting/plugins/PadArray.py @@ -17,7 +17,7 @@ class PadMaker: pad.SetShape(shape) pad.SetAttribute(pcbnew.PAD_STANDARD) - pad.SetLayerMask(pcbnew.PAD_STANDARD_DEFAULT_LAYERS) + pad.SetLayerSet(pad.StandardMask()) pad.SetDrillSize(pcbnew.wxSize(drill, drill)) return pad @@ -29,7 +29,7 @@ class PadMaker: pad.SetShape(shape) pad.SetAttribute(pcbnew.PAD_SMD) - pad.SetLayerMask(pcbnew.PAD_SMD_DEFAULT_LAYERS) + pad.SetLayerSet(pad.SMDMask()) return pad @@ -45,19 +45,6 @@ class PadArray: def SetFirstPadInArray(self, fpNum): self.firstPad = fpNum - # HACK! pad should one day have its own clone method - def ClonePad(self): - - pad = pcbnew.D_PAD(self.pad.GetParent()) - - pad.SetSize(self.pad.GetSize()) - pad.SetShape(self.pad.GetShape()) - pad.SetAttribute(self.pad.GetAttribute()) - pad.SetLayerMask(self.pad.GetLayerMask()) - pad.SetDrillSize(self.pad.GetDrillSize()) - - return pad - def AddPad(self, pad): self.pad.GetParent().Add(pad) @@ -100,9 +87,8 @@ class PadGridArray(PadArray): pos = pcbnew.wxPoint(posX, posY) - # THIS DOESN'T WORK yet! - #pad = self.pad.Clone() - pad = self.ClonePad() + # create a new pad with same characteristics + pad = self.pad.Duplicate() pad.SetPos0(pos) pad.SetPosition(pos) diff --git a/pcbnew/scripting/plugins/qfp_wizard.py b/pcbnew/scripting/plugins/qfp_wizard.py index 0034c1fadb..4964bcdfac 100644 --- a/pcbnew/scripting/plugins/qfp_wizard.py +++ b/pcbnew/scripting/plugins/qfp_wizard.py @@ -27,6 +27,7 @@ class QFPWizard(HelpfulFootprintWizardPlugin.HelpfulFootprintWizardPlugin): def CheckParameters(self): self.CheckParamPositiveInt("Pads", "*n", is_multiple_of = 4) + self.CheckParamBool("Pads", "*oval") def GetReference(self): return "QFP %d" % self.parameters["Pads"]["*n"] @@ -46,8 +47,10 @@ class QFPWizard(HelpfulFootprintWizardPlugin.HelpfulFootprintWizardPlugin): row_len = (pads_per_row - 1) * pad_pitch - h_pad = PA.PadMaker(self.module).SMDPad(pad_width, pad_length, shape = pcbnew.PAD_OVAL) - v_pad = PA.PadMaker(self.module).SMDPad(pad_length, pad_width, shape = pcbnew.PAD_OVAL) + pad_shape = pcbnew.PAD_OVAL if pads["*oval"] else pcbnew.PAD_RECT + + h_pad = PA.PadMaker(self.module).SMDPad(pad_width, pad_length, shape = pad_shape) + v_pad = PA.PadMaker(self.module).SMDPad(pad_length, pad_width, shape = pad_shape) #left row pin1Pos = pcbnew.wxPoint(-h_pitch / 2, -row_len / 2) diff --git a/pcbnew/scripting/plugins/touch_slider_wizard.py b/pcbnew/scripting/plugins/touch_slider_wizard.py index a29f91398a..5b33be7ed3 100644 --- a/pcbnew/scripting/plugins/touch_slider_wizard.py +++ b/pcbnew/scripting/plugins/touch_slider_wizard.py @@ -25,7 +25,7 @@ class TouchSliderWizard(FootprintWizardPlugin): pad.SetSize(size) pad.SetShape(PAD_RECT) pad.SetAttribute(PAD_SMD) - pad.SetLayerMask(PAD_SMD_DEFAULT_LAYERS) + pad.SetLayerSet(pad.ConnSMDMask()) pad.SetPos0(pos) pad.SetPosition(pos) pad.SetPadName(name) @@ -36,8 +36,8 @@ class TouchSliderWizard(FootprintWizardPlugin): pad = D_PAD(module) pad.SetSize(wxSize(size[0],size[1])) pad.SetShape(PAD_TRAPEZOID) - pad.SetAttribute(PAD_CONN) - pad.SetLayerMask(PAD_CONN_DEFAULT_LAYERS) + pad.SetAttribute(PAD_SMD) + pad.SetLayerSet(pad.ConnSMDMask()) pad.SetPos0(pos) pad.SetPosition(pos) pad.SetPadName(name) diff --git a/scripting/kicad.i b/scripting/kicad.i index 451f541417..59a1afcbab 100644 --- a/scripting/kicad.i +++ b/scripting/kicad.i @@ -66,7 +66,7 @@ #include #include #include - #include + #include #include #include From 89f14906a429e749b52d8b7c4660b0bbb8b694cf Mon Sep 17 00:00:00 2001 From: Lorenzo Marcantonio Date: Fri, 4 Jul 2014 10:55:51 +0200 Subject: [PATCH 544/741] - Added the courtyard/fabrication layer to the layer combo and layer panel - Corrected handling of scrollability in layer panel (fixes 1336996) --- common/lset.cpp | 2 +- common/view/view.cpp | 2 +- pcbnew/class_pcb_layer_widget.cpp | 4 ++ pcbnew/layer_widget.cpp | 71 +++++++------------------------ 4 files changed, 22 insertions(+), 57 deletions(-) diff --git a/common/lset.cpp b/common/lset.cpp index 3ec3607a92..dcb22e3b3d 100644 --- a/common/lset.cpp +++ b/common/lset.cpp @@ -633,7 +633,7 @@ LSET LSET::BackMask() LSEQ LSET::UIOrder() const { - LAYER_ID order[Margin+1]; + LAYER_ID order[LAYER_ID_COUNT]; // Assmuming that the LAYER_ID order is according to preferred UI order, as of // today this is true. When that becomes not true, its easy to change the order diff --git a/common/view/view.cpp b/common/view/view.cpp index 2d8556a916..f877164c5b 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -153,7 +153,7 @@ void VIEW::SetRequired( int aLayerId, int aRequiredId, bool aRequired ) } -// stupid C++... python lamda would do this in one line +// stupid C++... python lambda would do this in one line template struct queryVisitor { diff --git a/pcbnew/class_pcb_layer_widget.cpp b/pcbnew/class_pcb_layer_widget.cpp index 4004ca9715..b0e5910a76 100644 --- a/pcbnew/class_pcb_layer_widget.cpp +++ b/pcbnew/class_pcb_layer_widget.cpp @@ -330,6 +330,10 @@ void PCB_LAYER_WIDGET::ReFill() { Eco2_User, _( "User defined meaning" ) }, { Edge_Cuts, _( "Board's perimeter definition" ) }, { Margin, _( "Board's edge setback outline" ) }, + { F_CrtYd, _( "Footprint courtyards on board's front" ) }, + { B_CrtYd, _( "Footprint courtyards on board's back" ) }, + { F_Fab, _( "Footprint assembly on board's front" ) }, + { B_Fab, _( "Footprint assembly on board's back" ) } }; for( unsigned i=0; iConnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( LAYER_WIDGET::OnLeftDownLayers ), NULL, this ); - st->SetToolTip( aSpec.tooltip ); - m_LayersFlexGridSizer->wxSizer::Insert( index+col, st, 0, flags ); - - // column 3 - col = 3; wxCheckBox* cb = new wxCheckBox( m_LayerScrolledWindow, encodeId( col, aSpec.id ), wxEmptyString ); cb->SetValue( aSpec.state ); cb->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( LAYER_WIDGET::OnLayerCheckBox ), NULL, this ); cb->SetToolTip( _( "Enable this for visibility" ) ); m_LayersFlexGridSizer->wxSizer::Insert( index+col, cb, 0, flags ); + + // column 3 + col = 3; + wxStaticText* st = new wxStaticText( m_LayerScrolledWindow, encodeId( col, aSpec.id ), aSpec.rowName ); + shrinkFont( st, m_PointSize ); + st->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( LAYER_WIDGET::OnLeftDownLayers ), NULL, this ); + st->SetToolTip( aSpec.tooltip ); + m_LayersFlexGridSizer->wxSizer::Insert( index+col, st, 0, flags ); } @@ -526,7 +526,7 @@ LAYER_WIDGET::LAYER_WIDGET( wxWindow* aParent, wxWindow* aFocusOwner, int aPoint m_LayerScrolledWindow->SetScrollRate( 5, 5 ); m_LayersFlexGridSizer = new wxFlexGridSizer( 0, 4, 0, 1 ); m_LayersFlexGridSizer->SetFlexibleDirection( wxHORIZONTAL ); - m_LayersFlexGridSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + m_LayersFlexGridSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_NONE ); m_LayerScrolledWindow->SetSizer( m_LayersFlexGridSizer ); m_LayerScrolledWindow->Layout(); @@ -583,16 +583,6 @@ LAYER_WIDGET::LAYER_WIDGET( wxWindow* aParent, wxWindow* aFocusOwner, int aPoint wxSize LAYER_WIDGET::GetBestSize() const { -#if 0 - wxSize layerz = m_LayersFlexGridSizer->GetMinSize(); - wxSize renderz = m_RenderFlexGridSizer->GetMinSize(); - - wxSize clientz( std::max(renderz.x,layerz.x), std::max(renderz.y,layerz.y) ); - - return ClientToWindowSize( clientz ); - -#else - // size of m_LayerScrolledWindow -------------- wxArrayInt widths = m_LayersFlexGridSizer->GetColWidths(); int totWidth = 0; @@ -608,20 +598,10 @@ wxSize LAYER_WIDGET::GetBestSize() const totWidth += 10; - wxArrayInt heights = m_LayersFlexGridSizer->GetRowHeights(); - int totHeight = 0; - if( heights.GetCount() ) - { - int rowCount = GetLayerRowCount(); - for( int i=0; iGetVGap(); - // printf("heights[%d]:%d\n", i, heights[i] ); - } - totHeight += 2 * heights[0]; // use 2 row heights to approximate tab height - } - else - totHeight += 20; // not used except before adding rows. + /* The minimum height is a small size to properly force computation + * of the panel's scrollbars (otherwise it will assume it *has* all + * this space) */ + unsigned totHeight = 32; wxSize layerz( totWidth, totHeight ); @@ -642,35 +622,14 @@ wxSize LAYER_WIDGET::GetBestSize() const // account for the parent's frame, this one has void space of 10 PLUS a border: totWidth += 20; - - heights = m_RenderFlexGridSizer->GetRowHeights(); - totHeight = 0; - if( heights.GetCount() ) - { - int rowCount = GetRenderRowCount(); - for( int i=0; iGetVGap(); - // printf("heights[%d]:%d\n", i, heights[i] ); - } - totHeight += 2 * heights[0]; // use 2 row heights to approximate tab height - } - else - totHeight += 20; // not used except before adding rows - + // For totHeight re-use the previous small one wxSize renderz( totWidth, totHeight ); renderz += m_RenderingPanel->GetWindowBorderSize(); wxSize clientz( std::max(renderz.x,layerz.x), std::max(renderz.y,layerz.y) ); -// wxSize diffz( GetSize() - GetClientSize() ); -// clientz += diffz; - return clientz; - -#endif - } @@ -852,6 +811,8 @@ void LAYER_WIDGET::UpdateLayouts() { m_LayersFlexGridSizer->Layout(); m_RenderFlexGridSizer->Layout(); + m_LayerPanel->Layout(); + m_RenderingPanel->Layout(); FitInside(); } From 5a4c16dcfb35dd5b7d95222f53a5e154a2ced06a Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 4 Jul 2014 15:53:41 +0200 Subject: [PATCH 545/741] Pcbnew, Gerbview : fix crash when updating the layer manager. --- pcbnew/layer_widget.cpp | 16 ++++++++-------- pcbnew/layer_widget.h | 4 ++++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/pcbnew/layer_widget.cpp b/pcbnew/layer_widget.cpp index 42ed7175c4..0250d92763 100644 --- a/pcbnew/layer_widget.cpp +++ b/pcbnew/layer_widget.cpp @@ -418,24 +418,24 @@ void LAYER_WIDGET::insertLayerRow( int aRow, const ROW& aSpec ) sbm->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( LAYER_WIDGET::OnLeftDownLayers ), NULL, this ); m_LayersFlexGridSizer->wxSizer::Insert( index+col, sbm, 0, flags ); - // column 1 - col = 1; + // column 1 (COLUMN_COLORBM) + col = COLUMN_COLORBM; wxBitmapButton* bmb = makeColorButton( m_LayerScrolledWindow, aSpec.color, encodeId( col, aSpec.id ) ); bmb->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( LAYER_WIDGET::OnLeftDownLayers ), NULL, this ); bmb->Connect( wxEVT_MIDDLE_DOWN, wxMouseEventHandler( LAYER_WIDGET::OnMiddleDownLayerColor ), NULL, this ); bmb->SetToolTip( _("Left click to select, middle click for color change, right click for menu" ) ); m_LayersFlexGridSizer->wxSizer::Insert( index+col, bmb, 0, flags ); - // column 2 - col = 2; + // column 2 (COLUMN_COLOR_LYR_CB) + col = COLUMN_COLOR_LYR_CB; wxCheckBox* cb = new wxCheckBox( m_LayerScrolledWindow, encodeId( col, aSpec.id ), wxEmptyString ); cb->SetValue( aSpec.state ); cb->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( LAYER_WIDGET::OnLayerCheckBox ), NULL, this ); cb->SetToolTip( _( "Enable this for visibility" ) ); m_LayersFlexGridSizer->wxSizer::Insert( index+col, cb, 0, flags ); - // column 3 - col = 3; + // column 3 (COLUMN_COLOR_LYRNAME) + col = COLUMN_COLOR_LYRNAME; wxStaticText* st = new wxStaticText( m_LayerScrolledWindow, encodeId( col, aSpec.id ), aSpec.rowName ); shrinkFont( st, m_PointSize ); st->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( LAYER_WIDGET::OnLeftDownLayers ), NULL, this ); @@ -726,7 +726,7 @@ void LAYER_WIDGET::SetLayerVisible( LAYER_NUM aLayer, bool isVisible ) int row = findLayerRow( aLayer ); if( row >= 0 ) { - wxCheckBox* cb = (wxCheckBox*) getLayerComp( row, 3 ); + wxCheckBox* cb = (wxCheckBox*) getLayerComp( row, 2 ); wxASSERT( cb ); cb->SetValue( isVisible ); // does not fire an event } @@ -738,7 +738,7 @@ bool LAYER_WIDGET::IsLayerVisible( LAYER_NUM aLayer ) int row = findLayerRow( aLayer ); if( row >= 0 ) { - wxCheckBox* cb = (wxCheckBox*) getLayerComp( row, 3 ); + wxCheckBox* cb = (wxCheckBox*) getLayerComp( row, COLUMN_COLOR_LYR_CB ); wxASSERT( cb ); return cb->GetValue(); } diff --git a/pcbnew/layer_widget.h b/pcbnew/layer_widget.h index 4f8575f1ec..347038919c 100644 --- a/pcbnew/layer_widget.h +++ b/pcbnew/layer_widget.h @@ -47,6 +47,10 @@ #define LYR_COLUMN_COUNT 4 ///< Layer tab column count #define RND_COLUMN_COUNT 2 ///< Rendering tab column count +#define COLUMN_COLORBM 1 +#define COLUMN_COLOR_LYR_CB 2 +#define COLUMN_COLOR_LYRNAME 3 + /** * Class LAYER_WIDGET From ab58dbfced793553d4154e7617e46607fd77b825 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 4 Jul 2014 16:22:38 +0200 Subject: [PATCH 546/741] Pcbnew: Rework on Gerber ouput: allows choice between format 4.5 and 4.6. Fix a minor issue in Gerber layers attributes. fix print issue when printing each layer on a separate page. --- common/common_plotGERBER_functions.cpp | 57 +-- common/pcb_plot_params.keywords | 2 +- include/plot_common.h | 29 +- pcbnew/dialogs/dialog_plot.cpp | 11 +- pcbnew/dialogs/dialog_plot_base.cpp | 22 +- pcbnew/dialogs/dialog_plot_base.fbp | 471 +++++++++++++++---------- pcbnew/dialogs/dialog_plot_base.h | 2 + pcbnew/layer_widget.cpp | 2 +- pcbnew/pcb_plot_params.cpp | 56 ++- pcbnew/pcb_plot_params.h | 42 ++- pcbnew/pcbplot.cpp | 5 +- pcbnew/plot_board_layers.cpp | 4 + pcbnew/printout_controler.cpp | 5 +- 13 files changed, 464 insertions(+), 244 deletions(-) diff --git a/common/common_plotGERBER_functions.cpp b/common/common_plotGERBER_functions.cpp index bfbe00c3a7..94a84af4e3 100644 --- a/common/common_plotGERBER_functions.cpp +++ b/common/common_plotGERBER_functions.cpp @@ -15,6 +15,22 @@ #include +GERBER_PLOTTER::GERBER_PLOTTER() +{ + workFile = 0; + finalFile = 0; + currentAperture = apertures.end(); + + // number of digits after the point (number of digits of the mantissa + // Be carefull: the Gerber coordinates are stored in an integer + // so 6 digits (inches) or 5 digits (mm) is a good value + // To avoid overflow, 7 digits (inches) or 6 digits is a max. + // with lower values than 6 digits (inches) or 5 digits (mm), + // Creating self-intersecting polygons from non-intersecting polygons + // happen easily. + m_gerberUnitInch = false; + m_gerberUnitFmt = 6; +} void GERBER_PLOTTER::SetViewport( const wxPoint& aOffset, double aIusPerDecimil, double aScale, bool aMirror ) @@ -26,40 +42,37 @@ void GERBER_PLOTTER::SetViewport( const wxPoint& aOffset, double aIusPerDecimil, wxASSERT( aScale == 1 ); // aScale parameter is not used in Gerber plotScale = 1; // Plot scale is *always* 1.0 - m_gerberUnitInch = false; // Currently fixed, but could be an option - - // number of digits after the point (number of digits of the mantissa - // Be carefull: the Gerber coordinates are stored in an integer - // so 6 digits (inches) or 5 digits (mm) is a good value - // To avoid overflow, 7 digits (inches) or 6 digits is a max. - // with lower values than 6 digits (inches) or 5 digits (mm), - // Creating self-intersecting polygons from non-intersecting polygons - // happen easily. - m_gerberUnitFmt = m_gerberUnitInch ? 7 : 6; - m_IUsPerDecimil = aIusPerDecimil; - iuPerDeviceUnit = pow( 10.0, m_gerberUnitFmt ) / ( aIusPerDecimil * 10000.0 ); - if( ! m_gerberUnitInch ) - iuPerDeviceUnit *= 25.4; // gerber output in mm - - /* We don't handle the filmbox, and it's more useful to keep the - * origin at the origin */ + // We don't handle the filmbox, and it's more useful to keep the + // origin at the origin paperSize.x = 0; paperSize.y = 0; SetDefaultLineWidth( 100 * aIusPerDecimil ); // Arbitrary default } +void GERBER_PLOTTER::SetGerberCoordinatesFormat( int aResolution, bool aUseInches ) +{ + m_gerberUnitInch = aUseInches; + m_gerberUnitFmt = aResolution; + + iuPerDeviceUnit = pow( 10.0, m_gerberUnitFmt ) / ( m_IUsPerDecimil * 10000.0 ); + + if( ! m_gerberUnitInch ) + iuPerDeviceUnit *= 25.4; // gerber output in mm +} + + /** * Emit a D-Code record, using proper conversions * to format a leading zero omitted gerber coordinate - * (for 4 decimal positions, see header generation in start_plot + * (for n decimal positions, see header generation in start_plot */ void GERBER_PLOTTER::emitDcode( const DPOINT& pt, int dcode ) { fprintf( outputFile, "X%dY%dD%02d*\n", - int( pt.x ), int( pt.y ), dcode ); + KiROUND( pt.x ), KiROUND( pt.y ), dcode ); } /** @@ -357,16 +370,16 @@ void GERBER_PLOTTER::Arc( const wxPoint& aCenter, double aStAngle, double aEndAn /** * Gerber polygon: they can (and *should*) be filled with the - * appropriate G36/G37 sequence (raster fills are deprecated) + * appropriate G36/G37 sequence */ -void GERBER_PLOTTER::PlotPoly( const std::vector< wxPoint >& aCornerList, +void GERBER_PLOTTER:: PlotPoly( const std::vector< wxPoint >& aCornerList, FILL_T aFill, int aWidth ) { if( aCornerList.size() <= 1 ) return; // Gerber format does not know filled polygons with thick outline - // Thereore, to plot a filled polygon with outline having a thickness, + // Therefore, to plot a filled polygon with outline having a thickness, // one should plot outline as thick segments SetCurrentLineWidth( aWidth ); diff --git a/common/pcb_plot_params.keywords b/common/pcb_plot_params.keywords index 96e756c6d2..c64f70bca6 100644 --- a/common/pcb_plot_params.keywords +++ b/common/pcb_plot_params.keywords @@ -1,6 +1,7 @@ drillshape excludeedgelayer false +gerberprecision hpglpendiameter hpglpennumber hpglpenoverlay @@ -15,7 +16,6 @@ padsonsilk pcbplotparams plotframeref plotinvisibletext -plotothertext plotreference plotvalue psa4output diff --git a/include/plot_common.h b/include/plot_common.h index f7732db7cf..b6793962df 100644 --- a/include/plot_common.h +++ b/include/plot_common.h @@ -282,12 +282,17 @@ public: */ virtual void SetTextMode( PlotTextMode mode ) { - // NOP for most plotters + // NOP for most plotters. } virtual void SetLayerAttribFunction( const wxString& function ) { - // NOP for most plotters + // NOP for most plotters. Only for Gerber plotter + } + + virtual void SetGerberCoordinatesFormat( int aResolution, bool aUseInches = false ) + { + // NOP for most plotters. Only for Gerber plotter } protected: @@ -769,12 +774,7 @@ struct APERTURE class GERBER_PLOTTER : public PLOTTER { public: - GERBER_PLOTTER() - { - workFile = 0; - finalFile = 0; - currentAperture = apertures.end(); - } + GERBER_PLOTTER(); virtual PlotFormat GetPlotterType() const { @@ -794,6 +794,7 @@ public: // RS274X has no dashing, nor colours virtual void SetDash( bool dashed ) {}; virtual void SetColor( EDA_COLOR_T color ) {}; + // Currently, aScale and aMirror are not used in gerber plotter virtual void SetViewport( const wxPoint& aOffset, double aIusPerDecimil, double aScale, bool aMirror ); virtual void Rect( const wxPoint& p1, const wxPoint& p2, FILL_T fill, @@ -823,6 +824,18 @@ public: m_attribFunction = function; } + /** + * Function SetGerberCoordinatesFormat + * selection of Gerber units and resolution (number of digits in mantissa) + * @param aResolution = number of digits in mantissa of coordinate + * use 5 or 6 for mm and 6 or 7 for inches + * do not use value > 6 (mm) or > 7 (in) to avoid overflow + * @param aUseInches = true to use inches, false to use mm (default) + * + * Should be called only after SetViewport() is called + */ + virtual void SetGerberCoordinatesFormat( int aResolution, bool aUseInches = false ); + protected: void selectAperture( const wxSize& size, APERTURE::APERTURE_TYPE type ); void emitDcode( const DPOINT& pt, int dcode ); diff --git a/pcbnew/dialogs/dialog_plot.cpp b/pcbnew/dialogs/dialog_plot.cpp index 4cffce5151..9d5c689c1d 100644 --- a/pcbnew/dialogs/dialog_plot.cpp +++ b/pcbnew/dialogs/dialog_plot.cpp @@ -167,6 +167,9 @@ void DIALOG_PLOT::Init_Dialog() // Option for including Gerber attributes (from Gerber X2 format) in the output m_useGerberAttributes->SetValue( m_plotOpts.GetUseGerberAttributes() ); + // Gerber precision for coordinates + m_rbGerberFormat->SetSelection( m_plotOpts.GetGerberPrecision() == 5 ? 0 : 1 ); + // Option for excluding contents of "Edges Pcb" layer m_excludeEdgeLayerOpt->SetValue( m_plotOpts.GetExcludeEdgeLayer() ); @@ -668,12 +671,12 @@ void DIALOG_PLOT::applyPlotSettings() ConfigBaseWriteDouble( m_config, CONFIG_PS_FINEWIDTH_ADJ, (double)m_PSWidthAdjust / IU_PER_MM ); - tempOptions.SetUseGerberExtensions( m_useGerberExtensions->GetValue() ); - - tempOptions.SetUseGerberAttributes( m_useGerberAttributes->GetValue() ); - tempOptions.SetFormat( GetPlotFormat() ); + tempOptions.SetUseGerberExtensions( m_useGerberExtensions->GetValue() ); + tempOptions.SetUseGerberAttributes( m_useGerberAttributes->GetValue() ); + tempOptions.SetGerberPrecision( m_rbGerberFormat->GetSelection() == 0 ? 5 : 6 ); + LSET selectedLayers; for( unsigned i = 0; i < m_layerList.size(); i++ ) diff --git a/pcbnew/dialogs/dialog_plot_base.cpp b/pcbnew/dialogs/dialog_plot_base.cpp index e8daf4c482..dfaf33b0b6 100644 --- a/pcbnew/dialogs/dialog_plot_base.cpp +++ b/pcbnew/dialogs/dialog_plot_base.cpp @@ -219,22 +219,36 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr m_PlotOptionsSizer->Add( sbSizerSoldMaskLayerOpt, 1, wxEXPAND, 5 ); - m_GerberOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Gerber Options") ), wxVERTICAL ); + m_GerberOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Gerber Options") ), wxHORIZONTAL ); + + wxBoxSizer* bSizerGbrOpt; + bSizerGbrOpt = new wxBoxSizer( wxVERTICAL ); m_useGerberExtensions = new wxCheckBox( this, wxID_ANY, _("Use proper filename extensions"), wxDefaultPosition, wxDefaultSize, 0 ); m_useGerberExtensions->SetToolTip( _("Use proper Gerber extensions - .GBL, .GTL, etc...") ); - m_GerberOptionsSizer->Add( m_useGerberExtensions, 0, wxLEFT|wxRIGHT|wxTOP, 2 ); + bSizerGbrOpt->Add( m_useGerberExtensions, 0, wxALL, 2 ); m_useGerberAttributes = new wxCheckBox( this, wxID_ANY, _("Include extended attributes"), wxDefaultPosition, wxDefaultSize, 0 ); m_useGerberAttributes->SetToolTip( _("Include extended attributes for non-image data in the Gerber file") ); - m_GerberOptionsSizer->Add( m_useGerberAttributes, 0, wxTOP|wxRIGHT|wxLEFT, 2 ); + bSizerGbrOpt->Add( m_useGerberAttributes, 0, wxALL, 2 ); m_subtractMaskFromSilk = new wxCheckBox( this, wxID_ANY, _("Subtract soldermask from silkscreen"), wxDefaultPosition, wxDefaultSize, 0 ); m_subtractMaskFromSilk->SetToolTip( _("Remove silkscreen from areas without soldermask") ); - m_GerberOptionsSizer->Add( m_subtractMaskFromSilk, 0, wxTOP|wxRIGHT|wxLEFT, 2 ); + bSizerGbrOpt->Add( m_subtractMaskFromSilk, 0, wxALL, 2 ); + + + m_GerberOptionsSizer->Add( bSizerGbrOpt, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + wxString m_rbGerberFormatChoices[] = { _("4.5 (unit mm)"), _("4.6 (unit mm)") }; + int m_rbGerberFormatNChoices = sizeof( m_rbGerberFormatChoices ) / sizeof( wxString ); + m_rbGerberFormat = new wxRadioBox( this, wxID_ANY, _("Format"), wxDefaultPosition, wxDefaultSize, m_rbGerberFormatNChoices, m_rbGerberFormatChoices, 1, wxRA_SPECIFY_COLS ); + m_rbGerberFormat->SetSelection( 1 ); + m_rbGerberFormat->SetToolTip( _("Precision of coordinates in Gerber files/\nUse the highter value if possible.") ); + + m_GerberOptionsSizer->Add( m_rbGerberFormat, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); m_PlotOptionsSizer->Add( m_GerberOptionsSizer, 0, wxALL|wxEXPAND, 3 ); diff --git a/pcbnew/dialogs/dialog_plot_base.fbp b/pcbnew/dialogs/dialog_plot_base.fbp index 76d0fc9262..9bfcd299fe 100644 --- a/pcbnew/dialogs/dialog_plot_base.fbp +++ b/pcbnew/dialogs/dialog_plot_base.fbp @@ -2687,102 +2687,289 @@ Gerber Options m_GerberOptionsSizer - wxVERTICAL + wxHORIZONTAL protected - - 2 - wxLEFT|wxRIGHT|wxTOP + + 5 + wxALIGN_CENTER_VERTICAL 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Use proper filename extensions - - 0 - - - 0 + - 1 - m_useGerberExtensions - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Use proper Gerber extensions - .GBL, .GTL, etc... - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - + bSizerGbrOpt + wxVERTICAL + none + + 2 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Use proper filename extensions + + 0 + + + 0 + + 1 + m_useGerberExtensions + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Use proper Gerber extensions - .GBL, .GTL, etc... + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Include extended attributes + + 0 + + + 0 + + 1 + m_useGerberAttributes + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Include extended attributes for non-image data in the Gerber file + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Subtract soldermask from silkscreen + + 0 + + + 0 + + 1 + m_subtractMaskFromSilk + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Remove silkscreen from areas without soldermask + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - 2 - wxTOP|wxRIGHT|wxLEFT - 0 - + 5 + wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL + 1 + 1 1 1 @@ -2796,7 +2983,7 @@ 1 0 - 0 + "4.5 (unit mm)" "4.6 (unit mm)" 1 1 @@ -2811,7 +2998,8 @@ 0 0 wxID_ANY - Include extended attributes + Format + 1 0 @@ -2819,7 +3007,7 @@ 0 1 - m_useGerberAttributes + m_rbGerberFormat 1 @@ -2827,12 +3015,13 @@ 1 Resizable + 1 1 - + wxRA_SPECIFY_COLS 0 - Include extended attributes for non-image data in the Gerber file + Precision of coordinates in Gerber files/ Use the highter value if possible. wxFILTER_NONE wxDefaultValidator @@ -2841,95 +3030,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - 2 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Subtract soldermask from silkscreen - - 0 - - - 0 - - 1 - m_subtractMaskFromSilk - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Remove silkscreen from areas without soldermask - - wxFILTER_NONE - wxDefaultValidator - - - - - - @@ -2946,6 +3046,7 @@ + @@ -3162,11 +3263,11 @@ - + 5 wxEXPAND 1 - + bSizer21 wxVERTICAL diff --git a/pcbnew/dialogs/dialog_plot_base.h b/pcbnew/dialogs/dialog_plot_base.h index f710b095cb..13c4972a29 100644 --- a/pcbnew/dialogs/dialog_plot_base.h +++ b/pcbnew/dialogs/dialog_plot_base.h @@ -27,6 +27,7 @@ class DIALOG_SHIM; #include #include #include +#include #include #include #include @@ -91,6 +92,7 @@ class DIALOG_PLOT_BASE : public DIALOG_SHIM wxCheckBox* m_useGerberExtensions; wxCheckBox* m_useGerberAttributes; wxCheckBox* m_subtractMaskFromSilk; + wxRadioBox* m_rbGerberFormat; wxStaticBoxSizer* m_HPGLOptionsSizer; wxStaticText* m_textPenSize; wxTextCtrl* m_HPGLPenSizeOpt; diff --git a/pcbnew/layer_widget.cpp b/pcbnew/layer_widget.cpp index 0250d92763..fda117b8e4 100644 --- a/pcbnew/layer_widget.cpp +++ b/pcbnew/layer_widget.cpp @@ -726,7 +726,7 @@ void LAYER_WIDGET::SetLayerVisible( LAYER_NUM aLayer, bool isVisible ) int row = findLayerRow( aLayer ); if( row >= 0 ) { - wxCheckBox* cb = (wxCheckBox*) getLayerComp( row, 2 ); + wxCheckBox* cb = (wxCheckBox*) getLayerComp( row, COLUMN_COLOR_LYR_CB ); wxASSERT( cb ); cb->SetValue( isVisible ); // does not fire an event } diff --git a/pcbnew/pcb_plot_params.cpp b/pcbnew/pcb_plot_params.cpp index ea2993fe1e..c03acc51dd 100644 --- a/pcbnew/pcb_plot_params.cpp +++ b/pcbnew/pcb_plot_params.cpp @@ -49,6 +49,10 @@ */ int g_DrawDefaultLineThickness = PLOT_LINEWIDTH_DEFAULT; +// default trailing digits in Gerber coordinates, when units are mm +// This is also the max usable precision (i.e. internal Pcbnew Units) +static const int gbrDefaultPrecision = 6; + using namespace PCBPLOTPARAMS_T; @@ -79,6 +83,7 @@ PCB_PLOT_PARAMS::PCB_PLOT_PARAMS() : { m_useGerberExtensions = true; m_useGerberAttributes = false; + m_gerberPrecision = gbrDefaultPrecision; m_excludeEdgeLayer = true; m_lineWidth = g_DrawDefaultLineThickness; m_plotFrameRef = false; @@ -116,6 +121,17 @@ PCB_PLOT_PARAMS::PCB_PLOT_PARAMS() : m_skipNPTH_Pads = false; } +void PCB_PLOT_PARAMS::SetGerberPrecision( int aPrecision ) +{ + // Currently geber files use mm. + // accepted precision is only 6 (max value, this is the resolution of Pcbnew) + // or 5, min value for professional boards, when 6 creates problems + // to board makers. + + m_gerberPrecision = aPrecision == gbrDefaultPrecision-1 ? gbrDefaultPrecision-1 : + gbrDefaultPrecision; +} + // PLEASE NOTE: only plot dialog options are processed void PCB_PLOT_PARAMS::Format( OUTPUTFORMATTER* aFormatter, @@ -132,10 +148,15 @@ void PCB_PLOT_PARAMS::Format( OUTPUTFORMATTER* aFormatter, aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_usegerberextensions ), m_useGerberExtensions ? trueStr : falseStr ); - if( m_useGerberAttributes ) // save this option only if active, + if( m_useGerberAttributes ) // save this option only if active, // to avoid incompatibility with older Pcbnew version aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_usegerberattributes ), trueStr ); + if( m_gerberPrecision != gbrDefaultPrecision ) // save this option only if it is not the default value, + // to avoid incompatibility with older Pcbnew version + aFormatter->Print( aNestLevel+1, "(%s %d)\n", + getTokenName( T_gerberprecision ), m_gerberPrecision ); + aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_excludeedgelayer ), m_excludeEdgeLayer ? trueStr : falseStr ); aFormatter->Print( aNestLevel+1, "(%s %f)\n", getTokenName( T_linewidth ), @@ -205,6 +226,8 @@ bool PCB_PLOT_PARAMS::operator==( const PCB_PLOT_PARAMS &aPcbPlotParams ) const return false; if( m_useGerberAttributes != aPcbPlotParams.m_useGerberAttributes ) return false; + if( m_gerberPrecision != aPcbPlotParams.m_gerberPrecision ) + return false; if( m_excludeEdgeLayer != aPcbPlotParams.m_excludeEdgeLayer ) return false; if( m_lineWidth != aPcbPlotParams.m_lineWidth ) @@ -371,6 +394,11 @@ void PCB_PLOT_PARAMS_PARSER::Parse( PCB_PLOT_PARAMS* aPcbPlotParams ) aPcbPlotParams->m_useGerberAttributes = parseBool(); break; + case T_gerberprecision: + aPcbPlotParams->m_gerberPrecision = + parseInt( gbrDefaultPrecision-1, gbrDefaultPrecision); + break; + case T_psa4output: aPcbPlotParams->m_A4Output = parseBool(); break; @@ -438,10 +466,6 @@ void PCB_PLOT_PARAMS_PARSER::Parse( PCB_PLOT_PARAMS* aPcbPlotParams ) aPcbPlotParams->m_plotValue = parseBool(); break; - case T_plotothertext: // no more in use: keep for compatibility - parseBool(); // skip param value - break; - case T_plotinvisibletext: aPcbPlotParams->m_plotInvisibleText = parseBool(); break; @@ -478,7 +502,7 @@ void PCB_PLOT_PARAMS_PARSER::Parse( PCB_PLOT_PARAMS* aPcbPlotParams ) break; default: - Unexpected( CurText() ); + skipCurrent(); break; } NeedRIGHT(); @@ -526,3 +550,23 @@ double PCB_PLOT_PARAMS_PARSER::parseDouble() return val; } + +void PCB_PLOT_PARAMS_PARSER::skipCurrent() throw( IO_ERROR, PARSE_ERROR ) +{ + int curr_level = 0; + T token; + + while( ( token = NextTok() ) != T_EOF ) + { + if( token == T_LEFT ) + curr_level--; + + if( token == T_RIGHT ) + { + curr_level++; + + if( curr_level > 0 ) + return; + } + } +} diff --git a/pcbnew/pcb_plot_params.h b/pcbnew/pcb_plot_params.h index c3f6170a8c..9135475156 100644 --- a/pcbnew/pcb_plot_params.h +++ b/pcbnew/pcb_plot_params.h @@ -65,6 +65,13 @@ private: * @return double - the parsed double. */ double parseDouble(); + + /** + * Function skipCurrent + * Skip the current token level, i.e + * search for the RIGHT parenthesis which closes the current description + */ + void skipCurrent() throw( IO_ERROR, PARSE_ERROR ); }; @@ -131,9 +138,15 @@ private: * appending a suffix to the board name */ bool m_useGerberExtensions; - /// Include attributes from the Gerber X2 format (chapter 5 in revision J1) + /// Include attributes from the Gerber X2 format (chapter 5 in revision J2) bool m_useGerberAttributes; + /// precision of coordinates in Gerber files: accepted 5 or 6 + /// when units are in mm (6 or 7 in inches, but Pcbnew uses mm). + /// 6 is the internal resolution of Pcbnew, but not alwys accepted by board maker + /// 5 is the minimal value for professional boards. + int m_gerberPrecision; + /// Plot gerbers using auxiliary (drill) origin instead of page coordinates bool m_useAuxOrigin; @@ -254,20 +267,29 @@ public: void SetExcludeEdgeLayer( bool aFlag ) { m_excludeEdgeLayer = aFlag; } bool GetExcludeEdgeLayer() const { return m_excludeEdgeLayer; } - void SetFormat( PlotFormat aFormat ) { m_format = aFormat; }; - PlotFormat GetFormat() const { return m_format; }; + void SetFormat( PlotFormat aFormat ) { m_format = aFormat; } + PlotFormat GetFormat() const { return m_format; } - void SetOutputDirectory( wxString aDir ) { m_outputDirectory = aDir; }; - wxString GetOutputDirectory() const { return m_outputDirectory; }; + void SetOutputDirectory( wxString aDir ) { m_outputDirectory = aDir; } + wxString GetOutputDirectory() const { return m_outputDirectory; } - void SetUseGerberAttributes( bool aUse ) { m_useGerberAttributes = aUse; }; - bool GetUseGerberAttributes() const { return m_useGerberAttributes; }; + void SetUseGerberAttributes( bool aUse ) { m_useGerberAttributes = aUse; } + bool GetUseGerberAttributes() const { return m_useGerberAttributes; } - void SetUseGerberExtensions( bool aUse ) { m_useGerberExtensions = aUse; }; - bool GetUseGerberExtensions() const { return m_useGerberExtensions; }; + void SetUseGerberExtensions( bool aUse ) { m_useGerberExtensions = aUse; } + bool GetUseGerberExtensions() const { return m_useGerberExtensions; } + + void SetGerberPrecision( int aPrecision ); + int GetGerberPrecision() const { return m_gerberPrecision; } + + /** Default precision of coordinates in Gerber files. + * when units are in mm (7 in inches, but Pcbnew uses mm). + * 6 is the internal resolution of Pcbnew, so the default is 6 + */ + static int GetGerberDefaultPrecision() { return 6; } void SetSubtractMaskFromSilk( bool aSubtract ) { m_subtractMaskFromSilk = aSubtract; }; - bool GetSubtractMaskFromSilk() const { return m_subtractMaskFromSilk; }; + bool GetSubtractMaskFromSilk() const { return m_subtractMaskFromSilk; } void SetLayerSelection( LSET aSelection ) { m_layerSelection = aSelection; }; LSET GetLayerSelection() const { return m_layerSelection; }; diff --git a/pcbnew/pcbplot.cpp b/pcbnew/pcbplot.cpp index 7b492ad349..d638439bbf 100644 --- a/pcbnew/pcbplot.cpp +++ b/pcbnew/pcbplot.cpp @@ -123,7 +123,10 @@ wxString GetGerberFileFunction( const BOARD *aBoard, LAYER_NUM aLayer ) break; case Edge_Cuts: - attrib = wxString( wxT( "Profile" ) ); + // Board outline. + // Can be "Profile,NP" (Not Plated: usual) or "Profile,P" + // This last is the exception (Plated) + attrib = wxString( wxT( "Profile,NP" ) ); break; case Dwgs_User: diff --git a/pcbnew/plot_board_layers.cpp b/pcbnew/plot_board_layers.cpp index 42c93949f1..e96dcb0702 100644 --- a/pcbnew/plot_board_layers.cpp +++ b/pcbnew/plot_board_layers.cpp @@ -886,6 +886,10 @@ static void initializePlotter( PLOTTER *aPlotter, BOARD * aBoard, aPlotter->SetViewport( offset, IU_PER_DECIMILS, compound_scale, aPlotOpts->GetMirror() ); + + // has meaning only for gerber plotter. Must be called only after SetViewport + aPlotter->SetGerberCoordinatesFormat( aPlotOpts->GetGerberPrecision() ); + aPlotter->SetDefaultLineWidth( aPlotOpts->GetLineWidth() ); aPlotter->SetCreator( wxT( "PCBNEW" ) ); aPlotter->SetColorMode( false ); // default is plot in Black and White. diff --git a/pcbnew/printout_controler.cpp b/pcbnew/printout_controler.cpp index 595c39f2a7..3b982fe2bf 100644 --- a/pcbnew/printout_controler.cpp +++ b/pcbnew/printout_controler.cpp @@ -100,8 +100,9 @@ bool BOARD_PRINTOUT_CONTROLLER::OnPrintPage( int aPage ) // page order. LSEQ seq = lset.UIOrder(); - if( unsigned( aPage ) < seq.size() ) - m_PrintParams.m_PrintMaskLayer = LSET( seq[aPage] ); + // aPage starts at 1, not 0 + if( unsigned( aPage-1 ) < seq.size() ) + m_PrintParams.m_PrintMaskLayer = LSET( seq[aPage-1] ); } if( !m_PrintParams.m_PrintMaskLayer.any() ) From f71418ace959514d5a2b635ef54da940c923ac52 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 4 Jul 2014 17:54:14 +0200 Subject: [PATCH 547/741] Pcbnew: fix read .kicad_pcb file error when an outdated plot parameter is found. Now outdated plot parameters are just ignored --- pcbnew/pcb_plot_params.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pcbnew/pcb_plot_params.cpp b/pcbnew/pcb_plot_params.cpp index c03acc51dd..1761ca493a 100644 --- a/pcbnew/pcb_plot_params.cpp +++ b/pcbnew/pcb_plot_params.cpp @@ -353,6 +353,8 @@ void PCB_PLOT_PARAMS_PARSER::Parse( PCB_PLOT_PARAMS* aPcbPlotParams ) if( token == T_pcbplotparams ) continue; + bool skip_right = false; + switch( token ) { case T_layerselection: @@ -502,10 +504,13 @@ void PCB_PLOT_PARAMS_PARSER::Parse( PCB_PLOT_PARAMS* aPcbPlotParams ) break; default: - skipCurrent(); + skipCurrent(); // skip unknown or outdated plot parameter + skip_right = true; // the closing right token is already read. break; } - NeedRIGHT(); + + if( ! skip_right ) + NeedRIGHT(); } } From 9a7116d4abf2613834ba62ca9c77635e0eb6900c Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 4 Jul 2014 21:36:43 +0200 Subject: [PATCH 548/741] Update old demo board files. Minor code cleaning. --- common/gr_basic.cpp | 11 +- .../complex_hierarchy-cache.lib | 312 -- .../complex_hierarchy.kicad_pcb | 662 ++-- demos/ecc83/ecc83-pp-cache.lib | 34 +- demos/ecc83/ecc83-pp.kicad_pcb | 602 ++- demos/ecc83/ecc83-pp.net | 289 +- demos/ecc83/ecc83-pp.sch | 204 +- demos/ecc83/ecc83-pp_v2-cache.lib | 33 +- demos/ecc83/ecc83-pp_v2.kicad_pcb | 456 ++- demos/ecc83/ecc83-pp_v2.pro | 84 +- demos/ecc83/ecc83-pp_v2.sch | 175 +- demos/flat_hierarchy/flat_hierarchy-cache.lib | 541 --- demos/flat_hierarchy/flat_hierarchy.kicad_pcb | 3345 +++++++---------- demos/microwave/microwave.kicad_pcb | 52 +- .../test_pads_inside_pads.kicad_pcb | 72 +- demos/test_xil_95108/carte_test.kicad_pcb | 1390 ++++--- include/gr_basic.h | 3 - pcbnew/pcb_plot_params.cpp | 2 +- pcbnew/print_board_functions.cpp | 6 +- 19 files changed, 3426 insertions(+), 4847 deletions(-) delete mode 100644 demos/complex_hierarchy/complex_hierarchy-cache.lib delete mode 100644 demos/flat_hierarchy/flat_hierarchy-cache.lib diff --git a/common/gr_basic.cpp b/common/gr_basic.cpp index f82d997789..c554b57a86 100644 --- a/common/gr_basic.cpp +++ b/common/gr_basic.cpp @@ -47,9 +47,6 @@ static const bool NOT_FILLED = false; // For draw mode = XOR GR_XOR or GR_NXOR by background color GR_DRAWMODE g_XorMode = GR_NXOR; -// Background color of the design frame -EDA_COLOR_T g_DrawBgColor = WHITE; - static void ClipAndDrawPoly( EDA_RECT * ClipBox, wxDC * DC, wxPoint Points[], int n ); @@ -81,7 +78,7 @@ static wxDC* s_DC_lastDC = NULL; /*** * Utility for the line clipping code, returns the boundary code of - * a point. Bit allocation is arbitrary + * a point. Bit allocation is arbitrary */ static inline int clipOutCode( const EDA_RECT *aClipBox, int x, int y ) { @@ -124,7 +121,7 @@ static bool clipLine( const EDA_RECT *aClipBox, int &x1, int &y1, int &x2, int & // Fast reject if( outcode1 & outcode2 ) return true; - + // Choose a side to clip int thisoutcode, x, y; if( outcode1 ) @@ -140,12 +137,12 @@ static bool clipLine( const EDA_RECT *aClipBox, int &x1, int &y1, int &x2, int & { y = aClipBox->GetBottom(); x = x1 + (x2 - x1) * int64_t(y - y1) / (y2 - y1); - } + } else if( thisoutcode & 2 ) // Clip the top { y = aClipBox->GetY(); x = x1 + (x2 - x1) * int64_t(y - y1) / (y2 - y1); - } + } else if( thisoutcode & 8 ) // Clip the right { x = aClipBox->GetRight(); diff --git a/demos/complex_hierarchy/complex_hierarchy-cache.lib b/demos/complex_hierarchy/complex_hierarchy-cache.lib deleted file mode 100644 index ecb4e7c5e7..0000000000 --- a/demos/complex_hierarchy/complex_hierarchy-cache.lib +++ /dev/null @@ -1,312 +0,0 @@ -EESchema-LIBRARY Version 2.3 -#encoding utf-8 -# -# +12C -# -DEF +12C #PWR 0 0 N Y 1 F P -F0 "#PWR" 0 -30 30 H I C CNN -F1 "+12C" 0 110 40 H V C CNN -F2 "" 0 0 60 H V C CNN -F3 "" 0 0 60 H V C CNN -DRAW -X +12C 1 0 0 0 U 30 30 0 0 W N -C 0 60 20 0 1 0 N -P 4 0 1 0 0 0 0 40 0 40 0 40 N -ENDDRAW -ENDDEF -# -# +12V -# -DEF +12V #PWR 0 0 N Y 1 F P -F0 "#PWR" 0 -50 20 H I C CNN -F1 "+12V" 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 +12V 1 0 0 0 U 20 30 0 0 W N -C 0 60 20 0 1 0 N -P 3 0 1 0 0 0 0 40 0 40 N -ENDDRAW -ENDDEF -# -# -VAA -# -DEF -VAA #PWR 0 0 Y Y 1 F P -F0 "#PWR" 0 100 20 H I C CNN -F1 "-VAA" 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 -VAA 1 0 0 0 U 20 20 0 0 W N -P 3 0 1 0 0 0 0 50 0 50 N -P 7 0 1 0 0 80 30 50 -20 50 -30 50 0 80 0 80 0 80 F -ENDDRAW -ENDDEF -# -# 7805 -# -DEF 7805 U 0 30 N Y 1 F N -F0 "U" 150 -196 60 H V C CNN -F1 "7805" 0 200 60 H V C CNN -F2 "" 0 0 60 H V C CNN -F3 "" 0 0 60 H V C CNN -ALIAS LM7805 LM7812 78L05 -DRAW -S -200 -150 200 150 0 1 0 N -X VI VI -400 50 200 R 40 40 1 1 I -X VO VO 400 50 200 L 40 40 1 1 w -X GND GND 0 -250 100 U 40 40 1 1 I -ENDDRAW -ENDDEF -# -# C -# -DEF C C 0 10 N Y 1 F N -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 100 30 H V C CNN -$FPLIST - SM* - C? - C1-1 -$ENDFPLIST -DRAW -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 -ENDDEF -# -# CONN_2 -# -DEF CONN_2 P 0 40 Y N 1 F N -F0 "P" -50 0 40 V V C CNN -F1 "CONN_2" 50 0 40 V V C CNN -F2 "" 0 0 60 H V C CNN -F3 "" 0 0 60 H V C CNN -DRAW -S -100 150 100 -150 0 1 0 N -X P1 1 -350 100 250 R 60 60 1 1 P I -X PM 2 -350 -100 250 R 60 60 1 1 P I -ENDDRAW -ENDDEF -# -# CP -# -DEF CP C 0 10 N N 1 F N -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 "" 50 100 30 H V C CNN -ALIAS CAPAPOL -$FPLIST - CP* - SM* -$ENDFPLIST -DRAW -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 -ENDDRAW -ENDDEF -# -# DIODE -# -DEF DIODE D 0 40 N N 1 F N -F0 "D" 0 100 40 H V C CNN -F1 "DIODE" 0 -100 40 H V C CNN -F2 "" 0 0 60 H V C CNN -F3 "" 0 0 60 H V C CNN -$FPLIST - D? - S* -$ENDFPLIST -DRAW -P 2 0 1 6 50 50 50 -50 N -P 3 0 1 0 -50 50 50 0 -50 -50 F -X A 1 -200 0 150 R 40 40 1 1 P -X K 2 200 0 150 L 40 40 1 1 P -ENDDRAW -ENDDEF -# -# GND -# -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 -ENDDRAW -ENDDEF -# -# HT -# -DEF HT #PWR 0 0 Y Y 1 F P -F0 "#PWR" 0 120 20 H I C CNN -F1 "HT" 0 90 30 H V C CNN -F2 "" 0 0 60 H V C CNN -F3 "" 0 0 60 H V C CNN -DRAW -X HT 1 0 0 0 U 20 20 0 0 W N -P 3 0 1 0 0 0 0 40 0 40 N -P 6 0 1 0 0 40 20 20 0 70 -20 20 0 40 0 40 N -ENDDRAW -ENDDEF -# -# ICL7660 -# -DEF ICL7660 U 0 40 Y Y 1 F N -F0 "U" 200 400 70 H V L CNN -F1 "ICL7660" 50 -450 70 H V L CNN -F2 "" 0 0 60 H V C CNN -F3 "" 0 0 60 H V C CNN -DRAW -S -550 -350 550 350 0 1 0 N -X CAP+ 2 -850 250 300 R 60 60 1 1 I -X GND 3 -50 -650 300 U 60 60 1 1 W -X CAP- 4 -850 50 300 R 60 60 1 1 I -X VOUT 5 850 150 300 L 60 60 1 1 w -X LV 6 850 -150 300 L 60 60 1 1 I -X OSC 7 -850 -150 300 R 60 60 1 1 I -X V+ 8 -50 650 300 D 60 60 1 1 W -ENDDRAW -ENDDEF -# -# LM358 -# -DEF LM358 U 0 20 Y Y 2 F N -F0 "U" -50 200 60 H V L CNN -F1 "LM358" -50 -250 60 H V L CNN -F2 "" 0 0 60 H V C CNN -F3 "" 0 0 60 H V C CNN -ALIAS LMC6062 LMC6082 LM358N TL072 TL082 -DRAW -P 4 0 1 6 -200 200 200 0 -200 -200 -200 200 f -X V- 4 -100 -400 250 U 40 40 0 1 W -X V+ 8 -100 400 250 D 40 40 0 1 W -X ~ 1 500 0 300 L 40 40 1 1 O -X - 2 -500 -100 300 R 40 40 1 1 I -X + 3 -500 100 300 R 40 40 1 1 I -X + 5 -500 100 300 R 40 40 2 1 I -X - 6 -500 -100 300 R 40 40 2 1 I -X ~ 7 500 0 300 L 40 40 2 1 O -ENDDRAW -ENDDEF -# -# MPSA42 -# -DEF MPSA42 Q 0 40 Y N 1 F N -F0 "Q" 150 -150 60 H V L CNN -F1 "MPSA42" 150 150 60 H V L CNN -F2 "TO92-CBE" 150 0 30 H I C CNN -F3 "" 0 0 60 H V C CNN -$FPLIST - TO92-CBE -$ENDFPLIST -DRAW -C 50 0 111 0 1 10 N -P 2 0 1 0 0 0 100 100 N -P 3 0 1 10 0 75 0 -75 0 -75 N -P 3 0 1 0 50 -50 0 0 0 0 N -P 3 0 1 0 90 -90 100 -100 100 -100 N -P 5 0 1 0 90 -90 70 -30 30 -70 90 -90 90 -90 F -X B B -200 0 200 R 40 40 1 1 I -X C C 100 200 100 D 40 40 1 1 P -X E E 100 -200 100 U 40 40 1 1 P -ENDDRAW -ENDDEF -# -# MPSA92 -# -DEF MPSA92 Q 0 40 Y N 1 F N -F0 "Q" 150 -150 60 H V L CNN -F1 "MPSA92" 150 150 60 H V L CNN -F2 "TO92-CBE" 150 0 30 H I C CNN -F3 "" 0 0 60 H V C CNN -$FPLIST - TO92-CBE -$ENDFPLIST -DRAW -C 50 0 111 0 1 10 N -P 2 0 1 0 0 0 100 100 N -P 3 0 1 10 0 75 0 -75 0 -75 F -P 3 0 1 0 25 -25 0 0 0 0 N -P 3 0 1 0 100 -100 65 -65 65 -65 N -P 5 0 1 0 25 -25 50 -75 75 -50 25 -25 25 -25 F -X B B -200 0 200 R 40 40 1 1 I -X C C 100 200 100 D 40 40 1 1 P -X E E 100 -200 100 U 40 40 1 1 P -ENDDRAW -ENDDEF -# -# POT -# -DEF POT RV 0 40 Y N 1 F N -F0 "RV" 0 -100 50 H V C CNN -F1 "POT" 0 0 50 H V C CNN -F2 "" 0 0 60 H V C CNN -F3 "" 0 0 60 H V C CNN -DRAW -S -150 50 150 -50 0 1 0 N -P 3 0 1 0 0 50 -20 70 20 70 F -X 1 1 -250 0 100 R 40 40 1 1 P -X 2 2 0 150 80 D 40 40 1 1 P -X 3 3 250 0 100 L 40 40 1 1 P -ENDDRAW -ENDDEF -# -# PWR_FLAG -# -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 -ENDDRAW -ENDDEF -# -# R -# -DEF R R 0 0 N Y 1 F N -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 - SM0805 - R?-* - SM1206 -$ENDFPLIST -DRAW -S -40 150 40 -150 0 1 12 N -X ~ 1 0 250 100 D 60 60 1 1 P -X ~ 2 0 -250 100 U 60 60 1 1 P -ENDDRAW -ENDDEF -# -# VCC -# -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 -P 3 0 1 0 0 0 0 30 0 30 N -ENDDRAW -ENDDEF -# -#End Library diff --git a/demos/complex_hierarchy/complex_hierarchy.kicad_pcb b/demos/complex_hierarchy/complex_hierarchy.kicad_pcb index e430300f0a..405a8e3c8e 100644 --- a/demos/complex_hierarchy/complex_hierarchy.kicad_pcb +++ b/demos/complex_hierarchy/complex_hierarchy.kicad_pcb @@ -1,9 +1,9 @@ -(kicad_pcb (version 3) (host pcbnew "(2014-01-22 BZR 4630)-product") +(kicad_pcb (version 4) (host pcbnew "(2014-07-02 BZR 4969)-product") (general (links 112) (no_connects 0) - (area 84.538458 51.714399 192.321543 131.927601) + (area 84.619458 51.714399 192.240543 131.927601) (thickness 1.6002) (drawings 6) (tracks 360) @@ -18,16 +18,19 @@ ) (layers - (15 Composant power) - (0 Cuivre signal) - (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) - (28 Edge.Cuts user) + (0 Composant power) + (31 Cuivre signal) + (34 B.Paste user) + (35 F.Paste user) + (36 B.SilkS user) + (37 F.SilkS user) + (38 B.Mask user) + (39 F.Mask user) + (40 Dwgs.User user) + (41 Cmts.User user) + (42 Eco1.User user) + (43 Eco2.User user) + (44 Edge.Cuts user) ) (setup @@ -55,17 +58,18 @@ (pad_size 2.286 2.286) (pad_drill 0.8128) (pad_to_mask_clearance 0.254) - (aux_axis_origin 0 0) + (aux_axis_origin 83.5 138) (visible_elements 7FFFFFFF) (pcbplotparams - (layerselection 3178497) - (usegerberextensions true) - (excludeedgelayer true) + (layerselection 0x000fc_80000001) + (usegerberextensions false) + (usegerberattributes true) + (excludeedgelayer false) (linewidth 0.150000) (plotframeref false) (viasonmask false) (mode 1) - (useauxorigin false) + (useauxorigin true) (hpglpennumber 1) (hpglpenspeed 20) (hpglpendiameter 15) @@ -74,13 +78,12 @@ (psa4output false) (plotreference true) (plotvalue true) - (plotothertext true) (plotinvisibletext false) (padsonsilk false) (subtractmaskfromsilk false) (outputformat 1) (mirror false) - (drillshape 1) + (drillshape 0) (scaleselection 1) (outputdirectory "")) ) @@ -144,7 +147,6 @@ (via_drill 0.635) (uvia_dia 0.508) (uvia_drill 0.2032) - (add_net "") (add_net +12V) (add_net /ampli_ht_horizontal/PIEZO_IN) (add_net /ampli_ht_horizontal/PIEZO_OUT) @@ -2312,366 +2314,366 @@ (gr_line (start 188.595 51.816) (end 188.595 131.826) (angle 90) (layer Edge.Cuts) (width 0.2032)) (gr_line (start 88.265 51.816) (end 188.595 51.816) (angle 90) (layer Edge.Cuts) (width 0.2032)) - (segment (start 91.6686 87.249) (end 98.298 87.249) (width 0.6096) (layer Cuivre) (net 1)) - (segment (start 99.695 88.646) (end 107.315 88.646) (width 0.6096) (layer Cuivre) (net 1) (status 400)) - (segment (start 98.298 87.249) (end 99.695 88.646) (width 0.6096) (layer Cuivre) (net 1)) - (segment (start 91.6686 85.4837) (end 91.6686 81.8134) (width 0.6096) (layer Cuivre) (net 1)) - (segment (start 100.838 76.962) (end 109.27842 76.962) (width 0.6096) (layer Cuivre) (net 1)) - (segment (start 99.568 78.232) (end 100.838 76.962) (width 0.6096) (layer Cuivre) (net 1)) - (segment (start 95.25 78.232) (end 99.568 78.232) (width 0.6096) (layer Cuivre) (net 1)) - (segment (start 91.6686 81.8134) (end 95.25 78.232) (width 0.6096) (layer Cuivre) (net 1)) - (segment (start 123.825 68.326) (end 123.825 63.74892) (width 0.6096) (layer Cuivre) (net 1) (status 800)) - (segment (start 136.78916 63.74892) (end 139.83208 60.706) (width 0.6096) (layer Cuivre) (net 1)) - (segment (start 122.4915 63.74892) (end 123.825 63.74892) (width 0.6096) (layer Cuivre) (net 1)) - (segment (start 123.825 63.74892) (end 136.78916 63.74892) (width 0.6096) (layer Cuivre) (net 1)) - (segment (start 117.91442 68.326) (end 122.4915 63.74892) (width 0.6096) (layer Cuivre) (net 1)) - (segment (start 141.605 60.706) (end 139.83208 60.706) (width 0.6096) (layer Cuivre) (net 1) (status 800)) - (segment (start 116.205 68.326) (end 117.91442 68.326) (width 0.6096) (layer Cuivre) (net 1) (status 800)) - (segment (start 116.205 68.326) (end 116.205 70.03542) (width 0.6096) (layer Cuivre) (net 1) (status 800)) - (segment (start 116.205 70.03542) (end 109.27842 76.962) (width 0.6096) (layer Cuivre) (net 1)) - (segment (start 91.6686 112.75314) (end 91.6686 87.249) (width 0.6096) (layer Cuivre) (net 1)) - (segment (start 91.6686 87.249) (end 91.6686 85.4837) (width 0.6096) (layer Cuivre) (net 1)) - (segment (start 92.64904 113.73358) (end 91.6686 112.75314) (width 0.6096) (layer Cuivre) (net 1)) - (segment (start 94.68866 113.73358) (end 92.64904 113.73358) (width 0.6096) (layer Cuivre) (net 1)) - (segment (start 97.54108 116.586) (end 94.68866 113.73358) (width 0.6096) (layer Cuivre) (net 1)) (segment (start 107.315 116.586) (end 97.54108 116.586) (width 0.6096) (layer Cuivre) (net 1) (status 800)) - (segment (start 113.411 126.492) (end 114.681 126.492) (width 0.6096) (layer Composant) (net 2)) - (segment (start 114.935 126.238) (end 114.935 124.206) (width 0.6096) (layer Composant) (net 2) (status 400)) - (segment (start 114.681 126.492) (end 114.935 126.238) (width 0.6096) (layer Composant) (net 2)) - (segment (start 105.41 126.492) (end 104.775 125.857) (width 0.6096) (layer Composant) (net 2)) - (segment (start 113.411 126.492) (end 105.41 126.492) (width 0.6096) (layer Composant) (net 2)) - (segment (start 128.905 76.581) (end 128.143 76.581) (width 0.6096) (layer Cuivre) (net 2)) - (segment (start 123.317 77.724) (end 122.555 78.486) (width 0.6096) (layer Cuivre) (net 2)) - (segment (start 127 77.724) (end 123.317 77.724) (width 0.6096) (layer Cuivre) (net 2)) - (segment (start 128.143 76.581) (end 127 77.724) (width 0.6096) (layer Cuivre) (net 2)) - (segment (start 114.935 102.108) (end 114.935 102.362) (width 0.6096) (layer Composant) (net 2)) - (segment (start 104.775 109.601) (end 104.775 125.857) (width 0.6096) (layer Composant) (net 2)) - (segment (start 114.935 96.266) (end 114.935 102.108) (width 0.6096) (layer Composant) (net 2) (status 800)) - (segment (start 114.935 102.362) (end 112.776 104.521) (width 0.6096) (layer Composant) (net 2)) - (segment (start 112.776 104.521) (end 107.061 104.521) (width 0.6096) (layer Composant) (net 2)) - (segment (start 107.061 104.521) (end 104.775 106.807) (width 0.6096) (layer Composant) (net 2)) - (segment (start 104.775 106.807) (end 104.775 109.601) (width 0.6096) (layer Composant) (net 2)) - (segment (start 114.935 96.266) (end 114.935 95.123) (width 0.6096) (layer Cuivre) (net 2) (status 800)) - (segment (start 114.935 95.123) (end 117.602 92.456) (width 0.6096) (layer Cuivre) (net 2)) - (segment (start 117.602 92.456) (end 120.015 92.456) (width 0.6096) (layer Cuivre) (net 2)) - (segment (start 120.015 92.456) (end 122.555 89.916) (width 0.6096) (layer Cuivre) (net 2)) - (segment (start 122.555 89.916) (end 122.555 78.486) (width 0.6096) (layer Cuivre) (net 2)) - (segment (start 153.035 66.421) (end 153.035 64.516) (width 0.6096) (layer Cuivre) (net 2) (status 400)) - (segment (start 152.4 67.056) (end 153.035 66.421) (width 0.6096) (layer Cuivre) (net 2)) - (segment (start 140.97 67.056) (end 152.4 67.056) (width 0.6096) (layer Cuivre) (net 2)) - (segment (start 131.445 76.581) (end 140.97 67.056) (width 0.6096) (layer Cuivre) (net 2)) - (segment (start 128.905 76.581) (end 131.445 76.581) (width 0.6096) (layer Cuivre) (net 2)) - (segment (start 153.035 64.516) (end 158.75 64.516) (width 0.6096) (layer Cuivre) (net 2) (status 800)) + (segment (start 97.54108 116.586) (end 94.68866 113.73358) (width 0.6096) (layer Cuivre) (net 1)) + (segment (start 94.68866 113.73358) (end 92.64904 113.73358) (width 0.6096) (layer Cuivre) (net 1)) + (segment (start 92.64904 113.73358) (end 91.6686 112.75314) (width 0.6096) (layer Cuivre) (net 1)) + (segment (start 91.6686 87.249) (end 91.6686 85.4837) (width 0.6096) (layer Cuivre) (net 1)) + (segment (start 91.6686 112.75314) (end 91.6686 87.249) (width 0.6096) (layer Cuivre) (net 1)) + (segment (start 116.205 70.03542) (end 109.27842 76.962) (width 0.6096) (layer Cuivre) (net 1)) + (segment (start 116.205 68.326) (end 116.205 70.03542) (width 0.6096) (layer Cuivre) (net 1) (status 800)) + (segment (start 116.205 68.326) (end 117.91442 68.326) (width 0.6096) (layer Cuivre) (net 1) (status 800)) + (segment (start 141.605 60.706) (end 139.83208 60.706) (width 0.6096) (layer Cuivre) (net 1) (status 800)) + (segment (start 117.91442 68.326) (end 122.4915 63.74892) (width 0.6096) (layer Cuivre) (net 1)) + (segment (start 123.825 63.74892) (end 136.78916 63.74892) (width 0.6096) (layer Cuivre) (net 1)) + (segment (start 122.4915 63.74892) (end 123.825 63.74892) (width 0.6096) (layer Cuivre) (net 1)) + (segment (start 136.78916 63.74892) (end 139.83208 60.706) (width 0.6096) (layer Cuivre) (net 1)) + (segment (start 123.825 68.326) (end 123.825 63.74892) (width 0.6096) (layer Cuivre) (net 1) (status 800)) + (segment (start 91.6686 81.8134) (end 95.25 78.232) (width 0.6096) (layer Cuivre) (net 1)) + (segment (start 95.25 78.232) (end 99.568 78.232) (width 0.6096) (layer Cuivre) (net 1)) + (segment (start 99.568 78.232) (end 100.838 76.962) (width 0.6096) (layer Cuivre) (net 1)) + (segment (start 100.838 76.962) (end 109.27842 76.962) (width 0.6096) (layer Cuivre) (net 1)) + (segment (start 91.6686 85.4837) (end 91.6686 81.8134) (width 0.6096) (layer Cuivre) (net 1)) + (segment (start 98.298 87.249) (end 99.695 88.646) (width 0.6096) (layer Cuivre) (net 1)) + (segment (start 99.695 88.646) (end 107.315 88.646) (width 0.6096) (layer Cuivre) (net 1) (status 400)) + (segment (start 91.6686 87.249) (end 98.298 87.249) (width 0.6096) (layer Cuivre) (net 1)) (segment (start 158.75 64.516) (end 160.02 63.246) (width 0.6096) (layer Cuivre) (net 2) (status 400)) - (segment (start 98.92792 68.326) (end 97.65792 69.596) (width 0.6096) (layer Cuivre) (net 3)) - (segment (start 103.505 68.326) (end 98.92792 68.326) (width 0.6096) (layer Cuivre) (net 3) (status 800)) + (segment (start 153.035 64.516) (end 158.75 64.516) (width 0.6096) (layer Cuivre) (net 2) (status 800)) + (segment (start 128.905 76.581) (end 131.445 76.581) (width 0.6096) (layer Cuivre) (net 2)) + (segment (start 131.445 76.581) (end 140.97 67.056) (width 0.6096) (layer Cuivre) (net 2)) + (segment (start 140.97 67.056) (end 152.4 67.056) (width 0.6096) (layer Cuivre) (net 2)) + (segment (start 152.4 67.056) (end 153.035 66.421) (width 0.6096) (layer Cuivre) (net 2)) + (segment (start 153.035 66.421) (end 153.035 64.516) (width 0.6096) (layer Cuivre) (net 2) (status 400)) + (segment (start 122.555 89.916) (end 122.555 78.486) (width 0.6096) (layer Cuivre) (net 2)) + (segment (start 120.015 92.456) (end 122.555 89.916) (width 0.6096) (layer Cuivre) (net 2)) + (segment (start 117.602 92.456) (end 120.015 92.456) (width 0.6096) (layer Cuivre) (net 2)) + (segment (start 114.935 95.123) (end 117.602 92.456) (width 0.6096) (layer Cuivre) (net 2)) + (segment (start 114.935 96.266) (end 114.935 95.123) (width 0.6096) (layer Cuivre) (net 2) (status 800)) + (segment (start 104.775 106.807) (end 104.775 109.601) (width 0.6096) (layer Composant) (net 2)) + (segment (start 107.061 104.521) (end 104.775 106.807) (width 0.6096) (layer Composant) (net 2)) + (segment (start 112.776 104.521) (end 107.061 104.521) (width 0.6096) (layer Composant) (net 2)) + (segment (start 114.935 102.362) (end 112.776 104.521) (width 0.6096) (layer Composant) (net 2)) + (segment (start 114.935 96.266) (end 114.935 102.108) (width 0.6096) (layer Composant) (net 2) (status 800)) + (segment (start 104.775 109.601) (end 104.775 125.857) (width 0.6096) (layer Composant) (net 2)) + (segment (start 114.935 102.108) (end 114.935 102.362) (width 0.6096) (layer Composant) (net 2)) + (segment (start 128.143 76.581) (end 127 77.724) (width 0.6096) (layer Cuivre) (net 2)) + (segment (start 127 77.724) (end 123.317 77.724) (width 0.6096) (layer Cuivre) (net 2)) + (segment (start 123.317 77.724) (end 122.555 78.486) (width 0.6096) (layer Cuivre) (net 2)) + (segment (start 128.905 76.581) (end 128.143 76.581) (width 0.6096) (layer Cuivre) (net 2)) + (segment (start 113.411 126.492) (end 105.41 126.492) (width 0.6096) (layer Composant) (net 2)) + (segment (start 105.41 126.492) (end 104.775 125.857) (width 0.6096) (layer Composant) (net 2)) + (segment (start 114.681 126.492) (end 114.935 126.238) (width 0.6096) (layer Composant) (net 2)) + (segment (start 114.935 126.238) (end 114.935 124.206) (width 0.6096) (layer Composant) (net 2) (status 400)) + (segment (start 113.411 126.492) (end 114.681 126.492) (width 0.6096) (layer Composant) (net 2)) (segment (start 95.885 69.596) (end 97.65792 69.596) (width 0.6096) (layer Cuivre) (net 3) (status 800)) - (segment (start 100.965 80.518) (end 102.743 78.74) (width 0.4318) (layer Cuivre) (net 4) (status 400)) - (segment (start 95.885 83.185) (end 98.552 80.518) (width 0.4318) (layer Cuivre) (net 4)) - (segment (start 98.552 80.518) (end 100.965 80.518) (width 0.4318) (layer Cuivre) (net 4)) + (segment (start 103.505 68.326) (end 98.92792 68.326) (width 0.6096) (layer Cuivre) (net 3) (status 800)) + (segment (start 98.92792 68.326) (end 97.65792 69.596) (width 0.6096) (layer Cuivre) (net 3)) (segment (start 95.885 84.836) (end 95.885 83.185) (width 0.4318) (layer Cuivre) (net 4) (status 800)) - (segment (start 173.355 97.536) (end 173.355 100.076) (width 0.4318) (layer Cuivre) (net 5) (status 800)) - (segment (start 173.355 100.076) (end 182.245 100.076) (width 0.4318) (layer Cuivre) (net 5) (status 400)) + (segment (start 98.552 80.518) (end 100.965 80.518) (width 0.4318) (layer Cuivre) (net 4)) + (segment (start 95.885 83.185) (end 98.552 80.518) (width 0.4318) (layer Cuivre) (net 4)) + (segment (start 100.965 80.518) (end 102.743 78.74) (width 0.4318) (layer Cuivre) (net 4) (status 400)) (segment (start 173.355 97.536) (end 173.355 91.186) (width 0.4318) (layer Cuivre) (net 5) (status C00)) - (segment (start 156.845 92.456) (end 154.305 94.996) (width 0.4318) (layer Cuivre) (net 6)) - (segment (start 154.305 94.996) (end 146.685 94.996) (width 0.4318) (layer Cuivre) (net 6)) - (segment (start 156.845 89.916) (end 161.29 89.916) (width 0.4318) (layer Cuivre) (net 6) (status C00)) - (segment (start 118.618 99.187) (end 116.586 99.187) (width 0.4318) (layer Cuivre) (net 6)) - (segment (start 135.89 92.71) (end 123.698 92.71) (width 0.4318) (layer Cuivre) (net 6)) - (segment (start 120.523 95.885) (end 120.523 98.552) (width 0.4318) (layer Cuivre) (net 6)) - (segment (start 123.698 92.71) (end 120.523 95.885) (width 0.4318) (layer Cuivre) (net 6)) - (segment (start 119.888 99.187) (end 120.523 98.552) (width 0.4318) (layer Cuivre) (net 6)) - (segment (start 118.618 99.187) (end 119.888 99.187) (width 0.4318) (layer Cuivre) (net 6)) - (segment (start 105.7275 102.0445) (end 113.7285 102.0445) (width 0.4318) (layer Cuivre) (net 6)) - (segment (start 105.7275 102.0445) (end 103.69804 100.01504) (width 0.4318) (layer Cuivre) (net 6)) - (segment (start 98.48596 100.01504) (end 103.69804 100.01504) (width 0.4318) (layer Cuivre) (net 6)) - (segment (start 116.586 99.187) (end 116.078 99.695) (width 0.4318) (layer Cuivre) (net 6)) - (segment (start 113.7285 102.0445) (end 116.078 99.695) (width 0.4318) (layer Cuivre) (net 6)) - (segment (start 98.425 100.076) (end 98.48596 100.01504) (width 0.4318) (layer Cuivre) (net 6) (status 800)) - (segment (start 135.89 92.71) (end 135.89 91.186) (width 0.4318) (layer Cuivre) (net 6)) - (segment (start 143.51 91.821) (end 146.685 94.996) (width 0.4318) (layer Cuivre) (net 6)) - (segment (start 143.51 89.281) (end 143.51 91.821) (width 0.4318) (layer Cuivre) (net 6)) - (segment (start 142.24 88.011) (end 143.51 89.281) (width 0.4318) (layer Cuivre) (net 6)) - (segment (start 139.065 88.011) (end 142.24 88.011) (width 0.4318) (layer Cuivre) (net 6)) - (segment (start 135.89 91.186) (end 139.065 88.011) (width 0.4318) (layer Cuivre) (net 6)) + (segment (start 173.355 100.076) (end 182.245 100.076) (width 0.4318) (layer Cuivre) (net 5) (status 400)) + (segment (start 173.355 97.536) (end 173.355 100.076) (width 0.4318) (layer Cuivre) (net 5) (status 800)) (segment (start 156.845 89.916) (end 156.845 92.456) (width 0.4318) (layer Cuivre) (net 6) (status 800)) - (segment (start 109.855 88.646) (end 112.395 88.646) (width 0.4318) (layer Cuivre) (net 7) (status C00)) - (segment (start 118.745 81.026) (end 118.745 81.661) (width 0.4318) (layer Cuivre) (net 7) (status 800)) - (segment (start 118.745 81.661) (end 116.84 83.566) (width 0.4318) (layer Cuivre) (net 7)) - (segment (start 116.078 90.678) (end 114.427 90.678) (width 0.4318) (layer Cuivre) (net 7)) - (segment (start 112.395 88.646) (end 112.395 96.266) (width 0.4318) (layer Cuivre) (net 7) (status C00)) - (segment (start 114.427 90.678) (end 112.395 88.646) (width 0.4318) (layer Cuivre) (net 7) (status 400)) - (segment (start 116.84 83.566) (end 116.84 89.916) (width 0.4318) (layer Cuivre) (net 7)) + (segment (start 135.89 91.186) (end 139.065 88.011) (width 0.4318) (layer Cuivre) (net 6)) + (segment (start 139.065 88.011) (end 142.24 88.011) (width 0.4318) (layer Cuivre) (net 6)) + (segment (start 142.24 88.011) (end 143.51 89.281) (width 0.4318) (layer Cuivre) (net 6)) + (segment (start 143.51 89.281) (end 143.51 91.821) (width 0.4318) (layer Cuivre) (net 6)) + (segment (start 143.51 91.821) (end 146.685 94.996) (width 0.4318) (layer Cuivre) (net 6)) + (segment (start 135.89 92.71) (end 135.89 91.186) (width 0.4318) (layer Cuivre) (net 6)) + (segment (start 98.425 100.076) (end 98.48596 100.01504) (width 0.4318) (layer Cuivre) (net 6) (status 800)) + (segment (start 113.7285 102.0445) (end 116.078 99.695) (width 0.4318) (layer Cuivre) (net 6)) + (segment (start 116.586 99.187) (end 116.078 99.695) (width 0.4318) (layer Cuivre) (net 6)) + (segment (start 98.48596 100.01504) (end 103.69804 100.01504) (width 0.4318) (layer Cuivre) (net 6)) + (segment (start 105.7275 102.0445) (end 103.69804 100.01504) (width 0.4318) (layer Cuivre) (net 6)) + (segment (start 105.7275 102.0445) (end 113.7285 102.0445) (width 0.4318) (layer Cuivre) (net 6)) + (segment (start 118.618 99.187) (end 119.888 99.187) (width 0.4318) (layer Cuivre) (net 6)) + (segment (start 119.888 99.187) (end 120.523 98.552) (width 0.4318) (layer Cuivre) (net 6)) + (segment (start 123.698 92.71) (end 120.523 95.885) (width 0.4318) (layer Cuivre) (net 6)) + (segment (start 120.523 95.885) (end 120.523 98.552) (width 0.4318) (layer Cuivre) (net 6)) + (segment (start 135.89 92.71) (end 123.698 92.71) (width 0.4318) (layer Cuivre) (net 6)) + (segment (start 118.618 99.187) (end 116.586 99.187) (width 0.4318) (layer Cuivre) (net 6)) + (segment (start 156.845 89.916) (end 161.29 89.916) (width 0.4318) (layer Cuivre) (net 6) (status C00)) + (segment (start 154.305 94.996) (end 146.685 94.996) (width 0.4318) (layer Cuivre) (net 6)) + (segment (start 156.845 92.456) (end 154.305 94.996) (width 0.4318) (layer Cuivre) (net 6)) (segment (start 116.84 89.916) (end 116.078 90.678) (width 0.4318) (layer Cuivre) (net 7)) - (segment (start 95.758 107.061) (end 102.235 107.061) (width 0.4318) (layer Cuivre) (net 8) (status 400)) - (segment (start 94.615 108.204) (end 95.758 107.061) (width 0.4318) (layer Cuivre) (net 8)) + (segment (start 116.84 83.566) (end 116.84 89.916) (width 0.4318) (layer Cuivre) (net 7)) + (segment (start 114.427 90.678) (end 112.395 88.646) (width 0.4318) (layer Cuivre) (net 7) (status 400)) + (segment (start 112.395 88.646) (end 112.395 96.266) (width 0.4318) (layer Cuivre) (net 7) (status C00)) + (segment (start 116.078 90.678) (end 114.427 90.678) (width 0.4318) (layer Cuivre) (net 7)) + (segment (start 118.745 81.661) (end 116.84 83.566) (width 0.4318) (layer Cuivre) (net 7)) + (segment (start 118.745 81.026) (end 118.745 81.661) (width 0.4318) (layer Cuivre) (net 7) (status 800)) + (segment (start 109.855 88.646) (end 112.395 88.646) (width 0.4318) (layer Cuivre) (net 7) (status C00)) (segment (start 94.615 111.506) (end 94.615 108.204) (width 0.4318) (layer Cuivre) (net 8) (status 800)) - (segment (start 173.355 122.936) (end 173.355 119.126) (width 0.4318) (layer Cuivre) (net 9) (status C00)) + (segment (start 94.615 108.204) (end 95.758 107.061) (width 0.4318) (layer Cuivre) (net 8)) + (segment (start 95.758 107.061) (end 102.235 107.061) (width 0.4318) (layer Cuivre) (net 8) (status 400)) (segment (start 173.355 122.936) (end 182.245 122.936) (width 0.4318) (layer Cuivre) (net 9) (status C00)) - (segment (start 133.35 118.364) (end 134.112 118.364) (width 0.4318) (layer Cuivre) (net 10)) - (segment (start 142.875 117.221) (end 146.05 120.396) (width 0.4318) (layer Cuivre) (net 10)) - (segment (start 142.875 115.316) (end 142.875 117.221) (width 0.4318) (layer Cuivre) (net 10)) - (segment (start 141.605 114.046) (end 142.875 115.316) (width 0.4318) (layer Cuivre) (net 10)) - (segment (start 138.43 114.046) (end 141.605 114.046) (width 0.4318) (layer Cuivre) (net 10)) - (segment (start 134.112 118.364) (end 138.43 114.046) (width 0.4318) (layer Cuivre) (net 10)) - (segment (start 152.4 120.396) (end 146.05 120.396) (width 0.4318) (layer Cuivre) (net 10)) - (segment (start 152.4 120.396) (end 156.21 116.586) (width 0.4318) (layer Cuivre) (net 10) (status 400)) - (segment (start 160.02 116.586) (end 156.21 116.586) (width 0.4318) (layer Cuivre) (net 10) (status C00)) - (segment (start 98.425 125.476) (end 99.695 125.476) (width 0.4318) (layer Cuivre) (net 10) (status 800)) - (segment (start 105.029 125.222) (end 105.029 127.254) (width 0.4318) (layer Cuivre) (net 10)) - (segment (start 101.092 124.079) (end 103.886 124.079) (width 0.4318) (layer Cuivre) (net 10)) - (segment (start 103.886 124.079) (end 105.029 125.222) (width 0.4318) (layer Cuivre) (net 10)) - (segment (start 99.695 125.476) (end 101.092 124.079) (width 0.4318) (layer Cuivre) (net 10)) - (segment (start 124.0155 125.9205) (end 118.0465 125.9205) (width 0.4318) (layer Cuivre) (net 10)) - (segment (start 115.189 128.778) (end 106.553 128.778) (width 0.4318) (layer Cuivre) (net 10)) - (segment (start 106.553 128.778) (end 105.029 127.254) (width 0.4318) (layer Cuivre) (net 10)) - (segment (start 118.0465 125.9205) (end 117.221 126.746) (width 0.4318) (layer Cuivre) (net 10)) - (segment (start 131.572 118.364) (end 133.35 118.364) (width 0.4318) (layer Cuivre) (net 10)) - (segment (start 124.0155 125.9205) (end 131.572 118.364) (width 0.4318) (layer Cuivre) (net 10)) + (segment (start 173.355 122.936) (end 173.355 119.126) (width 0.4318) (layer Cuivre) (net 9) (status C00)) (segment (start 117.221 126.746) (end 115.189 128.778) (width 0.4318) (layer Cuivre) (net 10)) - (segment (start 116.713 112.522) (end 116.713 113.792) (width 0.4318) (layer Cuivre) (net 11)) - (segment (start 116.713 121.158) (end 112.395 121.158) (width 0.4318) (layer Cuivre) (net 11)) - (segment (start 118.618 119.253) (end 116.713 121.158) (width 0.4318) (layer Cuivre) (net 11)) - (segment (start 118.618 115.697) (end 118.618 119.253) (width 0.4318) (layer Cuivre) (net 11)) - (segment (start 116.713 113.792) (end 118.618 115.697) (width 0.4318) (layer Cuivre) (net 11)) - (segment (start 112.395 121.158) (end 112.395 116.586) (width 0.4318) (layer Cuivre) (net 11) (status 400)) - (segment (start 117.983 110.236) (end 116.713 111.506) (width 0.4318) (layer Cuivre) (net 11)) - (segment (start 112.395 116.586) (end 109.855 116.586) (width 0.4318) (layer Cuivre) (net 11) (status C00)) - (segment (start 116.713 111.506) (end 116.713 112.522) (width 0.4318) (layer Cuivre) (net 11)) - (segment (start 118.745 110.236) (end 117.983 110.236) (width 0.4318) (layer Cuivre) (net 11) (status 800)) + (segment (start 124.0155 125.9205) (end 131.572 118.364) (width 0.4318) (layer Cuivre) (net 10)) + (segment (start 131.572 118.364) (end 133.35 118.364) (width 0.4318) (layer Cuivre) (net 10)) + (segment (start 118.0465 125.9205) (end 117.221 126.746) (width 0.4318) (layer Cuivre) (net 10)) + (segment (start 106.553 128.778) (end 105.029 127.254) (width 0.4318) (layer Cuivre) (net 10)) + (segment (start 115.189 128.778) (end 106.553 128.778) (width 0.4318) (layer Cuivre) (net 10)) + (segment (start 124.0155 125.9205) (end 118.0465 125.9205) (width 0.4318) (layer Cuivre) (net 10)) + (segment (start 99.695 125.476) (end 101.092 124.079) (width 0.4318) (layer Cuivre) (net 10)) + (segment (start 103.886 124.079) (end 105.029 125.222) (width 0.4318) (layer Cuivre) (net 10)) + (segment (start 101.092 124.079) (end 103.886 124.079) (width 0.4318) (layer Cuivre) (net 10)) + (segment (start 105.029 125.222) (end 105.029 127.254) (width 0.4318) (layer Cuivre) (net 10)) + (segment (start 98.425 125.476) (end 99.695 125.476) (width 0.4318) (layer Cuivre) (net 10) (status 800)) + (segment (start 160.02 116.586) (end 156.21 116.586) (width 0.4318) (layer Cuivre) (net 10) (status C00)) + (segment (start 152.4 120.396) (end 156.21 116.586) (width 0.4318) (layer Cuivre) (net 10) (status 400)) + (segment (start 152.4 120.396) (end 146.05 120.396) (width 0.4318) (layer Cuivre) (net 10)) + (segment (start 134.112 118.364) (end 138.43 114.046) (width 0.4318) (layer Cuivre) (net 10)) + (segment (start 138.43 114.046) (end 141.605 114.046) (width 0.4318) (layer Cuivre) (net 10)) + (segment (start 141.605 114.046) (end 142.875 115.316) (width 0.4318) (layer Cuivre) (net 10)) + (segment (start 142.875 115.316) (end 142.875 117.221) (width 0.4318) (layer Cuivre) (net 10)) + (segment (start 142.875 117.221) (end 146.05 120.396) (width 0.4318) (layer Cuivre) (net 10)) + (segment (start 133.35 118.364) (end 134.112 118.364) (width 0.4318) (layer Cuivre) (net 10)) (segment (start 112.395 124.206) (end 112.395 121.158) (width 0.4318) (layer Cuivre) (net 11) (status 800)) - (segment (start 150.495 70.231) (end 151.765 68.961) (width 0.6096) (layer Cuivre) (net 12)) - (segment (start 150.495 72.136) (end 150.495 70.231) (width 0.6096) (layer Cuivre) (net 12) (status 800)) - (segment (start 151.765 68.961) (end 156.21 68.961) (width 0.6096) (layer Cuivre) (net 12)) - (segment (start 123.698 70.866) (end 123.825 70.866) (width 0.6096) (layer Cuivre) (net 12) (status 800)) - (segment (start 123.825 70.866) (end 125.73 68.961) (width 0.6096) (layer Cuivre) (net 12)) - (segment (start 156.21 68.961) (end 160.02 72.771) (width 0.6096) (layer Cuivre) (net 12)) + (segment (start 118.745 110.236) (end 117.983 110.236) (width 0.4318) (layer Cuivre) (net 11) (status 800)) + (segment (start 116.713 111.506) (end 116.713 112.522) (width 0.4318) (layer Cuivre) (net 11)) + (segment (start 112.395 116.586) (end 109.855 116.586) (width 0.4318) (layer Cuivre) (net 11) (status C00)) + (segment (start 117.983 110.236) (end 116.713 111.506) (width 0.4318) (layer Cuivre) (net 11)) + (segment (start 112.395 121.158) (end 112.395 116.586) (width 0.4318) (layer Cuivre) (net 11) (status 400)) + (segment (start 116.713 113.792) (end 118.618 115.697) (width 0.4318) (layer Cuivre) (net 11)) + (segment (start 118.618 115.697) (end 118.618 119.253) (width 0.4318) (layer Cuivre) (net 11)) + (segment (start 118.618 119.253) (end 116.713 121.158) (width 0.4318) (layer Cuivre) (net 11)) + (segment (start 116.713 121.158) (end 112.395 121.158) (width 0.4318) (layer Cuivre) (net 11)) + (segment (start 116.713 112.522) (end 116.713 113.792) (width 0.4318) (layer Cuivre) (net 11)) (segment (start 160.02 72.771) (end 160.02 78.486) (width 0.6096) (layer Cuivre) (net 12) (status 400)) - (segment (start 122.555 60.706) (end 121.76506 60.706) (width 0.6096) (layer Cuivre) (net 13) (status 800)) - (segment (start 124.8537 57.61736) (end 160.74136 57.61736) (width 0.6096) (layer Cuivre) (net 13)) - (segment (start 132.715 79.756) (end 135.76046 82.80146) (width 0.6096) (layer Cuivre) (net 13) (status 800)) - (segment (start 164.465 77.851) (end 159.385 82.931) (width 0.6096) (layer Cuivre) (net 13)) - (segment (start 143.383 108.966) (end 146.685 108.966) (width 0.6096) (layer Cuivre) (net 13) (status 400)) - (segment (start 140.843 106.426) (end 143.383 108.966) (width 0.6096) (layer Cuivre) (net 13)) - (segment (start 145.415 86.106) (end 147.955 83.566) (width 0.6096) (layer Composant) (net 13) (status 800)) - (segment (start 135.255 106.426) (end 140.716 106.426) (width 0.6096) (layer Cuivre) (net 13) (status 800)) - (segment (start 160.74136 57.61736) (end 164.465 61.341) (width 0.6096) (layer Cuivre) (net 13)) - (segment (start 140.716 106.426) (end 140.843 106.426) (width 0.6096) (layer Cuivre) (net 13)) - (segment (start 135.76046 82.80146) (end 142.11046 82.80146) (width 0.6096) (layer Cuivre) (net 13)) - (segment (start 121.76506 60.706) (end 124.8537 57.61736) (width 0.6096) (layer Cuivre) (net 13)) - (segment (start 146.685 108.966) (end 150.93696 113.21542) (width 0.6096) (layer Cuivre) (net 13) (status 800)) - (segment (start 151.765 115.316) (end 151.765 114.04854) (width 0.6096) (layer Cuivre) (net 13) (status 800)) - (segment (start 151.765 114.04854) (end 150.93696 113.21542) (width 0.6096) (layer Cuivre) (net 13)) - (segment (start 117.16258 56.896) (end 95.885 56.896) (width 0.6096) (layer Cuivre) (net 13) (status 400)) - (segment (start 120.97258 60.706) (end 117.16258 56.896) (width 0.6096) (layer Cuivre) (net 13)) - (segment (start 159.385 82.931) (end 152.4 82.931) (width 0.6096) (layer Cuivre) (net 13)) - (segment (start 149.225 86.106) (end 145.415 86.106) (width 0.6096) (layer Cuivre) (net 13) (status 400)) - (segment (start 164.465 61.341) (end 164.465 77.851) (width 0.6096) (layer Cuivre) (net 13)) - (segment (start 151.765 88.646) (end 149.225 86.106) (width 0.6096) (layer Cuivre) (net 13) (status 800)) - (segment (start 142.11046 82.80146) (end 145.415 86.106) (width 0.6096) (layer Cuivre) (net 13) (status 400)) - (segment (start 151.765 108.966) (end 146.685 108.966) (width 0.6096) (layer Composant) (net 13) (status 400)) - (segment (start 147.955 83.566) (end 151.765 83.566) (width 0.6096) (layer Composant) (net 13)) - (segment (start 151.765 83.566) (end 154.305 86.106) (width 0.6096) (layer Composant) (net 13)) - (segment (start 154.305 86.106) (end 154.305 106.426) (width 0.6096) (layer Composant) (net 13)) - (segment (start 121.76506 60.706) (end 120.97258 60.706) (width 0.6096) (layer Cuivre) (net 13)) - (segment (start 154.305 106.426) (end 151.765 108.966) (width 0.6096) (layer Composant) (net 13)) + (segment (start 156.21 68.961) (end 160.02 72.771) (width 0.6096) (layer Cuivre) (net 12)) + (segment (start 123.825 70.866) (end 125.73 68.961) (width 0.6096) (layer Cuivre) (net 12)) + (segment (start 123.698 70.866) (end 123.825 70.866) (width 0.6096) (layer Cuivre) (net 12) (status 800)) + (segment (start 151.765 68.961) (end 156.21 68.961) (width 0.6096) (layer Cuivre) (net 12)) + (segment (start 150.495 72.136) (end 150.495 70.231) (width 0.6096) (layer Cuivre) (net 12) (status 800)) + (segment (start 150.495 70.231) (end 151.765 68.961) (width 0.6096) (layer Cuivre) (net 12)) (segment (start 152.4 82.931) (end 149.225 86.106) (width 0.6096) (layer Cuivre) (net 13)) - (segment (start 147.955 70.231) (end 147.955 72.136) (width 0.4318) (layer Cuivre) (net 14) (status 400)) - (segment (start 142.24 68.961) (end 146.685 68.961) (width 0.4318) (layer Cuivre) (net 14)) - (segment (start 146.685 68.961) (end 147.955 70.231) (width 0.4318) (layer Cuivre) (net 14)) - (segment (start 139.7 77.216) (end 139.7 71.501) (width 0.4318) (layer Cuivre) (net 14) (status 800)) + (segment (start 154.305 106.426) (end 151.765 108.966) (width 0.6096) (layer Composant) (net 13)) + (segment (start 121.76506 60.706) (end 120.97258 60.706) (width 0.6096) (layer Cuivre) (net 13)) + (segment (start 154.305 86.106) (end 154.305 106.426) (width 0.6096) (layer Composant) (net 13)) + (segment (start 151.765 83.566) (end 154.305 86.106) (width 0.6096) (layer Composant) (net 13)) + (segment (start 147.955 83.566) (end 151.765 83.566) (width 0.6096) (layer Composant) (net 13)) + (segment (start 151.765 108.966) (end 146.685 108.966) (width 0.6096) (layer Composant) (net 13) (status 400)) + (segment (start 142.11046 82.80146) (end 145.415 86.106) (width 0.6096) (layer Cuivre) (net 13) (status 400)) + (segment (start 151.765 88.646) (end 149.225 86.106) (width 0.6096) (layer Cuivre) (net 13) (status 800)) + (segment (start 164.465 61.341) (end 164.465 77.851) (width 0.6096) (layer Cuivre) (net 13)) + (segment (start 149.225 86.106) (end 145.415 86.106) (width 0.6096) (layer Cuivre) (net 13) (status 400)) + (segment (start 159.385 82.931) (end 152.4 82.931) (width 0.6096) (layer Cuivre) (net 13)) + (segment (start 120.97258 60.706) (end 117.16258 56.896) (width 0.6096) (layer Cuivre) (net 13)) + (segment (start 117.16258 56.896) (end 95.885 56.896) (width 0.6096) (layer Cuivre) (net 13) (status 400)) + (segment (start 151.765 114.04854) (end 150.93696 113.21542) (width 0.6096) (layer Cuivre) (net 13)) + (segment (start 151.765 115.316) (end 151.765 114.04854) (width 0.6096) (layer Cuivre) (net 13) (status 800)) + (segment (start 146.685 108.966) (end 150.93696 113.21542) (width 0.6096) (layer Cuivre) (net 13) (status 800)) + (segment (start 121.76506 60.706) (end 124.8537 57.61736) (width 0.6096) (layer Cuivre) (net 13)) + (segment (start 135.76046 82.80146) (end 142.11046 82.80146) (width 0.6096) (layer Cuivre) (net 13)) + (segment (start 140.716 106.426) (end 140.843 106.426) (width 0.6096) (layer Cuivre) (net 13)) + (segment (start 160.74136 57.61736) (end 164.465 61.341) (width 0.6096) (layer Cuivre) (net 13)) + (segment (start 135.255 106.426) (end 140.716 106.426) (width 0.6096) (layer Cuivre) (net 13) (status 800)) + (segment (start 145.415 86.106) (end 147.955 83.566) (width 0.6096) (layer Composant) (net 13) (status 800)) + (segment (start 140.843 106.426) (end 143.383 108.966) (width 0.6096) (layer Cuivre) (net 13)) + (segment (start 143.383 108.966) (end 146.685 108.966) (width 0.6096) (layer Cuivre) (net 13) (status 400)) + (segment (start 164.465 77.851) (end 159.385 82.931) (width 0.6096) (layer Cuivre) (net 13)) + (segment (start 132.715 79.756) (end 135.76046 82.80146) (width 0.6096) (layer Cuivre) (net 13) (status 800)) + (segment (start 124.8537 57.61736) (end 160.74136 57.61736) (width 0.6096) (layer Cuivre) (net 13)) + (segment (start 122.555 60.706) (end 121.76506 60.706) (width 0.6096) (layer Cuivre) (net 13) (status 800)) (segment (start 139.7 71.501) (end 142.24 68.961) (width 0.4318) (layer Cuivre) (net 14)) - (segment (start 153.035 72.136) (end 153.035 75.311) (width 0.4318) (layer Cuivre) (net 15) (status 800)) + (segment (start 139.7 77.216) (end 139.7 71.501) (width 0.4318) (layer Cuivre) (net 14) (status 800)) + (segment (start 146.685 68.961) (end 147.955 70.231) (width 0.4318) (layer Cuivre) (net 14)) + (segment (start 142.24 68.961) (end 146.685 68.961) (width 0.4318) (layer Cuivre) (net 14)) + (segment (start 147.955 70.231) (end 147.955 72.136) (width 0.4318) (layer Cuivre) (net 14) (status 400)) (segment (start 153.035 75.311) (end 154.94 77.216) (width 0.4318) (layer Cuivre) (net 15) (status 400)) - (segment (start 106.172 107.061) (end 109.855 107.061) (width 0.4318) (layer Cuivre) (net 16) (status 400)) - (segment (start 102.235 110.236) (end 102.997 110.236) (width 0.4318) (layer Cuivre) (net 16) (status 800)) - (segment (start 109.855 107.061) (end 113.665 107.061) (width 0.4318) (layer Cuivre) (net 16) (status C00)) + (segment (start 153.035 72.136) (end 153.035 75.311) (width 0.4318) (layer Cuivre) (net 15) (status 800)) (segment (start 102.997 110.236) (end 106.172 107.061) (width 0.4318) (layer Cuivre) (net 16)) - (segment (start 102.235 82.296) (end 106.807 82.296) (width 0.4318) (layer Cuivre) (net 17) (status 800)) - (segment (start 110.363 78.74) (end 113.411 78.74) (width 0.4318) (layer Cuivre) (net 17) (status 800)) - (segment (start 113.411 78.74) (end 113.665 78.486) (width 0.4318) (layer Cuivre) (net 17) (status 400)) + (segment (start 109.855 107.061) (end 113.665 107.061) (width 0.4318) (layer Cuivre) (net 16) (status C00)) + (segment (start 102.235 110.236) (end 102.997 110.236) (width 0.4318) (layer Cuivre) (net 16) (status 800)) + (segment (start 106.172 107.061) (end 109.855 107.061) (width 0.4318) (layer Cuivre) (net 16) (status 400)) (segment (start 106.807 82.296) (end 110.363 78.74) (width 0.4318) (layer Cuivre) (net 17) (status 400)) - (segment (start 113.665 110.236) (end 109.855 110.236) (width 0.4318) (layer Cuivre) (net 18) (status C00)) - (segment (start 104.775 110.236) (end 109.855 110.236) (width 0.4318) (layer Cuivre) (net 18) (status 400)) + (segment (start 113.411 78.74) (end 113.665 78.486) (width 0.4318) (layer Cuivre) (net 17) (status 400)) + (segment (start 110.363 78.74) (end 113.411 78.74) (width 0.4318) (layer Cuivre) (net 17) (status 800)) + (segment (start 102.235 82.296) (end 106.807 82.296) (width 0.4318) (layer Cuivre) (net 17) (status 800)) (segment (start 102.235 112.776) (end 104.775 110.236) (width 0.4318) (layer Cuivre) (net 18) (status 800)) - (segment (start 109.855 112.776) (end 113.665 112.776) (width 0.4318) (layer Cuivre) (net 19) (status C00)) - (segment (start 114.935 114.046) (end 114.935 116.586) (width 0.4318) (layer Cuivre) (net 19) (status 400)) + (segment (start 104.775 110.236) (end 109.855 110.236) (width 0.4318) (layer Cuivre) (net 18) (status 400)) + (segment (start 113.665 110.236) (end 109.855 110.236) (width 0.4318) (layer Cuivre) (net 18) (status C00)) (segment (start 113.665 112.776) (end 114.935 114.046) (width 0.4318) (layer Cuivre) (net 19) (status 800)) - (segment (start 136.779 127.381) (end 136.779 128.651) (width 0.4318) (layer Cuivre) (net 20) (status 800)) + (segment (start 114.935 114.046) (end 114.935 116.586) (width 0.4318) (layer Cuivre) (net 19) (status 400)) + (segment (start 109.855 112.776) (end 113.665 112.776) (width 0.4318) (layer Cuivre) (net 19) (status C00)) (segment (start 136.779 128.651) (end 138.176 130.048) (width 0.4318) (layer Cuivre) (net 20) (status 400)) - (segment (start 109.855 82.296) (end 109.855 81.661) (width 0.4318) (layer Cuivre) (net 21) (status 800)) - (segment (start 109.855 84.836) (end 109.855 82.296) (width 0.4318) (layer Cuivre) (net 21) (status C00)) - (segment (start 110.49 81.026) (end 113.665 81.026) (width 0.4318) (layer Cuivre) (net 21) (status 400)) + (segment (start 136.779 127.381) (end 136.779 128.651) (width 0.4318) (layer Cuivre) (net 20) (status 800)) (segment (start 109.855 81.661) (end 110.49 81.026) (width 0.4318) (layer Cuivre) (net 21)) - (segment (start 113.665 85.471) (end 114.935 86.741) (width 0.4318) (layer Cuivre) (net 22)) - (segment (start 114.935 86.741) (end 114.935 88.646) (width 0.4318) (layer Cuivre) (net 22) (status 400)) - (segment (start 113.03 84.836) (end 111.252 86.614) (width 0.4318) (layer Cuivre) (net 22)) - (segment (start 113.665 84.836) (end 113.665 85.471) (width 0.4318) (layer Cuivre) (net 22) (status 800)) - (segment (start 111.252 86.614) (end 104.013 86.614) (width 0.4318) (layer Cuivre) (net 22)) - (segment (start 113.665 84.836) (end 113.03 84.836) (width 0.4318) (layer Cuivre) (net 22) (status 800)) + (segment (start 110.49 81.026) (end 113.665 81.026) (width 0.4318) (layer Cuivre) (net 21) (status 400)) + (segment (start 109.855 84.836) (end 109.855 82.296) (width 0.4318) (layer Cuivre) (net 21) (status C00)) + (segment (start 109.855 82.296) (end 109.855 81.661) (width 0.4318) (layer Cuivre) (net 21) (status 800)) (segment (start 104.013 86.614) (end 102.235 84.836) (width 0.4318) (layer Cuivre) (net 22) (status 400)) - (segment (start 135.255 101.346) (end 138.049 104.14) (width 0.4318) (layer Cuivre) (net 23) (status 400)) + (segment (start 113.665 84.836) (end 113.03 84.836) (width 0.4318) (layer Cuivre) (net 22) (status 800)) + (segment (start 111.252 86.614) (end 104.013 86.614) (width 0.4318) (layer Cuivre) (net 22)) + (segment (start 113.665 84.836) (end 113.665 85.471) (width 0.4318) (layer Cuivre) (net 22) (status 800)) + (segment (start 113.03 84.836) (end 111.252 86.614) (width 0.4318) (layer Cuivre) (net 22)) + (segment (start 114.935 86.741) (end 114.935 88.646) (width 0.4318) (layer Cuivre) (net 22) (status 400)) + (segment (start 113.665 85.471) (end 114.935 86.741) (width 0.4318) (layer Cuivre) (net 22)) (segment (start 133.985 101.346) (end 135.255 101.346) (width 0.4318) (layer Cuivre) (net 23) (status 800)) - (segment (start 127.635 106.426) (end 128.83642 106.426) (width 0.4318) (layer Cuivre) (net 24) (status 800)) - (segment (start 131.37642 108.966) (end 128.83642 106.426) (width 0.4318) (layer Cuivre) (net 24)) + (segment (start 135.255 101.346) (end 138.049 104.14) (width 0.4318) (layer Cuivre) (net 23) (status 400)) (segment (start 135.255 108.966) (end 131.37642 108.966) (width 0.4318) (layer Cuivre) (net 24) (status 800)) - (segment (start 127.635 110.16742) (end 130.175 112.70742) (width 0.4318) (layer Cuivre) (net 25)) - (segment (start 127.635 108.966) (end 127.635 110.16742) (width 0.4318) (layer Cuivre) (net 25) (status 800)) - (segment (start 122.555 115.316) (end 122.555 115.24742) (width 0.4318) (layer Cuivre) (net 25) (status 800)) - (segment (start 130.175 112.70742) (end 130.175 114.046) (width 0.4318) (layer Cuivre) (net 25) (status 400)) + (segment (start 131.37642 108.966) (end 128.83642 106.426) (width 0.4318) (layer Cuivre) (net 24)) + (segment (start 127.635 106.426) (end 128.83642 106.426) (width 0.4318) (layer Cuivre) (net 24) (status 800)) (segment (start 122.555 115.24742) (end 127.635 110.16742) (width 0.4318) (layer Cuivre) (net 25)) - (segment (start 144.78 122.301) (end 144.78 123.571) (width 0.4318) (layer Cuivre) (net 26) (status 400)) - (segment (start 140.97 118.491) (end 144.78 122.301) (width 0.4318) (layer Cuivre) (net 26)) + (segment (start 130.175 112.70742) (end 130.175 114.046) (width 0.4318) (layer Cuivre) (net 25) (status 400)) + (segment (start 122.555 115.316) (end 122.555 115.24742) (width 0.4318) (layer Cuivre) (net 25) (status 800)) + (segment (start 127.635 108.966) (end 127.635 110.16742) (width 0.4318) (layer Cuivre) (net 25) (status 800)) + (segment (start 127.635 110.16742) (end 130.175 112.70742) (width 0.4318) (layer Cuivre) (net 25)) (segment (start 140.97 115.951) (end 140.97 118.491) (width 0.4318) (layer Cuivre) (net 26) (status 800)) - (segment (start 140.97 123.571) (end 140.97 123.952) (width 0.4318) (layer Cuivre) (net 27) (status 800)) - (segment (start 140.97 123.952) (end 144.399 127.381) (width 0.4318) (layer Cuivre) (net 27) (status 400)) - (segment (start 133.985 124.206) (end 137.795 124.206) (width 0.4318) (layer Cuivre) (net 27) (status 800)) - (segment (start 138.43 123.571) (end 140.97 123.571) (width 0.4318) (layer Cuivre) (net 27) (status 400)) - (segment (start 137.795 124.206) (end 138.43 123.571) (width 0.4318) (layer Cuivre) (net 27)) - (segment (start 144.399 127.381) (end 144.78 127.381) (width 0.4318) (layer Cuivre) (net 27) (status 800)) - (segment (start 144.78 127.381) (end 145.415 128.016) (width 0.4318) (layer Cuivre) (net 27)) - (segment (start 145.415 128.016) (end 149.225 128.016) (width 0.4318) (layer Cuivre) (net 27)) - (segment (start 149.225 128.016) (end 150.495 126.746) (width 0.4318) (layer Cuivre) (net 27)) + (segment (start 140.97 118.491) (end 144.78 122.301) (width 0.4318) (layer Cuivre) (net 26)) + (segment (start 144.78 122.301) (end 144.78 123.571) (width 0.4318) (layer Cuivre) (net 26) (status 400)) (segment (start 150.495 126.746) (end 150.495 125.476) (width 0.4318) (layer Cuivre) (net 27) (status 400)) + (segment (start 149.225 128.016) (end 150.495 126.746) (width 0.4318) (layer Cuivre) (net 27)) + (segment (start 145.415 128.016) (end 149.225 128.016) (width 0.4318) (layer Cuivre) (net 27)) + (segment (start 144.78 127.381) (end 145.415 128.016) (width 0.4318) (layer Cuivre) (net 27)) + (segment (start 144.399 127.381) (end 144.78 127.381) (width 0.4318) (layer Cuivre) (net 27) (status 800)) + (segment (start 137.795 124.206) (end 138.43 123.571) (width 0.4318) (layer Cuivre) (net 27)) + (segment (start 138.43 123.571) (end 140.97 123.571) (width 0.4318) (layer Cuivre) (net 27) (status 400)) + (segment (start 133.985 124.206) (end 137.795 124.206) (width 0.4318) (layer Cuivre) (net 27) (status 800)) + (segment (start 140.97 123.952) (end 144.399 127.381) (width 0.4318) (layer Cuivre) (net 27) (status 400)) + (segment (start 140.97 123.571) (end 140.97 123.952) (width 0.4318) (layer Cuivre) (net 27) (status 800)) (segment (start 125.095 79.756) (end 125.095 82.296) (width 0.4318) (layer Cuivre) (net 28) (status C00)) - (segment (start 137.795 81.026) (end 137.795 79.756) (width 0.4318) (layer Cuivre) (net 29) (status 800)) - (segment (start 131.445 77.851) (end 130.175 79.121) (width 0.4318) (layer Cuivre) (net 29)) - (segment (start 132.715 82.296) (end 132.08 82.296) (width 0.4318) (layer Cuivre) (net 29) (status 800)) - (segment (start 132.08 82.296) (end 130.175 84.201) (width 0.4318) (layer Cuivre) (net 29)) - (segment (start 130.175 79.121) (end 130.175 79.756) (width 0.4318) (layer Cuivre) (net 29)) - (segment (start 130.175 79.756) (end 132.715 82.296) (width 0.4318) (layer Cuivre) (net 29) (status 400)) - (segment (start 137.795 79.756) (end 135.89 77.851) (width 0.4318) (layer Cuivre) (net 29)) - (segment (start 135.89 77.851) (end 131.445 77.851) (width 0.4318) (layer Cuivre) (net 29)) (segment (start 130.175 84.201) (end 130.175 87.376) (width 0.4318) (layer Cuivre) (net 29) (status 400)) - (segment (start 141.605 91.821) (end 145.415 95.631) (width 0.4318) (layer Cuivre) (net 30)) - (segment (start 141.605 89.916) (end 141.605 91.821) (width 0.4318) (layer Cuivre) (net 30) (status 800)) + (segment (start 135.89 77.851) (end 131.445 77.851) (width 0.4318) (layer Cuivre) (net 29)) + (segment (start 137.795 79.756) (end 135.89 77.851) (width 0.4318) (layer Cuivre) (net 29)) + (segment (start 130.175 79.756) (end 132.715 82.296) (width 0.4318) (layer Cuivre) (net 29) (status 400)) + (segment (start 130.175 79.121) (end 130.175 79.756) (width 0.4318) (layer Cuivre) (net 29)) + (segment (start 132.08 82.296) (end 130.175 84.201) (width 0.4318) (layer Cuivre) (net 29)) + (segment (start 132.715 82.296) (end 132.08 82.296) (width 0.4318) (layer Cuivre) (net 29) (status 800)) + (segment (start 131.445 77.851) (end 130.175 79.121) (width 0.4318) (layer Cuivre) (net 29)) + (segment (start 137.795 81.026) (end 137.795 79.756) (width 0.4318) (layer Cuivre) (net 29) (status 800)) (segment (start 145.415 95.631) (end 145.415 97.536) (width 0.4318) (layer Cuivre) (net 30) (status 400)) - (segment (start 134.53364 99.35464) (end 132.715 97.536) (width 0.4318) (layer Cuivre) (net 31) (status 400)) - (segment (start 139.85494 99.35464) (end 134.53364 99.35464) (width 0.4318) (layer Cuivre) (net 31)) - (segment (start 150.495 100.711) (end 150.495 101.346) (width 0.4318) (layer Cuivre) (net 31) (status 800)) - (segment (start 144.145 101.346) (end 141.605 101.346) (width 0.4318) (layer Cuivre) (net 31) (status 400)) - (segment (start 145.415 102.616) (end 144.145 101.346) (width 0.4318) (layer Cuivre) (net 31)) - (segment (start 149.225 102.616) (end 145.415 102.616) (width 0.4318) (layer Cuivre) (net 31)) - (segment (start 150.495 101.346) (end 149.225 102.616) (width 0.4318) (layer Cuivre) (net 31)) - (segment (start 141.605 97.536) (end 141.605 101.346) (width 0.4318) (layer Cuivre) (net 31) (status C00)) - (segment (start 141.67358 97.536) (end 139.85494 99.35464) (width 0.4318) (layer Cuivre) (net 31)) + (segment (start 141.605 89.916) (end 141.605 91.821) (width 0.4318) (layer Cuivre) (net 30) (status 800)) + (segment (start 141.605 91.821) (end 145.415 95.631) (width 0.4318) (layer Cuivre) (net 30)) (segment (start 141.605 97.536) (end 141.67358 97.536) (width 0.4318) (layer Cuivre) (net 31) (status 800)) - (segment (start 138.43 112.141) (end 136.525 114.046) (width 0.4318) (layer Cuivre) (net 32)) - (segment (start 144.145 112.141) (end 138.43 112.141) (width 0.4318) (layer Cuivre) (net 32)) - (segment (start 144.78 112.776) (end 144.145 112.141) (width 0.4318) (layer Cuivre) (net 32)) - (segment (start 149.225 115.316) (end 147.32 113.411) (width 0.4318) (layer Cuivre) (net 32) (status 800)) - (segment (start 147.32 113.411) (end 144.78 113.411) (width 0.4318) (layer Cuivre) (net 32)) - (segment (start 136.525 114.046) (end 132.715 114.046) (width 0.4318) (layer Cuivre) (net 32) (status 400)) - (segment (start 144.78 115.951) (end 144.78 113.411) (width 0.4318) (layer Cuivre) (net 32) (status 800)) + (segment (start 141.67358 97.536) (end 139.85494 99.35464) (width 0.4318) (layer Cuivre) (net 31)) + (segment (start 141.605 97.536) (end 141.605 101.346) (width 0.4318) (layer Cuivre) (net 31) (status C00)) + (segment (start 150.495 101.346) (end 149.225 102.616) (width 0.4318) (layer Cuivre) (net 31)) + (segment (start 149.225 102.616) (end 145.415 102.616) (width 0.4318) (layer Cuivre) (net 31)) + (segment (start 145.415 102.616) (end 144.145 101.346) (width 0.4318) (layer Cuivre) (net 31)) + (segment (start 144.145 101.346) (end 141.605 101.346) (width 0.4318) (layer Cuivre) (net 31) (status 400)) + (segment (start 150.495 100.711) (end 150.495 101.346) (width 0.4318) (layer Cuivre) (net 31) (status 800)) + (segment (start 139.85494 99.35464) (end 134.53364 99.35464) (width 0.4318) (layer Cuivre) (net 31)) + (segment (start 134.53364 99.35464) (end 132.715 97.536) (width 0.4318) (layer Cuivre) (net 31) (status 400)) (segment (start 144.78 113.411) (end 144.78 112.776) (width 0.4318) (layer Cuivre) (net 32)) - (segment (start 145.415 88.646) (end 144.78 88.011) (width 0.4318) (layer Cuivre) (net 33)) - (segment (start 144.78 88.011) (end 143.51 88.011) (width 0.4318) (layer Cuivre) (net 33)) - (segment (start 143.51 88.011) (end 139.7 84.201) (width 0.4318) (layer Cuivre) (net 33)) - (segment (start 138.43 84.201) (end 138.37666 84.14766) (width 0.4318) (layer Cuivre) (net 33)) - (segment (start 139.7 84.201) (end 138.43 84.201) (width 0.4318) (layer Cuivre) (net 33)) - (segment (start 138.37666 84.14766) (end 135.94334 84.14766) (width 0.4318) (layer Cuivre) (net 33)) - (segment (start 135.94334 84.14766) (end 132.715 87.376) (width 0.4318) (layer Cuivre) (net 33) (status 400)) - (segment (start 145.415 89.916) (end 145.415 88.646) (width 0.4318) (layer Cuivre) (net 33) (status 800)) + (segment (start 144.78 115.951) (end 144.78 113.411) (width 0.4318) (layer Cuivre) (net 32) (status 800)) + (segment (start 136.525 114.046) (end 132.715 114.046) (width 0.4318) (layer Cuivre) (net 32) (status 400)) + (segment (start 147.32 113.411) (end 144.78 113.411) (width 0.4318) (layer Cuivre) (net 32)) + (segment (start 149.225 115.316) (end 147.32 113.411) (width 0.4318) (layer Cuivre) (net 32) (status 800)) + (segment (start 144.78 112.776) (end 144.145 112.141) (width 0.4318) (layer Cuivre) (net 32)) + (segment (start 144.145 112.141) (end 138.43 112.141) (width 0.4318) (layer Cuivre) (net 32)) + (segment (start 138.43 112.141) (end 136.525 114.046) (width 0.4318) (layer Cuivre) (net 32)) (segment (start 145.415 88.646) (end 149.225 88.646) (width 0.4318) (layer Cuivre) (net 33) (status 400)) - (segment (start 130.175 116.586) (end 130.514 116.586) (width 0.4) (layer Cuivre) (net 34)) - (segment (start 136.031 112) (end 139.065 108.966) (width 0.4) (layer Cuivre) (net 34) (tstamp 52E36988)) - (segment (start 132.7 112) (end 136.031 112) (width 0.4) (layer Cuivre) (net 34) (tstamp 52E36987)) - (segment (start 131.44787 113.25213) (end 132.7 112) (width 0.4) (layer Cuivre) (net 34) (tstamp 52E36985)) - (segment (start 131.44787 115.65213) (end 131.44787 113.25213) (width 0.4) (layer Cuivre) (net 34) (tstamp 52E36982)) + (segment (start 145.415 89.916) (end 145.415 88.646) (width 0.4318) (layer Cuivre) (net 33) (status 800)) + (segment (start 135.94334 84.14766) (end 132.715 87.376) (width 0.4318) (layer Cuivre) (net 33) (status 400)) + (segment (start 138.37666 84.14766) (end 135.94334 84.14766) (width 0.4318) (layer Cuivre) (net 33)) + (segment (start 139.7 84.201) (end 138.43 84.201) (width 0.4318) (layer Cuivre) (net 33)) + (segment (start 138.43 84.201) (end 138.37666 84.14766) (width 0.4318) (layer Cuivre) (net 33)) + (segment (start 143.51 88.011) (end 139.7 84.201) (width 0.4318) (layer Cuivre) (net 33)) + (segment (start 144.78 88.011) (end 143.51 88.011) (width 0.4318) (layer Cuivre) (net 33)) + (segment (start 145.415 88.646) (end 144.78 88.011) (width 0.4318) (layer Cuivre) (net 33)) (segment (start 130.514 116.586) (end 131.44787 115.65213) (width 0.4) (layer Cuivre) (net 34) (tstamp 52E3697F)) - (segment (start 160.02 124.206) (end 160.02 121.031) (width 0.4318) (layer Cuivre) (net 35) (status 800)) - (segment (start 161.925 119.126) (end 165.735 119.126) (width 0.4318) (layer Cuivre) (net 35) (status 400)) - (segment (start 160.02 121.031) (end 161.925 119.126) (width 0.4318) (layer Cuivre) (net 35)) - (segment (start 165.735 119.126) (end 165.735 115.951) (width 0.4318) (layer Cuivre) (net 35) (status 800)) - (segment (start 161.925 114.046) (end 156.21 114.046) (width 0.4318) (layer Cuivre) (net 35)) - (segment (start 156.21 114.046) (end 152.4 117.856) (width 0.4318) (layer Cuivre) (net 35)) - (segment (start 152.4 117.856) (end 149.225 117.856) (width 0.4318) (layer Cuivre) (net 35) (status 400)) - (segment (start 165.735 115.951) (end 163.83 114.046) (width 0.4318) (layer Cuivre) (net 35)) + (segment (start 131.44787 115.65213) (end 131.44787 113.25213) (width 0.4) (layer Cuivre) (net 34) (tstamp 52E36982)) + (segment (start 131.44787 113.25213) (end 132.7 112) (width 0.4) (layer Cuivre) (net 34) (tstamp 52E36985)) + (segment (start 132.7 112) (end 136.031 112) (width 0.4) (layer Cuivre) (net 34) (tstamp 52E36987)) + (segment (start 136.031 112) (end 139.065 108.966) (width 0.4) (layer Cuivre) (net 34) (tstamp 52E36988)) + (segment (start 130.175 116.586) (end 130.514 116.586) (width 0.4) (layer Cuivre) (net 34)) (segment (start 163.83 114.046) (end 161.925 114.046) (width 0.4318) (layer Cuivre) (net 35)) - (segment (start 156.21 124.206) (end 156.21 126.111) (width 0.4318) (layer Cuivre) (net 36) (status 800)) - (segment (start 163.195 126.111) (end 165.735 122.936) (width 0.4318) (layer Cuivre) (net 36) (status 400)) - (segment (start 162.56 126.746) (end 163.195 126.111) (width 0.4318) (layer Cuivre) (net 36)) - (segment (start 156.845 126.746) (end 162.56 126.746) (width 0.4318) (layer Cuivre) (net 36)) - (segment (start 156.21 126.111) (end 156.845 126.746) (width 0.4318) (layer Cuivre) (net 36)) - (segment (start 150.495 122.936) (end 154.94 122.936) (width 0.4318) (layer Cuivre) (net 36) (status 800)) + (segment (start 165.735 115.951) (end 163.83 114.046) (width 0.4318) (layer Cuivre) (net 35)) + (segment (start 152.4 117.856) (end 149.225 117.856) (width 0.4318) (layer Cuivre) (net 35) (status 400)) + (segment (start 156.21 114.046) (end 152.4 117.856) (width 0.4318) (layer Cuivre) (net 35)) + (segment (start 161.925 114.046) (end 156.21 114.046) (width 0.4318) (layer Cuivre) (net 35)) + (segment (start 165.735 119.126) (end 165.735 115.951) (width 0.4318) (layer Cuivre) (net 35) (status 800)) + (segment (start 160.02 121.031) (end 161.925 119.126) (width 0.4318) (layer Cuivre) (net 35)) + (segment (start 161.925 119.126) (end 165.735 119.126) (width 0.4318) (layer Cuivre) (net 35) (status 400)) + (segment (start 160.02 124.206) (end 160.02 121.031) (width 0.4318) (layer Cuivre) (net 35) (status 800)) (segment (start 154.94 122.936) (end 156.21 124.206) (width 0.4318) (layer Cuivre) (net 36) (status 400)) - (segment (start 130.175 124.206) (end 131.445 124.206) (width 0.4318) (layer Cuivre) (net 37) (status 400)) + (segment (start 150.495 122.936) (end 154.94 122.936) (width 0.4318) (layer Cuivre) (net 36) (status 800)) + (segment (start 156.21 126.111) (end 156.845 126.746) (width 0.4318) (layer Cuivre) (net 36)) + (segment (start 156.845 126.746) (end 162.56 126.746) (width 0.4318) (layer Cuivre) (net 36)) + (segment (start 162.56 126.746) (end 163.195 126.111) (width 0.4318) (layer Cuivre) (net 36)) + (segment (start 163.195 126.111) (end 165.735 122.936) (width 0.4318) (layer Cuivre) (net 36) (status 400)) + (segment (start 156.21 124.206) (end 156.21 126.111) (width 0.4318) (layer Cuivre) (net 36) (status 800)) (segment (start 126.365 128.016) (end 130.175 124.206) (width 0.4318) (layer Cuivre) (net 37) (status 800)) - (segment (start 134.112 120.142) (end 132.715 121.539) (width 0.4318) (layer Cuivre) (net 38)) - (segment (start 132.715 121.539) (end 132.715 125.476) (width 0.4318) (layer Cuivre) (net 38)) - (segment (start 134.493 120.142) (end 134.112 120.142) (width 0.4318) (layer Cuivre) (net 38) (status 800)) + (segment (start 130.175 124.206) (end 131.445 124.206) (width 0.4318) (layer Cuivre) (net 37) (status 400)) (segment (start 132.715 125.476) (end 131.445 126.746) (width 0.4318) (layer Cuivre) (net 38) (status 400)) - (segment (start 137.795 87.122) (end 137.795 86.106) (width 0.4318) (layer Cuivre) (net 39) (status 400)) - (segment (start 135.001 89.916) (end 137.795 87.122) (width 0.4318) (layer Cuivre) (net 39)) + (segment (start 134.493 120.142) (end 134.112 120.142) (width 0.4318) (layer Cuivre) (net 38) (status 800)) + (segment (start 132.715 121.539) (end 132.715 125.476) (width 0.4318) (layer Cuivre) (net 38)) + (segment (start 134.112 120.142) (end 132.715 121.539) (width 0.4318) (layer Cuivre) (net 38)) (segment (start 130.175 89.916) (end 135.001 89.916) (width 0.4318) (layer Cuivre) (net 39) (status 800)) - (segment (start 161.29 97.536) (end 161.29 95.631) (width 0.4318) (layer Cuivre) (net 40) (status 800)) - (segment (start 161.29 95.631) (end 165.735 91.186) (width 0.4318) (layer Cuivre) (net 40) (status 400)) - (segment (start 165.735 91.186) (end 165.735 88.011) (width 0.4318) (layer Cuivre) (net 40) (status 800)) - (segment (start 154.305 89.916) (end 154.305 87.376) (width 0.4318) (layer Cuivre) (net 40)) - (segment (start 154.305 87.376) (end 155.575 86.106) (width 0.4318) (layer Cuivre) (net 40)) - (segment (start 155.575 86.106) (end 160.655 86.106) (width 0.4318) (layer Cuivre) (net 40)) - (segment (start 149.225 91.186) (end 153.035 91.186) (width 0.4318) (layer Cuivre) (net 40) (status 800)) - (segment (start 154.305 89.916) (end 153.035 91.186) (width 0.4318) (layer Cuivre) (net 40)) - (segment (start 165.735 88.011) (end 163.83 86.106) (width 0.4318) (layer Cuivre) (net 40)) + (segment (start 135.001 89.916) (end 137.795 87.122) (width 0.4318) (layer Cuivre) (net 39)) + (segment (start 137.795 87.122) (end 137.795 86.106) (width 0.4318) (layer Cuivre) (net 39) (status 400)) (segment (start 163.83 86.106) (end 160.655 86.106) (width 0.4318) (layer Cuivre) (net 40)) - (segment (start 165.735 97.536) (end 165.735 98.806) (width 0.4318) (layer Cuivre) (net 41) (status 800)) - (segment (start 164.465 100.076) (end 161.925 100.076) (width 0.4318) (layer Cuivre) (net 41)) - (segment (start 165.735 98.806) (end 164.465 100.076) (width 0.4318) (layer Cuivre) (net 41)) - (segment (start 150.495 98.171) (end 156.21 98.171) (width 0.4318) (layer Cuivre) (net 41) (status 800)) - (segment (start 156.21 98.171) (end 156.845 97.536) (width 0.4318) (layer Cuivre) (net 41) (status 400)) - (segment (start 156.845 98.806) (end 158.115 100.076) (width 0.4318) (layer Cuivre) (net 41)) - (segment (start 158.115 100.076) (end 161.925 100.076) (width 0.4318) (layer Cuivre) (net 41)) + (segment (start 165.735 88.011) (end 163.83 86.106) (width 0.4318) (layer Cuivre) (net 40)) + (segment (start 154.305 89.916) (end 153.035 91.186) (width 0.4318) (layer Cuivre) (net 40)) + (segment (start 149.225 91.186) (end 153.035 91.186) (width 0.4318) (layer Cuivre) (net 40) (status 800)) + (segment (start 155.575 86.106) (end 160.655 86.106) (width 0.4318) (layer Cuivre) (net 40)) + (segment (start 154.305 87.376) (end 155.575 86.106) (width 0.4318) (layer Cuivre) (net 40)) + (segment (start 154.305 89.916) (end 154.305 87.376) (width 0.4318) (layer Cuivre) (net 40)) + (segment (start 165.735 91.186) (end 165.735 88.011) (width 0.4318) (layer Cuivre) (net 40) (status 800)) + (segment (start 161.29 95.631) (end 165.735 91.186) (width 0.4318) (layer Cuivre) (net 40) (status 400)) + (segment (start 161.29 97.536) (end 161.29 95.631) (width 0.4318) (layer Cuivre) (net 40) (status 800)) (segment (start 156.845 97.536) (end 156.845 98.806) (width 0.4318) (layer Cuivre) (net 41) (status 800)) - (segment (start 126.365 97.536) (end 125.603 98.298) (width 0.4318) (layer Cuivre) (net 42)) - (segment (start 125.603 98.298) (end 125.603 101.346) (width 0.4318) (layer Cuivre) (net 42) (status 400)) + (segment (start 158.115 100.076) (end 161.925 100.076) (width 0.4318) (layer Cuivre) (net 41)) + (segment (start 156.845 98.806) (end 158.115 100.076) (width 0.4318) (layer Cuivre) (net 41)) + (segment (start 156.21 98.171) (end 156.845 97.536) (width 0.4318) (layer Cuivre) (net 41) (status 400)) + (segment (start 150.495 98.171) (end 156.21 98.171) (width 0.4318) (layer Cuivre) (net 41) (status 800)) + (segment (start 165.735 98.806) (end 164.465 100.076) (width 0.4318) (layer Cuivre) (net 41)) + (segment (start 164.465 100.076) (end 161.925 100.076) (width 0.4318) (layer Cuivre) (net 41)) + (segment (start 165.735 97.536) (end 165.735 98.806) (width 0.4318) (layer Cuivre) (net 41) (status 800)) (segment (start 130.175 97.536) (end 126.365 97.536) (width 0.4318) (layer Cuivre) (net 42) (status 800)) - (segment (start 126.619 103.632) (end 130.175 100.076) (width 0.4318) (layer Cuivre) (net 43) (status 400)) - (segment (start 123.19 96.647) (end 123.19 102.362) (width 0.4318) (layer Cuivre) (net 43)) - (segment (start 123.19 102.362) (end 124.46 103.632) (width 0.4318) (layer Cuivre) (net 43)) - (segment (start 124.841 94.996) (end 123.19 96.647) (width 0.4318) (layer Cuivre) (net 43)) - (segment (start 126.111 94.996) (end 124.841 94.996) (width 0.4318) (layer Cuivre) (net 43) (status 800)) + (segment (start 125.603 98.298) (end 125.603 101.346) (width 0.4318) (layer Cuivre) (net 42) (status 400)) + (segment (start 126.365 97.536) (end 125.603 98.298) (width 0.4318) (layer Cuivre) (net 42)) (segment (start 124.46 103.632) (end 126.619 103.632) (width 0.4318) (layer Cuivre) (net 43)) - (segment (start 102.87 126.746) (end 101.6 128.016) (width 0.4318) (layer Cuivre) (net 44) (status 800)) - (segment (start 93.345 125.476) (end 95.885 128.016) (width 0.4318) (layer Cuivre) (net 44) (status 800)) + (segment (start 126.111 94.996) (end 124.841 94.996) (width 0.4318) (layer Cuivre) (net 43) (status 800)) + (segment (start 124.841 94.996) (end 123.19 96.647) (width 0.4318) (layer Cuivre) (net 43)) + (segment (start 123.19 102.362) (end 124.46 103.632) (width 0.4318) (layer Cuivre) (net 43)) + (segment (start 123.19 96.647) (end 123.19 102.362) (width 0.4318) (layer Cuivre) (net 43)) + (segment (start 126.619 103.632) (end 130.175 100.076) (width 0.4318) (layer Cuivre) (net 43) (status 400)) (segment (start 95.885 128.016) (end 101.6 128.016) (width 0.4318) (layer Cuivre) (net 44)) - (segment (start 118.491 97.028) (end 118.491 94.996) (width 0.4318) (layer Cuivre) (net 45) (status 400)) - (segment (start 114.046 99.06) (end 114.935 99.06) (width 0.4318) (layer Cuivre) (net 45)) - (segment (start 108.839 99.06) (end 114.046 99.06) (width 0.4318) (layer Cuivre) (net 45)) - (segment (start 116.967 98.171) (end 115.824 98.171) (width 0.4318) (layer Cuivre) (net 45)) - (segment (start 116.967 98.171) (end 117.348 98.171) (width 0.4318) (layer Cuivre) (net 45)) - (segment (start 117.348 98.171) (end 118.491 97.028) (width 0.4318) (layer Cuivre) (net 45)) - (segment (start 107.315 97.536) (end 108.839 99.06) (width 0.4318) (layer Cuivre) (net 45)) - (segment (start 114.935 99.06) (end 115.824 98.171) (width 0.4318) (layer Cuivre) (net 45)) - (segment (start 107.315 96.266) (end 107.315 97.536) (width 0.4318) (layer Cuivre) (net 45) (status 800)) + (segment (start 93.345 125.476) (end 95.885 128.016) (width 0.4318) (layer Cuivre) (net 44) (status 800)) + (segment (start 102.87 126.746) (end 101.6 128.016) (width 0.4318) (layer Cuivre) (net 44) (status 800)) (segment (start 115.824 98.171) (end 114.935 99.06) (width 0.4318) (layer Cuivre) (net 45)) - (segment (start 95.885 102.616) (end 102.235 102.616) (width 0.4318) (layer Cuivre) (net 46) (status 400)) + (segment (start 107.315 96.266) (end 107.315 97.536) (width 0.4318) (layer Cuivre) (net 45) (status 800)) + (segment (start 114.935 99.06) (end 115.824 98.171) (width 0.4318) (layer Cuivre) (net 45)) + (segment (start 107.315 97.536) (end 108.839 99.06) (width 0.4318) (layer Cuivre) (net 45)) + (segment (start 117.348 98.171) (end 118.491 97.028) (width 0.4318) (layer Cuivre) (net 45)) + (segment (start 116.967 98.171) (end 117.348 98.171) (width 0.4318) (layer Cuivre) (net 45)) + (segment (start 116.967 98.171) (end 115.824 98.171) (width 0.4318) (layer Cuivre) (net 45)) + (segment (start 108.839 99.06) (end 114.046 99.06) (width 0.4318) (layer Cuivre) (net 45)) + (segment (start 114.046 99.06) (end 114.935 99.06) (width 0.4318) (layer Cuivre) (net 45)) + (segment (start 118.491 97.028) (end 118.491 94.996) (width 0.4318) (layer Cuivre) (net 45) (status 400)) (segment (start 93.345 100.076) (end 95.885 102.616) (width 0.4318) (layer Cuivre) (net 46) (status 800)) - (segment (start 126.873 121.666) (end 126.873 120.142) (width 0.4318) (layer Cuivre) (net 47) (status 400)) - (segment (start 123.444 125.095) (end 126.873 121.666) (width 0.4318) (layer Cuivre) (net 47)) - (segment (start 107.315 125.476) (end 107.315 124.206) (width 0.4318) (layer Cuivre) (net 47) (status 400)) - (segment (start 115.57 126.873) (end 108.712 126.873) (width 0.4318) (layer Cuivre) (net 47)) - (segment (start 117.348 125.095) (end 123.444 125.095) (width 0.4318) (layer Cuivre) (net 47)) - (segment (start 108.712 126.873) (end 107.315 125.476) (width 0.4318) (layer Cuivre) (net 47)) - (segment (start 116.5225 125.9205) (end 117.348 125.095) (width 0.4318) (layer Cuivre) (net 47)) + (segment (start 95.885 102.616) (end 102.235 102.616) (width 0.4318) (layer Cuivre) (net 46) (status 400)) (segment (start 116.5225 125.9205) (end 115.57 126.873) (width 0.4318) (layer Cuivre) (net 47)) - (segment (start 109.093 121.539) (end 109.855 122.301) (width 0.4318) (layer Cuivre) (net 48)) - (segment (start 102.108 122.936) (end 103.505 121.539) (width 0.4318) (layer Cuivre) (net 48)) - (segment (start 95.885 122.936) (end 102.108 122.936) (width 0.4318) (layer Cuivre) (net 48) (status 800)) - (segment (start 109.855 122.301) (end 109.855 124.206) (width 0.4318) (layer Cuivre) (net 48) (status 400)) + (segment (start 116.5225 125.9205) (end 117.348 125.095) (width 0.4318) (layer Cuivre) (net 47)) + (segment (start 108.712 126.873) (end 107.315 125.476) (width 0.4318) (layer Cuivre) (net 47)) + (segment (start 117.348 125.095) (end 123.444 125.095) (width 0.4318) (layer Cuivre) (net 47)) + (segment (start 115.57 126.873) (end 108.712 126.873) (width 0.4318) (layer Cuivre) (net 47)) + (segment (start 107.315 125.476) (end 107.315 124.206) (width 0.4318) (layer Cuivre) (net 47) (status 400)) + (segment (start 123.444 125.095) (end 126.873 121.666) (width 0.4318) (layer Cuivre) (net 47)) + (segment (start 126.873 121.666) (end 126.873 120.142) (width 0.4318) (layer Cuivre) (net 47) (status 400)) (segment (start 103.505 121.539) (end 109.093 121.539) (width 0.4318) (layer Cuivre) (net 48)) - (segment (start 105.283 93.726) (end 106.172 92.837) (width 0.4318) (layer Cuivre) (net 49)) - (segment (start 106.172 92.837) (end 109.093 92.837) (width 0.4318) (layer Cuivre) (net 49)) - (segment (start 105.283 96.647) (end 105.283 93.726) (width 0.4318) (layer Cuivre) (net 49)) - (segment (start 95.885 97.536) (end 104.394 97.536) (width 0.4318) (layer Cuivre) (net 49) (status 800)) - (segment (start 109.855 93.599) (end 109.855 96.266) (width 0.4318) (layer Cuivre) (net 49) (status 400)) - (segment (start 109.093 92.837) (end 109.855 93.599) (width 0.4318) (layer Cuivre) (net 49)) + (segment (start 109.855 122.301) (end 109.855 124.206) (width 0.4318) (layer Cuivre) (net 48) (status 400)) + (segment (start 95.885 122.936) (end 102.108 122.936) (width 0.4318) (layer Cuivre) (net 48) (status 800)) + (segment (start 102.108 122.936) (end 103.505 121.539) (width 0.4318) (layer Cuivre) (net 48)) + (segment (start 109.093 121.539) (end 109.855 122.301) (width 0.4318) (layer Cuivre) (net 48)) (segment (start 104.394 97.536) (end 105.283 96.647) (width 0.4318) (layer Cuivre) (net 49)) - (segment (start 139.7 64.516) (end 145.415 64.516) (width 0.6096) (layer Cuivre) (net 50) (status 400)) - (segment (start 133.35 70.866) (end 139.7 64.516) (width 0.6096) (layer Cuivre) (net 50)) - (segment (start 117.475 74.676) (end 125.73 74.676) (width 0.6096) (layer Cuivre) (net 50) (status 800)) - (segment (start 126.365 74.041) (end 126.365 70.866) (width 0.6096) (layer Cuivre) (net 50) (status 400)) - (segment (start 125.73 74.676) (end 126.365 74.041) (width 0.6096) (layer Cuivre) (net 50)) + (segment (start 109.093 92.837) (end 109.855 93.599) (width 0.4318) (layer Cuivre) (net 49)) + (segment (start 109.855 93.599) (end 109.855 96.266) (width 0.4318) (layer Cuivre) (net 49) (status 400)) + (segment (start 95.885 97.536) (end 104.394 97.536) (width 0.4318) (layer Cuivre) (net 49) (status 800)) + (segment (start 105.283 96.647) (end 105.283 93.726) (width 0.4318) (layer Cuivre) (net 49)) + (segment (start 106.172 92.837) (end 109.093 92.837) (width 0.4318) (layer Cuivre) (net 49)) + (segment (start 105.283 93.726) (end 106.172 92.837) (width 0.4318) (layer Cuivre) (net 49)) (segment (start 126.365 70.866) (end 133.35 70.866) (width 0.6096) (layer Cuivre) (net 50) (status 800)) + (segment (start 125.73 74.676) (end 126.365 74.041) (width 0.6096) (layer Cuivre) (net 50)) + (segment (start 126.365 74.041) (end 126.365 70.866) (width 0.6096) (layer Cuivre) (net 50) (status 400)) + (segment (start 117.475 74.676) (end 125.73 74.676) (width 0.6096) (layer Cuivre) (net 50) (status 800)) + (segment (start 133.35 70.866) (end 139.7 64.516) (width 0.6096) (layer Cuivre) (net 50)) + (segment (start 139.7 64.516) (end 145.415 64.516) (width 0.6096) (layer Cuivre) (net 50) (status 400)) (zone (net 12) (net_name GND) (layer Cuivre) (tstamp 4AE6D930) (hatch edge 0.508) (connect_pads (clearance 0.508)) diff --git a/demos/ecc83/ecc83-pp-cache.lib b/demos/ecc83/ecc83-pp-cache.lib index af94526d54..41d6af2285 100644 --- a/demos/ecc83/ecc83-pp-cache.lib +++ b/demos/ecc83/ecc83-pp-cache.lib @@ -1,18 +1,21 @@ -EESchema-LIBRARY Version 2.3 Date: 02/12/2009 10:37:56 +EESchema-LIBRARY Version 2.3 +#encoding utf-8 # # 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 100 30 H V C CNN $FPLIST SM* C? C1-1 $ENDFPLIST DRAW -P 2 0 1 10 -100 -30 100 -30 N -P 2 0 1 10 -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 @@ -23,6 +26,8 @@ ENDDEF DEF CONN_2 P 0 40 Y N 1 F N F0 "P" -50 0 40 V V C CNN F1 "CONN_2" 50 0 40 V V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN DRAW S -100 150 100 -150 0 1 0 N X P1 1 -350 100 250 R 60 60 1 1 P I @@ -36,6 +41,7 @@ DEF ECC81 U 0 0 Y Y 3 L N F0 "U" 130 310 50 H V C CNN F1 "ECC81" 350 -300 50 H V C CNN F2 "VALVE-NOVAL_P" 270 -400 50 H I C CNN +F3 "" 0 0 60 H V C CNN ALIAS ECC83 DRAW P 2 1 0 0 -100 -200 -100 -300 N @@ -77,6 +83,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 @@ -86,25 +94,29 @@ ENDDEF # PWR_FLAG # DEF PWR_FLAG #FLG 0 0 N N 1 F P -F0 "#FLG" 0 270 30 H I C CNN -F1 "PWR_FLAG" 0 230 30 H V C CNN +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 3 0 1 0 0 0 0 100 0 100 N -P 5 0 1 0 0 100 -100 150 0 200 100 150 0 100 N +P 6 0 1 0 0 0 0 50 -75 100 0 150 75 100 0 50 N ENDDRAW 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 SM0805 R?-* + SM1206 $ENDFPLIST DRAW S -40 150 40 -150 0 1 12 N diff --git a/demos/ecc83/ecc83-pp.kicad_pcb b/demos/ecc83/ecc83-pp.kicad_pcb index 5d61f90b2b..1310a82beb 100644 --- a/demos/ecc83/ecc83-pp.kicad_pcb +++ b/demos/ecc83/ecc83-pp.kicad_pcb @@ -1,12 +1,12 @@ -(kicad_pcb (version 3) (host pcbnew "(2013-01-12 BZR 3902)-testing") +(kicad_pcb (version 4) (host pcbnew "(2014-07-02 BZR 4969)-product") (general (links 20) (no_connects 0) - (area 121.8946 89.916 170.8404 135.9154) + (area 123.761499 90.741499 168.338501 132.778501) (thickness 1.6002) (drawings 4) - (tracks 75) + (tracks 57) (zones 0) (modules 15) (nets 10) @@ -14,21 +14,19 @@ (page A4) (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) - (25 Cmts.User user) - (26 Eco1.User user) - (27 Eco2.User user) - (28 Contours.Ci user) + (0 Composant signal) + (31 Cuivre signal) + (34 B.Paste user) + (35 F.Paste user) + (36 B.SilkS user) + (37 F.SilkS user) + (38 B.Mask user) + (39 F.Mask user) + (40 Dwgs.User user) + (41 Cmts.User user) + (42 Eco1.User user) + (43 Eco2.User user) + (44 Edge.Cuts user) ) (setup @@ -57,12 +55,13 @@ (pad_drill 1.9304) (pad_to_mask_clearance 0.254) (aux_axis_origin 0 0) - (visible_elements FFFFFFBF) + (visible_elements 7FFFFFFF) (pcbplotparams - (layerselection 3178497) - (usegerberextensions true) + (layerselection 0x000f0_80000001) + (usegerberextensions false) + (usegerberattributes true) (excludeedgelayer true) - (linewidth 60) + (linewidth 0.150000) (plotframeref false) (viasonmask false) (mode 1) @@ -75,27 +74,26 @@ (psa4output false) (plotreference true) (plotvalue true) - (plotothertext true) (plotinvisibletext false) (padsonsilk false) (subtractmaskfromsilk false) (outputformat 1) (mirror false) - (drillshape 1) + (drillshape 0) (scaleselection 1) (outputdirectory "")) ) (net 0 "") (net 1 GND) - (net 2 N-000001) - (net 3 N-000002) - (net 4 N-000004) - (net 5 N-000005) - (net 6 N-000006) - (net 7 N-000007) - (net 8 N-000008) - (net 9 N-000009) + (net 2 "Net-(C1-Pad1)") + (net 3 "Net-(C2-Pad1)") + (net 4 "Net-(C2-Pad2)") + (net 5 "Net-(P1-Pad2)") + (net 6 "Net-(P4-Pad1)") + (net 7 "Net-(P4-Pad2)") + (net 8 "Net-(R1-Pad1)") + (net 9 "Net-(R2-Pad1)") (net_class Default "Ceci est la Netclass par défaut" (clearance 0.381) @@ -104,16 +102,16 @@ (via_drill 0.635) (uvia_dia 0.508) (uvia_drill 0.127) - (add_net "") (add_net GND) - (add_net N-000001) - (add_net N-000002) - (add_net N-000004) - (add_net N-000005) - (add_net N-000006) (add_net N-000007) - (add_net N-000008) - (add_net N-000009) + (add_net "Net-(C1-Pad1)") + (add_net "Net-(C2-Pad1)") + (add_net "Net-(C2-Pad2)") + (add_net "Net-(P1-Pad2)") + (add_net "Net-(P4-Pad1)") + (add_net "Net-(P4-Pad2)") + (add_net "Net-(R1-Pad1)") + (add_net "Net-(R2-Pad1)") ) (module 1pin (layer Composant) (tedit 200000) (tstamp 454CC09B) @@ -121,16 +119,14 @@ (descr "module 1 pin (ou trou mecanique de percage)") (tags DEV) (path 1pin) - (fp_text reference 1PIN (at 0 -3.048) (layer Dessus.SilkS) + (fp_text reference 1PIN (at 0 -3.048) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.254))) ) - (fp_text value P*** (at 0 2.794) (layer Dessus.SilkS) hide + (fp_text value P*** (at 0 2.794) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.254))) ) - (fp_circle (center 0 0) (end 0 -2.286) (layer Dessus.SilkS) (width 0.381)) - (pad 1 thru_hole circle (at 0 0) (size 4.064 4.064) (drill 3.048) - (layers *.Cu *.Mask Dessus.SilkS) - ) + (fp_circle (center 0 0) (end 0 -2.286) (layer F.SilkS) (width 0.381)) + (pad 1 thru_hole circle (at 0 0) (size 4.064 4.064) (drill 3.048) (layers *.Cu *.Mask F.SilkS)) ) (module 1pin (layer Composant) (tedit 200000) (tstamp 454CC096) @@ -138,16 +134,14 @@ (descr "module 1 pin (ou trou mecanique de percage)") (tags DEV) (path 1pin) - (fp_text reference 1PIN (at 0 -3.048) (layer Dessus.SilkS) + (fp_text reference 1PIN (at 0 -3.048) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.254))) ) - (fp_text value P*** (at 0 2.794) (layer Dessus.SilkS) hide + (fp_text value P*** (at 0 2.794) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.254))) ) - (fp_circle (center 0 0) (end 0 -2.286) (layer Dessus.SilkS) (width 0.381)) - (pad 1 thru_hole circle (at 0 0) (size 4.064 4.064) (drill 3.048) - (layers *.Cu *.Mask Dessus.SilkS) - ) + (fp_circle (center 0 0) (end 0 -2.286) (layer F.SilkS) (width 0.381)) + (pad 1 thru_hole circle (at 0 0) (size 4.064 4.064) (drill 3.048) (layers *.Cu *.Mask F.SilkS)) ) (module 1pin (layer Composant) (tedit 200000) (tstamp 454CC090) @@ -155,16 +149,14 @@ (descr "module 1 pin (ou trou mecanique de percage)") (tags DEV) (path 1pin) - (fp_text reference 1PIN (at 0 -3.048) (layer Dessus.SilkS) + (fp_text reference 1PIN (at 0 -3.048) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.254))) ) - (fp_text value P*** (at 0 2.794) (layer Dessus.SilkS) hide + (fp_text value P*** (at 0 2.794) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.254))) ) - (fp_circle (center 0 0) (end 0 -2.286) (layer Dessus.SilkS) (width 0.381)) - (pad 1 thru_hole circle (at 0 0) (size 4.064 4.064) (drill 3.048) - (layers *.Cu *.Mask Dessus.SilkS) - ) + (fp_circle (center 0 0) (end 0 -2.286) (layer F.SilkS) (width 0.381)) + (pad 1 thru_hole circle (at 0 0) (size 4.064 4.064) (drill 3.048) (layers *.Cu *.Mask F.SilkS)) ) (module 1pin (layer Composant) (tedit 200000) (tstamp 454CC08A) @@ -172,64 +164,44 @@ (descr "module 1 pin (ou trou mecanique de percage)") (tags DEV) (path 1pin) - (fp_text reference 1PIN (at 0 -3.048) (layer Dessus.SilkS) + (fp_text reference 1PIN (at 0 -3.048) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.254))) ) - (fp_text value P*** (at 0 2.794) (layer Dessus.SilkS) hide + (fp_text value P*** (at 0 2.794) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.254))) ) - (fp_circle (center 0 0) (end 0 -2.286) (layer Dessus.SilkS) (width 0.381)) - (pad 1 thru_hole circle (at 0 0) (size 4.064 4.064) (drill 3.048) - (layers *.Cu *.Mask Dessus.SilkS) - ) + (fp_circle (center 0 0) (end 0 -2.286) (layer F.SilkS) (width 0.381)) + (pad 1 thru_hole circle (at 0 0) (size 4.064 4.064) (drill 3.048) (layers *.Cu *.Mask F.SilkS)) ) (module ECC-83-1 (layer Composant) (tedit 454CBC05) (tstamp 48B4F266) (at 149.225 113.665) (path /48B4F266) - (fp_text reference U1 (at 1.27 -11.43) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text reference U1 (at 1.27 -11.43) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) - (fp_text value ECC81_83 (at 0 11.43) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) - ) - (fp_circle (center 0 0) (end 10.16 1.27) (layer Dessus.SilkS) (width 0.381)) - (pad 1 thru_hole circle (at 3.4544 4.75488) (size 2.032 2.032) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - (net 2 N-000001) - ) - (pad 2 thru_hole circle (at 5.60832 1.8288) (size 2.032 2.032) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - (net 4 N-000004) - ) - (pad 3 thru_hole circle (at 5.60832 -1.8288) (size 2.032 2.032) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - (net 5 N-000005) - ) - (pad 4 thru_hole circle (at 3.4544 -4.75488) (size 2.032 2.032) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - (net 7 N-000007) - ) - (pad 5 thru_hole circle (at 0 -5.8928) (size 2.032 2.032) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - (net 7 N-000007) - ) - (pad 6 thru_hole circle (at -3.4544 -4.75488) (size 2.032 2.032) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - (net 8 N-000008) - ) - (pad 7 thru_hole circle (at -5.60832 -1.8288) (size 2.032 2.032) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - (net 2 N-000001) - ) - (pad 8 thru_hole circle (at -5.60832 1.78816) (size 2.032 2.032) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 N-000009) - ) - (pad 9 thru_hole circle (at -3.4544 4.75488) (size 2.032 2.032) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - (net 3 N-000002) + (fp_text value ECC83 (at 0 11.43) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) + (fp_circle (center 0 0) (end 10.16 1.27) (layer F.SilkS) (width 0.381)) + (pad 1 thru_hole circle (at 3.4544 4.75488) (size 2.032 2.032) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 8 "Net-(R1-Pad1)")) + (pad 2 thru_hole circle (at 5.60832 1.8288) (size 2.032 2.032) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 5 "Net-(P1-Pad2)")) + (pad 3 thru_hole circle (at 5.60832 -1.8288) (size 2.032 2.032) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 9 "Net-(R2-Pad1)")) + (pad 4 thru_hole circle (at 3.4544 -4.75488) (size 2.032 2.032) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 6 "Net-(P4-Pad1)")) + (pad 5 thru_hole circle (at 0 -5.8928) (size 2.032 2.032) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 6 "Net-(P4-Pad1)")) + (pad 6 thru_hole circle (at -3.4544 -4.75488) (size 2.032 2.032) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 2 "Net-(C1-Pad1)")) + (pad 7 thru_hole circle (at -5.60832 -1.8288) (size 2.032 2.032) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 8 "Net-(R1-Pad1)")) + (pad 8 thru_hole circle (at -5.60832 1.78816) (size 2.032 2.032) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 4 "Net-(C2-Pad2)")) + (pad 9 thru_hole circle (at -3.4544 4.75488) (size 2.032 2.032) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 7 "Net-(P4-Pad2)")) (model valves/ecc83.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -243,28 +215,24 @@ (tags R) (path /4549F39D) (autoplace_cost180 10) - (fp_text reference R2 (at 0 0 180) (layer Dessus.SilkS) + (fp_text reference R2 (at 0 0 180) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 1.5K (at 0 0 180) (layer Dessus.SilkS) hide + (fp_text value 1.5K (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)) - (pad 1 thru_hole circle (at -3.81 0 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 5 N-000005) - ) - (pad 2 thru_hole circle (at 3.81 0 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 1 GND) - ) + (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.8128) (layers *.Cu *.Mask F.SilkS) + (net 9 "Net-(R2-Pad1)")) + (pad 2 thru_hole circle (at 3.81 0 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 1 GND)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -278,28 +246,24 @@ (tags R) (path /4549F3A2) (autoplace_cost180 10) - (fp_text reference R4 (at 0 0 270) (layer Dessus.SilkS) + (fp_text reference R4 (at 0 0 270) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 47K (at 0 0 270) (layer Dessus.SilkS) hide + (fp_text value 47K (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)) - (pad 1 thru_hole circle (at -3.81 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 4 N-000004) - ) - (pad 2 thru_hole circle (at 3.81 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 1 GND) - ) + (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.8128) (layers *.Cu *.Mask F.SilkS) + (net 5 "Net-(P1-Pad2)")) + (pad 2 thru_hole circle (at 3.81 0 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 1 GND)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -313,28 +277,24 @@ (tags R) (path /4549F3AD) (autoplace_cost180 10) - (fp_text reference R3 (at 0 0 90) (layer Dessus.SilkS) + (fp_text reference R3 (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)) - (pad 1 thru_hole circle (at -3.81 0 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 6 N-000006) - ) - (pad 2 thru_hole circle (at 3.81 0 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 1 GND) - ) + (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.8128) (layers *.Cu *.Mask F.SilkS) + (net 3 "Net-(C2-Pad1)")) + (pad 2 thru_hole circle (at 3.81 0 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 1 GND)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -348,28 +308,24 @@ (tags R) (path /4549F38A) (autoplace_cost180 10) - (fp_text reference R1 (at 0 0 270) (layer Dessus.SilkS) + (fp_text reference R1 (at 0 0 270) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 1.5K (at 0 0 270) (layer Dessus.SilkS) hide + (fp_text value 1.5K (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)) - (pad 1 thru_hole circle (at -3.81 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 2 N-000001) - ) - (pad 2 thru_hole circle (at 3.81 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 N-000009) - ) + (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.8128) (layers *.Cu *.Mask F.SilkS) + (net 8 "Net-(R1-Pad1)")) + (pad 2 thru_hole circle (at 3.81 0 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 4 "Net-(C2-Pad2)")) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -382,21 +338,17 @@ (descr "Condensateur polarise") (tags CP) (path /4549F4BE) - (fp_text reference C1 (at 0 2.54 90) (layer Dessus.SilkS) + (fp_text reference C1 (at 0 2.54 90) (layer F.SilkS) (effects (font (size 1.27 1.27) (thickness 0.254))) ) - (fp_text value 10uF (at 0 -2.54 90) (layer Dessus.SilkS) + (fp_text value 10uF (at 0 -2.54 90) (layer F.SilkS) (effects (font (size 1.27 1.27) (thickness 0.254))) ) - (fp_circle (center 0 0) (end 4.826 -2.794) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at -2.54 0 90) (size 1.778 1.778) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - (net 8 N-000008) - ) - (pad 2 thru_hole circle (at 2.54 0 90) (size 1.778 1.778) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - (net 1 GND) - ) + (fp_circle (center 0 0) (end 4.826 -2.794) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole rect (at -2.54 0 90) (size 1.778 1.778) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 2 "Net-(C1-Pad1)")) + (pad 2 thru_hole circle (at 2.54 0 90) (size 1.778 1.778) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 1 GND)) (model discret/c_vert_c2v10.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -409,25 +361,21 @@ (descr "Condensateur = 2 pas") (tags C) (path /4549F3BE) - (fp_text reference C2 (at 0 0 90) (layer Dessus.SilkS) + (fp_text reference C2 (at 0 0 90) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value 680nF (at 0 0 90) (layer Dessus.SilkS) hide + (fp_text value 680nF (at 0 0 90) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start -3.556 -1.016) (end 3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.556 -1.016) (end 3.556 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.556 1.016) (end -3.556 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.556 1.016) (end -3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.556 -0.508) (end -3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -2.54 0 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 6 N-000006) - ) - (pad 2 thru_hole circle (at 2.54 0 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 N-000009) - ) + (fp_line (start -3.556 -1.016) (end 3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.556 -1.016) (end 3.556 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.556 1.016) (end -3.556 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.556 1.016) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.556 -0.508) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -2.54 0 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 3 "Net-(C2-Pad1)")) + (pad 2 thru_hole circle (at 2.54 0 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 4 "Net-(C2-Pad2)")) (model discret/capa_2pas_5x5mm.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -440,25 +388,21 @@ (descr "Bornier d'alimentation 2 pins") (tags DEV) (path /4549F4A5) - (fp_text reference P3 (at 0 -5.08 90) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text reference P3 (at 0 -5.08 90) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) - (fp_text value POWER (at 0 5.08 90) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) - ) - (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 3.81) (end 5.08 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 -3.81) (end -5.08 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 -3.81) (end -5.08 3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 3.81) (end 5.08 3.81) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at -2.54 0 90) (size 2.54 2.54) (drill 1.524) - (layers *.Cu *.Mask Dessus.SilkS) - (net 8 N-000008) - ) - (pad 2 thru_hole circle (at 2.54 0 90) (size 2.54 2.54) (drill 1.524) - (layers *.Cu *.Mask Dessus.SilkS) - (net 1 GND) + (fp_text value POWER (at 0 5.08 90) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) + (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 3.81) (end 5.08 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 -3.81) (end -5.08 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 -3.81) (end -5.08 3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 3.81) (end 5.08 3.81) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole rect (at -2.54 0 90) (size 2.54 2.54) (drill 1.524) (layers *.Cu *.Mask F.SilkS) + (net 2 "Net-(C1-Pad1)")) + (pad 2 thru_hole circle (at 2.54 0 90) (size 2.54 2.54) (drill 1.524) (layers *.Cu *.Mask F.SilkS) + (net 1 GND)) (model device/bornier_2.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -471,25 +415,21 @@ (descr "Bornier d'alimentation 2 pins") (tags DEV) (path /4549F464) - (fp_text reference P1 (at 0 -5.08 270) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text reference P1 (at 0 -5.08 270) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) - (fp_text value IN (at 0 5.08 270) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) - ) - (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 3.81) (end 5.08 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 -3.81) (end -5.08 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 -3.81) (end -5.08 3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 3.81) (end 5.08 3.81) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at -2.54 0 270) (size 2.54 2.54) (drill 1.524) - (layers *.Cu *.Mask Dessus.SilkS) - (net 1 GND) - ) - (pad 2 thru_hole circle (at 2.54 0 270) (size 2.54 2.54) (drill 1.524) - (layers *.Cu *.Mask Dessus.SilkS) - (net 4 N-000004) + (fp_text value IN (at 0 5.08 270) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) + (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 3.81) (end 5.08 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 -3.81) (end -5.08 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 -3.81) (end -5.08 3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 3.81) (end 5.08 3.81) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole rect (at -2.54 0 270) (size 2.54 2.54) (drill 1.524) (layers *.Cu *.Mask F.SilkS) + (net 1 GND)) + (pad 2 thru_hole circle (at 2.54 0 270) (size 2.54 2.54) (drill 1.524) (layers *.Cu *.Mask F.SilkS) + (net 5 "Net-(P1-Pad2)")) (model device/bornier_2.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -502,25 +442,21 @@ (descr "Bornier d'alimentation 2 pins") (tags DEV) (path /4549F46C) - (fp_text reference P2 (at 0 -5.08 90) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text reference P2 (at 0 -5.08 90) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) - (fp_text value OUT (at 0 5.08 90) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) - ) - (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 3.81) (end 5.08 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 -3.81) (end -5.08 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 -3.81) (end -5.08 3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 3.81) (end 5.08 3.81) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at -2.54 0 90) (size 2.54 2.54) (drill 1.524) - (layers *.Cu *.Mask Dessus.SilkS) - (net 6 N-000006) - ) - (pad 2 thru_hole circle (at 2.54 0 90) (size 2.54 2.54) (drill 1.524) - (layers *.Cu *.Mask Dessus.SilkS) - (net 1 GND) + (fp_text value OUT (at 0 5.08 90) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) + (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 3.81) (end 5.08 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 -3.81) (end -5.08 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 -3.81) (end -5.08 3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 3.81) (end 5.08 3.81) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole rect (at -2.54 0 90) (size 2.54 2.54) (drill 1.524) (layers *.Cu *.Mask F.SilkS) + (net 3 "Net-(C2-Pad1)")) + (pad 2 thru_hole circle (at 2.54 0 90) (size 2.54 2.54) (drill 1.524) (layers *.Cu *.Mask F.SilkS) + (net 1 GND)) (model device/bornier_2.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -533,25 +469,21 @@ (descr "Bornier d'alimentation 2 pins") (tags DEV) (path /456A8ACC) - (fp_text reference P4 (at 0 -5.08 180) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text reference P4 (at 0 -5.08 180) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) - (fp_text value CONN_2 (at 0 5.08 180) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) - ) - (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 3.81) (end 5.08 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 -3.81) (end -5.08 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 -3.81) (end -5.08 3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 3.81) (end 5.08 3.81) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at -2.54 0 180) (size 2.54 2.54) (drill 1.524) - (layers *.Cu *.Mask Dessus.SilkS) - (net 7 N-000007) - ) - (pad 2 thru_hole circle (at 2.54 0 180) (size 2.54 2.54) (drill 1.524) - (layers *.Cu *.Mask Dessus.SilkS) - (net 3 N-000002) + (fp_text value CONN_2 (at 0 5.08 180) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) + (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 3.81) (end 5.08 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 -3.81) (end -5.08 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 -3.81) (end -5.08 3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 3.81) (end 5.08 3.81) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole rect (at -2.54 0 180) (size 2.54 2.54) (drill 1.524) (layers *.Cu *.Mask F.SilkS) + (net 6 "Net-(P4-Pad1)")) + (pad 2 thru_hole circle (at 2.54 0 180) (size 2.54 2.54) (drill 1.524) (layers *.Cu *.Mask F.SilkS) + (net 7 "Net-(P4-Pad2)")) (model device/bornier_2.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -559,86 +491,68 @@ ) ) - (gr_line (start 123.825 132.715) (end 168.275 132.715) (angle 90) (layer Contours.Ci) (width 0.127)) - (gr_line (start 168.275 90.805) (end 123.825 90.805) (angle 90) (layer Contours.Ci) (width 0.127)) - (gr_line (start 168.275 90.805) (end 168.275 132.715) (angle 90) (layer Contours.Ci) (width 0.127)) - (gr_line (start 123.825 90.805) (end 123.825 132.715) (angle 90) (layer Contours.Ci) (width 0.127)) + (gr_line (start 123.825 132.715) (end 168.275 132.715) (angle 90) (layer Edge.Cuts) (width 0.127)) + (gr_line (start 168.275 90.805) (end 123.825 90.805) (angle 90) (layer Edge.Cuts) (width 0.127)) + (gr_line (start 168.275 90.805) (end 168.275 132.715) (angle 90) (layer Edge.Cuts) (width 0.127)) + (gr_line (start 123.825 90.805) (end 123.825 132.715) (angle 90) (layer Edge.Cuts) (width 0.127)) - (segment (start 148.59 95.25) (end 160.02 95.25) (width 0.8636) (layer Cuivre) (net 1)) - (segment (start 146.05 95.25) (end 148.59 95.25) (width 0.8636) (layer Cuivre) (net 1)) (segment (start 142.24 95.25) (end 146.05 95.25) (width 0.8636) (layer Cuivre) (net 1)) (segment (start 164.465 125.095) (end 164.465 124.46) (width 0.8636) (layer Cuivre) (net 1) (status 800)) - (segment (start 164.465 124.46) (end 167.005 121.92) (width 0.8636) (layer Cuivre) (net 1)) - (segment (start 167.005 109.22) (end 167.005 121.92) (width 0.8636) (layer Cuivre) (net 1)) - (segment (start 128.27 114.3) (end 125.73 112.60582) (width 0.8636) (layer Cuivre) (net 1) (status 800)) - (segment (start 130.81 114.3) (end 132.08 115.57) (width 0.8636) (layer Cuivre) (net 1)) - (segment (start 132.08 115.57) (end 132.08 116.84) (width 0.8636) (layer Cuivre) (net 1)) - (segment (start 132.08 116.84) (end 133.985 118.745) (width 0.8636) (layer Cuivre) (net 1)) - (segment (start 128.27 114.3) (end 130.81 114.3) (width 0.8636) (layer Cuivre) (net 1)) (segment (start 146.05 97.79) (end 146.05 95.25) (width 0.8636) (layer Cuivre) (net 1)) - (segment (start 133.985 95.885) (end 138.43 95.885) (width 0.8636) (layer Cuivre) (net 1) (status 400)) - (segment (start 129.54 100.33) (end 133.985 95.885) (width 0.8636) (layer Cuivre) (net 1)) (segment (start 139.065 95.25) (end 142.24 95.25) (width 0.8636) (layer Cuivre) (net 1)) (segment (start 138.43 95.885) (end 139.065 95.25) (width 0.8636) (layer Cuivre) (net 1) (status 800)) - (segment (start 165.735 107.95) (end 167.005 109.22) (width 0.8636) (layer Cuivre) (net 1)) (segment (start 164.465 107.95) (end 165.735 107.95) (width 0.8636) (layer Cuivre) (net 1) (status 800)) - (segment (start 126.365 100.33) (end 125.73 100.965) (width 0.8636) (layer Cuivre) (net 1)) - (segment (start 128.27 100.33) (end 126.365 100.33) (width 0.8636) (layer Cuivre) (net 1) (status 800)) - (segment (start 125.73 100.965) (end 125.73 112.60582) (width 0.8636) (layer Cuivre) (net 1)) - (segment (start 128.27 100.33) (end 129.54 100.33) (width 0.8636) (layer Cuivre) (net 1) (status 800)) - (segment (start 164.465 99.695) (end 164.465 107.95) (width 0.8636) (layer Cuivre) (net 1) (status 400)) - (segment (start 160.02 95.25) (end 164.465 99.695) (width 0.8636) (layer Cuivre) (net 1)) - (segment (start 153.289 131.826) (end 154.94 130.175) (width 0.8636) (layer Cuivre) (net 2)) - (segment (start 140.716 131.826) (end 153.289 131.826) (width 0.8636) (layer Cuivre) (net 2)) - (segment (start 143.61668 111.8362) (end 141.6812 111.8362) (width 0.8636) (layer Cuivre) (net 2) (status 800)) - (segment (start 141.6812 111.8362) (end 137.795 107.95) (width 0.8636) (layer Cuivre) (net 2)) - (segment (start 154.94 121.31548) (end 154.94 120.68048) (width 0.8636) (layer Cuivre) (net 2)) - (segment (start 154.94 120.68048) (end 152.6794 118.41988) (width 0.8636) (layer Cuivre) (net 2) (status 400)) - (segment (start 136.398 121.92) (end 135.509 121.031) (width 0.8636) (layer Cuivre) (net 2)) - (segment (start 135.509 121.031) (end 135.509 117.729) (width 0.8636) (layer Cuivre) (net 2)) - (segment (start 135.509 117.729) (end 133.985 116.205) (width 0.8636) (layer Cuivre) (net 2)) - (segment (start 136.525 121.92) (end 136.398 121.92) (width 0.8636) (layer Cuivre) (net 2)) - (segment (start 136.525 121.92) (end 139.065 124.46) (width 0.8636) (layer Cuivre) (net 2)) - (segment (start 139.065 124.46) (end 139.065 130.175) (width 0.8636) (layer Cuivre) (net 2)) - (segment (start 139.065 130.175) (end 140.335 131.445) (width 0.8636) (layer Cuivre) (net 2)) - (segment (start 135.89 107.95) (end 135.255 107.95) (width 0.8636) (layer Cuivre) (net 2) (status 800)) - (segment (start 133.985 109.22) (end 133.985 116.205) (width 0.8636) (layer Cuivre) (net 2)) - (segment (start 135.255 107.95) (end 133.985 109.22) (width 0.8636) (layer Cuivre) (net 2)) - (segment (start 135.89 107.95) (end 137.795 107.95) (width 0.8636) (layer Cuivre) (net 2) (status 800)) - (segment (start 140.335 131.445) (end 140.716 131.826) (width 0.8636) (layer Cuivre) (net 2)) - (segment (start 154.94 121.31548) (end 154.94 121.31548) (width 0.8636) (layer Cuivre) (net 2)) - (segment (start 154.94 130.175) (end 154.94 121.31548) (width 0.8636) (layer Cuivre) (net 2)) - (segment (start 145.7706 129.1844) (end 145.415 129.54) (width 0.8636) (layer Cuivre) (net 3) (status 400)) - (segment (start 145.7706 118.41988) (end 145.7706 129.1844) (width 0.8636) (layer Cuivre) (net 3) (status 800)) - (segment (start 159.385 117.475) (end 164.465 117.475) (width 0.8636) (layer Cuivre) (net 4) (status 400)) - (segment (start 154.83332 115.4938) (end 157.4038 115.4938) (width 0.8636) (layer Cuivre) (net 4) (status 800)) - (segment (start 164.465 117.475) (end 164.465 113.03) (width 0.8636) (layer Cuivre) (net 4) (status C00)) - (segment (start 157.4038 115.4938) (end 159.385 117.475) (width 0.8636) (layer Cuivre) (net 4)) - (segment (start 154.83332 111.8362) (end 154.83332 111.23168) (width 0.8636) (layer Cuivre) (net 5) (status 800)) - (segment (start 159.385 106.68) (end 159.385 99.695) (width 0.8636) (layer Cuivre) (net 5)) - (segment (start 154.83332 111.23168) (end 159.385 106.68) (width 0.8636) (layer Cuivre) (net 5)) - (segment (start 157.48 97.79) (end 159.385 99.695) (width 0.8636) (layer Cuivre) (net 5)) - (segment (start 153.67 97.79) (end 157.48 97.79) (width 0.8636) (layer Cuivre) (net 5) (status 800)) - (segment (start 137.16 125.095) (end 133.985 125.095) (width 0.8636) (layer Cuivre) (net 6)) - (segment (start 133.985 126.365) (end 133.985 125.095) (width 0.8636) (layer Cuivre) (net 6)) - (segment (start 133.985 125.095) (end 128.27 119.38) (width 0.8636) (layer Cuivre) (net 6)) - (segment (start 149.86 128.905) (end 150.495 129.54) (width 0.8636) (layer Cuivre) (net 7) (status 400)) - (segment (start 149.86 111.125) (end 149.86 128.905) (width 0.8636) (layer Cuivre) (net 7)) - (segment (start 149.225 110.49) (end 149.86 111.125) (width 0.8636) (layer Cuivre) (net 7)) - (segment (start 149.225 107.7722) (end 151.54148 107.7722) (width 0.8636) (layer Cuivre) (net 7) (status 800)) - (segment (start 151.54148 107.7722) (end 152.6794 108.91012) (width 0.8636) (layer Cuivre) (net 7) (status 400)) - (segment (start 149.225 107.7722) (end 149.225 110.49) (width 0.8636) (layer Cuivre) (net 7) (status 800)) - (segment (start 136.525 100.965) (end 135.255 102.235) (width 0.8636) (layer Cuivre) (net 8)) - (segment (start 138.43 100.965) (end 136.525 100.965) (width 0.8636) (layer Cuivre) (net 8) (status 800)) - (segment (start 145.7706 103.8606) (end 142.875 100.965) (width 0.8636) (layer Cuivre) (net 8)) - (segment (start 142.875 100.965) (end 138.43 100.965) (width 0.8636) (layer Cuivre) (net 8) (status 400)) - (segment (start 145.7706 108.91012) (end 145.7706 103.8606) (width 0.8636) (layer Cuivre) (net 8) (status 800)) - (segment (start 132.08 105.41) (end 135.255 102.235) (width 0.8636) (layer Cuivre) (net 8)) - (segment (start 128.27 105.41) (end 132.08 105.41) (width 0.8636) (layer Cuivre) (net 8) (status 800)) - (segment (start 137.16 120.015) (end 137.16 115.57) (width 0.8636) (layer Cuivre) (net 9)) - (segment (start 135.89 115.57) (end 137.16 115.57) (width 0.8636) (layer Cuivre) (net 9)) - (segment (start 137.16 115.57) (end 143.49984 115.57) (width 0.8636) (layer Cuivre) (net 9)) - (segment (start 143.49984 115.57) (end 143.61668 115.45316) (width 0.8636) (layer Cuivre) (net 9)) + (segment (start 136.525 100.965) (end 135.255 102.235) (width 0.8636) (layer Cuivre) (net 2)) + (segment (start 138.43 100.965) (end 136.525 100.965) (width 0.8636) (layer Cuivre) (net 2) (status 800)) + (segment (start 145.7706 103.8606) (end 142.875 100.965) (width 0.8636) (layer Cuivre) (net 2)) + (segment (start 142.875 100.965) (end 138.43 100.965) (width 0.8636) (layer Cuivre) (net 2) (status 400)) + (segment (start 145.7706 108.91012) (end 145.7706 103.8606) (width 0.8636) (layer Cuivre) (net 2) (status 800)) + (segment (start 132.08 105.41) (end 135.255 102.235) (width 0.8636) (layer Cuivre) (net 2)) + (segment (start 128.27 105.41) (end 132.08 105.41) (width 0.8636) (layer Cuivre) (net 2) (status 800)) + (segment (start 137.16 125.095) (end 133.985 125.095) (width 0.8636) (layer Cuivre) (net 3)) + (segment (start 133.985 126.365) (end 133.985 125.095) (width 0.8636) (layer Cuivre) (net 3)) + (segment (start 133.985 125.095) (end 128.27 119.38) (width 0.8636) (layer Cuivre) (net 3)) + (segment (start 137.16 120.015) (end 137.16 115.57) (width 0.8636) (layer Cuivre) (net 4)) + (segment (start 135.89 115.57) (end 137.16 115.57) (width 0.8636) (layer Cuivre) (net 4)) + (segment (start 137.16 115.57) (end 143.49984 115.57) (width 0.8636) (layer Cuivre) (net 4)) + (segment (start 143.49984 115.57) (end 143.61668 115.45316) (width 0.8636) (layer Cuivre) (net 4)) + (segment (start 159.385 117.475) (end 164.465 117.475) (width 0.8636) (layer Cuivre) (net 5) (status 400)) + (segment (start 154.83332 115.4938) (end 157.4038 115.4938) (width 0.8636) (layer Cuivre) (net 5) (status 800)) + (segment (start 164.465 117.475) (end 164.465 113.03) (width 0.8636) (layer Cuivre) (net 5) (status C00)) + (segment (start 157.4038 115.4938) (end 159.385 117.475) (width 0.8636) (layer Cuivre) (net 5)) + (segment (start 149.86 128.905) (end 150.495 129.54) (width 0.8636) (layer Cuivre) (net 6) (status 400)) + (segment (start 149.86 111.125) (end 149.86 128.905) (width 0.8636) (layer Cuivre) (net 6)) + (segment (start 149.225 110.49) (end 149.86 111.125) (width 0.8636) (layer Cuivre) (net 6)) + (segment (start 149.225 107.7722) (end 151.54148 107.7722) (width 0.8636) (layer Cuivre) (net 6) (status 800)) + (segment (start 151.54148 107.7722) (end 152.6794 108.91012) (width 0.8636) (layer Cuivre) (net 6) (status 400)) + (segment (start 149.225 107.7722) (end 149.225 110.49) (width 0.8636) (layer Cuivre) (net 6) (status 800)) + (segment (start 145.7706 129.1844) (end 145.415 129.54) (width 0.8636) (layer Cuivre) (net 7) (status 400)) + (segment (start 145.7706 118.41988) (end 145.7706 129.1844) (width 0.8636) (layer Cuivre) (net 7) (status 800)) + (segment (start 153.289 131.826) (end 154.94 130.175) (width 0.8636) (layer Cuivre) (net 8)) + (segment (start 140.716 131.826) (end 153.289 131.826) (width 0.8636) (layer Cuivre) (net 8)) + (segment (start 143.61668 111.8362) (end 141.6812 111.8362) (width 0.8636) (layer Cuivre) (net 8) (status 800)) + (segment (start 141.6812 111.8362) (end 137.795 107.95) (width 0.8636) (layer Cuivre) (net 8)) + (segment (start 154.94 121.31548) (end 154.94 120.68048) (width 0.8636) (layer Cuivre) (net 8)) + (segment (start 154.94 120.68048) (end 152.6794 118.41988) (width 0.8636) (layer Cuivre) (net 8) (status 400)) + (segment (start 136.398 121.92) (end 135.509 121.031) (width 0.8636) (layer Cuivre) (net 8)) + (segment (start 135.509 121.031) (end 135.509 117.729) (width 0.8636) (layer Cuivre) (net 8)) + (segment (start 135.509 117.729) (end 133.985 116.205) (width 0.8636) (layer Cuivre) (net 8)) + (segment (start 136.525 121.92) (end 136.398 121.92) (width 0.8636) (layer Cuivre) (net 8)) + (segment (start 136.525 121.92) (end 139.065 124.46) (width 0.8636) (layer Cuivre) (net 8)) + (segment (start 139.065 124.46) (end 139.065 130.175) (width 0.8636) (layer Cuivre) (net 8)) + (segment (start 139.065 130.175) (end 140.335 131.445) (width 0.8636) (layer Cuivre) (net 8)) + (segment (start 135.89 107.95) (end 135.255 107.95) (width 0.8636) (layer Cuivre) (net 8) (status 800)) + (segment (start 133.985 109.22) (end 133.985 116.205) (width 0.8636) (layer Cuivre) (net 8)) + (segment (start 135.255 107.95) (end 133.985 109.22) (width 0.8636) (layer Cuivre) (net 8)) + (segment (start 135.89 107.95) (end 137.795 107.95) (width 0.8636) (layer Cuivre) (net 8) (status 800)) + (segment (start 140.335 131.445) (end 140.716 131.826) (width 0.8636) (layer Cuivre) (net 8)) + (segment (start 154.94 121.31548) (end 154.94 121.31548) (width 0.8636) (layer Cuivre) (net 8)) + (segment (start 154.94 130.175) (end 154.94 121.31548) (width 0.8636) (layer Cuivre) (net 8)) + (segment (start 154.83332 111.8362) (end 154.83332 111.23168) (width 0.8636) (layer Cuivre) (net 9) (status 800)) + (segment (start 159.385 106.68) (end 159.385 99.695) (width 0.8636) (layer Cuivre) (net 9)) + (segment (start 154.83332 111.23168) (end 159.385 106.68) (width 0.8636) (layer Cuivre) (net 9)) + (segment (start 157.48 97.79) (end 159.385 99.695) (width 0.8636) (layer Cuivre) (net 9)) + (segment (start 153.67 97.79) (end 157.48 97.79) (width 0.8636) (layer Cuivre) (net 9) (status 800)) (zone (net 1) (net_name GND) (layer Cuivre) (tstamp 4EED97A2) (hatch edge 0.508) (connect_pads (clearance 0.635)) diff --git a/demos/ecc83/ecc83-pp.net b/demos/ecc83/ecc83-pp.net index bdb667a9a6..ea99aa4d6d 100644 --- a/demos/ecc83/ecc83-pp.net +++ b/demos/ecc83/ecc83-pp.net @@ -1,129 +1,160 @@ -# EESchema Netlist Version 1.1 created 27/8/2008-06:26:11 -( - ( /48B4F266 VALVE-NOVAL_P U1 ECC81_83 {Lib=ECC81_83} - ( 1 N-000001 ) - ( 2 N-000004 ) - ( 3 N-000005 ) - ( 4 N-000007 ) - ( 5 N-000007 ) - ( 6 N-000008 ) - ( 7 N-000001 ) - ( 8 N-000009 ) - ( 9 N-000002 ) - ) - ( /456A8ACC $noname P4 CONN_2 {Lib=CONN_2} - ( 1 N-000007 ) - ( 2 N-000002 ) - ) - ( /4549F4BE $noname C1 10uF {Lib=C} - ( 1 N-000008 ) - ( 2 GND ) - ) - ( /4549F4A5 $noname P3 POWER {Lib=CONN_2} - ( 1 N-000008 ) - ( 2 GND ) - ) - ( /4549F46C $noname P2 OUT {Lib=CONN_2} - ( 1 N-000006 ) - ( 2 GND ) - ) - ( /4549F464 $noname P1 IN {Lib=CONN_2} - ( 1 GND ) - ( 2 N-000004 ) - ) - ( /4549F3BE $noname C2 680nF {Lib=C} - ( 1 N-000006 ) - ( 2 N-000009 ) - ) - ( /4549F3AD $noname R3 100K {Lib=R} - ( 1 N-000006 ) - ( 2 GND ) - ) - ( /4549F3A2 $noname R4 47K {Lib=R} - ( 1 N-000004 ) - ( 2 GND ) - ) - ( /4549F39D $noname R2 1.5K {Lib=R} - ( 1 N-000005 ) - ( 2 GND ) - ) - ( /4549F38A $noname R1 1.5K {Lib=R} - ( 1 N-000001 ) - ( 2 N-000009 ) - ) -) -* -{ Allowed footprints by component: -$component C1 - SM* - C? - C1-1 -$endlist -$component C2 - SM* - C? - C1-1 -$endlist -$component R3 - R? - SM0603 - SM0805 -$endlist -$component R4 - R? - SM0603 - SM0805 -$endlist -$component R2 - R? - SM0603 - SM0805 -$endlist -$component R1 - R? - SM0603 - SM0805 -$endlist -$endfootprintlist -} -{ Pin List by Nets -Net 1 "" - R1 1 - U1 7 - U1 1 -Net 2 "" - P4 2 - U1 9 -Net 3 "GND" - R2 2 - R4 2 - R3 2 - P1 1 - P2 2 - P3 2 - C1 2 -Net 4 "" - P1 2 - R4 1 - U1 2 -Net 5 "" - R2 1 - U1 3 -Net 6 "" - P2 1 - R3 1 - C2 1 -Net 7 "" - P4 1 - U1 4 - U1 5 -Net 8 "" - P3 1 - U1 6 - C1 1 -Net 9 "" - U1 8 - C2 2 - R1 2 -} -#End +(export (version D) + (design + (source F:/kicad-launchpad/testing/demos/ecc83/ecc83-pp.sch) + (date "04/07/2014 20:15:10") + (tool "Eeschema (2014-07-02 BZR 4969)-product")) + (components + (comp (ref U1) + (value ECC83) + (footprint VALVE-NOVAL_P) + (libsource (lib valves) (part ECC83)) + (sheetpath (names /) (tstamps /)) + (tstamp 48B4F266)) + (comp (ref P4) + (value CONN_2) + (libsource (lib conn) (part CONN_2)) + (sheetpath (names /) (tstamps /)) + (tstamp 456A8ACC)) + (comp (ref C1) + (value 10uF) + (libsource (lib device) (part C)) + (sheetpath (names /) (tstamps /)) + (tstamp 4549F4BE)) + (comp (ref P3) + (value POWER) + (libsource (lib conn) (part CONN_2)) + (sheetpath (names /) (tstamps /)) + (tstamp 4549F4A5)) + (comp (ref P2) + (value OUT) + (libsource (lib conn) (part CONN_2)) + (sheetpath (names /) (tstamps /)) + (tstamp 4549F46C)) + (comp (ref P1) + (value IN) + (libsource (lib conn) (part CONN_2)) + (sheetpath (names /) (tstamps /)) + (tstamp 4549F464)) + (comp (ref C2) + (value 680nF) + (libsource (lib device) (part C)) + (sheetpath (names /) (tstamps /)) + (tstamp 4549F3BE)) + (comp (ref R3) + (value 100K) + (libsource (lib device) (part R)) + (sheetpath (names /) (tstamps /)) + (tstamp 4549F3AD)) + (comp (ref R4) + (value 47K) + (libsource (lib device) (part R)) + (sheetpath (names /) (tstamps /)) + (tstamp 4549F3A2)) + (comp (ref R2) + (value 1.5K) + (libsource (lib device) (part R)) + (sheetpath (names /) (tstamps /)) + (tstamp 4549F39D)) + (comp (ref R1) + (value 1.5K) + (libsource (lib device) (part R)) + (sheetpath (names /) (tstamps /)) + (tstamp 4549F38A))) + (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 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 conn) (part CONN_2) + (description "Symbole general de connecteur") + (fields + (field (name Reference) P) + (field (name Value) CONN_2)) + (pins + (pin (num 1) (name P1) (type passive)) + (pin (num 2) (name PM) (type passive)))) + (libpart (lib valves) (part ECC81) + (aliases + (alias ECC83)) + (fields + (field (name Reference) U) + (field (name Value) ECC81) + (field (name Footprint) VALVE-NOVAL_P)) + (pins + (pin (num 1) (name A) (type output)) + (pin (num 2) (name G) (type input)) + (pin (num 3) (name K) (type BiDi)) + (pin (num 4) (name F1) (type power_in)) + (pin (num 5) (name F1) (type power_in)) + (pin (num 6) (name A) (type output)) + (pin (num 7) (name G) (type input)) + (pin (num 8) (name K) (type BiDi)) + (pin (num 9) (name F2) (type power_in))))) + (libraries + (library (logical device) + (uri f:\kicad\share\library\device.lib)) + (library (logical conn) + (uri f:\kicad\share\library\conn.lib)) + (library (logical valves) + (uri f:\kicad\share\library\valves.lib))) + (nets + (net (code 1) (name "Net-(C1-Pad1)") + (node (ref U1) (pin 6)) + (node (ref C1) (pin 1)) + (node (ref P3) (pin 1))) + (net (code 2) (name "Net-(R2-Pad1)") + (node (ref R2) (pin 1)) + (node (ref U1) (pin 3))) + (net (code 3) (name "Net-(C2-Pad2)") + (node (ref U1) (pin 8)) + (node (ref R1) (pin 2)) + (node (ref C2) (pin 2))) + (net (code 4) (name "Net-(C2-Pad1)") + (node (ref C2) (pin 1)) + (node (ref R3) (pin 1)) + (node (ref P2) (pin 1))) + (net (code 5) (name "Net-(P4-Pad2)") + (node (ref U1) (pin 9)) + (node (ref P4) (pin 2))) + (net (code 6) (name "Net-(P1-Pad2)") + (node (ref U1) (pin 2)) + (node (ref P1) (pin 2)) + (node (ref R4) (pin 1))) + (net (code 7) (name "Net-(R1-Pad1)") + (node (ref R1) (pin 1)) + (node (ref U1) (pin 1)) + (node (ref U1) (pin 7))) + (net (code 8) (name GND) + (node (ref R3) (pin 2)) + (node (ref C1) (pin 2)) + (node (ref P1) (pin 1)) + (node (ref P2) (pin 2)) + (node (ref P3) (pin 2)) + (node (ref R4) (pin 2)) + (node (ref R2) (pin 2))) + (net (code 9) (name "Net-(P4-Pad1)") + (node (ref U1) (pin 4)) + (node (ref U1) (pin 5)) + (node (ref P4) (pin 1))))) \ No newline at end of file diff --git a/demos/ecc83/ecc83-pp.sch b/demos/ecc83/ecc83-pp.sch index 1edce60f10..291f21e7a9 100644 --- a/demos/ecc83/ecc83-pp.sch +++ b/demos/ecc83/ecc83-pp.sch @@ -1,11 +1,36 @@ EESchema Schematic File Version 2 -LIBS:power,device,conn,valves,linear,regul,74xx,cmos4000,adc-dac,memory,xilinx,special,microcontrollers,microchip,analog_switches,motorola,intel,audio,interface,digital-audio,philips,display,cypress,siliconi,contrib,.\ecc83-pp.cache -EELAYER 23 0 +LIBS:power +LIBS:device +LIBS:conn +LIBS:valves +LIBS:linear +LIBS:regul +LIBS:74xx +LIBS:cmos4000 +LIBS:adc-dac +LIBS:memory +LIBS:xilinx +LIBS:special +LIBS:microcontrollers +LIBS:microchip +LIBS:analog_switches +LIBS:motorola +LIBS:intel +LIBS:audio +LIBS:interface +LIBS:digital-audio +LIBS:philips +LIBS:display +LIBS:cypress +LIBS:siliconi +LIBS:contrib +EELAYER 24 0 EELAYER END -$Descr A4 11700 8267 +$Descr A4 11693 8268 +encoding utf-8 Sheet 1 1 Title "ECC Push-Pull" -Date "11 dec 2006" +Date "vendredi 04 juillet 2014" Rev "0.1" Comp "" Comment1 "" @@ -19,32 +44,29 @@ Wire Wire Line 5750 3850 5750 4050 Connection ~ 4450 4500 Wire Wire Line - 4450 5400 4450 4450 + 4450 4450 4450 5400 Wire Wire Line 4450 4450 4650 4450 Wire Wire Line - 9850 6350 9950 6350 + 1800 6650 1900 6650 Wire Wire Line - 9950 6350 9950 6150 + 1900 6650 1900 6450 Wire Wire Line - 4150 5300 4150 5000 + 4150 5000 4150 5300 Wire Wire Line 6950 5150 6950 5000 Wire Wire Line 4150 4800 4450 4800 Connection ~ 4450 4800 Wire Wire Line - 6950 4350 6950 4050 -Connection ~ 6950 4250 + 6950 4150 6950 4050 Wire Wire Line 4850 4850 4850 5400 Wire Wire Line 6300 3900 6300 4000 Wire Wire Line - 6950 3850 5750 3850 + 5750 3850 6950 3850 Connection ~ 6700 3850 -Wire Wire Line - 6700 4250 6950 4250 Wire Wire Line 6150 4450 6150 3900 Connection ~ 6150 3900 @@ -56,17 +78,17 @@ Wire Wire Line Wire Wire Line 6700 4800 6700 5400 Wire Wire Line - 10050 6150 10050 6350 + 2000 6450 2000 6650 Wire Wire Line - 10050 6250 9850 6250 -Connection ~ 10050 6250 + 2000 6550 1800 6550 +Connection ~ 2000 6550 Wire Wire Line 4100 5250 4150 5250 Connection ~ 4150 5250 Wire Wire Line - 9850 6250 9850 6150 + 1800 6550 1800 6450 Wire Wire Line - 6300 3900 4950 3900 + 4950 3900 6300 3900 Wire Wire Line 4950 3900 4950 4050 Wire Wire Line @@ -76,20 +98,22 @@ Wire Wire Line $Comp L ECC83 U1 U 3 1 48B4F266 -P 9950 5700 -F 0 "U1" H 10080 6010 50 0000 C C -F 1 "ECC81_83" H 10300 5400 50 0000 C C -F 2 "VALVE-NOVAL_P" H 10220 5300 50 0001 C C - 3 9950 5700 +P 1900 6000 +F 0 "U1" H 2030 6310 50 0000 C CNN +F 1 "ECC83" H 2250 5700 50 0000 C CNN +F 2 "VALVE-NOVAL_P" H 2170 5600 50 0001 C CNN +F 3 "" H 1900 6000 60 0001 C CNN + 3 1900 6000 1 0 0 -1 $EndComp $Comp L ECC83 U1 U 2 1 48B4F263 P 4950 4450 -F 0 "U1" H 5080 4760 50 0000 C C -F 1 "ECC83" H 5150 4100 50 0000 C C -F 2 "VALVE-NOVAL_P" H 5220 4050 50 0001 C C +F 0 "U1" H 5080 4760 50 0000 C CNN +F 1 "ECC83" H 5150 4100 50 0000 C CNN +F 2 "VALVE-NOVAL_P" H 5220 4050 50 0001 C CNN +F 3 "" H 4950 4450 60 0001 C CNN 2 4950 4450 1 0 0 -1 $EndComp @@ -97,9 +121,10 @@ $Comp L ECC83 U1 U 1 1 48B4F256 P 5750 4450 -F 0 "U1" H 5880 4760 50 0000 C C -F 1 "ECC83" H 5500 4150 50 0000 C C -F 2 "VALVE-NOVAL_P" H 6020 4050 50 0001 C C +F 0 "U1" H 5880 4760 50 0000 C CNN +F 1 "ECC83" H 5500 4150 50 0000 C CNN +F 2 "VALVE-NOVAL_P" H 6020 4050 50 0001 C CNN +F 3 "" H 5750 4450 60 0001 C CNN 1 5750 4450 -1 0 0 -1 $EndComp @@ -107,8 +132,10 @@ $Comp L GND #PWR01 U 1 1 457DBAF8 P 6950 5150 -F 0 "#PWR01" H 6950 5150 30 0001 C C -F 1 "GND" H 6950 5080 30 0001 C C +F 0 "#PWR01" H 6950 5150 30 0001 C CNN +F 1 "GND" H 6950 5080 30 0001 C CNN +F 2 "" H 6950 5150 60 0001 C CNN +F 3 "" H 6950 5150 60 0001 C CNN 1 6950 5150 1 0 0 -1 $EndComp @@ -116,8 +143,10 @@ $Comp L GND #PWR02 U 1 1 457DBAF5 P 6700 5900 -F 0 "#PWR02" H 6700 5900 30 0001 C C -F 1 "GND" H 6700 5830 30 0001 C C +F 0 "#PWR02" H 6700 5900 30 0001 C CNN +F 1 "GND" H 6700 5830 30 0001 C CNN +F 2 "" H 6700 5900 60 0001 C CNN +F 3 "" H 6700 5900 60 0001 C CNN 1 6700 5900 1 0 0 -1 $EndComp @@ -125,8 +154,10 @@ $Comp L GND #PWR03 U 1 1 457DBAF1 P 4850 5900 -F 0 "#PWR03" H 4850 5900 30 0001 C C -F 1 "GND" H 4850 5830 30 0001 C C +F 0 "#PWR03" H 4850 5900 30 0001 C CNN +F 1 "GND" H 4850 5830 30 0001 C CNN +F 2 "" H 4850 5900 60 0001 C CNN +F 3 "" H 4850 5900 60 0001 C CNN 1 4850 5900 1 0 0 -1 $EndComp @@ -134,8 +165,10 @@ $Comp L GND #PWR04 U 1 1 457DBAEF P 4450 5900 -F 0 "#PWR04" H 4450 5900 30 0001 C C -F 1 "GND" H 4450 5830 30 0001 C C +F 0 "#PWR04" H 4450 5900 30 0001 C CNN +F 1 "GND" H 4450 5830 30 0001 C CNN +F 2 "" H 4450 5900 60 0001 C CNN +F 3 "" H 4450 5900 60 0001 C CNN 1 4450 5900 1 0 0 -1 $EndComp @@ -143,26 +176,32 @@ $Comp L PWR_FLAG #FLG05 U 1 1 457DBAC0 P 4100 5250 -F 0 "#FLG05" H 4100 5520 30 0001 C C -F 1 "PWR_FLAG" H 4100 5480 30 0000 C C +F 0 "#FLG05" H 4100 5520 30 0001 C CNN +F 1 "PWR_FLAG" H 4100 5480 30 0000 C CNN +F 2 "" H 4100 5250 60 0001 C CNN +F 3 "" H 4100 5250 60 0001 C CNN 1 4100 5250 0 -1 -1 0 $EndComp $Comp L CONN_2 P4 U 1 1 456A8ACC -P 9950 6700 -F 0 "P4" V 9900 6700 40 0000 C C -F 1 "CONN_2" V 10000 6700 40 0000 C C - 1 9950 6700 +P 1900 7000 +F 0 "P4" V 1850 7000 40 0000 C CNN +F 1 "CONN_2" V 1950 7000 40 0000 C CNN +F 2 "" H 1900 7000 60 0001 C CNN +F 3 "" H 1900 7000 60 0001 C CNN + 1 1900 7000 0 1 1 0 $EndComp $Comp L C C1 U 1 1 4549F4BE P 6700 4050 -F 0 "C1" H 6750 4150 50 0000 L C -F 1 "10uF" H 6450 4150 50 0000 L C +F 0 "C1" H 6750 4150 50 0000 L CNN +F 1 "10uF" H 6450 4150 50 0000 L CNN +F 2 "" H 6700 4050 60 0001 C CNN +F 3 "" H 6700 4050 60 0001 C CNN 1 6700 4050 1 0 0 -1 $EndComp @@ -170,26 +209,32 @@ $Comp L GND #PWR06 U 1 1 4549F4B9 P 4150 5300 -F 0 "#PWR06" H 4150 5300 30 0001 C C -F 1 "GND" H 4150 5230 30 0001 C C +F 0 "#PWR06" H 4150 5300 30 0001 C CNN +F 1 "GND" H 4150 5230 30 0001 C CNN +F 2 "" H 4150 5300 60 0001 C CNN +F 3 "" H 4150 5300 60 0001 C CNN 1 4150 5300 1 0 0 -1 $EndComp $Comp L GND #PWR07 U 1 1 4549F4B3 -P 6950 4350 -F 0 "#PWR07" H 6950 4350 30 0001 C C -F 1 "GND" H 6950 4280 30 0001 C C - 1 6950 4350 +P 6950 4150 +F 0 "#PWR07" H 6950 4150 30 0001 C CNN +F 1 "GND" H 6950 4080 30 0001 C CNN +F 2 "" H 6950 4150 60 0001 C CNN +F 3 "" H 6950 4150 60 0001 C CNN + 1 6950 4150 1 0 0 -1 $EndComp $Comp L CONN_2 P3 U 1 1 4549F4A5 P 7300 3950 -F 0 "P3" V 7250 3950 40 0000 C C -F 1 "POWER" V 7350 3950 40 0000 C C +F 0 "P3" V 7250 3950 40 0000 C CNN +F 1 "POWER" V 7350 3950 40 0000 C CNN +F 2 "" H 7300 3950 60 0001 C CNN +F 3 "" H 7300 3950 60 0001 C CNN 1 7300 3950 1 0 0 -1 $EndComp @@ -197,8 +242,10 @@ $Comp L CONN_2 P2 U 1 1 4549F46C P 7300 4900 -F 0 "P2" V 7250 4900 40 0000 C C -F 1 "OUT" V 7350 4900 40 0000 C C +F 0 "P2" V 7250 4900 40 0000 C CNN +F 1 "OUT" V 7350 4900 40 0000 C CNN +F 2 "" H 7300 4900 60 0001 C CNN +F 3 "" H 7300 4900 60 0001 C CNN 1 7300 4900 1 0 0 -1 $EndComp @@ -206,8 +253,10 @@ $Comp L CONN_2 P1 U 1 1 4549F464 P 3800 4900 -F 0 "P1" V 3750 4900 40 0000 C C -F 1 "IN" V 3850 4900 40 0000 C C +F 0 "P1" V 3750 4900 40 0000 C CNN +F 1 "IN" V 3850 4900 40 0000 C CNN +F 2 "" H 3800 4900 60 0001 C CNN +F 3 "" H 3800 4900 60 0001 C CNN 1 3800 4900 -1 0 0 1 $EndComp @@ -215,8 +264,10 @@ $Comp L C C2 U 1 1 4549F3BE P 6500 4800 -F 0 "C2" H 6550 4900 50 0000 L C -F 1 "680nF" H 6550 4700 50 0000 L C +F 0 "C2" H 6550 4900 50 0000 L CNN +F 1 "680nF" H 6550 4700 50 0000 L CNN +F 2 "" H 6500 4800 60 0001 C CNN +F 3 "" H 6500 4800 60 0001 C CNN 1 6500 4800 0 1 1 0 $EndComp @@ -224,8 +275,10 @@ $Comp L R R3 U 1 1 4549F3AD P 6700 5650 -F 0 "R3" V 6780 5650 50 0000 C C -F 1 "100K" V 6700 5650 50 0000 C C +F 0 "R3" V 6780 5650 50 0000 C CNN +F 1 "100K" V 6700 5650 50 0000 C CNN +F 2 "" H 6700 5650 60 0001 C CNN +F 3 "" H 6700 5650 60 0001 C CNN 1 6700 5650 1 0 0 -1 $EndComp @@ -233,8 +286,10 @@ $Comp L R R4 U 1 1 4549F3A2 P 4450 5650 -F 0 "R4" V 4530 5650 50 0000 C C -F 1 "47K" V 4450 5650 50 0000 C C +F 0 "R4" V 4530 5650 50 0000 C CNN +F 1 "47K" V 4450 5650 50 0000 C CNN +F 2 "" H 4450 5650 60 0001 C CNN +F 3 "" H 4450 5650 60 0001 C CNN 1 4450 5650 1 0 0 -1 $EndComp @@ -242,8 +297,10 @@ $Comp L R R2 U 1 1 4549F39D P 4850 5650 -F 0 "R2" V 4930 5650 50 0000 C C -F 1 "1.5K" V 4850 5650 50 0000 C C +F 0 "R2" V 4930 5650 50 0000 C CNN +F 1 "1.5K" V 4850 5650 50 0000 C CNN +F 2 "" H 4850 5650 60 0001 C CNN +F 3 "" H 4850 5650 60 0001 C CNN 1 4850 5650 1 0 0 -1 $EndComp @@ -251,9 +308,22 @@ $Comp L R R1 U 1 1 4549F38A P 6300 4250 -F 0 "R1" V 6380 4250 50 0000 C C -F 1 "1.5K" V 6300 4250 50 0000 C C +F 0 "R1" V 6380 4250 50 0000 C CNN +F 1 "1.5K" V 6300 4250 50 0000 C CNN +F 2 "" H 6300 4250 60 0001 C CNN +F 3 "" H 6300 4250 60 0001 C CNN 1 6300 4250 1 0 0 -1 $EndComp +$Comp +L GND #PWR08 +U 1 1 53B6F370 +P 6700 4250 +F 0 "#PWR08" H 6700 4250 30 0001 C CNN +F 1 "GND" H 6700 4180 30 0001 C CNN +F 2 "" H 6700 4250 60 0001 C CNN +F 3 "" H 6700 4250 60 0001 C CNN + 1 6700 4250 + 1 0 0 -1 +$EndComp $EndSCHEMATC diff --git a/demos/ecc83/ecc83-pp_v2-cache.lib b/demos/ecc83/ecc83-pp_v2-cache.lib index 5bb4b318ea..41d6af2285 100644 --- a/demos/ecc83/ecc83-pp_v2-cache.lib +++ b/demos/ecc83/ecc83-pp_v2-cache.lib @@ -1,18 +1,21 @@ -EESchema-LIBRARY Version 2.3 Date: 30/12/2010 18:27:52 +EESchema-LIBRARY Version 2.3 +#encoding utf-8 # # 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 100 30 H V C CNN $FPLIST SM* C? C1-1 $ENDFPLIST DRAW -P 2 0 1 10 -100 -30 100 -30 N -P 2 0 1 10 -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 @@ -23,6 +26,8 @@ ENDDEF DEF CONN_2 P 0 40 Y N 1 F N F0 "P" -50 0 40 V V C CNN F1 "CONN_2" 50 0 40 V V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN DRAW S -100 150 100 -150 0 1 0 N X P1 1 -350 100 250 R 60 60 1 1 P I @@ -36,6 +41,7 @@ DEF ECC81 U 0 0 Y Y 3 L N F0 "U" 130 310 50 H V C CNN F1 "ECC81" 350 -300 50 H V C CNN F2 "VALVE-NOVAL_P" 270 -400 50 H I C CNN +F3 "" 0 0 60 H V C CNN ALIAS ECC83 DRAW P 2 1 0 0 -100 -200 -100 -300 N @@ -77,6 +83,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 @@ -86,20 +94,23 @@ ENDDEF # PWR_FLAG # DEF PWR_FLAG #FLG 0 0 N N 1 F P -F0 "#FLG" 0 270 30 H I C CNN -F1 "PWR_FLAG" 0 230 30 H V C CNN +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 3 0 1 0 0 0 0 100 0 100 N -P 5 0 1 0 0 100 -100 150 0 200 100 150 0 100 N +P 6 0 1 0 0 0 0 50 -75 100 0 150 75 100 0 50 N ENDDRAW 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 diff --git a/demos/ecc83/ecc83-pp_v2.kicad_pcb b/demos/ecc83/ecc83-pp_v2.kicad_pcb index cbef03d486..069f2a2629 100644 --- a/demos/ecc83/ecc83-pp_v2.kicad_pcb +++ b/demos/ecc83/ecc83-pp_v2.kicad_pcb @@ -1,12 +1,12 @@ -(kicad_pcb (version 3) (host pcbnew "(2014-05-16 BZR 4868)-product") +(kicad_pcb (version 4) (host pcbnew "(2014-07-02 BZR 4969)-product") (general (links 20) (no_connects 0) - (area 118.759514 89.3318 168.465501 133.6802) + (area 119.824499 90.614499 168.465501 132.905501) (thickness 1.6002) (drawings 4) - (tracks 63) + (tracks 47) (zones 0) (modules 15) (nets 10) @@ -14,21 +14,21 @@ (page A4) (layers - (15 Dessus signal) - (0 Dessous signal) - (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 Edge.Cuts user) + (0 Dessus signal) + (31 Dessous signal) + (32 B.Adhes user) + (33 F.Adhes user) + (34 B.Paste user) + (35 F.Paste user) + (36 B.SilkS user) + (37 F.SilkS user) + (38 B.Mask user) + (39 F.Mask user) + (40 Dwgs.User user) + (41 Cmts.User user) + (42 Eco1.User user) + (43 Eco2.User user) + (44 Edge.Cuts user) ) (setup @@ -62,9 +62,9 @@ (pad_drill 1.9304) (pad_to_mask_clearance 0.254) (aux_axis_origin 0 0) - (visible_elements FFFFFFBF) + (visible_elements 7FFFF7FF) (pcbplotparams - (layerselection 3178497) + (layerselection 0x00030_80000001) (usegerberextensions true) (excludeedgelayer true) (linewidth 0.150000) @@ -80,7 +80,6 @@ (psa4output false) (plotreference true) (plotvalue true) - (plotothertext true) (plotinvisibletext false) (padsonsilk false) (subtractmaskfromsilk false) @@ -93,14 +92,14 @@ (net 0 "") (net 1 GND) - (net 2 N-000001) - (net 3 N-000002) - (net 4 N-000003) - (net 5 N-000004) - (net 6 N-000005) - (net 7 N-000006) - (net 8 N-000007) - (net 9 N-000008) + (net 2 "Net-(C1-Pad1)") + (net 3 "Net-(C2-Pad1)") + (net 4 "Net-(C2-Pad2)") + (net 5 "Net-(P1-Pad2)") + (net 6 "Net-(P4-Pad1)") + (net 7 "Net-(P4-Pad2)") + (net 8 "Net-(R1-Pad1)") + (net 9 "Net-(R2-Pad1)") (net_class Default "Ceci est la Netclass par défaut" (clearance 0.508) @@ -110,20 +109,22 @@ (uvia_dia 0.508) (uvia_drill 0.127) (add_net GND) - (add_net N-000001) - (add_net N-000002) - (add_net N-000003) - (add_net N-000004) - (add_net N-000005) - (add_net N-000006) (add_net N-000007) - (add_net N-000008) + (add_net "Net-(C1-Pad1)") + (add_net "Net-(C2-Pad1)") + (add_net "Net-(C2-Pad2)") + (add_net "Net-(P1-Pad2)") + (add_net "Net-(P4-Pad1)") + (add_net "Net-(P4-Pad2)") + (add_net "Net-(R1-Pad1)") + (add_net "Net-(R2-Pad1)") ) (module C2V10 (layer Dessus) (tedit 41854742) (tstamp 4549F4BE) (at 131.445 99.06 90) (descr "Condensateur polarise") (tags CP) + (path /4549F4BE) (fp_text reference C1 (at 0 2.54 90) (layer F.SilkS) (effects (font (size 1.27 1.27) (thickness 0.254))) ) @@ -132,7 +133,7 @@ ) (fp_circle (center 0 0) (end 4.826 -2.794) (layer F.SilkS) (width 0.3048)) (pad 1 thru_hole rect (at -2.54 0 90) (size 1.778 1.778) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 7 N-000006)) + (net 2 "Net-(C1-Pad1)")) (pad 2 thru_hole circle (at 2.54 0 90) (size 1.778 1.778) (drill 1.016) (layers *.Cu *.Mask F.SilkS) (net 1 GND)) (model discret/c_vert_c2v10.wrl @@ -146,6 +147,7 @@ (at 140.97 125.095 270) (descr "Resitance 3 pas") (tags R) + (path /4549F38A) (autoplace_cost180 10) (fp_text reference R1 (at 0 0 270) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) @@ -162,9 +164,9 @@ (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.8128) (layers *.Cu *.Mask F.SilkS) - (net 5 N-000004)) + (net 8 "Net-(R1-Pad1)")) (pad 2 thru_hole circle (at 3.81 0 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) - (net 9 N-000008)) + (net 4 "Net-(C2-Pad2)")) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -176,6 +178,7 @@ (at 124.46 118.745 270) (descr "Resitance 3 pas") (tags R) + (path /4549F3AD) (autoplace_cost180 10) (fp_text reference R3 (at 0 0 270) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) @@ -192,7 +195,7 @@ (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.8128) (layers *.Cu *.Mask F.SilkS) - (net 4 N-000003)) + (net 3 "Net-(C2-Pad1)")) (pad 2 thru_hole circle (at 3.81 0 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) (net 1 GND)) (model discret/resistor.wrl @@ -206,6 +209,7 @@ (at 165.1 120.015 270) (descr "Resitance 3 pas") (tags R) + (path /4549F3A2) (autoplace_cost180 10) (fp_text reference R4 (at 0 0 270) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) @@ -222,7 +226,7 @@ (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.8128) (layers *.Cu *.Mask F.SilkS) - (net 8 N-000007)) + (net 5 "Net-(P1-Pad2)")) (pad 2 thru_hole circle (at 3.81 0 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) (net 1 GND)) (model discret/resistor.wrl @@ -236,6 +240,7 @@ (at 165.1 103.505 90) (descr "Resitance 3 pas") (tags R) + (path /4549F39D) (autoplace_cost180 10) (fp_text reference R2 (at 0 0 90) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) @@ -252,7 +257,7 @@ (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.8128) (layers *.Cu *.Mask F.SilkS) - (net 6 N-000005)) + (net 9 "Net-(R2-Pad1)")) (pad 2 thru_hole circle (at 3.81 0 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) (net 1 GND)) (model discret/resistor.wrl @@ -322,6 +327,7 @@ (at 131.445 118.745 270) (descr "Condensateur polarise") (tags CP) + (path /4549F3BE) (fp_text reference C2 (at 1.27 1.27 270) (layer F.SilkS) (effects (font (thickness 0.3048))) ) @@ -340,9 +346,9 @@ (fp_line (start -5.08 -2.54) (end -5.08 2.54) (layer F.SilkS) (width 0.3048)) (fp_line (start -6.35 2.54) (end -6.35 -2.54) (layer F.SilkS) (width 0.3048)) (pad 1 thru_hole rect (at -10.16 0 270) (size 1.778 1.778) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) - (net 4 N-000003)) + (net 3 "Net-(C2-Pad1)")) (pad 2 thru_hole circle (at 10.16 0 270) (size 1.778 1.778) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) - (net 9 N-000008)) + (net 4 "Net-(C2-Pad2)")) (model discret/c_pol.wrl (at (xyz 0 0 0)) (scale (xyz 0.8 0.8 0.8)) @@ -351,7 +357,8 @@ ) (module ECC-83-2 (layer Dessus) (tedit 46F8A1CF) (tstamp 454A08DD) - (at 193.675 101.4984) + (at 149.3 109.2) + (path /48B4F266) (fp_text reference U1 (at 0 -11.43) (layer F.SilkS) (effects (font (thickness 0.3048))) ) @@ -360,23 +367,23 @@ ) (fp_circle (center 0 0) (end 10.16 1.27) (layer F.SilkS) (width 0.381)) (pad 1 thru_hole oval (at 3.4544 4.75488 306) (size 2.032 3.048) (drill oval 1.016 2.032) (layers *.Cu *.Mask F.SilkS) - (net 5 N-000004)) + (net 8 "Net-(R1-Pad1)")) (pad 2 thru_hole oval (at 5.60832 1.8288 342) (size 2.032 3.048) (drill oval 1.016 2.032) (layers *.Cu *.Mask F.SilkS) - (net 8 N-000007)) + (net 5 "Net-(P1-Pad2)")) (pad 3 thru_hole oval (at 5.60832 -1.8288 18) (size 2.032 3.048) (drill oval 1.016 2.032) (layers *.Cu *.Mask F.SilkS) - (net 6 N-000005)) + (net 9 "Net-(R2-Pad1)")) (pad 4 thru_hole oval (at 3.4544 -4.75488 54) (size 2.032 3.048) (drill oval 1.016 2.032) (layers *.Cu *.Mask F.SilkS) - (net 2 N-000001)) + (net 6 "Net-(P4-Pad1)")) (pad 5 thru_hole oval (at 0 -5.8928 90) (size 2.032 3.048) (drill oval 1.016 2.032) (layers *.Cu *.Mask F.SilkS) - (net 2 N-000001)) + (net 6 "Net-(P4-Pad1)")) (pad 6 thru_hole oval (at -3.4544 -4.75488 306) (size 2.032 3.048) (drill oval 1.016 2.032) (layers *.Cu *.Mask F.SilkS) - (net 7 N-000006)) + (net 2 "Net-(C1-Pad1)")) (pad 7 thru_hole oval (at -5.60832 -1.8288 342) (size 2.032 3.048) (drill oval 1.016 2.032) (layers *.Cu *.Mask F.SilkS) - (net 5 N-000004)) + (net 8 "Net-(R1-Pad1)")) (pad 8 thru_hole oval (at -5.60832 1.78816 18) (size 2.032 3.048) (drill oval 1.016 2.032) (layers *.Cu *.Mask F.SilkS) - (net 9 N-000008)) + (net 4 "Net-(C2-Pad2)")) (pad 9 thru_hole oval (at -3.4544 4.75488 54) (size 2.032 3.048) (drill oval 1.016 2.032) (layers *.Cu *.Mask F.SilkS) - (net 3 N-000002)) + (net 7 "Net-(P4-Pad2)")) (pad 10 thru_hole circle (at 0 0) (size 4.50088 4.50088) (drill 3.0988) (layers *.Cu *.Mask F.SilkS)) (model valves/ecc83.wrl (at (xyz 0 0 0)) @@ -389,6 +396,7 @@ (at 149.225 128.905 180) (descr "Connecteurs 2 pins") (tags "CONN DEV") + (path /456A8ACC) (fp_text reference P4 (at 0 -1.905 180) (layer F.SilkS) (effects (font (size 0.762 0.762) (thickness 0.1524))) ) @@ -400,9 +408,9 @@ (fp_line (start 2.54 -1.27) (end 2.54 1.27) (layer F.SilkS) (width 0.1524)) (fp_line (start 2.54 1.27) (end -2.54 1.27) (layer F.SilkS) (width 0.1524)) (pad 1 thru_hole rect (at -1.27 0 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 2 N-000001)) + (net 6 "Net-(P4-Pad1)")) (pad 2 thru_hole circle (at 1.27 0 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 3 N-000002)) + (net 7 "Net-(P4-Pad2)")) (model pin_array/pins_array_2x1.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -414,6 +422,7 @@ (at 123.19 109.855 90) (descr "Connecteurs 2 pins") (tags "CONN DEV") + (path /4549F46C) (fp_text reference P2 (at 0 -1.905 90) (layer F.SilkS) (effects (font (size 0.762 0.762) (thickness 0.1524))) ) @@ -425,7 +434,7 @@ (fp_line (start 2.54 -1.27) (end 2.54 1.27) (layer F.SilkS) (width 0.1524)) (fp_line (start 2.54 1.27) (end -2.54 1.27) (layer F.SilkS) (width 0.1524)) (pad 1 thru_hole rect (at -1.27 0 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 4 N-000003)) + (net 3 "Net-(C2-Pad1)")) (pad 2 thru_hole circle (at 1.27 0 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) (net 1 GND)) (model pin_array/pins_array_2x1.wrl @@ -439,6 +448,7 @@ (at 165.1 111.76 270) (descr "Connecteurs 2 pins") (tags "CONN DEV") + (path /4549F464) (fp_text reference P1 (at 0 -1.905 270) (layer F.SilkS) (effects (font (size 0.762 0.762) (thickness 0.1524))) ) @@ -452,7 +462,7 @@ (pad 1 thru_hole rect (at -1.27 0 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) (net 1 GND)) (pad 2 thru_hole circle (at 1.27 0 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 8 N-000007)) + (net 5 "Net-(P1-Pad2)")) (model pin_array/pins_array_2x1.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -464,6 +474,7 @@ (at 123.19 101.6 90) (descr "Connecteurs 2 pins") (tags "CONN DEV") + (path /4549F4A5) (fp_text reference P3 (at 0 -1.905 90) (layer F.SilkS) (effects (font (size 0.762 0.762) (thickness 0.1524))) ) @@ -475,7 +486,7 @@ (fp_line (start 2.54 -1.27) (end 2.54 1.27) (layer F.SilkS) (width 0.1524)) (fp_line (start 2.54 1.27) (end -2.54 1.27) (layer F.SilkS) (width 0.1524)) (pad 1 thru_hole rect (at -1.27 0 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 7 N-000006)) + (net 2 "Net-(C1-Pad1)")) (pad 2 thru_hole circle (at 1.27 0 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) (net 1 GND)) (model pin_array/pins_array_2x1.wrl @@ -490,74 +501,58 @@ (gr_line (start 168.275 90.805) (end 168.275 132.715) (angle 90) (layer Edge.Cuts) (width 0.381)) (gr_line (start 120.015 90.805) (end 120.015 132.715) (angle 90) (layer Edge.Cuts) (width 0.381)) - (segment (start 124.46 122.555) (end 121.285 119.38) (width 0.8636) (layer Dessous) (net 1)) - (segment (start 121.285 119.38) (end 121.285 118.745) (width 0.8636) (layer Dessous) (net 1)) - (segment (start 167.005 101.6) (end 167.005 110.49) (width 0.8636) (layer Dessous) (net 1)) - (segment (start 167.005 101.6) (end 165.1 99.695) (width 0.8636) (layer Dessous) (net 1)) (segment (start 165.1 123.825) (end 165.354 123.825) (width 0.8636) (layer Dessous) (net 1)) - (segment (start 165.354 123.825) (end 167.005 122.174) (width 0.8636) (layer Dessous) (net 1)) - (segment (start 121.285 108.585) (end 123.19 108.585) (width 0.8636) (layer Dessous) (net 1) (status 400)) - (segment (start 123.19 100.33) (end 121.285 100.33) (width 0.8636) (layer Dessous) (net 1) (status 800)) - (segment (start 167.005 110.49) (end 167.005 122.174) (width 0.8636) (layer Dessous) (net 1)) - (segment (start 161.925 96.52) (end 165.1 99.695) (width 0.8636) (layer Dessous) (net 1) (status 400)) - (segment (start 131.445 96.52) (end 161.925 96.52) (width 0.8636) (layer Dessous) (net 1) (status 800)) - (segment (start 127 96.52) (end 131.445 96.52) (width 0.8636) (layer Dessous) (net 1) (status 400)) - (segment (start 123.19 100.33) (end 127 96.52) (width 0.8636) (layer Dessous) (net 1) (status 800)) - (segment (start 121.285 100.33) (end 121.285 108.585) (width 0.8636) (layer Dessous) (net 1)) - (segment (start 121.285 108.585) (end 121.285 118.745) (width 0.8636) (layer Dessous) (net 1)) - (segment (start 165.1 110.49) (end 167.005 110.49) (width 0.8636) (layer Dessous) (net 1) (status 800)) - (segment (start 152.6794 110.8456) (end 149.86 113.665) (width 0.8636) (layer Dessous) (net 2)) - (segment (start 149.86 115.697) (end 150.495 116.332) (width 0.8636) (layer Dessous) (net 2)) - (segment (start 149.86 113.665) (end 149.86 115.697) (width 0.8636) (layer Dessous) (net 2)) - (segment (start 149.225 103.3272) (end 151.54148 103.3272) (width 0.8636) (layer Dessous) (net 2)) - (segment (start 151.54148 103.3272) (end 152.6794 104.46512) (width 0.8636) (layer Dessous) (net 2) (status 400)) - (segment (start 152.6794 104.46512) (end 152.6794 110.8456) (width 0.8636) (layer Dessous) (net 2) (status 800)) - (segment (start 150.495 128.905) (end 150.495 116.332) (width 0.8636) (layer Dessous) (net 2) (status 800)) - (segment (start 147.955 128.905) (end 147.955 116.15928) (width 0.8636) (layer Dessous) (net 3) (status 800)) - (segment (start 147.955 116.15928) (end 145.7706 113.97488) (width 0.8636) (layer Dessous) (net 3) (status 400)) - (segment (start 124.46 114.935) (end 123.825 114.935) (width 0.8636) (layer Dessous) (net 4)) - (segment (start 123.19 114.3) (end 123.19 111.125) (width 0.8636) (layer Dessous) (net 4)) - (segment (start 123.825 114.935) (end 123.19 114.3) (width 0.8636) (layer Dessous) (net 4)) - (segment (start 131.445 108.585) (end 128.905 111.125) (width 0.8636) (layer Dessous) (net 4) (status 800)) - (segment (start 128.905 111.125) (end 123.19 111.125) (width 0.8636) (layer Dessous) (net 4) (status 400)) - (segment (start 153.67 131.445) (end 154.94 130.175) (width 0.8636) (layer Dessous) (net 5)) - (segment (start 130.175 131.445) (end 153.67 131.445) (width 0.8636) (layer Dessous) (net 5)) - (segment (start 128.905 130.175) (end 130.175 131.445) (width 0.8636) (layer Dessous) (net 5)) - (segment (start 128.905 127) (end 128.905 130.175) (width 0.8636) (layer Dessous) (net 5)) - (segment (start 154.94 130.175) (end 154.94 116.23548) (width 0.8636) (layer Dessous) (net 5)) - (segment (start 154.94 116.23548) (end 152.6794 113.97488) (width 0.8636) (layer Dessous) (net 5) (status 400)) - (segment (start 140.97 121.285) (end 140.97 123.825) (width 0.8636) (layer Dessous) (net 5) (status 800)) - (segment (start 142.1638 107.3912) (end 140.97 108.585) (width 0.8636) (layer Dessous) (net 5)) - (segment (start 140.97 108.585) (end 140.97 121.285) (width 0.8636) (layer Dessous) (net 5) (status 400)) - (segment (start 143.61668 107.3912) (end 142.1638 107.3912) (width 0.8636) (layer Dessous) (net 5) (status 800)) - (segment (start 130.175 125.73) (end 128.905 127) (width 0.8636) (layer Dessous) (net 5)) - (segment (start 139.065 125.73) (end 130.175 125.73) (width 0.8636) (layer Dessous) (net 5)) - (segment (start 140.97 123.825) (end 139.065 125.73) (width 0.8636) (layer Dessous) (net 5)) - (segment (start 154.83332 107.3912) (end 165.0238 107.3912) (width 0.8636) (layer Dessous) (net 6) (status 800)) - (segment (start 165.0238 107.3912) (end 165.1 107.315) (width 0.8636) (layer Dessous) (net 6) (status 400)) - (segment (start 190.2206 96.74352) (end 181.84622 96.74352) (width 0.8636) (layer Dessous) (net 7)) - (segment (start 125.73 101.6) (end 131.445 101.6) (width 0.8636) (layer Dessous) (net 7) (status 400)) - (segment (start 123.19 102.87) (end 124.46 102.87) (width 0.8636) (layer Dessous) (net 7) (status 800)) - (segment (start 142.90548 101.6) (end 145.7706 104.46512) (width 0.8636) (layer Dessous) (net 7) (status 400)) - (segment (start 131.445 101.6) (end 142.90548 101.6) (width 0.8636) (layer Dessous) (net 7) (status 800)) - (segment (start 124.46 102.87) (end 125.73 101.6) (width 0.8636) (layer Dessous) (net 7)) - (segment (start 161.925 113.03) (end 165.1 113.03) (width 0.8636) (layer Dessous) (net 8) (status 400)) - (segment (start 159.9438 111.0488) (end 161.925 113.03) (width 0.8636) (layer Dessous) (net 8)) - (segment (start 165.1 113.03) (end 165.1 116.205) (width 0.8636) (layer Dessous) (net 8) (status C00)) - (segment (start 154.83332 111.0488) (end 159.9438 111.0488) (width 0.8636) (layer Dessous) (net 8) (status 800)) - (segment (start 142.875 116.205) (end 143.51 116.84) (width 0.8636) (layer Dessous) (net 9)) - (segment (start 142.875 112.395) (end 142.875 116.205) (width 0.8636) (layer Dessous) (net 9)) - (segment (start 143.61668 111.65332) (end 142.875 112.395) (width 0.8636) (layer Dessous) (net 9)) - (segment (start 140.97 128.905) (end 142.24 128.905) (width 0.8636) (layer Dessous) (net 9) (status 800)) - (segment (start 142.24 128.905) (end 143.51 127.635) (width 0.8636) (layer Dessous) (net 9)) - (segment (start 143.51 127.635) (end 143.51 116.84) (width 0.8636) (layer Dessous) (net 9)) - (segment (start 143.61668 111.00816) (end 143.61668 111.65332) (width 0.8636) (layer Dessous) (net 9) (status 800)) - (segment (start 131.445 128.905) (end 140.97 128.905) (width 0.8636) (layer Dessous) (net 9) (status C00)) + (segment (start 124.46 102.87) (end 125.73 101.6) (width 0.8636) (layer Dessous) (net 2)) + (segment (start 131.445 101.6) (end 142.90548 101.6) (width 0.8636) (layer Dessous) (net 2) (status 800)) + (segment (start 142.90548 101.6) (end 145.7706 104.46512) (width 0.8636) (layer Dessous) (net 2) (status 400)) + (segment (start 123.19 102.87) (end 124.46 102.87) (width 0.8636) (layer Dessous) (net 2) (status 800)) + (segment (start 125.73 101.6) (end 131.445 101.6) (width 0.8636) (layer Dessous) (net 2) (status 400)) + (segment (start 128.905 111.125) (end 123.19 111.125) (width 0.8636) (layer Dessous) (net 3) (status 400)) + (segment (start 131.445 108.585) (end 128.905 111.125) (width 0.8636) (layer Dessous) (net 3) (status 800)) + (segment (start 123.825 114.935) (end 123.19 114.3) (width 0.8636) (layer Dessous) (net 3)) + (segment (start 123.19 114.3) (end 123.19 111.125) (width 0.8636) (layer Dessous) (net 3)) + (segment (start 124.46 114.935) (end 123.825 114.935) (width 0.8636) (layer Dessous) (net 3)) + (segment (start 131.445 128.905) (end 140.97 128.905) (width 0.8636) (layer Dessous) (net 4) (status C00)) + (segment (start 143.61668 111.00816) (end 143.61668 111.65332) (width 0.8636) (layer Dessous) (net 4) (status 800)) + (segment (start 143.51 127.635) (end 143.51 116.84) (width 0.8636) (layer Dessous) (net 4)) + (segment (start 142.24 128.905) (end 143.51 127.635) (width 0.8636) (layer Dessous) (net 4)) + (segment (start 140.97 128.905) (end 142.24 128.905) (width 0.8636) (layer Dessous) (net 4) (status 800)) + (segment (start 143.61668 111.65332) (end 142.875 112.395) (width 0.8636) (layer Dessous) (net 4)) + (segment (start 142.875 112.395) (end 142.875 116.205) (width 0.8636) (layer Dessous) (net 4)) + (segment (start 142.875 116.205) (end 143.51 116.84) (width 0.8636) (layer Dessous) (net 4)) + (segment (start 154.83332 111.0488) (end 159.9438 111.0488) (width 0.8636) (layer Dessous) (net 5) (status 800)) + (segment (start 165.1 113.03) (end 165.1 116.205) (width 0.8636) (layer Dessous) (net 5) (status C00)) + (segment (start 159.9438 111.0488) (end 161.925 113.03) (width 0.8636) (layer Dessous) (net 5)) + (segment (start 161.925 113.03) (end 165.1 113.03) (width 0.8636) (layer Dessous) (net 5) (status 400)) + (segment (start 150.495 128.905) (end 150.495 116.332) (width 0.8636) (layer Dessous) (net 6) (status 800)) + (segment (start 152.6794 104.46512) (end 152.6794 110.8456) (width 0.8636) (layer Dessous) (net 6) (status 800)) + (segment (start 151.54148 103.3272) (end 152.6794 104.46512) (width 0.8636) (layer Dessous) (net 6) (status 400)) + (segment (start 149.225 103.3272) (end 151.54148 103.3272) (width 0.8636) (layer Dessous) (net 6)) + (segment (start 149.86 113.665) (end 149.86 115.697) (width 0.8636) (layer Dessous) (net 6)) + (segment (start 149.86 115.697) (end 150.495 116.332) (width 0.8636) (layer Dessous) (net 6)) + (segment (start 152.6794 110.8456) (end 149.86 113.665) (width 0.8636) (layer Dessous) (net 6)) + (segment (start 147.955 116.15928) (end 145.7706 113.97488) (width 0.8636) (layer Dessous) (net 7) (status 400)) + (segment (start 147.955 128.905) (end 147.955 116.15928) (width 0.8636) (layer Dessous) (net 7) (status 800)) + (segment (start 140.97 123.825) (end 139.065 125.73) (width 0.8636) (layer Dessous) (net 8)) + (segment (start 139.065 125.73) (end 130.175 125.73) (width 0.8636) (layer Dessous) (net 8)) + (segment (start 130.175 125.73) (end 128.905 127) (width 0.8636) (layer Dessous) (net 8)) + (segment (start 143.61668 107.3912) (end 142.1638 107.3912) (width 0.8636) (layer Dessous) (net 8) (status 800)) + (segment (start 140.97 108.585) (end 140.97 121.285) (width 0.8636) (layer Dessous) (net 8) (status 400)) + (segment (start 142.1638 107.3912) (end 140.97 108.585) (width 0.8636) (layer Dessous) (net 8)) + (segment (start 140.97 121.285) (end 140.97 123.825) (width 0.8636) (layer Dessous) (net 8) (status 800)) + (segment (start 154.94 116.23548) (end 152.6794 113.97488) (width 0.8636) (layer Dessous) (net 8) (status 400)) + (segment (start 154.94 130.175) (end 154.94 116.23548) (width 0.8636) (layer Dessous) (net 8)) + (segment (start 128.905 127) (end 128.905 130.175) (width 0.8636) (layer Dessous) (net 8)) + (segment (start 128.905 130.175) (end 130.175 131.445) (width 0.8636) (layer Dessous) (net 8)) + (segment (start 130.175 131.445) (end 153.67 131.445) (width 0.8636) (layer Dessous) (net 8)) + (segment (start 153.67 131.445) (end 154.94 130.175) (width 0.8636) (layer Dessous) (net 8)) + (segment (start 165.0238 107.3912) (end 165.1 107.315) (width 0.8636) (layer Dessous) (net 9) (status 400)) + (segment (start 154.83332 107.3912) (end 165.0238 107.3912) (width 0.8636) (layer Dessous) (net 9) (status 800)) (zone (net 1) (net_name GND) (layer Dessous) (tstamp 4EED96A1) (hatch edge 0.508) (connect_pads (clearance 0.635)) (min_thickness 0.254) - (fill (arc_segments 16) (thermal_gap 0.254) (thermal_bridge_width 0.50038)) + (fill yes (arc_segments 16) (thermal_gap 0.254) (thermal_bridge_width 0.50038)) (polygon (pts (xy 167.64 132.08) (xy 167.64 91.44) (xy 120.65 91.44) (xy 120.65 132.08) @@ -565,115 +560,114 @@ ) (filled_polygon (pts - (xy 167.3225 127.81026) (xy 166.68496 127.17272) (xy 166.18966 126.96444) (xy 166.18966 123.95962) (xy 166.15664 123.5329) - (xy 166.05504 123.28144) (xy 165.89248 123.20524) (xy 165.71976 123.37796) (xy 165.71976 123.03252) (xy 165.64356 122.86996) - (xy 165.23462 122.73534) (xy 164.8079 122.76836) (xy 164.55644 122.86996) (xy 164.48024 123.03252) (xy 165.1 123.65228) - (xy 165.71976 123.03252) (xy 165.71976 123.37796) (xy 165.27272 123.825) (xy 165.89248 124.44476) (xy 166.05504 124.36856) - (xy 166.18966 123.95962) (xy 166.18966 126.96444) (xy 165.71976 126.76886) (xy 165.71976 124.61748) (xy 165.1 123.99772) - (xy 164.92728 124.17044) (xy 164.92728 123.825) (xy 164.30752 123.20524) (xy 164.14496 123.28144) (xy 164.01034 123.69038) - (xy 164.04336 124.1171) (xy 164.14496 124.36856) (xy 164.30752 124.44476) (xy 164.92728 123.825) (xy 164.92728 124.17044) - (xy 164.48024 124.61748) (xy 164.55644 124.78004) (xy 164.96538 124.91466) (xy 165.3921 124.88164) (xy 165.64356 124.78004) - (xy 165.71976 124.61748) (xy 165.71976 126.76886) (xy 165.6588 126.746) (xy 164.54628 126.746) (xy 163.52012 127.17018) - (xy 162.73272 127.95504) (xy 162.306 128.9812) (xy 162.306 130.09372) (xy 162.73018 131.11988) (xy 163.37026 131.7625) - (xy 155.03906 131.7625) (xy 155.78328 131.01828) (xy 156.04236 130.6322) (xy 156.13126 130.175) (xy 156.1338 130.175) - (xy 156.1338 116.23548) (xy 156.04236 115.77828) (xy 155.78328 115.3922) (xy 155.78328 115.38966) (xy 154.74188 114.3508) - (xy 154.79522 114.26698) (xy 154.90444 113.58118) (xy 154.8384 113.30686) (xy 155.1432 113.284) (xy 155.76296 112.96904) - (xy 156.21254 112.44326) (xy 156.27604 112.2426) (xy 159.45104 112.2426) (xy 161.08172 113.87328) (xy 161.4678 114.13236) - (xy 161.925 114.2238) (xy 163.9062 114.2238) (xy 163.9062 115.33378) (xy 163.86302 115.37696) (xy 163.6395 115.9129) - (xy 163.6395 116.49456) (xy 163.86048 117.0305) (xy 164.27196 117.44198) (xy 164.8079 117.6655) (xy 165.38956 117.6655) - (xy 165.9255 117.44452) (xy 166.33698 117.03304) (xy 166.5605 116.4971) (xy 166.5605 115.91544) (xy 166.33952 115.3795) - (xy 166.2938 115.33378) (xy 166.2938 113.98758) (xy 166.39032 113.89106) (xy 166.62146 113.33226) (xy 166.62146 112.72774) - (xy 166.39032 112.16894) (xy 165.96106 111.73968) (xy 165.6969 111.63046) (xy 165.7858 111.63046) (xy 165.93566 111.63046) - (xy 166.07536 111.57458) (xy 166.18204 111.4679) (xy 166.24046 111.3282) (xy 166.243 110.7059) (xy 166.243 110.2741) - (xy 166.24046 109.6518) (xy 166.18204 109.5121) (xy 166.07536 109.40542) (xy 165.93566 109.34954) (xy 165.7858 109.34954) - (xy 165.3159 109.347) (xy 165.22192 109.44098) (xy 165.22192 110.36808) (xy 166.14902 110.36808) (xy 166.243 110.2741) - (xy 166.243 110.7059) (xy 166.14902 110.61192) (xy 165.34892 110.61192) (xy 165.22192 110.61192) (xy 164.97808 110.61192) - (xy 164.97808 110.36808) (xy 164.97808 109.44098) (xy 164.8841 109.347) (xy 164.4142 109.34954) (xy 164.26434 109.34954) - (xy 164.12464 109.40542) (xy 164.01796 109.5121) (xy 163.95954 109.6518) (xy 163.957 110.2741) (xy 164.05098 110.36808) - (xy 164.97808 110.36808) (xy 164.97808 110.61192) (xy 164.85108 110.61192) (xy 164.05098 110.61192) (xy 163.957 110.7059) - (xy 163.95954 111.3282) (xy 164.01796 111.4679) (xy 164.12464 111.57458) (xy 164.26434 111.63046) (xy 164.4142 111.63046) - (xy 164.50056 111.63046) (xy 164.23894 111.73968) (xy 164.14242 111.8362) (xy 162.41776 111.8362) (xy 160.78708 110.20552) - (xy 160.401 109.94644) (xy 159.9438 109.855) (xy 156.6164 109.855) (xy 156.4005 109.42574) (xy 156.1592 109.22) - (xy 156.4005 109.0168) (xy 156.61894 108.585) (xy 164.3507 108.585) (xy 164.8079 108.7755) (xy 165.38956 108.7755) - (xy 165.9255 108.55452) (xy 166.33698 108.14304) (xy 166.5605 107.6071) (xy 166.5605 107.02544) (xy 166.33952 106.4895) - (xy 166.18966 106.33964) (xy 166.18966 99.82962) (xy 166.15664 99.4029) (xy 166.05504 99.15144) (xy 165.89248 99.07524) - (xy 165.71976 99.24796) (xy 165.71976 98.90252) (xy 165.64356 98.73996) (xy 165.23462 98.60534) (xy 164.8079 98.63836) - (xy 164.55644 98.73996) (xy 164.48024 98.90252) (xy 165.1 99.52228) (xy 165.71976 98.90252) (xy 165.71976 99.24796) - (xy 165.27272 99.695) (xy 165.89248 100.31476) (xy 166.05504 100.23856) (xy 166.18966 99.82962) (xy 166.18966 106.33964) - (xy 165.92804 106.07802) (xy 165.71976 105.98912) (xy 165.71976 100.48748) (xy 165.1 99.86772) (xy 164.92728 100.04044) - (xy 164.92728 99.695) (xy 164.30752 99.07524) (xy 164.14496 99.15144) (xy 164.01034 99.56038) (xy 164.04336 99.9871) - (xy 164.14496 100.23856) (xy 164.30752 100.31476) (xy 164.92728 99.695) (xy 164.92728 100.04044) (xy 164.48024 100.48748) - (xy 164.55644 100.65004) (xy 164.96538 100.78466) (xy 165.3921 100.75164) (xy 165.64356 100.65004) (xy 165.71976 100.48748) - (xy 165.71976 105.98912) (xy 165.3921 105.8545) (xy 164.81044 105.8545) (xy 164.2745 106.07548) (xy 164.15258 106.1974) - (xy 156.27858 106.1974) (xy 156.21508 105.99928) (xy 155.7655 105.47096) (xy 155.14574 105.156) (xy 154.8384 105.1306) - (xy 154.90444 104.86136) (xy 154.79776 104.17556) (xy 154.43454 103.58374) (xy 153.8732 103.1748) (xy 152.97912 102.52456) - (xy 152.30348 102.362) (xy 152.21966 102.37216) (xy 151.99868 102.22484) (xy 151.54148 102.1334) (xy 151.05126 102.1334) - (xy 150.76678 101.84892) (xy 150.12416 101.58222) (xy 149.43074 101.58222) (xy 148.32838 101.58222) (xy 147.68576 101.84638) - (xy 147.19554 102.3366) (xy 147.07616 102.61854) (xy 146.83486 102.47122) (xy 146.14906 102.362) (xy 145.50898 102.5144) - (xy 143.74876 100.75672) (xy 143.36268 100.49764) (xy 142.90548 100.4062) (xy 133.02996 100.4062) (xy 132.97916 100.28174) - (xy 132.7658 100.06838) (xy 132.72262 100.04806) (xy 132.72262 96.70034) (xy 132.69468 96.19742) (xy 132.55752 95.86468) - (xy 132.37464 95.76308) (xy 132.20192 95.9358) (xy 132.20192 95.59036) (xy 132.10032 95.40748) (xy 131.62534 95.24238) - (xy 131.12242 95.27032) (xy 130.78968 95.40748) (xy 130.68808 95.59036) (xy 131.445 96.34728) (xy 132.20192 95.59036) - (xy 132.20192 95.9358) (xy 131.61772 96.52) (xy 132.37464 97.27692) (xy 132.55752 97.17532) (xy 132.72262 96.70034) - (xy 132.72262 100.04806) (xy 132.4864 99.95154) (xy 132.20192 99.95154) (xy 132.20192 97.44964) (xy 131.445 96.69272) - (xy 131.27228 96.86544) (xy 131.27228 96.52) (xy 130.51536 95.76308) (xy 130.33248 95.86468) (xy 130.16738 96.33966) - (xy 130.19532 96.84258) (xy 130.33248 97.17532) (xy 130.51536 97.27692) (xy 131.27228 96.52) (xy 131.27228 96.86544) - (xy 130.68808 97.44964) (xy 130.78968 97.63252) (xy 131.26466 97.79762) (xy 131.76758 97.76968) (xy 132.10032 97.63252) - (xy 132.20192 97.44964) (xy 132.20192 99.95154) (xy 132.18414 99.95154) (xy 130.40614 99.95154) (xy 130.12674 100.06584) - (xy 129.91338 100.2792) (xy 129.86004 100.4062) (xy 125.73 100.4062) (xy 125.2728 100.49764) (xy 124.88672 100.75672) - (xy 124.34316 101.29774) (xy 124.34316 100.47986) (xy 124.31522 100.02774) (xy 124.19838 99.75088) (xy 124.0282 99.66452) - (xy 123.85548 99.83724) (xy 123.85548 99.4918) (xy 123.76912 99.32162) (xy 123.33986 99.17684) (xy 122.88774 99.20478) - (xy 122.61088 99.32162) (xy 122.52452 99.4918) (xy 123.19 100.15728) (xy 123.85548 99.4918) (xy 123.85548 99.83724) - (xy 123.36272 100.33) (xy 124.0282 100.99548) (xy 124.19838 100.90912) (xy 124.34316 100.47986) (xy 124.34316 101.29774) - (xy 124.23648 101.40442) (xy 124.1044 101.34854) (xy 123.80214 101.34854) (xy 123.74372 101.34854) (xy 123.76912 101.33838) - (xy 123.85548 101.1682) (xy 123.19 100.50272) (xy 123.01728 100.67544) (xy 123.01728 100.33) (xy 122.3518 99.66452) - (xy 122.18162 99.75088) (xy 122.03684 100.18014) (xy 122.06478 100.63226) (xy 122.18162 100.90912) (xy 122.3518 100.99548) - (xy 123.01728 100.33) (xy 123.01728 100.67544) (xy 122.52452 101.1682) (xy 122.61088 101.33838) (xy 122.63882 101.34854) - (xy 122.27814 101.34854) (xy 121.99874 101.46284) (xy 121.78538 101.6762) (xy 121.66854 101.9556) (xy 121.66854 102.25786) - (xy 121.66854 103.78186) (xy 121.78284 104.06126) (xy 121.9962 104.27462) (xy 122.2756 104.39146) (xy 122.57786 104.39146) - (xy 124.10186 104.39146) (xy 124.38126 104.27716) (xy 124.59462 104.0638) (xy 124.60478 104.03332) (xy 124.9172 103.97236) - (xy 125.30328 103.71328) (xy 126.22276 102.7938) (xy 129.8575 102.7938) (xy 129.91084 102.91826) (xy 130.1242 103.13162) - (xy 130.4036 103.24846) (xy 130.70586 103.24846) (xy 132.48386 103.24846) (xy 132.76326 103.13416) (xy 132.97662 102.9208) - (xy 133.02742 102.7938) (xy 142.41018 102.7938) (xy 143.70558 104.08666) (xy 143.65478 104.17302) (xy 143.54556 104.85882) - (xy 143.60906 105.1306) (xy 143.3068 105.156) (xy 142.68704 105.47096) (xy 142.23746 105.99674) (xy 142.17142 106.1974) - (xy 142.1638 106.1974) (xy 141.7066 106.28884) (xy 141.31798 106.54792) (xy 140.12672 107.74172) (xy 139.86764 108.1278) - (xy 139.7762 108.585) (xy 139.7762 120.41378) (xy 139.73302 120.45696) (xy 139.5095 120.9929) (xy 139.5095 121.57456) - (xy 139.73048 122.1105) (xy 139.7762 122.15622) (xy 139.7762 123.3297) (xy 138.5697 124.5362) (xy 133.09346 124.5362) - (xy 133.09346 109.6264) (xy 133.09346 109.32414) (xy 133.09346 107.54614) (xy 132.97916 107.26674) (xy 132.7658 107.05338) - (xy 132.4864 106.93654) (xy 132.18414 106.93654) (xy 130.40614 106.93654) (xy 130.12674 107.05084) (xy 129.91338 107.2642) - (xy 129.79654 107.5436) (xy 129.79654 107.84586) (xy 129.79654 108.5469) (xy 128.41224 109.9312) (xy 124.59462 109.9312) - (xy 124.3838 109.72038) (xy 124.34316 109.7026) (xy 124.34316 108.73486) (xy 124.31522 108.28274) (xy 124.19838 108.00588) - (xy 124.0282 107.91952) (xy 123.85548 108.09224) (xy 123.85548 107.7468) (xy 123.76912 107.57662) (xy 123.33986 107.43184) - (xy 122.88774 107.45978) (xy 122.61088 107.57662) (xy 122.52452 107.7468) (xy 123.19 108.41228) (xy 123.85548 107.7468) - (xy 123.85548 108.09224) (xy 123.36272 108.585) (xy 124.0282 109.25048) (xy 124.19838 109.16412) (xy 124.34316 108.73486) - (xy 124.34316 109.7026) (xy 124.1044 109.60354) (xy 123.80214 109.60354) (xy 123.74372 109.60354) (xy 123.76912 109.59338) - (xy 123.85548 109.4232) (xy 123.19 108.75772) (xy 123.01728 108.93044) (xy 123.01728 108.585) (xy 122.3518 107.91952) - (xy 122.18162 108.00588) (xy 122.03684 108.43514) (xy 122.06478 108.88726) (xy 122.18162 109.16412) (xy 122.3518 109.25048) - (xy 123.01728 108.585) (xy 123.01728 108.93044) (xy 122.52452 109.4232) (xy 122.61088 109.59338) (xy 122.63882 109.60354) - (xy 122.27814 109.60354) (xy 121.99874 109.71784) (xy 121.78538 109.9312) (xy 121.66854 110.2106) (xy 121.66854 110.51286) - (xy 121.66854 112.03686) (xy 121.78284 112.31626) (xy 121.9962 112.52962) (xy 121.9962 114.3) (xy 122.08764 114.7572) - (xy 122.34672 115.14328) (xy 122.97918 115.77828) (xy 122.98172 115.77828) (xy 123.3678 116.03736) (xy 123.52782 116.06784) - (xy 123.63196 116.17198) (xy 124.1679 116.3955) (xy 124.74956 116.3955) (xy 125.2855 116.17452) (xy 125.69698 115.76304) - (xy 125.9205 115.2271) (xy 125.9205 114.64544) (xy 125.69952 114.1095) (xy 125.28804 113.69802) (xy 124.7521 113.4745) - (xy 124.3838 113.4745) (xy 124.3838 112.52962) (xy 124.59462 112.3188) (xy 128.905 112.3188) (xy 129.3622 112.22736) - (xy 129.74828 111.96828) (xy 131.4831 110.23346) (xy 132.48386 110.23346) (xy 132.76326 110.11916) (xy 132.97662 109.9058) - (xy 133.09346 109.6264) (xy 133.09346 124.5362) (xy 130.175 124.5362) (xy 129.7178 124.62764) (xy 129.33172 124.88672) - (xy 128.06172 126.15672) (xy 127.80264 126.5428) (xy 127.7112 127) (xy 127.7112 130.175) (xy 127.80264 130.6322) - (xy 128.06172 131.01828) (xy 128.80594 131.7625) (xy 124.9172 131.7625) (xy 125.55728 131.12496) (xy 125.984 130.0988) - (xy 125.984 128.98628) (xy 125.55982 127.96012) (xy 125.54966 127.94742) (xy 125.54966 122.68962) (xy 125.51664 122.2629) - (xy 125.41504 122.01144) (xy 125.25248 121.93524) (xy 125.07976 122.10796) (xy 125.07976 121.76252) (xy 125.00356 121.59996) - (xy 124.59462 121.46534) (xy 124.1679 121.49836) (xy 123.91644 121.59996) (xy 123.84024 121.76252) (xy 124.46 122.38228) - (xy 125.07976 121.76252) (xy 125.07976 122.10796) (xy 124.63272 122.555) (xy 125.25248 123.17476) (xy 125.41504 123.09856) - (xy 125.54966 122.68962) (xy 125.54966 127.94742) (xy 125.07976 127.47752) (xy 125.07976 123.34748) (xy 124.46 122.72772) - (xy 124.28728 122.90044) (xy 124.28728 122.555) (xy 123.66752 121.93524) (xy 123.50496 122.01144) (xy 123.37034 122.42038) - (xy 123.40336 122.8471) (xy 123.50496 123.09856) (xy 123.66752 123.17476) (xy 124.28728 122.555) (xy 124.28728 122.90044) - (xy 123.84024 123.34748) (xy 123.91644 123.51004) (xy 124.32538 123.64466) (xy 124.7521 123.61164) (xy 125.00356 123.51004) - (xy 125.07976 123.34748) (xy 125.07976 127.47752) (xy 124.77496 127.17272) (xy 123.7488 126.746) (xy 122.63628 126.746) - (xy 121.61012 127.17018) (xy 120.9675 127.81026) (xy 120.9675 95.7072) (xy 121.60504 96.34728) (xy 122.6312 96.774) - (xy 123.74372 96.774) (xy 124.76988 96.34982) (xy 125.55728 95.56496) (xy 125.984 94.5388) (xy 125.984 93.42628) - (xy 125.55982 92.40012) (xy 124.9172 91.7575) (xy 163.37026 91.7575) (xy 162.73272 92.39504) (xy 162.306 93.4212) - (xy 162.306 94.53372) (xy 162.73018 95.55988) (xy 163.51504 96.34728) (xy 164.5412 96.774) (xy 165.65372 96.774) - (xy 166.67988 96.34982) (xy 167.3225 95.7072) (xy 167.3225 127.81026) + (xy 167.3225 127.811617) (xy 166.68474 127.172743) (xy 166.192271 126.968252) (xy 166.192271 123.96054) (xy 166.160996 123.532229) + (xy 166.057258 123.281783) (xy 165.892676 123.206541) (xy 165.718459 123.380758) (xy 165.718459 123.032324) (xy 165.643217 122.867742) + (xy 165.23554 122.732729) (xy 164.807229 122.764004) (xy 164.556783 122.867742) (xy 164.481541 123.032324) (xy 165.1 123.650783) + (xy 165.718459 123.032324) (xy 165.718459 123.380758) (xy 165.274217 123.825) (xy 165.892676 124.443459) (xy 166.057258 124.368217) + (xy 166.192271 123.96054) (xy 166.192271 126.968252) (xy 165.718459 126.771508) (xy 165.718459 124.617676) (xy 165.1 123.999217) + (xy 164.925783 124.173434) (xy 164.925783 123.825) (xy 164.307324 123.206541) (xy 164.142742 123.281783) (xy 164.007729 123.68946) + (xy 164.039004 124.117771) (xy 164.142742 124.368217) (xy 164.307324 124.443459) (xy 164.925783 123.825) (xy 164.925783 124.173434) + (xy 164.481541 124.617676) (xy 164.556783 124.782258) (xy 164.96446 124.917271) (xy 165.392771 124.885996) (xy 165.643217 124.782258) + (xy 165.718459 124.617676) (xy 165.718459 126.771508) (xy 165.658199 126.746486) (xy 164.546677 126.745516) (xy 163.519394 127.169981) + (xy 162.732743 127.95526) (xy 162.306486 128.981801) (xy 162.305516 130.093323) (xy 162.729981 131.120606) (xy 163.370755 131.7625) + (xy 155.040788 131.7625) (xy 155.784144 131.019144) (xy 156.042927 130.631848) (xy 156.042927 130.631847) (xy 156.1338 130.175) + (xy 156.1338 116.23548) (xy 156.042927 115.778633) (xy 156.042927 115.778632) (xy 155.784144 115.391336) (xy 154.780713 114.387905) + (xy 154.957722 113.908101) (xy 154.934257 113.3109) (xy 155.544695 113.13874) (xy 156.089502 112.709248) (xy 156.350837 112.2426) + (xy 159.449312 112.2426) (xy 161.080856 113.874144) (xy 161.468153 114.132927) (xy 161.925 114.2238) (xy 163.9062 114.2238) + (xy 163.9062 115.333059) (xy 163.86257 115.376613) (xy 163.639754 115.913214) (xy 163.639247 116.494237) (xy 163.861126 117.031226) + (xy 164.271613 117.44243) (xy 164.808214 117.665246) (xy 165.389237 117.665753) (xy 165.926226 117.443874) (xy 166.33743 117.033387) + (xy 166.560246 116.496786) (xy 166.560753 115.915763) (xy 166.338874 115.378774) (xy 166.2938 115.333621) (xy 166.2938 113.991665) + (xy 166.391231 113.894404) (xy 166.623735 113.334472) (xy 166.624264 112.728188) (xy 166.392738 112.167851) (xy 165.964404 111.738769) + (xy 165.709683 111.633) (xy 165.786214 111.633) (xy 165.937785 111.633) (xy 166.077819 111.574996) (xy 166.184996 111.46782) + (xy 166.243 111.327786) (xy 166.243 110.70844) (xy 166.243 110.27156) (xy 166.243 109.652214) (xy 166.184996 109.51218) + (xy 166.077819 109.405004) (xy 165.937785 109.347) (xy 165.786214 109.347) (xy 165.31844 109.347) (xy 165.22319 109.44225) + (xy 165.22319 110.36681) (xy 166.14775 110.36681) (xy 166.243 110.27156) (xy 166.243 110.70844) (xy 166.14775 110.61319) + (xy 165.22319 110.61319) (xy 165.22319 110.63319) (xy 164.97681 110.63319) (xy 164.97681 110.61319) (xy 164.97681 110.36681) + (xy 164.97681 109.44225) (xy 164.88156 109.347) (xy 164.413786 109.347) (xy 164.262215 109.347) (xy 164.122181 109.405004) + (xy 164.015004 109.51218) (xy 163.957 109.652214) (xy 163.957 110.27156) (xy 164.05225 110.36681) (xy 164.97681 110.36681) + (xy 164.97681 110.61319) (xy 164.05225 110.61319) (xy 163.957 110.70844) (xy 163.957 111.327786) (xy 164.015004 111.46782) + (xy 164.122181 111.574996) (xy 164.262215 111.633) (xy 164.413786 111.633) (xy 164.490184 111.633) (xy 164.237851 111.737262) + (xy 164.13874 111.8362) (xy 162.419488 111.8362) (xy 160.787944 110.204656) (xy 160.400648 109.945873) (xy 159.9438 109.855) + (xy 156.708227 109.855) (xy 156.66335 109.695875) (xy 156.272432 109.2) (xy 156.66335 108.704125) (xy 156.696946 108.585) + (xy 164.35005 108.585) (xy 164.808214 108.775246) (xy 165.389237 108.775753) (xy 165.926226 108.553874) (xy 166.33743 108.143387) + (xy 166.560246 107.606786) (xy 166.560753 107.025763) (xy 166.338874 106.488774) (xy 166.192271 106.341914) (xy 166.192271 99.83054) + (xy 166.160996 99.402229) (xy 166.057258 99.151783) (xy 165.892676 99.076541) (xy 165.718459 99.250758) (xy 165.718459 98.902324) + (xy 165.643217 98.737742) (xy 165.23554 98.602729) (xy 164.807229 98.634004) (xy 164.556783 98.737742) (xy 164.481541 98.902324) + (xy 165.1 99.520783) (xy 165.718459 98.902324) (xy 165.718459 99.250758) (xy 165.274217 99.695) (xy 165.892676 100.313459) + (xy 166.057258 100.238217) (xy 166.192271 99.83054) (xy 166.192271 106.341914) (xy 165.928387 106.07757) (xy 165.718459 105.9904) + (xy 165.718459 100.487676) (xy 165.1 99.869217) (xy 164.925783 100.043434) (xy 164.925783 99.695) (xy 164.307324 99.076541) + (xy 164.142742 99.151783) (xy 164.007729 99.55946) (xy 164.039004 99.987771) (xy 164.142742 100.238217) (xy 164.307324 100.313459) + (xy 164.925783 99.695) (xy 164.925783 100.043434) (xy 164.481541 100.487676) (xy 164.556783 100.652258) (xy 164.96446 100.787271) + (xy 165.392771 100.755996) (xy 165.643217 100.652258) (xy 165.718459 100.487676) (xy 165.718459 105.9904) (xy 165.391786 105.854754) + (xy 164.810763 105.854247) (xy 164.273774 106.076126) (xy 164.152288 106.1974) (xy 156.373238 106.1974) (xy 156.089502 105.690752) + (xy 155.544695 105.26126) (xy 154.934257 105.089099) (xy 154.957722 104.491899) (xy 154.717607 103.841037) (xy 154.246695 103.331607) + (xy 153.352271 102.681769) (xy 152.722255 102.391327) (xy 152.218734 102.371543) (xy 152.218733 102.371543) (xy 151.998328 102.224273) + (xy 151.54148 102.1334) (xy 151.165771 102.1334) (xy 151.110021 102.049964) (xy 150.533196 101.664542) (xy 149.852785 101.5292) + (xy 148.747215 101.5292) (xy 148.066804 101.664542) (xy 147.489979 102.049964) (xy 147.13985 102.573968) (xy 146.570951 102.364091) + (xy 145.877744 102.391328) (xy 145.540546 102.546778) (xy 143.749624 100.755856) (xy 143.362328 100.497073) (xy 142.90548 100.4062) + (xy 133.03253 100.4062) (xy 132.979992 100.279362) (xy 132.765638 100.065008) (xy 132.727151 100.049066) (xy 132.727151 96.701126) + (xy 132.698867 96.196681) (xy 132.560239 95.862003) (xy 132.375891 95.763326) (xy 132.201674 95.937543) (xy 132.201674 95.589109) + (xy 132.102997 95.404761) (xy 131.626126 95.237849) (xy 131.121681 95.266133) (xy 130.787003 95.404761) (xy 130.688326 95.589109) + (xy 131.445 96.345783) (xy 132.201674 95.589109) (xy 132.201674 95.937543) (xy 131.619217 96.52) (xy 132.375891 97.276674) + (xy 132.560239 97.177997) (xy 132.727151 96.701126) (xy 132.727151 100.049066) (xy 132.485571 99.949) (xy 132.201674 99.949) + (xy 132.201674 97.450891) (xy 131.445 96.694217) (xy 131.270783 96.868434) (xy 131.270783 96.52) (xy 130.514109 95.763326) + (xy 130.329761 95.862003) (xy 130.162849 96.338874) (xy 130.191133 96.843319) (xy 130.329761 97.177997) (xy 130.514109 97.276674) + (xy 131.270783 96.52) (xy 131.270783 96.868434) (xy 130.688326 97.450891) (xy 130.787003 97.635239) (xy 131.263874 97.802151) + (xy 131.768319 97.773867) (xy 132.102997 97.635239) (xy 132.201674 97.450891) (xy 132.201674 99.949) (xy 132.182429 99.949) + (xy 130.404429 99.949) (xy 130.124362 100.065008) (xy 129.910008 100.279362) (xy 129.857469 100.4062) (xy 125.73 100.4062) + (xy 125.273152 100.497073) (xy 124.885856 100.755856) (xy 124.345603 101.296108) (xy 124.345603 100.480745) (xy 124.315325 100.02704) + (xy 124.19995 99.7485) (xy 124.028783 99.665433) (xy 123.854567 99.839649) (xy 123.854567 99.491217) (xy 123.7715 99.32005) + (xy 123.340745 99.174397) (xy 122.88704 99.204675) (xy 122.6085 99.32005) (xy 122.525433 99.491217) (xy 123.19 100.155783) + (xy 123.854567 99.491217) (xy 123.854567 99.839649) (xy 123.364217 100.33) (xy 124.028783 100.994567) (xy 124.19995 100.9115) + (xy 124.345603 100.480745) (xy 124.345603 101.296108) (xy 124.239435 101.402276) (xy 124.103571 101.346) (xy 123.800429 101.346) + (xy 123.756894 101.346) (xy 123.7715 101.33995) (xy 123.854567 101.168783) (xy 123.19 100.504217) (xy 123.015783 100.678433) + (xy 123.015783 100.33) (xy 122.351217 99.665433) (xy 122.18005 99.7485) (xy 122.034397 100.179255) (xy 122.064675 100.63296) + (xy 122.18005 100.9115) (xy 122.351217 100.994567) (xy 123.015783 100.33) (xy 123.015783 100.678433) (xy 122.525433 101.168783) + (xy 122.6085 101.33995) (xy 122.626392 101.346) (xy 122.276429 101.346) (xy 121.996362 101.462008) (xy 121.782008 101.676362) + (xy 121.666 101.956429) (xy 121.666 102.259571) (xy 121.666 103.783571) (xy 121.782008 104.063638) (xy 121.996362 104.277992) + (xy 122.276429 104.394) (xy 122.579571 104.394) (xy 124.103571 104.394) (xy 124.383638 104.277992) (xy 124.597992 104.063638) + (xy 124.610309 104.033901) (xy 124.916847 103.972927) (xy 124.916848 103.972927) (xy 125.304144 103.714144) (xy 126.224488 102.7938) + (xy 129.857469 102.7938) (xy 129.910008 102.920638) (xy 130.124362 103.134992) (xy 130.404429 103.251) (xy 130.707571 103.251) + (xy 132.485571 103.251) (xy 132.765638 103.134992) (xy 132.979992 102.920638) (xy 133.03253 102.7938) (xy 142.410992 102.7938) + (xy 143.768082 104.15089) (xy 143.642278 104.4919) (xy 143.665741 105.089099) (xy 143.055305 105.261261) (xy 142.510498 105.690752) + (xy 142.226761 106.1974) (xy 142.1638 106.1974) (xy 141.706952 106.288273) (xy 141.319656 106.547056) (xy 140.125856 107.740856) + (xy 139.867073 108.128152) (xy 139.7762 108.585) (xy 139.7762 120.413059) (xy 139.73257 120.456613) (xy 139.509754 120.993214) + (xy 139.509247 121.574237) (xy 139.731126 122.111226) (xy 139.7762 122.156378) (xy 139.7762 123.330512) (xy 138.570512 124.5362) + (xy 133.096 124.5362) (xy 133.096 109.625571) (xy 133.096 109.322429) (xy 133.096 107.544429) (xy 132.979992 107.264362) + (xy 132.765638 107.050008) (xy 132.485571 106.934) (xy 132.182429 106.934) (xy 130.404429 106.934) (xy 130.124362 107.050008) + (xy 129.910008 107.264362) (xy 129.794 107.544429) (xy 129.794 107.847571) (xy 129.794 108.547712) (xy 128.410512 109.9312) + (xy 124.59783 109.9312) (xy 124.383638 109.717008) (xy 124.345603 109.701253) (xy 124.345603 108.735745) (xy 124.315325 108.28204) + (xy 124.19995 108.0035) (xy 124.028783 107.920433) (xy 123.854567 108.094649) (xy 123.854567 107.746217) (xy 123.7715 107.57505) + (xy 123.340745 107.429397) (xy 122.88704 107.459675) (xy 122.6085 107.57505) (xy 122.525433 107.746217) (xy 123.19 108.410783) + (xy 123.854567 107.746217) (xy 123.854567 108.094649) (xy 123.364217 108.585) (xy 124.028783 109.249567) (xy 124.19995 109.1665) + (xy 124.345603 108.735745) (xy 124.345603 109.701253) (xy 124.103571 109.601) (xy 123.800429 109.601) (xy 123.756894 109.601) + (xy 123.7715 109.59495) (xy 123.854567 109.423783) (xy 123.19 108.759217) (xy 123.015783 108.933433) (xy 123.015783 108.585) + (xy 122.351217 107.920433) (xy 122.18005 108.0035) (xy 122.034397 108.434255) (xy 122.064675 108.88796) (xy 122.18005 109.1665) + (xy 122.351217 109.249567) (xy 123.015783 108.585) (xy 123.015783 108.933433) (xy 122.525433 109.423783) (xy 122.6085 109.59495) + (xy 122.626392 109.601) (xy 122.276429 109.601) (xy 121.996362 109.717008) (xy 121.782008 109.931362) (xy 121.666 110.211429) + (xy 121.666 110.514571) (xy 121.666 112.038571) (xy 121.782008 112.318638) (xy 121.9962 112.53283) (xy 121.9962 114.3) + (xy 122.087073 114.756848) (xy 122.345856 115.144144) (xy 122.980856 115.779144) (xy 123.368153 116.037927) (xy 123.529353 116.069991) + (xy 123.631613 116.17243) (xy 124.168214 116.395246) (xy 124.749237 116.395753) (xy 125.286226 116.173874) (xy 125.69743 115.763387) + (xy 125.920246 115.226786) (xy 125.920753 114.645763) (xy 125.698874 114.108774) (xy 125.288387 113.69757) (xy 124.751786 113.474754) + (xy 124.3838 113.474432) (xy 124.3838 112.53283) (xy 124.59783 112.3188) (xy 128.905 112.3188) (xy 129.361847 112.227927) + (xy 129.361848 112.227927) (xy 129.749144 111.969144) (xy 131.482288 110.236) (xy 132.485571 110.236) (xy 132.765638 110.119992) + (xy 132.979992 109.905638) (xy 133.096 109.625571) (xy 133.096 124.5362) (xy 130.175 124.5362) (xy 129.718152 124.627073) + (xy 129.330856 124.885856) (xy 128.060856 126.155856) (xy 127.802073 126.543152) (xy 127.7112 127) (xy 127.7112 130.175) + (xy 127.802073 130.631848) (xy 128.060856 131.019144) (xy 128.804212 131.7625) (xy 124.918382 131.7625) (xy 125.557257 131.12474) + (xy 125.983514 130.098199) (xy 125.984484 128.986677) (xy 125.560019 127.959394) (xy 125.552271 127.951632) (xy 125.552271 122.69054) + (xy 125.520996 122.262229) (xy 125.417258 122.011783) (xy 125.252676 121.936541) (xy 125.078459 122.110758) (xy 125.078459 121.762324) + (xy 125.003217 121.597742) (xy 124.59554 121.462729) (xy 124.167229 121.494004) (xy 123.916783 121.597742) (xy 123.841541 121.762324) + (xy 124.46 122.380783) (xy 125.078459 121.762324) (xy 125.078459 122.110758) (xy 124.634217 122.555) (xy 125.252676 123.173459) + (xy 125.417258 123.098217) (xy 125.552271 122.69054) (xy 125.552271 127.951632) (xy 125.078459 127.476992) (xy 125.078459 123.347676) + (xy 124.46 122.729217) (xy 124.285783 122.903434) (xy 124.285783 122.555) (xy 123.667324 121.936541) (xy 123.502742 122.011783) + (xy 123.367729 122.41946) (xy 123.399004 122.847771) (xy 123.502742 123.098217) (xy 123.667324 123.173459) (xy 124.285783 122.555) + (xy 124.285783 122.903434) (xy 123.841541 123.347676) (xy 123.916783 123.512258) (xy 124.32446 123.647271) (xy 124.752771 123.615996) + (xy 125.003217 123.512258) (xy 125.078459 123.347676) (xy 125.078459 127.476992) (xy 124.77474 127.172743) (xy 123.748199 126.746486) + (xy 122.636677 126.745516) (xy 121.609394 127.169981) (xy 120.9675 127.810755) (xy 120.9675 95.708382) (xy 121.60526 96.347257) + (xy 122.631801 96.773514) (xy 123.743323 96.774484) (xy 124.770606 96.350019) (xy 125.557257 95.56474) (xy 125.983514 94.538199) + (xy 125.984484 93.426677) (xy 125.560019 92.399394) (xy 124.919244 91.7575) (xy 163.371617 91.7575) (xy 162.732743 92.39526) + (xy 162.306486 93.421801) (xy 162.305516 94.533323) (xy 162.729981 95.560606) (xy 163.51526 96.347257) (xy 164.541801 96.773514) + (xy 165.653323 96.774484) (xy 166.680606 96.350019) (xy 167.3225 95.709244) (xy 167.3225 127.811617) ) ) ) diff --git a/demos/ecc83/ecc83-pp_v2.pro b/demos/ecc83/ecc83-pp_v2.pro index 18ef6e2d49..7df1e8ce03 100644 --- a/demos/ecc83/ecc83-pp_v2.pro +++ b/demos/ecc83/ecc83-pp_v2.pro @@ -1,5 +1,5 @@ -update=11/12/2006-20:37:39 -last_client=pcbnew +update=04/07/2014 20:10:13 +last_client=kicad [general] version=1 RootSch=ecc83-pp.sch @@ -65,65 +65,21 @@ LibName24=siliconi LibName25=contrib [pcbnew] version=1 -PadDrlX=760 -PadDimH=1100 -PadDimV=550 -PadForm=1 -PadMask=14745599 -ViaDiam=450 -ViaDril=250 -Isol=60 -Countlayer=2 -Lpiste=340 -RouteTo=15 -RouteBo=0 -TypeVia=3 -Segm45=1 -Racc45=1 -Unite=0 -SegFill=1 -SegAffG=0 -NewAffG=1 -PadFill=1 -PadAffG=1 -PadSNum=1 -ModAffC=0 -ModAffT=0 -PcbAffT=0 -SgPcb45=1 -TxtPcbV=800 -TxtPcbH=600 -TxtModV=600 -TxtModH=600 -TxtModW=120 -HPGLnum=1 -HPGdiam=15 -HPGLSpd=20 -HPGLrec=2 -HPGLorg=0 -GERBmin=15 -VEgarde=100 -DrawLar=150 -EdgeLar=150 -TxtLar=120 -MSegLar=150 -ForPlot=1 -WpenSer=10 -UserGrX=0,01 -UserGrY=0,01 -UserGrU=1 -DivGrPc=1 -TimeOut=600 -MaxLnkS=3 -ShowRat=0 -ShowMRa=1 -[pcbnew/libraries] -LibDir= -LibName1=supports -LibName2=valves -LibName3=connect -LibName4=discret -LibName5=pin_array -LibName6=divers -LibName7=libcms -LibName8=display +PageLayoutDescrFile= +LastNetListRead=ecc83-pp_v2.net +UseCmpFile=0 +PadDrill=1.9304 +PadDrillOvalY=1.9304 +PadSizeH=2.794 +PadSizeV=1.397 +PcbTextSizeV=2.032 +PcbTextSizeH=1.524 +PcbTextThickness=0.3048 +ModuleTextSizeV=1.524 +ModuleTextSizeH=1.524 +ModuleTextSizeThickness=0.3048 +SolderMaskClearance=0.254 +SolderMaskMinWidth=0 +DrawSegmentWidth=0.381 +BoardOutlineThickness=0.381 +ModuleOutlineThickness=0.381 diff --git a/demos/ecc83/ecc83-pp_v2.sch b/demos/ecc83/ecc83-pp_v2.sch index d6309b780d..9ba475786f 100644 --- a/demos/ecc83/ecc83-pp_v2.sch +++ b/demos/ecc83/ecc83-pp_v2.sch @@ -1,8 +1,34 @@ EESchema Schematic File Version 2 -LIBS:power,device,valves,conn,linear,regul,74xx,cmos4000,adc-dac,memory,xilinx,special,microcontrollers,microchip,analog_switches,motorola,intel,audio,interface,digital-audio,philips,display,cypress,siliconi,contrib -EELAYER 23 0 +LIBS:power +LIBS:device +LIBS:valves +LIBS:conn +LIBS:linear +LIBS:regul +LIBS:74xx +LIBS:cmos4000 +LIBS:adc-dac +LIBS:memory +LIBS:xilinx +LIBS:special +LIBS:microcontrollers +LIBS:microchip +LIBS:analog_switches +LIBS:motorola +LIBS:intel +LIBS:audio +LIBS:interface +LIBS:digital-audio +LIBS:philips +LIBS:display +LIBS:cypress +LIBS:siliconi +LIBS:contrib +LIBS:ecc83-pp_v2-cache +EELAYER 24 0 EELAYER END -$Descr A4 11700 8267 +$Descr A4 11693 8268 +encoding utf-8 Sheet 1 1 Title "ECC Push-Pull" Date "11 dec 2006" @@ -23,9 +49,9 @@ Wire Wire Line Wire Wire Line 4450 4450 4650 4450 Wire Wire Line - 9850 6350 9950 6350 + 1900 6750 2000 6750 Wire Wire Line - 9950 6350 9950 6150 + 2000 6750 2000 6550 Wire Wire Line 4150 5300 4150 5000 Wire Wire Line @@ -56,15 +82,15 @@ Wire Wire Line Wire Wire Line 6700 4800 6700 5400 Wire Wire Line - 10050 6150 10050 6350 + 2100 6550 2100 6750 Wire Wire Line - 10050 6250 9850 6250 -Connection ~ 10050 6250 + 2100 6650 1900 6650 +Connection ~ 2100 6650 Wire Wire Line 4100 5250 4150 5250 Connection ~ 4150 5250 Wire Wire Line - 9850 6250 9850 6150 + 1900 6650 1900 6550 Wire Wire Line 6300 3900 4950 3900 Wire Wire Line @@ -76,20 +102,22 @@ Wire Wire Line $Comp L ECC83 U1 U 3 1 48B4F266 -P 9950 5700 -F 0 "U1" H 10080 6010 50 0000 C C -F 1 "ECC81_83" H 10300 5400 50 0000 C C -F 2 "VALVE-NOVAL_P" H 10220 5300 50 0001 C C - 3 9950 5700 +P 2000 6100 +F 0 "U1" H 2130 6410 50 0000 C CNN +F 1 "ECC83" H 2350 5800 50 0000 C CNN +F 2 "ECC-83-1" H 2450 5650 50 0000 C CNN +F 3 "" H 2000 6100 60 0001 C CNN + 3 2000 6100 1 0 0 -1 $EndComp $Comp L ECC83 U1 U 2 1 48B4F263 P 4950 4450 -F 0 "U1" H 5080 4760 50 0000 C C -F 1 "ECC83" H 5150 4100 50 0000 C C -F 2 "VALVE-NOVAL_P" H 5220 4050 50 0001 C C +F 0 "U1" H 5080 4760 50 0000 C CNN +F 1 "ECC83" H 5150 4100 50 0000 C CNN +F 2 "ECC-83-1" H 5150 4000 50 0000 C CNN +F 3 "" H 4950 4450 60 0001 C CNN 2 4950 4450 1 0 0 -1 $EndComp @@ -97,9 +125,10 @@ $Comp L ECC83 U1 U 1 1 48B4F256 P 5750 4450 -F 0 "U1" H 5880 4760 50 0000 C C -F 1 "ECC83" H 5500 4150 50 0000 C C -F 2 "VALVE-NOVAL_P" H 6020 4050 50 0001 C C +F 0 "U1" H 5880 4760 50 0000 C CNN +F 1 "ECC83" H 5500 4150 50 0000 C CNN +F 2 "ECC-83-1" H 5750 3950 50 0000 C CNN +F 3 "" H 5750 4450 60 0001 C CNN 1 5750 4450 -1 0 0 -1 $EndComp @@ -107,8 +136,10 @@ $Comp L GND #PWR01 U 1 1 457DBAF8 P 6950 5150 -F 0 "#PWR01" H 6950 5150 30 0001 C C -F 1 "GND" H 6950 5080 30 0001 C C +F 0 "#PWR01" H 6950 5150 30 0001 C CNN +F 1 "GND" H 6950 5080 30 0001 C CNN +F 2 "" H 6950 5150 60 0001 C CNN +F 3 "" H 6950 5150 60 0001 C CNN 1 6950 5150 1 0 0 -1 $EndComp @@ -116,8 +147,10 @@ $Comp L GND #PWR02 U 1 1 457DBAF5 P 6700 5900 -F 0 "#PWR02" H 6700 5900 30 0001 C C -F 1 "GND" H 6700 5830 30 0001 C C +F 0 "#PWR02" H 6700 5900 30 0001 C CNN +F 1 "GND" H 6700 5830 30 0001 C CNN +F 2 "" H 6700 5900 60 0001 C CNN +F 3 "" H 6700 5900 60 0001 C CNN 1 6700 5900 1 0 0 -1 $EndComp @@ -125,8 +158,10 @@ $Comp L GND #PWR03 U 1 1 457DBAF1 P 4850 5900 -F 0 "#PWR03" H 4850 5900 30 0001 C C -F 1 "GND" H 4850 5830 30 0001 C C +F 0 "#PWR03" H 4850 5900 30 0001 C CNN +F 1 "GND" H 4850 5830 30 0001 C CNN +F 2 "" H 4850 5900 60 0001 C CNN +F 3 "" H 4850 5900 60 0001 C CNN 1 4850 5900 1 0 0 -1 $EndComp @@ -134,8 +169,10 @@ $Comp L GND #PWR04 U 1 1 457DBAEF P 4450 5900 -F 0 "#PWR04" H 4450 5900 30 0001 C C -F 1 "GND" H 4450 5830 30 0001 C C +F 0 "#PWR04" H 4450 5900 30 0001 C CNN +F 1 "GND" H 4450 5830 30 0001 C CNN +F 2 "" H 4450 5900 60 0001 C CNN +F 3 "" H 4450 5900 60 0001 C CNN 1 4450 5900 1 0 0 -1 $EndComp @@ -143,26 +180,32 @@ $Comp L PWR_FLAG #FLG05 U 1 1 457DBAC0 P 4100 5250 -F 0 "#FLG05" H 4100 5520 30 0001 C C -F 1 "PWR_FLAG" H 4100 5480 30 0000 C C +F 0 "#FLG05" H 4100 5520 30 0001 C CNN +F 1 "PWR_FLAG" H 4100 5480 30 0000 C CNN +F 2 "" H 4100 5250 60 0001 C CNN +F 3 "" H 4100 5250 60 0001 C CNN 1 4100 5250 0 -1 -1 0 $EndComp $Comp L CONN_2 P4 U 1 1 456A8ACC -P 9950 6700 -F 0 "P4" V 9900 6700 40 0000 C C -F 1 "CONN_2" V 10000 6700 40 0000 C C - 1 9950 6700 +P 2000 7100 +F 0 "P4" V 1950 7100 40 0000 C CNN +F 1 "CONN_2" V 2050 7100 40 0000 C CNN +F 2 "BORNIER2" V 2150 7100 60 0000 C CNN +F 3 "" H 2000 7100 60 0001 C CNN + 1 2000 7100 0 1 1 0 $EndComp $Comp L C C1 U 1 1 4549F4BE P 6700 4050 -F 0 "C1" H 6750 4150 50 0000 L C -F 1 "10uF" H 6450 4150 50 0000 L C +F 0 "C1" H 6750 4150 50 0000 L CNN +F 1 "10uF" H 6450 4150 50 0000 L CNN +F 2 "C2V10" H 6700 4050 60 0000 C CNN +F 3 "" H 6700 4050 60 0001 C CNN 1 6700 4050 1 0 0 -1 $EndComp @@ -170,8 +213,10 @@ $Comp L GND #PWR06 U 1 1 4549F4B9 P 4150 5300 -F 0 "#PWR06" H 4150 5300 30 0001 C C -F 1 "GND" H 4150 5230 30 0001 C C +F 0 "#PWR06" H 4150 5300 30 0001 C CNN +F 1 "GND" H 4150 5230 30 0001 C CNN +F 2 "" H 4150 5300 60 0001 C CNN +F 3 "" H 4150 5300 60 0001 C CNN 1 4150 5300 1 0 0 -1 $EndComp @@ -179,8 +224,10 @@ $Comp L GND #PWR07 U 1 1 4549F4B3 P 6950 4350 -F 0 "#PWR07" H 6950 4350 30 0001 C C -F 1 "GND" H 6950 4280 30 0001 C C +F 0 "#PWR07" H 6950 4350 30 0001 C CNN +F 1 "GND" H 6950 4280 30 0001 C CNN +F 2 "" H 6950 4350 60 0001 C CNN +F 3 "" H 6950 4350 60 0001 C CNN 1 6950 4350 1 0 0 -1 $EndComp @@ -188,8 +235,10 @@ $Comp L CONN_2 P3 U 1 1 4549F4A5 P 7300 3950 -F 0 "P3" V 7250 3950 40 0000 C C -F 1 "POWER" V 7350 3950 40 0000 C C +F 0 "P3" V 7250 3950 40 0000 C CNN +F 1 "POWER" V 7350 3950 40 0000 C CNN +F 2 "BORNIER2" H 7300 4150 60 0000 C CNN +F 3 "" H 7300 3950 60 0001 C CNN 1 7300 3950 1 0 0 -1 $EndComp @@ -197,8 +246,10 @@ $Comp L CONN_2 P2 U 1 1 4549F46C P 7300 4900 -F 0 "P2" V 7250 4900 40 0000 C C -F 1 "OUT" V 7350 4900 40 0000 C C +F 0 "P2" V 7250 4900 40 0000 C CNN +F 1 "OUT" V 7350 4900 40 0000 C CNN +F 2 "BORNIER2" H 7300 5100 60 0000 C CNN +F 3 "" H 7300 4900 60 0001 C CNN 1 7300 4900 1 0 0 -1 $EndComp @@ -206,8 +257,10 @@ $Comp L CONN_2 P1 U 1 1 4549F464 P 3800 4900 -F 0 "P1" V 3750 4900 40 0000 C C -F 1 "IN" V 3850 4900 40 0000 C C +F 0 "P1" V 3750 4900 40 0000 C CNN +F 1 "IN" V 3850 4900 40 0000 C CNN +F 2 "BORNIER2" H 3750 4700 60 0000 C CNN +F 3 "" H 3800 4900 60 0001 C CNN 1 3800 4900 -1 0 0 1 $EndComp @@ -215,8 +268,10 @@ $Comp L C C2 U 1 1 4549F3BE P 6500 4800 -F 0 "C2" H 6550 4900 50 0000 L C -F 1 "680nF" H 6550 4700 50 0000 L C +F 0 "C2" H 6550 4900 50 0000 L CNN +F 1 "680nF" H 6550 4700 50 0000 L CNN +F 2 "CP8" H 6400 4900 60 0000 C CNN +F 3 "" H 6500 4800 60 0001 C CNN 1 6500 4800 0 1 1 0 $EndComp @@ -224,8 +279,10 @@ $Comp L R R3 U 1 1 4549F3AD P 6700 5650 -F 0 "R3" V 6780 5650 50 0000 C C -F 1 "100K" V 6700 5650 50 0000 C C +F 0 "R3" V 6780 5650 50 0000 C CNN +F 1 "100K" V 6700 5650 50 0000 C CNN +F 2 "R3" H 6700 5650 60 0000 C CNN +F 3 "" H 6700 5650 60 0001 C CNN 1 6700 5650 1 0 0 -1 $EndComp @@ -233,8 +290,10 @@ $Comp L R R4 U 1 1 4549F3A2 P 4450 5650 -F 0 "R4" V 4530 5650 50 0000 C C -F 1 "47K" V 4450 5650 50 0000 C C +F 0 "R4" V 4530 5650 50 0000 C CNN +F 1 "47K" V 4450 5650 50 0000 C CNN +F 2 "R3" V 4350 5650 60 0000 C CNN +F 3 "" H 4450 5650 60 0001 C CNN 1 4450 5650 1 0 0 -1 $EndComp @@ -242,8 +301,10 @@ $Comp L R R2 U 1 1 4549F39D P 4850 5650 -F 0 "R2" V 4930 5650 50 0000 C C -F 1 "1.5K" V 4850 5650 50 0000 C C +F 0 "R2" V 4930 5650 50 0000 C CNN +F 1 "1.5K" V 4850 5650 50 0000 C CNN +F 2 "R3" V 4756 5656 60 0000 C CNN +F 3 "" H 4850 5650 60 0001 C CNN 1 4850 5650 1 0 0 -1 $EndComp @@ -251,8 +312,10 @@ $Comp L R R1 U 1 1 4549F38A P 6300 4250 -F 0 "R1" V 6380 4250 50 0000 C C -F 1 "1.5K" V 6300 4250 50 0000 C C +F 0 "R1" V 6380 4250 50 0000 C CNN +F 1 "1.5K" V 6300 4250 50 0000 C CNN +F 2 "R3" H 6400 4150 60 0000 C CNN +F 3 "" H 6300 4250 60 0001 C CNN 1 6300 4250 1 0 0 -1 $EndComp diff --git a/demos/flat_hierarchy/flat_hierarchy-cache.lib b/demos/flat_hierarchy/flat_hierarchy-cache.lib deleted file mode 100644 index a021e177a6..0000000000 --- a/demos/flat_hierarchy/flat_hierarchy-cache.lib +++ /dev/null @@ -1,541 +0,0 @@ -EESchema-LIBRARY Version 2.3 Date: 02/12/2009 10:29:38 -# -# 24C16 -# -DEF 24C16 U 0 30 Y Y 1 F N -F0 "U" 150 350 60 H V C CNN -F1 "24C16" 200 -350 60 H V C CNN -ALIAS 24C512 -DRAW -X GND 4 0 -300 0 U 60 60 0 0 W N -X VCC 8 0 300 0 D 60 60 0 0 W N -S -400 -300 400 300 0 1 0 N -X A0 1 -700 200 300 R 60 60 1 1 I -X A1 2 -700 100 300 R 60 60 1 1 I -X A2 3 -700 0 300 R 60 60 1 1 I -X SDA 5 700 -200 300 L 60 60 1 1 B -X SCL 6 700 -100 300 L 60 60 1 1 I -X WP 7 700 100 300 L 60 60 1 1 I -ENDDRAW -ENDDEF -# -# 74LS125 -# -DEF 74LS125 U 0 30 Y Y 4 F N -F0 "U" 0 100 50 H V L BNN -F1 "74LS125" 50 -150 40 H V L TNN -DRAW -X GND 7 -150 -150 0 U 50 30 0 0 W N -X VCC 14 -150 150 0 D 50 30 0 0 W N -X E 1 0 -300 220 U 50 30 1 0 I I -X E 4 0 -300 220 U 50 30 2 0 I I -X E 10 0 -300 220 U 50 30 3 0 I I -X E 13 0 -300 220 U 50 30 4 0 I I -P 4 0 1 0 -150 150 -150 -150 150 0 -150 150 N -X D 2 -450 0 300 R 50 30 1 1 I -X O 3 450 0 300 L 50 30 1 1 T -X D 5 -450 0 300 R 50 30 2 1 I -X O 6 450 0 300 L 50 30 2 1 T -X O 8 450 0 300 L 50 30 3 1 T -X D 9 -450 0 300 R 50 30 3 1 I -X O 11 450 0 300 L 50 30 4 1 T -X D 12 -450 0 300 R 50 30 4 1 I -ENDDRAW -ENDDEF -# -# 7805 -# -DEF 7805 U 0 30 N Y 1 F N -F0 "U" 150 -196 60 H V C CNN -F1 "7805" 0 200 60 H V C CNN -ALIAS LM7805 LM7812 78L05 -DRAW -S -200 -150 200 150 0 1 0 N -X VI VI -400 50 200 R 40 40 1 1 I -X VO VO 400 50 200 L 40 40 1 1 w -X GND GND 0 -250 100 U 40 40 1 1 I -ENDDRAW -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 -$FPLIST - SM* - C? - C1-1 -$ENDFPLIST -DRAW -P 2 0 1 10 -100 -30 100 -30 N -P 2 0 1 10 -100 30 100 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 -ENDDEF -# -# CONN_2 -# -DEF CONN_2 P 0 40 Y N 1 F N -F0 "P" -50 0 40 V V C CNN -F1 "CONN_2" 50 0 40 V V C CNN -DRAW -S -100 150 100 -150 0 1 0 N -X P1 1 -350 100 250 R 60 60 1 1 P I -X PM 2 -350 -100 250 R 60 60 1 1 P I -ENDDRAW -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 -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 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 -ENDDRAW -ENDDEF -# -# DB9 -# -DEF DB9 J 0 40 Y N 1 F N -F0 "J" 0 550 70 H V C CNN -F1 "DB9" 0 -550 70 H V C CNN -$FPLIST - DB9* -$ENDFPLIST -DRAW -C -70 -400 30 0 1 0 N -C -70 -200 30 0 1 0 N -C -70 0 30 0 1 0 N -C -70 200 30 0 1 0 N -C -70 400 30 0 1 0 N -C 50 -300 30 0 1 0 N -C 50 -100 30 0 1 0 N -C 50 100 30 0 1 0 N -C 50 300 30 0 1 0 N -P 2 0 1 8 -150 -460 -150 460 N -P 2 0 1 8 -150 -459 -140 -470 N -P 2 0 1 0 -150 -400 -100 -400 N -P 2 0 1 0 -150 -300 20 -300 N -P 2 0 1 0 -150 -200 -100 -200 N -P 2 0 1 0 -150 -100 20 -100 N -P 2 0 1 0 -150 0 -100 0 N -P 2 0 1 0 -150 100 20 100 N -P 2 0 1 0 -150 200 -100 200 N -P 2 0 1 0 -150 300 20 300 N -P 2 0 1 0 -150 400 -100 400 N -P 2 0 1 8 -140 -470 -110 -490 N -P 2 0 1 8 -140 470 -150 460 N -P 2 0 1 8 -140 470 -100 490 N -P 2 0 1 8 -110 -490 -50 -490 N -P 2 0 1 8 -100 490 -70 490 N -P 2 0 1 8 129 390 -70 490 N -P 2 0 1 8 129 390 150 370 N -P 2 0 1 8 140 -409 -50 -490 N -P 2 0 1 8 150 -390 140 -409 N -P 2 0 1 8 150 370 150 -390 N -X 1 1 -450 -400 300 R 60 60 1 1 P -X 2 2 -450 -200 300 R 60 60 1 1 P -X 3 3 -450 0 300 R 60 60 1 1 P -X 4 4 -450 200 300 R 60 60 1 1 P -X 5 5 -450 400 300 R 60 60 1 1 P -X P6 6 -450 -300 300 R 60 60 1 1 P -X P7 7 -450 -100 300 R 60 60 1 1 P -X P8 8 -450 100 300 R 60 60 1 1 P -X P9 9 -450 300 300 R 60 60 1 1 P -ENDDRAW -ENDDEF -# -# DIODE -# -DEF DIODE D 0 40 N N 1 F N -F0 "D" 0 100 40 H V C CNN -F1 "DIODE" 0 -100 40 H V C CNN -$FPLIST - D? - S* -$ENDFPLIST -DRAW -P 2 0 1 6 50 50 50 -50 N -P 3 0 1 0 -50 50 50 0 -50 -50 F -X A 1 -200 0 150 R 40 40 1 1 P -X K 2 200 0 150 L 40 40 1 1 P -ENDDRAW -ENDDEF -# -# DIODESCH -# -DEF DIODESCH D 0 40 N N 1 F N -F0 "D" 0 100 40 H V C CNN -F1 "DIODESCH" 0 -100 40 H V C CNN -$FPLIST - D? - S* -$ENDFPLIST -DRAW -P 3 0 1 0 -50 50 50 0 -50 -50 F -P 6 0 1 8 75 25 75 50 50 50 50 -50 25 -50 25 -25 N -X A 1 -200 0 150 R 40 40 1 1 P -X K 2 200 0 150 L 40 40 1 1 P -ENDDRAW -ENDDEF -# -# GND -# -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 -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 -ENDDRAW -ENDDEF -# -# INDUCTOR -# -DEF INDUCTOR L 0 40 N N 0 F N -F0 "L" -50 0 40 V V C CNN -F1 "INDUCTOR" 100 0 40 V V C CNN -DRAW -A 0 -150 50 -889 889 0 1 0 N 1 -199 1 -100 -A 0 -49 51 -889 889 0 1 0 N 1 -99 1 2 -A 0 51 51 -889 889 0 1 0 N 1 1 1 102 -A 0 148 48 -889 889 0 1 0 N 1 101 1 196 -X 1 1 0 300 100 D 70 70 1 1 P -X 2 2 0 -300 100 U 70 70 1 1 P -ENDDRAW -ENDDEF -# -# JUMPER -# -DEF JUMPER JP 0 30 Y N 1 F N -F0 "JP" 0 150 60 H V C CNN -F1 "JUMPER" 0 -80 40 H V C CNN -DRAW -A 0 -26 125 1426 373 0 1 0 N -98 50 99 50 -C -100 0 35 0 1 0 N -C 100 0 35 0 1 0 N -X 1 1 -300 0 165 R 60 60 0 1 P -X 2 2 300 0 165 L 60 60 0 1 P -ENDDRAW -ENDDEF -# -# LED -# -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 -$FPLIST - LED-3MM - LED-5MM - LED-10MM - LED-0603 - LED-0805 - LED-1206 - LEDV -$ENDFPLIST -DRAW -P 2 0 1 0 50 50 50 -50 N -P 3 0 1 0 -50 50 50 0 -50 -50 F -P 3 0 1 0 65 -40 110 -80 105 -55 N -P 3 0 1 0 80 -25 125 -65 120 -40 N -X A 1 -200 0 150 R 40 40 1 1 P -X K 2 200 0 150 L 40 40 1 1 P -ENDDRAW -ENDDEF -# -# LT1372 -# -DEF LT1372 U 0 30 Y Y 1 F N -F0 "U" 600 500 60 H V C CNN -F1 "LT1372" -500 500 60 H V C CNN -ALIAS LT1373 -DRAW -S -700 -400 700 400 0 1 0 N -X Vc 1 250 -700 300 U 60 60 1 1 I -X FB+ 2 1000 -250 300 L 60 60 1 1 I -X FB- 3 -1000 250 300 R 60 60 1 1 P -X S/S 4 -1000 -250 300 R 60 60 1 1 P -X Vin 5 0 700 300 D 60 60 1 1 W -X GND_S 6 -150 -700 300 U 60 60 1 1 I -X GND 7 -300 -700 300 U 60 60 1 1 I -X Vsw 8 1000 250 300 L 60 60 1 1 I -ENDDRAW -ENDDEF -# -# NPN -# -DEF NPN Q 0 0 Y Y 0 F N -F0 "Q" 0 -150 50 H V R CNN -F1 "NPN" 0 150 50 H V R CNN -DRAW -C 50 0 111 0 1 10 N -P 2 0 1 0 0 0 100 100 N -P 3 0 1 10 0 75 0 -75 0 -75 N -P 3 0 1 0 50 -50 0 0 0 0 N -P 3 0 1 0 90 -90 100 -100 100 -100 N -P 5 0 1 0 90 -90 70 -30 30 -70 90 -90 90 -90 F -X E 1 100 -200 100 U 40 40 1 1 P -X B 2 -200 0 200 R 40 40 1 1 I -X C 3 100 200 100 D 40 40 1 1 P -ENDDRAW -ENDDEF -# -# PIC12C508A -# -DEF PIC12C508A U 0 40 Y Y 1 F N -F0 "U" 0 700 60 H V C CNN -F1 "PIC12C508A" 0 -650 60 H V C CNN -ALIAS PIC12C509A -DRAW -S 400 -600 -450 650 0 1 0 N -X VDD 1 -750 500 300 R 50 50 1 1 W -X GP5/OSC1 2 -750 200 300 R 50 50 1 1 I -X GP4/OSC2 3 -750 -200 300 R 50 50 1 1 I -X GP3/MCLR 4 -750 -500 300 R 50 50 1 1 I -X GP2 5 700 -500 300 L 50 50 1 1 I -X GP1 6 700 -200 300 L 50 50 1 1 I -X GP0 7 700 200 300 L 50 50 1 1 I -X VSS 8 700 500 300 L 50 50 1 1 W -X VDD 1 -750 500 300 R 50 50 1 2 W -X GP5/OSC1 2 -750 200 300 R 50 50 1 2 I -X GP4/OSC2 3 -750 -200 300 R 50 50 1 2 I -X GP3/MCLR 4 -750 -500 300 R 50 50 1 2 I -X GP2 5 700 -500 300 L 50 50 1 2 I -X GP1 6 700 -200 300 L 50 50 1 2 I -X GP0 7 700 200 300 L 50 50 1 2 I -X VSS 8 700 500 300 L 50 50 1 2 W -ENDDRAW -ENDDEF -# -# PIC16F54 -# -DEF PIC16F54 U? 0 40 Y Y 1 F N -F0 "U?" 0 -750 60 H V C CNN -F1 "PIC16F54" 0 800 60 H V C CNN -DRAW -S -500 700 450 -700 0 1 0 N -X RA2 1 -800 600 300 R 50 50 1 1 B -X RA3 2 -800 450 300 R 50 50 1 1 B -X T0ckl 3 -800 300 300 R 50 50 1 1 O -X MCLR 4 -800 150 300 R 50 50 1 1 I -X VSS 5 -800 0 300 R 50 50 1 1 W -X RB0 6 -800 -150 300 R 50 50 1 1 B -X RB1 7 -800 -300 300 R 50 50 1 1 B -X RB2 8 -800 -450 300 R 50 50 1 1 B -X RB3 9 -800 -600 300 R 50 50 1 1 B -X RB4 10 750 -600 300 L 50 50 1 1 B -X RB5 11 750 -450 300 L 50 50 1 1 B -X ICSPC/RB6 12 750 -300 300 L 50 50 1 1 B -X ICSPD/RB7 13 750 -150 300 L 50 50 1 1 B -X VDD 14 750 0 300 L 50 50 1 1 W -X OSC2/CLKO 15 750 150 300 L 50 50 1 1 O -X OSC1/CLKI 16 750 300 300 L 50 50 1 1 I -X RA0 17 750 450 300 L 50 50 1 1 B -X RA1 18 750 600 300 L 50 50 1 1 B -X RA2 1 -800 600 300 R 50 50 1 2 B -X RA3 2 -800 450 300 R 50 50 1 2 B -X T0ckl 3 -800 300 300 R 50 50 1 2 O -X MCLR 4 -800 150 300 R 50 50 1 2 I -X VSS 5 -800 0 300 R 50 50 1 2 W -X RB0 6 -800 -150 300 R 50 50 1 2 B -X RB1 7 -800 -300 300 R 50 50 1 2 B -X RB2 8 -800 -450 300 R 50 50 1 2 B -X RB3 9 -800 -600 300 R 50 50 1 2 B -X RB4 10 750 -600 300 L 50 50 1 2 B -X RB5 11 750 -450 300 L 50 50 1 2 B -X ICSPC/RB6 12 750 -300 300 L 50 50 1 2 B -X ICSPD/RB7 13 750 -150 300 L 50 50 1 2 B -X VDD 14 750 0 300 L 50 50 1 2 W -X OSC2/CLKO 15 750 150 300 L 50 50 1 2 O -X OSC1/CLKI 16 750 300 300 L 50 50 1 2 I -X RA0 17 750 450 300 L 50 50 1 2 B -X RA1 18 750 600 300 L 50 50 1 2 B -ENDDRAW -ENDDEF -# -# PNP -# -DEF PNP Q 0 0 Y Y 0 F N -F0 "Q" 0 -150 60 H V R CNN -F1 "PNP" 0 150 60 H V R CNN -DRAW -C 50 0 111 0 1 10 N -P 2 0 1 0 0 0 100 100 N -P 3 0 1 10 0 75 0 -75 0 -75 F -P 3 0 1 0 25 -25 0 0 0 0 N -P 3 0 1 0 100 -100 65 -65 65 -65 N -P 5 0 1 0 25 -25 50 -75 75 -50 25 -25 25 -25 F -X E 1 100 -200 100 U 40 40 1 1 P -X B 2 -200 0 200 R 40 40 1 1 I -X C 3 100 200 100 D 40 40 1 1 P -ENDDRAW -ENDDEF -# -# POT -# -DEF POT RV 0 40 Y N 0 F N -F0 "RV" 0 -100 50 H V C CNN -F1 "POT" 0 0 50 H V C CNN -DRAW -S -150 50 150 -50 0 1 0 N -P 3 0 1 0 0 50 -20 70 20 70 F -X 1 1 -250 0 100 R 40 40 1 1 P -X 2 2 0 150 80 D 40 40 1 1 P -X 3 3 250 0 100 L 40 40 1 1 P -ENDDRAW -ENDDEF -# -# PWR_FLAG -# -DEF PWR_FLAG #FLG 0 0 N N 1 F P -F0 "#FLG" 0 270 30 H I C CNN -F1 "PWR_FLAG" 0 230 30 H V C CNN -DRAW -X pwr 1 0 0 0 U 20 20 0 0 w -P 3 0 1 0 0 0 0 100 0 100 N -P 5 0 1 0 0 100 -100 150 0 200 100 150 0 100 N -ENDDRAW -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 -$FPLIST - R? - SM0603 - SM0805 - R?-* -$ENDFPLIST -DRAW -S -40 150 40 -150 0 1 12 N -X ~ 1 0 250 100 D 60 60 1 1 P -X ~ 2 0 -250 100 U 60 60 1 1 P -ENDDRAW -ENDDEF -# -# SUPP28 -# -DEF SUPP28 J 0 40 Y Y 1 F N -F0 "J" 0 100 70 H V C CNN -F1 "SUPP28" 0 -100 70 H V C CNN -DRAW -S -300 -750 300 750 0 1 0 N -X 1 1 -600 650 300 R 60 60 1 1 P -X 2 2 -600 550 300 R 60 60 1 1 P -X 3 3 -600 450 300 R 60 60 1 1 P -X 4 4 -600 350 300 R 60 60 1 1 P -X 5 5 -600 250 300 R 60 60 1 1 P -X 6 6 -600 150 300 R 60 60 1 1 P -X 7 7 -600 50 300 R 60 60 1 1 P -X 8 8 -600 -50 300 R 60 60 1 1 P -X 9 9 -600 -150 300 R 60 60 1 1 P -X 10 10 -600 -250 300 R 60 60 1 1 P -X 20 20 600 -150 300 L 60 60 1 1 P -X 11 11 -600 -350 300 R 60 60 1 1 P -X 21 21 600 -50 300 L 60 60 1 1 P -X 12 12 -600 -450 300 R 60 60 1 1 P -X 22 22 600 50 300 L 60 60 1 1 P -X 13 13 -600 -550 300 R 60 60 1 1 P -X 23 23 600 150 300 L 60 60 1 1 P -X 14 14 -600 -650 300 R 60 60 1 1 P -X 24 24 600 250 300 L 60 60 1 1 P -X 15 15 600 -650 300 L 60 60 1 1 P -X 25 25 600 350 300 L 60 60 1 1 P -X 16 16 600 -550 300 L 60 60 1 1 P -X 26 26 600 450 300 L 60 60 1 1 P -X 17 17 600 -450 300 L 60 60 1 1 P -X 27 27 600 550 300 L 60 60 1 1 P -X 18 18 600 -350 300 L 60 60 1 1 P -X 28 28 600 650 300 L 60 60 1 1 P -X 19 19 600 -250 300 L 60 60 1 1 P -ENDDRAW -ENDDEF -# -# SUPP40 -# -DEF SUPP40 P 0 40 Y Y 1 F N -F0 "P" 0 1100 70 H V C CNN -F1 "SUPP40" 0 -1100 70 H V C CNN -DRAW -S -300 -1050 300 1050 0 1 0 N -X 1 1 -600 950 300 R 60 60 1 1 P -X 2 2 -600 850 300 R 60 60 1 1 P -X 3 3 -600 750 300 R 60 60 1 1 P -X 4 4 -600 650 300 R 60 60 1 1 P -X 5 5 -600 550 300 R 60 60 1 1 P -X 6 6 -600 450 300 R 60 60 1 1 P -X 7 7 -600 350 300 R 60 60 1 1 P -X 8 8 -600 250 300 R 60 60 1 1 P -X 9 9 -600 150 300 R 60 60 1 1 P -X 10 10 -600 50 300 R 60 60 1 1 P -X 20 20 -600 -950 300 R 60 60 1 1 P -X 30 30 600 -50 300 L 60 60 1 1 P -X 40 40 600 950 300 L 60 60 1 1 P -X 11 11 -600 -50 300 R 60 60 1 1 P -X 21 21 600 -950 300 L 60 60 1 1 P -X 31 31 600 50 300 L 60 60 1 1 P -X 12 12 -600 -150 300 R 60 60 1 1 P -X 22 22 600 -850 300 L 60 60 1 1 P -X 32 32 600 150 300 L 60 60 1 1 P -X 13 13 -600 -250 300 R 60 60 1 1 P -X 23 23 600 -750 300 L 60 60 1 1 P -X 33 33 600 250 300 L 60 60 1 1 P -X 14 14 -600 -350 300 R 60 60 1 1 P -X 24 24 600 -650 300 L 60 60 1 1 P -X 34 34 600 350 300 L 60 60 1 1 P -X 15 15 -600 -450 300 R 60 60 1 1 P -X 25 25 600 -550 300 L 60 60 1 1 P -X 35 35 600 450 300 L 60 60 1 1 P -X 16 16 -600 -550 300 R 60 60 1 1 P -X 26 26 600 -450 300 L 60 60 1 1 P -X 36 36 600 550 300 L 60 60 1 1 P -X 17 17 -600 -650 300 R 60 60 1 1 P -X 27 27 600 -350 300 L 60 60 1 1 P -X 37 37 600 650 300 L 60 60 1 1 P -X 18 18 -600 -750 300 R 60 60 1 1 P -X 28 28 600 -250 300 L 60 60 1 1 P -X 38 38 600 750 300 L 60 60 1 1 P -X 19 19 -600 -850 300 R 60 60 1 1 P -X 29 29 600 -150 300 L 60 60 1 1 P -X 39 39 600 850 300 L 60 60 1 1 P -ENDDRAW -ENDDEF -# -# VCC -# -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 -DRAW -X VCC 1 0 0 0 U 20 20 0 0 W N -C 0 50 20 0 1 0 N -P 3 0 1 0 0 0 0 30 0 30 N -ENDDRAW -ENDDEF -# -# VPP -# -DEF VPP #PWR 0 0 Y Y 1 F N -F0 "#PWR" 0 200 40 H I C CNN -F1 "VPP" 0 150 40 H V C CNN -DRAW -X VPP 1 0 0 0 U 40 40 0 0 W N -C 0 80 20 0 1 0 N -P 2 0 1 0 0 60 0 0 N -ENDDRAW -ENDDEF -# -#End Library diff --git a/demos/flat_hierarchy/flat_hierarchy.kicad_pcb b/demos/flat_hierarchy/flat_hierarchy.kicad_pcb index b6017202bc..a1343c8db0 100644 --- a/demos/flat_hierarchy/flat_hierarchy.kicad_pcb +++ b/demos/flat_hierarchy/flat_hierarchy.kicad_pcb @@ -1,38 +1,38 @@ -(kicad_pcb (version 3) (host pcbnew "(2013-01-12 BZR 3902)-testing") +(kicad_pcb (version 4) (host pcbnew "(2014-07-02 BZR 4969)-product") (general (links 132) (no_connects 0) - (area 56.743599 37.083999 238.184266 145.1356) + (area 56.743599 40.0558 233.870501 139.890501) (thickness 1.6) (drawings 24) (tracks 355) (zones 0) - (modules 68) + (modules 64) (nets 36) ) (page A4) - (title_block + (title_block (title "SERIAL PIC PROGRAMMER") ) (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) - (25 Cmts.User user) - (26 Eco1.User user) - (27 Eco2.User user) - (28 Contours.Ci user) + (0 Composant signal) + (31 Cuivre signal) + (32 B.Adhes user) + (33 F.Adhes user) + (34 B.Paste user) + (35 F.Paste user) + (36 B.SilkS user) + (37 F.SilkS user) + (38 B.Mask user) + (39 F.Mask user) + (40 Dwgs.User user) + (41 Cmts.User user) + (42 Eco1.User user) + (43 Eco2.User user) + (44 Edge.Cuts user) ) (setup @@ -63,14 +63,13 @@ (aux_axis_origin 62.23 153.67) (visible_elements 7FFFFFFF) (pcbplotparams - (layerselection 3178497) - (usegerberextensions true) - (excludeedgelayer true) - (linewidth 60) + (layerselection 0x00030_80000001) + (excludeedgelayer false) + (linewidth 0.150000) (plotframeref false) (viasonmask false) (mode 1) - (useauxorigin false) + (useauxorigin true) (hpglpennumber 1) (hpglpenspeed 20) (hpglpendiameter 15) @@ -79,13 +78,12 @@ (psa4output false) (plotreference true) (plotvalue true) - (plotothertext true) (plotinvisibletext false) (padsonsilk false) (subtractmaskfromsilk false) (outputformat 1) (mirror false) - (drillshape 1) + (drillshape 0) (scaleselection 1) (outputdirectory "")) ) @@ -134,7 +132,6 @@ (via_drill 0.635) (uvia_dia 0.508) (uvia_drill 0.127) - (add_net "") (add_net /pic_programmer/CTS) (add_net /pic_programmer/PC-DATA-OUT) (add_net /pic_programmer/RTS) @@ -177,21 +174,17 @@ (descr "Inductor (vertical)") (tags INDUCTOR) (path /48553E53/442A57BE) - (fp_text reference L1 (at 0.508 2.032 270) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.2032))) + (fp_text reference L1 (at 0.508 2.032 270) (layer F.SilkS) + (effects (font (thickness 0.2032))) ) - (fp_text value 22uH (at 0.254 -2.032 270) (layer Dessus.SilkS) + (fp_text value 22uH (at 0.254 -2.032 270) (layer F.SilkS) (effects (font (size 1.27 1.27) (thickness 0.2032))) ) - (fp_circle (center 0 0) (end 3.81 0) (layer Dessus.SilkS) (width 0.381)) - (pad 1 thru_hole rect (at -2.54 0 270) (size 1.905 1.905) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 19 N-000022) - ) - (pad 2 thru_hole circle (at 2.54 0 270) (size 1.905 1.905) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 34 VCC) - ) + (fp_circle (center 0 0) (end 3.81 0) (layer F.SilkS) (width 0.381)) + (pad 1 thru_hole rect (at -2.54 0 270) (size 1.905 1.905) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 19 N-000022)) + (pad 2 thru_hole circle (at 2.54 0 270) (size 1.905 1.905) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 34 VCC)) (model discret/inductorV.wrl (at (xyz 0 0 0)) (scale (xyz 2 2 2)) @@ -204,75 +197,47 @@ (descr "Module Dil 14 pins, pads elliptiques") (tags DIL) (path /48553E53/442A4D6B) - (fp_text reference U2 (at -5.08 -1.27) (layer Dessus.SilkS) + (fp_text reference U2 (at -5.08 -1.27) (layer F.SilkS) (effects (font (size 1.524 1.143) (thickness 0.3048))) ) - (fp_text value 74HC125 (at 1.27 1.27) (layer Dessus.SilkS) + (fp_text value 74HC125 (at 1.27 1.27) (layer F.SilkS) (effects (font (size 1.524 1.143) (thickness 0.3048))) ) - (fp_line (start -10.16 -2.54) (end 10.16 -2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 10.16 2.54) (end -10.16 2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -10.16 2.54) (end -10.16 -2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -10.16 -1.27) (end -8.89 -1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -8.89 -1.27) (end -8.89 1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -8.89 1.27) (end -10.16 1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 10.16 -2.54) (end 10.16 2.54) (layer Dessus.SilkS) (width 0.381)) - (pad 1 thru_hole rect (at -7.62 3.81) (size 1.5748 2.286) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) - ) - (pad 2 thru_hole oval (at -5.08 3.81) (size 1.5748 2.286) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 29 N-000032) - ) - (pad 3 thru_hole oval (at -2.54 3.81) (size 1.5748 2.286) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 12 N-000011) - ) - (pad 4 thru_hole oval (at 0 3.81) (size 1.5748 2.286) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) - ) - (pad 5 thru_hole oval (at 2.54 3.81) (size 1.5748 2.286) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 33 N-000038) - ) - (pad 6 thru_hole oval (at 5.08 3.81) (size 1.5748 2.286) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 10 N-000009) - ) - (pad 7 thru_hole oval (at 7.62 3.81) (size 1.5748 2.286) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) - ) - (pad 8 thru_hole oval (at 7.62 -3.81) (size 1.5748 2.286) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 11 N-000010) - ) - (pad 9 thru_hole oval (at 5.08 -3.81) (size 1.5748 2.286) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 32 N-000036) - ) - (pad 10 thru_hole oval (at 2.54 -3.81) (size 1.5748 2.286) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) - ) - (pad 11 thru_hole oval (at 0 -3.81) (size 1.5748 2.286) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 1 /pic_programmer/CTS) - ) - (pad 12 thru_hole oval (at -2.54 -3.81) (size 1.5748 2.286) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 6 /sockets/DATA-RB7) - ) - (pad 13 thru_hole oval (at -5.08 -3.81) (size 1.5748 2.286) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) - ) - (pad 14 thru_hole oval (at -7.62 -3.81) (size 1.5748 2.286) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 34 VCC) - ) + (fp_line (start -10.16 -2.54) (end 10.16 -2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 10.16 2.54) (end -10.16 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start -10.16 2.54) (end -10.16 -2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start -10.16 -1.27) (end -8.89 -1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -8.89 -1.27) (end -8.89 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -8.89 1.27) (end -10.16 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start 10.16 -2.54) (end 10.16 2.54) (layer F.SilkS) (width 0.381)) + (pad 1 thru_hole rect (at -7.62 3.81) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) + (pad 2 thru_hole oval (at -5.08 3.81) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 29 N-000032)) + (pad 3 thru_hole oval (at -2.54 3.81) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 12 N-000011)) + (pad 4 thru_hole oval (at 0 3.81) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) + (pad 5 thru_hole oval (at 2.54 3.81) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 33 N-000038)) + (pad 6 thru_hole oval (at 5.08 3.81) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 10 N-000009)) + (pad 7 thru_hole oval (at 7.62 3.81) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) + (pad 8 thru_hole oval (at 7.62 -3.81) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 11 N-000010)) + (pad 9 thru_hole oval (at 5.08 -3.81) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 32 N-000036)) + (pad 10 thru_hole oval (at 2.54 -3.81) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) + (pad 11 thru_hole oval (at 0 -3.81) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 1 /pic_programmer/CTS)) + (pad 12 thru_hole oval (at -2.54 -3.81) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 6 /sockets/DATA-RB7)) + (pad 13 thru_hole oval (at -5.08 -3.81) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) + (pad 14 thru_hole oval (at -7.62 -3.81) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 34 VCC)) (model dil/dil_14.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -284,78 +249,42 @@ (at 211.455 118.11 270) (descr "Module Dil 18 pins, pads elliptiques") (path /48553E7C/442A81A7) - (fp_text reference U5 (at -7.62 -1.27 270) (layer Dessus.SilkS) + (fp_text reference U5 (at -7.62 -1.27 270) (layer F.SilkS) (effects (font (size 1.778 1.143) (thickness 0.3048))) ) - (fp_text value PIC_18_PINS (at 1.524 1.016 270) (layer Dessus.SilkS) + (fp_text value PIC_18_PINS (at 1.524 1.016 270) (layer F.SilkS) (effects (font (size 1.778 1.143) (thickness 0.3048))) ) - (fp_line (start -12.7 -1.27) (end -11.43 -1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -11.43 -1.27) (end -11.43 1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -11.43 1.27) (end -12.7 1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -12.7 -2.54) (end 12.7 -2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 12.7 -2.54) (end 12.7 2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 12.7 2.54) (end -12.7 2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -12.7 2.54) (end -12.7 -2.54) (layer Dessus.SilkS) (width 0.381)) - (pad 1 thru_hole rect (at -10.16 3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 2 thru_hole oval (at -7.62 3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 3 thru_hole oval (at -5.08 3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 4 thru_hole oval (at -2.54 3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 8 /sockets/VPP-MCLR) - ) - (pad 5 thru_hole oval (at 0 3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) - ) - (pad 6 thru_hole oval (at 2.54 3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 7 thru_hole oval (at 5.08 3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 8 thru_hole oval (at 7.62 3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 9 thru_hole oval (at 10.16 3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 10 thru_hole oval (at 10.16 -3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 11 thru_hole oval (at 7.62 -3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 12 thru_hole oval (at 5.08 -3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 5 /sockets/CLOCK-RB6) - ) - (pad 13 thru_hole oval (at 2.54 -3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 6 /sockets/DATA-RB7) - ) - (pad 14 thru_hole oval (at 0 -3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 7 /sockets/VCC_PIC) - ) - (pad 15 thru_hole oval (at -2.54 -3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 16 thru_hole oval (at -5.08 -3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 17 thru_hole oval (at -7.62 -3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 18 thru_hole oval (at -10.16 -3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) + (fp_line (start -12.7 -1.27) (end -11.43 -1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -11.43 -1.27) (end -11.43 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -11.43 1.27) (end -12.7 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -12.7 -2.54) (end 12.7 -2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 12.7 -2.54) (end 12.7 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 12.7 2.54) (end -12.7 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start -12.7 2.54) (end -12.7 -2.54) (layer F.SilkS) (width 0.381)) + (pad 1 thru_hole rect (at -10.16 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 2 thru_hole oval (at -7.62 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 3 thru_hole oval (at -5.08 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 4 thru_hole oval (at -2.54 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 8 /sockets/VPP-MCLR)) + (pad 5 thru_hole oval (at 0 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) + (pad 6 thru_hole oval (at 2.54 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 7 thru_hole oval (at 5.08 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 8 thru_hole oval (at 7.62 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 9 thru_hole oval (at 10.16 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 10 thru_hole oval (at 10.16 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 11 thru_hole oval (at 7.62 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 12 thru_hole oval (at 5.08 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 5 /sockets/CLOCK-RB6)) + (pad 13 thru_hole oval (at 2.54 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 6 /sockets/DATA-RB7)) + (pad 14 thru_hole oval (at 0 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 7 /sockets/VCC_PIC)) + (pad 15 thru_hole oval (at -2.54 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 16 thru_hole oval (at -5.08 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 17 thru_hole oval (at -7.62 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 18 thru_hole oval (at -10.16 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) (model dil/dil_18.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -368,50 +297,34 @@ (descr "Module Dil 8 pins, pads elliptiques") (tags DIL) (path /48553E7C/442A87F7) - (fp_text reference U1 (at -6.35 0 360) (layer Dessus.SilkS) + (fp_text reference U1 (at -6.35 0 360) (layer F.SilkS) (effects (font (size 1.778 1.143) (thickness 0.3048))) ) - (fp_text value 24Cxx (at 0 0 270) (layer Dessus.SilkS) + (fp_text value 24Cxx (at 0 0 270) (layer F.SilkS) (effects (font (size 1.778 1.016) (thickness 0.3048))) ) - (fp_line (start -5.08 -1.27) (end -3.81 -1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -3.81 1.27) (end -5.08 1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -5.08 -2.54) (end 5.08 -2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 5.08 -2.54) (end 5.08 2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -5.08 2.54) (end -5.08 -2.54) (layer Dessus.SilkS) (width 0.381)) - (pad 1 thru_hole rect (at -3.81 3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) - ) - (pad 2 thru_hole oval (at -1.27 3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) - ) - (pad 3 thru_hole oval (at 1.27 3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) - ) - (pad 4 thru_hole oval (at 3.81 3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) - ) - (pad 5 thru_hole oval (at 3.81 -3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 6 /sockets/DATA-RB7) - ) - (pad 6 thru_hole oval (at 1.27 -3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 5 /sockets/CLOCK-RB6) - ) - (pad 7 thru_hole oval (at -1.27 -3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 8 thru_hole oval (at -3.81 -3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 34 VCC) - ) + (fp_line (start -5.08 -1.27) (end -3.81 -1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -3.81 1.27) (end -5.08 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -5.08 -2.54) (end 5.08 -2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 5.08 -2.54) (end 5.08 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start -5.08 2.54) (end -5.08 -2.54) (layer F.SilkS) (width 0.381)) + (pad 1 thru_hole rect (at -3.81 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) + (pad 2 thru_hole oval (at -1.27 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) + (pad 3 thru_hole oval (at 1.27 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) + (pad 4 thru_hole oval (at 3.81 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) + (pad 5 thru_hole oval (at 3.81 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 6 /sockets/DATA-RB7)) + (pad 6 thru_hole oval (at 1.27 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 5 /sockets/CLOCK-RB6)) + (pad 7 thru_hole oval (at -1.27 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 8 thru_hole oval (at -3.81 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 34 VCC)) (model dil/dil_8.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -424,49 +337,33 @@ (descr "Module Dil 8 pins, pads elliptiques") (tags DIL) (path /48553E53/442A5E20) - (fp_text reference U4 (at -6.35 0 360) (layer Dessus.SilkS) + (fp_text reference U4 (at -6.35 0 360) (layer F.SilkS) (effects (font (size 1.27 1.143) (thickness 0.3048))) ) - (fp_text value LT1373 (at 0 0 270) (layer Dessus.SilkS) + (fp_text value LT1373 (at 0 0 270) (layer F.SilkS) (effects (font (size 1.778 1.016) (thickness 0.3048))) ) - (fp_line (start -5.08 -1.27) (end -3.81 -1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -3.81 1.27) (end -5.08 1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -5.08 -2.54) (end 5.08 -2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 5.08 -2.54) (end 5.08 2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -5.08 2.54) (end -5.08 -2.54) (layer Dessus.SilkS) (width 0.381)) - (pad 1 thru_hole rect (at -3.81 3.81 270) (size 1.5748 2.286) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 18 N-000021) - ) - (pad 2 thru_hole oval (at -1.27 3.81 270) (size 1.5748 2.286) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 22 N-000025) - ) - (pad 3 thru_hole oval (at 1.27 3.81 270) (size 1.5748 2.286) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 4 thru_hole oval (at 3.81 3.81 270) (size 1.5748 2.286) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 5 thru_hole oval (at 3.81 -3.81 270) (size 1.5748 2.286) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 34 VCC) - ) - (pad 6 thru_hole oval (at 1.27 -3.81 270) (size 1.5748 2.286) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) - ) - (pad 7 thru_hole oval (at -1.27 -3.81 270) (size 1.5748 2.286) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) - ) - (pad 8 thru_hole oval (at -3.81 -3.81 270) (size 1.5748 2.286) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 19 N-000022) - ) + (fp_line (start -5.08 -1.27) (end -3.81 -1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -3.81 1.27) (end -5.08 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -5.08 -2.54) (end 5.08 -2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 5.08 -2.54) (end 5.08 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start -5.08 2.54) (end -5.08 -2.54) (layer F.SilkS) (width 0.381)) + (pad 1 thru_hole rect (at -3.81 3.81 270) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 18 N-000021)) + (pad 2 thru_hole oval (at -1.27 3.81 270) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 22 N-000025)) + (pad 3 thru_hole oval (at 1.27 3.81 270) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 4 thru_hole oval (at 3.81 3.81 270) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 5 thru_hole oval (at 3.81 -3.81 270) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 34 VCC)) + (pad 6 thru_hole oval (at 1.27 -3.81 270) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) + (pad 7 thru_hole oval (at -1.27 -3.81 270) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) + (pad 8 thru_hole oval (at -3.81 -3.81 270) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 19 N-000022)) (model dil/dil_8.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -479,48 +376,32 @@ (descr "Module Dil 8 pins, pads elliptiques") (tags DIL) (path /48553E7C/442A81A5) - (fp_text reference U6 (at -6.35 0 360) (layer Dessus.SilkS) + (fp_text reference U6 (at -6.35 0 360) (layer F.SilkS) (effects (font (size 1.778 1.143) (thickness 0.3048))) ) - (fp_text value PIC_8_PINS (at 0 0 270) (layer Dessus.SilkS) + (fp_text value PIC_8_PINS (at 0 0 270) (layer F.SilkS) (effects (font (size 1.778 1.016) (thickness 0.3048))) ) - (fp_line (start -5.08 -1.27) (end -3.81 -1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -3.81 1.27) (end -5.08 1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -5.08 -2.54) (end 5.08 -2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 5.08 -2.54) (end 5.08 2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -5.08 2.54) (end -5.08 -2.54) (layer Dessus.SilkS) (width 0.381)) - (pad 1 thru_hole rect (at -3.81 3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 7 /sockets/VCC_PIC) - ) - (pad 2 thru_hole oval (at -1.27 3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 3 thru_hole oval (at 1.27 3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 4 thru_hole oval (at 3.81 3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 8 /sockets/VPP-MCLR) - ) - (pad 5 thru_hole oval (at 3.81 -3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 6 thru_hole oval (at 1.27 -3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 5 /sockets/CLOCK-RB6) - ) - (pad 7 thru_hole oval (at -1.27 -3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 6 /sockets/DATA-RB7) - ) - (pad 8 thru_hole oval (at -3.81 -3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) - ) + (fp_line (start -5.08 -1.27) (end -3.81 -1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -3.81 1.27) (end -5.08 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -5.08 -2.54) (end 5.08 -2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 5.08 -2.54) (end 5.08 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start -5.08 2.54) (end -5.08 -2.54) (layer F.SilkS) (width 0.381)) + (pad 1 thru_hole rect (at -3.81 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 7 /sockets/VCC_PIC)) + (pad 2 thru_hole oval (at -1.27 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 3 thru_hole oval (at 1.27 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 4 thru_hole oval (at 3.81 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 8 /sockets/VPP-MCLR)) + (pad 5 thru_hole oval (at 3.81 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 6 thru_hole oval (at 1.27 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 5 /sockets/CLOCK-RB6)) + (pad 7 thru_hole oval (at -1.27 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 6 /sockets/DATA-RB7)) + (pad 8 thru_hole oval (at -3.81 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) (model dil/dil_8.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -533,109 +414,53 @@ (descr "Module Dil 28 pins, pads elliptiques, e=300 mils") (tags DIL) (path /48553E7C/4436967E) - (fp_text reference P2 (at -11.43 0 270) (layer Dessus.SilkS) + (fp_text reference P2 (at -11.43 0 270) (layer F.SilkS) (effects (font (size 1.524 1.143) (thickness 0.3048))) ) - (fp_text value SUPP28 (at 6.985 0 270) (layer Dessus.SilkS) + (fp_text value SUPP28 (at 6.985 0 270) (layer F.SilkS) (effects (font (size 1.524 1.143) (thickness 0.3048))) ) - (fp_line (start -19.05 -2.54) (end 19.05 -2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 19.05 -2.54) (end 19.05 2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 19.05 2.54) (end -19.05 2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -19.05 2.54) (end -19.05 -2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -19.05 -1.27) (end -17.78 -1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -17.78 -1.27) (end -17.78 1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -17.78 1.27) (end -19.05 1.27) (layer Dessus.SilkS) (width 0.381)) - (pad 2 thru_hole oval (at -13.97 3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 3 thru_hole oval (at -11.43 3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 4 thru_hole oval (at -8.89 3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 5 thru_hole oval (at -6.35 3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 6 thru_hole oval (at -3.81 3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 7 thru_hole oval (at -1.27 3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 8 thru_hole oval (at 1.27 3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) - ) - (pad 9 thru_hole oval (at 3.81 3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 10 thru_hole oval (at 6.35 3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 11 thru_hole oval (at 8.89 3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 12 thru_hole oval (at 11.43 3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 13 thru_hole oval (at 13.97 3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 14 thru_hole oval (at 16.51 3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 1 thru_hole rect (at -16.51 3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 8 /sockets/VPP-MCLR) - ) - (pad 15 thru_hole oval (at 16.51 -3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 16 thru_hole oval (at 13.97 -3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 17 thru_hole oval (at 11.43 -3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 18 thru_hole oval (at 8.89 -3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 19 thru_hole oval (at 6.35 -3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) - ) - (pad 20 thru_hole oval (at 3.81 -3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 7 /sockets/VCC_PIC) - ) - (pad 21 thru_hole oval (at 1.27 -3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 22 thru_hole oval (at -1.27 -3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 23 thru_hole oval (at -3.81 -3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 24 thru_hole oval (at -6.35 -3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 25 thru_hole oval (at -8.89 -3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 26 thru_hole oval (at -11.43 -3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 27 thru_hole oval (at -13.97 -3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 5 /sockets/CLOCK-RB6) - ) - (pad 28 thru_hole oval (at -16.51 -3.81 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 6 /sockets/DATA-RB7) - ) + (fp_line (start -19.05 -2.54) (end 19.05 -2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 19.05 -2.54) (end 19.05 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 19.05 2.54) (end -19.05 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start -19.05 2.54) (end -19.05 -2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start -19.05 -1.27) (end -17.78 -1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -17.78 -1.27) (end -17.78 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -17.78 1.27) (end -19.05 1.27) (layer F.SilkS) (width 0.381)) + (pad 2 thru_hole oval (at -13.97 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 3 thru_hole oval (at -11.43 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 4 thru_hole oval (at -8.89 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 5 thru_hole oval (at -6.35 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 6 thru_hole oval (at -3.81 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 7 thru_hole oval (at -1.27 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 8 thru_hole oval (at 1.27 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) + (pad 9 thru_hole oval (at 3.81 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 10 thru_hole oval (at 6.35 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 11 thru_hole oval (at 8.89 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 12 thru_hole oval (at 11.43 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 13 thru_hole oval (at 13.97 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 14 thru_hole oval (at 16.51 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 1 thru_hole rect (at -16.51 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 8 /sockets/VPP-MCLR)) + (pad 15 thru_hole oval (at 16.51 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 16 thru_hole oval (at 13.97 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 17 thru_hole oval (at 11.43 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 18 thru_hole oval (at 8.89 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 19 thru_hole oval (at 6.35 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) + (pad 20 thru_hole oval (at 3.81 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 7 /sockets/VCC_PIC)) + (pad 21 thru_hole oval (at 1.27 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 22 thru_hole oval (at -1.27 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 23 thru_hole oval (at -3.81 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 24 thru_hole oval (at -6.35 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 25 thru_hole oval (at -8.89 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 26 thru_hole oval (at -11.43 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 27 thru_hole oval (at -13.97 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 5 /sockets/CLOCK-RB6)) + (pad 28 thru_hole oval (at -16.51 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 6 /sockets/DATA-RB7)) (model dil/dil_28-w300.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -648,147 +473,67 @@ (descr "Module Dil 40 pins, pads elliptiques, e=600 mils") (tags DIL) (path /48553E7C/442A88ED) - (fp_text reference P3 (at -19.05 -3.81 270) (layer Dessus.SilkS) + (fp_text reference P3 (at -19.05 -3.81 270) (layer F.SilkS) (effects (font (size 1.778 1.143) (thickness 0.3048))) ) - (fp_text value SUPP40 (at 0 2.54 270) (layer Dessus.SilkS) + (fp_text value SUPP40 (at 0 2.54 270) (layer F.SilkS) (effects (font (size 1.778 1.778) (thickness 0.3048))) ) - (fp_line (start -26.67 -1.27) (end -25.4 -1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -25.4 -1.27) (end -25.4 1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -25.4 1.27) (end -26.67 1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -26.67 -6.35) (end 26.67 -6.35) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 26.67 -6.35) (end 26.67 6.35) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 26.67 6.35) (end -26.67 6.35) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -26.67 6.35) (end -26.67 -6.35) (layer Dessus.SilkS) (width 0.381)) - (pad 1 thru_hole rect (at -24.13 7.62 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 8 /sockets/VPP-MCLR) - ) - (pad 2 thru_hole oval (at -21.59 7.62 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 3 thru_hole oval (at -19.05 7.62 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 4 thru_hole oval (at -16.51 7.62 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 5 thru_hole oval (at -13.97 7.62 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 6 thru_hole oval (at -11.43 7.62 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 7 thru_hole oval (at -8.89 7.62 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 8 thru_hole oval (at -6.35 7.62 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) - ) - (pad 9 thru_hole oval (at -3.81 7.62 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 10 thru_hole oval (at -1.27 7.62 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 11 thru_hole oval (at 1.27 7.62 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 7 /sockets/VCC_PIC) - ) - (pad 12 thru_hole oval (at 3.81 7.62 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) - ) - (pad 13 thru_hole oval (at 6.35 7.62 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 14 thru_hole oval (at 8.89 7.62 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 15 thru_hole oval (at 11.43 7.62 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 16 thru_hole oval (at 13.97 7.62 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 17 thru_hole oval (at 16.51 7.62 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 18 thru_hole oval (at 19.05 7.62 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 19 thru_hole oval (at 21.59 7.62 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 20 thru_hole oval (at 24.13 7.62 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 21 thru_hole oval (at 24.13 -7.62 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 22 thru_hole oval (at 21.59 -7.62 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 23 thru_hole oval (at 19.05 -7.62 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 24 thru_hole oval (at 16.51 -7.62 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 25 thru_hole oval (at 13.97 -7.62 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 26 thru_hole oval (at 11.43 -7.62 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 27 thru_hole oval (at 8.89 -7.62 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 28 thru_hole oval (at 6.35 -7.62 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 29 thru_hole oval (at 3.81 -7.62 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 30 thru_hole oval (at 1.27 -7.62 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 31 thru_hole oval (at -1.27 -7.62 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) - ) - (pad 32 thru_hole oval (at -3.81 -7.62 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 7 /sockets/VCC_PIC) - ) - (pad 33 thru_hole oval (at -6.35 -7.62 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 34 thru_hole oval (at -8.89 -7.62 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 35 thru_hole oval (at -11.43 -7.62 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 36 thru_hole oval (at -13.97 -7.62 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 37 thru_hole oval (at -16.51 -7.62 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 38 thru_hole oval (at -19.05 -7.62 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 39 thru_hole oval (at -21.59 -7.62 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 5 /sockets/CLOCK-RB6) - ) - (pad 40 thru_hole oval (at -24.13 -7.62 270) (size 1.5748 2.794) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 6 /sockets/DATA-RB7) - ) + (fp_line (start -26.67 -1.27) (end -25.4 -1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -25.4 -1.27) (end -25.4 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -25.4 1.27) (end -26.67 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -26.67 -6.35) (end 26.67 -6.35) (layer F.SilkS) (width 0.381)) + (fp_line (start 26.67 -6.35) (end 26.67 6.35) (layer F.SilkS) (width 0.381)) + (fp_line (start 26.67 6.35) (end -26.67 6.35) (layer F.SilkS) (width 0.381)) + (fp_line (start -26.67 6.35) (end -26.67 -6.35) (layer F.SilkS) (width 0.381)) + (pad 1 thru_hole rect (at -24.13 7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 8 /sockets/VPP-MCLR)) + (pad 2 thru_hole oval (at -21.59 7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 3 thru_hole oval (at -19.05 7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 4 thru_hole oval (at -16.51 7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 5 thru_hole oval (at -13.97 7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 6 thru_hole oval (at -11.43 7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 7 thru_hole oval (at -8.89 7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 8 thru_hole oval (at -6.35 7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) + (pad 9 thru_hole oval (at -3.81 7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 10 thru_hole oval (at -1.27 7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 11 thru_hole oval (at 1.27 7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 7 /sockets/VCC_PIC)) + (pad 12 thru_hole oval (at 3.81 7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) + (pad 13 thru_hole oval (at 6.35 7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 14 thru_hole oval (at 8.89 7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 15 thru_hole oval (at 11.43 7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 16 thru_hole oval (at 13.97 7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 17 thru_hole oval (at 16.51 7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 18 thru_hole oval (at 19.05 7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 19 thru_hole oval (at 21.59 7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 20 thru_hole oval (at 24.13 7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 21 thru_hole oval (at 24.13 -7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 22 thru_hole oval (at 21.59 -7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 23 thru_hole oval (at 19.05 -7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 24 thru_hole oval (at 16.51 -7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 25 thru_hole oval (at 13.97 -7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 26 thru_hole oval (at 11.43 -7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 27 thru_hole oval (at 8.89 -7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 28 thru_hole oval (at 6.35 -7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 29 thru_hole oval (at 3.81 -7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 30 thru_hole oval (at 1.27 -7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 31 thru_hole oval (at -1.27 -7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) + (pad 32 thru_hole oval (at -3.81 -7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 7 /sockets/VCC_PIC)) + (pad 33 thru_hole oval (at -6.35 -7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 34 thru_hole oval (at -8.89 -7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 35 thru_hole oval (at -11.43 -7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 36 thru_hole oval (at -13.97 -7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 37 thru_hole oval (at -16.51 -7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 38 thru_hole oval (at -19.05 -7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) + (pad 39 thru_hole oval (at -21.59 -7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 5 /sockets/CLOCK-RB6)) + (pad 40 thru_hole oval (at -24.13 -7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 6 /sockets/DATA-RB7)) (model dil\dil_40-w600.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -801,30 +546,26 @@ (descr "Diode 5 pas") (tags "DIODE DEV") (path /48553E53/442A6026) - (fp_text reference D10 (at 0 0) (layer Dessus.SilkS) + (fp_text reference D10 (at 0 0) (layer F.SilkS) (effects (font (size 1.524 1.016) (thickness 0.3048))) ) - (fp_text value SCHOTTKY (at -0.254 0) (layer Dessus.SilkS) hide + (fp_text value SCHOTTKY (at -0.254 0) (layer F.SilkS) hide (effects (font (size 1.524 1.016) (thickness 0.3048))) ) - (fp_line (start 6.35 0) (end 5.08 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 5.08 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 -1.27) (end -5.08 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 -1.27) (end -5.08 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 0) (end -6.35 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 0) (end -5.08 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 1.27) (end 5.08 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 1.27) (end 5.08 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.81 -1.27) (end 3.81 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.27) (end 4.064 1.27) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -6.35 0) (size 1.778 1.778) (drill 1.143) - (layers *.Cu *.Mask Dessus.SilkS) - (net 19 N-000022) - ) - (pad 2 thru_hole rect (at 6.35 0) (size 1.778 1.778) (drill 1.143) - (layers *.Cu *.Mask Dessus.SilkS) - (net 35 VPP) - ) + (fp_line (start 6.35 0) (end 5.08 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 5.08 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 -1.27) (end -5.08 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 -1.27) (end -5.08 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 0) (end -6.35 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 0) (end -5.08 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 1.27) (end 5.08 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 1.27) (end 5.08 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.81 -1.27) (end 3.81 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.27) (end 4.064 1.27) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -6.35 0) (size 1.778 1.778) (drill 1.143) (layers *.Cu *.Mask F.SilkS) + (net 19 N-000022)) + (pad 2 thru_hole rect (at 6.35 0) (size 1.778 1.778) (drill 1.143) (layers *.Cu *.Mask F.SilkS) + (net 35 VPP)) (model discret/diode.wrl (at (xyz 0 0 0)) (scale (xyz 0.5 0.5 0.5)) @@ -837,30 +578,26 @@ (descr "Diode 5 pas") (tags "DIODE DEV") (path /48553E53/442A500B) - (fp_text reference D1 (at 0 0 270) (layer Dessus.SilkS) + (fp_text reference D1 (at 0 0 270) (layer F.SilkS) (effects (font (size 1.524 1.016) (thickness 0.3048))) ) - (fp_text value 1N4004 (at -0.254 0 270) (layer Dessus.SilkS) hide + (fp_text value 1N4004 (at -0.254 0 270) (layer F.SilkS) hide (effects (font (size 1.524 1.016) (thickness 0.3048))) ) - (fp_line (start 6.35 0) (end 5.08 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 5.08 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 -1.27) (end -5.08 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 -1.27) (end -5.08 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 0) (end -6.35 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 0) (end -5.08 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 1.27) (end 5.08 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 1.27) (end 5.08 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.81 -1.27) (end 3.81 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.27) (end 4.064 1.27) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -6.35 0 270) (size 1.778 1.778) (drill 1.143) - (layers *.Cu *.Mask Dessus.SilkS) - (net 15 N-000016) - ) - (pad 2 thru_hole rect (at 6.35 0 270) (size 1.778 1.778) (drill 1.143) - (layers *.Cu *.Mask Dessus.SilkS) - (net 30 N-000033) - ) + (fp_line (start 6.35 0) (end 5.08 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 5.08 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 -1.27) (end -5.08 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 -1.27) (end -5.08 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 0) (end -6.35 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 0) (end -5.08 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 1.27) (end 5.08 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 1.27) (end 5.08 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.81 -1.27) (end 3.81 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.27) (end 4.064 1.27) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -6.35 0 270) (size 1.778 1.778) (drill 1.143) (layers *.Cu *.Mask F.SilkS) + (net 15 N-000016)) + (pad 2 thru_hole rect (at 6.35 0 270) (size 1.778 1.778) (drill 1.143) (layers *.Cu *.Mask F.SilkS) + (net 30 N-000033)) (model discret/diode.wrl (at (xyz 0 0 0)) (scale (xyz 0.5 0.5 0.5)) @@ -873,30 +610,26 @@ (descr "Diode 3 pas") (tags "DIODE DEV") (path /48553E53/442A4D65) - (fp_text reference D7 (at 0 0) (layer Dessus.SilkS) + (fp_text reference D7 (at 0 0) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value BAT43 (at 0 0) (layer Dessus.SilkS) hide + (fp_text value BAT43 (at 0 0) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start 3.81 0) (end 3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 0) (end 3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 -1.016) (end -3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.81 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.048 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 1.016) (end 3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (pad 2 thru_hole rect (at 3.81 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 32 N-000036) - ) - (pad 1 thru_hole circle (at -3.81 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) - ) + (fp_line (start 3.81 0) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 0) (end 3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 -1.016) (end -3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.81 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 1.016) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 2 thru_hole rect (at 3.81 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 32 N-000036)) + (pad 1 thru_hole circle (at -3.81 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) (model discret/diode.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -909,30 +642,26 @@ (descr "Diode 3 pas") (tags "DIODE DEV") (path /48553E53/442A4D1B) - (fp_text reference D2 (at 0 0) (layer Dessus.SilkS) + (fp_text reference D2 (at 0 0) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value BAT43 (at 0 0) (layer Dessus.SilkS) hide + (fp_text value BAT43 (at 0 0) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start 3.81 0) (end 3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 0) (end 3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 -1.016) (end -3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.81 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.048 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 1.016) (end 3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (pad 2 thru_hole rect (at 3.81 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 34 VCC) - ) - (pad 1 thru_hole circle (at -3.81 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 29 N-000032) - ) + (fp_line (start 3.81 0) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 0) (end 3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 -1.016) (end -3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.81 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 1.016) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 2 thru_hole rect (at 3.81 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 34 VCC)) + (pad 1 thru_hole circle (at -3.81 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 29 N-000032)) (model discret/diode.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -945,30 +674,26 @@ (descr "Diode 3 pas") (tags "DIODE DEV") (path /48553E53/442A4D25) - (fp_text reference D3 (at 0 0) (layer Dessus.SilkS) + (fp_text reference D3 (at 0 0) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value BAT43 (at 0 0) (layer Dessus.SilkS) hide + (fp_text value BAT43 (at 0 0) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start 3.81 0) (end 3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 0) (end 3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 -1.016) (end -3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.81 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.048 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 1.016) (end 3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (pad 2 thru_hole rect (at 3.81 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 29 N-000032) - ) - (pad 1 thru_hole circle (at -3.81 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) - ) + (fp_line (start 3.81 0) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 0) (end 3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 -1.016) (end -3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.81 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 1.016) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 2 thru_hole rect (at 3.81 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 29 N-000032)) + (pad 1 thru_hole circle (at -3.81 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) (model discret/diode.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -981,30 +706,26 @@ (descr "Diode 3 pas") (tags "DIODE DEV") (path /48553E53/442A4D5C) - (fp_text reference D4 (at 0 0) (layer Dessus.SilkS) + (fp_text reference D4 (at 0 0) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value BAT43 (at 0 0) (layer Dessus.SilkS) hide + (fp_text value BAT43 (at 0 0) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start 3.81 0) (end 3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 0) (end 3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 -1.016) (end -3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.81 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.048 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 1.016) (end 3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (pad 2 thru_hole rect (at 3.81 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 34 VCC) - ) - (pad 1 thru_hole circle (at -3.81 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 33 N-000038) - ) + (fp_line (start 3.81 0) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 0) (end 3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 -1.016) (end -3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.81 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 1.016) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 2 thru_hole rect (at 3.81 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 34 VCC)) + (pad 1 thru_hole circle (at -3.81 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 33 N-000038)) (model discret/diode.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -1017,30 +738,26 @@ (descr "Diode 3 pas") (tags "DIODE DEV") (path /48553E53/442A4D5D) - (fp_text reference D5 (at 0 0) (layer Dessus.SilkS) + (fp_text reference D5 (at 0 0) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value BAT43 (at 0 0) (layer Dessus.SilkS) hide + (fp_text value BAT43 (at 0 0) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start 3.81 0) (end 3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 0) (end 3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 -1.016) (end -3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.81 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.048 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 1.016) (end 3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (pad 2 thru_hole rect (at 3.81 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 33 N-000038) - ) - (pad 1 thru_hole circle (at -3.81 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) - ) + (fp_line (start 3.81 0) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 0) (end 3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 -1.016) (end -3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.81 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 1.016) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 2 thru_hole rect (at 3.81 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 33 N-000038)) + (pad 1 thru_hole circle (at -3.81 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) (model discret/diode.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -1053,30 +770,26 @@ (descr "Diode 3 pas") (tags "DIODE DEV") (path /48553E53/442A4D64) - (fp_text reference D6 (at 0 0) (layer Dessus.SilkS) + (fp_text reference D6 (at 0 0) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value BAT43 (at 0 0) (layer Dessus.SilkS) hide + (fp_text value BAT43 (at 0 0) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start 3.81 0) (end 3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 0) (end 3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 -1.016) (end -3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.81 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.048 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 1.016) (end 3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (pad 2 thru_hole rect (at 3.81 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 34 VCC) - ) - (pad 1 thru_hole circle (at -3.81 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 32 N-000036) - ) + (fp_line (start 3.81 0) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 0) (end 3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 -1.016) (end -3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.81 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 1.016) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 2 thru_hole rect (at 3.81 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 34 VCC)) + (pad 1 thru_hole circle (at -3.81 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 32 N-000036)) (model discret/diode.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -1089,30 +802,26 @@ (descr "Diode 3 pas") (tags "DIODE DEV") (path /48553E53/4639BA28) - (fp_text reference D11 (at 0 0 180) (layer Dessus.SilkS) + (fp_text reference D11 (at 0 0 180) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value BAT43 (at 0 0 180) (layer Dessus.SilkS) hide + (fp_text value BAT43 (at 0 0 180) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start 3.81 0) (end 3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 0) (end 3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 -1.016) (end -3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.81 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.048 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 1.016) (end 3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (pad 2 thru_hole rect (at 3.81 0 180) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 26 N-000029) - ) - (pad 1 thru_hole circle (at -3.81 0 180) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 25 N-000028) - ) + (fp_line (start 3.81 0) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 0) (end 3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 -1.016) (end -3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.81 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 1.016) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 2 thru_hole rect (at 3.81 0 180) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 26 N-000029)) + (pad 1 thru_hole circle (at -3.81 0 180) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 25 N-000028)) (model discret/diode.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -1126,28 +835,24 @@ (tags R) (path /48553E53/442A4F23) (autoplace_cost180 10) - (fp_text reference R11 (at 0 0 90) (layer Dessus.SilkS) + (fp_text reference R11 (at 0 0 90) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 22K (at 0 0 90) (layer Dessus.SilkS) hide + (fp_text value 22K (at 0 0 90) (layer F.SilkS) hide (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_line (start -5.08 0) (end -4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 0) (end -4.064 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 1.016) (end -4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 0 90) (size 1.524 1.524) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 26 N-000029) - ) - (pad 2 thru_hole circle (at 5.08 0 90) (size 1.524 1.524) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 31 N-000034) - ) + (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 0 90) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 26 N-000029)) + (pad 2 thru_hole circle (at 5.08 0 90) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 31 N-000034)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.4 0.4 0.4)) @@ -1161,28 +866,24 @@ (tags R) (path /48553E53/442A5F83) (autoplace_cost180 10) - (fp_text reference R10 (at 0 0) (layer Dessus.SilkS) + (fp_text reference R10 (at 0 0) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 5,1K (at 0 0) (layer Dessus.SilkS) hide + (fp_text value 5,1K (at 0 0) (layer F.SilkS) hide (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_line (start -5.08 0) (end -4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 0) (end -4.064 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 1.016) (end -4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 18 N-000021) - ) - (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 17 N-000018) - ) + (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 18 N-000021)) + (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 17 N-000018)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.4 0.4 0.4)) @@ -1196,28 +897,24 @@ (tags R) (path /48553E53/442A4D8D) (autoplace_cost180 10) - (fp_text reference R13 (at 0 0 270) (layer Dessus.SilkS) + (fp_text reference R13 (at 0 0 270) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 470 (at 0 0 270) (layer Dessus.SilkS) hide + (fp_text value 470 (at 0 0 270) (layer F.SilkS) hide (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_line (start -5.08 0) (end -4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 0) (end -4.064 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 1.016) (end -4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 0 270) (size 1.524 1.524) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 11 N-000010) - ) - (pad 2 thru_hole circle (at 5.08 0 270) (size 1.524 1.524) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 5 /sockets/CLOCK-RB6) - ) + (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 0 270) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 11 N-000010)) + (pad 2 thru_hole circle (at 5.08 0 270) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 5 /sockets/CLOCK-RB6)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.4 0.4 0.4)) @@ -1231,28 +928,24 @@ (tags R) (path /48553E53/442A5083) (autoplace_cost180 10) - (fp_text reference R14 (at 0 0) (layer Dessus.SilkS) + (fp_text reference R14 (at 0 0) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 470 (at 0 0) (layer Dessus.SilkS) hide + (fp_text value 470 (at 0 0) (layer F.SilkS) hide (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_line (start -5.08 0) (end -4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 0) (end -4.064 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 1.016) (end -4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 34 VCC) - ) - (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 16 N-000017) - ) + (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 34 VCC)) + (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 16 N-000017)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.4 0.4 0.4)) @@ -1266,28 +959,24 @@ (tags R) (path /48553E53/442A58D7) (autoplace_cost180 10) - (fp_text reference R15 (at 0 0) (layer Dessus.SilkS) + (fp_text reference R15 (at 0 0) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 6.2K (at 0 0) (layer Dessus.SilkS) hide + (fp_text value 6.2K (at 0 0) (layer F.SilkS) hide (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_line (start -5.08 0) (end -4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 0) (end -4.064 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 1.016) (end -4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 20 N-000023) - ) - (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) - ) + (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 20 N-000023)) + (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.4 0.4 0.4)) @@ -1301,28 +990,24 @@ (tags R) (path /48553E53/442A4CFB) (autoplace_cost180 10) - (fp_text reference R2 (at 0 0) (layer Dessus.SilkS) + (fp_text reference R2 (at 0 0) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 10K (at 0 0) (layer Dessus.SilkS) hide + (fp_text value 10K (at 0 0) (layer F.SilkS) hide (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_line (start -5.08 0) (end -4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 0) (end -4.064 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 1.016) (end -4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 4 /pic_programmer/TXD) - ) - (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) - ) + (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 4 /pic_programmer/TXD)) + (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.4 0.4 0.4)) @@ -1336,28 +1021,24 @@ (tags R) (path /48553E53/442A4D5A) (autoplace_cost180 10) - (fp_text reference R3 (at 0 0) (layer Dessus.SilkS) + (fp_text reference R3 (at 0 0) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 10K (at 0 0) (layer Dessus.SilkS) hide + (fp_text value 10K (at 0 0) (layer F.SilkS) hide (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_line (start -5.08 0) (end -4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 0) (end -4.064 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 1.016) (end -4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 2 /pic_programmer/PC-DATA-OUT) - ) - (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 33 N-000038) - ) + (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 2 /pic_programmer/PC-DATA-OUT)) + (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 33 N-000038)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.4 0.4 0.4)) @@ -1371,28 +1052,24 @@ (tags R) (path /48553E53/442A4D5B) (autoplace_cost180 10) - (fp_text reference R4 (at 0 0) (layer Dessus.SilkS) + (fp_text reference R4 (at 0 0) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 10K (at 0 0) (layer Dessus.SilkS) hide + (fp_text value 10K (at 0 0) (layer F.SilkS) hide (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_line (start -5.08 0) (end -4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 0) (end -4.064 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 1.016) (end -4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 2 /pic_programmer/PC-DATA-OUT) - ) - (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) - ) + (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 2 /pic_programmer/PC-DATA-OUT)) + (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.4 0.4 0.4)) @@ -1406,28 +1083,24 @@ (tags R) (path /48553E53/442A4D62) (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 10K (at 0 0) (layer Dessus.SilkS) hide + (fp_text value 10K (at 0 0) (layer F.SilkS) hide (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_line (start -5.08 0) (end -4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 0) (end -4.064 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 1.016) (end -4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 3 /pic_programmer/RTS) - ) - (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 32 N-000036) - ) + (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 3 /pic_programmer/RTS)) + (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 32 N-000036)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.4 0.4 0.4)) @@ -1441,28 +1114,24 @@ (tags R) (path /48553E53/442A4D63) (autoplace_cost180 10) - (fp_text reference R6 (at 0 0) (layer Dessus.SilkS) + (fp_text reference R6 (at 0 0) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 10K (at 0 0) (layer Dessus.SilkS) hide + (fp_text value 10K (at 0 0) (layer F.SilkS) hide (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_line (start -5.08 0) (end -4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 0) (end -4.064 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 1.016) (end -4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 3 /pic_programmer/RTS) - ) - (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) - ) + (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 3 /pic_programmer/RTS)) + (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.4 0.4 0.4)) @@ -1476,28 +1145,24 @@ (tags R) (path /48553E53/442A4F2A) (autoplace_cost180 10) - (fp_text reference R7 (at 0 0) (layer Dessus.SilkS) + (fp_text reference R7 (at 0 0) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 10K (at 0 0) (layer Dessus.SilkS) hide + (fp_text value 10K (at 0 0) (layer F.SilkS) hide (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_line (start -5.08 0) (end -4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 0) (end -4.064 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 1.016) (end -4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 35 VPP) - ) - (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 31 N-000034) - ) + (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 35 VPP)) + (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 31 N-000034)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.4 0.4 0.4)) @@ -1511,28 +1176,24 @@ (tags R) (path /48553E53/442A4D92) (autoplace_cost180 10) - (fp_text reference R8 (at 0 0) (layer Dessus.SilkS) + (fp_text reference R8 (at 0 0) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 1K (at 0 0) (layer Dessus.SilkS) hide + (fp_text value 1K (at 0 0) (layer F.SilkS) hide (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_line (start -5.08 0) (end -4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 0) (end -4.064 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 1.016) (end -4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 12 N-000011) - ) - (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 13 N-000013) - ) + (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 12 N-000011)) + (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 13 N-000013)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.4 0.4 0.4)) @@ -1546,28 +1207,24 @@ (tags R) (path /48553E53/442A58DC) (autoplace_cost180 10) - (fp_text reference R16 (at 0 0) (layer Dessus.SilkS) + (fp_text reference R16 (at 0 0) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 62K (at 0 0) (layer Dessus.SilkS) hide + (fp_text value 62K (at 0 0) (layer F.SilkS) hide (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_line (start -5.08 0) (end -4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 0) (end -4.064 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 1.016) (end -4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 21 N-000024) - ) - (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 35 VPP) - ) + (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 21 N-000024)) + (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 35 VPP)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.4 0.4 0.4)) @@ -1581,28 +1238,24 @@ (tags R) (path /48553E53/442A50BF) (autoplace_cost180 10) - (fp_text reference R17 (at 0 0 270) (layer Dessus.SilkS) + (fp_text reference R17 (at 0 0 270) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 22K (at 0 0 270) (layer Dessus.SilkS) hide + (fp_text value 22K (at 0 0 270) (layer F.SilkS) hide (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_line (start -5.08 0) (end -4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 0) (end -4.064 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 1.016) (end -4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 0 270) (size 1.524 1.524) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 28 N-000031) - ) - (pad 2 thru_hole circle (at 5.08 0 270) (size 1.524 1.524) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) - ) + (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 0 270) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 28 N-000031)) + (pad 2 thru_hole circle (at 5.08 0 270) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.4 0.4 0.4)) @@ -1616,28 +1269,24 @@ (tags R) (path /48553E53/442A4D85) (autoplace_cost180 10) - (fp_text reference R12 (at 0 0 90) (layer Dessus.SilkS) + (fp_text reference R12 (at 0 0 90) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 470 (at 0 0 90) (layer Dessus.SilkS) hide + (fp_text value 470 (at 0 0 90) (layer F.SilkS) hide (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_line (start -5.08 0) (end -4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 0) (end -4.064 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 1.016) (end -4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 0 90) (size 1.524 1.524) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 10 N-000009) - ) - (pad 2 thru_hole circle (at 5.08 0 90) (size 1.524 1.524) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 6 /sockets/DATA-RB7) - ) + (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 0 90) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 10 N-000009)) + (pad 2 thru_hole circle (at 5.08 0 90) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 6 /sockets/DATA-RB7)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.4 0.4 0.4)) @@ -1651,28 +1300,24 @@ (tags R) (path /48553E53/442A4F52) (autoplace_cost180 10) - (fp_text reference R9 (at 0 0) (layer Dessus.SilkS) + (fp_text reference R9 (at 0 0) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 2.2K (at 0 0) (layer Dessus.SilkS) hide + (fp_text value 2.2K (at 0 0) (layer F.SilkS) hide (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_line (start -5.08 0) (end -4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 0) (end -4.064 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 1.016) (end -4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 28 N-000031) - ) - (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 14 N-000015) - ) + (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 28 N-000031)) + (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 14 N-000015)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.4 0.4 0.4)) @@ -1686,28 +1331,24 @@ (tags R) (path /48553E53/442A4CF4) (autoplace_cost180 10) - (fp_text reference R1 (at 0 0) (layer Dessus.SilkS) + (fp_text reference R1 (at 0 0) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 10K (at 0 0) (layer Dessus.SilkS) hide + (fp_text value 10K (at 0 0) (layer F.SilkS) hide (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_line (start -5.08 0) (end -4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 0) (end -4.064 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 1.016) (end -4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 4 /pic_programmer/TXD) - ) - (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 29 N-000032) - ) + (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 4 /pic_programmer/TXD)) + (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 29 N-000032)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.4 0.4 0.4)) @@ -1721,28 +1362,24 @@ (tags R) (path /48553E53/44369638) (autoplace_cost180 10) - (fp_text reference R18 (at 0 0 90) (layer Dessus.SilkS) + (fp_text reference R18 (at 0 0 90) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 220 (at 0 0 90) (layer Dessus.SilkS) hide + (fp_text value 220 (at 0 0 90) (layer F.SilkS) hide (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_line (start -5.08 0) (end -4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 0) (end -4.064 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 1.016) (end -4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 0 90) (size 1.524 1.524) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 28 N-000031) - ) - (pad 2 thru_hole circle (at 5.08 0 90) (size 1.524 1.524) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 27 N-000030) - ) + (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 0 90) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 28 N-000031)) + (pad 2 thru_hole circle (at 5.08 0 90) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 27 N-000030)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.4 0.4 0.4)) @@ -1756,28 +1393,24 @@ (tags R) (path /48553E53/4639B9B0) (autoplace_cost180 10) - (fp_text reference R19 (at 0 0 180) (layer Dessus.SilkS) + (fp_text reference R19 (at 0 0 180) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 2.2K (at 0 0 180) (layer Dessus.SilkS) hide + (fp_text value 2.2K (at 0 0 180) (layer F.SilkS) hide (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_line (start -5.08 0) (end -4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 0) (end -4.064 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 1.016) (end -4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 0 180) (size 1.524 1.524) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 25 N-000028) - ) - (pad 2 thru_hole circle (at 5.08 0 180) (size 1.524 1.524) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 23 N-000026) - ) + (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 0 180) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 25 N-000028)) + (pad 2 thru_hole circle (at 5.08 0 180) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 23 N-000026)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.4 0.4 0.4)) @@ -1791,28 +1424,24 @@ (tags R) (path /48553E53/4639B9B3) (autoplace_cost180 10) - (fp_text reference R20 (at 0 0 180) (layer Dessus.SilkS) + (fp_text reference R20 (at 0 0 180) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 2.2K (at 0 0 180) (layer Dessus.SilkS) hide + (fp_text value 2.2K (at 0 0 180) (layer F.SilkS) hide (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_line (start -5.08 0) (end -4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 0) (end -4.064 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 1.016) (end -4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 0 180) (size 1.524 1.524) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 34 VCC) - ) - (pad 2 thru_hole circle (at 5.08 0 180) (size 1.524 1.524) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 23 N-000026) - ) + (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 0 180) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 34 VCC)) + (pad 2 thru_hole circle (at 5.08 0 180) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 23 N-000026)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.4 0.4 0.4)) @@ -1826,28 +1455,24 @@ (tags R) (path /48553E53/4639B9E9) (autoplace_cost180 10) - (fp_text reference R21 (at 0 0 180) (layer Dessus.SilkS) + (fp_text reference R21 (at 0 0 180) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 470 (at 0 0 180) (layer Dessus.SilkS) hide + (fp_text value 470 (at 0 0 180) (layer F.SilkS) hide (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_line (start -5.08 0) (end -4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 0) (end -4.064 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 1.016) (end -4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 4.064 0) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 0 180) (size 1.524 1.524) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 24 N-000027) - ) - (pad 2 thru_hole circle (at 5.08 0 180) (size 1.524 1.524) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 7 /sockets/VCC_PIC) - ) + (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 0 180) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 24 N-000027)) + (pad 2 thru_hole circle (at 5.08 0 180) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 7 /sockets/VCC_PIC)) (model discret/resistor.wrl (at (xyz 0 0 0)) (scale (xyz 0.4 0.4 0.4)) @@ -1860,29 +1485,23 @@ (descr "Condensateur e = 1 ou 2 pas") (tags C) (path /48553E53/464AD280) - (fp_text reference C9 (at 0 2.032) (layer Dessus.SilkS) + (fp_text reference C9 (at 0 2.032) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value 22OnF (at 0 2.032) (layer Dessus.SilkS) hide + (fp_text value 22OnF (at 0 2.032) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start -3.556 -1.016) (end 3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.556 -1.016) (end 3.556 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.556 1.016) (end -3.556 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.556 1.016) (end -3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.556 -0.508) (end -3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -2.54 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 35 VPP) - ) - (pad 2 thru_hole circle (at 2.54 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 31 N-000034) - ) - (pad 2 thru_hole circle (at 0 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 31 N-000034) - ) + (fp_line (start -3.556 -1.016) (end 3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.556 -1.016) (end 3.556 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.556 1.016) (end -3.556 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.556 1.016) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.556 -0.508) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -2.54 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 35 VPP)) + (pad 2 thru_hole circle (at 2.54 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 31 N-000034)) + (pad 2 thru_hole circle (at 0 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 31 N-000034)) (model discret/capa_2pas_5x5mm.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -1895,32 +1514,26 @@ (descr "Transistor TO92 brochage type BC237") (tags "TR TO92") (path /48553E53/442A4F30) - (fp_text reference Q2 (at -1.27 3.81) (layer Dessus.SilkS) + (fp_text reference Q2 (at -1.27 3.81) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value BC307 (at -1.27 -5.08) (layer Dessus.SilkS) + (fp_text value BC307 (at -1.27 -5.08) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start -1.27 2.54) (end 2.54 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.27) (end 2.54 -2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -2.54) (end 1.27 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 1.27 -3.81) (end -1.27 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -1.27 -3.81) (end -3.81 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.81 1.27) (end -2.54 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -2.54 2.54) (end -1.27 2.54) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at 1.27 -1.27) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 35 VPP) - ) - (pad 2 thru_hole circle (at -1.27 -1.27) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 31 N-000034) - ) - (pad 3 thru_hole circle (at -1.27 1.27) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 28 N-000031) - ) + (fp_line (start -1.27 2.54) (end 2.54 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.27) (end 2.54 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -2.54) (end 1.27 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 1.27 -3.81) (end -1.27 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -1.27 -3.81) (end -3.81 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.81 1.27) (end -2.54 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -2.54 2.54) (end -1.27 2.54) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole rect (at 1.27 -1.27) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 35 VPP)) + (pad 2 thru_hole circle (at -1.27 -1.27) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 31 N-000034)) + (pad 3 thru_hole circle (at -1.27 1.27) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 28 N-000031)) (model discret/to98.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -1933,32 +1546,26 @@ (descr "Transistor TO92 brochage type BC237") (tags "TR TO92") (path /48553E53/442A4EB9) - (fp_text reference Q1 (at -1.27 3.81) (layer Dessus.SilkS) + (fp_text reference Q1 (at -1.27 3.81) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value BC237 (at -1.27 -5.08) (layer Dessus.SilkS) + (fp_text value BC237 (at -1.27 -5.08) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start -1.27 2.54) (end 2.54 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.27) (end 2.54 -2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -2.54) (end 1.27 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 1.27 -3.81) (end -1.27 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -1.27 -3.81) (end -3.81 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.81 1.27) (end -2.54 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -2.54 2.54) (end -1.27 2.54) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at 1.27 -1.27) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) - ) - (pad 2 thru_hole circle (at -1.27 -1.27) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 13 N-000013) - ) - (pad 3 thru_hole circle (at -1.27 1.27) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 26 N-000029) - ) + (fp_line (start -1.27 2.54) (end 2.54 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.27) (end 2.54 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -2.54) (end 1.27 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 1.27 -3.81) (end -1.27 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -1.27 -3.81) (end -3.81 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.81 1.27) (end -2.54 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -2.54 2.54) (end -1.27 2.54) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole rect (at 1.27 -1.27) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) + (pad 2 thru_hole circle (at -1.27 -1.27) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 13 N-000013)) + (pad 3 thru_hole circle (at -1.27 1.27) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 26 N-000029)) (model discret/to98.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -1971,29 +1578,23 @@ (descr "Condensateur e = 1 ou 2 pas") (tags C) (path /48553E7C/4639BE2C) - (fp_text reference C8 (at 0 2.032 270) (layer Dessus.SilkS) + (fp_text reference C8 (at 0 2.032 270) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value 100nF (at 0 2.032 270) (layer Dessus.SilkS) hide + (fp_text value 100nF (at 0 2.032 270) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start -3.556 -1.016) (end 3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.556 -1.016) (end 3.556 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.556 1.016) (end -3.556 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.556 1.016) (end -3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.556 -0.508) (end -3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -2.54 0 270) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 7 /sockets/VCC_PIC) - ) - (pad 2 thru_hole circle (at 2.54 0 270) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) - ) - (pad 2 thru_hole circle (at 0 0 270) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) - ) + (fp_line (start -3.556 -1.016) (end 3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.556 -1.016) (end 3.556 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.556 1.016) (end -3.556 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.556 1.016) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.556 -0.508) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -2.54 0 270) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 7 /sockets/VCC_PIC)) + (pad 2 thru_hole circle (at 2.54 0 270) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) + (pad 2 thru_hole circle (at 0 0 270) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) (model discret/capa_2pas_5x5mm.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -2006,24 +1607,20 @@ (descr "Led verticale diam 6mm") (tags "LED DEV") (path /48553E53/4639B9EA) - (fp_text reference D12 (at 0 -3.81) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text reference D12 (at 0 -3.81) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) - (fp_text value YELLOW-LED (at 0 -3.81) (layer Dessus.SilkS) hide - (effects (font (size 1.524 1.524) (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)) - (pad 1 thru_hole rect (at -1.27 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 24 N-000027) - ) - (pad 2 thru_hole circle (at 1.27 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) + (fp_text value YELLOW-LED (at 0 -3.81) (layer F.SilkS) hide + (effects (font (thickness 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) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 24 N-000027)) + (pad 2 thru_hole circle (at 1.27 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) (model discret/led5_vertical.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -2036,32 +1633,26 @@ (descr "Transistor TO92 brochage type BC237") (tags "TR TO92") (path /48553E53/4639B996) - (fp_text reference Q3 (at -1.27 3.81) (layer Dessus.SilkS) + (fp_text reference Q3 (at -1.27 3.81) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value BC307 (at -1.27 -5.08) (layer Dessus.SilkS) + (fp_text value BC307 (at -1.27 -5.08) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start -1.27 2.54) (end 2.54 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.27) (end 2.54 -2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -2.54) (end 1.27 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 1.27 -3.81) (end -1.27 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -1.27 -3.81) (end -3.81 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.81 1.27) (end -2.54 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -2.54 2.54) (end -1.27 2.54) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at 1.27 -1.27) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 34 VCC) - ) - (pad 2 thru_hole circle (at -1.27 -1.27) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 23 N-000026) - ) - (pad 3 thru_hole circle (at -1.27 1.27) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 7 /sockets/VCC_PIC) - ) + (fp_line (start -1.27 2.54) (end 2.54 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.27) (end 2.54 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -2.54) (end 1.27 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 1.27 -3.81) (end -1.27 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -1.27 -3.81) (end -3.81 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.81 1.27) (end -2.54 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -2.54 2.54) (end -1.27 2.54) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole rect (at 1.27 -1.27) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 34 VCC)) + (pad 2 thru_hole circle (at -1.27 -1.27) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 23 N-000026)) + (pad 3 thru_hole circle (at -1.27 1.27) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 7 /sockets/VCC_PIC)) (model discret/to98.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -2074,24 +1665,20 @@ (descr "Connecteurs 2 pins") (tags "CONN DEV") (path /48553E53/4639BAF8) - (fp_text reference JP1 (at 0 -1.905 270) (layer Dessus.SilkS) + (fp_text reference JP1 (at 0 -1.905 270) (layer F.SilkS) (effects (font (size 0.762 0.762) (thickness 0.1524))) ) - (fp_text value JUMPER (at 0 -1.905 270) (layer Dessus.SilkS) hide + (fp_text value JUMPER (at 0 -1.905 270) (layer F.SilkS) hide (effects (font (size 0.762 0.762) (thickness 0.1524))) ) - (fp_line (start -2.54 1.27) (end -2.54 -1.27) (layer Dessus.SilkS) (width 0.1524)) - (fp_line (start -2.54 -1.27) (end 2.54 -1.27) (layer Dessus.SilkS) (width 0.1524)) - (fp_line (start 2.54 -1.27) (end 2.54 1.27) (layer Dessus.SilkS) (width 0.1524)) - (fp_line (start 2.54 1.27) (end -2.54 1.27) (layer Dessus.SilkS) (width 0.1524)) - (pad 1 thru_hole rect (at -1.27 0 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - (net 34 VCC) - ) - (pad 2 thru_hole circle (at 1.27 0 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - (net 7 /sockets/VCC_PIC) - ) + (fp_line (start -2.54 1.27) (end -2.54 -1.27) (layer F.SilkS) (width 0.1524)) + (fp_line (start -2.54 -1.27) (end 2.54 -1.27) (layer F.SilkS) (width 0.1524)) + (fp_line (start 2.54 -1.27) (end 2.54 1.27) (layer F.SilkS) (width 0.1524)) + (fp_line (start 2.54 1.27) (end -2.54 1.27) (layer F.SilkS) (width 0.1524)) + (pad 1 thru_hole rect (at -1.27 0 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 34 VCC)) + (pad 2 thru_hole circle (at 1.27 0 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 7 /sockets/VCC_PIC)) (model pin_array/pins_array_2x1.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -2104,35 +1691,29 @@ (descr "Resistance variable / Potentiometre") (tags R) (path /48553E53/443D0101) - (fp_text reference RV1 (at -2.54 -5.08 180) (layer Dessus.SilkS) + (fp_text reference RV1 (at -2.54 -5.08 180) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 1K (at -1.651 5.461 180) (layer Dessus.SilkS) + (fp_text value 1K (at -1.651 5.461 180) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_line (start -7.62 -3.81) (end 3.81 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.81 -3.81) (end 6.35 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 6.35 -1.27) (end 6.35 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 6.35 1.27) (end 3.81 3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.81 3.81) (end -7.62 3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -7.62 3.81) (end -7.62 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 0.762 -3.81) (end 1.905 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 1.651 3.81) (end 0.762 3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -2.54 -0.508) (end 4.953 -0.508) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -2.54 0.508) (end 4.953 0.508) (layer Dessus.SilkS) (width 0.3048)) - (fp_circle (center 1.27 0) (end -2.54 -0.635) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 -2.54 180) (size 2.032 2.032) (drill 1.27) - (layers *.Cu *.Mask Dessus.SilkS) - (net 20 N-000023) - ) - (pad 2 thru_hole circle (at 5.08 0 180) (size 2.032 2.032) (drill 1.27) - (layers *.Cu *.Mask Dessus.SilkS) - (net 22 N-000025) - ) - (pad 3 thru_hole circle (at -5.08 2.54 180) (size 2.032 2.032) (drill 1.27) - (layers *.Cu *.Mask Dessus.SilkS) - (net 21 N-000024) - ) + (fp_line (start -7.62 -3.81) (end 3.81 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.81 -3.81) (end 6.35 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 6.35 -1.27) (end 6.35 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 6.35 1.27) (end 3.81 3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.81 3.81) (end -7.62 3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -7.62 3.81) (end -7.62 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 0.762 -3.81) (end 1.905 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 1.651 3.81) (end 0.762 3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -2.54 -0.508) (end 4.953 -0.508) (layer F.SilkS) (width 0.3048)) + (fp_line (start -2.54 0.508) (end 4.953 0.508) (layer F.SilkS) (width 0.3048)) + (fp_circle (center 1.27 0) (end -2.54 -0.635) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 -2.54 180) (size 2.032 2.032) (drill 1.27) (layers *.Cu *.Mask F.SilkS) + (net 20 N-000023)) + (pad 2 thru_hole circle (at 5.08 0 180) (size 2.032 2.032) (drill 1.27) (layers *.Cu *.Mask F.SilkS) + (net 22 N-000025)) + (pad 3 thru_hole circle (at -5.08 2.54 180) (size 2.032 2.032) (drill 1.27) (layers *.Cu *.Mask F.SilkS) + (net 21 N-000024)) (model discret/adjustable_rx2v4.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -2145,30 +1726,26 @@ (descr "Condensateur polarise") (tags CP) (path /48553E53/442A501D) - (fp_text reference C2 (at 2.54 1.27) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text reference C2 (at 2.54 1.27) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) - (fp_text value 220uF (at -1.905 -1.27) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) - ) - (fp_line (start 12.7 0) (end 10.16 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 10.16 0) (end 10.16 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 10.16 2.54) (end -7.62 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -7.62 2.54) (end -7.62 -2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -7.62 -2.54) (end 10.16 -2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 10.16 -2.54) (end 10.16 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -7.62 -1.27) (end -10.16 -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 -10.16 1.27) (end -7.62 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -12.7 0) (end -10.16 0) (layer Dessus.SilkS) (width 0.3048)) - (pad 2 thru_hole circle (at 12.7 0) (size 1.778 1.778) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) - ) - (pad 1 thru_hole rect (at -12.7 0) (size 1.778 1.778) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 30 N-000033) + (fp_text value 220uF (at -1.905 -1.27) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) + (fp_line (start 12.7 0) (end 10.16 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 10.16 0) (end 10.16 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 10.16 2.54) (end -7.62 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -7.62 2.54) (end -7.62 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -7.62 -2.54) (end 10.16 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 10.16 -2.54) (end 10.16 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -7.62 -1.27) (end -10.16 -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)) + (fp_line (start -10.16 1.27) (end -7.62 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -12.7 0) (end -10.16 0) (layer F.SilkS) (width 0.3048)) + (pad 2 thru_hole circle (at 12.7 0) (size 1.778 1.778) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) + (pad 1 thru_hole rect (at -12.7 0) (size 1.778 1.778) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 30 N-000033)) (model discret/c_pol.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -2181,30 +1758,26 @@ (descr "Condensateur polarise") (tags CP) (path /48553E53/442A5056) - (fp_text reference C1 (at 2.54 1.27 180) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text reference C1 (at 2.54 1.27 180) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) - (fp_text value 100uF (at -1.905 -1.27 180) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) - ) - (fp_line (start 12.7 0) (end 10.16 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 10.16 0) (end 10.16 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 10.16 2.54) (end -7.62 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -7.62 2.54) (end -7.62 -2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -7.62 -2.54) (end 10.16 -2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 10.16 -2.54) (end 10.16 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -7.62 -1.27) (end -10.16 -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 -10.16 1.27) (end -7.62 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -12.7 0) (end -10.16 0) (layer Dessus.SilkS) (width 0.3048)) - (pad 2 thru_hole circle (at 12.7 0 180) (size 1.778 1.778) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) - ) - (pad 1 thru_hole rect (at -12.7 0 180) (size 1.778 1.778) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 34 VCC) + (fp_text value 100uF (at -1.905 -1.27 180) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) + (fp_line (start 12.7 0) (end 10.16 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 10.16 0) (end 10.16 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 10.16 2.54) (end -7.62 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -7.62 2.54) (end -7.62 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -7.62 -2.54) (end 10.16 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 10.16 -2.54) (end 10.16 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -7.62 -1.27) (end -10.16 -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)) + (fp_line (start -10.16 1.27) (end -7.62 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -12.7 0) (end -10.16 0) (layer F.SilkS) (width 0.3048)) + (pad 2 thru_hole circle (at 12.7 0 180) (size 1.778 1.778) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) + (pad 1 thru_hole rect (at -12.7 0 180) (size 1.778 1.778) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 34 VCC)) (model discret/c_pol.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -2217,31 +1790,27 @@ (descr "Condensateur polarise") (tags CP) (path /48553E53/442A584C) - (fp_text reference C3 (at 1.27 1.27 270) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text reference C3 (at 1.27 1.27 270) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) - (fp_text value 22uF/25V (at 1.27 -1.27 270) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) - ) - (fp_line (start -10.16 0) (end -8.89 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -7.62 1.27) (end -8.89 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -8.89 1.27) (end -8.89 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -8.89 -1.27) (end -7.62 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -7.62 2.54) (end -7.62 -2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -7.62 -2.54) (end 8.89 -2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 8.89 -2.54) (end 8.89 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 8.89 2.54) (end -7.62 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 8.89 0) (end 10.16 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 -2.54) (end -5.08 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -6.35 2.54) (end -6.35 -2.54) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at -10.16 0 270) (size 1.778 1.778) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 35 VPP) - ) - (pad 2 thru_hole circle (at 10.16 0 270) (size 1.778 1.778) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) + (fp_text value 22uF/25V (at 1.27 -1.27 270) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) + (fp_line (start -10.16 0) (end -8.89 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -7.62 1.27) (end -8.89 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -8.89 1.27) (end -8.89 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -8.89 -1.27) (end -7.62 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -7.62 2.54) (end -7.62 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -7.62 -2.54) (end 8.89 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 8.89 -2.54) (end 8.89 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 8.89 2.54) (end -7.62 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 8.89 0) (end 10.16 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 -2.54) (end -5.08 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -6.35 2.54) (end -6.35 -2.54) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole rect (at -10.16 0 270) (size 1.778 1.778) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 35 VPP)) + (pad 2 thru_hole circle (at 10.16 0 270) (size 1.778 1.778) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) (model discret/c_pol.wrl (at (xyz 0 0 0)) (scale (xyz 0.8 0.8 0.8)) @@ -2249,138 +1818,28 @@ ) ) - (module MIRE (layer Composant) (tedit 4F61B2C6) (tstamp 442CEC45) - (at 233.68 139.7) - (fp_text reference MIRE (at -0.127 4.572) (layer Dessus.SilkS) hide - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_text value * (at 3.302 2.794) (layer Dessus.SilkS) hide - (effects (font (size 1.524 1.524) (thickness 0.2032))) - ) - (fp_circle (center 0 0) (end 2.54 1.905) (layer Dessus.SilkS) (width 0.254)) - (pad "" thru_hole rect (at -1.524 0) (size 2.794 0.254) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole rect (at 0 -1.524) (size 0.254 2.794) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole circle (at 0 0) (size 0.254 0.254) (drill 0.050799) - (layers *.Cu *.Mask) - ) - (pad "" thru_hole rect (at 0 1.524) (size 0.254 2.794) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole rect (at 1.524 0) (size 2.794 0.254) - (layers *.Cu *.Mask Dessus.SilkS) - ) - ) - - (module MIRE (layer Composant) (tedit 4F61B2C6) (tstamp 442CEC40) - (at 73.66 139.7) - (fp_text reference MIRE (at -0.127 4.572) (layer Dessus.SilkS) hide - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_text value * (at 3.302 2.794) (layer Dessus.SilkS) hide - (effects (font (size 1.524 1.524) (thickness 0.2032))) - ) - (fp_circle (center 0 0) (end 2.54 1.905) (layer Dessus.SilkS) (width 0.254)) - (pad "" thru_hole rect (at -1.524 0) (size 2.794 0.254) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole rect (at 0 -1.524) (size 0.254 2.794) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole circle (at 0 0) (size 0.254 0.254) (drill 0.050799) - (layers *.Cu *.Mask) - ) - (pad "" thru_hole rect (at 0 1.524) (size 0.254 2.794) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole rect (at 1.524 0) (size 2.794 0.254) - (layers *.Cu *.Mask Dessus.SilkS) - ) - ) - - (module MIRE (layer Composant) (tedit 4F61B2C6) (tstamp 442CEC3C) - (at 73.66 40.64) - (fp_text reference MIRE (at -0.127 4.572) (layer Dessus.SilkS) hide - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_text value * (at 3.302 2.794) (layer Dessus.SilkS) hide - (effects (font (size 1.524 1.524) (thickness 0.2032))) - ) - (fp_circle (center 0 0) (end 2.54 1.905) (layer Dessus.SilkS) (width 0.254)) - (pad "" thru_hole rect (at -1.524 0) (size 2.794 0.254) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole rect (at 0 -1.524) (size 0.254 2.794) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole circle (at 0 0) (size 0.254 0.254) (drill 0.050799) - (layers *.Cu *.Mask) - ) - (pad "" thru_hole rect (at 0 1.524) (size 0.254 2.794) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole rect (at 1.524 0) (size 2.794 0.254) - (layers *.Cu *.Mask Dessus.SilkS) - ) - ) - - (module MIRE (layer Composant) (tedit 4F61B2C6) (tstamp 442CEC30) - (at 233.68 40.64) - (fp_text reference MIRE (at -0.127 4.572) (layer Dessus.SilkS) hide - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_text value * (at 3.302 2.794) (layer Dessus.SilkS) hide - (effects (font (size 1.524 1.524) (thickness 0.2032))) - ) - (fp_circle (center 0 0) (end 2.54 1.905) (layer Dessus.SilkS) (width 0.254)) - (pad "" thru_hole rect (at -1.524 0) (size 2.794 0.254) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole rect (at 0 -1.524) (size 0.254 2.794) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole circle (at 0 0) (size 0.254 0.254) (drill 0.050799) - (layers *.Cu *.Mask) - ) - (pad "" thru_hole rect (at 0 1.524) (size 0.254 2.794) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole rect (at 1.524 0) (size 2.794 0.254) - (layers *.Cu *.Mask Dessus.SilkS) - ) - ) - (module C1-1 (layer Composant) (tedit 200000) (tstamp 442AA145) (at 198.755 73.66 270) (descr "Condensateur e = 1 ou 2 pas") (tags C) (path /48553E7C/442AA145) - (fp_text reference C7 (at 0 2.032 270) (layer Dessus.SilkS) + (fp_text reference C7 (at 0 2.032 270) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value 100nF (at 0 2.032 270) (layer Dessus.SilkS) hide + (fp_text value 100nF (at 0 2.032 270) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start -3.556 -1.016) (end 3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.556 -1.016) (end 3.556 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.556 1.016) (end -3.556 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.556 1.016) (end -3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.556 -0.508) (end -3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -2.54 0 270) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 7 /sockets/VCC_PIC) - ) - (pad 2 thru_hole circle (at 2.54 0 270) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) - ) - (pad 2 thru_hole circle (at 0 0 270) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) - ) + (fp_line (start -3.556 -1.016) (end 3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.556 -1.016) (end 3.556 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.556 1.016) (end -3.556 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.556 1.016) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.556 -0.508) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -2.54 0 270) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 7 /sockets/VCC_PIC)) + (pad 2 thru_hole circle (at 2.54 0 270) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) + (pad 2 thru_hole circle (at 0 0 270) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) (model discret/capa_2pas_5x5mm.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -2393,29 +1852,23 @@ (descr "Condensateur e = 1 ou 2 pas") (tags C) (path /48553E7C/442AA12B) - (fp_text reference C6 (at 0 2.032 270) (layer Dessus.SilkS) + (fp_text reference C6 (at 0 2.032 270) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value 100nF (at 0 2.032 270) (layer Dessus.SilkS) hide + (fp_text value 100nF (at 0 2.032 270) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start -3.556 -1.016) (end 3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.556 -1.016) (end 3.556 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.556 1.016) (end -3.556 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.556 1.016) (end -3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.556 -0.508) (end -3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -2.54 0 270) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 34 VCC) - ) - (pad 2 thru_hole circle (at 2.54 0 270) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) - ) - (pad 2 thru_hole circle (at 0 0 270) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) - ) + (fp_line (start -3.556 -1.016) (end 3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.556 -1.016) (end 3.556 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.556 1.016) (end -3.556 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.556 1.016) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.556 -0.508) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -2.54 0 270) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 34 VCC)) + (pad 2 thru_hole circle (at 2.54 0 270) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) + (pad 2 thru_hole circle (at 0 0 270) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) (model discret/capa_2pas_5x5mm.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -2427,96 +1880,84 @@ (at 158.75 44.45) (descr "module 1 pin (ou trou mecanique de percage)") (tags DEV) - (fp_text reference 1PIN (at 0 -3.048) (layer Dessus.SilkS) + (fp_text reference 1PIN (at 0 -3.048) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.254))) ) - (fp_text value P*** (at 0 2.794) (layer Dessus.SilkS) hide + (fp_text value P*** (at 0 2.794) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.254))) ) - (fp_circle (center 0 0) (end 0 -2.286) (layer Dessus.SilkS) (width 0.381)) - (pad 1 thru_hole circle (at 0 0) (size 4.064 4.064) (drill 3.048) - (layers *.Cu *.Mask Dessus.SilkS) - ) + (fp_circle (center 0 0) (end 0 -2.286) (layer F.SilkS) (width 0.381)) + (pad 1 thru_hole circle (at 0 0) (size 4.064 4.064) (drill 3.048) (layers *.Cu *.Mask F.SilkS)) ) (module 1pin (layer Composant) (tedit 200000) (tstamp 442A9352) (at 158.75 135.89) (descr "module 1 pin (ou trou mecanique de percage)") (tags DEV) - (fp_text reference 1PIN (at 0 -3.048) (layer Dessus.SilkS) + (fp_text reference 1PIN (at 0 -3.048) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.254))) ) - (fp_text value P*** (at 0 2.794) (layer Dessus.SilkS) hide + (fp_text value P*** (at 0 2.794) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.254))) ) - (fp_circle (center 0 0) (end 0 -2.286) (layer Dessus.SilkS) (width 0.381)) - (pad 1 thru_hole circle (at 0 0) (size 4.064 4.064) (drill 3.048) - (layers *.Cu *.Mask Dessus.SilkS) - ) + (fp_circle (center 0 0) (end 0 -2.286) (layer F.SilkS) (width 0.381)) + (pad 1 thru_hole circle (at 0 0) (size 4.064 4.064) (drill 3.048) (layers *.Cu *.Mask F.SilkS)) ) (module 1pin (layer Composant) (tedit 200000) (tstamp 442A9347) (at 77.47 135.89) (descr "module 1 pin (ou trou mecanique de percage)") (tags DEV) - (fp_text reference 1PIN (at 0 -3.048) (layer Dessus.SilkS) + (fp_text reference 1PIN (at 0 -3.048) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.254))) ) - (fp_text value P*** (at 0 2.794) (layer Dessus.SilkS) hide + (fp_text value P*** (at 0 2.794) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.254))) ) - (fp_circle (center 0 0) (end 0 -2.286) (layer Dessus.SilkS) (width 0.381)) - (pad 1 thru_hole circle (at 0 0) (size 4.064 4.064) (drill 3.048) - (layers *.Cu *.Mask Dessus.SilkS) - ) + (fp_circle (center 0 0) (end 0 -2.286) (layer F.SilkS) (width 0.381)) + (pad 1 thru_hole circle (at 0 0) (size 4.064 4.064) (drill 3.048) (layers *.Cu *.Mask F.SilkS)) ) (module 1pin (layer Composant) (tedit 200000) (tstamp 442A9340) (at 77.47 44.45) (descr "module 1 pin (ou trou mecanique de percage)") (tags DEV) - (fp_text reference 1PIN (at 0 -3.048) (layer Dessus.SilkS) + (fp_text reference 1PIN (at 0 -3.048) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.254))) ) - (fp_text value P*** (at 0 2.794) (layer Dessus.SilkS) hide + (fp_text value P*** (at 0 2.794) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.254))) ) - (fp_circle (center 0 0) (end 0 -2.286) (layer Dessus.SilkS) (width 0.381)) - (pad 1 thru_hole circle (at 0 0) (size 4.064 4.064) (drill 3.048) - (layers *.Cu *.Mask Dessus.SilkS) - ) + (fp_circle (center 0 0) (end 0 -2.286) (layer F.SilkS) (width 0.381)) + (pad 1 thru_hole circle (at 0 0) (size 4.064 4.064) (drill 3.048) (layers *.Cu *.Mask F.SilkS)) ) (module 1pin (layer Composant) (tedit 200000) (tstamp 442A9339) (at 229.87 135.89) (descr "module 1 pin (ou trou mecanique de percage)") (tags DEV) - (fp_text reference 1PIN (at 0 -3.048) (layer Dessus.SilkS) + (fp_text reference 1PIN (at 0 -3.048) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.254))) ) - (fp_text value P*** (at 0 2.794) (layer Dessus.SilkS) hide + (fp_text value P*** (at 0 2.794) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.254))) ) - (fp_circle (center 0 0) (end 0 -2.286) (layer Dessus.SilkS) (width 0.381)) - (pad 1 thru_hole circle (at 0 0) (size 4.064 4.064) (drill 3.048) - (layers *.Cu *.Mask Dessus.SilkS) - ) + (fp_circle (center 0 0) (end 0 -2.286) (layer F.SilkS) (width 0.381)) + (pad 1 thru_hole circle (at 0 0) (size 4.064 4.064) (drill 3.048) (layers *.Cu *.Mask F.SilkS)) ) (module 1pin (layer Composant) (tedit 200000) (tstamp 442A932C) (at 229.87 44.45) (descr "module 1 pin (ou trou mecanique de percage)") (tags DEV) - (fp_text reference 1PIN (at 0 -3.048) (layer Dessus.SilkS) + (fp_text reference 1PIN (at 0 -3.048) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.254))) ) - (fp_text value P*** (at 0 2.794) (layer Dessus.SilkS) hide + (fp_text value P*** (at 0 2.794) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.254))) ) - (fp_circle (center 0 0) (end 0 -2.286) (layer Dessus.SilkS) (width 0.381)) - (pad 1 thru_hole circle (at 0 0) (size 4.064 4.064) (drill 3.048) - (layers *.Cu *.Mask Dessus.SilkS) - ) + (fp_circle (center 0 0) (end 0 -2.286) (layer F.SilkS) (width 0.381)) + (pad 1 thru_hole circle (at 0 0) (size 4.064 4.064) (drill 3.048) (layers *.Cu *.Mask F.SilkS)) ) (module LM78XX (layer Composant) (tedit 200000) (tstamp 442A504A) @@ -2524,37 +1965,29 @@ (descr "Regulateur TO220 serie LM78xx") (tags "TR TO220") (path /48553E53/442A504A) - (fp_text reference U3 (at 7.62 0 180) (layer Dessus.SilkS) + (fp_text reference U3 (at 7.62 0 180) (layer F.SilkS) (effects (font (size 1.524 1.016) (thickness 0.2032))) ) - (fp_text value 7805 (at 10.668 0.127 180) (layer Dessus.SilkS) + (fp_text value 7805 (at 10.668 0.127 180) (layer F.SilkS) (effects (font (size 1.524 1.016) (thickness 0.2032))) ) - (fp_line (start 0 -2.54) (end 5.08 -2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 0 0) (end 5.08 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 0 2.54) (end 5.08 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 -3.81) (end 5.08 5.08) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 5.08) (end 20.32 5.08) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 20.32 5.08) (end 20.32 -5.08) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 -3.81) (end 5.08 -5.08) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 12.7 3.81) (end 12.7 -5.08) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 12.7 3.81) (end 12.7 5.08) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 -5.08) (end 20.32 -5.08) (layer Dessus.SilkS) (width 0.3048)) - (pad 4 thru_hole rect (at 16.51 0 90) (size 8.89 8.89) (drill 3.048) - (layers *.Cu *.SilkS *.Mask) - ) - (pad VI thru_hole circle (at 0 -2.54 90) (size 1.778 1.778) (drill 1.143) - (layers *.Cu *.Mask Dessus.SilkS) - (net 30 N-000033) - ) - (pad GND thru_hole rect (at 0 0 90) (size 1.778 1.778) (drill 1.143) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) - ) - (pad VO thru_hole circle (at 0 2.54 90) (size 1.778 1.778) (drill 1.143) - (layers *.Cu *.Mask Dessus.SilkS) - (net 34 VCC) - ) + (fp_line (start 0 -2.54) (end 5.08 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 0 0) (end 5.08 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 0 2.54) (end 5.08 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 -3.81) (end 5.08 5.08) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 5.08) (end 20.32 5.08) (layer F.SilkS) (width 0.3048)) + (fp_line (start 20.32 5.08) (end 20.32 -5.08) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 -3.81) (end 5.08 -5.08) (layer F.SilkS) (width 0.3048)) + (fp_line (start 12.7 3.81) (end 12.7 -5.08) (layer F.SilkS) (width 0.3048)) + (fp_line (start 12.7 3.81) (end 12.7 5.08) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 -5.08) (end 20.32 -5.08) (layer F.SilkS) (width 0.3048)) + (pad 4 thru_hole rect (at 16.51 0 90) (size 8.89 8.89) (drill 3.048) (layers *.Cu *.SilkS *.Mask)) + (pad VI thru_hole circle (at 0 -2.54 90) (size 1.778 1.778) (drill 1.143) (layers *.Cu *.Mask F.SilkS) + (net 30 N-000033)) + (pad GND thru_hole rect (at 0 0 90) (size 1.778 1.778) (drill 1.143) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) + (pad VO thru_hole circle (at 0 2.54 90) (size 1.778 1.778) (drill 1.143) (layers *.Cu *.Mask F.SilkS) + (net 34 VCC)) (model discret/to220_horiz.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -2567,24 +2000,20 @@ (descr "Led verticale diam 6mm") (tags "LED DEV") (path /48553E53/442A4F5D) - (fp_text reference D8 (at 0 -3.81) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text reference D8 (at 0 -3.81) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) - (fp_text value RED-LED (at 0 -3.81) (layer Dessus.SilkS) hide - (effects (font (size 1.524 1.524) (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)) - (pad 1 thru_hole rect (at -1.27 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 14 N-000015) - ) - (pad 2 thru_hole circle (at 1.27 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) + (fp_text value RED-LED (at 0 -3.81) (layer F.SilkS) hide + (effects (font (thickness 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) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 14 N-000015)) + (pad 2 thru_hole circle (at 1.27 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) (model discret/led5_vertical.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -2597,24 +2026,20 @@ (descr "Led verticale diam 6mm") (tags "LED DEV") (path /48553E53/442A5084) - (fp_text reference D9 (at 0 -3.81) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text reference D9 (at 0 -3.81) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) - (fp_text value GREEN-LED (at 0 -3.81) (layer Dessus.SilkS) hide - (effects (font (size 1.524 1.524) (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)) - (pad 1 thru_hole rect (at -1.27 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 16 N-000017) - ) - (pad 2 thru_hole circle (at 1.27 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) + (fp_text value GREEN-LED (at 0 -3.81) (layer F.SilkS) hide + (effects (font (thickness 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) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 16 N-000017)) + (pad 2 thru_hole circle (at 1.27 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) (model discret/led5_vertical.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -2627,60 +2052,38 @@ (descr "Connecteur DB9 femelle couche") (tags "CONN DB9") (path /48553E53/442A4C93) - (fp_text reference J1 (at 1.27 -10.16 90) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text reference J1 (at 1.27 -10.16 90) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) - (fp_text value DB9-FEMAL (at 1.27 -3.81 90) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) - ) - (fp_line (start -16.129 2.286) (end 16.383 2.286) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 16.383 2.286) (end 16.383 -15.494) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 16.383 -15.494) (end -16.129 -15.494) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -16.129 -15.494) (end -16.129 2.286) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -9.017 -15.494) (end -9.017 -7.874) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -9.017 -7.874) (end 9.271 -7.874) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 9.271 -7.874) (end 9.271 -15.494) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -7.493 -15.494) (end -7.493 -24.13) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -7.493 -24.13) (end 7.747 -24.13) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 7.747 -24.13) (end 7.747 -15.494) (layer Dessus.SilkS) (width 0.3048)) - (pad "" thru_hole circle (at 12.827 -1.27 90) (size 3.81 3.81) (drill 3.048) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole circle (at -12.573 -1.27 90) (size 3.81 3.81) (drill 3.048) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 1 thru_hole rect (at -5.461 1.27 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 2 thru_hole circle (at -2.667 1.27 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 3 thru_hole circle (at 0 1.27 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - (net 4 /pic_programmer/TXD) - ) - (pad 4 thru_hole circle (at 2.794 1.27 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - (net 2 /pic_programmer/PC-DATA-OUT) - ) - (pad 5 thru_hole circle (at 5.588 1.27 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) - ) - (pad 6 thru_hole circle (at -4.064 -1.27 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 7 thru_hole circle (at -1.27 -1.27 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - (net 3 /pic_programmer/RTS) - ) - (pad 8 thru_hole circle (at 1.397 -1.27 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - (net 1 /pic_programmer/CTS) - ) - (pad 9 thru_hole circle (at 4.191 -1.27 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) + (fp_text value DB9-FEMAL (at 1.27 -3.81 90) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) + (fp_line (start -16.129 2.286) (end 16.383 2.286) (layer F.SilkS) (width 0.3048)) + (fp_line (start 16.383 2.286) (end 16.383 -15.494) (layer F.SilkS) (width 0.3048)) + (fp_line (start 16.383 -15.494) (end -16.129 -15.494) (layer F.SilkS) (width 0.3048)) + (fp_line (start -16.129 -15.494) (end -16.129 2.286) (layer F.SilkS) (width 0.3048)) + (fp_line (start -9.017 -15.494) (end -9.017 -7.874) (layer F.SilkS) (width 0.3048)) + (fp_line (start -9.017 -7.874) (end 9.271 -7.874) (layer F.SilkS) (width 0.3048)) + (fp_line (start 9.271 -7.874) (end 9.271 -15.494) (layer F.SilkS) (width 0.3048)) + (fp_line (start -7.493 -15.494) (end -7.493 -24.13) (layer F.SilkS) (width 0.3048)) + (fp_line (start -7.493 -24.13) (end 7.747 -24.13) (layer F.SilkS) (width 0.3048)) + (fp_line (start 7.747 -24.13) (end 7.747 -15.494) (layer F.SilkS) (width 0.3048)) + (pad "" thru_hole circle (at 12.827 -1.27 90) (size 3.81 3.81) (drill 3.048) (layers *.Cu *.Mask F.SilkS)) + (pad "" thru_hole circle (at -12.573 -1.27 90) (size 3.81 3.81) (drill 3.048) (layers *.Cu *.Mask F.SilkS)) + (pad 1 thru_hole rect (at -5.461 1.27 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) + (pad 2 thru_hole circle (at -2.667 1.27 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) + (pad 3 thru_hole circle (at 0 1.27 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 4 /pic_programmer/TXD)) + (pad 4 thru_hole circle (at 2.794 1.27 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 2 /pic_programmer/PC-DATA-OUT)) + (pad 5 thru_hole circle (at 5.588 1.27 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) + (pad 6 thru_hole circle (at -4.064 -1.27 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) + (pad 7 thru_hole circle (at -1.27 -1.27 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 3 /pic_programmer/RTS)) + (pad 8 thru_hole circle (at 1.397 -1.27 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 1 /pic_programmer/CTS)) + (pad 9 thru_hole circle (at 4.191 -1.27 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) (model conn_DBxx/db9_female_pin90deg.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -2693,29 +2096,23 @@ (descr "Condensateur e = 1 ou 2 pas") (tags C) (path /48553E53/442A58B1) - (fp_text reference C5 (at 0 2.032) (layer Dessus.SilkS) + (fp_text reference C5 (at 0 2.032) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value 10nF (at 0 2.032) (layer Dessus.SilkS) hide + (fp_text value 10nF (at 0 2.032) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start -3.556 -1.016) (end 3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.556 -1.016) (end 3.556 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.556 1.016) (end -3.556 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.556 1.016) (end -3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.556 -0.508) (end -3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -2.54 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 17 N-000018) - ) - (pad 2 thru_hole circle (at 2.54 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) - ) - (pad 2 thru_hole circle (at 0 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) - ) + (fp_line (start -3.556 -1.016) (end 3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.556 -1.016) (end 3.556 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.556 1.016) (end -3.556 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.556 1.016) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.556 -0.508) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -2.54 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 17 N-000018)) + (pad 2 thru_hole circle (at 2.54 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) + (pad 2 thru_hole circle (at 0 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) (model discret/capa_2pas_5x5mm.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -2728,29 +2125,23 @@ (descr "Condensateur e = 1 ou 2 pas") (tags C) (path /48553E53/442A5F61) - (fp_text reference C4 (at 0 2.032) (layer Dessus.SilkS) + (fp_text reference C4 (at 0 2.032) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value 0 (at 0 2.032) (layer Dessus.SilkS) hide + (fp_text value 0 (at 0 2.032) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start -3.556 -1.016) (end 3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.556 -1.016) (end 3.556 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.556 1.016) (end -3.556 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.556 1.016) (end -3.556 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.556 -0.508) (end -3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -2.54 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 18 N-000021) - ) - (pad 2 thru_hole circle (at 2.54 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) - ) - (pad 2 thru_hole circle (at 0 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) - ) + (fp_line (start -3.556 -1.016) (end 3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.556 -1.016) (end 3.556 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.556 1.016) (end -3.556 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.556 1.016) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.556 -0.508) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -2.54 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 18 N-000021)) + (pad 2 thru_hole circle (at 2.54 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) + (pad 2 thru_hole circle (at 0 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) (model discret/capa_2pas_5x5mm.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -2763,25 +2154,21 @@ (descr "Bornier d'alimentation 2 pins") (tags DEV) (path /48553E53/442A4FE7) - (fp_text reference P1 (at 0 -5.08 90) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text reference P1 (at 0 -5.08 90) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) - (fp_text value CONN_2 (at 0 5.08 90) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) - ) - (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 3.81) (end 5.08 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 -3.81) (end -5.08 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 -3.81) (end -5.08 3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 3.81) (end 5.08 3.81) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at -2.54 0 90) (size 2.54 2.54) (drill 1.524) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 GND) - ) - (pad 2 thru_hole circle (at 2.54 0 90) (size 2.54 2.54) (drill 1.524) - (layers *.Cu *.Mask Dessus.SilkS) - (net 15 N-000016) + (fp_text value CONN_2 (at 0 5.08 90) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) + (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 3.81) (end 5.08 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 -3.81) (end -5.08 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 -3.81) (end -5.08 3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 3.81) (end 5.08 3.81) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole rect (at -2.54 0 90) (size 2.54 2.54) (drill 1.524) (layers *.Cu *.Mask F.SilkS) + (net 9 GND)) + (pad 2 thru_hole circle (at 2.54 0 90) (size 2.54 2.54) (drill 1.524) (layers *.Cu *.Mask F.SilkS) + (net 15 N-000016)) (model device/bornier_2.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -2846,367 +2233,367 @@ (gr_text "PIC PROGRAMMER V03" (at 124.46 134.62) (layer Cuivre) (effects (font (size 2.032 1.524) (thickness 0.3048)) (justify mirror)) ) - (gr_line (start 73.66 139.7) (end 73.66 40.64) (angle 90) (layer Contours.Ci) (width 0.381)) - (gr_line (start 233.68 139.7) (end 73.66 139.7) (angle 90) (layer Contours.Ci) (width 0.381)) - (gr_line (start 233.68 40.64) (end 233.68 139.7) (angle 90) (layer Contours.Ci) (width 0.381)) - (gr_line (start 173.99 40.64) (end 233.68 40.64) (angle 90) (layer Contours.Ci) (width 0.381)) - (gr_line (start 73.66 40.64) (end 173.99 40.64) (angle 90) (layer Contours.Ci) (width 0.381)) + (gr_line (start 73.66 139.7) (end 73.66 40.64) (angle 90) (layer Edge.Cuts) (width 0.381)) + (gr_line (start 233.68 139.7) (end 73.66 139.7) (angle 90) (layer Edge.Cuts) (width 0.381)) + (gr_line (start 233.68 40.64) (end 233.68 139.7) (angle 90) (layer Edge.Cuts) (width 0.381)) + (gr_line (start 173.99 40.64) (end 233.68 40.64) (angle 90) (layer Edge.Cuts) (width 0.381)) + (gr_line (start 73.66 40.64) (end 173.99 40.64) (angle 90) (layer Edge.Cuts) (width 0.381)) - (segment (start 112.395 113.665) (end 113.03 114.3) (width 0.635) (layer Cuivre) (net 1)) - (segment (start 80.01 114.173) (end 83.947 114.173) (width 0.635) (layer Cuivre) (net 1) (status 800)) - (segment (start 123.19 113.03) (end 123.19 111.76) (width 0.635) (layer Cuivre) (net 1) (status 400)) - (segment (start 121.92 114.3) (end 123.19 113.03) (width 0.635) (layer Cuivre) (net 1)) - (segment (start 113.03 114.3) (end 121.92 114.3) (width 0.635) (layer Cuivre) (net 1) (status 2)) - (segment (start 83.947 114.173) (end 84.455 113.665) (width 0.635) (layer Cuivre) (net 1)) (segment (start 84.455 113.665) (end 112.395 113.665) (width 0.635) (layer Cuivre) (net 1)) - (segment (start 83.185 111.76) (end 87.63 111.76) (width 0.635) (layer Cuivre) (net 2) (status 400)) - (segment (start 82.55 112.395) (end 83.185 111.76) (width 0.635) (layer Cuivre) (net 2)) - (segment (start 82.55 112.776) (end 82.55 112.395) (width 0.635) (layer Cuivre) (net 2) (status 800)) + (segment (start 83.947 114.173) (end 84.455 113.665) (width 0.635) (layer Cuivre) (net 1)) + (segment (start 113.03 114.3) (end 121.92 114.3) (width 0.635) (layer Cuivre) (net 1) (status 2)) + (segment (start 121.92 114.3) (end 123.19 113.03) (width 0.635) (layer Cuivre) (net 1)) + (segment (start 123.19 113.03) (end 123.19 111.76) (width 0.635) (layer Cuivre) (net 1) (status 400)) + (segment (start 80.01 114.173) (end 83.947 114.173) (width 0.635) (layer Cuivre) (net 1) (status 800)) + (segment (start 112.395 113.665) (end 113.03 114.3) (width 0.635) (layer Cuivre) (net 1)) (segment (start 87.63 111.76) (end 87.63 109.22) (width 0.635) (layer Cuivre) (net 2) (status C00)) - (segment (start 77.47 117.475) (end 77.47 120.65) (width 0.635) (layer Cuivre) (net 3)) - (segment (start 80.01 116.84) (end 78.105 116.84) (width 0.635) (layer Cuivre) (net 3) (status 800)) - (segment (start 86.36 124.46) (end 87.63 124.46) (width 0.635) (layer Cuivre) (net 3) (status 400)) - (segment (start 80.01 123.19) (end 85.09 123.19) (width 0.635) (layer Cuivre) (net 3)) - (segment (start 78.105 116.84) (end 77.47 117.475) (width 0.635) (layer Cuivre) (net 3)) - (segment (start 85.09 123.19) (end 86.36 124.46) (width 0.635) (layer Cuivre) (net 3)) - (segment (start 87.63 124.46) (end 87.63 121.92) (width 0.635) (layer Cuivre) (net 3) (status C00)) + (segment (start 82.55 112.776) (end 82.55 112.395) (width 0.635) (layer Cuivre) (net 2) (status 800)) + (segment (start 82.55 112.395) (end 83.185 111.76) (width 0.635) (layer Cuivre) (net 2)) + (segment (start 83.185 111.76) (end 87.63 111.76) (width 0.635) (layer Cuivre) (net 2) (status 400)) (segment (start 77.47 120.65) (end 80.01 123.19) (width 0.635) (layer Cuivre) (net 3)) - (segment (start 87.63 118.11) (end 87.63 115.57) (width 0.635) (layer Cuivre) (net 4) (status C00)) + (segment (start 87.63 124.46) (end 87.63 121.92) (width 0.635) (layer Cuivre) (net 3) (status C00)) + (segment (start 85.09 123.19) (end 86.36 124.46) (width 0.635) (layer Cuivre) (net 3)) + (segment (start 78.105 116.84) (end 77.47 117.475) (width 0.635) (layer Cuivre) (net 3)) + (segment (start 80.01 123.19) (end 85.09 123.19) (width 0.635) (layer Cuivre) (net 3)) + (segment (start 86.36 124.46) (end 87.63 124.46) (width 0.635) (layer Cuivre) (net 3) (status 400)) + (segment (start 80.01 116.84) (end 78.105 116.84) (width 0.635) (layer Cuivre) (net 3) (status 800)) + (segment (start 77.47 117.475) (end 77.47 120.65) (width 0.635) (layer Cuivre) (net 3)) (segment (start 87.63 115.57) (end 82.55 115.57) (width 0.635) (layer Cuivre) (net 4) (status C02)) - (segment (start 189.865 110.49) (end 189.865 113.665) (width 0.635) (layer Cuivre) (net 5)) - (segment (start 140.335 122.555) (end 144.78 127) (width 0.635) (layer Cuivre) (net 5)) - (segment (start 217.805 123.825) (end 217.17 123.19) (width 0.635) (layer Cuivre) (net 5)) - (segment (start 217.805 130.175) (end 217.805 123.825) (width 0.635) (layer Cuivre) (net 5)) - (segment (start 205.74 54.61) (end 208.915 54.61) (width 0.4318) (layer Cuivre) (net 5)) - (segment (start 196.85 54.61) (end 205.74 54.61) (width 0.635) (layer Cuivre) (net 5)) - (segment (start 211.455 53.34) (end 210.185 54.61) (width 0.635) (layer Cuivre) (net 5)) - (segment (start 210.185 54.61) (end 208.915 54.61) (width 0.635) (layer Cuivre) (net 5)) - (segment (start 211.455 53.34) (end 215.265 53.34) (width 0.635) (layer Cuivre) (net 5) (status 400)) - (segment (start 192.405 125.73) (end 198.12 131.445) (width 0.635) (layer Cuivre) (net 5)) - (segment (start 144.78 127) (end 177.165 127) (width 0.635) (layer Cuivre) (net 5)) - (segment (start 193.04 107.315) (end 193.04 75.565) (width 0.635) (layer Composant) (net 5)) - (segment (start 196.85 67.31) (end 196.85 54.61) (width 0.635) (layer Composant) (net 5)) - (segment (start 189.865 123.19) (end 192.405 125.73) (width 0.635) (layer Composant) (net 5)) - (segment (start 189.23 114.3) (end 186.69 114.3) (width 0.635) (layer Cuivre) (net 5) (status 400)) - (via (at 192.405 125.73) (size 1.651) (layers Composant Cuivre) (net 5)) - (via (at 196.85 54.61) (size 1.651) (layers Composant Cuivre) (net 5)) - (segment (start 193.04 75.565) (end 196.215 72.39) (width 0.635) (layer Composant) (net 5)) - (segment (start 193.04 107.315) (end 189.865 110.49) (width 0.635) (layer Composant) (net 5)) - (segment (start 186.69 125.73) (end 192.405 125.73) (width 0.635) (layer Cuivre) (net 5) (status 802)) - (segment (start 198.12 131.445) (end 216.535 131.445) (width 0.635) (layer Cuivre) (net 5)) - (segment (start 140.335 121.92) (end 140.335 122.555) (width 0.635) (layer Cuivre) (net 5) (status 800)) - (segment (start 217.17 123.19) (end 215.265 123.19) (width 0.635) (layer Cuivre) (net 5) (status 400)) - (segment (start 195.58 53.34) (end 196.85 54.61) (width 0.635) (layer Cuivre) (net 5)) - (segment (start 190.5 53.34) (end 195.58 53.34) (width 0.635) (layer Cuivre) (net 5) (status 800)) - (segment (start 196.215 67.945) (end 196.85 67.31) (width 0.635) (layer Composant) (net 5)) - (segment (start 189.865 110.49) (end 189.865 123.19) (width 0.635) (layer Composant) (net 5)) - (segment (start 196.215 72.39) (end 196.215 67.945) (width 0.635) (layer Composant) (net 5)) - (segment (start 182.245 125.73) (end 186.69 125.73) (width 0.635) (layer Cuivre) (net 5) (status 400)) - (via (at 189.865 110.49) (size 1.651) (layers Composant Cuivre) (net 5)) - (segment (start 182.245 125.73) (end 180.975 127) (width 0.635) (layer Cuivre) (net 5)) - (segment (start 177.165 127) (end 180.975 127) (width 0.4318) (layer Cuivre) (net 5)) - (segment (start 216.535 131.445) (end 217.805 130.175) (width 0.635) (layer Cuivre) (net 5)) + (segment (start 87.63 118.11) (end 87.63 115.57) (width 0.635) (layer Cuivre) (net 4) (status C00)) (segment (start 189.865 113.665) (end 189.23 114.3) (width 0.635) (layer Cuivre) (net 5)) - (via (at 192.405 123.19) (size 1.651) (layers Composant Cuivre) (net 6)) - (segment (start 132.715 109.22) (end 135.255 111.76) (width 0.635) (layer Composant) (net 6) (status 400)) - (segment (start 192.405 114.3) (end 192.405 123.19) (width 0.635) (layer Composant) (net 6)) - (segment (start 200.025 52.07) (end 205.74 52.07) (width 0.635) (layer Cuivre) (net 6)) - (segment (start 203.2 121.92) (end 213.995 121.92) (width 0.4318) (layer Cuivre) (net 6) (status 2)) - (segment (start 173.99 125.095) (end 174.625 124.46) (width 0.635) (layer Cuivre) (net 6)) - (segment (start 209.55 52.07) (end 210.82 50.8) (width 0.635) (layer Cuivre) (net 6)) - (segment (start 201.93 123.19) (end 203.2 121.92) (width 0.635) (layer Cuivre) (net 6) (status 2)) - (segment (start 213.995 121.92) (end 215.265 120.65) (width 0.635) (layer Cuivre) (net 6) (status 402)) - (segment (start 186.69 123.19) (end 192.405 123.19) (width 0.635) (layer Cuivre) (net 6) (status 802)) - (segment (start 174.625 124.46) (end 181.61 124.46) (width 0.4318) (layer Cuivre) (net 6)) - (segment (start 149.86 125.095) (end 173.99 125.095) (width 0.635) (layer Cuivre) (net 6)) - (segment (start 181.61 124.46) (end 182.88 123.19) (width 0.635) (layer Cuivre) (net 6)) - (segment (start 120.65 109.855) (end 121.285 109.22) (width 0.635) (layer Composant) (net 6)) - (segment (start 120.65 111.76) (end 120.65 109.855) (width 0.635) (layer Composant) (net 6) (status 800)) - (segment (start 192.405 123.19) (end 201.93 123.19) (width 0.635) (layer Cuivre) (net 6)) - (segment (start 121.285 109.22) (end 132.715 109.22) (width 0.635) (layer Composant) (net 6)) - (segment (start 205.74 52.07) (end 209.55 52.07) (width 0.4318) (layer Cuivre) (net 6)) - (segment (start 182.88 123.19) (end 186.69 123.19) (width 0.635) (layer Cuivre) (net 6) (status 400)) - (segment (start 194.945 91.44) (end 194.945 113.665) (width 0.635) (layer Composant) (net 6)) - (segment (start 194.945 113.665) (end 194.31 114.3) (width 0.635) (layer Composant) (net 6)) - (segment (start 200.025 57.15) (end 200.025 52.07) (width 0.635) (layer Composant) (net 6)) - (via (at 200.025 52.07) (size 1.651) (layers Composant Cuivre) (net 6)) - (segment (start 194.31 114.3) (end 192.405 114.3) (width 0.635) (layer Composant) (net 6)) - (segment (start 190.5 50.8) (end 198.755 50.8) (width 0.635) (layer Cuivre) (net 6) (status 800)) - (segment (start 198.755 50.8) (end 200.025 52.07) (width 0.635) (layer Cuivre) (net 6)) - (segment (start 135.255 111.76) (end 137.795 114.3) (width 0.635) (layer Cuivre) (net 6) (status 800)) - (segment (start 215.265 50.8) (end 210.82 50.8) (width 0.635) (layer Cuivre) (net 6) (status 800)) - (segment (start 200.025 57.15) (end 201.295 58.42) (width 0.635) (layer Composant) (net 6)) - (via (at 192.405 114.3) (size 1.651) (layers Composant Cuivre) (net 6)) - (segment (start 201.295 58.42) (end 201.295 85.09) (width 0.635) (layer Composant) (net 6)) - (segment (start 201.295 85.09) (end 194.945 91.44) (width 0.635) (layer Composant) (net 6)) - (segment (start 137.795 114.3) (end 139.065 114.3) (width 0.635) (layer Cuivre) (net 6)) - (segment (start 139.065 114.3) (end 149.86 125.095) (width 0.635) (layer Cuivre) (net 6)) - (segment (start 192.405 114.3) (end 191.77 114.3) (width 0.635) (layer Cuivre) (net 6)) - (segment (start 189.23 116.84) (end 186.69 116.84) (width 0.635) (layer Cuivre) (net 6) (status 400)) + (segment (start 216.535 131.445) (end 217.805 130.175) (width 0.635) (layer Cuivre) (net 5)) + (segment (start 177.165 127) (end 180.975 127) (width 0.4318) (layer Cuivre) (net 5)) + (segment (start 182.245 125.73) (end 180.975 127) (width 0.635) (layer Cuivre) (net 5)) + (via (at 189.865 110.49) (size 1.651) (layers Composant Cuivre) (net 5)) + (segment (start 182.245 125.73) (end 186.69 125.73) (width 0.635) (layer Cuivre) (net 5) (status 400)) + (segment (start 196.215 72.39) (end 196.215 67.945) (width 0.635) (layer Composant) (net 5)) + (segment (start 189.865 110.49) (end 189.865 123.19) (width 0.635) (layer Composant) (net 5)) + (segment (start 196.215 67.945) (end 196.85 67.31) (width 0.635) (layer Composant) (net 5)) + (segment (start 190.5 53.34) (end 195.58 53.34) (width 0.635) (layer Cuivre) (net 5) (status 800)) + (segment (start 195.58 53.34) (end 196.85 54.61) (width 0.635) (layer Cuivre) (net 5)) + (segment (start 217.17 123.19) (end 215.265 123.19) (width 0.635) (layer Cuivre) (net 5) (status 400)) + (segment (start 140.335 121.92) (end 140.335 122.555) (width 0.635) (layer Cuivre) (net 5) (status 800)) + (segment (start 198.12 131.445) (end 216.535 131.445) (width 0.635) (layer Cuivre) (net 5)) + (segment (start 186.69 125.73) (end 192.405 125.73) (width 0.635) (layer Cuivre) (net 5) (status 802)) + (segment (start 193.04 107.315) (end 189.865 110.49) (width 0.635) (layer Composant) (net 5)) + (segment (start 193.04 75.565) (end 196.215 72.39) (width 0.635) (layer Composant) (net 5)) + (via (at 196.85 54.61) (size 1.651) (layers Composant Cuivre) (net 5)) + (via (at 192.405 125.73) (size 1.651) (layers Composant Cuivre) (net 5)) + (segment (start 189.23 114.3) (end 186.69 114.3) (width 0.635) (layer Cuivre) (net 5) (status 400)) + (segment (start 189.865 123.19) (end 192.405 125.73) (width 0.635) (layer Composant) (net 5)) + (segment (start 196.85 67.31) (end 196.85 54.61) (width 0.635) (layer Composant) (net 5)) + (segment (start 193.04 107.315) (end 193.04 75.565) (width 0.635) (layer Composant) (net 5)) + (segment (start 144.78 127) (end 177.165 127) (width 0.635) (layer Cuivre) (net 5)) + (segment (start 192.405 125.73) (end 198.12 131.445) (width 0.635) (layer Cuivre) (net 5)) + (segment (start 211.455 53.34) (end 215.265 53.34) (width 0.635) (layer Cuivre) (net 5) (status 400)) + (segment (start 210.185 54.61) (end 208.915 54.61) (width 0.635) (layer Cuivre) (net 5)) + (segment (start 211.455 53.34) (end 210.185 54.61) (width 0.635) (layer Cuivre) (net 5)) + (segment (start 196.85 54.61) (end 205.74 54.61) (width 0.635) (layer Cuivre) (net 5)) + (segment (start 205.74 54.61) (end 208.915 54.61) (width 0.4318) (layer Cuivre) (net 5)) + (segment (start 217.805 130.175) (end 217.805 123.825) (width 0.635) (layer Cuivre) (net 5)) + (segment (start 217.805 123.825) (end 217.17 123.19) (width 0.635) (layer Cuivre) (net 5)) + (segment (start 140.335 122.555) (end 144.78 127) (width 0.635) (layer Cuivre) (net 5)) + (segment (start 189.865 110.49) (end 189.865 113.665) (width 0.635) (layer Cuivre) (net 5)) (segment (start 191.77 114.3) (end 189.23 116.84) (width 0.635) (layer Cuivre) (net 6)) - (segment (start 201.93 64.77) (end 205.74 64.77) (width 1.016) (layer Cuivre) (net 7)) - (segment (start 198.755 67.945) (end 201.93 64.77) (width 1.016) (layer Cuivre) (net 7)) - (segment (start 205.74 64.77) (end 210.185 64.77) (width 0.4318) (layer Cuivre) (net 7)) - (segment (start 198.755 71.12) (end 198.755 67.945) (width 1.016) (layer Cuivre) (net 7) (status 800)) - (segment (start 210.185 64.77) (end 210.82 64.77) (width 1.016) (layer Cuivre) (net 7)) - (segment (start 190.5 71.12) (end 198.755 71.12) (width 1.016) (layer Cuivre) (net 7) (status C00)) - (segment (start 213.36 71.12) (end 215.265 71.12) (width 1.016) (layer Cuivre) (net 7) (status 400)) - (segment (start 212.725 70.485) (end 213.36 71.12) (width 1.016) (layer Cuivre) (net 7)) - (segment (start 166.37 120.65) (end 147.955 102.235) (width 1.016) (layer Cuivre) (net 7) (status 400)) - (segment (start 210.82 64.77) (end 212.725 66.675) (width 1.016) (layer Cuivre) (net 7)) - (segment (start 206.375 102.235) (end 219.075 102.235) (width 1.016) (layer Cuivre) (net 7)) - (segment (start 203.2 105.41) (end 206.375 102.235) (width 1.016) (layer Cuivre) (net 7)) - (segment (start 212.725 66.675) (end 212.725 70.485) (width 1.016) (layer Cuivre) (net 7)) - (segment (start 204.47 116.84) (end 210.185 116.84) (width 0.4318) (layer Cuivre) (net 7) (status 2)) - (segment (start 219.71 71.12) (end 215.265 71.12) (width 1.016) (layer Cuivre) (net 7) (status 400)) - (segment (start 220.345 71.755) (end 219.71 71.12) (width 1.016) (layer Cuivre) (net 7)) - (segment (start 220.345 100.965) (end 220.345 71.755) (width 1.016) (layer Cuivre) (net 7)) - (segment (start 219.075 102.235) (end 220.345 100.965) (width 1.016) (layer Cuivre) (net 7)) - (segment (start 198.12 119.38) (end 210.185 119.38) (width 0.4318) (layer Cuivre) (net 7)) - (segment (start 210.185 119.38) (end 210.185 118.11) (width 1.016) (layer Cuivre) (net 7)) - (segment (start 193.04 119.38) (end 198.12 119.38) (width 1.016) (layer Cuivre) (net 7)) - (segment (start 182.245 121.92) (end 189.23 121.92) (width 0.4318) (layer Cuivre) (net 7)) - (segment (start 189.23 121.92) (end 190.5 121.92) (width 1.016) (layer Cuivre) (net 7)) - (segment (start 185.42 71.12) (end 190.5 71.12) (width 1.016) (layer Cuivre) (net 7) (status 400)) - (segment (start 190.5 121.92) (end 193.04 119.38) (width 1.016) (layer Cuivre) (net 7)) - (segment (start 180.975 120.65) (end 182.245 121.92) (width 1.016) (layer Cuivre) (net 7)) - (segment (start 179.07 120.65) (end 180.975 120.65) (width 1.016) (layer Cuivre) (net 7) (status 800)) - (segment (start 175.26 76.2) (end 180.34 76.2) (width 1.016) (layer Cuivre) (net 7) (status 800)) - (segment (start 210.185 118.11) (end 215.265 118.11) (width 1.016) (layer Cuivre) (net 7) (status 402)) - (segment (start 180.34 76.2) (end 185.42 71.12) (width 1.016) (layer Cuivre) (net 7)) - (segment (start 203.2 105.41) (end 203.2 112.395) (width 1.016) (layer Cuivre) (net 7)) - (segment (start 203.2 112.395) (end 203.2 115.57) (width 1.016) (layer Cuivre) (net 7)) - (segment (start 203.2 115.57) (end 204.47 116.84) (width 0.635) (layer Cuivre) (net 7)) - (segment (start 147.32 99.06) (end 147.32 101.6) (width 1.016) (layer Cuivre) (net 7) (status 800)) - (segment (start 147.32 101.6) (end 147.955 102.235) (width 1.016) (layer Cuivre) (net 7) (status 400)) - (segment (start 140.97 99.06) (end 140.97 104.14) (width 1.016) (layer Cuivre) (net 7) (status 800)) - (segment (start 140.97 104.14) (end 142.24 105.41) (width 1.016) (layer Cuivre) (net 7)) - (segment (start 142.24 105.41) (end 144.78 105.41) (width 1.016) (layer Cuivre) (net 7)) - (segment (start 144.78 105.41) (end 147.955 102.235) (width 1.016) (layer Cuivre) (net 7) (status 400)) - (segment (start 179.07 120.65) (end 166.37 120.65) (width 1.016) (layer Cuivre) (net 7) (status 800)) - (segment (start 210.185 118.11) (end 210.185 116.84) (width 1.016) (layer Cuivre) (net 7) (status 2)) + (segment (start 189.23 116.84) (end 186.69 116.84) (width 0.635) (layer Cuivre) (net 6) (status 400)) + (segment (start 192.405 114.3) (end 191.77 114.3) (width 0.635) (layer Cuivre) (net 6)) + (segment (start 139.065 114.3) (end 149.86 125.095) (width 0.635) (layer Cuivre) (net 6)) + (segment (start 137.795 114.3) (end 139.065 114.3) (width 0.635) (layer Cuivre) (net 6)) + (segment (start 201.295 85.09) (end 194.945 91.44) (width 0.635) (layer Composant) (net 6)) + (segment (start 201.295 58.42) (end 201.295 85.09) (width 0.635) (layer Composant) (net 6)) + (via (at 192.405 114.3) (size 1.651) (layers Composant Cuivre) (net 6)) + (segment (start 200.025 57.15) (end 201.295 58.42) (width 0.635) (layer Composant) (net 6)) + (segment (start 215.265 50.8) (end 210.82 50.8) (width 0.635) (layer Cuivre) (net 6) (status 800)) + (segment (start 135.255 111.76) (end 137.795 114.3) (width 0.635) (layer Cuivre) (net 6) (status 800)) + (segment (start 198.755 50.8) (end 200.025 52.07) (width 0.635) (layer Cuivre) (net 6)) + (segment (start 190.5 50.8) (end 198.755 50.8) (width 0.635) (layer Cuivre) (net 6) (status 800)) + (segment (start 194.31 114.3) (end 192.405 114.3) (width 0.635) (layer Composant) (net 6)) + (via (at 200.025 52.07) (size 1.651) (layers Composant Cuivre) (net 6)) + (segment (start 200.025 57.15) (end 200.025 52.07) (width 0.635) (layer Composant) (net 6)) + (segment (start 194.945 113.665) (end 194.31 114.3) (width 0.635) (layer Composant) (net 6)) + (segment (start 194.945 91.44) (end 194.945 113.665) (width 0.635) (layer Composant) (net 6)) + (segment (start 182.88 123.19) (end 186.69 123.19) (width 0.635) (layer Cuivre) (net 6) (status 400)) + (segment (start 205.74 52.07) (end 209.55 52.07) (width 0.4318) (layer Cuivre) (net 6)) + (segment (start 121.285 109.22) (end 132.715 109.22) (width 0.635) (layer Composant) (net 6)) + (segment (start 192.405 123.19) (end 201.93 123.19) (width 0.635) (layer Cuivre) (net 6)) + (segment (start 120.65 111.76) (end 120.65 109.855) (width 0.635) (layer Composant) (net 6) (status 800)) + (segment (start 120.65 109.855) (end 121.285 109.22) (width 0.635) (layer Composant) (net 6)) + (segment (start 181.61 124.46) (end 182.88 123.19) (width 0.635) (layer Cuivre) (net 6)) + (segment (start 149.86 125.095) (end 173.99 125.095) (width 0.635) (layer Cuivre) (net 6)) + (segment (start 174.625 124.46) (end 181.61 124.46) (width 0.4318) (layer Cuivre) (net 6)) + (segment (start 186.69 123.19) (end 192.405 123.19) (width 0.635) (layer Cuivre) (net 6) (status 802)) + (segment (start 213.995 121.92) (end 215.265 120.65) (width 0.635) (layer Cuivre) (net 6) (status 402)) + (segment (start 201.93 123.19) (end 203.2 121.92) (width 0.635) (layer Cuivre) (net 6) (status 2)) + (segment (start 209.55 52.07) (end 210.82 50.8) (width 0.635) (layer Cuivre) (net 6)) + (segment (start 173.99 125.095) (end 174.625 124.46) (width 0.635) (layer Cuivre) (net 6)) + (segment (start 203.2 121.92) (end 213.995 121.92) (width 0.4318) (layer Cuivre) (net 6) (status 2)) + (segment (start 200.025 52.07) (end 205.74 52.07) (width 0.635) (layer Cuivre) (net 6)) + (segment (start 192.405 114.3) (end 192.405 123.19) (width 0.635) (layer Composant) (net 6)) + (segment (start 132.715 109.22) (end 135.255 111.76) (width 0.635) (layer Composant) (net 6) (status 400)) + (via (at 192.405 123.19) (size 1.651) (layers Composant Cuivre) (net 6)) (segment (start 200.66 112.395) (end 203.2 112.395) (width 1.016) (layer Cuivre) (net 7) (status 800)) - (segment (start 207.645 50.8) (end 207.645 46.355) (width 0.635) (layer Cuivre) (net 8) (status 800)) - (segment (start 179.07 130.81) (end 180.975 132.715) (width 0.635) (layer Cuivre) (net 8)) - (segment (start 207.645 115.57) (end 205.105 115.57) (width 0.635) (layer Cuivre) (net 8) (status 800)) - (segment (start 221.615 104.14) (end 220.98 104.14) (width 0.635) (layer Cuivre) (net 8)) - (segment (start 221.615 104.14) (end 222.25 103.505) (width 0.635) (layer Cuivre) (net 8)) - (segment (start 220.98 130.81) (end 220.98 104.14) (width 0.635) (layer Cuivre) (net 8)) - (segment (start 218.44 133.35) (end 220.98 130.81) (width 0.635) (layer Cuivre) (net 8)) - (segment (start 222.25 48.895) (end 222.25 103.505) (width 0.635) (layer Cuivre) (net 8)) - (segment (start 205.105 115.57) (end 204.47 114.935) (width 0.635) (layer Cuivre) (net 8)) - (segment (start 204.47 114.935) (end 204.47 106.68) (width 0.635) (layer Cuivre) (net 8)) - (segment (start 204.47 106.68) (end 207.01 104.14) (width 0.635) (layer Cuivre) (net 8)) - (segment (start 207.01 104.14) (end 220.98 104.14) (width 0.635) (layer Cuivre) (net 8)) - (segment (start 219.71 46.355) (end 207.645 46.355) (width 0.635) (layer Cuivre) (net 8)) - (segment (start 156.845 50.8) (end 175.26 50.8) (width 0.635) (layer Cuivre) (net 8) (status 400)) - (segment (start 195.58 132.715) (end 196.215 133.35) (width 0.635) (layer Cuivre) (net 8)) - (segment (start 175.26 50.8) (end 175.26 47.625) (width 0.635) (layer Cuivre) (net 8) (status 800)) - (segment (start 179.07 130.81) (end 179.07 128.27) (width 0.635) (layer Cuivre) (net 8) (status 400)) - (segment (start 207.645 46.355) (end 176.53 46.355) (width 0.635) (layer Cuivre) (net 8)) - (segment (start 175.26 47.625) (end 176.53 46.355) (width 0.635) (layer Cuivre) (net 8)) - (segment (start 222.25 48.895) (end 219.71 46.355) (width 0.635) (layer Cuivre) (net 8)) - (segment (start 196.215 133.35) (end 218.44 133.35) (width 0.635) (layer Cuivre) (net 8)) - (segment (start 195.58 132.715) (end 180.975 132.715) (width 0.635) (layer Cuivre) (net 8)) + (segment (start 210.185 118.11) (end 210.185 116.84) (width 1.016) (layer Cuivre) (net 7) (status 2)) + (segment (start 179.07 120.65) (end 166.37 120.65) (width 1.016) (layer Cuivre) (net 7) (status 800)) + (segment (start 144.78 105.41) (end 147.955 102.235) (width 1.016) (layer Cuivre) (net 7) (status 400)) + (segment (start 142.24 105.41) (end 144.78 105.41) (width 1.016) (layer Cuivre) (net 7)) + (segment (start 140.97 104.14) (end 142.24 105.41) (width 1.016) (layer Cuivre) (net 7)) + (segment (start 140.97 99.06) (end 140.97 104.14) (width 1.016) (layer Cuivre) (net 7) (status 800)) + (segment (start 147.32 101.6) (end 147.955 102.235) (width 1.016) (layer Cuivre) (net 7) (status 400)) + (segment (start 147.32 99.06) (end 147.32 101.6) (width 1.016) (layer Cuivre) (net 7) (status 800)) + (segment (start 203.2 115.57) (end 204.47 116.84) (width 0.635) (layer Cuivre) (net 7)) + (segment (start 203.2 112.395) (end 203.2 115.57) (width 1.016) (layer Cuivre) (net 7)) + (segment (start 203.2 105.41) (end 203.2 112.395) (width 1.016) (layer Cuivre) (net 7)) + (segment (start 180.34 76.2) (end 185.42 71.12) (width 1.016) (layer Cuivre) (net 7)) + (segment (start 210.185 118.11) (end 215.265 118.11) (width 1.016) (layer Cuivre) (net 7) (status 402)) + (segment (start 175.26 76.2) (end 180.34 76.2) (width 1.016) (layer Cuivre) (net 7) (status 800)) + (segment (start 179.07 120.65) (end 180.975 120.65) (width 1.016) (layer Cuivre) (net 7) (status 800)) + (segment (start 180.975 120.65) (end 182.245 121.92) (width 1.016) (layer Cuivre) (net 7)) + (segment (start 190.5 121.92) (end 193.04 119.38) (width 1.016) (layer Cuivre) (net 7)) + (segment (start 185.42 71.12) (end 190.5 71.12) (width 1.016) (layer Cuivre) (net 7) (status 400)) + (segment (start 189.23 121.92) (end 190.5 121.92) (width 1.016) (layer Cuivre) (net 7)) + (segment (start 182.245 121.92) (end 189.23 121.92) (width 0.4318) (layer Cuivre) (net 7)) + (segment (start 193.04 119.38) (end 198.12 119.38) (width 1.016) (layer Cuivre) (net 7)) + (segment (start 210.185 119.38) (end 210.185 118.11) (width 1.016) (layer Cuivre) (net 7)) + (segment (start 198.12 119.38) (end 210.185 119.38) (width 0.4318) (layer Cuivre) (net 7)) + (segment (start 219.075 102.235) (end 220.345 100.965) (width 1.016) (layer Cuivre) (net 7)) + (segment (start 220.345 100.965) (end 220.345 71.755) (width 1.016) (layer Cuivre) (net 7)) + (segment (start 220.345 71.755) (end 219.71 71.12) (width 1.016) (layer Cuivre) (net 7)) + (segment (start 219.71 71.12) (end 215.265 71.12) (width 1.016) (layer Cuivre) (net 7) (status 400)) + (segment (start 204.47 116.84) (end 210.185 116.84) (width 0.4318) (layer Cuivre) (net 7) (status 2)) + (segment (start 212.725 66.675) (end 212.725 70.485) (width 1.016) (layer Cuivre) (net 7)) + (segment (start 203.2 105.41) (end 206.375 102.235) (width 1.016) (layer Cuivre) (net 7)) + (segment (start 206.375 102.235) (end 219.075 102.235) (width 1.016) (layer Cuivre) (net 7)) + (segment (start 210.82 64.77) (end 212.725 66.675) (width 1.016) (layer Cuivre) (net 7)) + (segment (start 166.37 120.65) (end 147.955 102.235) (width 1.016) (layer Cuivre) (net 7) (status 400)) + (segment (start 212.725 70.485) (end 213.36 71.12) (width 1.016) (layer Cuivre) (net 7)) + (segment (start 213.36 71.12) (end 215.265 71.12) (width 1.016) (layer Cuivre) (net 7) (status 400)) + (segment (start 190.5 71.12) (end 198.755 71.12) (width 1.016) (layer Cuivre) (net 7) (status C00)) + (segment (start 210.185 64.77) (end 210.82 64.77) (width 1.016) (layer Cuivre) (net 7)) + (segment (start 198.755 71.12) (end 198.755 67.945) (width 1.016) (layer Cuivre) (net 7) (status 800)) + (segment (start 205.74 64.77) (end 210.185 64.77) (width 0.4318) (layer Cuivre) (net 7)) + (segment (start 198.755 67.945) (end 201.93 64.77) (width 1.016) (layer Cuivre) (net 7)) + (segment (start 201.93 64.77) (end 205.74 64.77) (width 1.016) (layer Cuivre) (net 7)) (segment (start 156.845 50.8) (end 152.4 55.245) (width 0.635) (layer Cuivre) (net 8)) - (segment (start 128.27 119.38) (end 128.27 120.65) (width 0.635) (layer Cuivre) (net 10) (status 800)) - (segment (start 129.54 121.92) (end 135.255 121.92) (width 0.635) (layer Cuivre) (net 10) (status 400)) + (segment (start 195.58 132.715) (end 180.975 132.715) (width 0.635) (layer Cuivre) (net 8)) + (segment (start 196.215 133.35) (end 218.44 133.35) (width 0.635) (layer Cuivre) (net 8)) + (segment (start 222.25 48.895) (end 219.71 46.355) (width 0.635) (layer Cuivre) (net 8)) + (segment (start 175.26 47.625) (end 176.53 46.355) (width 0.635) (layer Cuivre) (net 8)) + (segment (start 207.645 46.355) (end 176.53 46.355) (width 0.635) (layer Cuivre) (net 8)) + (segment (start 179.07 130.81) (end 179.07 128.27) (width 0.635) (layer Cuivre) (net 8) (status 400)) + (segment (start 175.26 50.8) (end 175.26 47.625) (width 0.635) (layer Cuivre) (net 8) (status 800)) + (segment (start 195.58 132.715) (end 196.215 133.35) (width 0.635) (layer Cuivre) (net 8)) + (segment (start 156.845 50.8) (end 175.26 50.8) (width 0.635) (layer Cuivre) (net 8) (status 400)) + (segment (start 219.71 46.355) (end 207.645 46.355) (width 0.635) (layer Cuivre) (net 8)) + (segment (start 207.01 104.14) (end 220.98 104.14) (width 0.635) (layer Cuivre) (net 8)) + (segment (start 204.47 106.68) (end 207.01 104.14) (width 0.635) (layer Cuivre) (net 8)) + (segment (start 204.47 114.935) (end 204.47 106.68) (width 0.635) (layer Cuivre) (net 8)) + (segment (start 205.105 115.57) (end 204.47 114.935) (width 0.635) (layer Cuivre) (net 8)) + (segment (start 222.25 48.895) (end 222.25 103.505) (width 0.635) (layer Cuivre) (net 8)) + (segment (start 218.44 133.35) (end 220.98 130.81) (width 0.635) (layer Cuivre) (net 8)) + (segment (start 220.98 130.81) (end 220.98 104.14) (width 0.635) (layer Cuivre) (net 8)) + (segment (start 221.615 104.14) (end 222.25 103.505) (width 0.635) (layer Cuivre) (net 8)) + (segment (start 221.615 104.14) (end 220.98 104.14) (width 0.635) (layer Cuivre) (net 8)) + (segment (start 207.645 115.57) (end 205.105 115.57) (width 0.635) (layer Cuivre) (net 8) (status 800)) + (segment (start 179.07 130.81) (end 180.975 132.715) (width 0.635) (layer Cuivre) (net 8)) + (segment (start 207.645 50.8) (end 207.645 46.355) (width 0.635) (layer Cuivre) (net 8) (status 800)) (segment (start 128.27 120.65) (end 129.54 121.92) (width 0.635) (layer Cuivre) (net 10)) - (segment (start 130.81 109.6264) (end 132.6896 107.7468) (width 0.635) (layer Cuivre) (net 11)) - (segment (start 130.81 111.76) (end 130.81 109.6264) (width 0.635) (layer Cuivre) (net 11) (status 800)) - (segment (start 140.335 109.6772) (end 140.335 111.76) (width 0.635) (layer Cuivre) (net 11) (status 400)) - (segment (start 138.4046 107.7468) (end 140.335 109.6772) (width 0.635) (layer Cuivre) (net 11)) + (segment (start 129.54 121.92) (end 135.255 121.92) (width 0.635) (layer Cuivre) (net 10) (status 400)) + (segment (start 128.27 119.38) (end 128.27 120.65) (width 0.635) (layer Cuivre) (net 10) (status 800)) (segment (start 132.6896 107.7468) (end 138.4046 107.7468) (width 0.635) (layer Cuivre) (net 11)) - (segment (start 114.935 116.205) (end 120.015 116.205) (width 0.635) (layer Composant) (net 12)) - (segment (start 114.935 102.235) (end 113.03 104.14) (width 0.635) (layer Composant) (net 12)) - (segment (start 120.65 116.84) (end 120.65 119.38) (width 0.635) (layer Composant) (net 12) (status 400)) - (segment (start 114.935 102.235) (end 127 102.235) (width 0.635) (layer Composant) (net 12)) - (segment (start 127 102.235) (end 139.065 90.17) (width 0.635) (layer Composant) (net 12) (status 400)) - (segment (start 120.015 116.205) (end 120.65 116.84) (width 0.635) (layer Composant) (net 12)) - (segment (start 113.03 104.14) (end 113.03 114.3) (width 0.635) (layer Composant) (net 12)) + (segment (start 138.4046 107.7468) (end 140.335 109.6772) (width 0.635) (layer Cuivre) (net 11)) + (segment (start 140.335 109.6772) (end 140.335 111.76) (width 0.635) (layer Cuivre) (net 11) (status 400)) + (segment (start 130.81 111.76) (end 130.81 109.6264) (width 0.635) (layer Cuivre) (net 11) (status 800)) + (segment (start 130.81 109.6264) (end 132.6896 107.7468) (width 0.635) (layer Cuivre) (net 11)) (segment (start 113.03 114.3) (end 114.935 116.205) (width 0.635) (layer Composant) (net 12)) - (segment (start 146.685 90.17) (end 144.78 88.265) (width 0.635) (layer Cuivre) (net 13)) - (segment (start 147.32 73.025) (end 144.78 75.565) (width 0.635) (layer Cuivre) (net 13)) - (segment (start 144.78 75.565) (end 144.78 88.265) (width 0.635) (layer Cuivre) (net 13)) - (segment (start 147.32 71.12) (end 147.32 73.025) (width 0.635) (layer Cuivre) (net 13)) - (segment (start 144.78 68.58) (end 147.32 71.12) (width 0.635) (layer Cuivre) (net 13) (status 800)) + (segment (start 113.03 104.14) (end 113.03 114.3) (width 0.635) (layer Composant) (net 12)) + (segment (start 120.015 116.205) (end 120.65 116.84) (width 0.635) (layer Composant) (net 12)) + (segment (start 127 102.235) (end 139.065 90.17) (width 0.635) (layer Composant) (net 12) (status 400)) + (segment (start 114.935 102.235) (end 127 102.235) (width 0.635) (layer Composant) (net 12)) + (segment (start 120.65 116.84) (end 120.65 119.38) (width 0.635) (layer Composant) (net 12) (status 400)) + (segment (start 114.935 102.235) (end 113.03 104.14) (width 0.635) (layer Composant) (net 12)) + (segment (start 114.935 116.205) (end 120.015 116.205) (width 0.635) (layer Composant) (net 12)) (segment (start 149.225 90.17) (end 146.685 90.17) (width 0.635) (layer Cuivre) (net 13) (status 800)) + (segment (start 144.78 68.58) (end 147.32 71.12) (width 0.635) (layer Cuivre) (net 13) (status 800)) + (segment (start 147.32 71.12) (end 147.32 73.025) (width 0.635) (layer Cuivre) (net 13)) + (segment (start 144.78 75.565) (end 144.78 88.265) (width 0.635) (layer Cuivre) (net 13)) + (segment (start 147.32 73.025) (end 144.78 75.565) (width 0.635) (layer Cuivre) (net 13)) + (segment (start 146.685 90.17) (end 144.78 88.265) (width 0.635) (layer Cuivre) (net 13)) (segment (start 153.67 77.47) (end 149.225 77.47) (width 0.635) (layer Cuivre) (net 14) (status C00)) - (segment (start 78.74 62.23) (end 83.82 62.23) (width 1.016) (layer Cuivre) (net 15) (status 802)) (segment (start 83.82 62.23) (end 87.63 58.42) (width 1.016) (layer Cuivre) (net 15) (status 402)) + (segment (start 78.74 62.23) (end 83.82 62.23) (width 1.016) (layer Cuivre) (net 15) (status 802)) (segment (start 153.67 87.63) (end 149.225 87.63) (width 0.635) (layer Cuivre) (net 16) (status C00)) - (segment (start 128.27 48.26) (end 129.54 49.53) (width 0.635) (layer Cuivre) (net 17) (status 402)) (segment (start 124.46 48.26) (end 128.27 48.26) (width 0.635) (layer Cuivre) (net 17) (status 802)) - (segment (start 114.3 48.26) (end 114.3 52.07) (width 0.635) (layer Cuivre) (net 18) (status C00)) - (segment (start 110.49 57.15) (end 110.49 53.34) (width 0.4318) (layer Cuivre) (net 18) (status 800)) - (segment (start 110.49 53.34) (end 111.76 52.07) (width 0.4318) (layer Cuivre) (net 18)) + (segment (start 128.27 48.26) (end 129.54 49.53) (width 0.635) (layer Cuivre) (net 17) (status 402)) (segment (start 111.76 52.07) (end 114.3 52.07) (width 0.4318) (layer Cuivre) (net 18) (status 400)) - (segment (start 118.11 57.15) (end 124.46 57.15) (width 0.635) (layer Cuivre) (net 19) (status C02)) - (segment (start 124.46 57.15) (end 124.46 60.96) (width 0.635) (layer Cuivre) (net 19) (status 800)) + (segment (start 110.49 53.34) (end 111.76 52.07) (width 0.4318) (layer Cuivre) (net 18)) + (segment (start 110.49 57.15) (end 110.49 53.34) (width 0.4318) (layer Cuivre) (net 18) (status 800)) + (segment (start 114.3 48.26) (end 114.3 52.07) (width 0.635) (layer Cuivre) (net 18) (status C00)) (segment (start 124.46 60.96) (end 125.73 62.23) (width 0.635) (layer Cuivre) (net 19) (status 400)) - (segment (start 125.73 90.805) (end 127.635 90.805) (width 0.635) (layer Cuivre) (net 20) (status 400)) - (segment (start 124.46 86.36) (end 124.46 89.535) (width 0.635) (layer Cuivre) (net 20)) - (segment (start 118.11 78.74) (end 118.11 80.01) (width 0.635) (layer Cuivre) (net 20) (status 800)) - (segment (start 118.11 80.01) (end 124.46 86.36) (width 0.635) (layer Cuivre) (net 20)) + (segment (start 124.46 57.15) (end 124.46 60.96) (width 0.635) (layer Cuivre) (net 19) (status 800)) + (segment (start 118.11 57.15) (end 124.46 57.15) (width 0.635) (layer Cuivre) (net 19) (status C02)) (segment (start 124.46 89.535) (end 125.73 90.805) (width 0.635) (layer Cuivre) (net 20)) - (segment (start 120.65 76.2) (end 120.65 79.375) (width 0.635) (layer Cuivre) (net 21)) - (segment (start 118.11 75.565) (end 120.015 75.565) (width 0.635) (layer Cuivre) (net 21) (status 800)) - (segment (start 120.015 75.565) (end 120.65 76.2) (width 0.635) (layer Cuivre) (net 21)) - (segment (start 127 85.725) (end 127.635 85.725) (width 0.635) (layer Cuivre) (net 21) (status 400)) + (segment (start 118.11 80.01) (end 124.46 86.36) (width 0.635) (layer Cuivre) (net 20)) + (segment (start 118.11 78.74) (end 118.11 80.01) (width 0.635) (layer Cuivre) (net 20) (status 800)) + (segment (start 124.46 86.36) (end 124.46 89.535) (width 0.635) (layer Cuivre) (net 20)) + (segment (start 125.73 90.805) (end 127.635 90.805) (width 0.635) (layer Cuivre) (net 20) (status 400)) (segment (start 120.65 79.375) (end 127 85.725) (width 0.635) (layer Cuivre) (net 21)) - (segment (start 117.475 84.455) (end 117.475 88.265) (width 0.635) (layer Cuivre) (net 22) (status 400)) - (segment (start 113.665 60.96) (end 113.665 80.645) (width 0.635) (layer Cuivre) (net 22)) - (segment (start 112.395 59.69) (end 113.665 60.96) (width 0.635) (layer Cuivre) (net 22)) - (segment (start 110.49 59.69) (end 112.395 59.69) (width 0.635) (layer Cuivre) (net 22) (status 800)) + (segment (start 127 85.725) (end 127.635 85.725) (width 0.635) (layer Cuivre) (net 21) (status 400)) + (segment (start 120.015 75.565) (end 120.65 76.2) (width 0.635) (layer Cuivre) (net 21)) + (segment (start 118.11 75.565) (end 120.015 75.565) (width 0.635) (layer Cuivre) (net 21) (status 800)) + (segment (start 120.65 76.2) (end 120.65 79.375) (width 0.635) (layer Cuivre) (net 21)) (segment (start 113.665 80.645) (end 117.475 84.455) (width 0.635) (layer Cuivre) (net 22)) - (segment (start 140.97 85.09) (end 139.7 83.82) (width 0.635) (layer Cuivre) (net 23)) - (segment (start 139.7 83.82) (end 139.065 83.82) (width 0.635) (layer Cuivre) (net 23) (status 400)) - (segment (start 140.97 96.52) (end 135.255 96.52) (width 0.635) (layer Cuivre) (net 23) (status 800)) - (segment (start 134.62 97.155) (end 134.62 102.235) (width 0.635) (layer Cuivre) (net 23) (status 400)) - (segment (start 135.255 96.52) (end 134.62 97.155) (width 0.635) (layer Cuivre) (net 23)) + (segment (start 110.49 59.69) (end 112.395 59.69) (width 0.635) (layer Cuivre) (net 22) (status 800)) + (segment (start 112.395 59.69) (end 113.665 60.96) (width 0.635) (layer Cuivre) (net 22)) + (segment (start 113.665 60.96) (end 113.665 80.645) (width 0.635) (layer Cuivre) (net 22)) + (segment (start 117.475 84.455) (end 117.475 88.265) (width 0.635) (layer Cuivre) (net 22) (status 400)) (segment (start 140.97 85.09) (end 140.97 96.52) (width 0.635) (layer Cuivre) (net 23) (status 400)) - (segment (start 153.67 97.155) (end 153.67 97.79) (width 0.635) (layer Cuivre) (net 24) (status 800)) + (segment (start 135.255 96.52) (end 134.62 97.155) (width 0.635) (layer Cuivre) (net 23)) + (segment (start 134.62 97.155) (end 134.62 102.235) (width 0.635) (layer Cuivre) (net 23) (status 400)) + (segment (start 140.97 96.52) (end 135.255 96.52) (width 0.635) (layer Cuivre) (net 23) (status 800)) + (segment (start 139.7 83.82) (end 139.065 83.82) (width 0.635) (layer Cuivre) (net 23) (status 400)) + (segment (start 140.97 85.09) (end 139.7 83.82) (width 0.635) (layer Cuivre) (net 23)) (segment (start 153.67 97.79) (end 158.115 102.235) (width 0.635) (layer Cuivre) (net 24) (status 400)) - (segment (start 148.59 80.645) (end 149.225 81.28) (width 0.635) (layer Cuivre) (net 25)) - (segment (start 146.685 80.645) (end 148.59 80.645) (width 0.635) (layer Cuivre) (net 25) (status 800)) + (segment (start 153.67 97.155) (end 153.67 97.79) (width 0.635) (layer Cuivre) (net 24) (status 800)) (segment (start 149.225 81.28) (end 149.225 83.82) (width 0.635) (layer Cuivre) (net 25) (status 400)) - (segment (start 141.605 73.66) (end 141.605 78.105) (width 0.635) (layer Cuivre) (net 26)) - (segment (start 141.605 78.105) (end 139.065 80.645) (width 0.635) (layer Cuivre) (net 26) (status 400)) - (segment (start 139.065 71.12) (end 141.605 73.66) (width 0.635) (layer Cuivre) (net 26) (status 800)) + (segment (start 146.685 80.645) (end 148.59 80.645) (width 0.635) (layer Cuivre) (net 25) (status 800)) + (segment (start 148.59 80.645) (end 149.225 81.28) (width 0.635) (layer Cuivre) (net 25)) (segment (start 144.78 71.12) (end 139.065 71.12) (width 0.635) (layer Cuivre) (net 26) (status C02)) + (segment (start 139.065 71.12) (end 141.605 73.66) (width 0.635) (layer Cuivre) (net 26) (status 800)) + (segment (start 141.605 78.105) (end 139.065 80.645) (width 0.635) (layer Cuivre) (net 26) (status 400)) + (segment (start 141.605 73.66) (end 141.605 78.105) (width 0.635) (layer Cuivre) (net 26)) (segment (start 152.4 55.245) (end 152.4 58.42) (width 0.635) (layer Cuivre) (net 27) (status 400)) - (segment (start 144.78 63.5) (end 145.415 63.5) (width 0.635) (layer Cuivre) (net 28) (status 800)) - (segment (start 152.4 68.58) (end 152.4 69.85) (width 0.635) (layer Composant) (net 28) (status 800)) - (segment (start 146.05 73.66) (end 147.955 71.755) (width 0.635) (layer Composant) (net 28)) - (segment (start 137.795 74.93) (end 137.795 76.2) (width 0.635) (layer Composant) (net 28)) - (segment (start 137.795 74.93) (end 139.065 73.66) (width 0.635) (layer Composant) (net 28)) - (segment (start 145.415 63.5) (end 147.32 65.405) (width 0.635) (layer Cuivre) (net 28)) - (segment (start 147.955 71.755) (end 150.495 71.755) (width 0.635) (layer Composant) (net 28)) - (segment (start 156.21 58.42) (end 156.21 61.595) (width 0.635) (layer Cuivre) (net 28) (status 800)) - (segment (start 152.4 65.405) (end 152.4 68.58) (width 0.635) (layer Cuivre) (net 28) (status 400)) - (segment (start 156.21 61.595) (end 152.4 65.405) (width 0.635) (layer Cuivre) (net 28)) - (segment (start 149.225 65.405) (end 152.4 68.58) (width 0.635) (layer Cuivre) (net 28) (status 400)) - (segment (start 147.32 65.405) (end 149.225 65.405) (width 0.635) (layer Cuivre) (net 28)) - (segment (start 139.065 73.66) (end 146.05 73.66) (width 0.635) (layer Composant) (net 28)) - (segment (start 137.795 76.2) (end 139.065 77.47) (width 0.635) (layer Composant) (net 28) (status 400)) (segment (start 150.495 71.755) (end 152.4 69.85) (width 0.635) (layer Composant) (net 28)) - (segment (start 106.045 121.92) (end 107.95 121.92) (width 0.635) (layer Cuivre) (net 29) (status 400)) - (segment (start 94.615 124.46) (end 97.155 127) (width 0.635) (layer Cuivre) (net 29)) - (segment (start 97.79 118.11) (end 95.885 118.11) (width 0.635) (layer Cuivre) (net 29) (status 800)) - (segment (start 100.33 118.11) (end 97.79 118.11) (width 0.635) (layer Cuivre) (net 29) (status C02)) - (segment (start 116.205 121.92) (end 118.11 120.015) (width 0.635) (layer Cuivre) (net 29)) - (segment (start 118.11 120.015) (end 118.11 119.38) (width 0.635) (layer Cuivre) (net 29) (status 400)) - (segment (start 107.95 121.92) (end 116.205 121.92) (width 0.635) (layer Cuivre) (net 29) (status 800)) - (segment (start 95.885 118.11) (end 94.615 119.38) (width 0.635) (layer Cuivre) (net 29)) - (segment (start 94.615 119.38) (end 94.615 124.46) (width 0.635) (layer Cuivre) (net 29)) - (segment (start 100.965 127) (end 106.045 121.92) (width 0.635) (layer Cuivre) (net 29)) + (segment (start 137.795 76.2) (end 139.065 77.47) (width 0.635) (layer Composant) (net 28) (status 400)) + (segment (start 139.065 73.66) (end 146.05 73.66) (width 0.635) (layer Composant) (net 28)) + (segment (start 147.32 65.405) (end 149.225 65.405) (width 0.635) (layer Cuivre) (net 28)) + (segment (start 149.225 65.405) (end 152.4 68.58) (width 0.635) (layer Cuivre) (net 28) (status 400)) + (segment (start 156.21 61.595) (end 152.4 65.405) (width 0.635) (layer Cuivre) (net 28)) + (segment (start 152.4 65.405) (end 152.4 68.58) (width 0.635) (layer Cuivre) (net 28) (status 400)) + (segment (start 156.21 58.42) (end 156.21 61.595) (width 0.635) (layer Cuivre) (net 28) (status 800)) + (segment (start 147.955 71.755) (end 150.495 71.755) (width 0.635) (layer Composant) (net 28)) + (segment (start 145.415 63.5) (end 147.32 65.405) (width 0.635) (layer Cuivre) (net 28)) + (segment (start 137.795 74.93) (end 139.065 73.66) (width 0.635) (layer Composant) (net 28)) + (segment (start 137.795 74.93) (end 137.795 76.2) (width 0.635) (layer Composant) (net 28)) + (segment (start 146.05 73.66) (end 147.955 71.755) (width 0.635) (layer Composant) (net 28)) + (segment (start 152.4 68.58) (end 152.4 69.85) (width 0.635) (layer Composant) (net 28) (status 800)) + (segment (start 144.78 63.5) (end 145.415 63.5) (width 0.635) (layer Cuivre) (net 28) (status 800)) (segment (start 97.155 127) (end 100.965 127) (width 0.635) (layer Cuivre) (net 29)) - (segment (start 87.63 71.12) (end 96.52 71.12) (width 1.016) (layer Cuivre) (net 30) (status C02)) - (segment (start 84.455 90.17) (end 84.455 89.535) (width 1.016) (layer Cuivre) (net 30) (status 800)) - (segment (start 82.55 76.2) (end 87.63 71.12) (width 1.016) (layer Cuivre) (net 30) (status 400)) - (segment (start 82.55 87.63) (end 82.55 76.2) (width 1.016) (layer Cuivre) (net 30)) + (segment (start 100.965 127) (end 106.045 121.92) (width 0.635) (layer Cuivre) (net 29)) + (segment (start 94.615 119.38) (end 94.615 124.46) (width 0.635) (layer Cuivre) (net 29)) + (segment (start 95.885 118.11) (end 94.615 119.38) (width 0.635) (layer Cuivre) (net 29)) + (segment (start 107.95 121.92) (end 116.205 121.92) (width 0.635) (layer Cuivre) (net 29) (status 800)) + (segment (start 118.11 120.015) (end 118.11 119.38) (width 0.635) (layer Cuivre) (net 29) (status 400)) + (segment (start 116.205 121.92) (end 118.11 120.015) (width 0.635) (layer Cuivre) (net 29)) + (segment (start 100.33 118.11) (end 97.79 118.11) (width 0.635) (layer Cuivre) (net 29) (status C02)) + (segment (start 97.79 118.11) (end 95.885 118.11) (width 0.635) (layer Cuivre) (net 29) (status 800)) + (segment (start 94.615 124.46) (end 97.155 127) (width 0.635) (layer Cuivre) (net 29)) + (segment (start 106.045 121.92) (end 107.95 121.92) (width 0.635) (layer Cuivre) (net 29) (status 400)) (segment (start 84.455 89.535) (end 82.55 87.63) (width 1.016) (layer Cuivre) (net 30)) - (segment (start 144.78 60.96) (end 139.065 60.96) (width 0.635) (layer Cuivre) (net 31) (status C02)) - (segment (start 149.225 54.61) (end 149.225 59.055) (width 0.635) (layer Cuivre) (net 31) (status 800)) - (segment (start 148.59 63.5) (end 147.32 63.5) (width 0.635) (layer Cuivre) (net 31)) - (segment (start 149.225 59.055) (end 149.86 59.69) (width 0.635) (layer Cuivre) (net 31)) - (segment (start 149.86 62.23) (end 148.59 63.5) (width 0.635) (layer Cuivre) (net 31)) - (segment (start 149.86 59.69) (end 149.86 62.23) (width 0.635) (layer Cuivre) (net 31)) - (segment (start 144.78 60.96) (end 147.32 63.5) (width 0.4318) (layer Cuivre) (net 31) (status 800)) - (segment (start 145.542 49.784) (end 148.082 49.784) (width 0.635) (layer Cuivre) (net 31) (status C00)) - (segment (start 148.082 49.784) (end 148.844 49.784) (width 0.635) (layer Cuivre) (net 31) (status 800)) - (segment (start 149.225 50.165) (end 149.225 54.61) (width 0.635) (layer Cuivre) (net 31) (status 400)) + (segment (start 82.55 87.63) (end 82.55 76.2) (width 1.016) (layer Cuivre) (net 30)) + (segment (start 82.55 76.2) (end 87.63 71.12) (width 1.016) (layer Cuivre) (net 30) (status 400)) + (segment (start 84.455 90.17) (end 84.455 89.535) (width 1.016) (layer Cuivre) (net 30) (status 800)) + (segment (start 87.63 71.12) (end 96.52 71.12) (width 1.016) (layer Cuivre) (net 30) (status C02)) (segment (start 148.844 49.784) (end 149.225 50.165) (width 0.635) (layer Cuivre) (net 31)) - (segment (start 128.27 113.03) (end 125.73 115.57) (width 0.635) (layer Cuivre) (net 32)) - (segment (start 101.6 120.015) (end 106.045 115.57) (width 0.635) (layer Cuivre) (net 32)) - (segment (start 100.33 124.46) (end 97.79 124.46) (width 0.635) (layer Cuivre) (net 32) (status C02)) - (segment (start 106.045 115.57) (end 107.95 115.57) (width 0.635) (layer Cuivre) (net 32) (status 402)) - (segment (start 95.885 122.555) (end 97.79 124.46) (width 0.635) (layer Cuivre) (net 32) (status 400)) - (segment (start 128.27 111.76) (end 128.27 113.03) (width 0.635) (layer Cuivre) (net 32) (status 800)) - (segment (start 107.95 115.57) (end 125.73 115.57) (width 0.635) (layer Cuivre) (net 32) (status 802)) - (segment (start 96.52 120.015) (end 101.6 120.015) (width 0.635) (layer Cuivre) (net 32)) - (segment (start 95.885 120.65) (end 95.885 122.555) (width 0.635) (layer Cuivre) (net 32)) + (segment (start 149.225 50.165) (end 149.225 54.61) (width 0.635) (layer Cuivre) (net 31) (status 400)) + (segment (start 148.082 49.784) (end 148.844 49.784) (width 0.635) (layer Cuivre) (net 31) (status 800)) + (segment (start 145.542 49.784) (end 148.082 49.784) (width 0.635) (layer Cuivre) (net 31) (status C00)) + (segment (start 144.78 60.96) (end 147.32 63.5) (width 0.4318) (layer Cuivre) (net 31) (status 800)) + (segment (start 149.86 59.69) (end 149.86 62.23) (width 0.635) (layer Cuivre) (net 31)) + (segment (start 149.86 62.23) (end 148.59 63.5) (width 0.635) (layer Cuivre) (net 31)) + (segment (start 149.225 59.055) (end 149.86 59.69) (width 0.635) (layer Cuivre) (net 31)) + (segment (start 148.59 63.5) (end 147.32 63.5) (width 0.635) (layer Cuivre) (net 31)) + (segment (start 149.225 54.61) (end 149.225 59.055) (width 0.635) (layer Cuivre) (net 31) (status 800)) + (segment (start 144.78 60.96) (end 139.065 60.96) (width 0.635) (layer Cuivre) (net 31) (status C02)) (segment (start 96.52 120.015) (end 95.885 120.65) (width 0.635) (layer Cuivre) (net 32)) - (segment (start 100.33 111.76) (end 104.267 111.76) (width 0.635) (layer Cuivre) (net 33) (status 802)) - (segment (start 100.33 111.76) (end 97.79 111.76) (width 0.635) (layer Cuivre) (net 33) (status C02)) - (segment (start 111.76 109.855) (end 111.76 119.38) (width 0.635) (layer Composant) (net 33)) - (segment (start 125.73 120.65) (end 125.73 119.38) (width 0.635) (layer Composant) (net 33) (status 402)) - (segment (start 115.57 123.19) (end 123.19 123.19) (width 0.635) (layer Composant) (net 33)) - (segment (start 111.125 109.22) (end 111.76 109.855) (width 0.635) (layer Composant) (net 33)) - (segment (start 111.76 119.38) (end 115.57 123.19) (width 0.635) (layer Composant) (net 33)) - (segment (start 123.19 123.19) (end 125.73 120.65) (width 0.635) (layer Composant) (net 33) (status 2)) - (segment (start 107.95 109.22) (end 111.125 109.22) (width 0.635) (layer Composant) (net 33) (status 800)) - (segment (start 107.95 109.22) (end 106.807 109.22) (width 0.635) (layer Cuivre) (net 33) (status 800)) + (segment (start 95.885 120.65) (end 95.885 122.555) (width 0.635) (layer Cuivre) (net 32)) + (segment (start 96.52 120.015) (end 101.6 120.015) (width 0.635) (layer Cuivre) (net 32)) + (segment (start 107.95 115.57) (end 125.73 115.57) (width 0.635) (layer Cuivre) (net 32) (status 802)) + (segment (start 128.27 111.76) (end 128.27 113.03) (width 0.635) (layer Cuivre) (net 32) (status 800)) + (segment (start 95.885 122.555) (end 97.79 124.46) (width 0.635) (layer Cuivre) (net 32) (status 400)) + (segment (start 106.045 115.57) (end 107.95 115.57) (width 0.635) (layer Cuivre) (net 32) (status 402)) + (segment (start 100.33 124.46) (end 97.79 124.46) (width 0.635) (layer Cuivre) (net 32) (status C02)) + (segment (start 101.6 120.015) (end 106.045 115.57) (width 0.635) (layer Cuivre) (net 32)) + (segment (start 128.27 113.03) (end 125.73 115.57) (width 0.635) (layer Cuivre) (net 32)) (segment (start 106.807 109.22) (end 104.267 111.76) (width 0.635) (layer Cuivre) (net 33)) - (segment (start 133.985 87.63) (end 126.365 80.01) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 114.3 93.345) (end 130.81 93.345) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 134.62 89.535) (end 134.62 87.63) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 118.11 64.77) (end 120.65 64.77) (width 1.016) (layer Cuivre) (net 34) (status 802)) - (segment (start 123.19 67.31) (end 120.65 64.77) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 123.825 67.31) (end 123.19 67.31) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 107.95 111.76) (end 115.57 111.76) (width 1.016) (layer Cuivre) (net 34) (status C02)) - (segment (start 134.62 87.63) (end 133.985 87.63) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 143.51 96.52) (end 144.78 96.52) (width 1.016) (layer Cuivre) (net 34) (status 800)) - (segment (start 144.78 96.52) (end 147.32 96.52) (width 1.016) (layer Cuivre) (net 34) (status 400)) - (segment (start 144.78 102.235) (end 144.78 96.52) (width 1.016) (layer Cuivre) (net 34) (status 800)) - (segment (start 110.49 123.825) (end 109.855 124.46) (width 1.016) (layer Composant) (net 34)) - (segment (start 126.365 80.01) (end 124.46 80.01) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 124.46 80.01) (end 123.825 79.375) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 139.065 87.63) (end 134.62 87.63) (width 1.016) (layer Cuivre) (net 34) (status 800)) - (segment (start 101.6 71.12) (end 107.95 71.12) (width 1.016) (layer Cuivre) (net 34) (status 800)) - (segment (start 115.57 98.425) (end 115.57 104.775) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 114.3 93.345) (end 114.3 97.155) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 114.3 97.155) (end 115.57 98.425) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 115.57 111.76) (end 115.57 104.775) (width 1.016) (layer Cuivre) (net 34) (status 800)) - (segment (start 123.825 79.375) (end 123.825 67.31) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 130.81 93.345) (end 134.62 89.535) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 186.69 106.045) (end 187.96 104.775) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 196.85 106.68) (end 194.945 104.775) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 196.85 112.395) (end 196.85 106.68) (width 1.016) (layer Cuivre) (net 34) (status 800)) - (segment (start 186.69 109.22) (end 186.69 106.045) (width 1.016) (layer Cuivre) (net 34) (status 800)) - (segment (start 187.96 104.775) (end 194.945 104.775) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 110.49 119.38) (end 110.49 123.825) (width 1.016) (layer Composant) (net 34)) - (segment (start 110.49 84.455) (end 114.3 88.265) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 114.3 88.265) (end 114.3 93.345) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 110.49 78.74) (end 110.49 84.455) (width 1.016) (layer Cuivre) (net 34) (status 800)) - (segment (start 110.49 73.66) (end 107.95 71.12) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 110.49 78.74) (end 110.49 73.66) (width 1.016) (layer Cuivre) (net 34) (status 800)) - (segment (start 125.73 67.31) (end 123.825 67.31) (width 1.016) (layer Cuivre) (net 34) (status 800)) - (segment (start 107.95 111.76) (end 109.855 111.76) (width 1.016) (layer Composant) (net 34) (status 800)) - (segment (start 109.22 118.11) (end 107.95 118.11) (width 1.016) (layer Composant) (net 34) (status 400)) - (segment (start 110.49 116.84) (end 109.22 118.11) (width 1.016) (layer Composant) (net 34)) - (segment (start 110.49 112.395) (end 110.49 116.84) (width 1.016) (layer Composant) (net 34)) - (segment (start 109.855 111.76) (end 110.49 112.395) (width 1.016) (layer Composant) (net 34)) - (segment (start 109.22 118.11) (end 110.49 119.38) (width 1.016) (layer Composant) (net 34)) - (segment (start 109.855 124.46) (end 107.95 124.46) (width 1.016) (layer Composant) (net 34) (status 400)) - (segment (start 143.51 96.52) (end 142.24 97.79) (width 1.016) (layer Cuivre) (net 34) (status 800)) - (segment (start 137.16 99.06) (end 137.16 103.505) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 138.43 97.79) (end 137.16 99.06) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 142.24 97.79) (end 138.43 97.79) (width 0.4826) (layer Cuivre) (net 34)) - (segment (start 147.32 96.52) (end 148.59 96.52) (width 1.016) (layer Cuivre) (net 34) (status 800)) - (segment (start 186.69 106.045) (end 186.69 109.22) (width 1.016) (layer Composant) (net 34) (status 400)) - (segment (start 185.42 104.775) (end 186.69 106.045) (width 1.016) (layer Composant) (net 34)) - (segment (start 170.18 104.775) (end 185.42 104.775) (width 1.016) (layer Composant) (net 34)) - (via (at 170.18 104.775) (size 1.651) (layers Composant Cuivre) (net 34)) - (segment (start 167.64 104.775) (end 170.18 104.775) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 165.735 106.68) (end 167.64 104.775) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 158.75 106.68) (end 165.735 106.68) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 148.59 96.52) (end 158.75 106.68) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 135.89 104.775) (end 115.57 104.775) (width 1.016) (layer Cuivre) (net 34)) + (segment (start 107.95 109.22) (end 106.807 109.22) (width 0.635) (layer Cuivre) (net 33) (status 800)) + (segment (start 107.95 109.22) (end 111.125 109.22) (width 0.635) (layer Composant) (net 33) (status 800)) + (segment (start 123.19 123.19) (end 125.73 120.65) (width 0.635) (layer Composant) (net 33) (status 2)) + (segment (start 111.76 119.38) (end 115.57 123.19) (width 0.635) (layer Composant) (net 33)) + (segment (start 111.125 109.22) (end 111.76 109.855) (width 0.635) (layer Composant) (net 33)) + (segment (start 115.57 123.19) (end 123.19 123.19) (width 0.635) (layer Composant) (net 33)) + (segment (start 125.73 120.65) (end 125.73 119.38) (width 0.635) (layer Composant) (net 33) (status 402)) + (segment (start 111.76 109.855) (end 111.76 119.38) (width 0.635) (layer Composant) (net 33)) + (segment (start 100.33 111.76) (end 97.79 111.76) (width 0.635) (layer Cuivre) (net 33) (status C02)) + (segment (start 100.33 111.76) (end 104.267 111.76) (width 0.635) (layer Cuivre) (net 33) (status 802)) (segment (start 137.16 103.505) (end 135.89 104.775) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 136.525 57.15) (end 133.985 59.69) (width 0.635) (layer Cuivre) (net 35)) - (segment (start 133.985 68.58) (end 128.27 74.295) (width 0.635) (layer Cuivre) (net 35)) - (segment (start 133.985 62.23) (end 133.985 68.58) (width 0.635) (layer Cuivre) (net 35) (status 800)) - (segment (start 137.16 56.515) (end 139.065 54.61) (width 0.635) (layer Cuivre) (net 35) (status 400)) - (segment (start 137.16 57.15) (end 137.16 56.515) (width 0.635) (layer Cuivre) (net 35) (status 800)) - (segment (start 136.525 57.15) (end 137.16 57.15) (width 0.635) (layer Cuivre) (net 35) (status 400)) - (segment (start 143.51 57.15) (end 147.32 60.96) (width 0.635) (layer Cuivre) (net 35) (status 400)) - (segment (start 137.16 57.15) (end 143.51 57.15) (width 0.635) (layer Cuivre) (net 35) (status 800)) - (segment (start 133.985 62.23) (end 133.985 59.69) (width 0.635) (layer Cuivre) (net 35) (status 800)) - (segment (start 128.27 74.295) (end 128.27 75.565) (width 0.635) (layer Cuivre) (net 35) (status 400)) - (segment (start 139.065 54.61) (end 139.065 51.181) (width 0.635) (layer Cuivre) (net 35) (status 800)) - (segment (start 140.462 49.784) (end 143.002 49.784) (width 0.635) (layer Cuivre) (net 35) (status 400)) + (segment (start 135.89 104.775) (end 115.57 104.775) (width 1.016) (layer Cuivre) (net 34)) + (segment (start 148.59 96.52) (end 158.75 106.68) (width 1.016) (layer Cuivre) (net 34)) + (segment (start 158.75 106.68) (end 165.735 106.68) (width 1.016) (layer Cuivre) (net 34)) + (segment (start 165.735 106.68) (end 167.64 104.775) (width 1.016) (layer Cuivre) (net 34)) + (segment (start 167.64 104.775) (end 170.18 104.775) (width 1.016) (layer Cuivre) (net 34)) + (via (at 170.18 104.775) (size 1.651) (layers Composant Cuivre) (net 34)) + (segment (start 170.18 104.775) (end 185.42 104.775) (width 1.016) (layer Composant) (net 34)) + (segment (start 185.42 104.775) (end 186.69 106.045) (width 1.016) (layer Composant) (net 34)) + (segment (start 186.69 106.045) (end 186.69 109.22) (width 1.016) (layer Composant) (net 34) (status 400)) + (segment (start 147.32 96.52) (end 148.59 96.52) (width 1.016) (layer Cuivre) (net 34) (status 800)) + (segment (start 142.24 97.79) (end 138.43 97.79) (width 0.4826) (layer Cuivre) (net 34)) + (segment (start 138.43 97.79) (end 137.16 99.06) (width 1.016) (layer Cuivre) (net 34)) + (segment (start 137.16 99.06) (end 137.16 103.505) (width 1.016) (layer Cuivre) (net 34)) + (segment (start 143.51 96.52) (end 142.24 97.79) (width 1.016) (layer Cuivre) (net 34) (status 800)) + (segment (start 109.855 124.46) (end 107.95 124.46) (width 1.016) (layer Composant) (net 34) (status 400)) + (segment (start 109.22 118.11) (end 110.49 119.38) (width 1.016) (layer Composant) (net 34)) + (segment (start 109.855 111.76) (end 110.49 112.395) (width 1.016) (layer Composant) (net 34)) + (segment (start 110.49 112.395) (end 110.49 116.84) (width 1.016) (layer Composant) (net 34)) + (segment (start 110.49 116.84) (end 109.22 118.11) (width 1.016) (layer Composant) (net 34)) + (segment (start 109.22 118.11) (end 107.95 118.11) (width 1.016) (layer Composant) (net 34) (status 400)) + (segment (start 107.95 111.76) (end 109.855 111.76) (width 1.016) (layer Composant) (net 34) (status 800)) + (segment (start 125.73 67.31) (end 123.825 67.31) (width 1.016) (layer Cuivre) (net 34) (status 800)) + (segment (start 110.49 78.74) (end 110.49 73.66) (width 1.016) (layer Cuivre) (net 34) (status 800)) + (segment (start 110.49 73.66) (end 107.95 71.12) (width 1.016) (layer Cuivre) (net 34)) + (segment (start 110.49 78.74) (end 110.49 84.455) (width 1.016) (layer Cuivre) (net 34) (status 800)) + (segment (start 114.3 88.265) (end 114.3 93.345) (width 1.016) (layer Cuivre) (net 34)) + (segment (start 110.49 84.455) (end 114.3 88.265) (width 1.016) (layer Cuivre) (net 34)) + (segment (start 110.49 119.38) (end 110.49 123.825) (width 1.016) (layer Composant) (net 34)) + (segment (start 187.96 104.775) (end 194.945 104.775) (width 1.016) (layer Cuivre) (net 34)) + (segment (start 186.69 109.22) (end 186.69 106.045) (width 1.016) (layer Cuivre) (net 34) (status 800)) + (segment (start 196.85 112.395) (end 196.85 106.68) (width 1.016) (layer Cuivre) (net 34) (status 800)) + (segment (start 196.85 106.68) (end 194.945 104.775) (width 1.016) (layer Cuivre) (net 34)) + (segment (start 186.69 106.045) (end 187.96 104.775) (width 1.016) (layer Cuivre) (net 34)) + (segment (start 130.81 93.345) (end 134.62 89.535) (width 1.016) (layer Cuivre) (net 34)) + (segment (start 123.825 79.375) (end 123.825 67.31) (width 1.016) (layer Cuivre) (net 34)) + (segment (start 115.57 111.76) (end 115.57 104.775) (width 1.016) (layer Cuivre) (net 34) (status 800)) + (segment (start 114.3 97.155) (end 115.57 98.425) (width 1.016) (layer Cuivre) (net 34)) + (segment (start 114.3 93.345) (end 114.3 97.155) (width 1.016) (layer Cuivre) (net 34)) + (segment (start 115.57 98.425) (end 115.57 104.775) (width 1.016) (layer Cuivre) (net 34)) + (segment (start 101.6 71.12) (end 107.95 71.12) (width 1.016) (layer Cuivre) (net 34) (status 800)) + (segment (start 139.065 87.63) (end 134.62 87.63) (width 1.016) (layer Cuivre) (net 34) (status 800)) + (segment (start 124.46 80.01) (end 123.825 79.375) (width 1.016) (layer Cuivre) (net 34)) + (segment (start 126.365 80.01) (end 124.46 80.01) (width 1.016) (layer Cuivre) (net 34)) + (segment (start 110.49 123.825) (end 109.855 124.46) (width 1.016) (layer Composant) (net 34)) + (segment (start 144.78 102.235) (end 144.78 96.52) (width 1.016) (layer Cuivre) (net 34) (status 800)) + (segment (start 144.78 96.52) (end 147.32 96.52) (width 1.016) (layer Cuivre) (net 34) (status 400)) + (segment (start 143.51 96.52) (end 144.78 96.52) (width 1.016) (layer Cuivre) (net 34) (status 800)) + (segment (start 134.62 87.63) (end 133.985 87.63) (width 1.016) (layer Cuivre) (net 34)) + (segment (start 107.95 111.76) (end 115.57 111.76) (width 1.016) (layer Cuivre) (net 34) (status C02)) + (segment (start 123.825 67.31) (end 123.19 67.31) (width 1.016) (layer Cuivre) (net 34)) + (segment (start 123.19 67.31) (end 120.65 64.77) (width 1.016) (layer Cuivre) (net 34)) + (segment (start 118.11 64.77) (end 120.65 64.77) (width 1.016) (layer Cuivre) (net 34) (status 802)) + (segment (start 134.62 89.535) (end 134.62 87.63) (width 1.016) (layer Cuivre) (net 34)) + (segment (start 114.3 93.345) (end 130.81 93.345) (width 1.016) (layer Cuivre) (net 34)) + (segment (start 133.985 87.63) (end 126.365 80.01) (width 1.016) (layer Cuivre) (net 34)) (segment (start 139.065 51.181) (end 140.462 49.784) (width 0.635) (layer Cuivre) (net 35)) + (segment (start 140.462 49.784) (end 143.002 49.784) (width 0.635) (layer Cuivre) (net 35) (status 400)) + (segment (start 139.065 54.61) (end 139.065 51.181) (width 0.635) (layer Cuivre) (net 35) (status 800)) + (segment (start 128.27 74.295) (end 128.27 75.565) (width 0.635) (layer Cuivre) (net 35) (status 400)) + (segment (start 133.985 62.23) (end 133.985 59.69) (width 0.635) (layer Cuivre) (net 35) (status 800)) + (segment (start 137.16 57.15) (end 143.51 57.15) (width 0.635) (layer Cuivre) (net 35) (status 800)) + (segment (start 143.51 57.15) (end 147.32 60.96) (width 0.635) (layer Cuivre) (net 35) (status 400)) + (segment (start 136.525 57.15) (end 137.16 57.15) (width 0.635) (layer Cuivre) (net 35) (status 400)) + (segment (start 137.16 57.15) (end 137.16 56.515) (width 0.635) (layer Cuivre) (net 35) (status 800)) + (segment (start 137.16 56.515) (end 139.065 54.61) (width 0.635) (layer Cuivre) (net 35) (status 400)) + (segment (start 133.985 62.23) (end 133.985 68.58) (width 0.635) (layer Cuivre) (net 35) (status 800)) + (segment (start 133.985 68.58) (end 128.27 74.295) (width 0.635) (layer Cuivre) (net 35)) + (segment (start 136.525 57.15) (end 133.985 59.69) (width 0.635) (layer Cuivre) (net 35)) (zone (net 9) (net_name GND) (layer Cuivre) (tstamp 48F6319A) (hatch edge 0.508) (connect_pads (clearance 0.508)) diff --git a/demos/microwave/microwave.kicad_pcb b/demos/microwave/microwave.kicad_pcb index 8f7707f62d..93f8180f1c 100644 --- a/demos/microwave/microwave.kicad_pcb +++ b/demos/microwave/microwave.kicad_pcb @@ -16,20 +16,20 @@ (layers (15 Dessus.Cu signal) (0 Dessous.Cu 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 (last_trace_width 0.254) @@ -100,10 +100,10 @@ (module POLY (layer Dessus.Cu) (tedit 42809A8C) (tstamp 0) (at 203.2 144.78) - (fp_text reference POLY (at 0 0.0762) (layer Dessus.SilkS) + (fp_text reference POLY (at 0 0.0762) (layer F.SilkS) (effects (font (size 0.0762 0.0762) (thickness 0.2032))) ) - (fp_text value VAL** (at 0 -0.0762) (layer Dessus.SilkS) + (fp_text value VAL** (at 0 -0.0762) (layer F.SilkS) (effects (font (size 0.0762 0.0762) (thickness 0.2032))) ) (fp_poly (pts (xy -135.7503 0) (xy -135.7503 -0.61214) (xy -135.24738 -0.61214) (xy -134.74446 -0.6096) @@ -387,10 +387,10 @@ (module POLY (layer Dessus.Cu) (tedit 4278D8F6) (tstamp 0) (at 203.17968 117.21084) - (fp_text reference POLY (at 0 0.0762) (layer Dessus.SilkS) + (fp_text reference POLY (at 0 0.0762) (layer F.SilkS) (effects (font (size 0.0762 0.0762) (thickness 0.2032))) ) - (fp_text value VAL** (at 0 -0.0762) (layer Dessus.SilkS) + (fp_text value VAL** (at 0 -0.0762) (layer F.SilkS) (effects (font (size 0.0762 0.0762) (thickness 0.2032))) ) (fp_poly (pts (xy -135.7503 0) (xy -135.7503 0.61214) (xy -135.24738 0.61214) (xy -134.74446 0.6096) @@ -539,10 +539,10 @@ (module POLY (layer Dessus.Cu) (tedit 4278D8F1) (tstamp 0) (at 203.2 119.38) - (fp_text reference POLY (at 0 0.0762) (layer Dessus.SilkS) + (fp_text reference POLY (at 0 0.0762) (layer F.SilkS) (effects (font (size 0.0762 0.0762) (thickness 0.2032))) ) - (fp_text value VAL** (at 0 -0.0762) (layer Dessus.SilkS) + (fp_text value VAL** (at 0 -0.0762) (layer F.SilkS) (effects (font (size 0.0762 0.0762) (thickness 0.2032))) ) (fp_poly (pts (xy -135.7503 0) (xy -135.7503 -0.61214) (xy -135.24738 -0.61214) (xy -134.74446 -0.6096) @@ -826,10 +826,10 @@ (module POLY (layer Dessus.Cu) (tedit 4278D8EB) (tstamp 0) (at 203.18984 121.54408) - (fp_text reference POLY (at 0 0.0762) (layer Dessus.SilkS) + (fp_text reference POLY (at 0 0.0762) (layer F.SilkS) (effects (font (size 0.0762 0.0762) (thickness 0.2032))) ) - (fp_text value VAL** (at 0 -0.0762) (layer Dessus.SilkS) + (fp_text value VAL** (at 0 -0.0762) (layer F.SilkS) (effects (font (size 0.0762 0.0762) (thickness 0.2032))) ) (fp_poly (pts (xy -135.7503 0) (xy -135.7503 -0.61214) (xy -135.24738 -0.61214) (xy -134.74446 -0.6096) @@ -976,12 +976,12 @@ ) ) - (gr_line (start 203.50988 120.54332) (end 203.50988 120.55348) (angle 90) (layer Dessin.User) (width 0.3048)) - (gr_line (start 202.84694 120.54332) (end 203.50988 120.54332) (angle 90) (layer Dessin.User) (width 0.3048)) - (gr_line (start 162.4076 120.38076) (end 164.10178 120.38076) (angle 90) (layer Dessin.User) (width 0.3048)) - (gr_line (start 59.69 201.93) (end 59.69 81.28) (angle 90) (layer Contours.Ci) (width 0.3048)) - (gr_line (start 351.79 201.93) (end 59.69 201.93) (angle 90) (layer Contours.Ci) (width 0.3048)) - (gr_line (start 351.79 81.28) (end 351.79 201.93) (angle 90) (layer Contours.Ci) (width 0.3048)) - (gr_line (start 59.69 81.28) (end 351.79 81.28) (angle 90) (layer Contours.Ci) (width 0.3048)) + (gr_line (start 203.50988 120.54332) (end 203.50988 120.55348) (angle 90) (layer Dwgs.User) (width 0.3048)) + (gr_line (start 202.84694 120.54332) (end 203.50988 120.54332) (angle 90) (layer Dwgs.User) (width 0.3048)) + (gr_line (start 162.4076 120.38076) (end 164.10178 120.38076) (angle 90) (layer Dwgs.User) (width 0.3048)) + (gr_line (start 59.69 201.93) (end 59.69 81.28) (angle 90) (layer Edge.Cuts) (width 0.3048)) + (gr_line (start 351.79 201.93) (end 59.69 201.93) (angle 90) (layer Edge.Cuts) (width 0.3048)) + (gr_line (start 351.79 81.28) (end 351.79 201.93) (angle 90) (layer Edge.Cuts) (width 0.3048)) + (gr_line (start 59.69 81.28) (end 351.79 81.28) (angle 90) (layer Edge.Cuts) (width 0.3048)) ) diff --git a/demos/test_pads_inside_pads/test_pads_inside_pads.kicad_pcb b/demos/test_pads_inside_pads/test_pads_inside_pads.kicad_pcb index fce4da77c9..d9aaffd3cd 100644 --- a/demos/test_pads_inside_pads/test_pads_inside_pads.kicad_pcb +++ b/demos/test_pads_inside_pads/test_pads_inside_pads.kicad_pcb @@ -16,19 +16,19 @@ (layers (15 Dessus signal) (0 Dessous 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 @@ -107,55 +107,55 @@ (descr "module 1 pin (ou trou mecanique de percage)") (tags DEV) (path /4EDF7CC5) - (fp_text reference P1 (at 0 -3.048) (layer Dessus.SilkS) + (fp_text reference P1 (at 0 -3.048) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.254))) ) - (fp_text value CONN_1 (at 0 2.794) (layer Dessus.SilkS) hide + (fp_text value CONN_1 (at 0 2.794) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.254))) ) - (fp_circle (center 0 0) (end 0 -2.286) (layer Dessus.SilkS) (width 0.381)) + (fp_circle (center 0 0) (end 0 -2.286) (layer F.SilkS) (width 0.381)) (pad 1 smd rect (at 0 0) (size 20.32 20.32) - (layers Dessus Dessus.Pate Dessus.Masque) + (layers Dessus F.Paste F.Mask) (net 2 /NET2) ) (pad 1 thru_hole circle (at -8.255 -7.62) (size 1.524 1.524) (drill 0.762) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 2 /NET2) ) (pad 1 thru_hole circle (at -3.81 -7.62) (size 1.524 1.524) (drill 0.762) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 2 /NET2) ) (pad 1 thru_hole circle (at 0 -7.62) (size 1.524 1.524) (drill 0.762) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 2 /NET2) ) (pad 1 thru_hole circle (at 3.81 -7.62) (size 1.524 1.524) (drill 0.762) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 2 /NET2) ) (pad 1 thru_hole circle (at 8.255 -7.62) (size 1.524 1.524) (drill 0.762) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 2 /NET2) ) (pad 1 thru_hole circle (at 8.255 -4.445) (size 1.524 1.524) (drill 0.762) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 2 /NET2) ) (pad 1 thru_hole circle (at 3.81 -4.445) (size 1.524 1.524) (drill 0.762) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 2 /NET2) ) (pad 1 thru_hole circle (at 0 -4.445) (size 1.524 1.524) (drill 0.762) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 2 /NET2) ) (pad 1 thru_hole circle (at -3.81 -4.445) (size 1.524 1.524) (drill 0.762) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 2 /NET2) ) (pad 1 thru_hole circle (at -8.255 -4.445) (size 1.524 1.524) (drill 0.762) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 2 /NET2) ) ) @@ -165,15 +165,15 @@ (descr "module 1 pin (ou trou mecanique de percage)") (tags DEV) (path /4EDF7CC0) - (fp_text reference P2 (at 0 -3.048) (layer Dessus.SilkS) + (fp_text reference P2 (at 0 -3.048) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.254))) ) - (fp_text value CONN_1 (at 0 2.794) (layer Dessus.SilkS) hide + (fp_text value CONN_1 (at 0 2.794) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.254))) ) - (fp_circle (center 0 0) (end 0 -2.286) (layer Dessus.SilkS) (width 0.381)) + (fp_circle (center 0 0) (end 0 -2.286) (layer F.SilkS) (width 0.381)) (pad 1 thru_hole circle (at 0 0) (size 4.064 4.064) (drill 3.048) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 2 /NET2) ) ) @@ -183,15 +183,15 @@ (descr "module 1 pin (ou trou mecanique de percage)") (tags DEV) (path /4EE5056C) - (fp_text reference P3 (at 0 -3.048) (layer Dessus.SilkS) + (fp_text reference P3 (at 0 -3.048) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.254))) ) - (fp_text value CONN_1 (at 0 2.794) (layer Dessus.SilkS) hide + (fp_text value CONN_1 (at 0 2.794) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.254))) ) - (fp_circle (center 0 0) (end 0 -2.286) (layer Dessus.SilkS) (width 0.381)) + (fp_circle (center 0 0) (end 0 -2.286) (layer F.SilkS) (width 0.381)) (pad 1 thru_hole circle (at 0 0) (size 4.064 4.064) (drill 3.048) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 1 /NET1) ) ) @@ -201,15 +201,15 @@ (descr "module 1 pin (ou trou mecanique de percage)") (tags DEV) (path /4EE5056D) - (fp_text reference P4 (at 0 -3.048) (layer Dessus.SilkS) + (fp_text reference P4 (at 0 -3.048) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.254))) ) - (fp_text value CONN_1 (at 0 2.794) (layer Dessus.SilkS) hide + (fp_text value CONN_1 (at 0 2.794) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.254))) ) - (fp_circle (center 0 0) (end 0 -2.286) (layer Dessus.SilkS) (width 0.381)) + (fp_circle (center 0 0) (end 0 -2.286) (layer F.SilkS) (width 0.381)) (pad 1 thru_hole circle (at 0 0) (size 4.064 4.064) (drill 3.048) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 1 /NET1) (die_length 7.62) ) diff --git a/demos/test_xil_95108/carte_test.kicad_pcb b/demos/test_xil_95108/carte_test.kicad_pcb index e7a66ae81e..ea4eb73e1b 100644 --- a/demos/test_xil_95108/carte_test.kicad_pcb +++ b/demos/test_xil_95108/carte_test.kicad_pcb @@ -1,9 +1,9 @@ -(kicad_pcb (version 3) (host pcbnew "(2014-01-08 BZR 4616)-product") +(kicad_pcb (version 4) (host pcbnew "(2014-07-02 BZR 4969)-product") (general (links 173) (no_connects 0) - (area 94.462599 36.042599 196.367401 136.042401) + (area 82.143599 36.042599 197.642238 148.361401) (thickness 1.6002) (drawings 31) (tracks 757) @@ -19,21 +19,21 @@ ) (layers - (15 Dessus signal) - (0 Dessous signal) - (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 Edge.Cuts user) + (0 Dessus signal) + (31 Dessous signal) + (32 B.Adhes user) + (33 F.Adhes user) + (34 B.Paste user) + (35 F.Paste user) + (36 B.SilkS user) + (37 F.SilkS user) + (38 B.Mask user) + (39 F.Mask user) + (40 Dwgs.User user) + (41 Cmts.User user) + (42 Eco1.User user) + (43 Eco2.User user) + (44 Edge.Cuts user) ) (setup @@ -65,8 +65,8 @@ (aux_axis_origin 0 0) (visible_elements 7FFFFFFF) (pcbplotparams - (layerselection 3178497) - (usegerberextensions true) + (layerselection 0x00030_80000001) + (usegerberextensions false) (excludeedgelayer true) (linewidth 0.150000) (plotframeref false) @@ -81,13 +81,12 @@ (psa4output false) (plotreference true) (plotvalue true) - (plotothertext true) (plotinvisibletext false) (padsonsilk false) (subtractmaskfromsilk false) (outputformat 1) (mirror false) - (drillshape 1) + (drillshape 0) (scaleselection 1) (outputdirectory "")) ) @@ -184,7 +183,6 @@ (via_drill 0.635) (uvia_dia 0.508) (uvia_drill 0.127) - (add_net "") (add_net +12V) (add_net -12V) (add_net /CSMEM) @@ -1973,763 +1971,763 @@ (gr_line (start 94.615 46.355) (end 94.615 53.975) (angle 90) (layer Edge.Cuts) (width 0.3048)) (gr_line (start 94.615 53.975) (end 94.615 132.715) (angle 90) (layer Edge.Cuts) (width 0.3048)) - (segment (start 131.445 41.91) (end 125.095 41.91) (width 1.016) (layer Dessus) (net 1)) - (segment (start 160.02 59.055) (end 159.385 58.42) (width 1.016) (layer Dessus) (net 1)) - (segment (start 155.575 113.665) (end 155.575 117.475) (width 1.016) (layer Dessous) (net 1) (status 400)) - (segment (start 158.75 40.005) (end 133.35 40.005) (width 1.016) (layer Dessus) (net 1)) - (segment (start 159.385 58.42) (end 159.385 40.64) (width 1.016) (layer Dessus) (net 1)) - (segment (start 159.385 40.64) (end 158.75 40.005) (width 1.016) (layer Dessus) (net 1)) - (segment (start 169.545 112.395) (end 163.83 112.395) (width 1.016) (layer Dessous) (net 1)) - (segment (start 173.99 59.055) (end 160.02 59.055) (width 1.016) (layer Dessus) (net 1)) - (segment (start 133.35 40.005) (end 131.445 41.91) (width 1.016) (layer Dessus) (net 1)) - (segment (start 163.83 106.68) (end 163.83 112.395) (width 1.016) (layer Dessous) (net 1) (status 800)) - (segment (start 179.705 112.395) (end 179.705 110.49) (width 1.016) (layer Dessus) (net 1) (status 800)) - (segment (start 125.095 41.91) (end 124.46 41.275) (width 1.016) (layer Dessus) (net 1)) - (segment (start 124.46 41.275) (end 124.46 39.37) (width 1.016) (layer Dessus) (net 1) (status 400)) - (segment (start 186.69 107.315) (end 186.69 71.755) (width 1.016) (layer Dessus) (net 1)) - (segment (start 186.69 71.755) (end 185.42 70.485) (width 1.016) (layer Dessus) (net 1)) - (segment (start 163.83 112.395) (end 156.845 112.395) (width 1.016) (layer Dessous) (net 1)) - (segment (start 185.42 108.585) (end 186.69 107.315) (width 1.016) (layer Dessus) (net 1)) - (segment (start 169.545 112.395) (end 179.705 112.395) (width 1.016) (layer Dessous) (net 1) (status 400)) - (segment (start 179.705 110.49) (end 183.515 110.49) (width 1.016) (layer Dessus) (net 1)) - (segment (start 183.515 110.49) (end 185.42 108.585) (width 1.016) (layer Dessus) (net 1)) - (segment (start 156.845 112.395) (end 155.575 113.665) (width 1.016) (layer Dessous) (net 1)) (segment (start 185.42 70.485) (end 173.99 59.055) (width 1.016) (layer Dessus) (net 1)) - (segment (start 194.31 94.615) (end 194.31 49.53) (width 1.016) (layer Dessous) (net 2) (status 800)) - (segment (start 129.54 46.99) (end 131.445 46.99) (width 1.016) (layer Dessous) (net 2) (status 800)) - (segment (start 174.625 46.355) (end 191.135 46.355) (width 1.016) (layer Dessous) (net 2)) - (segment (start 160.02 43.815) (end 162.56 41.275) (width 1.016) (layer Dessous) (net 2)) - (segment (start 169.545 41.275) (end 174.625 46.355) (width 1.016) (layer Dessous) (net 2)) - (segment (start 149.225 43.815) (end 151.765 43.815) (width 1.016) (layer Dessous) (net 2) (status 400)) - (segment (start 151.765 43.815) (end 160.02 43.815) (width 1.016) (layer Dessous) (net 2) (status 800)) - (segment (start 138.43 48.895) (end 141.605 45.72) (width 1.016) (layer Dessous) (net 2)) - (segment (start 194.31 49.53) (end 191.77 46.99) (width 1.016) (layer Dessous) (net 2)) - (segment (start 133.35 48.895) (end 138.43 48.895) (width 1.016) (layer Dessous) (net 2)) - (segment (start 141.605 45.72) (end 141.605 43.815) (width 1.016) (layer Dessous) (net 2)) - (segment (start 142.24 43.18) (end 148.59 43.18) (width 0.4318) (layer Dessous) (net 2)) - (segment (start 148.59 43.18) (end 149.225 43.815) (width 1.016) (layer Dessous) (net 2)) - (segment (start 141.605 43.815) (end 142.24 43.18) (width 1.016) (layer Dessous) (net 2)) - (segment (start 191.135 46.355) (end 191.77 46.99) (width 1.016) (layer Dessous) (net 2)) - (segment (start 131.445 46.99) (end 133.35 48.895) (width 1.016) (layer Dessous) (net 2)) + (segment (start 156.845 112.395) (end 155.575 113.665) (width 1.016) (layer Dessous) (net 1)) + (segment (start 183.515 110.49) (end 185.42 108.585) (width 1.016) (layer Dessus) (net 1)) + (segment (start 179.705 110.49) (end 183.515 110.49) (width 1.016) (layer Dessus) (net 1)) + (segment (start 169.545 112.395) (end 179.705 112.395) (width 1.016) (layer Dessous) (net 1) (status 400)) + (segment (start 185.42 108.585) (end 186.69 107.315) (width 1.016) (layer Dessus) (net 1)) + (segment (start 163.83 112.395) (end 156.845 112.395) (width 1.016) (layer Dessous) (net 1)) + (segment (start 186.69 71.755) (end 185.42 70.485) (width 1.016) (layer Dessus) (net 1)) + (segment (start 186.69 107.315) (end 186.69 71.755) (width 1.016) (layer Dessus) (net 1)) + (segment (start 124.46 41.275) (end 124.46 39.37) (width 1.016) (layer Dessus) (net 1) (status 400)) + (segment (start 125.095 41.91) (end 124.46 41.275) (width 1.016) (layer Dessus) (net 1)) + (segment (start 179.705 112.395) (end 179.705 110.49) (width 1.016) (layer Dessus) (net 1) (status 800)) + (segment (start 163.83 106.68) (end 163.83 112.395) (width 1.016) (layer Dessous) (net 1) (status 800)) + (segment (start 133.35 40.005) (end 131.445 41.91) (width 1.016) (layer Dessus) (net 1)) + (segment (start 173.99 59.055) (end 160.02 59.055) (width 1.016) (layer Dessus) (net 1)) + (segment (start 169.545 112.395) (end 163.83 112.395) (width 1.016) (layer Dessous) (net 1)) + (segment (start 159.385 40.64) (end 158.75 40.005) (width 1.016) (layer Dessus) (net 1)) + (segment (start 159.385 58.42) (end 159.385 40.64) (width 1.016) (layer Dessus) (net 1)) + (segment (start 158.75 40.005) (end 133.35 40.005) (width 1.016) (layer Dessus) (net 1)) + (segment (start 155.575 113.665) (end 155.575 117.475) (width 1.016) (layer Dessous) (net 1) (status 400)) + (segment (start 160.02 59.055) (end 159.385 58.42) (width 1.016) (layer Dessus) (net 1)) + (segment (start 131.445 41.91) (end 125.095 41.91) (width 1.016) (layer Dessus) (net 1)) (segment (start 162.56 41.275) (end 169.545 41.275) (width 1.016) (layer Dessous) (net 2)) - (segment (start 180.975 93.345) (end 175.895 93.345) (width 0.4318) (layer Dessous) (net 3) (status 400)) - (segment (start 150.495 92.075) (end 172.085 92.075) (width 0.4318) (layer Dessous) (net 3) (status 800)) - (segment (start 175.895 93.345) (end 173.355 93.345) (width 0.4318) (layer Dessous) (net 3) (status 800)) - (segment (start 180.975 93.345) (end 183.515 93.345) (width 0.4318) (layer Dessous) (net 3) (status 400)) + (segment (start 131.445 46.99) (end 133.35 48.895) (width 1.016) (layer Dessous) (net 2)) + (segment (start 191.135 46.355) (end 191.77 46.99) (width 1.016) (layer Dessous) (net 2)) + (segment (start 141.605 43.815) (end 142.24 43.18) (width 1.016) (layer Dessous) (net 2)) + (segment (start 148.59 43.18) (end 149.225 43.815) (width 1.016) (layer Dessous) (net 2)) + (segment (start 142.24 43.18) (end 148.59 43.18) (width 0.4318) (layer Dessous) (net 2)) + (segment (start 141.605 45.72) (end 141.605 43.815) (width 1.016) (layer Dessous) (net 2)) + (segment (start 133.35 48.895) (end 138.43 48.895) (width 1.016) (layer Dessous) (net 2)) + (segment (start 194.31 49.53) (end 191.77 46.99) (width 1.016) (layer Dessous) (net 2)) + (segment (start 138.43 48.895) (end 141.605 45.72) (width 1.016) (layer Dessous) (net 2)) + (segment (start 151.765 43.815) (end 160.02 43.815) (width 1.016) (layer Dessous) (net 2) (status 800)) + (segment (start 149.225 43.815) (end 151.765 43.815) (width 1.016) (layer Dessous) (net 2) (status 400)) + (segment (start 169.545 41.275) (end 174.625 46.355) (width 1.016) (layer Dessous) (net 2)) + (segment (start 160.02 43.815) (end 162.56 41.275) (width 1.016) (layer Dessous) (net 2)) + (segment (start 174.625 46.355) (end 191.135 46.355) (width 1.016) (layer Dessous) (net 2)) + (segment (start 129.54 46.99) (end 131.445 46.99) (width 1.016) (layer Dessous) (net 2) (status 800)) + (segment (start 194.31 94.615) (end 194.31 49.53) (width 1.016) (layer Dessous) (net 2) (status 800)) (segment (start 173.355 93.345) (end 172.085 92.075) (width 0.4318) (layer Dessous) (net 3)) - (segment (start 130.175 62.865) (end 131.445 61.595) (width 0.4318) (layer Dessous) (net 4)) - (segment (start 128.905 69.215) (end 130.175 67.945) (width 0.4318) (layer Dessous) (net 4)) - (segment (start 131.445 61.595) (end 133.35 61.595) (width 0.4318) (layer Dessous) (net 4)) - (segment (start 128.905 73.025) (end 128.905 69.215) (width 0.4318) (layer Dessous) (net 4)) - (segment (start 133.35 61.595) (end 133.985 60.96) (width 0.4318) (layer Dessous) (net 4)) - (segment (start 133.985 60.96) (end 133.985 57.785) (width 0.4318) (layer Dessous) (net 4) (status 400)) - (segment (start 130.175 74.295) (end 128.905 73.025) (width 0.4318) (layer Dessous) (net 4) (status 800)) + (segment (start 180.975 93.345) (end 183.515 93.345) (width 0.4318) (layer Dessous) (net 3) (status 400)) + (segment (start 175.895 93.345) (end 173.355 93.345) (width 0.4318) (layer Dessous) (net 3) (status 800)) + (segment (start 150.495 92.075) (end 172.085 92.075) (width 0.4318) (layer Dessous) (net 3) (status 800)) + (segment (start 180.975 93.345) (end 175.895 93.345) (width 0.4318) (layer Dessous) (net 3) (status 400)) (segment (start 130.175 67.945) (end 130.175 62.865) (width 0.4318) (layer Dessous) (net 4)) - (segment (start 135.255 61.595) (end 135.255 66.675) (width 0.4318) (layer Dessous) (net 5)) - (segment (start 132.715 69.215) (end 132.715 71.755) (width 0.4318) (layer Dessous) (net 5) (status 400)) - (segment (start 132.715 69.215) (end 135.255 66.675) (width 0.4318) (layer Dessous) (net 5)) - (segment (start 136.525 57.785) (end 136.525 60.325) (width 0.4318) (layer Dessous) (net 5) (status 800)) + (segment (start 130.175 74.295) (end 128.905 73.025) (width 0.4318) (layer Dessous) (net 4) (status 800)) + (segment (start 133.985 60.96) (end 133.985 57.785) (width 0.4318) (layer Dessous) (net 4) (status 400)) + (segment (start 133.35 61.595) (end 133.985 60.96) (width 0.4318) (layer Dessous) (net 4)) + (segment (start 128.905 73.025) (end 128.905 69.215) (width 0.4318) (layer Dessous) (net 4)) + (segment (start 131.445 61.595) (end 133.35 61.595) (width 0.4318) (layer Dessous) (net 4)) + (segment (start 128.905 69.215) (end 130.175 67.945) (width 0.4318) (layer Dessous) (net 4)) + (segment (start 130.175 62.865) (end 131.445 61.595) (width 0.4318) (layer Dessous) (net 4)) (segment (start 135.255 61.595) (end 136.525 60.325) (width 0.4318) (layer Dessous) (net 5)) - (segment (start 127.635 69.215) (end 127.635 71.755) (width 0.4318) (layer Dessous) (net 6) (status 400)) - (segment (start 128.905 67.945) (end 127.635 69.215) (width 0.4318) (layer Dessous) (net 6)) + (segment (start 136.525 57.785) (end 136.525 60.325) (width 0.4318) (layer Dessous) (net 5) (status 800)) + (segment (start 132.715 69.215) (end 135.255 66.675) (width 0.4318) (layer Dessous) (net 5)) + (segment (start 132.715 69.215) (end 132.715 71.755) (width 0.4318) (layer Dessous) (net 5) (status 400)) + (segment (start 135.255 61.595) (end 135.255 66.675) (width 0.4318) (layer Dessous) (net 5)) (segment (start 128.905 65.405) (end 128.905 67.945) (width 0.4318) (layer Dessous) (net 6) (status 800)) - (segment (start 130.175 69.215) (end 131.445 67.945) (width 0.4318) (layer Dessous) (net 7)) - (segment (start 131.445 67.945) (end 131.445 65.405) (width 0.4318) (layer Dessous) (net 7) (status 400)) + (segment (start 128.905 67.945) (end 127.635 69.215) (width 0.4318) (layer Dessous) (net 6)) + (segment (start 127.635 69.215) (end 127.635 71.755) (width 0.4318) (layer Dessous) (net 6) (status 400)) (segment (start 130.175 71.755) (end 130.175 69.215) (width 0.4318) (layer Dessous) (net 7) (status 800)) - (segment (start 139.065 57.785) (end 139.065 60.325) (width 0.4318) (layer Dessous) (net 8) (status 800)) - (segment (start 136.525 71.12) (end 137.795 69.85) (width 0.4318) (layer Dessous) (net 8)) - (segment (start 136.525 71.12) (end 136.525 73.025) (width 0.4318) (layer Dessous) (net 8)) - (segment (start 137.795 69.85) (end 137.795 61.595) (width 0.4318) (layer Dessous) (net 8)) - (segment (start 139.065 60.325) (end 137.795 61.595) (width 0.4318) (layer Dessous) (net 8)) + (segment (start 131.445 67.945) (end 131.445 65.405) (width 0.4318) (layer Dessous) (net 7) (status 400)) + (segment (start 130.175 69.215) (end 131.445 67.945) (width 0.4318) (layer Dessous) (net 7)) (segment (start 136.525 73.025) (end 137.795 74.295) (width 0.4318) (layer Dessous) (net 8) (status 400)) - (segment (start 140.335 61.595) (end 140.335 66.675) (width 0.4318) (layer Dessous) (net 9)) - (segment (start 141.605 60.325) (end 140.335 61.595) (width 0.4318) (layer Dessous) (net 9)) - (segment (start 141.605 67.945) (end 140.335 66.675) (width 0.4318) (layer Dessous) (net 9)) - (segment (start 141.605 73.025) (end 141.605 67.945) (width 0.4318) (layer Dessous) (net 9)) - (segment (start 140.335 74.295) (end 141.605 73.025) (width 0.4318) (layer Dessous) (net 9) (status 800)) + (segment (start 139.065 60.325) (end 137.795 61.595) (width 0.4318) (layer Dessous) (net 8)) + (segment (start 137.795 69.85) (end 137.795 61.595) (width 0.4318) (layer Dessous) (net 8)) + (segment (start 136.525 71.12) (end 136.525 73.025) (width 0.4318) (layer Dessous) (net 8)) + (segment (start 136.525 71.12) (end 137.795 69.85) (width 0.4318) (layer Dessous) (net 8)) + (segment (start 139.065 57.785) (end 139.065 60.325) (width 0.4318) (layer Dessous) (net 8) (status 800)) (segment (start 141.605 57.785) (end 141.605 60.325) (width 0.4318) (layer Dessous) (net 9) (status 800)) - (segment (start 142.875 71.755) (end 142.875 66.04) (width 0.4318) (layer Dessous) (net 10) (status 800)) - (segment (start 142.875 66.04) (end 142.24 65.405) (width 0.4318) (layer Dessous) (net 10)) + (segment (start 140.335 74.295) (end 141.605 73.025) (width 0.4318) (layer Dessous) (net 9) (status 800)) + (segment (start 141.605 73.025) (end 141.605 67.945) (width 0.4318) (layer Dessous) (net 9)) + (segment (start 141.605 67.945) (end 140.335 66.675) (width 0.4318) (layer Dessous) (net 9)) + (segment (start 141.605 60.325) (end 140.335 61.595) (width 0.4318) (layer Dessous) (net 9)) + (segment (start 140.335 61.595) (end 140.335 66.675) (width 0.4318) (layer Dessous) (net 9)) (segment (start 142.24 65.405) (end 141.605 65.405) (width 0.4318) (layer Dessous) (net 10) (status 400)) - (segment (start 139.065 70.485) (end 137.795 71.755) (width 0.4318) (layer Dessous) (net 11) (status 400)) + (segment (start 142.875 66.04) (end 142.24 65.405) (width 0.4318) (layer Dessous) (net 10)) + (segment (start 142.875 71.755) (end 142.875 66.04) (width 0.4318) (layer Dessous) (net 10) (status 800)) (segment (start 139.065 65.405) (end 139.065 70.485) (width 0.4318) (layer Dessous) (net 11) (status 800)) - (segment (start 133.985 66.675) (end 133.985 65.405) (width 0.4318) (layer Dessous) (net 12) (status 400)) - (segment (start 131.445 69.215) (end 133.985 66.675) (width 0.4318) (layer Dessous) (net 12)) - (segment (start 131.445 73.025) (end 131.445 69.215) (width 0.4318) (layer Dessous) (net 12)) + (segment (start 139.065 70.485) (end 137.795 71.755) (width 0.4318) (layer Dessous) (net 11) (status 400)) (segment (start 132.715 74.295) (end 131.445 73.025) (width 0.4318) (layer Dessous) (net 12) (status 800)) - (segment (start 114.935 62.865) (end 114.935 71.755) (width 0.4318) (layer Dessous) (net 13) (status 800)) - (segment (start 116.205 73.025) (end 114.935 71.755) (width 0.4318) (layer Dessous) (net 13)) - (segment (start 116.205 73.025) (end 121.285 73.025) (width 0.4318) (layer Dessous) (net 13)) + (segment (start 131.445 73.025) (end 131.445 69.215) (width 0.4318) (layer Dessous) (net 12)) + (segment (start 131.445 69.215) (end 133.985 66.675) (width 0.4318) (layer Dessous) (net 12)) + (segment (start 133.985 66.675) (end 133.985 65.405) (width 0.4318) (layer Dessous) (net 12) (status 400)) (segment (start 121.285 73.025) (end 122.555 74.295) (width 0.4318) (layer Dessous) (net 13) (status 400)) - (segment (start 117.475 62.865) (end 117.475 71.12) (width 0.4318) (layer Dessous) (net 14) (status 800)) - (segment (start 118.11 71.755) (end 122.555 71.755) (width 0.4318) (layer Dessous) (net 14) (status 400)) + (segment (start 116.205 73.025) (end 121.285 73.025) (width 0.4318) (layer Dessous) (net 13)) + (segment (start 116.205 73.025) (end 114.935 71.755) (width 0.4318) (layer Dessous) (net 13)) + (segment (start 114.935 62.865) (end 114.935 71.755) (width 0.4318) (layer Dessous) (net 13) (status 800)) (segment (start 117.475 71.12) (end 118.11 71.755) (width 0.4318) (layer Dessous) (net 14)) - (segment (start 150.495 99.695) (end 161.925 99.695) (width 0.4318) (layer Dessous) (net 15) (status 800)) - (segment (start 161.925 99.695) (end 163.195 98.425) (width 0.4318) (layer Dessous) (net 15)) + (segment (start 118.11 71.755) (end 122.555 71.755) (width 0.4318) (layer Dessous) (net 14) (status 400)) + (segment (start 117.475 62.865) (end 117.475 71.12) (width 0.4318) (layer Dessous) (net 14) (status 800)) (segment (start 163.195 98.425) (end 168.275 98.425) (width 0.4318) (layer Dessous) (net 15) (status 400)) - (segment (start 147.955 102.235) (end 161.925 102.235) (width 0.4318) (layer Dessous) (net 16) (status 800)) - (segment (start 161.925 102.235) (end 163.195 100.965) (width 0.4318) (layer Dessous) (net 16)) + (segment (start 161.925 99.695) (end 163.195 98.425) (width 0.4318) (layer Dessous) (net 15)) + (segment (start 150.495 99.695) (end 161.925 99.695) (width 0.4318) (layer Dessous) (net 15) (status 800)) (segment (start 163.195 100.965) (end 168.275 100.965) (width 0.4318) (layer Dessous) (net 16) (status 400)) - (segment (start 163.83 103.505) (end 168.275 103.505) (width 0.4318) (layer Dessus) (net 17) (status 400)) - (segment (start 140.97 105.41) (end 151.13 105.41) (width 0.4318) (layer Dessus) (net 17)) - (via (at 140.97 105.41) (size 1.651) (layers Dessus Dessous) (net 17)) - (segment (start 161.925 105.41) (end 163.83 103.505) (width 0.4318) (layer Dessus) (net 17)) - (segment (start 151.13 105.41) (end 161.925 105.41) (width 0.4318) (layer Dessus) (net 17)) - (segment (start 140.335 102.235) (end 140.335 104.14) (width 0.4318) (layer Dessous) (net 17) (status 800)) - (segment (start 140.335 104.14) (end 140.97 104.775) (width 0.4318) (layer Dessous) (net 17)) + (segment (start 161.925 102.235) (end 163.195 100.965) (width 0.4318) (layer Dessous) (net 16)) + (segment (start 147.955 102.235) (end 161.925 102.235) (width 0.4318) (layer Dessous) (net 16) (status 800)) (segment (start 140.97 104.775) (end 140.97 105.41) (width 0.4318) (layer Dessous) (net 17)) - (segment (start 135.255 107.315) (end 135.255 104.775) (width 0.4318) (layer Dessous) (net 18)) - (segment (start 137.16 107.95) (end 136.525 107.315) (width 0.4318) (layer Dessus) (net 18)) - (segment (start 136.525 100.965) (end 137.795 99.695) (width 0.4318) (layer Dessous) (net 18) (status 400)) - (segment (start 136.525 107.315) (end 135.255 107.315) (width 0.4318) (layer Dessus) (net 18)) - (segment (start 175.895 106.045) (end 183.515 106.045) (width 0.4318) (layer Dessous) (net 18) (status C00)) - (segment (start 140.335 107.95) (end 137.16 107.95) (width 0.4318) (layer Dessus) (net 18)) - (segment (start 135.255 104.775) (end 136.525 103.505) (width 0.4318) (layer Dessous) (net 18)) - (segment (start 136.525 103.505) (end 136.525 100.965) (width 0.4318) (layer Dessous) (net 18)) - (segment (start 183.515 108.585) (end 183.515 106.045) (width 0.4318) (layer Dessus) (net 18) (status 400)) - (segment (start 140.335 107.95) (end 141.605 109.22) (width 0.4318) (layer Dessus) (net 18)) - (segment (start 141.605 109.22) (end 182.88 109.22) (width 0.4318) (layer Dessus) (net 18)) - (via (at 135.255 107.315) (size 1.651) (layers Dessus Dessous) (net 18)) + (segment (start 140.335 104.14) (end 140.97 104.775) (width 0.4318) (layer Dessous) (net 17)) + (segment (start 140.335 102.235) (end 140.335 104.14) (width 0.4318) (layer Dessous) (net 17) (status 800)) + (segment (start 151.13 105.41) (end 161.925 105.41) (width 0.4318) (layer Dessus) (net 17)) + (segment (start 161.925 105.41) (end 163.83 103.505) (width 0.4318) (layer Dessus) (net 17)) + (via (at 140.97 105.41) (size 1.651) (layers Dessus Dessous) (net 17)) + (segment (start 140.97 105.41) (end 151.13 105.41) (width 0.4318) (layer Dessus) (net 17)) + (segment (start 163.83 103.505) (end 168.275 103.505) (width 0.4318) (layer Dessus) (net 17) (status 400)) (segment (start 182.88 109.22) (end 183.515 108.585) (width 0.4318) (layer Dessus) (net 18)) - (segment (start 183.515 103.505) (end 175.895 103.505) (width 0.4318) (layer Dessous) (net 19) (status C00)) - (segment (start 137.16 106.045) (end 138.43 106.045) (width 0.4318) (layer Dessus) (net 19)) - (segment (start 143.51 107.315) (end 140.97 107.315) (width 0.4318) (layer Dessus) (net 19)) - (segment (start 137.795 104.14) (end 137.795 102.235) (width 0.4318) (layer Dessous) (net 19) (status 400)) - (segment (start 177.165 107.95) (end 144.145 107.95) (width 0.4318) (layer Dessus) (net 19)) - (segment (start 138.43 106.045) (end 139.065 106.68) (width 0.4318) (layer Dessus) (net 19)) - (segment (start 144.145 107.95) (end 143.51 107.315) (width 0.4318) (layer Dessus) (net 19)) - (segment (start 181.61 103.505) (end 177.165 107.95) (width 0.4318) (layer Dessus) (net 19)) - (segment (start 137.16 104.775) (end 137.16 106.045) (width 0.4318) (layer Dessous) (net 19)) - (segment (start 183.515 103.505) (end 181.61 103.505) (width 0.4318) (layer Dessus) (net 19) (status 800)) - (via (at 137.16 106.045) (size 1.651) (layers Dessus Dessous) (net 19)) - (segment (start 140.335 106.68) (end 140.97 107.315) (width 0.4318) (layer Dessus) (net 19)) - (segment (start 137.795 104.14) (end 137.16 104.775) (width 0.4318) (layer Dessous) (net 19)) + (via (at 135.255 107.315) (size 1.651) (layers Dessus Dessous) (net 18)) + (segment (start 141.605 109.22) (end 182.88 109.22) (width 0.4318) (layer Dessus) (net 18)) + (segment (start 140.335 107.95) (end 141.605 109.22) (width 0.4318) (layer Dessus) (net 18)) + (segment (start 183.515 108.585) (end 183.515 106.045) (width 0.4318) (layer Dessus) (net 18) (status 400)) + (segment (start 136.525 103.505) (end 136.525 100.965) (width 0.4318) (layer Dessous) (net 18)) + (segment (start 135.255 104.775) (end 136.525 103.505) (width 0.4318) (layer Dessous) (net 18)) + (segment (start 140.335 107.95) (end 137.16 107.95) (width 0.4318) (layer Dessus) (net 18)) + (segment (start 175.895 106.045) (end 183.515 106.045) (width 0.4318) (layer Dessous) (net 18) (status C00)) + (segment (start 136.525 107.315) (end 135.255 107.315) (width 0.4318) (layer Dessus) (net 18)) + (segment (start 136.525 100.965) (end 137.795 99.695) (width 0.4318) (layer Dessous) (net 18) (status 400)) + (segment (start 137.16 107.95) (end 136.525 107.315) (width 0.4318) (layer Dessus) (net 18)) + (segment (start 135.255 107.315) (end 135.255 104.775) (width 0.4318) (layer Dessous) (net 18)) (segment (start 139.065 106.68) (end 140.335 106.68) (width 0.4318) (layer Dessus) (net 19)) - (segment (start 180.975 100.965) (end 183.515 100.965) (width 0.4318) (layer Dessous) (net 20) (status 400)) - (segment (start 180.975 100.965) (end 175.895 100.965) (width 0.4318) (layer Dessous) (net 20) (status 400)) - (segment (start 145.415 99.695) (end 146.685 100.965) (width 0.4318) (layer Dessous) (net 20) (status 800)) - (segment (start 173.99 100.965) (end 172.72 99.695) (width 0.4318) (layer Dessous) (net 20)) - (segment (start 146.685 100.965) (end 161.925 100.965) (width 0.4318) (layer Dessous) (net 20)) - (segment (start 161.925 100.965) (end 163.195 99.695) (width 0.4318) (layer Dessous) (net 20)) - (segment (start 175.895 100.965) (end 173.99 100.965) (width 0.4318) (layer Dessous) (net 20) (status 800)) + (segment (start 137.795 104.14) (end 137.16 104.775) (width 0.4318) (layer Dessous) (net 19)) + (segment (start 140.335 106.68) (end 140.97 107.315) (width 0.4318) (layer Dessus) (net 19)) + (via (at 137.16 106.045) (size 1.651) (layers Dessus Dessous) (net 19)) + (segment (start 183.515 103.505) (end 181.61 103.505) (width 0.4318) (layer Dessus) (net 19) (status 800)) + (segment (start 137.16 104.775) (end 137.16 106.045) (width 0.4318) (layer Dessous) (net 19)) + (segment (start 181.61 103.505) (end 177.165 107.95) (width 0.4318) (layer Dessus) (net 19)) + (segment (start 144.145 107.95) (end 143.51 107.315) (width 0.4318) (layer Dessus) (net 19)) + (segment (start 138.43 106.045) (end 139.065 106.68) (width 0.4318) (layer Dessus) (net 19)) + (segment (start 177.165 107.95) (end 144.145 107.95) (width 0.4318) (layer Dessus) (net 19)) + (segment (start 137.795 104.14) (end 137.795 102.235) (width 0.4318) (layer Dessous) (net 19) (status 400)) + (segment (start 143.51 107.315) (end 140.97 107.315) (width 0.4318) (layer Dessus) (net 19)) + (segment (start 137.16 106.045) (end 138.43 106.045) (width 0.4318) (layer Dessus) (net 19)) + (segment (start 183.515 103.505) (end 175.895 103.505) (width 0.4318) (layer Dessous) (net 19) (status C00)) (segment (start 163.195 99.695) (end 172.72 99.695) (width 0.4318) (layer Dessous) (net 20)) - (segment (start 175.895 98.425) (end 173.355 98.425) (width 0.4318) (layer Dessous) (net 21) (status 800)) - (segment (start 180.975 98.425) (end 175.895 98.425) (width 0.4318) (layer Dessous) (net 21) (status 400)) - (segment (start 180.975 98.425) (end 183.515 98.425) (width 0.4318) (layer Dessous) (net 21) (status 400)) - (segment (start 161.925 98.425) (end 163.195 97.155) (width 0.4318) (layer Dessous) (net 21)) - (segment (start 163.195 97.155) (end 172.085 97.155) (width 0.4318) (layer Dessous) (net 21)) - (segment (start 149.225 98.425) (end 161.925 98.425) (width 0.4318) (layer Dessous) (net 21)) - (segment (start 173.355 98.425) (end 172.085 97.155) (width 0.4318) (layer Dessous) (net 21)) + (segment (start 175.895 100.965) (end 173.99 100.965) (width 0.4318) (layer Dessous) (net 20) (status 800)) + (segment (start 161.925 100.965) (end 163.195 99.695) (width 0.4318) (layer Dessous) (net 20)) + (segment (start 146.685 100.965) (end 161.925 100.965) (width 0.4318) (layer Dessous) (net 20)) + (segment (start 173.99 100.965) (end 172.72 99.695) (width 0.4318) (layer Dessous) (net 20)) + (segment (start 145.415 99.695) (end 146.685 100.965) (width 0.4318) (layer Dessous) (net 20) (status 800)) + (segment (start 180.975 100.965) (end 175.895 100.965) (width 0.4318) (layer Dessous) (net 20) (status 400)) + (segment (start 180.975 100.965) (end 183.515 100.965) (width 0.4318) (layer Dessous) (net 20) (status 400)) (segment (start 147.955 99.695) (end 149.225 98.425) (width 0.4318) (layer Dessous) (net 21) (status 800)) - (segment (start 172.72 94.615) (end 172.085 94.615) (width 0.4318) (layer Dessous) (net 22)) - (segment (start 175.895 95.885) (end 173.99 95.885) (width 0.4318) (layer Dessous) (net 22) (status 800)) - (segment (start 173.99 95.885) (end 172.72 94.615) (width 0.4318) (layer Dessous) (net 22)) - (segment (start 147.955 97.155) (end 149.225 95.885) (width 0.4318) (layer Dessous) (net 22) (status 800)) - (segment (start 159.385 94.615) (end 172.085 94.615) (width 0.4318) (layer Dessous) (net 22)) - (segment (start 149.225 95.885) (end 158.115 95.885) (width 0.4318) (layer Dessous) (net 22)) - (segment (start 158.115 95.885) (end 159.385 94.615) (width 0.4318) (layer Dessous) (net 22)) - (segment (start 180.975 95.885) (end 175.895 95.885) (width 0.4318) (layer Dessous) (net 22) (status 400)) + (segment (start 173.355 98.425) (end 172.085 97.155) (width 0.4318) (layer Dessous) (net 21)) + (segment (start 149.225 98.425) (end 161.925 98.425) (width 0.4318) (layer Dessous) (net 21)) + (segment (start 163.195 97.155) (end 172.085 97.155) (width 0.4318) (layer Dessous) (net 21)) + (segment (start 161.925 98.425) (end 163.195 97.155) (width 0.4318) (layer Dessous) (net 21)) + (segment (start 180.975 98.425) (end 183.515 98.425) (width 0.4318) (layer Dessous) (net 21) (status 400)) + (segment (start 180.975 98.425) (end 175.895 98.425) (width 0.4318) (layer Dessous) (net 21) (status 400)) + (segment (start 175.895 98.425) (end 173.355 98.425) (width 0.4318) (layer Dessous) (net 21) (status 800)) (segment (start 180.975 95.885) (end 183.515 95.885) (width 0.4318) (layer Dessous) (net 22) (status 400)) - (segment (start 159.385 97.155) (end 160.655 95.885) (width 0.4318) (layer Dessous) (net 23)) - (segment (start 160.655 95.885) (end 168.275 95.885) (width 0.4318) (layer Dessous) (net 23) (status 400)) + (segment (start 180.975 95.885) (end 175.895 95.885) (width 0.4318) (layer Dessous) (net 22) (status 400)) + (segment (start 158.115 95.885) (end 159.385 94.615) (width 0.4318) (layer Dessous) (net 22)) + (segment (start 149.225 95.885) (end 158.115 95.885) (width 0.4318) (layer Dessous) (net 22)) + (segment (start 159.385 94.615) (end 172.085 94.615) (width 0.4318) (layer Dessous) (net 22)) + (segment (start 147.955 97.155) (end 149.225 95.885) (width 0.4318) (layer Dessous) (net 22) (status 800)) + (segment (start 173.99 95.885) (end 172.72 94.615) (width 0.4318) (layer Dessous) (net 22)) + (segment (start 175.895 95.885) (end 173.99 95.885) (width 0.4318) (layer Dessous) (net 22) (status 800)) + (segment (start 172.72 94.615) (end 172.085 94.615) (width 0.4318) (layer Dessous) (net 22)) (segment (start 150.495 97.155) (end 159.385 97.155) (width 0.4318) (layer Dessous) (net 23) (status 800)) - (segment (start 151.765 93.345) (end 168.275 93.345) (width 0.4318) (layer Dessous) (net 24) (status 400)) + (segment (start 160.655 95.885) (end 168.275 95.885) (width 0.4318) (layer Dessous) (net 23) (status 400)) + (segment (start 159.385 97.155) (end 160.655 95.885) (width 0.4318) (layer Dessous) (net 23)) (segment (start 150.495 94.615) (end 151.765 93.345) (width 0.4318) (layer Dessous) (net 24) (status 800)) - (segment (start 173.99 90.805) (end 172.72 89.535) (width 0.4318) (layer Dessous) (net 25)) - (segment (start 175.895 90.805) (end 173.99 90.805) (width 0.4318) (layer Dessous) (net 25) (status 800)) - (segment (start 180.975 90.805) (end 175.895 90.805) (width 0.4318) (layer Dessous) (net 25) (status 400)) - (segment (start 180.975 90.805) (end 183.515 90.805) (width 0.4318) (layer Dessous) (net 25) (status 400)) + (segment (start 151.765 93.345) (end 168.275 93.345) (width 0.4318) (layer Dessous) (net 24) (status 400)) (segment (start 150.495 89.535) (end 172.72 89.535) (width 0.4318) (layer Dessous) (net 25) (status 800)) - (segment (start 175.895 85.725) (end 173.99 85.725) (width 0.4318) (layer Dessous) (net 26) (status 800)) - (segment (start 150.495 84.455) (end 172.72 84.455) (width 0.4318) (layer Dessous) (net 26) (status 800)) - (segment (start 175.895 85.725) (end 180.975 85.725) (width 0.4318) (layer Dessous) (net 26) (status 800)) - (segment (start 180.975 85.725) (end 183.515 85.725) (width 0.4318) (layer Dessous) (net 26) (status 400)) + (segment (start 180.975 90.805) (end 183.515 90.805) (width 0.4318) (layer Dessous) (net 25) (status 400)) + (segment (start 180.975 90.805) (end 175.895 90.805) (width 0.4318) (layer Dessous) (net 25) (status 400)) + (segment (start 175.895 90.805) (end 173.99 90.805) (width 0.4318) (layer Dessous) (net 25) (status 800)) + (segment (start 173.99 90.805) (end 172.72 89.535) (width 0.4318) (layer Dessous) (net 25)) (segment (start 173.99 85.725) (end 172.72 84.455) (width 0.4318) (layer Dessous) (net 26)) - (segment (start 147.955 74.295) (end 149.225 73.025) (width 0.4318) (layer Dessous) (net 27) (status 800)) - (segment (start 160.655 75.565) (end 168.275 75.565) (width 0.4318) (layer Dessous) (net 27) (status 400)) - (segment (start 149.225 73.025) (end 158.115 73.025) (width 0.4318) (layer Dessous) (net 27)) + (segment (start 180.975 85.725) (end 183.515 85.725) (width 0.4318) (layer Dessous) (net 26) (status 400)) + (segment (start 175.895 85.725) (end 180.975 85.725) (width 0.4318) (layer Dessous) (net 26) (status 800)) + (segment (start 150.495 84.455) (end 172.72 84.455) (width 0.4318) (layer Dessous) (net 26) (status 800)) + (segment (start 175.895 85.725) (end 173.99 85.725) (width 0.4318) (layer Dessous) (net 26) (status 800)) (segment (start 158.115 73.025) (end 160.655 75.565) (width 0.4318) (layer Dessous) (net 27)) - (segment (start 175.895 78.105) (end 172.085 78.105) (width 0.4318) (layer Dessous) (net 28) (status 800)) - (segment (start 175.895 78.105) (end 183.515 78.105) (width 0.4318) (layer Dessous) (net 28) (status C00)) - (segment (start 158.115 74.295) (end 160.655 76.835) (width 0.4318) (layer Dessous) (net 28)) - (segment (start 170.815 76.835) (end 172.085 78.105) (width 0.4318) (layer Dessous) (net 28)) - (segment (start 158.115 74.295) (end 150.495 74.295) (width 0.4318) (layer Dessous) (net 28) (status 400)) + (segment (start 149.225 73.025) (end 158.115 73.025) (width 0.4318) (layer Dessous) (net 27)) + (segment (start 160.655 75.565) (end 168.275 75.565) (width 0.4318) (layer Dessous) (net 27) (status 400)) + (segment (start 147.955 74.295) (end 149.225 73.025) (width 0.4318) (layer Dessous) (net 27) (status 800)) (segment (start 160.655 76.835) (end 170.815 76.835) (width 0.4318) (layer Dessous) (net 28)) - (segment (start 146.05 67.945) (end 159.385 67.945) (width 0.4318) (layer Dessous) (net 29)) - (segment (start 159.385 67.945) (end 160.655 66.675) (width 0.4318) (layer Dessous) (net 29)) - (segment (start 145.415 68.58) (end 146.05 67.945) (width 0.4318) (layer Dessous) (net 29)) - (segment (start 160.655 66.675) (end 165.735 66.675) (width 0.4318) (layer Dessous) (net 29) (status 400)) + (segment (start 158.115 74.295) (end 150.495 74.295) (width 0.4318) (layer Dessous) (net 28) (status 400)) + (segment (start 170.815 76.835) (end 172.085 78.105) (width 0.4318) (layer Dessous) (net 28)) + (segment (start 158.115 74.295) (end 160.655 76.835) (width 0.4318) (layer Dessous) (net 28)) + (segment (start 175.895 78.105) (end 183.515 78.105) (width 0.4318) (layer Dessous) (net 28) (status C00)) + (segment (start 175.895 78.105) (end 172.085 78.105) (width 0.4318) (layer Dessous) (net 28) (status 800)) (segment (start 145.415 71.755) (end 145.415 68.58) (width 0.4318) (layer Dessous) (net 29) (status 800)) - (segment (start 147.955 92.075) (end 149.225 90.805) (width 0.4318) (layer Dessous) (net 30) (status 800)) + (segment (start 160.655 66.675) (end 165.735 66.675) (width 0.4318) (layer Dessous) (net 29) (status 400)) + (segment (start 145.415 68.58) (end 146.05 67.945) (width 0.4318) (layer Dessous) (net 29)) + (segment (start 159.385 67.945) (end 160.655 66.675) (width 0.4318) (layer Dessous) (net 29)) + (segment (start 146.05 67.945) (end 159.385 67.945) (width 0.4318) (layer Dessous) (net 29)) (segment (start 149.225 90.805) (end 168.275 90.805) (width 0.4318) (layer Dessous) (net 30) (status 400)) - (segment (start 149.225 88.265) (end 168.275 88.265) (width 0.4318) (layer Dessous) (net 31) (status 400)) + (segment (start 147.955 92.075) (end 149.225 90.805) (width 0.4318) (layer Dessous) (net 30) (status 800)) (segment (start 147.955 86.995) (end 149.225 88.265) (width 0.4318) (layer Dessous) (net 31) (status 800)) - (segment (start 149.225 85.725) (end 147.955 84.455) (width 0.4318) (layer Dessous) (net 32) (status 400)) + (segment (start 149.225 88.265) (end 168.275 88.265) (width 0.4318) (layer Dessous) (net 31) (status 400)) (segment (start 168.275 85.725) (end 149.225 85.725) (width 0.4318) (layer Dessous) (net 32) (status 800)) - (segment (start 149.225 83.185) (end 147.955 81.915) (width 0.4318) (layer Dessous) (net 33) (status 400)) + (segment (start 149.225 85.725) (end 147.955 84.455) (width 0.4318) (layer Dessous) (net 32) (status 400)) (segment (start 168.275 83.185) (end 149.225 83.185) (width 0.4318) (layer Dessous) (net 33) (status 800)) - (segment (start 147.955 79.375) (end 149.225 80.645) (width 0.4318) (layer Dessous) (net 34) (status 800)) + (segment (start 149.225 83.185) (end 147.955 81.915) (width 0.4318) (layer Dessous) (net 33) (status 400)) (segment (start 149.225 80.645) (end 168.275 80.645) (width 0.4318) (layer Dessous) (net 34) (status 400)) - (segment (start 149.225 75.565) (end 147.955 76.835) (width 0.4318) (layer Dessous) (net 35) (status 400)) - (segment (start 156.845 75.565) (end 149.225 75.565) (width 0.4318) (layer Dessous) (net 35)) - (segment (start 159.385 78.105) (end 156.845 75.565) (width 0.4318) (layer Dessous) (net 35)) + (segment (start 147.955 79.375) (end 149.225 80.645) (width 0.4318) (layer Dessous) (net 34) (status 800)) (segment (start 168.275 78.105) (end 159.385 78.105) (width 0.4318) (layer Dessous) (net 35) (status 800)) - (segment (start 159.385 79.375) (end 172.72 79.375) (width 0.4318) (layer Dessous) (net 36)) - (segment (start 173.99 80.645) (end 172.72 79.375) (width 0.4318) (layer Dessous) (net 36)) - (segment (start 156.845 76.835) (end 159.385 79.375) (width 0.4318) (layer Dessous) (net 36)) - (segment (start 175.895 80.645) (end 173.99 80.645) (width 0.4318) (layer Dessous) (net 36) (status 800)) - (segment (start 180.975 80.645) (end 183.515 80.645) (width 0.4318) (layer Dessous) (net 36) (status 400)) - (segment (start 175.895 80.645) (end 180.975 80.645) (width 0.4318) (layer Dessous) (net 36) (status 800)) + (segment (start 159.385 78.105) (end 156.845 75.565) (width 0.4318) (layer Dessous) (net 35)) + (segment (start 156.845 75.565) (end 149.225 75.565) (width 0.4318) (layer Dessous) (net 35)) + (segment (start 149.225 75.565) (end 147.955 76.835) (width 0.4318) (layer Dessous) (net 35) (status 400)) (segment (start 150.495 76.835) (end 156.845 76.835) (width 0.4318) (layer Dessous) (net 36) (status 800)) - (segment (start 173.99 83.185) (end 172.72 81.915) (width 0.4318) (layer Dessous) (net 37)) - (segment (start 150.495 81.915) (end 172.72 81.915) (width 0.4318) (layer Dessous) (net 37) (status 800)) - (segment (start 175.895 83.185) (end 173.99 83.185) (width 0.4318) (layer Dessous) (net 37) (status 800)) - (segment (start 175.895 83.185) (end 180.975 83.185) (width 0.4318) (layer Dessous) (net 37) (status 800)) + (segment (start 175.895 80.645) (end 180.975 80.645) (width 0.4318) (layer Dessous) (net 36) (status 800)) + (segment (start 180.975 80.645) (end 183.515 80.645) (width 0.4318) (layer Dessous) (net 36) (status 400)) + (segment (start 175.895 80.645) (end 173.99 80.645) (width 0.4318) (layer Dessous) (net 36) (status 800)) + (segment (start 156.845 76.835) (end 159.385 79.375) (width 0.4318) (layer Dessous) (net 36)) + (segment (start 173.99 80.645) (end 172.72 79.375) (width 0.4318) (layer Dessous) (net 36)) + (segment (start 159.385 79.375) (end 172.72 79.375) (width 0.4318) (layer Dessous) (net 36)) (segment (start 180.975 83.185) (end 183.515 83.185) (width 0.4318) (layer Dessous) (net 37) (status 400)) - (segment (start 173.99 88.265) (end 172.72 86.995) (width 0.4318) (layer Dessous) (net 38)) - (segment (start 180.975 88.265) (end 183.515 88.265) (width 0.4318) (layer Dessous) (net 38) (status 400)) - (segment (start 150.495 86.995) (end 172.72 86.995) (width 0.4318) (layer Dessous) (net 38) (status 800)) - (segment (start 175.895 88.265) (end 173.99 88.265) (width 0.4318) (layer Dessous) (net 38) (status 800)) + (segment (start 175.895 83.185) (end 180.975 83.185) (width 0.4318) (layer Dessous) (net 37) (status 800)) + (segment (start 175.895 83.185) (end 173.99 83.185) (width 0.4318) (layer Dessous) (net 37) (status 800)) + (segment (start 150.495 81.915) (end 172.72 81.915) (width 0.4318) (layer Dessous) (net 37) (status 800)) + (segment (start 173.99 83.185) (end 172.72 81.915) (width 0.4318) (layer Dessous) (net 37)) (segment (start 180.975 88.265) (end 175.895 88.265) (width 0.4318) (layer Dessous) (net 38) (status 400)) - (segment (start 115.951 98.425) (end 121.285 98.425) (width 0.4318) (layer Dessous) (net 39)) - (segment (start 121.285 98.425) (end 122.555 97.155) (width 0.4318) (layer Dessous) (net 39) (status 400)) - (segment (start 112.395 101.981) (end 115.951 98.425) (width 0.4318) (layer Dessous) (net 39)) + (segment (start 175.895 88.265) (end 173.99 88.265) (width 0.4318) (layer Dessous) (net 38) (status 800)) + (segment (start 150.495 86.995) (end 172.72 86.995) (width 0.4318) (layer Dessous) (net 38) (status 800)) + (segment (start 180.975 88.265) (end 183.515 88.265) (width 0.4318) (layer Dessous) (net 38) (status 400)) + (segment (start 173.99 88.265) (end 172.72 86.995) (width 0.4318) (layer Dessous) (net 38)) (segment (start 102.235 101.981) (end 112.395 101.981) (width 0.4318) (layer Dessous) (net 39) (status 800)) - (segment (start 109.22 99.06) (end 102.235 99.06) (width 0.4318) (layer Dessous) (net 40)) - (segment (start 102.235 99.06) (end 102.235 99.314) (width 0.4318) (layer Dessous) (net 40) (status 400)) - (segment (start 112.395 95.885) (end 109.22 99.06) (width 0.4318) (layer Dessous) (net 40)) - (segment (start 118.745 95.885) (end 120.015 94.615) (width 0.4318) (layer Dessous) (net 40) (status 400)) + (segment (start 112.395 101.981) (end 115.951 98.425) (width 0.4318) (layer Dessous) (net 39)) + (segment (start 121.285 98.425) (end 122.555 97.155) (width 0.4318) (layer Dessous) (net 39) (status 400)) + (segment (start 115.951 98.425) (end 121.285 98.425) (width 0.4318) (layer Dessous) (net 39)) (segment (start 112.395 95.885) (end 118.745 95.885) (width 0.4318) (layer Dessous) (net 40)) - (segment (start 117.475 93.345) (end 118.745 92.075) (width 0.4318) (layer Dessous) (net 41)) - (segment (start 102.235 96.52) (end 104.775 96.52) (width 0.4318) (layer Dessous) (net 41) (status 800)) - (segment (start 118.745 92.075) (end 120.015 92.075) (width 0.4318) (layer Dessous) (net 41) (status 400)) - (segment (start 108.585 95.885) (end 111.125 93.345) (width 0.4318) (layer Dessous) (net 41)) - (segment (start 105.41 95.885) (end 108.585 95.885) (width 0.4318) (layer Dessous) (net 41)) - (segment (start 104.775 96.52) (end 105.41 95.885) (width 0.4318) (layer Dessous) (net 41)) + (segment (start 118.745 95.885) (end 120.015 94.615) (width 0.4318) (layer Dessous) (net 40) (status 400)) + (segment (start 112.395 95.885) (end 109.22 99.06) (width 0.4318) (layer Dessous) (net 40)) + (segment (start 102.235 99.06) (end 102.235 99.314) (width 0.4318) (layer Dessous) (net 40) (status 400)) + (segment (start 109.22 99.06) (end 102.235 99.06) (width 0.4318) (layer Dessous) (net 40)) (segment (start 111.125 93.345) (end 117.475 93.345) (width 0.4318) (layer Dessous) (net 41)) - (segment (start 102.235 93.726) (end 105.41 93.726) (width 0.4318) (layer Dessous) (net 42) (status 800)) - (segment (start 118.11 89.535) (end 120.015 89.535) (width 0.4318) (layer Dessous) (net 42) (status 400)) - (segment (start 109.22 90.805) (end 116.84 90.805) (width 0.4318) (layer Dessous) (net 42)) - (segment (start 105.41 93.726) (end 107.061 92.075) (width 0.4318) (layer Dessous) (net 42)) - (segment (start 107.95 92.075) (end 109.22 90.805) (width 0.4318) (layer Dessous) (net 42)) - (segment (start 116.84 90.805) (end 118.11 89.535) (width 0.4318) (layer Dessous) (net 42)) + (segment (start 104.775 96.52) (end 105.41 95.885) (width 0.4318) (layer Dessous) (net 41)) + (segment (start 105.41 95.885) (end 108.585 95.885) (width 0.4318) (layer Dessous) (net 41)) + (segment (start 108.585 95.885) (end 111.125 93.345) (width 0.4318) (layer Dessous) (net 41)) + (segment (start 118.745 92.075) (end 120.015 92.075) (width 0.4318) (layer Dessous) (net 41) (status 400)) + (segment (start 102.235 96.52) (end 104.775 96.52) (width 0.4318) (layer Dessous) (net 41) (status 800)) + (segment (start 117.475 93.345) (end 118.745 92.075) (width 0.4318) (layer Dessous) (net 41)) (segment (start 107.061 92.075) (end 107.95 92.075) (width 0.4318) (layer Dessous) (net 42)) - (segment (start 121.285 85.725) (end 122.555 84.455) (width 0.4318) (layer Dessous) (net 43) (status 400)) - (segment (start 106.68 88.9) (end 106.68 87.63) (width 0.4318) (layer Dessous) (net 43)) - (segment (start 104.775 90.932) (end 104.775 90.805) (width 0.4318) (layer Dessous) (net 43)) - (segment (start 109.855 84.455) (end 116.84 84.455) (width 0.4318) (layer Dessous) (net 43)) - (segment (start 106.68 87.63) (end 109.855 84.455) (width 0.4318) (layer Dessous) (net 43)) - (segment (start 118.11 85.725) (end 121.285 85.725) (width 0.4318) (layer Dessous) (net 43)) - (segment (start 116.84 84.455) (end 118.11 85.725) (width 0.4318) (layer Dessous) (net 43)) - (segment (start 104.775 90.805) (end 106.68 88.9) (width 0.4318) (layer Dessous) (net 43)) + (segment (start 116.84 90.805) (end 118.11 89.535) (width 0.4318) (layer Dessous) (net 42)) + (segment (start 107.95 92.075) (end 109.22 90.805) (width 0.4318) (layer Dessous) (net 42)) + (segment (start 105.41 93.726) (end 107.061 92.075) (width 0.4318) (layer Dessous) (net 42)) + (segment (start 109.22 90.805) (end 116.84 90.805) (width 0.4318) (layer Dessous) (net 42)) + (segment (start 118.11 89.535) (end 120.015 89.535) (width 0.4318) (layer Dessous) (net 42) (status 400)) + (segment (start 102.235 93.726) (end 105.41 93.726) (width 0.4318) (layer Dessous) (net 42) (status 800)) (segment (start 102.235 90.932) (end 104.775 90.932) (width 0.4318) (layer Dessous) (net 43) (status 800)) - (segment (start 109.22 83.185) (end 117.475 83.185) (width 0.4318) (layer Dessous) (net 44)) - (segment (start 102.235 88.265) (end 104.14 88.265) (width 0.4318) (layer Dessous) (net 44) (status 800)) - (segment (start 118.745 84.455) (end 120.015 84.455) (width 0.4318) (layer Dessous) (net 44) (status 400)) - (segment (start 104.14 88.265) (end 109.22 83.185) (width 0.4318) (layer Dessous) (net 44)) + (segment (start 104.775 90.805) (end 106.68 88.9) (width 0.4318) (layer Dessous) (net 43)) + (segment (start 116.84 84.455) (end 118.11 85.725) (width 0.4318) (layer Dessous) (net 43)) + (segment (start 118.11 85.725) (end 121.285 85.725) (width 0.4318) (layer Dessous) (net 43)) + (segment (start 106.68 87.63) (end 109.855 84.455) (width 0.4318) (layer Dessous) (net 43)) + (segment (start 109.855 84.455) (end 116.84 84.455) (width 0.4318) (layer Dessous) (net 43)) + (segment (start 104.775 90.932) (end 104.775 90.805) (width 0.4318) (layer Dessous) (net 43)) + (segment (start 106.68 88.9) (end 106.68 87.63) (width 0.4318) (layer Dessous) (net 43)) + (segment (start 121.285 85.725) (end 122.555 84.455) (width 0.4318) (layer Dessous) (net 43) (status 400)) (segment (start 117.475 83.185) (end 118.745 84.455) (width 0.4318) (layer Dessous) (net 44)) - (segment (start 107.315 81.915) (end 120.015 81.915) (width 0.4318) (layer Dessous) (net 45) (status 400)) - (segment (start 104.14 85.09) (end 107.315 81.915) (width 0.4318) (layer Dessous) (net 45)) - (segment (start 102.235 85.471) (end 104.14 85.471) (width 0.4318) (layer Dessous) (net 45) (status 800)) + (segment (start 104.14 88.265) (end 109.22 83.185) (width 0.4318) (layer Dessous) (net 44)) + (segment (start 118.745 84.455) (end 120.015 84.455) (width 0.4318) (layer Dessous) (net 44) (status 400)) + (segment (start 102.235 88.265) (end 104.14 88.265) (width 0.4318) (layer Dessous) (net 44) (status 800)) + (segment (start 109.22 83.185) (end 117.475 83.185) (width 0.4318) (layer Dessous) (net 44)) (segment (start 104.14 85.471) (end 104.14 85.09) (width 0.4318) (layer Dessous) (net 45)) - (segment (start 103.505 82.55) (end 105.41 80.645) (width 0.4318) (layer Dessous) (net 46)) - (segment (start 102.235 82.677) (end 103.505 82.677) (width 0.4318) (layer Dessous) (net 46) (status 800)) - (segment (start 103.505 82.677) (end 103.505 82.55) (width 0.4318) (layer Dessous) (net 46)) - (segment (start 105.41 80.645) (end 121.285 80.645) (width 0.4318) (layer Dessous) (net 46)) + (segment (start 102.235 85.471) (end 104.14 85.471) (width 0.4318) (layer Dessous) (net 45) (status 800)) + (segment (start 104.14 85.09) (end 107.315 81.915) (width 0.4318) (layer Dessous) (net 45)) + (segment (start 107.315 81.915) (end 120.015 81.915) (width 0.4318) (layer Dessous) (net 45) (status 400)) (segment (start 121.285 80.645) (end 122.555 81.915) (width 0.4318) (layer Dessous) (net 46) (status 400)) - (segment (start 117.475 104.775) (end 122.555 99.695) (width 0.4318) (layer Dessous) (net 47) (status 400)) + (segment (start 105.41 80.645) (end 121.285 80.645) (width 0.4318) (layer Dessous) (net 46)) + (segment (start 103.505 82.677) (end 103.505 82.55) (width 0.4318) (layer Dessous) (net 46)) + (segment (start 102.235 82.677) (end 103.505 82.677) (width 0.4318) (layer Dessous) (net 46) (status 800)) + (segment (start 103.505 82.55) (end 105.41 80.645) (width 0.4318) (layer Dessous) (net 46)) (segment (start 102.235 104.775) (end 117.475 104.775) (width 0.4318) (layer Dessous) (net 47) (status 800)) - (segment (start 113.3602 97.155) (end 120.015 97.155) (width 0.4318) (layer Dessous) (net 48) (status 400)) - (segment (start 99.695 100.6602) (end 109.855 100.6602) (width 0.4318) (layer Dessous) (net 48) (status 800)) + (segment (start 117.475 104.775) (end 122.555 99.695) (width 0.4318) (layer Dessous) (net 47) (status 400)) (segment (start 109.855 100.6602) (end 113.3602 97.155) (width 0.4318) (layer Dessous) (net 48)) - (segment (start 100.965 103.505) (end 116.205 103.505) (width 0.4318) (layer Dessous) (net 49)) - (segment (start 116.205 103.505) (end 120.015 99.695) (width 0.4318) (layer Dessous) (net 49) (status 400)) - (segment (start 100.965 103.2002) (end 100.965 103.505) (width 0.4318) (layer Dessous) (net 49)) + (segment (start 99.695 100.6602) (end 109.855 100.6602) (width 0.4318) (layer Dessous) (net 48) (status 800)) + (segment (start 113.3602 97.155) (end 120.015 97.155) (width 0.4318) (layer Dessous) (net 48) (status 400)) (segment (start 99.695 103.2002) (end 100.965 103.2002) (width 0.4318) (layer Dessous) (net 49) (status 800)) - (segment (start 102.235 71.628) (end 108.585 71.628) (width 0.4318) (layer Dessous) (net 50) (status 800)) - (segment (start 108.585 71.628) (end 111.125 74.168) (width 0.4318) (layer Dessous) (net 50)) - (segment (start 111.125 74.168) (end 120.015 74.168) (width 0.4318) (layer Dessous) (net 50)) + (segment (start 100.965 103.2002) (end 100.965 103.505) (width 0.4318) (layer Dessous) (net 49)) + (segment (start 116.205 103.505) (end 120.015 99.695) (width 0.4318) (layer Dessous) (net 49) (status 400)) + (segment (start 100.965 103.505) (end 116.205 103.505) (width 0.4318) (layer Dessous) (net 49)) (segment (start 120.015 74.168) (end 120.015 74.295) (width 0.4318) (layer Dessous) (net 50) (status 400)) - (segment (start 109.855 74.422) (end 112.268 76.835) (width 0.4318) (layer Dessous) (net 51)) - (segment (start 112.268 76.835) (end 120.015 76.835) (width 0.4318) (layer Dessous) (net 51) (status 400)) + (segment (start 111.125 74.168) (end 120.015 74.168) (width 0.4318) (layer Dessous) (net 50)) + (segment (start 108.585 71.628) (end 111.125 74.168) (width 0.4318) (layer Dessous) (net 50)) + (segment (start 102.235 71.628) (end 108.585 71.628) (width 0.4318) (layer Dessous) (net 50) (status 800)) (segment (start 102.235 74.422) (end 109.855 74.422) (width 0.4318) (layer Dessous) (net 51) (status 800)) - (segment (start 112.014 78.105) (end 121.285 78.105) (width 0.4318) (layer Dessous) (net 52)) - (segment (start 111.125 77.216) (end 112.014 78.105) (width 0.4318) (layer Dessous) (net 52)) - (segment (start 102.235 77.216) (end 111.125 77.216) (width 0.4318) (layer Dessous) (net 52) (status 800)) + (segment (start 112.268 76.835) (end 120.015 76.835) (width 0.4318) (layer Dessous) (net 51) (status 400)) + (segment (start 109.855 74.422) (end 112.268 76.835) (width 0.4318) (layer Dessous) (net 51)) (segment (start 121.285 78.105) (end 122.555 79.375) (width 0.4318) (layer Dessous) (net 52) (status 400)) - (segment (start 103.505 79.375) (end 120.015 79.375) (width 0.4318) (layer Dessous) (net 53) (status 400)) - (segment (start 102.235 79.883) (end 103.505 79.883) (width 0.4318) (layer Dessous) (net 53) (status 800)) + (segment (start 102.235 77.216) (end 111.125 77.216) (width 0.4318) (layer Dessous) (net 52) (status 800)) + (segment (start 111.125 77.216) (end 112.014 78.105) (width 0.4318) (layer Dessous) (net 52)) + (segment (start 112.014 78.105) (end 121.285 78.105) (width 0.4318) (layer Dessous) (net 52)) (segment (start 103.505 79.883) (end 103.505 79.375) (width 0.4318) (layer Dessous) (net 53)) - (segment (start 104.648 97.79) (end 108.585 97.79) (width 0.4318) (layer Dessous) (net 54)) - (segment (start 108.585 97.79) (end 111.76 94.615) (width 0.4318) (layer Dessous) (net 54)) - (segment (start 118.745 93.345) (end 117.475 94.615) (width 0.4318) (layer Dessous) (net 54)) - (segment (start 104.394 98.044) (end 104.648 97.79) (width 0.4318) (layer Dessous) (net 54)) - (segment (start 121.285 93.345) (end 122.555 92.075) (width 0.4318) (layer Dessous) (net 54) (status 400)) - (segment (start 118.745 93.345) (end 121.285 93.345) (width 0.4318) (layer Dessous) (net 54)) - (segment (start 99.8728 98.044) (end 104.394 98.044) (width 0.4318) (layer Dessous) (net 54)) - (segment (start 99.695 97.8662) (end 99.8728 98.044) (width 0.4318) (layer Dessous) (net 54) (status 800)) + (segment (start 102.235 79.883) (end 103.505 79.883) (width 0.4318) (layer Dessous) (net 53) (status 800)) + (segment (start 103.505 79.375) (end 120.015 79.375) (width 0.4318) (layer Dessous) (net 53) (status 400)) (segment (start 111.76 94.615) (end 117.475 94.615) (width 0.4318) (layer Dessous) (net 54)) - (segment (start 105.283 94.615) (end 108.585 94.615) (width 0.4318) (layer Dessous) (net 55)) - (segment (start 99.695 95.123) (end 104.775 95.123) (width 0.4318) (layer Dessous) (net 55) (status 800)) - (segment (start 111.125 92.075) (end 117.475 92.075) (width 0.4318) (layer Dessous) (net 55)) - (segment (start 117.475 92.075) (end 118.745 90.805) (width 0.4318) (layer Dessous) (net 55)) - (segment (start 118.745 90.805) (end 121.285 90.805) (width 0.4318) (layer Dessous) (net 55)) - (segment (start 121.285 90.805) (end 122.555 89.535) (width 0.4318) (layer Dessous) (net 55) (status 400)) - (segment (start 108.585 94.615) (end 111.125 92.075) (width 0.4318) (layer Dessous) (net 55)) + (segment (start 99.695 97.8662) (end 99.8728 98.044) (width 0.4318) (layer Dessous) (net 54) (status 800)) + (segment (start 99.8728 98.044) (end 104.394 98.044) (width 0.4318) (layer Dessous) (net 54)) + (segment (start 118.745 93.345) (end 121.285 93.345) (width 0.4318) (layer Dessous) (net 54)) + (segment (start 121.285 93.345) (end 122.555 92.075) (width 0.4318) (layer Dessous) (net 54) (status 400)) + (segment (start 104.394 98.044) (end 104.648 97.79) (width 0.4318) (layer Dessous) (net 54)) + (segment (start 118.745 93.345) (end 117.475 94.615) (width 0.4318) (layer Dessous) (net 54)) + (segment (start 108.585 97.79) (end 111.76 94.615) (width 0.4318) (layer Dessous) (net 54)) + (segment (start 104.648 97.79) (end 108.585 97.79) (width 0.4318) (layer Dessous) (net 54)) (segment (start 104.775 95.123) (end 105.283 94.615) (width 0.4318) (layer Dessous) (net 55)) - (segment (start 113.665 86.36) (end 116.205 86.36) (width 0.4318) (layer Dessous) (net 56) (status 800)) - (segment (start 116.205 86.36) (end 116.84 86.995) (width 0.4318) (layer Dessous) (net 56)) + (segment (start 108.585 94.615) (end 111.125 92.075) (width 0.4318) (layer Dessous) (net 55)) + (segment (start 121.285 90.805) (end 122.555 89.535) (width 0.4318) (layer Dessous) (net 55) (status 400)) + (segment (start 118.745 90.805) (end 121.285 90.805) (width 0.4318) (layer Dessous) (net 55)) + (segment (start 117.475 92.075) (end 118.745 90.805) (width 0.4318) (layer Dessous) (net 55)) + (segment (start 111.125 92.075) (end 117.475 92.075) (width 0.4318) (layer Dessous) (net 55)) + (segment (start 99.695 95.123) (end 104.775 95.123) (width 0.4318) (layer Dessous) (net 55) (status 800)) + (segment (start 105.283 94.615) (end 108.585 94.615) (width 0.4318) (layer Dessous) (net 55)) (segment (start 116.84 86.995) (end 120.015 86.995) (width 0.4318) (layer Dessous) (net 56) (status 400)) - (segment (start 116.205 88.9) (end 116.84 88.265) (width 0.4318) (layer Dessous) (net 57)) - (segment (start 116.84 88.265) (end 121.285 88.265) (width 0.4318) (layer Dessous) (net 57)) - (segment (start 121.285 88.265) (end 122.555 86.995) (width 0.4318) (layer Dessous) (net 57) (status 400)) + (segment (start 116.205 86.36) (end 116.84 86.995) (width 0.4318) (layer Dessous) (net 56)) + (segment (start 113.665 86.36) (end 116.205 86.36) (width 0.4318) (layer Dessous) (net 56) (status 800)) (segment (start 113.665 88.9) (end 116.205 88.9) (width 0.4318) (layer Dessous) (net 57) (status 800)) - (segment (start 175.895 75.565) (end 183.515 75.565) (width 0.4318) (layer Dessous) (net 58) (status C00)) - (segment (start 161.925 74.295) (end 159.385 71.755) (width 0.4318) (layer Dessous) (net 58)) - (segment (start 170.815 74.295) (end 172.085 75.565) (width 0.4318) (layer Dessous) (net 58)) - (segment (start 159.385 71.755) (end 147.955 71.755) (width 0.4318) (layer Dessous) (net 58) (status 400)) - (segment (start 170.815 74.295) (end 161.925 74.295) (width 0.4318) (layer Dessous) (net 58)) + (segment (start 121.285 88.265) (end 122.555 86.995) (width 0.4318) (layer Dessous) (net 57) (status 400)) + (segment (start 116.84 88.265) (end 121.285 88.265) (width 0.4318) (layer Dessous) (net 57)) + (segment (start 116.205 88.9) (end 116.84 88.265) (width 0.4318) (layer Dessous) (net 57)) (segment (start 175.895 75.565) (end 172.085 75.565) (width 0.4318) (layer Dessous) (net 58) (status 800)) - (segment (start 139.065 52.07) (end 146.05 52.07) (width 0.4318) (layer Dessus) (net 59)) - (segment (start 123.19 69.85) (end 125.095 71.755) (width 0.4318) (layer Dessous) (net 59) (status 400)) - (via (at 120.015 67.945) (size 1.651) (layers Dessus Dessous) (net 59)) - (segment (start 147.955 53.975) (end 146.05 52.07) (width 0.4318) (layer Dessus) (net 59) (status 800)) - (segment (start 135.89 48.895) (end 139.065 52.07) (width 0.4318) (layer Dessus) (net 59)) - (segment (start 120.015 67.945) (end 120.015 69.215) (width 0.4318) (layer Dessous) (net 59)) - (segment (start 120.015 67.945) (end 120.015 50.8) (width 0.4318) (layer Dessus) (net 59)) - (segment (start 120.015 50.8) (end 121.92 48.895) (width 0.4318) (layer Dessus) (net 59)) - (segment (start 120.65 69.85) (end 123.19 69.85) (width 0.4318) (layer Dessous) (net 59)) - (segment (start 147.955 53.975) (end 150.495 51.435) (width 0.4318) (layer Dessous) (net 59) (status 800)) - (segment (start 150.495 51.435) (end 154.305 51.435) (width 0.4318) (layer Dessous) (net 59) (status 400)) - (segment (start 121.92 48.895) (end 135.89 48.895) (width 0.4318) (layer Dessus) (net 59)) + (segment (start 170.815 74.295) (end 161.925 74.295) (width 0.4318) (layer Dessous) (net 58)) + (segment (start 159.385 71.755) (end 147.955 71.755) (width 0.4318) (layer Dessous) (net 58) (status 400)) + (segment (start 170.815 74.295) (end 172.085 75.565) (width 0.4318) (layer Dessous) (net 58)) + (segment (start 161.925 74.295) (end 159.385 71.755) (width 0.4318) (layer Dessous) (net 58)) + (segment (start 175.895 75.565) (end 183.515 75.565) (width 0.4318) (layer Dessous) (net 58) (status C00)) (segment (start 120.015 69.215) (end 120.65 69.85) (width 0.4318) (layer Dessous) (net 59)) - (segment (start 159.385 53.975) (end 161.925 51.435) (width 0.4318) (layer Dessous) (net 60)) - (segment (start 139.065 55.245) (end 143.51 55.245) (width 0.4318) (layer Dessus) (net 60)) - (segment (start 150.495 53.975) (end 159.385 53.975) (width 0.4318) (layer Dessous) (net 60) (status 800)) - (segment (start 149.86 55.88) (end 150.495 55.245) (width 0.4318) (layer Dessus) (net 60)) - (segment (start 123.825 67.945) (end 121.92 67.945) (width 0.4318) (layer Dessous) (net 60)) - (segment (start 143.51 55.245) (end 144.145 55.88) (width 0.4318) (layer Dessus) (net 60)) - (segment (start 126.365 73.025) (end 126.365 70.485) (width 0.4318) (layer Dessous) (net 60)) - (segment (start 127.635 74.295) (end 126.365 73.025) (width 0.4318) (layer Dessous) (net 60) (status 800)) - (segment (start 135.89 52.07) (end 123.19 52.07) (width 0.4318) (layer Dessus) (net 60)) - (segment (start 144.145 55.88) (end 149.86 55.88) (width 0.4318) (layer Dessus) (net 60)) - (segment (start 161.925 51.435) (end 168.275 51.435) (width 0.4318) (layer Dessous) (net 60) (status 400)) - (segment (start 150.495 55.245) (end 150.495 53.975) (width 0.4318) (layer Dessus) (net 60) (status 400)) - (segment (start 135.89 52.07) (end 139.065 55.245) (width 0.4318) (layer Dessus) (net 60)) - (segment (start 126.365 70.485) (end 123.825 67.945) (width 0.4318) (layer Dessous) (net 60)) - (segment (start 121.92 67.945) (end 121.92 53.34) (width 0.4318) (layer Dessus) (net 60)) - (segment (start 123.19 52.07) (end 121.92 53.34) (width 0.4318) (layer Dessus) (net 60)) + (segment (start 121.92 48.895) (end 135.89 48.895) (width 0.4318) (layer Dessus) (net 59)) + (segment (start 150.495 51.435) (end 154.305 51.435) (width 0.4318) (layer Dessous) (net 59) (status 400)) + (segment (start 147.955 53.975) (end 150.495 51.435) (width 0.4318) (layer Dessous) (net 59) (status 800)) + (segment (start 120.65 69.85) (end 123.19 69.85) (width 0.4318) (layer Dessous) (net 59)) + (segment (start 120.015 50.8) (end 121.92 48.895) (width 0.4318) (layer Dessus) (net 59)) + (segment (start 120.015 67.945) (end 120.015 50.8) (width 0.4318) (layer Dessus) (net 59)) + (segment (start 120.015 67.945) (end 120.015 69.215) (width 0.4318) (layer Dessous) (net 59)) + (segment (start 135.89 48.895) (end 139.065 52.07) (width 0.4318) (layer Dessus) (net 59)) + (segment (start 147.955 53.975) (end 146.05 52.07) (width 0.4318) (layer Dessus) (net 59) (status 800)) + (via (at 120.015 67.945) (size 1.651) (layers Dessus Dessous) (net 59)) + (segment (start 123.19 69.85) (end 125.095 71.755) (width 0.4318) (layer Dessous) (net 59) (status 400)) + (segment (start 139.065 52.07) (end 146.05 52.07) (width 0.4318) (layer Dessus) (net 59)) (via (at 121.92 67.945) (size 1.651) (layers Dessus Dessous) (net 60)) - (segment (start 153.035 121.285) (end 145.415 113.665) (width 0.4318) (layer Dessous) (net 61)) - (segment (start 154.94 129.54) (end 155.575 130.175) (width 0.4318) (layer Dessous) (net 61)) - (segment (start 155.575 130.175) (end 155.575 133.35) (width 0.4318) (layer Dessous) (net 61) (status 400)) - (segment (start 153.035 121.285) (end 153.035 122.555) (width 0.4318) (layer Dessous) (net 61)) - (segment (start 145.415 113.665) (end 145.415 102.235) (width 0.4318) (layer Dessous) (net 61) (status 400)) - (segment (start 153.035 123.19) (end 153.035 123.825) (width 0.4318) (layer Dessous) (net 61)) - (segment (start 153.035 122.555) (end 153.035 123.19) (width 0.4318) (layer Dessous) (net 61)) - (segment (start 153.035 123.825) (end 154.94 125.73) (width 0.4318) (layer Dessous) (net 61)) + (segment (start 123.19 52.07) (end 121.92 53.34) (width 0.4318) (layer Dessus) (net 60)) + (segment (start 121.92 67.945) (end 121.92 53.34) (width 0.4318) (layer Dessus) (net 60)) + (segment (start 126.365 70.485) (end 123.825 67.945) (width 0.4318) (layer Dessous) (net 60)) + (segment (start 135.89 52.07) (end 139.065 55.245) (width 0.4318) (layer Dessus) (net 60)) + (segment (start 150.495 55.245) (end 150.495 53.975) (width 0.4318) (layer Dessus) (net 60) (status 400)) + (segment (start 161.925 51.435) (end 168.275 51.435) (width 0.4318) (layer Dessous) (net 60) (status 400)) + (segment (start 144.145 55.88) (end 149.86 55.88) (width 0.4318) (layer Dessus) (net 60)) + (segment (start 135.89 52.07) (end 123.19 52.07) (width 0.4318) (layer Dessus) (net 60)) + (segment (start 127.635 74.295) (end 126.365 73.025) (width 0.4318) (layer Dessous) (net 60) (status 800)) + (segment (start 126.365 73.025) (end 126.365 70.485) (width 0.4318) (layer Dessous) (net 60)) + (segment (start 143.51 55.245) (end 144.145 55.88) (width 0.4318) (layer Dessus) (net 60)) + (segment (start 123.825 67.945) (end 121.92 67.945) (width 0.4318) (layer Dessous) (net 60)) + (segment (start 149.86 55.88) (end 150.495 55.245) (width 0.4318) (layer Dessus) (net 60)) + (segment (start 150.495 53.975) (end 159.385 53.975) (width 0.4318) (layer Dessous) (net 60) (status 800)) + (segment (start 139.065 55.245) (end 143.51 55.245) (width 0.4318) (layer Dessus) (net 60)) + (segment (start 159.385 53.975) (end 161.925 51.435) (width 0.4318) (layer Dessous) (net 60)) (segment (start 154.94 125.73) (end 154.94 129.54) (width 0.4318) (layer Dessous) (net 61)) - (segment (start 152.781 130.175) (end 152.4 130.175) (width 0.4318) (layer Dessous) (net 62)) - (segment (start 151.765 122.555) (end 151.765 128.905) (width 0.4318) (layer Dessous) (net 62)) - (segment (start 144.145 114.935) (end 151.765 122.555) (width 0.4318) (layer Dessous) (net 62)) - (segment (start 142.875 102.235) (end 144.145 103.505) (width 0.4318) (layer Dessous) (net 62) (status 800)) - (segment (start 144.145 103.505) (end 144.145 114.935) (width 0.4318) (layer Dessous) (net 62)) - (segment (start 152.781 133.35) (end 152.781 130.175) (width 0.4318) (layer Dessous) (net 62) (status 800)) - (segment (start 151.765 128.905) (end 152.4 129.54) (width 0.4318) (layer Dessous) (net 62)) + (segment (start 153.035 123.825) (end 154.94 125.73) (width 0.4318) (layer Dessous) (net 61)) + (segment (start 153.035 122.555) (end 153.035 123.19) (width 0.4318) (layer Dessous) (net 61)) + (segment (start 153.035 123.19) (end 153.035 123.825) (width 0.4318) (layer Dessous) (net 61)) + (segment (start 145.415 113.665) (end 145.415 102.235) (width 0.4318) (layer Dessous) (net 61) (status 400)) + (segment (start 153.035 121.285) (end 153.035 122.555) (width 0.4318) (layer Dessous) (net 61)) + (segment (start 155.575 130.175) (end 155.575 133.35) (width 0.4318) (layer Dessous) (net 61) (status 400)) + (segment (start 154.94 129.54) (end 155.575 130.175) (width 0.4318) (layer Dessous) (net 61)) + (segment (start 153.035 121.285) (end 145.415 113.665) (width 0.4318) (layer Dessous) (net 61)) (segment (start 152.4 129.54) (end 152.4 130.175) (width 0.4318) (layer Dessous) (net 62)) - (segment (start 152.4 104.14) (end 142.24 104.14) (width 0.4318) (layer Dessus) (net 63)) - (segment (start 142.24 104.14) (end 141.986 103.886) (width 0.4318) (layer Dessus) (net 63)) - (segment (start 141.986 103.886) (end 139.827 103.886) (width 0.4318) (layer Dessus) (net 63)) - (segment (start 144.145 129.54) (end 145.415 128.27) (width 0.4318) (layer Dessus) (net 63)) - (segment (start 139.827 103.886) (end 139.573 104.14) (width 0.4318) (layer Dessus) (net 63)) - (segment (start 139.573 104.14) (end 120.65 104.14) (width 0.4318) (layer Dessus) (net 63)) - (segment (start 120.65 104.14) (end 116.205 108.585) (width 0.4318) (layer Dessus) (net 63)) - (segment (start 144.145 67.31) (end 144.145 73.025) (width 0.4318) (layer Dessous) (net 63)) - (segment (start 116.205 108.585) (end 116.205 127.635) (width 0.4318) (layer Dessus) (net 63)) - (segment (start 116.205 127.635) (end 118.11 129.54) (width 0.4318) (layer Dessus) (net 63)) - (segment (start 118.11 129.54) (end 144.145 129.54) (width 0.4318) (layer Dessus) (net 63)) - (segment (start 145.415 128.27) (end 149.86 128.27) (width 0.4318) (layer Dessus) (net 63)) - (segment (start 151.765 66.675) (end 152.4 66.04) (width 0.4318) (layer Dessous) (net 63)) - (via (at 154.305 66.04) (size 1.651) (layers Dessus Dessous) (net 63)) - (segment (start 154.305 102.235) (end 154.305 66.04) (width 0.4318) (layer Dessus) (net 63)) - (segment (start 149.987 130.175) (end 149.86 130.175) (width 0.4318) (layer Dessous) (net 63)) - (segment (start 152.4 66.04) (end 154.305 66.04) (width 0.4318) (layer Dessous) (net 63)) - (segment (start 144.145 67.31) (end 144.78 66.675) (width 0.4318) (layer Dessous) (net 63)) - (segment (start 144.78 66.675) (end 151.765 66.675) (width 0.4318) (layer Dessous) (net 63)) - (segment (start 144.145 73.025) (end 142.875 74.295) (width 0.4318) (layer Dessous) (net 63) (status 400)) - (segment (start 154.305 102.235) (end 152.4 104.14) (width 0.4318) (layer Dessus) (net 63)) - (segment (start 149.987 133.35) (end 149.987 130.175) (width 0.4318) (layer Dessous) (net 63) (status 800)) - (segment (start 149.86 128.27) (end 149.86 130.175) (width 0.4318) (layer Dessous) (net 63)) + (segment (start 151.765 128.905) (end 152.4 129.54) (width 0.4318) (layer Dessous) (net 62)) + (segment (start 152.781 133.35) (end 152.781 130.175) (width 0.4318) (layer Dessous) (net 62) (status 800)) + (segment (start 144.145 103.505) (end 144.145 114.935) (width 0.4318) (layer Dessous) (net 62)) + (segment (start 142.875 102.235) (end 144.145 103.505) (width 0.4318) (layer Dessous) (net 62) (status 800)) + (segment (start 144.145 114.935) (end 151.765 122.555) (width 0.4318) (layer Dessous) (net 62)) + (segment (start 151.765 122.555) (end 151.765 128.905) (width 0.4318) (layer Dessous) (net 62)) + (segment (start 152.781 130.175) (end 152.4 130.175) (width 0.4318) (layer Dessous) (net 62)) (via (at 149.86 128.27) (size 1.651) (layers Dessus Dessous) (net 63)) - (segment (start 142.875 119.38) (end 147.32 123.825) (width 0.4318) (layer Dessous) (net 64)) - (segment (start 142.875 119.38) (end 142.875 104.775) (width 0.4318) (layer Dessous) (net 64)) - (segment (start 148.59 126.365) (end 158.75 126.365) (width 0.4318) (layer Dessus) (net 64)) - (segment (start 158.369 128.905) (end 158.75 128.524) (width 0.4318) (layer Dessous) (net 64)) - (segment (start 141.605 103.505) (end 141.605 100.965) (width 0.4318) (layer Dessous) (net 64)) - (segment (start 158.369 133.35) (end 158.369 128.905) (width 0.4318) (layer Dessous) (net 64) (status 800)) - (segment (start 158.75 128.524) (end 158.75 128.27) (width 0.4318) (layer Dessous) (net 64)) - (segment (start 141.605 103.505) (end 142.875 104.775) (width 0.4318) (layer Dessous) (net 64)) - (via (at 158.75 126.365) (size 1.651) (layers Dessus Dessous) (net 64)) - (segment (start 158.75 128.27) (end 158.75 126.365) (width 0.4318) (layer Dessous) (net 64)) - (segment (start 142.875 99.695) (end 141.605 100.965) (width 0.4318) (layer Dessous) (net 64) (status 800)) - (segment (start 147.32 125.095) (end 148.59 126.365) (width 0.4318) (layer Dessus) (net 64)) - (segment (start 147.32 123.825) (end 147.32 125.095) (width 0.4318) (layer Dessous) (net 64)) + (segment (start 149.86 128.27) (end 149.86 130.175) (width 0.4318) (layer Dessous) (net 63)) + (segment (start 149.987 133.35) (end 149.987 130.175) (width 0.4318) (layer Dessous) (net 63) (status 800)) + (segment (start 154.305 102.235) (end 152.4 104.14) (width 0.4318) (layer Dessus) (net 63)) + (segment (start 144.145 73.025) (end 142.875 74.295) (width 0.4318) (layer Dessous) (net 63) (status 400)) + (segment (start 144.78 66.675) (end 151.765 66.675) (width 0.4318) (layer Dessous) (net 63)) + (segment (start 144.145 67.31) (end 144.78 66.675) (width 0.4318) (layer Dessous) (net 63)) + (segment (start 152.4 66.04) (end 154.305 66.04) (width 0.4318) (layer Dessous) (net 63)) + (segment (start 149.987 130.175) (end 149.86 130.175) (width 0.4318) (layer Dessous) (net 63)) + (segment (start 154.305 102.235) (end 154.305 66.04) (width 0.4318) (layer Dessus) (net 63)) + (via (at 154.305 66.04) (size 1.651) (layers Dessus Dessous) (net 63)) + (segment (start 151.765 66.675) (end 152.4 66.04) (width 0.4318) (layer Dessous) (net 63)) + (segment (start 145.415 128.27) (end 149.86 128.27) (width 0.4318) (layer Dessus) (net 63)) + (segment (start 118.11 129.54) (end 144.145 129.54) (width 0.4318) (layer Dessus) (net 63)) + (segment (start 116.205 127.635) (end 118.11 129.54) (width 0.4318) (layer Dessus) (net 63)) + (segment (start 116.205 108.585) (end 116.205 127.635) (width 0.4318) (layer Dessus) (net 63)) + (segment (start 144.145 67.31) (end 144.145 73.025) (width 0.4318) (layer Dessous) (net 63)) + (segment (start 120.65 104.14) (end 116.205 108.585) (width 0.4318) (layer Dessus) (net 63)) + (segment (start 139.573 104.14) (end 120.65 104.14) (width 0.4318) (layer Dessus) (net 63)) + (segment (start 139.827 103.886) (end 139.573 104.14) (width 0.4318) (layer Dessus) (net 63)) + (segment (start 144.145 129.54) (end 145.415 128.27) (width 0.4318) (layer Dessus) (net 63)) + (segment (start 141.986 103.886) (end 139.827 103.886) (width 0.4318) (layer Dessus) (net 63)) + (segment (start 142.24 104.14) (end 141.986 103.886) (width 0.4318) (layer Dessus) (net 63)) + (segment (start 152.4 104.14) (end 142.24 104.14) (width 0.4318) (layer Dessus) (net 63)) (via (at 147.32 125.095) (size 1.651) (layers Dessus Dessous) (net 64)) - (segment (start 120.65 117.475) (end 116.84 117.475) (width 0.4318) (layer Dessous) (net 65)) - (segment (start 116.205 116.84) (end 116.205 107.95) (width 0.4318) (layer Dessous) (net 65)) - (segment (start 116.84 107.315) (end 121.285 107.315) (width 0.4318) (layer Dessous) (net 65)) - (segment (start 130.81 114.935) (end 122.555 114.935) (width 0.4318) (layer Dessous) (net 65)) - (segment (start 131.445 117.475) (end 131.445 115.57) (width 0.4318) (layer Dessous) (net 65) (status 800)) - (segment (start 116.205 107.95) (end 116.84 107.315) (width 0.4318) (layer Dessous) (net 65)) - (segment (start 122.555 106.045) (end 122.555 102.235) (width 0.4318) (layer Dessous) (net 65) (status 400)) - (segment (start 121.285 107.315) (end 122.555 106.045) (width 0.4318) (layer Dessous) (net 65)) - (segment (start 131.445 115.57) (end 130.81 114.935) (width 0.4318) (layer Dessous) (net 65)) - (segment (start 121.285 116.205) (end 121.285 116.84) (width 0.4318) (layer Dessous) (net 65)) - (segment (start 121.285 116.84) (end 120.65 117.475) (width 0.4318) (layer Dessous) (net 65)) - (segment (start 116.84 117.475) (end 116.205 116.84) (width 0.4318) (layer Dessous) (net 65)) + (segment (start 147.32 123.825) (end 147.32 125.095) (width 0.4318) (layer Dessous) (net 64)) + (segment (start 147.32 125.095) (end 148.59 126.365) (width 0.4318) (layer Dessus) (net 64)) + (segment (start 142.875 99.695) (end 141.605 100.965) (width 0.4318) (layer Dessous) (net 64) (status 800)) + (segment (start 158.75 128.27) (end 158.75 126.365) (width 0.4318) (layer Dessous) (net 64)) + (via (at 158.75 126.365) (size 1.651) (layers Dessus Dessous) (net 64)) + (segment (start 141.605 103.505) (end 142.875 104.775) (width 0.4318) (layer Dessous) (net 64)) + (segment (start 158.75 128.524) (end 158.75 128.27) (width 0.4318) (layer Dessous) (net 64)) + (segment (start 158.369 133.35) (end 158.369 128.905) (width 0.4318) (layer Dessous) (net 64) (status 800)) + (segment (start 141.605 103.505) (end 141.605 100.965) (width 0.4318) (layer Dessous) (net 64)) + (segment (start 158.369 128.905) (end 158.75 128.524) (width 0.4318) (layer Dessous) (net 64)) + (segment (start 148.59 126.365) (end 158.75 126.365) (width 0.4318) (layer Dessus) (net 64)) + (segment (start 142.875 119.38) (end 142.875 104.775) (width 0.4318) (layer Dessous) (net 64)) + (segment (start 142.875 119.38) (end 147.32 123.825) (width 0.4318) (layer Dessous) (net 64)) (segment (start 122.555 114.935) (end 121.285 116.205) (width 0.4318) (layer Dessous) (net 65)) - (segment (start 127 94.615) (end 126.365 94.615) (width 1.016) (layer Dessous) (net 66)) - (segment (start 126.365 94.615) (end 122.555 94.615) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 99.695 86.8426) (end 97.79 86.8426) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 97.79 73.025) (end 99.695 73.025) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 97.155 73.66) (end 97.79 73.025) (width 1.016) (layer Dessous) (net 66)) - (segment (start 97.155 86.2076) (end 97.155 86.36) (width 1.016) (layer Dessous) (net 66)) - (segment (start 97.155 86.36) (end 97.155 83.82) (width 1.016) (layer Dessous) (net 66)) - (segment (start 97.155 83.82) (end 97.155 81.28) (width 1.016) (layer Dessous) (net 66)) - (segment (start 147.32 59.055) (end 163.83 59.055) (width 1.016) (layer Dessous) (net 66)) - (segment (start 163.83 59.055) (end 164.465 58.42) (width 1.016) (layer Dessous) (net 66)) - (segment (start 164.465 58.42) (end 164.465 56.515) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 136.525 65.405) (end 136.525 61.595) (width 0.635) (layer Dessous) (net 66) (status 800)) - (segment (start 126.365 67.945) (end 132.715 67.945) (width 1.016) (layer Dessus) (net 66)) - (segment (start 141.605 90.424) (end 141.605 89.535) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 133.35 68.58) (end 135.89 68.58) (width 1.016) (layer Dessus) (net 66)) - (via (at 135.89 68.58) (size 1.651) (layers Dessus Dessous) (net 66)) - (segment (start 135.89 68.58) (end 136.525 67.945) (width 1.016) (layer Dessous) (net 66)) - (segment (start 132.715 67.945) (end 133.35 68.58) (width 1.016) (layer Dessus) (net 66)) - (segment (start 136.525 109.855) (end 139.065 107.315) (width 0.635) (layer Dessous) (net 66) (status 800)) - (segment (start 121.285 61.214) (end 123.825 61.214) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 126.365 63.754) (end 126.365 65.405) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 123.825 61.214) (end 126.365 63.754) (width 1.016) (layer Dessous) (net 66)) - (segment (start 164.465 56.515) (end 171.45 56.515) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 136.525 111.76) (end 136.525 109.855) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 135.89 112.395) (end 136.525 111.76) (width 1.016) (layer Dessous) (net 66)) - (segment (start 132.715 112.395) (end 135.255 112.395) (width 1.016) (layer Dessous) (net 66)) - (segment (start 135.255 112.395) (end 135.89 112.395) (width 1.016) (layer Dessous) (net 66)) - (segment (start 135.255 112.395) (end 135.255 114.935) (width 1.016) (layer Dessous) (net 66)) - (segment (start 126.365 113.411) (end 126.365 112.395) (width 1.016) (layer Dessous) (net 66)) - (segment (start 132.08 112.395) (end 132.715 112.395) (width 1.016) (layer Dessous) (net 66)) - (segment (start 131.445 111.76) (end 132.08 112.395) (width 1.016) (layer Dessous) (net 66)) - (segment (start 131.445 109.855) (end 131.445 111.76) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 126.365 112.395) (end 126.365 109.855) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 139.065 100.965) (end 139.065 107.315) (width 0.4318) (layer Dessous) (net 66)) - (segment (start 140.335 99.695) (end 139.065 100.965) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 131.826 126.365) (end 131.826 121.285) (width 1.016) (layer Dessous) (net 66) (status C00)) - (segment (start 133.35 121.285) (end 133.985 120.65) (width 1.016) (layer Dessous) (net 66)) - (segment (start 133.985 120.65) (end 133.985 117.475) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 131.826 121.285) (end 133.35 121.285) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 120.015 114.046) (end 125.73 114.046) (width 0.635) (layer Dessous) (net 66)) - (segment (start 125.73 114.046) (end 126.365 113.411) (width 0.635) (layer Dessous) (net 66)) - (segment (start 127.635 87.376) (end 127.635 93.98) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 127.635 93.98) (end 127 94.615) (width 1.016) (layer Dessous) (net 66)) - (segment (start 175.895 65.405) (end 178.435 65.405) (width 1.016) (layer Dessous) (net 66)) - (segment (start 154.94 62.865) (end 156.21 62.865) (width 1.016) (layer Dessus) (net 66)) - (segment (start 151.765 66.04) (end 154.94 62.865) (width 1.016) (layer Dessus) (net 66)) - (segment (start 142.24 68.58) (end 144.78 66.04) (width 1.016) (layer Dessus) (net 66)) - (segment (start 144.78 66.04) (end 151.765 66.04) (width 1.016) (layer Dessus) (net 66)) - (segment (start 135.89 68.58) (end 142.24 68.58) (width 1.016) (layer Dessus) (net 66)) - (via (at 126.365 67.945) (size 1.651) (layers Dessus Dessous) (net 66)) - (segment (start 126.365 67.945) (end 126.365 65.405) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 136.525 61.595) (end 137.795 60.325) (width 0.635) (layer Dessous) (net 66)) - (segment (start 137.795 60.325) (end 137.795 56.515) (width 0.4318) (layer Dessous) (net 66)) - (segment (start 137.795 56.515) (end 138.43 55.88) (width 0.635) (layer Dessous) (net 66)) - (segment (start 138.43 55.88) (end 144.145 55.88) (width 0.635) (layer Dessous) (net 66)) - (segment (start 144.145 55.88) (end 147.32 59.055) (width 1.016) (layer Dessous) (net 66)) - (segment (start 171.45 56.515) (end 178.435 56.515) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 178.435 56.515) (end 178.435 64.135) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 178.435 64.135) (end 178.435 65.405) (width 1.016) (layer Dessous) (net 66)) - (segment (start 156.845 133.35) (end 156.972 133.35) (width 1.016) (layer Dessus) (net 66) (status 400)) - (segment (start 167.005 43.815) (end 171.45 48.26) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 187.325 64.135) (end 178.435 64.135) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 141.605 78.105) (end 149.225 78.105) (width 0.4318) (layer Dessous) (net 66)) - (segment (start 108.585 52.705) (end 108.585 49.53) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 108.585 49.53) (end 109.22 48.895) (width 1.016) (layer Dessous) (net 66)) - (segment (start 189.865 71.755) (end 189.865 64.77) (width 1.016) (layer Dessous) (net 66)) - (segment (start 189.865 64.77) (end 189.23 64.135) (width 1.016) (layer Dessous) (net 66)) - (segment (start 189.23 64.135) (end 187.325 64.135) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 189.865 71.755) (end 191.135 73.025) (width 1.016) (layer Dessous) (net 66)) - (segment (start 191.135 73.025) (end 191.135 95.885) (width 1.016) (layer Dessous) (net 66)) - (segment (start 189.865 96.52) (end 188.595 96.52) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 126.365 100.965) (end 126.365 94.615) (width 0.4318) (layer Dessous) (net 66)) - (segment (start 141.605 89.535) (end 141.605 78.105) (width 1.016) (layer Dessous) (net 66)) - (segment (start 99.695 70.485) (end 108.585 61.595) (width 1.016) (layer Dessous) (net 66)) - (segment (start 108.585 61.595) (end 108.585 60.325) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 99.695 73.025) (end 99.695 70.485) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 140.716 78.105) (end 141.605 78.105) (width 1.016) (layer Dessous) (net 66)) - (segment (start 97.155 75.819) (end 97.155 76.2) (width 1.016) (layer Dessous) (net 66)) - (segment (start 99.695 75.819) (end 97.155 75.819) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 154.305 78.74) (end 156.21 78.74) (width 1.016) (layer Dessous) (net 66)) - (segment (start 153.67 79.375) (end 154.305 78.74) (width 1.016) (layer Dessous) (net 66)) - (via (at 156.21 78.74) (size 1.651) (layers Dessus Dessous) (net 66)) - (segment (start 156.21 78.74) (end 156.21 62.865) (width 1.016) (layer Dessus) (net 66)) - (segment (start 150.495 79.375) (end 153.67 79.375) (width 1.016) (layer Dessous) (net 66) (status 800)) - (via (at 175.895 65.405) (size 1.651) (layers Dessus Dessous) (net 66)) - (segment (start 173.355 62.865) (end 175.895 65.405) (width 1.016) (layer Dessus) (net 66)) - (segment (start 156.21 62.865) (end 173.355 62.865) (width 1.016) (layer Dessus) (net 66)) - (segment (start 97.155 89.535) (end 97.155 91.44) (width 1.016) (layer Dessous) (net 66)) - (segment (start 97.155 86.36) (end 97.155 89.535) (width 1.016) (layer Dessous) (net 66)) - (segment (start 97.155 84.0994) (end 97.155 83.82) (width 1.016) (layer Dessous) (net 66)) - (segment (start 99.695 84.0994) (end 97.155 84.0994) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 97.155 81.2546) (end 97.155 81.28) (width 1.016) (layer Dessous) (net 66)) - (segment (start 99.695 81.2546) (end 97.155 81.2546) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 97.155 78.5622) (end 97.155 78.74) (width 1.016) (layer Dessous) (net 66)) - (segment (start 99.695 78.5622) (end 97.155 78.5622) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 155.575 120.015) (end 156.845 120.015) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 139.446 79.375) (end 140.716 78.105) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 163.195 126.365) (end 178.435 126.365) (width 1.016) (layer Dessous) (net 66)) - (segment (start 147.955 89.535) (end 141.605 89.535) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 178.435 126.365) (end 179.705 125.095) (width 1.016) (layer Dessous) (net 66)) - (segment (start 127.635 102.235) (end 126.365 100.965) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 179.705 125.095) (end 183.515 125.095) (width 1.016) (layer Dessous) (net 66)) - (segment (start 136.525 67.945) (end 136.525 65.405) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 183.515 114.935) (end 183.515 125.095) (width 1.016) (layer Dessous) (net 66)) - (segment (start 189.865 108.585) (end 183.515 114.935) (width 1.016) (layer Dessous) (net 66)) - (segment (start 183.515 114.935) (end 183.515 125.095) (width 0.635) (layer Dessous) (net 66)) - (segment (start 104.775 92.3798) (end 108.2548 88.9) (width 1.016) (layer Dessous) (net 66)) - (segment (start 191.135 95.885) (end 190.5 96.52) (width 1.016) (layer Dessous) (net 66)) - (segment (start 149.225 78.105) (end 150.495 79.375) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 189.865 108.585) (end 189.865 96.52) (width 1.016) (layer Dessous) (net 66)) - (segment (start 171.45 48.26) (end 171.45 56.515) (width 1.016) (layer Dessous) (net 66)) - (segment (start 109.22 48.895) (end 116.84 48.895) (width 1.016) (layer Dessous) (net 66)) - (segment (start 116.84 48.895) (end 117.475 49.53) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 117.475 49.53) (end 121.285 53.34) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 121.285 53.34) (end 121.285 61.214) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 108.585 60.325) (end 108.585 52.705) (width 1.016) (layer Dessous) (net 66) (status C00)) - (segment (start 190.5 96.52) (end 189.865 96.52) (width 1.016) (layer Dessous) (net 66)) - (segment (start 146.685 133.35) (end 140.97 133.35) (width 1.016) (layer Dessus) (net 66)) - (segment (start 148.59 133.35) (end 146.685 133.35) (width 1.016) (layer Dessus) (net 66) (status 800)) - (via (at 140.97 133.35) (size 1.651) (layers Dessus Dessous) (net 66)) - (segment (start 140.97 133.35) (end 140.97 127) (width 1.016) (layer Dessous) (net 66)) - (segment (start 140.97 127) (end 139.065 125.095) (width 1.016) (layer Dessous) (net 66)) - (segment (start 108.2548 88.9) (end 111.125 88.9) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 99.695 92.3798) (end 104.775 92.3798) (width 0.635) (layer Dessous) (net 66) (status 800)) - (segment (start 111.125 88.9) (end 111.125 86.36) (width 1.016) (layer Dessous) (net 66) (status C00)) - (segment (start 97.155 89.5858) (end 97.155 89.535) (width 1.016) (layer Dessous) (net 66)) - (segment (start 99.695 89.5858) (end 97.155 89.5858) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 97.155 91.44) (end 97.79 92.075) (width 1.016) (layer Dessous) (net 66)) - (segment (start 97.79 92.075) (end 99.695 92.075) (width 1.016) (layer Dessous) (net 66)) - (segment (start 99.695 92.075) (end 99.695 92.3798) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 137.795 114.935) (end 139.065 116.205) (width 1.016) (layer Dessous) (net 66)) - (segment (start 139.065 116.205) (end 139.065 117.475) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 133.985 116.205) (end 135.255 114.935) (width 1.016) (layer Dessous) (net 66)) - (segment (start 133.985 117.475) (end 133.985 116.205) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 97.155 81.28) (end 97.155 78.74) (width 1.016) (layer Dessous) (net 66)) - (segment (start 97.155 78.74) (end 97.155 76.2) (width 1.016) (layer Dessous) (net 66)) - (segment (start 97.155 76.2) (end 97.155 73.66) (width 1.016) (layer Dessous) (net 66)) - (segment (start 148.59 106.68) (end 148.59 111.76) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 148.59 111.76) (end 151.13 114.3) (width 1.016) (layer Dessous) (net 66)) - (segment (start 151.13 114.3) (end 151.765 114.935) (width 1.016) (layer Dessous) (net 66)) - (segment (start 183.515 125.095) (end 187.325 125.095) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 163.195 126.365) (end 156.845 120.015) (width 1.016) (layer Dessous) (net 66)) - (segment (start 97.79 86.8426) (end 97.155 86.2076) (width 1.016) (layer Dessous) (net 66)) - (segment (start 118.745 115.316) (end 120.015 114.046) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 127.635 102.235) (end 127.635 104.775) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 126.365 106.045) (end 126.365 109.855) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 127.635 104.775) (end 126.365 106.045) (width 1.016) (layer Dessous) (net 66)) - (segment (start 126.365 112.395) (end 132.715 112.395) (width 1.016) (layer Dessous) (net 66)) - (segment (start 139.446 79.375) (end 139.446 76.835) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 139.065 73.025) (end 140.335 71.755) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 139.065 76.835) (end 139.065 73.025) (width 0.4318) (layer Dessous) (net 66)) - (segment (start 139.446 76.835) (end 139.065 76.835) (width 1.016) (layer Dessous) (net 66)) - (segment (start 153.67 120.015) (end 151.765 118.11) (width 1.016) (layer Dessous) (net 66)) - (segment (start 151.765 118.11) (end 151.765 114.935) (width 1.016) (layer Dessous) (net 66)) - (segment (start 155.575 120.015) (end 153.67 120.015) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 154.94 106.68) (end 157.48 104.14) (width 1.016) (layer Dessous) (net 66)) - (segment (start 157.48 104.14) (end 164.465 104.14) (width 1.016) (layer Dessous) (net 66)) - (segment (start 164.465 104.14) (end 165.1 104.14) (width 1.016) (layer Dessous) (net 66)) - (segment (start 165.1 104.14) (end 167.005 106.045) (width 1.016) (layer Dessous) (net 66)) - (segment (start 167.005 106.045) (end 168.275 106.045) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 148.59 106.68) (end 154.94 106.68) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 174.879 66.675) (end 175.895 65.659) (width 1.016) (layer Dessous) (net 66)) - (segment (start 175.895 65.659) (end 175.895 65.405) (width 1.016) (layer Dessous) (net 66)) - (segment (start 174.879 69.85) (end 174.879 66.675) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 154.178 133.35) (end 156.845 133.35) (width 1.016) (layer Dessus) (net 66) (status 800)) - (segment (start 154.305 133.35) (end 154.178 133.35) (width 1.016) (layer Dessus) (net 66) (status 400)) - (segment (start 151.384 133.35) (end 154.305 133.35) (width 1.016) (layer Dessus) (net 66) (status 800)) - (segment (start 151.13 133.35) (end 151.384 133.35) (width 1.016) (layer Dessus) (net 66) (status 400)) - (segment (start 148.59 133.35) (end 151.13 133.35) (width 1.016) (layer Dessus) (net 66) (status 800)) - (segment (start 147.32 117.475) (end 149.86 120.015) (width 1.016) (layer Dessus) (net 66)) - (segment (start 149.86 120.015) (end 155.575 120.015) (width 1.016) (layer Dessus) (net 66) (status 400)) - (segment (start 139.065 117.475) (end 147.32 117.475) (width 1.016) (layer Dessus) (net 66) (status 800)) - (segment (start 139.065 125.095) (end 139.065 117.475) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 116.84 117.475) (end 116.205 116.84) (width 0.4318) (layer Dessous) (net 65)) + (segment (start 121.285 116.84) (end 120.65 117.475) (width 0.4318) (layer Dessous) (net 65)) + (segment (start 121.285 116.205) (end 121.285 116.84) (width 0.4318) (layer Dessous) (net 65)) + (segment (start 131.445 115.57) (end 130.81 114.935) (width 0.4318) (layer Dessous) (net 65)) + (segment (start 121.285 107.315) (end 122.555 106.045) (width 0.4318) (layer Dessous) (net 65)) + (segment (start 122.555 106.045) (end 122.555 102.235) (width 0.4318) (layer Dessous) (net 65) (status 400)) + (segment (start 116.205 107.95) (end 116.84 107.315) (width 0.4318) (layer Dessous) (net 65)) + (segment (start 131.445 117.475) (end 131.445 115.57) (width 0.4318) (layer Dessous) (net 65) (status 800)) + (segment (start 130.81 114.935) (end 122.555 114.935) (width 0.4318) (layer Dessous) (net 65)) + (segment (start 116.84 107.315) (end 121.285 107.315) (width 0.4318) (layer Dessous) (net 65)) + (segment (start 116.205 116.84) (end 116.205 107.95) (width 0.4318) (layer Dessous) (net 65)) + (segment (start 120.65 117.475) (end 116.84 117.475) (width 0.4318) (layer Dessous) (net 65)) (segment (start 135.255 114.935) (end 137.795 114.935) (width 1.016) (layer Dessous) (net 66)) - (segment (start 121.285 65.405) (end 123.825 65.405) (width 0.4318) (layer Dessous) (net 67) (status 400)) + (segment (start 139.065 125.095) (end 139.065 117.475) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 139.065 117.475) (end 147.32 117.475) (width 1.016) (layer Dessus) (net 66) (status 800)) + (segment (start 149.86 120.015) (end 155.575 120.015) (width 1.016) (layer Dessus) (net 66) (status 400)) + (segment (start 147.32 117.475) (end 149.86 120.015) (width 1.016) (layer Dessus) (net 66)) + (segment (start 148.59 133.35) (end 151.13 133.35) (width 1.016) (layer Dessus) (net 66) (status 800)) + (segment (start 151.13 133.35) (end 151.384 133.35) (width 1.016) (layer Dessus) (net 66) (status 400)) + (segment (start 151.384 133.35) (end 154.305 133.35) (width 1.016) (layer Dessus) (net 66) (status 800)) + (segment (start 154.305 133.35) (end 154.178 133.35) (width 1.016) (layer Dessus) (net 66) (status 400)) + (segment (start 154.178 133.35) (end 156.845 133.35) (width 1.016) (layer Dessus) (net 66) (status 800)) + (segment (start 174.879 69.85) (end 174.879 66.675) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 175.895 65.659) (end 175.895 65.405) (width 1.016) (layer Dessous) (net 66)) + (segment (start 174.879 66.675) (end 175.895 65.659) (width 1.016) (layer Dessous) (net 66)) + (segment (start 148.59 106.68) (end 154.94 106.68) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 167.005 106.045) (end 168.275 106.045) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 165.1 104.14) (end 167.005 106.045) (width 1.016) (layer Dessous) (net 66)) + (segment (start 164.465 104.14) (end 165.1 104.14) (width 1.016) (layer Dessous) (net 66)) + (segment (start 157.48 104.14) (end 164.465 104.14) (width 1.016) (layer Dessous) (net 66)) + (segment (start 154.94 106.68) (end 157.48 104.14) (width 1.016) (layer Dessous) (net 66)) + (segment (start 155.575 120.015) (end 153.67 120.015) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 151.765 118.11) (end 151.765 114.935) (width 1.016) (layer Dessous) (net 66)) + (segment (start 153.67 120.015) (end 151.765 118.11) (width 1.016) (layer Dessous) (net 66)) + (segment (start 139.446 76.835) (end 139.065 76.835) (width 1.016) (layer Dessous) (net 66)) + (segment (start 139.065 76.835) (end 139.065 73.025) (width 0.4318) (layer Dessous) (net 66)) + (segment (start 139.065 73.025) (end 140.335 71.755) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 139.446 79.375) (end 139.446 76.835) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 126.365 112.395) (end 132.715 112.395) (width 1.016) (layer Dessous) (net 66)) + (segment (start 127.635 104.775) (end 126.365 106.045) (width 1.016) (layer Dessous) (net 66)) + (segment (start 126.365 106.045) (end 126.365 109.855) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 127.635 102.235) (end 127.635 104.775) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 118.745 115.316) (end 120.015 114.046) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 97.79 86.8426) (end 97.155 86.2076) (width 1.016) (layer Dessous) (net 66)) + (segment (start 163.195 126.365) (end 156.845 120.015) (width 1.016) (layer Dessous) (net 66)) + (segment (start 183.515 125.095) (end 187.325 125.095) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 151.13 114.3) (end 151.765 114.935) (width 1.016) (layer Dessous) (net 66)) + (segment (start 148.59 111.76) (end 151.13 114.3) (width 1.016) (layer Dessous) (net 66)) + (segment (start 148.59 106.68) (end 148.59 111.76) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 97.155 76.2) (end 97.155 73.66) (width 1.016) (layer Dessous) (net 66)) + (segment (start 97.155 78.74) (end 97.155 76.2) (width 1.016) (layer Dessous) (net 66)) + (segment (start 97.155 81.28) (end 97.155 78.74) (width 1.016) (layer Dessous) (net 66)) + (segment (start 133.985 117.475) (end 133.985 116.205) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 133.985 116.205) (end 135.255 114.935) (width 1.016) (layer Dessous) (net 66)) + (segment (start 139.065 116.205) (end 139.065 117.475) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 137.795 114.935) (end 139.065 116.205) (width 1.016) (layer Dessous) (net 66)) + (segment (start 99.695 92.075) (end 99.695 92.3798) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 97.79 92.075) (end 99.695 92.075) (width 1.016) (layer Dessous) (net 66)) + (segment (start 97.155 91.44) (end 97.79 92.075) (width 1.016) (layer Dessous) (net 66)) + (segment (start 99.695 89.5858) (end 97.155 89.5858) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 97.155 89.5858) (end 97.155 89.535) (width 1.016) (layer Dessous) (net 66)) + (segment (start 111.125 88.9) (end 111.125 86.36) (width 1.016) (layer Dessous) (net 66) (status C00)) + (segment (start 99.695 92.3798) (end 104.775 92.3798) (width 0.635) (layer Dessous) (net 66) (status 800)) + (segment (start 108.2548 88.9) (end 111.125 88.9) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 140.97 127) (end 139.065 125.095) (width 1.016) (layer Dessous) (net 66)) + (segment (start 140.97 133.35) (end 140.97 127) (width 1.016) (layer Dessous) (net 66)) + (via (at 140.97 133.35) (size 1.651) (layers Dessus Dessous) (net 66)) + (segment (start 148.59 133.35) (end 146.685 133.35) (width 1.016) (layer Dessus) (net 66) (status 800)) + (segment (start 146.685 133.35) (end 140.97 133.35) (width 1.016) (layer Dessus) (net 66)) + (segment (start 190.5 96.52) (end 189.865 96.52) (width 1.016) (layer Dessous) (net 66)) + (segment (start 108.585 60.325) (end 108.585 52.705) (width 1.016) (layer Dessous) (net 66) (status C00)) + (segment (start 121.285 53.34) (end 121.285 61.214) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 117.475 49.53) (end 121.285 53.34) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 116.84 48.895) (end 117.475 49.53) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 109.22 48.895) (end 116.84 48.895) (width 1.016) (layer Dessous) (net 66)) + (segment (start 171.45 48.26) (end 171.45 56.515) (width 1.016) (layer Dessous) (net 66)) + (segment (start 189.865 108.585) (end 189.865 96.52) (width 1.016) (layer Dessous) (net 66)) + (segment (start 149.225 78.105) (end 150.495 79.375) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 191.135 95.885) (end 190.5 96.52) (width 1.016) (layer Dessous) (net 66)) + (segment (start 104.775 92.3798) (end 108.2548 88.9) (width 1.016) (layer Dessous) (net 66)) + (segment (start 183.515 114.935) (end 183.515 125.095) (width 0.635) (layer Dessous) (net 66)) + (segment (start 189.865 108.585) (end 183.515 114.935) (width 1.016) (layer Dessous) (net 66)) + (segment (start 183.515 114.935) (end 183.515 125.095) (width 1.016) (layer Dessous) (net 66)) + (segment (start 136.525 67.945) (end 136.525 65.405) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 179.705 125.095) (end 183.515 125.095) (width 1.016) (layer Dessous) (net 66)) + (segment (start 127.635 102.235) (end 126.365 100.965) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 178.435 126.365) (end 179.705 125.095) (width 1.016) (layer Dessous) (net 66)) + (segment (start 147.955 89.535) (end 141.605 89.535) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 163.195 126.365) (end 178.435 126.365) (width 1.016) (layer Dessous) (net 66)) + (segment (start 139.446 79.375) (end 140.716 78.105) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 155.575 120.015) (end 156.845 120.015) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 99.695 78.5622) (end 97.155 78.5622) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 97.155 78.5622) (end 97.155 78.74) (width 1.016) (layer Dessous) (net 66)) + (segment (start 99.695 81.2546) (end 97.155 81.2546) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 97.155 81.2546) (end 97.155 81.28) (width 1.016) (layer Dessous) (net 66)) + (segment (start 99.695 84.0994) (end 97.155 84.0994) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 97.155 84.0994) (end 97.155 83.82) (width 1.016) (layer Dessous) (net 66)) + (segment (start 97.155 86.36) (end 97.155 89.535) (width 1.016) (layer Dessous) (net 66)) + (segment (start 97.155 89.535) (end 97.155 91.44) (width 1.016) (layer Dessous) (net 66)) + (segment (start 156.21 62.865) (end 173.355 62.865) (width 1.016) (layer Dessus) (net 66)) + (segment (start 173.355 62.865) (end 175.895 65.405) (width 1.016) (layer Dessus) (net 66)) + (via (at 175.895 65.405) (size 1.651) (layers Dessus Dessous) (net 66)) + (segment (start 150.495 79.375) (end 153.67 79.375) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 156.21 78.74) (end 156.21 62.865) (width 1.016) (layer Dessus) (net 66)) + (via (at 156.21 78.74) (size 1.651) (layers Dessus Dessous) (net 66)) + (segment (start 153.67 79.375) (end 154.305 78.74) (width 1.016) (layer Dessous) (net 66)) + (segment (start 154.305 78.74) (end 156.21 78.74) (width 1.016) (layer Dessous) (net 66)) + (segment (start 99.695 75.819) (end 97.155 75.819) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 97.155 75.819) (end 97.155 76.2) (width 1.016) (layer Dessous) (net 66)) + (segment (start 140.716 78.105) (end 141.605 78.105) (width 1.016) (layer Dessous) (net 66)) + (segment (start 99.695 73.025) (end 99.695 70.485) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 108.585 61.595) (end 108.585 60.325) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 99.695 70.485) (end 108.585 61.595) (width 1.016) (layer Dessous) (net 66)) + (segment (start 141.605 89.535) (end 141.605 78.105) (width 1.016) (layer Dessous) (net 66)) + (segment (start 126.365 100.965) (end 126.365 94.615) (width 0.4318) (layer Dessous) (net 66)) + (segment (start 189.865 96.52) (end 188.595 96.52) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 191.135 73.025) (end 191.135 95.885) (width 1.016) (layer Dessous) (net 66)) + (segment (start 189.865 71.755) (end 191.135 73.025) (width 1.016) (layer Dessous) (net 66)) + (segment (start 189.23 64.135) (end 187.325 64.135) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 189.865 64.77) (end 189.23 64.135) (width 1.016) (layer Dessous) (net 66)) + (segment (start 189.865 71.755) (end 189.865 64.77) (width 1.016) (layer Dessous) (net 66)) + (segment (start 108.585 49.53) (end 109.22 48.895) (width 1.016) (layer Dessous) (net 66)) + (segment (start 108.585 52.705) (end 108.585 49.53) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 141.605 78.105) (end 149.225 78.105) (width 0.4318) (layer Dessous) (net 66)) + (segment (start 187.325 64.135) (end 178.435 64.135) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 167.005 43.815) (end 171.45 48.26) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 156.845 133.35) (end 156.972 133.35) (width 1.016) (layer Dessus) (net 66) (status 400)) + (segment (start 178.435 64.135) (end 178.435 65.405) (width 1.016) (layer Dessous) (net 66)) + (segment (start 178.435 56.515) (end 178.435 64.135) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 171.45 56.515) (end 178.435 56.515) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 144.145 55.88) (end 147.32 59.055) (width 1.016) (layer Dessous) (net 66)) + (segment (start 138.43 55.88) (end 144.145 55.88) (width 0.635) (layer Dessous) (net 66)) + (segment (start 137.795 56.515) (end 138.43 55.88) (width 0.635) (layer Dessous) (net 66)) + (segment (start 137.795 60.325) (end 137.795 56.515) (width 0.4318) (layer Dessous) (net 66)) + (segment (start 136.525 61.595) (end 137.795 60.325) (width 0.635) (layer Dessous) (net 66)) + (segment (start 126.365 67.945) (end 126.365 65.405) (width 1.016) (layer Dessous) (net 66) (status 400)) + (via (at 126.365 67.945) (size 1.651) (layers Dessus Dessous) (net 66)) + (segment (start 135.89 68.58) (end 142.24 68.58) (width 1.016) (layer Dessus) (net 66)) + (segment (start 144.78 66.04) (end 151.765 66.04) (width 1.016) (layer Dessus) (net 66)) + (segment (start 142.24 68.58) (end 144.78 66.04) (width 1.016) (layer Dessus) (net 66)) + (segment (start 151.765 66.04) (end 154.94 62.865) (width 1.016) (layer Dessus) (net 66)) + (segment (start 154.94 62.865) (end 156.21 62.865) (width 1.016) (layer Dessus) (net 66)) + (segment (start 175.895 65.405) (end 178.435 65.405) (width 1.016) (layer Dessous) (net 66)) + (segment (start 127.635 93.98) (end 127 94.615) (width 1.016) (layer Dessous) (net 66)) + (segment (start 127.635 87.376) (end 127.635 93.98) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 125.73 114.046) (end 126.365 113.411) (width 0.635) (layer Dessous) (net 66)) + (segment (start 120.015 114.046) (end 125.73 114.046) (width 0.635) (layer Dessous) (net 66)) + (segment (start 131.826 121.285) (end 133.35 121.285) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 133.985 120.65) (end 133.985 117.475) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 133.35 121.285) (end 133.985 120.65) (width 1.016) (layer Dessous) (net 66)) + (segment (start 131.826 126.365) (end 131.826 121.285) (width 1.016) (layer Dessous) (net 66) (status C00)) + (segment (start 140.335 99.695) (end 139.065 100.965) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 139.065 100.965) (end 139.065 107.315) (width 0.4318) (layer Dessous) (net 66)) + (segment (start 126.365 112.395) (end 126.365 109.855) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 131.445 109.855) (end 131.445 111.76) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 131.445 111.76) (end 132.08 112.395) (width 1.016) (layer Dessous) (net 66)) + (segment (start 132.08 112.395) (end 132.715 112.395) (width 1.016) (layer Dessous) (net 66)) + (segment (start 126.365 113.411) (end 126.365 112.395) (width 1.016) (layer Dessous) (net 66)) + (segment (start 135.255 112.395) (end 135.255 114.935) (width 1.016) (layer Dessous) (net 66)) + (segment (start 135.255 112.395) (end 135.89 112.395) (width 1.016) (layer Dessous) (net 66)) + (segment (start 132.715 112.395) (end 135.255 112.395) (width 1.016) (layer Dessous) (net 66)) + (segment (start 135.89 112.395) (end 136.525 111.76) (width 1.016) (layer Dessous) (net 66)) + (segment (start 136.525 111.76) (end 136.525 109.855) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 164.465 56.515) (end 171.45 56.515) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 123.825 61.214) (end 126.365 63.754) (width 1.016) (layer Dessous) (net 66)) + (segment (start 126.365 63.754) (end 126.365 65.405) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 121.285 61.214) (end 123.825 61.214) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 136.525 109.855) (end 139.065 107.315) (width 0.635) (layer Dessous) (net 66) (status 800)) + (segment (start 132.715 67.945) (end 133.35 68.58) (width 1.016) (layer Dessus) (net 66)) + (segment (start 135.89 68.58) (end 136.525 67.945) (width 1.016) (layer Dessous) (net 66)) + (via (at 135.89 68.58) (size 1.651) (layers Dessus Dessous) (net 66)) + (segment (start 133.35 68.58) (end 135.89 68.58) (width 1.016) (layer Dessus) (net 66)) + (segment (start 141.605 90.424) (end 141.605 89.535) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 126.365 67.945) (end 132.715 67.945) (width 1.016) (layer Dessus) (net 66)) + (segment (start 136.525 65.405) (end 136.525 61.595) (width 0.635) (layer Dessous) (net 66) (status 800)) + (segment (start 164.465 58.42) (end 164.465 56.515) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 163.83 59.055) (end 164.465 58.42) (width 1.016) (layer Dessous) (net 66)) + (segment (start 147.32 59.055) (end 163.83 59.055) (width 1.016) (layer Dessous) (net 66)) + (segment (start 97.155 83.82) (end 97.155 81.28) (width 1.016) (layer Dessous) (net 66)) + (segment (start 97.155 86.36) (end 97.155 83.82) (width 1.016) (layer Dessous) (net 66)) + (segment (start 97.155 86.2076) (end 97.155 86.36) (width 1.016) (layer Dessous) (net 66)) + (segment (start 97.155 73.66) (end 97.79 73.025) (width 1.016) (layer Dessous) (net 66)) + (segment (start 97.79 73.025) (end 99.695 73.025) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 99.695 86.8426) (end 97.79 86.8426) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 126.365 94.615) (end 122.555 94.615) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 127 94.615) (end 126.365 94.615) (width 1.016) (layer Dessous) (net 66)) (segment (start 121.285 64.516) (end 121.285 65.405) (width 0.4318) (layer Dessous) (net 67) (status 800)) - (segment (start 129.54 50.165) (end 127 50.165) (width 0.4318) (layer Dessous) (net 68) (status 800)) - (segment (start 127 50.165) (end 126.365 50.8) (width 0.4318) (layer Dessous) (net 68)) + (segment (start 121.285 65.405) (end 123.825 65.405) (width 0.4318) (layer Dessous) (net 67) (status 400)) (segment (start 126.365 50.8) (end 126.365 57.785) (width 0.4318) (layer Dessous) (net 68) (status 400)) - (segment (start 146.05 50.165) (end 144.78 50.165) (width 0.4318) (layer Dessous) (net 69) (status 400)) - (segment (start 146.685 49.53) (end 146.05 50.165) (width 0.4318) (layer Dessous) (net 69)) - (segment (start 144.78 44.45) (end 146.05 44.45) (width 0.4318) (layer Dessous) (net 69) (status 800)) - (segment (start 146.685 45.085) (end 146.685 49.53) (width 0.4318) (layer Dessous) (net 69)) + (segment (start 127 50.165) (end 126.365 50.8) (width 0.4318) (layer Dessous) (net 68)) + (segment (start 129.54 50.165) (end 127 50.165) (width 0.4318) (layer Dessous) (net 68) (status 800)) (segment (start 146.05 44.45) (end 146.685 45.085) (width 0.4318) (layer Dessous) (net 69)) - (segment (start 128.905 54.61) (end 129.54 53.975) (width 0.4318) (layer Dessous) (net 70) (status 400)) + (segment (start 146.685 45.085) (end 146.685 49.53) (width 0.4318) (layer Dessous) (net 69)) + (segment (start 144.78 44.45) (end 146.05 44.45) (width 0.4318) (layer Dessous) (net 69) (status 800)) + (segment (start 146.685 49.53) (end 146.05 50.165) (width 0.4318) (layer Dessous) (net 69)) + (segment (start 146.05 50.165) (end 144.78 50.165) (width 0.4318) (layer Dessous) (net 69) (status 400)) (segment (start 128.905 57.785) (end 128.905 54.61) (width 0.4318) (layer Dessous) (net 70) (status 800)) - (segment (start 142.875 53.34) (end 143.51 53.975) (width 0.4318) (layer Dessous) (net 71)) - (segment (start 144.78 46.99) (end 143.51 46.99) (width 0.4318) (layer Dessous) (net 71) (status 800)) - (segment (start 143.51 46.99) (end 142.875 47.625) (width 0.4318) (layer Dessous) (net 71)) - (segment (start 143.51 53.975) (end 144.78 53.975) (width 0.4318) (layer Dessous) (net 71) (status 400)) + (segment (start 128.905 54.61) (end 129.54 53.975) (width 0.4318) (layer Dessous) (net 70) (status 400)) (segment (start 142.875 47.625) (end 142.875 53.34) (width 0.4318) (layer Dessous) (net 71)) - (segment (start 126.365 117.475) (end 128.905 117.475) (width 0.4318) (layer Dessous) (net 72) (status C00)) - (segment (start 125.095 126.365) (end 121.285 126.365) (width 0.4318) (layer Dessous) (net 72) (status C00)) - (segment (start 128.905 126.365) (end 128.524 126.365) (width 0.4318) (layer Dessous) (net 72) (status 400)) - (segment (start 128.905 117.475) (end 130.175 118.745) (width 0.4318) (layer Dessous) (net 72) (status 800)) - (segment (start 128.905 125.095) (end 128.905 126.365) (width 0.4318) (layer Dessous) (net 72)) - (segment (start 130.175 123.825) (end 128.905 125.095) (width 0.4318) (layer Dessous) (net 72)) - (segment (start 128.524 126.365) (end 125.095 126.365) (width 0.4318) (layer Dessous) (net 72) (status C00)) + (segment (start 143.51 53.975) (end 144.78 53.975) (width 0.4318) (layer Dessous) (net 71) (status 400)) + (segment (start 143.51 46.99) (end 142.875 47.625) (width 0.4318) (layer Dessous) (net 71)) + (segment (start 144.78 46.99) (end 143.51 46.99) (width 0.4318) (layer Dessous) (net 71) (status 800)) + (segment (start 142.875 53.34) (end 143.51 53.975) (width 0.4318) (layer Dessous) (net 71)) (segment (start 130.175 118.745) (end 130.175 123.825) (width 0.4318) (layer Dessous) (net 72)) - (segment (start 119.38 121.285) (end 121.285 121.285) (width 0.4318) (layer Dessous) (net 73) (status 400)) - (segment (start 123.825 117.475) (end 123.825 121.285) (width 0.4318) (layer Dessous) (net 73) (status 800)) - (segment (start 118.745 127.635) (end 118.745 121.92) (width 0.4318) (layer Dessous) (net 73)) - (segment (start 120.015 128.905) (end 118.745 127.635) (width 0.4318) (layer Dessous) (net 73)) - (segment (start 132.715 128.905) (end 120.015 128.905) (width 0.4318) (layer Dessous) (net 73)) - (segment (start 123.825 121.285) (end 128.524 121.285) (width 0.4318) (layer Dessous) (net 73) (status 400)) - (segment (start 118.745 121.92) (end 119.38 121.285) (width 0.4318) (layer Dessous) (net 73)) - (segment (start 135.255 126.365) (end 132.715 128.905) (width 0.4318) (layer Dessous) (net 73) (status 800)) + (segment (start 128.524 126.365) (end 125.095 126.365) (width 0.4318) (layer Dessous) (net 72) (status C00)) + (segment (start 130.175 123.825) (end 128.905 125.095) (width 0.4318) (layer Dessous) (net 72)) + (segment (start 128.905 125.095) (end 128.905 126.365) (width 0.4318) (layer Dessous) (net 72)) + (segment (start 128.905 117.475) (end 130.175 118.745) (width 0.4318) (layer Dessous) (net 72) (status 800)) + (segment (start 128.905 126.365) (end 128.524 126.365) (width 0.4318) (layer Dessous) (net 72) (status 400)) + (segment (start 125.095 126.365) (end 121.285 126.365) (width 0.4318) (layer Dessous) (net 72) (status C00)) + (segment (start 126.365 117.475) (end 128.905 117.475) (width 0.4318) (layer Dessous) (net 72) (status C00)) (segment (start 121.285 121.285) (end 123.825 121.285) (width 0.4318) (layer Dessous) (net 73) (status 800)) - (segment (start 191.135 120.015) (end 192.405 118.745) (width 1.016) (layer Dessous) (net 74)) - (segment (start 192.405 118.745) (end 192.405 112.395) (width 1.016) (layer Dessous) (net 74) (status 400)) + (segment (start 135.255 126.365) (end 132.715 128.905) (width 0.4318) (layer Dessous) (net 73) (status 800)) + (segment (start 118.745 121.92) (end 119.38 121.285) (width 0.4318) (layer Dessous) (net 73)) + (segment (start 123.825 121.285) (end 128.524 121.285) (width 0.4318) (layer Dessous) (net 73) (status 400)) + (segment (start 132.715 128.905) (end 120.015 128.905) (width 0.4318) (layer Dessous) (net 73)) + (segment (start 120.015 128.905) (end 118.745 127.635) (width 0.4318) (layer Dessous) (net 73)) + (segment (start 118.745 127.635) (end 118.745 121.92) (width 0.4318) (layer Dessous) (net 73)) + (segment (start 123.825 117.475) (end 123.825 121.285) (width 0.4318) (layer Dessous) (net 73) (status 800)) + (segment (start 119.38 121.285) (end 121.285 121.285) (width 0.4318) (layer Dessous) (net 73) (status 400)) (segment (start 187.325 120.015) (end 191.135 120.015) (width 1.016) (layer Dessous) (net 74) (status 800)) - (segment (start 114.935 53.975) (end 114.935 52.705) (width 0.4318) (layer Dessous) (net 75) (status 400)) - (segment (start 111.125 60.325) (end 111.125 57.785) (width 0.4318) (layer Dessous) (net 75) (status 800)) + (segment (start 192.405 118.745) (end 192.405 112.395) (width 1.016) (layer Dessous) (net 74) (status 400)) + (segment (start 191.135 120.015) (end 192.405 118.745) (width 1.016) (layer Dessous) (net 74)) (segment (start 111.125 57.785) (end 114.935 53.975) (width 0.4318) (layer Dessous) (net 75)) - (segment (start 111.125 50.8) (end 111.76 50.165) (width 0.4318) (layer Dessous) (net 76)) - (segment (start 111.125 52.705) (end 111.125 50.8) (width 0.4318) (layer Dessous) (net 76) (status 800)) - (segment (start 117.475 52.705) (end 114.935 50.165) (width 0.4318) (layer Dessous) (net 76) (status 800)) + (segment (start 111.125 60.325) (end 111.125 57.785) (width 0.4318) (layer Dessous) (net 75) (status 800)) + (segment (start 114.935 53.975) (end 114.935 52.705) (width 0.4318) (layer Dessous) (net 75) (status 400)) (segment (start 111.76 50.165) (end 114.935 50.165) (width 0.4318) (layer Dessous) (net 76)) - (segment (start 194.31 107.315) (end 194.945 107.95) (width 1.016) (layer Dessous) (net 77) (status 800)) - (segment (start 194.945 128.905) (end 193.675 130.175) (width 1.016) (layer Dessous) (net 77)) - (segment (start 193.675 130.175) (end 187.325 130.175) (width 1.016) (layer Dessous) (net 77) (status 400)) + (segment (start 117.475 52.705) (end 114.935 50.165) (width 0.4318) (layer Dessous) (net 76) (status 800)) + (segment (start 111.125 52.705) (end 111.125 50.8) (width 0.4318) (layer Dessous) (net 76) (status 800)) + (segment (start 111.125 50.8) (end 111.76 50.165) (width 0.4318) (layer Dessous) (net 76)) (segment (start 194.945 107.95) (end 194.945 128.905) (width 1.016) (layer Dessous) (net 77)) + (segment (start 193.675 130.175) (end 187.325 130.175) (width 1.016) (layer Dessous) (net 77) (status 400)) + (segment (start 194.945 128.905) (end 193.675 130.175) (width 1.016) (layer Dessous) (net 77)) + (segment (start 194.31 107.315) (end 194.945 107.95) (width 1.016) (layer Dessous) (net 77) (status 800)) (segment (start 168.275 66.675) (end 168.275 73.025) (width 0.4318) (layer Dessous) (net 78) (status C00)) (segment (start 187.325 52.07) (end 187.325 59.055) (width 0.4318) (layer Dessous) (net 79) (status C00)) - (segment (start 127.635 41.91) (end 134.62 41.91) (width 0.4318) (layer Dessous) (net 80) (status 400)) - (segment (start 187.325 41.91) (end 172.72 41.91) (width 0.4318) (layer Dessous) (net 80) (status 800)) - (segment (start 127 39.37) (end 127 41.275) (width 0.4318) (layer Dessous) (net 80) (status 800)) - (segment (start 140.97 40.005) (end 170.815 40.005) (width 0.4318) (layer Dessous) (net 80)) - (segment (start 140.97 40.005) (end 139.065 41.91) (width 0.4318) (layer Dessous) (net 80)) - (segment (start 139.065 41.91) (end 134.62 41.91) (width 0.4318) (layer Dessous) (net 80) (status 400)) - (segment (start 127 41.275) (end 127.635 41.91) (width 0.4318) (layer Dessous) (net 80)) (segment (start 170.815 40.005) (end 172.72 41.91) (width 0.4318) (layer Dessous) (net 80)) - (segment (start 127.635 45.085) (end 131.445 45.085) (width 0.4318) (layer Dessous) (net 81)) - (segment (start 119.38 48.895) (end 120.015 49.53) (width 0.4318) (layer Dessous) (net 81)) - (segment (start 125.095 49.53) (end 125.73 48.895) (width 0.4318) (layer Dessous) (net 81)) - (segment (start 131.445 45.085) (end 133.35 46.99) (width 0.4318) (layer Dessous) (net 81)) - (segment (start 127 45.72) (end 127.635 45.085) (width 0.4318) (layer Dessous) (net 81)) - (segment (start 117.475 39.37) (end 117.475 45.72) (width 0.4318) (layer Dessous) (net 81) (status 800)) - (segment (start 127 48.26) (end 127 46.99) (width 0.4318) (layer Dessous) (net 81) (status 400)) - (segment (start 133.35 46.99) (end 134.62 46.99) (width 0.4318) (layer Dessous) (net 81) (status 400)) - (segment (start 127 46.99) (end 127 45.72) (width 0.4318) (layer Dessous) (net 81) (status 800)) - (segment (start 119.38 47.625) (end 119.38 48.895) (width 0.4318) (layer Dessous) (net 81)) - (segment (start 117.475 45.72) (end 119.38 47.625) (width 0.4318) (layer Dessous) (net 81)) - (segment (start 126.365 48.895) (end 127 48.26) (width 0.4318) (layer Dessous) (net 81)) - (segment (start 125.73 48.895) (end 126.365 48.895) (width 0.4318) (layer Dessous) (net 81)) + (segment (start 127 41.275) (end 127.635 41.91) (width 0.4318) (layer Dessous) (net 80)) + (segment (start 139.065 41.91) (end 134.62 41.91) (width 0.4318) (layer Dessous) (net 80) (status 400)) + (segment (start 140.97 40.005) (end 139.065 41.91) (width 0.4318) (layer Dessous) (net 80)) + (segment (start 140.97 40.005) (end 170.815 40.005) (width 0.4318) (layer Dessous) (net 80)) + (segment (start 127 39.37) (end 127 41.275) (width 0.4318) (layer Dessous) (net 80) (status 800)) + (segment (start 187.325 41.91) (end 172.72 41.91) (width 0.4318) (layer Dessous) (net 80) (status 800)) + (segment (start 127.635 41.91) (end 134.62 41.91) (width 0.4318) (layer Dessous) (net 80) (status 400)) (segment (start 120.015 49.53) (end 125.095 49.53) (width 0.4318) (layer Dessous) (net 81)) - (segment (start 141.605 41.91) (end 144.78 41.91) (width 0.4318) (layer Dessous) (net 82) (status 400)) - (segment (start 139.065 44.45) (end 141.605 41.91) (width 0.4318) (layer Dessous) (net 82)) - (segment (start 124.46 46.99) (end 124.46 44.45) (width 0.4318) (layer Dessous) (net 82) (status 800)) - (segment (start 134.62 44.45) (end 139.065 44.45) (width 0.4318) (layer Dessous) (net 82) (status 800)) - (segment (start 124.46 44.45) (end 125.095 43.815) (width 0.4318) (layer Dessous) (net 82)) - (segment (start 125.095 43.815) (end 132.08 43.815) (width 0.4318) (layer Dessous) (net 82)) - (segment (start 132.08 43.815) (end 132.715 44.45) (width 0.4318) (layer Dessous) (net 82)) + (segment (start 125.73 48.895) (end 126.365 48.895) (width 0.4318) (layer Dessous) (net 81)) + (segment (start 126.365 48.895) (end 127 48.26) (width 0.4318) (layer Dessous) (net 81)) + (segment (start 117.475 45.72) (end 119.38 47.625) (width 0.4318) (layer Dessous) (net 81)) + (segment (start 119.38 47.625) (end 119.38 48.895) (width 0.4318) (layer Dessous) (net 81)) + (segment (start 127 46.99) (end 127 45.72) (width 0.4318) (layer Dessous) (net 81) (status 800)) + (segment (start 133.35 46.99) (end 134.62 46.99) (width 0.4318) (layer Dessous) (net 81) (status 400)) + (segment (start 127 48.26) (end 127 46.99) (width 0.4318) (layer Dessous) (net 81) (status 400)) + (segment (start 117.475 39.37) (end 117.475 45.72) (width 0.4318) (layer Dessous) (net 81) (status 800)) + (segment (start 127 45.72) (end 127.635 45.085) (width 0.4318) (layer Dessous) (net 81)) + (segment (start 131.445 45.085) (end 133.35 46.99) (width 0.4318) (layer Dessous) (net 81)) + (segment (start 125.095 49.53) (end 125.73 48.895) (width 0.4318) (layer Dessous) (net 81)) + (segment (start 119.38 48.895) (end 120.015 49.53) (width 0.4318) (layer Dessous) (net 81)) + (segment (start 127.635 45.085) (end 131.445 45.085) (width 0.4318) (layer Dessous) (net 81)) (segment (start 132.715 44.45) (end 134.62 44.45) (width 0.4318) (layer Dessous) (net 82) (status 400)) - (segment (start 191.135 106.68) (end 182.245 115.57) (width 1.016) (layer Dessus) (net 83)) - (segment (start 135.255 102.235) (end 133.985 100.965) (width 1.016) (layer Dessous) (net 83) (status 800)) - (segment (start 134.62 93.345) (end 137.795 93.345) (width 1.016) (layer Dessous) (net 83)) - (segment (start 133.985 93.98) (end 134.62 93.345) (width 1.016) (layer Dessous) (net 83)) - (segment (start 191.135 82.55) (end 189.865 81.28) (width 1.016) (layer Dessus) (net 83)) - (segment (start 147.955 64.135) (end 150.495 64.135) (width 1.016) (layer Dessous) (net 83) (status C00)) - (segment (start 150.495 64.135) (end 170.18 64.135) (width 1.016) (layer Dessous) (net 83) (status 800)) - (segment (start 170.815 64.77) (end 170.815 66.675) (width 1.016) (layer Dessous) (net 83) (status 400)) - (segment (start 133.985 78.74) (end 134.62 79.375) (width 1.016) (layer Dessous) (net 83)) - (segment (start 134.62 79.375) (end 136.144 79.375) (width 1.016) (layer Dessous) (net 83) (status 400)) - (segment (start 118.745 107.95) (end 119.38 107.315) (width 1.016) (layer Dessus) (net 83)) - (segment (start 179.07 126.365) (end 179.07 116.84) (width 1.016) (layer Dessus) (net 83)) - (segment (start 125.095 74.295) (end 125.095 76.835) (width 1.016) (layer Dessous) (net 83) (status 800)) - (segment (start 135.255 102.235) (end 132.715 104.775) (width 1.016) (layer Dessous) (net 83) (status 800)) - (via (at 132.715 106.045) (size 1.651) (layers Dessus Dessous) (net 83)) - (segment (start 132.715 104.775) (end 132.715 106.045) (width 1.016) (layer Dessous) (net 83)) - (segment (start 131.445 107.315) (end 132.715 106.045) (width 1.016) (layer Dessus) (net 83)) - (via (at 123.825 107.315) (size 1.651) (layers Dessus Dessous) (net 83)) - (segment (start 123.825 109.855) (end 123.825 107.315) (width 1.016) (layer Dessous) (net 83) (status 800)) - (segment (start 122.555 76.835) (end 125.095 76.835) (width 1.016) (layer Dessous) (net 83) (status 800)) - (segment (start 188.595 73.66) (end 188.595 81.28) (width 1.016) (layer Dessous) (net 83) (status 400)) - (segment (start 119.38 123.825) (end 118.745 123.19) (width 1.016) (layer Dessus) (net 83)) - (segment (start 130.81 60.325) (end 131.445 59.69) (width 1.016) (layer Dessous) (net 83)) - (segment (start 124.46 60.325) (end 130.81 60.325) (width 0.635) (layer Dessous) (net 83)) - (segment (start 125.095 76.835) (end 125.095 79.375) (width 1.016) (layer Dessous) (net 83)) - (segment (start 127.635 81.915) (end 127.635 84.455) (width 1.016) (layer Dessous) (net 83)) - (segment (start 125.095 79.375) (end 127.635 81.915) (width 1.016) (layer Dessous) (net 83)) - (segment (start 133.985 84.455) (end 133.985 88.9) (width 1.016) (layer Dessous) (net 83)) - (segment (start 137.795 90.17) (end 137.795 93.345) (width 1.016) (layer Dessous) (net 83)) - (segment (start 137.16 89.535) (end 137.795 90.17) (width 1.016) (layer Dessous) (net 83)) - (segment (start 134.62 89.535) (end 137.16 89.535) (width 1.016) (layer Dessous) (net 83)) - (segment (start 133.985 88.9) (end 134.62 89.535) (width 1.016) (layer Dessous) (net 83)) - (segment (start 135.255 71.755) (end 133.985 73.025) (width 1.016) (layer Dessous) (net 83) (status 800)) - (segment (start 135.509 84.455) (end 133.985 84.455) (width 1.016) (layer Dessous) (net 83)) - (segment (start 133.985 84.455) (end 127.635 84.455) (width 1.016) (layer Dessous) (net 83)) - (segment (start 136.144 83.82) (end 135.509 84.455) (width 1.016) (layer Dessous) (net 83)) - (segment (start 143.51 60.96) (end 146.685 64.135) (width 1.016) (layer Dessus) (net 83)) - (segment (start 123.825 59.69) (end 124.46 60.325) (width 0.635) (layer Dessous) (net 83)) - (segment (start 178.435 127) (end 179.07 126.365) (width 1.016) (layer Dessus) (net 83)) - (segment (start 136.144 79.375) (end 136.144 83.82) (width 1.016) (layer Dessous) (net 83) (status 800)) - (segment (start 191.135 104.775) (end 191.135 106.68) (width 1.016) (layer Dessus) (net 83)) - (segment (start 191.135 104.775) (end 191.135 82.55) (width 1.016) (layer Dessus) (net 83)) - (segment (start 146.685 64.135) (end 147.955 64.135) (width 1.016) (layer Dessus) (net 83) (status 400)) - (segment (start 175.895 73.025) (end 175.514 73.025) (width 1.016) (layer Dessous) (net 83) (status 800)) - (segment (start 123.825 107.315) (end 131.445 107.315) (width 1.016) (layer Dessus) (net 83)) - (segment (start 123.825 59.69) (end 125.095 60.96) (width 1.016) (layer Dessus) (net 83)) - (segment (start 127.635 84.455) (end 127.635 84.074) (width 1.016) (layer Dessous) (net 83) (status 400)) - (segment (start 178.181 73.025) (end 178.435 73.025) (width 1.016) (layer Dessous) (net 83)) - (segment (start 170.815 66.675) (end 170.815 70.485) (width 1.016) (layer Dessous) (net 83) (status 800)) - (segment (start 123.825 57.785) (end 123.825 59.69) (width 1.016) (layer Dessous) (net 83) (status 800)) - (segment (start 133.985 73.025) (end 133.985 78.74) (width 0.4318) (layer Dessous) (net 83)) - (segment (start 137.795 93.345) (end 141.605 93.345) (width 1.016) (layer Dessous) (net 83)) - (segment (start 141.605 93.345) (end 141.605 93.726) (width 1.016) (layer Dessous) (net 83) (status 400)) - (segment (start 123.19 112.014) (end 123.825 111.379) (width 1.016) (layer Dessous) (net 83)) - (segment (start 123.825 111.379) (end 123.825 109.855) (width 1.016) (layer Dessous) (net 83) (status 400)) - (segment (start 118.745 112.014) (end 123.19 112.014) (width 1.016) (layer Dessous) (net 83) (status 800)) - (segment (start 142.494 94.615) (end 147.955 94.615) (width 1.016) (layer Dessous) (net 83) (status 400)) - (segment (start 118.745 123.19) (end 118.745 107.95) (width 1.016) (layer Dessus) (net 83)) - (segment (start 122.555 123.825) (end 119.38 123.825) (width 1.016) (layer Dessus) (net 83)) - (segment (start 170.18 64.135) (end 170.815 64.77) (width 1.016) (layer Dessous) (net 83)) - (segment (start 123.825 122.555) (end 122.555 123.825) (width 1.016) (layer Dessus) (net 83)) - (segment (start 119.38 107.315) (end 123.825 107.315) (width 1.016) (layer Dessus) (net 83)) - (segment (start 142.24 122.555) (end 123.825 122.555) (width 1.016) (layer Dessus) (net 83)) - (segment (start 155.575 122.555) (end 142.24 122.555) (width 1.016) (layer Dessus) (net 83) (status 800)) - (segment (start 179.07 116.84) (end 180.34 115.57) (width 1.016) (layer Dessus) (net 83)) - (segment (start 170.815 70.485) (end 173.355 73.025) (width 1.016) (layer Dessous) (net 83)) - (segment (start 189.865 81.28) (end 188.595 81.28) (width 1.016) (layer Dessus) (net 83) (status 400)) - (segment (start 178.181 69.85) (end 178.181 73.025) (width 1.016) (layer Dessous) (net 83) (status 800)) - (segment (start 173.355 73.025) (end 175.895 73.025) (width 1.016) (layer Dessous) (net 83) (status 400)) - (segment (start 166.37 127) (end 178.435 127) (width 1.016) (layer Dessus) (net 83)) - (segment (start 161.925 122.555) (end 166.37 127) (width 1.016) (layer Dessus) (net 83)) - (segment (start 155.575 122.555) (end 161.925 122.555) (width 1.016) (layer Dessus) (net 83) (status 800)) - (segment (start 182.245 115.57) (end 180.34 115.57) (width 1.016) (layer Dessus) (net 83)) - (segment (start 187.96 73.025) (end 188.595 73.66) (width 1.016) (layer Dessous) (net 83)) - (segment (start 183.515 73.025) (end 187.96 73.025) (width 1.016) (layer Dessous) (net 83) (status 800)) - (segment (start 133.985 100.965) (end 133.985 93.98) (width 0.4318) (layer Dessous) (net 83)) - (segment (start 131.445 59.69) (end 131.445 57.785) (width 1.016) (layer Dessous) (net 83) (status 400)) - (segment (start 125.095 60.96) (end 143.51 60.96) (width 1.016) (layer Dessus) (net 83)) - (segment (start 123.825 57.785) (end 123.825 59.69) (width 1.016) (layer Dessus) (net 83) (status 800)) - (segment (start 178.435 73.025) (end 183.515 73.025) (width 1.016) (layer Dessous) (net 83) (status 400)) - (segment (start 175.895 73.025) (end 178.435 73.025) (width 1.016) (layer Dessous) (net 83) (status 800)) - (segment (start 142.24 122.809) (end 142.24 122.555) (width 1.016) (layer Dessus) (net 83)) - (via (at 142.24 122.809) (size 1.651) (layers Dessus Dessous) (net 83)) - (segment (start 147.066 127.635) (end 142.24 122.809) (width 1.016) (layer Dessous) (net 83)) - (segment (start 147.193 133.35) (end 147.193 129.54) (width 1.016) (layer Dessous) (net 83) (status 800)) - (segment (start 147.193 129.54) (end 147.066 129.54) (width 1.016) (layer Dessous) (net 83)) - (segment (start 147.066 129.54) (end 147.066 127.635) (width 1.016) (layer Dessous) (net 83)) + (segment (start 132.08 43.815) (end 132.715 44.45) (width 0.4318) (layer Dessous) (net 82)) + (segment (start 125.095 43.815) (end 132.08 43.815) (width 0.4318) (layer Dessous) (net 82)) + (segment (start 124.46 44.45) (end 125.095 43.815) (width 0.4318) (layer Dessous) (net 82)) + (segment (start 134.62 44.45) (end 139.065 44.45) (width 0.4318) (layer Dessous) (net 82) (status 800)) + (segment (start 124.46 46.99) (end 124.46 44.45) (width 0.4318) (layer Dessous) (net 82) (status 800)) + (segment (start 139.065 44.45) (end 141.605 41.91) (width 0.4318) (layer Dessous) (net 82)) + (segment (start 141.605 41.91) (end 144.78 41.91) (width 0.4318) (layer Dessous) (net 82) (status 400)) (segment (start 141.605 93.726) (end 142.494 94.615) (width 1.016) (layer Dessous) (net 83) (status 800)) + (segment (start 147.066 129.54) (end 147.066 127.635) (width 1.016) (layer Dessous) (net 83)) + (segment (start 147.193 129.54) (end 147.066 129.54) (width 1.016) (layer Dessous) (net 83)) + (segment (start 147.193 133.35) (end 147.193 129.54) (width 1.016) (layer Dessous) (net 83) (status 800)) + (segment (start 147.066 127.635) (end 142.24 122.809) (width 1.016) (layer Dessous) (net 83)) + (via (at 142.24 122.809) (size 1.651) (layers Dessus Dessous) (net 83)) + (segment (start 142.24 122.809) (end 142.24 122.555) (width 1.016) (layer Dessus) (net 83)) + (segment (start 175.895 73.025) (end 178.435 73.025) (width 1.016) (layer Dessous) (net 83) (status 800)) + (segment (start 178.435 73.025) (end 183.515 73.025) (width 1.016) (layer Dessous) (net 83) (status 400)) + (segment (start 123.825 57.785) (end 123.825 59.69) (width 1.016) (layer Dessus) (net 83) (status 800)) + (segment (start 125.095 60.96) (end 143.51 60.96) (width 1.016) (layer Dessus) (net 83)) + (segment (start 131.445 59.69) (end 131.445 57.785) (width 1.016) (layer Dessous) (net 83) (status 400)) + (segment (start 133.985 100.965) (end 133.985 93.98) (width 0.4318) (layer Dessous) (net 83)) + (segment (start 183.515 73.025) (end 187.96 73.025) (width 1.016) (layer Dessous) (net 83) (status 800)) + (segment (start 187.96 73.025) (end 188.595 73.66) (width 1.016) (layer Dessous) (net 83)) + (segment (start 182.245 115.57) (end 180.34 115.57) (width 1.016) (layer Dessus) (net 83)) + (segment (start 155.575 122.555) (end 161.925 122.555) (width 1.016) (layer Dessus) (net 83) (status 800)) + (segment (start 161.925 122.555) (end 166.37 127) (width 1.016) (layer Dessus) (net 83)) + (segment (start 166.37 127) (end 178.435 127) (width 1.016) (layer Dessus) (net 83)) + (segment (start 173.355 73.025) (end 175.895 73.025) (width 1.016) (layer Dessous) (net 83) (status 400)) + (segment (start 178.181 69.85) (end 178.181 73.025) (width 1.016) (layer Dessous) (net 83) (status 800)) + (segment (start 189.865 81.28) (end 188.595 81.28) (width 1.016) (layer Dessus) (net 83) (status 400)) + (segment (start 170.815 70.485) (end 173.355 73.025) (width 1.016) (layer Dessous) (net 83)) + (segment (start 179.07 116.84) (end 180.34 115.57) (width 1.016) (layer Dessus) (net 83)) + (segment (start 155.575 122.555) (end 142.24 122.555) (width 1.016) (layer Dessus) (net 83) (status 800)) + (segment (start 142.24 122.555) (end 123.825 122.555) (width 1.016) (layer Dessus) (net 83)) + (segment (start 119.38 107.315) (end 123.825 107.315) (width 1.016) (layer Dessus) (net 83)) + (segment (start 123.825 122.555) (end 122.555 123.825) (width 1.016) (layer Dessus) (net 83)) + (segment (start 170.18 64.135) (end 170.815 64.77) (width 1.016) (layer Dessous) (net 83)) + (segment (start 122.555 123.825) (end 119.38 123.825) (width 1.016) (layer Dessus) (net 83)) + (segment (start 118.745 123.19) (end 118.745 107.95) (width 1.016) (layer Dessus) (net 83)) + (segment (start 142.494 94.615) (end 147.955 94.615) (width 1.016) (layer Dessous) (net 83) (status 400)) + (segment (start 118.745 112.014) (end 123.19 112.014) (width 1.016) (layer Dessous) (net 83) (status 800)) + (segment (start 123.825 111.379) (end 123.825 109.855) (width 1.016) (layer Dessous) (net 83) (status 400)) + (segment (start 123.19 112.014) (end 123.825 111.379) (width 1.016) (layer Dessous) (net 83)) + (segment (start 141.605 93.345) (end 141.605 93.726) (width 1.016) (layer Dessous) (net 83) (status 400)) + (segment (start 137.795 93.345) (end 141.605 93.345) (width 1.016) (layer Dessous) (net 83)) + (segment (start 133.985 73.025) (end 133.985 78.74) (width 0.4318) (layer Dessous) (net 83)) + (segment (start 123.825 57.785) (end 123.825 59.69) (width 1.016) (layer Dessous) (net 83) (status 800)) + (segment (start 170.815 66.675) (end 170.815 70.485) (width 1.016) (layer Dessous) (net 83) (status 800)) + (segment (start 178.181 73.025) (end 178.435 73.025) (width 1.016) (layer Dessous) (net 83)) + (segment (start 127.635 84.455) (end 127.635 84.074) (width 1.016) (layer Dessous) (net 83) (status 400)) + (segment (start 123.825 59.69) (end 125.095 60.96) (width 1.016) (layer Dessus) (net 83)) + (segment (start 123.825 107.315) (end 131.445 107.315) (width 1.016) (layer Dessus) (net 83)) + (segment (start 175.895 73.025) (end 175.514 73.025) (width 1.016) (layer Dessous) (net 83) (status 800)) + (segment (start 146.685 64.135) (end 147.955 64.135) (width 1.016) (layer Dessus) (net 83) (status 400)) + (segment (start 191.135 104.775) (end 191.135 82.55) (width 1.016) (layer Dessus) (net 83)) + (segment (start 191.135 104.775) (end 191.135 106.68) (width 1.016) (layer Dessus) (net 83)) + (segment (start 136.144 79.375) (end 136.144 83.82) (width 1.016) (layer Dessous) (net 83) (status 800)) + (segment (start 178.435 127) (end 179.07 126.365) (width 1.016) (layer Dessus) (net 83)) + (segment (start 123.825 59.69) (end 124.46 60.325) (width 0.635) (layer Dessous) (net 83)) + (segment (start 143.51 60.96) (end 146.685 64.135) (width 1.016) (layer Dessus) (net 83)) + (segment (start 136.144 83.82) (end 135.509 84.455) (width 1.016) (layer Dessous) (net 83)) + (segment (start 133.985 84.455) (end 127.635 84.455) (width 1.016) (layer Dessous) (net 83)) + (segment (start 135.509 84.455) (end 133.985 84.455) (width 1.016) (layer Dessous) (net 83)) + (segment (start 135.255 71.755) (end 133.985 73.025) (width 1.016) (layer Dessous) (net 83) (status 800)) + (segment (start 133.985 88.9) (end 134.62 89.535) (width 1.016) (layer Dessous) (net 83)) + (segment (start 134.62 89.535) (end 137.16 89.535) (width 1.016) (layer Dessous) (net 83)) + (segment (start 137.16 89.535) (end 137.795 90.17) (width 1.016) (layer Dessous) (net 83)) + (segment (start 137.795 90.17) (end 137.795 93.345) (width 1.016) (layer Dessous) (net 83)) + (segment (start 133.985 84.455) (end 133.985 88.9) (width 1.016) (layer Dessous) (net 83)) + (segment (start 125.095 79.375) (end 127.635 81.915) (width 1.016) (layer Dessous) (net 83)) + (segment (start 127.635 81.915) (end 127.635 84.455) (width 1.016) (layer Dessous) (net 83)) + (segment (start 125.095 76.835) (end 125.095 79.375) (width 1.016) (layer Dessous) (net 83)) + (segment (start 124.46 60.325) (end 130.81 60.325) (width 0.635) (layer Dessous) (net 83)) + (segment (start 130.81 60.325) (end 131.445 59.69) (width 1.016) (layer Dessous) (net 83)) + (segment (start 119.38 123.825) (end 118.745 123.19) (width 1.016) (layer Dessus) (net 83)) + (segment (start 188.595 73.66) (end 188.595 81.28) (width 1.016) (layer Dessous) (net 83) (status 400)) + (segment (start 122.555 76.835) (end 125.095 76.835) (width 1.016) (layer Dessous) (net 83) (status 800)) + (segment (start 123.825 109.855) (end 123.825 107.315) (width 1.016) (layer Dessous) (net 83) (status 800)) + (via (at 123.825 107.315) (size 1.651) (layers Dessus Dessous) (net 83)) + (segment (start 131.445 107.315) (end 132.715 106.045) (width 1.016) (layer Dessus) (net 83)) + (segment (start 132.715 104.775) (end 132.715 106.045) (width 1.016) (layer Dessous) (net 83)) + (via (at 132.715 106.045) (size 1.651) (layers Dessus Dessous) (net 83)) + (segment (start 135.255 102.235) (end 132.715 104.775) (width 1.016) (layer Dessous) (net 83) (status 800)) + (segment (start 125.095 74.295) (end 125.095 76.835) (width 1.016) (layer Dessous) (net 83) (status 800)) + (segment (start 179.07 126.365) (end 179.07 116.84) (width 1.016) (layer Dessus) (net 83)) + (segment (start 118.745 107.95) (end 119.38 107.315) (width 1.016) (layer Dessus) (net 83)) + (segment (start 134.62 79.375) (end 136.144 79.375) (width 1.016) (layer Dessous) (net 83) (status 400)) + (segment (start 133.985 78.74) (end 134.62 79.375) (width 1.016) (layer Dessous) (net 83)) + (segment (start 170.815 64.77) (end 170.815 66.675) (width 1.016) (layer Dessous) (net 83) (status 400)) + (segment (start 150.495 64.135) (end 170.18 64.135) (width 1.016) (layer Dessous) (net 83) (status 800)) + (segment (start 147.955 64.135) (end 150.495 64.135) (width 1.016) (layer Dessous) (net 83) (status C00)) + (segment (start 191.135 82.55) (end 189.865 81.28) (width 1.016) (layer Dessus) (net 83)) + (segment (start 133.985 93.98) (end 134.62 93.345) (width 1.016) (layer Dessous) (net 83)) + (segment (start 134.62 93.345) (end 137.795 93.345) (width 1.016) (layer Dessous) (net 83)) + (segment (start 135.255 102.235) (end 133.985 100.965) (width 1.016) (layer Dessous) (net 83) (status 800)) + (segment (start 191.135 106.68) (end 182.245 115.57) (width 1.016) (layer Dessus) (net 83)) (zone (net 66) (net_name GND) (layer Dessous) (tstamp 47AB4739) (hatch edge 0.508) (connect_pads (clearance 0.508)) diff --git a/include/gr_basic.h b/include/gr_basic.h index 6c4da5ba74..ec11709eb9 100644 --- a/include/gr_basic.h +++ b/include/gr_basic.h @@ -88,9 +88,6 @@ typedef int wxPenStyle; extern GR_DRAWMODE g_XorMode; -extern EDA_COLOR_T g_DrawBgColor; - - typedef enum { /* Line styles for Get/SetLineStyle. */ diff --git a/pcbnew/pcb_plot_params.cpp b/pcbnew/pcb_plot_params.cpp index 1761ca493a..ccad2c68a5 100644 --- a/pcbnew/pcb_plot_params.cpp +++ b/pcbnew/pcb_plot_params.cpp @@ -81,7 +81,7 @@ static bool setInt( int* aInt, int aValue, int aMin, int aMax ) PCB_PLOT_PARAMS::PCB_PLOT_PARAMS() : m_layerSelection( 4, B_Cu, F_Cu, F_SilkS, B_SilkS ) { - m_useGerberExtensions = true; + m_useGerberExtensions = false; m_useGerberAttributes = false; m_gerberPrecision = gbrDefaultPrecision; m_excludeEdgeLayer = true; diff --git a/pcbnew/print_board_functions.cpp b/pcbnew/print_board_functions.cpp index b6a0ff904a..af367974fc 100644 --- a/pcbnew/print_board_functions.cpp +++ b/pcbnew/print_board_functions.cpp @@ -93,7 +93,7 @@ void FOOTPRINT_EDIT_FRAME::PrintPage( wxDC* aDC, drawmode = GR_OR; // Draw footprints, this is done at last in order to print the pad holes in - // white (or g_DrawBgColor) after the tracks and zones + // white after the tracks and zones int tmp = D_PAD::m_PadSketchModePenSize; D_PAD::m_PadSketchModePenSize = defaultPenSize; @@ -283,7 +283,7 @@ void PCB_EDIT_FRAME::PrintPage( wxDC* aDC, } // Draw footprints, this is done at last in order to print the pad holes in - // white (or g_DrawBgColor) after the tracks and zones + // white after the tracks and zones int tmp = D_PAD::m_PadSketchModePenSize; D_PAD::m_PadSketchModePenSize = defaultPenSize; @@ -299,7 +299,7 @@ void PCB_EDIT_FRAME::PrintPage( wxDC* aDC, if( drillShapeOpt != PRINT_PARAMETERS::NO_DRILL_SHAPE ) { TRACK* track = Pcb->m_Track; - EDA_COLOR_T color = g_DrawBgColor; + EDA_COLOR_T color = WHITE; bool blackpenstate = GetGRForceBlackPenState(); From e2e4fc483051bdea8d5820236a6a8194b14b4291 Mon Sep 17 00:00:00 2001 From: Lorenzo Marcantonio Date: Sat, 5 Jul 2014 14:35:18 +0200 Subject: [PATCH 549/741] Added missing support for reading the *.CrtYd layer token --- pcbnew/pcb_parser.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index 4f1a16c328..6d1154efa3 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -77,6 +77,7 @@ void PCB_PARSER::init() m_layerMasks[ "*.Mask" ] = LSET( 2, B_Mask, F_Mask ); m_layerMasks[ "*.SilkS" ] = LSET( 2, B_SilkS, F_SilkS ); m_layerMasks[ "*.Fab" ] = LSET( 2, B_Fab, F_Fab ); + m_layerMasks[ "*.CrtYd" ] = LSET( 2, B_CrtYd, F_CrtYd ); // This is for the first pretty format, which had Inner1_Cu-Inner14_Cu with the numbering // sequence reversed from the In1_Cu-In30_Cu version 2 pretty numbering scheme. From 611592029faee27983c575aaad5134085ee153c0 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Sat, 5 Jul 2014 15:42:59 -0500 Subject: [PATCH 550/741] fix Inner1.Cu in pcb_parser.cpp, start cvpcb work. --- common/richio.cpp | 3 +- cvpcb/autosel.cpp | 30 +++--- cvpcb/class_DisplayFootprintsFrame.cpp | 2 +- cvpcb/cvframe.cpp | 138 ++++++++++++------------- cvpcb/cvpcb.cpp | 2 - cvpcb/cvpcb.h | 1 - cvpcb/cvpcb_mainframe.h | 6 +- cvpcb/readwrite_dlgs.cpp | 29 +++--- include/dsnlexer.h | 1 - include/richio.h | 3 +- pcbnew/eagle_plugin.cpp | 2 +- pcbnew/github/github_plugin.cpp | 2 +- pcbnew/pcb_parser.cpp | 20 ++-- pcbnew/pcb_parser.h | 4 +- 14 files changed, 125 insertions(+), 118 deletions(-) diff --git a/common/richio.cpp b/common/richio.cpp index 5ce7ed2af3..ec1cf8c57d 100644 --- a/common/richio.cpp +++ b/common/richio.cpp @@ -315,10 +315,11 @@ char* STRING_LINE_READER::ReadLine() throw( IO_ERROR ) } -INPUTSTREAM_LINE_READER::INPUTSTREAM_LINE_READER( wxInputStream* aStream ) : +INPUTSTREAM_LINE_READER::INPUTSTREAM_LINE_READER( wxInputStream* aStream, const wxString& aSource ) : LINE_READER( LINE_READER_LINE_DEFAULT_MAX ), m_stream( aStream ) { + source = aSource; } diff --git a/cvpcb/autosel.cpp b/cvpcb/autosel.cpp index 9a96a02457..bdee3e4d8b 100644 --- a/cvpcb/autosel.cpp +++ b/cvpcb/autosel.cpp @@ -25,7 +25,7 @@ * @file autosel.cpp */ -/* Routines for automatic selection of modules. */ +// Routines for automatic selection of modules. #include #include @@ -40,7 +40,10 @@ #include #include -#define QUOTE '\'' +#define QUOTE '\'' + +#define FMT_TITLE_LIB_LOAD_ERROR _( "Library Load Error" ) + class FOOTPRINT_ALIAS { @@ -93,7 +96,7 @@ void CVPCB_MAINFRAME::AssocieModule( wxCommandEvent& event ) if( m_netlist.IsEmpty() ) return; - /* Find equivalents in all available files. */ + // Find equivalents in all available files. for( ii = 0; ii < m_AliasLibNames.GetCount(); ii++ ) { fn = m_AliasLibNames[ii]; @@ -107,6 +110,7 @@ void CVPCB_MAINFRAME::AssocieModule( wxCommandEvent& event ) { fn.SetExt( fn.GetExt() + wxT( "." ) + FootprintAliasFileExtension ); } + tmp = search.FindValidPath( fn.GetFullPath() ); if( !tmp ) @@ -114,7 +118,7 @@ void CVPCB_MAINFRAME::AssocieModule( wxCommandEvent& event ) msg.Printf( _( "Footprint alias library file '%s' could not be found in the " "default search paths." ), GetChars( fn.GetFullName() ) ); - wxMessageBox( msg, titleLibLoadError, wxOK | wxICON_ERROR ); + wxMessageBox( msg, FMT_TITLE_LIB_LOAD_ERROR, wxOK | wxICON_ERROR ); continue; } @@ -122,8 +126,8 @@ void CVPCB_MAINFRAME::AssocieModule( wxCommandEvent& event ) if( file == NULL ) { - msg.Printf( _( "Error opening alias library <%s>." ), GetChars( tmp ) ); - wxMessageBox( msg, titleLibLoadError, wxOK | wxICON_ERROR ); + msg.Printf( _( "Error opening alias library '%s'." ), GetChars( tmp ) ); + wxMessageBox( msg, FMT_TITLE_LIB_LOAD_ERROR, wxOK | wxICON_ERROR ); continue; } @@ -153,7 +157,7 @@ void CVPCB_MAINFRAME::AssocieModule( wxCommandEvent& event ) fclose( file ); } - /* Display the number of footprint aliases. */ + // Display the number of footprint aliases. msg.Printf( _( "%d footprint aliases found." ), aliases.size() ); SetStatusText( msg, 0 ); @@ -165,7 +169,7 @@ void CVPCB_MAINFRAME::AssocieModule( wxCommandEvent& event ) component = m_netlist.GetComponent( kk ); bool found = false; - m_ListCmp->SetSelection( ii++, true ); + m_compListBox->SetSelection( ii++, true ); if( !component->GetFPID().empty() ) continue; @@ -176,8 +180,8 @@ void CVPCB_MAINFRAME::AssocieModule( wxCommandEvent& event ) if( alias.m_Name.CmpNoCase( component->GetValue() ) != 0 ) continue; - /* filter alias so one can use multiple aliases (for polar and nonpolar caps for - * example) */ + // filter alias so one can use multiple aliases (for polar and + // nonpolar caps for example) const FOOTPRINT_INFO *module = m_footprints.GetModuleInfo( alias.m_FootprintName ); if( module ) @@ -207,11 +211,11 @@ void CVPCB_MAINFRAME::AssocieModule( wxCommandEvent& event ) } - /* obviously the last chance: there's only one filter matching one footprint */ + // obviously the last chance: there's only one filter matching one footprint if( !found && 1 == component->GetFootprintFilters().GetCount() ) { - /* we do not need to analyse wildcards: single footprint do not contain them */ - /* and if there are wildcards it just will not match any */ + // we do not need to analyse wildcards: single footprint do not + // contain them and if there are wildcards it just will not match any const FOOTPRINT_INFO* module = m_footprints.GetModuleInfo( component->GetFootprintFilters()[0] ); if( module ) diff --git a/cvpcb/class_DisplayFootprintsFrame.cpp b/cvpcb/class_DisplayFootprintsFrame.cpp index 9ccef06ec1..541c464737 100644 --- a/cvpcb/class_DisplayFootprintsFrame.cpp +++ b/cvpcb/class_DisplayFootprintsFrame.cpp @@ -481,7 +481,7 @@ void DISPLAY_FOOTPRINTS_FRAME::InitDisplay() CVPCB_MAINFRAME* parentframe = (CVPCB_MAINFRAME *) GetParent(); - wxString footprintName = parentframe->m_FootprintList->GetSelectedFootprint(); + wxString footprintName = parentframe->m_footprintListBox->GetSelectedFootprint(); if( !footprintName.IsEmpty() ) { diff --git a/cvpcb/cvframe.cpp b/cvpcb/cvframe.cpp index 88b3aa688c..71c7ac7ed5 100644 --- a/cvpcb/cvframe.cpp +++ b/cvpcb/cvframe.cpp @@ -108,9 +108,9 @@ CVPCB_MAINFRAME::CVPCB_MAINFRAME( KIWAY* aKiway, wxWindow* aParent ) : wxDefaultSize, KICAD_DEFAULT_DRAWFRAME_STYLE, CVPCB_MAINFRAME_NAME ) { m_FrameName = CVPCB_MAINFRAME_NAME; - m_ListCmp = NULL; - m_FootprintList = NULL; - m_LibraryList = NULL; + m_compListBox = NULL; + m_footprintListBox = NULL; + m_libListBox = NULL; m_mainToolBar = NULL; m_modified = false; m_isEESchemaNetlist = false; @@ -175,18 +175,18 @@ CVPCB_MAINFRAME::CVPCB_MAINFRAME( KIWAY* aKiway, wxWindow* aParent ) : m_auimgr.AddPane( m_mainToolBar, wxAuiPaneInfo( horiz ).Name( wxT( "m_mainToolBar" ) ).Top() ); - if( m_ListCmp ) - m_auimgr.AddPane( m_ListCmp, - wxAuiPaneInfo( horiz ).Name( wxT( "m_ListCmp" ) ).CentrePane() ); + if( m_compListBox ) + m_auimgr.AddPane( m_compListBox, + wxAuiPaneInfo( horiz ).Name( wxT( "m_compListBox" ) ).CentrePane() ); - if( m_LibraryList) - m_auimgr.AddPane( m_LibraryList, - wxAuiPaneInfo( info ).Name( wxT( "m_LibraryList" ) ). + if( m_libListBox) + m_auimgr.AddPane( m_libListBox, + wxAuiPaneInfo( info ).Name( wxT( "m_libListBox" ) ). Left().BestSize( (int) ( m_FrameSize.x * 0.20 ), m_FrameSize.y ) ); - if( m_FootprintList ) - m_auimgr.AddPane( m_FootprintList, - wxAuiPaneInfo( info ).Name( wxT( "m_FootprintList" ) ). + if( m_footprintListBox ) + m_auimgr.AddPane( m_footprintListBox, + wxAuiPaneInfo( info ).Name( wxT( "m_footprintListBox" ) ). Right().BestSize( (int) ( m_FrameSize.x * 0.30 ), m_FrameSize.y ) ); m_auimgr.Update(); @@ -302,21 +302,21 @@ void CVPCB_MAINFRAME::ChangeFocus( bool aMoveRight ) if( aMoveRight ) { - if( hasFocus == m_LibraryList ) - m_ListCmp->SetFocus(); - else if( hasFocus == m_ListCmp ) - m_FootprintList->SetFocus(); - else if( hasFocus == m_FootprintList ) - m_LibraryList->SetFocus(); + if( hasFocus == m_libListBox ) + m_compListBox->SetFocus(); + else if( hasFocus == m_compListBox ) + m_footprintListBox->SetFocus(); + else if( hasFocus == m_footprintListBox ) + m_libListBox->SetFocus(); } else { - if( hasFocus == m_LibraryList ) - m_FootprintList->SetFocus(); - else if( hasFocus == m_ListCmp ) - m_LibraryList->SetFocus(); - else if( hasFocus == m_FootprintList ) - m_ListCmp->SetFocus(); + if( hasFocus == m_libListBox ) + m_footprintListBox->SetFocus(); + else if( hasFocus == m_compListBox ) + m_libListBox->SetFocus(); + else if( hasFocus == m_footprintListBox ) + m_compListBox->SetFocus(); } } @@ -326,7 +326,7 @@ void CVPCB_MAINFRAME::ToFirstNA( wxCommandEvent& event ) if( m_netlist.IsEmpty() ) return; - long selection = m_ListCmp->GetFirstSelected(); + long selection = m_compListBox->GetFirstSelected(); if( selection < 0 ) selection = -1; // We will start to 0 for the first search , if no item selected @@ -335,8 +335,8 @@ void CVPCB_MAINFRAME::ToFirstNA( wxCommandEvent& event ) { if( m_netlist.GetComponent( jj )->GetFPID().empty() ) { - m_ListCmp->SetSelection( wxNOT_FOUND, false ); // Remove all selections - m_ListCmp->SetSelection( jj ); + m_compListBox->SetSelection( wxNOT_FOUND, false ); // Remove all selections + m_compListBox->SetSelection( jj ); SendMessageToEESCHEMA(); return; } @@ -349,20 +349,20 @@ void CVPCB_MAINFRAME::ToPreviousNA( wxCommandEvent& event ) if( m_netlist.IsEmpty() ) return; - int selection = m_ListCmp->GetFirstSelected(); + int selection = m_compListBox->GetFirstSelected(); if( selection < 0 ) - selection = m_ListCmp->GetCount(); + selection = m_compListBox->GetCount(); else - while( m_ListCmp->GetNextSelected( selection ) >= 0 ) - selection = m_ListCmp->GetNextSelected( selection ); + while( m_compListBox->GetNextSelected( selection ) >= 0 ) + selection = m_compListBox->GetNextSelected( selection ); for( int kk = selection-1; kk >= 0; kk-- ) { if( m_netlist.GetComponent( kk )->GetFPID().empty() ) { - m_ListCmp->SetSelection( wxNOT_FOUND, false ); // Remove all selections - m_ListCmp->SetSelection( kk ); + m_compListBox->SetSelection( wxNOT_FOUND, false ); // Remove all selections + m_compListBox->SetSelection( kk ); SendMessageToEESCHEMA(); return; } @@ -392,7 +392,7 @@ void CVPCB_MAINFRAME::DelAssociations( wxCommandEvent& event ) if( IsOK( this, _( "Delete selections" ) ) ) { m_skipComponentSelect = true; - m_ListCmp->SetSelection( 0 ); + m_compListBox->SetSelection( 0 ); for( unsigned i = 0; i < m_netlist.GetCount(); i++ ) { @@ -403,7 +403,7 @@ void CVPCB_MAINFRAME::DelAssociations( wxCommandEvent& event ) } m_skipComponentSelect = false; - m_ListCmp->SetSelection( 0 ); + m_compListBox->SetSelection( 0 ); m_undefinedComponentCnt = m_netlist.GetCount(); } @@ -562,8 +562,8 @@ void CVPCB_MAINFRAME::OnSelectComponent( wxListEvent& event ) filter |= FOOTPRINTS_LISTBOX::BY_LIBRARY; component = GetSelectedComponent(); - libraryName = m_LibraryList->GetSelectedLibrary(); - m_FootprintList->SetFootprints( m_footprints, libraryName, component, filter ); + libraryName = m_libListBox->GetSelectedLibrary(); + m_footprintListBox->SetFootprints( m_footprints, libraryName, component, filter ); // Tell AuiMgr that objects are changed ! if( m_auimgr.GetManagedWindow() ) // Be sure Aui Manager is initialized @@ -578,23 +578,23 @@ void CVPCB_MAINFRAME::OnSelectComponent( wxListEvent& event ) // but only if the selection is made from the component list or the library list. // If the selection is made from the footprint list, do not change the current // selected footprint. - if( FindFocus() == m_ListCmp || FindFocus() == m_LibraryList ) + if( FindFocus() == m_compListBox || FindFocus() == m_libListBox ) { wxString module = FROM_UTF8( component->GetFPID().Format().c_str() ); bool found = false; - for( int ii = 0; ii < m_FootprintList->GetCount(); ii++ ) + for( int ii = 0; ii < m_footprintListBox->GetCount(); ii++ ) { wxString footprintName; - wxString msg = m_FootprintList->OnGetItemText( ii, 0 ); + wxString msg = m_footprintListBox->OnGetItemText( ii, 0 ); msg.Trim( true ); msg.Trim( false ); footprintName = msg.AfterFirst( wxChar( ' ' ) ); if( module.Cmp( footprintName ) == 0 ) { - m_FootprintList->SetSelection( ii, true ); + m_footprintListBox->SetSelection( ii, true ); found = true; break; } @@ -602,10 +602,10 @@ void CVPCB_MAINFRAME::OnSelectComponent( wxListEvent& event ) if( !found ) { - int ii = m_FootprintList->GetSelection(); + int ii = m_footprintListBox->GetSelection(); if ( ii >= 0 ) - m_FootprintList->SetSelection( ii, false ); + m_footprintListBox->SetSelection( ii, false ); if( GetFpViewerFrame() ) { @@ -638,7 +638,7 @@ void CVPCB_MAINFRAME::DisplayStatus() wxString msg; COMPONENT* component; - if( wxWindow::FindFocus() == m_ListCmp || wxWindow::FindFocus() == m_LibraryList ) + if( wxWindow::FindFocus() == m_compListBox || wxWindow::FindFocus() == m_libListBox ) { msg.Printf( _( "Components: %d, unassigned: %d" ), (int) m_netlist.GetCount(), m_undefinedComponentCnt ); @@ -665,7 +665,7 @@ void CVPCB_MAINFRAME::DisplayStatus() } else { - wxString footprintName = m_FootprintList->GetSelectedFootprint(); + wxString footprintName = m_footprintListBox->GetSelectedFootprint(); FOOTPRINT_INFO* module = m_footprints.GetModuleInfo( footprintName ); @@ -681,7 +681,7 @@ void CVPCB_MAINFRAME::DisplayStatus() msg.Empty(); - if( m_FootprintList ) + if( m_footprintListBox ) { if( m_mainToolBar->GetToolToggled( ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST ) ) msg = _( "key words" ); @@ -707,7 +707,7 @@ void CVPCB_MAINFRAME::DisplayStatus() else msg = _( "Filtered by " ) + msg; - msg << wxT( ": " ) << m_FootprintList->GetCount(); + msg << wxT( ": " ) << m_footprintListBox->GetCount(); SetStatusText( msg, 2 ); } @@ -762,7 +762,7 @@ void CVPCB_MAINFRAME::SendMessageToEESCHEMA() if( m_netlist.IsEmpty() ) return; - int selection = m_ListCmp->GetSelection(); + int selection = m_compListBox->GetSelection(); if ( selection < 0 ) selection = 0; @@ -914,17 +914,17 @@ void CVPCB_MAINFRAME::BuildFOOTPRINTS_LISTBOX() { wxFont guiFont = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT ); - if( m_FootprintList == NULL ) + if( m_footprintListBox == NULL ) { - m_FootprintList = new FOOTPRINTS_LISTBOX( this, ID_CVPCB_FOOTPRINT_LIST, + m_footprintListBox = new FOOTPRINTS_LISTBOX( this, ID_CVPCB_FOOTPRINT_LIST, wxDefaultPosition, wxDefaultSize ); - m_FootprintList->SetFont( wxFont( guiFont.GetPointSize(), + m_footprintListBox->SetFont( wxFont( guiFont.GetPointSize(), wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL ) ); } - m_FootprintList->SetFootprints( m_footprints, wxEmptyString, NULL, + m_footprintListBox->SetFootprints( m_footprints, wxEmptyString, NULL, FOOTPRINTS_LISTBOX::UNFILTERED ); DisplayStatus(); } @@ -936,34 +936,34 @@ void CVPCB_MAINFRAME::BuildCmpListBox() COMPONENT* component; wxFont guiFont = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT ); - if( m_ListCmp == NULL ) + if( m_compListBox == NULL ) { - m_ListCmp = new COMPONENTS_LISTBOX( this, ID_CVPCB_COMPONENT_LIST, + m_compListBox = new COMPONENTS_LISTBOX( this, ID_CVPCB_COMPONENT_LIST, wxDefaultPosition, wxDefaultSize ); - m_ListCmp->SetFont( wxFont( guiFont.GetPointSize(), + m_compListBox->SetFont( wxFont( guiFont.GetPointSize(), wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL ) ); } - m_ListCmp->m_ComponentList.Clear(); + m_compListBox->m_ComponentList.Clear(); for( unsigned i = 0; i < m_netlist.GetCount(); i++ ) { component = m_netlist.GetComponent( i ); - msg.Printf( CMP_FORMAT, m_ListCmp->GetCount() + 1, + msg.Printf( CMP_FORMAT, m_compListBox->GetCount() + 1, GetChars( component->GetReference() ), GetChars( component->GetValue() ), GetChars( FROM_UTF8( component->GetFPID().Format().c_str() ) ) ); - m_ListCmp->m_ComponentList.Add( msg ); + m_compListBox->m_ComponentList.Add( msg ); } - if( m_ListCmp->m_ComponentList.Count() ) + if( m_compListBox->m_ComponentList.Count() ) { - m_ListCmp->SetItemCount( m_ListCmp->m_ComponentList.Count() ); - m_ListCmp->SetSelection( 0, true ); - m_ListCmp->RefreshItems( 0L, m_ListCmp->m_ComponentList.Count()-1 ); + m_compListBox->SetItemCount( m_compListBox->m_ComponentList.Count() ); + m_compListBox->SetSelection( 0, true ); + m_compListBox->RefreshItems( 0L, m_compListBox->m_ComponentList.Count()-1 ); #if defined (__WXGTK__ ) // @bug On GTK and wxWidgets 2.8.x, this will assert in debug builds because the @@ -971,9 +971,9 @@ void CVPCB_MAINFRAME::BuildCmpListBox() // ellipsizing long strings down to a few characters. It still doesn't set // the scroll bars correctly (too short) but it's better than any of the // other alternatives. If someone knows how to fix this, please do. - m_ListCmp->SetColumnWidth( -1, wxLIST_AUTOSIZE ); + m_compListBox->SetColumnWidth( -1, wxLIST_AUTOSIZE ); #else - m_ListCmp->SetColumnWidth( 0, wxLIST_AUTOSIZE ); + m_compListBox->SetColumnWidth( 0, wxLIST_AUTOSIZE ); #endif } } @@ -983,11 +983,11 @@ void CVPCB_MAINFRAME::BuildLIBRARY_LISTBOX() { wxFont guiFont = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT ); - if( m_LibraryList == NULL ) + if( m_libListBox == NULL ) { - m_LibraryList = new LIBRARY_LISTBOX( this, ID_CVPCB_LIBRARY_LIST, + m_libListBox = new LIBRARY_LISTBOX( this, ID_CVPCB_LIBRARY_LIST, wxDefaultPosition, wxDefaultSize ); - m_LibraryList->SetFont( wxFont( guiFont.GetPointSize(), + m_libListBox->SetFont( wxFont( guiFont.GetPointSize(), wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL ) ); @@ -1004,14 +1004,14 @@ void CVPCB_MAINFRAME::BuildLIBRARY_LISTBOX() for( unsigned ii = 0; ii < libNickNames.size(); ii++ ) libNames.Add( libNickNames[ii] ); - m_LibraryList->SetLibraryList( libNames ); + m_libListBox->SetLibraryList( libNames ); } } COMPONENT* CVPCB_MAINFRAME::GetSelectedComponent() { - int selection = m_ListCmp->GetSelection(); + int selection = m_compListBox->GetSelection(); if( selection >= 0 && selection < (int) m_netlist.GetCount() ) return m_netlist.GetComponent( selection ); diff --git a/cvpcb/cvpcb.cpp b/cvpcb/cvpcb.cpp index 317ef82631..18dbed29d5 100644 --- a/cvpcb/cvpcb.cpp +++ b/cvpcb/cvpcb.cpp @@ -56,8 +56,6 @@ const wxString FootprintAliasFileExtension( wxT( "equ" ) ); // Wildcard for schematic retroannotation (import footprint names in schematic): const wxString FootprintAliasFileWildcard( _( "KiCad footprint alias files (*.equ)|*.equ" ) ); -const wxString titleLibLoadError( _( "Library Load Error" ) ); - #if 0 // add this logic to OpenProjectFiles() diff --git a/cvpcb/cvpcb.h b/cvpcb/cvpcb.h index 5b91f21640..f5f76f433b 100644 --- a/cvpcb/cvpcb.h +++ b/cvpcb/cvpcb.h @@ -21,6 +21,5 @@ extern const wxString RetroFileExtension; extern const wxString FootprintAliasFileWildcard; -extern const wxString titleLibLoadError; #endif /* __CVPCB_H__ */ diff --git a/cvpcb/cvpcb_mainframe.h b/cvpcb/cvpcb_mainframe.h index 359c7e20b9..86580b1503 100644 --- a/cvpcb/cvpcb_mainframe.h +++ b/cvpcb/cvpcb_mainframe.h @@ -60,9 +60,9 @@ class CVPCB_MAINFRAME : public KIWAY_PLAYER public: bool m_KeepCvpcbOpen; - FOOTPRINTS_LISTBOX* m_FootprintList; - LIBRARY_LISTBOX* m_LibraryList; - COMPONENTS_LISTBOX* m_ListCmp; + FOOTPRINTS_LISTBOX* m_footprintListBox; + LIBRARY_LISTBOX* m_libListBox; + COMPONENTS_LISTBOX* m_compListBox; wxAuiToolBar* m_mainToolBar; wxFileName m_NetlistFileName; wxArrayString m_ModuleLibNames; diff --git a/cvpcb/readwrite_dlgs.cpp b/cvpcb/readwrite_dlgs.cpp index 939abc7acb..efcb59d0f7 100644 --- a/cvpcb/readwrite_dlgs.cpp +++ b/cvpcb/readwrite_dlgs.cpp @@ -49,23 +49,22 @@ void CVPCB_MAINFRAME::SetNewPkg( const wxString& aFootprintName ) COMPONENT* component; bool hasFootprint = false; int componentIndex; - wxString description; if( m_netlist.IsEmpty() ) return; // If no component is selected, select the first one - if( m_ListCmp->GetFirstSelected() < 0 ) + if( m_compListBox->GetFirstSelected() < 0 ) { componentIndex = 0; - m_ListCmp->SetSelection( componentIndex, true ); + m_compListBox->SetSelection( componentIndex, true ); } // iterate over the selection - while( m_ListCmp->GetFirstSelected() != -1 ) + while( m_compListBox->GetFirstSelected() != -1 ) { // Get the component for the current iteration - componentIndex = m_ListCmp->GetFirstSelected(); + componentIndex = m_compListBox->GetFirstSelected(); component = m_netlist.GetComponent( componentIndex ); if( component == NULL ) @@ -86,7 +85,7 @@ void CVPCB_MAINFRAME::SetNewPkg( const wxString& aFootprintName ) component->SetFPID( fpid ); // create the new component description - description.Printf( CMP_FORMAT, componentIndex + 1, + wxString description = wxString::Format( CMP_FORMAT, componentIndex + 1, GetChars( component->GetReference() ), GetChars( component->GetValue() ), GetChars( FROM_UTF8( component->GetFPID().Format().c_str() ) ) ); @@ -101,18 +100,18 @@ void CVPCB_MAINFRAME::SetNewPkg( const wxString& aFootprintName ) } // Set the new description and deselect the processed component - m_ListCmp->SetString( componentIndex, description ); - m_ListCmp->SetSelection( componentIndex, false ); + m_compListBox->SetString( componentIndex, description ); + m_compListBox->SetSelection( componentIndex, false ); } // Mark this "session" as modified m_modified = true; // select the next component, if there is one - if( componentIndex < (m_ListCmp->GetCount() - 1) ) + if( componentIndex < (m_compListBox->GetCount() - 1) ) componentIndex++; - m_ListCmp->SetSelection( componentIndex, true ); + m_compListBox->SetSelection( componentIndex, true ); // update the statusbar DisplayStatus(); @@ -166,7 +165,7 @@ bool CVPCB_MAINFRAME::ReadNetListAndLinkFiles() ReadSchematicNetlist(); - if( m_ListCmp == NULL ) + if( m_compListBox == NULL ) return false; LoadProjectFile( m_NetlistFileName.GetFullPath() ); @@ -175,7 +174,7 @@ bool CVPCB_MAINFRAME::ReadNetListAndLinkFiles() BuildFOOTPRINTS_LISTBOX(); BuildLIBRARY_LISTBOX(); - m_ListCmp->Clear(); + m_compListBox->Clear(); m_undefinedComponentCnt = 0; if( m_netlist.AnyFootprintsLinked() ) @@ -295,12 +294,12 @@ bool CVPCB_MAINFRAME::ReadNetListAndLinkFiles() { COMPONENT* component = m_netlist.GetComponent( i ); - msg.Printf( CMP_FORMAT, m_ListCmp->GetCount() + 1, + msg.Printf( CMP_FORMAT, m_compListBox->GetCount() + 1, GetChars( component->GetReference() ), GetChars( component->GetValue() ), GetChars( FROM_UTF8( component->GetFPID().Format().c_str() ) ) ); - m_ListCmp->AppendLine( msg ); + m_compListBox->AppendLine( msg ); if( component->GetFPID().empty() ) { @@ -310,7 +309,7 @@ bool CVPCB_MAINFRAME::ReadNetListAndLinkFiles() } if( !m_netlist.IsEmpty() ) - m_ListCmp->SetSelection( 0, true ); + m_compListBox->SetSelection( 0, true ); DisplayStatus(); diff --git a/include/dsnlexer.h b/include/dsnlexer.h index fcb4433d6c..24674fd665 100644 --- a/include/dsnlexer.h +++ b/include/dsnlexer.h @@ -155,7 +155,6 @@ protected: return false; } - #endif public: diff --git a/include/richio.h b/include/richio.h index 64c842fcb2..677c1d0e7e 100644 --- a/include/richio.h +++ b/include/richio.h @@ -432,8 +432,9 @@ public: * Constructor WXINPUTSTREAM_LINE_READER * * @param aStream A pointer to a wxInputStream object to read. + * @param aSource The name of the stream source, for error reporting purposes. */ - INPUTSTREAM_LINE_READER( wxInputStream* aStream ); + INPUTSTREAM_LINE_READER( wxInputStream* aStream, const wxString& aSource ); char* ReadLine() throw( IO_ERROR ); // see LINE_READER::ReadLine() description }; diff --git a/pcbnew/eagle_plugin.cpp b/pcbnew/eagle_plugin.cpp index b79e51b944..1d307e9ede 100644 --- a/pcbnew/eagle_plugin.cpp +++ b/pcbnew/eagle_plugin.cpp @@ -2708,7 +2708,7 @@ LAYER_ID EAGLE_PLUGIN::kicad_layer( int aEagleLayer ) const } } - return ToLAYER_ID( kiLayer ); + return LAYER_ID( kiLayer ); } diff --git a/pcbnew/github/github_plugin.cpp b/pcbnew/github/github_plugin.cpp index 894c6ec322..4b2f6946eb 100644 --- a/pcbnew/github/github_plugin.cpp +++ b/pcbnew/github/github_plugin.cpp @@ -221,7 +221,7 @@ MODULE* GITHUB_PLUGIN::FootprintLoad( const wxString& aLibraryPath, if( zis.OpenEntry( *entry ) ) { - INPUTSTREAM_LINE_READER reader( &zis ); + INPUTSTREAM_LINE_READER reader( &zis, aLibraryPath ); #if 1 // I am a PCB_IO derivative with my own PCB_PARSER m_parser->SetLineReader( &reader ); // ownership not passed diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index 6d1154efa3..475a844948 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -79,14 +79,15 @@ void PCB_PARSER::init() m_layerMasks[ "*.Fab" ] = LSET( 2, B_Fab, F_Fab ); m_layerMasks[ "*.CrtYd" ] = LSET( 2, B_CrtYd, F_CrtYd ); - // This is for the first pretty format, which had Inner1_Cu-Inner14_Cu with the numbering - // sequence reversed from the In1_Cu-In30_Cu version 2 pretty numbering scheme. - // Version 2 brought in an additional 16 Cu layers and flipped the cu stack but + // This is for the first pretty & *.kicad_pcb formats, which had + // Inner1_Cu - Inner14_Cu with the numbering sequence + // reversed from the subsequent format's In1_Cu - In30_Cu numbering scheme. + // The newer format brought in an additional 16 Cu layers and flipped the cu stack but // kept the gap between one of the outside layers and the last cu internal. for( int i=1; i<=14; ++i ) { - std::string key = StrPrintf( "Inner%d", i ); + std::string key = StrPrintf( "Inner%d.Cu", i ); m_layerMasks[ key ] = LSET( LAYER_ID( In15_Cu - i ) ); } @@ -867,9 +868,14 @@ T PCB_PARSER::lookUpLayer( const M& aMap ) throw( PARSE_ERROR, IO_ERROR ) } #endif - wxString error = wxString::Format( - _( "Layer '%s' in file <%s> at line %d, position %d, was not defined in the layers section" ), - GetChars( FROM_UTF8( CurText() ) ), GetChars( CurSource() ), + wxString error = wxString::Format( _( + "Layer '%s' in file\n" + "'%s'\n" + "at line %d, position %d\n" + "was not defined in the layers section" + ), + GetChars( FROM_UTF8( CurText() ) ), + GetChars( CurSource() ), CurLineNumber(), CurOffset() ); THROW_IO_ERROR( error ); diff --git a/pcbnew/pcb_parser.h b/pcbnew/pcb_parser.h index 4b223fc62c..3d8d6918b2 100644 --- a/pcbnew/pcb_parser.h +++ b/pcbnew/pcb_parser.h @@ -62,8 +62,8 @@ struct LAYER; */ class PCB_PARSER : public PCB_LEXER { - typedef boost::unordered_map< std::string, LAYER_ID > LAYER_ID_MAP; - typedef boost::unordered_map< std::string, LSET > LSET_MAP; + typedef boost::unordered_map< std::string, LAYER_ID > LAYER_ID_MAP; + typedef boost::unordered_map< std::string, LSET > LSET_MAP; BOARD* m_board; LAYER_ID_MAP m_layerIndices; ///< map layer name to it's index From 7cc5985c7a09fec3c375028d2e854bdc3f0d102b Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Sat, 5 Jul 2014 15:52:24 -0500 Subject: [PATCH 551/741] fix Inner1.Cu in pcb_parser.cpp, start cvpcb work. --- include/layers_id_colors_and_visibility.h | 9 +++++++-- pcbnew/kicad_plugin.cpp | 4 ++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/include/layers_id_colors_and_visibility.h b/include/layers_id_colors_and_visibility.h index fa71f9b8c9..bc74d75f0b 100644 --- a/include/layers_id_colors_and_visibility.h +++ b/include/layers_id_colors_and_visibility.h @@ -94,12 +94,16 @@ enum LAYER_ID B_Adhes, // 32 F_Adhes, + B_Paste, F_Paste, + B_SilkS, F_SilkS, + B_Mask, F_Mask, + Dwgs_User, Cmts_User, Eco1_User, @@ -107,10 +111,11 @@ enum LAYER_ID Edge_Cuts, Margin, - F_CrtYd, // CrtYd & Fab are footprint only B_CrtYd, - F_Fab, + F_CrtYd, + B_Fab, + F_Fab, LAYER_ID_COUNT }; diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index 50d6fd121e..3cfb646176 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -593,6 +593,10 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const Eco2_User, Edge_Cuts, Margin, + B_CrtYd, + F_CrtYd, + B_Fab, + F_Fab, }; for( LSEQ seq = aBoard->GetEnabledLayers().Seq( non_cu, DIM( non_cu ) ); seq; ++seq ) From adf1553b20466bb988ffe6c28b9ea37d839f7d4e Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sun, 6 Jul 2014 12:50:32 +0200 Subject: [PATCH 552/741] Update demo files --- demos/complex_hierarchy/ampli_ht.sch | 63 +- .../complex_hierarchy-cache.lib | 312 + demos/complex_hierarchy/complex_hierarchy.sch | 1 - demos/electric/electric-cache.lib | 76 +- demos/electric/electric.sch | 836 +- demos/flat_hierarchy/flat_hierarchy-cache.lib | 592 ++ demos/flat_hierarchy/flat_hierarchy.cmp | 230 +- demos/flat_hierarchy/flat_hierarchy.kicad_pcb | 6801 +++++++++-------- demos/flat_hierarchy/flat_hierarchy.net | 813 +- demos/flat_hierarchy/flat_hierarchy.sch | 35 +- demos/flat_hierarchy/pic_programmer.sch | 707 +- demos/flat_hierarchy/pic_sockets.sch | 225 +- .../kit-dev-coldfire-xilinx_5213-cache.dcm | 105 - .../kit-dev-coldfire-xilinx_5213-cache.lib | 30 +- .../kit-dev-coldfire-xilinx_5213.kicad_pcb | 6705 ++++++++-------- 15 files changed, 9428 insertions(+), 8103 deletions(-) create mode 100644 demos/complex_hierarchy/complex_hierarchy-cache.lib create mode 100644 demos/flat_hierarchy/flat_hierarchy-cache.lib delete mode 100644 demos/kit-dev-coldfire-xilinx_5213/kit-dev-coldfire-xilinx_5213-cache.dcm diff --git a/demos/complex_hierarchy/ampli_ht.sch b/demos/complex_hierarchy/ampli_ht.sch index db2f98e7c5..56b08a7d13 100644 --- a/demos/complex_hierarchy/ampli_ht.sch +++ b/demos/complex_hierarchy/ampli_ht.sch @@ -7,12 +7,11 @@ LIBS:linear LIBS:regul LIBS:interface LIBS:special -LIBS:complex_hierarchy-cache EELAYER 24 0 EELAYER END $Descr A4 11693 8268 encoding utf-8 -Sheet 2 3 +Sheet 3 3 Title "" Date "1 apr 2010" Rev "" @@ -152,7 +151,7 @@ U 1 1 4B617B88 P 9150 5350 AR Path="/4B3A1333/4B617B88" Ref="R26" Part="1" AR Path="/4B3A13A4/4B617B88" Ref="R28" Part="1" -F 0 "R28" V 9230 5350 50 0000 C CNN +F 0 "R26" V 9230 5350 50 0000 C CNN F 1 "220K" V 9150 5350 50 0000 C CNN F 2 "" H 9150 5350 60 0001 C CNN F 3 "" H 9150 5350 60 0001 C CNN @@ -173,7 +172,7 @@ U 1 1 4B616B96 P 9450 4700 AR Path="/4B3A1333/4B616B96" Ref="R25" Part="1" AR Path="/4B3A13A4/4B616B96" Ref="R27" Part="1" -F 0 "R27" V 9530 4700 50 0000 C CNN +F 0 "R25" V 9530 4700 50 0000 C CNN F 1 "47" V 9450 4700 50 0000 C CNN F 2 "" H 9450 4700 60 0001 C CNN F 3 "" H 9450 4700 60 0001 C CNN @@ -186,7 +185,7 @@ U 1 1 4B616AFA P 8200 4600 AR Path="/4B3A1333/4B616AFA" Ref="D8" Part="1" AR Path="/4B3A13A4/4B616AFA" Ref="D9" Part="1" -F 0 "D9" H 8200 4700 40 0000 C CNN +F 0 "D8" H 8200 4700 40 0000 C CNN F 1 "1N4148" H 8200 4500 40 0000 C CNN F 2 "" H 8200 4600 60 0001 C CNN F 3 "" H 8200 4600 60 0001 C CNN @@ -228,7 +227,7 @@ U 1 1 4B61688C P 8100 5250 AR Path="/4B3A1333/4B61688C" Ref="R10" Part="1" AR Path="/4B3A13A4/4B61688C" Ref="R20" Part="1" -F 0 "R20" V 8180 5250 50 0000 C CNN +F 0 "R10" V 8180 5250 50 0000 C CNN F 1 "5,6K" V 8100 5250 50 0000 C CNN F 2 "" H 8100 5250 60 0001 C CNN F 3 "" H 8100 5250 60 0001 C CNN @@ -270,7 +269,7 @@ U 1 1 4B4F3641 P 2850 2250 AR Path="/4B3A1333/4B4F3641" Ref="C12" Part="1" AR Path="/4B3A13A4/4B4F3641" Ref="C14" Part="1" -F 0 "C14" H 2900 2350 50 0000 L CNN +F 0 "C12" H 2900 2350 50 0000 L CNN F 1 "150nF" H 2900 2150 50 0000 L CNN F 2 "" H 2850 2250 60 0001 C CNN F 3 "" H 2850 2250 60 0001 C CNN @@ -283,7 +282,7 @@ U 1 1 4B4F363E P 2500 2000 AR Path="/4B3A1333/4B4F363E" Ref="R23" Part="1" AR Path="/4B3A13A4/4B4F363E" Ref="R24" Part="1" -F 0 "R24" V 2580 2000 50 0000 C CNN +F 0 "R23" V 2580 2000 50 0000 C CNN F 1 "1K" V 2500 2000 50 0000 C CNN F 2 "" H 2500 2000 60 0001 C CNN F 3 "" H 2500 2000 60 0001 C CNN @@ -336,7 +335,7 @@ U 1 1 4B3A137D P 8500 4250 AR Path="/4B3A13A4/4B3A137D" Ref="Q6" Part="1" AR Path="/4B3A1333/4B3A137D" Ref="Q2" Part="1" -F 0 "Q6" H 8500 4100 50 0000 R CNN +F 0 "Q2" H 8500 4100 50 0000 R CNN F 1 "MPAS42" H 8500 4400 50 0000 R CNN F 2 "" H 8500 4250 60 0001 C CNN F 3 "" H 8500 4250 60 0001 C CNN @@ -357,7 +356,7 @@ U 1 1 4B3A137C P 8500 4900 AR Path="/4B3A13A4/4B3A137C" Ref="Q7" Part="1" AR Path="/4B3A1333/4B3A137C" Ref="Q3" Part="1" -F 0 "Q7" H 8500 4750 60 0000 R CNN +F 0 "Q3" H 8500 4750 60 0000 R CNN F 1 "MPAS92" H 8500 5050 60 0000 R CNN F 2 "" H 8500 4900 60 0001 C CNN F 3 "" H 8500 4900 60 0001 C CNN @@ -378,7 +377,7 @@ U 1 1 4B3A137B P 7900 4600 AR Path="/4B3A13A4/4B3A137B" Ref="D7" Part="1" AR Path="/4B3A1333/4B3A137B" Ref="D4" Part="1" -F 0 "D7" H 7900 4700 40 0000 C CNN +F 0 "D4" H 7900 4700 40 0000 C CNN F 1 "1N4148" H 7900 4500 40 0000 C CNN F 2 "" H 7900 4600 60 0001 C CNN F 3 "" H 7900 4600 60 0001 C CNN @@ -420,7 +419,7 @@ U 1 1 4B3A1379 P 7800 5100 AR Path="/4B3A13A4/4B3A1379" Ref="Q8" Part="1" AR Path="/4B3A1333/4B3A1379" Ref="Q4" Part="1" -F 0 "Q8" H 7800 4950 50 0000 R CNN +F 0 "Q4" H 7800 4950 50 0000 R CNN F 1 "MPAS42" H 7800 5250 50 0000 R CNN F 2 "" H 7800 5100 60 0001 C CNN F 3 "" H 7800 5100 60 0001 C CNN @@ -462,7 +461,7 @@ U 1 1 4B3A1377 P 7650 3600 AR Path="/4B3A13A4/4B3A1377" Ref="D6" Part="1" AR Path="/4B3A1333/4B3A1377" Ref="D3" Part="1" -F 0 "D6" H 7650 3700 40 0000 C CNN +F 0 "D3" H 7650 3700 40 0000 C CNN F 1 "1N4148" H 7650 3500 40 0000 C CNN F 2 "" H 7650 3600 60 0001 C CNN F 3 "" H 7650 3600 60 0001 C CNN @@ -483,7 +482,7 @@ U 1 1 4B3A1376 P 8200 3300 AR Path="/4B3A13A4/4B3A1376" Ref="R13" Part="1" AR Path="/4B3A1333/4B3A1376" Ref="R3" Part="1" -F 0 "R13" V 8280 3300 50 0000 C CNN +F 0 "R3" V 8280 3300 50 0000 C CNN F 1 "470" V 8200 3300 50 0000 C CNN F 2 "" H 8200 3300 60 0001 C CNN F 3 "" H 8200 3300 60 0001 C CNN @@ -504,7 +503,7 @@ U 1 1 4B3A1375 P 7650 3150 AR Path="/4B3A13A4/4B3A1375" Ref="D5" Part="1" AR Path="/4B3A1333/4B3A1375" Ref="D2" Part="1" -F 0 "D5" H 7650 3250 40 0000 C CNN +F 0 "D2" H 7650 3250 40 0000 C CNN F 1 "1N4148" H 7650 3050 40 0000 C CNN F 2 "" H 7650 3150 60 0001 C CNN F 3 "" H 7650 3150 60 0001 C CNN @@ -525,7 +524,7 @@ U 1 1 4B3A1374 P 7650 4150 AR Path="/4B3A13A4/4B3A1374" Ref="R14" Part="1" AR Path="/4B3A1333/4B3A1374" Ref="R4" Part="1" -F 0 "R14" V 7730 4150 50 0000 C CNN +F 0 "R4" V 7730 4150 50 0000 C CNN F 1 "220K" V 7650 4150 50 0000 C CNN F 2 "" H 7650 4150 60 0001 C CNN F 3 "" H 7650 4150 60 0001 C CNN @@ -567,7 +566,7 @@ U 1 1 4B3A1371 P 7250 5100 AR Path="/4B3A13A4/4B3A1371" Ref="R18" Part="1" AR Path="/4B3A1333/4B3A1371" Ref="R8" Part="1" -F 0 "R18" V 7330 5100 50 0000 C CNN +F 0 "R8" V 7330 5100 50 0000 C CNN F 1 "1K" V 7250 5100 50 0000 C CNN F 2 "" H 7250 5100 60 0001 C CNN F 3 "" H 7250 5100 60 0001 C CNN @@ -588,7 +587,7 @@ U 1 1 4B3A1370 P 8900 5350 AR Path="/4B3A13A4/4B3A1370" Ref="R22" Part="1" AR Path="/4B3A1333/4B3A1370" Ref="R12" Part="1" -F 0 "R22" V 8980 5350 50 0000 C CNN +F 0 "R12" V 8980 5350 50 0000 C CNN F 1 "220K" V 8900 5350 50 0000 C CNN F 2 "" H 8900 5350 60 0001 C CNN F 3 "" H 8900 5350 60 0001 C CNN @@ -630,7 +629,7 @@ U 1 1 4B3A136D P 7400 5400 AR Path="/4B3A13A4/4B3A136D" Ref="R19" Part="1" AR Path="/4B3A1333/4B3A136D" Ref="R9" Part="1" -F 0 "R19" V 7480 5400 50 0000 C CNN +F 0 "R9" V 7480 5400 50 0000 C CNN F 1 "1K" V 7400 5400 50 0000 C CNN F 2 "" H 7400 5400 60 0001 C CNN F 3 "" H 7400 5400 60 0001 C CNN @@ -651,7 +650,7 @@ U 1 1 4B3A136C P 10750 4700 AR Path="/4B3A13A4/4B3A136C" Ref="P5" Part="1" AR Path="/4B3A1333/4B3A136C" Ref="P3" Part="1" -F 0 "P5" V 10700 4700 40 0000 C CNN +F 0 "P3" V 10700 4700 40 0000 C CNN F 1 "CONN_2" V 10800 4700 40 0000 C CNN F 2 "" H 10750 4700 60 0001 C CNN F 3 "" H 10750 4700 60 0001 C CNN @@ -666,7 +665,7 @@ U 1 1 4B3A136B P 3400 2000 AR Path="/4B3A13A4/4B3A136B" Ref="R16" Part="1" AR Path="/4B3A1333/4B3A136B" Ref="R6" Part="1" -F 0 "R16" V 3480 2000 50 0000 C CNN +F 0 "R6" V 3480 2000 50 0000 C CNN F 1 "22K" V 3400 2000 50 0000 C CNN F 2 "" H 3400 2000 60 0001 C CNN F 3 "" H 3400 2000 60 0001 C CNN @@ -729,7 +728,7 @@ U 1 1 4B3A1368 P 6400 5400 AR Path="/4B3A13A4/4B3A1368" Ref="U4" Part="1" AR Path="/4B3A1333/4B3A1368" Ref="U3" Part="1" -F 0 "U4" H 6450 5600 60 0000 C CNN +F 0 "U3" H 6450 5600 60 0000 C CNN F 1 "LM358N" H 6550 5200 50 0000 C CNN F 2 "" H 6400 5400 60 0001 C CNN F 3 "" H 6400 5400 60 0001 C CNN @@ -742,7 +741,7 @@ U 1 1 4B3A1367 P 1400 2100 AR Path="/4B3A13A4/4B3A1367" Ref="P6" Part="1" AR Path="/4B3A1333/4B3A1367" Ref="P4" Part="1" -F 0 "P6" V 1350 2100 40 0000 C CNN +F 0 "P4" V 1350 2100 40 0000 C CNN F 1 "CONN_2" V 1450 2100 40 0000 C CNN F 2 "" H 1400 2100 60 0001 C CNN F 3 "" H 1400 2100 60 0001 C CNN @@ -763,7 +762,7 @@ U 1 1 4B3A1366 P 4100 2450 AR Path="/4B3A13A4/4B3A1366" Ref="C7" Part="1" AR Path="/4B3A1333/4B3A1366" Ref="C4" Part="1" -F 0 "C7" H 4150 2550 50 0000 L CNN +F 0 "C4" H 4150 2550 50 0000 L CNN F 1 "4,7nF" H 4150 2350 50 0000 L CNN F 2 "" H 4100 2450 60 0001 C CNN F 3 "" H 4100 2450 60 0001 C CNN @@ -776,7 +775,7 @@ U 1 1 4B3A1365 P 8100 5750 AR Path="/4B3A13A4/4B3A1365" Ref="C8" Part="1" AR Path="/4B3A1333/4B3A1365" Ref="C5" Part="1" -F 0 "C8" H 8150 5850 50 0000 L CNN +F 0 "C5" H 8150 5850 50 0000 L CNN F 1 "820pF" H 8150 5650 50 0000 L CNN F 2 "" H 8100 5750 60 0001 C CNN F 3 "" H 8100 5750 60 0001 C CNN @@ -789,7 +788,7 @@ U 1 1 4B3A1364 P 9450 4450 AR Path="/4B3A13A4/4B3A1364" Ref="R15" Part="1" AR Path="/4B3A1333/4B3A1364" Ref="R5" Part="1" -F 0 "R15" V 9530 4450 50 0000 C CNN +F 0 "R5" V 9530 4450 50 0000 C CNN F 1 "47" V 9450 4450 50 0000 C CNN F 2 "" H 9450 4450 60 0001 C CNN F 3 "" H 9450 4450 60 0001 C CNN @@ -815,7 +814,7 @@ U 1 1 4B3A1362 P 5150 6400 AR Path="/4B3A13A4/4B3A1362" Ref="R21" Part="1" AR Path="/4B3A1333/4B3A1362" Ref="R11" Part="1" -F 0 "R21" V 5230 6400 50 0000 C CNN +F 0 "R11" V 5230 6400 50 0000 C CNN F 1 "4,7K" V 5150 6400 50 0000 C CNN F 2 "" H 5150 6400 60 0001 C CNN F 3 "" H 5150 6400 60 0001 C CNN @@ -857,7 +856,7 @@ U 1 1 4B3A1360 P 8100 3850 AR Path="/4B3A13A4/4B3A1360" Ref="Q5" Part="1" AR Path="/4B3A1333/4B3A1360" Ref="Q1" Part="1" -F 0 "Q5" H 8100 3700 60 0000 R CNN +F 0 "Q1" H 8100 3700 60 0000 R CNN F 1 "MPAS92" H 8100 4000 60 0000 R CNN F 2 "" H 8100 3850 60 0001 C CNN F 3 "" H 8100 3850 60 0001 C CNN @@ -917,7 +916,7 @@ U 2 1 4B3A135C P 4850 2400 AR Path="/4B3A13A4/4B3A135C" Ref="U4" Part="2" AR Path="/4B3A1333/4B3A135C" Ref="U3" Part="2" -F 0 "U4" H 4900 2600 60 0000 C CNN +F 0 "U3" H 4900 2600 60 0000 C CNN F 1 "LM358N" H 5000 2200 50 0000 C CNN F 2 "" H 4850 2400 60 0001 C CNN F 3 "" H 4850 2400 60 0001 C CNN @@ -951,7 +950,7 @@ U 1 1 4B3A1359 P 4000 2000 AR Path="/4B3A13A4/4B3A1359" Ref="R17" Part="1" AR Path="/4B3A1333/4B3A1359" Ref="R7" Part="1" -F 0 "R17" V 4080 2000 50 0000 C CNN +F 0 "R7" V 4080 2000 50 0000 C CNN F 1 "22K" V 4000 2000 50 0000 C CNN F 2 "" H 4000 2000 60 0001 C CNN F 3 "" H 4000 2000 60 0001 C CNN @@ -972,7 +971,7 @@ U 1 1 4B3A1358 P 4350 1600 AR Path="/4B3A13A4/4B3A1358" Ref="C6" Part="1" AR Path="/4B3A1333/4B3A1358" Ref="C3" Part="1" -F 0 "C6" H 4400 1700 50 0000 L CNN +F 0 "C3" H 4400 1700 50 0000 L CNN F 1 "15nF" H 4400 1500 50 0000 L CNN F 2 "" H 4350 1600 60 0001 C CNN F 3 "" H 4350 1600 60 0001 C CNN @@ -987,7 +986,7 @@ U 1 1 4B3A1357 P 5850 6400 AR Path="/4B3A13A4/4B3A1357" Ref="RV2" Part="1" AR Path="/4B3A1333/4B3A1357" Ref="RV1" Part="1" -F 0 "RV2" H 5850 6300 50 0000 C CNN +F 0 "RV1" H 5850 6300 50 0000 C CNN F 1 "4,7K" H 5850 6400 50 0000 C CNN F 2 "" H 5850 6400 60 0001 C CNN F 3 "" H 5850 6400 60 0001 C CNN diff --git a/demos/complex_hierarchy/complex_hierarchy-cache.lib b/demos/complex_hierarchy/complex_hierarchy-cache.lib new file mode 100644 index 0000000000..ecb4e7c5e7 --- /dev/null +++ b/demos/complex_hierarchy/complex_hierarchy-cache.lib @@ -0,0 +1,312 @@ +EESchema-LIBRARY Version 2.3 +#encoding utf-8 +# +# +12C +# +DEF +12C #PWR 0 0 N Y 1 F P +F0 "#PWR" 0 -30 30 H I C CNN +F1 "+12C" 0 110 40 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +DRAW +X +12C 1 0 0 0 U 30 30 0 0 W N +C 0 60 20 0 1 0 N +P 4 0 1 0 0 0 0 40 0 40 0 40 N +ENDDRAW +ENDDEF +# +# +12V +# +DEF +12V #PWR 0 0 N Y 1 F P +F0 "#PWR" 0 -50 20 H I C CNN +F1 "+12V" 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 +12V 1 0 0 0 U 20 30 0 0 W N +C 0 60 20 0 1 0 N +P 3 0 1 0 0 0 0 40 0 40 N +ENDDRAW +ENDDEF +# +# -VAA +# +DEF -VAA #PWR 0 0 Y Y 1 F P +F0 "#PWR" 0 100 20 H I C CNN +F1 "-VAA" 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 -VAA 1 0 0 0 U 20 20 0 0 W N +P 3 0 1 0 0 0 0 50 0 50 N +P 7 0 1 0 0 80 30 50 -20 50 -30 50 0 80 0 80 0 80 F +ENDDRAW +ENDDEF +# +# 7805 +# +DEF 7805 U 0 30 N Y 1 F N +F0 "U" 150 -196 60 H V C CNN +F1 "7805" 0 200 60 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +ALIAS LM7805 LM7812 78L05 +DRAW +S -200 -150 200 150 0 1 0 N +X VI VI -400 50 200 R 40 40 1 1 I +X VO VO 400 50 200 L 40 40 1 1 w +X GND GND 0 -250 100 U 40 40 1 1 I +ENDDRAW +ENDDEF +# +# C +# +DEF C C 0 10 N Y 1 F N +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 100 30 H V C CNN +$FPLIST + SM* + C? + C1-1 +$ENDFPLIST +DRAW +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 +ENDDEF +# +# CONN_2 +# +DEF CONN_2 P 0 40 Y N 1 F N +F0 "P" -50 0 40 V V C CNN +F1 "CONN_2" 50 0 40 V V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +DRAW +S -100 150 100 -150 0 1 0 N +X P1 1 -350 100 250 R 60 60 1 1 P I +X PM 2 -350 -100 250 R 60 60 1 1 P I +ENDDRAW +ENDDEF +# +# CP +# +DEF CP C 0 10 N N 1 F N +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 "" 50 100 30 H V C CNN +ALIAS CAPAPOL +$FPLIST + CP* + SM* +$ENDFPLIST +DRAW +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 +ENDDRAW +ENDDEF +# +# DIODE +# +DEF DIODE D 0 40 N N 1 F N +F0 "D" 0 100 40 H V C CNN +F1 "DIODE" 0 -100 40 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +$FPLIST + D? + S* +$ENDFPLIST +DRAW +P 2 0 1 6 50 50 50 -50 N +P 3 0 1 0 -50 50 50 0 -50 -50 F +X A 1 -200 0 150 R 40 40 1 1 P +X K 2 200 0 150 L 40 40 1 1 P +ENDDRAW +ENDDEF +# +# GND +# +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 +ENDDRAW +ENDDEF +# +# HT +# +DEF HT #PWR 0 0 Y Y 1 F P +F0 "#PWR" 0 120 20 H I C CNN +F1 "HT" 0 90 30 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +DRAW +X HT 1 0 0 0 U 20 20 0 0 W N +P 3 0 1 0 0 0 0 40 0 40 N +P 6 0 1 0 0 40 20 20 0 70 -20 20 0 40 0 40 N +ENDDRAW +ENDDEF +# +# ICL7660 +# +DEF ICL7660 U 0 40 Y Y 1 F N +F0 "U" 200 400 70 H V L CNN +F1 "ICL7660" 50 -450 70 H V L CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +DRAW +S -550 -350 550 350 0 1 0 N +X CAP+ 2 -850 250 300 R 60 60 1 1 I +X GND 3 -50 -650 300 U 60 60 1 1 W +X CAP- 4 -850 50 300 R 60 60 1 1 I +X VOUT 5 850 150 300 L 60 60 1 1 w +X LV 6 850 -150 300 L 60 60 1 1 I +X OSC 7 -850 -150 300 R 60 60 1 1 I +X V+ 8 -50 650 300 D 60 60 1 1 W +ENDDRAW +ENDDEF +# +# LM358 +# +DEF LM358 U 0 20 Y Y 2 F N +F0 "U" -50 200 60 H V L CNN +F1 "LM358" -50 -250 60 H V L CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +ALIAS LMC6062 LMC6082 LM358N TL072 TL082 +DRAW +P 4 0 1 6 -200 200 200 0 -200 -200 -200 200 f +X V- 4 -100 -400 250 U 40 40 0 1 W +X V+ 8 -100 400 250 D 40 40 0 1 W +X ~ 1 500 0 300 L 40 40 1 1 O +X - 2 -500 -100 300 R 40 40 1 1 I +X + 3 -500 100 300 R 40 40 1 1 I +X + 5 -500 100 300 R 40 40 2 1 I +X - 6 -500 -100 300 R 40 40 2 1 I +X ~ 7 500 0 300 L 40 40 2 1 O +ENDDRAW +ENDDEF +# +# MPSA42 +# +DEF MPSA42 Q 0 40 Y N 1 F N +F0 "Q" 150 -150 60 H V L CNN +F1 "MPSA42" 150 150 60 H V L CNN +F2 "TO92-CBE" 150 0 30 H I C CNN +F3 "" 0 0 60 H V C CNN +$FPLIST + TO92-CBE +$ENDFPLIST +DRAW +C 50 0 111 0 1 10 N +P 2 0 1 0 0 0 100 100 N +P 3 0 1 10 0 75 0 -75 0 -75 N +P 3 0 1 0 50 -50 0 0 0 0 N +P 3 0 1 0 90 -90 100 -100 100 -100 N +P 5 0 1 0 90 -90 70 -30 30 -70 90 -90 90 -90 F +X B B -200 0 200 R 40 40 1 1 I +X C C 100 200 100 D 40 40 1 1 P +X E E 100 -200 100 U 40 40 1 1 P +ENDDRAW +ENDDEF +# +# MPSA92 +# +DEF MPSA92 Q 0 40 Y N 1 F N +F0 "Q" 150 -150 60 H V L CNN +F1 "MPSA92" 150 150 60 H V L CNN +F2 "TO92-CBE" 150 0 30 H I C CNN +F3 "" 0 0 60 H V C CNN +$FPLIST + TO92-CBE +$ENDFPLIST +DRAW +C 50 0 111 0 1 10 N +P 2 0 1 0 0 0 100 100 N +P 3 0 1 10 0 75 0 -75 0 -75 F +P 3 0 1 0 25 -25 0 0 0 0 N +P 3 0 1 0 100 -100 65 -65 65 -65 N +P 5 0 1 0 25 -25 50 -75 75 -50 25 -25 25 -25 F +X B B -200 0 200 R 40 40 1 1 I +X C C 100 200 100 D 40 40 1 1 P +X E E 100 -200 100 U 40 40 1 1 P +ENDDRAW +ENDDEF +# +# POT +# +DEF POT RV 0 40 Y N 1 F N +F0 "RV" 0 -100 50 H V C CNN +F1 "POT" 0 0 50 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +DRAW +S -150 50 150 -50 0 1 0 N +P 3 0 1 0 0 50 -20 70 20 70 F +X 1 1 -250 0 100 R 40 40 1 1 P +X 2 2 0 150 80 D 40 40 1 1 P +X 3 3 250 0 100 L 40 40 1 1 P +ENDDRAW +ENDDEF +# +# PWR_FLAG +# +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 +ENDDRAW +ENDDEF +# +# R +# +DEF R R 0 0 N Y 1 F N +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 + SM0805 + R?-* + SM1206 +$ENDFPLIST +DRAW +S -40 150 40 -150 0 1 12 N +X ~ 1 0 250 100 D 60 60 1 1 P +X ~ 2 0 -250 100 U 60 60 1 1 P +ENDDRAW +ENDDEF +# +# VCC +# +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 +P 3 0 1 0 0 0 0 30 0 30 N +ENDDRAW +ENDDEF +# +#End Library diff --git a/demos/complex_hierarchy/complex_hierarchy.sch b/demos/complex_hierarchy/complex_hierarchy.sch index e67a73e9e5..688a7ace56 100644 --- a/demos/complex_hierarchy/complex_hierarchy.sch +++ b/demos/complex_hierarchy/complex_hierarchy.sch @@ -7,7 +7,6 @@ LIBS:linear LIBS:regul LIBS:interface LIBS:special -LIBS:complex_hierarchy-cache EELAYER 24 0 EELAYER END $Descr A4 11693 8268 diff --git a/demos/electric/electric-cache.lib b/demos/electric/electric-cache.lib index 502052c18d..f9c4aad505 100644 --- a/demos/electric/electric-cache.lib +++ b/demos/electric/electric-cache.lib @@ -1,10 +1,13 @@ -EESchema-LIBRARY Version 2.3 Date: 09/02/2010 21:35:02 +EESchema-LIBRARY Version 2.3 +#encoding utf-8 # # A_1KVA # DEF A_1KVA EA 0 10 N Y 1 F N F0 "EA" -90 200 40 H V C CNN F1 "A_1KVA" 0 130 40 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN DRAW P 2 0 0 0 200 -200 200 -200 N C -20 10 31 0 1 0 N @@ -24,6 +27,8 @@ ENDDEF DEF C_3x1.5mm2 EC 0 10 N Y 1 F N F0 "EC" -170 130 40 H V C CNN F1 "C_3x1.5mm2" 0 -100 40 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN DRAW P 2 0 0 0 200 -200 200 -200 N C -30 50 10 0 1 0 F @@ -42,6 +47,8 @@ ENDDEF DEF C_3x2.5mm2 EC 0 10 N Y 1 F N F0 "EC" -170 130 40 H V C CNN F1 "C_3x2.5mm2" 0 -100 40 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN DRAW P 2 0 0 0 200 -200 200 -200 N C -30 50 10 0 1 0 F @@ -60,6 +67,8 @@ ENDDEF DEF C_3x6mm2 EC 0 10 N Y 1 F N F0 "EC" -170 130 40 H V C CNN F1 "C_3x6mm2" 0 -100 40 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN DRAW P 2 0 0 0 200 -200 200 -200 N C -30 50 10 0 1 0 F @@ -78,6 +87,8 @@ ENDDEF DEF D_06A ED 0 10 N Y 1 F N F0 "ED" -160 120 40 H V C CNN F1 "D_06A" -100 -80 40 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN DRAW P 2 0 0 0 200 -200 200 -200 N P 3 0 1 0 -100 0 60 100 60 100 N @@ -93,6 +104,8 @@ ENDDEF DEF D_10A ED 0 10 N Y 1 F N F0 "ED" -160 120 40 H V C CNN F1 "D_10A" -100 -80 40 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN DRAW P 2 0 0 0 200 -200 200 -200 N P 3 0 1 0 -100 0 60 100 60 100 N @@ -108,6 +121,8 @@ ENDDEF DEF D_16A ED 0 10 N Y 1 F N F0 "ED" -160 120 40 H V C CNN F1 "D_16A" -100 -80 40 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN DRAW P 2 0 0 0 200 -200 200 -200 N P 3 0 1 0 -100 0 60 100 60 100 N @@ -123,6 +138,8 @@ ENDDEF DEF D_32A ED 0 10 N Y 1 F N F0 "ED" -160 120 40 H V C CNN F1 "D_32A" -100 -80 40 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN DRAW P 2 0 0 0 200 -200 200 -200 N P 3 0 1 0 -100 0 60 100 60 100 N @@ -138,8 +155,10 @@ ENDDEF DEF G_Th_3KVA EG 0 10 N Y 1 F N F0 "EG" -160 120 40 H V C CNN F1 "G_Th_3KVA" 0 -120 40 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN DRAW -T 0 0 0 70 0 0 0 G Normal 1 C C +T 0 0 0 70 0 0 0 G Normal 0 C C P 2 0 0 0 200 -200 200 -200 N C 0 0 84 0 1 0 N X ~ 1 200 0 118 L 10 40 1 1 w @@ -151,6 +170,8 @@ ENDDEF DEF I_25A_LUM EI 0 10 N Y 1 F N F0 "EI" -160 120 40 H V C CNN F1 "I_25A_LUM" 0 -100 40 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN DRAW P 2 0 0 0 200 -200 200 -200 N C 0 0 36 0 1 0 N @@ -167,8 +188,10 @@ ENDDEF DEF J_40A_30mA EJ 0 10 N Y 1 F N F0 "EJ" -210 180 40 H V C CNN F1 "J_40A_30mA" -20 -120 40 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN DRAW -T 0 120 200 20 0 0 0 OFS Normal 1 C C +T 0 120 200 20 0 0 0 OFS Normal 0 C C P 2 0 0 0 200 -200 200 -200 N P 5 0 0 0 120 20 120 -20 120 -20 120 -20 120 -20 N A -120 60 20 1799 1 0 1 0 N -140 60 -100 60 @@ -190,6 +213,8 @@ ENDDEF DEF O_600VA EO 0 10 N Y 1 F N F0 "EO" -70 120 40 H V C CNN F1 "O_600VA" -40 -150 40 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN DRAW P 2 0 0 0 200 -200 200 -200 N C -20 0 31 0 1 0 N @@ -228,6 +253,8 @@ ENDDEF DEF O_900VA EO 0 10 N Y 1 F N F0 "EO" -70 120 40 H V C CNN F1 "O_900VA" -40 -150 40 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN DRAW P 2 0 0 0 200 -200 200 -200 N C -20 0 31 0 1 0 N @@ -266,6 +293,8 @@ ENDDEF DEF P_10A EP 0 10 N Y 1 F N F0 "EP" -160 120 40 H V C CNN F1 "P_10A" -80 -140 40 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN DRAW A 0 0 80 891 -891 0 0 0 N 1 80 1 -80 P 2 0 0 0 200 -200 200 -200 N @@ -278,8 +307,10 @@ ENDDEF DEF Q_25A_2F2O EQ 0 10 N Y 1 F N F0 "EQ" -160 120 40 H V C CNN F1 "Q_25A_2F2O" 0 -140 40 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN DRAW -T 0 90 150 20 0 0 0 O+F Normal 1 C C +T 0 90 150 20 0 0 0 O+F Normal 0 C C S -100 -30 100 -70 0 0 0 N P 2 0 0 0 200 -200 200 -200 N P 3 0 0 0 0 60 0 -60 0 -60 N @@ -302,6 +333,8 @@ ENDDEF DEF Q_2A_12O_40KV EQ 0 10 N Y 1 F N F0 "EQ" -160 120 40 H V C CNN F1 "Q_2A_12O_40KV" 0 -730 40 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN DRAW S -100 -580 100 -620 0 0 0 N P 2 0 0 0 200 -200 200 -200 N @@ -353,9 +386,11 @@ ENDDEF DEF R_16A_30mA ER 0 10 N Y 1 F N F0 "ER" -210 180 40 H V C CNN F1 "R_16A_30mA" 0 -200 40 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN DRAW -T 0 20 -100 50 0 0 0 M Normal 1 C C -T 0 120 200 20 0 0 0 OF Normal 1 C C +T 0 20 -100 50 0 0 0 M Normal 0 C C +T 0 120 200 20 0 0 0 OF Normal 0 C C P 2 0 0 0 200 -200 200 -200 N P 2 0 0 0 400 -200 400 -200 N P 3 0 0 0 20 -50 20 50 20 50 N @@ -382,8 +417,10 @@ ENDDEF DEF S_63A ES 0 10 N Y 1 F N F0 "ES" -210 180 40 H V C CNN F1 "S_63A" 0 -110 40 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN DRAW -T 0 120 200 20 0 0 0 OFS Normal 1 C C +T 0 120 200 20 0 0 0 OFS Normal 0 C C P 2 0 0 0 200 -200 200 -200 N P 2 0 0 0 400 -200 400 -200 N P 3 0 0 0 -150 0 -100 0 -100 0 N @@ -408,8 +445,10 @@ ENDDEF DEF V_A10A EV 0 10 N Y 1 F N F0 "EV" -160 120 40 H V C CNN F1 "V_A10A" -60 -140 40 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN DRAW -T 0 0 0 70 0 0 0 A Normal 1 C C +T 0 0 0 70 0 0 0 A Normal 0 C C P 2 0 0 0 200 -200 200 -200 N C 0 0 84 0 1 0 N P 3 0 1 0 -100 0 -80 0 -80 0 N @@ -418,26 +457,15 @@ X ~ 2 200 0 118 L 10 40 1 1 w ENDDRAW ENDDEF # -# V_F50Hz -# -DEF V_F50Hz EV 0 10 N Y 1 F N -F0 "EV" -160 120 40 H V C CNN -F1 "V_F50Hz" -40 -140 40 H V C CNN -DRAW -T 0 0 0 50 0 0 0 Hz Normal 1 C C -P 2 0 0 0 200 -200 200 -200 N -C 0 0 84 0 1 0 N -X ~ 1 200 0 118 L 10 40 1 1 W -ENDDRAW -ENDDEF -# # V_U400V # DEF V_U400V EV 0 10 N Y 1 F N F0 "EV" -160 120 40 H V C CNN F1 "V_U400V" -60 -140 40 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN DRAW -T 0 0 0 70 0 0 0 V Normal 1 C C +T 0 0 0 70 0 0 0 V Normal 0 C C P 2 0 0 0 200 -200 200 -200 N C 0 0 84 0 1 0 N X ~ 1 200 0 118 L 10 40 1 1 W @@ -449,6 +477,8 @@ ENDDEF DEF W_15KA EW 0 10 N Y 1 F N F0 "EW" -160 120 40 H V C CNN F1 "W_15KA" -50 -210 40 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN DRAW P 2 0 0 0 200 -200 200 -200 N S -120 60 120 -60 0 1 0 N @@ -467,6 +497,8 @@ ENDDEF DEF Y_ELC EY 0 10 N Y 1 F N F0 "EY" -10 120 40 H V C CNN F1 "Y_ELC" 60 -120 40 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN DRAW P 2 0 0 0 200 -200 200 -200 N P 3 0 0 0 -50 10 -50 -10 -50 -10 N diff --git a/demos/electric/electric.sch b/demos/electric/electric.sch index ea8edd51d5..d0308f0402 100644 --- a/demos/electric/electric.sch +++ b/demos/electric/electric.sch @@ -1,9 +1,15 @@ -EESchema Schematic File Version 1 -LIBS:power,elec-unifil,device,conn,regul,.\electric.cache -EELAYER 23 0 +EESchema Schematic File Version 2 +LIBS:power +LIBS:elec-unifil +LIBS:device +LIBS:conn +LIBS:regul +LIBS:electric-cache +EELAYER 24 0 EELAYER END -$Descr A4 11700 8267 -Sheet 2 2 +$Descr A4 11693 8268 +encoding utf-8 +Sheet 1 1 Title "Exemple librairie elec-unifil" Date "4 jan 2006" Rev "0.3" @@ -113,7 +119,7 @@ Wire Notes Line 5500 6000 5500 3150 Wire Notes Line 5500 3150 8100 3150 -Text Notes 4150 3000 0 60 ~ +Text Notes 4150 3000 0 60 ~ 0 AGBT Wire Notes Line 5350 1150 4750 1150 @@ -166,31 +172,34 @@ Wire Wire Line Wire Wire Line 850 3350 1200 3350 $Comp -L R_16A_30MA ER01 +L R_16A_30mA ER01 U 1 1 416242BF P 1450 2150 -F 0 "ER01" H 1400 2380 40 0000 C C -F 1 "R_16A_30MA" H 1450 1950 40 0000 C C -F 2 "Courbe D" H 1450 1900 30 0000 C C +F 0 "ER01" H 1400 2380 40 0000 C CNN +F 1 "R_16A_30mA" H 1450 1950 40 0000 C CNN +F 2 "Courbe D" H 1450 1900 30 0000 C CNN +F 3 "" H 1450 2150 60 0001 C CNN 1 1450 2150 1 0 0 -1 $EndComp Wire Wire Line 850 2750 1200 2750 $Comp -L C_3X2.5MM2 EC? +L C_3x2.5mm2 EC? U 1 1 41652EC2 P 2950 6950 -F 0 "EC?" H 2780 7080 40 0000 C C -F 1 "C_3X2.5MM2" H 2950 6850 40 0000 C C +F 0 "EC?" H 2780 7080 40 0000 C CNN +F 1 "C_3x2.5mm2" H 2950 6850 40 0000 C CNN +F 2 "" H 2950 6950 60 0001 C CNN +F 3 "" H 2950 6950 60 0001 C CNN 1 2950 6950 1 0 0 -1 $EndComp -Text Notes 4400 7650 0 60 ~ +Text Notes 4400 7650 0 60 ~ 0 Extérieur -Text Notes 3800 6260 0 60 ~ +Text Notes 3800 6260 0 60 ~ 0 Prises pièces à vivre -Text Notes 6860 5960 0 60 ~ +Text Notes 6860 5960 0 60 ~ 0 Cuisine & Lingerie Wire Notes Line 2150 6300 5250 6300 @@ -198,7 +207,6 @@ Wire Notes Line 5250 4100 2150 4100 Wire Notes Line 5250 6300 5250 4100 -Connection ~ 2050 7550 Connection ~ 2050 7300 Connection ~ 2050 6950 Connection ~ 2050 6600 @@ -238,7 +246,7 @@ Wire Wire Line 1950 3850 5400 3850 Wire Notes Line 5500 6000 8100 6000 -Text Notes 10150 6250 0 60 ~ +Text Notes 10150 6250 0 60 ~ 0 Prises Grange Wire Notes Line 8150 6300 8150 4200 @@ -264,27 +272,20 @@ $Comp L P_10A EP4 U 1 1 41652537 P 9450 5100 -F 0 "EP4" H 9600 5220 40 0000 C C -F 1 "P_10A" H 9640 5000 40 0000 C C -F 2 "TGBT" H 9280 5100 40 0000 C C +F 0 "EP4" H 9600 5220 40 0000 C CNN +F 1 "P_10A" H 9640 5000 40 0000 C CNN +F 2 "TGBT" H 9280 5100 40 0000 C CNN +F 3 "" H 9450 5100 60 0001 C CNN 1 9450 5100 -1 0 0 -1 $EndComp -Text Notes 10300 3950 0 60 ~ -permanentes -Text Notes 10450 4100 0 60 ~ -primaires -Text Notes 10350 3800 0 60 ~ -Servitudes -Text Notes 10300 2550 0 60 ~ -secondaires -Text Notes 10300 2400 0 60 ~ -permanentes -Text Notes 10350 2250 0 60 ~ -Servitudes -Text Notes 6050 2150 0 60 ~ +Text Notes 10450 4050 0 60 ~ 0 +Servitudes\npermanentes\nprimaires +Text Notes 10350 2500 0 60 ~ 0 +Servitudes\npermanentes\nsecondaires +Text Notes 6050 2150 0 60 ~ 0 Servitudes secourues protégées -Text Notes 6700 700 0 60 ~ +Text Notes 6700 700 0 60 ~ 0 Servitudes secourues Wire Notes Line 8150 4150 8150 2650 @@ -326,288 +327,351 @@ $Comp L D_06A ED30 U 1 1 41642C2F P 8550 2900 -F 0 "ED30" H 8390 3020 40 0000 C C -F 1 "D_06A" H 8450 2820 40 0000 C C -F 2 "Supervision" H 9780 2900 40 0000 C C +F 0 "ED30" H 8390 3020 40 0000 C CNN +F 1 "D_06A" H 8450 2820 40 0000 C CNN +F 2 "Supervision" H 9780 2900 40 0000 C CNN +F 3 "" H 8550 2900 60 0001 C CNN 1 8550 2900 1 0 0 -1 $EndComp $Comp -L C_3X6MM2 EC27 +L C_3x6mm2 EC27 U 1 1 4164215E P 6300 3350 -F 0 "EC27" H 6130 3480 40 0000 C C -F 1 "C_3X6MM2" H 6300 3250 40 0000 C C +F 0 "EC27" H 6130 3480 40 0000 C CNN +F 1 "C_3x6mm2" H 6300 3250 40 0000 C CNN +F 2 "" H 6300 3350 60 0001 C CNN +F 3 "" H 6300 3350 60 0001 C CNN 1 6300 3350 1 0 0 -1 $EndComp $Comp -L C_3X2.5MM2 EC? +L C_3x2.5mm2 EC? U 1 1 41642129 P 2950 6600 -F 0 "EC?" H 2780 6730 40 0000 C C -F 1 "C_3X2.5MM2" H 2950 6500 40 0000 C C +F 0 "EC?" H 2780 6730 40 0000 C CNN +F 1 "C_3x2.5mm2" H 2950 6500 40 0000 C CNN +F 2 "" H 2950 6600 60 0001 C CNN +F 3 "" H 2950 6600 60 0001 C CNN 1 2950 6600 1 0 0 -1 $EndComp $Comp -L C_3X2.5MM2 EC28 +L C_3x2.5mm2 EC28 U 1 1 4164211E P 2950 6100 -F 0 "EC28" H 2780 6230 40 0000 C C -F 1 "C_3X2.5MM2" H 2950 6000 40 0000 C C +F 0 "EC28" H 2780 6230 40 0000 C CNN +F 1 "C_3x2.5mm2" H 2950 6000 40 0000 C CNN +F 2 "" H 2950 6100 60 0001 C CNN +F 3 "" H 2950 6100 60 0001 C CNN 1 2950 6100 1 0 0 -1 $EndComp $Comp -L C_3X2.5MM2 EC22 +L C_3x2.5mm2 EC22 U 1 1 4164211C P 2950 5750 -F 0 "EC22" H 2780 5880 40 0000 C C -F 1 "C_3X2.5MM2" H 2950 5650 40 0000 C C +F 0 "EC22" H 2780 5880 40 0000 C CNN +F 1 "C_3x2.5mm2" H 2950 5650 40 0000 C CNN +F 2 "" H 2950 5750 60 0001 C CNN +F 3 "" H 2950 5750 60 0001 C CNN 1 2950 5750 1 0 0 -1 $EndComp $Comp -L C_3X2.5MM2 EC37 +L C_3x2.5mm2 EC37 U 1 1 41642119 P 2950 5400 -F 0 "EC37" H 2780 5530 40 0000 C C -F 1 "C_3X2.5MM2" H 2950 5300 40 0000 C C +F 0 "EC37" H 2780 5530 40 0000 C CNN +F 1 "C_3x2.5mm2" H 2950 5300 40 0000 C CNN +F 2 "" H 2950 5400 60 0001 C CNN +F 3 "" H 2950 5400 60 0001 C CNN 1 2950 5400 1 0 0 -1 $EndComp $Comp -L C_3X2.5MM2 EC33 +L C_3x2.5mm2 EC33 U 1 1 41642116 P 2950 5050 -F 0 "EC33" H 2780 5180 40 0000 C C -F 1 "C_3X2.5MM2" H 2950 4950 40 0000 C C +F 0 "EC33" H 2780 5180 40 0000 C CNN +F 1 "C_3x2.5mm2" H 2950 4950 40 0000 C CNN +F 2 "" H 2950 5050 60 0001 C CNN +F 3 "" H 2950 5050 60 0001 C CNN 1 2950 5050 1 0 0 -1 $EndComp $Comp -L C_3X2.5MM2 EC21 +L C_3x2.5mm2 EC21 U 1 1 41642114 P 2950 4700 -F 0 "EC21" H 2780 4830 40 0000 C C -F 1 "C_3X2.5MM2" H 2950 4600 40 0000 C C +F 0 "EC21" H 2780 4830 40 0000 C CNN +F 1 "C_3x2.5mm2" H 2950 4600 40 0000 C CNN +F 2 "" H 2950 4700 60 0001 C CNN +F 3 "" H 2950 4700 60 0001 C CNN 1 2950 4700 1 0 0 -1 $EndComp $Comp -L C_3X2.5MM2 EC20 +L C_3x2.5mm2 EC20 U 1 1 41642111 P 2950 4350 -F 0 "EC20" H 2780 4480 40 0000 C C -F 1 "C_3X2.5MM2" H 2950 4250 40 0000 C C +F 0 "EC20" H 2780 4480 40 0000 C CNN +F 1 "C_3x2.5mm2" H 2950 4250 40 0000 C CNN +F 2 "" H 2950 4350 60 0001 C CNN +F 3 "" H 2950 4350 60 0001 C CNN 1 2950 4350 1 0 0 -1 $EndComp $Comp -L C_3X2.5MM2 EC32 +L C_3x2.5mm2 EC32 U 1 1 41642105 P 6300 5800 -F 0 "EC32" H 6130 5930 40 0000 C C -F 1 "C_3X2.5MM2" H 6300 5700 40 0000 C C +F 0 "EC32" H 6130 5930 40 0000 C CNN +F 1 "C_3x2.5mm2" H 6300 5700 40 0000 C CNN +F 2 "" H 6300 5800 60 0001 C CNN +F 3 "" H 6300 5800 60 0001 C CNN 1 6300 5800 1 0 0 -1 $EndComp $Comp -L C_3X2.5MM2 EC29 +L C_3x2.5mm2 EC29 U 1 1 41642102 P 6300 5450 -F 0 "EC29" H 6130 5580 40 0000 C C -F 1 "C_3X2.5MM2" H 6300 5350 40 0000 C C +F 0 "EC29" H 6130 5580 40 0000 C CNN +F 1 "C_3x2.5mm2" H 6300 5350 40 0000 C CNN +F 2 "" H 6300 5450 60 0001 C CNN +F 3 "" H 6300 5450 60 0001 C CNN 1 6300 5450 1 0 0 -1 $EndComp $Comp -L C_3X2.5MM2 EC30 +L C_3x2.5mm2 EC30 U 1 1 416420FE P 6300 5100 -F 0 "EC30" H 6130 5230 40 0000 C C -F 1 "C_3X2.5MM2" H 6300 5000 40 0000 C C +F 0 "EC30" H 6130 5230 40 0000 C CNN +F 1 "C_3x2.5mm2" H 6300 5000 40 0000 C CNN +F 2 "" H 6300 5100 60 0001 C CNN +F 3 "" H 6300 5100 60 0001 C CNN 1 6300 5100 1 0 0 -1 $EndComp $Comp -L C_3X2.5MM2 EC23 +L C_3x2.5mm2 EC23 U 1 1 416420FB P 6300 4750 -F 0 "EC23" H 6130 4880 40 0000 C C -F 1 "C_3X2.5MM2" H 6300 4650 40 0000 C C +F 0 "EC23" H 6130 4880 40 0000 C CNN +F 1 "C_3x2.5mm2" H 6300 4650 40 0000 C CNN +F 2 "" H 6300 4750 60 0001 C CNN +F 3 "" H 6300 4750 60 0001 C CNN 1 6300 4750 1 0 0 -1 $EndComp $Comp -L C_3X2.5MM2 EC26 +L C_3x2.5mm2 EC26 U 1 1 416420F8 P 6300 4400 -F 0 "EC26" H 6130 4530 40 0000 C C -F 1 "C_3X2.5MM2" H 6300 4300 40 0000 C C +F 0 "EC26" H 6130 4530 40 0000 C CNN +F 1 "C_3x2.5mm2" H 6300 4300 40 0000 C CNN +F 2 "" H 6300 4400 60 0001 C CNN +F 3 "" H 6300 4400 60 0001 C CNN 1 6300 4400 1 0 0 -1 $EndComp $Comp -L C_3X2.5MM2 EC25 +L C_3x2.5mm2 EC25 U 1 1 416420F5 P 6300 4050 -F 0 "EC25" H 6130 4180 40 0000 C C -F 1 "C_3X2.5MM2" H 6300 3950 40 0000 C C +F 0 "EC25" H 6130 4180 40 0000 C CNN +F 1 "C_3x2.5mm2" H 6300 3950 40 0000 C CNN +F 2 "" H 6300 4050 60 0001 C CNN +F 3 "" H 6300 4050 60 0001 C CNN 1 6300 4050 1 0 0 -1 $EndComp $Comp -L C_3X2.5MM2 EC24 +L C_3x2.5mm2 EC24 U 1 1 416420F1 P 6300 3700 -F 0 "EC24" H 6130 3830 40 0000 C C -F 1 "C_3X2.5MM2" H 6300 3600 40 0000 C C +F 0 "EC24" H 6130 3830 40 0000 C CNN +F 1 "C_3x2.5mm2" H 6300 3600 40 0000 C CNN +F 2 "" H 6300 3700 60 0001 C CNN +F 3 "" H 6300 3700 60 0001 C CNN 1 6300 3700 1 0 0 -1 $EndComp $Comp -L C_3X2.5MM2 EC39 +L C_3x2.5mm2 EC39 U 1 1 416420E1 P 8950 6100 -F 0 "EC39" H 8780 6230 40 0000 C C -F 1 "C_3X2.5MM2" H 8950 6000 40 0000 C C +F 0 "EC39" H 8780 6230 40 0000 C CNN +F 1 "C_3x2.5mm2" H 8950 6000 40 0000 C CNN +F 2 "" H 8950 6100 60 0001 C CNN +F 3 "" H 8950 6100 60 0001 C CNN 1 8950 6100 1 0 0 -1 $EndComp $Comp -L C_3X2.5MM2 EC38 +L C_3x2.5mm2 EC38 U 1 1 416420DF P 8950 5750 -F 0 "EC38" H 8780 5880 40 0000 C C -F 1 "C_3X2.5MM2" H 8950 5650 40 0000 C C +F 0 "EC38" H 8780 5880 40 0000 C CNN +F 1 "C_3x2.5mm2" H 8950 5650 40 0000 C CNN +F 2 "" H 8950 5750 60 0001 C CNN +F 3 "" H 8950 5750 60 0001 C CNN 1 8950 5750 1 0 0 -1 $EndComp $Comp -L C_3X2.5MM2 EC35 +L C_3x2.5mm2 EC35 U 1 1 416420DC P 8950 5400 -F 0 "EC35" H 8900 5560 40 0000 C C -F 1 "C_3X2.5MM2" H 8950 5300 40 0000 C C +F 0 "EC35" H 8900 5560 40 0000 C CNN +F 1 "C_3x2.5mm2" H 8950 5300 40 0000 C CNN +F 2 "" H 8950 5400 60 0001 C CNN +F 3 "" H 8950 5400 60 0001 C CNN 1 8950 5400 1 0 0 -1 $EndComp $Comp -L C_3X2.5MM2 EC36 +L C_3x2.5mm2 EC36 U 1 1 416420D9 P 8950 4800 -F 0 "EC36" H 8780 4930 40 0000 C C -F 1 "C_3X2.5MM2" H 8950 4700 40 0000 C C +F 0 "EC36" H 8780 4930 40 0000 C CNN +F 1 "C_3x2.5mm2" H 8950 4700 40 0000 C CNN +F 2 "" H 8950 4800 60 0001 C CNN +F 3 "" H 8950 4800 60 0001 C CNN 1 8950 4800 1 0 0 -1 $EndComp $Comp -L C_3X2.5MM2 EC34 +L C_3x2.5mm2 EC34 U 1 1 416420D1 P 8950 4450 -F 0 "EC34" H 8780 4580 40 0000 C C -F 1 "C_3X2.5MM2" H 8950 4350 40 0000 C C +F 0 "EC34" H 8780 4580 40 0000 C CNN +F 1 "C_3x2.5mm2" H 8950 4350 40 0000 C CNN +F 2 "" H 8950 4450 60 0001 C CNN +F 3 "" H 8950 4450 60 0001 C CNN 1 8950 4450 1 0 0 -1 $EndComp $Comp -L C_3X1.5MM2 EC44 +L C_3x1.5mm2 EC44 U 1 1 416420B8 P 8950 3950 -F 0 "EC44" H 8780 4080 40 0000 C C -F 1 "C_3X1.5MM2" H 8950 3850 40 0000 C C +F 0 "EC44" H 8780 4080 40 0000 C CNN +F 1 "C_3x1.5mm2" H 8950 3850 40 0000 C CNN +F 2 "" H 8950 3950 60 0001 C CNN +F 3 "" H 8950 3950 60 0001 C CNN 1 8950 3950 1 0 0 -1 $EndComp $Comp -L C_3X1.5MM2 EC19 +L C_3x1.5mm2 EC19 U 1 1 416420B5 P 8950 2900 -F 0 "EC19" H 8780 3030 40 0000 C C -F 1 "C_3X1.5MM2" H 8950 2800 40 0000 C C +F 0 "EC19" H 8780 3030 40 0000 C CNN +F 1 "C_3x1.5mm2" H 8950 2800 40 0000 C CNN +F 2 "" H 8950 2900 60 0001 C CNN +F 3 "" H 8950 2900 60 0001 C CNN 1 8950 2900 1 0 0 -1 $EndComp $Comp -L C_3X1.5MM2 EC43 +L C_3x1.5mm2 EC43 U 1 1 416420B2 P 8950 3600 -F 0 "EC43" H 8780 3730 40 0000 C C -F 1 "C_3X1.5MM2" H 8950 3500 40 0000 C C +F 0 "EC43" H 8780 3730 40 0000 C CNN +F 1 "C_3x1.5mm2" H 8950 3500 40 0000 C CNN +F 2 "" H 8950 3600 60 0001 C CNN +F 3 "" H 8950 3600 60 0001 C CNN 1 8950 3600 1 0 0 -1 $EndComp $Comp -L C_3X1.5MM2 EC42 +L C_3x1.5mm2 EC42 U 1 1 416420A7 P 8950 2400 -F 0 "EC42" H 8780 2530 40 0000 C C -F 1 "C_3X1.5MM2" H 8950 2300 40 0000 C C +F 0 "EC42" H 8780 2530 40 0000 C CNN +F 1 "C_3x1.5mm2" H 8950 2300 40 0000 C CNN +F 2 "" H 8950 2400 60 0001 C CNN +F 3 "" H 8950 2400 60 0001 C CNN 1 8950 2400 1 0 0 -1 $EndComp $Comp -L C_3X1.5MM2 EC16 +L C_3x1.5mm2 EC16 U 1 1 416420A1 P 8950 2050 -F 0 "EC16" H 8780 2180 40 0000 C C -F 1 "C_3X1.5MM2" H 8950 1950 40 0000 C C +F 0 "EC16" H 8780 2180 40 0000 C CNN +F 1 "C_3x1.5mm2" H 8950 1950 40 0000 C CNN +F 2 "" H 8950 2050 60 0001 C CNN +F 3 "" H 8950 2050 60 0001 C CNN 1 8950 2050 1 0 0 -1 $EndComp $Comp -L C_3X1.5MM2 EC15 +L C_3x1.5mm2 EC15 U 1 1 41642099 P 8950 1700 -F 0 "EC15" H 8780 1830 40 0000 C C -F 1 "C_3X1.5MM2" H 8950 1600 40 0000 C C +F 0 "EC15" H 8780 1830 40 0000 C CNN +F 1 "C_3x1.5mm2" H 8950 1600 40 0000 C CNN +F 2 "" H 8950 1700 60 0001 C CNN +F 3 "" H 8950 1700 60 0001 C CNN 1 8950 1700 1 0 0 -1 $EndComp $Comp -L C_3X1.5MM2 EC14 +L C_3x1.5mm2 EC14 U 1 1 41642094 P 8950 1350 -F 0 "EC14" H 8780 1480 40 0000 C C -F 1 "C_3X1.5MM2" H 8950 1250 40 0000 C C +F 0 "EC14" H 8780 1480 40 0000 C CNN +F 1 "C_3x1.5mm2" H 8950 1250 40 0000 C CNN +F 2 "" H 8950 1350 60 0001 C CNN +F 3 "" H 8950 1350 60 0001 C CNN 1 8950 1350 1 0 0 -1 $EndComp $Comp -L C_3X1.5MM2 EC13 +L C_3x1.5mm2 EC13 U 1 1 41642090 P 8950 1000 -F 0 "EC13" H 8780 1130 40 0000 C C -F 1 "C_3X1.5MM2" H 8950 900 40 0000 C C +F 0 "EC13" H 8780 1130 40 0000 C CNN +F 1 "C_3x1.5mm2" H 8950 900 40 0000 C CNN +F 2 "" H 8950 1000 60 0001 C CNN +F 3 "" H 8950 1000 60 0001 C CNN 1 8950 1000 1 0 0 -1 $EndComp $Comp -L C_3X1.5MM2 EC18 +L C_3x1.5mm2 EC18 U 1 1 41642083 P 6300 1900 -F 0 "EC18" H 6130 2030 40 0000 C C -F 1 "C_3X1.5MM2" H 6300 1800 40 0000 C C +F 0 "EC18" H 6130 2030 40 0000 C CNN +F 1 "C_3x1.5mm2" H 6300 1800 40 0000 C CNN +F 2 "" H 6300 1900 60 0001 C CNN +F 3 "" H 6300 1900 60 0001 C CNN 1 6300 1900 1 0 0 -1 $EndComp $Comp -L C_3X1.5MM2 EC31 +L C_3x1.5mm2 EC31 U 1 1 41642074 P 6300 1500 -F 0 "EC31" H 6130 1630 40 0000 C C -F 1 "C_3X1.5MM2" H 6300 1400 40 0000 C C +F 0 "EC31" H 6130 1630 40 0000 C CNN +F 1 "C_3x1.5mm2" H 6300 1400 40 0000 C CNN +F 2 "" H 6300 1500 60 0001 C CNN +F 3 "" H 6300 1500 60 0001 C CNN 1 6300 1500 1 0 0 -1 $EndComp $Comp -L C_3X1.5MM2 EC17 +L C_3x1.5mm2 EC17 U 1 1 4164206D P 6300 1150 -F 0 "EC17" H 6130 1280 40 0000 C C -F 1 "C_3X1.5MM2" H 6300 1050 40 0000 C C +F 0 "EC17" H 6130 1280 40 0000 C CNN +F 1 "C_3x1.5mm2" H 6300 1050 40 0000 C CNN +F 2 "" H 6300 1150 60 0001 C CNN +F 3 "" H 6300 1150 60 0001 C CNN 1 6300 1150 1 0 0 -1 $EndComp @@ -615,90 +679,96 @@ $Comp L I_25A_LUM EI11 U 1 1 4163DF39 P 9350 650 -F 0 "EI11" H 9190 770 40 0000 C C -F 1 "I_25A_LUM" H 9500 550 40 0000 C C +F 0 "EI11" H 9190 770 40 0000 C CNN +F 1 "I_25A_LUM" H 9500 550 40 0000 C CNN +F 2 "" H 9350 650 60 0001 C CNN +F 3 "" H 9350 650 60 0001 C CNN 1 9350 650 1 0 0 -1 $EndComp -Text GLabel 9150 6100 2 60 Output +Text HLabel 9150 6100 2 60 Output ~ 0 EC39 -Text GLabel 9150 5750 2 60 Output +Text HLabel 9150 5750 2 60 Output ~ 0 EC38 -Text GLabel 9150 5400 2 60 Output +Text HLabel 9150 5400 2 60 Output ~ 0 EC35 -Text GLabel 9150 4800 2 60 Output +Text HLabel 9150 4800 2 60 Output ~ 0 EC36 -Text GLabel 9150 4450 2 60 Output +Text HLabel 9150 4450 2 60 Output ~ 0 EC34 -Text GLabel 3150 6100 2 60 Output +Text HLabel 3150 6100 2 60 Output ~ 0 EC28 -Text GLabel 3150 5750 2 60 Output +Text HLabel 3150 5750 2 60 Output ~ 0 EC22 -Text GLabel 3150 5400 2 60 Output +Text HLabel 3150 5400 2 60 Output ~ 0 EC37 -Text GLabel 3150 5050 2 60 Output +Text HLabel 3150 5050 2 60 Output ~ 0 EC33 -Text GLabel 3150 4700 2 60 Output +Text HLabel 3150 4700 2 60 Output ~ 0 EC21 -Text GLabel 3150 4350 2 60 Output +Text HLabel 3150 4350 2 60 Output ~ 0 EC20 -Text GLabel 6500 5800 2 60 Output +Text HLabel 6500 5800 2 60 Output ~ 0 EC32 -Text GLabel 6500 5450 2 60 Output +Text HLabel 6500 5450 2 60 Output ~ 0 EC29 -Text GLabel 6500 5100 2 60 Output +Text HLabel 6500 5100 2 60 Output ~ 0 EC30 -Text GLabel 6500 4750 2 60 Output +Text HLabel 6500 4750 2 60 Output ~ 0 EC23 -Text GLabel 6500 4400 2 60 Output +Text HLabel 6500 4400 2 60 Output ~ 0 EC26 -Text GLabel 6500 4050 2 60 Output +Text HLabel 6500 4050 2 60 Output ~ 0 EC25 -Text GLabel 6500 3700 2 60 Output +Text HLabel 6500 3700 2 60 Output ~ 0 EC24 -Text GLabel 6500 3350 2 60 Output +Text HLabel 6500 3350 2 60 Output ~ 0 EC27 -Text GLabel 9150 3950 2 60 Output +Text HLabel 9150 3950 2 60 Output ~ 0 EC44 -Text GLabel 9150 3600 2 60 Output +Text HLabel 9150 3600 2 60 Output ~ 0 EC43 -Text GLabel 9150 3250 2 60 Output +Text HLabel 9150 3250 2 60 Output ~ 0 EC41 -Text GLabel 9150 2900 2 60 Output +Text HLabel 9150 2900 2 60 Output ~ 0 EC19 -Text GLabel 9150 2400 2 60 Output +Text HLabel 9150 2400 2 60 Output ~ 0 EC42 -Text GLabel 9150 2050 2 60 Output +Text HLabel 9150 2050 2 60 Output ~ 0 EC16 -Text GLabel 9150 1700 2 60 Output +Text HLabel 9150 1700 2 60 Output ~ 0 EC15 -Text GLabel 9150 1350 2 60 Output +Text HLabel 9150 1350 2 60 Output ~ 0 EC14 -Text GLabel 9150 1000 2 60 Output +Text HLabel 9150 1000 2 60 Output ~ 0 EC13 -Text GLabel 9550 650 2 60 Output +Text HLabel 9550 650 2 60 Output ~ 0 EC11 -Text GLabel 6500 1900 2 60 Output +Text HLabel 6500 1900 2 60 Output ~ 0 EC18 -Text GLabel 6500 1500 2 60 Output +Text HLabel 6500 1500 2 60 Output ~ 0 EC31 -Text GLabel 6500 1150 2 60 Output +Text HLabel 6500 1150 2 60 Output ~ 0 EC17 $Comp -L C_3X1.5MM2 EC41 +L C_3x1.5mm2 EC41 U 1 1 4163D7A2 P 8950 3250 -F 0 "EC41" H 8780 3380 40 0000 C C -F 1 "C_3X1.5MM2" H 8950 3150 40 0000 C C +F 0 "EC41" H 8780 3380 40 0000 C CNN +F 1 "C_3x1.5mm2" H 8950 3150 40 0000 C CNN +F 2 "" H 8950 3250 60 0001 C CNN +F 3 "" H 8950 3250 60 0001 C CNN 1 8950 3250 1 0 0 -1 $EndComp $Comp -L C_3X1.5MM2 EC11 +L C_3x1.5mm2 EC11 U 1 1 4163D79F P 8950 650 -F 0 "EC11" H 8780 780 40 0000 C C -F 1 "C_3X1.5MM2" H 8950 550 40 0000 C C +F 0 "EC11" H 8780 780 40 0000 C CNN +F 1 "C_3x1.5mm2" H 8950 550 40 0000 C CNN +F 2 "" H 8950 650 60 0001 C CNN +F 3 "" H 8950 650 60 0001 C CNN 1 8950 650 1 0 0 -1 $EndComp @@ -728,14 +798,16 @@ Wire Wire Line 8250 1700 8250 2050 Wire Wire Line 8250 2050 8250 2400 -Text GLabel 6500 800 2 60 Output +Text HLabel 6500 800 2 60 Output ~ 0 EC12 $Comp -L C_3X1.5MM2 EC12 +L C_3x1.5mm2 EC12 U 1 1 4163D458 P 6300 800 -F 0 "EC12" H 6150 900 40 0000 C C -F 1 "C_3X1.5MM2" H 6300 700 40 0000 C C +F 0 "EC12" H 6150 900 40 0000 C CNN +F 1 "C_3x1.5mm2" H 6300 700 40 0000 C CNN +F 2 "" H 6300 800 60 0001 C CNN +F 3 "" H 6300 800 60 0001 C CNN 1 6300 800 1 0 0 -1 $EndComp @@ -791,8 +863,10 @@ $Comp L D_10A ED73 U 1 1 4162F22A P 2550 7550 -F 0 "ED73" H 2390 7670 40 0000 C C -F 1 "D_10A" H 2450 7470 40 0000 C C +F 0 "ED73" H 2390 7670 40 0000 C CNN +F 1 "D_10A" H 2450 7470 40 0000 C CNN +F 2 "" H 2550 7550 60 0001 C CNN +F 3 "" H 2550 7550 60 0001 C CNN 1 2550 7550 1 0 0 -1 $EndComp @@ -800,8 +874,10 @@ $Comp L D_10A ED72 U 1 1 4162F1F7 P 2550 7300 -F 0 "ED72" H 2390 7420 40 0000 C C -F 1 "D_10A" H 2450 7220 40 0000 C C +F 0 "ED72" H 2390 7420 40 0000 C CNN +F 1 "D_10A" H 2450 7220 40 0000 C CNN +F 2 "" H 2550 7300 60 0001 C CNN +F 3 "" H 2550 7300 60 0001 C CNN 1 2550 7300 1 0 0 -1 $EndComp @@ -809,9 +885,10 @@ $Comp L D_10A ED71 U 1 1 4162F1F0 P 2550 6950 -F 0 "ED71" H 2390 7070 40 0000 C C -F 1 "D_10A" H 2450 6870 40 0000 C C -F 2 "Abri pré Mouillière proche" H 4160 6980 40 0000 C C +F 0 "ED71" H 2390 7070 40 0000 C CNN +F 1 "D_10A" H 2450 6870 40 0000 C CNN +F 2 "Abri pré Mouillière proche" H 4160 6980 40 0000 C CNN +F 3 "" H 2550 6950 60 0001 C CNN 1 2550 6950 1 0 0 -1 $EndComp @@ -819,9 +896,10 @@ $Comp L D_10A ED70 U 1 1 4162F1CA P 2550 6600 -F 0 "ED70" H 2390 6720 40 0000 C C -F 1 "D_10A" H 2450 6520 40 0000 C C -F 2 "Abri coté route" H 3920 6600 40 0000 C C +F 0 "ED70" H 2390 6720 40 0000 C CNN +F 1 "D_10A" H 2450 6520 40 0000 C CNN +F 2 "Abri coté route" H 3920 6600 40 0000 C CNN +F 3 "" H 2550 6600 60 0001 C CNN 1 2550 6600 1 0 0 -1 $EndComp @@ -829,9 +907,10 @@ $Comp L D_16A ED55 U 1 1 4162F8B1 P 2550 6100 -F 0 "ED55" H 2390 6220 40 0000 C C -F 1 "D_16A" H 2450 6020 40 0000 C C -F 2 "Entrée et salle de bain" H 4080 6100 40 0000 C C +F 0 "ED55" H 2390 6220 40 0000 C CNN +F 1 "D_16A" H 2450 6020 40 0000 C CNN +F 2 "Entrée et salle de bain" H 4080 6100 40 0000 C CNN +F 3 "" H 2550 6100 60 0001 C CNN 1 2550 6100 1 0 0 -1 $EndComp @@ -839,9 +918,10 @@ $Comp L D_16A ED54 U 1 1 4162F875 P 2550 5750 -F 0 "ED54" H 2390 5870 40 0000 C C -F 1 "D_16A" H 2450 5670 40 0000 C C -F 2 "Séjour et sam" H 3860 5740 40 0000 C C +F 0 "ED54" H 2390 5870 40 0000 C CNN +F 1 "D_16A" H 2450 5670 40 0000 C CNN +F 2 "Séjour et sam" H 3860 5740 40 0000 C CNN +F 3 "" H 2550 5750 60 0001 C CNN 1 2550 5750 1 0 0 -1 $EndComp @@ -849,9 +929,10 @@ $Comp L D_16A ED53 U 1 1 4162F862 P 2550 5400 -F 0 "ED53" H 2390 5520 40 0000 C C -F 1 "D_16A" H 2450 5320 40 0000 C C -F 2 "Bureau" H 3700 5400 40 0000 C C +F 0 "ED53" H 2390 5520 40 0000 C CNN +F 1 "D_16A" H 2450 5320 40 0000 C CNN +F 2 "Bureau" H 3700 5400 40 0000 C CNN +F 3 "" H 2550 5400 60 0001 C CNN 1 2550 5400 1 0 0 -1 $EndComp @@ -859,9 +940,10 @@ $Comp L D_16A ED52 U 1 1 4162F856 P 2550 5050 -F 0 "ED52" H 2390 5170 40 0000 C C -F 1 "D_16A" H 2450 4970 40 0000 C C -F 2 "Chambre 3" H 3760 5040 40 0000 C C +F 0 "ED52" H 2390 5170 40 0000 C CNN +F 1 "D_16A" H 2450 4970 40 0000 C CNN +F 2 "Chambre 3" H 3760 5040 40 0000 C CNN +F 3 "" H 2550 5050 60 0001 C CNN 1 2550 5050 1 0 0 -1 $EndComp @@ -869,9 +951,10 @@ $Comp L D_16A ED51 U 1 1 4162F84D P 2550 4700 -F 0 "ED51" H 2390 4820 40 0000 C C -F 1 "D_16A" H 2450 4620 40 0000 C C -F 2 "Chambre 2" H 3760 4700 40 0000 C C +F 0 "ED51" H 2390 4820 40 0000 C CNN +F 1 "D_16A" H 2450 4620 40 0000 C CNN +F 2 "Chambre 2" H 3760 4700 40 0000 C CNN +F 3 "" H 2550 4700 60 0001 C CNN 1 2550 4700 1 0 0 -1 $EndComp @@ -879,9 +962,10 @@ $Comp L D_16A ED50 U 1 1 4162F848 P 2550 4350 -F 0 "ED50" H 2390 4470 40 0000 C C -F 1 "D_16A" H 2450 4270 40 0000 C C -F 2 "Chambre 1" H 3760 4340 40 0000 C C +F 0 "ED50" H 2390 4470 40 0000 C CNN +F 1 "D_16A" H 2450 4270 40 0000 C CNN +F 2 "Chambre 1" H 3760 4340 40 0000 C CNN +F 3 "" H 2550 4350 60 0001 C CNN 1 2550 4350 1 0 0 -1 $EndComp @@ -889,9 +973,10 @@ $Comp L D_16A ED64 U 1 1 4162F875 P 8550 6100 -F 0 "ED64" H 8390 6220 40 0000 C C -F 1 "D_16A" H 8450 6020 40 0000 C C -F 2 "Etage coté atelier" H 9940 6100 40 0000 C C +F 0 "ED64" H 8390 6220 40 0000 C CNN +F 1 "D_16A" H 8450 6020 40 0000 C CNN +F 2 "Etage coté atelier" H 9940 6100 40 0000 C CNN +F 3 "" H 8550 6100 60 0001 C CNN 1 8550 6100 1 0 0 -1 $EndComp @@ -899,9 +984,10 @@ $Comp L D_16A ED63 U 1 1 4162F862 P 8550 5750 -F 0 "ED63" H 8390 5870 40 0000 C C -F 1 "D_16A" H 8450 5670 40 0000 C C -F 2 "Etage coté sellerie" H 9960 5740 40 0000 C C +F 0 "ED63" H 8390 5870 40 0000 C CNN +F 1 "D_16A" H 8450 5670 40 0000 C CNN +F 2 "Etage coté sellerie" H 9960 5740 40 0000 C CNN +F 3 "" H 8550 5750 60 0001 C CNN 1 8550 5750 1 0 0 -1 $EndComp @@ -909,9 +995,10 @@ $Comp L D_16A ED62 U 1 1 4162F856 P 8550 5400 -F 0 "ED62" H 8390 5520 40 0000 C C -F 1 "D_16A" H 8450 5320 40 0000 C C -F 2 "Local technique" H 9880 5400 40 0000 C C +F 0 "ED62" H 8390 5520 40 0000 C CNN +F 1 "D_16A" H 8450 5320 40 0000 C CNN +F 2 "Local technique" H 9880 5400 40 0000 C CNN +F 3 "" H 8550 5400 60 0001 C CNN 1 8550 5400 1 0 0 -1 $EndComp @@ -919,9 +1006,10 @@ $Comp L D_16A ED61 U 1 1 4162F84D P 8550 4800 -F 0 "ED61" H 8390 4920 40 0000 C C -F 1 "D_16A" H 8450 4720 40 0000 C C -F 2 "Sellerie" H 9720 4800 40 0000 C C +F 0 "ED61" H 8390 4920 40 0000 C CNN +F 1 "D_16A" H 8450 4720 40 0000 C CNN +F 2 "Sellerie" H 9720 4800 40 0000 C CNN +F 3 "" H 8550 4800 60 0001 C CNN 1 8550 4800 1 0 0 -1 $EndComp @@ -929,9 +1017,10 @@ $Comp L D_16A ED60 U 1 1 4162F848 P 8550 4450 -F 0 "ED60" H 8390 4570 40 0000 C C -F 1 "D_16A" H 8450 4370 40 0000 C C -F 2 "Atelier" H 9700 4450 40 0000 C C +F 0 "ED60" H 8390 4570 40 0000 C CNN +F 1 "D_16A" H 8450 4370 40 0000 C CNN +F 2 "Atelier" H 9700 4450 40 0000 C CNN +F 3 "" H 8550 4450 60 0001 C CNN 1 8550 4450 1 0 0 -1 $EndComp @@ -978,9 +1067,10 @@ $Comp L D_10A ED47 U 1 1 4162F76B P 5900 5800 -F 0 "ED47" H 5740 5920 40 0000 C C -F 1 "D_10A" H 5800 5720 40 0000 C C -F 2 "Prises lingerie" H 7240 5800 40 0000 C C +F 0 "ED47" H 5740 5920 40 0000 C CNN +F 1 "D_10A" H 5800 5720 40 0000 C CNN +F 2 "Prises lingerie" H 7240 5800 40 0000 C CNN +F 3 "" H 5900 5800 60 0001 C CNN 1 5900 5800 1 0 0 -1 $EndComp @@ -988,9 +1078,10 @@ $Comp L D_16A ED46 U 1 1 4162F75D P 5900 5450 -F 0 "ED46" H 5740 5570 40 0000 C C -F 1 "D_16A" H 5800 5370 40 0000 C C -F 2 "Séchoir" H 7060 5440 40 0000 C C +F 0 "ED46" H 5740 5570 40 0000 C CNN +F 1 "D_16A" H 5800 5370 40 0000 C CNN +F 2 "Séchoir" H 7060 5440 40 0000 C CNN +F 3 "" H 5900 5450 60 0001 C CNN 1 5900 5450 1 0 0 -1 $EndComp @@ -998,9 +1089,10 @@ $Comp L D_16A ED45 U 1 1 4162F74E P 5900 5100 -F 0 "ED45" H 5740 5220 40 0000 C C -F 1 "D_16A" H 5800 5020 40 0000 C C -F 2 "Lave linge" H 7120 5100 40 0000 C C +F 0 "ED45" H 5740 5220 40 0000 C CNN +F 1 "D_16A" H 5800 5020 40 0000 C CNN +F 2 "Lave linge" H 7120 5100 40 0000 C CNN +F 3 "" H 5900 5100 60 0001 C CNN 1 5900 5100 1 0 0 -1 $EndComp @@ -1008,9 +1100,10 @@ $Comp L D_10A ED44 U 1 1 4162F745 P 5900 4750 -F 0 "ED44" H 5740 4870 40 0000 C C -F 1 "D_10A" H 5800 4670 40 0000 C C -F 2 "Prises cuisine" H 7200 4740 40 0000 C C +F 0 "ED44" H 5740 4870 40 0000 C CNN +F 1 "D_10A" H 5800 4670 40 0000 C CNN +F 2 "Prises cuisine" H 7200 4740 40 0000 C CNN +F 3 "" H 5900 4750 60 0001 C CNN 1 5900 4750 1 0 0 -1 $EndComp @@ -1018,9 +1111,10 @@ $Comp L D_10A ED43 U 1 1 4162F739 P 5900 4400 -F 0 "ED43" H 5740 4520 40 0000 C C -F 1 "D_10A" H 5800 4320 40 0000 C C -F 2 "Micro-ondes et hotte" H 7340 4400 40 0000 C C +F 0 "ED43" H 5740 4520 40 0000 C CNN +F 1 "D_10A" H 5800 4320 40 0000 C CNN +F 2 "Micro-ondes et hotte" H 7340 4400 40 0000 C CNN +F 3 "" H 5900 4400 60 0001 C CNN 1 5900 4400 1 0 0 -1 $EndComp @@ -1028,9 +1122,10 @@ $Comp L D_16A ED42 U 1 1 4162F729 P 5900 4050 -F 0 "ED42" H 5740 4170 40 0000 C C -F 1 "D_16A" H 5800 3970 40 0000 C C -F 2 "Four" H 6980 4040 40 0000 C C +F 0 "ED42" H 5740 4170 40 0000 C CNN +F 1 "D_16A" H 5800 3970 40 0000 C CNN +F 2 "Four" H 6980 4040 40 0000 C CNN +F 3 "" H 5900 4050 60 0001 C CNN 1 5900 4050 1 0 0 -1 $EndComp @@ -1038,9 +1133,10 @@ $Comp L D_16A ED41 U 1 1 4162F71F P 5900 3700 -F 0 "ED41" H 5740 3820 40 0000 C C -F 1 "D_16A" H 5800 3620 40 0000 C C -F 2 "Lave vaisselle" H 7200 3700 40 0000 C C +F 0 "ED41" H 5740 3820 40 0000 C CNN +F 1 "D_16A" H 5800 3620 40 0000 C CNN +F 2 "Lave vaisselle" H 7200 3700 40 0000 C CNN +F 3 "" H 5900 3700 60 0001 C CNN 1 5900 3700 1 0 0 -1 $EndComp @@ -1048,9 +1144,10 @@ $Comp L D_32A ED40 U 1 1 4162F6F8 P 5900 3350 -F 0 "ED40" H 5740 3470 40 0000 C C -F 1 "D_32A" H 5800 3270 40 0000 C C -F 2 "Plaque électrique" H 7260 3340 40 0000 C C +F 0 "ED40" H 5740 3470 40 0000 C CNN +F 1 "D_32A" H 5800 3270 40 0000 C CNN +F 2 "Plaque électrique" H 7260 3340 40 0000 C CNN +F 3 "" H 5900 3350 60 0001 C CNN 1 5900 3350 1 0 0 -1 $EndComp @@ -1058,9 +1155,10 @@ $Comp L D_06A ED32 U 1 1 4162F2EE P 8550 3600 -F 0 "ED32" H 8390 3720 40 0000 C C -F 1 "D_06A" H 8450 3520 40 0000 C C -F 2 "Traitement de l'eau" H 9960 3600 40 0000 C C +F 0 "ED32" H 8390 3720 40 0000 C CNN +F 1 "D_06A" H 8450 3520 40 0000 C CNN +F 2 "Traitement de l'eau" H 9960 3600 40 0000 C CNN +F 3 "" H 8550 3600 60 0001 C CNN 1 8550 3600 1 0 0 -1 $EndComp @@ -1068,9 +1166,10 @@ $Comp L D_06A ED33 U 1 1 4162F2D8 P 8550 3950 -F 0 "ED33" H 8390 4070 40 0000 C C -F 1 "D_06A" H 8450 3870 40 0000 C C -F 2 "Silveloxs, volets" H 9920 3940 40 0000 C C +F 0 "ED33" H 8390 4070 40 0000 C CNN +F 1 "D_06A" H 8450 3870 40 0000 C CNN +F 2 "Silveloxs, volets" H 9920 3940 40 0000 C CNN +F 3 "" H 8550 3950 60 0001 C CNN 1 8550 3950 1 0 0 -1 $EndComp @@ -1109,9 +1208,10 @@ $Comp L D_06A ED15 U 1 1 4162F301 P 8550 2050 -F 0 "ED15" H 8390 2170 40 0000 C C -F 1 "D_06A" H 8450 1970 40 0000 C C -F 2 "Eclairage grange" H 9900 2040 40 0000 C C +F 0 "ED15" H 8390 2170 40 0000 C CNN +F 1 "D_06A" H 8450 1970 40 0000 C CNN +F 2 "Eclairage grange" H 9900 2040 40 0000 C CNN +F 3 "" H 8550 2050 60 0001 C CNN 1 8550 2050 1 0 0 -1 $EndComp @@ -1119,9 +1219,10 @@ $Comp L D_06A ED16 U 1 1 4162F2F6 P 8550 2400 -F 0 "ED16" H 8390 2520 40 0000 C C -F 1 "D_06A" H 8450 2320 40 0000 C C -F 2 "Informatique" H 9820 2400 40 0000 C C +F 0 "ED16" H 8390 2520 40 0000 C CNN +F 1 "D_06A" H 8450 2320 40 0000 C CNN +F 2 "Informatique" H 9820 2400 40 0000 C CNN +F 3 "" H 8550 2400 60 0001 C CNN 1 8550 2400 1 0 0 -1 $EndComp @@ -1129,9 +1230,10 @@ $Comp L D_06A ED31 U 1 1 4162F2D8 P 8550 3250 -F 0 "ED31" H 8390 3370 40 0000 C C -F 1 "D_06A" H 8450 3170 40 0000 C C -F 2 "Chauffage" H 9740 3240 40 0000 C C +F 0 "ED31" H 8390 3370 40 0000 C CNN +F 1 "D_06A" H 8450 3170 40 0000 C CNN +F 2 "Chauffage" H 9740 3240 40 0000 C CNN +F 3 "" H 8550 3250 60 0001 C CNN 1 8550 3250 1 0 0 -1 $EndComp @@ -1139,9 +1241,10 @@ $Comp L D_06A ED11 U 1 1 4162F301 P 8550 650 -F 0 "ED11" H 8390 770 40 0000 C C -F 1 "D_06A" H 8450 570 40 0000 C C -F 2 "Eclairage vide sanitaire" H 10480 640 40 0000 C C +F 0 "ED11" H 8390 770 40 0000 C CNN +F 1 "D_06A" H 8450 570 40 0000 C CNN +F 2 "Eclairage vide sanitaire" H 10480 640 40 0000 C CNN +F 3 "" H 8550 650 60 0001 C CNN 1 8550 650 1 0 0 -1 $EndComp @@ -1149,10 +1252,10 @@ $Comp L D_06A ED12 U 1 1 4162F2F6 P 8550 1000 -F 0 "ED12" H 8390 1120 40 0000 C C -F 1 "D_06A" H 8450 920 40 0000 C C -F 2 "Eclairage chambre 1, chambre 2" H 10200 1040 40 0000 C C -F 3 "couloir1, wc1, sdb, entrée" H 10180 980 40 0000 C C +F 0 "ED12" H 8390 1120 40 0000 C CNN +F 1 "D_06A" H 8450 920 40 0000 C CNN +F 2 "Eclairage chambre 1, chambre 2" H 10200 1040 40 0000 C CNN +F 3 "couloir1, wc1, sdb, entrée" H 10180 980 40 0000 C CNN 1 8550 1000 1 0 0 -1 $EndComp @@ -1160,10 +1263,10 @@ $Comp L D_06A ED13 U 1 1 4162F2EE P 8550 1350 -F 0 "ED13" H 8390 1470 40 0000 C C -F 1 "D_06A" H 8450 1270 40 0000 C C -F 2 "Eclairage séjour, cuisine" H 10100 1380 40 0000 C C -F 3 "sam, escalier, bureau" H 10100 1320 40 0000 C C +F 0 "ED13" H 8390 1470 40 0000 C CNN +F 1 "D_06A" H 8450 1270 40 0000 C CNN +F 2 "Eclairage séjour, cuisine" H 10100 1380 40 0000 C CNN +F 3 "sam, escalier, bureau" H 10100 1320 40 0000 C CNN 1 8550 1350 1 0 0 -1 $EndComp @@ -1171,10 +1274,10 @@ $Comp L D_06A ED14 U 1 1 4162F2D8 P 8550 1700 -F 0 "ED14" H 8390 1820 40 0000 C C -F 1 "D_06A" H 8450 1620 40 0000 C C -F 2 "Eclairage chambre 3, couloir 2" H 10220 1740 40 0000 C C -F 3 "wc2, douche, lingerie" H 10180 1680 40 0000 C C +F 0 "ED14" H 8390 1820 40 0000 C CNN +F 1 "D_06A" H 8450 1620 40 0000 C CNN +F 2 "Eclairage chambre 3, couloir 2" H 10220 1740 40 0000 C CNN +F 3 "wc2, douche, lingerie" H 10180 1680 40 0000 C CNN 1 8550 1700 1 0 0 -1 $EndComp @@ -1182,9 +1285,10 @@ $Comp L D_10A ED25 U 1 1 4162F22A P 5900 1900 -F 0 "ED25" H 5740 2020 40 0000 C C -F 1 "D_10A" H 5800 1820 40 0000 C C -F 2 "Matériel sensible" H 7260 1900 40 0000 C C +F 0 "ED25" H 5740 2020 40 0000 C CNN +F 1 "D_10A" H 5800 1820 40 0000 C CNN +F 2 "Matériel sensible" H 7260 1900 40 0000 C CNN +F 3 "" H 5900 1900 60 0001 C CNN 1 5900 1900 1 0 0 -1 $EndComp @@ -1192,9 +1296,10 @@ $Comp L D_10A ED22 U 1 1 4162F1F7 P 5900 1500 -F 0 "ED22" H 5740 1620 40 0000 C C -F 1 "D_10A" H 5800 1420 40 0000 C C -F 2 "Réfrigérateur & congélateur" H 7480 1500 40 0000 C C +F 0 "ED22" H 5740 1620 40 0000 C CNN +F 1 "D_10A" H 5800 1420 40 0000 C CNN +F 2 "Réfrigérateur & congélateur" H 7480 1500 40 0000 C CNN +F 3 "" H 5900 1500 60 0001 C CNN 1 5900 1500 1 0 0 -1 $EndComp @@ -1202,9 +1307,10 @@ $Comp L D_10A ED21 U 1 1 4162F1F0 P 5900 1150 -F 0 "ED21" H 5750 1250 40 0000 C C -F 1 "D_10A" H 5800 1070 40 0000 C C -F 2 "Pompe surpresseur" H 7260 1140 40 0000 C C +F 0 "ED21" H 5750 1250 40 0000 C CNN +F 1 "D_10A" H 5800 1070 40 0000 C CNN +F 2 "Pompe surpresseur" H 7260 1140 40 0000 C CNN +F 3 "" H 5900 1150 60 0001 C CNN 1 5900 1150 1 0 0 -1 $EndComp @@ -1212,9 +1318,10 @@ $Comp L D_10A ED20 U 1 1 4162F1CA P 5900 800 -F 0 "ED20" H 5740 920 40 0000 C C -F 1 "D_10A" H 5800 720 40 0000 C C -F 2 "Vide sanitaire, portail" H 7400 800 40 0000 C C +F 0 "ED20" H 5740 920 40 0000 C CNN +F 1 "D_10A" H 5800 720 40 0000 C CNN +F 2 "Vide sanitaire, portail" H 7400 800 40 0000 C CNN +F 3 "" H 5900 800 60 0001 C CNN 1 5900 800 1 0 0 -1 $EndComp @@ -1239,8 +1346,10 @@ $Comp L O_600VA EO2 U 1 1 4162E0E4 P 5050 2900 -F 0 "EO2" H 5300 3000 40 0000 C C -F 1 "O_600VA" H 5050 2750 40 0000 C C +F 0 "EO2" H 5300 3000 40 0000 C CNN +F 1 "O_600VA" H 5050 2750 40 0000 C CNN +F 2 "" H 5050 2900 60 0001 C CNN +F 3 "" H 5050 2900 60 0001 C CNN 1 5050 2900 1 0 0 -1 $EndComp @@ -1248,11 +1357,11 @@ $Comp L O_900VA EO1 U 1 1 4162E0D5 P 5050 2400 -F 0 "EO1" H 5300 2300 40 0000 C C -F 1 "O_900VA" H 5050 2500 40 0000 C C -F 2 "Onduleurs" H 5050 2200 30 0000 C C -F 3 "autonomie" H 5050 2150 30 0000 C C -F 4 "rallongée" H 5050 2100 30 0000 C C +F 0 "EO1" H 5300 2300 40 0000 C CNN +F 1 "O_900VA" H 5050 2500 40 0000 C CNN +F 2 "Onduleurs" H 5050 2200 30 0000 C CNN +F 3 "autonomie" H 5050 2150 30 0000 C CNN +F 4 "rallongée" H 5050 2100 30 0000 C CNN "Champ4" 1 5050 2400 1 0 0 -1 $EndComp @@ -1260,10 +1369,10 @@ $Comp L Q_2A_12O_40KV EQ4 U 1 1 4162DE98 P 5050 1350 -F 0 "EQ4" H 4850 700 40 0000 C C -F 1 "Q_2A_12O_40KV" H 5050 1450 40 0000 C C -F 2 "Contacteur" H 5150 650 30 0000 C C -F 3 "isolation HT " H 5150 600 30 0000 C C +F 0 "EQ4" H 4850 700 40 0000 C CNN +F 1 "Q_2A_12O_40KV" H 5050 1450 40 0000 C CNN +F 2 "Contacteur" H 5150 650 30 0000 C CNN +F 3 "isolation HT " H 5150 600 30 0000 C CNN 1 5050 1350 1 0 0 -1 $EndComp @@ -1272,8 +1381,10 @@ $Comp L V_F50HZ EV2 U 1 1 4162DD75 P 2400 1400 -F 0 "EV2" H 2400 1550 40 0000 C C -F 1 "V_F50HZ" H 2400 1250 40 0000 C C +F 0 "EV2" H 2400 1550 40 0000 C CNN +F 1 "V_F50HZ" H 2400 1250 40 0000 C CNN +F 2 "" H 2400 1400 60 0001 C CNN +F 3 "" H 2400 1400 60 0001 C CNN 1 2400 1400 1 0 0 -1 $EndComp @@ -1281,8 +1392,10 @@ $Comp L V_U400V EV3 U 1 1 4162DD5E P 2400 1900 -F 0 "EV3" H 2400 2050 40 0000 C C -F 1 "V_U400V" H 2400 1750 40 0000 C C +F 0 "EV3" H 2400 2050 40 0000 C CNN +F 1 "V_U400V" H 2400 1750 40 0000 C CNN +F 2 "" H 2400 1900 60 0001 C CNN +F 3 "" H 2400 1900 60 0001 C CNN 1 2400 1900 1 0 0 -1 $EndComp @@ -1290,8 +1403,10 @@ $Comp L Y_ELC EY2 U 1 1 4162DC78 P 3550 2750 -F 0 "EY2" H 3650 2800 40 0000 C C -F 1 "Y_ELC" V 3400 2750 40 0000 C C +F 0 "EY2" H 3650 2800 40 0000 C CNN +F 1 "Y_ELC" V 3400 2750 40 0000 C CNN +F 2 "" H 3550 2750 60 0001 C CNN +F 3 "" H 3550 2750 60 0001 C CNN 1 3550 2750 0 -1 -1 0 $EndComp @@ -1299,10 +1414,10 @@ $Comp L A_1KVA EA1 U 1 1 4162DC5B P 3550 2450 -F 0 "EA1" H 3550 2650 40 0000 C C -F 1 "A_1KVA" H 3550 2580 40 0000 C C -F 2 "Absorbeur" H 3550 2800 30 0000 C C -F 3 "d'ondes" H 3550 2750 30 0000 C C +F 0 "EA1" H 3550 2650 40 0000 C CNN +F 1 "A_1KVA" H 3550 2580 40 0000 C CNN +F 2 "Absorbeur" H 3550 2800 30 0000 C CNN +F 3 "d'ondes" H 3550 2750 30 0000 C CNN 1 3550 2450 1 0 0 -1 $EndComp @@ -1310,8 +1425,10 @@ $Comp L Q_25A_2F2O EQ2 U 1 1 4162DB86 P 4250 1900 -F 0 "EQ2" H 4090 2020 40 0000 C C -F 1 "Q_25A_2F2O" H 4250 1760 40 0000 C C +F 0 "EQ2" H 4090 2020 40 0000 C CNN +F 1 "Q_25A_2F2O" H 4250 1760 40 0000 C CNN +F 2 "" H 4250 1900 60 0001 C CNN +F 3 "" H 4250 1900 60 0001 C CNN 1 4250 1900 -1 0 0 1 $EndComp @@ -1319,8 +1436,10 @@ $Comp L Q_25A_2F2O EQ3 U 1 1 4162DB5E P 4250 2400 -F 0 "EQ3" H 4090 2520 40 0000 C C -F 1 "Q_25A_2F2O" H 4250 2260 40 0000 C C +F 0 "EQ3" H 4090 2520 40 0000 C CNN +F 1 "Q_25A_2F2O" H 4250 2260 40 0000 C CNN +F 2 "" H 4250 2400 60 0001 C CNN +F 3 "" H 4250 2400 60 0001 C CNN 1 4250 2400 -1 0 0 1 $EndComp @@ -1328,8 +1447,10 @@ $Comp L Q_25A_2F2O EQ1b U 1 1 416245A7 P 2800 2400 -F 0 "EQ1b" H 2700 2550 40 0000 C C -F 1 "Q_25A_2F2O" H 2800 2260 40 0000 C C +F 0 "EQ1b" H 2700 2550 40 0000 C CNN +F 1 "Q_25A_2F2O" H 2800 2260 40 0000 C CNN +F 2 "" H 2800 2400 60 0001 C CNN +F 3 "" H 2800 2400 60 0001 C CNN 1 2800 2400 1 0 0 1 $EndComp @@ -1337,8 +1458,10 @@ $Comp L V_A10A EV1 U 1 1 4162458B P 2400 2400 -F 0 "EV1" H 2400 2550 40 0000 C C -F 1 "V_A10A" H 2400 2250 40 0000 C C +F 0 "EV1" H 2400 2550 40 0000 C CNN +F 1 "V_A10A" H 2400 2250 40 0000 C CNN +F 2 "" H 2400 2400 60 0001 C CNN +F 3 "" H 2400 2400 60 0001 C CNN 1 2400 2400 1 0 0 -1 $EndComp @@ -1346,67 +1469,78 @@ $Comp L Q_25A_2F2O EQ1a U 1 1 41624555 P 2000 2400 -F 0 "EQ1a" H 1900 2550 40 0000 C C -F 1 "Q_25A_2F2O" H 2000 2260 40 0000 C C +F 0 "EQ1a" H 1900 2550 40 0000 C CNN +F 1 "Q_25A_2F2O" H 2000 2260 40 0000 C CNN +F 2 "" H 2000 2400 60 0001 C CNN +F 3 "" H 2000 2400 60 0001 C CNN 1 2000 2400 -1 0 0 1 $EndComp $Comp -L J_40A_30MA EJ4 +L J_40A_30mA EJ4 U 1 1 4162432C P 1450 4850 -F 0 "EJ4" H 1240 5030 40 0000 C C -F 1 "J_40A_30MA" H 1430 4730 40 0000 C C +F 0 "EJ4" H 1240 5030 40 0000 C CNN +F 1 "J_40A_30mA" H 1430 4730 40 0000 C CNN +F 2 "" H 1450 4850 60 0001 C CNN +F 3 "" H 1450 4850 60 0001 C CNN 1 1450 4850 1 0 0 -1 $EndComp $Comp -L J_40A_30MA EJ3 +L J_40A_30mA EJ3 U 1 1 41624321 P 1450 4350 -F 0 "EJ3" H 1240 4530 40 0000 C C -F 1 "J_40A_30MA" H 1430 4230 40 0000 C C +F 0 "EJ3" H 1240 4530 40 0000 C CNN +F 1 "J_40A_30mA" H 1430 4230 40 0000 C CNN +F 2 "" H 1450 4350 60 0001 C CNN +F 3 "" H 1450 4350 60 0001 C CNN 1 1450 4350 1 0 0 -1 $EndComp $Comp -L J_40A_30MA EJ2 +L J_40A_30mA EJ2 U 1 1 41624310 P 1450 3850 -F 0 "EJ2" H 1240 4030 40 0000 C C -F 1 "J_40A_30MA" H 1430 3730 40 0000 C C +F 0 "EJ2" H 1240 4030 40 0000 C CNN +F 1 "J_40A_30mA" H 1430 3730 40 0000 C CNN +F 2 "" H 1450 3850 60 0001 C CNN +F 3 "" H 1450 3850 60 0001 C CNN 1 1450 3850 1 0 0 -1 $EndComp $Comp -L J_40A_30MA EJ1 +L J_40A_30mA EJ1 U 1 1 41624306 P 1450 3350 -F 0 "EJ1" H 1240 3530 40 0000 C C -F 1 "J_40A_30MA" H 1430 3230 40 0000 C C +F 0 "EJ1" H 1240 3530 40 0000 C CNN +F 1 "J_40A_30mA" H 1430 3230 40 0000 C CNN +F 2 "" H 1450 3350 60 0001 C CNN +F 3 "" H 1450 3350 60 0001 C CNN 1 1450 3350 1 0 0 -1 $EndComp $Comp -L R_16A_30MA ER02 +L R_16A_30mA ER02 U 1 1 416242F0 P 1450 2750 -F 0 "ER02" H 1240 2930 40 0000 C C -F 1 "R_16A_30MA" H 1450 2550 40 0000 C C -F 2 "Courbe B" H 1450 2500 30 0000 C C +F 0 "ER02" H 1240 2930 40 0000 C CNN +F 1 "R_16A_30mA" H 1450 2550 40 0000 C CNN +F 2 "Courbe B" H 1450 2500 30 0000 C CNN +F 3 "" H 1450 2750 60 0001 C CNN 1 1450 2750 1 0 0 -1 $EndComp $Comp -L G_TH_3KVA EG1 +L G_Th_3KVA EG1 U 1 1 4162428A P 1000 2150 -F 0 "EG1" H 1050 2300 40 0000 C C -F 1 "G_TH_3KVA" H 1080 2380 40 0000 C C -F 2 "Groupe" H 640 2260 30 0000 C C -F 3 "électrogène" H 640 2200 30 0000 C C -F 4 "automatique" H 640 2140 30 0000 C C -F 5 "diesel" H 640 2080 30 0000 C C +F 0 "EG1" H 1050 2300 40 0000 C CNN +F 1 "G_Th_3KVA" H 1080 2380 40 0000 C CNN +F 2 "Groupe" H 640 2260 30 0000 C CNN +F 3 "électrogène" H 640 2200 30 0000 C CNN +F 4 "automatique" H 640 2140 30 0000 C CNN "Champ4" +F 5 "diesel" H 640 2080 30 0000 C CNN "Champ5" 1 1000 2150 1 0 0 -1 $EndComp @@ -1414,10 +1548,10 @@ $Comp L S_63A ES1 U 1 1 416241E5 P 850 1100 -F 0 "ES1" V 800 1350 40 0000 C C -F 1 "S_63A" H 850 990 40 0000 C C -F 2 "Sectionneur" V 650 1350 30 0000 C C -F 3 "TGBT" V 600 1350 30 0000 C C +F 0 "ES1" V 800 1350 40 0000 C CNN +F 1 "S_63A" H 850 990 40 0000 C CNN +F 2 "Sectionneur" V 650 1350 30 0000 C CNN +F 3 "TGBT" V 600 1350 30 0000 C CNN 1 850 1100 0 -1 -1 0 $EndComp @@ -1425,8 +1559,10 @@ $Comp L Y_ELC EY1 U 1 1 41623FE0 P 1800 1550 -F 0 "EY1" H 1900 1600 40 0000 C C -F 1 "Y_ELC" V 1650 1550 40 0000 C C +F 0 "EY1" H 1900 1600 40 0000 C CNN +F 1 "Y_ELC" V 1650 1550 40 0000 C CNN +F 2 "" H 1800 1550 60 0001 C CNN +F 3 "" H 1800 1550 60 0001 C CNN 1 1800 1550 0 -1 -1 0 $EndComp @@ -1436,8 +1572,10 @@ $Comp L W_15KA EW01 U 1 1 41618802 P 1800 1150 -F 0 "EW01" H 1800 1300 40 0000 C C -F 1 "W_15KA" H 1800 950 40 0000 C C +F 0 "EW01" H 1800 1300 40 0000 C CNN +F 1 "W_15KA" H 1800 950 40 0000 C CNN +F 2 "" H 1800 1150 60 0001 C CNN +F 3 "" H 1800 1150 60 0001 C CNN 1 1800 1150 0 -1 -1 0 $EndComp @@ -1445,8 +1583,10 @@ $Comp L D_10A ED10 U 1 1 41618699 P 1350 1150 -F 0 "ED10" H 1190 1270 40 0000 C C -F 1 "D_10A" H 1250 1070 40 0000 C C +F 0 "ED10" H 1190 1270 40 0000 C CNN +F 1 "D_10A" H 1250 1070 40 0000 C CNN +F 2 "" H 1350 1150 60 0001 C CNN +F 3 "" H 1350 1150 60 0001 C CNN 1 1350 1150 0 -1 -1 0 $EndComp diff --git a/demos/flat_hierarchy/flat_hierarchy-cache.lib b/demos/flat_hierarchy/flat_hierarchy-cache.lib new file mode 100644 index 0000000000..fdac208bfb --- /dev/null +++ b/demos/flat_hierarchy/flat_hierarchy-cache.lib @@ -0,0 +1,592 @@ +EESchema-LIBRARY Version 2.3 +#encoding utf-8 +# +# 24C16 +# +DEF 24C16 U 0 30 Y Y 1 F N +F0 "U" 150 350 60 H V C CNN +F1 "24C16" 200 -350 60 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +ALIAS 24C512 +DRAW +X GND 4 0 -500 200 U 60 60 0 0 W +X VCC 8 0 500 200 D 60 60 0 0 W +S -400 -300 400 300 1 1 0 N +X A0 1 -700 200 300 R 60 60 1 1 I +X A1 2 -700 100 300 R 60 60 1 1 I +X A2 3 -700 0 300 R 60 60 1 1 I +X SDA 5 700 -200 300 L 60 60 1 1 B +X SCL 6 700 -100 300 L 60 60 1 1 I +X WP 7 700 100 300 L 60 60 1 1 I +ENDDRAW +ENDDEF +# +# 74LS125 +# +DEF 74LS125 U 0 30 Y Y 4 F N +F0 "U" 0 100 50 H V L BNN +F1 "74LS125" 50 -150 40 H V L TNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +DRAW +X GND 7 -150 -150 0 U 50 30 0 0 W N +X VCC 14 -150 150 0 D 50 30 0 0 W N +X E 1 0 -300 220 U 50 30 1 0 I I +X E 4 0 -300 220 U 50 30 2 0 I I +X E 10 0 -300 220 U 50 30 3 0 I I +X E 13 0 -300 220 U 50 30 4 0 I I +P 4 0 1 0 -150 150 -150 -150 150 0 -150 150 N +X D 2 -450 0 300 R 50 30 1 1 I +X O 3 450 0 300 L 50 30 1 1 T +X D 5 -450 0 300 R 50 30 2 1 I +X O 6 450 0 300 L 50 30 2 1 T +X O 8 450 0 300 L 50 30 3 1 T +X D 9 -450 0 300 R 50 30 3 1 I +X O 11 450 0 300 L 50 30 4 1 T +X D 12 -450 0 300 R 50 30 4 1 I +ENDDRAW +ENDDEF +# +# 7805 +# +DEF 7805 U 0 30 N Y 1 F N +F0 "U" 150 -196 60 H V C CNN +F1 "7805" 0 200 60 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +ALIAS LM7805 LM7812 78L05 +DRAW +S -200 -150 200 150 0 1 0 N +X VI VI -400 50 200 R 40 40 1 1 I +X VO VO 400 50 200 L 40 40 1 1 w +X GND GND 0 -250 100 U 40 40 1 1 I +ENDDRAW +ENDDEF +# +# C +# +DEF C C 0 10 N Y 1 F N +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 100 30 H V C CNN +$FPLIST + SM* + C? + C1-1 +$ENDFPLIST +DRAW +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 +ENDDEF +# +# CONN_2 +# +DEF CONN_2 P 0 40 Y N 1 F N +F0 "P" -50 0 40 V V C CNN +F1 "CONN_2" 50 0 40 V V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +DRAW +S -100 150 100 -150 0 1 0 N +X P1 1 -350 100 250 R 60 60 1 1 P I +X PM 2 -350 -100 250 R 60 60 1 1 P I +ENDDRAW +ENDDEF +# +# CP +# +DEF CP C 0 10 N N 1 F N +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 "" 50 100 30 H V C CNN +ALIAS CAPAPOL +$FPLIST + CP* + SM* +$ENDFPLIST +DRAW +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 +ENDDRAW +ENDDEF +# +# DB9 +# +DEF DB9 J 0 40 Y N 1 F N +F0 "J" 0 550 70 H V C CNN +F1 "DB9" 0 -550 70 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +$FPLIST + DB9* +$ENDFPLIST +DRAW +C -70 -400 30 0 1 0 N +C -70 -200 30 0 1 0 N +C -70 0 30 0 1 0 N +C -70 200 30 0 1 0 N +C -70 400 30 0 1 0 N +C 50 -300 30 0 1 0 N +C 50 -100 30 0 1 0 N +C 50 100 30 0 1 0 N +C 50 300 30 0 1 0 N +P 2 0 1 8 -150 -460 -150 460 N +P 2 0 1 8 -150 -459 -140 -470 N +P 2 0 1 0 -150 -400 -100 -400 N +P 2 0 1 0 -150 -300 20 -300 N +P 2 0 1 0 -150 -200 -100 -200 N +P 2 0 1 0 -150 -100 20 -100 N +P 2 0 1 0 -150 0 -100 0 N +P 2 0 1 0 -150 100 20 100 N +P 2 0 1 0 -150 200 -100 200 N +P 2 0 1 0 -150 300 20 300 N +P 2 0 1 0 -150 400 -100 400 N +P 2 0 1 8 -140 -470 -110 -490 N +P 2 0 1 8 -140 470 -150 460 N +P 2 0 1 8 -140 470 -100 490 N +P 2 0 1 8 -110 -490 -50 -490 N +P 2 0 1 8 -100 490 -70 490 N +P 2 0 1 8 129 390 -70 490 N +P 2 0 1 8 129 390 150 370 N +P 2 0 1 8 140 -409 -50 -490 N +P 2 0 1 8 150 -390 140 -409 N +P 2 0 1 8 150 370 150 -390 N +X 1 1 -450 -400 300 R 60 60 1 1 P +X 2 2 -450 -200 300 R 60 60 1 1 P +X 3 3 -450 0 300 R 60 60 1 1 P +X 4 4 -450 200 300 R 60 60 1 1 P +X 5 5 -450 400 300 R 60 60 1 1 P +X P6 6 -450 -300 300 R 60 60 1 1 P +X P7 7 -450 -100 300 R 60 60 1 1 P +X P8 8 -450 100 300 R 60 60 1 1 P +X P9 9 -450 300 300 R 60 60 1 1 P +ENDDRAW +ENDDEF +# +# DIODE +# +DEF DIODE D 0 40 N N 1 F N +F0 "D" 0 100 40 H V C CNN +F1 "DIODE" 0 -100 40 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +$FPLIST + D? + S* +$ENDFPLIST +DRAW +P 2 0 1 6 50 50 50 -50 N +P 3 0 1 0 -50 50 50 0 -50 -50 F +X A 1 -200 0 150 R 40 40 1 1 P +X K 2 200 0 150 L 40 40 1 1 P +ENDDRAW +ENDDEF +# +# DIODESCH +# +DEF DIODESCH D 0 40 N N 1 F N +F0 "D" 0 100 40 H V C CNN +F1 "DIODESCH" 0 -100 40 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +$FPLIST + D? + S* +$ENDFPLIST +DRAW +P 3 0 1 0 -50 50 50 0 -50 -50 F +P 6 0 1 8 75 25 75 50 50 50 50 -50 25 -50 25 -25 N +X A 1 -200 0 150 R 40 40 1 1 P +X K 2 200 0 150 L 40 40 1 1 P +ENDDRAW +ENDDEF +# +# GND +# +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 +ENDDRAW +ENDDEF +# +# INDUCTOR +# +DEF INDUCTOR L 0 40 N N 1 F N +F0 "L" -50 0 40 V V C CNN +F1 "INDUCTOR" 100 0 40 V V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +DRAW +A 0 -150 50 -889 889 0 1 0 N 1 -199 1 -100 +A 0 -49 51 -889 889 0 1 0 N 1 -99 1 2 +A 0 51 51 -889 889 0 1 0 N 1 1 1 102 +A 0 148 48 -889 889 0 1 0 N 1 101 1 196 +X 1 1 0 300 100 D 70 70 1 1 P +X 2 2 0 -300 100 U 70 70 1 1 P +ENDDRAW +ENDDEF +# +# JUMPER +# +DEF JUMPER JP 0 30 Y N 1 F N +F0 "JP" 0 150 60 H V C CNN +F1 "JUMPER" 0 -80 40 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +DRAW +A 0 -26 125 1426 373 0 1 0 N -98 50 99 50 +C -100 0 35 0 1 0 N +C 100 0 35 0 1 0 N +X 1 1 -300 0 165 R 60 60 0 1 P +X 2 2 300 0 165 L 60 60 0 1 P +ENDDRAW +ENDDEF +# +# LED +# +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 + LED-10MM + LED-0603 + LED-0805 + LED-1206 + LEDV +$ENDFPLIST +DRAW +P 2 0 1 0 50 50 50 -50 N +P 3 0 1 0 -50 50 50 0 -50 -50 F +P 3 0 1 0 65 -40 110 -80 105 -55 N +P 3 0 1 0 80 -25 125 -65 120 -40 N +X A 1 -200 0 150 R 40 40 1 1 P +X K 2 200 0 150 L 40 40 1 1 P +ENDDRAW +ENDDEF +# +# LT1372 +# +DEF LT1372 U 0 30 Y Y 1 F N +F0 "U" 600 500 60 H V C CNN +F1 "LT1372" -500 500 60 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +ALIAS LT1373 +DRAW +S -700 -400 700 400 0 1 0 N +X Vc 1 250 -700 300 U 60 60 1 1 I +X FB+ 2 1000 -250 300 L 60 60 1 1 I +X FB- 3 -1000 250 300 R 60 60 1 1 P +X S/S 4 -1000 -250 300 R 60 60 1 1 P +X Vin 5 0 700 300 D 60 60 1 1 W +X GND_S 6 -150 -700 300 U 60 60 1 1 I +X GND 7 -300 -700 300 U 60 60 1 1 I +X Vsw 8 1000 250 300 L 60 60 1 1 I +ENDDRAW +ENDDEF +# +# NPN +# +DEF NPN Q 0 0 Y Y 1 F N +F0 "Q" 0 -150 50 H V R CNN +F1 "NPN" 0 150 50 H V R CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +DRAW +C 50 0 111 0 1 10 N +P 2 0 1 0 0 0 100 100 N +P 3 0 1 10 0 75 0 -75 0 -75 N +P 3 0 1 0 50 -50 0 0 0 0 N +P 3 0 1 0 90 -90 100 -100 100 -100 N +P 5 0 1 0 90 -90 70 -30 30 -70 90 -90 90 -90 F +X E 1 100 -200 100 U 40 40 1 1 P +X B 2 -200 0 200 R 40 40 1 1 I +X C 3 100 200 100 D 40 40 1 1 P +ENDDRAW +ENDDEF +# +# PIC12C508A +# +DEF PIC12C508A U 0 40 Y Y 1 F N +F0 "U" 0 700 60 H V C CNN +F1 "PIC12C508A" 0 -650 60 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +ALIAS PIC12C509A +DRAW +S 400 -600 -450 650 0 1 0 N +X VDD 1 -750 500 300 R 50 50 1 1 W +X GP5/OSC1 2 -750 200 300 R 50 50 1 1 I +X GP4/OSC2 3 -750 -200 300 R 50 50 1 1 I +X GP3/MCLR 4 -750 -500 300 R 50 50 1 1 I +X GP2 5 700 -500 300 L 50 50 1 1 I +X GP1 6 700 -200 300 L 50 50 1 1 I +X GP0 7 700 200 300 L 50 50 1 1 I +X VSS 8 700 500 300 L 50 50 1 1 W +X VDD 1 -750 500 300 R 50 50 1 2 W +X GP5/OSC1 2 -750 200 300 R 50 50 1 2 I +X GP4/OSC2 3 -750 -200 300 R 50 50 1 2 I +X GP3/MCLR 4 -750 -500 300 R 50 50 1 2 I +X GP2 5 700 -500 300 L 50 50 1 2 I +X GP1 6 700 -200 300 L 50 50 1 2 I +X GP0 7 700 200 300 L 50 50 1 2 I +X VSS 8 700 500 300 L 50 50 1 2 W +ENDDRAW +ENDDEF +# +# PIC16F54 +# +DEF PIC16F54 U? 0 40 Y Y 1 F N +F0 "U?" 0 -750 60 H V C CNN +F1 "PIC16F54" 0 800 60 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +DRAW +S -500 700 450 -700 0 1 0 N +X RA2 1 -800 600 300 R 50 50 1 1 B +X RA3 2 -800 450 300 R 50 50 1 1 B +X T0ckl 3 -800 300 300 R 50 50 1 1 O +X MCLR 4 -800 150 300 R 50 50 1 1 I +X VSS 5 -800 0 300 R 50 50 1 1 W +X RB0 6 -800 -150 300 R 50 50 1 1 B +X RB1 7 -800 -300 300 R 50 50 1 1 B +X RB2 8 -800 -450 300 R 50 50 1 1 B +X RB3 9 -800 -600 300 R 50 50 1 1 B +X RB4 10 750 -600 300 L 50 50 1 1 B +X RB5 11 750 -450 300 L 50 50 1 1 B +X ICSPC/RB6 12 750 -300 300 L 50 50 1 1 B +X ICSPD/RB7 13 750 -150 300 L 50 50 1 1 B +X VDD 14 750 0 300 L 50 50 1 1 W +X OSC2/CLKO 15 750 150 300 L 50 50 1 1 O +X OSC1/CLKI 16 750 300 300 L 50 50 1 1 I +X RA0 17 750 450 300 L 50 50 1 1 B +X RA1 18 750 600 300 L 50 50 1 1 B +X RA2 1 -800 600 300 R 50 50 1 2 B +X RA3 2 -800 450 300 R 50 50 1 2 B +X T0ckl 3 -800 300 300 R 50 50 1 2 O +X MCLR 4 -800 150 300 R 50 50 1 2 I +X VSS 5 -800 0 300 R 50 50 1 2 W +X RB0 6 -800 -150 300 R 50 50 1 2 B +X RB1 7 -800 -300 300 R 50 50 1 2 B +X RB2 8 -800 -450 300 R 50 50 1 2 B +X RB3 9 -800 -600 300 R 50 50 1 2 B +X RB4 10 750 -600 300 L 50 50 1 2 B +X RB5 11 750 -450 300 L 50 50 1 2 B +X ICSPC/RB6 12 750 -300 300 L 50 50 1 2 B +X ICSPD/RB7 13 750 -150 300 L 50 50 1 2 B +X VDD 14 750 0 300 L 50 50 1 2 W +X OSC2/CLKO 15 750 150 300 L 50 50 1 2 O +X OSC1/CLKI 16 750 300 300 L 50 50 1 2 I +X RA0 17 750 450 300 L 50 50 1 2 B +X RA1 18 750 600 300 L 50 50 1 2 B +ENDDRAW +ENDDEF +# +# PNP +# +DEF PNP Q 0 0 Y Y 1 F N +F0 "Q" 0 -150 60 H V R CNN +F1 "PNP" 0 150 60 H V R CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +DRAW +C 50 0 111 0 1 10 N +P 2 0 1 0 0 0 100 100 N +P 3 0 1 10 0 75 0 -75 0 -75 F +P 3 0 1 0 25 -25 0 0 0 0 N +P 3 0 1 0 100 -100 65 -65 65 -65 N +P 5 0 1 0 25 -25 50 -75 75 -50 25 -25 25 -25 F +X E 1 100 -200 100 U 40 40 1 1 P +X B 2 -200 0 200 R 40 40 1 1 I +X C 3 100 200 100 D 40 40 1 1 P +ENDDRAW +ENDDEF +# +# POT +# +DEF POT RV 0 40 Y N 1 F N +F0 "RV" 0 -100 50 H V C CNN +F1 "POT" 0 0 50 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +DRAW +S -150 50 150 -50 0 1 0 N +P 3 0 1 0 0 50 -20 70 20 70 F +X 1 1 -250 0 100 R 40 40 1 1 P +X 2 2 0 150 80 D 40 40 1 1 P +X 3 3 250 0 100 L 40 40 1 1 P +ENDDRAW +ENDDEF +# +# PWR_FLAG +# +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 +ENDDRAW +ENDDEF +# +# R +# +DEF R R 0 0 N Y 1 F N +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 + SM0805 + R?-* + SM1206 +$ENDFPLIST +DRAW +S -40 150 40 -150 0 1 12 N +X ~ 1 0 250 100 D 60 60 1 1 P +X ~ 2 0 -250 100 U 60 60 1 1 P +ENDDRAW +ENDDEF +# +# SUPP28 +# +DEF SUPP28 J 0 40 Y Y 1 F N +F0 "J" 0 100 70 H V C CNN +F1 "SUPP28" 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 -300 -750 300 750 0 1 0 N +X 1 1 -600 650 300 R 60 60 1 1 P +X 2 2 -600 550 300 R 60 60 1 1 P +X 3 3 -600 450 300 R 60 60 1 1 P +X 4 4 -600 350 300 R 60 60 1 1 P +X 5 5 -600 250 300 R 60 60 1 1 P +X 6 6 -600 150 300 R 60 60 1 1 P +X 7 7 -600 50 300 R 60 60 1 1 P +X 8 8 -600 -50 300 R 60 60 1 1 P +X 9 9 -600 -150 300 R 60 60 1 1 P +X 10 10 -600 -250 300 R 60 60 1 1 P +X 20 20 600 -150 300 L 60 60 1 1 P +X 11 11 -600 -350 300 R 60 60 1 1 P +X 21 21 600 -50 300 L 60 60 1 1 P +X 12 12 -600 -450 300 R 60 60 1 1 P +X 22 22 600 50 300 L 60 60 1 1 P +X 13 13 -600 -550 300 R 60 60 1 1 P +X 23 23 600 150 300 L 60 60 1 1 P +X 14 14 -600 -650 300 R 60 60 1 1 P +X 24 24 600 250 300 L 60 60 1 1 P +X 15 15 600 -650 300 L 60 60 1 1 P +X 25 25 600 350 300 L 60 60 1 1 P +X 16 16 600 -550 300 L 60 60 1 1 P +X 26 26 600 450 300 L 60 60 1 1 P +X 17 17 600 -450 300 L 60 60 1 1 P +X 27 27 600 550 300 L 60 60 1 1 P +X 18 18 600 -350 300 L 60 60 1 1 P +X 28 28 600 650 300 L 60 60 1 1 P +X 19 19 600 -250 300 L 60 60 1 1 P +ENDDRAW +ENDDEF +# +# SUPP40 +# +DEF SUPP40 P 0 40 Y Y 1 F N +F0 "P" 0 1100 70 H V C CNN +F1 "SUPP40" 0 -1100 70 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +DRAW +S -300 -1050 300 1050 0 1 0 N +X 1 1 -600 950 300 R 60 60 1 1 P +X 2 2 -600 850 300 R 60 60 1 1 P +X 3 3 -600 750 300 R 60 60 1 1 P +X 4 4 -600 650 300 R 60 60 1 1 P +X 5 5 -600 550 300 R 60 60 1 1 P +X 6 6 -600 450 300 R 60 60 1 1 P +X 7 7 -600 350 300 R 60 60 1 1 P +X 8 8 -600 250 300 R 60 60 1 1 P +X 9 9 -600 150 300 R 60 60 1 1 P +X 10 10 -600 50 300 R 60 60 1 1 P +X 20 20 -600 -950 300 R 60 60 1 1 P +X 30 30 600 -50 300 L 60 60 1 1 P +X 40 40 600 950 300 L 60 60 1 1 P +X 11 11 -600 -50 300 R 60 60 1 1 P +X 21 21 600 -950 300 L 60 60 1 1 P +X 31 31 600 50 300 L 60 60 1 1 P +X 12 12 -600 -150 300 R 60 60 1 1 P +X 22 22 600 -850 300 L 60 60 1 1 P +X 32 32 600 150 300 L 60 60 1 1 P +X 13 13 -600 -250 300 R 60 60 1 1 P +X 23 23 600 -750 300 L 60 60 1 1 P +X 33 33 600 250 300 L 60 60 1 1 P +X 14 14 -600 -350 300 R 60 60 1 1 P +X 24 24 600 -650 300 L 60 60 1 1 P +X 34 34 600 350 300 L 60 60 1 1 P +X 15 15 -600 -450 300 R 60 60 1 1 P +X 25 25 600 -550 300 L 60 60 1 1 P +X 35 35 600 450 300 L 60 60 1 1 P +X 16 16 -600 -550 300 R 60 60 1 1 P +X 26 26 600 -450 300 L 60 60 1 1 P +X 36 36 600 550 300 L 60 60 1 1 P +X 17 17 -600 -650 300 R 60 60 1 1 P +X 27 27 600 -350 300 L 60 60 1 1 P +X 37 37 600 650 300 L 60 60 1 1 P +X 18 18 -600 -750 300 R 60 60 1 1 P +X 28 28 600 -250 300 L 60 60 1 1 P +X 38 38 600 750 300 L 60 60 1 1 P +X 19 19 -600 -850 300 R 60 60 1 1 P +X 29 29 600 -150 300 L 60 60 1 1 P +X 39 39 600 850 300 L 60 60 1 1 P +ENDDRAW +ENDDEF +# +# VCC +# +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 +P 3 0 1 0 0 0 0 30 0 30 N +ENDDRAW +ENDDEF +# +# VPP +# +DEF VPP #PWR 0 0 Y Y 1 F N +F0 "#PWR" 0 200 40 H I C CNN +F1 "VPP" 0 150 40 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +DRAW +X VPP 1 0 0 0 U 40 40 0 0 W N +C 0 80 20 0 1 0 N +P 2 0 1 0 0 60 0 0 N +ENDDRAW +ENDDEF +# +#End Library diff --git a/demos/flat_hierarchy/flat_hierarchy.cmp b/demos/flat_hierarchy/flat_hierarchy.cmp index 5f90e06acc..0bc01b74b3 100644 --- a/demos/flat_hierarchy/flat_hierarchy.cmp +++ b/demos/flat_hierarchy/flat_hierarchy.cmp @@ -1,409 +1,409 @@ -Cmp-Mod V01 Created by Cvpcb (2007-05-11) date = 16/5/2007-09:46:07 +Cmp-Mod V01 Created by Cvpcb (2014-07-04 BZR 4974)-product date = 05/07/2014 20:15:53 BeginCmp -TimeStamp = 442A5056; +TimeStamp = /48553E53/442A5056; Reference = C1; ValeurCmp = 100uF; -IdModule = CP10; +IdModule = discret:CP10; EndCmp BeginCmp -TimeStamp = 442A501D; +TimeStamp = /48553E53/442A501D; Reference = C2; ValeurCmp = 220uF; -IdModule = CP10; +IdModule = discret:CP10; EndCmp BeginCmp -TimeStamp = 442A584C; +TimeStamp = /48553E53/442A584C; Reference = C3; ValeurCmp = 22uF/25V; -IdModule = CP8; +IdModule = discret:CP8; EndCmp BeginCmp -TimeStamp = 442A5F61; +TimeStamp = /48553E53/442A5F61; Reference = C4; ValeurCmp = 0; -IdModule = C1-1; +IdModule = discret:C1-1; EndCmp BeginCmp -TimeStamp = 442A58B1; +TimeStamp = /48553E53/442A58B1; Reference = C5; ValeurCmp = 10nF; -IdModule = C1-1; +IdModule = discret:C1-1; EndCmp BeginCmp -TimeStamp = 442AA12B; +TimeStamp = /48553E7C/442AA12B; Reference = C6; ValeurCmp = 100nF; -IdModule = C1-1; +IdModule = discret:C1-1; EndCmp BeginCmp -TimeStamp = 442AA145; +TimeStamp = /48553E7C/442AA145; Reference = C7; ValeurCmp = 100nF; -IdModule = C1-1; +IdModule = discret:C1-1; EndCmp BeginCmp -TimeStamp = 4639BE2C; +TimeStamp = /48553E7C/4639BE2C; Reference = C8; ValeurCmp = 100nF; -IdModule = C1-1; +IdModule = discret:C1-1; EndCmp BeginCmp -TimeStamp = 464AD280; +TimeStamp = /48553E53/464AD280; Reference = C9; ValeurCmp = 22OnF; -IdModule = C1-1; +IdModule = discret:C1-1; EndCmp BeginCmp -TimeStamp = 442A500B; +TimeStamp = /48553E53/442A500B; Reference = D1; ValeurCmp = 1N4004; -IdModule = D5; +IdModule = discret:D5; EndCmp BeginCmp -TimeStamp = 442A4D1B; +TimeStamp = /48553E53/442A4D1B; Reference = D2; ValeurCmp = BAT43; -IdModule = D3; +IdModule = discret:D3; EndCmp BeginCmp -TimeStamp = 442A4D25; +TimeStamp = /48553E53/442A4D25; Reference = D3; ValeurCmp = BAT43; -IdModule = D3; +IdModule = discret:D3; EndCmp BeginCmp -TimeStamp = 442A4D5C; +TimeStamp = /48553E53/442A4D5C; Reference = D4; ValeurCmp = BAT43; -IdModule = D3; +IdModule = discret:D3; EndCmp BeginCmp -TimeStamp = 442A4D5D; +TimeStamp = /48553E53/442A4D5D; Reference = D5; ValeurCmp = BAT43; -IdModule = D3; +IdModule = discret:D3; EndCmp BeginCmp -TimeStamp = 442A4D64; +TimeStamp = /48553E53/442A4D64; Reference = D6; ValeurCmp = BAT43; -IdModule = D3; +IdModule = discret:D3; EndCmp BeginCmp -TimeStamp = 442A4D65; +TimeStamp = /48553E53/442A4D65; Reference = D7; ValeurCmp = BAT43; -IdModule = D3; +IdModule = discret:D3; EndCmp BeginCmp -TimeStamp = 442A4F5D; +TimeStamp = /48553E53/442A4F5D; Reference = D8; ValeurCmp = RED-LED; -IdModule = LEDV; +IdModule = discret:LEDV; EndCmp BeginCmp -TimeStamp = 442A5084; +TimeStamp = /48553E53/442A5084; Reference = D9; ValeurCmp = GREEN-LED; -IdModule = LEDV; +IdModule = discret:LEDV; EndCmp BeginCmp -TimeStamp = 442A6026; +TimeStamp = /48553E53/442A6026; Reference = D10; ValeurCmp = SCHOTTKY; -IdModule = D5; +IdModule = discret:D5; EndCmp BeginCmp -TimeStamp = 4639BA28; +TimeStamp = /48553E53/4639BA28; Reference = D11; ValeurCmp = BAT43; -IdModule = D3; +IdModule = discret:D3; EndCmp BeginCmp -TimeStamp = 4639B9EA; +TimeStamp = /48553E53/4639B9EA; Reference = D12; ValeurCmp = YELLOW-LED; -IdModule = LEDV; +IdModule = discret:LEDV; EndCmp BeginCmp -TimeStamp = 442A4C93; +TimeStamp = /48553E53/442A4C93; Reference = J1; ValeurCmp = DB9-FEMAL; -IdModule = DB9FC; +IdModule = connect:DB9FC; EndCmp BeginCmp -TimeStamp = 4639BAF8; +TimeStamp = /48553E53/4639BAF8; Reference = JP1; ValeurCmp = JUMPER; -IdModule = PIN_ARRAY_2X1; +IdModule = pin_array:PIN_ARRAY_2X1; EndCmp BeginCmp -TimeStamp = 442A57BE; +TimeStamp = /48553E53/442A57BE; Reference = L1; ValeurCmp = 22uH; -IdModule = INDUCTOR_V; +IdModule = inductors:INDUCTOR_V; EndCmp BeginCmp -TimeStamp = 442A4FE7; +TimeStamp = /48553E53/442A4FE7; Reference = P1; ValeurCmp = CONN_2; -IdModule = bornier2; +IdModule = connect:bornier2; EndCmp BeginCmp -TimeStamp = 4436967E; +TimeStamp = /48553E7C/4436967E; Reference = P2; ValeurCmp = SUPP28; IdModule = 28DIP-ELL300; EndCmp BeginCmp -TimeStamp = 442A88ED; +TimeStamp = /48553E7C/442A88ED; Reference = P3; ValeurCmp = SUPP40; IdModule = 40DIP-ELL600; EndCmp BeginCmp -TimeStamp = 442A4EB9; +TimeStamp = /48553E53/442A4EB9; Reference = Q1; ValeurCmp = BC237; -IdModule = TO92; +IdModule = discret:TO92; EndCmp BeginCmp -TimeStamp = 442A4F30; +TimeStamp = /48553E53/442A4F30; Reference = Q2; ValeurCmp = BC307; -IdModule = TO92; +IdModule = discret:TO92; EndCmp BeginCmp -TimeStamp = 4639B996; +TimeStamp = /48553E53/4639B996; Reference = Q3; ValeurCmp = BC307; -IdModule = TO92; +IdModule = discret:TO92; EndCmp BeginCmp -TimeStamp = 442A4CF4; +TimeStamp = /48553E53/442A4CF4; Reference = R1; ValeurCmp = 10K; -IdModule = R4; +IdModule = discret:R4; EndCmp BeginCmp -TimeStamp = 442A4CFB; +TimeStamp = /48553E53/442A4CFB; Reference = R2; ValeurCmp = 10K; -IdModule = R4; +IdModule = discret:R4; EndCmp BeginCmp -TimeStamp = 442A4D5A; +TimeStamp = /48553E53/442A4D5A; Reference = R3; ValeurCmp = 10K; -IdModule = R4; +IdModule = discret:R4; EndCmp BeginCmp -TimeStamp = 442A4D5B; +TimeStamp = /48553E53/442A4D5B; Reference = R4; ValeurCmp = 10K; -IdModule = R4; +IdModule = discret:R4; EndCmp BeginCmp -TimeStamp = 442A4D62; +TimeStamp = /48553E53/442A4D62; Reference = R5; ValeurCmp = 10K; -IdModule = R4; +IdModule = discret:R4; EndCmp BeginCmp -TimeStamp = 442A4D63; +TimeStamp = /48553E53/442A4D63; Reference = R6; ValeurCmp = 10K; -IdModule = R4; +IdModule = discret:R4; EndCmp BeginCmp -TimeStamp = 442A4F2A; +TimeStamp = /48553E53/442A4F2A; Reference = R7; ValeurCmp = 10K; -IdModule = R4; +IdModule = discret:R4; EndCmp BeginCmp -TimeStamp = 442A4D92; +TimeStamp = /48553E53/442A4D92; Reference = R8; ValeurCmp = 1K; -IdModule = R4; +IdModule = discret:R4; EndCmp BeginCmp -TimeStamp = 442A4F52; +TimeStamp = /48553E53/442A4F52; Reference = R9; ValeurCmp = 2.2K; -IdModule = R4; +IdModule = discret:R4; EndCmp BeginCmp -TimeStamp = 442A5F83; +TimeStamp = /48553E53/442A5F83; Reference = R10; ValeurCmp = 5,1K; -IdModule = R4; +IdModule = discret:R4; EndCmp BeginCmp -TimeStamp = 442A4F23; +TimeStamp = /48553E53/442A4F23; Reference = R11; ValeurCmp = 22K; -IdModule = R4; +IdModule = discret:R4; EndCmp BeginCmp -TimeStamp = 442A4D85; +TimeStamp = /48553E53/442A4D85; Reference = R12; ValeurCmp = 470; -IdModule = R4; +IdModule = discret:R4; EndCmp BeginCmp -TimeStamp = 442A4D8D; +TimeStamp = /48553E53/442A4D8D; Reference = R13; ValeurCmp = 470; -IdModule = R4; +IdModule = discret:R4; EndCmp BeginCmp -TimeStamp = 442A5083; +TimeStamp = /48553E53/442A5083; Reference = R14; ValeurCmp = 470; -IdModule = R4; +IdModule = discret:R4; EndCmp BeginCmp -TimeStamp = 442A58D7; +TimeStamp = /48553E53/442A58D7; Reference = R15; ValeurCmp = 6.2K; -IdModule = R4; +IdModule = discret:R4; EndCmp BeginCmp -TimeStamp = 442A58DC; +TimeStamp = /48553E53/442A58DC; Reference = R16; ValeurCmp = 62K; -IdModule = R4; +IdModule = discret:R4; EndCmp BeginCmp -TimeStamp = 442A50BF; +TimeStamp = /48553E53/442A50BF; Reference = R17; ValeurCmp = 22K; -IdModule = R4; +IdModule = discret:R4; EndCmp BeginCmp -TimeStamp = 44369638; +TimeStamp = /48553E53/44369638; Reference = R18; ValeurCmp = 220; -IdModule = R4; +IdModule = discret:R4; EndCmp BeginCmp -TimeStamp = 4639B9B0; +TimeStamp = /48553E53/4639B9B0; Reference = R19; ValeurCmp = 2.2K; -IdModule = R4; +IdModule = discret:R4; EndCmp BeginCmp -TimeStamp = 4639B9B3; +TimeStamp = /48553E53/4639B9B3; Reference = R20; ValeurCmp = 2.2K; -IdModule = R4; +IdModule = discret:R4; EndCmp BeginCmp -TimeStamp = 4639B9E9; +TimeStamp = /48553E53/4639B9E9; Reference = R21; ValeurCmp = 470; -IdModule = R4; +IdModule = discret:R4; EndCmp BeginCmp -TimeStamp = 443D0101; +TimeStamp = /48553E53/443D0101; Reference = RV1; ValeurCmp = 1K; -IdModule = RV2X4; +IdModule = discret:RV2X4; EndCmp BeginCmp -TimeStamp = 442A87F7; +TimeStamp = /48553E7C/442A87F7; Reference = U1; ValeurCmp = 24Cxx; -IdModule = 8DIP-ELL300; +IdModule = dip_sockets:DIP-8__300_ELL; EndCmp BeginCmp -TimeStamp = 442A4D6B; +TimeStamp = /48553E53/442A4D6B; Reference = U2; ValeurCmp = 74HC125; -IdModule = 14DIP-ELL300; +IdModule = dip_sockets:DIP-14__300_ELL; EndCmp BeginCmp -TimeStamp = 442A504A; +TimeStamp = /48553E53/442A504A; Reference = U3; ValeurCmp = 7805; -IdModule = LM78XX; +IdModule = discret:LM78XX; EndCmp BeginCmp -TimeStamp = 442A5E20; +TimeStamp = /48553E53/442A5E20; Reference = U4; ValeurCmp = LT1373; -IdModule = 8DIP-ELL300; +IdModule = dip_sockets:DIP-8__300_ELL; EndCmp BeginCmp -TimeStamp = 442A81A7; +TimeStamp = /48553E7C/442A81A7; Reference = U5; ValeurCmp = PIC_18_PINS; -IdModule = 18DIP-ELL300; +IdModule = dip_sockets:DIP-18__300_ELL; EndCmp BeginCmp -TimeStamp = 442A81A5; +TimeStamp = /48553E7C/442A81A5; Reference = U6; ValeurCmp = PIC_8_PINS; -IdModule = 8DIP-ELL300; +IdModule = dip_sockets:DIP-8__300_ELL; EndCmp EndListe diff --git a/demos/flat_hierarchy/flat_hierarchy.kicad_pcb b/demos/flat_hierarchy/flat_hierarchy.kicad_pcb index a1343c8db0..b43c7ea596 100644 --- a/demos/flat_hierarchy/flat_hierarchy.kicad_pcb +++ b/demos/flat_hierarchy/flat_hierarchy.kicad_pcb @@ -1,15 +1,15 @@ -(kicad_pcb (version 4) (host pcbnew "(2014-07-02 BZR 4969)-product") +(kicad_pcb (version 4) (host pcbnew "(2014-07-04 BZR 4974)-product") (general - (links 132) + (links 133) (no_connects 0) - (area 56.743599 40.0558 233.870501 139.890501) + (area 73.469499 40.449499 233.870501 139.890501) (thickness 1.6) (drawings 24) (tracks 355) (zones 0) (modules 64) - (nets 36) + (nets 35) ) (page A4) @@ -64,6 +64,7 @@ (visible_elements 7FFFFFFF) (pcbplotparams (layerselection 0x00030_80000001) + (usegerberextensions false) (excludeedgelayer false) (linewidth 0.150000) (plotframeref false) @@ -90,40 +91,39 @@ (net 0 "") (net 1 /pic_programmer/CTS) - (net 2 /pic_programmer/PC-DATA-OUT) - (net 3 /pic_programmer/RTS) - (net 4 /pic_programmer/TXD) - (net 5 /sockets/CLOCK-RB6) - (net 6 /sockets/DATA-RB7) - (net 7 /sockets/VCC_PIC) - (net 8 /sockets/VPP-MCLR) - (net 9 GND) - (net 10 N-000009) - (net 11 N-000010) - (net 12 N-000011) - (net 13 N-000013) - (net 14 N-000015) - (net 15 N-000016) - (net 16 N-000017) - (net 17 N-000018) - (net 18 N-000021) - (net 19 N-000022) - (net 20 N-000023) - (net 21 N-000024) - (net 22 N-000025) - (net 23 N-000026) - (net 24 N-000027) - (net 25 N-000028) - (net 26 N-000029) - (net 27 N-000030) - (net 28 N-000031) - (net 29 N-000032) - (net 30 N-000033) - (net 31 N-000034) - (net 32 N-000036) - (net 33 N-000038) - (net 34 VCC) - (net 35 VPP) + (net 2 /pic_programmer/TXD) + (net 3 GND) + (net 4 VCC) + (net 5 VPP) + (net 6 VCC_PIC) + (net 7 /pic_programmer/DTR) + (net 8 /pic_programmer/PC-CLOCK-OUT) + (net 9 VPP-MCLR) + (net 10 CLOCK-RB6) + (net 11 DATA-RB7) + (net 12 "Net-(C2-Pad1)") + (net 13 "Net-(C4-Pad1)") + (net 14 "Net-(C5-Pad1)") + (net 15 "Net-(C9-Pad2)") + (net 16 "Net-(D1-Pad1)") + (net 17 "Net-(D2-Pad1)") + (net 18 "Net-(D4-Pad1)") + (net 19 "Net-(D6-Pad1)") + (net 20 "Net-(D8-Pad1)") + (net 21 "Net-(D9-Pad1)") + (net 22 "Net-(D10-Pad1)") + (net 23 "Net-(D11-Pad2)") + (net 24 "Net-(D11-Pad1)") + (net 25 "Net-(D12-Pad1)") + (net 26 "Net-(Q1-Pad2)") + (net 27 "Net-(Q2-Pad3)") + (net 28 "Net-(Q3-Pad2)") + (net 29 "Net-(R8-Pad1)") + (net 30 "Net-(R12-Pad1)") + (net 31 "Net-(R13-Pad1)") + (net 32 "Net-(R15-Pad1)") + (net 33 "Net-(R16-Pad1)") + (net 34 "Net-(RV1-Pad2)") (net_class Default "Ceci est la Netclass par défaut" (clearance 0.254) @@ -133,280 +133,42 @@ (uvia_dia 0.508) (uvia_drill 0.127) (add_net /pic_programmer/CTS) - (add_net /pic_programmer/PC-DATA-OUT) - (add_net /pic_programmer/RTS) + (add_net /pic_programmer/DTR) + (add_net /pic_programmer/PC-CLOCK-OUT) (add_net /pic_programmer/TXD) - (add_net /sockets/CLOCK-RB6) - (add_net /sockets/DATA-RB7) - (add_net /sockets/VCC_PIC) - (add_net /sockets/VPP-MCLR) + (add_net CLOCK-RB6) + (add_net DATA-RB7) (add_net GND) - (add_net N-000009) - (add_net N-000010) - (add_net N-000011) - (add_net N-000013) - (add_net N-000015) - (add_net N-000016) - (add_net N-000017) - (add_net N-000018) - (add_net N-000021) - (add_net N-000022) - (add_net N-000023) - (add_net N-000024) - (add_net N-000025) - (add_net N-000026) - (add_net N-000027) - (add_net N-000028) - (add_net N-000029) - (add_net N-000030) - (add_net N-000031) - (add_net N-000032) - (add_net N-000033) - (add_net N-000034) - (add_net N-000036) - (add_net N-000038) + (add_net N-0000092) + (add_net "Net-(C2-Pad1)") + (add_net "Net-(C4-Pad1)") + (add_net "Net-(C5-Pad1)") + (add_net "Net-(C9-Pad2)") + (add_net "Net-(D1-Pad1)") + (add_net "Net-(D10-Pad1)") + (add_net "Net-(D11-Pad1)") + (add_net "Net-(D11-Pad2)") + (add_net "Net-(D12-Pad1)") + (add_net "Net-(D2-Pad1)") + (add_net "Net-(D4-Pad1)") + (add_net "Net-(D6-Pad1)") + (add_net "Net-(D8-Pad1)") + (add_net "Net-(D9-Pad1)") + (add_net "Net-(P3-Pad17)") + (add_net "Net-(Q1-Pad2)") + (add_net "Net-(Q2-Pad3)") + (add_net "Net-(Q3-Pad2)") + (add_net "Net-(R12-Pad1)") + (add_net "Net-(R13-Pad1)") + (add_net "Net-(R15-Pad1)") + (add_net "Net-(R16-Pad1)") + (add_net "Net-(R8-Pad1)") + (add_net "Net-(RV1-Pad2)") + (add_net "Net-(U5-Pad15)") (add_net VCC) + (add_net VCC_PIC) (add_net VPP) - ) - - (module INDUCTOR_V (layer Composant) (tedit 443CBA90) (tstamp 442A57BE) - (at 125.73 64.77 270) - (descr "Inductor (vertical)") - (tags INDUCTOR) - (path /48553E53/442A57BE) - (fp_text reference L1 (at 0.508 2.032 270) (layer F.SilkS) - (effects (font (thickness 0.2032))) - ) - (fp_text value 22uH (at 0.254 -2.032 270) (layer F.SilkS) - (effects (font (size 1.27 1.27) (thickness 0.2032))) - ) - (fp_circle (center 0 0) (end 3.81 0) (layer F.SilkS) (width 0.381)) - (pad 1 thru_hole rect (at -2.54 0 270) (size 1.905 1.905) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 19 N-000022)) - (pad 2 thru_hole circle (at 2.54 0 270) (size 1.905 1.905) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 34 VCC)) - (model discret/inductorV.wrl - (at (xyz 0 0 0)) - (scale (xyz 2 2 2)) - (rotate (xyz 0 0 0)) - ) - ) - - (module 14DIP-ELL300 (layer Composant) (tedit 200000) (tstamp 442A4D6B) - (at 123.19 115.57) - (descr "Module Dil 14 pins, pads elliptiques") - (tags DIL) - (path /48553E53/442A4D6B) - (fp_text reference U2 (at -5.08 -1.27) (layer F.SilkS) - (effects (font (size 1.524 1.143) (thickness 0.3048))) - ) - (fp_text value 74HC125 (at 1.27 1.27) (layer F.SilkS) - (effects (font (size 1.524 1.143) (thickness 0.3048))) - ) - (fp_line (start -10.16 -2.54) (end 10.16 -2.54) (layer F.SilkS) (width 0.381)) - (fp_line (start 10.16 2.54) (end -10.16 2.54) (layer F.SilkS) (width 0.381)) - (fp_line (start -10.16 2.54) (end -10.16 -2.54) (layer F.SilkS) (width 0.381)) - (fp_line (start -10.16 -1.27) (end -8.89 -1.27) (layer F.SilkS) (width 0.381)) - (fp_line (start -8.89 -1.27) (end -8.89 1.27) (layer F.SilkS) (width 0.381)) - (fp_line (start -8.89 1.27) (end -10.16 1.27) (layer F.SilkS) (width 0.381)) - (fp_line (start 10.16 -2.54) (end 10.16 2.54) (layer F.SilkS) (width 0.381)) - (pad 1 thru_hole rect (at -7.62 3.81) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) - (pad 2 thru_hole oval (at -5.08 3.81) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 29 N-000032)) - (pad 3 thru_hole oval (at -2.54 3.81) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 12 N-000011)) - (pad 4 thru_hole oval (at 0 3.81) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) - (pad 5 thru_hole oval (at 2.54 3.81) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 33 N-000038)) - (pad 6 thru_hole oval (at 5.08 3.81) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 10 N-000009)) - (pad 7 thru_hole oval (at 7.62 3.81) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) - (pad 8 thru_hole oval (at 7.62 -3.81) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 11 N-000010)) - (pad 9 thru_hole oval (at 5.08 -3.81) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 32 N-000036)) - (pad 10 thru_hole oval (at 2.54 -3.81) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) - (pad 11 thru_hole oval (at 0 -3.81) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 1 /pic_programmer/CTS)) - (pad 12 thru_hole oval (at -2.54 -3.81) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 6 /sockets/DATA-RB7)) - (pad 13 thru_hole oval (at -5.08 -3.81) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) - (pad 14 thru_hole oval (at -7.62 -3.81) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 34 VCC)) - (model dil/dil_14.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module 18DIP-ELL300 (layer Composant) (tedit 49684D7D) (tstamp 442A81A7) - (at 211.455 118.11 270) - (descr "Module Dil 18 pins, pads elliptiques") - (path /48553E7C/442A81A7) - (fp_text reference U5 (at -7.62 -1.27 270) (layer F.SilkS) - (effects (font (size 1.778 1.143) (thickness 0.3048))) - ) - (fp_text value PIC_18_PINS (at 1.524 1.016 270) (layer F.SilkS) - (effects (font (size 1.778 1.143) (thickness 0.3048))) - ) - (fp_line (start -12.7 -1.27) (end -11.43 -1.27) (layer F.SilkS) (width 0.381)) - (fp_line (start -11.43 -1.27) (end -11.43 1.27) (layer F.SilkS) (width 0.381)) - (fp_line (start -11.43 1.27) (end -12.7 1.27) (layer F.SilkS) (width 0.381)) - (fp_line (start -12.7 -2.54) (end 12.7 -2.54) (layer F.SilkS) (width 0.381)) - (fp_line (start 12.7 -2.54) (end 12.7 2.54) (layer F.SilkS) (width 0.381)) - (fp_line (start 12.7 2.54) (end -12.7 2.54) (layer F.SilkS) (width 0.381)) - (fp_line (start -12.7 2.54) (end -12.7 -2.54) (layer F.SilkS) (width 0.381)) - (pad 1 thru_hole rect (at -10.16 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) - (pad 2 thru_hole oval (at -7.62 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) - (pad 3 thru_hole oval (at -5.08 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) - (pad 4 thru_hole oval (at -2.54 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 8 /sockets/VPP-MCLR)) - (pad 5 thru_hole oval (at 0 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) - (pad 6 thru_hole oval (at 2.54 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) - (pad 7 thru_hole oval (at 5.08 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) - (pad 8 thru_hole oval (at 7.62 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) - (pad 9 thru_hole oval (at 10.16 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) - (pad 10 thru_hole oval (at 10.16 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) - (pad 11 thru_hole oval (at 7.62 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) - (pad 12 thru_hole oval (at 5.08 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 5 /sockets/CLOCK-RB6)) - (pad 13 thru_hole oval (at 2.54 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 6 /sockets/DATA-RB7)) - (pad 14 thru_hole oval (at 0 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 7 /sockets/VCC_PIC)) - (pad 15 thru_hole oval (at -2.54 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) - (pad 16 thru_hole oval (at -5.08 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) - (pad 17 thru_hole oval (at -7.62 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) - (pad 18 thru_hole oval (at -10.16 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) - (model dil/dil_18.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module 8DIP-ELL300 (layer Composant) (tedit 49684FB4) (tstamp 442A87F7) - (at 182.88 113.03 270) - (descr "Module Dil 8 pins, pads elliptiques") - (tags DIL) - (path /48553E7C/442A87F7) - (fp_text reference U1 (at -6.35 0 360) (layer F.SilkS) - (effects (font (size 1.778 1.143) (thickness 0.3048))) - ) - (fp_text value 24Cxx (at 0 0 270) (layer F.SilkS) - (effects (font (size 1.778 1.016) (thickness 0.3048))) - ) - (fp_line (start -5.08 -1.27) (end -3.81 -1.27) (layer F.SilkS) (width 0.381)) - (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer F.SilkS) (width 0.381)) - (fp_line (start -3.81 1.27) (end -5.08 1.27) (layer F.SilkS) (width 0.381)) - (fp_line (start -5.08 -2.54) (end 5.08 -2.54) (layer F.SilkS) (width 0.381)) - (fp_line (start 5.08 -2.54) (end 5.08 2.54) (layer F.SilkS) (width 0.381)) - (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer F.SilkS) (width 0.381)) - (fp_line (start -5.08 2.54) (end -5.08 -2.54) (layer F.SilkS) (width 0.381)) - (pad 1 thru_hole rect (at -3.81 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) - (pad 2 thru_hole oval (at -1.27 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) - (pad 3 thru_hole oval (at 1.27 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) - (pad 4 thru_hole oval (at 3.81 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) - (pad 5 thru_hole oval (at 3.81 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 6 /sockets/DATA-RB7)) - (pad 6 thru_hole oval (at 1.27 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 5 /sockets/CLOCK-RB6)) - (pad 7 thru_hole oval (at -1.27 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) - (pad 8 thru_hole oval (at -3.81 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 34 VCC)) - (model dil/dil_8.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module 8DIP-ELL300 (layer Composant) (tedit 4433B099) (tstamp 442A5E20) - (at 114.3 60.96 270) - (descr "Module Dil 8 pins, pads elliptiques") - (tags DIL) - (path /48553E53/442A5E20) - (fp_text reference U4 (at -6.35 0 360) (layer F.SilkS) - (effects (font (size 1.27 1.143) (thickness 0.3048))) - ) - (fp_text value LT1373 (at 0 0 270) (layer F.SilkS) - (effects (font (size 1.778 1.016) (thickness 0.3048))) - ) - (fp_line (start -5.08 -1.27) (end -3.81 -1.27) (layer F.SilkS) (width 0.381)) - (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer F.SilkS) (width 0.381)) - (fp_line (start -3.81 1.27) (end -5.08 1.27) (layer F.SilkS) (width 0.381)) - (fp_line (start -5.08 -2.54) (end 5.08 -2.54) (layer F.SilkS) (width 0.381)) - (fp_line (start 5.08 -2.54) (end 5.08 2.54) (layer F.SilkS) (width 0.381)) - (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer F.SilkS) (width 0.381)) - (fp_line (start -5.08 2.54) (end -5.08 -2.54) (layer F.SilkS) (width 0.381)) - (pad 1 thru_hole rect (at -3.81 3.81 270) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 18 N-000021)) - (pad 2 thru_hole oval (at -1.27 3.81 270) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 22 N-000025)) - (pad 3 thru_hole oval (at 1.27 3.81 270) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) - (pad 4 thru_hole oval (at 3.81 3.81 270) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) - (pad 5 thru_hole oval (at 3.81 -3.81 270) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 34 VCC)) - (pad 6 thru_hole oval (at 1.27 -3.81 270) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) - (pad 7 thru_hole oval (at -1.27 -3.81 270) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) - (pad 8 thru_hole oval (at -3.81 -3.81 270) (size 1.5748 2.286) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 19 N-000022)) - (model dil/dil_8.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module 8DIP-ELL300 (layer Composant) (tedit 49684D2B) (tstamp 442A81A5) - (at 182.88 124.46 270) - (descr "Module Dil 8 pins, pads elliptiques") - (tags DIL) - (path /48553E7C/442A81A5) - (fp_text reference U6 (at -6.35 0 360) (layer F.SilkS) - (effects (font (size 1.778 1.143) (thickness 0.3048))) - ) - (fp_text value PIC_8_PINS (at 0 0 270) (layer F.SilkS) - (effects (font (size 1.778 1.016) (thickness 0.3048))) - ) - (fp_line (start -5.08 -1.27) (end -3.81 -1.27) (layer F.SilkS) (width 0.381)) - (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer F.SilkS) (width 0.381)) - (fp_line (start -3.81 1.27) (end -5.08 1.27) (layer F.SilkS) (width 0.381)) - (fp_line (start -5.08 -2.54) (end 5.08 -2.54) (layer F.SilkS) (width 0.381)) - (fp_line (start 5.08 -2.54) (end 5.08 2.54) (layer F.SilkS) (width 0.381)) - (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer F.SilkS) (width 0.381)) - (fp_line (start -5.08 2.54) (end -5.08 -2.54) (layer F.SilkS) (width 0.381)) - (pad 1 thru_hole rect (at -3.81 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 7 /sockets/VCC_PIC)) - (pad 2 thru_hole oval (at -1.27 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) - (pad 3 thru_hole oval (at 1.27 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) - (pad 4 thru_hole oval (at 3.81 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 8 /sockets/VPP-MCLR)) - (pad 5 thru_hole oval (at 3.81 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) - (pad 6 thru_hole oval (at 1.27 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 5 /sockets/CLOCK-RB6)) - (pad 7 thru_hole oval (at -1.27 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 6 /sockets/DATA-RB7)) - (pad 8 thru_hole oval (at -3.81 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) - (model dil/dil_8.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) + (add_net VPP-MCLR) ) (module 28DIP-ELL300 (layer Composant) (tedit 49684DDC) (tstamp 4436967E) @@ -434,7 +196,7 @@ (pad 6 thru_hole oval (at -3.81 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) (pad 7 thru_hole oval (at -1.27 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) (pad 8 thru_hole oval (at 1.27 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) + (net 3 GND)) (pad 9 thru_hole oval (at 3.81 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) (pad 10 thru_hole oval (at 6.35 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) (pad 11 thru_hole oval (at 8.89 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) @@ -442,15 +204,15 @@ (pad 13 thru_hole oval (at 13.97 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) (pad 14 thru_hole oval (at 16.51 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) (pad 1 thru_hole rect (at -16.51 3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 8 /sockets/VPP-MCLR)) + (net 9 VPP-MCLR)) (pad 15 thru_hole oval (at 16.51 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) (pad 16 thru_hole oval (at 13.97 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) (pad 17 thru_hole oval (at 11.43 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) (pad 18 thru_hole oval (at 8.89 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) (pad 19 thru_hole oval (at 6.35 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) + (net 3 GND)) (pad 20 thru_hole oval (at 3.81 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 7 /sockets/VCC_PIC)) + (net 6 VCC_PIC)) (pad 21 thru_hole oval (at 1.27 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) (pad 22 thru_hole oval (at -1.27 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) (pad 23 thru_hole oval (at -3.81 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) @@ -458,9 +220,9 @@ (pad 25 thru_hole oval (at -8.89 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) (pad 26 thru_hole oval (at -11.43 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) (pad 27 thru_hole oval (at -13.97 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 5 /sockets/CLOCK-RB6)) + (net 10 CLOCK-RB6)) (pad 28 thru_hole oval (at -16.51 -3.81 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 6 /sockets/DATA-RB7)) + (net 11 DATA-RB7)) (model dil/dil_28-w300.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -487,7 +249,7 @@ (fp_line (start 26.67 6.35) (end -26.67 6.35) (layer F.SilkS) (width 0.381)) (fp_line (start -26.67 6.35) (end -26.67 -6.35) (layer F.SilkS) (width 0.381)) (pad 1 thru_hole rect (at -24.13 7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 8 /sockets/VPP-MCLR)) + (net 9 VPP-MCLR)) (pad 2 thru_hole oval (at -21.59 7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) (pad 3 thru_hole oval (at -19.05 7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) (pad 4 thru_hole oval (at -16.51 7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) @@ -495,13 +257,13 @@ (pad 6 thru_hole oval (at -11.43 7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) (pad 7 thru_hole oval (at -8.89 7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) (pad 8 thru_hole oval (at -6.35 7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) + (net 3 GND)) (pad 9 thru_hole oval (at -3.81 7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) (pad 10 thru_hole oval (at -1.27 7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) (pad 11 thru_hole oval (at 1.27 7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 7 /sockets/VCC_PIC)) + (net 6 VCC_PIC)) (pad 12 thru_hole oval (at 3.81 7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) + (net 3 GND)) (pad 13 thru_hole oval (at 6.35 7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) (pad 14 thru_hole oval (at 8.89 7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) (pad 15 thru_hole oval (at 11.43 7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) @@ -521,9 +283,9 @@ (pad 29 thru_hole oval (at 3.81 -7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) (pad 30 thru_hole oval (at 1.27 -7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) (pad 31 thru_hole oval (at -1.27 -7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) + (net 3 GND)) (pad 32 thru_hole oval (at -3.81 -7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 7 /sockets/VCC_PIC)) + (net 6 VCC_PIC)) (pad 33 thru_hole oval (at -6.35 -7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) (pad 34 thru_hole oval (at -8.89 -7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) (pad 35 thru_hole oval (at -11.43 -7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) @@ -531,9 +293,9 @@ (pad 37 thru_hole oval (at -16.51 -7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) (pad 38 thru_hole oval (at -19.05 -7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS)) (pad 39 thru_hole oval (at -21.59 -7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 5 /sockets/CLOCK-RB6)) + (net 10 CLOCK-RB6)) (pad 40 thru_hole oval (at -24.13 -7.62 270) (size 1.5748 2.794) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 6 /sockets/DATA-RB7)) + (net 11 DATA-RB7)) (model dil\dil_40-w600.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -541,1341 +303,6 @@ ) ) - (module D5 (layer Composant) (tedit 200000) (tstamp 442A6026) - (at 130.81 57.15) - (descr "Diode 5 pas") - (tags "DIODE DEV") - (path /48553E53/442A6026) - (fp_text reference D10 (at 0 0) (layer F.SilkS) - (effects (font (size 1.524 1.016) (thickness 0.3048))) - ) - (fp_text value SCHOTTKY (at -0.254 0) (layer F.SilkS) hide - (effects (font (size 1.524 1.016) (thickness 0.3048))) - ) - (fp_line (start 6.35 0) (end 5.08 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 5.08 -1.27) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 -1.27) (end -5.08 -1.27) (layer F.SilkS) (width 0.3048)) - (fp_line (start -5.08 -1.27) (end -5.08 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -5.08 0) (end -6.35 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -5.08 0) (end -5.08 1.27) (layer F.SilkS) (width 0.3048)) - (fp_line (start -5.08 1.27) (end 5.08 1.27) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 1.27) (end 5.08 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start 3.81 -1.27) (end 3.81 1.27) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.27) (end 4.064 1.27) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -6.35 0) (size 1.778 1.778) (drill 1.143) (layers *.Cu *.Mask F.SilkS) - (net 19 N-000022)) - (pad 2 thru_hole rect (at 6.35 0) (size 1.778 1.778) (drill 1.143) (layers *.Cu *.Mask F.SilkS) - (net 35 VPP)) - (model discret/diode.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.5 0.5 0.5)) - (rotate (xyz 0 0 0)) - ) - ) - - (module D5 (layer Composant) (tedit 200000) (tstamp 442A500B) - (at 87.63 64.77 270) - (descr "Diode 5 pas") - (tags "DIODE DEV") - (path /48553E53/442A500B) - (fp_text reference D1 (at 0 0 270) (layer F.SilkS) - (effects (font (size 1.524 1.016) (thickness 0.3048))) - ) - (fp_text value 1N4004 (at -0.254 0 270) (layer F.SilkS) hide - (effects (font (size 1.524 1.016) (thickness 0.3048))) - ) - (fp_line (start 6.35 0) (end 5.08 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 5.08 -1.27) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 -1.27) (end -5.08 -1.27) (layer F.SilkS) (width 0.3048)) - (fp_line (start -5.08 -1.27) (end -5.08 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -5.08 0) (end -6.35 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -5.08 0) (end -5.08 1.27) (layer F.SilkS) (width 0.3048)) - (fp_line (start -5.08 1.27) (end 5.08 1.27) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 1.27) (end 5.08 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start 3.81 -1.27) (end 3.81 1.27) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.27) (end 4.064 1.27) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -6.35 0 270) (size 1.778 1.778) (drill 1.143) (layers *.Cu *.Mask F.SilkS) - (net 15 N-000016)) - (pad 2 thru_hole rect (at 6.35 0 270) (size 1.778 1.778) (drill 1.143) (layers *.Cu *.Mask F.SilkS) - (net 30 N-000033)) - (model discret/diode.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.5 0.5 0.5)) - (rotate (xyz 0 0 0)) - ) - ) - - (module D3 (layer Composant) (tedit 200000) (tstamp 442A4D65) - (at 104.14 115.57) - (descr "Diode 3 pas") - (tags "DIODE DEV") - (path /48553E53/442A4D65) - (fp_text reference D7 (at 0 0) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_text value BAT43 (at 0 0) (layer F.SilkS) hide - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_line (start 3.81 0) (end 3.048 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start 3.048 0) (end 3.048 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.048 -1.016) (end -3.048 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.81 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.048 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 3.048 1.016) (end 3.048 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer F.SilkS) (width 0.3048)) - (pad 2 thru_hole rect (at 3.81 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 32 N-000036)) - (pad 1 thru_hole circle (at -3.81 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) - (model discret/diode.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.3 0.3 0.3)) - (rotate (xyz 0 0 0)) - ) - ) - - (module D3 (layer Composant) (tedit 200000) (tstamp 442A4D1B) - (at 104.14 118.11) - (descr "Diode 3 pas") - (tags "DIODE DEV") - (path /48553E53/442A4D1B) - (fp_text reference D2 (at 0 0) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_text value BAT43 (at 0 0) (layer F.SilkS) hide - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_line (start 3.81 0) (end 3.048 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start 3.048 0) (end 3.048 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.048 -1.016) (end -3.048 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.81 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.048 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 3.048 1.016) (end 3.048 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer F.SilkS) (width 0.3048)) - (pad 2 thru_hole rect (at 3.81 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 34 VCC)) - (pad 1 thru_hole circle (at -3.81 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 29 N-000032)) - (model discret/diode.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.3 0.3 0.3)) - (rotate (xyz 0 0 0)) - ) - ) - - (module D3 (layer Composant) (tedit 200000) (tstamp 442A4D25) - (at 104.14 121.92) - (descr "Diode 3 pas") - (tags "DIODE DEV") - (path /48553E53/442A4D25) - (fp_text reference D3 (at 0 0) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_text value BAT43 (at 0 0) (layer F.SilkS) hide - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_line (start 3.81 0) (end 3.048 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start 3.048 0) (end 3.048 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.048 -1.016) (end -3.048 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.81 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.048 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 3.048 1.016) (end 3.048 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer F.SilkS) (width 0.3048)) - (pad 2 thru_hole rect (at 3.81 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 29 N-000032)) - (pad 1 thru_hole circle (at -3.81 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) - (model discret/diode.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.3 0.3 0.3)) - (rotate (xyz 0 0 0)) - ) - ) - - (module D3 (layer Composant) (tedit 200000) (tstamp 442A4D5C) - (at 104.14 111.76) - (descr "Diode 3 pas") - (tags "DIODE DEV") - (path /48553E53/442A4D5C) - (fp_text reference D4 (at 0 0) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_text value BAT43 (at 0 0) (layer F.SilkS) hide - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_line (start 3.81 0) (end 3.048 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start 3.048 0) (end 3.048 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.048 -1.016) (end -3.048 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.81 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.048 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 3.048 1.016) (end 3.048 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer F.SilkS) (width 0.3048)) - (pad 2 thru_hole rect (at 3.81 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 34 VCC)) - (pad 1 thru_hole circle (at -3.81 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 33 N-000038)) - (model discret/diode.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.3 0.3 0.3)) - (rotate (xyz 0 0 0)) - ) - ) - - (module D3 (layer Composant) (tedit 200000) (tstamp 442A4D5D) - (at 104.14 109.22) - (descr "Diode 3 pas") - (tags "DIODE DEV") - (path /48553E53/442A4D5D) - (fp_text reference D5 (at 0 0) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_text value BAT43 (at 0 0) (layer F.SilkS) hide - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_line (start 3.81 0) (end 3.048 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start 3.048 0) (end 3.048 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.048 -1.016) (end -3.048 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.81 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.048 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 3.048 1.016) (end 3.048 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer F.SilkS) (width 0.3048)) - (pad 2 thru_hole rect (at 3.81 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 33 N-000038)) - (pad 1 thru_hole circle (at -3.81 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) - (model discret/diode.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.3 0.3 0.3)) - (rotate (xyz 0 0 0)) - ) - ) - - (module D3 (layer Composant) (tedit 200000) (tstamp 442A4D64) - (at 104.14 124.46) - (descr "Diode 3 pas") - (tags "DIODE DEV") - (path /48553E53/442A4D64) - (fp_text reference D6 (at 0 0) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_text value BAT43 (at 0 0) (layer F.SilkS) hide - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_line (start 3.81 0) (end 3.048 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start 3.048 0) (end 3.048 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.048 -1.016) (end -3.048 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.81 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.048 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 3.048 1.016) (end 3.048 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer F.SilkS) (width 0.3048)) - (pad 2 thru_hole rect (at 3.81 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 34 VCC)) - (pad 1 thru_hole circle (at -3.81 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 32 N-000036)) - (model discret/diode.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.3 0.3 0.3)) - (rotate (xyz 0 0 0)) - ) - ) - - (module D3 (layer Composant) (tedit 200000) (tstamp 4639BA28) - (at 142.875 80.645 180) - (descr "Diode 3 pas") - (tags "DIODE DEV") - (path /48553E53/4639BA28) - (fp_text reference D11 (at 0 0 180) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_text value BAT43 (at 0 0 180) (layer F.SilkS) hide - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_line (start 3.81 0) (end 3.048 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start 3.048 0) (end 3.048 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.048 -1.016) (end -3.048 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.81 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.048 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 3.048 1.016) (end 3.048 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer F.SilkS) (width 0.3048)) - (pad 2 thru_hole rect (at 3.81 0 180) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 26 N-000029)) - (pad 1 thru_hole circle (at -3.81 0 180) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 25 N-000028)) - (model discret/diode.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.3 0.3 0.3)) - (rotate (xyz 0 0 0)) - ) - ) - - (module R4 (layer Composant) (tedit 200000) (tstamp 442A4F23) - (at 139.065 66.04 90) - (descr "Resitance 4 pas") - (tags R) - (path /48553E53/442A4F23) - (autoplace_cost180 10) - (fp_text reference R11 (at 0 0 90) (layer F.SilkS) - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_text value 22K (at 0 0 90) (layer F.SilkS) hide - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 0 90) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 26 N-000029)) - (pad 2 thru_hole circle (at 5.08 0 90) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 31 N-000034)) - (model discret/resistor.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.4 0.4 0.4)) - (rotate (xyz 0 0 0)) - ) - ) - - (module R4 (layer Composant) (tedit 200000) (tstamp 442A5F83) - (at 119.38 48.26) - (descr "Resitance 4 pas") - (tags R) - (path /48553E53/442A5F83) - (autoplace_cost180 10) - (fp_text reference R10 (at 0 0) (layer F.SilkS) - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_text value 5,1K (at 0 0) (layer F.SilkS) hide - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 18 N-000021)) - (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 17 N-000018)) - (model discret/resistor.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.4 0.4 0.4)) - (rotate (xyz 0 0 0)) - ) - ) - - (module R4 (layer Composant) (tedit 200000) (tstamp 442A4D8D) - (at 140.335 116.84 270) - (descr "Resitance 4 pas") - (tags R) - (path /48553E53/442A4D8D) - (autoplace_cost180 10) - (fp_text reference R13 (at 0 0 270) (layer F.SilkS) - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_text value 470 (at 0 0 270) (layer F.SilkS) hide - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 0 270) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 11 N-000010)) - (pad 2 thru_hole circle (at 5.08 0 270) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 5 /sockets/CLOCK-RB6)) - (model discret/resistor.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.4 0.4 0.4)) - (rotate (xyz 0 0 0)) - ) - ) - - (module R4 (layer Composant) (tedit 200000) (tstamp 442A5083) - (at 144.145 87.63) - (descr "Resitance 4 pas") - (tags R) - (path /48553E53/442A5083) - (autoplace_cost180 10) - (fp_text reference R14 (at 0 0) (layer F.SilkS) - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_text value 470 (at 0 0) (layer F.SilkS) hide - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 34 VCC)) - (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 16 N-000017)) - (model discret/resistor.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.4 0.4 0.4)) - (rotate (xyz 0 0 0)) - ) - ) - - (module R4 (layer Composant) (tedit 200000) (tstamp 442A58D7) - (at 123.19 78.74) - (descr "Resitance 4 pas") - (tags R) - (path /48553E53/442A58D7) - (autoplace_cost180 10) - (fp_text reference R15 (at 0 0) (layer F.SilkS) - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_text value 6.2K (at 0 0) (layer F.SilkS) hide - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 20 N-000023)) - (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) - (model discret/resistor.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.4 0.4 0.4)) - (rotate (xyz 0 0 0)) - ) - ) - - (module R4 (layer Composant) (tedit 200000) (tstamp 442A4CFB) - (at 92.71 115.57) - (descr "Resitance 4 pas") - (tags R) - (path /48553E53/442A4CFB) - (autoplace_cost180 10) - (fp_text reference R2 (at 0 0) (layer F.SilkS) - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_text value 10K (at 0 0) (layer F.SilkS) hide - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 4 /pic_programmer/TXD)) - (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) - (model discret/resistor.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.4 0.4 0.4)) - (rotate (xyz 0 0 0)) - ) - ) - - (module R4 (layer Composant) (tedit 200000) (tstamp 442A4D5A) - (at 92.71 111.76) - (descr "Resitance 4 pas") - (tags R) - (path /48553E53/442A4D5A) - (autoplace_cost180 10) - (fp_text reference R3 (at 0 0) (layer F.SilkS) - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_text value 10K (at 0 0) (layer F.SilkS) hide - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 2 /pic_programmer/PC-DATA-OUT)) - (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 33 N-000038)) - (model discret/resistor.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.4 0.4 0.4)) - (rotate (xyz 0 0 0)) - ) - ) - - (module R4 (layer Composant) (tedit 200000) (tstamp 442A4D5B) - (at 92.71 109.22) - (descr "Resitance 4 pas") - (tags R) - (path /48553E53/442A4D5B) - (autoplace_cost180 10) - (fp_text reference R4 (at 0 0) (layer F.SilkS) - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_text value 10K (at 0 0) (layer F.SilkS) hide - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 2 /pic_programmer/PC-DATA-OUT)) - (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) - (model discret/resistor.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.4 0.4 0.4)) - (rotate (xyz 0 0 0)) - ) - ) - - (module R4 (layer Composant) (tedit 200000) (tstamp 442A4D62) - (at 92.71 124.46) - (descr "Resitance 4 pas") - (tags R) - (path /48553E53/442A4D62) - (autoplace_cost180 10) - (fp_text reference R5 (at 0 0) (layer F.SilkS) - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_text value 10K (at 0 0) (layer F.SilkS) hide - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 3 /pic_programmer/RTS)) - (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 32 N-000036)) - (model discret/resistor.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.4 0.4 0.4)) - (rotate (xyz 0 0 0)) - ) - ) - - (module R4 (layer Composant) (tedit 200000) (tstamp 442A4D63) - (at 92.71 121.92) - (descr "Resitance 4 pas") - (tags R) - (path /48553E53/442A4D63) - (autoplace_cost180 10) - (fp_text reference R6 (at 0 0) (layer F.SilkS) - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_text value 10K (at 0 0) (layer F.SilkS) hide - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 3 /pic_programmer/RTS)) - (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) - (model discret/resistor.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.4 0.4 0.4)) - (rotate (xyz 0 0 0)) - ) - ) - - (module R4 (layer Composant) (tedit 200000) (tstamp 442A4F2A) - (at 144.145 54.61) - (descr "Resitance 4 pas") - (tags R) - (path /48553E53/442A4F2A) - (autoplace_cost180 10) - (fp_text reference R7 (at 0 0) (layer F.SilkS) - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_text value 10K (at 0 0) (layer F.SilkS) hide - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 35 VPP)) - (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 31 N-000034)) - (model discret/resistor.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.4 0.4 0.4)) - (rotate (xyz 0 0 0)) - ) - ) - - (module R4 (layer Composant) (tedit 200000) (tstamp 442A4D92) - (at 144.145 90.17) - (descr "Resitance 4 pas") - (tags R) - (path /48553E53/442A4D92) - (autoplace_cost180 10) - (fp_text reference R8 (at 0 0) (layer F.SilkS) - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_text value 1K (at 0 0) (layer F.SilkS) hide - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 12 N-000011)) - (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 13 N-000013)) - (model discret/resistor.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.4 0.4 0.4)) - (rotate (xyz 0 0 0)) - ) - ) - - (module R4 (layer Composant) (tedit 200000) (tstamp 442A58DC) - (at 123.19 75.565) - (descr "Resitance 4 pas") - (tags R) - (path /48553E53/442A58DC) - (autoplace_cost180 10) - (fp_text reference R16 (at 0 0) (layer F.SilkS) - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_text value 62K (at 0 0) (layer F.SilkS) hide - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 21 N-000024)) - (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 35 VPP)) - (model discret/resistor.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.4 0.4 0.4)) - (rotate (xyz 0 0 0)) - ) - ) - - (module R4 (layer Composant) (tedit 200000) (tstamp 442A50BF) - (at 156.21 63.5 270) - (descr "Resitance 4 pas") - (tags R) - (path /48553E53/442A50BF) - (autoplace_cost180 10) - (fp_text reference R17 (at 0 0 270) (layer F.SilkS) - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_text value 22K (at 0 0 270) (layer F.SilkS) hide - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 0 270) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 28 N-000031)) - (pad 2 thru_hole circle (at 5.08 0 270) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) - (model discret/resistor.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.4 0.4 0.4)) - (rotate (xyz 0 0 0)) - ) - ) - - (module R4 (layer Composant) (tedit 200000) (tstamp 442A4D85) - (at 135.255 116.84 90) - (descr "Resitance 4 pas") - (tags R) - (path /48553E53/442A4D85) - (autoplace_cost180 10) - (fp_text reference R12 (at 0 0 90) (layer F.SilkS) - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_text value 470 (at 0 0 90) (layer F.SilkS) hide - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 0 90) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 10 N-000009)) - (pad 2 thru_hole circle (at 5.08 0 90) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 6 /sockets/DATA-RB7)) - (model discret/resistor.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.4 0.4 0.4)) - (rotate (xyz 0 0 0)) - ) - ) - - (module R4 (layer Composant) (tedit 200000) (tstamp 442A4F52) - (at 144.145 77.47) - (descr "Resitance 4 pas") - (tags R) - (path /48553E53/442A4F52) - (autoplace_cost180 10) - (fp_text reference R9 (at 0 0) (layer F.SilkS) - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_text value 2.2K (at 0 0) (layer F.SilkS) hide - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 28 N-000031)) - (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 14 N-000015)) - (model discret/resistor.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.4 0.4 0.4)) - (rotate (xyz 0 0 0)) - ) - ) - - (module R4 (layer Composant) (tedit 200000) (tstamp 442A4CF4) - (at 92.71 118.11) - (descr "Resitance 4 pas") - (tags R) - (path /48553E53/442A4CF4) - (autoplace_cost180 10) - (fp_text reference R1 (at 0 0) (layer F.SilkS) - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_text value 10K (at 0 0) (layer F.SilkS) hide - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 4 /pic_programmer/TXD)) - (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 29 N-000032)) - (model discret/resistor.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.4 0.4 0.4)) - (rotate (xyz 0 0 0)) - ) - ) - - (module R4 (layer Composant) (tedit 200000) (tstamp 44369638) - (at 152.4 63.5 90) - (descr "Resitance 4 pas") - (tags R) - (path /48553E53/44369638) - (autoplace_cost180 10) - (fp_text reference R18 (at 0 0 90) (layer F.SilkS) - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_text value 220 (at 0 0 90) (layer F.SilkS) hide - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 0 90) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 28 N-000031)) - (pad 2 thru_hole circle (at 5.08 0 90) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 27 N-000030)) - (model discret/resistor.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.4 0.4 0.4)) - (rotate (xyz 0 0 0)) - ) - ) - - (module R4 (layer Composant) (tedit 200000) (tstamp 4639B9B0) - (at 144.145 83.82 180) - (descr "Resitance 4 pas") - (tags R) - (path /48553E53/4639B9B0) - (autoplace_cost180 10) - (fp_text reference R19 (at 0 0 180) (layer F.SilkS) - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_text value 2.2K (at 0 0 180) (layer F.SilkS) hide - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 0 180) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 25 N-000028)) - (pad 2 thru_hole circle (at 5.08 0 180) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 23 N-000026)) - (model discret/resistor.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.4 0.4 0.4)) - (rotate (xyz 0 0 0)) - ) - ) - - (module R4 (layer Composant) (tedit 200000) (tstamp 4639B9B3) - (at 139.7 102.235 180) - (descr "Resitance 4 pas") - (tags R) - (path /48553E53/4639B9B3) - (autoplace_cost180 10) - (fp_text reference R20 (at 0 0 180) (layer F.SilkS) - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_text value 2.2K (at 0 0 180) (layer F.SilkS) hide - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 0 180) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 34 VCC)) - (pad 2 thru_hole circle (at 5.08 0 180) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 23 N-000026)) - (model discret/resistor.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.4 0.4 0.4)) - (rotate (xyz 0 0 0)) - ) - ) - - (module R4 (layer Composant) (tedit 200000) (tstamp 4639B9E9) - (at 153.035 102.235 180) - (descr "Resitance 4 pas") - (tags R) - (path /48553E53/4639B9E9) - (autoplace_cost180 10) - (fp_text reference R21 (at 0 0 180) (layer F.SilkS) - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_text value 470 (at 0 0 180) (layer F.SilkS) hide - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 0 180) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 24 N-000027)) - (pad 2 thru_hole circle (at 5.08 0 180) (size 1.524 1.524) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 7 /sockets/VCC_PIC)) - (model discret/resistor.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.4 0.4 0.4)) - (rotate (xyz 0 0 0)) - ) - ) - - (module C1-1 (layer Composant) (tedit 200000) (tstamp 464AD280) - (at 145.542 49.784) - (descr "Condensateur e = 1 ou 2 pas") - (tags C) - (path /48553E53/464AD280) - (fp_text reference C9 (at 0 2.032) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_text value 22OnF (at 0 2.032) (layer F.SilkS) hide - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_line (start -3.556 -1.016) (end 3.556 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 3.556 -1.016) (end 3.556 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 3.556 1.016) (end -3.556 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.556 1.016) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.556 -0.508) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -2.54 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 35 VPP)) - (pad 2 thru_hole circle (at 2.54 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 31 N-000034)) - (pad 2 thru_hole circle (at 0 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 31 N-000034)) - (model discret/capa_2pas_5x5mm.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module TO92 (layer Composant) (tedit 443CFFD1) (tstamp 442A4F30) - (at 146.05 62.23) - (descr "Transistor TO92 brochage type BC237") - (tags "TR TO92") - (path /48553E53/442A4F30) - (fp_text reference Q2 (at -1.27 3.81) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_text value BC307 (at -1.27 -5.08) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_line (start -1.27 2.54) (end 2.54 -1.27) (layer F.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.27) (end 2.54 -2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start 2.54 -2.54) (end 1.27 -3.81) (layer F.SilkS) (width 0.3048)) - (fp_line (start 1.27 -3.81) (end -1.27 -3.81) (layer F.SilkS) (width 0.3048)) - (fp_line (start -1.27 -3.81) (end -3.81 -1.27) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.81 1.27) (end -2.54 2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start -2.54 2.54) (end -1.27 2.54) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at 1.27 -1.27) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 35 VPP)) - (pad 2 thru_hole circle (at -1.27 -1.27) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 31 N-000034)) - (pad 3 thru_hole circle (at -1.27 1.27) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 28 N-000031)) - (model discret/to98.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module TO92 (layer Composant) (tedit 443CFFD1) (tstamp 442A4EB9) - (at 146.05 69.85) - (descr "Transistor TO92 brochage type BC237") - (tags "TR TO92") - (path /48553E53/442A4EB9) - (fp_text reference Q1 (at -1.27 3.81) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_text value BC237 (at -1.27 -5.08) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_line (start -1.27 2.54) (end 2.54 -1.27) (layer F.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.27) (end 2.54 -2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start 2.54 -2.54) (end 1.27 -3.81) (layer F.SilkS) (width 0.3048)) - (fp_line (start 1.27 -3.81) (end -1.27 -3.81) (layer F.SilkS) (width 0.3048)) - (fp_line (start -1.27 -3.81) (end -3.81 -1.27) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.81 1.27) (end -2.54 2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start -2.54 2.54) (end -1.27 2.54) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at 1.27 -1.27) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) - (pad 2 thru_hole circle (at -1.27 -1.27) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 13 N-000013)) - (pad 3 thru_hole circle (at -1.27 1.27) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 26 N-000029)) - (model discret/to98.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module C1-1 (layer Composant) (tedit 200000) (tstamp 4639BE2C) - (at 200.66 114.935 270) - (descr "Condensateur e = 1 ou 2 pas") - (tags C) - (path /48553E7C/4639BE2C) - (fp_text reference C8 (at 0 2.032 270) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_text value 100nF (at 0 2.032 270) (layer F.SilkS) hide - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_line (start -3.556 -1.016) (end 3.556 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 3.556 -1.016) (end 3.556 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 3.556 1.016) (end -3.556 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.556 1.016) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.556 -0.508) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -2.54 0 270) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 7 /sockets/VCC_PIC)) - (pad 2 thru_hole circle (at 2.54 0 270) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) - (pad 2 thru_hole circle (at 0 0 270) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) - (model discret/capa_2pas_5x5mm.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module LEDV (layer Composant) (tedit 200000) (tstamp 4639B9EA) - (at 154.94 97.155) - (descr "Led verticale diam 6mm") - (tags "LED DEV") - (path /48553E53/4639B9EA) - (fp_text reference D12 (at 0 -3.81) (layer F.SilkS) - (effects (font (thickness 0.3048))) - ) - (fp_text value YELLOW-LED (at 0 -3.81) (layer F.SilkS) hide - (effects (font (thickness 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) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 24 N-000027)) - (pad 2 thru_hole circle (at 1.27 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) - (model discret/led5_vertical.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module TO92 (layer Composant) (tedit 443CFFD1) (tstamp 4639B996) - (at 142.24 97.79) - (descr "Transistor TO92 brochage type BC237") - (tags "TR TO92") - (path /48553E53/4639B996) - (fp_text reference Q3 (at -1.27 3.81) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_text value BC307 (at -1.27 -5.08) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_line (start -1.27 2.54) (end 2.54 -1.27) (layer F.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.27) (end 2.54 -2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start 2.54 -2.54) (end 1.27 -3.81) (layer F.SilkS) (width 0.3048)) - (fp_line (start 1.27 -3.81) (end -1.27 -3.81) (layer F.SilkS) (width 0.3048)) - (fp_line (start -1.27 -3.81) (end -3.81 -1.27) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.81 1.27) (end -2.54 2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start -2.54 2.54) (end -1.27 2.54) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at 1.27 -1.27) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 34 VCC)) - (pad 2 thru_hole circle (at -1.27 -1.27) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 23 N-000026)) - (pad 3 thru_hole circle (at -1.27 1.27) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 7 /sockets/VCC_PIC)) - (model discret/to98.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module PIN_ARRAY_2X1 (layer Composant) (tedit 4565C520) (tstamp 4639BAF8) - (at 147.32 97.79 270) - (descr "Connecteurs 2 pins") - (tags "CONN DEV") - (path /48553E53/4639BAF8) - (fp_text reference JP1 (at 0 -1.905 270) (layer F.SilkS) - (effects (font (size 0.762 0.762) (thickness 0.1524))) - ) - (fp_text value JUMPER (at 0 -1.905 270) (layer F.SilkS) hide - (effects (font (size 0.762 0.762) (thickness 0.1524))) - ) - (fp_line (start -2.54 1.27) (end -2.54 -1.27) (layer F.SilkS) (width 0.1524)) - (fp_line (start -2.54 -1.27) (end 2.54 -1.27) (layer F.SilkS) (width 0.1524)) - (fp_line (start 2.54 -1.27) (end 2.54 1.27) (layer F.SilkS) (width 0.1524)) - (fp_line (start 2.54 1.27) (end -2.54 1.27) (layer F.SilkS) (width 0.1524)) - (pad 1 thru_hole rect (at -1.27 0 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 34 VCC)) - (pad 2 thru_hole circle (at 1.27 0 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 7 /sockets/VCC_PIC)) - (model pin_array/pins_array_2x1.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module RV2X4 (layer Composant) (tedit 200000) (tstamp 443D0101) - (at 122.555 88.265 180) - (descr "Resistance variable / Potentiometre") - (tags R) - (path /48553E53/443D0101) - (fp_text reference RV1 (at -2.54 -5.08 180) (layer F.SilkS) - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_text value 1K (at -1.651 5.461 180) (layer F.SilkS) - (effects (font (size 1.397 1.27) (thickness 0.2032))) - ) - (fp_line (start -7.62 -3.81) (end 3.81 -3.81) (layer F.SilkS) (width 0.3048)) - (fp_line (start 3.81 -3.81) (end 6.35 -1.27) (layer F.SilkS) (width 0.3048)) - (fp_line (start 6.35 -1.27) (end 6.35 1.27) (layer F.SilkS) (width 0.3048)) - (fp_line (start 6.35 1.27) (end 3.81 3.81) (layer F.SilkS) (width 0.3048)) - (fp_line (start 3.81 3.81) (end -7.62 3.81) (layer F.SilkS) (width 0.3048)) - (fp_line (start -7.62 3.81) (end -7.62 -3.81) (layer F.SilkS) (width 0.3048)) - (fp_line (start 0.762 -3.81) (end 1.905 -3.81) (layer F.SilkS) (width 0.3048)) - (fp_line (start 1.651 3.81) (end 0.762 3.81) (layer F.SilkS) (width 0.3048)) - (fp_line (start -2.54 -0.508) (end 4.953 -0.508) (layer F.SilkS) (width 0.3048)) - (fp_line (start -2.54 0.508) (end 4.953 0.508) (layer F.SilkS) (width 0.3048)) - (fp_circle (center 1.27 0) (end -2.54 -0.635) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -5.08 -2.54 180) (size 2.032 2.032) (drill 1.27) (layers *.Cu *.Mask F.SilkS) - (net 20 N-000023)) - (pad 2 thru_hole circle (at 5.08 0 180) (size 2.032 2.032) (drill 1.27) (layers *.Cu *.Mask F.SilkS) - (net 22 N-000025)) - (pad 3 thru_hole circle (at -5.08 2.54 180) (size 2.032 2.032) (drill 1.27) (layers *.Cu *.Mask F.SilkS) - (net 21 N-000024)) - (model discret/adjustable_rx2v4.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module CP10 (layer Composant) (tedit 200000) (tstamp 442A501D) - (at 97.155 90.17) - (descr "Condensateur polarise") - (tags CP) - (path /48553E53/442A501D) - (fp_text reference C2 (at 2.54 1.27) (layer F.SilkS) - (effects (font (thickness 0.3048))) - ) - (fp_text value 220uF (at -1.905 -1.27) (layer F.SilkS) - (effects (font (thickness 0.3048))) - ) - (fp_line (start 12.7 0) (end 10.16 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start 10.16 0) (end 10.16 2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start 10.16 2.54) (end -7.62 2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start -7.62 2.54) (end -7.62 -2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start -7.62 -2.54) (end 10.16 -2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start 10.16 -2.54) (end 10.16 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -7.62 -1.27) (end -10.16 -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)) - (fp_line (start -10.16 1.27) (end -7.62 1.27) (layer F.SilkS) (width 0.3048)) - (fp_line (start -12.7 0) (end -10.16 0) (layer F.SilkS) (width 0.3048)) - (pad 2 thru_hole circle (at 12.7 0) (size 1.778 1.778) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) - (pad 1 thru_hole rect (at -12.7 0) (size 1.778 1.778) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 30 N-000033)) - (model discret/c_pol.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module CP10 (layer Composant) (tedit 200000) (tstamp 442A5056) - (at 97.79 78.74 180) - (descr "Condensateur polarise") - (tags CP) - (path /48553E53/442A5056) - (fp_text reference C1 (at 2.54 1.27 180) (layer F.SilkS) - (effects (font (thickness 0.3048))) - ) - (fp_text value 100uF (at -1.905 -1.27 180) (layer F.SilkS) - (effects (font (thickness 0.3048))) - ) - (fp_line (start 12.7 0) (end 10.16 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start 10.16 0) (end 10.16 2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start 10.16 2.54) (end -7.62 2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start -7.62 2.54) (end -7.62 -2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start -7.62 -2.54) (end 10.16 -2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start 10.16 -2.54) (end 10.16 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -7.62 -1.27) (end -10.16 -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)) - (fp_line (start -10.16 1.27) (end -7.62 1.27) (layer F.SilkS) (width 0.3048)) - (fp_line (start -12.7 0) (end -10.16 0) (layer F.SilkS) (width 0.3048)) - (pad 2 thru_hole circle (at 12.7 0 180) (size 1.778 1.778) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) - (pad 1 thru_hole rect (at -12.7 0 180) (size 1.778 1.778) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 34 VCC)) - (model discret/c_pol.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module CP8 (layer Composant) (tedit 200000) (tstamp 442A584C) - (at 133.985 72.39 270) - (descr "Condensateur polarise") - (tags CP) - (path /48553E53/442A584C) - (fp_text reference C3 (at 1.27 1.27 270) (layer F.SilkS) - (effects (font (thickness 0.3048))) - ) - (fp_text value 22uF/25V (at 1.27 -1.27 270) (layer F.SilkS) - (effects (font (thickness 0.3048))) - ) - (fp_line (start -10.16 0) (end -8.89 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -7.62 1.27) (end -8.89 1.27) (layer F.SilkS) (width 0.3048)) - (fp_line (start -8.89 1.27) (end -8.89 -1.27) (layer F.SilkS) (width 0.3048)) - (fp_line (start -8.89 -1.27) (end -7.62 -1.27) (layer F.SilkS) (width 0.3048)) - (fp_line (start -7.62 2.54) (end -7.62 -2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start -7.62 -2.54) (end 8.89 -2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start 8.89 -2.54) (end 8.89 2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start 8.89 2.54) (end -7.62 2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start 8.89 0) (end 10.16 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -5.08 -2.54) (end -5.08 2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start -6.35 2.54) (end -6.35 -2.54) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at -10.16 0 270) (size 1.778 1.778) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 35 VPP)) - (pad 2 thru_hole circle (at 10.16 0 270) (size 1.778 1.778) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) - (model discret/c_pol.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.8 0.8 0.8)) - (rotate (xyz 0 0 0)) - ) - ) - - (module C1-1 (layer Composant) (tedit 200000) (tstamp 442AA145) - (at 198.755 73.66 270) - (descr "Condensateur e = 1 ou 2 pas") - (tags C) - (path /48553E7C/442AA145) - (fp_text reference C7 (at 0 2.032 270) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_text value 100nF (at 0 2.032 270) (layer F.SilkS) hide - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_line (start -3.556 -1.016) (end 3.556 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 3.556 -1.016) (end 3.556 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 3.556 1.016) (end -3.556 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.556 1.016) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.556 -0.508) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -2.54 0 270) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 7 /sockets/VCC_PIC)) - (pad 2 thru_hole circle (at 2.54 0 270) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) - (pad 2 thru_hole circle (at 0 0 270) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) - (model discret/capa_2pas_5x5mm.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module C1-1 (layer Composant) (tedit 200000) (tstamp 442AA12B) - (at 196.85 114.935 270) - (descr "Condensateur e = 1 ou 2 pas") - (tags C) - (path /48553E7C/442AA12B) - (fp_text reference C6 (at 0 2.032 270) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_text value 100nF (at 0 2.032 270) (layer F.SilkS) hide - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_line (start -3.556 -1.016) (end 3.556 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 3.556 -1.016) (end 3.556 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 3.556 1.016) (end -3.556 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.556 1.016) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.556 -0.508) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -2.54 0 270) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 34 VCC)) - (pad 2 thru_hole circle (at 2.54 0 270) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) - (pad 2 thru_hole circle (at 0 0 270) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) - (model discret/capa_2pas_5x5mm.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - (module 1pin (layer Composant) (tedit 200000) (tstamp 442A9359) (at 158.75 44.45) (descr "module 1 pin (ou trou mecanique de percage)") @@ -1960,42 +387,502 @@ (pad 1 thru_hole circle (at 0 0) (size 4.064 4.064) (drill 3.048) (layers *.Cu *.Mask F.SilkS)) ) - (module LM78XX (layer Composant) (tedit 200000) (tstamp 442A504A) - (at 99.06 71.12 90) - (descr "Regulateur TO220 serie LM78xx") - (tags "TR TO220") - (path /48553E53/442A504A) - (fp_text reference U3 (at 7.62 0 180) (layer F.SilkS) - (effects (font (size 1.524 1.016) (thickness 0.2032))) + (module discret:CP10 (layer Composant) (tedit 53B840ED) (tstamp 53B84427) + (at 97.79 78.74 180) + (descr "Condensateur polarise") + (tags CP) + (path /48553E53/442A5056) + (fp_text reference C1 (at 2.54 1.27 180) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) - (fp_text value 7805 (at 10.668 0.127 180) (layer F.SilkS) - (effects (font (size 1.524 1.016) (thickness 0.2032))) + (fp_text value 100uF (at -1.905 -1.27 180) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) - (fp_line (start 0 -2.54) (end 5.08 -2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start 0 0) (end 5.08 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start 0 2.54) (end 5.08 2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 -3.81) (end 5.08 5.08) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 5.08) (end 20.32 5.08) (layer F.SilkS) (width 0.3048)) - (fp_line (start 20.32 5.08) (end 20.32 -5.08) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 -3.81) (end 5.08 -5.08) (layer F.SilkS) (width 0.3048)) - (fp_line (start 12.7 3.81) (end 12.7 -5.08) (layer F.SilkS) (width 0.3048)) - (fp_line (start 12.7 3.81) (end 12.7 5.08) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 -5.08) (end 20.32 -5.08) (layer F.SilkS) (width 0.3048)) - (pad 4 thru_hole rect (at 16.51 0 90) (size 8.89 8.89) (drill 3.048) (layers *.Cu *.SilkS *.Mask)) - (pad VI thru_hole circle (at 0 -2.54 90) (size 1.778 1.778) (drill 1.143) (layers *.Cu *.Mask F.SilkS) - (net 30 N-000033)) - (pad GND thru_hole rect (at 0 0 90) (size 1.778 1.778) (drill 1.143) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) - (pad VO thru_hole circle (at 0 2.54 90) (size 1.778 1.778) (drill 1.143) (layers *.Cu *.Mask F.SilkS) - (net 34 VCC)) - (model discret/to220_horiz.wrl + (fp_line (start 12.7 0) (end 10.16 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 10.16 0) (end 10.16 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 10.16 2.54) (end -7.62 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -7.62 2.54) (end -7.62 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -7.62 -2.54) (end 10.16 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 10.16 -2.54) (end 10.16 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -7.62 -1.27) (end -10.16 -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)) + (fp_line (start -10.16 1.27) (end -7.62 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -12.7 0) (end -10.16 0) (layer F.SilkS) (width 0.3048)) + (pad 2 thru_hole circle (at 12.7 0 180) (size 1.778 1.778) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 3 GND)) + (pad 1 thru_hole rect (at -12.7 0 180) (size 1.778 1.778) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 4 VCC)) + (model discret/c_pol.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) - (module LEDV (layer Composant) (tedit 200000) (tstamp 442A4F5D) + (module discret:CP10 (layer Composant) (tedit 53B840ED) (tstamp 53B84436) + (at 97.155 90.17) + (descr "Condensateur polarise") + (tags CP) + (path /48553E53/442A501D) + (fp_text reference C2 (at 2.54 1.27) (layer F.SilkS) + (effects (font (thickness 0.3048))) + ) + (fp_text value 220uF (at -1.905 -1.27) (layer F.SilkS) + (effects (font (thickness 0.3048))) + ) + (fp_line (start 12.7 0) (end 10.16 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 10.16 0) (end 10.16 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 10.16 2.54) (end -7.62 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -7.62 2.54) (end -7.62 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -7.62 -2.54) (end 10.16 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 10.16 -2.54) (end 10.16 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -7.62 -1.27) (end -10.16 -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)) + (fp_line (start -10.16 1.27) (end -7.62 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -12.7 0) (end -10.16 0) (layer F.SilkS) (width 0.3048)) + (pad 2 thru_hole circle (at 12.7 0) (size 1.778 1.778) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 3 GND)) + (pad 1 thru_hole rect (at -12.7 0) (size 1.778 1.778) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 12 "Net-(C2-Pad1)")) + (model discret/c_pol.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:CP8 (layer Composant) (tedit 53B840ED) (tstamp 53B84445) + (at 133.985 72.39 270) + (descr "Condensateur polarise") + (tags CP) + (path /48553E53/442A584C) + (fp_text reference C3 (at 1.27 1.27 270) (layer F.SilkS) + (effects (font (thickness 0.3048))) + ) + (fp_text value 22uF/25V (at 1.27 -1.27 270) (layer F.SilkS) + (effects (font (thickness 0.3048))) + ) + (fp_line (start -10.16 0) (end -8.89 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -7.62 1.27) (end -8.89 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -8.89 1.27) (end -8.89 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -8.89 -1.27) (end -7.62 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -7.62 2.54) (end -7.62 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -7.62 -2.54) (end 8.89 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 8.89 -2.54) (end 8.89 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 8.89 2.54) (end -7.62 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 8.89 0) (end 10.16 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 -2.54) (end -5.08 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -6.35 2.54) (end -6.35 -2.54) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole rect (at -10.16 0 270) (size 1.778 1.778) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 5 VPP)) + (pad 2 thru_hole circle (at 10.16 0 270) (size 1.778 1.778) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 3 GND)) + (model discret/c_pol.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.8 0.8 0.8)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:C1-1 (layer Composant) (tedit 53B840ED) (tstamp 53B84455) + (at 116.84 52.07) + (descr "Condensateur e = 1 ou 2 pas") + (tags C) + (path /48553E53/442A5F61) + (fp_text reference C4 (at 0 2.032) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_text value 0 (at 0 2.032) (layer F.SilkS) hide + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_line (start -3.556 -1.016) (end 3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.556 -1.016) (end 3.556 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.556 1.016) (end -3.556 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.556 1.016) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.556 -0.508) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -2.54 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 13 "Net-(C4-Pad1)")) + (pad 2 thru_hole circle (at 2.54 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 3 GND)) + (pad 2 thru_hole circle (at 0 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 3 GND)) + (model discret/capa_2pas_5x5mm.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:C1-1 (layer Composant) (tedit 53B840ED) (tstamp 53B84460) + (at 132.08 49.53) + (descr "Condensateur e = 1 ou 2 pas") + (tags C) + (path /48553E53/442A58B1) + (fp_text reference C5 (at 0 2.032) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_text value 10nF (at 0 2.032) (layer F.SilkS) hide + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_line (start -3.556 -1.016) (end 3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.556 -1.016) (end 3.556 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.556 1.016) (end -3.556 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.556 1.016) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.556 -0.508) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -2.54 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 14 "Net-(C5-Pad1)")) + (pad 2 thru_hole circle (at 2.54 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 3 GND)) + (pad 2 thru_hole circle (at 0 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 3 GND)) + (model discret/capa_2pas_5x5mm.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:C1-1 (layer Composant) (tedit 53B840ED) (tstamp 53B8446B) + (at 196.85 114.935 270) + (descr "Condensateur e = 1 ou 2 pas") + (tags C) + (path /48553E7C/442AA12B) + (fp_text reference C6 (at 0 2.032 270) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_text value 100nF (at 0 2.032 270) (layer F.SilkS) hide + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_line (start -3.556 -1.016) (end 3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.556 -1.016) (end 3.556 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.556 1.016) (end -3.556 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.556 1.016) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.556 -0.508) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -2.54 0 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 4 VCC)) + (pad 2 thru_hole circle (at 2.54 0 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 3 GND)) + (pad 2 thru_hole circle (at 0 0 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 3 GND)) + (model discret/capa_2pas_5x5mm.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:C1-1 (layer Composant) (tedit 53B840ED) (tstamp 53B84476) + (at 198.755 73.66 270) + (descr "Condensateur e = 1 ou 2 pas") + (tags C) + (path /48553E7C/442AA145) + (fp_text reference C7 (at 0 2.032 270) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_text value 100nF (at 0 2.032 270) (layer F.SilkS) hide + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_line (start -3.556 -1.016) (end 3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.556 -1.016) (end 3.556 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.556 1.016) (end -3.556 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.556 1.016) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.556 -0.508) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -2.54 0 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 6 VCC_PIC)) + (pad 2 thru_hole circle (at 2.54 0 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 3 GND)) + (pad 2 thru_hole circle (at 0 0 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 3 GND)) + (model discret/capa_2pas_5x5mm.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:C1-1 (layer Composant) (tedit 53B840ED) (tstamp 53B84481) + (at 200.66 114.935 270) + (descr "Condensateur e = 1 ou 2 pas") + (tags C) + (path /48553E7C/4639BE2C) + (fp_text reference C8 (at 0 2.032 270) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_text value 100nF (at 0 2.032 270) (layer F.SilkS) hide + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_line (start -3.556 -1.016) (end 3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.556 -1.016) (end 3.556 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.556 1.016) (end -3.556 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.556 1.016) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.556 -0.508) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -2.54 0 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 6 VCC_PIC)) + (pad 2 thru_hole circle (at 2.54 0 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 3 GND)) + (pad 2 thru_hole circle (at 0 0 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 3 GND)) + (model discret/capa_2pas_5x5mm.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:C1-1 (layer Composant) (tedit 53B840ED) (tstamp 53B8448C) + (at 145.542 49.784) + (descr "Condensateur e = 1 ou 2 pas") + (tags C) + (path /48553E53/464AD280) + (fp_text reference C9 (at 0 2.032) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_text value 22OnF (at 0 2.032) (layer F.SilkS) hide + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_line (start -3.556 -1.016) (end 3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.556 -1.016) (end 3.556 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.556 1.016) (end -3.556 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.556 1.016) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.556 -0.508) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -2.54 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 5 VPP)) + (pad 2 thru_hole circle (at 2.54 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 15 "Net-(C9-Pad2)")) + (pad 2 thru_hole circle (at 0 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 15 "Net-(C9-Pad2)")) + (model discret/capa_2pas_5x5mm.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:D5 (layer Composant) (tedit 53B840ED) (tstamp 53B84497) + (at 87.63 64.77 270) + (descr "Diode 5 pas") + (tags "DIODE DEV") + (path /48553E53/442A500B) + (fp_text reference D1 (at 0 0 270) (layer F.SilkS) + (effects (font (size 1.524 1.016) (thickness 0.3048))) + ) + (fp_text value 1N4004 (at -0.254 0 270) (layer F.SilkS) hide + (effects (font (size 1.524 1.016) (thickness 0.3048))) + ) + (fp_line (start 6.35 0) (end 5.08 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 5.08 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 -1.27) (end -5.08 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 -1.27) (end -5.08 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 0) (end -6.35 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 0) (end -5.08 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 1.27) (end 5.08 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 1.27) (end 5.08 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.81 -1.27) (end 3.81 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.27) (end 4.064 1.27) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -6.35 0 270) (size 1.778 1.778) (drill 1.143) (layers *.Cu *.Mask F.SilkS) + (net 16 "Net-(D1-Pad1)")) + (pad 2 thru_hole rect (at 6.35 0 270) (size 1.778 1.778) (drill 1.143) (layers *.Cu *.Mask F.SilkS) + (net 12 "Net-(C2-Pad1)")) + (model discret/diode.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.5 0.5 0.5)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:D3 (layer Composant) (tedit 538C4421) (tstamp 53B844A6) + (at 104.14 118.11) + (descr "Diode 3 pas") + (tags "DIODE DEV") + (path /48553E53/442A4D1B) + (fp_text reference D2 (at 0 0) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_text value BAT43 (at 0 0) (layer F.SilkS) hide + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_line (start 3.81 0) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 0) (end 3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 -1.016) (end -3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.81 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 1.016) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 2 thru_hole rect (at 3.81 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 4 VCC)) + (pad 1 thru_hole circle (at -3.81 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 17 "Net-(D2-Pad1)")) + (model discret/diode.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.3 0.3 0.3)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:D3 (layer Composant) (tedit 538C4421) (tstamp 53B844B5) + (at 104.14 121.92) + (descr "Diode 3 pas") + (tags "DIODE DEV") + (path /48553E53/442A4D25) + (fp_text reference D3 (at 0 0) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_text value BAT43 (at 0 0) (layer F.SilkS) hide + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_line (start 3.81 0) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 0) (end 3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 -1.016) (end -3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.81 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 1.016) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 2 thru_hole rect (at 3.81 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 17 "Net-(D2-Pad1)")) + (pad 1 thru_hole circle (at -3.81 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 3 GND)) + (model discret/diode.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.3 0.3 0.3)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:D3 (layer Composant) (tedit 538C4421) (tstamp 53B844C4) + (at 104.14 111.76) + (descr "Diode 3 pas") + (tags "DIODE DEV") + (path /48553E53/442A4D5C) + (fp_text reference D4 (at 0 0) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_text value BAT43 (at 0 0) (layer F.SilkS) hide + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_line (start 3.81 0) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 0) (end 3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 -1.016) (end -3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.81 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 1.016) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 2 thru_hole rect (at 3.81 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 4 VCC)) + (pad 1 thru_hole circle (at -3.81 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 18 "Net-(D4-Pad1)")) + (model discret/diode.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.3 0.3 0.3)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:D3 (layer Composant) (tedit 538C4421) (tstamp 53B844D3) + (at 104.14 109.22) + (descr "Diode 3 pas") + (tags "DIODE DEV") + (path /48553E53/442A4D5D) + (fp_text reference D5 (at 0 0) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_text value BAT43 (at 0 0) (layer F.SilkS) hide + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_line (start 3.81 0) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 0) (end 3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 -1.016) (end -3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.81 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 1.016) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 2 thru_hole rect (at 3.81 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 18 "Net-(D4-Pad1)")) + (pad 1 thru_hole circle (at -3.81 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 3 GND)) + (model discret/diode.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.3 0.3 0.3)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:D3 (layer Composant) (tedit 538C4421) (tstamp 53B844E2) + (at 104.14 124.46) + (descr "Diode 3 pas") + (tags "DIODE DEV") + (path /48553E53/442A4D64) + (fp_text reference D6 (at 0 0) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_text value BAT43 (at 0 0) (layer F.SilkS) hide + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_line (start 3.81 0) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 0) (end 3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 -1.016) (end -3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.81 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 1.016) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 2 thru_hole rect (at 3.81 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 4 VCC)) + (pad 1 thru_hole circle (at -3.81 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 19 "Net-(D6-Pad1)")) + (model discret/diode.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.3 0.3 0.3)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:D3 (layer Composant) (tedit 538C4421) (tstamp 53B844F1) + (at 104.14 115.57) + (descr "Diode 3 pas") + (tags "DIODE DEV") + (path /48553E53/442A4D65) + (fp_text reference D7 (at 0 0) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_text value BAT43 (at 0 0) (layer F.SilkS) hide + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_line (start 3.81 0) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 0) (end 3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 -1.016) (end -3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.81 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 1.016) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 2 thru_hole rect (at 3.81 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 19 "Net-(D6-Pad1)")) + (pad 1 thru_hole circle (at -3.81 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 3 GND)) + (model discret/diode.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.3 0.3 0.3)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:LEDV (layer Composant) (tedit 53B840ED) (tstamp 53B84500) (at 154.94 77.47) (descr "Led verticale diam 6mm") (tags "LED DEV") @@ -2010,10 +897,10 @@ (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) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 14 N-000015)) - (pad 2 thru_hole circle (at 1.27 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) + (pad 1 thru_hole rect (at -1.27 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 20 "Net-(D8-Pad1)")) + (pad 2 thru_hole circle (at 1.27 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 3 GND)) (model discret/led5_vertical.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -2021,7 +908,7 @@ ) ) - (module LEDV (layer Composant) (tedit 200000) (tstamp 442A5084) + (module discret:LEDV (layer Composant) (tedit 53B840ED) (tstamp 53B84509) (at 154.94 87.63) (descr "Led verticale diam 6mm") (tags "LED DEV") @@ -2036,10 +923,10 @@ (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) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 16 N-000017)) - (pad 2 thru_hole circle (at 1.27 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) + (pad 1 thru_hole rect (at -1.27 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 21 "Net-(D9-Pad1)")) + (pad 2 thru_hole circle (at 1.27 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 3 GND)) (model discret/led5_vertical.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -2047,7 +934,97 @@ ) ) - (module DB9FC (layer Composant) (tedit 200000) (tstamp 442A4C93) + (module discret:D5 (layer Composant) (tedit 53B840ED) (tstamp 53B84512) + (at 130.81 57.15) + (descr "Diode 5 pas") + (tags "DIODE DEV") + (path /48553E53/442A6026) + (fp_text reference D10 (at 0 0) (layer F.SilkS) + (effects (font (size 1.524 1.016) (thickness 0.3048))) + ) + (fp_text value SCHOTTKY (at -0.254 0) (layer F.SilkS) hide + (effects (font (size 1.524 1.016) (thickness 0.3048))) + ) + (fp_line (start 6.35 0) (end 5.08 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 5.08 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 -1.27) (end -5.08 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 -1.27) (end -5.08 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 0) (end -6.35 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 0) (end -5.08 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 1.27) (end 5.08 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 1.27) (end 5.08 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.81 -1.27) (end 3.81 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.27) (end 4.064 1.27) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -6.35 0) (size 1.778 1.778) (drill 1.143) (layers *.Cu *.Mask F.SilkS) + (net 22 "Net-(D10-Pad1)")) + (pad 2 thru_hole rect (at 6.35 0) (size 1.778 1.778) (drill 1.143) (layers *.Cu *.Mask F.SilkS) + (net 5 VPP)) + (model discret/diode.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.5 0.5 0.5)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:D3 (layer Composant) (tedit 538C4421) (tstamp 53B84521) + (at 142.875 80.645 180) + (descr "Diode 3 pas") + (tags "DIODE DEV") + (path /48553E53/4639BA28) + (fp_text reference D11 (at 0 0 180) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_text value BAT43 (at 0 0 180) (layer F.SilkS) hide + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_line (start 3.81 0) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 0) (end 3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 -1.016) (end -3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.81 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 1.016) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 2 thru_hole rect (at 3.81 0 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 23 "Net-(D11-Pad2)")) + (pad 1 thru_hole circle (at -3.81 0 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 24 "Net-(D11-Pad1)")) + (model discret/diode.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.3 0.3 0.3)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:LEDV (layer Composant) (tedit 53B840ED) (tstamp 53B84530) + (at 154.94 97.155) + (descr "Led verticale diam 6mm") + (tags "LED DEV") + (path /48553E53/4639B9EA) + (fp_text reference D12 (at 0 -3.81) (layer F.SilkS) + (effects (font (thickness 0.3048))) + ) + (fp_text value YELLOW-LED (at 0 -3.81) (layer F.SilkS) hide + (effects (font (thickness 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) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 25 "Net-(D12-Pad1)")) + (pad 2 thru_hole circle (at 1.27 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 3 GND)) + (model discret/led5_vertical.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module connect:DB9FC (layer Composant) (tedit 53B840ED) (tstamp 53B84539) (at 81.28 115.57 90) (descr "Connecteur DB9 femelle couche") (tags "CONN DB9") @@ -2073,83 +1050,74 @@ (pad 1 thru_hole rect (at -5.461 1.27 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) (pad 2 thru_hole circle (at -2.667 1.27 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) (pad 3 thru_hole circle (at 0 1.27 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 4 /pic_programmer/TXD)) + (net 2 /pic_programmer/TXD)) (pad 4 thru_hole circle (at 2.794 1.27 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 2 /pic_programmer/PC-DATA-OUT)) + (net 7 /pic_programmer/DTR)) (pad 5 thru_hole circle (at 5.588 1.27 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) + (net 3 GND)) (pad 6 thru_hole circle (at -4.064 -1.27 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) (pad 7 thru_hole circle (at -1.27 -1.27 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 3 /pic_programmer/RTS)) + (net 8 /pic_programmer/PC-CLOCK-OUT)) (pad 8 thru_hole circle (at 1.397 -1.27 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) (net 1 /pic_programmer/CTS)) (pad 9 thru_hole circle (at 4.191 -1.27 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) - (model conn_DBxx/db9_female_pin90deg.wrl + (model Conn_DBxx/db9_female_pin90deg.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) - (module C1-1 (layer Composant) (tedit 200000) (tstamp 442A58B1) - (at 132.08 49.53) - (descr "Condensateur e = 1 ou 2 pas") - (tags C) - (path /48553E53/442A58B1) - (fp_text reference C5 (at 0 2.032) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.2032))) + (module pin_array:PIN_ARRAY_2X1 (layer Composant) (tedit 4565C520) (tstamp 53B84551) + (at 147.32 97.79 270) + (descr "Connecteurs 2 pins") + (tags "CONN DEV") + (path /48553E53/4639BAF8) + (fp_text reference JP1 (at 0 -1.905 270) (layer F.SilkS) + (effects (font (size 0.762 0.762) (thickness 0.1524))) ) - (fp_text value 10nF (at 0 2.032) (layer F.SilkS) hide - (effects (font (size 1.016 1.016) (thickness 0.2032))) + (fp_text value JUMPER (at 0 -1.905 270) (layer F.SilkS) hide + (effects (font (size 0.762 0.762) (thickness 0.1524))) ) - (fp_line (start -3.556 -1.016) (end 3.556 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 3.556 -1.016) (end 3.556 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 3.556 1.016) (end -3.556 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.556 1.016) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.556 -0.508) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -2.54 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 17 N-000018)) - (pad 2 thru_hole circle (at 2.54 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) - (pad 2 thru_hole circle (at 0 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) - (model discret/capa_2pas_5x5mm.wrl + (fp_line (start -2.54 1.27) (end -2.54 -1.27) (layer F.SilkS) (width 0.1524)) + (fp_line (start -2.54 -1.27) (end 2.54 -1.27) (layer F.SilkS) (width 0.1524)) + (fp_line (start 2.54 -1.27) (end 2.54 1.27) (layer F.SilkS) (width 0.1524)) + (fp_line (start 2.54 1.27) (end -2.54 1.27) (layer F.SilkS) (width 0.1524)) + (pad 1 thru_hole rect (at -1.27 0 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 4 VCC)) + (pad 2 thru_hole circle (at 1.27 0 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 6 VCC_PIC)) + (model pin_array/pins_array_2x1.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) - (module C1-1 (layer Composant) (tedit 200000) (tstamp 442A5F61) - (at 116.84 52.07) - (descr "Condensateur e = 1 ou 2 pas") - (tags C) - (path /48553E53/442A5F61) - (fp_text reference C4 (at 0 2.032) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.2032))) + (module inductors:INDUCTOR_V (layer Composant) (tedit 53B840ED) (tstamp 53B8455A) + (at 125.73 64.77 270) + (descr "Inductor (vertical)") + (tags INDUCTOR) + (path /48553E53/442A57BE) + (fp_text reference L1 (at 0 1.99898 270) (layer F.SilkS) + (effects (font (size 1.00076 1.00076) (thickness 0.2032))) ) - (fp_text value 0 (at 0 2.032) (layer F.SilkS) hide - (effects (font (size 1.016 1.016) (thickness 0.2032))) + (fp_text value 22uH (at 0.09906 -1.99898 270) (layer F.SilkS) + (effects (font (size 1.00076 1.00076) (thickness 0.2032))) ) - (fp_line (start -3.556 -1.016) (end 3.556 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 3.556 -1.016) (end 3.556 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start 3.556 1.016) (end -3.556 1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.556 1.016) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) - (fp_line (start -3.556 -0.508) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -2.54 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 18 N-000021)) - (pad 2 thru_hole circle (at 2.54 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) - (pad 2 thru_hole circle (at 0 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) - (model discret/capa_2pas_5x5mm.wrl + (fp_circle (center 0 0) (end 3.81 0) (layer F.SilkS) (width 0.20066)) + (pad 1 thru_hole rect (at -2.54 0 270) (size 1.905 1.905) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 22 "Net-(D10-Pad1)")) + (pad 2 thru_hole circle (at 2.54 0 270) (size 1.905 1.905) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 4 VCC)) + (model discret/inductorV.wrl (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) + (scale (xyz 2 2 2)) (rotate (xyz 0 0 0)) ) ) - (module bornier2 (layer Composant) (tedit 3EC0ED69) (tstamp 442A4FE7) + (module connect:bornier2 (layer Composant) (tedit 53B840ED) (tstamp 53B84560) (at 78.74 64.77 90) (descr "Bornier d'alimentation 2 pins") (tags DEV) @@ -2166,10 +1134,1044 @@ (fp_line (start -5.08 -3.81) (end -5.08 3.81) (layer F.SilkS) (width 0.3048)) (fp_line (start -5.08 3.81) (end 5.08 3.81) (layer F.SilkS) (width 0.3048)) (pad 1 thru_hole rect (at -2.54 0 90) (size 2.54 2.54) (drill 1.524) (layers *.Cu *.Mask F.SilkS) - (net 9 GND)) + (net 3 GND)) (pad 2 thru_hole circle (at 2.54 0 90) (size 2.54 2.54) (drill 1.524) (layers *.Cu *.Mask F.SilkS) - (net 15 N-000016)) - (model device/bornier_2.wrl + (net 16 "Net-(D1-Pad1)")) + (model Device/bornier_2.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:TO92 (layer Composant) (tedit 53B840ED) (tstamp 53B8456A) + (at 146.05 69.85) + (descr "Transistor TO92 brochage type BC237") + (tags "TR TO92") + (path /48553E53/442A4EB9) + (fp_text reference Q1 (at -1.27 3.81) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_text value BC237 (at -1.27 -5.08) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_line (start -1.27 2.54) (end 2.54 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.27) (end 2.54 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -2.54) (end 1.27 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 1.27 -3.81) (end -1.27 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -1.27 -3.81) (end -3.81 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.81 1.27) (end -2.54 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -2.54 2.54) (end -1.27 2.54) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole rect (at 1.27 -1.27) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 3 GND)) + (pad 2 thru_hole circle (at -1.27 -1.27) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 26 "Net-(Q1-Pad2)")) + (pad 3 thru_hole circle (at -1.27 1.27) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 23 "Net-(D11-Pad2)")) + (model discret/to98.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:TO92 (layer Composant) (tedit 53B840ED) (tstamp 53B84578) + (at 146.05 62.23) + (descr "Transistor TO92 brochage type BC237") + (tags "TR TO92") + (path /48553E53/442A4F30) + (fp_text reference Q2 (at -1.27 3.81) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_text value BC307 (at -1.27 -5.08) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_line (start -1.27 2.54) (end 2.54 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.27) (end 2.54 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -2.54) (end 1.27 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 1.27 -3.81) (end -1.27 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -1.27 -3.81) (end -3.81 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.81 1.27) (end -2.54 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -2.54 2.54) (end -1.27 2.54) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole rect (at 1.27 -1.27) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 5 VPP)) + (pad 2 thru_hole circle (at -1.27 -1.27) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 15 "Net-(C9-Pad2)")) + (pad 3 thru_hole circle (at -1.27 1.27) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 27 "Net-(Q2-Pad3)")) + (model discret/to98.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:TO92 (layer Composant) (tedit 53B840ED) (tstamp 53B84586) + (at 142.24 97.79) + (descr "Transistor TO92 brochage type BC237") + (tags "TR TO92") + (path /48553E53/4639B996) + (fp_text reference Q3 (at -1.27 3.81) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_text value BC307 (at -1.27 -5.08) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_line (start -1.27 2.54) (end 2.54 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.27) (end 2.54 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -2.54) (end 1.27 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 1.27 -3.81) (end -1.27 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -1.27 -3.81) (end -3.81 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.81 1.27) (end -2.54 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -2.54 2.54) (end -1.27 2.54) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole rect (at 1.27 -1.27) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 4 VCC)) + (pad 2 thru_hole circle (at -1.27 -1.27) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 28 "Net-(Q3-Pad2)")) + (pad 3 thru_hole circle (at -1.27 1.27) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 6 VCC_PIC)) + (model discret/to98.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:R4 (layer Composant) (tedit 53B840ED) (tstamp 53B84594) + (at 92.71 118.11) + (descr "Resitance 4 pas") + (tags R) + (path /48553E53/442A4CF4) + (autoplace_cost180 10) + (fp_text reference R1 (at 0 0) (layer F.SilkS) + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_text value 10K (at 0 0) (layer F.SilkS) hide + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 2 /pic_programmer/TXD)) + (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 17 "Net-(D2-Pad1)")) + (model discret/resistor.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.4 0.4 0.4)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:R4 (layer Composant) (tedit 53B840ED) (tstamp 53B845A1) + (at 92.71 115.57) + (descr "Resitance 4 pas") + (tags R) + (path /48553E53/442A4CFB) + (autoplace_cost180 10) + (fp_text reference R2 (at 0 0) (layer F.SilkS) + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_text value 10K (at 0 0) (layer F.SilkS) hide + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 2 /pic_programmer/TXD)) + (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 3 GND)) + (model discret/resistor.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.4 0.4 0.4)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:R4 (layer Composant) (tedit 53B840ED) (tstamp 53B845AE) + (at 92.71 111.76) + (descr "Resitance 4 pas") + (tags R) + (path /48553E53/442A4D5A) + (autoplace_cost180 10) + (fp_text reference R3 (at 0 0) (layer F.SilkS) + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_text value 10K (at 0 0) (layer F.SilkS) hide + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 7 /pic_programmer/DTR)) + (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 18 "Net-(D4-Pad1)")) + (model discret/resistor.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.4 0.4 0.4)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:R4 (layer Composant) (tedit 53B840ED) (tstamp 53B845BB) + (at 92.71 109.22) + (descr "Resitance 4 pas") + (tags R) + (path /48553E53/442A4D5B) + (autoplace_cost180 10) + (fp_text reference R4 (at 0 0) (layer F.SilkS) + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_text value 10K (at 0 0) (layer F.SilkS) hide + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 7 /pic_programmer/DTR)) + (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 3 GND)) + (model discret/resistor.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.4 0.4 0.4)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:R4 (layer Composant) (tedit 53B840ED) (tstamp 53B845C8) + (at 92.71 124.46) + (descr "Resitance 4 pas") + (tags R) + (path /48553E53/442A4D62) + (autoplace_cost180 10) + (fp_text reference R5 (at 0 0) (layer F.SilkS) + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_text value 10K (at 0 0) (layer F.SilkS) hide + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 8 /pic_programmer/PC-CLOCK-OUT)) + (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 19 "Net-(D6-Pad1)")) + (model discret/resistor.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.4 0.4 0.4)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:R4 (layer Composant) (tedit 53B840ED) (tstamp 53B845D5) + (at 92.71 121.92) + (descr "Resitance 4 pas") + (tags R) + (path /48553E53/442A4D63) + (autoplace_cost180 10) + (fp_text reference R6 (at 0 0) (layer F.SilkS) + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_text value 10K (at 0 0) (layer F.SilkS) hide + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 8 /pic_programmer/PC-CLOCK-OUT)) + (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 3 GND)) + (model discret/resistor.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.4 0.4 0.4)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:R4 (layer Composant) (tedit 53B840ED) (tstamp 53B845E2) + (at 144.145 54.61) + (descr "Resitance 4 pas") + (tags R) + (path /48553E53/442A4F2A) + (autoplace_cost180 10) + (fp_text reference R7 (at 0 0) (layer F.SilkS) + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_text value 10K (at 0 0) (layer F.SilkS) hide + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 5 VPP)) + (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 15 "Net-(C9-Pad2)")) + (model discret/resistor.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.4 0.4 0.4)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:R4 (layer Composant) (tedit 53B840ED) (tstamp 53B845EF) + (at 144.145 90.17) + (descr "Resitance 4 pas") + (tags R) + (path /48553E53/442A4D92) + (autoplace_cost180 10) + (fp_text reference R8 (at 0 0) (layer F.SilkS) + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_text value 1K (at 0 0) (layer F.SilkS) hide + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 29 "Net-(R8-Pad1)")) + (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 26 "Net-(Q1-Pad2)")) + (model discret/resistor.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.4 0.4 0.4)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:R4 (layer Composant) (tedit 53B840ED) (tstamp 53B845FC) + (at 144.145 77.47) + (descr "Resitance 4 pas") + (tags R) + (path /48553E53/442A4F52) + (autoplace_cost180 10) + (fp_text reference R9 (at 0 0) (layer F.SilkS) + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_text value 2.2K (at 0 0) (layer F.SilkS) hide + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 27 "Net-(Q2-Pad3)")) + (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 20 "Net-(D8-Pad1)")) + (model discret/resistor.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.4 0.4 0.4)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:R4 (layer Composant) (tedit 53B840ED) (tstamp 53B84609) + (at 119.38 48.26) + (descr "Resitance 4 pas") + (tags R) + (path /48553E53/442A5F83) + (autoplace_cost180 10) + (fp_text reference R10 (at 0 0) (layer F.SilkS) + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_text value 5,1K (at 0 0) (layer F.SilkS) hide + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 13 "Net-(C4-Pad1)")) + (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 14 "Net-(C5-Pad1)")) + (model discret/resistor.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.4 0.4 0.4)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:R4 (layer Composant) (tedit 53B840ED) (tstamp 53B84616) + (at 139.065 66.04 90) + (descr "Resitance 4 pas") + (tags R) + (path /48553E53/442A4F23) + (autoplace_cost180 10) + (fp_text reference R11 (at 0 0 90) (layer F.SilkS) + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_text value 22K (at 0 0 90) (layer F.SilkS) hide + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 0 90) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 23 "Net-(D11-Pad2)")) + (pad 2 thru_hole circle (at 5.08 0 90) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 15 "Net-(C9-Pad2)")) + (model discret/resistor.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.4 0.4 0.4)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:R4 (layer Composant) (tedit 53B840ED) (tstamp 53B84623) + (at 135.255 116.84 90) + (descr "Resitance 4 pas") + (tags R) + (path /48553E53/442A4D85) + (autoplace_cost180 10) + (fp_text reference R12 (at 0 0 90) (layer F.SilkS) + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_text value 470 (at 0 0 90) (layer F.SilkS) hide + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 0 90) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 30 "Net-(R12-Pad1)")) + (pad 2 thru_hole circle (at 5.08 0 90) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 11 DATA-RB7)) + (model discret/resistor.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.4 0.4 0.4)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:R4 (layer Composant) (tedit 53B840ED) (tstamp 53B84630) + (at 140.335 116.84 270) + (descr "Resitance 4 pas") + (tags R) + (path /48553E53/442A4D8D) + (autoplace_cost180 10) + (fp_text reference R13 (at 0 0 270) (layer F.SilkS) + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_text value 470 (at 0 0 270) (layer F.SilkS) hide + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 0 270) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 31 "Net-(R13-Pad1)")) + (pad 2 thru_hole circle (at 5.08 0 270) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 10 CLOCK-RB6)) + (model discret/resistor.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.4 0.4 0.4)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:R4 (layer Composant) (tedit 53B840ED) (tstamp 53B8463D) + (at 144.145 87.63) + (descr "Resitance 4 pas") + (tags R) + (path /48553E53/442A5083) + (autoplace_cost180 10) + (fp_text reference R14 (at 0 0) (layer F.SilkS) + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_text value 470 (at 0 0) (layer F.SilkS) hide + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 4 VCC)) + (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 21 "Net-(D9-Pad1)")) + (model discret/resistor.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.4 0.4 0.4)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:R4 (layer Composant) (tedit 53B840ED) (tstamp 53B8464A) + (at 123.19 78.74) + (descr "Resitance 4 pas") + (tags R) + (path /48553E53/442A58D7) + (autoplace_cost180 10) + (fp_text reference R15 (at 0 0) (layer F.SilkS) + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_text value 6.2K (at 0 0) (layer F.SilkS) hide + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 32 "Net-(R15-Pad1)")) + (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 3 GND)) + (model discret/resistor.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.4 0.4 0.4)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:R4 (layer Composant) (tedit 53B840ED) (tstamp 53B84657) + (at 123.19 75.565) + (descr "Resitance 4 pas") + (tags R) + (path /48553E53/442A58DC) + (autoplace_cost180 10) + (fp_text reference R16 (at 0 0) (layer F.SilkS) + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_text value 62K (at 0 0) (layer F.SilkS) hide + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 33 "Net-(R16-Pad1)")) + (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 5 VPP)) + (model discret/resistor.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.4 0.4 0.4)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:R4 (layer Composant) (tedit 53B840ED) (tstamp 53B84664) + (at 156.21 63.5 270) + (descr "Resitance 4 pas") + (tags R) + (path /48553E53/442A50BF) + (autoplace_cost180 10) + (fp_text reference R17 (at 0 0 270) (layer F.SilkS) + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_text value 22K (at 0 0 270) (layer F.SilkS) hide + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 0 270) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 27 "Net-(Q2-Pad3)")) + (pad 2 thru_hole circle (at 5.08 0 270) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 3 GND)) + (model discret/resistor.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.4 0.4 0.4)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:R4 (layer Composant) (tedit 53B840ED) (tstamp 53B84671) + (at 152.4 63.5 90) + (descr "Resitance 4 pas") + (tags R) + (path /48553E53/44369638) + (autoplace_cost180 10) + (fp_text reference R18 (at 0 0 90) (layer F.SilkS) + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_text value 220 (at 0 0 90) (layer F.SilkS) hide + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 0 90) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 27 "Net-(Q2-Pad3)")) + (pad 2 thru_hole circle (at 5.08 0 90) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 9 VPP-MCLR)) + (model discret/resistor.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.4 0.4 0.4)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:R4 (layer Composant) (tedit 53B840ED) (tstamp 53B8467E) + (at 144.145 83.82 180) + (descr "Resitance 4 pas") + (tags R) + (path /48553E53/4639B9B0) + (autoplace_cost180 10) + (fp_text reference R19 (at 0 0 180) (layer F.SilkS) + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_text value 2.2K (at 0 0 180) (layer F.SilkS) hide + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 0 180) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 24 "Net-(D11-Pad1)")) + (pad 2 thru_hole circle (at 5.08 0 180) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 28 "Net-(Q3-Pad2)")) + (model discret/resistor.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.4 0.4 0.4)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:R4 (layer Composant) (tedit 53B840ED) (tstamp 53B8468B) + (at 139.7 102.235 180) + (descr "Resitance 4 pas") + (tags R) + (path /48553E53/4639B9B3) + (autoplace_cost180 10) + (fp_text reference R20 (at 0 0 180) (layer F.SilkS) + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_text value 2.2K (at 0 0 180) (layer F.SilkS) hide + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 0 180) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 4 VCC)) + (pad 2 thru_hole circle (at 5.08 0 180) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 28 "Net-(Q3-Pad2)")) + (model discret/resistor.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.4 0.4 0.4)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:R4 (layer Composant) (tedit 53B840ED) (tstamp 53B84698) + (at 153.035 102.235 180) + (descr "Resitance 4 pas") + (tags R) + (path /48553E53/4639B9E9) + (autoplace_cost180 10) + (fp_text reference R21 (at 0 0 180) (layer F.SilkS) + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_text value 470 (at 0 0 180) (layer F.SilkS) hide + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_line (start -5.08 0) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 0) (end -4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -1.016) (end 4.064 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.016) (end 4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 1.016) (end -4.064 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 1.016) (end -4.064 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 0 180) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 25 "Net-(D12-Pad1)")) + (pad 2 thru_hole circle (at 5.08 0 180) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 6 VCC_PIC)) + (model discret/resistor.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.4 0.4 0.4)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:RV2X4 (layer Composant) (tedit 53B840ED) (tstamp 53B846A5) + (at 122.555 88.265 180) + (descr "Resistance variable / Potentiometre") + (tags R) + (path /48553E53/443D0101) + (fp_text reference RV1 (at -2.54 -5.08 180) (layer F.SilkS) + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_text value 1K (at -1.651 5.461 180) (layer F.SilkS) + (effects (font (size 1.397 1.27) (thickness 0.2032))) + ) + (fp_line (start -7.62 -3.81) (end 3.81 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.81 -3.81) (end 6.35 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 6.35 -1.27) (end 6.35 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 6.35 1.27) (end 3.81 3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.81 3.81) (end -7.62 3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -7.62 3.81) (end -7.62 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 0.762 -3.81) (end 1.905 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 1.651 3.81) (end 0.762 3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -2.54 -0.508) (end 4.953 -0.508) (layer F.SilkS) (width 0.3048)) + (fp_line (start -2.54 0.508) (end 4.953 0.508) (layer F.SilkS) (width 0.3048)) + (fp_circle (center 1.27 0) (end -2.54 -0.635) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -5.08 -2.54 180) (size 2.032 2.032) (drill 1.27) (layers *.Cu *.Mask F.SilkS) + (net 32 "Net-(R15-Pad1)")) + (pad 2 thru_hole circle (at 5.08 0 180) (size 2.032 2.032) (drill 1.27) (layers *.Cu *.Mask F.SilkS) + (net 34 "Net-(RV1-Pad2)")) + (pad 3 thru_hole circle (at -5.08 2.54 180) (size 2.032 2.032) (drill 1.27) (layers *.Cu *.Mask F.SilkS) + (net 33 "Net-(R16-Pad1)")) + (model discret/adjustable_rx2v4.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module dip_sockets:DIP-8__300_ELL (layer Composant) (tedit 53B840ED) (tstamp 53B846B6) + (at 182.88 113.03 270) + (descr "8 pins DIL package, elliptical pads") + (tags DIL) + (path /48553E7C/442A87F7) + (fp_text reference U1 (at -6.35 0 360) (layer F.SilkS) + (effects (font (size 1.778 1.143) (thickness 0.3048))) + ) + (fp_text value 24Cxx (at 0 0 270) (layer F.SilkS) + (effects (font (size 1.778 1.016) (thickness 0.3048))) + ) + (fp_line (start -5.08 -1.27) (end -3.81 -1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -3.81 1.27) (end -5.08 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -5.08 -2.54) (end 5.08 -2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 5.08 -2.54) (end 5.08 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start -5.08 2.54) (end -5.08 -2.54) (layer F.SilkS) (width 0.381)) + (pad 1 thru_hole rect (at -3.81 3.81 270) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 3 GND)) + (pad 2 thru_hole oval (at -1.27 3.81 270) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 3 GND)) + (pad 3 thru_hole oval (at 1.27 3.81 270) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 3 GND)) + (pad 4 thru_hole oval (at 3.81 3.81 270) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 3 GND)) + (pad 5 thru_hole oval (at 3.81 -3.81 270) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 11 DATA-RB7)) + (pad 6 thru_hole oval (at 1.27 -3.81 270) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 10 CLOCK-RB6)) + (pad 7 thru_hole oval (at -1.27 -3.81 270) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS)) + (pad 8 thru_hole oval (at -3.81 -3.81 270) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 4 VCC)) + (model dil/dil_8.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module dip_sockets:DIP-14__300_ELL (layer Composant) (tedit 53B840ED) (tstamp 53B846C8) + (at 123.19 115.57) + (descr "14 pins DIL package, elliptical pads") + (tags DIL) + (path /48553E53/442A4D6B) + (fp_text reference U2 (at -5.08 -1.27) (layer F.SilkS) + (effects (font (size 1.524 1.143) (thickness 0.3048))) + ) + (fp_text value 74HC125 (at 1.27 1.27) (layer F.SilkS) + (effects (font (size 1.524 1.143) (thickness 0.3048))) + ) + (fp_line (start -10.16 -2.54) (end 10.16 -2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 10.16 2.54) (end -10.16 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start -10.16 2.54) (end -10.16 -2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start -10.16 -1.27) (end -8.89 -1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -8.89 -1.27) (end -8.89 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -8.89 1.27) (end -10.16 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start 10.16 -2.54) (end 10.16 2.54) (layer F.SilkS) (width 0.381)) + (pad 1 thru_hole rect (at -7.62 3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 3 GND)) + (pad 2 thru_hole oval (at -5.08 3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 17 "Net-(D2-Pad1)")) + (pad 3 thru_hole oval (at -2.54 3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 29 "Net-(R8-Pad1)")) + (pad 4 thru_hole oval (at 0 3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 3 GND)) + (pad 5 thru_hole oval (at 2.54 3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 18 "Net-(D4-Pad1)")) + (pad 6 thru_hole oval (at 5.08 3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 30 "Net-(R12-Pad1)")) + (pad 7 thru_hole oval (at 7.62 3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 3 GND)) + (pad 8 thru_hole oval (at 7.62 -3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 31 "Net-(R13-Pad1)")) + (pad 9 thru_hole oval (at 5.08 -3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 19 "Net-(D6-Pad1)")) + (pad 10 thru_hole oval (at 2.54 -3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 3 GND)) + (pad 11 thru_hole oval (at 0 -3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 1 /pic_programmer/CTS)) + (pad 12 thru_hole oval (at -2.54 -3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 11 DATA-RB7)) + (pad 13 thru_hole oval (at -5.08 -3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 3 GND)) + (pad 14 thru_hole oval (at -7.62 -3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 4 VCC)) + (model dil/dil_14.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:LM78XX (layer Composant) (tedit 53B840ED) (tstamp 53B846E0) + (at 99.06 71.12 90) + (descr "Regulateur TO220 serie LM78xx") + (tags "TR TO220") + (path /48553E53/442A504A) + (fp_text reference U3 (at 7.62 0 180) (layer F.SilkS) + (effects (font (size 1.524 1.016) (thickness 0.2032))) + ) + (fp_text value 7805 (at 10.668 0.127 180) (layer F.SilkS) + (effects (font (size 1.524 1.016) (thickness 0.2032))) + ) + (fp_line (start 0 -2.54) (end 5.08 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 0 0) (end 5.08 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 0 2.54) (end 5.08 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 -3.81) (end 5.08 5.08) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 5.08) (end 20.32 5.08) (layer F.SilkS) (width 0.3048)) + (fp_line (start 20.32 5.08) (end 20.32 -5.08) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 -3.81) (end 5.08 -5.08) (layer F.SilkS) (width 0.3048)) + (fp_line (start 12.7 3.81) (end 12.7 -5.08) (layer F.SilkS) (width 0.3048)) + (fp_line (start 12.7 3.81) (end 12.7 5.08) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 -5.08) (end 20.32 -5.08) (layer F.SilkS) (width 0.3048)) + (pad 4 thru_hole rect (at 16.51 0 90) (size 8.89 8.89) (drill 3.048) (layers *.Cu *.SilkS *.Mask)) + (pad VI thru_hole circle (at 0 -2.54 90) (size 1.778 1.778) (drill 1.143) (layers *.Cu *.Mask F.SilkS) + (net 12 "Net-(C2-Pad1)")) + (pad GND thru_hole rect (at 0 0 90) (size 1.778 1.778) (drill 1.143) (layers *.Cu *.Mask F.SilkS) + (net 3 GND)) + (pad VO thru_hole circle (at 0 2.54 90) (size 1.778 1.778) (drill 1.143) (layers *.Cu *.Mask F.SilkS) + (net 4 VCC)) + (model discret/to220_horiz.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module dip_sockets:DIP-8__300_ELL (layer Composant) (tedit 53B840ED) (tstamp 53B846F1) + (at 114.3 60.96 270) + (descr "8 pins DIL package, elliptical pads") + (tags DIL) + (path /48553E53/442A5E20) + (fp_text reference U4 (at -6.35 0 360) (layer F.SilkS) + (effects (font (size 1.778 1.143) (thickness 0.3048))) + ) + (fp_text value LT1373 (at 0 0 270) (layer F.SilkS) + (effects (font (size 1.778 1.016) (thickness 0.3048))) + ) + (fp_line (start -5.08 -1.27) (end -3.81 -1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -3.81 1.27) (end -5.08 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -5.08 -2.54) (end 5.08 -2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 5.08 -2.54) (end 5.08 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start -5.08 2.54) (end -5.08 -2.54) (layer F.SilkS) (width 0.381)) + (pad 1 thru_hole rect (at -3.81 3.81 270) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 13 "Net-(C4-Pad1)")) + (pad 2 thru_hole oval (at -1.27 3.81 270) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 34 "Net-(RV1-Pad2)")) + (pad 3 thru_hole oval (at 1.27 3.81 270) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS)) + (pad 4 thru_hole oval (at 3.81 3.81 270) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS)) + (pad 5 thru_hole oval (at 3.81 -3.81 270) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 4 VCC)) + (pad 6 thru_hole oval (at 1.27 -3.81 270) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 3 GND)) + (pad 7 thru_hole oval (at -1.27 -3.81 270) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 3 GND)) + (pad 8 thru_hole oval (at -3.81 -3.81 270) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 22 "Net-(D10-Pad1)")) + (model dil/dil_8.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module dip_sockets:DIP-18__300_ELL (layer Composant) (tedit 53B840ED) (tstamp 53B84703) + (at 211.455 118.11 270) + (descr "18 pins DIL package, elliptical pads") + (path /48553E7C/442A81A7) + (fp_text reference U5 (at -7.62 -1.27 270) (layer F.SilkS) + (effects (font (size 1.778 1.143) (thickness 0.3048))) + ) + (fp_text value PIC_18_PINS (at 1.524 1.016 270) (layer F.SilkS) + (effects (font (size 1.778 1.143) (thickness 0.3048))) + ) + (fp_line (start -12.7 -1.27) (end -11.43 -1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -11.43 -1.27) (end -11.43 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -11.43 1.27) (end -12.7 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -12.7 -2.54) (end 12.7 -2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 12.7 -2.54) (end 12.7 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 12.7 2.54) (end -12.7 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start -12.7 2.54) (end -12.7 -2.54) (layer F.SilkS) (width 0.381)) + (pad 1 thru_hole rect (at -10.16 3.81 270) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS)) + (pad 2 thru_hole oval (at -7.62 3.81 270) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS)) + (pad 3 thru_hole oval (at -5.08 3.81 270) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS)) + (pad 4 thru_hole oval (at -2.54 3.81 270) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 9 VPP-MCLR)) + (pad 5 thru_hole oval (at 0 3.81 270) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 3 GND)) + (pad 6 thru_hole oval (at 2.54 3.81 270) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS)) + (pad 7 thru_hole oval (at 5.08 3.81 270) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS)) + (pad 8 thru_hole oval (at 7.62 3.81 270) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS)) + (pad 9 thru_hole oval (at 10.16 3.81 270) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS)) + (pad 10 thru_hole oval (at 10.16 -3.81 270) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS)) + (pad 11 thru_hole oval (at 7.62 -3.81 270) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS)) + (pad 12 thru_hole oval (at 5.08 -3.81 270) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 10 CLOCK-RB6)) + (pad 13 thru_hole oval (at 2.54 -3.81 270) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 11 DATA-RB7)) + (pad 14 thru_hole oval (at 0 -3.81 270) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 6 VCC_PIC)) + (pad 15 thru_hole oval (at -2.54 -3.81 270) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS)) + (pad 16 thru_hole oval (at -5.08 -3.81 270) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS)) + (pad 17 thru_hole oval (at -7.62 -3.81 270) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS)) + (pad 18 thru_hole oval (at -10.16 -3.81 270) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS)) + (model dil/dil_18.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module dip_sockets:DIP-8__300_ELL (layer Composant) (tedit 53B840ED) (tstamp 53B8471F) + (at 182.88 124.46 270) + (descr "8 pins DIL package, elliptical pads") + (tags DIL) + (path /48553E7C/442A81A5) + (fp_text reference U6 (at -6.35 0 360) (layer F.SilkS) + (effects (font (size 1.778 1.143) (thickness 0.3048))) + ) + (fp_text value PIC_8_PINS (at 0 0 270) (layer F.SilkS) + (effects (font (size 1.778 1.016) (thickness 0.3048))) + ) + (fp_line (start -5.08 -1.27) (end -3.81 -1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -3.81 1.27) (end -5.08 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -5.08 -2.54) (end 5.08 -2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 5.08 -2.54) (end 5.08 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start -5.08 2.54) (end -5.08 -2.54) (layer F.SilkS) (width 0.381)) + (pad 1 thru_hole rect (at -3.81 3.81 270) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 6 VCC_PIC)) + (pad 2 thru_hole oval (at -1.27 3.81 270) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS)) + (pad 3 thru_hole oval (at 1.27 3.81 270) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS)) + (pad 4 thru_hole oval (at 3.81 3.81 270) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 9 VPP-MCLR)) + (pad 5 thru_hole oval (at 3.81 -3.81 270) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS)) + (pad 6 thru_hole oval (at 1.27 -3.81 270) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 10 CLOCK-RB6)) + (pad 7 thru_hole oval (at -1.27 -3.81 270) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 11 DATA-RB7)) + (pad 8 thru_hole oval (at -3.81 -3.81 270) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 3 GND)) + (model dil/dil_8.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) @@ -2239,366 +2241,366 @@ (gr_line (start 173.99 40.64) (end 233.68 40.64) (angle 90) (layer Edge.Cuts) (width 0.381)) (gr_line (start 73.66 40.64) (end 173.99 40.64) (angle 90) (layer Edge.Cuts) (width 0.381)) - (segment (start 84.455 113.665) (end 112.395 113.665) (width 0.635) (layer Cuivre) (net 1)) - (segment (start 83.947 114.173) (end 84.455 113.665) (width 0.635) (layer Cuivre) (net 1)) - (segment (start 113.03 114.3) (end 121.92 114.3) (width 0.635) (layer Cuivre) (net 1) (status 2)) - (segment (start 121.92 114.3) (end 123.19 113.03) (width 0.635) (layer Cuivre) (net 1)) - (segment (start 123.19 113.03) (end 123.19 111.76) (width 0.635) (layer Cuivre) (net 1) (status 400)) - (segment (start 80.01 114.173) (end 83.947 114.173) (width 0.635) (layer Cuivre) (net 1) (status 800)) (segment (start 112.395 113.665) (end 113.03 114.3) (width 0.635) (layer Cuivre) (net 1)) - (segment (start 87.63 111.76) (end 87.63 109.22) (width 0.635) (layer Cuivre) (net 2) (status C00)) - (segment (start 82.55 112.776) (end 82.55 112.395) (width 0.635) (layer Cuivre) (net 2) (status 800)) - (segment (start 82.55 112.395) (end 83.185 111.76) (width 0.635) (layer Cuivre) (net 2)) - (segment (start 83.185 111.76) (end 87.63 111.76) (width 0.635) (layer Cuivre) (net 2) (status 400)) - (segment (start 77.47 120.65) (end 80.01 123.19) (width 0.635) (layer Cuivre) (net 3)) - (segment (start 87.63 124.46) (end 87.63 121.92) (width 0.635) (layer Cuivre) (net 3) (status C00)) - (segment (start 85.09 123.19) (end 86.36 124.46) (width 0.635) (layer Cuivre) (net 3)) - (segment (start 78.105 116.84) (end 77.47 117.475) (width 0.635) (layer Cuivre) (net 3)) - (segment (start 80.01 123.19) (end 85.09 123.19) (width 0.635) (layer Cuivre) (net 3)) - (segment (start 86.36 124.46) (end 87.63 124.46) (width 0.635) (layer Cuivre) (net 3) (status 400)) - (segment (start 80.01 116.84) (end 78.105 116.84) (width 0.635) (layer Cuivre) (net 3) (status 800)) - (segment (start 77.47 117.475) (end 77.47 120.65) (width 0.635) (layer Cuivre) (net 3)) - (segment (start 87.63 115.57) (end 82.55 115.57) (width 0.635) (layer Cuivre) (net 4) (status C02)) - (segment (start 87.63 118.11) (end 87.63 115.57) (width 0.635) (layer Cuivre) (net 4) (status C00)) - (segment (start 189.865 113.665) (end 189.23 114.3) (width 0.635) (layer Cuivre) (net 5)) - (segment (start 216.535 131.445) (end 217.805 130.175) (width 0.635) (layer Cuivre) (net 5)) - (segment (start 177.165 127) (end 180.975 127) (width 0.4318) (layer Cuivre) (net 5)) - (segment (start 182.245 125.73) (end 180.975 127) (width 0.635) (layer Cuivre) (net 5)) - (via (at 189.865 110.49) (size 1.651) (layers Composant Cuivre) (net 5)) - (segment (start 182.245 125.73) (end 186.69 125.73) (width 0.635) (layer Cuivre) (net 5) (status 400)) - (segment (start 196.215 72.39) (end 196.215 67.945) (width 0.635) (layer Composant) (net 5)) - (segment (start 189.865 110.49) (end 189.865 123.19) (width 0.635) (layer Composant) (net 5)) - (segment (start 196.215 67.945) (end 196.85 67.31) (width 0.635) (layer Composant) (net 5)) - (segment (start 190.5 53.34) (end 195.58 53.34) (width 0.635) (layer Cuivre) (net 5) (status 800)) - (segment (start 195.58 53.34) (end 196.85 54.61) (width 0.635) (layer Cuivre) (net 5)) - (segment (start 217.17 123.19) (end 215.265 123.19) (width 0.635) (layer Cuivre) (net 5) (status 400)) - (segment (start 140.335 121.92) (end 140.335 122.555) (width 0.635) (layer Cuivre) (net 5) (status 800)) - (segment (start 198.12 131.445) (end 216.535 131.445) (width 0.635) (layer Cuivre) (net 5)) - (segment (start 186.69 125.73) (end 192.405 125.73) (width 0.635) (layer Cuivre) (net 5) (status 802)) - (segment (start 193.04 107.315) (end 189.865 110.49) (width 0.635) (layer Composant) (net 5)) - (segment (start 193.04 75.565) (end 196.215 72.39) (width 0.635) (layer Composant) (net 5)) - (via (at 196.85 54.61) (size 1.651) (layers Composant Cuivre) (net 5)) - (via (at 192.405 125.73) (size 1.651) (layers Composant Cuivre) (net 5)) - (segment (start 189.23 114.3) (end 186.69 114.3) (width 0.635) (layer Cuivre) (net 5) (status 400)) - (segment (start 189.865 123.19) (end 192.405 125.73) (width 0.635) (layer Composant) (net 5)) - (segment (start 196.85 67.31) (end 196.85 54.61) (width 0.635) (layer Composant) (net 5)) - (segment (start 193.04 107.315) (end 193.04 75.565) (width 0.635) (layer Composant) (net 5)) - (segment (start 144.78 127) (end 177.165 127) (width 0.635) (layer Cuivre) (net 5)) - (segment (start 192.405 125.73) (end 198.12 131.445) (width 0.635) (layer Cuivre) (net 5)) - (segment (start 211.455 53.34) (end 215.265 53.34) (width 0.635) (layer Cuivre) (net 5) (status 400)) - (segment (start 210.185 54.61) (end 208.915 54.61) (width 0.635) (layer Cuivre) (net 5)) - (segment (start 211.455 53.34) (end 210.185 54.61) (width 0.635) (layer Cuivre) (net 5)) - (segment (start 196.85 54.61) (end 205.74 54.61) (width 0.635) (layer Cuivre) (net 5)) - (segment (start 205.74 54.61) (end 208.915 54.61) (width 0.4318) (layer Cuivre) (net 5)) - (segment (start 217.805 130.175) (end 217.805 123.825) (width 0.635) (layer Cuivre) (net 5)) - (segment (start 217.805 123.825) (end 217.17 123.19) (width 0.635) (layer Cuivre) (net 5)) - (segment (start 140.335 122.555) (end 144.78 127) (width 0.635) (layer Cuivre) (net 5)) - (segment (start 189.865 110.49) (end 189.865 113.665) (width 0.635) (layer Cuivre) (net 5)) - (segment (start 191.77 114.3) (end 189.23 116.84) (width 0.635) (layer Cuivre) (net 6)) - (segment (start 189.23 116.84) (end 186.69 116.84) (width 0.635) (layer Cuivre) (net 6) (status 400)) - (segment (start 192.405 114.3) (end 191.77 114.3) (width 0.635) (layer Cuivre) (net 6)) - (segment (start 139.065 114.3) (end 149.86 125.095) (width 0.635) (layer Cuivre) (net 6)) - (segment (start 137.795 114.3) (end 139.065 114.3) (width 0.635) (layer Cuivre) (net 6)) - (segment (start 201.295 85.09) (end 194.945 91.44) (width 0.635) (layer Composant) (net 6)) - (segment (start 201.295 58.42) (end 201.295 85.09) (width 0.635) (layer Composant) (net 6)) - (via (at 192.405 114.3) (size 1.651) (layers Composant Cuivre) (net 6)) - (segment (start 200.025 57.15) (end 201.295 58.42) (width 0.635) (layer Composant) (net 6)) - (segment (start 215.265 50.8) (end 210.82 50.8) (width 0.635) (layer Cuivre) (net 6) (status 800)) - (segment (start 135.255 111.76) (end 137.795 114.3) (width 0.635) (layer Cuivre) (net 6) (status 800)) - (segment (start 198.755 50.8) (end 200.025 52.07) (width 0.635) (layer Cuivre) (net 6)) - (segment (start 190.5 50.8) (end 198.755 50.8) (width 0.635) (layer Cuivre) (net 6) (status 800)) - (segment (start 194.31 114.3) (end 192.405 114.3) (width 0.635) (layer Composant) (net 6)) - (via (at 200.025 52.07) (size 1.651) (layers Composant Cuivre) (net 6)) - (segment (start 200.025 57.15) (end 200.025 52.07) (width 0.635) (layer Composant) (net 6)) - (segment (start 194.945 113.665) (end 194.31 114.3) (width 0.635) (layer Composant) (net 6)) - (segment (start 194.945 91.44) (end 194.945 113.665) (width 0.635) (layer Composant) (net 6)) - (segment (start 182.88 123.19) (end 186.69 123.19) (width 0.635) (layer Cuivre) (net 6) (status 400)) - (segment (start 205.74 52.07) (end 209.55 52.07) (width 0.4318) (layer Cuivre) (net 6)) - (segment (start 121.285 109.22) (end 132.715 109.22) (width 0.635) (layer Composant) (net 6)) - (segment (start 192.405 123.19) (end 201.93 123.19) (width 0.635) (layer Cuivre) (net 6)) - (segment (start 120.65 111.76) (end 120.65 109.855) (width 0.635) (layer Composant) (net 6) (status 800)) - (segment (start 120.65 109.855) (end 121.285 109.22) (width 0.635) (layer Composant) (net 6)) - (segment (start 181.61 124.46) (end 182.88 123.19) (width 0.635) (layer Cuivre) (net 6)) - (segment (start 149.86 125.095) (end 173.99 125.095) (width 0.635) (layer Cuivre) (net 6)) - (segment (start 174.625 124.46) (end 181.61 124.46) (width 0.4318) (layer Cuivre) (net 6)) - (segment (start 186.69 123.19) (end 192.405 123.19) (width 0.635) (layer Cuivre) (net 6) (status 802)) - (segment (start 213.995 121.92) (end 215.265 120.65) (width 0.635) (layer Cuivre) (net 6) (status 402)) - (segment (start 201.93 123.19) (end 203.2 121.92) (width 0.635) (layer Cuivre) (net 6) (status 2)) - (segment (start 209.55 52.07) (end 210.82 50.8) (width 0.635) (layer Cuivre) (net 6)) - (segment (start 173.99 125.095) (end 174.625 124.46) (width 0.635) (layer Cuivre) (net 6)) - (segment (start 203.2 121.92) (end 213.995 121.92) (width 0.4318) (layer Cuivre) (net 6) (status 2)) - (segment (start 200.025 52.07) (end 205.74 52.07) (width 0.635) (layer Cuivre) (net 6)) - (segment (start 192.405 114.3) (end 192.405 123.19) (width 0.635) (layer Composant) (net 6)) - (segment (start 132.715 109.22) (end 135.255 111.76) (width 0.635) (layer Composant) (net 6) (status 400)) - (via (at 192.405 123.19) (size 1.651) (layers Composant Cuivre) (net 6)) - (segment (start 200.66 112.395) (end 203.2 112.395) (width 1.016) (layer Cuivre) (net 7) (status 800)) - (segment (start 210.185 118.11) (end 210.185 116.84) (width 1.016) (layer Cuivre) (net 7) (status 2)) - (segment (start 179.07 120.65) (end 166.37 120.65) (width 1.016) (layer Cuivre) (net 7) (status 800)) - (segment (start 144.78 105.41) (end 147.955 102.235) (width 1.016) (layer Cuivre) (net 7) (status 400)) - (segment (start 142.24 105.41) (end 144.78 105.41) (width 1.016) (layer Cuivre) (net 7)) - (segment (start 140.97 104.14) (end 142.24 105.41) (width 1.016) (layer Cuivre) (net 7)) - (segment (start 140.97 99.06) (end 140.97 104.14) (width 1.016) (layer Cuivre) (net 7) (status 800)) - (segment (start 147.32 101.6) (end 147.955 102.235) (width 1.016) (layer Cuivre) (net 7) (status 400)) - (segment (start 147.32 99.06) (end 147.32 101.6) (width 1.016) (layer Cuivre) (net 7) (status 800)) - (segment (start 203.2 115.57) (end 204.47 116.84) (width 0.635) (layer Cuivre) (net 7)) - (segment (start 203.2 112.395) (end 203.2 115.57) (width 1.016) (layer Cuivre) (net 7)) - (segment (start 203.2 105.41) (end 203.2 112.395) (width 1.016) (layer Cuivre) (net 7)) - (segment (start 180.34 76.2) (end 185.42 71.12) (width 1.016) (layer Cuivre) (net 7)) - (segment (start 210.185 118.11) (end 215.265 118.11) (width 1.016) (layer Cuivre) (net 7) (status 402)) - (segment (start 175.26 76.2) (end 180.34 76.2) (width 1.016) (layer Cuivre) (net 7) (status 800)) - (segment (start 179.07 120.65) (end 180.975 120.65) (width 1.016) (layer Cuivre) (net 7) (status 800)) - (segment (start 180.975 120.65) (end 182.245 121.92) (width 1.016) (layer Cuivre) (net 7)) - (segment (start 190.5 121.92) (end 193.04 119.38) (width 1.016) (layer Cuivre) (net 7)) - (segment (start 185.42 71.12) (end 190.5 71.12) (width 1.016) (layer Cuivre) (net 7) (status 400)) - (segment (start 189.23 121.92) (end 190.5 121.92) (width 1.016) (layer Cuivre) (net 7)) - (segment (start 182.245 121.92) (end 189.23 121.92) (width 0.4318) (layer Cuivre) (net 7)) - (segment (start 193.04 119.38) (end 198.12 119.38) (width 1.016) (layer Cuivre) (net 7)) - (segment (start 210.185 119.38) (end 210.185 118.11) (width 1.016) (layer Cuivre) (net 7)) - (segment (start 198.12 119.38) (end 210.185 119.38) (width 0.4318) (layer Cuivre) (net 7)) - (segment (start 219.075 102.235) (end 220.345 100.965) (width 1.016) (layer Cuivre) (net 7)) - (segment (start 220.345 100.965) (end 220.345 71.755) (width 1.016) (layer Cuivre) (net 7)) - (segment (start 220.345 71.755) (end 219.71 71.12) (width 1.016) (layer Cuivre) (net 7)) - (segment (start 219.71 71.12) (end 215.265 71.12) (width 1.016) (layer Cuivre) (net 7) (status 400)) - (segment (start 204.47 116.84) (end 210.185 116.84) (width 0.4318) (layer Cuivre) (net 7) (status 2)) - (segment (start 212.725 66.675) (end 212.725 70.485) (width 1.016) (layer Cuivre) (net 7)) - (segment (start 203.2 105.41) (end 206.375 102.235) (width 1.016) (layer Cuivre) (net 7)) - (segment (start 206.375 102.235) (end 219.075 102.235) (width 1.016) (layer Cuivre) (net 7)) - (segment (start 210.82 64.77) (end 212.725 66.675) (width 1.016) (layer Cuivre) (net 7)) - (segment (start 166.37 120.65) (end 147.955 102.235) (width 1.016) (layer Cuivre) (net 7) (status 400)) - (segment (start 212.725 70.485) (end 213.36 71.12) (width 1.016) (layer Cuivre) (net 7)) - (segment (start 213.36 71.12) (end 215.265 71.12) (width 1.016) (layer Cuivre) (net 7) (status 400)) - (segment (start 190.5 71.12) (end 198.755 71.12) (width 1.016) (layer Cuivre) (net 7) (status C00)) - (segment (start 210.185 64.77) (end 210.82 64.77) (width 1.016) (layer Cuivre) (net 7)) - (segment (start 198.755 71.12) (end 198.755 67.945) (width 1.016) (layer Cuivre) (net 7) (status 800)) - (segment (start 205.74 64.77) (end 210.185 64.77) (width 0.4318) (layer Cuivre) (net 7)) - (segment (start 198.755 67.945) (end 201.93 64.77) (width 1.016) (layer Cuivre) (net 7)) - (segment (start 201.93 64.77) (end 205.74 64.77) (width 1.016) (layer Cuivre) (net 7)) - (segment (start 156.845 50.8) (end 152.4 55.245) (width 0.635) (layer Cuivre) (net 8)) - (segment (start 195.58 132.715) (end 180.975 132.715) (width 0.635) (layer Cuivre) (net 8)) - (segment (start 196.215 133.35) (end 218.44 133.35) (width 0.635) (layer Cuivre) (net 8)) - (segment (start 222.25 48.895) (end 219.71 46.355) (width 0.635) (layer Cuivre) (net 8)) - (segment (start 175.26 47.625) (end 176.53 46.355) (width 0.635) (layer Cuivre) (net 8)) - (segment (start 207.645 46.355) (end 176.53 46.355) (width 0.635) (layer Cuivre) (net 8)) - (segment (start 179.07 130.81) (end 179.07 128.27) (width 0.635) (layer Cuivre) (net 8) (status 400)) - (segment (start 175.26 50.8) (end 175.26 47.625) (width 0.635) (layer Cuivre) (net 8) (status 800)) - (segment (start 195.58 132.715) (end 196.215 133.35) (width 0.635) (layer Cuivre) (net 8)) - (segment (start 156.845 50.8) (end 175.26 50.8) (width 0.635) (layer Cuivre) (net 8) (status 400)) - (segment (start 219.71 46.355) (end 207.645 46.355) (width 0.635) (layer Cuivre) (net 8)) - (segment (start 207.01 104.14) (end 220.98 104.14) (width 0.635) (layer Cuivre) (net 8)) - (segment (start 204.47 106.68) (end 207.01 104.14) (width 0.635) (layer Cuivre) (net 8)) - (segment (start 204.47 114.935) (end 204.47 106.68) (width 0.635) (layer Cuivre) (net 8)) - (segment (start 205.105 115.57) (end 204.47 114.935) (width 0.635) (layer Cuivre) (net 8)) - (segment (start 222.25 48.895) (end 222.25 103.505) (width 0.635) (layer Cuivre) (net 8)) - (segment (start 218.44 133.35) (end 220.98 130.81) (width 0.635) (layer Cuivre) (net 8)) - (segment (start 220.98 130.81) (end 220.98 104.14) (width 0.635) (layer Cuivre) (net 8)) - (segment (start 221.615 104.14) (end 222.25 103.505) (width 0.635) (layer Cuivre) (net 8)) - (segment (start 221.615 104.14) (end 220.98 104.14) (width 0.635) (layer Cuivre) (net 8)) - (segment (start 207.645 115.57) (end 205.105 115.57) (width 0.635) (layer Cuivre) (net 8) (status 800)) - (segment (start 179.07 130.81) (end 180.975 132.715) (width 0.635) (layer Cuivre) (net 8)) - (segment (start 207.645 50.8) (end 207.645 46.355) (width 0.635) (layer Cuivre) (net 8) (status 800)) - (segment (start 128.27 120.65) (end 129.54 121.92) (width 0.635) (layer Cuivre) (net 10)) - (segment (start 129.54 121.92) (end 135.255 121.92) (width 0.635) (layer Cuivre) (net 10) (status 400)) - (segment (start 128.27 119.38) (end 128.27 120.65) (width 0.635) (layer Cuivre) (net 10) (status 800)) - (segment (start 132.6896 107.7468) (end 138.4046 107.7468) (width 0.635) (layer Cuivre) (net 11)) - (segment (start 138.4046 107.7468) (end 140.335 109.6772) (width 0.635) (layer Cuivre) (net 11)) - (segment (start 140.335 109.6772) (end 140.335 111.76) (width 0.635) (layer Cuivre) (net 11) (status 400)) - (segment (start 130.81 111.76) (end 130.81 109.6264) (width 0.635) (layer Cuivre) (net 11) (status 800)) - (segment (start 130.81 109.6264) (end 132.6896 107.7468) (width 0.635) (layer Cuivre) (net 11)) - (segment (start 113.03 114.3) (end 114.935 116.205) (width 0.635) (layer Composant) (net 12)) - (segment (start 113.03 104.14) (end 113.03 114.3) (width 0.635) (layer Composant) (net 12)) - (segment (start 120.015 116.205) (end 120.65 116.84) (width 0.635) (layer Composant) (net 12)) - (segment (start 127 102.235) (end 139.065 90.17) (width 0.635) (layer Composant) (net 12) (status 400)) - (segment (start 114.935 102.235) (end 127 102.235) (width 0.635) (layer Composant) (net 12)) - (segment (start 120.65 116.84) (end 120.65 119.38) (width 0.635) (layer Composant) (net 12) (status 400)) - (segment (start 114.935 102.235) (end 113.03 104.14) (width 0.635) (layer Composant) (net 12)) - (segment (start 114.935 116.205) (end 120.015 116.205) (width 0.635) (layer Composant) (net 12)) - (segment (start 149.225 90.17) (end 146.685 90.17) (width 0.635) (layer Cuivre) (net 13) (status 800)) - (segment (start 144.78 68.58) (end 147.32 71.12) (width 0.635) (layer Cuivre) (net 13) (status 800)) - (segment (start 147.32 71.12) (end 147.32 73.025) (width 0.635) (layer Cuivre) (net 13)) - (segment (start 144.78 75.565) (end 144.78 88.265) (width 0.635) (layer Cuivre) (net 13)) - (segment (start 147.32 73.025) (end 144.78 75.565) (width 0.635) (layer Cuivre) (net 13)) - (segment (start 146.685 90.17) (end 144.78 88.265) (width 0.635) (layer Cuivre) (net 13)) - (segment (start 153.67 77.47) (end 149.225 77.47) (width 0.635) (layer Cuivre) (net 14) (status C00)) - (segment (start 83.82 62.23) (end 87.63 58.42) (width 1.016) (layer Cuivre) (net 15) (status 402)) - (segment (start 78.74 62.23) (end 83.82 62.23) (width 1.016) (layer Cuivre) (net 15) (status 802)) - (segment (start 153.67 87.63) (end 149.225 87.63) (width 0.635) (layer Cuivre) (net 16) (status C00)) - (segment (start 124.46 48.26) (end 128.27 48.26) (width 0.635) (layer Cuivre) (net 17) (status 802)) - (segment (start 128.27 48.26) (end 129.54 49.53) (width 0.635) (layer Cuivre) (net 17) (status 402)) - (segment (start 111.76 52.07) (end 114.3 52.07) (width 0.4318) (layer Cuivre) (net 18) (status 400)) - (segment (start 110.49 53.34) (end 111.76 52.07) (width 0.4318) (layer Cuivre) (net 18)) - (segment (start 110.49 57.15) (end 110.49 53.34) (width 0.4318) (layer Cuivre) (net 18) (status 800)) - (segment (start 114.3 48.26) (end 114.3 52.07) (width 0.635) (layer Cuivre) (net 18) (status C00)) - (segment (start 124.46 60.96) (end 125.73 62.23) (width 0.635) (layer Cuivre) (net 19) (status 400)) - (segment (start 124.46 57.15) (end 124.46 60.96) (width 0.635) (layer Cuivre) (net 19) (status 800)) - (segment (start 118.11 57.15) (end 124.46 57.15) (width 0.635) (layer Cuivre) (net 19) (status C02)) - (segment (start 124.46 89.535) (end 125.73 90.805) (width 0.635) (layer Cuivre) (net 20)) - (segment (start 118.11 80.01) (end 124.46 86.36) (width 0.635) (layer Cuivre) (net 20)) - (segment (start 118.11 78.74) (end 118.11 80.01) (width 0.635) (layer Cuivre) (net 20) (status 800)) - (segment (start 124.46 86.36) (end 124.46 89.535) (width 0.635) (layer Cuivre) (net 20)) - (segment (start 125.73 90.805) (end 127.635 90.805) (width 0.635) (layer Cuivre) (net 20) (status 400)) - (segment (start 120.65 79.375) (end 127 85.725) (width 0.635) (layer Cuivre) (net 21)) - (segment (start 127 85.725) (end 127.635 85.725) (width 0.635) (layer Cuivre) (net 21) (status 400)) - (segment (start 120.015 75.565) (end 120.65 76.2) (width 0.635) (layer Cuivre) (net 21)) - (segment (start 118.11 75.565) (end 120.015 75.565) (width 0.635) (layer Cuivre) (net 21) (status 800)) - (segment (start 120.65 76.2) (end 120.65 79.375) (width 0.635) (layer Cuivre) (net 21)) - (segment (start 113.665 80.645) (end 117.475 84.455) (width 0.635) (layer Cuivre) (net 22)) - (segment (start 110.49 59.69) (end 112.395 59.69) (width 0.635) (layer Cuivre) (net 22) (status 800)) - (segment (start 112.395 59.69) (end 113.665 60.96) (width 0.635) (layer Cuivre) (net 22)) - (segment (start 113.665 60.96) (end 113.665 80.645) (width 0.635) (layer Cuivre) (net 22)) - (segment (start 117.475 84.455) (end 117.475 88.265) (width 0.635) (layer Cuivre) (net 22) (status 400)) - (segment (start 140.97 85.09) (end 140.97 96.52) (width 0.635) (layer Cuivre) (net 23) (status 400)) - (segment (start 135.255 96.52) (end 134.62 97.155) (width 0.635) (layer Cuivre) (net 23)) - (segment (start 134.62 97.155) (end 134.62 102.235) (width 0.635) (layer Cuivre) (net 23) (status 400)) - (segment (start 140.97 96.52) (end 135.255 96.52) (width 0.635) (layer Cuivre) (net 23) (status 800)) - (segment (start 139.7 83.82) (end 139.065 83.82) (width 0.635) (layer Cuivre) (net 23) (status 400)) - (segment (start 140.97 85.09) (end 139.7 83.82) (width 0.635) (layer Cuivre) (net 23)) - (segment (start 153.67 97.79) (end 158.115 102.235) (width 0.635) (layer Cuivre) (net 24) (status 400)) - (segment (start 153.67 97.155) (end 153.67 97.79) (width 0.635) (layer Cuivre) (net 24) (status 800)) - (segment (start 149.225 81.28) (end 149.225 83.82) (width 0.635) (layer Cuivre) (net 25) (status 400)) - (segment (start 146.685 80.645) (end 148.59 80.645) (width 0.635) (layer Cuivre) (net 25) (status 800)) - (segment (start 148.59 80.645) (end 149.225 81.28) (width 0.635) (layer Cuivre) (net 25)) - (segment (start 144.78 71.12) (end 139.065 71.12) (width 0.635) (layer Cuivre) (net 26) (status C02)) - (segment (start 139.065 71.12) (end 141.605 73.66) (width 0.635) (layer Cuivre) (net 26) (status 800)) - (segment (start 141.605 78.105) (end 139.065 80.645) (width 0.635) (layer Cuivre) (net 26) (status 400)) - (segment (start 141.605 73.66) (end 141.605 78.105) (width 0.635) (layer Cuivre) (net 26)) - (segment (start 152.4 55.245) (end 152.4 58.42) (width 0.635) (layer Cuivre) (net 27) (status 400)) - (segment (start 150.495 71.755) (end 152.4 69.85) (width 0.635) (layer Composant) (net 28)) - (segment (start 137.795 76.2) (end 139.065 77.47) (width 0.635) (layer Composant) (net 28) (status 400)) - (segment (start 139.065 73.66) (end 146.05 73.66) (width 0.635) (layer Composant) (net 28)) - (segment (start 147.32 65.405) (end 149.225 65.405) (width 0.635) (layer Cuivre) (net 28)) - (segment (start 149.225 65.405) (end 152.4 68.58) (width 0.635) (layer Cuivre) (net 28) (status 400)) - (segment (start 156.21 61.595) (end 152.4 65.405) (width 0.635) (layer Cuivre) (net 28)) - (segment (start 152.4 65.405) (end 152.4 68.58) (width 0.635) (layer Cuivre) (net 28) (status 400)) - (segment (start 156.21 58.42) (end 156.21 61.595) (width 0.635) (layer Cuivre) (net 28) (status 800)) - (segment (start 147.955 71.755) (end 150.495 71.755) (width 0.635) (layer Composant) (net 28)) - (segment (start 145.415 63.5) (end 147.32 65.405) (width 0.635) (layer Cuivre) (net 28)) - (segment (start 137.795 74.93) (end 139.065 73.66) (width 0.635) (layer Composant) (net 28)) - (segment (start 137.795 74.93) (end 137.795 76.2) (width 0.635) (layer Composant) (net 28)) - (segment (start 146.05 73.66) (end 147.955 71.755) (width 0.635) (layer Composant) (net 28)) - (segment (start 152.4 68.58) (end 152.4 69.85) (width 0.635) (layer Composant) (net 28) (status 800)) - (segment (start 144.78 63.5) (end 145.415 63.5) (width 0.635) (layer Cuivre) (net 28) (status 800)) - (segment (start 97.155 127) (end 100.965 127) (width 0.635) (layer Cuivre) (net 29)) - (segment (start 100.965 127) (end 106.045 121.92) (width 0.635) (layer Cuivre) (net 29)) - (segment (start 94.615 119.38) (end 94.615 124.46) (width 0.635) (layer Cuivre) (net 29)) - (segment (start 95.885 118.11) (end 94.615 119.38) (width 0.635) (layer Cuivre) (net 29)) - (segment (start 107.95 121.92) (end 116.205 121.92) (width 0.635) (layer Cuivre) (net 29) (status 800)) - (segment (start 118.11 120.015) (end 118.11 119.38) (width 0.635) (layer Cuivre) (net 29) (status 400)) - (segment (start 116.205 121.92) (end 118.11 120.015) (width 0.635) (layer Cuivre) (net 29)) - (segment (start 100.33 118.11) (end 97.79 118.11) (width 0.635) (layer Cuivre) (net 29) (status C02)) - (segment (start 97.79 118.11) (end 95.885 118.11) (width 0.635) (layer Cuivre) (net 29) (status 800)) - (segment (start 94.615 124.46) (end 97.155 127) (width 0.635) (layer Cuivre) (net 29)) - (segment (start 106.045 121.92) (end 107.95 121.92) (width 0.635) (layer Cuivre) (net 29) (status 400)) - (segment (start 84.455 89.535) (end 82.55 87.63) (width 1.016) (layer Cuivre) (net 30)) - (segment (start 82.55 87.63) (end 82.55 76.2) (width 1.016) (layer Cuivre) (net 30)) - (segment (start 82.55 76.2) (end 87.63 71.12) (width 1.016) (layer Cuivre) (net 30) (status 400)) - (segment (start 84.455 90.17) (end 84.455 89.535) (width 1.016) (layer Cuivre) (net 30) (status 800)) - (segment (start 87.63 71.12) (end 96.52 71.12) (width 1.016) (layer Cuivre) (net 30) (status C02)) - (segment (start 148.844 49.784) (end 149.225 50.165) (width 0.635) (layer Cuivre) (net 31)) - (segment (start 149.225 50.165) (end 149.225 54.61) (width 0.635) (layer Cuivre) (net 31) (status 400)) - (segment (start 148.082 49.784) (end 148.844 49.784) (width 0.635) (layer Cuivre) (net 31) (status 800)) - (segment (start 145.542 49.784) (end 148.082 49.784) (width 0.635) (layer Cuivre) (net 31) (status C00)) - (segment (start 144.78 60.96) (end 147.32 63.5) (width 0.4318) (layer Cuivre) (net 31) (status 800)) - (segment (start 149.86 59.69) (end 149.86 62.23) (width 0.635) (layer Cuivre) (net 31)) - (segment (start 149.86 62.23) (end 148.59 63.5) (width 0.635) (layer Cuivre) (net 31)) - (segment (start 149.225 59.055) (end 149.86 59.69) (width 0.635) (layer Cuivre) (net 31)) - (segment (start 148.59 63.5) (end 147.32 63.5) (width 0.635) (layer Cuivre) (net 31)) - (segment (start 149.225 54.61) (end 149.225 59.055) (width 0.635) (layer Cuivre) (net 31) (status 800)) - (segment (start 144.78 60.96) (end 139.065 60.96) (width 0.635) (layer Cuivre) (net 31) (status C02)) - (segment (start 96.52 120.015) (end 95.885 120.65) (width 0.635) (layer Cuivre) (net 32)) - (segment (start 95.885 120.65) (end 95.885 122.555) (width 0.635) (layer Cuivre) (net 32)) - (segment (start 96.52 120.015) (end 101.6 120.015) (width 0.635) (layer Cuivre) (net 32)) - (segment (start 107.95 115.57) (end 125.73 115.57) (width 0.635) (layer Cuivre) (net 32) (status 802)) - (segment (start 128.27 111.76) (end 128.27 113.03) (width 0.635) (layer Cuivre) (net 32) (status 800)) - (segment (start 95.885 122.555) (end 97.79 124.46) (width 0.635) (layer Cuivre) (net 32) (status 400)) - (segment (start 106.045 115.57) (end 107.95 115.57) (width 0.635) (layer Cuivre) (net 32) (status 402)) - (segment (start 100.33 124.46) (end 97.79 124.46) (width 0.635) (layer Cuivre) (net 32) (status C02)) - (segment (start 101.6 120.015) (end 106.045 115.57) (width 0.635) (layer Cuivre) (net 32)) - (segment (start 128.27 113.03) (end 125.73 115.57) (width 0.635) (layer Cuivre) (net 32)) - (segment (start 106.807 109.22) (end 104.267 111.76) (width 0.635) (layer Cuivre) (net 33)) - (segment (start 107.95 109.22) (end 106.807 109.22) (width 0.635) (layer Cuivre) (net 33) (status 800)) - (segment (start 107.95 109.22) (end 111.125 109.22) (width 0.635) (layer Composant) (net 33) (status 800)) - (segment (start 123.19 123.19) (end 125.73 120.65) (width 0.635) (layer Composant) (net 33) (status 2)) - (segment (start 111.76 119.38) (end 115.57 123.19) (width 0.635) (layer Composant) (net 33)) - (segment (start 111.125 109.22) (end 111.76 109.855) (width 0.635) (layer Composant) (net 33)) - (segment (start 115.57 123.19) (end 123.19 123.19) (width 0.635) (layer Composant) (net 33)) - (segment (start 125.73 120.65) (end 125.73 119.38) (width 0.635) (layer Composant) (net 33) (status 402)) - (segment (start 111.76 109.855) (end 111.76 119.38) (width 0.635) (layer Composant) (net 33)) - (segment (start 100.33 111.76) (end 97.79 111.76) (width 0.635) (layer Cuivre) (net 33) (status C02)) - (segment (start 100.33 111.76) (end 104.267 111.76) (width 0.635) (layer Cuivre) (net 33) (status 802)) - (segment (start 137.16 103.505) (end 135.89 104.775) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 135.89 104.775) (end 115.57 104.775) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 148.59 96.52) (end 158.75 106.68) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 158.75 106.68) (end 165.735 106.68) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 165.735 106.68) (end 167.64 104.775) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 167.64 104.775) (end 170.18 104.775) (width 1.016) (layer Cuivre) (net 34)) - (via (at 170.18 104.775) (size 1.651) (layers Composant Cuivre) (net 34)) - (segment (start 170.18 104.775) (end 185.42 104.775) (width 1.016) (layer Composant) (net 34)) - (segment (start 185.42 104.775) (end 186.69 106.045) (width 1.016) (layer Composant) (net 34)) - (segment (start 186.69 106.045) (end 186.69 109.22) (width 1.016) (layer Composant) (net 34) (status 400)) - (segment (start 147.32 96.52) (end 148.59 96.52) (width 1.016) (layer Cuivre) (net 34) (status 800)) - (segment (start 142.24 97.79) (end 138.43 97.79) (width 0.4826) (layer Cuivre) (net 34)) - (segment (start 138.43 97.79) (end 137.16 99.06) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 137.16 99.06) (end 137.16 103.505) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 143.51 96.52) (end 142.24 97.79) (width 1.016) (layer Cuivre) (net 34) (status 800)) - (segment (start 109.855 124.46) (end 107.95 124.46) (width 1.016) (layer Composant) (net 34) (status 400)) - (segment (start 109.22 118.11) (end 110.49 119.38) (width 1.016) (layer Composant) (net 34)) - (segment (start 109.855 111.76) (end 110.49 112.395) (width 1.016) (layer Composant) (net 34)) - (segment (start 110.49 112.395) (end 110.49 116.84) (width 1.016) (layer Composant) (net 34)) - (segment (start 110.49 116.84) (end 109.22 118.11) (width 1.016) (layer Composant) (net 34)) - (segment (start 109.22 118.11) (end 107.95 118.11) (width 1.016) (layer Composant) (net 34) (status 400)) - (segment (start 107.95 111.76) (end 109.855 111.76) (width 1.016) (layer Composant) (net 34) (status 800)) - (segment (start 125.73 67.31) (end 123.825 67.31) (width 1.016) (layer Cuivre) (net 34) (status 800)) - (segment (start 110.49 78.74) (end 110.49 73.66) (width 1.016) (layer Cuivre) (net 34) (status 800)) - (segment (start 110.49 73.66) (end 107.95 71.12) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 110.49 78.74) (end 110.49 84.455) (width 1.016) (layer Cuivre) (net 34) (status 800)) - (segment (start 114.3 88.265) (end 114.3 93.345) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 110.49 84.455) (end 114.3 88.265) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 110.49 119.38) (end 110.49 123.825) (width 1.016) (layer Composant) (net 34)) - (segment (start 187.96 104.775) (end 194.945 104.775) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 186.69 109.22) (end 186.69 106.045) (width 1.016) (layer Cuivre) (net 34) (status 800)) - (segment (start 196.85 112.395) (end 196.85 106.68) (width 1.016) (layer Cuivre) (net 34) (status 800)) - (segment (start 196.85 106.68) (end 194.945 104.775) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 186.69 106.045) (end 187.96 104.775) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 130.81 93.345) (end 134.62 89.535) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 123.825 79.375) (end 123.825 67.31) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 115.57 111.76) (end 115.57 104.775) (width 1.016) (layer Cuivre) (net 34) (status 800)) - (segment (start 114.3 97.155) (end 115.57 98.425) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 114.3 93.345) (end 114.3 97.155) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 115.57 98.425) (end 115.57 104.775) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 101.6 71.12) (end 107.95 71.12) (width 1.016) (layer Cuivre) (net 34) (status 800)) - (segment (start 139.065 87.63) (end 134.62 87.63) (width 1.016) (layer Cuivre) (net 34) (status 800)) - (segment (start 124.46 80.01) (end 123.825 79.375) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 126.365 80.01) (end 124.46 80.01) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 110.49 123.825) (end 109.855 124.46) (width 1.016) (layer Composant) (net 34)) - (segment (start 144.78 102.235) (end 144.78 96.52) (width 1.016) (layer Cuivre) (net 34) (status 800)) - (segment (start 144.78 96.52) (end 147.32 96.52) (width 1.016) (layer Cuivre) (net 34) (status 400)) - (segment (start 143.51 96.52) (end 144.78 96.52) (width 1.016) (layer Cuivre) (net 34) (status 800)) - (segment (start 134.62 87.63) (end 133.985 87.63) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 107.95 111.76) (end 115.57 111.76) (width 1.016) (layer Cuivre) (net 34) (status C02)) - (segment (start 123.825 67.31) (end 123.19 67.31) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 123.19 67.31) (end 120.65 64.77) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 118.11 64.77) (end 120.65 64.77) (width 1.016) (layer Cuivre) (net 34) (status 802)) - (segment (start 134.62 89.535) (end 134.62 87.63) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 114.3 93.345) (end 130.81 93.345) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 133.985 87.63) (end 126.365 80.01) (width 1.016) (layer Cuivre) (net 34)) - (segment (start 139.065 51.181) (end 140.462 49.784) (width 0.635) (layer Cuivre) (net 35)) - (segment (start 140.462 49.784) (end 143.002 49.784) (width 0.635) (layer Cuivre) (net 35) (status 400)) - (segment (start 139.065 54.61) (end 139.065 51.181) (width 0.635) (layer Cuivre) (net 35) (status 800)) - (segment (start 128.27 74.295) (end 128.27 75.565) (width 0.635) (layer Cuivre) (net 35) (status 400)) - (segment (start 133.985 62.23) (end 133.985 59.69) (width 0.635) (layer Cuivre) (net 35) (status 800)) - (segment (start 137.16 57.15) (end 143.51 57.15) (width 0.635) (layer Cuivre) (net 35) (status 800)) - (segment (start 143.51 57.15) (end 147.32 60.96) (width 0.635) (layer Cuivre) (net 35) (status 400)) - (segment (start 136.525 57.15) (end 137.16 57.15) (width 0.635) (layer Cuivre) (net 35) (status 400)) - (segment (start 137.16 57.15) (end 137.16 56.515) (width 0.635) (layer Cuivre) (net 35) (status 800)) - (segment (start 137.16 56.515) (end 139.065 54.61) (width 0.635) (layer Cuivre) (net 35) (status 400)) - (segment (start 133.985 62.23) (end 133.985 68.58) (width 0.635) (layer Cuivre) (net 35) (status 800)) - (segment (start 133.985 68.58) (end 128.27 74.295) (width 0.635) (layer Cuivre) (net 35)) - (segment (start 136.525 57.15) (end 133.985 59.69) (width 0.635) (layer Cuivre) (net 35)) + (segment (start 80.01 114.173) (end 83.947 114.173) (width 0.635) (layer Cuivre) (net 1) (status 800)) + (segment (start 123.19 113.03) (end 123.19 111.76) (width 0.635) (layer Cuivre) (net 1) (status 400)) + (segment (start 121.92 114.3) (end 123.19 113.03) (width 0.635) (layer Cuivre) (net 1)) + (segment (start 113.03 114.3) (end 121.92 114.3) (width 0.635) (layer Cuivre) (net 1) (status 2)) + (segment (start 83.947 114.173) (end 84.455 113.665) (width 0.635) (layer Cuivre) (net 1)) + (segment (start 84.455 113.665) (end 112.395 113.665) (width 0.635) (layer Cuivre) (net 1)) + (segment (start 87.63 118.11) (end 87.63 115.57) (width 0.635) (layer Cuivre) (net 2) (status C00)) + (segment (start 87.63 115.57) (end 82.55 115.57) (width 0.635) (layer Cuivre) (net 2) (status C02)) + (segment (start 133.985 87.63) (end 126.365 80.01) (width 1.016) (layer Cuivre) (net 4)) + (segment (start 114.3 93.345) (end 130.81 93.345) (width 1.016) (layer Cuivre) (net 4)) + (segment (start 134.62 89.535) (end 134.62 87.63) (width 1.016) (layer Cuivre) (net 4)) + (segment (start 118.11 64.77) (end 120.65 64.77) (width 1.016) (layer Cuivre) (net 4) (status 802)) + (segment (start 123.19 67.31) (end 120.65 64.77) (width 1.016) (layer Cuivre) (net 4)) + (segment (start 123.825 67.31) (end 123.19 67.31) (width 1.016) (layer Cuivre) (net 4)) + (segment (start 107.95 111.76) (end 115.57 111.76) (width 1.016) (layer Cuivre) (net 4) (status C02)) + (segment (start 134.62 87.63) (end 133.985 87.63) (width 1.016) (layer Cuivre) (net 4)) + (segment (start 143.51 96.52) (end 144.78 96.52) (width 1.016) (layer Cuivre) (net 4) (status 800)) + (segment (start 144.78 96.52) (end 147.32 96.52) (width 1.016) (layer Cuivre) (net 4) (status 400)) + (segment (start 144.78 102.235) (end 144.78 96.52) (width 1.016) (layer Cuivre) (net 4) (status 800)) + (segment (start 110.49 123.825) (end 109.855 124.46) (width 1.016) (layer Composant) (net 4)) + (segment (start 126.365 80.01) (end 124.46 80.01) (width 1.016) (layer Cuivre) (net 4)) + (segment (start 124.46 80.01) (end 123.825 79.375) (width 1.016) (layer Cuivre) (net 4)) + (segment (start 139.065 87.63) (end 134.62 87.63) (width 1.016) (layer Cuivre) (net 4) (status 800)) + (segment (start 101.6 71.12) (end 107.95 71.12) (width 1.016) (layer Cuivre) (net 4) (status 800)) + (segment (start 115.57 98.425) (end 115.57 104.775) (width 1.016) (layer Cuivre) (net 4)) + (segment (start 114.3 93.345) (end 114.3 97.155) (width 1.016) (layer Cuivre) (net 4)) + (segment (start 114.3 97.155) (end 115.57 98.425) (width 1.016) (layer Cuivre) (net 4)) + (segment (start 115.57 111.76) (end 115.57 104.775) (width 1.016) (layer Cuivre) (net 4) (status 800)) + (segment (start 123.825 79.375) (end 123.825 67.31) (width 1.016) (layer Cuivre) (net 4)) + (segment (start 130.81 93.345) (end 134.62 89.535) (width 1.016) (layer Cuivre) (net 4)) + (segment (start 186.69 106.045) (end 187.96 104.775) (width 1.016) (layer Cuivre) (net 4)) + (segment (start 196.85 106.68) (end 194.945 104.775) (width 1.016) (layer Cuivre) (net 4)) + (segment (start 196.85 112.395) (end 196.85 106.68) (width 1.016) (layer Cuivre) (net 4) (status 800)) + (segment (start 186.69 109.22) (end 186.69 106.045) (width 1.016) (layer Cuivre) (net 4) (status 800)) + (segment (start 187.96 104.775) (end 194.945 104.775) (width 1.016) (layer Cuivre) (net 4)) + (segment (start 110.49 119.38) (end 110.49 123.825) (width 1.016) (layer Composant) (net 4)) + (segment (start 110.49 84.455) (end 114.3 88.265) (width 1.016) (layer Cuivre) (net 4)) + (segment (start 114.3 88.265) (end 114.3 93.345) (width 1.016) (layer Cuivre) (net 4)) + (segment (start 110.49 78.74) (end 110.49 84.455) (width 1.016) (layer Cuivre) (net 4) (status 800)) + (segment (start 110.49 73.66) (end 107.95 71.12) (width 1.016) (layer Cuivre) (net 4)) + (segment (start 110.49 78.74) (end 110.49 73.66) (width 1.016) (layer Cuivre) (net 4) (status 800)) + (segment (start 125.73 67.31) (end 123.825 67.31) (width 1.016) (layer Cuivre) (net 4) (status 800)) + (segment (start 107.95 111.76) (end 109.855 111.76) (width 1.016) (layer Composant) (net 4) (status 800)) + (segment (start 109.22 118.11) (end 107.95 118.11) (width 1.016) (layer Composant) (net 4) (status 400)) + (segment (start 110.49 116.84) (end 109.22 118.11) (width 1.016) (layer Composant) (net 4)) + (segment (start 110.49 112.395) (end 110.49 116.84) (width 1.016) (layer Composant) (net 4)) + (segment (start 109.855 111.76) (end 110.49 112.395) (width 1.016) (layer Composant) (net 4)) + (segment (start 109.22 118.11) (end 110.49 119.38) (width 1.016) (layer Composant) (net 4)) + (segment (start 109.855 124.46) (end 107.95 124.46) (width 1.016) (layer Composant) (net 4) (status 400)) + (segment (start 143.51 96.52) (end 142.24 97.79) (width 1.016) (layer Cuivre) (net 4) (status 800)) + (segment (start 137.16 99.06) (end 137.16 103.505) (width 1.016) (layer Cuivre) (net 4)) + (segment (start 138.43 97.79) (end 137.16 99.06) (width 1.016) (layer Cuivre) (net 4)) + (segment (start 142.24 97.79) (end 138.43 97.79) (width 0.4826) (layer Cuivre) (net 4)) + (segment (start 147.32 96.52) (end 148.59 96.52) (width 1.016) (layer Cuivre) (net 4) (status 800)) + (segment (start 186.69 106.045) (end 186.69 109.22) (width 1.016) (layer Composant) (net 4) (status 400)) + (segment (start 185.42 104.775) (end 186.69 106.045) (width 1.016) (layer Composant) (net 4)) + (segment (start 170.18 104.775) (end 185.42 104.775) (width 1.016) (layer Composant) (net 4)) + (via (at 170.18 104.775) (size 1.651) (layers Composant Cuivre) (net 4)) + (segment (start 167.64 104.775) (end 170.18 104.775) (width 1.016) (layer Cuivre) (net 4)) + (segment (start 165.735 106.68) (end 167.64 104.775) (width 1.016) (layer Cuivre) (net 4)) + (segment (start 158.75 106.68) (end 165.735 106.68) (width 1.016) (layer Cuivre) (net 4)) + (segment (start 148.59 96.52) (end 158.75 106.68) (width 1.016) (layer Cuivre) (net 4)) + (segment (start 135.89 104.775) (end 115.57 104.775) (width 1.016) (layer Cuivre) (net 4)) + (segment (start 137.16 103.505) (end 135.89 104.775) (width 1.016) (layer Cuivre) (net 4)) + (segment (start 136.525 57.15) (end 133.985 59.69) (width 0.635) (layer Cuivre) (net 5)) + (segment (start 133.985 68.58) (end 128.27 74.295) (width 0.635) (layer Cuivre) (net 5)) + (segment (start 133.985 62.23) (end 133.985 68.58) (width 0.635) (layer Cuivre) (net 5) (status 800)) + (segment (start 137.16 56.515) (end 139.065 54.61) (width 0.635) (layer Cuivre) (net 5) (status 400)) + (segment (start 137.16 57.15) (end 137.16 56.515) (width 0.635) (layer Cuivre) (net 5) (status 800)) + (segment (start 136.525 57.15) (end 137.16 57.15) (width 0.635) (layer Cuivre) (net 5) (status 400)) + (segment (start 143.51 57.15) (end 147.32 60.96) (width 0.635) (layer Cuivre) (net 5) (status 400)) + (segment (start 137.16 57.15) (end 143.51 57.15) (width 0.635) (layer Cuivre) (net 5) (status 800)) + (segment (start 133.985 62.23) (end 133.985 59.69) (width 0.635) (layer Cuivre) (net 5) (status 800)) + (segment (start 128.27 74.295) (end 128.27 75.565) (width 0.635) (layer Cuivre) (net 5) (status 400)) + (segment (start 139.065 54.61) (end 139.065 51.181) (width 0.635) (layer Cuivre) (net 5) (status 800)) + (segment (start 140.462 49.784) (end 143.002 49.784) (width 0.635) (layer Cuivre) (net 5) (status 400)) + (segment (start 139.065 51.181) (end 140.462 49.784) (width 0.635) (layer Cuivre) (net 5)) + (segment (start 201.93 64.77) (end 205.74 64.77) (width 1.016) (layer Cuivre) (net 6)) + (segment (start 198.755 67.945) (end 201.93 64.77) (width 1.016) (layer Cuivre) (net 6)) + (segment (start 205.74 64.77) (end 210.185 64.77) (width 0.4318) (layer Cuivre) (net 6)) + (segment (start 198.755 71.12) (end 198.755 67.945) (width 1.016) (layer Cuivre) (net 6) (status 800)) + (segment (start 210.185 64.77) (end 210.82 64.77) (width 1.016) (layer Cuivre) (net 6)) + (segment (start 190.5 71.12) (end 198.755 71.12) (width 1.016) (layer Cuivre) (net 6) (status C00)) + (segment (start 213.36 71.12) (end 215.265 71.12) (width 1.016) (layer Cuivre) (net 6) (status 400)) + (segment (start 212.725 70.485) (end 213.36 71.12) (width 1.016) (layer Cuivre) (net 6)) + (segment (start 166.37 120.65) (end 147.955 102.235) (width 1.016) (layer Cuivre) (net 6) (status 400)) + (segment (start 210.82 64.77) (end 212.725 66.675) (width 1.016) (layer Cuivre) (net 6)) + (segment (start 206.375 102.235) (end 219.075 102.235) (width 1.016) (layer Cuivre) (net 6)) + (segment (start 203.2 105.41) (end 206.375 102.235) (width 1.016) (layer Cuivre) (net 6)) + (segment (start 212.725 66.675) (end 212.725 70.485) (width 1.016) (layer Cuivre) (net 6)) + (segment (start 204.47 116.84) (end 210.185 116.84) (width 0.4318) (layer Cuivre) (net 6) (status 2)) + (segment (start 219.71 71.12) (end 215.265 71.12) (width 1.016) (layer Cuivre) (net 6) (status 400)) + (segment (start 220.345 71.755) (end 219.71 71.12) (width 1.016) (layer Cuivre) (net 6)) + (segment (start 220.345 100.965) (end 220.345 71.755) (width 1.016) (layer Cuivre) (net 6)) + (segment (start 219.075 102.235) (end 220.345 100.965) (width 1.016) (layer Cuivre) (net 6)) + (segment (start 198.12 119.38) (end 210.185 119.38) (width 0.4318) (layer Cuivre) (net 6)) + (segment (start 210.185 119.38) (end 210.185 118.11) (width 1.016) (layer Cuivre) (net 6)) + (segment (start 193.04 119.38) (end 198.12 119.38) (width 1.016) (layer Cuivre) (net 6)) + (segment (start 182.245 121.92) (end 189.23 121.92) (width 0.4318) (layer Cuivre) (net 6)) + (segment (start 189.23 121.92) (end 190.5 121.92) (width 1.016) (layer Cuivre) (net 6)) + (segment (start 185.42 71.12) (end 190.5 71.12) (width 1.016) (layer Cuivre) (net 6) (status 400)) + (segment (start 190.5 121.92) (end 193.04 119.38) (width 1.016) (layer Cuivre) (net 6)) + (segment (start 180.975 120.65) (end 182.245 121.92) (width 1.016) (layer Cuivre) (net 6)) + (segment (start 179.07 120.65) (end 180.975 120.65) (width 1.016) (layer Cuivre) (net 6) (status 800)) + (segment (start 175.26 76.2) (end 180.34 76.2) (width 1.016) (layer Cuivre) (net 6) (status 800)) + (segment (start 210.185 118.11) (end 215.265 118.11) (width 1.016) (layer Cuivre) (net 6) (status 402)) + (segment (start 180.34 76.2) (end 185.42 71.12) (width 1.016) (layer Cuivre) (net 6)) + (segment (start 203.2 105.41) (end 203.2 112.395) (width 1.016) (layer Cuivre) (net 6)) + (segment (start 203.2 112.395) (end 203.2 115.57) (width 1.016) (layer Cuivre) (net 6)) + (segment (start 203.2 115.57) (end 204.47 116.84) (width 0.635) (layer Cuivre) (net 6)) + (segment (start 147.32 99.06) (end 147.32 101.6) (width 1.016) (layer Cuivre) (net 6) (status 800)) + (segment (start 147.32 101.6) (end 147.955 102.235) (width 1.016) (layer Cuivre) (net 6) (status 400)) + (segment (start 140.97 99.06) (end 140.97 104.14) (width 1.016) (layer Cuivre) (net 6) (status 800)) + (segment (start 140.97 104.14) (end 142.24 105.41) (width 1.016) (layer Cuivre) (net 6)) + (segment (start 142.24 105.41) (end 144.78 105.41) (width 1.016) (layer Cuivre) (net 6)) + (segment (start 144.78 105.41) (end 147.955 102.235) (width 1.016) (layer Cuivre) (net 6) (status 400)) + (segment (start 179.07 120.65) (end 166.37 120.65) (width 1.016) (layer Cuivre) (net 6) (status 800)) + (segment (start 210.185 118.11) (end 210.185 116.84) (width 1.016) (layer Cuivre) (net 6) (status 2)) + (segment (start 200.66 112.395) (end 203.2 112.395) (width 1.016) (layer Cuivre) (net 6) (status 800)) + (segment (start 83.185 111.76) (end 87.63 111.76) (width 0.635) (layer Cuivre) (net 7) (status 400)) + (segment (start 82.55 112.395) (end 83.185 111.76) (width 0.635) (layer Cuivre) (net 7)) + (segment (start 82.55 112.776) (end 82.55 112.395) (width 0.635) (layer Cuivre) (net 7) (status 800)) + (segment (start 87.63 111.76) (end 87.63 109.22) (width 0.635) (layer Cuivre) (net 7) (status C00)) + (segment (start 77.47 117.475) (end 77.47 120.65) (width 0.635) (layer Cuivre) (net 8)) + (segment (start 80.01 116.84) (end 78.105 116.84) (width 0.635) (layer Cuivre) (net 8) (status 800)) + (segment (start 86.36 124.46) (end 87.63 124.46) (width 0.635) (layer Cuivre) (net 8) (status 400)) + (segment (start 80.01 123.19) (end 85.09 123.19) (width 0.635) (layer Cuivre) (net 8)) + (segment (start 78.105 116.84) (end 77.47 117.475) (width 0.635) (layer Cuivre) (net 8)) + (segment (start 85.09 123.19) (end 86.36 124.46) (width 0.635) (layer Cuivre) (net 8)) + (segment (start 87.63 124.46) (end 87.63 121.92) (width 0.635) (layer Cuivre) (net 8) (status C00)) + (segment (start 77.47 120.65) (end 80.01 123.19) (width 0.635) (layer Cuivre) (net 8)) + (segment (start 207.645 50.8) (end 207.645 46.355) (width 0.635) (layer Cuivre) (net 9) (status 800)) + (segment (start 179.07 130.81) (end 180.975 132.715) (width 0.635) (layer Cuivre) (net 9)) + (segment (start 207.645 115.57) (end 205.105 115.57) (width 0.635) (layer Cuivre) (net 9) (status 800)) + (segment (start 221.615 104.14) (end 220.98 104.14) (width 0.635) (layer Cuivre) (net 9)) + (segment (start 221.615 104.14) (end 222.25 103.505) (width 0.635) (layer Cuivre) (net 9)) + (segment (start 220.98 130.81) (end 220.98 104.14) (width 0.635) (layer Cuivre) (net 9)) + (segment (start 218.44 133.35) (end 220.98 130.81) (width 0.635) (layer Cuivre) (net 9)) + (segment (start 222.25 48.895) (end 222.25 103.505) (width 0.635) (layer Cuivre) (net 9)) + (segment (start 205.105 115.57) (end 204.47 114.935) (width 0.635) (layer Cuivre) (net 9)) + (segment (start 204.47 114.935) (end 204.47 106.68) (width 0.635) (layer Cuivre) (net 9)) + (segment (start 204.47 106.68) (end 207.01 104.14) (width 0.635) (layer Cuivre) (net 9)) + (segment (start 207.01 104.14) (end 220.98 104.14) (width 0.635) (layer Cuivre) (net 9)) + (segment (start 219.71 46.355) (end 207.645 46.355) (width 0.635) (layer Cuivre) (net 9)) + (segment (start 156.845 50.8) (end 175.26 50.8) (width 0.635) (layer Cuivre) (net 9) (status 400)) + (segment (start 195.58 132.715) (end 196.215 133.35) (width 0.635) (layer Cuivre) (net 9)) + (segment (start 175.26 50.8) (end 175.26 47.625) (width 0.635) (layer Cuivre) (net 9) (status 800)) + (segment (start 179.07 130.81) (end 179.07 128.27) (width 0.635) (layer Cuivre) (net 9) (status 400)) + (segment (start 207.645 46.355) (end 176.53 46.355) (width 0.635) (layer Cuivre) (net 9)) + (segment (start 175.26 47.625) (end 176.53 46.355) (width 0.635) (layer Cuivre) (net 9)) + (segment (start 222.25 48.895) (end 219.71 46.355) (width 0.635) (layer Cuivre) (net 9)) + (segment (start 196.215 133.35) (end 218.44 133.35) (width 0.635) (layer Cuivre) (net 9)) + (segment (start 195.58 132.715) (end 180.975 132.715) (width 0.635) (layer Cuivre) (net 9)) + (segment (start 156.845 50.8) (end 152.4 55.245) (width 0.635) (layer Cuivre) (net 9)) + (segment (start 152.4 55.245) (end 152.4 58.42) (width 0.635) (layer Cuivre) (net 9) (status 400)) + (segment (start 189.865 110.49) (end 189.865 113.665) (width 0.635) (layer Cuivre) (net 10)) + (segment (start 140.335 122.555) (end 144.78 127) (width 0.635) (layer Cuivre) (net 10)) + (segment (start 217.805 123.825) (end 217.17 123.19) (width 0.635) (layer Cuivre) (net 10)) + (segment (start 217.805 130.175) (end 217.805 123.825) (width 0.635) (layer Cuivre) (net 10)) + (segment (start 205.74 54.61) (end 208.915 54.61) (width 0.4318) (layer Cuivre) (net 10)) + (segment (start 196.85 54.61) (end 205.74 54.61) (width 0.635) (layer Cuivre) (net 10)) + (segment (start 211.455 53.34) (end 210.185 54.61) (width 0.635) (layer Cuivre) (net 10)) + (segment (start 210.185 54.61) (end 208.915 54.61) (width 0.635) (layer Cuivre) (net 10)) + (segment (start 211.455 53.34) (end 215.265 53.34) (width 0.635) (layer Cuivre) (net 10) (status 400)) + (segment (start 192.405 125.73) (end 198.12 131.445) (width 0.635) (layer Cuivre) (net 10)) + (segment (start 144.78 127) (end 177.165 127) (width 0.635) (layer Cuivre) (net 10)) + (segment (start 193.04 107.315) (end 193.04 75.565) (width 0.635) (layer Composant) (net 10)) + (segment (start 196.85 67.31) (end 196.85 54.61) (width 0.635) (layer Composant) (net 10)) + (segment (start 189.865 123.19) (end 192.405 125.73) (width 0.635) (layer Composant) (net 10)) + (segment (start 189.23 114.3) (end 186.69 114.3) (width 0.635) (layer Cuivre) (net 10) (status 400)) + (via (at 192.405 125.73) (size 1.651) (layers Composant Cuivre) (net 10)) + (via (at 196.85 54.61) (size 1.651) (layers Composant Cuivre) (net 10)) + (segment (start 193.04 75.565) (end 196.215 72.39) (width 0.635) (layer Composant) (net 10)) + (segment (start 193.04 107.315) (end 189.865 110.49) (width 0.635) (layer Composant) (net 10)) + (segment (start 186.69 125.73) (end 192.405 125.73) (width 0.635) (layer Cuivre) (net 10) (status 802)) + (segment (start 198.12 131.445) (end 216.535 131.445) (width 0.635) (layer Cuivre) (net 10)) + (segment (start 140.335 121.92) (end 140.335 122.555) (width 0.635) (layer Cuivre) (net 10) (status 800)) + (segment (start 217.17 123.19) (end 215.265 123.19) (width 0.635) (layer Cuivre) (net 10) (status 400)) + (segment (start 195.58 53.34) (end 196.85 54.61) (width 0.635) (layer Cuivre) (net 10)) + (segment (start 190.5 53.34) (end 195.58 53.34) (width 0.635) (layer Cuivre) (net 10) (status 800)) + (segment (start 196.215 67.945) (end 196.85 67.31) (width 0.635) (layer Composant) (net 10)) + (segment (start 189.865 110.49) (end 189.865 123.19) (width 0.635) (layer Composant) (net 10)) + (segment (start 196.215 72.39) (end 196.215 67.945) (width 0.635) (layer Composant) (net 10)) + (segment (start 182.245 125.73) (end 186.69 125.73) (width 0.635) (layer Cuivre) (net 10) (status 400)) + (via (at 189.865 110.49) (size 1.651) (layers Composant Cuivre) (net 10)) + (segment (start 182.245 125.73) (end 180.975 127) (width 0.635) (layer Cuivre) (net 10)) + (segment (start 177.165 127) (end 180.975 127) (width 0.4318) (layer Cuivre) (net 10)) + (segment (start 216.535 131.445) (end 217.805 130.175) (width 0.635) (layer Cuivre) (net 10)) + (segment (start 189.865 113.665) (end 189.23 114.3) (width 0.635) (layer Cuivre) (net 10)) + (via (at 192.405 123.19) (size 1.651) (layers Composant Cuivre) (net 11)) + (segment (start 132.715 109.22) (end 135.255 111.76) (width 0.635) (layer Composant) (net 11) (status 400)) + (segment (start 192.405 114.3) (end 192.405 123.19) (width 0.635) (layer Composant) (net 11)) + (segment (start 200.025 52.07) (end 205.74 52.07) (width 0.635) (layer Cuivre) (net 11)) + (segment (start 203.2 121.92) (end 213.995 121.92) (width 0.4318) (layer Cuivre) (net 11) (status 2)) + (segment (start 173.99 125.095) (end 174.625 124.46) (width 0.635) (layer Cuivre) (net 11)) + (segment (start 209.55 52.07) (end 210.82 50.8) (width 0.635) (layer Cuivre) (net 11)) + (segment (start 201.93 123.19) (end 203.2 121.92) (width 0.635) (layer Cuivre) (net 11) (status 2)) + (segment (start 213.995 121.92) (end 215.265 120.65) (width 0.635) (layer Cuivre) (net 11) (status 402)) + (segment (start 186.69 123.19) (end 192.405 123.19) (width 0.635) (layer Cuivre) (net 11) (status 802)) + (segment (start 174.625 124.46) (end 181.61 124.46) (width 0.4318) (layer Cuivre) (net 11)) + (segment (start 149.86 125.095) (end 173.99 125.095) (width 0.635) (layer Cuivre) (net 11)) + (segment (start 181.61 124.46) (end 182.88 123.19) (width 0.635) (layer Cuivre) (net 11)) + (segment (start 120.65 109.855) (end 121.285 109.22) (width 0.635) (layer Composant) (net 11)) + (segment (start 120.65 111.76) (end 120.65 109.855) (width 0.635) (layer Composant) (net 11) (status 800)) + (segment (start 192.405 123.19) (end 201.93 123.19) (width 0.635) (layer Cuivre) (net 11)) + (segment (start 121.285 109.22) (end 132.715 109.22) (width 0.635) (layer Composant) (net 11)) + (segment (start 205.74 52.07) (end 209.55 52.07) (width 0.4318) (layer Cuivre) (net 11)) + (segment (start 182.88 123.19) (end 186.69 123.19) (width 0.635) (layer Cuivre) (net 11) (status 400)) + (segment (start 194.945 91.44) (end 194.945 113.665) (width 0.635) (layer Composant) (net 11)) + (segment (start 194.945 113.665) (end 194.31 114.3) (width 0.635) (layer Composant) (net 11)) + (segment (start 200.025 57.15) (end 200.025 52.07) (width 0.635) (layer Composant) (net 11)) + (via (at 200.025 52.07) (size 1.651) (layers Composant Cuivre) (net 11)) + (segment (start 194.31 114.3) (end 192.405 114.3) (width 0.635) (layer Composant) (net 11)) + (segment (start 190.5 50.8) (end 198.755 50.8) (width 0.635) (layer Cuivre) (net 11) (status 800)) + (segment (start 198.755 50.8) (end 200.025 52.07) (width 0.635) (layer Cuivre) (net 11)) + (segment (start 135.255 111.76) (end 137.795 114.3) (width 0.635) (layer Cuivre) (net 11) (status 800)) + (segment (start 215.265 50.8) (end 210.82 50.8) (width 0.635) (layer Cuivre) (net 11) (status 800)) + (segment (start 200.025 57.15) (end 201.295 58.42) (width 0.635) (layer Composant) (net 11)) + (via (at 192.405 114.3) (size 1.651) (layers Composant Cuivre) (net 11)) + (segment (start 201.295 58.42) (end 201.295 85.09) (width 0.635) (layer Composant) (net 11)) + (segment (start 201.295 85.09) (end 194.945 91.44) (width 0.635) (layer Composant) (net 11)) + (segment (start 137.795 114.3) (end 139.065 114.3) (width 0.635) (layer Cuivre) (net 11)) + (segment (start 139.065 114.3) (end 149.86 125.095) (width 0.635) (layer Cuivre) (net 11)) + (segment (start 192.405 114.3) (end 191.77 114.3) (width 0.635) (layer Cuivre) (net 11)) + (segment (start 189.23 116.84) (end 186.69 116.84) (width 0.635) (layer Cuivre) (net 11) (status 400)) + (segment (start 191.77 114.3) (end 189.23 116.84) (width 0.635) (layer Cuivre) (net 11)) + (segment (start 87.63 71.12) (end 96.52 71.12) (width 1.016) (layer Cuivre) (net 12) (status C02)) + (segment (start 84.455 90.17) (end 84.455 89.535) (width 1.016) (layer Cuivre) (net 12) (status 800)) + (segment (start 82.55 76.2) (end 87.63 71.12) (width 1.016) (layer Cuivre) (net 12) (status 400)) + (segment (start 82.55 87.63) (end 82.55 76.2) (width 1.016) (layer Cuivre) (net 12)) + (segment (start 84.455 89.535) (end 82.55 87.63) (width 1.016) (layer Cuivre) (net 12)) + (segment (start 114.3 48.26) (end 114.3 52.07) (width 0.635) (layer Cuivre) (net 13) (status C00)) + (segment (start 110.49 57.15) (end 110.49 53.34) (width 0.4318) (layer Cuivre) (net 13) (status 800)) + (segment (start 110.49 53.34) (end 111.76 52.07) (width 0.4318) (layer Cuivre) (net 13)) + (segment (start 111.76 52.07) (end 114.3 52.07) (width 0.4318) (layer Cuivre) (net 13) (status 400)) + (segment (start 128.27 48.26) (end 129.54 49.53) (width 0.635) (layer Cuivre) (net 14) (status 402)) + (segment (start 124.46 48.26) (end 128.27 48.26) (width 0.635) (layer Cuivre) (net 14) (status 802)) + (segment (start 144.78 60.96) (end 139.065 60.96) (width 0.635) (layer Cuivre) (net 15) (status C02)) + (segment (start 149.225 54.61) (end 149.225 59.055) (width 0.635) (layer Cuivre) (net 15) (status 800)) + (segment (start 148.59 63.5) (end 147.32 63.5) (width 0.635) (layer Cuivre) (net 15)) + (segment (start 149.225 59.055) (end 149.86 59.69) (width 0.635) (layer Cuivre) (net 15)) + (segment (start 149.86 62.23) (end 148.59 63.5) (width 0.635) (layer Cuivre) (net 15)) + (segment (start 149.86 59.69) (end 149.86 62.23) (width 0.635) (layer Cuivre) (net 15)) + (segment (start 144.78 60.96) (end 147.32 63.5) (width 0.4318) (layer Cuivre) (net 15) (status 800)) + (segment (start 145.542 49.784) (end 148.082 49.784) (width 0.635) (layer Cuivre) (net 15) (status C00)) + (segment (start 148.082 49.784) (end 148.844 49.784) (width 0.635) (layer Cuivre) (net 15) (status 800)) + (segment (start 149.225 50.165) (end 149.225 54.61) (width 0.635) (layer Cuivre) (net 15) (status 400)) + (segment (start 148.844 49.784) (end 149.225 50.165) (width 0.635) (layer Cuivre) (net 15)) + (segment (start 78.74 62.23) (end 83.82 62.23) (width 1.016) (layer Cuivre) (net 16) (status 802)) + (segment (start 83.82 62.23) (end 87.63 58.42) (width 1.016) (layer Cuivre) (net 16) (status 402)) + (segment (start 106.045 121.92) (end 107.95 121.92) (width 0.635) (layer Cuivre) (net 17) (status 400)) + (segment (start 94.615 124.46) (end 97.155 127) (width 0.635) (layer Cuivre) (net 17)) + (segment (start 97.79 118.11) (end 95.885 118.11) (width 0.635) (layer Cuivre) (net 17) (status 800)) + (segment (start 100.33 118.11) (end 97.79 118.11) (width 0.635) (layer Cuivre) (net 17) (status C02)) + (segment (start 116.205 121.92) (end 118.11 120.015) (width 0.635) (layer Cuivre) (net 17)) + (segment (start 118.11 120.015) (end 118.11 119.38) (width 0.635) (layer Cuivre) (net 17) (status 400)) + (segment (start 107.95 121.92) (end 116.205 121.92) (width 0.635) (layer Cuivre) (net 17) (status 800)) + (segment (start 95.885 118.11) (end 94.615 119.38) (width 0.635) (layer Cuivre) (net 17)) + (segment (start 94.615 119.38) (end 94.615 124.46) (width 0.635) (layer Cuivre) (net 17)) + (segment (start 100.965 127) (end 106.045 121.92) (width 0.635) (layer Cuivre) (net 17)) + (segment (start 97.155 127) (end 100.965 127) (width 0.635) (layer Cuivre) (net 17)) + (segment (start 100.33 111.76) (end 104.267 111.76) (width 0.635) (layer Cuivre) (net 18) (status 802)) + (segment (start 100.33 111.76) (end 97.79 111.76) (width 0.635) (layer Cuivre) (net 18) (status C02)) + (segment (start 111.76 109.855) (end 111.76 119.38) (width 0.635) (layer Composant) (net 18)) + (segment (start 125.73 120.65) (end 125.73 119.38) (width 0.635) (layer Composant) (net 18) (status 402)) + (segment (start 115.57 123.19) (end 123.19 123.19) (width 0.635) (layer Composant) (net 18)) + (segment (start 111.125 109.22) (end 111.76 109.855) (width 0.635) (layer Composant) (net 18)) + (segment (start 111.76 119.38) (end 115.57 123.19) (width 0.635) (layer Composant) (net 18)) + (segment (start 123.19 123.19) (end 125.73 120.65) (width 0.635) (layer Composant) (net 18) (status 2)) + (segment (start 107.95 109.22) (end 111.125 109.22) (width 0.635) (layer Composant) (net 18) (status 800)) + (segment (start 107.95 109.22) (end 106.807 109.22) (width 0.635) (layer Cuivre) (net 18) (status 800)) + (segment (start 106.807 109.22) (end 104.267 111.76) (width 0.635) (layer Cuivre) (net 18)) + (segment (start 128.27 113.03) (end 125.73 115.57) (width 0.635) (layer Cuivre) (net 19)) + (segment (start 101.6 120.015) (end 106.045 115.57) (width 0.635) (layer Cuivre) (net 19)) + (segment (start 100.33 124.46) (end 97.79 124.46) (width 0.635) (layer Cuivre) (net 19) (status C02)) + (segment (start 106.045 115.57) (end 107.95 115.57) (width 0.635) (layer Cuivre) (net 19) (status 402)) + (segment (start 95.885 122.555) (end 97.79 124.46) (width 0.635) (layer Cuivre) (net 19) (status 400)) + (segment (start 128.27 111.76) (end 128.27 113.03) (width 0.635) (layer Cuivre) (net 19) (status 800)) + (segment (start 107.95 115.57) (end 125.73 115.57) (width 0.635) (layer Cuivre) (net 19) (status 802)) + (segment (start 96.52 120.015) (end 101.6 120.015) (width 0.635) (layer Cuivre) (net 19)) + (segment (start 95.885 120.65) (end 95.885 122.555) (width 0.635) (layer Cuivre) (net 19)) + (segment (start 96.52 120.015) (end 95.885 120.65) (width 0.635) (layer Cuivre) (net 19)) + (segment (start 153.67 77.47) (end 149.225 77.47) (width 0.635) (layer Cuivre) (net 20) (status C00)) + (segment (start 153.67 87.63) (end 149.225 87.63) (width 0.635) (layer Cuivre) (net 21) (status C00)) + (segment (start 118.11 57.15) (end 124.46 57.15) (width 0.635) (layer Cuivre) (net 22) (status C02)) + (segment (start 124.46 57.15) (end 124.46 60.96) (width 0.635) (layer Cuivre) (net 22) (status 800)) + (segment (start 124.46 60.96) (end 125.73 62.23) (width 0.635) (layer Cuivre) (net 22) (status 400)) + (segment (start 141.605 73.66) (end 141.605 78.105) (width 0.635) (layer Cuivre) (net 23)) + (segment (start 141.605 78.105) (end 139.065 80.645) (width 0.635) (layer Cuivre) (net 23) (status 400)) + (segment (start 139.065 71.12) (end 141.605 73.66) (width 0.635) (layer Cuivre) (net 23) (status 800)) + (segment (start 144.78 71.12) (end 139.065 71.12) (width 0.635) (layer Cuivre) (net 23) (status C02)) + (segment (start 148.59 80.645) (end 149.225 81.28) (width 0.635) (layer Cuivre) (net 24)) + (segment (start 146.685 80.645) (end 148.59 80.645) (width 0.635) (layer Cuivre) (net 24) (status 800)) + (segment (start 149.225 81.28) (end 149.225 83.82) (width 0.635) (layer Cuivre) (net 24) (status 400)) + (segment (start 153.67 97.155) (end 153.67 97.79) (width 0.635) (layer Cuivre) (net 25) (status 800)) + (segment (start 153.67 97.79) (end 158.115 102.235) (width 0.635) (layer Cuivre) (net 25) (status 400)) + (segment (start 146.685 90.17) (end 144.78 88.265) (width 0.635) (layer Cuivre) (net 26)) + (segment (start 147.32 73.025) (end 144.78 75.565) (width 0.635) (layer Cuivre) (net 26)) + (segment (start 144.78 75.565) (end 144.78 88.265) (width 0.635) (layer Cuivre) (net 26)) + (segment (start 147.32 71.12) (end 147.32 73.025) (width 0.635) (layer Cuivre) (net 26)) + (segment (start 144.78 68.58) (end 147.32 71.12) (width 0.635) (layer Cuivre) (net 26) (status 800)) + (segment (start 149.225 90.17) (end 146.685 90.17) (width 0.635) (layer Cuivre) (net 26) (status 800)) + (segment (start 144.78 63.5) (end 145.415 63.5) (width 0.635) (layer Cuivre) (net 27) (status 800)) + (segment (start 152.4 68.58) (end 152.4 69.85) (width 0.635) (layer Composant) (net 27) (status 800)) + (segment (start 146.05 73.66) (end 147.955 71.755) (width 0.635) (layer Composant) (net 27)) + (segment (start 137.795 74.93) (end 137.795 76.2) (width 0.635) (layer Composant) (net 27)) + (segment (start 137.795 74.93) (end 139.065 73.66) (width 0.635) (layer Composant) (net 27)) + (segment (start 145.415 63.5) (end 147.32 65.405) (width 0.635) (layer Cuivre) (net 27)) + (segment (start 147.955 71.755) (end 150.495 71.755) (width 0.635) (layer Composant) (net 27)) + (segment (start 156.21 58.42) (end 156.21 61.595) (width 0.635) (layer Cuivre) (net 27) (status 800)) + (segment (start 152.4 65.405) (end 152.4 68.58) (width 0.635) (layer Cuivre) (net 27) (status 400)) + (segment (start 156.21 61.595) (end 152.4 65.405) (width 0.635) (layer Cuivre) (net 27)) + (segment (start 149.225 65.405) (end 152.4 68.58) (width 0.635) (layer Cuivre) (net 27) (status 400)) + (segment (start 147.32 65.405) (end 149.225 65.405) (width 0.635) (layer Cuivre) (net 27)) + (segment (start 139.065 73.66) (end 146.05 73.66) (width 0.635) (layer Composant) (net 27)) + (segment (start 137.795 76.2) (end 139.065 77.47) (width 0.635) (layer Composant) (net 27) (status 400)) + (segment (start 150.495 71.755) (end 152.4 69.85) (width 0.635) (layer Composant) (net 27)) + (segment (start 140.97 85.09) (end 139.7 83.82) (width 0.635) (layer Cuivre) (net 28)) + (segment (start 139.7 83.82) (end 139.065 83.82) (width 0.635) (layer Cuivre) (net 28) (status 400)) + (segment (start 140.97 96.52) (end 135.255 96.52) (width 0.635) (layer Cuivre) (net 28) (status 800)) + (segment (start 134.62 97.155) (end 134.62 102.235) (width 0.635) (layer Cuivre) (net 28) (status 400)) + (segment (start 135.255 96.52) (end 134.62 97.155) (width 0.635) (layer Cuivre) (net 28)) + (segment (start 140.97 85.09) (end 140.97 96.52) (width 0.635) (layer Cuivre) (net 28) (status 400)) + (segment (start 114.935 116.205) (end 120.015 116.205) (width 0.635) (layer Composant) (net 29)) + (segment (start 114.935 102.235) (end 113.03 104.14) (width 0.635) (layer Composant) (net 29)) + (segment (start 120.65 116.84) (end 120.65 119.38) (width 0.635) (layer Composant) (net 29) (status 400)) + (segment (start 114.935 102.235) (end 127 102.235) (width 0.635) (layer Composant) (net 29)) + (segment (start 127 102.235) (end 139.065 90.17) (width 0.635) (layer Composant) (net 29) (status 400)) + (segment (start 120.015 116.205) (end 120.65 116.84) (width 0.635) (layer Composant) (net 29)) + (segment (start 113.03 104.14) (end 113.03 114.3) (width 0.635) (layer Composant) (net 29)) + (segment (start 113.03 114.3) (end 114.935 116.205) (width 0.635) (layer Composant) (net 29)) + (segment (start 128.27 119.38) (end 128.27 120.65) (width 0.635) (layer Cuivre) (net 30) (status 800)) + (segment (start 129.54 121.92) (end 135.255 121.92) (width 0.635) (layer Cuivre) (net 30) (status 400)) + (segment (start 128.27 120.65) (end 129.54 121.92) (width 0.635) (layer Cuivre) (net 30)) + (segment (start 130.81 109.6264) (end 132.6896 107.7468) (width 0.635) (layer Cuivre) (net 31)) + (segment (start 130.81 111.76) (end 130.81 109.6264) (width 0.635) (layer Cuivre) (net 31) (status 800)) + (segment (start 140.335 109.6772) (end 140.335 111.76) (width 0.635) (layer Cuivre) (net 31) (status 400)) + (segment (start 138.4046 107.7468) (end 140.335 109.6772) (width 0.635) (layer Cuivre) (net 31)) + (segment (start 132.6896 107.7468) (end 138.4046 107.7468) (width 0.635) (layer Cuivre) (net 31)) + (segment (start 125.73 90.805) (end 127.635 90.805) (width 0.635) (layer Cuivre) (net 32) (status 400)) + (segment (start 124.46 86.36) (end 124.46 89.535) (width 0.635) (layer Cuivre) (net 32)) + (segment (start 118.11 78.74) (end 118.11 80.01) (width 0.635) (layer Cuivre) (net 32) (status 800)) + (segment (start 118.11 80.01) (end 124.46 86.36) (width 0.635) (layer Cuivre) (net 32)) + (segment (start 124.46 89.535) (end 125.73 90.805) (width 0.635) (layer Cuivre) (net 32)) + (segment (start 120.65 76.2) (end 120.65 79.375) (width 0.635) (layer Cuivre) (net 33)) + (segment (start 118.11 75.565) (end 120.015 75.565) (width 0.635) (layer Cuivre) (net 33) (status 800)) + (segment (start 120.015 75.565) (end 120.65 76.2) (width 0.635) (layer Cuivre) (net 33)) + (segment (start 127 85.725) (end 127.635 85.725) (width 0.635) (layer Cuivre) (net 33) (status 400)) + (segment (start 120.65 79.375) (end 127 85.725) (width 0.635) (layer Cuivre) (net 33)) + (segment (start 117.475 84.455) (end 117.475 88.265) (width 0.635) (layer Cuivre) (net 34) (status 400)) + (segment (start 113.665 60.96) (end 113.665 80.645) (width 0.635) (layer Cuivre) (net 34)) + (segment (start 112.395 59.69) (end 113.665 60.96) (width 0.635) (layer Cuivre) (net 34)) + (segment (start 110.49 59.69) (end 112.395 59.69) (width 0.635) (layer Cuivre) (net 34) (status 800)) + (segment (start 113.665 80.645) (end 117.475 84.455) (width 0.635) (layer Cuivre) (net 34)) - (zone (net 9) (net_name GND) (layer Cuivre) (tstamp 48F6319A) (hatch edge 0.508) + (zone (net 3) (net_name GND) (layer Cuivre) (tstamp 48F6319A) (hatch edge 0.508) (connect_pads (clearance 0.508)) (min_thickness 0.3) - (fill (arc_segments 32) (thermal_gap 0.508) (thermal_bridge_width 0.635)) + (fill yes (arc_segments 32) (thermal_gap 0.508) (thermal_bridge_width 0.635)) (polygon (pts (xy 223.52 138.43) (xy 232.41 128.905) (xy 232.41 53.975) (xy 219.71 41.91) (xy 81.28 41.91) @@ -2623,8 +2625,8 @@ (xy 174.452632 47.078367) (xy 174.449374 47.082334) (xy 174.406775 47.161779) (xy 174.363383 47.24071) (xy 174.361832 47.245599) (xy 174.359408 47.25012) (xy 174.333068 47.336273) (xy 174.305817 47.422182) (xy 174.305244 47.427282) (xy 174.303746 47.432185) (xy 174.294643 47.521799) (xy 174.284595 47.61138) (xy 174.284525 47.621407) (xy 174.284506 47.621595) (xy 174.284522 47.621769) - (xy 174.2845 47.625) (xy 174.2845 49.354497) (xy 173.79848 49.354573) (xy 173.671897 49.379637) (xy 173.552594 49.42881) - (xy 173.445113 49.50022) (xy 173.35355 49.591146) (xy 173.281392 49.698125) (xy 173.231387 49.817083) (xy 173.229864 49.8245) + (xy 174.2845 47.625) (xy 174.2845 49.3546) (xy 173.798193 49.3546) (xy 173.671069 49.379887) (xy 173.55132 49.429488) + (xy 173.44355 49.501498) (xy 173.351898 49.593149) (xy 173.279888 49.70092) (xy 173.230287 49.820668) (xy 173.229524 49.8245) (xy 156.845 49.8245) (xy 156.755311 49.833293) (xy 156.665555 49.841147) (xy 156.660632 49.842577) (xy 156.655524 49.843078) (xy 156.569232 49.86913) (xy 156.48273 49.894262) (xy 156.478176 49.896622) (xy 156.473266 49.898105) (xy 156.393692 49.940414) (xy 156.313705 49.981877) (xy 156.309697 49.985075) (xy 156.305167 49.987485) (xy 156.235327 50.044444) (xy 156.164915 50.100654) @@ -2632,14 +2634,14 @@ (xy 151.652995 54.62488) (xy 151.595102 54.693875) (xy 151.592632 54.698367) (xy 151.589374 54.702334) (xy 151.546775 54.781779) (xy 151.503383 54.86071) (xy 151.501832 54.865599) (xy 151.499408 54.87012) (xy 151.473068 54.956273) (xy 151.445817 55.042182) (xy 151.445244 55.047282) (xy 151.443746 55.052185) (xy 151.434643 55.141799) (xy 151.424595 55.23138) (xy 151.424525 55.241407) - (xy 151.424506 55.241595) (xy 151.424522 55.241769) (xy 151.4245 55.245) (xy 151.4245 57.387716) (xy 151.306954 57.502826) - (xy 151.149624 57.7326) (xy 151.039921 57.988557) (xy 150.982022 58.260948) (xy 150.978134 58.539397) (xy 151.028405 58.813299) - (xy 151.130918 59.072219) (xy 151.281771 59.306297) (xy 151.475217 59.506616) (xy 151.703888 59.665546) (xy 151.959073 59.777034) - (xy 152.231053 59.836833) (xy 152.509468 59.842665) (xy 152.783714 59.794308) (xy 153.043344 59.693604) (xy 153.278469 59.544389) - (xy 153.480134 59.352346) (xy 153.640656 59.124791) (xy 153.753923 58.87039) (xy 153.815619 58.598834) (xy 153.82006 58.280762) - (xy 153.76597 58.007589) (xy 153.659851 57.750125) (xy 153.505745 57.518176) (xy 153.3755 57.387018) (xy 153.3755 55.649065) - (xy 157.249065 51.7755) (xy 173.229442 51.7755) (xy 173.230037 51.778503) (xy 173.27921 51.897806) (xy 173.35062 52.005287) - (xy 173.441546 52.09685) (xy 173.548525 52.169008) (xy 173.667483 52.219013) (xy 173.724553 52.230728) (xy 173.621979 52.314386) + (xy 151.424506 55.241595) (xy 151.424522 55.241769) (xy 151.4245 55.245) (xy 151.4245 57.387714) (xy 151.306953 57.502825) + (xy 151.149623 57.7326) (xy 151.03992 57.988557) (xy 150.982021 58.260948) (xy 150.978133 58.539397) (xy 151.028404 58.813299) + (xy 151.130918 59.07222) (xy 151.281771 59.306298) (xy 151.475217 59.506617) (xy 151.703887 59.665547) (xy 151.959073 59.777035) + (xy 152.231053 59.836834) (xy 152.509468 59.842666) (xy 152.783714 59.794309) (xy 153.043344 59.693605) (xy 153.27847 59.54439) + (xy 153.480134 59.352347) (xy 153.640657 59.124791) (xy 153.753924 58.87039) (xy 153.81562 58.598834) (xy 153.820061 58.280762) + (xy 153.765971 58.007589) (xy 153.659852 57.750125) (xy 153.505746 57.518176) (xy 153.3755 57.387017) (xy 153.3755 55.649065) + (xy 157.249065 51.7755) (xy 173.229524 51.7755) (xy 173.230287 51.779331) (xy 173.279888 51.89908) (xy 173.351898 52.00685) + (xy 173.443549 52.098502) (xy 173.55132 52.170512) (xy 173.671068 52.220113) (xy 173.72453 52.230747) (xy 173.621979 52.314386) (xy 173.442166 52.531743) (xy 173.307996 52.779885) (xy 173.224579 53.049362) (xy 173.195092 53.329909) (xy 173.220659 53.610841) (xy 173.300305 53.881456) (xy 173.430998 54.131448) (xy 173.607758 54.351293) (xy 173.823854 54.532619) (xy 173.964748 54.610076) (xy 173.840585 54.676096) (xy 173.621979 54.854386) (xy 173.442166 55.071743) (xy 173.307996 55.319885) (xy 173.224579 55.589362) @@ -2653,11 +2655,11 @@ (xy 173.224579 63.209362) (xy 173.195092 63.489909) (xy 173.220659 63.770841) (xy 173.300305 64.041456) (xy 173.430998 64.291448) (xy 173.607758 64.511293) (xy 173.823854 64.692619) (xy 173.964748 64.770076) (xy 173.840585 64.836096) (xy 173.621979 65.014386) (xy 173.442166 65.231743) (xy 173.307996 65.479885) (xy 173.224579 65.749362) (xy 173.195092 66.029909) (xy 173.220659 66.310841) - (xy 173.300305 66.581456) (xy 173.430998 66.831448) (xy 173.607758 67.051293) (xy 173.823854 67.232619) (xy 173.953302 67.303783) - (xy 173.94474 67.307491) (xy 173.711014 67.468789) (xy 173.513069 67.672413) (xy 173.358445 67.910607) (xy 173.258617 68.189975) - (xy 173.380499 68.4125) (xy 174.9425 68.4125) (xy 175.0925 68.4125) (xy 175.4275 68.4125) (xy 175.5775 68.4125) - (xy 177.139501 68.4125) (xy 177.261383 68.189975) (xy 177.161555 67.910607) (xy 177.006931 67.672413) (xy 176.808986 67.468789) - (xy 176.57526 67.307491) (xy 176.566752 67.303807) (xy 176.679415 67.243904) (xy 176.898021 67.065614) (xy 177.077834 66.848257) + (xy 173.300305 66.581456) (xy 173.430998 66.831448) (xy 173.607758 67.051293) (xy 173.823854 67.232619) (xy 173.953561 67.303926) + (xy 173.94252 67.308724) (xy 173.708108 67.471252) (xy 173.509908 67.676388) (xy 173.355536 67.91625) (xy 173.258616 68.189975) + (xy 173.380499 68.4125) (xy 175.0925 68.4125) (xy 175.0925 68.3925) (xy 175.4275 68.3925) (xy 175.4275 68.4125) + (xy 177.139501 68.4125) (xy 177.261384 68.189975) (xy 177.164464 67.91625) (xy 177.010092 67.676388) (xy 176.811892 67.471252) + (xy 176.57748 67.308724) (xy 176.566488 67.303948) (xy 176.679415 67.243904) (xy 176.898021 67.065614) (xy 177.077834 66.848257) (xy 177.212004 66.600115) (xy 177.295421 66.330638) (xy 177.324908 66.050091) (xy 177.299341 65.769159) (xy 177.219695 65.498544) (xy 177.089002 65.248552) (xy 176.912242 65.028707) (xy 176.696146 64.847381) (xy 176.555251 64.769923) (xy 176.679415 64.703904) (xy 176.898021 64.525614) (xy 177.077834 64.308257) (xy 177.212004 64.060115) (xy 177.295421 63.790638) (xy 177.324908 63.510091) @@ -2671,13 +2673,13 @@ (xy 177.324908 55.890091) (xy 177.299341 55.609159) (xy 177.219695 55.338544) (xy 177.089002 55.088552) (xy 176.912242 54.868707) (xy 176.696146 54.687381) (xy 176.555251 54.609923) (xy 176.679415 54.543904) (xy 176.898021 54.365614) (xy 177.077834 54.148257) (xy 177.212004 53.900115) (xy 177.295421 53.630638) (xy 177.324908 53.350091) (xy 177.299341 53.069159) (xy 177.219695 52.798544) - (xy 177.089002 52.548552) (xy 176.912242 52.328707) (xy 176.795528 52.230772) (xy 176.848103 52.220363) (xy 176.967406 52.17119) - (xy 177.074887 52.09978) (xy 177.16645 52.008854) (xy 177.238608 51.901875) (xy 177.288613 51.782917) (xy 177.314561 51.656513) - (xy 177.315461 51.527475) (xy 177.315027 49.94808) (xy 177.289963 49.821497) (xy 177.24079 49.702194) (xy 177.16938 49.594713) - (xy 177.078454 49.50315) (xy 176.971475 49.430992) (xy 176.852517 49.380987) (xy 176.726113 49.355039) (xy 176.597075 49.354139) - (xy 176.2355 49.354195) (xy 176.2355 48.029066) (xy 176.934066 47.3305) (xy 206.6695 47.3305) (xy 206.6695 49.354497) - (xy 206.18348 49.354573) (xy 206.056897 49.379637) (xy 205.937594 49.42881) (xy 205.830113 49.50022) (xy 205.73855 49.591146) - (xy 205.666392 49.698125) (xy 205.616387 49.817083) (xy 205.590439 49.943487) (xy 205.589539 50.072525) (xy 205.589819 51.0945) + (xy 177.089002 52.548552) (xy 176.912242 52.328707) (xy 176.795492 52.230742) (xy 176.848931 52.220113) (xy 176.96868 52.170512) + (xy 177.07645 52.098502) (xy 177.168102 52.006851) (xy 177.240112 51.89908) (xy 177.289713 51.779332) (xy 177.315 51.652208) + (xy 177.315 51.522593) (xy 177.315 49.947793) (xy 177.289713 49.820669) (xy 177.240112 49.70092) (xy 177.168102 49.59315) + (xy 177.076451 49.501498) (xy 176.96868 49.429488) (xy 176.848932 49.379887) (xy 176.721808 49.3546) (xy 176.592193 49.3546) + (xy 176.2355 49.3546) (xy 176.2355 48.029066) (xy 176.934066 47.3305) (xy 206.6695 47.3305) (xy 206.6695 49.3546) + (xy 206.183193 49.3546) (xy 206.056069 49.379887) (xy 205.93632 49.429488) (xy 205.82855 49.501498) (xy 205.736898 49.593149) + (xy 205.664888 49.70092) (xy 205.615287 49.820668) (xy 205.59 49.947792) (xy 205.59 50.077407) (xy 205.59 51.0945) (xy 201.147076 51.0945) (xy 200.975194 50.921413) (xy 200.734003 50.758727) (xy 200.465805 50.645988) (xy 200.180818 50.587488) (xy 199.920234 50.585668) (xy 199.444783 50.110217) (xy 199.375119 50.052995) (xy 199.306125 49.995102) (xy 199.301632 49.992632) (xy 199.297666 49.989374) (xy 199.21822 49.946775) (xy 199.13929 49.903383) (xy 199.1344 49.901832) (xy 199.12988 49.899408) @@ -2704,63 +2706,63 @@ (xy 188.670998 66.831448) (xy 188.847758 67.051293) (xy 189.063854 67.232619) (xy 189.204748 67.310076) (xy 189.080585 67.376096) (xy 188.861979 67.554386) (xy 188.682166 67.771743) (xy 188.547996 68.019885) (xy 188.464579 68.289362) (xy 188.435092 68.569909) (xy 188.460659 68.850841) (xy 188.540305 69.121456) (xy 188.670998 69.371448) (xy 188.847758 69.591293) (xy 189.063854 69.772619) - (xy 189.204748 69.850076) (xy 189.080585 69.916096) (xy 189.034109 69.954) (xy 185.42 69.954) (xy 185.312717 69.964519) - (xy 185.205513 69.973898) (xy 185.199629 69.975607) (xy 185.193523 69.976206) (xy 185.090355 70.007354) (xy 184.986984 70.037386) - (xy 184.981542 70.040206) (xy 184.975672 70.041979) (xy 184.880546 70.092558) (xy 184.78495 70.142111) (xy 184.78016 70.145934) - (xy 184.774745 70.148814) (xy 184.691281 70.216885) (xy 184.607105 70.284083) (xy 184.598567 70.292502) (xy 184.598397 70.292641) - (xy 184.598266 70.292798) (xy 184.595513 70.295514) (xy 179.857026 75.034) (xy 176.727869 75.034) (xy 176.696146 75.007381) + (xy 189.204748 69.850076) (xy 189.080585 69.916096) (xy 189.034109 69.954) (xy 185.42 69.954) (xy 185.312811 69.964509) + (xy 185.205513 69.973897) (xy 185.199624 69.975607) (xy 185.193523 69.976206) (xy 185.090383 70.007345) (xy 184.986985 70.037386) + (xy 184.981544 70.040205) (xy 184.975672 70.041979) (xy 184.880546 70.092558) (xy 184.784951 70.14211) (xy 184.780159 70.145935) + (xy 184.774745 70.148814) (xy 184.691292 70.216876) (xy 184.607106 70.284082) (xy 184.598567 70.292502) (xy 184.598397 70.292641) + (xy 184.598266 70.292798) (xy 184.595514 70.295513) (xy 179.857026 75.034) (xy 176.727869 75.034) (xy 176.696146 75.007381) (xy 176.555251 74.929923) (xy 176.679415 74.863904) (xy 176.898021 74.685614) (xy 177.077834 74.468257) (xy 177.212004 74.220115) (xy 177.295421 73.950638) (xy 177.324908 73.670091) (xy 177.299341 73.389159) (xy 177.219695 73.118544) (xy 177.089002 72.868552) (xy 176.912242 72.648707) (xy 176.696146 72.467381) (xy 176.555251 72.389923) (xy 176.679415 72.323904) (xy 176.898021 72.145614) (xy 177.077834 71.928257) (xy 177.212004 71.680115) (xy 177.295421 71.410638) (xy 177.324908 71.130091) (xy 177.299341 70.849159) - (xy 177.219695 70.578544) (xy 177.089002 70.328552) (xy 176.912242 70.108707) (xy 176.696146 69.927381) (xy 176.566697 69.856216) - (xy 176.57526 69.852509) (xy 176.808986 69.691211) (xy 177.006931 69.487587) (xy 177.161555 69.249393) (xy 177.261383 68.970025) - (xy 177.139501 68.7475) (xy 175.5775 68.7475) (xy 175.4275 68.7475) (xy 175.0925 68.7475) (xy 174.9425 68.7475) - (xy 173.380499 68.7475) (xy 173.258617 68.970025) (xy 173.358445 69.249393) (xy 173.513069 69.487587) (xy 173.711014 69.691211) - (xy 173.94474 69.852509) (xy 173.953247 69.856192) (xy 173.840585 69.916096) (xy 173.621979 70.094386) (xy 173.442166 70.311743) + (xy 177.219695 70.578544) (xy 177.089002 70.328552) (xy 176.912242 70.108707) (xy 176.696146 69.927381) (xy 176.566438 69.856073) + (xy 176.57748 69.851276) (xy 176.811892 69.688748) (xy 177.010092 69.483612) (xy 177.164464 69.24375) (xy 177.261384 68.970025) + (xy 177.139501 68.7475) (xy 175.4275 68.7475) (xy 175.4275 68.7675) (xy 175.0925 68.7675) (xy 175.0925 68.7475) + (xy 173.380499 68.7475) (xy 173.258616 68.970025) (xy 173.355536 69.24375) (xy 173.509908 69.483612) (xy 173.708108 69.688748) + (xy 173.94252 69.851276) (xy 173.953511 69.856051) (xy 173.840585 69.916096) (xy 173.621979 70.094386) (xy 173.442166 70.311743) (xy 173.307996 70.559885) (xy 173.224579 70.829362) (xy 173.195092 71.109909) (xy 173.220659 71.390841) (xy 173.300305 71.661456) (xy 173.430998 71.911448) (xy 173.607758 72.131293) (xy 173.823854 72.312619) (xy 173.964748 72.390076) (xy 173.840585 72.456096) (xy 173.621979 72.634386) (xy 173.442166 72.851743) (xy 173.307996 73.099885) (xy 173.224579 73.369362) (xy 173.195092 73.649909) (xy 173.220659 73.930841) (xy 173.300305 74.201456) (xy 173.430998 74.451448) (xy 173.607758 74.671293) (xy 173.823854 74.852619) (xy 173.964748 74.930076) (xy 173.840585 74.996096) (xy 173.621979 75.174386) (xy 173.442166 75.391743) (xy 173.307996 75.639885) (xy 173.224579 75.909362) (xy 173.195092 76.189909) (xy 173.220659 76.470841) (xy 173.300305 76.741456) (xy 173.430998 76.991448) - (xy 173.607758 77.211293) (xy 173.823854 77.392619) (xy 173.953302 77.463783) (xy 173.94474 77.467491) (xy 173.711014 77.628789) - (xy 173.513069 77.832413) (xy 173.358445 78.070607) (xy 173.258617 78.349975) (xy 173.380499 78.5725) (xy 174.9425 78.5725) - (xy 175.0925 78.5725) (xy 175.4275 78.5725) (xy 175.5775 78.5725) (xy 177.139501 78.5725) (xy 177.261383 78.349975) - (xy 177.161555 78.070607) (xy 177.006931 77.832413) (xy 176.808986 77.628789) (xy 176.57526 77.467491) (xy 176.566752 77.463807) + (xy 173.607758 77.211293) (xy 173.823854 77.392619) (xy 173.953561 77.463926) (xy 173.94252 77.468724) (xy 173.708108 77.631252) + (xy 173.509908 77.836388) (xy 173.355536 78.07625) (xy 173.258616 78.349975) (xy 173.380499 78.5725) (xy 175.0925 78.5725) + (xy 175.0925 78.5525) (xy 175.4275 78.5525) (xy 175.4275 78.5725) (xy 177.139501 78.5725) (xy 177.261384 78.349975) + (xy 177.164464 78.07625) (xy 177.010092 77.836388) (xy 176.811892 77.631252) (xy 176.57748 77.468724) (xy 176.566488 77.463948) (xy 176.679415 77.403904) (xy 176.72589 77.366) (xy 180.34 77.366) (xy 180.447188 77.35549) (xy 180.554487 77.346103) (xy 180.560375 77.344392) (xy 180.566477 77.343794) (xy 180.669616 77.312654) (xy 180.773015 77.282614) (xy 180.778455 77.279794) (xy 180.784328 77.278021) (xy 180.879453 77.227441) (xy 180.975049 77.17789) (xy 180.97984 77.174064) (xy 180.985255 77.171186) (xy 181.068707 77.103123) (xy 181.152894 77.035918) (xy 181.161436 77.027494) (xy 181.161603 77.027359) (xy 181.16173 77.027205) - (xy 181.164487 77.024487) (xy 185.902973 72.286) (xy 189.03213 72.286) (xy 189.063854 72.312619) (xy 189.193302 72.383783) - (xy 189.18474 72.387491) (xy 188.951014 72.548789) (xy 188.753069 72.752413) (xy 188.598445 72.990607) (xy 188.498617 73.269975) - (xy 188.620499 73.4925) (xy 190.1825 73.4925) (xy 190.3325 73.4925) (xy 190.6675 73.4925) (xy 190.8175 73.4925) - (xy 192.379501 73.4925) (xy 192.501383 73.269975) (xy 192.401555 72.990607) (xy 192.246931 72.752413) (xy 192.048986 72.548789) - (xy 191.81526 72.387491) (xy 191.806752 72.383807) (xy 191.919415 72.323904) (xy 191.96589 72.286) (xy 198.055704 72.286) - (xy 198.090017 72.309848) (xy 198.275501 72.390884) (xy 198.134939 72.446136) (xy 198.095395 72.467162) (xy 198.034245 72.702365) - (xy 198.755 73.423119) (xy 199.475755 72.702365) (xy 199.414605 72.467162) (xy 199.234011 72.389232) (xy 199.369574 72.336651) - (xy 199.594185 72.194108) (xy 199.786832 72.010653) (xy 199.940176 71.793274) (xy 200.048378 71.55025) (xy 200.107315 71.290837) - (xy 200.111558 70.986988) (xy 200.059887 70.726031) (xy 199.958513 70.480081) (xy 199.921 70.423619) (xy 199.921 68.427973) + (xy 181.164487 77.024487) (xy 185.902973 72.286) (xy 189.03213 72.286) (xy 189.063854 72.312619) (xy 189.193561 72.383926) + (xy 189.18252 72.388724) (xy 188.948108 72.551252) (xy 188.749908 72.756388) (xy 188.595536 72.99625) (xy 188.498616 73.269975) + (xy 188.620499 73.4925) (xy 190.3325 73.4925) (xy 190.3325 73.4725) (xy 190.6675 73.4725) (xy 190.6675 73.4925) + (xy 192.379501 73.4925) (xy 192.501384 73.269975) (xy 192.404464 72.99625) (xy 192.250092 72.756388) (xy 192.051892 72.551252) + (xy 191.81748 72.388724) (xy 191.806488 72.383948) (xy 191.919415 72.323904) (xy 191.96589 72.286) (xy 198.055701 72.286) + (xy 198.090016 72.309849) (xy 198.275469 72.390871) (xy 198.129649 72.448852) (xy 198.095394 72.467162) (xy 198.034245 72.702364) + (xy 198.755 73.423119) (xy 199.475755 72.702364) (xy 199.414606 72.467162) (xy 199.2339 72.389276) (xy 199.369575 72.336652) + (xy 199.594186 72.194109) (xy 199.786833 72.010654) (xy 199.940177 71.793274) (xy 200.048379 71.55025) (xy 200.107316 71.290837) + (xy 200.111559 70.986988) (xy 200.059888 70.726031) (xy 199.958514 70.48008) (xy 199.921 70.423616) (xy 199.921 68.427973) (xy 202.412973 65.936) (xy 205.589962 65.936) (xy 205.580092 66.029909) (xy 205.605659 66.310841) (xy 205.685305 66.581456) - (xy 205.815998 66.831448) (xy 205.992758 67.051293) (xy 206.208854 67.232619) (xy 206.338302 67.303783) (xy 206.32974 67.307491) - (xy 206.096014 67.468789) (xy 205.898069 67.672413) (xy 205.743445 67.910607) (xy 205.643617 68.189975) (xy 205.765499 68.4125) - (xy 207.3275 68.4125) (xy 207.4775 68.4125) (xy 207.8125 68.4125) (xy 207.9625 68.4125) (xy 209.524501 68.4125) - (xy 209.646383 68.189975) (xy 209.546555 67.910607) (xy 209.391931 67.672413) (xy 209.193986 67.468789) (xy 208.96026 67.307491) - (xy 208.951752 67.303807) (xy 209.064415 67.243904) (xy 209.283021 67.065614) (xy 209.462834 66.848257) (xy 209.597004 66.600115) + (xy 205.815998 66.831448) (xy 205.992758 67.051293) (xy 206.208854 67.232619) (xy 206.338561 67.303926) (xy 206.32752 67.308724) + (xy 206.093108 67.471252) (xy 205.894908 67.676388) (xy 205.740536 67.91625) (xy 205.643616 68.189975) (xy 205.765499 68.4125) + (xy 207.4775 68.4125) (xy 207.4775 68.3925) (xy 207.8125 68.3925) (xy 207.8125 68.4125) (xy 209.524501 68.4125) + (xy 209.646384 68.189975) (xy 209.549464 67.91625) (xy 209.395092 67.676388) (xy 209.196892 67.471252) (xy 208.96248 67.308724) + (xy 208.951488 67.303948) (xy 209.064415 67.243904) (xy 209.283021 67.065614) (xy 209.462834 66.848257) (xy 209.597004 66.600115) (xy 209.680421 66.330638) (xy 209.709908 66.050091) (xy 209.689115 65.821619) (xy 209.725664 65.841712) (xy 209.942575 65.91052) (xy 210.16872 65.935886) (xy 210.185 65.936) (xy 210.337026 65.936) (xy 211.559 67.157973) (xy 211.559 70.485) (xy 211.569509 70.592188) (xy 211.578897 70.699487) (xy 211.580607 70.705375) (xy 211.581206 70.711477) (xy 211.612345 70.814616) (xy 211.642386 70.918015) (xy 211.645205 70.923455) (xy 211.646979 70.929328) (xy 211.697558 71.024453) (xy 211.74711 71.120049) (xy 211.750935 71.12484) (xy 211.753814 71.130255) (xy 211.821876 71.213707) (xy 211.889082 71.297894) (xy 211.897505 71.306436) - (xy 211.897641 71.306603) (xy 211.897794 71.30673) (xy 211.900513 71.309487) (xy 212.535513 71.944486) (xy 212.618756 72.012863) - (xy 212.701248 72.082082) (xy 212.70662 72.085035) (xy 212.711358 72.088927) (xy 212.806282 72.139825) (xy 212.900664 72.191712) - (xy 212.906507 72.193565) (xy 212.911911 72.196463) (xy 213.014902 72.22795) (xy 213.117575 72.26052) (xy 213.123669 72.261203) - (xy 213.129532 72.262996) (xy 213.236659 72.273877) (xy 213.34372 72.285886) (xy 213.355712 72.285969) (xy 213.355929 72.285992) - (xy 213.35613 72.285972) (xy 213.36 72.286) (xy 213.79713 72.286) (xy 213.828854 72.312619) (xy 213.958302 72.383783) - (xy 213.94974 72.387491) (xy 213.716014 72.548789) (xy 213.518069 72.752413) (xy 213.363445 72.990607) (xy 213.263617 73.269975) - (xy 213.385499 73.4925) (xy 214.9475 73.4925) (xy 215.0975 73.4925) (xy 215.4325 73.4925) (xy 215.5825 73.4925) - (xy 217.144501 73.4925) (xy 217.266383 73.269975) (xy 217.166555 72.990607) (xy 217.011931 72.752413) (xy 216.813986 72.548789) - (xy 216.58026 72.387491) (xy 216.571752 72.383807) (xy 216.684415 72.323904) (xy 216.73089 72.286) (xy 219.179 72.286) + (xy 211.897641 71.306603) (xy 211.897794 71.30673) (xy 211.900513 71.309487) (xy 212.535514 71.944487) (xy 212.618766 72.012871) + (xy 212.701248 72.082082) (xy 212.706619 72.085035) (xy 212.711359 72.088928) (xy 212.806316 72.139844) (xy 212.900664 72.191712) + (xy 212.906505 72.193564) (xy 212.911912 72.196464) (xy 213.014975 72.227973) (xy 213.117575 72.26052) (xy 213.123664 72.261202) + (xy 213.129532 72.262997) (xy 213.236704 72.273882) (xy 213.34372 72.285886) (xy 213.355713 72.285969) (xy 213.35593 72.285992) + (xy 213.356131 72.285972) (xy 213.36 72.286) (xy 213.79713 72.286) (xy 213.828854 72.312619) (xy 213.958561 72.383926) + (xy 213.94752 72.388724) (xy 213.713108 72.551252) (xy 213.514908 72.756388) (xy 213.360536 72.99625) (xy 213.263616 73.269975) + (xy 213.385499 73.4925) (xy 215.0975 73.4925) (xy 215.0975 73.4725) (xy 215.4325 73.4725) (xy 215.4325 73.4925) + (xy 217.144501 73.4925) (xy 217.266384 73.269975) (xy 217.169464 72.99625) (xy 217.015092 72.756388) (xy 216.816892 72.551252) + (xy 216.58248 72.388724) (xy 216.571488 72.383948) (xy 216.684415 72.323904) (xy 216.73089 72.286) (xy 219.179 72.286) (xy 219.179 100.482026) (xy 218.592026 101.069) (xy 217.329908 101.069) (xy 217.329908 83.830091) (xy 217.304341 83.549159) (xy 217.224695 83.278544) (xy 217.094002 83.028552) (xy 216.917242 82.808707) (xy 216.701146 82.627381) (xy 216.560251 82.549923) (xy 216.684415 82.483904) (xy 216.903021 82.305614) (xy 217.082834 82.088257) (xy 217.217004 81.840115) (xy 217.300421 81.570638) @@ -2770,10 +2772,10 @@ (xy 217.094002 77.948552) (xy 216.917242 77.728707) (xy 216.701146 77.547381) (xy 216.560251 77.469923) (xy 216.684415 77.403904) (xy 216.903021 77.225614) (xy 217.082834 77.008257) (xy 217.217004 76.760115) (xy 217.300421 76.490638) (xy 217.329908 76.210091) (xy 217.304341 75.929159) (xy 217.224695 75.658544) (xy 217.094002 75.408552) (xy 216.917242 75.188707) (xy 216.701146 75.007381) - (xy 216.571697 74.936216) (xy 216.58026 74.932509) (xy 216.813986 74.771211) (xy 217.011931 74.567587) (xy 217.166555 74.329393) - (xy 217.266383 74.050025) (xy 217.144501 73.8275) (xy 215.5825 73.8275) (xy 215.4325 73.8275) (xy 215.0975 73.8275) - (xy 214.9475 73.8275) (xy 213.385499 73.8275) (xy 213.263617 74.050025) (xy 213.363445 74.329393) (xy 213.518069 74.567587) - (xy 213.716014 74.771211) (xy 213.94974 74.932509) (xy 213.958247 74.936192) (xy 213.845585 74.996096) (xy 213.626979 75.174386) + (xy 216.571438 74.936073) (xy 216.58248 74.931276) (xy 216.816892 74.768748) (xy 217.015092 74.563612) (xy 217.169464 74.32375) + (xy 217.266384 74.050025) (xy 217.144501 73.8275) (xy 215.4325 73.8275) (xy 215.4325 73.8475) (xy 215.0975 73.8475) + (xy 215.0975 73.8275) (xy 213.385499 73.8275) (xy 213.263616 74.050025) (xy 213.360536 74.32375) (xy 213.514908 74.563612) + (xy 213.713108 74.768748) (xy 213.94752 74.931276) (xy 213.958511 74.936051) (xy 213.845585 74.996096) (xy 213.626979 75.174386) (xy 213.447166 75.391743) (xy 213.312996 75.639885) (xy 213.229579 75.909362) (xy 213.200092 76.189909) (xy 213.225659 76.470841) (xy 213.305305 76.741456) (xy 213.435998 76.991448) (xy 213.612758 77.211293) (xy 213.828854 77.392619) (xy 213.969748 77.470076) (xy 213.845585 77.536096) (xy 213.626979 77.714386) (xy 213.447166 77.931743) (xy 213.312996 78.179885) (xy 213.229579 78.449362) @@ -2799,10 +2801,10 @@ (xy 209.604695 73.118544) (xy 209.474002 72.868552) (xy 209.297242 72.648707) (xy 209.081146 72.467381) (xy 208.940251 72.389923) (xy 209.064415 72.323904) (xy 209.283021 72.145614) (xy 209.462834 71.928257) (xy 209.597004 71.680115) (xy 209.680421 71.410638) (xy 209.709908 71.130091) (xy 209.684341 70.849159) (xy 209.604695 70.578544) (xy 209.474002 70.328552) (xy 209.297242 70.108707) - (xy 209.081146 69.927381) (xy 208.951697 69.856216) (xy 208.96026 69.852509) (xy 209.193986 69.691211) (xy 209.391931 69.487587) - (xy 209.546555 69.249393) (xy 209.646383 68.970025) (xy 209.524501 68.7475) (xy 207.9625 68.7475) (xy 207.8125 68.7475) - (xy 207.4775 68.7475) (xy 207.3275 68.7475) (xy 205.765499 68.7475) (xy 205.643617 68.970025) (xy 205.743445 69.249393) - (xy 205.898069 69.487587) (xy 206.096014 69.691211) (xy 206.32974 69.852509) (xy 206.338247 69.856192) (xy 206.225585 69.916096) + (xy 209.081146 69.927381) (xy 208.951438 69.856073) (xy 208.96248 69.851276) (xy 209.196892 69.688748) (xy 209.395092 69.483612) + (xy 209.549464 69.24375) (xy 209.646384 68.970025) (xy 209.524501 68.7475) (xy 207.8125 68.7475) (xy 207.8125 68.7675) + (xy 207.4775 68.7675) (xy 207.4775 68.7475) (xy 205.765499 68.7475) (xy 205.643616 68.970025) (xy 205.740536 69.24375) + (xy 205.894908 69.483612) (xy 206.093108 69.688748) (xy 206.32752 69.851276) (xy 206.338511 69.856051) (xy 206.225585 69.916096) (xy 206.006979 70.094386) (xy 205.827166 70.311743) (xy 205.692996 70.559885) (xy 205.609579 70.829362) (xy 205.580092 71.109909) (xy 205.605659 71.390841) (xy 205.685305 71.661456) (xy 205.815998 71.911448) (xy 205.992758 72.131293) (xy 206.208854 72.312619) (xy 206.349748 72.390076) (xy 206.225585 72.456096) (xy 206.006979 72.634386) (xy 205.827166 72.851743) (xy 205.692996 73.099885) @@ -2827,207 +2829,215 @@ (xy 202.237918 104.751248) (xy 202.234964 104.756619) (xy 202.231072 104.761359) (xy 202.180164 104.8563) (xy 202.128288 104.950664) (xy 202.126434 104.956507) (xy 202.123537 104.961911) (xy 202.092049 105.064902) (xy 202.05948 105.167575) (xy 202.058796 105.173669) (xy 202.057004 105.179532) (xy 202.046123 105.286654) (xy 202.034114 105.39372) (xy 202.03403 105.405713) (xy 202.034008 105.40593) - (xy 202.034027 105.406131) (xy 202.034 105.41) (xy 202.034 111.229) (xy 201.357254 111.229) (xy 201.308306 111.195984) - (xy 201.063069 111.092895) (xy 200.802479 111.039404) (xy 200.536462 111.037547) (xy 200.275151 111.087395) (xy 200.11356 111.152681) - (xy 200.11356 76.089293) (xy 200.11356 73.549293) (xy 200.066183 73.287522) (xy 199.968864 73.039939) (xy 199.947838 73.000395) - (xy 199.712635 72.939245) (xy 198.991881 73.66) (xy 199.712635 74.380755) (xy 199.947838 74.319605) (xy 200.053238 74.075353) - (xy 200.109189 73.81528) (xy 200.11356 73.549293) (xy 200.11356 76.089293) (xy 200.066183 75.827522) (xy 199.968864 75.579939) - (xy 199.947838 75.540395) (xy 199.712635 75.479245) (xy 199.475755 75.716125) (xy 199.475755 75.242365) (xy 199.414605 75.007162) - (xy 199.234102 74.929271) (xy 199.375061 74.873864) (xy 199.414605 74.852838) (xy 199.475755 74.617635) (xy 198.755 73.896881) - (xy 198.518119 74.133761) (xy 198.518119 73.66) (xy 197.797365 72.939245) (xy 197.562162 73.000395) (xy 197.456762 73.244647) - (xy 197.400811 73.50472) (xy 197.39644 73.770707) (xy 197.443817 74.032478) (xy 197.541136 74.280061) (xy 197.562162 74.319605) - (xy 197.797365 74.380755) (xy 198.518119 73.66) (xy 198.518119 74.133761) (xy 198.034245 74.617635) (xy 198.095395 74.852838) - (xy 198.275897 74.930728) (xy 198.134939 74.986136) (xy 198.095395 75.007162) (xy 198.034245 75.242365) (xy 198.755 75.963119) - (xy 199.475755 75.242365) (xy 199.475755 75.716125) (xy 198.991881 76.2) (xy 199.712635 76.920755) (xy 199.947838 76.859605) - (xy 200.053238 76.615353) (xy 200.109189 76.35528) (xy 200.11356 76.089293) (xy 200.11356 111.152681) (xy 200.028498 111.187049) - (xy 199.8059 111.332713) (xy 199.615833 111.51884) (xy 199.475755 111.723418) (xy 199.475755 77.157635) (xy 198.755 76.436881) - (xy 198.518119 76.673761) (xy 198.518119 76.2) (xy 197.797365 75.479245) (xy 197.562162 75.540395) (xy 197.456762 75.784647) - (xy 197.400811 76.04472) (xy 197.39644 76.310707) (xy 197.443817 76.572478) (xy 197.541136 76.820061) (xy 197.562162 76.859605) - (xy 197.797365 76.920755) (xy 198.518119 76.2) (xy 198.518119 76.673761) (xy 198.034245 77.157635) (xy 198.095395 77.392838) - (xy 198.339647 77.498238) (xy 198.59972 77.554189) (xy 198.865707 77.55856) (xy 199.127478 77.511183) (xy 199.375061 77.413864) - (xy 199.414605 77.392838) (xy 199.475755 77.157635) (xy 199.475755 111.723418) (xy 199.465539 111.738339) (xy 199.360741 111.982851) - (xy 199.305432 112.243061) (xy 199.301717 112.509058) (xy 199.34974 112.770711) (xy 199.447669 113.018053) (xy 199.591776 113.241664) - (xy 199.776572 113.433025) (xy 199.995017 113.584848) (xy 200.180501 113.665884) (xy 200.039939 113.721136) (xy 200.000395 113.742162) - (xy 199.939245 113.977365) (xy 200.66 114.698119) (xy 201.380755 113.977365) (xy 201.319605 113.742162) (xy 201.139011 113.664232) - (xy 201.274574 113.611651) (xy 201.354386 113.561) (xy 202.034 113.561) (xy 202.034 115.57) (xy 202.056206 115.796477) + (xy 202.034027 105.406131) (xy 202.034 105.41) (xy 202.034 111.229) (xy 201.357255 111.229) (xy 201.308306 111.195983) + (xy 201.063069 111.092894) (xy 200.802479 111.039403) (xy 200.536462 111.037546) (xy 200.275151 111.087394) (xy 200.113266 111.152799) + (xy 200.113266 76.085737) (xy 200.113266 73.545737) (xy 200.064876 73.282948) (xy 199.966148 73.034649) (xy 199.947838 73.000394) + (xy 199.712636 72.939245) (xy 198.991881 73.66) (xy 199.712636 74.380755) (xy 199.947838 74.319606) (xy 200.053601 74.074221) + (xy 200.109459 73.812917) (xy 200.113266 73.545737) (xy 200.113266 76.085737) (xy 200.064876 75.822948) (xy 199.966148 75.574649) + (xy 199.947838 75.540394) (xy 199.712636 75.479245) (xy 199.475755 75.716126) (xy 199.475755 75.242364) (xy 199.414606 75.007162) + (xy 199.234024 74.929329) (xy 199.380351 74.871148) (xy 199.414606 74.852838) (xy 199.475755 74.617636) (xy 198.755 73.896881) + (xy 198.518119 74.133762) (xy 198.518119 73.66) (xy 197.797364 72.939245) (xy 197.562162 73.000394) (xy 197.456399 73.245779) + (xy 197.400541 73.507083) (xy 197.396734 73.774263) (xy 197.445124 74.037052) (xy 197.543852 74.285351) (xy 197.562162 74.319606) + (xy 197.797364 74.380755) (xy 198.518119 73.66) (xy 198.518119 74.133762) (xy 198.034245 74.617636) (xy 198.095394 74.852838) + (xy 198.275975 74.93067) (xy 198.129649 74.988852) (xy 198.095394 75.007162) (xy 198.034245 75.242364) (xy 198.755 75.963119) + (xy 199.475755 75.242364) (xy 199.475755 75.716126) (xy 198.991881 76.2) (xy 199.712636 76.920755) (xy 199.947838 76.859606) + (xy 200.053601 76.614221) (xy 200.109459 76.352917) (xy 200.113266 76.085737) (xy 200.113266 111.152799) (xy 200.028498 111.187048) + (xy 199.805899 111.332712) (xy 199.615832 111.518839) (xy 199.475755 111.723417) (xy 199.475755 77.157636) (xy 198.755 76.436881) + (xy 198.518119 76.673762) (xy 198.518119 76.2) (xy 197.797364 75.479245) (xy 197.562162 75.540394) (xy 197.456399 75.785779) + (xy 197.400541 76.047083) (xy 197.396734 76.314263) (xy 197.445124 76.577052) (xy 197.543852 76.825351) (xy 197.562162 76.859606) + (xy 197.797364 76.920755) (xy 198.518119 76.2) (xy 198.518119 76.673762) (xy 198.034245 77.157636) (xy 198.095394 77.392838) + (xy 198.340779 77.498601) (xy 198.602083 77.554459) (xy 198.869263 77.558266) (xy 199.132052 77.509876) (xy 199.380351 77.411148) + (xy 199.414606 77.392838) (xy 199.475755 77.157636) (xy 199.475755 111.723417) (xy 199.465538 111.738339) (xy 199.36074 111.98285) + (xy 199.305431 112.243061) (xy 199.301716 112.509058) (xy 199.349739 112.770711) (xy 199.447669 113.018054) (xy 199.591776 113.241664) + (xy 199.776571 113.433025) (xy 199.995016 113.584849) (xy 200.180469 113.665871) (xy 200.034649 113.723852) (xy 200.000394 113.742162) + (xy 199.939245 113.977364) (xy 200.66 114.698119) (xy 201.380755 113.977364) (xy 201.319606 113.742162) (xy 201.1389 113.664276) + (xy 201.274575 113.611652) (xy 201.354389 113.561) (xy 202.034 113.561) (xy 202.034 115.57) (xy 202.056206 115.796477) (xy 202.121979 116.014328) (xy 202.228814 116.215255) (xy 202.372641 116.391603) (xy 202.547981 116.536658) (xy 202.748157 116.644892) (xy 202.961308 116.710874) (xy 203.780217 117.529783) (xy 203.927334 117.650626) (xy 204.095119 117.740592) (xy 204.277185 117.796254) - (xy 204.466595 117.815494) (xy 204.656134 117.797577) (xy 204.838584 117.743187) (xy 204.894132 117.7139) (xy 205.645787 117.7139) - (xy 205.643617 117.719975) (xy 205.765499 117.9425) (xy 207.3275 117.9425) (xy 207.4775 117.9425) (xy 207.8125 117.9425) - (xy 207.8125 118.2775) (xy 207.4775 118.2775) (xy 207.3275 118.2775) (xy 205.765499 118.2775) (xy 205.643617 118.500025) - (xy 205.645787 118.5061) (xy 202.01856 118.5061) (xy 202.01856 117.364293) (xy 202.01856 114.824293) (xy 201.971183 114.562522) - (xy 201.873864 114.314939) (xy 201.852838 114.275395) (xy 201.617635 114.214245) (xy 200.896881 114.935) (xy 201.617635 115.655755) - (xy 201.852838 115.594605) (xy 201.958238 115.350353) (xy 202.014189 115.09028) (xy 202.01856 114.824293) (xy 202.01856 117.364293) - (xy 201.971183 117.102522) (xy 201.873864 116.854939) (xy 201.852838 116.815395) (xy 201.617635 116.754245) (xy 201.380755 116.991125) - (xy 201.380755 116.517365) (xy 201.319605 116.282162) (xy 201.139102 116.204271) (xy 201.280061 116.148864) (xy 201.319605 116.127838) - (xy 201.380755 115.892635) (xy 200.66 115.171881) (xy 200.423119 115.408761) (xy 200.423119 114.935) (xy 199.702365 114.214245) - (xy 199.467162 114.275395) (xy 199.361762 114.519647) (xy 199.305811 114.77972) (xy 199.30144 115.045707) (xy 199.348817 115.307478) - (xy 199.446136 115.555061) (xy 199.467162 115.594605) (xy 199.702365 115.655755) (xy 200.423119 114.935) (xy 200.423119 115.408761) - (xy 199.939245 115.892635) (xy 200.000395 116.127838) (xy 200.180897 116.205728) (xy 200.039939 116.261136) (xy 200.000395 116.282162) - (xy 199.939245 116.517365) (xy 200.66 117.238119) (xy 201.380755 116.517365) (xy 201.380755 116.991125) (xy 200.896881 117.475) - (xy 201.617635 118.195755) (xy 201.852838 118.134605) (xy 201.958238 117.890353) (xy 202.014189 117.63028) (xy 202.01856 117.364293) - (xy 202.01856 118.5061) (xy 201.361654 118.5061) (xy 201.380755 118.432635) (xy 200.66 117.711881) (xy 200.423119 117.948761) - (xy 200.423119 117.475) (xy 199.702365 116.754245) (xy 199.467162 116.815395) (xy 199.361762 117.059647) (xy 199.305811 117.31972) - (xy 199.30144 117.585707) (xy 199.348817 117.847478) (xy 199.446136 118.095061) (xy 199.467162 118.134605) (xy 199.702365 118.195755) - (xy 200.423119 117.475) (xy 200.423119 117.948761) (xy 199.939245 118.432635) (xy 199.958345 118.5061) (xy 198.883842 118.5061) - (xy 198.778752 118.417918) (xy 198.579336 118.308288) (xy 198.362425 118.23948) (xy 198.20856 118.222221) (xy 198.13628 118.214114) - (xy 198.12 118.214) (xy 198.037635 118.214) (xy 198.037824 118.213811) (xy 197.975996 118.151983) (xy 198.042838 118.134605) - (xy 198.148238 117.890353) (xy 198.204189 117.63028) (xy 198.20856 117.364293) (xy 198.20856 114.824293) (xy 198.206558 114.813231) - (xy 198.206558 112.261988) (xy 198.154887 112.001031) (xy 198.053513 111.755081) (xy 198.016 111.698619) (xy 198.016 106.68) - (xy 198.00548 106.572717) (xy 197.996102 106.465513) (xy 197.994392 106.459629) (xy 197.993794 106.453523) (xy 197.962645 106.350355) - (xy 197.932614 106.246984) (xy 197.929793 106.241542) (xy 197.928021 106.235672) (xy 197.877441 106.140546) (xy 197.827889 106.04495) - (xy 197.824065 106.04016) (xy 197.821186 106.034745) (xy 197.753114 105.951281) (xy 197.685917 105.867105) (xy 197.677497 105.858567) - (xy 197.677359 105.858397) (xy 197.677201 105.858266) (xy 197.674486 105.855513) (xy 195.769487 103.950513) (xy 195.686208 103.882107) - (xy 195.603752 103.812918) (xy 195.59838 103.809964) (xy 195.593641 103.806072) (xy 195.498699 103.755164) (xy 195.404336 103.703288) - (xy 195.398492 103.701434) (xy 195.393089 103.698537) (xy 195.290097 103.667049) (xy 195.187425 103.63448) (xy 195.18133 103.633796) - (xy 195.175468 103.632004) (xy 195.068345 103.621123) (xy 194.96128 103.609114) (xy 194.949286 103.60903) (xy 194.94907 103.609008) - (xy 194.948868 103.609027) (xy 194.945 103.609) (xy 192.564908 103.609) (xy 192.564908 99.070091) (xy 192.539341 98.789159) - (xy 192.459695 98.518544) (xy 192.329002 98.268552) (xy 192.152242 98.048707) (xy 191.936146 97.867381) (xy 191.795251 97.789923) - (xy 191.919415 97.723904) (xy 192.138021 97.545614) (xy 192.317834 97.328257) (xy 192.452004 97.080115) (xy 192.535421 96.810638) - (xy 192.564908 96.530091) (xy 192.539341 96.249159) (xy 192.459695 95.978544) (xy 192.329002 95.728552) (xy 192.152242 95.508707) - (xy 191.936146 95.327381) (xy 191.795251 95.249923) (xy 191.919415 95.183904) (xy 192.138021 95.005614) (xy 192.317834 94.788257) - (xy 192.452004 94.540115) (xy 192.535421 94.270638) (xy 192.564908 93.990091) (xy 192.539341 93.709159) (xy 192.459695 93.438544) - (xy 192.329002 93.188552) (xy 192.152242 92.968707) (xy 191.936146 92.787381) (xy 191.795251 92.709923) (xy 191.919415 92.643904) - (xy 192.138021 92.465614) (xy 192.317834 92.248257) (xy 192.452004 92.000115) (xy 192.535421 91.730638) (xy 192.564908 91.450091) - (xy 192.539341 91.169159) (xy 192.459695 90.898544) (xy 192.329002 90.648552) (xy 192.152242 90.428707) (xy 191.936146 90.247381) - (xy 191.795251 90.169923) (xy 191.919415 90.103904) (xy 192.138021 89.925614) (xy 192.317834 89.708257) (xy 192.452004 89.460115) - (xy 192.535421 89.190638) (xy 192.564908 88.910091) (xy 192.539341 88.629159) (xy 192.459695 88.358544) (xy 192.329002 88.108552) - (xy 192.152242 87.888707) (xy 191.936146 87.707381) (xy 191.795251 87.629923) (xy 191.919415 87.563904) (xy 192.138021 87.385614) - (xy 192.317834 87.168257) (xy 192.452004 86.920115) (xy 192.535421 86.650638) (xy 192.564908 86.370091) (xy 192.539341 86.089159) - (xy 192.459695 85.818544) (xy 192.329002 85.568552) (xy 192.152242 85.348707) (xy 191.936146 85.167381) (xy 191.795251 85.089923) - (xy 191.919415 85.023904) (xy 192.138021 84.845614) (xy 192.317834 84.628257) (xy 192.452004 84.380115) (xy 192.535421 84.110638) - (xy 192.564908 83.830091) (xy 192.539341 83.549159) (xy 192.459695 83.278544) (xy 192.329002 83.028552) (xy 192.152242 82.808707) - (xy 191.936146 82.627381) (xy 191.795251 82.549923) (xy 191.919415 82.483904) (xy 192.138021 82.305614) (xy 192.317834 82.088257) - (xy 192.452004 81.840115) (xy 192.535421 81.570638) (xy 192.564908 81.290091) (xy 192.539341 81.009159) (xy 192.459695 80.738544) - (xy 192.329002 80.488552) (xy 192.152242 80.268707) (xy 191.936146 80.087381) (xy 191.795251 80.009923) (xy 191.919415 79.943904) - (xy 192.138021 79.765614) (xy 192.317834 79.548257) (xy 192.452004 79.300115) (xy 192.535421 79.030638) (xy 192.564908 78.750091) - (xy 192.539341 78.469159) (xy 192.459695 78.198544) (xy 192.329002 77.948552) (xy 192.152242 77.728707) (xy 191.936146 77.547381) - (xy 191.795251 77.469923) (xy 191.919415 77.403904) (xy 192.138021 77.225614) (xy 192.317834 77.008257) (xy 192.452004 76.760115) - (xy 192.535421 76.490638) (xy 192.564908 76.210091) (xy 192.539341 75.929159) (xy 192.459695 75.658544) (xy 192.329002 75.408552) - (xy 192.152242 75.188707) (xy 191.936146 75.007381) (xy 191.806697 74.936216) (xy 191.81526 74.932509) (xy 192.048986 74.771211) - (xy 192.246931 74.567587) (xy 192.401555 74.329393) (xy 192.501383 74.050025) (xy 192.379501 73.8275) (xy 190.8175 73.8275) - (xy 190.6675 73.8275) (xy 190.3325 73.8275) (xy 190.1825 73.8275) (xy 188.620499 73.8275) (xy 188.498617 74.050025) - (xy 188.598445 74.329393) (xy 188.753069 74.567587) (xy 188.951014 74.771211) (xy 189.18474 74.932509) (xy 189.193247 74.936192) - (xy 189.080585 74.996096) (xy 188.861979 75.174386) (xy 188.682166 75.391743) (xy 188.547996 75.639885) (xy 188.464579 75.909362) - (xy 188.435092 76.189909) (xy 188.460659 76.470841) (xy 188.540305 76.741456) (xy 188.670998 76.991448) (xy 188.847758 77.211293) - (xy 189.063854 77.392619) (xy 189.204748 77.470076) (xy 189.080585 77.536096) (xy 188.861979 77.714386) (xy 188.682166 77.931743) - (xy 188.547996 78.179885) (xy 188.464579 78.449362) (xy 188.435092 78.729909) (xy 188.460659 79.010841) (xy 188.540305 79.281456) - (xy 188.670998 79.531448) (xy 188.847758 79.751293) (xy 189.063854 79.932619) (xy 189.204748 80.010076) (xy 189.080585 80.076096) - (xy 188.861979 80.254386) (xy 188.682166 80.471743) (xy 188.547996 80.719885) (xy 188.464579 80.989362) (xy 188.435092 81.269909) - (xy 188.460659 81.550841) (xy 188.540305 81.821456) (xy 188.670998 82.071448) (xy 188.847758 82.291293) (xy 189.063854 82.472619) - (xy 189.204748 82.550076) (xy 189.080585 82.616096) (xy 188.861979 82.794386) (xy 188.682166 83.011743) (xy 188.547996 83.259885) - (xy 188.464579 83.529362) (xy 188.435092 83.809909) (xy 188.460659 84.090841) (xy 188.540305 84.361456) (xy 188.670998 84.611448) - (xy 188.847758 84.831293) (xy 189.063854 85.012619) (xy 189.204748 85.090076) (xy 189.080585 85.156096) (xy 188.861979 85.334386) - (xy 188.682166 85.551743) (xy 188.547996 85.799885) (xy 188.464579 86.069362) (xy 188.435092 86.349909) (xy 188.460659 86.630841) - (xy 188.540305 86.901456) (xy 188.670998 87.151448) (xy 188.847758 87.371293) (xy 189.063854 87.552619) (xy 189.204748 87.630076) - (xy 189.080585 87.696096) (xy 188.861979 87.874386) (xy 188.682166 88.091743) (xy 188.547996 88.339885) (xy 188.464579 88.609362) - (xy 188.435092 88.889909) (xy 188.460659 89.170841) (xy 188.540305 89.441456) (xy 188.670998 89.691448) (xy 188.847758 89.911293) - (xy 189.063854 90.092619) (xy 189.204748 90.170076) (xy 189.080585 90.236096) (xy 188.861979 90.414386) (xy 188.682166 90.631743) - (xy 188.547996 90.879885) (xy 188.464579 91.149362) (xy 188.435092 91.429909) (xy 188.460659 91.710841) (xy 188.540305 91.981456) - (xy 188.670998 92.231448) (xy 188.847758 92.451293) (xy 189.063854 92.632619) (xy 189.204748 92.710076) (xy 189.080585 92.776096) - (xy 188.861979 92.954386) (xy 188.682166 93.171743) (xy 188.547996 93.419885) (xy 188.464579 93.689362) (xy 188.435092 93.969909) - (xy 188.460659 94.250841) (xy 188.540305 94.521456) (xy 188.670998 94.771448) (xy 188.847758 94.991293) (xy 189.063854 95.172619) - (xy 189.204748 95.250076) (xy 189.080585 95.316096) (xy 188.861979 95.494386) (xy 188.682166 95.711743) (xy 188.547996 95.959885) - (xy 188.464579 96.229362) (xy 188.435092 96.509909) (xy 188.460659 96.790841) (xy 188.540305 97.061456) (xy 188.670998 97.311448) - (xy 188.847758 97.531293) (xy 189.063854 97.712619) (xy 189.204748 97.790076) (xy 189.080585 97.856096) (xy 188.861979 98.034386) - (xy 188.682166 98.251743) (xy 188.547996 98.499885) (xy 188.464579 98.769362) (xy 188.435092 99.049909) (xy 188.460659 99.330841) - (xy 188.540305 99.601456) (xy 188.670998 99.851448) (xy 188.847758 100.071293) (xy 189.063854 100.252619) (xy 189.311053 100.388518) - (xy 189.579941 100.473815) (xy 189.860276 100.505259) (xy 189.880457 100.5054) (xy 191.119543 100.5054) (xy 191.400289 100.477873) - (xy 191.670342 100.396339) (xy 191.919415 100.263904) (xy 192.138021 100.085614) (xy 192.317834 99.868257) (xy 192.452004 99.620115) - (xy 192.535421 99.350638) (xy 192.564908 99.070091) (xy 192.564908 103.609) (xy 187.96 103.609) (xy 187.852767 103.619514) - (xy 187.745513 103.628897) (xy 187.739624 103.630607) (xy 187.733523 103.631206) (xy 187.630383 103.662345) (xy 187.526985 103.692386) - (xy 187.521544 103.695205) (xy 187.515672 103.696979) (xy 187.420546 103.747558) (xy 187.324951 103.79711) (xy 187.320159 103.800935) - (xy 187.314745 103.803814) (xy 187.231262 103.871901) (xy 187.147106 103.939083) (xy 187.138568 103.9475) (xy 187.138397 103.947641) - (xy 187.138265 103.9478) (xy 187.135513 103.950514) (xy 185.865513 105.220513) (xy 185.797107 105.303791) (xy 185.727918 105.386248) - (xy 185.724964 105.391619) (xy 185.721072 105.396359) (xy 185.670164 105.4913) (xy 185.618288 105.585664) (xy 185.616434 105.591507) - (xy 185.613537 105.596911) (xy 185.582049 105.699902) (xy 185.54948 105.802575) (xy 185.548796 105.808669) (xy 185.547004 105.814532) - (xy 185.536123 105.921654) (xy 185.524114 106.02872) (xy 185.52403 106.040713) (xy 185.524008 106.04093) (xy 185.524027 106.041131) - (xy 185.524 106.045) (xy 185.524 107.88235) (xy 185.519658 107.883661) (xy 185.270585 108.016096) (xy 185.051979 108.194386) - (xy 184.872166 108.411743) (xy 184.737996 108.659885) (xy 184.654579 108.929362) (xy 184.625092 109.209909) (xy 184.650659 109.490841) - (xy 184.730305 109.761456) (xy 184.860998 110.011448) (xy 185.037758 110.231293) (xy 185.253854 110.412619) (xy 185.394748 110.490076) - (xy 185.270585 110.556096) (xy 185.051979 110.734386) (xy 184.872166 110.951743) (xy 184.737996 111.199885) (xy 184.654579 111.469362) - (xy 184.625092 111.749909) (xy 184.650659 112.030841) (xy 184.730305 112.301456) (xy 184.860998 112.551448) (xy 185.037758 112.771293) - (xy 185.253854 112.952619) (xy 185.394748 113.030076) (xy 185.270585 113.096096) (xy 185.051979 113.274386) (xy 184.872166 113.491743) - (xy 184.737996 113.739885) (xy 184.654579 114.009362) (xy 184.625092 114.289909) (xy 184.650659 114.570841) (xy 184.730305 114.841456) - (xy 184.860998 115.091448) (xy 185.037758 115.311293) (xy 185.253854 115.492619) (xy 185.394748 115.570076) (xy 185.270585 115.636096) - (xy 185.051979 115.814386) (xy 184.872166 116.031743) (xy 184.737996 116.279885) (xy 184.654579 116.549362) (xy 184.625092 116.829909) - (xy 184.650659 117.110841) (xy 184.730305 117.381456) (xy 184.860998 117.631448) (xy 185.037758 117.851293) (xy 185.253854 118.032619) - (xy 185.501053 118.168518) (xy 185.769941 118.253815) (xy 186.050276 118.285259) (xy 186.070457 118.2854) (xy 187.309543 118.2854) - (xy 187.590289 118.257873) (xy 187.860342 118.176339) (xy 188.109415 118.043904) (xy 188.328021 117.865614) (xy 188.369478 117.8155) - (xy 189.23 117.8155) (xy 189.319688 117.806706) (xy 189.409445 117.798853) (xy 189.414367 117.797422) (xy 189.419476 117.796922) - (xy 189.505767 117.770869) (xy 189.59227 117.745738) (xy 189.596823 117.743377) (xy 189.601734 117.741895) (xy 189.681307 117.699585) - (xy 189.761295 117.658123) (xy 189.765302 117.654924) (xy 189.769833 117.652515) (xy 189.839672 117.595555) (xy 189.910085 117.539346) - (xy 189.917226 117.532303) (xy 189.917371 117.532186) (xy 189.917481 117.532052) (xy 189.919783 117.529783) (xy 191.796459 115.653105) - (xy 191.944355 115.717719) (xy 192.228498 115.780192) (xy 192.519363 115.786285) (xy 192.805873 115.735765) (xy 193.077113 115.630558) - (xy 193.322753 115.47467) (xy 193.533436 115.27404) (xy 193.701137 115.036308) (xy 193.819469 114.770531) (xy 193.883924 114.486831) - (xy 193.888564 114.154535) (xy 193.832055 113.869147) (xy 193.721191 113.600169) (xy 193.560193 113.357848) (xy 193.355194 113.151413) - (xy 193.114003 112.988727) (xy 192.845805 112.875988) (xy 192.560818 112.817488) (xy 192.269896 112.815457) (xy 191.98412 112.869972) - (xy 191.714375 112.978956) (xy 191.470935 113.138258) (xy 191.263074 113.341811) (xy 191.098709 113.58186) (xy 191.091038 113.599757) - (xy 191.089915 113.600654) (xy 191.082777 113.607692) (xy 191.082629 113.607814) (xy 191.082515 113.607951) (xy 191.080217 113.610218) - (xy 190.817587 113.872847) (xy 190.819183 113.867818) (xy 190.819754 113.862719) (xy 190.821254 113.857816) (xy 190.830357 113.768195) - (xy 190.840405 113.67862) (xy 190.840474 113.668592) (xy 190.840494 113.668405) (xy 190.840477 113.66823) (xy 190.8405 113.665) - (xy 190.8405 111.609678) (xy 190.993436 111.46404) (xy 191.161137 111.226308) (xy 191.279469 110.960531) (xy 191.343924 110.676831) - (xy 191.348564 110.344535) (xy 191.292055 110.059147) (xy 191.181191 109.790169) (xy 191.020193 109.547848) (xy 190.815194 109.341413) - (xy 190.574003 109.178727) (xy 190.305805 109.065988) (xy 190.020818 109.007488) (xy 189.729896 109.005457) (xy 189.44412 109.059972) - (xy 189.174375 109.168956) (xy 188.930935 109.328258) (xy 188.723074 109.531811) (xy 188.715395 109.543025) (xy 188.725421 109.510638) - (xy 188.754908 109.230091) (xy 188.729341 108.949159) (xy 188.649695 108.678544) (xy 188.519002 108.428552) (xy 188.342242 108.208707) - (xy 188.126146 108.027381) (xy 187.878947 107.891482) (xy 187.856 107.884202) (xy 187.856 106.527973) (xy 188.442973 105.941) - (xy 194.462026 105.941) (xy 195.684 107.162973) (xy 195.684 111.696772) (xy 195.655539 111.738339) (xy 195.550741 111.982851) - (xy 195.495432 112.243061) (xy 195.491717 112.509058) (xy 195.53974 112.770711) (xy 195.637669 113.018053) (xy 195.781776 113.241664) - (xy 195.966572 113.433025) (xy 196.185017 113.584848) (xy 196.370501 113.665884) (xy 196.229939 113.721136) (xy 196.190395 113.742162) - (xy 196.129245 113.977365) (xy 196.85 114.698119) (xy 197.570755 113.977365) (xy 197.509605 113.742162) (xy 197.329011 113.664232) - (xy 197.464574 113.611651) (xy 197.689185 113.469108) (xy 197.881832 113.285653) (xy 198.035176 113.068274) (xy 198.143378 112.82525) - (xy 198.202315 112.565837) (xy 198.206558 112.261988) (xy 198.206558 114.813231) (xy 198.161183 114.562522) (xy 198.063864 114.314939) - (xy 198.042838 114.275395) (xy 197.807635 114.214245) (xy 197.086881 114.935) (xy 197.807635 115.655755) (xy 198.042838 115.594605) - (xy 198.148238 115.350353) (xy 198.204189 115.09028) (xy 198.20856 114.824293) (xy 198.20856 117.364293) (xy 198.161183 117.102522) - (xy 198.063864 116.854939) (xy 198.042838 116.815395) (xy 197.807635 116.754245) (xy 197.570755 116.991125) (xy 197.570755 116.517365) - (xy 197.509605 116.282162) (xy 197.329102 116.204271) (xy 197.470061 116.148864) (xy 197.509605 116.127838) (xy 197.570755 115.892635) - (xy 196.85 115.171881) (xy 196.613119 115.408761) (xy 196.613119 114.935) (xy 195.892365 114.214245) (xy 195.657162 114.275395) - (xy 195.551762 114.519647) (xy 195.495811 114.77972) (xy 195.49144 115.045707) (xy 195.538817 115.307478) (xy 195.636136 115.555061) - (xy 195.657162 115.594605) (xy 195.892365 115.655755) (xy 196.613119 114.935) (xy 196.613119 115.408761) (xy 196.129245 115.892635) - (xy 196.190395 116.127838) (xy 196.370897 116.205728) (xy 196.229939 116.261136) (xy 196.190395 116.282162) (xy 196.129245 116.517365) - (xy 196.85 117.238119) (xy 197.570755 116.517365) (xy 197.570755 116.991125) (xy 197.086881 117.474999) (xy 197.086881 117.475) - (xy 196.85 117.711881) (xy 196.849999 117.711881) (xy 196.613119 117.475) (xy 196.507053 117.368934) (xy 195.892365 116.754245) - (xy 195.657162 116.815395) (xy 195.551762 117.059647) (xy 195.495811 117.31972) (xy 195.49144 117.585707) (xy 195.538817 117.847478) - (xy 195.636136 118.095061) (xy 195.657162 118.134605) (xy 195.724003 118.151983) (xy 195.662176 118.213811) (xy 195.662365 118.214) + (xy 204.466595 117.815494) (xy 204.656134 117.797577) (xy 204.838584 117.743187) (xy 204.894132 117.7139) (xy 205.899767 117.7139) + (xy 205.897616 117.719975) (xy 206.019499 117.9425) (xy 207.4775 117.9425) (xy 207.4775 117.9225) (xy 207.8125 117.9225) + (xy 207.8125 117.9425) (xy 207.8325 117.9425) (xy 207.8325 118.2775) (xy 207.8125 118.2775) (xy 207.8125 118.2975) + (xy 207.4775 118.2975) (xy 207.4775 118.2775) (xy 206.019499 118.2775) (xy 205.897616 118.500025) (xy 205.899767 118.5061) + (xy 202.018266 118.5061) (xy 202.018266 117.360737) (xy 202.018266 114.820737) (xy 201.969876 114.557948) (xy 201.871148 114.309649) + (xy 201.852838 114.275394) (xy 201.617636 114.214245) (xy 200.896881 114.935) (xy 201.617636 115.655755) (xy 201.852838 115.594606) + (xy 201.958601 115.349221) (xy 202.014459 115.087917) (xy 202.018266 114.820737) (xy 202.018266 117.360737) (xy 201.969876 117.097948) + (xy 201.871148 116.849649) (xy 201.852838 116.815394) (xy 201.617636 116.754245) (xy 201.380755 116.991126) (xy 201.380755 116.517364) + (xy 201.319606 116.282162) (xy 201.139024 116.204329) (xy 201.285351 116.146148) (xy 201.319606 116.127838) (xy 201.380755 115.892636) + (xy 200.66 115.171881) (xy 200.423119 115.408762) (xy 200.423119 114.935) (xy 199.702364 114.214245) (xy 199.467162 114.275394) + (xy 199.361399 114.520779) (xy 199.305541 114.782083) (xy 199.301734 115.049263) (xy 199.350124 115.312052) (xy 199.448852 115.560351) + (xy 199.467162 115.594606) (xy 199.702364 115.655755) (xy 200.423119 114.935) (xy 200.423119 115.408762) (xy 199.939245 115.892636) + (xy 200.000394 116.127838) (xy 200.180975 116.20567) (xy 200.034649 116.263852) (xy 200.000394 116.282162) (xy 199.939245 116.517364) + (xy 200.66 117.238119) (xy 201.380755 116.517364) (xy 201.380755 116.991126) (xy 200.896881 117.475) (xy 201.617636 118.195755) + (xy 201.852838 118.134606) (xy 201.958601 117.889221) (xy 202.014459 117.627917) (xy 202.018266 117.360737) (xy 202.018266 118.5061) + (xy 201.361655 118.5061) (xy 201.380755 118.432636) (xy 200.66 117.711881) (xy 200.423119 117.948762) (xy 200.423119 117.475) + (xy 199.702364 116.754245) (xy 199.467162 116.815394) (xy 199.361399 117.060779) (xy 199.305541 117.322083) (xy 199.301734 117.589263) + (xy 199.350124 117.852052) (xy 199.448852 118.100351) (xy 199.467162 118.134606) (xy 199.702364 118.195755) (xy 200.423119 117.475) + (xy 200.423119 117.948762) (xy 199.939245 118.432636) (xy 199.958344 118.5061) (xy 198.883842 118.5061) (xy 198.778752 118.417918) + (xy 198.579336 118.308288) (xy 198.362425 118.23948) (xy 198.208266 118.222188) (xy 198.13628 118.214114) (xy 198.12 118.214) + (xy 197.825883 118.214) (xy 197.807637 118.195754) (xy 198.042838 118.134606) (xy 198.148601 117.889221) (xy 198.204459 117.627917) + (xy 198.208266 117.360737) (xy 198.208266 114.820737) (xy 198.206559 114.811466) (xy 198.206559 112.261988) (xy 198.154888 112.001031) + (xy 198.053514 111.75508) (xy 198.016 111.698616) (xy 198.016 106.68) (xy 198.00549 106.572811) (xy 197.996103 106.465513) + (xy 197.994392 106.459624) (xy 197.993794 106.453523) (xy 197.962668 106.350429) (xy 197.932615 106.246985) (xy 197.929792 106.24154) + (xy 197.928021 106.235672) (xy 197.87746 106.140582) (xy 197.82789 106.044951) (xy 197.824064 106.040159) (xy 197.821186 106.034745) + (xy 197.753123 105.951292) (xy 197.685918 105.867106) (xy 197.677497 105.858567) (xy 197.677359 105.858397) (xy 197.677201 105.858266) + (xy 197.674487 105.855514) (xy 195.769487 103.950513) (xy 195.686208 103.882107) (xy 195.603752 103.812918) (xy 195.59838 103.809964) + (xy 195.593641 103.806072) (xy 195.498699 103.755164) (xy 195.404336 103.703288) (xy 195.398492 103.701434) (xy 195.393089 103.698537) + (xy 195.290097 103.667049) (xy 195.187425 103.63448) (xy 195.18133 103.633796) (xy 195.175468 103.632004) (xy 195.068345 103.621123) + (xy 194.96128 103.609114) (xy 194.949286 103.60903) (xy 194.94907 103.609008) (xy 194.948868 103.609027) (xy 194.945 103.609) + (xy 192.564908 103.609) (xy 192.564908 99.070091) (xy 192.539341 98.789159) (xy 192.459695 98.518544) (xy 192.329002 98.268552) + (xy 192.152242 98.048707) (xy 191.936146 97.867381) (xy 191.795251 97.789923) (xy 191.919415 97.723904) (xy 192.138021 97.545614) + (xy 192.317834 97.328257) (xy 192.452004 97.080115) (xy 192.535421 96.810638) (xy 192.564908 96.530091) (xy 192.539341 96.249159) + (xy 192.459695 95.978544) (xy 192.329002 95.728552) (xy 192.152242 95.508707) (xy 191.936146 95.327381) (xy 191.795251 95.249923) + (xy 191.919415 95.183904) (xy 192.138021 95.005614) (xy 192.317834 94.788257) (xy 192.452004 94.540115) (xy 192.535421 94.270638) + (xy 192.564908 93.990091) (xy 192.539341 93.709159) (xy 192.459695 93.438544) (xy 192.329002 93.188552) (xy 192.152242 92.968707) + (xy 191.936146 92.787381) (xy 191.795251 92.709923) (xy 191.919415 92.643904) (xy 192.138021 92.465614) (xy 192.317834 92.248257) + (xy 192.452004 92.000115) (xy 192.535421 91.730638) (xy 192.564908 91.450091) (xy 192.539341 91.169159) (xy 192.459695 90.898544) + (xy 192.329002 90.648552) (xy 192.152242 90.428707) (xy 191.936146 90.247381) (xy 191.795251 90.169923) (xy 191.919415 90.103904) + (xy 192.138021 89.925614) (xy 192.317834 89.708257) (xy 192.452004 89.460115) (xy 192.535421 89.190638) (xy 192.564908 88.910091) + (xy 192.539341 88.629159) (xy 192.459695 88.358544) (xy 192.329002 88.108552) (xy 192.152242 87.888707) (xy 191.936146 87.707381) + (xy 191.795251 87.629923) (xy 191.919415 87.563904) (xy 192.138021 87.385614) (xy 192.317834 87.168257) (xy 192.452004 86.920115) + (xy 192.535421 86.650638) (xy 192.564908 86.370091) (xy 192.539341 86.089159) (xy 192.459695 85.818544) (xy 192.329002 85.568552) + (xy 192.152242 85.348707) (xy 191.936146 85.167381) (xy 191.795251 85.089923) (xy 191.919415 85.023904) (xy 192.138021 84.845614) + (xy 192.317834 84.628257) (xy 192.452004 84.380115) (xy 192.535421 84.110638) (xy 192.564908 83.830091) (xy 192.539341 83.549159) + (xy 192.459695 83.278544) (xy 192.329002 83.028552) (xy 192.152242 82.808707) (xy 191.936146 82.627381) (xy 191.795251 82.549923) + (xy 191.919415 82.483904) (xy 192.138021 82.305614) (xy 192.317834 82.088257) (xy 192.452004 81.840115) (xy 192.535421 81.570638) + (xy 192.564908 81.290091) (xy 192.539341 81.009159) (xy 192.459695 80.738544) (xy 192.329002 80.488552) (xy 192.152242 80.268707) + (xy 191.936146 80.087381) (xy 191.795251 80.009923) (xy 191.919415 79.943904) (xy 192.138021 79.765614) (xy 192.317834 79.548257) + (xy 192.452004 79.300115) (xy 192.535421 79.030638) (xy 192.564908 78.750091) (xy 192.539341 78.469159) (xy 192.459695 78.198544) + (xy 192.329002 77.948552) (xy 192.152242 77.728707) (xy 191.936146 77.547381) (xy 191.795251 77.469923) (xy 191.919415 77.403904) + (xy 192.138021 77.225614) (xy 192.317834 77.008257) (xy 192.452004 76.760115) (xy 192.535421 76.490638) (xy 192.564908 76.210091) + (xy 192.539341 75.929159) (xy 192.459695 75.658544) (xy 192.329002 75.408552) (xy 192.152242 75.188707) (xy 191.936146 75.007381) + (xy 191.806438 74.936073) (xy 191.81748 74.931276) (xy 192.051892 74.768748) (xy 192.250092 74.563612) (xy 192.404464 74.32375) + (xy 192.501384 74.050025) (xy 192.379501 73.8275) (xy 190.6675 73.8275) (xy 190.6675 73.8475) (xy 190.3325 73.8475) + (xy 190.3325 73.8275) (xy 188.620499 73.8275) (xy 188.498616 74.050025) (xy 188.595536 74.32375) (xy 188.749908 74.563612) + (xy 188.948108 74.768748) (xy 189.18252 74.931276) (xy 189.193511 74.936051) (xy 189.080585 74.996096) (xy 188.861979 75.174386) + (xy 188.682166 75.391743) (xy 188.547996 75.639885) (xy 188.464579 75.909362) (xy 188.435092 76.189909) (xy 188.460659 76.470841) + (xy 188.540305 76.741456) (xy 188.670998 76.991448) (xy 188.847758 77.211293) (xy 189.063854 77.392619) (xy 189.204748 77.470076) + (xy 189.080585 77.536096) (xy 188.861979 77.714386) (xy 188.682166 77.931743) (xy 188.547996 78.179885) (xy 188.464579 78.449362) + (xy 188.435092 78.729909) (xy 188.460659 79.010841) (xy 188.540305 79.281456) (xy 188.670998 79.531448) (xy 188.847758 79.751293) + (xy 189.063854 79.932619) (xy 189.204748 80.010076) (xy 189.080585 80.076096) (xy 188.861979 80.254386) (xy 188.682166 80.471743) + (xy 188.547996 80.719885) (xy 188.464579 80.989362) (xy 188.435092 81.269909) (xy 188.460659 81.550841) (xy 188.540305 81.821456) + (xy 188.670998 82.071448) (xy 188.847758 82.291293) (xy 189.063854 82.472619) (xy 189.204748 82.550076) (xy 189.080585 82.616096) + (xy 188.861979 82.794386) (xy 188.682166 83.011743) (xy 188.547996 83.259885) (xy 188.464579 83.529362) (xy 188.435092 83.809909) + (xy 188.460659 84.090841) (xy 188.540305 84.361456) (xy 188.670998 84.611448) (xy 188.847758 84.831293) (xy 189.063854 85.012619) + (xy 189.204748 85.090076) (xy 189.080585 85.156096) (xy 188.861979 85.334386) (xy 188.682166 85.551743) (xy 188.547996 85.799885) + (xy 188.464579 86.069362) (xy 188.435092 86.349909) (xy 188.460659 86.630841) (xy 188.540305 86.901456) (xy 188.670998 87.151448) + (xy 188.847758 87.371293) (xy 189.063854 87.552619) (xy 189.204748 87.630076) (xy 189.080585 87.696096) (xy 188.861979 87.874386) + (xy 188.682166 88.091743) (xy 188.547996 88.339885) (xy 188.464579 88.609362) (xy 188.435092 88.889909) (xy 188.460659 89.170841) + (xy 188.540305 89.441456) (xy 188.670998 89.691448) (xy 188.847758 89.911293) (xy 189.063854 90.092619) (xy 189.204748 90.170076) + (xy 189.080585 90.236096) (xy 188.861979 90.414386) (xy 188.682166 90.631743) (xy 188.547996 90.879885) (xy 188.464579 91.149362) + (xy 188.435092 91.429909) (xy 188.460659 91.710841) (xy 188.540305 91.981456) (xy 188.670998 92.231448) (xy 188.847758 92.451293) + (xy 189.063854 92.632619) (xy 189.204748 92.710076) (xy 189.080585 92.776096) (xy 188.861979 92.954386) (xy 188.682166 93.171743) + (xy 188.547996 93.419885) (xy 188.464579 93.689362) (xy 188.435092 93.969909) (xy 188.460659 94.250841) (xy 188.540305 94.521456) + (xy 188.670998 94.771448) (xy 188.847758 94.991293) (xy 189.063854 95.172619) (xy 189.204748 95.250076) (xy 189.080585 95.316096) + (xy 188.861979 95.494386) (xy 188.682166 95.711743) (xy 188.547996 95.959885) (xy 188.464579 96.229362) (xy 188.435092 96.509909) + (xy 188.460659 96.790841) (xy 188.540305 97.061456) (xy 188.670998 97.311448) (xy 188.847758 97.531293) (xy 189.063854 97.712619) + (xy 189.204748 97.790076) (xy 189.080585 97.856096) (xy 188.861979 98.034386) (xy 188.682166 98.251743) (xy 188.547996 98.499885) + (xy 188.464579 98.769362) (xy 188.435092 99.049909) (xy 188.460659 99.330841) (xy 188.540305 99.601456) (xy 188.670998 99.851448) + (xy 188.847758 100.071293) (xy 189.063854 100.252619) (xy 189.311053 100.388518) (xy 189.579941 100.473815) (xy 189.860276 100.505259) + (xy 189.880457 100.5054) (xy 191.119543 100.5054) (xy 191.400289 100.477873) (xy 191.670342 100.396339) (xy 191.919415 100.263904) + (xy 192.138021 100.085614) (xy 192.317834 99.868257) (xy 192.452004 99.620115) (xy 192.535421 99.350638) (xy 192.564908 99.070091) + (xy 192.564908 103.609) (xy 187.96 103.609) (xy 187.852767 103.619514) (xy 187.745513 103.628897) (xy 187.739624 103.630607) + (xy 187.733523 103.631206) (xy 187.630383 103.662345) (xy 187.526985 103.692386) (xy 187.521544 103.695205) (xy 187.515672 103.696979) + (xy 187.420546 103.747558) (xy 187.324951 103.79711) (xy 187.320159 103.800935) (xy 187.314745 103.803814) (xy 187.231262 103.871901) + (xy 187.147106 103.939083) (xy 187.138568 103.9475) (xy 187.138397 103.947641) (xy 187.138265 103.9478) (xy 187.135513 103.950514) + (xy 185.865513 105.220513) (xy 185.797107 105.303791) (xy 185.727918 105.386248) (xy 185.724964 105.391619) (xy 185.721072 105.396359) + (xy 185.670164 105.4913) (xy 185.618288 105.585664) (xy 185.616434 105.591507) (xy 185.613537 105.596911) (xy 185.582049 105.699902) + (xy 185.54948 105.802575) (xy 185.548796 105.808669) (xy 185.547004 105.814532) (xy 185.536123 105.921654) (xy 185.524114 106.02872) + (xy 185.52403 106.040713) (xy 185.524008 106.04093) (xy 185.524027 106.041131) (xy 185.524 106.045) (xy 185.524 108.017575) + (xy 185.307208 108.194386) (xy 185.127395 108.411743) (xy 184.993225 108.659885) (xy 184.909808 108.929362) (xy 184.880321 109.209909) + (xy 184.905888 109.490841) (xy 184.985534 109.761456) (xy 185.116227 110.011448) (xy 185.292987 110.231293) (xy 185.509083 110.412619) + (xy 185.649977 110.490076) (xy 185.525814 110.556096) (xy 185.307208 110.734386) (xy 185.127395 110.951743) (xy 184.993225 111.199885) + (xy 184.909808 111.469362) (xy 184.880321 111.749909) (xy 184.905888 112.030841) (xy 184.985534 112.301456) (xy 185.116227 112.551448) + (xy 185.292987 112.771293) (xy 185.509083 112.952619) (xy 185.649977 113.030076) (xy 185.525814 113.096096) (xy 185.307208 113.274386) + (xy 185.127395 113.491743) (xy 184.993225 113.739885) (xy 184.909808 114.009362) (xy 184.880321 114.289909) (xy 184.905888 114.570841) + (xy 184.985534 114.841456) (xy 185.116227 115.091448) (xy 185.292987 115.311293) (xy 185.509083 115.492619) (xy 185.649977 115.570076) + (xy 185.525814 115.636096) (xy 185.307208 115.814386) (xy 185.127395 116.031743) (xy 184.993225 116.279885) (xy 184.909808 116.549362) + (xy 184.880321 116.829909) (xy 184.905888 117.110841) (xy 184.985534 117.381456) (xy 185.116227 117.631448) (xy 185.292987 117.851293) + (xy 185.509083 118.032619) (xy 185.756282 118.168518) (xy 186.02517 118.253815) (xy 186.305505 118.285259) (xy 186.325686 118.2854) + (xy 187.054314 118.2854) (xy 187.33506 118.257873) (xy 187.605113 118.176339) (xy 187.854186 118.043904) (xy 188.072792 117.865614) + (xy 188.114249 117.8155) (xy 189.23 117.8155) (xy 189.319688 117.806706) (xy 189.409445 117.798853) (xy 189.414367 117.797422) + (xy 189.419476 117.796922) (xy 189.505767 117.770869) (xy 189.59227 117.745738) (xy 189.596823 117.743377) (xy 189.601734 117.741895) + (xy 189.681307 117.699585) (xy 189.761295 117.658123) (xy 189.765302 117.654924) (xy 189.769833 117.652515) (xy 189.839672 117.595555) + (xy 189.910085 117.539346) (xy 189.917226 117.532303) (xy 189.917371 117.532186) (xy 189.917481 117.532052) (xy 189.919783 117.529783) + (xy 191.796459 115.653105) (xy 191.944355 115.717719) (xy 192.228498 115.780192) (xy 192.519363 115.786285) (xy 192.805873 115.735765) + (xy 193.077113 115.630558) (xy 193.322753 115.47467) (xy 193.533436 115.27404) (xy 193.701137 115.036308) (xy 193.819469 114.770531) + (xy 193.883924 114.486831) (xy 193.888564 114.154535) (xy 193.832055 113.869147) (xy 193.721191 113.600169) (xy 193.560193 113.357848) + (xy 193.355194 113.151413) (xy 193.114003 112.988727) (xy 192.845805 112.875988) (xy 192.560818 112.817488) (xy 192.269896 112.815457) + (xy 191.98412 112.869972) (xy 191.714375 112.978956) (xy 191.470935 113.138258) (xy 191.263074 113.341811) (xy 191.098709 113.58186) + (xy 191.091038 113.599757) (xy 191.089915 113.600654) (xy 191.082777 113.607692) (xy 191.082629 113.607814) (xy 191.082515 113.607951) + (xy 191.080217 113.610218) (xy 190.817587 113.872847) (xy 190.819183 113.867818) (xy 190.819754 113.862722) (xy 190.821255 113.857815) + (xy 190.830361 113.768155) (xy 190.840405 113.67862) (xy 190.840474 113.668591) (xy 190.840494 113.668404) (xy 190.840477 113.668229) + (xy 190.8405 113.665) (xy 190.8405 111.609678) (xy 190.993436 111.46404) (xy 191.161137 111.226308) (xy 191.279469 110.960531) + (xy 191.343924 110.676831) (xy 191.348564 110.344535) (xy 191.292055 110.059147) (xy 191.181191 109.790169) (xy 191.020193 109.547848) + (xy 190.815194 109.341413) (xy 190.574003 109.178727) (xy 190.305805 109.065988) (xy 190.020818 109.007488) (xy 189.729896 109.005457) + (xy 189.44412 109.059972) (xy 189.174375 109.168956) (xy 188.930935 109.328258) (xy 188.723074 109.531811) (xy 188.558709 109.77186) + (xy 188.4441 110.039264) (xy 188.383612 110.323836) (xy 188.37955 110.614737) (xy 188.432068 110.900887) (xy 188.539167 111.171386) + (xy 188.696765 111.415931) (xy 188.8895 111.615513) (xy 188.8895 113.260934) (xy 188.825934 113.3245) (xy 188.115791 113.3245) + (xy 188.087013 113.288707) (xy 187.870917 113.107381) (xy 187.730022 113.029923) (xy 187.854186 112.963904) (xy 188.072792 112.785614) + (xy 188.252605 112.568257) (xy 188.386775 112.320115) (xy 188.470192 112.050638) (xy 188.499679 111.770091) (xy 188.474112 111.489159) + (xy 188.394466 111.218544) (xy 188.263773 110.968552) (xy 188.087013 110.748707) (xy 187.870917 110.567381) (xy 187.730022 110.489923) + (xy 187.854186 110.423904) (xy 188.072792 110.245614) (xy 188.252605 110.028257) (xy 188.386775 109.780115) (xy 188.470192 109.510638) + (xy 188.499679 109.230091) (xy 188.474112 108.949159) (xy 188.394466 108.678544) (xy 188.263773 108.428552) (xy 188.087013 108.208707) + (xy 187.870917 108.027381) (xy 187.856 108.01918) (xy 187.856 106.527973) (xy 188.442973 105.941) (xy 194.462026 105.941) + (xy 195.684 107.162973) (xy 195.684 111.696771) (xy 195.655538 111.738339) (xy 195.55074 111.98285) (xy 195.495431 112.243061) + (xy 195.491716 112.509058) (xy 195.539739 112.770711) (xy 195.637669 113.018054) (xy 195.781776 113.241664) (xy 195.966571 113.433025) + (xy 196.185016 113.584849) (xy 196.370469 113.665871) (xy 196.224649 113.723852) (xy 196.190394 113.742162) (xy 196.129245 113.977364) + (xy 196.85 114.698119) (xy 197.570755 113.977364) (xy 197.509606 113.742162) (xy 197.3289 113.664276) (xy 197.464575 113.611652) + (xy 197.689186 113.469109) (xy 197.881833 113.285654) (xy 198.035177 113.068274) (xy 198.143379 112.82525) (xy 198.202316 112.565837) + (xy 198.206559 112.261988) (xy 198.206559 114.811466) (xy 198.159876 114.557948) (xy 198.061148 114.309649) (xy 198.042838 114.275394) + (xy 197.807636 114.214245) (xy 197.086881 114.935) (xy 197.807636 115.655755) (xy 198.042838 115.594606) (xy 198.148601 115.349221) + (xy 198.204459 115.087917) (xy 198.208266 114.820737) (xy 198.208266 117.360737) (xy 198.159876 117.097948) (xy 198.061148 116.849649) + (xy 198.042838 116.815394) (xy 197.807636 116.754245) (xy 197.570755 116.991126) (xy 197.570755 116.517364) (xy 197.509606 116.282162) + (xy 197.329024 116.204329) (xy 197.475351 116.146148) (xy 197.509606 116.127838) (xy 197.570755 115.892636) (xy 196.85 115.171881) + (xy 196.613119 115.408762) (xy 196.613119 114.935) (xy 195.892364 114.214245) (xy 195.657162 114.275394) (xy 195.551399 114.520779) + (xy 195.495541 114.782083) (xy 195.491734 115.049263) (xy 195.540124 115.312052) (xy 195.638852 115.560351) (xy 195.657162 115.594606) + (xy 195.892364 115.655755) (xy 196.613119 114.935) (xy 196.613119 115.408762) (xy 196.129245 115.892636) (xy 196.190394 116.127838) + (xy 196.370975 116.20567) (xy 196.224649 116.263852) (xy 196.190394 116.282162) (xy 196.129245 116.517364) (xy 196.85 117.238119) + (xy 197.570755 116.517364) (xy 197.570755 116.991126) (xy 197.086881 117.475) (xy 197.101023 117.489142) (xy 196.864142 117.726022) + (xy 196.85 117.711881) (xy 196.835858 117.726023) (xy 196.613119 117.503284) (xy 196.598977 117.489142) (xy 196.613119 117.475) + (xy 195.892364 116.754245) (xy 195.657162 116.815394) (xy 195.551399 117.060779) (xy 195.495541 117.322083) (xy 195.491734 117.589263) + (xy 195.540124 117.852052) (xy 195.638852 118.100351) (xy 195.657162 118.134606) (xy 195.892362 118.195754) (xy 195.874117 118.214) (xy 193.04 118.214) (xy 192.932717 118.224519) (xy 192.825513 118.233898) (xy 192.819629 118.235607) (xy 192.813523 118.236206) (xy 192.710355 118.267354) (xy 192.606984 118.297386) (xy 192.601542 118.300206) (xy 192.595672 118.301979) (xy 192.500525 118.352569) (xy 192.404951 118.402111) (xy 192.400163 118.405933) (xy 192.394745 118.408814) (xy 192.311259 118.476903) (xy 192.227105 118.544083) (xy 192.218567 118.552502) (xy 192.218397 118.552641) (xy 192.218266 118.552798) (xy 192.215513 118.555514) (xy 190.017026 120.754) - (xy 189.23 120.754) (xy 189.003523 120.776206) (xy 188.785672 120.841979) (xy 188.691383 120.892113) (xy 188.691383 120.259975) - (xy 188.591555 119.980607) (xy 188.436931 119.742413) (xy 188.238986 119.538789) (xy 188.00526 119.377491) (xy 187.744656 119.264662) - (xy 187.4671 119.2046) (xy 186.8575 119.2046) (xy 186.8575 120.4825) (xy 188.569501 120.4825) (xy 188.691383 120.259975) - (xy 188.691383 120.892113) (xy 188.62864 120.925474) (xy 188.569501 120.8175) (xy 187.0075 120.8175) (xy 186.8575 120.8175) - (xy 186.5225 120.8175) (xy 186.5225 120.4825) (xy 186.5225 119.2046) (xy 185.9129 119.2046) (xy 185.635344 119.264662) - (xy 185.37474 119.377491) (xy 185.141014 119.538789) (xy 184.943069 119.742413) (xy 184.788445 119.980607) (xy 184.688617 120.259975) - (xy 184.810499 120.4825) (xy 186.5225 120.4825) (xy 186.5225 120.8175) (xy 186.3725 120.8175) (xy 184.810499 120.8175) - (xy 184.688617 121.040025) (xy 184.690787 121.0461) (xy 183.020073 121.0461) (xy 181.799487 119.825513) (xy 181.716208 119.757107) - (xy 181.633752 119.687918) (xy 181.62838 119.684964) (xy 181.623641 119.681072) (xy 181.528699 119.630164) (xy 181.434336 119.578288) - (xy 181.428492 119.576434) (xy 181.423089 119.573537) (xy 181.320097 119.542049) (xy 181.217425 119.50948) (xy 181.21133 119.508796) - (xy 181.205468 119.507004) (xy 181.125027 119.498833) (xy 181.125027 110.07192) (xy 181.125027 108.36808) (xy 181.099963 108.241497) - (xy 181.05079 108.122194) (xy 180.97938 108.014713) (xy 180.888454 107.92315) (xy 180.781475 107.850992) (xy 180.662517 107.800987) - (xy 180.536113 107.775039) (xy 180.407075 107.774139) (xy 179.402 107.7746) (xy 179.2375 107.9391) (xy 179.2375 109.0525) - (xy 180.9605 109.0525) (xy 181.125 108.888) (xy 181.125027 108.36808) (xy 181.125027 110.07192) (xy 181.125 109.552) - (xy 180.9605 109.3875) (xy 179.2375 109.3875) (xy 179.2375 110.3146) (xy 179.2375 110.5009) (xy 179.2375 111.5925) - (xy 180.949501 111.5925) (xy 181.071383 111.369975) (xy 180.971555 111.090607) (xy 180.816931 110.852413) (xy 180.618986 110.648789) - (xy 180.618047 110.648141) (xy 180.662517 110.639013) (xy 180.781475 110.589008) (xy 180.888454 110.51685) (xy 180.97938 110.425287) - (xy 181.05079 110.317806) (xy 181.099963 110.198503) (xy 181.125027 110.07192) (xy 181.125027 119.498833) (xy 181.098345 119.496123) - (xy 181.071383 119.493098) (xy 181.071383 117.230025) (xy 181.071383 116.449975) (xy 180.971555 116.170607) (xy 180.816931 115.932413) - (xy 180.618986 115.728789) (xy 180.388895 115.57) (xy 180.618986 115.411211) (xy 180.816931 115.207587) (xy 180.971555 114.969393) - (xy 181.071383 114.690025) (xy 181.071383 113.909975) (xy 180.971555 113.630607) (xy 180.816931 113.392413) (xy 180.618986 113.188789) - (xy 180.388895 113.03) (xy 180.618986 112.871211) (xy 180.816931 112.667587) (xy 180.971555 112.429393) (xy 181.071383 112.150025) - (xy 180.949501 111.9275) (xy 179.2375 111.9275) (xy 179.2375 112.8546) (xy 179.2375 113.2054) (xy 179.2375 114.1325) - (xy 180.949501 114.1325) (xy 181.071383 113.909975) (xy 181.071383 114.690025) (xy 180.949501 114.4675) (xy 179.2375 114.4675) - (xy 179.2375 115.3946) (xy 179.2375 115.7454) (xy 179.2375 116.6725) (xy 180.949501 116.6725) (xy 181.071383 116.449975) - (xy 181.071383 117.230025) (xy 180.949501 117.0075) (xy 179.2375 117.0075) (xy 179.2375 118.2854) (xy 179.8471 118.2854) - (xy 180.124656 118.225338) (xy 180.38526 118.112509) (xy 180.618986 117.951211) (xy 180.816931 117.747587) (xy 180.971555 117.509393) - (xy 181.071383 117.230025) (xy 181.071383 119.493098) (xy 181.006707 119.485844) (xy 180.97938 119.444713) (xy 180.888454 119.35315) - (xy 180.781475 119.280992) (xy 180.662517 119.230987) (xy 180.536113 119.205039) (xy 180.407075 119.204139) (xy 178.9025 119.204372) - (xy 178.9025 118.2854) (xy 178.9025 117.0075) (xy 178.9025 116.6725) (xy 178.9025 115.7454) (xy 178.9025 115.3946) - (xy 178.9025 114.4675) (xy 178.9025 114.1325) (xy 178.9025 113.2054) (xy 178.9025 112.8546) (xy 178.9025 111.9275) - (xy 178.9025 111.5925) (xy 178.9025 110.5009) (xy 178.9025 110.3146) (xy 178.9025 109.3875) (xy 178.9025 109.0525) - (xy 178.9025 107.9391) (xy 178.738 107.7746) (xy 177.732925 107.774139) (xy 177.603887 107.775039) (xy 177.477483 107.800987) - (xy 177.358525 107.850992) (xy 177.324908 107.873666) (xy 177.324908 99.070091) (xy 177.299341 98.789159) (xy 177.219695 98.518544) + (xy 189.23 120.754) (xy 189.003523 120.776206) (xy 188.785672 120.841979) (xy 188.584745 120.948814) (xy 188.465461 121.0461) + (xy 188.435232 121.0461) (xy 188.437384 121.040025) (xy 188.437384 120.259975) (xy 188.340464 119.98625) (xy 188.186092 119.746388) + (xy 187.987892 119.541252) (xy 187.75348 119.378724) (xy 187.491865 119.265051) (xy 187.2131 119.2046) (xy 186.8575 119.2046) + (xy 186.8575 120.4825) (xy 188.315501 120.4825) (xy 188.437384 120.259975) (xy 188.437384 121.040025) (xy 188.315501 120.8175) + (xy 186.8575 120.8175) (xy 186.8575 120.8375) (xy 186.5225 120.8375) (xy 186.5225 120.8175) (xy 186.5225 120.4825) + (xy 186.5225 119.2046) (xy 186.1669 119.2046) (xy 185.888135 119.265051) (xy 185.62652 119.378724) (xy 185.392108 119.541252) + (xy 185.193908 119.746388) (xy 185.039536 119.98625) (xy 184.942616 120.259975) (xy 185.064499 120.4825) (xy 186.5225 120.4825) + (xy 186.5225 120.8175) (xy 185.064499 120.8175) (xy 184.942616 121.040025) (xy 184.944767 121.0461) (xy 183.020073 121.0461) + (xy 181.799487 119.825513) (xy 181.716208 119.757107) (xy 181.633752 119.687918) (xy 181.62838 119.684964) (xy 181.623641 119.681072) + (xy 181.528699 119.630164) (xy 181.434336 119.578288) (xy 181.428492 119.576434) (xy 181.423089 119.573537) (xy 181.320097 119.542049) + (xy 181.217425 119.50948) (xy 181.21133 119.508796) (xy 181.205468 119.507004) (xy 181.098345 119.496123) (xy 180.99128 119.484114) + (xy 180.979286 119.48403) (xy 180.97907 119.484008) (xy 180.978868 119.484027) (xy 180.975 119.484) (xy 180.871 119.484) + (xy 180.871 110.072207) (xy 180.871 109.552) (xy 180.871 108.888) (xy 180.871 108.367793) (xy 180.845713 108.240669) + (xy 180.796112 108.12092) (xy 180.724102 108.01315) (xy 180.632451 107.921498) (xy 180.52468 107.849488) (xy 180.404932 107.799887) + (xy 180.277808 107.7746) (xy 180.148193 107.7746) (xy 179.402 107.7746) (xy 179.2375 107.9391) (xy 179.2375 109.0525) + (xy 180.7065 109.0525) (xy 180.871 108.888) (xy 180.871 109.552) (xy 180.7065 109.3875) (xy 179.2375 109.3875) + (xy 179.2375 110.3146) (xy 179.2375 110.5009) (xy 179.2375 111.5925) (xy 180.695501 111.5925) (xy 180.817384 111.369975) + (xy 180.720464 111.09625) (xy 180.566092 110.856388) (xy 180.367892 110.651252) (xy 180.363665 110.648321) (xy 180.404932 110.640113) + (xy 180.52468 110.590512) (xy 180.632451 110.518502) (xy 180.724102 110.42685) (xy 180.796112 110.31908) (xy 180.845713 110.199331) + (xy 180.871 110.072207) (xy 180.871 119.484) (xy 180.817384 119.484) (xy 180.817384 117.230025) (xy 180.817384 116.449975) + (xy 180.720464 116.17625) (xy 180.566092 115.936388) (xy 180.367892 115.731252) (xy 180.13532 115.57) (xy 180.367892 115.408748) + (xy 180.566092 115.203612) (xy 180.720464 114.96375) (xy 180.817384 114.690025) (xy 180.817384 113.909975) (xy 180.720464 113.63625) + (xy 180.566092 113.396388) (xy 180.367892 113.191252) (xy 180.13532 113.03) (xy 180.367892 112.868748) (xy 180.566092 112.663612) + (xy 180.720464 112.42375) (xy 180.817384 112.150025) (xy 180.695501 111.9275) (xy 179.2375 111.9275) (xy 179.2375 112.8546) + (xy 179.2375 113.2054) (xy 179.2375 114.1325) (xy 180.695501 114.1325) (xy 180.817384 113.909975) (xy 180.817384 114.690025) + (xy 180.695501 114.4675) (xy 179.2375 114.4675) (xy 179.2375 115.3946) (xy 179.2375 115.7454) (xy 179.2375 116.6725) + (xy 180.695501 116.6725) (xy 180.817384 116.449975) (xy 180.817384 117.230025) (xy 180.695501 117.0075) (xy 179.2375 117.0075) + (xy 179.2375 118.2854) (xy 179.5931 118.2854) (xy 179.871865 118.224949) (xy 180.13348 118.111276) (xy 180.367892 117.948748) + (xy 180.566092 117.743612) (xy 180.720464 117.50375) (xy 180.817384 117.230025) (xy 180.817384 119.484) (xy 180.751397 119.484) + (xy 180.724102 119.44315) (xy 180.632451 119.351498) (xy 180.52468 119.279488) (xy 180.404932 119.229887) (xy 180.277808 119.2046) + (xy 180.148193 119.2046) (xy 178.9025 119.2046) (xy 178.9025 118.2854) (xy 178.9025 117.0075) (xy 178.9025 116.6725) + (xy 178.9025 115.7454) (xy 178.9025 115.3946) (xy 178.9025 114.4675) (xy 178.9025 114.1325) (xy 178.9025 113.2054) + (xy 178.9025 112.8546) (xy 178.9025 111.9275) (xy 178.9025 111.5925) (xy 178.9025 110.5009) (xy 178.9025 110.3146) + (xy 178.9025 109.3875) (xy 178.9025 109.0525) (xy 178.9025 107.9391) (xy 178.738 107.7746) (xy 177.991807 107.7746) + (xy 177.862192 107.7746) (xy 177.735068 107.799887) (xy 177.61532 107.849488) (xy 177.507549 107.921498) (xy 177.415898 108.01315) + (xy 177.343888 108.12092) (xy 177.324908 108.166742) (xy 177.324908 99.070091) (xy 177.299341 98.789159) (xy 177.219695 98.518544) (xy 177.089002 98.268552) (xy 176.912242 98.048707) (xy 176.696146 97.867381) (xy 176.555251 97.789923) (xy 176.679415 97.723904) (xy 176.898021 97.545614) (xy 177.077834 97.328257) (xy 177.212004 97.080115) (xy 177.295421 96.810638) (xy 177.324908 96.530091) (xy 177.299341 96.249159) (xy 177.219695 95.978544) (xy 177.089002 95.728552) (xy 176.912242 95.508707) (xy 176.696146 95.327381) @@ -3045,10 +3055,10 @@ (xy 177.299341 83.549159) (xy 177.219695 83.278544) (xy 177.089002 83.028552) (xy 176.912242 82.808707) (xy 176.696146 82.627381) (xy 176.555251 82.549923) (xy 176.679415 82.483904) (xy 176.898021 82.305614) (xy 177.077834 82.088257) (xy 177.212004 81.840115) (xy 177.295421 81.570638) (xy 177.324908 81.290091) (xy 177.299341 81.009159) (xy 177.219695 80.738544) (xy 177.089002 80.488552) - (xy 176.912242 80.268707) (xy 176.696146 80.087381) (xy 176.566697 80.016216) (xy 176.57526 80.012509) (xy 176.808986 79.851211) - (xy 177.006931 79.647587) (xy 177.161555 79.409393) (xy 177.261383 79.130025) (xy 177.139501 78.9075) (xy 175.5775 78.9075) - (xy 175.4275 78.9075) (xy 175.0925 78.9075) (xy 174.9425 78.9075) (xy 173.380499 78.9075) (xy 173.258617 79.130025) - (xy 173.358445 79.409393) (xy 173.513069 79.647587) (xy 173.711014 79.851211) (xy 173.94474 80.012509) (xy 173.953247 80.016192) + (xy 176.912242 80.268707) (xy 176.696146 80.087381) (xy 176.566438 80.016073) (xy 176.57748 80.011276) (xy 176.811892 79.848748) + (xy 177.010092 79.643612) (xy 177.164464 79.40375) (xy 177.261384 79.130025) (xy 177.139501 78.9075) (xy 175.4275 78.9075) + (xy 175.4275 78.9275) (xy 175.0925 78.9275) (xy 175.0925 78.9075) (xy 173.380499 78.9075) (xy 173.258616 79.130025) + (xy 173.355536 79.40375) (xy 173.509908 79.643612) (xy 173.708108 79.848748) (xy 173.94252 80.011276) (xy 173.953511 80.016051) (xy 173.840585 80.076096) (xy 173.621979 80.254386) (xy 173.442166 80.471743) (xy 173.307996 80.719885) (xy 173.224579 80.989362) (xy 173.195092 81.269909) (xy 173.220659 81.550841) (xy 173.300305 81.821456) (xy 173.430998 82.071448) (xy 173.607758 82.291293) (xy 173.823854 82.472619) (xy 173.964748 82.550076) (xy 173.840585 82.616096) (xy 173.621979 82.794386) (xy 173.442166 83.011743) @@ -3070,316 +3080,276 @@ (xy 173.220659 99.330841) (xy 173.300305 99.601456) (xy 173.430998 99.851448) (xy 173.607758 100.071293) (xy 173.823854 100.252619) (xy 174.071053 100.388518) (xy 174.339941 100.473815) (xy 174.620276 100.505259) (xy 174.640457 100.5054) (xy 175.879543 100.5054) (xy 176.160289 100.477873) (xy 176.430342 100.396339) (xy 176.679415 100.263904) (xy 176.898021 100.085614) (xy 177.077834 99.868257) - (xy 177.212004 99.620115) (xy 177.295421 99.350638) (xy 177.324908 99.070091) (xy 177.324908 107.873666) (xy 177.251546 107.92315) - (xy 177.16062 108.014713) (xy 177.08921 108.122194) (xy 177.040037 108.241497) (xy 177.014973 108.36808) (xy 177.015 108.888) - (xy 177.1795 109.0525) (xy 178.9025 109.0525) (xy 178.9025 109.3875) (xy 177.1795 109.3875) (xy 177.015 109.552) - (xy 177.014973 110.07192) (xy 177.040037 110.198503) (xy 177.08921 110.317806) (xy 177.16062 110.425287) (xy 177.251546 110.51685) - (xy 177.358525 110.589008) (xy 177.477483 110.639013) (xy 177.521952 110.648141) (xy 177.521014 110.648789) (xy 177.323069 110.852413) - (xy 177.168445 111.090607) (xy 177.068617 111.369975) (xy 177.190499 111.5925) (xy 178.9025 111.5925) (xy 178.9025 111.9275) - (xy 177.190499 111.9275) (xy 177.068617 112.150025) (xy 177.168445 112.429393) (xy 177.323069 112.667587) (xy 177.521014 112.871211) - (xy 177.751104 113.03) (xy 177.521014 113.188789) (xy 177.323069 113.392413) (xy 177.168445 113.630607) (xy 177.068617 113.909975) - (xy 177.190499 114.1325) (xy 178.9025 114.1325) (xy 178.9025 114.4675) (xy 177.190499 114.4675) (xy 177.068617 114.690025) - (xy 177.168445 114.969393) (xy 177.323069 115.207587) (xy 177.521014 115.411211) (xy 177.751104 115.57) (xy 177.521014 115.728789) - (xy 177.323069 115.932413) (xy 177.168445 116.170607) (xy 177.068617 116.449975) (xy 177.190499 116.6725) (xy 178.9025 116.6725) - (xy 178.9025 117.0075) (xy 177.190499 117.0075) (xy 177.068617 117.230025) (xy 177.168445 117.509393) (xy 177.323069 117.747587) - (xy 177.521014 117.951211) (xy 177.75474 118.112509) (xy 178.015344 118.225338) (xy 178.2929 118.2854) (xy 178.9025 118.2854) - (xy 178.9025 119.204372) (xy 177.60848 119.204573) (xy 177.481897 119.229637) (xy 177.362594 119.27881) (xy 177.255113 119.35022) - (xy 177.16355 119.441146) (xy 177.134644 119.484) (xy 166.852973 119.484) (xy 149.352919 101.983945) (xy 149.32097 101.822589) - (xy 149.214851 101.565125) (xy 149.060745 101.333176) (xy 148.864521 101.135578) (xy 148.633654 100.979856) (xy 148.486 100.917787) - (xy 148.486 99.870622) (xy 148.560656 99.764791) (xy 148.673923 99.51039) (xy 148.735619 99.238834) (xy 148.74006 98.920762) - (xy 148.68597 98.647589) (xy 148.579851 98.390125) (xy 148.425745 98.158176) (xy 148.229521 97.960578) (xy 148.187131 97.931985) - (xy 148.273103 97.914963) (xy 148.317634 97.896608) (xy 157.925513 107.504486) (xy 158.008756 107.572863) (xy 158.091248 107.642082) - (xy 158.09662 107.645035) (xy 158.101358 107.648927) (xy 158.196282 107.699825) (xy 158.290664 107.751712) (xy 158.296507 107.753565) - (xy 158.301911 107.756463) (xy 158.404914 107.787954) (xy 158.507575 107.82052) (xy 158.513667 107.821203) (xy 158.519531 107.822996) - (xy 158.626664 107.833877) (xy 158.73372 107.845886) (xy 158.745712 107.845969) (xy 158.745929 107.845992) (xy 158.74613 107.845972) - (xy 158.75 107.846) (xy 165.735 107.846) (xy 165.842188 107.83549) (xy 165.949487 107.826103) (xy 165.955375 107.824392) - (xy 165.961477 107.823794) (xy 166.064616 107.792654) (xy 166.168015 107.762614) (xy 166.173455 107.759794) (xy 166.179328 107.758021) - (xy 166.274453 107.707441) (xy 166.370049 107.65789) (xy 166.37484 107.654064) (xy 166.380255 107.651186) (xy 166.463707 107.583123) - (xy 166.547894 107.515918) (xy 166.556436 107.507494) (xy 166.556603 107.507359) (xy 166.55673 107.507205) (xy 166.559487 107.504487) - (xy 168.122973 105.941) (xy 169.258165 105.941) (xy 169.452758 106.076246) (xy 169.719355 106.192719) (xy 170.003498 106.255192) - (xy 170.294363 106.261285) (xy 170.580873 106.210765) (xy 170.852113 106.105558) (xy 171.097753 105.94967) (xy 171.308436 105.74904) - (xy 171.476137 105.511308) (xy 171.594469 105.245531) (xy 171.658924 104.961831) (xy 171.663564 104.629535) (xy 171.607055 104.344147) - (xy 171.496191 104.075169) (xy 171.335193 103.832848) (xy 171.130194 103.626413) (xy 170.889003 103.463727) (xy 170.620805 103.350988) - (xy 170.335818 103.292488) (xy 170.044896 103.290457) (xy 169.75912 103.344972) (xy 169.489375 103.453956) (xy 169.252441 103.609) - (xy 167.64 103.609) (xy 167.532717 103.619519) (xy 167.425513 103.628898) (xy 167.419629 103.630607) (xy 167.413523 103.631206) - (xy 167.310355 103.662354) (xy 167.206984 103.692386) (xy 167.201542 103.695206) (xy 167.195672 103.696979) (xy 167.100546 103.747558) - (xy 167.00495 103.797111) (xy 167.00016 103.800934) (xy 166.994745 103.803814) (xy 166.911281 103.871885) (xy 166.827105 103.939083) - (xy 166.818567 103.947502) (xy 166.818397 103.947641) (xy 166.818266 103.947798) (xy 166.815513 103.950514) (xy 165.252026 105.514) - (xy 159.53506 105.514) (xy 159.53506 102.095762) (xy 159.48097 101.822589) (xy 159.374851 101.565125) (xy 159.220745 101.333176) - (xy 159.024521 101.135578) (xy 158.793654 100.979856) (xy 158.536937 100.871942) (xy 158.264149 100.815947) (xy 158.074185 100.81462) - (xy 157.632776 100.373211) (xy 157.632776 68.471984) (xy 157.63006 68.456488) (xy 157.63006 58.280762) (xy 157.57597 58.007589) - (xy 157.469851 57.750125) (xy 157.315745 57.518176) (xy 157.119521 57.320578) (xy 156.888654 57.164856) (xy 156.631937 57.056942) - (xy 156.359149 57.000947) (xy 156.080679 56.999002) (xy 155.807135 57.051184) (xy 155.548937 57.155503) (xy 155.315918 57.307986) - (xy 155.116954 57.502826) (xy 154.959624 57.7326) (xy 154.849921 57.988557) (xy 154.792022 58.260948) (xy 154.788134 58.539397) - (xy 154.838405 58.813299) (xy 154.940918 59.072219) (xy 155.091771 59.306297) (xy 155.2345 59.454097) (xy 155.2345 61.190934) - (xy 151.710217 64.715217) (xy 151.652995 64.78488) (xy 151.595102 64.853875) (xy 151.592632 64.858367) (xy 151.589374 64.862334) - (xy 151.546775 64.941779) (xy 151.503383 65.02071) (xy 151.501832 65.025599) (xy 151.499408 65.03012) (xy 151.473068 65.116273) - (xy 151.445817 65.202182) (xy 151.445244 65.207282) (xy 151.443746 65.212185) (xy 151.434643 65.301799) (xy 151.424595 65.39138) - (xy 151.424525 65.401407) (xy 151.424506 65.401595) (xy 151.424522 65.401769) (xy 151.4245 65.405) (xy 151.4245 66.224934) - (xy 149.914783 64.715217) (xy 149.845119 64.657995) (xy 149.776125 64.600102) (xy 149.771632 64.597632) (xy 149.767666 64.594374) - (xy 149.68822 64.551775) (xy 149.60929 64.508383) (xy 149.6044 64.506832) (xy 149.59988 64.504408) (xy 149.513726 64.478068) - (xy 149.427818 64.450817) (xy 149.422717 64.450244) (xy 149.417815 64.448746) (xy 149.3282 64.439643) (xy 149.23862 64.429595) - (xy 149.228592 64.429525) (xy 149.228405 64.429506) (xy 149.22823 64.429522) (xy 149.225 64.4295) (xy 148.870479 64.4295) - (xy 148.95227 64.405738) (xy 148.956823 64.403377) (xy 148.961734 64.401895) (xy 149.041307 64.359585) (xy 149.121295 64.318123) - (xy 149.125302 64.314924) (xy 149.129833 64.312515) (xy 149.199672 64.255555) (xy 149.270085 64.199346) (xy 149.277226 64.192303) - (xy 149.277371 64.192186) (xy 149.277481 64.192052) (xy 149.279783 64.189783) (xy 150.549783 62.919783) (xy 150.607004 62.850119) - (xy 150.664898 62.781125) (xy 150.667367 62.776632) (xy 150.670626 62.772666) (xy 150.713234 62.693201) (xy 150.756617 62.61429) - (xy 150.758167 62.609403) (xy 150.760592 62.604881) (xy 150.786935 62.518712) (xy 150.814183 62.432818) (xy 150.814755 62.427717) - (xy 150.816254 62.422815) (xy 150.825356 62.3332) (xy 150.835405 62.24362) (xy 150.835474 62.233592) (xy 150.835494 62.233405) - (xy 150.835477 62.23323) (xy 150.8355 62.23) (xy 150.8355 59.69) (xy 150.826702 59.60027) (xy 150.818853 59.510555) - (xy 150.817422 59.505632) (xy 150.816922 59.500524) (xy 150.790869 59.414232) (xy 150.765738 59.32773) (xy 150.763377 59.323175) - (xy 150.761895 59.318266) (xy 150.719596 59.238713) (xy 150.678123 59.158704) (xy 150.674922 59.154694) (xy 150.672515 59.150167) - (xy 150.615573 59.080349) (xy 150.559346 59.009915) (xy 150.552307 59.002777) (xy 150.552186 59.002629) (xy 150.552048 59.002515) - (xy 150.549782 59.000217) (xy 150.2005 58.650934) (xy 150.2005 55.641987) (xy 150.305134 55.542346) (xy 150.465656 55.314791) - (xy 150.578923 55.06039) (xy 150.640619 54.788834) (xy 150.64506 54.470762) (xy 150.59097 54.197589) (xy 150.484851 53.940125) - (xy 150.330745 53.708176) (xy 150.2005 53.577018) (xy 150.2005 50.165) (xy 150.191701 50.075266) (xy 150.183853 49.985555) - (xy 150.182422 49.980632) (xy 150.181922 49.975524) (xy 150.155869 49.889232) (xy 150.130738 49.80273) (xy 150.128377 49.798175) - (xy 150.126895 49.793266) (xy 150.084596 49.713713) (xy 150.043123 49.633704) (xy 150.039922 49.629694) (xy 150.037515 49.625167) - (xy 149.980573 49.555349) (xy 149.924346 49.484915) (xy 149.917307 49.477777) (xy 149.917186 49.477629) (xy 149.917048 49.477515) - (xy 149.914782 49.475217) (xy 149.533783 49.094217) (xy 149.464119 49.036995) (xy 149.395125 48.979102) (xy 149.390632 48.976632) - (xy 149.386666 48.973374) (xy 149.30722 48.930775) (xy 149.22829 48.887383) (xy 149.2234 48.885832) (xy 149.21888 48.883408) - (xy 149.132726 48.857068) (xy 149.046818 48.829817) (xy 149.046185 48.829746) (xy 148.950849 48.733742) (xy 148.730306 48.584984) - (xy 148.485069 48.481895) (xy 148.224479 48.428404) (xy 147.958462 48.426547) (xy 147.697151 48.476395) (xy 147.450498 48.576049) - (xy 147.2279 48.721713) (xy 147.139275 48.8085) (xy 146.485086 48.8085) (xy 146.410849 48.733742) (xy 146.190306 48.584984) - (xy 145.945069 48.481895) (xy 145.684479 48.428404) (xy 145.418462 48.426547) (xy 145.157151 48.476395) (xy 144.910498 48.576049) - (xy 144.6879 48.721713) (xy 144.497833 48.90784) (xy 144.347539 49.127339) (xy 144.27162 49.304469) (xy 144.205513 49.144081) - (xy 144.058298 48.922504) (xy 143.870849 48.733742) (xy 143.650306 48.584984) (xy 143.405069 48.481895) (xy 143.144479 48.428404) - (xy 142.878462 48.426547) (xy 142.617151 48.476395) (xy 142.370498 48.576049) (xy 142.1479 48.721713) (xy 142.059275 48.8085) - (xy 140.462 48.8085) (xy 140.372266 48.817298) (xy 140.282555 48.825147) (xy 140.277632 48.826577) (xy 140.272524 48.827078) - (xy 140.186232 48.85313) (xy 140.09973 48.878262) (xy 140.095175 48.880622) (xy 140.090266 48.882105) (xy 140.010713 48.924403) - (xy 139.930704 48.965877) (xy 139.926694 48.969077) (xy 139.922167 48.971485) (xy 139.852349 49.028426) (xy 139.781915 49.084654) - (xy 139.774777 49.091692) (xy 139.774629 49.091814) (xy 139.774515 49.091951) (xy 139.772217 49.094218) (xy 138.375217 50.491217) - (xy 138.317995 50.56088) (xy 138.260102 50.629875) (xy 138.257632 50.634367) (xy 138.254374 50.638334) (xy 138.211775 50.717779) - (xy 138.168383 50.79671) (xy 138.166832 50.801599) (xy 138.164408 50.80612) (xy 138.138068 50.892273) (xy 138.110817 50.978182) - (xy 138.110244 50.983282) (xy 138.108746 50.988185) (xy 138.099643 51.077799) (xy 138.089595 51.16738) (xy 138.089525 51.177407) - (xy 138.089506 51.177595) (xy 138.089522 51.177769) (xy 138.0895 51.181) (xy 138.0895 53.577716) (xy 137.971954 53.692826) - (xy 137.814624 53.9226) (xy 137.704921 54.178557) (xy 137.647022 54.450948) (xy 137.644225 54.651208) (xy 136.692579 55.602854) - (xy 136.20648 55.602973) (xy 136.079897 55.628037) (xy 135.97856 55.669804) (xy 135.97856 49.419293) (xy 135.931183 49.157522) - (xy 135.833864 48.909939) (xy 135.812838 48.870395) (xy 135.577635 48.809245) (xy 135.340755 49.046125) (xy 135.340755 48.572365) - (xy 135.279605 48.337162) (xy 135.035353 48.231762) (xy 134.77528 48.175811) (xy 134.509293 48.17144) (xy 134.247522 48.218817) - (xy 133.999939 48.316136) (xy 133.960395 48.337162) (xy 133.899245 48.572365) (xy 134.62 49.293119) (xy 135.340755 48.572365) - (xy 135.340755 49.046125) (xy 134.856881 49.53) (xy 135.577635 50.250755) (xy 135.812838 50.189605) (xy 135.918238 49.945353) - (xy 135.974189 49.68528) (xy 135.97856 49.419293) (xy 135.97856 55.669804) (xy 135.960594 55.67721) (xy 135.853113 55.74862) - (xy 135.76155 55.839546) (xy 135.689392 55.946525) (xy 135.639387 56.065483) (xy 135.613439 56.191887) (xy 135.612539 56.320925) - (xy 135.612627 56.682807) (xy 135.340755 56.954679) (xy 135.340755 50.487635) (xy 134.62 49.766881) (xy 134.383119 50.003761) - (xy 134.383119 49.53) (xy 133.662365 48.809245) (xy 133.427162 48.870395) (xy 133.349271 49.050897) (xy 133.293864 48.909939) - (xy 133.272838 48.870395) (xy 133.037635 48.809245) (xy 132.800755 49.046125) (xy 132.800755 48.572365) (xy 132.739605 48.337162) - (xy 132.495353 48.231762) (xy 132.23528 48.175811) (xy 131.969293 48.17144) (xy 131.707522 48.218817) (xy 131.459939 48.316136) - (xy 131.420395 48.337162) (xy 131.359245 48.572365) (xy 132.08 49.293119) (xy 132.800755 48.572365) (xy 132.800755 49.046125) - (xy 132.316881 49.53) (xy 133.037635 50.250755) (xy 133.272838 50.189605) (xy 133.350728 50.009102) (xy 133.406136 50.150061) - (xy 133.427162 50.189605) (xy 133.662365 50.250755) (xy 134.383119 49.53) (xy 134.383119 50.003761) (xy 133.899245 50.487635) - (xy 133.960395 50.722838) (xy 134.204647 50.828238) (xy 134.46472 50.884189) (xy 134.730707 50.88856) (xy 134.992478 50.841183) - (xy 135.240061 50.743864) (xy 135.279605 50.722838) (xy 135.340755 50.487635) (xy 135.340755 56.954679) (xy 133.295217 59.000217) - (xy 133.237995 59.06988) (xy 133.180102 59.138875) (xy 133.177632 59.143367) (xy 133.174374 59.147334) (xy 133.131775 59.226779) - (xy 133.088383 59.30571) (xy 133.086832 59.310599) (xy 133.084408 59.31512) (xy 133.058068 59.401273) (xy 133.030817 59.487182) - (xy 133.030244 59.492282) (xy 133.028746 59.497185) (xy 133.019643 59.586799) (xy 133.009595 59.67638) (xy 133.009525 59.686407) - (xy 133.009506 59.686595) (xy 133.009522 59.686769) (xy 133.0095 59.69) (xy 133.0095 60.687325) (xy 132.904897 60.708037) - (xy 132.800755 60.750961) (xy 132.800755 50.487635) (xy 132.08 49.766881) (xy 131.843119 50.003761) (xy 131.843119 49.53) - (xy 131.122365 48.809245) (xy 130.887162 48.870395) (xy 130.80954 49.050274) (xy 130.743513 48.890081) (xy 130.596298 48.668504) - (xy 130.408849 48.479742) (xy 130.188306 48.330984) (xy 129.943069 48.227895) (xy 129.682479 48.174404) (xy 129.563136 48.17357) - (xy 128.959783 47.570217) (xy 128.890119 47.512995) (xy 128.821125 47.455102) (xy 128.816632 47.452632) (xy 128.812666 47.449374) - (xy 128.73322 47.406775) (xy 128.65429 47.363383) (xy 128.6494 47.361832) (xy 128.64488 47.359408) (xy 128.558726 47.333068) - (xy 128.472818 47.305817) (xy 128.467717 47.305244) (xy 128.462815 47.303746) (xy 128.3732 47.294643) (xy 128.28362 47.284595) - (xy 128.273592 47.284525) (xy 128.273405 47.284506) (xy 128.27323 47.284522) (xy 128.27 47.2845) (xy 125.492581 47.2845) - (xy 125.369521 47.160578) (xy 125.138654 47.004856) (xy 124.881937 46.896942) (xy 124.609149 46.840947) (xy 124.330679 46.839002) - (xy 124.057135 46.891184) (xy 123.798937 46.995503) (xy 123.565918 47.147986) (xy 123.366954 47.342826) (xy 123.209624 47.5726) - (xy 123.099921 47.828557) (xy 123.042022 48.100948) (xy 123.038134 48.379397) (xy 123.088405 48.653299) (xy 123.190918 48.912219) - (xy 123.341771 49.146297) (xy 123.535217 49.346616) (xy 123.763888 49.505546) (xy 124.019073 49.617034) (xy 124.291053 49.676833) - (xy 124.569468 49.682665) (xy 124.843714 49.634308) (xy 125.103344 49.533604) (xy 125.338469 49.384389) (xy 125.494817 49.2355) - (xy 127.865934 49.2355) (xy 128.182994 49.55256) (xy 128.181717 49.644058) (xy 128.22974 49.905711) (xy 128.327669 50.153053) - (xy 128.471776 50.376664) (xy 128.656572 50.568025) (xy 128.875017 50.719848) (xy 129.11879 50.82635) (xy 129.378608 50.883475) - (xy 129.644573 50.889046) (xy 129.906555 50.842851) (xy 130.154574 50.746651) (xy 130.379185 50.604108) (xy 130.571832 50.420653) - (xy 130.725176 50.203274) (xy 130.811149 50.010174) (xy 130.866136 50.150061) (xy 130.887162 50.189605) (xy 131.122365 50.250755) - (xy 131.843119 49.53) (xy 131.843119 50.003761) (xy 131.359245 50.487635) (xy 131.420395 50.722838) (xy 131.664647 50.828238) - (xy 131.92472 50.884189) (xy 132.190707 50.88856) (xy 132.452478 50.841183) (xy 132.700061 50.743864) (xy 132.739605 50.722838) - (xy 132.800755 50.487635) (xy 132.800755 60.750961) (xy 132.785594 60.75721) (xy 132.678113 60.82862) (xy 132.58655 60.919546) - (xy 132.514392 61.026525) (xy 132.464387 61.145483) (xy 132.438439 61.271887) (xy 132.437539 61.400925) (xy 132.437973 63.18352) - (xy 132.463037 63.310103) (xy 132.51221 63.429406) (xy 132.58362 63.536887) (xy 132.674546 63.62845) (xy 132.781525 63.700608) - (xy 132.900483 63.750613) (xy 133.0095 63.772991) (xy 133.0095 68.175934) (xy 127.580217 73.605217) (xy 127.522995 73.67488) - (xy 127.465102 73.743875) (xy 127.462632 73.748367) (xy 127.459374 73.752334) (xy 127.416775 73.831779) (xy 127.373383 73.91071) - (xy 127.371832 73.915599) (xy 127.369408 73.92012) (xy 127.343068 74.006273) (xy 127.340961 74.012915) (xy 127.340961 63.122575) - (xy 127.340527 61.21298) (xy 127.315463 61.086397) (xy 127.26629 60.967094) (xy 127.19488 60.859613) (xy 127.103954 60.76805) - (xy 126.996975 60.695892) (xy 126.878017 60.645887) (xy 126.751613 60.619939) (xy 126.622575 60.619039) (xy 125.49886 60.619294) - (xy 125.4355 60.555934) (xy 125.4355 58.357368) (xy 125.636737 58.165733) (xy 125.811617 57.917825) (xy 125.935014 57.640672) - (xy 126.002227 57.344829) (xy 126.007066 56.998309) (xy 125.948139 56.700704) (xy 125.832529 56.420213) (xy 125.66464 56.16752) - (xy 125.450866 55.952249) (xy 125.199351 55.782599) (xy 124.919674 55.665034) (xy 124.622488 55.604031) (xy 124.319113 55.601913) - (xy 124.021104 55.658761) (xy 123.739813 55.77241) (xy 123.485954 55.938531) (xy 123.269195 56.150796) (xy 123.252964 56.1745) - (xy 120.73856 56.1745) (xy 120.73856 51.959293) (xy 120.691183 51.697522) (xy 120.593864 51.449939) (xy 120.572838 51.410395) - (xy 120.337635 51.349245) (xy 120.100755 51.586125) (xy 120.100755 51.112365) (xy 120.039605 50.877162) (xy 119.795353 50.771762) - (xy 119.53528 50.715811) (xy 119.269293 50.71144) (xy 119.007522 50.758817) (xy 118.759939 50.856136) (xy 118.720395 50.877162) - (xy 118.659245 51.112365) (xy 119.38 51.833119) (xy 120.100755 51.112365) (xy 120.100755 51.586125) (xy 119.616881 52.07) - (xy 120.337635 52.790755) (xy 120.572838 52.729605) (xy 120.678238 52.485353) (xy 120.734189 52.22528) (xy 120.73856 51.959293) - (xy 120.73856 56.1745) (xy 120.100755 56.1745) (xy 120.100755 53.027635) (xy 119.38 52.306881) (xy 119.143119 52.543761) - (xy 119.143119 52.07) (xy 118.422365 51.349245) (xy 118.187162 51.410395) (xy 118.109271 51.590897) (xy 118.053864 51.449939) - (xy 118.032838 51.410395) (xy 117.797635 51.349245) (xy 117.560755 51.586125) (xy 117.560755 51.112365) (xy 117.499605 50.877162) - (xy 117.255353 50.771762) (xy 116.99528 50.715811) (xy 116.729293 50.71144) (xy 116.467522 50.758817) (xy 116.219939 50.856136) - (xy 116.180395 50.877162) (xy 116.119245 51.112365) (xy 116.84 51.833119) (xy 117.560755 51.112365) (xy 117.560755 51.586125) - (xy 117.076881 52.07) (xy 117.797635 52.790755) (xy 118.032838 52.729605) (xy 118.110728 52.549102) (xy 118.166136 52.690061) - (xy 118.187162 52.729605) (xy 118.422365 52.790755) (xy 119.143119 52.07) (xy 119.143119 52.543761) (xy 118.659245 53.027635) - (xy 118.720395 53.262838) (xy 118.964647 53.368238) (xy 119.22472 53.424189) (xy 119.490707 53.42856) (xy 119.752478 53.381183) - (xy 120.000061 53.283864) (xy 120.039605 53.262838) (xy 120.100755 53.027635) (xy 120.100755 56.1745) (xy 119.535791 56.1745) - (xy 119.507013 56.138707) (xy 119.290917 55.957381) (xy 119.043718 55.821482) (xy 118.77483 55.736185) (xy 118.494495 55.704741) - (xy 118.474314 55.7046) (xy 117.745686 55.7046) (xy 117.560755 55.722732) (xy 117.560755 53.027635) (xy 116.84 52.306881) - (xy 116.119245 53.027635) (xy 116.180395 53.262838) (xy 116.424647 53.368238) (xy 116.68472 53.424189) (xy 116.950707 53.42856) - (xy 117.212478 53.381183) (xy 117.460061 53.283864) (xy 117.499605 53.262838) (xy 117.560755 53.027635) (xy 117.560755 55.722732) - (xy 117.46494 55.732127) (xy 117.194887 55.813661) (xy 116.945814 55.946096) (xy 116.727208 56.124386) (xy 116.547395 56.341743) - (xy 116.413225 56.589885) (xy 116.329808 56.859362) (xy 116.300321 57.139909) (xy 116.325888 57.420841) (xy 116.405534 57.691456) - (xy 116.536227 57.941448) (xy 116.712987 58.161293) (xy 116.929083 58.342619) (xy 117.057989 58.413486) (xy 117.04874 58.417491) - (xy 116.815014 58.578789) (xy 116.617069 58.782413) (xy 116.462445 59.020607) (xy 116.362617 59.299975) (xy 116.484499 59.5225) - (xy 117.7925 59.5225) (xy 117.9425 59.5225) (xy 118.2775 59.5225) (xy 118.4275 59.5225) (xy 119.735501 59.5225) - (xy 119.857383 59.299975) (xy 119.757555 59.020607) (xy 119.602931 58.782413) (xy 119.404986 58.578789) (xy 119.17126 58.417491) - (xy 119.162075 58.413514) (xy 119.274186 58.353904) (xy 119.492792 58.175614) (xy 119.534249 58.1255) (xy 123.251354 58.1255) - (xy 123.452507 58.3338) (xy 123.4845 58.356035) (xy 123.4845 60.96) (xy 123.493293 61.049688) (xy 123.501147 61.139445) - (xy 123.502577 61.144367) (xy 123.503078 61.149476) (xy 123.52913 61.235767) (xy 123.554262 61.32227) (xy 123.556622 61.326823) - (xy 123.558105 61.331734) (xy 123.600414 61.411307) (xy 123.641877 61.491295) (xy 123.645075 61.495302) (xy 123.647485 61.499833) - (xy 123.704444 61.569672) (xy 123.760654 61.640085) (xy 123.767696 61.647226) (xy 123.767814 61.647371) (xy 123.767947 61.647481) - (xy 123.770217 61.649783) (xy 124.119189 61.998755) (xy 124.119473 63.24702) (xy 124.144537 63.373603) (xy 124.19371 63.492906) - (xy 124.26512 63.600387) (xy 124.356046 63.69195) (xy 124.463025 63.764108) (xy 124.581983 63.814113) (xy 124.708387 63.840061) - (xy 124.837425 63.840961) (xy 126.74702 63.840527) (xy 126.873603 63.815463) (xy 126.992906 63.76629) (xy 127.100387 63.69488) - (xy 127.19195 63.603954) (xy 127.264108 63.496975) (xy 127.314113 63.378017) (xy 127.340061 63.251613) (xy 127.340961 63.122575) - (xy 127.340961 74.012915) (xy 127.315817 74.092182) (xy 127.315244 74.097282) (xy 127.313746 74.102185) (xy 127.304643 74.191799) - (xy 127.294595 74.28138) (xy 127.294525 74.291407) (xy 127.294506 74.291595) (xy 127.294522 74.291769) (xy 127.2945 74.295) - (xy 127.2945 74.532716) (xy 127.176954 74.647826) (xy 127.019624 74.8776) (xy 126.909921 75.133557) (xy 126.852022 75.405948) - (xy 126.848134 75.684397) (xy 126.898405 75.958299) (xy 127.000918 76.217219) (xy 127.151771 76.451297) (xy 127.345217 76.651616) - (xy 127.573888 76.810546) (xy 127.829073 76.922034) (xy 128.101053 76.981833) (xy 128.379468 76.987665) (xy 128.653714 76.939308) - (xy 128.913344 76.838604) (xy 129.148469 76.689389) (xy 129.350134 76.497346) (xy 129.510656 76.269791) (xy 129.623923 76.01539) - (xy 129.685619 75.743834) (xy 129.69006 75.425762) (xy 129.63597 75.152589) (xy 129.529851 74.895125) (xy 129.375745 74.663176) - (xy 129.328732 74.615833) (xy 134.674782 69.269783) (xy 134.731975 69.200154) (xy 134.789898 69.131125) (xy 134.792368 69.126632) - (xy 134.795625 69.122667) (xy 134.838205 69.043254) (xy 134.881617 68.96429) (xy 134.883168 68.959398) (xy 134.885591 68.954881) - (xy 134.911925 68.868745) (xy 134.939183 68.782818) (xy 134.939754 68.777719) (xy 134.941254 68.772816) (xy 134.950357 68.683195) - (xy 134.960405 68.59362) (xy 134.960474 68.583592) (xy 134.960494 68.583405) (xy 134.960477 68.58323) (xy 134.9605 68.58) - (xy 134.9605 63.772674) (xy 135.065103 63.751963) (xy 135.184406 63.70279) (xy 135.291887 63.63138) (xy 135.38345 63.540454) - (xy 135.455608 63.433475) (xy 135.505613 63.314517) (xy 135.531561 63.188113) (xy 135.532461 63.059075) (xy 135.532027 61.27648) - (xy 135.506963 61.149897) (xy 135.45779 61.030594) (xy 135.38638 60.923113) (xy 135.295454 60.83155) (xy 135.188475 60.759392) - (xy 135.069517 60.709387) (xy 134.9605 60.687008) (xy 134.9605 60.094065) (xy 136.35711 58.697454) (xy 138.11352 58.697027) - (xy 138.240103 58.671963) (xy 138.359406 58.62279) (xy 138.466887 58.55138) (xy 138.55845 58.460454) (xy 138.630608 58.353475) - (xy 138.680613 58.234517) (xy 138.702991 58.1255) (xy 143.105934 58.1255) (xy 144.594753 59.614318) (xy 144.395151 59.652395) - (xy 144.148498 59.752049) (xy 143.9259 59.897713) (xy 143.837275 59.9845) (xy 140.097581 59.9845) (xy 139.974521 59.860578) - (xy 139.743654 59.704856) (xy 139.486937 59.596942) (xy 139.214149 59.540947) (xy 138.935679 59.539002) (xy 138.662135 59.591184) - (xy 138.403937 59.695503) (xy 138.170918 59.847986) (xy 137.971954 60.042826) (xy 137.814624 60.2726) (xy 137.704921 60.528557) - (xy 137.647022 60.800948) (xy 137.643134 61.079397) (xy 137.693405 61.353299) (xy 137.795918 61.612219) (xy 137.946771 61.846297) - (xy 138.140217 62.046616) (xy 138.368888 62.205546) (xy 138.624073 62.317034) (xy 138.896053 62.376833) (xy 139.174468 62.382665) - (xy 139.448714 62.334308) (xy 139.708344 62.233604) (xy 139.943469 62.084389) (xy 140.099817 61.9355) (xy 143.836192 61.9355) - (xy 143.896572 61.998025) (xy 144.115017 62.149848) (xy 144.300205 62.230755) (xy 144.148498 62.292049) (xy 143.9259 62.437713) - (xy 143.735833 62.62384) (xy 143.585539 62.843339) (xy 143.480741 63.087851) (xy 143.425432 63.348061) (xy 143.421717 63.614058) - (xy 143.46974 63.875711) (xy 143.567669 64.123053) (xy 143.711776 64.346664) (xy 143.896572 64.538025) (xy 144.115017 64.689848) - (xy 144.35879 64.79635) (xy 144.618608 64.853475) (xy 144.884573 64.859046) (xy 145.146555 64.812851) (xy 145.291907 64.756472) - (xy 146.630217 66.094782) (xy 146.699845 66.151975) (xy 146.768875 66.209898) (xy 146.773367 66.212368) (xy 146.777333 66.215625) - (xy 146.856745 66.258205) (xy 146.93571 66.301617) (xy 146.940601 66.303168) (xy 146.945119 66.305591) (xy 147.031254 66.331925) - (xy 147.117182 66.359183) (xy 147.12228 66.359754) (xy 147.127184 66.361254) (xy 147.216804 66.370357) (xy 147.30638 66.380405) - (xy 147.316407 66.380474) (xy 147.316595 66.380494) (xy 147.316769 66.380477) (xy 147.32 66.3805) (xy 148.820934 66.3805) - (xy 150.98036 68.539926) (xy 150.978134 68.699397) (xy 151.028405 68.973299) (xy 151.130918 69.232219) (xy 151.281771 69.466297) - (xy 151.475217 69.666616) (xy 151.703888 69.825546) (xy 151.959073 69.937034) (xy 152.231053 69.996833) (xy 152.509468 70.002665) - (xy 152.783714 69.954308) (xy 153.043344 69.853604) (xy 153.278469 69.704389) (xy 153.480134 69.512346) (xy 153.640656 69.284791) - (xy 153.753923 69.03039) (xy 153.815619 68.758834) (xy 153.82006 68.440762) (xy 153.76597 68.167589) (xy 153.659851 67.910125) - (xy 153.505745 67.678176) (xy 153.3755 67.547018) (xy 153.3755 65.809065) (xy 156.899782 62.284783) (xy 156.956975 62.215154) - (xy 157.014898 62.146125) (xy 157.017368 62.141632) (xy 157.020625 62.137667) (xy 157.063205 62.058254) (xy 157.106617 61.97929) - (xy 157.108168 61.974398) (xy 157.110591 61.969881) (xy 157.136925 61.883745) (xy 157.164183 61.797818) (xy 157.164754 61.792719) - (xy 157.166254 61.787816) (xy 157.175357 61.698195) (xy 157.185405 61.60862) (xy 157.185474 61.598592) (xy 157.185494 61.598405) - (xy 157.185477 61.59823) (xy 157.1855 61.595) (xy 157.1855 59.451987) (xy 157.290134 59.352346) (xy 157.450656 59.124791) - (xy 157.563923 58.87039) (xy 157.625619 58.598834) (xy 157.63006 58.280762) (xy 157.63006 68.456488) (xy 157.584699 68.19769) - (xy 157.48426 67.937957) (xy 157.454835 67.882616) (xy 157.213178 67.813703) (xy 156.976297 68.050584) (xy 156.976297 67.576822) - (xy 156.907384 67.335165) (xy 156.652312 67.223417) (xy 156.380394 67.163341) (xy 156.101984 67.157224) (xy 155.82769 67.205301) - (xy 155.567957 67.30574) (xy 155.512616 67.335165) (xy 155.443703 67.576822) (xy 156.21 68.343119) (xy 156.976297 67.576822) - (xy 156.976297 68.050584) (xy 156.446881 68.58) (xy 157.213178 69.346297) (xy 157.454835 69.277384) (xy 157.566583 69.022312) - (xy 157.626659 68.750394) (xy 157.632776 68.471984) (xy 157.632776 100.373211) (xy 157.56856 100.308995) (xy 157.56856 97.044293) - (xy 157.56856 87.519293) (xy 157.56856 77.359293) (xy 157.521183 77.097522) (xy 157.423864 76.849939) (xy 157.402838 76.810395) - (xy 157.167635 76.749245) (xy 156.976297 76.940583) (xy 156.976297 69.583178) (xy 156.21 68.816881) (xy 155.973119 69.053762) - (xy 155.973119 68.58) (xy 155.206822 67.813703) (xy 154.965165 67.882616) (xy 154.853417 68.137688) (xy 154.793341 68.409606) - (xy 154.787224 68.688016) (xy 154.835301 68.96231) (xy 154.93574 69.222043) (xy 154.965165 69.277384) (xy 155.206822 69.346297) - (xy 155.973119 68.58) (xy 155.973119 69.053762) (xy 155.443703 69.583178) (xy 155.512616 69.824835) (xy 155.767688 69.936583) - (xy 156.039606 69.996659) (xy 156.318016 70.002776) (xy 156.59231 69.954699) (xy 156.852043 69.85426) (xy 156.907384 69.824835) - (xy 156.976297 69.583178) (xy 156.976297 76.940583) (xy 156.930755 76.986125) (xy 156.930755 76.512365) (xy 156.869605 76.277162) - (xy 156.625353 76.171762) (xy 156.36528 76.115811) (xy 156.099293 76.11144) (xy 155.837522 76.158817) (xy 155.589939 76.256136) - (xy 155.550395 76.277162) (xy 155.489245 76.512365) (xy 156.21 77.233119) (xy 156.930755 76.512365) (xy 156.930755 76.986125) - (xy 156.446881 77.47) (xy 157.167635 78.190755) (xy 157.402838 78.129605) (xy 157.508238 77.885353) (xy 157.564189 77.62528) - (xy 157.56856 77.359293) (xy 157.56856 87.519293) (xy 157.521183 87.257522) (xy 157.423864 87.009939) (xy 157.402838 86.970395) - (xy 157.167635 86.909245) (xy 156.930755 87.146125) (xy 156.930755 86.672365) (xy 156.930755 78.427635) (xy 156.21 77.706881) - (xy 155.973119 77.943761) (xy 155.973119 77.47) (xy 155.252365 76.749245) (xy 155.026558 76.807952) (xy 155.026527 76.70698) - (xy 155.001463 76.580397) (xy 154.95229 76.461094) (xy 154.88088 76.353613) (xy 154.789954 76.26205) (xy 154.682975 76.189892) - (xy 154.564017 76.139887) (xy 154.437613 76.113939) (xy 154.308575 76.113039) (xy 152.90698 76.113473) (xy 152.780397 76.138537) - (xy 152.661094 76.18771) (xy 152.553613 76.25912) (xy 152.46205 76.350046) (xy 152.389892 76.457025) (xy 152.374139 76.4945) - (xy 150.257581 76.4945) (xy 150.134521 76.370578) (xy 149.903654 76.214856) (xy 149.646937 76.106942) (xy 149.374149 76.050947) - (xy 149.095679 76.049002) (xy 148.822135 76.101184) (xy 148.676961 76.159838) (xy 148.563937 76.205503) (xy 148.330918 76.357986) - (xy 148.131954 76.552826) (xy 147.974624 76.7826) (xy 147.864921 77.038557) (xy 147.807022 77.310948) (xy 147.803134 77.589397) - (xy 147.853405 77.863299) (xy 147.955918 78.122219) (xy 148.106771 78.356297) (xy 148.300217 78.556616) (xy 148.528888 78.715546) - (xy 148.784073 78.827034) (xy 149.056053 78.886833) (xy 149.334468 78.892665) (xy 149.608714 78.844308) (xy 149.868344 78.743604) - (xy 150.103469 78.594389) (xy 150.259817 78.4455) (xy 152.373941 78.4455) (xy 152.38771 78.478906) (xy 152.45912 78.586387) - (xy 152.550046 78.67795) (xy 152.657025 78.750108) (xy 152.775983 78.800113) (xy 152.902387 78.826061) (xy 153.031425 78.826961) - (xy 154.43302 78.826527) (xy 154.559603 78.801463) (xy 154.678906 78.75229) (xy 154.786387 78.68088) (xy 154.87795 78.589954) - (xy 154.950108 78.482975) (xy 155.000113 78.364017) (xy 155.026061 78.237613) (xy 155.026796 78.132109) (xy 155.252365 78.190755) - (xy 155.973119 77.47) (xy 155.973119 77.943761) (xy 155.489245 78.427635) (xy 155.550395 78.662838) (xy 155.794647 78.768238) - (xy 156.05472 78.824189) (xy 156.320707 78.82856) (xy 156.582478 78.781183) (xy 156.830061 78.683864) (xy 156.869605 78.662838) - (xy 156.930755 78.427635) (xy 156.930755 86.672365) (xy 156.869605 86.437162) (xy 156.625353 86.331762) (xy 156.36528 86.275811) - (xy 156.099293 86.27144) (xy 155.837522 86.318817) (xy 155.589939 86.416136) (xy 155.550395 86.437162) (xy 155.489245 86.672365) - (xy 156.21 87.393119) (xy 156.930755 86.672365) (xy 156.930755 87.146125) (xy 156.446881 87.63) (xy 157.167635 88.350755) - (xy 157.402838 88.289605) (xy 157.508238 88.045353) (xy 157.564189 87.78528) (xy 157.56856 87.519293) (xy 157.56856 97.044293) - (xy 157.521183 96.782522) (xy 157.423864 96.534939) (xy 157.402838 96.495395) (xy 157.167635 96.434245) (xy 156.930755 96.671125) - (xy 156.930755 96.197365) (xy 156.930755 88.587635) (xy 156.21 87.866881) (xy 155.973119 88.103761) (xy 155.973119 87.63) - (xy 155.252365 86.909245) (xy 155.026558 86.967952) (xy 155.026527 86.86698) (xy 155.001463 86.740397) (xy 154.95229 86.621094) - (xy 154.88088 86.513613) (xy 154.789954 86.42205) (xy 154.682975 86.349892) (xy 154.564017 86.299887) (xy 154.437613 86.273939) - (xy 154.308575 86.273039) (xy 152.90698 86.273473) (xy 152.780397 86.298537) (xy 152.661094 86.34771) (xy 152.553613 86.41912) - (xy 152.46205 86.510046) (xy 152.389892 86.617025) (xy 152.374139 86.6545) (xy 150.257581 86.6545) (xy 150.134521 86.530578) - (xy 149.903654 86.374856) (xy 149.646937 86.266942) (xy 149.374149 86.210947) (xy 149.095679 86.209002) (xy 148.822135 86.261184) - (xy 148.563937 86.365503) (xy 148.330918 86.517986) (xy 148.131954 86.712826) (xy 147.974624 86.9426) (xy 147.864921 87.198557) - (xy 147.807022 87.470948) (xy 147.803134 87.749397) (xy 147.853405 88.023299) (xy 147.955918 88.282219) (xy 148.106771 88.516297) - (xy 148.300217 88.716616) (xy 148.528888 88.875546) (xy 148.581351 88.898466) (xy 148.563937 88.905503) (xy 148.330918 89.057986) - (xy 148.191514 89.1945) (xy 147.089065 89.1945) (xy 145.7555 87.860934) (xy 145.7555 81.635316) (xy 145.801572 81.683025) - (xy 146.020017 81.834848) (xy 146.26379 81.94135) (xy 146.523608 81.998475) (xy 146.789573 82.004046) (xy 147.051555 81.957851) - (xy 147.299574 81.861651) (xy 147.524185 81.719108) (xy 147.627733 81.6205) (xy 148.185934 81.6205) (xy 148.2495 81.684065) - (xy 148.2495 82.787716) (xy 148.131954 82.902826) (xy 147.974624 83.1326) (xy 147.864921 83.388557) (xy 147.807022 83.660948) - (xy 147.803134 83.939397) (xy 147.853405 84.213299) (xy 147.955918 84.472219) (xy 148.106771 84.706297) (xy 148.300217 84.906616) - (xy 148.528888 85.065546) (xy 148.784073 85.177034) (xy 149.056053 85.236833) (xy 149.334468 85.242665) (xy 149.608714 85.194308) - (xy 149.868344 85.093604) (xy 150.103469 84.944389) (xy 150.305134 84.752346) (xy 150.465656 84.524791) (xy 150.578923 84.27039) - (xy 150.640619 83.998834) (xy 150.64506 83.680762) (xy 150.59097 83.407589) (xy 150.484851 83.150125) (xy 150.330745 82.918176) - (xy 150.2005 82.787018) (xy 150.2005 81.28) (xy 150.191702 81.19027) (xy 150.183853 81.100555) (xy 150.182422 81.095632) - (xy 150.181922 81.090524) (xy 150.155869 81.004232) (xy 150.130738 80.91773) (xy 150.128377 80.913175) (xy 150.126895 80.908266) - (xy 150.084596 80.828713) (xy 150.043123 80.748704) (xy 150.039922 80.744694) (xy 150.037515 80.740167) (xy 149.980573 80.670349) - (xy 149.924346 80.599915) (xy 149.917307 80.592777) (xy 149.917186 80.592629) (xy 149.917048 80.592515) (xy 149.914782 80.590217) - (xy 149.279783 79.955217) (xy 149.210119 79.897995) (xy 149.141125 79.840102) (xy 149.136632 79.837632) (xy 149.132666 79.834374) - (xy 149.05322 79.791775) (xy 148.97429 79.748383) (xy 148.9694 79.746832) (xy 148.96488 79.744408) (xy 148.878726 79.718068) - (xy 148.792818 79.690817) (xy 148.787717 79.690244) (xy 148.782815 79.688746) (xy 148.6932 79.679643) (xy 148.60362 79.669595) - (xy 148.593592 79.669525) (xy 148.593405 79.669506) (xy 148.59323 79.669522) (xy 148.59 79.6695) (xy 147.628086 79.6695) - (xy 147.553849 79.594742) (xy 147.333306 79.445984) (xy 147.088069 79.342895) (xy 146.827479 79.289404) (xy 146.561462 79.287547) - (xy 146.300151 79.337395) (xy 146.053498 79.437049) (xy 145.8309 79.582713) (xy 145.7555 79.656549) (xy 145.7555 75.969065) - (xy 148.009782 73.714783) (xy 148.066975 73.645154) (xy 148.124898 73.576125) (xy 148.127368 73.571632) (xy 148.130625 73.567667) - (xy 148.173205 73.488254) (xy 148.216617 73.40929) (xy 148.218168 73.404398) (xy 148.220591 73.399881) (xy 148.246925 73.313745) - (xy 148.274183 73.227818) (xy 148.274754 73.222719) (xy 148.276254 73.217816) (xy 148.285357 73.128195) (xy 148.295405 73.03862) - (xy 148.295474 73.028592) (xy 148.295494 73.028405) (xy 148.295477 73.02823) (xy 148.2955 73.025) (xy 148.2955 71.12) - (xy 148.286701 71.030266) (xy 148.278853 70.940555) (xy 148.277422 70.935632) (xy 148.276922 70.930524) (xy 148.250869 70.844232) - (xy 148.225738 70.75773) (xy 148.223377 70.753175) (xy 148.221895 70.748266) (xy 148.179596 70.668713) (xy 148.138123 70.588704) - (xy 148.134922 70.584694) (xy 148.132515 70.580167) (xy 148.075573 70.510349) (xy 148.019346 70.439915) (xy 148.012307 70.432777) - (xy 148.012186 70.432629) (xy 148.012048 70.432515) (xy 148.009782 70.430217) (xy 147.516065 69.9365) (xy 147.6375 69.9365) - (xy 147.6375 69.922) (xy 147.652 69.9365) (xy 148.08302 69.936527) (xy 148.209603 69.911463) (xy 148.328906 69.86229) - (xy 148.436387 69.79088) (xy 148.52795 69.699954) (xy 148.600108 69.592975) (xy 148.650113 69.474017) (xy 148.676061 69.347613) - (xy 148.676961 69.218575) (xy 148.676961 67.941425) (xy 148.676061 67.812387) (xy 148.650113 67.685983) (xy 148.600108 67.567025) - (xy 148.52795 67.460046) (xy 148.436387 67.36912) (xy 148.328906 67.29771) (xy 148.209603 67.248537) (xy 148.08302 67.223473) + (xy 177.212004 99.620115) (xy 177.295421 99.350638) (xy 177.324908 99.070091) (xy 177.324908 108.166742) (xy 177.294287 108.240669) + (xy 177.269 108.367793) (xy 177.269 108.888) (xy 177.4335 109.0525) (xy 178.9025 109.0525) (xy 178.9025 109.3875) + (xy 177.4335 109.3875) (xy 177.269 109.552) (xy 177.269 110.072207) (xy 177.294287 110.199331) (xy 177.343888 110.31908) + (xy 177.415898 110.42685) (xy 177.507549 110.518502) (xy 177.61532 110.590512) (xy 177.735068 110.640113) (xy 177.776334 110.648321) + (xy 177.772108 110.651252) (xy 177.573908 110.856388) (xy 177.419536 111.09625) (xy 177.322616 111.369975) (xy 177.444499 111.5925) + (xy 178.9025 111.5925) (xy 178.9025 111.9275) (xy 177.444499 111.9275) (xy 177.322616 112.150025) (xy 177.419536 112.42375) + (xy 177.573908 112.663612) (xy 177.772108 112.868748) (xy 178.004679 113.03) (xy 177.772108 113.191252) (xy 177.573908 113.396388) + (xy 177.419536 113.63625) (xy 177.322616 113.909975) (xy 177.444499 114.1325) (xy 178.9025 114.1325) (xy 178.9025 114.4675) + (xy 177.444499 114.4675) (xy 177.322616 114.690025) (xy 177.419536 114.96375) (xy 177.573908 115.203612) (xy 177.772108 115.408748) + (xy 178.004679 115.57) (xy 177.772108 115.731252) (xy 177.573908 115.936388) (xy 177.419536 116.17625) (xy 177.322616 116.449975) + (xy 177.444499 116.6725) (xy 178.9025 116.6725) (xy 178.9025 117.0075) (xy 177.444499 117.0075) (xy 177.322616 117.230025) + (xy 177.419536 117.50375) (xy 177.573908 117.743612) (xy 177.772108 117.948748) (xy 178.00652 118.111276) (xy 178.268135 118.224949) + (xy 178.5469 118.2854) (xy 178.9025 118.2854) (xy 178.9025 119.2046) (xy 177.862193 119.2046) (xy 177.735069 119.229887) + (xy 177.61532 119.279488) (xy 177.50755 119.351498) (xy 177.415898 119.443149) (xy 177.388602 119.484) (xy 166.852973 119.484) + (xy 149.35292 101.983946) (xy 149.320971 101.822589) (xy 149.214852 101.565125) (xy 149.060746 101.333176) (xy 148.864522 101.135577) + (xy 148.633654 100.979855) (xy 148.486 100.917786) (xy 148.486 99.870624) (xy 148.560657 99.764791) (xy 148.673924 99.51039) + (xy 148.73562 99.238834) (xy 148.740061 98.920762) (xy 148.685971 98.647589) (xy 148.579852 98.390125) (xy 148.425746 98.158176) + (xy 148.229522 97.960577) (xy 148.187125 97.93198) (xy 148.273931 97.914713) (xy 148.317636 97.89661) (xy 157.925514 107.504487) + (xy 158.008766 107.572871) (xy 158.091248 107.642082) (xy 158.096619 107.645035) (xy 158.101359 107.648928) (xy 158.196281 107.699824) + (xy 158.290664 107.751712) (xy 158.296509 107.753566) (xy 158.301912 107.756463) (xy 158.404929 107.787958) (xy 158.507575 107.82052) + (xy 158.513664 107.821203) (xy 158.519532 107.822997) (xy 158.626704 107.833882) (xy 158.73372 107.845886) (xy 158.745713 107.845969) + (xy 158.74593 107.845992) (xy 158.746131 107.845972) (xy 158.75 107.846) (xy 165.735 107.846) (xy 165.842188 107.83549) + (xy 165.949487 107.826103) (xy 165.955375 107.824392) (xy 165.961477 107.823794) (xy 166.064616 107.792654) (xy 166.168015 107.762614) + (xy 166.173455 107.759794) (xy 166.179328 107.758021) (xy 166.274453 107.707441) (xy 166.370049 107.65789) (xy 166.37484 107.654064) + (xy 166.380255 107.651186) (xy 166.463707 107.583123) (xy 166.547894 107.515918) (xy 166.556436 107.507494) (xy 166.556603 107.507359) + (xy 166.55673 107.507205) (xy 166.559487 107.504487) (xy 168.122973 105.941) (xy 169.258165 105.941) (xy 169.452758 106.076246) + (xy 169.719355 106.192719) (xy 170.003498 106.255192) (xy 170.294363 106.261285) (xy 170.580873 106.210765) (xy 170.852113 106.105558) + (xy 171.097753 105.94967) (xy 171.308436 105.74904) (xy 171.476137 105.511308) (xy 171.594469 105.245531) (xy 171.658924 104.961831) + (xy 171.663564 104.629535) (xy 171.607055 104.344147) (xy 171.496191 104.075169) (xy 171.335193 103.832848) (xy 171.130194 103.626413) + (xy 170.889003 103.463727) (xy 170.620805 103.350988) (xy 170.335818 103.292488) (xy 170.044896 103.290457) (xy 169.75912 103.344972) + (xy 169.489375 103.453956) (xy 169.252441 103.609) (xy 167.64 103.609) (xy 167.532811 103.619509) (xy 167.425513 103.628897) + (xy 167.419624 103.630607) (xy 167.413523 103.631206) (xy 167.310429 103.662331) (xy 167.206985 103.692385) (xy 167.20154 103.695207) + (xy 167.195672 103.696979) (xy 167.100582 103.747539) (xy 167.004951 103.79711) (xy 167.000159 103.800935) (xy 166.994745 103.803814) + (xy 166.911292 103.871876) (xy 166.827106 103.939082) (xy 166.818567 103.947502) (xy 166.818397 103.947641) (xy 166.818266 103.947798) + (xy 166.815514 103.950513) (xy 165.252026 105.514) (xy 159.535061 105.514) (xy 159.535061 102.095762) (xy 159.480971 101.822589) + (xy 159.374852 101.565125) (xy 159.220746 101.333176) (xy 159.024522 101.135577) (xy 158.793654 100.979855) (xy 158.536937 100.871941) + (xy 158.264149 100.815946) (xy 158.074184 100.814619) (xy 157.63249 100.372924) (xy 157.63249 68.468261) (xy 157.630061 68.454647) + (xy 157.630061 58.280762) (xy 157.575971 58.007589) (xy 157.469852 57.750125) (xy 157.315746 57.518176) (xy 157.119522 57.320577) + (xy 156.888654 57.164855) (xy 156.631937 57.056941) (xy 156.359149 57.000946) (xy 156.080679 56.999001) (xy 155.807135 57.051183) + (xy 155.548936 57.155502) (xy 155.315917 57.307985) (xy 155.116953 57.502825) (xy 154.959623 57.7326) (xy 154.84992 57.988557) + (xy 154.792021 58.260948) (xy 154.788133 58.539397) (xy 154.838404 58.813299) (xy 154.940918 59.07222) (xy 155.091771 59.306298) + (xy 155.2345 59.454098) (xy 155.2345 61.190934) (xy 151.710217 64.715217) (xy 151.652995 64.78488) (xy 151.595102 64.853875) + (xy 151.592632 64.858367) (xy 151.589374 64.862334) (xy 151.546775 64.941779) (xy 151.503383 65.02071) (xy 151.501832 65.025599) + (xy 151.499408 65.03012) (xy 151.473068 65.116273) (xy 151.445817 65.202182) (xy 151.445244 65.207282) (xy 151.443746 65.212185) + (xy 151.434643 65.301799) (xy 151.424595 65.39138) (xy 151.424525 65.401407) (xy 151.424506 65.401595) (xy 151.424522 65.401769) + (xy 151.4245 65.405) (xy 151.4245 66.224934) (xy 149.914783 64.715217) (xy 149.845119 64.657995) (xy 149.776125 64.600102) + (xy 149.771632 64.597632) (xy 149.767666 64.594374) (xy 149.68822 64.551775) (xy 149.60929 64.508383) (xy 149.6044 64.506832) + (xy 149.59988 64.504408) (xy 149.513726 64.478068) (xy 149.427818 64.450817) (xy 149.422717 64.450244) (xy 149.417815 64.448746) + (xy 149.3282 64.439643) (xy 149.23862 64.429595) (xy 149.228592 64.429525) (xy 149.228405 64.429506) (xy 149.22823 64.429522) + (xy 149.225 64.4295) (xy 148.870479 64.4295) (xy 148.95227 64.405738) (xy 148.956823 64.403377) (xy 148.961734 64.401895) + (xy 149.041307 64.359585) (xy 149.121295 64.318123) (xy 149.125302 64.314924) (xy 149.129833 64.312515) (xy 149.199672 64.255555) + (xy 149.270085 64.199346) (xy 149.277226 64.192303) (xy 149.277371 64.192186) (xy 149.277481 64.192052) (xy 149.279783 64.189783) + (xy 150.549783 62.919783) (xy 150.607004 62.850119) (xy 150.664898 62.781125) (xy 150.667367 62.776632) (xy 150.670626 62.772666) + (xy 150.713234 62.693201) (xy 150.756617 62.61429) (xy 150.758167 62.609403) (xy 150.760592 62.604881) (xy 150.786935 62.518712) + (xy 150.814183 62.432818) (xy 150.814755 62.427717) (xy 150.816254 62.422815) (xy 150.825356 62.3332) (xy 150.835405 62.24362) + (xy 150.835474 62.233592) (xy 150.835494 62.233405) (xy 150.835477 62.23323) (xy 150.8355 62.23) (xy 150.8355 59.69) + (xy 150.826705 59.600307) (xy 150.818853 59.510556) (xy 150.817423 59.505633) (xy 150.816922 59.500524) (xy 150.790865 59.41422) + (xy 150.765738 59.32773) (xy 150.763377 59.323175) (xy 150.761895 59.318266) (xy 150.719606 59.238732) (xy 150.678124 59.158705) + (xy 150.674922 59.154694) (xy 150.672515 59.150167) (xy 150.615582 59.080361) (xy 150.559347 59.009916) (xy 150.552307 59.002777) + (xy 150.552186 59.002629) (xy 150.552048 59.002515) (xy 150.549783 59.000218) (xy 150.2005 58.650934) (xy 150.2005 55.641989) + (xy 150.305134 55.542347) (xy 150.465657 55.314791) (xy 150.578924 55.06039) (xy 150.64062 54.788834) (xy 150.645061 54.470762) + (xy 150.590971 54.197589) (xy 150.484852 53.940125) (xy 150.330746 53.708176) (xy 150.2005 53.577017) (xy 150.2005 50.165) + (xy 150.191701 50.075266) (xy 150.183853 49.985555) (xy 150.182422 49.980632) (xy 150.181922 49.975524) (xy 150.155869 49.889232) + (xy 150.130738 49.80273) (xy 150.128377 49.798175) (xy 150.126895 49.793266) (xy 150.084596 49.713713) (xy 150.043123 49.633704) + (xy 150.039922 49.629694) (xy 150.037515 49.625167) (xy 149.980573 49.555349) (xy 149.924346 49.484915) (xy 149.917307 49.477777) + (xy 149.917186 49.477629) (xy 149.917048 49.477515) (xy 149.914782 49.475217) (xy 149.533783 49.094217) (xy 149.464119 49.036995) + (xy 149.395125 48.979102) (xy 149.390632 48.976632) (xy 149.386666 48.973374) (xy 149.30722 48.930775) (xy 149.22829 48.887383) + (xy 149.2234 48.885832) (xy 149.21888 48.883408) (xy 149.132726 48.857068) (xy 149.046818 48.829817) (xy 149.046186 48.829746) + (xy 148.95085 48.733741) (xy 148.730306 48.584983) (xy 148.485069 48.481894) (xy 148.224479 48.428403) (xy 147.958462 48.426546) + (xy 147.697151 48.476394) (xy 147.450498 48.576048) (xy 147.227899 48.721712) (xy 147.139273 48.8085) (xy 146.485088 48.8085) + (xy 146.41085 48.733741) (xy 146.190306 48.584983) (xy 145.945069 48.481894) (xy 145.684479 48.428403) (xy 145.418462 48.426546) + (xy 145.157151 48.476394) (xy 144.910498 48.576048) (xy 144.687899 48.721712) (xy 144.497832 48.907839) (xy 144.347538 49.127339) + (xy 144.27162 49.304466) (xy 144.205514 49.14408) (xy 144.058299 48.922504) (xy 143.87085 48.733741) (xy 143.650306 48.584983) + (xy 143.405069 48.481894) (xy 143.144479 48.428403) (xy 142.878462 48.426546) (xy 142.617151 48.476394) (xy 142.370498 48.576048) + (xy 142.147899 48.721712) (xy 142.059273 48.8085) (xy 140.462 48.8085) (xy 140.372266 48.817298) (xy 140.282555 48.825147) + (xy 140.277632 48.826577) (xy 140.272524 48.827078) (xy 140.186232 48.85313) (xy 140.09973 48.878262) (xy 140.095175 48.880622) + (xy 140.090266 48.882105) (xy 140.010713 48.924403) (xy 139.930704 48.965877) (xy 139.926694 48.969077) (xy 139.922167 48.971485) + (xy 139.852349 49.028426) (xy 139.781915 49.084654) (xy 139.774777 49.091692) (xy 139.774629 49.091814) (xy 139.774515 49.091951) + (xy 139.772217 49.094218) (xy 138.375217 50.491217) (xy 138.317995 50.56088) (xy 138.260102 50.629875) (xy 138.257632 50.634367) + (xy 138.254374 50.638334) (xy 138.211775 50.717779) (xy 138.168383 50.79671) (xy 138.166832 50.801599) (xy 138.164408 50.80612) + (xy 138.138068 50.892273) (xy 138.110817 50.978182) (xy 138.110244 50.983282) (xy 138.108746 50.988185) (xy 138.099643 51.077799) + (xy 138.089595 51.16738) (xy 138.089525 51.177407) (xy 138.089506 51.177595) (xy 138.089522 51.177769) (xy 138.0895 51.181) + (xy 138.0895 53.577714) (xy 137.971953 53.692825) (xy 137.814623 53.9226) (xy 137.70492 54.178557) (xy 137.647021 54.450948) + (xy 137.644224 54.651209) (xy 136.692434 55.603) (xy 136.206193 55.603) (xy 136.079069 55.628287) (xy 135.978266 55.67004) + (xy 135.978266 49.415737) (xy 135.929876 49.152948) (xy 135.831148 48.904649) (xy 135.812838 48.870394) (xy 135.577636 48.809245) + (xy 135.340755 49.046126) (xy 135.340755 48.572364) (xy 135.279606 48.337162) (xy 135.034221 48.231399) (xy 134.772917 48.175541) + (xy 134.505737 48.171734) (xy 134.242948 48.220124) (xy 133.994649 48.318852) (xy 133.960394 48.337162) (xy 133.899245 48.572364) + (xy 134.62 49.293119) (xy 135.340755 48.572364) (xy 135.340755 49.046126) (xy 134.856881 49.53) (xy 135.577636 50.250755) + (xy 135.812838 50.189606) (xy 135.918601 49.944221) (xy 135.974459 49.682917) (xy 135.978266 49.415737) (xy 135.978266 55.67004) + (xy 135.95932 55.677888) (xy 135.85155 55.749898) (xy 135.759898 55.841549) (xy 135.687888 55.94932) (xy 135.638287 56.069068) + (xy 135.613 56.196192) (xy 135.613 56.325807) (xy 135.613 56.682434) (xy 135.340755 56.954679) (xy 135.340755 50.487636) + (xy 134.62 49.766881) (xy 134.383119 50.003762) (xy 134.383119 49.53) (xy 133.662364 48.809245) (xy 133.427162 48.870394) + (xy 133.349329 49.050975) (xy 133.291148 48.904649) (xy 133.272838 48.870394) (xy 133.037636 48.809245) (xy 132.800755 49.046126) + (xy 132.800755 48.572364) (xy 132.739606 48.337162) (xy 132.494221 48.231399) (xy 132.232917 48.175541) (xy 131.965737 48.171734) + (xy 131.702948 48.220124) (xy 131.454649 48.318852) (xy 131.420394 48.337162) (xy 131.359245 48.572364) (xy 132.08 49.293119) + (xy 132.800755 48.572364) (xy 132.800755 49.046126) (xy 132.316881 49.53) (xy 133.037636 50.250755) (xy 133.272838 50.189606) + (xy 133.35067 50.009024) (xy 133.408852 50.155351) (xy 133.427162 50.189606) (xy 133.662364 50.250755) (xy 134.383119 49.53) + (xy 134.383119 50.003762) (xy 133.899245 50.487636) (xy 133.960394 50.722838) (xy 134.205779 50.828601) (xy 134.467083 50.884459) + (xy 134.734263 50.888266) (xy 134.997052 50.839876) (xy 135.245351 50.741148) (xy 135.279606 50.722838) (xy 135.340755 50.487636) + (xy 135.340755 56.954679) (xy 133.295217 59.000217) (xy 133.237995 59.06988) (xy 133.180102 59.138875) (xy 133.177632 59.143367) + (xy 133.174374 59.147334) (xy 133.131775 59.226779) (xy 133.088383 59.30571) (xy 133.086832 59.310599) (xy 133.084408 59.31512) + (xy 133.058068 59.401273) (xy 133.030817 59.487182) (xy 133.030244 59.492282) (xy 133.028746 59.497185) (xy 133.019643 59.586799) + (xy 133.009595 59.67638) (xy 133.009525 59.686407) (xy 133.009506 59.686595) (xy 133.009522 59.686769) (xy 133.0095 59.69) + (xy 133.0095 60.687315) (xy 132.904069 60.708287) (xy 132.800755 60.75108) (xy 132.800755 50.487636) (xy 132.08 49.766881) + (xy 131.843119 50.003762) (xy 131.843119 49.53) (xy 131.122364 48.809245) (xy 130.887162 48.870394) (xy 130.809585 49.050381) + (xy 130.743514 48.89008) (xy 130.596299 48.668504) (xy 130.40885 48.479741) (xy 130.188306 48.330983) (xy 129.943069 48.227894) + (xy 129.682479 48.174403) (xy 129.563135 48.173569) (xy 128.959783 47.570217) (xy 128.890119 47.512995) (xy 128.821125 47.455102) + (xy 128.816632 47.452632) (xy 128.812666 47.449374) (xy 128.73322 47.406775) (xy 128.65429 47.363383) (xy 128.6494 47.361832) + (xy 128.64488 47.359408) (xy 128.558726 47.333068) (xy 128.472818 47.305817) (xy 128.467717 47.305244) (xy 128.462815 47.303746) + (xy 128.3732 47.294643) (xy 128.28362 47.284595) (xy 128.273592 47.284525) (xy 128.273405 47.284506) (xy 128.27323 47.284522) + (xy 128.27 47.2845) (xy 125.492582 47.2845) (xy 125.369522 47.160577) (xy 125.138654 47.004855) (xy 124.881937 46.896941) + (xy 124.609149 46.840946) (xy 124.330679 46.839001) (xy 124.057135 46.891183) (xy 123.798936 46.995502) (xy 123.565917 47.147985) + (xy 123.366953 47.342825) (xy 123.209623 47.5726) (xy 123.09992 47.828557) (xy 123.042021 48.100948) (xy 123.038133 48.379397) + (xy 123.088404 48.653299) (xy 123.190918 48.91222) (xy 123.341771 49.146298) (xy 123.535217 49.346617) (xy 123.763887 49.505547) + (xy 124.019073 49.617035) (xy 124.291053 49.676834) (xy 124.569468 49.682666) (xy 124.843714 49.634309) (xy 125.103344 49.533605) + (xy 125.33847 49.38439) (xy 125.494819 49.2355) (xy 127.865934 49.2355) (xy 128.182993 49.552559) (xy 128.181716 49.644058) + (xy 128.229739 49.905711) (xy 128.327669 50.153054) (xy 128.471776 50.376664) (xy 128.656571 50.568025) (xy 128.875016 50.719849) + (xy 129.11879 50.826351) (xy 129.378608 50.883476) (xy 129.644573 50.889047) (xy 129.906555 50.842852) (xy 130.154575 50.746652) + (xy 130.379186 50.604109) (xy 130.571833 50.420654) (xy 130.725177 50.203274) (xy 130.811138 50.010202) (xy 130.868852 50.155351) + (xy 130.887162 50.189606) (xy 131.122364 50.250755) (xy 131.843119 49.53) (xy 131.843119 50.003762) (xy 131.359245 50.487636) + (xy 131.420394 50.722838) (xy 131.665779 50.828601) (xy 131.927083 50.884459) (xy 132.194263 50.888266) (xy 132.457052 50.839876) + (xy 132.705351 50.741148) (xy 132.739606 50.722838) (xy 132.800755 50.487636) (xy 132.800755 60.75108) (xy 132.78432 60.757888) + (xy 132.67655 60.829898) (xy 132.584898 60.921549) (xy 132.512888 61.02932) (xy 132.463287 61.149068) (xy 132.438 61.276192) + (xy 132.438 61.405807) (xy 132.438 63.183807) (xy 132.463287 63.310931) (xy 132.512888 63.43068) (xy 132.584898 63.53845) + (xy 132.676549 63.630102) (xy 132.78432 63.702112) (xy 132.904068 63.751713) (xy 133.0095 63.772685) (xy 133.0095 68.175934) + (xy 127.580217 73.605217) (xy 127.522995 73.67488) (xy 127.465102 73.743875) (xy 127.462632 73.748367) (xy 127.459374 73.752334) + (xy 127.416775 73.831779) (xy 127.373383 73.91071) (xy 127.371832 73.915599) (xy 127.369408 73.92012) (xy 127.343068 74.006273) + (xy 127.315817 74.092182) (xy 127.315244 74.097282) (xy 127.313746 74.102185) (xy 127.304643 74.191799) (xy 127.294595 74.28138) + (xy 127.294525 74.291407) (xy 127.294506 74.291595) (xy 127.294522 74.291769) (xy 127.2945 74.295) (xy 127.2945 74.532714) + (xy 127.176953 74.647825) (xy 127.019623 74.8776) (xy 126.90992 75.133557) (xy 126.852021 75.405948) (xy 126.848133 75.684397) + (xy 126.898404 75.958299) (xy 127.000918 76.21722) (xy 127.151771 76.451298) (xy 127.345217 76.651617) (xy 127.573887 76.810547) + (xy 127.829073 76.922035) (xy 128.101053 76.981834) (xy 128.379468 76.987666) (xy 128.653714 76.939309) (xy 128.913344 76.838605) + (xy 129.14847 76.68939) (xy 129.350134 76.497347) (xy 129.510657 76.269791) (xy 129.623924 76.01539) (xy 129.68562 75.743834) + (xy 129.690061 75.425762) (xy 129.635971 75.152589) (xy 129.529852 74.895125) (xy 129.375746 74.663176) (xy 129.328732 74.615833) + (xy 134.674783 69.269782) (xy 134.731984 69.200144) (xy 134.789898 69.131125) (xy 134.792367 69.126632) (xy 134.795626 69.122666) + (xy 134.838224 69.04322) (xy 134.881617 68.96429) (xy 134.883167 68.9594) (xy 134.885592 68.95488) (xy 134.911944 68.868685) + (xy 134.939183 68.782818) (xy 134.939754 68.777722) (xy 134.941255 68.772815) (xy 134.950361 68.683155) (xy 134.960405 68.59362) + (xy 134.960474 68.583591) (xy 134.960494 68.583404) (xy 134.960477 68.583229) (xy 134.9605 68.58) (xy 134.9605 63.772684) + (xy 135.065931 63.751713) (xy 135.18568 63.702112) (xy 135.29345 63.630102) (xy 135.385102 63.538451) (xy 135.457112 63.43068) + (xy 135.506713 63.310932) (xy 135.532 63.183808) (xy 135.532 63.054193) (xy 135.532 61.276193) (xy 135.506713 61.149069) + (xy 135.457112 61.02932) (xy 135.385102 60.92155) (xy 135.293451 60.829898) (xy 135.18568 60.757888) (xy 135.065932 60.708287) + (xy 134.9605 60.687314) (xy 134.9605 60.094065) (xy 136.357565 58.697) (xy 138.113807 58.697) (xy 138.240931 58.671713) + (xy 138.36068 58.622112) (xy 138.46845 58.550102) (xy 138.560102 58.458451) (xy 138.632112 58.35068) (xy 138.681713 58.230932) + (xy 138.702685 58.1255) (xy 143.105934 58.1255) (xy 144.594752 59.614317) (xy 144.395151 59.652394) (xy 144.148498 59.752048) + (xy 143.925899 59.897712) (xy 143.837273 59.9845) (xy 140.097582 59.9845) (xy 139.974522 59.860577) (xy 139.743654 59.704855) + (xy 139.486937 59.596941) (xy 139.214149 59.540946) (xy 138.935679 59.539001) (xy 138.662135 59.591183) (xy 138.403936 59.695502) + (xy 138.170917 59.847985) (xy 137.971953 60.042825) (xy 137.814623 60.2726) (xy 137.70492 60.528557) (xy 137.647021 60.800948) + (xy 137.643133 61.079397) (xy 137.693404 61.353299) (xy 137.795918 61.61222) (xy 137.946771 61.846298) (xy 138.140217 62.046617) + (xy 138.368887 62.205547) (xy 138.624073 62.317035) (xy 138.896053 62.376834) (xy 139.174468 62.382666) (xy 139.448714 62.334309) + (xy 139.708344 62.233605) (xy 139.94347 62.08439) (xy 140.099819 61.9355) (xy 143.836191 61.9355) (xy 143.896571 61.998025) + (xy 144.115016 62.149849) (xy 144.300203 62.230755) (xy 144.148498 62.292048) (xy 143.925899 62.437712) (xy 143.735832 62.623839) + (xy 143.585538 62.843339) (xy 143.48074 63.08785) (xy 143.425431 63.348061) (xy 143.421716 63.614058) (xy 143.469739 63.875711) + (xy 143.567669 64.123054) (xy 143.711776 64.346664) (xy 143.896571 64.538025) (xy 144.115016 64.689849) (xy 144.35879 64.796351) + (xy 144.618608 64.853476) (xy 144.884573 64.859047) (xy 145.146555 64.812852) (xy 145.291907 64.756473) (xy 146.630217 66.094783) + (xy 146.69988 66.152004) (xy 146.768875 66.209898) (xy 146.773367 66.212367) (xy 146.777334 66.215626) (xy 146.856779 66.258224) + (xy 146.93571 66.301617) (xy 146.940599 66.303167) (xy 146.94512 66.305592) (xy 147.031314 66.331944) (xy 147.117182 66.359183) + (xy 147.122277 66.359754) (xy 147.127185 66.361255) (xy 147.216849 66.370362) (xy 147.30638 66.380405) (xy 147.316407 66.380474) + (xy 147.316595 66.380494) (xy 147.316769 66.380477) (xy 147.32 66.3805) (xy 148.820934 66.3805) (xy 150.980359 68.539925) + (xy 150.978133 68.699397) (xy 151.028404 68.973299) (xy 151.130918 69.23222) (xy 151.281771 69.466298) (xy 151.475217 69.666617) + (xy 151.703887 69.825547) (xy 151.959073 69.937035) (xy 152.231053 69.996834) (xy 152.509468 70.002666) (xy 152.783714 69.954309) + (xy 153.043344 69.853605) (xy 153.27847 69.70439) (xy 153.480134 69.512347) (xy 153.640657 69.284791) (xy 153.753924 69.03039) + (xy 153.81562 68.758834) (xy 153.820061 68.440762) (xy 153.765971 68.167589) (xy 153.659852 67.910125) (xy 153.505746 67.678176) + (xy 153.3755 67.547017) (xy 153.3755 65.809065) (xy 156.899783 62.284782) (xy 156.956984 62.215144) (xy 157.014898 62.146125) + (xy 157.017367 62.141632) (xy 157.020626 62.137666) (xy 157.063224 62.05822) (xy 157.106617 61.97929) (xy 157.108167 61.9744) + (xy 157.110592 61.96988) (xy 157.136944 61.883685) (xy 157.164183 61.797818) (xy 157.164754 61.792722) (xy 157.166255 61.787815) + (xy 157.175361 61.698155) (xy 157.185405 61.60862) (xy 157.185474 61.598591) (xy 157.185494 61.598404) (xy 157.185477 61.598229) + (xy 157.1855 61.595) (xy 157.1855 59.451989) (xy 157.290134 59.352347) (xy 157.450657 59.124791) (xy 157.563924 58.87039) + (xy 157.62562 58.598834) (xy 157.630061 58.280762) (xy 157.630061 68.454647) (xy 157.583358 68.192894) (xy 157.481449 67.932403) + (xy 157.454836 67.882615) (xy 157.213179 67.813702) (xy 156.976298 68.050583) (xy 156.976298 67.576821) (xy 156.907385 67.335164) + (xy 156.65113 67.22303) (xy 156.377922 67.163043) (xy 156.098261 67.15751) (xy 155.822894 67.206642) (xy 155.562403 67.308551) + (xy 155.512615 67.335164) (xy 155.443702 67.576821) (xy 156.21 68.343119) (xy 156.976298 67.576821) (xy 156.976298 68.050583) + (xy 156.446881 68.58) (xy 157.213179 69.346298) (xy 157.454836 69.277385) (xy 157.56697 69.02113) (xy 157.626957 68.747922) + (xy 157.63249 68.468261) (xy 157.63249 100.372924) (xy 157.568266 100.3087) (xy 157.568266 97.040737) (xy 157.568266 87.515737) + (xy 157.568266 77.355737) (xy 157.519876 77.092948) (xy 157.421148 76.844649) (xy 157.402838 76.810394) (xy 157.167636 76.749245) + (xy 156.976298 76.940583) (xy 156.976298 69.583179) (xy 156.21 68.816881) (xy 155.973119 69.053762) (xy 155.973119 68.58) + (xy 155.206821 67.813702) (xy 154.965164 67.882615) (xy 154.85303 68.13887) (xy 154.793043 68.412078) (xy 154.78751 68.691739) + (xy 154.836642 68.967106) (xy 154.938551 69.227597) (xy 154.965164 69.277385) (xy 155.206821 69.346298) (xy 155.973119 68.58) + (xy 155.973119 69.053762) (xy 155.443702 69.583179) (xy 155.512615 69.824836) (xy 155.76887 69.93697) (xy 156.042078 69.996957) + (xy 156.321739 70.00249) (xy 156.597106 69.953358) (xy 156.857597 69.851449) (xy 156.907385 69.824836) (xy 156.976298 69.583179) + (xy 156.976298 76.940583) (xy 156.930755 76.986126) (xy 156.930755 76.512364) (xy 156.869606 76.277162) (xy 156.624221 76.171399) + (xy 156.362917 76.115541) (xy 156.095737 76.111734) (xy 155.832948 76.160124) (xy 155.584649 76.258852) (xy 155.550394 76.277162) + (xy 155.489245 76.512364) (xy 156.21 77.233119) (xy 156.930755 76.512364) (xy 156.930755 76.986126) (xy 156.446881 77.47) + (xy 157.167636 78.190755) (xy 157.402838 78.129606) (xy 157.508601 77.884221) (xy 157.564459 77.622917) (xy 157.568266 77.355737) + (xy 157.568266 87.515737) (xy 157.519876 87.252948) (xy 157.421148 87.004649) (xy 157.402838 86.970394) (xy 157.167636 86.909245) + (xy 156.930755 87.146126) (xy 156.930755 86.672364) (xy 156.930755 78.427636) (xy 156.21 77.706881) (xy 155.973119 77.943762) + (xy 155.973119 77.47) (xy 155.252364 76.749245) (xy 155.0265 76.807966) (xy 155.0265 76.706693) (xy 155.001213 76.579569) + (xy 154.951612 76.45982) (xy 154.879602 76.35205) (xy 154.787951 76.260398) (xy 154.68018 76.188388) (xy 154.560432 76.138787) + (xy 154.433308 76.1135) (xy 154.303693 76.1135) (xy 152.906693 76.1135) (xy 152.779569 76.138787) (xy 152.65982 76.188388) + (xy 152.55205 76.260398) (xy 152.460398 76.352049) (xy 152.388388 76.45982) (xy 152.374023 76.4945) (xy 150.257582 76.4945) + (xy 150.134522 76.370577) (xy 149.903654 76.214855) (xy 149.646937 76.106941) (xy 149.374149 76.050946) (xy 149.095679 76.049001) + (xy 148.822135 76.101183) (xy 148.6765 76.160023) (xy 148.563936 76.205502) (xy 148.330917 76.357985) (xy 148.131953 76.552825) + (xy 147.974623 76.7826) (xy 147.86492 77.038557) (xy 147.807021 77.310948) (xy 147.803133 77.589397) (xy 147.853404 77.863299) + (xy 147.955918 78.12222) (xy 148.106771 78.356298) (xy 148.300217 78.556617) (xy 148.528887 78.715547) (xy 148.784073 78.827035) + (xy 149.056053 78.886834) (xy 149.334468 78.892666) (xy 149.608714 78.844309) (xy 149.868344 78.743605) (xy 150.10347 78.59439) + (xy 150.259819 78.4455) (xy 152.374023 78.4455) (xy 152.388388 78.48018) (xy 152.460398 78.58795) (xy 152.552049 78.679602) + (xy 152.65982 78.751612) (xy 152.779568 78.801213) (xy 152.906692 78.8265) (xy 153.036307 78.8265) (xy 154.433307 78.8265) + (xy 154.560431 78.801213) (xy 154.68018 78.751612) (xy 154.78795 78.679602) (xy 154.879602 78.587951) (xy 154.951612 78.48018) + (xy 155.001213 78.360432) (xy 155.0265 78.233308) (xy 155.0265 78.132033) (xy 155.252364 78.190755) (xy 155.973119 77.47) + (xy 155.973119 77.943762) (xy 155.489245 78.427636) (xy 155.550394 78.662838) (xy 155.795779 78.768601) (xy 156.057083 78.824459) + (xy 156.324263 78.828266) (xy 156.587052 78.779876) (xy 156.835351 78.681148) (xy 156.869606 78.662838) (xy 156.930755 78.427636) + (xy 156.930755 86.672364) (xy 156.869606 86.437162) (xy 156.624221 86.331399) (xy 156.362917 86.275541) (xy 156.095737 86.271734) + (xy 155.832948 86.320124) (xy 155.584649 86.418852) (xy 155.550394 86.437162) (xy 155.489245 86.672364) (xy 156.21 87.393119) + (xy 156.930755 86.672364) (xy 156.930755 87.146126) (xy 156.446881 87.63) (xy 157.167636 88.350755) (xy 157.402838 88.289606) + (xy 157.508601 88.044221) (xy 157.564459 87.782917) (xy 157.568266 87.515737) (xy 157.568266 97.040737) (xy 157.519876 96.777948) + (xy 157.421148 96.529649) (xy 157.402838 96.495394) (xy 157.167636 96.434245) (xy 156.930755 96.671126) (xy 156.930755 96.197364) + (xy 156.930755 88.587636) (xy 156.21 87.866881) (xy 155.973119 88.103762) (xy 155.973119 87.63) (xy 155.252364 86.909245) + (xy 155.0265 86.967966) (xy 155.0265 86.866693) (xy 155.001213 86.739569) (xy 154.951612 86.61982) (xy 154.879602 86.51205) + (xy 154.787951 86.420398) (xy 154.68018 86.348388) (xy 154.560432 86.298787) (xy 154.433308 86.2735) (xy 154.303693 86.2735) + (xy 152.906693 86.2735) (xy 152.779569 86.298787) (xy 152.65982 86.348388) (xy 152.55205 86.420398) (xy 152.460398 86.512049) + (xy 152.388388 86.61982) (xy 152.374023 86.6545) (xy 150.257582 86.6545) (xy 150.134522 86.530577) (xy 149.903654 86.374855) + (xy 149.646937 86.266941) (xy 149.374149 86.210946) (xy 149.095679 86.209001) (xy 148.822135 86.261183) (xy 148.563936 86.365502) + (xy 148.330917 86.517985) (xy 148.131953 86.712825) (xy 147.974623 86.9426) (xy 147.86492 87.198557) (xy 147.807021 87.470948) + (xy 147.803133 87.749397) (xy 147.853404 88.023299) (xy 147.955918 88.28222) (xy 148.106771 88.516298) (xy 148.300217 88.716617) + (xy 148.528887 88.875547) (xy 148.581348 88.898466) (xy 148.563936 88.905502) (xy 148.330917 89.057985) (xy 148.191512 89.1945) + (xy 147.089066 89.1945) (xy 145.7555 87.860934) (xy 145.7555 81.635317) (xy 145.801571 81.683025) (xy 146.020016 81.834849) + (xy 146.26379 81.941351) (xy 146.523608 81.998476) (xy 146.789573 82.004047) (xy 147.051555 81.957852) (xy 147.299575 81.861652) + (xy 147.524186 81.719109) (xy 147.627735 81.6205) (xy 148.185934 81.6205) (xy 148.2495 81.684065) (xy 148.2495 82.787714) + (xy 148.131953 82.902825) (xy 147.974623 83.1326) (xy 147.86492 83.388557) (xy 147.807021 83.660948) (xy 147.803133 83.939397) + (xy 147.853404 84.213299) (xy 147.955918 84.47222) (xy 148.106771 84.706298) (xy 148.300217 84.906617) (xy 148.528887 85.065547) + (xy 148.784073 85.177035) (xy 149.056053 85.236834) (xy 149.334468 85.242666) (xy 149.608714 85.194309) (xy 149.868344 85.093605) + (xy 150.10347 84.94439) (xy 150.305134 84.752347) (xy 150.465657 84.524791) (xy 150.578924 84.27039) (xy 150.64062 83.998834) + (xy 150.645061 83.680762) (xy 150.590971 83.407589) (xy 150.484852 83.150125) (xy 150.330746 82.918176) (xy 150.2005 82.787017) + (xy 150.2005 81.28) (xy 150.191705 81.190307) (xy 150.183853 81.100556) (xy 150.182423 81.095633) (xy 150.181922 81.090524) + (xy 150.155865 81.00422) (xy 150.130738 80.91773) (xy 150.128377 80.913175) (xy 150.126895 80.908266) (xy 150.084606 80.828732) + (xy 150.043124 80.748705) (xy 150.039922 80.744694) (xy 150.037515 80.740167) (xy 149.980582 80.670361) (xy 149.924347 80.599916) + (xy 149.917307 80.592777) (xy 149.917186 80.592629) (xy 149.917048 80.592515) (xy 149.914783 80.590218) (xy 149.279783 79.955217) + (xy 149.210119 79.897995) (xy 149.141125 79.840102) (xy 149.136632 79.837632) (xy 149.132666 79.834374) (xy 149.05322 79.791775) + (xy 148.97429 79.748383) (xy 148.9694 79.746832) (xy 148.96488 79.744408) (xy 148.878726 79.718068) (xy 148.792818 79.690817) + (xy 148.787717 79.690244) (xy 148.782815 79.688746) (xy 148.6932 79.679643) (xy 148.60362 79.669595) (xy 148.593592 79.669525) + (xy 148.593405 79.669506) (xy 148.59323 79.669522) (xy 148.59 79.6695) (xy 147.628088 79.6695) (xy 147.55385 79.594741) + (xy 147.333306 79.445983) (xy 147.088069 79.342894) (xy 146.827479 79.289403) (xy 146.561462 79.287546) (xy 146.300151 79.337394) + (xy 146.053498 79.437048) (xy 145.830899 79.582712) (xy 145.7555 79.656548) (xy 145.7555 75.969065) (xy 148.009782 73.714783) + (xy 148.066975 73.645154) (xy 148.124898 73.576125) (xy 148.127368 73.571632) (xy 148.130625 73.567667) (xy 148.173205 73.488254) + (xy 148.216617 73.40929) (xy 148.218168 73.404398) (xy 148.220591 73.399881) (xy 148.246925 73.313745) (xy 148.274183 73.227818) + (xy 148.274754 73.222719) (xy 148.276254 73.217816) (xy 148.285357 73.128195) (xy 148.295405 73.03862) (xy 148.295474 73.028592) + (xy 148.295494 73.028405) (xy 148.295477 73.02823) (xy 148.2955 73.025) (xy 148.2955 71.12) (xy 148.286701 71.030266) + (xy 148.278853 70.940555) (xy 148.277422 70.935632) (xy 148.276922 70.930524) (xy 148.250869 70.844232) (xy 148.225738 70.75773) + (xy 148.223377 70.753175) (xy 148.221895 70.748266) (xy 148.179596 70.668713) (xy 148.138123 70.588704) (xy 148.134922 70.584694) + (xy 148.132515 70.580167) (xy 148.075573 70.510349) (xy 148.019346 70.439915) (xy 148.012307 70.432777) (xy 148.012186 70.432629) + (xy 148.012048 70.432515) (xy 148.009782 70.430217) (xy 147.487502 69.907936) (xy 147.487502 69.772002) (xy 147.652 69.9365) + (xy 148.083307 69.9365) (xy 148.210431 69.911213) (xy 148.33018 69.861612) (xy 148.43795 69.789602) (xy 148.529602 69.697951) + (xy 148.601612 69.59018) (xy 148.651213 69.470432) (xy 148.6765 69.343308) (xy 148.6765 69.213693) (xy 148.6765 68.912) + (xy 148.6765 68.248) (xy 148.6765 67.946307) (xy 148.6765 67.816692) (xy 148.651213 67.689568) (xy 148.601612 67.56982) + (xy 148.529602 67.462049) (xy 148.43795 67.370398) (xy 148.33018 67.298388) (xy 148.210431 67.248787) (xy 148.083307 67.2235) (xy 147.652 67.2235) (xy 147.4875 67.388) (xy 147.4875 68.4125) (xy 148.512 68.4125) (xy 148.6765 68.248) - (xy 148.676961 67.941425) (xy 148.676961 69.218575) (xy 148.6765 68.912) (xy 148.512 68.7475) (xy 147.6375 68.7475) - (xy 147.4875 68.7475) (xy 147.1525 68.7475) (xy 147.1525 68.4125) (xy 147.1525 68.2625) (xy 147.1525 67.388) - (xy 146.988 67.2235) (xy 146.55698 67.223473) (xy 146.430397 67.248537) (xy 146.311094 67.29771) (xy 146.203613 67.36912) - (xy 146.11205 67.460046) (xy 146.039892 67.567025) (xy 145.989887 67.685983) (xy 145.963939 67.812387) (xy 145.96326 67.909599) - (xy 145.836298 67.718504) (xy 145.648849 67.529742) (xy 145.428306 67.380984) (xy 145.183069 67.277895) (xy 144.922479 67.224404) - (xy 144.656462 67.222547) (xy 144.395151 67.272395) (xy 144.148498 67.372049) (xy 143.9259 67.517713) (xy 143.735833 67.70384) - (xy 143.585539 67.923339) (xy 143.480741 68.167851) (xy 143.425432 68.428061) (xy 143.421717 68.694058) (xy 143.46974 68.955711) - (xy 143.567669 69.203053) (xy 143.711776 69.426664) (xy 143.896572 69.618025) (xy 144.115017 69.769848) (xy 144.300205 69.850755) - (xy 144.148498 69.912049) (xy 143.9259 70.057713) (xy 143.837275 70.1445) (xy 140.097581 70.1445) (xy 139.974521 70.020578) - (xy 139.743654 69.864856) (xy 139.486937 69.756942) (xy 139.214149 69.700947) (xy 138.935679 69.699002) (xy 138.662135 69.751184) - (xy 138.403937 69.855503) (xy 138.170918 70.007986) (xy 137.971954 70.202826) (xy 137.814624 70.4326) (xy 137.704921 70.688557) - (xy 137.647022 70.960948) (xy 137.643134 71.239397) (xy 137.693405 71.513299) (xy 137.795918 71.772219) (xy 137.946771 72.006297) - (xy 138.140217 72.206616) (xy 138.368888 72.365546) (xy 138.624073 72.477034) (xy 138.896053 72.536833) (xy 139.106679 72.541245) - (xy 140.6295 74.064065) (xy 140.6295 77.700934) (xy 140.421533 77.908901) (xy 140.480619 77.648834) (xy 140.48506 77.330762) - (xy 140.43097 77.057589) (xy 140.324851 76.800125) (xy 140.170745 76.568176) (xy 139.974521 76.370578) (xy 139.743654 76.214856) - (xy 139.486937 76.106942) (xy 139.214149 76.050947) (xy 138.935679 76.049002) (xy 138.662135 76.101184) (xy 138.403937 76.205503) - (xy 138.170918 76.357986) (xy 137.971954 76.552826) (xy 137.814624 76.7826) (xy 137.704921 77.038557) (xy 137.647022 77.310948) - (xy 137.643134 77.589397) (xy 137.693405 77.863299) (xy 137.795918 78.122219) (xy 137.946771 78.356297) (xy 138.140217 78.556616) - (xy 138.368888 78.715546) (xy 138.624073 78.827034) (xy 138.896053 78.886833) (xy 139.174468 78.892665) (xy 139.448714 78.844308) - (xy 139.509832 78.820601) (xy 139.04219 79.288243) (xy 138.30198 79.288473) (xy 138.175397 79.313537) (xy 138.056094 79.36271) - (xy 137.948613 79.43412) (xy 137.85705 79.525046) (xy 137.784892 79.632025) (xy 137.734887 79.750983) (xy 137.708939 79.877387) - (xy 137.708039 80.006425) (xy 137.708473 81.40802) (xy 137.733537 81.534603) (xy 137.78271 81.653906) (xy 137.85412 81.761387) - (xy 137.945046 81.85295) (xy 138.052025 81.925108) (xy 138.170983 81.975113) (xy 138.297387 82.001061) (xy 138.426425 82.001961) - (xy 139.82802 82.001527) (xy 139.954603 81.976463) (xy 140.073906 81.92729) (xy 140.181387 81.85588) (xy 140.27295 81.764954) - (xy 140.345108 81.657975) (xy 140.395113 81.539017) (xy 140.421061 81.412613) (xy 140.421961 81.283575) (xy 140.42177 80.667795) + (xy 148.6765 68.912) (xy 148.512 68.7475) (xy 147.4875 68.7475) (xy 147.4875 68.7675) (xy 147.1525 68.7675) + (xy 147.1525 68.7475) (xy 147.1325 68.7475) (xy 147.1325 68.4125) (xy 147.1525 68.4125) (xy 147.1525 67.388) + (xy 146.988 67.2235) (xy 146.556693 67.2235) (xy 146.429569 67.248787) (xy 146.30982 67.298388) (xy 146.20205 67.370398) + (xy 146.110398 67.462049) (xy 146.038388 67.56982) (xy 145.988787 67.689568) (xy 145.9635 67.816692) (xy 145.9635 67.909956) + (xy 145.836299 67.718504) (xy 145.64885 67.529741) (xy 145.428306 67.380983) (xy 145.183069 67.277894) (xy 144.922479 67.224403) + (xy 144.656462 67.222546) (xy 144.395151 67.272394) (xy 144.148498 67.372048) (xy 143.925899 67.517712) (xy 143.735832 67.703839) + (xy 143.585538 67.923339) (xy 143.48074 68.16785) (xy 143.425431 68.428061) (xy 143.421716 68.694058) (xy 143.469739 68.955711) + (xy 143.567669 69.203054) (xy 143.711776 69.426664) (xy 143.896571 69.618025) (xy 144.115016 69.769849) (xy 144.300203 69.850755) + (xy 144.148498 69.912048) (xy 143.925899 70.057712) (xy 143.837273 70.1445) (xy 140.097582 70.1445) (xy 139.974522 70.020577) + (xy 139.743654 69.864855) (xy 139.486937 69.756941) (xy 139.214149 69.700946) (xy 138.935679 69.699001) (xy 138.662135 69.751183) + (xy 138.403936 69.855502) (xy 138.170917 70.007985) (xy 137.971953 70.202825) (xy 137.814623 70.4326) (xy 137.70492 70.688557) + (xy 137.647021 70.960948) (xy 137.643133 71.239397) (xy 137.693404 71.513299) (xy 137.795918 71.77222) (xy 137.946771 72.006298) + (xy 138.140217 72.206617) (xy 138.368887 72.365547) (xy 138.624073 72.477035) (xy 138.896053 72.536834) (xy 139.10668 72.541246) + (xy 140.6295 74.064065) (xy 140.6295 77.700934) (xy 140.421534 77.9089) (xy 140.48062 77.648834) (xy 140.485061 77.330762) + (xy 140.430971 77.057589) (xy 140.324852 76.800125) (xy 140.170746 76.568176) (xy 139.974522 76.370577) (xy 139.743654 76.214855) + (xy 139.486937 76.106941) (xy 139.214149 76.050946) (xy 138.935679 76.049001) (xy 138.662135 76.101183) (xy 138.403936 76.205502) + (xy 138.170917 76.357985) (xy 137.971953 76.552825) (xy 137.814623 76.7826) (xy 137.70492 77.038557) (xy 137.647021 77.310948) + (xy 137.643133 77.589397) (xy 137.693404 77.863299) (xy 137.795918 78.12222) (xy 137.946771 78.356298) (xy 138.140217 78.556617) + (xy 138.368887 78.715547) (xy 138.624073 78.827035) (xy 138.896053 78.886834) (xy 139.174468 78.892666) (xy 139.448714 78.844309) + (xy 139.509831 78.820603) (xy 139.041934 79.2885) (xy 138.301693 79.2885) (xy 138.174569 79.313787) (xy 138.05482 79.363388) + (xy 137.94705 79.435398) (xy 137.855398 79.527049) (xy 137.783388 79.63482) (xy 137.733787 79.754568) (xy 137.7085 79.881692) + (xy 137.7085 80.011307) (xy 137.7085 81.408307) (xy 137.733787 81.535431) (xy 137.783388 81.65518) (xy 137.855398 81.76295) + (xy 137.947049 81.854602) (xy 138.05482 81.926612) (xy 138.174568 81.976213) (xy 138.301692 82.0015) (xy 138.431307 82.0015) + (xy 139.828307 82.0015) (xy 139.955431 81.976213) (xy 140.07518 81.926612) (xy 140.18295 81.854602) (xy 140.274602 81.762951) + (xy 140.346612 81.65518) (xy 140.396213 81.535432) (xy 140.4215 81.408308) (xy 140.4215 81.278693) (xy 140.4215 80.668065) (xy 142.294782 78.794783) (xy 142.351975 78.725154) (xy 142.409898 78.656125) (xy 142.412368 78.651632) (xy 142.415625 78.647667) (xy 142.458205 78.568254) (xy 142.501617 78.48929) (xy 142.503168 78.484398) (xy 142.505591 78.479881) (xy 142.531925 78.393745) (xy 142.559183 78.307818) (xy 142.559754 78.302719) (xy 142.561254 78.297816) (xy 142.570357 78.208195) (xy 142.580405 78.11862) @@ -3387,10 +3357,10 @@ (xy 142.571701 73.570266) (xy 142.563853 73.480555) (xy 142.562422 73.475632) (xy 142.561922 73.470524) (xy 142.535869 73.384232) (xy 142.510738 73.29773) (xy 142.508377 73.293175) (xy 142.506895 73.288266) (xy 142.464596 73.208713) (xy 142.423123 73.128704) (xy 142.419922 73.124694) (xy 142.417515 73.120167) (xy 142.360573 73.050349) (xy 142.304346 72.979915) (xy 142.297307 72.972777) - (xy 142.297186 72.972629) (xy 142.297048 72.972515) (xy 142.294782 72.970217) (xy 141.420065 72.0955) (xy 143.836192 72.0955) - (xy 143.896572 72.158025) (xy 144.115017 72.309848) (xy 144.35879 72.41635) (xy 144.618608 72.473475) (xy 144.884573 72.479046) - (xy 145.146555 72.432851) (xy 145.394574 72.336651) (xy 145.619185 72.194108) (xy 145.811832 72.010653) (xy 145.965176 71.793274) - (xy 146.073378 71.55025) (xy 146.128419 71.307984) (xy 146.3445 71.524065) (xy 146.3445 72.620934) (xy 144.090217 74.875217) + (xy 142.297186 72.972629) (xy 142.297048 72.972515) (xy 142.294782 72.970217) (xy 141.420065 72.0955) (xy 143.836191 72.0955) + (xy 143.896571 72.158025) (xy 144.115016 72.309849) (xy 144.35879 72.416351) (xy 144.618608 72.473476) (xy 144.884573 72.479047) + (xy 145.146555 72.432852) (xy 145.394575 72.336652) (xy 145.619186 72.194109) (xy 145.811833 72.010654) (xy 145.965177 71.793274) + (xy 146.073379 71.55025) (xy 146.12842 71.307985) (xy 146.3445 71.524065) (xy 146.3445 72.620934) (xy 144.090217 74.875217) (xy 144.032995 74.94488) (xy 143.975102 75.013875) (xy 143.972632 75.018367) (xy 143.969374 75.022334) (xy 143.926775 75.101779) (xy 143.883383 75.18071) (xy 143.881832 75.185599) (xy 143.879408 75.19012) (xy 143.853068 75.276273) (xy 143.825817 75.362182) (xy 143.825244 75.367282) (xy 143.823746 75.372185) (xy 143.814643 75.461799) (xy 143.804595 75.55138) (xy 143.804525 75.561407) @@ -3398,718 +3368,761 @@ (xy 143.821147 88.444445) (xy 143.822577 88.449367) (xy 143.823078 88.454476) (xy 143.84913 88.540767) (xy 143.874262 88.62727) (xy 143.876622 88.631823) (xy 143.878105 88.636734) (xy 143.920414 88.716307) (xy 143.961877 88.796295) (xy 143.965075 88.800302) (xy 143.967485 88.804833) (xy 144.024444 88.874672) (xy 144.080654 88.945085) (xy 144.087696 88.952226) (xy 144.087814 88.952371) - (xy 144.087947 88.952481) (xy 144.090217 88.954783) (xy 145.995217 90.859782) (xy 146.064845 90.916975) (xy 146.133875 90.974898) - (xy 146.138367 90.977368) (xy 146.142333 90.980625) (xy 146.221745 91.023205) (xy 146.30071 91.066617) (xy 146.305601 91.068168) - (xy 146.310119 91.070591) (xy 146.396254 91.096925) (xy 146.482182 91.124183) (xy 146.48728 91.124754) (xy 146.492184 91.126254) - (xy 146.581804 91.135357) (xy 146.67138 91.145405) (xy 146.681407 91.145474) (xy 146.681595 91.145494) (xy 146.681769 91.145477) - (xy 146.685 91.1455) (xy 148.192913 91.1455) (xy 148.300217 91.256616) (xy 148.528888 91.415546) (xy 148.784073 91.527034) - (xy 149.056053 91.586833) (xy 149.334468 91.592665) (xy 149.608714 91.544308) (xy 149.868344 91.443604) (xy 150.103469 91.294389) - (xy 150.305134 91.102346) (xy 150.465656 90.874791) (xy 150.578923 90.62039) (xy 150.640619 90.348834) (xy 150.64506 90.030762) - (xy 150.59097 89.757589) (xy 150.484851 89.500125) (xy 150.330745 89.268176) (xy 150.134521 89.070578) (xy 149.903654 88.914856) - (xy 149.871747 88.901443) (xy 150.103469 88.754389) (xy 150.259817 88.6055) (xy 152.373941 88.6055) (xy 152.38771 88.638906) - (xy 152.45912 88.746387) (xy 152.550046 88.83795) (xy 152.657025 88.910108) (xy 152.775983 88.960113) (xy 152.902387 88.986061) - (xy 153.031425 88.986961) (xy 154.43302 88.986527) (xy 154.559603 88.961463) (xy 154.678906 88.91229) (xy 154.786387 88.84088) - (xy 154.87795 88.749954) (xy 154.950108 88.642975) (xy 155.000113 88.524017) (xy 155.026061 88.397613) (xy 155.026796 88.292109) - (xy 155.252365 88.350755) (xy 155.973119 87.63) (xy 155.973119 88.103761) (xy 155.489245 88.587635) (xy 155.550395 88.822838) - (xy 155.794647 88.928238) (xy 156.05472 88.984189) (xy 156.320707 88.98856) (xy 156.582478 88.941183) (xy 156.830061 88.843864) - (xy 156.869605 88.822838) (xy 156.930755 88.587635) (xy 156.930755 96.197365) (xy 156.869605 95.962162) (xy 156.625353 95.856762) - (xy 156.36528 95.800811) (xy 156.099293 95.79644) (xy 155.837522 95.843817) (xy 155.589939 95.941136) (xy 155.550395 95.962162) - (xy 155.489245 96.197365) (xy 156.21 96.918119) (xy 156.930755 96.197365) (xy 156.930755 96.671125) (xy 156.446881 97.155) - (xy 157.167635 97.875755) (xy 157.402838 97.814605) (xy 157.508238 97.570353) (xy 157.564189 97.31028) (xy 157.56856 97.044293) - (xy 157.56856 100.308995) (xy 155.650677 98.391112) (xy 155.794647 98.453238) (xy 156.05472 98.509189) (xy 156.320707 98.51356) - (xy 156.582478 98.466183) (xy 156.830061 98.368864) (xy 156.869605 98.347838) (xy 156.930755 98.112635) (xy 156.316066 97.497947) - (xy 156.21 97.391881) (xy 155.973119 97.155) (xy 155.867053 97.048934) (xy 155.252365 96.434245) (xy 155.026558 96.492952) - (xy 155.026527 96.39198) (xy 155.001463 96.265397) (xy 154.95229 96.146094) (xy 154.88088 96.038613) (xy 154.789954 95.94705) - (xy 154.682975 95.874892) (xy 154.564017 95.824887) (xy 154.437613 95.798939) (xy 154.308575 95.798039) (xy 152.90698 95.798473) - (xy 152.780397 95.823537) (xy 152.661094 95.87271) (xy 152.553613 95.94412) (xy 152.46205 96.035046) (xy 152.389892 96.142025) - (xy 152.339887 96.260983) (xy 152.313939 96.387387) (xy 152.313039 96.516425) (xy 152.313473 97.91802) (xy 152.338537 98.044603) - (xy 152.38771 98.163906) (xy 152.45912 98.271387) (xy 152.550046 98.36295) (xy 152.657025 98.435108) (xy 152.775983 98.485113) - (xy 152.902387 98.511061) (xy 153.012261 98.511827) (xy 156.69536 102.194925) (xy 156.693134 102.354397) (xy 156.743405 102.628299) - (xy 156.845918 102.887219) (xy 156.996771 103.121297) (xy 157.190217 103.321616) (xy 157.418888 103.480546) (xy 157.674073 103.592034) - (xy 157.946053 103.651833) (xy 158.224468 103.657665) (xy 158.498714 103.609308) (xy 158.758344 103.508604) (xy 158.993469 103.359389) - (xy 159.195134 103.167346) (xy 159.355656 102.939791) (xy 159.468923 102.68539) (xy 159.530619 102.413834) (xy 159.53506 102.095762) - (xy 159.53506 105.514) (xy 159.232973 105.514) (xy 149.414487 95.695513) (xy 149.331208 95.627107) (xy 149.248752 95.557918) + (xy 144.087947 88.952481) (xy 144.090217 88.954783) (xy 145.995217 90.859783) (xy 146.06488 90.917004) (xy 146.133875 90.974898) + (xy 146.138367 90.977367) (xy 146.142334 90.980626) (xy 146.221779 91.023224) (xy 146.30071 91.066617) (xy 146.305599 91.068167) + (xy 146.31012 91.070592) (xy 146.396314 91.096944) (xy 146.482182 91.124183) (xy 146.487277 91.124754) (xy 146.492185 91.126255) + (xy 146.581849 91.135362) (xy 146.67138 91.145405) (xy 146.681407 91.145474) (xy 146.681595 91.145494) (xy 146.681769 91.145477) + (xy 146.685 91.1455) (xy 148.192912 91.1455) (xy 148.300217 91.256617) (xy 148.528887 91.415547) (xy 148.784073 91.527035) + (xy 149.056053 91.586834) (xy 149.334468 91.592666) (xy 149.608714 91.544309) (xy 149.868344 91.443605) (xy 150.10347 91.29439) + (xy 150.305134 91.102347) (xy 150.465657 90.874791) (xy 150.578924 90.62039) (xy 150.64062 90.348834) (xy 150.645061 90.030762) + (xy 150.590971 89.757589) (xy 150.484852 89.500125) (xy 150.330746 89.268176) (xy 150.134522 89.070577) (xy 149.903654 88.914855) + (xy 149.871749 88.901443) (xy 150.10347 88.75439) (xy 150.259819 88.6055) (xy 152.374023 88.6055) (xy 152.388388 88.64018) + (xy 152.460398 88.74795) (xy 152.552049 88.839602) (xy 152.65982 88.911612) (xy 152.779568 88.961213) (xy 152.906692 88.9865) + (xy 153.036307 88.9865) (xy 154.433307 88.9865) (xy 154.560431 88.961213) (xy 154.68018 88.911612) (xy 154.78795 88.839602) + (xy 154.879602 88.747951) (xy 154.951612 88.64018) (xy 155.001213 88.520432) (xy 155.0265 88.393308) (xy 155.0265 88.292033) + (xy 155.252364 88.350755) (xy 155.973119 87.63) (xy 155.973119 88.103762) (xy 155.489245 88.587636) (xy 155.550394 88.822838) + (xy 155.795779 88.928601) (xy 156.057083 88.984459) (xy 156.324263 88.988266) (xy 156.587052 88.939876) (xy 156.835351 88.841148) + (xy 156.869606 88.822838) (xy 156.930755 88.587636) (xy 156.930755 96.197364) (xy 156.869606 95.962162) (xy 156.624221 95.856399) + (xy 156.362917 95.800541) (xy 156.095737 95.796734) (xy 155.832948 95.845124) (xy 155.584649 95.943852) (xy 155.550394 95.962162) + (xy 155.489245 96.197364) (xy 156.21 96.918119) (xy 156.930755 96.197364) (xy 156.930755 96.671126) (xy 156.446881 97.155) + (xy 157.167636 97.875755) (xy 157.402838 97.814606) (xy 157.508601 97.569221) (xy 157.564459 97.307917) (xy 157.568266 97.040737) + (xy 157.568266 100.3087) (xy 155.650588 98.391022) (xy 155.795779 98.453601) (xy 156.057083 98.509459) (xy 156.324263 98.513266) + (xy 156.587052 98.464876) (xy 156.835351 98.366148) (xy 156.869606 98.347838) (xy 156.930755 98.112636) (xy 156.21 97.391881) + (xy 156.195858 97.406022) (xy 155.958977 97.169142) (xy 155.973119 97.155) (xy 155.252364 96.434245) (xy 155.0265 96.492966) + (xy 155.0265 96.391693) (xy 155.001213 96.264569) (xy 154.951612 96.14482) (xy 154.879602 96.03705) (xy 154.787951 95.945398) + (xy 154.68018 95.873388) (xy 154.560432 95.823787) (xy 154.433308 95.7985) (xy 154.303693 95.7985) (xy 152.906693 95.7985) + (xy 152.779569 95.823787) (xy 152.65982 95.873388) (xy 152.55205 95.945398) (xy 152.460398 96.037049) (xy 152.388388 96.14482) + (xy 152.338787 96.264568) (xy 152.3135 96.391692) (xy 152.3135 96.521307) (xy 152.3135 97.918307) (xy 152.338787 98.045431) + (xy 152.388388 98.16518) (xy 152.460398 98.27295) (xy 152.552049 98.364602) (xy 152.65982 98.436612) (xy 152.779568 98.486213) + (xy 152.906692 98.5115) (xy 153.011934 98.5115) (xy 156.695359 102.194924) (xy 156.693133 102.354397) (xy 156.743404 102.628299) + (xy 156.845918 102.88722) (xy 156.996771 103.121298) (xy 157.190217 103.321617) (xy 157.418887 103.480547) (xy 157.674073 103.592035) + (xy 157.946053 103.651834) (xy 158.224468 103.657666) (xy 158.498714 103.609309) (xy 158.758344 103.508605) (xy 158.99347 103.35939) + (xy 159.195134 103.167347) (xy 159.355657 102.939791) (xy 159.468924 102.68539) (xy 159.53062 102.413834) (xy 159.535061 102.095762) + (xy 159.535061 105.514) (xy 159.232973 105.514) (xy 149.414487 95.695513) (xy 149.331208 95.627107) (xy 149.248752 95.557918) (xy 149.24338 95.554964) (xy 149.238641 95.551072) (xy 149.143699 95.500164) (xy 149.049336 95.448288) (xy 149.043492 95.446434) (xy 149.038089 95.443537) (xy 148.935097 95.412049) (xy 148.832425 95.37948) (xy 148.82633 95.378796) (xy 148.820468 95.377004) - (xy 148.713345 95.366123) (xy 148.60628 95.354114) (xy 148.60367 95.354095) (xy 148.59438 95.340113) (xy 148.503454 95.24855) - (xy 148.396475 95.176392) (xy 148.277517 95.126387) (xy 148.151113 95.100439) (xy 148.022075 95.099539) (xy 146.49348 95.099973) - (xy 146.366897 95.125037) (xy 146.247594 95.17421) (xy 146.140113 95.24562) (xy 146.04855 95.336546) (xy 146.036777 95.354) - (xy 144.78 95.354) (xy 144.671612 95.354) (xy 144.629954 95.31205) (xy 144.522975 95.239892) (xy 144.404017 95.189887) - (xy 144.277613 95.163939) (xy 144.148575 95.163039) (xy 142.74698 95.163473) (xy 142.620397 95.188537) (xy 142.501094 95.23771) - (xy 142.393613 95.30912) (xy 142.30205 95.400046) (xy 142.229892 95.507025) (xy 142.179887 95.625983) (xy 142.153939 95.752387) - (xy 142.15326 95.849599) (xy 142.026298 95.658504) (xy 141.9455 95.57714) (xy 141.9455 85.09) (xy 141.936706 85.000311) + (xy 148.713345 95.366123) (xy 148.60628 95.354114) (xy 148.603488 95.354094) (xy 148.593102 95.33855) (xy 148.501451 95.246898) + (xy 148.39368 95.174888) (xy 148.273932 95.125287) (xy 148.146808 95.1) (xy 148.017193 95.1) (xy 146.493193 95.1) + (xy 146.366069 95.125287) (xy 146.24632 95.174888) (xy 146.13855 95.246898) (xy 146.046898 95.338549) (xy 146.036574 95.354) + (xy 144.78 95.354) (xy 144.671552 95.354) (xy 144.627951 95.310398) (xy 144.52018 95.238388) (xy 144.400432 95.188787) + (xy 144.273308 95.1635) (xy 144.143693 95.1635) (xy 142.746693 95.1635) (xy 142.619569 95.188787) (xy 142.49982 95.238388) + (xy 142.39205 95.310398) (xy 142.300398 95.402049) (xy 142.228388 95.50982) (xy 142.178787 95.629568) (xy 142.1535 95.756692) + (xy 142.1535 95.849956) (xy 142.026299 95.658504) (xy 141.9455 95.577138) (xy 141.9455 85.09) (xy 141.936706 85.000311) (xy 141.928853 84.910555) (xy 141.927422 84.905632) (xy 141.926922 84.900524) (xy 141.900869 84.814232) (xy 141.875738 84.72773) (xy 141.873377 84.723176) (xy 141.871895 84.718266) (xy 141.829585 84.638692) (xy 141.788123 84.558705) (xy 141.784924 84.554697) (xy 141.782515 84.550167) (xy 141.725555 84.480327) (xy 141.669346 84.409915) (xy 141.662303 84.402773) (xy 141.662186 84.402629) (xy 141.662052 84.402518) (xy 141.659783 84.400217) (xy 140.389783 83.130217) (xy 140.320119 83.072995) (xy 140.251125 83.015102) - (xy 140.246632 83.012632) (xy 140.242666 83.009374) (xy 140.225067 82.999937) (xy 140.170745 82.918176) (xy 139.974521 82.720578) - (xy 139.743654 82.564856) (xy 139.486937 82.456942) (xy 139.214149 82.400947) (xy 138.935679 82.399002) (xy 138.662135 82.451184) - (xy 138.403937 82.555503) (xy 138.170918 82.707986) (xy 137.971954 82.902826) (xy 137.814624 83.1326) (xy 137.704921 83.388557) - (xy 137.647022 83.660948) (xy 137.643134 83.939397) (xy 137.693405 84.213299) (xy 137.795918 84.472219) (xy 137.946771 84.706297) - (xy 138.140217 84.906616) (xy 138.368888 85.065546) (xy 138.624073 85.177034) (xy 138.896053 85.236833) (xy 139.174468 85.242665) - (xy 139.448714 85.194308) (xy 139.625983 85.125549) (xy 139.9945 85.494066) (xy 139.9945 86.550696) (xy 139.974521 86.530578) - (xy 139.743654 86.374856) (xy 139.486937 86.266942) (xy 139.214149 86.210947) (xy 138.935679 86.209002) (xy 138.662135 86.261184) - (xy 138.403937 86.365503) (xy 138.253417 86.464) (xy 135.536092 86.464) (xy 135.536092 82.447363) (xy 135.486617 82.148043) - (xy 135.379945 81.864033) (xy 135.333736 81.777127) (xy 135.079145 81.692736) (xy 134.842264 81.929617) (xy 134.842264 81.455855) - (xy 134.757873 81.201264) (xy 134.481182 81.076832) (xy 134.185593 81.008513) (xy 133.882363 80.998908) (xy 133.583043 81.048383) - (xy 133.299033 81.155055) (xy 133.212127 81.201264) (xy 133.127736 81.455855) (xy 133.985 82.313119) (xy 134.842264 81.455855) - (xy 134.842264 81.929617) (xy 134.221881 82.55) (xy 135.079145 83.407264) (xy 135.333736 83.322873) (xy 135.458168 83.046182) - (xy 135.526487 82.750593) (xy 135.536092 82.447363) (xy 135.536092 86.464) (xy 134.842264 86.464) (xy 134.842264 83.644145) - (xy 133.985 82.786881) (xy 133.748119 83.023762) (xy 133.748119 82.55) (xy 132.890855 81.692736) (xy 132.636264 81.777127) - (xy 132.511832 82.053818) (xy 132.443513 82.349407) (xy 132.433908 82.652637) (xy 132.483383 82.951957) (xy 132.590055 83.235967) - (xy 132.636264 83.322873) (xy 132.890855 83.407264) (xy 133.748119 82.55) (xy 133.748119 83.023762) (xy 133.127736 83.644145) - (xy 133.212127 83.898736) (xy 133.488818 84.023168) (xy 133.784407 84.091487) (xy 134.087637 84.101092) (xy 134.386957 84.051617) - (xy 134.670967 83.944945) (xy 134.757873 83.898736) (xy 134.842264 83.644145) (xy 134.842264 86.464) (xy 134.62 86.464) - (xy 134.467973 86.464) (xy 129.692776 81.688802) (xy 129.692776 78.631984) (xy 129.644699 78.35769) (xy 129.54426 78.097957) - (xy 129.514835 78.042616) (xy 129.273178 77.973703) (xy 129.036297 78.210584) (xy 129.036297 77.736822) (xy 128.967384 77.495165) - (xy 128.712312 77.383417) (xy 128.440394 77.323341) (xy 128.161984 77.317224) (xy 127.88769 77.365301) (xy 127.627957 77.46574) - (xy 127.572616 77.495165) (xy 127.503703 77.736822) (xy 128.27 78.503119) (xy 129.036297 77.736822) (xy 129.036297 78.210584) - (xy 128.506881 78.74) (xy 129.273178 79.506297) (xy 129.514835 79.437384) (xy 129.626583 79.182312) (xy 129.686659 78.910394) - (xy 129.692776 78.631984) (xy 129.692776 81.688802) (xy 128.162003 80.158029) (xy 128.378016 80.162776) (xy 128.65231 80.114699) - (xy 128.912043 80.01426) (xy 128.967384 79.984835) (xy 129.036297 79.743178) (xy 128.376066 79.082947) (xy 128.27 78.976881) - (xy 128.033119 78.74) (xy 127.927053 78.633934) (xy 127.266822 77.973703) (xy 127.025165 78.042616) (xy 126.913417 78.297688) - (xy 126.853341 78.569606) (xy 126.847224 78.848016) (xy 126.867174 78.961838) (xy 126.824336 78.938288) (xy 126.818492 78.936434) + (xy 140.246632 83.012632) (xy 140.242666 83.009374) (xy 140.225068 82.999938) (xy 140.170746 82.918176) (xy 139.974522 82.720577) + (xy 139.743654 82.564855) (xy 139.486937 82.456941) (xy 139.214149 82.400946) (xy 138.935679 82.399001) (xy 138.662135 82.451183) + (xy 138.403936 82.555502) (xy 138.170917 82.707985) (xy 137.971953 82.902825) (xy 137.814623 83.1326) (xy 137.70492 83.388557) + (xy 137.647021 83.660948) (xy 137.643133 83.939397) (xy 137.693404 84.213299) (xy 137.795918 84.47222) (xy 137.946771 84.706298) + (xy 138.140217 84.906617) (xy 138.368887 85.065547) (xy 138.624073 85.177035) (xy 138.896053 85.236834) (xy 139.174468 85.242666) + (xy 139.448714 85.194309) (xy 139.625984 85.12555) (xy 139.9945 85.494066) (xy 139.9945 86.550694) (xy 139.974522 86.530577) + (xy 139.743654 86.374855) (xy 139.486937 86.266941) (xy 139.214149 86.210946) (xy 138.935679 86.209001) (xy 138.662135 86.261183) + (xy 138.403936 86.365502) (xy 138.253414 86.464) (xy 135.535817 86.464) (xy 135.535817 82.443303) (xy 135.485203 82.142803) + (xy 135.376936 81.857952) (xy 135.333736 81.777127) (xy 135.079146 81.692735) (xy 134.842265 81.929616) (xy 134.842265 81.455854) + (xy 134.757873 81.201264) (xy 134.479897 81.076399) (xy 134.182902 81.008165) (xy 133.878303 80.999183) (xy 133.577803 81.049797) + (xy 133.292952 81.158064) (xy 133.212127 81.201264) (xy 133.127735 81.455854) (xy 133.985 82.313119) (xy 134.842265 81.455854) + (xy 134.842265 81.929616) (xy 134.221881 82.55) (xy 135.079146 83.407265) (xy 135.333736 83.322873) (xy 135.458601 83.044897) + (xy 135.526835 82.747902) (xy 135.535817 82.443303) (xy 135.535817 86.464) (xy 134.842265 86.464) (xy 134.842265 83.644146) + (xy 133.985 82.786881) (xy 133.748119 83.023762) (xy 133.748119 82.55) (xy 132.890854 81.692735) (xy 132.636264 81.777127) + (xy 132.511399 82.055103) (xy 132.443165 82.352098) (xy 132.434183 82.656697) (xy 132.484797 82.957197) (xy 132.593064 83.242048) + (xy 132.636264 83.322873) (xy 132.890854 83.407265) (xy 133.748119 82.55) (xy 133.748119 83.023762) (xy 133.127735 83.644146) + (xy 133.212127 83.898736) (xy 133.490103 84.023601) (xy 133.787098 84.091835) (xy 134.091697 84.100817) (xy 134.392197 84.050203) + (xy 134.677048 83.941936) (xy 134.757873 83.898736) (xy 134.842265 83.644146) (xy 134.842265 86.464) (xy 134.62 86.464) + (xy 134.467973 86.464) (xy 129.69249 81.688516) (xy 129.69249 78.628261) (xy 129.643358 78.352894) (xy 129.541449 78.092403) + (xy 129.514836 78.042615) (xy 129.273179 77.973702) (xy 129.036298 78.210583) (xy 129.036298 77.736821) (xy 128.967385 77.495164) + (xy 128.71113 77.38303) (xy 128.437922 77.323043) (xy 128.158261 77.31751) (xy 127.882894 77.366642) (xy 127.622403 77.468551) + (xy 127.572615 77.495164) (xy 127.503702 77.736821) (xy 128.27 78.503119) (xy 129.036298 77.736821) (xy 129.036298 78.210583) + (xy 128.506881 78.74) (xy 129.273179 79.506298) (xy 129.514836 79.437385) (xy 129.62697 79.18113) (xy 129.686957 78.907922) + (xy 129.69249 78.628261) (xy 129.69249 81.688516) (xy 128.162118 80.158144) (xy 128.381739 80.16249) (xy 128.657106 80.113358) + (xy 128.917597 80.011449) (xy 128.967385 79.984836) (xy 129.036298 79.743179) (xy 128.27 78.976881) (xy 128.255857 78.991022) + (xy 128.018976 78.754141) (xy 128.033119 78.74) (xy 127.266821 77.973702) (xy 127.025164 78.042615) (xy 126.91303 78.29887) + (xy 126.853043 78.572078) (xy 126.84751 78.851739) (xy 126.867152 78.961826) (xy 126.824336 78.938288) (xy 126.818492 78.936434) (xy 126.813089 78.933537) (xy 126.710097 78.902049) (xy 126.607425 78.86948) (xy 126.60133 78.868796) (xy 126.595468 78.867004) (xy 126.488345 78.856123) (xy 126.38128 78.844114) (xy 126.369286 78.84403) (xy 126.36907 78.844008) (xy 126.368868 78.844027) - (xy 126.365 78.844) (xy 124.991 78.844) (xy 124.991 68.744705) (xy 125.22992 68.849087) (xy 125.538388 68.916908) - (xy 125.854154 68.923522) (xy 126.165191 68.868678) (xy 126.459652 68.754464) (xy 126.72632 68.585231) (xy 126.955039 68.367425) - (xy 127.137097 68.109342) (xy 127.265558 67.820812) (xy 127.335531 67.512826) (xy 127.340569 67.152082) (xy 127.279222 66.842262) - (xy 127.158867 66.550258) (xy 126.984086 66.287192) (xy 126.761538 66.063085) (xy 126.499699 65.886472) (xy 126.208542 65.764081) - (xy 125.899158 65.700573) (xy 125.58333 65.698368) (xy 125.273089 65.75755) (xy 124.980252 65.875864) (xy 124.715972 66.048804) - (xy 124.61876 66.144) (xy 123.825 66.144) (xy 123.672973 66.144) (xy 121.474487 63.945513) (xy 121.391208 63.877107) - (xy 121.308752 63.807918) (xy 121.30338 63.804964) (xy 121.298641 63.801072) (xy 121.203699 63.750164) (xy 121.109336 63.698288) - (xy 121.103492 63.696434) (xy 121.098089 63.693537) (xy 120.995097 63.662049) (xy 120.892425 63.62948) (xy 120.88633 63.628796) - (xy 120.880468 63.627004) (xy 120.773345 63.616123) (xy 120.66628 63.604114) (xy 120.654286 63.60403) (xy 120.65407 63.604008) - (xy 120.653868 63.604027) (xy 120.65 63.604) (xy 119.32264 63.604) (xy 119.290917 63.577381) (xy 119.16201 63.506513) - (xy 119.17126 63.502509) (xy 119.404986 63.341211) (xy 119.602931 63.137587) (xy 119.757555 62.899393) (xy 119.857383 62.620025) - (xy 119.857383 61.839975) (xy 119.757555 61.560607) (xy 119.602931 61.322413) (xy 119.404986 61.118789) (xy 119.174895 60.96) - (xy 119.404986 60.801211) (xy 119.602931 60.597587) (xy 119.757555 60.359393) (xy 119.857383 60.080025) (xy 119.735501 59.8575) - (xy 118.2775 59.8575) (xy 118.2775 60.7846) (xy 118.2775 61.1354) (xy 118.2775 62.0625) (xy 119.735501 62.0625) - (xy 119.857383 61.839975) (xy 119.857383 62.620025) (xy 119.735501 62.3975) (xy 118.4275 62.3975) (xy 118.2775 62.3975) - (xy 117.9425 62.3975) (xy 117.9425 62.0625) (xy 117.9425 61.1354) (xy 117.9425 60.7846) (xy 117.9425 59.8575) - (xy 116.484499 59.8575) (xy 116.362617 60.080025) (xy 116.462445 60.359393) (xy 116.617069 60.597587) (xy 116.815014 60.801211) - (xy 117.045104 60.96) (xy 116.815014 61.118789) (xy 116.617069 61.322413) (xy 116.462445 61.560607) (xy 116.362617 61.839975) - (xy 116.484499 62.0625) (xy 117.9425 62.0625) (xy 117.9425 62.3975) (xy 117.7925 62.3975) (xy 116.484499 62.3975) - (xy 116.362617 62.620025) (xy 116.462445 62.899393) (xy 116.617069 63.137587) (xy 116.815014 63.341211) (xy 117.04874 63.502509) - (xy 117.057924 63.506485) (xy 116.945814 63.566096) (xy 116.727208 63.744386) (xy 116.547395 63.961743) (xy 116.413225 64.209885) - (xy 116.329808 64.479362) (xy 116.300321 64.759909) (xy 116.325888 65.040841) (xy 116.405534 65.311456) (xy 116.536227 65.561448) - (xy 116.712987 65.781293) (xy 116.929083 65.962619) (xy 117.176282 66.098518) (xy 117.44517 66.183815) (xy 117.725505 66.215259) - (xy 117.745686 66.2154) (xy 118.474314 66.2154) (xy 118.75506 66.187873) (xy 119.025113 66.106339) (xy 119.274186 65.973904) - (xy 119.320661 65.936) (xy 120.167026 65.936) (xy 122.365513 68.134486) (xy 122.448761 68.202867) (xy 122.531248 68.272082) - (xy 122.536619 68.275035) (xy 122.541359 68.278928) (xy 122.6363 68.329835) (xy 122.659 68.342314) (xy 122.659 79.375) - (xy 122.669509 79.482188) (xy 122.678897 79.589487) (xy 122.680607 79.595375) (xy 122.681206 79.601477) (xy 122.712345 79.704616) - (xy 122.742386 79.808015) (xy 122.745205 79.813455) (xy 122.746979 79.819328) (xy 122.797558 79.914453) (xy 122.84711 80.010049) - (xy 122.850935 80.01484) (xy 122.853814 80.020255) (xy 122.921876 80.103707) (xy 122.989082 80.187894) (xy 122.997505 80.196436) - (xy 122.997641 80.196603) (xy 122.997794 80.19673) (xy 123.000513 80.199487) (xy 123.635513 80.834486) (xy 123.718756 80.902863) - (xy 123.801248 80.972082) (xy 123.80662 80.975035) (xy 123.811358 80.978927) (xy 123.906282 81.029825) (xy 124.000664 81.081712) - (xy 124.006507 81.083565) (xy 124.011911 81.086463) (xy 124.114902 81.11795) (xy 124.217575 81.15052) (xy 124.223669 81.151203) - (xy 124.229532 81.152996) (xy 124.336659 81.163877) (xy 124.44372 81.175886) (xy 124.455712 81.175969) (xy 124.455929 81.175992) - (xy 124.45613 81.175972) (xy 124.46 81.176) (xy 125.882026 81.176) (xy 133.160513 88.454486) (xy 133.243761 88.522867) - (xy 133.326248 88.592082) (xy 133.331619 88.595035) (xy 133.336359 88.598928) (xy 133.4313 88.649835) (xy 133.454 88.662314) - (xy 133.454 89.052026) (xy 130.327026 92.179) (xy 128.594199 92.179) (xy 128.670604 92.130512) (xy 128.908341 91.904118) - (xy 129.097577 91.635859) (xy 129.231103 91.335953) (xy 129.303835 91.015823) (xy 129.309071 90.640856) (xy 129.309071 85.560856) - (xy 129.245306 85.23882) (xy 129.120205 84.935302) (xy 128.938533 84.661864) (xy 128.70721 84.42892) (xy 128.435047 84.245344) - (xy 128.13241 84.118127) (xy 127.810827 84.052116) (xy 127.482547 84.049824) (xy 127.160074 84.111339) (xy 126.879332 84.224766) - (xy 121.6255 78.970934) (xy 121.6255 76.2) (xy 121.616702 76.11027) (xy 121.608853 76.020555) (xy 121.607422 76.015632) - (xy 121.606922 76.010524) (xy 121.580869 75.924232) (xy 121.555738 75.83773) (xy 121.553377 75.833175) (xy 121.551895 75.828266) - (xy 121.509596 75.748713) (xy 121.468123 75.668704) (xy 121.464922 75.664694) (xy 121.462515 75.660167) (xy 121.405573 75.590349) - (xy 121.349346 75.519915) (xy 121.342307 75.512777) (xy 121.342186 75.512629) (xy 121.342048 75.512515) (xy 121.339782 75.510217) - (xy 120.704783 74.875217) (xy 120.635119 74.817995) (xy 120.566125 74.760102) (xy 120.561632 74.757632) (xy 120.557666 74.754374) - (xy 120.47822 74.711775) (xy 120.39929 74.668383) (xy 120.3944 74.666832) (xy 120.38988 74.664408) (xy 120.303726 74.638068) - (xy 120.217818 74.610817) (xy 120.212717 74.610244) (xy 120.207815 74.608746) (xy 120.1182 74.599643) (xy 120.02862 74.589595) - (xy 120.018592 74.589525) (xy 120.018405 74.589506) (xy 120.01823 74.589522) (xy 120.015 74.5895) (xy 119.142581 74.5895) - (xy 119.019521 74.465578) (xy 118.788654 74.309856) (xy 118.531937 74.201942) (xy 118.259149 74.145947) (xy 117.980679 74.144002) - (xy 117.707135 74.196184) (xy 117.448937 74.300503) (xy 117.215918 74.452986) (xy 117.016954 74.647826) (xy 116.859624 74.8776) - (xy 116.749921 75.133557) (xy 116.692022 75.405948) (xy 116.688134 75.684397) (xy 116.738405 75.958299) (xy 116.840918 76.217219) - (xy 116.991771 76.451297) (xy 117.185217 76.651616) (xy 117.413888 76.810546) (xy 117.669073 76.922034) (xy 117.941053 76.981833) - (xy 118.219468 76.987665) (xy 118.493714 76.939308) (xy 118.753344 76.838604) (xy 118.988469 76.689389) (xy 119.144817 76.5405) - (xy 119.610934 76.5405) (xy 119.6745 76.604065) (xy 119.6745 79.375) (xy 119.683293 79.464688) (xy 119.691147 79.554445) - (xy 119.692577 79.559367) (xy 119.693078 79.564476) (xy 119.71913 79.650767) (xy 119.744262 79.73727) (xy 119.746622 79.741823) - (xy 119.748105 79.746734) (xy 119.790414 79.826307) (xy 119.831877 79.906295) (xy 119.835075 79.910302) (xy 119.837485 79.914833) - (xy 119.894444 79.984672) (xy 119.950654 80.055085) (xy 119.957696 80.062226) (xy 119.957814 80.062371) (xy 119.957947 80.062481) - (xy 119.960217 80.064783) (xy 126.003222 86.107788) (xy 126.018063 86.188649) (xy 126.138914 86.493884) (xy 126.31675 86.769832) - (xy 126.544798 87.005983) (xy 126.814372 87.193341) (xy 127.115203 87.324771) (xy 127.435833 87.395266) (xy 127.764049 87.402141) - (xy 128.08735 87.345135) (xy 128.393421 87.226418) (xy 128.670604 87.050512) (xy 128.908341 86.824118) (xy 129.097577 86.555859) - (xy 129.231103 86.255953) (xy 129.303835 85.935823) (xy 129.309071 85.560856) (xy 129.309071 90.640856) (xy 129.245306 90.31882) - (xy 129.120205 90.015302) (xy 128.938533 89.741864) (xy 128.70721 89.50892) (xy 128.435047 89.325344) (xy 128.13241 89.198127) - (xy 127.810827 89.132116) (xy 127.482547 89.129824) (xy 127.160074 89.191339) (xy 126.85569 89.314318) (xy 126.58099 89.494076) - (xy 126.346437 89.723768) (xy 126.27404 89.8295) (xy 126.134066 89.8295) (xy 125.4355 89.130934) (xy 125.4355 86.36) - (xy 125.426706 86.270311) (xy 125.418853 86.180555) (xy 125.417422 86.175632) (xy 125.416922 86.170524) (xy 125.390869 86.084232) - (xy 125.365738 85.99773) (xy 125.363377 85.993176) (xy 125.361895 85.988266) (xy 125.319585 85.908692) (xy 125.278123 85.828705) - (xy 125.274924 85.824697) (xy 125.272515 85.820167) (xy 125.215555 85.750327) (xy 125.159346 85.679915) (xy 125.152303 85.672773) - (xy 125.152186 85.672629) (xy 125.152052 85.672518) (xy 125.149783 85.670217) (xy 119.170555 79.690989) (xy 119.190134 79.672346) - (xy 119.350656 79.444791) (xy 119.463923 79.19039) (xy 119.525619 78.918834) (xy 119.53006 78.600762) (xy 119.47597 78.327589) - (xy 119.369851 78.070125) (xy 119.215745 77.838176) (xy 119.019521 77.640578) (xy 118.788654 77.484856) (xy 118.531937 77.376942) - (xy 118.259149 77.320947) (xy 117.980679 77.319002) (xy 117.707135 77.371184) (xy 117.448937 77.475503) (xy 117.215918 77.627986) - (xy 117.016954 77.822826) (xy 116.859624 78.0526) (xy 116.749921 78.308557) (xy 116.692022 78.580948) (xy 116.688134 78.859397) - (xy 116.738405 79.133299) (xy 116.840918 79.392219) (xy 116.991771 79.626297) (xy 117.1345 79.774097) (xy 117.1345 80.01) - (xy 117.143293 80.099688) (xy 117.151147 80.189445) (xy 117.152577 80.194367) (xy 117.153078 80.199476) (xy 117.17913 80.285767) - (xy 117.204262 80.37227) (xy 117.206622 80.376823) (xy 117.208105 80.381734) (xy 117.250414 80.461307) (xy 117.291877 80.541295) - (xy 117.295075 80.545302) (xy 117.297485 80.549833) (xy 117.354444 80.619672) (xy 117.410654 80.690085) (xy 117.417696 80.697226) - (xy 117.417814 80.697371) (xy 117.417947 80.697481) (xy 117.420217 80.699783) (xy 123.4845 86.764066) (xy 123.4845 89.535) - (xy 123.493293 89.624688) (xy 123.501147 89.714445) (xy 123.502577 89.719367) (xy 123.503078 89.724476) (xy 123.52913 89.810767) - (xy 123.554262 89.89727) (xy 123.556622 89.901823) (xy 123.558105 89.906734) (xy 123.600414 89.986307) (xy 123.641877 90.066295) - (xy 123.645075 90.070302) (xy 123.647485 90.074833) (xy 123.704444 90.144672) (xy 123.760654 90.215085) (xy 123.767696 90.222226) - (xy 123.767814 90.222371) (xy 123.767947 90.222481) (xy 123.770217 90.224783) (xy 125.040217 91.494783) (xy 125.10988 91.552004) - (xy 125.178875 91.609898) (xy 125.183367 91.612367) (xy 125.187334 91.615626) (xy 125.266798 91.658234) (xy 125.34571 91.701617) - (xy 125.350596 91.703167) (xy 125.355119 91.705592) (xy 125.441287 91.731935) (xy 125.527182 91.759183) (xy 125.532282 91.759755) - (xy 125.537185 91.761254) (xy 125.626799 91.770356) (xy 125.71638 91.780405) (xy 125.726407 91.780474) (xy 125.726595 91.780494) - (xy 125.726769 91.780477) (xy 125.73 91.7805) (xy 126.272068 91.7805) (xy 126.31675 91.849832) (xy 126.544798 92.085983) - (xy 126.678632 92.179) (xy 119.149071 92.179) (xy 119.149071 88.100856) (xy 119.085306 87.77882) (xy 118.960205 87.475302) - (xy 118.778533 87.201864) (xy 118.54721 86.96892) (xy 118.4505 86.903688) (xy 118.4505 84.455) (xy 118.441702 84.36527) - (xy 118.433853 84.275555) (xy 118.432422 84.270632) (xy 118.431922 84.265524) (xy 118.405869 84.179232) (xy 118.380738 84.09273) - (xy 118.378377 84.088175) (xy 118.376895 84.083266) (xy 118.334596 84.003713) (xy 118.293123 83.923704) (xy 118.289922 83.919694) - (xy 118.287515 83.915167) (xy 118.230573 83.845349) (xy 118.174346 83.774915) (xy 118.167307 83.767777) (xy 118.167186 83.767629) - (xy 118.167048 83.767515) (xy 118.164782 83.765217) (xy 114.6405 80.240934) (xy 114.6405 60.96) (xy 114.631706 60.870311) - (xy 114.623853 60.780555) (xy 114.622422 60.775632) (xy 114.621922 60.770524) (xy 114.595869 60.684232) (xy 114.570738 60.59773) - (xy 114.568377 60.593176) (xy 114.566895 60.588266) (xy 114.524585 60.508692) (xy 114.483123 60.428705) (xy 114.479924 60.424697) - (xy 114.477515 60.420167) (xy 114.420555 60.350327) (xy 114.364346 60.279915) (xy 114.357303 60.272773) (xy 114.357186 60.272629) - (xy 114.357052 60.272518) (xy 114.354783 60.270217) (xy 113.084783 59.000217) (xy 113.015119 58.942995) (xy 112.946125 58.885102) - (xy 112.941632 58.882632) (xy 112.937666 58.879374) (xy 112.85822 58.836775) (xy 112.77929 58.793383) (xy 112.7744 58.791832) - (xy 112.76988 58.789408) (xy 112.683726 58.763068) (xy 112.597818 58.735817) (xy 112.592717 58.735244) (xy 112.587815 58.733746) - (xy 112.4982 58.724643) (xy 112.40862 58.714595) (xy 112.398592 58.714525) (xy 112.398405 58.714506) (xy 112.39823 58.714522) - (xy 112.395 58.7145) (xy 111.915791 58.7145) (xy 111.887013 58.678707) (xy 111.770534 58.580969) (xy 111.824103 58.570363) - (xy 111.943406 58.52119) (xy 112.050887 58.44978) (xy 112.14245 58.358854) (xy 112.214608 58.251875) (xy 112.264613 58.132917) - (xy 112.290561 58.006513) (xy 112.291461 57.877475) (xy 112.291027 56.29808) (xy 112.265963 56.171497) (xy 112.21679 56.052194) - (xy 112.14538 55.944713) (xy 112.054454 55.85315) (xy 111.947475 55.780992) (xy 111.828517 55.730987) (xy 111.702113 55.705039) - (xy 111.573075 55.704139) (xy 111.3639 55.704178) (xy 111.3639 53.701981) (xy 112.121981 52.9439) (xy 113.258077 52.9439) - (xy 113.416572 53.108025) (xy 113.635017 53.259848) (xy 113.87879 53.36635) (xy 114.138608 53.423475) (xy 114.404573 53.429046) - (xy 114.666555 53.382851) (xy 114.914574 53.286651) (xy 115.139185 53.144108) (xy 115.331832 52.960653) (xy 115.485176 52.743274) - (xy 115.571149 52.550174) (xy 115.626136 52.690061) (xy 115.647162 52.729605) (xy 115.882365 52.790755) (xy 116.603119 52.07) - (xy 115.882365 51.349245) (xy 115.647162 51.410395) (xy 115.56954 51.590274) (xy 115.503513 51.430081) (xy 115.356298 51.208504) - (xy 115.2755 51.12714) (xy 115.2755 49.291987) (xy 115.380134 49.192346) (xy 115.540656 48.964791) (xy 115.653923 48.71039) - (xy 115.715619 48.438834) (xy 115.72006 48.120762) (xy 115.66597 47.847589) (xy 115.559851 47.590125) (xy 115.405745 47.358176) - (xy 115.209521 47.160578) (xy 114.978654 47.004856) (xy 114.721937 46.896942) (xy 114.449149 46.840947) (xy 114.170679 46.839002) - (xy 113.897135 46.891184) (xy 113.638937 46.995503) (xy 113.405918 47.147986) (xy 113.206954 47.342826) (xy 113.049624 47.5726) - (xy 112.939921 47.828557) (xy 112.882022 48.100948) (xy 112.878134 48.379397) (xy 112.928405 48.653299) (xy 113.030918 48.912219) - (xy 113.181771 49.146297) (xy 113.3245 49.294097) (xy 113.3245 51.126596) (xy 113.255833 51.19384) (xy 113.254285 51.1961) - (xy 111.76 51.1961) (xy 111.679687 51.203974) (xy 111.599245 51.211012) (xy 111.594829 51.212294) (xy 111.590259 51.212743) - (xy 111.51296 51.23608) (xy 111.435462 51.258597) (xy 111.431386 51.260709) (xy 111.426983 51.262039) (xy 111.355657 51.299963) - (xy 111.28404 51.337086) (xy 111.28045 51.339951) (xy 111.276391 51.34211) (xy 111.213818 51.393143) (xy 111.150747 51.443492) - (xy 111.144353 51.449796) (xy 111.14422 51.449906) (xy 111.144117 51.45003) (xy 111.142059 51.45206) (xy 109.872059 52.722059) - (xy 109.820831 52.784424) (xy 109.768933 52.846275) (xy 109.766717 52.850304) (xy 109.763803 52.853853) (xy 109.725668 52.924973) - (xy 109.686768 52.995734) (xy 109.685378 53.000114) (xy 109.683207 53.004164) (xy 109.659601 53.081372) (xy 109.635197 53.158306) - (xy 109.634684 53.162871) (xy 109.633341 53.167267) (xy 109.625182 53.247589) (xy 109.616185 53.327798) (xy 109.616122 53.336778) - (xy 109.616105 53.33695) (xy 109.61612 53.33711) (xy 109.6161 53.34) (xy 109.6161 55.704509) (xy 109.28248 55.704573) - (xy 109.155897 55.729637) (xy 109.036594 55.77881) (xy 108.929113 55.85022) (xy 108.83755 55.941146) (xy 108.765392 56.048125) - (xy 108.715387 56.167083) (xy 108.689439 56.293487) (xy 108.688539 56.422525) (xy 108.688973 58.00192) (xy 108.714037 58.128503) - (xy 108.76321 58.247806) (xy 108.83462 58.355287) (xy 108.925546 58.44685) (xy 109.032525 58.519008) (xy 109.151483 58.569013) - (xy 109.209535 58.580929) (xy 109.107208 58.664386) (xy 108.927395 58.881743) (xy 108.793225 59.129885) (xy 108.709808 59.399362) - (xy 108.680321 59.679909) (xy 108.705888 59.960841) (xy 108.785534 60.231456) (xy 108.916227 60.481448) (xy 109.092987 60.701293) - (xy 109.309083 60.882619) (xy 109.449977 60.960076) (xy 109.325814 61.026096) (xy 109.107208 61.204386) (xy 108.927395 61.421743) - (xy 108.793225 61.669885) (xy 108.709808 61.939362) (xy 108.680321 62.219909) (xy 108.705888 62.500841) (xy 108.785534 62.771456) - (xy 108.916227 63.021448) (xy 109.092987 63.241293) (xy 109.309083 63.422619) (xy 109.449977 63.500076) (xy 109.325814 63.566096) - (xy 109.107208 63.744386) (xy 108.927395 63.961743) (xy 108.793225 64.209885) (xy 108.709808 64.479362) (xy 108.680321 64.759909) - (xy 108.705888 65.040841) (xy 108.785534 65.311456) (xy 108.916227 65.561448) (xy 109.092987 65.781293) (xy 109.309083 65.962619) - (xy 109.556282 66.098518) (xy 109.82517 66.183815) (xy 110.105505 66.215259) (xy 110.125686 66.2154) (xy 110.854314 66.2154) - (xy 111.13506 66.187873) (xy 111.405113 66.106339) (xy 111.654186 65.973904) (xy 111.872792 65.795614) (xy 112.052605 65.578257) - (xy 112.186775 65.330115) (xy 112.270192 65.060638) (xy 112.299679 64.780091) (xy 112.274112 64.499159) (xy 112.194466 64.228544) - (xy 112.063773 63.978552) (xy 111.887013 63.758707) (xy 111.670917 63.577381) (xy 111.530022 63.499923) (xy 111.654186 63.433904) - (xy 111.872792 63.255614) (xy 112.052605 63.038257) (xy 112.186775 62.790115) (xy 112.270192 62.520638) (xy 112.299679 62.240091) - (xy 112.274112 61.959159) (xy 112.194466 61.688544) (xy 112.063773 61.438552) (xy 111.887013 61.218707) (xy 111.670917 61.037381) - (xy 111.530022 60.959923) (xy 111.654186 60.893904) (xy 111.872792 60.715614) (xy 111.914249 60.6655) (xy 111.990934 60.6655) - (xy 112.6895 61.364066) (xy 112.6895 80.645) (xy 112.698293 80.734688) (xy 112.706147 80.824445) (xy 112.707577 80.829367) - (xy 112.708078 80.834476) (xy 112.73413 80.920767) (xy 112.759262 81.00727) (xy 112.761622 81.011823) (xy 112.763105 81.016734) - (xy 112.805414 81.096307) (xy 112.846877 81.176295) (xy 112.850075 81.180302) (xy 112.852485 81.184833) (xy 112.909444 81.254672) - (xy 112.965654 81.325085) (xy 112.972696 81.332226) (xy 112.972814 81.332371) (xy 112.972947 81.332481) (xy 112.975217 81.334783) - (xy 116.4995 84.859065) (xy 116.4995 86.9027) (xy 116.42099 86.954076) (xy 116.186437 87.183768) (xy 116.000965 87.454643) - (xy 115.871639 87.756384) (xy 115.803384 88.077498) (xy 115.7988 88.405754) (xy 115.858063 88.728649) (xy 115.978914 89.033884) - (xy 116.15675 89.309832) (xy 116.384798 89.545983) (xy 116.654372 89.733341) (xy 116.955203 89.864771) (xy 117.275833 89.935266) - (xy 117.604049 89.942141) (xy 117.92735 89.885135) (xy 118.233421 89.766418) (xy 118.510604 89.590512) (xy 118.748341 89.364118) - (xy 118.937577 89.095859) (xy 119.071103 88.795953) (xy 119.143835 88.475823) (xy 119.149071 88.100856) (xy 119.149071 92.179) - (xy 115.466 92.179) (xy 115.466 88.265) (xy 115.45548 88.157717) (xy 115.446102 88.050513) (xy 115.444392 88.044629) - (xy 115.443794 88.038523) (xy 115.412645 87.935355) (xy 115.382614 87.831984) (xy 115.379793 87.826542) (xy 115.378021 87.820672) - (xy 115.327441 87.725546) (xy 115.277889 87.62995) (xy 115.274065 87.62516) (xy 115.271186 87.619745) (xy 115.203114 87.536281) - (xy 115.135917 87.452105) (xy 115.127497 87.443567) (xy 115.127359 87.443397) (xy 115.127201 87.443266) (xy 115.124486 87.440513) - (xy 111.656 83.972026) (xy 111.656 80.226558) (xy 111.689406 80.21279) (xy 111.796887 80.14138) (xy 111.88845 80.050454) - (xy 111.960608 79.943475) (xy 112.010613 79.824517) (xy 112.036561 79.698113) (xy 112.037461 79.569075) (xy 112.037027 77.78648) - (xy 112.011963 77.659897) (xy 111.96279 77.540594) (xy 111.89138 77.433113) (xy 111.800454 77.34155) (xy 111.693475 77.269392) - (xy 111.656 77.253639) (xy 111.656 73.66) (xy 111.64548 73.552717) (xy 111.636102 73.445513) (xy 111.634392 73.439629) - (xy 111.633794 73.433523) (xy 111.602645 73.330355) (xy 111.572614 73.226984) (xy 111.569793 73.221542) (xy 111.568021 73.215672) - (xy 111.51743 73.120525) (xy 111.467889 73.024951) (xy 111.464066 73.020163) (xy 111.461186 73.014745) (xy 111.393096 72.931259) - (xy 111.325917 72.847105) (xy 111.317497 72.838567) (xy 111.317359 72.838397) (xy 111.317201 72.838266) (xy 111.314486 72.835513) - (xy 108.774487 70.295513) (xy 108.691208 70.227107) (xy 108.608752 70.157918) (xy 108.60338 70.154964) (xy 108.598641 70.151072) - (xy 108.503699 70.100164) (xy 108.409336 70.048288) (xy 108.403492 70.046434) (xy 108.398089 70.043537) (xy 108.295097 70.012049) - (xy 108.192425 69.97948) (xy 108.18633 69.978796) (xy 108.180468 69.977004) (xy 108.073345 69.966123) (xy 107.96628 69.954114) - (xy 107.954286 69.95403) (xy 107.95407 69.954008) (xy 107.953868 69.954027) (xy 107.95 69.954) (xy 104.163461 69.954) - (xy 104.163461 58.995075) (xy 104.163027 50.10048) (xy 104.137963 49.973897) (xy 104.08879 49.854594) (xy 104.01738 49.747113) - (xy 103.926454 49.65555) (xy 103.819475 49.583392) (xy 103.700517 49.533387) (xy 103.574113 49.507439) (xy 103.445075 49.506539) - (xy 94.55048 49.506973) (xy 94.423897 49.532037) (xy 94.304594 49.58121) (xy 94.197113 49.65262) (xy 94.10555 49.743546) - (xy 94.033392 49.850525) (xy 93.983387 49.969483) (xy 93.957439 50.095887) (xy 93.956539 50.224925) (xy 93.956973 59.11952) - (xy 93.982037 59.246103) (xy 94.03121 59.365406) (xy 94.10262 59.472887) (xy 94.193546 59.56445) (xy 94.300525 59.636608) - (xy 94.419483 59.686613) (xy 94.545887 59.712561) (xy 94.674925 59.713461) (xy 103.56952 59.713027) (xy 103.696103 59.687963) - (xy 103.815406 59.63879) (xy 103.922887 59.56738) (xy 104.01445 59.476454) (xy 104.086608 59.369475) (xy 104.136613 59.250517) - (xy 104.162561 59.124113) (xy 104.163461 58.995075) (xy 104.163461 69.954) (xy 102.622396 69.954) (xy 102.590866 69.922249) - (xy 102.339351 69.752599) (xy 102.059674 69.635034) (xy 101.762488 69.574031) (xy 101.459113 69.571913) (xy 101.161104 69.628761) - (xy 100.879813 69.74241) (xy 100.625954 69.908531) (xy 100.556037 69.976997) (xy 100.53279 69.920594) (xy 100.46138 69.813113) - (xy 100.370454 69.72155) (xy 100.263475 69.649392) (xy 100.144517 69.599387) (xy 100.018113 69.573439) (xy 99.889075 69.572539) - (xy 99.392 69.573) (xy 99.2275 69.7375) (xy 99.2275 70.8025) (xy 99.2275 70.9525) (xy 99.2275 71.2875) - (xy 99.2275 71.4375) (xy 99.2275 72.5025) (xy 99.392 72.667) (xy 99.889075 72.667461) (xy 100.018113 72.666561) - (xy 100.144517 72.640613) (xy 100.263475 72.590608) (xy 100.370454 72.51845) (xy 100.46138 72.426887) (xy 100.53279 72.319406) - (xy 100.555161 72.265127) (xy 100.592507 72.3038) (xy 100.841629 72.476944) (xy 101.119638 72.598403) (xy 101.415943 72.66355) - (xy 101.719259 72.669904) (xy 102.018032 72.617222) (xy 102.300882 72.507511) (xy 102.557037 72.344951) (xy 102.618941 72.286) - (xy 107.467026 72.286) (xy 109.324 74.142973) (xy 109.324 77.253441) (xy 109.290594 77.26721) (xy 109.183113 77.33862) - (xy 109.09155 77.429546) (xy 109.019392 77.536525) (xy 108.969387 77.655483) (xy 108.943439 77.781887) (xy 108.942539 77.910925) - (xy 108.942973 79.69352) (xy 108.968037 79.820103) (xy 109.01721 79.939406) (xy 109.08862 80.046887) (xy 109.179546 80.13845) - (xy 109.286525 80.210608) (xy 109.324 80.22636) (xy 109.324 84.455) (xy 109.334509 84.562188) (xy 109.343897 84.669487) - (xy 109.345607 84.675375) (xy 109.346206 84.681477) (xy 109.377345 84.784616) (xy 109.407386 84.888015) (xy 109.410205 84.893455) - (xy 109.411979 84.899328) (xy 109.462558 84.994453) (xy 109.51211 85.090049) (xy 109.515935 85.09484) (xy 109.518814 85.100255) - (xy 109.586876 85.183707) (xy 109.654082 85.267894) (xy 109.662505 85.276436) (xy 109.662641 85.276603) (xy 109.662794 85.27673) - (xy 109.665513 85.279487) (xy 113.134 88.747973) (xy 113.134 93.345) (xy 113.134 97.155) (xy 113.144509 97.262188) - (xy 113.153897 97.369487) (xy 113.155607 97.375375) (xy 113.156206 97.381477) (xy 113.187345 97.484616) (xy 113.217386 97.588015) - (xy 113.220205 97.593455) (xy 113.221979 97.599328) (xy 113.272558 97.694453) (xy 113.32211 97.790049) (xy 113.325935 97.79484) - (xy 113.328814 97.800255) (xy 113.396876 97.883707) (xy 113.464082 97.967894) (xy 113.472505 97.976436) (xy 113.472641 97.976603) - (xy 113.472794 97.97673) (xy 113.475513 97.979487) (xy 114.404 98.907973) (xy 114.404 104.775) (xy 114.404 110.547359) - (xy 114.377381 110.579083) (xy 114.36918 110.594) (xy 111.406092 110.594) (xy 111.406092 90.067363) (xy 111.356617 89.768043) - (xy 111.249945 89.484033) (xy 111.203736 89.397127) (xy 110.949145 89.312736) (xy 110.712264 89.549617) (xy 110.712264 89.075855) - (xy 110.627873 88.821264) (xy 110.351182 88.696832) (xy 110.055593 88.628513) (xy 109.752363 88.618908) (xy 109.453043 88.668383) - (xy 109.169033 88.775055) (xy 109.082127 88.821264) (xy 108.997736 89.075855) (xy 109.855 89.933119) (xy 110.712264 89.075855) - (xy 110.712264 89.549617) (xy 110.091881 90.17) (xy 110.949145 91.027264) (xy 111.203736 90.942873) (xy 111.328168 90.666182) - (xy 111.396487 90.370593) (xy 111.406092 90.067363) (xy 111.406092 110.594) (xy 110.712264 110.594) (xy 110.712264 91.264145) - (xy 109.855 90.406881) (xy 109.618119 90.643762) (xy 109.618119 90.17) (xy 108.760855 89.312736) (xy 108.506264 89.397127) - (xy 108.381832 89.673818) (xy 108.313513 89.969407) (xy 108.303908 90.272637) (xy 108.353383 90.571957) (xy 108.460055 90.855967) - (xy 108.506264 90.942873) (xy 108.760855 91.027264) (xy 109.618119 90.17) (xy 109.618119 90.643762) (xy 108.997736 91.264145) - (xy 109.082127 91.518736) (xy 109.358818 91.643168) (xy 109.654407 91.711487) (xy 109.957637 91.721092) (xy 110.256957 91.671617) - (xy 110.540967 91.564945) (xy 110.627873 91.518736) (xy 110.712264 91.264145) (xy 110.712264 110.594) (xy 109.111612 110.594) - (xy 109.069954 110.55205) (xy 108.977684 110.489813) (xy 109.066387 110.43088) (xy 109.15795 110.339954) (xy 109.230108 110.232975) - (xy 109.280113 110.114017) (xy 109.306061 109.987613) (xy 109.306961 109.858575) (xy 109.306527 108.45698) (xy 109.281463 108.330397) - (xy 109.23229 108.211094) (xy 109.16088 108.103613) (xy 109.069954 108.01205) (xy 108.962975 107.939892) (xy 108.844017 107.889887) - (xy 108.717613 107.863939) (xy 108.588575 107.863039) (xy 107.18698 107.863473) (xy 107.060397 107.888537) (xy 106.941094 107.93771) - (xy 106.833613 108.00912) (xy 106.74205 108.100046) (xy 106.669892 108.207025) (xy 106.647889 108.259368) (xy 106.627555 108.261147) - (xy 106.622632 108.262577) (xy 106.617524 108.263078) (xy 106.531232 108.28913) (xy 106.44473 108.314262) (xy 106.440175 108.316622) - (xy 106.435266 108.318105) (xy 106.355713 108.360403) (xy 106.275704 108.401877) (xy 106.271694 108.405077) (xy 106.267167 108.407485) - (xy 106.197349 108.464426) (xy 106.126915 108.520654) (xy 106.119777 108.527692) (xy 106.119629 108.527814) (xy 106.119515 108.527951) - (xy 106.117217 108.530218) (xy 103.862934 110.7845) (xy 101.68856 110.7845) (xy 101.68856 109.109293) (xy 101.641183 108.847522) - (xy 101.543864 108.599939) (xy 101.522838 108.560395) (xy 101.287635 108.499245) (xy 101.050755 108.736125) (xy 101.050755 108.262365) - (xy 100.989605 108.027162) (xy 100.745353 107.921762) (xy 100.48528 107.865811) (xy 100.219293 107.86144) (xy 99.957522 107.908817) - (xy 99.709939 108.006136) (xy 99.670395 108.027162) (xy 99.609245 108.262365) (xy 100.33 108.983119) (xy 101.050755 108.262365) - (xy 101.050755 108.736125) (xy 100.566881 109.22) (xy 101.287635 109.940755) (xy 101.522838 109.879605) (xy 101.628238 109.635353) - (xy 101.684189 109.37528) (xy 101.68856 109.109293) (xy 101.68856 110.7845) (xy 101.273086 110.7845) (xy 101.198849 110.709742) - (xy 100.978306 110.560984) (xy 100.808382 110.489554) (xy 100.950061 110.433864) (xy 100.989605 110.412838) (xy 101.050755 110.177635) - (xy 100.33 109.456881) (xy 100.093119 109.693761) (xy 100.093119 109.22) (xy 99.372365 108.499245) (xy 99.137162 108.560395) - (xy 99.095132 108.657793) (xy 99.06426 108.577957) (xy 99.034835 108.522616) (xy 98.8925 108.482026) (xy 98.8925 72.5025) - (xy 98.8925 71.4375) (xy 98.8925 71.2875) (xy 98.8925 70.9525) (xy 98.8925 70.8025) (xy 98.8925 69.7375) - (xy 98.728 69.573) (xy 98.230925 69.572539) (xy 98.101887 69.573439) (xy 97.975483 69.599387) (xy 97.856525 69.649392) - (xy 97.749546 69.72155) (xy 97.65862 69.813113) (xy 97.58721 69.920594) (xy 97.564335 69.976092) (xy 97.510866 69.922249) - (xy 97.259351 69.752599) (xy 96.979674 69.635034) (xy 96.682488 69.574031) (xy 96.379113 69.571913) (xy 96.081104 69.628761) - (xy 95.799813 69.74241) (xy 95.545954 69.908531) (xy 95.499522 69.954) (xy 89.177066 69.954) (xy 89.177066 58.268309) - (xy 89.118139 57.970704) (xy 89.002529 57.690213) (xy 88.83464 57.43752) (xy 88.620866 57.222249) (xy 88.369351 57.052599) - (xy 88.089674 56.935034) (xy 87.792488 56.874031) (xy 87.489113 56.871913) (xy 87.191104 56.928761) (xy 86.909813 57.04241) - (xy 86.655954 57.208531) (xy 86.439195 57.420796) (xy 86.267794 57.671121) (xy 86.148279 57.949971) (xy 86.085203 58.246723) - (xy 86.084224 58.316802) (xy 83.337026 61.064) (xy 80.280154 61.064) (xy 80.241322 61.005552) (xy 79.974899 60.737263) - (xy 79.66144 60.525832) (xy 79.312883 60.379312) (xy 78.942506 60.303285) (xy 78.564415 60.300645) (xy 78.193012 60.371494) - (xy 77.842444 60.513133) (xy 77.526063 60.720167) (xy 77.255921 60.98471) (xy 77.042307 61.296685) (xy 76.893357 61.64421) - (xy 76.814746 62.014048) (xy 76.809466 62.392111) (xy 76.877721 62.764) (xy 77.016909 63.115549) (xy 77.221729 63.433367) - (xy 77.484379 63.705349) (xy 77.794856 63.921136) (xy 78.141333 64.072508) (xy 78.510613 64.1537) (xy 78.88863 64.161618) - (xy 79.260986 64.095962) (xy 79.613498 63.959231) (xy 79.932738 63.756635) (xy 80.206548 63.49589) (xy 80.277012 63.396) - (xy 83.82 63.396) (xy 83.927188 63.38549) (xy 84.034487 63.376103) (xy 84.040375 63.374392) (xy 84.046477 63.373794) - (xy 84.149616 63.342654) (xy 84.253015 63.312614) (xy 84.258455 63.309794) (xy 84.264328 63.308021) (xy 84.359453 63.257441) - (xy 84.455049 63.20789) (xy 84.45984 63.204064) (xy 84.465255 63.201186) (xy 84.548707 63.133123) (xy 84.632894 63.065918) - (xy 84.641436 63.057494) (xy 84.641603 63.057359) (xy 84.64173 63.057205) (xy 84.644487 63.054487) (xy 87.729483 59.969489) - (xy 87.749259 59.969904) (xy 88.048032 59.917222) (xy 88.330882 59.807511) (xy 88.587037 59.644951) (xy 88.806737 59.435733) - (xy 88.981617 59.187825) (xy 89.105014 58.910672) (xy 89.172227 58.614829) (xy 89.177066 58.268309) (xy 89.177066 69.954) - (xy 89.116558 69.954) (xy 89.10279 69.920594) (xy 89.03138 69.813113) (xy 88.940454 69.72155) (xy 88.833475 69.649392) - (xy 88.714517 69.599387) (xy 88.588113 69.573439) (xy 88.459075 69.572539) (xy 86.67648 69.572973) (xy 86.549897 69.598037) - (xy 86.430594 69.64721) (xy 86.323113 69.71862) (xy 86.23155 69.809546) (xy 86.159392 69.916525) (xy 86.109387 70.035483) - (xy 86.083439 70.161887) (xy 86.082539 70.290925) (xy 86.082716 71.01831) (xy 81.725513 75.375513) (xy 81.657107 75.458791) - (xy 81.587918 75.541248) (xy 81.584964 75.546619) (xy 81.581072 75.551359) (xy 81.530164 75.6463) (xy 81.478288 75.740664) - (xy 81.476434 75.746507) (xy 81.473537 75.751911) (xy 81.442049 75.854902) (xy 81.40948 75.957575) (xy 81.408796 75.963669) - (xy 81.407004 75.969532) (xy 81.396123 76.076654) (xy 81.384114 76.18372) (xy 81.38403 76.195713) (xy 81.384008 76.19593) - (xy 81.384027 76.196131) (xy 81.384 76.2) (xy 81.384 87.63) (xy 81.394509 87.737188) (xy 81.403897 87.844487) - (xy 81.405607 87.850375) (xy 81.406206 87.856477) (xy 81.437345 87.959616) (xy 81.467386 88.063015) (xy 81.470205 88.068455) - (xy 81.471979 88.074328) (xy 81.522558 88.169453) (xy 81.57211 88.265049) (xy 81.575935 88.26984) (xy 81.578814 88.275255) - (xy 81.646876 88.358707) (xy 81.714082 88.442894) (xy 81.722505 88.451436) (xy 81.722641 88.451603) (xy 81.722794 88.45173) - (xy 81.725513 88.454487) (xy 82.90761 89.636584) (xy 82.907973 91.12352) (xy 82.933037 91.250103) (xy 82.98221 91.369406) - (xy 83.05362 91.476887) (xy 83.144546 91.56845) (xy 83.251525 91.640608) (xy 83.370483 91.690613) (xy 83.496887 91.716561) - (xy 83.625925 91.717461) (xy 85.40852 91.717027) (xy 85.535103 91.691963) (xy 85.654406 91.64279) (xy 85.761887 91.57138) - (xy 85.85345 91.480454) (xy 85.925608 91.373475) (xy 85.975613 91.254517) (xy 86.001561 91.128113) (xy 86.002461 90.999075) - (xy 86.002027 89.21648) (xy 85.976963 89.089897) (xy 85.947264 89.017841) (xy 85.947264 79.834145) (xy 85.09 78.976881) - (xy 84.232736 79.834145) (xy 84.317127 80.088736) (xy 84.593818 80.213168) (xy 84.889407 80.281487) (xy 85.192637 80.291092) - (xy 85.491957 80.241617) (xy 85.775967 80.134945) (xy 85.862873 80.088736) (xy 85.947264 79.834145) (xy 85.947264 89.017841) - (xy 85.92779 88.970594) (xy 85.85638 88.863113) (xy 85.765454 88.77155) (xy 85.658475 88.699392) (xy 85.539517 88.649387) - (xy 85.413113 88.623439) (xy 85.284075 88.622539) (xy 85.191534 88.622561) (xy 83.716 87.147026) (xy 83.716 79.465358) - (xy 83.741264 79.512873) (xy 83.995855 79.597264) (xy 84.853119 78.74) (xy 83.995855 77.882736) (xy 83.741264 77.967127) - (xy 83.716 78.023304) (xy 83.716 76.682973) (xy 87.731738 72.667234) (xy 88.58352 72.667027) (xy 88.710103 72.641963) - (xy 88.829406 72.59279) (xy 88.936887 72.52138) (xy 89.02845 72.430454) (xy 89.100608 72.323475) (xy 89.11636 72.286) - (xy 95.495317 72.286) (xy 95.512507 72.3038) (xy 95.761629 72.476944) (xy 96.039638 72.598403) (xy 96.335943 72.66355) - (xy 96.639259 72.669904) (xy 96.938032 72.617222) (xy 97.220882 72.507511) (xy 97.477037 72.344951) (xy 97.563716 72.262406) - (xy 97.58721 72.319406) (xy 97.65862 72.426887) (xy 97.749546 72.51845) (xy 97.856525 72.590608) (xy 97.975483 72.640613) - (xy 98.101887 72.666561) (xy 98.230925 72.667461) (xy 98.728 72.667) (xy 98.8925 72.5025) (xy 98.8925 108.482026) - (xy 98.793178 108.453703) (xy 98.556297 108.690584) (xy 98.556297 108.216822) (xy 98.487384 107.975165) (xy 98.232312 107.863417) - (xy 97.960394 107.803341) (xy 97.681984 107.797224) (xy 97.40769 107.845301) (xy 97.147957 107.94574) (xy 97.092616 107.975165) - (xy 97.023703 108.216822) (xy 97.79 108.983119) (xy 98.556297 108.216822) (xy 98.556297 108.690584) (xy 98.026881 109.22) - (xy 98.793178 109.986297) (xy 99.034835 109.917384) (xy 99.093707 109.783002) (xy 99.116136 109.840061) (xy 99.137162 109.879605) - (xy 99.372365 109.940755) (xy 100.093119 109.22) (xy 100.093119 109.693761) (xy 99.609245 110.177635) (xy 99.670395 110.412838) - (xy 99.850594 110.490598) (xy 99.698498 110.552049) (xy 99.4759 110.697713) (xy 99.387275 110.7845) (xy 98.822581 110.7845) - (xy 98.699521 110.660578) (xy 98.468654 110.504856) (xy 98.437078 110.491582) (xy 98.487384 110.464835) (xy 98.556297 110.223178) - (xy 97.79 109.456881) (xy 97.553119 109.693762) (xy 97.553119 109.22) (xy 96.786822 108.453703) (xy 96.545165 108.522616) - (xy 96.433417 108.777688) (xy 96.373341 109.049606) (xy 96.367224 109.328016) (xy 96.415301 109.60231) (xy 96.51574 109.862043) - (xy 96.545165 109.917384) (xy 96.786822 109.986297) (xy 97.553119 109.22) (xy 97.553119 109.693762) (xy 97.023703 110.223178) - (xy 97.092616 110.464835) (xy 97.146458 110.488423) (xy 97.128937 110.495503) (xy 96.895918 110.647986) (xy 96.696954 110.842826) - (xy 96.539624 111.0726) (xy 96.429921 111.328557) (xy 96.372022 111.600948) (xy 96.368134 111.879397) (xy 96.418405 112.153299) - (xy 96.520918 112.412219) (xy 96.671771 112.646297) (xy 96.713491 112.6895) (xy 88.712141 112.6895) (xy 88.870656 112.464791) - (xy 88.983923 112.21039) (xy 89.045619 111.938834) (xy 89.05006 111.620762) (xy 88.99597 111.347589) (xy 88.889851 111.090125) - (xy 88.735745 110.858176) (xy 88.6055 110.727018) (xy 88.6055 110.251987) (xy 88.710134 110.152346) (xy 88.870656 109.924791) - (xy 88.983923 109.67039) (xy 89.045619 109.398834) (xy 89.05006 109.080762) (xy 88.99597 108.807589) (xy 88.889851 108.550125) - (xy 88.735745 108.318176) (xy 88.539521 108.120578) (xy 88.308654 107.964856) (xy 88.051937 107.856942) (xy 87.779149 107.800947) - (xy 87.500679 107.799002) (xy 87.227135 107.851184) (xy 86.968937 107.955503) (xy 86.735918 108.107986) (xy 86.641092 108.200846) - (xy 86.641092 78.637363) (xy 86.591617 78.338043) (xy 86.484945 78.054033) (xy 86.438736 77.967127) (xy 86.184145 77.882736) - (xy 85.947264 78.119617) (xy 85.947264 77.645855) (xy 85.862873 77.391264) (xy 85.586182 77.266832) (xy 85.290593 77.198513) - (xy 84.987363 77.188908) (xy 84.688043 77.238383) (xy 84.404033 77.345055) (xy 84.317127 77.391264) (xy 84.232736 77.645855) - (xy 85.09 78.503119) (xy 85.947264 77.645855) (xy 85.947264 78.119617) (xy 85.326881 78.74) (xy 86.184145 79.597264) - (xy 86.438736 79.512873) (xy 86.563168 79.236182) (xy 86.631487 78.940593) (xy 86.641092 78.637363) (xy 86.641092 108.200846) - (xy 86.536954 108.302826) (xy 86.379624 108.5326) (xy 86.269921 108.788557) (xy 86.212022 109.060948) (xy 86.208134 109.339397) - (xy 86.258405 109.613299) (xy 86.360918 109.872219) (xy 86.511771 110.106297) (xy 86.6545 110.254097) (xy 86.6545 110.727716) - (xy 86.596514 110.7845) (xy 83.972776 110.7845) (xy 83.764372 110.7845) (xy 83.782942 110.76593) (xy 83.718238 110.701226) - (xy 83.794835 110.679384) (xy 83.906583 110.424312) (xy 83.966659 110.152394) (xy 83.972776 109.873984) (xy 83.924699 109.59969) - (xy 83.82426 109.339957) (xy 83.794835 109.284616) (xy 83.553178 109.215703) (xy 83.316297 109.452584) (xy 83.316297 108.978822) - (xy 83.247384 108.737165) (xy 82.992312 108.625417) (xy 82.720394 108.565341) (xy 82.57311 108.562104) (xy 82.57311 102.491685) - (xy 82.475482 101.998627) (xy 82.283944 101.533922) (xy 82.005793 101.115271) (xy 81.651622 100.758619) (xy 81.234923 100.477552) - (xy 80.771567 100.282775) (xy 80.668027 100.261521) (xy 80.668027 68.64452) (xy 80.668027 65.97548) (xy 80.642963 65.848897) - (xy 80.59379 65.729594) (xy 80.52238 65.622113) (xy 80.431454 65.53055) (xy 80.324475 65.458392) (xy 80.205517 65.408387) - (xy 80.079113 65.382439) (xy 79.950075 65.381539) (xy 79.072 65.382) (xy 78.9075 65.5465) (xy 78.9075 67.1425) - (xy 80.5035 67.1425) (xy 80.668 66.978) (xy 80.668027 65.97548) (xy 80.668027 68.64452) (xy 80.668 67.642) - (xy 80.5035 67.4775) (xy 78.9075 67.4775) (xy 78.9075 69.0735) (xy 79.072 69.238) (xy 79.950075 69.238461) - (xy 80.079113 69.237561) (xy 80.205517 69.211613) (xy 80.324475 69.161608) (xy 80.431454 69.08945) (xy 80.52238 68.997887) - (xy 80.59379 68.890406) (xy 80.642963 68.771103) (xy 80.668027 68.64452) (xy 80.668027 100.261521) (xy 80.279203 100.181707) - (xy 79.776585 100.178198) (xy 79.282858 100.272382) (xy 78.816827 100.46067) (xy 78.5725 100.620553) (xy 78.5725 69.0735) - (xy 78.5725 67.4775) (xy 78.5725 67.1425) (xy 78.5725 65.5465) (xy 78.408 65.382) (xy 77.529925 65.381539) - (xy 77.400887 65.382439) (xy 77.274483 65.408387) (xy 77.155525 65.458392) (xy 77.048546 65.53055) (xy 76.95762 65.622113) - (xy 76.88621 65.729594) (xy 76.837037 65.848897) (xy 76.811973 65.97548) (xy 76.812 66.978) (xy 76.9765 67.1425) - (xy 78.5725 67.1425) (xy 78.5725 67.4775) (xy 76.9765 67.4775) (xy 76.812 67.642) (xy 76.811973 68.64452) - (xy 76.837037 68.771103) (xy 76.88621 68.890406) (xy 76.95762 68.997887) (xy 77.048546 69.08945) (xy 77.155525 69.161608) - (xy 77.274483 69.211613) (xy 77.400887 69.237561) (xy 77.529925 69.238461) (xy 78.408 69.238) (xy 78.5725 69.0735) - (xy 78.5725 100.620553) (xy 78.396244 100.735892) (xy 78.037128 101.087564) (xy 77.753159 101.502291) (xy 77.555152 101.964276) - (xy 77.450649 102.455923) (xy 77.443631 102.958504) (xy 77.534366 103.452877) (xy 77.719396 103.92021) (xy 77.991675 104.342705) - (xy 78.340831 104.704267) (xy 78.753566 104.991124) (xy 79.214157 105.192352) (xy 79.705062 105.300284) (xy 80.207582 105.310811) - (xy 80.702576 105.22353) (xy 81.17119 105.041766) (xy 81.595575 104.772444) (xy 81.959566 104.42582) (xy 82.249298 104.015098) - (xy 82.453736 103.555923) (xy 82.565093 103.065783) (xy 82.57311 102.491685) (xy 82.57311 108.562104) (xy 82.441984 108.559224) - (xy 82.16769 108.607301) (xy 81.907957 108.70774) (xy 81.852616 108.737165) (xy 81.783703 108.978822) (xy 82.55 109.745119) - (xy 83.316297 108.978822) (xy 83.316297 109.452584) (xy 82.892947 109.875934) (xy 82.786881 109.982) (xy 82.55 110.218881) - (xy 82.443934 110.324947) (xy 82.313119 110.455762) (xy 82.313119 109.982) (xy 81.546822 109.215703) (xy 81.305165 109.284616) - (xy 81.193417 109.539688) (xy 81.133341 109.811606) (xy 81.127224 110.090016) (xy 81.175301 110.36431) (xy 81.27574 110.624043) - (xy 81.305165 110.679384) (xy 81.546822 110.748297) (xy 82.313119 109.982) (xy 82.313119 110.455762) (xy 81.783703 110.985178) - (xy 81.852616 111.226835) (xy 82.107688 111.338583) (xy 82.205288 111.360146) (xy 82.16087 111.404563) (xy 82.147135 111.407184) - (xy 81.888937 111.511503) (xy 81.655918 111.663986) (xy 81.456954 111.858826) (xy 81.299624 112.0886) (xy 81.189921 112.344557) - (xy 81.132022 112.616948) (xy 81.128134 112.895397) (xy 81.178405 113.169299) (xy 81.18957 113.1975) (xy 81.042581 113.1975) - (xy 80.919521 113.073578) (xy 80.688654 112.917856) (xy 80.431937 112.809942) (xy 80.265861 112.775851) (xy 80.393714 112.753308) - (xy 80.653344 112.652604) (xy 80.888469 112.503389) (xy 81.090134 112.311346) (xy 81.250656 112.083791) (xy 81.363923 111.82939) - (xy 81.425619 111.557834) (xy 81.43006 111.239762) (xy 81.37597 110.966589) (xy 81.269851 110.709125) (xy 81.115745 110.477176) - (xy 80.919521 110.279578) (xy 80.688654 110.123856) (xy 80.431937 110.015942) (xy 80.159149 109.959947) (xy 79.880679 109.958002) - (xy 79.607135 110.010184) (xy 79.348937 110.114503) (xy 79.115918 110.266986) (xy 78.916954 110.461826) (xy 78.759624 110.6916) - (xy 78.649921 110.947557) (xy 78.592022 111.219948) (xy 78.588134 111.498397) (xy 78.638405 111.772299) (xy 78.740918 112.031219) - (xy 78.891771 112.265297) (xy 79.085217 112.465616) (xy 79.313888 112.624546) (xy 79.569073 112.736034) (xy 79.75272 112.776411) - (xy 79.607135 112.804184) (xy 79.348937 112.908503) (xy 79.115918 113.060986) (xy 78.916954 113.255826) (xy 78.759624 113.4856) - (xy 78.649921 113.741557) (xy 78.592022 114.013948) (xy 78.588134 114.292397) (xy 78.638405 114.566299) (xy 78.740918 114.825219) - (xy 78.891771 115.059297) (xy 79.085217 115.259616) (xy 79.313888 115.418546) (xy 79.517377 115.507448) (xy 79.348937 115.575503) - (xy 79.115918 115.727986) (xy 78.976514 115.8645) (xy 78.105 115.8645) (xy 78.01527 115.873297) (xy 77.925555 115.881147) - (xy 77.920632 115.882577) (xy 77.915524 115.883078) (xy 77.829232 115.90913) (xy 77.74273 115.934262) (xy 77.738175 115.936622) - (xy 77.733266 115.938105) (xy 77.653713 115.980403) (xy 77.573704 116.021877) (xy 77.569694 116.025077) (xy 77.565167 116.027485) - (xy 77.495349 116.084426) (xy 77.424915 116.140654) (xy 77.417777 116.147692) (xy 77.417629 116.147814) (xy 77.417515 116.147951) - (xy 77.415217 116.150218) (xy 76.780217 116.785217) (xy 76.722995 116.85488) (xy 76.665102 116.923875) (xy 76.662632 116.928367) - (xy 76.659374 116.932334) (xy 76.616775 117.011779) (xy 76.573383 117.09071) (xy 76.571832 117.095599) (xy 76.569408 117.10012) - (xy 76.543068 117.186273) (xy 76.515817 117.272182) (xy 76.515244 117.277282) (xy 76.513746 117.282185) (xy 76.504643 117.371799) - (xy 76.494595 117.46138) (xy 76.494525 117.471407) (xy 76.494506 117.471595) (xy 76.494522 117.471769) (xy 76.4945 117.475) - (xy 76.4945 120.65) (xy 76.503293 120.739688) (xy 76.511147 120.829445) (xy 76.512577 120.834367) (xy 76.513078 120.839476) - (xy 76.53913 120.925767) (xy 76.564262 121.01227) (xy 76.566622 121.016823) (xy 76.568105 121.021734) (xy 76.610414 121.101307) - (xy 76.651877 121.181295) (xy 76.655075 121.185302) (xy 76.657485 121.189833) (xy 76.714444 121.259672) (xy 76.770654 121.330085) - (xy 76.777696 121.337226) (xy 76.777814 121.337371) (xy 76.777947 121.337481) (xy 76.780217 121.339783) (xy 79.320217 123.879782) - (xy 79.389845 123.936975) (xy 79.458875 123.994898) (xy 79.463367 123.997368) (xy 79.467333 124.000625) (xy 79.546745 124.043205) - (xy 79.62571 124.086617) (xy 79.630601 124.088168) (xy 79.635119 124.090591) (xy 79.721254 124.116925) (xy 79.807182 124.144183) - (xy 79.81228 124.144754) (xy 79.817184 124.146254) (xy 79.906804 124.155357) (xy 79.99638 124.165405) (xy 80.006407 124.165474) - (xy 80.006595 124.165494) (xy 80.006769 124.165477) (xy 80.01 124.1655) (xy 84.685934 124.1655) (xy 85.670217 125.149783) - (xy 85.73988 125.207004) (xy 85.808875 125.264898) (xy 85.813367 125.267367) (xy 85.817334 125.270626) (xy 85.896798 125.313234) - (xy 85.97571 125.356617) (xy 85.980596 125.358167) (xy 85.985119 125.360592) (xy 86.071287 125.386935) (xy 86.157182 125.414183) - (xy 86.162282 125.414755) (xy 86.167185 125.416254) (xy 86.256799 125.425356) (xy 86.34638 125.435405) (xy 86.356407 125.435474) - (xy 86.356595 125.435494) (xy 86.356769 125.435477) (xy 86.36 125.4355) (xy 86.597913 125.4355) (xy 86.705217 125.546616) - (xy 86.933888 125.705546) (xy 87.189073 125.817034) (xy 87.461053 125.876833) (xy 87.739468 125.882665) (xy 88.013714 125.834308) - (xy 88.273344 125.733604) (xy 88.508469 125.584389) (xy 88.710134 125.392346) (xy 88.870656 125.164791) (xy 88.983923 124.91039) - (xy 89.045619 124.638834) (xy 89.05006 124.320762) (xy 88.99597 124.047589) (xy 88.889851 123.790125) (xy 88.735745 123.558176) - (xy 88.6055 123.427018) (xy 88.6055 122.951987) (xy 88.710134 122.852346) (xy 88.870656 122.624791) (xy 88.983923 122.37039) - (xy 89.045619 122.098834) (xy 89.05006 121.780762) (xy 88.99597 121.507589) (xy 88.889851 121.250125) (xy 88.735745 121.018176) - (xy 88.539521 120.820578) (xy 88.308654 120.664856) (xy 88.051937 120.556942) (xy 87.779149 120.500947) (xy 87.500679 120.499002) - (xy 87.227135 120.551184) (xy 86.968937 120.655503) (xy 86.735918 120.807986) (xy 86.536954 121.002826) (xy 86.379624 121.2326) - (xy 86.269921 121.488557) (xy 86.212022 121.760948) (xy 86.208134 122.039397) (xy 86.258405 122.313299) (xy 86.360918 122.572219) - (xy 86.511771 122.806297) (xy 86.6545 122.954097) (xy 86.6545 123.374934) (xy 85.779783 122.500217) (xy 85.710119 122.442995) - (xy 85.641125 122.385102) (xy 85.636632 122.382632) (xy 85.632666 122.379374) (xy 85.55322 122.336775) (xy 85.47429 122.293383) - (xy 85.4694 122.291832) (xy 85.46488 122.289408) (xy 85.378726 122.263068) (xy 85.292818 122.235817) (xy 85.287717 122.235244) - (xy 85.282815 122.233746) (xy 85.1932 122.224643) (xy 85.10362 122.214595) (xy 85.093592 122.214525) (xy 85.093405 122.214506) - (xy 85.09323 122.214522) (xy 85.09 122.2145) (xy 83.821403 122.2145) (xy 83.82145 122.214454) (xy 83.893608 122.107475) - (xy 83.943613 121.988517) (xy 83.969561 121.862113) (xy 83.970461 121.733075) (xy 83.970027 120.20448) (xy 83.944963 120.077897) - (xy 83.89579 119.958594) (xy 83.82438 119.851113) (xy 83.733454 119.75955) (xy 83.626475 119.687392) (xy 83.507517 119.637387) - (xy 83.381113 119.611439) (xy 83.252075 119.610539) (xy 82.935464 119.610628) (xy 83.193344 119.510604) (xy 83.428469 119.361389) - (xy 83.630134 119.169346) (xy 83.790656 118.941791) (xy 83.903923 118.68739) (xy 83.965619 118.415834) (xy 83.97006 118.097762) - (xy 83.91597 117.824589) (xy 83.809851 117.567125) (xy 83.655745 117.335176) (xy 83.459521 117.137578) (xy 83.228654 116.981856) - (xy 83.040654 116.902828) (xy 83.193344 116.843604) (xy 83.428469 116.694389) (xy 83.584817 116.5455) (xy 86.597913 116.5455) - (xy 86.6545 116.604097) (xy 86.6545 117.077716) (xy 86.536954 117.192826) (xy 86.379624 117.4226) (xy 86.269921 117.678557) - (xy 86.212022 117.950948) (xy 86.208134 118.229397) (xy 86.258405 118.503299) (xy 86.360918 118.762219) (xy 86.511771 118.996297) - (xy 86.705217 119.196616) (xy 86.933888 119.355546) (xy 87.189073 119.467034) (xy 87.461053 119.526833) (xy 87.739468 119.532665) - (xy 88.013714 119.484308) (xy 88.273344 119.383604) (xy 88.508469 119.234389) (xy 88.710134 119.042346) (xy 88.870656 118.814791) - (xy 88.983923 118.56039) (xy 89.045619 118.288834) (xy 89.05006 117.970762) (xy 88.99597 117.697589) (xy 88.889851 117.440125) - (xy 88.735745 117.208176) (xy 88.6055 117.077018) (xy 88.6055 116.601987) (xy 88.710134 116.502346) (xy 88.870656 116.274791) - (xy 88.983923 116.02039) (xy 89.045619 115.748834) (xy 89.05006 115.430762) (xy 88.99597 115.157589) (xy 88.889851 114.900125) - (xy 88.735745 114.668176) (xy 88.708261 114.6405) (xy 96.702627 114.6405) (xy 96.557058 114.78607) (xy 96.621761 114.850773) - (xy 96.545165 114.872616) (xy 96.433417 115.127688) (xy 96.373341 115.399606) (xy 96.367224 115.678016) (xy 96.415301 115.95231) - (xy 96.51574 116.212043) (xy 96.545165 116.267384) (xy 96.786822 116.336297) (xy 97.447053 115.676066) (xy 97.553119 115.57) - (xy 97.553119 115.569999) (xy 97.79 115.333119) (xy 98.026881 115.569999) (xy 98.026881 115.57) (xy 98.132947 115.676066) - (xy 98.793178 116.336297) (xy 99.034835 116.267384) (xy 99.093707 116.133002) (xy 99.116136 116.190061) (xy 99.137162 116.229605) - (xy 99.372365 116.290755) (xy 99.987053 115.676066) (xy 100.093119 115.57) (xy 100.33 115.333119) (xy 100.566881 115.57) - (xy 100.672947 115.676066) (xy 101.287635 116.290755) (xy 101.522838 116.229605) (xy 101.628238 115.985353) (xy 101.684189 115.72528) - (xy 101.68856 115.459293) (xy 101.641183 115.197522) (xy 101.543864 114.949939) (xy 101.522838 114.910395) (xy 101.455996 114.893016) - (xy 101.517824 114.831189) (xy 101.327135 114.6405) (xy 105.76452 114.6405) (xy 105.68273 114.664262) (xy 105.678176 114.666622) + (xy 126.365 78.844) (xy 124.991 78.844) (xy 124.991 68.744706) (xy 125.22992 68.849088) (xy 125.538388 68.916909) + (xy 125.854154 68.923523) (xy 126.165191 68.868679) (xy 126.459652 68.754465) (xy 126.726321 68.585232) (xy 126.95504 68.367426) + (xy 127.137098 68.109343) (xy 127.265559 67.820813) (xy 127.335532 67.512826) (xy 127.34057 67.152082) (xy 127.3405 67.151728) + (xy 127.3405 63.247308) (xy 127.3405 63.117693) (xy 127.3405 61.212693) (xy 127.315213 61.085569) (xy 127.265612 60.96582) + (xy 127.193602 60.85805) (xy 127.101951 60.766398) (xy 126.99418 60.694388) (xy 126.874432 60.644787) (xy 126.747308 60.6195) + (xy 126.617693 60.6195) (xy 125.499066 60.6195) (xy 125.4355 60.555934) (xy 125.4355 58.357368) (xy 125.636737 58.165733) + (xy 125.811617 57.917825) (xy 125.935014 57.640672) (xy 126.002227 57.344829) (xy 126.007066 56.998309) (xy 125.948139 56.700704) + (xy 125.832529 56.420213) (xy 125.66464 56.16752) (xy 125.450866 55.952249) (xy 125.199351 55.782599) (xy 124.919674 55.665034) + (xy 124.622488 55.604031) (xy 124.319113 55.601913) (xy 124.021104 55.658761) (xy 123.739813 55.77241) (xy 123.485954 55.938531) + (xy 123.269195 56.150796) (xy 123.252964 56.1745) (xy 120.738266 56.1745) (xy 120.738266 51.955737) (xy 120.689876 51.692948) + (xy 120.591148 51.444649) (xy 120.572838 51.410394) (xy 120.337636 51.349245) (xy 120.100755 51.586126) (xy 120.100755 51.112364) + (xy 120.039606 50.877162) (xy 119.794221 50.771399) (xy 119.532917 50.715541) (xy 119.265737 50.711734) (xy 119.002948 50.760124) + (xy 118.754649 50.858852) (xy 118.720394 50.877162) (xy 118.659245 51.112364) (xy 119.38 51.833119) (xy 120.100755 51.112364) + (xy 120.100755 51.586126) (xy 119.616881 52.07) (xy 120.337636 52.790755) (xy 120.572838 52.729606) (xy 120.678601 52.484221) + (xy 120.734459 52.222917) (xy 120.738266 51.955737) (xy 120.738266 56.1745) (xy 120.100755 56.1745) (xy 120.100755 53.027636) + (xy 119.38 52.306881) (xy 119.143119 52.543762) (xy 119.143119 52.07) (xy 118.422364 51.349245) (xy 118.187162 51.410394) + (xy 118.109329 51.590975) (xy 118.051148 51.444649) (xy 118.032838 51.410394) (xy 117.797636 51.349245) (xy 117.560755 51.586126) + (xy 117.560755 51.112364) (xy 117.499606 50.877162) (xy 117.254221 50.771399) (xy 116.992917 50.715541) (xy 116.725737 50.711734) + (xy 116.462948 50.760124) (xy 116.214649 50.858852) (xy 116.180394 50.877162) (xy 116.119245 51.112364) (xy 116.84 51.833119) + (xy 117.560755 51.112364) (xy 117.560755 51.586126) (xy 117.076881 52.07) (xy 117.797636 52.790755) (xy 118.032838 52.729606) + (xy 118.11067 52.549024) (xy 118.168852 52.695351) (xy 118.187162 52.729606) (xy 118.422364 52.790755) (xy 119.143119 52.07) + (xy 119.143119 52.543762) (xy 118.659245 53.027636) (xy 118.720394 53.262838) (xy 118.965779 53.368601) (xy 119.227083 53.424459) + (xy 119.494263 53.428266) (xy 119.757052 53.379876) (xy 120.005351 53.281148) (xy 120.039606 53.262838) (xy 120.100755 53.027636) + (xy 120.100755 56.1745) (xy 119.535791 56.1745) (xy 119.507013 56.138707) (xy 119.290917 55.957381) (xy 119.043718 55.821482) + (xy 118.77483 55.736185) (xy 118.494495 55.704741) (xy 118.474314 55.7046) (xy 117.745686 55.7046) (xy 117.560755 55.722732) + (xy 117.560755 53.027636) (xy 116.84 52.306881) (xy 116.119245 53.027636) (xy 116.180394 53.262838) (xy 116.425779 53.368601) + (xy 116.687083 53.424459) (xy 116.954263 53.428266) (xy 117.217052 53.379876) (xy 117.465351 53.281148) (xy 117.499606 53.262838) + (xy 117.560755 53.027636) (xy 117.560755 55.722732) (xy 117.46494 55.732127) (xy 117.194887 55.813661) (xy 116.945814 55.946096) + (xy 116.727208 56.124386) (xy 116.547395 56.341743) (xy 116.413225 56.589885) (xy 116.329808 56.859362) (xy 116.300321 57.139909) + (xy 116.325888 57.420841) (xy 116.405534 57.691456) (xy 116.536227 57.941448) (xy 116.712987 58.161293) (xy 116.929083 58.342619) + (xy 117.058247 58.413628) (xy 117.04652 58.418724) (xy 116.812108 58.581252) (xy 116.613908 58.786388) (xy 116.459536 59.02625) + (xy 116.362616 59.299975) (xy 116.484499 59.5225) (xy 117.9425 59.5225) (xy 117.9425 59.5025) (xy 118.2775 59.5025) + (xy 118.2775 59.5225) (xy 119.735501 59.5225) (xy 119.857384 59.299975) (xy 119.760464 59.02625) (xy 119.606092 58.786388) + (xy 119.407892 58.581252) (xy 119.17348 58.418724) (xy 119.161812 58.413654) (xy 119.274186 58.353904) (xy 119.492792 58.175614) + (xy 119.534249 58.1255) (xy 123.251354 58.1255) (xy 123.452507 58.3338) (xy 123.4845 58.356035) (xy 123.4845 60.96) + (xy 123.493293 61.049688) (xy 123.501147 61.139445) (xy 123.502577 61.144367) (xy 123.503078 61.149476) (xy 123.52913 61.235767) + (xy 123.554262 61.32227) (xy 123.556622 61.326823) (xy 123.558105 61.331734) (xy 123.600414 61.411307) (xy 123.641877 61.491295) + (xy 123.645075 61.495302) (xy 123.647485 61.499833) (xy 123.704444 61.569672) (xy 123.760654 61.640085) (xy 123.767696 61.647226) + (xy 123.767814 61.647371) (xy 123.767947 61.647481) (xy 123.770217 61.649783) (xy 124.1195 61.999066) (xy 124.1195 63.247307) + (xy 124.144787 63.374431) (xy 124.194388 63.49418) (xy 124.266398 63.60195) (xy 124.358049 63.693602) (xy 124.46582 63.765612) + (xy 124.585568 63.815213) (xy 124.712692 63.8405) (xy 124.842307 63.8405) (xy 126.747307 63.8405) (xy 126.874431 63.815213) + (xy 126.99418 63.765612) (xy 127.10195 63.693602) (xy 127.193602 63.601951) (xy 127.265612 63.49418) (xy 127.315213 63.374432) + (xy 127.3405 63.247308) (xy 127.3405 67.151728) (xy 127.279223 66.842262) (xy 127.158868 66.550257) (xy 126.984087 66.287191) + (xy 126.761539 66.063084) (xy 126.499699 65.886471) (xy 126.208542 65.76408) (xy 125.899158 65.700572) (xy 125.58333 65.698367) + (xy 125.273089 65.757549) (xy 124.980251 65.875863) (xy 124.715971 66.048803) (xy 124.618759 66.144) (xy 123.825 66.144) + (xy 123.672973 66.144) (xy 121.474487 63.945513) (xy 121.391208 63.877107) (xy 121.308752 63.807918) (xy 121.30338 63.804964) + (xy 121.298641 63.801072) (xy 121.203699 63.750164) (xy 121.109336 63.698288) (xy 121.103492 63.696434) (xy 121.098089 63.693537) + (xy 120.995097 63.662049) (xy 120.892425 63.62948) (xy 120.88633 63.628796) (xy 120.880468 63.627004) (xy 120.773345 63.616123) + (xy 120.66628 63.604114) (xy 120.654286 63.60403) (xy 120.65407 63.604008) (xy 120.653868 63.604027) (xy 120.65 63.604) + (xy 119.32264 63.604) (xy 119.290917 63.577381) (xy 119.161752 63.506371) (xy 119.17348 63.501276) (xy 119.407892 63.338748) + (xy 119.606092 63.133612) (xy 119.760464 62.89375) (xy 119.857384 62.620025) (xy 119.857384 61.839975) (xy 119.760464 61.56625) + (xy 119.606092 61.326388) (xy 119.407892 61.121252) (xy 119.17532 60.96) (xy 119.407892 60.798748) (xy 119.606092 60.593612) + (xy 119.760464 60.35375) (xy 119.857384 60.080025) (xy 119.735501 59.8575) (xy 118.2775 59.8575) (xy 118.2775 60.7846) + (xy 118.2775 61.1354) (xy 118.2775 62.0625) (xy 119.735501 62.0625) (xy 119.857384 61.839975) (xy 119.857384 62.620025) + (xy 119.735501 62.3975) (xy 118.2775 62.3975) (xy 118.2775 62.4175) (xy 117.9425 62.4175) (xy 117.9425 62.3975) + (xy 117.9425 62.0625) (xy 117.9425 61.1354) (xy 117.9425 60.7846) (xy 117.9425 59.8575) (xy 116.484499 59.8575) + (xy 116.362616 60.080025) (xy 116.459536 60.35375) (xy 116.613908 60.593612) (xy 116.812108 60.798748) (xy 117.044679 60.96) + (xy 116.812108 61.121252) (xy 116.613908 61.326388) (xy 116.459536 61.56625) (xy 116.362616 61.839975) (xy 116.484499 62.0625) + (xy 117.9425 62.0625) (xy 117.9425 62.3975) (xy 116.484499 62.3975) (xy 116.362616 62.620025) (xy 116.459536 62.89375) + (xy 116.613908 63.133612) (xy 116.812108 63.338748) (xy 117.04652 63.501276) (xy 117.058187 63.506345) (xy 116.945814 63.566096) + (xy 116.727208 63.744386) (xy 116.547395 63.961743) (xy 116.413225 64.209885) (xy 116.329808 64.479362) (xy 116.300321 64.759909) + (xy 116.325888 65.040841) (xy 116.405534 65.311456) (xy 116.536227 65.561448) (xy 116.712987 65.781293) (xy 116.929083 65.962619) + (xy 117.176282 66.098518) (xy 117.44517 66.183815) (xy 117.725505 66.215259) (xy 117.745686 66.2154) (xy 118.474314 66.2154) + (xy 118.75506 66.187873) (xy 119.025113 66.106339) (xy 119.274186 65.973904) (xy 119.320661 65.936) (xy 120.167026 65.936) + (xy 122.365513 68.134486) (xy 122.448761 68.202867) (xy 122.531248 68.272082) (xy 122.536619 68.275035) (xy 122.541359 68.278928) + (xy 122.6363 68.329835) (xy 122.659 68.342314) (xy 122.659 79.375) (xy 122.669509 79.482188) (xy 122.678897 79.589487) + (xy 122.680607 79.595375) (xy 122.681206 79.601477) (xy 122.712345 79.704616) (xy 122.742386 79.808015) (xy 122.745205 79.813455) + (xy 122.746979 79.819328) (xy 122.797558 79.914453) (xy 122.84711 80.010049) (xy 122.850935 80.01484) (xy 122.853814 80.020255) + (xy 122.921876 80.103707) (xy 122.989082 80.187894) (xy 122.997505 80.196436) (xy 122.997641 80.196603) (xy 122.997794 80.19673) + (xy 123.000513 80.199487) (xy 123.635514 80.834487) (xy 123.718766 80.902871) (xy 123.801248 80.972082) (xy 123.806619 80.975035) + (xy 123.811359 80.978928) (xy 123.906316 81.029844) (xy 124.000664 81.081712) (xy 124.006505 81.083564) (xy 124.011912 81.086464) + (xy 124.114975 81.117973) (xy 124.217575 81.15052) (xy 124.223664 81.151202) (xy 124.229532 81.152997) (xy 124.336704 81.163882) + (xy 124.44372 81.175886) (xy 124.455713 81.175969) (xy 124.45593 81.175992) (xy 124.456131 81.175972) (xy 124.46 81.176) + (xy 125.882026 81.176) (xy 133.160513 88.454486) (xy 133.243761 88.522867) (xy 133.326248 88.592082) (xy 133.331619 88.595035) + (xy 133.336359 88.598928) (xy 133.4313 88.649835) (xy 133.454 88.662314) (xy 133.454 89.052026) (xy 130.327026 92.179) + (xy 128.5942 92.179) (xy 128.670604 92.130513) (xy 128.908341 91.904119) (xy 129.097577 91.63586) (xy 129.231104 91.335953) + (xy 129.303836 91.015823) (xy 129.309072 90.640856) (xy 129.309072 85.560856) (xy 129.245307 85.23882) (xy 129.120206 84.935302) + (xy 128.938534 84.661864) (xy 128.707211 84.42892) (xy 128.435047 84.245343) (xy 128.132411 84.118126) (xy 127.810827 84.052115) + (xy 127.482547 84.049823) (xy 127.160073 84.111338) (xy 126.879331 84.224765) (xy 121.6255 78.970934) (xy 121.6255 76.2) + (xy 121.616705 76.110307) (xy 121.608853 76.020556) (xy 121.607423 76.015633) (xy 121.606922 76.010524) (xy 121.580865 75.92422) + (xy 121.555738 75.83773) (xy 121.553377 75.833175) (xy 121.551895 75.828266) (xy 121.509606 75.748732) (xy 121.468124 75.668705) + (xy 121.464922 75.664694) (xy 121.462515 75.660167) (xy 121.405582 75.590361) (xy 121.349347 75.519916) (xy 121.342307 75.512777) + (xy 121.342186 75.512629) (xy 121.342048 75.512515) (xy 121.339783 75.510218) (xy 120.704783 74.875217) (xy 120.635119 74.817995) + (xy 120.566125 74.760102) (xy 120.561632 74.757632) (xy 120.557666 74.754374) (xy 120.47822 74.711775) (xy 120.39929 74.668383) + (xy 120.3944 74.666832) (xy 120.38988 74.664408) (xy 120.303726 74.638068) (xy 120.217818 74.610817) (xy 120.212717 74.610244) + (xy 120.207815 74.608746) (xy 120.1182 74.599643) (xy 120.02862 74.589595) (xy 120.018592 74.589525) (xy 120.018405 74.589506) + (xy 120.01823 74.589522) (xy 120.015 74.5895) (xy 119.142582 74.5895) (xy 119.019522 74.465577) (xy 118.788654 74.309855) + (xy 118.531937 74.201941) (xy 118.259149 74.145946) (xy 117.980679 74.144001) (xy 117.707135 74.196183) (xy 117.448936 74.300502) + (xy 117.215917 74.452985) (xy 117.016953 74.647825) (xy 116.859623 74.8776) (xy 116.74992 75.133557) (xy 116.692021 75.405948) + (xy 116.688133 75.684397) (xy 116.738404 75.958299) (xy 116.840918 76.21722) (xy 116.991771 76.451298) (xy 117.185217 76.651617) + (xy 117.413887 76.810547) (xy 117.669073 76.922035) (xy 117.941053 76.981834) (xy 118.219468 76.987666) (xy 118.493714 76.939309) + (xy 118.753344 76.838605) (xy 118.98847 76.68939) (xy 119.144819 76.5405) (xy 119.610934 76.5405) (xy 119.6745 76.604065) + (xy 119.6745 79.375) (xy 119.683293 79.464688) (xy 119.691147 79.554445) (xy 119.692577 79.559367) (xy 119.693078 79.564476) + (xy 119.71913 79.650767) (xy 119.744262 79.73727) (xy 119.746622 79.741823) (xy 119.748105 79.746734) (xy 119.790414 79.826307) + (xy 119.831877 79.906295) (xy 119.835075 79.910302) (xy 119.837485 79.914833) (xy 119.894444 79.984672) (xy 119.950654 80.055085) + (xy 119.957696 80.062226) (xy 119.957814 80.062371) (xy 119.957947 80.062481) (xy 119.960217 80.064783) (xy 126.00322 86.107786) + (xy 126.018062 86.18865) (xy 126.138913 86.493884) (xy 126.316749 86.769833) (xy 126.544798 87.005984) (xy 126.814371 87.193342) + (xy 127.115203 87.324772) (xy 127.435833 87.395267) (xy 127.764049 87.402142) (xy 128.08735 87.345136) (xy 128.393421 87.226419) + (xy 128.670604 87.050513) (xy 128.908341 86.824119) (xy 129.097577 86.55586) (xy 129.231104 86.255953) (xy 129.303836 85.935823) + (xy 129.309072 85.560856) (xy 129.309072 90.640856) (xy 129.245307 90.31882) (xy 129.120206 90.015302) (xy 128.938534 89.741864) + (xy 128.707211 89.50892) (xy 128.435047 89.325343) (xy 128.132411 89.198126) (xy 127.810827 89.132115) (xy 127.482547 89.129823) + (xy 127.160073 89.191338) (xy 126.85569 89.314317) (xy 126.58099 89.494076) (xy 126.346437 89.723767) (xy 126.27404 89.8295) + (xy 126.134066 89.8295) (xy 125.4355 89.130934) (xy 125.4355 86.36) (xy 125.426706 86.270311) (xy 125.418853 86.180555) + (xy 125.417422 86.175632) (xy 125.416922 86.170524) (xy 125.390869 86.084232) (xy 125.365738 85.99773) (xy 125.363377 85.993176) + (xy 125.361895 85.988266) (xy 125.319585 85.908692) (xy 125.278123 85.828705) (xy 125.274924 85.824697) (xy 125.272515 85.820167) + (xy 125.215555 85.750327) (xy 125.159346 85.679915) (xy 125.152303 85.672773) (xy 125.152186 85.672629) (xy 125.152052 85.672518) + (xy 125.149783 85.670217) (xy 119.170556 79.69099) (xy 119.190134 79.672347) (xy 119.350657 79.444791) (xy 119.463924 79.19039) + (xy 119.52562 78.918834) (xy 119.530061 78.600762) (xy 119.475971 78.327589) (xy 119.369852 78.070125) (xy 119.215746 77.838176) + (xy 119.019522 77.640577) (xy 118.788654 77.484855) (xy 118.531937 77.376941) (xy 118.259149 77.320946) (xy 117.980679 77.319001) + (xy 117.707135 77.371183) (xy 117.448936 77.475502) (xy 117.215917 77.627985) (xy 117.016953 77.822825) (xy 116.859623 78.0526) + (xy 116.74992 78.308557) (xy 116.692021 78.580948) (xy 116.688133 78.859397) (xy 116.738404 79.133299) (xy 116.840918 79.39222) + (xy 116.991771 79.626298) (xy 117.1345 79.774098) (xy 117.1345 80.01) (xy 117.143293 80.099688) (xy 117.151147 80.189445) + (xy 117.152577 80.194367) (xy 117.153078 80.199476) (xy 117.17913 80.285767) (xy 117.204262 80.37227) (xy 117.206622 80.376823) + (xy 117.208105 80.381734) (xy 117.250414 80.461307) (xy 117.291877 80.541295) (xy 117.295075 80.545302) (xy 117.297485 80.549833) + (xy 117.354444 80.619672) (xy 117.410654 80.690085) (xy 117.417696 80.697226) (xy 117.417814 80.697371) (xy 117.417947 80.697481) + (xy 117.420217 80.699783) (xy 123.4845 86.764066) (xy 123.4845 89.535) (xy 123.493293 89.624688) (xy 123.501147 89.714445) + (xy 123.502577 89.719367) (xy 123.503078 89.724476) (xy 123.52913 89.810767) (xy 123.554262 89.89727) (xy 123.556622 89.901823) + (xy 123.558105 89.906734) (xy 123.600414 89.986307) (xy 123.641877 90.066295) (xy 123.645075 90.070302) (xy 123.647485 90.074833) + (xy 123.704444 90.144672) (xy 123.760654 90.215085) (xy 123.767696 90.222226) (xy 123.767814 90.222371) (xy 123.767947 90.222481) + (xy 123.770217 90.224783) (xy 125.040217 91.494783) (xy 125.10988 91.552004) (xy 125.178875 91.609898) (xy 125.183367 91.612367) + (xy 125.187334 91.615626) (xy 125.266798 91.658234) (xy 125.34571 91.701617) (xy 125.350596 91.703167) (xy 125.355119 91.705592) + (xy 125.441287 91.731935) (xy 125.527182 91.759183) (xy 125.532282 91.759755) (xy 125.537185 91.761254) (xy 125.626799 91.770356) + (xy 125.71638 91.780405) (xy 125.726407 91.780474) (xy 125.726595 91.780494) (xy 125.726769 91.780477) (xy 125.73 91.7805) + (xy 126.272067 91.7805) (xy 126.316749 91.849833) (xy 126.544798 92.085984) (xy 126.67863 92.179) (xy 119.149072 92.179) + (xy 119.149072 88.100856) (xy 119.085307 87.77882) (xy 118.960206 87.475302) (xy 118.778534 87.201864) (xy 118.547211 86.96892) + (xy 118.4505 86.903687) (xy 118.4505 84.455) (xy 118.441705 84.365307) (xy 118.433853 84.275556) (xy 118.432423 84.270633) + (xy 118.431922 84.265524) (xy 118.405865 84.17922) (xy 118.380738 84.09273) (xy 118.378377 84.088176) (xy 118.376895 84.083266) + (xy 118.334585 84.003692) (xy 118.293123 83.923705) (xy 118.289923 83.919697) (xy 118.287515 83.915167) (xy 118.23056 83.845333) + (xy 118.174347 83.774916) (xy 118.167307 83.767777) (xy 118.167186 83.767629) (xy 118.167048 83.767515) (xy 118.164783 83.765218) + (xy 114.6405 80.240934) (xy 114.6405 60.96) (xy 114.631706 60.870311) (xy 114.623853 60.780555) (xy 114.622422 60.775632) + (xy 114.621922 60.770524) (xy 114.595869 60.684232) (xy 114.570738 60.59773) (xy 114.568377 60.593176) (xy 114.566895 60.588266) + (xy 114.524585 60.508692) (xy 114.483123 60.428705) (xy 114.479924 60.424697) (xy 114.477515 60.420167) (xy 114.420555 60.350327) + (xy 114.364346 60.279915) (xy 114.357303 60.272773) (xy 114.357186 60.272629) (xy 114.357052 60.272518) (xy 114.354783 60.270217) + (xy 113.084783 59.000217) (xy 113.015119 58.942995) (xy 112.946125 58.885102) (xy 112.941632 58.882632) (xy 112.937666 58.879374) + (xy 112.85822 58.836775) (xy 112.77929 58.793383) (xy 112.7744 58.791832) (xy 112.76988 58.789408) (xy 112.683726 58.763068) + (xy 112.597818 58.735817) (xy 112.592717 58.735244) (xy 112.587815 58.733746) (xy 112.4982 58.724643) (xy 112.40862 58.714595) + (xy 112.398592 58.714525) (xy 112.398405 58.714506) (xy 112.39823 58.714522) (xy 112.395 58.7145) (xy 111.915791 58.7145) + (xy 111.887013 58.678707) (xy 111.770499 58.58094) (xy 111.824931 58.570113) (xy 111.94468 58.520512) (xy 112.05245 58.448502) + (xy 112.144102 58.356851) (xy 112.216112 58.24908) (xy 112.265713 58.129332) (xy 112.291 58.002208) (xy 112.291 57.872593) + (xy 112.291 56.297793) (xy 112.265713 56.170669) (xy 112.216112 56.05092) (xy 112.144102 55.94315) (xy 112.052451 55.851498) + (xy 111.94468 55.779488) (xy 111.824932 55.729887) (xy 111.697808 55.7046) (xy 111.568193 55.7046) (xy 111.3639 55.7046) + (xy 111.3639 53.701981) (xy 112.121981 52.9439) (xy 113.258077 52.9439) (xy 113.416571 53.108025) (xy 113.635016 53.259849) + (xy 113.87879 53.366351) (xy 114.138608 53.423476) (xy 114.404573 53.429047) (xy 114.666555 53.382852) (xy 114.914575 53.286652) + (xy 115.139186 53.144109) (xy 115.331833 52.960654) (xy 115.485177 52.743274) (xy 115.571138 52.550202) (xy 115.628852 52.695351) + (xy 115.647162 52.729606) (xy 115.882364 52.790755) (xy 116.603119 52.07) (xy 115.882364 51.349245) (xy 115.647162 51.410394) + (xy 115.569585 51.590381) (xy 115.503514 51.43008) (xy 115.356299 51.208504) (xy 115.2755 51.127138) (xy 115.2755 49.291989) + (xy 115.380134 49.192347) (xy 115.540657 48.964791) (xy 115.653924 48.71039) (xy 115.71562 48.438834) (xy 115.720061 48.120762) + (xy 115.665971 47.847589) (xy 115.559852 47.590125) (xy 115.405746 47.358176) (xy 115.209522 47.160577) (xy 114.978654 47.004855) + (xy 114.721937 46.896941) (xy 114.449149 46.840946) (xy 114.170679 46.839001) (xy 113.897135 46.891183) (xy 113.638936 46.995502) + (xy 113.405917 47.147985) (xy 113.206953 47.342825) (xy 113.049623 47.5726) (xy 112.93992 47.828557) (xy 112.882021 48.100948) + (xy 112.878133 48.379397) (xy 112.928404 48.653299) (xy 113.030918 48.91222) (xy 113.181771 49.146298) (xy 113.3245 49.294098) + (xy 113.3245 51.126594) (xy 113.255832 51.193839) (xy 113.254283 51.1961) (xy 111.76 51.1961) (xy 111.679687 51.203974) + (xy 111.599245 51.211012) (xy 111.594829 51.212294) (xy 111.590259 51.212743) (xy 111.51296 51.23608) (xy 111.435462 51.258597) + (xy 111.431386 51.260709) (xy 111.426983 51.262039) (xy 111.355657 51.299963) (xy 111.28404 51.337086) (xy 111.28045 51.339951) + (xy 111.276391 51.34211) (xy 111.213818 51.393143) (xy 111.150747 51.443492) (xy 111.144353 51.449796) (xy 111.14422 51.449906) + (xy 111.144117 51.45003) (xy 111.142059 51.45206) (xy 109.872059 52.722059) (xy 109.820831 52.784424) (xy 109.768933 52.846275) + (xy 109.766717 52.850304) (xy 109.763803 52.853853) (xy 109.725668 52.924973) (xy 109.686768 52.995734) (xy 109.685378 53.000114) + (xy 109.683207 53.004164) (xy 109.659601 53.081372) (xy 109.635197 53.158306) (xy 109.634684 53.162871) (xy 109.633341 53.167267) + (xy 109.625182 53.247589) (xy 109.616185 53.327798) (xy 109.616122 53.336778) (xy 109.616105 53.33695) (xy 109.61612 53.33711) + (xy 109.6161 53.34) (xy 109.6161 55.7046) (xy 109.282193 55.7046) (xy 109.155069 55.729887) (xy 109.03532 55.779488) + (xy 108.92755 55.851498) (xy 108.835898 55.943149) (xy 108.763888 56.05092) (xy 108.714287 56.170668) (xy 108.689 56.297792) + (xy 108.689 56.427407) (xy 108.689 58.002207) (xy 108.714287 58.129331) (xy 108.763888 58.24908) (xy 108.835898 58.35685) + (xy 108.927549 58.448502) (xy 109.03532 58.520512) (xy 109.155068 58.570113) (xy 109.209518 58.580944) (xy 109.107208 58.664386) + (xy 108.927395 58.881743) (xy 108.793225 59.129885) (xy 108.709808 59.399362) (xy 108.680321 59.679909) (xy 108.705888 59.960841) + (xy 108.785534 60.231456) (xy 108.916227 60.481448) (xy 109.092987 60.701293) (xy 109.309083 60.882619) (xy 109.449977 60.960076) + (xy 109.325814 61.026096) (xy 109.107208 61.204386) (xy 108.927395 61.421743) (xy 108.793225 61.669885) (xy 108.709808 61.939362) + (xy 108.680321 62.219909) (xy 108.705888 62.500841) (xy 108.785534 62.771456) (xy 108.916227 63.021448) (xy 109.092987 63.241293) + (xy 109.309083 63.422619) (xy 109.449977 63.500076) (xy 109.325814 63.566096) (xy 109.107208 63.744386) (xy 108.927395 63.961743) + (xy 108.793225 64.209885) (xy 108.709808 64.479362) (xy 108.680321 64.759909) (xy 108.705888 65.040841) (xy 108.785534 65.311456) + (xy 108.916227 65.561448) (xy 109.092987 65.781293) (xy 109.309083 65.962619) (xy 109.556282 66.098518) (xy 109.82517 66.183815) + (xy 110.105505 66.215259) (xy 110.125686 66.2154) (xy 110.854314 66.2154) (xy 111.13506 66.187873) (xy 111.405113 66.106339) + (xy 111.654186 65.973904) (xy 111.872792 65.795614) (xy 112.052605 65.578257) (xy 112.186775 65.330115) (xy 112.270192 65.060638) + (xy 112.299679 64.780091) (xy 112.274112 64.499159) (xy 112.194466 64.228544) (xy 112.063773 63.978552) (xy 111.887013 63.758707) + (xy 111.670917 63.577381) (xy 111.530022 63.499923) (xy 111.654186 63.433904) (xy 111.872792 63.255614) (xy 112.052605 63.038257) + (xy 112.186775 62.790115) (xy 112.270192 62.520638) (xy 112.299679 62.240091) (xy 112.274112 61.959159) (xy 112.194466 61.688544) + (xy 112.063773 61.438552) (xy 111.887013 61.218707) (xy 111.670917 61.037381) (xy 111.530022 60.959923) (xy 111.654186 60.893904) + (xy 111.872792 60.715614) (xy 111.914249 60.6655) (xy 111.990934 60.6655) (xy 112.6895 61.364066) (xy 112.6895 80.645) + (xy 112.698293 80.734688) (xy 112.706147 80.824445) (xy 112.707577 80.829367) (xy 112.708078 80.834476) (xy 112.73413 80.920767) + (xy 112.759262 81.00727) (xy 112.761622 81.011823) (xy 112.763105 81.016734) (xy 112.805414 81.096307) (xy 112.846877 81.176295) + (xy 112.850075 81.180302) (xy 112.852485 81.184833) (xy 112.909444 81.254672) (xy 112.965654 81.325085) (xy 112.972696 81.332226) + (xy 112.972814 81.332371) (xy 112.972947 81.332481) (xy 112.975217 81.334783) (xy 116.4995 84.859065) (xy 116.4995 86.9027) + (xy 116.42099 86.954076) (xy 116.186437 87.183767) (xy 116.000965 87.454642) (xy 115.871638 87.756384) (xy 115.803383 88.077498) + (xy 115.798799 88.405755) (xy 115.858062 88.72865) (xy 115.978913 89.033884) (xy 116.156749 89.309833) (xy 116.384798 89.545984) + (xy 116.654371 89.733342) (xy 116.955203 89.864772) (xy 117.275833 89.935267) (xy 117.604049 89.942142) (xy 117.92735 89.885136) + (xy 118.233421 89.766419) (xy 118.510604 89.590513) (xy 118.748341 89.364119) (xy 118.937577 89.09586) (xy 119.071104 88.795953) + (xy 119.143836 88.475823) (xy 119.149072 88.100856) (xy 119.149072 92.179) (xy 115.466 92.179) (xy 115.466 88.265) + (xy 115.455489 88.157803) (xy 115.446103 88.050514) (xy 115.444392 88.044626) (xy 115.443794 88.038523) (xy 115.412664 87.935417) + (xy 115.382615 87.831985) (xy 115.379792 87.82654) (xy 115.378021 87.820672) (xy 115.32746 87.725582) (xy 115.27789 87.629951) + (xy 115.274064 87.625159) (xy 115.271186 87.619745) (xy 115.203123 87.536292) (xy 115.135918 87.452106) (xy 115.127497 87.443567) + (xy 115.127359 87.443397) (xy 115.127201 87.443266) (xy 115.124487 87.440514) (xy 111.656 83.972026) (xy 111.656 80.226476) + (xy 111.69068 80.212112) (xy 111.79845 80.140102) (xy 111.890102 80.048451) (xy 111.962112 79.94068) (xy 112.011713 79.820932) + (xy 112.037 79.693808) (xy 112.037 79.564193) (xy 112.037 77.786193) (xy 112.011713 77.659069) (xy 111.962112 77.53932) + (xy 111.890102 77.43155) (xy 111.798451 77.339898) (xy 111.69068 77.267888) (xy 111.656 77.253523) (xy 111.656 73.66) + (xy 111.64548 73.552717) (xy 111.636102 73.445513) (xy 111.634392 73.439629) (xy 111.633794 73.433523) (xy 111.602645 73.330355) + (xy 111.572614 73.226984) (xy 111.569793 73.221542) (xy 111.568021 73.215672) (xy 111.51743 73.120525) (xy 111.467889 73.024951) + (xy 111.464066 73.020163) (xy 111.461186 73.014745) (xy 111.393096 72.931259) (xy 111.325917 72.847105) (xy 111.317497 72.838567) + (xy 111.317359 72.838397) (xy 111.317201 72.838266) (xy 111.314486 72.835513) (xy 108.774487 70.295513) (xy 108.691208 70.227107) + (xy 108.608752 70.157918) (xy 108.60338 70.154964) (xy 108.598641 70.151072) (xy 108.503699 70.100164) (xy 108.409336 70.048288) + (xy 108.403492 70.046434) (xy 108.398089 70.043537) (xy 108.295097 70.012049) (xy 108.192425 69.97948) (xy 108.18633 69.978796) + (xy 108.180468 69.977004) (xy 108.073345 69.966123) (xy 107.96628 69.954114) (xy 107.954286 69.95403) (xy 107.95407 69.954008) + (xy 107.953868 69.954027) (xy 107.95 69.954) (xy 104.163 69.954) (xy 104.163 59.119808) (xy 104.163 58.990193) + (xy 104.163 50.100193) (xy 104.137713 49.973069) (xy 104.088112 49.85332) (xy 104.016102 49.74555) (xy 103.924451 49.653898) + (xy 103.81668 49.581888) (xy 103.696932 49.532287) (xy 103.569808 49.507) (xy 103.440193 49.507) (xy 94.550193 49.507) + (xy 94.423069 49.532287) (xy 94.30332 49.581888) (xy 94.19555 49.653898) (xy 94.103898 49.745549) (xy 94.031888 49.85332) + (xy 93.982287 49.973068) (xy 93.957 50.100192) (xy 93.957 50.229807) (xy 93.957 59.119807) (xy 93.982287 59.246931) + (xy 94.031888 59.36668) (xy 94.103898 59.47445) (xy 94.195549 59.566102) (xy 94.30332 59.638112) (xy 94.423068 59.687713) + (xy 94.550192 59.713) (xy 94.679807 59.713) (xy 103.569807 59.713) (xy 103.696931 59.687713) (xy 103.81668 59.638112) + (xy 103.92445 59.566102) (xy 104.016102 59.474451) (xy 104.088112 59.36668) (xy 104.137713 59.246932) (xy 104.163 59.119808) + (xy 104.163 69.954) (xy 102.622396 69.954) (xy 102.590866 69.922249) (xy 102.339351 69.752599) (xy 102.059674 69.635034) + (xy 101.762488 69.574031) (xy 101.459113 69.571913) (xy 101.161104 69.628761) (xy 100.879813 69.74241) (xy 100.625954 69.908531) + (xy 100.556012 69.977022) (xy 100.532112 69.91932) (xy 100.460102 69.81155) (xy 100.368451 69.719898) (xy 100.26068 69.647888) + (xy 100.140932 69.598287) (xy 100.013808 69.573) (xy 99.884193 69.573) (xy 99.392 69.573) (xy 99.2275 69.7375) + (xy 99.2275 70.9525) (xy 99.2475 70.9525) (xy 99.2475 71.2875) (xy 99.2275 71.2875) (xy 99.2275 72.5025) + (xy 99.392 72.667) (xy 99.884193 72.667) (xy 100.013808 72.667) (xy 100.140932 72.641713) (xy 100.26068 72.592112) + (xy 100.368451 72.520102) (xy 100.460102 72.42845) (xy 100.532112 72.32068) (xy 100.555134 72.265099) (xy 100.592507 72.3038) + (xy 100.841629 72.476944) (xy 101.119638 72.598403) (xy 101.415943 72.66355) (xy 101.719259 72.669904) (xy 102.018032 72.617222) + (xy 102.300882 72.507511) (xy 102.557037 72.344951) (xy 102.618941 72.286) (xy 107.467026 72.286) (xy 109.324 74.142973) + (xy 109.324 77.253523) (xy 109.28932 77.267888) (xy 109.18155 77.339898) (xy 109.089898 77.431549) (xy 109.017888 77.53932) + (xy 108.968287 77.659068) (xy 108.943 77.786192) (xy 108.943 77.915807) (xy 108.943 79.693807) (xy 108.968287 79.820931) + (xy 109.017888 79.94068) (xy 109.089898 80.04845) (xy 109.181549 80.140102) (xy 109.28932 80.212112) (xy 109.324 80.226476) + (xy 109.324 84.455) (xy 109.334509 84.562188) (xy 109.343897 84.669487) (xy 109.345607 84.675375) (xy 109.346206 84.681477) + (xy 109.377345 84.784616) (xy 109.407386 84.888015) (xy 109.410205 84.893455) (xy 109.411979 84.899328) (xy 109.462558 84.994453) + (xy 109.51211 85.090049) (xy 109.515935 85.09484) (xy 109.518814 85.100255) (xy 109.586876 85.183707) (xy 109.654082 85.267894) + (xy 109.662505 85.276436) (xy 109.662641 85.276603) (xy 109.662794 85.27673) (xy 109.665513 85.279487) (xy 113.134 88.747973) + (xy 113.134 93.345) (xy 113.134 97.155) (xy 113.144509 97.262188) (xy 113.153897 97.369487) (xy 113.155607 97.375375) + (xy 113.156206 97.381477) (xy 113.187345 97.484616) (xy 113.217386 97.588015) (xy 113.220205 97.593455) (xy 113.221979 97.599328) + (xy 113.272558 97.694453) (xy 113.32211 97.790049) (xy 113.325935 97.79484) (xy 113.328814 97.800255) (xy 113.396876 97.883707) + (xy 113.464082 97.967894) (xy 113.472505 97.976436) (xy 113.472641 97.976603) (xy 113.472794 97.97673) (xy 113.475513 97.979487) + (xy 114.404 98.907973) (xy 114.404 104.775) (xy 114.404 110.547359) (xy 114.377381 110.579083) (xy 114.36918 110.594) + (xy 111.405817 110.594) (xy 111.405817 90.063303) (xy 111.355203 89.762803) (xy 111.246936 89.477952) (xy 111.203736 89.397127) + (xy 110.949146 89.312735) (xy 110.712265 89.549616) (xy 110.712265 89.075854) (xy 110.627873 88.821264) (xy 110.349897 88.696399) + (xy 110.052902 88.628165) (xy 109.748303 88.619183) (xy 109.447803 88.669797) (xy 109.162952 88.778064) (xy 109.082127 88.821264) + (xy 108.997735 89.075854) (xy 109.855 89.933119) (xy 110.712265 89.075854) (xy 110.712265 89.549616) (xy 110.091881 90.17) + (xy 110.949146 91.027265) (xy 111.203736 90.942873) (xy 111.328601 90.664897) (xy 111.396835 90.367902) (xy 111.405817 90.063303) + (xy 111.405817 110.594) (xy 110.712265 110.594) (xy 110.712265 91.264146) (xy 109.855 90.406881) (xy 109.618119 90.643762) + (xy 109.618119 90.17) (xy 108.760854 89.312735) (xy 108.506264 89.397127) (xy 108.381399 89.675103) (xy 108.313165 89.972098) + (xy 108.304183 90.276697) (xy 108.354797 90.577197) (xy 108.463064 90.862048) (xy 108.506264 90.942873) (xy 108.760854 91.027265) + (xy 109.618119 90.17) (xy 109.618119 90.643762) (xy 108.997735 91.264146) (xy 109.082127 91.518736) (xy 109.360103 91.643601) + (xy 109.657098 91.711835) (xy 109.961697 91.720817) (xy 110.262197 91.670203) (xy 110.547048 91.561936) (xy 110.627873 91.518736) + (xy 110.712265 91.264146) (xy 110.712265 110.594) (xy 109.111552 110.594) (xy 109.067951 110.550398) (xy 108.977558 110.489999) + (xy 109.06795 110.429602) (xy 109.159602 110.337951) (xy 109.231612 110.23018) (xy 109.281213 110.110432) (xy 109.3065 109.983308) + (xy 109.3065 109.853693) (xy 109.3065 108.456693) (xy 109.281213 108.329569) (xy 109.231612 108.20982) (xy 109.159602 108.10205) + (xy 109.067951 108.010398) (xy 108.96018 107.938388) (xy 108.840432 107.888787) (xy 108.713308 107.8635) (xy 108.583693 107.8635) + (xy 107.186693 107.8635) (xy 107.059569 107.888787) (xy 106.93982 107.938388) (xy 106.83205 108.010398) (xy 106.740398 108.102049) + (xy 106.668388 108.20982) (xy 106.647863 108.25937) (xy 106.627555 108.261147) (xy 106.622632 108.262577) (xy 106.617524 108.263078) + (xy 106.531232 108.28913) (xy 106.44473 108.314262) (xy 106.440175 108.316622) (xy 106.435266 108.318105) (xy 106.355713 108.360403) + (xy 106.275704 108.401877) (xy 106.271694 108.405077) (xy 106.267167 108.407485) (xy 106.197349 108.464426) (xy 106.126915 108.520654) + (xy 106.119777 108.527692) (xy 106.119629 108.527814) (xy 106.119515 108.527951) (xy 106.117217 108.530218) (xy 103.862934 110.7845) + (xy 101.688266 110.7845) (xy 101.688266 109.105737) (xy 101.639876 108.842948) (xy 101.541148 108.594649) (xy 101.522838 108.560394) + (xy 101.287636 108.499245) (xy 101.050755 108.736126) (xy 101.050755 108.262364) (xy 100.989606 108.027162) (xy 100.744221 107.921399) + (xy 100.482917 107.865541) (xy 100.215737 107.861734) (xy 99.952948 107.910124) (xy 99.704649 108.008852) (xy 99.670394 108.027162) + (xy 99.609245 108.262364) (xy 100.33 108.983119) (xy 101.050755 108.262364) (xy 101.050755 108.736126) (xy 100.566881 109.22) + (xy 101.287636 109.940755) (xy 101.522838 109.879606) (xy 101.628601 109.634221) (xy 101.684459 109.372917) (xy 101.688266 109.105737) + (xy 101.688266 110.7845) (xy 101.273088 110.7845) (xy 101.19885 110.709741) (xy 100.978306 110.560983) (xy 100.808421 110.489569) + (xy 100.955351 110.431148) (xy 100.989606 110.412838) (xy 101.050755 110.177636) (xy 100.33 109.456881) (xy 100.093119 109.693762) + (xy 100.093119 109.22) (xy 99.372364 108.499245) (xy 99.137162 108.560394) (xy 99.09501 108.65819) (xy 99.061449 108.572403) + (xy 99.034836 108.522615) (xy 98.8925 108.482025) (xy 98.8925 72.5025) (xy 98.8925 71.2875) (xy 98.8725 71.2875) + (xy 98.8725 70.9525) (xy 98.8925 70.9525) (xy 98.8925 69.7375) (xy 98.728 69.573) (xy 98.235807 69.573) + (xy 98.106192 69.573) (xy 97.979068 69.598287) (xy 97.85932 69.647888) (xy 97.751549 69.719898) (xy 97.659898 69.81155) + (xy 97.587888 69.91932) (xy 97.564361 69.976119) (xy 97.510866 69.922249) (xy 97.259351 69.752599) (xy 96.979674 69.635034) + (xy 96.682488 69.574031) (xy 96.379113 69.571913) (xy 96.081104 69.628761) (xy 95.799813 69.74241) (xy 95.545954 69.908531) + (xy 95.499522 69.954) (xy 89.177066 69.954) (xy 89.177066 58.268309) (xy 89.118139 57.970704) (xy 89.002529 57.690213) + (xy 88.83464 57.43752) (xy 88.620866 57.222249) (xy 88.369351 57.052599) (xy 88.089674 56.935034) (xy 87.792488 56.874031) + (xy 87.489113 56.871913) (xy 87.191104 56.928761) (xy 86.909813 57.04241) (xy 86.655954 57.208531) (xy 86.439195 57.420796) + (xy 86.267794 57.671121) (xy 86.148279 57.949971) (xy 86.085203 58.246723) (xy 86.084224 58.316802) (xy 83.337026 61.064) + (xy 80.280155 61.064) (xy 80.241322 61.005551) (xy 79.9749 60.737262) (xy 79.661441 60.525831) (xy 79.312884 60.379312) + (xy 78.942506 60.303284) (xy 78.564415 60.300644) (xy 78.193012 60.371493) (xy 77.842443 60.513132) (xy 77.526062 60.720166) + (xy 77.25592 60.984709) (xy 77.042306 61.296685) (xy 76.893356 61.64421) (xy 76.814745 62.014048) (xy 76.809465 62.392112) + (xy 76.87772 62.764) (xy 77.016908 63.115549) (xy 77.221728 63.433368) (xy 77.484379 63.70535) (xy 77.794855 63.921137) + (xy 78.141332 64.072509) (xy 78.510613 64.153701) (xy 78.88863 64.161619) (xy 79.260986 64.095963) (xy 79.613498 63.959232) + (xy 79.932739 63.756636) (xy 80.206548 63.495891) (xy 80.277013 63.396) (xy 83.82 63.396) (xy 83.927188 63.38549) + (xy 84.034487 63.376103) (xy 84.040375 63.374392) (xy 84.046477 63.373794) (xy 84.149616 63.342654) (xy 84.253015 63.312614) + (xy 84.258455 63.309794) (xy 84.264328 63.308021) (xy 84.359453 63.257441) (xy 84.455049 63.20789) (xy 84.45984 63.204064) + (xy 84.465255 63.201186) (xy 84.548707 63.133123) (xy 84.632894 63.065918) (xy 84.641436 63.057494) (xy 84.641603 63.057359) + (xy 84.64173 63.057205) (xy 84.644487 63.054487) (xy 87.729483 59.969489) (xy 87.749259 59.969904) (xy 88.048032 59.917222) + (xy 88.330882 59.807511) (xy 88.587037 59.644951) (xy 88.806737 59.435733) (xy 88.981617 59.187825) (xy 89.105014 58.910672) + (xy 89.172227 58.614829) (xy 89.177066 58.268309) (xy 89.177066 69.954) (xy 89.116476 69.954) (xy 89.102112 69.91932) + (xy 89.030102 69.81155) (xy 88.938451 69.719898) (xy 88.83068 69.647888) (xy 88.710932 69.598287) (xy 88.583808 69.573) + (xy 88.454193 69.573) (xy 86.676193 69.573) (xy 86.549069 69.598287) (xy 86.42932 69.647888) (xy 86.32155 69.719898) + (xy 86.229898 69.811549) (xy 86.157888 69.91932) (xy 86.108287 70.039068) (xy 86.083 70.166192) (xy 86.083 70.295807) + (xy 86.083 71.018026) (xy 81.725513 75.375513) (xy 81.657107 75.458791) (xy 81.587918 75.541248) (xy 81.584964 75.546619) + (xy 81.581072 75.551359) (xy 81.530164 75.6463) (xy 81.478288 75.740664) (xy 81.476434 75.746507) (xy 81.473537 75.751911) + (xy 81.442049 75.854902) (xy 81.40948 75.957575) (xy 81.408796 75.963669) (xy 81.407004 75.969532) (xy 81.396123 76.076654) + (xy 81.384114 76.18372) (xy 81.38403 76.195713) (xy 81.384008 76.19593) (xy 81.384027 76.196131) (xy 81.384 76.2) + (xy 81.384 87.63) (xy 81.394509 87.737188) (xy 81.403897 87.844487) (xy 81.405607 87.850375) (xy 81.406206 87.856477) + (xy 81.437345 87.959616) (xy 81.467386 88.063015) (xy 81.470205 88.068455) (xy 81.471979 88.074328) (xy 81.522558 88.169453) + (xy 81.57211 88.265049) (xy 81.575935 88.26984) (xy 81.578814 88.275255) (xy 81.646876 88.358707) (xy 81.714082 88.442894) + (xy 81.722505 88.451436) (xy 81.722641 88.451603) (xy 81.722794 88.45173) (xy 81.725513 88.454487) (xy 82.908 89.636973) + (xy 82.908 91.123807) (xy 82.933287 91.250931) (xy 82.982888 91.37068) (xy 83.054898 91.47845) (xy 83.146549 91.570102) + (xy 83.25432 91.642112) (xy 83.374068 91.691713) (xy 83.501192 91.717) (xy 83.630807 91.717) (xy 85.408807 91.717) + (xy 85.535931 91.691713) (xy 85.65568 91.642112) (xy 85.76345 91.570102) (xy 85.855102 91.478451) (xy 85.927112 91.37068) + (xy 85.976713 91.250932) (xy 86.002 91.123808) (xy 86.002 90.994193) (xy 86.002 89.216193) (xy 85.976713 89.089069) + (xy 85.947265 89.017974) (xy 85.947265 79.834146) (xy 85.09 78.976881) (xy 84.232735 79.834146) (xy 84.317127 80.088736) + (xy 84.595103 80.213601) (xy 84.892098 80.281835) (xy 85.196697 80.290817) (xy 85.497197 80.240203) (xy 85.782048 80.131936) + (xy 85.862873 80.088736) (xy 85.947265 79.834146) (xy 85.947265 89.017974) (xy 85.927112 88.96932) (xy 85.855102 88.86155) + (xy 85.763451 88.769898) (xy 85.65568 88.697888) (xy 85.535932 88.648287) (xy 85.408808 88.623) (xy 85.279193 88.623) + (xy 85.191973 88.623) (xy 83.716 87.147026) (xy 83.716 79.465605) (xy 83.741264 79.512873) (xy 83.995854 79.597265) + (xy 84.853119 78.74) (xy 83.995854 77.882735) (xy 83.741264 77.967127) (xy 83.716 78.02337) (xy 83.716 76.682973) + (xy 87.731973 72.667) (xy 88.583807 72.667) (xy 88.710931 72.641713) (xy 88.83068 72.592112) (xy 88.93845 72.520102) + (xy 89.030102 72.428451) (xy 89.102112 72.32068) (xy 89.116476 72.286) (xy 95.495317 72.286) (xy 95.512507 72.3038) + (xy 95.761629 72.476944) (xy 96.039638 72.598403) (xy 96.335943 72.66355) (xy 96.639259 72.669904) (xy 96.938032 72.617222) + (xy 97.220882 72.507511) (xy 97.477037 72.344951) (xy 97.563741 72.262383) (xy 97.587888 72.32068) (xy 97.659898 72.42845) + (xy 97.751549 72.520102) (xy 97.85932 72.592112) (xy 97.979068 72.641713) (xy 98.106192 72.667) (xy 98.235807 72.667) + (xy 98.728 72.667) (xy 98.8925 72.5025) (xy 98.8925 108.482025) (xy 98.793179 108.453702) (xy 98.556298 108.690583) + (xy 98.556298 108.216821) (xy 98.487385 107.975164) (xy 98.23113 107.86303) (xy 97.957922 107.803043) (xy 97.678261 107.79751) + (xy 97.402894 107.846642) (xy 97.142403 107.948551) (xy 97.092615 107.975164) (xy 97.023702 108.216821) (xy 97.79 108.983119) + (xy 98.556298 108.216821) (xy 98.556298 108.690583) (xy 98.026881 109.22) (xy 98.793179 109.986298) (xy 99.034836 109.917385) + (xy 99.09386 109.782498) (xy 99.118852 109.845351) (xy 99.137162 109.879606) (xy 99.372364 109.940755) (xy 100.093119 109.22) + (xy 100.093119 109.693762) (xy 99.609245 110.177636) (xy 99.670394 110.412838) (xy 99.850703 110.490553) (xy 99.698498 110.552048) + (xy 99.475899 110.697712) (xy 99.387273 110.7845) (xy 98.822582 110.7845) (xy 98.699522 110.660577) (xy 98.468654 110.504855) + (xy 98.437164 110.491618) (xy 98.437597 110.491449) (xy 98.487385 110.464836) (xy 98.556298 110.223179) (xy 97.79 109.456881) + (xy 97.553119 109.693762) (xy 97.553119 109.22) (xy 96.786821 108.453702) (xy 96.545164 108.522615) (xy 96.43303 108.77887) + (xy 96.373043 109.052078) (xy 96.36751 109.331739) (xy 96.416642 109.607106) (xy 96.518551 109.867597) (xy 96.545164 109.917385) + (xy 96.786821 109.986298) (xy 97.553119 109.22) (xy 97.553119 109.693762) (xy 97.023702 110.223179) (xy 97.092615 110.464836) + (xy 97.146488 110.48841) (xy 97.128936 110.495502) (xy 96.895917 110.647985) (xy 96.696953 110.842825) (xy 96.539623 111.0726) + (xy 96.42992 111.328557) (xy 96.372021 111.600948) (xy 96.368133 111.879397) (xy 96.418404 112.153299) (xy 96.520918 112.41222) + (xy 96.671771 112.646298) (xy 96.71349 112.6895) (xy 88.712142 112.6895) (xy 88.870657 112.464791) (xy 88.983924 112.21039) + (xy 89.04562 111.938834) (xy 89.050061 111.620762) (xy 88.995971 111.347589) (xy 88.889852 111.090125) (xy 88.735746 110.858176) + (xy 88.6055 110.727017) (xy 88.6055 110.251989) (xy 88.710134 110.152347) (xy 88.870657 109.924791) (xy 88.983924 109.67039) + (xy 89.04562 109.398834) (xy 89.050061 109.080762) (xy 88.995971 108.807589) (xy 88.889852 108.550125) (xy 88.735746 108.318176) + (xy 88.539522 108.120577) (xy 88.308654 107.964855) (xy 88.051937 107.856941) (xy 87.779149 107.800946) (xy 87.500679 107.799001) + (xy 87.227135 107.851183) (xy 86.968936 107.955502) (xy 86.735917 108.107985) (xy 86.640817 108.201113) (xy 86.640817 78.633303) + (xy 86.590203 78.332803) (xy 86.481936 78.047952) (xy 86.438736 77.967127) (xy 86.184146 77.882735) (xy 85.947265 78.119616) + (xy 85.947265 77.645854) (xy 85.862873 77.391264) (xy 85.584897 77.266399) (xy 85.287902 77.198165) (xy 84.983303 77.189183) + (xy 84.682803 77.239797) (xy 84.397952 77.348064) (xy 84.317127 77.391264) (xy 84.232735 77.645854) (xy 85.09 78.503119) + (xy 85.947265 77.645854) (xy 85.947265 78.119616) (xy 85.326881 78.74) (xy 86.184146 79.597265) (xy 86.438736 79.512873) + (xy 86.563601 79.234897) (xy 86.631835 78.937902) (xy 86.640817 78.633303) (xy 86.640817 108.201113) (xy 86.536953 108.302825) + (xy 86.379623 108.5326) (xy 86.26992 108.788557) (xy 86.212021 109.060948) (xy 86.208133 109.339397) (xy 86.258404 109.613299) + (xy 86.360918 109.87222) (xy 86.511771 110.106298) (xy 86.6545 110.254098) (xy 86.6545 110.727714) (xy 86.596512 110.7845) + (xy 83.97249 110.7845) (xy 83.589383 110.7845) (xy 83.553181 110.748297) (xy 83.794836 110.679385) (xy 83.90697 110.42313) + (xy 83.966957 110.149922) (xy 83.97249 109.870261) (xy 83.923358 109.594894) (xy 83.821449 109.334403) (xy 83.794836 109.284615) + (xy 83.553179 109.215702) (xy 83.316298 109.452583) (xy 83.316298 108.978821) (xy 83.247385 108.737164) (xy 82.99113 108.62503) + (xy 82.717922 108.565043) (xy 82.57311 108.562177) (xy 82.57311 102.491685) (xy 82.475482 101.998627) (xy 82.283944 101.533922) + (xy 82.005793 101.115271) (xy 81.651622 100.758619) (xy 81.234923 100.477552) (xy 80.771567 100.282775) (xy 80.668 100.261515) + (xy 80.668 68.644807) (xy 80.668 67.642) (xy 80.668 66.978) (xy 80.668 65.975193) (xy 80.642713 65.848069) + (xy 80.593112 65.72832) (xy 80.521102 65.62055) (xy 80.429451 65.528898) (xy 80.32168 65.456888) (xy 80.201932 65.407287) + (xy 80.074808 65.382) (xy 79.945193 65.382) (xy 79.072 65.382) (xy 78.9075 65.5465) (xy 78.9075 67.1425) + (xy 80.5035 67.1425) (xy 80.668 66.978) (xy 80.668 67.642) (xy 80.5035 67.4775) (xy 78.9075 67.4775) + (xy 78.9075 69.0735) (xy 79.072 69.238) (xy 79.945193 69.238) (xy 80.074808 69.238) (xy 80.201932 69.212713) + (xy 80.32168 69.163112) (xy 80.429451 69.091102) (xy 80.521102 68.99945) (xy 80.593112 68.89168) (xy 80.642713 68.771931) + (xy 80.668 68.644807) (xy 80.668 100.261515) (xy 80.279203 100.181707) (xy 79.776585 100.178198) (xy 79.282858 100.272382) + (xy 78.816827 100.46067) (xy 78.5725 100.620553) (xy 78.5725 69.0735) (xy 78.5725 67.4775) (xy 78.5725 67.1425) + (xy 78.5725 65.5465) (xy 78.408 65.382) (xy 77.534807 65.382) (xy 77.405192 65.382) (xy 77.278068 65.407287) + (xy 77.15832 65.456888) (xy 77.050549 65.528898) (xy 76.958898 65.62055) (xy 76.886888 65.72832) (xy 76.837287 65.848069) + (xy 76.812 65.975193) (xy 76.812 66.978) (xy 76.9765 67.1425) (xy 78.5725 67.1425) (xy 78.5725 67.4775) + (xy 76.9765 67.4775) (xy 76.812 67.642) (xy 76.812 68.644807) (xy 76.837287 68.771931) (xy 76.886888 68.89168) + (xy 76.958898 68.99945) (xy 77.050549 69.091102) (xy 77.15832 69.163112) (xy 77.278068 69.212713) (xy 77.405192 69.238) + (xy 77.534807 69.238) (xy 78.408 69.238) (xy 78.5725 69.0735) (xy 78.5725 100.620553) (xy 78.396244 100.735892) + (xy 78.037128 101.087564) (xy 77.753159 101.502291) (xy 77.555152 101.964276) (xy 77.450649 102.455923) (xy 77.443631 102.958504) + (xy 77.534366 103.452877) (xy 77.719396 103.92021) (xy 77.991675 104.342705) (xy 78.340831 104.704267) (xy 78.753566 104.991124) + (xy 79.214157 105.192352) (xy 79.705062 105.300284) (xy 80.207582 105.310811) (xy 80.702576 105.22353) (xy 81.17119 105.041766) + (xy 81.595575 104.772444) (xy 81.959566 104.42582) (xy 82.249298 104.015098) (xy 82.453736 103.555923) (xy 82.565093 103.065783) + (xy 82.57311 102.491685) (xy 82.57311 108.562177) (xy 82.438261 108.55951) (xy 82.162894 108.608642) (xy 81.902403 108.710551) + (xy 81.852615 108.737164) (xy 81.783702 108.978821) (xy 82.55 109.745119) (xy 83.316298 108.978821) (xy 83.316298 109.452583) + (xy 82.786881 109.982) (xy 82.801023 109.996142) (xy 82.564141 110.233023) (xy 82.55 110.218881) (xy 82.313119 110.455762) + (xy 82.313119 109.982) (xy 81.546821 109.215702) (xy 81.305164 109.284615) (xy 81.19303 109.54087) (xy 81.133043 109.814078) + (xy 81.12751 110.093739) (xy 81.176642 110.369106) (xy 81.278551 110.629597) (xy 81.305164 110.679385) (xy 81.546821 110.748298) + (xy 82.313119 109.982) (xy 82.313119 110.455762) (xy 81.783702 110.985179) (xy 81.852615 111.226836) (xy 82.10887 111.33897) + (xy 82.205293 111.360141) (xy 82.160871 111.404562) (xy 82.147135 111.407183) (xy 81.888936 111.511502) (xy 81.655917 111.663985) + (xy 81.456953 111.858825) (xy 81.299623 112.0886) (xy 81.18992 112.344557) (xy 81.132021 112.616948) (xy 81.128133 112.895397) + (xy 81.178404 113.169299) (xy 81.189569 113.1975) (xy 81.042582 113.1975) (xy 80.919522 113.073577) (xy 80.688654 112.917855) + (xy 80.431937 112.809941) (xy 80.265866 112.775851) (xy 80.393714 112.753309) (xy 80.653344 112.652605) (xy 80.88847 112.50339) + (xy 81.090134 112.311347) (xy 81.250657 112.083791) (xy 81.363924 111.82939) (xy 81.42562 111.557834) (xy 81.430061 111.239762) + (xy 81.375971 110.966589) (xy 81.269852 110.709125) (xy 81.115746 110.477176) (xy 80.919522 110.279577) (xy 80.688654 110.123855) + (xy 80.431937 110.015941) (xy 80.159149 109.959946) (xy 79.880679 109.958001) (xy 79.607135 110.010183) (xy 79.348936 110.114502) + (xy 79.115917 110.266985) (xy 78.916953 110.461825) (xy 78.759623 110.6916) (xy 78.64992 110.947557) (xy 78.592021 111.219948) + (xy 78.588133 111.498397) (xy 78.638404 111.772299) (xy 78.740918 112.03122) (xy 78.891771 112.265298) (xy 79.085217 112.465617) + (xy 79.313887 112.624547) (xy 79.569073 112.736035) (xy 79.752715 112.776411) (xy 79.607135 112.804183) (xy 79.348936 112.908502) + (xy 79.115917 113.060985) (xy 78.916953 113.255825) (xy 78.759623 113.4856) (xy 78.64992 113.741557) (xy 78.592021 114.013948) + (xy 78.588133 114.292397) (xy 78.638404 114.566299) (xy 78.740918 114.82522) (xy 78.891771 115.059298) (xy 79.085217 115.259617) + (xy 79.313887 115.418547) (xy 79.517374 115.507448) (xy 79.348936 115.575502) (xy 79.115917 115.727985) (xy 78.976512 115.8645) + (xy 78.105 115.8645) (xy 78.015307 115.873294) (xy 77.925556 115.881147) (xy 77.920633 115.882576) (xy 77.915524 115.883078) + (xy 77.82922 115.909134) (xy 77.74273 115.934262) (xy 77.738175 115.936622) (xy 77.733266 115.938105) (xy 77.653732 115.980393) + (xy 77.573705 116.021876) (xy 77.569694 116.025077) (xy 77.565167 116.027485) (xy 77.495361 116.084417) (xy 77.424916 116.140653) + (xy 77.417777 116.147692) (xy 77.417629 116.147814) (xy 77.417515 116.147951) (xy 77.415218 116.150217) (xy 76.780217 116.785217) + (xy 76.722995 116.85488) (xy 76.665102 116.923875) (xy 76.662632 116.928367) (xy 76.659374 116.932334) (xy 76.616775 117.011779) + (xy 76.573383 117.09071) (xy 76.571832 117.095599) (xy 76.569408 117.10012) (xy 76.543068 117.186273) (xy 76.515817 117.272182) + (xy 76.515244 117.277282) (xy 76.513746 117.282185) (xy 76.504643 117.371799) (xy 76.494595 117.46138) (xy 76.494525 117.471407) + (xy 76.494506 117.471595) (xy 76.494522 117.471769) (xy 76.4945 117.475) (xy 76.4945 120.65) (xy 76.503293 120.739688) + (xy 76.511147 120.829445) (xy 76.512577 120.834367) (xy 76.513078 120.839476) (xy 76.53913 120.925767) (xy 76.564262 121.01227) + (xy 76.566622 121.016823) (xy 76.568105 121.021734) (xy 76.610414 121.101307) (xy 76.651877 121.181295) (xy 76.655075 121.185302) + (xy 76.657485 121.189833) (xy 76.714444 121.259672) (xy 76.770654 121.330085) (xy 76.777696 121.337226) (xy 76.777814 121.337371) + (xy 76.777947 121.337481) (xy 76.780217 121.339783) (xy 79.320217 123.879782) (xy 79.389845 123.936975) (xy 79.458875 123.994898) + (xy 79.463367 123.997368) (xy 79.467333 124.000625) (xy 79.546745 124.043205) (xy 79.62571 124.086617) (xy 79.630601 124.088168) + (xy 79.635119 124.090591) (xy 79.721254 124.116925) (xy 79.807182 124.144183) (xy 79.81228 124.144754) (xy 79.817184 124.146254) + (xy 79.906804 124.155357) (xy 79.99638 124.165405) (xy 80.006407 124.165474) (xy 80.006595 124.165494) (xy 80.006769 124.165477) + (xy 80.01 124.1655) (xy 84.685934 124.1655) (xy 85.670217 125.149783) (xy 85.73988 125.207004) (xy 85.808875 125.264898) + (xy 85.813367 125.267367) (xy 85.817334 125.270626) (xy 85.896798 125.313234) (xy 85.97571 125.356617) (xy 85.980596 125.358167) + (xy 85.985119 125.360592) (xy 86.071287 125.386935) (xy 86.157182 125.414183) (xy 86.162282 125.414755) (xy 86.167185 125.416254) + (xy 86.256799 125.425356) (xy 86.34638 125.435405) (xy 86.356407 125.435474) (xy 86.356595 125.435494) (xy 86.356769 125.435477) + (xy 86.36 125.4355) (xy 86.597912 125.4355) (xy 86.705217 125.546617) (xy 86.933887 125.705547) (xy 87.189073 125.817035) + (xy 87.461053 125.876834) (xy 87.739468 125.882666) (xy 88.013714 125.834309) (xy 88.273344 125.733605) (xy 88.50847 125.58439) + (xy 88.710134 125.392347) (xy 88.870657 125.164791) (xy 88.983924 124.91039) (xy 89.04562 124.638834) (xy 89.050061 124.320762) + (xy 88.995971 124.047589) (xy 88.889852 123.790125) (xy 88.735746 123.558176) (xy 88.6055 123.427017) (xy 88.6055 122.951989) + (xy 88.710134 122.852347) (xy 88.870657 122.624791) (xy 88.983924 122.37039) (xy 89.04562 122.098834) (xy 89.050061 121.780762) + (xy 88.995971 121.507589) (xy 88.889852 121.250125) (xy 88.735746 121.018176) (xy 88.539522 120.820577) (xy 88.308654 120.664855) + (xy 88.051937 120.556941) (xy 87.779149 120.500946) (xy 87.500679 120.499001) (xy 87.227135 120.551183) (xy 86.968936 120.655502) + (xy 86.735917 120.807985) (xy 86.536953 121.002825) (xy 86.379623 121.2326) (xy 86.26992 121.488557) (xy 86.212021 121.760948) + (xy 86.208133 122.039397) (xy 86.258404 122.313299) (xy 86.360918 122.57222) (xy 86.511771 122.806298) (xy 86.6545 122.954098) + (xy 86.6545 123.374934) (xy 85.779783 122.500217) (xy 85.710119 122.442995) (xy 85.641125 122.385102) (xy 85.636632 122.382632) + (xy 85.632666 122.379374) (xy 85.55322 122.336775) (xy 85.47429 122.293383) (xy 85.4694 122.291832) (xy 85.46488 122.289408) + (xy 85.378726 122.263068) (xy 85.292818 122.235817) (xy 85.287717 122.235244) (xy 85.282815 122.233746) (xy 85.1932 122.224643) + (xy 85.10362 122.214595) (xy 85.093592 122.214525) (xy 85.093405 122.214506) (xy 85.09323 122.214522) (xy 85.09 122.2145) + (xy 83.821052 122.2145) (xy 83.823102 122.212451) (xy 83.895112 122.10468) (xy 83.944713 121.984932) (xy 83.97 121.857808) + (xy 83.97 121.728193) (xy 83.97 120.204193) (xy 83.944713 120.077069) (xy 83.895112 119.95732) (xy 83.823102 119.84955) + (xy 83.731451 119.757898) (xy 83.62368 119.685888) (xy 83.503932 119.636287) (xy 83.376808 119.611) (xy 83.247193 119.611) + (xy 82.93451 119.611) (xy 83.193344 119.510605) (xy 83.42847 119.36139) (xy 83.630134 119.169347) (xy 83.790657 118.941791) + (xy 83.903924 118.68739) (xy 83.96562 118.415834) (xy 83.970061 118.097762) (xy 83.915971 117.824589) (xy 83.809852 117.567125) + (xy 83.655746 117.335176) (xy 83.459522 117.137577) (xy 83.228654 116.981855) (xy 83.040657 116.902828) (xy 83.193344 116.843605) + (xy 83.42847 116.69439) (xy 83.584819 116.5455) (xy 86.597912 116.5455) (xy 86.6545 116.604098) (xy 86.6545 117.077714) + (xy 86.536953 117.192825) (xy 86.379623 117.4226) (xy 86.26992 117.678557) (xy 86.212021 117.950948) (xy 86.208133 118.229397) + (xy 86.258404 118.503299) (xy 86.360918 118.76222) (xy 86.511771 118.996298) (xy 86.705217 119.196617) (xy 86.933887 119.355547) + (xy 87.189073 119.467035) (xy 87.461053 119.526834) (xy 87.739468 119.532666) (xy 88.013714 119.484309) (xy 88.273344 119.383605) + (xy 88.50847 119.23439) (xy 88.710134 119.042347) (xy 88.870657 118.814791) (xy 88.983924 118.56039) (xy 89.04562 118.288834) + (xy 89.050061 117.970762) (xy 88.995971 117.697589) (xy 88.889852 117.440125) (xy 88.735746 117.208176) (xy 88.6055 117.077017) + (xy 88.6055 116.601989) (xy 88.710134 116.502347) (xy 88.870657 116.274791) (xy 88.983924 116.02039) (xy 89.04562 115.748834) + (xy 89.050061 115.430762) (xy 88.995971 115.157589) (xy 88.889852 114.900125) (xy 88.735746 114.668176) (xy 88.708262 114.6405) + (xy 96.702625 114.6405) (xy 96.663121 114.680005) (xy 96.786818 114.803702) (xy 96.545164 114.872615) (xy 96.43303 115.12887) + (xy 96.373043 115.402078) (xy 96.36751 115.681739) (xy 96.416642 115.957106) (xy 96.518551 116.217597) (xy 96.545164 116.267385) + (xy 96.786821 116.336298) (xy 97.553119 115.57) (xy 97.538977 115.555858) (xy 97.775858 115.318977) (xy 97.79 115.333119) + (xy 97.804142 115.318977) (xy 98.041023 115.555858) (xy 98.026881 115.57) (xy 98.793179 116.336298) (xy 99.034836 116.267385) + (xy 99.09386 116.132498) (xy 99.118852 116.195351) (xy 99.137162 116.229606) (xy 99.372364 116.290755) (xy 100.093119 115.57) + (xy 100.078977 115.555858) (xy 100.315858 115.318977) (xy 100.33 115.333119) (xy 100.344142 115.318977) (xy 100.581023 115.555858) + (xy 100.566881 115.57) (xy 101.287636 116.290755) (xy 101.522838 116.229606) (xy 101.628601 115.984221) (xy 101.684459 115.722917) + (xy 101.688266 115.455737) (xy 101.639876 115.192948) (xy 101.541148 114.944649) (xy 101.522838 114.910394) (xy 101.287637 114.849245) + (xy 101.41176 114.725123) (xy 101.327137 114.6405) (xy 105.76452 114.6405) (xy 105.68273 114.664262) (xy 105.678176 114.666622) (xy 105.673266 114.668105) (xy 105.593692 114.710414) (xy 105.513705 114.751877) (xy 105.509697 114.755075) (xy 105.505167 114.757485) (xy 105.435327 114.814444) (xy 105.364915 114.870654) (xy 105.357777 114.877692) (xy 105.357629 114.877814) (xy 105.357515 114.877951) - (xy 105.355217 114.880218) (xy 101.68856 118.546873) (xy 101.565749 118.669684) (xy 101.623378 118.54025) (xy 101.682315 118.280837) - (xy 101.686558 117.976988) (xy 101.634887 117.716031) (xy 101.533513 117.470081) (xy 101.386298 117.248504) (xy 101.198849 117.059742) - (xy 100.978306 116.910984) (xy 100.808382 116.839554) (xy 100.950061 116.783864) (xy 100.989605 116.762838) (xy 101.050755 116.527635) - (xy 100.33 115.806881) (xy 100.093119 116.043761) (xy 99.609245 116.527635) (xy 99.670395 116.762838) (xy 99.850594 116.840598) - (xy 99.698498 116.902049) (xy 99.4759 117.047713) (xy 99.387275 117.1345) (xy 98.822581 117.1345) (xy 98.699521 117.010578) - (xy 98.468654 116.854856) (xy 98.437078 116.841582) (xy 98.487384 116.814835) (xy 98.556297 116.573178) (xy 97.79 115.806881) - (xy 97.553119 116.043762) (xy 97.023703 116.573178) (xy 97.092616 116.814835) (xy 97.146458 116.838423) (xy 97.128937 116.845503) - (xy 96.895918 116.997986) (xy 96.756514 117.1345) (xy 95.885 117.1345) (xy 95.795311 117.143293) (xy 95.705555 117.151147) - (xy 95.700632 117.152577) (xy 95.695524 117.153078) (xy 95.609232 117.17913) (xy 95.52273 117.204262) (xy 95.518176 117.206622) - (xy 95.513266 117.208105) (xy 95.433692 117.250414) (xy 95.353705 117.291877) (xy 95.349697 117.295075) (xy 95.345167 117.297485) - (xy 95.275327 117.354444) (xy 95.204915 117.410654) (xy 95.197773 117.417696) (xy 95.197629 117.417814) (xy 95.197518 117.417947) - (xy 95.195217 117.420217) (xy 93.925217 118.690217) (xy 93.867995 118.75988) (xy 93.810102 118.828875) (xy 93.807632 118.833367) - (xy 93.804374 118.837334) (xy 93.761775 118.916779) (xy 93.718383 118.99571) (xy 93.716832 119.000599) (xy 93.714408 119.00512) - (xy 93.688068 119.091273) (xy 93.660817 119.177182) (xy 93.660244 119.182282) (xy 93.658746 119.187185) (xy 93.649643 119.276799) - (xy 93.639595 119.36638) (xy 93.639525 119.376407) (xy 93.639506 119.376595) (xy 93.639522 119.376769) (xy 93.6395 119.38) - (xy 93.6395 124.46) (xy 93.648293 124.549688) (xy 93.656147 124.639445) (xy 93.657577 124.644367) (xy 93.658078 124.649476) - (xy 93.68413 124.735767) (xy 93.709262 124.82227) (xy 93.711622 124.826823) (xy 93.713105 124.831734) (xy 93.755414 124.911307) - (xy 93.796877 124.991295) (xy 93.800075 124.995302) (xy 93.802485 124.999833) (xy 93.859444 125.069672) (xy 93.915654 125.140085) - (xy 93.922696 125.147226) (xy 93.922814 125.147371) (xy 93.922947 125.147481) (xy 93.925217 125.149783) (xy 96.465217 127.689782) - (xy 96.534845 127.746975) (xy 96.603875 127.804898) (xy 96.608367 127.807368) (xy 96.612333 127.810625) (xy 96.691745 127.853205) - (xy 96.77071 127.896617) (xy 96.775601 127.898168) (xy 96.780119 127.900591) (xy 96.866254 127.926925) (xy 96.952182 127.954183) - (xy 96.95728 127.954754) (xy 96.962184 127.956254) (xy 97.051804 127.965357) (xy 97.14138 127.975405) (xy 97.151407 127.975474) - (xy 97.151595 127.975494) (xy 97.151769 127.975477) (xy 97.155 127.9755) (xy 100.965 127.9755) (xy 101.054688 127.966706) - (xy 101.144445 127.958853) (xy 101.149367 127.957422) (xy 101.154476 127.956922) (xy 101.240767 127.930869) (xy 101.32727 127.905738) - (xy 101.331823 127.903377) (xy 101.336734 127.901895) (xy 101.416307 127.859585) (xy 101.496295 127.818123) (xy 101.500302 127.814924) - (xy 101.504833 127.812515) (xy 101.574672 127.755555) (xy 101.645085 127.699346) (xy 101.652226 127.692303) (xy 101.652371 127.692186) - (xy 101.652481 127.692052) (xy 101.654783 127.689783) (xy 106.449065 122.8955) (xy 106.653941 122.8955) (xy 106.66771 122.928906) - (xy 106.73912 123.036387) (xy 106.830046 123.12795) (xy 106.922315 123.190186) (xy 106.833613 123.24912) (xy 106.74205 123.340046) - (xy 106.669892 123.447025) (xy 106.619887 123.565983) (xy 106.593939 123.692387) (xy 106.593039 123.821425) (xy 106.593473 125.22302) - (xy 106.618537 125.349603) (xy 106.66771 125.468906) (xy 106.73912 125.576387) (xy 106.830046 125.66795) (xy 106.937025 125.740108) - (xy 107.055983 125.790113) (xy 107.182387 125.816061) (xy 107.311425 125.816961) (xy 108.71302 125.816527) (xy 108.839603 125.791463) - (xy 108.958906 125.74229) (xy 109.066387 125.67088) (xy 109.15795 125.579954) (xy 109.230108 125.472975) (xy 109.280113 125.354017) - (xy 109.306061 125.227613) (xy 109.306961 125.098575) (xy 109.306527 123.69698) (xy 109.281463 123.570397) (xy 109.23229 123.451094) - (xy 109.16088 123.343613) (xy 109.069954 123.25205) (xy 108.977684 123.189813) (xy 109.066387 123.13088) (xy 109.15795 123.039954) - (xy 109.230108 122.932975) (xy 109.24586 122.8955) (xy 116.205 122.8955) (xy 116.294688 122.886706) (xy 116.384445 122.878853) - (xy 116.389367 122.877422) (xy 116.394476 122.876922) (xy 116.480767 122.850869) (xy 116.56727 122.825738) (xy 116.571823 122.823377) - (xy 116.576734 122.821895) (xy 116.656307 122.779585) (xy 116.736295 122.738123) (xy 116.740302 122.734924) (xy 116.744833 122.732515) - (xy 116.814672 122.675555) (xy 116.885085 122.619346) (xy 116.892226 122.612303) (xy 116.892371 122.612186) (xy 116.892481 122.612052) - (xy 116.894783 122.609783) (xy 118.336409 121.168155) (xy 118.380841 121.164112) (xy 118.651456 121.084466) (xy 118.901448 120.953773) - (xy 119.121293 120.777013) (xy 119.302619 120.560917) (xy 119.380076 120.420022) (xy 119.446096 120.544186) (xy 119.624386 120.762792) - (xy 119.841743 120.942605) (xy 120.089885 121.076775) (xy 120.359362 121.160192) (xy 120.639909 121.189679) (xy 120.920841 121.164112) - (xy 121.191456 121.084466) (xy 121.441448 120.953773) (xy 121.661293 120.777013) (xy 121.842619 120.560917) (xy 121.913486 120.43201) - (xy 121.917491 120.44126) (xy 122.078789 120.674986) (xy 122.282413 120.872931) (xy 122.520607 121.027555) (xy 122.799975 121.127383) - (xy 123.0225 121.005501) (xy 123.0225 119.6975) (xy 123.0225 119.5475) (xy 123.0225 119.2125) (xy 123.0225 119.0625) - (xy 123.0225 117.754499) (xy 122.799975 117.632617) (xy 122.520607 117.732445) (xy 122.282413 117.887069) (xy 122.078789 118.085014) - (xy 121.917491 118.31874) (xy 121.913514 118.327924) (xy 121.853904 118.215814) (xy 121.675614 117.997208) (xy 121.458257 117.817395) - (xy 121.210115 117.683225) (xy 120.940638 117.599808) (xy 120.660091 117.570321) (xy 120.379159 117.595888) (xy 120.108544 117.675534) - (xy 119.858552 117.806227) (xy 119.638707 117.982987) (xy 119.457381 118.199083) (xy 119.379923 118.339977) (xy 119.313904 118.215814) - (xy 119.135614 117.997208) (xy 118.918257 117.817395) (xy 118.670115 117.683225) (xy 118.400638 117.599808) (xy 118.120091 117.570321) - (xy 117.839159 117.595888) (xy 117.568544 117.675534) (xy 117.318552 117.806227) (xy 117.098707 117.982987) (xy 117.000926 118.099517) - (xy 116.989013 118.041483) (xy 116.939008 117.922525) (xy 116.86685 117.815546) (xy 116.775287 117.72462) (xy 116.667806 117.65321) - (xy 116.548503 117.604037) (xy 116.42192 117.578973) (xy 115.902 117.579) (xy 115.7375 117.7435) (xy 115.7375 119.0625) - (xy 115.7375 119.2125) (xy 115.7375 119.5475) (xy 115.4025 119.5475) (xy 115.4025 119.2125) (xy 115.4025 117.7435) - (xy 115.238 117.579) (xy 114.71808 117.578973) (xy 114.591497 117.604037) (xy 114.472194 117.65321) (xy 114.364713 117.72462) - (xy 114.27315 117.815546) (xy 114.200992 117.922525) (xy 114.150987 118.041483) (xy 114.125039 118.167887) (xy 114.124139 118.296925) - (xy 114.1246 119.048) (xy 114.2891 119.2125) (xy 115.4025 119.2125) (xy 115.4025 119.5475) (xy 115.2525 119.5475) - (xy 114.2891 119.5475) (xy 114.1246 119.712) (xy 114.124139 120.463075) (xy 114.125039 120.592113) (xy 114.150987 120.718517) - (xy 114.200992 120.837475) (xy 114.27315 120.944454) (xy 114.273196 120.9445) (xy 109.246058 120.9445) (xy 109.23229 120.911094) - (xy 109.16088 120.803613) (xy 109.069954 120.71205) (xy 108.962975 120.639892) (xy 108.844017 120.589887) (xy 108.717613 120.563939) - (xy 108.588575 120.563039) (xy 107.18698 120.563473) (xy 107.060397 120.588537) (xy 106.941094 120.63771) (xy 106.833613 120.70912) - (xy 106.74205 120.800046) (xy 106.669892 120.907025) (xy 106.654139 120.9445) (xy 106.045 120.9445) (xy 105.95522 120.953302) - (xy 105.865555 120.961148) (xy 105.860637 120.962576) (xy 105.855524 120.963078) (xy 105.769158 120.989153) (xy 105.682729 121.014263) - (xy 105.678178 121.016621) (xy 105.673266 121.018105) (xy 105.593696 121.060413) (xy 105.513704 121.101877) (xy 105.509694 121.105077) - (xy 105.505167 121.107485) (xy 105.435349 121.164426) (xy 105.364915 121.220654) (xy 105.357777 121.227692) (xy 105.357629 121.227814) - (xy 105.357515 121.227951) (xy 105.355217 121.230218) (xy 101.68856 124.896873) (xy 101.565749 125.019684) (xy 101.623378 124.89025) - (xy 101.682315 124.630837) (xy 101.686558 124.326988) (xy 101.634887 124.066031) (xy 101.533513 123.820081) (xy 101.386298 123.598504) - (xy 101.198849 123.409742) (xy 100.978306 123.260984) (xy 100.808382 123.189554) (xy 100.950061 123.133864) (xy 100.989605 123.112838) - (xy 101.050755 122.877635) (xy 100.33 122.156881) (xy 100.093119 122.393761) (xy 99.609245 122.877635) (xy 99.670395 123.112838) - (xy 99.850594 123.190598) (xy 99.698498 123.252049) (xy 99.4759 123.397713) (xy 99.387275 123.4845) (xy 98.822581 123.4845) - (xy 98.699521 123.360578) (xy 98.468654 123.204856) (xy 98.437078 123.191582) (xy 98.487384 123.164835) (xy 98.556297 122.923178) - (xy 97.896066 122.262947) (xy 97.79 122.156881) (xy 97.553119 121.92) (xy 97.79 121.683119) (xy 98.026881 121.919999) - (xy 98.026881 121.92) (xy 98.132947 122.026066) (xy 98.793178 122.686297) (xy 99.034835 122.617384) (xy 99.093707 122.483002) - (xy 99.116136 122.540061) (xy 99.137162 122.579605) (xy 99.372365 122.640755) (xy 99.987053 122.026066) (xy 100.093119 121.92) - (xy 100.33 121.683119) (xy 100.566881 121.92) (xy 100.672947 122.026066) (xy 101.287635 122.640755) (xy 101.522838 122.579605) - (xy 101.628238 122.335353) (xy 101.684189 122.07528) (xy 101.68856 121.809293) (xy 101.641183 121.547522) (xy 101.543864 121.299939) - (xy 101.522838 121.260395) (xy 101.455996 121.243016) (xy 101.517824 121.181189) (xy 101.327135 120.9905) (xy 101.6 120.9905) - (xy 101.689688 120.981706) (xy 101.779445 120.973853) (xy 101.784367 120.972422) (xy 101.789476 120.971922) (xy 101.875767 120.945869) - (xy 101.96227 120.920738) (xy 101.966823 120.918377) (xy 101.971734 120.916895) (xy 102.051307 120.874585) (xy 102.131295 120.833123) - (xy 102.135302 120.829924) (xy 102.139833 120.827515) (xy 102.209672 120.770555) (xy 102.280085 120.714346) (xy 102.287226 120.707303) - (xy 102.287371 120.707186) (xy 102.287481 120.707052) (xy 102.289783 120.704783) (xy 106.449065 116.5455) (xy 106.653941 116.5455) - (xy 106.66771 116.578906) (xy 106.73912 116.686387) (xy 106.830046 116.77795) (xy 106.922315 116.840186) (xy 106.833613 116.89912) - (xy 106.74205 116.990046) (xy 106.669892 117.097025) (xy 106.619887 117.215983) (xy 106.593939 117.342387) (xy 106.593039 117.471425) - (xy 106.593473 118.87302) (xy 106.618537 118.999603) (xy 106.66771 119.118906) (xy 106.73912 119.226387) (xy 106.830046 119.31795) - (xy 106.937025 119.390108) (xy 107.055983 119.440113) (xy 107.182387 119.466061) (xy 107.311425 119.466961) (xy 108.71302 119.466527) - (xy 108.839603 119.441463) (xy 108.958906 119.39229) (xy 109.066387 119.32088) (xy 109.15795 119.229954) (xy 109.230108 119.122975) - (xy 109.280113 119.004017) (xy 109.306061 118.877613) (xy 109.306961 118.748575) (xy 109.306527 117.34698) (xy 109.281463 117.220397) - (xy 109.23229 117.101094) (xy 109.16088 116.993613) (xy 109.069954 116.90205) (xy 108.977684 116.839813) (xy 109.066387 116.78088) - (xy 109.15795 116.689954) (xy 109.230108 116.582975) (xy 109.24586 116.5455) (xy 125.73 116.5455) (xy 125.819688 116.536706) - (xy 125.909445 116.528853) (xy 125.914367 116.527422) (xy 125.919476 116.526922) (xy 126.005767 116.500869) (xy 126.09227 116.475738) - (xy 126.096823 116.473377) (xy 126.101734 116.471895) (xy 126.181307 116.429585) (xy 126.261295 116.388123) (xy 126.265302 116.384924) - (xy 126.269833 116.382515) (xy 126.339672 116.325555) (xy 126.410085 116.269346) (xy 126.417226 116.262303) (xy 126.417371 116.262186) - (xy 126.417481 116.262052) (xy 126.419783 116.259783) (xy 128.959782 113.719783) (xy 129.016975 113.650154) (xy 129.074898 113.581125) - (xy 129.077368 113.576632) (xy 129.080625 113.572667) (xy 129.123205 113.493254) (xy 129.166617 113.41429) (xy 129.168168 113.409398) - (xy 129.170591 113.404881) (xy 129.196925 113.318745) (xy 129.224183 113.232818) (xy 129.224754 113.227719) (xy 129.226254 113.222816) - (xy 129.228637 113.199348) (xy 129.281293 113.157013) (xy 129.462619 112.940917) (xy 129.540076 112.800022) (xy 129.606096 112.924186) - (xy 129.784386 113.142792) (xy 130.001743 113.322605) (xy 130.249885 113.456775) (xy 130.519362 113.540192) (xy 130.799909 113.569679) - (xy 131.080841 113.544112) (xy 131.351456 113.464466) (xy 131.601448 113.333773) (xy 131.821293 113.157013) (xy 132.002619 112.940917) - (xy 132.138518 112.693718) (xy 132.223815 112.42483) (xy 132.255259 112.144495) (xy 132.2554 112.124314) (xy 132.2554 111.395686) - (xy 132.227873 111.11494) (xy 132.146339 110.844887) (xy 132.013904 110.595814) (xy 131.835614 110.377208) (xy 131.7855 110.33575) - (xy 131.7855 110.030465) (xy 133.093665 108.7223) (xy 138.000534 108.7223) (xy 139.3595 110.081265) (xy 139.3595 110.727716) - (xy 139.241954 110.842826) (xy 139.084624 111.0726) (xy 138.974921 111.328557) (xy 138.917022 111.600948) (xy 138.913134 111.879397) - (xy 138.963405 112.153299) (xy 139.065918 112.412219) (xy 139.216771 112.646297) (xy 139.410217 112.846616) (xy 139.638888 113.005546) - (xy 139.894073 113.117034) (xy 140.166053 113.176833) (xy 140.444468 113.182665) (xy 140.718714 113.134308) (xy 140.978344 113.033604) - (xy 141.213469 112.884389) (xy 141.415134 112.692346) (xy 141.575656 112.464791) (xy 141.688923 112.21039) (xy 141.750619 111.938834) - (xy 141.75506 111.620762) (xy 141.70097 111.347589) (xy 141.594851 111.090125) (xy 141.440745 110.858176) (xy 141.3105 110.727018) - (xy 141.3105 109.6772) (xy 141.301697 109.58742) (xy 141.293852 109.497755) (xy 141.292423 109.492837) (xy 141.291922 109.487724) - (xy 141.265846 109.401358) (xy 141.240737 109.314929) (xy 141.238378 109.310378) (xy 141.236895 109.305466) (xy 141.194586 109.225896) - (xy 141.153123 109.145904) (xy 141.149922 109.141894) (xy 141.147515 109.137367) (xy 141.090573 109.067549) (xy 141.034346 108.997115) - (xy 141.027307 108.989977) (xy 141.027186 108.989829) (xy 141.027048 108.989715) (xy 141.024782 108.987417) (xy 139.094383 107.057017) - (xy 139.024719 106.999795) (xy 138.955725 106.941902) (xy 138.951232 106.939432) (xy 138.947266 106.936174) (xy 138.86782 106.893575) - (xy 138.78889 106.850183) (xy 138.784 106.848632) (xy 138.77948 106.846208) (xy 138.693326 106.819868) (xy 138.607418 106.792617) - (xy 138.602317 106.792044) (xy 138.597415 106.790546) (xy 138.5078 106.781443) (xy 138.41822 106.771395) (xy 138.408192 106.771325) - (xy 138.408005 106.771306) (xy 138.40783 106.771322) (xy 138.4046 106.7713) (xy 132.6896 106.7713) (xy 132.59982 106.780102) - (xy 132.510155 106.787948) (xy 132.505237 106.789376) (xy 132.500124 106.789878) (xy 132.413744 106.815957) (xy 132.32733 106.841063) - (xy 132.32278 106.843421) (xy 132.317866 106.844905) (xy 132.238277 106.887222) (xy 132.158304 106.928677) (xy 132.154294 106.931877) - (xy 132.149767 106.934285) (xy 132.079949 106.991226) (xy 132.009515 107.047454) (xy 132.002377 107.054492) (xy 132.002229 107.054614) - (xy 132.002115 107.054751) (xy 131.999817 107.057018) (xy 130.120217 108.936617) (xy 130.062995 109.00628) (xy 130.005102 109.075275) - (xy 130.002632 109.079767) (xy 129.999374 109.083734) (xy 129.956775 109.163179) (xy 129.913383 109.24211) (xy 129.911832 109.246999) - (xy 129.909408 109.25152) (xy 129.883068 109.337673) (xy 129.855817 109.423582) (xy 129.855244 109.428682) (xy 129.853746 109.433585) - (xy 129.844643 109.523199) (xy 129.834595 109.61278) (xy 129.834525 109.622807) (xy 129.834506 109.622995) (xy 129.834522 109.623169) - (xy 129.8345 109.6264) (xy 129.8345 110.334208) (xy 129.798707 110.362987) (xy 129.617381 110.579083) (xy 129.539923 110.719977) - (xy 129.473904 110.595814) (xy 129.295614 110.377208) (xy 129.078257 110.197395) (xy 128.830115 110.063225) (xy 128.560638 109.979808) - (xy 128.280091 109.950321) (xy 127.999159 109.975888) (xy 127.728544 110.055534) (xy 127.478552 110.186227) (xy 127.258707 110.362987) - (xy 127.077381 110.579083) (xy 127.006513 110.707989) (xy 127.002509 110.69874) (xy 126.841211 110.465014) (xy 126.637587 110.267069) - (xy 126.399393 110.112445) (xy 126.120025 110.012617) (xy 125.8975 110.134499) (xy 125.8975 111.4425) (xy 125.8975 111.5925) - (xy 125.8975 111.9275) (xy 125.8975 112.0775) (xy 125.8975 113.385501) (xy 126.120025 113.507383) (xy 126.399393 113.407555) - (xy 126.637587 113.252931) (xy 126.841211 113.054986) (xy 127.002509 112.82126) (xy 127.006485 112.812075) (xy 127.041849 112.878585) - (xy 125.325934 114.5945) (xy 123.005066 114.5945) (xy 123.879783 113.719783) (xy 123.937004 113.650119) (xy 123.994898 113.581125) - (xy 123.997367 113.576632) (xy 124.000626 113.572666) (xy 124.043234 113.493201) (xy 124.086617 113.41429) (xy 124.088167 113.409403) - (xy 124.090592 113.404881) (xy 124.116935 113.318712) (xy 124.144183 113.232818) (xy 124.144755 113.227717) (xy 124.146254 113.222815) - (xy 124.148637 113.199349) (xy 124.201293 113.157013) (xy 124.382619 112.940917) (xy 124.453486 112.81201) (xy 124.457491 112.82126) - (xy 124.618789 113.054986) (xy 124.822413 113.252931) (xy 125.060607 113.407555) (xy 125.339975 113.507383) (xy 125.5625 113.385501) - (xy 125.5625 112.0775) (xy 125.5625 111.9275) (xy 125.5625 111.5925) (xy 125.5625 111.4425) (xy 125.5625 110.134499) - (xy 125.339975 110.012617) (xy 125.060607 110.112445) (xy 124.822413 110.267069) (xy 124.618789 110.465014) (xy 124.457491 110.69874) - (xy 124.453514 110.707924) (xy 124.393904 110.595814) (xy 124.215614 110.377208) (xy 123.998257 110.197395) (xy 123.750115 110.063225) - (xy 123.480638 109.979808) (xy 123.200091 109.950321) (xy 122.919159 109.975888) (xy 122.648544 110.055534) (xy 122.398552 110.186227) - (xy 122.178707 110.362987) (xy 121.997381 110.579083) (xy 121.919923 110.719977) (xy 121.853904 110.595814) (xy 121.675614 110.377208) - (xy 121.458257 110.197395) (xy 121.210115 110.063225) (xy 120.940638 109.979808) (xy 120.660091 109.950321) (xy 120.379159 109.975888) - (xy 120.108544 110.055534) (xy 119.858552 110.186227) (xy 119.638707 110.362987) (xy 119.457381 110.579083) (xy 119.386513 110.707989) - (xy 119.382509 110.69874) (xy 119.221211 110.465014) (xy 119.017587 110.267069) (xy 118.779393 110.112445) (xy 118.500025 110.012617) - (xy 118.2775 110.134499) (xy 118.2775 111.4425) (xy 118.2775 111.5925) (xy 118.2775 111.9275) (xy 117.9425 111.9275) - (xy 117.9425 111.5925) (xy 117.9425 111.4425) (xy 117.9425 110.134499) (xy 117.719975 110.012617) (xy 117.440607 110.112445) - (xy 117.202413 110.267069) (xy 116.998789 110.465014) (xy 116.837491 110.69874) (xy 116.833514 110.707924) (xy 116.773904 110.595814) - (xy 116.736 110.549338) (xy 116.736 105.941) (xy 135.89 105.941) (xy 135.997188 105.93049) (xy 136.104487 105.921103) - (xy 136.110375 105.919392) (xy 136.116477 105.918794) (xy 136.219616 105.887654) (xy 136.323015 105.857614) (xy 136.328455 105.854794) - (xy 136.334328 105.853021) (xy 136.429453 105.802441) (xy 136.525049 105.75289) (xy 136.52984 105.749064) (xy 136.535255 105.746186) - (xy 136.618707 105.678123) (xy 136.702894 105.610918) (xy 136.711436 105.602494) (xy 136.711603 105.602359) (xy 136.71173 105.602205) - (xy 136.714487 105.599487) (xy 137.984486 104.329487) (xy 138.052867 104.246238) (xy 138.122082 104.163752) (xy 138.125035 104.15838) - (xy 138.128928 104.153641) (xy 138.179835 104.058699) (xy 138.231712 103.964336) (xy 138.233565 103.958492) (xy 138.236463 103.953089) - (xy 138.26795 103.850097) (xy 138.30052 103.747425) (xy 138.301203 103.74133) (xy 138.302996 103.735468) (xy 138.313876 103.628345) - (xy 138.325886 103.52128) (xy 138.325969 103.509286) (xy 138.325992 103.50907) (xy 138.325972 103.508868) (xy 138.326 103.505) - (xy 138.326 99.542973) (xy 139.179673 98.6893) (xy 139.66193 98.6893) (xy 139.615432 98.908061) (xy 139.611717 99.174058) - (xy 139.65974 99.435711) (xy 139.757669 99.683053) (xy 139.804 99.754944) (xy 139.804 104.14) (xy 139.814509 104.247188) - (xy 139.823897 104.354487) (xy 139.825607 104.360375) (xy 139.826206 104.366477) (xy 139.857345 104.469616) (xy 139.887386 104.573015) - (xy 139.890205 104.578455) (xy 139.891979 104.584328) (xy 139.942558 104.679453) (xy 139.99211 104.775049) (xy 139.995935 104.77984) - (xy 139.998814 104.785255) (xy 140.066876 104.868707) (xy 140.134082 104.952894) (xy 140.142505 104.961436) (xy 140.142641 104.961603) - (xy 140.142794 104.96173) (xy 140.145513 104.964487) (xy 141.415513 106.234486) (xy 141.498761 106.302867) (xy 141.581248 106.372082) - (xy 141.586619 106.375035) (xy 141.591359 106.378928) (xy 141.6863 106.429835) (xy 141.780664 106.481712) (xy 141.786507 106.483565) - (xy 141.791911 106.486463) (xy 141.894902 106.51795) (xy 141.997575 106.55052) (xy 142.003669 106.551203) (xy 142.009532 106.552996) - (xy 142.116654 106.563876) (xy 142.22372 106.575886) (xy 142.235713 106.575969) (xy 142.23593 106.575992) (xy 142.236131 106.575972) - (xy 142.24 106.576) (xy 144.78 106.576) (xy 144.887188 106.56549) (xy 144.994487 106.556103) (xy 145.000375 106.554392) - (xy 145.006477 106.553794) (xy 145.109616 106.522654) (xy 145.213015 106.492614) (xy 145.218455 106.489794) (xy 145.224328 106.488021) - (xy 145.319453 106.437441) (xy 145.415049 106.38789) (xy 145.41984 106.384064) (xy 145.425255 106.381186) (xy 145.508707 106.313123) - (xy 145.592894 106.245918) (xy 145.601436 106.237494) (xy 145.601603 106.237359) (xy 145.60173 106.237205) (xy 145.604487 106.234487) - (xy 147.954999 103.883973) (xy 165.545513 121.474486) (xy 165.628756 121.542863) (xy 165.711248 121.612082) (xy 165.71662 121.615035) - (xy 165.721358 121.618927) (xy 165.816282 121.669825) (xy 165.910664 121.721712) (xy 165.916507 121.723565) (xy 165.921911 121.726463) - (xy 166.024914 121.757954) (xy 166.127575 121.79052) (xy 166.133667 121.791203) (xy 166.139531 121.792996) (xy 166.246664 121.803877) - (xy 166.35372 121.815886) (xy 166.365712 121.815969) (xy 166.365929 121.815992) (xy 166.36613 121.815972) (xy 166.37 121.816) - (xy 177.134517 121.816) (xy 177.16062 121.855287) (xy 177.251546 121.94685) (xy 177.358525 122.019008) (xy 177.477483 122.069013) - (xy 177.534553 122.080728) (xy 177.431979 122.164386) (xy 177.252166 122.381743) (xy 177.117996 122.629885) (xy 177.034579 122.899362) - (xy 177.005092 123.179909) (xy 177.030659 123.460841) (xy 177.067524 123.5861) (xy 175.050272 123.5861) (xy 175.006158 123.562048) - (xy 174.824486 123.505115) (xy 174.635214 123.484554) (xy 174.445555 123.501147) (xy 174.26273 123.554262) (xy 174.093704 123.641877) - (xy 173.944915 123.760654) (xy 173.935217 123.770218) (xy 173.585934 124.1195) (xy 150.264065 124.1195) (xy 139.754783 113.610217) - (xy 139.685119 113.552995) (xy 139.616125 113.495102) (xy 139.611632 113.492632) (xy 139.607666 113.489374) (xy 139.52822 113.446775) - (xy 139.44929 113.403383) (xy 139.4444 113.401832) (xy 139.43988 113.399408) (xy 139.353726 113.373068) (xy 139.267818 113.345817) - (xy 139.262717 113.345244) (xy 139.257815 113.343746) (xy 139.1682 113.334643) (xy 139.07862 113.324595) (xy 139.068592 113.324525) - (xy 139.068405 113.324506) (xy 139.06823 113.324522) (xy 139.065 113.3245) (xy 138.199065 113.3245) (xy 136.672585 111.798019) - (xy 136.67506 111.620762) (xy 136.62097 111.347589) (xy 136.514851 111.090125) (xy 136.360745 110.858176) (xy 136.164521 110.660578) - (xy 135.933654 110.504856) (xy 135.676937 110.396942) (xy 135.404149 110.340947) (xy 135.125679 110.339002) (xy 134.852135 110.391184) - (xy 134.593937 110.495503) (xy 134.360918 110.647986) (xy 134.161954 110.842826) (xy 134.004624 111.0726) (xy 133.894921 111.328557) - (xy 133.837022 111.600948) (xy 133.833134 111.879397) (xy 133.883405 112.153299) (xy 133.985918 112.412219) (xy 134.136771 112.646297) - (xy 134.330217 112.846616) (xy 134.558888 113.005546) (xy 134.814073 113.117034) (xy 135.086053 113.176833) (xy 135.296679 113.181245) - (xy 137.105217 114.989782) (xy 137.174845 115.046975) (xy 137.243875 115.104898) (xy 137.248367 115.107368) (xy 137.252333 115.110625) - (xy 137.331745 115.153205) (xy 137.41071 115.196617) (xy 137.415601 115.198168) (xy 137.420119 115.200591) (xy 137.506254 115.226925) - (xy 137.592182 115.254183) (xy 137.59728 115.254754) (xy 137.602184 115.256254) (xy 137.691804 115.265357) (xy 137.78138 115.275405) - (xy 137.791407 115.275474) (xy 137.791595 115.275494) (xy 137.791769 115.275477) (xy 137.795 115.2755) (xy 138.660934 115.2755) - (xy 149.170217 125.784782) (xy 149.239872 125.841998) (xy 149.308875 125.899898) (xy 149.313364 125.902366) (xy 149.317333 125.905626) - (xy 149.396784 125.948227) (xy 149.47571 125.991617) (xy 149.480601 125.993168) (xy 149.485119 125.995591) (xy 149.571254 126.021925) - (xy 149.57937 126.0245) (xy 145.184065 126.0245) (xy 141.63995 122.480384) (xy 141.688923 122.37039) (xy 141.750619 122.098834) - (xy 141.75506 121.780762) (xy 141.70097 121.507589) (xy 141.594851 121.250125) (xy 141.440745 121.018176) (xy 141.244521 120.820578) - (xy 141.013654 120.664856) (xy 140.756937 120.556942) (xy 140.484149 120.500947) (xy 140.205679 120.499002) (xy 139.932135 120.551184) - (xy 139.673937 120.655503) (xy 139.440918 120.807986) (xy 139.241954 121.002826) (xy 139.084624 121.2326) (xy 138.974921 121.488557) - (xy 138.917022 121.760948) (xy 138.913134 122.039397) (xy 138.963405 122.313299) (xy 139.065918 122.572219) (xy 139.216771 122.806297) - (xy 139.410217 123.006616) (xy 139.512381 123.077621) (xy 139.516877 123.086295) (xy 139.520075 123.090302) (xy 139.522485 123.094833) - (xy 139.579444 123.164672) (xy 139.635654 123.235085) (xy 139.642696 123.242226) (xy 139.642814 123.242371) (xy 139.642947 123.242481) - (xy 139.645217 123.244783) (xy 144.090217 127.689782) (xy 144.15985 127.746979) (xy 144.228875 127.804898) (xy 144.233367 127.807367) - (xy 144.237334 127.810626) (xy 144.316798 127.853234) (xy 144.39571 127.896617) (xy 144.400596 127.898167) (xy 144.405119 127.900592) - (xy 144.491287 127.926935) (xy 144.577182 127.954183) (xy 144.582282 127.954755) (xy 144.587185 127.956254) (xy 144.676799 127.965356) - (xy 144.76638 127.975405) (xy 144.776407 127.975474) (xy 144.776595 127.975494) (xy 144.776769 127.975477) (xy 144.78 127.9755) - (xy 177.035774 127.9755) (xy 177.034579 127.979362) (xy 177.005092 128.259909) (xy 177.030659 128.540841) (xy 177.110305 128.811456) - (xy 177.240998 129.061448) (xy 177.417758 129.281293) (xy 177.633854 129.462619) (xy 177.881053 129.598518) (xy 178.0945 129.666227) - (xy 178.0945 130.81) (xy 178.103293 130.899688) (xy 178.111147 130.989445) (xy 178.112577 130.994367) (xy 178.113078 130.999476) - (xy 178.13913 131.085767) (xy 178.164262 131.17227) (xy 178.166622 131.176823) (xy 178.168105 131.181734) (xy 178.210414 131.261307) - (xy 178.251877 131.341295) (xy 178.255075 131.345302) (xy 178.257485 131.349833) (xy 178.314444 131.419672) (xy 178.370654 131.490085) - (xy 178.377696 131.497226) (xy 178.377814 131.497371) (xy 178.377947 131.497481) (xy 178.380217 131.499783) (xy 180.285217 133.404782) - (xy 180.354845 133.461975) (xy 180.423875 133.519898) (xy 180.428367 133.522368) (xy 180.432333 133.525625) (xy 180.511745 133.568205) - (xy 180.59071 133.611617) (xy 180.595601 133.613168) (xy 180.600119 133.615591) (xy 180.686254 133.641925) (xy 180.772182 133.669183) - (xy 180.77728 133.669754) (xy 180.782184 133.671254) (xy 180.871804 133.680357) (xy 180.96138 133.690405) (xy 180.971407 133.690474) - (xy 180.971595 133.690494) (xy 180.971769 133.690477) (xy 180.975 133.6905) (xy 195.175934 133.6905) (xy 195.525217 134.039782) - (xy 195.594845 134.096975) (xy 195.663875 134.154898) (xy 195.668367 134.157368) (xy 195.672333 134.160625) (xy 195.751745 134.203205) - (xy 195.83071 134.246617) (xy 195.835601 134.248168) (xy 195.840119 134.250591) (xy 195.926254 134.276925) (xy 196.012182 134.304183) - (xy 196.01728 134.304754) (xy 196.022184 134.306254) (xy 196.111804 134.315357) (xy 196.20138 134.325405) (xy 196.211407 134.325474) - (xy 196.211595 134.325494) (xy 196.211769 134.325477) (xy 196.215 134.3255) (xy 218.44 134.3255) (xy 218.529688 134.316706) - (xy 218.619445 134.308853) (xy 218.624367 134.307422) (xy 218.629476 134.306922) (xy 218.715767 134.280869) (xy 218.80227 134.255738) - (xy 218.806823 134.253377) (xy 218.811734 134.251895) (xy 218.891307 134.209585) (xy 218.971295 134.168123) (xy 218.975302 134.164924) - (xy 218.979833 134.162515) (xy 219.049672 134.105555) (xy 219.120085 134.049346) (xy 219.127226 134.042303) (xy 219.127371 134.042186) - (xy 219.127481 134.042052) (xy 219.129783 134.039783) (xy 221.669782 131.499783) (xy 221.726975 131.430154) (xy 221.784898 131.361125) - (xy 221.787368 131.356632) (xy 221.790625 131.352667) (xy 221.833205 131.273254) (xy 221.876617 131.19429) (xy 221.878168 131.189398) - (xy 221.880591 131.184881) (xy 221.906925 131.098745) (xy 221.934183 131.012818) (xy 221.934754 131.007719) (xy 221.936254 131.002816) - (xy 221.945357 130.913195) (xy 221.955405 130.82362) (xy 221.955474 130.813592) (xy 221.955494 130.813405) (xy 221.955477 130.81323) - (xy 221.9555 130.81) (xy 221.9555 105.052062) (xy 221.97727 105.045738) (xy 221.981823 105.043377) (xy 221.986734 105.041895) - (xy 222.066307 104.999585) (xy 222.146295 104.958123) (xy 222.150302 104.954924) (xy 222.154833 104.952515) (xy 222.224672 104.895555) - (xy 222.295085 104.839346) (xy 222.302226 104.832303) (xy 222.302371 104.832186) (xy 222.302481 104.832052) (xy 222.304783 104.829783) - (xy 222.939782 104.194783) (xy 222.996975 104.125154) (xy 223.054898 104.056125) (xy 223.057368 104.051632) (xy 223.060625 104.047667) - (xy 223.103205 103.968254) (xy 223.146617 103.88929) (xy 223.148168 103.884398) (xy 223.150591 103.879881) (xy 223.176925 103.793745) - (xy 223.204183 103.707818) (xy 223.204754 103.702719) (xy 223.206254 103.697816) (xy 223.215357 103.608195) (xy 223.225405 103.51862) - (xy 223.225474 103.508592) (xy 223.225494 103.508405) (xy 223.225477 103.50823) (xy 223.2255 103.505) (xy 223.2255 138.28) - (xy 160.004455 138.28) (xy 160.414142 138.020005) (xy 160.796169 137.656206) (xy 161.100258 137.225132) (xy 161.314826 136.743204) - (xy 161.431701 136.228778) (xy 161.440115 135.626232) (xy 161.337649 135.108743) (xy 161.136621 134.621011) (xy 160.844687 134.181615) - (xy 160.472967 133.807291) (xy 160.035619 133.512297) (xy 159.549303 133.307868) (xy 159.032542 133.201792) (xy 158.505019 133.19811) - (xy 157.986827 133.29696) (xy 157.497704 133.494578) (xy 157.05628 133.783438) (xy 156.67937 134.152535) (xy 156.38133 134.587813) - (xy 156.173511 135.07269) (xy 156.06383 135.588698) (xy 156.056465 136.116182) (xy 156.151695 136.635052) (xy 156.345894 137.125543) - (xy 156.631665 137.568972) (xy 156.998122 137.948449) (xy 157.431308 138.249521) (xy 157.501071 138.28) (xy 138.115543 138.28) - (xy 138.115543 136.8528) (xy 138.115543 132.0824) (xy 136.67506 132.0824) (xy 136.67506 121.780762) (xy 136.62097 121.507589) - (xy 136.514851 121.250125) (xy 136.360745 121.018176) (xy 136.164521 120.820578) (xy 135.933654 120.664856) (xy 135.676937 120.556942) - (xy 135.404149 120.500947) (xy 135.125679 120.499002) (xy 134.852135 120.551184) (xy 134.593937 120.655503) (xy 134.360918 120.807986) - (xy 134.221514 120.9445) (xy 131.607336 120.9445) (xy 131.717587 120.872931) (xy 131.921211 120.674986) (xy 132.082509 120.44126) - (xy 132.195338 120.180656) (xy 132.2554 119.9031) (xy 132.2554 119.5475) (xy 132.2554 119.2125) (xy 132.2554 118.8569) - (xy 132.195338 118.579344) (xy 132.082509 118.31874) (xy 131.921211 118.085014) (xy 131.717587 117.887069) (xy 131.479393 117.732445) - (xy 131.200025 117.632617) (xy 130.9775 117.754499) (xy 130.9775 119.2125) (xy 132.2554 119.2125) (xy 132.2554 119.5475) - (xy 131.1275 119.5475) (xy 130.9775 119.5475) (xy 130.6425 119.5475) (xy 130.6425 119.2125) (xy 130.6425 119.0625) - (xy 130.6425 117.754499) (xy 130.419975 117.632617) (xy 130.140607 117.732445) (xy 129.902413 117.887069) (xy 129.698789 118.085014) - (xy 129.537491 118.31874) (xy 129.533514 118.327924) (xy 129.473904 118.215814) (xy 129.295614 117.997208) (xy 129.078257 117.817395) + (xy 105.355217 114.880218) (xy 101.688266 118.547167) (xy 101.565751 118.669682) (xy 101.623379 118.54025) (xy 101.682316 118.280837) + (xy 101.686559 117.976988) (xy 101.634888 117.716031) (xy 101.533514 117.47008) (xy 101.386299 117.248504) (xy 101.19885 117.059741) + (xy 100.978306 116.910983) (xy 100.808421 116.839569) (xy 100.955351 116.781148) (xy 100.989606 116.762838) (xy 101.050755 116.527636) + (xy 100.33 115.806881) (xy 100.093119 116.043762) (xy 99.609245 116.527636) (xy 99.670394 116.762838) (xy 99.850703 116.840553) + (xy 99.698498 116.902048) (xy 99.475899 117.047712) (xy 99.387273 117.1345) (xy 98.822582 117.1345) (xy 98.699522 117.010577) + (xy 98.468654 116.854855) (xy 98.437164 116.841618) (xy 98.437597 116.841449) (xy 98.487385 116.814836) (xy 98.556298 116.573179) + (xy 97.79 115.806881) (xy 97.553119 116.043762) (xy 97.023702 116.573179) (xy 97.092615 116.814836) (xy 97.146488 116.83841) + (xy 97.128936 116.845502) (xy 96.895917 116.997985) (xy 96.756512 117.1345) (xy 95.885 117.1345) (xy 95.795311 117.143293) + (xy 95.705555 117.151147) (xy 95.700632 117.152577) (xy 95.695524 117.153078) (xy 95.609232 117.17913) (xy 95.52273 117.204262) + (xy 95.518176 117.206622) (xy 95.513266 117.208105) (xy 95.433692 117.250414) (xy 95.353705 117.291877) (xy 95.349697 117.295075) + (xy 95.345167 117.297485) (xy 95.275327 117.354444) (xy 95.204915 117.410654) (xy 95.197773 117.417696) (xy 95.197629 117.417814) + (xy 95.197518 117.417947) (xy 95.195217 117.420217) (xy 93.925217 118.690217) (xy 93.867995 118.75988) (xy 93.810102 118.828875) + (xy 93.807632 118.833367) (xy 93.804374 118.837334) (xy 93.761775 118.916779) (xy 93.718383 118.99571) (xy 93.716832 119.000599) + (xy 93.714408 119.00512) (xy 93.688068 119.091273) (xy 93.660817 119.177182) (xy 93.660244 119.182282) (xy 93.658746 119.187185) + (xy 93.649643 119.276799) (xy 93.639595 119.36638) (xy 93.639525 119.376407) (xy 93.639506 119.376595) (xy 93.639522 119.376769) + (xy 93.6395 119.38) (xy 93.6395 124.46) (xy 93.648293 124.549688) (xy 93.656147 124.639445) (xy 93.657577 124.644367) + (xy 93.658078 124.649476) (xy 93.68413 124.735767) (xy 93.709262 124.82227) (xy 93.711622 124.826823) (xy 93.713105 124.831734) + (xy 93.755414 124.911307) (xy 93.796877 124.991295) (xy 93.800075 124.995302) (xy 93.802485 124.999833) (xy 93.859444 125.069672) + (xy 93.915654 125.140085) (xy 93.922696 125.147226) (xy 93.922814 125.147371) (xy 93.922947 125.147481) (xy 93.925217 125.149783) + (xy 96.465217 127.689782) (xy 96.534845 127.746975) (xy 96.603875 127.804898) (xy 96.608367 127.807368) (xy 96.612333 127.810625) + (xy 96.691745 127.853205) (xy 96.77071 127.896617) (xy 96.775601 127.898168) (xy 96.780119 127.900591) (xy 96.866254 127.926925) + (xy 96.952182 127.954183) (xy 96.95728 127.954754) (xy 96.962184 127.956254) (xy 97.051804 127.965357) (xy 97.14138 127.975405) + (xy 97.151407 127.975474) (xy 97.151595 127.975494) (xy 97.151769 127.975477) (xy 97.155 127.9755) (xy 100.965 127.9755) + (xy 101.054688 127.966706) (xy 101.144445 127.958853) (xy 101.149367 127.957422) (xy 101.154476 127.956922) (xy 101.240767 127.930869) + (xy 101.32727 127.905738) (xy 101.331823 127.903377) (xy 101.336734 127.901895) (xy 101.416307 127.859585) (xy 101.496295 127.818123) + (xy 101.500302 127.814924) (xy 101.504833 127.812515) (xy 101.574672 127.755555) (xy 101.645085 127.699346) (xy 101.652226 127.692303) + (xy 101.652371 127.692186) (xy 101.652481 127.692052) (xy 101.654783 127.689783) (xy 106.449066 122.8955) (xy 106.654023 122.8955) + (xy 106.668388 122.93018) (xy 106.740398 123.03795) (xy 106.832049 123.129602) (xy 106.922441 123.19) (xy 106.83205 123.250398) + (xy 106.740398 123.342049) (xy 106.668388 123.44982) (xy 106.618787 123.569568) (xy 106.5935 123.696692) (xy 106.5935 123.826307) + (xy 106.5935 125.223307) (xy 106.618787 125.350431) (xy 106.668388 125.47018) (xy 106.740398 125.57795) (xy 106.832049 125.669602) + (xy 106.93982 125.741612) (xy 107.059568 125.791213) (xy 107.186692 125.8165) (xy 107.316307 125.8165) (xy 108.713307 125.8165) + (xy 108.840431 125.791213) (xy 108.96018 125.741612) (xy 109.06795 125.669602) (xy 109.159602 125.577951) (xy 109.231612 125.47018) + (xy 109.281213 125.350432) (xy 109.3065 125.223308) (xy 109.3065 125.093693) (xy 109.3065 123.696693) (xy 109.281213 123.569569) + (xy 109.231612 123.44982) (xy 109.159602 123.34205) (xy 109.067951 123.250398) (xy 108.977558 123.189999) (xy 109.06795 123.129602) + (xy 109.159602 123.037951) (xy 109.231612 122.93018) (xy 109.245976 122.8955) (xy 116.205 122.8955) (xy 116.294688 122.886706) + (xy 116.384445 122.878853) (xy 116.389367 122.877422) (xy 116.394476 122.876922) (xy 116.480767 122.850869) (xy 116.56727 122.825738) + (xy 116.571823 122.823377) (xy 116.576734 122.821895) (xy 116.656307 122.779585) (xy 116.736295 122.738123) (xy 116.740302 122.734924) + (xy 116.744833 122.732515) (xy 116.814672 122.675555) (xy 116.885085 122.619346) (xy 116.892226 122.612303) (xy 116.892371 122.612186) + (xy 116.892481 122.612052) (xy 116.894783 122.609783) (xy 118.33641 121.168155) (xy 118.380841 121.164112) (xy 118.651456 121.084466) + (xy 118.901448 120.953773) (xy 119.121293 120.777013) (xy 119.302619 120.560917) (xy 119.380076 120.420022) (xy 119.446096 120.544186) + (xy 119.624386 120.762792) (xy 119.841743 120.942605) (xy 120.089885 121.076775) (xy 120.359362 121.160192) (xy 120.639909 121.189679) + (xy 120.920841 121.164112) (xy 121.191456 121.084466) (xy 121.441448 120.953773) (xy 121.661293 120.777013) (xy 121.842619 120.560917) + (xy 121.913628 120.431752) (xy 121.918724 120.44348) (xy 122.081252 120.677892) (xy 122.286388 120.876092) (xy 122.52625 121.030464) + (xy 122.799975 121.127384) (xy 123.0225 121.005501) (xy 123.0225 119.5475) (xy 123.0025 119.5475) (xy 123.0025 119.2125) + (xy 123.0225 119.2125) (xy 123.0225 117.754499) (xy 122.799975 117.632616) (xy 122.52625 117.729536) (xy 122.286388 117.883908) + (xy 122.081252 118.082108) (xy 121.918724 118.31652) (xy 121.913654 118.328187) (xy 121.853904 118.215814) (xy 121.675614 117.997208) + (xy 121.458257 117.817395) (xy 121.210115 117.683225) (xy 120.940638 117.599808) (xy 120.660091 117.570321) (xy 120.379159 117.595888) + (xy 120.108544 117.675534) (xy 119.858552 117.806227) (xy 119.638707 117.982987) (xy 119.457381 118.199083) (xy 119.379923 118.339977) + (xy 119.313904 118.215814) (xy 119.135614 117.997208) (xy 118.918257 117.817395) (xy 118.670115 117.683225) (xy 118.400638 117.599808) + (xy 118.120091 117.570321) (xy 117.839159 117.595888) (xy 117.568544 117.675534) (xy 117.318552 117.806227) (xy 117.098707 117.982987) + (xy 117.00094 118.0995) (xy 116.990113 118.045068) (xy 116.940512 117.92532) (xy 116.868502 117.817549) (xy 116.77685 117.725898) + (xy 116.66908 117.653888) (xy 116.549331 117.604287) (xy 116.422207 117.579) (xy 115.902 117.579) (xy 115.7375 117.7435) + (xy 115.7375 119.2125) (xy 115.7575 119.2125) (xy 115.7575 119.5475) (xy 115.7375 119.5475) (xy 115.7375 119.5675) + (xy 115.4025 119.5675) (xy 115.4025 119.5475) (xy 115.4025 119.2125) (xy 115.4025 117.7435) (xy 115.238 117.579) + (xy 114.717793 117.579) (xy 114.590669 117.604287) (xy 114.47092 117.653888) (xy 114.36315 117.725898) (xy 114.271498 117.817549) + (xy 114.199488 117.92532) (xy 114.149887 118.045068) (xy 114.1246 118.172192) (xy 114.1246 118.301807) (xy 114.1246 119.048) + (xy 114.2891 119.2125) (xy 115.4025 119.2125) (xy 115.4025 119.5475) (xy 114.2891 119.5475) (xy 114.1246 119.712) + (xy 114.1246 120.458193) (xy 114.1246 120.587808) (xy 114.149887 120.714932) (xy 114.199488 120.83468) (xy 114.271498 120.942451) + (xy 114.273547 120.9445) (xy 109.245976 120.9445) (xy 109.231612 120.90982) (xy 109.159602 120.80205) (xy 109.067951 120.710398) + (xy 108.96018 120.638388) (xy 108.840432 120.588787) (xy 108.713308 120.5635) (xy 108.583693 120.5635) (xy 107.186693 120.5635) + (xy 107.059569 120.588787) (xy 106.93982 120.638388) (xy 106.83205 120.710398) (xy 106.740398 120.802049) (xy 106.668388 120.90982) + (xy 106.654023 120.9445) (xy 106.045 120.9445) (xy 105.955311 120.953293) (xy 105.865555 120.961147) (xy 105.860632 120.962577) + (xy 105.855524 120.963078) (xy 105.769232 120.98913) (xy 105.68273 121.014262) (xy 105.678176 121.016622) (xy 105.673266 121.018105) + (xy 105.593692 121.060414) (xy 105.513705 121.101877) (xy 105.509697 121.105075) (xy 105.505167 121.107485) (xy 105.435327 121.164444) + (xy 105.364915 121.220654) (xy 105.357773 121.227696) (xy 105.357629 121.227814) (xy 105.357518 121.227947) (xy 105.355217 121.230217) + (xy 101.688266 124.897167) (xy 101.565751 125.019682) (xy 101.623379 124.89025) (xy 101.682316 124.630837) (xy 101.686559 124.326988) + (xy 101.634888 124.066031) (xy 101.533514 123.82008) (xy 101.386299 123.598504) (xy 101.19885 123.409741) (xy 100.978306 123.260983) + (xy 100.808421 123.189569) (xy 100.955351 123.131148) (xy 100.989606 123.112838) (xy 101.050755 122.877636) (xy 100.33 122.156881) + (xy 100.093119 122.393762) (xy 99.609245 122.877636) (xy 99.670394 123.112838) (xy 99.850703 123.190553) (xy 99.698498 123.252048) + (xy 99.475899 123.397712) (xy 99.387273 123.4845) (xy 98.822582 123.4845) (xy 98.699522 123.360577) (xy 98.468654 123.204855) + (xy 98.437164 123.191618) (xy 98.437597 123.191449) (xy 98.487385 123.164836) (xy 98.556298 122.923179) (xy 97.79 122.156881) + (xy 97.775857 122.171022) (xy 97.538976 121.934141) (xy 97.553119 121.92) (xy 97.538977 121.905858) (xy 97.775858 121.668977) + (xy 97.79 121.683119) (xy 97.804142 121.668977) (xy 98.041023 121.905858) (xy 98.026881 121.92) (xy 98.793179 122.686298) + (xy 99.034836 122.617385) (xy 99.09386 122.482498) (xy 99.118852 122.545351) (xy 99.137162 122.579606) (xy 99.372364 122.640755) + (xy 100.093119 121.92) (xy 100.078977 121.905858) (xy 100.315858 121.668977) (xy 100.33 121.683119) (xy 100.344142 121.668977) + (xy 100.581023 121.905858) (xy 100.566881 121.92) (xy 101.287636 122.640755) (xy 101.522838 122.579606) (xy 101.628601 122.334221) + (xy 101.684459 122.072917) (xy 101.688266 121.805737) (xy 101.639876 121.542948) (xy 101.541148 121.294649) (xy 101.522838 121.260394) + (xy 101.287637 121.199245) (xy 101.41176 121.075123) (xy 101.327137 120.9905) (xy 101.6 120.9905) (xy 101.689688 120.981706) + (xy 101.779445 120.973853) (xy 101.784367 120.972422) (xy 101.789476 120.971922) (xy 101.875767 120.945869) (xy 101.96227 120.920738) + (xy 101.966823 120.918377) (xy 101.971734 120.916895) (xy 102.051307 120.874585) (xy 102.131295 120.833123) (xy 102.135302 120.829924) + (xy 102.139833 120.827515) (xy 102.209672 120.770555) (xy 102.280085 120.714346) (xy 102.287226 120.707303) (xy 102.287371 120.707186) + (xy 102.287481 120.707052) (xy 102.289783 120.704783) (xy 106.449065 116.5455) (xy 106.654023 116.5455) (xy 106.668388 116.58018) + (xy 106.740398 116.68795) (xy 106.832049 116.779602) (xy 106.922441 116.84) (xy 106.83205 116.900398) (xy 106.740398 116.992049) + (xy 106.668388 117.09982) (xy 106.618787 117.219568) (xy 106.5935 117.346692) (xy 106.5935 117.476307) (xy 106.5935 118.873307) + (xy 106.618787 119.000431) (xy 106.668388 119.12018) (xy 106.740398 119.22795) (xy 106.832049 119.319602) (xy 106.93982 119.391612) + (xy 107.059568 119.441213) (xy 107.186692 119.4665) (xy 107.316307 119.4665) (xy 108.713307 119.4665) (xy 108.840431 119.441213) + (xy 108.96018 119.391612) (xy 109.06795 119.319602) (xy 109.159602 119.227951) (xy 109.231612 119.12018) (xy 109.281213 119.000432) + (xy 109.3065 118.873308) (xy 109.3065 118.743693) (xy 109.3065 117.346693) (xy 109.281213 117.219569) (xy 109.231612 117.09982) + (xy 109.159602 116.99205) (xy 109.067951 116.900398) (xy 108.977558 116.839999) (xy 109.06795 116.779602) (xy 109.159602 116.687951) + (xy 109.231612 116.58018) (xy 109.245976 116.5455) (xy 125.73 116.5455) (xy 125.819688 116.536706) (xy 125.909445 116.528853) + (xy 125.914367 116.527422) (xy 125.919476 116.526922) (xy 126.005767 116.500869) (xy 126.09227 116.475738) (xy 126.096823 116.473377) + (xy 126.101734 116.471895) (xy 126.181307 116.429585) (xy 126.261295 116.388123) (xy 126.265302 116.384924) (xy 126.269833 116.382515) + (xy 126.339672 116.325555) (xy 126.410085 116.269346) (xy 126.417226 116.262303) (xy 126.417371 116.262186) (xy 126.417481 116.262052) + (xy 126.419783 116.259783) (xy 128.959782 113.719783) (xy 129.016975 113.650154) (xy 129.074898 113.581125) (xy 129.077368 113.576632) + (xy 129.080625 113.572667) (xy 129.123205 113.493254) (xy 129.166617 113.41429) (xy 129.168168 113.409398) (xy 129.170591 113.404881) + (xy 129.196925 113.318745) (xy 129.224183 113.232818) (xy 129.224754 113.227719) (xy 129.226254 113.222816) (xy 129.228637 113.199348) + (xy 129.281293 113.157013) (xy 129.462619 112.940917) (xy 129.540076 112.800022) (xy 129.606096 112.924186) (xy 129.784386 113.142792) + (xy 130.001743 113.322605) (xy 130.249885 113.456775) (xy 130.519362 113.540192) (xy 130.799909 113.569679) (xy 131.080841 113.544112) + (xy 131.351456 113.464466) (xy 131.601448 113.333773) (xy 131.821293 113.157013) (xy 132.002619 112.940917) (xy 132.138518 112.693718) + (xy 132.223815 112.42483) (xy 132.255259 112.144495) (xy 132.2554 112.124314) (xy 132.2554 111.395686) (xy 132.227873 111.11494) + (xy 132.146339 110.844887) (xy 132.013904 110.595814) (xy 131.835614 110.377208) (xy 131.7855 110.33575) (xy 131.7855 110.030466) + (xy 133.093666 108.7223) (xy 138.000534 108.7223) (xy 139.3595 110.081266) (xy 139.3595 110.727714) (xy 139.241953 110.842825) + (xy 139.084623 111.0726) (xy 138.97492 111.328557) (xy 138.917021 111.600948) (xy 138.913133 111.879397) (xy 138.963404 112.153299) + (xy 139.065918 112.41222) (xy 139.216771 112.646298) (xy 139.410217 112.846617) (xy 139.638887 113.005547) (xy 139.894073 113.117035) + (xy 140.166053 113.176834) (xy 140.444468 113.182666) (xy 140.718714 113.134309) (xy 140.978344 113.033605) (xy 141.21347 112.88439) + (xy 141.415134 112.692347) (xy 141.575657 112.464791) (xy 141.688924 112.21039) (xy 141.75062 111.938834) (xy 141.755061 111.620762) + (xy 141.700971 111.347589) (xy 141.594852 111.090125) (xy 141.440746 110.858176) (xy 141.3105 110.727017) (xy 141.3105 109.6772) + (xy 141.301706 109.587511) (xy 141.293853 109.497755) (xy 141.292422 109.492832) (xy 141.291922 109.487724) (xy 141.265869 109.401432) + (xy 141.240738 109.31493) (xy 141.238377 109.310376) (xy 141.236895 109.305466) (xy 141.194585 109.225892) (xy 141.153123 109.145905) + (xy 141.149924 109.141897) (xy 141.147515 109.137367) (xy 141.090555 109.067527) (xy 141.034346 108.997115) (xy 141.027303 108.989973) + (xy 141.027186 108.989829) (xy 141.027052 108.989718) (xy 141.024783 108.987417) (xy 139.094383 107.057017) (xy 139.024719 106.999795) + (xy 138.955725 106.941902) (xy 138.951232 106.939432) (xy 138.947266 106.936174) (xy 138.86782 106.893575) (xy 138.78889 106.850183) + (xy 138.784 106.848632) (xy 138.77948 106.846208) (xy 138.693326 106.819868) (xy 138.607418 106.792617) (xy 138.602317 106.792044) + (xy 138.597415 106.790546) (xy 138.5078 106.781443) (xy 138.41822 106.771395) (xy 138.408192 106.771325) (xy 138.408005 106.771306) + (xy 138.40783 106.771322) (xy 138.4046 106.7713) (xy 132.6896 106.7713) (xy 132.599907 106.780094) (xy 132.510156 106.787947) + (xy 132.505233 106.789376) (xy 132.500124 106.789878) (xy 132.41382 106.815934) (xy 132.32733 106.841062) (xy 132.322776 106.843422) + (xy 132.317866 106.844905) (xy 132.238292 106.887214) (xy 132.158305 106.928677) (xy 132.154297 106.931875) (xy 132.149767 106.934285) + (xy 132.079927 106.991244) (xy 132.009515 107.047454) (xy 132.002373 107.054496) (xy 132.002229 107.054614) (xy 132.002118 107.054747) + (xy 131.999817 107.057017) (xy 130.120217 108.936617) (xy 130.062995 109.00628) (xy 130.005102 109.075275) (xy 130.002632 109.079767) + (xy 129.999374 109.083734) (xy 129.956775 109.163179) (xy 129.913383 109.24211) (xy 129.911832 109.246999) (xy 129.909408 109.25152) + (xy 129.883068 109.337673) (xy 129.855817 109.423582) (xy 129.855244 109.428682) (xy 129.853746 109.433585) (xy 129.844643 109.523199) + (xy 129.834595 109.61278) (xy 129.834525 109.622807) (xy 129.834506 109.622995) (xy 129.834522 109.623169) (xy 129.8345 109.6264) + (xy 129.8345 110.334208) (xy 129.798707 110.362987) (xy 129.617381 110.579083) (xy 129.539923 110.719977) (xy 129.473904 110.595814) + (xy 129.295614 110.377208) (xy 129.078257 110.197395) (xy 128.830115 110.063225) (xy 128.560638 109.979808) (xy 128.280091 109.950321) + (xy 127.999159 109.975888) (xy 127.728544 110.055534) (xy 127.478552 110.186227) (xy 127.258707 110.362987) (xy 127.077381 110.579083) + (xy 127.006371 110.708247) (xy 127.001276 110.69652) (xy 126.838748 110.462108) (xy 126.633612 110.263908) (xy 126.39375 110.109536) + (xy 126.120025 110.012616) (xy 125.8975 110.134499) (xy 125.8975 111.5925) (xy 125.9175 111.5925) (xy 125.9175 111.9275) + (xy 125.8975 111.9275) (xy 125.8975 113.385501) (xy 126.120025 113.507384) (xy 126.39375 113.410464) (xy 126.633612 113.256092) + (xy 126.838748 113.057892) (xy 127.001276 112.82348) (xy 127.006345 112.811812) (xy 127.041849 112.878585) (xy 125.325934 114.5945) + (xy 123.005066 114.5945) (xy 123.879783 113.719783) (xy 123.937004 113.650119) (xy 123.994898 113.581125) (xy 123.997367 113.576632) + (xy 124.000626 113.572666) (xy 124.043234 113.493201) (xy 124.086617 113.41429) (xy 124.088167 113.409403) (xy 124.090592 113.404881) + (xy 124.116935 113.318712) (xy 124.144183 113.232818) (xy 124.144755 113.227717) (xy 124.146254 113.222815) (xy 124.148637 113.199349) + (xy 124.201293 113.157013) (xy 124.382619 112.940917) (xy 124.453628 112.811752) (xy 124.458724 112.82348) (xy 124.621252 113.057892) + (xy 124.826388 113.256092) (xy 125.06625 113.410464) (xy 125.339975 113.507384) (xy 125.5625 113.385501) (xy 125.5625 111.9275) + (xy 125.5425 111.9275) (xy 125.5425 111.5925) (xy 125.5625 111.5925) (xy 125.5625 110.134499) (xy 125.339975 110.012616) + (xy 125.06625 110.109536) (xy 124.826388 110.263908) (xy 124.621252 110.462108) (xy 124.458724 110.69652) (xy 124.453654 110.708187) + (xy 124.393904 110.595814) (xy 124.215614 110.377208) (xy 123.998257 110.197395) (xy 123.750115 110.063225) (xy 123.480638 109.979808) + (xy 123.200091 109.950321) (xy 122.919159 109.975888) (xy 122.648544 110.055534) (xy 122.398552 110.186227) (xy 122.178707 110.362987) + (xy 121.997381 110.579083) (xy 121.919923 110.719977) (xy 121.853904 110.595814) (xy 121.675614 110.377208) (xy 121.458257 110.197395) + (xy 121.210115 110.063225) (xy 120.940638 109.979808) (xy 120.660091 109.950321) (xy 120.379159 109.975888) (xy 120.108544 110.055534) + (xy 119.858552 110.186227) (xy 119.638707 110.362987) (xy 119.457381 110.579083) (xy 119.386371 110.708247) (xy 119.381276 110.69652) + (xy 119.218748 110.462108) (xy 119.013612 110.263908) (xy 118.77375 110.109536) (xy 118.500025 110.012616) (xy 118.2775 110.134499) + (xy 118.2775 111.5925) (xy 118.2975 111.5925) (xy 118.2975 111.9275) (xy 118.2775 111.9275) (xy 118.2775 111.9475) + (xy 117.9425 111.9475) (xy 117.9425 111.9275) (xy 117.9225 111.9275) (xy 117.9225 111.5925) (xy 117.9425 111.5925) + (xy 117.9425 110.134499) (xy 117.719975 110.012616) (xy 117.44625 110.109536) (xy 117.206388 110.263908) (xy 117.001252 110.462108) + (xy 116.838724 110.69652) (xy 116.833654 110.708187) (xy 116.773904 110.595814) (xy 116.736 110.549338) (xy 116.736 105.941) + (xy 135.89 105.941) (xy 135.997188 105.93049) (xy 136.104487 105.921103) (xy 136.110375 105.919392) (xy 136.116477 105.918794) + (xy 136.219616 105.887654) (xy 136.323015 105.857614) (xy 136.328455 105.854794) (xy 136.334328 105.853021) (xy 136.429453 105.802441) + (xy 136.525049 105.75289) (xy 136.52984 105.749064) (xy 136.535255 105.746186) (xy 136.618707 105.678123) (xy 136.702894 105.610918) + (xy 136.711436 105.602494) (xy 136.711603 105.602359) (xy 136.71173 105.602205) (xy 136.714487 105.599487) (xy 137.984486 104.329487) + (xy 138.052867 104.246238) (xy 138.122082 104.163752) (xy 138.125035 104.15838) (xy 138.128928 104.153641) (xy 138.179835 104.058699) + (xy 138.231712 103.964336) (xy 138.233565 103.958492) (xy 138.236463 103.953089) (xy 138.26795 103.850097) (xy 138.30052 103.747425) + (xy 138.301203 103.74133) (xy 138.302996 103.735468) (xy 138.313876 103.628345) (xy 138.325886 103.52128) (xy 138.325969 103.509286) + (xy 138.325992 103.50907) (xy 138.325972 103.508868) (xy 138.326 103.505) (xy 138.326 99.542973) (xy 139.179673 98.6893) + (xy 139.661929 98.6893) (xy 139.615431 98.908061) (xy 139.611716 99.174058) (xy 139.659739 99.435711) (xy 139.757669 99.683054) + (xy 139.804 99.754945) (xy 139.804 104.14) (xy 139.814509 104.247188) (xy 139.823897 104.354487) (xy 139.825607 104.360375) + (xy 139.826206 104.366477) (xy 139.857345 104.469616) (xy 139.887386 104.573015) (xy 139.890205 104.578455) (xy 139.891979 104.584328) + (xy 139.942558 104.679453) (xy 139.99211 104.775049) (xy 139.995935 104.77984) (xy 139.998814 104.785255) (xy 140.066876 104.868707) + (xy 140.134082 104.952894) (xy 140.142505 104.961436) (xy 140.142641 104.961603) (xy 140.142794 104.96173) (xy 140.145513 104.964487) + (xy 141.415513 106.234486) (xy 141.498761 106.302867) (xy 141.581248 106.372082) (xy 141.586619 106.375035) (xy 141.591359 106.378928) + (xy 141.6863 106.429835) (xy 141.780664 106.481712) (xy 141.786507 106.483565) (xy 141.791911 106.486463) (xy 141.894902 106.51795) + (xy 141.997575 106.55052) (xy 142.003669 106.551203) (xy 142.009532 106.552996) (xy 142.116654 106.563876) (xy 142.22372 106.575886) + (xy 142.235713 106.575969) (xy 142.23593 106.575992) (xy 142.236131 106.575972) (xy 142.24 106.576) (xy 144.78 106.576) + (xy 144.887188 106.56549) (xy 144.994487 106.556103) (xy 145.000375 106.554392) (xy 145.006477 106.553794) (xy 145.109616 106.522654) + (xy 145.213015 106.492614) (xy 145.218455 106.489794) (xy 145.224328 106.488021) (xy 145.319453 106.437441) (xy 145.415049 106.38789) + (xy 145.41984 106.384064) (xy 145.425255 106.381186) (xy 145.508707 106.313123) (xy 145.592894 106.245918) (xy 145.601436 106.237494) + (xy 145.601603 106.237359) (xy 145.60173 106.237205) (xy 145.604487 106.234487) (xy 147.954999 103.883973) (xy 165.545514 121.474487) + (xy 165.628766 121.542871) (xy 165.711248 121.612082) (xy 165.716619 121.615035) (xy 165.721359 121.618928) (xy 165.816281 121.669824) + (xy 165.910664 121.721712) (xy 165.916509 121.723566) (xy 165.921912 121.726463) (xy 166.024929 121.757958) (xy 166.127575 121.79052) + (xy 166.133664 121.791203) (xy 166.139532 121.792997) (xy 166.246704 121.803882) (xy 166.35372 121.815886) (xy 166.365713 121.815969) + (xy 166.36593 121.815992) (xy 166.366131 121.815972) (xy 166.37 121.816) (xy 177.388602 121.816) (xy 177.415898 121.85685) + (xy 177.507549 121.948502) (xy 177.61532 122.020512) (xy 177.735068 122.070113) (xy 177.789518 122.080944) (xy 177.687208 122.164386) + (xy 177.507395 122.381743) (xy 177.373225 122.629885) (xy 177.289808 122.899362) (xy 177.260321 123.179909) (xy 177.285888 123.460841) + (xy 177.322753 123.5861) (xy 175.050274 123.5861) (xy 175.006158 123.562047) (xy 174.824486 123.505114) (xy 174.635215 123.484553) + (xy 174.445556 123.501147) (xy 174.26273 123.554262) (xy 174.093705 123.641876) (xy 173.944916 123.760653) (xy 173.935218 123.770217) + (xy 173.585934 124.1195) (xy 150.264065 124.1195) (xy 139.754783 113.610217) (xy 139.685119 113.552995) (xy 139.616125 113.495102) + (xy 139.611632 113.492632) (xy 139.607666 113.489374) (xy 139.52822 113.446775) (xy 139.44929 113.403383) (xy 139.4444 113.401832) + (xy 139.43988 113.399408) (xy 139.353726 113.373068) (xy 139.267818 113.345817) (xy 139.262717 113.345244) (xy 139.257815 113.343746) + (xy 139.1682 113.334643) (xy 139.07862 113.324595) (xy 139.068592 113.324525) (xy 139.068405 113.324506) (xy 139.06823 113.324522) + (xy 139.065 113.3245) (xy 138.199065 113.3245) (xy 136.672586 111.79802) (xy 136.675061 111.620762) (xy 136.620971 111.347589) + (xy 136.514852 111.090125) (xy 136.360746 110.858176) (xy 136.164522 110.660577) (xy 135.933654 110.504855) (xy 135.676937 110.396941) + (xy 135.404149 110.340946) (xy 135.125679 110.339001) (xy 134.852135 110.391183) (xy 134.593936 110.495502) (xy 134.360917 110.647985) + (xy 134.161953 110.842825) (xy 134.004623 111.0726) (xy 133.89492 111.328557) (xy 133.837021 111.600948) (xy 133.833133 111.879397) + (xy 133.883404 112.153299) (xy 133.985918 112.41222) (xy 134.136771 112.646298) (xy 134.330217 112.846617) (xy 134.558887 113.005547) + (xy 134.814073 113.117035) (xy 135.086053 113.176834) (xy 135.29668 113.181246) (xy 137.105217 114.989782) (xy 137.174845 115.046975) + (xy 137.243875 115.104898) (xy 137.248367 115.107368) (xy 137.252333 115.110625) (xy 137.331745 115.153205) (xy 137.41071 115.196617) + (xy 137.415601 115.198168) (xy 137.420119 115.200591) (xy 137.506254 115.226925) (xy 137.592182 115.254183) (xy 137.59728 115.254754) + (xy 137.602184 115.256254) (xy 137.691804 115.265357) (xy 137.78138 115.275405) (xy 137.791407 115.275474) (xy 137.791595 115.275494) + (xy 137.791769 115.275477) (xy 137.795 115.2755) (xy 138.660934 115.2755) (xy 149.170217 125.784782) (xy 149.239872 125.841998) + (xy 149.308875 125.899898) (xy 149.313364 125.902366) (xy 149.317333 125.905626) (xy 149.396784 125.948227) (xy 149.47571 125.991617) + (xy 149.480601 125.993168) (xy 149.485119 125.995591) (xy 149.571254 126.021925) (xy 149.57937 126.0245) (xy 145.184065 126.0245) + (xy 141.63995 122.480385) (xy 141.688924 122.37039) (xy 141.75062 122.098834) (xy 141.755061 121.780762) (xy 141.700971 121.507589) + (xy 141.594852 121.250125) (xy 141.440746 121.018176) (xy 141.244522 120.820577) (xy 141.013654 120.664855) (xy 140.756937 120.556941) + (xy 140.484149 120.500946) (xy 140.205679 120.499001) (xy 139.932135 120.551183) (xy 139.673936 120.655502) (xy 139.440917 120.807985) + (xy 139.241953 121.002825) (xy 139.084623 121.2326) (xy 138.97492 121.488557) (xy 138.917021 121.760948) (xy 138.913133 122.039397) + (xy 138.963404 122.313299) (xy 139.065918 122.57222) (xy 139.216771 122.806298) (xy 139.410217 123.006617) (xy 139.512382 123.077623) + (xy 139.516877 123.086295) (xy 139.520075 123.090302) (xy 139.522485 123.094833) (xy 139.579444 123.164672) (xy 139.635654 123.235085) + (xy 139.642696 123.242226) (xy 139.642814 123.242371) (xy 139.642947 123.242481) (xy 139.645217 123.244783) (xy 144.090217 127.689782) + (xy 144.15985 127.746979) (xy 144.228875 127.804898) (xy 144.233367 127.807367) (xy 144.237334 127.810626) (xy 144.316798 127.853234) + (xy 144.39571 127.896617) (xy 144.400596 127.898167) (xy 144.405119 127.900592) (xy 144.491287 127.926935) (xy 144.577182 127.954183) + (xy 144.582282 127.954755) (xy 144.587185 127.956254) (xy 144.676799 127.965356) (xy 144.76638 127.975405) (xy 144.776407 127.975474) + (xy 144.776595 127.975494) (xy 144.776769 127.975477) (xy 144.78 127.9755) (xy 177.165 127.9755) (xy 177.294947 127.962758) + (xy 177.289808 127.979362) (xy 177.260321 128.259909) (xy 177.285888 128.540841) (xy 177.365534 128.811456) (xy 177.496227 129.061448) + (xy 177.672987 129.281293) (xy 177.889083 129.462619) (xy 178.0945 129.575548) (xy 178.0945 130.81) (xy 178.103293 130.899688) + (xy 178.111147 130.989445) (xy 178.112577 130.994367) (xy 178.113078 130.999476) (xy 178.13913 131.085767) (xy 178.164262 131.17227) + (xy 178.166622 131.176823) (xy 178.168105 131.181734) (xy 178.210414 131.261307) (xy 178.251877 131.341295) (xy 178.255075 131.345302) + (xy 178.257485 131.349833) (xy 178.314444 131.419672) (xy 178.370654 131.490085) (xy 178.377696 131.497226) (xy 178.377814 131.497371) + (xy 178.377947 131.497481) (xy 178.380217 131.499783) (xy 180.285217 133.404783) (xy 180.35488 133.462004) (xy 180.423875 133.519898) + (xy 180.428367 133.522367) (xy 180.432334 133.525626) (xy 180.511779 133.568224) (xy 180.59071 133.611617) (xy 180.595599 133.613167) + (xy 180.60012 133.615592) (xy 180.686314 133.641944) (xy 180.772182 133.669183) (xy 180.777277 133.669754) (xy 180.782185 133.671255) + (xy 180.871849 133.680362) (xy 180.96138 133.690405) (xy 180.971407 133.690474) (xy 180.971595 133.690494) (xy 180.971769 133.690477) + (xy 180.975 133.6905) (xy 195.175934 133.6905) (xy 195.525218 134.039783) (xy 195.594855 134.096984) (xy 195.663875 134.154898) + (xy 195.668367 134.157367) (xy 195.672334 134.160626) (xy 195.751779 134.203224) (xy 195.83071 134.246617) (xy 195.835599 134.248167) + (xy 195.84012 134.250592) (xy 195.926314 134.276944) (xy 196.012182 134.304183) (xy 196.017277 134.304754) (xy 196.022185 134.306255) + (xy 196.111844 134.315361) (xy 196.20138 134.325405) (xy 196.211408 134.325474) (xy 196.211596 134.325494) (xy 196.21177 134.325477) + (xy 196.215 134.3255) (xy 218.44 134.3255) (xy 218.529688 134.316706) (xy 218.619445 134.308853) (xy 218.624367 134.307422) + (xy 218.629476 134.306922) (xy 218.715767 134.280869) (xy 218.80227 134.255738) (xy 218.806823 134.253377) (xy 218.811734 134.251895) + (xy 218.891307 134.209585) (xy 218.971295 134.168123) (xy 218.975302 134.164924) (xy 218.979833 134.162515) (xy 219.049672 134.105555) + (xy 219.120085 134.049346) (xy 219.127226 134.042303) (xy 219.127371 134.042186) (xy 219.127481 134.042052) (xy 219.129783 134.039783) + (xy 221.669782 131.499783) (xy 221.726975 131.430154) (xy 221.784898 131.361125) (xy 221.787368 131.356632) (xy 221.790625 131.352667) + (xy 221.833205 131.273254) (xy 221.876617 131.19429) (xy 221.878168 131.189398) (xy 221.880591 131.184881) (xy 221.906925 131.098745) + (xy 221.934183 131.012818) (xy 221.934754 131.007719) (xy 221.936254 131.002816) (xy 221.945357 130.913195) (xy 221.955405 130.82362) + (xy 221.955474 130.813592) (xy 221.955494 130.813405) (xy 221.955477 130.81323) (xy 221.9555 130.81) (xy 221.9555 105.052062) + (xy 221.97727 105.045738) (xy 221.981823 105.043377) (xy 221.986734 105.041895) (xy 222.066307 104.999585) (xy 222.146295 104.958123) + (xy 222.150302 104.954924) (xy 222.154833 104.952515) (xy 222.224672 104.895555) (xy 222.295085 104.839346) (xy 222.302226 104.832303) + (xy 222.302371 104.832186) (xy 222.302481 104.832052) (xy 222.304783 104.829783) (xy 222.939783 104.194782) (xy 222.996984 104.125144) + (xy 223.054898 104.056125) (xy 223.057367 104.051632) (xy 223.060626 104.047666) (xy 223.103224 103.96822) (xy 223.146617 103.88929) + (xy 223.148167 103.8844) (xy 223.150592 103.87988) (xy 223.176944 103.793685) (xy 223.204183 103.707818) (xy 223.204754 103.702722) + (xy 223.206255 103.697815) (xy 223.215361 103.608155) (xy 223.225405 103.51862) (xy 223.225474 103.508591) (xy 223.225494 103.508404) + (xy 223.225477 103.508229) (xy 223.2255 103.505) (xy 223.2255 138.28) (xy 160.004457 138.28) (xy 160.414143 138.020006) + (xy 160.79617 137.656206) (xy 161.100259 137.225133) (xy 161.314827 136.743204) (xy 161.431702 136.228778) (xy 161.440116 135.626232) + (xy 161.33765 135.108742) (xy 161.136621 134.621011) (xy 160.844687 134.181615) (xy 160.472967 133.80729) (xy 160.03562 133.512296) + (xy 159.549304 133.307867) (xy 159.032542 133.201791) (xy 158.505019 133.198109) (xy 157.986827 133.296959) (xy 157.497703 133.494578) + (xy 157.05628 133.783437) (xy 156.67937 134.152535) (xy 156.381329 134.587812) (xy 156.17351 135.072689) (xy 156.063829 135.588698) + (xy 156.056464 136.116183) (xy 156.151694 136.635052) (xy 156.345893 137.125543) (xy 156.631664 137.568972) (xy 156.998122 137.94845) + (xy 157.431308 138.249522) (xy 157.501069 138.28) (xy 138.115543 138.28) (xy 138.115543 136.8528) (xy 138.115543 132.0824) + (xy 136.675061 132.0824) (xy 136.675061 121.780762) (xy 136.620971 121.507589) (xy 136.514852 121.250125) (xy 136.360746 121.018176) + (xy 136.164522 120.820577) (xy 135.933654 120.664855) (xy 135.676937 120.556941) (xy 135.404149 120.500946) (xy 135.125679 120.499001) + (xy 134.852135 120.551183) (xy 134.593936 120.655502) (xy 134.360917 120.807985) (xy 134.221512 120.9445) (xy 131.60732 120.9445) + (xy 131.713612 120.876092) (xy 131.918748 120.677892) (xy 132.081276 120.44348) (xy 132.194949 120.181865) (xy 132.2554 119.9031) + (xy 132.2554 119.5475) (xy 132.2554 119.2125) (xy 132.2554 118.8569) (xy 132.194949 118.578135) (xy 132.081276 118.31652) + (xy 131.918748 118.082108) (xy 131.713612 117.883908) (xy 131.47375 117.729536) (xy 131.200025 117.632616) (xy 130.9775 117.754499) + (xy 130.9775 119.2125) (xy 132.2554 119.2125) (xy 132.2554 119.5475) (xy 130.9775 119.5475) (xy 130.9775 119.5675) + (xy 130.6425 119.5675) (xy 130.6425 119.5475) (xy 130.6225 119.5475) (xy 130.6225 119.2125) (xy 130.6425 119.2125) + (xy 130.6425 117.754499) (xy 130.419975 117.632616) (xy 130.14625 117.729536) (xy 129.906388 117.883908) (xy 129.701252 118.082108) + (xy 129.538724 118.31652) (xy 129.533654 118.328187) (xy 129.473904 118.215814) (xy 129.295614 117.997208) (xy 129.078257 117.817395) (xy 128.830115 117.683225) (xy 128.560638 117.599808) (xy 128.280091 117.570321) (xy 127.999159 117.595888) (xy 127.728544 117.675534) (xy 127.478552 117.806227) (xy 127.258707 117.982987) (xy 127.077381 118.199083) (xy 126.999923 118.339977) (xy 126.933904 118.215814) (xy 126.755614 117.997208) (xy 126.538257 117.817395) (xy 126.290115 117.683225) (xy 126.020638 117.599808) (xy 125.740091 117.570321) (xy 125.459159 117.595888) (xy 125.188544 117.675534) (xy 124.938552 117.806227) (xy 124.718707 117.982987) (xy 124.537381 118.199083) - (xy 124.466513 118.327989) (xy 124.462509 118.31874) (xy 124.301211 118.085014) (xy 124.097587 117.887069) (xy 123.859393 117.732445) - (xy 123.580025 117.632617) (xy 123.3575 117.754499) (xy 123.3575 119.0625) (xy 123.3575 119.2125) (xy 123.3575 119.5475) - (xy 123.3575 119.6975) (xy 123.3575 121.005501) (xy 123.580025 121.127383) (xy 123.859393 121.027555) (xy 124.097587 120.872931) - (xy 124.301211 120.674986) (xy 124.462509 120.44126) (xy 124.466485 120.432075) (xy 124.526096 120.544186) (xy 124.704386 120.762792) + (xy 124.466371 118.328247) (xy 124.461276 118.31652) (xy 124.298748 118.082108) (xy 124.093612 117.883908) (xy 123.85375 117.729536) + (xy 123.580025 117.632616) (xy 123.3575 117.754499) (xy 123.3575 119.2125) (xy 123.3775 119.2125) (xy 123.3775 119.5475) + (xy 123.3575 119.5475) (xy 123.3575 121.005501) (xy 123.580025 121.127384) (xy 123.85375 121.030464) (xy 124.093612 120.876092) + (xy 124.298748 120.677892) (xy 124.461276 120.44348) (xy 124.466345 120.431812) (xy 124.526096 120.544186) (xy 124.704386 120.762792) (xy 124.921743 120.942605) (xy 125.169885 121.076775) (xy 125.439362 121.160192) (xy 125.719909 121.189679) (xy 126.000841 121.164112) (xy 126.271456 121.084466) (xy 126.521448 120.953773) (xy 126.741293 120.777013) (xy 126.922619 120.560917) (xy 127.000076 120.420022) (xy 127.066096 120.544186) (xy 127.244386 120.762792) (xy 127.310069 120.81713) (xy 127.311147 120.829445) (xy 127.312577 120.834367) @@ -4119,10 +4132,10 @@ (xy 128.850217 122.609783) (xy 128.91988 122.667004) (xy 128.988875 122.724898) (xy 128.993367 122.727367) (xy 128.997334 122.730626) (xy 129.076798 122.773234) (xy 129.15571 122.816617) (xy 129.160596 122.818167) (xy 129.165119 122.820592) (xy 129.251287 122.846935) (xy 129.337182 122.874183) (xy 129.342282 122.874755) (xy 129.347185 122.876254) (xy 129.436799 122.885356) (xy 129.52638 122.895405) - (xy 129.536407 122.895474) (xy 129.536595 122.895494) (xy 129.536769 122.895477) (xy 129.54 122.8955) (xy 134.222913 122.8955) - (xy 134.330217 123.006616) (xy 134.558888 123.165546) (xy 134.814073 123.277034) (xy 135.086053 123.336833) (xy 135.364468 123.342665) - (xy 135.638714 123.294308) (xy 135.898344 123.193604) (xy 136.133469 123.044389) (xy 136.335134 122.852346) (xy 136.495656 122.624791) - (xy 136.608923 122.37039) (xy 136.670619 122.098834) (xy 136.67506 121.780762) (xy 136.67506 132.0824) (xy 110.804457 132.0824) + (xy 129.536407 122.895474) (xy 129.536595 122.895494) (xy 129.536769 122.895477) (xy 129.54 122.8955) (xy 134.222912 122.8955) + (xy 134.330217 123.006617) (xy 134.558887 123.165547) (xy 134.814073 123.277035) (xy 135.086053 123.336834) (xy 135.364468 123.342666) + (xy 135.638714 123.294309) (xy 135.898344 123.193605) (xy 136.13347 123.04439) (xy 136.335134 122.852347) (xy 136.495657 122.624791) + (xy 136.608924 122.37039) (xy 136.67062 122.098834) (xy 136.675061 121.780762) (xy 136.675061 132.0824) (xy 110.804457 132.0824) (xy 110.804457 136.8528) (xy 138.115543 136.8528) (xy 138.115543 138.28) (xy 103.408258 138.28) (xy 103.408258 134.6224) (xy 85.821743 134.6224) (xy 85.821743 137.747124) (xy 82.57311 134.840452) (xy 82.57311 127.891685) (xy 82.475482 127.398627) (xy 82.283944 126.933922) (xy 82.005793 126.515271) (xy 81.651622 126.158619) (xy 81.234923 125.877552) (xy 80.771567 125.682775) @@ -4131,16 +4144,16 @@ (xy 77.534366 128.852877) (xy 77.719396 129.32021) (xy 77.991675 129.742705) (xy 78.340831 130.104267) (xy 78.753566 130.391124) (xy 79.214157 130.592352) (xy 79.705062 130.700284) (xy 80.207582 130.710811) (xy 80.702576 130.62353) (xy 81.17119 130.441766) (xy 81.595575 130.172444) (xy 81.959566 129.82582) (xy 82.249298 129.415098) (xy 82.453736 128.955923) (xy 82.565093 128.465783) - (xy 82.57311 127.891685) (xy 82.57311 134.840452) (xy 74.5085 127.624748) (xy 74.5085 48.893632) (xy 76.458431 46.9437) - (xy 76.634722 47.02072) (xy 77.149952 47.134001) (xy 77.677373 47.145049) (xy 78.196894 47.053443) (xy 78.688729 46.862673) - (xy 79.134142 46.580005) (xy 79.516169 46.216206) (xy 79.820258 45.785132) (xy 80.034826 45.303204) (xy 80.151701 44.788778) - (xy 80.160115 44.186232) (xy 80.057649 43.668743) (xy 79.963007 43.439124) (xy 81.342132 42.06) (xy 157.489418 42.06) - (xy 157.05628 42.343438) (xy 156.67937 42.712535) (xy 156.38133 43.147813) (xy 156.173511 43.63269) (xy 156.06383 44.148698) - (xy 156.056465 44.676182) (xy 156.151695 45.195052) (xy 156.345894 45.685543) (xy 156.631665 46.128972) (xy 156.998122 46.508449) - (xy 157.431308 46.809521) (xy 157.914722 47.02072) (xy 158.429952 47.134001) (xy 158.957373 47.145049) (xy 159.476894 47.053443) - (xy 159.968729 46.862673) (xy 160.414142 46.580005) (xy 160.796169 46.216206) (xy 161.100258 45.785132) (xy 161.314826 45.303204) - (xy 161.431701 44.788778) (xy 161.440115 44.186232) (xy 161.337649 43.668743) (xy 161.136621 43.181011) (xy 160.844687 42.741615) - (xy 160.472967 42.367291) (xy 160.035619 42.072297) (xy 160.006365 42.06) (xy 219.650109 42.06) (xy 232.26 54.039397) + (xy 82.57311 127.891685) (xy 82.57311 134.840452) (xy 74.5085 127.624748) (xy 74.5085 48.893632) (xy 76.45843 46.943701) + (xy 76.634722 47.020721) (xy 77.149952 47.134002) (xy 77.677373 47.14505) (xy 78.196895 47.053444) (xy 78.688729 46.862674) + (xy 79.134143 46.580006) (xy 79.51617 46.216206) (xy 79.820259 45.785133) (xy 80.034827 45.303204) (xy 80.151702 44.788778) + (xy 80.160116 44.186232) (xy 80.05765 43.668742) (xy 79.963007 43.439124) (xy 81.342132 42.06) (xy 157.489417 42.06) + (xy 157.05628 42.343437) (xy 156.67937 42.712535) (xy 156.381329 43.147812) (xy 156.17351 43.632689) (xy 156.063829 44.148698) + (xy 156.056464 44.676183) (xy 156.151694 45.195052) (xy 156.345893 45.685543) (xy 156.631664 46.128972) (xy 156.998122 46.50845) + (xy 157.431308 46.809522) (xy 157.914722 47.020721) (xy 158.429952 47.134002) (xy 158.957373 47.14505) (xy 159.476895 47.053444) + (xy 159.968729 46.862674) (xy 160.414143 46.580006) (xy 160.79617 46.216206) (xy 161.100259 45.785133) (xy 161.314827 45.303204) + (xy 161.431702 44.788778) (xy 161.440116 44.186232) (xy 161.33765 43.668742) (xy 161.136621 43.181011) (xy 160.844687 42.741615) + (xy 160.472967 42.36729) (xy 160.03562 42.072296) (xy 160.006369 42.06) (xy 219.650109 42.06) (xy 232.26 54.039397) (xy 232.26 128.845876) ) ) diff --git a/demos/flat_hierarchy/flat_hierarchy.net b/demos/flat_hierarchy/flat_hierarchy.net index db97b94dfb..41fe85b5ca 100644 --- a/demos/flat_hierarchy/flat_hierarchy.net +++ b/demos/flat_hierarchy/flat_hierarchy.net @@ -1,8 +1,8 @@ (export (version D) (design (source F:/kicad-launchpad/testing/demos/flat_hierarchy/flat_hierarchy.sch) - (date "14/01/2013 12:42:23") - (tool "eeschema (2013-01-12 BZR 3902)-testing")) + (date "05/07/2014 20:23:42") + (tool "Eeschema (2014-07-04 BZR 4974)-product")) (components (comp (ref C8) (value 100nF) @@ -302,121 +302,6 @@ (sheetpath (names /pic_programmer/) (tstamps /48553E53/)) (tstamp 442A4C93))) (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 DIODE) - (description "Diode simple") - (footprints - (fp D?) - (fp S*)) - (fields - (field (name Reference) D) - (field (name Value) DIODE)) - (pins - (pin (num 1) (name A) (type passive)) - (pin (num 2) (name K) (type passive)))) - (libpart (lib device) (part DIODESCH) - (description "Diode schottky") - (footprints - (fp D?) - (fp S*)) - (fields - (field (name Reference) D) - (field (name Value) DIODESCH)) - (pins - (pin (num 1) (name A) (type passive)) - (pin (num 2) (name K) (type passive)))) - (libpart (lib device) (part INDUCTOR) - (fields - (field (name Reference) L) - (field (name Value) INDUCTOR)) - (pins - (pin (num 1) (name 1) (type passive)) - (pin (num 2) (name 2) (type passive)))) - (libpart (lib device) (part JUMPER) - (fields - (field (name Reference) JP) - (field (name Value) JUMPER)) - (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 NPN) - (docs transistors/bipolar/*.*) - (fields - (field (name Reference) Q) - (field (name Value) NPN)) - (pins - (pin (num 1) (name E) (type passive)) - (pin (num 2) (name B) (type input)) - (pin (num 3) (name C) (type passive)))) - (libpart (lib device) (part PNP) - (docs transistors/bipolar/*.*) - (fields - (field (name Reference) Q) - (field (name Value) PNP)) - (pins - (pin (num 1) (name E) (type passive)) - (pin (num 2) (name B) (type input)) - (pin (num 3) (name C) (type passive)))) - (libpart (lib device) (part POT) - (description Potentionmetre) - (fields - (field (name Reference) RV) - (field (name Value) POT)) - (pins - (pin (num 1) (name 1) (type passive)) - (pin (num 2) (name 2) (type passive)) - (pin (num 3) (name 3) (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 conn) (part CONN_2) (description "Symbole general de connecteur") (fields @@ -519,7 +404,27 @@ (pin (num 38) (name 38) (type passive)) (pin (num 39) (name 39) (type passive)) (pin (num 40) (name 40) (type passive)))) + (libpart (lib memory) (part 24C16) + (aliases + (alias 24C512)) + (description "I2C Serial EEPROM") + (fields + (field (name Reference) U) + (field (name Value) 24C16)) + (pins + (pin (num 1) (name A0) (type input)) + (pin (num 2) (name A1) (type input)) + (pin (num 3) (name A2) (type input)) + (pin (num 4) (name GND) (type power_in)) + (pin (num 5) (name SDA) (type BiDi)) + (pin (num 6) (name SCL) (type input)) + (pin (num 7) (name WP) (type input)) + (pin (num 8) (name VCC) (type power_in)))) (libpart (lib regul) (part 7805) + (aliases + (alias LM7805) + (alias LM7812) + (alias 78L05)) (description "Linear Regulator +5V") (docs regulator\lm78xx.pdf) (fields @@ -530,6 +435,8 @@ (pin (num VI) (name VI) (type input)) (pin (num VO) (name VO) (type power_out)))) (libpart (lib regul) (part LT1372) + (aliases + (alias LT1373)) (description "Set up/step down switching regulator") (docs regulator/lt1372-1377.pdf) (fields @@ -564,21 +471,9 @@ (pin (num 12) (name D) (type input)) (pin (num 13) (name E) (type input)) (pin (num 14) (name VCC) (type power_in)))) - (libpart (lib memory) (part 24C16) - (description "I2C Serial EEPROM") - (fields - (field (name Reference) U) - (field (name Value) 24C16)) - (pins - (pin (num 1) (name A0) (type input)) - (pin (num 2) (name A1) (type input)) - (pin (num 3) (name A2) (type input)) - (pin (num 4) (name GND) (type power_in)) - (pin (num 5) (name SDA) (type BiDi)) - (pin (num 6) (name SCL) (type input)) - (pin (num 7) (name WP) (type input)) - (pin (num 8) (name VCC) (type power_in)))) (libpart (lib microcontrollers) (part PIC12C508A) + (aliases + (alias PIC12C509A)) (description "8-Bit CMOS Microcontroller") (fields (field (name Reference) U) @@ -615,45 +510,150 @@ (pin (num 15) (name OSC2/CLKO) (type output)) (pin (num 16) (name OSC1/CLKI) (type input)) (pin (num 17) (name RA0) (type BiDi)) - (pin (num 18) (name RA1) (type BiDi))))) + (pin (num 18) (name RA1) (type BiDi)))) + (libpart (lib device) (part NPN) + (docs transistors/bipolar/*.*) + (fields + (field (name Reference) Q) + (field (name Value) NPN)) + (pins + (pin (num 1) (name E) (type passive)) + (pin (num 2) (name B) (type input)) + (pin (num 3) (name C) (type passive)))) + (libpart (lib device) (part DIODESCH) + (description "Diode schottky") + (footprints + (fp D?) + (fp S*)) + (fields + (field (name Reference) D) + (field (name Value) DIODESCH)) + (pins + (pin (num 1) (name A) (type passive)) + (pin (num 2) (name K) (type passive)))) + (libpart (lib device) (part JUMPER) + (fields + (field (name Reference) JP) + (field (name Value) JUMPER)) + (pins + (pin (num 1) (name 1) (type passive)) + (pin (num 2) (name 2) (type passive)))) + (libpart (lib device) (part DIODE) + (description "Diode simple") + (footprints + (fp D?) + (fp S*)) + (fields + (field (name Reference) D) + (field (name Value) DIODE)) + (pins + (pin (num 1) (name A) (type passive)) + (pin (num 2) (name K) (type passive)))) + (libpart (lib device) (part INDUCTOR) + (fields + (field (name Reference) L) + (field (name Value) INDUCTOR)) + (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 CP) + (aliases + (alias CAPAPOL)) + (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 POT) + (description Potentionmetre) + (fields + (field (name Reference) RV) + (field (name Value) POT)) + (pins + (pin (num 1) (name 1) (type passive)) + (pin (num 2) (name 2) (type passive)) + (pin (num 3) (name 3) (type passive)))) + (libpart (lib device) (part PNP) + (docs transistors/bipolar/*.*) + (fields + (field (name Reference) Q) + (field (name Value) PNP)) + (pins + (pin (num 1) (name E) (type passive)) + (pin (num 2) (name B) (type input)) + (pin (num 3) (name C) (type passive)))) + (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))))) (libraries (library (logical device) - (uri F:\kicad\share\library\device.lib)) - (library (logical conn) - (uri F:\kicad\share\library\conn.lib)) - (library (logical regul) - (uri F:\kicad\share\library\regul.lib)) - (library (logical 74xx) - (uri F:\kicad\share\library\74xx.lib)) + (uri f:\kicad\share\library\device.lib)) (library (logical memory) - (uri F:\kicad\share\library\memory.lib)) + (uri f:\kicad\share\library\memory.lib)) + (library (logical regul) + (uri f:\kicad\share\library\regul.lib)) + (library (logical 74xx) + (uri f:\kicad\share\library\74xx.lib)) (library (logical microcontrollers) - (uri F:\kicad\share\library\microcontrollers.lib))) + (uri f:\kicad\share\library\microcontrollers.lib)) + (library (logical conn) + (uri f:\kicad\share\library\conn.lib))) (nets - (net (code 1) (name VCC) - (node (ref L1) (pin 2)) - (node (ref R20) (pin 1)) - (node (ref Q3) (pin 1)) - (node (ref U2) (pin 14)) - (node (ref C6) (pin 1)) - (node (ref C1) (pin 1)) - (node (ref U4) (pin 5)) - (node (ref D4) (pin 2)) - (node (ref R14) (pin 1)) - (node (ref U3) (pin VO)) - (node (ref D2) (pin 2)) - (node (ref JP1) (pin 1)) - (node (ref D6) (pin 2))) - (net (code 2) (name GND) + (net (code 1) (name GND) + (node (ref U3) (pin GND)) (node (ref C2) (pin 2)) - (node (ref R17) (pin 2)) (node (ref P1) (pin 1)) (node (ref D8) (pin 2)) - (node (ref C1) (pin 2)) + (node (ref R17) (pin 2)) (node (ref D9) (pin 2)) + (node (ref C1) (pin 2)) + (node (ref D7) (pin 1)) + (node (ref U2) (pin 10)) (node (ref D5) (pin 1)) (node (ref R4) (pin 2)) - (node (ref D7) (pin 1)) (node (ref U2) (pin 13)) (node (ref R6) (pin 2)) (node (ref U2) (pin 1)) @@ -662,323 +662,332 @@ (node (ref U2) (pin 7)) (node (ref U2) (pin 4)) (node (ref D3) (pin 1)) - (node (ref U3) (pin GND)) (node (ref C8) (pin 2)) - (node (ref P2) (pin 19)) - (node (ref P3) (pin 31)) - (node (ref P3) (pin 12)) - (node (ref P3) (pin 8)) - (node (ref C7) (pin 2)) - (node (ref U6) (pin 8)) - (node (ref U1) (pin 1)) - (node (ref U1) (pin 2)) - (node (ref U1) (pin 3)) (node (ref U5) (pin 5)) + (node (ref U1) (pin 3)) + (node (ref U1) (pin 2)) + (node (ref U1) (pin 1)) + (node (ref U6) (pin 8)) + (node (ref P3) (pin 8)) + (node (ref U1) (pin 4)) + (node (ref P3) (pin 12)) + (node (ref P3) (pin 31)) (node (ref Q1) (pin 1)) - (node (ref C6) (pin 2)) (node (ref P2) (pin 8)) - (node (ref R15) (pin 2)) - (node (ref U4) (pin 7)) + (node (ref C6) (pin 2)) + (node (ref C7) (pin 2)) + (node (ref P2) (pin 19)) (node (ref U4) (pin 6)) - (node (ref C4) (pin 2)) + (node (ref U4) (pin 7)) (node (ref C3) (pin 2)) + (node (ref C4) (pin 2)) (node (ref C5) (pin 2)) - (node (ref D12) (pin 2)) - (node (ref U2) (pin 10))) - (net (code 3) (name "") + (node (ref R15) (pin 2)) + (node (ref D12) (pin 2))) + (net (code 2) (name VCC) + (node (ref D2) (pin 2)) + (node (ref U3) (pin VO)) + (node (ref U2) (pin 14)) + (node (ref D6) (pin 2)) + (node (ref Q3) (pin 1)) + (node (ref R20) (pin 1)) + (node (ref C6) (pin 1)) + (node (ref JP1) (pin 1)) + (node (ref L1) (pin 2)) + (node (ref U4) (pin 5)) + (node (ref C1) (pin 1)) + (node (ref R14) (pin 1)) + (node (ref U1) (pin 8)) + (node (ref D4) (pin 2))) + (net (code 3) (name "Net-(U4-Pad3)") (node (ref U4) (pin 3))) - (net (code 4) (name "") - (node (ref C5) (pin 1)) - (node (ref R10) (pin 2))) - (net (code 5) (name "") - (node (ref C4) (pin 1)) - (node (ref R10) (pin 1)) - (node (ref U4) (pin 1))) - (net (code 6) (name "") + (net (code 4) (name "Net-(D10-Pad1)") + (node (ref L1) (pin 1)) + (node (ref U4) (pin 8)) + (node (ref D10) (pin 1))) + (net (code 5) (name "Net-(C5-Pad1)") + (node (ref R10) (pin 2)) + (node (ref C5) (pin 1))) + (net (code 6) (name "Net-(D12-Pad1)") (node (ref D12) (pin 1)) (node (ref R21) (pin 1))) - (net (code 7) (name "") + (net (code 7) (name "Net-(D11-Pad1)") (node (ref D11) (pin 1)) (node (ref R19) (pin 1))) - (net (code 8) (name "") - (node (ref R20) (pin 2)) + (net (code 8) (name "Net-(Q3-Pad2)") (node (ref R19) (pin 2)) - (node (ref Q3) (pin 2))) + (node (ref Q3) (pin 2)) + (node (ref R20) (pin 2))) (net (code 9) (name VPP) - (node (ref R7) (pin 1)) - (node (ref Q2) (pin 1)) - (node (ref C3) (pin 1)) (node (ref R16) (pin 2)) (node (ref D10) (pin 2)) - (node (ref C9) (pin 1))) - (net (code 10) (name "") + (node (ref Q2) (pin 1)) + (node (ref R7) (pin 1)) + (node (ref C9) (pin 1)) + (node (ref C3) (pin 1))) + (net (code 10) (name "Net-(J1-Pad9)") (node (ref J1) (pin 9))) - (net (code 11) (name "") - (node (ref J1) (pin 2))) - (net (code 12) (name "") - (node (ref RV1) (pin 2)) - (node (ref U4) (pin 2))) - (net (code 13) (name "") + (net (code 11) (name "Net-(C4-Pad1)") + (node (ref U4) (pin 1)) + (node (ref C4) (pin 1)) + (node (ref R10) (pin 1))) + (net (code 12) (name "Net-(RV1-Pad2)") + (node (ref U4) (pin 2)) + (node (ref RV1) (pin 2))) + (net (code 13) (name "Net-(U4-Pad4)") (node (ref U4) (pin 4))) - (net (code 14) (name "") - (node (ref U4) (pin 8)) - (node (ref L1) (pin 1)) - (node (ref D10) (pin 1))) - (net (code 15) (name "") + (net (code 14) (name "Net-(R16-Pad1)") (node (ref R16) (pin 1)) (node (ref RV1) (pin 3))) - (net (code 16) (name "") + (net (code 15) (name "Net-(R15-Pad1)") (node (ref R15) (pin 1)) (node (ref RV1) (pin 1))) - (net (code 17) (name "") - (node (ref R9) (pin 2)) - (node (ref D8) (pin 1))) - (net (code 18) (name "") - (node (ref U2) (pin 3)) - (node (ref R8) (pin 1))) - (net (code 19) (name "") - (node (ref D1) (pin 1)) - (node (ref P1) (pin 2))) - (net (code 20) (name "") + (net (code 16) (name "Net-(D8-Pad1)") + (node (ref D8) (pin 1)) + (node (ref R9) (pin 2))) + (net (code 17) (name "Net-(D9-Pad1)") (node (ref D9) (pin 1)) (node (ref R14) (pin 2))) - (net (code 21) (name "") + (net (code 18) (name "Net-(C2-Pad1)") (node (ref C2) (pin 1)) (node (ref U3) (pin VI)) (node (ref D1) (pin 2))) - (net (code 22) (name "") - (node (ref U2) (pin 6)) - (node (ref R12) (pin 1))) - (net (code 23) (name "") - (node (ref R8) (pin 2)) - (node (ref Q1) (pin 2))) - (net (code 24) (name "") + (net (code 19) (name "Net-(R8-Pad1)") + (node (ref R8) (pin 1)) + (node (ref U2) (pin 3))) + (net (code 20) (name "Net-(D1-Pad1)") + (node (ref P1) (pin 2)) + (node (ref D1) (pin 1))) + (net (code 21) (name "Net-(Q1-Pad2)") + (node (ref Q1) (pin 2)) + (node (ref R8) (pin 2))) + (net (code 22) (name "Net-(D11-Pad2)") + (node (ref D11) (pin 2)) (node (ref R11) (pin 1)) - (node (ref Q1) (pin 3)) - (node (ref D11) (pin 2))) - (net (code 25) (name "") + (node (ref Q1) (pin 3))) + (net (code 23) (name "Net-(Q2-Pad3)") + (node (ref R17) (pin 1)) (node (ref R18) (pin 1)) - (node (ref Q2) (pin 3)) (node (ref R9) (pin 1)) - (node (ref R17) (pin 1))) - (net (code 26) (name VPP/MCLR) - (node (ref R18) (pin 2))) - (net (code 27) (name "") + (node (ref Q2) (pin 3))) + (net (code 24) (name "Net-(C9-Pad2)") (node (ref C9) (pin 2)) + (node (ref R7) (pin 2)) (node (ref R11) (pin 2)) - (node (ref Q2) (pin 2)) - (node (ref R7) (pin 2))) - (net (code 28) (name "") - (node (ref D6) (pin 1)) + (node (ref Q2) (pin 2))) + (net (code 25) (name "Net-(D4-Pad1)") + (node (ref D5) (pin 2)) + (node (ref R3) (pin 2)) + (node (ref D4) (pin 1)) + (node (ref U2) (pin 5))) + (net (code 26) (name "Net-(R12-Pad1)") + (node (ref R12) (pin 1)) + (node (ref U2) (pin 6))) + (net (code 27) (name "Net-(D6-Pad1)") (node (ref R5) (pin 2)) + (node (ref D6) (pin 1)) (node (ref D7) (pin 2)) (node (ref U2) (pin 9))) - (net (code 29) (name "") - (node (ref D5) (pin 2)) - (node (ref D4) (pin 1)) - (node (ref U2) (pin 5)) - (node (ref R3) (pin 2))) - (net (code 30) (name "") - (node (ref J1) (pin 6))) - (net (code 31) (name "") - (node (ref D3) (pin 2)) - (node (ref R1) (pin 2)) + (net (code 28) (name "Net-(J1-Pad2)") + (node (ref J1) (pin 2))) + (net (code 29) (name "Net-(D2-Pad1)") (node (ref D2) (pin 1)) - (node (ref U2) (pin 2))) - (net (code 32) (name "") + (node (ref D3) (pin 2)) + (node (ref U2) (pin 2)) + (node (ref R1) (pin 2))) + (net (code 30) (name "Net-(J1-Pad1)") (node (ref J1) (pin 1))) - (net (code 33) (name "") - (node (ref U2) (pin 8)) - (node (ref R13) (pin 1))) - (net (code 34) (name /pic_programmer/DTR) + (net (code 31) (name "Net-(J1-Pad6)") + (node (ref J1) (pin 6))) + (net (code 32) (name /pic_programmer/DTR) (node (ref R3) (pin 1)) - (node (ref R4) (pin 1)) - (node (ref J1) (pin 4))) - (net (code 35) (name /pic_programmer/TXD) - (node (ref J1) (pin 3)) - (node (ref R2) (pin 1)) - (node (ref R1) (pin 1))) - (net (code 36) (name /pic_programmer/PC-CLOCK-OUT) - (node (ref R5) (pin 1)) - (node (ref J1) (pin 7)) - (node (ref R6) (pin 1))) - (net (code 37) (name /pic_programmer/CTS) + (node (ref J1) (pin 4)) + (node (ref R4) (pin 1))) + (net (code 33) (name "Net-(R13-Pad1)") + (node (ref R13) (pin 1)) + (node (ref U2) (pin 8))) + (net (code 34) (name /pic_programmer/CTS) (node (ref U2) (pin 11)) (node (ref J1) (pin 8))) - (net (code 38) (name "") + (net (code 35) (name /pic_programmer/TXD) + (node (ref R1) (pin 1)) + (node (ref J1) (pin 3)) + (node (ref R2) (pin 1))) + (net (code 36) (name /pic_programmer/PC-CLOCK-OUT) + (node (ref J1) (pin 7)) + (node (ref R5) (pin 1)) + (node (ref R6) (pin 1))) + (net (code 37) (name "Net-(P2-Pad9)") (node (ref P2) (pin 9))) - (net (code 39) (name "") + (net (code 38) (name "Net-(P2-Pad10)") (node (ref P2) (pin 10))) - (net (code 40) (name "") - (node (ref P2) (pin 4))) - (net (code 41) (name "") - (node (ref P2) (pin 7))) - (net (code 42) (name "") - (node (ref P2) (pin 6))) - (net (code 43) (name "") - (node (ref P2) (pin 5))) - (net (code 44) (name "") - (node (ref P2) (pin 24))) - (net (code 45) (name "") + (net (code 39) (name "Net-(P2-Pad11)") (node (ref P2) (pin 11))) - (net (code 46) (name "") + (net (code 40) (name "Net-(P2-Pad5)") + (node (ref P2) (pin 5))) + (net (code 41) (name "Net-(P2-Pad7)") + (node (ref P2) (pin 7))) + (net (code 42) (name "Net-(P2-Pad6)") + (node (ref P2) (pin 6))) + (net (code 43) (name "Net-(P2-Pad15)") + (node (ref P2) (pin 15))) + (net (code 44) (name "Net-(P2-Pad21)") (node (ref P2) (pin 21))) - (net (code 47) (name "") + (net (code 45) (name "Net-(P2-Pad12)") (node (ref P2) (pin 12))) - (net (code 48) (name "") + (net (code 46) (name "Net-(P2-Pad22)") (node (ref P2) (pin 22))) - (net (code 49) (name "") + (net (code 47) (name "Net-(P2-Pad13)") (node (ref P2) (pin 13))) - (net (code 50) (name "") + (net (code 48) (name "Net-(P2-Pad23)") (node (ref P2) (pin 23))) - (net (code 51) (name "") + (net (code 49) (name "Net-(P2-Pad14)") (node (ref P2) (pin 14))) - (net (code 52) (name "") - (node (ref P3) (pin 25))) - (net (code 53) (name "") + (net (code 50) (name "Net-(P2-Pad24)") + (node (ref P2) (pin 24))) + (net (code 51) (name "Net-(P3-Pad26)") + (node (ref P3) (pin 26))) + (net (code 52) (name "Net-(P2-Pad4)") + (node (ref P2) (pin 4))) + (net (code 53) (name "Net-(P2-Pad3)") (node (ref P2) (pin 3))) - (net (code 54) (name "") + (net (code 54) (name "Net-(P2-Pad2)") (node (ref P2) (pin 2))) (net (code 55) (name VPP-MCLR) + (node (ref P3) (pin 1)) + (node (ref R18) (pin 2)) (node (ref U5) (pin 4)) - (node (ref U6) (pin 4)) (node (ref P2) (pin 1)) - (node (ref P3) (pin 1))) - (net (code 56) (name "") - (node (ref P3) (pin 35))) - (net (code 57) (name "") - (node (ref P3) (pin 34))) - (net (code 58) (name "") - (node (ref P3) (pin 33))) - (net (code 59) (name "") - (node (ref P3) (pin 30))) - (net (code 60) (name "") - (node (ref P3) (pin 29))) - (net (code 61) (name "") + (node (ref U6) (pin 4))) + (net (code 56) (name "Net-(P3-Pad28)") (node (ref P3) (pin 28))) - (net (code 62) (name "") - (node (ref P3) (pin 27))) - (net (code 63) (name "") - (node (ref P3) (pin 26))) - (net (code 64) (name VCC_PIC) - (node (ref JP1) (pin 2)) - (node (ref C8) (pin 1)) - (node (ref C7) (pin 1)) - (node (ref P3) (pin 11)) - (node (ref U5) (pin 14)) - (node (ref Q3) (pin 3)) - (node (ref P2) (pin 20)) + (net (code 57) (name "Net-(P3-Pad21)") + (node (ref P3) (pin 21))) + (net (code 58) (name "Net-(P3-Pad22)") + (node (ref P3) (pin 22))) + (net (code 59) (name "Net-(P3-Pad23)") + (node (ref P3) (pin 23))) + (net (code 60) (name "Net-(P3-Pad24)") + (node (ref P3) (pin 24))) + (net (code 61) (name "Net-(P3-Pad25)") + (node (ref P3) (pin 25))) + (net (code 62) (name VCC_PIC) (node (ref U6) (pin 1)) + (node (ref P2) (pin 20)) + (node (ref C8) (pin 1)) + (node (ref U5) (pin 14)) + (node (ref JP1) (pin 2)) + (node (ref P3) (pin 11)) + (node (ref C7) (pin 1)) + (node (ref Q3) (pin 3)) (node (ref R21) (pin 2)) (node (ref P3) (pin 32))) - (net (code 65) (name "") - (node (ref P3) (pin 24))) - (net (code 66) (name "") - (node (ref P3) (pin 23))) - (net (code 67) (name "") - (node (ref P3) (pin 22))) - (net (code 68) (name "") - (node (ref P3) (pin 21))) - (net (code 69) (name "") - (node (ref P2) (pin 15))) - (net (code 70) (name DATA-RB7) + (net (code 63) (name "Net-(P3-Pad27)") + (node (ref P3) (pin 27))) + (net (code 64) (name "Net-(P3-Pad29)") + (node (ref P3) (pin 29))) + (net (code 65) (name "Net-(P3-Pad30)") + (node (ref P3) (pin 30))) + (net (code 66) (name "Net-(P3-Pad33)") + (node (ref P3) (pin 33))) + (net (code 67) (name "Net-(P3-Pad34)") + (node (ref P3) (pin 34))) + (net (code 68) (name "Net-(P3-Pad35)") + (node (ref P3) (pin 35))) + (net (code 69) (name "Net-(P3-Pad36)") + (node (ref P3) (pin 36))) + (net (code 70) (name "Net-(P3-Pad37)") + (node (ref P3) (pin 37))) + (net (code 71) (name "Net-(P2-Pad25)") + (node (ref P2) (pin 25))) + (net (code 72) (name DATA-RB7) + (node (ref U6) (pin 7)) (node (ref U2) (pin 12)) + (node (ref R12) (pin 2)) (node (ref U1) (pin 5)) (node (ref P2) (pin 28)) - (node (ref R12) (pin 2)) - (node (ref U6) (pin 7)) - (node (ref P3) (pin 40)) - (node (ref U5) (pin 13))) - (net (code 71) (name "") + (node (ref U5) (pin 13)) + (node (ref P3) (pin 40))) + (net (code 73) (name "Net-(P2-Pad18)") (node (ref P2) (pin 18))) - (net (code 72) (name CLOCK-RB6) - (node (ref P2) (pin 27)) + (net (code 74) (name CLOCK-RB6) (node (ref U5) (pin 12)) - (node (ref U6) (pin 6)) - (node (ref U1) (pin 6)) (node (ref P3) (pin 39)) - (node (ref R13) (pin 2))) - (net (code 73) (name "") + (node (ref P2) (pin 27)) + (node (ref U1) (pin 6)) + (node (ref R13) (pin 2)) + (node (ref U6) (pin 6))) + (net (code 75) (name "Net-(P2-Pad17)") (node (ref P2) (pin 17))) - (net (code 74) (name "") + (net (code 76) (name "Net-(P2-Pad26)") (node (ref P2) (pin 26))) - (net (code 75) (name "") + (net (code 77) (name "Net-(P2-Pad16)") (node (ref P2) (pin 16))) - (net (code 76) (name "") - (node (ref P2) (pin 25))) - (net (code 77) (name "") - (node (ref P3) (pin 3))) - (net (code 78) (name "") - (node (ref U5) (pin 16))) - (net (code 79) (name "") - (node (ref U5) (pin 6))) - (net (code 80) (name "") - (node (ref U5) (pin 3))) - (net (code 81) (name "") - (node (ref U5) (pin 2))) - (net (code 82) (name "") - (node (ref U5) (pin 1))) - (net (code 83) (name "") - (node (ref U5) (pin 7))) - (net (code 84) (name "") - (node (ref U5) (pin 8))) - (net (code 85) (name "") - (node (ref U5) (pin 9))) - (net (code 86) (name "") - (node (ref U5) (pin 18))) - (net (code 87) (name "") - (node (ref U5) (pin 17))) - (net (code 88) (name "") - (node (ref U5) (pin 15))) - (net (code 89) (name "") - (node (ref U5) (pin 11))) - (net (code 90) (name "") - (node (ref U5) (pin 10))) - (net (code 91) (name "") - (node (ref U1) (pin 7))) - (net (code 92) (name "") - (node (ref U1) (pin 8))) - (net (code 93) (name "") - (node (ref U1) (pin 4))) - (net (code 94) (name "") - (node (ref U6) (pin 5))) - (net (code 95) (name "") - (node (ref U6) (pin 3))) - (net (code 96) (name "") - (node (ref U6) (pin 2))) - (net (code 97) (name "") + (net (code 78) (name "Net-(P3-Pad4)") (node (ref P3) (pin 4))) - (net (code 98) (name "") - (node (ref P3) (pin 20))) - (net (code 99) (name "") - (node (ref P3) (pin 10))) - (net (code 100) (name "") - (node (ref P3) (pin 9))) - (net (code 101) (name "") + (net (code 79) (name "Net-(U5-Pad3)") + (node (ref U5) (pin 3))) + (net (code 80) (name "Net-(U5-Pad9)") + (node (ref U5) (pin 9))) + (net (code 81) (name "Net-(U5-Pad8)") + (node (ref U5) (pin 8))) + (net (code 82) (name "Net-(U5-Pad7)") + (node (ref U5) (pin 7))) + (net (code 83) (name "Net-(U5-Pad6)") + (node (ref U5) (pin 6))) + (net (code 84) (name "Net-(U5-Pad1)") + (node (ref U5) (pin 1))) + (net (code 85) (name "Net-(U5-Pad2)") + (node (ref U5) (pin 2))) + (net (code 86) (name "Net-(U5-Pad18)") + (node (ref U5) (pin 18))) + (net (code 87) (name "Net-(U5-Pad10)") + (node (ref U5) (pin 10))) + (net (code 88) (name "Net-(U5-Pad11)") + (node (ref U5) (pin 11))) + (net (code 89) (name "Net-(U5-Pad17)") + (node (ref U5) (pin 17))) + (net (code 90) (name "Net-(U5-Pad15)") + (node (ref U5) (pin 15))) + (net (code 91) (name "Net-(U5-Pad16)") + (node (ref U5) (pin 16))) + (net (code 92) (name "Net-(U1-Pad7)") + (node (ref U1) (pin 7))) + (net (code 93) (name "Net-(U6-Pad5)") + (node (ref U6) (pin 5))) + (net (code 94) (name "Net-(U6-Pad3)") + (node (ref U6) (pin 3))) + (net (code 95) (name "Net-(U6-Pad2)") + (node (ref U6) (pin 2))) + (net (code 96) (name "Net-(P3-Pad7)") (node (ref P3) (pin 7))) - (net (code 102) (name "") - (node (ref P3) (pin 6))) - (net (code 103) (name "") - (node (ref P3) (pin 5))) - (net (code 104) (name "") + (net (code 97) (name "Net-(P3-Pad2)") (node (ref P3) (pin 2))) - (net (code 105) (name "") + (net (code 98) (name "Net-(P3-Pad3)") + (node (ref P3) (pin 3))) + (net (code 99) (name "Net-(P3-Pad5)") + (node (ref P3) (pin 5))) + (net (code 100) (name "Net-(P3-Pad6)") + (node (ref P3) (pin 6))) + (net (code 101) (name "Net-(P3-Pad9)") + (node (ref P3) (pin 9))) + (net (code 102) (name "Net-(P3-Pad10)") + (node (ref P3) (pin 10))) + (net (code 103) (name "Net-(P3-Pad20)") + (node (ref P3) (pin 20))) + (net (code 104) (name "Net-(P3-Pad13)") (node (ref P3) (pin 13))) - (net (code 106) (name "") + (net (code 105) (name "Net-(P3-Pad14)") (node (ref P3) (pin 14))) - (net (code 107) (name "") + (net (code 106) (name "Net-(P3-Pad15)") (node (ref P3) (pin 15))) - (net (code 108) (name "") + (net (code 107) (name "Net-(P3-Pad16)") (node (ref P3) (pin 16))) - (net (code 109) (name "") + (net (code 108) (name "Net-(P3-Pad17)") (node (ref P3) (pin 17))) - (net (code 110) (name "") + (net (code 109) (name "Net-(P3-Pad18)") (node (ref P3) (pin 18))) - (net (code 111) (name "") + (net (code 110) (name "Net-(P3-Pad19)") (node (ref P3) (pin 19))) - (net (code 112) (name "") - (node (ref P3) (pin 38))) - (net (code 113) (name "") - (node (ref P3) (pin 37))) - (net (code 114) (name "") - (node (ref P3) (pin 36))))) \ No newline at end of file + (net (code 111) (name "Net-(P3-Pad38)") + (node (ref P3) (pin 38))))) \ No newline at end of file diff --git a/demos/flat_hierarchy/flat_hierarchy.sch b/demos/flat_hierarchy/flat_hierarchy.sch index d9d20bbabe..f40cd6c89d 100644 --- a/demos/flat_hierarchy/flat_hierarchy.sch +++ b/demos/flat_hierarchy/flat_hierarchy.sch @@ -1,8 +1,37 @@ EESchema Schematic File Version 2 -LIBS:power,device,transistors,conn,linear,regul,74xx,cmos4000,adc-dac,memory,xilinx,special,microcontrollers,dsp,microchip,analog_switches,motorola,texas,intel,audio,interface,digital-audio,philips,display,cypress,siliconi,contrib,valves -EELAYER 23 0 +LIBS:power +LIBS:device +LIBS:transistors +LIBS:conn +LIBS:linear +LIBS:regul +LIBS:74xx +LIBS:cmos4000 +LIBS:adc-dac +LIBS:memory +LIBS:xilinx +LIBS:special +LIBS:microcontrollers +LIBS:dsp +LIBS:microchip +LIBS:analog_switches +LIBS:motorola +LIBS:texas +LIBS:intel +LIBS:audio +LIBS:interface +LIBS:digital-audio +LIBS:philips +LIBS:display +LIBS:cypress +LIBS:siliconi +LIBS:opto +LIBS:atmel +LIBS:flat_hierarchy-cache +EELAYER 24 0 EELAYER END -$Descr A4 11700 8267 +$Descr A4 11693 8268 +encoding utf-8 Sheet 1 3 Title "" Date "15 jun 2008" diff --git a/demos/flat_hierarchy/pic_programmer.sch b/demos/flat_hierarchy/pic_programmer.sch index 3fbea64b0a..ad17812596 100644 --- a/demos/flat_hierarchy/pic_programmer.sch +++ b/demos/flat_hierarchy/pic_programmer.sch @@ -1,8 +1,37 @@ EESchema Schematic File Version 2 -LIBS:power,device,transistors,conn,linear,regul,74xx,cmos4000,adc-dac,memory,xilinx,special,microcontrollers,dsp,microchip,analog_switches,motorola,texas,intel,audio,interface,digital-audio,philips,display,cypress,siliconi,contrib,valves -EELAYER 23 0 +LIBS:power +LIBS:device +LIBS:transistors +LIBS:conn +LIBS:linear +LIBS:regul +LIBS:74xx +LIBS:cmos4000 +LIBS:adc-dac +LIBS:memory +LIBS:xilinx +LIBS:special +LIBS:microcontrollers +LIBS:dsp +LIBS:microchip +LIBS:analog_switches +LIBS:motorola +LIBS:texas +LIBS:intel +LIBS:audio +LIBS:interface +LIBS:digital-audio +LIBS:philips +LIBS:display +LIBS:cypress +LIBS:siliconi +LIBS:opto +LIBS:atmel +LIBS:flat_hierarchy-cache +EELAYER 24 0 EELAYER END -$Descr A4 11700 8267 +$Descr A4 11693 8268 +encoding utf-8 Sheet 3 3 Title "JDM - COM84 PIC Programmer with 13V DC/DC converter" Date "15 apr 2008" @@ -231,46 +260,54 @@ Wire Wire Line 7800 1500 7800 1600 Connection ~ 7800 1600 $Comp -L PWR_FLAG #FLG013 +L PWR_FLAG #FLG015 U 1 1 48553F47 P 9100 3050 -F 0 "#FLG013" H 9100 3320 30 0001 C C -F 1 "PWR_FLAG" H 9100 3280 30 0000 C C +F 0 "#FLG015" H 9100 3320 30 0001 C CNN +F 1 "PWR_FLAG" H 9100 3280 30 0000 C CNN +F 2 "" H 9100 3050 60 0001 C CNN +F 3 "" H 9100 3050 60 0001 C CNN 1 9100 3050 1 0 0 -1 $EndComp $Comp -L PWR_FLAG #FLG014 +L PWR_FLAG #FLG016 U 1 1 48553F27 P 7800 1500 -F 0 "#FLG014" H 7800 1770 30 0001 C C -F 1 "PWR_FLAG" H 7800 1730 30 0000 C C +F 0 "#FLG016" H 7800 1770 30 0001 C CNN +F 1 "PWR_FLAG" H 7800 1730 30 0000 C CNN +F 2 "" H 7800 1500 60 0001 C CNN +F 3 "" H 7800 1500 60 0001 C CNN 1 7800 1500 1 0 0 -1 $EndComp -Text GLabel 6300 4750 2 60 Output +Text GLabel 6300 4750 2 60 Output ~ 0 CLOCK-RB6 -Text GLabel 6200 3150 2 60 Output +Text GLabel 6200 3150 2 60 Output ~ 0 DATA-RB7 -Text GLabel 8350 1600 2 60 Output -VPP/MCLR -Text GLabel 9200 3200 2 60 Output +Text GLabel 8350 1600 2 60 Output ~ 0 +VPP-MCLR +Text GLabel 9200 3200 2 60 Output ~ 0 VCC_PIC $Comp L C C9 U 1 1 464AD280 P 5700 1000 -F 0 "C9" H 5750 1100 50 0000 L C -F 1 "22OnF" H 5750 900 50 0000 L C +F 0 "C9" H 5750 1100 50 0000 L CNN +F 1 "22OnF" H 5750 900 50 0000 L CNN +F 2 "" H 5700 1000 60 0001 C CNN +F 3 "" H 5700 1000 60 0001 C CNN 1 5700 1000 1 0 0 -1 $EndComp $Comp -L VCC #PWR015 +L VCC #PWR017 U 1 1 4639BB04 P 8650 2550 -F 0 "#PWR015" H 8650 2650 30 0001 C C -F 1 "VCC" H 8650 2650 30 0000 C C +F 0 "#PWR017" H 8650 2650 30 0001 C CNN +F 1 "VCC" H 8650 2650 30 0000 C CNN +F 2 "" H 8650 2550 60 0001 C CNN +F 3 "" H 8650 2550 60 0001 C CNN 1 8650 2550 1 0 0 -1 $EndComp @@ -278,8 +315,10 @@ $Comp L JUMPER JP1 U 1 1 4639BAF8 P 8650 2850 -F 0 "JP1" H 8650 3000 60 0000 C C -F 1 "JUMPER" H 8650 2770 40 0000 C C +F 0 "JP1" H 8650 3000 60 0000 C CNN +F 1 "JUMPER" H 8650 2770 40 0000 C CNN +F 2 "" H 8650 2850 60 0001 C CNN +F 3 "" H 8650 2850 60 0001 C CNN 1 8650 2850 0 1 1 0 $EndComp @@ -287,26 +326,32 @@ $Comp L DIODESCH D11 U 1 1 4639BA28 P 7150 2900 -F 0 "D11" H 7150 3000 40 0000 C C -F 1 "BAT43" H 7150 2800 40 0000 C C +F 0 "D11" H 7150 3000 40 0000 C CNN +F 1 "BAT43" H 7150 2800 40 0000 C CNN +F 2 "" H 7150 2900 60 0001 C CNN +F 3 "" H 7150 2900 60 0001 C CNN 1 7150 2900 -1 0 0 1 $EndComp $Comp -L VCC #PWR016 +L VCC #PWR018 U 1 1 4639BA17 P 8300 2700 -F 0 "#PWR016" H 8300 2800 30 0001 C C -F 1 "VCC" H 8300 2800 30 0000 C C +F 0 "#PWR018" H 8300 2800 30 0001 C CNN +F 1 "VCC" H 8300 2800 30 0000 C CNN +F 2 "" H 8300 2700 60 0001 C CNN +F 3 "" H 8300 2700 60 0001 C CNN 1 8300 2700 1 0 0 -1 $EndComp $Comp -L GND #PWR017 +L GND #PWR019 U 1 1 4639B9EB P 7650 3700 -F 0 "#PWR017" H 7650 3700 30 0001 C C -F 1 "GND" H 7650 3630 30 0001 C C +F 0 "#PWR019" H 7650 3700 30 0001 C CNN +F 1 "GND" H 7650 3630 30 0001 C CNN +F 2 "" H 7650 3700 60 0001 C CNN +F 3 "" H 7650 3700 60 0001 C CNN 1 7650 3700 1 0 0 -1 $EndComp @@ -314,9 +359,11 @@ $Comp L LED D12 U 1 1 4639B9EA P 7650 3500 -F 0 "D12" H 7650 3600 50 0000 C C -F 1 "YELLOW-LED" H 7650 3400 50 0000 C C -F 4 "YELLOW-LED" H 7700 3650 40 0000 C C +F 0 "D12" H 7650 3600 50 0000 C CNN +F 1 "YELLOW-LED" H 7650 3400 50 0000 C CNN +F 2 "" H 7650 3500 60 0001 C CNN +F 3 "" H 7650 3500 60 0001 C CNN +F 4 "YELLOW-LED" H 7700 3650 40 0000 C CNN "Champ4" 1 7650 3500 0 1 1 0 $EndComp @@ -324,8 +371,10 @@ $Comp L R R21 U 1 1 4639B9E9 P 7900 3200 -F 0 "R21" V 7980 3200 50 0000 C C -F 1 "470" V 7900 3200 50 0000 C C +F 0 "R21" V 7980 3200 50 0000 C CNN +F 1 "470" V 7900 3200 50 0000 C CNN +F 2 "" H 7900 3200 60 0001 C CNN +F 3 "" H 7900 3200 60 0001 C CNN 1 7900 3200 0 -1 -1 0 $EndComp @@ -333,8 +382,10 @@ $Comp L R R20 U 1 1 4639B9B3 P 7650 2650 -F 0 "R20" V 7730 2650 50 0000 C C -F 1 "2.2K" V 7650 2650 50 0000 C C +F 0 "R20" V 7730 2650 50 0000 C CNN +F 1 "2.2K" V 7650 2650 50 0000 C CNN +F 2 "" H 7650 2650 60 0001 C CNN +F 3 "" H 7650 2650 60 0001 C CNN 1 7650 2650 0 -1 -1 0 $EndComp @@ -342,8 +393,10 @@ $Comp L R R19 U 1 1 4639B9B0 P 7650 2900 -F 0 "R19" V 7730 2900 50 0000 C C -F 1 "2.2K" V 7650 2900 50 0000 C C +F 0 "R19" V 7730 2900 50 0000 C CNN +F 1 "2.2K" V 7650 2900 50 0000 C CNN +F 2 "" H 7650 2900 60 0001 C CNN +F 3 "" H 7650 2900 60 0001 C CNN 1 7650 2900 0 -1 -1 0 $EndComp @@ -351,28 +404,34 @@ $Comp L PNP Q3 U 1 1 4639B996 P 8200 2900 -F 0 "Q3" H 8350 2900 60 0000 C C -F 1 "BC307" H 8104 3050 60 0000 C C +F 0 "Q3" H 8350 2900 60 0000 C CNN +F 1 "BC307" H 8104 3050 60 0000 C CNN +F 2 "" H 8200 2900 60 0001 C CNN +F 3 "" H 8200 2900 60 0001 C CNN 1 8200 2900 1 0 0 1 $EndComp $Comp -L VCC #PWR018 +L VCC #PWR020 U 1 1 4638AB33 P 7400 2650 -F 0 "#PWR018" H 7400 2750 30 0001 C C -F 1 "VCC" H 7400 2750 30 0000 C C +F 0 "#PWR020" H 7400 2750 30 0001 C CNN +F 1 "VCC" H 7400 2750 30 0000 C CNN +F 2 "" H 7400 2650 60 0001 C CNN +F 3 "" H 7400 2650 60 0001 C CNN 1 7400 2650 1 0 0 -1 $EndComp -Text Notes 9700 6500 0 50 ~ +Text Notes 9700 6500 0 50 ~ 0 ADJUST for VPP = 13V $Comp L POT RV1 U 1 1 443D0101 P 9500 6500 -F 0 "RV1" H 9500 6400 50 0000 C C -F 1 "1K" H 9500 6500 50 0000 C C +F 0 "RV1" H 9500 6400 50 0000 C CNN +F 1 "1K" H 9500 6500 50 0000 C CNN +F 2 "" H 9500 6500 60 0001 C CNN +F 3 "" H 9500 6500 60 0001 C CNN 1 9500 6500 0 -1 -1 0 $EndComp @@ -380,46 +439,54 @@ $Comp L R R18 U 1 1 44369638 P 7350 1600 -F 0 "R18" V 7430 1600 50 0000 C C -F 1 "220" V 7350 1600 50 0000 C C +F 0 "R18" V 7430 1600 50 0000 C CNN +F 1 "220" V 7350 1600 50 0000 C CNN +F 2 "" H 7350 1600 60 0001 C CNN +F 3 "" H 7350 1600 60 0001 C CNN 1 7350 1600 0 -1 -1 0 $EndComp $Comp -L GND #PWR019 +L GND #PWR021 U 1 1 442AABC2 P 6550 2650 -F 0 "#PWR019" H 6550 2650 30 0001 C C -F 1 "GND" H 6550 2580 30 0001 C C +F 0 "#PWR021" H 6550 2650 30 0001 C CNN +F 1 "GND" H 6550 2580 30 0001 C CNN +F 2 "" H 6550 2650 60 0001 C CNN +F 3 "" H 6550 2650 60 0001 C CNN 1 6550 2650 1 0 0 -1 $EndComp $Comp -L PWR_FLAG #FLG020 +L PWR_FLAG #FLG022 U 1 1 442A8330 P 1600 6900 -F 0 "#FLG020" H 1600 7170 30 0001 C C -F 1 "PWR_FLAG" H 1600 7130 30 0000 C C +F 0 "#FLG022" H 1600 7170 30 0001 C CNN +F 1 "PWR_FLAG" H 1600 7130 30 0000 C CNN +F 2 "" H 1600 6900 60 0001 C CNN +F 3 "" H 1600 6900 60 0001 C CNN 1 1600 6900 -1 0 0 1 $EndComp -Text Label 1850 3800 0 60 ~ +Text Label 1850 3800 0 60 ~ 0 DTR -Text Label 1850 3700 0 60 ~ +Text Label 1850 3700 0 60 ~ 0 CTS -Text Label 1850 3600 0 60 ~ +Text Label 1850 3600 0 60 ~ 0 TXD -Text Label 1850 3500 0 60 ~ +Text Label 1850 3500 0 60 ~ 0 RTS -Text Notes 850 6500 0 60 ~ +Text Notes 850 6500 0 60 ~ 0 8 to 15V NoConn ~ 6650 5750 $Comp L DIODESCH D10 U 1 1 442A6026 P 9300 6000 -F 0 "D10" H 9300 6100 40 0000 C C -F 1 "SCHOTTKY" H 9300 5900 40 0000 C C +F 0 "D10" H 9300 6100 40 0000 C CNN +F 1 "SCHOTTKY" H 9300 5900 40 0000 C CNN +F 2 "" H 9300 6000 60 0001 C CNN +F 3 "" H 9300 6000 60 0001 C CNN 1 9300 6000 1 0 0 -1 $EndComp @@ -427,8 +494,10 @@ $Comp L R R10 U 1 1 442A5F83 P 8250 6700 -F 0 "R10" V 8330 6700 50 0000 C C -F 1 "5,1K" V 8250 6700 50 0000 C C +F 0 "R10" V 8330 6700 50 0000 C CNN +F 1 "5,1K" V 8250 6700 50 0000 C CNN +F 2 "" H 8250 6700 60 0001 C CNN +F 3 "" H 8250 6700 60 0001 C CNN 1 8250 6700 0 -1 -1 0 $EndComp @@ -436,8 +505,10 @@ $Comp L C C4 U 1 1 442A5F61 P 8750 6900 -F 0 "C4" H 8800 7000 50 0000 L C -F 1 "0" V 8800 6800 50 0000 L C +F 0 "C4" H 8800 7000 50 0000 L CNN +F 1 "0" V 8800 6800 50 0000 L CNN +F 2 "" H 8750 6900 60 0001 C CNN +F 3 "" H 8750 6900 60 0001 C CNN 1 8750 6900 0 -1 -1 0 $EndComp @@ -445,19 +516,23 @@ $Comp L LT1373 U4 U 1 1 442A5E20 P 7650 6000 -F 0 "U4" H 8250 6500 60 0000 C C -F 1 "LT1373" H 7150 6500 60 0000 C C +F 0 "U4" H 8250 6500 60 0000 C CNN +F 1 "LT1373" H 7150 6500 60 0000 C CNN +F 2 "" H 7650 6000 60 0001 C CNN +F 3 "" H 7650 6000 60 0001 C CNN 1 7650 6000 1 0 0 -1 $EndComp -Text Notes 6150 5200 0 60 ~ +Text Notes 6150 5200 0 60 ~ 0 VPP (13V) power $Comp -L GND #PWR021 +L GND #PWR023 U 1 1 442A58DF P 10150 6800 -F 0 "#PWR021" H 10150 6800 30 0001 C C -F 1 "GND" H 10150 6730 30 0001 C C +F 0 "#PWR023" H 10150 6800 30 0001 C CNN +F 1 "GND" H 10150 6730 30 0001 C CNN +F 2 "" H 10150 6800 60 0001 C CNN +F 3 "" H 10150 6800 60 0001 C CNN 1 10150 6800 1 0 0 -1 $EndComp @@ -465,8 +540,10 @@ $Comp L R R16 U 1 1 442A58DC P 9900 6250 -F 0 "R16" V 9980 6250 50 0000 C C -F 1 "62K" V 9900 6250 50 0000 C C +F 0 "R16" V 9980 6250 50 0000 C CNN +F 1 "62K" V 9900 6250 50 0000 C CNN +F 2 "" H 9900 6250 60 0001 C CNN +F 3 "" H 9900 6250 60 0001 C CNN 1 9900 6250 0 -1 -1 0 $EndComp @@ -474,18 +551,22 @@ $Comp L R R15 U 1 1 442A58D7 P 9900 6750 -F 0 "R15" V 9980 6750 50 0000 C C -F 1 "6.2K" V 9900 6750 50 0000 C C +F 0 "R15" V 9980 6750 50 0000 C CNN +F 1 "6.2K" V 9900 6750 50 0000 C CNN +F 2 "" H 9900 6750 60 0001 C CNN +F 3 "" H 9900 6750 60 0001 C CNN 1 9900 6750 0 -1 -1 0 $EndComp NoConn ~ 6650 6250 $Comp -L GND #PWR022 +L GND #PWR024 U 1 1 442A58B8 P 9150 6600 -F 0 "#PWR022" H 9150 6600 30 0001 C C -F 1 "GND" H 9150 6530 30 0001 C C +F 0 "#PWR024" H 9150 6600 30 0001 C CNN +F 1 "GND" H 9150 6530 30 0001 C CNN +F 2 "" H 9150 6600 60 0001 C CNN +F 3 "" H 9150 6600 60 0001 C CNN 1 9150 6600 0 -1 -1 0 $EndComp @@ -493,35 +574,43 @@ $Comp L C C5 U 1 1 442A58B1 P 8900 6600 -F 0 "C5" H 8950 6700 50 0000 L C -F 1 "10nF" V 9050 6450 50 0000 L C +F 0 "C5" H 8950 6700 50 0000 L CNN +F 1 "10nF" V 9050 6450 50 0000 L CNN +F 2 "" H 8900 6600 60 0001 C CNN +F 3 "" H 8900 6600 60 0001 C CNN 1 8900 6600 0 -1 -1 0 $EndComp $Comp -L PWR_FLAG #FLG023 +L PWR_FLAG #FLG025 U 1 1 442A5893 P 9950 5950 -F 0 "#FLG023" H 9950 6220 30 0001 C C -F 1 "PWR_FLAG" H 9950 6180 30 0000 C C +F 0 "#FLG025" H 9950 6220 30 0001 C CNN +F 1 "PWR_FLAG" H 9950 6180 30 0000 C CNN +F 2 "" H 9950 5950 60 0001 C CNN +F 3 "" H 9950 5950 60 0001 C CNN 1 9950 5950 1 0 0 -1 $EndComp $Comp -L VCC #PWR024 +L VCC #PWR026 U 1 1 442A5882 P 9300 5650 -F 0 "#PWR024" H 9300 5750 30 0001 C C -F 1 "VCC" H 9300 5750 30 0000 C C +F 0 "#PWR026" H 9300 5750 30 0001 C CNN +F 1 "VCC" H 9300 5750 30 0000 C CNN +F 2 "" H 9300 5650 60 0001 C CNN +F 3 "" H 9300 5650 60 0001 C CNN 1 9300 5650 1 0 0 -1 $EndComp $Comp -L GND #PWR025 +L GND #PWR027 U 1 1 442A5852 P 10700 6050 -F 0 "#PWR025" H 10700 6050 30 0001 C C -F 1 "GND" H 10700 5980 30 0001 C C +F 0 "#PWR027" H 10700 6050 30 0001 C CNN +F 1 "GND" H 10700 5980 30 0001 C CNN +F 2 "" H 10700 6050 60 0001 C CNN +F 3 "" H 10700 6050 60 0001 C CNN 1 10700 6050 1 0 0 -1 $EndComp @@ -529,8 +618,10 @@ $Comp L CP C3 U 1 1 442A584C P 10450 6000 -F 0 "C3" H 10500 6100 50 0000 L C -F 1 "22uF/25V" H 10500 5900 50 0000 L C +F 0 "C3" H 10500 6100 50 0000 L CNN +F 1 "22uF/25V" H 10500 5900 50 0000 L CNN +F 2 "" H 10450 6000 60 0001 C CNN +F 3 "" H 10450 6000 60 0001 C CNN 1 10450 6000 0 -1 -1 0 $EndComp @@ -538,26 +629,32 @@ $Comp L VPP #PWR34 U 1 1 442A5846 P 10150 5950 -F 0 "#PWR34" H 10150 6150 40 0001 C C -F 1 "VPP" H 10150 6100 40 0000 C C +F 0 "#PWR34" H 10150 6150 40 0001 C CNN +F 1 "VPP" H 10150 6100 40 0000 C CNN +F 2 "" H 10150 5950 60 0001 C CNN +F 3 "" H 10150 5950 60 0001 C CNN 1 10150 5950 1 0 0 -1 $EndComp $Comp -L GND #PWR026 +L GND #PWR028 U 1 1 442A580B P 7350 6750 -F 0 "#PWR026" H 7350 6750 30 0001 C C -F 1 "GND" H 7350 6680 30 0001 C C +F 0 "#PWR028" H 7350 6750 30 0001 C CNN +F 1 "GND" H 7350 6680 30 0001 C CNN +F 2 "" H 7350 6750 60 0001 C CNN +F 3 "" H 7350 6750 60 0001 C CNN 1 7350 6750 1 0 0 -1 $EndComp $Comp -L VCC #PWR027 +L VCC #PWR029 U 1 1 442A57CB P 7650 5250 -F 0 "#PWR027" H 7650 5350 30 0001 C C -F 1 "VCC" H 7650 5350 30 0000 C C +F 0 "#PWR029" H 7650 5350 30 0001 C CNN +F 1 "VCC" H 7650 5350 30 0000 C CNN +F 2 "" H 7650 5250 60 0001 C CNN +F 3 "" H 7650 5250 60 0001 C CNN 1 7650 5250 1 0 0 -1 $EndComp @@ -565,8 +662,10 @@ $Comp L INDUCTOR L1 U 1 1 442A57BE P 9000 5750 -F 0 "L1" V 8950 5750 40 0000 C C -F 1 "22uH" V 9100 5750 40 0000 C C +F 0 "L1" V 8950 5750 40 0000 C CNN +F 1 "22uH" V 9100 5750 40 0000 C CNN +F 2 "" H 9000 5750 60 0001 C CNN +F 3 "" H 9000 5750 60 0001 C CNN 1 9000 5750 0 -1 -1 0 $EndComp @@ -575,11 +674,13 @@ NoConn ~ 1700 3400 NoConn ~ 1700 3300 NoConn ~ 1700 3200 $Comp -L GND #PWR028 +L GND #PWR030 U 1 1 442A50C2 P 7050 2350 -F 0 "#PWR028" H 7050 2350 30 0001 C C -F 1 "GND" H 7050 2280 30 0001 C C +F 0 "#PWR030" H 7050 2350 30 0001 C CNN +F 1 "GND" H 7050 2280 30 0001 C CNN +F 2 "" H 7050 2350 60 0001 C CNN +F 3 "" H 7050 2350 60 0001 C CNN 1 7050 2350 1 0 0 -1 $EndComp @@ -587,26 +688,32 @@ $Comp L R R17 U 1 1 442A50BF P 7050 2100 -F 0 "R17" V 7130 2100 50 0000 C C -F 1 "22K" V 7050 2100 50 0000 C C +F 0 "R17" V 7130 2100 50 0000 C CNN +F 1 "22K" V 7050 2100 50 0000 C CNN +F 2 "" H 7050 2100 60 0001 C CNN +F 3 "" H 7050 2100 60 0001 C CNN 1 7050 2100 1 0 0 -1 $EndComp $Comp -L VCC #PWR029 +L VCC #PWR031 U 1 1 442A50B3 P 3400 6600 -F 0 "#PWR029" H 3400 6700 30 0001 C C -F 1 "VCC" H 3400 6700 30 0000 C C +F 0 "#PWR031" H 3400 6700 30 0001 C CNN +F 1 "VCC" H 3400 6700 30 0000 C CNN +F 2 "" H 3400 6600 60 0001 C CNN +F 3 "" H 3400 6600 60 0001 C CNN 1 3400 6600 1 0 0 -1 $EndComp $Comp -L GND #PWR030 +L GND #PWR032 U 1 1 442A5095 P 4150 7150 -F 0 "#PWR030" H 4150 7150 30 0001 C C -F 1 "GND" H 4150 7080 30 0001 C C +F 0 "#PWR032" H 4150 7150 30 0001 C CNN +F 1 "GND" H 4150 7080 30 0001 C CNN +F 2 "" H 4150 7150 60 0001 C CNN +F 3 "" H 4150 7150 60 0001 C CNN 1 4150 7150 1 0 0 -1 $EndComp @@ -614,9 +721,11 @@ $Comp L LED D9 U 1 1 442A5084 P 4150 6950 -F 0 "D9" H 4150 7050 50 0000 C C -F 1 "GREEN-LED" H 4150 6850 50 0000 C C -F 4 "GREEN LED" H 4200 7100 40 0000 C C +F 0 "D9" H 4150 7050 50 0000 C CNN +F 1 "GREEN-LED" H 4150 6850 50 0000 C CNN +F 2 "" H 4150 6950 60 0001 C CNN +F 3 "" H 4150 6950 60 0001 C CNN +F 4 "GREEN LED" H 4200 7100 40 0000 C CNN "Champ4" 1 4150 6950 0 1 1 0 $EndComp @@ -624,17 +733,21 @@ $Comp L R R14 U 1 1 442A5083 P 3850 6650 -F 0 "R14" V 3930 6650 50 0000 C C -F 1 "470" V 3850 6650 50 0000 C C +F 0 "R14" V 3930 6650 50 0000 C CNN +F 1 "470" V 3850 6650 50 0000 C CNN +F 2 "" H 3850 6650 60 0001 C CNN +F 3 "" H 3850 6650 60 0001 C CNN 1 3850 6650 0 -1 -1 0 $EndComp $Comp -L GND #PWR031 +L GND #PWR033 U 1 1 442A5057 P 3200 7100 -F 0 "#PWR031" H 3200 7100 30 0001 C C -F 1 "GND" H 3200 7030 30 0001 C C +F 0 "#PWR033" H 3200 7100 30 0001 C CNN +F 1 "GND" H 3200 7030 30 0001 C CNN +F 2 "" H 3200 7100 60 0001 C CNN +F 3 "" H 3200 7100 60 0001 C CNN 1 3200 7100 1 0 0 -1 $EndComp @@ -642,17 +755,21 @@ $Comp L CP C1 U 1 1 442A5056 P 3200 6900 -F 0 "C1" H 3250 7000 50 0000 L C -F 1 "100uF" H 3250 6800 50 0000 L C +F 0 "C1" H 3250 7000 50 0000 L CNN +F 1 "100uF" H 3250 6800 50 0000 L CNN +F 2 "" H 3200 6900 60 0001 C CNN +F 3 "" H 3200 6900 60 0001 C CNN 1 3200 6900 1 0 0 -1 $EndComp $Comp -L GND #PWR032 +L GND #PWR034 U 1 1 442A5050 P 2700 6950 -F 0 "#PWR032" H 2700 6950 30 0001 C C -F 1 "GND" H 2700 6880 30 0001 C C +F 0 "#PWR034" H 2700 6950 30 0001 C CNN +F 1 "GND" H 2700 6880 30 0001 C CNN +F 2 "" H 2700 6950 60 0001 C CNN +F 3 "" H 2700 6950 60 0001 C CNN 1 2700 6950 1 0 0 -1 $EndComp @@ -660,17 +777,21 @@ $Comp L 7805 U3 U 1 1 442A504A P 2700 6700 -F 0 "U3" H 2850 6504 60 0000 C C -F 1 "7805" H 2700 6900 60 0000 C C +F 0 "U3" H 2850 6504 60 0000 C CNN +F 1 "7805" H 2700 6900 60 0000 C CNN +F 2 "" H 2700 6700 60 0001 C CNN +F 3 "" H 2700 6700 60 0001 C CNN 1 2700 6700 1 0 0 -1 $EndComp $Comp -L GND #PWR033 +L GND #PWR035 U 1 1 442A5023 P 1950 7100 -F 0 "#PWR033" H 1950 7100 30 0001 C C -F 1 "GND" H 1950 7030 30 0001 C C +F 0 "#PWR035" H 1950 7100 30 0001 C CNN +F 1 "GND" H 1950 7030 30 0001 C CNN +F 2 "" H 1950 7100 60 0001 C CNN +F 3 "" H 1950 7100 60 0001 C CNN 1 1950 7100 1 0 0 -1 $EndComp @@ -678,17 +799,21 @@ $Comp L CP C2 U 1 1 442A501D P 1950 6900 -F 0 "C2" H 2000 7000 50 0000 L C -F 1 "220uF" H 2000 6800 50 0000 L C +F 0 "C2" H 2000 7000 50 0000 L CNN +F 1 "220uF" H 2000 6800 50 0000 L CNN +F 2 "" H 1950 6900 60 0001 C CNN +F 3 "" H 1950 6900 60 0001 C CNN 1 1950 6900 1 0 0 -1 $EndComp $Comp -L GND #PWR034 +L GND #PWR036 U 1 1 442A500F P 1400 6900 -F 0 "#PWR034" H 1400 6900 30 0001 C C -F 1 "GND" H 1400 6830 30 0001 C C +F 0 "#PWR036" H 1400 6900 30 0001 C CNN +F 1 "GND" H 1400 6830 30 0001 C CNN +F 2 "" H 1400 6900 60 0001 C CNN +F 3 "" H 1400 6900 60 0001 C CNN 1 1400 6900 1 0 0 -1 $EndComp @@ -696,8 +821,10 @@ $Comp L DIODE D1 U 1 1 442A500B P 1650 6650 -F 0 "D1" H 1650 6750 40 0000 C C -F 1 "1N4004" H 1650 6550 40 0000 C C +F 0 "D1" H 1650 6750 40 0000 C CNN +F 1 "1N4004" H 1650 6550 40 0000 C CNN +F 2 "" H 1650 6650 60 0001 C CNN +F 3 "" H 1650 6650 60 0001 C CNN 1 1650 6650 1 0 0 -1 $EndComp @@ -705,8 +832,10 @@ $Comp L CONN_2 P1 U 1 1 442A4FE7 P 1000 6750 -F 0 "P1" V 950 6750 40 0000 C C -F 1 "CONN_2" V 1050 6750 40 0000 C C +F 0 "P1" V 950 6750 40 0000 C CNN +F 1 "CONN_2" V 1050 6750 40 0000 C CNN +F 2 "" H 1000 6750 60 0001 C CNN +F 3 "" H 1000 6750 60 0001 C CNN 1 1000 6750 -1 0 0 1 $EndComp @@ -714,10 +843,12 @@ $Comp L LED D8 U 1 1 442A4F5D P 6550 2400 -F 0 "D8" H 6550 2500 50 0000 C C -F 1 "RED-LED" H 6550 2300 50 0000 C C -F 4 "Low Current Led" H 6600 2550 40 0000 C C -F 5 "RED LED" H 6550 2250 40 0000 C C +F 0 "D8" H 6550 2500 50 0000 C CNN +F 1 "RED-LED" H 6550 2300 50 0000 C CNN +F 2 "" H 6550 2400 60 0001 C CNN +F 3 "" H 6550 2400 60 0001 C CNN +F 4 "Low Current Led" H 6600 2550 40 0000 C CNN "Champ4" +F 5 "RED LED" H 6550 2250 40 0000 C CNN "Champ5" 1 6550 2400 0 1 1 0 $EndComp @@ -725,8 +856,10 @@ $Comp L R R9 U 1 1 442A4F52 P 6550 1900 -F 0 "R9" V 6630 1900 50 0000 C C -F 1 "2.2K" V 6550 1900 50 0000 C C +F 0 "R9" V 6630 1900 50 0000 C CNN +F 1 "2.2K" V 6550 1900 50 0000 C CNN +F 2 "" H 6550 1900 60 0001 C CNN +F 3 "" H 6550 1900 60 0001 C CNN 1 6550 1900 1 0 0 -1 $EndComp @@ -734,8 +867,10 @@ $Comp L VPP #PWR23 U 1 1 442A4F48 P 6550 1100 -F 0 "#PWR23" H 6550 1300 40 0001 C C -F 1 "VPP" H 6550 1250 40 0000 C C +F 0 "#PWR23" H 6550 1300 40 0001 C CNN +F 1 "VPP" H 6550 1250 40 0000 C CNN +F 2 "" H 6550 1100 60 0001 C CNN +F 3 "" H 6550 1100 60 0001 C CNN 1 6550 1100 1 0 0 -1 $EndComp @@ -743,8 +878,10 @@ $Comp L VPP #PWR22 U 1 1 442A4F44 P 6100 700 -F 0 "#PWR22" H 6100 900 40 0001 C C -F 1 "VPP" H 6100 850 40 0000 C C +F 0 "#PWR22" H 6100 900 40 0001 C CNN +F 1 "VPP" H 6100 850 40 0000 C CNN +F 2 "" H 6100 700 60 0001 C CNN +F 3 "" H 6100 700 60 0001 C CNN 1 6100 700 1 0 0 -1 $EndComp @@ -752,8 +889,10 @@ $Comp L PNP Q2 U 1 1 442A4F30 P 6450 1400 -F 0 "Q2" H 6600 1400 60 0000 C C -F 1 "BC307" H 6354 1550 60 0000 C C +F 0 "Q2" H 6600 1400 60 0000 C CNN +F 1 "BC307" H 6354 1550 60 0000 C CNN +F 2 "" H 6450 1400 60 0001 C CNN +F 3 "" H 6450 1400 60 0001 C CNN 1 6450 1400 1 0 0 1 $EndComp @@ -761,8 +900,10 @@ $Comp L R R7 U 1 1 442A4F2A P 6100 1000 -F 0 "R7" V 6180 1000 50 0000 C C -F 1 "10K" V 6100 1000 50 0000 C C +F 0 "R7" V 6180 1000 50 0000 C CNN +F 1 "10K" V 6100 1000 50 0000 C CNN +F 2 "" H 6100 1000 60 0001 C CNN +F 3 "" H 6100 1000 60 0001 C CNN 1 6100 1000 1 0 0 -1 $EndComp @@ -770,70 +911,84 @@ $Comp L R R11 U 1 1 442A4F23 P 5750 1400 -F 0 "R11" V 5830 1400 50 0000 C C -F 1 "22K" V 5750 1400 50 0000 C C +F 0 "R11" V 5830 1400 50 0000 C CNN +F 1 "22K" V 5750 1400 50 0000 C CNN +F 2 "" H 5750 1400 60 0001 C CNN +F 3 "" H 5750 1400 60 0001 C CNN 1 5750 1400 0 -1 -1 0 $EndComp $Comp -L GND #PWR035 +L GND #PWR037 U 1 1 442A4F1C P 5450 1900 -F 0 "#PWR035" H 5450 1900 30 0001 C C -F 1 "GND" H 5450 1830 30 0001 C C +F 0 "#PWR037" H 5450 1900 30 0001 C CNN +F 1 "GND" H 5450 1830 30 0001 C CNN +F 2 "" H 5450 1900 60 0001 C CNN +F 3 "" H 5450 1900 60 0001 C CNN 1 5450 1900 1 0 0 -1 $EndComp -Text Label 2300 1700 0 60 ~ +Text Label 2300 1700 0 60 ~ 0 VPP_ON $Comp L NPN Q1 U 1 1 442A4EB9 P 5350 1700 -F 0 "Q1" H 5500 1700 50 0000 C C -F 1 "BC237" H 5252 1850 50 0000 C C +F 0 "Q1" H 5500 1700 50 0000 C CNN +F 1 "BC237" H 5252 1850 50 0000 C CNN +F 2 "" H 5350 1700 60 0001 C CNN +F 3 "" H 5350 1700 60 0001 C CNN 1 5350 1700 1 0 0 -1 $EndComp -Text Label 2350 5100 0 60 ~ +Text Label 2350 5100 0 60 ~ 0 PC-CLOCK-OUT $Comp -L GND #PWR036 +L GND #PWR038 U 1 1 442A4E06 P 1700 4000 -F 0 "#PWR036" H 1700 4000 30 0001 C C -F 1 "GND" H 1700 3930 30 0001 C C +F 0 "#PWR038" H 1700 4000 30 0001 C CNN +F 1 "GND" H 1700 3930 30 0001 C CNN +F 2 "" H 1700 4000 60 0001 C CNN +F 3 "" H 1700 4000 60 0001 C CNN 1 1700 4000 0 -1 -1 0 $EndComp -Text Label 2700 4200 0 60 ~ +Text Label 2700 4200 0 60 ~ 0 PC-DATA-IN -Text Label 2500 3150 0 60 ~ +Text Label 2500 3150 0 60 ~ 0 PC-DATA-OUT $Comp -L GND #PWR037 +L GND #PWR039 U 1 1 442A4DB3 P 2800 2250 -F 0 "#PWR037" H 2800 2250 30 0001 C C -F 1 "GND" H 2800 2180 30 0001 C C +F 0 "#PWR039" H 2800 2250 30 0001 C CNN +F 1 "GND" H 2800 2180 30 0001 C CNN +F 2 "" H 2800 2250 60 0001 C CNN +F 3 "" H 2800 2250 60 0001 C CNN 1 2800 2250 1 0 0 -1 $EndComp $Comp -L GND #PWR038 +L GND #PWR040 U 1 1 442A4DAE P 3200 5650 -F 0 "#PWR038" H 3200 5650 30 0001 C C -F 1 "GND" H 3200 5580 30 0001 C C +F 0 "#PWR040" H 3200 5650 30 0001 C CNN +F 1 "GND" H 3200 5580 30 0001 C CNN +F 2 "" H 3200 5650 60 0001 C CNN +F 3 "" H 3200 5650 60 0001 C CNN 1 3200 5650 1 0 0 -1 $EndComp $Comp -L GND #PWR039 +L GND #PWR041 U 1 1 442A4DAB P 3200 3700 -F 0 "#PWR039" H 3200 3700 30 0001 C C -F 1 "GND" H 3200 3630 30 0001 C C +F 0 "#PWR041" H 3200 3700 30 0001 C CNN +F 1 "GND" H 3200 3630 30 0001 C CNN +F 2 "" H 3200 3700 60 0001 C CNN +F 3 "" H 3200 3700 60 0001 C CNN 1 3200 3700 1 0 0 -1 $EndComp @@ -841,8 +996,10 @@ $Comp L R R8 U 1 1 442A4D92 P 4700 1700 -F 0 "R8" V 4780 1700 50 0000 C C -F 1 "1K" V 4700 1700 50 0000 C C +F 0 "R8" V 4780 1700 50 0000 C CNN +F 1 "1K" V 4700 1700 50 0000 C CNN +F 2 "" H 4700 1700 60 0001 C CNN +F 3 "" H 4700 1700 60 0001 C CNN 1 4700 1700 0 -1 -1 0 $EndComp @@ -850,8 +1007,10 @@ $Comp L R R13 U 1 1 442A4D8D P 5100 4750 -F 0 "R13" V 5180 4750 50 0000 C C -F 1 "470" V 5100 4750 50 0000 C C +F 0 "R13" V 5180 4750 50 0000 C CNN +F 1 "470" V 5100 4750 50 0000 C CNN +F 2 "" H 5100 4750 60 0001 C CNN +F 3 "" H 5100 4750 60 0001 C CNN 1 5100 4750 0 -1 -1 0 $EndComp @@ -859,17 +1018,21 @@ $Comp L R R12 U 1 1 442A4D85 P 5100 3150 -F 0 "R12" V 5180 3150 50 0000 C C -F 1 "470" V 5100 3150 50 0000 C C +F 0 "R12" V 5180 3150 50 0000 C CNN +F 1 "470" V 5100 3150 50 0000 C CNN +F 2 "" H 5100 3150 60 0001 C CNN +F 3 "" H 5100 3150 60 0001 C CNN 1 5100 3150 0 -1 -1 0 $EndComp $Comp -L GND #PWR040 +L GND #PWR042 U 1 1 442A4D75 P 4350 4500 -F 0 "#PWR040" H 4350 4500 30 0001 C C -F 1 "GND" H 4350 4430 30 0001 C C +F 0 "#PWR042" H 4350 4500 30 0001 C CNN +F 1 "GND" H 4350 4430 30 0001 C CNN +F 2 "" H 4350 4500 60 0001 C CNN +F 3 "" H 4350 4500 60 0001 C CNN 1 4350 4500 1 0 0 -1 $EndComp @@ -877,35 +1040,43 @@ $Comp L 74LS125 U2 U 4 1 442A4D6B P 4350 4200 -F 0 "U2" H 4350 4300 50 0000 L B -F 1 "74HC125" H 4400 4050 40 0000 L T +F 0 "U2" H 4350 4300 50 0000 L BNN +F 1 "74HC125" H 4400 4050 40 0000 L TNN +F 2 "" H 4350 4200 60 0001 C CNN +F 3 "" H 4350 4200 60 0001 C CNN 4 4350 4200 -1 0 0 -1 $EndComp $Comp -L VCC #PWR041 +L VCC #PWR043 U 1 1 442A4D68 P 3850 4650 -F 0 "#PWR041" H 3850 4750 30 0001 C C -F 1 "VCC" H 3850 4750 30 0000 C C +F 0 "#PWR043" H 3850 4750 30 0001 C CNN +F 1 "VCC" H 3850 4750 30 0000 C CNN +F 2 "" H 3850 4650 60 0001 C CNN +F 3 "" H 3850 4650 60 0001 C CNN 1 3850 4650 1 0 0 -1 $EndComp $Comp -L GND #PWR042 +L GND #PWR044 U 1 1 442A4D67 P 3850 5600 -F 0 "#PWR042" H 3850 5600 30 0001 C C -F 1 "GND" H 3850 5530 30 0001 C C +F 0 "#PWR044" H 3850 5600 30 0001 C CNN +F 1 "GND" H 3850 5530 30 0001 C CNN +F 2 "" H 3850 5600 60 0001 C CNN +F 3 "" H 3850 5600 60 0001 C CNN 1 3850 5600 1 0 0 -1 $EndComp $Comp -L GND #PWR043 +L GND #PWR045 U 1 1 442A4D66 P 4350 5400 -F 0 "#PWR043" H 4350 5400 30 0001 C C -F 1 "GND" H 4350 5330 30 0001 C C +F 0 "#PWR045" H 4350 5400 30 0001 C CNN +F 1 "GND" H 4350 5330 30 0001 C CNN +F 2 "" H 4350 5400 60 0001 C CNN +F 3 "" H 4350 5400 60 0001 C CNN 1 4350 5400 1 0 0 -1 $EndComp @@ -913,8 +1084,10 @@ $Comp L DIODESCH D7 U 1 1 442A4D65 P 3850 5400 -F 0 "D7" H 3850 5500 40 0000 C C -F 1 "BAT43" H 3850 5300 40 0000 C C +F 0 "D7" H 3850 5500 40 0000 C CNN +F 1 "BAT43" H 3850 5300 40 0000 C CNN +F 2 "" H 3850 5400 60 0001 C CNN +F 3 "" H 3850 5400 60 0001 C CNN 1 3850 5400 0 -1 -1 0 $EndComp @@ -922,8 +1095,10 @@ $Comp L DIODESCH D6 U 1 1 442A4D64 P 3850 4850 -F 0 "D6" H 3850 4950 40 0000 C C -F 1 "BAT43" H 3850 4750 40 0000 C C +F 0 "D6" H 3850 4950 40 0000 C CNN +F 1 "BAT43" H 3850 4750 40 0000 C CNN +F 2 "" H 3850 4850 60 0001 C CNN +F 3 "" H 3850 4850 60 0001 C CNN 1 3850 4850 0 -1 -1 0 $EndComp @@ -931,8 +1106,10 @@ $Comp L R R6 U 1 1 442A4D63 P 3200 5400 -F 0 "R6" V 3280 5400 50 0000 C C -F 1 "10K" V 3200 5400 50 0000 C C +F 0 "R6" V 3280 5400 50 0000 C CNN +F 1 "10K" V 3200 5400 50 0000 C CNN +F 2 "" H 3200 5400 60 0001 C CNN +F 3 "" H 3200 5400 60 0001 C CNN 1 3200 5400 1 0 0 -1 $EndComp @@ -940,8 +1117,10 @@ $Comp L R R5 U 1 1 442A4D62 P 3500 5100 -F 0 "R5" V 3580 5100 50 0000 C C -F 1 "10K" V 3500 5100 50 0000 C C +F 0 "R5" V 3580 5100 50 0000 C CNN +F 1 "10K" V 3500 5100 50 0000 C CNN +F 2 "" H 3500 5100 60 0001 C CNN +F 3 "" H 3500 5100 60 0001 C CNN 1 3500 5100 0 -1 -1 0 $EndComp @@ -949,35 +1128,43 @@ $Comp L 74LS125 U2 U 3 1 442A4D61 P 4350 5100 -F 0 "U2" H 4350 5200 50 0000 L B -F 1 "74HC125" H 4400 4950 40 0000 L T +F 0 "U2" H 4350 5200 50 0000 L BNN +F 1 "74HC125" H 4400 4950 40 0000 L TNN +F 2 "" H 4350 5100 60 0001 C CNN +F 3 "" H 4350 5100 60 0001 C CNN 3 4350 5100 1 0 0 -1 $EndComp $Comp -L VCC #PWR044 +L VCC #PWR046 U 1 1 442A4D60 P 3850 2700 -F 0 "#PWR044" H 3850 2800 30 0001 C C -F 1 "VCC" H 3850 2800 30 0000 C C +F 0 "#PWR046" H 3850 2800 30 0001 C CNN +F 1 "VCC" H 3850 2800 30 0000 C CNN +F 2 "" H 3850 2700 60 0001 C CNN +F 3 "" H 3850 2700 60 0001 C CNN 1 3850 2700 1 0 0 -1 $EndComp $Comp -L GND #PWR045 +L GND #PWR047 U 1 1 442A4D5F P 3850 3650 -F 0 "#PWR045" H 3850 3650 30 0001 C C -F 1 "GND" H 3850 3580 30 0001 C C +F 0 "#PWR047" H 3850 3650 30 0001 C CNN +F 1 "GND" H 3850 3580 30 0001 C CNN +F 2 "" H 3850 3650 60 0001 C CNN +F 3 "" H 3850 3650 60 0001 C CNN 1 3850 3650 1 0 0 -1 $EndComp $Comp -L GND #PWR046 +L GND #PWR048 U 1 1 442A4D5E P 4350 3450 -F 0 "#PWR046" H 4350 3450 30 0001 C C -F 1 "GND" H 4350 3380 30 0001 C C +F 0 "#PWR048" H 4350 3450 30 0001 C CNN +F 1 "GND" H 4350 3380 30 0001 C CNN +F 2 "" H 4350 3450 60 0001 C CNN +F 3 "" H 4350 3450 60 0001 C CNN 1 4350 3450 1 0 0 -1 $EndComp @@ -985,8 +1172,10 @@ $Comp L DIODESCH D5 U 1 1 442A4D5D P 3850 3450 -F 0 "D5" H 3850 3550 40 0000 C C -F 1 "BAT43" H 3850 3350 40 0000 C C +F 0 "D5" H 3850 3550 40 0000 C CNN +F 1 "BAT43" H 3850 3350 40 0000 C CNN +F 2 "" H 3850 3450 60 0001 C CNN +F 3 "" H 3850 3450 60 0001 C CNN 1 3850 3450 0 -1 -1 0 $EndComp @@ -994,8 +1183,10 @@ $Comp L DIODESCH D4 U 1 1 442A4D5C P 3850 2900 -F 0 "D4" H 3850 3000 40 0000 C C -F 1 "BAT43" H 3850 2800 40 0000 C C +F 0 "D4" H 3850 3000 40 0000 C CNN +F 1 "BAT43" H 3850 2800 40 0000 C CNN +F 2 "" H 3850 2900 60 0001 C CNN +F 3 "" H 3850 2900 60 0001 C CNN 1 3850 2900 0 -1 -1 0 $EndComp @@ -1003,8 +1194,10 @@ $Comp L R R4 U 1 1 442A4D5B P 3200 3450 -F 0 "R4" V 3280 3450 50 0000 C C -F 1 "10K" V 3200 3450 50 0000 C C +F 0 "R4" V 3280 3450 50 0000 C CNN +F 1 "10K" V 3200 3450 50 0000 C CNN +F 2 "" H 3200 3450 60 0001 C CNN +F 3 "" H 3200 3450 60 0001 C CNN 1 3200 3450 1 0 0 -1 $EndComp @@ -1012,8 +1205,10 @@ $Comp L R R3 U 1 1 442A4D5A P 3500 3150 -F 0 "R3" V 3580 3150 50 0000 C C -F 1 "10K" V 3500 3150 50 0000 C C +F 0 "R3" V 3580 3150 50 0000 C CNN +F 1 "10K" V 3500 3150 50 0000 C CNN +F 2 "" H 3500 3150 60 0001 C CNN +F 3 "" H 3500 3150 60 0001 C CNN 1 3500 3150 0 -1 -1 0 $EndComp @@ -1021,35 +1216,43 @@ $Comp L 74LS125 U2 U 2 1 442A4D59 P 4350 3150 -F 0 "U2" H 4350 3250 50 0000 L B -F 1 "74HC125" H 4400 3000 40 0000 L T +F 0 "U2" H 4350 3250 50 0000 L BNN +F 1 "74HC125" H 4400 3000 40 0000 L TNN +F 2 "" H 4350 3150 60 0001 C CNN +F 3 "" H 4350 3150 60 0001 C CNN 2 4350 3150 1 0 0 -1 $EndComp $Comp -L VCC #PWR047 +L VCC #PWR049 U 1 1 442A4D41 P 3450 1250 -F 0 "#PWR047" H 3450 1350 30 0001 C C -F 1 "VCC" H 3450 1350 30 0000 C C +F 0 "#PWR049" H 3450 1350 30 0001 C CNN +F 1 "VCC" H 3450 1350 30 0000 C CNN +F 2 "" H 3450 1250 60 0001 C CNN +F 3 "" H 3450 1250 60 0001 C CNN 1 3450 1250 1 0 0 -1 $EndComp $Comp -L GND #PWR048 +L GND #PWR050 U 1 1 442A4D3B P 3450 2200 -F 0 "#PWR048" H 3450 2200 30 0001 C C -F 1 "GND" H 3450 2130 30 0001 C C +F 0 "#PWR050" H 3450 2200 30 0001 C CNN +F 1 "GND" H 3450 2130 30 0001 C CNN +F 2 "" H 3450 2200 60 0001 C CNN +F 3 "" H 3450 2200 60 0001 C CNN 1 3450 2200 1 0 0 -1 $EndComp $Comp -L GND #PWR049 +L GND #PWR051 U 1 1 442A4D38 P 3950 2000 -F 0 "#PWR049" H 3950 2000 30 0001 C C -F 1 "GND" H 3950 1930 30 0001 C C +F 0 "#PWR051" H 3950 2000 30 0001 C CNN +F 1 "GND" H 3950 1930 30 0001 C CNN +F 2 "" H 3950 2000 60 0001 C CNN +F 3 "" H 3950 2000 60 0001 C CNN 1 3950 2000 1 0 0 -1 $EndComp @@ -1057,8 +1260,10 @@ $Comp L DIODESCH D3 U 1 1 442A4D25 P 3450 2000 -F 0 "D3" H 3450 2100 40 0000 C C -F 1 "BAT43" H 3450 1900 40 0000 C C +F 0 "D3" H 3450 2100 40 0000 C CNN +F 1 "BAT43" H 3450 1900 40 0000 C CNN +F 2 "" H 3450 2000 60 0001 C CNN +F 3 "" H 3450 2000 60 0001 C CNN 1 3450 2000 0 -1 -1 0 $EndComp @@ -1066,8 +1271,10 @@ $Comp L DIODESCH D2 U 1 1 442A4D1B P 3450 1450 -F 0 "D2" H 3450 1550 40 0000 C C -F 1 "BAT43" H 3450 1350 40 0000 C C +F 0 "D2" H 3450 1550 40 0000 C CNN +F 1 "BAT43" H 3450 1350 40 0000 C CNN +F 2 "" H 3450 1450 60 0001 C CNN +F 3 "" H 3450 1450 60 0001 C CNN 1 3450 1450 0 -1 -1 0 $EndComp @@ -1075,8 +1282,10 @@ $Comp L R R2 U 1 1 442A4CFB P 2800 2000 -F 0 "R2" V 2880 2000 50 0000 C C -F 1 "10K" V 2800 2000 50 0000 C C +F 0 "R2" V 2880 2000 50 0000 C CNN +F 1 "10K" V 2800 2000 50 0000 C CNN +F 2 "" H 2800 2000 60 0001 C CNN +F 3 "" H 2800 2000 60 0001 C CNN 1 2800 2000 1 0 0 -1 $EndComp @@ -1084,8 +1293,10 @@ $Comp L R R1 U 1 1 442A4CF4 P 3100 1700 -F 0 "R1" V 3180 1700 50 0000 C C -F 1 "10K" V 3100 1700 50 0000 C C +F 0 "R1" V 3180 1700 50 0000 C CNN +F 1 "10K" V 3100 1700 50 0000 C CNN +F 2 "" H 3100 1700 60 0001 C CNN +F 3 "" H 3100 1700 60 0001 C CNN 1 3100 1700 0 -1 -1 0 $EndComp @@ -1093,8 +1304,10 @@ $Comp L 74LS125 U2 U 1 1 442A4CC8 P 3950 1700 -F 0 "U2" H 3950 1800 50 0000 L B -F 1 "74HC125" H 4000 1550 40 0000 L T +F 0 "U2" H 3950 1800 50 0000 L BNN +F 1 "74HC125" H 4000 1550 40 0000 L TNN +F 2 "" H 3950 1700 60 0001 C CNN +F 3 "" H 3950 1700 60 0001 C CNN 1 3950 1700 1 0 0 -1 $EndComp @@ -1102,8 +1315,10 @@ $Comp L DB9 J1 U 1 1 442A4C93 P 1250 3600 -F 0 "J1" H 1250 4150 70 0000 C C -F 1 "DB9-FEMAL" H 1250 3050 70 0000 C C +F 0 "J1" H 1250 4150 70 0000 C CNN +F 1 "DB9-FEMAL" H 1250 3050 70 0000 C CNN +F 2 "" H 1250 3600 60 0001 C CNN +F 3 "" H 1250 3600 60 0001 C CNN 1 1250 3600 -1 0 0 1 $EndComp diff --git a/demos/flat_hierarchy/pic_sockets.sch b/demos/flat_hierarchy/pic_sockets.sch index 2b1dffc262..614360ddaa 100644 --- a/demos/flat_hierarchy/pic_sockets.sch +++ b/demos/flat_hierarchy/pic_sockets.sch @@ -1,8 +1,37 @@ EESchema Schematic File Version 2 -LIBS:power,device,transistors,conn,linear,regul,74xx,cmos4000,adc-dac,memory,xilinx,special,microcontrollers,dsp,microchip,analog_switches,motorola,texas,intel,audio,interface,digital-audio,philips,display,cypress,siliconi,contrib,valves -EELAYER 23 0 +LIBS:power +LIBS:device +LIBS:transistors +LIBS:conn +LIBS:linear +LIBS:regul +LIBS:74xx +LIBS:cmos4000 +LIBS:adc-dac +LIBS:memory +LIBS:xilinx +LIBS:special +LIBS:microcontrollers +LIBS:dsp +LIBS:microchip +LIBS:analog_switches +LIBS:motorola +LIBS:texas +LIBS:intel +LIBS:audio +LIBS:interface +LIBS:digital-audio +LIBS:philips +LIBS:display +LIBS:cypress +LIBS:siliconi +LIBS:opto +LIBS:atmel +LIBS:flat_hierarchy-cache +EELAYER 24 0 EELAYER END -$Descr A4 11700 8267 +$Descr A4 11693 8268 +encoding utf-8 Sheet 2 3 Title "JDM - COM84 PIC Programmer with 13V DC/DC converter" Date "15 apr 2008" @@ -13,17 +42,17 @@ Comment2 "" Comment3 "" Comment4 "" $EndDescr -Text GLabel 2350 1900 0 60 Input +Text GLabel 2350 1900 0 60 Input ~ 0 VPP-MCLR -Text GLabel 2350 1700 0 60 Input +Text GLabel 2350 1700 0 60 Input ~ 0 CLOCK-RB6 -Text GLabel 2350 1500 0 60 Input +Text GLabel 2350 1500 0 60 Input ~ 0 DATA-RB7 -Text GLabel 2350 2150 0 60 Input +Text GLabel 2350 2150 0 60 Input ~ 0 VCC_PIC -Text Label 2550 2150 0 60 ~ +Text Label 2550 2150 0 60 ~ 0 VCC_PIC -Text Label 2450 3150 0 60 ~ +Text Label 2450 3150 0 60 ~ 0 VPP-MCLR Wire Wire Line 3700 7000 3700 6900 @@ -83,14 +112,16 @@ Wire Wire Line 3700 6900 4550 6900 Wire Wire Line 4550 6900 4550 7000 -Text Label 3950 6900 0 60 ~ +Text Label 3950 6900 0 60 ~ 0 VCC_PIC $Comp L GND #PWR01 U 1 1 4639BE2E P 4550 7400 -F 0 "#PWR01" H 4550 7400 30 0001 C C -F 1 "GND" H 4550 7330 30 0001 C C +F 0 "#PWR01" H 4550 7400 30 0001 C CNN +F 1 "GND" H 4550 7330 30 0001 C CNN +F 2 "" H 4550 7400 60 0001 C CNN +F 3 "" H 4550 7400 60 0001 C CNN 1 4550 7400 1 0 0 -1 $EndComp @@ -98,34 +129,40 @@ $Comp L C C8 U 1 1 4639BE2C P 4550 7200 -F 0 "C8" H 4600 7300 50 0000 L C -F 1 "100nF" H 4600 7100 50 0000 L C +F 0 "C8" H 4600 7300 50 0000 L CNN +F 1 "100nF" H 4600 7100 50 0000 L CNN +F 2 "" H 4550 7200 60 0001 C CNN +F 3 "" H 4550 7200 60 0001 C CNN 1 4550 7200 1 0 0 -1 $EndComp -Text Label 7650 5150 0 60 ~ +Text Label 7650 5150 0 60 ~ 0 VCC_PIC -Text Label 9900 4950 0 60 ~ +Text Label 9900 4950 0 60 ~ 0 VCC_PIC -Text Label 9650 2500 0 60 ~ +Text Label 9650 2500 0 60 ~ 0 VCC_PIC $Comp L GND #PWR02 U 1 1 442A8794 P 8450 5250 -F 0 "#PWR02" H 8450 5250 30 0001 C C -F 1 "GND" H 8450 5180 30 0001 C C +F 0 "#PWR02" H 8450 5250 30 0001 C CNN +F 1 "GND" H 8450 5180 30 0001 C CNN +F 2 "" H 8450 5250 60 0001 C CNN +F 3 "" H 8450 5250 60 0001 C CNN 1 8450 5250 0 1 1 0 $EndComp -Text Label 4300 4850 0 60 ~ +Text Label 4300 4850 0 60 ~ 0 VCC_PIC $Comp L GND #PWR03 U 1 1 443CCA5D P 8450 4850 -F 0 "#PWR03" H 8450 4850 30 0001 C C -F 1 "GND" H 8450 4780 30 0001 C C +F 0 "#PWR03" H 8450 4850 30 0001 C CNN +F 1 "GND" H 8450 4780 30 0001 C CNN +F 2 "" H 8450 4850 60 0001 C CNN +F 3 "" H 8450 4850 60 0001 C CNN 1 8450 4850 0 1 1 0 $EndComp @@ -155,8 +192,10 @@ $Comp L GND #PWR04 U 1 1 443697C7 P 9400 2600 -F 0 "#PWR04" H 9400 2600 30 0001 C C -F 1 "GND" H 9400 2530 30 0001 C C +F 0 "#PWR04" H 9400 2600 30 0001 C CNN +F 1 "GND" H 9400 2530 30 0001 C CNN +F 2 "" H 9400 2600 60 0001 C CNN +F 3 "" H 9400 2600 60 0001 C CNN 1 9400 2600 0 -1 -1 0 $EndComp @@ -164,23 +203,27 @@ $Comp L GND #PWR05 U 1 1 443697C3 P 8200 2400 -F 0 "#PWR05" H 8200 2400 30 0001 C C -F 1 "GND" H 8200 2330 30 0001 C C +F 0 "#PWR05" H 8200 2400 30 0001 C CNN +F 1 "GND" H 8200 2330 30 0001 C CNN +F 2 "" H 8200 2400 60 0001 C CNN +F 3 "" H 8200 2400 60 0001 C CNN 1 8200 2400 0 1 1 0 $EndComp -Text Label 9550 1800 0 60 ~ +Text Label 9550 1800 0 60 ~ 0 CLOCK-RB6 -Text Label 9550 1700 0 60 ~ +Text Label 9550 1700 0 60 ~ 0 DATA-RB7 -Text Label 7550 1700 0 60 ~ +Text Label 7550 1700 0 60 ~ 0 VPP-MCLR $Comp L SUPP28 P2 U 1 1 4436967E P 8800 2350 -F 0 "P2" H 8850 3150 70 0000 C C -F 1 "SUPP28" H 8800 1550 70 0000 C C +F 0 "P2" H 8850 3150 70 0000 C CNN +F 1 "SUPP28" H 8800 1550 70 0000 C CNN +F 2 "" H 8800 2350 60 0001 C CNN +F 3 "" H 8800 2350 60 0001 C CNN 1 8800 2350 1 0 0 -1 $EndComp @@ -188,8 +231,10 @@ $Comp L GND #PWR06 U 1 1 442AA147 P 3700 7400 -F 0 "#PWR06" H 3700 7400 30 0001 C C -F 1 "GND" H 3700 7330 30 0001 C C +F 0 "#PWR06" H 3700 7400 30 0001 C CNN +F 1 "GND" H 3700 7330 30 0001 C CNN +F 2 "" H 3700 7400 60 0001 C CNN +F 3 "" H 3700 7400 60 0001 C CNN 1 3700 7400 1 0 0 -1 $EndComp @@ -197,8 +242,10 @@ $Comp L C C7 U 1 1 442AA145 P 3700 7200 -F 0 "C7" H 3750 7300 50 0000 L C -F 1 "100nF" H 3750 7100 50 0000 L C +F 0 "C7" H 3750 7300 50 0000 L CNN +F 1 "100nF" H 3750 7100 50 0000 L CNN +F 2 "" H 3700 7200 60 0001 C CNN +F 3 "" H 3700 7200 60 0001 C CNN 1 3700 7200 1 0 0 -1 $EndComp @@ -206,8 +253,10 @@ $Comp L GND #PWR07 U 1 1 442AA138 P 2700 7400 -F 0 "#PWR07" H 2700 7400 30 0001 C C -F 1 "GND" H 2700 7330 30 0001 C C +F 0 "#PWR07" H 2700 7400 30 0001 C CNN +F 1 "GND" H 2700 7330 30 0001 C CNN +F 2 "" H 2700 7400 60 0001 C CNN +F 3 "" H 2700 7400 60 0001 C CNN 1 2700 7400 1 0 0 -1 $EndComp @@ -215,8 +264,10 @@ $Comp L VCC #PWR08 U 1 1 442AA134 P 2700 7000 -F 0 "#PWR08" H 2700 7100 30 0001 C C -F 1 "VCC" H 2700 7100 30 0000 C C +F 0 "#PWR08" H 2700 7100 30 0001 C CNN +F 1 "VCC" H 2700 7100 30 0000 C CNN +F 2 "" H 2700 7000 60 0001 C CNN +F 3 "" H 2700 7000 60 0001 C CNN 1 2700 7000 1 0 0 -1 $EndComp @@ -224,8 +275,10 @@ $Comp L C C6 U 1 1 442AA12B P 2700 7200 -F 0 "C6" H 2750 7300 50 0000 L C -F 1 "100nF" H 2750 7100 50 0000 L C +F 0 "C6" H 2750 7300 50 0000 L CNN +F 1 "100nF" H 2750 7100 50 0000 L CNN +F 2 "" H 2700 7200 60 0001 C CNN +F 3 "" H 2700 7200 60 0001 C CNN 1 2700 7200 1 0 0 -1 $EndComp @@ -265,8 +318,10 @@ $Comp L GND #PWR09 U 1 1 442A896A P 9650 5050 -F 0 "#PWR09" H 9650 5050 30 0001 C C -F 1 "GND" H 9650 4980 30 0001 C C +F 0 "#PWR09" H 9650 5050 30 0001 C CNN +F 1 "GND" H 9650 4980 30 0001 C CNN +F 2 "" H 9650 5050 60 0001 C CNN +F 3 "" H 9650 5050 60 0001 C CNN 1 9650 5050 0 -1 -1 0 $EndComp @@ -274,8 +329,10 @@ $Comp L SUPP40 P3 U 1 1 442A88ED P 9050 5100 -F 0 "P3" H 9100 6200 70 0000 C C -F 1 "SUPP40" H 8900 4000 70 0000 C C +F 0 "P3" H 9100 6200 70 0000 C CNN +F 1 "SUPP40" H 8900 4000 70 0000 C CNN +F 2 "" H 9050 5100 60 0001 C CNN +F 3 "" H 9050 5100 60 0001 C CNN 1 9050 5100 1 0 0 -1 $EndComp @@ -284,29 +341,33 @@ $Comp L GND #PWR010 U 1 1 442A8838 P 2950 1250 -F 0 "#PWR010" H 2950 1250 30 0001 C C -F 1 "GND" H 2950 1180 30 0001 C C +F 0 "#PWR010" H 2950 1250 30 0001 C CNN +F 1 "GND" H 2950 1180 30 0001 C CNN +F 2 "" H 2950 1250 60 0001 C CNN +F 3 "" H 2950 1250 60 0001 C CNN 1 2950 1250 1 0 0 -1 $EndComp -Text Label 4700 1400 0 60 ~ +Text Label 4700 1400 0 60 ~ 0 DATA-RB7 -Text Label 4700 1300 0 60 ~ +Text Label 4700 1300 0 60 ~ 0 CLOCK-RB6 $Comp L 24C16 U1 U 1 1 442A87F7 P 3850 1200 -F 0 "U1" H 4000 1550 60 0000 C C -F 1 "24Cxx" H 4050 850 60 0000 C C +F 0 "U1" H 4000 1550 60 0000 C CNN +F 1 "24Cxx" H 4050 850 60 0000 C CNN +F 2 "" H 3850 1200 60 0001 C CNN +F 3 "" H 3850 1200 60 0001 C CNN 1 3850 1200 1 0 0 -1 $EndComp -Text Label 9800 4250 0 60 ~ +Text Label 9800 4250 0 60 ~ 0 CLOCK-RB6 -Text Label 9800 4150 0 60 ~ +Text Label 9800 4150 0 60 ~ 0 DATA-RB7 -Text Label 7800 4150 0 60 ~ +Text Label 7800 4150 0 60 ~ 0 VPP-MCLR NoConn ~ 2500 4400 NoConn ~ 4050 5450 @@ -325,30 +386,34 @@ $Comp L PIC16F54 U5 U 1 1 442A81A7 P 3300 4850 -F 0 "U5" H 3600 5650 60 0000 C C -F 1 "PIC_18_PINS" H 3750 4050 60 0000 C C +F 0 "U5" H 3600 5650 60 0000 C CNN +F 1 "PIC_18_PINS" H 3750 4050 60 0000 C CNN +F 2 "" H 3300 4850 60 0001 C CNN +F 3 "" H 3300 4850 60 0001 C CNN 1 3300 4850 1 0 0 -1 $EndComp NoConn ~ 4550 3150 NoConn ~ 3100 2850 NoConn ~ 3100 2450 -Text Label 4200 5150 0 60 ~ +Text Label 4200 5150 0 60 ~ 0 CLOCK-RB6 -Text Label 4200 5000 0 60 ~ +Text Label 4200 5000 0 60 ~ 0 DATA-RB7 -Text Label 1850 4700 0 60 ~ +Text Label 1850 4700 0 60 ~ 0 VPP-MCLR -Text Label 4700 2850 0 60 ~ +Text Label 4700 2850 0 60 ~ 0 CLOCK-RB6 -Text Label 4700 2450 0 60 ~ +Text Label 4700 2450 0 60 ~ 0 DATA-RB7 $Comp L GND #PWR011 U 1 1 442A820F P 2300 4900 -F 0 "#PWR011" H 2300 4900 30 0001 C C -F 1 "GND" H 2300 4830 30 0001 C C +F 0 "#PWR011" H 2300 4900 30 0001 C CNN +F 1 "GND" H 2300 4830 30 0001 C CNN +F 2 "" H 2300 4900 60 0001 C CNN +F 3 "" H 2300 4900 60 0001 C CNN 1 2300 4900 1 0 0 -1 $EndComp @@ -356,8 +421,10 @@ $Comp L GND #PWR012 U 1 1 442A8205 P 4550 2150 -F 0 "#PWR012" H 4550 2150 30 0001 C C -F 1 "GND" H 4550 2080 30 0001 C C +F 0 "#PWR012" H 4550 2150 30 0001 C CNN +F 1 "GND" H 4550 2080 30 0001 C CNN +F 2 "" H 4550 2150 60 0001 C CNN +F 3 "" H 4550 2150 60 0001 C CNN 1 4550 2150 0 -1 -1 0 $EndComp @@ -365,9 +432,33 @@ $Comp L PIC12C508A U6 U 1 1 442A81A5 P 3850 2650 -F 0 "U6" H 3800 3350 60 0000 C C -F 1 "PIC_8_PINS" H 3850 1950 60 0000 C C +F 0 "U6" H 3800 3350 60 0000 C CNN +F 1 "PIC_8_PINS" H 3850 1950 60 0000 C CNN +F 2 "" H 3850 2650 60 0001 C CNN +F 3 "" H 3850 2650 60 0001 C CNN 1 3850 2650 1 0 0 -1 $EndComp +$Comp +L VCC #PWR013 +U 1 1 53B84749 +P 3850 700 +F 0 "#PWR013" H 3850 800 30 0001 C CNN +F 1 "VCC" H 3850 800 30 0000 C CNN +F 2 "" H 3850 700 60 0001 C CNN +F 3 "" H 3850 700 60 0001 C CNN + 1 3850 700 + 1 0 0 -1 +$EndComp +$Comp +L GND #PWR014 +U 1 1 53B847AC +P 3850 1700 +F 0 "#PWR014" H 3850 1700 30 0001 C CNN +F 1 "GND" H 3850 1630 30 0001 C CNN +F 2 "" H 3850 1700 60 0001 C CNN +F 3 "" H 3850 1700 60 0001 C CNN + 1 3850 1700 + 1 0 0 -1 +$EndComp $EndSCHEMATC diff --git a/demos/kit-dev-coldfire-xilinx_5213/kit-dev-coldfire-xilinx_5213-cache.dcm b/demos/kit-dev-coldfire-xilinx_5213/kit-dev-coldfire-xilinx_5213-cache.dcm deleted file mode 100644 index bab0584362..0000000000 --- a/demos/kit-dev-coldfire-xilinx_5213/kit-dev-coldfire-xilinx_5213-cache.dcm +++ /dev/null @@ -1,105 +0,0 @@ -EESchema-DOCLIB Version 2.0 05/07/2009 12:03:24 -# -$CMP 74LS125 -D Quad buffer 3 State out -K TTL buffer 3State -$ENDCMP -# -$CMP C -D Condensateur non polarise -$ENDCMP -# -$CMP CONN_1 -D 1 pin -K CONN -$ENDCMP -# -$CMP CONN_2 -D Symbole general de connecteur -K CONN -$ENDCMP -# -$CMP CONN_2X2 -D Symbole general de connecteur -K CONN -$ENDCMP -# -$CMP CONN_3 -D Symbole general de connecteur -K CONN -$ENDCMP -# -$CMP CONN_4X2 -D Symbole general de connecteur -K CONN -$ENDCMP -# -$CMP CONN_6 -D ymbole general de connecteur -K CONN -$ENDCMP -# -$CMP CP -D Condensateur polarise -$ENDCMP -# -$CMP DB9 -K CONN -$ENDCMP -# -$CMP DIODE -D Diode simple -K DEV DIODE -$ENDCMP -# -$CMP LED -K LED -$ENDCMP -# -$CMP LT1129_QPACK -D LowDrop Linear Regulator (QPACK 5 pins) -K REGUL POWER -F linear-tec/lt1129.pdf -$ENDCMP -# -$CMP MAX232 -D Driver de Ligne RS232 -K RS232 -F maxim/MAX220-MAX249.pdf -$ENDCMP -# -$CMP MC34064P -D Undervoltage sensing circuit (TP-226AA package) -F onsemi/mc34064.pdf -$ENDCMP -# -$CMP MCF5213-LQFP100 -D Coldfire with SRAM and Flash Eprom - LQFP100 package -K COLDFIRE -$ENDCMP -# -$CMP PCA82C251 -D CAN Transceiver -K BUS CAN -$ENDCMP -# -$CMP PNP -F transistors/bipolar/*.* -$ENDCMP -# -$CMP R -D Resistance -K R DEV -$ENDCMP -# -$CMP SW_PUSH -D Push Button -K Switch -$ENDCMP -# -$CMP SWITCH_INV -D Switch inverseur -K switch -$ENDCMP -# -#End Doc Library diff --git a/demos/kit-dev-coldfire-xilinx_5213/kit-dev-coldfire-xilinx_5213-cache.lib b/demos/kit-dev-coldfire-xilinx_5213/kit-dev-coldfire-xilinx_5213-cache.lib index 98c908d55a..1dcd3f6883 100644 --- a/demos/kit-dev-coldfire-xilinx_5213/kit-dev-coldfire-xilinx_5213-cache.lib +++ b/demos/kit-dev-coldfire-xilinx_5213/kit-dev-coldfire-xilinx_5213-cache.lib @@ -835,21 +835,6 @@ X ~ 2 0 -250 100 U 60 60 1 1 P ENDDRAW ENDDEF # -# SW_PUSH -# -DEF SW_PUSH SW 0 40 N N 1 F N -F0 "SW" 150 110 50 H V C CNN -F1 "SW_PUSH" 0 -80 50 H V C CNN -F2 "" 0 0 60 H V C CNN -F3 "" 0 0 60 H V C CNN -DRAW -S -170 50 170 60 0 1 0 N -P 4 0 1 0 -40 60 -30 90 30 90 40 60 N -X 1 1 -300 0 200 R 60 60 0 1 P I -X 2 2 300 0 200 L 60 60 0 1 P I -ENDDRAW -ENDDEF -# # SWITCH_INV # DEF SWITCH_INV SW 0 0 N Y 1 F N @@ -868,6 +853,21 @@ X 3 3 500 -100 300 L 60 60 1 1 P ENDDRAW ENDDEF # +# SW_PUSH +# +DEF SW_PUSH SW 0 40 N N 1 F N +F0 "SW" 150 110 50 H V C CNN +F1 "SW_PUSH" 0 -80 50 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +DRAW +S -170 50 170 60 0 1 0 N +P 4 0 1 0 -40 60 -30 90 30 90 40 60 N +X 1 1 -300 0 200 R 60 60 0 1 P I +X 2 2 300 0 200 L 60 60 0 1 P I +ENDDRAW +ENDDEF +# # VCC # DEF VCC #PWR 0 0 Y Y 1 F P diff --git a/demos/kit-dev-coldfire-xilinx_5213/kit-dev-coldfire-xilinx_5213.kicad_pcb b/demos/kit-dev-coldfire-xilinx_5213/kit-dev-coldfire-xilinx_5213.kicad_pcb index ca100408b2..3edd909494 100644 --- a/demos/kit-dev-coldfire-xilinx_5213/kit-dev-coldfire-xilinx_5213.kicad_pcb +++ b/demos/kit-dev-coldfire-xilinx_5213/kit-dev-coldfire-xilinx_5213.kicad_pcb @@ -1,9 +1,9 @@ -(kicad_pcb (version 3) (host pcbnew "(2014-01-22 BZR 4630)-product") +(kicad_pcb (version 4) (host pcbnew "(2014-07-04 BZR 4974)-product") (general (links 534) (no_connects 0) - (area 70.929499 55.689499 228.790501 147.510501) + (area 65.582458 36.771599 237.49 147.510501) (thickness 1.6) (drawings 7) (tracks 3535) @@ -14,23 +14,23 @@ (page A4) (layers - (15 Composant signal) - (2 GND_layer power) - (1 3.3V_layer power) - (0 Cuivre signal) - (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 Edge.Cuts user) + (0 Composant signal) + (1 GND_layer power) + (2 3.3V_layer power) + (31 Cuivre signal) + (32 B.Adhes user) + (33 F.Adhes user) + (34 B.Paste user) + (35 F.Paste user) + (36 B.SilkS user) + (37 F.SilkS user) + (38 B.Mask user) + (39 F.Mask user) + (40 Dwgs.User user) + (41 Cmts.User user) + (42 Eco1.User user) + (43 Eco2.User user) + (44 Edge.Cuts user) ) (setup @@ -58,17 +58,18 @@ (pad_size 0.4064 1.27) (pad_drill 0) (pad_to_mask_clearance 0.2) - (aux_axis_origin 81.153 -122.301) + (aux_axis_origin 63.7 155.6) (visible_elements 7FFFFFFF) (pcbplotparams - (layerselection 3178497) - (usegerberextensions true) + (layerselection 0x010fc_80000007) + (usegerberextensions false) + (usegerberattributes true) (excludeedgelayer true) (linewidth 0.150000) (plotframeref false) (viasonmask false) (mode 1) - (useauxorigin false) + (useauxorigin true) (hpglpennumber 1) (hpglpenspeed 20) (hpglpendiameter 15) @@ -77,15 +78,14 @@ (psa4output false) (plotreference true) (plotvalue true) - (plotothertext true) (plotinvisibletext false) (padsonsilk false) (subtractmaskfromsilk false) (outputformat 1) (mirror false) - (drillshape 1) + (drillshape 0) (scaleselection 1) - (outputdirectory "")) + (outputdirectory plots)) ) (net 0 "") @@ -375,7 +375,6 @@ (via_drill 0.3) (uvia_dia 0.2) (uvia_drill 0.1) - (add_net "") (add_net /ALLPST) (add_net /AN0) (add_net /AN1) @@ -6184,3540 +6183,3540 @@ (gr_line (start 228.6 55.88) (end 228.6 147.32) (angle 90) (layer Edge.Cuts) (width 0.381)) (segment (start 152.019 102.489) (end 143.129 102.4636) (width 0.254) (layer Composant) (net 1) (status C00)) - (segment (start 134.239 122.428) (end 134.239 114.808) (width 0.254) (layer 3.3V_layer) (net 2)) - (segment (start 137.414 125.603) (end 134.239 122.428) (width 0.254) (layer 3.3V_layer) (net 2)) - (segment (start 143.383 125.603) (end 137.414 125.603) (width 0.254) (layer 3.3V_layer) (net 2)) - (segment (start 134.239 114.808) (end 132.334 112.903) (width 0.254) (layer 3.3V_layer) (net 2)) - (segment (start 132.334 112.903) (end 132.334 105.41) (width 0.254) (layer 3.3V_layer) (net 2)) - (via (at 131.318 104.902) (size 0.635) (layers Composant Cuivre) (net 2)) - (segment (start 131.826 104.902) (end 131.318 104.902) (width 0.254) (layer 3.3V_layer) (net 2)) - (segment (start 172.974 135.509) (end 165.735 128.27) (width 0.254) (layer 3.3V_layer) (net 2)) - (segment (start 131.318 104.902) (end 131.191 104.521) (width 0.254) (layer Composant) (net 2)) - (segment (start 131.191 104.521) (end 130.81 104.14) (width 0.254) (layer Composant) (net 2)) - (segment (start 130.81 104.14) (end 129.286 104.14) (width 0.254) (layer Composant) (net 2)) - (segment (start 129.286 104.14) (end 129.0574 103.9622) (width 0.254) (layer Composant) (net 2)) - (segment (start 129.0574 103.9622) (end 127.635 103.9876) (width 0.254) (layer Composant) (net 2) (status 400)) - (segment (start 172.974 138.176) (end 172.974 135.509) (width 0.254) (layer 3.3V_layer) (net 2)) - (segment (start 132.334 105.41) (end 131.826 104.902) (width 0.254) (layer 3.3V_layer) (net 2)) - (segment (start 165.735 128.27) (end 146.05 128.27) (width 0.254) (layer 3.3V_layer) (net 2)) - (segment (start 146.05 128.27) (end 143.383 125.603) (width 0.254) (layer 3.3V_layer) (net 2)) (segment (start 174.244 139.446) (end 172.974 138.176) (width 0.254) (layer 3.3V_layer) (net 2) (status 800)) - (segment (start 131.826 106.045) (end 131.826 113.919) (width 0.254) (layer 3.3V_layer) (net 3)) - (segment (start 170.434 136.271) (end 170.434 138.176) (width 0.254) (layer 3.3V_layer) (net 3)) - (segment (start 127.635 104.4702) (end 128.9304 104.4702) (width 0.254) (layer Composant) (net 3) (status 800)) - (segment (start 128.9304 104.4702) (end 129.159 104.648) (width 0.254) (layer Composant) (net 3)) - (segment (start 129.159 104.648) (end 130.048 104.648) (width 0.254) (layer Composant) (net 3)) - (segment (start 130.048 104.648) (end 130.429 104.902) (width 0.254) (layer Composant) (net 3)) - (segment (start 130.429 104.902) (end 130.429 105.41) (width 0.254) (layer 3.3V_layer) (net 3)) - (segment (start 130.429 105.41) (end 130.683 105.664) (width 0.254) (layer 3.3V_layer) (net 3)) - (segment (start 130.683 105.664) (end 131.445 105.664) (width 0.254) (layer 3.3V_layer) (net 3)) - (segment (start 131.445 105.664) (end 131.826 106.045) (width 0.254) (layer 3.3V_layer) (net 3)) - (via (at 130.429 104.902) (size 0.635) (layers Composant Cuivre) (net 3)) - (segment (start 163.576 129.413) (end 170.434 136.271) (width 0.254) (layer 3.3V_layer) (net 3)) - (segment (start 144.78 129.413) (end 163.576 129.413) (width 0.254) (layer 3.3V_layer) (net 3)) - (segment (start 143.51 128.143) (end 144.78 129.413) (width 0.254) (layer 3.3V_layer) (net 3)) - (segment (start 138.684 128.143) (end 143.51 128.143) (width 0.254) (layer 3.3V_layer) (net 3)) - (segment (start 133.35 122.809) (end 138.684 128.143) (width 0.254) (layer 3.3V_layer) (net 3)) - (segment (start 133.35 115.443) (end 133.35 122.809) (width 0.254) (layer 3.3V_layer) (net 3)) - (segment (start 131.826 113.919) (end 133.35 115.443) (width 0.254) (layer 3.3V_layer) (net 3)) + (segment (start 146.05 128.27) (end 143.383 125.603) (width 0.254) (layer 3.3V_layer) (net 2)) + (segment (start 165.735 128.27) (end 146.05 128.27) (width 0.254) (layer 3.3V_layer) (net 2)) + (segment (start 132.334 105.41) (end 131.826 104.902) (width 0.254) (layer 3.3V_layer) (net 2)) + (segment (start 172.974 138.176) (end 172.974 135.509) (width 0.254) (layer 3.3V_layer) (net 2)) + (segment (start 129.0574 103.9622) (end 127.635 103.9876) (width 0.254) (layer Composant) (net 2) (status 400)) + (segment (start 129.286 104.14) (end 129.0574 103.9622) (width 0.254) (layer Composant) (net 2)) + (segment (start 130.81 104.14) (end 129.286 104.14) (width 0.254) (layer Composant) (net 2)) + (segment (start 131.191 104.521) (end 130.81 104.14) (width 0.254) (layer Composant) (net 2)) + (segment (start 131.318 104.902) (end 131.191 104.521) (width 0.254) (layer Composant) (net 2)) + (segment (start 172.974 135.509) (end 165.735 128.27) (width 0.254) (layer 3.3V_layer) (net 2)) + (segment (start 131.826 104.902) (end 131.318 104.902) (width 0.254) (layer 3.3V_layer) (net 2)) + (via (at 131.318 104.902) (size 0.635) (layers Composant Cuivre) (net 2)) + (segment (start 132.334 112.903) (end 132.334 105.41) (width 0.254) (layer 3.3V_layer) (net 2)) + (segment (start 134.239 114.808) (end 132.334 112.903) (width 0.254) (layer 3.3V_layer) (net 2)) + (segment (start 143.383 125.603) (end 137.414 125.603) (width 0.254) (layer 3.3V_layer) (net 2)) + (segment (start 137.414 125.603) (end 134.239 122.428) (width 0.254) (layer 3.3V_layer) (net 2)) + (segment (start 134.239 122.428) (end 134.239 114.808) (width 0.254) (layer 3.3V_layer) (net 2)) (segment (start 170.434 138.176) (end 171.704 139.446) (width 0.254) (layer 3.3V_layer) (net 3) (status 400)) - (segment (start 131.826 104.14) (end 132.842 105.156) (width 0.254) (layer 3.3V_layer) (net 4)) - (segment (start 129.54 105.41) (end 129.54 104.521) (width 0.254) (layer 3.3V_layer) (net 4)) - (via (at 129.54 105.41) (size 0.635) (layers Composant Cuivre) (net 4)) - (segment (start 129.032 105.156) (end 128.8034 104.9782) (width 0.254) (layer Composant) (net 4)) - (segment (start 129.54 105.41) (end 129.032 105.156) (width 0.254) (layer Composant) (net 4)) - (segment (start 129.921 104.14) (end 131.826 104.14) (width 0.254) (layer 3.3V_layer) (net 4)) - (segment (start 132.842 105.156) (end 132.842 111.887) (width 0.254) (layer 3.3V_layer) (net 4)) - (segment (start 132.842 111.887) (end 134.874 113.919) (width 0.254) (layer 3.3V_layer) (net 4)) - (segment (start 134.874 113.919) (end 134.874 121.539) (width 0.254) (layer 3.3V_layer) (net 4)) - (segment (start 134.874 121.539) (end 136.398 123.063) (width 0.254) (layer 3.3V_layer) (net 4)) - (segment (start 136.398 123.063) (end 143.383 123.063) (width 0.254) (layer 3.3V_layer) (net 4)) - (segment (start 143.383 123.063) (end 146.812 126.492) (width 0.254) (layer 3.3V_layer) (net 4)) - (segment (start 146.812 126.492) (end 168.402 126.492) (width 0.254) (layer 3.3V_layer) (net 4)) - (segment (start 168.402 126.492) (end 175.514 133.604) (width 0.254) (layer 3.3V_layer) (net 4)) - (segment (start 175.514 133.604) (end 175.514 140.208) (width 0.254) (layer 3.3V_layer) (net 4)) - (segment (start 175.514 140.208) (end 174.879 140.843) (width 0.254) (layer 3.3V_layer) (net 4)) - (segment (start 174.879 140.843) (end 170.561 140.843) (width 0.254) (layer 3.3V_layer) (net 4)) - (segment (start 170.561 140.843) (end 169.164 139.446) (width 0.254) (layer 3.3V_layer) (net 4) (status 400)) - (segment (start 128.8034 104.9782) (end 127.635 104.9782) (width 0.254) (layer Composant) (net 4) (status 400)) + (segment (start 131.826 113.919) (end 133.35 115.443) (width 0.254) (layer 3.3V_layer) (net 3)) + (segment (start 133.35 115.443) (end 133.35 122.809) (width 0.254) (layer 3.3V_layer) (net 3)) + (segment (start 133.35 122.809) (end 138.684 128.143) (width 0.254) (layer 3.3V_layer) (net 3)) + (segment (start 138.684 128.143) (end 143.51 128.143) (width 0.254) (layer 3.3V_layer) (net 3)) + (segment (start 143.51 128.143) (end 144.78 129.413) (width 0.254) (layer 3.3V_layer) (net 3)) + (segment (start 144.78 129.413) (end 163.576 129.413) (width 0.254) (layer 3.3V_layer) (net 3)) + (segment (start 163.576 129.413) (end 170.434 136.271) (width 0.254) (layer 3.3V_layer) (net 3)) + (via (at 130.429 104.902) (size 0.635) (layers Composant Cuivre) (net 3)) + (segment (start 131.445 105.664) (end 131.826 106.045) (width 0.254) (layer 3.3V_layer) (net 3)) + (segment (start 130.683 105.664) (end 131.445 105.664) (width 0.254) (layer 3.3V_layer) (net 3)) + (segment (start 130.429 105.41) (end 130.683 105.664) (width 0.254) (layer 3.3V_layer) (net 3)) + (segment (start 130.429 104.902) (end 130.429 105.41) (width 0.254) (layer 3.3V_layer) (net 3)) + (segment (start 130.048 104.648) (end 130.429 104.902) (width 0.254) (layer Composant) (net 3)) + (segment (start 129.159 104.648) (end 130.048 104.648) (width 0.254) (layer Composant) (net 3)) + (segment (start 128.9304 104.4702) (end 129.159 104.648) (width 0.254) (layer Composant) (net 3)) + (segment (start 127.635 104.4702) (end 128.9304 104.4702) (width 0.254) (layer Composant) (net 3) (status 800)) + (segment (start 170.434 136.271) (end 170.434 138.176) (width 0.254) (layer 3.3V_layer) (net 3)) + (segment (start 131.826 106.045) (end 131.826 113.919) (width 0.254) (layer 3.3V_layer) (net 3)) (segment (start 129.54 104.521) (end 129.921 104.14) (width 0.254) (layer 3.3V_layer) (net 4)) - (segment (start 128.651 104.394) (end 129.413 103.632) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 129.413 103.632) (end 132.207 103.632) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 133.35 110.998) (end 135.509 113.157) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 133.35 104.775) (end 133.35 110.998) (width 0.254) (layer 3.3V_layer) (net 5)) - (via (at 129.54 106.299) (size 0.635) (layers Composant Cuivre) (net 5)) - (segment (start 165.481 124.841) (end 167.005 123.317) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 167.005 123.317) (end 169.672 123.317) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 169.672 123.317) (end 170.815 124.46) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 170.815 124.46) (end 170.815 126.365) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 170.815 126.365) (end 178.054 133.604) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 178.054 133.604) (end 178.054 140.462) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 178.054 140.462) (end 176.911 141.605) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 176.911 141.605) (end 168.783 141.605) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 132.207 103.632) (end 133.35 104.775) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 168.783 141.605) (end 166.624 139.446) (width 0.254) (layer 3.3V_layer) (net 5) (status 400)) - (segment (start 127.635 105.4862) (end 128.6764 105.4862) (width 0.254) (layer Composant) (net 5) (status 800)) - (segment (start 128.6764 105.4862) (end 128.905 105.664) (width 0.254) (layer Composant) (net 5)) - (segment (start 128.905 105.664) (end 129.032 105.918) (width 0.254) (layer Composant) (net 5)) - (segment (start 129.032 105.918) (end 129.54 106.299) (width 0.254) (layer Composant) (net 5)) - (segment (start 128.651 105.918) (end 128.651 104.394) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 129.032 106.299) (end 128.651 105.918) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 129.54 106.299) (end 129.032 106.299) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 135.509 113.157) (end 135.509 120.904) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 135.509 120.904) (end 136.017 121.412) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 136.017 121.412) (end 138.303 121.412) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 138.303 121.412) (end 139.192 120.523) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 139.192 120.523) (end 143.764 120.523) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 143.764 120.523) (end 145.796 122.555) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 145.796 122.555) (end 145.796 123.571) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 145.796 123.571) (end 146.939 124.714) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 146.939 124.714) (end 165.481 124.714) (width 0.254) (layer 3.3V_layer) (net 5)) + (segment (start 128.8034 104.9782) (end 127.635 104.9782) (width 0.254) (layer Composant) (net 4) (status 400)) + (segment (start 170.561 140.843) (end 169.164 139.446) (width 0.254) (layer 3.3V_layer) (net 4) (status 400)) + (segment (start 174.879 140.843) (end 170.561 140.843) (width 0.254) (layer 3.3V_layer) (net 4)) + (segment (start 175.514 140.208) (end 174.879 140.843) (width 0.254) (layer 3.3V_layer) (net 4)) + (segment (start 175.514 133.604) (end 175.514 140.208) (width 0.254) (layer 3.3V_layer) (net 4)) + (segment (start 168.402 126.492) (end 175.514 133.604) (width 0.254) (layer 3.3V_layer) (net 4)) + (segment (start 146.812 126.492) (end 168.402 126.492) (width 0.254) (layer 3.3V_layer) (net 4)) + (segment (start 143.383 123.063) (end 146.812 126.492) (width 0.254) (layer 3.3V_layer) (net 4)) + (segment (start 136.398 123.063) (end 143.383 123.063) (width 0.254) (layer 3.3V_layer) (net 4)) + (segment (start 134.874 121.539) (end 136.398 123.063) (width 0.254) (layer 3.3V_layer) (net 4)) + (segment (start 134.874 113.919) (end 134.874 121.539) (width 0.254) (layer 3.3V_layer) (net 4)) + (segment (start 132.842 111.887) (end 134.874 113.919) (width 0.254) (layer 3.3V_layer) (net 4)) + (segment (start 132.842 105.156) (end 132.842 111.887) (width 0.254) (layer 3.3V_layer) (net 4)) + (segment (start 129.921 104.14) (end 131.826 104.14) (width 0.254) (layer 3.3V_layer) (net 4)) + (segment (start 129.54 105.41) (end 129.032 105.156) (width 0.254) (layer Composant) (net 4)) + (segment (start 129.032 105.156) (end 128.8034 104.9782) (width 0.254) (layer Composant) (net 4)) + (via (at 129.54 105.41) (size 0.635) (layers Composant Cuivre) (net 4)) + (segment (start 129.54 105.41) (end 129.54 104.521) (width 0.254) (layer 3.3V_layer) (net 4)) + (segment (start 131.826 104.14) (end 132.842 105.156) (width 0.254) (layer 3.3V_layer) (net 4)) (segment (start 165.481 124.714) (end 165.481 124.841) (width 0.254) (layer 3.3V_layer) (net 5)) - (via (at 131.064 106.426) (size 0.635) (layers Composant Cuivre) (net 6)) - (segment (start 130.8862 107.6198) (end 130.8862 109.22) (width 0.254) (layer Composant) (net 6) (status 400)) - (segment (start 162.814 138.176) (end 162.814 136.271) (width 0.254) (layer 3.3V_layer) (net 6)) - (segment (start 162.814 136.271) (end 157.226 130.683) (width 0.254) (layer 3.3V_layer) (net 6)) - (segment (start 157.226 130.683) (end 139.573 130.683) (width 0.254) (layer 3.3V_layer) (net 6)) - (segment (start 139.573 130.683) (end 132.461 123.571) (width 0.254) (layer 3.3V_layer) (net 6)) - (segment (start 132.461 123.571) (end 132.461 116.205) (width 0.254) (layer 3.3V_layer) (net 6)) - (segment (start 130.937 114.681) (end 132.461 116.205) (width 0.254) (layer 3.3V_layer) (net 6)) - (segment (start 130.937 107.061) (end 130.937 114.681) (width 0.254) (layer 3.3V_layer) (net 6)) - (segment (start 131.064 106.934) (end 131.064 106.426) (width 0.254) (layer 3.3V_layer) (net 6)) - (segment (start 130.937 107.061) (end 131.064 106.934) (width 0.254) (layer 3.3V_layer) (net 6)) - (segment (start 131.064 107.442) (end 131.064 106.426) (width 0.254) (layer Composant) (net 6)) - (segment (start 130.8862 107.6198) (end 131.064 107.442) (width 0.254) (layer Composant) (net 6)) + (segment (start 146.939 124.714) (end 165.481 124.714) (width 0.254) (layer 3.3V_layer) (net 5)) + (segment (start 145.796 123.571) (end 146.939 124.714) (width 0.254) (layer 3.3V_layer) (net 5)) + (segment (start 145.796 122.555) (end 145.796 123.571) (width 0.254) (layer 3.3V_layer) (net 5)) + (segment (start 143.764 120.523) (end 145.796 122.555) (width 0.254) (layer 3.3V_layer) (net 5)) + (segment (start 139.192 120.523) (end 143.764 120.523) (width 0.254) (layer 3.3V_layer) (net 5)) + (segment (start 138.303 121.412) (end 139.192 120.523) (width 0.254) (layer 3.3V_layer) (net 5)) + (segment (start 136.017 121.412) (end 138.303 121.412) (width 0.254) (layer 3.3V_layer) (net 5)) + (segment (start 135.509 120.904) (end 136.017 121.412) (width 0.254) (layer 3.3V_layer) (net 5)) + (segment (start 135.509 113.157) (end 135.509 120.904) (width 0.254) (layer 3.3V_layer) (net 5)) + (segment (start 129.54 106.299) (end 129.032 106.299) (width 0.254) (layer 3.3V_layer) (net 5)) + (segment (start 129.032 106.299) (end 128.651 105.918) (width 0.254) (layer 3.3V_layer) (net 5)) + (segment (start 128.651 105.918) (end 128.651 104.394) (width 0.254) (layer 3.3V_layer) (net 5)) + (segment (start 129.032 105.918) (end 129.54 106.299) (width 0.254) (layer Composant) (net 5)) + (segment (start 128.905 105.664) (end 129.032 105.918) (width 0.254) (layer Composant) (net 5)) + (segment (start 128.6764 105.4862) (end 128.905 105.664) (width 0.254) (layer Composant) (net 5)) + (segment (start 127.635 105.4862) (end 128.6764 105.4862) (width 0.254) (layer Composant) (net 5) (status 800)) + (segment (start 168.783 141.605) (end 166.624 139.446) (width 0.254) (layer 3.3V_layer) (net 5) (status 400)) + (segment (start 132.207 103.632) (end 133.35 104.775) (width 0.254) (layer 3.3V_layer) (net 5)) + (segment (start 176.911 141.605) (end 168.783 141.605) (width 0.254) (layer 3.3V_layer) (net 5)) + (segment (start 178.054 140.462) (end 176.911 141.605) (width 0.254) (layer 3.3V_layer) (net 5)) + (segment (start 178.054 133.604) (end 178.054 140.462) (width 0.254) (layer 3.3V_layer) (net 5)) + (segment (start 170.815 126.365) (end 178.054 133.604) (width 0.254) (layer 3.3V_layer) (net 5)) + (segment (start 170.815 124.46) (end 170.815 126.365) (width 0.254) (layer 3.3V_layer) (net 5)) + (segment (start 169.672 123.317) (end 170.815 124.46) (width 0.254) (layer 3.3V_layer) (net 5)) + (segment (start 167.005 123.317) (end 169.672 123.317) (width 0.254) (layer 3.3V_layer) (net 5)) + (segment (start 165.481 124.841) (end 167.005 123.317) (width 0.254) (layer 3.3V_layer) (net 5)) + (via (at 129.54 106.299) (size 0.635) (layers Composant Cuivre) (net 5)) + (segment (start 133.35 104.775) (end 133.35 110.998) (width 0.254) (layer 3.3V_layer) (net 5)) + (segment (start 133.35 110.998) (end 135.509 113.157) (width 0.254) (layer 3.3V_layer) (net 5)) + (segment (start 129.413 103.632) (end 132.207 103.632) (width 0.254) (layer 3.3V_layer) (net 5)) + (segment (start 128.651 104.394) (end 129.413 103.632) (width 0.254) (layer 3.3V_layer) (net 5)) (segment (start 164.084 139.446) (end 162.814 138.176) (width 0.254) (layer 3.3V_layer) (net 6) (status 800)) - (via (at 130.048 107.188) (size 0.889) (layers Composant Cuivre) (net 7)) - (segment (start 161.544 139.446) (end 160.274 138.176) (width 0.254) (layer 3.3V_layer) (net 7) (status 800)) - (segment (start 160.274 136.271) (end 155.829 131.826) (width 0.254) (layer 3.3V_layer) (net 7)) - (segment (start 155.829 131.826) (end 139.319 131.826) (width 0.254) (layer 3.3V_layer) (net 7)) - (segment (start 139.319 131.826) (end 131.699 124.206) (width 0.254) (layer 3.3V_layer) (net 7)) - (segment (start 131.699 124.206) (end 131.699 117.221) (width 0.254) (layer 3.3V_layer) (net 7)) - (segment (start 160.274 138.176) (end 160.274 136.271) (width 0.254) (layer 3.3V_layer) (net 7)) - (segment (start 130.175 115.697) (end 131.699 117.221) (width 0.254) (layer 3.3V_layer) (net 7)) - (segment (start 130.3782 109.22) (end 130.3782 107.7468) (width 0.254) (layer Composant) (net 7) (status 800)) - (segment (start 130.3782 107.7468) (end 130.048 107.188) (width 0.254) (layer Composant) (net 7)) - (segment (start 130.175 107.315) (end 130.175 115.697) (width 0.254) (layer 3.3V_layer) (net 7)) + (segment (start 130.8862 107.6198) (end 131.064 107.442) (width 0.254) (layer Composant) (net 6)) + (segment (start 131.064 107.442) (end 131.064 106.426) (width 0.254) (layer Composant) (net 6)) + (segment (start 130.937 107.061) (end 131.064 106.934) (width 0.254) (layer 3.3V_layer) (net 6)) + (segment (start 131.064 106.934) (end 131.064 106.426) (width 0.254) (layer 3.3V_layer) (net 6)) + (segment (start 130.937 107.061) (end 130.937 114.681) (width 0.254) (layer 3.3V_layer) (net 6)) + (segment (start 130.937 114.681) (end 132.461 116.205) (width 0.254) (layer 3.3V_layer) (net 6)) + (segment (start 132.461 123.571) (end 132.461 116.205) (width 0.254) (layer 3.3V_layer) (net 6)) + (segment (start 139.573 130.683) (end 132.461 123.571) (width 0.254) (layer 3.3V_layer) (net 6)) + (segment (start 157.226 130.683) (end 139.573 130.683) (width 0.254) (layer 3.3V_layer) (net 6)) + (segment (start 162.814 136.271) (end 157.226 130.683) (width 0.254) (layer 3.3V_layer) (net 6)) + (segment (start 162.814 138.176) (end 162.814 136.271) (width 0.254) (layer 3.3V_layer) (net 6)) + (segment (start 130.8862 107.6198) (end 130.8862 109.22) (width 0.254) (layer Composant) (net 6) (status 400)) + (via (at 131.064 106.426) (size 0.635) (layers Composant Cuivre) (net 6)) (segment (start 130.175 107.315) (end 130.048 107.188) (width 0.254) (layer 3.3V_layer) (net 7)) - (segment (start 129.87528 110.15472) (end 129.8956 109.22) (width 0.254) (layer Composant) (net 8) (status 400)) - (segment (start 159.004 139.446) (end 159.004 139.319) (width 0.254) (layer Cuivre) (net 8) (status 800)) - (segment (start 129.413 110.617) (end 129.87528 110.15472) (width 0.254) (layer Composant) (net 8)) - (segment (start 129.413 110.998) (end 129.413 110.617) (width 0.254) (layer Composant) (net 8)) - (segment (start 129.159 123.19) (end 129.159 112.014) (width 0.254) (layer Cuivre) (net 8)) - (segment (start 138.43 132.461) (end 129.159 123.19) (width 0.254) (layer Cuivre) (net 8)) - (segment (start 154.178 132.461) (end 138.43 132.461) (width 0.254) (layer Cuivre) (net 8)) - (segment (start 157.734 136.017) (end 154.178 132.461) (width 0.254) (layer Cuivre) (net 8)) - (segment (start 157.734 138.049) (end 157.734 136.017) (width 0.254) (layer Cuivre) (net 8)) - (segment (start 159.004 139.319) (end 157.734 138.049) (width 0.254) (layer Cuivre) (net 8)) - (segment (start 129.159 112.014) (end 129.159 111.252) (width 0.254) (layer Composant) (net 8)) - (segment (start 129.159 111.252) (end 129.413 110.998) (width 0.254) (layer Composant) (net 8)) + (segment (start 130.175 107.315) (end 130.175 115.697) (width 0.254) (layer 3.3V_layer) (net 7)) + (segment (start 130.3782 107.7468) (end 130.048 107.188) (width 0.254) (layer Composant) (net 7)) + (segment (start 130.3782 109.22) (end 130.3782 107.7468) (width 0.254) (layer Composant) (net 7) (status 800)) + (segment (start 130.175 115.697) (end 131.699 117.221) (width 0.254) (layer 3.3V_layer) (net 7)) + (segment (start 160.274 138.176) (end 160.274 136.271) (width 0.254) (layer 3.3V_layer) (net 7)) + (segment (start 131.699 124.206) (end 131.699 117.221) (width 0.254) (layer 3.3V_layer) (net 7)) + (segment (start 139.319 131.826) (end 131.699 124.206) (width 0.254) (layer 3.3V_layer) (net 7)) + (segment (start 155.829 131.826) (end 139.319 131.826) (width 0.254) (layer 3.3V_layer) (net 7)) + (segment (start 160.274 136.271) (end 155.829 131.826) (width 0.254) (layer 3.3V_layer) (net 7)) + (segment (start 161.544 139.446) (end 160.274 138.176) (width 0.254) (layer 3.3V_layer) (net 7) (status 800)) + (via (at 130.048 107.188) (size 0.889) (layers Composant Cuivre) (net 7)) (via (at 129.159 112.014) (size 0.889) (layers Composant Cuivre) (net 8)) - (segment (start 128.397 109.728) (end 128.397 113.665) (width 0.254) (layer Composant) (net 9)) - (segment (start 128.397 124.333) (end 137.414 133.35) (width 0.254) (layer Cuivre) (net 9)) - (via (at 128.397 113.665) (size 0.889) (layers Composant Cuivre) (net 9)) - (segment (start 155.194 138.176) (end 156.464 139.446) (width 0.254) (layer Cuivre) (net 9) (status 400)) - (segment (start 129.3876 109.22) (end 128.905 109.22) (width 0.254) (layer Composant) (net 9) (status 800)) - (segment (start 128.397 113.665) (end 128.397 124.333) (width 0.254) (layer Cuivre) (net 9)) - (segment (start 155.194 135.636) (end 155.194 138.176) (width 0.254) (layer Cuivre) (net 9)) - (segment (start 137.414 133.35) (end 152.908 133.35) (width 0.254) (layer Cuivre) (net 9)) - (segment (start 152.908 133.35) (end 155.194 135.636) (width 0.254) (layer Cuivre) (net 9)) + (segment (start 129.159 111.252) (end 129.413 110.998) (width 0.254) (layer Composant) (net 8)) + (segment (start 129.159 112.014) (end 129.159 111.252) (width 0.254) (layer Composant) (net 8)) + (segment (start 159.004 139.319) (end 157.734 138.049) (width 0.254) (layer Cuivre) (net 8)) + (segment (start 157.734 138.049) (end 157.734 136.017) (width 0.254) (layer Cuivre) (net 8)) + (segment (start 157.734 136.017) (end 154.178 132.461) (width 0.254) (layer Cuivre) (net 8)) + (segment (start 154.178 132.461) (end 138.43 132.461) (width 0.254) (layer Cuivre) (net 8)) + (segment (start 138.43 132.461) (end 129.159 123.19) (width 0.254) (layer Cuivre) (net 8)) + (segment (start 129.159 123.19) (end 129.159 112.014) (width 0.254) (layer Cuivre) (net 8)) + (segment (start 129.413 110.998) (end 129.413 110.617) (width 0.254) (layer Composant) (net 8)) + (segment (start 129.413 110.617) (end 129.87528 110.15472) (width 0.254) (layer Composant) (net 8)) + (segment (start 159.004 139.446) (end 159.004 139.319) (width 0.254) (layer Cuivre) (net 8) (status 800)) + (segment (start 129.87528 110.15472) (end 129.8956 109.22) (width 0.254) (layer Composant) (net 8) (status 400)) (segment (start 128.905 109.22) (end 128.397 109.728) (width 0.254) (layer Composant) (net 9)) - (segment (start 110.49 114.173) (end 117.729 114.173) (width 0.254) (layer Cuivre) (net 10)) - (segment (start 107.696 111.379) (end 110.49 114.173) (width 0.254) (layer Cuivre) (net 10)) - (segment (start 100.203 111.379) (end 107.696 111.379) (width 0.254) (layer Cuivre) (net 10)) - (segment (start 97.917 113.665) (end 100.203 111.379) (width 0.254) (layer Cuivre) (net 10)) - (segment (start 95.377 113.665) (end 97.917 113.665) (width 0.254) (layer Cuivre) (net 10)) - (segment (start 94.361 114.681) (end 95.377 113.665) (width 0.254) (layer Cuivre) (net 10)) - (via (at 87.63 112.141) (size 0.889) (layers Composant Cuivre) (net 10)) - (segment (start 144.5514 107.4674) (end 143.129 107.4674) (width 0.254) (layer Composant) (net 10) (status 400)) - (segment (start 117.729 114.173) (end 119.253 112.649) (width 0.254) (layer Cuivre) (net 10)) - (segment (start 146.685 109.855) (end 146.431 109.855) (width 0.254) (layer Composant) (net 10)) - (segment (start 146.431 109.855) (end 145.288 108.712) (width 0.254) (layer Composant) (net 10)) - (segment (start 145.288 108.712) (end 145.288 108.204) (width 0.254) (layer Composant) (net 10)) - (segment (start 145.288 108.204) (end 144.5514 107.4674) (width 0.254) (layer Composant) (net 10)) - (segment (start 86.487 110.998) (end 87.63 112.141) (width 0.254) (layer GND_layer) (net 10)) - (segment (start 86.487 109.22) (end 86.487 110.998) (width 0.254) (layer GND_layer) (net 10)) - (segment (start 90.17 114.681) (end 94.361 114.681) (width 0.254) (layer Cuivre) (net 10)) - (segment (start 87.63 112.141) (end 90.17 114.681) (width 0.254) (layer Cuivre) (net 10)) - (segment (start 119.253 112.649) (end 125.476 112.649) (width 0.254) (layer Cuivre) (net 10)) - (segment (start 78.867 106.299) (end 80.391 104.775) (width 0.381) (layer Composant) (net 10) (status 800)) - (segment (start 125.476 112.649) (end 127.508 110.617) (width 0.254) (layer Cuivre) (net 10)) - (segment (start 127.508 110.617) (end 132.461 110.617) (width 0.254) (layer Cuivre) (net 10)) - (segment (start 132.461 110.617) (end 133.604 111.76) (width 0.254) (layer Cuivre) (net 10)) - (segment (start 133.604 111.76) (end 141.732 111.76) (width 0.254) (layer Cuivre) (net 10)) - (segment (start 141.732 111.76) (end 143.637 109.855) (width 0.254) (layer Cuivre) (net 10)) - (segment (start 143.637 109.855) (end 146.685 109.855) (width 0.254) (layer Cuivre) (net 10)) - (segment (start 83.566 106.299) (end 86.487 109.22) (width 0.254) (layer GND_layer) (net 10)) - (segment (start 80.899 104.267) (end 80.391 104.775) (width 0.4318) (layer Composant) (net 10)) - (segment (start 82.3595 104.267) (end 80.899 104.267) (width 0.4318) (layer Composant) (net 10) (status 800)) - (segment (start 83.566 106.299) (end 78.867 106.299) (width 0.254) (layer GND_layer) (net 10) (status 400)) + (segment (start 152.908 133.35) (end 155.194 135.636) (width 0.254) (layer Cuivre) (net 9)) + (segment (start 137.414 133.35) (end 152.908 133.35) (width 0.254) (layer Cuivre) (net 9)) + (segment (start 155.194 135.636) (end 155.194 138.176) (width 0.254) (layer Cuivre) (net 9)) + (segment (start 128.397 113.665) (end 128.397 124.333) (width 0.254) (layer Cuivre) (net 9)) + (segment (start 129.3876 109.22) (end 128.905 109.22) (width 0.254) (layer Composant) (net 9) (status 800)) + (segment (start 155.194 138.176) (end 156.464 139.446) (width 0.254) (layer Cuivre) (net 9) (status 400)) + (via (at 128.397 113.665) (size 0.889) (layers Composant Cuivre) (net 9)) + (segment (start 128.397 124.333) (end 137.414 133.35) (width 0.254) (layer Cuivre) (net 9)) + (segment (start 128.397 109.728) (end 128.397 113.665) (width 0.254) (layer Composant) (net 9)) (via (at 146.685 109.855) (size 0.889) (layers Composant Cuivre) (net 10)) - (via (at 139.446 116.205) (size 0.635) (layers Composant Cuivre) (net 11)) - (segment (start 141.224 114.554) (end 140.589 113.919) (width 0.2) (layer Composant) (net 11)) - (via (at 142.621 116.205) (size 0.635) (layers Composant Cuivre) (net 11)) - (segment (start 138.8745 116.7765) (end 139.446 116.205) (width 0.2) (layer Composant) (net 11)) - (segment (start 136.652 116.7765) (end 138.8745 116.7765) (width 0.2) (layer Composant) (net 11) (status 800)) - (segment (start 140.3858 111.0488) (end 140.589 111.379) (width 0.2) (layer Composant) (net 11)) - (segment (start 140.3858 109.22) (end 140.3858 111.0488) (width 0.2) (layer Composant) (net 11) (status 800)) - (segment (start 140.589 113.919) (end 140.589 111.379) (width 0.2) (layer Composant) (net 11)) - (segment (start 139.446 116.205) (end 142.621 116.205) (width 0.2) (layer Cuivre) (net 11)) - (segment (start 142.621 116.205) (end 142.621 115.316) (width 0.2) (layer Composant) (net 11)) - (segment (start 142.621 115.316) (end 141.859 114.554) (width 0.2) (layer Composant) (net 11)) - (segment (start 141.859 114.554) (end 141.224 114.554) (width 0.2) (layer Composant) (net 11)) - (segment (start 136.652 116.7765) (end 131.826 116.7765) (width 0.381) (layer Composant) (net 11) (status 800)) - (segment (start 131.826 116.7765) (end 128.27 120.3325) (width 0.381) (layer Composant) (net 11) (status 400)) - (segment (start 128.27 120.3325) (end 123.8885 120.3325) (width 0.381) (layer Composant) (net 11) (status 800)) + (segment (start 83.566 106.299) (end 78.867 106.299) (width 0.254) (layer GND_layer) (net 10) (status 400)) + (segment (start 82.3595 104.267) (end 80.899 104.267) (width 0.4318) (layer Composant) (net 10) (status 800)) + (segment (start 80.899 104.267) (end 80.391 104.775) (width 0.4318) (layer Composant) (net 10)) + (segment (start 83.566 106.299) (end 86.487 109.22) (width 0.254) (layer GND_layer) (net 10)) + (segment (start 143.637 109.855) (end 146.685 109.855) (width 0.254) (layer Cuivre) (net 10)) + (segment (start 141.732 111.76) (end 143.637 109.855) (width 0.254) (layer Cuivre) (net 10)) + (segment (start 133.604 111.76) (end 141.732 111.76) (width 0.254) (layer Cuivre) (net 10)) + (segment (start 132.461 110.617) (end 133.604 111.76) (width 0.254) (layer Cuivre) (net 10)) + (segment (start 127.508 110.617) (end 132.461 110.617) (width 0.254) (layer Cuivre) (net 10)) + (segment (start 125.476 112.649) (end 127.508 110.617) (width 0.254) (layer Cuivre) (net 10)) + (segment (start 78.867 106.299) (end 80.391 104.775) (width 0.381) (layer Composant) (net 10) (status 800)) + (segment (start 119.253 112.649) (end 125.476 112.649) (width 0.254) (layer Cuivre) (net 10)) + (segment (start 87.63 112.141) (end 90.17 114.681) (width 0.254) (layer Cuivre) (net 10)) + (segment (start 90.17 114.681) (end 94.361 114.681) (width 0.254) (layer Cuivre) (net 10)) + (segment (start 86.487 109.22) (end 86.487 110.998) (width 0.254) (layer GND_layer) (net 10)) + (segment (start 86.487 110.998) (end 87.63 112.141) (width 0.254) (layer GND_layer) (net 10)) + (segment (start 145.288 108.204) (end 144.5514 107.4674) (width 0.254) (layer Composant) (net 10)) + (segment (start 145.288 108.712) (end 145.288 108.204) (width 0.254) (layer Composant) (net 10)) + (segment (start 146.431 109.855) (end 145.288 108.712) (width 0.254) (layer Composant) (net 10)) + (segment (start 146.685 109.855) (end 146.431 109.855) (width 0.254) (layer Composant) (net 10)) + (segment (start 117.729 114.173) (end 119.253 112.649) (width 0.254) (layer Cuivre) (net 10)) + (segment (start 144.5514 107.4674) (end 143.129 107.4674) (width 0.254) (layer Composant) (net 10) (status 400)) + (via (at 87.63 112.141) (size 0.889) (layers Composant Cuivre) (net 10)) + (segment (start 94.361 114.681) (end 95.377 113.665) (width 0.254) (layer Cuivre) (net 10)) + (segment (start 95.377 113.665) (end 97.917 113.665) (width 0.254) (layer Cuivre) (net 10)) + (segment (start 97.917 113.665) (end 100.203 111.379) (width 0.254) (layer Cuivre) (net 10)) + (segment (start 100.203 111.379) (end 107.696 111.379) (width 0.254) (layer Cuivre) (net 10)) + (segment (start 107.696 111.379) (end 110.49 114.173) (width 0.254) (layer Cuivre) (net 10)) + (segment (start 110.49 114.173) (end 117.729 114.173) (width 0.254) (layer Cuivre) (net 10)) (segment (start 123.8885 120.3325) (end 123.444 120.777) (width 0.381) (layer Composant) (net 11) (status 400)) - (segment (start 126.492 102.489) (end 126.238 102.235) (width 0.254) (layer Composant) (net 12)) - (segment (start 126.238 102.235) (end 123.444 102.235) (width 0.254) (layer Composant) (net 12)) - (segment (start 123.444 102.235) (end 123.19 101.981) (width 0.254) (layer Composant) (net 12)) - (segment (start 123.19 101.981) (end 123.19 100.965) (width 0.254) (layer Composant) (net 12)) - (segment (start 122.174 99.949) (end 118.11 99.949) (width 0.254) (layer Composant) (net 12)) - (segment (start 123.19 100.965) (end 122.174 99.949) (width 0.254) (layer Composant) (net 12)) - (segment (start 107.188 98.933) (end 104.8385 98.933) (width 0.254) (layer Composant) (net 12) (status 400)) - (segment (start 108.966 97.155) (end 107.188 98.933) (width 0.254) (layer Composant) (net 12)) - (segment (start 113.792 97.155) (end 108.966 97.155) (width 0.254) (layer Composant) (net 12)) - (segment (start 115.062 98.425) (end 113.792 97.155) (width 0.254) (layer Composant) (net 12) (status 800)) - (segment (start 116.586 98.425) (end 115.062 98.425) (width 0.254) (layer Composant) (net 12) (status 400)) - (segment (start 118.11 99.949) (end 116.586 98.425) (width 0.254) (layer Composant) (net 12)) + (segment (start 128.27 120.3325) (end 123.8885 120.3325) (width 0.381) (layer Composant) (net 11) (status 800)) + (segment (start 131.826 116.7765) (end 128.27 120.3325) (width 0.381) (layer Composant) (net 11) (status 400)) + (segment (start 136.652 116.7765) (end 131.826 116.7765) (width 0.381) (layer Composant) (net 11) (status 800)) + (segment (start 141.859 114.554) (end 141.224 114.554) (width 0.2) (layer Composant) (net 11)) + (segment (start 142.621 115.316) (end 141.859 114.554) (width 0.2) (layer Composant) (net 11)) + (segment (start 142.621 116.205) (end 142.621 115.316) (width 0.2) (layer Composant) (net 11)) + (segment (start 139.446 116.205) (end 142.621 116.205) (width 0.2) (layer Cuivre) (net 11)) + (segment (start 140.589 113.919) (end 140.589 111.379) (width 0.2) (layer Composant) (net 11)) + (segment (start 140.3858 109.22) (end 140.3858 111.0488) (width 0.2) (layer Composant) (net 11) (status 800)) + (segment (start 140.3858 111.0488) (end 140.589 111.379) (width 0.2) (layer Composant) (net 11)) + (segment (start 136.652 116.7765) (end 138.8745 116.7765) (width 0.2) (layer Composant) (net 11) (status 800)) + (segment (start 138.8745 116.7765) (end 139.446 116.205) (width 0.2) (layer Composant) (net 11)) + (via (at 142.621 116.205) (size 0.635) (layers Composant Cuivre) (net 11)) + (segment (start 141.224 114.554) (end 140.589 113.919) (width 0.2) (layer Composant) (net 11)) + (via (at 139.446 116.205) (size 0.635) (layers Composant Cuivre) (net 11)) (segment (start 127.635 102.489) (end 126.492 102.489) (width 0.254) (layer Composant) (net 12) (status 800)) - (segment (start 127.635 101.981) (end 126.746 101.981) (width 0.254) (layer Composant) (net 13) (status 800)) - (segment (start 126.746 101.981) (end 126.492 101.727) (width 0.254) (layer Composant) (net 13)) - (segment (start 124.587 101.727) (end 122.809 99.949) (width 0.254) (layer Composant) (net 13)) - (segment (start 122.809 99.695) (end 122.555 99.441) (width 0.254) (layer Composant) (net 13)) - (segment (start 122.555 99.441) (end 118.618 99.441) (width 0.254) (layer Composant) (net 13)) - (segment (start 118.618 99.441) (end 115.062 95.885) (width 0.254) (layer Composant) (net 13) (status 400)) - (segment (start 115.062 95.885) (end 113.792 94.615) (width 0.254) (layer Composant) (net 13) (status 800)) - (segment (start 113.792 94.615) (end 108.966 94.615) (width 0.254) (layer Composant) (net 13)) - (segment (start 108.966 94.615) (end 106.934 96.647) (width 0.254) (layer Composant) (net 13)) - (segment (start 106.934 96.647) (end 104.8385 96.647) (width 0.254) (layer Composant) (net 13) (status 400)) - (segment (start 122.809 99.949) (end 122.809 99.695) (width 0.254) (layer Composant) (net 13)) + (segment (start 118.11 99.949) (end 116.586 98.425) (width 0.254) (layer Composant) (net 12)) + (segment (start 116.586 98.425) (end 115.062 98.425) (width 0.254) (layer Composant) (net 12) (status 400)) + (segment (start 115.062 98.425) (end 113.792 97.155) (width 0.254) (layer Composant) (net 12) (status 800)) + (segment (start 113.792 97.155) (end 108.966 97.155) (width 0.254) (layer Composant) (net 12)) + (segment (start 108.966 97.155) (end 107.188 98.933) (width 0.254) (layer Composant) (net 12)) + (segment (start 107.188 98.933) (end 104.8385 98.933) (width 0.254) (layer Composant) (net 12) (status 400)) + (segment (start 123.19 100.965) (end 122.174 99.949) (width 0.254) (layer Composant) (net 12)) + (segment (start 122.174 99.949) (end 118.11 99.949) (width 0.254) (layer Composant) (net 12)) + (segment (start 123.19 101.981) (end 123.19 100.965) (width 0.254) (layer Composant) (net 12)) + (segment (start 123.444 102.235) (end 123.19 101.981) (width 0.254) (layer Composant) (net 12)) + (segment (start 126.238 102.235) (end 123.444 102.235) (width 0.254) (layer Composant) (net 12)) + (segment (start 126.492 102.489) (end 126.238 102.235) (width 0.254) (layer Composant) (net 12)) (segment (start 126.492 101.727) (end 124.587 101.727) (width 0.254) (layer Composant) (net 13)) - (segment (start 146.558 107.95) (end 144.653 107.95) (width 0.254) (layer Cuivre) (net 14)) - (segment (start 140.97 107.823) (end 137.16 104.013) (width 0.254) (layer Cuivre) (net 14)) - (segment (start 144.526 107.823) (end 140.97 107.823) (width 0.254) (layer Cuivre) (net 14)) - (segment (start 144.653 107.95) (end 144.526 107.823) (width 0.254) (layer Cuivre) (net 14)) - (segment (start 137.16 104.013) (end 135.509 104.013) (width 0.254) (layer Cuivre) (net 14)) - (segment (start 135.509 104.013) (end 134.493 102.997) (width 0.254) (layer Cuivre) (net 14)) - (segment (start 134.493 102.997) (end 133.477 102.997) (width 0.254) (layer Cuivre) (net 14)) - (segment (start 133.477 102.997) (end 132.842 103.632) (width 0.254) (layer Cuivre) (net 14)) - (segment (start 132.842 103.632) (end 122.936 103.632) (width 0.254) (layer Cuivre) (net 14)) - (segment (start 107.95 106.045) (end 106.299 107.696) (width 0.254) (layer Cuivre) (net 14)) - (segment (start 115.824 106.045) (end 107.95 106.045) (width 0.254) (layer Cuivre) (net 14)) - (segment (start 116.205 105.664) (end 115.824 106.045) (width 0.254) (layer Cuivre) (net 14)) - (segment (start 116.205 103.886) (end 116.205 105.664) (width 0.254) (layer Cuivre) (net 14)) - (segment (start 116.84 103.251) (end 116.205 103.886) (width 0.254) (layer Cuivre) (net 14)) - (segment (start 119.888 103.251) (end 116.84 103.251) (width 0.254) (layer Cuivre) (net 14)) - (segment (start 120.523 103.886) (end 119.888 103.251) (width 0.254) (layer Cuivre) (net 14)) - (segment (start 106.299 107.696) (end 85.725 107.696) (width 0.254) (layer Cuivre) (net 14)) - (segment (start 85.725 107.696) (end 84.836 108.585) (width 0.254) (layer Cuivre) (net 14)) - (segment (start 143.129 106.9594) (end 144.78 106.9594) (width 0.254) (layer Composant) (net 14) (status 800)) - (segment (start 144.78 106.9594) (end 144.907 107.061) (width 0.254) (layer Composant) (net 14)) - (segment (start 144.907 107.061) (end 145.796 107.95) (width 0.254) (layer Composant) (net 14)) - (segment (start 145.796 107.95) (end 146.558 107.95) (width 0.254) (layer Composant) (net 14)) - (segment (start 76.327 129.159) (end 77.597 127.889) (width 0.254) (layer GND_layer) (net 14) (status 800)) - (segment (start 77.597 127.889) (end 79.883 127.889) (width 0.254) (layer GND_layer) (net 14)) - (segment (start 79.883 127.889) (end 81.788 125.984) (width 0.254) (layer GND_layer) (net 14)) - (segment (start 81.788 125.984) (end 81.788 111.633) (width 0.254) (layer GND_layer) (net 14)) - (segment (start 81.788 111.633) (end 84.836 108.585) (width 0.254) (layer GND_layer) (net 14)) - (via (at 146.558 107.95) (size 0.889) (layers Composant Cuivre) (net 14)) - (via (at 84.836 108.585) (size 0.635) (layers Composant Cuivre) (net 14)) - (segment (start 122.682 103.886) (end 120.523 103.886) (width 0.254) (layer Cuivre) (net 14)) + (segment (start 122.809 99.949) (end 122.809 99.695) (width 0.254) (layer Composant) (net 13)) + (segment (start 106.934 96.647) (end 104.8385 96.647) (width 0.254) (layer Composant) (net 13) (status 400)) + (segment (start 108.966 94.615) (end 106.934 96.647) (width 0.254) (layer Composant) (net 13)) + (segment (start 113.792 94.615) (end 108.966 94.615) (width 0.254) (layer Composant) (net 13)) + (segment (start 115.062 95.885) (end 113.792 94.615) (width 0.254) (layer Composant) (net 13) (status 800)) + (segment (start 118.618 99.441) (end 115.062 95.885) (width 0.254) (layer Composant) (net 13) (status 400)) + (segment (start 122.555 99.441) (end 118.618 99.441) (width 0.254) (layer Composant) (net 13)) + (segment (start 122.809 99.695) (end 122.555 99.441) (width 0.254) (layer Composant) (net 13)) + (segment (start 124.587 101.727) (end 122.809 99.949) (width 0.254) (layer Composant) (net 13)) + (segment (start 126.746 101.981) (end 126.492 101.727) (width 0.254) (layer Composant) (net 13)) + (segment (start 127.635 101.981) (end 126.746 101.981) (width 0.254) (layer Composant) (net 13) (status 800)) (segment (start 122.936 103.632) (end 122.682 103.886) (width 0.254) (layer Cuivre) (net 14)) - (segment (start 109.728 103.505) (end 106.045 107.188) (width 0.254) (layer Cuivre) (net 15)) - (segment (start 85.217 107.188) (end 83.82 108.585) (width 0.254) (layer Cuivre) (net 15)) - (segment (start 83.82 108.585) (end 81.28 111.125) (width 0.254) (layer GND_layer) (net 15)) - (segment (start 81.28 111.125) (end 81.28 125.349) (width 0.254) (layer GND_layer) (net 15)) - (segment (start 81.28 125.349) (end 80.01 126.619) (width 0.254) (layer GND_layer) (net 15)) - (segment (start 80.01 126.619) (end 78.867 126.619) (width 0.254) (layer GND_layer) (net 15) (status 400)) - (segment (start 145.415 106.68) (end 146.558 106.68) (width 0.254) (layer Composant) (net 15)) - (segment (start 145.2118 106.4768) (end 145.415 106.68) (width 0.254) (layer Composant) (net 15)) - (segment (start 143.129 106.4768) (end 145.2118 106.4768) (width 0.254) (layer Composant) (net 15) (status 800)) - (segment (start 146.558 106.68) (end 145.542 106.68) (width 0.254) (layer Cuivre) (net 15)) - (via (at 146.558 106.68) (size 0.889) (layers Composant Cuivre) (net 15)) - (segment (start 140.7795 106.8705) (end 136.017 102.108) (width 0.254) (layer Cuivre) (net 15)) - (segment (start 141.097 107.188) (end 145.034 107.188) (width 0.254) (layer Cuivre) (net 15)) - (segment (start 145.034 107.188) (end 145.542 106.68) (width 0.254) (layer Cuivre) (net 15)) - (segment (start 140.7795 106.8705) (end 141.097 107.188) (width 0.254) (layer Cuivre) (net 15)) - (segment (start 115.57 103.505) (end 109.728 103.505) (width 0.254) (layer Cuivre) (net 15)) - (segment (start 118.237 100.838) (end 115.57 103.505) (width 0.254) (layer Cuivre) (net 15)) - (segment (start 127.381 100.838) (end 118.237 100.838) (width 0.254) (layer Cuivre) (net 15)) - (segment (start 128.651 102.108) (end 127.381 100.838) (width 0.254) (layer Cuivre) (net 15)) - (segment (start 136.017 102.108) (end 128.651 102.108) (width 0.254) (layer Cuivre) (net 15)) - (via (at 83.82 108.585) (size 0.635) (layers Composant Cuivre) (net 15)) + (segment (start 122.682 103.886) (end 120.523 103.886) (width 0.254) (layer Cuivre) (net 14)) + (via (at 84.836 108.585) (size 0.635) (layers Composant Cuivre) (net 14)) + (via (at 146.558 107.95) (size 0.889) (layers Composant Cuivre) (net 14)) + (segment (start 81.788 111.633) (end 84.836 108.585) (width 0.254) (layer GND_layer) (net 14)) + (segment (start 81.788 125.984) (end 81.788 111.633) (width 0.254) (layer GND_layer) (net 14)) + (segment (start 79.883 127.889) (end 81.788 125.984) (width 0.254) (layer GND_layer) (net 14)) + (segment (start 77.597 127.889) (end 79.883 127.889) (width 0.254) (layer GND_layer) (net 14)) + (segment (start 76.327 129.159) (end 77.597 127.889) (width 0.254) (layer GND_layer) (net 14) (status 800)) + (segment (start 145.796 107.95) (end 146.558 107.95) (width 0.254) (layer Composant) (net 14)) + (segment (start 144.907 107.061) (end 145.796 107.95) (width 0.254) (layer Composant) (net 14)) + (segment (start 144.78 106.9594) (end 144.907 107.061) (width 0.254) (layer Composant) (net 14)) + (segment (start 143.129 106.9594) (end 144.78 106.9594) (width 0.254) (layer Composant) (net 14) (status 800)) + (segment (start 85.725 107.696) (end 84.836 108.585) (width 0.254) (layer Cuivre) (net 14)) + (segment (start 106.299 107.696) (end 85.725 107.696) (width 0.254) (layer Cuivre) (net 14)) + (segment (start 120.523 103.886) (end 119.888 103.251) (width 0.254) (layer Cuivre) (net 14)) + (segment (start 119.888 103.251) (end 116.84 103.251) (width 0.254) (layer Cuivre) (net 14)) + (segment (start 116.84 103.251) (end 116.205 103.886) (width 0.254) (layer Cuivre) (net 14)) + (segment (start 116.205 103.886) (end 116.205 105.664) (width 0.254) (layer Cuivre) (net 14)) + (segment (start 116.205 105.664) (end 115.824 106.045) (width 0.254) (layer Cuivre) (net 14)) + (segment (start 115.824 106.045) (end 107.95 106.045) (width 0.254) (layer Cuivre) (net 14)) + (segment (start 107.95 106.045) (end 106.299 107.696) (width 0.254) (layer Cuivre) (net 14)) + (segment (start 132.842 103.632) (end 122.936 103.632) (width 0.254) (layer Cuivre) (net 14)) + (segment (start 133.477 102.997) (end 132.842 103.632) (width 0.254) (layer Cuivre) (net 14)) + (segment (start 134.493 102.997) (end 133.477 102.997) (width 0.254) (layer Cuivre) (net 14)) + (segment (start 135.509 104.013) (end 134.493 102.997) (width 0.254) (layer Cuivre) (net 14)) + (segment (start 137.16 104.013) (end 135.509 104.013) (width 0.254) (layer Cuivre) (net 14)) + (segment (start 144.653 107.95) (end 144.526 107.823) (width 0.254) (layer Cuivre) (net 14)) + (segment (start 144.526 107.823) (end 140.97 107.823) (width 0.254) (layer Cuivre) (net 14)) + (segment (start 140.97 107.823) (end 137.16 104.013) (width 0.254) (layer Cuivre) (net 14)) + (segment (start 146.558 107.95) (end 144.653 107.95) (width 0.254) (layer Cuivre) (net 14)) (segment (start 106.045 107.188) (end 85.217 107.188) (width 0.254) (layer Cuivre) (net 15)) - (segment (start 140.43152 103.98252) (end 139.827 103.378) (width 0.254) (layer Composant) (net 16)) - (segment (start 138.811 102.235) (end 139.065 102.489) (width 0.254) (layer Cuivre) (net 16)) - (segment (start 141.351 103.98252) (end 140.43152 103.98252) (width 0.254) (layer Composant) (net 16)) - (segment (start 139.573 102.489) (end 139.827 102.743) (width 0.254) (layer Cuivre) (net 16)) - (segment (start 139.065 102.489) (end 139.573 102.489) (width 0.254) (layer Cuivre) (net 16)) - (segment (start 116.713 100.076) (end 110.871 100.076) (width 0.254) (layer Cuivre) (net 16)) - (segment (start 120.142 96.647) (end 116.713 100.076) (width 0.254) (layer Cuivre) (net 16)) - (segment (start 126.111 96.647) (end 120.142 96.647) (width 0.254) (layer Cuivre) (net 16)) - (segment (start 127.762 98.298) (end 126.111 96.647) (width 0.254) (layer Cuivre) (net 16)) - (segment (start 129.667 98.298) (end 127.762 98.298) (width 0.254) (layer Cuivre) (net 16)) - (segment (start 131.572 100.203) (end 129.667 98.298) (width 0.254) (layer Cuivre) (net 16)) - (segment (start 141.351 103.98252) (end 143.129 103.9622) (width 0.254) (layer Composant) (net 16) (status 400)) - (segment (start 136.779 100.203) (end 138.811 102.235) (width 0.254) (layer Cuivre) (net 16)) - (via (at 81.788 108.585) (size 0.635) (layers Composant Cuivre) (net 16)) - (segment (start 110.871 100.076) (end 105.283 105.664) (width 0.254) (layer Cuivre) (net 16)) - (segment (start 77.597 125.349) (end 76.327 126.619) (width 0.254) (layer GND_layer) (net 16) (status 400)) - (segment (start 79.629 125.349) (end 77.597 125.349) (width 0.254) (layer GND_layer) (net 16)) - (segment (start 80.772 124.206) (end 79.629 125.349) (width 0.254) (layer GND_layer) (net 16)) - (segment (start 80.772 109.601) (end 80.772 124.206) (width 0.254) (layer GND_layer) (net 16)) - (segment (start 81.788 108.585) (end 80.772 109.601) (width 0.254) (layer GND_layer) (net 16)) - (segment (start 81.788 107.442) (end 81.788 108.585) (width 0.254) (layer Cuivre) (net 16)) - (via (at 139.827 102.743) (size 0.889) (layers Composant Cuivre) (net 16)) - (segment (start 83.566 105.664) (end 81.788 107.442) (width 0.254) (layer Cuivre) (net 16)) - (segment (start 139.827 103.378) (end 139.827 102.743) (width 0.254) (layer Composant) (net 16)) - (segment (start 105.283 105.664) (end 83.566 105.664) (width 0.254) (layer Cuivre) (net 16)) + (via (at 83.82 108.585) (size 0.635) (layers Composant Cuivre) (net 15)) + (segment (start 136.017 102.108) (end 128.651 102.108) (width 0.254) (layer Cuivre) (net 15)) + (segment (start 128.651 102.108) (end 127.381 100.838) (width 0.254) (layer Cuivre) (net 15)) + (segment (start 127.381 100.838) (end 118.237 100.838) (width 0.254) (layer Cuivre) (net 15)) + (segment (start 118.237 100.838) (end 115.57 103.505) (width 0.254) (layer Cuivre) (net 15)) + (segment (start 115.57 103.505) (end 109.728 103.505) (width 0.254) (layer Cuivre) (net 15)) + (segment (start 140.7795 106.8705) (end 141.097 107.188) (width 0.254) (layer Cuivre) (net 15)) + (segment (start 145.034 107.188) (end 145.542 106.68) (width 0.254) (layer Cuivre) (net 15)) + (segment (start 141.097 107.188) (end 145.034 107.188) (width 0.254) (layer Cuivre) (net 15)) + (segment (start 140.7795 106.8705) (end 136.017 102.108) (width 0.254) (layer Cuivre) (net 15)) + (via (at 146.558 106.68) (size 0.889) (layers Composant Cuivre) (net 15)) + (segment (start 146.558 106.68) (end 145.542 106.68) (width 0.254) (layer Cuivre) (net 15)) + (segment (start 143.129 106.4768) (end 145.2118 106.4768) (width 0.254) (layer Composant) (net 15) (status 800)) + (segment (start 145.2118 106.4768) (end 145.415 106.68) (width 0.254) (layer Composant) (net 15)) + (segment (start 145.415 106.68) (end 146.558 106.68) (width 0.254) (layer Composant) (net 15)) + (segment (start 80.01 126.619) (end 78.867 126.619) (width 0.254) (layer GND_layer) (net 15) (status 400)) + (segment (start 81.28 125.349) (end 80.01 126.619) (width 0.254) (layer GND_layer) (net 15)) + (segment (start 81.28 111.125) (end 81.28 125.349) (width 0.254) (layer GND_layer) (net 15)) + (segment (start 83.82 108.585) (end 81.28 111.125) (width 0.254) (layer GND_layer) (net 15)) + (segment (start 85.217 107.188) (end 83.82 108.585) (width 0.254) (layer Cuivre) (net 15)) + (segment (start 109.728 103.505) (end 106.045 107.188) (width 0.254) (layer Cuivre) (net 15)) (segment (start 131.572 100.203) (end 136.779 100.203) (width 0.254) (layer Cuivre) (net 16)) - (segment (start 141.3002 103.4542) (end 143.129 103.4796) (width 0.254) (layer Composant) (net 17) (status 400)) - (segment (start 80.264 122.682) (end 78.867 124.079) (width 0.254) (layer GND_layer) (net 17) (status 400)) - (via (at 80.264 108.585) (size 0.635) (layers Composant Cuivre) (net 17)) - (segment (start 80.264 108.585) (end 80.264 106.68) (width 0.254) (layer Cuivre) (net 17)) - (segment (start 140.97 103.124) (end 141.3002 103.4542) (width 0.254) (layer Composant) (net 17)) - (segment (start 111.506 97.155) (end 118.11 97.155) (width 0.254) (layer Cuivre) (net 17)) - (segment (start 139.3825 100.9015) (end 137.541 99.06) (width 0.254) (layer Cuivre) (net 17)) - (segment (start 141.4145 100.9015) (end 139.3825 100.9015) (width 0.254) (layer Cuivre) (net 17)) - (segment (start 126.619 95.631) (end 128.27 97.282) (width 0.254) (layer Cuivre) (net 17)) - (segment (start 128.27 97.282) (end 130.429 97.282) (width 0.254) (layer Cuivre) (net 17)) - (segment (start 130.429 97.282) (end 132.207 99.06) (width 0.254) (layer Cuivre) (net 17)) - (segment (start 132.207 99.06) (end 137.541 99.06) (width 0.254) (layer Cuivre) (net 17)) - (segment (start 119.634 95.631) (end 126.619 95.631) (width 0.254) (layer Cuivre) (net 17)) - (segment (start 118.11 97.155) (end 119.634 95.631) (width 0.254) (layer Cuivre) (net 17)) - (segment (start 110.998 97.663) (end 111.506 97.155) (width 0.254) (layer Cuivre) (net 17)) - (segment (start 80.264 108.585) (end 80.264 122.682) (width 0.254) (layer GND_layer) (net 17)) - (segment (start 110.998 98.425) (end 110.998 97.663) (width 0.254) (layer Cuivre) (net 17)) - (segment (start 104.775 104.648) (end 110.998 98.425) (width 0.254) (layer Cuivre) (net 17)) - (segment (start 82.296 104.648) (end 104.775 104.648) (width 0.254) (layer Cuivre) (net 17)) - (segment (start 80.264 106.68) (end 82.296 104.648) (width 0.254) (layer Cuivre) (net 17)) - (segment (start 141.4145 100.9015) (end 142.367 101.854) (width 0.254) (layer Cuivre) (net 17)) - (segment (start 142.367 102.87) (end 142.113 103.124) (width 0.254) (layer Cuivre) (net 17)) - (segment (start 142.113 103.124) (end 140.97 103.124) (width 0.254) (layer Cuivre) (net 17)) - (via (at 140.97 103.124) (size 0.889) (layers Composant Cuivre) (net 17)) + (segment (start 105.283 105.664) (end 83.566 105.664) (width 0.254) (layer Cuivre) (net 16)) + (segment (start 139.827 103.378) (end 139.827 102.743) (width 0.254) (layer Composant) (net 16)) + (segment (start 83.566 105.664) (end 81.788 107.442) (width 0.254) (layer Cuivre) (net 16)) + (via (at 139.827 102.743) (size 0.889) (layers Composant Cuivre) (net 16)) + (segment (start 81.788 107.442) (end 81.788 108.585) (width 0.254) (layer Cuivre) (net 16)) + (segment (start 81.788 108.585) (end 80.772 109.601) (width 0.254) (layer GND_layer) (net 16)) + (segment (start 80.772 109.601) (end 80.772 124.206) (width 0.254) (layer GND_layer) (net 16)) + (segment (start 80.772 124.206) (end 79.629 125.349) (width 0.254) (layer GND_layer) (net 16)) + (segment (start 79.629 125.349) (end 77.597 125.349) (width 0.254) (layer GND_layer) (net 16)) + (segment (start 77.597 125.349) (end 76.327 126.619) (width 0.254) (layer GND_layer) (net 16) (status 400)) + (segment (start 110.871 100.076) (end 105.283 105.664) (width 0.254) (layer Cuivre) (net 16)) + (via (at 81.788 108.585) (size 0.635) (layers Composant Cuivre) (net 16)) + (segment (start 136.779 100.203) (end 138.811 102.235) (width 0.254) (layer Cuivre) (net 16)) + (segment (start 141.351 103.98252) (end 143.129 103.9622) (width 0.254) (layer Composant) (net 16) (status 400)) + (segment (start 131.572 100.203) (end 129.667 98.298) (width 0.254) (layer Cuivre) (net 16)) + (segment (start 129.667 98.298) (end 127.762 98.298) (width 0.254) (layer Cuivre) (net 16)) + (segment (start 127.762 98.298) (end 126.111 96.647) (width 0.254) (layer Cuivre) (net 16)) + (segment (start 126.111 96.647) (end 120.142 96.647) (width 0.254) (layer Cuivre) (net 16)) + (segment (start 120.142 96.647) (end 116.713 100.076) (width 0.254) (layer Cuivre) (net 16)) + (segment (start 116.713 100.076) (end 110.871 100.076) (width 0.254) (layer Cuivre) (net 16)) + (segment (start 139.065 102.489) (end 139.573 102.489) (width 0.254) (layer Cuivre) (net 16)) + (segment (start 139.573 102.489) (end 139.827 102.743) (width 0.254) (layer Cuivre) (net 16)) + (segment (start 141.351 103.98252) (end 140.43152 103.98252) (width 0.254) (layer Composant) (net 16)) + (segment (start 138.811 102.235) (end 139.065 102.489) (width 0.254) (layer Cuivre) (net 16)) + (segment (start 140.43152 103.98252) (end 139.827 103.378) (width 0.254) (layer Composant) (net 16)) (segment (start 142.367 101.854) (end 142.367 102.87) (width 0.254) (layer Cuivre) (net 17)) - (segment (start 140.97 101.854) (end 142.0876 102.9716) (width 0.254) (layer Composant) (net 18)) - (segment (start 142.0876 102.9716) (end 143.129 102.9716) (width 0.254) (layer Composant) (net 18) (status 400)) - (segment (start 139.2555 101.7905) (end 137.033 99.568) (width 0.254) (layer Cuivre) (net 18)) - (segment (start 119.888 96.139) (end 126.365 96.139) (width 0.254) (layer Cuivre) (net 18)) - (segment (start 140.9065 101.7905) (end 139.2555 101.7905) (width 0.254) (layer Cuivre) (net 18)) - (via (at 140.97 101.854) (size 0.889) (layers Composant Cuivre) (net 18)) - (segment (start 78.867 108.839) (end 80.645 107.061) (width 0.381) (layer Composant) (net 18) (status 800)) - (segment (start 81.153 106.553) (end 80.645 107.061) (width 0.4318) (layer Composant) (net 18)) - (segment (start 80.518 109.347) (end 81.026 108.839) (width 0.254) (layer Cuivre) (net 18)) - (segment (start 131.953 99.568) (end 137.033 99.568) (width 0.254) (layer Cuivre) (net 18)) - (segment (start 130.175 97.79) (end 131.953 99.568) (width 0.254) (layer Cuivre) (net 18)) - (segment (start 128.016 97.79) (end 130.175 97.79) (width 0.254) (layer Cuivre) (net 18)) - (segment (start 126.365 96.139) (end 128.016 97.79) (width 0.254) (layer Cuivre) (net 18)) - (segment (start 82.3595 106.553) (end 81.153 106.553) (width 0.4318) (layer Composant) (net 18) (status 800)) - (segment (start 116.459 99.568) (end 119.888 96.139) (width 0.254) (layer Cuivre) (net 18)) - (segment (start 110.617 99.568) (end 116.459 99.568) (width 0.254) (layer Cuivre) (net 18)) - (segment (start 105.029 105.156) (end 110.617 99.568) (width 0.254) (layer Cuivre) (net 18)) - (segment (start 82.677 105.156) (end 105.029 105.156) (width 0.254) (layer Cuivre) (net 18)) - (segment (start 81.026 106.807) (end 82.677 105.156) (width 0.254) (layer Cuivre) (net 18)) - (segment (start 81.026 108.839) (end 81.026 106.807) (width 0.254) (layer Cuivre) (net 18)) - (segment (start 79.756 109.347) (end 80.518 109.347) (width 0.254) (layer Cuivre) (net 18)) - (segment (start 140.9065 101.7905) (end 140.97 101.854) (width 0.254) (layer Cuivre) (net 18)) + (via (at 140.97 103.124) (size 0.889) (layers Composant Cuivre) (net 17)) + (segment (start 142.113 103.124) (end 140.97 103.124) (width 0.254) (layer Cuivre) (net 17)) + (segment (start 142.367 102.87) (end 142.113 103.124) (width 0.254) (layer Cuivre) (net 17)) + (segment (start 141.4145 100.9015) (end 142.367 101.854) (width 0.254) (layer Cuivre) (net 17)) + (segment (start 80.264 106.68) (end 82.296 104.648) (width 0.254) (layer Cuivre) (net 17)) + (segment (start 82.296 104.648) (end 104.775 104.648) (width 0.254) (layer Cuivre) (net 17)) + (segment (start 104.775 104.648) (end 110.998 98.425) (width 0.254) (layer Cuivre) (net 17)) + (segment (start 110.998 98.425) (end 110.998 97.663) (width 0.254) (layer Cuivre) (net 17)) + (segment (start 80.264 108.585) (end 80.264 122.682) (width 0.254) (layer GND_layer) (net 17)) + (segment (start 110.998 97.663) (end 111.506 97.155) (width 0.254) (layer Cuivre) (net 17)) + (segment (start 118.11 97.155) (end 119.634 95.631) (width 0.254) (layer Cuivre) (net 17)) + (segment (start 119.634 95.631) (end 126.619 95.631) (width 0.254) (layer Cuivre) (net 17)) + (segment (start 132.207 99.06) (end 137.541 99.06) (width 0.254) (layer Cuivre) (net 17)) + (segment (start 130.429 97.282) (end 132.207 99.06) (width 0.254) (layer Cuivre) (net 17)) + (segment (start 128.27 97.282) (end 130.429 97.282) (width 0.254) (layer Cuivre) (net 17)) + (segment (start 126.619 95.631) (end 128.27 97.282) (width 0.254) (layer Cuivre) (net 17)) + (segment (start 141.4145 100.9015) (end 139.3825 100.9015) (width 0.254) (layer Cuivre) (net 17)) + (segment (start 139.3825 100.9015) (end 137.541 99.06) (width 0.254) (layer Cuivre) (net 17)) + (segment (start 111.506 97.155) (end 118.11 97.155) (width 0.254) (layer Cuivre) (net 17)) + (segment (start 140.97 103.124) (end 141.3002 103.4542) (width 0.254) (layer Composant) (net 17)) + (segment (start 80.264 108.585) (end 80.264 106.68) (width 0.254) (layer Cuivre) (net 17)) + (via (at 80.264 108.585) (size 0.635) (layers Composant Cuivre) (net 17)) + (segment (start 80.264 122.682) (end 78.867 124.079) (width 0.254) (layer GND_layer) (net 17) (status 400)) + (segment (start 141.3002 103.4542) (end 143.129 103.4796) (width 0.254) (layer Composant) (net 17) (status 400)) (segment (start 78.867 108.839) (end 79.756 109.347) (width 0.254) (layer Cuivre) (net 18) (status 800)) - (segment (start 111.379 101.092) (end 117.221 101.092) (width 0.254) (layer Cuivre) (net 19)) - (segment (start 105.791 106.68) (end 111.379 101.092) (width 0.254) (layer Cuivre) (net 19)) - (segment (start 84.328 106.68) (end 105.791 106.68) (width 0.254) (layer Cuivre) (net 19)) - (segment (start 83.058 109.22) (end 83.058 107.95) (width 0.254) (layer Cuivre) (net 19)) - (segment (start 79.248 113.03) (end 83.058 109.22) (width 0.254) (layer Cuivre) (net 19)) - (segment (start 78.867 113.919) (end 79.248 113.03) (width 0.254) (layer Cuivre) (net 19) (status 800)) - (segment (start 82.3595 117.4115) (end 78.867 113.919) (width 0.4318) (layer Composant) (net 19) (status 400)) - (segment (start 83.058 107.95) (end 84.328 106.68) (width 0.254) (layer Cuivre) (net 19)) - (segment (start 140.716 105.664) (end 141.478 106.426) (width 0.254) (layer Cuivre) (net 19)) - (segment (start 141.9352 105.9688) (end 143.129 105.9688) (width 0.254) (layer Composant) (net 19) (status 400)) - (segment (start 141.478 106.426) (end 141.9352 105.9688) (width 0.254) (layer Composant) (net 19)) - (via (at 141.478 106.426) (size 0.889) (layers Composant Cuivre) (net 19)) - (segment (start 129.159 101.346) (end 136.398 101.346) (width 0.254) (layer Cuivre) (net 19)) - (segment (start 142.0114 105.9942) (end 143.129 105.9688) (width 0.254) (layer Composant) (net 19) (status 400)) - (segment (start 82.3595 119.126) (end 82.3595 117.4115) (width 0.4318) (layer Composant) (net 19) (status 800)) - (segment (start 136.398 101.346) (end 140.716 105.664) (width 0.254) (layer Cuivre) (net 19)) - (segment (start 140.716 105.664) (end 140.97 105.918) (width 0.254) (layer Cuivre) (net 19)) - (segment (start 117.983 100.33) (end 128.143 100.33) (width 0.254) (layer Cuivre) (net 19)) - (segment (start 117.221 101.092) (end 117.983 100.33) (width 0.254) (layer Cuivre) (net 19)) + (segment (start 140.9065 101.7905) (end 140.97 101.854) (width 0.254) (layer Cuivre) (net 18)) + (segment (start 79.756 109.347) (end 80.518 109.347) (width 0.254) (layer Cuivre) (net 18)) + (segment (start 81.026 108.839) (end 81.026 106.807) (width 0.254) (layer Cuivre) (net 18)) + (segment (start 81.026 106.807) (end 82.677 105.156) (width 0.254) (layer Cuivre) (net 18)) + (segment (start 82.677 105.156) (end 105.029 105.156) (width 0.254) (layer Cuivre) (net 18)) + (segment (start 105.029 105.156) (end 110.617 99.568) (width 0.254) (layer Cuivre) (net 18)) + (segment (start 110.617 99.568) (end 116.459 99.568) (width 0.254) (layer Cuivre) (net 18)) + (segment (start 116.459 99.568) (end 119.888 96.139) (width 0.254) (layer Cuivre) (net 18)) + (segment (start 82.3595 106.553) (end 81.153 106.553) (width 0.4318) (layer Composant) (net 18) (status 800)) + (segment (start 126.365 96.139) (end 128.016 97.79) (width 0.254) (layer Cuivre) (net 18)) + (segment (start 128.016 97.79) (end 130.175 97.79) (width 0.254) (layer Cuivre) (net 18)) + (segment (start 130.175 97.79) (end 131.953 99.568) (width 0.254) (layer Cuivre) (net 18)) + (segment (start 131.953 99.568) (end 137.033 99.568) (width 0.254) (layer Cuivre) (net 18)) + (segment (start 80.518 109.347) (end 81.026 108.839) (width 0.254) (layer Cuivre) (net 18)) + (segment (start 81.153 106.553) (end 80.645 107.061) (width 0.4318) (layer Composant) (net 18)) + (segment (start 78.867 108.839) (end 80.645 107.061) (width 0.381) (layer Composant) (net 18) (status 800)) + (via (at 140.97 101.854) (size 0.889) (layers Composant Cuivre) (net 18)) + (segment (start 140.9065 101.7905) (end 139.2555 101.7905) (width 0.254) (layer Cuivre) (net 18)) + (segment (start 119.888 96.139) (end 126.365 96.139) (width 0.254) (layer Cuivre) (net 18)) + (segment (start 139.2555 101.7905) (end 137.033 99.568) (width 0.254) (layer Cuivre) (net 18)) + (segment (start 142.0876 102.9716) (end 143.129 102.9716) (width 0.254) (layer Composant) (net 18) (status 400)) + (segment (start 140.97 101.854) (end 142.0876 102.9716) (width 0.254) (layer Composant) (net 18)) (segment (start 128.143 100.33) (end 129.159 101.346) (width 0.254) (layer Cuivre) (net 19)) - (segment (start 120.396 97.155) (end 116.967 100.584) (width 0.254) (layer Cuivre) (net 20)) - (segment (start 125.857 97.155) (end 120.396 97.155) (width 0.254) (layer Cuivre) (net 20)) - (segment (start 111.125 100.584) (end 105.537 106.172) (width 0.254) (layer Cuivre) (net 20)) - (segment (start 129.54 100.838) (end 125.857 97.155) (width 0.254) (layer Cuivre) (net 20)) - (segment (start 129.54 100.838) (end 136.652 100.838) (width 0.254) (layer Cuivre) (net 20)) - (segment (start 136.652 100.838) (end 140.97 105.156) (width 0.254) (layer Cuivre) (net 20)) - (segment (start 141.478 105.283) (end 140.97 105.156) (width 0.254) (layer Cuivre) (net 20)) - (segment (start 116.967 100.584) (end 111.125 100.584) (width 0.254) (layer Cuivre) (net 20)) - (via (at 141.478 105.283) (size 0.635) (layers Composant Cuivre) (net 20)) - (segment (start 142.0114 105.4862) (end 143.129 105.4608) (width 0.254) (layer Composant) (net 20) (status 400)) - (segment (start 141.478 105.283) (end 142.0114 105.4862) (width 0.254) (layer Composant) (net 20)) - (segment (start 81.534 121.412) (end 80.391 120.269) (width 0.4318) (layer Composant) (net 20)) - (segment (start 82.3595 121.412) (end 81.534 121.412) (width 0.4318) (layer Composant) (net 20) (status 800)) - (segment (start 80.391 117.983) (end 80.391 120.269) (width 0.381) (layer Composant) (net 20)) - (segment (start 78.867 116.459) (end 80.391 117.983) (width 0.381) (layer Composant) (net 20) (status 800)) - (segment (start 77.597 115.189) (end 78.867 116.459) (width 0.254) (layer Cuivre) (net 20) (status 400)) - (segment (start 77.597 110.744) (end 77.597 115.189) (width 0.254) (layer Cuivre) (net 20)) - (segment (start 78.232 110.109) (end 77.597 110.744) (width 0.254) (layer Cuivre) (net 20)) - (segment (start 81.28 110.109) (end 78.232 110.109) (width 0.254) (layer Cuivre) (net 20)) - (segment (start 82.55 108.839) (end 81.28 110.109) (width 0.254) (layer Cuivre) (net 20)) - (segment (start 82.55 107.696) (end 82.55 108.839) (width 0.254) (layer Cuivre) (net 20)) - (segment (start 84.074 106.172) (end 82.55 107.696) (width 0.254) (layer Cuivre) (net 20)) + (segment (start 117.221 101.092) (end 117.983 100.33) (width 0.254) (layer Cuivre) (net 19)) + (segment (start 117.983 100.33) (end 128.143 100.33) (width 0.254) (layer Cuivre) (net 19)) + (segment (start 140.716 105.664) (end 140.97 105.918) (width 0.254) (layer Cuivre) (net 19)) + (segment (start 136.398 101.346) (end 140.716 105.664) (width 0.254) (layer Cuivre) (net 19)) + (segment (start 82.3595 119.126) (end 82.3595 117.4115) (width 0.4318) (layer Composant) (net 19) (status 800)) + (segment (start 142.0114 105.9942) (end 143.129 105.9688) (width 0.254) (layer Composant) (net 19) (status 400)) + (segment (start 129.159 101.346) (end 136.398 101.346) (width 0.254) (layer Cuivre) (net 19)) + (via (at 141.478 106.426) (size 0.889) (layers Composant Cuivre) (net 19)) + (segment (start 141.478 106.426) (end 141.9352 105.9688) (width 0.254) (layer Composant) (net 19)) + (segment (start 141.9352 105.9688) (end 143.129 105.9688) (width 0.254) (layer Composant) (net 19) (status 400)) + (segment (start 140.716 105.664) (end 141.478 106.426) (width 0.254) (layer Cuivre) (net 19)) + (segment (start 83.058 107.95) (end 84.328 106.68) (width 0.254) (layer Cuivre) (net 19)) + (segment (start 82.3595 117.4115) (end 78.867 113.919) (width 0.4318) (layer Composant) (net 19) (status 400)) + (segment (start 78.867 113.919) (end 79.248 113.03) (width 0.254) (layer Cuivre) (net 19) (status 800)) + (segment (start 79.248 113.03) (end 83.058 109.22) (width 0.254) (layer Cuivre) (net 19)) + (segment (start 83.058 109.22) (end 83.058 107.95) (width 0.254) (layer Cuivre) (net 19)) + (segment (start 84.328 106.68) (end 105.791 106.68) (width 0.254) (layer Cuivre) (net 19)) + (segment (start 105.791 106.68) (end 111.379 101.092) (width 0.254) (layer Cuivre) (net 19)) + (segment (start 111.379 101.092) (end 117.221 101.092) (width 0.254) (layer Cuivre) (net 19)) (segment (start 105.537 106.172) (end 84.074 106.172) (width 0.254) (layer Cuivre) (net 20)) - (segment (start 97.409 115.062) (end 98.806 115.062) (width 0.381) (layer Composant) (net 21) (status 800)) - (segment (start 98.806 115.062) (end 99.06 114.808) (width 0.381) (layer Composant) (net 21)) - (segment (start 99.06 114.808) (end 99.06 107.061) (width 0.381) (layer Composant) (net 21)) - (via (at 130.048 95.25) (size 0.635) (layers Composant Cuivre) (net 21)) - (via (at 104.013 101.6) (size 0.635) (layers Composant Cuivre) (net 21)) - (segment (start 104.521 101.6) (end 104.013 101.6) (width 0.254) (layer Cuivre) (net 21)) - (segment (start 108.966 97.155) (end 104.521 101.6) (width 0.254) (layer Cuivre) (net 21)) - (segment (start 108.966 92.964) (end 108.966 97.155) (width 0.254) (layer Cuivre) (net 21)) - (segment (start 130.048 99.314) (end 130.048 95.25) (width 0.254) (layer Composant) (net 21)) - (segment (start 110.744 91.186) (end 108.966 92.964) (width 0.254) (layer Cuivre) (net 21)) - (segment (start 126.238 91.186) (end 110.744 91.186) (width 0.254) (layer Cuivre) (net 21)) - (segment (start 130.048 94.996) (end 126.238 91.186) (width 0.254) (layer Cuivre) (net 21)) - (segment (start 130.048 95.25) (end 130.048 94.996) (width 0.254) (layer Cuivre) (net 21)) - (segment (start 128.905 100.457) (end 130.048 99.314) (width 0.254) (layer Composant) (net 21)) - (segment (start 127.635 100.4824) (end 128.905 100.457) (width 0.254) (layer Composant) (net 21) (status 800)) - (segment (start 140.462 142.748) (end 143.764 139.446) (width 0.254) (layer GND_layer) (net 21) (status 400)) - (segment (start 109.093 142.748) (end 140.462 142.748) (width 0.254) (layer GND_layer) (net 21)) - (segment (start 104.267 137.922) (end 109.093 142.748) (width 0.254) (layer GND_layer) (net 21)) - (segment (start 104.267 104.902) (end 104.267 137.922) (width 0.254) (layer GND_layer) (net 21)) - (segment (start 103.251 103.886) (end 104.267 104.902) (width 0.254) (layer GND_layer) (net 21)) - (segment (start 99.06 107.061) (end 102.235 103.886) (width 0.381) (layer Composant) (net 21)) - (segment (start 103.378 101.6) (end 103.251 101.727) (width 0.254) (layer GND_layer) (net 21)) - (segment (start 104.013 101.6) (end 103.378 101.6) (width 0.254) (layer GND_layer) (net 21)) - (segment (start 103.378 101.6) (end 104.013 101.6) (width 0.381) (layer Composant) (net 21)) - (segment (start 102.235 102.743) (end 103.378 101.6) (width 0.381) (layer Composant) (net 21)) - (segment (start 102.235 103.886) (end 102.235 102.743) (width 0.381) (layer Composant) (net 21)) + (segment (start 84.074 106.172) (end 82.55 107.696) (width 0.254) (layer Cuivre) (net 20)) + (segment (start 82.55 107.696) (end 82.55 108.839) (width 0.254) (layer Cuivre) (net 20)) + (segment (start 82.55 108.839) (end 81.28 110.109) (width 0.254) (layer Cuivre) (net 20)) + (segment (start 81.28 110.109) (end 78.232 110.109) (width 0.254) (layer Cuivre) (net 20)) + (segment (start 78.232 110.109) (end 77.597 110.744) (width 0.254) (layer Cuivre) (net 20)) + (segment (start 77.597 110.744) (end 77.597 115.189) (width 0.254) (layer Cuivre) (net 20)) + (segment (start 77.597 115.189) (end 78.867 116.459) (width 0.254) (layer Cuivre) (net 20) (status 400)) + (segment (start 78.867 116.459) (end 80.391 117.983) (width 0.381) (layer Composant) (net 20) (status 800)) + (segment (start 80.391 117.983) (end 80.391 120.269) (width 0.381) (layer Composant) (net 20)) + (segment (start 82.3595 121.412) (end 81.534 121.412) (width 0.4318) (layer Composant) (net 20) (status 800)) + (segment (start 81.534 121.412) (end 80.391 120.269) (width 0.4318) (layer Composant) (net 20)) + (segment (start 141.478 105.283) (end 142.0114 105.4862) (width 0.254) (layer Composant) (net 20)) + (segment (start 142.0114 105.4862) (end 143.129 105.4608) (width 0.254) (layer Composant) (net 20) (status 400)) + (via (at 141.478 105.283) (size 0.635) (layers Composant Cuivre) (net 20)) + (segment (start 116.967 100.584) (end 111.125 100.584) (width 0.254) (layer Cuivre) (net 20)) + (segment (start 141.478 105.283) (end 140.97 105.156) (width 0.254) (layer Cuivre) (net 20)) + (segment (start 136.652 100.838) (end 140.97 105.156) (width 0.254) (layer Cuivre) (net 20)) + (segment (start 129.54 100.838) (end 136.652 100.838) (width 0.254) (layer Cuivre) (net 20)) + (segment (start 129.54 100.838) (end 125.857 97.155) (width 0.254) (layer Cuivre) (net 20)) + (segment (start 111.125 100.584) (end 105.537 106.172) (width 0.254) (layer Cuivre) (net 20)) + (segment (start 125.857 97.155) (end 120.396 97.155) (width 0.254) (layer Cuivre) (net 20)) + (segment (start 120.396 97.155) (end 116.967 100.584) (width 0.254) (layer Cuivre) (net 20)) (segment (start 103.251 101.727) (end 103.251 103.886) (width 0.254) (layer GND_layer) (net 21)) - (segment (start 130.937 95.758) (end 130.683 96.012) (width 0.254) (layer Cuivre) (net 22)) - (via (at 130.937 95.25) (size 0.635) (layers Composant Cuivre) (net 22)) - (segment (start 128.905 96.012) (end 128.397 95.504) (width 0.254) (layer Cuivre) (net 22)) - (segment (start 128.397 95.504) (end 128.397 94.869) (width 0.254) (layer Cuivre) (net 22)) - (segment (start 128.397 94.869) (end 125.73 92.202) (width 0.254) (layer Cuivre) (net 22)) - (segment (start 125.73 92.202) (end 111.252 92.202) (width 0.254) (layer Cuivre) (net 22)) - (segment (start 111.252 92.202) (end 109.982 93.472) (width 0.254) (layer Cuivre) (net 22)) - (segment (start 130.937 99.187) (end 130.937 95.25) (width 0.254) (layer Composant) (net 22)) - (segment (start 109.982 93.472) (end 109.982 97.917) (width 0.254) (layer Cuivre) (net 22)) - (segment (start 109.982 97.917) (end 104.521 103.378) (width 0.254) (layer Cuivre) (net 22)) - (segment (start 104.521 103.378) (end 104.013 103.378) (width 0.254) (layer Cuivre) (net 22)) - (segment (start 130.683 96.012) (end 128.905 96.012) (width 0.254) (layer Cuivre) (net 22)) - (via (at 104.013 103.378) (size 0.635) (layers Composant Cuivre) (net 22)) - (segment (start 97.409 118.872) (end 98.679 118.872) (width 0.381) (layer Composant) (net 22) (status 800)) - (segment (start 98.679 118.872) (end 99.822 117.729) (width 0.381) (layer Composant) (net 22)) - (segment (start 99.822 117.729) (end 99.822 107.569) (width 0.381) (layer Composant) (net 22)) - (segment (start 99.822 107.569) (end 104.013 103.378) (width 0.381) (layer Composant) (net 22)) - (segment (start 141.224 139.446) (end 138.43 142.24) (width 0.254) (layer GND_layer) (net 22) (status 800)) - (segment (start 129.159 100.965) (end 130.937 99.187) (width 0.254) (layer Composant) (net 22)) - (segment (start 127.635 100.9904) (end 129.159 100.965) (width 0.254) (layer Composant) (net 22) (status 800)) - (segment (start 104.775 104.14) (end 104.013 103.378) (width 0.254) (layer GND_layer) (net 22)) - (segment (start 104.775 137.668) (end 104.775 104.14) (width 0.254) (layer GND_layer) (net 22)) - (segment (start 109.347 142.24) (end 104.775 137.668) (width 0.254) (layer GND_layer) (net 22)) - (segment (start 138.43 142.24) (end 109.347 142.24) (width 0.254) (layer GND_layer) (net 22)) + (segment (start 102.235 103.886) (end 102.235 102.743) (width 0.381) (layer Composant) (net 21)) + (segment (start 102.235 102.743) (end 103.378 101.6) (width 0.381) (layer Composant) (net 21)) + (segment (start 103.378 101.6) (end 104.013 101.6) (width 0.381) (layer Composant) (net 21)) + (segment (start 104.013 101.6) (end 103.378 101.6) (width 0.254) (layer GND_layer) (net 21)) + (segment (start 103.378 101.6) (end 103.251 101.727) (width 0.254) (layer GND_layer) (net 21)) + (segment (start 99.06 107.061) (end 102.235 103.886) (width 0.381) (layer Composant) (net 21)) + (segment (start 103.251 103.886) (end 104.267 104.902) (width 0.254) (layer GND_layer) (net 21)) + (segment (start 104.267 104.902) (end 104.267 137.922) (width 0.254) (layer GND_layer) (net 21)) + (segment (start 104.267 137.922) (end 109.093 142.748) (width 0.254) (layer GND_layer) (net 21)) + (segment (start 109.093 142.748) (end 140.462 142.748) (width 0.254) (layer GND_layer) (net 21)) + (segment (start 140.462 142.748) (end 143.764 139.446) (width 0.254) (layer GND_layer) (net 21) (status 400)) + (segment (start 127.635 100.4824) (end 128.905 100.457) (width 0.254) (layer Composant) (net 21) (status 800)) + (segment (start 128.905 100.457) (end 130.048 99.314) (width 0.254) (layer Composant) (net 21)) + (segment (start 130.048 95.25) (end 130.048 94.996) (width 0.254) (layer Cuivre) (net 21)) + (segment (start 130.048 94.996) (end 126.238 91.186) (width 0.254) (layer Cuivre) (net 21)) + (segment (start 126.238 91.186) (end 110.744 91.186) (width 0.254) (layer Cuivre) (net 21)) + (segment (start 110.744 91.186) (end 108.966 92.964) (width 0.254) (layer Cuivre) (net 21)) + (segment (start 130.048 99.314) (end 130.048 95.25) (width 0.254) (layer Composant) (net 21)) + (segment (start 108.966 92.964) (end 108.966 97.155) (width 0.254) (layer Cuivre) (net 21)) + (segment (start 108.966 97.155) (end 104.521 101.6) (width 0.254) (layer Cuivre) (net 21)) + (segment (start 104.521 101.6) (end 104.013 101.6) (width 0.254) (layer Cuivre) (net 21)) + (via (at 104.013 101.6) (size 0.635) (layers Composant Cuivre) (net 21)) + (via (at 130.048 95.25) (size 0.635) (layers Composant Cuivre) (net 21)) + (segment (start 99.06 114.808) (end 99.06 107.061) (width 0.381) (layer Composant) (net 21)) + (segment (start 98.806 115.062) (end 99.06 114.808) (width 0.381) (layer Composant) (net 21)) + (segment (start 97.409 115.062) (end 98.806 115.062) (width 0.381) (layer Composant) (net 21) (status 800)) (segment (start 130.937 95.25) (end 130.937 95.758) (width 0.254) (layer Cuivre) (net 22)) - (segment (start 129.159 95.25) (end 129.159 97.536) (width 0.254) (layer Composant) (net 23)) - (segment (start 109.474 93.218) (end 109.474 97.536) (width 0.254) (layer Cuivre) (net 23)) - (segment (start 109.474 97.536) (end 104.521 102.489) (width 0.254) (layer Cuivre) (net 23)) - (segment (start 104.521 102.489) (end 104.013 102.489) (width 0.254) (layer Cuivre) (net 23)) - (segment (start 138.684 139.446) (end 136.398 141.732) (width 0.254) (layer GND_layer) (net 23) (status 800)) - (segment (start 136.398 141.732) (end 109.601 141.732) (width 0.254) (layer GND_layer) (net 23)) - (segment (start 109.601 141.732) (end 105.283 137.414) (width 0.254) (layer GND_layer) (net 23)) - (segment (start 105.283 137.414) (end 105.283 103.632) (width 0.254) (layer GND_layer) (net 23)) - (segment (start 105.283 103.632) (end 104.394 102.743) (width 0.254) (layer GND_layer) (net 23)) - (segment (start 104.394 102.743) (end 104.013 102.489) (width 0.254) (layer GND_layer) (net 23)) - (segment (start 129.159 97.536) (end 128.7272 97.9678) (width 0.254) (layer Composant) (net 23)) - (segment (start 128.7272 97.9678) (end 127.635 97.9678) (width 0.254) (layer Composant) (net 23) (status 400)) - (segment (start 102.743 116.332) (end 104.013 116.332) (width 0.381) (layer Composant) (net 23) (status 800)) - (segment (start 104.013 116.332) (end 105.283 115.062) (width 0.381) (layer Composant) (net 23)) - (segment (start 105.283 115.062) (end 105.283 102.997) (width 0.381) (layer Composant) (net 23)) - (segment (start 105.283 102.997) (end 104.775 102.489) (width 0.381) (layer Composant) (net 23)) - (segment (start 104.775 102.489) (end 104.013 102.489) (width 0.381) (layer Composant) (net 23)) - (via (at 104.013 102.489) (size 0.635) (layers Composant Cuivre) (net 23)) - (via (at 129.159 95.25) (size 0.635) (layers Composant Cuivre) (net 23)) - (segment (start 110.998 91.694) (end 109.474 93.218) (width 0.254) (layer Cuivre) (net 23)) - (segment (start 125.984 91.694) (end 110.998 91.694) (width 0.254) (layer Cuivre) (net 23)) - (segment (start 129.159 94.869) (end 125.984 91.694) (width 0.254) (layer Cuivre) (net 23)) + (segment (start 138.43 142.24) (end 109.347 142.24) (width 0.254) (layer GND_layer) (net 22)) + (segment (start 109.347 142.24) (end 104.775 137.668) (width 0.254) (layer GND_layer) (net 22)) + (segment (start 104.775 137.668) (end 104.775 104.14) (width 0.254) (layer GND_layer) (net 22)) + (segment (start 104.775 104.14) (end 104.013 103.378) (width 0.254) (layer GND_layer) (net 22)) + (segment (start 127.635 100.9904) (end 129.159 100.965) (width 0.254) (layer Composant) (net 22) (status 800)) + (segment (start 129.159 100.965) (end 130.937 99.187) (width 0.254) (layer Composant) (net 22)) + (segment (start 141.224 139.446) (end 138.43 142.24) (width 0.254) (layer GND_layer) (net 22) (status 800)) + (segment (start 99.822 107.569) (end 104.013 103.378) (width 0.381) (layer Composant) (net 22)) + (segment (start 99.822 117.729) (end 99.822 107.569) (width 0.381) (layer Composant) (net 22)) + (segment (start 98.679 118.872) (end 99.822 117.729) (width 0.381) (layer Composant) (net 22)) + (segment (start 97.409 118.872) (end 98.679 118.872) (width 0.381) (layer Composant) (net 22) (status 800)) + (via (at 104.013 103.378) (size 0.635) (layers Composant Cuivre) (net 22)) + (segment (start 130.683 96.012) (end 128.905 96.012) (width 0.254) (layer Cuivre) (net 22)) + (segment (start 104.521 103.378) (end 104.013 103.378) (width 0.254) (layer Cuivre) (net 22)) + (segment (start 109.982 97.917) (end 104.521 103.378) (width 0.254) (layer Cuivre) (net 22)) + (segment (start 109.982 93.472) (end 109.982 97.917) (width 0.254) (layer Cuivre) (net 22)) + (segment (start 130.937 99.187) (end 130.937 95.25) (width 0.254) (layer Composant) (net 22)) + (segment (start 111.252 92.202) (end 109.982 93.472) (width 0.254) (layer Cuivre) (net 22)) + (segment (start 125.73 92.202) (end 111.252 92.202) (width 0.254) (layer Cuivre) (net 22)) + (segment (start 128.397 94.869) (end 125.73 92.202) (width 0.254) (layer Cuivre) (net 22)) + (segment (start 128.397 95.504) (end 128.397 94.869) (width 0.254) (layer Cuivre) (net 22)) + (segment (start 128.905 96.012) (end 128.397 95.504) (width 0.254) (layer Cuivre) (net 22)) + (via (at 130.937 95.25) (size 0.635) (layers Composant Cuivre) (net 22)) + (segment (start 130.937 95.758) (end 130.683 96.012) (width 0.254) (layer Cuivre) (net 22)) (segment (start 129.159 95.25) (end 129.159 94.869) (width 0.254) (layer Cuivre) (net 23)) - (segment (start 127.635 98.4758) (end 126.619 98.4758) (width 0.254) (layer Composant) (net 24) (status 800)) - (segment (start 136.144 139.446) (end 134.366 141.224) (width 0.254) (layer GND_layer) (net 24) (status 800)) - (segment (start 134.366 141.224) (end 109.855 141.224) (width 0.254) (layer GND_layer) (net 24)) - (segment (start 109.855 141.224) (end 105.791 137.16) (width 0.254) (layer GND_layer) (net 24)) - (segment (start 105.791 137.16) (end 105.791 102.362) (width 0.254) (layer GND_layer) (net 24)) - (segment (start 108.458 92.71) (end 108.458 96.266) (width 0.254) (layer Cuivre) (net 24)) - (segment (start 108.458 96.266) (end 104.013 100.711) (width 0.254) (layer Cuivre) (net 24)) - (segment (start 102.743 120.142) (end 104.14 120.142) (width 0.381) (layer Composant) (net 24) (status 800)) - (segment (start 104.14 120.142) (end 106.045 118.237) (width 0.381) (layer Composant) (net 24)) - (segment (start 106.045 118.237) (end 106.045 101.727) (width 0.381) (layer Composant) (net 24)) - (segment (start 106.045 101.727) (end 105.029 100.711) (width 0.381) (layer Composant) (net 24)) - (segment (start 105.029 100.711) (end 104.013 100.711) (width 0.381) (layer Composant) (net 24)) - (via (at 104.013 100.711) (size 0.635) (layers Composant Cuivre) (net 24)) - (segment (start 104.394 100.965) (end 104.013 100.711) (width 0.254) (layer GND_layer) (net 24)) - (via (at 122.936 90.043) (size 0.889) (layers Composant Cuivre) (net 24)) - (segment (start 126.619 98.4758) (end 126.0856 97.9424) (width 0.254) (layer Composant) (net 24)) - (segment (start 126.0856 97.9424) (end 125.1204 97.9424) (width 0.254) (layer Composant) (net 24)) - (segment (start 125.1204 97.9424) (end 121.412 94.234) (width 0.254) (layer Composant) (net 24)) - (segment (start 121.412 94.234) (end 121.412 91.821) (width 0.254) (layer Composant) (net 24)) - (segment (start 121.412 91.821) (end 122.936 90.043) (width 0.254) (layer Composant) (net 24)) - (segment (start 122.936 90.043) (end 122.428 90.678) (width 0.254) (layer Cuivre) (net 24)) - (segment (start 122.428 90.678) (end 110.49 90.678) (width 0.254) (layer Cuivre) (net 24)) - (segment (start 110.49 90.678) (end 108.458 92.71) (width 0.254) (layer Cuivre) (net 24)) + (segment (start 129.159 94.869) (end 125.984 91.694) (width 0.254) (layer Cuivre) (net 23)) + (segment (start 125.984 91.694) (end 110.998 91.694) (width 0.254) (layer Cuivre) (net 23)) + (segment (start 110.998 91.694) (end 109.474 93.218) (width 0.254) (layer Cuivre) (net 23)) + (via (at 129.159 95.25) (size 0.635) (layers Composant Cuivre) (net 23)) + (via (at 104.013 102.489) (size 0.635) (layers Composant Cuivre) (net 23)) + (segment (start 104.775 102.489) (end 104.013 102.489) (width 0.381) (layer Composant) (net 23)) + (segment (start 105.283 102.997) (end 104.775 102.489) (width 0.381) (layer Composant) (net 23)) + (segment (start 105.283 115.062) (end 105.283 102.997) (width 0.381) (layer Composant) (net 23)) + (segment (start 104.013 116.332) (end 105.283 115.062) (width 0.381) (layer Composant) (net 23)) + (segment (start 102.743 116.332) (end 104.013 116.332) (width 0.381) (layer Composant) (net 23) (status 800)) + (segment (start 128.7272 97.9678) (end 127.635 97.9678) (width 0.254) (layer Composant) (net 23) (status 400)) + (segment (start 129.159 97.536) (end 128.7272 97.9678) (width 0.254) (layer Composant) (net 23)) + (segment (start 104.394 102.743) (end 104.013 102.489) (width 0.254) (layer GND_layer) (net 23)) + (segment (start 105.283 103.632) (end 104.394 102.743) (width 0.254) (layer GND_layer) (net 23)) + (segment (start 105.283 137.414) (end 105.283 103.632) (width 0.254) (layer GND_layer) (net 23)) + (segment (start 109.601 141.732) (end 105.283 137.414) (width 0.254) (layer GND_layer) (net 23)) + (segment (start 136.398 141.732) (end 109.601 141.732) (width 0.254) (layer GND_layer) (net 23)) + (segment (start 138.684 139.446) (end 136.398 141.732) (width 0.254) (layer GND_layer) (net 23) (status 800)) + (segment (start 104.521 102.489) (end 104.013 102.489) (width 0.254) (layer Cuivre) (net 23)) + (segment (start 109.474 97.536) (end 104.521 102.489) (width 0.254) (layer Cuivre) (net 23)) + (segment (start 109.474 93.218) (end 109.474 97.536) (width 0.254) (layer Cuivre) (net 23)) + (segment (start 129.159 95.25) (end 129.159 97.536) (width 0.254) (layer Composant) (net 23)) (segment (start 105.791 102.362) (end 104.394 100.965) (width 0.254) (layer GND_layer) (net 24)) - (via (at 134.112 105.156) (size 0.635) (layers Composant Cuivre) (net 25)) - (segment (start 132.842 107.823) (end 132.842 106.299) (width 0.254) (layer Composant) (net 25)) - (segment (start 132.842 106.299) (end 133.731 105.41) (width 0.254) (layer Composant) (net 25)) - (via (at 134.493 135.001) (size 0.635) (layers Composant Cuivre) (net 25)) - (segment (start 133.604 105.156) (end 134.112 105.156) (width 0.254) (layer GND_layer) (net 25)) - (segment (start 133.223 105.537) (end 133.604 105.156) (width 0.254) (layer GND_layer) (net 25)) - (segment (start 134.493 135.001) (end 134.493 128.524) (width 0.254) (layer GND_layer) (net 25)) - (segment (start 133.223 106.045) (end 133.223 105.537) (width 0.254) (layer GND_layer) (net 25)) - (segment (start 131.953 107.315) (end 133.223 106.045) (width 0.254) (layer GND_layer) (net 25)) - (segment (start 131.953 125.984) (end 131.953 107.315) (width 0.254) (layer GND_layer) (net 25)) - (segment (start 134.493 128.524) (end 131.953 125.984) (width 0.254) (layer GND_layer) (net 25)) - (segment (start 134.493 134.366) (end 134.493 135.001) (width 0.254) (layer Cuivre) (net 25)) - (segment (start 133.858 133.731) (end 134.493 134.366) (width 0.254) (layer Cuivre) (net 25)) - (segment (start 126.619 133.731) (end 133.858 133.731) (width 0.254) (layer Cuivre) (net 25)) - (segment (start 123.444 136.906) (end 126.619 133.731) (width 0.254) (layer Cuivre) (net 25) (status 800)) - (segment (start 133.731 105.41) (end 134.112 105.156) (width 0.254) (layer Composant) (net 25)) - (segment (start 132.8928 109.22) (end 132.8928 108.1278) (width 0.254) (layer Composant) (net 25) (status 800)) + (segment (start 110.49 90.678) (end 108.458 92.71) (width 0.254) (layer Cuivre) (net 24)) + (segment (start 122.428 90.678) (end 110.49 90.678) (width 0.254) (layer Cuivre) (net 24)) + (segment (start 122.936 90.043) (end 122.428 90.678) (width 0.254) (layer Cuivre) (net 24)) + (segment (start 121.412 91.821) (end 122.936 90.043) (width 0.254) (layer Composant) (net 24)) + (segment (start 121.412 94.234) (end 121.412 91.821) (width 0.254) (layer Composant) (net 24)) + (segment (start 125.1204 97.9424) (end 121.412 94.234) (width 0.254) (layer Composant) (net 24)) + (segment (start 126.0856 97.9424) (end 125.1204 97.9424) (width 0.254) (layer Composant) (net 24)) + (segment (start 126.619 98.4758) (end 126.0856 97.9424) (width 0.254) (layer Composant) (net 24)) + (via (at 122.936 90.043) (size 0.889) (layers Composant Cuivre) (net 24)) + (segment (start 104.394 100.965) (end 104.013 100.711) (width 0.254) (layer GND_layer) (net 24)) + (via (at 104.013 100.711) (size 0.635) (layers Composant Cuivre) (net 24)) + (segment (start 105.029 100.711) (end 104.013 100.711) (width 0.381) (layer Composant) (net 24)) + (segment (start 106.045 101.727) (end 105.029 100.711) (width 0.381) (layer Composant) (net 24)) + (segment (start 106.045 118.237) (end 106.045 101.727) (width 0.381) (layer Composant) (net 24)) + (segment (start 104.14 120.142) (end 106.045 118.237) (width 0.381) (layer Composant) (net 24)) + (segment (start 102.743 120.142) (end 104.14 120.142) (width 0.381) (layer Composant) (net 24) (status 800)) + (segment (start 108.458 96.266) (end 104.013 100.711) (width 0.254) (layer Cuivre) (net 24)) + (segment (start 108.458 92.71) (end 108.458 96.266) (width 0.254) (layer Cuivre) (net 24)) + (segment (start 105.791 137.16) (end 105.791 102.362) (width 0.254) (layer GND_layer) (net 24)) + (segment (start 109.855 141.224) (end 105.791 137.16) (width 0.254) (layer GND_layer) (net 24)) + (segment (start 134.366 141.224) (end 109.855 141.224) (width 0.254) (layer GND_layer) (net 24)) + (segment (start 136.144 139.446) (end 134.366 141.224) (width 0.254) (layer GND_layer) (net 24) (status 800)) + (segment (start 127.635 98.4758) (end 126.619 98.4758) (width 0.254) (layer Composant) (net 24) (status 800)) (segment (start 132.8928 108.1278) (end 132.842 107.823) (width 0.254) (layer Composant) (net 25)) - (segment (start 133.604 106.426) (end 132.461 107.569) (width 0.254) (layer GND_layer) (net 26)) - (segment (start 134.112 106.045) (end 133.604 106.426) (width 0.254) (layer GND_layer) (net 26)) - (segment (start 135.382 134.366) (end 135.382 135.001) (width 0.254) (layer Cuivre) (net 26)) - (segment (start 134.239 133.223) (end 135.382 134.366) (width 0.254) (layer Cuivre) (net 26)) - (segment (start 125.349 133.223) (end 134.239 133.223) (width 0.254) (layer Cuivre) (net 26)) - (segment (start 122.174 136.398) (end 125.349 133.223) (width 0.254) (layer Cuivre) (net 26)) - (segment (start 122.174 138.176) (end 122.174 136.398) (width 0.254) (layer Cuivre) (net 26)) - (segment (start 123.444 139.446) (end 122.174 138.176) (width 0.254) (layer Cuivre) (net 26) (status 800)) - (segment (start 133.3754 106.6546) (end 133.3754 109.22) (width 0.254) (layer Composant) (net 26) (status 400)) - (segment (start 132.461 125.73) (end 135.382 128.651) (width 0.254) (layer GND_layer) (net 26)) - (segment (start 135.382 128.651) (end 135.382 135.001) (width 0.254) (layer GND_layer) (net 26)) - (segment (start 134.112 106.045) (end 133.731 106.299) (width 0.254) (layer Composant) (net 26)) - (segment (start 133.731 106.299) (end 133.3754 106.6546) (width 0.254) (layer Composant) (net 26)) - (via (at 135.382 135.001) (size 0.635) (layers Composant Cuivre) (net 26)) - (via (at 134.112 106.045) (size 0.635) (layers Composant Cuivre) (net 26)) + (segment (start 132.8928 109.22) (end 132.8928 108.1278) (width 0.254) (layer Composant) (net 25) (status 800)) + (segment (start 133.731 105.41) (end 134.112 105.156) (width 0.254) (layer Composant) (net 25)) + (segment (start 123.444 136.906) (end 126.619 133.731) (width 0.254) (layer Cuivre) (net 25) (status 800)) + (segment (start 126.619 133.731) (end 133.858 133.731) (width 0.254) (layer Cuivre) (net 25)) + (segment (start 133.858 133.731) (end 134.493 134.366) (width 0.254) (layer Cuivre) (net 25)) + (segment (start 134.493 134.366) (end 134.493 135.001) (width 0.254) (layer Cuivre) (net 25)) + (segment (start 134.493 128.524) (end 131.953 125.984) (width 0.254) (layer GND_layer) (net 25)) + (segment (start 131.953 125.984) (end 131.953 107.315) (width 0.254) (layer GND_layer) (net 25)) + (segment (start 131.953 107.315) (end 133.223 106.045) (width 0.254) (layer GND_layer) (net 25)) + (segment (start 133.223 106.045) (end 133.223 105.537) (width 0.254) (layer GND_layer) (net 25)) + (segment (start 134.493 135.001) (end 134.493 128.524) (width 0.254) (layer GND_layer) (net 25)) + (segment (start 133.223 105.537) (end 133.604 105.156) (width 0.254) (layer GND_layer) (net 25)) + (segment (start 133.604 105.156) (end 134.112 105.156) (width 0.254) (layer GND_layer) (net 25)) + (via (at 134.493 135.001) (size 0.635) (layers Composant Cuivre) (net 25)) + (segment (start 132.842 106.299) (end 133.731 105.41) (width 0.254) (layer Composant) (net 25)) + (segment (start 132.842 107.823) (end 132.842 106.299) (width 0.254) (layer Composant) (net 25)) + (via (at 134.112 105.156) (size 0.635) (layers Composant Cuivre) (net 25)) (segment (start 132.461 107.569) (end 132.461 125.73) (width 0.254) (layer GND_layer) (net 26)) - (segment (start 132.969 125.476) (end 132.969 108.077) (width 0.254) (layer GND_layer) (net 27)) - (segment (start 132.969 108.077) (end 134.112 106.934) (width 0.254) (layer GND_layer) (net 27)) - (segment (start 120.904 136.906) (end 125.095 132.715) (width 0.254) (layer Cuivre) (net 27) (status 800)) - (segment (start 125.095 132.715) (end 134.62 132.715) (width 0.254) (layer Cuivre) (net 27)) - (segment (start 136.271 134.366) (end 136.271 135.001) (width 0.254) (layer Cuivre) (net 27)) - (segment (start 136.271 128.778) (end 132.969 125.476) (width 0.254) (layer GND_layer) (net 27)) - (segment (start 134.3914 107.823) (end 134.112 106.934) (width 0.254) (layer Composant) (net 27)) - (via (at 136.271 135.001) (size 0.635) (layers Composant Cuivre) (net 27)) - (via (at 134.112 106.934) (size 0.635) (layers Composant Cuivre) (net 27)) - (segment (start 136.271 135.001) (end 136.271 128.778) (width 0.254) (layer GND_layer) (net 27)) - (segment (start 134.62 132.715) (end 136.271 134.366) (width 0.254) (layer Cuivre) (net 27)) + (via (at 134.112 106.045) (size 0.635) (layers Composant Cuivre) (net 26)) + (via (at 135.382 135.001) (size 0.635) (layers Composant Cuivre) (net 26)) + (segment (start 133.731 106.299) (end 133.3754 106.6546) (width 0.254) (layer Composant) (net 26)) + (segment (start 134.112 106.045) (end 133.731 106.299) (width 0.254) (layer Composant) (net 26)) + (segment (start 135.382 128.651) (end 135.382 135.001) (width 0.254) (layer GND_layer) (net 26)) + (segment (start 132.461 125.73) (end 135.382 128.651) (width 0.254) (layer GND_layer) (net 26)) + (segment (start 133.3754 106.6546) (end 133.3754 109.22) (width 0.254) (layer Composant) (net 26) (status 400)) + (segment (start 123.444 139.446) (end 122.174 138.176) (width 0.254) (layer Cuivre) (net 26) (status 800)) + (segment (start 122.174 138.176) (end 122.174 136.398) (width 0.254) (layer Cuivre) (net 26)) + (segment (start 122.174 136.398) (end 125.349 133.223) (width 0.254) (layer Cuivre) (net 26)) + (segment (start 125.349 133.223) (end 134.239 133.223) (width 0.254) (layer Cuivre) (net 26)) + (segment (start 134.239 133.223) (end 135.382 134.366) (width 0.254) (layer Cuivre) (net 26)) + (segment (start 135.382 134.366) (end 135.382 135.001) (width 0.254) (layer Cuivre) (net 26)) + (segment (start 134.112 106.045) (end 133.604 106.426) (width 0.254) (layer GND_layer) (net 26)) + (segment (start 133.604 106.426) (end 132.461 107.569) (width 0.254) (layer GND_layer) (net 26)) (segment (start 134.3914 109.22) (end 134.3914 107.823) (width 0.254) (layer Composant) (net 27) (status 800)) - (segment (start 133.477 125.222) (end 133.477 109.601) (width 0.254) (layer GND_layer) (net 28)) - (segment (start 133.477 109.601) (end 135.001 108.077) (width 0.254) (layer GND_layer) (net 28)) - (segment (start 135.001 108.077) (end 135.001 106.934) (width 0.254) (layer GND_layer) (net 28)) - (segment (start 135.001 106.934) (end 134.874 107.569) (width 0.254) (layer Composant) (net 28)) - (segment (start 134.874 107.569) (end 134.8994 109.22) (width 0.254) (layer Composant) (net 28) (status 400)) - (via (at 135.001 106.934) (size 0.635) (layers Composant Cuivre) (net 28)) - (via (at 137.16 135.001) (size 0.635) (layers Composant Cuivre) (net 28)) - (segment (start 137.16 135.001) (end 137.16 128.905) (width 0.254) (layer GND_layer) (net 28)) - (segment (start 123.825 132.207) (end 135.128 132.207) (width 0.254) (layer Cuivre) (net 28)) - (segment (start 119.634 136.398) (end 123.825 132.207) (width 0.254) (layer Cuivre) (net 28)) - (segment (start 119.634 138.176) (end 119.634 136.398) (width 0.254) (layer Cuivre) (net 28)) - (segment (start 120.904 139.446) (end 119.634 138.176) (width 0.254) (layer Cuivre) (net 28) (status 800)) - (segment (start 135.128 132.207) (end 137.16 134.239) (width 0.254) (layer Cuivre) (net 28)) - (segment (start 137.16 134.239) (end 137.16 135.001) (width 0.254) (layer Cuivre) (net 28)) + (segment (start 134.62 132.715) (end 136.271 134.366) (width 0.254) (layer Cuivre) (net 27)) + (segment (start 136.271 135.001) (end 136.271 128.778) (width 0.254) (layer GND_layer) (net 27)) + (via (at 134.112 106.934) (size 0.635) (layers Composant Cuivre) (net 27)) + (via (at 136.271 135.001) (size 0.635) (layers Composant Cuivre) (net 27)) + (segment (start 134.3914 107.823) (end 134.112 106.934) (width 0.254) (layer Composant) (net 27)) + (segment (start 136.271 128.778) (end 132.969 125.476) (width 0.254) (layer GND_layer) (net 27)) + (segment (start 136.271 134.366) (end 136.271 135.001) (width 0.254) (layer Cuivre) (net 27)) + (segment (start 125.095 132.715) (end 134.62 132.715) (width 0.254) (layer Cuivre) (net 27)) + (segment (start 120.904 136.906) (end 125.095 132.715) (width 0.254) (layer Cuivre) (net 27) (status 800)) + (segment (start 132.969 108.077) (end 134.112 106.934) (width 0.254) (layer GND_layer) (net 27)) + (segment (start 132.969 125.476) (end 132.969 108.077) (width 0.254) (layer GND_layer) (net 27)) (segment (start 137.16 128.905) (end 133.477 125.222) (width 0.254) (layer GND_layer) (net 28)) - (segment (start 143.891 97.536) (end 148.209 97.536) (width 0.254) (layer Cuivre) (net 29)) - (segment (start 149.225 112.903) (end 149.225 100.203) (width 0.254) (layer GND_layer) (net 29)) - (segment (start 145.288 135.382) (end 145.288 116.586) (width 0.254) (layer GND_layer) (net 29)) - (segment (start 168.7195 117.094) (end 168.7195 117.0305) (width 0.4318) (layer Composant) (net 29) (status 800)) - (segment (start 168.7195 117.0305) (end 167.259 115.57) (width 0.4318) (layer Composant) (net 29)) - (segment (start 168.783 104.902) (end 167.259 103.378) (width 0.381) (layer Composant) (net 29)) - (segment (start 167.259 103.378) (end 167.259 97.282) (width 0.381) (layer Composant) (net 29)) - (segment (start 167.259 97.282) (end 166.751 96.774) (width 0.381) (layer Composant) (net 29)) - (segment (start 166.751 96.774) (end 163.449 96.774) (width 0.381) (layer Composant) (net 29)) - (segment (start 163.449 96.774) (end 160.528 99.695) (width 0.381) (layer Composant) (net 29)) - (segment (start 160.528 99.695) (end 150.876 99.695) (width 0.381) (layer Composant) (net 29)) - (segment (start 150.876 99.695) (end 150.622 99.441) (width 0.381) (layer Composant) (net 29)) - (segment (start 150.622 99.441) (end 150.495 99.06) (width 0.381) (layer Composant) (net 29)) - (segment (start 168.529 108.077) (end 168.783 107.823) (width 0.4318) (layer Composant) (net 29) (status 800)) - (segment (start 145.288 116.586) (end 147.701 114.173) (width 0.254) (layer GND_layer) (net 29)) - (segment (start 147.701 114.173) (end 147.955 114.173) (width 0.254) (layer GND_layer) (net 29)) - (segment (start 149.225 100.203) (end 150.495 99.06) (width 0.254) (layer GND_layer) (net 29)) - (segment (start 148.209 97.536) (end 149.733 99.06) (width 0.254) (layer Cuivre) (net 29)) - (segment (start 149.733 99.06) (end 150.495 99.06) (width 0.254) (layer Cuivre) (net 29)) - (segment (start 143.129 100.457) (end 141.2494 100.4824) (width 0.254) (layer Composant) (net 29) (status 800)) - (segment (start 168.275 109.474) (end 168.275 108.331) (width 0.4318) (layer Composant) (net 29)) - (segment (start 168.275 108.331) (end 168.529 108.077) (width 0.4318) (layer Composant) (net 29) (status 400)) - (segment (start 167.259 115.57) (end 167.259 110.49) (width 0.381) (layer Composant) (net 29)) - (segment (start 167.259 110.49) (end 168.275 109.474) (width 0.381) (layer Composant) (net 29)) - (segment (start 176.149 108.077) (end 168.529 108.077) (width 0.4318) (layer Composant) (net 29) (status C00)) - (via (at 150.495 99.06) (size 0.635) (layers Composant Cuivre) (net 29)) - (segment (start 140.3604 100.4824) (end 141.2494 100.4824) (width 0.254) (layer Composant) (net 29)) - (segment (start 168.783 107.823) (end 168.783 104.902) (width 0.4318) (layer Composant) (net 29)) - (segment (start 138.811 98.933) (end 140.3604 100.4824) (width 0.254) (layer Composant) (net 29)) - (segment (start 147.955 114.173) (end 149.225 112.903) (width 0.254) (layer GND_layer) (net 29)) - (via (at 138.811 98.933) (size 0.889) (layers Composant Cuivre) (net 29)) - (segment (start 138.811 98.933) (end 142.494 98.933) (width 0.254) (layer Cuivre) (net 29)) - (segment (start 142.494 98.933) (end 143.891 97.536) (width 0.254) (layer Cuivre) (net 29)) + (segment (start 137.16 134.239) (end 137.16 135.001) (width 0.254) (layer Cuivre) (net 28)) + (segment (start 135.128 132.207) (end 137.16 134.239) (width 0.254) (layer Cuivre) (net 28)) + (segment (start 120.904 139.446) (end 119.634 138.176) (width 0.254) (layer Cuivre) (net 28) (status 800)) + (segment (start 119.634 138.176) (end 119.634 136.398) (width 0.254) (layer Cuivre) (net 28)) + (segment (start 119.634 136.398) (end 123.825 132.207) (width 0.254) (layer Cuivre) (net 28)) + (segment (start 123.825 132.207) (end 135.128 132.207) (width 0.254) (layer Cuivre) (net 28)) + (segment (start 137.16 135.001) (end 137.16 128.905) (width 0.254) (layer GND_layer) (net 28)) + (via (at 137.16 135.001) (size 0.635) (layers Composant Cuivre) (net 28)) + (via (at 135.001 106.934) (size 0.635) (layers Composant Cuivre) (net 28)) + (segment (start 134.874 107.569) (end 134.8994 109.22) (width 0.254) (layer Composant) (net 28) (status 400)) + (segment (start 135.001 106.934) (end 134.874 107.569) (width 0.254) (layer Composant) (net 28)) + (segment (start 135.001 108.077) (end 135.001 106.934) (width 0.254) (layer GND_layer) (net 28)) + (segment (start 133.477 109.601) (end 135.001 108.077) (width 0.254) (layer GND_layer) (net 28)) + (segment (start 133.477 125.222) (end 133.477 109.601) (width 0.254) (layer GND_layer) (net 28)) (segment (start 143.764 136.906) (end 145.288 135.382) (width 0.254) (layer GND_layer) (net 29) (status 800)) - (via (at 138.811 96.266) (size 0.889) (layers Composant Cuivre) (net 30)) - (segment (start 141.5034 99.9744) (end 143.129 99.9744) (width 0.254) (layer Composant) (net 30) (status 400)) - (segment (start 138.811 97.282) (end 141.5034 99.9744) (width 0.254) (layer Composant) (net 30)) - (segment (start 166.497 97.917) (end 166.497 103.759) (width 0.381) (layer Composant) (net 30)) - (segment (start 166.497 103.759) (end 168.021 105.283) (width 0.381) (layer Composant) (net 30)) - (segment (start 168.021 105.283) (end 168.021 106.807) (width 0.381) (layer Composant) (net 30)) - (segment (start 168.021 106.807) (end 166.497 108.331) (width 0.381) (layer Composant) (net 30)) - (segment (start 166.497 108.331) (end 166.497 117.602) (width 0.381) (layer Composant) (net 30)) - (segment (start 143.51 97.028) (end 148.59 97.028) (width 0.254) (layer Cuivre) (net 30)) - (segment (start 149.733 98.171) (end 148.59 97.028) (width 0.254) (layer Cuivre) (net 30)) - (segment (start 150.495 100.457) (end 149.733 99.695) (width 0.254) (layer Composant) (net 30)) - (segment (start 149.733 99.695) (end 149.733 98.425) (width 0.254) (layer Composant) (net 30)) - (segment (start 149.733 98.425) (end 149.987 98.171) (width 0.254) (layer Composant) (net 30)) - (segment (start 166.116 97.536) (end 166.497 97.917) (width 0.381) (layer Composant) (net 30)) - (segment (start 149.987 98.171) (end 150.495 98.171) (width 0.254) (layer Composant) (net 30)) - (segment (start 166.497 117.602) (end 168.656 119.761) (width 0.381) (layer Composant) (net 30) (status 400)) - (segment (start 141.224 136.906) (end 144.78 133.35) (width 0.254) (layer GND_layer) (net 30) (status 800)) - (segment (start 144.78 133.35) (end 144.78 116.205) (width 0.254) (layer GND_layer) (net 30)) - (segment (start 144.78 116.205) (end 147.32 113.665) (width 0.254) (layer GND_layer) (net 30)) - (segment (start 150.495 100.457) (end 160.909 100.457) (width 0.381) (layer Composant) (net 30)) - (segment (start 147.701 113.665) (end 148.717 112.649) (width 0.254) (layer GND_layer) (net 30)) - (segment (start 147.32 113.665) (end 147.701 113.665) (width 0.254) (layer GND_layer) (net 30)) - (segment (start 163.83 97.536) (end 166.116 97.536) (width 0.381) (layer Composant) (net 30)) - (segment (start 160.909 100.457) (end 163.83 97.536) (width 0.381) (layer Composant) (net 30)) - (segment (start 138.811 97.028) (end 139.7 97.917) (width 0.254) (layer Cuivre) (net 30)) - (segment (start 139.7 97.917) (end 142.621 97.917) (width 0.254) (layer Cuivre) (net 30)) - (segment (start 142.621 97.917) (end 143.51 97.028) (width 0.254) (layer Cuivre) (net 30)) - (segment (start 138.811 96.266) (end 138.811 97.028) (width 0.254) (layer Cuivre) (net 30)) - (segment (start 138.811 97.282) (end 138.811 96.266) (width 0.254) (layer Composant) (net 30)) - (segment (start 150.495 98.171) (end 149.733 98.171) (width 0.254) (layer Cuivre) (net 30)) - (via (at 150.495 98.171) (size 0.635) (layers Composant Cuivre) (net 30)) - (segment (start 176.276 119.761) (end 168.656 119.761) (width 0.4318) (layer Composant) (net 30) (status C00)) - (segment (start 176.276 118.5545) (end 174.8155 117.094) (width 0.4318) (layer Composant) (net 30) (status 400)) - (segment (start 176.276 119.761) (end 176.276 118.5545) (width 0.4318) (layer Composant) (net 30) (status 800)) - (segment (start 149.352 98.171) (end 150.495 98.171) (width 0.254) (layer GND_layer) (net 30)) - (segment (start 148.717 98.806) (end 149.352 98.171) (width 0.254) (layer GND_layer) (net 30)) + (segment (start 142.494 98.933) (end 143.891 97.536) (width 0.254) (layer Cuivre) (net 29)) + (segment (start 138.811 98.933) (end 142.494 98.933) (width 0.254) (layer Cuivre) (net 29)) + (via (at 138.811 98.933) (size 0.889) (layers Composant Cuivre) (net 29)) + (segment (start 147.955 114.173) (end 149.225 112.903) (width 0.254) (layer GND_layer) (net 29)) + (segment (start 138.811 98.933) (end 140.3604 100.4824) (width 0.254) (layer Composant) (net 29)) + (segment (start 168.783 107.823) (end 168.783 104.902) (width 0.4318) (layer Composant) (net 29)) + (segment (start 140.3604 100.4824) (end 141.2494 100.4824) (width 0.254) (layer Composant) (net 29)) + (via (at 150.495 99.06) (size 0.635) (layers Composant Cuivre) (net 29)) + (segment (start 176.149 108.077) (end 168.529 108.077) (width 0.4318) (layer Composant) (net 29) (status C00)) + (segment (start 167.259 110.49) (end 168.275 109.474) (width 0.381) (layer Composant) (net 29)) + (segment (start 167.259 115.57) (end 167.259 110.49) (width 0.381) (layer Composant) (net 29)) + (segment (start 168.275 108.331) (end 168.529 108.077) (width 0.4318) (layer Composant) (net 29) (status 400)) + (segment (start 168.275 109.474) (end 168.275 108.331) (width 0.4318) (layer Composant) (net 29)) + (segment (start 143.129 100.457) (end 141.2494 100.4824) (width 0.254) (layer Composant) (net 29) (status 800)) + (segment (start 149.733 99.06) (end 150.495 99.06) (width 0.254) (layer Cuivre) (net 29)) + (segment (start 148.209 97.536) (end 149.733 99.06) (width 0.254) (layer Cuivre) (net 29)) + (segment (start 149.225 100.203) (end 150.495 99.06) (width 0.254) (layer GND_layer) (net 29)) + (segment (start 147.701 114.173) (end 147.955 114.173) (width 0.254) (layer GND_layer) (net 29)) + (segment (start 145.288 116.586) (end 147.701 114.173) (width 0.254) (layer GND_layer) (net 29)) + (segment (start 168.529 108.077) (end 168.783 107.823) (width 0.4318) (layer Composant) (net 29) (status 800)) + (segment (start 150.622 99.441) (end 150.495 99.06) (width 0.381) (layer Composant) (net 29)) + (segment (start 150.876 99.695) (end 150.622 99.441) (width 0.381) (layer Composant) (net 29)) + (segment (start 160.528 99.695) (end 150.876 99.695) (width 0.381) (layer Composant) (net 29)) + (segment (start 163.449 96.774) (end 160.528 99.695) (width 0.381) (layer Composant) (net 29)) + (segment (start 166.751 96.774) (end 163.449 96.774) (width 0.381) (layer Composant) (net 29)) + (segment (start 167.259 97.282) (end 166.751 96.774) (width 0.381) (layer Composant) (net 29)) + (segment (start 167.259 103.378) (end 167.259 97.282) (width 0.381) (layer Composant) (net 29)) + (segment (start 168.783 104.902) (end 167.259 103.378) (width 0.381) (layer Composant) (net 29)) + (segment (start 168.7195 117.0305) (end 167.259 115.57) (width 0.4318) (layer Composant) (net 29)) + (segment (start 168.7195 117.094) (end 168.7195 117.0305) (width 0.4318) (layer Composant) (net 29) (status 800)) + (segment (start 145.288 135.382) (end 145.288 116.586) (width 0.254) (layer GND_layer) (net 29)) + (segment (start 149.225 112.903) (end 149.225 100.203) (width 0.254) (layer GND_layer) (net 29)) + (segment (start 143.891 97.536) (end 148.209 97.536) (width 0.254) (layer Cuivre) (net 29)) (segment (start 148.717 112.649) (end 148.717 98.806) (width 0.254) (layer GND_layer) (net 30)) - (via (at 150.495 97.282) (size 0.635) (layers Composant Cuivre) (net 31)) - (segment (start 141.5288 98.4758) (end 143.129 98.4758) (width 0.254) (layer Composant) (net 31) (status 400)) - (segment (start 140.716 97.663) (end 141.5288 98.4758) (width 0.254) (layer Composant) (net 31)) - (segment (start 140.716 96.52) (end 140.716 97.663) (width 0.254) (layer Composant) (net 31)) - (segment (start 151.0665 97.282) (end 152.0825 98.298) (width 0.254) (layer Composant) (net 31) (status 400)) - (segment (start 149.733 97.282) (end 148.971 96.52) (width 0.254) (layer Cuivre) (net 31)) - (segment (start 148.971 96.52) (end 143.129 96.52) (width 0.254) (layer Cuivre) (net 31)) - (segment (start 150.495 97.282) (end 149.733 97.282) (width 0.254) (layer Cuivre) (net 31)) - (segment (start 149.225 97.282) (end 150.495 97.282) (width 0.254) (layer GND_layer) (net 31)) - (segment (start 148.209 98.298) (end 149.225 97.282) (width 0.254) (layer GND_layer) (net 31)) - (segment (start 148.209 112.395) (end 148.209 98.298) (width 0.254) (layer GND_layer) (net 31)) - (segment (start 147.447 113.157) (end 148.209 112.395) (width 0.254) (layer GND_layer) (net 31)) - (segment (start 147.066 113.157) (end 147.447 113.157) (width 0.254) (layer GND_layer) (net 31)) - (segment (start 144.272 115.951) (end 147.066 113.157) (width 0.254) (layer GND_layer) (net 31)) - (segment (start 144.272 131.699) (end 144.272 115.951) (width 0.254) (layer GND_layer) (net 31)) - (segment (start 138.684 136.906) (end 139.573 136.398) (width 0.254) (layer GND_layer) (net 31) (status 800)) - (segment (start 140.335 96.774) (end 140.843 97.282) (width 0.254) (layer Cuivre) (net 31)) - (segment (start 140.843 97.282) (end 142.367 97.282) (width 0.254) (layer Cuivre) (net 31)) - (segment (start 142.367 97.282) (end 143.129 96.52) (width 0.254) (layer Cuivre) (net 31)) - (segment (start 140.335 96.139) (end 140.335 96.774) (width 0.254) (layer Cuivre) (net 31)) - (via (at 140.335 96.139) (size 0.889) (layers Composant Cuivre) (net 31)) - (segment (start 140.335 96.139) (end 140.716 96.52) (width 0.254) (layer Composant) (net 31)) - (segment (start 150.495 97.282) (end 151.0665 97.282) (width 0.254) (layer Composant) (net 31)) + (segment (start 148.717 98.806) (end 149.352 98.171) (width 0.254) (layer GND_layer) (net 30)) + (segment (start 149.352 98.171) (end 150.495 98.171) (width 0.254) (layer GND_layer) (net 30)) + (segment (start 176.276 119.761) (end 176.276 118.5545) (width 0.4318) (layer Composant) (net 30) (status 800)) + (segment (start 176.276 118.5545) (end 174.8155 117.094) (width 0.4318) (layer Composant) (net 30) (status 400)) + (segment (start 176.276 119.761) (end 168.656 119.761) (width 0.4318) (layer Composant) (net 30) (status C00)) + (via (at 150.495 98.171) (size 0.635) (layers Composant Cuivre) (net 30)) + (segment (start 150.495 98.171) (end 149.733 98.171) (width 0.254) (layer Cuivre) (net 30)) + (segment (start 138.811 97.282) (end 138.811 96.266) (width 0.254) (layer Composant) (net 30)) + (segment (start 138.811 96.266) (end 138.811 97.028) (width 0.254) (layer Cuivre) (net 30)) + (segment (start 142.621 97.917) (end 143.51 97.028) (width 0.254) (layer Cuivre) (net 30)) + (segment (start 139.7 97.917) (end 142.621 97.917) (width 0.254) (layer Cuivre) (net 30)) + (segment (start 138.811 97.028) (end 139.7 97.917) (width 0.254) (layer Cuivre) (net 30)) + (segment (start 160.909 100.457) (end 163.83 97.536) (width 0.381) (layer Composant) (net 30)) + (segment (start 163.83 97.536) (end 166.116 97.536) (width 0.381) (layer Composant) (net 30)) + (segment (start 147.32 113.665) (end 147.701 113.665) (width 0.254) (layer GND_layer) (net 30)) + (segment (start 147.701 113.665) (end 148.717 112.649) (width 0.254) (layer GND_layer) (net 30)) + (segment (start 150.495 100.457) (end 160.909 100.457) (width 0.381) (layer Composant) (net 30)) + (segment (start 144.78 116.205) (end 147.32 113.665) (width 0.254) (layer GND_layer) (net 30)) + (segment (start 144.78 133.35) (end 144.78 116.205) (width 0.254) (layer GND_layer) (net 30)) + (segment (start 141.224 136.906) (end 144.78 133.35) (width 0.254) (layer GND_layer) (net 30) (status 800)) + (segment (start 166.497 117.602) (end 168.656 119.761) (width 0.381) (layer Composant) (net 30) (status 400)) + (segment (start 149.987 98.171) (end 150.495 98.171) (width 0.254) (layer Composant) (net 30)) + (segment (start 166.116 97.536) (end 166.497 97.917) (width 0.381) (layer Composant) (net 30)) + (segment (start 149.733 98.425) (end 149.987 98.171) (width 0.254) (layer Composant) (net 30)) + (segment (start 149.733 99.695) (end 149.733 98.425) (width 0.254) (layer Composant) (net 30)) + (segment (start 150.495 100.457) (end 149.733 99.695) (width 0.254) (layer Composant) (net 30)) + (segment (start 149.733 98.171) (end 148.59 97.028) (width 0.254) (layer Cuivre) (net 30)) + (segment (start 143.51 97.028) (end 148.59 97.028) (width 0.254) (layer Cuivre) (net 30)) + (segment (start 166.497 108.331) (end 166.497 117.602) (width 0.381) (layer Composant) (net 30)) + (segment (start 168.021 106.807) (end 166.497 108.331) (width 0.381) (layer Composant) (net 30)) + (segment (start 168.021 105.283) (end 168.021 106.807) (width 0.381) (layer Composant) (net 30)) + (segment (start 166.497 103.759) (end 168.021 105.283) (width 0.381) (layer Composant) (net 30)) + (segment (start 166.497 97.917) (end 166.497 103.759) (width 0.381) (layer Composant) (net 30)) + (segment (start 138.811 97.282) (end 141.5034 99.9744) (width 0.254) (layer Composant) (net 30)) + (segment (start 141.5034 99.9744) (end 143.129 99.9744) (width 0.254) (layer Composant) (net 30) (status 400)) + (via (at 138.811 96.266) (size 0.889) (layers Composant Cuivre) (net 30)) (segment (start 139.573 136.398) (end 144.272 131.699) (width 0.254) (layer GND_layer) (net 31)) - (segment (start 141.986 95.885) (end 141.605 96.266) (width 0.254) (layer Cuivre) (net 32)) - (segment (start 139.319 135.763) (end 143.764 131.318) (width 0.254) (layer GND_layer) (net 32)) - (segment (start 137.287 135.763) (end 139.319 135.763) (width 0.254) (layer GND_layer) (net 32)) - (segment (start 136.144 136.906) (end 137.287 135.763) (width 0.254) (layer GND_layer) (net 32) (status 800)) - (segment (start 157.9245 101.5365) (end 159.4485 101.5365) (width 0.381) (layer Composant) (net 32) (status 400)) - (segment (start 157.607 101.219) (end 157.9245 101.5365) (width 0.381) (layer Composant) (net 32)) - (segment (start 150.241 101.219) (end 157.607 101.219) (width 0.381) (layer Composant) (net 32)) - (segment (start 149.225 100.203) (end 150.241 101.219) (width 0.254) (layer Composant) (net 32)) - (segment (start 149.225 97.282) (end 149.225 100.203) (width 0.254) (layer Composant) (net 32)) - (segment (start 143.764 115.57) (end 146.685 112.649) (width 0.254) (layer GND_layer) (net 32)) - (segment (start 146.685 112.649) (end 147.066 112.649) (width 0.254) (layer GND_layer) (net 32)) - (segment (start 147.066 112.649) (end 147.701 112.014) (width 0.254) (layer GND_layer) (net 32)) - (segment (start 143.764 131.318) (end 143.764 115.57) (width 0.254) (layer GND_layer) (net 32)) - (segment (start 147.701 112.014) (end 147.701 97.79) (width 0.254) (layer GND_layer) (net 32)) - (segment (start 147.701 97.79) (end 149.098 96.393) (width 0.254) (layer GND_layer) (net 32)) - (segment (start 149.098 96.393) (end 150.495 96.393) (width 0.254) (layer GND_layer) (net 32)) - (segment (start 141.986 95.885) (end 149.225 95.885) (width 0.254) (layer Cuivre) (net 32)) - (segment (start 149.225 95.885) (end 149.733 96.393) (width 0.254) (layer Cuivre) (net 32)) - (segment (start 149.733 96.393) (end 150.495 96.393) (width 0.254) (layer Cuivre) (net 32)) - (segment (start 152.0825 96.012) (end 150.876 96.012) (width 0.254) (layer Composant) (net 32) (status 800)) - (segment (start 150.876 96.012) (end 150.495 96.393) (width 0.254) (layer Composant) (net 32)) - (segment (start 141.605 96.266) (end 141.605 97.79) (width 0.254) (layer Composant) (net 32)) - (segment (start 141.605 97.79) (end 141.7828 97.9678) (width 0.254) (layer Composant) (net 32)) - (segment (start 141.7828 97.9678) (end 143.129 97.9678) (width 0.254) (layer Composant) (net 32) (status 400)) - (segment (start 150.495 96.393) (end 149.86 96.647) (width 0.254) (layer Composant) (net 32)) - (via (at 150.495 96.393) (size 0.635) (layers Composant Cuivre) (net 32)) - (segment (start 149.86 96.647) (end 149.225 97.282) (width 0.254) (layer Composant) (net 32)) + (segment (start 150.495 97.282) (end 151.0665 97.282) (width 0.254) (layer Composant) (net 31)) + (segment (start 140.335 96.139) (end 140.716 96.52) (width 0.254) (layer Composant) (net 31)) + (via (at 140.335 96.139) (size 0.889) (layers Composant Cuivre) (net 31)) + (segment (start 140.335 96.139) (end 140.335 96.774) (width 0.254) (layer Cuivre) (net 31)) + (segment (start 142.367 97.282) (end 143.129 96.52) (width 0.254) (layer Cuivre) (net 31)) + (segment (start 140.843 97.282) (end 142.367 97.282) (width 0.254) (layer Cuivre) (net 31)) + (segment (start 140.335 96.774) (end 140.843 97.282) (width 0.254) (layer Cuivre) (net 31)) + (segment (start 138.684 136.906) (end 139.573 136.398) (width 0.254) (layer GND_layer) (net 31) (status 800)) + (segment (start 144.272 131.699) (end 144.272 115.951) (width 0.254) (layer GND_layer) (net 31)) + (segment (start 144.272 115.951) (end 147.066 113.157) (width 0.254) (layer GND_layer) (net 31)) + (segment (start 147.066 113.157) (end 147.447 113.157) (width 0.254) (layer GND_layer) (net 31)) + (segment (start 147.447 113.157) (end 148.209 112.395) (width 0.254) (layer GND_layer) (net 31)) + (segment (start 148.209 112.395) (end 148.209 98.298) (width 0.254) (layer GND_layer) (net 31)) + (segment (start 148.209 98.298) (end 149.225 97.282) (width 0.254) (layer GND_layer) (net 31)) + (segment (start 149.225 97.282) (end 150.495 97.282) (width 0.254) (layer GND_layer) (net 31)) + (segment (start 150.495 97.282) (end 149.733 97.282) (width 0.254) (layer Cuivre) (net 31)) + (segment (start 148.971 96.52) (end 143.129 96.52) (width 0.254) (layer Cuivre) (net 31)) + (segment (start 149.733 97.282) (end 148.971 96.52) (width 0.254) (layer Cuivre) (net 31)) + (segment (start 151.0665 97.282) (end 152.0825 98.298) (width 0.254) (layer Composant) (net 31) (status 400)) + (segment (start 140.716 96.52) (end 140.716 97.663) (width 0.254) (layer Composant) (net 31)) + (segment (start 140.716 97.663) (end 141.5288 98.4758) (width 0.254) (layer Composant) (net 31)) + (segment (start 141.5288 98.4758) (end 143.129 98.4758) (width 0.254) (layer Composant) (net 31) (status 400)) + (via (at 150.495 97.282) (size 0.635) (layers Composant Cuivre) (net 31)) (via (at 141.605 96.266) (size 0.889) (layers Composant Cuivre) (net 32)) - (segment (start 119.1895 97.282) (end 119.1895 95.1865) (width 0.4318) (layer Composant) (net 33) (status 800)) - (via (at 125.476 92.964) (size 0.635) (layers Composant Cuivre) (net 33)) - (segment (start 125.603 94.361) (end 126.5174 95.2754) (width 0.254) (layer Composant) (net 33)) - (segment (start 125.476 92.964) (end 116.078 92.964) (width 0.254) (layer Cuivre) (net 33)) - (segment (start 125.476 92.964) (end 125.603 93.345) (width 0.254) (layer Composant) (net 33)) - (segment (start 125.603 93.345) (end 125.603 94.361) (width 0.254) (layer Composant) (net 33)) - (segment (start 117.348 93.345) (end 115.062 93.345) (width 0.4318) (layer Composant) (net 33) (status 400)) - (segment (start 116.078 92.964) (end 115.062 93.345) (width 0.254) (layer Cuivre) (net 33) (status 400)) - (segment (start 126.5174 95.2754) (end 127.635 95.4786) (width 0.254) (layer Composant) (net 33) (status 400)) + (segment (start 149.86 96.647) (end 149.225 97.282) (width 0.254) (layer Composant) (net 32)) + (via (at 150.495 96.393) (size 0.635) (layers Composant Cuivre) (net 32)) + (segment (start 150.495 96.393) (end 149.86 96.647) (width 0.254) (layer Composant) (net 32)) + (segment (start 141.7828 97.9678) (end 143.129 97.9678) (width 0.254) (layer Composant) (net 32) (status 400)) + (segment (start 141.605 97.79) (end 141.7828 97.9678) (width 0.254) (layer Composant) (net 32)) + (segment (start 141.605 96.266) (end 141.605 97.79) (width 0.254) (layer Composant) (net 32)) + (segment (start 150.876 96.012) (end 150.495 96.393) (width 0.254) (layer Composant) (net 32)) + (segment (start 152.0825 96.012) (end 150.876 96.012) (width 0.254) (layer Composant) (net 32) (status 800)) + (segment (start 149.733 96.393) (end 150.495 96.393) (width 0.254) (layer Cuivre) (net 32)) + (segment (start 149.225 95.885) (end 149.733 96.393) (width 0.254) (layer Cuivre) (net 32)) + (segment (start 141.986 95.885) (end 149.225 95.885) (width 0.254) (layer Cuivre) (net 32)) + (segment (start 149.098 96.393) (end 150.495 96.393) (width 0.254) (layer GND_layer) (net 32)) + (segment (start 147.701 97.79) (end 149.098 96.393) (width 0.254) (layer GND_layer) (net 32)) + (segment (start 147.701 112.014) (end 147.701 97.79) (width 0.254) (layer GND_layer) (net 32)) + (segment (start 143.764 131.318) (end 143.764 115.57) (width 0.254) (layer GND_layer) (net 32)) + (segment (start 147.066 112.649) (end 147.701 112.014) (width 0.254) (layer GND_layer) (net 32)) + (segment (start 146.685 112.649) (end 147.066 112.649) (width 0.254) (layer GND_layer) (net 32)) + (segment (start 143.764 115.57) (end 146.685 112.649) (width 0.254) (layer GND_layer) (net 32)) + (segment (start 149.225 97.282) (end 149.225 100.203) (width 0.254) (layer Composant) (net 32)) + (segment (start 149.225 100.203) (end 150.241 101.219) (width 0.254) (layer Composant) (net 32)) + (segment (start 150.241 101.219) (end 157.607 101.219) (width 0.381) (layer Composant) (net 32)) + (segment (start 157.607 101.219) (end 157.9245 101.5365) (width 0.381) (layer Composant) (net 32)) + (segment (start 157.9245 101.5365) (end 159.4485 101.5365) (width 0.381) (layer Composant) (net 32) (status 400)) + (segment (start 136.144 136.906) (end 137.287 135.763) (width 0.254) (layer GND_layer) (net 32) (status 800)) + (segment (start 137.287 135.763) (end 139.319 135.763) (width 0.254) (layer GND_layer) (net 32)) + (segment (start 139.319 135.763) (end 143.764 131.318) (width 0.254) (layer GND_layer) (net 32)) + (segment (start 141.986 95.885) (end 141.605 96.266) (width 0.254) (layer Cuivre) (net 32)) (segment (start 119.1895 95.1865) (end 117.348 93.345) (width 0.4318) (layer Composant) (net 33)) - (segment (start 127.635 108.077) (end 135.001 108.077) (width 0.254) (layer Cuivre) (net 34)) - (segment (start 83.185 110.744) (end 84.963 110.744) (width 0.254) (layer Cuivre) (net 34)) - (segment (start 84.963 110.744) (end 86.741 108.966) (width 0.254) (layer Cuivre) (net 34)) - (segment (start 86.741 108.966) (end 109.347 108.966) (width 0.254) (layer Cuivre) (net 34)) - (segment (start 109.347 108.966) (end 111.506 111.125) (width 0.254) (layer Cuivre) (net 34)) - (segment (start 136.398 109.22) (end 136.37768 107.81792) (width 0.254) (layer Composant) (net 34) (status 800)) - (segment (start 115.951 111.125) (end 119.507 107.569) (width 0.254) (layer Cuivre) (net 34)) - (segment (start 136.37768 107.81792) (end 136.37768 106.40568) (width 0.254) (layer Composant) (net 34)) - (segment (start 127.127 107.569) (end 127.635 108.077) (width 0.254) (layer Cuivre) (net 34)) - (via (at 135.89 105.918) (size 0.889) (layers Composant Cuivre) (net 34)) - (segment (start 135.89 107.188) (end 135.89 105.918) (width 0.254) (layer Cuivre) (net 34)) - (segment (start 135.001 108.077) (end 135.89 107.188) (width 0.254) (layer Cuivre) (net 34)) - (segment (start 136.37768 106.40568) (end 135.89 105.918) (width 0.254) (layer Composant) (net 34)) - (segment (start 119.507 107.569) (end 127.127 107.569) (width 0.254) (layer Cuivre) (net 34)) - (segment (start 76.327 124.079) (end 74.676 122.428) (width 0.254) (layer Cuivre) (net 34) (status 800)) - (segment (start 74.676 122.428) (end 74.676 118.491) (width 0.254) (layer Cuivre) (net 34)) - (segment (start 74.676 118.491) (end 75.438 117.729) (width 0.254) (layer Cuivre) (net 34)) - (segment (start 75.438 117.729) (end 79.629 117.729) (width 0.254) (layer Cuivre) (net 34)) - (segment (start 79.629 117.729) (end 80.01 117.348) (width 0.254) (layer Cuivre) (net 34)) - (segment (start 80.01 117.348) (end 80.01 113.919) (width 0.254) (layer Cuivre) (net 34)) - (segment (start 111.506 111.125) (end 115.951 111.125) (width 0.254) (layer Cuivre) (net 34)) + (segment (start 126.5174 95.2754) (end 127.635 95.4786) (width 0.254) (layer Composant) (net 33) (status 400)) + (segment (start 116.078 92.964) (end 115.062 93.345) (width 0.254) (layer Cuivre) (net 33) (status 400)) + (segment (start 117.348 93.345) (end 115.062 93.345) (width 0.4318) (layer Composant) (net 33) (status 400)) + (segment (start 125.603 93.345) (end 125.603 94.361) (width 0.254) (layer Composant) (net 33)) + (segment (start 125.476 92.964) (end 125.603 93.345) (width 0.254) (layer Composant) (net 33)) + (segment (start 125.476 92.964) (end 116.078 92.964) (width 0.254) (layer Cuivre) (net 33)) + (segment (start 125.603 94.361) (end 126.5174 95.2754) (width 0.254) (layer Composant) (net 33)) + (via (at 125.476 92.964) (size 0.635) (layers Composant Cuivre) (net 33)) + (segment (start 119.1895 97.282) (end 119.1895 95.1865) (width 0.4318) (layer Composant) (net 33) (status 800)) (segment (start 80.01 113.919) (end 83.185 110.744) (width 0.254) (layer Cuivre) (net 34)) - (segment (start 136.8806 109.22) (end 136.8806 105.9434) (width 0.254) (layer Composant) (net 35) (status 800)) - (segment (start 126.873 108.077) (end 127.381 108.585) (width 0.254) (layer Cuivre) (net 35)) - (segment (start 127.381 108.585) (end 135.382 108.585) (width 0.254) (layer Cuivre) (net 35)) - (segment (start 135.382 108.585) (end 136.906 107.061) (width 0.254) (layer Cuivre) (net 35)) - (segment (start 136.906 107.061) (end 136.906 105.918) (width 0.254) (layer Cuivre) (net 35)) - (via (at 136.906 105.918) (size 0.635) (layers Composant Cuivre) (net 35)) - (segment (start 119.761 108.077) (end 126.873 108.077) (width 0.254) (layer Cuivre) (net 35)) - (segment (start 108.712 109.474) (end 111.125 111.887) (width 0.254) (layer Cuivre) (net 35)) - (segment (start 86.995 109.474) (end 108.712 109.474) (width 0.254) (layer Cuivre) (net 35)) - (segment (start 85.217 111.252) (end 86.995 109.474) (width 0.254) (layer Cuivre) (net 35)) - (segment (start 83.439 111.252) (end 85.217 111.252) (width 0.254) (layer Cuivre) (net 35)) - (segment (start 80.518 114.173) (end 83.439 111.252) (width 0.254) (layer Cuivre) (net 35)) - (segment (start 80.518 119.888) (end 80.518 114.173) (width 0.254) (layer Cuivre) (net 35)) - (segment (start 78.867 121.539) (end 80.518 119.888) (width 0.254) (layer Cuivre) (net 35) (status 800)) - (segment (start 136.8806 105.9434) (end 136.906 105.918) (width 0.254) (layer Composant) (net 35)) - (segment (start 111.125 111.887) (end 115.951 111.887) (width 0.254) (layer Cuivre) (net 35)) + (segment (start 111.506 111.125) (end 115.951 111.125) (width 0.254) (layer Cuivre) (net 34)) + (segment (start 80.01 117.348) (end 80.01 113.919) (width 0.254) (layer Cuivre) (net 34)) + (segment (start 79.629 117.729) (end 80.01 117.348) (width 0.254) (layer Cuivre) (net 34)) + (segment (start 75.438 117.729) (end 79.629 117.729) (width 0.254) (layer Cuivre) (net 34)) + (segment (start 74.676 118.491) (end 75.438 117.729) (width 0.254) (layer Cuivre) (net 34)) + (segment (start 74.676 122.428) (end 74.676 118.491) (width 0.254) (layer Cuivre) (net 34)) + (segment (start 76.327 124.079) (end 74.676 122.428) (width 0.254) (layer Cuivre) (net 34) (status 800)) + (segment (start 119.507 107.569) (end 127.127 107.569) (width 0.254) (layer Cuivre) (net 34)) + (segment (start 136.37768 106.40568) (end 135.89 105.918) (width 0.254) (layer Composant) (net 34)) + (segment (start 135.001 108.077) (end 135.89 107.188) (width 0.254) (layer Cuivre) (net 34)) + (segment (start 135.89 107.188) (end 135.89 105.918) (width 0.254) (layer Cuivre) (net 34)) + (via (at 135.89 105.918) (size 0.889) (layers Composant Cuivre) (net 34)) + (segment (start 127.127 107.569) (end 127.635 108.077) (width 0.254) (layer Cuivre) (net 34)) + (segment (start 136.37768 107.81792) (end 136.37768 106.40568) (width 0.254) (layer Composant) (net 34)) + (segment (start 115.951 111.125) (end 119.507 107.569) (width 0.254) (layer Cuivre) (net 34)) + (segment (start 136.398 109.22) (end 136.37768 107.81792) (width 0.254) (layer Composant) (net 34) (status 800)) + (segment (start 109.347 108.966) (end 111.506 111.125) (width 0.254) (layer Cuivre) (net 34)) + (segment (start 86.741 108.966) (end 109.347 108.966) (width 0.254) (layer Cuivre) (net 34)) + (segment (start 84.963 110.744) (end 86.741 108.966) (width 0.254) (layer Cuivre) (net 34)) + (segment (start 83.185 110.744) (end 84.963 110.744) (width 0.254) (layer Cuivre) (net 34)) + (segment (start 127.635 108.077) (end 135.001 108.077) (width 0.254) (layer Cuivre) (net 34)) (segment (start 115.951 111.887) (end 119.761 108.077) (width 0.254) (layer Cuivre) (net 35)) - (segment (start 138.43 106.68) (end 136.017 109.093) (width 0.254) (layer Cuivre) (net 36)) - (segment (start 115.951 112.649) (end 110.871 112.649) (width 0.254) (layer Cuivre) (net 36)) - (segment (start 120.015 108.585) (end 115.951 112.649) (width 0.254) (layer Cuivre) (net 36)) - (segment (start 83.693 111.76) (end 81.026 114.427) (width 0.254) (layer Cuivre) (net 36)) - (segment (start 87.122 110.109) (end 108.331 110.109) (width 0.254) (layer Cuivre) (net 36)) - (segment (start 138.28014 107.84078) (end 138.28014 106.82986) (width 0.254) (layer Composant) (net 36)) - (segment (start 136.017 109.093) (end 127.127 109.093) (width 0.254) (layer Cuivre) (net 36)) - (segment (start 138.3792 107.9754) (end 138.28014 107.84078) (width 0.254) (layer Composant) (net 36)) - (via (at 138.43 106.68) (size 0.635) (layers Composant Cuivre) (net 36)) - (segment (start 77.597 122.809) (end 76.327 121.539) (width 0.254) (layer Cuivre) (net 36) (status 400)) - (segment (start 79.502 122.809) (end 77.597 122.809) (width 0.254) (layer Cuivre) (net 36)) - (segment (start 87.122 110.109) (end 85.471 111.76) (width 0.254) (layer Cuivre) (net 36)) - (segment (start 81.026 121.285) (end 79.502 122.809) (width 0.254) (layer Cuivre) (net 36)) - (segment (start 138.28014 106.82986) (end 138.43 106.68) (width 0.254) (layer Composant) (net 36)) - (segment (start 81.026 114.427) (end 81.026 121.285) (width 0.254) (layer Cuivre) (net 36)) - (segment (start 108.331 110.109) (end 110.871 112.649) (width 0.254) (layer Cuivre) (net 36)) - (segment (start 85.471 111.76) (end 83.693 111.76) (width 0.254) (layer Cuivre) (net 36)) - (segment (start 126.619 108.585) (end 120.015 108.585) (width 0.254) (layer Cuivre) (net 36)) - (segment (start 127.127 109.093) (end 126.619 108.585) (width 0.254) (layer Cuivre) (net 36)) + (segment (start 111.125 111.887) (end 115.951 111.887) (width 0.254) (layer Cuivre) (net 35)) + (segment (start 136.8806 105.9434) (end 136.906 105.918) (width 0.254) (layer Composant) (net 35)) + (segment (start 78.867 121.539) (end 80.518 119.888) (width 0.254) (layer Cuivre) (net 35) (status 800)) + (segment (start 80.518 119.888) (end 80.518 114.173) (width 0.254) (layer Cuivre) (net 35)) + (segment (start 80.518 114.173) (end 83.439 111.252) (width 0.254) (layer Cuivre) (net 35)) + (segment (start 83.439 111.252) (end 85.217 111.252) (width 0.254) (layer Cuivre) (net 35)) + (segment (start 85.217 111.252) (end 86.995 109.474) (width 0.254) (layer Cuivre) (net 35)) + (segment (start 86.995 109.474) (end 108.712 109.474) (width 0.254) (layer Cuivre) (net 35)) + (segment (start 108.712 109.474) (end 111.125 111.887) (width 0.254) (layer Cuivre) (net 35)) + (segment (start 119.761 108.077) (end 126.873 108.077) (width 0.254) (layer Cuivre) (net 35)) + (via (at 136.906 105.918) (size 0.635) (layers Composant Cuivre) (net 35)) + (segment (start 136.906 107.061) (end 136.906 105.918) (width 0.254) (layer Cuivre) (net 35)) + (segment (start 135.382 108.585) (end 136.906 107.061) (width 0.254) (layer Cuivre) (net 35)) + (segment (start 127.381 108.585) (end 135.382 108.585) (width 0.254) (layer Cuivre) (net 35)) + (segment (start 126.873 108.077) (end 127.381 108.585) (width 0.254) (layer Cuivre) (net 35)) + (segment (start 136.8806 109.22) (end 136.8806 105.9434) (width 0.254) (layer Composant) (net 35) (status 800)) (segment (start 138.3792 109.22) (end 138.3792 107.9754) (width 0.254) (layer Composant) (net 36) (status 800)) - (segment (start 77.597 124.968) (end 77.978 125.349) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 77.597 123.571) (end 77.597 124.968) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 85.598 112.395) (end 87.249 110.744) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 75.819 122.809) (end 76.835 122.809) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 75.184 122.174) (end 75.819 122.809) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 75.184 120.904) (end 75.184 122.174) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 75.819 120.269) (end 75.184 120.904) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 77.597 120.269) (end 75.819 120.269) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 138.8872 107.8992) (end 139.065 107.442) (width 0.254) (layer Composant) (net 37)) - (segment (start 87.249 110.744) (end 107.95 110.744) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 107.95 110.744) (end 110.49 113.284) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 110.49 113.284) (end 116.078 113.284) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 116.078 113.284) (end 120.269 109.093) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 120.269 109.093) (end 126.365 109.093) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 126.365 109.093) (end 127 109.728) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 81.534 114.681) (end 83.82 112.395) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 127 109.728) (end 136.779 109.728) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 136.779 109.728) (end 139.065 107.442) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 138.8872 109.22) (end 138.8872 107.8992) (width 0.254) (layer Composant) (net 37) (status 800)) - (via (at 139.065 107.442) (size 0.635) (layers Composant Cuivre) (net 37)) - (segment (start 78.867 118.999) (end 77.597 120.269) (width 0.254) (layer Cuivre) (net 37) (status 800)) - (segment (start 77.978 125.349) (end 79.629 125.349) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 79.629 125.349) (end 81.534 123.444) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 81.534 123.444) (end 81.534 114.681) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 76.835 122.809) (end 77.597 123.571) (width 0.254) (layer Cuivre) (net 37)) + (segment (start 127.127 109.093) (end 126.619 108.585) (width 0.254) (layer Cuivre) (net 36)) + (segment (start 126.619 108.585) (end 120.015 108.585) (width 0.254) (layer Cuivre) (net 36)) + (segment (start 85.471 111.76) (end 83.693 111.76) (width 0.254) (layer Cuivre) (net 36)) + (segment (start 108.331 110.109) (end 110.871 112.649) (width 0.254) (layer Cuivre) (net 36)) + (segment (start 81.026 114.427) (end 81.026 121.285) (width 0.254) (layer Cuivre) (net 36)) + (segment (start 138.28014 106.82986) (end 138.43 106.68) (width 0.254) (layer Composant) (net 36)) + (segment (start 81.026 121.285) (end 79.502 122.809) (width 0.254) (layer Cuivre) (net 36)) + (segment (start 87.122 110.109) (end 85.471 111.76) (width 0.254) (layer Cuivre) (net 36)) + (segment (start 79.502 122.809) (end 77.597 122.809) (width 0.254) (layer Cuivre) (net 36)) + (segment (start 77.597 122.809) (end 76.327 121.539) (width 0.254) (layer Cuivre) (net 36) (status 400)) + (via (at 138.43 106.68) (size 0.635) (layers Composant Cuivre) (net 36)) + (segment (start 138.3792 107.9754) (end 138.28014 107.84078) (width 0.254) (layer Composant) (net 36)) + (segment (start 136.017 109.093) (end 127.127 109.093) (width 0.254) (layer Cuivre) (net 36)) + (segment (start 138.28014 107.84078) (end 138.28014 106.82986) (width 0.254) (layer Composant) (net 36)) + (segment (start 87.122 110.109) (end 108.331 110.109) (width 0.254) (layer Cuivre) (net 36)) + (segment (start 83.693 111.76) (end 81.026 114.427) (width 0.254) (layer Cuivre) (net 36)) + (segment (start 120.015 108.585) (end 115.951 112.649) (width 0.254) (layer Cuivre) (net 36)) + (segment (start 115.951 112.649) (end 110.871 112.649) (width 0.254) (layer Cuivre) (net 36)) + (segment (start 138.43 106.68) (end 136.017 109.093) (width 0.254) (layer Cuivre) (net 36)) (segment (start 83.82 112.395) (end 85.598 112.395) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 155.829 91.186) (end 155.829 88.138) (width 0.254) (layer GND_layer) (net 38)) - (segment (start 132.588 93.98) (end 133.604 93.98) (width 0.254) (layer Cuivre) (net 38)) - (segment (start 131.826 94.742) (end 132.588 93.98) (width 0.254) (layer Cuivre) (net 38)) - (segment (start 156.464 136.906) (end 163.957 129.413) (width 0.254) (layer GND_layer) (net 38) (status 800)) - (segment (start 131.826 94.361) (end 131.8768 94.361) (width 0.254) (layer Composant) (net 38)) - (segment (start 163.957 119.253) (end 162.687 117.983) (width 0.254) (layer GND_layer) (net 38) (status 400)) - (via (at 155.829 88.138) (size 0.889) (layers Composant Cuivre) (net 38)) - (segment (start 155.829 88.138) (end 155.829 88.9) (width 0.254) (layer Cuivre) (net 38)) - (segment (start 131.826 96.393) (end 131.826 94.361) (width 0.254) (layer Composant) (net 38)) - (segment (start 162.687 117.983) (end 162.687 116.586) (width 0.254) (layer GND_layer) (net 38) (status 800)) - (segment (start 156.718 92.075) (end 155.829 91.186) (width 0.254) (layer GND_layer) (net 38)) - (segment (start 156.718 110.744) (end 156.718 92.075) (width 0.254) (layer GND_layer) (net 38)) - (segment (start 162.687 116.586) (end 156.718 110.744) (width 0.254) (layer GND_layer) (net 38)) - (segment (start 131.826 96.393) (end 131.826 94.742) (width 0.254) (layer Cuivre) (net 38)) - (via (at 131.826 96.393) (size 0.889) (layers Composant Cuivre) (net 38)) - (segment (start 131.8768 93.726) (end 131.8768 94.361) (width 0.254) (layer Composant) (net 38) (status 800)) - (segment (start 155.067 89.662) (end 155.829 88.9) (width 0.254) (layer Cuivre) (net 38)) - (segment (start 152.019 89.662) (end 155.067 89.662) (width 0.254) (layer Cuivre) (net 38)) - (segment (start 133.604 93.98) (end 137.16 90.424) (width 0.254) (layer Cuivre) (net 38)) - (segment (start 151.257 90.424) (end 152.019 89.662) (width 0.254) (layer Cuivre) (net 38)) - (segment (start 137.16 90.424) (end 151.257 90.424) (width 0.254) (layer Cuivre) (net 38)) + (segment (start 76.835 122.809) (end 77.597 123.571) (width 0.254) (layer Cuivre) (net 37)) + (segment (start 81.534 123.444) (end 81.534 114.681) (width 0.254) (layer Cuivre) (net 37)) + (segment (start 79.629 125.349) (end 81.534 123.444) (width 0.254) (layer Cuivre) (net 37)) + (segment (start 77.978 125.349) (end 79.629 125.349) (width 0.254) (layer Cuivre) (net 37)) + (segment (start 78.867 118.999) (end 77.597 120.269) (width 0.254) (layer Cuivre) (net 37) (status 800)) + (via (at 139.065 107.442) (size 0.635) (layers Composant Cuivre) (net 37)) + (segment (start 138.8872 109.22) (end 138.8872 107.8992) (width 0.254) (layer Composant) (net 37) (status 800)) + (segment (start 136.779 109.728) (end 139.065 107.442) (width 0.254) (layer Cuivre) (net 37)) + (segment (start 127 109.728) (end 136.779 109.728) (width 0.254) (layer Cuivre) (net 37)) + (segment (start 81.534 114.681) (end 83.82 112.395) (width 0.254) (layer Cuivre) (net 37)) + (segment (start 126.365 109.093) (end 127 109.728) (width 0.254) (layer Cuivre) (net 37)) + (segment (start 120.269 109.093) (end 126.365 109.093) (width 0.254) (layer Cuivre) (net 37)) + (segment (start 116.078 113.284) (end 120.269 109.093) (width 0.254) (layer Cuivre) (net 37)) + (segment (start 110.49 113.284) (end 116.078 113.284) (width 0.254) (layer Cuivre) (net 37)) + (segment (start 107.95 110.744) (end 110.49 113.284) (width 0.254) (layer Cuivre) (net 37)) + (segment (start 87.249 110.744) (end 107.95 110.744) (width 0.254) (layer Cuivre) (net 37)) + (segment (start 138.8872 107.8992) (end 139.065 107.442) (width 0.254) (layer Composant) (net 37)) + (segment (start 77.597 120.269) (end 75.819 120.269) (width 0.254) (layer Cuivre) (net 37)) + (segment (start 75.819 120.269) (end 75.184 120.904) (width 0.254) (layer Cuivre) (net 37)) + (segment (start 75.184 120.904) (end 75.184 122.174) (width 0.254) (layer Cuivre) (net 37)) + (segment (start 75.184 122.174) (end 75.819 122.809) (width 0.254) (layer Cuivre) (net 37)) + (segment (start 75.819 122.809) (end 76.835 122.809) (width 0.254) (layer Cuivre) (net 37)) + (segment (start 85.598 112.395) (end 87.249 110.744) (width 0.254) (layer Cuivre) (net 37)) + (segment (start 77.597 123.571) (end 77.597 124.968) (width 0.254) (layer Cuivre) (net 37)) + (segment (start 77.597 124.968) (end 77.978 125.349) (width 0.254) (layer Cuivre) (net 37)) (segment (start 163.957 129.413) (end 163.957 119.253) (width 0.254) (layer GND_layer) (net 38)) - (segment (start 136.398 97.282) (end 136.779 96.901) (width 0.254) (layer Composant) (net 39)) - (segment (start 136.779 96.901) (end 136.779 95.631) (width 0.254) (layer Composant) (net 39)) - (segment (start 136.779 95.631) (end 135.88746 94.73946) (width 0.254) (layer Composant) (net 39)) - (segment (start 135.88746 94.73946) (end 135.88746 94.7547) (width 0.254) (layer Composant) (net 39)) - (segment (start 136.271 97.282) (end 136.398 97.282) (width 0.254) (layer Composant) (net 39)) - (segment (start 136.779 97.282) (end 137.0711 96.9899) (width 0.254) (layer Cuivre) (net 39)) - (segment (start 136.271 97.282) (end 136.779 97.282) (width 0.254) (layer Cuivre) (net 39)) - (segment (start 135.88746 94.7547) (end 135.8646 93.726) (width 0.254) (layer Composant) (net 39) (status 400)) - (via (at 136.271 97.282) (size 0.889) (layers Composant Cuivre) (net 39)) - (segment (start 154.686 131.064) (end 154.686 94.361) (width 0.254) (layer GND_layer) (net 39)) - (segment (start 154.686 94.361) (end 153.035 92.71) (width 0.254) (layer GND_layer) (net 39)) - (segment (start 137.0711 95.66656) (end 139.573 92.964) (width 0.254) (layer Cuivre) (net 39)) - (segment (start 139.573 92.964) (end 152.654 92.964) (width 0.254) (layer Cuivre) (net 39)) - (segment (start 152.654 92.964) (end 153.035 92.71) (width 0.254) (layer Cuivre) (net 39)) - (via (at 153.035 92.71) (size 0.635) (layers Composant Cuivre) (net 39)) - (segment (start 137.0711 95.66656) (end 137.0711 96.9899) (width 0.254) (layer Cuivre) (net 39)) + (segment (start 137.16 90.424) (end 151.257 90.424) (width 0.254) (layer Cuivre) (net 38)) + (segment (start 151.257 90.424) (end 152.019 89.662) (width 0.254) (layer Cuivre) (net 38)) + (segment (start 133.604 93.98) (end 137.16 90.424) (width 0.254) (layer Cuivre) (net 38)) + (segment (start 152.019 89.662) (end 155.067 89.662) (width 0.254) (layer Cuivre) (net 38)) + (segment (start 155.067 89.662) (end 155.829 88.9) (width 0.254) (layer Cuivre) (net 38)) + (segment (start 131.8768 93.726) (end 131.8768 94.361) (width 0.254) (layer Composant) (net 38) (status 800)) + (via (at 131.826 96.393) (size 0.889) (layers Composant Cuivre) (net 38)) + (segment (start 131.826 96.393) (end 131.826 94.742) (width 0.254) (layer Cuivre) (net 38)) + (segment (start 162.687 116.586) (end 156.718 110.744) (width 0.254) (layer GND_layer) (net 38)) + (segment (start 156.718 110.744) (end 156.718 92.075) (width 0.254) (layer GND_layer) (net 38)) + (segment (start 156.718 92.075) (end 155.829 91.186) (width 0.254) (layer GND_layer) (net 38)) + (segment (start 162.687 117.983) (end 162.687 116.586) (width 0.254) (layer GND_layer) (net 38) (status 800)) + (segment (start 131.826 96.393) (end 131.826 94.361) (width 0.254) (layer Composant) (net 38)) + (segment (start 155.829 88.138) (end 155.829 88.9) (width 0.254) (layer Cuivre) (net 38)) + (via (at 155.829 88.138) (size 0.889) (layers Composant Cuivre) (net 38)) + (segment (start 163.957 119.253) (end 162.687 117.983) (width 0.254) (layer GND_layer) (net 38) (status 400)) + (segment (start 131.826 94.361) (end 131.8768 94.361) (width 0.254) (layer Composant) (net 38)) + (segment (start 156.464 136.906) (end 163.957 129.413) (width 0.254) (layer GND_layer) (net 38) (status 800)) + (segment (start 131.826 94.742) (end 132.588 93.98) (width 0.254) (layer Cuivre) (net 38)) + (segment (start 132.588 93.98) (end 133.604 93.98) (width 0.254) (layer Cuivre) (net 38)) + (segment (start 155.829 91.186) (end 155.829 88.138) (width 0.254) (layer GND_layer) (net 38)) (segment (start 148.844 136.906) (end 154.686 131.064) (width 0.254) (layer GND_layer) (net 39) (status 800)) - (segment (start 83.312 115.316) (end 83.312 113.411) (width 0.4318) (layer Composant) (net 40)) - (segment (start 83.439 134.239) (end 78.867 134.239) (width 0.4318) (layer Cuivre) (net 40) (status C00)) - (segment (start 83.312 113.411) (end 83.8835 112.8395) (width 0.4318) (layer Composant) (net 40)) - (segment (start 83.8835 112.8395) (end 84.836 112.8395) (width 0.4318) (layer Composant) (net 40) (status 400)) - (segment (start 106.045 115.189) (end 122.301 115.189) (width 0.4318) (layer Cuivre) (net 40)) - (via (at 83.312 115.316) (size 0.889) (layers Composant Cuivre) (net 40)) - (segment (start 104.775 116.459) (end 106.045 115.189) (width 0.4318) (layer Cuivre) (net 40)) - (segment (start 83.439 134.239) (end 88.519 134.239) (width 0.4318) (layer Cuivre) (net 40) (status 800)) - (segment (start 88.519 134.239) (end 88.9 134.62) (width 0.4318) (layer Cuivre) (net 40) (status 400)) - (segment (start 134.0485 115.189) (end 134.874 114.3635) (width 0.4318) (layer Composant) (net 40) (status 400)) - (segment (start 122.555 115.189) (end 134.0485 115.189) (width 0.4318) (layer Composant) (net 40)) - (segment (start 122.428 115.316) (end 122.555 115.189) (width 0.4318) (layer Composant) (net 40)) - (segment (start 122.301 115.189) (end 122.428 115.316) (width 0.4318) (layer Cuivre) (net 40)) - (segment (start 83.312 134.112) (end 83.439 134.239) (width 0.4318) (layer Composant) (net 40) (status 400)) - (segment (start 83.312 115.316) (end 83.439 115.316) (width 0.4318) (layer Cuivre) (net 40)) - (segment (start 83.439 115.316) (end 85.09 116.967) (width 0.4318) (layer Cuivre) (net 40)) - (segment (start 85.09 116.967) (end 93.345 116.967) (width 0.4318) (layer Cuivre) (net 40)) - (segment (start 93.345 116.967) (end 93.853 116.459) (width 0.4318) (layer Cuivre) (net 40)) - (segment (start 93.853 116.459) (end 104.775 116.459) (width 0.4318) (layer Cuivre) (net 40)) - (segment (start 83.312 115.316) (end 83.312 134.112) (width 0.4318) (layer Composant) (net 40)) + (segment (start 137.0711 95.66656) (end 137.0711 96.9899) (width 0.254) (layer Cuivre) (net 39)) + (via (at 153.035 92.71) (size 0.635) (layers Composant Cuivre) (net 39)) + (segment (start 152.654 92.964) (end 153.035 92.71) (width 0.254) (layer Cuivre) (net 39)) + (segment (start 139.573 92.964) (end 152.654 92.964) (width 0.254) (layer Cuivre) (net 39)) + (segment (start 137.0711 95.66656) (end 139.573 92.964) (width 0.254) (layer Cuivre) (net 39)) + (segment (start 154.686 94.361) (end 153.035 92.71) (width 0.254) (layer GND_layer) (net 39)) + (segment (start 154.686 131.064) (end 154.686 94.361) (width 0.254) (layer GND_layer) (net 39)) + (via (at 136.271 97.282) (size 0.889) (layers Composant Cuivre) (net 39)) + (segment (start 135.88746 94.7547) (end 135.8646 93.726) (width 0.254) (layer Composant) (net 39) (status 400)) + (segment (start 136.271 97.282) (end 136.779 97.282) (width 0.254) (layer Cuivre) (net 39)) + (segment (start 136.779 97.282) (end 137.0711 96.9899) (width 0.254) (layer Cuivre) (net 39)) + (segment (start 136.271 97.282) (end 136.398 97.282) (width 0.254) (layer Composant) (net 39)) + (segment (start 135.88746 94.73946) (end 135.88746 94.7547) (width 0.254) (layer Composant) (net 39)) + (segment (start 136.779 95.631) (end 135.88746 94.73946) (width 0.254) (layer Composant) (net 39)) + (segment (start 136.779 96.901) (end 136.779 95.631) (width 0.254) (layer Composant) (net 39)) + (segment (start 136.398 97.282) (end 136.779 96.901) (width 0.254) (layer Composant) (net 39)) (via (at 122.428 115.316) (size 0.889) (layers Composant Cuivre) (net 40)) - (segment (start 143.51 111.6965) (end 149.733 111.6965) (width 0.381) (layer Composant) (net 41) (status 800)) - (segment (start 150.241 111.9505) (end 150.114 112.0775) (width 0.254) (layer Composant) (net 41)) - (segment (start 150.241 109.22) (end 150.241 111.9505) (width 0.254) (layer Composant) (net 41) (status 800)) - (segment (start 140.8938 110.7948) (end 141.732 111.4425) (width 0.254) (layer Composant) (net 41) (status 400)) - (segment (start 143.51 111.6965) (end 141.986 111.6965) (width 0.381) (layer Composant) (net 41) (status 800)) - (segment (start 141.986 111.6965) (end 141.732 111.4425) (width 0.381) (layer Composant) (net 41) (status 400)) - (segment (start 140.8938 109.22) (end 140.8938 110.7948) (width 0.254) (layer Composant) (net 41) (status 800)) + (segment (start 83.312 115.316) (end 83.312 134.112) (width 0.4318) (layer Composant) (net 40)) + (segment (start 93.853 116.459) (end 104.775 116.459) (width 0.4318) (layer Cuivre) (net 40)) + (segment (start 93.345 116.967) (end 93.853 116.459) (width 0.4318) (layer Cuivre) (net 40)) + (segment (start 85.09 116.967) (end 93.345 116.967) (width 0.4318) (layer Cuivre) (net 40)) + (segment (start 83.439 115.316) (end 85.09 116.967) (width 0.4318) (layer Cuivre) (net 40)) + (segment (start 83.312 115.316) (end 83.439 115.316) (width 0.4318) (layer Cuivre) (net 40)) + (segment (start 83.312 134.112) (end 83.439 134.239) (width 0.4318) (layer Composant) (net 40) (status 400)) + (segment (start 122.301 115.189) (end 122.428 115.316) (width 0.4318) (layer Cuivre) (net 40)) + (segment (start 122.428 115.316) (end 122.555 115.189) (width 0.4318) (layer Composant) (net 40)) + (segment (start 122.555 115.189) (end 134.0485 115.189) (width 0.4318) (layer Composant) (net 40)) + (segment (start 134.0485 115.189) (end 134.874 114.3635) (width 0.4318) (layer Composant) (net 40) (status 400)) + (segment (start 88.519 134.239) (end 88.9 134.62) (width 0.4318) (layer Cuivre) (net 40) (status 400)) + (segment (start 83.439 134.239) (end 88.519 134.239) (width 0.4318) (layer Cuivre) (net 40) (status 800)) + (segment (start 104.775 116.459) (end 106.045 115.189) (width 0.4318) (layer Cuivre) (net 40)) + (via (at 83.312 115.316) (size 0.889) (layers Composant Cuivre) (net 40)) + (segment (start 106.045 115.189) (end 122.301 115.189) (width 0.4318) (layer Cuivre) (net 40)) + (segment (start 83.8835 112.8395) (end 84.836 112.8395) (width 0.4318) (layer Composant) (net 40) (status 400)) + (segment (start 83.312 113.411) (end 83.8835 112.8395) (width 0.4318) (layer Composant) (net 40)) + (segment (start 83.439 134.239) (end 78.867 134.239) (width 0.4318) (layer Cuivre) (net 40) (status C00)) + (segment (start 83.312 115.316) (end 83.312 113.411) (width 0.4318) (layer Composant) (net 40)) (segment (start 149.733 111.6965) (end 150.114 112.0775) (width 0.381) (layer Composant) (net 41)) - (segment (start 136.144 89.408) (end 139.827 89.408) (width 0.254) (layer Cuivre) (net 42)) - (segment (start 135.636 89.154) (end 136.144 89.408) (width 0.254) (layer Cuivre) (net 42)) - (segment (start 135.636 88.646) (end 135.636 89.154) (width 0.254) (layer Cuivre) (net 42)) - (segment (start 135.763 89.027) (end 135.636 88.646) (width 0.254) (layer Composant) (net 42)) - (segment (start 136.271 89.535) (end 135.763 89.027) (width 0.254) (layer Composant) (net 42)) - (segment (start 136.271 91.94038) (end 136.271 89.535) (width 0.254) (layer Composant) (net 42)) - (via (at 135.636 88.646) (size 0.635) (layers Composant Cuivre) (net 42)) - (segment (start 136.3853 92.329) (end 136.271 91.94038) (width 0.254) (layer Composant) (net 42)) - (segment (start 157.607 117.983) (end 155.194 115.57) (width 0.254) (layer GND_layer) (net 42) (status 800)) - (segment (start 153.67 92.202) (end 153.67 91.44) (width 0.254) (layer GND_layer) (net 42)) - (segment (start 155.194 93.726) (end 153.67 92.202) (width 0.254) (layer GND_layer) (net 42)) - (segment (start 155.194 115.57) (end 155.194 93.726) (width 0.254) (layer GND_layer) (net 42)) - (segment (start 118.999 84.328) (end 114.3 89.027) (width 0.254) (layer Cuivre) (net 42) (status 400)) - (segment (start 127.381 85.598) (end 126.111 84.328) (width 0.254) (layer Cuivre) (net 42)) - (segment (start 126.111 84.328) (end 118.999 84.328) (width 0.254) (layer Cuivre) (net 42)) - (segment (start 139.827 89.408) (end 141.097 88.138) (width 0.254) (layer Cuivre) (net 42)) - (segment (start 135.636 86.106) (end 135.636 88.646) (width 0.254) (layer Composant) (net 42)) - (segment (start 134.747 85.217) (end 135.636 86.106) (width 0.254) (layer Composant) (net 42)) - (segment (start 127.381 85.598) (end 134.366 85.598) (width 0.254) (layer Cuivre) (net 42)) - (segment (start 150.114 138.176) (end 151.384 139.446) (width 0.254) (layer GND_layer) (net 42) (status 400)) - (via (at 150.622 88.9) (size 0.889) (layers Composant Cuivre) (net 42)) - (via (at 134.747 85.217) (size 0.889) (layers Composant Cuivre) (net 42)) - (segment (start 141.097 88.138) (end 149.86 88.138) (width 0.254) (layer Cuivre) (net 42)) - (segment (start 149.86 88.138) (end 150.622 88.9) (width 0.254) (layer Cuivre) (net 42)) - (segment (start 136.3726 93.726) (end 136.3853 92.329) (width 0.254) (layer Composant) (net 42) (status 800)) - (segment (start 134.366 85.598) (end 134.747 85.217) (width 0.254) (layer Cuivre) (net 42)) - (segment (start 157.607 117.983) (end 156.337 119.253) (width 0.254) (layer GND_layer) (net 42) (status 800)) - (segment (start 156.337 119.253) (end 156.337 130.175) (width 0.254) (layer GND_layer) (net 42)) - (segment (start 156.337 130.175) (end 150.114 136.398) (width 0.254) (layer GND_layer) (net 42)) - (segment (start 150.114 136.398) (end 150.114 138.176) (width 0.254) (layer GND_layer) (net 42)) - (segment (start 151.13 88.9) (end 153.67 91.44) (width 0.254) (layer GND_layer) (net 42)) + (segment (start 140.8938 109.22) (end 140.8938 110.7948) (width 0.254) (layer Composant) (net 41) (status 800)) + (segment (start 141.986 111.6965) (end 141.732 111.4425) (width 0.381) (layer Composant) (net 41) (status 400)) + (segment (start 143.51 111.6965) (end 141.986 111.6965) (width 0.381) (layer Composant) (net 41) (status 800)) + (segment (start 140.8938 110.7948) (end 141.732 111.4425) (width 0.254) (layer Composant) (net 41) (status 400)) + (segment (start 150.241 109.22) (end 150.241 111.9505) (width 0.254) (layer Composant) (net 41) (status 800)) + (segment (start 150.241 111.9505) (end 150.114 112.0775) (width 0.254) (layer Composant) (net 41)) + (segment (start 143.51 111.6965) (end 149.733 111.6965) (width 0.381) (layer Composant) (net 41) (status 800)) (segment (start 150.622 88.9) (end 151.13 88.9) (width 0.254) (layer GND_layer) (net 42)) - (via (at 136.525 88.646) (size 0.635) (layers Composant Cuivre) (net 43)) - (via (at 136.017 85.344) (size 0.889) (layers Composant Cuivre) (net 43)) - (segment (start 136.525 86.106) (end 136.525 88.646) (width 0.254) (layer Composant) (net 43)) - (segment (start 136.017 85.344) (end 136.525 86.106) (width 0.254) (layer Composant) (net 43)) - (segment (start 152.654 138.176) (end 153.924 139.446) (width 0.254) (layer GND_layer) (net 43) (status 400)) - (segment (start 152.654 136.398) (end 152.654 138.176) (width 0.254) (layer GND_layer) (net 43)) - (via (at 153.035 88.392) (size 0.889) (layers Composant Cuivre) (net 43)) - (segment (start 153.035 88.392) (end 153.543 88.392) (width 0.254) (layer GND_layer) (net 43)) - (segment (start 154.813 89.662) (end 154.813 90.932) (width 0.254) (layer GND_layer) (net 43)) - (segment (start 153.543 88.392) (end 154.813 89.662) (width 0.254) (layer GND_layer) (net 43)) - (segment (start 153.035 88.392) (end 152.527 88.392) (width 0.254) (layer Cuivre) (net 43)) - (segment (start 140.843 87.63) (end 139.827 88.646) (width 0.254) (layer Cuivre) (net 43)) - (segment (start 111.76 85.852) (end 113.919 83.693) (width 0.254) (layer Cuivre) (net 43)) - (segment (start 113.919 83.693) (end 126.365 83.693) (width 0.254) (layer Cuivre) (net 43)) - (segment (start 126.365 83.693) (end 127.127 84.455) (width 0.254) (layer Cuivre) (net 43)) - (segment (start 151.765 87.63) (end 140.843 87.63) (width 0.254) (layer Cuivre) (net 43)) - (segment (start 139.827 88.646) (end 136.525 88.646) (width 0.254) (layer Cuivre) (net 43)) - (segment (start 136.8806 93.726) (end 136.8933 92.3163) (width 0.254) (layer Composant) (net 43) (status 800)) - (segment (start 127.127 84.455) (end 135.763 84.455) (width 0.254) (layer Cuivre) (net 43)) - (segment (start 111.76 86.487) (end 111.76 85.852) (width 0.254) (layer Cuivre) (net 43) (status 800)) - (segment (start 135.763 84.455) (end 136.017 84.709) (width 0.254) (layer Cuivre) (net 43)) - (segment (start 136.017 84.709) (end 136.017 85.344) (width 0.254) (layer Cuivre) (net 43)) - (segment (start 136.8933 92.3163) (end 136.779 91.948) (width 0.254) (layer Composant) (net 43)) - (segment (start 136.779 91.948) (end 136.779 89.027) (width 0.254) (layer Composant) (net 43)) - (segment (start 136.779 89.027) (end 136.525 88.646) (width 0.254) (layer Composant) (net 43)) - (segment (start 160.147 117.983) (end 156.21 114.046) (width 0.254) (layer GND_layer) (net 43) (status 800)) - (segment (start 156.21 92.329) (end 154.813 90.932) (width 0.254) (layer GND_layer) (net 43)) - (segment (start 156.21 114.046) (end 156.21 92.329) (width 0.254) (layer GND_layer) (net 43)) - (segment (start 160.147 117.983) (end 161.544 119.38) (width 0.254) (layer GND_layer) (net 43) (status 800)) - (segment (start 161.544 119.38) (end 161.544 127.508) (width 0.254) (layer GND_layer) (net 43)) - (segment (start 161.544 127.508) (end 152.654 136.398) (width 0.254) (layer GND_layer) (net 43)) + (segment (start 151.13 88.9) (end 153.67 91.44) (width 0.254) (layer GND_layer) (net 42)) + (segment (start 150.114 136.398) (end 150.114 138.176) (width 0.254) (layer GND_layer) (net 42)) + (segment (start 156.337 130.175) (end 150.114 136.398) (width 0.254) (layer GND_layer) (net 42)) + (segment (start 156.337 119.253) (end 156.337 130.175) (width 0.254) (layer GND_layer) (net 42)) + (segment (start 157.607 117.983) (end 156.337 119.253) (width 0.254) (layer GND_layer) (net 42) (status 800)) + (segment (start 134.366 85.598) (end 134.747 85.217) (width 0.254) (layer Cuivre) (net 42)) + (segment (start 136.3726 93.726) (end 136.3853 92.329) (width 0.254) (layer Composant) (net 42) (status 800)) + (segment (start 149.86 88.138) (end 150.622 88.9) (width 0.254) (layer Cuivre) (net 42)) + (segment (start 141.097 88.138) (end 149.86 88.138) (width 0.254) (layer Cuivre) (net 42)) + (via (at 134.747 85.217) (size 0.889) (layers Composant Cuivre) (net 42)) + (via (at 150.622 88.9) (size 0.889) (layers Composant Cuivre) (net 42)) + (segment (start 150.114 138.176) (end 151.384 139.446) (width 0.254) (layer GND_layer) (net 42) (status 400)) + (segment (start 127.381 85.598) (end 134.366 85.598) (width 0.254) (layer Cuivre) (net 42)) + (segment (start 134.747 85.217) (end 135.636 86.106) (width 0.254) (layer Composant) (net 42)) + (segment (start 135.636 86.106) (end 135.636 88.646) (width 0.254) (layer Composant) (net 42)) + (segment (start 139.827 89.408) (end 141.097 88.138) (width 0.254) (layer Cuivre) (net 42)) + (segment (start 126.111 84.328) (end 118.999 84.328) (width 0.254) (layer Cuivre) (net 42)) + (segment (start 127.381 85.598) (end 126.111 84.328) (width 0.254) (layer Cuivre) (net 42)) + (segment (start 118.999 84.328) (end 114.3 89.027) (width 0.254) (layer Cuivre) (net 42) (status 400)) + (segment (start 155.194 115.57) (end 155.194 93.726) (width 0.254) (layer GND_layer) (net 42)) + (segment (start 155.194 93.726) (end 153.67 92.202) (width 0.254) (layer GND_layer) (net 42)) + (segment (start 153.67 92.202) (end 153.67 91.44) (width 0.254) (layer GND_layer) (net 42)) + (segment (start 157.607 117.983) (end 155.194 115.57) (width 0.254) (layer GND_layer) (net 42) (status 800)) + (segment (start 136.3853 92.329) (end 136.271 91.94038) (width 0.254) (layer Composant) (net 42)) + (via (at 135.636 88.646) (size 0.635) (layers Composant Cuivre) (net 42)) + (segment (start 136.271 91.94038) (end 136.271 89.535) (width 0.254) (layer Composant) (net 42)) + (segment (start 136.271 89.535) (end 135.763 89.027) (width 0.254) (layer Composant) (net 42)) + (segment (start 135.763 89.027) (end 135.636 88.646) (width 0.254) (layer Composant) (net 42)) + (segment (start 135.636 88.646) (end 135.636 89.154) (width 0.254) (layer Cuivre) (net 42)) + (segment (start 135.636 89.154) (end 136.144 89.408) (width 0.254) (layer Cuivre) (net 42)) + (segment (start 136.144 89.408) (end 139.827 89.408) (width 0.254) (layer Cuivre) (net 42)) (segment (start 152.527 88.392) (end 151.765 87.63) (width 0.254) (layer Cuivre) (net 43)) - (segment (start 102.108 89.408) (end 102.489 89.027) (width 0.381) (layer Composant) (net 44)) - (segment (start 103.251 89.027) (end 104.775 89.027) (width 0.381) (layer Composant) (net 44) (status 800)) - (segment (start 102.489 89.027) (end 103.251 89.027) (width 0.381) (layer Composant) (net 44) (status 400)) - (segment (start 97.79 95.758) (end 99.187 94.361) (width 0.381) (layer Composant) (net 44) (status 800)) - (segment (start 99.187 94.361) (end 99.187 92.456) (width 0.381) (layer Composant) (net 44)) - (segment (start 99.187 92.456) (end 100.457 91.186) (width 0.381) (layer Composant) (net 44)) - (segment (start 100.457 91.186) (end 100.457 90.551) (width 0.381) (layer Composant) (net 44)) - (segment (start 101.219 89.408) (end 102.108 89.408) (width 0.381) (layer Composant) (net 44)) - (segment (start 100.6475 90.043) (end 101.219 89.408) (width 0.381) (layer Composant) (net 44) (status 800)) - (segment (start 111.76 80.137) (end 113.284 78.613) (width 0.381) (layer Composant) (net 44) (status 400)) - (segment (start 108.077 80.137) (end 111.76 80.137) (width 0.381) (layer Composant) (net 44)) - (segment (start 105.918 82.296) (end 108.077 80.137) (width 0.381) (layer Composant) (net 44)) - (segment (start 105.918 87.884) (end 105.918 82.296) (width 0.381) (layer Composant) (net 44)) - (segment (start 104.775 89.027) (end 105.918 87.884) (width 0.381) (layer Composant) (net 44)) + (segment (start 161.544 127.508) (end 152.654 136.398) (width 0.254) (layer GND_layer) (net 43)) + (segment (start 161.544 119.38) (end 161.544 127.508) (width 0.254) (layer GND_layer) (net 43)) + (segment (start 160.147 117.983) (end 161.544 119.38) (width 0.254) (layer GND_layer) (net 43) (status 800)) + (segment (start 156.21 114.046) (end 156.21 92.329) (width 0.254) (layer GND_layer) (net 43)) + (segment (start 156.21 92.329) (end 154.813 90.932) (width 0.254) (layer GND_layer) (net 43)) + (segment (start 160.147 117.983) (end 156.21 114.046) (width 0.254) (layer GND_layer) (net 43) (status 800)) + (segment (start 136.779 89.027) (end 136.525 88.646) (width 0.254) (layer Composant) (net 43)) + (segment (start 136.779 91.948) (end 136.779 89.027) (width 0.254) (layer Composant) (net 43)) + (segment (start 136.8933 92.3163) (end 136.779 91.948) (width 0.254) (layer Composant) (net 43)) + (segment (start 136.017 84.709) (end 136.017 85.344) (width 0.254) (layer Cuivre) (net 43)) + (segment (start 135.763 84.455) (end 136.017 84.709) (width 0.254) (layer Cuivre) (net 43)) + (segment (start 111.76 86.487) (end 111.76 85.852) (width 0.254) (layer Cuivre) (net 43) (status 800)) + (segment (start 127.127 84.455) (end 135.763 84.455) (width 0.254) (layer Cuivre) (net 43)) + (segment (start 136.8806 93.726) (end 136.8933 92.3163) (width 0.254) (layer Composant) (net 43) (status 800)) + (segment (start 139.827 88.646) (end 136.525 88.646) (width 0.254) (layer Cuivre) (net 43)) + (segment (start 151.765 87.63) (end 140.843 87.63) (width 0.254) (layer Cuivre) (net 43)) + (segment (start 126.365 83.693) (end 127.127 84.455) (width 0.254) (layer Cuivre) (net 43)) + (segment (start 113.919 83.693) (end 126.365 83.693) (width 0.254) (layer Cuivre) (net 43)) + (segment (start 111.76 85.852) (end 113.919 83.693) (width 0.254) (layer Cuivre) (net 43)) + (segment (start 140.843 87.63) (end 139.827 88.646) (width 0.254) (layer Cuivre) (net 43)) + (segment (start 153.035 88.392) (end 152.527 88.392) (width 0.254) (layer Cuivre) (net 43)) + (segment (start 153.543 88.392) (end 154.813 89.662) (width 0.254) (layer GND_layer) (net 43)) + (segment (start 154.813 89.662) (end 154.813 90.932) (width 0.254) (layer GND_layer) (net 43)) + (segment (start 153.035 88.392) (end 153.543 88.392) (width 0.254) (layer GND_layer) (net 43)) + (via (at 153.035 88.392) (size 0.889) (layers Composant Cuivre) (net 43)) + (segment (start 152.654 136.398) (end 152.654 138.176) (width 0.254) (layer GND_layer) (net 43)) + (segment (start 152.654 138.176) (end 153.924 139.446) (width 0.254) (layer GND_layer) (net 43) (status 400)) + (segment (start 136.017 85.344) (end 136.525 86.106) (width 0.254) (layer Composant) (net 43)) + (segment (start 136.525 86.106) (end 136.525 88.646) (width 0.254) (layer Composant) (net 43)) + (via (at 136.017 85.344) (size 0.889) (layers Composant Cuivre) (net 43)) + (via (at 136.525 88.646) (size 0.635) (layers Composant Cuivre) (net 43)) (segment (start 100.457 90.551) (end 100.6475 90.043) (width 0.381) (layer Composant) (net 44) (status 400)) - (segment (start 104.648 87.757) (end 103.251 87.757) (width 0.381) (layer Composant) (net 45) (status 400)) - (segment (start 105.156 87.249) (end 104.648 87.757) (width 0.381) (layer Composant) (net 45)) - (segment (start 105.156 81.661) (end 105.156 87.249) (width 0.381) (layer Composant) (net 45)) - (segment (start 100.6475 85.471) (end 100.6475 87.757) (width 0.762) (layer Composant) (net 45) (status C00)) - (segment (start 100.6475 87.757) (end 103.251 87.757) (width 0.4318) (layer Composant) (net 45) (status C00)) + (segment (start 104.775 89.027) (end 105.918 87.884) (width 0.381) (layer Composant) (net 44)) + (segment (start 105.918 87.884) (end 105.918 82.296) (width 0.381) (layer Composant) (net 44)) + (segment (start 105.918 82.296) (end 108.077 80.137) (width 0.381) (layer Composant) (net 44)) + (segment (start 108.077 80.137) (end 111.76 80.137) (width 0.381) (layer Composant) (net 44)) + (segment (start 111.76 80.137) (end 113.284 78.613) (width 0.381) (layer Composant) (net 44) (status 400)) + (segment (start 100.6475 90.043) (end 101.219 89.408) (width 0.381) (layer Composant) (net 44) (status 800)) + (segment (start 101.219 89.408) (end 102.108 89.408) (width 0.381) (layer Composant) (net 44)) + (segment (start 100.457 91.186) (end 100.457 90.551) (width 0.381) (layer Composant) (net 44)) + (segment (start 99.187 92.456) (end 100.457 91.186) (width 0.381) (layer Composant) (net 44)) + (segment (start 99.187 94.361) (end 99.187 92.456) (width 0.381) (layer Composant) (net 44)) + (segment (start 97.79 95.758) (end 99.187 94.361) (width 0.381) (layer Composant) (net 44) (status 800)) + (segment (start 102.489 89.027) (end 103.251 89.027) (width 0.381) (layer Composant) (net 44) (status 400)) + (segment (start 103.251 89.027) (end 104.775 89.027) (width 0.381) (layer Composant) (net 44) (status 800)) + (segment (start 102.108 89.408) (end 102.489 89.027) (width 0.381) (layer Composant) (net 44)) (segment (start 108.204 78.613) (end 105.156 81.661) (width 0.381) (layer Composant) (net 45) (status 800)) - (segment (start 180.594 82.296) (end 178.816 80.518) (width 0.381) (layer Composant) (net 46)) - (segment (start 185.801 63.754) (end 187.833 66.04) (width 0.381) (layer Composant) (net 46) (status 400)) - (segment (start 173.482 68.58) (end 173.482 65.278) (width 0.381) (layer Composant) (net 46)) - (segment (start 176.022 71.12) (end 173.482 68.58) (width 0.381) (layer Composant) (net 46)) - (segment (start 176.022 79.502) (end 176.022 71.12) (width 0.381) (layer Composant) (net 46)) - (segment (start 177.038 80.518) (end 176.022 79.502) (width 0.381) (layer Composant) (net 46)) - (segment (start 173.482 65.278) (end 175.006 63.754) (width 0.381) (layer Composant) (net 46)) - (segment (start 184.15 82.296) (end 180.594 82.296) (width 0.381) (layer Composant) (net 46) (status 800)) - (segment (start 175.006 63.754) (end 185.801 63.754) (width 0.381) (layer Composant) (net 46)) + (segment (start 100.6475 87.757) (end 103.251 87.757) (width 0.4318) (layer Composant) (net 45) (status C00)) + (segment (start 100.6475 85.471) (end 100.6475 87.757) (width 0.762) (layer Composant) (net 45) (status C00)) + (segment (start 105.156 81.661) (end 105.156 87.249) (width 0.381) (layer Composant) (net 45)) + (segment (start 105.156 87.249) (end 104.648 87.757) (width 0.381) (layer Composant) (net 45)) + (segment (start 104.648 87.757) (end 103.251 87.757) (width 0.381) (layer Composant) (net 45) (status 400)) (segment (start 178.816 80.518) (end 177.038 80.518) (width 0.381) (layer Composant) (net 46)) - (segment (start 154.305 66.04) (end 154.305 65.151) (width 0.381) (layer Composant) (net 47) (status 800)) - (segment (start 151.892 82.296) (end 156.21 82.296) (width 0.381) (layer Composant) (net 47) (status 400)) - (segment (start 148.717 79.121) (end 151.892 82.296) (width 0.381) (layer Composant) (net 47)) - (segment (start 152.908 63.754) (end 150.241 63.754) (width 0.381) (layer Composant) (net 47)) - (segment (start 154.305 65.151) (end 152.908 63.754) (width 0.381) (layer Composant) (net 47)) - (segment (start 148.717 65.278) (end 148.717 79.121) (width 0.381) (layer Composant) (net 47)) + (segment (start 175.006 63.754) (end 185.801 63.754) (width 0.381) (layer Composant) (net 46)) + (segment (start 184.15 82.296) (end 180.594 82.296) (width 0.381) (layer Composant) (net 46) (status 800)) + (segment (start 173.482 65.278) (end 175.006 63.754) (width 0.381) (layer Composant) (net 46)) + (segment (start 177.038 80.518) (end 176.022 79.502) (width 0.381) (layer Composant) (net 46)) + (segment (start 176.022 79.502) (end 176.022 71.12) (width 0.381) (layer Composant) (net 46)) + (segment (start 176.022 71.12) (end 173.482 68.58) (width 0.381) (layer Composant) (net 46)) + (segment (start 173.482 68.58) (end 173.482 65.278) (width 0.381) (layer Composant) (net 46)) + (segment (start 185.801 63.754) (end 187.833 66.04) (width 0.381) (layer Composant) (net 46) (status 400)) + (segment (start 180.594 82.296) (end 178.816 80.518) (width 0.381) (layer Composant) (net 46)) (segment (start 150.241 63.754) (end 148.717 65.278) (width 0.381) (layer Composant) (net 47)) - (segment (start 119.38 67.183) (end 115.443 67.183) (width 0.381) (layer Composant) (net 48)) - (segment (start 120.523 66.04) (end 119.38 67.183) (width 0.381) (layer Composant) (net 48)) - (segment (start 109.474 76.835) (end 109.474 71.374) (width 0.381) (layer GND_layer) (net 48)) - (segment (start 109.982 77.343) (end 109.474 76.835) (width 0.381) (layer GND_layer) (net 48)) - (segment (start 112.014 77.343) (end 109.982 77.343) (width 0.381) (layer GND_layer) (net 48)) - (segment (start 113.284 76.073) (end 112.014 77.343) (width 0.381) (layer GND_layer) (net 48) (status 800)) - (segment (start 110.998 69.85) (end 109.474 71.374) (width 0.381) (layer Composant) (net 48)) - (segment (start 112.776 69.85) (end 110.998 69.85) (width 0.381) (layer Composant) (net 48)) - (segment (start 115.443 67.183) (end 112.776 69.85) (width 0.381) (layer Composant) (net 48)) - (via (at 109.474 71.374) (size 0.889) (layers Composant Cuivre) (net 48)) + (segment (start 148.717 65.278) (end 148.717 79.121) (width 0.381) (layer Composant) (net 47)) + (segment (start 154.305 65.151) (end 152.908 63.754) (width 0.381) (layer Composant) (net 47)) + (segment (start 152.908 63.754) (end 150.241 63.754) (width 0.381) (layer Composant) (net 47)) + (segment (start 148.717 79.121) (end 151.892 82.296) (width 0.381) (layer Composant) (net 47)) + (segment (start 151.892 82.296) (end 156.21 82.296) (width 0.381) (layer Composant) (net 47) (status 400)) + (segment (start 154.305 66.04) (end 154.305 65.151) (width 0.381) (layer Composant) (net 47) (status 800)) (segment (start 120.777 66.04) (end 120.523 66.04) (width 0.381) (layer Composant) (net 48) (status 800)) - (segment (start 131.45 102.108) (end 129.408 102.108) (width 0.2) (layer Composant) (net 49)) - (segment (start 129.25 101.95) (end 129.25 101.945) (width 0.2) (layer Composant) (net 49) (tstamp 52D04C53)) - (segment (start 129.408 102.108) (end 129.25 101.95) (width 0.2) (layer Composant) (net 49) (tstamp 52D04C51)) - (segment (start 131.953 102.108) (end 131.45 102.108) (width 0.254) (layer Composant) (net 49)) - (via (at 133.604 135.001) (size 0.635) (layers Composant Cuivre) (net 49)) - (segment (start 166.878 141.224) (end 167.894 140.208) (width 0.254) (layer Cuivre) (net 49)) - (segment (start 133.604 141.224) (end 166.878 141.224) (width 0.254) (layer Cuivre) (net 49)) - (segment (start 132.334 139.954) (end 133.604 141.224) (width 0.254) (layer Cuivre) (net 49)) - (segment (start 131.953 135.509) (end 132.334 135.89) (width 0.254) (layer Cuivre) (net 49)) - (segment (start 131.953 134.747) (end 131.953 135.509) (width 0.254) (layer Cuivre) (net 49)) - (segment (start 132.461 134.239) (end 131.953 134.747) (width 0.254) (layer Cuivre) (net 49)) - (segment (start 133.35 134.239) (end 132.461 134.239) (width 0.254) (layer Cuivre) (net 49)) - (segment (start 133.604 134.493) (end 133.35 134.239) (width 0.254) (layer Cuivre) (net 49)) - (segment (start 133.604 135.001) (end 133.604 134.493) (width 0.254) (layer Cuivre) (net 49)) - (segment (start 133.604 128.397) (end 133.604 135.001) (width 0.254) (layer GND_layer) (net 49)) - (segment (start 131.445 126.238) (end 133.604 128.397) (width 0.254) (layer GND_layer) (net 49)) - (segment (start 131.445 107.061) (end 131.445 126.238) (width 0.254) (layer GND_layer) (net 49)) - (segment (start 132.588 105.918) (end 131.445 107.061) (width 0.254) (layer GND_layer) (net 49)) - (segment (start 132.588 102.87) (end 132.588 105.918) (width 0.254) (layer GND_layer) (net 49)) - (segment (start 167.894 138.176) (end 169.164 136.906) (width 0.254) (layer Cuivre) (net 49) (status 400)) - (segment (start 132.588 102.87) (end 132.334 102.489) (width 0.254) (layer Composant) (net 49)) - (segment (start 132.334 102.489) (end 131.953 102.108) (width 0.254) (layer Composant) (net 49)) - (segment (start 167.894 140.208) (end 167.894 138.176) (width 0.254) (layer Cuivre) (net 49)) - (via (at 132.588 102.87) (size 0.635) (layers Composant Cuivre) (net 49)) - (segment (start 128.778 101.473) (end 127.635 101.473) (width 0.254) (layer Composant) (net 49) (status 400)) - (segment (start 132.334 135.89) (end 132.334 139.954) (width 0.254) (layer Cuivre) (net 49)) + (via (at 109.474 71.374) (size 0.889) (layers Composant Cuivre) (net 48)) + (segment (start 115.443 67.183) (end 112.776 69.85) (width 0.381) (layer Composant) (net 48)) + (segment (start 112.776 69.85) (end 110.998 69.85) (width 0.381) (layer Composant) (net 48)) + (segment (start 110.998 69.85) (end 109.474 71.374) (width 0.381) (layer Composant) (net 48)) + (segment (start 113.284 76.073) (end 112.014 77.343) (width 0.381) (layer GND_layer) (net 48) (status 800)) + (segment (start 112.014 77.343) (end 109.982 77.343) (width 0.381) (layer GND_layer) (net 48)) + (segment (start 109.982 77.343) (end 109.474 76.835) (width 0.381) (layer GND_layer) (net 48)) + (segment (start 109.474 76.835) (end 109.474 71.374) (width 0.381) (layer GND_layer) (net 48)) + (segment (start 120.523 66.04) (end 119.38 67.183) (width 0.381) (layer Composant) (net 48)) + (segment (start 119.38 67.183) (end 115.443 67.183) (width 0.381) (layer Composant) (net 48)) (segment (start 129.25 101.945) (end 128.778 101.473) (width 0.254) (layer Composant) (net 49) (tstamp 52D04C54)) - (segment (start 130.556 129.032) (end 130.937 129.413) (width 0.254) (layer GND_layer) (net 50)) - (segment (start 130.556 109.601) (end 130.556 129.032) (width 0.254) (layer GND_layer) (net 50)) - (via (at 129.159 99.06) (size 0.889) (layers Composant Cuivre) (net 50)) - (segment (start 128.7526 98.9584) (end 129.159 99.06) (width 0.254) (layer Composant) (net 50)) - (segment (start 127.635 98.9838) (end 128.7526 98.9584) (width 0.254) (layer Composant) (net 50) (status 800)) - (segment (start 128.651 99.568) (end 129.159 99.06) (width 0.254) (layer GND_layer) (net 50)) - (segment (start 128.651 107.696) (end 128.651 99.568) (width 0.254) (layer GND_layer) (net 50)) - (segment (start 130.556 109.601) (end 128.651 107.696) (width 0.254) (layer GND_layer) (net 50)) - (segment (start 165.354 138.176) (end 165.354 140.081) (width 0.254) (layer Cuivre) (net 50)) - (segment (start 165.354 140.081) (end 164.719 140.716) (width 0.254) (layer Cuivre) (net 50)) - (segment (start 164.719 140.716) (end 135.636 140.716) (width 0.254) (layer Cuivre) (net 50)) - (segment (start 135.636 140.716) (end 134.874 139.954) (width 0.254) (layer Cuivre) (net 50)) - (segment (start 134.874 139.954) (end 134.874 136.017) (width 0.254) (layer Cuivre) (net 50)) - (segment (start 134.874 136.017) (end 134.62 135.763) (width 0.254) (layer Cuivre) (net 50)) - (segment (start 134.62 135.763) (end 132.969 135.763) (width 0.254) (layer Cuivre) (net 50)) - (segment (start 132.969 135.763) (end 132.715 135.509) (width 0.254) (layer Cuivre) (net 50)) - (segment (start 166.624 136.906) (end 165.354 138.176) (width 0.254) (layer Cuivre) (net 50) (status 800)) - (via (at 132.715 135.001) (size 0.635) (layers Composant Cuivre) (net 50)) - (segment (start 130.937 133.223) (end 130.937 129.413) (width 0.254) (layer GND_layer) (net 50)) - (segment (start 132.715 135.001) (end 130.937 133.223) (width 0.254) (layer GND_layer) (net 50)) + (segment (start 132.334 135.89) (end 132.334 139.954) (width 0.254) (layer Cuivre) (net 49)) + (segment (start 128.778 101.473) (end 127.635 101.473) (width 0.254) (layer Composant) (net 49) (status 400)) + (via (at 132.588 102.87) (size 0.635) (layers Composant Cuivre) (net 49)) + (segment (start 167.894 140.208) (end 167.894 138.176) (width 0.254) (layer Cuivre) (net 49)) + (segment (start 132.334 102.489) (end 131.953 102.108) (width 0.254) (layer Composant) (net 49)) + (segment (start 132.588 102.87) (end 132.334 102.489) (width 0.254) (layer Composant) (net 49)) + (segment (start 167.894 138.176) (end 169.164 136.906) (width 0.254) (layer Cuivre) (net 49) (status 400)) + (segment (start 132.588 102.87) (end 132.588 105.918) (width 0.254) (layer GND_layer) (net 49)) + (segment (start 132.588 105.918) (end 131.445 107.061) (width 0.254) (layer GND_layer) (net 49)) + (segment (start 131.445 107.061) (end 131.445 126.238) (width 0.254) (layer GND_layer) (net 49)) + (segment (start 131.445 126.238) (end 133.604 128.397) (width 0.254) (layer GND_layer) (net 49)) + (segment (start 133.604 128.397) (end 133.604 135.001) (width 0.254) (layer GND_layer) (net 49)) + (segment (start 133.604 135.001) (end 133.604 134.493) (width 0.254) (layer Cuivre) (net 49)) + (segment (start 133.604 134.493) (end 133.35 134.239) (width 0.254) (layer Cuivre) (net 49)) + (segment (start 133.35 134.239) (end 132.461 134.239) (width 0.254) (layer Cuivre) (net 49)) + (segment (start 132.461 134.239) (end 131.953 134.747) (width 0.254) (layer Cuivre) (net 49)) + (segment (start 131.953 134.747) (end 131.953 135.509) (width 0.254) (layer Cuivre) (net 49)) + (segment (start 131.953 135.509) (end 132.334 135.89) (width 0.254) (layer Cuivre) (net 49)) + (segment (start 132.334 139.954) (end 133.604 141.224) (width 0.254) (layer Cuivre) (net 49)) + (segment (start 133.604 141.224) (end 166.878 141.224) (width 0.254) (layer Cuivre) (net 49)) + (segment (start 166.878 141.224) (end 167.894 140.208) (width 0.254) (layer Cuivre) (net 49)) + (via (at 133.604 135.001) (size 0.635) (layers Composant Cuivre) (net 49)) + (segment (start 131.953 102.108) (end 131.45 102.108) (width 0.254) (layer Composant) (net 49)) + (segment (start 129.408 102.108) (end 129.25 101.95) (width 0.2) (layer Composant) (net 49) (tstamp 52D04C51)) + (segment (start 129.25 101.95) (end 129.25 101.945) (width 0.2) (layer Composant) (net 49) (tstamp 52D04C53)) + (segment (start 131.45 102.108) (end 129.408 102.108) (width 0.2) (layer Composant) (net 49)) (segment (start 132.715 135.509) (end 132.715 135.001) (width 0.254) (layer Cuivre) (net 50)) - (segment (start 138.049 134.493) (end 138.303 134.239) (width 0.254) (layer Cuivre) (net 51)) - (via (at 138.049 135.001) (size 0.635) (layers Composant Cuivre) (net 51)) - (segment (start 138.049 129.032) (end 138.049 135.001) (width 0.254) (layer GND_layer) (net 51)) - (segment (start 134.239 125.222) (end 138.049 129.032) (width 0.254) (layer GND_layer) (net 51)) - (segment (start 134.239 110.871) (end 134.239 125.222) (width 0.254) (layer GND_layer) (net 51)) - (segment (start 133.8834 110.4646) (end 133.8834 109.22) (width 0.254) (layer Composant) (net 51) (status 400)) - (segment (start 134.239 110.871) (end 133.8834 110.4646) (width 0.254) (layer Composant) (net 51)) - (segment (start 147.574 138.176) (end 148.844 139.446) (width 0.254) (layer Cuivre) (net 51) (status 400)) - (segment (start 147.574 136.271) (end 147.574 138.176) (width 0.254) (layer Cuivre) (net 51)) - (segment (start 145.542 134.239) (end 147.574 136.271) (width 0.254) (layer Cuivre) (net 51)) - (segment (start 138.303 134.239) (end 145.542 134.239) (width 0.254) (layer Cuivre) (net 51)) - (via (at 134.239 110.871) (size 0.635) (layers Composant Cuivre) (net 51)) + (segment (start 132.715 135.001) (end 130.937 133.223) (width 0.254) (layer GND_layer) (net 50)) + (segment (start 130.937 133.223) (end 130.937 129.413) (width 0.254) (layer GND_layer) (net 50)) + (via (at 132.715 135.001) (size 0.635) (layers Composant Cuivre) (net 50)) + (segment (start 166.624 136.906) (end 165.354 138.176) (width 0.254) (layer Cuivre) (net 50) (status 800)) + (segment (start 132.969 135.763) (end 132.715 135.509) (width 0.254) (layer Cuivre) (net 50)) + (segment (start 134.62 135.763) (end 132.969 135.763) (width 0.254) (layer Cuivre) (net 50)) + (segment (start 134.874 136.017) (end 134.62 135.763) (width 0.254) (layer Cuivre) (net 50)) + (segment (start 134.874 139.954) (end 134.874 136.017) (width 0.254) (layer Cuivre) (net 50)) + (segment (start 135.636 140.716) (end 134.874 139.954) (width 0.254) (layer Cuivre) (net 50)) + (segment (start 164.719 140.716) (end 135.636 140.716) (width 0.254) (layer Cuivre) (net 50)) + (segment (start 165.354 140.081) (end 164.719 140.716) (width 0.254) (layer Cuivre) (net 50)) + (segment (start 165.354 138.176) (end 165.354 140.081) (width 0.254) (layer Cuivre) (net 50)) + (segment (start 130.556 109.601) (end 128.651 107.696) (width 0.254) (layer GND_layer) (net 50)) + (segment (start 128.651 107.696) (end 128.651 99.568) (width 0.254) (layer GND_layer) (net 50)) + (segment (start 128.651 99.568) (end 129.159 99.06) (width 0.254) (layer GND_layer) (net 50)) + (segment (start 127.635 98.9838) (end 128.7526 98.9584) (width 0.254) (layer Composant) (net 50) (status 800)) + (segment (start 128.7526 98.9584) (end 129.159 99.06) (width 0.254) (layer Composant) (net 50)) + (via (at 129.159 99.06) (size 0.889) (layers Composant Cuivre) (net 50)) + (segment (start 130.556 109.601) (end 130.556 129.032) (width 0.254) (layer GND_layer) (net 50)) + (segment (start 130.556 129.032) (end 130.937 129.413) (width 0.254) (layer GND_layer) (net 50)) (segment (start 138.049 135.001) (end 138.049 134.493) (width 0.254) (layer Cuivre) (net 51)) - (segment (start 135.128 110.871) (end 135.128 125.349) (width 0.254) (layer GND_layer) (net 52)) - (segment (start 138.684 128.905) (end 138.684 132.969) (width 0.254) (layer GND_layer) (net 52)) - (segment (start 135.128 125.349) (end 138.684 128.905) (width 0.254) (layer GND_layer) (net 52)) - (via (at 135.128 110.871) (size 0.635) (layers Composant Cuivre) (net 52)) - (segment (start 138.938 133.223) (end 138.938 135.001) (width 0.254) (layer GND_layer) (net 52)) - (segment (start 145.034 138.176) (end 146.304 139.446) (width 0.254) (layer Cuivre) (net 52) (status 400)) - (segment (start 145.034 136.144) (end 145.034 138.176) (width 0.254) (layer Cuivre) (net 52)) - (segment (start 143.891 135.001) (end 145.034 136.144) (width 0.254) (layer Cuivre) (net 52)) - (segment (start 138.938 135.001) (end 143.891 135.001) (width 0.254) (layer Cuivre) (net 52)) - (via (at 138.938 135.001) (size 0.635) (layers Composant Cuivre) (net 52)) - (segment (start 135.382 109.22) (end 135.382 110.49) (width 0.254) (layer Composant) (net 52) (status 800)) - (segment (start 135.382 110.49) (end 135.128 110.871) (width 0.254) (layer Composant) (net 52)) + (via (at 134.239 110.871) (size 0.635) (layers Composant Cuivre) (net 51)) + (segment (start 138.303 134.239) (end 145.542 134.239) (width 0.254) (layer Cuivre) (net 51)) + (segment (start 145.542 134.239) (end 147.574 136.271) (width 0.254) (layer Cuivre) (net 51)) + (segment (start 147.574 136.271) (end 147.574 138.176) (width 0.254) (layer Cuivre) (net 51)) + (segment (start 147.574 138.176) (end 148.844 139.446) (width 0.254) (layer Cuivre) (net 51) (status 400)) + (segment (start 134.239 110.871) (end 133.8834 110.4646) (width 0.254) (layer Composant) (net 51)) + (segment (start 133.8834 110.4646) (end 133.8834 109.22) (width 0.254) (layer Composant) (net 51) (status 400)) + (segment (start 134.239 110.871) (end 134.239 125.222) (width 0.254) (layer GND_layer) (net 51)) + (segment (start 134.239 125.222) (end 138.049 129.032) (width 0.254) (layer GND_layer) (net 51)) + (segment (start 138.049 129.032) (end 138.049 135.001) (width 0.254) (layer GND_layer) (net 51)) + (via (at 138.049 135.001) (size 0.635) (layers Composant Cuivre) (net 51)) + (segment (start 138.049 134.493) (end 138.303 134.239) (width 0.254) (layer Cuivre) (net 51)) (segment (start 138.684 132.969) (end 138.938 133.223) (width 0.254) (layer GND_layer) (net 52)) - (segment (start 177.038 107.061) (end 174.752 104.775) (width 0.254) (layer GND_layer) (net 53)) - (segment (start 174.752 104.775) (end 174.752 91.694) (width 0.254) (layer GND_layer) (net 53)) - (segment (start 174.752 91.694) (end 177.038 89.408) (width 0.254) (layer GND_layer) (net 53)) - (segment (start 177.038 89.408) (end 175.895 89.408) (width 0.254) (layer Cuivre) (net 53)) - (segment (start 175.895 89.408) (end 175.133 88.646) (width 0.254) (layer Cuivre) (net 53)) - (segment (start 175.133 88.646) (end 173.609 88.646) (width 0.254) (layer Cuivre) (net 53)) - (segment (start 173.609 88.646) (end 172.974 89.281) (width 0.254) (layer Cuivre) (net 53)) - (segment (start 172.974 89.281) (end 165.481 89.281) (width 0.254) (layer Cuivre) (net 53)) - (segment (start 165.481 89.281) (end 164.846 88.646) (width 0.254) (layer Cuivre) (net 53)) - (segment (start 164.846 88.646) (end 159.512 88.646) (width 0.254) (layer Cuivre) (net 53)) - (segment (start 159.512 88.646) (end 157.607 90.551) (width 0.254) (layer Cuivre) (net 53)) - (segment (start 157.607 90.551) (end 157.099 90.551) (width 0.254) (layer Cuivre) (net 53)) - (segment (start 138.303 91.948) (end 152.019 91.948) (width 0.254) (layer Cuivre) (net 53)) - (segment (start 152.019 91.948) (end 152.781 91.186) (width 0.254) (layer Cuivre) (net 53)) - (segment (start 152.781 91.186) (end 156.464 91.186) (width 0.254) (layer Cuivre) (net 53)) - (segment (start 156.464 91.186) (end 157.099 90.551) (width 0.254) (layer Cuivre) (net 53)) - (segment (start 133.8834 93.726) (end 133.8834 95.4024) (width 0.254) (layer Composant) (net 53) (status 800)) - (segment (start 181.102 109.347) (end 178.816 107.061) (width 0.254) (layer GND_layer) (net 53)) - (segment (start 133.8834 95.4024) (end 134.112 95.631) (width 0.254) (layer Composant) (net 53)) - (segment (start 161.544 136.906) (end 167.132 131.318) (width 0.254) (layer GND_layer) (net 53) (status 800)) - (segment (start 167.132 131.318) (end 167.132 117.221) (width 0.254) (layer GND_layer) (net 53)) - (segment (start 167.132 117.221) (end 159.258 109.347) (width 0.254) (layer GND_layer) (net 53)) - (segment (start 159.258 109.347) (end 159.258 92.71) (width 0.254) (layer GND_layer) (net 53)) - (segment (start 134.747 95.504) (end 138.303 91.948) (width 0.254) (layer Cuivre) (net 53)) - (segment (start 134.112 97.028) (end 134.112 95.631) (width 0.254) (layer Composant) (net 53)) - (via (at 134.112 97.028) (size 0.889) (layers Composant Cuivre) (net 53)) - (via (at 177.038 89.408) (size 0.635) (layers Composant Cuivre) (net 53)) - (via (at 157.099 90.551) (size 0.635) (layers Composant Cuivre) (net 53)) - (via (at 181.61 109.347) (size 0.635) (layers Composant Cuivre) (net 53)) - (via (at 188.37402 108.02112) (size 0.889) (layers Composant Cuivre) (net 53)) - (segment (start 159.258 92.71) (end 157.099 90.551) (width 0.254) (layer GND_layer) (net 53)) - (segment (start 181.61 109.347) (end 181.102 109.347) (width 0.254) (layer GND_layer) (net 53)) - (segment (start 187.04814 109.347) (end 188.37402 108.02112) (width 0.254) (layer Cuivre) (net 53)) - (segment (start 181.61 109.347) (end 187.04814 109.347) (width 0.254) (layer Cuivre) (net 53)) - (segment (start 178.816 107.061) (end 177.038 107.061) (width 0.254) (layer GND_layer) (net 53)) - (segment (start 188.88964 107.5055) (end 190.9445 107.5055) (width 0.254) (layer Composant) (net 53) (status 400)) - (segment (start 188.37402 108.02112) (end 188.88964 107.5055) (width 0.254) (layer Composant) (net 53)) - (segment (start 134.112 97.028) (end 134.747 96.393) (width 0.254) (layer Cuivre) (net 53)) + (segment (start 135.382 110.49) (end 135.128 110.871) (width 0.254) (layer Composant) (net 52)) + (segment (start 135.382 109.22) (end 135.382 110.49) (width 0.254) (layer Composant) (net 52) (status 800)) + (via (at 138.938 135.001) (size 0.635) (layers Composant Cuivre) (net 52)) + (segment (start 138.938 135.001) (end 143.891 135.001) (width 0.254) (layer Cuivre) (net 52)) + (segment (start 143.891 135.001) (end 145.034 136.144) (width 0.254) (layer Cuivre) (net 52)) + (segment (start 145.034 136.144) (end 145.034 138.176) (width 0.254) (layer Cuivre) (net 52)) + (segment (start 145.034 138.176) (end 146.304 139.446) (width 0.254) (layer Cuivre) (net 52) (status 400)) + (segment (start 138.938 133.223) (end 138.938 135.001) (width 0.254) (layer GND_layer) (net 52)) + (via (at 135.128 110.871) (size 0.635) (layers Composant Cuivre) (net 52)) + (segment (start 135.128 125.349) (end 138.684 128.905) (width 0.254) (layer GND_layer) (net 52)) + (segment (start 138.684 128.905) (end 138.684 132.969) (width 0.254) (layer GND_layer) (net 52)) + (segment (start 135.128 110.871) (end 135.128 125.349) (width 0.254) (layer GND_layer) (net 52)) (segment (start 134.747 96.393) (end 134.747 95.504) (width 0.254) (layer Cuivre) (net 53)) - (segment (start 155.575 90.678) (end 152.527 90.678) (width 0.254) (layer Cuivre) (net 54)) - (segment (start 152.527 90.678) (end 151.765 91.44) (width 0.254) (layer Cuivre) (net 54)) - (segment (start 151.765 91.44) (end 137.795 91.44) (width 0.254) (layer Cuivre) (net 54)) - (segment (start 137.795 91.44) (end 133.731 95.504) (width 0.254) (layer Cuivre) (net 54)) - (segment (start 133.731 95.504) (end 133.35 96.012) (width 0.254) (layer Cuivre) (net 54)) - (segment (start 178.308 88.773) (end 176.022 88.773) (width 0.254) (layer Cuivre) (net 54)) - (segment (start 176.022 88.773) (end 175.387 88.138) (width 0.254) (layer Cuivre) (net 54)) - (segment (start 175.387 88.138) (end 173.101 88.138) (width 0.254) (layer Cuivre) (net 54)) - (segment (start 157.099 89.662) (end 156.591 89.662) (width 0.254) (layer Cuivre) (net 54)) - (segment (start 133.4008 95.5294) (end 133.35 96.012) (width 0.254) (layer Composant) (net 54)) - (segment (start 133.3754 93.726) (end 133.4008 95.5294) (width 0.254) (layer Composant) (net 54) (status 800)) - (segment (start 157.607 89.662) (end 157.099 89.662) (width 0.254) (layer GND_layer) (net 54)) - (segment (start 159.766 91.821) (end 157.607 89.662) (width 0.254) (layer GND_layer) (net 54)) - (segment (start 159.766 109.093) (end 159.766 91.821) (width 0.254) (layer GND_layer) (net 54)) - (segment (start 167.64 116.967) (end 159.766 109.093) (width 0.254) (layer GND_layer) (net 54)) - (segment (start 167.64 131.826) (end 167.64 116.967) (width 0.254) (layer GND_layer) (net 54)) - (segment (start 164.084 135.382) (end 167.64 131.826) (width 0.254) (layer GND_layer) (net 54)) - (segment (start 164.084 136.906) (end 164.084 135.382) (width 0.254) (layer GND_layer) (net 54) (status 800)) - (segment (start 190.9445 108.0135) (end 192.00368 108.0135) (width 0.254) (layer Composant) (net 54) (status 800)) - (segment (start 192.405 106.25328) (end 193.294 105.41) (width 0.254) (layer Cuivre) (net 54)) - (segment (start 183.81472 106.25328) (end 192.405 106.25328) (width 0.254) (layer Cuivre) (net 54)) - (segment (start 181.61 108.458) (end 183.81472 106.25328) (width 0.254) (layer Cuivre) (net 54)) - (segment (start 192.00368 106.6546) (end 192.00368 108.0135) (width 0.254) (layer Composant) (net 54)) - (segment (start 193.294 105.41) (end 192.00368 106.6546) (width 0.254) (layer Composant) (net 54)) - (via (at 178.308 88.773) (size 0.635) (layers Composant Cuivre) (net 54)) - (segment (start 156.591 89.662) (end 155.575 90.678) (width 0.254) (layer Cuivre) (net 54)) - (via (at 181.61 108.458) (size 0.635) (layers Composant Cuivre) (net 54)) - (via (at 133.35 96.012) (size 0.889) (layers Composant Cuivre) (net 54)) - (via (at 157.099 89.662) (size 0.635) (layers Composant Cuivre) (net 54)) - (via (at 193.294 105.41) (size 0.889) (layers Composant Cuivre) (net 54)) - (segment (start 178.181 89.281) (end 178.308 88.773) (width 0.254) (layer GND_layer) (net 54)) - (segment (start 177.292 90.17) (end 178.181 89.281) (width 0.254) (layer GND_layer) (net 54)) - (segment (start 177.292 106.045) (end 177.292 90.17) (width 0.254) (layer GND_layer) (net 54)) - (segment (start 177.8 106.553) (end 177.292 106.045) (width 0.254) (layer GND_layer) (net 54)) - (segment (start 179.197 106.553) (end 177.8 106.553) (width 0.254) (layer GND_layer) (net 54)) - (segment (start 181.102 108.458) (end 179.197 106.553) (width 0.254) (layer GND_layer) (net 54)) - (segment (start 181.61 108.458) (end 181.102 108.458) (width 0.254) (layer GND_layer) (net 54)) - (segment (start 158.623 88.138) (end 157.099 89.662) (width 0.254) (layer Cuivre) (net 54)) - (segment (start 165.1 88.138) (end 158.623 88.138) (width 0.254) (layer Cuivre) (net 54)) - (segment (start 165.735 88.773) (end 165.1 88.138) (width 0.254) (layer Cuivre) (net 54)) - (segment (start 172.466 88.773) (end 165.735 88.773) (width 0.254) (layer Cuivre) (net 54)) + (segment (start 134.112 97.028) (end 134.747 96.393) (width 0.254) (layer Cuivre) (net 53)) + (segment (start 188.37402 108.02112) (end 188.88964 107.5055) (width 0.254) (layer Composant) (net 53)) + (segment (start 188.88964 107.5055) (end 190.9445 107.5055) (width 0.254) (layer Composant) (net 53) (status 400)) + (segment (start 178.816 107.061) (end 177.038 107.061) (width 0.254) (layer GND_layer) (net 53)) + (segment (start 181.61 109.347) (end 187.04814 109.347) (width 0.254) (layer Cuivre) (net 53)) + (segment (start 187.04814 109.347) (end 188.37402 108.02112) (width 0.254) (layer Cuivre) (net 53)) + (segment (start 181.61 109.347) (end 181.102 109.347) (width 0.254) (layer GND_layer) (net 53)) + (segment (start 159.258 92.71) (end 157.099 90.551) (width 0.254) (layer GND_layer) (net 53)) + (via (at 188.37402 108.02112) (size 0.889) (layers Composant Cuivre) (net 53)) + (via (at 181.61 109.347) (size 0.635) (layers Composant Cuivre) (net 53)) + (via (at 157.099 90.551) (size 0.635) (layers Composant Cuivre) (net 53)) + (via (at 177.038 89.408) (size 0.635) (layers Composant Cuivre) (net 53)) + (via (at 134.112 97.028) (size 0.889) (layers Composant Cuivre) (net 53)) + (segment (start 134.112 97.028) (end 134.112 95.631) (width 0.254) (layer Composant) (net 53)) + (segment (start 134.747 95.504) (end 138.303 91.948) (width 0.254) (layer Cuivre) (net 53)) + (segment (start 159.258 109.347) (end 159.258 92.71) (width 0.254) (layer GND_layer) (net 53)) + (segment (start 167.132 117.221) (end 159.258 109.347) (width 0.254) (layer GND_layer) (net 53)) + (segment (start 167.132 131.318) (end 167.132 117.221) (width 0.254) (layer GND_layer) (net 53)) + (segment (start 161.544 136.906) (end 167.132 131.318) (width 0.254) (layer GND_layer) (net 53) (status 800)) + (segment (start 133.8834 95.4024) (end 134.112 95.631) (width 0.254) (layer Composant) (net 53)) + (segment (start 181.102 109.347) (end 178.816 107.061) (width 0.254) (layer GND_layer) (net 53)) + (segment (start 133.8834 93.726) (end 133.8834 95.4024) (width 0.254) (layer Composant) (net 53) (status 800)) + (segment (start 156.464 91.186) (end 157.099 90.551) (width 0.254) (layer Cuivre) (net 53)) + (segment (start 152.781 91.186) (end 156.464 91.186) (width 0.254) (layer Cuivre) (net 53)) + (segment (start 152.019 91.948) (end 152.781 91.186) (width 0.254) (layer Cuivre) (net 53)) + (segment (start 138.303 91.948) (end 152.019 91.948) (width 0.254) (layer Cuivre) (net 53)) + (segment (start 157.607 90.551) (end 157.099 90.551) (width 0.254) (layer Cuivre) (net 53)) + (segment (start 159.512 88.646) (end 157.607 90.551) (width 0.254) (layer Cuivre) (net 53)) + (segment (start 164.846 88.646) (end 159.512 88.646) (width 0.254) (layer Cuivre) (net 53)) + (segment (start 165.481 89.281) (end 164.846 88.646) (width 0.254) (layer Cuivre) (net 53)) + (segment (start 172.974 89.281) (end 165.481 89.281) (width 0.254) (layer Cuivre) (net 53)) + (segment (start 173.609 88.646) (end 172.974 89.281) (width 0.254) (layer Cuivre) (net 53)) + (segment (start 175.133 88.646) (end 173.609 88.646) (width 0.254) (layer Cuivre) (net 53)) + (segment (start 175.895 89.408) (end 175.133 88.646) (width 0.254) (layer Cuivre) (net 53)) + (segment (start 177.038 89.408) (end 175.895 89.408) (width 0.254) (layer Cuivre) (net 53)) + (segment (start 174.752 91.694) (end 177.038 89.408) (width 0.254) (layer GND_layer) (net 53)) + (segment (start 174.752 104.775) (end 174.752 91.694) (width 0.254) (layer GND_layer) (net 53)) + (segment (start 177.038 107.061) (end 174.752 104.775) (width 0.254) (layer GND_layer) (net 53)) (segment (start 173.101 88.138) (end 172.466 88.773) (width 0.254) (layer Cuivre) (net 54)) - (segment (start 193.12636 108.41736) (end 189.05728 104.34828) (width 0.254) (layer 3.3V_layer) (net 55)) - (segment (start 178.308 87.884) (end 177.419 87.884) (width 0.254) (layer GND_layer) (net 55)) - (segment (start 177.419 87.884) (end 174.117 91.186) (width 0.254) (layer GND_layer) (net 55)) - (segment (start 174.117 105.537) (end 174.625 106.045) (width 0.254) (layer GND_layer) (net 55)) - (via (at 174.625 106.045) (size 0.889) (layers Composant Cuivre) (net 55)) - (segment (start 174.625 106.045) (end 174.879 106.299) (width 0.254) (layer 3.3V_layer) (net 55)) - (segment (start 174.879 106.299) (end 176.657 106.299) (width 0.254) (layer 3.3V_layer) (net 55)) - (segment (start 176.657 106.299) (end 177.292 106.934) (width 0.254) (layer 3.3V_layer) (net 55)) - (segment (start 177.292 106.934) (end 179.324 106.934) (width 0.254) (layer 3.3V_layer) (net 55)) - (segment (start 179.324 106.934) (end 179.324 106.95178) (width 0.254) (layer 3.3V_layer) (net 55)) - (via (at 132.588 95.25) (size 0.889) (layers Composant Cuivre) (net 55)) - (via (at 157.226 87.884) (size 0.889) (layers Composant Cuivre) (net 55)) - (via (at 178.308 87.884) (size 0.635) (layers Composant Cuivre) (net 55)) - (segment (start 132.8674 95.0976) (end 132.588 95.25) (width 0.254) (layer Composant) (net 55)) - (segment (start 132.8674 93.726) (end 132.8674 95.0976) (width 0.254) (layer Composant) (net 55) (status 800)) - (segment (start 166.624 129.286) (end 159.004 136.906) (width 0.254) (layer GND_layer) (net 55) (status 400)) - (segment (start 166.624 119.38) (end 166.624 129.286) (width 0.254) (layer GND_layer) (net 55)) - (segment (start 165.227 117.983) (end 166.624 119.38) (width 0.254) (layer GND_layer) (net 55) (status 800)) - (segment (start 157.226 88.265) (end 157.226 87.884) (width 0.254) (layer Cuivre) (net 55)) - (segment (start 155.321 90.17) (end 157.226 88.265) (width 0.254) (layer Cuivre) (net 55)) - (segment (start 152.273 90.17) (end 155.321 90.17) (width 0.254) (layer Cuivre) (net 55)) - (segment (start 151.511 90.932) (end 152.273 90.17) (width 0.254) (layer Cuivre) (net 55)) - (segment (start 137.414 90.932) (end 151.511 90.932) (width 0.254) (layer Cuivre) (net 55)) - (segment (start 133.223 95.123) (end 137.414 90.932) (width 0.254) (layer Cuivre) (net 55)) - (segment (start 132.588 95.25) (end 133.223 95.123) (width 0.254) (layer Cuivre) (net 55)) - (segment (start 157.226 88.519) (end 157.226 87.884) (width 0.254) (layer GND_layer) (net 55)) - (segment (start 156.337 89.408) (end 157.226 88.519) (width 0.254) (layer GND_layer) (net 55)) - (segment (start 156.337 90.932) (end 156.337 89.408) (width 0.254) (layer GND_layer) (net 55)) - (segment (start 158.75 93.345) (end 156.337 90.932) (width 0.254) (layer GND_layer) (net 55)) - (segment (start 158.75 111.506) (end 158.75 93.345) (width 0.254) (layer GND_layer) (net 55)) - (segment (start 165.227 117.983) (end 158.75 111.506) (width 0.254) (layer GND_layer) (net 55) (status 800)) - (segment (start 178.1175 87.757) (end 178.308 87.884) (width 0.254) (layer Cuivre) (net 55)) - (segment (start 178.1175 87.4395) (end 178.1175 87.757) (width 0.254) (layer Cuivre) (net 55)) - (segment (start 176.53 85.852) (end 178.1175 87.4395) (width 0.254) (layer Cuivre) (net 55)) - (segment (start 175.133 85.852) (end 176.53 85.852) (width 0.254) (layer Cuivre) (net 55)) - (segment (start 173.355 87.63) (end 175.133 85.852) (width 0.254) (layer Cuivre) (net 55)) - (segment (start 172.339 87.63) (end 173.355 87.63) (width 0.254) (layer Cuivre) (net 55)) - (segment (start 171.704 88.265) (end 172.339 87.63) (width 0.254) (layer Cuivre) (net 55)) - (segment (start 166.37 88.265) (end 171.704 88.265) (width 0.254) (layer Cuivre) (net 55)) - (segment (start 165.227 87.122) (end 166.37 88.265) (width 0.254) (layer Cuivre) (net 55)) - (segment (start 158.369 87.122) (end 165.227 87.122) (width 0.254) (layer Cuivre) (net 55)) - (segment (start 193.12636 108.45546) (end 193.12636 108.41736) (width 0.254) (layer 3.3V_layer) (net 55)) - (via (at 193.12636 108.45546) (size 0.889) (layers Composant Cuivre) (net 55)) - (segment (start 190.9445 108.5088) (end 192.00368 108.5088) (width 0.254) (layer Composant) (net 55) (status 800)) - (segment (start 193.07556 108.50626) (end 193.12636 108.45546) (width 0.254) (layer Composant) (net 55)) - (segment (start 192.00368 108.50626) (end 193.07556 108.50626) (width 0.254) (layer Composant) (net 55)) - (segment (start 192.00368 108.5088) (end 192.00368 108.50626) (width 0.254) (layer Composant) (net 55)) - (segment (start 185.3311 106.95178) (end 179.324 106.95178) (width 0.254) (layer 3.3V_layer) (net 55)) - (segment (start 187.9346 104.34828) (end 185.3311 106.95178) (width 0.254) (layer 3.3V_layer) (net 55)) - (segment (start 174.117 91.186) (end 174.117 105.537) (width 0.254) (layer GND_layer) (net 55)) - (segment (start 157.226 87.884) (end 158.369 87.122) (width 0.254) (layer Cuivre) (net 55)) + (segment (start 172.466 88.773) (end 165.735 88.773) (width 0.254) (layer Cuivre) (net 54)) + (segment (start 165.735 88.773) (end 165.1 88.138) (width 0.254) (layer Cuivre) (net 54)) + (segment (start 165.1 88.138) (end 158.623 88.138) (width 0.254) (layer Cuivre) (net 54)) + (segment (start 158.623 88.138) (end 157.099 89.662) (width 0.254) (layer Cuivre) (net 54)) + (segment (start 181.61 108.458) (end 181.102 108.458) (width 0.254) (layer GND_layer) (net 54)) + (segment (start 181.102 108.458) (end 179.197 106.553) (width 0.254) (layer GND_layer) (net 54)) + (segment (start 179.197 106.553) (end 177.8 106.553) (width 0.254) (layer GND_layer) (net 54)) + (segment (start 177.8 106.553) (end 177.292 106.045) (width 0.254) (layer GND_layer) (net 54)) + (segment (start 177.292 106.045) (end 177.292 90.17) (width 0.254) (layer GND_layer) (net 54)) + (segment (start 177.292 90.17) (end 178.181 89.281) (width 0.254) (layer GND_layer) (net 54)) + (segment (start 178.181 89.281) (end 178.308 88.773) (width 0.254) (layer GND_layer) (net 54)) + (via (at 193.294 105.41) (size 0.889) (layers Composant Cuivre) (net 54)) + (via (at 157.099 89.662) (size 0.635) (layers Composant Cuivre) (net 54)) + (via (at 133.35 96.012) (size 0.889) (layers Composant Cuivre) (net 54)) + (via (at 181.61 108.458) (size 0.635) (layers Composant Cuivre) (net 54)) + (segment (start 156.591 89.662) (end 155.575 90.678) (width 0.254) (layer Cuivre) (net 54)) + (via (at 178.308 88.773) (size 0.635) (layers Composant Cuivre) (net 54)) + (segment (start 193.294 105.41) (end 192.00368 106.6546) (width 0.254) (layer Composant) (net 54)) + (segment (start 192.00368 106.6546) (end 192.00368 108.0135) (width 0.254) (layer Composant) (net 54)) + (segment (start 181.61 108.458) (end 183.81472 106.25328) (width 0.254) (layer Cuivre) (net 54)) + (segment (start 183.81472 106.25328) (end 192.405 106.25328) (width 0.254) (layer Cuivre) (net 54)) + (segment (start 192.405 106.25328) (end 193.294 105.41) (width 0.254) (layer Cuivre) (net 54)) + (segment (start 190.9445 108.0135) (end 192.00368 108.0135) (width 0.254) (layer Composant) (net 54) (status 800)) + (segment (start 164.084 136.906) (end 164.084 135.382) (width 0.254) (layer GND_layer) (net 54) (status 800)) + (segment (start 164.084 135.382) (end 167.64 131.826) (width 0.254) (layer GND_layer) (net 54)) + (segment (start 167.64 131.826) (end 167.64 116.967) (width 0.254) (layer GND_layer) (net 54)) + (segment (start 167.64 116.967) (end 159.766 109.093) (width 0.254) (layer GND_layer) (net 54)) + (segment (start 159.766 109.093) (end 159.766 91.821) (width 0.254) (layer GND_layer) (net 54)) + (segment (start 159.766 91.821) (end 157.607 89.662) (width 0.254) (layer GND_layer) (net 54)) + (segment (start 157.607 89.662) (end 157.099 89.662) (width 0.254) (layer GND_layer) (net 54)) + (segment (start 133.3754 93.726) (end 133.4008 95.5294) (width 0.254) (layer Composant) (net 54) (status 800)) + (segment (start 133.4008 95.5294) (end 133.35 96.012) (width 0.254) (layer Composant) (net 54)) + (segment (start 157.099 89.662) (end 156.591 89.662) (width 0.254) (layer Cuivre) (net 54)) + (segment (start 175.387 88.138) (end 173.101 88.138) (width 0.254) (layer Cuivre) (net 54)) + (segment (start 176.022 88.773) (end 175.387 88.138) (width 0.254) (layer Cuivre) (net 54)) + (segment (start 178.308 88.773) (end 176.022 88.773) (width 0.254) (layer Cuivre) (net 54)) + (segment (start 133.731 95.504) (end 133.35 96.012) (width 0.254) (layer Cuivre) (net 54)) + (segment (start 137.795 91.44) (end 133.731 95.504) (width 0.254) (layer Cuivre) (net 54)) + (segment (start 151.765 91.44) (end 137.795 91.44) (width 0.254) (layer Cuivre) (net 54)) + (segment (start 152.527 90.678) (end 151.765 91.44) (width 0.254) (layer Cuivre) (net 54)) + (segment (start 155.575 90.678) (end 152.527 90.678) (width 0.254) (layer Cuivre) (net 54)) (segment (start 189.05728 104.34828) (end 187.9346 104.34828) (width 0.254) (layer 3.3V_layer) (net 55)) - (via (at 132.08 91.313) (size 0.635) (layers Composant Cuivre) (net 56)) - (via (at 102.87 100.711) (size 0.889) (layers Composant Cuivre) (net 56)) - (segment (start 102.2985 100.711) (end 100.584 102.4255) (width 0.381) (layer Composant) (net 56) (status 400)) - (segment (start 102.87 100.711) (end 102.2985 100.711) (width 0.381) (layer Composant) (net 56)) - (segment (start 131.699 91.694) (end 132.08 91.313) (width 0.254) (layer Composant) (net 56)) - (segment (start 131.699 92.202) (end 131.699 91.694) (width 0.254) (layer Composant) (net 56)) - (segment (start 131.3688 92.5068) (end 131.699 92.202) (width 0.254) (layer Composant) (net 56)) - (segment (start 131.3688 93.726) (end 131.3688 92.5068) (width 0.254) (layer Composant) (net 56) (status 800)) - (segment (start 102.87 100.584) (end 102.87 100.711) (width 0.254) (layer GND_layer) (net 56)) - (segment (start 103.505 99.949) (end 102.87 100.584) (width 0.254) (layer GND_layer) (net 56)) - (segment (start 104.648 99.949) (end 103.505 99.949) (width 0.254) (layer GND_layer) (net 56)) - (segment (start 106.299 101.6) (end 104.648 99.949) (width 0.254) (layer GND_layer) (net 56)) - (segment (start 106.299 136.906) (end 106.299 101.6) (width 0.254) (layer GND_layer) (net 56)) - (segment (start 110.109 140.716) (end 106.299 136.906) (width 0.254) (layer GND_layer) (net 56)) - (segment (start 119.126 140.716) (end 110.109 140.716) (width 0.254) (layer GND_layer) (net 56)) - (segment (start 119.634 140.208) (end 119.126 140.716) (width 0.254) (layer GND_layer) (net 56)) - (segment (start 119.634 138.176) (end 119.634 140.208) (width 0.254) (layer GND_layer) (net 56)) - (segment (start 118.364 136.906) (end 119.634 138.176) (width 0.254) (layer GND_layer) (net 56) (status 800)) - (segment (start 103.378 100.33) (end 102.87 100.711) (width 0.254) (layer Cuivre) (net 56)) - (segment (start 107.95 95.758) (end 103.378 100.33) (width 0.254) (layer Cuivre) (net 56)) - (segment (start 110.236 90.17) (end 107.95 92.456) (width 0.254) (layer Cuivre) (net 56)) - (segment (start 121.285 90.17) (end 110.236 90.17) (width 0.254) (layer Cuivre) (net 56)) - (segment (start 122.301 89.154) (end 121.285 90.17) (width 0.254) (layer Cuivre) (net 56)) - (segment (start 126.873 89.154) (end 122.301 89.154) (width 0.254) (layer Cuivre) (net 56)) - (segment (start 131.064 88.519) (end 127.508 88.519) (width 0.254) (layer Cuivre) (net 56)) - (segment (start 132.08 89.535) (end 131.064 88.519) (width 0.254) (layer Cuivre) (net 56)) - (segment (start 132.08 91.313) (end 132.08 89.535) (width 0.254) (layer Cuivre) (net 56)) - (segment (start 107.95 92.456) (end 107.95 95.758) (width 0.254) (layer Cuivre) (net 56)) + (segment (start 157.226 87.884) (end 158.369 87.122) (width 0.254) (layer Cuivre) (net 55)) + (segment (start 174.117 91.186) (end 174.117 105.537) (width 0.254) (layer GND_layer) (net 55)) + (segment (start 187.9346 104.34828) (end 185.3311 106.95178) (width 0.254) (layer 3.3V_layer) (net 55)) + (segment (start 185.3311 106.95178) (end 179.324 106.95178) (width 0.254) (layer 3.3V_layer) (net 55)) + (segment (start 192.00368 108.5088) (end 192.00368 108.50626) (width 0.254) (layer Composant) (net 55)) + (segment (start 192.00368 108.50626) (end 193.07556 108.50626) (width 0.254) (layer Composant) (net 55)) + (segment (start 193.07556 108.50626) (end 193.12636 108.45546) (width 0.254) (layer Composant) (net 55)) + (segment (start 190.9445 108.5088) (end 192.00368 108.5088) (width 0.254) (layer Composant) (net 55) (status 800)) + (via (at 193.12636 108.45546) (size 0.889) (layers Composant Cuivre) (net 55)) + (segment (start 193.12636 108.45546) (end 193.12636 108.41736) (width 0.254) (layer 3.3V_layer) (net 55)) + (segment (start 158.369 87.122) (end 165.227 87.122) (width 0.254) (layer Cuivre) (net 55)) + (segment (start 165.227 87.122) (end 166.37 88.265) (width 0.254) (layer Cuivre) (net 55)) + (segment (start 166.37 88.265) (end 171.704 88.265) (width 0.254) (layer Cuivre) (net 55)) + (segment (start 171.704 88.265) (end 172.339 87.63) (width 0.254) (layer Cuivre) (net 55)) + (segment (start 172.339 87.63) (end 173.355 87.63) (width 0.254) (layer Cuivre) (net 55)) + (segment (start 173.355 87.63) (end 175.133 85.852) (width 0.254) (layer Cuivre) (net 55)) + (segment (start 175.133 85.852) (end 176.53 85.852) (width 0.254) (layer Cuivre) (net 55)) + (segment (start 176.53 85.852) (end 178.1175 87.4395) (width 0.254) (layer Cuivre) (net 55)) + (segment (start 178.1175 87.4395) (end 178.1175 87.757) (width 0.254) (layer Cuivre) (net 55)) + (segment (start 178.1175 87.757) (end 178.308 87.884) (width 0.254) (layer Cuivre) (net 55)) + (segment (start 165.227 117.983) (end 158.75 111.506) (width 0.254) (layer GND_layer) (net 55) (status 800)) + (segment (start 158.75 111.506) (end 158.75 93.345) (width 0.254) (layer GND_layer) (net 55)) + (segment (start 158.75 93.345) (end 156.337 90.932) (width 0.254) (layer GND_layer) (net 55)) + (segment (start 156.337 90.932) (end 156.337 89.408) (width 0.254) (layer GND_layer) (net 55)) + (segment (start 156.337 89.408) (end 157.226 88.519) (width 0.254) (layer GND_layer) (net 55)) + (segment (start 157.226 88.519) (end 157.226 87.884) (width 0.254) (layer GND_layer) (net 55)) + (segment (start 132.588 95.25) (end 133.223 95.123) (width 0.254) (layer Cuivre) (net 55)) + (segment (start 133.223 95.123) (end 137.414 90.932) (width 0.254) (layer Cuivre) (net 55)) + (segment (start 137.414 90.932) (end 151.511 90.932) (width 0.254) (layer Cuivre) (net 55)) + (segment (start 151.511 90.932) (end 152.273 90.17) (width 0.254) (layer Cuivre) (net 55)) + (segment (start 152.273 90.17) (end 155.321 90.17) (width 0.254) (layer Cuivre) (net 55)) + (segment (start 155.321 90.17) (end 157.226 88.265) (width 0.254) (layer Cuivre) (net 55)) + (segment (start 157.226 88.265) (end 157.226 87.884) (width 0.254) (layer Cuivre) (net 55)) + (segment (start 165.227 117.983) (end 166.624 119.38) (width 0.254) (layer GND_layer) (net 55) (status 800)) + (segment (start 166.624 119.38) (end 166.624 129.286) (width 0.254) (layer GND_layer) (net 55)) + (segment (start 166.624 129.286) (end 159.004 136.906) (width 0.254) (layer GND_layer) (net 55) (status 400)) + (segment (start 132.8674 93.726) (end 132.8674 95.0976) (width 0.254) (layer Composant) (net 55) (status 800)) + (segment (start 132.8674 95.0976) (end 132.588 95.25) (width 0.254) (layer Composant) (net 55)) + (via (at 178.308 87.884) (size 0.635) (layers Composant Cuivre) (net 55)) + (via (at 157.226 87.884) (size 0.889) (layers Composant Cuivre) (net 55)) + (via (at 132.588 95.25) (size 0.889) (layers Composant Cuivre) (net 55)) + (segment (start 179.324 106.934) (end 179.324 106.95178) (width 0.254) (layer 3.3V_layer) (net 55)) + (segment (start 177.292 106.934) (end 179.324 106.934) (width 0.254) (layer 3.3V_layer) (net 55)) + (segment (start 176.657 106.299) (end 177.292 106.934) (width 0.254) (layer 3.3V_layer) (net 55)) + (segment (start 174.879 106.299) (end 176.657 106.299) (width 0.254) (layer 3.3V_layer) (net 55)) + (segment (start 174.625 106.045) (end 174.879 106.299) (width 0.254) (layer 3.3V_layer) (net 55)) + (via (at 174.625 106.045) (size 0.889) (layers Composant Cuivre) (net 55)) + (segment (start 174.117 105.537) (end 174.625 106.045) (width 0.254) (layer GND_layer) (net 55)) + (segment (start 177.419 87.884) (end 174.117 91.186) (width 0.254) (layer GND_layer) (net 55)) + (segment (start 178.308 87.884) (end 177.419 87.884) (width 0.254) (layer GND_layer) (net 55)) + (segment (start 193.12636 108.41736) (end 189.05728 104.34828) (width 0.254) (layer 3.3V_layer) (net 55)) (segment (start 127.508 88.519) (end 126.873 89.154) (width 0.254) (layer Cuivre) (net 56)) - (segment (start 76.2 104.14) (end 74.93 105.41) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 104.521 104.14) (end 76.2 104.14) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 110.49 98.171) (end 104.521 104.14) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 110.49 95.758) (end 110.49 98.171) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 111.633 94.615) (end 110.49 95.758) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 116.586 94.615) (end 111.633 94.615) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 117.094 95.123) (end 116.586 94.615) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 126.873 95.123) (end 117.094 95.123) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 128.524 96.774) (end 126.873 95.123) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 130.683 96.774) (end 128.524 96.774) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 132.334 98.425) (end 130.683 96.774) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 132.334 98.425) (end 137.033 98.425) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 147.066 94.996) (end 138.553 94.996) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 138.553 94.996) (end 137.668 95.881) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 137.668 95.881) (end 137.668 97.79) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 137.033 98.425) (end 137.668 97.79) (width 0.254) (layer Cuivre) (net 57)) - (via (at 147.574 95.25) (size 0.635) (layers Composant Cuivre) (net 57)) - (via (at 181.991 90.17) (size 0.889) (layers Composant Cuivre) (net 57)) - (segment (start 159.385 94.6785) (end 158.623 93.9165) (width 0.4318) (layer Composant) (net 57) (status 400)) - (segment (start 160.8455 94.6785) (end 159.385 94.6785) (width 0.4318) (layer Composant) (net 57) (status 800)) - (segment (start 157.7975 93.9165) (end 158.623 93.9165) (width 0.381) (layer Composant) (net 57) (status 400)) - (segment (start 154.94 91.059) (end 157.7975 93.9165) (width 0.381) (layer Composant) (net 57)) - (segment (start 149.225 91.059) (end 154.94 91.059) (width 0.381) (layer Composant) (net 57)) - (segment (start 147.574 92.71) (end 149.225 91.059) (width 0.381) (layer Composant) (net 57)) - (segment (start 74.93 112.522) (end 76.327 113.919) (width 0.254) (layer Cuivre) (net 57) (status 400)) - (segment (start 181.991 90.17) (end 181.991 102.235) (width 0.254) (layer GND_layer) (net 57)) - (segment (start 181.991 102.235) (end 185.928 106.172) (width 0.254) (layer GND_layer) (net 57)) - (segment (start 185.928 106.172) (end 185.928 122.301) (width 0.254) (layer GND_layer) (net 57)) - (segment (start 178.054 130.175) (end 185.928 122.301) (width 0.254) (layer GND_layer) (net 57)) - (segment (start 178.054 130.175) (end 178.054 138.176) (width 0.254) (layer GND_layer) (net 57)) - (segment (start 178.054 138.176) (end 179.324 139.446) (width 0.254) (layer GND_layer) (net 57) (status 400)) - (segment (start 147.574 95.25) (end 147.574 92.71) (width 0.254) (layer Composant) (net 57)) - (segment (start 147.574 95.25) (end 147.574 94.615) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 147.574 94.615) (end 148.717 93.472) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 148.717 93.472) (end 156.21 93.472) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 156.21 93.472) (end 159.766 89.916) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 159.766 89.916) (end 164.719 89.916) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 164.719 89.916) (end 165.354 90.551) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 165.354 90.551) (end 174.244 90.551) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 174.244 90.551) (end 174.625 90.17) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 174.625 90.17) (end 181.991 90.17) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 147.574 95.25) (end 147.193 95.504) (width 0.254) (layer Composant) (net 57)) - (segment (start 147.193 95.504) (end 145.2372 97.4598) (width 0.254) (layer Composant) (net 57)) - (segment (start 145.2372 97.4598) (end 143.129 97.4598) (width 0.254) (layer Composant) (net 57) (status 400)) - (segment (start 147.574 95.25) (end 147.066 94.996) (width 0.254) (layer Cuivre) (net 57)) + (segment (start 107.95 92.456) (end 107.95 95.758) (width 0.254) (layer Cuivre) (net 56)) + (segment (start 132.08 91.313) (end 132.08 89.535) (width 0.254) (layer Cuivre) (net 56)) + (segment (start 132.08 89.535) (end 131.064 88.519) (width 0.254) (layer Cuivre) (net 56)) + (segment (start 131.064 88.519) (end 127.508 88.519) (width 0.254) (layer Cuivre) (net 56)) + (segment (start 126.873 89.154) (end 122.301 89.154) (width 0.254) (layer Cuivre) (net 56)) + (segment (start 122.301 89.154) (end 121.285 90.17) (width 0.254) (layer Cuivre) (net 56)) + (segment (start 121.285 90.17) (end 110.236 90.17) (width 0.254) (layer Cuivre) (net 56)) + (segment (start 110.236 90.17) (end 107.95 92.456) (width 0.254) (layer Cuivre) (net 56)) + (segment (start 107.95 95.758) (end 103.378 100.33) (width 0.254) (layer Cuivre) (net 56)) + (segment (start 103.378 100.33) (end 102.87 100.711) (width 0.254) (layer Cuivre) (net 56)) + (segment (start 118.364 136.906) (end 119.634 138.176) (width 0.254) (layer GND_layer) (net 56) (status 800)) + (segment (start 119.634 138.176) (end 119.634 140.208) (width 0.254) (layer GND_layer) (net 56)) + (segment (start 119.634 140.208) (end 119.126 140.716) (width 0.254) (layer GND_layer) (net 56)) + (segment (start 119.126 140.716) (end 110.109 140.716) (width 0.254) (layer GND_layer) (net 56)) + (segment (start 110.109 140.716) (end 106.299 136.906) (width 0.254) (layer GND_layer) (net 56)) + (segment (start 106.299 136.906) (end 106.299 101.6) (width 0.254) (layer GND_layer) (net 56)) + (segment (start 106.299 101.6) (end 104.648 99.949) (width 0.254) (layer GND_layer) (net 56)) + (segment (start 104.648 99.949) (end 103.505 99.949) (width 0.254) (layer GND_layer) (net 56)) + (segment (start 103.505 99.949) (end 102.87 100.584) (width 0.254) (layer GND_layer) (net 56)) + (segment (start 102.87 100.584) (end 102.87 100.711) (width 0.254) (layer GND_layer) (net 56)) + (segment (start 131.3688 93.726) (end 131.3688 92.5068) (width 0.254) (layer Composant) (net 56) (status 800)) + (segment (start 131.3688 92.5068) (end 131.699 92.202) (width 0.254) (layer Composant) (net 56)) + (segment (start 131.699 92.202) (end 131.699 91.694) (width 0.254) (layer Composant) (net 56)) + (segment (start 131.699 91.694) (end 132.08 91.313) (width 0.254) (layer Composant) (net 56)) + (segment (start 102.87 100.711) (end 102.2985 100.711) (width 0.381) (layer Composant) (net 56)) + (segment (start 102.2985 100.711) (end 100.584 102.4255) (width 0.381) (layer Composant) (net 56) (status 400)) + (via (at 102.87 100.711) (size 0.889) (layers Composant Cuivre) (net 56)) + (via (at 132.08 91.313) (size 0.635) (layers Composant Cuivre) (net 56)) (segment (start 74.93 105.41) (end 74.93 112.522) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 175.26 80.137) (end 176.403 81.28) (width 0.381) (layer Composant) (net 58)) - (segment (start 178.435 81.28) (end 180.213 83.058) (width 0.381) (layer Composant) (net 58)) - (segment (start 180.213 83.058) (end 185.42 83.058) (width 0.381) (layer Composant) (net 58)) - (segment (start 185.42 83.058) (end 185.674 82.804) (width 0.381) (layer Composant) (net 58)) - (segment (start 185.674 82.804) (end 185.674 81.661) (width 0.381) (layer Composant) (net 58)) - (segment (start 185.674 81.661) (end 185.039 81.026) (width 0.381) (layer Composant) (net 58)) - (segment (start 190.5 66.04) (end 190.5 65.786) (width 0.4318) (layer Composant) (net 58) (status 800)) - (segment (start 190.5 65.786) (end 187.579 62.865) (width 0.4318) (layer Composant) (net 58)) - (segment (start 185.039 81.026) (end 184.15 81.026) (width 0.4318) (layer Composant) (net 58) (status 400)) - (segment (start 175.26 71.501) (end 175.26 80.137) (width 0.381) (layer Composant) (net 58)) - (segment (start 172.72 68.961) (end 175.26 71.501) (width 0.381) (layer Composant) (net 58)) - (segment (start 172.72 64.643) (end 172.72 68.961) (width 0.381) (layer Composant) (net 58)) - (segment (start 174.498 62.865) (end 172.72 64.643) (width 0.381) (layer Composant) (net 58)) - (segment (start 187.579 62.865) (end 174.498 62.865) (width 0.381) (layer Composant) (net 58)) + (segment (start 147.574 95.25) (end 147.066 94.996) (width 0.254) (layer Cuivre) (net 57)) + (segment (start 145.2372 97.4598) (end 143.129 97.4598) (width 0.254) (layer Composant) (net 57) (status 400)) + (segment (start 147.193 95.504) (end 145.2372 97.4598) (width 0.254) (layer Composant) (net 57)) + (segment (start 147.574 95.25) (end 147.193 95.504) (width 0.254) (layer Composant) (net 57)) + (segment (start 174.625 90.17) (end 181.991 90.17) (width 0.254) (layer Cuivre) (net 57)) + (segment (start 174.244 90.551) (end 174.625 90.17) (width 0.254) (layer Cuivre) (net 57)) + (segment (start 165.354 90.551) (end 174.244 90.551) (width 0.254) (layer Cuivre) (net 57)) + (segment (start 164.719 89.916) (end 165.354 90.551) (width 0.254) (layer Cuivre) (net 57)) + (segment (start 159.766 89.916) (end 164.719 89.916) (width 0.254) (layer Cuivre) (net 57)) + (segment (start 156.21 93.472) (end 159.766 89.916) (width 0.254) (layer Cuivre) (net 57)) + (segment (start 148.717 93.472) (end 156.21 93.472) (width 0.254) (layer Cuivre) (net 57)) + (segment (start 147.574 94.615) (end 148.717 93.472) (width 0.254) (layer Cuivre) (net 57)) + (segment (start 147.574 95.25) (end 147.574 94.615) (width 0.254) (layer Cuivre) (net 57)) + (segment (start 147.574 95.25) (end 147.574 92.71) (width 0.254) (layer Composant) (net 57)) + (segment (start 178.054 138.176) (end 179.324 139.446) (width 0.254) (layer GND_layer) (net 57) (status 400)) + (segment (start 178.054 130.175) (end 178.054 138.176) (width 0.254) (layer GND_layer) (net 57)) + (segment (start 178.054 130.175) (end 185.928 122.301) (width 0.254) (layer GND_layer) (net 57)) + (segment (start 185.928 106.172) (end 185.928 122.301) (width 0.254) (layer GND_layer) (net 57)) + (segment (start 181.991 102.235) (end 185.928 106.172) (width 0.254) (layer GND_layer) (net 57)) + (segment (start 181.991 90.17) (end 181.991 102.235) (width 0.254) (layer GND_layer) (net 57)) + (segment (start 74.93 112.522) (end 76.327 113.919) (width 0.254) (layer Cuivre) (net 57) (status 400)) + (segment (start 147.574 92.71) (end 149.225 91.059) (width 0.381) (layer Composant) (net 57)) + (segment (start 149.225 91.059) (end 154.94 91.059) (width 0.381) (layer Composant) (net 57)) + (segment (start 154.94 91.059) (end 157.7975 93.9165) (width 0.381) (layer Composant) (net 57)) + (segment (start 157.7975 93.9165) (end 158.623 93.9165) (width 0.381) (layer Composant) (net 57) (status 400)) + (segment (start 160.8455 94.6785) (end 159.385 94.6785) (width 0.4318) (layer Composant) (net 57) (status 800)) + (segment (start 159.385 94.6785) (end 158.623 93.9165) (width 0.4318) (layer Composant) (net 57) (status 400)) + (via (at 181.991 90.17) (size 0.889) (layers Composant Cuivre) (net 57)) + (via (at 147.574 95.25) (size 0.635) (layers Composant Cuivre) (net 57)) + (segment (start 137.033 98.425) (end 137.668 97.79) (width 0.254) (layer Cuivre) (net 57)) + (segment (start 137.668 95.881) (end 137.668 97.79) (width 0.254) (layer Cuivre) (net 57)) + (segment (start 138.553 94.996) (end 137.668 95.881) (width 0.254) (layer Cuivre) (net 57)) + (segment (start 147.066 94.996) (end 138.553 94.996) (width 0.254) (layer Cuivre) (net 57)) + (segment (start 132.334 98.425) (end 137.033 98.425) (width 0.254) (layer Cuivre) (net 57)) + (segment (start 132.334 98.425) (end 130.683 96.774) (width 0.254) (layer Cuivre) (net 57)) + (segment (start 130.683 96.774) (end 128.524 96.774) (width 0.254) (layer Cuivre) (net 57)) + (segment (start 128.524 96.774) (end 126.873 95.123) (width 0.254) (layer Cuivre) (net 57)) + (segment (start 126.873 95.123) (end 117.094 95.123) (width 0.254) (layer Cuivre) (net 57)) + (segment (start 117.094 95.123) (end 116.586 94.615) (width 0.254) (layer Cuivre) (net 57)) + (segment (start 116.586 94.615) (end 111.633 94.615) (width 0.254) (layer Cuivre) (net 57)) + (segment (start 111.633 94.615) (end 110.49 95.758) (width 0.254) (layer Cuivre) (net 57)) + (segment (start 110.49 95.758) (end 110.49 98.171) (width 0.254) (layer Cuivre) (net 57)) + (segment (start 110.49 98.171) (end 104.521 104.14) (width 0.254) (layer Cuivre) (net 57)) + (segment (start 104.521 104.14) (end 76.2 104.14) (width 0.254) (layer Cuivre) (net 57)) + (segment (start 76.2 104.14) (end 74.93 105.41) (width 0.254) (layer Cuivre) (net 57)) (segment (start 176.403 81.28) (end 178.435 81.28) (width 0.381) (layer Composant) (net 58)) - (segment (start 178.943 94.234) (end 178.943 104.521) (width 0.254) (layer GND_layer) (net 59)) - (segment (start 178.943 104.521) (end 181.102 106.68) (width 0.254) (layer GND_layer) (net 59)) - (segment (start 181.102 106.68) (end 182.245 106.68) (width 0.254) (layer GND_layer) (net 59)) - (segment (start 182.245 106.68) (end 183.007 107.442) (width 0.254) (layer GND_layer) (net 59)) - (segment (start 183.007 107.442) (end 183.007 121.793) (width 0.254) (layer GND_layer) (net 59)) - (segment (start 172.974 131.826) (end 183.007 121.793) (width 0.254) (layer GND_layer) (net 59)) - (segment (start 172.974 131.826) (end 172.974 139.954) (width 0.254) (layer GND_layer) (net 59)) - (segment (start 172.974 139.954) (end 173.736 140.716) (width 0.254) (layer GND_layer) (net 59)) - (segment (start 173.736 140.716) (end 180.594 140.716) (width 0.254) (layer GND_layer) (net 59)) - (segment (start 180.594 140.716) (end 181.864 139.446) (width 0.254) (layer GND_layer) (net 59) (status 400)) - (segment (start 158.623 91.2495) (end 160.782 93.472) (width 0.381) (layer Composant) (net 59) (status 800)) - (segment (start 160.782 93.472) (end 163.322 93.472) (width 0.381) (layer Composant) (net 59)) - (segment (start 146.812 94.869) (end 146.812 92.456) (width 0.254) (layer Composant) (net 59)) - (segment (start 146.812 92.456) (end 149.352 89.916) (width 0.381) (layer Composant) (net 59)) - (segment (start 179.197 93.726) (end 178.943 94.234) (width 0.254) (layer GND_layer) (net 59)) - (segment (start 149.352 89.916) (end 154.813 89.916) (width 0.381) (layer Composant) (net 59)) - (segment (start 154.813 89.916) (end 156.337 91.44) (width 0.381) (layer Composant) (net 59)) - (segment (start 156.337 91.44) (end 158.369 91.44) (width 0.381) (layer Composant) (net 59)) - (segment (start 158.369 91.44) (end 158.623 91.2495) (width 0.381) (layer Composant) (net 59) (status 400)) - (segment (start 179.197 93.726) (end 179.197 94.234) (width 0.254) (layer Cuivre) (net 59)) - (segment (start 179.197 94.234) (end 178.816 94.615) (width 0.254) (layer Cuivre) (net 59)) - (segment (start 178.816 94.615) (end 164.465 94.615) (width 0.254) (layer Cuivre) (net 59)) - (segment (start 164.465 94.615) (end 163.322 93.472) (width 0.254) (layer Cuivre) (net 59)) - (segment (start 143.129 96.9772) (end 144.9578 96.9772) (width 0.254) (layer Composant) (net 59) (status 800)) - (segment (start 144.9578 96.9772) (end 146.685 95.25) (width 0.254) (layer Composant) (net 59)) - (segment (start 146.685 95.25) (end 146.812 94.869) (width 0.254) (layer Composant) (net 59)) - (via (at 179.197 93.726) (size 0.635) (layers Composant Cuivre) (net 59)) + (segment (start 187.579 62.865) (end 174.498 62.865) (width 0.381) (layer Composant) (net 58)) + (segment (start 174.498 62.865) (end 172.72 64.643) (width 0.381) (layer Composant) (net 58)) + (segment (start 172.72 64.643) (end 172.72 68.961) (width 0.381) (layer Composant) (net 58)) + (segment (start 172.72 68.961) (end 175.26 71.501) (width 0.381) (layer Composant) (net 58)) + (segment (start 175.26 71.501) (end 175.26 80.137) (width 0.381) (layer Composant) (net 58)) + (segment (start 185.039 81.026) (end 184.15 81.026) (width 0.4318) (layer Composant) (net 58) (status 400)) + (segment (start 190.5 65.786) (end 187.579 62.865) (width 0.4318) (layer Composant) (net 58)) + (segment (start 190.5 66.04) (end 190.5 65.786) (width 0.4318) (layer Composant) (net 58) (status 800)) + (segment (start 185.674 81.661) (end 185.039 81.026) (width 0.381) (layer Composant) (net 58)) + (segment (start 185.674 82.804) (end 185.674 81.661) (width 0.381) (layer Composant) (net 58)) + (segment (start 185.42 83.058) (end 185.674 82.804) (width 0.381) (layer Composant) (net 58)) + (segment (start 180.213 83.058) (end 185.42 83.058) (width 0.381) (layer Composant) (net 58)) + (segment (start 178.435 81.28) (end 180.213 83.058) (width 0.381) (layer Composant) (net 58)) + (segment (start 175.26 80.137) (end 176.403 81.28) (width 0.381) (layer Composant) (net 58)) (via (at 163.322 93.472) (size 0.889) (layers Composant Cuivre) (net 59)) - (segment (start 154.305 62.865) (end 156.972 65.532) (width 0.381) (layer Composant) (net 60)) - (segment (start 149.86 62.865) (end 154.305 62.865) (width 0.381) (layer Composant) (net 60)) - (segment (start 147.955 64.77) (end 149.86 62.865) (width 0.381) (layer Composant) (net 60)) - (segment (start 156.21 81.026) (end 156.718 81.026) (width 0.381) (layer Composant) (net 60) (status 800)) - (segment (start 156.718 81.026) (end 157.734 82.042) (width 0.381) (layer Composant) (net 60)) - (segment (start 157.734 82.042) (end 157.734 82.804) (width 0.381) (layer Composant) (net 60)) - (segment (start 156.972 65.532) (end 156.972 66.04) (width 0.381) (layer Composant) (net 60) (status 400)) - (segment (start 151.257 83.058) (end 157.48 83.058) (width 0.381) (layer Composant) (net 60)) - (segment (start 147.955 79.756) (end 151.257 83.058) (width 0.381) (layer Composant) (net 60)) - (segment (start 147.955 79.756) (end 147.955 64.77) (width 0.381) (layer Composant) (net 60)) + (via (at 179.197 93.726) (size 0.635) (layers Composant Cuivre) (net 59)) + (segment (start 146.685 95.25) (end 146.812 94.869) (width 0.254) (layer Composant) (net 59)) + (segment (start 144.9578 96.9772) (end 146.685 95.25) (width 0.254) (layer Composant) (net 59)) + (segment (start 143.129 96.9772) (end 144.9578 96.9772) (width 0.254) (layer Composant) (net 59) (status 800)) + (segment (start 164.465 94.615) (end 163.322 93.472) (width 0.254) (layer Cuivre) (net 59)) + (segment (start 178.816 94.615) (end 164.465 94.615) (width 0.254) (layer Cuivre) (net 59)) + (segment (start 179.197 94.234) (end 178.816 94.615) (width 0.254) (layer Cuivre) (net 59)) + (segment (start 179.197 93.726) (end 179.197 94.234) (width 0.254) (layer Cuivre) (net 59)) + (segment (start 158.369 91.44) (end 158.623 91.2495) (width 0.381) (layer Composant) (net 59) (status 400)) + (segment (start 156.337 91.44) (end 158.369 91.44) (width 0.381) (layer Composant) (net 59)) + (segment (start 154.813 89.916) (end 156.337 91.44) (width 0.381) (layer Composant) (net 59)) + (segment (start 149.352 89.916) (end 154.813 89.916) (width 0.381) (layer Composant) (net 59)) + (segment (start 179.197 93.726) (end 178.943 94.234) (width 0.254) (layer GND_layer) (net 59)) + (segment (start 146.812 92.456) (end 149.352 89.916) (width 0.381) (layer Composant) (net 59)) + (segment (start 146.812 94.869) (end 146.812 92.456) (width 0.254) (layer Composant) (net 59)) + (segment (start 160.782 93.472) (end 163.322 93.472) (width 0.381) (layer Composant) (net 59)) + (segment (start 158.623 91.2495) (end 160.782 93.472) (width 0.381) (layer Composant) (net 59) (status 800)) + (segment (start 180.594 140.716) (end 181.864 139.446) (width 0.254) (layer GND_layer) (net 59) (status 400)) + (segment (start 173.736 140.716) (end 180.594 140.716) (width 0.254) (layer GND_layer) (net 59)) + (segment (start 172.974 139.954) (end 173.736 140.716) (width 0.254) (layer GND_layer) (net 59)) + (segment (start 172.974 131.826) (end 172.974 139.954) (width 0.254) (layer GND_layer) (net 59)) + (segment (start 172.974 131.826) (end 183.007 121.793) (width 0.254) (layer GND_layer) (net 59)) + (segment (start 183.007 107.442) (end 183.007 121.793) (width 0.254) (layer GND_layer) (net 59)) + (segment (start 182.245 106.68) (end 183.007 107.442) (width 0.254) (layer GND_layer) (net 59)) + (segment (start 181.102 106.68) (end 182.245 106.68) (width 0.254) (layer GND_layer) (net 59)) + (segment (start 178.943 104.521) (end 181.102 106.68) (width 0.254) (layer GND_layer) (net 59)) + (segment (start 178.943 94.234) (end 178.943 104.521) (width 0.254) (layer GND_layer) (net 59)) (segment (start 157.734 82.804) (end 157.48 83.058) (width 0.381) (layer Composant) (net 60)) - (segment (start 126.746 73.787) (end 126.746 75.311) (width 0.381) (layer Composant) (net 61)) - (segment (start 126.746 75.311) (end 127.381 75.946) (width 0.381) (layer Composant) (net 61)) - (segment (start 127.381 75.946) (end 128.27 75.946) (width 0.381) (layer Composant) (net 61) (status 400)) - (segment (start 123.444 66.04) (end 123.444 70.485) (width 0.381) (layer Composant) (net 61) (status 800)) + (segment (start 147.955 79.756) (end 147.955 64.77) (width 0.381) (layer Composant) (net 60)) + (segment (start 147.955 79.756) (end 151.257 83.058) (width 0.381) (layer Composant) (net 60)) + (segment (start 151.257 83.058) (end 157.48 83.058) (width 0.381) (layer Composant) (net 60)) + (segment (start 156.972 65.532) (end 156.972 66.04) (width 0.381) (layer Composant) (net 60) (status 400)) + (segment (start 157.734 82.042) (end 157.734 82.804) (width 0.381) (layer Composant) (net 60)) + (segment (start 156.718 81.026) (end 157.734 82.042) (width 0.381) (layer Composant) (net 60)) + (segment (start 156.21 81.026) (end 156.718 81.026) (width 0.381) (layer Composant) (net 60) (status 800)) + (segment (start 147.955 64.77) (end 149.86 62.865) (width 0.381) (layer Composant) (net 60)) + (segment (start 149.86 62.865) (end 154.305 62.865) (width 0.381) (layer Composant) (net 60)) + (segment (start 154.305 62.865) (end 156.972 65.532) (width 0.381) (layer Composant) (net 60)) (segment (start 123.444 70.485) (end 126.746 73.787) (width 0.381) (layer Composant) (net 61)) - (segment (start 185.674 67.183) (end 185.039 67.818) (width 0.381) (layer Composant) (net 62)) - (segment (start 189.103 68.453) (end 188.087 67.437) (width 0.381) (layer Composant) (net 62)) - (segment (start 188.087 67.437) (end 187.452 67.437) (width 0.381) (layer Composant) (net 62)) - (segment (start 187.833 77.216) (end 189.23 77.216) (width 0.381) (layer Composant) (net 62) (status 400)) - (segment (start 186.944 76.327) (end 187.833 77.216) (width 0.381) (layer Composant) (net 62)) - (segment (start 186.944 74.041) (end 186.944 76.327) (width 0.381) (layer Composant) (net 62)) - (segment (start 184.404 71.501) (end 186.944 74.041) (width 0.381) (layer Composant) (net 62)) - (segment (start 187.452 67.437) (end 187.198 67.183) (width 0.381) (layer Composant) (net 62)) - (segment (start 187.198 67.183) (end 185.674 67.183) (width 0.381) (layer Composant) (net 62)) - (segment (start 184.404 70.358) (end 184.404 71.501) (width 0.381) (layer Composant) (net 62)) - (segment (start 185.039 67.818) (end 185.039 69.723) (width 0.381) (layer Composant) (net 62)) - (segment (start 185.039 69.723) (end 184.404 70.358) (width 0.381) (layer Composant) (net 62)) + (segment (start 123.444 66.04) (end 123.444 70.485) (width 0.381) (layer Composant) (net 61) (status 800)) + (segment (start 127.381 75.946) (end 128.27 75.946) (width 0.381) (layer Composant) (net 61) (status 400)) + (segment (start 126.746 75.311) (end 127.381 75.946) (width 0.381) (layer Composant) (net 61)) + (segment (start 126.746 73.787) (end 126.746 75.311) (width 0.381) (layer Composant) (net 61)) (segment (start 189.103 68.58) (end 189.103 68.453) (width 0.381) (layer Composant) (net 62) (status 800)) - (segment (start 152.019 67.31) (end 151.511 67.818) (width 0.381) (layer Composant) (net 63)) - (segment (start 159.639 77.216) (end 161.29 77.216) (width 0.381) (layer Composant) (net 63) (status 400)) - (segment (start 151.511 67.818) (end 151.511 69.215) (width 0.381) (layer Composant) (net 63)) - (segment (start 151.511 69.215) (end 153.035 70.739) (width 0.381) (layer Composant) (net 63)) - (segment (start 153.035 70.739) (end 155.702 70.739) (width 0.381) (layer Composant) (net 63)) - (segment (start 154.305 67.31) (end 152.019 67.31) (width 0.381) (layer Composant) (net 63)) - (segment (start 155.575 68.58) (end 154.305 67.31) (width 0.381) (layer Composant) (net 63) (status 800)) - (segment (start 155.702 70.739) (end 159.004 74.041) (width 0.381) (layer Composant) (net 63)) - (segment (start 159.004 74.041) (end 159.004 76.581) (width 0.381) (layer Composant) (net 63)) + (segment (start 185.039 69.723) (end 184.404 70.358) (width 0.381) (layer Composant) (net 62)) + (segment (start 185.039 67.818) (end 185.039 69.723) (width 0.381) (layer Composant) (net 62)) + (segment (start 184.404 70.358) (end 184.404 71.501) (width 0.381) (layer Composant) (net 62)) + (segment (start 187.198 67.183) (end 185.674 67.183) (width 0.381) (layer Composant) (net 62)) + (segment (start 187.452 67.437) (end 187.198 67.183) (width 0.381) (layer Composant) (net 62)) + (segment (start 184.404 71.501) (end 186.944 74.041) (width 0.381) (layer Composant) (net 62)) + (segment (start 186.944 74.041) (end 186.944 76.327) (width 0.381) (layer Composant) (net 62)) + (segment (start 186.944 76.327) (end 187.833 77.216) (width 0.381) (layer Composant) (net 62)) + (segment (start 187.833 77.216) (end 189.23 77.216) (width 0.381) (layer Composant) (net 62) (status 400)) + (segment (start 188.087 67.437) (end 187.452 67.437) (width 0.381) (layer Composant) (net 62)) + (segment (start 189.103 68.453) (end 188.087 67.437) (width 0.381) (layer Composant) (net 62)) + (segment (start 185.674 67.183) (end 185.039 67.818) (width 0.381) (layer Composant) (net 62)) (segment (start 159.004 76.581) (end 159.639 77.216) (width 0.381) (layer Composant) (net 63)) - (segment (start 110.744 76.073) (end 112.014 74.803) (width 0.381) (layer GND_layer) (net 64) (status 800)) - (segment (start 117.221 71.628) (end 112.014 71.628) (width 0.381) (layer Composant) (net 64)) - (segment (start 118.11 70.358) (end 117.221 71.628) (width 0.381) (layer Composant) (net 64)) - (segment (start 120.269 70.358) (end 118.11 70.358) (width 0.381) (layer Composant) (net 64)) - (segment (start 122.047 68.58) (end 120.269 70.358) (width 0.381) (layer Composant) (net 64) (status 800)) - (via (at 112.014 71.628) (size 0.889) (layers Composant Cuivre) (net 64)) + (segment (start 159.004 74.041) (end 159.004 76.581) (width 0.381) (layer Composant) (net 63)) + (segment (start 155.702 70.739) (end 159.004 74.041) (width 0.381) (layer Composant) (net 63)) + (segment (start 155.575 68.58) (end 154.305 67.31) (width 0.381) (layer Composant) (net 63) (status 800)) + (segment (start 154.305 67.31) (end 152.019 67.31) (width 0.381) (layer Composant) (net 63)) + (segment (start 153.035 70.739) (end 155.702 70.739) (width 0.381) (layer Composant) (net 63)) + (segment (start 151.511 69.215) (end 153.035 70.739) (width 0.381) (layer Composant) (net 63)) + (segment (start 151.511 67.818) (end 151.511 69.215) (width 0.381) (layer Composant) (net 63)) + (segment (start 159.639 77.216) (end 161.29 77.216) (width 0.381) (layer Composant) (net 63) (status 400)) + (segment (start 152.019 67.31) (end 151.511 67.818) (width 0.381) (layer Composant) (net 63)) (segment (start 112.014 74.803) (end 112.014 71.628) (width 0.381) (layer GND_layer) (net 64)) - (segment (start 108.585 86.487) (end 109.474 86.487) (width 0.381) (layer Composant) (net 65) (status 800)) - (segment (start 113.03 85.217) (end 114.3 86.487) (width 0.381) (layer Composant) (net 65) (status 400)) - (segment (start 109.474 86.487) (end 110.744 85.217) (width 0.381) (layer Composant) (net 65)) + (via (at 112.014 71.628) (size 0.889) (layers Composant Cuivre) (net 64)) + (segment (start 122.047 68.58) (end 120.269 70.358) (width 0.381) (layer Composant) (net 64) (status 800)) + (segment (start 120.269 70.358) (end 118.11 70.358) (width 0.381) (layer Composant) (net 64)) + (segment (start 118.11 70.358) (end 117.221 71.628) (width 0.381) (layer Composant) (net 64)) + (segment (start 117.221 71.628) (end 112.014 71.628) (width 0.381) (layer Composant) (net 64)) + (segment (start 110.744 76.073) (end 112.014 74.803) (width 0.381) (layer GND_layer) (net 64) (status 800)) (segment (start 110.744 85.217) (end 113.03 85.217) (width 0.381) (layer Composant) (net 65)) - (segment (start 185.293 71.374) (end 185.293 70.612) (width 0.381) (layer Composant) (net 66)) - (segment (start 185.293 70.612) (end 186.182 69.723) (width 0.381) (layer Composant) (net 66)) - (segment (start 186.182 69.723) (end 186.436 68.58) (width 0.381) (layer Composant) (net 66) (status 400)) - (segment (start 189.23 75.946) (end 188.341 75.946) (width 0.381) (layer Composant) (net 66) (status 800)) - (segment (start 188.341 75.946) (end 187.706 75.311) (width 0.381) (layer Composant) (net 66)) - (segment (start 187.706 75.311) (end 187.706 73.787) (width 0.381) (layer Composant) (net 66)) + (segment (start 109.474 86.487) (end 110.744 85.217) (width 0.381) (layer Composant) (net 65)) + (segment (start 113.03 85.217) (end 114.3 86.487) (width 0.381) (layer Composant) (net 65) (status 400)) + (segment (start 108.585 86.487) (end 109.474 86.487) (width 0.381) (layer Composant) (net 65) (status 800)) (segment (start 187.706 73.787) (end 185.293 71.374) (width 0.381) (layer Composant) (net 66)) - (segment (start 154.305 69.977) (end 155.956 69.977) (width 0.381) (layer Composant) (net 67)) - (segment (start 152.908 68.58) (end 154.305 69.977) (width 0.381) (layer Composant) (net 67) (status 800)) - (segment (start 160.401 75.946) (end 161.29 75.946) (width 0.381) (layer Composant) (net 67) (status 400)) - (segment (start 159.766 75.311) (end 160.401 75.946) (width 0.381) (layer Composant) (net 67)) - (segment (start 155.956 69.977) (end 159.766 73.787) (width 0.381) (layer Composant) (net 67)) + (segment (start 187.706 75.311) (end 187.706 73.787) (width 0.381) (layer Composant) (net 66)) + (segment (start 188.341 75.946) (end 187.706 75.311) (width 0.381) (layer Composant) (net 66)) + (segment (start 189.23 75.946) (end 188.341 75.946) (width 0.381) (layer Composant) (net 66) (status 800)) + (segment (start 186.182 69.723) (end 186.436 68.58) (width 0.381) (layer Composant) (net 66) (status 400)) + (segment (start 185.293 70.612) (end 186.182 69.723) (width 0.381) (layer Composant) (net 66)) + (segment (start 185.293 71.374) (end 185.293 70.612) (width 0.381) (layer Composant) (net 66)) (segment (start 159.766 73.787) (end 159.766 75.311) (width 0.381) (layer Composant) (net 67)) - (segment (start 119.38 68.58) (end 120.65 67.945) (width 0.381) (layer Composant) (net 68) (status 800)) - (segment (start 117.856 63.5) (end 112.522 68.834) (width 0.381) (layer Composant) (net 68)) - (segment (start 112.522 68.834) (end 109.22 68.834) (width 0.381) (layer Composant) (net 68)) - (segment (start 120.523 63.5) (end 117.856 63.5) (width 0.381) (layer Composant) (net 68)) - (segment (start 106.807 71.247) (end 106.807 74.676) (width 0.381) (layer Composant) (net 68)) - (segment (start 106.807 74.676) (end 108.204 76.073) (width 0.381) (layer Composant) (net 68) (status 400)) - (segment (start 122.0978 65.0748) (end 120.523 63.5) (width 0.381) (layer Composant) (net 68)) - (segment (start 122.0978 66.4972) (end 122.0978 65.0748) (width 0.381) (layer Composant) (net 68)) - (segment (start 109.22 68.834) (end 106.807 71.247) (width 0.381) (layer Composant) (net 68)) + (segment (start 155.956 69.977) (end 159.766 73.787) (width 0.381) (layer Composant) (net 67)) + (segment (start 159.766 75.311) (end 160.401 75.946) (width 0.381) (layer Composant) (net 67)) + (segment (start 160.401 75.946) (end 161.29 75.946) (width 0.381) (layer Composant) (net 67) (status 400)) + (segment (start 152.908 68.58) (end 154.305 69.977) (width 0.381) (layer Composant) (net 67) (status 800)) + (segment (start 154.305 69.977) (end 155.956 69.977) (width 0.381) (layer Composant) (net 67)) (segment (start 120.65 67.945) (end 122.0978 66.4972) (width 0.381) (layer Composant) (net 68)) - (segment (start 110.49 90.297) (end 111.76 89.027) (width 0.381) (layer Composant) (net 69) (status 400)) + (segment (start 109.22 68.834) (end 106.807 71.247) (width 0.381) (layer Composant) (net 68)) + (segment (start 122.0978 66.4972) (end 122.0978 65.0748) (width 0.381) (layer Composant) (net 68)) + (segment (start 122.0978 65.0748) (end 120.523 63.5) (width 0.381) (layer Composant) (net 68)) + (segment (start 106.807 74.676) (end 108.204 76.073) (width 0.381) (layer Composant) (net 68) (status 400)) + (segment (start 106.807 71.247) (end 106.807 74.676) (width 0.381) (layer Composant) (net 68)) + (segment (start 120.523 63.5) (end 117.856 63.5) (width 0.381) (layer Composant) (net 68)) + (segment (start 112.522 68.834) (end 109.22 68.834) (width 0.381) (layer Composant) (net 68)) + (segment (start 117.856 63.5) (end 112.522 68.834) (width 0.381) (layer Composant) (net 68)) + (segment (start 119.38 68.58) (end 120.65 67.945) (width 0.381) (layer Composant) (net 68) (status 800)) (segment (start 108.585 90.297) (end 110.49 90.297) (width 0.381) (layer Composant) (net 69) (status 800)) - (segment (start 177.038 84.455) (end 178.054 85.471) (width 0.254) (layer Cuivre) (net 70)) - (segment (start 178.054 85.471) (end 187.96 85.471) (width 0.254) (layer Cuivre) (net 70)) - (segment (start 174.371 84.455) (end 177.038 84.455) (width 0.254) (layer Cuivre) (net 70)) - (segment (start 192.405 81.026) (end 198.882 81.026) (width 0.254) (layer Cuivre) (net 70)) - (segment (start 198.882 81.026) (end 200.025 82.169) (width 0.254) (layer Cuivre) (net 70) (status 400)) - (segment (start 138.8872 93.726) (end 138.8872 92.3036) (width 0.254) (layer Composant) (net 70) (status 800)) - (segment (start 138.8872 92.3036) (end 138.811 91.948) (width 0.254) (layer Composant) (net 70)) - (segment (start 138.811 91.948) (end 138.811 87.884) (width 0.254) (layer Composant) (net 70)) - (segment (start 138.811 87.884) (end 139.954 86.741) (width 0.254) (layer Composant) (net 70)) - (segment (start 139.954 86.741) (end 139.954 85.598) (width 0.254) (layer Composant) (net 70)) - (segment (start 131.064 139.446) (end 129.794 138.176) (width 0.254) (layer GND_layer) (net 70) (status 800)) - (segment (start 129.794 138.176) (end 129.794 136.017) (width 0.254) (layer GND_layer) (net 70)) - (segment (start 129.794 136.017) (end 128.778 135.001) (width 0.254) (layer GND_layer) (net 70)) - (segment (start 128.778 135.001) (end 128.778 132.842) (width 0.254) (layer GND_layer) (net 70)) - (segment (start 126.619 118.491) (end 127.635 119.507) (width 0.254) (layer GND_layer) (net 70)) - (segment (start 126.619 118.491) (end 126.619 90.551) (width 0.254) (layer GND_layer) (net 70)) - (segment (start 126.619 90.551) (end 124.46 88.392) (width 0.254) (layer GND_layer) (net 70)) - (segment (start 128.778 132.842) (end 127.635 131.699) (width 0.254) (layer GND_layer) (net 70)) - (segment (start 140.589 87.122) (end 153.797 87.122) (width 0.254) (layer Cuivre) (net 70)) - (segment (start 153.797 87.122) (end 155.321 85.598) (width 0.254) (layer Cuivre) (net 70)) - (segment (start 155.321 85.598) (end 166.751 85.598) (width 0.254) (layer Cuivre) (net 70)) - (segment (start 139.827 87.884) (end 140.589 87.122) (width 0.254) (layer Cuivre) (net 70)) - (segment (start 166.878 85.471) (end 173.355 85.471) (width 0.254) (layer Cuivre) (net 70)) - (segment (start 173.355 85.471) (end 174.371 84.455) (width 0.254) (layer Cuivre) (net 70)) - (segment (start 187.96 85.471) (end 192.405 81.026) (width 0.254) (layer Cuivre) (net 70)) - (segment (start 166.751 85.598) (end 166.878 85.471) (width 0.254) (layer Cuivre) (net 70)) - (segment (start 124.46 88.392) (end 122.174 88.392) (width 0.254) (layer GND_layer) (net 70)) - (segment (start 122.174 88.392) (end 120.269 86.487) (width 0.254) (layer GND_layer) (net 70)) - (segment (start 120.269 86.487) (end 120.269 85.598) (width 0.254) (layer GND_layer) (net 70)) - (segment (start 139.954 85.598) (end 139.954 86.487) (width 0.254) (layer Cuivre) (net 70)) - (segment (start 139.954 86.487) (end 140.589 87.122) (width 0.254) (layer Cuivre) (net 70)) - (segment (start 120.269 85.598) (end 120.269 87.249) (width 0.254) (layer Cuivre) (net 70)) - (segment (start 120.269 87.249) (end 120.904 87.884) (width 0.254) (layer Cuivre) (net 70)) - (segment (start 120.904 87.884) (end 139.827 87.884) (width 0.254) (layer Cuivre) (net 70)) - (segment (start 127.635 119.507) (end 127.635 131.699) (width 0.254) (layer GND_layer) (net 70)) - (via (at 139.954 85.598) (size 0.635) (layers Composant Cuivre) (net 70)) + (segment (start 110.49 90.297) (end 111.76 89.027) (width 0.381) (layer Composant) (net 69) (status 400)) (via (at 120.269 85.598) (size 0.889) (layers Composant Cuivre) (net 70)) - (segment (start 181.102 121.285) (end 182.499 119.888) (width 0.254) (layer GND_layer) (net 71)) - (segment (start 181.61 107.569) (end 183.0451 109.0041) (width 0.254) (layer Composant) (net 71)) - (segment (start 146.177 94.996) (end 146.177 92.075) (width 0.254) (layer Composant) (net 71)) - (segment (start 181.102 122.809) (end 181.102 121.285) (width 0.254) (layer GND_layer) (net 71)) - (via (at 152.4 84.836) (size 0.889) (layers Composant Cuivre) (net 71)) - (via (at 181.61 107.569) (size 0.635) (layers Composant Cuivre) (net 71)) - (segment (start 152.4 84.836) (end 154.432 82.804) (width 0.254) (layer Cuivre) (net 71)) - (segment (start 154.432 82.804) (end 164.973 82.804) (width 0.254) (layer Cuivre) (net 71)) - (segment (start 164.973 82.804) (end 164.846 82.931) (width 0.254) (layer Cuivre) (net 71)) - (segment (start 168.275 82.931) (end 164.846 82.931) (width 0.254) (layer Cuivre) (net 71)) - (segment (start 168.656 83.312) (end 168.275 82.931) (width 0.254) (layer Cuivre) (net 71)) - (segment (start 170.942 83.312) (end 168.656 83.312) (width 0.254) (layer Cuivre) (net 71)) - (segment (start 172.085 82.169) (end 170.942 83.312) (width 0.254) (layer Cuivre) (net 71) (status 800)) - (segment (start 173.99 80.264) (end 172.085 82.169) (width 0.254) (layer GND_layer) (net 71) (status 400)) - (segment (start 173.99 78.74) (end 173.99 80.264) (width 0.254) (layer GND_layer) (net 71)) - (segment (start 176.911 75.819) (end 173.99 78.74) (width 0.254) (layer GND_layer) (net 71)) - (segment (start 178.181 75.819) (end 176.911 75.819) (width 0.254) (layer GND_layer) (net 71)) - (segment (start 179.959 77.597) (end 178.181 75.819) (width 0.254) (layer GND_layer) (net 71)) - (segment (start 179.959 89.027) (end 179.959 77.597) (width 0.254) (layer GND_layer) (net 71)) - (segment (start 178.435 90.551) (end 179.959 89.027) (width 0.254) (layer GND_layer) (net 71)) - (segment (start 178.435 104.902) (end 178.435 90.551) (width 0.254) (layer GND_layer) (net 71)) - (segment (start 181.102 107.569) (end 178.435 104.902) (width 0.254) (layer GND_layer) (net 71)) - (segment (start 183.0451 109.0041) (end 190.9445 109.0041) (width 0.254) (layer Composant) (net 71) (status 400)) - (segment (start 197.485 86.995) (end 197.485 88.05418) (width 0.254) (layer Cuivre) (net 71) (status 800)) - (segment (start 197.485 88.05418) (end 196.42582 88.05418) (width 0.254) (layer Cuivre) (net 71)) - (segment (start 196.42582 88.05418) (end 183.65978 100.82022) (width 0.254) (layer Cuivre) (net 71)) - (segment (start 183.65978 100.82022) (end 183.65978 105.51922) (width 0.254) (layer Cuivre) (net 71)) - (segment (start 183.65978 105.51922) (end 181.61 107.569) (width 0.254) (layer Cuivre) (net 71)) - (segment (start 143.129 96.4692) (end 144.7038 96.4692) (width 0.254) (layer Composant) (net 71) (status 800)) - (segment (start 144.7038 96.4692) (end 146.177 94.996) (width 0.254) (layer Composant) (net 71)) - (segment (start 181.61 107.569) (end 181.102 107.569) (width 0.254) (layer GND_layer) (net 71)) - (segment (start 146.177 92.075) (end 152.4 85.852) (width 0.254) (layer Composant) (net 71)) - (segment (start 152.4 85.852) (end 152.4 84.836) (width 0.254) (layer Composant) (net 71)) - (segment (start 181.61 107.569) (end 182.245 107.569) (width 0.254) (layer GND_layer) (net 71)) - (segment (start 182.499 107.823) (end 182.499 119.888) (width 0.254) (layer GND_layer) (net 71)) - (segment (start 182.245 107.569) (end 182.499 107.823) (width 0.254) (layer GND_layer) (net 71)) - (segment (start 171.704 132.207) (end 181.102 122.809) (width 0.254) (layer GND_layer) (net 71)) + (via (at 139.954 85.598) (size 0.635) (layers Composant Cuivre) (net 70)) + (segment (start 127.635 119.507) (end 127.635 131.699) (width 0.254) (layer GND_layer) (net 70)) + (segment (start 120.904 87.884) (end 139.827 87.884) (width 0.254) (layer Cuivre) (net 70)) + (segment (start 120.269 87.249) (end 120.904 87.884) (width 0.254) (layer Cuivre) (net 70)) + (segment (start 120.269 85.598) (end 120.269 87.249) (width 0.254) (layer Cuivre) (net 70)) + (segment (start 139.954 86.487) (end 140.589 87.122) (width 0.254) (layer Cuivre) (net 70)) + (segment (start 139.954 85.598) (end 139.954 86.487) (width 0.254) (layer Cuivre) (net 70)) + (segment (start 120.269 86.487) (end 120.269 85.598) (width 0.254) (layer GND_layer) (net 70)) + (segment (start 122.174 88.392) (end 120.269 86.487) (width 0.254) (layer GND_layer) (net 70)) + (segment (start 124.46 88.392) (end 122.174 88.392) (width 0.254) (layer GND_layer) (net 70)) + (segment (start 166.751 85.598) (end 166.878 85.471) (width 0.254) (layer Cuivre) (net 70)) + (segment (start 187.96 85.471) (end 192.405 81.026) (width 0.254) (layer Cuivre) (net 70)) + (segment (start 173.355 85.471) (end 174.371 84.455) (width 0.254) (layer Cuivre) (net 70)) + (segment (start 166.878 85.471) (end 173.355 85.471) (width 0.254) (layer Cuivre) (net 70)) + (segment (start 139.827 87.884) (end 140.589 87.122) (width 0.254) (layer Cuivre) (net 70)) + (segment (start 155.321 85.598) (end 166.751 85.598) (width 0.254) (layer Cuivre) (net 70)) + (segment (start 153.797 87.122) (end 155.321 85.598) (width 0.254) (layer Cuivre) (net 70)) + (segment (start 140.589 87.122) (end 153.797 87.122) (width 0.254) (layer Cuivre) (net 70)) + (segment (start 128.778 132.842) (end 127.635 131.699) (width 0.254) (layer GND_layer) (net 70)) + (segment (start 126.619 90.551) (end 124.46 88.392) (width 0.254) (layer GND_layer) (net 70)) + (segment (start 126.619 118.491) (end 126.619 90.551) (width 0.254) (layer GND_layer) (net 70)) + (segment (start 126.619 118.491) (end 127.635 119.507) (width 0.254) (layer GND_layer) (net 70)) + (segment (start 128.778 135.001) (end 128.778 132.842) (width 0.254) (layer GND_layer) (net 70)) + (segment (start 129.794 136.017) (end 128.778 135.001) (width 0.254) (layer GND_layer) (net 70)) + (segment (start 129.794 138.176) (end 129.794 136.017) (width 0.254) (layer GND_layer) (net 70)) + (segment (start 131.064 139.446) (end 129.794 138.176) (width 0.254) (layer GND_layer) (net 70) (status 800)) + (segment (start 139.954 86.741) (end 139.954 85.598) (width 0.254) (layer Composant) (net 70)) + (segment (start 138.811 87.884) (end 139.954 86.741) (width 0.254) (layer Composant) (net 70)) + (segment (start 138.811 91.948) (end 138.811 87.884) (width 0.254) (layer Composant) (net 70)) + (segment (start 138.8872 92.3036) (end 138.811 91.948) (width 0.254) (layer Composant) (net 70)) + (segment (start 138.8872 93.726) (end 138.8872 92.3036) (width 0.254) (layer Composant) (net 70) (status 800)) + (segment (start 198.882 81.026) (end 200.025 82.169) (width 0.254) (layer Cuivre) (net 70) (status 400)) + (segment (start 192.405 81.026) (end 198.882 81.026) (width 0.254) (layer Cuivre) (net 70)) + (segment (start 174.371 84.455) (end 177.038 84.455) (width 0.254) (layer Cuivre) (net 70)) + (segment (start 178.054 85.471) (end 187.96 85.471) (width 0.254) (layer Cuivre) (net 70)) + (segment (start 177.038 84.455) (end 178.054 85.471) (width 0.254) (layer Cuivre) (net 70)) (segment (start 171.704 132.207) (end 171.704 136.906) (width 0.254) (layer GND_layer) (net 71) (status 400)) - (segment (start 124.714 133.858) (end 124.714 137.668) (width 0.254) (layer GND_layer) (net 72)) - (via (at 124.841 93.98) (size 0.635) (layers Composant Cuivre) (net 72)) - (segment (start 124.587 96.901) (end 124.587 101.346) (width 0.254) (layer GND_layer) (net 72)) - (segment (start 123.952 96.266) (end 124.587 96.901) (width 0.254) (layer GND_layer) (net 72)) - (segment (start 120.904 94.996) (end 122.174 96.266) (width 0.254) (layer GND_layer) (net 72)) - (segment (start 124.841 93.98) (end 124.968 94.488) (width 0.254) (layer Composant) (net 72)) - (segment (start 124.968 94.488) (end 126.4412 95.9612) (width 0.254) (layer Composant) (net 72)) - (segment (start 126.4412 95.9612) (end 127.635 95.9866) (width 0.254) (layer Composant) (net 72) (status 400)) - (segment (start 140.208 82.169) (end 138.303 82.169) (width 0.254) (layer Cuivre) (net 72) (status 400)) - (via (at 140.208 82.169) (size 0.889) (layers Composant Cuivre) (net 72)) - (segment (start 125.984 139.446) (end 125.984 138.938) (width 0.254) (layer GND_layer) (net 72) (status 800)) - (segment (start 125.984 138.938) (end 124.714 137.668) (width 0.254) (layer GND_layer) (net 72)) - (segment (start 120.396 105.537) (end 124.587 101.346) (width 0.254) (layer GND_layer) (net 72)) - (segment (start 140.208 82.804) (end 138.684 84.328) (width 0.254) (layer Composant) (net 72)) - (segment (start 138.684 84.328) (end 134.493 84.328) (width 0.254) (layer Composant) (net 72)) - (segment (start 134.493 84.328) (end 131.064 87.757) (width 0.254) (layer Composant) (net 72)) - (segment (start 121.666 92.583) (end 120.904 93.345) (width 0.254) (layer GND_layer) (net 72)) - (segment (start 123.952 92.583) (end 121.666 92.583) (width 0.254) (layer GND_layer) (net 72)) - (segment (start 124.841 93.472) (end 123.952 92.583) (width 0.254) (layer GND_layer) (net 72)) - (segment (start 124.841 93.98) (end 124.841 93.472) (width 0.254) (layer GND_layer) (net 72)) - (segment (start 124.714 93.472) (end 124.841 93.98) (width 0.254) (layer Composant) (net 72)) - (segment (start 124.714 92.202) (end 124.714 93.472) (width 0.254) (layer Composant) (net 72)) - (segment (start 129.159 87.757) (end 124.714 92.202) (width 0.254) (layer Composant) (net 72)) - (segment (start 131.064 87.757) (end 129.159 87.757) (width 0.254) (layer Composant) (net 72)) - (segment (start 120.904 93.345) (end 120.904 94.996) (width 0.254) (layer GND_layer) (net 72)) - (segment (start 120.396 105.537) (end 120.396 129.54) (width 0.254) (layer GND_layer) (net 72)) - (segment (start 120.396 129.54) (end 124.714 133.858) (width 0.254) (layer GND_layer) (net 72)) - (segment (start 122.174 96.266) (end 123.952 96.266) (width 0.254) (layer GND_layer) (net 72)) + (segment (start 171.704 132.207) (end 181.102 122.809) (width 0.254) (layer GND_layer) (net 71)) + (segment (start 182.245 107.569) (end 182.499 107.823) (width 0.254) (layer GND_layer) (net 71)) + (segment (start 182.499 107.823) (end 182.499 119.888) (width 0.254) (layer GND_layer) (net 71)) + (segment (start 181.61 107.569) (end 182.245 107.569) (width 0.254) (layer GND_layer) (net 71)) + (segment (start 152.4 85.852) (end 152.4 84.836) (width 0.254) (layer Composant) (net 71)) + (segment (start 146.177 92.075) (end 152.4 85.852) (width 0.254) (layer Composant) (net 71)) + (segment (start 181.61 107.569) (end 181.102 107.569) (width 0.254) (layer GND_layer) (net 71)) + (segment (start 144.7038 96.4692) (end 146.177 94.996) (width 0.254) (layer Composant) (net 71)) + (segment (start 143.129 96.4692) (end 144.7038 96.4692) (width 0.254) (layer Composant) (net 71) (status 800)) + (segment (start 183.65978 105.51922) (end 181.61 107.569) (width 0.254) (layer Cuivre) (net 71)) + (segment (start 183.65978 100.82022) (end 183.65978 105.51922) (width 0.254) (layer Cuivre) (net 71)) + (segment (start 196.42582 88.05418) (end 183.65978 100.82022) (width 0.254) (layer Cuivre) (net 71)) + (segment (start 197.485 88.05418) (end 196.42582 88.05418) (width 0.254) (layer Cuivre) (net 71)) + (segment (start 197.485 86.995) (end 197.485 88.05418) (width 0.254) (layer Cuivre) (net 71) (status 800)) + (segment (start 183.0451 109.0041) (end 190.9445 109.0041) (width 0.254) (layer Composant) (net 71) (status 400)) + (segment (start 181.102 107.569) (end 178.435 104.902) (width 0.254) (layer GND_layer) (net 71)) + (segment (start 178.435 104.902) (end 178.435 90.551) (width 0.254) (layer GND_layer) (net 71)) + (segment (start 178.435 90.551) (end 179.959 89.027) (width 0.254) (layer GND_layer) (net 71)) + (segment (start 179.959 89.027) (end 179.959 77.597) (width 0.254) (layer GND_layer) (net 71)) + (segment (start 179.959 77.597) (end 178.181 75.819) (width 0.254) (layer GND_layer) (net 71)) + (segment (start 178.181 75.819) (end 176.911 75.819) (width 0.254) (layer GND_layer) (net 71)) + (segment (start 176.911 75.819) (end 173.99 78.74) (width 0.254) (layer GND_layer) (net 71)) + (segment (start 173.99 78.74) (end 173.99 80.264) (width 0.254) (layer GND_layer) (net 71)) + (segment (start 173.99 80.264) (end 172.085 82.169) (width 0.254) (layer GND_layer) (net 71) (status 400)) + (segment (start 172.085 82.169) (end 170.942 83.312) (width 0.254) (layer Cuivre) (net 71) (status 800)) + (segment (start 170.942 83.312) (end 168.656 83.312) (width 0.254) (layer Cuivre) (net 71)) + (segment (start 168.656 83.312) (end 168.275 82.931) (width 0.254) (layer Cuivre) (net 71)) + (segment (start 168.275 82.931) (end 164.846 82.931) (width 0.254) (layer Cuivre) (net 71)) + (segment (start 164.973 82.804) (end 164.846 82.931) (width 0.254) (layer Cuivre) (net 71)) + (segment (start 154.432 82.804) (end 164.973 82.804) (width 0.254) (layer Cuivre) (net 71)) + (segment (start 152.4 84.836) (end 154.432 82.804) (width 0.254) (layer Cuivre) (net 71)) + (via (at 181.61 107.569) (size 0.635) (layers Composant Cuivre) (net 71)) + (via (at 152.4 84.836) (size 0.889) (layers Composant Cuivre) (net 71)) + (segment (start 181.102 122.809) (end 181.102 121.285) (width 0.254) (layer GND_layer) (net 71)) + (segment (start 146.177 94.996) (end 146.177 92.075) (width 0.254) (layer Composant) (net 71)) + (segment (start 181.61 107.569) (end 183.0451 109.0041) (width 0.254) (layer Composant) (net 71)) + (segment (start 181.102 121.285) (end 182.499 119.888) (width 0.254) (layer GND_layer) (net 71)) (segment (start 140.208 82.169) (end 140.208 82.804) (width 0.254) (layer Composant) (net 72)) - (segment (start 137.922 83.82) (end 137.16 84.582) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 137.16 84.582) (end 137.16 85.344) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 141.859 83.82) (end 137.922 83.82) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 137.16 86.233) (end 137.16 85.344) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 137.033 86.36) (end 137.16 86.233) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 164.846 83.947) (end 164.465 83.566) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 143.637 85.598) (end 141.859 83.82) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 153.035 85.598) (end 143.637 85.598) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 153.035 85.598) (end 155.067 83.566) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 155.067 83.566) (end 164.465 83.566) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 172.593 83.947) (end 164.846 83.947) (width 0.254) (layer Cuivre) (net 73)) - (via (at 137.16 85.344) (size 0.889) (layers Composant Cuivre) (net 73)) - (segment (start 126.873 86.36) (end 137.033 86.36) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 137.3886 93.726) (end 137.3886 92.3036) (width 0.254) (layer Composant) (net 73) (status 800)) - (segment (start 137.287 91.948) (end 137.16 85.344) (width 0.254) (layer Composant) (net 73)) - (segment (start 137.3886 92.3036) (end 137.287 91.948) (width 0.254) (layer Composant) (net 73)) - (segment (start 123.19 85.598) (end 123.952 84.836) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 123.952 84.836) (end 125.349 84.836) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 125.349 84.836) (end 126.873 86.36) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 123.19 85.598) (end 123.19 86.36) (width 0.254) (layer GND_layer) (net 73)) - (segment (start 123.19 86.36) (end 123.825 86.995) (width 0.254) (layer GND_layer) (net 73)) - (segment (start 123.825 86.995) (end 124.841 86.995) (width 0.254) (layer GND_layer) (net 73)) - (segment (start 124.841 86.995) (end 127.635 89.789) (width 0.254) (layer GND_layer) (net 73)) - (segment (start 127.635 89.789) (end 127.635 116.84) (width 0.254) (layer GND_layer) (net 73)) - (segment (start 129.921 131.064) (end 129.921 133.985) (width 0.254) (layer GND_layer) (net 73)) - (segment (start 129.921 133.985) (end 132.334 136.398) (width 0.254) (layer GND_layer) (net 73)) - (segment (start 132.334 136.398) (end 132.334 138.176) (width 0.254) (layer GND_layer) (net 73)) - (segment (start 132.334 138.176) (end 133.604 139.446) (width 0.254) (layer GND_layer) (net 73) (status 400)) - (via (at 123.19 85.598) (size 0.889) (layers Composant Cuivre) (net 73)) - (segment (start 129.032 130.175) (end 129.921 131.064) (width 0.254) (layer GND_layer) (net 73)) - (segment (start 129.032 118.237) (end 129.032 130.175) (width 0.254) (layer GND_layer) (net 73)) - (segment (start 127.635 116.84) (end 129.032 118.237) (width 0.254) (layer GND_layer) (net 73)) - (segment (start 200.025 79.629) (end 201.676 77.978) (width 0.254) (layer Cuivre) (net 73) (status 800)) - (segment (start 201.676 77.978) (end 201.676 73.533) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 201.676 73.533) (end 201.168 73.025) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 201.168 73.025) (end 196.723 73.025) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 196.723 73.025) (end 185.801 83.947) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 185.801 83.947) (end 179.197 83.947) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 179.197 83.947) (end 178.054 82.804) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 178.054 82.804) (end 173.736 82.804) (width 0.254) (layer Cuivre) (net 73)) + (segment (start 122.174 96.266) (end 123.952 96.266) (width 0.254) (layer GND_layer) (net 72)) + (segment (start 120.396 129.54) (end 124.714 133.858) (width 0.254) (layer GND_layer) (net 72)) + (segment (start 120.396 105.537) (end 120.396 129.54) (width 0.254) (layer GND_layer) (net 72)) + (segment (start 120.904 93.345) (end 120.904 94.996) (width 0.254) (layer GND_layer) (net 72)) + (segment (start 131.064 87.757) (end 129.159 87.757) (width 0.254) (layer Composant) (net 72)) + (segment (start 129.159 87.757) (end 124.714 92.202) (width 0.254) (layer Composant) (net 72)) + (segment (start 124.714 92.202) (end 124.714 93.472) (width 0.254) (layer Composant) (net 72)) + (segment (start 124.714 93.472) (end 124.841 93.98) (width 0.254) (layer Composant) (net 72)) + (segment (start 124.841 93.98) (end 124.841 93.472) (width 0.254) (layer GND_layer) (net 72)) + (segment (start 124.841 93.472) (end 123.952 92.583) (width 0.254) (layer GND_layer) (net 72)) + (segment (start 123.952 92.583) (end 121.666 92.583) (width 0.254) (layer GND_layer) (net 72)) + (segment (start 121.666 92.583) (end 120.904 93.345) (width 0.254) (layer GND_layer) (net 72)) + (segment (start 134.493 84.328) (end 131.064 87.757) (width 0.254) (layer Composant) (net 72)) + (segment (start 138.684 84.328) (end 134.493 84.328) (width 0.254) (layer Composant) (net 72)) + (segment (start 140.208 82.804) (end 138.684 84.328) (width 0.254) (layer Composant) (net 72)) + (segment (start 120.396 105.537) (end 124.587 101.346) (width 0.254) (layer GND_layer) (net 72)) + (segment (start 125.984 138.938) (end 124.714 137.668) (width 0.254) (layer GND_layer) (net 72)) + (segment (start 125.984 139.446) (end 125.984 138.938) (width 0.254) (layer GND_layer) (net 72) (status 800)) + (via (at 140.208 82.169) (size 0.889) (layers Composant Cuivre) (net 72)) + (segment (start 140.208 82.169) (end 138.303 82.169) (width 0.254) (layer Cuivre) (net 72) (status 400)) + (segment (start 126.4412 95.9612) (end 127.635 95.9866) (width 0.254) (layer Composant) (net 72) (status 400)) + (segment (start 124.968 94.488) (end 126.4412 95.9612) (width 0.254) (layer Composant) (net 72)) + (segment (start 124.841 93.98) (end 124.968 94.488) (width 0.254) (layer Composant) (net 72)) + (segment (start 120.904 94.996) (end 122.174 96.266) (width 0.254) (layer GND_layer) (net 72)) + (segment (start 123.952 96.266) (end 124.587 96.901) (width 0.254) (layer GND_layer) (net 72)) + (segment (start 124.587 96.901) (end 124.587 101.346) (width 0.254) (layer GND_layer) (net 72)) + (via (at 124.841 93.98) (size 0.635) (layers Composant Cuivre) (net 72)) + (segment (start 124.714 133.858) (end 124.714 137.668) (width 0.254) (layer GND_layer) (net 72)) (segment (start 173.736 82.804) (end 172.593 83.947) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 178.943 92.456) (end 178.943 90.805) (width 0.254) (layer GND_layer) (net 74)) - (segment (start 178.308 75.057) (end 176.657 75.057) (width 0.254) (layer GND_layer) (net 74)) - (segment (start 176.657 75.057) (end 172.085 79.629) (width 0.254) (layer GND_layer) (net 74) (status 400)) - (segment (start 174.244 131.318) (end 174.244 136.906) (width 0.254) (layer GND_layer) (net 74) (status 400)) - (segment (start 174.244 131.318) (end 183.515 122.047) (width 0.254) (layer GND_layer) (net 74)) - (segment (start 183.515 107.061) (end 182.245 105.791) (width 0.254) (layer GND_layer) (net 74)) - (segment (start 182.245 105.791) (end 181.102 105.791) (width 0.254) (layer GND_layer) (net 74)) - (segment (start 181.102 105.791) (end 179.705 104.394) (width 0.254) (layer GND_layer) (net 74)) - (segment (start 179.705 104.394) (end 179.705 102.87) (width 0.254) (layer GND_layer) (net 74)) - (segment (start 172.085 79.629) (end 170.815 80.899) (width 0.254) (layer Cuivre) (net 74) (status 800)) - (segment (start 152.4 83.82) (end 154.432 81.788) (width 0.254) (layer Cuivre) (net 74)) - (segment (start 154.432 81.788) (end 164.973 81.788) (width 0.254) (layer Cuivre) (net 74)) - (segment (start 164.973 81.788) (end 165.862 80.899) (width 0.254) (layer Cuivre) (net 74)) - (segment (start 170.815 80.899) (end 165.862 80.899) (width 0.254) (layer Cuivre) (net 74)) - (segment (start 139.8778 93.726) (end 139.8905 92.3036) (width 0.254) (layer Composant) (net 74) (status 800)) - (segment (start 150.241 83.312) (end 150.8125 83.8835) (width 0.254) (layer Composant) (net 74)) - (segment (start 144.145 83.312) (end 150.241 83.312) (width 0.254) (layer Composant) (net 74)) - (segment (start 143.383 84.074) (end 144.145 83.312) (width 0.254) (layer Composant) (net 74)) - (segment (start 143.383 87.757) (end 143.383 84.074) (width 0.254) (layer Composant) (net 74)) - (segment (start 143.002 88.138) (end 143.383 87.757) (width 0.254) (layer Composant) (net 74)) - (segment (start 140.208 88.138) (end 143.002 88.138) (width 0.254) (layer Composant) (net 74)) - (segment (start 139.827 88.519) (end 140.208 88.138) (width 0.254) (layer Composant) (net 74)) - (segment (start 139.827 91.948) (end 139.827 88.519) (width 0.254) (layer Composant) (net 74)) - (segment (start 139.8905 92.3036) (end 139.827 91.948) (width 0.254) (layer Composant) (net 74)) - (via (at 179.705 102.87) (size 0.889) (layers Composant Cuivre) (net 74)) - (segment (start 152.4 83.82) (end 151.638 83.82) (width 0.254) (layer Cuivre) (net 74)) - (segment (start 151.4475 83.8835) (end 150.8125 83.8835) (width 0.254) (layer Composant) (net 74)) - (segment (start 151.511 83.947) (end 151.4475 83.8835) (width 0.254) (layer Composant) (net 74)) - (via (at 151.511 83.947) (size 0.889) (layers Composant Cuivre) (net 74)) - (segment (start 151.638 83.82) (end 151.511 83.947) (width 0.254) (layer Cuivre) (net 74)) - (segment (start 194.03314 111.0107) (end 194.91706 110.12678) (width 0.254) (layer Composant) (net 74)) - (segment (start 190.9445 111.0107) (end 194.03314 111.0107) (width 0.254) (layer Composant) (net 74) (status 800)) - (segment (start 194.91706 110.12678) (end 194.91706 105.62082) (width 0.254) (layer Composant) (net 74)) - (segment (start 194.91706 105.62082) (end 191.62522 102.32898) (width 0.254) (layer Composant) (net 74)) - (segment (start 191.62522 102.32898) (end 180.24602 102.32898) (width 0.254) (layer Composant) (net 74)) - (segment (start 180.24602 102.32898) (end 179.705 102.87) (width 0.254) (layer Composant) (net 74)) - (segment (start 179.705 102.87) (end 183.95442 102.87) (width 0.254) (layer 3.3V_layer) (net 74)) - (segment (start 183.95442 102.87) (end 197.28942 89.535) (width 0.254) (layer 3.3V_layer) (net 74)) - (segment (start 197.28942 89.535) (end 197.485 89.535) (width 0.254) (layer 3.3V_layer) (net 74) (status 400)) - (segment (start 179.705 102.87) (end 179.959 102.362) (width 0.254) (layer GND_layer) (net 74)) - (segment (start 179.959 102.362) (end 179.959 93.472) (width 0.254) (layer GND_layer) (net 74)) - (segment (start 179.959 93.472) (end 178.943 92.456) (width 0.254) (layer GND_layer) (net 74)) - (segment (start 180.467 77.216) (end 178.308 75.057) (width 0.254) (layer GND_layer) (net 74)) - (segment (start 180.467 89.281) (end 180.467 77.216) (width 0.254) (layer GND_layer) (net 74)) - (segment (start 178.943 90.805) (end 180.467 89.281) (width 0.254) (layer GND_layer) (net 74)) + (segment (start 178.054 82.804) (end 173.736 82.804) (width 0.254) (layer Cuivre) (net 73)) + (segment (start 179.197 83.947) (end 178.054 82.804) (width 0.254) (layer Cuivre) (net 73)) + (segment (start 185.801 83.947) (end 179.197 83.947) (width 0.254) (layer Cuivre) (net 73)) + (segment (start 196.723 73.025) (end 185.801 83.947) (width 0.254) (layer Cuivre) (net 73)) + (segment (start 201.168 73.025) (end 196.723 73.025) (width 0.254) (layer Cuivre) (net 73)) + (segment (start 201.676 73.533) (end 201.168 73.025) (width 0.254) (layer Cuivre) (net 73)) + (segment (start 201.676 77.978) (end 201.676 73.533) (width 0.254) (layer Cuivre) (net 73)) + (segment (start 200.025 79.629) (end 201.676 77.978) (width 0.254) (layer Cuivre) (net 73) (status 800)) + (segment (start 127.635 116.84) (end 129.032 118.237) (width 0.254) (layer GND_layer) (net 73)) + (segment (start 129.032 118.237) (end 129.032 130.175) (width 0.254) (layer GND_layer) (net 73)) + (segment (start 129.032 130.175) (end 129.921 131.064) (width 0.254) (layer GND_layer) (net 73)) + (via (at 123.19 85.598) (size 0.889) (layers Composant Cuivre) (net 73)) + (segment (start 132.334 138.176) (end 133.604 139.446) (width 0.254) (layer GND_layer) (net 73) (status 400)) + (segment (start 132.334 136.398) (end 132.334 138.176) (width 0.254) (layer GND_layer) (net 73)) + (segment (start 129.921 133.985) (end 132.334 136.398) (width 0.254) (layer GND_layer) (net 73)) + (segment (start 129.921 131.064) (end 129.921 133.985) (width 0.254) (layer GND_layer) (net 73)) + (segment (start 127.635 89.789) (end 127.635 116.84) (width 0.254) (layer GND_layer) (net 73)) + (segment (start 124.841 86.995) (end 127.635 89.789) (width 0.254) (layer GND_layer) (net 73)) + (segment (start 123.825 86.995) (end 124.841 86.995) (width 0.254) (layer GND_layer) (net 73)) + (segment (start 123.19 86.36) (end 123.825 86.995) (width 0.254) (layer GND_layer) (net 73)) + (segment (start 123.19 85.598) (end 123.19 86.36) (width 0.254) (layer GND_layer) (net 73)) + (segment (start 125.349 84.836) (end 126.873 86.36) (width 0.254) (layer Cuivre) (net 73)) + (segment (start 123.952 84.836) (end 125.349 84.836) (width 0.254) (layer Cuivre) (net 73)) + (segment (start 123.19 85.598) (end 123.952 84.836) (width 0.254) (layer Cuivre) (net 73)) + (segment (start 137.3886 92.3036) (end 137.287 91.948) (width 0.254) (layer Composant) (net 73)) + (segment (start 137.287 91.948) (end 137.16 85.344) (width 0.254) (layer Composant) (net 73)) + (segment (start 137.3886 93.726) (end 137.3886 92.3036) (width 0.254) (layer Composant) (net 73) (status 800)) + (segment (start 126.873 86.36) (end 137.033 86.36) (width 0.254) (layer Cuivre) (net 73)) + (via (at 137.16 85.344) (size 0.889) (layers Composant Cuivre) (net 73)) + (segment (start 172.593 83.947) (end 164.846 83.947) (width 0.254) (layer Cuivre) (net 73)) + (segment (start 155.067 83.566) (end 164.465 83.566) (width 0.254) (layer Cuivre) (net 73)) + (segment (start 153.035 85.598) (end 155.067 83.566) (width 0.254) (layer Cuivre) (net 73)) + (segment (start 153.035 85.598) (end 143.637 85.598) (width 0.254) (layer Cuivre) (net 73)) + (segment (start 143.637 85.598) (end 141.859 83.82) (width 0.254) (layer Cuivre) (net 73)) + (segment (start 164.846 83.947) (end 164.465 83.566) (width 0.254) (layer Cuivre) (net 73)) + (segment (start 137.033 86.36) (end 137.16 86.233) (width 0.254) (layer Cuivre) (net 73)) + (segment (start 137.16 86.233) (end 137.16 85.344) (width 0.254) (layer Cuivre) (net 73)) + (segment (start 141.859 83.82) (end 137.922 83.82) (width 0.254) (layer Cuivre) (net 73)) + (segment (start 137.16 84.582) (end 137.16 85.344) (width 0.254) (layer Cuivre) (net 73)) + (segment (start 137.922 83.82) (end 137.16 84.582) (width 0.254) (layer Cuivre) (net 73)) (segment (start 183.515 107.061) (end 183.515 122.047) (width 0.254) (layer GND_layer) (net 74)) - (segment (start 122.174 93.98) (end 122.174 94.488) (width 0.254) (layer GND_layer) (net 75)) - (via (at 122.174 93.98) (size 0.635) (layers Composant Cuivre) (net 75)) - (segment (start 125.603 96.012) (end 125.603 120.015) (width 0.254) (layer GND_layer) (net 75)) - (segment (start 124.841 95.25) (end 125.603 96.012) (width 0.254) (layer GND_layer) (net 75)) - (segment (start 122.936 95.25) (end 124.841 95.25) (width 0.254) (layer GND_layer) (net 75)) - (segment (start 122.174 94.488) (end 122.936 95.25) (width 0.254) (layer GND_layer) (net 75)) - (segment (start 127.254 135.001) (end 127.254 138.176) (width 0.254) (layer GND_layer) (net 75)) - (segment (start 127.254 135.001) (end 126.111 133.858) (width 0.254) (layer GND_layer) (net 75)) - (segment (start 125.4252 97.4852) (end 122.428 94.488) (width 0.254) (layer Composant) (net 75)) - (segment (start 127.635 97.4852) (end 125.4252 97.4852) (width 0.254) (layer Composant) (net 75) (status 800)) - (segment (start 133.858 82.677) (end 134.366 82.55) (width 0.254) (layer Composant) (net 75)) - (segment (start 130.302 86.233) (end 133.858 82.677) (width 0.254) (layer Composant) (net 75)) - (segment (start 128.397 86.233) (end 130.302 86.233) (width 0.254) (layer Composant) (net 75)) - (segment (start 122.174 92.456) (end 128.397 86.233) (width 0.254) (layer Composant) (net 75)) - (segment (start 122.174 93.98) (end 122.174 92.456) (width 0.254) (layer Composant) (net 75)) - (segment (start 126.111 133.858) (end 126.111 120.523) (width 0.254) (layer GND_layer) (net 75)) - (segment (start 127.254 138.176) (end 128.524 139.446) (width 0.254) (layer GND_layer) (net 75) (status 400)) - (segment (start 125.603 120.015) (end 126.111 120.523) (width 0.254) (layer GND_layer) (net 75)) - (via (at 134.366 82.55) (size 0.889) (layers Composant Cuivre) (net 75)) - (segment (start 137.033 80.899) (end 138.303 79.629) (width 0.254) (layer Cuivre) (net 75) (status 400)) - (segment (start 135.128 80.899) (end 137.033 80.899) (width 0.254) (layer Cuivre) (net 75)) - (segment (start 134.366 81.661) (end 135.128 80.899) (width 0.254) (layer Cuivre) (net 75)) - (segment (start 134.366 82.55) (end 134.366 81.661) (width 0.254) (layer Cuivre) (net 75)) + (segment (start 178.943 90.805) (end 180.467 89.281) (width 0.254) (layer GND_layer) (net 74)) + (segment (start 180.467 89.281) (end 180.467 77.216) (width 0.254) (layer GND_layer) (net 74)) + (segment (start 180.467 77.216) (end 178.308 75.057) (width 0.254) (layer GND_layer) (net 74)) + (segment (start 179.959 93.472) (end 178.943 92.456) (width 0.254) (layer GND_layer) (net 74)) + (segment (start 179.959 102.362) (end 179.959 93.472) (width 0.254) (layer GND_layer) (net 74)) + (segment (start 179.705 102.87) (end 179.959 102.362) (width 0.254) (layer GND_layer) (net 74)) + (segment (start 197.28942 89.535) (end 197.485 89.535) (width 0.254) (layer 3.3V_layer) (net 74) (status 400)) + (segment (start 183.95442 102.87) (end 197.28942 89.535) (width 0.254) (layer 3.3V_layer) (net 74)) + (segment (start 179.705 102.87) (end 183.95442 102.87) (width 0.254) (layer 3.3V_layer) (net 74)) + (segment (start 180.24602 102.32898) (end 179.705 102.87) (width 0.254) (layer Composant) (net 74)) + (segment (start 191.62522 102.32898) (end 180.24602 102.32898) (width 0.254) (layer Composant) (net 74)) + (segment (start 194.91706 105.62082) (end 191.62522 102.32898) (width 0.254) (layer Composant) (net 74)) + (segment (start 194.91706 110.12678) (end 194.91706 105.62082) (width 0.254) (layer Composant) (net 74)) + (segment (start 190.9445 111.0107) (end 194.03314 111.0107) (width 0.254) (layer Composant) (net 74) (status 800)) + (segment (start 194.03314 111.0107) (end 194.91706 110.12678) (width 0.254) (layer Composant) (net 74)) + (segment (start 151.638 83.82) (end 151.511 83.947) (width 0.254) (layer Cuivre) (net 74)) + (via (at 151.511 83.947) (size 0.889) (layers Composant Cuivre) (net 74)) + (segment (start 151.511 83.947) (end 151.4475 83.8835) (width 0.254) (layer Composant) (net 74)) + (segment (start 151.4475 83.8835) (end 150.8125 83.8835) (width 0.254) (layer Composant) (net 74)) + (segment (start 152.4 83.82) (end 151.638 83.82) (width 0.254) (layer Cuivre) (net 74)) + (via (at 179.705 102.87) (size 0.889) (layers Composant Cuivre) (net 74)) + (segment (start 139.8905 92.3036) (end 139.827 91.948) (width 0.254) (layer Composant) (net 74)) + (segment (start 139.827 91.948) (end 139.827 88.519) (width 0.254) (layer Composant) (net 74)) + (segment (start 139.827 88.519) (end 140.208 88.138) (width 0.254) (layer Composant) (net 74)) + (segment (start 140.208 88.138) (end 143.002 88.138) (width 0.254) (layer Composant) (net 74)) + (segment (start 143.002 88.138) (end 143.383 87.757) (width 0.254) (layer Composant) (net 74)) + (segment (start 143.383 87.757) (end 143.383 84.074) (width 0.254) (layer Composant) (net 74)) + (segment (start 143.383 84.074) (end 144.145 83.312) (width 0.254) (layer Composant) (net 74)) + (segment (start 144.145 83.312) (end 150.241 83.312) (width 0.254) (layer Composant) (net 74)) + (segment (start 150.241 83.312) (end 150.8125 83.8835) (width 0.254) (layer Composant) (net 74)) + (segment (start 139.8778 93.726) (end 139.8905 92.3036) (width 0.254) (layer Composant) (net 74) (status 800)) + (segment (start 170.815 80.899) (end 165.862 80.899) (width 0.254) (layer Cuivre) (net 74)) + (segment (start 164.973 81.788) (end 165.862 80.899) (width 0.254) (layer Cuivre) (net 74)) + (segment (start 154.432 81.788) (end 164.973 81.788) (width 0.254) (layer Cuivre) (net 74)) + (segment (start 152.4 83.82) (end 154.432 81.788) (width 0.254) (layer Cuivre) (net 74)) + (segment (start 172.085 79.629) (end 170.815 80.899) (width 0.254) (layer Cuivre) (net 74) (status 800)) + (segment (start 179.705 104.394) (end 179.705 102.87) (width 0.254) (layer GND_layer) (net 74)) + (segment (start 181.102 105.791) (end 179.705 104.394) (width 0.254) (layer GND_layer) (net 74)) + (segment (start 182.245 105.791) (end 181.102 105.791) (width 0.254) (layer GND_layer) (net 74)) + (segment (start 183.515 107.061) (end 182.245 105.791) (width 0.254) (layer GND_layer) (net 74)) + (segment (start 174.244 131.318) (end 183.515 122.047) (width 0.254) (layer GND_layer) (net 74)) + (segment (start 174.244 131.318) (end 174.244 136.906) (width 0.254) (layer GND_layer) (net 74) (status 400)) + (segment (start 176.657 75.057) (end 172.085 79.629) (width 0.254) (layer GND_layer) (net 74) (status 400)) + (segment (start 178.308 75.057) (end 176.657 75.057) (width 0.254) (layer GND_layer) (net 74)) + (segment (start 178.943 92.456) (end 178.943 90.805) (width 0.254) (layer GND_layer) (net 74)) (segment (start 122.428 94.488) (end 122.174 93.98) (width 0.254) (layer Composant) (net 75)) - (segment (start 174.117 83.947) (end 177.419 83.947) (width 0.254) (layer Cuivre) (net 76)) - (segment (start 193.929 78.359) (end 198.755 78.359) (width 0.254) (layer Cuivre) (net 76)) - (segment (start 198.755 78.359) (end 200.025 77.089) (width 0.254) (layer Cuivre) (net 76) (status 400)) - (segment (start 138.3792 93.726) (end 138.3919 92.3036) (width 0.254) (layer Composant) (net 76) (status 800)) - (segment (start 138.3919 92.3036) (end 138.303 91.948) (width 0.254) (layer Composant) (net 76)) - (segment (start 138.303 91.948) (end 138.303 87.503) (width 0.254) (layer Composant) (net 76)) - (segment (start 138.303 87.503) (end 139.065 86.741) (width 0.254) (layer Composant) (net 76)) - (segment (start 139.065 86.741) (end 139.065 85.598) (width 0.254) (layer Composant) (net 76)) - (via (at 139.065 85.598) (size 0.635) (layers Composant Cuivre) (net 76)) - (segment (start 129.413 132.08) (end 128.27 130.937) (width 0.254) (layer GND_layer) (net 76)) - (segment (start 128.27 118.999) (end 128.27 130.937) (width 0.254) (layer GND_layer) (net 76)) - (segment (start 121.793 85.598) (end 121.793 86.995) (width 0.254) (layer GND_layer) (net 76)) - (segment (start 178.435 84.963) (end 187.325 84.963) (width 0.254) (layer Cuivre) (net 76)) - (segment (start 177.419 83.947) (end 178.435 84.963) (width 0.254) (layer Cuivre) (net 76)) - (segment (start 173.101 84.963) (end 174.117 83.947) (width 0.254) (layer Cuivre) (net 76)) - (segment (start 155.194 84.963) (end 173.101 84.963) (width 0.254) (layer Cuivre) (net 76)) - (segment (start 153.543 86.614) (end 155.194 84.963) (width 0.254) (layer Cuivre) (net 76)) - (segment (start 143.129 86.614) (end 153.543 86.614) (width 0.254) (layer Cuivre) (net 76)) - (via (at 121.793 85.598) (size 0.889) (layers Composant Cuivre) (net 76)) - (segment (start 139.065 86.106) (end 139.065 85.598) (width 0.254) (layer Cuivre) (net 76)) - (segment (start 137.795 87.376) (end 139.065 86.106) (width 0.254) (layer Cuivre) (net 76)) - (segment (start 122.428 87.376) (end 137.795 87.376) (width 0.254) (layer Cuivre) (net 76)) - (segment (start 121.793 86.741) (end 122.428 87.376) (width 0.254) (layer Cuivre) (net 76)) - (segment (start 121.793 85.598) (end 121.793 86.741) (width 0.254) (layer Cuivre) (net 76)) - (segment (start 127.127 117.856) (end 128.27 118.999) (width 0.254) (layer GND_layer) (net 76)) - (segment (start 127.127 90.17) (end 127.127 117.856) (width 0.254) (layer GND_layer) (net 76)) - (segment (start 124.714 87.757) (end 127.127 90.17) (width 0.254) (layer GND_layer) (net 76)) - (segment (start 122.555 87.757) (end 124.714 87.757) (width 0.254) (layer GND_layer) (net 76)) - (segment (start 121.793 86.995) (end 122.555 87.757) (width 0.254) (layer GND_layer) (net 76)) - (segment (start 129.413 132.08) (end 129.413 134.239) (width 0.254) (layer GND_layer) (net 76)) - (segment (start 129.413 134.239) (end 131.064 135.89) (width 0.254) (layer GND_layer) (net 76)) - (segment (start 131.064 135.89) (end 131.064 136.906) (width 0.254) (layer GND_layer) (net 76) (status 400)) - (segment (start 139.065 85.598) (end 139.065 85.217) (width 0.254) (layer Cuivre) (net 76)) - (segment (start 139.065 85.217) (end 139.446 84.836) (width 0.254) (layer Cuivre) (net 76)) - (segment (start 139.446 84.836) (end 141.351 84.836) (width 0.254) (layer Cuivre) (net 76)) - (segment (start 141.351 84.836) (end 143.129 86.614) (width 0.254) (layer Cuivre) (net 76)) + (segment (start 134.366 82.55) (end 134.366 81.661) (width 0.254) (layer Cuivre) (net 75)) + (segment (start 134.366 81.661) (end 135.128 80.899) (width 0.254) (layer Cuivre) (net 75)) + (segment (start 135.128 80.899) (end 137.033 80.899) (width 0.254) (layer Cuivre) (net 75)) + (segment (start 137.033 80.899) (end 138.303 79.629) (width 0.254) (layer Cuivre) (net 75) (status 400)) + (via (at 134.366 82.55) (size 0.889) (layers Composant Cuivre) (net 75)) + (segment (start 125.603 120.015) (end 126.111 120.523) (width 0.254) (layer GND_layer) (net 75)) + (segment (start 127.254 138.176) (end 128.524 139.446) (width 0.254) (layer GND_layer) (net 75) (status 400)) + (segment (start 126.111 133.858) (end 126.111 120.523) (width 0.254) (layer GND_layer) (net 75)) + (segment (start 122.174 93.98) (end 122.174 92.456) (width 0.254) (layer Composant) (net 75)) + (segment (start 122.174 92.456) (end 128.397 86.233) (width 0.254) (layer Composant) (net 75)) + (segment (start 128.397 86.233) (end 130.302 86.233) (width 0.254) (layer Composant) (net 75)) + (segment (start 130.302 86.233) (end 133.858 82.677) (width 0.254) (layer Composant) (net 75)) + (segment (start 133.858 82.677) (end 134.366 82.55) (width 0.254) (layer Composant) (net 75)) + (segment (start 127.635 97.4852) (end 125.4252 97.4852) (width 0.254) (layer Composant) (net 75) (status 800)) + (segment (start 125.4252 97.4852) (end 122.428 94.488) (width 0.254) (layer Composant) (net 75)) + (segment (start 127.254 135.001) (end 126.111 133.858) (width 0.254) (layer GND_layer) (net 75)) + (segment (start 127.254 135.001) (end 127.254 138.176) (width 0.254) (layer GND_layer) (net 75)) + (segment (start 122.174 94.488) (end 122.936 95.25) (width 0.254) (layer GND_layer) (net 75)) + (segment (start 122.936 95.25) (end 124.841 95.25) (width 0.254) (layer GND_layer) (net 75)) + (segment (start 124.841 95.25) (end 125.603 96.012) (width 0.254) (layer GND_layer) (net 75)) + (segment (start 125.603 96.012) (end 125.603 120.015) (width 0.254) (layer GND_layer) (net 75)) + (via (at 122.174 93.98) (size 0.635) (layers Composant Cuivre) (net 75)) + (segment (start 122.174 93.98) (end 122.174 94.488) (width 0.254) (layer GND_layer) (net 75)) (segment (start 187.325 84.963) (end 193.929 78.359) (width 0.254) (layer Cuivre) (net 76)) - (segment (start 145.161 91.567) (end 145.161 94.234) (width 0.254) (layer Composant) (net 77)) - (segment (start 145.161 94.234) (end 143.9164 95.4786) (width 0.254) (layer Composant) (net 77)) - (segment (start 143.9164 95.4786) (end 143.129 95.4786) (width 0.254) (layer Composant) (net 77) (status 400)) - (via (at 148.844 84.836) (size 0.889) (layers Composant Cuivre) (net 77)) - (segment (start 148.844 84.836) (end 149.14452 85.13652) (width 0.254) (layer Cuivre) (net 77)) - (segment (start 150.749 83.312) (end 153.289 80.772) (width 0.254) (layer Cuivre) (net 77)) - (segment (start 150.749 84.455) (end 150.749 83.312) (width 0.254) (layer Cuivre) (net 77)) - (segment (start 150.06748 85.13652) (end 150.749 84.455) (width 0.254) (layer Cuivre) (net 77)) - (segment (start 149.14452 85.13652) (end 150.06748 85.13652) (width 0.254) (layer Cuivre) (net 77)) - (segment (start 185.42 106.426) (end 185.42 121.92) (width 0.254) (layer GND_layer) (net 77)) - (segment (start 181.483 102.489) (end 185.42 106.426) (width 0.254) (layer GND_layer) (net 77)) - (segment (start 181.483 91.44) (end 181.483 102.489) (width 0.254) (layer GND_layer) (net 77)) - (segment (start 180.975 90.932) (end 181.483 91.44) (width 0.254) (layer GND_layer) (net 77)) - (segment (start 180.975 76.708) (end 180.975 90.932) (width 0.254) (layer GND_layer) (net 77)) - (segment (start 178.562 74.295) (end 180.975 76.708) (width 0.254) (layer GND_layer) (net 77)) - (segment (start 174.879 74.295) (end 178.562 74.295) (width 0.254) (layer GND_layer) (net 77)) - (segment (start 172.085 77.089) (end 174.879 74.295) (width 0.254) (layer GND_layer) (net 77) (status 800)) - (segment (start 170.815 78.359) (end 172.085 77.089) (width 0.254) (layer Cuivre) (net 77) (status 400)) - (segment (start 167.386 78.359) (end 170.815 78.359) (width 0.254) (layer Cuivre) (net 77)) - (segment (start 164.973 80.772) (end 167.386 78.359) (width 0.254) (layer Cuivre) (net 77)) - (segment (start 153.289 80.772) (end 164.973 80.772) (width 0.254) (layer Cuivre) (net 77)) - (segment (start 176.784 130.556) (end 176.784 136.906) (width 0.254) (layer GND_layer) (net 77) (status 400)) - (segment (start 148.844 84.836) (end 148.844 87.884) (width 0.254) (layer Composant) (net 77)) - (segment (start 176.784 130.556) (end 185.42 121.92) (width 0.254) (layer GND_layer) (net 77)) + (segment (start 141.351 84.836) (end 143.129 86.614) (width 0.254) (layer Cuivre) (net 76)) + (segment (start 139.446 84.836) (end 141.351 84.836) (width 0.254) (layer Cuivre) (net 76)) + (segment (start 139.065 85.217) (end 139.446 84.836) (width 0.254) (layer Cuivre) (net 76)) + (segment (start 139.065 85.598) (end 139.065 85.217) (width 0.254) (layer Cuivre) (net 76)) + (segment (start 131.064 135.89) (end 131.064 136.906) (width 0.254) (layer GND_layer) (net 76) (status 400)) + (segment (start 129.413 134.239) (end 131.064 135.89) (width 0.254) (layer GND_layer) (net 76)) + (segment (start 129.413 132.08) (end 129.413 134.239) (width 0.254) (layer GND_layer) (net 76)) + (segment (start 121.793 86.995) (end 122.555 87.757) (width 0.254) (layer GND_layer) (net 76)) + (segment (start 122.555 87.757) (end 124.714 87.757) (width 0.254) (layer GND_layer) (net 76)) + (segment (start 124.714 87.757) (end 127.127 90.17) (width 0.254) (layer GND_layer) (net 76)) + (segment (start 127.127 90.17) (end 127.127 117.856) (width 0.254) (layer GND_layer) (net 76)) + (segment (start 127.127 117.856) (end 128.27 118.999) (width 0.254) (layer GND_layer) (net 76)) + (segment (start 121.793 85.598) (end 121.793 86.741) (width 0.254) (layer Cuivre) (net 76)) + (segment (start 121.793 86.741) (end 122.428 87.376) (width 0.254) (layer Cuivre) (net 76)) + (segment (start 122.428 87.376) (end 137.795 87.376) (width 0.254) (layer Cuivre) (net 76)) + (segment (start 137.795 87.376) (end 139.065 86.106) (width 0.254) (layer Cuivre) (net 76)) + (segment (start 139.065 86.106) (end 139.065 85.598) (width 0.254) (layer Cuivre) (net 76)) + (via (at 121.793 85.598) (size 0.889) (layers Composant Cuivre) (net 76)) + (segment (start 143.129 86.614) (end 153.543 86.614) (width 0.254) (layer Cuivre) (net 76)) + (segment (start 153.543 86.614) (end 155.194 84.963) (width 0.254) (layer Cuivre) (net 76)) + (segment (start 155.194 84.963) (end 173.101 84.963) (width 0.254) (layer Cuivre) (net 76)) + (segment (start 173.101 84.963) (end 174.117 83.947) (width 0.254) (layer Cuivre) (net 76)) + (segment (start 177.419 83.947) (end 178.435 84.963) (width 0.254) (layer Cuivre) (net 76)) + (segment (start 178.435 84.963) (end 187.325 84.963) (width 0.254) (layer Cuivre) (net 76)) + (segment (start 121.793 85.598) (end 121.793 86.995) (width 0.254) (layer GND_layer) (net 76)) + (segment (start 128.27 118.999) (end 128.27 130.937) (width 0.254) (layer GND_layer) (net 76)) + (segment (start 129.413 132.08) (end 128.27 130.937) (width 0.254) (layer GND_layer) (net 76)) + (via (at 139.065 85.598) (size 0.635) (layers Composant Cuivre) (net 76)) + (segment (start 139.065 86.741) (end 139.065 85.598) (width 0.254) (layer Composant) (net 76)) + (segment (start 138.303 87.503) (end 139.065 86.741) (width 0.254) (layer Composant) (net 76)) + (segment (start 138.303 91.948) (end 138.303 87.503) (width 0.254) (layer Composant) (net 76)) + (segment (start 138.3919 92.3036) (end 138.303 91.948) (width 0.254) (layer Composant) (net 76)) + (segment (start 138.3792 93.726) (end 138.3919 92.3036) (width 0.254) (layer Composant) (net 76) (status 800)) + (segment (start 198.755 78.359) (end 200.025 77.089) (width 0.254) (layer Cuivre) (net 76) (status 400)) + (segment (start 193.929 78.359) (end 198.755 78.359) (width 0.254) (layer Cuivre) (net 76)) + (segment (start 174.117 83.947) (end 177.419 83.947) (width 0.254) (layer Cuivre) (net 76)) (segment (start 148.844 87.884) (end 145.161 91.567) (width 0.254) (layer Composant) (net 77)) - (segment (start 125.095 101.981) (end 122.174 104.902) (width 0.254) (layer GND_layer) (net 78)) - (segment (start 124.46 95.758) (end 125.095 96.393) (width 0.254) (layer GND_layer) (net 78)) - (segment (start 125.349 132.588) (end 125.349 135.255) (width 0.254) (layer GND_layer) (net 78)) - (segment (start 123.952 93.98) (end 123.952 94.488) (width 0.254) (layer Composant) (net 78)) - (segment (start 139.446 78.232) (end 139.446 82.677) (width 0.254) (layer Composant) (net 78)) - (segment (start 122.555 95.758) (end 124.46 95.758) (width 0.254) (layer GND_layer) (net 78)) - (segment (start 121.412 94.615) (end 122.555 95.758) (width 0.254) (layer GND_layer) (net 78)) - (segment (start 121.412 93.599) (end 121.412 94.615) (width 0.254) (layer GND_layer) (net 78)) - (segment (start 121.92 93.091) (end 121.412 93.599) (width 0.254) (layer GND_layer) (net 78)) - (segment (start 138.303 77.089) (end 139.446 78.232) (width 0.254) (layer Composant) (net 78) (status 800)) - (segment (start 139.446 82.677) (end 138.303 83.82) (width 0.254) (layer Composant) (net 78)) - (segment (start 138.303 83.82) (end 134.239 83.82) (width 0.254) (layer Composant) (net 78)) - (segment (start 123.571 93.091) (end 121.92 93.091) (width 0.254) (layer GND_layer) (net 78)) - (segment (start 123.952 93.472) (end 123.571 93.091) (width 0.254) (layer GND_layer) (net 78)) - (segment (start 123.952 93.98) (end 123.952 93.472) (width 0.254) (layer GND_layer) (net 78)) - (segment (start 123.952 92.202) (end 123.952 93.98) (width 0.254) (layer Composant) (net 78)) - (segment (start 128.905 87.249) (end 123.952 92.202) (width 0.254) (layer Composant) (net 78)) - (segment (start 130.81 87.249) (end 128.905 87.249) (width 0.254) (layer Composant) (net 78)) - (segment (start 134.239 83.82) (end 130.81 87.249) (width 0.254) (layer Composant) (net 78)) - (segment (start 125.095 96.393) (end 125.095 101.981) (width 0.254) (layer GND_layer) (net 78)) - (segment (start 122.174 104.902) (end 122.174 113.93932) (width 0.254) (layer GND_layer) (net 78)) - (segment (start 123.952 94.488) (end 125.9078 96.4438) (width 0.254) (layer Composant) (net 78)) - (segment (start 125.9078 96.4438) (end 127.635 96.4692) (width 0.254) (layer Composant) (net 78) (status 400)) - (via (at 123.952 93.98) (size 0.635) (layers Composant Cuivre) (net 78)) - (segment (start 125.984 136.906) (end 125.984 135.89) (width 0.254) (layer GND_layer) (net 78) (status 800)) - (segment (start 125.984 135.89) (end 125.349 135.255) (width 0.254) (layer GND_layer) (net 78)) - (segment (start 121.158 128.397) (end 125.349 132.588) (width 0.254) (layer GND_layer) (net 78)) - (segment (start 121.158 114.95532) (end 121.158 128.397) (width 0.254) (layer GND_layer) (net 78)) + (segment (start 176.784 130.556) (end 185.42 121.92) (width 0.254) (layer GND_layer) (net 77)) + (segment (start 148.844 84.836) (end 148.844 87.884) (width 0.254) (layer Composant) (net 77)) + (segment (start 176.784 130.556) (end 176.784 136.906) (width 0.254) (layer GND_layer) (net 77) (status 400)) + (segment (start 153.289 80.772) (end 164.973 80.772) (width 0.254) (layer Cuivre) (net 77)) + (segment (start 164.973 80.772) (end 167.386 78.359) (width 0.254) (layer Cuivre) (net 77)) + (segment (start 167.386 78.359) (end 170.815 78.359) (width 0.254) (layer Cuivre) (net 77)) + (segment (start 170.815 78.359) (end 172.085 77.089) (width 0.254) (layer Cuivre) (net 77) (status 400)) + (segment (start 172.085 77.089) (end 174.879 74.295) (width 0.254) (layer GND_layer) (net 77) (status 800)) + (segment (start 174.879 74.295) (end 178.562 74.295) (width 0.254) (layer GND_layer) (net 77)) + (segment (start 178.562 74.295) (end 180.975 76.708) (width 0.254) (layer GND_layer) (net 77)) + (segment (start 180.975 76.708) (end 180.975 90.932) (width 0.254) (layer GND_layer) (net 77)) + (segment (start 180.975 90.932) (end 181.483 91.44) (width 0.254) (layer GND_layer) (net 77)) + (segment (start 181.483 91.44) (end 181.483 102.489) (width 0.254) (layer GND_layer) (net 77)) + (segment (start 181.483 102.489) (end 185.42 106.426) (width 0.254) (layer GND_layer) (net 77)) + (segment (start 185.42 106.426) (end 185.42 121.92) (width 0.254) (layer GND_layer) (net 77)) + (segment (start 149.14452 85.13652) (end 150.06748 85.13652) (width 0.254) (layer Cuivre) (net 77)) + (segment (start 150.06748 85.13652) (end 150.749 84.455) (width 0.254) (layer Cuivre) (net 77)) + (segment (start 150.749 84.455) (end 150.749 83.312) (width 0.254) (layer Cuivre) (net 77)) + (segment (start 150.749 83.312) (end 153.289 80.772) (width 0.254) (layer Cuivre) (net 77)) + (segment (start 148.844 84.836) (end 149.14452 85.13652) (width 0.254) (layer Cuivre) (net 77)) + (via (at 148.844 84.836) (size 0.889) (layers Composant Cuivre) (net 77)) + (segment (start 143.9164 95.4786) (end 143.129 95.4786) (width 0.254) (layer Composant) (net 77) (status 400)) + (segment (start 145.161 94.234) (end 143.9164 95.4786) (width 0.254) (layer Composant) (net 77)) + (segment (start 145.161 91.567) (end 145.161 94.234) (width 0.254) (layer Composant) (net 77)) (segment (start 121.158 114.95532) (end 122.174 113.93932) (width 0.254) (layer GND_layer) (net 78)) - (segment (start 128.143 107.95) (end 129.9845 109.7915) (width 0.254) (layer GND_layer) (net 79)) - (segment (start 128.143 88.9) (end 128.143 107.95) (width 0.254) (layer GND_layer) (net 79)) - (segment (start 137.414 86.868) (end 138.176 86.106) (width 0.254) (layer Cuivre) (net 79)) - (segment (start 124.587 85.852) (end 125.095 85.852) (width 0.254) (layer GND_layer) (net 79)) - (segment (start 198.755 75.819) (end 200.025 74.549) (width 0.254) (layer Cuivre) (net 79) (status 400)) - (segment (start 195.199 75.819) (end 198.755 75.819) (width 0.254) (layer Cuivre) (net 79)) - (segment (start 186.563 84.455) (end 195.199 75.819) (width 0.254) (layer Cuivre) (net 79)) - (segment (start 178.816 84.455) (end 186.563 84.455) (width 0.254) (layer Cuivre) (net 79)) - (segment (start 177.673 83.312) (end 178.816 84.455) (width 0.254) (layer Cuivre) (net 79)) - (segment (start 173.99 83.312) (end 177.673 83.312) (width 0.254) (layer Cuivre) (net 79)) - (segment (start 172.847 84.455) (end 173.99 83.312) (width 0.254) (layer Cuivre) (net 79)) - (segment (start 154.94 84.455) (end 172.847 84.455) (width 0.254) (layer Cuivre) (net 79)) - (segment (start 153.289 86.106) (end 154.94 84.455) (width 0.254) (layer Cuivre) (net 79)) - (segment (start 143.383 86.106) (end 153.289 86.106) (width 0.254) (layer Cuivre) (net 79)) - (segment (start 125.222 86.868) (end 137.414 86.868) (width 0.254) (layer Cuivre) (net 79)) - (segment (start 139.065 84.328) (end 141.605 84.328) (width 0.254) (layer Cuivre) (net 79)) - (segment (start 138.176 85.217) (end 139.065 84.328) (width 0.254) (layer Cuivre) (net 79)) - (segment (start 138.176 86.106) (end 138.176 85.598) (width 0.254) (layer Cuivre) (net 79)) - (segment (start 137.8712 93.726) (end 137.8839 92.3036) (width 0.254) (layer Composant) (net 79) (status 800)) - (segment (start 137.8839 92.3036) (end 137.795 91.948) (width 0.254) (layer Composant) (net 79)) - (segment (start 137.795 91.948) (end 137.795 86.995) (width 0.254) (layer Composant) (net 79)) - (segment (start 137.795 86.995) (end 138.176 86.614) (width 0.254) (layer Composant) (net 79)) - (segment (start 138.176 85.598) (end 138.176 85.217) (width 0.254) (layer Cuivre) (net 79)) - (segment (start 138.176 86.614) (end 138.176 85.598) (width 0.254) (layer Composant) (net 79)) - (via (at 138.176 85.598) (size 0.635) (layers Composant Cuivre) (net 79)) - (via (at 124.587 85.852) (size 0.889) (layers Composant Cuivre) (net 79)) - (segment (start 129.9845 109.7915) (end 129.9845 129.4765) (width 0.254) (layer GND_layer) (net 79)) - (segment (start 129.9845 129.4765) (end 130.429 129.921) (width 0.254) (layer GND_layer) (net 79)) - (segment (start 130.429 133.731) (end 133.604 136.906) (width 0.254) (layer GND_layer) (net 79) (status 400)) - (segment (start 124.587 85.852) (end 124.587 86.233) (width 0.254) (layer Cuivre) (net 79)) - (segment (start 124.587 86.233) (end 125.222 86.868) (width 0.254) (layer Cuivre) (net 79)) - (segment (start 125.095 85.852) (end 128.143 88.9) (width 0.254) (layer GND_layer) (net 79)) - (segment (start 141.605 84.328) (end 143.383 86.106) (width 0.254) (layer Cuivre) (net 79)) + (segment (start 121.158 114.95532) (end 121.158 128.397) (width 0.254) (layer GND_layer) (net 78)) + (segment (start 121.158 128.397) (end 125.349 132.588) (width 0.254) (layer GND_layer) (net 78)) + (segment (start 125.984 135.89) (end 125.349 135.255) (width 0.254) (layer GND_layer) (net 78)) + (segment (start 125.984 136.906) (end 125.984 135.89) (width 0.254) (layer GND_layer) (net 78) (status 800)) + (via (at 123.952 93.98) (size 0.635) (layers Composant Cuivre) (net 78)) + (segment (start 125.9078 96.4438) (end 127.635 96.4692) (width 0.254) (layer Composant) (net 78) (status 400)) + (segment (start 123.952 94.488) (end 125.9078 96.4438) (width 0.254) (layer Composant) (net 78)) + (segment (start 122.174 104.902) (end 122.174 113.93932) (width 0.254) (layer GND_layer) (net 78)) + (segment (start 125.095 96.393) (end 125.095 101.981) (width 0.254) (layer GND_layer) (net 78)) + (segment (start 134.239 83.82) (end 130.81 87.249) (width 0.254) (layer Composant) (net 78)) + (segment (start 130.81 87.249) (end 128.905 87.249) (width 0.254) (layer Composant) (net 78)) + (segment (start 128.905 87.249) (end 123.952 92.202) (width 0.254) (layer Composant) (net 78)) + (segment (start 123.952 92.202) (end 123.952 93.98) (width 0.254) (layer Composant) (net 78)) + (segment (start 123.952 93.98) (end 123.952 93.472) (width 0.254) (layer GND_layer) (net 78)) + (segment (start 123.952 93.472) (end 123.571 93.091) (width 0.254) (layer GND_layer) (net 78)) + (segment (start 123.571 93.091) (end 121.92 93.091) (width 0.254) (layer GND_layer) (net 78)) + (segment (start 138.303 83.82) (end 134.239 83.82) (width 0.254) (layer Composant) (net 78)) + (segment (start 139.446 82.677) (end 138.303 83.82) (width 0.254) (layer Composant) (net 78)) + (segment (start 138.303 77.089) (end 139.446 78.232) (width 0.254) (layer Composant) (net 78) (status 800)) + (segment (start 121.92 93.091) (end 121.412 93.599) (width 0.254) (layer GND_layer) (net 78)) + (segment (start 121.412 93.599) (end 121.412 94.615) (width 0.254) (layer GND_layer) (net 78)) + (segment (start 121.412 94.615) (end 122.555 95.758) (width 0.254) (layer GND_layer) (net 78)) + (segment (start 122.555 95.758) (end 124.46 95.758) (width 0.254) (layer GND_layer) (net 78)) + (segment (start 139.446 78.232) (end 139.446 82.677) (width 0.254) (layer Composant) (net 78)) + (segment (start 123.952 93.98) (end 123.952 94.488) (width 0.254) (layer Composant) (net 78)) + (segment (start 125.349 132.588) (end 125.349 135.255) (width 0.254) (layer GND_layer) (net 78)) + (segment (start 124.46 95.758) (end 125.095 96.393) (width 0.254) (layer GND_layer) (net 78)) + (segment (start 125.095 101.981) (end 122.174 104.902) (width 0.254) (layer GND_layer) (net 78)) (segment (start 130.429 129.921) (end 130.429 133.731) (width 0.254) (layer GND_layer) (net 79)) - (segment (start 179.324 130.048) (end 179.324 136.906) (width 0.254) (layer GND_layer) (net 80) (status 400)) - (segment (start 149.86 84.201) (end 149.86 87.63) (width 0.254) (layer Composant) (net 80)) - (segment (start 149.86 87.63) (end 145.669 91.821) (width 0.254) (layer Composant) (net 80)) - (segment (start 183.134 102.616) (end 186.436 105.918) (width 0.254) (layer GND_layer) (net 80)) - (segment (start 145.669 91.821) (end 145.669 94.742) (width 0.254) (layer Composant) (net 80)) - (segment (start 149.86 82.804) (end 149.86 84.201) (width 0.254) (layer Cuivre) (net 80)) - (segment (start 144.4498 95.9612) (end 143.129 95.9612) (width 0.254) (layer Composant) (net 80) (status 400)) - (via (at 149.86 84.201) (size 0.889) (layers Composant Cuivre) (net 80)) - (segment (start 145.669 94.742) (end 144.4498 95.9612) (width 0.254) (layer Composant) (net 80)) - (segment (start 152.654 80.01) (end 164.719 80.01) (width 0.254) (layer Cuivre) (net 80)) - (segment (start 164.719 80.01) (end 168.91 75.819) (width 0.254) (layer Cuivre) (net 80)) - (segment (start 168.91 75.819) (end 170.815 75.819) (width 0.254) (layer Cuivre) (net 80)) - (segment (start 170.815 75.819) (end 172.085 74.549) (width 0.254) (layer Cuivre) (net 80) (status 400)) - (segment (start 172.085 74.549) (end 174.117 72.517) (width 0.254) (layer GND_layer) (net 80) (status 800)) - (segment (start 174.117 72.517) (end 178.562 72.517) (width 0.254) (layer GND_layer) (net 80)) - (segment (start 178.562 72.517) (end 183.134 77.089) (width 0.254) (layer GND_layer) (net 80)) - (segment (start 183.134 77.089) (end 183.134 102.616) (width 0.254) (layer GND_layer) (net 80)) - (segment (start 179.324 130.048) (end 186.436 122.936) (width 0.254) (layer GND_layer) (net 80)) - (segment (start 186.436 105.918) (end 186.436 122.936) (width 0.254) (layer GND_layer) (net 80)) + (segment (start 141.605 84.328) (end 143.383 86.106) (width 0.254) (layer Cuivre) (net 79)) + (segment (start 125.095 85.852) (end 128.143 88.9) (width 0.254) (layer GND_layer) (net 79)) + (segment (start 124.587 86.233) (end 125.222 86.868) (width 0.254) (layer Cuivre) (net 79)) + (segment (start 124.587 85.852) (end 124.587 86.233) (width 0.254) (layer Cuivre) (net 79)) + (segment (start 130.429 133.731) (end 133.604 136.906) (width 0.254) (layer GND_layer) (net 79) (status 400)) + (segment (start 129.9845 129.4765) (end 130.429 129.921) (width 0.254) (layer GND_layer) (net 79)) + (segment (start 129.9845 109.7915) (end 129.9845 129.4765) (width 0.254) (layer GND_layer) (net 79)) + (via (at 124.587 85.852) (size 0.889) (layers Composant Cuivre) (net 79)) + (via (at 138.176 85.598) (size 0.635) (layers Composant Cuivre) (net 79)) + (segment (start 138.176 86.614) (end 138.176 85.598) (width 0.254) (layer Composant) (net 79)) + (segment (start 138.176 85.598) (end 138.176 85.217) (width 0.254) (layer Cuivre) (net 79)) + (segment (start 137.795 86.995) (end 138.176 86.614) (width 0.254) (layer Composant) (net 79)) + (segment (start 137.795 91.948) (end 137.795 86.995) (width 0.254) (layer Composant) (net 79)) + (segment (start 137.8839 92.3036) (end 137.795 91.948) (width 0.254) (layer Composant) (net 79)) + (segment (start 137.8712 93.726) (end 137.8839 92.3036) (width 0.254) (layer Composant) (net 79) (status 800)) + (segment (start 138.176 86.106) (end 138.176 85.598) (width 0.254) (layer Cuivre) (net 79)) + (segment (start 138.176 85.217) (end 139.065 84.328) (width 0.254) (layer Cuivre) (net 79)) + (segment (start 139.065 84.328) (end 141.605 84.328) (width 0.254) (layer Cuivre) (net 79)) + (segment (start 125.222 86.868) (end 137.414 86.868) (width 0.254) (layer Cuivre) (net 79)) + (segment (start 143.383 86.106) (end 153.289 86.106) (width 0.254) (layer Cuivre) (net 79)) + (segment (start 153.289 86.106) (end 154.94 84.455) (width 0.254) (layer Cuivre) (net 79)) + (segment (start 154.94 84.455) (end 172.847 84.455) (width 0.254) (layer Cuivre) (net 79)) + (segment (start 172.847 84.455) (end 173.99 83.312) (width 0.254) (layer Cuivre) (net 79)) + (segment (start 173.99 83.312) (end 177.673 83.312) (width 0.254) (layer Cuivre) (net 79)) + (segment (start 177.673 83.312) (end 178.816 84.455) (width 0.254) (layer Cuivre) (net 79)) + (segment (start 178.816 84.455) (end 186.563 84.455) (width 0.254) (layer Cuivre) (net 79)) + (segment (start 186.563 84.455) (end 195.199 75.819) (width 0.254) (layer Cuivre) (net 79)) + (segment (start 195.199 75.819) (end 198.755 75.819) (width 0.254) (layer Cuivre) (net 79)) + (segment (start 198.755 75.819) (end 200.025 74.549) (width 0.254) (layer Cuivre) (net 79) (status 400)) + (segment (start 124.587 85.852) (end 125.095 85.852) (width 0.254) (layer GND_layer) (net 79)) + (segment (start 137.414 86.868) (end 138.176 86.106) (width 0.254) (layer Cuivre) (net 79)) + (segment (start 128.143 88.9) (end 128.143 107.95) (width 0.254) (layer GND_layer) (net 79)) + (segment (start 128.143 107.95) (end 129.9845 109.7915) (width 0.254) (layer GND_layer) (net 79)) (segment (start 152.654 80.01) (end 149.86 82.804) (width 0.254) (layer Cuivre) (net 80)) - (segment (start 128.143 135.382) (end 128.524 135.763) (width 0.254) (layer GND_layer) (net 81)) - (segment (start 128.524 135.763) (end 128.524 136.906) (width 0.254) (layer GND_layer) (net 81) (status 400)) - (segment (start 128.143 133.985) (end 128.143 135.382) (width 0.254) (layer GND_layer) (net 81)) - (segment (start 137.033 75.819) (end 138.303 74.549) (width 0.254) (layer Composant) (net 81) (status 400)) - (segment (start 137.033 82.55) (end 137.033 75.819) (width 0.254) (layer Composant) (net 81)) - (segment (start 136.271 83.312) (end 137.033 82.55) (width 0.254) (layer Composant) (net 81)) - (segment (start 133.985 83.312) (end 136.271 83.312) (width 0.254) (layer Composant) (net 81)) - (segment (start 130.556 86.741) (end 133.985 83.312) (width 0.254) (layer Composant) (net 81)) - (segment (start 128.651 86.741) (end 130.556 86.741) (width 0.254) (layer Composant) (net 81)) - (segment (start 123.063 92.329) (end 128.651 86.741) (width 0.254) (layer Composant) (net 81)) - (segment (start 125.6792 96.9772) (end 127.635 96.9772) (width 0.254) (layer Composant) (net 81) (status 400)) - (segment (start 128.143 133.985) (end 126.873 132.715) (width 0.254) (layer GND_layer) (net 81)) - (segment (start 123.19 94.488) (end 125.6792 96.9772) (width 0.254) (layer Composant) (net 81)) - (segment (start 123.063 93.98) (end 123.19 94.488) (width 0.254) (layer Composant) (net 81)) - (segment (start 123.317 94.361) (end 123.698 94.742) (width 0.254) (layer GND_layer) (net 81)) - (segment (start 123.698 94.742) (end 125.222 94.742) (width 0.254) (layer GND_layer) (net 81)) - (segment (start 125.222 94.742) (end 126.111 95.631) (width 0.254) (layer GND_layer) (net 81)) - (segment (start 126.111 95.631) (end 126.111 119.38) (width 0.254) (layer GND_layer) (net 81)) - (segment (start 126.111 119.38) (end 126.873 120.142) (width 0.254) (layer GND_layer) (net 81)) - (segment (start 123.063 93.98) (end 123.063 92.329) (width 0.254) (layer Composant) (net 81)) - (via (at 123.063 93.98) (size 0.635) (layers Composant Cuivre) (net 81)) - (segment (start 123.063 93.98) (end 123.317 94.361) (width 0.254) (layer GND_layer) (net 81)) + (segment (start 186.436 105.918) (end 186.436 122.936) (width 0.254) (layer GND_layer) (net 80)) + (segment (start 179.324 130.048) (end 186.436 122.936) (width 0.254) (layer GND_layer) (net 80)) + (segment (start 183.134 77.089) (end 183.134 102.616) (width 0.254) (layer GND_layer) (net 80)) + (segment (start 178.562 72.517) (end 183.134 77.089) (width 0.254) (layer GND_layer) (net 80)) + (segment (start 174.117 72.517) (end 178.562 72.517) (width 0.254) (layer GND_layer) (net 80)) + (segment (start 172.085 74.549) (end 174.117 72.517) (width 0.254) (layer GND_layer) (net 80) (status 800)) + (segment (start 170.815 75.819) (end 172.085 74.549) (width 0.254) (layer Cuivre) (net 80) (status 400)) + (segment (start 168.91 75.819) (end 170.815 75.819) (width 0.254) (layer Cuivre) (net 80)) + (segment (start 164.719 80.01) (end 168.91 75.819) (width 0.254) (layer Cuivre) (net 80)) + (segment (start 152.654 80.01) (end 164.719 80.01) (width 0.254) (layer Cuivre) (net 80)) + (segment (start 145.669 94.742) (end 144.4498 95.9612) (width 0.254) (layer Composant) (net 80)) + (via (at 149.86 84.201) (size 0.889) (layers Composant Cuivre) (net 80)) + (segment (start 144.4498 95.9612) (end 143.129 95.9612) (width 0.254) (layer Composant) (net 80) (status 400)) + (segment (start 149.86 82.804) (end 149.86 84.201) (width 0.254) (layer Cuivre) (net 80)) + (segment (start 145.669 91.821) (end 145.669 94.742) (width 0.254) (layer Composant) (net 80)) + (segment (start 183.134 102.616) (end 186.436 105.918) (width 0.254) (layer GND_layer) (net 80)) + (segment (start 149.86 87.63) (end 145.669 91.821) (width 0.254) (layer Composant) (net 80)) + (segment (start 149.86 84.201) (end 149.86 87.63) (width 0.254) (layer Composant) (net 80)) + (segment (start 179.324 130.048) (end 179.324 136.906) (width 0.254) (layer GND_layer) (net 80) (status 400)) (segment (start 126.873 120.142) (end 126.873 132.715) (width 0.254) (layer GND_layer) (net 81)) - (segment (start 120.65 110.236) (end 120.65 111.506) (width 0.381) (layer Composant) (net 82) (status 800)) - (segment (start 117.602 131.445) (end 117.602 131.572) (width 0.381) (layer GND_layer) (net 82)) - (segment (start 117.729 131.445) (end 117.602 131.445) (width 0.381) (layer GND_layer) (net 82)) - (segment (start 126.5174 107.4674) (end 126.3015 107.2515) (width 0.254) (layer Composant) (net 82)) - (segment (start 124.968 111.506) (end 120.65 111.506) (width 0.254) (layer Composant) (net 82)) - (segment (start 125.984 110.49) (end 124.968 111.506) (width 0.254) (layer Composant) (net 82)) - (segment (start 120.777 110.109) (end 120.65 110.236) (width 0.381) (layer Composant) (net 82) (status 400)) - (segment (start 120.777 107.696) (end 120.777 110.109) (width 0.381) (layer Composant) (net 82) (status 800)) - (segment (start 115.824 133.35) (end 115.824 136.906) (width 0.381) (layer GND_layer) (net 82) (status 400)) - (segment (start 117.602 131.572) (end 115.824 133.35) (width 0.381) (layer GND_layer) (net 82)) - (segment (start 120.65 113.411) (end 117.729 116.332) (width 0.381) (layer Composant) (net 82)) - (segment (start 120.65 111.506) (end 120.65 113.411) (width 0.381) (layer Composant) (net 82)) - (segment (start 113.284 136.906) (end 115.824 136.906) (width 0.254) (layer 3.3V_layer) (net 82) (status C00)) - (segment (start 127.635 106.9848) (end 126.56312 106.9848) (width 0.254) (layer Composant) (net 82) (status 800)) - (segment (start 126.56312 106.9848) (end 126.3015 107.2515) (width 0.254) (layer Composant) (net 82)) - (segment (start 127.635 107.4674) (end 126.5174 107.4674) (width 0.254) (layer Composant) (net 82) (status 800)) - (segment (start 125.984 110.49) (end 125.984 107.569) (width 0.254) (layer Composant) (net 82)) - (segment (start 125.984 107.569) (end 126.3015 107.2515) (width 0.254) (layer Composant) (net 82)) - (via (at 117.729 116.332) (size 0.889) (layers Composant Cuivre) (net 82)) - (segment (start 121.793 108.712) (end 120.777 107.696) (width 0.381) (layer Composant) (net 82) (status 400)) - (segment (start 122.8725 108.712) (end 121.793 108.712) (width 0.381) (layer Composant) (net 82) (status 800)) + (segment (start 123.063 93.98) (end 123.317 94.361) (width 0.254) (layer GND_layer) (net 81)) + (via (at 123.063 93.98) (size 0.635) (layers Composant Cuivre) (net 81)) + (segment (start 123.063 93.98) (end 123.063 92.329) (width 0.254) (layer Composant) (net 81)) + (segment (start 126.111 119.38) (end 126.873 120.142) (width 0.254) (layer GND_layer) (net 81)) + (segment (start 126.111 95.631) (end 126.111 119.38) (width 0.254) (layer GND_layer) (net 81)) + (segment (start 125.222 94.742) (end 126.111 95.631) (width 0.254) (layer GND_layer) (net 81)) + (segment (start 123.698 94.742) (end 125.222 94.742) (width 0.254) (layer GND_layer) (net 81)) + (segment (start 123.317 94.361) (end 123.698 94.742) (width 0.254) (layer GND_layer) (net 81)) + (segment (start 123.063 93.98) (end 123.19 94.488) (width 0.254) (layer Composant) (net 81)) + (segment (start 123.19 94.488) (end 125.6792 96.9772) (width 0.254) (layer Composant) (net 81)) + (segment (start 128.143 133.985) (end 126.873 132.715) (width 0.254) (layer GND_layer) (net 81)) + (segment (start 125.6792 96.9772) (end 127.635 96.9772) (width 0.254) (layer Composant) (net 81) (status 400)) + (segment (start 123.063 92.329) (end 128.651 86.741) (width 0.254) (layer Composant) (net 81)) + (segment (start 128.651 86.741) (end 130.556 86.741) (width 0.254) (layer Composant) (net 81)) + (segment (start 130.556 86.741) (end 133.985 83.312) (width 0.254) (layer Composant) (net 81)) + (segment (start 133.985 83.312) (end 136.271 83.312) (width 0.254) (layer Composant) (net 81)) + (segment (start 136.271 83.312) (end 137.033 82.55) (width 0.254) (layer Composant) (net 81)) + (segment (start 137.033 82.55) (end 137.033 75.819) (width 0.254) (layer Composant) (net 81)) + (segment (start 137.033 75.819) (end 138.303 74.549) (width 0.254) (layer Composant) (net 81) (status 400)) + (segment (start 128.143 133.985) (end 128.143 135.382) (width 0.254) (layer GND_layer) (net 81)) + (segment (start 128.524 135.763) (end 128.524 136.906) (width 0.254) (layer GND_layer) (net 81) (status 400)) + (segment (start 128.143 135.382) (end 128.524 135.763) (width 0.254) (layer GND_layer) (net 81)) (segment (start 117.729 116.332) (end 117.729 131.445) (width 0.381) (layer GND_layer) (net 82)) - (segment (start 218.44 135.89) (end 223.52 135.89) (width 0.254) (layer 3.3V_layer) (net 83)) - (segment (start 223.52 135.89) (end 224.79 134.62) (width 0.254) (layer 3.3V_layer) (net 83) (status 400)) + (segment (start 122.8725 108.712) (end 121.793 108.712) (width 0.381) (layer Composant) (net 82) (status 800)) + (segment (start 121.793 108.712) (end 120.777 107.696) (width 0.381) (layer Composant) (net 82) (status 400)) + (via (at 117.729 116.332) (size 0.889) (layers Composant Cuivre) (net 82)) + (segment (start 125.984 107.569) (end 126.3015 107.2515) (width 0.254) (layer Composant) (net 82)) + (segment (start 125.984 110.49) (end 125.984 107.569) (width 0.254) (layer Composant) (net 82)) + (segment (start 127.635 107.4674) (end 126.5174 107.4674) (width 0.254) (layer Composant) (net 82) (status 800)) + (segment (start 126.56312 106.9848) (end 126.3015 107.2515) (width 0.254) (layer Composant) (net 82)) + (segment (start 127.635 106.9848) (end 126.56312 106.9848) (width 0.254) (layer Composant) (net 82) (status 800)) + (segment (start 113.284 136.906) (end 115.824 136.906) (width 0.254) (layer 3.3V_layer) (net 82) (status C00)) + (segment (start 120.65 111.506) (end 120.65 113.411) (width 0.381) (layer Composant) (net 82)) + (segment (start 120.65 113.411) (end 117.729 116.332) (width 0.381) (layer Composant) (net 82)) + (segment (start 117.602 131.572) (end 115.824 133.35) (width 0.381) (layer GND_layer) (net 82)) + (segment (start 115.824 133.35) (end 115.824 136.906) (width 0.381) (layer GND_layer) (net 82) (status 400)) + (segment (start 120.777 107.696) (end 120.777 110.109) (width 0.381) (layer Composant) (net 82) (status 800)) + (segment (start 120.777 110.109) (end 120.65 110.236) (width 0.381) (layer Composant) (net 82) (status 400)) + (segment (start 125.984 110.49) (end 124.968 111.506) (width 0.254) (layer Composant) (net 82)) + (segment (start 124.968 111.506) (end 120.65 111.506) (width 0.254) (layer Composant) (net 82)) + (segment (start 126.5174 107.4674) (end 126.3015 107.2515) (width 0.254) (layer Composant) (net 82)) + (segment (start 117.729 131.445) (end 117.602 131.445) (width 0.381) (layer GND_layer) (net 82)) + (segment (start 117.602 131.445) (end 117.602 131.572) (width 0.381) (layer GND_layer) (net 82)) + (segment (start 120.65 110.236) (end 120.65 111.506) (width 0.381) (layer Composant) (net 82) (status 800)) (segment (start 217.17 134.62) (end 218.44 135.89) (width 0.254) (layer 3.3V_layer) (net 83) (status 800)) - (segment (start 139.15644 125.26772) (end 166.35222 125.26772) (width 0.254) (layer Composant) (net 84)) - (segment (start 137.62736 123.73864) (end 139.15644 125.26772) (width 0.254) (layer Composant) (net 84)) - (segment (start 127.0635 122.2375) (end 123.444 125.857) (width 0.381) (layer Composant) (net 84) (status 400)) - (segment (start 128.27 122.2375) (end 127.0635 122.2375) (width 0.381) (layer Composant) (net 84) (status 800)) - (segment (start 130.048 124.0155) (end 128.27 122.2375) (width 0.381) (layer Composant) (net 84) (status 400)) - (segment (start 179.63642 124.44222) (end 189.04458 124.44222) (width 0.254) (layer Composant) (net 84)) - (segment (start 189.04458 124.44222) (end 202.4761 111.0107) (width 0.254) (layer Composant) (net 84)) - (segment (start 166.35222 125.26772) (end 168.6179 123.00204) (width 0.254) (layer Composant) (net 84)) - (segment (start 137.62736 123.73864) (end 137.3505 124.0155) (width 0.381) (layer Composant) (net 84)) - (segment (start 137.3505 124.0155) (end 136.652 124.0155) (width 0.381) (layer Composant) (net 84) (status 400)) - (segment (start 139.954 111.379) (end 139.954 114.3) (width 0.25) (layer Composant) (net 84)) - (segment (start 139.954 114.3) (end 141.224 115.697) (width 0.25) (layer Composant) (net 84)) - (segment (start 141.224 115.697) (end 141.224 117.856) (width 0.25) (layer Composant) (net 84)) - (segment (start 141.224 117.856) (end 138.049 121.031) (width 0.25) (layer Composant) (net 84)) - (segment (start 138.049 121.031) (end 138.049 123.317) (width 0.25) (layer Composant) (net 84)) - (segment (start 139.8778 111.0488) (end 139.954 111.379) (width 0.25) (layer Composant) (net 84)) - (segment (start 139.8778 109.22) (end 139.8778 111.0488) (width 0.25) (layer Composant) (net 84) (status 800)) - (segment (start 138.049 123.317) (end 137.62736 123.73864) (width 0.25) (layer Composant) (net 84)) - (segment (start 168.6179 123.00204) (end 178.19624 123.00204) (width 0.254) (layer Composant) (net 84)) - (segment (start 202.4761 111.0107) (end 212.9155 111.0107) (width 0.254) (layer Composant) (net 84) (status 400)) - (segment (start 136.652 124.0155) (end 130.048 124.0155) (width 0.381) (layer Composant) (net 84) (status 800)) + (segment (start 223.52 135.89) (end 224.79 134.62) (width 0.254) (layer 3.3V_layer) (net 83) (status 400)) + (segment (start 218.44 135.89) (end 223.52 135.89) (width 0.254) (layer 3.3V_layer) (net 83)) (segment (start 178.19624 123.00204) (end 179.63642 124.44222) (width 0.254) (layer Composant) (net 84)) - (segment (start 172.466 107.95) (end 175.641 111.125) (width 0.254) (layer GND_layer) (net 85)) - (segment (start 172.466 92.964) (end 172.466 107.95) (width 0.254) (layer GND_layer) (net 85)) - (segment (start 171.45 92.964) (end 172.466 92.964) (width 0.254) (layer Cuivre) (net 85)) - (segment (start 170.561 93.853) (end 171.45 92.964) (width 0.254) (layer Cuivre) (net 85)) - (segment (start 165.989 93.853) (end 170.561 93.853) (width 0.254) (layer Cuivre) (net 85)) - (segment (start 163.576 91.44) (end 165.989 93.853) (width 0.254) (layer Cuivre) (net 85)) - (segment (start 160.528 91.44) (end 163.576 91.44) (width 0.254) (layer Cuivre) (net 85)) - (segment (start 156.718 95.25) (end 160.528 91.44) (width 0.254) (layer Cuivre) (net 85)) - (segment (start 175.641 111.125) (end 178.562 111.125) (width 0.254) (layer GND_layer) (net 85)) - (segment (start 178.562 111.125) (end 179.451 110.236) (width 0.254) (layer GND_layer) (net 85)) - (segment (start 179.451 110.236) (end 181.61 110.236) (width 0.254) (layer GND_layer) (net 85)) - (segment (start 150.495 95.25) (end 148.717 97.028) (width 0.254) (layer Composant) (net 85)) - (segment (start 148.717 97.028) (end 148.717 100.838) (width 0.254) (layer Composant) (net 85)) - (segment (start 148.717 100.838) (end 147.574 101.981) (width 0.254) (layer Composant) (net 85)) - (segment (start 147.574 101.981) (end 143.129 101.9556) (width 0.254) (layer Composant) (net 85) (status 400)) - (segment (start 183.769 119.761) (end 184.7215 121.158) (width 0.381) (layer Composant) (net 85) (status 400)) - (segment (start 182.372 119.761) (end 183.769 119.761) (width 0.381) (layer Composant) (net 85)) - (via (at 188.7982 105.3211) (size 0.889) (layers Composant Cuivre) (net 85)) - (segment (start 150.495 95.25) (end 156.718 95.25) (width 0.254) (layer Cuivre) (net 85)) - (segment (start 183.8833 110.236) (end 188.7982 105.3211) (width 0.254) (layer 3.3V_layer) (net 85)) - (segment (start 181.61 110.236) (end 183.8833 110.236) (width 0.254) (layer 3.3V_layer) (net 85)) - (segment (start 188.9887 105.5116) (end 190.9445 105.5116) (width 0.254) (layer Composant) (net 85) (status 400)) - (segment (start 188.7982 105.3211) (end 188.9887 105.5116) (width 0.254) (layer Composant) (net 85)) - (segment (start 175.133 127.889) (end 174.498 127.889) (width 0.254) (layer GND_layer) (net 85)) - (segment (start 174.498 127.889) (end 170.434 131.953) (width 0.254) (layer GND_layer) (net 85)) - (segment (start 179.705 120.904) (end 179.705 123.317) (width 0.254) (layer GND_layer) (net 85)) - (via (at 181.61 110.236) (size 0.635) (layers Composant Cuivre) (net 85)) - (via (at 150.495 95.25) (size 0.889) (layers Composant Cuivre) (net 85)) - (segment (start 184.404 139.446) (end 182.499 141.351) (width 0.254) (layer GND_layer) (net 85) (status 800)) - (via (at 172.466 92.964) (size 0.889) (layers Composant Cuivre) (net 85)) - (via (at 181.61 118.999) (size 0.889) (layers Composant Cuivre) (net 85)) - (segment (start 179.705 123.317) (end 175.133 127.889) (width 0.254) (layer GND_layer) (net 85)) - (segment (start 170.434 140.462) (end 170.434 131.953) (width 0.254) (layer GND_layer) (net 85)) - (segment (start 171.323 141.351) (end 170.434 140.462) (width 0.254) (layer GND_layer) (net 85)) - (segment (start 182.499 141.351) (end 171.323 141.351) (width 0.254) (layer GND_layer) (net 85)) - (segment (start 179.705 120.904) (end 181.61 118.999) (width 0.254) (layer GND_layer) (net 85)) - (segment (start 181.61 118.999) (end 181.61 110.236) (width 0.254) (layer GND_layer) (net 85)) + (segment (start 136.652 124.0155) (end 130.048 124.0155) (width 0.381) (layer Composant) (net 84) (status 800)) + (segment (start 202.4761 111.0107) (end 212.9155 111.0107) (width 0.254) (layer Composant) (net 84) (status 400)) + (segment (start 168.6179 123.00204) (end 178.19624 123.00204) (width 0.254) (layer Composant) (net 84)) + (segment (start 138.049 123.317) (end 137.62736 123.73864) (width 0.25) (layer Composant) (net 84)) + (segment (start 139.8778 109.22) (end 139.8778 111.0488) (width 0.25) (layer Composant) (net 84) (status 800)) + (segment (start 139.8778 111.0488) (end 139.954 111.379) (width 0.25) (layer Composant) (net 84)) + (segment (start 138.049 121.031) (end 138.049 123.317) (width 0.25) (layer Composant) (net 84)) + (segment (start 141.224 117.856) (end 138.049 121.031) (width 0.25) (layer Composant) (net 84)) + (segment (start 141.224 115.697) (end 141.224 117.856) (width 0.25) (layer Composant) (net 84)) + (segment (start 139.954 114.3) (end 141.224 115.697) (width 0.25) (layer Composant) (net 84)) + (segment (start 139.954 111.379) (end 139.954 114.3) (width 0.25) (layer Composant) (net 84)) + (segment (start 137.3505 124.0155) (end 136.652 124.0155) (width 0.381) (layer Composant) (net 84) (status 400)) + (segment (start 137.62736 123.73864) (end 137.3505 124.0155) (width 0.381) (layer Composant) (net 84)) + (segment (start 166.35222 125.26772) (end 168.6179 123.00204) (width 0.254) (layer Composant) (net 84)) + (segment (start 189.04458 124.44222) (end 202.4761 111.0107) (width 0.254) (layer Composant) (net 84)) + (segment (start 179.63642 124.44222) (end 189.04458 124.44222) (width 0.254) (layer Composant) (net 84)) + (segment (start 130.048 124.0155) (end 128.27 122.2375) (width 0.381) (layer Composant) (net 84) (status 400)) + (segment (start 128.27 122.2375) (end 127.0635 122.2375) (width 0.381) (layer Composant) (net 84) (status 800)) + (segment (start 127.0635 122.2375) (end 123.444 125.857) (width 0.381) (layer Composant) (net 84) (status 400)) + (segment (start 137.62736 123.73864) (end 139.15644 125.26772) (width 0.254) (layer Composant) (net 84)) + (segment (start 139.15644 125.26772) (end 166.35222 125.26772) (width 0.254) (layer Composant) (net 84)) (segment (start 181.61 118.999) (end 182.372 119.761) (width 0.381) (layer Composant) (net 85)) - (segment (start 176.784 139.446) (end 175.514 138.176) (width 0.254) (layer GND_layer) (net 86) (status 800)) - (segment (start 175.514 130.937) (end 184.531 121.92) (width 0.254) (layer GND_layer) (net 86)) - (segment (start 184.531 118.872) (end 184.531 121.92) (width 0.254) (layer GND_layer) (net 86)) - (segment (start 149.352 95.25) (end 149.352 94.742) (width 0.254) (layer Cuivre) (net 86)) - (segment (start 149.352 94.742) (end 149.606 94.488) (width 0.254) (layer Cuivre) (net 86)) - (segment (start 149.606 94.488) (end 156.718 94.488) (width 0.254) (layer Cuivre) (net 86)) - (segment (start 156.718 94.488) (end 160.274 90.932) (width 0.254) (layer Cuivre) (net 86)) - (segment (start 160.274 90.932) (end 163.957 90.932) (width 0.254) (layer Cuivre) (net 86)) - (segment (start 163.957 90.932) (end 166.37 93.345) (width 0.254) (layer Cuivre) (net 86)) - (segment (start 166.37 93.345) (end 169.799 93.345) (width 0.254) (layer Cuivre) (net 86)) - (segment (start 169.799 93.345) (end 171.45 91.694) (width 0.254) (layer Cuivre) (net 86)) - (segment (start 171.45 91.694) (end 175.006 91.694) (width 0.254) (layer Cuivre) (net 86)) - (segment (start 175.006 91.694) (end 175.514 91.186) (width 0.254) (layer Cuivre) (net 86)) - (segment (start 175.514 91.186) (end 177.419 91.186) (width 0.254) (layer Cuivre) (net 86)) - (segment (start 177.419 91.186) (end 177.927 91.694) (width 0.254) (layer Cuivre) (net 86)) - (segment (start 177.927 91.694) (end 179.197 91.694) (width 0.254) (layer Cuivre) (net 86)) - (segment (start 179.197 91.694) (end 179.705 92.202) (width 0.254) (layer Cuivre) (net 86)) - (segment (start 181.61 104.902) (end 181.102 104.902) (width 0.254) (layer GND_layer) (net 86)) - (segment (start 181.102 104.902) (end 180.467 104.267) (width 0.254) (layer GND_layer) (net 86)) - (segment (start 187.14974 104.902) (end 188.43752 106.18978) (width 0.254) (layer Composant) (net 86)) - (segment (start 184.531 118.872) (end 184.531 107.188) (width 0.254) (layer GND_layer) (net 86)) - (segment (start 185.547 118.872) (end 184.531 118.872) (width 0.254) (layer Composant) (net 86)) - (segment (start 185.928 119.253) (end 185.547 118.872) (width 0.254) (layer Composant) (net 86)) - (segment (start 185.928 122.2375) (end 185.928 119.253) (width 0.254) (layer Composant) (net 86)) - (segment (start 180.467 104.267) (end 180.467 92.964) (width 0.254) (layer GND_layer) (net 86)) - (segment (start 180.467 92.964) (end 179.705 92.202) (width 0.254) (layer GND_layer) (net 86)) - (segment (start 184.7215 123.444) (end 185.928 122.2375) (width 0.254) (layer Composant) (net 86) (status 800)) - (segment (start 184.531 107.188) (end 182.245 104.902) (width 0.254) (layer GND_layer) (net 86)) - (segment (start 181.61 104.902) (end 187.14974 104.902) (width 0.254) (layer Composant) (net 86)) - (segment (start 182.245 104.902) (end 181.61 104.902) (width 0.254) (layer GND_layer) (net 86)) - (segment (start 149.352 95.25) (end 149.098 95.758) (width 0.254) (layer Composant) (net 86)) - (segment (start 149.098 95.758) (end 148.209 96.647) (width 0.254) (layer Composant) (net 86)) - (segment (start 148.209 96.647) (end 148.209 100.584) (width 0.254) (layer Composant) (net 86)) - (segment (start 189.16142 106.18978) (end 189.3443 106.0069) (width 0.254) (layer Composant) (net 86)) - (segment (start 189.3443 106.0069) (end 190.9445 106.0069) (width 0.254) (layer Composant) (net 86) (status 400)) - (segment (start 148.209 100.584) (end 147.32 101.473) (width 0.254) (layer Composant) (net 86)) - (segment (start 175.514 130.937) (end 175.514 138.176) (width 0.254) (layer GND_layer) (net 86)) - (via (at 184.531 118.872) (size 0.889) (layers Composant Cuivre) (net 86)) - (via (at 149.352 95.25) (size 0.635) (layers Composant Cuivre) (net 86)) - (via (at 181.61 104.902) (size 0.635) (layers Composant Cuivre) (net 86)) - (via (at 179.705 92.202) (size 0.635) (layers Composant Cuivre) (net 86)) - (segment (start 147.32 101.473) (end 143.129 101.473) (width 0.254) (layer Composant) (net 86) (status 400)) + (segment (start 181.61 118.999) (end 181.61 110.236) (width 0.254) (layer GND_layer) (net 85)) + (segment (start 179.705 120.904) (end 181.61 118.999) (width 0.254) (layer GND_layer) (net 85)) + (segment (start 182.499 141.351) (end 171.323 141.351) (width 0.254) (layer GND_layer) (net 85)) + (segment (start 171.323 141.351) (end 170.434 140.462) (width 0.254) (layer GND_layer) (net 85)) + (segment (start 170.434 140.462) (end 170.434 131.953) (width 0.254) (layer GND_layer) (net 85)) + (segment (start 179.705 123.317) (end 175.133 127.889) (width 0.254) (layer GND_layer) (net 85)) + (via (at 181.61 118.999) (size 0.889) (layers Composant Cuivre) (net 85)) + (via (at 172.466 92.964) (size 0.889) (layers Composant Cuivre) (net 85)) + (segment (start 184.404 139.446) (end 182.499 141.351) (width 0.254) (layer GND_layer) (net 85) (status 800)) + (via (at 150.495 95.25) (size 0.889) (layers Composant Cuivre) (net 85)) + (via (at 181.61 110.236) (size 0.635) (layers Composant Cuivre) (net 85)) + (segment (start 179.705 120.904) (end 179.705 123.317) (width 0.254) (layer GND_layer) (net 85)) + (segment (start 174.498 127.889) (end 170.434 131.953) (width 0.254) (layer GND_layer) (net 85)) + (segment (start 175.133 127.889) (end 174.498 127.889) (width 0.254) (layer GND_layer) (net 85)) + (segment (start 188.7982 105.3211) (end 188.9887 105.5116) (width 0.254) (layer Composant) (net 85)) + (segment (start 188.9887 105.5116) (end 190.9445 105.5116) (width 0.254) (layer Composant) (net 85) (status 400)) + (segment (start 181.61 110.236) (end 183.8833 110.236) (width 0.254) (layer 3.3V_layer) (net 85)) + (segment (start 183.8833 110.236) (end 188.7982 105.3211) (width 0.254) (layer 3.3V_layer) (net 85)) + (segment (start 150.495 95.25) (end 156.718 95.25) (width 0.254) (layer Cuivre) (net 85)) + (via (at 188.7982 105.3211) (size 0.889) (layers Composant Cuivre) (net 85)) + (segment (start 182.372 119.761) (end 183.769 119.761) (width 0.381) (layer Composant) (net 85)) + (segment (start 183.769 119.761) (end 184.7215 121.158) (width 0.381) (layer Composant) (net 85) (status 400)) + (segment (start 147.574 101.981) (end 143.129 101.9556) (width 0.254) (layer Composant) (net 85) (status 400)) + (segment (start 148.717 100.838) (end 147.574 101.981) (width 0.254) (layer Composant) (net 85)) + (segment (start 148.717 97.028) (end 148.717 100.838) (width 0.254) (layer Composant) (net 85)) + (segment (start 150.495 95.25) (end 148.717 97.028) (width 0.254) (layer Composant) (net 85)) + (segment (start 179.451 110.236) (end 181.61 110.236) (width 0.254) (layer GND_layer) (net 85)) + (segment (start 178.562 111.125) (end 179.451 110.236) (width 0.254) (layer GND_layer) (net 85)) + (segment (start 175.641 111.125) (end 178.562 111.125) (width 0.254) (layer GND_layer) (net 85)) + (segment (start 156.718 95.25) (end 160.528 91.44) (width 0.254) (layer Cuivre) (net 85)) + (segment (start 160.528 91.44) (end 163.576 91.44) (width 0.254) (layer Cuivre) (net 85)) + (segment (start 163.576 91.44) (end 165.989 93.853) (width 0.254) (layer Cuivre) (net 85)) + (segment (start 165.989 93.853) (end 170.561 93.853) (width 0.254) (layer Cuivre) (net 85)) + (segment (start 170.561 93.853) (end 171.45 92.964) (width 0.254) (layer Cuivre) (net 85)) + (segment (start 171.45 92.964) (end 172.466 92.964) (width 0.254) (layer Cuivre) (net 85)) + (segment (start 172.466 92.964) (end 172.466 107.95) (width 0.254) (layer GND_layer) (net 85)) + (segment (start 172.466 107.95) (end 175.641 111.125) (width 0.254) (layer GND_layer) (net 85)) (segment (start 188.43752 106.18978) (end 189.16142 106.18978) (width 0.254) (layer Composant) (net 86)) - (segment (start 189.33922 106.61396) (end 189.43828 106.5149) (width 0.254) (layer Composant) (net 87)) - (segment (start 189.43828 106.5149) (end 190.9445 106.5149) (width 0.254) (layer Composant) (net 87) (status 400)) - (segment (start 181.61 104.013) (end 180.975 103.378) (width 0.254) (layer GND_layer) (net 87)) - (segment (start 180.975 103.378) (end 180.975 92.456) (width 0.254) (layer GND_layer) (net 87)) - (segment (start 180.975 92.456) (end 179.959 91.44) (width 0.254) (layer GND_layer) (net 87)) - (segment (start 179.959 91.44) (end 179.959 91.059) (width 0.254) (layer GND_layer) (net 87)) - (segment (start 148.463 95.25) (end 148.463 94.742) (width 0.254) (layer Cuivre) (net 87)) - (segment (start 148.463 94.742) (end 149.225 93.98) (width 0.254) (layer Cuivre) (net 87)) - (segment (start 149.225 93.98) (end 156.464 93.98) (width 0.254) (layer Cuivre) (net 87)) - (segment (start 156.464 93.98) (end 160.02 90.424) (width 0.254) (layer Cuivre) (net 87)) - (segment (start 160.02 90.424) (end 164.465 90.424) (width 0.254) (layer Cuivre) (net 87)) - (segment (start 164.465 90.424) (end 165.1 91.059) (width 0.254) (layer Cuivre) (net 87)) - (segment (start 165.1 91.059) (end 174.752 91.059) (width 0.254) (layer Cuivre) (net 87)) - (segment (start 148.463 95.25) (end 148.717 94.869) (width 0.254) (layer GND_layer) (net 87)) - (segment (start 175.133 90.678) (end 177.927 90.678) (width 0.254) (layer Cuivre) (net 87)) - (segment (start 177.927 90.678) (end 178.308 91.059) (width 0.254) (layer Cuivre) (net 87)) - (segment (start 148.971 93.853) (end 148.463 94.361) (width 0.381) (layer Composant) (net 87)) - (segment (start 178.308 91.059) (end 179.959 91.059) (width 0.254) (layer Cuivre) (net 87)) - (segment (start 145.796 135.001) (end 146.304 135.509) (width 0.254) (layer GND_layer) (net 87)) - (via (at 181.61 104.013) (size 0.635) (layers Composant Cuivre) (net 87)) - (segment (start 174.752 91.059) (end 175.133 90.678) (width 0.254) (layer Cuivre) (net 87)) - (via (at 179.959 91.059) (size 0.889) (layers Composant Cuivre) (net 87)) - (via (at 148.463 95.25) (size 0.635) (layers Composant Cuivre) (net 87)) - (segment (start 148.463 95.631) (end 148.463 95.25) (width 0.254) (layer Composant) (net 87)) - (segment (start 147.701 96.393) (end 148.463 95.631) (width 0.254) (layer Composant) (net 87)) - (segment (start 147.701 100.33) (end 147.701 96.393) (width 0.254) (layer Composant) (net 87)) - (segment (start 147.066 100.965) (end 147.701 100.33) (width 0.254) (layer Composant) (net 87)) - (segment (start 143.129 100.965) (end 147.066 100.965) (width 0.254) (layer Composant) (net 87) (status 800)) - (segment (start 148.463 94.361) (end 148.463 95.25) (width 0.381) (layer Composant) (net 87)) - (segment (start 152.0825 93.853) (end 148.971 93.853) (width 0.381) (layer Composant) (net 87) (status 800)) - (segment (start 146.304 135.509) (end 146.304 136.906) (width 0.254) (layer GND_layer) (net 87) (status 400)) - (segment (start 145.796 116.967) (end 145.796 135.001) (width 0.254) (layer GND_layer) (net 87)) - (segment (start 148.082 114.681) (end 145.796 116.967) (width 0.254) (layer GND_layer) (net 87)) - (segment (start 148.209 114.681) (end 148.082 114.681) (width 0.254) (layer GND_layer) (net 87)) - (segment (start 149.733 113.157) (end 148.209 114.681) (width 0.254) (layer GND_layer) (net 87)) - (segment (start 149.733 101.092) (end 149.733 113.157) (width 0.254) (layer GND_layer) (net 87)) - (segment (start 151.257 99.568) (end 149.733 101.092) (width 0.254) (layer GND_layer) (net 87)) - (segment (start 151.257 94.869) (end 151.257 99.568) (width 0.254) (layer GND_layer) (net 87)) - (segment (start 150.876 94.488) (end 151.257 94.869) (width 0.254) (layer GND_layer) (net 87)) - (segment (start 149.098 94.488) (end 150.876 94.488) (width 0.254) (layer GND_layer) (net 87)) - (segment (start 148.717 94.869) (end 149.098 94.488) (width 0.254) (layer GND_layer) (net 87)) - (segment (start 181.61 104.013) (end 180.76926 104.85374) (width 0.254) (layer Composant) (net 87)) - (segment (start 180.76926 104.85374) (end 180.76926 104.92994) (width 0.254) (layer Composant) (net 87)) - (segment (start 180.76926 104.92994) (end 181.58714 105.74782) (width 0.254) (layer Composant) (net 87)) - (segment (start 181.58714 105.74782) (end 182.45582 105.74782) (width 0.254) (layer Composant) (net 87)) - (segment (start 182.45582 105.74782) (end 183.32196 106.61396) (width 0.254) (layer Composant) (net 87)) + (segment (start 147.32 101.473) (end 143.129 101.473) (width 0.254) (layer Composant) (net 86) (status 400)) + (via (at 179.705 92.202) (size 0.635) (layers Composant Cuivre) (net 86)) + (via (at 181.61 104.902) (size 0.635) (layers Composant Cuivre) (net 86)) + (via (at 149.352 95.25) (size 0.635) (layers Composant Cuivre) (net 86)) + (via (at 184.531 118.872) (size 0.889) (layers Composant Cuivre) (net 86)) + (segment (start 175.514 130.937) (end 175.514 138.176) (width 0.254) (layer GND_layer) (net 86)) + (segment (start 148.209 100.584) (end 147.32 101.473) (width 0.254) (layer Composant) (net 86)) + (segment (start 189.3443 106.0069) (end 190.9445 106.0069) (width 0.254) (layer Composant) (net 86) (status 400)) + (segment (start 189.16142 106.18978) (end 189.3443 106.0069) (width 0.254) (layer Composant) (net 86)) + (segment (start 148.209 96.647) (end 148.209 100.584) (width 0.254) (layer Composant) (net 86)) + (segment (start 149.098 95.758) (end 148.209 96.647) (width 0.254) (layer Composant) (net 86)) + (segment (start 149.352 95.25) (end 149.098 95.758) (width 0.254) (layer Composant) (net 86)) + (segment (start 182.245 104.902) (end 181.61 104.902) (width 0.254) (layer GND_layer) (net 86)) + (segment (start 181.61 104.902) (end 187.14974 104.902) (width 0.254) (layer Composant) (net 86)) + (segment (start 184.531 107.188) (end 182.245 104.902) (width 0.254) (layer GND_layer) (net 86)) + (segment (start 184.7215 123.444) (end 185.928 122.2375) (width 0.254) (layer Composant) (net 86) (status 800)) + (segment (start 180.467 92.964) (end 179.705 92.202) (width 0.254) (layer GND_layer) (net 86)) + (segment (start 180.467 104.267) (end 180.467 92.964) (width 0.254) (layer GND_layer) (net 86)) + (segment (start 185.928 122.2375) (end 185.928 119.253) (width 0.254) (layer Composant) (net 86)) + (segment (start 185.928 119.253) (end 185.547 118.872) (width 0.254) (layer Composant) (net 86)) + (segment (start 185.547 118.872) (end 184.531 118.872) (width 0.254) (layer Composant) (net 86)) + (segment (start 184.531 118.872) (end 184.531 107.188) (width 0.254) (layer GND_layer) (net 86)) + (segment (start 187.14974 104.902) (end 188.43752 106.18978) (width 0.254) (layer Composant) (net 86)) + (segment (start 181.102 104.902) (end 180.467 104.267) (width 0.254) (layer GND_layer) (net 86)) + (segment (start 181.61 104.902) (end 181.102 104.902) (width 0.254) (layer GND_layer) (net 86)) + (segment (start 179.197 91.694) (end 179.705 92.202) (width 0.254) (layer Cuivre) (net 86)) + (segment (start 177.927 91.694) (end 179.197 91.694) (width 0.254) (layer Cuivre) (net 86)) + (segment (start 177.419 91.186) (end 177.927 91.694) (width 0.254) (layer Cuivre) (net 86)) + (segment (start 175.514 91.186) (end 177.419 91.186) (width 0.254) (layer Cuivre) (net 86)) + (segment (start 175.006 91.694) (end 175.514 91.186) (width 0.254) (layer Cuivre) (net 86)) + (segment (start 171.45 91.694) (end 175.006 91.694) (width 0.254) (layer Cuivre) (net 86)) + (segment (start 169.799 93.345) (end 171.45 91.694) (width 0.254) (layer Cuivre) (net 86)) + (segment (start 166.37 93.345) (end 169.799 93.345) (width 0.254) (layer Cuivre) (net 86)) + (segment (start 163.957 90.932) (end 166.37 93.345) (width 0.254) (layer Cuivre) (net 86)) + (segment (start 160.274 90.932) (end 163.957 90.932) (width 0.254) (layer Cuivre) (net 86)) + (segment (start 156.718 94.488) (end 160.274 90.932) (width 0.254) (layer Cuivre) (net 86)) + (segment (start 149.606 94.488) (end 156.718 94.488) (width 0.254) (layer Cuivre) (net 86)) + (segment (start 149.352 94.742) (end 149.606 94.488) (width 0.254) (layer Cuivre) (net 86)) + (segment (start 149.352 95.25) (end 149.352 94.742) (width 0.254) (layer Cuivre) (net 86)) + (segment (start 184.531 118.872) (end 184.531 121.92) (width 0.254) (layer GND_layer) (net 86)) + (segment (start 175.514 130.937) (end 184.531 121.92) (width 0.254) (layer GND_layer) (net 86)) + (segment (start 176.784 139.446) (end 175.514 138.176) (width 0.254) (layer GND_layer) (net 86) (status 800)) (segment (start 183.32196 106.61396) (end 189.33922 106.61396) (width 0.254) (layer Composant) (net 87)) - (segment (start 205.4225 77.83068) (end 205.66126 78.06944) (width 0.254) (layer Composant) (net 88)) - (segment (start 205.66126 78.06944) (end 205.66126 78.74) (width 0.254) (layer Composant) (net 88)) - (segment (start 205.4225 76.835) (end 205.4225 77.83068) (width 0.254) (layer Composant) (net 88) (status 800)) - (segment (start 198.628 95.123) (end 197.104 96.647) (width 0.254) (layer Cuivre) (net 88)) - (segment (start 202.819 81.58226) (end 205.66126 78.74) (width 0.254) (layer Cuivre) (net 88)) - (segment (start 202.819 91.44) (end 202.819 81.58226) (width 0.254) (layer Cuivre) (net 88)) - (segment (start 199.136 95.123) (end 198.628 95.123) (width 0.254) (layer Cuivre) (net 88)) - (segment (start 197.104 96.647) (end 197.104 98.679) (width 0.254) (layer Cuivre) (net 88)) - (via (at 197.104 98.679) (size 0.889) (layers Composant Cuivre) (net 88)) - (segment (start 197.104 98.679) (end 197.1802 98.7552) (width 0.254) (layer Composant) (net 88)) - (segment (start 197.1802 98.7552) (end 197.1802 100.7745) (width 0.254) (layer Composant) (net 88) (status 400)) - (via (at 205.66126 78.74) (size 0.889) (layers Composant Cuivre) (net 88)) + (segment (start 182.45582 105.74782) (end 183.32196 106.61396) (width 0.254) (layer Composant) (net 87)) + (segment (start 181.58714 105.74782) (end 182.45582 105.74782) (width 0.254) (layer Composant) (net 87)) + (segment (start 180.76926 104.92994) (end 181.58714 105.74782) (width 0.254) (layer Composant) (net 87)) + (segment (start 180.76926 104.85374) (end 180.76926 104.92994) (width 0.254) (layer Composant) (net 87)) + (segment (start 181.61 104.013) (end 180.76926 104.85374) (width 0.254) (layer Composant) (net 87)) + (segment (start 148.717 94.869) (end 149.098 94.488) (width 0.254) (layer GND_layer) (net 87)) + (segment (start 149.098 94.488) (end 150.876 94.488) (width 0.254) (layer GND_layer) (net 87)) + (segment (start 150.876 94.488) (end 151.257 94.869) (width 0.254) (layer GND_layer) (net 87)) + (segment (start 151.257 94.869) (end 151.257 99.568) (width 0.254) (layer GND_layer) (net 87)) + (segment (start 151.257 99.568) (end 149.733 101.092) (width 0.254) (layer GND_layer) (net 87)) + (segment (start 149.733 101.092) (end 149.733 113.157) (width 0.254) (layer GND_layer) (net 87)) + (segment (start 149.733 113.157) (end 148.209 114.681) (width 0.254) (layer GND_layer) (net 87)) + (segment (start 148.209 114.681) (end 148.082 114.681) (width 0.254) (layer GND_layer) (net 87)) + (segment (start 148.082 114.681) (end 145.796 116.967) (width 0.254) (layer GND_layer) (net 87)) + (segment (start 145.796 116.967) (end 145.796 135.001) (width 0.254) (layer GND_layer) (net 87)) + (segment (start 146.304 135.509) (end 146.304 136.906) (width 0.254) (layer GND_layer) (net 87) (status 400)) + (segment (start 152.0825 93.853) (end 148.971 93.853) (width 0.381) (layer Composant) (net 87) (status 800)) + (segment (start 148.463 94.361) (end 148.463 95.25) (width 0.381) (layer Composant) (net 87)) + (segment (start 143.129 100.965) (end 147.066 100.965) (width 0.254) (layer Composant) (net 87) (status 800)) + (segment (start 147.066 100.965) (end 147.701 100.33) (width 0.254) (layer Composant) (net 87)) + (segment (start 147.701 100.33) (end 147.701 96.393) (width 0.254) (layer Composant) (net 87)) + (segment (start 147.701 96.393) (end 148.463 95.631) (width 0.254) (layer Composant) (net 87)) + (segment (start 148.463 95.631) (end 148.463 95.25) (width 0.254) (layer Composant) (net 87)) + (via (at 148.463 95.25) (size 0.635) (layers Composant Cuivre) (net 87)) + (via (at 179.959 91.059) (size 0.889) (layers Composant Cuivre) (net 87)) + (segment (start 174.752 91.059) (end 175.133 90.678) (width 0.254) (layer Cuivre) (net 87)) + (via (at 181.61 104.013) (size 0.635) (layers Composant Cuivre) (net 87)) + (segment (start 145.796 135.001) (end 146.304 135.509) (width 0.254) (layer GND_layer) (net 87)) + (segment (start 178.308 91.059) (end 179.959 91.059) (width 0.254) (layer Cuivre) (net 87)) + (segment (start 148.971 93.853) (end 148.463 94.361) (width 0.381) (layer Composant) (net 87)) + (segment (start 177.927 90.678) (end 178.308 91.059) (width 0.254) (layer Cuivre) (net 87)) + (segment (start 175.133 90.678) (end 177.927 90.678) (width 0.254) (layer Cuivre) (net 87)) + (segment (start 148.463 95.25) (end 148.717 94.869) (width 0.254) (layer GND_layer) (net 87)) + (segment (start 165.1 91.059) (end 174.752 91.059) (width 0.254) (layer Cuivre) (net 87)) + (segment (start 164.465 90.424) (end 165.1 91.059) (width 0.254) (layer Cuivre) (net 87)) + (segment (start 160.02 90.424) (end 164.465 90.424) (width 0.254) (layer Cuivre) (net 87)) + (segment (start 156.464 93.98) (end 160.02 90.424) (width 0.254) (layer Cuivre) (net 87)) + (segment (start 149.225 93.98) (end 156.464 93.98) (width 0.254) (layer Cuivre) (net 87)) + (segment (start 148.463 94.742) (end 149.225 93.98) (width 0.254) (layer Cuivre) (net 87)) + (segment (start 148.463 95.25) (end 148.463 94.742) (width 0.254) (layer Cuivre) (net 87)) + (segment (start 179.959 91.44) (end 179.959 91.059) (width 0.254) (layer GND_layer) (net 87)) + (segment (start 180.975 92.456) (end 179.959 91.44) (width 0.254) (layer GND_layer) (net 87)) + (segment (start 180.975 103.378) (end 180.975 92.456) (width 0.254) (layer GND_layer) (net 87)) + (segment (start 181.61 104.013) (end 180.975 103.378) (width 0.254) (layer GND_layer) (net 87)) + (segment (start 189.43828 106.5149) (end 190.9445 106.5149) (width 0.254) (layer Composant) (net 87) (status 400)) + (segment (start 189.33922 106.61396) (end 189.43828 106.5149) (width 0.254) (layer Composant) (net 87)) (segment (start 199.136 95.123) (end 202.819 91.44) (width 0.254) (layer Cuivre) (net 88)) - (via (at 199.39 96.139) (size 0.889) (layers Composant Cuivre) (net 89)) - (segment (start 198.247 97.282) (end 199.39 96.139) (width 0.254) (layer Composant) (net 89)) - (segment (start 198.247 98.806) (end 198.247 97.282) (width 0.254) (layer Composant) (net 89)) - (segment (start 199.39 96.139) (end 204.56652 90.96248) (width 0.254) (layer Cuivre) (net 89)) - (segment (start 197.6755 100.7745) (end 197.6755 99.3775) (width 0.254) (layer Composant) (net 89) (status 800)) - (segment (start 197.6755 99.3775) (end 198.247 98.806) (width 0.254) (layer Composant) (net 89)) - (segment (start 205.4225 84.35594) (end 204.56652 85.21192) (width 0.254) (layer Composant) (net 89)) - (via (at 204.56652 85.21192) (size 0.889) (layers Composant Cuivre) (net 89)) - (segment (start 204.56652 85.21192) (end 204.56652 90.96248) (width 0.254) (layer Cuivre) (net 89)) + (via (at 205.66126 78.74) (size 0.889) (layers Composant Cuivre) (net 88)) + (segment (start 197.1802 98.7552) (end 197.1802 100.7745) (width 0.254) (layer Composant) (net 88) (status 400)) + (segment (start 197.104 98.679) (end 197.1802 98.7552) (width 0.254) (layer Composant) (net 88)) + (via (at 197.104 98.679) (size 0.889) (layers Composant Cuivre) (net 88)) + (segment (start 197.104 96.647) (end 197.104 98.679) (width 0.254) (layer Cuivre) (net 88)) + (segment (start 199.136 95.123) (end 198.628 95.123) (width 0.254) (layer Cuivre) (net 88)) + (segment (start 202.819 91.44) (end 202.819 81.58226) (width 0.254) (layer Cuivre) (net 88)) + (segment (start 202.819 81.58226) (end 205.66126 78.74) (width 0.254) (layer Cuivre) (net 88)) + (segment (start 198.628 95.123) (end 197.104 96.647) (width 0.254) (layer Cuivre) (net 88)) + (segment (start 205.4225 76.835) (end 205.4225 77.83068) (width 0.254) (layer Composant) (net 88) (status 800)) + (segment (start 205.66126 78.06944) (end 205.66126 78.74) (width 0.254) (layer Composant) (net 88)) + (segment (start 205.4225 77.83068) (end 205.66126 78.06944) (width 0.254) (layer Composant) (net 88)) (segment (start 205.4225 80.645) (end 205.4225 84.35594) (width 0.254) (layer Composant) (net 89) (status 800)) - (segment (start 180.721 111.45774) (end 189.83706 111.45774) (width 0.254) (layer Composant) (net 90)) - (segment (start 189.83706 111.45774) (end 189.88532 111.506) (width 0.254) (layer Composant) (net 90)) - (segment (start 178.054 105.664) (end 180.721 108.331) (width 0.254) (layer Cuivre) (net 90)) - (segment (start 190.9445 111.506) (end 189.88532 111.506) (width 0.254) (layer Composant) (net 90) (status 800)) - (segment (start 154.686 89.154) (end 151.765 89.154) (width 0.254) (layer Cuivre) (net 90)) - (segment (start 151.765 89.154) (end 151.003 89.916) (width 0.254) (layer Cuivre) (net 90)) - (segment (start 151.003 89.916) (end 136.906 89.916) (width 0.254) (layer Cuivre) (net 90)) - (segment (start 154.813 87.757) (end 156.21 86.36) (width 0.254) (layer Cuivre) (net 90)) - (segment (start 154.813 86.995) (end 155.194 86.614) (width 0.254) (layer GND_layer) (net 90)) - (segment (start 155.194 86.614) (end 157.734 86.614) (width 0.254) (layer GND_layer) (net 90)) - (segment (start 157.734 86.614) (end 159.004 87.884) (width 0.254) (layer GND_layer) (net 90)) - (segment (start 159.004 87.884) (end 159.004 88.646) (width 0.254) (layer GND_layer) (net 90)) - (segment (start 154.813 87.757) (end 154.813 86.995) (width 0.254) (layer GND_layer) (net 90)) - (segment (start 154.813 89.027) (end 154.686 89.154) (width 0.254) (layer Cuivre) (net 90)) - (segment (start 180.721 108.331) (end 180.721 111.45774) (width 0.254) (layer Cuivre) (net 90)) - (segment (start 153.924 136.906) (end 155.194 138.176) (width 0.254) (layer GND_layer) (net 90) (status 800)) - (segment (start 160.274 89.916) (end 159.004 88.646) (width 0.254) (layer GND_layer) (net 90)) - (segment (start 155.194 138.176) (end 164.846 138.176) (width 0.254) (layer GND_layer) (net 90)) - (segment (start 169.926 118.491) (end 160.274 108.839) (width 0.254) (layer GND_layer) (net 90)) - (segment (start 169.926 126.238) (end 169.926 118.491) (width 0.254) (layer GND_layer) (net 90)) - (segment (start 168.656 127.508) (end 169.926 126.238) (width 0.254) (layer GND_layer) (net 90)) - (segment (start 168.656 131.699) (end 168.656 127.508) (width 0.254) (layer GND_layer) (net 90)) - (segment (start 165.354 135.001) (end 168.656 131.699) (width 0.254) (layer GND_layer) (net 90)) - (segment (start 165.354 137.668) (end 165.354 135.001) (width 0.254) (layer GND_layer) (net 90)) - (segment (start 154.813 87.757) (end 154.813 89.027) (width 0.254) (layer Cuivre) (net 90)) - (via (at 132.461 92.075) (size 0.635) (layers Composant Cuivre) (net 90)) - (via (at 178.054 105.664) (size 0.889) (layers Composant Cuivre) (net 90)) - (via (at 179.197 86.487) (size 0.889) (layers Composant Cuivre) (net 90)) - (via (at 154.813 87.757) (size 0.889) (layers Composant Cuivre) (net 90)) - (segment (start 136.906 89.916) (end 134.747 92.075) (width 0.254) (layer Cuivre) (net 90)) - (via (at 180.721 111.45774) (size 0.889) (layers Composant Cuivre) (net 90)) - (segment (start 132.3848 92.5576) (end 132.461 92.075) (width 0.254) (layer Composant) (net 90)) - (segment (start 164.846 138.176) (end 165.354 137.668) (width 0.254) (layer GND_layer) (net 90)) - (segment (start 132.3848 93.726) (end 132.3848 92.5576) (width 0.254) (layer Composant) (net 90) (status 800)) - (segment (start 177.8 105.283) (end 178.054 105.664) (width 0.254) (layer GND_layer) (net 90)) - (segment (start 177.8 90.424) (end 177.8 105.283) (width 0.254) (layer GND_layer) (net 90)) - (segment (start 179.197 89.027) (end 177.8 90.424) (width 0.254) (layer GND_layer) (net 90)) - (segment (start 179.197 86.487) (end 179.197 89.027) (width 0.254) (layer GND_layer) (net 90)) - (segment (start 178.816 86.106) (end 179.197 86.487) (width 0.254) (layer Cuivre) (net 90)) - (segment (start 177.673 86.106) (end 178.816 86.106) (width 0.254) (layer Cuivre) (net 90)) - (segment (start 176.53 84.963) (end 177.673 86.106) (width 0.254) (layer Cuivre) (net 90)) - (segment (start 174.625 84.963) (end 176.53 84.963) (width 0.254) (layer Cuivre) (net 90)) - (segment (start 173.482 86.106) (end 174.625 84.963) (width 0.254) (layer Cuivre) (net 90)) - (segment (start 167.513 86.106) (end 173.482 86.106) (width 0.254) (layer Cuivre) (net 90)) - (segment (start 167.259 86.36) (end 167.513 86.106) (width 0.254) (layer Cuivre) (net 90)) - (segment (start 156.21 86.36) (end 167.259 86.36) (width 0.254) (layer Cuivre) (net 90)) - (segment (start 134.747 92.075) (end 132.461 92.075) (width 0.254) (layer Cuivre) (net 90)) + (segment (start 204.56652 85.21192) (end 204.56652 90.96248) (width 0.254) (layer Cuivre) (net 89)) + (via (at 204.56652 85.21192) (size 0.889) (layers Composant Cuivre) (net 89)) + (segment (start 205.4225 84.35594) (end 204.56652 85.21192) (width 0.254) (layer Composant) (net 89)) + (segment (start 197.6755 99.3775) (end 198.247 98.806) (width 0.254) (layer Composant) (net 89)) + (segment (start 197.6755 100.7745) (end 197.6755 99.3775) (width 0.254) (layer Composant) (net 89) (status 800)) + (segment (start 199.39 96.139) (end 204.56652 90.96248) (width 0.254) (layer Cuivre) (net 89)) + (segment (start 198.247 98.806) (end 198.247 97.282) (width 0.254) (layer Composant) (net 89)) + (segment (start 198.247 97.282) (end 199.39 96.139) (width 0.254) (layer Composant) (net 89)) + (via (at 199.39 96.139) (size 0.889) (layers Composant Cuivre) (net 89)) (segment (start 160.274 108.839) (end 160.274 89.916) (width 0.254) (layer GND_layer) (net 90)) - (via (at 174.752 89.408) (size 0.889) (layers Composant Cuivre) (net 91)) - (via (at 135.89 96.139) (size 0.889) (layers Composant Cuivre) (net 91)) - (segment (start 175.768 110.363) (end 178.054 110.363) (width 0.254) (layer GND_layer) (net 91)) - (segment (start 173.355 107.95) (end 175.768 110.363) (width 0.254) (layer GND_layer) (net 91)) - (segment (start 179.451 106.68) (end 182.51678 106.68) (width 0.254) (layer Composant) (net 91)) - (segment (start 173.355 90.297) (end 173.355 107.95) (width 0.254) (layer GND_layer) (net 91)) - (segment (start 174.244 89.408) (end 173.355 90.297) (width 0.254) (layer GND_layer) (net 91)) - (segment (start 182.87492 107.03814) (end 189.85738 107.03814) (width 0.254) (layer Composant) (net 91)) - (via (at 178.054 110.363) (size 0.889) (layers Composant Cuivre) (net 91)) - (via (at 154.432 91.948) (size 0.635) (layers Composant Cuivre) (net 91)) - (segment (start 178.054 110.363) (end 178.054 108.077) (width 0.254) (layer Composant) (net 91)) - (segment (start 178.054 108.077) (end 179.451 106.68) (width 0.254) (layer Composant) (net 91)) - (segment (start 189.85738 107.03814) (end 189.88532 107.0102) (width 0.254) (layer Composant) (net 91)) - (segment (start 135.89 96.139) (end 136.017 95.504) (width 0.254) (layer Cuivre) (net 91)) - (segment (start 136.017 95.504) (end 139.065 92.456) (width 0.254) (layer Cuivre) (net 91)) - (segment (start 139.065 92.456) (end 152.273 92.456) (width 0.254) (layer Cuivre) (net 91)) - (segment (start 152.273 92.456) (end 152.781 91.948) (width 0.254) (layer Cuivre) (net 91)) - (segment (start 190.9445 107.0102) (end 189.88532 107.0102) (width 0.254) (layer Composant) (net 91) (status 800)) - (segment (start 152.781 91.948) (end 154.432 91.948) (width 0.254) (layer Cuivre) (net 91)) - (segment (start 151.384 136.906) (end 158.877 129.413) (width 0.254) (layer GND_layer) (net 91) (status 800)) - (segment (start 158.877 129.413) (end 158.877 117.475) (width 0.254) (layer GND_layer) (net 91)) - (segment (start 174.752 89.408) (end 174.244 89.408) (width 0.254) (layer GND_layer) (net 91)) - (segment (start 158.877 117.475) (end 155.702 114.3) (width 0.254) (layer GND_layer) (net 91)) - (segment (start 155.702 114.3) (end 155.702 93.218) (width 0.254) (layer GND_layer) (net 91)) - (segment (start 155.702 93.218) (end 154.432 91.948) (width 0.254) (layer GND_layer) (net 91)) - (segment (start 135.382 93.726) (end 135.382 95.123) (width 0.254) (layer Composant) (net 91) (status 800)) - (segment (start 156.972 91.948) (end 154.432 91.948) (width 0.254) (layer Cuivre) (net 91)) - (segment (start 159.512 89.408) (end 156.972 91.948) (width 0.254) (layer Cuivre) (net 91)) - (segment (start 164.973 89.408) (end 159.512 89.408) (width 0.254) (layer Cuivre) (net 91)) - (segment (start 165.608 90.043) (end 164.973 89.408) (width 0.254) (layer Cuivre) (net 91)) - (segment (start 173.609 90.043) (end 165.608 90.043) (width 0.254) (layer Cuivre) (net 91)) - (segment (start 174.244 89.408) (end 173.609 90.043) (width 0.254) (layer Cuivre) (net 91)) - (segment (start 174.752 89.408) (end 174.244 89.408) (width 0.254) (layer Cuivre) (net 91)) - (segment (start 135.636 95.377) (end 135.89 96.139) (width 0.254) (layer Composant) (net 91)) - (segment (start 135.382 95.123) (end 135.636 95.377) (width 0.254) (layer Composant) (net 91)) + (segment (start 134.747 92.075) (end 132.461 92.075) (width 0.254) (layer Cuivre) (net 90)) + (segment (start 156.21 86.36) (end 167.259 86.36) (width 0.254) (layer Cuivre) (net 90)) + (segment (start 167.259 86.36) (end 167.513 86.106) (width 0.254) (layer Cuivre) (net 90)) + (segment (start 167.513 86.106) (end 173.482 86.106) (width 0.254) (layer Cuivre) (net 90)) + (segment (start 173.482 86.106) (end 174.625 84.963) (width 0.254) (layer Cuivre) (net 90)) + (segment (start 174.625 84.963) (end 176.53 84.963) (width 0.254) (layer Cuivre) (net 90)) + (segment (start 176.53 84.963) (end 177.673 86.106) (width 0.254) (layer Cuivre) (net 90)) + (segment (start 177.673 86.106) (end 178.816 86.106) (width 0.254) (layer Cuivre) (net 90)) + (segment (start 178.816 86.106) (end 179.197 86.487) (width 0.254) (layer Cuivre) (net 90)) + (segment (start 179.197 86.487) (end 179.197 89.027) (width 0.254) (layer GND_layer) (net 90)) + (segment (start 179.197 89.027) (end 177.8 90.424) (width 0.254) (layer GND_layer) (net 90)) + (segment (start 177.8 90.424) (end 177.8 105.283) (width 0.254) (layer GND_layer) (net 90)) + (segment (start 177.8 105.283) (end 178.054 105.664) (width 0.254) (layer GND_layer) (net 90)) + (segment (start 132.3848 93.726) (end 132.3848 92.5576) (width 0.254) (layer Composant) (net 90) (status 800)) + (segment (start 164.846 138.176) (end 165.354 137.668) (width 0.254) (layer GND_layer) (net 90)) + (segment (start 132.3848 92.5576) (end 132.461 92.075) (width 0.254) (layer Composant) (net 90)) + (via (at 180.721 111.45774) (size 0.889) (layers Composant Cuivre) (net 90)) + (segment (start 136.906 89.916) (end 134.747 92.075) (width 0.254) (layer Cuivre) (net 90)) + (via (at 154.813 87.757) (size 0.889) (layers Composant Cuivre) (net 90)) + (via (at 179.197 86.487) (size 0.889) (layers Composant Cuivre) (net 90)) + (via (at 178.054 105.664) (size 0.889) (layers Composant Cuivre) (net 90)) + (via (at 132.461 92.075) (size 0.635) (layers Composant Cuivre) (net 90)) + (segment (start 154.813 87.757) (end 154.813 89.027) (width 0.254) (layer Cuivre) (net 90)) + (segment (start 165.354 137.668) (end 165.354 135.001) (width 0.254) (layer GND_layer) (net 90)) + (segment (start 165.354 135.001) (end 168.656 131.699) (width 0.254) (layer GND_layer) (net 90)) + (segment (start 168.656 131.699) (end 168.656 127.508) (width 0.254) (layer GND_layer) (net 90)) + (segment (start 168.656 127.508) (end 169.926 126.238) (width 0.254) (layer GND_layer) (net 90)) + (segment (start 169.926 126.238) (end 169.926 118.491) (width 0.254) (layer GND_layer) (net 90)) + (segment (start 169.926 118.491) (end 160.274 108.839) (width 0.254) (layer GND_layer) (net 90)) + (segment (start 155.194 138.176) (end 164.846 138.176) (width 0.254) (layer GND_layer) (net 90)) + (segment (start 160.274 89.916) (end 159.004 88.646) (width 0.254) (layer GND_layer) (net 90)) + (segment (start 153.924 136.906) (end 155.194 138.176) (width 0.254) (layer GND_layer) (net 90) (status 800)) + (segment (start 180.721 108.331) (end 180.721 111.45774) (width 0.254) (layer Cuivre) (net 90)) + (segment (start 154.813 89.027) (end 154.686 89.154) (width 0.254) (layer Cuivre) (net 90)) + (segment (start 154.813 87.757) (end 154.813 86.995) (width 0.254) (layer GND_layer) (net 90)) + (segment (start 159.004 87.884) (end 159.004 88.646) (width 0.254) (layer GND_layer) (net 90)) + (segment (start 157.734 86.614) (end 159.004 87.884) (width 0.254) (layer GND_layer) (net 90)) + (segment (start 155.194 86.614) (end 157.734 86.614) (width 0.254) (layer GND_layer) (net 90)) + (segment (start 154.813 86.995) (end 155.194 86.614) (width 0.254) (layer GND_layer) (net 90)) + (segment (start 154.813 87.757) (end 156.21 86.36) (width 0.254) (layer Cuivre) (net 90)) + (segment (start 151.003 89.916) (end 136.906 89.916) (width 0.254) (layer Cuivre) (net 90)) + (segment (start 151.765 89.154) (end 151.003 89.916) (width 0.254) (layer Cuivre) (net 90)) + (segment (start 154.686 89.154) (end 151.765 89.154) (width 0.254) (layer Cuivre) (net 90)) + (segment (start 190.9445 111.506) (end 189.88532 111.506) (width 0.254) (layer Composant) (net 90) (status 800)) + (segment (start 178.054 105.664) (end 180.721 108.331) (width 0.254) (layer Cuivre) (net 90)) + (segment (start 189.83706 111.45774) (end 189.88532 111.506) (width 0.254) (layer Composant) (net 90)) + (segment (start 180.721 111.45774) (end 189.83706 111.45774) (width 0.254) (layer Composant) (net 90)) (segment (start 182.51678 106.68) (end 182.87492 107.03814) (width 0.254) (layer Composant) (net 91)) - (segment (start 204.2287 116.9543) (end 205.867 115.316) (width 0.254) (layer Cuivre) (net 92)) - (segment (start 205.867 91.313) (end 205.867 115.316) (width 0.254) (layer Cuivre) (net 92)) - (segment (start 205.867 91.313) (end 223.52 73.66) (width 0.254) (layer Cuivre) (net 92) (status 400)) - (segment (start 204.14488 116.9543) (end 204.2287 116.9543) (width 0.254) (layer Cuivre) (net 92)) - (via (at 204.14488 116.9543) (size 0.889) (layers Composant Cuivre) (net 92)) - (segment (start 218.86418 69.00418) (end 218.44 69.00418) (width 0.254) (layer Composant) (net 92)) - (segment (start 223.52 73.66) (end 218.86418 69.00418) (width 0.254) (layer Composant) (net 92) (status 800)) - (segment (start 218.44 68.2625) (end 218.44 69.00418) (width 0.254) (layer Composant) (net 92) (status 800)) - (segment (start 204.14488 118.72214) (end 204.14488 116.9543) (width 0.254) (layer Composant) (net 92)) - (segment (start 201.1807 121.68632) (end 204.14488 118.72214) (width 0.254) (layer Composant) (net 92)) + (segment (start 135.382 95.123) (end 135.636 95.377) (width 0.254) (layer Composant) (net 91)) + (segment (start 135.636 95.377) (end 135.89 96.139) (width 0.254) (layer Composant) (net 91)) + (segment (start 174.752 89.408) (end 174.244 89.408) (width 0.254) (layer Cuivre) (net 91)) + (segment (start 174.244 89.408) (end 173.609 90.043) (width 0.254) (layer Cuivre) (net 91)) + (segment (start 173.609 90.043) (end 165.608 90.043) (width 0.254) (layer Cuivre) (net 91)) + (segment (start 165.608 90.043) (end 164.973 89.408) (width 0.254) (layer Cuivre) (net 91)) + (segment (start 164.973 89.408) (end 159.512 89.408) (width 0.254) (layer Cuivre) (net 91)) + (segment (start 159.512 89.408) (end 156.972 91.948) (width 0.254) (layer Cuivre) (net 91)) + (segment (start 156.972 91.948) (end 154.432 91.948) (width 0.254) (layer Cuivre) (net 91)) + (segment (start 135.382 93.726) (end 135.382 95.123) (width 0.254) (layer Composant) (net 91) (status 800)) + (segment (start 155.702 93.218) (end 154.432 91.948) (width 0.254) (layer GND_layer) (net 91)) + (segment (start 155.702 114.3) (end 155.702 93.218) (width 0.254) (layer GND_layer) (net 91)) + (segment (start 158.877 117.475) (end 155.702 114.3) (width 0.254) (layer GND_layer) (net 91)) + (segment (start 174.752 89.408) (end 174.244 89.408) (width 0.254) (layer GND_layer) (net 91)) + (segment (start 158.877 129.413) (end 158.877 117.475) (width 0.254) (layer GND_layer) (net 91)) + (segment (start 151.384 136.906) (end 158.877 129.413) (width 0.254) (layer GND_layer) (net 91) (status 800)) + (segment (start 152.781 91.948) (end 154.432 91.948) (width 0.254) (layer Cuivre) (net 91)) + (segment (start 190.9445 107.0102) (end 189.88532 107.0102) (width 0.254) (layer Composant) (net 91) (status 800)) + (segment (start 152.273 92.456) (end 152.781 91.948) (width 0.254) (layer Cuivre) (net 91)) + (segment (start 139.065 92.456) (end 152.273 92.456) (width 0.254) (layer Cuivre) (net 91)) + (segment (start 136.017 95.504) (end 139.065 92.456) (width 0.254) (layer Cuivre) (net 91)) + (segment (start 135.89 96.139) (end 136.017 95.504) (width 0.254) (layer Cuivre) (net 91)) + (segment (start 189.85738 107.03814) (end 189.88532 107.0102) (width 0.254) (layer Composant) (net 91)) + (segment (start 178.054 108.077) (end 179.451 106.68) (width 0.254) (layer Composant) (net 91)) + (segment (start 178.054 110.363) (end 178.054 108.077) (width 0.254) (layer Composant) (net 91)) + (via (at 154.432 91.948) (size 0.635) (layers Composant Cuivre) (net 91)) + (via (at 178.054 110.363) (size 0.889) (layers Composant Cuivre) (net 91)) + (segment (start 182.87492 107.03814) (end 189.85738 107.03814) (width 0.254) (layer Composant) (net 91)) + (segment (start 174.244 89.408) (end 173.355 90.297) (width 0.254) (layer GND_layer) (net 91)) + (segment (start 173.355 90.297) (end 173.355 107.95) (width 0.254) (layer GND_layer) (net 91)) + (segment (start 179.451 106.68) (end 182.51678 106.68) (width 0.254) (layer Composant) (net 91)) + (segment (start 173.355 107.95) (end 175.768 110.363) (width 0.254) (layer GND_layer) (net 91)) + (segment (start 175.768 110.363) (end 178.054 110.363) (width 0.254) (layer GND_layer) (net 91)) + (via (at 135.89 96.139) (size 0.889) (layers Composant Cuivre) (net 91)) + (via (at 174.752 89.408) (size 0.889) (layers Composant Cuivre) (net 91)) (segment (start 201.1807 122.7455) (end 201.1807 121.68632) (width 0.254) (layer Composant) (net 92) (status 800)) - (via (at 210.43138 103.47706) (size 0.889) (layers Composant Cuivre) (net 93)) - (segment (start 209.1817 100.7745) (end 209.1817 101.83368) (width 0.254) (layer Composant) (net 93) (status 800)) - (segment (start 224.58172 74.68362) (end 224.58172 72.18172) (width 0.254) (layer GND_layer) (net 93)) - (segment (start 224.5106 74.75474) (end 224.58172 74.68362) (width 0.254) (layer GND_layer) (net 93)) - (segment (start 223.46412 74.75474) (end 224.5106 74.75474) (width 0.254) (layer GND_layer) (net 93)) - (segment (start 210.86064 87.35822) (end 223.46412 74.75474) (width 0.254) (layer GND_layer) (net 93)) - (segment (start 210.86064 98.9711) (end 210.86064 87.35822) (width 0.254) (layer GND_layer) (net 93)) - (segment (start 210.43138 99.40036) (end 210.86064 98.9711) (width 0.254) (layer GND_layer) (net 93)) - (segment (start 210.43138 103.47706) (end 210.43138 99.40036) (width 0.254) (layer GND_layer) (net 93)) - (segment (start 209.1817 101.83368) (end 210.43138 103.08336) (width 0.254) (layer Composant) (net 93)) - (segment (start 224.58172 72.18172) (end 223.52 71.12) (width 0.254) (layer GND_layer) (net 93) (status 400)) + (segment (start 201.1807 121.68632) (end 204.14488 118.72214) (width 0.254) (layer Composant) (net 92)) + (segment (start 204.14488 118.72214) (end 204.14488 116.9543) (width 0.254) (layer Composant) (net 92)) + (segment (start 218.44 68.2625) (end 218.44 69.00418) (width 0.254) (layer Composant) (net 92) (status 800)) + (segment (start 223.52 73.66) (end 218.86418 69.00418) (width 0.254) (layer Composant) (net 92) (status 800)) + (segment (start 218.86418 69.00418) (end 218.44 69.00418) (width 0.254) (layer Composant) (net 92)) + (via (at 204.14488 116.9543) (size 0.889) (layers Composant Cuivre) (net 92)) + (segment (start 204.14488 116.9543) (end 204.2287 116.9543) (width 0.254) (layer Cuivre) (net 92)) + (segment (start 205.867 91.313) (end 223.52 73.66) (width 0.254) (layer Cuivre) (net 92) (status 400)) + (segment (start 205.867 91.313) (end 205.867 115.316) (width 0.254) (layer Cuivre) (net 92)) + (segment (start 204.2287 116.9543) (end 205.867 115.316) (width 0.254) (layer Cuivre) (net 92)) (segment (start 210.43138 103.08336) (end 210.43138 103.47706) (width 0.254) (layer Composant) (net 93)) - (segment (start 207.772 112.25276) (end 207.772 107.44454) (width 0.254) (layer GND_layer) (net 94)) - (segment (start 209.37982 113.86058) (end 207.772 112.25276) (width 0.254) (layer GND_layer) (net 94)) - (via (at 209.37982 113.86058) (size 0.889) (layers Composant Cuivre) (net 94)) - (segment (start 208.6737 114.5667) (end 209.37982 113.86058) (width 0.254) (layer Composant) (net 94)) - (segment (start 208.6737 122.7455) (end 208.6737 114.5667) (width 0.254) (layer Composant) (net 94) (status 800)) - (segment (start 213.26856 86.45144) (end 223.52 76.2) (width 0.254) (layer GND_layer) (net 94) (status 400)) - (segment (start 213.26856 101.94798) (end 213.26856 86.45144) (width 0.254) (layer GND_layer) (net 94)) + (segment (start 224.58172 72.18172) (end 223.52 71.12) (width 0.254) (layer GND_layer) (net 93) (status 400)) + (segment (start 209.1817 101.83368) (end 210.43138 103.08336) (width 0.254) (layer Composant) (net 93)) + (segment (start 210.43138 103.47706) (end 210.43138 99.40036) (width 0.254) (layer GND_layer) (net 93)) + (segment (start 210.43138 99.40036) (end 210.86064 98.9711) (width 0.254) (layer GND_layer) (net 93)) + (segment (start 210.86064 98.9711) (end 210.86064 87.35822) (width 0.254) (layer GND_layer) (net 93)) + (segment (start 210.86064 87.35822) (end 223.46412 74.75474) (width 0.254) (layer GND_layer) (net 93)) + (segment (start 223.46412 74.75474) (end 224.5106 74.75474) (width 0.254) (layer GND_layer) (net 93)) + (segment (start 224.5106 74.75474) (end 224.58172 74.68362) (width 0.254) (layer GND_layer) (net 93)) + (segment (start 224.58172 74.68362) (end 224.58172 72.18172) (width 0.254) (layer GND_layer) (net 93)) + (segment (start 209.1817 100.7745) (end 209.1817 101.83368) (width 0.254) (layer Composant) (net 93) (status 800)) + (via (at 210.43138 103.47706) (size 0.889) (layers Composant Cuivre) (net 93)) (segment (start 207.772 107.44454) (end 213.26856 101.94798) (width 0.254) (layer GND_layer) (net 94)) - (segment (start 222.83928 74.78776) (end 201.1807 96.44634) (width 0.254) (layer Composant) (net 95)) - (segment (start 224.57918 74.71664) (end 224.50806 74.78776) (width 0.254) (layer Composant) (net 95)) - (segment (start 224.57918 69.63918) (end 224.57918 74.71664) (width 0.254) (layer Composant) (net 95)) - (segment (start 223.52 68.58) (end 224.57918 69.63918) (width 0.254) (layer Composant) (net 95) (status 800)) - (segment (start 224.50806 74.78776) (end 222.83928 74.78776) (width 0.254) (layer Composant) (net 95)) + (segment (start 213.26856 101.94798) (end 213.26856 86.45144) (width 0.254) (layer GND_layer) (net 94)) + (segment (start 213.26856 86.45144) (end 223.52 76.2) (width 0.254) (layer GND_layer) (net 94) (status 400)) + (segment (start 208.6737 122.7455) (end 208.6737 114.5667) (width 0.254) (layer Composant) (net 94) (status 800)) + (segment (start 208.6737 114.5667) (end 209.37982 113.86058) (width 0.254) (layer Composant) (net 94)) + (via (at 209.37982 113.86058) (size 0.889) (layers Composant Cuivre) (net 94)) + (segment (start 209.37982 113.86058) (end 207.772 112.25276) (width 0.254) (layer GND_layer) (net 94)) + (segment (start 207.772 112.25276) (end 207.772 107.44454) (width 0.254) (layer GND_layer) (net 94)) (segment (start 201.1807 96.44634) (end 201.1807 100.7745) (width 0.254) (layer Composant) (net 95) (status 400)) - (segment (start 222.25 88.9) (end 214.26678 88.9) (width 0.254) (layer Composant) (net 96) (status 800)) - (segment (start 214.26678 88.9) (end 205.1812 97.98558) (width 0.254) (layer Composant) (net 96)) + (segment (start 224.50806 74.78776) (end 222.83928 74.78776) (width 0.254) (layer Composant) (net 95)) + (segment (start 223.52 68.58) (end 224.57918 69.63918) (width 0.254) (layer Composant) (net 95) (status 800)) + (segment (start 224.57918 69.63918) (end 224.57918 74.71664) (width 0.254) (layer Composant) (net 95)) + (segment (start 224.57918 74.71664) (end 224.50806 74.78776) (width 0.254) (layer Composant) (net 95)) + (segment (start 222.83928 74.78776) (end 201.1807 96.44634) (width 0.254) (layer Composant) (net 95)) (segment (start 205.1812 97.98558) (end 205.1812 100.7745) (width 0.254) (layer Composant) (net 96) (status 400)) - (segment (start 205.6765 98.21926) (end 212.45576 91.44) (width 0.254) (layer Composant) (net 97)) - (segment (start 212.45576 91.44) (end 222.25 91.44) (width 0.254) (layer Composant) (net 97) (status 400)) + (segment (start 214.26678 88.9) (end 205.1812 97.98558) (width 0.254) (layer Composant) (net 96)) + (segment (start 222.25 88.9) (end 214.26678 88.9) (width 0.254) (layer Composant) (net 96) (status 800)) (segment (start 205.6765 100.7745) (end 205.6765 98.21926) (width 0.254) (layer Composant) (net 97) (status 800)) - (segment (start 221.9579 114.0079) (end 222.25 114.3) (width 0.254) (layer Composant) (net 98) (status 400)) + (segment (start 212.45576 91.44) (end 222.25 91.44) (width 0.254) (layer Composant) (net 97) (status 400)) + (segment (start 205.6765 98.21926) (end 212.45576 91.44) (width 0.254) (layer Composant) (net 97)) (segment (start 212.9155 114.0079) (end 221.9579 114.0079) (width 0.254) (layer Composant) (net 98) (status 800)) - (segment (start 216.68994 115.28044) (end 218.2495 116.84) (width 0.254) (layer 3.3V_layer) (net 99)) - (segment (start 212.9155 115.5065) (end 216.46388 115.5065) (width 0.254) (layer Composant) (net 99) (status 800)) - (segment (start 216.46388 115.5065) (end 216.68994 115.28044) (width 0.254) (layer Composant) (net 99)) - (via (at 216.68994 115.28044) (size 0.889) (layers Composant Cuivre) (net 99)) + (segment (start 221.9579 114.0079) (end 222.25 114.3) (width 0.254) (layer Composant) (net 98) (status 400)) (segment (start 218.2495 116.84) (end 222.25 116.84) (width 0.254) (layer 3.3V_layer) (net 99) (status 400)) - (segment (start 212.9155 118.0084) (end 219.5449 118.0084) (width 0.254) (layer Composant) (net 100) (status 800)) - (segment (start 220.9165 119.38) (end 222.25 119.38) (width 0.254) (layer Composant) (net 100) (status 400)) + (via (at 216.68994 115.28044) (size 0.889) (layers Composant Cuivre) (net 99)) + (segment (start 216.46388 115.5065) (end 216.68994 115.28044) (width 0.254) (layer Composant) (net 99)) + (segment (start 212.9155 115.5065) (end 216.46388 115.5065) (width 0.254) (layer Composant) (net 99) (status 800)) + (segment (start 216.68994 115.28044) (end 218.2495 116.84) (width 0.254) (layer 3.3V_layer) (net 99)) (segment (start 219.5449 118.0084) (end 220.9165 119.38) (width 0.254) (layer Composant) (net 100)) - (segment (start 219.837 119.507) (end 222.25 121.92) (width 0.254) (layer Composant) (net 101) (status 400)) + (segment (start 220.9165 119.38) (end 222.25 119.38) (width 0.254) (layer Composant) (net 100) (status 400)) + (segment (start 212.9155 118.0084) (end 219.5449 118.0084) (width 0.254) (layer Composant) (net 100) (status 800)) (segment (start 212.9155 119.507) (end 219.837 119.507) (width 0.254) (layer Composant) (net 101) (status 800)) - (segment (start 218.3003 120.5103) (end 222.25 124.46) (width 0.254) (layer Composant) (net 102) (status 400)) + (segment (start 219.837 119.507) (end 222.25 121.92) (width 0.254) (layer Composant) (net 101) (status 400)) (segment (start 212.9155 120.5103) (end 218.3003 120.5103) (width 0.254) (layer Composant) (net 102) (status 800)) - (segment (start 221.361 127) (end 222.25 127) (width 0.254) (layer Composant) (net 103) (status 400)) - (segment (start 218.186 123.80468) (end 218.186 123.825) (width 0.254) (layer Composant) (net 103)) - (segment (start 210.6803 123.80468) (end 218.186 123.80468) (width 0.254) (layer Composant) (net 103)) - (segment (start 210.6803 122.7455) (end 210.6803 123.80468) (width 0.254) (layer Composant) (net 103) (status 800)) + (segment (start 218.3003 120.5103) (end 222.25 124.46) (width 0.254) (layer Composant) (net 102) (status 400)) (segment (start 218.186 123.825) (end 221.361 127) (width 0.254) (layer Composant) (net 103)) - (segment (start 212.41512 129.54) (end 206.6798 123.80468) (width 0.254) (layer Composant) (net 104)) - (segment (start 222.25 129.54) (end 212.41512 129.54) (width 0.254) (layer Composant) (net 104) (status 800)) + (segment (start 210.6803 122.7455) (end 210.6803 123.80468) (width 0.254) (layer Composant) (net 103) (status 800)) + (segment (start 210.6803 123.80468) (end 218.186 123.80468) (width 0.254) (layer Composant) (net 103)) + (segment (start 218.186 123.80468) (end 218.186 123.825) (width 0.254) (layer Composant) (net 103)) + (segment (start 221.361 127) (end 222.25 127) (width 0.254) (layer Composant) (net 103) (status 400)) (segment (start 206.6798 122.7455) (end 206.6798 123.80468) (width 0.254) (layer Composant) (net 104) (status 800)) - (segment (start 216.8779 132.08) (end 222.25 132.08) (width 0.254) (layer GND_layer) (net 105) (status 400)) - (via (at 210.07324 125.27534) (size 0.889) (layers Composant Cuivre) (net 105)) - (segment (start 210.07324 125.27534) (end 208.79816 125.27534) (width 0.254) (layer Composant) (net 105)) - (segment (start 208.79816 125.27534) (end 207.1751 123.65228) (width 0.254) (layer Composant) (net 105)) - (segment (start 207.1751 123.65228) (end 207.1751 122.7455) (width 0.254) (layer Composant) (net 105) (status 400)) + (segment (start 222.25 129.54) (end 212.41512 129.54) (width 0.254) (layer Composant) (net 104) (status 800)) + (segment (start 212.41512 129.54) (end 206.6798 123.80468) (width 0.254) (layer Composant) (net 104)) (segment (start 210.07324 125.27534) (end 216.8779 132.08) (width 0.254) (layer GND_layer) (net 105)) - (segment (start 205.1812 122.7455) (end 205.1812 126.76378) (width 0.254) (layer Composant) (net 106) (status 800)) - (segment (start 220.77172 133.14172) (end 222.25 134.62) (width 0.254) (layer Composant) (net 106) (status 400)) - (segment (start 211.55914 133.14172) (end 220.77172 133.14172) (width 0.254) (layer Composant) (net 106)) + (segment (start 207.1751 123.65228) (end 207.1751 122.7455) (width 0.254) (layer Composant) (net 105) (status 400)) + (segment (start 208.79816 125.27534) (end 207.1751 123.65228) (width 0.254) (layer Composant) (net 105)) + (segment (start 210.07324 125.27534) (end 208.79816 125.27534) (width 0.254) (layer Composant) (net 105)) + (via (at 210.07324 125.27534) (size 0.889) (layers Composant Cuivre) (net 105)) + (segment (start 216.8779 132.08) (end 222.25 132.08) (width 0.254) (layer GND_layer) (net 105) (status 400)) (segment (start 205.1812 126.76378) (end 211.55914 133.14172) (width 0.254) (layer Composant) (net 106)) - (segment (start 214.34044 137.16) (end 222.25 137.16) (width 0.254) (layer Composant) (net 107) (status 400)) - (segment (start 204.6859 122.7455) (end 204.6859 127.50546) (width 0.254) (layer Composant) (net 107) (status 800)) + (segment (start 211.55914 133.14172) (end 220.77172 133.14172) (width 0.254) (layer Composant) (net 106)) + (segment (start 220.77172 133.14172) (end 222.25 134.62) (width 0.254) (layer Composant) (net 106) (status 400)) + (segment (start 205.1812 122.7455) (end 205.1812 126.76378) (width 0.254) (layer Composant) (net 106) (status 800)) (segment (start 204.6859 127.50546) (end 214.34044 137.16) (width 0.254) (layer Composant) (net 107)) - (segment (start 222.25 93.98) (end 211.37372 93.98) (width 0.254) (layer Composant) (net 108) (status 800)) - (segment (start 207.6831 97.67062) (end 207.6831 100.7745) (width 0.254) (layer Composant) (net 108) (status 400)) + (segment (start 204.6859 122.7455) (end 204.6859 127.50546) (width 0.254) (layer Composant) (net 107) (status 800)) + (segment (start 214.34044 137.16) (end 222.25 137.16) (width 0.254) (layer Composant) (net 107) (status 400)) (segment (start 211.37372 93.98) (end 207.6831 97.67062) (width 0.254) (layer Composant) (net 108)) - (segment (start 208.1784 97.9043) (end 208.1784 100.7745) (width 0.254) (layer Composant) (net 109) (status 400)) - (segment (start 225.86442 92.51442) (end 225.86442 94.98838) (width 0.254) (layer Composant) (net 109)) - (segment (start 225.6663 95.1865) (end 210.8962 95.1865) (width 0.254) (layer Composant) (net 109)) - (segment (start 225.86442 94.98838) (end 225.6663 95.1865) (width 0.254) (layer Composant) (net 109)) - (segment (start 224.79 91.44) (end 225.86442 92.51442) (width 0.254) (layer Composant) (net 109) (status 800)) + (segment (start 207.6831 97.67062) (end 207.6831 100.7745) (width 0.254) (layer Composant) (net 108) (status 400)) + (segment (start 222.25 93.98) (end 211.37372 93.98) (width 0.254) (layer Composant) (net 108) (status 800)) (segment (start 210.8962 95.1865) (end 208.1784 97.9043) (width 0.254) (layer Composant) (net 109)) - (segment (start 211.91474 92.71) (end 206.1845 98.44024) (width 0.254) (layer Composant) (net 110)) - (segment (start 224.79 93.98) (end 223.52 92.71) (width 0.254) (layer Composant) (net 110) (status 800)) - (segment (start 206.1845 98.44024) (end 206.1845 100.7745) (width 0.254) (layer Composant) (net 110) (status 400)) + (segment (start 224.79 91.44) (end 225.86442 92.51442) (width 0.254) (layer Composant) (net 109) (status 800)) + (segment (start 225.86442 94.98838) (end 225.6663 95.1865) (width 0.254) (layer Composant) (net 109)) + (segment (start 225.6663 95.1865) (end 210.8962 95.1865) (width 0.254) (layer Composant) (net 109)) + (segment (start 225.86442 92.51442) (end 225.86442 94.98838) (width 0.254) (layer Composant) (net 109)) + (segment (start 208.1784 97.9043) (end 208.1784 100.7745) (width 0.254) (layer Composant) (net 109) (status 400)) (segment (start 223.52 92.71) (end 211.91474 92.71) (width 0.254) (layer Composant) (net 110)) - (segment (start 223.52 97.79) (end 224.79 96.52) (width 0.254) (layer Composant) (net 111) (status 400)) - (segment (start 208.6737 100.7745) (end 208.6737 98.40976) (width 0.254) (layer Composant) (net 111) (status 800)) - (segment (start 209.29346 97.79) (end 223.52 97.79) (width 0.254) (layer Composant) (net 111)) + (segment (start 206.1845 98.44024) (end 206.1845 100.7745) (width 0.254) (layer Composant) (net 110) (status 400)) + (segment (start 224.79 93.98) (end 223.52 92.71) (width 0.254) (layer Composant) (net 110) (status 800)) + (segment (start 211.91474 92.71) (end 206.1845 98.44024) (width 0.254) (layer Composant) (net 110)) (segment (start 208.6737 98.40976) (end 209.29346 97.79) (width 0.254) (layer Composant) (net 111)) - (segment (start 211.1248 100.33) (end 223.52 100.33) (width 0.254) (layer Composant) (net 112)) - (segment (start 210.6803 100.7745) (end 211.1248 100.33) (width 0.254) (layer Composant) (net 112) (status 800)) + (segment (start 209.29346 97.79) (end 223.52 97.79) (width 0.254) (layer Composant) (net 111)) + (segment (start 208.6737 100.7745) (end 208.6737 98.40976) (width 0.254) (layer Composant) (net 111) (status 800)) + (segment (start 223.52 97.79) (end 224.79 96.52) (width 0.254) (layer Composant) (net 111) (status 400)) (segment (start 223.52 100.33) (end 224.79 99.06) (width 0.254) (layer Composant) (net 112) (status 400)) - (segment (start 223.52 102.87) (end 224.79 101.6) (width 0.254) (layer Composant) (net 113) (status 400)) - (segment (start 221.71152 102.87) (end 223.52 102.87) (width 0.254) (layer Composant) (net 113)) - (segment (start 220.56852 104.013) (end 221.71152 102.87) (width 0.254) (layer Composant) (net 113)) + (segment (start 210.6803 100.7745) (end 211.1248 100.33) (width 0.254) (layer Composant) (net 112) (status 800)) + (segment (start 211.1248 100.33) (end 223.52 100.33) (width 0.254) (layer Composant) (net 112)) (segment (start 212.9155 104.013) (end 220.56852 104.013) (width 0.254) (layer Composant) (net 113) (status 800)) - (segment (start 212.9155 105.5116) (end 223.4184 105.5116) (width 0.254) (layer Composant) (net 114) (status 800)) + (segment (start 220.56852 104.013) (end 221.71152 102.87) (width 0.254) (layer Composant) (net 113)) + (segment (start 221.71152 102.87) (end 223.52 102.87) (width 0.254) (layer Composant) (net 113)) + (segment (start 223.52 102.87) (end 224.79 101.6) (width 0.254) (layer Composant) (net 113) (status 400)) (segment (start 223.4184 105.5116) (end 224.79 104.14) (width 0.254) (layer Composant) (net 114) (status 400)) - (segment (start 212.9155 106.5149) (end 218.53144 106.5149) (width 0.254) (layer Composant) (net 115) (status 800)) - (segment (start 219.96654 107.95) (end 223.52 107.95) (width 0.254) (layer Composant) (net 115)) - (segment (start 223.52 107.95) (end 224.79 106.68) (width 0.254) (layer Composant) (net 115) (status 400)) + (segment (start 212.9155 105.5116) (end 223.4184 105.5116) (width 0.254) (layer Composant) (net 114) (status 800)) (segment (start 218.53144 106.5149) (end 219.96654 107.95) (width 0.254) (layer Composant) (net 115)) - (via (at 214.91448 108.00588) (size 0.889) (layers Composant Cuivre) (net 116)) - (segment (start 213.9823 108.00588) (end 214.91448 108.00588) (width 0.254) (layer Composant) (net 116)) - (segment (start 213.97468 108.0135) (end 213.9823 108.00588) (width 0.254) (layer Composant) (net 116)) - (segment (start 214.91448 108.00588) (end 223.57588 108.00588) (width 0.254) (layer 3.3V_layer) (net 116)) - (segment (start 212.9155 108.0135) (end 213.97468 108.0135) (width 0.254) (layer Composant) (net 116) (status 800)) + (segment (start 223.52 107.95) (end 224.79 106.68) (width 0.254) (layer Composant) (net 115) (status 400)) + (segment (start 219.96654 107.95) (end 223.52 107.95) (width 0.254) (layer Composant) (net 115)) + (segment (start 212.9155 106.5149) (end 218.53144 106.5149) (width 0.254) (layer Composant) (net 115) (status 800)) (segment (start 223.57588 108.00588) (end 224.79 109.22) (width 0.254) (layer 3.3V_layer) (net 116) (status 400)) - (segment (start 223.68764 110.65764) (end 224.79 111.76) (width 0.254) (layer Composant) (net 117) (status 400)) - (segment (start 212.9155 109.0041) (end 217.10142 109.0041) (width 0.254) (layer Composant) (net 117) (status 800)) - (segment (start 217.10142 109.0041) (end 218.75496 110.65764) (width 0.254) (layer Composant) (net 117)) + (segment (start 212.9155 108.0135) (end 213.97468 108.0135) (width 0.254) (layer Composant) (net 116) (status 800)) + (segment (start 214.91448 108.00588) (end 223.57588 108.00588) (width 0.254) (layer 3.3V_layer) (net 116)) + (segment (start 213.97468 108.0135) (end 213.9823 108.00588) (width 0.254) (layer Composant) (net 116)) + (segment (start 213.9823 108.00588) (end 214.91448 108.00588) (width 0.254) (layer Composant) (net 116)) + (via (at 214.91448 108.00588) (size 0.889) (layers Composant Cuivre) (net 116)) (segment (start 218.75496 110.65764) (end 223.68764 110.65764) (width 0.254) (layer Composant) (net 117)) - (segment (start 219.456 116.64442) (end 220.57868 116.64442) (width 0.254) (layer Composant) (net 118)) - (segment (start 220.57868 116.64442) (end 221.6531 115.57) (width 0.254) (layer Composant) (net 118)) - (segment (start 212.9155 116.5098) (end 213.97468 116.5098) (width 0.254) (layer Composant) (net 118) (status 800)) - (segment (start 223.52 115.57) (end 224.79 114.3) (width 0.254) (layer Composant) (net 118) (status 400)) - (segment (start 213.97468 116.5098) (end 214.03818 116.5733) (width 0.254) (layer Composant) (net 118)) - (segment (start 214.03818 116.5733) (end 219.38488 116.5733) (width 0.254) (layer Composant) (net 118)) - (segment (start 219.38488 116.5733) (end 219.456 116.64442) (width 0.254) (layer Composant) (net 118)) + (segment (start 217.10142 109.0041) (end 218.75496 110.65764) (width 0.254) (layer Composant) (net 117)) + (segment (start 212.9155 109.0041) (end 217.10142 109.0041) (width 0.254) (layer Composant) (net 117) (status 800)) + (segment (start 223.68764 110.65764) (end 224.79 111.76) (width 0.254) (layer Composant) (net 117) (status 400)) (segment (start 221.6531 115.57) (end 223.52 115.57) (width 0.254) (layer Composant) (net 118)) - (segment (start 207.1751 101.83368) (end 207.6196 102.27818) (width 0.254) (layer Composant) (net 119)) - (segment (start 207.6196 102.27818) (end 207.6196 102.30612) (width 0.254) (layer Composant) (net 119)) - (via (at 207.62214 102.30612) (size 0.889) (layers Composant Cuivre) (net 119)) - (segment (start 207.62214 102.30612) (end 213.40826 96.52) (width 0.254) (layer 3.3V_layer) (net 119)) - (segment (start 207.6196 102.30612) (end 207.62214 102.30612) (width 0.254) (layer Composant) (net 119)) - (segment (start 207.1751 100.7745) (end 207.1751 101.83368) (width 0.254) (layer Composant) (net 119) (status 800)) + (segment (start 219.38488 116.5733) (end 219.456 116.64442) (width 0.254) (layer Composant) (net 118)) + (segment (start 214.03818 116.5733) (end 219.38488 116.5733) (width 0.254) (layer Composant) (net 118)) + (segment (start 213.97468 116.5098) (end 214.03818 116.5733) (width 0.254) (layer Composant) (net 118)) + (segment (start 223.52 115.57) (end 224.79 114.3) (width 0.254) (layer Composant) (net 118) (status 400)) + (segment (start 212.9155 116.5098) (end 213.97468 116.5098) (width 0.254) (layer Composant) (net 118) (status 800)) + (segment (start 220.57868 116.64442) (end 221.6531 115.57) (width 0.254) (layer Composant) (net 118)) + (segment (start 219.456 116.64442) (end 220.57868 116.64442) (width 0.254) (layer Composant) (net 118)) (segment (start 213.40826 96.52) (end 222.25 96.52) (width 0.254) (layer 3.3V_layer) (net 119) (status 400)) - (via (at 220.0021 115.75542) (size 0.889) (layers Composant Cuivre) (net 120)) - (segment (start 212.9155 116.0145) (end 216.19464 116.0145) (width 0.254) (layer Composant) (net 120) (status 800)) - (segment (start 219.6084 116.14912) (end 220.0021 115.75542) (width 0.254) (layer Composant) (net 120)) - (segment (start 216.19464 116.0145) (end 216.32926 116.14912) (width 0.254) (layer Composant) (net 120)) - (segment (start 216.32926 116.14912) (end 219.6084 116.14912) (width 0.254) (layer Composant) (net 120)) - (segment (start 220.0021 115.75542) (end 223.70542 115.75542) (width 0.254) (layer 3.3V_layer) (net 120)) + (segment (start 207.1751 100.7745) (end 207.1751 101.83368) (width 0.254) (layer Composant) (net 119) (status 800)) + (segment (start 207.6196 102.30612) (end 207.62214 102.30612) (width 0.254) (layer Composant) (net 119)) + (segment (start 207.62214 102.30612) (end 213.40826 96.52) (width 0.254) (layer 3.3V_layer) (net 119)) + (via (at 207.62214 102.30612) (size 0.889) (layers Composant Cuivre) (net 119)) + (segment (start 207.6196 102.27818) (end 207.6196 102.30612) (width 0.254) (layer Composant) (net 119)) + (segment (start 207.1751 101.83368) (end 207.6196 102.27818) (width 0.254) (layer Composant) (net 119)) (segment (start 223.70542 115.75542) (end 224.79 116.84) (width 0.254) (layer 3.3V_layer) (net 120) (status 400)) - (segment (start 212.9155 117.0051) (end 219.2147 117.0051) (width 0.254) (layer Composant) (net 121) (status 800)) - (segment (start 220.3196 118.11) (end 223.52 118.11) (width 0.254) (layer Composant) (net 121)) - (segment (start 223.52 118.11) (end 224.79 119.38) (width 0.254) (layer Composant) (net 121) (status 400)) + (segment (start 220.0021 115.75542) (end 223.70542 115.75542) (width 0.254) (layer 3.3V_layer) (net 120)) + (segment (start 216.32926 116.14912) (end 219.6084 116.14912) (width 0.254) (layer Composant) (net 120)) + (segment (start 216.19464 116.0145) (end 216.32926 116.14912) (width 0.254) (layer Composant) (net 120)) + (segment (start 219.6084 116.14912) (end 220.0021 115.75542) (width 0.254) (layer Composant) (net 120)) + (segment (start 212.9155 116.0145) (end 216.19464 116.0145) (width 0.254) (layer Composant) (net 120) (status 800)) + (via (at 220.0021 115.75542) (size 0.889) (layers Composant Cuivre) (net 120)) (segment (start 219.2147 117.0051) (end 220.3196 118.11) (width 0.254) (layer Composant) (net 121)) - (segment (start 205.6765 122.7455) (end 205.6765 124.75972) (width 0.254) (layer Composant) (net 122) (status 800)) - (segment (start 206.502 125.095) (end 208.407 123.19) (width 0.254) (layer 3.3V_layer) (net 122)) - (segment (start 206.502 126.238) (end 206.502 125.58522) (width 0.254) (layer Composant) (net 122)) - (segment (start 206.502 126.238) (end 206.502 125.095) (width 0.254) (layer 3.3V_layer) (net 122)) - (segment (start 206.502 125.58522) (end 205.6765 124.75972) (width 0.254) (layer Composant) (net 122)) - (segment (start 208.407 123.19) (end 223.52 123.19) (width 0.254) (layer 3.3V_layer) (net 122)) - (via (at 206.502 126.238) (size 0.889) (layers Composant Cuivre) (net 122)) + (segment (start 223.52 118.11) (end 224.79 119.38) (width 0.254) (layer Composant) (net 121) (status 400)) + (segment (start 220.3196 118.11) (end 223.52 118.11) (width 0.254) (layer Composant) (net 121)) + (segment (start 212.9155 117.0051) (end 219.2147 117.0051) (width 0.254) (layer Composant) (net 121) (status 800)) (segment (start 223.52 123.19) (end 224.79 121.92) (width 0.254) (layer 3.3V_layer) (net 122) (status 400)) - (segment (start 223.30664 120.85828) (end 223.37776 120.9294) (width 0.254) (layer Composant) (net 123)) - (segment (start 223.37776 120.9294) (end 223.37776 123.04776) (width 0.254) (layer Composant) (net 123)) - (segment (start 223.37776 123.04776) (end 224.79 124.46) (width 0.254) (layer Composant) (net 123) (status 400)) - (segment (start 212.9155 119.0117) (end 219.94368 119.0117) (width 0.254) (layer Composant) (net 123) (status 800)) - (segment (start 221.79026 120.85828) (end 223.30664 120.85828) (width 0.254) (layer Composant) (net 123)) + (via (at 206.502 126.238) (size 0.889) (layers Composant Cuivre) (net 122)) + (segment (start 208.407 123.19) (end 223.52 123.19) (width 0.254) (layer 3.3V_layer) (net 122)) + (segment (start 206.502 125.58522) (end 205.6765 124.75972) (width 0.254) (layer Composant) (net 122)) + (segment (start 206.502 126.238) (end 206.502 125.095) (width 0.254) (layer 3.3V_layer) (net 122)) + (segment (start 206.502 126.238) (end 206.502 125.58522) (width 0.254) (layer Composant) (net 122)) + (segment (start 206.502 125.095) (end 208.407 123.19) (width 0.254) (layer 3.3V_layer) (net 122)) + (segment (start 205.6765 122.7455) (end 205.6765 124.75972) (width 0.254) (layer Composant) (net 122) (status 800)) (segment (start 219.94368 119.0117) (end 221.79026 120.85828) (width 0.254) (layer Composant) (net 123)) - (segment (start 221.58452 125.73) (end 223.52 125.73) (width 0.254) (layer Composant) (net 124)) - (segment (start 217.21572 121.3612) (end 221.58452 125.73) (width 0.254) (layer Composant) (net 124)) - (segment (start 212.32876 121.3612) (end 217.21572 121.3612) (width 0.254) (layer Composant) (net 124)) - (segment (start 212.9155 118.5037) (end 211.85632 118.5037) (width 0.254) (layer Composant) (net 124) (status 800)) - (segment (start 211.85632 120.88876) (end 212.32876 121.3612) (width 0.254) (layer Composant) (net 124)) - (segment (start 211.85632 118.5037) (end 211.85632 120.88876) (width 0.254) (layer Composant) (net 124)) + (segment (start 221.79026 120.85828) (end 223.30664 120.85828) (width 0.254) (layer Composant) (net 123)) + (segment (start 212.9155 119.0117) (end 219.94368 119.0117) (width 0.254) (layer Composant) (net 123) (status 800)) + (segment (start 223.37776 123.04776) (end 224.79 124.46) (width 0.254) (layer Composant) (net 123) (status 400)) + (segment (start 223.37776 120.9294) (end 223.37776 123.04776) (width 0.254) (layer Composant) (net 123)) + (segment (start 223.30664 120.85828) (end 223.37776 120.9294) (width 0.254) (layer Composant) (net 123)) (segment (start 223.52 125.73) (end 224.79 127) (width 0.254) (layer Composant) (net 124) (status 400)) - (segment (start 210.1723 124.13996) (end 214.30234 128.27) (width 0.254) (layer Composant) (net 125)) - (segment (start 214.30234 128.27) (end 223.52 128.27) (width 0.254) (layer Composant) (net 125)) - (segment (start 210.1723 122.7455) (end 210.1723 124.13996) (width 0.254) (layer Composant) (net 125) (status 800)) + (segment (start 211.85632 118.5037) (end 211.85632 120.88876) (width 0.254) (layer Composant) (net 124)) + (segment (start 211.85632 120.88876) (end 212.32876 121.3612) (width 0.254) (layer Composant) (net 124)) + (segment (start 212.9155 118.5037) (end 211.85632 118.5037) (width 0.254) (layer Composant) (net 124) (status 800)) + (segment (start 212.32876 121.3612) (end 217.21572 121.3612) (width 0.254) (layer Composant) (net 124)) + (segment (start 217.21572 121.3612) (end 221.58452 125.73) (width 0.254) (layer Composant) (net 124)) + (segment (start 221.58452 125.73) (end 223.52 125.73) (width 0.254) (layer Composant) (net 124)) (segment (start 223.52 128.27) (end 224.79 129.54) (width 0.254) (layer Composant) (net 125) (status 400)) - (segment (start 212.95868 130.81) (end 206.1845 124.03582) (width 0.254) (layer Composant) (net 126)) - (segment (start 206.1845 124.03582) (end 206.1845 122.7455) (width 0.254) (layer Composant) (net 126) (status 400)) - (segment (start 224.79 132.08) (end 223.52 130.81) (width 0.254) (layer Composant) (net 126) (status 800)) + (segment (start 210.1723 122.7455) (end 210.1723 124.13996) (width 0.254) (layer Composant) (net 125) (status 800)) + (segment (start 214.30234 128.27) (end 223.52 128.27) (width 0.254) (layer Composant) (net 125)) + (segment (start 210.1723 124.13996) (end 214.30234 128.27) (width 0.254) (layer Composant) (net 125)) (segment (start 223.52 130.81) (end 212.95868 130.81) (width 0.254) (layer Composant) (net 126)) - (segment (start 221.59468 99.71532) (end 222.25 99.06) (width 0.254) (layer Composant) (net 127) (status 400)) - (segment (start 210.1723 100.7745) (end 210.1723 99.71532) (width 0.254) (layer Composant) (net 127) (status 800)) + (segment (start 224.79 132.08) (end 223.52 130.81) (width 0.254) (layer Composant) (net 126) (status 800)) + (segment (start 206.1845 124.03582) (end 206.1845 122.7455) (width 0.254) (layer Composant) (net 126) (status 400)) + (segment (start 212.95868 130.81) (end 206.1845 124.03582) (width 0.254) (layer Composant) (net 126)) (segment (start 210.1723 99.71532) (end 221.59468 99.71532) (width 0.254) (layer Composant) (net 127)) - (segment (start 212.9155 103.5177) (end 220.3323 103.5177) (width 0.254) (layer Composant) (net 128) (status 800)) + (segment (start 210.1723 100.7745) (end 210.1723 99.71532) (width 0.254) (layer Composant) (net 127) (status 800)) + (segment (start 221.59468 99.71532) (end 222.25 99.06) (width 0.254) (layer Composant) (net 127) (status 400)) (segment (start 220.3323 103.5177) (end 222.25 101.6) (width 0.254) (layer Composant) (net 128) (status 400)) - (segment (start 221.3737 105.0163) (end 222.25 104.14) (width 0.254) (layer Composant) (net 129) (status 400)) + (segment (start 212.9155 103.5177) (end 220.3323 103.5177) (width 0.254) (layer Composant) (net 128) (status 800)) (segment (start 212.9155 105.0163) (end 221.3737 105.0163) (width 0.254) (layer Composant) (net 129) (status 800)) - (segment (start 221.5769 106.0069) (end 222.25 106.68) (width 0.254) (layer Composant) (net 130) (status 400)) + (segment (start 221.3737 105.0163) (end 222.25 104.14) (width 0.254) (layer Composant) (net 129) (status 400)) (segment (start 212.9155 106.0069) (end 221.5769 106.0069) (width 0.254) (layer Composant) (net 130) (status 800)) - (segment (start 216.46388 107.0102) (end 212.9155 107.0102) (width 0.254) (layer Composant) (net 131) (status 400)) - (segment (start 218.67368 109.22) (end 216.46388 107.0102) (width 0.254) (layer Composant) (net 131)) + (segment (start 221.5769 106.0069) (end 222.25 106.68) (width 0.254) (layer Composant) (net 130) (status 400)) (segment (start 222.25 109.22) (end 218.67368 109.22) (width 0.254) (layer Composant) (net 131) (status 800)) - (segment (start 217.6399 111.76) (end 222.25 111.76) (width 0.254) (layer Composant) (net 132) (status 400)) - (segment (start 215.392 109.5121) (end 217.6399 111.76) (width 0.254) (layer Composant) (net 132)) + (segment (start 218.67368 109.22) (end 216.46388 107.0102) (width 0.254) (layer Composant) (net 131)) + (segment (start 216.46388 107.0102) (end 212.9155 107.0102) (width 0.254) (layer Composant) (net 131) (status 400)) (segment (start 212.9155 109.5121) (end 215.392 109.5121) (width 0.254) (layer Composant) (net 132) (status 800)) - (segment (start 132.588 103.632) (end 133.218 103.632) (width 0.4) (layer Composant) (net 133)) - (segment (start 133.853 102.997) (end 135.763 102.997) (width 0.4) (layer Composant) (net 133) (tstamp 52D04C3E)) - (segment (start 133.218 103.632) (end 133.853 102.997) (width 0.4) (layer Composant) (net 133) (tstamp 52D04C3B)) - (segment (start 135.763 102.997) (end 137.668 105.029) (width 0.4) (layer Composant) (net 133)) - (segment (start 107.315 89.027) (end 108.585 89.027) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 106.68 88.392) (end 107.315 89.027) (width 0.5588) (layer Composant) (net 133)) - (segment (start 125.349 100.7745) (end 124.587 100.711) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 134.366 92.2655) (end 133.5405 91.44) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 134.366 93.726) (end 134.366 92.2655) (width 0.254) (layer Composant) (net 133) (status 800)) - (segment (start 137.3886 110.7694) (end 136.5885 111.633) (width 0.4318) (layer Composant) (net 133) (status 400)) - (segment (start 112.522 95.885) (end 112.522 98.425) (width 0.5588) (layer GND_layer) (net 133) (status C00)) - (segment (start 112.522 93.345) (end 112.522 95.885) (width 0.5588) (layer GND_layer) (net 133) (status C00)) - (segment (start 76.327 108.839) (end 76.327 111.379) (width 0.5588) (layer Cuivre) (net 133) (status C00)) - (segment (start 75.184 134.239) (end 76.327 134.239) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 74.422 133.477) (end 75.184 134.239) (width 0.5588) (layer Composant) (net 133)) - (segment (start 74.422 130.429) (end 74.422 133.477) (width 0.5588) (layer Composant) (net 133)) - (segment (start 168.529 113.157) (end 176.149 113.157) (width 0.5588) (layer Composant) (net 133) (status C00)) - (segment (start 181.864 134.874) (end 181.864 136.906) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 183.134 133.604) (end 181.864 134.874) (width 0.5588) (layer Composant) (net 133)) - (segment (start 182.8165 127.9525) (end 183.134 128.27) (width 0.5588) (layer Composant) (net 133)) - (segment (start 137.3886 109.22) (end 137.3886 110.7694) (width 0.4318) (layer Composant) (net 133) (status 800)) - (segment (start 132.715 73.787) (end 132.715 75.438) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 133.604 72.898) (end 132.715 73.787) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 151.003 72.898) (end 133.604 72.898) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 122.301 102.616) (end 121.158 102.616) (width 0.5588) (layer Composant) (net 133)) - (segment (start 123.19 103.505) (end 122.301 102.616) (width 0.5588) (layer Composant) (net 133)) - (segment (start 123.6345 103.505) (end 123.19 103.505) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 129.3876 93.726) (end 129.8702 93.726) (width 0.254) (layer Composant) (net 133) (status C00)) - (segment (start 131.699 87.122) (end 129.032 89.789) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 128.9685 89.8525) (end 129.032 89.789) (width 0.5588) (layer Composant) (net 133)) - (segment (start 209.27568 111.4425) (end 208.28 111.4425) (width 0.5588) (layer Cuivre) (net 133) (status 400)) - (via (at 209.74812 112.00892) (size 1.143) (layers Composant Cuivre) (net 133)) - (segment (start 209.74812 112.00892) (end 212.94852 112.00892) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 208.28 120.3325) (end 208.28 123.37796) (width 0.5588) (layer Cuivre) (net 133) (status 800)) - (segment (start 214.45474 110.5027) (end 212.94852 112.00892) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 209.74812 112.00892) (end 209.27568 111.53648) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 201.422 124.3965) (end 200.42632 124.3965) (width 0.5588) (layer Cuivre) (net 133) (status 800)) - (segment (start 200.30186 124.27204) (end 199.1741 124.27204) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 200.42632 124.3965) (end 200.30186 124.27204) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 198.60514 124.27204) (end 198.48068 124.3965) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 199.1741 124.27204) (end 198.60514 124.27204) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 197.485 124.3965) (end 198.48068 124.3965) (width 0.5588) (layer Cuivre) (net 133) (status 800)) - (segment (start 199.644 126.238) (end 199.1741 125.7681) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 199.1741 124.27204) (end 199.1741 125.7681) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 203.2 126.238) (end 199.644 126.238) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 203.79436 125.64364) (end 203.2 126.238) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 203.79436 124.61748) (end 203.79436 125.64364) (width 0.5588) (layer GND_layer) (net 133)) - (via (at 203.79436 124.61748) (size 1.143) (layers Composant Cuivre) (net 133)) - (segment (start 204.36332 124.3965) (end 205.359 124.3965) (width 0.5588) (layer Cuivre) (net 133) (status 400)) - (segment (start 204.14234 124.61748) (end 203.79436 124.61748) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 204.36332 124.3965) (end 204.14234 124.61748) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 189.43828 110.5027) (end 190.9445 110.5027) (width 0.254) (layer Composant) (net 133) (status 400)) - (via (at 189.43828 110.5027) (size 1.143) (layers Composant Cuivre) (net 133)) - (segment (start 189.43828 110.5027) (end 190.0555 109.88548) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 182.8165 125.73) (end 182.8165 127.9525) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 177.165 125.73) (end 176.276 124.841) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 182.8165 125.73) (end 177.165 125.73) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 140.335 104.4956) (end 143.129 104.4702) (width 0.4) (layer Composant) (net 133) (status 400)) - (segment (start 138.938 104.4956) (end 137.668 105.029) (width 0.5588) (layer Composant) (net 133)) - (segment (start 138.938 104.4956) (end 140.335 104.4956) (width 0.4318) (layer Composant) (net 133)) - (segment (start 136.652 120.396) (end 136.652 122.1105) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 136.652 118.6815) (end 136.652 120.396) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 176.276 124.841) (end 168.656 124.841) (width 0.5588) (layer Composant) (net 133) (status C00)) - (segment (start 134.366 93.726) (end 134.3914 94.9452) (width 0.254) (layer Composant) (net 133) (status 800)) - (segment (start 86.741 132.588) (end 86.741 129.54) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 190.69304 97.36582) (end 190.5 97.36582) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 190.5 97.36582) (end 190.5 98.1075) (width 0.5588) (layer Cuivre) (net 133) (status 400)) - (segment (start 109.4105 82.8675) (end 108.712 82.169) (width 0.5588) (layer Composant) (net 133)) - (via (at 203.454 98.67392) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 199.1741 124.27204) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 209.16646 124.26442) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 177.165 77.089) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 144.653 113.03) (size 1.143) (layers Composant Cuivre) (net 133)) - (segment (start 209.27568 111.53648) (end 209.27568 111.4425) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 203.454 98.67392) (end 203.454 99.8855) (width 0.5588) (layer Cuivre) (net 133) (status 400)) - (segment (start 165.989 87.249) (end 162.941 84.201) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 162.941 84.201) (end 162.941 75.438) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 162.941 75.438) (end 163.068 75.311) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 132.715 75.438) (end 132.6515 75.5015) (width 0.5588) (layer Composant) (net 133)) - (segment (start 132.6515 75.5015) (end 130.937 75.5015) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 103.5685 111.252) (end 103.5685 112.3315) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 213.741 80.645) (end 212.19414 80.645) (width 0.5588) (layer Composant) (net 133) (status 800)) - (via (at 212.19414 80.645) (size 1.143) (layers Composant Cuivre) (net 133)) - (segment (start 212.19414 80.645) (end 212.19414 76.29144) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 212.19414 76.29144) (end 212.23732 76.24826) (width 0.5588) (layer GND_layer) (net 133)) - (via (at 212.23732 76.24826) (size 1.143) (layers Composant Cuivre) (net 133)) - (segment (start 212.23732 76.24826) (end 212.68182 76.69276) (width 0.5588) (layer Composant) (net 133)) - (segment (start 212.68182 76.69276) (end 212.68182 76.835) (width 0.5588) (layer Composant) (net 133)) - (segment (start 138.049 95.123) (end 137.668 95.504) (width 0.5588) (layer Composant) (net 133)) - (segment (start 212.68182 76.835) (end 213.741 76.835) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 202.6793 100.7745) (end 202.6793 99.71532) (width 0.254) (layer Composant) (net 133) (status 800)) - (segment (start 204.6859 100.7745) (end 204.6859 99.71532) (width 0.254) (layer Composant) (net 133) (status 800)) - (segment (start 194.6783 100.7745) (end 194.6783 99.25304) (width 0.254) (layer Composant) (net 133) (status 800)) - (segment (start 192.33134 96.90608) (end 194.6783 99.25304) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 192.33134 96.90608) (end 191.15278 96.90608) (width 0.5588) (layer GND_layer) (net 133)) - (via (at 194.6783 99.25304) (size 1.143) (layers Composant Cuivre) (net 133)) - (segment (start 212.9155 110.5027) (end 213.97468 110.5027) (width 0.254) (layer Composant) (net 133) (status 800)) - (segment (start 163.068 75.311) (end 163.957 75.311) (width 0.5588) (layer Composant) (net 133)) - (segment (start 163.957 75.311) (end 164.592 75.1205) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 117.602 77.1525) (end 117.602 75.311) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 117.602 75.311) (end 117.729 75.184) (width 0.5588) (layer Composant) (net 133)) - (segment (start 117.729 75.184) (end 115.57 77.343) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 111.887 77.343) (end 115.57 77.343) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 133.731 89.535) (end 133.731 91.2495) (width 0.5588) (layer Composant) (net 133)) - (segment (start 133.731 91.2495) (end 133.5405 91.44) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 104.14 139.827) (end 100.965 139.827) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 211.45754 107.5055) (end 214.45474 110.5027) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 124.587 104.521) (end 126.492 104.521) (width 0.254) (layer Composant) (net 133)) - (segment (start 126.492 104.521) (end 126.619 104.394) (width 0.5588) (layer Composant) (net 133)) - (segment (start 126.619 104.394) (end 126.619 103.632) (width 0.5588) (layer Composant) (net 133)) - (segment (start 126.619 103.632) (end 126.746 103.505) (width 0.254) (layer Composant) (net 133)) - (segment (start 126.746 103.505) (end 126.746 103.4796) (width 0.254) (layer Composant) (net 133)) - (via (at 142.24 108.839) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 137.287 113.538) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 136.652 120.396) (size 1.143) (layers Composant Cuivre) (net 133)) - (segment (start 129.54 103.632) (end 132.588 103.632) (width 0.2) (layer Composant) (net 133)) - (via (at 141.605 89.027) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 133.731 89.535) (size 1.143) (layers Composant Cuivre) (net 133)) - (segment (start 213.97468 110.5027) (end 213.97468 111.506) (width 0.254) (layer Composant) (net 133)) - (segment (start 199.1741 124.27204) (end 199.1741 122.7455) (width 0.254) (layer Composant) (net 133) (status 400)) - (segment (start 159.4485 111.252) (end 159.4485 109.0295) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 159.4485 114.046) (end 159.4485 111.252) (width 0.5588) (layer Composant) (net 133) (status C00)) - (segment (start 86.741 121.158) (end 86.741 125.349) (width 0.5588) (layer Composant) (net 133) (status C00)) - (segment (start 89.535 140.97) (end 81.28 140.97) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 81.28 140.97) (end 81.28 140.843) (width 0.5588) (layer Composant) (net 133)) - (via (at 191.15278 96.90608) (size 1.143) (layers Composant Cuivre) (net 133)) - (segment (start 189.23 90.805) (end 189.23 94.9833) (width 0.5588) (layer GND_layer) (net 133) (status 800)) - (segment (start 189.23 94.9833) (end 191.15278 96.90608) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 191.15278 96.90608) (end 190.69304 97.36582) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 126.746 103.4796) (end 127.635 103.4796) (width 0.254) (layer Composant) (net 133) (status 400)) - (segment (start 103.5685 112.3315) (end 103.378 112.522) (width 0.5588) (layer Composant) (net 133)) - (segment (start 76.327 118.999) (end 75.438 118.999) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 75.438 118.999) (end 74.422 120.015) (width 0.5588) (layer Composant) (net 133)) - (segment (start 152.273 115.697) (end 147.32 115.697) (width 0.5588) (layer 3.3V_layer) (net 133)) - (segment (start 105.156 95.377) (end 105.156 91.948) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 74.422 120.015) (end 74.422 130.429) (width 0.5588) (layer Composant) (net 133)) - (segment (start 110.744 78.613) (end 110.744 78.486) (width 0.5588) (layer Cuivre) (net 133) (status 800)) - (segment (start 110.744 78.486) (end 111.887 77.343) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 140.3858 93.726) (end 140.3858 91.3257) (width 0.254) (layer Composant) (net 133) (status 800)) - (segment (start 140.3858 91.3257) (end 140.6525 91.059) (width 0.254) (layer Composant) (net 133) (status 400)) - (segment (start 131.8768 109.22) (end 131.8768 110.4392) (width 0.254) (layer Composant) (net 133) (status 800)) - (segment (start 111.252 83.82) (end 110.744 83.312) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 145.415 100.2665) (end 146.6215 100.2665) (width 0.5588) (layer Cuivre) (net 133) (status 800)) - (segment (start 161.163 68.58) (end 163.957 68.58) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 163.957 68.58) (end 166.624 71.247) (width 0.5588) (layer Composant) (net 133)) - (segment (start 166.624 71.247) (end 166.624 74.422) (width 0.5588) (layer Composant) (net 133)) - (segment (start 166.624 74.422) (end 165.9255 75.1205) (width 0.5588) (layer Composant) (net 133)) - (segment (start 110.109 83.82) (end 111.252 83.82) (width 0.5588) (layer Composant) (net 133)) - (segment (start 146.812 103.886) (end 145.3515 103.886) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 165.9255 75.1205) (end 164.592 75.1205) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 159.512 115.697) (end 165.989 115.697) (width 0.5588) (layer 3.3V_layer) (net 133)) - (segment (start 165.989 115.697) (end 168.529 113.157) (width 0.5588) (layer 3.3V_layer) (net 133) (status 400)) - (segment (start 163.068 75.311) (end 163.068 74.676) (width 0.5588) (layer Composant) (net 133)) - (segment (start 86.741 125.349) (end 86.741 129.54) (width 0.5588) (layer Composant) (net 133) (status C00)) - (segment (start 101.6 110.744) (end 101.6 98.933) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 115.951 141.859) (end 118.364 139.446) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 163.068 74.676) (end 161.29 74.676) (width 0.5588) (layer Composant) (net 133) (status 400)) - (via (at 129.032 89.789) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 121.158 102.616) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 123.571 99.06) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 194.691 73.406) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 193.929 83.947) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 103.378 112.522) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 159.512 115.697) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 152.4 115.57) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 97.282 90.043) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 103.632 76.708) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 117.729 75.184) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 100.965 139.827) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 86.741 132.588) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 132.715 75.438) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 106.68 90.424) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 163.068 75.311) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 150.876 75.311) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 146.812 100.076) (size 0.889) (layers Composant Cuivre) (net 133)) - (via (at 146.812 103.886) (size 1.143) (layers Composant Cuivre) (net 133)) - (segment (start 88.9 80.01) (end 88.9 82.55) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 85.979 77.089) (end 88.9 80.01) (width 0.5588) (layer Composant) (net 133)) - (segment (start 88.9 92.837) (end 88.9 95.25) (width 0.5588) (layer GND_layer) (net 133) (status 400)) - (segment (start 91.694 90.043) (end 88.9 92.837) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 89.281 82.931) (end 88.9 82.55) (width 0.5588) (layer Cuivre) (net 133) (status 400)) - (segment (start 97.409 82.931) (end 89.281 82.931) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 103.632 76.708) (end 103.632 79.883) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 105.156 81.407) (end 110.744 81.407) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 103.632 79.883) (end 105.156 81.407) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 86.741 132.588) (end 85.852 132.588) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 121.158 102.616) (end 121.285 102.489) (width 0.5588) (layer Composant) (net 133)) - (segment (start 121.285 102.489) (end 121.285 101.346) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 105.537 141.859) (end 110.744 141.859) (width 0.5588) (layer Composant) (net 133)) - (segment (start 130.1115 74.676) (end 130.937 75.5015) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 104.14 140.462) (end 105.537 141.859) (width 0.5588) (layer Composant) (net 133)) - (segment (start 159.4485 105.537) (end 158.75 105.537) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 147.32 115.697) (end 144.653 113.03) (width 0.5588) (layer 3.3V_layer) (net 133)) - (segment (start 164.846 90.932) (end 164.846 93.4085) (width 0.5588) (layer Composant) (net 133) (status C00)) - (segment (start 97.282 90.043) (end 91.694 90.043) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 104.267 69.088) (end 102.108 66.929) (width 0.5588) (layer Composant) (net 133)) - (segment (start 89.408 112.903) (end 86.741 115.57) (width 0.5588) (layer Composant) (net 133)) - (segment (start 91.694 112.903) (end 89.408 112.903) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 132.715 81.788) (end 131.699 82.804) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 132.715 75.438) (end 132.715 81.788) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 82.423 129.159) (end 78.867 129.159) (width 0.5588) (layer GND_layer) (net 133) (status 400)) - (segment (start 85.852 132.588) (end 82.423 129.159) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 86.741 132.588) (end 93.726 132.588) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 93.726 132.588) (end 100.965 139.827) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 189.43828 110.5027) (end 188.8363 110.5027) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 188.8363 110.5027) (end 188.214 111.125) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 188.214 111.125) (end 188.214 115.56746) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 188.214 115.56746) (end 189.15634 116.5098) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 189.15634 116.5098) (end 189.15634 126.29134) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 198.247 127.635) (end 198.3105 127.5715) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 198.3105 127.5715) (end 199.644 126.238) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 190.5 127.635) (end 198.247 127.635) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 130.048 84.455) (end 128.8415 84.455) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 131.699 82.804) (end 130.048 84.455) (width 0.5588) (layer Composant) (net 133)) - (segment (start 162.814 67.31) (end 162.814 60.452) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 161.544 68.58) (end 162.814 67.31) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 161.163 68.58) (end 161.544 68.58) (width 0.5588) (layer GND_layer) (net 133) (status 800)) - (segment (start 131.699 86.741) (end 131.699 87.122) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 131.699 85.852) (end 131.699 86.741) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 131.699 82.804) (end 131.699 85.852) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 137.668 98.298) (end 137.668 105.029) (width 0.4) (layer Composant) (net 133)) - (segment (start 137.668 95.504) (end 137.668 98.298) (width 0.5588) (layer Composant) (net 133)) - (segment (start 139.4206 108.077) (end 139.3952 108.1024) (width 0.4318) (layer Composant) (net 133)) - (segment (start 139.446 108.077) (end 139.4206 108.077) (width 0.4318) (layer Composant) (net 133)) - (segment (start 139.7 107.823) (end 139.446 108.077) (width 0.4318) (layer Composant) (net 133)) - (segment (start 127.635 103.4796) (end 129.3114 103.4542) (width 0.254) (layer Composant) (net 133) (status 800)) - (segment (start 129.3114 103.4542) (end 129.54 103.632) (width 0.254) (layer Composant) (net 133)) - (segment (start 164.846 90.932) (end 166.243 90.932) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 159.4485 109.0295) (end 159.512 108.966) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 166.243 90.932) (end 166.243 89.535) (width 0.5588) (layer Composant) (net 133)) - (segment (start 166.243 89.535) (end 168.529 87.249) (width 0.5588) (layer Composant) (net 133) (status 400)) - (via (at 189.15634 116.5098) (size 1.143) (layers Composant Cuivre) (net 133)) - (segment (start 140.208 95.123) (end 138.049 95.123) (width 0.5588) (layer Composant) (net 133)) - (segment (start 124.587 100.711) (end 123.571 99.695) (width 0.5588) (layer Composant) (net 133)) - (segment (start 123.571 99.695) (end 123.571 99.06) (width 0.5588) (layer Composant) (net 133)) - (segment (start 178.562 77.1525) (end 177.2285 77.1525) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 177.2285 77.1525) (end 177.165 77.089) (width 0.5588) (layer Composant) (net 133)) - (segment (start 108.712 82.169) (end 107.442 82.169) (width 0.5588) (layer Composant) (net 133)) - (segment (start 107.442 82.169) (end 106.68 82.931) (width 0.4318) (layer Composant) (net 133)) - (segment (start 106.68 82.931) (end 106.68 88.392) (width 0.4318) (layer Composant) (net 133)) - (segment (start 80.772 77.089) (end 85.979 77.089) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 104.267 72.1995) (end 104.9655 72.1995) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 104.9655 72.1995) (end 105.664 72.898) (width 0.5588) (layer Composant) (net 133)) - (segment (start 105.664 72.898) (end 105.664 74.676) (width 0.5588) (layer Composant) (net 133)) - (segment (start 105.664 74.676) (end 103.632 76.708) (width 0.5588) (layer Composant) (net 133)) - (segment (start 192.532 83.2485) (end 192.532 87.503) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 192.532 87.503) (end 189.23 90.805) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 192.532 83.2485) (end 193.2305 83.2485) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 193.2305 83.2485) (end 193.929 83.947) (width 0.5588) (layer Composant) (net 133)) - (segment (start 193.929 83.947) (end 194.691 83.185) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 194.691 83.185) (end 194.691 73.406) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 168.529 87.249) (end 165.989 87.249) (width 0.5588) (layer GND_layer) (net 133) (status 800)) - (segment (start 112.522 93.345) (end 108.712 93.345) (width 0.5588) (layer GND_layer) (net 133) (status 800)) - (segment (start 108.712 93.345) (end 106.68 91.313) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 106.68 91.313) (end 106.68 90.424) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 106.68 90.424) (end 108.077 89.027) (width 0.5588) (layer Composant) (net 133)) - (segment (start 108.077 89.027) (end 108.585 89.027) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 164.592 83.2485) (end 164.592 83.312) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 164.592 83.312) (end 168.529 87.249) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 150.876 75.311) (end 151.003 75.184) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 151.003 75.184) (end 151.003 72.898) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 150.876 77.1525) (end 150.876 75.311) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 145.288 103.8225) (end 146.7485 103.8225) (width 0.4) (layer Composant) (net 133)) - (segment (start 144.8054 104.4702) (end 145.288 103.8225) (width 0.4) (layer Composant) (net 133)) - (segment (start 143.129 104.4702) (end 144.8054 104.4702) (width 0.4) (layer Composant) (net 133) (status 800)) - (segment (start 146.7485 103.8225) (end 146.812 103.886) (width 0.4) (layer Composant) (net 133)) - (segment (start 146.812 100.076) (end 146.812 103.886) (width 0.5588) (layer GND_layer) (net 133)) - (via (at 209.677 98.69424) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 131.699 82.804) (size 1.143) (layers Composant Cuivre) (net 133)) - (segment (start 140.335 107.823) (end 139.7 107.823) (width 0.4318) (layer Composant) (net 133)) - (segment (start 141.3764 109.22) (end 141.3764 108.077) (width 0.254) (layer Composant) (net 133) (status 800)) - (segment (start 141.3764 108.077) (end 141.351 108.077) (width 0.4) (layer Composant) (net 133)) - (segment (start 141.351 108.077) (end 141.097 107.823) (width 0.4) (layer Composant) (net 133)) - (segment (start 141.097 107.823) (end 140.335 107.823) (width 0.4) (layer Composant) (net 133)) - (segment (start 139.3952 108.1024) (end 139.3952 109.22) (width 0.254) (layer Composant) (net 133) (status 400)) - (segment (start 140.335 107.823) (end 140.335 104.4956) (width 0.4318) (layer Composant) (net 133)) - (segment (start 77.597 135.509) (end 76.327 134.239) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 77.597 137.795) (end 77.597 135.509) (width 0.5588) (layer Composant) (net 133)) - (segment (start 78.74 138.938) (end 77.597 137.795) (width 0.5588) (layer Composant) (net 133)) - (segment (start 79.375 138.938) (end 78.74 138.938) (width 0.5588) (layer Composant) (net 133)) - (segment (start 81.28 140.843) (end 79.375 138.938) (width 0.5588) (layer Composant) (net 133)) - (segment (start 136.5885 112.8395) (end 137.287 113.538) (width 0.5588) (layer Composant) (net 133)) - (segment (start 136.5885 111.633) (end 136.5885 112.8395) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 136.652 118.11) (end 136.652 120.396) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 137.287 117.475) (end 136.652 118.11) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 137.287 113.538) (end 137.287 117.475) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 143.256 113.3475) (end 143.51 113.6015) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 141.732 113.3475) (end 143.256 113.3475) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 141.3764 109.22) (end 141.859 109.22) (width 0.381) (layer Composant) (net 133) (status 800)) - (segment (start 141.859 109.22) (end 142.24 108.839) (width 0.5588) (layer Composant) (net 133)) - (segment (start 143.637 112.014) (end 144.653 113.03) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 143.637 110.236) (end 143.637 112.014) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 189.15634 126.29134) (end 190.5 127.635) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 198.3105 127.5715) (end 198.3105 136.3345) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 224.79 139.065) (end 224.79 137.16) (width 0.5588) (layer GND_layer) (net 133) (status 400)) - (segment (start 224.155 139.7) (end 224.79 139.065) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 201.676 139.7) (end 224.155 139.7) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 198.3105 136.3345) (end 201.676 139.7) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 224.79 88.9) (end 224.79 87.884) (width 0.5588) (layer GND_layer) (net 133) (status 800)) - (segment (start 226.187 68.707) (end 223.52 66.04) (width 0.5588) (layer GND_layer) (net 133) (status 400)) - (segment (start 226.187 86.487) (end 226.187 68.707) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 224.79 87.884) (end 226.187 86.487) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 194.691 73.406) (end 194.691 68.58) (width 0.5588) (layer GND_layer) (net 133) (status 400)) - (segment (start 194.691 73.406) (end 195.961 72.136) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 195.961 72.136) (end 211.074 72.136) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 212.23732 73.29932) (end 212.23732 76.24826) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 211.074 72.136) (end 212.23732 73.29932) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 223.52 66.04) (end 221.869 66.04) (width 0.5588) (layer GND_layer) (net 133) (status 800)) - (segment (start 215.773 72.136) (end 211.074 72.136) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 221.869 66.04) (end 215.773 72.136) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 203.79436 124.61748) (end 203.79436 124.11964) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 203.79436 124.11964) (end 204.851 123.063) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 204.851 123.063) (end 207.96504 123.063) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 207.96504 123.063) (end 209.16646 124.26442) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 203.454 98.67392) (end 200.78192 98.67392) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 209.677 98.69424) (end 203.47432 98.69424) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 203.47432 98.69424) (end 203.454 98.67392) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 214.45474 110.5027) (end 214.45474 118.97614) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 214.45474 118.97614) (end 209.16646 124.26442) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 176.149 113.157) (end 175.133 113.157) (width 0.5588) (layer GND_layer) (net 133) (status 800)) - (segment (start 173.863 122.428) (end 176.276 124.841) (width 0.5588) (layer GND_layer) (net 133) (status 400)) - (segment (start 173.863 114.427) (end 173.863 122.428) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 175.133 113.157) (end 173.863 114.427) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 194.6783 99.25304) (end 194.6783 100.7237) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 190.5 109.44098) (end 189.43828 110.5027) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 190.5 104.902) (end 190.5 109.44098) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 194.6783 100.7237) (end 190.5 104.902) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 135.636 98.298) (end 137.668 98.298) (width 0.5588) (layer Composant) (net 133)) - (segment (start 135.001 97.663) (end 135.636 98.298) (width 0.5588) (layer Composant) (net 133)) - (segment (start 200.78192 98.67392) (end 199.644 97.536) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 194.6783 99.25304) (end 194.6783 98.4377) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 195.58 97.536) (end 199.644 97.536) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 194.6783 98.4377) (end 195.58 97.536) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 110.744 141.859) (end 110.744 139.446) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 131.8768 110.4392) (end 131.064 111.252) (width 0.254) (layer Composant) (net 133)) - (segment (start 131.064 112.2045) (end 131.0005 112.268) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 131.064 111.252) (end 131.064 112.2045) (width 0.254) (layer Composant) (net 133)) - (segment (start 162.814 60.452) (end 130.937 60.452) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 129.286 66.929) (end 127.635 68.58) (width 0.5588) (layer GND_layer) (net 133) (status 400)) - (segment (start 129.286 62.103) (end 129.286 66.929) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 130.937 60.452) (end 129.286 62.103) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 194.691 68.58) (end 195.961 68.58) (width 0.5588) (layer GND_layer) (net 133) (status 800)) - (segment (start 195.961 68.58) (end 196.215 68.326) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 196.215 68.326) (end 196.215 62.484) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 196.215 62.484) (end 194.183 60.452) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 194.183 60.452) (end 162.814 60.452) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 142.24 108.839) (end 143.637 110.236) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 144.0815 113.6015) (end 143.51 113.6015) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 144.653 113.03) (end 144.0815 113.6015) (width 0.5588) (layer Composant) (net 133)) - (segment (start 131.699 87.503) (end 131.699 87.122) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 133.731 89.535) (end 131.699 87.503) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 133.731 89.535) (end 133.731 89.535) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 78.105 93.091) (end 78.105 84.328) (width 0.5588) (layer Composant) (net 133) (status C00)) - (segment (start 75.438 73.025) (end 75.438 81.661) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 75.438 81.661) (end 78.105 84.328) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 97.282 90.043) (end 97.663 90.424) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 97.663 90.424) (end 106.68 90.424) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 98.7425 90.043) (end 97.282 90.043) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 158.75 105.537) (end 158.242 106.045) (width 0.5588) (layer Composant) (net 133)) - (segment (start 158.242 106.045) (end 158.242 108.585) (width 0.5588) (layer Composant) (net 133)) - (segment (start 158.242 108.585) (end 158.623 108.966) (width 0.5588) (layer Composant) (net 133)) - (segment (start 158.623 108.966) (end 159.512 108.966) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 106.68 90.424) (end 105.7275 90.424) (width 0.5588) (layer Composant) (net 133)) - (segment (start 105.7275 90.424) (end 102.8065 93.345) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 123.6345 103.505) (end 124.587 104.521) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 159.4485 114.046) (end 159.4485 115.6335) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 159.4485 115.6335) (end 159.512 115.697) (width 0.5588) (layer Composant) (net 133)) - (segment (start 159.512 115.697) (end 159.385 115.57) (width 0.5588) (layer 3.3V_layer) (net 133)) - (segment (start 159.385 115.57) (end 152.4 115.57) (width 0.5588) (layer 3.3V_layer) (net 133)) - (segment (start 151.892 120.015) (end 152.4 119.507) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 152.4 119.507) (end 152.4 115.57) (width 0.5588) (layer Composant) (net 133)) - (via (at 111.252 83.82) (size 1.143) (layers Composant Cuivre) (net 133)) - (segment (start 146.6215 100.2665) (end 146.812 100.076) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 109.601 84.328) (end 110.109 83.82) (width 0.5588) (layer Composant) (net 133)) - (segment (start 103.378 112.522) (end 101.6 110.744) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 110.744 141.859) (end 115.951 141.859) (width 0.5588) (layer Composant) (net 133)) - (segment (start 101.6 98.933) (end 105.156 95.377) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 145.3515 103.886) (end 145.288 103.8225) (width 0.5588) (layer Cuivre) (net 133) (status 400)) - (segment (start 105.156 91.948) (end 106.68 90.424) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 143.129 99.4664) (end 144.8054 99.4664) (width 0.254) (layer Composant) (net 133) (status 800)) - (segment (start 144.8054 99.4664) (end 145.415 100.076) (width 0.254) (layer Composant) (net 133)) - (segment (start 145.415 100.076) (end 146.812 100.076) (width 0.5588) (layer Composant) (net 133)) - (segment (start 78.867 129.159) (end 77.597 130.429) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 77.597 130.429) (end 74.422 130.429) (width 0.5588) (layer Composant) (net 133)) - (segment (start 140.3858 93.726) (end 140.3858 94.9198) (width 0.254) (layer Composant) (net 133) (status 800)) - (segment (start 140.3858 94.9198) (end 140.208 95.123) (width 0.5588) (layer Composant) (net 133)) - (segment (start 86.741 115.57) (end 85.9155 114.7445) (width 0.5588) (layer Composant) (net 133)) - (segment (start 85.9155 114.7445) (end 84.836 114.7445) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 128.27 74.676) (end 130.1115 74.676) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 104.14 139.827) (end 104.14 140.462) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 104.267 72.1995) (end 104.267 69.088) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 175.641 86.741) (end 176.149 87.249) (width 0.5588) (layer GND_layer) (net 133) (status 400)) - (segment (start 102.108 66.929) (end 100.965 66.929) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 97.409 82.931) (end 103.632 76.708) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 93.599 106.934) (end 91.694 108.839) (width 0.5588) (layer Composant) (net 133)) - (segment (start 190.9445 113.0173) (end 189.88532 113.0173) (width 0.254) (layer Composant) (net 133) (status 800)) - (segment (start 199.644 99.2505) (end 199.009 99.8855) (width 0.5588) (layer Cuivre) (net 133) (status 400)) - (segment (start 199.644 97.536) (end 199.644 99.2505) (width 0.5588) (layer Cuivre) (net 133)) - (via (at 199.644 97.536) (size 1.143) (layers Composant Cuivre) (net 133)) - (segment (start 203.454 98.67392) (end 203.454 99.71532) (width 0.254) (layer Composant) (net 133)) - (segment (start 204.6859 99.71532) (end 203.454 99.71532) (width 0.254) (layer Composant) (net 133)) - (segment (start 203.454 99.71532) (end 202.6793 99.71532) (width 0.254) (layer Composant) (net 133)) - (segment (start 209.677 98.69424) (end 209.677 100.7745) (width 0.254) (layer Composant) (net 133) (status 400)) - (segment (start 209.296 99.07524) (end 209.296 99.8855) (width 0.5588) (layer Cuivre) (net 133) (status 400)) - (segment (start 209.677 98.69424) (end 209.296 99.07524) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 212.9155 113.0173) (end 213.97468 113.0173) (width 0.254) (layer Composant) (net 133) (status 800)) - (segment (start 213.97468 112.65154) (end 213.97468 113.0173) (width 0.5588) (layer Composant) (net 133)) - (segment (start 213.83244 112.5093) (end 213.97468 112.65154) (width 0.5588) (layer Composant) (net 133)) - (segment (start 212.9155 112.5093) (end 213.83244 112.5093) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 213.97468 112.36706) (end 213.97468 112.014) (width 0.5588) (layer Composant) (net 133)) - (segment (start 213.83244 112.5093) (end 213.97468 112.36706) (width 0.5588) (layer Composant) (net 133)) - (segment (start 213.44636 111.506) (end 213.44636 112.014) (width 0.254) (layer Composant) (net 133)) - (segment (start 212.9155 112.014) (end 213.44636 112.014) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 213.44636 112.014) (end 213.97468 112.014) (width 0.5588) (layer Composant) (net 133)) - (segment (start 212.9155 111.506) (end 213.44636 111.506) (width 0.254) (layer Composant) (net 133) (status 800)) - (segment (start 213.44636 111.506) (end 213.97468 111.506) (width 0.254) (layer Composant) (net 133)) - (segment (start 211.4042 107.5055) (end 212.9155 107.5055) (width 0.254) (layer Composant) (net 133) (status 400)) - (via (at 214.45474 110.5027) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 211.4042 107.5055) (size 1.143) (layers Composant Cuivre) (net 133)) - (segment (start 211.4042 107.5055) (end 211.45754 107.5055) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 152.4 115.57) (end 152.273 115.697) (width 0.5588) (layer 3.3V_layer) (net 133)) - (segment (start 213.97468 110.5027) (end 214.45474 110.5027) (width 0.5588) (layer Composant) (net 133)) - (segment (start 208.28 123.37796) (end 209.16646 124.26442) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 91.694 108.839) (end 91.694 112.903) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 209.1817 124.24918) (end 209.16646 124.26442) (width 0.5588) (layer Composant) (net 133)) - (segment (start 209.1817 122.7455) (end 209.1817 124.24918) (width 0.254) (layer Composant) (net 133) (status 800)) - (segment (start 189.88532 113.0173) (end 189.88532 114.0079) (width 0.254) (layer Composant) (net 133)) - (segment (start 189.88532 114.0079) (end 190.9445 114.0079) (width 0.254) (layer Composant) (net 133) (status 400)) - (segment (start 189.88532 116.5098) (end 189.88532 114.0079) (width 0.254) (layer Composant) (net 133)) - (segment (start 189.15634 116.5098) (end 189.88532 116.5098) (width 0.5588) (layer Composant) (net 133)) - (segment (start 189.88532 116.5098) (end 190.9445 116.5098) (width 0.254) (layer Composant) (net 133) (status 400)) - (segment (start 189.15634 116.5098) (end 189.48146 116.18468) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 129.032 89.789) (end 129.032 91.3765) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 109.4105 84.328) (end 109.4105 82.8675) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 126.4412 99.9744) (end 125.349 100.7745) (width 0.4318) (layer Composant) (net 133) (status 400)) - (segment (start 131.8768 109.22) (end 131.8768 108.1278) (width 0.254) (layer Composant) (net 133) (status 800)) - (segment (start 131.8768 108.1278) (end 131.826 107.95) (width 0.4) (layer Composant) (net 133)) - (segment (start 131.826 107.95) (end 131.826 105.537) (width 0.4) (layer Composant) (net 133)) - (segment (start 131.826 105.537) (end 132.588 104.775) (width 0.4) (layer Composant) (net 133)) - (segment (start 132.588 104.775) (end 132.588 103.632) (width 0.4) (layer Composant) (net 133)) - (segment (start 189.48146 116.18468) (end 190.0555 116.18468) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 190.0555 115.189) (end 190.0555 116.18468) (width 0.5588) (layer Cuivre) (net 133) (status 800)) - (segment (start 93.599 96.774) (end 92.075 95.25) (width 0.5588) (layer Composant) (net 133)) - (segment (start 92.075 95.25) (end 88.9 95.25) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 93.599 106.934) (end 93.599 96.774) (width 0.5588) (layer Composant) (net 133)) - (segment (start 80.772 77.089) (end 75.438 73.025) (width 0.5588) (layer Composant) (net 133) (status C00)) - (segment (start 112.522 98.425) (end 114.681 100.584) (width 0.5588) (layer GND_layer) (net 133) (status 800)) - (segment (start 114.681 100.584) (end 117.348 100.584) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 117.348 100.584) (end 119.38 102.616) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 119.38 102.616) (end 121.158 102.616) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 86.741 117.094) (end 86.741 121.158) (width 0.5588) (layer Composant) (net 133) (status C00)) - (segment (start 192.532 75.1205) (end 193.167 75.311) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 193.167 75.311) (end 194.183 75.311) (width 0.5588) (layer Composant) (net 133)) - (segment (start 194.183 75.311) (end 194.183 74.168) (width 0.5588) (layer Composant) (net 133)) - (segment (start 194.183 74.168) (end 194.691 73.66) (width 0.5588) (layer Composant) (net 133)) - (segment (start 194.691 73.66) (end 194.691 73.406) (width 0.5588) (layer Composant) (net 133)) - (segment (start 129.8702 93.726) (end 129.8702 92.3417) (width 0.254) (layer Composant) (net 133) (status 800)) - (segment (start 129.8702 92.3417) (end 128.9685 91.44) (width 0.5588) (layer Composant) (net 133)) - (segment (start 128.9685 91.44) (end 128.9685 89.8525) (width 0.5588) (layer Composant) (net 133)) - (segment (start 86.741 117.094) (end 86.741 115.57) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 183.134 128.27) (end 183.134 133.604) (width 0.5588) (layer Composant) (net 133)) - (segment (start 123.571 99.06) (end 121.158 101.854) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 121.158 101.854) (end 121.158 102.616) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 141.605 89.027) (end 141.605 89.535) (width 0.5588) (layer Composant) (net 133)) - (segment (start 141.605 89.535) (end 140.6525 90.4875) (width 0.5588) (layer Composant) (net 133)) - (segment (start 140.6525 90.4875) (end 140.6525 91.059) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 176.149 87.249) (end 168.529 87.249) (width 0.5588) (layer Composant) (net 133) (status C00)) - (segment (start 177.165 77.089) (end 175.641 78.613) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 175.641 78.613) (end 175.641 86.741) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 134.366 86.741) (end 133.477 85.852) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 133.477 85.852) (end 131.699 85.852) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 141.605 86.741) (end 134.366 86.741) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 141.605 86.741) (end 141.605 89.027) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 141.605 82.55) (end 141.605 86.741) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 141.478 82.423) (end 141.478 84.8995) (width 0.5588) (layer Composant) (net 133) (status 400)) - (via (at 141.478 82.423) (size 1.143) (layers Composant Cuivre) (net 133)) - (segment (start 141.478 82.423) (end 141.605 82.55) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 127.635 99.9744) (end 126.4412 99.9744) (width 0.254) (layer Composant) (net 133) (status 800)) - (segment (start 191.897 75.438) (end 192.532 75.1205) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 191.008 75.438) (end 191.897 75.438) (width 0.5588) (layer Composant) (net 133)) - (segment (start 191.008 74.676) (end 191.008 75.438) (width 0.5588) (layer Composant) (net 133)) - (segment (start 189.23 74.676) (end 191.008 74.676) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 100.965 60.833) (end 100.965 66.929) (width 0.5588) (layer Composant) (net 133) (status C00)) - (segment (start 88.646 123.063) (end 86.741 121.158) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 95.25 123.063) (end 88.646 123.063) (width 0.5588) (layer Composant) (net 133)) - (segment (start 96.901 121.412) (end 95.25 123.063) (width 0.5588) (layer Composant) (net 133)) - (segment (start 97.409 121.412) (end 96.901 121.412) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 137.668 107.823) (end 137.668 105.029) (width 0.4) (layer Composant) (net 133)) - (segment (start 137.3886 109.22) (end 137.3886 108.077) (width 0.4) (layer Composant) (net 133) (status 800)) - (segment (start 137.3886 108.077) (end 137.668 107.823) (width 0.4) (layer Composant) (net 133)) - (segment (start 162.56 72.898) (end 151.003 72.898) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 163.068 73.406) (end 162.56 72.898) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 163.068 75.311) (end 163.068 73.406) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 135.001 95.5548) (end 135.001 97.663) (width 0.5588) (layer Composant) (net 133)) - (segment (start 134.3914 94.9452) (end 135.001 95.5548) (width 0.4318) (layer Composant) (net 133)) - (segment (start 74.549 117.221) (end 76.327 118.999) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 74.549 112.141) (end 74.549 117.221) (width 0.5588) (layer Composant) (net 133)) - (segment (start 75.311 111.379) (end 74.549 112.141) (width 0.5588) (layer Composant) (net 133)) - (segment (start 76.327 111.379) (end 75.311 111.379) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 110.744 81.407) (end 110.744 78.613) (width 0.5588) (layer Cuivre) (net 133) (status 400)) - (segment (start 110.744 83.312) (end 110.744 81.407) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 109.4105 84.328) (end 109.601 84.328) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 129.032 91.3765) (end 128.9685 91.44) (width 0.5588) (layer Cuivre) (net 133) (status 400)) + (segment (start 215.392 109.5121) (end 217.6399 111.76) (width 0.254) (layer Composant) (net 132)) + (segment (start 217.6399 111.76) (end 222.25 111.76) (width 0.254) (layer Composant) (net 132) (status 400)) (segment (start 190.0555 109.88548) (end 190.0555 107.315) (width 0.5588) (layer Cuivre) (net 133) (status 400)) - (segment (start 114.554 132.334) (end 116.332 130.556) (width 0.381) (layer GND_layer) (net 134)) - (segment (start 116.332 130.556) (end 116.332 116.078) (width 0.381) (layer GND_layer) (net 134)) - (segment (start 116.332 116.078) (end 117.348 115.062) (width 0.381) (layer GND_layer) (net 134)) - (segment (start 114.554 138.557) (end 114.554 132.334) (width 0.381) (layer GND_layer) (net 134)) - (segment (start 117.348 110.49) (end 118.872 110.49) (width 0.254) (layer GND_layer) (net 134)) - (segment (start 127.635 105.9688) (end 126.492 105.9688) (width 0.254) (layer Composant) (net 134) (status 800)) - (segment (start 126.492 105.9688) (end 125.8824 105.9688) (width 0.254) (layer Composant) (net 134)) - (segment (start 118.872 113.792) (end 119.38 114.3) (width 0.381) (layer GND_layer) (net 134)) - (segment (start 113.665 139.446) (end 114.554 138.557) (width 0.381) (layer GND_layer) (net 134)) - (segment (start 113.284 139.446) (end 113.665 139.446) (width 0.381) (layer GND_layer) (net 134) (status 800)) - (segment (start 118.872 105.029) (end 118.872 110.49) (width 0.381) (layer GND_layer) (net 134)) - (segment (start 117.221 134.747) (end 117.221 138.303) (width 0.381) (layer GND_layer) (net 134)) - (segment (start 117.221 138.303) (end 116.078 139.446) (width 0.381) (layer GND_layer) (net 134)) - (segment (start 116.078 139.446) (end 115.824 139.446) (width 0.381) (layer GND_layer) (net 134) (status 400)) - (segment (start 117.348 115.062) (end 117.348 110.49) (width 0.381) (layer GND_layer) (net 134)) - (segment (start 123.571 110.363) (end 124.714 110.363) (width 0.4318) (layer Composant) (net 134)) - (segment (start 121.666 105.283) (end 120.777 104.394) (width 0.4318) (layer Composant) (net 134) (status 400)) - (segment (start 123.444 105.283) (end 121.666 105.283) (width 0.4318) (layer Composant) (net 134)) - (segment (start 124.206 106.045) (end 125.8062 106.045) (width 0.4318) (layer Composant) (net 134)) - (segment (start 125.8062 106.045) (end 125.8824 105.9688) (width 0.4318) (layer Composant) (net 134)) - (segment (start 123.444 105.283) (end 124.206 106.045) (width 0.4318) (layer Composant) (net 134)) - (segment (start 126.492 106.426) (end 126.5428 106.4768) (width 0.254) (layer Composant) (net 134)) - (segment (start 126.5428 106.4768) (end 127.635 106.4768) (width 0.254) (layer Composant) (net 134) (status 400)) - (segment (start 126.492 105.9688) (end 126.492 106.426) (width 0.254) (layer Composant) (net 134)) - (segment (start 119.38 132.588) (end 119.38 132.715) (width 0.381) (layer GND_layer) (net 134)) - (segment (start 119.38 114.3) (end 119.38 132.588) (width 0.381) (layer GND_layer) (net 134)) - (via (at 123.571 110.363) (size 0.889) (layers Composant Cuivre) (net 134)) - (via (at 123.444 105.283) (size 0.889) (layers Composant Cuivre) (net 134)) - (via (at 118.872 105.029) (size 0.889) (layers Composant Cuivre) (net 134)) - (segment (start 117.983 104.14) (end 118.872 105.029) (width 0.381) (layer Composant) (net 134)) - (segment (start 117.983 101.346) (end 117.983 104.14) (width 0.381) (layer Composant) (net 134) (status 800)) - (segment (start 123.825 110.109) (end 123.571 110.363) (width 0.4318) (layer GND_layer) (net 134)) - (segment (start 123.825 105.664) (end 123.825 110.109) (width 0.4318) (layer GND_layer) (net 134)) - (segment (start 123.444 105.283) (end 123.825 105.664) (width 0.4318) (layer GND_layer) (net 134)) - (segment (start 124.7775 110.2995) (end 124.7775 108.712) (width 0.4318) (layer Composant) (net 134) (status 400)) - (segment (start 124.714 110.363) (end 124.7775 110.2995) (width 0.4318) (layer Composant) (net 134)) - (segment (start 117.221 134.747) (end 119.38 132.588) (width 0.381) (layer GND_layer) (net 134)) - (segment (start 119.507 104.394) (end 120.777 104.394) (width 0.381) (layer Composant) (net 134) (status 400)) - (segment (start 118.872 105.029) (end 119.507 104.394) (width 0.381) (layer Composant) (net 134)) + (segment (start 129.032 91.3765) (end 128.9685 91.44) (width 0.5588) (layer Cuivre) (net 133) (status 400)) + (segment (start 109.4105 84.328) (end 109.601 84.328) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 110.744 83.312) (end 110.744 81.407) (width 0.5588) (layer Cuivre) (net 133)) + (segment (start 110.744 81.407) (end 110.744 78.613) (width 0.5588) (layer Cuivre) (net 133) (status 400)) + (segment (start 76.327 111.379) (end 75.311 111.379) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 75.311 111.379) (end 74.549 112.141) (width 0.5588) (layer Composant) (net 133)) + (segment (start 74.549 112.141) (end 74.549 117.221) (width 0.5588) (layer Composant) (net 133)) + (segment (start 74.549 117.221) (end 76.327 118.999) (width 0.5588) (layer Composant) (net 133) (status 400)) + (segment (start 134.3914 94.9452) (end 135.001 95.5548) (width 0.4318) (layer Composant) (net 133)) + (segment (start 135.001 95.5548) (end 135.001 97.663) (width 0.5588) (layer Composant) (net 133)) + (segment (start 163.068 75.311) (end 163.068 73.406) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 163.068 73.406) (end 162.56 72.898) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 162.56 72.898) (end 151.003 72.898) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 137.3886 108.077) (end 137.668 107.823) (width 0.4) (layer Composant) (net 133)) + (segment (start 137.3886 109.22) (end 137.3886 108.077) (width 0.4) (layer Composant) (net 133) (status 800)) + (segment (start 137.668 107.823) (end 137.668 105.029) (width 0.4) (layer Composant) (net 133)) + (segment (start 97.409 121.412) (end 96.901 121.412) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 96.901 121.412) (end 95.25 123.063) (width 0.5588) (layer Composant) (net 133)) + (segment (start 95.25 123.063) (end 88.646 123.063) (width 0.5588) (layer Composant) (net 133)) + (segment (start 88.646 123.063) (end 86.741 121.158) (width 0.5588) (layer Composant) (net 133) (status 400)) + (segment (start 100.965 60.833) (end 100.965 66.929) (width 0.5588) (layer Composant) (net 133) (status C00)) + (segment (start 189.23 74.676) (end 191.008 74.676) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 191.008 74.676) (end 191.008 75.438) (width 0.5588) (layer Composant) (net 133)) + (segment (start 191.008 75.438) (end 191.897 75.438) (width 0.5588) (layer Composant) (net 133)) + (segment (start 191.897 75.438) (end 192.532 75.1205) (width 0.5588) (layer Composant) (net 133) (status 400)) + (segment (start 127.635 99.9744) (end 126.4412 99.9744) (width 0.254) (layer Composant) (net 133) (status 800)) + (segment (start 141.478 82.423) (end 141.605 82.55) (width 0.5588) (layer GND_layer) (net 133)) + (via (at 141.478 82.423) (size 1.143) (layers Composant Cuivre) (net 133)) + (segment (start 141.478 82.423) (end 141.478 84.8995) (width 0.5588) (layer Composant) (net 133) (status 400)) + (segment (start 141.605 82.55) (end 141.605 86.741) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 141.605 86.741) (end 141.605 89.027) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 141.605 86.741) (end 134.366 86.741) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 133.477 85.852) (end 131.699 85.852) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 134.366 86.741) (end 133.477 85.852) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 175.641 78.613) (end 175.641 86.741) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 177.165 77.089) (end 175.641 78.613) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 176.149 87.249) (end 168.529 87.249) (width 0.5588) (layer Composant) (net 133) (status C00)) + (segment (start 140.6525 90.4875) (end 140.6525 91.059) (width 0.5588) (layer Composant) (net 133) (status 400)) + (segment (start 141.605 89.535) (end 140.6525 90.4875) (width 0.5588) (layer Composant) (net 133)) + (segment (start 141.605 89.027) (end 141.605 89.535) (width 0.5588) (layer Composant) (net 133)) + (segment (start 121.158 101.854) (end 121.158 102.616) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 123.571 99.06) (end 121.158 101.854) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 183.134 128.27) (end 183.134 133.604) (width 0.5588) (layer Composant) (net 133)) + (segment (start 86.741 117.094) (end 86.741 115.57) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 128.9685 91.44) (end 128.9685 89.8525) (width 0.5588) (layer Composant) (net 133)) + (segment (start 129.8702 92.3417) (end 128.9685 91.44) (width 0.5588) (layer Composant) (net 133)) + (segment (start 129.8702 93.726) (end 129.8702 92.3417) (width 0.254) (layer Composant) (net 133) (status 800)) + (segment (start 194.691 73.66) (end 194.691 73.406) (width 0.5588) (layer Composant) (net 133)) + (segment (start 194.183 74.168) (end 194.691 73.66) (width 0.5588) (layer Composant) (net 133)) + (segment (start 194.183 75.311) (end 194.183 74.168) (width 0.5588) (layer Composant) (net 133)) + (segment (start 193.167 75.311) (end 194.183 75.311) (width 0.5588) (layer Composant) (net 133)) + (segment (start 192.532 75.1205) (end 193.167 75.311) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 86.741 117.094) (end 86.741 121.158) (width 0.5588) (layer Composant) (net 133) (status C00)) + (segment (start 119.38 102.616) (end 121.158 102.616) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 117.348 100.584) (end 119.38 102.616) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 114.681 100.584) (end 117.348 100.584) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 112.522 98.425) (end 114.681 100.584) (width 0.5588) (layer GND_layer) (net 133) (status 800)) + (segment (start 80.772 77.089) (end 75.438 73.025) (width 0.5588) (layer Composant) (net 133) (status C00)) + (segment (start 93.599 106.934) (end 93.599 96.774) (width 0.5588) (layer Composant) (net 133)) + (segment (start 92.075 95.25) (end 88.9 95.25) (width 0.5588) (layer Composant) (net 133) (status 400)) + (segment (start 93.599 96.774) (end 92.075 95.25) (width 0.5588) (layer Composant) (net 133)) + (segment (start 190.0555 115.189) (end 190.0555 116.18468) (width 0.5588) (layer Cuivre) (net 133) (status 800)) + (segment (start 189.48146 116.18468) (end 190.0555 116.18468) (width 0.5588) (layer Cuivre) (net 133)) + (segment (start 132.588 104.775) (end 132.588 103.632) (width 0.4) (layer Composant) (net 133)) + (segment (start 131.826 105.537) (end 132.588 104.775) (width 0.4) (layer Composant) (net 133)) + (segment (start 131.826 107.95) (end 131.826 105.537) (width 0.4) (layer Composant) (net 133)) + (segment (start 131.8768 108.1278) (end 131.826 107.95) (width 0.4) (layer Composant) (net 133)) + (segment (start 131.8768 109.22) (end 131.8768 108.1278) (width 0.254) (layer Composant) (net 133) (status 800)) + (segment (start 126.4412 99.9744) (end 125.349 100.7745) (width 0.4318) (layer Composant) (net 133) (status 400)) + (segment (start 109.4105 84.328) (end 109.4105 82.8675) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 129.032 89.789) (end 129.032 91.3765) (width 0.5588) (layer Cuivre) (net 133)) + (segment (start 189.15634 116.5098) (end 189.48146 116.18468) (width 0.5588) (layer Cuivre) (net 133)) + (segment (start 189.88532 116.5098) (end 190.9445 116.5098) (width 0.254) (layer Composant) (net 133) (status 400)) + (segment (start 189.15634 116.5098) (end 189.88532 116.5098) (width 0.5588) (layer Composant) (net 133)) + (segment (start 189.88532 116.5098) (end 189.88532 114.0079) (width 0.254) (layer Composant) (net 133)) + (segment (start 189.88532 114.0079) (end 190.9445 114.0079) (width 0.254) (layer Composant) (net 133) (status 400)) + (segment (start 189.88532 113.0173) (end 189.88532 114.0079) (width 0.254) (layer Composant) (net 133)) + (segment (start 209.1817 122.7455) (end 209.1817 124.24918) (width 0.254) (layer Composant) (net 133) (status 800)) + (segment (start 209.1817 124.24918) (end 209.16646 124.26442) (width 0.5588) (layer Composant) (net 133)) + (segment (start 91.694 108.839) (end 91.694 112.903) (width 0.5588) (layer Composant) (net 133) (status 400)) + (segment (start 208.28 123.37796) (end 209.16646 124.26442) (width 0.5588) (layer Cuivre) (net 133)) + (segment (start 213.97468 110.5027) (end 214.45474 110.5027) (width 0.5588) (layer Composant) (net 133)) + (segment (start 152.4 115.57) (end 152.273 115.697) (width 0.5588) (layer 3.3V_layer) (net 133)) + (segment (start 211.4042 107.5055) (end 211.45754 107.5055) (width 0.5588) (layer GND_layer) (net 133)) + (via (at 211.4042 107.5055) (size 1.143) (layers Composant Cuivre) (net 133)) + (via (at 214.45474 110.5027) (size 1.143) (layers Composant Cuivre) (net 133)) + (segment (start 211.4042 107.5055) (end 212.9155 107.5055) (width 0.254) (layer Composant) (net 133) (status 400)) + (segment (start 213.44636 111.506) (end 213.97468 111.506) (width 0.254) (layer Composant) (net 133)) + (segment (start 212.9155 111.506) (end 213.44636 111.506) (width 0.254) (layer Composant) (net 133) (status 800)) + (segment (start 213.44636 112.014) (end 213.97468 112.014) (width 0.5588) (layer Composant) (net 133)) + (segment (start 212.9155 112.014) (end 213.44636 112.014) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 213.44636 111.506) (end 213.44636 112.014) (width 0.254) (layer Composant) (net 133)) + (segment (start 213.83244 112.5093) (end 213.97468 112.36706) (width 0.5588) (layer Composant) (net 133)) + (segment (start 213.97468 112.36706) (end 213.97468 112.014) (width 0.5588) (layer Composant) (net 133)) + (segment (start 212.9155 112.5093) (end 213.83244 112.5093) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 213.83244 112.5093) (end 213.97468 112.65154) (width 0.5588) (layer Composant) (net 133)) + (segment (start 213.97468 112.65154) (end 213.97468 113.0173) (width 0.5588) (layer Composant) (net 133)) + (segment (start 212.9155 113.0173) (end 213.97468 113.0173) (width 0.254) (layer Composant) (net 133) (status 800)) + (segment (start 209.677 98.69424) (end 209.296 99.07524) (width 0.5588) (layer Cuivre) (net 133)) + (segment (start 209.296 99.07524) (end 209.296 99.8855) (width 0.5588) (layer Cuivre) (net 133) (status 400)) + (segment (start 209.677 98.69424) (end 209.677 100.7745) (width 0.254) (layer Composant) (net 133) (status 400)) + (segment (start 203.454 99.71532) (end 202.6793 99.71532) (width 0.254) (layer Composant) (net 133)) + (segment (start 204.6859 99.71532) (end 203.454 99.71532) (width 0.254) (layer Composant) (net 133)) + (segment (start 203.454 98.67392) (end 203.454 99.71532) (width 0.254) (layer Composant) (net 133)) + (via (at 199.644 97.536) (size 1.143) (layers Composant Cuivre) (net 133)) + (segment (start 199.644 97.536) (end 199.644 99.2505) (width 0.5588) (layer Cuivre) (net 133)) + (segment (start 199.644 99.2505) (end 199.009 99.8855) (width 0.5588) (layer Cuivre) (net 133) (status 400)) + (segment (start 190.9445 113.0173) (end 189.88532 113.0173) (width 0.254) (layer Composant) (net 133) (status 800)) + (segment (start 93.599 106.934) (end 91.694 108.839) (width 0.5588) (layer Composant) (net 133)) + (segment (start 97.409 82.931) (end 103.632 76.708) (width 0.5588) (layer Cuivre) (net 133)) + (segment (start 102.108 66.929) (end 100.965 66.929) (width 0.5588) (layer Composant) (net 133) (status 400)) + (segment (start 175.641 86.741) (end 176.149 87.249) (width 0.5588) (layer GND_layer) (net 133) (status 400)) + (segment (start 104.267 72.1995) (end 104.267 69.088) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 104.14 139.827) (end 104.14 140.462) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 128.27 74.676) (end 130.1115 74.676) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 85.9155 114.7445) (end 84.836 114.7445) (width 0.5588) (layer Composant) (net 133) (status 400)) + (segment (start 86.741 115.57) (end 85.9155 114.7445) (width 0.5588) (layer Composant) (net 133)) + (segment (start 140.3858 94.9198) (end 140.208 95.123) (width 0.5588) (layer Composant) (net 133)) + (segment (start 140.3858 93.726) (end 140.3858 94.9198) (width 0.254) (layer Composant) (net 133) (status 800)) + (segment (start 77.597 130.429) (end 74.422 130.429) (width 0.5588) (layer Composant) (net 133)) + (segment (start 78.867 129.159) (end 77.597 130.429) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 145.415 100.076) (end 146.812 100.076) (width 0.5588) (layer Composant) (net 133)) + (segment (start 144.8054 99.4664) (end 145.415 100.076) (width 0.254) (layer Composant) (net 133)) + (segment (start 143.129 99.4664) (end 144.8054 99.4664) (width 0.254) (layer Composant) (net 133) (status 800)) + (segment (start 105.156 91.948) (end 106.68 90.424) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 145.3515 103.886) (end 145.288 103.8225) (width 0.5588) (layer Cuivre) (net 133) (status 400)) + (segment (start 101.6 98.933) (end 105.156 95.377) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 110.744 141.859) (end 115.951 141.859) (width 0.5588) (layer Composant) (net 133)) + (segment (start 103.378 112.522) (end 101.6 110.744) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 109.601 84.328) (end 110.109 83.82) (width 0.5588) (layer Composant) (net 133)) + (segment (start 146.6215 100.2665) (end 146.812 100.076) (width 0.5588) (layer Cuivre) (net 133)) + (via (at 111.252 83.82) (size 1.143) (layers Composant Cuivre) (net 133)) + (segment (start 152.4 119.507) (end 152.4 115.57) (width 0.5588) (layer Composant) (net 133)) + (segment (start 151.892 120.015) (end 152.4 119.507) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 159.385 115.57) (end 152.4 115.57) (width 0.5588) (layer 3.3V_layer) (net 133)) + (segment (start 159.512 115.697) (end 159.385 115.57) (width 0.5588) (layer 3.3V_layer) (net 133)) + (segment (start 159.4485 115.6335) (end 159.512 115.697) (width 0.5588) (layer Composant) (net 133)) + (segment (start 159.4485 114.046) (end 159.4485 115.6335) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 123.6345 103.505) (end 124.587 104.521) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 105.7275 90.424) (end 102.8065 93.345) (width 0.5588) (layer Composant) (net 133) (status 400)) + (segment (start 106.68 90.424) (end 105.7275 90.424) (width 0.5588) (layer Composant) (net 133)) + (segment (start 158.623 108.966) (end 159.512 108.966) (width 0.5588) (layer Composant) (net 133) (status 400)) + (segment (start 158.242 108.585) (end 158.623 108.966) (width 0.5588) (layer Composant) (net 133)) + (segment (start 158.242 106.045) (end 158.242 108.585) (width 0.5588) (layer Composant) (net 133)) + (segment (start 158.75 105.537) (end 158.242 106.045) (width 0.5588) (layer Composant) (net 133)) + (segment (start 98.7425 90.043) (end 97.282 90.043) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 97.663 90.424) (end 106.68 90.424) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 97.282 90.043) (end 97.663 90.424) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 75.438 81.661) (end 78.105 84.328) (width 0.5588) (layer Composant) (net 133) (status 400)) + (segment (start 75.438 73.025) (end 75.438 81.661) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 78.105 93.091) (end 78.105 84.328) (width 0.5588) (layer Composant) (net 133) (status C00)) + (segment (start 133.731 89.535) (end 133.731 89.535) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 133.731 89.535) (end 131.699 87.503) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 131.699 87.503) (end 131.699 87.122) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 144.653 113.03) (end 144.0815 113.6015) (width 0.5588) (layer Composant) (net 133)) + (segment (start 144.0815 113.6015) (end 143.51 113.6015) (width 0.5588) (layer Composant) (net 133) (status 400)) + (segment (start 142.24 108.839) (end 143.637 110.236) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 194.183 60.452) (end 162.814 60.452) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 196.215 62.484) (end 194.183 60.452) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 196.215 68.326) (end 196.215 62.484) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 195.961 68.58) (end 196.215 68.326) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 194.691 68.58) (end 195.961 68.58) (width 0.5588) (layer GND_layer) (net 133) (status 800)) + (segment (start 130.937 60.452) (end 129.286 62.103) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 129.286 62.103) (end 129.286 66.929) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 129.286 66.929) (end 127.635 68.58) (width 0.5588) (layer GND_layer) (net 133) (status 400)) + (segment (start 162.814 60.452) (end 130.937 60.452) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 131.064 111.252) (end 131.064 112.2045) (width 0.254) (layer Composant) (net 133)) + (segment (start 131.064 112.2045) (end 131.0005 112.268) (width 0.5588) (layer Composant) (net 133) (status 400)) + (segment (start 131.8768 110.4392) (end 131.064 111.252) (width 0.254) (layer Composant) (net 133)) + (segment (start 110.744 141.859) (end 110.744 139.446) (width 0.5588) (layer Composant) (net 133) (status 400)) + (segment (start 194.6783 98.4377) (end 195.58 97.536) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 195.58 97.536) (end 199.644 97.536) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 194.6783 99.25304) (end 194.6783 98.4377) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 200.78192 98.67392) (end 199.644 97.536) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 135.001 97.663) (end 135.636 98.298) (width 0.5588) (layer Composant) (net 133)) + (segment (start 135.636 98.298) (end 137.668 98.298) (width 0.5588) (layer Composant) (net 133)) + (segment (start 194.6783 100.7237) (end 190.5 104.902) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 190.5 104.902) (end 190.5 109.44098) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 190.5 109.44098) (end 189.43828 110.5027) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 194.6783 99.25304) (end 194.6783 100.7237) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 175.133 113.157) (end 173.863 114.427) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 173.863 114.427) (end 173.863 122.428) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 173.863 122.428) (end 176.276 124.841) (width 0.5588) (layer GND_layer) (net 133) (status 400)) + (segment (start 176.149 113.157) (end 175.133 113.157) (width 0.5588) (layer GND_layer) (net 133) (status 800)) + (segment (start 214.45474 118.97614) (end 209.16646 124.26442) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 214.45474 110.5027) (end 214.45474 118.97614) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 203.47432 98.69424) (end 203.454 98.67392) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 209.677 98.69424) (end 203.47432 98.69424) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 203.454 98.67392) (end 200.78192 98.67392) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 207.96504 123.063) (end 209.16646 124.26442) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 204.851 123.063) (end 207.96504 123.063) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 203.79436 124.11964) (end 204.851 123.063) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 203.79436 124.61748) (end 203.79436 124.11964) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 221.869 66.04) (end 215.773 72.136) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 215.773 72.136) (end 211.074 72.136) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 223.52 66.04) (end 221.869 66.04) (width 0.5588) (layer GND_layer) (net 133) (status 800)) + (segment (start 211.074 72.136) (end 212.23732 73.29932) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 212.23732 73.29932) (end 212.23732 76.24826) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 195.961 72.136) (end 211.074 72.136) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 194.691 73.406) (end 195.961 72.136) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 194.691 73.406) (end 194.691 68.58) (width 0.5588) (layer GND_layer) (net 133) (status 400)) + (segment (start 224.79 87.884) (end 226.187 86.487) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 226.187 86.487) (end 226.187 68.707) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 226.187 68.707) (end 223.52 66.04) (width 0.5588) (layer GND_layer) (net 133) (status 400)) + (segment (start 224.79 88.9) (end 224.79 87.884) (width 0.5588) (layer GND_layer) (net 133) (status 800)) + (segment (start 198.3105 136.3345) (end 201.676 139.7) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 201.676 139.7) (end 224.155 139.7) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 224.155 139.7) (end 224.79 139.065) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 224.79 139.065) (end 224.79 137.16) (width 0.5588) (layer GND_layer) (net 133) (status 400)) + (segment (start 198.3105 127.5715) (end 198.3105 136.3345) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 189.15634 126.29134) (end 190.5 127.635) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 143.637 110.236) (end 143.637 112.014) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 143.637 112.014) (end 144.653 113.03) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 141.859 109.22) (end 142.24 108.839) (width 0.5588) (layer Composant) (net 133)) + (segment (start 141.3764 109.22) (end 141.859 109.22) (width 0.381) (layer Composant) (net 133) (status 800)) + (segment (start 141.732 113.3475) (end 143.256 113.3475) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 143.256 113.3475) (end 143.51 113.6015) (width 0.5588) (layer Composant) (net 133) (status 400)) + (segment (start 137.287 113.538) (end 137.287 117.475) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 137.287 117.475) (end 136.652 118.11) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 136.652 118.11) (end 136.652 120.396) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 136.5885 111.633) (end 136.5885 112.8395) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 136.5885 112.8395) (end 137.287 113.538) (width 0.5588) (layer Composant) (net 133)) + (segment (start 81.28 140.843) (end 79.375 138.938) (width 0.5588) (layer Composant) (net 133)) + (segment (start 79.375 138.938) (end 78.74 138.938) (width 0.5588) (layer Composant) (net 133)) + (segment (start 78.74 138.938) (end 77.597 137.795) (width 0.5588) (layer Composant) (net 133)) + (segment (start 77.597 137.795) (end 77.597 135.509) (width 0.5588) (layer Composant) (net 133)) + (segment (start 77.597 135.509) (end 76.327 134.239) (width 0.5588) (layer Composant) (net 133) (status 400)) + (segment (start 140.335 107.823) (end 140.335 104.4956) (width 0.4318) (layer Composant) (net 133)) + (segment (start 139.3952 108.1024) (end 139.3952 109.22) (width 0.254) (layer Composant) (net 133) (status 400)) + (segment (start 141.097 107.823) (end 140.335 107.823) (width 0.4) (layer Composant) (net 133)) + (segment (start 141.351 108.077) (end 141.097 107.823) (width 0.4) (layer Composant) (net 133)) + (segment (start 141.3764 108.077) (end 141.351 108.077) (width 0.4) (layer Composant) (net 133)) + (segment (start 141.3764 109.22) (end 141.3764 108.077) (width 0.254) (layer Composant) (net 133) (status 800)) + (segment (start 140.335 107.823) (end 139.7 107.823) (width 0.4318) (layer Composant) (net 133)) + (via (at 131.699 82.804) (size 1.143) (layers Composant Cuivre) (net 133)) + (via (at 209.677 98.69424) (size 1.143) (layers Composant Cuivre) (net 133)) + (segment (start 146.812 100.076) (end 146.812 103.886) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 146.7485 103.8225) (end 146.812 103.886) (width 0.4) (layer Composant) (net 133)) + (segment (start 143.129 104.4702) (end 144.8054 104.4702) (width 0.4) (layer Composant) (net 133) (status 800)) + (segment (start 144.8054 104.4702) (end 145.288 103.8225) (width 0.4) (layer Composant) (net 133)) + (segment (start 145.288 103.8225) (end 146.7485 103.8225) (width 0.4) (layer Composant) (net 133)) + (segment (start 150.876 77.1525) (end 150.876 75.311) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 151.003 75.184) (end 151.003 72.898) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 150.876 75.311) (end 151.003 75.184) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 164.592 83.312) (end 168.529 87.249) (width 0.5588) (layer Composant) (net 133) (status 400)) + (segment (start 164.592 83.2485) (end 164.592 83.312) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 108.077 89.027) (end 108.585 89.027) (width 0.5588) (layer Composant) (net 133) (status 400)) + (segment (start 106.68 90.424) (end 108.077 89.027) (width 0.5588) (layer Composant) (net 133)) + (segment (start 106.68 91.313) (end 106.68 90.424) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 108.712 93.345) (end 106.68 91.313) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 112.522 93.345) (end 108.712 93.345) (width 0.5588) (layer GND_layer) (net 133) (status 800)) + (segment (start 168.529 87.249) (end 165.989 87.249) (width 0.5588) (layer GND_layer) (net 133) (status 800)) + (segment (start 194.691 83.185) (end 194.691 73.406) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 193.929 83.947) (end 194.691 83.185) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 193.2305 83.2485) (end 193.929 83.947) (width 0.5588) (layer Composant) (net 133)) + (segment (start 192.532 83.2485) (end 193.2305 83.2485) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 192.532 87.503) (end 189.23 90.805) (width 0.5588) (layer Composant) (net 133) (status 400)) + (segment (start 192.532 83.2485) (end 192.532 87.503) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 105.664 74.676) (end 103.632 76.708) (width 0.5588) (layer Composant) (net 133)) + (segment (start 105.664 72.898) (end 105.664 74.676) (width 0.5588) (layer Composant) (net 133)) + (segment (start 104.9655 72.1995) (end 105.664 72.898) (width 0.5588) (layer Composant) (net 133)) + (segment (start 104.267 72.1995) (end 104.9655 72.1995) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 80.772 77.089) (end 85.979 77.089) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 106.68 82.931) (end 106.68 88.392) (width 0.4318) (layer Composant) (net 133)) + (segment (start 107.442 82.169) (end 106.68 82.931) (width 0.4318) (layer Composant) (net 133)) + (segment (start 108.712 82.169) (end 107.442 82.169) (width 0.5588) (layer Composant) (net 133)) + (segment (start 177.2285 77.1525) (end 177.165 77.089) (width 0.5588) (layer Composant) (net 133)) + (segment (start 178.562 77.1525) (end 177.2285 77.1525) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 123.571 99.695) (end 123.571 99.06) (width 0.5588) (layer Composant) (net 133)) + (segment (start 124.587 100.711) (end 123.571 99.695) (width 0.5588) (layer Composant) (net 133)) + (segment (start 140.208 95.123) (end 138.049 95.123) (width 0.5588) (layer Composant) (net 133)) + (via (at 189.15634 116.5098) (size 1.143) (layers Composant Cuivre) (net 133)) + (segment (start 166.243 89.535) (end 168.529 87.249) (width 0.5588) (layer Composant) (net 133) (status 400)) + (segment (start 166.243 90.932) (end 166.243 89.535) (width 0.5588) (layer Composant) (net 133)) + (segment (start 159.4485 109.0295) (end 159.512 108.966) (width 0.5588) (layer Composant) (net 133) (status 400)) + (segment (start 164.846 90.932) (end 166.243 90.932) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 129.3114 103.4542) (end 129.54 103.632) (width 0.254) (layer Composant) (net 133)) + (segment (start 127.635 103.4796) (end 129.3114 103.4542) (width 0.254) (layer Composant) (net 133) (status 800)) + (segment (start 139.7 107.823) (end 139.446 108.077) (width 0.4318) (layer Composant) (net 133)) + (segment (start 139.446 108.077) (end 139.4206 108.077) (width 0.4318) (layer Composant) (net 133)) + (segment (start 139.4206 108.077) (end 139.3952 108.1024) (width 0.4318) (layer Composant) (net 133)) + (segment (start 137.668 95.504) (end 137.668 98.298) (width 0.5588) (layer Composant) (net 133)) + (segment (start 137.668 98.298) (end 137.668 105.029) (width 0.4) (layer Composant) (net 133)) + (segment (start 131.699 82.804) (end 131.699 85.852) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 131.699 85.852) (end 131.699 86.741) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 131.699 86.741) (end 131.699 87.122) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 161.163 68.58) (end 161.544 68.58) (width 0.5588) (layer GND_layer) (net 133) (status 800)) + (segment (start 161.544 68.58) (end 162.814 67.31) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 162.814 67.31) (end 162.814 60.452) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 131.699 82.804) (end 130.048 84.455) (width 0.5588) (layer Composant) (net 133)) + (segment (start 130.048 84.455) (end 128.8415 84.455) (width 0.5588) (layer Composant) (net 133) (status 400)) + (segment (start 190.5 127.635) (end 198.247 127.635) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 198.3105 127.5715) (end 199.644 126.238) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 198.247 127.635) (end 198.3105 127.5715) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 189.15634 116.5098) (end 189.15634 126.29134) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 188.214 115.56746) (end 189.15634 116.5098) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 188.214 111.125) (end 188.214 115.56746) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 188.8363 110.5027) (end 188.214 111.125) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 189.43828 110.5027) (end 188.8363 110.5027) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 93.726 132.588) (end 100.965 139.827) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 86.741 132.588) (end 93.726 132.588) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 85.852 132.588) (end 82.423 129.159) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 82.423 129.159) (end 78.867 129.159) (width 0.5588) (layer GND_layer) (net 133) (status 400)) + (segment (start 132.715 75.438) (end 132.715 81.788) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 132.715 81.788) (end 131.699 82.804) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 91.694 112.903) (end 89.408 112.903) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 89.408 112.903) (end 86.741 115.57) (width 0.5588) (layer Composant) (net 133)) + (segment (start 104.267 69.088) (end 102.108 66.929) (width 0.5588) (layer Composant) (net 133)) + (segment (start 97.282 90.043) (end 91.694 90.043) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 164.846 90.932) (end 164.846 93.4085) (width 0.5588) (layer Composant) (net 133) (status C00)) + (segment (start 147.32 115.697) (end 144.653 113.03) (width 0.5588) (layer 3.3V_layer) (net 133)) + (segment (start 159.4485 105.537) (end 158.75 105.537) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 104.14 140.462) (end 105.537 141.859) (width 0.5588) (layer Composant) (net 133)) + (segment (start 130.1115 74.676) (end 130.937 75.5015) (width 0.5588) (layer Composant) (net 133) (status 400)) + (segment (start 105.537 141.859) (end 110.744 141.859) (width 0.5588) (layer Composant) (net 133)) + (segment (start 121.285 102.489) (end 121.285 101.346) (width 0.5588) (layer Composant) (net 133) (status 400)) + (segment (start 121.158 102.616) (end 121.285 102.489) (width 0.5588) (layer Composant) (net 133)) + (segment (start 86.741 132.588) (end 85.852 132.588) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 103.632 79.883) (end 105.156 81.407) (width 0.5588) (layer Cuivre) (net 133)) + (segment (start 105.156 81.407) (end 110.744 81.407) (width 0.5588) (layer Cuivre) (net 133)) + (segment (start 103.632 76.708) (end 103.632 79.883) (width 0.5588) (layer Cuivre) (net 133)) + (segment (start 97.409 82.931) (end 89.281 82.931) (width 0.5588) (layer Cuivre) (net 133)) + (segment (start 89.281 82.931) (end 88.9 82.55) (width 0.5588) (layer Cuivre) (net 133) (status 400)) + (segment (start 91.694 90.043) (end 88.9 92.837) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 88.9 92.837) (end 88.9 95.25) (width 0.5588) (layer GND_layer) (net 133) (status 400)) + (segment (start 85.979 77.089) (end 88.9 80.01) (width 0.5588) (layer Composant) (net 133)) + (segment (start 88.9 80.01) (end 88.9 82.55) (width 0.5588) (layer Composant) (net 133) (status 400)) + (via (at 146.812 103.886) (size 1.143) (layers Composant Cuivre) (net 133)) + (via (at 146.812 100.076) (size 0.889) (layers Composant Cuivre) (net 133)) + (via (at 150.876 75.311) (size 1.143) (layers Composant Cuivre) (net 133)) + (via (at 163.068 75.311) (size 1.143) (layers Composant Cuivre) (net 133)) + (via (at 106.68 90.424) (size 1.143) (layers Composant Cuivre) (net 133)) + (via (at 132.715 75.438) (size 1.143) (layers Composant Cuivre) (net 133)) + (via (at 86.741 132.588) (size 1.143) (layers Composant Cuivre) (net 133)) + (via (at 100.965 139.827) (size 1.143) (layers Composant Cuivre) (net 133)) + (via (at 117.729 75.184) (size 1.143) (layers Composant Cuivre) (net 133)) + (via (at 103.632 76.708) (size 1.143) (layers Composant Cuivre) (net 133)) + (via (at 97.282 90.043) (size 1.143) (layers Composant Cuivre) (net 133)) + (via (at 152.4 115.57) (size 1.143) (layers Composant Cuivre) (net 133)) + (via (at 159.512 115.697) (size 1.143) (layers Composant Cuivre) (net 133)) + (via (at 103.378 112.522) (size 1.143) (layers Composant Cuivre) (net 133)) + (via (at 193.929 83.947) (size 1.143) (layers Composant Cuivre) (net 133)) + (via (at 194.691 73.406) (size 1.143) (layers Composant Cuivre) (net 133)) + (via (at 123.571 99.06) (size 1.143) (layers Composant Cuivre) (net 133)) + (via (at 121.158 102.616) (size 1.143) (layers Composant Cuivre) (net 133)) + (via (at 129.032 89.789) (size 1.143) (layers Composant Cuivre) (net 133)) + (segment (start 163.068 74.676) (end 161.29 74.676) (width 0.5588) (layer Composant) (net 133) (status 400)) + (segment (start 115.951 141.859) (end 118.364 139.446) (width 0.5588) (layer Composant) (net 133) (status 400)) + (segment (start 101.6 110.744) (end 101.6 98.933) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 86.741 125.349) (end 86.741 129.54) (width 0.5588) (layer Composant) (net 133) (status C00)) + (segment (start 163.068 75.311) (end 163.068 74.676) (width 0.5588) (layer Composant) (net 133)) + (segment (start 165.989 115.697) (end 168.529 113.157) (width 0.5588) (layer 3.3V_layer) (net 133) (status 400)) + (segment (start 159.512 115.697) (end 165.989 115.697) (width 0.5588) (layer 3.3V_layer) (net 133)) + (segment (start 165.9255 75.1205) (end 164.592 75.1205) (width 0.5588) (layer Composant) (net 133) (status 400)) + (segment (start 146.812 103.886) (end 145.3515 103.886) (width 0.5588) (layer Cuivre) (net 133)) + (segment (start 110.109 83.82) (end 111.252 83.82) (width 0.5588) (layer Composant) (net 133)) + (segment (start 166.624 74.422) (end 165.9255 75.1205) (width 0.5588) (layer Composant) (net 133)) + (segment (start 166.624 71.247) (end 166.624 74.422) (width 0.5588) (layer Composant) (net 133)) + (segment (start 163.957 68.58) (end 166.624 71.247) (width 0.5588) (layer Composant) (net 133)) + (segment (start 161.163 68.58) (end 163.957 68.58) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 145.415 100.2665) (end 146.6215 100.2665) (width 0.5588) (layer Cuivre) (net 133) (status 800)) + (segment (start 111.252 83.82) (end 110.744 83.312) (width 0.5588) (layer Cuivre) (net 133)) + (segment (start 131.8768 109.22) (end 131.8768 110.4392) (width 0.254) (layer Composant) (net 133) (status 800)) + (segment (start 140.3858 91.3257) (end 140.6525 91.059) (width 0.254) (layer Composant) (net 133) (status 400)) + (segment (start 140.3858 93.726) (end 140.3858 91.3257) (width 0.254) (layer Composant) (net 133) (status 800)) + (segment (start 110.744 78.486) (end 111.887 77.343) (width 0.5588) (layer Cuivre) (net 133)) + (segment (start 110.744 78.613) (end 110.744 78.486) (width 0.5588) (layer Cuivre) (net 133) (status 800)) + (segment (start 74.422 120.015) (end 74.422 130.429) (width 0.5588) (layer Composant) (net 133)) + (segment (start 105.156 95.377) (end 105.156 91.948) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 152.273 115.697) (end 147.32 115.697) (width 0.5588) (layer 3.3V_layer) (net 133)) + (segment (start 75.438 118.999) (end 74.422 120.015) (width 0.5588) (layer Composant) (net 133)) + (segment (start 76.327 118.999) (end 75.438 118.999) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 103.5685 112.3315) (end 103.378 112.522) (width 0.5588) (layer Composant) (net 133)) + (segment (start 126.746 103.4796) (end 127.635 103.4796) (width 0.254) (layer Composant) (net 133) (status 400)) + (segment (start 191.15278 96.90608) (end 190.69304 97.36582) (width 0.5588) (layer Cuivre) (net 133)) + (segment (start 189.23 94.9833) (end 191.15278 96.90608) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 189.23 90.805) (end 189.23 94.9833) (width 0.5588) (layer GND_layer) (net 133) (status 800)) + (via (at 191.15278 96.90608) (size 1.143) (layers Composant Cuivre) (net 133)) + (segment (start 81.28 140.97) (end 81.28 140.843) (width 0.5588) (layer Composant) (net 133)) + (segment (start 89.535 140.97) (end 81.28 140.97) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 86.741 121.158) (end 86.741 125.349) (width 0.5588) (layer Composant) (net 133) (status C00)) + (segment (start 159.4485 114.046) (end 159.4485 111.252) (width 0.5588) (layer Composant) (net 133) (status C00)) + (segment (start 159.4485 111.252) (end 159.4485 109.0295) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 199.1741 124.27204) (end 199.1741 122.7455) (width 0.254) (layer Composant) (net 133) (status 400)) + (segment (start 213.97468 110.5027) (end 213.97468 111.506) (width 0.254) (layer Composant) (net 133)) + (via (at 133.731 89.535) (size 1.143) (layers Composant Cuivre) (net 133)) + (via (at 141.605 89.027) (size 1.143) (layers Composant Cuivre) (net 133)) + (segment (start 129.54 103.632) (end 132.588 103.632) (width 0.2) (layer Composant) (net 133)) + (via (at 136.652 120.396) (size 1.143) (layers Composant Cuivre) (net 133)) + (via (at 137.287 113.538) (size 1.143) (layers Composant Cuivre) (net 133)) + (via (at 142.24 108.839) (size 1.143) (layers Composant Cuivre) (net 133)) + (segment (start 126.746 103.505) (end 126.746 103.4796) (width 0.254) (layer Composant) (net 133)) + (segment (start 126.619 103.632) (end 126.746 103.505) (width 0.254) (layer Composant) (net 133)) + (segment (start 126.619 104.394) (end 126.619 103.632) (width 0.5588) (layer Composant) (net 133)) + (segment (start 126.492 104.521) (end 126.619 104.394) (width 0.5588) (layer Composant) (net 133)) + (segment (start 124.587 104.521) (end 126.492 104.521) (width 0.254) (layer Composant) (net 133)) + (segment (start 211.45754 107.5055) (end 214.45474 110.5027) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 104.14 139.827) (end 100.965 139.827) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 133.731 91.2495) (end 133.5405 91.44) (width 0.5588) (layer Composant) (net 133) (status 400)) + (segment (start 133.731 89.535) (end 133.731 91.2495) (width 0.5588) (layer Composant) (net 133)) + (segment (start 111.887 77.343) (end 115.57 77.343) (width 0.5588) (layer Cuivre) (net 133)) + (segment (start 117.729 75.184) (end 115.57 77.343) (width 0.5588) (layer Cuivre) (net 133)) + (segment (start 117.602 75.311) (end 117.729 75.184) (width 0.5588) (layer Composant) (net 133)) + (segment (start 117.602 77.1525) (end 117.602 75.311) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 163.957 75.311) (end 164.592 75.1205) (width 0.5588) (layer Composant) (net 133) (status 400)) + (segment (start 163.068 75.311) (end 163.957 75.311) (width 0.5588) (layer Composant) (net 133)) + (segment (start 212.9155 110.5027) (end 213.97468 110.5027) (width 0.254) (layer Composant) (net 133) (status 800)) + (via (at 194.6783 99.25304) (size 1.143) (layers Composant Cuivre) (net 133)) + (segment (start 192.33134 96.90608) (end 191.15278 96.90608) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 192.33134 96.90608) (end 194.6783 99.25304) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 194.6783 100.7745) (end 194.6783 99.25304) (width 0.254) (layer Composant) (net 133) (status 800)) + (segment (start 204.6859 100.7745) (end 204.6859 99.71532) (width 0.254) (layer Composant) (net 133) (status 800)) + (segment (start 202.6793 100.7745) (end 202.6793 99.71532) (width 0.254) (layer Composant) (net 133) (status 800)) + (segment (start 212.68182 76.835) (end 213.741 76.835) (width 0.5588) (layer Composant) (net 133) (status 400)) + (segment (start 138.049 95.123) (end 137.668 95.504) (width 0.5588) (layer Composant) (net 133)) + (segment (start 212.68182 76.69276) (end 212.68182 76.835) (width 0.5588) (layer Composant) (net 133)) + (segment (start 212.23732 76.24826) (end 212.68182 76.69276) (width 0.5588) (layer Composant) (net 133)) + (via (at 212.23732 76.24826) (size 1.143) (layers Composant Cuivre) (net 133)) + (segment (start 212.19414 76.29144) (end 212.23732 76.24826) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 212.19414 80.645) (end 212.19414 76.29144) (width 0.5588) (layer GND_layer) (net 133)) + (via (at 212.19414 80.645) (size 1.143) (layers Composant Cuivre) (net 133)) + (segment (start 213.741 80.645) (end 212.19414 80.645) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 103.5685 111.252) (end 103.5685 112.3315) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 132.6515 75.5015) (end 130.937 75.5015) (width 0.5588) (layer Composant) (net 133) (status 400)) + (segment (start 132.715 75.438) (end 132.6515 75.5015) (width 0.5588) (layer Composant) (net 133)) + (segment (start 162.941 75.438) (end 163.068 75.311) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 162.941 84.201) (end 162.941 75.438) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 165.989 87.249) (end 162.941 84.201) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 203.454 98.67392) (end 203.454 99.8855) (width 0.5588) (layer Cuivre) (net 133) (status 400)) + (segment (start 209.27568 111.53648) (end 209.27568 111.4425) (width 0.5588) (layer Cuivre) (net 133)) + (via (at 144.653 113.03) (size 1.143) (layers Composant Cuivre) (net 133)) + (via (at 177.165 77.089) (size 1.143) (layers Composant Cuivre) (net 133)) + (via (at 209.16646 124.26442) (size 1.143) (layers Composant Cuivre) (net 133)) + (via (at 199.1741 124.27204) (size 1.143) (layers Composant Cuivre) (net 133)) + (via (at 203.454 98.67392) (size 1.143) (layers Composant Cuivre) (net 133)) + (segment (start 109.4105 82.8675) (end 108.712 82.169) (width 0.5588) (layer Composant) (net 133)) + (segment (start 190.5 97.36582) (end 190.5 98.1075) (width 0.5588) (layer Cuivre) (net 133) (status 400)) + (segment (start 190.69304 97.36582) (end 190.5 97.36582) (width 0.5588) (layer Cuivre) (net 133)) + (segment (start 86.741 132.588) (end 86.741 129.54) (width 0.5588) (layer Composant) (net 133) (status 400)) + (segment (start 134.366 93.726) (end 134.3914 94.9452) (width 0.254) (layer Composant) (net 133) (status 800)) + (segment (start 176.276 124.841) (end 168.656 124.841) (width 0.5588) (layer Composant) (net 133) (status C00)) + (segment (start 136.652 118.6815) (end 136.652 120.396) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 136.652 120.396) (end 136.652 122.1105) (width 0.5588) (layer Composant) (net 133) (status 400)) + (segment (start 138.938 104.4956) (end 140.335 104.4956) (width 0.4318) (layer Composant) (net 133)) + (segment (start 138.938 104.4956) (end 137.668 105.029) (width 0.5588) (layer Composant) (net 133)) + (segment (start 140.335 104.4956) (end 143.129 104.4702) (width 0.4) (layer Composant) (net 133) (status 400)) + (segment (start 182.8165 125.73) (end 177.165 125.73) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 177.165 125.73) (end 176.276 124.841) (width 0.5588) (layer Composant) (net 133) (status 400)) + (segment (start 182.8165 125.73) (end 182.8165 127.9525) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 189.43828 110.5027) (end 190.0555 109.88548) (width 0.5588) (layer Cuivre) (net 133)) + (via (at 189.43828 110.5027) (size 1.143) (layers Composant Cuivre) (net 133)) + (segment (start 189.43828 110.5027) (end 190.9445 110.5027) (width 0.254) (layer Composant) (net 133) (status 400)) + (segment (start 204.36332 124.3965) (end 204.14234 124.61748) (width 0.5588) (layer Cuivre) (net 133)) + (segment (start 204.14234 124.61748) (end 203.79436 124.61748) (width 0.5588) (layer Cuivre) (net 133)) + (segment (start 204.36332 124.3965) (end 205.359 124.3965) (width 0.5588) (layer Cuivre) (net 133) (status 400)) + (via (at 203.79436 124.61748) (size 1.143) (layers Composant Cuivre) (net 133)) + (segment (start 203.79436 124.61748) (end 203.79436 125.64364) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 203.79436 125.64364) (end 203.2 126.238) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 203.2 126.238) (end 199.644 126.238) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 199.1741 124.27204) (end 199.1741 125.7681) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 199.644 126.238) (end 199.1741 125.7681) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 197.485 124.3965) (end 198.48068 124.3965) (width 0.5588) (layer Cuivre) (net 133) (status 800)) + (segment (start 199.1741 124.27204) (end 198.60514 124.27204) (width 0.5588) (layer Cuivre) (net 133)) + (segment (start 198.60514 124.27204) (end 198.48068 124.3965) (width 0.5588) (layer Cuivre) (net 133)) + (segment (start 200.42632 124.3965) (end 200.30186 124.27204) (width 0.5588) (layer Cuivre) (net 133)) + (segment (start 200.30186 124.27204) (end 199.1741 124.27204) (width 0.5588) (layer Cuivre) (net 133)) + (segment (start 201.422 124.3965) (end 200.42632 124.3965) (width 0.5588) (layer Cuivre) (net 133) (status 800)) + (segment (start 209.74812 112.00892) (end 209.27568 111.53648) (width 0.5588) (layer Cuivre) (net 133)) + (segment (start 214.45474 110.5027) (end 212.94852 112.00892) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 208.28 120.3325) (end 208.28 123.37796) (width 0.5588) (layer Cuivre) (net 133) (status 800)) + (segment (start 209.74812 112.00892) (end 212.94852 112.00892) (width 0.5588) (layer GND_layer) (net 133)) + (via (at 209.74812 112.00892) (size 1.143) (layers Composant Cuivre) (net 133)) + (segment (start 209.27568 111.4425) (end 208.28 111.4425) (width 0.5588) (layer Cuivre) (net 133) (status 400)) + (segment (start 128.9685 89.8525) (end 129.032 89.789) (width 0.5588) (layer Composant) (net 133)) + (segment (start 131.699 87.122) (end 129.032 89.789) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 129.3876 93.726) (end 129.8702 93.726) (width 0.254) (layer Composant) (net 133) (status C00)) + (segment (start 123.6345 103.505) (end 123.19 103.505) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 123.19 103.505) (end 122.301 102.616) (width 0.5588) (layer Composant) (net 133)) + (segment (start 122.301 102.616) (end 121.158 102.616) (width 0.5588) (layer Composant) (net 133)) + (segment (start 151.003 72.898) (end 133.604 72.898) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 133.604 72.898) (end 132.715 73.787) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 132.715 73.787) (end 132.715 75.438) (width 0.5588) (layer GND_layer) (net 133)) + (segment (start 137.3886 109.22) (end 137.3886 110.7694) (width 0.4318) (layer Composant) (net 133) (status 800)) + (segment (start 182.8165 127.9525) (end 183.134 128.27) (width 0.5588) (layer Composant) (net 133)) + (segment (start 183.134 133.604) (end 181.864 134.874) (width 0.5588) (layer Composant) (net 133)) + (segment (start 181.864 134.874) (end 181.864 136.906) (width 0.5588) (layer Composant) (net 133) (status 400)) + (segment (start 168.529 113.157) (end 176.149 113.157) (width 0.5588) (layer Composant) (net 133) (status C00)) + (segment (start 74.422 130.429) (end 74.422 133.477) (width 0.5588) (layer Composant) (net 133)) + (segment (start 74.422 133.477) (end 75.184 134.239) (width 0.5588) (layer Composant) (net 133)) + (segment (start 75.184 134.239) (end 76.327 134.239) (width 0.5588) (layer Composant) (net 133) (status 400)) + (segment (start 76.327 108.839) (end 76.327 111.379) (width 0.5588) (layer Cuivre) (net 133) (status C00)) + (segment (start 112.522 93.345) (end 112.522 95.885) (width 0.5588) (layer GND_layer) (net 133) (status C00)) + (segment (start 112.522 95.885) (end 112.522 98.425) (width 0.5588) (layer GND_layer) (net 133) (status C00)) + (segment (start 137.3886 110.7694) (end 136.5885 111.633) (width 0.4318) (layer Composant) (net 133) (status 400)) + (segment (start 134.366 93.726) (end 134.366 92.2655) (width 0.254) (layer Composant) (net 133) (status 800)) + (segment (start 134.366 92.2655) (end 133.5405 91.44) (width 0.5588) (layer Composant) (net 133) (status 400)) + (segment (start 125.349 100.7745) (end 124.587 100.711) (width 0.5588) (layer Composant) (net 133) (status 800)) + (segment (start 106.68 88.392) (end 107.315 89.027) (width 0.5588) (layer Composant) (net 133)) + (segment (start 107.315 89.027) (end 108.585 89.027) (width 0.5588) (layer Composant) (net 133) (status 400)) + (segment (start 135.763 102.997) (end 137.668 105.029) (width 0.4) (layer Composant) (net 133)) + (segment (start 133.218 103.632) (end 133.853 102.997) (width 0.4) (layer Composant) (net 133) (tstamp 52D04C3B)) + (segment (start 133.853 102.997) (end 135.763 102.997) (width 0.4) (layer Composant) (net 133) (tstamp 52D04C3E)) + (segment (start 132.588 103.632) (end 133.218 103.632) (width 0.4) (layer Composant) (net 133)) (segment (start 118.872 110.49) (end 118.872 113.792) (width 0.381) (layer GND_layer) (net 134)) - (via (at 166.751 105.791) (size 0.889) (layers Composant Cuivre) (net 135)) - (segment (start 163.957 111.3155) (end 163.957 109.728) (width 0.4318) (layer Composant) (net 135) (status 800)) - (segment (start 163.957 109.728) (end 166.751 106.934) (width 0.4318) (layer Composant) (net 135)) - (segment (start 176.149 97.79) (end 168.529 97.79) (width 0.762) (layer Composant) (net 135) (status C00)) - (segment (start 167.132 105.41) (end 167.132 99.187) (width 0.4318) (layer Cuivre) (net 135)) - (segment (start 166.751 106.934) (end 166.751 105.791) (width 0.4318) (layer Composant) (net 135)) - (segment (start 166.751 105.791) (end 167.132 105.41) (width 0.254) (layer Cuivre) (net 135)) + (segment (start 118.872 105.029) (end 119.507 104.394) (width 0.381) (layer Composant) (net 134)) + (segment (start 119.507 104.394) (end 120.777 104.394) (width 0.381) (layer Composant) (net 134) (status 400)) + (segment (start 117.221 134.747) (end 119.38 132.588) (width 0.381) (layer GND_layer) (net 134)) + (segment (start 124.714 110.363) (end 124.7775 110.2995) (width 0.4318) (layer Composant) (net 134)) + (segment (start 124.7775 110.2995) (end 124.7775 108.712) (width 0.4318) (layer Composant) (net 134) (status 400)) + (segment (start 123.444 105.283) (end 123.825 105.664) (width 0.4318) (layer GND_layer) (net 134)) + (segment (start 123.825 105.664) (end 123.825 110.109) (width 0.4318) (layer GND_layer) (net 134)) + (segment (start 123.825 110.109) (end 123.571 110.363) (width 0.4318) (layer GND_layer) (net 134)) + (segment (start 117.983 101.346) (end 117.983 104.14) (width 0.381) (layer Composant) (net 134) (status 800)) + (segment (start 117.983 104.14) (end 118.872 105.029) (width 0.381) (layer Composant) (net 134)) + (via (at 118.872 105.029) (size 0.889) (layers Composant Cuivre) (net 134)) + (via (at 123.444 105.283) (size 0.889) (layers Composant Cuivre) (net 134)) + (via (at 123.571 110.363) (size 0.889) (layers Composant Cuivre) (net 134)) + (segment (start 119.38 114.3) (end 119.38 132.588) (width 0.381) (layer GND_layer) (net 134)) + (segment (start 119.38 132.588) (end 119.38 132.715) (width 0.381) (layer GND_layer) (net 134)) + (segment (start 126.492 105.9688) (end 126.492 106.426) (width 0.254) (layer Composant) (net 134)) + (segment (start 126.5428 106.4768) (end 127.635 106.4768) (width 0.254) (layer Composant) (net 134) (status 400)) + (segment (start 126.492 106.426) (end 126.5428 106.4768) (width 0.254) (layer Composant) (net 134)) + (segment (start 123.444 105.283) (end 124.206 106.045) (width 0.4318) (layer Composant) (net 134)) + (segment (start 125.8062 106.045) (end 125.8824 105.9688) (width 0.4318) (layer Composant) (net 134)) + (segment (start 124.206 106.045) (end 125.8062 106.045) (width 0.4318) (layer Composant) (net 134)) + (segment (start 123.444 105.283) (end 121.666 105.283) (width 0.4318) (layer Composant) (net 134)) + (segment (start 121.666 105.283) (end 120.777 104.394) (width 0.4318) (layer Composant) (net 134) (status 400)) + (segment (start 123.571 110.363) (end 124.714 110.363) (width 0.4318) (layer Composant) (net 134)) + (segment (start 117.348 115.062) (end 117.348 110.49) (width 0.381) (layer GND_layer) (net 134)) + (segment (start 116.078 139.446) (end 115.824 139.446) (width 0.381) (layer GND_layer) (net 134) (status 400)) + (segment (start 117.221 138.303) (end 116.078 139.446) (width 0.381) (layer GND_layer) (net 134)) + (segment (start 117.221 134.747) (end 117.221 138.303) (width 0.381) (layer GND_layer) (net 134)) + (segment (start 118.872 105.029) (end 118.872 110.49) (width 0.381) (layer GND_layer) (net 134)) + (segment (start 113.284 139.446) (end 113.665 139.446) (width 0.381) (layer GND_layer) (net 134) (status 800)) + (segment (start 113.665 139.446) (end 114.554 138.557) (width 0.381) (layer GND_layer) (net 134)) + (segment (start 118.872 113.792) (end 119.38 114.3) (width 0.381) (layer GND_layer) (net 134)) + (segment (start 126.492 105.9688) (end 125.8824 105.9688) (width 0.254) (layer Composant) (net 134)) + (segment (start 127.635 105.9688) (end 126.492 105.9688) (width 0.254) (layer Composant) (net 134) (status 800)) + (segment (start 117.348 110.49) (end 118.872 110.49) (width 0.254) (layer GND_layer) (net 134)) + (segment (start 114.554 138.557) (end 114.554 132.334) (width 0.381) (layer GND_layer) (net 134)) + (segment (start 116.332 116.078) (end 117.348 115.062) (width 0.381) (layer GND_layer) (net 134)) + (segment (start 116.332 130.556) (end 116.332 116.078) (width 0.381) (layer GND_layer) (net 134)) + (segment (start 114.554 132.334) (end 116.332 130.556) (width 0.381) (layer GND_layer) (net 134)) (segment (start 167.132 99.187) (end 168.529 97.79) (width 0.4318) (layer Cuivre) (net 135) (status 400)) - (segment (start 83.439 138.557) (end 80.645 138.557) (width 0.381) (layer Cuivre) (net 139) (status 800)) + (segment (start 166.751 105.791) (end 167.132 105.41) (width 0.254) (layer Cuivre) (net 135)) + (segment (start 166.751 106.934) (end 166.751 105.791) (width 0.4318) (layer Composant) (net 135)) + (segment (start 167.132 105.41) (end 167.132 99.187) (width 0.4318) (layer Cuivre) (net 135)) + (segment (start 176.149 97.79) (end 168.529 97.79) (width 0.762) (layer Composant) (net 135) (status C00)) + (segment (start 163.957 109.728) (end 166.751 106.934) (width 0.4318) (layer Composant) (net 135)) + (segment (start 163.957 111.3155) (end 163.957 109.728) (width 0.4318) (layer Composant) (net 135) (status 800)) + (via (at 166.751 105.791) (size 0.889) (layers Composant Cuivre) (net 135)) (segment (start 80.645 138.557) (end 78.867 136.779) (width 0.381) (layer Cuivre) (net 139) (status 400)) - (segment (start 77.597 112.649) (end 78.867 111.379) (width 0.254) (layer Composant) (net 140) (status 400)) - (segment (start 91.44 134.62) (end 91.44 135.382) (width 0.254) (layer Composant) (net 140) (status 800)) - (segment (start 90.424 136.398) (end 82.423 136.398) (width 0.254) (layer Composant) (net 140)) - (segment (start 80.264 125.349) (end 78.232 125.349) (width 0.254) (layer Composant) (net 140)) - (segment (start 78.232 125.349) (end 77.597 124.714) (width 0.254) (layer Composant) (net 140)) - (segment (start 81.28 135.255) (end 81.28 126.365) (width 0.254) (layer Composant) (net 140)) - (segment (start 91.44 135.382) (end 90.424 136.398) (width 0.254) (layer Composant) (net 140)) - (segment (start 80.264 125.349) (end 81.28 126.365) (width 0.254) (layer Composant) (net 140)) - (segment (start 77.597 124.714) (end 77.597 112.649) (width 0.254) (layer Composant) (net 140)) + (segment (start 83.439 138.557) (end 80.645 138.557) (width 0.381) (layer Cuivre) (net 139) (status 800)) (segment (start 82.423 136.398) (end 81.28 135.255) (width 0.254) (layer Composant) (net 140)) - (segment (start 163.195 114.046) (end 161.3535 114.046) (width 0.762) (layer Composant) (net 141) (status 400)) - (segment (start 163.957 113.284) (end 163.195 114.046) (width 0.762) (layer Composant) (net 141)) - (segment (start 161.3535 111.252) (end 161.3535 114.046) (width 0.762) (layer Composant) (net 141) (status C00)) - (segment (start 163.957 113.2205) (end 163.957 113.284) (width 0.762) (layer Composant) (net 141) (status 800)) - (segment (start 161.3535 111.252) (end 161.3535 110.5535) (width 0.254) (layer Composant) (net 141) (status 800)) - (segment (start 160.02 108.331) (end 159.512 108.331) (width 0.254) (layer Composant) (net 141) (status 400)) - (segment (start 160.401 108.712) (end 160.02 108.331) (width 0.254) (layer Composant) (net 141)) - (segment (start 160.401 109.601) (end 160.401 108.712) (width 0.254) (layer Composant) (net 141)) + (segment (start 77.597 124.714) (end 77.597 112.649) (width 0.254) (layer Composant) (net 140)) + (segment (start 80.264 125.349) (end 81.28 126.365) (width 0.254) (layer Composant) (net 140)) + (segment (start 91.44 135.382) (end 90.424 136.398) (width 0.254) (layer Composant) (net 140)) + (segment (start 81.28 135.255) (end 81.28 126.365) (width 0.254) (layer Composant) (net 140)) + (segment (start 78.232 125.349) (end 77.597 124.714) (width 0.254) (layer Composant) (net 140)) + (segment (start 80.264 125.349) (end 78.232 125.349) (width 0.254) (layer Composant) (net 140)) + (segment (start 90.424 136.398) (end 82.423 136.398) (width 0.254) (layer Composant) (net 140)) + (segment (start 91.44 134.62) (end 91.44 135.382) (width 0.254) (layer Composant) (net 140) (status 800)) + (segment (start 77.597 112.649) (end 78.867 111.379) (width 0.254) (layer Composant) (net 140) (status 400)) (segment (start 161.3535 110.5535) (end 160.401 109.601) (width 0.254) (layer Composant) (net 141)) - (segment (start 186.182 71.12) (end 186.182 74.676) (width 0.381) (layer GND_layer) (net 142)) - (via (at 186.182 74.676) (size 0.635) (layers Composant Cuivre) (net 142)) - (segment (start 184.15 74.676) (end 186.182 74.676) (width 0.381) (layer Composant) (net 142) (status 800)) - (segment (start 188.2775 71.247) (end 187.706 71.247) (width 0.381) (layer Composant) (net 142) (status 800)) - (segment (start 187.706 71.247) (end 187.579 71.12) (width 0.381) (layer Composant) (net 142)) - (segment (start 187.579 71.12) (end 186.182 71.12) (width 0.381) (layer Composant) (net 142)) + (segment (start 160.401 109.601) (end 160.401 108.712) (width 0.254) (layer Composant) (net 141)) + (segment (start 160.401 108.712) (end 160.02 108.331) (width 0.254) (layer Composant) (net 141)) + (segment (start 160.02 108.331) (end 159.512 108.331) (width 0.254) (layer Composant) (net 141) (status 400)) + (segment (start 161.3535 111.252) (end 161.3535 110.5535) (width 0.254) (layer Composant) (net 141) (status 800)) + (segment (start 163.957 113.2205) (end 163.957 113.284) (width 0.762) (layer Composant) (net 141) (status 800)) + (segment (start 161.3535 111.252) (end 161.3535 114.046) (width 0.762) (layer Composant) (net 141) (status C00)) + (segment (start 163.957 113.284) (end 163.195 114.046) (width 0.762) (layer Composant) (net 141)) + (segment (start 163.195 114.046) (end 161.3535 114.046) (width 0.762) (layer Composant) (net 141) (status 400)) (via (at 186.182 71.12) (size 0.889) (layers Composant Cuivre) (net 142)) - (segment (start 181.102 72.9615) (end 183.7055 72.9615) (width 0.4318) (layer Composant) (net 143) (status 800)) + (segment (start 187.579 71.12) (end 186.182 71.12) (width 0.381) (layer Composant) (net 142)) + (segment (start 187.706 71.247) (end 187.579 71.12) (width 0.381) (layer Composant) (net 142)) + (segment (start 188.2775 71.247) (end 187.706 71.247) (width 0.381) (layer Composant) (net 142) (status 800)) + (segment (start 184.15 74.676) (end 186.182 74.676) (width 0.381) (layer Composant) (net 142) (status 800)) + (via (at 186.182 74.676) (size 0.635) (layers Composant Cuivre) (net 142)) + (segment (start 186.182 71.12) (end 186.182 74.676) (width 0.381) (layer GND_layer) (net 142)) (segment (start 183.7055 72.9615) (end 184.15 73.406) (width 0.4318) (layer Composant) (net 143) (status 400)) - (segment (start 182.753 75.946) (end 182.245 75.438) (width 0.381) (layer Composant) (net 144)) - (segment (start 181.102 74.93) (end 181.102 74.8665) (width 0.381) (layer Composant) (net 144) (status 400)) - (segment (start 184.15 75.946) (end 182.753 75.946) (width 0.381) (layer Composant) (net 144) (status 800)) - (segment (start 182.245 75.438) (end 181.61 75.438) (width 0.381) (layer Composant) (net 144)) + (segment (start 181.102 72.9615) (end 183.7055 72.9615) (width 0.4318) (layer Composant) (net 143) (status 800)) (segment (start 181.61 75.438) (end 181.102 74.93) (width 0.381) (layer Composant) (net 144)) - (segment (start 184.0865 77.2795) (end 184.15 77.216) (width 0.4318) (layer Composant) (net 145) (status 400)) + (segment (start 182.245 75.438) (end 181.61 75.438) (width 0.381) (layer Composant) (net 144)) + (segment (start 184.15 75.946) (end 182.753 75.946) (width 0.381) (layer Composant) (net 144) (status 800)) + (segment (start 181.102 74.93) (end 181.102 74.8665) (width 0.381) (layer Composant) (net 144) (status 400)) + (segment (start 182.753 75.946) (end 182.245 75.438) (width 0.381) (layer Composant) (net 144)) (segment (start 181.102 77.2795) (end 184.0865 77.2795) (width 0.4318) (layer Composant) (net 145) (status 800)) - (segment (start 181.8005 78.486) (end 181.102 79.1845) (width 0.4318) (layer Composant) (net 146) (status 400)) + (segment (start 184.0865 77.2795) (end 184.15 77.216) (width 0.4318) (layer Composant) (net 145) (status 400)) (segment (start 184.15 78.486) (end 181.8005 78.486) (width 0.4318) (layer Composant) (net 146) (status 800)) - (segment (start 184.15 79.756) (end 183.007 79.756) (width 0.381) (layer Composant) (net 147) (status 800)) - (segment (start 182.245 80.518) (end 179.959 80.518) (width 0.381) (layer Composant) (net 147)) - (segment (start 178.562 79.0575) (end 178.562 79.121) (width 0.4318) (layer Composant) (net 147) (status 800)) - (segment (start 178.562 79.121) (end 179.959 80.518) (width 0.4318) (layer Composant) (net 147)) + (segment (start 181.8005 78.486) (end 181.102 79.1845) (width 0.4318) (layer Composant) (net 146) (status 400)) (segment (start 183.007 79.756) (end 182.245 80.518) (width 0.381) (layer Composant) (net 147)) - (segment (start 183.134 92.964) (end 186.69 89.408) (width 0.381) (layer Cuivre) (net 148)) - (segment (start 179.197 92.964) (end 183.134 92.964) (width 0.381) (layer Cuivre) (net 148)) - (segment (start 178.562 92.329) (end 179.197 92.964) (width 0.381) (layer Cuivre) (net 148)) - (segment (start 163.068 95.3135) (end 162.7505 95.631) (width 0.4318) (layer Composant) (net 148) (status 400)) - (segment (start 175.641 91.567) (end 169.291 91.567) (width 0.4318) (layer Composant) (net 148)) - (segment (start 164.846 95.3135) (end 163.068 95.3135) (width 0.4318) (layer Composant) (net 148) (status 800)) - (segment (start 186.69 89.408) (end 186.69 88.265) (width 0.381) (layer Cuivre) (net 148) (status 400)) - (segment (start 168.529 92.329) (end 167.513 92.329) (width 0.381) (layer Composant) (net 148) (status 800)) - (segment (start 167.513 92.329) (end 166.878 92.964) (width 0.381) (layer Composant) (net 148)) - (segment (start 166.878 92.964) (end 166.878 95.758) (width 0.381) (layer Composant) (net 148)) - (segment (start 165.2905 95.758) (end 166.878 95.758) (width 0.381) (layer Composant) (net 148)) - (segment (start 176.149 92.329) (end 176.149 92.075) (width 0.381) (layer Composant) (net 148) (status 800)) - (segment (start 176.149 92.329) (end 178.562 92.329) (width 0.381) (layer Cuivre) (net 148) (status 800)) - (via (at 166.878 95.758) (size 0.889) (layers Composant Cuivre) (net 148)) - (segment (start 164.846 95.3135) (end 165.2905 95.758) (width 0.254) (layer Composant) (net 148) (status 800)) - (segment (start 169.291 91.567) (end 168.529 92.329) (width 0.381) (layer Composant) (net 148) (status 400)) + (segment (start 178.562 79.121) (end 179.959 80.518) (width 0.4318) (layer Composant) (net 147)) + (segment (start 178.562 79.0575) (end 178.562 79.121) (width 0.4318) (layer Composant) (net 147) (status 800)) + (segment (start 182.245 80.518) (end 179.959 80.518) (width 0.381) (layer Composant) (net 147)) + (segment (start 184.15 79.756) (end 183.007 79.756) (width 0.381) (layer Composant) (net 147) (status 800)) (segment (start 176.149 92.075) (end 175.641 91.567) (width 0.381) (layer Composant) (net 148)) - (via (at 158.242 74.676) (size 0.635) (layers Composant Cuivre) (net 149)) - (segment (start 156.21 74.676) (end 158.242 74.676) (width 0.381) (layer Composant) (net 149) (status 800)) - (via (at 158.242 71.247) (size 0.635) (layers Composant Cuivre) (net 149)) - (segment (start 160.3375 71.247) (end 158.242 71.247) (width 0.381) (layer Composant) (net 149) (status 800)) + (segment (start 169.291 91.567) (end 168.529 92.329) (width 0.381) (layer Composant) (net 148) (status 400)) + (segment (start 164.846 95.3135) (end 165.2905 95.758) (width 0.254) (layer Composant) (net 148) (status 800)) + (via (at 166.878 95.758) (size 0.889) (layers Composant Cuivre) (net 148)) + (segment (start 176.149 92.329) (end 178.562 92.329) (width 0.381) (layer Cuivre) (net 148) (status 800)) + (segment (start 176.149 92.329) (end 176.149 92.075) (width 0.381) (layer Composant) (net 148) (status 800)) + (segment (start 165.2905 95.758) (end 166.878 95.758) (width 0.381) (layer Composant) (net 148)) + (segment (start 166.878 92.964) (end 166.878 95.758) (width 0.381) (layer Composant) (net 148)) + (segment (start 167.513 92.329) (end 166.878 92.964) (width 0.381) (layer Composant) (net 148)) + (segment (start 168.529 92.329) (end 167.513 92.329) (width 0.381) (layer Composant) (net 148) (status 800)) + (segment (start 186.69 89.408) (end 186.69 88.265) (width 0.381) (layer Cuivre) (net 148) (status 400)) + (segment (start 164.846 95.3135) (end 163.068 95.3135) (width 0.4318) (layer Composant) (net 148) (status 800)) + (segment (start 175.641 91.567) (end 169.291 91.567) (width 0.4318) (layer Composant) (net 148)) + (segment (start 163.068 95.3135) (end 162.7505 95.631) (width 0.4318) (layer Composant) (net 148) (status 400)) + (segment (start 178.562 92.329) (end 179.197 92.964) (width 0.381) (layer Cuivre) (net 148)) + (segment (start 179.197 92.964) (end 183.134 92.964) (width 0.381) (layer Cuivre) (net 148)) + (segment (start 183.134 92.964) (end 186.69 89.408) (width 0.381) (layer Cuivre) (net 148)) (segment (start 158.242 71.247) (end 158.242 74.676) (width 0.381) (layer Cuivre) (net 149)) - (segment (start 154.94 73.406) (end 156.21 73.406) (width 0.381) (layer Composant) (net 150) (status 400)) - (segment (start 153.162 72.8345) (end 154.3685 72.8345) (width 0.381) (layer Composant) (net 150) (status 800)) + (segment (start 160.3375 71.247) (end 158.242 71.247) (width 0.381) (layer Composant) (net 149) (status 800)) + (via (at 158.242 71.247) (size 0.635) (layers Composant Cuivre) (net 149)) + (segment (start 156.21 74.676) (end 158.242 74.676) (width 0.381) (layer Composant) (net 149) (status 800)) + (via (at 158.242 74.676) (size 0.635) (layers Composant Cuivre) (net 149)) (segment (start 154.3685 72.8345) (end 154.94 73.406) (width 0.381) (layer Composant) (net 150)) - (segment (start 154.813 75.946) (end 154.305 75.438) (width 0.381) (layer Composant) (net 151)) - (segment (start 156.21 75.946) (end 154.813 75.946) (width 0.381) (layer Composant) (net 151) (status 800)) - (segment (start 154.305 75.438) (end 153.67 75.438) (width 0.381) (layer Composant) (net 151)) - (segment (start 153.162 74.7395) (end 153.162 74.93) (width 0.254) (layer Composant) (net 151) (status 800)) + (segment (start 153.162 72.8345) (end 154.3685 72.8345) (width 0.381) (layer Composant) (net 150) (status 800)) + (segment (start 154.94 73.406) (end 156.21 73.406) (width 0.381) (layer Composant) (net 150) (status 400)) (segment (start 153.162 74.93) (end 153.67 75.438) (width 0.254) (layer Composant) (net 151)) - (segment (start 153.924 77.216) (end 156.21 77.216) (width 0.381) (layer Composant) (net 152) (status 400)) - (segment (start 153.035 77.1525) (end 153.8605 77.1525) (width 0.381) (layer Composant) (net 152) (status 800)) + (segment (start 153.162 74.7395) (end 153.162 74.93) (width 0.254) (layer Composant) (net 151) (status 800)) + (segment (start 154.305 75.438) (end 153.67 75.438) (width 0.381) (layer Composant) (net 151)) + (segment (start 156.21 75.946) (end 154.813 75.946) (width 0.381) (layer Composant) (net 151) (status 800)) + (segment (start 154.813 75.946) (end 154.305 75.438) (width 0.381) (layer Composant) (net 151)) (segment (start 153.8605 77.1525) (end 153.924 77.216) (width 0.381) (layer Composant) (net 152)) - (segment (start 153.6065 79.0575) (end 154.178 78.486) (width 0.381) (layer Composant) (net 153)) - (segment (start 154.178 78.486) (end 156.21 78.486) (width 0.381) (layer Composant) (net 153) (status 400)) + (segment (start 153.035 77.1525) (end 153.8605 77.1525) (width 0.381) (layer Composant) (net 152) (status 800)) + (segment (start 153.924 77.216) (end 156.21 77.216) (width 0.381) (layer Composant) (net 152) (status 400)) (segment (start 153.035 79.0575) (end 153.6065 79.0575) (width 0.381) (layer Composant) (net 153) (status 800)) - (segment (start 154.305 80.518) (end 155.067 79.756) (width 0.381) (layer Composant) (net 154)) - (segment (start 151.638 80.518) (end 154.305 80.518) (width 0.381) (layer Composant) (net 154)) - (segment (start 155.067 79.756) (end 156.21 79.756) (width 0.381) (layer Composant) (net 154) (status 400)) - (segment (start 150.876 79.0575) (end 150.876 79.756) (width 0.381) (layer Composant) (net 154) (status 800)) + (segment (start 154.178 78.486) (end 156.21 78.486) (width 0.381) (layer Composant) (net 153) (status 400)) + (segment (start 153.6065 79.0575) (end 154.178 78.486) (width 0.381) (layer Composant) (net 153)) (segment (start 150.876 79.756) (end 151.638 80.518) (width 0.381) (layer Composant) (net 154)) - (segment (start 123.19 74.676) (end 125.222 74.676) (width 0.381) (layer Composant) (net 155) (status 800)) - (segment (start 125.222 71.247) (end 125.222 74.676) (width 0.381) (layer GND_layer) (net 155)) - (via (at 125.222 71.247) (size 0.635) (layers Composant Cuivre) (net 155)) - (segment (start 125.222 71.247) (end 127.3175 71.247) (width 0.381) (layer Composant) (net 155) (status 400)) + (segment (start 150.876 79.0575) (end 150.876 79.756) (width 0.381) (layer Composant) (net 154) (status 800)) + (segment (start 155.067 79.756) (end 156.21 79.756) (width 0.381) (layer Composant) (net 154) (status 400)) + (segment (start 151.638 80.518) (end 154.305 80.518) (width 0.381) (layer Composant) (net 154)) + (segment (start 154.305 80.518) (end 155.067 79.756) (width 0.381) (layer Composant) (net 154)) (via (at 125.222 74.676) (size 0.635) (layers Composant Cuivre) (net 155)) - (segment (start 121.7295 77.1525) (end 121.793 77.216) (width 0.381) (layer Composant) (net 156)) - (segment (start 121.793 77.216) (end 123.19 77.216) (width 0.381) (layer Composant) (net 156) (status 400)) + (segment (start 125.222 71.247) (end 127.3175 71.247) (width 0.381) (layer Composant) (net 155) (status 400)) + (via (at 125.222 71.247) (size 0.635) (layers Composant Cuivre) (net 155)) + (segment (start 125.222 71.247) (end 125.222 74.676) (width 0.381) (layer GND_layer) (net 155)) + (segment (start 123.19 74.676) (end 125.222 74.676) (width 0.381) (layer Composant) (net 155) (status 800)) (segment (start 120.142 77.1525) (end 121.7295 77.1525) (width 0.381) (layer Composant) (net 156) (status 800)) - (segment (start 120.9675 79.0575) (end 120.142 79.0575) (width 0.381) (layer Composant) (net 157) (status 400)) - (segment (start 123.19 78.486) (end 121.539 78.486) (width 0.381) (layer Composant) (net 157) (status 800)) + (segment (start 121.793 77.216) (end 123.19 77.216) (width 0.381) (layer Composant) (net 156) (status 400)) + (segment (start 121.7295 77.1525) (end 121.793 77.216) (width 0.381) (layer Composant) (net 156)) (segment (start 121.539 78.486) (end 120.9675 79.0575) (width 0.381) (layer Composant) (net 157)) - (segment (start 84.836 93.091) (end 81.5086 93.091) (width 0.762) (layer Composant) (net 158) (status 400)) - (segment (start 87.6935 90.2335) (end 84.836 93.091) (width 0.762) (layer Composant) (net 158)) - (segment (start 99.949 81.026) (end 97.282 83.693) (width 0.762) (layer Composant) (net 158)) - (segment (start 99.949 78.486) (end 99.949 79.629) (width 0.4318) (layer Composant) (net 158) (status 400)) - (segment (start 92.837 83.693) (end 88.9 87.63) (width 0.762) (layer Composant) (net 158) (status 400)) - (segment (start 104.267 74.1045) (end 104.267 74.168) (width 0.4318) (layer Composant) (net 158) (status 800)) - (segment (start 97.282 83.693) (end 92.837 83.693) (width 0.762) (layer Composant) (net 158)) - (segment (start 87.6935 90.2335) (end 87.6935 88.8365) (width 0.762) (layer Composant) (net 158)) - (segment (start 93.472 78.74) (end 94.361 79.629) (width 0.762) (layer Composant) (net 158)) - (segment (start 93.472 77.089) (end 93.472 78.74) (width 0.762) (layer Composant) (net 158) (status 800)) - (segment (start 99.949 79.629) (end 99.949 81.026) (width 0.762) (layer Composant) (net 158) (status 800)) - (segment (start 87.6935 88.8365) (end 88.9 87.63) (width 0.762) (layer Composant) (net 158) (status 400)) - (segment (start 104.267 74.168) (end 99.949 78.486) (width 0.4318) (layer Composant) (net 158)) + (segment (start 123.19 78.486) (end 121.539 78.486) (width 0.381) (layer Composant) (net 157) (status 800)) + (segment (start 120.9675 79.0575) (end 120.142 79.0575) (width 0.381) (layer Composant) (net 157) (status 400)) (segment (start 94.361 79.629) (end 99.949 79.629) (width 0.762) (layer Composant) (net 158) (status 400)) - (segment (start 184.404 130.302) (end 184.404 136.906) (width 0.4318) (layer GND_layer) (net 159) (status C00)) - (segment (start 184.404 130.302) (end 184.404 126.0475) (width 0.4318) (layer Composant) (net 159) (status 800)) + (segment (start 104.267 74.168) (end 99.949 78.486) (width 0.4318) (layer Composant) (net 158)) + (segment (start 87.6935 88.8365) (end 88.9 87.63) (width 0.762) (layer Composant) (net 158) (status 400)) + (segment (start 99.949 79.629) (end 99.949 81.026) (width 0.762) (layer Composant) (net 158) (status 800)) + (segment (start 93.472 77.089) (end 93.472 78.74) (width 0.762) (layer Composant) (net 158) (status 800)) + (segment (start 93.472 78.74) (end 94.361 79.629) (width 0.762) (layer Composant) (net 158)) + (segment (start 87.6935 90.2335) (end 87.6935 88.8365) (width 0.762) (layer Composant) (net 158)) + (segment (start 97.282 83.693) (end 92.837 83.693) (width 0.762) (layer Composant) (net 158)) + (segment (start 104.267 74.1045) (end 104.267 74.168) (width 0.4318) (layer Composant) (net 158) (status 800)) + (segment (start 92.837 83.693) (end 88.9 87.63) (width 0.762) (layer Composant) (net 158) (status 400)) + (segment (start 99.949 78.486) (end 99.949 79.629) (width 0.4318) (layer Composant) (net 158) (status 400)) + (segment (start 99.949 81.026) (end 97.282 83.693) (width 0.762) (layer Composant) (net 158)) + (segment (start 87.6935 90.2335) (end 84.836 93.091) (width 0.762) (layer Composant) (net 158)) + (segment (start 84.836 93.091) (end 81.5086 93.091) (width 0.762) (layer Composant) (net 158) (status 400)) (segment (start 184.404 126.0475) (end 184.7215 125.73) (width 0.4318) (layer Composant) (net 159) (status 400)) - (segment (start 120.7135 73.406) (end 120.142 72.8345) (width 0.381) (layer Composant) (net 160) (status 400)) + (segment (start 184.404 130.302) (end 184.404 126.0475) (width 0.4318) (layer Composant) (net 159) (status 800)) + (segment (start 184.404 130.302) (end 184.404 136.906) (width 0.4318) (layer GND_layer) (net 159) (status C00)) (segment (start 123.19 73.406) (end 120.7135 73.406) (width 0.381) (layer Composant) (net 160) (status 800)) - (segment (start 121.793 75.946) (end 121.285 75.438) (width 0.381) (layer Composant) (net 161)) - (segment (start 120.142 74.7395) (end 120.142 74.93) (width 0.254) (layer Composant) (net 161) (status 800)) - (segment (start 121.285 75.438) (end 120.65 75.438) (width 0.381) (layer Composant) (net 161)) - (segment (start 120.142 74.93) (end 120.65 75.438) (width 0.254) (layer Composant) (net 161)) + (segment (start 120.7135 73.406) (end 120.142 72.8345) (width 0.381) (layer Composant) (net 160) (status 400)) (segment (start 123.19 75.946) (end 121.793 75.946) (width 0.381) (layer Composant) (net 161) (status 800)) - (segment (start 121.285 80.518) (end 118.999 80.518) (width 0.381) (layer Composant) (net 162)) - (segment (start 118.999 80.518) (end 117.602 79.0575) (width 0.381) (layer Composant) (net 162) (status 400)) - (segment (start 122.047 79.756) (end 121.285 80.518) (width 0.381) (layer Composant) (net 162)) + (segment (start 120.142 74.93) (end 120.65 75.438) (width 0.254) (layer Composant) (net 161)) + (segment (start 121.285 75.438) (end 120.65 75.438) (width 0.381) (layer Composant) (net 161)) + (segment (start 120.142 74.7395) (end 120.142 74.93) (width 0.254) (layer Composant) (net 161) (status 800)) + (segment (start 121.793 75.946) (end 121.285 75.438) (width 0.381) (layer Composant) (net 161)) (segment (start 123.19 79.756) (end 122.047 79.756) (width 0.381) (layer Composant) (net 162) (status 800)) - (segment (start 97.155 85.471) (end 95.885 86.741) (width 0.381) (layer Composant) (net 163)) - (segment (start 95.885 91.313) (end 97.79 93.218) (width 0.381) (layer Composant) (net 163) (status 400)) - (segment (start 95.885 86.741) (end 95.885 91.313) (width 0.381) (layer Composant) (net 163)) + (segment (start 122.047 79.756) (end 121.285 80.518) (width 0.381) (layer Composant) (net 162)) + (segment (start 118.999 80.518) (end 117.602 79.0575) (width 0.381) (layer Composant) (net 162) (status 400)) + (segment (start 121.285 80.518) (end 118.999 80.518) (width 0.381) (layer Composant) (net 162)) (segment (start 98.7425 85.471) (end 97.155 85.471) (width 0.381) (layer Composant) (net 163) (status 800)) - (segment (start 128.27 77.216) (end 126.619 77.216) (width 0.381) (layer Composant) (net 164) (status 800)) - (segment (start 126.619 77.216) (end 125.984 76.581) (width 0.381) (layer Composant) (net 164)) - (segment (start 125.984 76.581) (end 125.984 74.041) (width 0.381) (layer Composant) (net 164)) - (segment (start 123.317 71.374) (end 118.618 71.374) (width 0.381) (layer Composant) (net 164)) - (segment (start 118.618 71.374) (end 116.459 73.533) (width 0.381) (layer Composant) (net 164)) - (segment (start 116.459 73.533) (end 113.284 73.533) (width 0.381) (layer Composant) (net 164) (status 400)) + (segment (start 95.885 86.741) (end 95.885 91.313) (width 0.381) (layer Composant) (net 163)) + (segment (start 95.885 91.313) (end 97.79 93.218) (width 0.381) (layer Composant) (net 163) (status 400)) + (segment (start 97.155 85.471) (end 95.885 86.741) (width 0.381) (layer Composant) (net 163)) (segment (start 125.984 74.041) (end 123.317 71.374) (width 0.381) (layer Composant) (net 164)) - (segment (start 117.856 80.518) (end 116.459 80.518) (width 0.381) (layer Composant) (net 165)) - (segment (start 116.459 80.518) (end 116.078 80.137) (width 0.381) (layer Composant) (net 165)) - (segment (start 116.078 80.137) (end 116.078 75.311) (width 0.381) (layer Composant) (net 165)) - (segment (start 115.57 74.803) (end 112.014 74.803) (width 0.381) (layer Composant) (net 165)) - (segment (start 123.19 82.296) (end 119.634 82.296) (width 0.381) (layer Composant) (net 165) (status 800)) - (segment (start 112.014 74.803) (end 110.744 73.533) (width 0.381) (layer Composant) (net 165) (status 400)) - (segment (start 119.634 82.296) (end 117.856 80.518) (width 0.381) (layer Composant) (net 165)) + (segment (start 116.459 73.533) (end 113.284 73.533) (width 0.381) (layer Composant) (net 164) (status 400)) + (segment (start 118.618 71.374) (end 116.459 73.533) (width 0.381) (layer Composant) (net 164)) + (segment (start 123.317 71.374) (end 118.618 71.374) (width 0.381) (layer Composant) (net 164)) + (segment (start 125.984 76.581) (end 125.984 74.041) (width 0.381) (layer Composant) (net 164)) + (segment (start 126.619 77.216) (end 125.984 76.581) (width 0.381) (layer Composant) (net 164)) + (segment (start 128.27 77.216) (end 126.619 77.216) (width 0.381) (layer Composant) (net 164) (status 800)) (segment (start 116.078 75.311) (end 115.57 74.803) (width 0.381) (layer Composant) (net 165)) - (segment (start 117.475 81.28) (end 115.951 81.28) (width 0.381) (layer Composant) (net 166)) - (segment (start 115.951 81.28) (end 115.316 80.645) (width 0.381) (layer Composant) (net 166)) - (segment (start 115.316 80.645) (end 115.316 77.851) (width 0.381) (layer Composant) (net 166)) - (segment (start 124.587 83.058) (end 119.253 83.058) (width 0.381) (layer Composant) (net 166)) - (segment (start 109.474 74.803) (end 108.204 73.533) (width 0.381) (layer Composant) (net 166) (status 400)) - (segment (start 124.841 82.804) (end 124.587 83.058) (width 0.381) (layer Composant) (net 166)) - (segment (start 119.253 83.058) (end 117.475 81.28) (width 0.381) (layer Composant) (net 166)) - (segment (start 124.841 81.788) (end 124.841 82.804) (width 0.381) (layer Composant) (net 166)) - (segment (start 124.079 81.026) (end 124.841 81.788) (width 0.381) (layer Composant) (net 166)) - (segment (start 115.316 77.851) (end 114.808 77.343) (width 0.381) (layer Composant) (net 166)) - (segment (start 114.808 77.343) (end 109.982 77.343) (width 0.381) (layer Composant) (net 166)) - (segment (start 109.982 77.343) (end 109.474 76.835) (width 0.381) (layer Composant) (net 166)) - (segment (start 123.19 81.026) (end 124.079 81.026) (width 0.381) (layer Composant) (net 166) (status 800)) + (segment (start 119.634 82.296) (end 117.856 80.518) (width 0.381) (layer Composant) (net 165)) + (segment (start 112.014 74.803) (end 110.744 73.533) (width 0.381) (layer Composant) (net 165) (status 400)) + (segment (start 123.19 82.296) (end 119.634 82.296) (width 0.381) (layer Composant) (net 165) (status 800)) + (segment (start 115.57 74.803) (end 112.014 74.803) (width 0.381) (layer Composant) (net 165)) + (segment (start 116.078 80.137) (end 116.078 75.311) (width 0.381) (layer Composant) (net 165)) + (segment (start 116.459 80.518) (end 116.078 80.137) (width 0.381) (layer Composant) (net 165)) + (segment (start 117.856 80.518) (end 116.459 80.518) (width 0.381) (layer Composant) (net 165)) (segment (start 109.474 76.835) (end 109.474 74.803) (width 0.381) (layer Composant) (net 166)) - (segment (start 161.544 108.966) (end 162.2425 108.966) (width 0.254) (layer Composant) (net 167) (status 800)) - (segment (start 162.179 102.489) (end 163.195 103.505) (width 0.381) (layer Composant) (net 167)) - (segment (start 162.2425 108.966) (end 164.846 106.3625) (width 0.254) (layer Composant) (net 167) (status 400)) - (segment (start 163.6395 106.3625) (end 164.846 106.3625) (width 0.381) (layer Composant) (net 167) (status 400)) - (segment (start 163.195 105.918) (end 163.6395 106.3625) (width 0.381) (layer Composant) (net 167)) - (segment (start 163.195 103.505) (end 163.195 105.918) (width 0.381) (layer Composant) (net 167)) + (segment (start 123.19 81.026) (end 124.079 81.026) (width 0.381) (layer Composant) (net 166) (status 800)) + (segment (start 109.982 77.343) (end 109.474 76.835) (width 0.381) (layer Composant) (net 166)) + (segment (start 114.808 77.343) (end 109.982 77.343) (width 0.381) (layer Composant) (net 166)) + (segment (start 115.316 77.851) (end 114.808 77.343) (width 0.381) (layer Composant) (net 166)) + (segment (start 124.079 81.026) (end 124.841 81.788) (width 0.381) (layer Composant) (net 166)) + (segment (start 124.841 81.788) (end 124.841 82.804) (width 0.381) (layer Composant) (net 166)) + (segment (start 119.253 83.058) (end 117.475 81.28) (width 0.381) (layer Composant) (net 166)) + (segment (start 124.841 82.804) (end 124.587 83.058) (width 0.381) (layer Composant) (net 166)) + (segment (start 109.474 74.803) (end 108.204 73.533) (width 0.381) (layer Composant) (net 166) (status 400)) + (segment (start 124.587 83.058) (end 119.253 83.058) (width 0.381) (layer Composant) (net 166)) + (segment (start 115.316 80.645) (end 115.316 77.851) (width 0.381) (layer Composant) (net 166)) + (segment (start 115.951 81.28) (end 115.316 80.645) (width 0.381) (layer Composant) (net 166)) + (segment (start 117.475 81.28) (end 115.951 81.28) (width 0.381) (layer Composant) (net 166)) (segment (start 161.3535 102.489) (end 162.179 102.489) (width 0.381) (layer Composant) (net 167) (status 800)) + (segment (start 163.195 103.505) (end 163.195 105.918) (width 0.381) (layer Composant) (net 167)) + (segment (start 163.195 105.918) (end 163.6395 106.3625) (width 0.381) (layer Composant) (net 167)) + (segment (start 163.6395 106.3625) (end 164.846 106.3625) (width 0.381) (layer Composant) (net 167) (status 400)) + (segment (start 162.2425 108.966) (end 164.846 106.3625) (width 0.254) (layer Composant) (net 167) (status 400)) + (segment (start 162.179 102.489) (end 163.195 103.505) (width 0.381) (layer Composant) (net 167)) + (segment (start 161.544 108.966) (end 162.2425 108.966) (width 0.254) (layer Composant) (net 167) (status 800)) (segment (start 210.439 76.835) (end 207.3275 76.835) (width 0.254) (layer Composant) (net 168) (status C00)) (segment (start 210.439 80.645) (end 207.3275 80.645) (width 0.254) (layer Composant) (net 169) (status C00)) - (segment (start 90.043 74.803) (end 86.614 71.374) (width 0.762) (layer Composant) (net 170) (status 400)) - (segment (start 97.155 73.279) (end 95.631 74.803) (width 0.762) (layer Composant) (net 170)) - (segment (start 95.631 74.803) (end 90.043 74.803) (width 0.762) (layer Composant) (net 170)) (segment (start 99.949 73.279) (end 97.155 73.279) (width 0.762) (layer Composant) (net 170) (status 800)) - (segment (start 75.438 67.945) (end 75.438 66.929) (width 1.524) (layer Composant) (net 171) (status 800)) - (segment (start 91.694 67.31) (end 95.885 63.119) (width 1.524) (layer Composant) (net 171) (status 400)) - (segment (start 91.694 71.374) (end 91.694 67.31) (width 1.524) (layer Composant) (net 171) (status 800)) - (segment (start 79.248 63.119) (end 95.885 63.119) (width 1.524) (layer Composant) (net 171) (status 400)) + (segment (start 95.631 74.803) (end 90.043 74.803) (width 0.762) (layer Composant) (net 170)) + (segment (start 97.155 73.279) (end 95.631 74.803) (width 0.762) (layer Composant) (net 170)) + (segment (start 90.043 74.803) (end 86.614 71.374) (width 0.762) (layer Composant) (net 170) (status 400)) (segment (start 75.438 66.929) (end 79.248 63.119) (width 1.524) (layer Composant) (net 171)) - (segment (start 117.348 110.236) (end 115.443 110.236) (width 0.381) (layer Composant) (net 172) (status 800)) + (segment (start 79.248 63.119) (end 95.885 63.119) (width 1.524) (layer Composant) (net 171) (status 400)) + (segment (start 91.694 71.374) (end 91.694 67.31) (width 1.524) (layer Composant) (net 171) (status 800)) + (segment (start 91.694 67.31) (end 95.885 63.119) (width 1.524) (layer Composant) (net 171) (status 400)) + (segment (start 75.438 67.945) (end 75.438 66.929) (width 1.524) (layer Composant) (net 171) (status 800)) (segment (start 115.443 110.236) (end 115.062 109.855) (width 0.381) (layer Composant) (net 172) (status 400)) + (segment (start 117.348 110.236) (end 115.443 110.236) (width 0.381) (layer Composant) (net 172) (status 800)) (segment (start 92.2655 117.094) (end 90.043 117.094) (width 0.4318) (layer Composant) (net 173) (status C00)) (segment (start 92.2655 121.158) (end 90.043 121.158) (width 0.4318) (layer Composant) (net 174) (status C00)) (segment (start 92.2655 125.349) (end 90.043 125.349) (width 0.4318) (layer Composant) (net 175) (status C00)) - (segment (start 90.17 129.413) (end 90.043 129.54) (width 0.4318) (layer Composant) (net 176) (status 400)) (segment (start 92.2655 129.413) (end 90.17 129.413) (width 0.4318) (layer Composant) (net 176) (status 800)) - (segment (start 104.4575 133.858) (end 104.4575 136.2075) (width 0.4318) (layer Composant) (net 177) (status 800)) + (segment (start 90.17 129.413) (end 90.043 129.54) (width 0.4318) (layer Composant) (net 176) (status 400)) (segment (start 104.4575 136.2075) (end 104.14 136.525) (width 0.4318) (layer Composant) (net 177) (status 400)) + (segment (start 104.4575 133.858) (end 104.4575 136.2075) (width 0.4318) (layer Composant) (net 177) (status 800)) (segment (start 164.846 102.108) (end 164.846 104.4575) (width 0.4318) (layer Composant) (net 178) (status C00)) - (segment (start 97.409 117.602) (end 95.758 117.602) (width 0.381) (layer Composant) (net 179) (status 800)) - (segment (start 95.758 115.062) (end 95.758 114.173) (width 0.381) (layer Composant) (net 179)) - (segment (start 95.758 114.173) (end 96.139 113.792) (width 0.381) (layer Composant) (net 179)) - (segment (start 95.5675 110.236) (end 95.5675 111.5695) (width 0.381) (layer Composant) (net 179) (status 800)) - (segment (start 95.5675 111.5695) (end 94.234 112.903) (width 0.381) (layer Composant) (net 179) (status 400)) - (segment (start 96.139 113.792) (end 95.123 113.792) (width 0.381) (layer Composant) (net 179)) - (segment (start 95.123 113.792) (end 94.234 112.903) (width 0.381) (layer Composant) (net 179) (status 400)) - (segment (start 101.092 115.062) (end 95.758 115.062) (width 0.4318) (layer GND_layer) (net 179)) - (segment (start 101.092 118.872) (end 102.743 118.872) (width 0.381) (layer Composant) (net 179) (status 400)) - (segment (start 95.758 115.062) (end 95.758 117.602) (width 0.254) (layer GND_layer) (net 179)) - (segment (start 101.092 115.062) (end 102.743 115.062) (width 0.381) (layer Composant) (net 179) (status 400)) - (via (at 95.758 117.602) (size 0.889) (layers Composant Cuivre) (net 179)) - (via (at 101.092 118.872) (size 0.889) (layers Composant Cuivre) (net 179)) - (segment (start 96.139 113.792) (end 97.409 113.792) (width 0.381) (layer Composant) (net 179) (status 400)) - (via (at 101.092 115.062) (size 0.889) (layers Composant Cuivre) (net 179)) - (via (at 95.758 115.062) (size 0.889) (layers Composant Cuivre) (net 179)) (segment (start 101.092 115.062) (end 101.092 118.872) (width 0.254) (layer GND_layer) (net 179)) - (segment (start 198.755 88.265) (end 200.025 86.995) (width 0.254) (layer Composant) (net 180) (status 400)) - (segment (start 198.755 91.313) (end 198.755 88.265) (width 0.254) (layer Composant) (net 180)) - (segment (start 192.75552 97.31248) (end 198.755 91.313) (width 0.254) (layer Composant) (net 180)) - (segment (start 192.75552 101.76256) (end 192.75552 97.31248) (width 0.254) (layer Composant) (net 180)) - (segment (start 192.82664 101.83368) (end 192.75552 101.76256) (width 0.254) (layer Composant) (net 180)) - (segment (start 195.1863 101.83368) (end 192.82664 101.83368) (width 0.254) (layer Composant) (net 180)) + (via (at 95.758 115.062) (size 0.889) (layers Composant Cuivre) (net 179)) + (via (at 101.092 115.062) (size 0.889) (layers Composant Cuivre) (net 179)) + (segment (start 96.139 113.792) (end 97.409 113.792) (width 0.381) (layer Composant) (net 179) (status 400)) + (via (at 101.092 118.872) (size 0.889) (layers Composant Cuivre) (net 179)) + (via (at 95.758 117.602) (size 0.889) (layers Composant Cuivre) (net 179)) + (segment (start 101.092 115.062) (end 102.743 115.062) (width 0.381) (layer Composant) (net 179) (status 400)) + (segment (start 95.758 115.062) (end 95.758 117.602) (width 0.254) (layer GND_layer) (net 179)) + (segment (start 101.092 118.872) (end 102.743 118.872) (width 0.381) (layer Composant) (net 179) (status 400)) + (segment (start 101.092 115.062) (end 95.758 115.062) (width 0.4318) (layer GND_layer) (net 179)) + (segment (start 95.123 113.792) (end 94.234 112.903) (width 0.381) (layer Composant) (net 179) (status 400)) + (segment (start 96.139 113.792) (end 95.123 113.792) (width 0.381) (layer Composant) (net 179)) + (segment (start 95.5675 111.5695) (end 94.234 112.903) (width 0.381) (layer Composant) (net 179) (status 400)) + (segment (start 95.5675 110.236) (end 95.5675 111.5695) (width 0.381) (layer Composant) (net 179) (status 800)) + (segment (start 95.758 114.173) (end 96.139 113.792) (width 0.381) (layer Composant) (net 179)) + (segment (start 95.758 115.062) (end 95.758 114.173) (width 0.381) (layer Composant) (net 179)) + (segment (start 97.409 117.602) (end 95.758 117.602) (width 0.381) (layer Composant) (net 179) (status 800)) (segment (start 195.1863 100.7745) (end 195.1863 101.83368) (width 0.254) (layer Composant) (net 180) (status 800)) - (segment (start 196.17491 96.82491) (end 196.17491 96.82509) (width 0.254) (layer Composant) (net 181)) - (segment (start 196.04991 96.95009) (end 196.04991 99.50009) (width 0.254) (layer Composant) (net 181) (tstamp 52D04731)) - (segment (start 196.17491 96.82509) (end 196.04991 96.95009) (width 0.254) (layer Composant) (net 181) (tstamp 52D0472D)) - (segment (start 196.04991 99.50009) (end 195.6816 99.8684) (width 0.2) (layer Composant) (net 181) (tstamp 52D046FC)) - (segment (start 195.6816 99.8684) (end 195.6816 100.7745) (width 0.254) (layer Composant) (net 181) (tstamp 52D04700) (status 400)) - (segment (start 200.025 92.97482) (end 196.17491 96.82491) (width 0.254) (layer Composant) (net 181)) + (segment (start 195.1863 101.83368) (end 192.82664 101.83368) (width 0.254) (layer Composant) (net 180)) + (segment (start 192.82664 101.83368) (end 192.75552 101.76256) (width 0.254) (layer Composant) (net 180)) + (segment (start 192.75552 101.76256) (end 192.75552 97.31248) (width 0.254) (layer Composant) (net 180)) + (segment (start 192.75552 97.31248) (end 198.755 91.313) (width 0.254) (layer Composant) (net 180)) + (segment (start 198.755 91.313) (end 198.755 88.265) (width 0.254) (layer Composant) (net 180)) + (segment (start 198.755 88.265) (end 200.025 86.995) (width 0.254) (layer Composant) (net 180) (status 400)) (segment (start 200.025 89.535) (end 200.025 92.97482) (width 0.254) (layer Composant) (net 181) (status 800)) - (segment (start 165.354 124.5235) (end 164.719 124.206) (width 0.381) (layer Composant) (net 182) (status 800)) - (segment (start 164.719 124.206) (end 164.719 121.412) (width 0.381) (layer Composant) (net 182)) + (segment (start 200.025 92.97482) (end 196.17491 96.82491) (width 0.254) (layer Composant) (net 181)) + (segment (start 195.6816 99.8684) (end 195.6816 100.7745) (width 0.254) (layer Composant) (net 181) (tstamp 52D04700) (status 400)) + (segment (start 196.04991 99.50009) (end 195.6816 99.8684) (width 0.2) (layer Composant) (net 181) (tstamp 52D046FC)) + (segment (start 196.17491 96.82509) (end 196.04991 96.95009) (width 0.254) (layer Composant) (net 181) (tstamp 52D0472D)) + (segment (start 196.04991 96.95009) (end 196.04991 99.50009) (width 0.254) (layer Composant) (net 181) (tstamp 52D04731)) + (segment (start 196.17491 96.82491) (end 196.17491 96.82509) (width 0.254) (layer Composant) (net 181)) (segment (start 164.719 121.412) (end 165.227 120.523) (width 0.381) (layer Composant) (net 182) (status 400)) - (segment (start 162.687 124.206) (end 162.814 124.5235) (width 0.381) (layer Composant) (net 183) (status 400)) + (segment (start 164.719 124.206) (end 164.719 121.412) (width 0.381) (layer Composant) (net 182)) + (segment (start 165.354 124.5235) (end 164.719 124.206) (width 0.381) (layer Composant) (net 182) (status 800)) (segment (start 162.687 120.523) (end 162.687 124.206) (width 0.381) (layer Composant) (net 183) (status 800)) - (segment (start 160.147 124.3965) (end 160.274 124.5235) (width 0.4318) (layer Composant) (net 184) (status 400)) + (segment (start 162.687 124.206) (end 162.814 124.5235) (width 0.381) (layer Composant) (net 183) (status 400)) (segment (start 160.147 120.523) (end 160.147 124.3965) (width 0.4318) (layer Composant) (net 184) (status 800)) - (segment (start 157.607 124.3965) (end 157.734 124.5235) (width 0.4318) (layer Composant) (net 185) (status 400)) + (segment (start 160.147 124.3965) (end 160.274 124.5235) (width 0.4318) (layer Composant) (net 184) (status 400)) (segment (start 157.607 120.523) (end 157.607 124.3965) (width 0.4318) (layer Composant) (net 185) (status 800)) - (segment (start 160.782 89.154) (end 158.8135 89.154) (width 0.381) (layer Composant) (net 186) (status 800)) + (segment (start 157.607 124.3965) (end 157.734 124.5235) (width 0.4318) (layer Composant) (net 185) (status 400)) (segment (start 158.8135 89.154) (end 158.623 89.3445) (width 0.381) (layer Composant) (net 186) (status 400)) - (segment (start 160.5915 86.995) (end 160.5915 87.0585) (width 0.381) (layer Composant) (net 187) (status 800)) - (segment (start 160.5915 87.0585) (end 161.925 88.392) (width 0.381) (layer Composant) (net 187)) - (segment (start 162.433 88.392) (end 162.814 88.773) (width 0.381) (layer Composant) (net 187)) - (segment (start 162.814 88.773) (end 162.814 90.043) (width 0.381) (layer Composant) (net 187) (status 400)) + (segment (start 160.782 89.154) (end 158.8135 89.154) (width 0.381) (layer Composant) (net 186) (status 800)) (segment (start 161.925 88.392) (end 162.433 88.392) (width 0.381) (layer Composant) (net 187)) - (segment (start 162.4965 86.995) (end 164.211 86.995) (width 0.381) (layer Composant) (net 188) (status 800)) + (segment (start 162.814 88.773) (end 162.814 90.043) (width 0.381) (layer Composant) (net 187) (status 400)) + (segment (start 162.433 88.392) (end 162.814 88.773) (width 0.381) (layer Composant) (net 187)) + (segment (start 160.5915 87.0585) (end 161.925 88.392) (width 0.381) (layer Composant) (net 187)) + (segment (start 160.5915 86.995) (end 160.5915 87.0585) (width 0.381) (layer Composant) (net 187) (status 800)) (segment (start 164.211 86.995) (end 164.846 87.63) (width 0.381) (layer Composant) (net 188) (status 400)) - (segment (start 126.492 80.137) (end 126.873 79.756) (width 0.254) (layer Composant) (net 189)) - (segment (start 126.9365 84.0105) (end 127.889 83.058) (width 0.254) (layer Composant) (net 189)) - (segment (start 127.889 83.058) (end 130.048 83.058) (width 0.254) (layer Composant) (net 189)) - (segment (start 126.9365 84.2645) (end 126.492 83.82) (width 0.254) (layer Composant) (net 189)) - (segment (start 133.477 79.629) (end 135.763 79.629) (width 0.254) (layer Composant) (net 189) (status 400)) - (segment (start 126.9365 84.2645) (end 126.9365 84.0105) (width 0.254) (layer Composant) (net 189)) - (segment (start 126.9365 84.455) (end 126.9365 84.2645) (width 0.254) (layer Composant) (net 189) (status 800)) - (segment (start 126.873 79.756) (end 128.27 79.756) (width 0.254) (layer Composant) (net 189) (status 400)) - (segment (start 130.048 83.058) (end 133.477 79.629) (width 0.254) (layer Composant) (net 189)) + (segment (start 162.4965 86.995) (end 164.211 86.995) (width 0.381) (layer Composant) (net 188) (status 800)) (segment (start 126.492 83.82) (end 126.492 80.137) (width 0.254) (layer Composant) (net 189)) - (segment (start 94.9325 116.332) (end 94.1705 117.094) (width 0.381) (layer Composant) (net 190) (status 400)) + (segment (start 130.048 83.058) (end 133.477 79.629) (width 0.254) (layer Composant) (net 189)) + (segment (start 126.873 79.756) (end 128.27 79.756) (width 0.254) (layer Composant) (net 189) (status 400)) + (segment (start 126.9365 84.455) (end 126.9365 84.2645) (width 0.254) (layer Composant) (net 189) (status 800)) + (segment (start 126.9365 84.2645) (end 126.9365 84.0105) (width 0.254) (layer Composant) (net 189)) + (segment (start 133.477 79.629) (end 135.763 79.629) (width 0.254) (layer Composant) (net 189) (status 400)) + (segment (start 126.9365 84.2645) (end 126.492 83.82) (width 0.254) (layer Composant) (net 189)) + (segment (start 127.889 83.058) (end 130.048 83.058) (width 0.254) (layer Composant) (net 189)) + (segment (start 126.9365 84.0105) (end 127.889 83.058) (width 0.254) (layer Composant) (net 189)) + (segment (start 126.492 80.137) (end 126.873 79.756) (width 0.254) (layer Composant) (net 189)) (segment (start 97.409 116.332) (end 94.9325 116.332) (width 0.381) (layer Composant) (net 190) (status 800)) - (segment (start 193.8655 81.3435) (end 192.532 81.3435) (width 0.381) (layer Composant) (net 191) (status 400)) - (segment (start 190.754 81.026) (end 189.23 81.026) (width 0.381) (layer Composant) (net 191) (status 400)) - (segment (start 194.183 81.026) (end 193.8655 81.3435) (width 0.381) (layer Composant) (net 191)) - (segment (start 196.088 81.026) (end 194.183 81.026) (width 0.381) (layer Composant) (net 191)) - (segment (start 197.485 79.629) (end 196.088 81.026) (width 0.381) (layer Composant) (net 191) (status 800)) - (segment (start 191.0715 81.3435) (end 190.754 81.026) (width 0.381) (layer Composant) (net 191)) + (segment (start 94.9325 116.332) (end 94.1705 117.094) (width 0.381) (layer Composant) (net 190) (status 400)) (segment (start 192.532 81.3435) (end 191.0715 81.3435) (width 0.381) (layer Composant) (net 191) (status 800)) - (segment (start 95.1865 120.142) (end 94.1705 121.158) (width 0.4318) (layer Composant) (net 192) (status 400)) + (segment (start 191.0715 81.3435) (end 190.754 81.026) (width 0.381) (layer Composant) (net 191)) + (segment (start 197.485 79.629) (end 196.088 81.026) (width 0.381) (layer Composant) (net 191) (status 800)) + (segment (start 196.088 81.026) (end 194.183 81.026) (width 0.381) (layer Composant) (net 191)) + (segment (start 194.183 81.026) (end 193.8655 81.3435) (width 0.381) (layer Composant) (net 191)) + (segment (start 190.754 81.026) (end 189.23 81.026) (width 0.381) (layer Composant) (net 191) (status 400)) + (segment (start 193.8655 81.3435) (end 192.532 81.3435) (width 0.381) (layer Composant) (net 191) (status 400)) (segment (start 97.409 120.142) (end 95.1865 120.142) (width 0.4318) (layer Composant) (net 192) (status 800)) - (segment (start 95.377 125.349) (end 98.298 122.428) (width 0.381) (layer Composant) (net 193)) - (segment (start 100.203 118.491) (end 101.092 117.602) (width 0.381) (layer Composant) (net 193)) - (segment (start 101.092 117.602) (end 102.743 117.602) (width 0.381) (layer Composant) (net 193) (status 400)) - (segment (start 98.298 122.428) (end 99.314 122.428) (width 0.381) (layer Composant) (net 193)) - (segment (start 94.1705 125.349) (end 95.377 125.349) (width 0.381) (layer Composant) (net 193) (status 800)) - (segment (start 100.203 121.539) (end 100.203 118.491) (width 0.381) (layer Composant) (net 193)) + (segment (start 95.1865 120.142) (end 94.1705 121.158) (width 0.4318) (layer Composant) (net 192) (status 400)) (segment (start 99.314 122.428) (end 100.203 121.539) (width 0.381) (layer Composant) (net 193)) - (segment (start 101.346 123.19) (end 98.806 123.19) (width 0.381) (layer Composant) (net 194)) - (segment (start 102.743 121.412) (end 102.743 121.793) (width 0.381) (layer Composant) (net 194) (status 800)) - (segment (start 94.234 129.413) (end 94.1705 129.413) (width 0.381) (layer Composant) (net 194) (status 400)) - (segment (start 98.806 123.19) (end 95.885 126.111) (width 0.381) (layer Composant) (net 194)) - (segment (start 95.885 127.762) (end 94.234 129.413) (width 0.381) (layer Composant) (net 194)) - (segment (start 95.885 126.111) (end 95.885 127.762) (width 0.381) (layer Composant) (net 194)) + (segment (start 100.203 121.539) (end 100.203 118.491) (width 0.381) (layer Composant) (net 193)) + (segment (start 94.1705 125.349) (end 95.377 125.349) (width 0.381) (layer Composant) (net 193) (status 800)) + (segment (start 98.298 122.428) (end 99.314 122.428) (width 0.381) (layer Composant) (net 193)) + (segment (start 101.092 117.602) (end 102.743 117.602) (width 0.381) (layer Composant) (net 193) (status 400)) + (segment (start 100.203 118.491) (end 101.092 117.602) (width 0.381) (layer Composant) (net 193)) + (segment (start 95.377 125.349) (end 98.298 122.428) (width 0.381) (layer Composant) (net 193)) (segment (start 102.743 121.793) (end 101.346 123.19) (width 0.381) (layer Composant) (net 194)) - (segment (start 164.2745 81.026) (end 164.592 81.3435) (width 0.4318) (layer Composant) (net 195) (status 400)) - (segment (start 161.29 81.026) (end 164.2745 81.026) (width 0.4318) (layer Composant) (net 195) (status 800)) - (segment (start 169.545 79.629) (end 168.783 79.629) (width 0.4318) (layer Composant) (net 195) (status 800)) - (segment (start 168.783 79.629) (end 167.0685 81.3435) (width 0.4318) (layer Composant) (net 195)) + (segment (start 95.885 126.111) (end 95.885 127.762) (width 0.381) (layer Composant) (net 194)) + (segment (start 95.885 127.762) (end 94.234 129.413) (width 0.381) (layer Composant) (net 194)) + (segment (start 98.806 123.19) (end 95.885 126.111) (width 0.381) (layer Composant) (net 194)) + (segment (start 94.234 129.413) (end 94.1705 129.413) (width 0.381) (layer Composant) (net 194) (status 400)) + (segment (start 102.743 121.412) (end 102.743 121.793) (width 0.381) (layer Composant) (net 194) (status 800)) + (segment (start 101.346 123.19) (end 98.806 123.19) (width 0.381) (layer Composant) (net 194)) (segment (start 167.0685 81.3435) (end 164.592 81.3435) (width 0.4318) (layer Composant) (net 195) (status 400)) - (segment (start 103.251 90.297) (end 102.489 90.297) (width 0.381) (layer Composant) (net 196) (status 800)) - (segment (start 100.9015 92.9005) (end 100.9015 93.345) (width 0.381) (layer Composant) (net 196) (status 400)) - (segment (start 102.489 90.297) (end 102.489 91.313) (width 0.381) (layer Composant) (net 196)) - (segment (start 102.489 91.313) (end 100.9015 92.9005) (width 0.381) (layer Composant) (net 196)) - (segment (start 100.9015 95.3135) (end 100.457 95.758) (width 0.381) (layer Composant) (net 196) (status 400)) + (segment (start 168.783 79.629) (end 167.0685 81.3435) (width 0.4318) (layer Composant) (net 195)) + (segment (start 169.545 79.629) (end 168.783 79.629) (width 0.4318) (layer Composant) (net 195) (status 800)) + (segment (start 161.29 81.026) (end 164.2745 81.026) (width 0.4318) (layer Composant) (net 195) (status 800)) + (segment (start 164.2745 81.026) (end 164.592 81.3435) (width 0.4318) (layer Composant) (net 195) (status 400)) (segment (start 100.9015 93.345) (end 100.9015 95.3135) (width 0.381) (layer Composant) (net 196) (status 800)) - (segment (start 135.76808 111.506) (end 134.874 112.4585) (width 0.254) (layer Composant) (net 197) (status 400)) - (segment (start 135.89 110.617) (end 135.763 110.744) (width 0.254) (layer Composant) (net 197)) - (segment (start 135.89 109.22) (end 135.89 110.617) (width 0.254) (layer Composant) (net 197) (status 800)) - (segment (start 135.763 110.744) (end 135.763 111.506) (width 0.254) (layer Composant) (net 197)) + (segment (start 100.9015 95.3135) (end 100.457 95.758) (width 0.381) (layer Composant) (net 196) (status 400)) + (segment (start 102.489 91.313) (end 100.9015 92.9005) (width 0.381) (layer Composant) (net 196)) + (segment (start 102.489 90.297) (end 102.489 91.313) (width 0.381) (layer Composant) (net 196)) + (segment (start 100.9015 92.9005) (end 100.9015 93.345) (width 0.381) (layer Composant) (net 196) (status 400)) + (segment (start 103.251 90.297) (end 102.489 90.297) (width 0.381) (layer Composant) (net 196) (status 800)) (segment (start 135.763 111.506) (end 135.76808 111.506) (width 0.254) (layer Composant) (net 197)) - (segment (start 139.954 87.503) (end 139.319 88.138) (width 0.254) (layer Composant) (net 198)) - (segment (start 139.319 88.138) (end 139.319 91.948) (width 0.254) (layer Composant) (net 198)) - (segment (start 139.319 91.948) (end 139.3698 92.3036) (width 0.254) (layer Composant) (net 198)) - (segment (start 139.3698 92.3036) (end 139.3698 93.726) (width 0.254) (layer Composant) (net 198) (status 400)) - (segment (start 141.478 87.376) (end 141.351 87.503) (width 0.254) (layer Composant) (net 198)) - (segment (start 141.351 87.503) (end 139.954 87.503) (width 0.254) (layer Composant) (net 198)) + (segment (start 135.763 110.744) (end 135.763 111.506) (width 0.254) (layer Composant) (net 197)) + (segment (start 135.89 109.22) (end 135.89 110.617) (width 0.254) (layer Composant) (net 197) (status 800)) + (segment (start 135.89 110.617) (end 135.763 110.744) (width 0.254) (layer Composant) (net 197)) + (segment (start 135.76808 111.506) (end 134.874 112.4585) (width 0.254) (layer Composant) (net 197) (status 400)) (segment (start 141.478 86.8045) (end 141.478 87.376) (width 0.254) (layer Composant) (net 198) (status 800)) - (segment (start 198.247 78.359) (end 198.755 77.851) (width 0.381) (layer Composant) (net 200)) - (segment (start 189.23 79.756) (end 194.818 79.756) (width 0.381) (layer Composant) (net 200) (status 800)) - (segment (start 194.818 79.756) (end 196.215 78.359) (width 0.381) (layer Composant) (net 200)) - (segment (start 198.755 75.819) (end 197.485 74.549) (width 0.381) (layer Composant) (net 200) (status 400)) - (segment (start 198.755 77.851) (end 198.755 75.819) (width 0.381) (layer Composant) (net 200)) + (segment (start 141.351 87.503) (end 139.954 87.503) (width 0.254) (layer Composant) (net 198)) + (segment (start 141.478 87.376) (end 141.351 87.503) (width 0.254) (layer Composant) (net 198)) + (segment (start 139.3698 92.3036) (end 139.3698 93.726) (width 0.254) (layer Composant) (net 198) (status 400)) + (segment (start 139.319 91.948) (end 139.3698 92.3036) (width 0.254) (layer Composant) (net 198)) + (segment (start 139.319 88.138) (end 139.319 91.948) (width 0.254) (layer Composant) (net 198)) + (segment (start 139.954 87.503) (end 139.319 88.138) (width 0.254) (layer Composant) (net 198)) (segment (start 196.215 78.359) (end 198.247 78.359) (width 0.381) (layer Composant) (net 200)) - (segment (start 194.691 78.486) (end 196.088 77.089) (width 0.381) (layer Composant) (net 201)) - (segment (start 189.23 78.486) (end 194.691 78.486) (width 0.381) (layer Composant) (net 201) (status 800)) + (segment (start 198.755 77.851) (end 198.755 75.819) (width 0.381) (layer Composant) (net 200)) + (segment (start 198.755 75.819) (end 197.485 74.549) (width 0.381) (layer Composant) (net 200) (status 400)) + (segment (start 194.818 79.756) (end 196.215 78.359) (width 0.381) (layer Composant) (net 200)) + (segment (start 189.23 79.756) (end 194.818 79.756) (width 0.381) (layer Composant) (net 200) (status 800)) + (segment (start 198.247 78.359) (end 198.755 77.851) (width 0.381) (layer Composant) (net 200)) (segment (start 196.088 77.089) (end 197.485 77.089) (width 0.381) (layer Composant) (net 201) (status 400)) - (segment (start 197.358 82.296) (end 197.485 82.169) (width 0.381) (layer Composant) (net 202) (status 400)) + (segment (start 189.23 78.486) (end 194.691 78.486) (width 0.381) (layer Composant) (net 201) (status 800)) + (segment (start 194.691 78.486) (end 196.088 77.089) (width 0.381) (layer Composant) (net 201)) (segment (start 189.23 82.296) (end 197.358 82.296) (width 0.381) (layer Composant) (net 202) (status 800)) - (segment (start 170.815 75.819) (end 170.815 77.851) (width 0.381) (layer Composant) (net 203)) - (segment (start 170.815 77.851) (end 170.307 78.359) (width 0.381) (layer Composant) (net 203)) - (segment (start 168.275 78.359) (end 166.878 79.756) (width 0.381) (layer Composant) (net 203)) - (segment (start 166.878 79.756) (end 161.29 79.756) (width 0.381) (layer Composant) (net 203) (status 400)) - (segment (start 170.307 78.359) (end 168.275 78.359) (width 0.381) (layer Composant) (net 203)) + (segment (start 197.358 82.296) (end 197.485 82.169) (width 0.381) (layer Composant) (net 202) (status 400)) (segment (start 169.545 74.549) (end 170.815 75.819) (width 0.381) (layer Composant) (net 203) (status 800)) - (segment (start 161.29 78.486) (end 166.751 78.486) (width 0.381) (layer Composant) (net 204) (status 800)) - (segment (start 166.751 78.486) (end 168.148 77.089) (width 0.381) (layer Composant) (net 204)) + (segment (start 170.307 78.359) (end 168.275 78.359) (width 0.381) (layer Composant) (net 203)) + (segment (start 166.878 79.756) (end 161.29 79.756) (width 0.381) (layer Composant) (net 203) (status 400)) + (segment (start 168.275 78.359) (end 166.878 79.756) (width 0.381) (layer Composant) (net 203)) + (segment (start 170.815 77.851) (end 170.307 78.359) (width 0.381) (layer Composant) (net 203)) + (segment (start 170.815 75.819) (end 170.815 77.851) (width 0.381) (layer Composant) (net 203)) (segment (start 168.148 77.089) (end 169.545 77.089) (width 0.381) (layer Composant) (net 204) (status 400)) - (segment (start 161.29 82.296) (end 169.418 82.296) (width 0.4318) (layer Composant) (net 205) (status 800)) + (segment (start 166.751 78.486) (end 168.148 77.089) (width 0.381) (layer Composant) (net 204)) + (segment (start 161.29 78.486) (end 166.751 78.486) (width 0.381) (layer Composant) (net 204) (status 800)) (segment (start 169.418 82.296) (end 169.545 82.169) (width 0.4318) (layer Composant) (net 205) (status 400)) - (segment (start 103.124 84.582) (end 103.124 85.979) (width 0.381) (layer Composant) (net 206) (status 800)) - (segment (start 103.251 86.106) (end 103.251 86.487) (width 0.381) (layer Composant) (net 206) (status 400)) + (segment (start 161.29 82.296) (end 169.418 82.296) (width 0.4318) (layer Composant) (net 205) (status 800)) (segment (start 103.124 85.979) (end 103.251 86.106) (width 0.381) (layer Composant) (net 206)) - (segment (start 128.27 81.026) (end 129.794 81.026) (width 0.254) (layer Composant) (net 207) (status 800)) - (segment (start 129.794 81.026) (end 134.493 76.327) (width 0.254) (layer Composant) (net 207)) - (segment (start 134.493 76.327) (end 134.493 75.819) (width 0.254) (layer Composant) (net 207)) + (segment (start 103.251 86.106) (end 103.251 86.487) (width 0.381) (layer Composant) (net 206) (status 400)) + (segment (start 103.124 84.582) (end 103.124 85.979) (width 0.381) (layer Composant) (net 206) (status 800)) (segment (start 134.493 75.819) (end 135.763 74.549) (width 0.254) (layer Composant) (net 207) (status 400)) - (segment (start 126.111 78.486) (end 125.476 79.121) (width 0.254) (layer Composant) (net 208)) - (segment (start 125.476 79.121) (end 125.476 85.344) (width 0.254) (layer Composant) (net 208)) - (segment (start 133.985 81.788) (end 134.874 81.788) (width 0.254) (layer Composant) (net 208)) - (segment (start 125.857 85.725) (end 130.048 85.725) (width 0.254) (layer Composant) (net 208)) - (segment (start 128.27 78.486) (end 126.111 78.486) (width 0.254) (layer Composant) (net 208) (status 800)) - (segment (start 134.874 81.788) (end 135.763 82.169) (width 0.254) (layer Composant) (net 208) (status 400)) - (segment (start 125.476 85.344) (end 125.857 85.725) (width 0.254) (layer Composant) (net 208)) + (segment (start 134.493 76.327) (end 134.493 75.819) (width 0.254) (layer Composant) (net 207)) + (segment (start 129.794 81.026) (end 134.493 76.327) (width 0.254) (layer Composant) (net 207)) + (segment (start 128.27 81.026) (end 129.794 81.026) (width 0.254) (layer Composant) (net 207) (status 800)) (segment (start 130.048 85.725) (end 133.985 81.788) (width 0.254) (layer Composant) (net 208)) - (segment (start 129.667 82.296) (end 134.874 77.089) (width 0.254) (layer Composant) (net 209)) - (segment (start 128.27 82.296) (end 129.667 82.296) (width 0.254) (layer Composant) (net 209) (status 800)) + (segment (start 125.476 85.344) (end 125.857 85.725) (width 0.254) (layer Composant) (net 208)) + (segment (start 134.874 81.788) (end 135.763 82.169) (width 0.254) (layer Composant) (net 208) (status 400)) + (segment (start 128.27 78.486) (end 126.111 78.486) (width 0.254) (layer Composant) (net 208) (status 800)) + (segment (start 125.857 85.725) (end 130.048 85.725) (width 0.254) (layer Composant) (net 208)) + (segment (start 133.985 81.788) (end 134.874 81.788) (width 0.254) (layer Composant) (net 208)) + (segment (start 125.476 79.121) (end 125.476 85.344) (width 0.254) (layer Composant) (net 208)) + (segment (start 126.111 78.486) (end 125.476 79.121) (width 0.254) (layer Composant) (net 208)) (segment (start 134.874 77.089) (end 135.763 77.089) (width 0.254) (layer Composant) (net 209) (status 400)) - (segment (start 191.008 64.516) (end 191.897 65.405) (width 0.4318) (layer Cuivre) (net 271)) - (segment (start 186.69 64.516) (end 191.008 64.516) (width 0.4318) (layer Cuivre) (net 271)) - (segment (start 185.166 66.04) (end 186.69 64.516) (width 0.4318) (layer Cuivre) (net 271)) - (segment (start 185.039 66.04) (end 185.166 66.04) (width 0.4318) (layer Cuivre) (net 271) (status 800)) - (segment (start 183.642 68.58) (end 183.642 67.437) (width 0.4318) (layer Composant) (net 271) (status 800)) - (segment (start 183.642 67.437) (end 185.039 66.04) (width 0.4318) (layer Composant) (net 271) (status 400)) + (segment (start 128.27 82.296) (end 129.667 82.296) (width 0.254) (layer Composant) (net 209) (status 800)) + (segment (start 129.667 82.296) (end 134.874 77.089) (width 0.254) (layer Composant) (net 209)) (segment (start 191.897 65.405) (end 191.897 68.58) (width 0.4318) (layer Cuivre) (net 271) (status 400)) - (segment (start 149.987 68.453) (end 150.114 68.58) (width 0.381) (layer Cuivre) (net 273) (status 400)) - (segment (start 149.987 65.151) (end 149.987 68.453) (width 0.381) (layer Cuivre) (net 273)) - (segment (start 150.876 64.262) (end 149.987 65.151) (width 0.381) (layer Cuivre) (net 273)) - (segment (start 150.114 67.437) (end 151.511 66.04) (width 0.381) (layer Composant) (net 273) (status 400)) - (segment (start 157.734 64.262) (end 150.876 64.262) (width 0.381) (layer Cuivre) (net 273)) - (segment (start 150.114 68.58) (end 150.114 67.437) (width 0.381) (layer Composant) (net 273) (status 800)) - (segment (start 158.369 68.58) (end 158.369 64.897) (width 0.381) (layer Cuivre) (net 273) (status 800)) + (segment (start 183.642 67.437) (end 185.039 66.04) (width 0.4318) (layer Composant) (net 271) (status 400)) + (segment (start 183.642 68.58) (end 183.642 67.437) (width 0.4318) (layer Composant) (net 271) (status 800)) + (segment (start 185.039 66.04) (end 185.166 66.04) (width 0.4318) (layer Cuivre) (net 271) (status 800)) + (segment (start 185.166 66.04) (end 186.69 64.516) (width 0.4318) (layer Cuivre) (net 271)) + (segment (start 186.69 64.516) (end 191.008 64.516) (width 0.4318) (layer Cuivre) (net 271)) + (segment (start 191.008 64.516) (end 191.897 65.405) (width 0.4318) (layer Cuivre) (net 271)) (segment (start 158.369 64.897) (end 157.734 64.262) (width 0.381) (layer Cuivre) (net 273)) - (segment (start 124.841 65.151) (end 124.206 64.516) (width 0.381) (layer Cuivre) (net 275)) - (segment (start 119.507 64.516) (end 117.983 66.04) (width 0.381) (layer Cuivre) (net 275) (status 400)) - (segment (start 117.983 67.183) (end 116.586 68.58) (width 0.381) (layer Cuivre) (net 275) (status 400)) - (segment (start 124.206 64.516) (end 119.507 64.516) (width 0.381) (layer Cuivre) (net 275)) - (segment (start 124.841 68.58) (end 124.841 65.151) (width 0.381) (layer Cuivre) (net 275) (status 800)) + (segment (start 158.369 68.58) (end 158.369 64.897) (width 0.381) (layer Cuivre) (net 273) (status 800)) + (segment (start 150.114 68.58) (end 150.114 67.437) (width 0.381) (layer Composant) (net 273) (status 800)) + (segment (start 157.734 64.262) (end 150.876 64.262) (width 0.381) (layer Cuivre) (net 273)) + (segment (start 150.114 67.437) (end 151.511 66.04) (width 0.381) (layer Composant) (net 273) (status 400)) + (segment (start 150.876 64.262) (end 149.987 65.151) (width 0.381) (layer Cuivre) (net 273)) + (segment (start 149.987 65.151) (end 149.987 68.453) (width 0.381) (layer Cuivre) (net 273)) + (segment (start 149.987 68.453) (end 150.114 68.58) (width 0.381) (layer Cuivre) (net 273) (status 400)) (segment (start 117.983 66.04) (end 117.983 67.183) (width 0.381) (layer Cuivre) (net 275) (status 800)) - (segment (start 98.298 100.584) (end 89.154 100.584) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 89.154 100.584) (end 88.9 100.33) (width 0.5588) (layer 3.3V_layer) (net 278) (status 400)) - (segment (start 93.472 89.535) (end 93.472 98.298) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 95.25 87.757) (end 93.472 89.535) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 97.155 87.757) (end 95.25 87.757) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 93.472 98.298) (end 92.71 99.06) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 92.71 99.06) (end 90.17 99.06) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 90.17 99.06) (end 88.9 100.33) (width 0.5588) (layer 3.3V_layer) (net 278) (status 400)) - (segment (start 84.582 102.235) (end 86.995 102.235) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 86.995 102.235) (end 88.9 100.33) (width 0.5588) (layer 3.3V_layer) (net 278) (status 400)) - (segment (start 84.2645 104.267) (end 84.2645 102.5525) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 84.2645 102.5525) (end 84.582 102.235) (width 0.5588) (layer Composant) (net 278)) - (via (at 84.582 102.235) (size 1.143) (layers Composant Cuivre) (net 278)) - (segment (start 95.631 105.41) (end 90.805 105.41) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 131.3942 110.0328) (end 130.429 110.998) (width 0.254) (layer Composant) (net 278)) - (segment (start 97.409 107.188) (end 95.631 105.41) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 97.409 112.141) (end 97.409 107.188) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 90.805 105.41) (end 88.9 103.505) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 88.9 103.505) (end 88.9 100.33) (width 0.5588) (layer 3.3V_layer) (net 278) (status 400)) - (segment (start 209.73288 118.09476) (end 210.31454 117.5131) (width 0.5588) (layer Composant) (net 278)) - (segment (start 210.31454 117.5131) (end 212.9155 117.5131) (width 0.254) (layer Composant) (net 278) (status 400)) - (segment (start 212.9155 110.0074) (end 211.40928 110.0074) (width 0.254) (layer Composant) (net 278) (status 800)) - (segment (start 212.979 114.84864) (end 209.73288 118.09476) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 212.979 111.633) (end 212.979 114.046) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 212.979 114.046) (end 212.979 114.84864) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 211.40928 110.06328) (end 212.979 111.633) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 211.40928 110.0074) (end 211.40928 110.06328) (width 0.5588) (layer 3.3V_layer) (net 278)) - (via (at 211.40928 110.0074) (size 1.143) (layers Composant Cuivre) (net 278)) - (segment (start 178.689 118.872) (end 175.641 115.824) (width 0.5588) (layer Composant) (net 278)) - (segment (start 130.429 110.998) (end 130.175 110.998) (width 0.5588) (layer Composant) (net 278)) - (segment (start 130.175 110.998) (end 130.048 111.125) (width 0.5588) (layer Composant) (net 278)) - (segment (start 130.048 111.125) (end 130.048 113.411) (width 0.5588) (layer Composant) (net 278)) - (segment (start 130.048 113.411) (end 130.556 113.919) (width 0.5588) (layer Composant) (net 278)) - (segment (start 130.556 113.919) (end 131.2545 113.919) (width 0.5588) (layer Composant) (net 278)) - (segment (start 131.2545 113.919) (end 132.9055 112.268) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 208.28 118.4275) (end 209.27568 118.4275) (width 0.5588) (layer Cuivre) (net 278) (status 800)) - (segment (start 209.73288 118.09476) (end 209.60842 118.09476) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 209.60842 118.09476) (end 209.27568 118.4275) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 209.296 101.7905) (end 209.296 102.53218) (width 0.5588) (layer Cuivre) (net 278) (status 800)) - (segment (start 211.41436 102.56774) (end 209.33156 102.56774) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 209.33156 102.56774) (end 209.296 102.53218) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 206.83474 109.98708) (end 207.28432 109.5375) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 207.28432 109.5375) (end 208.28 109.5375) (width 0.5588) (layer Cuivre) (net 278) (status 400)) - (via (at 206.83474 109.98708) (size 1.143) (layers Composant Cuivre) (net 278)) - (segment (start 206.375 119.253) (end 206.83474 118.79326) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 206.83474 109.98708) (end 206.83474 118.79326) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 202.48118 102.997) (end 202.946 102.53218) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 202.46086 102.97668) (end 202.48118 102.997) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 199.009 102.97668) (end 202.46086 102.97668) (width 0.5588) (layer 3.3V_layer) (net 278)) - (via (at 202.48118 102.997) (size 1.143) (layers Composant Cuivre) (net 278)) - (segment (start 203.454 102.53218) (end 203.454 101.7905) (width 0.5588) (layer Cuivre) (net 278) (status 400)) - (segment (start 202.946 102.53218) (end 203.454 102.53218) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 201.422 122.4915) (end 201.422 121.74982) (width 0.5588) (layer Cuivre) (net 278) (status 800)) - (segment (start 200.56348 121.0691) (end 201.2442 121.74982) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 201.2442 121.74982) (end 201.422 121.74982) (width 0.5588) (layer Cuivre) (net 278)) - (via (at 200.56348 121.0691) (size 1.143) (layers Composant Cuivre) (net 278)) - (segment (start 208.57464 119.253) (end 209.73288 118.09476) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 201.10196 119.253) (end 206.375 119.253) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 200.56348 121.0691) (end 200.56348 119.79148) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 200.56348 119.79148) (end 201.10196 119.253) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 206.375 119.253) (end 208.57464 119.253) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 199.009 102.97668) (end 199.1741 102.81158) (width 0.5588) (layer Composant) (net 278)) - (segment (start 199.1741 102.81158) (end 199.1741 100.7745) (width 0.254) (layer Composant) (net 278) (status 400)) - (segment (start 192.46088 113.5126) (end 191.9605 114.01298) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 191.9605 114.01298) (end 191.9605 115.189) (width 0.5588) (layer Cuivre) (net 278) (status 400)) - (segment (start 192.46088 113.5126) (end 190.9445 113.5126) (width 0.254) (layer Composant) (net 278) (status 400)) - (segment (start 190.5 100.75418) (end 190.04788 101.2063) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 199.009 102.97668) (end 191.24168 102.97668) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 190.04788 101.78288) (end 191.24168 102.97668) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 190.04788 101.2063) (end 190.04788 101.78288) (width 0.5588) (layer 3.3V_layer) (net 278)) - (via (at 190.04788 101.2063) (size 1.143) (layers Composant Cuivre) (net 278)) - (segment (start 190.5 100.75418) (end 190.5 100.0125) (width 0.5588) (layer Cuivre) (net 278) (status 400)) - (segment (start 157.734 97.536) (end 158.623 96.647) (width 0.5588) (layer Composant) (net 278)) - (segment (start 158.623 96.647) (end 158.623 95.8215) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 218.44 66.3575) (end 218.44 65.10274) (width 0.5588) (layer Composant) (net 278) (status 800)) - (via (at 218.44 65.10274) (size 1.143) (layers Composant Cuivre) (net 278)) - (segment (start 220.04274 63.5) (end 218.44 65.10274) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 220.04274 63.5) (end 223.52 63.5) (width 0.5588) (layer 3.3V_layer) (net 278) (status 400)) - (segment (start 205.6511 121.22912) (end 205.359 121.52122) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 206.375 119.253) (end 205.6511 119.9769) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 205.6511 121.22912) (end 205.6511 119.9769) (width 0.5588) (layer 3.3V_layer) (net 278)) - (via (at 205.6511 121.22912) (size 1.143) (layers Composant Cuivre) (net 278)) - (segment (start 205.359 121.52122) (end 205.359 122.4915) (width 0.5588) (layer Cuivre) (net 278) (status 400)) - (segment (start 199.009 102.97668) (end 199.009 101.7905) (width 0.5588) (layer Cuivre) (net 278) (status 400)) - (segment (start 191.9605 107.315) (end 192.70218 107.315) (width 0.5588) (layer Cuivre) (net 278) (status 800)) - (segment (start 193.167 107.1245) (end 192.89268 107.1245) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 192.89268 107.1245) (end 192.70218 107.315) (width 0.5588) (layer Cuivre) (net 278)) - (via (at 193.167 107.1245) (size 1.143) (layers Composant Cuivre) (net 278)) - (segment (start 193.167 107.1245) (end 194.8815 107.1245) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 194.8815 107.1245) (end 195.072 107.315) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 195.072 107.315) (end 195.072 109.855) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 195.072 110.90148) (end 192.46088 113.5126) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 195.072 109.855) (end 195.072 110.90148) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 212.9155 113.5126) (end 211.40928 113.5126) (width 0.254) (layer Composant) (net 278) (status 800)) - (segment (start 212.4456 113.5126) (end 212.979 114.046) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 211.40928 113.5126) (end 212.4456 113.5126) (width 0.5588) (layer 3.3V_layer) (net 278)) - (via (at 211.40928 113.5126) (size 1.143) (layers Composant Cuivre) (net 278)) - (segment (start 211.41436 102.56774) (end 211.85632 103.0097) (width 0.5588) (layer Composant) (net 278)) - (segment (start 212.9155 103.0097) (end 211.85632 103.0097) (width 0.254) (layer Composant) (net 278) (status 800)) - (segment (start 191.86144 109.5121) (end 192.00368 109.65434) (width 0.254) (layer Composant) (net 278)) - (segment (start 192.00368 109.65434) (end 192.00368 110.0074) (width 0.5588) (layer Composant) (net 278)) - (segment (start 191.86144 109.5121) (end 193.3321 109.5121) (width 0.2032) (layer Composant) (net 278)) - (segment (start 193.3321 109.5121) (end 193.675 109.855) (width 0.5588) (layer Composant) (net 278)) - (segment (start 190.9445 109.5121) (end 191.86144 109.5121) (width 0.2032) (layer Composant) (net 278) (status 800)) - (segment (start 190.9445 110.0074) (end 192.00368 110.0074) (width 0.254) (layer Composant) (net 278) (status 800)) - (segment (start 204.1779 122.7455) (end 204.1779 121.24182) (width 0.254) (layer Composant) (net 278) (status 800)) - (segment (start 205.6384 121.24182) (end 205.6511 121.22912) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 204.1779 121.24182) (end 205.6384 121.24182) (width 0.5588) (layer 3.3V_layer) (net 278)) - (via (at 204.1779 121.24182) (size 1.143) (layers Composant Cuivre) (net 278)) - (segment (start 192.46088 113.5126) (end 192.33388 113.6396) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 192.33388 123.84532) (end 192.33388 113.6396) (width 0.5588) (layer 3.3V_layer) (net 278)) - (via (at 192.33388 123.84532) (size 1.143) (layers Composant Cuivre) (net 278)) - (segment (start 194.691 125.222) (end 194.6783 122.7455) (width 0.254) (layer Composant) (net 278) (status 400)) - (segment (start 157.48 104.394) (end 155.448 104.394) (width 0.5588) (layer Composant) (net 278)) - (segment (start 161.036 104.394) (end 157.48 104.394) (width 0.5588) (layer Composant) (net 278)) - (segment (start 153.543 109.22) (end 153.416 109.093) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 153.416 109.093) (end 153.416 106.426) (width 0.5588) (layer Composant) (net 278)) - (segment (start 153.416 106.426) (end 155.448 104.394) (width 0.5588) (layer Composant) (net 278)) - (segment (start 130.8735 89.916) (end 130.8735 89.9795) (width 0.5588) (layer Composant) (net 278)) - (segment (start 146.304 105.41) (end 146.812 105.41) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 138.938 110.109) (end 142.875 110.109) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 142.875 110.109) (end 143.891 109.093) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 143.891 109.093) (end 143.891 106.807) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 143.891 106.807) (end 145.288 105.41) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 145.288 105.41) (end 146.304 105.41) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 146.812 98.679) (end 145.796 98.679) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 145.796 98.679) (end 145.288 99.187) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 145.288 99.187) (end 145.288 104.394) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 145.288 104.394) (end 146.304 105.41) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 138.938 110.109) (end 139.954 109.093) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 139.954 109.093) (end 139.954 106.553) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 139.954 106.553) (end 137.668 104.267) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 137.668 104.267) (end 133.985 104.267) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 138.43 110.617) (end 138.938 110.109) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 130.937 89.916) (end 130.8735 89.9795) (width 0.5588) (layer Composant) (net 278)) - (segment (start 135.4455 89.7255) (end 134.112 88.392) (width 0.5588) (layer Composant) (net 278)) - (segment (start 135.4455 91.44) (end 135.4455 89.7255) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 132.461 88.392) (end 130.937 89.916) (width 0.5588) (layer Composant) (net 278)) - (segment (start 134.112 88.392) (end 132.461 88.392) (width 0.5588) (layer Composant) (net 278)) - (segment (start 161.544 106.807) (end 161.544 105.7275) (width 0.5588) (layer Composant) (net 278)) - (segment (start 161.544 105.7275) (end 161.3535 105.537) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 161.544 107.696) (end 161.544 106.807) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 146.05 74.676) (end 146.05 77.978) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 146.05 77.978) (end 143.129 80.899) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 143.129 80.899) (end 143.129 93.853) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 85.217 115.57) (end 83.82 116.967) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 96.012 111.379) (end 89.789 111.379) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 97.409 112.141) (end 96.774 112.141) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 96.774 112.141) (end 96.012 111.379) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 83.82 116.967) (end 83.058 117.729) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 83.058 117.729) (end 77.597 117.729) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 77.597 117.729) (end 76.327 116.459) (width 0.5588) (layer 3.3V_layer) (net 278) (status 400)) - (segment (start 102.9335 96.647) (end 102.9335 95.3135) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 102.9335 95.3135) (end 103.251 94.996) (width 0.5588) (layer Composant) (net 278)) - (segment (start 103.251 94.996) (end 107.315 94.996) (width 0.5588) (layer Composant) (net 278)) - (segment (start 107.315 94.996) (end 110.49 91.821) (width 0.5588) (layer Composant) (net 278)) - (segment (start 110.49 91.821) (end 117.094 91.821) (width 0.5588) (layer Composant) (net 278)) - (segment (start 117.094 91.821) (end 121.158 95.885) (width 0.5588) (layer Composant) (net 278)) - (segment (start 121.158 95.885) (end 121.0945 97.282) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 168.275 115.062) (end 169.799 115.062) (width 0.5588) (layer Composant) (net 278)) - (segment (start 169.799 115.062) (end 170.6245 115.8875) (width 0.5588) (layer Composant) (net 278)) - (segment (start 170.6245 115.8875) (end 170.6245 117.094) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 143.129 98.9584) (end 145.0086 98.9584) (width 0.254) (layer Composant) (net 278) (status 800)) - (segment (start 145.0086 98.9584) (end 145.288 98.679) (width 0.254) (layer Composant) (net 278)) - (segment (start 145.288 98.679) (end 146.812 98.679) (width 0.5588) (layer Composant) (net 278)) - (segment (start 127.635 99.4664) (end 125.7808 99.4664) (width 0.254) (layer Composant) (net 278) (status 800)) - (segment (start 125.7808 99.4664) (end 125.349 98.8695) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 130.8735 89.9795) (end 130.8735 92.3925) (width 0.254) (layer Composant) (net 278)) - (segment (start 130.8735 92.3925) (end 130.3782 92.8878) (width 0.254) (layer Composant) (net 278)) - (segment (start 130.3782 92.8878) (end 130.3782 93.726) (width 0.254) (layer Composant) (net 278) (status 400)) - (segment (start 127.889 97.155) (end 122.936 97.155) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 122.936 97.155) (end 121.666 98.425) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 131.699 102.87) (end 131.699 98.806) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 131.699 98.806) (end 130.048 97.155) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 130.048 97.155) (end 127.889 97.155) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 131.699 102.87) (end 131.318 103.124) (width 0.254) (layer Composant) (net 278)) - (segment (start 131.318 103.124) (end 129.667 103.124) (width 0.254) (layer Composant) (net 278)) - (segment (start 129.667 103.124) (end 129.4384 102.9462) (width 0.254) (layer Composant) (net 278)) - (segment (start 129.4384 102.9462) (end 127.635 102.9716) (width 0.254) (layer Composant) (net 278) (status 400)) - (segment (start 121.0945 97.282) (end 121.0945 97.8535) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 121.0945 97.8535) (end 121.666 98.425) (width 0.5588) (layer Composant) (net 278)) - (segment (start 161.163 92.329) (end 161.163 107.95) (width 0.5588) (layer GND_layer) (net 278)) - (segment (start 161.163 107.95) (end 168.275 115.062) (width 0.5588) (layer GND_layer) (net 278)) - (segment (start 146.812 98.679) (end 148.082 98.679) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 148.082 98.679) (end 149.479 100.076) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 149.479 100.076) (end 155.194 100.076) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 155.194 100.076) (end 157.734 97.536) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 141.859 119.253) (end 142.621 120.015) (width 0.5588) (layer Composant) (net 278)) - (segment (start 140.97 118.364) (end 140.97 113.665) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 140.97 113.665) (end 138.43 111.125) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 138.43 111.125) (end 138.43 110.617) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 141.859 119.253) (end 140.97 118.364) (width 0.5588) (layer 3.3V_layer) (net 278)) - (via (at 141.859 119.253) (size 1.143) (layers Composant Cuivre) (net 278)) - (segment (start 142.621 120.015) (end 148.59 120.015) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 135.4455 91.44) (end 135.5725 92.0115) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 135.5725 92.0115) (end 134.874 92.71) (width 0.254) (layer Composant) (net 278)) - (segment (start 134.874 92.71) (end 134.874 93.726) (width 0.254) (layer Composant) (net 278) (status 400)) - (segment (start 161.163 92.329) (end 161.163 91.313) (width 0.5588) (layer Composant) (net 278)) - (segment (start 161.163 91.313) (end 160.782 90.932) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 153.9875 96.012) (end 153.9875 98.298) (width 0.5588) (layer Composant) (net 278) (status C00)) - (segment (start 102.9335 98.933) (end 102.1715 98.933) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 102.1715 98.933) (end 100.584 100.5205) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 84.2645 106.553) (end 84.2645 104.267) (width 0.5588) (layer Composant) (net 278) (status C00)) - (segment (start 98.298 100.584) (end 98.3615 100.5205) (width 0.5588) (layer Composant) (net 278)) - (segment (start 98.3615 100.5205) (end 100.584 100.5205) (width 0.5588) (layer Composant) (net 278) (status 400)) - (via (at 98.298 100.584) (size 1.143) (layers Composant Cuivre) (net 278)) - (segment (start 153.9875 93.853) (end 153.9875 96.012) (width 0.5588) (layer Composant) (net 278) (status C00)) - (segment (start 127.889 97.155) (end 127.889 95.25) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 130.937 92.202) (end 130.937 89.916) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 127.889 95.25) (end 130.937 92.202) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 146.812 98.679) (end 146.812 97.536) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 146.812 97.536) (end 143.129 93.853) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 143.129 93.853) (end 143.002 93.726) (width 0.5588) (layer Composant) (net 278)) - (segment (start 143.002 93.726) (end 141.3764 93.726) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 146.812 105.41) (end 146.4945 105.7275) (width 0.4) (layer Composant) (net 278)) - (segment (start 144.6784 104.9782) (end 143.129 104.9782) (width 0.254) (layer Composant) (net 278) (status 400)) - (segment (start 145.288 105.7275) (end 144.6784 104.9782) (width 0.254) (layer Composant) (net 278)) - (segment (start 146.4945 105.7275) (end 145.288 105.7275) (width 0.4) (layer Composant) (net 278)) - (segment (start 138.4935 111.633) (end 138.4935 110.6805) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 138.4935 110.6805) (end 138.43 110.617) (width 0.5588) (layer Composant) (net 278)) - (segment (start 140.8684 93.726) (end 141.3764 93.726) (width 0.254) (layer Composant) (net 278) (status C00)) - (segment (start 133.985 104.267) (end 133.477 104.267) (width 0.2) (layer Composant) (net 278)) - (segment (start 133.477 104.267) (end 133.096 104.648) (width 0.254) (layer Composant) (net 278)) - (segment (start 133.096 104.648) (end 133.096 105.029) (width 0.254) (layer Composant) (net 278)) - (segment (start 133.096 105.029) (end 132.334 105.791) (width 0.254) (layer Composant) (net 278)) - (segment (start 132.334 105.791) (end 132.334 107.823) (width 0.254) (layer Composant) (net 278)) - (segment (start 132.334 107.823) (end 132.3848 108.1278) (width 0.254) (layer Composant) (net 278)) - (segment (start 132.3848 108.1278) (end 132.3848 109.22) (width 0.254) (layer Composant) (net 278) (status 400)) - (segment (start 140.8684 93.726) (end 140.8684 92.9386) (width 0.254) (layer Composant) (net 278) (status 800)) - (segment (start 140.8684 92.9386) (end 141.351 92.456) (width 0.254) (layer Composant) (net 278)) - (segment (start 141.351 92.456) (end 141.351 92.2655) (width 0.5588) (layer Composant) (net 278)) - (segment (start 141.351 92.2655) (end 142.5575 91.059) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 182.8165 121.158) (end 180.975 121.158) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 180.975 121.158) (end 178.689 118.872) (width 0.5588) (layer Composant) (net 278)) - (segment (start 131.3942 109.22) (end 131.3942 110.0328) (width 0.254) (layer Composant) (net 278) (status 800)) - (segment (start 173.863 116.1415) (end 172.9105 117.094) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 173.863 115.824) (end 173.863 116.1415) (width 0.5588) (layer Composant) (net 278)) - (segment (start 175.641 115.824) (end 173.863 115.824) (width 0.5588) (layer Composant) (net 278)) - (segment (start 182.8165 121.158) (end 182.8165 123.444) (width 0.5588) (layer Composant) (net 278) (status C00)) - (segment (start 153.9875 98.298) (end 155.067 98.298) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 155.067 98.298) (end 155.829 97.536) (width 0.5588) (layer Composant) (net 278)) - (segment (start 155.829 97.536) (end 157.734 97.536) (width 0.5588) (layer Composant) (net 278)) - (segment (start 84.2645 119.126) (end 85.09 119.126) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 137.8966 109.22) (end 137.8966 110.9472) (width 0.254) (layer Composant) (net 278) (status 800)) - (segment (start 137.8966 110.9472) (end 137.93978 110.998) (width 0.254) (layer Composant) (net 278)) - (segment (start 137.93978 110.998) (end 138.4935 111.633) (width 0.254) (layer Composant) (net 278) (status 400)) - (segment (start 170.6245 117.094) (end 172.9105 117.094) (width 0.5588) (layer Composant) (net 278) (status C00)) - (segment (start 127.635 102.9716) (end 126.0729 102.9716) (width 0.254) (layer Composant) (net 278) (status 800)) - (segment (start 126.0729 102.9716) (end 125.5395 103.505) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 84.2645 121.412) (end 84.2645 119.126) (width 0.5588) (layer Composant) (net 278) (status C00)) - (segment (start 102.9335 98.933) (end 102.9335 96.647) (width 0.5588) (layer Composant) (net 278) (status C00)) - (segment (start 161.163 92.329) (end 157.734 95.758) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 157.734 95.758) (end 157.734 97.536) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 125.349 98.8695) (end 125.17374 99.01174) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 125.17374 99.01174) (end 123.444 97.282) (width 0.5588) (layer Composant) (net 278)) - (segment (start 123.444 97.282) (end 121.0945 97.282) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 130.8862 93.726) (end 130.3782 93.726) (width 0.254) (layer Composant) (net 278) (status C00)) - (segment (start 133.096 90.551) (end 139.827 90.551) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 139.827 90.551) (end 143.129 93.853) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 130.8735 89.916) (end 130.937 89.916) (width 0.5588) (layer Composant) (net 278)) - (segment (start 107.95 114.173) (end 108.0135 114.1095) (width 0.5588) (layer Composant) (net 278)) - (segment (start 108.0135 114.1095) (end 108.0135 110.4265) (width 0.5588) (layer Composant) (net 278)) - (segment (start 108.0135 110.4265) (end 108.585 109.855) (width 0.5588) (layer Composant) (net 278)) - (segment (start 108.585 109.855) (end 112.522 109.855) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 130.937 89.916) (end 130.937 91.3765) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 130.937 91.3765) (end 130.8735 91.44) (width 0.5588) (layer Cuivre) (net 278) (status 400)) - (segment (start 146.812 105.41) (end 145.6055 105.41) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 145.6055 105.41) (end 145.288 105.7275) (width 0.5588) (layer Cuivre) (net 278) (status 400)) - (segment (start 145.415 98.3615) (end 146.4945 98.3615) (width 0.5588) (layer Cuivre) (net 278) (status 800)) - (segment (start 146.4945 98.3615) (end 146.812 98.679) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 176.149 102.87) (end 176.911 102.87) (width 0.5588) (layer 3.3V_layer) (net 278) (status 800)) - (segment (start 176.911 102.87) (end 177.927 101.854) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 177.927 101.854) (end 183.769 101.854) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 183.769 101.854) (end 183.769 93.218) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 183.769 93.218) (end 185.547 90.678) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 185.547 90.678) (end 186.817 90.678) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 186.817 90.678) (end 189.23 88.265) (width 0.5588) (layer 3.3V_layer) (net 278) (status 400)) - (segment (start 101.6635 113.03) (end 101.6635 113.6015) (width 0.5588) (layer Composant) (net 278)) - (segment (start 101.6635 113.6015) (end 101.854 113.792) (width 0.5588) (layer Composant) (net 278)) - (segment (start 101.854 113.792) (end 102.743 113.792) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 164.846 98.806) (end 164.846 98.933) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 164.846 98.933) (end 163.449 100.33) (width 0.5588) (layer Composant) (net 278)) - (segment (start 101.6635 113.03) (end 100.838 113.03) (width 0.5588) (layer Composant) (net 278)) - (segment (start 97.409 112.141) (end 97.4725 112.0775) (width 0.5588) (layer Composant) (net 278)) - (segment (start 97.4725 112.0775) (end 97.4725 110.236) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 101.6635 111.252) (end 101.6635 113.03) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 168.529 102.87) (end 176.149 102.87) (width 0.5588) (layer Composant) (net 278) (status C00)) - (segment (start 131.572 71.247) (end 129.2225 71.247) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 181.864 130.302) (end 169.2275 130.302) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 169.2275 130.302) (end 165.354 126.4285) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 107.5055 84.328) (end 107.5055 87.6935) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 107.823 83.185) (end 108.712 82.296) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 108.712 82.296) (end 126.619 82.296) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 126.619 82.296) (end 131.572 77.343) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 131.572 77.343) (end 131.572 71.247) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 107.5055 87.6935) (end 107.569 87.757) (width 0.5588) (layer Composant) (net 278)) - (segment (start 107.569 87.757) (end 108.585 87.757) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 131.572 71.247) (end 131.572 72.644) (width 0.5588) (layer Composant) (net 278)) - (segment (start 131.572 72.644) (end 130.937 73.5965) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 157.734 126.4285) (end 160.274 126.4285) (width 0.5588) (layer Composant) (net 278) (status C00)) - (segment (start 129.2225 71.247) (end 129.2225 72.4535) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 129.2225 72.4535) (end 128.27 73.406) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 192.532 73.2155) (end 192.532 71.247) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 192.532 71.247) (end 190.1825 71.247) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 164.592 71.247) (end 162.2425 71.247) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 97.409 112.141) (end 99.949 112.141) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 99.949 112.141) (end 100.838 113.03) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 190.1825 71.247) (end 190.1825 72.4535) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 190.1825 72.4535) (end 189.23 73.406) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 160.274 126.4285) (end 162.814 126.4285) (width 0.5588) (layer Composant) (net 278) (status C00)) - (segment (start 162.814 126.4285) (end 165.354 126.4285) (width 0.5588) (layer Composant) (net 278) (status C00)) - (segment (start 76.327 116.459) (end 74.93 116.459) (width 0.5588) (layer 3.3V_layer) (net 278) (status 800)) - (segment (start 74.93 116.459) (end 73.914 117.475) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 73.914 117.475) (end 73.914 136.144) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 73.914 136.144) (end 74.549 136.779) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 74.549 136.779) (end 76.327 136.779) (width 0.5588) (layer 3.3V_layer) (net 278) (status 400)) - (segment (start 106.3625 133.858) (end 107.696 133.858) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 107.696 133.858) (end 110.744 136.906) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 74.7014 93.091) (end 76.4032 93.091) (width 0.5588) (layer Composant) (net 278) (status C00)) - (segment (start 78.74 100.33) (end 74.7014 96.2914) (width 0.5588) (layer Composant) (net 278)) - (segment (start 78.74 100.33) (end 88.9 100.33) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 74.7014 96.2914) (end 74.7014 93.091) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 164.592 71.247) (end 164.592 73.2155) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 162.2425 71.247) (end 162.2425 72.4535) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 162.2425 72.4535) (end 161.29 73.406) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 107.5055 84.328) (end 107.5055 83.5025) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 107.5055 83.5025) (end 107.823 83.185) (width 0.5588) (layer Composant) (net 278)) - (segment (start 107.823 83.185) (end 106.553 84.455) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 106.553 84.455) (end 106.553 85.852) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 106.553 85.852) (end 104.648 87.757) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 104.648 87.757) (end 97.155 87.757) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 161.3535 105.537) (end 161.3535 104.7115) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 161.3535 104.7115) (end 161.036 104.394) (width 0.5588) (layer Composant) (net 278)) - (segment (start 163.449 100.33) (end 162.306 101.473) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 162.306 101.473) (end 162.306 106.807) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 162.306 106.807) (end 166.243 102.87) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 166.243 102.87) (end 168.529 102.87) (width 0.5588) (layer 3.3V_layer) (net 278) (status 400)) - (segment (start 161.544 106.807) (end 162.306 106.807) (width 0.5588) (layer Composant) (net 278)) - (segment (start 168.529 102.87) (end 169.672 102.87) (width 0.5588) (layer 3.3V_layer) (net 278) (status 800)) - (segment (start 169.672 102.87) (end 172.085 105.283) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 172.085 105.283) (end 172.085 123.317) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 172.085 123.317) (end 179.07 130.302) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 179.07 130.302) (end 181.864 130.302) (width 0.5588) (layer 3.3V_layer) (net 278) (status 400)) - (segment (start 191.008 73.025) (end 184.785 73.025) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 184.785 73.025) (end 182.753 70.993) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 182.753 70.993) (end 164.846 70.993) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 164.846 70.993) (end 164.592 71.247) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 164.592 71.247) (end 162.814 73.025) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 162.814 73.025) (end 155.321 73.025) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 155.321 73.025) (end 152.908 70.612) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 152.908 70.612) (end 150.114 70.612) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 150.114 70.612) (end 146.05 74.676) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 130.937 73.5965) (end 132.7785 73.5965) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 132.7785 73.5965) (end 134.747 71.628) (width 0.5588) (layer Composant) (net 278)) - (segment (start 134.747 71.628) (end 143.002 71.628) (width 0.5588) (layer Composant) (net 278)) - (segment (start 143.002 71.628) (end 146.05 74.676) (width 0.5588) (layer Composant) (net 278)) - (segment (start 107.95 114.173) (end 107.95 134.112) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 107.95 134.112) (end 110.744 136.906) (width 0.5588) (layer 3.3V_layer) (net 278) (status 400)) - (segment (start 100.838 113.03) (end 101.092 113.03) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 101.092 113.03) (end 102.235 114.173) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 102.235 114.173) (end 107.95 114.173) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 98.7425 87.757) (end 97.155 87.757) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 192.532 73.2155) (end 191.1985 73.2155) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 191.1985 73.2155) (end 191.008 73.025) (width 0.5588) (layer Composant) (net 278)) - (segment (start 191.008 73.025) (end 191.262 73.279) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 191.262 73.279) (end 191.262 86.233) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 191.262 86.233) (end 189.23 88.265) (width 0.5588) (layer 3.3V_layer) (net 278) (status 400)) - (via (at 209.73288 118.09476) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 192.46088 113.5126) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 199.009 102.97668) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 211.41436 102.56774) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 194.691 125.222) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 146.812 98.679) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 131.699 102.87) (size 0.635) (layers Composant Cuivre) (net 278)) - (via (at 161.163 92.329) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 143.129 93.853) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 146.812 105.41) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 138.43 110.617) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 85.09 119.126) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 168.275 115.062) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 133.985 104.267) (size 0.635) (layers Composant Cuivre) (net 278)) - (via (at 121.666 98.425) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 157.734 97.536) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 130.937 89.916) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 193.675 109.855) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 131.572 71.247) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 97.409 112.141) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 100.838 113.03) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 107.823 83.185) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 163.449 100.33) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 162.306 106.807) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 164.592 71.247) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 146.05 74.676) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 107.95 114.173) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 97.155 87.757) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 191.008 73.025) (size 1.143) (layers Composant Cuivre) (net 278)) - (segment (start 197.485 122.4915) (end 196.4055 122.4915) (width 0.5588) (layer Cuivre) (net 278) (status 800)) - (segment (start 196.4055 122.4915) (end 194.691 124.206) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 194.691 124.206) (end 194.691 125.222) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 85.09 119.126) (end 85.09 118.237) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 85.09 118.237) (end 83.82 116.967) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 191.008 73.025) (end 193.167 70.866) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 211.12226 65.10274) (end 218.44 65.10274) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 205.359 70.866) (end 211.12226 65.10274) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 193.167 70.866) (end 205.359 70.866) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 193.675 109.855) (end 195.072 109.855) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 192.33388 123.84532) (end 192.33388 125.02388) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 192.532 125.222) (end 194.691 125.222) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 192.33388 125.02388) (end 192.532 125.222) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 194.691 125.222) (end 194.818 125.222) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 198.9709 121.0691) (end 200.56348 121.0691) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 194.818 125.222) (end 198.9709 121.0691) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 202.48118 102.997) (end 204.724 102.997) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 204.724 102.997) (end 206.83474 105.10774) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 206.83474 105.10774) (end 206.83474 105.664) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 206.83474 105.664) (end 206.83474 109.98708) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 211.41436 102.56774) (end 212.51926 102.56774) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 211.582 105.664) (end 206.83474 105.664) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 212.598 104.648) (end 211.582 105.664) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 212.598 102.64648) (end 212.598 104.648) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 212.51926 102.56774) (end 212.598 102.64648) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 194.691 125.222) (end 194.691 128.397) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 200.914 134.62) (end 207.01 134.62) (width 0.5588) (layer 3.3V_layer) (net 278) (status 400)) - (segment (start 194.691 128.397) (end 200.914 134.62) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 192.33388 123.84532) (end 183.66232 123.84532) (width 0.5588) (layer 3.3V_layer) (net 278)) - (via (at 178.689 118.872) (size 1.143) (layers Composant Cuivre) (net 278)) - (segment (start 183.66232 123.84532) (end 178.689 118.872) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 132.3848 109.22) (end 132.3848 110.4138) (width 0.254) (layer Composant) (net 278) (status 800)) - (segment (start 132.461 89.916) (end 130.937 89.916) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 133.096 90.551) (end 132.461 89.916) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 193.1797 122.7455) (end 192.5955 122.7455) (width 0.254) (layer Composant) (net 278) (status 800)) - (segment (start 192.33388 123.00712) (end 192.33388 123.84532) (width 0.5588) (layer Composant) (net 278)) - (segment (start 192.5955 122.7455) (end 192.33388 123.00712) (width 0.5588) (layer Composant) (net 278)) - (segment (start 132.9055 110.9345) (end 132.9055 112.268) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 132.3848 110.4138) (end 132.9055 110.9345) (width 0.254) (layer Composant) (net 278)) - (segment (start 87.63 115.57) (end 89.789 113.411) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 89.789 113.411) (end 89.789 111.379) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 124.841 68.58) (end 124.841 65.151) (width 0.381) (layer Cuivre) (net 275) (status 800)) + (segment (start 124.206 64.516) (end 119.507 64.516) (width 0.381) (layer Cuivre) (net 275)) + (segment (start 117.983 67.183) (end 116.586 68.58) (width 0.381) (layer Cuivre) (net 275) (status 400)) + (segment (start 119.507 64.516) (end 117.983 66.04) (width 0.381) (layer Cuivre) (net 275) (status 400)) + (segment (start 124.841 65.151) (end 124.206 64.516) (width 0.381) (layer Cuivre) (net 275)) (segment (start 85.217 115.57) (end 87.63 115.57) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 89.789 113.411) (end 89.789 111.379) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 87.63 115.57) (end 89.789 113.411) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 132.3848 110.4138) (end 132.9055 110.9345) (width 0.254) (layer Composant) (net 278)) + (segment (start 132.9055 110.9345) (end 132.9055 112.268) (width 0.5588) (layer Composant) (net 278) (status 400)) + (segment (start 192.5955 122.7455) (end 192.33388 123.00712) (width 0.5588) (layer Composant) (net 278)) + (segment (start 192.33388 123.00712) (end 192.33388 123.84532) (width 0.5588) (layer Composant) (net 278)) + (segment (start 193.1797 122.7455) (end 192.5955 122.7455) (width 0.254) (layer Composant) (net 278) (status 800)) + (segment (start 133.096 90.551) (end 132.461 89.916) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 132.461 89.916) (end 130.937 89.916) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 132.3848 109.22) (end 132.3848 110.4138) (width 0.254) (layer Composant) (net 278) (status 800)) + (segment (start 183.66232 123.84532) (end 178.689 118.872) (width 0.5588) (layer 3.3V_layer) (net 278)) + (via (at 178.689 118.872) (size 1.143) (layers Composant Cuivre) (net 278)) + (segment (start 192.33388 123.84532) (end 183.66232 123.84532) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 194.691 128.397) (end 200.914 134.62) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 200.914 134.62) (end 207.01 134.62) (width 0.5588) (layer 3.3V_layer) (net 278) (status 400)) + (segment (start 194.691 125.222) (end 194.691 128.397) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 212.51926 102.56774) (end 212.598 102.64648) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 212.598 102.64648) (end 212.598 104.648) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 212.598 104.648) (end 211.582 105.664) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 211.582 105.664) (end 206.83474 105.664) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 211.41436 102.56774) (end 212.51926 102.56774) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 206.83474 105.664) (end 206.83474 109.98708) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 206.83474 105.10774) (end 206.83474 105.664) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 204.724 102.997) (end 206.83474 105.10774) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 202.48118 102.997) (end 204.724 102.997) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 194.818 125.222) (end 198.9709 121.0691) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 198.9709 121.0691) (end 200.56348 121.0691) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 194.691 125.222) (end 194.818 125.222) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 192.33388 125.02388) (end 192.532 125.222) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 192.532 125.222) (end 194.691 125.222) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 192.33388 123.84532) (end 192.33388 125.02388) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 193.675 109.855) (end 195.072 109.855) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 193.167 70.866) (end 205.359 70.866) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 205.359 70.866) (end 211.12226 65.10274) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 211.12226 65.10274) (end 218.44 65.10274) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 191.008 73.025) (end 193.167 70.866) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 85.09 118.237) (end 83.82 116.967) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 85.09 119.126) (end 85.09 118.237) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 194.691 124.206) (end 194.691 125.222) (width 0.5588) (layer Cuivre) (net 278)) + (segment (start 196.4055 122.4915) (end 194.691 124.206) (width 0.5588) (layer Cuivre) (net 278)) + (segment (start 197.485 122.4915) (end 196.4055 122.4915) (width 0.5588) (layer Cuivre) (net 278) (status 800)) + (via (at 191.008 73.025) (size 1.143) (layers Composant Cuivre) (net 278)) + (via (at 97.155 87.757) (size 1.143) (layers Composant Cuivre) (net 278)) + (via (at 107.95 114.173) (size 1.143) (layers Composant Cuivre) (net 278)) + (via (at 146.05 74.676) (size 1.143) (layers Composant Cuivre) (net 278)) + (via (at 164.592 71.247) (size 1.143) (layers Composant Cuivre) (net 278)) + (via (at 162.306 106.807) (size 1.143) (layers Composant Cuivre) (net 278)) + (via (at 163.449 100.33) (size 1.143) (layers Composant Cuivre) (net 278)) + (via (at 107.823 83.185) (size 1.143) (layers Composant Cuivre) (net 278)) + (via (at 100.838 113.03) (size 1.143) (layers Composant Cuivre) (net 278)) + (via (at 97.409 112.141) (size 1.143) (layers Composant Cuivre) (net 278)) + (via (at 131.572 71.247) (size 1.143) (layers Composant Cuivre) (net 278)) + (via (at 193.675 109.855) (size 1.143) (layers Composant Cuivre) (net 278)) + (via (at 130.937 89.916) (size 1.143) (layers Composant Cuivre) (net 278)) + (via (at 157.734 97.536) (size 1.143) (layers Composant Cuivre) (net 278)) + (via (at 121.666 98.425) (size 1.143) (layers Composant Cuivre) (net 278)) + (via (at 133.985 104.267) (size 0.635) (layers Composant Cuivre) (net 278)) + (via (at 168.275 115.062) (size 1.143) (layers Composant Cuivre) (net 278)) + (via (at 85.09 119.126) (size 1.143) (layers Composant Cuivre) (net 278)) + (via (at 138.43 110.617) (size 1.143) (layers Composant Cuivre) (net 278)) + (via (at 146.812 105.41) (size 1.143) (layers Composant Cuivre) (net 278)) + (via (at 143.129 93.853) (size 1.143) (layers Composant Cuivre) (net 278)) + (via (at 161.163 92.329) (size 1.143) (layers Composant Cuivre) (net 278)) + (via (at 131.699 102.87) (size 0.635) (layers Composant Cuivre) (net 278)) + (via (at 146.812 98.679) (size 1.143) (layers Composant Cuivre) (net 278)) + (via (at 194.691 125.222) (size 1.143) (layers Composant Cuivre) (net 278)) + (via (at 211.41436 102.56774) (size 1.143) (layers Composant Cuivre) (net 278)) + (via (at 199.009 102.97668) (size 1.143) (layers Composant Cuivre) (net 278)) + (via (at 192.46088 113.5126) (size 1.143) (layers Composant Cuivre) (net 278)) + (via (at 209.73288 118.09476) (size 1.143) (layers Composant Cuivre) (net 278)) + (segment (start 191.262 86.233) (end 189.23 88.265) (width 0.5588) (layer 3.3V_layer) (net 278) (status 400)) + (segment (start 191.262 73.279) (end 191.262 86.233) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 191.008 73.025) (end 191.262 73.279) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 191.1985 73.2155) (end 191.008 73.025) (width 0.5588) (layer Composant) (net 278)) + (segment (start 192.532 73.2155) (end 191.1985 73.2155) (width 0.5588) (layer Composant) (net 278) (status 800)) + (segment (start 98.7425 87.757) (end 97.155 87.757) (width 0.5588) (layer Composant) (net 278) (status 800)) + (segment (start 102.235 114.173) (end 107.95 114.173) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 101.092 113.03) (end 102.235 114.173) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 100.838 113.03) (end 101.092 113.03) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 107.95 134.112) (end 110.744 136.906) (width 0.5588) (layer 3.3V_layer) (net 278) (status 400)) + (segment (start 107.95 114.173) (end 107.95 134.112) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 143.002 71.628) (end 146.05 74.676) (width 0.5588) (layer Composant) (net 278)) + (segment (start 134.747 71.628) (end 143.002 71.628) (width 0.5588) (layer Composant) (net 278)) + (segment (start 132.7785 73.5965) (end 134.747 71.628) (width 0.5588) (layer Composant) (net 278)) + (segment (start 130.937 73.5965) (end 132.7785 73.5965) (width 0.5588) (layer Composant) (net 278) (status 800)) + (segment (start 150.114 70.612) (end 146.05 74.676) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 152.908 70.612) (end 150.114 70.612) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 155.321 73.025) (end 152.908 70.612) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 162.814 73.025) (end 155.321 73.025) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 164.592 71.247) (end 162.814 73.025) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 164.846 70.993) (end 164.592 71.247) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 182.753 70.993) (end 164.846 70.993) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 184.785 73.025) (end 182.753 70.993) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 191.008 73.025) (end 184.785 73.025) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 179.07 130.302) (end 181.864 130.302) (width 0.5588) (layer 3.3V_layer) (net 278) (status 400)) + (segment (start 172.085 123.317) (end 179.07 130.302) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 172.085 105.283) (end 172.085 123.317) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 169.672 102.87) (end 172.085 105.283) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 168.529 102.87) (end 169.672 102.87) (width 0.5588) (layer 3.3V_layer) (net 278) (status 800)) + (segment (start 161.544 106.807) (end 162.306 106.807) (width 0.5588) (layer Composant) (net 278)) + (segment (start 166.243 102.87) (end 168.529 102.87) (width 0.5588) (layer 3.3V_layer) (net 278) (status 400)) + (segment (start 162.306 106.807) (end 166.243 102.87) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 162.306 101.473) (end 162.306 106.807) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 163.449 100.33) (end 162.306 101.473) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 161.3535 104.7115) (end 161.036 104.394) (width 0.5588) (layer Composant) (net 278)) + (segment (start 161.3535 105.537) (end 161.3535 104.7115) (width 0.5588) (layer Composant) (net 278) (status 800)) + (segment (start 104.648 87.757) (end 97.155 87.757) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 106.553 85.852) (end 104.648 87.757) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 106.553 84.455) (end 106.553 85.852) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 107.823 83.185) (end 106.553 84.455) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 107.5055 83.5025) (end 107.823 83.185) (width 0.5588) (layer Composant) (net 278)) + (segment (start 107.5055 84.328) (end 107.5055 83.5025) (width 0.5588) (layer Composant) (net 278) (status 800)) + (segment (start 162.2425 72.4535) (end 161.29 73.406) (width 0.5588) (layer Composant) (net 278) (status 400)) + (segment (start 162.2425 71.247) (end 162.2425 72.4535) (width 0.5588) (layer Composant) (net 278) (status 800)) + (segment (start 164.592 71.247) (end 164.592 73.2155) (width 0.5588) (layer Composant) (net 278) (status 400)) + (segment (start 74.7014 96.2914) (end 74.7014 93.091) (width 0.5588) (layer Composant) (net 278) (status 400)) + (segment (start 78.74 100.33) (end 88.9 100.33) (width 0.5588) (layer Composant) (net 278) (status 400)) + (segment (start 78.74 100.33) (end 74.7014 96.2914) (width 0.5588) (layer Composant) (net 278)) + (segment (start 74.7014 93.091) (end 76.4032 93.091) (width 0.5588) (layer Composant) (net 278) (status C00)) + (segment (start 107.696 133.858) (end 110.744 136.906) (width 0.5588) (layer Composant) (net 278) (status 400)) + (segment (start 106.3625 133.858) (end 107.696 133.858) (width 0.5588) (layer Composant) (net 278) (status 800)) + (segment (start 74.549 136.779) (end 76.327 136.779) (width 0.5588) (layer 3.3V_layer) (net 278) (status 400)) + (segment (start 73.914 136.144) (end 74.549 136.779) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 73.914 117.475) (end 73.914 136.144) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 74.93 116.459) (end 73.914 117.475) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 76.327 116.459) (end 74.93 116.459) (width 0.5588) (layer 3.3V_layer) (net 278) (status 800)) + (segment (start 162.814 126.4285) (end 165.354 126.4285) (width 0.5588) (layer Composant) (net 278) (status C00)) + (segment (start 160.274 126.4285) (end 162.814 126.4285) (width 0.5588) (layer Composant) (net 278) (status C00)) + (segment (start 190.1825 72.4535) (end 189.23 73.406) (width 0.5588) (layer Composant) (net 278) (status 400)) + (segment (start 190.1825 71.247) (end 190.1825 72.4535) (width 0.5588) (layer Composant) (net 278) (status 800)) + (segment (start 99.949 112.141) (end 100.838 113.03) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 97.409 112.141) (end 99.949 112.141) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 164.592 71.247) (end 162.2425 71.247) (width 0.5588) (layer Composant) (net 278) (status 400)) + (segment (start 192.532 71.247) (end 190.1825 71.247) (width 0.5588) (layer Composant) (net 278) (status 400)) + (segment (start 192.532 73.2155) (end 192.532 71.247) (width 0.5588) (layer Composant) (net 278) (status 800)) + (segment (start 129.2225 72.4535) (end 128.27 73.406) (width 0.5588) (layer Composant) (net 278) (status 400)) + (segment (start 129.2225 71.247) (end 129.2225 72.4535) (width 0.5588) (layer Composant) (net 278) (status 800)) + (segment (start 157.734 126.4285) (end 160.274 126.4285) (width 0.5588) (layer Composant) (net 278) (status C00)) + (segment (start 131.572 72.644) (end 130.937 73.5965) (width 0.5588) (layer Composant) (net 278) (status 400)) + (segment (start 131.572 71.247) (end 131.572 72.644) (width 0.5588) (layer Composant) (net 278)) + (segment (start 107.569 87.757) (end 108.585 87.757) (width 0.5588) (layer Composant) (net 278) (status 400)) + (segment (start 107.5055 87.6935) (end 107.569 87.757) (width 0.5588) (layer Composant) (net 278)) + (segment (start 131.572 77.343) (end 131.572 71.247) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 126.619 82.296) (end 131.572 77.343) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 108.712 82.296) (end 126.619 82.296) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 107.823 83.185) (end 108.712 82.296) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 107.5055 84.328) (end 107.5055 87.6935) (width 0.5588) (layer Composant) (net 278) (status 800)) + (segment (start 169.2275 130.302) (end 165.354 126.4285) (width 0.5588) (layer Composant) (net 278) (status 400)) + (segment (start 181.864 130.302) (end 169.2275 130.302) (width 0.5588) (layer Composant) (net 278) (status 800)) + (segment (start 131.572 71.247) (end 129.2225 71.247) (width 0.5588) (layer Composant) (net 278) (status 400)) + (segment (start 168.529 102.87) (end 176.149 102.87) (width 0.5588) (layer Composant) (net 278) (status C00)) + (segment (start 101.6635 111.252) (end 101.6635 113.03) (width 0.5588) (layer Composant) (net 278) (status 800)) + (segment (start 97.4725 112.0775) (end 97.4725 110.236) (width 0.5588) (layer Composant) (net 278) (status 400)) + (segment (start 97.409 112.141) (end 97.4725 112.0775) (width 0.5588) (layer Composant) (net 278)) + (segment (start 101.6635 113.03) (end 100.838 113.03) (width 0.5588) (layer Composant) (net 278)) + (segment (start 164.846 98.933) (end 163.449 100.33) (width 0.5588) (layer Composant) (net 278)) + (segment (start 164.846 98.806) (end 164.846 98.933) (width 0.5588) (layer Composant) (net 278) (status 800)) + (segment (start 101.854 113.792) (end 102.743 113.792) (width 0.5588) (layer Composant) (net 278) (status 400)) + (segment (start 101.6635 113.6015) (end 101.854 113.792) (width 0.5588) (layer Composant) (net 278)) + (segment (start 101.6635 113.03) (end 101.6635 113.6015) (width 0.5588) (layer Composant) (net 278)) + (segment (start 186.817 90.678) (end 189.23 88.265) (width 0.5588) (layer 3.3V_layer) (net 278) (status 400)) + (segment (start 185.547 90.678) (end 186.817 90.678) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 183.769 93.218) (end 185.547 90.678) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 183.769 101.854) (end 183.769 93.218) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 177.927 101.854) (end 183.769 101.854) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 176.911 102.87) (end 177.927 101.854) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 176.149 102.87) (end 176.911 102.87) (width 0.5588) (layer 3.3V_layer) (net 278) (status 800)) + (segment (start 146.4945 98.3615) (end 146.812 98.679) (width 0.5588) (layer Cuivre) (net 278)) + (segment (start 145.415 98.3615) (end 146.4945 98.3615) (width 0.5588) (layer Cuivre) (net 278) (status 800)) + (segment (start 145.6055 105.41) (end 145.288 105.7275) (width 0.5588) (layer Cuivre) (net 278) (status 400)) + (segment (start 146.812 105.41) (end 145.6055 105.41) (width 0.5588) (layer Cuivre) (net 278)) + (segment (start 130.937 91.3765) (end 130.8735 91.44) (width 0.5588) (layer Cuivre) (net 278) (status 400)) + (segment (start 130.937 89.916) (end 130.937 91.3765) (width 0.5588) (layer Cuivre) (net 278)) + (segment (start 108.585 109.855) (end 112.522 109.855) (width 0.5588) (layer Composant) (net 278) (status 400)) + (segment (start 108.0135 110.4265) (end 108.585 109.855) (width 0.5588) (layer Composant) (net 278)) + (segment (start 108.0135 114.1095) (end 108.0135 110.4265) (width 0.5588) (layer Composant) (net 278)) + (segment (start 107.95 114.173) (end 108.0135 114.1095) (width 0.5588) (layer Composant) (net 278)) + (segment (start 130.8735 89.916) (end 130.937 89.916) (width 0.5588) (layer Composant) (net 278)) + (segment (start 139.827 90.551) (end 143.129 93.853) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 133.096 90.551) (end 139.827 90.551) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 130.8862 93.726) (end 130.3782 93.726) (width 0.254) (layer Composant) (net 278) (status C00)) + (segment (start 123.444 97.282) (end 121.0945 97.282) (width 0.5588) (layer Composant) (net 278) (status 400)) + (segment (start 125.17374 99.01174) (end 123.444 97.282) (width 0.5588) (layer Composant) (net 278)) + (segment (start 125.349 98.8695) (end 125.17374 99.01174) (width 0.5588) (layer Composant) (net 278) (status 800)) + (segment (start 157.734 95.758) (end 157.734 97.536) (width 0.5588) (layer Cuivre) (net 278)) + (segment (start 161.163 92.329) (end 157.734 95.758) (width 0.5588) (layer Cuivre) (net 278)) + (segment (start 102.9335 98.933) (end 102.9335 96.647) (width 0.5588) (layer Composant) (net 278) (status C00)) + (segment (start 84.2645 121.412) (end 84.2645 119.126) (width 0.5588) (layer Composant) (net 278) (status C00)) + (segment (start 126.0729 102.9716) (end 125.5395 103.505) (width 0.5588) (layer Composant) (net 278) (status 400)) + (segment (start 127.635 102.9716) (end 126.0729 102.9716) (width 0.254) (layer Composant) (net 278) (status 800)) + (segment (start 170.6245 117.094) (end 172.9105 117.094) (width 0.5588) (layer Composant) (net 278) (status C00)) + (segment (start 137.93978 110.998) (end 138.4935 111.633) (width 0.254) (layer Composant) (net 278) (status 400)) + (segment (start 137.8966 110.9472) (end 137.93978 110.998) (width 0.254) (layer Composant) (net 278)) + (segment (start 137.8966 109.22) (end 137.8966 110.9472) (width 0.254) (layer Composant) (net 278) (status 800)) + (segment (start 84.2645 119.126) (end 85.09 119.126) (width 0.5588) (layer Composant) (net 278) (status 800)) + (segment (start 155.829 97.536) (end 157.734 97.536) (width 0.5588) (layer Composant) (net 278)) + (segment (start 155.067 98.298) (end 155.829 97.536) (width 0.5588) (layer Composant) (net 278)) + (segment (start 153.9875 98.298) (end 155.067 98.298) (width 0.5588) (layer Composant) (net 278) (status 800)) + (segment (start 182.8165 121.158) (end 182.8165 123.444) (width 0.5588) (layer Composant) (net 278) (status C00)) + (segment (start 175.641 115.824) (end 173.863 115.824) (width 0.5588) (layer Composant) (net 278)) + (segment (start 173.863 115.824) (end 173.863 116.1415) (width 0.5588) (layer Composant) (net 278)) + (segment (start 173.863 116.1415) (end 172.9105 117.094) (width 0.5588) (layer Composant) (net 278) (status 400)) + (segment (start 131.3942 109.22) (end 131.3942 110.0328) (width 0.254) (layer Composant) (net 278) (status 800)) + (segment (start 180.975 121.158) (end 178.689 118.872) (width 0.5588) (layer Composant) (net 278)) + (segment (start 182.8165 121.158) (end 180.975 121.158) (width 0.5588) (layer Composant) (net 278) (status 800)) + (segment (start 141.351 92.2655) (end 142.5575 91.059) (width 0.5588) (layer Composant) (net 278) (status 400)) + (segment (start 141.351 92.456) (end 141.351 92.2655) (width 0.5588) (layer Composant) (net 278)) + (segment (start 140.8684 92.9386) (end 141.351 92.456) (width 0.254) (layer Composant) (net 278)) + (segment (start 140.8684 93.726) (end 140.8684 92.9386) (width 0.254) (layer Composant) (net 278) (status 800)) + (segment (start 132.3848 108.1278) (end 132.3848 109.22) (width 0.254) (layer Composant) (net 278) (status 400)) + (segment (start 132.334 107.823) (end 132.3848 108.1278) (width 0.254) (layer Composant) (net 278)) + (segment (start 132.334 105.791) (end 132.334 107.823) (width 0.254) (layer Composant) (net 278)) + (segment (start 133.096 105.029) (end 132.334 105.791) (width 0.254) (layer Composant) (net 278)) + (segment (start 133.096 104.648) (end 133.096 105.029) (width 0.254) (layer Composant) (net 278)) + (segment (start 133.477 104.267) (end 133.096 104.648) (width 0.254) (layer Composant) (net 278)) + (segment (start 133.985 104.267) (end 133.477 104.267) (width 0.2) (layer Composant) (net 278)) + (segment (start 140.8684 93.726) (end 141.3764 93.726) (width 0.254) (layer Composant) (net 278) (status C00)) + (segment (start 138.4935 110.6805) (end 138.43 110.617) (width 0.5588) (layer Composant) (net 278)) + (segment (start 138.4935 111.633) (end 138.4935 110.6805) (width 0.5588) (layer Composant) (net 278) (status 800)) + (segment (start 146.4945 105.7275) (end 145.288 105.7275) (width 0.4) (layer Composant) (net 278)) + (segment (start 145.288 105.7275) (end 144.6784 104.9782) (width 0.254) (layer Composant) (net 278)) + (segment (start 144.6784 104.9782) (end 143.129 104.9782) (width 0.254) (layer Composant) (net 278) (status 400)) + (segment (start 146.812 105.41) (end 146.4945 105.7275) (width 0.4) (layer Composant) (net 278)) + (segment (start 143.002 93.726) (end 141.3764 93.726) (width 0.5588) (layer Composant) (net 278) (status 400)) + (segment (start 143.129 93.853) (end 143.002 93.726) (width 0.5588) (layer Composant) (net 278)) + (segment (start 146.812 97.536) (end 143.129 93.853) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 146.812 98.679) (end 146.812 97.536) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 127.889 95.25) (end 130.937 92.202) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 130.937 92.202) (end 130.937 89.916) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 127.889 97.155) (end 127.889 95.25) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 153.9875 93.853) (end 153.9875 96.012) (width 0.5588) (layer Composant) (net 278) (status C00)) + (via (at 98.298 100.584) (size 1.143) (layers Composant Cuivre) (net 278)) + (segment (start 98.3615 100.5205) (end 100.584 100.5205) (width 0.5588) (layer Composant) (net 278) (status 400)) + (segment (start 98.298 100.584) (end 98.3615 100.5205) (width 0.5588) (layer Composant) (net 278)) + (segment (start 84.2645 106.553) (end 84.2645 104.267) (width 0.5588) (layer Composant) (net 278) (status C00)) + (segment (start 102.1715 98.933) (end 100.584 100.5205) (width 0.5588) (layer Composant) (net 278) (status 400)) + (segment (start 102.9335 98.933) (end 102.1715 98.933) (width 0.5588) (layer Composant) (net 278) (status 800)) + (segment (start 153.9875 96.012) (end 153.9875 98.298) (width 0.5588) (layer Composant) (net 278) (status C00)) + (segment (start 161.163 91.313) (end 160.782 90.932) (width 0.5588) (layer Composant) (net 278) (status 400)) + (segment (start 161.163 92.329) (end 161.163 91.313) (width 0.5588) (layer Composant) (net 278)) + (segment (start 134.874 92.71) (end 134.874 93.726) (width 0.254) (layer Composant) (net 278) (status 400)) + (segment (start 135.5725 92.0115) (end 134.874 92.71) (width 0.254) (layer Composant) (net 278)) + (segment (start 135.4455 91.44) (end 135.5725 92.0115) (width 0.5588) (layer Composant) (net 278) (status 800)) + (segment (start 142.621 120.015) (end 148.59 120.015) (width 0.5588) (layer Composant) (net 278) (status 400)) + (via (at 141.859 119.253) (size 1.143) (layers Composant Cuivre) (net 278)) + (segment (start 141.859 119.253) (end 140.97 118.364) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 138.43 111.125) (end 138.43 110.617) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 140.97 113.665) (end 138.43 111.125) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 140.97 118.364) (end 140.97 113.665) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 141.859 119.253) (end 142.621 120.015) (width 0.5588) (layer Composant) (net 278)) + (segment (start 155.194 100.076) (end 157.734 97.536) (width 0.5588) (layer Cuivre) (net 278)) + (segment (start 149.479 100.076) (end 155.194 100.076) (width 0.5588) (layer Cuivre) (net 278)) + (segment (start 148.082 98.679) (end 149.479 100.076) (width 0.5588) (layer Cuivre) (net 278)) + (segment (start 146.812 98.679) (end 148.082 98.679) (width 0.5588) (layer Cuivre) (net 278)) + (segment (start 161.163 107.95) (end 168.275 115.062) (width 0.5588) (layer GND_layer) (net 278)) + (segment (start 161.163 92.329) (end 161.163 107.95) (width 0.5588) (layer GND_layer) (net 278)) + (segment (start 121.0945 97.8535) (end 121.666 98.425) (width 0.5588) (layer Composant) (net 278)) + (segment (start 121.0945 97.282) (end 121.0945 97.8535) (width 0.5588) (layer Composant) (net 278) (status 800)) + (segment (start 129.4384 102.9462) (end 127.635 102.9716) (width 0.254) (layer Composant) (net 278) (status 400)) + (segment (start 129.667 103.124) (end 129.4384 102.9462) (width 0.254) (layer Composant) (net 278)) + (segment (start 131.318 103.124) (end 129.667 103.124) (width 0.254) (layer Composant) (net 278)) + (segment (start 131.699 102.87) (end 131.318 103.124) (width 0.254) (layer Composant) (net 278)) + (segment (start 130.048 97.155) (end 127.889 97.155) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 131.699 98.806) (end 130.048 97.155) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 131.699 102.87) (end 131.699 98.806) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 122.936 97.155) (end 121.666 98.425) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 127.889 97.155) (end 122.936 97.155) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 130.3782 92.8878) (end 130.3782 93.726) (width 0.254) (layer Composant) (net 278) (status 400)) + (segment (start 130.8735 92.3925) (end 130.3782 92.8878) (width 0.254) (layer Composant) (net 278)) + (segment (start 130.8735 89.9795) (end 130.8735 92.3925) (width 0.254) (layer Composant) (net 278)) + (segment (start 125.7808 99.4664) (end 125.349 98.8695) (width 0.5588) (layer Composant) (net 278) (status 400)) + (segment (start 127.635 99.4664) (end 125.7808 99.4664) (width 0.254) (layer Composant) (net 278) (status 800)) + (segment (start 145.288 98.679) (end 146.812 98.679) (width 0.5588) (layer Composant) (net 278)) + (segment (start 145.0086 98.9584) (end 145.288 98.679) (width 0.254) (layer Composant) (net 278)) + (segment (start 143.129 98.9584) (end 145.0086 98.9584) (width 0.254) (layer Composant) (net 278) (status 800)) + (segment (start 170.6245 115.8875) (end 170.6245 117.094) (width 0.5588) (layer Composant) (net 278) (status 400)) + (segment (start 169.799 115.062) (end 170.6245 115.8875) (width 0.5588) (layer Composant) (net 278)) + (segment (start 168.275 115.062) (end 169.799 115.062) (width 0.5588) (layer Composant) (net 278)) + (segment (start 121.158 95.885) (end 121.0945 97.282) (width 0.5588) (layer Composant) (net 278) (status 400)) + (segment (start 117.094 91.821) (end 121.158 95.885) (width 0.5588) (layer Composant) (net 278)) + (segment (start 110.49 91.821) (end 117.094 91.821) (width 0.5588) (layer Composant) (net 278)) + (segment (start 107.315 94.996) (end 110.49 91.821) (width 0.5588) (layer Composant) (net 278)) + (segment (start 103.251 94.996) (end 107.315 94.996) (width 0.5588) (layer Composant) (net 278)) + (segment (start 102.9335 95.3135) (end 103.251 94.996) (width 0.5588) (layer Composant) (net 278)) + (segment (start 102.9335 96.647) (end 102.9335 95.3135) (width 0.5588) (layer Composant) (net 278) (status 800)) + (segment (start 77.597 117.729) (end 76.327 116.459) (width 0.5588) (layer 3.3V_layer) (net 278) (status 400)) + (segment (start 83.058 117.729) (end 77.597 117.729) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 83.82 116.967) (end 83.058 117.729) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 96.774 112.141) (end 96.012 111.379) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 97.409 112.141) (end 96.774 112.141) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 96.012 111.379) (end 89.789 111.379) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 85.217 115.57) (end 83.82 116.967) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 143.129 80.899) (end 143.129 93.853) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 146.05 77.978) (end 143.129 80.899) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 146.05 74.676) (end 146.05 77.978) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 161.544 107.696) (end 161.544 106.807) (width 0.5588) (layer Composant) (net 278) (status 800)) + (segment (start 161.544 105.7275) (end 161.3535 105.537) (width 0.5588) (layer Composant) (net 278) (status 400)) + (segment (start 161.544 106.807) (end 161.544 105.7275) (width 0.5588) (layer Composant) (net 278)) + (segment (start 134.112 88.392) (end 132.461 88.392) (width 0.5588) (layer Composant) (net 278)) + (segment (start 132.461 88.392) (end 130.937 89.916) (width 0.5588) (layer Composant) (net 278)) + (segment (start 135.4455 91.44) (end 135.4455 89.7255) (width 0.5588) (layer Composant) (net 278) (status 800)) + (segment (start 135.4455 89.7255) (end 134.112 88.392) (width 0.5588) (layer Composant) (net 278)) + (segment (start 130.937 89.916) (end 130.8735 89.9795) (width 0.5588) (layer Composant) (net 278)) + (segment (start 138.43 110.617) (end 138.938 110.109) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 137.668 104.267) (end 133.985 104.267) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 139.954 106.553) (end 137.668 104.267) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 139.954 109.093) (end 139.954 106.553) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 138.938 110.109) (end 139.954 109.093) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 145.288 104.394) (end 146.304 105.41) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 145.288 99.187) (end 145.288 104.394) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 145.796 98.679) (end 145.288 99.187) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 146.812 98.679) (end 145.796 98.679) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 145.288 105.41) (end 146.304 105.41) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 143.891 106.807) (end 145.288 105.41) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 143.891 109.093) (end 143.891 106.807) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 142.875 110.109) (end 143.891 109.093) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 138.938 110.109) (end 142.875 110.109) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 146.304 105.41) (end 146.812 105.41) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 130.8735 89.916) (end 130.8735 89.9795) (width 0.5588) (layer Composant) (net 278)) + (segment (start 153.416 106.426) (end 155.448 104.394) (width 0.5588) (layer Composant) (net 278)) + (segment (start 153.416 109.093) (end 153.416 106.426) (width 0.5588) (layer Composant) (net 278)) + (segment (start 153.543 109.22) (end 153.416 109.093) (width 0.5588) (layer Composant) (net 278) (status 800)) + (segment (start 161.036 104.394) (end 157.48 104.394) (width 0.5588) (layer Composant) (net 278)) + (segment (start 157.48 104.394) (end 155.448 104.394) (width 0.5588) (layer Composant) (net 278)) + (segment (start 194.691 125.222) (end 194.6783 122.7455) (width 0.254) (layer Composant) (net 278) (status 400)) + (via (at 192.33388 123.84532) (size 1.143) (layers Composant Cuivre) (net 278)) + (segment (start 192.33388 123.84532) (end 192.33388 113.6396) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 192.46088 113.5126) (end 192.33388 113.6396) (width 0.5588) (layer 3.3V_layer) (net 278)) + (via (at 204.1779 121.24182) (size 1.143) (layers Composant Cuivre) (net 278)) + (segment (start 204.1779 121.24182) (end 205.6384 121.24182) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 205.6384 121.24182) (end 205.6511 121.22912) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 204.1779 122.7455) (end 204.1779 121.24182) (width 0.254) (layer Composant) (net 278) (status 800)) + (segment (start 190.9445 110.0074) (end 192.00368 110.0074) (width 0.254) (layer Composant) (net 278) (status 800)) + (segment (start 190.9445 109.5121) (end 191.86144 109.5121) (width 0.2032) (layer Composant) (net 278) (status 800)) + (segment (start 193.3321 109.5121) (end 193.675 109.855) (width 0.5588) (layer Composant) (net 278)) + (segment (start 191.86144 109.5121) (end 193.3321 109.5121) (width 0.2032) (layer Composant) (net 278)) + (segment (start 192.00368 109.65434) (end 192.00368 110.0074) (width 0.5588) (layer Composant) (net 278)) + (segment (start 191.86144 109.5121) (end 192.00368 109.65434) (width 0.254) (layer Composant) (net 278)) + (segment (start 212.9155 103.0097) (end 211.85632 103.0097) (width 0.254) (layer Composant) (net 278) (status 800)) + (segment (start 211.41436 102.56774) (end 211.85632 103.0097) (width 0.5588) (layer Composant) (net 278)) + (via (at 211.40928 113.5126) (size 1.143) (layers Composant Cuivre) (net 278)) + (segment (start 211.40928 113.5126) (end 212.4456 113.5126) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 212.4456 113.5126) (end 212.979 114.046) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 212.9155 113.5126) (end 211.40928 113.5126) (width 0.254) (layer Composant) (net 278) (status 800)) + (segment (start 195.072 109.855) (end 195.072 110.90148) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 195.072 110.90148) (end 192.46088 113.5126) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 195.072 107.315) (end 195.072 109.855) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 194.8815 107.1245) (end 195.072 107.315) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 193.167 107.1245) (end 194.8815 107.1245) (width 0.5588) (layer 3.3V_layer) (net 278)) + (via (at 193.167 107.1245) (size 1.143) (layers Composant Cuivre) (net 278)) + (segment (start 192.89268 107.1245) (end 192.70218 107.315) (width 0.5588) (layer Cuivre) (net 278)) + (segment (start 193.167 107.1245) (end 192.89268 107.1245) (width 0.5588) (layer Cuivre) (net 278)) + (segment (start 191.9605 107.315) (end 192.70218 107.315) (width 0.5588) (layer Cuivre) (net 278) (status 800)) + (segment (start 199.009 102.97668) (end 199.009 101.7905) (width 0.5588) (layer Cuivre) (net 278) (status 400)) + (segment (start 205.359 121.52122) (end 205.359 122.4915) (width 0.5588) (layer Cuivre) (net 278) (status 400)) + (via (at 205.6511 121.22912) (size 1.143) (layers Composant Cuivre) (net 278)) + (segment (start 205.6511 121.22912) (end 205.6511 119.9769) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 206.375 119.253) (end 205.6511 119.9769) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 205.6511 121.22912) (end 205.359 121.52122) (width 0.5588) (layer Cuivre) (net 278)) + (segment (start 220.04274 63.5) (end 223.52 63.5) (width 0.5588) (layer 3.3V_layer) (net 278) (status 400)) + (segment (start 220.04274 63.5) (end 218.44 65.10274) (width 0.5588) (layer 3.3V_layer) (net 278)) + (via (at 218.44 65.10274) (size 1.143) (layers Composant Cuivre) (net 278)) + (segment (start 218.44 66.3575) (end 218.44 65.10274) (width 0.5588) (layer Composant) (net 278) (status 800)) + (segment (start 158.623 96.647) (end 158.623 95.8215) (width 0.5588) (layer Composant) (net 278) (status 400)) + (segment (start 157.734 97.536) (end 158.623 96.647) (width 0.5588) (layer Composant) (net 278)) + (segment (start 190.5 100.75418) (end 190.5 100.0125) (width 0.5588) (layer Cuivre) (net 278) (status 400)) + (via (at 190.04788 101.2063) (size 1.143) (layers Composant Cuivre) (net 278)) + (segment (start 190.04788 101.2063) (end 190.04788 101.78288) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 190.04788 101.78288) (end 191.24168 102.97668) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 199.009 102.97668) (end 191.24168 102.97668) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 190.5 100.75418) (end 190.04788 101.2063) (width 0.5588) (layer Cuivre) (net 278)) + (segment (start 192.46088 113.5126) (end 190.9445 113.5126) (width 0.254) (layer Composant) (net 278) (status 400)) + (segment (start 191.9605 114.01298) (end 191.9605 115.189) (width 0.5588) (layer Cuivre) (net 278) (status 400)) + (segment (start 192.46088 113.5126) (end 191.9605 114.01298) (width 0.5588) (layer Cuivre) (net 278)) + (segment (start 199.1741 102.81158) (end 199.1741 100.7745) (width 0.254) (layer Composant) (net 278) (status 400)) + (segment (start 199.009 102.97668) (end 199.1741 102.81158) (width 0.5588) (layer Composant) (net 278)) + (segment (start 206.375 119.253) (end 208.57464 119.253) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 200.56348 119.79148) (end 201.10196 119.253) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 200.56348 121.0691) (end 200.56348 119.79148) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 201.10196 119.253) (end 206.375 119.253) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 208.57464 119.253) (end 209.73288 118.09476) (width 0.5588) (layer 3.3V_layer) (net 278)) + (via (at 200.56348 121.0691) (size 1.143) (layers Composant Cuivre) (net 278)) + (segment (start 201.2442 121.74982) (end 201.422 121.74982) (width 0.5588) (layer Cuivre) (net 278)) + (segment (start 200.56348 121.0691) (end 201.2442 121.74982) (width 0.5588) (layer Cuivre) (net 278)) + (segment (start 201.422 122.4915) (end 201.422 121.74982) (width 0.5588) (layer Cuivre) (net 278) (status 800)) + (segment (start 202.946 102.53218) (end 203.454 102.53218) (width 0.5588) (layer Cuivre) (net 278)) + (segment (start 203.454 102.53218) (end 203.454 101.7905) (width 0.5588) (layer Cuivre) (net 278) (status 400)) + (via (at 202.48118 102.997) (size 1.143) (layers Composant Cuivre) (net 278)) + (segment (start 199.009 102.97668) (end 202.46086 102.97668) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 202.46086 102.97668) (end 202.48118 102.997) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 202.48118 102.997) (end 202.946 102.53218) (width 0.5588) (layer Cuivre) (net 278)) + (segment (start 206.83474 109.98708) (end 206.83474 118.79326) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 206.375 119.253) (end 206.83474 118.79326) (width 0.5588) (layer 3.3V_layer) (net 278)) + (via (at 206.83474 109.98708) (size 1.143) (layers Composant Cuivre) (net 278)) + (segment (start 207.28432 109.5375) (end 208.28 109.5375) (width 0.5588) (layer Cuivre) (net 278) (status 400)) + (segment (start 206.83474 109.98708) (end 207.28432 109.5375) (width 0.5588) (layer Cuivre) (net 278)) + (segment (start 209.33156 102.56774) (end 209.296 102.53218) (width 0.5588) (layer Cuivre) (net 278)) + (segment (start 211.41436 102.56774) (end 209.33156 102.56774) (width 0.5588) (layer Cuivre) (net 278)) + (segment (start 209.296 101.7905) (end 209.296 102.53218) (width 0.5588) (layer Cuivre) (net 278) (status 800)) + (segment (start 209.60842 118.09476) (end 209.27568 118.4275) (width 0.5588) (layer Cuivre) (net 278)) + (segment (start 209.73288 118.09476) (end 209.60842 118.09476) (width 0.5588) (layer Cuivre) (net 278)) + (segment (start 208.28 118.4275) (end 209.27568 118.4275) (width 0.5588) (layer Cuivre) (net 278) (status 800)) + (segment (start 131.2545 113.919) (end 132.9055 112.268) (width 0.5588) (layer Composant) (net 278) (status 400)) + (segment (start 130.556 113.919) (end 131.2545 113.919) (width 0.5588) (layer Composant) (net 278)) + (segment (start 130.048 113.411) (end 130.556 113.919) (width 0.5588) (layer Composant) (net 278)) + (segment (start 130.048 111.125) (end 130.048 113.411) (width 0.5588) (layer Composant) (net 278)) + (segment (start 130.175 110.998) (end 130.048 111.125) (width 0.5588) (layer Composant) (net 278)) + (segment (start 130.429 110.998) (end 130.175 110.998) (width 0.5588) (layer Composant) (net 278)) + (segment (start 178.689 118.872) (end 175.641 115.824) (width 0.5588) (layer Composant) (net 278)) + (via (at 211.40928 110.0074) (size 1.143) (layers Composant Cuivre) (net 278)) + (segment (start 211.40928 110.0074) (end 211.40928 110.06328) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 211.40928 110.06328) (end 212.979 111.633) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 212.979 114.046) (end 212.979 114.84864) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 212.979 111.633) (end 212.979 114.046) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 212.979 114.84864) (end 209.73288 118.09476) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 212.9155 110.0074) (end 211.40928 110.0074) (width 0.254) (layer Composant) (net 278) (status 800)) + (segment (start 210.31454 117.5131) (end 212.9155 117.5131) (width 0.254) (layer Composant) (net 278) (status 400)) + (segment (start 209.73288 118.09476) (end 210.31454 117.5131) (width 0.5588) (layer Composant) (net 278)) + (segment (start 88.9 103.505) (end 88.9 100.33) (width 0.5588) (layer 3.3V_layer) (net 278) (status 400)) + (segment (start 90.805 105.41) (end 88.9 103.505) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 97.409 112.141) (end 97.409 107.188) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 97.409 107.188) (end 95.631 105.41) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 131.3942 110.0328) (end 130.429 110.998) (width 0.254) (layer Composant) (net 278)) + (segment (start 95.631 105.41) (end 90.805 105.41) (width 0.5588) (layer 3.3V_layer) (net 278)) + (via (at 84.582 102.235) (size 1.143) (layers Composant Cuivre) (net 278)) + (segment (start 84.2645 102.5525) (end 84.582 102.235) (width 0.5588) (layer Composant) (net 278)) + (segment (start 84.2645 104.267) (end 84.2645 102.5525) (width 0.5588) (layer Composant) (net 278) (status 800)) + (segment (start 86.995 102.235) (end 88.9 100.33) (width 0.5588) (layer 3.3V_layer) (net 278) (status 400)) + (segment (start 84.582 102.235) (end 86.995 102.235) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 90.17 99.06) (end 88.9 100.33) (width 0.5588) (layer 3.3V_layer) (net 278) (status 400)) + (segment (start 92.71 99.06) (end 90.17 99.06) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 93.472 98.298) (end 92.71 99.06) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 97.155 87.757) (end 95.25 87.757) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 95.25 87.757) (end 93.472 89.535) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 93.472 89.535) (end 93.472 98.298) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 89.154 100.584) (end 88.9 100.33) (width 0.5588) (layer 3.3V_layer) (net 278) (status 400)) + (segment (start 98.298 100.584) (end 89.154 100.584) (width 0.5588) (layer 3.3V_layer) (net 278)) (zone (net 278) (net_name VDD) (layer 3.3V_layer) (tstamp 4783A2CD) (hatch edge 0.508) (connect_pads (clearance 0.508)) From d6a8696a9908f90b9240bd2124609e3e31a987a1 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Sun, 6 Jul 2014 11:59:26 -0500 Subject: [PATCH 553/741] typo on B_CrtYd, F_CrtYd, B_Fab, F_Fab --- common/lset.cpp | 8 ++++---- include/layers_id_colors_and_visibility.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common/lset.cpp b/common/lset.cpp index dcb22e3b3d..02a2aae458 100644 --- a/common/lset.cpp +++ b/common/lset.cpp @@ -129,10 +129,10 @@ const wxChar* LSET::Name( LAYER_ID aLayerId ) case Margin: txt = wxT( "Margin" ); break; // Footprint - case F_CrtYd: txt = wxT( "F_CrtYd" ); break; - case B_CrtYd: txt = wxT( "B_CrtYd" ); break; - case F_Fab: txt = wxT( "F_Fab" ); break; - case B_Fab: txt = wxT( "B_Fab" ); break; + case F_CrtYd: txt = wxT( "F.CrtYd" ); break; + case B_CrtYd: txt = wxT( "B.CrtYd" ); break; + case F_Fab: txt = wxT( "F.Fab" ); break; + case B_Fab: txt = wxT( "B.Fab" ); break; default: wxASSERT_MSG( 0, wxT( "aLayerId out of range" ) ); diff --git a/include/layers_id_colors_and_visibility.h b/include/layers_id_colors_and_visibility.h index bc74d75f0b..d972f61784 100644 --- a/include/layers_id_colors_and_visibility.h +++ b/include/layers_id_colors_and_visibility.h @@ -92,7 +92,7 @@ enum LAYER_ID In30_Cu, B_Cu, // 31 - B_Adhes, // 32 + B_Adhes, F_Adhes, B_Paste, From 84a14c3a5136d6fabf9bfc9ea11633cdd8cfd924 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Sun, 6 Jul 2014 23:12:04 -0500 Subject: [PATCH 554/741] back annotation when CVPCB and EESCHEMA are running under KICAD --- common/ptree.cpp | 6 +- cvpcb/readwrite_dlgs.cpp | 18 ++++ eeschema/backanno.cpp | 105 +++++++++++++++++++---- eeschema/cross-probing.cpp | 12 +++ include/fp_lib_table.h | 3 - include/mail_type.h | 4 +- include/wxEeschemaStruct.h | 4 +- kicad/files-io.cpp | 19 +++-- pcbnew/cross-probing.cpp | 3 +- pcbnew/dialogs/dialog_netlist.cpp | 14 ++- pcbnew/files.cpp | 6 +- pcbnew/pcb_netlist.cpp | 137 ++++++++++++------------------ pcbnew/pcb_netlist.h | 44 +++------- 13 files changed, 224 insertions(+), 151 deletions(-) diff --git a/common/ptree.cpp b/common/ptree.cpp index 19cb21f94f..010d4b3f26 100644 --- a/common/ptree.cpp +++ b/common/ptree.cpp @@ -83,7 +83,11 @@ inline void scanAtom( PTREE* aTree, DSNLEXER* aLexer ) //D(printf( "%s: '%s'\n", __func__, key );) +#if 0 aTree->push_back( PTREE::value_type( key, PTREE() ) ); +#else + aTree->put_value( key ); +#endif } @@ -190,7 +194,7 @@ static void formatNode( OUTPUTFORMATTER* out, int aNestLevel, int aCtl, out->Print( aNestLevel, "(%s%s", out->Quotes( aKey ).c_str(), ctl & CTL_OMIT_NL ? "" : "\n" ); - if( aTree.data().size() ) // only xml typically uses "data()", not sexpr. + if( aTree.data().size() ) { out->Print( 0, " %s%s", out->Quotes( aTree.data() ).c_str(), diff --git a/cvpcb/readwrite_dlgs.cpp b/cvpcb/readwrite_dlgs.cpp index efcb59d0f7..c48d6dfe89 100644 --- a/cvpcb/readwrite_dlgs.cpp +++ b/cvpcb/readwrite_dlgs.cpp @@ -28,6 +28,7 @@ */ #include +#include #include #include #include @@ -343,6 +344,11 @@ int CVPCB_MAINFRAME::SaveCmpLinkFile( const wxString& aFullFileName ) if( !fn.HasExt() ) fn.SetExt( ComponentFileExtension ); +#if 0 // RHH 6-Jul-14: We did not auto generate the + // footprint table. And the dialog which does suppport editing does the saving. + // Besides, this is not the place to do this, it belies the name of this + // function. + // Save the project specific footprint library table. if( !Prj().PcbFootprintLibs()->IsEmpty( false ) ) { @@ -368,6 +374,8 @@ int CVPCB_MAINFRAME::SaveCmpLinkFile( const wxString& aFullFileName ) } } } +#endif + } if( !IsWritable( fn.GetFullPath() ) ) @@ -380,6 +388,16 @@ int CVPCB_MAINFRAME::SaveCmpLinkFile( const wxString& aFullFileName ) } wxString msg = wxString::Format( _("File %s saved"), GetChars( fn.GetFullPath() ) ); + + // Perhaps this replaces all of the above someday. + { + STRING_FORMATTER sf; + + m_netlist.FormatBackAnnotation( &sf ); + + Kiway().ExpressMail( FRAME_SCH, MAIL_BACKANNOTATE_FOOTPRINTS, sf.GetString() ); + } + SetStatusText( msg ); return 1; } diff --git a/eeschema/backanno.cpp b/eeschema/backanno.cpp index b72509d98b..4b704e44dc 100644 --- a/eeschema/backanno.cpp +++ b/eeschema/backanno.cpp @@ -42,15 +42,84 @@ #include #include +#include +#include +#include -bool SCH_EDIT_FRAME::ProcessCmpToFootprintLinkFile( wxString& aFullFilename, +void SCH_EDIT_FRAME::backAnnotateFootprints( const std::string& aChangedSetOfReferences ) throw( IO_ERROR ) +{ + // Build a flat list of components in schematic: + SCH_REFERENCE_LIST refs; + SCH_SHEET_LIST sheets; + bool isChanged = false; + + sheets.GetComponents( refs, false ); + + static const KEYWORD empty_keywords[1] = {}; + + DSNLEXER lexer( empty_keywords, 0, aChangedSetOfReferences, FROM_UTF8( __func__ ) ); + PTREE doc; + + Scan( &doc, &lexer ); + +#if defined(DEBUG) && 0 + STRING_FORMATTER sf; + Format( &sf, 0, 0, doc ); + printf( "%s: '%s'\n", __func__, sf.GetString().c_str() ); +#endif + + CPTREE& back_anno = doc.get_child( "back_annotation" ); + + for( PTREE::const_iterator ref = back_anno.begin(); ref != back_anno.end(); ++ref ) + { + wxASSERT( ref->first == "ref" ); + + wxString reference = (UTF8&) ref->second.data(); + wxString footprint = (UTF8) ref->second.get( "fpid" ); + + // DBG( printf( "%s: ref:%s fpid:%s\n", __func__, TO_UTF8( reference ), TO_UTF8( footprint ) ); ) + + // Search the component in the flat list + for( unsigned ii = 0; ii < refs.GetCount(); ++ii ) + { + if( Cmp_KEEPCASE( reference, refs[ii].GetRef() ) == 0 ) + { + // We have found a candidate. + // Note: it can be not unique (multiple parts per package) + // So we *do not* stop the search here + SCH_COMPONENT* component = refs[ii].GetComponent(); + SCH_FIELD* fpfield = component->GetField( FOOTPRINT ); + const wxString& oldfp = fpfield->GetText(); + + if( !oldfp && fpfield->IsVisible() ) + { + fpfield->SetVisible( false ); + } + + // DBG( printf("%s: ref:%s fpid:%s\n", __func__, TO_UTF8( refs[ii].GetRef() ), TO_UTF8( footprint ) );) + + fpfield->SetText( footprint ); + + if( oldfp != footprint ) + isChanged = true; + } + } + } + + if( isChanged ) + OnModify(); +} + + +bool SCH_EDIT_FRAME::ProcessCmpToFootprintLinkFile( const wxString& aFullFilename, bool aForceFieldsVisibleAttribute, bool aFieldsVisibleAttributeState ) { // Build a flat list of components in schematic: - SCH_REFERENCE_LIST referencesList; - SCH_SHEET_LIST SheetList; + SCH_REFERENCE_LIST referencesList; + SCH_SHEET_LIST SheetList; + SheetList.GetComponents( referencesList, false ); FILE* cmpFile = wxFopen( aFullFilename, wxT( "rt" ) ); @@ -71,7 +140,7 @@ bool SCH_EDIT_FRAME::ProcessCmpToFootprintLinkFile( wxString& aFullFilename, { buffer = FROM_UTF8( cmpFileReader.Line() ); - if( ! buffer.StartsWith( wxT("BeginCmp") ) ) + if( !buffer.StartsWith( wxT("BeginCmp") ) ) continue; // Begin component description. @@ -87,20 +156,17 @@ bool SCH_EDIT_FRAME::ProcessCmpToFootprintLinkFile( wxString& aFullFilename, // store string value, stored between '=' and ';' delimiters. value = buffer.AfterFirst( '=' ); - value = value.BeforeLast( ';'); + value = value.BeforeLast( ';' ); value.Trim(true); value.Trim(false); if( buffer.StartsWith( wxT("Reference") ) ) { reference = value; - continue; } - - if( buffer.StartsWith( wxT("IdModule =" ) ) ) + else if( buffer.StartsWith( wxT("IdModule =" ) ) ) { footprint = value; - continue; } } @@ -108,26 +174,29 @@ bool SCH_EDIT_FRAME::ProcessCmpToFootprintLinkFile( wxString& aFullFilename, // if the footprint name is not empty if( reference.IsEmpty() ) continue; + // Search the component in the flat list - for( unsigned ii = 0; ii < referencesList.GetCount(); ii++ ) + for( unsigned ii = 0; ii < referencesList.GetCount(); ii++ ) { - if( reference.CmpNoCase( referencesList[ii].GetRef() ) == 0 ) + if( Cmp_KEEPCASE( reference, referencesList[ii].GetRef() ) == 0 ) { // We have found a candidate. // Note: it can be not unique (multiple parts per package) // So we *do not* stop the search here - SCH_COMPONENT* component = referencesList[ii].GetComponent(); - SCH_FIELD * fpfield = component->GetField( FOOTPRINT ); + SCH_COMPONENT* component = referencesList[ii].GetComponent(); + SCH_FIELD* fpfield = component->GetField( FOOTPRINT ); + fpfield->SetText( footprint ); if( aForceFieldsVisibleAttribute ) { - component->GetField( FOOTPRINT ) + component->GetField( FOOTPRINT ) ->SetVisible( aFieldsVisibleAttributeState ); } } } } + return true; } @@ -170,10 +239,12 @@ bool SCH_EDIT_FRAME::LoadCmpToFootprintLinkFile() visible = response == wxYES; } - if( ! ProcessCmpToFootprintLinkFile( filename, changevisibility, visible ) ) + if( !ProcessCmpToFootprintLinkFile( filename, changevisibility, visible ) ) { - wxString msg; - msg.Printf( _( "Failed to open component-footprint link file <%s>" ), filename.GetData() ); + wxString msg = wxString::Format( _( + "Failed to open component-footprint link file '%s'" ), + filename.GetData() + ); DisplayError( this, msg ); return false; } diff --git a/eeschema/cross-probing.cpp b/eeschema/cross-probing.cpp index b8bd39884a..59697b5760 100644 --- a/eeschema/cross-probing.cpp +++ b/eeschema/cross-probing.cpp @@ -196,8 +196,20 @@ void SCH_EDIT_FRAME::KiwayMailIn( KIWAY_EXPRESS& mail ) ExecuteRemoteCommand( payload.c_str() ); break; + case MAIL_BACKANNOTATE_FOOTPRINTS: + try + { + backAnnotateFootprints( payload ); + } + catch( const IO_ERROR& ioe ) + { + DBG( printf( "%s: ioe:%s\n", __func__, TO_UTF8( ioe.errorText ) );) + } + break; + // many many others. } } + diff --git a/include/fp_lib_table.h b/include/fp_lib_table.h index 4a2b822137..90ff3a9106 100644 --- a/include/fp_lib_table.h +++ b/include/fp_lib_table.h @@ -39,9 +39,6 @@ class OUTPUTFORMATTER; class MODULE; class FP_LIB_TABLE_LEXER; class FPID; -class NETLIST; -class REPORTER; -class SEARCH_STACK; /** * Class FP_LIB_TABLE diff --git a/include/mail_type.h b/include/mail_type.h index 9f30d3e284..4b4ced967f 100644 --- a/include/mail_type.h +++ b/include/mail_type.h @@ -10,7 +10,9 @@ */ enum MAIL_T { - MAIL_CROSS_PROBE, ///< PCB<->SCH, CVPCB->SCH cross-probing. + MAIL_CROSS_PROBE, ///< PCB<->SCH, CVPCB->SCH cross-probing. + MAIL_BACKANNOTATE_FOOTPRINTS, ///< CVPCB->SCH footprint stuffing at cvpcb termination + }; #endif // MAIL_TYPE_H_ diff --git a/include/wxEeschemaStruct.h b/include/wxEeschemaStruct.h index ef71d06b96..247b79a35a 100644 --- a/include/wxEeschemaStruct.h +++ b/include/wxEeschemaStruct.h @@ -202,6 +202,8 @@ protected: void updateFindReplaceView( wxFindDialogEvent& aEvent ); + void backAnnotateFootprints( const std::string& aChangedSetOfReferences ) throw( IO_ERROR ); + public: SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ); ~SCH_EDIT_FRAME(); @@ -709,7 +711,7 @@ public: * @param aFieldsVisibleAttributeState = footprint field flag visible new state * @return bool = true if success. */ - bool ProcessCmpToFootprintLinkFile( wxString& aFullFilename, + bool ProcessCmpToFootprintLinkFile( const wxString& aFullFilename, bool aForceFieldsVisibleAttribute, bool aFieldsVisibleAttributeState ); diff --git a/kicad/files-io.cpp b/kicad/files-io.cpp index f0eed253e2..018726654b 100644 --- a/kicad/files-io.cpp +++ b/kicad/files-io.cpp @@ -130,19 +130,17 @@ void KICAD_MANAGER_FRAME::OnUnarchiveFiles( wxCommandEvent& event ) void KICAD_MANAGER_FRAME::OnArchiveFiles( wxCommandEvent& event ) { - /* List of file extensions to save. */ + // List of file extensions to save. static const wxChar* extentionList[] = { wxT( "*.sch" ), wxT( "*.lib" ), wxT( "*.mod" ), wxT( "*.cmp" ), wxT( "*.brd" ), wxT( "*.kicad_pcb" ), wxT( "*.gbr" ), wxT( "*.net" ), wxT( "*.pro" ), wxT( "*.pho" ), wxT( "*.py" ), wxT( "*.pdf" ), wxT( "*.txt" ), wxT( "*.dcm" ), wxT( "*.kicad_wks" ), - NULL }; - wxString msg; - size_t i; - wxFileName fileName = m_ProjectFileName; - wxString oldPath = wxGetCwd(); + wxString msg; + wxFileName fileName = m_ProjectFileName; + wxString oldPath = wxGetCwd(); fileName.SetExt( wxT( "zip" ) ); @@ -153,7 +151,6 @@ void KICAD_MANAGER_FRAME::OnArchiveFiles( wxCommandEvent& event ) if( dlg.ShowModal() == wxID_CANCEL ) return; - wxFileName zip = dlg.GetPath(); wxString currdirname = wxT( "." ); @@ -172,17 +169,21 @@ void KICAD_MANAGER_FRAME::OnArchiveFiles( wxCommandEvent& event ) // Build list of filenames to put in zip archive wxString currFilename; int zipBytesCnt = 0; // Size of the zip file - for( i = 0; extentionList[i] != 0; i++ ) + + for( unsigned i = 0; i" ), GetChars( currFilename ) ); PrintMsg( msg ); + // Read input file and put it in zip file: - wxFSFile * infile = fsfile.OpenFile(currFilename); + wxFSFile* infile = fsfile.OpenFile(currFilename); + if( infile ) { zipstream.PutNextEntry( currFilename, infile->GetModificationTime() ); diff --git a/pcbnew/cross-probing.cpp b/pcbnew/cross-probing.cpp index 05f12dc766..8000d05adf 100644 --- a/pcbnew/cross-probing.cpp +++ b/pcbnew/cross-probing.cpp @@ -227,7 +227,8 @@ void PCB_EDIT_FRAME::KiwayMailIn( KIWAY_EXPRESS& mail ) break; // many many others. - + default: + ; } } diff --git a/pcbnew/dialogs/dialog_netlist.cpp b/pcbnew/dialogs/dialog_netlist.cpp index 2fc522383b..728af0acec 100644 --- a/pcbnew/dialogs/dialog_netlist.cpp +++ b/pcbnew/dialogs/dialog_netlist.cpp @@ -27,7 +27,6 @@ */ #include -//#include #include #include #include @@ -435,9 +434,16 @@ bool DIALOG_NETLIST::verifyFootprints( const wxString& aNetlistFilename, #if defined( DEBUG ) - m_MessageWindow->Clear(); - WX_TEXT_CTRL_REPORTER rpt( m_MessageWindow ); - netlist.Show( 0, rpt ); + { + m_MessageWindow->Clear(); + WX_TEXT_CTRL_REPORTER rpt( m_MessageWindow ); + + STRING_FORMATTER sf; + + netlist.Format( &sf, 0 ); + + rpt.Report( FROM_UTF8( sf.GetString().c_str() ) ); + } #endif BOARD* pcb = m_parent->GetBoard(); diff --git a/pcbnew/files.cpp b/pcbnew/files.cpp index b5693e0e6b..0a31eb956c 100644 --- a/pcbnew/files.cpp +++ b/pcbnew/files.cpp @@ -608,6 +608,9 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool aCreateBackupF GetChars( pcbFileName.GetFullPath() ) )) ) return false; +#if 0 // RHH 6-Jul-14: I see no plausible reason to do this. We did not auto generate the + // footprint table. And the dialog which does suppport editing does the saving. + // Save the project specific footprint library table. if( !Prj().PcbFootprintLibs()->IsEmpty( false ) ) { @@ -633,6 +636,8 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool aCreateBackupF } } } +#endif + } else { @@ -640,7 +645,6 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool aCreateBackupF if( pcbFileName.GetExt() == LegacyPcbFileExtension ) pluginType = IO_MGR::LEGACY; - else { pluginType = IO_MGR::KICAD; pcbFileName.SetExt( KiCadPcbFileExtension ); diff --git a/pcbnew/pcb_netlist.cpp b/pcbnew/pcb_netlist.cpp index 7e1ee53aa1..70c2d0e7f3 100644 --- a/pcbnew/pcb_netlist.cpp +++ b/pcbnew/pcb_netlist.cpp @@ -35,32 +35,14 @@ #include -#if defined(DEBUG) -/** - * Function NestedSpace - * outputs nested space for pretty indenting. - * @param aNestLevel The nest count - * @param aReporter A reference to a #REPORTER object where to output. - * @return REPORTER& for continuation. - **/ -static REPORTER& NestedSpace( int aNestLevel, REPORTER& aReporter ) +int COMPONENT_NET::Format( OUTPUTFORMATTER* aOut, int aNestLevel, int aCtl ) { - for( int i = 0; i < aNestLevel; ++i ) - aReporter.Report( wxT( " " ) ); - - return aReporter; + return aOut->Print( aNestLevel, "(pin_net %s %s)", + aOut->Quotew( m_pinName ).c_str(), + aOut->Quotew( m_netName ).c_str() ); } -void COMPONENT_NET::Show( int aNestLevel, REPORTER& aReporter ) -{ - NestedSpace( aNestLevel, aReporter ); - aReporter.Report( wxString::Format( wxT( "\n" ), - GetChars( m_pinName ), GetChars( m_netName ) ) ); -} -#endif - - void COMPONENT::SetModule( MODULE* aModule ) { m_footprint.reset( aModule ); @@ -108,51 +90,66 @@ bool COMPONENT::MatchesFootprintFilters( const wxString& aFootprintName ) const } -#if defined(DEBUG) -void COMPONENT::Show( int aNestLevel, REPORTER& aReporter ) +void COMPONENT::Format( OUTPUTFORMATTER* aOut, int aNestLevel, int aCtl ) { - NestedSpace( aNestLevel, aReporter ); - aReporter.Report( wxT( "\n" ) ); - NestedSpace( aNestLevel+1, aReporter ); - aReporter.Report( wxString::Format( wxT( "\n" ), - GetChars( m_reference ), GetChars( m_value ), - GetChars( m_name ), GetChars( m_library ), - m_fpid.Format().c_str(), - GetChars( m_timeStamp ) ) ); + int nl = aNestLevel; - if( !m_footprintFilters.IsEmpty() ) + aOut->Print( nl, "(ref %s ", aOut->Quotew( m_reference ).c_str() ); + aOut->Print( 0, "(fpid %s)\n", m_fpid.Format().c_str() ); + + if( ! ( aCtl & CTL_OMIT_EXTRA ) ) { - NestedSpace( aNestLevel+1, aReporter ); - aReporter.Report( wxT( "\n" ) ); + aOut->Print( nl+1, "(value %s)\n", aOut->Quotew( m_value ).c_str() ); + aOut->Print( nl+1, "(name %s)\n", aOut->Quotew( m_name ).c_str() ); + aOut->Print( nl+1, "(library %s)\n", aOut->Quotew( m_library ).c_str() ); + aOut->Print( nl+1, "(timestamp %s)\n", aOut->Quotew( m_timeStamp ).c_str() ); + } - for( unsigned i = 0; i < m_footprintFilters.GetCount(); i++ ) + if( !( aCtl & CTL_OMIT_FILTERS ) && m_footprintFilters.GetCount() ) + { + aOut->Print( nl+1, "(fp_filters" ); + + for( unsigned i = 0; i < m_footprintFilters.GetCount(); ++i ) + aOut->Print( 0, " %s", aOut->Quotew( m_footprintFilters[i] ).c_str() ); + + aOut->Print( 0, ")\n" ); + } + + if( !( aCtl & CTL_OMIT_NETS ) && m_nets.size() ) + { + int llen = aOut->Print( nl+1, "(nets " ); + + for( unsigned i = 0; i < m_nets.size(); ++i ) { - NestedSpace( aNestLevel+2, aReporter ); - aReporter.Report( wxString::Format( wxT( "<%s>\n" ), - GetChars( m_footprintFilters[i] ) ) ); + if( llen > 80 ) + { + aOut->Print( 0, "\n" ); + llen = aOut->Print( nl+1, " " ); + } + + llen += m_nets[i].Format( aOut, 0, aCtl ); } - NestedSpace( aNestLevel+1, aReporter ); - aReporter.Report( wxT( "\n" ) ); + aOut->Print( 0, ")\n" ); } - if( !m_nets.empty() ) - { - NestedSpace( aNestLevel+1, aReporter ); - aReporter.Report( wxT( "\n" ) ); - - for( unsigned i = 0; i < m_nets.size(); i++ ) - m_nets[i].Show( aNestLevel+3, aReporter ); - - NestedSpace( aNestLevel+1, aReporter ); - aReporter.Report( "\n" ); - } - - NestedSpace( aNestLevel, aReporter ); - aReporter.Report( "\n" ); + aOut->Print( nl, ")\n" ); // +} + + +void NETLIST::Format( OUTPUTFORMATTER* aOut, int aNestLevel, int aCtl ) +{ + int nl = aNestLevel; + + aOut->Print( nl, "(back_annotation\n" ); + + for( unsigned i = 0; i < m_components.size(); i++ ) + { + m_components[i].Format( aOut, nl+1, aCtl ); + } + + aOut->Print( nl, ")\n" ); } -#endif void NETLIST::AddComponent( COMPONENT* aComponent ) @@ -250,29 +247,3 @@ bool NETLIST::AllFootprintsLinked() const return true; } - -#if defined( DEBUG ) -void NETLIST::Show( int aNestLevel, REPORTER& aReporter ) -{ - NestedSpace( aNestLevel, aReporter ); - aReporter.Report( "\n" ); - - if( !m_components.empty() ) - { - NestedSpace( aNestLevel+1, aReporter ); - aReporter.Report( "\n" ); - - for( unsigned i = 0; i < m_components.size(); i++ ) - { - m_components[i].Show( aNestLevel+2, aReporter ); - } - - NestedSpace( aNestLevel+1, aReporter ); - - aReporter.Report( "\n" ); - } - - NestedSpace( aNestLevel, aReporter ); - aReporter.Report( "\n" ); -} -#endif diff --git a/pcbnew/pcb_netlist.h b/pcbnew/pcb_netlist.h index 58ab9bf17d..e48385c9fe 100644 --- a/pcbnew/pcb_netlist.h +++ b/pcbnew/pcb_netlist.h @@ -68,16 +68,7 @@ public: return m_pinName < aNet.m_pinName; } -#if defined(DEBUG) - /** - * Function Show - * is used to output the object tree, currently for debugging only. - * @param aNestLevel An aid to prettier tree indenting, and is the level - * of nesting of this object within the overall tree. - * @param aReporter A reference to a #REPORTER object to output to. - */ - virtual void Show( int aNestLevel, REPORTER& aReporter ); -#endif + int Format( OUTPUTFORMATTER* aOut, int aNestLevel, int aCtl ); }; @@ -192,16 +183,7 @@ public: bool FootprintChanged() const { return m_footprintChanged; } -#if defined(DEBUG) - /** - * Function Show - * is used to output the object tree, currently for debugging only. - * @param aNestLevel An aid to prettier tree indenting, and is the level - * of nesting of this object within the overall tree. - * @param aReporter A reference to a #REPORTER object to output to. - */ - virtual void Show( int aNestLevel, REPORTER& aReporter ); -#endif + void Format( OUTPUTFORMATTER* aOut, int aNestLevel, int aCtl ); }; @@ -348,16 +330,18 @@ public: */ bool AnyFootprintsChanged() const; -#if defined(DEBUG) - /** - * Function Show - * is used to output the object tree, currently for debugging only. - * @param aNestLevel An aid to prettier tree indenting, and is the level - * of nesting of this object within the overall tree. - * @param aReporter A reference to a #REPORTER object to output to. - */ - virtual void Show( int aNestLevel, REPORTER& aReporter ); -#endif + void Format( OUTPUTFORMATTER* aOut, int aNestLevel, int aCtl = 0 ); + +#define CTL_OMIT_EXTRA (1<<0) +#define CTL_OMIT_NETS (1<<1) +#define CTL_OMIT_FILTERS (1<<2) + +#define CTL_FOR_BACKANNO (CTL_OMIT_NETS | CTL_OMIT_FILTERS | CTL_OMIT_EXTRA) + + void FormatBackAnnotation( OUTPUTFORMATTER* aOut ) + { + Format( aOut, 0, CTL_FOR_BACKANNO ); + } }; From 86132ad16b3629252a717edc7b09f02cdfdd1785 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Sun, 6 Jul 2014 23:41:29 -0500 Subject: [PATCH 555/741] add aDocName to NETLIST::Format() --- pcbnew/pcb_netlist.cpp | 4 ++-- pcbnew/pcb_netlist.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pcbnew/pcb_netlist.cpp b/pcbnew/pcb_netlist.cpp index 70c2d0e7f3..db56251d8a 100644 --- a/pcbnew/pcb_netlist.cpp +++ b/pcbnew/pcb_netlist.cpp @@ -137,11 +137,11 @@ void COMPONENT::Format( OUTPUTFORMATTER* aOut, int aNestLevel, int aCtl ) } -void NETLIST::Format( OUTPUTFORMATTER* aOut, int aNestLevel, int aCtl ) +void NETLIST::Format( const char* aDocName, OUTPUTFORMATTER* aOut, int aNestLevel, int aCtl ) { int nl = aNestLevel; - aOut->Print( nl, "(back_annotation\n" ); + aOut->Print( nl, "(%s\n", aDocName ); for( unsigned i = 0; i < m_components.size(); i++ ) { diff --git a/pcbnew/pcb_netlist.h b/pcbnew/pcb_netlist.h index e48385c9fe..79cc26277e 100644 --- a/pcbnew/pcb_netlist.h +++ b/pcbnew/pcb_netlist.h @@ -330,7 +330,7 @@ public: */ bool AnyFootprintsChanged() const; - void Format( OUTPUTFORMATTER* aOut, int aNestLevel, int aCtl = 0 ); + void Format( const char* aDocName, OUTPUTFORMATTER* aOut, int aNestLevel, int aCtl = 0 ); #define CTL_OMIT_EXTRA (1<<0) #define CTL_OMIT_NETS (1<<1) @@ -340,7 +340,7 @@ public: void FormatBackAnnotation( OUTPUTFORMATTER* aOut ) { - Format( aOut, 0, CTL_FOR_BACKANNO ); + Format( "back_annotation", aOut, 0, CTL_FOR_BACKANNO ); } }; From c1814ad98ed53df7fe9f35b6e6f53264d413b5c0 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Mon, 7 Jul 2014 00:59:58 -0500 Subject: [PATCH 556/741] netlist_stuff --- pcbnew/dialogs/dialog_netlist.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pcbnew/dialogs/dialog_netlist.cpp b/pcbnew/dialogs/dialog_netlist.cpp index 728af0acec..ccbb6341af 100644 --- a/pcbnew/dialogs/dialog_netlist.cpp +++ b/pcbnew/dialogs/dialog_netlist.cpp @@ -432,7 +432,6 @@ bool DIALOG_NETLIST::verifyFootprints( const wxString& aNetlistFilename, return false; } - #if defined( DEBUG ) { m_MessageWindow->Clear(); @@ -440,7 +439,7 @@ bool DIALOG_NETLIST::verifyFootprints( const wxString& aNetlistFilename, STRING_FORMATTER sf; - netlist.Format( &sf, 0 ); + netlist.Format( "netlist_stuff", &sf, 0 ); rpt.Report( FROM_UTF8( sf.GetString().c_str() ) ); } From a3b421b02c771f30281c780ee60479871401143a Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Mon, 7 Jul 2014 01:04:53 -0500 Subject: [PATCH 557/741] backanno --- eeschema/backanno.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/eeschema/backanno.cpp b/eeschema/backanno.cpp index 4b704e44dc..f2fdcb3e27 100644 --- a/eeschema/backanno.cpp +++ b/eeschema/backanno.cpp @@ -98,11 +98,10 @@ void SCH_EDIT_FRAME::backAnnotateFootprints( const std::string& aChangedSetOfRef } // DBG( printf("%s: ref:%s fpid:%s\n", __func__, TO_UTF8( refs[ii].GetRef() ), TO_UTF8( footprint ) );) - - fpfield->SetText( footprint ); - if( oldfp != footprint ) isChanged = true; + + fpfield->SetText( footprint ); } } } From fb0045a898456271b8932b12bfe1256212c64a7e Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 7 Jul 2014 10:48:47 +0200 Subject: [PATCH 558/741] Bugfix: Bottom layer not correctly handled in (PNS) Interactive router. --- include/gal/graphics_abstraction_layer.h | 3 +++ include/layers_id_colors_and_visibility.h | 2 +- pcbnew/router/pns_layerset.h | 2 +- pcbnew/router/pns_line_placer.cpp | 8 ++++---- pcbnew/router/pns_router.cpp | 10 +++++----- pcbnew/router/router_preview_item.cpp | 7 +++---- pcbnew/router/router_preview_item.h | 4 ++-- 7 files changed, 19 insertions(+), 17 deletions(-) diff --git a/include/gal/graphics_abstraction_layer.h b/include/gal/graphics_abstraction_layer.h index d6dccd0d61..24f207f355 100644 --- a/include/gal/graphics_abstraction_layer.h +++ b/include/gal/graphics_abstraction_layer.h @@ -255,6 +255,9 @@ public: */ inline virtual void SetLayerDepth( double aLayerDepth ) { + assert( aLayerDepth <= depthRange.y ); + assert( aLayerDepth >= depthRange.x ); + layerDepth = aLayerDepth; } diff --git a/include/layers_id_colors_and_visibility.h b/include/layers_id_colors_and_visibility.h index d972f61784..c3dfd4b0ab 100644 --- a/include/layers_id_colors_and_visibility.h +++ b/include/layers_id_colors_and_visibility.h @@ -138,7 +138,7 @@ enum LAYER_ID #define LAST_COPPER_LAYER brain dead #define FIRST_LAYER brain dead #define NB_LAYERS use LAYER_ID_COUNT instead -#define NB_COPPER_LAYERS was always a max, not a number, use MAX_CU_COUNT now. +#define NB_COPPER_LAYERS was always a max, not a number, use MAX_CU_LAYERS now. */ diff --git a/pcbnew/router/pns_layerset.h b/pcbnew/router/pns_layerset.h index 7ba05d84ef..aed8761365 100644 --- a/pcbnew/router/pns_layerset.h +++ b/pcbnew/router/pns_layerset.h @@ -108,7 +108,7 @@ public: ///> Shortcut for comparisons/overlap tests static PNS_LAYERSET All() { - return PNS_LAYERSET( 0, 256 ); + return PNS_LAYERSET( 0, 64 ); } private: diff --git a/pcbnew/router/pns_line_placer.cpp b/pcbnew/router/pns_line_placer.cpp index e60729c90c..2c26df7c96 100644 --- a/pcbnew/router/pns_line_placer.cpp +++ b/pcbnew/router/pns_line_placer.cpp @@ -379,7 +379,7 @@ bool PNS_LINE_PLACER::handleViaPlacement( PNS_LINE& aHead ) if( !m_placingVia ) return true; - PNS_LAYERSET allLayers( 0, 15 ); + PNS_LAYERSET allLayers( 0, MAX_CU_LAYERS - 1 ); PNS_VIA v( aHead.CPoint( -1 ), allLayers, m_viaDiameter, m_viaDrill, aHead.Net() ); VECTOR2I force; @@ -439,7 +439,7 @@ bool PNS_LINE_PLACER::rhWalkOnly( const VECTOR2I& aP, PNS_LINE& aNewHead ) } else if( m_placingVia && viaOk ) { - PNS_LAYERSET allLayers( 0, 15 ); + PNS_LAYERSET allLayers( 0, MAX_CU_LAYERS - 1 ); PNS_VIA v1( walkFull.CPoint( -1 ), allLayers, m_viaDiameter, m_viaDrill ); walkFull.AppendVia( v1 ); } @@ -464,7 +464,7 @@ bool PNS_LINE_PLACER::rhMarkObstacles( const VECTOR2I& aP, PNS_LINE& aNewHead ) if( m_placingVia ) { - PNS_LAYERSET allLayers( 0, 15 ); + PNS_LAYERSET allLayers( 0, MAX_CU_LAYERS - 1 ); PNS_VIA v1( m_head.CPoint( -1 ), allLayers, m_viaDiameter, m_viaDrill ); m_head.AppendVia( v1 ); } @@ -507,7 +507,7 @@ bool PNS_LINE_PLACER::rhShoveOnly ( const VECTOR2I& aP, PNS_LINE& aNewHead ) if( m_placingVia ) { - PNS_LAYERSET allLayers( 0, 15 ); + PNS_LAYERSET allLayers( 0, MAX_CU_LAYERS - 1 ); PNS_VIA v1( l.CPoint( -1 ), allLayers, m_viaDiameter, m_viaDrill ); PNS_VIA v2( l2.CPoint( -1 ), allLayers, m_viaDiameter, m_viaDrill ); diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index 70e3c5d36a..8813a854f1 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -116,12 +116,12 @@ private: PNS_ITEM* PNS_ROUTER::syncPad( D_PAD* aPad ) { - PNS_LAYERSET layers( 0, 15 ); + PNS_LAYERSET layers( 0, MAX_CU_LAYERS - 1 ); switch( aPad->GetAttribute() ) { case PAD_STANDARD: - layers = PNS_LAYERSET( 0, 15 ); + layers = PNS_LAYERSET( 0, MAX_CU_LAYERS - 1 ); // TODO necessary? it is already initialized break; case PAD_SMD: @@ -191,7 +191,7 @@ PNS_ITEM* PNS_ROUTER::syncPad( D_PAD* aPad ) else delta = VECTOR2I( 0, ( sz.y - sz.x ) / 2 ); - SHAPE_SEGMENT* shape = new SHAPE_SEGMENT( c - delta, c + delta, + SHAPE_SEGMENT* shape = new SHAPE_SEGMENT( c - delta, c + delta, std::min( sz.x, sz.y ) ); solid->SetShape( shape ); } @@ -229,7 +229,7 @@ PNS_ITEM* PNS_ROUTER::syncVia( VIA* aVia ) { PNS_VIA* v = new PNS_VIA( aVia->GetPosition(), - PNS_LAYERSET( 0, 15 ), + PNS_LAYERSET( 0, MAX_CU_LAYERS - 1 ), aVia->GetWidth(), aVia->GetDrillValue(), aVia->GetNetCode() ); @@ -260,7 +260,7 @@ int PNS_ROUTER::NextCopperLayer( bool aUp ) l = 0; if( l < 0 ) - l = MAX_CU_LAYERS-1; + l = MAX_CU_LAYERS - 1; if( mask[l] ) return l; diff --git a/pcbnew/router/router_preview_item.cpp b/pcbnew/router/router_preview_item.cpp index 85a7062b5a..83e0a2f3a2 100644 --- a/pcbnew/router/router_preview_item.cpp +++ b/pcbnew/router/router_preview_item.cpp @@ -41,7 +41,7 @@ ROUTER_PREVIEW_ITEM::ROUTER_PREVIEW_ITEM( const PNS_ITEM* aItem, VIEW_GROUP* aPa m_shape = NULL; m_clearance = -1; - m_originLayer = m_layer = ITEM_GAL_LAYER ( GP_OVERLAY ); + m_originLayer = m_layer = ITEM_GAL_LAYER( GP_OVERLAY ); if( aItem ) Update( aItem ); @@ -59,7 +59,7 @@ void ROUTER_PREVIEW_ITEM::Update( const PNS_ITEM* aItem ) assert( m_originLayer >= 0 ); - m_layer = m_originLayer; + m_layer = m_originLayer; m_color = getLayerColor( m_originLayer ); m_color.a = 0.8; m_depth = BaseOverlayDepth - aItem->Layers().Start(); @@ -70,7 +70,6 @@ void ROUTER_PREVIEW_ITEM::Update( const PNS_ITEM* aItem ) case PNS_ITEM::LINE: m_type = PR_SHAPE; m_width = ( (PNS_LINE*) aItem )->Width(); - break; case PNS_ITEM::SEGMENT: @@ -174,7 +173,7 @@ void ROUTER_PREVIEW_ITEM::ViewDraw( int aLayer, KIGFX::GAL* aGal ) const if( m_clearance > 0 ) { aGal->SetLayerDepth( ClearanceOverlayDepth ); - aGal->SetStrokeColor( COLOR4D( DARKDARKGRAY )); + aGal->SetStrokeColor( COLOR4D( DARKDARKGRAY ) ); aGal->SetLineWidth( m_width + 2 * m_clearance ); aGal->DrawLine( s->GetSeg().A, s->GetSeg().B ); } diff --git a/pcbnew/router/router_preview_item.h b/pcbnew/router/router_preview_item.h index c22e21c5e6..aeb5492979 100644 --- a/pcbnew/router/router_preview_item.h +++ b/pcbnew/router/router_preview_item.h @@ -84,7 +84,7 @@ public: aCount = 1; } - void drawLineChain( const SHAPE_LINE_CHAIN& aL, KIGFX::GAL *aGal ) const; + void drawLineChain( const SHAPE_LINE_CHAIN& aL, KIGFX::GAL* aGal ) const; private: const KIGFX::COLOR4D assignColor( int aStyle ) const; @@ -105,7 +105,7 @@ private: // fixme: shouldn't this go to VIEW? static const int ClearanceOverlayDepth = -2000; - static const int BaseOverlayDepth = -2020; + static const int BaseOverlayDepth = -2010; static const int ViaOverlayDepth = -2046; double m_depth; From 0304598a71316654145d62712988e1d8d95f6ee4 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 7 Jul 2014 13:09:44 +0200 Subject: [PATCH 559/741] Fixed vertical alignment for strings that contain a newline character at the end (GAL). --- common/gal/stroke_font.cpp | 6 +++++- include/gal/stroke_font.h | 18 +++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/common/gal/stroke_font.cpp b/common/gal/stroke_font.cpp index f12f9ad80e..31441f5776 100644 --- a/common/gal/stroke_font.cpp +++ b/common/gal/stroke_font.cpp @@ -40,7 +40,8 @@ STROKE_FONT::STROKE_FONT( GAL* aGal ) : m_gal( aGal ), m_bold( false ), m_italic( false ), - m_mirrored( false ) + m_mirrored( false ), + m_overbar( false ) { // Default values m_glyphSize = VECTOR2D( 10.0, 10.0 ); @@ -149,6 +150,9 @@ BOX2D STROKE_FONT::computeBoundingBox( const GLYPH& aGLYPH, const VECTOR2D& aGLY void STROKE_FONT::Draw( const UTF8& aText, const VECTOR2D& aPosition, double aRotationAngle ) { + if( aText.empty() ) + return; + // Context needs to be saved before any transformations m_gal->Save(); diff --git a/include/gal/stroke_font.h b/include/gal/stroke_font.h index 71b2d421ed..fa16f6f0ac 100644 --- a/include/gal/stroke_font.h +++ b/include/gal/stroke_font.h @@ -189,17 +189,13 @@ private: * @param aText is the text to be checked. * @return unsigned - The number of lines in aText. */ - unsigned linesCount( const UTF8& aText ) const + inline unsigned linesCount( const UTF8& aText ) const { - unsigned lines = 1; - - for( UTF8::const_iterator it = aText.begin(), itEnd = aText.end(); it != itEnd; ++it ) - { - if( *it == '\n' ) - ++lines; - } - - return lines; + if( aText.empty() ) + return 0; // std::count does not work well with empty strings + else + // aText.end() - 1 is to skip a newline character that is potentially at the end + return std::count( aText.begin(), aText.end() - 1, '\n' ) + 1; } ///> Factor that determines relative height of overbar. @@ -208,7 +204,7 @@ private: ///> Factor that determines relative line width for bold text. static const double BOLD_FACTOR; - ///> Scale factor for the glyph + ///> Scale factor for a glyph static const double HERSHEY_SCALE; }; } // namespace KIGFX From acbe6290c5016e5a237c301280bbadfac1834217 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Mon, 7 Jul 2014 14:49:14 -0500 Subject: [PATCH 560/741] switch back to original sexpr usage of PTREE, add new DSNLEXER constructor, enforce accessors in kicad.exe --- common/dsnlexer.cpp | 18 +++- common/ptree.cpp | 6 +- eeschema/backanno.cpp | 76 +++++++------- include/dsnlexer.h | 12 ++- include/ptree.h | 6 +- kicad/class_treeproject_item.cpp | 48 ++++----- kicad/class_treeproject_item.h | 67 ++++++------ kicad/class_treeprojectfiles.cpp | 15 +-- kicad/files-io.cpp | 19 ++-- kicad/kicad.cpp | 19 ++-- kicad/kicad.h | 49 +++++---- kicad/mainframe.cpp | 60 ++++++----- kicad/prjconfig.cpp | 78 +++++++------- kicad/tree_project_frame.cpp | 173 +++++++++---------------------- kicad/tree_project_frame.h | 9 +- tools/CMakeLists.txt | 1 + tools/property_tree.cpp | 2 +- 17 files changed, 315 insertions(+), 343 deletions(-) diff --git a/common/dsnlexer.cpp b/common/dsnlexer.cpp index 11d8b0452e..47a6d7c4bc 100644 --- a/common/dsnlexer.cpp +++ b/common/dsnlexer.cpp @@ -36,6 +36,8 @@ //#define STANDALONE 1 // enable this for stand alone testing. +#define FMT_CLIPBOARD _( "clipboard" ) + //------------------------------------------------------------------ @@ -89,7 +91,7 @@ DSNLEXER::DSNLEXER( const KEYWORD* aKeywordTable, unsigned aKeywordCount, keywordCount( aKeywordCount ) { STRING_LINE_READER* stringReader = new STRING_LINE_READER( aClipboardTxt, aSource.IsEmpty() ? - wxString( _( "clipboard" ) ) : aSource ); + wxString( FMT_CLIPBOARD ) : aSource ); PushReader( stringReader ); init(); } @@ -107,6 +109,20 @@ DSNLEXER::DSNLEXER( const KEYWORD* aKeywordTable, unsigned aKeywordCount, } +static const KEYWORD empty_keywords[1] = {}; + +DSNLEXER::DSNLEXER( const std::string& aSExpression, const wxString& aSource ) : + iOwnReaders( true ), + keywords( empty_keywords ), + keywordCount( 0 ) +{ + STRING_LINE_READER* stringReader = new STRING_LINE_READER( aSExpression, aSource.IsEmpty() ? + wxString( FMT_CLIPBOARD ) : aSource ); + PushReader( stringReader ); + init(); +} + + DSNLEXER::~DSNLEXER() { if( iOwnReaders ) diff --git a/common/ptree.cpp b/common/ptree.cpp index 010d4b3f26..1d2e958e02 100644 --- a/common/ptree.cpp +++ b/common/ptree.cpp @@ -83,11 +83,7 @@ inline void scanAtom( PTREE* aTree, DSNLEXER* aLexer ) //D(printf( "%s: '%s'\n", __func__, key );) -#if 0 aTree->push_back( PTREE::value_type( key, PTREE() ) ); -#else - aTree->put_value( key ); -#endif } @@ -194,7 +190,7 @@ static void formatNode( OUTPUTFORMATTER* out, int aNestLevel, int aCtl, out->Print( aNestLevel, "(%s%s", out->Quotes( aKey ).c_str(), ctl & CTL_OMIT_NL ? "" : "\n" ); - if( aTree.data().size() ) + if( aTree.data().size() ) // sexpr format does not use data() { out->Print( 0, " %s%s", out->Quotes( aTree.data() ).c_str(), diff --git a/eeschema/backanno.cpp b/eeschema/backanno.cpp index f2fdcb3e27..ea7628a86f 100644 --- a/eeschema/backanno.cpp +++ b/eeschema/backanno.cpp @@ -56,55 +56,61 @@ void SCH_EDIT_FRAME::backAnnotateFootprints( const std::string& aChangedSetOfRef sheets.GetComponents( refs, false ); - static const KEYWORD empty_keywords[1] = {}; - - DSNLEXER lexer( empty_keywords, 0, aChangedSetOfReferences, FROM_UTF8( __func__ ) ); + DSNLEXER lexer( aChangedSetOfReferences, FROM_UTF8( __func__ ) ); PTREE doc; - Scan( &doc, &lexer ); + try + { + Scan( &doc, &lexer ); #if defined(DEBUG) && 0 - STRING_FORMATTER sf; - Format( &sf, 0, 0, doc ); - printf( "%s: '%s'\n", __func__, sf.GetString().c_str() ); + STRING_FORMATTER sf; + Format( &sf, 0, 0, doc ); + printf( "%s: '%s'\n", __func__, sf.GetString().c_str() ); #endif - CPTREE& back_anno = doc.get_child( "back_annotation" ); + CPTREE& back_anno = doc.get_child( "back_annotation" ); - for( PTREE::const_iterator ref = back_anno.begin(); ref != back_anno.end(); ++ref ) - { - wxASSERT( ref->first == "ref" ); - - wxString reference = (UTF8&) ref->second.data(); - wxString footprint = (UTF8) ref->second.get( "fpid" ); - - // DBG( printf( "%s: ref:%s fpid:%s\n", __func__, TO_UTF8( reference ), TO_UTF8( footprint ) ); ) - - // Search the component in the flat list - for( unsigned ii = 0; ii < refs.GetCount(); ++ii ) + for( PTREE::const_iterator ref = back_anno.begin(); ref != back_anno.end(); ++ref ) { - if( Cmp_KEEPCASE( reference, refs[ii].GetRef() ) == 0 ) + wxASSERT( ref->first == "ref" ); + + wxString reference = (UTF8&) ref->second.front().first; + wxString footprint = (UTF8&) ref->second.get_child( "fpid" ).front().first; + + DBG( printf( "%s: ref:%s fpid:%s\n", __func__, TO_UTF8( reference ), TO_UTF8( footprint ) ); ) + + // Search the component in the flat list + for( unsigned ii = 0; ii < refs.GetCount(); ++ii ) { - // We have found a candidate. - // Note: it can be not unique (multiple parts per package) - // So we *do not* stop the search here - SCH_COMPONENT* component = refs[ii].GetComponent(); - SCH_FIELD* fpfield = component->GetField( FOOTPRINT ); - const wxString& oldfp = fpfield->GetText(); - - if( !oldfp && fpfield->IsVisible() ) + if( Cmp_KEEPCASE( reference, refs[ii].GetRef() ) == 0 ) { - fpfield->SetVisible( false ); + // We have found a candidate. + // Note: it can be not unique (multiple parts per package) + // So we *do not* stop the search here + SCH_COMPONENT* component = refs[ii].GetComponent(); + SCH_FIELD* fpfield = component->GetField( FOOTPRINT ); + const wxString& oldfp = fpfield->GetText(); + + if( !oldfp && fpfield->IsVisible() ) + { + fpfield->SetVisible( false ); + } + + // DBG( printf("%s: ref:%s fpid:%s\n", __func__, TO_UTF8( refs[ii].GetRef() ), TO_UTF8( footprint ) );) + if( oldfp != footprint ) + isChanged = true; + + fpfield->SetText( footprint ); } - - // DBG( printf("%s: ref:%s fpid:%s\n", __func__, TO_UTF8( refs[ii].GetRef() ), TO_UTF8( footprint ) );) - if( oldfp != footprint ) - isChanged = true; - - fpfield->SetText( footprint ); } } } + catch( const PTREE_ERROR& ex ) + { + // remap the exception to something the caller is likely to understand. + THROW_IO_ERROR( ex.what() ); + } if( isChanged ) OnModify(); diff --git a/include/dsnlexer.h b/include/dsnlexer.h index 24674fd665..b6f3a87516 100644 --- a/include/dsnlexer.h +++ b/include/dsnlexer.h @@ -174,7 +174,7 @@ public: FILE* aFile, const wxString& aFileName ); /** - * Constructor ( std::string&*, const wxString& ) + * Constructor ( const KEYWORD*, unsigned, const std::string&, const wxString& ) * intializes a DSN lexer and prepares to read from @a aSExpression. * * @param aKeywordTable is an array of KEYWORDS holding \a aKeywordCount. This @@ -186,6 +186,16 @@ public: DSNLEXER( const KEYWORD* aKeywordTable, unsigned aKeywordCount, const std::string& aSExpression, const wxString& aSource = wxEmptyString ); + /** + * Constructor ( const std::string&, const wxString& ) + * intializes a DSN lexer and prepares to read from @a aSExpression. Use this + * one without a keyword table with the DOM parser in ptree.h. + * + * @param aSExpression is text to feed through a STRING_LINE_READER + * @param aSource is a description of aSExpression, used for error reporting. + */ + DSNLEXER( const std::string& aSExpression, const wxString& aSource = wxEmptyString ); + /** * Constructor ( LINE_READER* ) * intializes a DSN lexer and prepares to read from @a aLineReader which diff --git a/include/ptree.h b/include/ptree.h index 0ffad8c8ed..a117462b49 100644 --- a/include/ptree.h +++ b/include/ptree.h @@ -52,9 +52,9 @@ makes it easy to extract a subset of a ptree. #include #include -typedef boost::property_tree::ptree PTREE; -typedef const PTREE CPTREE; - +typedef boost::property_tree::ptree PTREE; +typedef const PTREE CPTREE; +typedef boost::property_tree::ptree_error PTREE_ERROR; /** * Function Scan diff --git a/kicad/class_treeproject_item.cpp b/kicad/class_treeproject_item.cpp index b43c93bc18..1c28d5701d 100644 --- a/kicad/class_treeproject_item.cpp +++ b/kicad/class_treeproject_item.cpp @@ -51,12 +51,11 @@ TREEPROJECT_ITEM::TREEPROJECT_ITEM( enum TreeFileType type, const wxString& data m_Type = type; m_parent = parent; m_FileName = data; - m_IsRootFile = false; // true only for the root item of the tree (the project name) - m_WasPopulated = false; + m_IsRootFile = false; // true only for the root item of the tree (the project name) + m_IsPopulated = false; } -// Set the state used in the icon list void TREEPROJECT_ITEM::SetState( int state ) { wxImageList* imglist = m_parent->GetImageList(); @@ -71,8 +70,7 @@ void TREEPROJECT_ITEM::SetState( int state ) } -/* Get the directory containing the file */ -wxString TREEPROJECT_ITEM::GetDir() const +const wxString TREEPROJECT_ITEM::GetDir() const { if( TREE_DIRECTORY == m_Type ) return m_FileName; @@ -84,7 +82,6 @@ wxString TREEPROJECT_ITEM::GetDir() const } -/* rename the file checking if extension change occurs */ bool TREEPROJECT_ITEM::Rename( const wxString& name, bool check ) { // this is broken & unsafe to use on linux. @@ -145,14 +142,13 @@ type.\n Do you want to continue ?" } -/*******************************************/ bool TREEPROJECT_ITEM::Delete( bool check ) -/*******************************************/ -/* delete a file */ { - wxString msg; + wxString msg = wxString::Format( _( + "Do you really want to delete '%s'" ), + GetChars( GetFileName() ) + ); - msg.Printf( _( "Do you really want to delete <%s>" ), GetChars( GetFileName() ) ); wxMessageDialog dialog( m_parent, msg, _( "Delete File" ), wxYES_NO | wxICON_QUESTION ); @@ -184,16 +180,15 @@ bool TREEPROJECT_ITEM::Delete( bool check ) } -// Called under item activation void TREEPROJECT_ITEM::Activate( TREE_PROJECT_FRAME* prjframe ) { wxString sep = wxFileName().GetPathSeparator(); - wxString FullFileName = GetFileName(); + wxString fullFileName = GetFileName(); wxTreeItemId id = GetId(); KICAD_MANAGER_FRAME* mainFrame = (KICAD_MANAGER_FRAME*) Pgm().App().GetTopWindow(); - AddDelimiterString( FullFileName ); + AddDelimiterString( fullFileName ); switch( GetType() ) { @@ -205,24 +200,29 @@ void TREEPROJECT_ITEM::Activate( TREE_PROJECT_FRAME* prjframe ) break; case TREE_SCHEMA: - mainFrame->Execute( m_parent, EESCHEMA_EXE, FullFileName ); + mainFrame->Execute( m_parent, EESCHEMA_EXE, fullFileName ); break; case TREE_LEGACY_PCB: case TREE_SEXP_PCB: - mainFrame->Execute( m_parent, PCBNEW_EXE, FullFileName ); + { + DBG( printf( "%s: %s\n", __func__, TO_UTF8( fullFileName ) ); ) + + + mainFrame->Execute( m_parent, PCBNEW_EXE, fullFileName ); + } break; case TREE_GERBER: - mainFrame->Execute( m_parent, GERBVIEW_EXE, FullFileName ); + mainFrame->Execute( m_parent, GERBVIEW_EXE, fullFileName ); break; case TREE_PDF: - OpenPDF( FullFileName ); + OpenPDF( fullFileName ); break; case TREE_NET: - mainFrame->Execute( m_parent, CVPCB_EXE, FullFileName ); + mainFrame->Execute( m_parent, CVPCB_EXE, fullFileName ); break; case TREE_TXT: @@ -230,18 +230,16 @@ void TREEPROJECT_ITEM::Activate( TREE_PROJECT_FRAME* prjframe ) wxString editorname = Pgm().GetEditorName(); if( !editorname.IsEmpty() ) - mainFrame->Execute( m_parent, editorname, FullFileName ); - - break; + mainFrame->Execute( m_parent, editorname, fullFileName ); } + break; case TREE_PAGE_LAYOUT_DESCR: - mainFrame->Execute( m_parent, PL_EDITOR_EXE, FullFileName ); + mainFrame->Execute( m_parent, PL_EDITOR_EXE, fullFileName ); break; default: - OpenFile( FullFileName ); + OpenFile( fullFileName ); break; } - } diff --git a/kicad/class_treeproject_item.h b/kicad/class_treeproject_item.h index fd70212228..9319410981 100644 --- a/kicad/class_treeproject_item.h +++ b/kicad/class_treeproject_item.h @@ -1,63 +1,60 @@ -/* - * class_treeproject_item.h - */ +#ifndef TREEPROJECT_ITEM_H_ +#define TREEPROJECT_ITEM_H_ - -/** class TREEPROJECT_ITEM - * Handle one item (a file or a directory name) for the tree file +/** + * Class TREEPROJECT_ITEM + * handles one item (a file or a directory name) for the tree file */ class TREEPROJECT_ITEM : public wxTreeItemData { -public: - TreeFileType m_Type; // = TREE_PROJECT, TREE_DIRECTORY ... - wxString m_FileName; // Filename for a file, or directory name - bool m_IsRootFile; // True if m_Filename is a root schematic (same name as project) - bool m_WasPopulated; // True the name is a directory, and its content was read -private: - wxTreeCtrl* m_parent; - int m_state; + friend class KICAD_MANAGER_FRAME; + public: TREEPROJECT_ITEM( TreeFileType type, const wxString& data, wxTreeCtrl* parent ); + TREEPROJECT_ITEM() : m_parent( NULL ) { } TREEPROJECT_ITEM( const TREEPROJECT_ITEM& src ) : m_Type( src.m_Type ), m_FileName( src.m_FileName ), m_parent( src.m_parent ) { SetState( src.m_state ); - m_WasPopulated = false; + m_IsPopulated = false; } - TreeFileType GetType() const - { - return m_Type; - } + TreeFileType GetType() const { return m_Type; } + void SetType( TreeFileType aType ) { m_Type = aType; } - void SetType( TreeFileType aType ) - { - m_Type = aType; - } + const wxString& GetFileName() const { return m_FileName; } + void SetFileName( const wxString& name ) { m_FileName = name; } - wxString GetFileName() const - { - return m_FileName; - } + bool IsRootFile() const { return m_IsRootFile; } + void SetRootFile( bool aValue ) { m_IsRootFile = aValue; } - void SetFileName( const wxString& name ) - { - m_FileName = name; - } + bool IsPopulated() const { return m_IsPopulated; } + void SetPopulated( bool aValue ) { m_IsPopulated = aValue; } /** * @return the path of an item. * if this item is a directory, returns the stored filename * if this is a file, returns its path */ - wxString GetDir() const; + const wxString GetDir() const; - bool Rename( const wxString& name, bool check = true ); - bool Delete( bool check = true ); - void Activate( TREE_PROJECT_FRAME* prjframe ); + bool Rename( const wxString& name, bool check = true ); + bool Delete( bool check = true ); + void Activate( TREE_PROJECT_FRAME* prjframe ); void SetState( int state ); + + +private: + TreeFileType m_Type; // = TREE_PROJECT, TREE_DIRECTORY ... + wxString m_FileName; // Filename for a file, or directory name + bool m_IsRootFile; // True if m_Filename is a root schematic (same name as project) + bool m_IsPopulated; // True if the name is a directory, and its content was read + wxTreeCtrl* m_parent; + int m_state; }; + +#endif // TREEPROJECT_ITEM_H_ diff --git a/kicad/class_treeprojectfiles.cpp b/kicad/class_treeprojectfiles.cpp index 2641cd18c3..2889a09848 100644 --- a/kicad/class_treeprojectfiles.cpp +++ b/kicad/class_treeprojectfiles.cpp @@ -83,8 +83,7 @@ TREEPROJECTFILES::TREEPROJECTFILES( TREE_PROJECT_FRAME* parent ) : TREEPROJECTFILES::~TREEPROJECTFILES() { - if( m_ImageList ) - delete m_ImageList; + delete m_ImageList; } @@ -93,16 +92,18 @@ int TREEPROJECTFILES::OnCompareItems( const wxTreeItemId& item1, const wxTreeIte TREEPROJECT_ITEM* myitem1 = (TREEPROJECT_ITEM*) GetItemData( item1 ); TREEPROJECT_ITEM* myitem2 = (TREEPROJECT_ITEM*) GetItemData( item2 ); - if( (myitem1->m_Type == TREE_DIRECTORY) && ( myitem2->m_Type != TREE_DIRECTORY ) ) + if( myitem1->GetType() == TREE_DIRECTORY && myitem2->GetType() != TREE_DIRECTORY ) return -1; - if( (myitem2->m_Type == TREE_DIRECTORY) && ( myitem1->m_Type != TREE_DIRECTORY ) ) + + if( myitem2->GetType() == TREE_DIRECTORY && myitem1->GetType() != TREE_DIRECTORY ) return 1; - if( myitem1->m_IsRootFile && !myitem2->m_IsRootFile ) + if( myitem1->IsRootFile() && !myitem2->IsRootFile() ) return -1; - if( myitem2->m_IsRootFile && !myitem1->m_IsRootFile ) + + if( myitem2->IsRootFile() && !myitem1->IsRootFile() ) return 1; - return myitem1->m_FileName.CmpNoCase( myitem2->m_FileName ); + return myitem1->GetFileName().CmpNoCase( myitem2->GetFileName() ); } diff --git a/kicad/files-io.cpp b/kicad/files-io.cpp index 018726654b..d7c724698f 100644 --- a/kicad/files-io.cpp +++ b/kicad/files-io.cpp @@ -41,8 +41,8 @@ #include -static const wxString ZipFileExtension( wxT( "zip" ) ); -static const wxString ZipFileWildcard( wxT( "Zip file (*.zip) | *.zip" ) ); +#define ZipFileExtension wxT( "zip" ) +#define ZipFileWildcard wxT( "Zip file (*.zip) | *.zip" ) void KICAD_MANAGER_FRAME::OnFileHistory( wxCommandEvent& event ) @@ -53,14 +53,17 @@ void KICAD_MANAGER_FRAME::OnFileHistory( wxCommandEvent& event ) if( fn != wxEmptyString ) { wxCommandEvent cmd( 0, wxID_ANY ); - m_ProjectFileName = fn; + + SetProjectFileName( fn ); OnLoadProject( cmd ); } } + void KICAD_MANAGER_FRAME::OnUnarchiveFiles( wxCommandEvent& event ) { - wxFileName fn = m_ProjectFileName; + wxFileName fn = GetProjectFileName(); + fn.SetExt( ZipFileExtension ); wxFileDialog dlg( this, _( "Unzip Project" ), fn.GetPath(), @@ -70,8 +73,7 @@ void KICAD_MANAGER_FRAME::OnUnarchiveFiles( wxCommandEvent& event ) if( dlg.ShowModal() == wxID_CANCEL ) return; - wxString msg; - msg.Printf( _("\nOpen <%s>\n" ), GetChars( dlg.GetPath() ) ); + wxString msg = wxString::Format( _("\nOpen <%s>\n" ), GetChars( dlg.GetPath() ) ); PrintMsg( msg ); wxDirDialog dirDlg( this, _( "Target Directory" ), fn.GetPath(), @@ -85,6 +87,7 @@ void KICAD_MANAGER_FRAME::OnUnarchiveFiles( wxCommandEvent& event ) PrintMsg( msg ); wxFileSystem zipfilesys; + zipfilesys.AddHandler( new wxZipFSHandler ); zipfilesys.ChangePathTo( dlg.GetPath() + wxT( "#zip:" ) ); @@ -94,7 +97,7 @@ void KICAD_MANAGER_FRAME::OnUnarchiveFiles( wxCommandEvent& event ) while( !localfilename.IsEmpty() ) { zipfile = zipfilesys.OpenFile( localfilename ); - if( zipfile == NULL ) + if( !zipfile ) { DisplayError( this, wxT( "Zip file read error" ) ); break; @@ -139,7 +142,7 @@ void KICAD_MANAGER_FRAME::OnArchiveFiles( wxCommandEvent& event ) }; wxString msg; - wxFileName fileName = m_ProjectFileName; + wxFileName fileName = GetProjectFileName(); wxString oldPath = wxGetCwd(); fileName.SetExt( wxT( "zip" ) ); diff --git a/kicad/kicad.cpp b/kicad/kicad.cpp index 693c0cfa8f..caea06763f 100644 --- a/kicad/kicad.cpp +++ b/kicad/kicad.cpp @@ -158,15 +158,15 @@ bool PGM_KICAD::OnPgmInit( wxApp* aWxApp ) bool prjloaded = false; // true when the project is loaded if( App().argc > 1 ) - frame->m_ProjectFileName = App().argv[1]; + frame->SetProjectFileName( App().argv[1] ); else if( GetFileHistory().GetCount() ) { // Try to open the last opened project, // if a project name is not given when starting Kicad - frame->m_ProjectFileName = GetFileHistory().GetHistoryFile( 0 ); + frame->SetProjectFileName( GetFileHistory().GetHistoryFile( 0 ) ); - if( !frame->m_ProjectFileName.FileExists() ) + if( !wxFileExists( frame->GetProjectFileName() ) ) GetFileHistory().RemoveFileFromHistory( 0 ); else { @@ -177,12 +177,12 @@ bool PGM_KICAD::OnPgmInit( wxApp* aWxApp ) } } - if( !frame->m_ProjectFileName.FileExists() ) + if( !wxFileExists( frame->GetProjectFileName() ) ) { wxFileName namelessProject( wxGetCwd(), NAMELESS_PROJECT, ProjectFileExtension ); - frame->m_ProjectFileName = namelessProject; + frame->SetProjectFileName( namelessProject.GetFullPath() ); } if( !prjloaded ) @@ -218,23 +218,24 @@ void PGM_KICAD::MacOpenFile( const wxString& aFileName ) KICAD_MANAGER_FRAME* frame = (KICAD_MANAGER_FRAME*) GetTopWindow(); + frame->SetProjectFile( aFileName ); + wxFileName fn = aFileName; - frame->m_ProjectFileName = fn; - - if( !frame->m_ProjectFileName.FileExists() && m_fileHistory.GetCount() ) + if( !fn.FileExists() && m_fileHistory.GetCount() ) { m_fileHistory.RemoveFileFromHistory( 0 ); return; } wxCommandEvent loadEvent; + loadEvent.SetId( wxID_ANY ); frame->OnLoadProject( loadEvent ); wxString title = GetTitle() + wxT( " " ) + GetBuildVersion() + - wxT( " " ) + frame->m_ProjectFileName.GetFullPath(); + wxT( " " ) + frame->GetProjectFileName(); if( !fn.IsDirWritable() ) title += _( " [Read Only]" ); diff --git a/kicad/kicad.h b/kicad/kicad.h index ab76ac5cbc..598aff73ee 100644 --- a/kicad/kicad.h +++ b/kicad/kicad.h @@ -120,28 +120,6 @@ enum id_kicad_frm { */ class KICAD_MANAGER_FRAME : public EDA_BASE_FRAME { -protected: - wxConfigBase* config(); // override EDA_BASE_FRAME virtual - - const SEARCH_STACK& sys_search(); // override EDA_BASE_FRAME virtual - - wxString help_name(); // override EDA_BASE_FRAME virtual - - -public: - TREE_PROJECT_FRAME* m_LeftWin; - LAUNCHER_PANEL* m_Launcher; - wxTextCtrl* m_MessagesBox; - wxAuiToolBar* m_VToolBar; // Vertical toolbar (not used) - wxString m_BoardFileName; - wxString m_SchematicRootFileName; - wxFileName m_ProjectFileName; - -private: - int m_leftWinWidth; - - void language_change( wxCommandEvent& event ); - public: KICAD_MANAGER_FRAME( wxWindow* parent, const wxString& title, const wxPoint& pos, const wxSize& size ); @@ -211,7 +189,7 @@ public: void OnUpdateDefaultPdfBrowser( wxUpdateUIEvent& event ); void OnUpdatePreferredPdfBrowser( wxUpdateUIEvent& event ); - void CreateNewProject( const wxString aPrjFullFileName, bool aTemplateSelector ); + void CreateNewProject( const wxString& aPrjFullFileName, bool aTemplateSelector ); void LoadSettings( wxConfigBase* aCfg ); @@ -249,7 +227,32 @@ public: void OnChangeWatchedPaths(wxCommandEvent& aEvent ); #endif + void SetProjectFileName( const wxString& aFullProjectProFileName ); + const wxString GetProjectFileName(); + + // read only accessors + const wxString SchFileName(); + const wxString PcbFileName(); + DECLARE_EVENT_TABLE() + +private: + + wxConfigBase* config(); // override EDA_BASE_FRAME virtual + + const SEARCH_STACK& sys_search(); // override EDA_BASE_FRAME virtual + + wxString help_name(); // override EDA_BASE_FRAME virtual + + TREE_PROJECT_FRAME* m_LeftWin; + LAUNCHER_PANEL* m_Launcher; + wxTextCtrl* m_MessagesBox; + wxAuiToolBar* m_VToolBar; // Vertical toolbar (not used) + wxFileName m_project_file_name; + + int m_leftWinWidth; + + void language_change( wxCommandEvent& event ); }; diff --git a/kicad/mainframe.cpp b/kicad/mainframe.cpp index 942f0fe975..921e140080 100644 --- a/kicad/mainframe.cpp +++ b/kicad/mainframe.cpp @@ -41,7 +41,6 @@ #include #include -#define USE_KIFACE 1 #define TreeFrameWidthEntry wxT( "LeftWinWidth" ) @@ -125,6 +124,35 @@ wxConfigBase* KICAD_MANAGER_FRAME::config() return ret; } +void KICAD_MANAGER_FRAME::SetProjectFileName( const wxString& aFullProjectProFileName ) +{ + m_project_file_name = aFullProjectProFileName; + + wxASSERT( m_project_file_name.IsAbsolute() ); +} + + +const wxString KICAD_MANAGER_FRAME::GetProjectFileName() +{ + return m_project_file_name.GetFullPath(); +} + + +const wxString KICAD_MANAGER_FRAME::SchFileName() +{ + wxFileName fn( GetProjectFileName(), SchematicFileExtension ); + + return fn.GetFullName(); +} + + +const wxString KICAD_MANAGER_FRAME::PcbFileName() +{ + wxFileName fn( GetProjectFileName(), PcbFileExtension ); + + return fn.GetFullName(); +} + const SEARCH_STACK& KICAD_MANAGER_FRAME::sys_search() { @@ -159,7 +187,7 @@ void KICAD_MANAGER_FRAME::OnCloseWindow( wxCloseEvent& Event ) { int px, py; - UpdateFileHistory( m_ProjectFileName.GetFullPath(), &Pgm().GetFileHistory() ); + UpdateFileHistory( GetProjectFileName(), &Pgm().GetFileHistory() ); if( !IsIconized() ) // save main frame position and size { @@ -238,16 +266,14 @@ void KICAD_MANAGER_FRAME::OnRunPageLayoutEditor( wxCommandEvent& event ) void KICAD_MANAGER_FRAME::OnRunPcbNew( wxCommandEvent& event ) { - wxFileName legacy_board( m_ProjectFileName ); - wxFileName kicad_board( m_ProjectFileName ); + wxFileName kicad_board( PcbFileName() ); + wxFileName legacy_board( GetProjectFileName() ); legacy_board.SetExt( LegacyPcbFileExtension ); - kicad_board.SetExt( KiCadPcbFileExtension ); wxFileName& board = ( !legacy_board.FileExists() || kicad_board.FileExists() ) ? kicad_board : legacy_board; -#if USE_KIFACE KIWAY_PLAYER* frame = Kiway.Player( FRAME_PCB, false ); if( !frame ) { @@ -256,19 +282,15 @@ void KICAD_MANAGER_FRAME::OnRunPcbNew( wxCommandEvent& event ) frame->Show( true ); } frame->Raise(); -#else - Execute( this, PCBNEW_EXE, QuoteFullPath( board ) ); -#endif } void KICAD_MANAGER_FRAME::OnRunCvpcb( wxCommandEvent& event ) { - wxFileName fn( m_ProjectFileName ); + wxFileName fn( m_project_file_name ); fn.SetExt( NetlistFileExtension ); -#if USE_KIFACE KIWAY_PLAYER* frame = Kiway.Player( FRAME_CVPCB, false ); if( !frame ) { @@ -277,19 +299,15 @@ void KICAD_MANAGER_FRAME::OnRunCvpcb( wxCommandEvent& event ) frame->Show( true ); } frame->Raise(); -#else - Execute( this, CVPCB_EXE, QuoteFullPath( fn ) ); -#endif } void KICAD_MANAGER_FRAME::OnRunEeschema( wxCommandEvent& event ) { - wxFileName fn( m_ProjectFileName ); + wxFileName fn( m_project_file_name ); fn.SetExt( SchematicFileExtension ); -#if USE_KIFACE KIWAY_PLAYER* frame = Kiway.Player( FRAME_SCH, false ); if( !frame ) { @@ -298,20 +316,14 @@ void KICAD_MANAGER_FRAME::OnRunEeschema( wxCommandEvent& event ) frame->Show( true ); } frame->Raise(); -#else - Execute( this, EESCHEMA_EXE, QuoteFullPath( fn ) ); -#endif } + void KICAD_MANAGER_FRAME::OnRunGerbview( wxCommandEvent& event ) { // Gerbview is called without any file to open, because we do not know // the list and the name of files to open (if any...). -#if USE_KIFACE && 0 - -#else Execute( this, GERBVIEW_EXE, wxEmptyString ); -#endif } @@ -392,7 +404,7 @@ void KICAD_MANAGER_FRAME::PrintPrjInfo() wxString msg = wxString::Format( _( "Working dir: %s\nProject: %s\n" ), GetChars( wxGetCwd() ), - GetChars( m_ProjectFileName.GetFullPath() ) + GetChars( GetProjectFileName() ) ); PrintMsg( msg ); } diff --git a/kicad/prjconfig.cpp b/kicad/prjconfig.cpp index 978f5eec8b..501ecd6dcf 100644 --- a/kicad/prjconfig.cpp +++ b/kicad/prjconfig.cpp @@ -57,8 +57,8 @@ PARAM_CFG_ARRAY s_KicadManagerParams; -void KICAD_MANAGER_FRAME::CreateNewProject( const wxString aPrjFullFileName, - bool aTemplateSelector = false ) +void KICAD_MANAGER_FRAME::CreateNewProject( const wxString& aPrjFullFileName, + bool aTemplateSelector = false ) { wxString filename; wxFileName newProjectName = aPrjFullFileName; @@ -169,15 +169,8 @@ void KICAD_MANAGER_FRAME::CreateNewProject( const wxString aPrjFullFileName, } } - // Init schematic filename - m_SchematicRootFileName = wxFileName( newProjectName.GetName(), - SchematicFileExtension ).GetFullName(); - - // Init pcb board filename - m_BoardFileName = wxFileName( newProjectName.GetName(), PcbFileExtension ).GetFullName(); - // Init project filename - m_ProjectFileName = newProjectName; + SetProjectFileName( newProjectName.GetFullPath() ); // Write settings to project file // was: wxGetApp().WriteProjectConfig( aPrjFullFileName, GeneralGroupName, s_KicadManagerParams ); @@ -187,15 +180,19 @@ void KICAD_MANAGER_FRAME::CreateNewProject( const wxString aPrjFullFileName, void KICAD_MANAGER_FRAME::OnLoadProject( wxCommandEvent& event ) { - int style; - wxString title; - bool newProject = ( event.GetId() == ID_NEW_PROJECT ) || - ( event.GetId() == ID_NEW_PROJECT_FROM_TEMPLATE ); + wxString title; + + // this is still a mess, will work on it tomorrow. ClearMsg(); if( event.GetId() != wxID_ANY ) { + int style; + + bool newProject = ( event.GetId() == ID_NEW_PROJECT ) || + ( event.GetId() == ID_NEW_PROJECT_FROM_TEMPLATE ); + if( newProject ) { title = _( "Create New Project" ); @@ -207,21 +204,20 @@ void KICAD_MANAGER_FRAME::OnLoadProject( wxCommandEvent& event ) style = wxFD_OPEN | wxFD_FILE_MUST_EXIST; } - wxString default_dir = wxGetCwd(); - wxFileDialog dlg( this, title, default_dir, wxEmptyString, - ProjectFileWildcard, style ); + wxString default_dir = wxGetCwd(); + wxFileDialog dlg( this, title, default_dir, wxEmptyString, + ProjectFileWildcard, style ); if( dlg.ShowModal() == wxID_CANCEL ) return; - m_ProjectFileName = dlg.GetPath(); + wxFileName pro( dlg.GetPath() ); + pro.SetExt( ProjectFileExtension ); if( newProject ) { - m_ProjectFileName.SetExt( ProjectFileExtension ); - // Check if the project directory is empty - wxDir directory ( m_ProjectFileName.GetPath() ); + wxDir directory( pro.GetPath() ); if( directory.HasFiles() ) { @@ -233,57 +229,59 @@ void KICAD_MANAGER_FRAME::OnLoadProject( wxCommandEvent& event ) { // Append a new directory with the same name of the project file // and try to create it - m_ProjectFileName.AppendDir( m_ProjectFileName.GetName() ); + pro.AppendDir( pro.GetName() ); - if( !wxMkdir( m_ProjectFileName.GetPath() ) ) + if( !wxMkdir( pro.GetPath() ) ) // There was a problem, undo - m_ProjectFileName.RemoveLastDir(); + pro.RemoveLastDir(); } } if( event.GetId() == ID_NEW_PROJECT ) { - CreateNewProject( m_ProjectFileName.GetFullPath() ); + CreateNewProject( pro.GetFullPath() ); } else if( event.GetId() == ID_NEW_PROJECT_FROM_TEMPLATE ) { // Launch the template selector dialog - CreateNewProject( m_ProjectFileName.GetFullPath(), true ); + CreateNewProject( pro.GetFullPath(), true ); } } + + SetProjectFileName( pro.GetFullName() ); } - wxLogDebug( wxT( "Loading KiCad project file: " ) + m_ProjectFileName.GetFullPath() ); + wxLogDebug( wxT( "Loading KiCad project file: " ) + GetProjectFileName() ); - /* Check if project file exists and if it is not noname.pro */ - wxString filename = m_ProjectFileName.GetFullName(); + // Check if project file exists and if it is not noname.pro + wxString filename = GetProjectFileName(); wxString nameless_prj = NAMELESS_PROJECT wxT( ".pro" ); - if( !m_ProjectFileName.FileExists() && !filename.IsSameAs( nameless_prj ) ) + if( !wxFileExists( GetProjectFileName() ) && !filename.IsSameAs( nameless_prj ) ) { wxString msg = wxString::Format( _( "KiCad project file '%s' not found" ), - GetChars( m_ProjectFileName.GetFullPath() ) ); + GetChars( GetProjectFileName() ) ); DisplayError( this, msg ); return; } - wxSetWorkingDirectory( m_ProjectFileName.GetPath() ); + wxSetWorkingDirectory( wxFileName( GetProjectFileName() ).GetPath() ); // was wxGetApp().ReadProjectConfig( m_ProjectFileName.GetFullPath(), // GeneralGroupName, s_KicadManagerParams, false ); - Prj().ConfigLoad( Pgm().SysSearch(), m_ProjectFileName.GetFullPath(), + Prj().ConfigLoad( Pgm().SysSearch(), GetProjectFileName(), GeneralGroupName, s_KicadManagerParams, false ); - title = wxT( "KiCad " ) + GetBuildVersion() + wxT( ' ' ) + m_ProjectFileName.GetFullPath(); + title = wxT( "KiCad " ) + GetBuildVersion() + wxT( ' ' ) + GetProjectFileName(); - if( !m_ProjectFileName.IsDirWritable() ) + if( !wxIsWritable( GetProjectFileName() ) ) title += _( " [Read Only]" ); SetTitle( title ); - UpdateFileHistory( m_ProjectFileName.GetFullPath(), &Pgm().GetFileHistory() ); + UpdateFileHistory( GetProjectFileName(), &Pgm().GetFileHistory() ); m_LeftWin->ReCreateTreePrj(); @@ -292,7 +290,8 @@ void KICAD_MANAGER_FRAME::OnLoadProject( wxCommandEvent& event ) // however this is possible only when the main loop event handler is running, // so we use it to run the rebuild function. wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED, ID_INIT_WATCHED_PATHS ); - wxPostEvent( this, cmd); + + wxPostEvent( this, cmd ); #endif PrintPrjInfo(); @@ -301,12 +300,11 @@ void KICAD_MANAGER_FRAME::OnLoadProject( wxCommandEvent& event ) void KICAD_MANAGER_FRAME::OnSaveProject( wxCommandEvent& event ) { - if( !IsWritable( m_ProjectFileName ) ) + if( !wxIsWritable( GetProjectFileName() ) ) return; // was: wxGetApp().WriteProjectConfig( m_ProjectFileName.GetFullPath(), // GeneralGroupName, s_KicadManagerParams ); - Prj().ConfigSave( Pgm().SysSearch(), m_ProjectFileName.GetFullPath(), + Prj().ConfigSave( Pgm().SysSearch(), GetProjectFileName(), GeneralGroupName, s_KicadManagerParams ); } - diff --git a/kicad/tree_project_frame.cpp b/kicad/tree_project_frame.cpp index e4e6d362af..383dd06b34 100644 --- a/kicad/tree_project_frame.cpp +++ b/kicad/tree_project_frame.cpp @@ -93,10 +93,10 @@ static const wxChar* s_allowedExtensionsToList[] = * library as required. */ -/* File extension definitions. */ +// File extension definitions. const wxChar TextFileExtension[] = wxT( "txt" ); -/* File wildcard definitions. */ +// File wildcard definitions. const wxChar TextFileWildcard[] = wxT( "Text files (*.txt)|*.txt" ); @@ -132,11 +132,13 @@ TREE_PROJECT_FRAME::TREE_PROJECT_FRAME( KICAD_MANAGER_FRAME* parent ) : { m_Parent = parent; m_TreeProject = NULL; + #ifdef KICAD_USE_FILES_WATCHER m_watcher = NULL; Connect( wxEVT_FSWATCHER, wxFileSystemWatcherEventHandler( TREE_PROJECT_FRAME::OnFileSystemEvent ) ); #endif + /* * Filtering is now inverted: the filters are actually used to _enable_ support * for a given file type. @@ -162,9 +164,7 @@ TREE_PROJECT_FRAME::~TREE_PROJECT_FRAME() } -/*****************************************************************************/ void TREE_PROJECT_FRAME::RemoveFilter( const wxString& filter ) -/*****************************************************************************/ { for( unsigned int i = 0; i < m_filters.size(); i++ ) { @@ -177,11 +177,6 @@ void TREE_PROJECT_FRAME::RemoveFilter( const wxString& filter ) } -/** - * Called by the popup menu in the tree frame - * Creates a new subdirectory inside the current kicad project directory - * the user is prompted to enter a directory name - */ void TREE_PROJECT_FRAME::OnCreateNewDirectory( wxCommandEvent& event ) { // Get the root directory name: @@ -374,16 +369,6 @@ wxString TREE_PROJECT_FRAME::GetFileWildcard( TreeFileType type ) } -/** - * Function AddItemToTreeProject - * @brief Add filename "name" to the tree \n - * if name is a directory, add the sub directory file names - * @param aName = the filename or the dirctory name to add - * @param aRoot = the wxTreeItemId item where to add sub tree items - * @param aRecurse = true to add file or subdir names to the current tree item - * false to stop file add. - * @return true if the file (or directory) is added. - */ bool TREE_PROJECT_FRAME::AddItemToTreeProject( const wxString& aName, wxTreeItemId& aRoot, bool aRecurse ) { @@ -450,7 +435,7 @@ bool TREE_PROJECT_FRAME::AddItemToTreeProject( const wxString& aName, wxString rootName; TREEPROJECT_ITEM* itemData = GetItemIdData( m_root ); if( itemData ) - rootName = itemData->m_FileName.BeforeLast( '.' ); + rootName = itemData->GetFileName().BeforeLast( '.' ); if( fullFileName != rootName ) { @@ -513,7 +498,7 @@ bool TREE_PROJECT_FRAME::AddItemToTreeProject( const wxString& aName, if( itemData ) { - if( itemData->m_FileName == aName ) + if( itemData->GetFileName() == aName ) { return true; // well, we would have added it, but it is already here! } @@ -531,13 +516,13 @@ bool TREE_PROJECT_FRAME::AddItemToTreeProject( const wxString& aName, data->SetState( 0 ); /* Mark root files (files which have the same aName as the project) */ - wxFileName project( m_Parent->m_ProjectFileName ); + wxFileName project( m_Parent->GetProjectFileName() ); wxFileName currfile( file ); if( currfile.GetName().CmpNoCase( project.GetName() ) == 0 ) - data->m_IsRootFile = true; + data->SetRootFile( true ); else - data->m_IsRootFile = false; + data->SetRootFile( false ); // This section adds dirs and files found in the subdirs // in this case AddFile is recursive, but for the first level only. @@ -546,7 +531,8 @@ bool TREE_PROJECT_FRAME::AddItemToTreeProject( const wxString& aName, const wxString sep = wxFileName().GetPathSeparator(); wxDir dir( aName ); wxString dir_filename; - data->m_WasPopulated = true; // set state to populated + + data->SetPopulated( true ); if( dir.GetFirst( &dir_filename ) ) { @@ -564,13 +550,9 @@ bool TREE_PROJECT_FRAME::AddItemToTreeProject( const wxString& aName, } -/** - * @brief Create or modify the tree showing project file names - */ void TREE_PROJECT_FRAME::ReCreateTreePrj() { wxTreeItemId rootcellule; - wxFileName fn; bool prjOpened = false; if( !m_TreeProject ) @@ -578,15 +560,15 @@ void TREE_PROJECT_FRAME::ReCreateTreePrj() else m_TreeProject->DeleteAllItems(); - if( !m_Parent->m_ProjectFileName.IsOk() ) + wxFileName fn = m_Parent->GetProjectFileName(); + + if( !fn.IsOk() ) { fn.Clear(); fn.SetPath( ::wxGetCwd() ); fn.SetName( NAMELESS_PROJECT ); fn.SetExt( ProjectFileExtension ); } - else - fn = m_Parent->m_ProjectFileName; prjOpened = fn.FileExists(); @@ -625,26 +607,21 @@ void TREE_PROJECT_FRAME::ReCreateTreePrj() m_TreeProject->Expand( rootcellule ); - /* Sort filenames by alphabetic order */ + // Sort filenames by alphabetic order m_TreeProject->SortChildren( m_root ); - m_Parent->m_ProjectFileName = fn; + m_Parent->SetProjectFileName( fn.GetFullPath() ); } -/** - * @brief Opens *popup* the context menu - */ -/*****************************************************************************/ void TREE_PROJECT_FRAME::OnRight( wxTreeEvent& Event ) -/*****************************************************************************/ { int tree_id; TREEPROJECT_ITEM* tree_data; wxString FullFileName; wxTreeItemId curr_item = Event.GetItem(); - /* Ensure item is selected (Under Windows right click does not select the item) */ + // Ensure item is selected (Under Windows right click does not select the item) m_TreeProject->SelectItem( curr_item ); tree_data = GetSelectedData(); @@ -696,10 +673,7 @@ void TREE_PROJECT_FRAME::OnRight( wxTreeEvent& Event ) PopupMenu( &popupMenu ); } -/* - * Called by the popup menu, when right clicking on a file name - * Launch the text editor to open the selected file - */ + void TREE_PROJECT_FRAME::OnOpenSelectedFileWithTextEditor( wxCommandEvent& event ) { TREEPROJECT_ITEM* tree_data = GetSelectedData(); @@ -719,10 +693,6 @@ void TREE_PROJECT_FRAME::OnOpenSelectedFileWithTextEditor( wxCommandEvent& event } -/* Called via the popup menu, when right clicking on a file name - * or a directory name to delete the selected file or directory - * in the tree project - */ void TREE_PROJECT_FRAME::OnDeleteFile( wxCommandEvent& ) { TREEPROJECT_ITEM* tree_data = GetSelectedData(); @@ -734,10 +704,6 @@ void TREE_PROJECT_FRAME::OnDeleteFile( wxCommandEvent& ) } -/* Called via the popup menu, when right clicking on a file name - * or a directory name to rename the selected file or directory - * in the tree project - */ void TREE_PROJECT_FRAME::OnRenameFile( wxCommandEvent& ) { wxTreeItemId curr_item = m_TreeProject->GetSelection(); @@ -746,9 +712,10 @@ void TREE_PROJECT_FRAME::OnRenameFile( wxCommandEvent& ) if( !tree_data ) return; - wxString buffer = m_TreeProject->GetItemText( curr_item ); - wxString msg; - msg.Printf( _( "Change filename: <%s>" ), GetChars( tree_data->m_FileName ) ); + wxString buffer = m_TreeProject->GetItemText( curr_item ); + wxString msg = wxString::Format( + _( "Change filename: <%s>" ), + GetChars( tree_data->GetFileName() ) ); wxTextEntryDialog dlg( this, msg, _( "Change filename" ), buffer ); @@ -767,12 +734,7 @@ void TREE_PROJECT_FRAME::OnRenameFile( wxCommandEvent& ) } -/* - * called on a double click on an item - */ -/*****************************************************************************/ void TREE_PROJECT_FRAME::OnSelect( wxTreeEvent& Event ) -/*****************************************************************************/ { wxString FullFileName; @@ -785,13 +747,7 @@ void TREE_PROJECT_FRAME::OnSelect( wxTreeEvent& Event ) } -/** - * @brief Called when expanding an item of the tree - * populate tree items corresponding to subdirectories not already populated - */ -/*****************************************************************************/ void TREE_PROJECT_FRAME::OnExpand( wxTreeEvent& Event ) -/*****************************************************************************/ { wxString FullFileName; @@ -816,7 +772,7 @@ void TREE_PROJECT_FRAME::OnExpand( wxTreeEvent& Event ) if( !itemData || itemData->GetType() != TREE_DIRECTORY ) continue; - if( itemData->m_WasPopulated ) + if( itemData->IsPopulated() ) continue; wxString fileName = itemData->GetFileName(); @@ -832,10 +788,10 @@ void TREE_PROJECT_FRAME::OnExpand( wxTreeEvent& Event ) } while( dir.GetNext( &dir_filename ) ); } - itemData->m_WasPopulated = true; // set state to populated + itemData->SetPopulated( true ); // set state to populated subdir_populated = true; - /* Sort filenames by alphabetic order */ + // Sort filenames by alphabetic order m_TreeProject->SortChildren( kid ); } @@ -850,12 +806,6 @@ void TREE_PROJECT_FRAME::OnExpand( wxTreeEvent& Event ) } -/** - * Function GetSelectedData - * return the item data from item currently selected (highlighted) - * Note this is not necessary the "clicked" item, - * because when expanding, collapsing an item this item is not selected - */ TREEPROJECT_ITEM* TREE_PROJECT_FRAME::GetSelectedData() { return dynamic_cast( m_TreeProject->GetItemData @@ -863,25 +813,12 @@ TREEPROJECT_ITEM* TREE_PROJECT_FRAME::GetSelectedData() } -/** - * Function GetItemIdData - * return the item data corresponding to a wxTreeItemId identifier - * @param aId = the wxTreeItemId identifier. - * @return a TREEPROJECT_ITEM pointer correspondinfg to item id aId - */ TREEPROJECT_ITEM* TREE_PROJECT_FRAME::GetItemIdData( wxTreeItemId aId ) { return dynamic_cast( m_TreeProject->GetItemData( aId ) ); } -/* Search for the item in tree project which is the - * node of the subdirectory aSubDir - * param aSubDir = the directory to find in tree - * return the opaque reference to the tree item. - * if not found, return an invalid tree item. - * therefore wxTreeItemId::IsOk should be used to test - * the returned value - */ + wxTreeItemId TREE_PROJECT_FRAME::findSubdirTreeItem( const wxString& aSubDir ) { // If the subdir is the current working directory, return m_root @@ -918,14 +855,14 @@ wxTreeItemId TREE_PROJECT_FRAME::findSubdirTreeItem( const wxString& aSubDir ) if( itemData && ( itemData->GetType() == TREE_DIRECTORY ) ) { - if( itemData->m_FileName == aSubDir ) // Found! + if( itemData->GetFileName() == aSubDir ) // Found! { root_id = kid; break; } // kid is a subdir, push in list to explore it later - if( itemData->m_WasPopulated ) + if( itemData->IsPopulated() ) subdirs_id.push( kid ); } kid = m_TreeProject->GetNextChild( root_id, cookie ); @@ -934,12 +871,9 @@ wxTreeItemId TREE_PROJECT_FRAME::findSubdirTreeItem( const wxString& aSubDir ) return root_id; } + #ifdef KICAD_USE_FILES_WATCHER -/* called when a file or directory is modified/created/deleted - * The tree project is modified when a file or directory - * is created/deleted/renamed to reflect the file change - */ - void TREE_PROJECT_FRAME::OnFileSystemEvent( wxFileSystemWatcherEvent& event ) +void TREE_PROJECT_FRAME::OnFileSystemEvent( wxFileSystemWatcherEvent& event ) { wxFileName pathModified = event.GetPath(); wxString subdir = pathModified.GetPath(); @@ -981,7 +915,7 @@ wxTreeItemId TREE_PROJECT_FRAME::findSubdirTreeItem( const wxString& aSubDir ) { TREEPROJECT_ITEM* itemData = GetItemIdData( kid ); - if( itemData && ( itemData->m_FileName == fn ) ) + if( itemData && itemData->GetFileName() == fn ) { m_TreeProject->Delete( kid ); return; @@ -991,35 +925,33 @@ wxTreeItemId TREE_PROJECT_FRAME::findSubdirTreeItem( const wxString& aSubDir ) break; case wxFSW_EVENT_RENAME : - { - wxFileName newpath = event.GetNewPath(); - wxString newfn = newpath.GetFullPath(); - while( kid.IsOk() ) { - TREEPROJECT_ITEM* itemData = GetItemIdData( kid ); + wxFileName newpath = event.GetNewPath(); + wxString newfn = newpath.GetFullPath(); - if( itemData && ( itemData->m_FileName == fn ) ) + while( kid.IsOk() ) { - m_TreeProject->Delete( kid ); - break; + TREEPROJECT_ITEM* itemData = GetItemIdData( kid ); + + if( itemData && itemData->GetFileName() == fn ) + { + m_TreeProject->Delete( kid ); + break; + } + + kid = m_TreeProject->GetNextChild( root_id, cookie ); } - kid = m_TreeProject->GetNextChild( root_id, cookie ); + AddItemToTreeProject( newfn, root_id, false ); } - AddItemToTreeProject( newfn, root_id, false ); - } break; } - /* Sort filenames by alphabetic order */ + // Sort filenames by alphabetic order m_TreeProject->SortChildren( root_id ); } -/* Reinit the watched paths - * Should be called after opening a new project to - * rebuild the list of watched paths. - * Should be called after the main loop event handler is started - */ + void TREE_PROJECT_FRAME::FileWatcherReset() { // Prepare file watcher: @@ -1065,13 +997,14 @@ void TREE_PROJECT_FRAME::FileWatcherReset() if( itemData && ( itemData->GetType() == TREE_DIRECTORY ) ) { - watched_path = wxFileName::DirName( itemData->m_FileName ); + watched_path = wxFileName::DirName( itemData->GetFileName() ); m_watcher->Add( watched_path ); // if kid is a subdir, push in list to explore it later - if( itemData->m_WasPopulated && m_TreeProject->GetChildrenCount( kid ) ) + if( itemData->IsPopulated() && m_TreeProject->GetChildrenCount( kid ) ) subdirs_id.push( kid ); } + kid = m_TreeProject->GetNextChild( root_id, cookie ); } #endif @@ -1084,14 +1017,6 @@ void TREE_PROJECT_FRAME::FileWatcherReset() #endif } -/* Called by sending a event with id = ID_INIT_WATCHED_PATHS - * rebuild the list of whatched paths - * We are using an event called function to install or reinit a file system watcher - * because a file watcher *needs* a running loop event handler. - * this is noticeable under Linux. - * therefore the safe way to do that is to use the main event loop - * to call m_LeftWin->FileWatcherReset() - */ void KICAD_MANAGER_FRAME::OnChangeWatchedPaths(wxCommandEvent& aEvent ) { m_LeftWin->FileWatcherReset(); diff --git a/kicad/tree_project_frame.h b/kicad/tree_project_frame.h index 4317b25178..5cb98742c3 100644 --- a/kicad/tree_project_frame.h +++ b/kicad/tree_project_frame.h @@ -58,7 +58,12 @@ private: public: TREE_PROJECT_FRAME( KICAD_MANAGER_FRAME* parent ); ~TREE_PROJECT_FRAME(); + + /** + * Create or modify the tree showing project file names + */ void ReCreateTreePrj(); + #ifdef KICAD_USE_FILES_WATCHER /** * Reinit the watched paths @@ -162,8 +167,8 @@ private: bool aRecurse = true ); /** - * function findSubdirTreeItem - * Search for the item in tree project which is the + * Function findSubdirTreeItem + * searches for the item in tree project which is the * node of the subdirectory aSubDir * @param aSubDir = the directory to find in tree * @return the opaque reference to the tree item. diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 67c4cc363f..ade13d4726 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -45,6 +45,7 @@ endif() include_directories( ${PROJECT_SOURCE_DIR}/include ${PROJECT_SOURCE_DIR}/pcbnew + ${BOOST_INCLUDE} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_BINARY_DIR} ) diff --git a/tools/property_tree.cpp b/tools/property_tree.cpp index dfe898b898..0386d2120e 100644 --- a/tools/property_tree.cpp +++ b/tools/property_tree.cpp @@ -58,7 +58,7 @@ int main( int argc, char** argv ) static const KEYWORD empty_keywords[1] = {}; - DSNLEXER lexer( empty_keywords, 0, fp, wxString( FROM_UTF8( argv[1] ) ) ); + DSNLEXER lexer( empty_keywords, 0, fp, FROM_UTF8( argv[1] ) ); try { From 853abdac24ab282ffc6ef995fe2349093aaf94fa Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Tue, 8 Jul 2014 19:52:46 -0500 Subject: [PATCH 561/741] kicad.exe work: *) re-enable the MacOpen() support. *) fix path truncation bug. *) open *.kicad_pcb and *.sch files in the same process if they are part of the the currently open project, even from the tree view. --- kicad/class_treeproject_item.cpp | 67 +++++++++++------ kicad/class_treeproject_item.h | 14 ++-- kicad/files-io.cpp | 6 +- kicad/kicad.cpp | 26 +------ kicad/kicad.h | 15 +++- kicad/mainframe.cpp | 123 ++++++++++++++++++++----------- kicad/prjconfig.cpp | 30 ++++---- kicad/tree_project_frame.cpp | 14 ++-- 8 files changed, 172 insertions(+), 123 deletions(-) diff --git a/kicad/class_treeproject_item.cpp b/kicad/class_treeproject_item.cpp index 1c28d5701d..30ce219716 100644 --- a/kicad/class_treeproject_item.cpp +++ b/kicad/class_treeproject_item.cpp @@ -48,11 +48,12 @@ TREEPROJECT_ITEM::TREEPROJECT_ITEM( enum TreeFileType type, const wxString& data wxTreeCtrl* parent ) : wxTreeItemData() { - m_Type = type; m_parent = parent; - m_FileName = data; - m_IsRootFile = false; // true only for the root item of the tree (the project name) - m_IsPopulated = false; + + SetType( type ); + SetFileName( data ); + SetRootFile( false ); // true only for the root item of the tree (the project name) + SetPopulated( false ); } @@ -73,12 +74,9 @@ void TREEPROJECT_ITEM::SetState( int state ) const wxString TREEPROJECT_ITEM::GetDir() const { if( TREE_DIRECTORY == m_Type ) - return m_FileName; + return GetFileName(); - wxFileName filename = wxFileName( m_FileName ); - - wxString dir = filename.GetPath(); - return dir; + return wxFileName( GetFileName() ).GetPath(); } @@ -100,7 +98,7 @@ bool TREEPROJECT_ITEM::Rename( const wxString& name, bool check ) else newFile = name; - if( newFile == m_FileName ) + if( newFile == GetFileName() ) return false; wxString ext = TREE_PROJECT_FRAME::GetFileExt( GetType() ); @@ -123,10 +121,10 @@ type.\n Do you want to continue ?" #if ( ( wxMAJOR_VERSION < 2 ) || ( ( wxMAJOR_VERSION == 2 ) \ && ( wxMINOR_VERSION < 7 ) ) ) - if( !wxRenameFile( m_FileName, newFile ) ) + if( !wxRenameFile( GetFileName(), newFile ) ) #else - if( !wxRenameFile( m_FileName, newFile, false ) ) + if( !wxRenameFile( GetFileName(), newFile, false ) ) #endif { wxMessageDialog( m_parent, _( "Unable to rename file ... " ), @@ -156,18 +154,18 @@ bool TREEPROJECT_ITEM::Delete( bool check ) { bool success; - if( !wxDirExists( m_FileName ) ) - success = wxRemoveFile( m_FileName ); + if( !wxDirExists( GetFileName() ) ) + success = wxRemoveFile( GetFileName() ); else { wxArrayString filelist; - wxDir::GetAllFiles( m_FileName, &filelist ); + wxDir::GetAllFiles( GetFileName(), &filelist ); for( unsigned int i = 0; i < filelist.Count(); i++ ) wxRemoveFile( filelist[i] ); - success = wxRmdir( m_FileName ); + success = wxRmdir( GetFileName() ); } if( success ) @@ -188,8 +186,6 @@ void TREEPROJECT_ITEM::Activate( TREE_PROJECT_FRAME* prjframe ) KICAD_MANAGER_FRAME* mainFrame = (KICAD_MANAGER_FRAME*) Pgm().App().GetTopWindow(); - AddDelimiterString( fullFileName ); - switch( GetType() ) { case TREE_PROJECT: @@ -200,16 +196,41 @@ void TREEPROJECT_ITEM::Activate( TREE_PROJECT_FRAME* prjframe ) break; case TREE_SCHEMA: - mainFrame->Execute( m_parent, EESCHEMA_EXE, fullFileName ); + { + wxFileName ffn( fullFileName ); + wxFileName pro( mainFrame->GetProjectFileName() ); + + // compare all but the extension: + if( pro.GetPath()==ffn.GetPath() && pro.GetName()==ffn.GetName() ) + { + // the project's schematic is opened using the *.kiface as part of this process. + mainFrame->RunEeschema( fullFileName ); + } + else + { + // schematics not part of the project are opened in a separate process. + mainFrame->Execute( m_parent, EESCHEMA_EXE, fullFileName ); + } + } break; case TREE_LEGACY_PCB: case TREE_SEXP_PCB: { - DBG( printf( "%s: %s\n", __func__, TO_UTF8( fullFileName ) ); ) + wxFileName ffn( fullFileName ); + wxFileName pro( mainFrame->GetProjectFileName() ); - - mainFrame->Execute( m_parent, PCBNEW_EXE, fullFileName ); + // compare all but the extension: + if( pro.GetPath()==ffn.GetPath() && pro.GetName()==ffn.GetName() ) + { + // the project's BOARD is opened using the *.kiface as part of this process. + mainFrame->RunPcbNew( fullFileName ); + } + else + { + // boards not part of the project are opened in a separate process. + mainFrame->Execute( m_parent, PCBNEW_EXE, fullFileName ); + } } break; @@ -218,6 +239,7 @@ void TREEPROJECT_ITEM::Activate( TREE_PROJECT_FRAME* prjframe ) break; case TREE_PDF: + AddDelimiterString( fullFileName ); OpenPDF( fullFileName ); break; @@ -239,6 +261,7 @@ void TREEPROJECT_ITEM::Activate( TREE_PROJECT_FRAME* prjframe ) break; default: + AddDelimiterString( fullFileName ); OpenFile( fullFileName ); break; } diff --git a/kicad/class_treeproject_item.h b/kicad/class_treeproject_item.h index 9319410981..3793638cd6 100644 --- a/kicad/class_treeproject_item.h +++ b/kicad/class_treeproject_item.h @@ -7,7 +7,7 @@ */ class TREEPROJECT_ITEM : public wxTreeItemData { - friend class KICAD_MANAGER_FRAME; + //friend class KICAD_MANAGER_FRAME; public: @@ -17,7 +17,7 @@ public: TREEPROJECT_ITEM() : m_parent( NULL ) { } TREEPROJECT_ITEM( const TREEPROJECT_ITEM& src ) : - m_Type( src.m_Type ), m_FileName( src.m_FileName ), m_parent( src.m_parent ) + m_Type( src.m_Type ), m_file_name( src.m_file_name ), m_parent( src.m_parent ) { SetState( src.m_state ); m_IsPopulated = false; @@ -26,8 +26,12 @@ public: TreeFileType GetType() const { return m_Type; } void SetType( TreeFileType aType ) { m_Type = aType; } - const wxString& GetFileName() const { return m_FileName; } - void SetFileName( const wxString& name ) { m_FileName = name; } + const wxString& GetFileName() const { return m_file_name; } + void SetFileName( const wxString& name ) + { + m_file_name = name; + // DBG(printf("%s: '%s'\n", __func__, TO_UTF8( name ) );) + } bool IsRootFile() const { return m_IsRootFile; } void SetRootFile( bool aValue ) { m_IsRootFile = aValue; } @@ -50,7 +54,7 @@ public: private: TreeFileType m_Type; // = TREE_PROJECT, TREE_DIRECTORY ... - wxString m_FileName; // Filename for a file, or directory name + wxString m_file_name; // Filename for a file, or directory name bool m_IsRootFile; // True if m_Filename is a root schematic (same name as project) bool m_IsPopulated; // True if the name is a directory, and its content was read wxTreeCtrl* m_parent; diff --git a/kicad/files-io.cpp b/kicad/files-io.cpp index d7c724698f..6e1ca00db8 100644 --- a/kicad/files-io.cpp +++ b/kicad/files-io.cpp @@ -50,7 +50,7 @@ void KICAD_MANAGER_FRAME::OnFileHistory( wxCommandEvent& event ) wxString fn = GetFileFromHistory( event.GetId(), _( "KiCad project file" ), &Pgm().GetFileHistory() ); - if( fn != wxEmptyString ) + if( fn.size() ) { wxCommandEvent cmd( 0, wxID_ANY ); @@ -73,7 +73,7 @@ void KICAD_MANAGER_FRAME::OnUnarchiveFiles( wxCommandEvent& event ) if( dlg.ShowModal() == wxID_CANCEL ) return; - wxString msg = wxString::Format( _("\nOpen <%s>\n" ), GetChars( dlg.GetPath() ) ); + wxString msg = wxString::Format( _("\nOpen '%s'\n" ), GetChars( dlg.GetPath() ) ); PrintMsg( msg ); wxDirDialog dirDlg( this, _( "Target Directory" ), fn.GetPath(), @@ -83,7 +83,7 @@ void KICAD_MANAGER_FRAME::OnUnarchiveFiles( wxCommandEvent& event ) return; wxSetWorkingDirectory( dirDlg.GetPath() ); - msg.Printf( _( "Unzipping project in <%s>\n" ), GetChars( dirDlg.GetPath() ) ); + msg.Printf( _( "Unzipping project in '%s'\n" ), GetChars( dirDlg.GetPath() ) ); PrintMsg( msg ); wxFileSystem zipfilesys; diff --git a/kicad/kicad.cpp b/kicad/kicad.cpp index caea06763f..23d0d5c1c1 100644 --- a/kicad/kicad.cpp +++ b/kicad/kicad.cpp @@ -214,37 +214,17 @@ void PGM_KICAD::OnPgmExit() void PGM_KICAD::MacOpenFile( const wxString& aFileName ) { -#if 0 // I'm tired, need a rest. +#if defined(__WXMAC__) - KICAD_MANAGER_FRAME* frame = (KICAD_MANAGER_FRAME*) GetTopWindow(); + KICAD_MANAGER_FRAME* frame = (KICAD_MANAGER_FRAME*) App().GetTopWindow(); - frame->SetProjectFile( aFileName ); - - wxFileName fn = aFileName; - - if( !fn.FileExists() && m_fileHistory.GetCount() ) - { - m_fileHistory.RemoveFileFromHistory( 0 ); - return; - } + frame->SetProjectFileName( aFileName ); wxCommandEvent loadEvent; loadEvent.SetId( wxID_ANY ); frame->OnLoadProject( loadEvent ); - - wxString title = GetTitle() + wxT( " " ) + GetBuildVersion() + - wxT( " " ) + frame->GetProjectFileName(); - - if( !fn.IsDirWritable() ) - title += _( " [Read Only]" ); - - frame->SetTitle( title ); - - frame->m_LeftWin->ReCreateTreePrj(); - - frame->PrintPrjInfo(); #endif } diff --git a/kicad/kicad.h b/kicad/kicad.h index 598aff73ee..317ad498ed 100644 --- a/kicad/kicad.h +++ b/kicad/kicad.h @@ -203,7 +203,7 @@ public: * @param param = parameters to be passed to the executable. */ void Execute( wxWindow* frame, const wxString& execFile, - const wxString& param = wxEmptyString ); + wxString param = wxEmptyString ); class TERMINATE_HANDLER : public wxProcess { @@ -233,6 +233,17 @@ public: // read only accessors const wxString SchFileName(); const wxString PcbFileName(); + const wxString PcbLegacyFileName(); + + void ReCreateTreePrj(); + + /// Call this only for a PCB associated with the current project. That is, + /// it must have the same path and name as the project *.pro file. + void RunPcbNew( const wxString& aProjectBoardFileName ); + + /// Call this only for a SCH associated with the current project. That is, + /// it must have the same path and name as the project *.pro file. + void RunEeschema( const wxString& aProjectSchematicFileName ); DECLARE_EVENT_TABLE() @@ -248,7 +259,7 @@ private: LAUNCHER_PANEL* m_Launcher; wxTextCtrl* m_MessagesBox; wxAuiToolBar* m_VToolBar; // Vertical toolbar (not used) - wxFileName m_project_file_name; + wxString m_project_file_name; int m_leftWinWidth; diff --git a/kicad/mainframe.cpp b/kicad/mainframe.cpp index 921e140080..51bb45b8c4 100644 --- a/kicad/mainframe.cpp +++ b/kicad/mainframe.cpp @@ -124,23 +124,27 @@ wxConfigBase* KICAD_MANAGER_FRAME::config() return ret; } + void KICAD_MANAGER_FRAME::SetProjectFileName( const wxString& aFullProjectProFileName ) { m_project_file_name = aFullProjectProFileName; - wxASSERT( m_project_file_name.IsAbsolute() ); + wxASSERT( wxFileName( m_project_file_name ).IsAbsolute() || + wxFileName( m_project_file_name ).GetName() == NAMELESS_PROJECT wxT( ".pro" ) ); } const wxString KICAD_MANAGER_FRAME::GetProjectFileName() { - return m_project_file_name.GetFullPath(); + return m_project_file_name; } const wxString KICAD_MANAGER_FRAME::SchFileName() { - wxFileName fn( GetProjectFileName(), SchematicFileExtension ); + wxFileName fn( GetProjectFileName() ); + + fn.SetExt( SchematicFileExtension ); return fn.GetFullName(); } @@ -148,12 +152,30 @@ const wxString KICAD_MANAGER_FRAME::SchFileName() const wxString KICAD_MANAGER_FRAME::PcbFileName() { - wxFileName fn( GetProjectFileName(), PcbFileExtension ); + wxFileName fn( GetProjectFileName() ); + + fn.SetExt( PcbFileExtension ); return fn.GetFullName(); } +const wxString KICAD_MANAGER_FRAME::PcbLegacyFileName() +{ + wxFileName fn( GetProjectFileName() ); + + fn.SetExt( LegacyPcbFileExtension ); + + return fn.GetFullName(); +} + + +void KICAD_MANAGER_FRAME::ReCreateTreePrj() +{ + m_LeftWin->ReCreateTreePrj(); +} + + const SEARCH_STACK& KICAD_MANAGER_FRAME::sys_search() { return Pgm().SysSearch(); @@ -227,11 +249,14 @@ void KICAD_MANAGER_FRAME::TERMINATE_HANDLER::OnTerminate( int pid, int status ) void KICAD_MANAGER_FRAME::Execute( wxWindow* frame, const wxString& execFile, - const wxString& param ) + wxString params ) { + if( params.size() ) + AddDelimiterString( params ); + TERMINATE_HANDLER* callback = new TERMINATE_HANDLER( execFile ); - long pid = ExecuteFile( frame, execFile, param, callback ); + long pid = ExecuteFile( frame, execFile, params, callback ); if( pid > 0 ) { @@ -247,6 +272,54 @@ void KICAD_MANAGER_FRAME::Execute( wxWindow* frame, const wxString& execFile, } +void KICAD_MANAGER_FRAME::RunEeschema( const wxString& aProjectSchematicFileName ) +{ + KIWAY_PLAYER* frame = Kiway.Player( FRAME_SCH, false ); + if( !frame ) + { + frame = Kiway.Player( FRAME_SCH, true ); + frame->OpenProjectFiles( std::vector( 1, aProjectSchematicFileName ) ); + frame->Show( true ); + } + frame->Raise(); +} + + +void KICAD_MANAGER_FRAME::OnRunEeschema( wxCommandEvent& event ) +{ + wxFileName fn( m_project_file_name ); + + fn.SetExt( SchematicFileExtension ); + + RunEeschema( fn.GetFullPath() ); +} + + +void KICAD_MANAGER_FRAME::RunPcbNew( const wxString& aProjectBoardFileName ) +{ + KIWAY_PLAYER* frame = Kiway.Player( FRAME_PCB, false ); + if( !frame ) + { + frame = Kiway.Player( FRAME_PCB, true ); + frame->OpenProjectFiles( std::vector( 1, aProjectBoardFileName ) ); + frame->Show( true ); + } + frame->Raise(); +} + + +void KICAD_MANAGER_FRAME::OnRunPcbNew( wxCommandEvent& event ) +{ + wxFileName kicad_board( PcbFileName() ); + wxFileName legacy_board( PcbLegacyFileName() ); + + wxFileName& board = ( !legacy_board.FileExists() || kicad_board.FileExists() ) ? + kicad_board : legacy_board; + + RunPcbNew( board.GetFullPath() ); +} + + void KICAD_MANAGER_FRAME::OnRunBitmapConverter( wxCommandEvent& event ) { Execute( this, BITMAPCONVERTER_EXE ); @@ -264,27 +337,6 @@ void KICAD_MANAGER_FRAME::OnRunPageLayoutEditor( wxCommandEvent& event ) } -void KICAD_MANAGER_FRAME::OnRunPcbNew( wxCommandEvent& event ) -{ - wxFileName kicad_board( PcbFileName() ); - - wxFileName legacy_board( GetProjectFileName() ); - legacy_board.SetExt( LegacyPcbFileExtension ); - - wxFileName& board = ( !legacy_board.FileExists() || kicad_board.FileExists() ) ? - kicad_board : legacy_board; - - KIWAY_PLAYER* frame = Kiway.Player( FRAME_PCB, false ); - if( !frame ) - { - frame = Kiway.Player( FRAME_PCB, true ); - frame->OpenProjectFiles( std::vector( 1, board.GetFullPath() ) ); - frame->Show( true ); - } - frame->Raise(); -} - - void KICAD_MANAGER_FRAME::OnRunCvpcb( wxCommandEvent& event ) { wxFileName fn( m_project_file_name ); @@ -302,23 +354,6 @@ void KICAD_MANAGER_FRAME::OnRunCvpcb( wxCommandEvent& event ) } -void KICAD_MANAGER_FRAME::OnRunEeschema( wxCommandEvent& event ) -{ - wxFileName fn( m_project_file_name ); - - fn.SetExt( SchematicFileExtension ); - - KIWAY_PLAYER* frame = Kiway.Player( FRAME_SCH, false ); - if( !frame ) - { - frame = Kiway.Player( FRAME_SCH, true ); - frame->OpenProjectFiles( std::vector( 1, fn.GetFullPath() ) ); - frame->Show( true ); - } - frame->Raise(); -} - - void KICAD_MANAGER_FRAME::OnRunGerbview( wxCommandEvent& event ) { // Gerbview is called without any file to open, because we do not know diff --git a/kicad/prjconfig.cpp b/kicad/prjconfig.cpp index 501ecd6dcf..260cc03164 100644 --- a/kicad/prjconfig.cpp +++ b/kicad/prjconfig.cpp @@ -182,14 +182,13 @@ void KICAD_MANAGER_FRAME::OnLoadProject( wxCommandEvent& event ) { wxString title; - // this is still a mess, will work on it tomorrow. + // this is still a pr, will work on it tomorrow. ClearMsg(); if( event.GetId() != wxID_ANY ) { - int style; - + int style; bool newProject = ( event.GetId() == ID_NEW_PROJECT ) || ( event.GetId() == ID_NEW_PROJECT_FROM_TEMPLATE ); @@ -212,6 +211,7 @@ void KICAD_MANAGER_FRAME::OnLoadProject( wxCommandEvent& event ) return; wxFileName pro( dlg.GetPath() ); + pro.SetExt( ProjectFileExtension ); if( newProject ) @@ -248,40 +248,40 @@ void KICAD_MANAGER_FRAME::OnLoadProject( wxCommandEvent& event ) } } - SetProjectFileName( pro.GetFullName() ); + SetProjectFileName( pro.GetFullPath() ); } - wxLogDebug( wxT( "Loading KiCad project file: " ) + GetProjectFileName() ); - - // Check if project file exists and if it is not noname.pro - wxString filename = GetProjectFileName(); + wxString prj_filename = GetProjectFileName(); wxString nameless_prj = NAMELESS_PROJECT wxT( ".pro" ); - if( !wxFileExists( GetProjectFileName() ) && !filename.IsSameAs( nameless_prj ) ) + // Check if project file exists and if it is not noname.pro + if( !wxFileExists( prj_filename ) && !prj_filename.IsSameAs( nameless_prj ) ) { wxString msg = wxString::Format( _( "KiCad project file '%s' not found" ), - GetChars( GetProjectFileName() ) ); + GetChars( prj_filename ) ); DisplayError( this, msg ); return; } - wxSetWorkingDirectory( wxFileName( GetProjectFileName() ).GetPath() ); + wxSetWorkingDirectory( wxFileName( prj_filename ).GetPath() ); // was wxGetApp().ReadProjectConfig( m_ProjectFileName.GetFullPath(), // GeneralGroupName, s_KicadManagerParams, false ); - Prj().ConfigLoad( Pgm().SysSearch(), GetProjectFileName(), + Prj().ConfigLoad( Pgm().SysSearch(), prj_filename, GeneralGroupName, s_KicadManagerParams, false ); - title = wxT( "KiCad " ) + GetBuildVersion() + wxT( ' ' ) + GetProjectFileName(); + title = wxT( "KiCad " ) + GetBuildVersion() + wxT( ' ' ) + prj_filename; - if( !wxIsWritable( GetProjectFileName() ) ) + if( !wxFileName( prj_filename ).IsDirWritable() ) title += _( " [Read Only]" ); SetTitle( title ); - UpdateFileHistory( GetProjectFileName(), &Pgm().GetFileHistory() ); + + if( !prj_filename.IsSameAs( nameless_prj ) ) + UpdateFileHistory( prj_filename, &Pgm().GetFileHistory() ); m_LeftWin->ReCreateTreePrj(); diff --git a/kicad/tree_project_frame.cpp b/kicad/tree_project_frame.cpp index 383dd06b34..eec1659008 100644 --- a/kicad/tree_project_frame.cpp +++ b/kicad/tree_project_frame.cpp @@ -618,7 +618,7 @@ void TREE_PROJECT_FRAME::OnRight( wxTreeEvent& Event ) { int tree_id; TREEPROJECT_ITEM* tree_data; - wxString FullFileName; + wxString fullFileName; wxTreeItemId curr_item = Event.GetItem(); // Ensure item is selected (Under Windows right click does not select the item) @@ -630,7 +630,7 @@ void TREE_PROJECT_FRAME::OnRight( wxTreeEvent& Event ) return; tree_id = tree_data->GetType(); - FullFileName = tree_data->GetFileName(); + fullFileName = tree_data->GetFileName(); wxMenu popupMenu; @@ -684,12 +684,12 @@ void TREE_PROJECT_FRAME::OnOpenSelectedFileWithTextEditor( wxCommandEvent& event if( tree_data->GetType() == TREE_DIRECTORY ) return; - wxString FullFileName = tree_data->GetFileName(); - AddDelimiterString( FullFileName ); + wxString fullFileName = tree_data->GetFileName(); + AddDelimiterString( fullFileName ); wxString editorname = Pgm().GetEditorName(); if( !editorname.IsEmpty() ) - ExecuteFile( this, editorname, FullFileName ); + ExecuteFile( this, editorname, fullFileName ); } @@ -736,8 +736,6 @@ void TREE_PROJECT_FRAME::OnRenameFile( wxCommandEvent& ) void TREE_PROJECT_FRAME::OnSelect( wxTreeEvent& Event ) { - wxString FullFileName; - TREEPROJECT_ITEM* tree_data = GetSelectedData(); if( !tree_data ) @@ -749,8 +747,6 @@ void TREE_PROJECT_FRAME::OnSelect( wxTreeEvent& Event ) void TREE_PROJECT_FRAME::OnExpand( wxTreeEvent& Event ) { - wxString FullFileName; - wxTreeItemId itemId = Event.GetItem(); TREEPROJECT_ITEM* tree_data = GetItemIdData( itemId ); From 2f6c5f315690ced8220b34178305ba2d077360cf Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 10:34:00 +0200 Subject: [PATCH 562/741] Removed EDA_DRAW_FRAME::SetGalCanvasActive() [it may be misleading], added EDA_DRAW_PANEL_GAL::GetBackend(). --- common/draw_frame.cpp | 5 +---- common/draw_panel_gal.cpp | 9 +++------ include/class_draw_panel_gal.h | 11 ++++++++++- include/draw_frame.h | 1 - 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/common/draw_frame.cpp b/common/draw_frame.cpp index 182e54fb6f..0d8030953f 100644 --- a/common/draw_frame.cpp +++ b/common/draw_frame.cpp @@ -1033,10 +1033,7 @@ void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable ) m_auimgr.GetPane( wxT( "DrawFrameGal" ) ).Show( aEnable ); m_auimgr.Update(); - SetGalCanvasActive( aEnable ); - - if( aEnable ) - GetGalCanvas()->SetFocus(); + m_galCanvasActive = aEnable; } //-----< BASE_SCREEN API moved here >-------------------------------------------- diff --git a/common/draw_panel_gal.cpp b/common/draw_panel_gal.cpp index 1b293c63ac..6966a635df 100644 --- a/common/draw_panel_gal.cpp +++ b/common/draw_panel_gal.cpp @@ -51,7 +51,7 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin wxWindow( aParentWindow, aWindowId, aPosition, aSize ) { m_gal = NULL; - m_currentGal = GAL_TYPE_NONE; + m_backend = GAL_TYPE_NONE; m_view = NULL; m_painter = NULL; m_eventDispatcher = NULL; @@ -92,8 +92,6 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin m_pendingRefresh = false; m_drawing = false; Connect( wxEVT_TIMER, wxTimerEventHandler( EDA_DRAW_PANEL_GAL::onRefreshTimer ), NULL, this ); - - this->SetFocus(); } @@ -204,7 +202,7 @@ void EDA_DRAW_PANEL_GAL::StopDrawing() void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType ) { // Do not do anything if the currently used GAL is correct - if( aGalType == m_currentGal && m_gal != NULL ) + if( aGalType == m_backend && m_gal != NULL ) return; // Prevent refreshing canvas during backend switch @@ -235,7 +233,7 @@ void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType ) if( m_view ) m_view->SetGAL( m_gal ); - m_currentGal = aGalType; + m_backend = aGalType; } @@ -244,7 +242,6 @@ void EDA_DRAW_PANEL_GAL::onEvent( wxEvent& aEvent ) if( !m_eventDispatcher ) { aEvent.Skip(); - return; } else { diff --git a/include/class_draw_panel_gal.h b/include/class_draw_panel_gal.h index 16de3a139c..2fe0d3e094 100644 --- a/include/class_draw_panel_gal.h +++ b/include/class_draw_panel_gal.h @@ -68,6 +68,15 @@ public: */ void SwitchBackend( GalType aGalType ); + /** + * Function GetBackend + * Returns the type of backend currently used by GAL canvas. + */ + inline GalType GetBackend() const + { + return m_backend; + } + /** * Function GetGAL() * Returns a pointer to the GAL instance used in the panel. @@ -159,7 +168,7 @@ protected: KIGFX::WX_VIEW_CONTROLS* m_viewControls; /// Currently used GAL - GalType m_currentGal; + GalType m_backend; /// Processes and forwards events to tools TOOL_DISPATCHER* m_eventDispatcher; diff --git a/include/draw_frame.h b/include/draw_frame.h index 6608c4b634..829c9317b5 100644 --- a/include/draw_frame.h +++ b/include/draw_frame.h @@ -675,7 +675,6 @@ public: * @return True for GAL-based canvas, false for standard canvas. */ bool IsGalCanvasActive() const { return m_galCanvasActive; } - void SetGalCanvasActive( bool aState ) { m_galCanvasActive = aState; } /** * Function GetGalCanvas From 9a47f4c645749f1b567f125c2f362794cc023d52 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 10:57:32 +0200 Subject: [PATCH 563/741] Created a specialization of EDA_DRAW_PANEL_GAL: PCB_DRAW_PANEL_GAL. Moved View related routines & fields from PCB_{BASE,EDIT}_FRAME & BOARD to PCB_DRAW_PANEL_GAL. --- common/draw_panel_gal.cpp | 22 ++ include/class_draw_panel_gal.h | 16 +- include/wxBasePcbFrame.h | 4 - include/wxPcbStruct.h | 18 -- pcbnew/CMakeLists.txt | 1 + pcbnew/basepcbframe.cpp | 141 +--------- pcbnew/class_board.cpp | 7 - pcbnew/class_board.h | 20 -- pcbnew/dialogs/dialog_general_options.cpp | 2 +- pcbnew/initpcb.cpp | 3 - pcbnew/pcb_draw_panel_gal.cpp | 315 ++++++++++++++++++++++ pcbnew/pcb_draw_panel_gal.h | 73 +++++ pcbnew/pcbframe.cpp | 210 +++------------ pcbnew/router/router_tool.cpp | 2 +- pcbnew/tools/drawing_tool.cpp | 3 +- pcbnew/tools/pcbnew_control.cpp | 2 +- 16 files changed, 476 insertions(+), 363 deletions(-) create mode 100644 pcbnew/pcb_draw_panel_gal.cpp create mode 100644 pcbnew/pcb_draw_panel_gal.h diff --git a/common/draw_panel_gal.cpp b/common/draw_panel_gal.cpp index 6966a635df..975d17c513 100644 --- a/common/draw_panel_gal.cpp +++ b/common/draw_panel_gal.cpp @@ -199,6 +199,28 @@ void EDA_DRAW_PANEL_GAL::StopDrawing() } +void EDA_DRAW_PANEL_GAL::SetHighContrastLayer( LAYER_NUM aLayer ) +{ + // Set display settings for high contrast mode + KIGFX::RENDER_SETTINGS* rSettings = m_view->GetPainter()->GetSettings(); + + SetTopLayer( aLayer ); + + rSettings->ClearActiveLayers(); + rSettings->SetActiveLayer( aLayer ); + + m_view->UpdateAllLayersColor(); +} + + +void EDA_DRAW_PANEL_GAL::SetTopLayer( LAYER_NUM aLayer ) +{ + m_view->ClearTopLayers(); + m_view->SetTopLayer( aLayer ); + m_view->UpdateAllLayersOrder(); +} + + void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType ) { // Do not do anything if the currently used GAL is correct diff --git a/include/class_draw_panel_gal.h b/include/class_draw_panel_gal.h index 2fe0d3e094..b698c91e1e 100644 --- a/include/class_draw_panel_gal.h +++ b/include/class_draw_panel_gal.h @@ -30,9 +30,9 @@ #ifndef PANELGAL_WXSTRUCT_H #define PANELGAL_WXSTRUCT_H -#include #include - +#include +#include #include class BOARD; @@ -133,6 +133,18 @@ public: */ void StopDrawing(); + /** + * Function SetHighContrastLayer + * Takes care of display settings for the given layer to be displayed in high contrast mode. + */ + virtual void SetHighContrastLayer( LAYER_NUM aLayer ); + + /** + * Function SetTopLayer + * Moves the selected layer to the top, so it is displayed above all others. + */ + virtual void SetTopLayer( LAYER_NUM aLayer ); + protected: void onPaint( wxPaintEvent& WXUNUSED( aEvent ) ); void onSize( wxSizeEvent& aEvent ); diff --git a/include/wxBasePcbFrame.h b/include/wxBasePcbFrame.h index d95bdfc64c..e5ab27d1c0 100644 --- a/include/wxBasePcbFrame.h +++ b/include/wxBasePcbFrame.h @@ -110,10 +110,6 @@ protected: MODULE* loadFootprint( const FPID& aFootprintId ) throw( IO_ERROR, PARSE_ERROR ); - ///> Rendering order of layers on GAL-based canvas (lower index in the array - ///> means that layer is displayed closer to the user, ie. on the top). - static const LAYER_NUM GAL_LAYER_ORDER[]; - public: PCB_BASE_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrameType, const wxString& aTitle, const wxPoint& aPos, const wxSize& aSize, diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index 8153fd9d5e..3cba461273 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -531,18 +531,6 @@ public: */ virtual void OnModify(); - /** - * Function SetHighContrastLayer - * takes care of display settings for the given layer to be displayed in high contrast mode. - */ - void SetHighContrastLayer( LAYER_ID aLayer ); - - /** - * Function SetTopLayer - * moves the selected layer to the top, so it is displayed above all others. - */ - void SetTopLayer( LAYER_ID aLayer ); - /** * Function SetActiveLayer * will change the currently active layer to \a aLayer and also @@ -890,12 +878,6 @@ public: /// @copydoc PCB_BASE_FRAME::SetBoard() void SetBoard( BOARD* aBoard ); - /** - * Function ViewReloadBoard - * adds all items from the current board to the VIEW, so they can be displayed by GAL. - */ - void ViewReloadBoard( const BOARD* aBoard ) const; - // Drc control /* function GetDrcController diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index d01059707e..f8253fb31f 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -221,6 +221,7 @@ set( PCBNEW_CLASS_SRCS pad_edition_functions.cpp pcbnew_config.cpp pcbplot.cpp + pcb_draw_panel_gal.cpp plot_board_layers.cpp plot_brditems_plotter.cpp print_board_functions.cpp diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index f45df75edb..fadf3e1774 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -51,7 +51,7 @@ #include #include -#include +#include #include #include #include @@ -75,82 +75,6 @@ static const wxChar DisplayModuleTextEntry[] = wxT( "DiModTx" ); static const wxChar FastGrid1Entry[] = wxT( "FastGrid1" ); static const wxChar FastGrid2Entry[] = wxT( "FastGrid2" ); -const LAYER_NUM PCB_BASE_FRAME::GAL_LAYER_ORDER[] = -{ - ITEM_GAL_LAYER( GP_OVERLAY ), - ITEM_GAL_LAYER( DRC_VISIBLE ), - NETNAMES_GAL_LAYER( PADS_NETNAMES_VISIBLE ), - Dwgs_User, Cmts_User, Eco1_User, Eco2_User, Edge_Cuts, - - // UNUSED_LAYER_29, UNUSED_LAYER_30, UNUSED_LAYER_31, - - ITEM_GAL_LAYER( MOD_TEXT_FR_VISIBLE ), - ITEM_GAL_LAYER( MOD_REFERENCES_VISIBLE), ITEM_GAL_LAYER( MOD_VALUES_VISIBLE ), - - ITEM_GAL_LAYER( RATSNEST_VISIBLE ), - ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), - ITEM_GAL_LAYER( VIA_THROUGH_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), - - NETNAMES_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_FR_VISIBLE ), F_Mask, - NETNAMES_GAL_LAYER( F_Cu ), F_Cu, - F_SilkS, F_Paste, F_Adhes, - -#if 0 // was: - NETNAMES_GAL_LAYER( LAYER_15_NETNAMES_VISIBLE ), LAYER_N_15, - NETNAMES_GAL_LAYER( LAYER_14_NETNAMES_VISIBLE ), LAYER_N_14, - NETNAMES_GAL_LAYER( LAYER_13_NETNAMES_VISIBLE ), LAYER_N_13, - NETNAMES_GAL_LAYER( LAYER_12_NETNAMES_VISIBLE ), LAYER_N_12, - NETNAMES_GAL_LAYER( LAYER_11_NETNAMES_VISIBLE ), LAYER_N_11, - NETNAMES_GAL_LAYER( LAYER_10_NETNAMES_VISIBLE ), LAYER_N_10, - NETNAMES_GAL_LAYER( LAYER_9_NETNAMES_VISIBLE ), LAYER_N_9, - NETNAMES_GAL_LAYER( LAYER_8_NETNAMES_VISIBLE ), LAYER_N_8, - NETNAMES_GAL_LAYER( LAYER_7_NETNAMES_VISIBLE ), LAYER_N_7, - NETNAMES_GAL_LAYER( LAYER_6_NETNAMES_VISIBLE ), LAYER_N_6, - NETNAMES_GAL_LAYER( LAYER_5_NETNAMES_VISIBLE ), LAYER_N_5, - NETNAMES_GAL_LAYER( LAYER_4_NETNAMES_VISIBLE ), LAYER_N_4, - NETNAMES_GAL_LAYER( LAYER_3_NETNAMES_VISIBLE ), LAYER_N_3, - NETNAMES_GAL_LAYER( LAYER_2_NETNAMES_VISIBLE ), LAYER_N_2, -#else - - NETNAMES_GAL_LAYER( In1_Cu ), In1_Cu, - NETNAMES_GAL_LAYER( In2_Cu ), In2_Cu, - NETNAMES_GAL_LAYER( In3_Cu ), In3_Cu, - NETNAMES_GAL_LAYER( In4_Cu ), In4_Cu, - NETNAMES_GAL_LAYER( In5_Cu ), In5_Cu, - NETNAMES_GAL_LAYER( In6_Cu ), In6_Cu, - NETNAMES_GAL_LAYER( In7_Cu ), In7_Cu, - NETNAMES_GAL_LAYER( In8_Cu ), In8_Cu, - NETNAMES_GAL_LAYER( In9_Cu ), In9_Cu, - NETNAMES_GAL_LAYER( In10_Cu ), In10_Cu, - NETNAMES_GAL_LAYER( In11_Cu ), In11_Cu, - NETNAMES_GAL_LAYER( In12_Cu ), In12_Cu, - NETNAMES_GAL_LAYER( In13_Cu ), In13_Cu, - NETNAMES_GAL_LAYER( In14_Cu ), In14_Cu, - NETNAMES_GAL_LAYER( In15_Cu ), In15_Cu, - NETNAMES_GAL_LAYER( In16_Cu ), In16_Cu, - NETNAMES_GAL_LAYER( In17_Cu ), In17_Cu, - NETNAMES_GAL_LAYER( In18_Cu ), In18_Cu, - NETNAMES_GAL_LAYER( In19_Cu ), In19_Cu, - NETNAMES_GAL_LAYER( In20_Cu ), In20_Cu, - NETNAMES_GAL_LAYER( In21_Cu ), In21_Cu, - NETNAMES_GAL_LAYER( In22_Cu ), In22_Cu, - NETNAMES_GAL_LAYER( In23_Cu ), In23_Cu, - NETNAMES_GAL_LAYER( In24_Cu ), In24_Cu, - NETNAMES_GAL_LAYER( In25_Cu ), In25_Cu, - NETNAMES_GAL_LAYER( In26_Cu ), In26_Cu, - NETNAMES_GAL_LAYER( In27_Cu ), In27_Cu, - NETNAMES_GAL_LAYER( In28_Cu ), In28_Cu, - NETNAMES_GAL_LAYER( In29_Cu ), In29_Cu, - NETNAMES_GAL_LAYER( In30_Cu ), In30_Cu, -#endif - NETNAMES_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_BK_VISIBLE ), B_Mask, - NETNAMES_GAL_LAYER( B_Cu ), B_Cu, - - B_Adhes, B_Paste, B_SilkS, - ITEM_GAL_LAYER( MOD_TEXT_BK_VISIBLE ), - ITEM_GAL_LAYER( WORKSHEET ) -}; - BEGIN_EVENT_TABLE( PCB_BASE_FRAME, EDA_DRAW_FRAME ) EVT_MENU_RANGE( ID_POPUP_PCB_ITEM_SELECTION_START, ID_POPUP_PCB_ITEM_SELECTION_END, @@ -193,16 +117,6 @@ PCB_BASE_FRAME::PCB_BASE_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrame m_FastGrid1 = 0; m_FastGrid2 = 0; - SetGalCanvas( new EDA_DRAW_PANEL_GAL( - this, -1, wxPoint( 0, 0 ), m_FrameSize, - EDA_DRAW_PANEL_GAL::GAL_TYPE_CAIRO ) ); - - // GAL should not be active yet - GetGalCanvas()->StopDrawing(); - - // Hide by default, it has to be explicitly shown - GetGalCanvas()->Hide(); - m_auxiliaryToolBar = NULL; } @@ -253,8 +167,11 @@ FP_LIB_TABLE* PROJECT::PcbFootprintLibs() void PCB_BASE_FRAME::SetBoard( BOARD* aBoard ) { - delete m_Pcb; - m_Pcb = aBoard; + if( m_Pcb != aBoard ) + { + delete m_Pcb; + m_Pcb = aBoard; + } } @@ -847,52 +764,6 @@ void PCB_BASE_FRAME::LoadSettings( wxConfigBase* aCfg ) if( m_DisplayModText < LINE || m_DisplayModText > SKETCH ) m_DisplayModText = FILLED; - // Apply display settings for GAL - KIGFX::VIEW* view = GetGalCanvas()->GetView(); - - // Set rendering order and properties of layers - for( LAYER_NUM i = 0; i < (int) DIM(GAL_LAYER_ORDER); ++i ) - { - LAYER_NUM layer = GAL_LAYER_ORDER[i]; - wxASSERT( layer < KIGFX::VIEW::VIEW_MAX_LAYERS ); - - view->SetLayerOrder( layer, i ); - - if( IsCopperLayer( layer ) ) - { - // Copper layers are required for netname layers - view->SetRequired( GetNetnameLayer( layer ), layer ); - view->SetLayerTarget( layer, KIGFX::TARGET_CACHED ); - } - else if( IsNetnameLayer( layer ) ) - { - // Netnames are drawn only when scale is sufficient (level of details) - // so there is no point in caching them - view->SetLayerTarget( layer, KIGFX::TARGET_NONCACHED ); - } - } - - // Some more required layers settings - view->SetRequired( ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( VIA_THROUGH_VISIBLE ) ); - view->SetRequired( ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ) ); - view->SetRequired( NETNAMES_GAL_LAYER( PADS_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ) ); - - view->SetRequired( NETNAMES_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_FR_VISIBLE ) ); - view->SetRequired( F_Adhes, ITEM_GAL_LAYER( PAD_FR_VISIBLE ) ); - view->SetRequired( F_Paste, ITEM_GAL_LAYER( PAD_FR_VISIBLE ) ); - view->SetRequired( F_Mask, ITEM_GAL_LAYER( PAD_FR_VISIBLE ) ); - - view->SetRequired( NETNAMES_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); - view->SetRequired( B_Adhes, ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); - view->SetRequired( B_Paste, ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); - view->SetRequired( B_Mask, ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); - - view->SetRequired( ITEM_GAL_LAYER( PAD_FR_VISIBLE ), ITEM_GAL_LAYER( MOD_FR_VISIBLE ) ); - view->SetRequired( ITEM_GAL_LAYER( PAD_BK_VISIBLE ), ITEM_GAL_LAYER( MOD_BK_VISIBLE ) ); - - view->SetLayerTarget( ITEM_GAL_LAYER( GP_OVERLAY ), KIGFX::TARGET_OVERLAY ); - view->SetLayerTarget( ITEM_GAL_LAYER( RATSNEST_VISIBLE ), KIGFX::TARGET_OVERLAY ); - // WxWidgets 2.9.1 seems call setlocale( LC_NUMERIC, "" ) // when reading doubles in config, // but forget to back to current locale. So we call SetLocaleTo_Default diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index 8e3ac850cd..f1d304817c 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -106,11 +106,6 @@ BOARD::BOARD() : // Initialize ratsnest m_ratsnest = new RN_DATA( this ); - m_ratsnestViewItem = new KIGFX::RATSNEST_VIEWITEM( m_ratsnest ); - - // Initialize view item for displaying worksheet frame - m_worksheetViewItem = new KIGFX::WORKSHEET_VIEWITEM( &m_paper, &m_titles ); - m_worksheetViewItem->SetFileName( std::string( m_fileName.mb_str() ) ); } @@ -122,8 +117,6 @@ BOARD::~BOARD() Delete( area_to_remove ); } - delete m_worksheetViewItem; - delete m_ratsnestViewItem; delete m_ratsnest; m_FullRatsnest.clear(); diff --git a/pcbnew/class_board.h b/pcbnew/class_board.h index 3bc5c0b73f..3cc7c35731 100644 --- a/pcbnew/class_board.h +++ b/pcbnew/class_board.h @@ -198,8 +198,6 @@ private: EDA_RECT m_BoundingBox; NETINFO_LIST m_NetInfo; ///< net info list (name, design constraints .. RN_DATA* m_ratsnest; - KIGFX::RATSNEST_VIEWITEM* m_ratsnestViewItem; ///< VIEW_ITEM that draws ratsnest - KIGFX::WORKSHEET_VIEWITEM* m_worksheetViewItem; ///< VIEW_ITEM that draws worksheet frame BOARD_DESIGN_SETTINGS m_designSettings; ZONE_SETTINGS m_zoneSettings; @@ -313,24 +311,6 @@ public: return m_ratsnest; } - /** - * Function GetRatsnestViewItem() - * returns VIEW_ITEM responsible for drawing the ratsnest for the board. - */ - KIGFX::RATSNEST_VIEWITEM* GetRatsnestViewItem() const - { - return m_ratsnestViewItem; - } - - /** - * Function GetWorksheetViewItem() - * returns VIEW_ITEM responsible for drawing the worksheet frame. - */ - KIGFX::WORKSHEET_VIEWITEM* GetWorksheetViewItem() const - { - return m_worksheetViewItem; - } - /** * Function DeleteMARKERs * deletes ALL MARKERS from the board. diff --git a/pcbnew/dialogs/dialog_general_options.cpp b/pcbnew/dialogs/dialog_general_options.cpp index 9adc32bdf6..9004aecf26 100644 --- a/pcbnew/dialogs/dialog_general_options.cpp +++ b/pcbnew/dialogs/dialog_general_options.cpp @@ -228,7 +228,7 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) // Apply new display options to the GAL canvas (this is faster than recaching) settings->LoadDisplayOptions( DisplayOpt ); - SetHighContrastLayer( GetActiveLayer() ); + GetGalCanvas()->SetHighContrastLayer( GetActiveLayer() ); m_canvas->Refresh(); break; diff --git a/pcbnew/initpcb.cpp b/pcbnew/initpcb.cpp index 05ac3198f4..d0d6ba49e7 100644 --- a/pcbnew/initpcb.cpp +++ b/pcbnew/initpcb.cpp @@ -61,9 +61,6 @@ bool PCB_EDIT_FRAME::Clear_Pcb( bool aQuery ) // Update display GetBoard()->SetVisibleLayers( LSET().set() ); - // Set currently selected layer to be shown in high contrast mode, when enabled` - SetHighContrastLayer( GetScreen()->m_Active_Layer ); - ReFillLayerWidget(); Zoom_Automatique( false ); diff --git a/pcbnew/pcb_draw_panel_gal.cpp b/pcbnew/pcb_draw_panel_gal.cpp new file mode 100644 index 0000000000..778570b1e5 --- /dev/null +++ b/pcbnew/pcb_draw_panel_gal.cpp @@ -0,0 +1,315 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 CERN + * @author Maciej Suminski + * + * 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 "pcb_draw_panel_gal.h" +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +const LAYER_NUM GAL_LAYER_ORDER[] = +{ + ITEM_GAL_LAYER( GP_OVERLAY ), + ITEM_GAL_LAYER( DRC_VISIBLE ), + NETNAMES_GAL_LAYER( PADS_NETNAMES_VISIBLE ), + Dwgs_User, Cmts_User, Eco1_User, Eco2_User, Edge_Cuts, + + ITEM_GAL_LAYER( MOD_TEXT_FR_VISIBLE ), + ITEM_GAL_LAYER( MOD_REFERENCES_VISIBLE), ITEM_GAL_LAYER( MOD_VALUES_VISIBLE ), + + ITEM_GAL_LAYER( RATSNEST_VISIBLE ), + ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), + ITEM_GAL_LAYER( VIA_THROUGH_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), + + NETNAMES_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_FR_VISIBLE ), F_Mask, + NETNAMES_GAL_LAYER( F_Cu ), F_Cu, + F_SilkS, F_Paste, F_Adhes, + +#if 0 // was: + NETNAMES_GAL_LAYER( LAYER_15_NETNAMES_VISIBLE ), LAYER_N_15, + NETNAMES_GAL_LAYER( LAYER_14_NETNAMES_VISIBLE ), LAYER_N_14, + NETNAMES_GAL_LAYER( LAYER_13_NETNAMES_VISIBLE ), LAYER_N_13, + NETNAMES_GAL_LAYER( LAYER_12_NETNAMES_VISIBLE ), LAYER_N_12, + NETNAMES_GAL_LAYER( LAYER_11_NETNAMES_VISIBLE ), LAYER_N_11, + NETNAMES_GAL_LAYER( LAYER_10_NETNAMES_VISIBLE ), LAYER_N_10, + NETNAMES_GAL_LAYER( LAYER_9_NETNAMES_VISIBLE ), LAYER_N_9, + NETNAMES_GAL_LAYER( LAYER_8_NETNAMES_VISIBLE ), LAYER_N_8, + NETNAMES_GAL_LAYER( LAYER_7_NETNAMES_VISIBLE ), LAYER_N_7, + NETNAMES_GAL_LAYER( LAYER_6_NETNAMES_VISIBLE ), LAYER_N_6, + NETNAMES_GAL_LAYER( LAYER_5_NETNAMES_VISIBLE ), LAYER_N_5, + NETNAMES_GAL_LAYER( LAYER_4_NETNAMES_VISIBLE ), LAYER_N_4, + NETNAMES_GAL_LAYER( LAYER_3_NETNAMES_VISIBLE ), LAYER_N_3, + NETNAMES_GAL_LAYER( LAYER_2_NETNAMES_VISIBLE ), LAYER_N_2, +#else + NETNAMES_GAL_LAYER( In1_Cu ), In1_Cu, + NETNAMES_GAL_LAYER( In2_Cu ), In2_Cu, + NETNAMES_GAL_LAYER( In3_Cu ), In3_Cu, + NETNAMES_GAL_LAYER( In4_Cu ), In4_Cu, + NETNAMES_GAL_LAYER( In5_Cu ), In5_Cu, + NETNAMES_GAL_LAYER( In6_Cu ), In6_Cu, + NETNAMES_GAL_LAYER( In7_Cu ), In7_Cu, + NETNAMES_GAL_LAYER( In8_Cu ), In8_Cu, + NETNAMES_GAL_LAYER( In9_Cu ), In9_Cu, + NETNAMES_GAL_LAYER( In10_Cu ), In10_Cu, + NETNAMES_GAL_LAYER( In11_Cu ), In11_Cu, + NETNAMES_GAL_LAYER( In12_Cu ), In12_Cu, + NETNAMES_GAL_LAYER( In13_Cu ), In13_Cu, + NETNAMES_GAL_LAYER( In14_Cu ), In14_Cu, + NETNAMES_GAL_LAYER( In15_Cu ), In15_Cu, + NETNAMES_GAL_LAYER( In16_Cu ), In16_Cu, + NETNAMES_GAL_LAYER( In17_Cu ), In17_Cu, + NETNAMES_GAL_LAYER( In18_Cu ), In18_Cu, + NETNAMES_GAL_LAYER( In19_Cu ), In19_Cu, + NETNAMES_GAL_LAYER( In20_Cu ), In20_Cu, + NETNAMES_GAL_LAYER( In21_Cu ), In21_Cu, + NETNAMES_GAL_LAYER( In22_Cu ), In22_Cu, + NETNAMES_GAL_LAYER( In23_Cu ), In23_Cu, + NETNAMES_GAL_LAYER( In24_Cu ), In24_Cu, + NETNAMES_GAL_LAYER( In25_Cu ), In25_Cu, + NETNAMES_GAL_LAYER( In26_Cu ), In26_Cu, + NETNAMES_GAL_LAYER( In27_Cu ), In27_Cu, + NETNAMES_GAL_LAYER( In28_Cu ), In28_Cu, + NETNAMES_GAL_LAYER( In29_Cu ), In29_Cu, + NETNAMES_GAL_LAYER( In30_Cu ), In30_Cu, +#endif + NETNAMES_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_BK_VISIBLE ), B_Mask, + NETNAMES_GAL_LAYER( B_Cu ), B_Cu, + + B_Adhes, B_Paste, B_SilkS, + ITEM_GAL_LAYER( MOD_TEXT_BK_VISIBLE ), + ITEM_GAL_LAYER( WORKSHEET ) +}; + + +PCB_DRAW_PANEL_GAL::PCB_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWindowId, + const wxPoint& aPosition, const wxSize& aSize, + GalType aGalType ) : +EDA_DRAW_PANEL_GAL( aParentWindow, aWindowId, aPosition, aSize, aGalType ) +{ + m_worksheet = NULL; + m_ratsnest = NULL; + + // Set rendering order and properties of layers + for( LAYER_NUM i = 0; (unsigned) i < sizeof(GAL_LAYER_ORDER) / sizeof(LAYER_NUM); ++i ) + { + LAYER_NUM layer = GAL_LAYER_ORDER[i]; + wxASSERT( layer < KIGFX::VIEW::VIEW_MAX_LAYERS ); + + m_view->SetLayerOrder( layer, i ); + + if( IsCopperLayer( layer ) ) + { + // Copper layers are required for netname layers + m_view->SetRequired( GetNetnameLayer( layer ), layer ); + m_view->SetLayerTarget( layer, KIGFX::TARGET_CACHED ); + } + else if( IsNetnameLayer( layer ) ) + { + // Netnames are drawn only when scale is sufficient (level of details) + // so there is no point in caching them + m_view->SetLayerTarget( layer, KIGFX::TARGET_NONCACHED ); + } + } + + // Some more required layers settings + m_view->SetRequired( ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( VIA_THROUGH_VISIBLE ) ); + m_view->SetRequired( ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ) ); + m_view->SetRequired( NETNAMES_GAL_LAYER( PADS_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ) ); + + m_view->SetRequired( NETNAMES_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_FR_VISIBLE ) ); + m_view->SetRequired( F_Adhes, ITEM_GAL_LAYER( PAD_FR_VISIBLE ) ); + m_view->SetRequired( F_Paste, ITEM_GAL_LAYER( PAD_FR_VISIBLE ) ); + m_view->SetRequired( F_Mask, ITEM_GAL_LAYER( PAD_FR_VISIBLE ) ); + + m_view->SetRequired( NETNAMES_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); + m_view->SetRequired( B_Adhes, ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); + m_view->SetRequired( B_Paste, ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); + m_view->SetRequired( B_Mask, ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); + + m_view->SetRequired( ITEM_GAL_LAYER( PAD_FR_VISIBLE ), ITEM_GAL_LAYER( MOD_FR_VISIBLE ) ); + m_view->SetRequired( ITEM_GAL_LAYER( PAD_BK_VISIBLE ), ITEM_GAL_LAYER( MOD_BK_VISIBLE ) ); + + m_view->SetLayerTarget( ITEM_GAL_LAYER( GP_OVERLAY ), KIGFX::TARGET_OVERLAY ); + m_view->SetLayerTarget( ITEM_GAL_LAYER( RATSNEST_VISIBLE ), KIGFX::TARGET_OVERLAY ); + + // Load display options (such as filled/outline display of items) + static_cast( m_view->GetPainter()->GetSettings() )->LoadDisplayOptions( DisplayOpt ); +} + + +PCB_DRAW_PANEL_GAL::~PCB_DRAW_PANEL_GAL() +{ + delete m_worksheet; + delete m_ratsnest; +} + + +void PCB_DRAW_PANEL_GAL::DisplayBoard( const BOARD* aBoard ) +{ + m_view->Clear(); + + // Load zones + for( int i = 0; i < aBoard->GetAreaCount(); ++i ) + m_view->Add( (KIGFX::VIEW_ITEM*) ( aBoard->GetArea( i ) ) ); + + // Load drawings + for( BOARD_ITEM* drawing = aBoard->m_Drawings; drawing; drawing = drawing->Next() ) + m_view->Add( drawing ); + + // Load tracks + for( TRACK* track = aBoard->m_Track; track; track = track->Next() ) + m_view->Add( track ); + + // Load modules and its additional elements + for( MODULE* module = aBoard->m_Modules; module; module = module->Next() ) + { + module->RunOnChildren( boost::bind( &KIGFX::VIEW::Add, m_view, _1 ) ); + m_view->Add( module ); + } + + // Segzones (equivalent of ZONE_CONTAINER for legacy boards) + for( SEGZONE* zone = aBoard->m_Zone; zone; zone = zone->Next() ) + m_view->Add( zone ); + + // Ratsnest + if( m_ratsnest ) + { + m_view->Remove( m_ratsnest ); + delete m_ratsnest; + } + + m_ratsnest = new KIGFX::RATSNEST_VIEWITEM( aBoard->GetRatsnest() ); + m_view->Add( m_ratsnest ); + + // Load layer color setup from PCB data + static_cast( m_view->GetPainter()->GetSettings() )->ImportLegacyColors( aBoard->GetColorsSettings() ); + + m_view->RecacheAllItems( true ); +} + + +void PCB_DRAW_PANEL_GAL::SetWorksheet( KIGFX::WORKSHEET_VIEWITEM* aWorksheet ) +{ + if( m_worksheet ) + { + m_view->Remove( m_worksheet ); + delete m_worksheet; + } + + m_worksheet = aWorksheet; + m_view->Add( m_worksheet ); + + // Limit panning to the size of worksheet frame + m_viewControls->SetPanBoundary( aWorksheet->ViewBBox() ); +} + + +void PCB_DRAW_PANEL_GAL::SetHighContrastLayer( LAYER_ID aLayer ) +{ + // Set display settings for high contrast mode + KIGFX::RENDER_SETTINGS* rSettings = m_view->GetPainter()->GetSettings(); + + SetTopLayer( aLayer ); + + rSettings->ClearActiveLayers(); + rSettings->SetActiveLayer( aLayer ); + + if( IsCopperLayer( aLayer ) ) + { + // Bring some other layers to the front in case of copper layers and make them colored + // fixme do not like the idea of storing the list of layers here, + // should be done in some other way I guess.. + LAYER_NUM layers[] = { + GetNetnameLayer( aLayer ), ITEM_GAL_LAYER( VIA_THROUGH_VISIBLE ), + ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), + ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), NETNAMES_GAL_LAYER( PADS_NETNAMES_VISIBLE ), + ITEM_GAL_LAYER( GP_OVERLAY ), ITEM_GAL_LAYER( RATSNEST_VISIBLE ) + }; + + for( unsigned int i = 0; i < sizeof( layers ) / sizeof( LAYER_NUM ); ++i ) + rSettings->SetActiveLayer( layers[i] ); + + // Pads should be shown too + if( aLayer == B_Cu ) + { + rSettings->SetActiveLayer( ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); + rSettings->SetActiveLayer( NETNAMES_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ) ); + } + else if( aLayer == F_Cu ) + { + rSettings->SetActiveLayer( ITEM_GAL_LAYER( PAD_FR_VISIBLE ) ); + rSettings->SetActiveLayer( NETNAMES_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ) ); + } + } + + m_view->UpdateAllLayersColor(); +} + + +void PCB_DRAW_PANEL_GAL::SetTopLayer( LAYER_ID aLayer ) +{ + m_view->ClearTopLayers(); + m_view->SetTopLayer( aLayer ); + + if( IsCopperLayer( aLayer ) ) + { + // Bring some other layers to the front in case of copper layers and make them colored + // fixme do not like the idea of storing the list of layers here, + // should be done in some other way I guess.. + LAYER_NUM layers[] = { + GetNetnameLayer( aLayer ), ITEM_GAL_LAYER( VIA_THROUGH_VISIBLE ), + ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), + ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), NETNAMES_GAL_LAYER( PADS_NETNAMES_VISIBLE ), + ITEM_GAL_LAYER( GP_OVERLAY ), ITEM_GAL_LAYER( RATSNEST_VISIBLE ), Dwgs_User, + ITEM_GAL_LAYER( DRC_VISIBLE ) + }; + + for( unsigned int i = 0; i < sizeof( layers ) / sizeof( LAYER_NUM ); ++i ) + { + m_view->SetTopLayer( layers[i] ); + } + + // Pads should be shown too + if( aLayer == B_Cu ) + { + m_view->SetTopLayer( ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); + m_view->SetTopLayer( NETNAMES_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ) ); + } + else if( aLayer == F_Cu ) + { + m_view->SetTopLayer( ITEM_GAL_LAYER( PAD_FR_VISIBLE ) ); + m_view->SetTopLayer( NETNAMES_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ) ); + } + } + + m_view->UpdateAllLayersOrder(); +} diff --git a/pcbnew/pcb_draw_panel_gal.h b/pcbnew/pcb_draw_panel_gal.h new file mode 100644 index 0000000000..9682b21f13 --- /dev/null +++ b/pcbnew/pcb_draw_panel_gal.h @@ -0,0 +1,73 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 CERN + * @author Maciej Suminski + * + * 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 PCB_DRAW_PANEL_GAL_H_ +#define PCB_DRAW_PANEL_GAL_H_ + +#include + +namespace KIGFX +{ + class WORKSHEET_VIEWITEM; + class RATSNEST_VIEWITEM; +} + +class PCB_DRAW_PANEL_GAL : public EDA_DRAW_PANEL_GAL +{ +public: + PCB_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWindowId, const wxPoint& aPosition, + const wxSize& aSize, GalType aGalType = GAL_TYPE_OPENGL ); + + virtual ~PCB_DRAW_PANEL_GAL(); + + /** + * Function DisplayBoard + * adds all items from the current board to the VIEW, so they can be displayed by GAL. + * @param aBoard is the PCB to be loaded. + */ + void DisplayBoard( const BOARD* aBoard ); + + /** + * Function SetWorksheet + * Sets (or updates) worksheet used by the draw panel. + * @param aWorksheet is the worksheet to be used. + * The object is then owned by PCB_DRAW_PANEL_GAL. + */ + void SetWorksheet( KIGFX::WORKSHEET_VIEWITEM* aWorksheet ); + + ///> @copydoc EDA_DRAW_PANEL_GAL::SetHighContrastLayer() + virtual void SetHighContrastLayer( LAYER_ID aLayer ); + + ///> @copydoc EDA_DRAW_PANEL_GAL::SetTopLayer() + virtual void SetTopLayer( LAYER_ID aLayer ); + +protected: + ///> Currently used worksheet + KIGFX::WORKSHEET_VIEWITEM* m_worksheet; + + ///> Ratsnest view item + KIGFX::RATSNEST_VIEWITEM* m_ratsnest; +}; + +#endif /* PCB_DRAW_PANEL_GAL_H_ */ diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 9d709e8ad8..0add833fc1 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -76,7 +76,7 @@ #define PYTHONCONSOLE_STRID wxT( "PythonPanel" ) #endif -#include +#include #include // Keys used in read/write config @@ -174,9 +174,9 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME ) EVT_MENU( ID_MENU_PCB_SHOW_3D_FRAME, PCB_EDIT_FRAME::Show3D_Frame ) // Switching canvases - EVT_MENU( ID_MENU_CANVAS_DEFAULT, PCB_EDIT_FRAME::SwitchCanvas ) - EVT_MENU( ID_MENU_CANVAS_CAIRO, PCB_EDIT_FRAME::SwitchCanvas ) - EVT_MENU( ID_MENU_CANVAS_OPENGL, PCB_EDIT_FRAME::SwitchCanvas ) + EVT_MENU( ID_MENU_CANVAS_DEFAULT, PCB_EDIT_FRAME::SwitchCanvas ) + EVT_MENU( ID_MENU_CANVAS_CAIRO, PCB_EDIT_FRAME::SwitchCanvas ) + EVT_MENU( ID_MENU_CANVAS_OPENGL, PCB_EDIT_FRAME::SwitchCanvas ) // Menu Get Design Rules Editor EVT_MENU( ID_MENU_PCB_SHOW_DESIGN_RULES_DIALOG, PCB_EDIT_FRAME::ShowDesignRulesEditor ) @@ -330,6 +330,16 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : for ( int i = 0; i < 10; i++ ) m_Macros[i].m_Record.clear(); + // Create GAL canvas + SetGalCanvas( new PCB_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), m_FrameSize, + PCB_DRAW_PANEL_GAL::GAL_TYPE_CAIRO ) ); + + // GAL should not be active yet + GetGalCanvas()->StopDrawing(); + + // Hide by default, it has to be explicitly shown + GetGalCanvas()->Hide(); + SetBoard( new BOARD() ); // Create the PCB_LAYER_WIDGET *after* SetBoard(): @@ -404,7 +414,6 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : lyrs.BestSize( m_Layers->GetBestSize() ); lyrs.Caption( _( "Visibles" ) ); - if( m_mainToolBar ) // The main horizontal toolbar { m_auimgr.AddPane( m_mainToolBar, @@ -480,84 +489,36 @@ void PCB_EDIT_FRAME::SetBoard( BOARD* aBoard ) if( IsGalCanvasActive() ) { - ViewReloadBoard( aBoard ); + static_cast( GetGalCanvas() )->DisplayBoard( aBoard ); + aBoard->GetRatsnest()->Recalculate(); + + // Prepare worksheet template + KIGFX::WORKSHEET_VIEWITEM* worksheet = new KIGFX::WORKSHEET_VIEWITEM( &aBoard->GetPageSettings(), + &aBoard->GetTitleBlock() ); + worksheet->SetSheetName( std::string( GetScreenDesc().mb_str() ) ); + + BASE_SCREEN* screen = GetScreen(); + + if( screen != NULL ) + { + worksheet->SetSheetNumber( screen->m_ScreenNumber ); + worksheet->SetSheetCount( screen->m_NumberOfScreens ); + } + + // PCB_DRAW_PANEL_GAL takes ownership of the worksheet + static_cast( GetGalCanvas() )->SetWorksheet( worksheet ); // update the tool manager with the new board and its view. - m_toolManager->SetEnvironment( aBoard, GetGalCanvas()->GetView(), - GetGalCanvas()->GetViewControls(), this ); - m_toolManager->ResetTools( TOOL_BASE::MODEL_RELOAD ); + if( m_toolManager ) + { + m_toolManager->SetEnvironment( aBoard, GetGalCanvas()->GetView(), + GetGalCanvas()->GetViewControls(), this ); + m_toolManager->ResetTools( TOOL_BASE::MODEL_RELOAD ); + } } } -void PCB_EDIT_FRAME::ViewReloadBoard( const BOARD* aBoard ) const -{ - KIGFX::VIEW* view = GetGalCanvas()->GetView(); - view->Clear(); - - // All of PCB drawing elements should be added to the VIEW - // in order to be displayed - - // Load zones - for( int i = 0; i < aBoard->GetAreaCount(); ++i ) - view->Add( (KIGFX::VIEW_ITEM*) ( aBoard->GetArea( i ) ) ); - - // Load drawings - for( BOARD_ITEM* drawing = aBoard->m_Drawings; drawing; drawing = drawing->Next() ) - view->Add( drawing ); - - // Load tracks - for( TRACK* track = aBoard->m_Track; track; track = track->Next() ) - view->Add( track ); - - // Load modules and its additional elements - for( MODULE* module = aBoard->m_Modules; module; module = module->Next() ) - { - module->RunOnChildren( boost::bind( &KIGFX::VIEW::Add, view, _1 ) ); - view->Add( module ); - } - - // Segzones (equivalent of ZONE_CONTAINER for legacy boards) - for( SEGZONE* zone = aBoard->m_Zone; zone; zone = zone->Next() ) - view->Add( zone ); - - KIGFX::WORKSHEET_VIEWITEM* worksheet = aBoard->GetWorksheetViewItem(); - worksheet->SetSheetName( std::string( GetScreenDesc().mb_str() ) ); - - BASE_SCREEN* screen = GetScreen(); - - if( screen != NULL ) - { - worksheet->SetSheetNumber( screen->m_ScreenNumber ); - worksheet->SetSheetCount( screen->m_NumberOfScreens ); - } - - view->Add( worksheet ); - view->Add( aBoard->GetRatsnestViewItem() ); - aBoard->GetRatsnest()->Recalculate(); - - // Apply layer coloring scheme & display options - if( view->GetPainter() ) - { - KIGFX::PCB_RENDER_SETTINGS* settings = - static_cast( view->GetPainter()->GetSettings() ); - - // Load layers' colors from PCB data - settings->ImportLegacyColors( m_Pcb->GetColorsSettings() ); - - // Load display options (such as filled/outline display of items) - settings->LoadDisplayOptions( DisplayOpt ); - } - - // Limit panning to the size of worksheet frame - GetGalCanvas()->GetViewControls()->SetPanBoundary( aBoard->GetWorksheetViewItem()->ViewBBox() ); - view->RecacheAllItems( true ); - - if( IsGalCanvasActive() ) - GetGalCanvas()->Refresh(); -} - - bool PCB_EDIT_FRAME::isAutoSaveRequired() const { return GetScreen()->IsSave(); @@ -676,12 +637,7 @@ void PCB_EDIT_FRAME::UseGalCanvas( bool aEnable ) if( aEnable ) { - ViewReloadBoard( m_Pcb ); - GetGalCanvas()->GetView()->RecacheAllItems(); - - m_toolManager->SetEnvironment( m_Pcb, GetGalCanvas()->GetView(), - GetGalCanvas()->GetViewControls(), this ); - m_toolManager->ResetTools( TOOL_BASE::MODEL_RELOAD ); + SetBoard( m_Pcb ); GetGalCanvas()->StartDrawing(); } @@ -824,97 +780,11 @@ bool PCB_EDIT_FRAME::IsMicroViaAcceptable() } -void PCB_EDIT_FRAME::SetHighContrastLayer( LAYER_ID aLayer ) -{ - // Set display settings for high contrast mode - KIGFX::VIEW* view = GetGalCanvas()->GetView(); - KIGFX::RENDER_SETTINGS* rSettings = view->GetPainter()->GetSettings(); - - SetTopLayer( aLayer ); - - rSettings->ClearActiveLayers(); - rSettings->SetActiveLayer( aLayer ); - - if( IsCopperLayer( aLayer ) ) - { - // Bring some other layers to the front in case of copper layers and make them colored - // fixme do not like the idea of storing the list of layers here, - // should be done in some other way I guess.. - LAYER_NUM layers[] = { - GetNetnameLayer( aLayer ), ITEM_GAL_LAYER( VIA_THROUGH_VISIBLE ), - ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), - ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), NETNAMES_GAL_LAYER( PADS_NETNAMES_VISIBLE ), - ITEM_GAL_LAYER( GP_OVERLAY ), ITEM_GAL_LAYER( RATSNEST_VISIBLE ) - }; - - for( unsigned i = 0; i < DIM( layers ); ++i ) - rSettings->SetActiveLayer( layers[i] ); - - // Pads should be shown too - if( aLayer == B_Cu ) - { - rSettings->SetActiveLayer( ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); - rSettings->SetActiveLayer( NETNAMES_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ) ); - } - else if( aLayer == F_Cu ) - { - rSettings->SetActiveLayer( ITEM_GAL_LAYER( PAD_FR_VISIBLE ) ); - rSettings->SetActiveLayer( NETNAMES_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ) ); - } - } - - view->UpdateAllLayersColor(); -} - - -void PCB_EDIT_FRAME::SetTopLayer( LAYER_ID aLayer ) -{ - // Set display settings for high contrast mode - KIGFX::VIEW* view = GetGalCanvas()->GetView(); - - view->ClearTopLayers(); - view->SetTopLayer( aLayer ); - - if( IsCopperLayer( aLayer ) ) - { - // Bring some other layers to the front in case of copper layers and make them colored - // fixme do not like the idea of storing the list of layers here, - // should be done in some other way I guess.. - LAYER_NUM layers[] = { - GetNetnameLayer( aLayer ), ITEM_GAL_LAYER( VIA_THROUGH_VISIBLE ), - ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), - ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), NETNAMES_GAL_LAYER( PADS_NETNAMES_VISIBLE ), - ITEM_GAL_LAYER( GP_OVERLAY ), ITEM_GAL_LAYER( RATSNEST_VISIBLE ), Dwgs_User, - ITEM_GAL_LAYER( DRC_VISIBLE ) - }; - - for( unsigned i = 0; i < DIM( layers ); ++i ) - { - view->SetTopLayer( layers[i] ); - } - - // Pads should be shown too - if( aLayer == B_Cu ) - { - view->SetTopLayer( ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); - view->SetTopLayer( NETNAMES_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ) ); - } - else if( aLayer == F_Cu ) - { - view->SetTopLayer( ITEM_GAL_LAYER( PAD_FR_VISIBLE ) ); - view->SetTopLayer( NETNAMES_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ) ); - } - } - - view->UpdateAllLayersOrder(); -} - - void PCB_EDIT_FRAME::SetActiveLayer( LAYER_ID aLayer, bool doLayerWidgetUpdate ) { ( (PCB_SCREEN*) GetScreen() )->m_Active_Layer = aLayer; - SetHighContrastLayer( aLayer ); + GetGalCanvas()->SetHighContrastLayer( aLayer ); if( doLayerWidgetUpdate ) syncLayerWidgetLayer(); diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index e1c7f90ab8..7416c14c17 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -578,7 +578,7 @@ void ROUTER_TOOL::performRouting() else if( evt->IsAction( &ACT_PlaceThroughVia ) ) { m_router->ToggleViaPlacement(); - frame->SetTopLayer( ToLAYER_ID( m_router->GetCurrentLayer() ) ); + frame->GetGalCanvas()->SetTopLayer( ToLAYER_ID( m_router->GetCurrentLayer() ) ); m_router->Move( m_endSnapPoint, m_endItem ); } else if( evt->IsAction( &ACT_SwitchPosture ) ) diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index db5d6900e8..d9d0147266 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -27,6 +27,7 @@ #include "common_actions.h" #include +#include #include #include #include @@ -1085,7 +1086,7 @@ int DRAWING_TOOL::drawZone( bool aKeepout ) // Apply the selected settings zone = new ZONE_CONTAINER( m_board ); zoneInfo.ExportSetting( *zone ); - m_frame->SetTopLayer( zoneInfo.m_CurrentZone_Layer ); + m_frame->GetGalCanvas()->SetTopLayer( zoneInfo.m_CurrentZone_Layer ); // Add the first point zone->Outline()->Start( zoneInfo.m_CurrentZone_Layer, diff --git a/pcbnew/tools/pcbnew_control.cpp b/pcbnew/tools/pcbnew_control.cpp index 80cf1511d5..1eaf5da907 100644 --- a/pcbnew/tools/pcbnew_control.cpp +++ b/pcbnew/tools/pcbnew_control.cpp @@ -190,7 +190,7 @@ int PCBNEW_CONTROL::HighContrastMode( TOOL_EVENT& aEvent ) DisplayOpt.ContrastModeDisplay = !DisplayOpt.ContrastModeDisplay; settings->LoadDisplayOptions( DisplayOpt ); - m_frame->SetHighContrastLayer( m_frame->GetActiveLayer() ); + m_frame->GetGalCanvas()->SetHighContrastLayer( m_frame->GetActiveLayer() ); setTransitions(); From f56e2e1454a7878506fe59c4e32a2015f66a0c77 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 10:57:32 +0200 Subject: [PATCH 564/741] Fixed switching between GAL canvases error. --- pcbnew/pcbframe.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 0add833fc1..272d951675 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -489,12 +489,15 @@ void PCB_EDIT_FRAME::SetBoard( BOARD* aBoard ) if( IsGalCanvasActive() ) { - static_cast( GetGalCanvas() )->DisplayBoard( aBoard ); + PCB_DRAW_PANEL_GAL* drawPanel = static_cast( GetGalCanvas() ); + + drawPanel->DisplayBoard( aBoard ); aBoard->GetRatsnest()->Recalculate(); // Prepare worksheet template - KIGFX::WORKSHEET_VIEWITEM* worksheet = new KIGFX::WORKSHEET_VIEWITEM( &aBoard->GetPageSettings(), - &aBoard->GetTitleBlock() ); + KIGFX::WORKSHEET_VIEWITEM* worksheet; + worksheet = new KIGFX::WORKSHEET_VIEWITEM( &aBoard->GetPageSettings(), + &aBoard->GetTitleBlock() ); worksheet->SetSheetName( std::string( GetScreenDesc().mb_str() ) ); BASE_SCREEN* screen = GetScreen(); @@ -506,13 +509,13 @@ void PCB_EDIT_FRAME::SetBoard( BOARD* aBoard ) } // PCB_DRAW_PANEL_GAL takes ownership of the worksheet - static_cast( GetGalCanvas() )->SetWorksheet( worksheet ); + drawPanel->SetWorksheet( worksheet ); // update the tool manager with the new board and its view. if( m_toolManager ) { - m_toolManager->SetEnvironment( aBoard, GetGalCanvas()->GetView(), - GetGalCanvas()->GetViewControls(), this ); + m_toolManager->SetEnvironment( aBoard, drawPanel->GetView(), + drawPanel->GetViewControls(), this ); m_toolManager->ResetTools( TOOL_BASE::MODEL_RELOAD ); } } @@ -638,7 +641,7 @@ void PCB_EDIT_FRAME::UseGalCanvas( bool aEnable ) if( aEnable ) { SetBoard( m_Pcb ); - + GetGalCanvas()->GetView()->RecacheAllItems( true ); GetGalCanvas()->StartDrawing(); } } From a68165d2a0035b5791b1d7d0267ca0fe3ac08ad4 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 10:57:32 +0200 Subject: [PATCH 565/741] Minor changes (removed an unnecessary event handler and two function calls that had no real influence). --- common/draw_panel_gal.cpp | 10 +--------- include/class_draw_panel_gal.h | 3 +-- pcbnew/pcbframe.cpp | 6 ------ 3 files changed, 2 insertions(+), 17 deletions(-) diff --git a/common/draw_panel_gal.cpp b/common/draw_panel_gal.cpp index 975d17c513..3b96ef58cf 100644 --- a/common/draw_panel_gal.cpp +++ b/common/draw_panel_gal.cpp @@ -81,7 +81,6 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin Connect( wxEVT_MIDDLE_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); Connect( wxEVT_MIDDLE_DCLICK, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); Connect( wxEVT_MOUSEWHEEL, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_CHAR_HOOK, wxEventHandler( EDA_DRAW_PANEL_GAL::skipEvent ) ); Connect( wxEVT_CHAR, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); Connect( wxEVT_ENTER_WINDOW, wxEventHandler( EDA_DRAW_PANEL_GAL::onEnter ), NULL, this ); Connect( KIGFX::WX_VIEW_CONTROLS::EVT_REFRESH_MOUSE, @@ -158,7 +157,7 @@ void EDA_DRAW_PANEL_GAL::onRefreshTimer( wxTimerEvent& aEvent ) } -void EDA_DRAW_PANEL_GAL::Refresh( bool eraseBackground, const wxRect* rect ) +void EDA_DRAW_PANEL_GAL::Refresh( bool aEraseBackground, const wxRect* aRect ) { if( m_pendingRefresh ) return; @@ -279,10 +278,3 @@ void EDA_DRAW_PANEL_GAL::onEnter( wxEvent& aEvent ) // Getting focus is necessary in order to receive key events properly SetFocus(); } - - -void EDA_DRAW_PANEL_GAL::skipEvent( wxEvent& aEvent ) -{ - // This is necessary for CHAR_HOOK event to generate KEY_UP and KEY_DOWN events - aEvent.Skip(); -} diff --git a/include/class_draw_panel_gal.h b/include/class_draw_panel_gal.h index b698c91e1e..bed6af0890 100644 --- a/include/class_draw_panel_gal.h +++ b/include/class_draw_panel_gal.h @@ -108,7 +108,7 @@ public: } /// @copydoc wxWindow::Refresh() - void Refresh( bool eraseBackground = true, const wxRect* rect = NULL ); + void Refresh( bool aEraseBackground = true, const wxRect* aRect = NULL ); /** * Function SetEventDispatcher() @@ -151,7 +151,6 @@ protected: void onEvent( wxEvent& aEvent ); void onEnter( wxEvent& aEvent ); void onRefreshTimer ( wxTimerEvent& aEvent ); - void skipEvent( wxEvent& aEvent ); static const int MinRefreshPeriod = 17; ///< 60 FPS. diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 272d951675..4b61ec562a 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -334,12 +334,6 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : SetGalCanvas( new PCB_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), m_FrameSize, PCB_DRAW_PANEL_GAL::GAL_TYPE_CAIRO ) ); - // GAL should not be active yet - GetGalCanvas()->StopDrawing(); - - // Hide by default, it has to be explicitly shown - GetGalCanvas()->Hide(); - SetBoard( new BOARD() ); // Create the PCB_LAYER_WIDGET *after* SetBoard(): From cc733a49664b016909f7717138bd72d17844eceb Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 11:22:42 +0200 Subject: [PATCH 566/741] Initial version of GAL-based module viewer in pcbnew. --- pcbnew/class_module.cpp | 8 +++++-- pcbnew/modview_frame.cpp | 43 +++++++++++++++++++++++++++++++++++ pcbnew/modview_frame.h | 3 +++ pcbnew/pcb_draw_panel_gal.cpp | 12 ++++++++-- pcbnew/pcb_draw_panel_gal.h | 8 +++++++ 5 files changed, 70 insertions(+), 4 deletions(-) diff --git a/pcbnew/class_module.cpp b/pcbnew/class_module.cpp index 0e3f015d39..bc01aa1bcb 100644 --- a/pcbnew/class_module.cpp +++ b/pcbnew/class_module.cpp @@ -448,8 +448,12 @@ const EDA_RECT MODULE::GetBoundingBox() const // Add the Clearance shape size: (shape around the pads when the // clearance is shown. Not optimized, but the draw cost is small // (perhaps smaller than optimization). - int biggest_clearance = GetBoard()->GetDesignSettings().GetBiggestClearanceValue(); - area.Inflate( biggest_clearance ); + BOARD* board = GetBoard(); + if( board ) + { + int biggest_clearance = board->GetDesignSettings().GetBiggestClearanceValue(); + area.Inflate( biggest_clearance ); + } return area; } diff --git a/pcbnew/modview_frame.cpp b/pcbnew/modview_frame.cpp index 1f80fe663e..9a762e5377 100644 --- a/pcbnew/modview_frame.cpp +++ b/pcbnew/modview_frame.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include <3d_viewer.h> #include @@ -54,6 +55,8 @@ #include #include +#include + #define NEXT_PART 1 #define NEW_PART 0 @@ -141,7 +144,14 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent m_footprintList = new wxListBox( this, ID_MODVIEW_FOOTPRINT_LIST, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_HSCROLL ); + // Create GAL canvas + EDA_DRAW_FRAME* drawFrame = static_cast( aParent ); + PCB_DRAW_PANEL_GAL* drawPanel = new PCB_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), m_FrameSize, + drawFrame->GetGalCanvas()->GetBackend() ); + SetGalCanvas( drawPanel ); + SetBoard( new BOARD() ); + drawPanel->DisplayBoard( m_Pcb ); // Ensure all layers and items are visible: GetBoard()->SetVisibleAlls(); @@ -207,6 +217,8 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent // Manage the draw panel, right pane. m_auimgr.AddPane( m_canvas, wxAuiPaneInfo().Name( wxT( "DrawFrame" ) ).CentrePane() ); + m_auimgr.AddPane( (wxWindow*) GetGalCanvas(), + wxAuiPaneInfo().Name( wxT( "DrawFrameGal" ) ).CentrePane().Hide() ); // Manage the message panel, bottom pane. m_auimgr.AddPane( m_messagePanel, @@ -244,6 +256,8 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent #endif Show( true ); + + UseGalCanvas( drawFrame->IsGalCanvasActive() ); } @@ -421,6 +435,22 @@ void FOOTPRINT_VIEWER_FRAME::ClickOnFootprintList( wxCommandEvent& event ) } UpdateTitle(); + + if( IsGalCanvasActive() ) + { + KIGFX::VIEW* view = GetGalCanvas()->GetView(); + view->Clear(); + + // Load modules and its additional elements + for( MODULE* module = GetBoard()->m_Modules; module; module = module->Next() ) + { + module->RunOnChildren( boost::bind( &KIGFX::VIEW::Add, view, _1 ) ); + view->Add( module ); + } + +// view->Add( loadFootprint( id ) ); + } + Zoom_Automatique( false ); m_canvas->Refresh(); Update3D_Frame(); @@ -827,3 +857,16 @@ void FOOTPRINT_VIEWER_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg ) if( module ) SetMsgPanel( module ); } + + +void FOOTPRINT_VIEWER_FRAME::UseGalCanvas( bool aEnable ) +{ + EDA_DRAW_FRAME::UseGalCanvas( aEnable ); + + if( aEnable ) + { + SetBoard( m_Pcb ); + + GetGalCanvas()->StartDrawing(); + } +} diff --git a/pcbnew/modview_frame.h b/pcbnew/modview_frame.h index aaa04afaf7..0301cfd52f 100644 --- a/pcbnew/modview_frame.h +++ b/pcbnew/modview_frame.h @@ -170,6 +170,9 @@ private: void SaveCopyInUndoList( BOARD_ITEM*, UNDO_REDO_T, const wxPoint& ) {} void SaveCopyInUndoList( const PICKED_ITEMS_LIST&, UNDO_REDO_T, const wxPoint &) {} + ///> @copydoc EDA_DRAW_FRAME::UseGalCanvas() + virtual void UseGalCanvas( bool aEnable ); + DECLARE_EVENT_TABLE() }; diff --git a/pcbnew/pcb_draw_panel_gal.cpp b/pcbnew/pcb_draw_panel_gal.cpp index 778570b1e5..2c60634453 100644 --- a/pcbnew/pcb_draw_panel_gal.cpp +++ b/pcbnew/pcb_draw_panel_gal.cpp @@ -29,6 +29,7 @@ #include #include +#include #include #include #include @@ -210,8 +211,7 @@ void PCB_DRAW_PANEL_GAL::DisplayBoard( const BOARD* aBoard ) m_ratsnest = new KIGFX::RATSNEST_VIEWITEM( aBoard->GetRatsnest() ); m_view->Add( m_ratsnest ); - // Load layer color setup from PCB data - static_cast( m_view->GetPainter()->GetSettings() )->ImportLegacyColors( aBoard->GetColorsSettings() ); + UseColorScheme( aBoard->GetColorsSettings() ); m_view->RecacheAllItems( true ); } @@ -233,6 +233,14 @@ void PCB_DRAW_PANEL_GAL::SetWorksheet( KIGFX::WORKSHEET_VIEWITEM* aWorksheet ) } +void PCB_DRAW_PANEL_GAL::UseColorScheme( const COLORS_DESIGN_SETTINGS* aSettings ) +{ + KIGFX::PCB_RENDER_SETTINGS* rs; + rs = static_cast( m_view->GetPainter()->GetSettings() ); + rs->ImportLegacyColors( aSettings ); +} + + void PCB_DRAW_PANEL_GAL::SetHighContrastLayer( LAYER_ID aLayer ) { // Set display settings for high contrast mode diff --git a/pcbnew/pcb_draw_panel_gal.h b/pcbnew/pcb_draw_panel_gal.h index 9682b21f13..fa32cde04a 100644 --- a/pcbnew/pcb_draw_panel_gal.h +++ b/pcbnew/pcb_draw_panel_gal.h @@ -32,6 +32,7 @@ namespace KIGFX class WORKSHEET_VIEWITEM; class RATSNEST_VIEWITEM; } +class COLORS_DESIGN_SETTINGS; class PCB_DRAW_PANEL_GAL : public EDA_DRAW_PANEL_GAL { @@ -56,6 +57,13 @@ public: */ void SetWorksheet( KIGFX::WORKSHEET_VIEWITEM* aWorksheet ); + /** + * Function UseColorScheme + * Applies layer color settings. + * @param aSettings are the new settings. + */ + void UseColorScheme( const COLORS_DESIGN_SETTINGS* aSettings ); + ///> @copydoc EDA_DRAW_PANEL_GAL::SetHighContrastLayer() virtual void SetHighContrastLayer( LAYER_ID aLayer ); From 13e67e1f3cc3d2cf228ba6de0d94f66566fe0a52 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 11:22:42 +0200 Subject: [PATCH 567/741] Fixed VIEW::SetViewport(). --- common/view/view.cpp | 18 +++++++----------- pcbnew/class_pad.cpp | 2 +- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/common/view/view.cpp b/common/view/view.cpp index f877164c5b..44d808e4ed 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -252,9 +252,7 @@ void VIEW::SetGAL( GAL* aGal ) clearGroupCache(); // every target has to be refreshed - MarkTargetDirty( TARGET_CACHED ); - MarkTargetDirty( TARGET_NONCACHED ); - MarkTargetDirty( TARGET_OVERLAY ); + MarkDirty(); // force the new GAL to display the current viewport. SetCenter( m_center ); @@ -279,7 +277,7 @@ void VIEW::SetViewport( const BOX2D& aViewport, bool aKeepAspect ) VECTOR2D ssize = ToWorld( m_gal->GetScreenPixelSize(), false ); VECTOR2D centre = aViewport.Centre(); VECTOR2D vsize = aViewport.GetSize(); - double zoom = 1.0 / std::min( fabs( vsize.x / ssize.x ), fabs( vsize.y / ssize.y ) ); + double zoom = 1.0 / std::max( fabs( vsize.x / ssize.x ), fabs( vsize.y / ssize.y ) ); SetCenter( centre ); SetScale( GetScale() * zoom ); @@ -305,7 +303,7 @@ void VIEW::SetScale( double aScale, const VECTOR2D& aAnchor ) m_scale = aScale; // Redraw everything after the viewport has changed - MarkTargetDirty( TARGET_CACHED ); + MarkDirty(); } @@ -317,7 +315,7 @@ void VIEW::SetCenter( const VECTOR2D& aCenter ) m_gal->ComputeWorldScreenMatrix(); // Redraw everything after the viewport has changed - MarkTargetDirty( TARGET_CACHED ); + MarkDirty(); } @@ -574,7 +572,7 @@ struct VIEW::drawItem } VIEW* view; - int layer, layersCount, layers[VIEW_MAX_LAYERS]; + int layer, layers[VIEW_MAX_LAYERS]; }; @@ -734,9 +732,7 @@ void VIEW::ClearTargets() m_gal->ClearTarget( TARGET_NONCACHED ); m_gal->ClearTarget( TARGET_CACHED ); - MarkTargetDirty( TARGET_NONCACHED ); - MarkTargetDirty( TARGET_CACHED ); - MarkTargetDirty( TARGET_OVERLAY ); + MarkDirty(); } if( IsTargetDirty( TARGET_OVERLAY ) ) @@ -855,7 +851,7 @@ void VIEW::sortLayers() sort( m_orderedLayers.begin(), m_orderedLayers.end(), compareRenderingOrder ); - MarkTargetDirty( TARGET_CACHED ); + MarkDirty(); } diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index 36239b7be0..a65bd54784 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -924,7 +924,7 @@ void D_PAD::ViewGetLayers( int aLayers[], int& aCount ) const unsigned int D_PAD::ViewGetLOD( int aLayer ) const { - // Netnames and soldermasks will be shown only if zoom is appropriate + // Netnames will be shown only if zoom is appropriate if( IsNetnameLayer( aLayer ) ) { return ( 100000000 / std::max( m_Size.x, m_Size.y ) ); From 8059f4ddd462f3e0dad9e1e6c41b0f1b169e82ec Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 11:22:42 +0200 Subject: [PATCH 568/741] Added autozooming and display of the last chosen module for module viewer using GAL. --- pcbnew/modview_frame.cpp | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/pcbnew/modview_frame.cpp b/pcbnew/modview_frame.cpp index 9a762e5377..13134fe54f 100644 --- a/pcbnew/modview_frame.cpp +++ b/pcbnew/modview_frame.cpp @@ -151,7 +151,6 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent SetGalCanvas( drawPanel ); SetBoard( new BOARD() ); - drawPanel->DisplayBoard( m_Pcb ); // Ensure all layers and items are visible: GetBoard()->SetVisibleAlls(); @@ -178,6 +177,7 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent id.SetLibNickname( getCurNickname() ); id.SetFootprintName( getCurFootprintName() ); GetBoard()->Add( loadFootprint( id ) ); + drawPanel->DisplayBoard( m_Pcb ); } if( m_canvas ) @@ -438,17 +438,13 @@ void FOOTPRINT_VIEWER_FRAME::ClickOnFootprintList( wxCommandEvent& event ) if( IsGalCanvasActive() ) { - KIGFX::VIEW* view = GetGalCanvas()->GetView(); - view->Clear(); + static_cast( GetGalCanvas() )->DisplayBoard( m_Pcb ); - // Load modules and its additional elements - for( MODULE* module = GetBoard()->m_Modules; module; module = module->Next() ) - { - module->RunOnChildren( boost::bind( &KIGFX::VIEW::Add, view, _1 ) ); - view->Add( module ); - } - -// view->Add( loadFootprint( id ) ); + // Autozoom + m_Pcb->ComputeBoundingBox( false ); + EDA_RECT boardBbox = m_Pcb->GetBoundingBox(); + GetGalCanvas()->GetView()->SetViewport( BOX2D( boardBbox.GetOrigin(), + boardBbox.GetSize() ) ); } Zoom_Automatique( false ); @@ -864,9 +860,5 @@ void FOOTPRINT_VIEWER_FRAME::UseGalCanvas( bool aEnable ) EDA_DRAW_FRAME::UseGalCanvas( aEnable ); if( aEnable ) - { - SetBoard( m_Pcb ); - GetGalCanvas()->StartDrawing(); - } } From e46c5cb778145f4b877ab679845322ca049b1a75 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 11:22:42 +0200 Subject: [PATCH 569/741] Fixed toolbar buttons for zooming in GAL canvas. --- pcbnew/tools/pcbnew_control.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pcbnew/tools/pcbnew_control.cpp b/pcbnew/tools/pcbnew_control.cpp index 1eaf5da907..49d2629206 100644 --- a/pcbnew/tools/pcbnew_control.cpp +++ b/pcbnew/tools/pcbnew_control.cpp @@ -80,9 +80,9 @@ int PCBNEW_CONTROL::ZoomInOutCenter( TOOL_EVENT& aEvent ) KIGFX::VIEW* view = m_frame->GetGalCanvas()->GetView(); double zoomScale = 1.0; - if( aEvent.IsAction( &COMMON_ACTIONS::zoomIn ) ) + if( aEvent.IsAction( &COMMON_ACTIONS::zoomInCenter ) ) zoomScale = 1.3; - else if( aEvent.IsAction( &COMMON_ACTIONS::zoomOut ) ) + else if( aEvent.IsAction( &COMMON_ACTIONS::zoomOutCenter ) ) zoomScale = 0.7; view->SetScale( view->GetScale() * zoomScale ); From f5325f8d79373f10912412e78e3157d84ac30497 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 11:22:42 +0200 Subject: [PATCH 570/741] Removed a redundant pointer to EDA_EDIT_FRAME. --- common/tool/tool_dispatcher.cpp | 10 +++++----- include/tool/tool_dispatcher.h | 5 +---- pcbnew/tools/pcb_tools.cpp | 2 +- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index 4e66a1271c..89c09a16ec 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -88,8 +88,8 @@ struct TOOL_DISPATCHER::BUTTON_STATE }; -TOOL_DISPATCHER::TOOL_DISPATCHER( TOOL_MANAGER* aToolMgr, PCB_BASE_FRAME* aEditFrame ) : - m_toolMgr( aToolMgr ), m_editFrame( aEditFrame ) +TOOL_DISPATCHER::TOOL_DISPATCHER( TOOL_MANAGER* aToolMgr ) : + m_toolMgr( aToolMgr ) { m_buttons.push_back( new BUTTON_STATE( BUT_LEFT, wxEVT_LEFT_DOWN, wxEVT_LEFT_UP, wxEVT_LEFT_DCLICK ) ); @@ -118,7 +118,7 @@ void TOOL_DISPATCHER::ResetState() KIGFX::VIEW* TOOL_DISPATCHER::getView() { - return m_editFrame->GetGalCanvas()->GetView(); + return static_cast( m_toolMgr->GetEditFrame() )->GetGalCanvas()->GetView(); } @@ -229,7 +229,7 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) { motion = true; m_lastMousePos = pos; - m_editFrame->UpdateStatusBar(); + static_cast( m_toolMgr->GetEditFrame() )->UpdateStatusBar(); } for( unsigned int i = 0; i < m_buttons.size(); i++ ) @@ -245,7 +245,7 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) // TODO That's a big ugly workaround, somehow DRAWPANEL_GAL loses focus // after second LMB click and currently I have no means to do better debugging if( type == wxEVT_LEFT_UP ) - m_editFrame->GetGalCanvas()->SetFocus(); + static_cast( m_toolMgr->GetEditFrame() )->GetGalCanvas()->SetFocus(); #endif /* __APPLE__ */ } diff --git a/include/tool/tool_dispatcher.h b/include/tool/tool_dispatcher.h index 8ecd893db1..bea510bc0b 100644 --- a/include/tool/tool_dispatcher.h +++ b/include/tool/tool_dispatcher.h @@ -56,7 +56,7 @@ public: * @param aToolMgr: tool manager instance the events will be sent to * @param aEditFrame: the frame wx events come from */ - TOOL_DISPATCHER( TOOL_MANAGER* aToolMgr, PCB_BASE_FRAME* aEditFrame ); + TOOL_DISPATCHER( TOOL_MANAGER* aToolMgr ); virtual ~TOOL_DISPATCHER(); /** @@ -128,9 +128,6 @@ private: ///> Instance of tool manager that cooperates with the dispatcher. TOOL_MANAGER* m_toolMgr; - - ///> Instance of wxFrame that is the source of UI events. - PCB_BASE_FRAME* m_editFrame; }; #endif diff --git a/pcbnew/tools/pcb_tools.cpp b/pcbnew/tools/pcb_tools.cpp index eaefa97678..cde76c1591 100644 --- a/pcbnew/tools/pcb_tools.cpp +++ b/pcbnew/tools/pcb_tools.cpp @@ -47,7 +47,7 @@ void PCB_EDIT_FRAME::setupTools() { // Create the manager and dispatcher & route draw panel events to the dispatcher m_toolManager = new TOOL_MANAGER; - m_toolDispatcher = new TOOL_DISPATCHER( m_toolManager, this ); + m_toolDispatcher = new TOOL_DISPATCHER( m_toolManager ); GetGalCanvas()->SetEventDispatcher( m_toolDispatcher ); // Connect handlers to toolbar buttons From 3fd26b6dd29106b1eef6208c396851c3a02cc19b Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 11:22:42 +0200 Subject: [PATCH 571/741] TOOL_ACTIONs are automagically registered by TOOL_MANAGER upon its construction. --- common/tool/action_manager.cpp | 11 ++--------- common/tool/tool_manager.cpp | 5 +++++ include/tool/tool_action.h | 15 --------------- pcbnew/tools/pcb_tools.cpp | 5 ----- 4 files changed, 7 insertions(+), 29 deletions(-) diff --git a/common/tool/action_manager.cpp b/common/tool/action_manager.cpp index 444143b0fb..b065cb2d55 100644 --- a/common/tool/action_manager.cpp +++ b/common/tool/action_manager.cpp @@ -44,8 +44,6 @@ ACTION_MANAGER::~ACTION_MANAGER() void ACTION_MANAGER::RegisterAction( TOOL_ACTION* aAction ) { - // Check if the TOOL_ACTION was not registered before - assert( aAction->GetId() == -1 ); // TOOL_ACTIONs are supposed to be named [appName.]toolName.actionName (with dots between) // action name without specifying at least toolName is not valid assert( aAction->GetName().find( '.', 0 ) != std::string::npos ); @@ -54,15 +52,14 @@ void ACTION_MANAGER::RegisterAction( TOOL_ACTION* aAction ) assert( m_actionNameIndex.find( aAction->m_name ) == m_actionNameIndex.end() ); assert( m_actionIdIndex.find( aAction->m_id ) == m_actionIdIndex.end() ); - aAction->setId( MakeActionId( aAction->m_name ) ); + if( aAction->m_id == -1 ) + aAction->m_id = MakeActionId( aAction->m_name ); m_actionNameIndex[aAction->m_name] = aAction; m_actionIdIndex[aAction->m_id] = aAction; if( aAction->HasHotKey() ) m_actionHotKeys[aAction->m_currentHotKey].push_back( aAction ); - - aAction->setActionMgr( this ); } @@ -71,10 +68,6 @@ void ACTION_MANAGER::UnregisterAction( TOOL_ACTION* aAction ) m_actionNameIndex.erase( aAction->m_name ); m_actionIdIndex.erase( aAction->m_id ); - // Indicate that the ACTION_MANAGER no longer care about the object - aAction->setActionMgr( NULL ); - aAction->setId( -1 ); - if( aAction->HasHotKey() ) { std::list& actions = m_actionHotKeys[aAction->m_currentHotKey]; diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 605f8505b3..abfd66b566 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -99,6 +99,11 @@ TOOL_MANAGER::TOOL_MANAGER() : m_model( NULL ), m_view( NULL ), m_viewControls( NULL ), m_editFrame( NULL ) { m_actionMgr = new ACTION_MANAGER( this ); + + // Register known actions + std::list& actionList = GetActionList(); + BOOST_FOREACH( TOOL_ACTION* action, actionList ) + RegisterAction( action ); } diff --git a/include/tool/tool_action.h b/include/tool/tool_action.h index 4097fd2f7f..152cf52928 100644 --- a/include/tool/tool_action.h +++ b/include/tool/tool_action.h @@ -189,18 +189,6 @@ public: private: friend class ACTION_MANAGER; - /// Assigns an unique identifier. It is given by an instance of ACTION_MANAGER. - void setId( int aId ) - { - m_id = aId; - } - - /// Assigns ACTION_MANAGER object that handles the TOOL_ACTION. - void setActionMgr( ACTION_MANAGER* aManager ) - { - m_actionMgr = aManager; - } - /// Name of the action (convention is: app.[tool.]action.name) std::string m_name; @@ -225,9 +213,6 @@ private: /// Unique ID for fast matching. Assigned by ACTION_MANAGER. int m_id; - /// Action manager that handles this TOOL_ACTION. - ACTION_MANAGER* m_actionMgr; - /// Origin of the action // const TOOL_BASE* m_origin; diff --git a/pcbnew/tools/pcb_tools.cpp b/pcbnew/tools/pcb_tools.cpp index cde76c1591..df0fc1a4ab 100644 --- a/pcbnew/tools/pcb_tools.cpp +++ b/pcbnew/tools/pcb_tools.cpp @@ -60,11 +60,6 @@ void PCB_EDIT_FRAME::setupTools() wxCommandEventHandler( PCB_EDIT_FRAME::onGenericCommand ), NULL, this ); #endif - // Register actions - std::list& actionList = m_toolManager->GetActionList(); - BOOST_FOREACH( TOOL_ACTION* action, actionList ) - m_toolManager->RegisterAction( action ); - // Register tools m_toolManager->RegisterTool( new SELECTION_TOOL ); m_toolManager->RegisterTool( new ROUTER_TOOL ); From 60b0a4e0be7961994f43b9c65221bbdcdff0b5df Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 11:22:42 +0200 Subject: [PATCH 572/741] Alternative approach to handling events and commands by TOOL_DISPATCHER. Event handlers are (dis)connected depending on the active view. TOOL_DISPATCHER inherits from wxEvtHandler, so now it receives events directly instead of being fed by external handlers. --- common/draw_panel_gal.cpp | 85 ++++++++++++++++++++------------- common/tool/tool_dispatcher.cpp | 2 + include/class_draw_panel_gal.h | 13 ++--- include/tool/tool_dispatcher.h | 4 +- include/wxPcbStruct.h | 2 +- pcbnew/pcbframe.cpp | 6 +++ pcbnew/tools/pcb_tools.cpp | 31 ++---------- 7 files changed, 73 insertions(+), 70 deletions(-) diff --git a/common/draw_panel_gal.cpp b/common/draw_panel_gal.cpp index 3b96ef58cf..e960accb9b 100644 --- a/common/draw_panel_gal.cpp +++ b/common/draw_panel_gal.cpp @@ -41,6 +41,8 @@ #include #include +#include + #ifdef __WXDEBUG__ #include #endif /* __WXDEBUG__ */ @@ -50,6 +52,7 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin GalType aGalType ) : wxWindow( aParentWindow, aWindowId, aPosition, aSize ) { + m_parent = aParentWindow; m_gal = NULL; m_backend = GAL_TYPE_NONE; m_view = NULL; @@ -67,24 +70,8 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin m_viewControls = new KIGFX::WX_VIEW_CONTROLS( m_view, this ); - Connect( wxEVT_SIZE, wxSizeEventHandler( EDA_DRAW_PANEL_GAL::onSize ), NULL, this ); - - /* Generic events for the Tool Dispatcher */ - Connect( wxEVT_MOTION, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_LEFT_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_LEFT_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_LEFT_DCLICK, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_RIGHT_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_RIGHT_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_RIGHT_DCLICK, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_MIDDLE_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_MIDDLE_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_MIDDLE_DCLICK, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_MOUSEWHEEL, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_CHAR, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_ENTER_WINDOW, wxEventHandler( EDA_DRAW_PANEL_GAL::onEnter ), NULL, this ); - Connect( KIGFX::WX_VIEW_CONTROLS::EVT_REFRESH_MOUSE, - wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_SIZE, wxSizeEventHandler( EDA_DRAW_PANEL_GAL::onSize ), NULL, this ); + Connect( wxEVT_ENTER_WINDOW, wxEventHandler( EDA_DRAW_PANEL_GAL::onEnter ), NULL, this ); // Set up timer that prevents too frequent redraw commands m_refreshTimer.SetOwner( this ); @@ -180,6 +167,53 @@ void EDA_DRAW_PANEL_GAL::Refresh( bool aEraseBackground, const wxRect* aRect ) } +void EDA_DRAW_PANEL_GAL::SetEventDispatcher( TOOL_DISPATCHER* aEventDispatcher ) +{ + m_eventDispatcher = aEventDispatcher; + + const wxEventType events[] = + { + wxEVT_LEFT_UP, wxEVT_LEFT_DOWN, wxEVT_LEFT_DCLICK, + wxEVT_RIGHT_UP, wxEVT_RIGHT_DOWN, wxEVT_RIGHT_DCLICK, + wxEVT_MIDDLE_UP, wxEVT_MIDDLE_DOWN, wxEVT_MIDDLE_DCLICK, + wxEVT_MOTION, wxEVT_MOUSEWHEEL, wxEVT_CHAR, KIGFX::WX_VIEW_CONTROLS::EVT_REFRESH_MOUSE + }; + + const wxEventType commands[] = + { +#if wxCHECK_VERSION( 3, 0, 0 ) + wxEVT_TOOL +#else + wxEVT_COMMAND_MENU_SELECTED, wxEVT_COMMAND_TOOL_CLICKED +#endif + }; + + if( m_eventDispatcher ) + { + BOOST_FOREACH( wxEventType eventType, events ) + Connect( eventType, wxEventHandler( TOOL_DISPATCHER::DispatchWxEvent ), + NULL, m_eventDispatcher ); + + BOOST_FOREACH( wxEventType eventType, commands ) + m_parent->Connect( eventType, + wxCommandEventHandler( TOOL_DISPATCHER::DispatchWxCommand ), + NULL, m_eventDispatcher ); + } + else + { + // While loops are used to be sure, that we are removing all event handlers + BOOST_FOREACH( wxEventType eventType, events ) + while( Disconnect( eventType, wxEventHandler( TOOL_DISPATCHER::DispatchWxEvent ), + NULL, m_eventDispatcher ) ); + + BOOST_FOREACH( wxEventType eventType, commands ) + while( m_parent->Disconnect( eventType, + wxCommandEventHandler( TOOL_DISPATCHER::DispatchWxCommand ), + NULL, m_eventDispatcher ) ); + } +} + + void EDA_DRAW_PANEL_GAL::StartDrawing() { m_pendingRefresh = false; @@ -258,21 +292,6 @@ void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType ) } -void EDA_DRAW_PANEL_GAL::onEvent( wxEvent& aEvent ) -{ - if( !m_eventDispatcher ) - { - aEvent.Skip(); - } - else - { - m_eventDispatcher->DispatchWxEvent( aEvent ); - } - - Refresh(); -} - - void EDA_DRAW_PANEL_GAL::onEnter( wxEvent& aEvent ) { // Getting focus is necessary in order to receive key events properly diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index 89c09a16ec..7a3320460b 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -281,6 +281,8 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) if( evt ) m_toolMgr->ProcessEvent( *evt ); + static_cast( m_toolMgr->GetEditFrame() )->GetGalCanvas()->Refresh(); + // pass the event to the GUI, it might still be interested in it aEvent.Skip(); } diff --git a/include/class_draw_panel_gal.h b/include/class_draw_panel_gal.h index bed6af0890..66793adf04 100644 --- a/include/class_draw_panel_gal.h +++ b/include/class_draw_panel_gal.h @@ -114,11 +114,10 @@ public: * Function SetEventDispatcher() * Sets a dispatcher that processes events and forwards them to tools. * @param aEventDispatcher is the object that will be used for dispatching events. + * DRAW_PANEL_GAL does not take over the ownership. Passing NULL disconnects all event + * handlers from the DRAW_PANEL_GAL and parent frame. */ - void SetEventDispatcher( TOOL_DISPATCHER* aEventDispatcher ) - { - m_eventDispatcher = aEventDispatcher; - } + void SetEventDispatcher( TOOL_DISPATCHER* aEventDispatcher ); /** * Function StartDrawing() @@ -148,12 +147,14 @@ public: protected: void onPaint( wxPaintEvent& WXUNUSED( aEvent ) ); void onSize( wxSizeEvent& aEvent ); - void onEvent( wxEvent& aEvent ); void onEnter( wxEvent& aEvent ); - void onRefreshTimer ( wxTimerEvent& aEvent ); + void onRefreshTimer( wxTimerEvent& aEvent ); static const int MinRefreshPeriod = 17; ///< 60 FPS. + /// Pointer to the parent window + wxWindow* m_parent; + /// Last timestamp when the panel was refreshed wxLongLong m_lastRefresh; diff --git a/include/tool/tool_dispatcher.h b/include/tool/tool_dispatcher.h index bea510bc0b..8a7289e56c 100644 --- a/include/tool/tool_dispatcher.h +++ b/include/tool/tool_dispatcher.h @@ -26,7 +26,7 @@ #define __TOOL_DISPATCHER_H #include - +#include #include class TOOL_MANAGER; @@ -47,7 +47,7 @@ class VIEW; * - issues TOOL_EVENTS to the tool manager */ -class TOOL_DISPATCHER +class TOOL_DISPATCHER : public wxEvtHandler { public: /** diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index 3cba461273..4620fc2767 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -120,9 +120,9 @@ protected: bool m_useCmpFileForFpNames; ///< is true, use the .cmp file from CvPcb, else use the netlist // to know the footprint name of components. + // Functions that handle the Tool Framework (de)initalization void setupTools(); void destroyTools(); - void onGenericCommand( wxCommandEvent& aEvent ); // we'll use lower case function names for private member functions. void createPopUpMenuForZones( ZONE_CONTAINER* edge_zone, wxMenu* aPopMenu ); diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 4b61ec562a..66f939663d 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -636,8 +636,14 @@ void PCB_EDIT_FRAME::UseGalCanvas( bool aEnable ) { SetBoard( m_Pcb ); GetGalCanvas()->GetView()->RecacheAllItems( true ); + GetGalCanvas()->SetEventDispatcher( m_toolDispatcher ); GetGalCanvas()->StartDrawing(); } + else + { + // Redirect all events to the legacy canvas + GetGalCanvas()->SetEventDispatcher( NULL ); + } } diff --git a/pcbnew/tools/pcb_tools.cpp b/pcbnew/tools/pcb_tools.cpp index df0fc1a4ab..83fda666db 100644 --- a/pcbnew/tools/pcb_tools.cpp +++ b/pcbnew/tools/pcb_tools.cpp @@ -22,10 +22,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include -#include -#include - #include #include @@ -33,7 +29,7 @@ #include #include -#include +//#include #include "selection_tool.h" #include "edit_tool.h" @@ -47,18 +43,9 @@ void PCB_EDIT_FRAME::setupTools() { // Create the manager and dispatcher & route draw panel events to the dispatcher m_toolManager = new TOOL_MANAGER; + m_toolManager->SetEnvironment( NULL, GetGalCanvas()->GetView(), + GetGalCanvas()->GetViewControls(), this ); m_toolDispatcher = new TOOL_DISPATCHER( m_toolManager ); - GetGalCanvas()->SetEventDispatcher( m_toolDispatcher ); - - // Connect handlers to toolbar buttons -#if wxCHECK_VERSION( 3, 0, 0 ) - Connect( wxEVT_TOOL, wxCommandEventHandler( PCB_EDIT_FRAME::onGenericCommand ), NULL, this ); -#else - Connect( wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler( PCB_EDIT_FRAME::onGenericCommand ), NULL, this ); - Connect( wxEVT_COMMAND_TOOL_CLICKED, - wxCommandEventHandler( PCB_EDIT_FRAME::onGenericCommand ), NULL, this ); -#endif // Register tools m_toolManager->RegisterTool( new SELECTION_TOOL ); @@ -67,9 +54,6 @@ void PCB_EDIT_FRAME::setupTools() m_toolManager->RegisterTool( new DRAWING_TOOL ); m_toolManager->RegisterTool( new POINT_EDITOR ); m_toolManager->RegisterTool( new PCBNEW_CONTROL ); - - m_toolManager->SetEnvironment( NULL, GetGalCanvas()->GetView(), - GetGalCanvas()->GetViewControls(), this ); m_toolManager->ResetTools( TOOL_BASE::RUN ); // Run the selection tool, it is supposed to be always active @@ -82,12 +66,3 @@ void PCB_EDIT_FRAME::destroyTools() delete m_toolManager; delete m_toolDispatcher; } - - -void PCB_EDIT_FRAME::onGenericCommand( wxCommandEvent& aEvent ) -{ - if( IsGalCanvasActive() ) - m_toolDispatcher->DispatchWxCommand( aEvent ); - else - aEvent.Skip(); -} From 0fc93666c66ebd6510f7a5b8e42fb266fbcb7c23 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 11:22:42 +0200 Subject: [PATCH 573/741] Rework to support multiple views with OpenGL GAL canvas. --- common/gal/opengl/opengl_compositor.cpp | 67 ++++++++++++------------- common/gal/opengl/opengl_gal.cpp | 29 +++++------ common/gal/opengl/vertex_container.cpp | 7 ++- common/view/view.cpp | 2 +- include/gal/opengl/opengl_compositor.h | 15 +++--- include/gal/opengl/opengl_gal.h | 14 +----- include/gal/opengl/vertex_container.h | 2 +- 7 files changed, 62 insertions(+), 74 deletions(-) diff --git a/common/gal/opengl/opengl_compositor.cpp b/common/gal/opengl/opengl_compositor.cpp index 3a6721e5c9..2843204d78 100644 --- a/common/gal/opengl/opengl_compositor.cpp +++ b/common/gal/opengl/opengl_compositor.cpp @@ -35,7 +35,7 @@ using namespace KIGFX; OPENGL_COMPOSITOR::OPENGL_COMPOSITOR() : - m_initialized( false ), m_current( 0 ) + m_initialized( false ), m_current( 0 ), m_currentFbo( DIRECT_RENDERING ) { } @@ -52,9 +52,6 @@ void OPENGL_COMPOSITOR::Initialize() if( m_initialized ) return; - // Get the maximum number of buffers - glGetIntegerv( GL_MAX_COLOR_ATTACHMENTS, (GLint*) &m_maxBuffers ); - // We need framebuffer objects for drawing the screen contents // Generate framebuffer and a depth buffer glGenFramebuffersEXT( 1, &m_framebuffer ); @@ -68,15 +65,13 @@ void OPENGL_COMPOSITOR::Initialize() // Use here a size of 24 bits for the depth buffer, 8 bits for the stencil buffer // this is required later for anti-aliasing - glRenderbufferStorageEXT( GL_RENDERBUFFER_EXT, GL_DEPTH_STENCIL, m_width, m_height ); + glRenderbufferStorageEXT( GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT24, m_width, m_height ); glFramebufferRenderbufferEXT( GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT, - GL_RENDERBUFFER_EXT, m_depthBuffer ); - glFramebufferRenderbufferEXT( GL_FRAMEBUFFER_EXT, GL_STENCIL_ATTACHMENT, - GL_RENDERBUFFER_EXT, m_depthBuffer ); + GL_RENDERBUFFER_EXT, m_depthBuffer ); // Unbind the framebuffer, so by default all the rendering goes directly to the display glBindFramebufferEXT( GL_FRAMEBUFFER_EXT, DIRECT_RENDERING ); - m_currentFbo = 0; + m_currentFbo = DIRECT_RENDERING; m_initialized = true; } @@ -96,9 +91,14 @@ unsigned int OPENGL_COMPOSITOR::CreateBuffer() { wxASSERT( m_initialized ); - if( usedBuffers() >= m_maxBuffers ) + unsigned int maxBuffers; + + // Get the maximum number of buffers + glGetIntegerv( GL_MAX_COLOR_ATTACHMENTS, (GLint*) &maxBuffers ); + + if( usedBuffers() >= maxBuffers ) { - DisplayError( NULL, wxT( "Cannot create more framebuffers. OpenGL rendering " + DisplayError( NULL, _( "Cannot create more framebuffers. OpenGL rendering " "backend requires at least 3 framebuffers. You may try to update/change " "your graphic drivers." ) ); return 0; // Unfortunately we have no more free buffers left @@ -114,7 +114,7 @@ unsigned int OPENGL_COMPOSITOR::CreateBuffer() // Set texture parameters glTexEnvf( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE ); - glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, m_width, m_height, 0, GL_RGBA, + glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA8, m_width, m_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST ); @@ -122,7 +122,8 @@ unsigned int OPENGL_COMPOSITOR::CreateBuffer() // Bind the texture to the specific attachment point, clear and rebind the screen glBindFramebufferEXT( GL_FRAMEBUFFER_EXT, m_framebuffer ); m_currentFbo = m_framebuffer; - glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, attachmentPoint, GL_TEXTURE_2D, textureTarget, 0 ); + glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, attachmentPoint, + GL_TEXTURE_2D, textureTarget, 0 ); // Check the status, exit if the framebuffer can't be created GLenum status = glCheckFramebufferStatusEXT( GL_FRAMEBUFFER_EXT ); @@ -132,38 +133,38 @@ unsigned int OPENGL_COMPOSITOR::CreateBuffer() switch( status ) { case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT: - DisplayError( NULL, wxT( "Cannot create the framebuffer." ) ); + DisplayError( NULL, _( "Cannot create the framebuffer." ) ); break; case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT: - DisplayError( NULL, wxT( "The framebuffer attachment points are incomplete." ) ); + DisplayError( NULL, _( "The framebuffer attachment points are incomplete." ) ); break; case GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT: - DisplayError( NULL, wxT( "The framebuffer does not have at least " - "one image attached to it." ) ); + DisplayError( NULL, _( "The framebuffer does not have at least " + "one image attached to it." ) ); break; case GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT: - DisplayError( NULL, wxT( "The framebuffer read buffer is incomplete." ) ); + DisplayError( NULL, _( "The framebuffer read buffer is incomplete." ) ); break; case GL_FRAMEBUFFER_UNSUPPORTED_EXT: - DisplayError( NULL, wxT( "The combination of internal formats of the attached images " - "violates an implementation-dependent set of restrictions." ) ); + DisplayError( NULL, _( "The combination of internal formats of the attached images " + "violates an implementation-dependent set of restrictions." ) ); break; case GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT: - DisplayError( NULL, wxT( "GL_RENDERBUFFER_SAMPLES is not the same " - "for all attached renderbuffers" ) ); + DisplayError( NULL, _( "GL_RENDERBUFFER_SAMPLES is not the same " + "for all attached renderbuffers" ) ); break; case GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT: - DisplayError( NULL, wxT( "Framebuffer incomplete layer targets errors." ) ); + DisplayError( NULL, _( "Framebuffer incomplete layer targets errors." ) ); break; default: - DisplayError( NULL, wxT( "Cannot create the framebuffer." ) ); + DisplayError( NULL, _( "Cannot create the framebuffer." ) ); break; } @@ -192,7 +193,6 @@ void OPENGL_COMPOSITOR::SetBuffer( unsigned int aBufferHandle ) // Change the rendering destination to the selected attachment point if( aBufferHandle == DIRECT_RENDERING ) { - glBindFramebufferEXT( GL_FRAMEBUFFER_EXT, DIRECT_RENDERING ); m_currentFbo = DIRECT_RENDERING; } else if( m_currentFbo != m_framebuffer ) @@ -221,12 +221,7 @@ void OPENGL_COMPOSITOR::ClearBuffer() void OPENGL_COMPOSITOR::DrawBuffer( unsigned int aBufferHandle ) { wxASSERT( m_initialized ); - - if( aBufferHandle == 0 || aBufferHandle > usedBuffers() ) - { - DisplayError( NULL, wxT( "Wrong framebuffer handle" ) ); - return; - } + wxASSERT( aBufferHandle != 0 && aBufferHandle <= usedBuffers() ); // Switch to the main framebuffer and blit the scene glBindFramebufferEXT( GL_FRAMEBUFFER, DIRECT_RENDERING ); @@ -274,8 +269,8 @@ void OPENGL_COMPOSITOR::clean() { wxASSERT( m_initialized ); - glDeleteFramebuffersEXT( 1, &m_framebuffer ); - glDeleteRenderbuffersEXT( 1, &m_depthBuffer ); + glBindFramebufferEXT( GL_FRAMEBUFFER, DIRECT_RENDERING ); + m_currentFbo = DIRECT_RENDERING; OPENGL_BUFFERS::const_iterator it; @@ -286,8 +281,8 @@ void OPENGL_COMPOSITOR::clean() m_buffers.clear(); + glDeleteFramebuffersEXT( 1, &m_framebuffer ); + glDeleteRenderbuffersEXT( 1, &m_depthBuffer ); + m_initialized = false; } - - -GLuint OPENGL_COMPOSITOR::m_currentFbo = DIRECT_RENDERING; diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 568772f96a..f7b7842a04 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -45,6 +45,8 @@ void InitTesselatorCallbacks( GLUtesselator* aTesselator ); const int glAttributes[] = { WX_GL_RGBA, WX_GL_DOUBLEBUFFER, WX_GL_DEPTH_SIZE, 16, 0 }; +wxGLContext* OPENGL_GAL::glContext = NULL; + OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, wxEvtHandler* aPaintListener, const wxString& aName ) : wxGLCanvas( aParent, wxID_ANY, (int*) glAttributes, wxDefaultPosition, wxDefaultSize, @@ -54,7 +56,9 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, overlayManager( false ) { // Create the OpenGL-Context - glContext = new wxGLContext( this ); + if( glContext == NULL ) + glContext = new wxGLContext( this ); + parentWindow = aParent; mouseListener = aMouseListener; paintListener = aPaintListener; @@ -113,8 +117,6 @@ OPENGL_GAL::~OPENGL_GAL() gluDeleteTess( tesselator ); ClearCache(); - - delete glContext; } @@ -122,23 +124,22 @@ void OPENGL_GAL::BeginDrawing() { SetCurrent( *glContext ); - clientDC = new wxClientDC( this ); + clientDC = new wxPaintDC( this ); // Initialize GLEW, FBOs & VBOs if( !isGlewInitialized ) initGlew(); + // Set up the view port + glMatrixMode( GL_PROJECTION ); + glLoadIdentity(); + glViewport( 0, 0, (GLsizei) screenSize.x, (GLsizei) screenSize.y ); + + // Create the screen transformation + glOrtho( 0, (GLint) screenSize.x, 0, (GLsizei) screenSize.y, -depthRange.x, -depthRange.y ); + if( !isFramebufferInitialized ) { - // Set up the view port - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glViewport( 0, 0, (GLsizei) screenSize.x, (GLsizei) screenSize.y ); - - // Create the screen transformation - glOrtho( 0, (GLint) screenSize.x, 0, (GLsizei) screenSize.y, - -depthRange.x, -depthRange.y ); - // Prepare rendering target buffers compositor.Initialize(); mainBuffer = compositor.CreateBuffer(); @@ -967,7 +968,7 @@ void OPENGL_GAL::initGlew() exit( 1 ); } - // Vertex buffer have to be supported + // Vertex buffer has to be supported if( !GLEW_ARB_vertex_buffer_object ) { DisplayError( parentWindow, wxT( "Vertex buffer objects are not supported!" ) ); diff --git a/common/gal/opengl/vertex_container.cpp b/common/gal/opengl/vertex_container.cpp index 82658e11ae..fa41ecb808 100644 --- a/common/gal/opengl/vertex_container.cpp +++ b/common/gal/opengl/vertex_container.cpp @@ -31,7 +31,8 @@ #include #include #include -#include +#include +#include using namespace KIGFX; @@ -45,9 +46,11 @@ VERTEX_CONTAINER* VERTEX_CONTAINER::MakeContainer( bool aCached ) VERTEX_CONTAINER::VERTEX_CONTAINER( unsigned int aSize ) : - m_freeSpace( aSize ), m_currentSize( aSize ), m_initialSize( aSize ), m_failed( false ) + m_freeSpace( aSize ), m_currentSize( aSize ), m_initialSize( aSize ), + m_failed( false ), m_dirty( true ) { m_vertices = static_cast( malloc( aSize * sizeof( VERTEX ) ) ); + memset( m_vertices, 0x00, aSize * sizeof( VERTEX ) ); } diff --git a/common/view/view.cpp b/common/view/view.cpp index 44d808e4ed..d4b20e9b42 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -1027,7 +1027,7 @@ struct VIEW::extentsVisitor { bool operator()( VIEW_ITEM* aItem ) { - if(first) + if( first ) extents = aItem->ViewBBox(); else extents.Merge ( aItem->ViewBBox() ); diff --git a/include/gal/opengl/opengl_compositor.h b/include/gal/opengl/opengl_compositor.h index 642a7f7bbc..c06add7d2e 100644 --- a/include/gal/opengl/opengl_compositor.h +++ b/include/gal/opengl/opengl_compositor.h @@ -80,18 +80,17 @@ protected: GLuint attachmentPoint; ///< Point to which an image from texture is attached } OPENGL_BUFFER; - bool m_initialized; ///< Initialization status flag - unsigned int m_current; ///< Currently used buffer handle - GLuint m_framebuffer; ///< Main FBO handle - GLuint m_depthBuffer; ///< Depth buffer handle - unsigned int m_maxBuffers; ///< Maximal amount of buffers + bool m_initialized; ///< Initialization status flag + unsigned int m_current; ///< Currently used buffer handle + GLuint m_framebuffer; ///< Main FBO handle + GLuint m_depthBuffer; ///< Depth buffer handle typedef std::deque OPENGL_BUFFERS; /// Stores information about initialized buffers - OPENGL_BUFFERS m_buffers; + OPENGL_BUFFERS m_buffers; /// Store the currently used FBO name in case there was more than one compositor used - static GLuint m_currentFbo; + GLuint m_currentFbo; /** * Function clean() @@ -100,7 +99,7 @@ protected: void clean(); /// Returns number of used buffers - unsigned int usedBuffers() + inline unsigned int usedBuffers() { return m_buffers.size(); } diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index 10c4fea54d..417cdd389e 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -37,22 +37,12 @@ #include #include -#include #include -#include -#include -#include -#include -#include #include #include #include -#include -#include -#include - #ifndef CALLBACK #define CALLBACK #endif @@ -262,8 +252,8 @@ private: static const int CIRCLE_POINTS = 64; ///< The number of points for circle approximation static const int CURVE_POINTS = 32; ///< The number of points for curve approximation - wxClientDC* clientDC; ///< Drawing context - wxGLContext* glContext; ///< OpenGL context of wxWidgets + wxPaintDC* clientDC; ///< Drawing context + static wxGLContext* glContext; ///< OpenGL context of wxWidgets wxWindow* parentWindow; ///< Parent window wxEvtHandler* mouseListener; wxEvtHandler* paintListener; diff --git a/include/gal/opengl/vertex_container.h b/include/gal/opengl/vertex_container.h index 50c8d7fec1..807731bb37 100644 --- a/include/gal/opengl/vertex_container.h +++ b/include/gal/opengl/vertex_container.h @@ -163,7 +163,7 @@ protected: * returns size of the reserved memory space. * @return Size of the reserved memory space (expressed as a number of vertices). */ - unsigned int reservedSpace() + inline unsigned int reservedSpace() { return m_currentSize - m_freeSpace; } From 2f7706e8cd53d7a2e7c94868c2b84567ec0e5b02 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 11:22:43 +0200 Subject: [PATCH 574/741] Reduced number of switched events, allowing to use VIEW_CONTROLS, even if there is no extra event dispatcher. --- common/draw_panel_gal.cpp | 86 +++++++++++++++++++++------------ common/tool/tool_dispatcher.cpp | 2 - include/class_draw_panel_gal.h | 1 + 3 files changed, 55 insertions(+), 34 deletions(-) diff --git a/common/draw_panel_gal.cpp b/common/draw_panel_gal.cpp index e960accb9b..4bf7835371 100644 --- a/common/draw_panel_gal.cpp +++ b/common/draw_panel_gal.cpp @@ -73,6 +73,20 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin Connect( wxEVT_SIZE, wxSizeEventHandler( EDA_DRAW_PANEL_GAL::onSize ), NULL, this ); Connect( wxEVT_ENTER_WINDOW, wxEventHandler( EDA_DRAW_PANEL_GAL::onEnter ), NULL, this ); + const wxEventType events[] = + { + wxEVT_LEFT_UP, wxEVT_LEFT_DOWN, wxEVT_LEFT_DCLICK, + wxEVT_RIGHT_UP, wxEVT_RIGHT_DOWN, wxEVT_RIGHT_DCLICK, + wxEVT_MIDDLE_UP, wxEVT_MIDDLE_DOWN, wxEVT_MIDDLE_DCLICK, + wxEVT_MOTION, wxEVT_MOUSEWHEEL, wxEVT_CHAR, KIGFX::WX_VIEW_CONTROLS::EVT_REFRESH_MOUSE + }; + + BOOST_FOREACH( wxEventType eventType, events ) + { + Connect( eventType, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), + NULL, m_eventDispatcher ); + } + // Set up timer that prevents too frequent redraw commands m_refreshTimer.SetOwner( this ); m_pendingRefresh = false; @@ -171,46 +185,43 @@ void EDA_DRAW_PANEL_GAL::SetEventDispatcher( TOOL_DISPATCHER* aEventDispatcher ) { m_eventDispatcher = aEventDispatcher; - const wxEventType events[] = - { - wxEVT_LEFT_UP, wxEVT_LEFT_DOWN, wxEVT_LEFT_DCLICK, - wxEVT_RIGHT_UP, wxEVT_RIGHT_DOWN, wxEVT_RIGHT_DCLICK, - wxEVT_MIDDLE_UP, wxEVT_MIDDLE_DOWN, wxEVT_MIDDLE_DCLICK, - wxEVT_MOTION, wxEVT_MOUSEWHEEL, wxEVT_CHAR, KIGFX::WX_VIEW_CONTROLS::EVT_REFRESH_MOUSE - }; - - const wxEventType commands[] = - { #if wxCHECK_VERSION( 3, 0, 0 ) - wxEVT_TOOL -#else - wxEVT_COMMAND_MENU_SELECTED, wxEVT_COMMAND_TOOL_CLICKED -#endif - }; - if( m_eventDispatcher ) { - BOOST_FOREACH( wxEventType eventType, events ) - Connect( eventType, wxEventHandler( TOOL_DISPATCHER::DispatchWxEvent ), - NULL, m_eventDispatcher ); - - BOOST_FOREACH( wxEventType eventType, commands ) - m_parent->Connect( eventType, - wxCommandEventHandler( TOOL_DISPATCHER::DispatchWxCommand ), - NULL, m_eventDispatcher ); + m_parent->Connect( wxEVT_TOOL, + wxCommandEventHandler( TOOL_DISPATCHER::DispatchWxCommand ), + NULL, m_eventDispatcher ); } else { // While loops are used to be sure, that we are removing all event handlers - BOOST_FOREACH( wxEventType eventType, events ) - while( Disconnect( eventType, wxEventHandler( TOOL_DISPATCHER::DispatchWxEvent ), - NULL, m_eventDispatcher ) ); - - BOOST_FOREACH( wxEventType eventType, commands ) - while( m_parent->Disconnect( eventType, - wxCommandEventHandler( TOOL_DISPATCHER::DispatchWxCommand ), - NULL, m_eventDispatcher ) ); + while( m_parent->Disconnect( wxEVT_TOOL, + wxCommandEventHandler( TOOL_DISPATCHER::DispatchWxCommand ), + NULL, m_eventDispatcher ) ); } +#else + if( m_eventDispatcher ) + { + m_parent->Connect( wxEVT_COMMAND_MENU_SELECTED, + wxCommandEventHandler( TOOL_DISPATCHER::DispatchWxCommand ), + NULL, m_eventDispatcher ); + + m_parent->Connect( wxEVT_COMMAND_TOOL_CLICKED, + wxCommandEventHandler( TOOL_DISPATCHER::DispatchWxCommand ), + NULL, m_eventDispatcher ); + } + else + { + // While loops are used to be sure, that we are removing all event handlers + while( m_parent->Disconnect( wxEVT_COMMAND_MENU_SELECTED, + wxCommandEventHandler( TOOL_DISPATCHER::DispatchWxCommand ), + NULL, m_eventDispatcher ) ); + + while( m_parent->Disconnect( wxEVT_COMMAND_TOOL_CLICKED, + wxCommandEventHandler( TOOL_DISPATCHER::DispatchWxCommand ), + NULL, m_eventDispatcher ) ); + } +#endif } @@ -292,6 +303,17 @@ void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType ) } +void EDA_DRAW_PANEL_GAL::onEvent( wxEvent& aEvent ) +{ + if( !m_eventDispatcher ) + aEvent.Skip(); + else + m_eventDispatcher->DispatchWxEvent( aEvent ); + + Refresh(); +} + + void EDA_DRAW_PANEL_GAL::onEnter( wxEvent& aEvent ) { // Getting focus is necessary in order to receive key events properly diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index 7a3320460b..89c09a16ec 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -281,8 +281,6 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) if( evt ) m_toolMgr->ProcessEvent( *evt ); - static_cast( m_toolMgr->GetEditFrame() )->GetGalCanvas()->Refresh(); - // pass the event to the GUI, it might still be interested in it aEvent.Skip(); } diff --git a/include/class_draw_panel_gal.h b/include/class_draw_panel_gal.h index 66793adf04..6d9dae1bba 100644 --- a/include/class_draw_panel_gal.h +++ b/include/class_draw_panel_gal.h @@ -147,6 +147,7 @@ public: protected: void onPaint( wxPaintEvent& WXUNUSED( aEvent ) ); void onSize( wxSizeEvent& aEvent ); + void onEvent( wxEvent& aEvent ); void onEnter( wxEvent& aEvent ); void onRefreshTimer( wxTimerEvent& aEvent ); From 0a6de2e13f7afb53a86d034186ca6529be8e6588 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 11:22:43 +0200 Subject: [PATCH 575/741] FOOTPRINT_VIEWER_FRAME handles events from toolbar buttons and hot keys. --- pcbnew/modview_frame.cpp | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/pcbnew/modview_frame.cpp b/pcbnew/modview_frame.cpp index 13134fe54f..0a50ed6eb9 100644 --- a/pcbnew/modview_frame.cpp +++ b/pcbnew/modview_frame.cpp @@ -55,6 +55,11 @@ #include #include +#include +#include +#include "tools/pcbnew_control.h" +#include "tools/common_actions.h" + #include @@ -144,14 +149,6 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent m_footprintList = new wxListBox( this, ID_MODVIEW_FOOTPRINT_LIST, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_HSCROLL ); - // Create GAL canvas - EDA_DRAW_FRAME* drawFrame = static_cast( aParent ); - PCB_DRAW_PANEL_GAL* drawPanel = new PCB_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), m_FrameSize, - drawFrame->GetGalCanvas()->GetBackend() ); - SetGalCanvas( drawPanel ); - - SetBoard( new BOARD() ); - // Ensure all layers and items are visible: GetBoard()->SetVisibleAlls(); SetScreen( new PCB_SCREEN( GetPageSizeIU() ) ); @@ -169,6 +166,23 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent ReCreateLibraryList(); UpdateTitle(); + EDA_DRAW_FRAME* drawFrame = static_cast( aParent ); + + // Create GAL canvas + PCB_DRAW_PANEL_GAL* drawPanel = new PCB_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), m_FrameSize, + drawFrame->GetGalCanvas()->GetBackend() ); + SetGalCanvas( drawPanel ); + + // Create the manager and dispatcher & route draw panel events to the dispatcher + m_toolManager = new TOOL_MANAGER; + m_toolManager->SetEnvironment( GetBoard(), drawPanel->GetView(), + drawPanel->GetViewControls(), this ); + m_toolDispatcher = new TOOL_DISPATCHER( m_toolManager ); + drawPanel->SetEventDispatcher( m_toolDispatcher ); + + m_toolManager->RegisterTool( new PCBNEW_CONTROL ); + m_toolManager->ResetTools( TOOL_BASE::RUN ); + // If a footprint was previously loaded, reload it if( getCurNickname().size() && getCurFootprintName().size() ) { @@ -277,6 +291,10 @@ const wxChar* FOOTPRINT_VIEWER_FRAME::GetFootprintViewerFrameName() void FOOTPRINT_VIEWER_FRAME::OnCloseWindow( wxCloseEvent& Event ) { DBG(printf( "%s:\n", __func__ );) + + if( IsGalCanvasActive() ) + GetGalCanvas()->StopDrawing(); + if( IsModal() ) { // Only dismiss a modal frame once, so that the return values set by From 5134781a3881a96fb7b150ae1b56fe06f0dd6164 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 11:22:43 +0200 Subject: [PATCH 576/741] GAL view in pad properties dialog - initial version. --- common/view/view.cpp | 5 +- include/view/view.h | 5 +- pcbnew/dialogs/dialog_pad_properties.cpp | 50 +++++++++-- pcbnew/dialogs/dialog_pad_properties_base.cpp | 3 + pcbnew/dialogs/dialog_pad_properties_base.fbp | 85 +++++++++++++++++++ pcbnew/dialogs/dialog_pad_properties_base.h | 2 + 6 files changed, 141 insertions(+), 9 deletions(-) diff --git a/common/view/view.cpp b/common/view/view.cpp index d4b20e9b42..4fb2f7c75e 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -272,9 +272,12 @@ BOX2D VIEW::GetViewport() const } -void VIEW::SetViewport( const BOX2D& aViewport, bool aKeepAspect ) +void VIEW::SetViewport( const BOX2D& aViewport ) { VECTOR2D ssize = ToWorld( m_gal->GetScreenPixelSize(), false ); + + wxASSERT( ssize.x > 0 && ssize.y > 0 ); + VECTOR2D centre = aViewport.Centre(); VECTOR2D vsize = aViewport.GetSize(); double zoom = 1.0 / std::max( fabs( vsize.x / ssize.x ), fabs( vsize.y / ssize.y ) ); diff --git a/include/view/view.h b/include/view/view.h index 1857664af9..529f3c63ce 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -159,9 +159,8 @@ public: * Function SetViewport() * Sets the visible area of the VIEW. * @param aViewport: desired visible area, in world space coordinates. - * @param aKeepProportions: when true, the X/Y size proportions are kept. */ - void SetViewport( const BOX2D& aViewport, bool aKeepProportions = true ); + void SetViewport( const BOX2D& aViewport ); /** * Function GetViewport() @@ -201,7 +200,7 @@ public: * Function GetScale() * @return Current scalefactor of this VIEW */ - double GetScale() const + double GetScale() const { return m_scale; } diff --git a/pcbnew/dialogs/dialog_pad_properties.cpp b/pcbnew/dialogs/dialog_pad_properties.cpp index b962b670c0..de92b283a4 100644 --- a/pcbnew/dialogs/dialog_pad_properties.cpp +++ b/pcbnew/dialogs/dialog_pad_properties.cpp @@ -117,6 +117,8 @@ private: bool padValuesOK(); ///< test if all values are acceptable for the pad + void redraw(); + /** * Function setPadLayersList * updates the CheckBox states in pad layers list, @@ -174,6 +176,21 @@ DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, D_PAD* aP else // We are editing a "master" pad, i.e. a pad used to create new pads m_dummyPad->Copy( m_padMaster ); + if( m_parent->IsGalCanvasActive() ) + { + m_panelShowPadGal->UseColorScheme( m_board->GetColorsSettings() ); + m_panelShowPadGal->SwitchBackend( m_parent->GetGalCanvas()->GetBackend() ); + m_panelShowPad->Hide(); + m_panelShowPadGal->Show(); + m_panelShowPadGal->GetView()->Add( m_dummyPad ); + m_panelShowPadGal->StartDrawing(); + } + else + { + m_panelShowPad->Show(); + m_panelShowPadGal->Hide(); + } + initValues(); m_sdbSizer1OK->SetDefault(); @@ -537,7 +554,7 @@ void DIALOG_PAD_PROPERTIES::OnPadShapeSelection( wxCommandEvent& event ) } transferDataToPad( m_dummyPad ); - m_panelShowPad->Refresh(); + redraw(); } @@ -566,7 +583,7 @@ void DIALOG_PAD_PROPERTIES::OnDrillShapeSelected( wxCommandEvent& event ) } transferDataToPad( m_dummyPad ); - m_panelShowPad->Refresh(); + redraw(); } @@ -599,7 +616,7 @@ void DIALOG_PAD_PROPERTIES::PadOrientEvent( wxCommandEvent& event ) m_PadOrientCtrl->SetValue( msg ); transferDataToPad( m_dummyPad ); - m_panelShowPad->Refresh(); + redraw(); } @@ -667,7 +684,7 @@ void DIALOG_PAD_PROPERTIES::setPadLayersList( LSET layer_mask ) void DIALOG_PAD_PROPERTIES::OnSetLayers( wxCommandEvent& event ) { transferDataToPad( m_dummyPad ); - m_panelShowPad->Refresh(); + redraw(); } @@ -758,6 +775,29 @@ bool DIALOG_PAD_PROPERTIES::padValuesOK() } +void DIALOG_PAD_PROPERTIES::redraw() +{ + if( m_parent->IsGalCanvasActive() ) + { + m_dummyPad->ViewUpdate(); + + BOX2I bbox = m_dummyPad->ViewBBox(); + + // Autozoom + m_panelShowPadGal->GetView()->SetViewport( BOX2D( bbox.GetOrigin(), bbox.GetSize() ) ); + + // Add a margin + m_panelShowPadGal->GetView()->SetScale( m_panelShowPadGal->GetView()->GetScale() * 0.7 ); + + m_panelShowPadGal->Refresh(); + } + else + { + m_panelShowPad->Refresh(); + } +} + + void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event ) { if( !padValuesOK() ) @@ -1132,7 +1172,7 @@ void DIALOG_PAD_PROPERTIES::OnValuesChanged( wxCommandEvent& event ) if( m_canUpdate ) { transferDataToPad( m_dummyPad ); - m_panelShowPad->Refresh(); + redraw(); } } diff --git a/pcbnew/dialogs/dialog_pad_properties_base.cpp b/pcbnew/dialogs/dialog_pad_properties_base.cpp index 6da97464e5..c7a62c1d54 100644 --- a/pcbnew/dialogs/dialog_pad_properties_base.cpp +++ b/pcbnew/dialogs/dialog_pad_properties_base.cpp @@ -536,6 +536,9 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind bSizerDisplayPad->Add( m_panelShowPad, 4, wxRIGHT|wxTOP|wxEXPAND, 5 ); + m_panelShowPadGal = new PCB_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), wxDefaultSize, EDA_DRAW_PANEL_GAL::GAL_TYPE_CAIRO ); + bSizerDisplayPad->Add( m_panelShowPadGal, 4, wxEXPAND|wxRIGHT|wxTOP, 5 ); + bSizerUpper->Add( bSizerDisplayPad, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 ); diff --git a/pcbnew/dialogs/dialog_pad_properties_base.fbp b/pcbnew/dialogs/dialog_pad_properties_base.fbp index cb8df4557b..8696b831e5 100644 --- a/pcbnew/dialogs/dialog_pad_properties_base.fbp +++ b/pcbnew/dialogs/dialog_pad_properties_base.fbp @@ -8310,6 +8310,91 @@ + + 5 + wxEXPAND|wxRIGHT|wxTOP + 4 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + PCB_DRAW_PANEL_GAL + 1 + m_panelShowPadGal = new PCB_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), wxDefaultSize, EDA_DRAW_PANEL_GAL::GAL_TYPE_CAIRO ); + + 1 + PCB_DRAW_PANEL_GAL* m_panelShowPadGal; + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + #include <pcb_draw_panel_gal.h> + + 0 + + + 0 + + 1 + m_panelShowPadGal + 1 + + + protected + 1 + + Resizable + + 1 + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pcbnew/dialogs/dialog_pad_properties_base.h b/pcbnew/dialogs/dialog_pad_properties_base.h index 8a6ffd636d..1170f7bf20 100644 --- a/pcbnew/dialogs/dialog_pad_properties_base.h +++ b/pcbnew/dialogs/dialog_pad_properties_base.h @@ -30,6 +30,7 @@ class DIALOG_SHIM; #include #include #include +#include #include #include @@ -143,6 +144,7 @@ class DIALOG_PAD_PROPERTIES_BASE : public DIALOG_SHIM wxStaticText* m_ThermalGapUnits; wxStaticText* m_staticTextWarning; wxPanel* m_panelShowPad; + PCB_DRAW_PANEL_GAL* m_panelShowPadGal; wxStaticText* m_staticTextWarningPadFlipped; wxStdDialogButtonSizer* m_sdbSizer1; wxButton* m_sdbSizer1OK; From 553996e7be0374ad599169b84dbe1dc652e5906d Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 11:22:43 +0200 Subject: [PATCH 577/741] bugfix: pads edited with properties dialog were not refreshed. bugfix: changing track width/via size using the dropdown menu when custom size was enabled did not change anything. --- pcbnew/tools/edit_tool.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index db08a607a5..675d95dc39 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -270,6 +270,7 @@ int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) updateRatsnest( true ); getModel()->GetRatsnest()->Recalculate(); + item->ViewUpdate(); m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate ); } From 1f7ce5416c526dfb560333c96b0ab672da86d471 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 11:22:43 +0200 Subject: [PATCH 578/741] Next/previous footprint toolbar buttons are handled in the Module Viewer using GAL canvas. --- pcbnew/modview_frame.cpp | 33 ++++++++++++++++++++------------- pcbnew/modview_frame.h | 5 +++-- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/pcbnew/modview_frame.cpp b/pcbnew/modview_frame.cpp index 0a50ed6eb9..cd0622fd12 100644 --- a/pcbnew/modview_frame.cpp +++ b/pcbnew/modview_frame.cpp @@ -356,6 +356,15 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList() } +void FOOTPRINT_VIEWER_FRAME::UseGalCanvas( bool aEnable ) +{ + EDA_DRAW_FRAME::UseGalCanvas( aEnable ); + + if( aEnable ) + GetGalCanvas()->StartDrawing(); +} + + void FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList() { m_footprintList->Clear(); @@ -455,15 +464,7 @@ void FOOTPRINT_VIEWER_FRAME::ClickOnFootprintList( wxCommandEvent& event ) UpdateTitle(); if( IsGalCanvasActive() ) - { - static_cast( GetGalCanvas() )->DisplayBoard( m_Pcb ); - - // Autozoom - m_Pcb->ComputeBoundingBox( false ); - EDA_RECT boardBbox = m_Pcb->GetBoundingBox(); - GetGalCanvas()->GetView()->SetViewport( BOX2D( boardBbox.GetOrigin(), - boardBbox.GetSize() ) ); - } + redrawGal(); Zoom_Automatique( false ); m_canvas->Refresh(); @@ -846,8 +847,12 @@ void FOOTPRINT_VIEWER_FRAME::SelectAndViewFootprint( int aMode ) GetBoard()->Add( footprint, ADD_APPEND ); Update3D_Frame(); + + if( IsGalCanvasActive() ) + redrawGal(); } + UpdateTitle(); Zoom_Automatique( false ); m_canvas->Refresh(); @@ -873,10 +878,12 @@ void FOOTPRINT_VIEWER_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg ) } -void FOOTPRINT_VIEWER_FRAME::UseGalCanvas( bool aEnable ) +void FOOTPRINT_VIEWER_FRAME::redrawGal() { - EDA_DRAW_FRAME::UseGalCanvas( aEnable ); + static_cast( GetGalCanvas() )->DisplayBoard( m_Pcb ); - if( aEnable ) - GetGalCanvas()->StartDrawing(); + // Autozoom + m_Pcb->ComputeBoundingBox( false ); + EDA_RECT boardBbox = m_Pcb->GetBoundingBox(); + GetGalCanvas()->GetView()->SetViewport( BOX2D( boardBbox.GetOrigin(), boardBbox.GetSize() ) ); } diff --git a/pcbnew/modview_frame.h b/pcbnew/modview_frame.h index 0301cfd52f..4dd1210979 100644 --- a/pcbnew/modview_frame.h +++ b/pcbnew/modview_frame.h @@ -69,6 +69,8 @@ public: */ void ReCreateLibraryList(); + ///> @copydoc EDA_DRAW_FRAME::UseGalCanvas() + virtual void UseGalCanvas( bool aEnable ); private: @@ -170,8 +172,7 @@ private: void SaveCopyInUndoList( BOARD_ITEM*, UNDO_REDO_T, const wxPoint& ) {} void SaveCopyInUndoList( const PICKED_ITEMS_LIST&, UNDO_REDO_T, const wxPoint &) {} - ///> @copydoc EDA_DRAW_FRAME::UseGalCanvas() - virtual void UseGalCanvas( bool aEnable ); + void redrawGal(); DECLARE_EVENT_TABLE() }; From 7645ed86018f358ea162d034f9a44419c18894c3 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 11:22:43 +0200 Subject: [PATCH 579/741] Grid offset is recomputed only when settings are changed. --- common/gal/graphics_abstraction_layer.cpp | 3 --- include/gal/graphics_abstraction_layer.h | 6 ++++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/common/gal/graphics_abstraction_layer.cpp b/common/gal/graphics_abstraction_layer.cpp index 821df4969f..00e976b19a 100644 --- a/common/gal/graphics_abstraction_layer.cpp +++ b/common/gal/graphics_abstraction_layer.cpp @@ -134,9 +134,6 @@ void GAL::DrawGrid() // Draw the grid // For the drawing the start points, end points and increments have // to be calculated in world coordinates - gridOffset = VECTOR2D( (long) gridOrigin.x % (long) gridSize.x, - (long) gridOrigin.y % (long) gridSize.y ); - VECTOR2D worldStartPoint = screenWorldMatrix * VECTOR2D( 0.0, 0.0 ); VECTOR2D worldEndPoint = screenWorldMatrix * VECTOR2D( screenSize ); diff --git a/include/gal/graphics_abstraction_layer.h b/include/gal/graphics_abstraction_layer.h index 24f207f355..f607e96975 100644 --- a/include/gal/graphics_abstraction_layer.h +++ b/include/gal/graphics_abstraction_layer.h @@ -631,6 +631,9 @@ public: inline void SetGridOrigin( const VECTOR2D& aGridOrigin ) { gridOrigin = aGridOrigin; + + gridOffset = VECTOR2D( (long) gridOrigin.x % (long) gridSize.x, + (long) gridOrigin.y % (long) gridSize.y ); } /** @@ -661,6 +664,9 @@ public: inline void SetGridSize( const VECTOR2D& aGridSize ) { gridSize = aGridSize; + + gridOffset = VECTOR2D( (long) gridOrigin.x % (long) gridSize.x, + (long) gridOrigin.y % (long) gridSize.y ); } /** From 8a5fedb72879b6472876584dfd8877454e468bb9 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 11:22:43 +0200 Subject: [PATCH 580/741] Code formatting and cleaning. --- common/view/view.cpp | 37 +++++++++++++++++++------------------ pcbnew/tools/pcb_tools.cpp | 1 - 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/common/view/view.cpp b/common/view/view.cpp index 4fb2f7c75e..981c8b0d31 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -1019,33 +1019,34 @@ void VIEW::UpdateItems() m_needsUpdate.clear(); } -struct VIEW::extentsVisitor { - BOX2I extents; - bool first; - extentsVisitor() - { - first = true; - } +struct VIEW::extentsVisitor +{ + BOX2I extents; + bool first; + + extentsVisitor() + { + first = true; + } + + bool operator()( VIEW_ITEM* aItem ) + { + if( first ) + extents = aItem->ViewBBox(); + else + extents.Merge ( aItem->ViewBBox() ); + return false; + } +}; - bool operator()( VIEW_ITEM* aItem ) - { - if( first ) - extents = aItem->ViewBBox(); - else - extents.Merge ( aItem->ViewBBox() ); - return false; - } - }; const BOX2I VIEW::CalculateExtents() { - extentsVisitor v; BOX2I fullScene; fullScene.SetMaximum(); - BOOST_FOREACH( VIEW_LAYER* l, m_orderedLayers ) { l->items->Query( fullScene, v ); diff --git a/pcbnew/tools/pcb_tools.cpp b/pcbnew/tools/pcb_tools.cpp index 83fda666db..ee8af05595 100644 --- a/pcbnew/tools/pcb_tools.cpp +++ b/pcbnew/tools/pcb_tools.cpp @@ -29,7 +29,6 @@ #include #include -//#include #include "selection_tool.h" #include "edit_tool.h" From a24576f3ce83494635e6b0edb2a9c12ed28e414c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 11:22:43 +0200 Subject: [PATCH 581/741] Initial version of the GAL-based Module Editor. --- pcbnew/loadcmp.cpp | 10 +++++++++ pcbnew/modedit.cpp | 13 +++++++++++ pcbnew/module_editor_frame.h | 3 +++ pcbnew/moduleframe.cpp | 42 ++++++++++++++++++++++++++++++++++++ pcbnew/tools/edit_tool.cpp | 1 + 5 files changed, 69 insertions(+) diff --git a/pcbnew/loadcmp.cpp b/pcbnew/loadcmp.cpp index 02c0601e10..748b47917f 100644 --- a/pcbnew/loadcmp.cpp +++ b/pcbnew/loadcmp.cpp @@ -30,6 +30,7 @@ #include #include +#include #include #include #include @@ -117,6 +118,15 @@ bool FOOTPRINT_EDIT_FRAME::Load_Module_From_BOARD( MODULE* aModule ) GetScreen()->ClrModify(); Zoom_Automatique( false ); + if( IsGalCanvasActive() ) + { + static_cast( GetGalCanvas() )->DisplayBoard( GetBoard() ); + + m_Pcb->ComputeBoundingBox( false ); + EDA_RECT boardBbox = m_Pcb->GetBoundingBox(); + GetGalCanvas()->GetView()->SetViewport( BOX2D( boardBbox.GetOrigin(), boardBbox.GetSize() ) ); + } + return true; } diff --git a/pcbnew/modedit.cpp b/pcbnew/modedit.cpp index ed81bc7989..c3bae138a9 100644 --- a/pcbnew/modedit.cpp +++ b/pcbnew/modedit.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -914,3 +915,15 @@ EDA_COLOR_T FOOTPRINT_EDIT_FRAME::GetGridColor() const return g_ColorsSettings.GetItemColor( GRID_VISIBLE ); } + +void FOOTPRINT_EDIT_FRAME::UseGalCanvas( bool aEnable ) +{ + EDA_DRAW_FRAME::UseGalCanvas( aEnable ); + + if( aEnable ) + { + SetBoard( m_Pcb ); + + GetGalCanvas()->StartDrawing(); + } +} diff --git a/pcbnew/module_editor_frame.h b/pcbnew/module_editor_frame.h index 1e10a01b09..665349aad9 100644 --- a/pcbnew/module_editor_frame.h +++ b/pcbnew/module_editor_frame.h @@ -399,6 +399,9 @@ public: virtual EDA_COLOR_T GetGridColor() const; + ///> @copydoc EDA_DRAW_FRAME::UseGalCanvas() + virtual void UseGalCanvas( bool aEnable ); + DECLARE_EVENT_TABLE() protected: diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index d844321bdc..9cf223a256 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -52,6 +53,15 @@ #include #include +#include +#include +#include "tools/selection_tool.h" +#include "tools/edit_tool.h" +#include "tools/drawing_tool.h" +#include "tools/point_editor.h" +#include "tools/pcbnew_control.h" +#include "tools/common_actions.h" + BEGIN_EVENT_TABLE( FOOTPRINT_EDIT_FRAME, PCB_BASE_FRAME ) EVT_MENU_RANGE( ID_POPUP_PCB_ITEM_SELECTION_START, ID_POPUP_PCB_ITEM_SELECTION_END, @@ -167,6 +177,12 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : // Show a title (frame title + footprint name): updateTitle(); + // Create GAL canvas + EDA_DRAW_FRAME* drawFrame = static_cast( aParent ); + PCB_DRAW_PANEL_GAL* drawPanel = new PCB_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), m_FrameSize, + drawFrame->GetGalCanvas()->GetBackend() ); + SetGalCanvas( drawPanel ); + SetBoard( new BOARD() ); // restore the last footprint from the project, if any @@ -224,11 +240,37 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : m_auimgr.AddPane( m_canvas, wxAuiPaneInfo().Name( wxT( "DrawFrame" ) ).CentrePane() ); + m_auimgr.AddPane( (wxWindow*) GetGalCanvas(), + wxAuiPaneInfo().Name( wxT( "DrawFrameGal" ) ).CentrePane().Hide() ); m_auimgr.AddPane( m_messagePanel, wxAuiPaneInfo( mesg_pane ).Name( wxT( "MsgPanel" ) ).Bottom().Layer(10) ); m_auimgr.Update(); + + if( drawFrame->IsGalCanvasActive() ) + { + drawPanel->DisplayBoard( GetBoard() ); + + // Create the manager and dispatcher & route draw panel events to the dispatcher + m_toolManager = new TOOL_MANAGER; + m_toolManager->SetEnvironment( GetBoard(), drawPanel->GetView(), + drawPanel->GetViewControls(), this ); + m_toolDispatcher = new TOOL_DISPATCHER( m_toolManager ); + drawPanel->SetEventDispatcher( m_toolDispatcher ); + + m_toolManager->RegisterTool( new SELECTION_TOOL ); + m_toolManager->RegisterTool( new EDIT_TOOL ); + m_toolManager->RegisterTool( new DRAWING_TOOL ); + m_toolManager->RegisterTool( new POINT_EDITOR ); + m_toolManager->RegisterTool( new PCBNEW_CONTROL ); + m_toolManager->ResetTools( TOOL_BASE::RUN ); + + // Run the selection tool, it is supposed to be always active + m_toolManager->InvokeTool( "pcbnew.InteractiveSelection" ); + + UseGalCanvas( true ); + } } diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 675d95dc39..d2199f8a5d 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -545,6 +545,7 @@ void EDIT_TOOL::processChanges( const PICKED_ITEMS_LIST* aList ) switch( operation ) { case UR_CHANGED: + case UR_MODEDIT: updItem->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); break; From 5a428e195712c41a9fc227dbabd4c24c47a7aa47 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 11:24:56 +0200 Subject: [PATCH 582/741] Moved layers visibility synchronization to PCB_DRAW_PANEL_GAL::SyncLayersVisibility(). --- pcbnew/pcb_draw_panel_gal.cpp | 25 +++++++++++++++++++++++++ pcbnew/pcb_draw_panel_gal.h | 7 +++++++ pcbnew/pcbframe.cpp | 24 +----------------------- 3 files changed, 33 insertions(+), 23 deletions(-) diff --git a/pcbnew/pcb_draw_panel_gal.cpp b/pcbnew/pcb_draw_panel_gal.cpp index 2c60634453..92293aaf24 100644 --- a/pcbnew/pcb_draw_panel_gal.cpp +++ b/pcbnew/pcb_draw_panel_gal.cpp @@ -321,3 +321,28 @@ void PCB_DRAW_PANEL_GAL::SetTopLayer( LAYER_ID aLayer ) m_view->UpdateAllLayersOrder(); } + + +void PCB_DRAW_PANEL_GAL::SyncLayersVisibility( const BOARD* aBoard ) +{ + // Load layer & elements visibility settings + for( LAYER_NUM i = 0; i < NB_LAYERS; ++i ) + { + m_view->SetLayerVisible( i, aBoard->IsLayerVisible( i ) ); + + // Synchronize netname layers as well + if( IsCopperLayer( i ) ) + m_view->SetLayerVisible( GetNetnameLayer( i ), aBoard->IsLayerVisible( i ) ); + } + + for( LAYER_NUM i = 0; i < END_PCB_VISIBLE_LIST; ++i ) + { + m_view->SetLayerVisible( ITEM_GAL_LAYER( i ), aBoard->IsElementVisible( i ) ); + } + + // Enable some layers that are GAL specific + m_view->SetLayerVisible( ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), true ); + m_view->SetLayerVisible( ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), true ); + m_view->SetLayerVisible( ITEM_GAL_LAYER( WORKSHEET ), true ); + m_view->SetLayerVisible( ITEM_GAL_LAYER( GP_OVERLAY ), true ); +} diff --git a/pcbnew/pcb_draw_panel_gal.h b/pcbnew/pcb_draw_panel_gal.h index fa32cde04a..26ac94f968 100644 --- a/pcbnew/pcb_draw_panel_gal.h +++ b/pcbnew/pcb_draw_panel_gal.h @@ -70,6 +70,13 @@ public: ///> @copydoc EDA_DRAW_PANEL_GAL::SetTopLayer() virtual void SetTopLayer( LAYER_ID aLayer ); + /** + * Function SyncLayersVisibility + * Updates "visibility" property of each layer of a given BOARD. + * @param aBoard contains layers visibility settings to be applied. + */ + void SyncLayersVisibility( const BOARD* aBoard ); + protected: ///> Currently used worksheet KIGFX::WORKSHEET_VIEWITEM* m_worksheet; diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 66f939663d..fdf24ad63f 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -813,29 +813,7 @@ void PCB_EDIT_FRAME::syncRenderStates() void PCB_EDIT_FRAME::syncLayerVisibilities() { m_Layers->SyncLayerVisibilities(); - - KIGFX::VIEW* view = GetGalCanvas()->GetView(); - - // Load layer & elements visibility settings - for( LAYER_NUM i = 0; i < LAYER_ID_COUNT; ++i ) - { - view->SetLayerVisible( i, m_Pcb->IsLayerVisible( LAYER_ID( i ) ) ); - - // Synchronize netname layers as well - if( IsCopperLayer( i ) ) - view->SetLayerVisible( GetNetnameLayer( i ), m_Pcb->IsLayerVisible( LAYER_ID( i ) ) ); - } - - for( LAYER_NUM i = 0; i < END_PCB_VISIBLE_LIST; ++i ) - { - view->SetLayerVisible( ITEM_GAL_LAYER( i ), m_Pcb->IsElementVisible( i ) ); - } - - // Enable some layers that are GAL specific - view->SetLayerVisible( ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), true ); - view->SetLayerVisible( ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), true ); - view->SetLayerVisible( ITEM_GAL_LAYER( WORKSHEET ), true ); - view->SetLayerVisible( ITEM_GAL_LAYER( GP_OVERLAY ), true ); + static_cast( GetGalCanvas() )->SyncLayersVisibility( m_Pcb ); } From 0306ec7efeedb1a0e04ff9dfea8fd12f2ea22ce5 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 11:50:27 +0200 Subject: [PATCH 583/741] {Set,Get}ActiveLayer moved from PCB_EDIT_FRAME to PCB_BASE_FRAME. --- include/wxBasePcbFrame.h | 18 ++++++++++++++++++ include/wxPcbStruct.h | 11 +---------- pcbnew/class_pcb_layer_widget.cpp | 2 +- pcbnew/module_editor_frame.h | 1 - pcbnew/pcb_draw_panel_gal.cpp | 6 +++--- pcbnew/pcbframe.cpp | 7 +++---- pcbnew/pcbnew_config.cpp | 2 +- pcbnew/tools/pcbnew_control.cpp | 4 ++-- 8 files changed, 29 insertions(+), 22 deletions(-) diff --git a/include/wxBasePcbFrame.h b/include/wxBasePcbFrame.h index e5ab27d1c0..ebc694a0f6 100644 --- a/include/wxBasePcbFrame.h +++ b/include/wxBasePcbFrame.h @@ -613,6 +613,24 @@ public: virtual void SwitchLayer( wxDC* DC, LAYER_ID layer ); + /** + * Function SetActiveLayer + * will change the currently active layer to \a aLayer. + */ + virtual void SetActiveLayer( LAYER_ID aLayer ) + { + ( (PCB_SCREEN*) GetScreen() )->m_Active_Layer = aLayer; + } + + /** + * Function GetActiveLayer + * returns the active layer + */ + virtual LAYER_ID GetActiveLayer() const + { + return ( (PCB_SCREEN*) GetScreen() )->m_Active_Layer; + } + void LoadSettings( wxConfigBase* aCfg ); // override virtual void SaveSettings( wxConfigBase* aCfg ); // override virtual diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index 4620fc2767..33f2e0e6bb 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -536,16 +536,7 @@ public: * will change the currently active layer to \a aLayer and also * update the PCB_LAYER_WIDGET. */ - void SetActiveLayer( LAYER_ID aLayer, bool doLayerWidgetUpdate = true ); - - /** - * Function GetActiveLayer - * returns the active layer - */ - LAYER_ID GetActiveLayer() const - { - return ( (PCB_SCREEN*) GetScreen() )->m_Active_Layer; - } + virtual void SetActiveLayer( LAYER_ID aLayer ); /** * Function IsElementVisible diff --git a/pcbnew/class_pcb_layer_widget.cpp b/pcbnew/class_pcb_layer_widget.cpp index b0e5910a76..172df49f64 100644 --- a/pcbnew/class_pcb_layer_widget.cpp +++ b/pcbnew/class_pcb_layer_widget.cpp @@ -373,7 +373,7 @@ bool PCB_LAYER_WIDGET::OnLayerSelect( int aLayer ) { // the layer change from the PCB_LAYER_WIDGET can be denied by returning // false from this function. - myframe->SetActiveLayer( ToLAYER_ID( aLayer ), false ); + myframe->SetActiveLayer( ToLAYER_ID( aLayer ) ); if( m_alwaysShowActiveCopperLayer ) OnLayerSelected(); diff --git a/pcbnew/module_editor_frame.h b/pcbnew/module_editor_frame.h index 665349aad9..c733e922e0 100644 --- a/pcbnew/module_editor_frame.h +++ b/pcbnew/module_editor_frame.h @@ -217,7 +217,6 @@ public: BOARD_ITEM* ModeditLocateAndDisplay( int aHotKeyCode = 0 ); /* Undo and redo functions */ -public: /** * Function SaveCopyInUndoList. diff --git a/pcbnew/pcb_draw_panel_gal.cpp b/pcbnew/pcb_draw_panel_gal.cpp index 92293aaf24..12965f3e03 100644 --- a/pcbnew/pcb_draw_panel_gal.cpp +++ b/pcbnew/pcb_draw_panel_gal.cpp @@ -326,13 +326,13 @@ void PCB_DRAW_PANEL_GAL::SetTopLayer( LAYER_ID aLayer ) void PCB_DRAW_PANEL_GAL::SyncLayersVisibility( const BOARD* aBoard ) { // Load layer & elements visibility settings - for( LAYER_NUM i = 0; i < NB_LAYERS; ++i ) + for( LAYER_NUM i = 0; i < LAYER_ID_COUNT; ++i ) { - m_view->SetLayerVisible( i, aBoard->IsLayerVisible( i ) ); + m_view->SetLayerVisible( i, aBoard->IsLayerVisible( LAYER_ID( i ) ) ); // Synchronize netname layers as well if( IsCopperLayer( i ) ) - m_view->SetLayerVisible( GetNetnameLayer( i ), aBoard->IsLayerVisible( i ) ); + m_view->SetLayerVisible( GetNetnameLayer( i ), aBoard->IsLayerVisible( LAYER_ID( i ) ) ); } for( LAYER_NUM i = 0; i < END_PCB_VISIBLE_LIST; ++i ) diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index fdf24ad63f..c07f28a8c4 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -783,14 +783,13 @@ bool PCB_EDIT_FRAME::IsMicroViaAcceptable() } -void PCB_EDIT_FRAME::SetActiveLayer( LAYER_ID aLayer, bool doLayerWidgetUpdate ) +void PCB_EDIT_FRAME::SetActiveLayer( LAYER_ID aLayer ) { - ( (PCB_SCREEN*) GetScreen() )->m_Active_Layer = aLayer; + PCB_BASE_FRAME::SetActiveLayer( aLayer ); GetGalCanvas()->SetHighContrastLayer( aLayer ); - if( doLayerWidgetUpdate ) - syncLayerWidgetLayer(); + syncLayerWidgetLayer(); if( IsGalCanvasActive() ) GetGalCanvas()->Refresh(); diff --git a/pcbnew/pcbnew_config.cpp b/pcbnew/pcbnew_config.cpp index d8eda36868..963f9c4ba2 100644 --- a/pcbnew/pcbnew_config.cpp +++ b/pcbnew/pcbnew_config.cpp @@ -99,7 +99,7 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event ) if( !GetBoard()->GetEnabledLayers()[ cur_layer ] ) cur_layer = F_Cu; - SetActiveLayer( cur_layer, true ); + SetActiveLayer( cur_layer ); OnModify(); ReCreateLayerBox(); diff --git a/pcbnew/tools/pcbnew_control.cpp b/pcbnew/tools/pcbnew_control.cpp index 49d2629206..17b5b021aa 100644 --- a/pcbnew/tools/pcbnew_control.cpp +++ b/pcbnew/tools/pcbnew_control.cpp @@ -289,7 +289,7 @@ int PCBNEW_CONTROL::LayerInner6( TOOL_EVENT& aEvent ) int PCBNEW_CONTROL::LayerBottom( TOOL_EVENT& aEvent ) { - getEditFrame()->SetActiveLayer( B_Cu, true ); + getEditFrame()->SwitchLayer( NULL, B_Cu ); getEditFrame()->GetGalCanvas()->SetFocus(); setTransitions(); @@ -311,7 +311,7 @@ int PCBNEW_CONTROL::LayerNext( TOOL_EVENT& aEvent ) if( getModel()->GetCopperLayerCount() < 2 ) // Single layer layer = B_Cu; else if( layer >= getModel()->GetCopperLayerCount() - 2 ) - layer = B_Cu; + layer = F_Cu; else ++layer; From dca4667e66c9f3ceebce0af90bb28af915835bea Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 11:59:23 +0200 Subject: [PATCH 584/741] PCB_LAYER_WIDGET became able to cooperate with PCB_BASE_FRAME. --- include/wxPcbStruct.h | 1 + pcbnew/class_pcb_layer_widget.cpp | 5 ++--- pcbnew/class_pcb_layer_widget.h | 6 ++++-- pcbnew/layer_widget.cpp | 6 ++++++ pcbnew/layer_widget.h | 1 + pcbnew/pcbframe.cpp | 8 ++++++++ 6 files changed, 22 insertions(+), 5 deletions(-) diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index 33f2e0e6bb..98d95c465d 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -252,6 +252,7 @@ public: void OnUpdateAutoPlaceModulesMode( wxUpdateUIEvent& aEvent ); void OnUpdateAutoPlaceTracksMode( wxUpdateUIEvent& aEvent ); void OnUpdateMuWaveToolbar( wxUpdateUIEvent& aEvent ); + void OnLayerColorChange( wxCommandEvent& aEvent ); /** * Function RecordMacros. diff --git a/pcbnew/class_pcb_layer_widget.cpp b/pcbnew/class_pcb_layer_widget.cpp index 172df49f64..04954b1248 100644 --- a/pcbnew/class_pcb_layer_widget.cpp +++ b/pcbnew/class_pcb_layer_widget.cpp @@ -81,7 +81,7 @@ const LAYER_WIDGET::ROW PCB_LAYER_WIDGET::s_render_rows[] = { }; -PCB_LAYER_WIDGET::PCB_LAYER_WIDGET( PCB_EDIT_FRAME* aParent, wxWindow* aFocusOwner, int aPointSize ) : +PCB_LAYER_WIDGET::PCB_LAYER_WIDGET( PCB_BASE_FRAME* aParent, wxWindow* aFocusOwner, int aPointSize ) : LAYER_WIDGET( aParent, aFocusOwner, aPointSize ), myframe( aParent ) { @@ -213,7 +213,7 @@ void PCB_LAYER_WIDGET::SetLayersManagerTabsText() void PCB_LAYER_WIDGET::ReFillRender() { - BOARD* board = myframe->GetBoard(); + BOARD* board = myframe->GetBoard(); ClearRenderRows(); // Add "Render" tab rows to LAYER_WIDGET, after setting color and checkbox state. @@ -356,7 +356,6 @@ void PCB_LAYER_WIDGET::ReFill() void PCB_LAYER_WIDGET::OnLayerColorChange( int aLayer, EDA_COLOR_T aColor ) { myframe->GetBoard()->SetLayerColor( ToLAYER_ID( aLayer ), aColor ); - myframe->ReCreateLayerBox( false ); if( myframe->IsGalCanvasActive() ) { diff --git a/pcbnew/class_pcb_layer_widget.h b/pcbnew/class_pcb_layer_widget.h index 4f7d715367..211e603aa4 100644 --- a/pcbnew/class_pcb_layer_widget.h +++ b/pcbnew/class_pcb_layer_widget.h @@ -31,6 +31,8 @@ #ifndef CLASS_PCB_LAYER_WIDGET_H_ #define CLASS_PCB_LAYER_WIDGET_H_ +#include + /** * Class PCB_LAYER_WIDGET * is here to implement the abtract functions of LAYER_WIDGET so they @@ -49,7 +51,7 @@ public: * effectively sets the overal size of the widget via the row height and bitmap * button sizes. */ - PCB_LAYER_WIDGET( PCB_EDIT_FRAME* aParent, wxWindow* aFocusOwner, int aPointSize = 10 ); + PCB_LAYER_WIDGET( PCB_BASE_FRAME* aParent, wxWindow* aFocusOwner, int aPointSize = 10 ); void ReFill(); @@ -108,7 +110,7 @@ protected: bool m_alwaysShowActiveCopperLayer; // If true: Only shows the current active layer // even if it is changed - PCB_EDIT_FRAME* myframe; + PCB_BASE_FRAME* myframe; // popup menu ids. #define ID_SHOW_ALL_COPPERS wxID_HIGHEST diff --git a/pcbnew/layer_widget.cpp b/pcbnew/layer_widget.cpp index fda117b8e4..df23c188e3 100644 --- a/pcbnew/layer_widget.cpp +++ b/pcbnew/layer_widget.cpp @@ -44,6 +44,8 @@ #define BUTT_SIZE_Y 18 #define BUTT_VOID 4 +const wxEventType LAYER_WIDGET::EVT_LAYER_COLOR_CHANGE = wxNewEventType(); + /* XPM * This bitmap is used for not selected layers */ @@ -294,6 +296,10 @@ void LAYER_WIDGET::OnMiddleDownLayerColor( wxMouseEvent& event ) // tell the client code. OnLayerColorChange( layer, newColor ); + + // notify others + wxCommandEvent event( EVT_LAYER_COLOR_CHANGE ); + wxPostEvent( this, event ); } passOnFocus(); diff --git a/pcbnew/layer_widget.h b/pcbnew/layer_widget.h index 347038919c..cfb6bc384f 100644 --- a/pcbnew/layer_widget.h +++ b/pcbnew/layer_widget.h @@ -98,6 +98,7 @@ public: } }; + static const wxEventType EVT_LAYER_COLOR_CHANGE; protected: diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index c07f28a8c4..6bb044b1b7 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -294,6 +294,8 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME ) PCB_EDIT_FRAME::OnUpdateZoneDisplayStyle ) EVT_UPDATE_UI_RANGE( ID_PCB_MUWAVE_START_CMD, ID_PCB_MUWAVE_END_CMD, PCB_EDIT_FRAME::OnUpdateMuWaveToolbar ) + + EVT_COMMAND( wxID_ANY, LAYER_WIDGET::EVT_LAYER_COLOR_CHANGE, PCB_EDIT_FRAME::OnLayerColorChange ) END_EVENT_TABLE() @@ -1007,6 +1009,12 @@ void PCB_EDIT_FRAME::OnSelectAutoPlaceMode( wxCommandEvent& aEvent ) } +void PCB_EDIT_FRAME::OnLayerColorChange( wxCommandEvent& aEvent ) +{ + ReCreateLayerBox(); +} + + void PCB_EDIT_FRAME::ToPlotter( wxCommandEvent& event ) { DIALOG_PLOT dlg( this ); From b5b20ef4bd282eb36e752828fa75b3eed554c4f8 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 11:59:23 +0200 Subject: [PATCH 585/741] Added layer widget to the module editor. --- pcbnew/loadcmp.cpp | 1 + pcbnew/modedit.cpp | 11 +++++++++++ pcbnew/module_editor_frame.h | 4 ++++ pcbnew/moduleframe.cpp | 28 ++++++++++++++++++++++++---- 4 files changed, 40 insertions(+), 4 deletions(-) diff --git a/pcbnew/loadcmp.cpp b/pcbnew/loadcmp.cpp index 748b47917f..47a4728e92 100644 --- a/pcbnew/loadcmp.cpp +++ b/pcbnew/loadcmp.cpp @@ -56,6 +56,7 @@ #include #include #include +#include static void DisplayCmpDoc( wxString& Name ); diff --git a/pcbnew/modedit.cpp b/pcbnew/modedit.cpp index c3bae138a9..8d643b4a67 100644 --- a/pcbnew/modedit.cpp +++ b/pcbnew/modedit.cpp @@ -916,6 +916,17 @@ EDA_COLOR_T FOOTPRINT_EDIT_FRAME::GetGridColor() const } +void FOOTPRINT_EDIT_FRAME::SetActiveLayer( LAYER_NUM aLayer ) +{ + PCB_BASE_FRAME::SetActiveLayer( aLayer ); + + GetGalCanvas()->SetHighContrastLayer( aLayer ); + + if( IsGalCanvasActive() ) + GetGalCanvas()->Refresh(); +} + + void FOOTPRINT_EDIT_FRAME::UseGalCanvas( bool aEnable ) { EDA_DRAW_FRAME::UseGalCanvas( aEnable ); diff --git a/pcbnew/module_editor_frame.h b/pcbnew/module_editor_frame.h index c733e922e0..ef9687a6a3 100644 --- a/pcbnew/module_editor_frame.h +++ b/pcbnew/module_editor_frame.h @@ -398,6 +398,9 @@ public: virtual EDA_COLOR_T GetGridColor() const; + ///> @copydoc PCB_BASE_FRAME::SetActiveLayer() + void SetActiveLayer( LAYER_NUM aLayer ); + ///> @copydoc EDA_DRAW_FRAME::UseGalCanvas() virtual void UseGalCanvas( bool aEnable ); @@ -408,6 +411,7 @@ protected: /// protected so only friend PCB::IFACE::CreateWindow() can act as sole factory. FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ); + PCB_LAYER_WIDGET* m_Layers; /** * Function GetComponentFromUndoList diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index 9cf223a256..b1253fc870 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -52,6 +52,7 @@ #include #include #include +#include #include #include @@ -191,6 +192,9 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : // Ensure all layers and items are visible: GetBoard()->SetVisibleAlls(); + wxFont font = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT ); + m_Layers = new PCB_LAYER_WIDGET( this, GetCanvas(), font.GetPointSize() ); + SetScreen( new PCB_SCREEN( GetPageSettings().GetSizeIU() ) ); GetScreen()->SetCurItem( NULL ); @@ -224,6 +228,14 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : EDA_PANEINFO mesg_pane; mesg_pane.MessageToolbarPane(); + // Create a wxAuiPaneInfo for the Layers Manager, not derived from the template. + // LAYER_WIDGET is floatable, but initially docked at far right + EDA_PANEINFO lyrs; + lyrs.LayersToolbarPane(); + lyrs.MinSize( m_Layers->GetBestSize() ); // updated in ReFillLayerWidget + lyrs.BestSize( m_Layers->GetBestSize() ); + lyrs.Caption( _( "Visibles" ) ); + m_auimgr.AddPane( m_mainToolBar, wxAuiPaneInfo( horiz ).Name( wxT( "m_mainToolBar" ) ).Top(). Row( 0 ) ); @@ -234,6 +246,11 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : m_auimgr.AddPane( m_drawToolBar, wxAuiPaneInfo( vert ).Name( wxT( "m_VToolBar" ) ).Right().Layer(1) ); + // Add the layer manager ( most right side of pcbframe ) + m_auimgr.AddPane( m_Layers, lyrs.Name( wxT( "m_LayersManagerToolBar" ) ).Right().Layer( 2 ) ); + // Layers manager is visible and served only in GAL canvas mode. + m_auimgr.GetPane( wxT( "m_LayersManagerToolBar" ) ).Show( drawFrame->IsGalCanvasActive() ); + // The left vertical toolbar (fast acces to display options) m_auimgr.AddPane( m_optionsToolBar, wxAuiPaneInfo( vert ).Name( wxT( "m_optionsToolBar" ) ). Left().Layer(1) ); @@ -246,12 +263,8 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : m_auimgr.AddPane( m_messagePanel, wxAuiPaneInfo( mesg_pane ).Name( wxT( "MsgPanel" ) ).Bottom().Layer(10) ); - m_auimgr.Update(); - if( drawFrame->IsGalCanvasActive() ) { - drawPanel->DisplayBoard( GetBoard() ); - // Create the manager and dispatcher & route draw panel events to the dispatcher m_toolManager = new TOOL_MANAGER; m_toolManager->SetEnvironment( GetBoard(), drawPanel->GetView(), @@ -271,6 +284,11 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : UseGalCanvas( true ); } + + m_Layers->ReFill(); + m_Layers->ReFillRender(); + + m_auimgr.Update(); } @@ -278,6 +296,8 @@ FOOTPRINT_EDIT_FRAME::~FOOTPRINT_EDIT_FRAME() { // save the footprint in the PROJECT retainLastFootprint(); + + delete m_Layers; } From dfc052d53704e74cbcbaca1f8dcec846c1ee29f9 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 11:59:24 +0200 Subject: [PATCH 586/741] Added an alternative way to reach tools in the Tool Framework. --- common/tool/tool_manager.cpp | 10 +++++++--- include/tool/tool_manager.h | 27 +++++++++++++++++++++++---- 2 files changed, 30 insertions(+), 7 deletions(-) diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index abfd66b566..8f052d57fa 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -109,7 +109,7 @@ TOOL_MANAGER::TOOL_MANAGER() : TOOL_MANAGER::~TOOL_MANAGER() { - std::map::iterator it, it_end; + boost::unordered_map::iterator it, it_end; for( it = m_toolState.begin(), it_end = m_toolState.end(); it != it_end; ++it ) { @@ -129,6 +129,8 @@ void TOOL_MANAGER::RegisterTool( TOOL_BASE* aTool ) wxT( "Adding two tools with the same name may result in unexpected behaviour.") ); wxASSERT_MSG( m_toolIdIndex.find( aTool->GetId() ) == m_toolIdIndex.end(), wxT( "Adding two tools with the same ID may result in unexpected behaviour.") ); + wxASSERT_MSG( m_toolTypes.find( typeid( *aTool ).name() ) == m_toolTypes.end(), + wxT( "Adding two tools of the same type may result in unexpected behaviour.") ); TOOL_STATE* st = new TOOL_STATE; @@ -141,6 +143,7 @@ void TOOL_MANAGER::RegisterTool( TOOL_BASE* aTool ) m_toolState[aTool] = st; m_toolNameIndex[aTool->GetName()] = st; m_toolIdIndex[aTool->GetId()] = st; + m_toolTypes[typeid( *aTool ).name()] = st->theTool; aTool->m_toolMgr = this; @@ -155,6 +158,7 @@ void TOOL_MANAGER::RegisterTool( TOOL_BASE* aTool ) m_toolState.erase( aTool ); m_toolNameIndex.erase( aTool->GetName() ); m_toolIdIndex.erase( aTool->GetId() ); + m_toolTypes.erase( typeid( *aTool ).name() ); delete st; delete aTool; @@ -272,7 +276,7 @@ bool TOOL_MANAGER::runTool( TOOL_BASE* aTool ) TOOL_BASE* TOOL_MANAGER::FindTool( int aId ) const { - std::map::const_iterator it = m_toolIdIndex.find( aId ); + boost::unordered_map::const_iterator it = m_toolIdIndex.find( aId ); if( it != m_toolIdIndex.end() ) return it->second->theTool; @@ -283,7 +287,7 @@ TOOL_BASE* TOOL_MANAGER::FindTool( int aId ) const TOOL_BASE* TOOL_MANAGER::FindTool( const std::string& aName ) const { - std::map::const_iterator it = m_toolNameIndex.find( aName ); + boost::unordered_map::const_iterator it = m_toolNameIndex.find( aName ); if( it != m_toolNameIndex.end() ) return it->second->theTool; diff --git a/include/tool/tool_manager.h b/include/tool/tool_manager.h index c8861c7ff1..62f7e42e8a 100644 --- a/include/tool/tool_manager.h +++ b/include/tool/tool_manager.h @@ -26,8 +26,9 @@ #ifndef __TOOL_MANAGER_H #define __TOOL_MANAGER_H -#include #include +#include +#include #include @@ -135,6 +136,21 @@ public: */ TOOL_BASE* FindTool( const std::string& aName ) const; + /* + * Function GetTool() + * Returns the tool of given type or NULL if there is no such tool registered. + */ + template + T* GetTool() + { + boost::unordered_map::iterator tool = m_toolTypes.find( typeid( T ).name() ); + + if( tool != m_toolTypes.end() ) + return static_cast( tool->second ); + + return NULL; + } + /** * Function ResetTools() * Resets all tools (i.e. calls their Reset() method). @@ -344,13 +360,16 @@ private: bool isActive( TOOL_BASE* aTool ); /// Index of registered tools current states, associated by tools' objects. - std::map m_toolState; + boost::unordered_map m_toolState; /// Index of the registered tools current states, associated by tools' names. - std::map m_toolNameIndex; + boost::unordered_map m_toolNameIndex; + + /// Index of the registered tools to easily lookup by their type. + boost::unordered_map m_toolTypes; /// Index of the registered tools current states, associated by tools' ID numbers. - std::map m_toolIdIndex; + boost::unordered_map m_toolIdIndex; /// Stack of the active tools std::deque m_activeTools; From a6dac245c0d1cb1b1039b52bfe4e34d968e77401 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 11:59:24 +0200 Subject: [PATCH 587/741] Removed TOOL_ACTIONs: selectionSingle, selectionClear. SELECTION_TOOL methods are called directly instead. --- pcbnew/router/router_tool.cpp | 3 +- pcbnew/tools/common_actions.cpp | 5 - pcbnew/tools/common_actions.h | 6 -- pcbnew/tools/drawing_tool.cpp | 15 +-- pcbnew/tools/edit_tool.cpp | 16 ++-- pcbnew/tools/selection_tool.cpp | 162 +++++++++++++++----------------- pcbnew/tools/selection_tool.h | 38 ++++---- 7 files changed, 114 insertions(+), 131 deletions(-) diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index 7416c14c17..09951064d9 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -40,6 +40,7 @@ #include #include +#include #include @@ -636,7 +637,7 @@ int ROUTER_TOOL::Main( TOOL_EVENT& aEvent ) BOARD_DESIGN_SETTINGS& bds = board->GetDesignSettings(); // Deselect all items - m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + m_toolMgr->GetTool()->ClearSelection(); getEditFrame()->SetToolID( ID_TRACK_BUTT, wxCURSOR_PENCIL, _( "Interactive Router" ) ); diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 285d662aed..73b67e462b 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -31,11 +31,6 @@ TOOL_ACTION COMMON_ACTIONS::selectionActivate( "pcbnew.InteractiveSelection", AS_GLOBAL, 0, "", "" ); // No description, it is not supposed to be shown anywhere -TOOL_ACTION COMMON_ACTIONS::selectionSingle( "pcbnew.InteractiveSelection.Single", - AS_GLOBAL, 0, "", "" ); // No description, it is not supposed to be shown anywhere - -TOOL_ACTION COMMON_ACTIONS::selectionClear( "pcbnew.InteractiveSelection.Clear", - AS_GLOBAL, 0, "", "" ); // No description, it is not supposed to be shown anywhere // Edit tool actions TOOL_ACTION COMMON_ACTIONS::editActivate( "pcbnew.InteractiveEdit", diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index 428115bb6e..5ddb660dbb 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -37,12 +37,6 @@ public: /// Activation of the selection tool static TOOL_ACTION selectionActivate; - /// Select a single item under the cursor position - static TOOL_ACTION selectionSingle; - - /// Clears the current selection - static TOOL_ACTION selectionClear; - // Edit Tool /// Activation of the edit tool static TOOL_ACTION editActivate; diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index d9d0147266..050681ca2f 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -38,6 +38,7 @@ #include #include #include +#include "selection_tool.h" #include #include @@ -102,7 +103,7 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) KIGFX::VIEW_GROUP preview( m_view ); m_view->Add( &preview ); - m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + m_toolMgr->GetTool()->ClearSelection(); m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); @@ -288,7 +289,7 @@ int DRAWING_TOOL::PlaceText( TOOL_EVENT& aEvent ) KIGFX::VIEW_GROUP preview( m_view ); m_view->Add( &preview ); - m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + m_toolMgr->GetTool()->ClearSelection(); m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); m_controls->SetAutoPan( true ); @@ -394,7 +395,7 @@ int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent ) KIGFX::VIEW_GROUP preview( m_view ); m_view->Add( &preview ); - m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + m_toolMgr->GetTool()->ClearSelection(); m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); @@ -590,7 +591,7 @@ int DRAWING_TOOL::PlaceTarget( TOOL_EVENT& aEvent ) m_view->Add( &preview ); preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + m_toolMgr->GetTool()->ClearSelection(); m_controls->SetSnapping( true ); m_controls->SetAutoPan( true ); @@ -665,7 +666,7 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent ) KIGFX::VIEW_GROUP preview( m_view ); m_view->Add( &preview ); - m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + m_toolMgr->GetTool()->ClearSelection(); m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); m_controls->SetAutoPan( true ); @@ -776,7 +777,7 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) KIGFX::VIEW_GROUP preview( m_view ); m_view->Add( &preview ); - m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + m_toolMgr->GetTool()->ClearSelection(); m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); @@ -952,7 +953,7 @@ int DRAWING_TOOL::drawZone( bool aKeepout ) KIGFX::VIEW_GROUP preview( m_view ); m_view->Add( &preview ); - m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + m_toolMgr->GetTool()->ClearSelection(); m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index d2199f8a5d..85588472de 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -48,7 +48,7 @@ EDIT_TOOL::EDIT_TOOL() : bool EDIT_TOOL::Init() { // Find the selection tool, so they can cooperate - m_selectionTool = static_cast( m_toolMgr->FindTool( "pcbnew.InteractiveSelection" ) ); + m_selectionTool = m_toolMgr->GetTool(); if( !m_selectionTool ) { @@ -198,7 +198,7 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) } if( unselect ) - m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + m_selectionTool->ClearSelection(); RN_DATA* ratsnest = getModel()->GetRatsnest(); ratsnest->ClearSimple(); @@ -252,7 +252,7 @@ int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) std::vector& undoList = editFrame->GetScreen()->m_UndoList.m_CommandsList; // Some of properties dialogs alter pointers, so we should deselect them - m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + m_selectionTool->ClearSelection(); STATUS_FLAGS flags = item->GetFlags(); item->ClearFlags(); @@ -279,7 +279,7 @@ int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) } if( unselect ) - m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + m_selectionTool->ClearSelection(); setTransitions(); @@ -332,7 +332,7 @@ int EDIT_TOOL::Rotate( TOOL_EVENT& aEvent ) getModel()->GetRatsnest()->Recalculate(); if( unselect ) - m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + m_selectionTool->ClearSelection(); m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate ); setTransitions(); @@ -386,7 +386,7 @@ int EDIT_TOOL::Flip( TOOL_EVENT& aEvent ) getModel()->GetRatsnest()->Recalculate(); if( unselect ) - m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + m_selectionTool->ClearSelection(); m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate ); setTransitions(); @@ -411,7 +411,7 @@ int EDIT_TOOL::Remove( TOOL_EVENT& aEvent ) PCB_EDIT_FRAME* editFrame = getEditFrame(); // As we are about to remove items, they have to be removed from the selection first - m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + m_selectionTool->ClearSelection(); // Save them for( unsigned int i = 0; i < selectedItems.GetCount(); ++i ) @@ -529,7 +529,7 @@ wxPoint EDIT_TOOL::getModificationPoint( const SELECTION_TOOL::SELECTION& aSelec bool EDIT_TOOL::makeSelection( const SELECTION_TOOL::SELECTION& aSelection ) { if( aSelection.Empty() ) // Try to find an item that could be modified - m_toolMgr->RunAction( COMMON_ACTIONS::selectionSingle ); + m_selectionTool->SelectSingle( getView()->ToWorld( getViewControls()->GetMousePosition() ) ); return !aSelection.Empty(); } diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 34f8c5b6f9..285cbded07 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -77,7 +77,7 @@ void SELECTION_TOOL::Reset( RESET_REASON aReason ) m_selection.clear(); else // Restore previous properties of selected items and remove them from containers - clearSelection(); + ClearSelection(); // Reinsert the VIEW_GROUP, in case it was removed from the VIEW getView()->Remove( m_selection.group ); @@ -97,16 +97,9 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) // become the new selection (discarding previously selected items) m_additive = evt->Modifier( MD_SHIFT ); - if( evt->IsAction( &COMMON_ACTIONS::selectionSingle ) ) + if( evt->IsCancel() || evt->Action() == TA_UNDO_REDO ) { - // GetMousePosition() is used, as it is independent of snapping settings - selectSingle( getView()->ToWorld( getViewControls()->GetMousePosition() ) ); - } - - else if( evt->IsCancel() || evt->Action() == TA_UNDO_REDO || - evt->IsAction( &COMMON_ACTIONS::selectionClear ) ) - { - clearSelection(); + ClearSelection(); } // single click? Select single object @@ -119,9 +112,9 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) else { if( !m_additive ) - clearSelection(); + ClearSelection(); - selectSingle( evt->Position() ); + SelectSingle( evt->Position() ); } } @@ -129,7 +122,7 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) else if( evt->IsClick( BUT_RIGHT ) ) { if( m_selection.Empty() ) - selectSingle( evt->Position() ); + SelectSingle( evt->Position() ); if( !m_selection.Empty() ) SetContextMenu( &m_menu, CMENU_NOW ); @@ -139,7 +132,7 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) else if( evt->IsDblClick( BUT_LEFT ) ) { if( m_selection.Empty() ) - selectSingle( evt->Position() ); + SelectSingle( evt->Position() ); m_toolMgr->RunAction( COMMON_ACTIONS::properties ); } @@ -154,7 +147,7 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) else if( m_selection.Empty() ) { // There is nothing selected, so try to select something - if( !selectSingle( getView()->ToWorld( getViewControls()->GetMousePosition() ), false ) ) + if( !SelectSingle( getView()->ToWorld( getViewControls()->GetMousePosition() ), false ) ) { // If nothings has been selected or user wants to select more // draw the selection box @@ -177,7 +170,7 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) else { // No -> clear the selection list - clearSelection(); + ClearSelection(); } } } @@ -190,58 +183,21 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) } -void SELECTION_TOOL::AddMenuItem( const TOOL_ACTION& aAction ) +bool SELECTION_TOOL::SelectSingle( const VECTOR2I& aWhere, bool aAllowDisambiguation ) { - assert( aAction.GetId() > 0 ); // Check if the action was registered before in ACTION_MANAGER - - m_menu.Add( aAction ); -} - - -void SELECTION_TOOL::toggleSelection( BOARD_ITEM* aItem ) -{ - if( aItem->IsSelected() ) - { - deselect( aItem ); - - // Inform other potentially interested tools - TOOL_EVENT deselectEvent( DeselectedEvent ); - m_toolMgr->ProcessEvent( deselectEvent ); - } - else - { - if( !m_additive ) - clearSelection(); - - // Prevent selection of invisible or inactive items - if( selectable( aItem ) ) - { - select( aItem ); - - // Inform other potentially interested tools - TOOL_EVENT selectEvent( SelectedEvent ); - m_toolMgr->ProcessEvent( selectEvent ); - } - } -} - - -bool SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere, bool aAllowDisambiguation ) -{ - BOARD* pcb = getModel(); BOARD_ITEM* item; GENERAL_COLLECTORS_GUIDE guide = getEditFrame()->GetCollectorsGuide(); GENERAL_COLLECTOR collector; const KICAD_T types[] = { PCB_TRACE_T, PCB_VIA_T, PCB_LINE_T, EOT }; // preferred types - collector.Collect( pcb, GENERAL_COLLECTOR::AllBoardItems, + collector.Collect( getModel(), GENERAL_COLLECTOR::AllBoardItems, wxPoint( aWhere.x, aWhere.y ), guide ); switch( collector.GetCount() ) { case 0: if( !m_additive ) - clearSelection(); + ClearSelection(); return false; @@ -293,6 +249,70 @@ bool SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere, bool aAllowDisambigua } +void SELECTION_TOOL::ClearSelection() +{ + if( m_selection.Empty() ) + return; + + KIGFX::VIEW_GROUP::const_iter it, it_end; + + // Restore the initial properties + for( it = m_selection.group->Begin(), it_end = m_selection.group->End(); it != it_end; ++it ) + { + BOARD_ITEM* item = static_cast( *it ); + + item->ViewSetVisible( true ); + item->ClearSelected(); + } + m_selection.clear(); + + getEditFrame()->SetCurItem( NULL ); + + // Do not show the context menu when there is nothing selected + SetContextMenu( &m_menu, CMENU_OFF ); + + // Inform other potentially interested tools + TOOL_EVENT clearEvent( ClearedEvent ); + m_toolMgr->ProcessEvent( clearEvent ); +} + + +void SELECTION_TOOL::AddMenuItem( const TOOL_ACTION& aAction ) +{ + assert( aAction.GetId() > 0 ); // Check if the action was registered before in ACTION_MANAGER + + m_menu.Add( aAction ); +} + + +void SELECTION_TOOL::toggleSelection( BOARD_ITEM* aItem ) +{ + if( aItem->IsSelected() ) + { + deselect( aItem ); + + // Inform other potentially interested tools + TOOL_EVENT deselectEvent( DeselectedEvent ); + m_toolMgr->ProcessEvent( deselectEvent ); + } + else + { + if( !m_additive ) + ClearSelection(); + + // Prevent selection of invisible or inactive items + if( selectable( aItem ) ) + { + select( aItem ); + + // Inform other potentially interested tools + TOOL_EVENT selectEvent( SelectedEvent ); + m_toolMgr->ProcessEvent( selectEvent ); + } + } +} + + bool SELECTION_TOOL::selectMultiple() { bool cancelled = false; // Was the tool cancelled while it was running? @@ -313,7 +333,7 @@ bool SELECTION_TOOL::selectMultiple() if( evt->IsDrag( BUT_LEFT ) ) { if( !m_additive ) - clearSelection(); + ClearSelection(); // Start drawing a selection box m_selArea->SetOrigin( evt->DragOrigin() ); @@ -368,34 +388,6 @@ bool SELECTION_TOOL::selectMultiple() } -void SELECTION_TOOL::clearSelection() -{ - if( m_selection.Empty() ) - return; - - KIGFX::VIEW_GROUP::const_iter it, it_end; - - // Restore the initial properties - for( it = m_selection.group->Begin(), it_end = m_selection.group->End(); it != it_end; ++it ) - { - BOARD_ITEM* item = static_cast( *it ); - - item->ViewSetVisible( true ); - item->ClearSelected(); - } - m_selection.clear(); - - getEditFrame()->SetCurItem( NULL ); - - // Do not show the context menu when there is nothing selected - SetContextMenu( &m_menu, CMENU_OFF ); - - // Inform other potentially interested tools - TOOL_EVENT clearEvent( ClearedEvent ); - m_toolMgr->ProcessEvent( clearEvent ); -} - - BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector ) { BOARD_ITEM* current = NULL; diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index 9fe3d32b53..2f8a58fcf1 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -113,6 +113,24 @@ public: return m_selection; } + /** + * Function SelectSingle() + * Selects an item pointed by the parameter aWhere. If there is more than one item at that + * place, there is a menu displayed that allows to choose the item. + * + * @param aWhere is the place where the item should be selected. + * @param aAllowDisambiguation decides what to do in case of disambiguation. If true, then + * a menu is shown, otherise function finishes without selecting anything. + * @return True if an item was selected, false otherwise. + */ + bool SelectSingle( const VECTOR2I& aWhere, bool aAllowDisambiguation = true ); + + /** + * Function ClearSelection() + * Clears the current selection. + */ + void ClearSelection(); + /** * Function AddMenuItem() * @@ -131,32 +149,14 @@ public: const TOOL_EVENT ClearedEvent; private: - /** - * Function selectSingle() - * Selects an item pointed by the parameter aWhere. If there is more than one item at that - * place, there is a menu displayed that allows to choose the item. - * - * @param aWhere is the place where the item should be selected. - * @param aAllowDisambiguation decides what to do in case of disambiguation. If true, then - * a menu is shown, otherise function finishes without selecting anything. - * @return True if an item was selected, false otherwise. - */ - bool selectSingle( const VECTOR2I& aWhere, bool aAllowDisambiguation = true ); - /** * Function selectMultiple() * Handles drawing a selection box that allows to select many items at the same time. * - * @return true if the function was cancelled (ie. CancelEvent was received). + * @return true if the function was cancelled (i.e. CancelEvent was received). */ bool selectMultiple(); - /** - * Function ClearSelection() - * Clears the current selection. - */ - void clearSelection(); - /** * Function disambiguationMenu() * Handles the menu that allows to select one of many items in case there is more than one From 2ee890d74b39d1d6ffc6a1ccde218c53909cac0d Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 11:59:24 +0200 Subject: [PATCH 588/741] Minor changes. --- include/tool/coroutine.h | 2 +- pcbnew/module_editor_frame.h | 4 ++-- pcbnew/tools/edit_tool.cpp | 10 +++------- pcbnew/tools/selection_tool.cpp | 1 - 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/include/tool/coroutine.h b/include/tool/coroutine.h index 9d502ff5c4..9daab59cb2 100644 --- a/include/tool/coroutine.h +++ b/include/tool/coroutine.h @@ -115,7 +115,7 @@ public: } /** - * * Function SetEntry() + * Function SetEntry() * * Defines the entry point for the coroutine, if not set in the constructor. */ diff --git a/pcbnew/module_editor_frame.h b/pcbnew/module_editor_frame.h index ef9687a6a3..295cce8670 100644 --- a/pcbnew/module_editor_frame.h +++ b/pcbnew/module_editor_frame.h @@ -419,7 +419,7 @@ protected: * - Place the current edited library component in Redo list * - Get old version of the current edited library component */ - void GetComponentFromUndoList( wxCommandEvent& event ); + void GetComponentFromUndoList( wxCommandEvent& aEvent ); /** * Function GetComponentFromRedoList @@ -427,7 +427,7 @@ protected: * - Place the current edited library component in undo list * - Get old version of the current edited library component */ - void GetComponentFromRedoList( wxCommandEvent& event ); + void GetComponentFromRedoList( wxCommandEvent& aEvent ); /** * Function UpdateTitle diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 85588472de..cc7e770e37 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -219,9 +219,6 @@ int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); PCB_EDIT_FRAME* editFrame = getEditFrame(); - // Shall the selection be cleared at the end? - bool unselect = selection.Empty(); - if( !makeSelection( selection ) ) { setTransitions(); @@ -238,9 +235,11 @@ int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) // Check if user wants to edit pad or module properties if( item->Type() == PCB_MODULE_T ) { + VECTOR2D cursor = getViewControls()->GetCursorPosition(); + for( D_PAD* pad = static_cast( item )->Pads(); pad; pad = pad->Next() ) { - if( pad->ViewBBox().Contains( getViewControls()->GetCursorPosition() ) ) + if( pad->ViewBBox().Contains( cursor ) ) { // Turns out that user wants to edit a pad properties item = pad; @@ -278,9 +277,6 @@ int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) item->SetFlags( flags ); } - if( unselect ) - m_selectionTool->ClearSelection(); - setTransitions(); return 0; diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 285cbded07..0953e7f517 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -24,7 +24,6 @@ */ #include -#include #include #include From 953f71df3e6e4bbb2c44a32a1ccb67be05f1a6e1 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 11:59:24 +0200 Subject: [PATCH 589/741] Move() method updates local coordinates in EDGE_MODULE, D_PAD and TEXTE_MODULE classes. --- pcbnew/class_edge_mod.cpp | 19 +++++++++++++++++++ pcbnew/class_edge_mod.h | 11 +++++++++++ pcbnew/class_pad.cpp | 32 ++++++++++++++++++++++++++++++++ pcbnew/class_pad.h | 9 ++++++++- pcbnew/class_text_mod.cpp | 5 ++--- pcbnew/class_text_mod.h | 7 ++++--- 6 files changed, 76 insertions(+), 7 deletions(-) diff --git a/pcbnew/class_edge_mod.cpp b/pcbnew/class_edge_mod.cpp index 2d1ba56e57..5791563007 100644 --- a/pcbnew/class_edge_mod.cpp +++ b/pcbnew/class_edge_mod.cpp @@ -90,6 +90,25 @@ void EDGE_MODULE::Copy( EDGE_MODULE* source ) } +void EDGE_MODULE::SetLocalCoord() +{ + MODULE* module = (MODULE*) m_Parent; + + if( module == NULL ) + { + m_Start0 = m_Start; + m_End0 = m_End; + return; + } + + m_Start0 = m_Start - module->GetPosition(); + m_End0 = m_End - module->GetPosition(); + double angle = module->GetOrientation(); + RotatePoint( &m_Start0.x, &m_Start0.y, -angle ); + RotatePoint( &m_End0.x, &m_End0.y, -angle ); +} + + void EDGE_MODULE::SetDrawCoord() { MODULE* module = (MODULE*) m_Parent; diff --git a/pcbnew/class_edge_mod.h b/pcbnew/class_edge_mod.h index 7b8d5b09c8..e7b945a9af 100644 --- a/pcbnew/class_edge_mod.h +++ b/pcbnew/class_edge_mod.h @@ -61,12 +61,23 @@ public: void Copy( EDGE_MODULE* source ); // copy structure + void Move( const wxPoint& aMoveVector ) + { + m_Start += aMoveVector; + m_End += aMoveVector; + SetLocalCoord(); + } + void SetStart0( const wxPoint& aPoint ) { m_Start0 = aPoint; } const wxPoint& GetStart0() const { return m_Start0; } void SetEnd0( const wxPoint& aPoint ) { m_End0 = aPoint; } const wxPoint& GetEnd0() const { return m_End0; } + ///> Set relative coordinates. + void SetLocalCoord(); + + ///> Set absolute coordinates. void SetDrawCoord(); /* drawing functions */ diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index a65bd54784..246a766c9d 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -228,6 +228,38 @@ const EDA_RECT D_PAD::GetBoundingBox() const } +void D_PAD::SetDrawCoord() +{ + MODULE* module = (MODULE*) m_Parent; + + m_Pos = m_Pos0; + + if( module == NULL ) + return; + + double angle = module->GetOrientation(); + + RotatePoint( &m_Pos.x, &m_Pos.y, angle ); + m_Pos += module->GetPosition(); +} + + +void D_PAD::SetLocalCoord() +{ + MODULE* module = (MODULE*) m_Parent; + + if( module == NULL ) + { + m_Pos0 = m_Pos; + return; + } + + m_Pos0 = m_Pos - module->GetPosition(); + double angle = module->GetOrientation(); + RotatePoint( &m_Pos0.x, &m_Pos0.y, -angle ); +} + + void D_PAD::SetAttribute( PAD_ATTR_T aAttribute ) { m_Attribute = aAttribute; diff --git a/pcbnew/class_pad.h b/pcbnew/class_pad.h index 1687989462..53666d9e4c 100644 --- a/pcbnew/class_pad.h +++ b/pcbnew/class_pad.h @@ -153,7 +153,7 @@ public: * Function GetOrientation * returns the rotation angle of the pad in tenths of degrees, but soon degrees. */ - double GetOrientation() const { return m_Orient; } + double GetOrientation() const { return m_Orient; } void SetDrillShape( PAD_DRILL_SHAPE_T aDrillShape ) { m_drillShape = aDrillShape; } @@ -381,6 +381,12 @@ public: // Virtual function: const EDA_RECT GetBoundingBox() const; + ///> Set absolute coordinates. + void SetDrawCoord(); + + ///> Set relative coordinates. + void SetLocalCoord(); + /** * Function Compare * compares two pads and return 0 if they are equal. @@ -391,6 +397,7 @@ public: void Move( const wxPoint& aMoveVector ) { m_Pos += aMoveVector; + SetLocalCoord(); } diff --git a/pcbnew/class_text_mod.cpp b/pcbnew/class_text_mod.cpp index 5eda7cba6e..48b43b161b 100644 --- a/pcbnew/class_text_mod.cpp +++ b/pcbnew/class_text_mod.cpp @@ -129,7 +129,7 @@ int TEXTE_MODULE::GetLength() const return m_Text.Len(); } -// Update draw coordinates + void TEXTE_MODULE::SetDrawCoord() { MODULE* module = (MODULE*) m_Parent; @@ -146,8 +146,6 @@ void TEXTE_MODULE::SetDrawCoord() } -// Update "local" coordinates (coordinates relatives to the footprint -// anchor point) void TEXTE_MODULE::SetLocalCoord() { MODULE* module = (MODULE*) m_Parent; @@ -163,6 +161,7 @@ void TEXTE_MODULE::SetLocalCoord() RotatePoint( &m_Pos0.x, &m_Pos0.y, -angle ); } + bool TEXTE_MODULE::HitTest( const wxPoint& aPosition ) const { wxPoint rel_pos; diff --git a/pcbnew/class_text_mod.h b/pcbnew/class_text_mod.h index e9595a307f..fff9f20547 100644 --- a/pcbnew/class_text_mod.h +++ b/pcbnew/class_text_mod.h @@ -71,7 +71,6 @@ public: return aItem && PCB_MODULE_TEXT_T == aItem->Type(); } - virtual const wxPoint& GetPosition() const { return m_Pos; @@ -117,9 +116,11 @@ public: // Virtual function const EDA_RECT GetBoundingBox() const; - void SetDrawCoord(); // Set absolute coordinates. + ///> Set absolute coordinates. + void SetDrawCoord(); - void SetLocalCoord(); // Set relative coordinates. + ///> Set relative coordinates. + void SetLocalCoord(); /* drawing functions */ void Draw( EDA_DRAW_PANEL* panel, From d98a5c4efe93c55a97588d10fcdb41b75ac141c0 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 11:59:24 +0200 Subject: [PATCH 590/741] Unconditionally initialize the Tool Framework in FOOTPRINT_EDIT_FRAME. --- pcbnew/moduleframe.cpp | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index b1253fc870..49f24e749d 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -263,27 +263,24 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : m_auimgr.AddPane( m_messagePanel, wxAuiPaneInfo( mesg_pane ).Name( wxT( "MsgPanel" ) ).Bottom().Layer(10) ); - if( drawFrame->IsGalCanvasActive() ) - { - // Create the manager and dispatcher & route draw panel events to the dispatcher - m_toolManager = new TOOL_MANAGER; - m_toolManager->SetEnvironment( GetBoard(), drawPanel->GetView(), - drawPanel->GetViewControls(), this ); - m_toolDispatcher = new TOOL_DISPATCHER( m_toolManager ); - drawPanel->SetEventDispatcher( m_toolDispatcher ); + // Create the manager and dispatcher & route draw panel events to the dispatcher + m_toolManager = new TOOL_MANAGER; + m_toolManager->SetEnvironment( GetBoard(), drawPanel->GetView(), + drawPanel->GetViewControls(), this ); + m_toolDispatcher = new TOOL_DISPATCHER( m_toolManager ); + drawPanel->SetEventDispatcher( m_toolDispatcher ); - m_toolManager->RegisterTool( new SELECTION_TOOL ); - m_toolManager->RegisterTool( new EDIT_TOOL ); - m_toolManager->RegisterTool( new DRAWING_TOOL ); - m_toolManager->RegisterTool( new POINT_EDITOR ); - m_toolManager->RegisterTool( new PCBNEW_CONTROL ); - m_toolManager->ResetTools( TOOL_BASE::RUN ); + m_toolManager->RegisterTool( new SELECTION_TOOL ); + m_toolManager->RegisterTool( new EDIT_TOOL ); + m_toolManager->RegisterTool( new DRAWING_TOOL ); + m_toolManager->RegisterTool( new POINT_EDITOR ); + m_toolManager->RegisterTool( new PCBNEW_CONTROL ); + m_toolManager->ResetTools( TOOL_BASE::RUN ); - // Run the selection tool, it is supposed to be always active - m_toolManager->InvokeTool( "pcbnew.InteractiveSelection" ); + // Run the selection tool, it is supposed to be always active + m_toolManager->InvokeTool( "pcbnew.InteractiveSelection" ); - UseGalCanvas( true ); - } + UseGalCanvas( drawFrame->IsGalCanvasActive() ); m_Layers->ReFill(); m_Layers->ReFillRender(); From 7ade7db0788e3572cab97b166586aa86f51ad99b Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 12:10:27 +0200 Subject: [PATCH 591/741] SELECTION_TOOL got a new mode to edit MODULEs. --- pcbnew/modedit.cpp | 2 +- pcbnew/module_editor_frame.h | 2 +- pcbnew/moduleframe.cpp | 1 + pcbnew/tools/selection_tool.cpp | 18 ++++++++++++------ pcbnew/tools/selection_tool.h | 14 ++++++++++++++ 5 files changed, 29 insertions(+), 8 deletions(-) diff --git a/pcbnew/modedit.cpp b/pcbnew/modedit.cpp index 8d643b4a67..1d3283a276 100644 --- a/pcbnew/modedit.cpp +++ b/pcbnew/modedit.cpp @@ -916,7 +916,7 @@ EDA_COLOR_T FOOTPRINT_EDIT_FRAME::GetGridColor() const } -void FOOTPRINT_EDIT_FRAME::SetActiveLayer( LAYER_NUM aLayer ) +void FOOTPRINT_EDIT_FRAME::SetActiveLayer( LAYER_ID aLayer ) { PCB_BASE_FRAME::SetActiveLayer( aLayer ); diff --git a/pcbnew/module_editor_frame.h b/pcbnew/module_editor_frame.h index 295cce8670..f7e0dd4c2a 100644 --- a/pcbnew/module_editor_frame.h +++ b/pcbnew/module_editor_frame.h @@ -399,7 +399,7 @@ public: virtual EDA_COLOR_T GetGridColor() const; ///> @copydoc PCB_BASE_FRAME::SetActiveLayer() - void SetActiveLayer( LAYER_NUM aLayer ); + void SetActiveLayer( LAYER_ID aLayer ); ///> @copydoc EDA_DRAW_FRAME::UseGalCanvas() virtual void UseGalCanvas( bool aEnable ); diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index 49f24e749d..1649b24b74 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -271,6 +271,7 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : drawPanel->SetEventDispatcher( m_toolDispatcher ); m_toolManager->RegisterTool( new SELECTION_TOOL ); + m_toolManager->GetTool()->EditModules( true ); m_toolManager->RegisterTool( new EDIT_TOOL ); m_toolManager->RegisterTool( new DRAWING_TOOL ); m_toolManager->RegisterTool( new POINT_EDITOR ); diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 0953e7f517..591bfb9e3e 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -54,7 +54,7 @@ SELECTION_TOOL::SELECTION_TOOL() : SelectedEvent( TC_MESSAGE, TA_ACTION, "pcbnew.InteractiveSelection.selected" ), DeselectedEvent( TC_MESSAGE, TA_ACTION, "pcbnew.InteractiveSelection.deselected" ), ClearedEvent( TC_MESSAGE, TA_ACTION, "pcbnew.InteractiveSelection.cleared" ), - m_additive( false ), m_multiple( false ) + m_additive( false ), m_multiple( false ), m_editModules( false ) { m_selArea = new SELECTION_AREA; m_selection.group = new KIGFX::VIEW_GROUP; @@ -189,8 +189,12 @@ bool SELECTION_TOOL::SelectSingle( const VECTOR2I& aWhere, bool aAllowDisambigua GENERAL_COLLECTOR collector; const KICAD_T types[] = { PCB_TRACE_T, PCB_VIA_T, PCB_LINE_T, EOT }; // preferred types - collector.Collect( getModel(), GENERAL_COLLECTOR::AllBoardItems, - wxPoint( aWhere.x, aWhere.y ), guide ); + if( m_editModules ) + collector.Collect( getModel(), GENERAL_COLLECTOR::ModulesAndTheirItems, + wxPoint( aWhere.x, aWhere.y ), guide ); + else + collector.Collect( getModel(), GENERAL_COLLECTOR::AllBoardItems, + wxPoint( aWhere.x, aWhere.y ), guide ); switch( collector.GetCount() ) { @@ -532,23 +536,25 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) const case PCB_MODULE_T: if( aItem->IsOnLayer( F_Cu ) && board->IsElementVisible( MOD_FR_VISIBLE ) ) - return true; + return !m_editModules; if( aItem->IsOnLayer( B_Cu ) && board->IsElementVisible( MOD_BK_VISIBLE ) ) - return true; + return !m_editModules; return false; break; case PCB_MODULE_TEXT_T: - if( m_multiple ) + if( m_multiple && !m_editModules ) return false; break; // These are not selectable case PCB_MODULE_EDGE_T: case PCB_PAD_T: + return m_editModules; + case NOT_USED: case TYPE_NOT_INIT: return false; diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index 2f8a58fcf1..642b2ee358 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -139,6 +139,17 @@ public: */ void AddMenuItem( const TOOL_ACTION& aAction ); + /** + * Function EditModules() + * Toggles edit module mode. When enabled, one may select parts of modules individually + * (graphics, pads, etc.), so they can be modified. + * @param aEnabled decides if the mode should be enabled. + */ + void EditModules( bool aEnabled ) + { + m_editModules = aEnabled; + } + ///> Event sent after an item is selected. const TOOL_EVENT SelectedEvent; @@ -260,6 +271,9 @@ private: /// Right click popup menu CONTEXT_MENU m_menu; + + /// Edit module mode flag + bool m_editModules; }; #endif From 1617f15b512ecf94bc63f1aa5468d226e4cd8282 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 12:10:27 +0200 Subject: [PATCH 592/741] FOOTPRINT_EDIT_FRAME undo buffer handles operations done with GAL editor. --- pcbnew/modedit_undo_redo.cpp | 58 +++++++++++++++++++++++++++++------- 1 file changed, 47 insertions(+), 11 deletions(-) diff --git a/pcbnew/modedit_undo_redo.cpp b/pcbnew/modedit_undo_redo.cpp index 613f4d8d2b..4e057c3e3c 100644 --- a/pcbnew/modedit_undo_redo.cpp +++ b/pcbnew/modedit_undo_redo.cpp @@ -2,8 +2,11 @@ /* library editor: undo and redo functions */ /********************************************/ +#include #include #include +#include +#include #include #include @@ -50,31 +53,52 @@ void FOOTPRINT_EDIT_FRAME::SaveCopyInUndoList( const PICKED_ITEMS_LIST& aItemsLi UNDO_REDO_T aTypeCommand, const wxPoint& aTransformPoint ) { - // Currently unused in modedit, because the module itself is saved for each change - wxMessageBox( wxT( "SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList..) not yet in use" ) ); + assert( aItemsList.GetPickedItem( 0 )->GetParent()->Type() == PCB_MODULE_T ); + MODULE* owner = static_cast( aItemsList.GetPickedItem( 0 )->GetParent() ); + +#ifndef NDEBUG + // All items should have the same parent (MODULE) to make undo/redo entry valid + for( unsigned int i = 0; i < aItemsList.GetCount(); ++i ) + assert( aItemsList.GetPickedItem( i )->GetParent() == owner ); +#endif /* not NDEBUG */ + + SaveCopyInUndoList( owner, aTypeCommand, aTransformPoint ); } -void FOOTPRINT_EDIT_FRAME::GetComponentFromRedoList( wxCommandEvent& event ) +void FOOTPRINT_EDIT_FRAME::GetComponentFromRedoList( wxCommandEvent& aEvent ) { if( GetScreen()->GetRedoCommandCount() <= 0 ) return; + // Inform tools that undo command was issued + TOOL_EVENT event( TC_MESSAGE, TA_UNDO_REDO, AS_GLOBAL ); + m_toolManager->ProcessEvent( event ); + // Save current module state in undo list PICKED_ITEMS_LIST* lastcmd = new PICKED_ITEMS_LIST(); - MODULE * module = GetBoard()->m_Modules.PopFront(); - ITEM_PICKER wrapper( module, UR_MODEDIT ); + MODULE* module = GetBoard()->m_Modules.PopFront(); + ITEM_PICKER wrapper( module, UR_MODEDIT ); + KIGFX::VIEW* view = GetGalCanvas()->GetView(); lastcmd->PushItem( wrapper ); GetScreen()->PushCommandToUndoList( lastcmd ); + view->Remove( module ); + module->RunOnChildren( boost::bind( &KIGFX::VIEW::Remove, view, _1 ) ); + // Retrieve last module state from undo list lastcmd = GetScreen()->PopCommandFromRedoList(); wrapper = lastcmd->PopItem(); - module = (MODULE *)wrapper.GetItem(); + module = (MODULE*) wrapper.GetItem(); delete lastcmd; if( module ) + { GetBoard()->Add( module ); + GetGalCanvas()->GetView()->Add( module ); + module->RunOnChildren( boost::bind( &KIGFX::VIEW::Add, view, _1 ) ); + module->ViewUpdate(); + } SetCurItem( NULL ); @@ -83,27 +107,39 @@ void FOOTPRINT_EDIT_FRAME::GetComponentFromRedoList( wxCommandEvent& event ) } -void FOOTPRINT_EDIT_FRAME::GetComponentFromUndoList( wxCommandEvent& event ) +void FOOTPRINT_EDIT_FRAME::GetComponentFromUndoList( wxCommandEvent& aEvent ) { if( GetScreen()->GetUndoCommandCount() <= 0 ) return; + // Inform tools that undo command was issued + TOOL_EVENT event( TC_MESSAGE, TA_UNDO_REDO, AS_GLOBAL ); + m_toolManager->ProcessEvent( event ); + // Save current module state in redo list PICKED_ITEMS_LIST* lastcmd = new PICKED_ITEMS_LIST(); - MODULE * module = GetBoard()->m_Modules.PopFront(); - ITEM_PICKER wrapper( module, UR_MODEDIT ); + MODULE* module = GetBoard()->m_Modules.PopFront(); + ITEM_PICKER wrapper( module, UR_MODEDIT ); + KIGFX::VIEW* view = GetGalCanvas()->GetView(); lastcmd->PushItem( wrapper ); GetScreen()->PushCommandToRedoList( lastcmd ); + view->Remove( module ); + module->RunOnChildren( boost::bind( &KIGFX::VIEW::Remove, view, _1 ) ); + // Retrieve last module state from undo list lastcmd = GetScreen()->PopCommandFromUndoList(); wrapper = lastcmd->PopItem(); - module = (MODULE *)wrapper.GetItem(); + module = (MODULE*) wrapper.GetItem(); delete lastcmd; if( module ) + { GetBoard()->Add( module, ADD_APPEND ); - + view->Add( module ); + module->RunOnChildren( boost::bind( &KIGFX::VIEW::Add, view, _1 ) ); + module->ViewUpdate(); + } SetCurItem( NULL ); From 8898b34755b1fc8cb204692b1a771511f5214f48 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 12:10:28 +0200 Subject: [PATCH 593/741] Code formatting. --- include/core/typeinfo.h | 11 +++++------ pcbnew/module_editor_frame.h | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/include/core/typeinfo.h b/include/core/typeinfo.h index d995b14fcb..dbb066f4a8 100644 --- a/include/core/typeinfo.h +++ b/include/core/typeinfo.h @@ -148,15 +148,15 @@ struct remove_pointer * @return true, if aObject type equals T. */ template -bool IsA(const I *aObject) +bool IsA( const I* aObject ) { - return aObject && remove_pointer::type::ClassOf(aObject); + return aObject && remove_pointer::type::ClassOf( aObject ); } template -bool IsA(const I& aObject) +bool IsA( const I& aObject ) { - return remove_pointer::type::ClassOf(&aObject); + return remove_pointer::type::ClassOf( &aObject ); } /** @@ -168,7 +168,7 @@ bool IsA(const I& aObject) * @return down-casted object or NULL if type doesn't match Casted. */ template -Casted dyn_cast(From aObject) +Casted dyn_cast( From aObject ) { if( remove_pointer::type::ClassOf ( aObject ) ) return static_cast( aObject ); @@ -177,4 +177,3 @@ Casted dyn_cast(From aObject) } #endif // __KICAD_TYPEINFO_H - diff --git a/pcbnew/module_editor_frame.h b/pcbnew/module_editor_frame.h index f7e0dd4c2a..7a3f513afc 100644 --- a/pcbnew/module_editor_frame.h +++ b/pcbnew/module_editor_frame.h @@ -161,7 +161,7 @@ public: * and prepare, if needed the refresh of the 3D frame showing the footprint * do not forget to call the basic OnModify function to update auxiliary info */ - virtual void OnModify( ); + virtual void OnModify(); /** * Function ToPrinter From eee2779f6bbe5bd175ac8d99ecbb428115da68ce Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 13:50:27 +0200 Subject: [PATCH 594/741] Moved some layout editor specific tool actions to another class (PCB_EDITOR_CONTROL). --- pcbnew/CMakeLists.txt | 1 + pcbnew/tools/pcb_editor_control.cpp | 144 +++++++++++++++++++++++++++ pcbnew/tools/pcb_editor_control.h | 62 ++++++++++++ pcbnew/tools/pcb_tools.cpp | 2 + pcbnew/tools/pcbnew_control.cpp | 145 ++++++---------------------- pcbnew/tools/pcbnew_control.h | 4 +- 6 files changed, 238 insertions(+), 120 deletions(-) create mode 100644 pcbnew/tools/pcb_editor_control.cpp create mode 100644 pcbnew/tools/pcb_editor_control.h diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index f8253fb31f..3bb9580e90 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -262,6 +262,7 @@ set( PCBNEW_CLASS_SRCS tools/drawing_tool.cpp tools/edit_tool.cpp tools/pcbnew_control.cpp + tools/pcb_editor_control.cpp tools/pcb_tools.cpp tools/common_actions.cpp ) diff --git a/pcbnew/tools/pcb_editor_control.cpp b/pcbnew/tools/pcb_editor_control.cpp new file mode 100644 index 0000000000..a1b46c8a46 --- /dev/null +++ b/pcbnew/tools/pcb_editor_control.cpp @@ -0,0 +1,144 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 CERN + * @author Maciej Suminski + * + * 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 "pcb_editor_control.h" +#include "common_actions.h" + +#include +#include +#include + +PCB_EDITOR_CONTROL::PCB_EDITOR_CONTROL() : + TOOL_INTERACTIVE( "pcbnew.EditorControl" ) +{ +} + + +void PCB_EDITOR_CONTROL::Reset( RESET_REASON aReason ) +{ + m_frame = getEditFrame(); +} + + +bool PCB_EDITOR_CONTROL::Init() +{ + setTransitions(); + + return true; +} + + +// Track & via size control +int PCB_EDITOR_CONTROL::TrackWidthInc( TOOL_EVENT& aEvent ) +{ + BOARD* board = getModel(); + int widthIndex = board->GetDesignSettings().GetTrackWidthIndex() + 1; + + if( widthIndex >= (int) board->GetDesignSettings().m_TrackWidthList.size() ) + widthIndex = board->GetDesignSettings().m_TrackWidthList.size() - 1; + + board->GetDesignSettings().SetTrackWidthIndex( widthIndex ); + board->GetDesignSettings().UseCustomTrackViaSize( false ); + + wxUpdateUIEvent dummy; + m_frame->OnUpdateSelectTrackWidth( dummy ); + setTransitions(); + + m_toolMgr->RunAction( COMMON_ACTIONS::trackViaSizeChanged ); + + return 0; +} + + +int PCB_EDITOR_CONTROL::TrackWidthDec( TOOL_EVENT& aEvent ) +{ + BOARD* board = getModel(); + int widthIndex = board->GetDesignSettings().GetTrackWidthIndex() - 1; + + if( widthIndex < 0 ) + widthIndex = 0; + + board->GetDesignSettings().SetTrackWidthIndex( widthIndex ); + board->GetDesignSettings().UseCustomTrackViaSize( false ); + + wxUpdateUIEvent dummy; + m_frame->OnUpdateSelectTrackWidth( dummy ); + setTransitions(); + + m_toolMgr->RunAction( COMMON_ACTIONS::trackViaSizeChanged ); + + return 0; +} + + +int PCB_EDITOR_CONTROL::ViaSizeInc( TOOL_EVENT& aEvent ) +{ + BOARD* board = getModel(); + int sizeIndex = board->GetDesignSettings().GetViaSizeIndex() + 1; + + if( sizeIndex >= (int) board->GetDesignSettings().m_ViasDimensionsList.size() ) + sizeIndex = board->GetDesignSettings().m_ViasDimensionsList.size() - 1; + + board->GetDesignSettings().SetViaSizeIndex( sizeIndex ); + board->GetDesignSettings().UseCustomTrackViaSize( false ); + + wxUpdateUIEvent dummy; + m_frame->OnUpdateSelectViaSize( dummy ); + setTransitions(); + + m_toolMgr->RunAction( COMMON_ACTIONS::trackViaSizeChanged ); + + return 0; +} + + +int PCB_EDITOR_CONTROL::ViaSizeDec( TOOL_EVENT& aEvent ) +{ + BOARD* board = getModel(); + int sizeIndex = board->GetDesignSettings().GetViaSizeIndex() - 1; + + if( sizeIndex < 0 ) + sizeIndex = 0; + + board->GetDesignSettings().SetViaSizeIndex( sizeIndex ); + board->GetDesignSettings().UseCustomTrackViaSize( false ); + + wxUpdateUIEvent dummy; + m_frame->OnUpdateSelectViaSize( dummy ); + setTransitions(); + + m_toolMgr->RunAction( COMMON_ACTIONS::trackViaSizeChanged ); + + return 0; +} + + +void PCB_EDITOR_CONTROL::setTransitions() +{ + // Track & via size control + Go( &PCB_EDITOR_CONTROL::TrackWidthInc, COMMON_ACTIONS::trackWidthInc.MakeEvent() ); + Go( &PCB_EDITOR_CONTROL::TrackWidthDec, COMMON_ACTIONS::trackWidthDec.MakeEvent() ); + Go( &PCB_EDITOR_CONTROL::ViaSizeInc, COMMON_ACTIONS::viaSizeInc.MakeEvent() ); + Go( &PCB_EDITOR_CONTROL::ViaSizeDec, COMMON_ACTIONS::viaSizeDec.MakeEvent() ); +} diff --git a/pcbnew/tools/pcb_editor_control.h b/pcbnew/tools/pcb_editor_control.h new file mode 100644 index 0000000000..50b9a6c691 --- /dev/null +++ b/pcbnew/tools/pcb_editor_control.h @@ -0,0 +1,62 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 CERN + * @author Maciej Suminski + * + * 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 PCB_EDITOR_CONTROL_H +#define PCB_EDITOR_CONTROL_H + +#include + +class PCB_EDIT_FRAME; + +/** + * Class PCBNEW_CONTROL + * + * Handles hot keys that are not accepted by any other tool. + */ +class PCB_EDITOR_CONTROL : public TOOL_INTERACTIVE +{ +public: + PCB_EDITOR_CONTROL(); + + /// @copydoc TOOL_INTERACTIVE::Reset() + void Reset( RESET_REASON aReason ); + + /// @copydoc TOOL_INTERACTIVE::Init() + bool Init(); + + // Track & via size control + int TrackWidthInc( TOOL_EVENT& aEvent ); + int TrackWidthDec( TOOL_EVENT& aEvent ); + int ViaSizeInc( TOOL_EVENT& aEvent ); + int ViaSizeDec( TOOL_EVENT& aEvent ); + +private: + ///> Sets up handlers for various events. + void setTransitions(); + + ///> Pointerto the currently used edit frame. + PCB_EDIT_FRAME* m_frame; +}; + +#endif diff --git a/pcbnew/tools/pcb_tools.cpp b/pcbnew/tools/pcb_tools.cpp index ee8af05595..6ba1a787e8 100644 --- a/pcbnew/tools/pcb_tools.cpp +++ b/pcbnew/tools/pcb_tools.cpp @@ -35,6 +35,7 @@ #include "drawing_tool.h" #include "point_editor.h" #include "pcbnew_control.h" +#include "pcb_editor_control.h" #include "common_actions.h" #include @@ -53,6 +54,7 @@ void PCB_EDIT_FRAME::setupTools() m_toolManager->RegisterTool( new DRAWING_TOOL ); m_toolManager->RegisterTool( new POINT_EDITOR ); m_toolManager->RegisterTool( new PCBNEW_CONTROL ); + m_toolManager->RegisterTool( new PCB_EDITOR_CONTROL ); m_toolManager->ResetTools( TOOL_BASE::RUN ); // Run the selection tool, it is supposed to be always active diff --git a/pcbnew/tools/pcbnew_control.cpp b/pcbnew/tools/pcbnew_control.cpp index 17b5b021aa..1702cfe64b 100644 --- a/pcbnew/tools/pcbnew_control.cpp +++ b/pcbnew/tools/pcbnew_control.cpp @@ -46,7 +46,7 @@ PCBNEW_CONTROL::PCBNEW_CONTROL() : void PCBNEW_CONTROL::Reset( RESET_REASON aReason ) { - m_frame = getEditFrame(); + m_frame = getEditFrame(); } @@ -149,7 +149,7 @@ int PCBNEW_CONTROL::TrackDisplayMode( TOOL_EVENT& aEvent ) int PCBNEW_CONTROL::PadDisplayMode( TOOL_EVENT& aEvent ) { wxCommandEvent dummy; - getEditFrame()->OnTogglePadDrawMode( dummy ); + m_frame->OnTogglePadDrawMode( dummy ); setTransitions(); return 0; @@ -219,8 +219,8 @@ int PCBNEW_CONTROL::HighContrastDec( TOOL_EVENT& aEvent ) // Layer control int PCBNEW_CONTROL::LayerTop( TOOL_EVENT& aEvent ) { - getEditFrame()->SwitchLayer( NULL, F_Cu ); - getEditFrame()->GetGalCanvas()->SetFocus(); + m_frame->SwitchLayer( NULL, F_Cu ); + m_frame->GetGalCanvas()->SetFocus(); setTransitions(); return 0; @@ -229,8 +229,8 @@ int PCBNEW_CONTROL::LayerTop( TOOL_EVENT& aEvent ) int PCBNEW_CONTROL::LayerInner1( TOOL_EVENT& aEvent ) { - getEditFrame()->SwitchLayer( NULL, In1_Cu ); - getEditFrame()->GetGalCanvas()->SetFocus(); + m_frame->SwitchLayer( NULL, In1_Cu ); + m_frame->GetGalCanvas()->SetFocus(); setTransitions(); return 0; @@ -239,8 +239,8 @@ int PCBNEW_CONTROL::LayerInner1( TOOL_EVENT& aEvent ) int PCBNEW_CONTROL::LayerInner2( TOOL_EVENT& aEvent ) { - getEditFrame()->SwitchLayer( NULL, In2_Cu ); - getEditFrame()->GetGalCanvas()->SetFocus(); + m_frame->SwitchLayer( NULL, In2_Cu ); + m_frame->GetGalCanvas()->SetFocus(); setTransitions(); return 0; @@ -249,8 +249,8 @@ int PCBNEW_CONTROL::LayerInner2( TOOL_EVENT& aEvent ) int PCBNEW_CONTROL::LayerInner3( TOOL_EVENT& aEvent ) { - getEditFrame()->SwitchLayer( NULL, In3_Cu ); - getEditFrame()->GetGalCanvas()->SetFocus(); + m_frame->SwitchLayer( NULL, In3_Cu ); + m_frame->GetGalCanvas()->SetFocus(); setTransitions(); return 0; @@ -259,8 +259,8 @@ int PCBNEW_CONTROL::LayerInner3( TOOL_EVENT& aEvent ) int PCBNEW_CONTROL::LayerInner4( TOOL_EVENT& aEvent ) { - getEditFrame()->SwitchLayer( NULL, In4_Cu ); - getEditFrame()->GetGalCanvas()->SetFocus(); + m_frame->SwitchLayer( NULL, In4_Cu ); + m_frame->GetGalCanvas()->SetFocus(); setTransitions(); return 0; @@ -269,8 +269,8 @@ int PCBNEW_CONTROL::LayerInner4( TOOL_EVENT& aEvent ) int PCBNEW_CONTROL::LayerInner5( TOOL_EVENT& aEvent ) { - getEditFrame()->SwitchLayer( NULL, In5_Cu ); - getEditFrame()->GetGalCanvas()->SetFocus(); + m_frame->SwitchLayer( NULL, In5_Cu ); + m_frame->GetGalCanvas()->SetFocus(); setTransitions(); return 0; @@ -279,8 +279,8 @@ int PCBNEW_CONTROL::LayerInner5( TOOL_EVENT& aEvent ) int PCBNEW_CONTROL::LayerInner6( TOOL_EVENT& aEvent ) { - getEditFrame()->SwitchLayer( NULL, In6_Cu ); - getEditFrame()->GetGalCanvas()->SetFocus(); + m_frame->SwitchLayer( NULL, In6_Cu ); + m_frame->GetGalCanvas()->SetFocus(); setTransitions(); return 0; @@ -289,8 +289,8 @@ int PCBNEW_CONTROL::LayerInner6( TOOL_EVENT& aEvent ) int PCBNEW_CONTROL::LayerBottom( TOOL_EVENT& aEvent ) { - getEditFrame()->SwitchLayer( NULL, B_Cu ); - getEditFrame()->GetGalCanvas()->SetFocus(); + m_frame->SetActiveLayer( B_Cu ); + m_frame->GetGalCanvas()->SetFocus(); setTransitions(); return 0; @@ -299,8 +299,8 @@ int PCBNEW_CONTROL::LayerBottom( TOOL_EVENT& aEvent ) int PCBNEW_CONTROL::LayerNext( TOOL_EVENT& aEvent ) { - PCB_EDIT_FRAME* editFrame = getEditFrame(); - LAYER_NUM layer = editFrame->GetActiveLayer(); + PCB_BASE_FRAME* editFrame = m_frame; + LAYER_NUM layer = editFrame->GetActiveLayer(); if( layer < F_Cu || layer >= B_Cu ) { @@ -325,8 +325,8 @@ int PCBNEW_CONTROL::LayerNext( TOOL_EVENT& aEvent ) int PCBNEW_CONTROL::LayerPrev( TOOL_EVENT& aEvent ) { - PCB_EDIT_FRAME* editFrame = getEditFrame(); - LAYER_NUM layer = editFrame->GetActiveLayer(); + PCB_BASE_FRAME* editFrame = m_frame; + LAYER_NUM layer = editFrame->GetActiveLayer(); if( layer <= F_Cu || layer > B_Cu ) { @@ -399,7 +399,7 @@ int PCBNEW_CONTROL::LayerAlphaDec( TOOL_EVENT& aEvent ) // Grid control int PCBNEW_CONTROL::GridFast1( TOOL_EVENT& aEvent ) { - getEditFrame()->SetFastGrid1(); + m_frame->SetFastGrid1(); setTransitions(); return 0; @@ -408,7 +408,7 @@ int PCBNEW_CONTROL::GridFast1( TOOL_EVENT& aEvent ) int PCBNEW_CONTROL::GridFast2( TOOL_EVENT& aEvent ) { - getEditFrame()->SetFastGrid2(); + m_frame->SetFastGrid2(); setTransitions(); return 0; @@ -417,7 +417,7 @@ int PCBNEW_CONTROL::GridFast2( TOOL_EVENT& aEvent ) int PCBNEW_CONTROL::GridNext( TOOL_EVENT& aEvent ) { - getEditFrame()->SetNextGrid(); + m_frame->SetNextGrid(); setTransitions(); return 0; @@ -426,7 +426,7 @@ int PCBNEW_CONTROL::GridNext( TOOL_EVENT& aEvent ) int PCBNEW_CONTROL::GridPrev( TOOL_EVENT& aEvent ) { - getEditFrame()->SetPrevGrid(); + m_frame->SetPrevGrid(); setTransitions(); return 0; @@ -436,7 +436,7 @@ int PCBNEW_CONTROL::GridPrev( TOOL_EVENT& aEvent ) int PCBNEW_CONTROL::GridSetOrigin( TOOL_EVENT& aEvent ) { Activate(); - getEditFrame()->SetToolID( ID_PCB_PLACE_GRID_COORD_BUTT, wxCURSOR_PENCIL, + m_frame->SetToolID( ID_PCB_PLACE_GRID_COORD_BUTT, wxCURSOR_PENCIL, _( "Adjust grid origin" ) ); KIGFX::VIEW_CONTROLS* controls = getViewControls(); @@ -466,91 +466,6 @@ int PCBNEW_CONTROL::GridSetOrigin( TOOL_EVENT& aEvent ) } -// Track & via size control -int PCBNEW_CONTROL::TrackWidthInc( TOOL_EVENT& aEvent ) -{ - BOARD* board = getModel(); - int widthIndex = board->GetDesignSettings().GetTrackWidthIndex() + 1; - - if( widthIndex >= (int) board->GetDesignSettings().m_TrackWidthList.size() ) - widthIndex = board->GetDesignSettings().m_TrackWidthList.size() - 1; - - board->GetDesignSettings().SetTrackWidthIndex( widthIndex ); - board->GetDesignSettings().UseCustomTrackViaSize( false ); - - wxUpdateUIEvent dummy; - getEditFrame()->OnUpdateSelectTrackWidth( dummy ); - setTransitions(); - - m_toolMgr->RunAction( COMMON_ACTIONS::trackViaSizeChanged ); - - return 0; -} - - -int PCBNEW_CONTROL::TrackWidthDec( TOOL_EVENT& aEvent ) -{ - BOARD* board = getModel(); - int widthIndex = board->GetDesignSettings().GetTrackWidthIndex() - 1; - - if( widthIndex < 0 ) - widthIndex = 0; - - board->GetDesignSettings().SetTrackWidthIndex( widthIndex ); - board->GetDesignSettings().UseCustomTrackViaSize( false ); - - wxUpdateUIEvent dummy; - getEditFrame()->OnUpdateSelectTrackWidth( dummy ); - setTransitions(); - - m_toolMgr->RunAction( COMMON_ACTIONS::trackViaSizeChanged ); - - return 0; -} - - -int PCBNEW_CONTROL::ViaSizeInc( TOOL_EVENT& aEvent ) -{ - BOARD* board = getModel(); - int sizeIndex = board->GetDesignSettings().GetViaSizeIndex() + 1; - - if( sizeIndex >= (int) board->GetDesignSettings().m_ViasDimensionsList.size() ) - sizeIndex = board->GetDesignSettings().m_ViasDimensionsList.size() - 1; - - board->GetDesignSettings().SetViaSizeIndex( sizeIndex ); - board->GetDesignSettings().UseCustomTrackViaSize( false ); - - wxUpdateUIEvent dummy; - getEditFrame()->OnUpdateSelectViaSize( dummy ); - setTransitions(); - - m_toolMgr->RunAction( COMMON_ACTIONS::trackViaSizeChanged ); - - return 0; -} - - -int PCBNEW_CONTROL::ViaSizeDec( TOOL_EVENT& aEvent ) -{ - BOARD* board = getModel(); - int sizeIndex = board->GetDesignSettings().GetViaSizeIndex() - 1; - - if( sizeIndex < 0 ) - sizeIndex = 0; - - board->GetDesignSettings().SetViaSizeIndex( sizeIndex ); - board->GetDesignSettings().UseCustomTrackViaSize( false ); - - wxUpdateUIEvent dummy; - getEditFrame()->OnUpdateSelectViaSize( dummy ); - setTransitions(); - - m_toolMgr->RunAction( COMMON_ACTIONS::trackViaSizeChanged ); - - return 0; -} - - // Miscellaneous int PCBNEW_CONTROL::ResetCoords( TOOL_EVENT& aEvent ) { @@ -630,12 +545,6 @@ void PCBNEW_CONTROL::setTransitions() Go( &PCBNEW_CONTROL::GridPrev, COMMON_ACTIONS::gridPrev.MakeEvent() ); Go( &PCBNEW_CONTROL::GridSetOrigin, COMMON_ACTIONS::gridSetOrigin.MakeEvent() ); - // Track & via size control - Go( &PCBNEW_CONTROL::TrackWidthInc, COMMON_ACTIONS::trackWidthInc.MakeEvent() ); - Go( &PCBNEW_CONTROL::TrackWidthDec, COMMON_ACTIONS::trackWidthDec.MakeEvent() ); - Go( &PCBNEW_CONTROL::ViaSizeInc, COMMON_ACTIONS::viaSizeInc.MakeEvent() ); - Go( &PCBNEW_CONTROL::ViaSizeDec, COMMON_ACTIONS::viaSizeDec.MakeEvent() ); - // Miscellaneous Go( &PCBNEW_CONTROL::ResetCoords, COMMON_ACTIONS::resetCoords.MakeEvent() ); Go( &PCBNEW_CONTROL::SwitchUnits, COMMON_ACTIONS::switchUnits.MakeEvent() ); diff --git a/pcbnew/tools/pcbnew_control.h b/pcbnew/tools/pcbnew_control.h index e4920484db..c5bd7e8841 100644 --- a/pcbnew/tools/pcbnew_control.h +++ b/pcbnew/tools/pcbnew_control.h @@ -27,7 +27,7 @@ #include -class PCB_EDIT_FRAME; +class PCB_BASE_FRAME; /** * Class PCBNEW_CONTROL @@ -97,7 +97,7 @@ private: void setTransitions(); ///> Pointerto the currently used edit frame. - PCB_EDIT_FRAME* m_frame; + PCB_BASE_FRAME* m_frame; }; #endif From b0f3e79e54a3169cbf07240c462550945b5f6cef Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 13:50:27 +0200 Subject: [PATCH 595/741] Created a common interface for edit frames. --- include/wxPcbStruct.h | 12 +++--- pcbnew/board_undo_redo.cpp | 4 +- pcbnew/modedit_onclick.cpp | 74 ++++++++++++++++++----------------- pcbnew/modedit_undo_redo.cpp | 4 +- pcbnew/module_editor_frame.h | 38 ++++++++++-------- pcbnew/moduleframe.cpp | 10 ++--- pcbnew/pcb_base_edit_frame.h | 69 ++++++++++++++++++++++++++++++++ pcbnew/pcbframe.cpp | 6 +-- pcbnew/tools/edit_tool.cpp | 2 +- pcbnew/tools/point_editor.cpp | 2 +- 10 files changed, 149 insertions(+), 72 deletions(-) create mode 100644 pcbnew/pcb_base_edit_frame.h diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index 98d95c465d..6caca78ea1 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -30,7 +30,7 @@ #define WXPCB_STRUCT_H_ -#include +#include #include #include #include @@ -73,7 +73,7 @@ namespace PCB { struct IFACE; } // KIFACE_I is in pcbnew.cpp * * See also class PCB_BASE_FRAME(): Basic class for Pcbnew and GerbView. */ -class PCB_EDIT_FRAME : public PCB_BASE_FRAME +class PCB_EDIT_FRAME : public PCB_BASE_EDIT_FRAME { friend class PCB::IFACE; friend class PCB_LAYER_WIDGET; @@ -659,22 +659,22 @@ public: bool aRebuildRatsnet = true ); /** - * Function GetBoardFromRedoList + * Function RestoreCopyFromRedoList * Redo the last edition: * - Save the current board in Undo list * - Get an old version of the board from Redo list * @return none */ - void GetBoardFromRedoList( wxCommandEvent& aEvent ); + void RestoreCopyFromRedoList( wxCommandEvent& aEvent ); /** - * Function GetBoardFromUndoList + * Function RestoreCopyFromUndoList * Undo the last edition: * - Save the current board in Redo list * - Get an old version of the board from Undo list * @return none */ - void GetBoardFromUndoList( wxCommandEvent& aEvent ); + void RestoreCopyFromUndoList( wxCommandEvent& aEvent ); /* Block operations: */ diff --git a/pcbnew/board_undo_redo.cpp b/pcbnew/board_undo_redo.cpp index 56b5ca63d2..6bef956fc1 100644 --- a/pcbnew/board_undo_redo.cpp +++ b/pcbnew/board_undo_redo.cpp @@ -630,7 +630,7 @@ void PCB_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRed } -void PCB_EDIT_FRAME::GetBoardFromUndoList( wxCommandEvent& aEvent ) +void PCB_EDIT_FRAME::RestoreCopyFromUndoList( wxCommandEvent& aEvent ) { if( GetScreen()->GetUndoCommandCount() <= 0 ) return; @@ -653,7 +653,7 @@ void PCB_EDIT_FRAME::GetBoardFromUndoList( wxCommandEvent& aEvent ) } -void PCB_EDIT_FRAME::GetBoardFromRedoList( wxCommandEvent& aEvent ) +void PCB_EDIT_FRAME::RestoreCopyFromRedoList( wxCommandEvent& aEvent ) { if( GetScreen()->GetRedoCommandCount() == 0 ) return; diff --git a/pcbnew/modedit_onclick.cpp b/pcbnew/modedit_onclick.cpp index 5fa0abb448..b6f4437e53 100644 --- a/pcbnew/modedit_onclick.cpp +++ b/pcbnew/modedit_onclick.cpp @@ -418,41 +418,7 @@ void FOOTPRINT_EDIT_FRAME::OnLeftDClick( wxDC* DC, const wxPoint& MousePos ) // Item found SetCurItem( item ); - - switch( item->Type() ) - { - case PCB_PAD_T: - InstallPadOptionsFrame( (D_PAD*) item ); - m_canvas->MoveCursorToCrossHair(); - break; - - case PCB_MODULE_T: - { - DIALOG_MODULE_MODULE_EDITOR dialog( this, (MODULE*) item ); - int ret = dialog.ShowModal(); - GetScreen()->GetCurItem()->ClearFlags(); - m_canvas->MoveCursorToCrossHair(); - - if( ret > 0 ) - m_canvas->Refresh(); - } - break; - - case PCB_MODULE_TEXT_T: - InstallTextModOptionsFrame( (TEXTE_MODULE*) item, DC ); - m_canvas->MoveCursorToCrossHair(); - break; - - case PCB_MODULE_EDGE_T : - m_canvas->MoveCursorToCrossHair(); - InstallFootprintBodyItemPropertiesDlg( (EDGE_MODULE*) item ); - m_canvas->Refresh(); - break; - - default: - break; - } - + OnEditItemRequest( DC, item ); break; // end case 0 case ID_PCB_ADD_LINE_BUTT: @@ -471,3 +437,41 @@ void FOOTPRINT_EDIT_FRAME::OnLeftDClick( wxDC* DC, const wxPoint& MousePos ) break; } } + + +void FOOTPRINT_EDIT_FRAME::OnEditItemRequest( wxDC* aDC, BOARD_ITEM* aItem ) +{ + switch( aItem->Type() ) + { + case PCB_PAD_T: + InstallPadOptionsFrame( (D_PAD*) aItem ); + m_canvas->MoveCursorToCrossHair(); + break; + + case PCB_MODULE_T: + { + DIALOG_MODULE_MODULE_EDITOR dialog( this, (MODULE*) aItem ); + int ret = dialog.ShowModal(); + GetScreen()->GetCurItem()->ClearFlags(); + m_canvas->MoveCursorToCrossHair(); + + if( ret > 0 ) + m_canvas->Refresh(); + } + break; + + case PCB_MODULE_TEXT_T: + InstallTextModOptionsFrame( (TEXTE_MODULE*) aItem, aDC ); + m_canvas->MoveCursorToCrossHair(); + break; + + case PCB_MODULE_EDGE_T : + m_canvas->MoveCursorToCrossHair(); + InstallFootprintBodyItemPropertiesDlg( (EDGE_MODULE*) aItem ); + m_canvas->Refresh(); + break; + + default: + break; + } +} diff --git a/pcbnew/modedit_undo_redo.cpp b/pcbnew/modedit_undo_redo.cpp index 4e057c3e3c..2b61e1e78e 100644 --- a/pcbnew/modedit_undo_redo.cpp +++ b/pcbnew/modedit_undo_redo.cpp @@ -66,7 +66,7 @@ void FOOTPRINT_EDIT_FRAME::SaveCopyInUndoList( const PICKED_ITEMS_LIST& aItemsLi } -void FOOTPRINT_EDIT_FRAME::GetComponentFromRedoList( wxCommandEvent& aEvent ) +void FOOTPRINT_EDIT_FRAME::RestoreCopyFromRedoList( wxCommandEvent& aEvent ) { if( GetScreen()->GetRedoCommandCount() <= 0 ) return; @@ -107,7 +107,7 @@ void FOOTPRINT_EDIT_FRAME::GetComponentFromRedoList( wxCommandEvent& aEvent ) } -void FOOTPRINT_EDIT_FRAME::GetComponentFromUndoList( wxCommandEvent& aEvent ) +void FOOTPRINT_EDIT_FRAME::RestoreCopyFromUndoList( wxCommandEvent& aEvent ) { if( GetScreen()->GetUndoCommandCount() <= 0 ) return; diff --git a/pcbnew/module_editor_frame.h b/pcbnew/module_editor_frame.h index 7a3f513afc..e72ea402bd 100644 --- a/pcbnew/module_editor_frame.h +++ b/pcbnew/module_editor_frame.h @@ -30,6 +30,7 @@ #define MODULE_EDITOR_FRAME_H_ #include +#include #include @@ -38,7 +39,7 @@ class FP_LIB_TABLE; namespace PCB { struct IFACE; } // A KIFACE_I coded in pcbnew.c -class FOOTPRINT_EDIT_FRAME : public PCB_BASE_FRAME +class FOOTPRINT_EDIT_FRAME : public PCB_BASE_EDIT_FRAME { friend struct PCB::IFACE; @@ -148,6 +149,9 @@ public: void OnUpdateReplaceModuleInBoard( wxUpdateUIEvent& aEvent ); void OnUpdateSelectCurrentLib( wxUpdateUIEvent& aEvent ); + ///> @copydoc PCB_BASE_EDIT_FRAME::OnEditItemRequest() + void OnEditItemRequest( wxDC* aDC, BOARD_ITEM* aItem ); + /** * Function LoadModuleFromBoard * called from the main toolbar to load a footprint from board mainly to edit it. @@ -244,6 +248,22 @@ public: UNDO_REDO_T aTypeCommand, const wxPoint& aTransformPoint = wxPoint( 0, 0 ) ); + /** + * Function RestoreCopyFromUndoList + * performs an undo operation on the last edition: + * - Place the current edited library component in Redo list + * - Get old version of the current edited library component + */ + void RestoreCopyFromUndoList( wxCommandEvent& aEvent ); + + /** + * Function RestoreCopyFromRedoList + * performs a redo operation on the the last edition: + * - Place the current edited library component in undo list + * - Get old version of the current edited library component + */ + void RestoreCopyFromRedoList( wxCommandEvent& aEvent ); + /// Return the current library nickname. const wxString GetCurrentLib() const; @@ -413,22 +433,6 @@ protected: PCB_LAYER_WIDGET* m_Layers; - /** - * Function GetComponentFromUndoList - * performs an undo operation on the last edition: - * - Place the current edited library component in Redo list - * - Get old version of the current edited library component - */ - void GetComponentFromUndoList( wxCommandEvent& aEvent ); - - /** - * Function GetComponentFromRedoList - * performs a redo operation on the the last edition: - * - Place the current edited library component in undo list - * - Get old version of the current edited library component - */ - void GetComponentFromRedoList( wxCommandEvent& aEvent ); - /** * Function UpdateTitle * updates window title according to getLibNickName(). diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index 1649b24b74..cdd06bf229 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -99,8 +99,8 @@ BEGIN_EVENT_TABLE( FOOTPRINT_EDIT_FRAME, PCB_BASE_FRAME ) EVT_TOOL( ID_MODEDIT_INSERT_MODULE_IN_BOARD, FOOTPRINT_EDIT_FRAME::Process_Special_Functions ) EVT_TOOL( ID_MODEDIT_UPDATE_MODULE_IN_BOARD, FOOTPRINT_EDIT_FRAME::Process_Special_Functions ) EVT_TOOL( ID_MODEDIT_EDIT_MODULE_PROPERTIES, FOOTPRINT_EDIT_FRAME::Process_Special_Functions ) - EVT_TOOL( wxID_UNDO, FOOTPRINT_EDIT_FRAME::GetComponentFromUndoList ) - EVT_TOOL( wxID_REDO, FOOTPRINT_EDIT_FRAME::GetComponentFromRedoList ) + EVT_TOOL( wxID_UNDO, FOOTPRINT_EDIT_FRAME::RestoreCopyFromUndoList ) + EVT_TOOL( wxID_REDO, FOOTPRINT_EDIT_FRAME::RestoreCopyFromRedoList ) // Vertical tool bar button click event handler. EVT_TOOL( ID_NO_TOOL_SELECTED, FOOTPRINT_EDIT_FRAME::OnVerticalToolbar ) @@ -160,9 +160,9 @@ END_EVENT_TABLE() #define FOOTPRINT_EDIT_FRAME_NAME wxT( "ModEditFrame" ) FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : - PCB_BASE_FRAME( aKiway, aParent, FRAME_PCB_MODULE_EDITOR, wxEmptyString, - wxDefaultPosition, wxDefaultSize, - KICAD_DEFAULT_DRAWFRAME_STYLE, GetFootprintEditorFrameName() ) + PCB_BASE_EDIT_FRAME( aKiway, aParent, FRAME_PCB_MODULE_EDITOR, wxEmptyString, + wxDefaultPosition, wxDefaultSize, + KICAD_DEFAULT_DRAWFRAME_STYLE, GetFootprintEditorFrameName() ) { m_FrameName = GetFootprintEditorFrameName(); m_showBorderAndTitleBlock = false; // true to show the frame references diff --git a/pcbnew/pcb_base_edit_frame.h b/pcbnew/pcb_base_edit_frame.h new file mode 100644 index 0000000000..f1c66e160f --- /dev/null +++ b/pcbnew/pcb_base_edit_frame.h @@ -0,0 +1,69 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 CERN + * @author Maciej Suminski + * + * 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 BASE_EDIT_FRAME_H +#define BASE_EDIT_FRAME_H + +#include + +/** + * Common, abstract interface for edit frames. + */ +class PCB_BASE_EDIT_FRAME : public PCB_BASE_FRAME +{ +public: + PCB_BASE_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrameType, + const wxString& aTitle, const wxPoint& aPos, const wxSize& aSize, + long aStyle, const wxString& aFrameName ) : + PCB_BASE_FRAME( aKiway, aParent, aFrameType, aTitle, aPos, aSize, aStyle, aFrameName ) + {} + + virtual ~PCB_BASE_EDIT_FRAME() {}; + + /** + * Function OnEditItemRequest + * Install the corresponding dialog editor for the given item + * @param aDC = the current device context + * @param aItem = a pointer to the BOARD_ITEM to edit + */ + virtual void OnEditItemRequest( wxDC* aDC, BOARD_ITEM* aItem ) = 0; + + /** + * Function RestoreCopyFromRedoList + * Redo the last edition: + * - Save the current data in Undo list + * - Get an old version of the data from Redo list + */ + virtual void RestoreCopyFromRedoList( wxCommandEvent& aEvent ) = 0; + + /** + * Function RestoreCopyFromUndoList + * Undo the last edition: + * - Save the current board in Redo list + * - Get an old version of the data from Undo list + */ + virtual void RestoreCopyFromUndoList( wxCommandEvent& aEvent ) = 0; +}; + +#endif diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 6bb044b1b7..f744584e6c 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -187,8 +187,8 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME ) EVT_TOOL( wxID_CUT, PCB_EDIT_FRAME::Process_Special_Functions ) EVT_TOOL( wxID_COPY, PCB_EDIT_FRAME::Process_Special_Functions ) EVT_TOOL( wxID_PASTE, PCB_EDIT_FRAME::Process_Special_Functions ) - EVT_TOOL( wxID_UNDO, PCB_EDIT_FRAME::GetBoardFromUndoList ) - EVT_TOOL( wxID_REDO, PCB_EDIT_FRAME::GetBoardFromRedoList ) + EVT_TOOL( wxID_UNDO, PCB_EDIT_FRAME::RestoreCopyFromUndoList ) + EVT_TOOL( wxID_REDO, PCB_EDIT_FRAME::RestoreCopyFromRedoList ) EVT_TOOL( wxID_PRINT, PCB_EDIT_FRAME::ToPrinter ) EVT_TOOL( ID_GEN_PLOT_SVG, PCB_EDIT_FRAME::SVG_Print ) EVT_TOOL( ID_GEN_PLOT, PCB_EDIT_FRAME::Process_Special_Functions ) @@ -304,7 +304,7 @@ END_EVENT_TABLE() #define PCB_EDIT_FRAME_NAME wxT( "PcbFrame" ) PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : - PCB_BASE_FRAME( aKiway, aParent, FRAME_PCB, wxT( "Pcbnew" ), wxDefaultPosition, + PCB_BASE_EDIT_FRAME( aKiway, aParent, FRAME_PCB, wxT( "Pcbnew" ), wxDefaultPosition, wxDefaultSize, KICAD_DEFAULT_DRAWFRAME_STYLE, PCB_EDIT_FRAME_NAME ) { m_FrameName = PCB_EDIT_FRAME_NAME; diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index cc7e770e37..496bc92d8f 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -189,7 +189,7 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) { // Modifications have to be rollbacked, so restore the previous state of items wxCommandEvent dummy; - editFrame->GetBoardFromUndoList( dummy ); + editFrame->RestoreCopyFromUndoList( dummy ); } else { diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp index eab541add2..22bde0c384 100644 --- a/pcbnew/tools/point_editor.cpp +++ b/pcbnew/tools/point_editor.cpp @@ -309,7 +309,7 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) if( modified ) // Restore the last change { wxCommandEvent dummy; - editFrame->GetBoardFromUndoList( dummy ); + editFrame->RestoreCopyFromUndoList( dummy ); updatePoints(); modified = false; From 6e0bd1eedcbc03aae65c2c5a019017cff3fb9524 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 13:50:27 +0200 Subject: [PATCH 596/741] Adapted tools to PCB_BASE{_EDIT}_FRAME. --- pcbnew/tools/common_actions.cpp | 11 ++- pcbnew/tools/common_actions.h | 3 +- pcbnew/tools/drawing_tool.cpp | 120 ++++++++++++++++++++++++++++++-- pcbnew/tools/drawing_tool.h | 17 +++-- pcbnew/tools/edit_tool.cpp | 12 ++-- pcbnew/tools/point_editor.cpp | 10 +-- pcbnew/tools/selection_tool.cpp | 16 +++-- pcbnew/tools/selection_tool.h | 4 ++ 8 files changed, 160 insertions(+), 33 deletions(-) diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 73b67e462b..d96f42d3ee 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -67,7 +67,11 @@ TOOL_ACTION COMMON_ACTIONS::drawArc( "pcbnew.InteractiveDrawing.arc", AS_GLOBAL, 0, "Draw an arc", "Draw an arc" ); -TOOL_ACTION COMMON_ACTIONS::placeText( "pcbnew.InteractiveDrawing.text", +TOOL_ACTION COMMON_ACTIONS::placeTextModule( "pcbnew.InteractiveDrawing.textPcb", + AS_GLOBAL, 0, + "Add a text", "Add a text" ); + +TOOL_ACTION COMMON_ACTIONS::placeTextPcb( "pcbnew.InteractiveDrawing.textModule", AS_GLOBAL, 0, "Add a text", "Add a text" ); @@ -284,7 +288,10 @@ std::string COMMON_ACTIONS::TranslateLegacyId( int aId ) return COMMON_ACTIONS::drawArc.GetName(); case ID_PCB_ADD_TEXT_BUTT: - return COMMON_ACTIONS::placeText.GetName(); + return COMMON_ACTIONS::placeTextPcb.GetName(); + + case ID_MODEDIT_TEXT_TOOL: + return COMMON_ACTIONS::placeTextModule.GetName(); case ID_PCB_DIMENSION_BUTT: return COMMON_ACTIONS::drawDimension.GetName(); diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index 5ddb660dbb..986489da63 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -64,7 +64,8 @@ public: static TOOL_ACTION drawArc; /// Activation of the drawing tool (text) - static TOOL_ACTION placeText; + static TOOL_ACTION placeTextPcb; + static TOOL_ACTION placeTextModule; /// Activation of the drawing tool (dimension) static TOOL_ACTION drawDimension; diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index 050681ca2f..c33bd7a3fa 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -65,7 +65,7 @@ void DRAWING_TOOL::Reset( RESET_REASON aReason ) m_view = getView(); m_controls = getViewControls(); m_board = getModel(); - m_frame = getEditFrame(); + m_frame = getEditFrame(); setTransitions(); } @@ -281,7 +281,112 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) } -int DRAWING_TOOL::PlaceText( TOOL_EVENT& aEvent ) +int DRAWING_TOOL::PlaceTextModule( TOOL_EVENT& aEvent ) +{ + TEXTE_MODULE* text = NULL; + + // Add a VIEW_GROUP that serves as a preview for the new item + KIGFX::VIEW_GROUP preview( m_view ); + m_view->Add( &preview ); + + m_toolMgr->GetTool()->ClearSelection(); + m_controls->ShowCursor( true ); + m_controls->SetSnapping( true ); + m_controls->SetAutoPan( true ); + + Activate(); + m_frame->SetToolID( ID_PCB_ADD_TEXT_BUTT, wxCURSOR_PENCIL, _( "Add text" ) ); + + // Main loop: keep receiving events + while( OPT_TOOL_EVENT evt = Wait() ) + { + VECTOR2I cursorPos = m_controls->GetCursorPosition(); + + if( evt->IsCancel() ) + { + if( text ) + { + // Delete the old text and have another try + m_board->Delete( text ); // it was already added by CreateTextPcb() + text = NULL; + + preview.Clear(); + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + m_controls->ShowCursor( true ); + } + else + break; + } + + else if( text && evt->Category() == TC_COMMAND ) + { + if( evt->IsAction( &COMMON_ACTIONS::rotate ) ) + { + text->Rotate( text->GetPosition(), 900.0 /*m_frame->GetRotationAngle()*/ ); // FIXME + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + else if( evt->IsAction( &COMMON_ACTIONS::flip ) ) + { + text->Flip( text->GetPosition() ); + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + } + + else if( evt->IsClick( BUT_LEFT ) ) + { + if( !text ) + { + // Init the new item attributes + text = m_frame->CreateTextModule( m_frame->GetBoard()->m_Modules, NULL ); + + if( text == NULL ) + continue; + + m_controls->ShowCursor( false ); + preview.Add( text ); + } + else + { + assert( text->GetText().Length() > 0 ); + assert( text->GetSize().x > 0 && text->GetSize().y > 0 ); + + text->ClearFlags(); + m_view->Add( text ); + // m_board->Add( text ); // it is already added by CreateTextePcb() + text->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + + m_frame->OnModify(); + m_frame->SaveCopyInUndoList( text, UR_NEW ); + + preview.Remove( text ); + m_controls->ShowCursor( true ); + + text = NULL; + } + } + + else if( text && evt->IsMotion() ) + { + text->SetTextPosition( wxPoint( cursorPos.x, cursorPos.y ) ); + + // Show a preview of the item + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + } + + m_controls->ShowCursor( false ); + m_controls->SetSnapping( false ); + m_controls->SetAutoPan( false ); + m_view->Remove( &preview ); + + setTransitions(); + m_frame->SetToolID( ID_NO_TOOL_SELECTED, wxCURSOR_DEFAULT, wxEmptyString ); + + return 0; +} + + +int DRAWING_TOOL::PlaceTextPcb( TOOL_EVENT& aEvent ) { TEXTE_PCB* text = NULL; @@ -322,7 +427,7 @@ int DRAWING_TOOL::PlaceText( TOOL_EVENT& aEvent ) { if( evt->IsAction( &COMMON_ACTIONS::rotate ) ) { - text->Rotate( text->GetPosition(), m_frame->GetRotationAngle() ); + text->Rotate( text->GetPosition(), /*m_frame->GetRotationAngle()*/ 900.0 ); // FIXME preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); } else if( evt->IsAction( &COMMON_ACTIONS::flip ) ) @@ -337,7 +442,7 @@ int DRAWING_TOOL::PlaceText( TOOL_EVENT& aEvent ) if( !text ) { // Init the new item attributes - text = m_frame->CreateTextePcb( NULL ); + text = static_cast( m_frame )->CreateTextePcb( NULL ); if( text == NULL ) continue; @@ -698,7 +803,7 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent ) { if( evt->IsAction( &COMMON_ACTIONS::rotate ) ) { - module->Rotate( module->GetPosition(), m_frame->GetRotationAngle() ); + module->Rotate( module->GetPosition(), /*m_frame->GetRotationAngle()*/ 900.0 ); preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); } else if( evt->IsAction( &COMMON_ACTIONS::flip ) ) @@ -1029,7 +1134,7 @@ int DRAWING_TOOL::drawZone( bool aKeepout ) m_view->Add( zone ); if( !aKeepout ) - m_frame->Fill_Zone( zone ); + static_cast( m_frame )->Fill_Zone( zone ); zone->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); @@ -1179,7 +1284,8 @@ void DRAWING_TOOL::setTransitions() Go( &DRAWING_TOOL::DrawDimension, COMMON_ACTIONS::drawDimension.MakeEvent() ); Go( &DRAWING_TOOL::DrawZone, COMMON_ACTIONS::drawZone.MakeEvent() ); Go( &DRAWING_TOOL::DrawKeepout, COMMON_ACTIONS::drawKeepout.MakeEvent() ); - Go( &DRAWING_TOOL::PlaceText, COMMON_ACTIONS::placeText.MakeEvent() ); + Go( &DRAWING_TOOL::PlaceTextPcb, COMMON_ACTIONS::placeTextPcb.MakeEvent() ); + Go( &DRAWING_TOOL::PlaceTextModule, COMMON_ACTIONS::placeTextModule.MakeEvent() ); Go( &DRAWING_TOOL::PlaceTarget, COMMON_ACTIONS::placeTarget.MakeEvent() ); Go( &DRAWING_TOOL::PlaceModule, COMMON_ACTIONS::placeModule.MakeEvent() ); } diff --git a/pcbnew/tools/drawing_tool.h b/pcbnew/tools/drawing_tool.h index e05a3a59ce..99427a77be 100644 --- a/pcbnew/tools/drawing_tool.h +++ b/pcbnew/tools/drawing_tool.h @@ -33,7 +33,7 @@ namespace KIGFX class VIEW_CONTROLS; } class BOARD; -class PCB_EDIT_FRAME; +class PCB_BASE_FRAME; class DRAWSEGMENT; /** @@ -76,11 +76,18 @@ public: int DrawArc( TOOL_EVENT& aEvent ); /** - * Function DrawText() + * Function PlaceTextModule() * Displays a dialog that allows to input text and its settings and then lets the user decide - * where to place the text. + * where to place the text in module editor. */ - int PlaceText( TOOL_EVENT& aEvent ); + int PlaceTextModule( TOOL_EVENT& aEvent ); + + /** + * Function PlaceTextPcb() + * Displays a dialog that allows to input text and its settings and then lets the user decide + * where to place the text in board editor. + */ + int PlaceTextPcb( TOOL_EVENT& aEvent ); /** * Function DrawDimension() @@ -143,7 +150,7 @@ private: KIGFX::VIEW* m_view; KIGFX::VIEW_CONTROLS* m_controls; BOARD* m_board; - PCB_EDIT_FRAME* m_frame; + PCB_BASE_FRAME* m_frame; // How does line width change after one -/+ key press. static const int WIDTH_STEP = 100000; diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 496bc92d8f..4d33c1ec07 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -93,7 +93,7 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) m_updateFlag = KIGFX::VIEW_ITEM::GEOMETRY; KIGFX::VIEW_CONTROLS* controls = getViewControls(); - PCB_EDIT_FRAME* editFrame = getEditFrame(); + PCB_BASE_EDIT_FRAME* editFrame = getEditFrame(); controls->ShowCursor( true ); controls->SetSnapping( true ); controls->SetAutoPan( true ); @@ -217,7 +217,7 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); - PCB_EDIT_FRAME* editFrame = getEditFrame(); + PCB_BASE_EDIT_FRAME* editFrame = getEditFrame(); if( !makeSelection( selection ) ) { @@ -286,7 +286,7 @@ int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) int EDIT_TOOL::Rotate( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); - PCB_EDIT_FRAME* editFrame = getEditFrame(); + PCB_BASE_FRAME* editFrame = getEditFrame(); // Shall the selection be cleared at the end? bool unselect = selection.Empty(); @@ -310,7 +310,7 @@ int EDIT_TOOL::Rotate( TOOL_EVENT& aEvent ) { BOARD_ITEM* item = selection.Item( i ); - item->Rotate( rotatePoint, editFrame->GetRotationAngle() ); + item->Rotate( rotatePoint, 900.0 /*m_frame->GetRotationAngle()*/ ); if( !m_dragging ) item->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); @@ -340,7 +340,7 @@ int EDIT_TOOL::Rotate( TOOL_EVENT& aEvent ) int EDIT_TOOL::Flip( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); - PCB_EDIT_FRAME* editFrame = getEditFrame(); + PCB_BASE_FRAME* editFrame = getEditFrame(); // Shall the selection be cleared at the end? bool unselect = selection.Empty(); @@ -404,7 +404,7 @@ int EDIT_TOOL::Remove( TOOL_EVENT& aEvent ) // Get a copy of the selected items set PICKED_ITEMS_LIST selectedItems = selection.items; - PCB_EDIT_FRAME* editFrame = getEditFrame(); + PCB_BASE_FRAME* editFrame = getEditFrame(); // As we are about to remove items, they have to be removed from the selection first m_selectionTool->ClearSelection(); diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp index 22bde0c384..fa9ae8b029 100644 --- a/pcbnew/tools/point_editor.cpp +++ b/pcbnew/tools/point_editor.cpp @@ -209,7 +209,7 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) KIGFX::VIEW_CONTROLS* controls = getViewControls(); KIGFX::VIEW* view = getView(); - PCB_EDIT_FRAME* editFrame = getEditFrame(); + PCB_BASE_EDIT_FRAME* editFrame = getEditFrame(); EDA_ITEM* item = selection.items.GetPickedItem( 0 ); m_editPoints = EDIT_POINTS_FACTORY::Make( item, getView()->GetGAL() ); @@ -661,8 +661,8 @@ void POINT_EDITOR::breakOutline( const VECTOR2I& aBreakPoint ) if( item->Type() == PCB_ZONE_AREA_T ) { - getEditFrame()->OnModify(); - getEditFrame()->SaveCopyInUndoList( selection.items, UR_CHANGED ); + getEditFrame()->OnModify(); + getEditFrame()->SaveCopyInUndoList( selection.items, UR_CHANGED ); ZONE_CONTAINER* zone = static_cast( item ); CPolyLine* outline = zone->Outline(); @@ -702,8 +702,8 @@ void POINT_EDITOR::breakOutline( const VECTOR2I& aBreakPoint ) else if( item->Type() == PCB_LINE_T ) { - getEditFrame()->OnModify(); - getEditFrame()->SaveCopyInUndoList( selection.items, UR_CHANGED ); + getEditFrame()->OnModify(); + getEditFrame()->SaveCopyInUndoList( selection.items, UR_CHANGED ); DRAWSEGMENT* segment = static_cast( item ); diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 591bfb9e3e..08fb358094 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -78,6 +78,8 @@ void SELECTION_TOOL::Reset( RESET_REASON aReason ) // Restore previous properties of selected items and remove them from containers ClearSelection(); + m_frame = getEditFrame(); + // Reinsert the VIEW_GROUP, in case it was removed from the VIEW getView()->Remove( m_selection.group ); getView()->Add( m_selection.group ); @@ -185,7 +187,7 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) bool SELECTION_TOOL::SelectSingle( const VECTOR2I& aWhere, bool aAllowDisambiguation ) { BOARD_ITEM* item; - GENERAL_COLLECTORS_GUIDE guide = getEditFrame()->GetCollectorsGuide(); + GENERAL_COLLECTORS_GUIDE guide = m_frame->GetCollectorsGuide(); GENERAL_COLLECTOR collector; const KICAD_T types[] = { PCB_TRACE_T, PCB_VIA_T, PCB_LINE_T, EOT }; // preferred types @@ -269,7 +271,7 @@ void SELECTION_TOOL::ClearSelection() } m_selection.clear(); - getEditFrame()->SetCurItem( NULL ); + m_frame->SetCurItem( NULL ); // Do not show the context menu when there is nothing selected SetContextMenu( &m_menu, CMENU_OFF ); @@ -370,7 +372,7 @@ bool SELECTION_TOOL::selectMultiple() } // Do not display information about selected item,as there is more than one - getEditFrame()->SetCurItem( NULL ); + m_frame->SetCurItem( NULL ); if( !m_selection.Empty() ) { @@ -586,7 +588,7 @@ void SELECTION_TOOL::select( BOARD_ITEM* aItem ) if( m_selection.Size() == 1 ) { // Set as the current item, so the information about selection is displayed - getEditFrame()->SetCurItem( aItem, true ); + m_frame->SetCurItem( aItem, true ); // Now the context menu should be enabled SetContextMenu( &m_menu, CMENU_BUTTON ); @@ -594,7 +596,7 @@ void SELECTION_TOOL::select( BOARD_ITEM* aItem ) else if( m_selection.Size() == 2 ) // Check only for 2, so it will not be { // called for every next selected item // If multiple items are selected, do not show the information about the selected item - getEditFrame()->SetCurItem( NULL, true ); + m_frame->SetCurItem( NULL, true ); } } @@ -619,7 +621,7 @@ void SELECTION_TOOL::deselect( BOARD_ITEM* aItem ) if( m_selection.Empty() ) { SetContextMenu( &m_menu, CMENU_OFF ); - getEditFrame()->SetCurItem( NULL ); + m_frame->SetCurItem( NULL ); } // Inform other potentially interested tools @@ -671,7 +673,7 @@ bool SELECTION_TOOL::selectionContains( const VECTOR2I& aPoint ) const void SELECTION_TOOL::highlightNet( const VECTOR2I& aPoint ) { KIGFX::RENDER_SETTINGS* render = getView()->GetPainter()->GetSettings(); - GENERAL_COLLECTORS_GUIDE guide = getEditFrame()->GetCollectorsGuide(); + GENERAL_COLLECTORS_GUIDE guide = m_frame->GetCollectorsGuide(); GENERAL_COLLECTOR collector; int net = -1; diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index 642b2ee358..fffd1ec27f 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -31,6 +31,7 @@ #include #include +class PCB_BASE_FRAME; class SELECTION_AREA; class BOARD_ITEM; class GENERAL_COLLECTOR; @@ -257,6 +258,9 @@ private: */ BOARD_ITEM* prefer( GENERAL_COLLECTOR& aCollector, const KICAD_T aTypes[] ) const; + /// Pointer to the parent frame. + PCB_BASE_FRAME* m_frame; + /// Visual representation of selection box SELECTION_AREA* m_selArea; From 5ce29330b1bdad6f533c8704b85585d36934c364 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 13:50:27 +0200 Subject: [PATCH 597/741] Restored support for custom angle rotation. --- include/wxPcbStruct.h | 6 ------ pcbnew/CMakeLists.txt | 1 + pcbnew/pcb_base_edit_frame.cpp | 33 +++++++++++++++++++++++++++++++++ pcbnew/pcb_base_edit_frame.h | 10 +++++++++- pcbnew/pcbframe.cpp | 10 ---------- pcbnew/tools/edit_tool.cpp | 4 ++-- 6 files changed, 45 insertions(+), 19 deletions(-) create mode 100644 pcbnew/pcb_base_edit_frame.cpp diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index 6caca78ea1..fa7d78323e 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -87,9 +87,6 @@ class PCB_EDIT_FRAME : public PCB_BASE_EDIT_FRAME /// The auxiliary right vertical tool bar used to access the microwave tools. wxAuiToolBar* m_microWaveToolBar; - /// User defined rotation angle (in tenths of a degree). - int m_rotationAngle; - /** * Function loadFootprints * loads the footprints for each #COMPONENT in \a aNetlist from the list of libraries. @@ -315,9 +312,6 @@ public: */ virtual void SetGridColor(EDA_COLOR_T aColor); - int GetRotationAngle() const { return m_rotationAngle; } - void SetRotationAngle( int aRotationAngle ); - // Configurations: void Process_Config( wxCommandEvent& event ); diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 3bb9580e90..2884741b8a 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -160,6 +160,7 @@ set( PCBNEW_CLASS_SRCS tool_modview.cpp modview_frame.cpp pcbframe.cpp + pcb_base_edit_frame.cpp attribut.cpp board_items_to_polygon_shape_transform.cpp board_undo_redo.cpp diff --git a/pcbnew/pcb_base_edit_frame.cpp b/pcbnew/pcb_base_edit_frame.cpp new file mode 100644 index 0000000000..e4aa24108b --- /dev/null +++ b/pcbnew/pcb_base_edit_frame.cpp @@ -0,0 +1,33 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 CERN + * @author Maciej Suminski + * + * 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 + +void PCB_BASE_EDIT_FRAME::SetRotationAngle( int aRotationAngle ) +{ + wxCHECK2_MSG( aRotationAngle > 0 && aRotationAngle <= 900, aRotationAngle = 900, + wxT( "Invalid rotation angle, defaulting to 90." ) ); + + m_rotationAngle = aRotationAngle; +} diff --git a/pcbnew/pcb_base_edit_frame.h b/pcbnew/pcb_base_edit_frame.h index f1c66e160f..3d867874d6 100644 --- a/pcbnew/pcb_base_edit_frame.h +++ b/pcbnew/pcb_base_edit_frame.h @@ -36,7 +36,8 @@ public: PCB_BASE_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrameType, const wxString& aTitle, const wxPoint& aPos, const wxSize& aSize, long aStyle, const wxString& aFrameName ) : - PCB_BASE_FRAME( aKiway, aParent, aFrameType, aTitle, aPos, aSize, aStyle, aFrameName ) + PCB_BASE_FRAME( aKiway, aParent, aFrameType, aTitle, aPos, aSize, aStyle, aFrameName ), + m_rotationAngle( 900 ) {} virtual ~PCB_BASE_EDIT_FRAME() {}; @@ -64,6 +65,13 @@ public: * - Get an old version of the data from Undo list */ virtual void RestoreCopyFromUndoList( wxCommandEvent& aEvent ) = 0; + + int GetRotationAngle() const { return m_rotationAngle; } + void SetRotationAngle( int aRotationAngle ); + +protected: + /// User defined rotation angle (in tenths of a degree). + int m_rotationAngle; }; #endif diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index f744584e6c..45267d2e0a 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -1021,13 +1021,3 @@ void PCB_EDIT_FRAME::ToPlotter( wxCommandEvent& event ) dlg.ShowModal(); } - - -void PCB_EDIT_FRAME::SetRotationAngle( int aRotationAngle ) -{ - wxCHECK2_MSG( aRotationAngle > 0 && aRotationAngle <= 900, aRotationAngle = 900, - wxT( "Invalid rotation angle, defaulting to 90." ) ); - - m_rotationAngle = aRotationAngle; -} - diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 4d33c1ec07..5fa5359fe5 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -286,7 +286,7 @@ int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) int EDIT_TOOL::Rotate( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); - PCB_BASE_FRAME* editFrame = getEditFrame(); + PCB_BASE_EDIT_FRAME* editFrame = getEditFrame(); // Shall the selection be cleared at the end? bool unselect = selection.Empty(); @@ -310,7 +310,7 @@ int EDIT_TOOL::Rotate( TOOL_EVENT& aEvent ) { BOARD_ITEM* item = selection.Item( i ); - item->Rotate( rotatePoint, 900.0 /*m_frame->GetRotationAngle()*/ ); + item->Rotate( rotatePoint, editFrame->GetRotationAngle() ); if( !m_dragging ) item->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); From f7ecc749f6a3575fad725836562f2f67e0f89813 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 13:50:27 +0200 Subject: [PATCH 598/741] Restored std::map in TOOL_MANAGER. --- common/tool/tool_manager.cpp | 6 +++--- include/tool/tool_manager.h | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 8f052d57fa..4aa62d2e99 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -109,7 +109,7 @@ TOOL_MANAGER::TOOL_MANAGER() : TOOL_MANAGER::~TOOL_MANAGER() { - boost::unordered_map::iterator it, it_end; + std::map::iterator it, it_end; for( it = m_toolState.begin(), it_end = m_toolState.end(); it != it_end; ++it ) { @@ -276,7 +276,7 @@ bool TOOL_MANAGER::runTool( TOOL_BASE* aTool ) TOOL_BASE* TOOL_MANAGER::FindTool( int aId ) const { - boost::unordered_map::const_iterator it = m_toolIdIndex.find( aId ); + std::map::const_iterator it = m_toolIdIndex.find( aId ); if( it != m_toolIdIndex.end() ) return it->second->theTool; @@ -287,7 +287,7 @@ TOOL_BASE* TOOL_MANAGER::FindTool( int aId ) const TOOL_BASE* TOOL_MANAGER::FindTool( const std::string& aName ) const { - boost::unordered_map::const_iterator it = m_toolNameIndex.find( aName ); + std::map::const_iterator it = m_toolNameIndex.find( aName ); if( it != m_toolNameIndex.end() ) return it->second->theTool; diff --git a/include/tool/tool_manager.h b/include/tool/tool_manager.h index 62f7e42e8a..6969483664 100644 --- a/include/tool/tool_manager.h +++ b/include/tool/tool_manager.h @@ -28,7 +28,7 @@ #include #include -#include +#include #include @@ -143,7 +143,7 @@ public: template T* GetTool() { - boost::unordered_map::iterator tool = m_toolTypes.find( typeid( T ).name() ); + std::map::iterator tool = m_toolTypes.find( typeid( T ).name() ); if( tool != m_toolTypes.end() ) return static_cast( tool->second ); @@ -360,16 +360,16 @@ private: bool isActive( TOOL_BASE* aTool ); /// Index of registered tools current states, associated by tools' objects. - boost::unordered_map m_toolState; + std::map m_toolState; /// Index of the registered tools current states, associated by tools' names. - boost::unordered_map m_toolNameIndex; + std::map m_toolNameIndex; /// Index of the registered tools to easily lookup by their type. - boost::unordered_map m_toolTypes; + std::map m_toolTypes; /// Index of the registered tools current states, associated by tools' ID numbers. - boost::unordered_map m_toolIdIndex; + std::map m_toolIdIndex; /// Stack of the active tools std::deque m_activeTools; From 5f806cfa18a48e25bd99382df2704fb67d0e0d5f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 13:50:27 +0200 Subject: [PATCH 599/741] Minor fixes to the Tool Framework. --- common/tool/tool_manager.cpp | 2 -- include/tool/coroutine.h | 22 +++++++++++++++------- include/tool/tool_event.h | 4 ---- include/tool/tool_manager.h | 3 --- 4 files changed, 15 insertions(+), 16 deletions(-) diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 4aa62d2e99..4ce84ca2ba 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -470,8 +470,6 @@ void TOOL_MANAGER::finishTool( TOOL_STATE* aState ) bool TOOL_MANAGER::ProcessEvent( TOOL_EVENT& aEvent ) { -// wxLogDebug( "event: %s", aEvent.Format().c_str() ); - // Early dispatch of events destined for the TOOL_MANAGER if( !dispatchStandardEvents( aEvent ) ) return false; diff --git a/include/tool/coroutine.h b/include/tool/coroutine.h index 9daab59cb2..3385dece7d 100644 --- a/include/tool/coroutine.h +++ b/include/tool/coroutine.h @@ -56,11 +56,10 @@ template class COROUTINE { public: - COROUTINE() + COROUTINE() : + m_saved( NULL ), m_self( NULL ), m_stack( NULL ), m_stackSize( c_defaultStackSize ), + m_running( false ) { - m_stackSize = c_defaultStackSize; - m_stack = NULL; - m_saved = NULL; } /** @@ -69,7 +68,8 @@ public: */ template COROUTINE( T* object, ReturnType(T::* ptr)( ArgType ) ) : - m_func( object, ptr ), m_saved( NULL ), m_stack( NULL ), m_stackSize( c_defaultStackSize ) + m_func( object, ptr ), m_self( NULL ), m_saved( NULL ), m_stack( NULL ), + m_stackSize( c_defaultStackSize ), m_running( false ) { } @@ -78,8 +78,10 @@ public: * Creates a coroutine from a delegate object */ COROUTINE( DELEGATE aEntry ) : - m_func( aEntry ), m_saved( NULL ), m_stack( NULL ), m_stackSize( c_defaultStackSize ) - {}; + m_func( aEntry ), m_saved( NULL ), m_self( NULL ), m_stack( NULL ), + m_stackSize( c_defaultStackSize ), m_running( false ) + { + } ~COROUTINE() { @@ -138,6 +140,12 @@ public: // align to 16 bytes void* sp = (void*) ( ( ( (ptrdiff_t) m_stack ) + m_stackSize - 0xf ) & ( ~0x0f ) ); + // correct the stack size + m_stackSize -= ( (size_t) m_stack + m_stackSize - (size_t) sp ); + + assert( m_self == NULL ); + assert( m_saved == NULL ); + m_args = &aArgs; m_self = boost::context::make_fcontext( sp, m_stackSize, callerStub ); m_saved = new boost::context::fcontext_t(); diff --git a/include/tool/tool_event.h b/include/tool/tool_event.h index bdfe8a8a10..49f8fe55f1 100644 --- a/include/tool/tool_event.h +++ b/include/tool/tool_event.h @@ -318,9 +318,6 @@ public: if( m_commandId && aEvent.m_commandId ) return *m_commandId == *aEvent.m_commandId; - - // Command-type event has to contain either id or string - assert( false ); } return true; @@ -496,7 +493,6 @@ inline const TOOL_EVENT_LIST operator||( const TOOL_EVENT& aEventA, const TOOL_E return l; } - inline const TOOL_EVENT_LIST operator||( const TOOL_EVENT& aEvent, const TOOL_EVENT_LIST& aEventList ) { diff --git a/include/tool/tool_manager.h b/include/tool/tool_manager.h index 6969483664..54ec87bf57 100644 --- a/include/tool/tool_manager.h +++ b/include/tool/tool_manager.h @@ -384,9 +384,6 @@ private: /// Flag saying if the currently processed event should be passed to other tools. bool m_passEvent; - - /// Pointer to the tool on the top of the active tools stack. - TOOL_STATE* m_currentTool; }; #endif From 5703b7e8bf7e0f92fdc1c2464aae13c7ea0e2ad2 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 13:50:27 +0200 Subject: [PATCH 600/741] Implemented stacking for TOOL_STATEs. --- common/tool/tool_manager.cpp | 153 +++++++++++++++++++++++++---------- 1 file changed, 111 insertions(+), 42 deletions(-) diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 4ce84ca2ba..1147304d5b 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -25,6 +25,8 @@ #include #include +#include +#include #include #include @@ -51,6 +53,32 @@ using boost::optional; /// Struct describing the current execution state of a TOOL struct TOOL_MANAGER::TOOL_STATE { + TOOL_STATE( TOOL_BASE* aTool ) : + theTool( aTool ) + { + clear(); + } + + TOOL_STATE( const TOOL_STATE& aState ) + { + theTool = aState.theTool; + idle = aState.idle; + pendingWait = aState.pendingWait; + pendingContextMenu = aState.pendingContextMenu; + contextMenu = aState.contextMenu; + contextMenuTrigger = aState.contextMenuTrigger; + cofunc = aState.cofunc; + wakeupEvent = aState.wakeupEvent; + waitEvents = aState.waitEvents; + transitions = aState.transitions; + // do not copy stateStack + } + + ~TOOL_STATE() + { + assert( stateStack.empty() ); + } + /// The tool itself TOOL_BASE* theTool; @@ -83,6 +111,21 @@ struct TOOL_MANAGER::TOOL_STATE /// upon the event reception std::vector transitions; + void operator=( const TOOL_STATE& aState ) + { + theTool = aState.theTool; + idle = aState.idle; + pendingWait = aState.pendingWait; + pendingContextMenu = aState.pendingContextMenu; + contextMenu = aState.contextMenu; + contextMenuTrigger = aState.contextMenuTrigger; + cofunc = aState.cofunc; + wakeupEvent = aState.wakeupEvent; + waitEvents = aState.waitEvents; + transitions = aState.transitions; + // do not copy stateStack + } + bool operator==( const TOOL_MANAGER::TOOL_STATE& aRhs ) const { return aRhs.theTool == this->theTool; @@ -92,6 +135,48 @@ struct TOOL_MANAGER::TOOL_STATE { return aRhs.theTool != this->theTool; } + + void Push() + { + stateStack.push( *this ); + + clear(); + } + + bool Pop() + { + delete cofunc; + + if( !stateStack.empty() ) + { + *this = stateStack.top(); + stateStack.pop(); + + return true; + } + else + { + cofunc = NULL; + + return false; + } + } + +private: + ///> Stack preserving previous states of a TOOL. + std::stack stateStack; + + ///> Restores the initial state. + void clear() + { + idle = true; + pendingWait = false; + pendingContextMenu = false; + cofunc = NULL; + contextMenu = NULL; + contextMenuTrigger = CMENU_OFF; + transitions.clear(); + } }; @@ -118,7 +203,6 @@ TOOL_MANAGER::~TOOL_MANAGER() delete it->first; // delete the tool itself } - m_toolState.clear(); delete m_actionMgr; } @@ -132,13 +216,7 @@ void TOOL_MANAGER::RegisterTool( TOOL_BASE* aTool ) wxASSERT_MSG( m_toolTypes.find( typeid( *aTool ).name() ) == m_toolTypes.end(), wxT( "Adding two tools of the same type may result in unexpected behaviour.") ); - TOOL_STATE* st = new TOOL_STATE; - - st->theTool = aTool; - st->pendingWait = false; - st->pendingContextMenu = false; - st->cofunc = NULL; - st->contextMenuTrigger = CMENU_OFF; + TOOL_STATE* st = new TOOL_STATE( aTool ); m_toolState[aTool] = st; m_toolNameIndex[aTool->GetName()] = st; @@ -379,35 +457,31 @@ void TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent ) BOOST_FOREACH( TOOL_STATE* st, m_toolState | boost::adaptors::map_values ) { - // the tool scheduled next state(s) by calling Go() - if( !st->pendingWait ) + // no state handler in progress - check if there are any transitions (defined by + // Go() method that match the event. + if( !st->pendingWait && !st->transitions.empty() ) { - // no state handler in progress - check if there are any transitions (defined by - // Go() method that match the event. - if( st->transitions.size() ) + BOOST_FOREACH( TRANSITION& tr, st->transitions ) { - BOOST_FOREACH( TRANSITION& tr, st->transitions ) + if( tr.first.Matches( aEvent ) ) { - if( tr.first.Matches( aEvent ) ) - { - // as the state changes, the transition table has to be set up again - st->transitions.clear(); + // no tool context allocated yet? Create one. + if( st->cofunc ) + st->Push(); - // no tool context allocated yet? Create one. - if( !st->cofunc ) - st->cofunc = new COROUTINE( tr.second ); - else - st->cofunc->SetEntry( tr.second ); + // as the state changes, the transition table has to be set up again + st->transitions.clear(); - // got match? Run the handler. - st->cofunc->Call( aEvent ); + st->cofunc = new COROUTINE( tr.second ); - if( !st->cofunc->Running() ) - finishTool( st ); // The couroutine has finished immediately? + // got match? Run the handler. + st->cofunc->Call( aEvent ); - // there is no point in further checking, as transitions got cleared - break; - } + if( !st->cofunc->Running() ) + finishTool( st ); // The couroutine has finished immediately? + + // there is no point in further checking, as transitions got cleared + break; } } } @@ -451,20 +525,15 @@ bool TOOL_MANAGER::dispatchActivation( TOOL_EVENT& aEvent ) void TOOL_MANAGER::finishTool( TOOL_STATE* aState ) { - std::deque::iterator it, itEnd; - - // Find the tool and deactivate it - for( it = m_activeTools.begin(), itEnd = m_activeTools.end(); it != itEnd; ++it ) + if( !aState->Pop() ) // if there are no other contexts saved on the stack { - if( aState == m_toolIdIndex[*it] ) - { - m_activeTools.erase( it ); - break; - } - } + // find the tool and deactivate it + std::deque::iterator tool = std::find( m_activeTools.begin(), m_activeTools.end(), + aState->theTool->GetId() ); - delete aState->cofunc; - aState->cofunc = NULL; + if( tool != m_activeTools.end() ) + m_activeTools.erase( tool ); + } } From 5d1ec2b20451502aa104a0e2ee9ea3c8ea230c25 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 13:50:27 +0200 Subject: [PATCH 601/741] Restored invocation of SELECTION_TOOL commands with TOOL_ACTIONs. --- pcbnew/router/router_tool.cpp | 3 +- pcbnew/tools/common_actions.cpp | 9 +- pcbnew/tools/common_actions.h | 6 + pcbnew/tools/drawing_tool.cpp | 17 ++- pcbnew/tools/edit_tool.cpp | 14 +-- pcbnew/tools/selection_tool.cpp | 196 +++++++++++++++++++------------- pcbnew/tools/selection_tool.h | 47 ++++---- 7 files changed, 171 insertions(+), 121 deletions(-) diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index 09951064d9..7416c14c17 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -40,7 +40,6 @@ #include #include -#include #include @@ -637,7 +636,7 @@ int ROUTER_TOOL::Main( TOOL_EVENT& aEvent ) BOARD_DESIGN_SETTINGS& bds = board->GetDesignSettings(); // Deselect all items - m_toolMgr->GetTool()->ClearSelection(); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); getEditFrame()->SetToolID( ID_TRACK_BUTT, wxCURSOR_PENCIL, _( "Interactive Router" ) ); diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index d96f42d3ee..23d66b4249 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -31,17 +31,22 @@ TOOL_ACTION COMMON_ACTIONS::selectionActivate( "pcbnew.InteractiveSelection", AS_GLOBAL, 0, "", "" ); // No description, it is not supposed to be shown anywhere +TOOL_ACTION COMMON_ACTIONS::selectionSingle( "pcbnew.InteractiveSelection.Single", + AS_GLOBAL, 0, "", "" ); // No description, it is not supposed to be shown anywhere + +TOOL_ACTION COMMON_ACTIONS::selectionClear( "pcbnew.InteractiveSelection.Clear", + AS_GLOBAL, 0, "", "" ); // No description, it is not supposed to be shown anywhere // Edit tool actions TOOL_ACTION COMMON_ACTIONS::editActivate( "pcbnew.InteractiveEdit", AS_GLOBAL, 'M', "Move", "Moves the selected item(s)" ); -TOOL_ACTION COMMON_ACTIONS::rotate( "pcbnew.rotate", +TOOL_ACTION COMMON_ACTIONS::rotate( "pcbnew.InteractiveEdit.rotate", AS_GLOBAL, 'R', "Rotate", "Rotates selected item(s)" ); -TOOL_ACTION COMMON_ACTIONS::flip( "pcbnew.flip", +TOOL_ACTION COMMON_ACTIONS::flip( "pcbnew.InteractiveEdit.flip", AS_GLOBAL, 'F', "Flip", "Flips selected item(s)" ); diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index 986489da63..800a085f2a 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -37,6 +37,12 @@ public: /// Activation of the selection tool static TOOL_ACTION selectionActivate; + /// Select a single item under the cursor position + static TOOL_ACTION selectionSingle; + + /// Clears the current selection + static TOOL_ACTION selectionClear; + // Edit Tool /// Activation of the edit tool static TOOL_ACTION editActivate; diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index c33bd7a3fa..9d3cf63670 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -38,7 +38,6 @@ #include #include #include -#include "selection_tool.h" #include #include @@ -103,7 +102,7 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) KIGFX::VIEW_GROUP preview( m_view ); m_view->Add( &preview ); - m_toolMgr->GetTool()->ClearSelection(); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); @@ -289,7 +288,7 @@ int DRAWING_TOOL::PlaceTextModule( TOOL_EVENT& aEvent ) KIGFX::VIEW_GROUP preview( m_view ); m_view->Add( &preview ); - m_toolMgr->GetTool()->ClearSelection(); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); m_controls->SetAutoPan( true ); @@ -394,7 +393,7 @@ int DRAWING_TOOL::PlaceTextPcb( TOOL_EVENT& aEvent ) KIGFX::VIEW_GROUP preview( m_view ); m_view->Add( &preview ); - m_toolMgr->GetTool()->ClearSelection(); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); m_controls->SetAutoPan( true ); @@ -500,7 +499,7 @@ int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent ) KIGFX::VIEW_GROUP preview( m_view ); m_view->Add( &preview ); - m_toolMgr->GetTool()->ClearSelection(); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); @@ -696,7 +695,7 @@ int DRAWING_TOOL::PlaceTarget( TOOL_EVENT& aEvent ) m_view->Add( &preview ); preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - m_toolMgr->GetTool()->ClearSelection(); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); m_controls->SetSnapping( true ); m_controls->SetAutoPan( true ); @@ -771,7 +770,7 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent ) KIGFX::VIEW_GROUP preview( m_view ); m_view->Add( &preview ); - m_toolMgr->GetTool()->ClearSelection(); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); m_controls->SetAutoPan( true ); @@ -882,7 +881,7 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) KIGFX::VIEW_GROUP preview( m_view ); m_view->Add( &preview ); - m_toolMgr->GetTool()->ClearSelection(); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); @@ -1058,7 +1057,7 @@ int DRAWING_TOOL::drawZone( bool aKeepout ) KIGFX::VIEW_GROUP preview( m_view ); m_view->Add( &preview ); - m_toolMgr->GetTool()->ClearSelection(); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 5fa5359fe5..1db8267981 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -48,7 +48,7 @@ EDIT_TOOL::EDIT_TOOL() : bool EDIT_TOOL::Init() { // Find the selection tool, so they can cooperate - m_selectionTool = m_toolMgr->GetTool(); + m_selectionTool = static_cast( m_toolMgr->FindTool( "pcbnew.InteractiveSelection" ) ); if( !m_selectionTool ) { @@ -198,7 +198,7 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) } if( unselect ) - m_selectionTool->ClearSelection(); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); RN_DATA* ratsnest = getModel()->GetRatsnest(); ratsnest->ClearSimple(); @@ -251,7 +251,7 @@ int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) std::vector& undoList = editFrame->GetScreen()->m_UndoList.m_CommandsList; // Some of properties dialogs alter pointers, so we should deselect them - m_selectionTool->ClearSelection(); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); STATUS_FLAGS flags = item->GetFlags(); item->ClearFlags(); @@ -328,7 +328,7 @@ int EDIT_TOOL::Rotate( TOOL_EVENT& aEvent ) getModel()->GetRatsnest()->Recalculate(); if( unselect ) - m_selectionTool->ClearSelection(); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate ); setTransitions(); @@ -382,7 +382,7 @@ int EDIT_TOOL::Flip( TOOL_EVENT& aEvent ) getModel()->GetRatsnest()->Recalculate(); if( unselect ) - m_selectionTool->ClearSelection(); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate ); setTransitions(); @@ -407,7 +407,7 @@ int EDIT_TOOL::Remove( TOOL_EVENT& aEvent ) PCB_BASE_FRAME* editFrame = getEditFrame(); // As we are about to remove items, they have to be removed from the selection first - m_selectionTool->ClearSelection(); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); // Save them for( unsigned int i = 0; i < selectedItems.GetCount(); ++i ) @@ -525,7 +525,7 @@ wxPoint EDIT_TOOL::getModificationPoint( const SELECTION_TOOL::SELECTION& aSelec bool EDIT_TOOL::makeSelection( const SELECTION_TOOL::SELECTION& aSelection ) { if( aSelection.Empty() ) // Try to find an item that could be modified - m_selectionTool->SelectSingle( getView()->ToWorld( getViewControls()->GetMousePosition() ) ); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionSingle ); return !aSelection.Empty(); } diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 08fb358094..ef6d9d0446 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -76,7 +76,7 @@ void SELECTION_TOOL::Reset( RESET_REASON aReason ) m_selection.clear(); else // Restore previous properties of selected items and remove them from containers - ClearSelection(); + clearSelection(); m_frame = getEditFrame(); @@ -84,8 +84,7 @@ void SELECTION_TOOL::Reset( RESET_REASON aReason ) getView()->Remove( m_selection.group ); getView()->Add( m_selection.group ); - // The tool launches upon reception of action event ("pcbnew.InteractiveSelection") - Go( &SELECTION_TOOL::Main, COMMON_ACTIONS::selectionActivate.MakeEvent() ); + setTransitions(); } @@ -98,13 +97,8 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) // become the new selection (discarding previously selected items) m_additive = evt->Modifier( MD_SHIFT ); - if( evt->IsCancel() || evt->Action() == TA_UNDO_REDO ) - { - ClearSelection(); - } - // single click? Select single object - else if( evt->IsClick( BUT_LEFT ) ) + if( evt->IsClick( BUT_LEFT ) ) { if( evt->Modifier( MD_CTRL ) ) { @@ -113,9 +107,9 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) else { if( !m_additive ) - ClearSelection(); + clearSelection(); - SelectSingle( evt->Position() ); + selectSingle( evt->Position() ); } } @@ -123,7 +117,7 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) else if( evt->IsClick( BUT_RIGHT ) ) { if( m_selection.Empty() ) - SelectSingle( evt->Position() ); + selectSingle( evt->Position() ); if( !m_selection.Empty() ) SetContextMenu( &m_menu, CMENU_NOW ); @@ -133,7 +127,7 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) else if( evt->IsDblClick( BUT_LEFT ) ) { if( m_selection.Empty() ) - SelectSingle( evt->Position() ); + selectSingle( evt->Position() ); m_toolMgr->RunAction( COMMON_ACTIONS::properties ); } @@ -148,7 +142,7 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) else if( m_selection.Empty() ) { // There is nothing selected, so try to select something - if( !SelectSingle( getView()->ToWorld( getViewControls()->GetMousePosition() ), false ) ) + if( !selectSingle( getView()->ToWorld( getViewControls()->GetMousePosition() ), false ) ) { // If nothings has been selected or user wants to select more // draw the selection box @@ -171,10 +165,22 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) else { // No -> clear the selection list - ClearSelection(); + clearSelection(); } } } + + else if( evt->IsAction( &COMMON_ACTIONS::selectionSingle ) ) + { + // GetMousePosition() is used, as it is independent of snapping settings + selectSingle( getView()->ToWorld( getViewControls()->GetMousePosition() ) ); + } + + else if( evt->IsCancel() || evt->Action() == TA_UNDO_REDO || + evt->IsAction( &COMMON_ACTIONS::selectionClear ) ) + { + clearSelection(); + } } // This tool is supposed to be active forever @@ -184,7 +190,43 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) } -bool SELECTION_TOOL::SelectSingle( const VECTOR2I& aWhere, bool aAllowDisambiguation ) +void SELECTION_TOOL::AddMenuItem( const TOOL_ACTION& aAction ) +{ + assert( aAction.GetId() > 0 ); // Check if the action was registered before in ACTION_MANAGER + + m_menu.Add( aAction ); +} + + +void SELECTION_TOOL::toggleSelection( BOARD_ITEM* aItem ) +{ + if( aItem->IsSelected() ) + { + deselect( aItem ); + + // Inform other potentially interested tools + TOOL_EVENT deselectEvent( DeselectedEvent ); + m_toolMgr->ProcessEvent( deselectEvent ); + } + else + { + if( !m_additive ) + clearSelection(); + + // Prevent selection of invisible or inactive items + if( selectable( aItem ) ) + { + select( aItem ); + + // Inform other potentially interested tools + TOOL_EVENT selectEvent( SelectedEvent ); + m_toolMgr->ProcessEvent( selectEvent ); + } + } +} + + +bool SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere, bool aAllowDisambiguation ) { BOARD_ITEM* item; GENERAL_COLLECTORS_GUIDE guide = m_frame->GetCollectorsGuide(); @@ -202,7 +244,7 @@ bool SELECTION_TOOL::SelectSingle( const VECTOR2I& aWhere, bool aAllowDisambigua { case 0: if( !m_additive ) - ClearSelection(); + clearSelection(); return false; @@ -254,70 +296,6 @@ bool SELECTION_TOOL::SelectSingle( const VECTOR2I& aWhere, bool aAllowDisambigua } -void SELECTION_TOOL::ClearSelection() -{ - if( m_selection.Empty() ) - return; - - KIGFX::VIEW_GROUP::const_iter it, it_end; - - // Restore the initial properties - for( it = m_selection.group->Begin(), it_end = m_selection.group->End(); it != it_end; ++it ) - { - BOARD_ITEM* item = static_cast( *it ); - - item->ViewSetVisible( true ); - item->ClearSelected(); - } - m_selection.clear(); - - m_frame->SetCurItem( NULL ); - - // Do not show the context menu when there is nothing selected - SetContextMenu( &m_menu, CMENU_OFF ); - - // Inform other potentially interested tools - TOOL_EVENT clearEvent( ClearedEvent ); - m_toolMgr->ProcessEvent( clearEvent ); -} - - -void SELECTION_TOOL::AddMenuItem( const TOOL_ACTION& aAction ) -{ - assert( aAction.GetId() > 0 ); // Check if the action was registered before in ACTION_MANAGER - - m_menu.Add( aAction ); -} - - -void SELECTION_TOOL::toggleSelection( BOARD_ITEM* aItem ) -{ - if( aItem->IsSelected() ) - { - deselect( aItem ); - - // Inform other potentially interested tools - TOOL_EVENT deselectEvent( DeselectedEvent ); - m_toolMgr->ProcessEvent( deselectEvent ); - } - else - { - if( !m_additive ) - ClearSelection(); - - // Prevent selection of invisible or inactive items - if( selectable( aItem ) ) - { - select( aItem ); - - // Inform other potentially interested tools - TOOL_EVENT selectEvent( SelectedEvent ); - m_toolMgr->ProcessEvent( selectEvent ); - } - } -} - - bool SELECTION_TOOL::selectMultiple() { bool cancelled = false; // Was the tool cancelled while it was running? @@ -338,7 +316,7 @@ bool SELECTION_TOOL::selectMultiple() if( evt->IsDrag( BUT_LEFT ) ) { if( !m_additive ) - ClearSelection(); + clearSelection(); // Start drawing a selection box m_selArea->SetOrigin( evt->DragOrigin() ); @@ -393,6 +371,60 @@ bool SELECTION_TOOL::selectMultiple() } +void SELECTION_TOOL::setTransitions() +{ + Go( &SELECTION_TOOL::Main, COMMON_ACTIONS::selectionActivate.MakeEvent() ); + Go( &SELECTION_TOOL::SingleSelection, COMMON_ACTIONS::selectionSingle.MakeEvent() ); + Go( &SELECTION_TOOL::ClearSelection, COMMON_ACTIONS::selectionClear.MakeEvent() ); +} + + +int SELECTION_TOOL::SingleSelection( TOOL_EVENT& aEvent ) +{ + selectSingle( getView()->ToWorld( getViewControls()->GetMousePosition() ) ); + setTransitions(); + + return 0; +} + +int SELECTION_TOOL::ClearSelection( TOOL_EVENT& aEvent ) +{ + clearSelection(); + setTransitions(); + + return 0; +} + +void SELECTION_TOOL::clearSelection() +{ + if( m_selection.Empty() ) + return; + + KIGFX::VIEW_GROUP::const_iter it, it_end; + + // Restore the initial properties + for( it = m_selection.group->Begin(), it_end = m_selection.group->End(); it != it_end; ++it ) + { + BOARD_ITEM* item = static_cast( *it ); + + item->ViewSetVisible( true ); + item->ClearSelected(); + } + m_selection.clear(); + + getEditFrame()->SetCurItem( NULL ); + + // Do not show the context menu when there is nothing selected + SetContextMenu( &m_menu, CMENU_OFF ); + + // Inform other potentially interested tools + TOOL_EVENT clearEvent( ClearedEvent ); + m_toolMgr->ProcessEvent( clearEvent ); + + return; +} + + BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector ) { BOARD_ITEM* current = NULL; diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index fffd1ec27f..6f5e06606d 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -48,7 +48,7 @@ class VIEW_GROUP; * - pick single objects (click LMB) * - add objects to existing selection (Shift+LMB) * - draw selection box (drag LMB) - * - handles MODULEs properly (ie. selects either MODULE or its PADs, TEXTs, etc.) + * - handles MODULEs properly (i.e. selects either MODULE or its PADs, TEXTs, etc.) * - takes into account high-contrast & layer visibility settings * - invokes InteractiveEdit tool when user starts to drag selected items */ @@ -114,24 +114,6 @@ public: return m_selection; } - /** - * Function SelectSingle() - * Selects an item pointed by the parameter aWhere. If there is more than one item at that - * place, there is a menu displayed that allows to choose the item. - * - * @param aWhere is the place where the item should be selected. - * @param aAllowDisambiguation decides what to do in case of disambiguation. If true, then - * a menu is shown, otherise function finishes without selecting anything. - * @return True if an item was selected, false otherwise. - */ - bool SelectSingle( const VECTOR2I& aWhere, bool aAllowDisambiguation = true ); - - /** - * Function ClearSelection() - * Clears the current selection. - */ - void ClearSelection(); - /** * Function AddMenuItem() * @@ -160,7 +142,25 @@ public: ///> Event sent after selection is cleared. const TOOL_EVENT ClearedEvent; + ///> Select single item event handler. + int SingleSelection( TOOL_EVENT& aEvent ); + + ///> Clear current selection event handler. + int ClearSelection( TOOL_EVENT& aEvent ); + private: + /** + * Function selectSingle() + * Selects an item pointed by the parameter aWhere. If there is more than one item at that + * place, there is a menu displayed that allows to choose the item. + * + * @param aWhere is the place where the item should be selected. + * @param aAllowDisambiguation decides what to do in case of disambiguation. If true, then + * a menu is shown, otherise function finishes without selecting anything. + * @return True if an item was selected, false otherwise. + */ + bool selectSingle( const VECTOR2I& aWhere, bool aAllowDisambiguation = true ); + /** * Function selectMultiple() * Handles drawing a selection box that allows to select many items at the same time. @@ -169,6 +169,15 @@ private: */ bool selectMultiple(); + ///> Sets up handlers for various events. + void setTransitions(); + + /** + * Function ClearSelection() + * Clears the current selection. + */ + void clearSelection(); + /** * Function disambiguationMenu() * Handles the menu that allows to select one of many items in case there is more than one From 583de985c7e7766754c4c416095970e9f8d25d07 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 13:50:27 +0200 Subject: [PATCH 602/741] Added required resets for tools. --- pcbnew/loadcmp.cpp | 2 ++ pcbnew/modedit.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/pcbnew/loadcmp.cpp b/pcbnew/loadcmp.cpp index 47a4728e92..21113267a2 100644 --- a/pcbnew/loadcmp.cpp +++ b/pcbnew/loadcmp.cpp @@ -49,6 +49,7 @@ #include #include #include +#include #include #include @@ -126,6 +127,7 @@ bool FOOTPRINT_EDIT_FRAME::Load_Module_From_BOARD( MODULE* aModule ) m_Pcb->ComputeBoundingBox( false ); EDA_RECT boardBbox = m_Pcb->GetBoundingBox(); GetGalCanvas()->GetView()->SetViewport( BOX2D( boardBbox.GetOrigin(), boardBbox.GetSize() ) ); + m_toolManager->ResetTools( TOOL_BASE::MODEL_RELOAD ); } return true; diff --git a/pcbnew/modedit.cpp b/pcbnew/modedit.cpp index 1d3283a276..ba76b1e0de 100644 --- a/pcbnew/modedit.cpp +++ b/pcbnew/modedit.cpp @@ -50,6 +50,7 @@ #include #include #include +#include #include #include @@ -935,6 +936,7 @@ void FOOTPRINT_EDIT_FRAME::UseGalCanvas( bool aEnable ) { SetBoard( m_Pcb ); + m_toolManager->ResetTools( TOOL_BASE::GAL_SWITCH ); GetGalCanvas()->StartDrawing(); } } From 8e90a6167b5166a6a5e814c36b45e77362e0f4a2 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 13:50:27 +0200 Subject: [PATCH 603/741] Rotate support for pads. --- pcbnew/class_pad.cpp | 7 +++++++ pcbnew/class_pad.h | 1 + 2 files changed, 8 insertions(+) diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index 246a766c9d..ef2be10951 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -829,6 +829,13 @@ int D_PAD::Compare( const D_PAD* padref, const D_PAD* padcmp ) } +void D_PAD::Rotate( const wxPoint& aRotCentre, double aAngle ) +{ + RotatePoint( &m_Pos, aRotCentre, aAngle ); + m_Orient += aAngle; +} + + wxString D_PAD::ShowPadShape() const { switch( GetShape() ) diff --git a/pcbnew/class_pad.h b/pcbnew/class_pad.h index 53666d9e4c..7fc41f8dcd 100644 --- a/pcbnew/class_pad.h +++ b/pcbnew/class_pad.h @@ -400,6 +400,7 @@ public: SetLocalCoord(); } + void Rotate( const wxPoint& aRotCentre, double aAngle ); wxString GetSelectMenuText() const; From 6d1417bafa012a035df9ed064a4f56552d563d6c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 13:50:27 +0200 Subject: [PATCH 604/741] SELECTION_TOOL in edit module mode does not try to select MODULEs. --- pcbnew/collectors.cpp | 11 ++++++++++- pcbnew/collectors.h | 8 +++++++- pcbnew/controle.cpp | 4 ++-- pcbnew/tools/selection_tool.cpp | 2 +- 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/pcbnew/collectors.cpp b/pcbnew/collectors.cpp index a2e1d845f8..cb99353899 100644 --- a/pcbnew/collectors.cpp +++ b/pcbnew/collectors.cpp @@ -86,7 +86,7 @@ const KICAD_T GENERAL_COLLECTOR::AllButZones[] = { }; -const KICAD_T GENERAL_COLLECTOR::ModuleItems[] = { +const KICAD_T GENERAL_COLLECTOR::Modules[] = { PCB_MODULE_T, EOT }; @@ -118,12 +118,21 @@ const KICAD_T GENERAL_COLLECTOR::ModulesAndTheirItems[] = { }; +const KICAD_T GENERAL_COLLECTOR::ModuleItems[] = { + PCB_MODULE_TEXT_T, + PCB_MODULE_EDGE_T, + PCB_PAD_T, + EOT +}; + + const KICAD_T GENERAL_COLLECTOR::Tracks[] = { PCB_TRACE_T, PCB_VIA_T, EOT }; + const KICAD_T GENERAL_COLLECTOR::Zones[] = { PCB_ZONE_AREA_T, EOT diff --git a/pcbnew/collectors.h b/pcbnew/collectors.h index 267ec20034..4d2520c06d 100644 --- a/pcbnew/collectors.h +++ b/pcbnew/collectors.h @@ -262,7 +262,7 @@ public: /** * A scan list for only MODULEs */ - static const KICAD_T ModuleItems[]; + static const KICAD_T Modules[]; /** @@ -282,6 +282,12 @@ public: static const KICAD_T ModulesAndTheirItems[]; + /** + * A scan list for primary module items. + */ + static const KICAD_T ModuleItems[]; + + /** * A scan list for only TRACKS */ diff --git a/pcbnew/controle.cpp b/pcbnew/controle.cpp index c5f1d00f9f..911a473dda 100644 --- a/pcbnew/controle.cpp +++ b/pcbnew/controle.cpp @@ -119,7 +119,7 @@ BOARD_ITEM* PCB_BASE_FRAME::PcbGeneralLocateAndDisplay( int aHotKeyCode ) else if( GetToolId() == ID_NO_TOOL_SELECTED ) { if( m_mainToolBar->GetToolToggled( ID_TOOLBARH_PCB_MODE_MODULE ) ) - scanList = GENERAL_COLLECTOR::ModuleItems; + scanList = GENERAL_COLLECTOR::Modules; else scanList = (DisplayOpt.DisplayZonesMode == 0) ? GENERAL_COLLECTOR::AllBoardItems : @@ -138,7 +138,7 @@ BOARD_ITEM* PCB_BASE_FRAME::PcbGeneralLocateAndDisplay( int aHotKeyCode ) break; case ID_PCB_MODULE_BUTT: - scanList = GENERAL_COLLECTOR::ModuleItems; + scanList = GENERAL_COLLECTOR::Modules; break; case ID_PCB_ZONES_BUTT: diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index ef6d9d0446..ac9f1aa51c 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -234,7 +234,7 @@ bool SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere, bool aAllowDisambigua const KICAD_T types[] = { PCB_TRACE_T, PCB_VIA_T, PCB_LINE_T, EOT }; // preferred types if( m_editModules ) - collector.Collect( getModel(), GENERAL_COLLECTOR::ModulesAndTheirItems, + collector.Collect( getModel(), GENERAL_COLLECTOR::ModuleItems, wxPoint( aWhere.x, aWhere.y ), guide ); else collector.Collect( getModel(), GENERAL_COLLECTOR::AllBoardItems, From 9ee8d1a2a7cbe2cdaf32b29034376e0415e3f840 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 13:50:27 +0200 Subject: [PATCH 605/741] Module editor loads the last edited footprint in GAL mode. --- pcbnew/loadcmp.cpp | 10 +--------- pcbnew/modedit.cpp | 3 +-- pcbnew/module_editor_frame.h | 3 +++ pcbnew/moduleframe.cpp | 26 ++++++++++++++++++++++++++ 4 files changed, 31 insertions(+), 11 deletions(-) diff --git a/pcbnew/loadcmp.cpp b/pcbnew/loadcmp.cpp index 21113267a2..a794f3f685 100644 --- a/pcbnew/loadcmp.cpp +++ b/pcbnew/loadcmp.cpp @@ -49,7 +49,6 @@ #include #include #include -#include #include #include @@ -121,14 +120,7 @@ bool FOOTPRINT_EDIT_FRAME::Load_Module_From_BOARD( MODULE* aModule ) Zoom_Automatique( false ); if( IsGalCanvasActive() ) - { - static_cast( GetGalCanvas() )->DisplayBoard( GetBoard() ); - - m_Pcb->ComputeBoundingBox( false ); - EDA_RECT boardBbox = m_Pcb->GetBoundingBox(); - GetGalCanvas()->GetView()->SetViewport( BOX2D( boardBbox.GetOrigin(), boardBbox.GetSize() ) ); - m_toolManager->ResetTools( TOOL_BASE::MODEL_RELOAD ); - } + updateView(); return true; } diff --git a/pcbnew/modedit.cpp b/pcbnew/modedit.cpp index ba76b1e0de..d51e1550a5 100644 --- a/pcbnew/modedit.cpp +++ b/pcbnew/modedit.cpp @@ -935,8 +935,7 @@ void FOOTPRINT_EDIT_FRAME::UseGalCanvas( bool aEnable ) if( aEnable ) { SetBoard( m_Pcb ); - - m_toolManager->ResetTools( TOOL_BASE::GAL_SWITCH ); + updateView(); GetGalCanvas()->StartDrawing(); } } diff --git a/pcbnew/module_editor_frame.h b/pcbnew/module_editor_frame.h index e72ea402bd..9a3f0379a2 100644 --- a/pcbnew/module_editor_frame.h +++ b/pcbnew/module_editor_frame.h @@ -439,6 +439,9 @@ protected: */ void updateTitle(); + /// Reloads displayed items and sets view. + void updateView(); + /// The libPath is not publicly visible, grab it from the FP_LIB_TABLE if we must. const wxString getLibPath(); diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index cdd06bf229..451f5a9130 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -680,3 +680,29 @@ void FOOTPRINT_EDIT_FRAME::updateTitle() SetTitle( title ); } + + +void FOOTPRINT_EDIT_FRAME::updateView() +{ + static_cast( GetGalCanvas() )->DisplayBoard( GetBoard() ); + + m_Pcb->ComputeBoundingBox( false ); + EDA_RECT boardBbox = m_Pcb->GetBoundingBox(); + BOX2D bbox; + + if( boardBbox.GetSize().x > 0 && boardBbox.GetSize().y > 0 ) + { + bbox.SetOrigin( VECTOR2D( boardBbox.GetOrigin() ) ); + bbox.SetSize( VECTOR2D( boardBbox.GetSize() ) ); + } + else + { + // Default empty view + bbox.SetOrigin( VECTOR2D( -1000, -1000 ) ); + bbox.SetSize( VECTOR2D( 2000, 2000 ) ); + } + + GetGalCanvas()->GetView()->SetViewport( bbox ); + + m_toolManager->ResetTools( TOOL_BASE::MODEL_RELOAD ); +} From e3015930f17c19c5dd3d84e514b5f3715e8c9cbf Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 13:50:27 +0200 Subject: [PATCH 606/741] Module editor: modules are shown in GAL mode when loaded from file/library. --- pcbnew/librairi.cpp | 1 + pcbnew/modedit.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/pcbnew/librairi.cpp b/pcbnew/librairi.cpp index 556726d826..b793856792 100644 --- a/pcbnew/librairi.cpp +++ b/pcbnew/librairi.cpp @@ -274,6 +274,7 @@ MODULE* FOOTPRINT_EDIT_FRAME::Import_Module() PlaceModule( module, NULL ); GetBoard()->m_Status_Pcb = 0; GetBoard()->BuildListOfNets(); + updateView(); return module; } diff --git a/pcbnew/modedit.cpp b/pcbnew/modedit.cpp index d51e1550a5..c813011dd6 100644 --- a/pcbnew/modedit.cpp +++ b/pcbnew/modedit.cpp @@ -541,6 +541,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) m_Draw3DFrame->NewDisplay(); GetScreen()->ClrModify(); + updateView(); break; From 74522d5b3cecaec0be6cd9f9cd01535915474883 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 13:50:27 +0200 Subject: [PATCH 607/741] Corrected names of common tool actions. --- pcbnew/tools/common_actions.cpp | 76 +++++++++++++++++---------------- 1 file changed, 39 insertions(+), 37 deletions(-) diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 23d66b4249..cd41f0e96c 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -37,6 +37,7 @@ TOOL_ACTION COMMON_ACTIONS::selectionSingle( "pcbnew.InteractiveSelection.Single TOOL_ACTION COMMON_ACTIONS::selectionClear( "pcbnew.InteractiveSelection.Clear", AS_GLOBAL, 0, "", "" ); // No description, it is not supposed to be shown anywhere + // Edit tool actions TOOL_ACTION COMMON_ACTIONS::editActivate( "pcbnew.InteractiveEdit", AS_GLOBAL, 'M', @@ -109,160 +110,161 @@ TOOL_ACTION COMMON_ACTIONS::pointEditorUpdate( "pcbnew.PointEditor.update", // View Controls -TOOL_ACTION COMMON_ACTIONS::zoomIn( "pcbnew.zoomIn", +TOOL_ACTION COMMON_ACTIONS::zoomIn( "pcbnew.Control.zoomIn", AS_GLOBAL, WXK_F1, "", "" ); -TOOL_ACTION COMMON_ACTIONS::zoomOut( "pcbnew.zoomOut", +TOOL_ACTION COMMON_ACTIONS::zoomOut( "pcbnew.Control.zoomOut", AS_GLOBAL, WXK_F2, "", "" ); -TOOL_ACTION COMMON_ACTIONS::zoomInCenter( "pcbnew.zoomInCenter", +TOOL_ACTION COMMON_ACTIONS::zoomInCenter( "pcbnew.Control.zoomInCenter", AS_GLOBAL, 0, "", "" ); -TOOL_ACTION COMMON_ACTIONS::zoomOutCenter( "pcbnew.zoomOutCenter", +TOOL_ACTION COMMON_ACTIONS::zoomOutCenter( "pcbnew.Control.zoomOutCenter", AS_GLOBAL, 0, "", "" ); -TOOL_ACTION COMMON_ACTIONS::zoomCenter( "pcbnew.zoomCenter", +TOOL_ACTION COMMON_ACTIONS::zoomCenter( "pcbnew.Control.zoomCenter", AS_GLOBAL, WXK_F4, "", "" ); -TOOL_ACTION COMMON_ACTIONS::zoomFitScreen( "pcbnew.zoomFitScreen", +TOOL_ACTION COMMON_ACTIONS::zoomFitScreen( "pcbnew.Control.zoomFitScreen", AS_GLOBAL, WXK_HOME, "", "" ); // Display modes -TOOL_ACTION COMMON_ACTIONS::trackDisplayMode( "pcbnew.trackDisplayMode", +TOOL_ACTION COMMON_ACTIONS::trackDisplayMode( "pcbnew.Control.trackDisplayMode", AS_GLOBAL, 'K', "", "" ); -TOOL_ACTION COMMON_ACTIONS::padDisplayMode( "pcbnew.padDisplayMode", +TOOL_ACTION COMMON_ACTIONS::padDisplayMode( "pcbnew.Control.padDisplayMode", AS_GLOBAL, 'J', // TODO temporarily, find a better hot key "", "" ); -TOOL_ACTION COMMON_ACTIONS::viaDisplayMode( "pcbnew.viaDisplayMode", +TOOL_ACTION COMMON_ACTIONS::viaDisplayMode( "pcbnew.Control.viaDisplayMode", AS_GLOBAL, 'L', // TODO temporarily, find a better hot key "", "" ); -TOOL_ACTION COMMON_ACTIONS::highContrastMode( "pcbnew.highContrastMode", +TOOL_ACTION COMMON_ACTIONS::highContrastMode( "pcbnew.Control.highContrastMode", AS_GLOBAL, 'H', "", "" ); -TOOL_ACTION COMMON_ACTIONS::highContrastInc( "pcbnew.highContrastInc", +TOOL_ACTION COMMON_ACTIONS::highContrastInc( "pcbnew.Control.highContrastInc", AS_GLOBAL, '>', "", "" ); -TOOL_ACTION COMMON_ACTIONS::highContrastDec( "pcbnew.highContrastDec", +TOOL_ACTION COMMON_ACTIONS::highContrastDec( "pcbnew.Control.highContrastDec", AS_GLOBAL, '<', "", "" ); // Layer control -TOOL_ACTION COMMON_ACTIONS::layerTop( "pcbnew.layerTop", +TOOL_ACTION COMMON_ACTIONS::layerTop( "pcbnew.Control.layerTop", AS_GLOBAL, WXK_PAGEUP, "", "" ); -TOOL_ACTION COMMON_ACTIONS::layerInner1( "pcbnew.layerInner1", +TOOL_ACTION COMMON_ACTIONS::layerInner1( "pcbnew.Control.layerInner1", AS_GLOBAL, WXK_F5, "", "" ); -TOOL_ACTION COMMON_ACTIONS::layerInner2( "pcbnew.layerInner2", +TOOL_ACTION COMMON_ACTIONS::layerInner2( "pcbnew.Control.layerInner2", AS_GLOBAL, WXK_F6, "", "" ); -TOOL_ACTION COMMON_ACTIONS::layerInner3( "pcbnew.layerInner3", +TOOL_ACTION COMMON_ACTIONS::layerInner3( "pcbnew.Control.layerInner3", AS_GLOBAL, WXK_F7, "", "" ); -TOOL_ACTION COMMON_ACTIONS::layerInner4( "pcbnew.layerInner4", +TOOL_ACTION COMMON_ACTIONS::layerInner4( "pcbnew.Control.layerInner4", AS_GLOBAL, WXK_F8, "", "" ); -TOOL_ACTION COMMON_ACTIONS::layerInner5( "pcbnew.layerInner5", +TOOL_ACTION COMMON_ACTIONS::layerInner5( "pcbnew.Control.layerInner5", AS_GLOBAL, WXK_F9, "", "" ); -TOOL_ACTION COMMON_ACTIONS::layerInner6( "pcbnew.layerInner6", +TOOL_ACTION COMMON_ACTIONS::layerInner6( "pcbnew.Control.layerInner6", AS_GLOBAL, WXK_F10, "", "" ); -TOOL_ACTION COMMON_ACTIONS::layerBottom( "pcbnew.layerBottom", +TOOL_ACTION COMMON_ACTIONS::layerBottom( "pcbnew.Control.layerBottom", AS_GLOBAL, WXK_PAGEDOWN, "", "" ); -TOOL_ACTION COMMON_ACTIONS::layerNext( "pcbnew.layerNext", +TOOL_ACTION COMMON_ACTIONS::layerNext( "pcbnew.Control.layerNext", AS_GLOBAL, '=', "", "" ); -TOOL_ACTION COMMON_ACTIONS::layerPrev( "pcbnew.layerPrev", +TOOL_ACTION COMMON_ACTIONS::layerPrev( "pcbnew.Control.layerPrev", AS_GLOBAL, '-', "", "" ); -TOOL_ACTION COMMON_ACTIONS::layerAlphaInc( "pcbnew.layerAlphaInc", +TOOL_ACTION COMMON_ACTIONS::layerAlphaInc( "pcbnew.Control.layerAlphaInc", AS_GLOBAL, '}', "", "" ); -TOOL_ACTION COMMON_ACTIONS::layerAlphaDec( "pcbnew.layerAlphaDec", +TOOL_ACTION COMMON_ACTIONS::layerAlphaDec( "pcbnew.Control.layerAlphaDec", AS_GLOBAL, '{', "", "" ); // Grid control -TOOL_ACTION COMMON_ACTIONS::gridFast1( "pcbnew.gridFast1", +TOOL_ACTION COMMON_ACTIONS::gridFast1( "pcbnew.Control.gridFast1", AS_GLOBAL, MD_ALT + int( '1' ), "", "" ); -TOOL_ACTION COMMON_ACTIONS::gridFast2( "pcbnew.gridFast2", +TOOL_ACTION COMMON_ACTIONS::gridFast2( "pcbnew.Control.gridFast2", AS_GLOBAL, MD_ALT + int( '2' ), "", "" ); -TOOL_ACTION COMMON_ACTIONS::gridNext( "pcbnew.gridNext", +TOOL_ACTION COMMON_ACTIONS::gridNext( "pcbnew.Control.gridNext", AS_GLOBAL, '`', "", "" ); -TOOL_ACTION COMMON_ACTIONS::gridPrev( "pcbnew.gridPrev", +TOOL_ACTION COMMON_ACTIONS::gridPrev( "pcbnew.Control.gridPrev", AS_GLOBAL, MD_CTRL + int( '`' ), "", "" ); -TOOL_ACTION COMMON_ACTIONS::gridSetOrigin( "pcbnew.gridSetOrigin", +TOOL_ACTION COMMON_ACTIONS::gridSetOrigin( "pcbnew.Control.gridSetOrigin", AS_GLOBAL, 0, "", "" ); // Track & via size control -TOOL_ACTION COMMON_ACTIONS::trackWidthInc( "pcbnew.trackWidthInc", +TOOL_ACTION COMMON_ACTIONS::trackWidthInc( "pcbnew.EditorControl.trackWidthInc", AS_GLOBAL, '[', "", "" ); -TOOL_ACTION COMMON_ACTIONS::trackWidthDec( "pcbnew.trackWidthDec", +TOOL_ACTION COMMON_ACTIONS::trackWidthDec( "pcbnew.EditorControl.trackWidthDec", AS_GLOBAL, ']', "", "" ); -TOOL_ACTION COMMON_ACTIONS::viaSizeInc( "pcbnew.viaSizeInc", +TOOL_ACTION COMMON_ACTIONS::viaSizeInc( "pcbnew.EditorControl.viaSizeInc", AS_GLOBAL, '\'', "", "" ); -TOOL_ACTION COMMON_ACTIONS::viaSizeDec( "pcbnew.viaSizeDec", +TOOL_ACTION COMMON_ACTIONS::viaSizeDec( "pcbnew.EditorControl.viaSizeDec", AS_GLOBAL, '\\', "", "" ); -TOOL_ACTION COMMON_ACTIONS::trackViaSizeChanged( "pcbnew.trackViaSizeChanged", +TOOL_ACTION COMMON_ACTIONS::trackViaSizeChanged( "pcbnew.EditorControl.trackViaSizeChanged", AS_GLOBAL, 0, "", "" ); + // Miscellaneous -TOOL_ACTION COMMON_ACTIONS::resetCoords( "pcbnew.resetCoords", +TOOL_ACTION COMMON_ACTIONS::resetCoords( "pcbnew.Control.resetCoords", AS_GLOBAL, ' ', "", "" ); -TOOL_ACTION COMMON_ACTIONS::switchUnits( "pcbnew.switchUnits", +TOOL_ACTION COMMON_ACTIONS::switchUnits( "pcbnew.Control.switchUnits", AS_GLOBAL, MD_CTRL + int( 'U' ), "", "" ); -TOOL_ACTION COMMON_ACTIONS::showHelp( "pcbnew.showHelp", +TOOL_ACTION COMMON_ACTIONS::showHelp( "pcbnew.Control.showHelp", AS_GLOBAL, '?', "", "" ); From f8f6fd41ad260a1b60cf3233badf6b062589b249 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 13:50:27 +0200 Subject: [PATCH 608/741] Introduced a new type of action: TA_ACTIVATE to distinguish events activating tools from common tool actions. --- common/CMakeLists.txt | 1 + common/tool/tool_action.cpp | 47 ++++++++++++++++++++++++++++++++++++ common/tool/tool_event.cpp | 1 + common/tool/tool_manager.cpp | 19 ++++++++------- include/tool/tool_action.h | 18 ++++++++++---- include/tool/tool_event.h | 5 +++- 6 files changed, 76 insertions(+), 15 deletions(-) create mode 100644 common/tool/tool_action.cpp diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 88db67da3b..c9caece966 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -228,6 +228,7 @@ set( COMMON_SRCS math/math_util.cpp + tool/tool_action.cpp tool/tool_base.cpp tool/tool_manager.cpp tool/tool_dispatcher.cpp diff --git a/common/tool/tool_action.cpp b/common/tool/tool_action.cpp new file mode 100644 index 0000000000..4d1fd9d658 --- /dev/null +++ b/common/tool/tool_action.cpp @@ -0,0 +1,47 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Maciej Suminski + * + * 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 + +std::string TOOL_ACTION::GetToolName() const +{ + int dotCount = std::count( m_name.begin(), m_name.end(), '.' ); + + switch( dotCount ) + { + case 0: + assert( false ); // Invalid action name format + return ""; + + case 1: + return m_name; + + case 2: + return m_name.substr( 0, m_name.rfind( '.' ) ); + + default: + assert( false ); // TODO not implemented + return ""; + } +} diff --git a/common/tool/tool_event.cpp b/common/tool/tool_event.cpp index 50739ba419..68518a2d50 100644 --- a/common/tool/tool_event.cpp +++ b/common/tool/tool_event.cpp @@ -92,6 +92,7 @@ const std::string TOOL_EVENT::Format() const { TA_CONTEXT_MENU_CHOICE, "context-menu-choice" }, { TA_UNDO_REDO, "undo-redo" }, { TA_ACTION, "action" }, + { TA_ACTIVATE, "activate" }, { 0, "" } }; diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 1147304d5b..6bbc0cd51e 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -294,7 +294,7 @@ bool TOOL_MANAGER::invokeTool( TOOL_BASE* aTool ) { wxASSERT( aTool != NULL ); - TOOL_EVENT evt( TC_COMMAND, TA_ACTION, aTool->GetName() ); + TOOL_EVENT evt( TC_COMMAND, TA_ACTIVATE, aTool->GetName() ); ProcessEvent( evt ); return true; @@ -497,8 +497,11 @@ bool TOOL_MANAGER::dispatchStandardEvents( TOOL_EVENT& aEvent ) if( m_actionMgr->RunHotKey( aEvent.Modifier() | aEvent.KeyCode() ) ) return false; // hotkey event was handled so it does not go any further } - else if( aEvent.Category() == TC_COMMAND ) // it may be a tool activation event + else if( aEvent.Action() == TA_ACTIVATE ) { + // Check if the tool name conforms to the the used tool name format + assert( std::count( aEvent.m_commandStr->begin(), aEvent.m_commandStr->end(), '.' ) == 1 ); + dispatchActivation( aEvent ); // do not return false, as the event has to go on to the destined tool } @@ -509,14 +512,12 @@ bool TOOL_MANAGER::dispatchStandardEvents( TOOL_EVENT& aEvent ) bool TOOL_MANAGER::dispatchActivation( TOOL_EVENT& aEvent ) { - // Look for the tool that has the same name as parameter in the processed command TOOL_EVENT - BOOST_FOREACH( TOOL_STATE* st, m_toolState | boost::adaptors::map_values ) + std::map::iterator tool = m_toolNameIndex.find( *aEvent.m_commandStr ); + + if( tool != m_toolNameIndex.end() ) { - if( st->theTool->GetName() == aEvent.m_commandStr ) - { - runTool( st->theTool ); - return true; - } + runTool( tool->second->theTool ); + return true; } return false; diff --git a/include/tool/tool_action.h b/include/tool/tool_action.h index 152cf52928..c9d3510bc1 100644 --- a/include/tool/tool_action.h +++ b/include/tool/tool_action.h @@ -132,7 +132,6 @@ public: * Checks if the action has a hot key assigned. * * @return True if there is a hot key assigned, false otherwise. - * */ bool HasHotKey() const { @@ -141,14 +140,17 @@ public: /** * Function MakeEvent() - * Returns the event associated with the action (ie. the event that will be sent after + * Returns the event associated with the action (i.e. the event that will be sent after * activating the action). * * @return The event associated with the action. */ TOOL_EVENT MakeEvent() const { - return TOOL_EVENT( TC_COMMAND, TA_ACTION, m_name, m_scope ); + if( IsActivation() ) + return TOOL_EVENT( TC_COMMAND, TA_ACTIVATE, m_name, m_scope ); + else + return TOOL_EVENT( TC_COMMAND, TA_ACTION, m_name, m_scope ); } const std::string& GetMenuItem() const @@ -181,9 +183,15 @@ public: * stripped of the last part (e.g. for "pcbnew.InteractiveDrawing.drawCircle" it is * "pcbnew.InteractiveDrawing"). */ - std::string GetToolName() const + std::string GetToolName() const; + + /** + * Returns true if the action is intended to activate a tool. + */ + bool IsActivation() const { - return m_name.substr( 0, m_name.rfind( '.' ) ); + // Tool activation events are of format appName.toolName + return std::count( m_name.begin(), m_name.end(), '.' ) == 1; } private: diff --git a/include/tool/tool_event.h b/include/tool/tool_event.h index 49f8fe55f1..854e4d3b38 100644 --- a/include/tool/tool_event.h +++ b/include/tool/tool_event.h @@ -91,9 +91,12 @@ enum TOOL_ACTIONS // This event is sent *before* undo/redo command is performed. TA_UNDO_REDO = 0x10000, - // Tool action (allows to control tools) + // Tool action (allows to control tools). TA_ACTION = 0x20000, + // Tool activation event. + TA_ACTIVATE = 0x40000, + TA_ANY = 0xffffffff }; From 34fbde42fc539b473e5cad2a584670fc77285f76 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 13:50:27 +0200 Subject: [PATCH 609/741] Improved way of translating wxEvent commands to TOOL_ACTIONs. --- common/tool/tool_dispatcher.cpp | 23 +---- pcbnew/edit.cpp | 164 ++++++++++++++------------------ pcbnew/tools/common_actions.cpp | 37 ++++--- pcbnew/tools/common_actions.h | 5 +- 4 files changed, 99 insertions(+), 130 deletions(-) diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index 89c09a16ec..cd416f7c50 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -288,27 +288,10 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) void TOOL_DISPATCHER::DispatchWxCommand( wxCommandEvent& aEvent ) { - boost::optional evt; - - switch( aEvent.GetId() ) - { - case ID_ZOOM_IN: // toolbar button "Zoom In" - evt = COMMON_ACTIONS::zoomInCenter.MakeEvent(); - break; - - case ID_ZOOM_OUT: // toolbar button "Zoom In" - evt = COMMON_ACTIONS::zoomOutCenter.MakeEvent(); - break; - - case ID_ZOOM_PAGE: // toolbar button "Fit on Screen" - evt = COMMON_ACTIONS::zoomFitScreen.MakeEvent(); - break; - - default: - aEvent.Skip(); - break; - } + boost::optional evt = COMMON_ACTIONS::TranslateLegacyId( aEvent.GetId() ); if( evt ) m_toolMgr->ProcessEvent( *evt ); + else + aEvent.Skip(); } diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index eb6bb85843..efb92a7064 100644 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -1385,125 +1385,99 @@ void PCB_EDIT_FRAME::OnSelectTool( wxCommandEvent& aEvent ) if( GetToolId() == id ) return; - if( IsGalCanvasActive() ) + INSTALL_UNBUFFERED_DC( dc, m_canvas ); + + // Stop the current command and deselect the current tool. + m_canvas->EndMouseCapture( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor() ); + + switch( id ) { - std::string actionName = COMMON_ACTIONS::TranslateLegacyId( id ); + case ID_NO_TOOL_SELECTED: + SetToolID( id, m_canvas->GetDefaultCursor(), wxEmptyString ); + break; - if( !actionName.empty() || id == ID_NO_TOOL_SELECTED ) + case ID_TRACK_BUTT: + if( g_Drc_On ) + SetToolID( id, wxCURSOR_PENCIL, _( "Add tracks" ) ); + else + SetToolID( id, wxCURSOR_QUESTION_ARROW, _( "Add tracks" ) ); + + if( (GetBoard()->m_Status_Pcb & LISTE_RATSNEST_ITEM_OK) == 0 ) { - const int MAX_TRIALS = 10; - int trials = 0; - - // Cancel the current tool - // TODO while sending a lot of cancel events works for sure, it is not the most - // elegant way to cancel a tool, this should be probably done another way - while( m_toolManager->GetCurrentTool()->GetName() != "pcbnew.InteractiveSelection" && - trials++ < MAX_TRIALS ) - { - TOOL_EVENT cancel( TC_ANY, TA_CANCEL_TOOL ); - m_toolManager->ProcessEvent( cancel ); - } - - if( !actionName.empty() ) - m_toolManager->RunAction( actionName ); + Compile_Ratsnest( &dc, true ); } - } - else - { - INSTALL_UNBUFFERED_DC( dc, m_canvas ); - // Stop the current command and deselect the current tool. - m_canvas->EndMouseCapture( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor() ); + break; - switch( id ) - { - case ID_NO_TOOL_SELECTED: - SetToolID( id, m_canvas->GetDefaultCursor(), wxEmptyString ); - break; + case ID_PCB_MODULE_BUTT: + SetToolID( id, wxCURSOR_PENCIL, _( "Add module" ) ); + break; - case ID_TRACK_BUTT: - if( g_Drc_On ) - SetToolID( id, wxCURSOR_PENCIL, _( "Add tracks" ) ); - else - SetToolID( id, wxCURSOR_QUESTION_ARROW, _( "Add tracks" ) ); + case ID_PCB_ZONES_BUTT: + SetToolID( id, wxCURSOR_PENCIL, _( "Add zones" ) ); - if( (GetBoard()->m_Status_Pcb & LISTE_RATSNEST_ITEM_OK) == 0 ) - { - Compile_Ratsnest( &dc, true ); - } + if( DisplayOpt.DisplayZonesMode != 0 ) + DisplayInfoMessage( this, _( "Warning: zone display is OFF!!!" ) ); - break; + if( !GetBoard()->IsHighLightNetON() && (GetBoard()->GetHighLightNetCode() > 0 ) ) + HighLight( &dc ); - case ID_PCB_MODULE_BUTT: - SetToolID( id, wxCURSOR_PENCIL, _( "Add module" ) ); - break; + break; - case ID_PCB_ZONES_BUTT: - SetToolID( id, wxCURSOR_PENCIL, _( "Add zones" ) ); + case ID_PCB_KEEPOUT_AREA_BUTT: + SetToolID( id, wxCURSOR_PENCIL, _( "Add keepout" ) ); + break; - if( DisplayOpt.DisplayZonesMode != 0 ) - DisplayInfoMessage( this, _( "Warning: zone display is OFF!!!" ) ); + case ID_PCB_MIRE_BUTT: + SetToolID( id, wxCURSOR_PENCIL, _( "Add layer alignment target" ) ); + break; - if( !GetBoard()->IsHighLightNetON() && (GetBoard()->GetHighLightNetCode() > 0 ) ) - HighLight( &dc ); + case ID_PCB_PLACE_OFFSET_COORD_BUTT: + SetToolID( id, wxCURSOR_PENCIL, _( "Adjust zero" ) ); + break; - break; + case ID_PCB_PLACE_GRID_COORD_BUTT: + SetToolID( id, wxCURSOR_PENCIL, _( "Adjust grid origin" ) ); + break; - case ID_PCB_KEEPOUT_AREA_BUTT: - SetToolID( id, wxCURSOR_PENCIL, _( "Add keepout" ) ); - break; + case ID_PCB_ADD_LINE_BUTT: + SetToolID( id, wxCURSOR_PENCIL, _( "Add graphic line" ) ); + break; - case ID_PCB_MIRE_BUTT: - SetToolID( id, wxCURSOR_PENCIL, _( "Add layer alignment target" ) ); - break; + case ID_PCB_ARC_BUTT: + SetToolID( id, wxCURSOR_PENCIL, _( "Add graphic arc" ) ); + break; - case ID_PCB_PLACE_OFFSET_COORD_BUTT: - SetToolID( id, wxCURSOR_PENCIL, _( "Adjust zero" ) ); - break; + case ID_PCB_CIRCLE_BUTT: + SetToolID( id, wxCURSOR_PENCIL, _( "Add graphic circle" ) ); + break; - case ID_PCB_PLACE_GRID_COORD_BUTT: - SetToolID( id, wxCURSOR_PENCIL, _( "Adjust grid origin" ) ); - break; + case ID_PCB_ADD_TEXT_BUTT: + SetToolID( id, wxCURSOR_PENCIL, _( "Add text" ) ); + break; - case ID_PCB_ADD_LINE_BUTT: - SetToolID( id, wxCURSOR_PENCIL, _( "Add graphic line" ) ); - break; + case ID_COMPONENT_BUTT: + SetToolID( id, wxCURSOR_HAND, _( "Add module" ) ); + break; - case ID_PCB_ARC_BUTT: - SetToolID( id, wxCURSOR_PENCIL, _( "Add graphic arc" ) ); - break; + case ID_PCB_DIMENSION_BUTT: + SetToolID( id, wxCURSOR_PENCIL, _( "Add dimension" ) ); + break; - case ID_PCB_CIRCLE_BUTT: - SetToolID( id, wxCURSOR_PENCIL, _( "Add graphic circle" ) ); - break; + case ID_PCB_DELETE_ITEM_BUTT: + SetToolID( id, wxCURSOR_BULLSEYE, _( "Delete item" ) ); + break; - case ID_PCB_ADD_TEXT_BUTT: - SetToolID( id, wxCURSOR_PENCIL, _( "Add text" ) ); - break; + case ID_PCB_HIGHLIGHT_BUTT: + SetToolID( id, wxCURSOR_HAND, _( "Highlight net" ) ); + break; - case ID_COMPONENT_BUTT: - SetToolID( id, wxCURSOR_HAND, _( "Add module" ) ); - break; + case ID_PCB_SHOW_1_RATSNEST_BUTT: + SetToolID( id, wxCURSOR_HAND, _( "Select rats nest" ) ); - case ID_PCB_DIMENSION_BUTT: - SetToolID( id, wxCURSOR_PENCIL, _( "Add dimension" ) ); - break; + if( ( GetBoard()->m_Status_Pcb & LISTE_RATSNEST_ITEM_OK ) == 0 ) + Compile_Ratsnest( &dc, true ); - case ID_PCB_DELETE_ITEM_BUTT: - SetToolID( id, wxCURSOR_BULLSEYE, _( "Delete item" ) ); - break; - - case ID_PCB_HIGHLIGHT_BUTT: - SetToolID( id, wxCURSOR_HAND, _( "Highlight net" ) ); - break; - - case ID_PCB_SHOW_1_RATSNEST_BUTT: - SetToolID( id, wxCURSOR_HAND, _( "Select rats nest" ) ); - - if( ( GetBoard()->m_Status_Pcb & LISTE_RATSNEST_ITEM_OK ) == 0 ) - Compile_Ratsnest( &dc, true ); - - break; - } + break; } } diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index cd41f0e96c..856fcf81f6 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -269,46 +269,55 @@ TOOL_ACTION COMMON_ACTIONS::showHelp( "pcbnew.Control.showHelp", "", "" ); -std::string COMMON_ACTIONS::TranslateLegacyId( int aId ) +boost::optional COMMON_ACTIONS::TranslateLegacyId( int aId ) { switch( aId ) { case ID_PCB_MODULE_BUTT: - return COMMON_ACTIONS::placeModule.GetName(); + return COMMON_ACTIONS::placeModule.MakeEvent(); case ID_TRACK_BUTT: - return COMMON_ACTIONS::routerActivate.GetName(); + return COMMON_ACTIONS::routerActivate.MakeEvent(); case ID_PCB_ZONES_BUTT: - return COMMON_ACTIONS::drawZone.GetName(); + return COMMON_ACTIONS::drawZone.MakeEvent(); case ID_PCB_KEEPOUT_AREA_BUTT: - return COMMON_ACTIONS::drawKeepout.GetName(); + return COMMON_ACTIONS::drawKeepout.MakeEvent(); case ID_PCB_ADD_LINE_BUTT: - return COMMON_ACTIONS::drawLine.GetName(); + return COMMON_ACTIONS::drawLine.MakeEvent(); case ID_PCB_CIRCLE_BUTT: - return COMMON_ACTIONS::drawCircle.GetName(); + return COMMON_ACTIONS::drawCircle.MakeEvent(); case ID_PCB_ARC_BUTT: - return COMMON_ACTIONS::drawArc.GetName(); + return COMMON_ACTIONS::drawArc.MakeEvent(); case ID_PCB_ADD_TEXT_BUTT: - return COMMON_ACTIONS::placeTextPcb.GetName(); + return COMMON_ACTIONS::placeTextPcb.MakeEvent(); case ID_MODEDIT_TEXT_TOOL: - return COMMON_ACTIONS::placeTextModule.GetName(); + return COMMON_ACTIONS::placeTextModule.MakeEvent(); case ID_PCB_DIMENSION_BUTT: - return COMMON_ACTIONS::drawDimension.GetName(); + return COMMON_ACTIONS::drawDimension.MakeEvent(); case ID_PCB_MIRE_BUTT: - return COMMON_ACTIONS::placeTarget.GetName(); + return COMMON_ACTIONS::placeTarget.MakeEvent(); case ID_PCB_PLACE_GRID_COORD_BUTT: - return COMMON_ACTIONS::gridSetOrigin.GetName(); + return COMMON_ACTIONS::gridSetOrigin.MakeEvent(); + + case ID_ZOOM_IN: // toolbar button "Zoom In" + return COMMON_ACTIONS::zoomInCenter.MakeEvent(); + + case ID_ZOOM_OUT: // toolbar button "Zoom In" + return COMMON_ACTIONS::zoomOutCenter.MakeEvent(); + + case ID_ZOOM_PAGE: // toolbar button "Fit on Screen" + return COMMON_ACTIONS::zoomFitScreen.MakeEvent(); } - return ""; + return boost::optional(); } diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index 800a085f2a..ec98e65abd 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -23,6 +23,9 @@ */ #include +#include + +class TOOL_EVENT; /** * Class COMMON_ACTIONS @@ -153,5 +156,5 @@ public: * @return std::string is name of the corresponding TOOL_ACTION. It may be empty, if there is * no corresponding TOOL_ACTION. */ - static std::string TranslateLegacyId( int aId ); + static boost::optional TranslateLegacyId( int aId ); }; From 94cc845b3f193113c780471858fc5ebf9b672cc5 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 13:50:27 +0200 Subject: [PATCH 610/741] Added AF_ACTIVATE flag for TOOL_ACTIONs. Reworked the way of processing events in TOOL_MANAGER class. Added GetCommandStr() for TOOL_EVENT class. --- common/tool/tool_manager.cpp | 72 ++++++++++++++++----------------- include/tool/tool_action.h | 13 +++--- include/tool/tool_event.h | 19 ++++++++- include/tool/tool_manager.h | 10 +++++ pcbnew/router/router_tool.cpp | 14 +++---- pcbnew/tools/common_actions.cpp | 38 ++++++++--------- pcbnew/tools/drawing_tool.cpp | 37 +++++++++++++---- 7 files changed, 126 insertions(+), 77 deletions(-) diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 6bbc0cd51e..0f4e3f22e2 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -495,15 +495,7 @@ bool TOOL_MANAGER::dispatchStandardEvents( TOOL_EVENT& aEvent ) { // Check if there is a hotkey associated if( m_actionMgr->RunHotKey( aEvent.Modifier() | aEvent.KeyCode() ) ) - return false; // hotkey event was handled so it does not go any further - } - else if( aEvent.Action() == TA_ACTIVATE ) - { - // Check if the tool name conforms to the the used tool name format - assert( std::count( aEvent.m_commandStr->begin(), aEvent.m_commandStr->end(), '.' ) == 1 ); - - dispatchActivation( aEvent ); - // do not return false, as the event has to go on to the destined tool + return false; // hotkey event was handled so it does not go any further } return true; @@ -512,41 +504,23 @@ bool TOOL_MANAGER::dispatchStandardEvents( TOOL_EVENT& aEvent ) bool TOOL_MANAGER::dispatchActivation( TOOL_EVENT& aEvent ) { - std::map::iterator tool = m_toolNameIndex.find( *aEvent.m_commandStr ); - - if( tool != m_toolNameIndex.end() ) + if( aEvent.IsActivate() ) { - runTool( tool->second->theTool ); - return true; + std::map::iterator tool = m_toolNameIndex.find( *aEvent.m_commandStr ); + + if( tool != m_toolNameIndex.end() ) + { + runTool( tool->second->theTool ); + return true; + } } return false; } -void TOOL_MANAGER::finishTool( TOOL_STATE* aState ) +void TOOL_MANAGER::dispatchContextMenu( TOOL_EVENT& aEvent ) { - if( !aState->Pop() ) // if there are no other contexts saved on the stack - { - // find the tool and deactivate it - std::deque::iterator tool = std::find( m_activeTools.begin(), m_activeTools.end(), - aState->theTool->GetId() ); - - if( tool != m_activeTools.end() ) - m_activeTools.erase( tool ); - } -} - - -bool TOOL_MANAGER::ProcessEvent( TOOL_EVENT& aEvent ) -{ - // Early dispatch of events destined for the TOOL_MANAGER - if( !dispatchStandardEvents( aEvent ) ) - return false; - - dispatchInternal( aEvent ); - - // popup menu handling BOOST_FOREACH( TOOL_ID toolId, m_activeTools ) { TOOL_STATE* st = m_toolIdIndex[toolId]; @@ -577,6 +551,32 @@ bool TOOL_MANAGER::ProcessEvent( TOOL_EVENT& aEvent ) break; } } +} + + +void TOOL_MANAGER::finishTool( TOOL_STATE* aState ) +{ + if( !aState->Pop() ) // if there are no other contexts saved on the stack + { + // find the tool and deactivate it + std::deque::iterator tool = std::find( m_activeTools.begin(), m_activeTools.end(), + aState->theTool->GetId() ); + + if( tool != m_activeTools.end() ) + m_activeTools.erase( tool ); + } +} + + +bool TOOL_MANAGER::ProcessEvent( TOOL_EVENT& aEvent ) +{ + // Early dispatch of events destined for the TOOL_MANAGER + if( !dispatchStandardEvents( aEvent ) ) + return false; + + dispatchInternal( aEvent ); + dispatchActivation( aEvent ); + dispatchContextMenu( aEvent ); if( m_view->IsDirty() ) { diff --git a/include/tool/tool_action.h b/include/tool/tool_action.h index c9d3510bc1..e215efba83 100644 --- a/include/tool/tool_action.h +++ b/include/tool/tool_action.h @@ -29,7 +29,6 @@ #include #include -#include #include /** @@ -47,10 +46,10 @@ class TOOL_ACTION public: TOOL_ACTION( const std::string& aName, TOOL_ACTION_SCOPE aScope = AS_CONTEXT, int aDefaultHotKey = 0, const std::string& aMenuItem = std::string( "" ), - const std::string& aMenuDesc = std::string( "" ) ) : + const std::string& aMenuDesc = std::string( "" ), TOOL_ACTION_FLAGS aFlags = AF_NONE ) : m_name( aName ), m_scope( aScope ), m_defaultHotKey( aDefaultHotKey ), m_currentHotKey( aDefaultHotKey ), m_menuItem( aMenuItem ), - m_menuDescription( aMenuDesc ), m_id( -1 ) + m_menuDescription( aMenuDesc ), m_id( -1 ), m_flags( aFlags ) { TOOL_MANAGER::GetActionList().push_back( this ); } @@ -190,8 +189,7 @@ public: */ bool IsActivation() const { - // Tool activation events are of format appName.toolName - return std::count( m_name.begin(), m_name.end(), '.' ) == 1; + return m_flags & AF_ACTIVATE; } private: @@ -200,7 +198,7 @@ private: /// Name of the action (convention is: app.[tool.]action.name) std::string m_name; - /// Scope of the action (ie. the event that is issued after activation). + /// Scope of the action (i.e. the event that is issued after activation). TOOL_ACTION_SCOPE m_scope; /// Default hot key that activates the action. @@ -221,6 +219,9 @@ private: /// Unique ID for fast matching. Assigned by ACTION_MANAGER. int m_id; + /// Action flags + TOOL_ACTION_FLAGS m_flags; + /// Origin of the action // const TOOL_BASE* m_origin; diff --git a/include/tool/tool_event.h b/include/tool/tool_event.h index 854e4d3b38..fd6eaa2c72 100644 --- a/include/tool/tool_event.h +++ b/include/tool/tool_event.h @@ -126,6 +126,13 @@ enum TOOL_ACTION_SCOPE AS_GLOBAL ///> Global action (toolbar/main menu event, global shortcut) }; +/// Flags for tool actions +enum TOOL_ACTION_FLAGS +{ + AF_NONE = 0, + AF_ACTIVATE = 1 ///> Action activates a tool +}; + /// Defines when a context menu is opened. enum CONTEXT_MENU_TRIGGER { @@ -268,6 +275,11 @@ public: return m_actions == TA_CANCEL_TOOL; } + bool IsActivate() const + { + return m_actions == TA_ACTIVATE; + } + ///> Returns information about key modifiers state (Ctrl, Alt, etc.) int Modifier( int aMask = MD_MODIFIER_MASK ) const { @@ -334,11 +346,16 @@ public: */ bool IsAction( const TOOL_ACTION* aAction ) const; - boost::optional GetCommandId() + boost::optional GetCommandId() const { return m_commandId; } + boost::optional GetCommandStr() const + { + return m_commandStr; + } + private: friend class TOOL_MANAGER; diff --git a/include/tool/tool_manager.h b/include/tool/tool_manager.h index 54ec87bf57..fdc17480d6 100644 --- a/include/tool/tool_manager.h +++ b/include/tool/tool_manager.h @@ -274,6 +274,10 @@ private: struct TOOL_STATE; typedef std::pair TRANSITION; + /** + * Function dispatchInternal + * Passes an event at first to the active tools, then to all others. + */ void dispatchInternal( TOOL_EVENT& aEvent ); /** @@ -292,6 +296,12 @@ private: */ bool dispatchActivation( TOOL_EVENT& aEvent ); + /** + * Function dispatchContextMenu() + * Handles context menu related events. + */ + void dispatchContextMenu( TOOL_EVENT& aEvent ); + /** * Function invokeTool() * Invokes a tool by sending a proper event (in contrary to runTool, which makes the tool run diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index 7416c14c17..f961722180 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -480,8 +480,7 @@ void ROUTER_TOOL::updateEndItem( TOOL_EVENT& aEvent ) VECTOR2I p = getView()->ToWorld( ctls->GetMousePosition() ); VECTOR2I cp = ctls->GetCursorPosition(); int layer; - - bool snapEnabled = !aEvent.Modifier(MD_SHIFT); + bool snapEnabled = !aEvent.Modifier( MD_SHIFT ); m_router->EnableSnapping ( snapEnabled ); @@ -554,7 +553,7 @@ void ROUTER_TOOL::performRouting() while( OPT_TOOL_EVENT evt = Wait() ) { - if( evt->IsCancel() ) + if( evt->IsCancel() || evt->IsActivate() ) break; else if( evt->Action() == TA_UNDO_REDO ) { @@ -663,7 +662,7 @@ int ROUTER_TOOL::Main( TOOL_EVENT& aEvent ) m_needsSync = false; } - if( evt->IsCancel() ) + if( evt->IsCancel() || evt->IsActivate() ) break; // Finish else if( evt->Action() == TA_UNDO_REDO ) m_needsSync = true; @@ -677,10 +676,11 @@ int ROUTER_TOOL::Main( TOOL_EVENT& aEvent ) performDragging(); else performRouting(); - } else if ( evt->IsAction( &ACT_Drag ) ) + } + else if ( evt->IsAction( &ACT_Drag ) ) performDragging(); - handleCommonEvents(*evt); + handleCommonEvents( *evt ); } // Restore the default settings @@ -715,7 +715,7 @@ void ROUTER_TOOL::performDragging() while( OPT_TOOL_EVENT evt = Wait() ) { - if( evt->IsCancel() ) + if( evt->IsCancel() || evt->IsActivate() ) break; else if( evt->Action() == TA_UNDO_REDO ) { diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 856fcf81f6..5f0fdf5d3c 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -29,7 +29,7 @@ // Selection tool actions TOOL_ACTION COMMON_ACTIONS::selectionActivate( "pcbnew.InteractiveSelection", - AS_GLOBAL, 0, "", "" ); // No description, it is not supposed to be shown anywhere + AS_GLOBAL, 0, "", "", AF_ACTIVATE ); // No description, it is not supposed to be shown anywhere TOOL_ACTION COMMON_ACTIONS::selectionSingle( "pcbnew.InteractiveSelection.Single", AS_GLOBAL, 0, "", "" ); // No description, it is not supposed to be shown anywhere @@ -41,7 +41,7 @@ TOOL_ACTION COMMON_ACTIONS::selectionClear( "pcbnew.InteractiveSelection.Clear", // Edit tool actions TOOL_ACTION COMMON_ACTIONS::editActivate( "pcbnew.InteractiveEdit", AS_GLOBAL, 'M', - "Move", "Moves the selected item(s)" ); + "Move", "Moves the selected item(s)", AF_ACTIVATE ); TOOL_ACTION COMMON_ACTIONS::rotate( "pcbnew.InteractiveEdit.rotate", AS_GLOBAL, 'R', @@ -63,50 +63,43 @@ TOOL_ACTION COMMON_ACTIONS::properties( "pcbnew.InteractiveEdit.properties", // Drawing tool actions TOOL_ACTION COMMON_ACTIONS::drawLine( "pcbnew.InteractiveDrawing.line", AS_GLOBAL, 0, - "Draw a line", "Draw a line" ); + "Draw a line", "Draw a line", AF_ACTIVATE ); TOOL_ACTION COMMON_ACTIONS::drawCircle( "pcbnew.InteractiveDrawing.circle", AS_GLOBAL, 0, - "Draw a circle", "Draw a circle" ); + "Draw a circle", "Draw a circle", AF_ACTIVATE ); TOOL_ACTION COMMON_ACTIONS::drawArc( "pcbnew.InteractiveDrawing.arc", AS_GLOBAL, 0, - "Draw an arc", "Draw an arc" ); + "Draw an arc", "Draw an arc", AF_ACTIVATE ); TOOL_ACTION COMMON_ACTIONS::placeTextModule( "pcbnew.InteractiveDrawing.textPcb", AS_GLOBAL, 0, - "Add a text", "Add a text" ); + "Add a text", "Add a text", AF_ACTIVATE ); TOOL_ACTION COMMON_ACTIONS::placeTextPcb( "pcbnew.InteractiveDrawing.textModule", AS_GLOBAL, 0, - "Add a text", "Add a text" ); + "Add a text", "Add a text", AF_ACTIVATE ); TOOL_ACTION COMMON_ACTIONS::drawDimension( "pcbnew.InteractiveDrawing.dimension", AS_GLOBAL, 0, - "Add a dimension", "Add a dimension" ); + "Add a dimension", "Add a dimension", AF_ACTIVATE ); TOOL_ACTION COMMON_ACTIONS::drawZone( "pcbnew.InteractiveDrawing.zone", AS_GLOBAL, 0, - "Add a filled zone", "Add a filled zone" ); + "Add a filled zone", "Add a filled zone", AF_ACTIVATE ); TOOL_ACTION COMMON_ACTIONS::drawKeepout( "pcbnew.InteractiveDrawing.keepout", AS_GLOBAL, 0, - "Add a keepout area", "Add a keepout area" ); + "Add a keepout area", "Add a keepout area", AF_ACTIVATE ); TOOL_ACTION COMMON_ACTIONS::placeTarget( "pcbnew.InteractiveDrawing.placeTarget", AS_GLOBAL, 0, - "Add layer alignment target", "Add layer alignment target" ); + "Add layer alignment target", "Add layer alignment target", AF_ACTIVATE ); TOOL_ACTION COMMON_ACTIONS::placeModule( "pcbnew.InteractiveDrawing.placeModule", AS_GLOBAL, 'O', - "Add modules", "Add modules" ); - -TOOL_ACTION COMMON_ACTIONS::routerActivate( "pcbnew.InteractiveRouter", - AS_GLOBAL, 'X', - "Run push & shove router", "Run push & shove router" ); - -TOOL_ACTION COMMON_ACTIONS::pointEditorUpdate( "pcbnew.PointEditor.update", - AS_GLOBAL, 0, "", "" ); // No description, it is not supposed to be shown anywhere + "Add modules", "Add modules", AF_ACTIVATE ); // View Controls @@ -268,6 +261,13 @@ TOOL_ACTION COMMON_ACTIONS::showHelp( "pcbnew.Control.showHelp", AS_GLOBAL, '?', "", "" ); +TOOL_ACTION COMMON_ACTIONS::routerActivate( "pcbnew.InteractiveRouter", + AS_GLOBAL, 'X', + "Run push & shove router", "Run push & shove router", AF_ACTIVATE ); + +TOOL_ACTION COMMON_ACTIONS::pointEditorUpdate( "pcbnew.PointEditor.update", + AS_GLOBAL, 0, "", "" ); // No description, it is not supposed to be shown anywhere + boost::optional COMMON_ACTIONS::TranslateLegacyId( int aId ) { diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index 9d3cf63670..37fc7b0698 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -123,7 +123,7 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) { cursorPos = m_controls->GetCursorPosition(); - if( evt->IsCancel() ) + if( evt->IsCancel() || evt->IsActivate() ) { if( step != SET_ORIGIN ) // start from the beginning { @@ -135,6 +135,9 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) } else break; + + if( evt->IsActivate() ) // now finish unconditionally + break; } else if( evt->IsKeyPressed() && step != SET_ORIGIN ) @@ -301,7 +304,7 @@ int DRAWING_TOOL::PlaceTextModule( TOOL_EVENT& aEvent ) { VECTOR2I cursorPos = m_controls->GetCursorPosition(); - if( evt->IsCancel() ) + if( evt->IsCancel() || evt->IsActivate() ) { if( text ) { @@ -315,6 +318,9 @@ int DRAWING_TOOL::PlaceTextModule( TOOL_EVENT& aEvent ) } else break; + + if( evt->IsActivate() ) // now finish unconditionally + break; } else if( text && evt->Category() == TC_COMMAND ) @@ -406,7 +412,7 @@ int DRAWING_TOOL::PlaceTextPcb( TOOL_EVENT& aEvent ) { VECTOR2I cursorPos = m_controls->GetCursorPosition(); - if( evt->IsCancel() ) + if( evt->IsCancel() || evt->IsActivate() ) { if( text ) { @@ -420,6 +426,9 @@ int DRAWING_TOOL::PlaceTextPcb( TOOL_EVENT& aEvent ) } else break; + + if( evt->IsActivate() ) // now finish unconditionally + break; } else if( text && evt->Category() == TC_COMMAND ) @@ -520,7 +529,7 @@ int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent ) { VECTOR2I cursorPos = m_controls->GetCursorPosition(); - if( evt->IsCancel() ) + if( evt->IsCancel() || evt->IsActivate() ) { if( step != SET_ORIGIN ) // start from the beginning { @@ -532,6 +541,9 @@ int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent ) } else break; + + if( evt->IsActivate() ) // now finish unconditionally + break; } else if( evt->IsKeyPressed() && step != SET_ORIGIN ) @@ -707,7 +719,7 @@ int DRAWING_TOOL::PlaceTarget( TOOL_EVENT& aEvent ) { cursorPos = m_controls->GetCursorPosition(); - if( evt->IsCancel() ) + if( evt->IsCancel() || evt->IsActivate() ) break; else if( evt->IsKeyPressed() ) @@ -783,7 +795,7 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent ) { VECTOR2I cursorPos = m_controls->GetCursorPosition(); - if( evt->IsCancel() ) + if( evt->IsCancel() || evt->IsActivate() ) { if( module ) { @@ -796,6 +808,9 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent ) } else break; + + if( evt->IsActivate() ) // now finish unconditionally + break; } else if( module && evt->Category() == TC_COMMAND ) @@ -915,7 +930,7 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) updatePreview = true; } - if( evt->IsCancel() ) + if( evt->IsCancel() || evt->IsActivate() ) { if( !graphic ) break; @@ -927,6 +942,9 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) graphic = NULL; m_controls->SetAutoPan( false ); + + if( evt->IsActivate() ) // now finish unconditionally + break; } else if( graphic && evt->IsKeyPressed() ) @@ -1093,7 +1111,7 @@ int DRAWING_TOOL::drawZone( bool aKeepout ) updatePreview = true; } - if( evt->IsCancel() ) + if( evt->IsCancel() || evt->IsActivate() ) { if( numPoints > 0 ) // cancel the current zone { @@ -1114,6 +1132,9 @@ int DRAWING_TOOL::drawZone( bool aKeepout ) } else // there is no zone currently drawn - just stop the tool break; + + if( evt->IsActivate() ) // now finish unconditionally + break; } else if( evt->IsClick( BUT_LEFT ) ) From 26323007b57c987e3867b2532c476182cca8693d Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 13:50:27 +0200 Subject: [PATCH 611/741] Added a handler for not implemented toolbar buttons functionality in GAL. --- pcbnew/tools/common_actions.cpp | 15 +++++++++++++++ pcbnew/tools/common_actions.h | 1 + pcbnew/tools/pcbnew_control.cpp | 10 ++++++++++ pcbnew/tools/pcbnew_control.h | 1 + 4 files changed, 27 insertions(+) diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 5f0fdf5d3c..343f1813f3 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -261,6 +261,10 @@ TOOL_ACTION COMMON_ACTIONS::showHelp( "pcbnew.Control.showHelp", AS_GLOBAL, '?', "", "" ); +TOOL_ACTION COMMON_ACTIONS::toBeDone( "pcbnew.Control.toBeDone", + AS_GLOBAL, 0, // dialog saying it is not implemented yet + "", "" ); // so users are aware of that + TOOL_ACTION COMMON_ACTIONS::routerActivate( "pcbnew.InteractiveRouter", AS_GLOBAL, 'X', "Run push & shove router", "Run push & shove router", AF_ACTIVATE ); @@ -317,6 +321,17 @@ boost::optional COMMON_ACTIONS::TranslateLegacyId( int aId ) case ID_ZOOM_PAGE: // toolbar button "Fit on Screen" return COMMON_ACTIONS::zoomFitScreen.MakeEvent(); + + case ID_PCB_DELETE_ITEM_BUTT: + case ID_PCB_HIGHLIGHT_BUTT: + case ID_PCB_SHOW_1_RATSNEST_BUTT: + case ID_PCB_PLACE_OFFSET_COORD_BUTT: + case ID_TB_OPTIONS_SHOW_MODULE_RATSNEST: + case ID_TB_OPTIONS_SELECT_CURSOR: + case ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR_MICROWAVE: + case ID_MENU_PCB_SHOW_HIDE_MUWAVE_TOOLBAR: + case ID_MICROWAVE_V_TOOLBAR: + return COMMON_ACTIONS::toBeDone.MakeEvent(); } return boost::optional(); diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index ec98e65abd..9eec3ce112 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -148,6 +148,7 @@ public: static TOOL_ACTION resetCoords; static TOOL_ACTION switchUnits; static TOOL_ACTION showHelp; + static TOOL_ACTION toBeDone; /** * Function TranslateLegacyId() diff --git a/pcbnew/tools/pcbnew_control.cpp b/pcbnew/tools/pcbnew_control.cpp index 1702cfe64b..89b356c38c 100644 --- a/pcbnew/tools/pcbnew_control.cpp +++ b/pcbnew/tools/pcbnew_control.cpp @@ -506,6 +506,15 @@ int PCBNEW_CONTROL::ShowHelp( TOOL_EVENT& aEvent ) } +int PCBNEW_CONTROL::ToBeDone( TOOL_EVENT& aEvent ) +{ + DisplayInfoMessage( m_frame, _( "Not implemented yet." ) ); + setTransitions(); + + return 0; +} + + void PCBNEW_CONTROL::setTransitions() { // View controls @@ -549,4 +558,5 @@ void PCBNEW_CONTROL::setTransitions() Go( &PCBNEW_CONTROL::ResetCoords, COMMON_ACTIONS::resetCoords.MakeEvent() ); Go( &PCBNEW_CONTROL::SwitchUnits, COMMON_ACTIONS::switchUnits.MakeEvent() ); Go( &PCBNEW_CONTROL::ShowHelp, COMMON_ACTIONS::showHelp.MakeEvent() ); + Go( &PCBNEW_CONTROL::ToBeDone, COMMON_ACTIONS::toBeDone.MakeEvent() ); } diff --git a/pcbnew/tools/pcbnew_control.h b/pcbnew/tools/pcbnew_control.h index c5bd7e8841..62c7a9c7cd 100644 --- a/pcbnew/tools/pcbnew_control.h +++ b/pcbnew/tools/pcbnew_control.h @@ -91,6 +91,7 @@ public: int ResetCoords( TOOL_EVENT& aEvent ); int SwitchUnits( TOOL_EVENT& aEvent ); int ShowHelp( TOOL_EVENT& aEvent ); + int ToBeDone( TOOL_EVENT& aEvent ); private: ///> Sets up handlers for various events. From 69c73b0ebc5d1c6f901b334505b0ee1929b03298 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 13:50:27 +0200 Subject: [PATCH 612/741] Updated POINT_EDITOR to handle module edges. --- pcbnew/tools/point_editor.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp index fa9ae8b029..64ad775a06 100644 --- a/pcbnew/tools/point_editor.cpp +++ b/pcbnew/tools/point_editor.cpp @@ -36,7 +36,7 @@ #include "point_editor.h" #include -#include +#include #include #include #include @@ -77,6 +77,7 @@ public: switch( aItem->Type() ) { case PCB_LINE_T: + case PCB_MODULE_EDGE_T: { const DRAWSEGMENT* segment = static_cast( aItem ); @@ -354,6 +355,7 @@ void POINT_EDITOR::updateItem() const switch( item->Type() ) { case PCB_LINE_T: + case PCB_MODULE_EDGE_T: { DRAWSEGMENT* segment = static_cast( item ); switch( segment->GetShape() ) @@ -428,6 +430,10 @@ void POINT_EDITOR::updateItem() const break; } + // Update relative coordinates for module edges + if( EDGE_MODULE* edge = dyn_cast( item ) ) + edge->SetLocalCoord(); + break; } @@ -521,6 +527,7 @@ void POINT_EDITOR::updatePoints() const switch( item->Type() ) { case PCB_LINE_T: + case PCB_MODULE_EDGE_T: { const DRAWSEGMENT* segment = static_cast( item ); { @@ -610,6 +617,7 @@ EDIT_POINT POINT_EDITOR::get45DegConstrainer() const switch( item->Type() ) { case PCB_LINE_T: + case PCB_MODULE_EDGE_T: { const DRAWSEGMENT* segment = static_cast( item ); { @@ -700,7 +708,7 @@ void POINT_EDITOR::breakOutline( const VECTOR2I& aBreakPoint ) outline->InsertCorner( nearestIdx, nearestPoint.x, nearestPoint.y ); } - else if( item->Type() == PCB_LINE_T ) + else if( item->Type() == PCB_LINE_T || item->Type() == PCB_MODULE_EDGE_T ) { getEditFrame()->OnModify(); getEditFrame()->SaveCopyInUndoList( selection.items, UR_CHANGED ); From b05885c2f15fdd76c0a17c8ac241cec976f2f632 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 14:01:06 +0200 Subject: [PATCH 613/741] Refactored drawing tools: lines, circles and arcs. --- pcbnew/tools/drawing_tool.cpp | 500 ++++++++++++++++------------------ pcbnew/tools/drawing_tool.h | 14 +- 2 files changed, 254 insertions(+), 260 deletions(-) diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index 37fc7b0698..71a8b2501f 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -74,7 +74,17 @@ int DRAWING_TOOL::DrawLine( TOOL_EVENT& aEvent ) { m_frame->SetToolID( ID_PCB_ADD_LINE_BUTT, wxCURSOR_PENCIL, _( "Add graphic line" ) ); - return drawSegment( S_SEGMENT, true ); + DRAWSEGMENT* line = new DRAWSEGMENT; + + while( drawSegment( S_SEGMENT, line ) ) + { + line = new DRAWSEGMENT; + } + + setTransitions(); + m_frame->SetToolID( ID_NO_TOOL_SELECTED, wxCURSOR_DEFAULT, wxEmptyString ); + + return 0; } @@ -82,200 +92,31 @@ int DRAWING_TOOL::DrawCircle( TOOL_EVENT& aEvent ) { m_frame->SetToolID( ID_PCB_CIRCLE_BUTT, wxCURSOR_PENCIL, _( "Add graphic circle" ) ); - return drawSegment( S_CIRCLE, false ); + DRAWSEGMENT* circle = new DRAWSEGMENT; + + while( drawSegment( S_CIRCLE, circle ) ) + { + circle = new DRAWSEGMENT; + } + + setTransitions(); + m_frame->SetToolID( ID_NO_TOOL_SELECTED, wxCURSOR_DEFAULT, wxEmptyString ); + + return 0; } int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) { - bool clockwise = true; // drawing direction of the arc - double startAngle = 0.0f; // angle of the first arc line - VECTOR2I cursorPos = m_controls->GetCursorPosition(); - - DRAWSEGMENT* arc = NULL; - DRAWSEGMENT helperLine; - helperLine.SetShape( S_SEGMENT ); - helperLine.SetLayer( Dwgs_User ); - helperLine.SetWidth( 1 ); - - // Add a VIEW_GROUP that serves as a preview for the new item - KIGFX::VIEW_GROUP preview( m_view ); - m_view->Add( &preview ); - - m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); - m_controls->ShowCursor( true ); - m_controls->SetSnapping( true ); - - Activate(); m_frame->SetToolID( ID_PCB_ARC_BUTT, wxCURSOR_PENCIL, _( "Add graphic arc" ) ); - enum ARC_STEPS + DRAWSEGMENT* arc = new DRAWSEGMENT; + + while( drawArc( arc ) ) { - SET_ORIGIN = 0, - SET_END, - SET_ANGLE, - FINISHED - }; - int step = SET_ORIGIN; - - // Main loop: keep receiving events - while( OPT_TOOL_EVENT evt = Wait() ) - { - cursorPos = m_controls->GetCursorPosition(); - - if( evt->IsCancel() || evt->IsActivate() ) - { - if( step != SET_ORIGIN ) // start from the beginning - { - preview.Clear(); - preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - - delete arc; - step = SET_ORIGIN; - } - else - break; - - if( evt->IsActivate() ) // now finish unconditionally - break; - } - - else if( evt->IsKeyPressed() && step != SET_ORIGIN ) - { - int width = arc->GetWidth(); - - // Modify the new item width - if( evt->KeyCode() == '-' && width > WIDTH_STEP ) - arc->SetWidth( width - WIDTH_STEP ); - else if( evt->KeyCode() == '=' ) - arc->SetWidth( width + WIDTH_STEP ); - else if( evt->KeyCode() == '/' ) - { - if( clockwise ) - arc->SetAngle( arc->GetAngle() - 3600.0 ); - else - arc->SetAngle( arc->GetAngle() + 3600.0 ); - - clockwise = !clockwise; - } - - preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - } - - else if( evt->IsClick( BUT_LEFT ) ) - { - switch( step ) - { - case SET_ORIGIN: - { - LAYER_ID layer = m_frame->GetScreen()->m_Active_Layer; - - if( IsCopperLayer( layer ) ) - { - DisplayInfoMessage( NULL, _( "Graphic not allowed on Copper layers" ) ); - --step; - } - else - { - // Init the new item attributes - arc = new DRAWSEGMENT( m_board ); - arc->SetShape( S_ARC ); - arc->SetAngle( 0.0 ); - arc->SetWidth( m_board->GetDesignSettings().m_DrawSegmentWidth ); - arc->SetCenter( wxPoint( cursorPos.x, cursorPos.y ) ); - arc->SetLayer( layer ); - - helperLine.SetStart( arc->GetCenter() ); - helperLine.SetEnd( arc->GetCenter() ); - - preview.Add( arc ); - preview.Add( &helperLine ); - - m_controls->SetAutoPan( true ); - } - } - break; - - case SET_END: - { - if( wxPoint( cursorPos.x, cursorPos.y ) != arc->GetCenter() ) - { - VECTOR2D startLine( arc->GetArcStart() - arc->GetCenter() ); - startAngle = startLine.Angle(); - arc->SetArcStart( wxPoint( cursorPos.x, cursorPos.y ) ); - } - else - --step; // one another chance to draw a proper arc - - } - break; - - case SET_ANGLE: - { - if( wxPoint( cursorPos.x, cursorPos.y ) != arc->GetArcStart() ) - { - assert( arc->GetAngle() != 0 ); - assert( arc->GetArcStart() != arc->GetArcEnd() ); - assert( arc->GetWidth() > 0 ); - - m_view->Add( arc ); - m_board->Add( arc ); - arc->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - - m_frame->OnModify(); - m_frame->SaveCopyInUndoList( arc, UR_NEW ); - - preview.Remove( arc ); - preview.Remove( &helperLine ); - } - else - --step; // one another chance to draw a proper arc - } - break; - } - - if( ++step == FINISHED ) - { - step = SET_ORIGIN; - m_controls->SetAutoPan( false ); - } - } - - else if( evt->IsMotion() ) - { - switch( step ) - { - case SET_END: - helperLine.SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); - arc->SetArcStart( wxPoint( cursorPos.x, cursorPos.y ) ); - break; - - case SET_ANGLE: - { - VECTOR2D endLine( wxPoint( cursorPos.x, cursorPos.y ) - arc->GetCenter() ); - double newAngle = RAD2DECIDEG( endLine.Angle() - startAngle ); - - // Adjust the new angle to (counter)clockwise setting - if( clockwise && newAngle < 0.0 ) - newAngle += 3600.0; - else if( !clockwise && newAngle > 0.0 ) - newAngle -= 3600.0; - - arc->SetAngle( newAngle ); - } - break; - } - - // Show a preview of the item - preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - } + arc = new DRAWSEGMENT; } - m_controls->ShowCursor( false ); - m_controls->SetSnapping( false ); - m_controls->SetAutoPan( false ); - m_view->Remove( &preview ); - setTransitions(); m_frame->SetToolID( ID_NO_TOOL_SELECTED, wxCURSOR_DEFAULT, wxEmptyString ); @@ -884,12 +725,11 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent ) } -int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) +bool DRAWING_TOOL::drawSegment( int aShape, DRAWSEGMENT* aGraphic ) { // Only two shapes are currently supported assert( aShape == S_SEGMENT || aShape == S_CIRCLE ); - DRAWSEGMENT* graphic = NULL; DRAWSEGMENT line45; // Add a VIEW_GROUP that serves as a preview for the new item @@ -903,7 +743,7 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) Activate(); bool direction45 = false; // 45 degrees only mode - int addedSegments = 0; + bool started = false; // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) @@ -912,19 +752,19 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) VECTOR2I cursorPos = m_controls->GetCursorPosition(); // Enable 45 degrees lines only mode by holding control - if( direction45 != evt->Modifier( MD_CTRL ) && graphic && aShape == S_SEGMENT ) + if( direction45 != evt->Modifier( MD_CTRL ) && started && aShape == S_SEGMENT ) { direction45 = evt->Modifier( MD_CTRL ); if( direction45 ) { preview.Add( &line45 ); - make45DegLine( graphic, &line45 ); + make45DegLine( aGraphic, &line45 ); } else { preview.Remove( &line45 ); - graphic->SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); + aGraphic->SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); } updatePreview = true; @@ -932,37 +772,28 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) if( evt->IsCancel() || evt->IsActivate() ) { - if( !graphic ) - break; - preview.Clear(); updatePreview = true; - - delete graphic; - graphic = NULL; - - m_controls->SetAutoPan( false ); - - if( evt->IsActivate() ) // now finish unconditionally - break; + delete aGraphic; + break; } - else if( graphic && evt->IsKeyPressed() ) + else if( evt->IsKeyPressed() ) { - int width = graphic->GetWidth(); + int width = aGraphic->GetWidth(); // Modify the new item width - if( evt->KeyCode() == '-' && width > WIDTH_STEP ) - graphic->SetWidth( width - WIDTH_STEP ); + if( evt->KeyCode() == '-' && width > WIDTH_STEP ) // TODO change it to TOOL_ACTIONs + aGraphic->SetWidth( width - WIDTH_STEP ); else if( evt->KeyCode() == '=' ) - graphic->SetWidth( width + WIDTH_STEP ); + aGraphic->SetWidth( width + WIDTH_STEP ); updatePreview = true; } else if( evt->IsClick( BUT_LEFT ) ) { - if( !graphic ) + if( !started ) { LAYER_ID layer = m_frame->GetScreen()->m_Active_Layer; @@ -973,78 +804,56 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) else { // Init the new item attributes - graphic = new DRAWSEGMENT( m_board ); - graphic->SetShape( (STROKE_T) aShape ); - graphic->SetWidth( m_board->GetDesignSettings().m_DrawSegmentWidth ); - graphic->SetStart( wxPoint( cursorPos.x, cursorPos.y ) ); - graphic->SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); - graphic->SetLayer( layer ); + aGraphic->SetShape( (STROKE_T) aShape ); + aGraphic->SetWidth( m_board->GetDesignSettings().m_DrawSegmentWidth ); + aGraphic->SetStart( wxPoint( cursorPos.x, cursorPos.y ) ); + aGraphic->SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); + aGraphic->SetLayer( layer ); if( aShape == S_SEGMENT ) { - line45 = *graphic; // used only for direction 45 mode with lines + line45 = *aGraphic; // used only for direction 45 mode with lines line45.SetLayer( layer ); } - preview.Add( graphic ); + preview.Add( aGraphic ); m_controls->SetAutoPan( true ); + + started = true; } } else { - if( graphic->GetEnd() != graphic->GetStart() ) + if( aGraphic->GetEnd() != aGraphic->GetStart() ) { - assert( graphic->GetLength() > 0 ); - assert( graphic->GetWidth() > 0 ); + assert( aGraphic->GetLength() > 0 ); + assert( aGraphic->GetWidth() > 0 ); - m_view->Add( graphic ); - m_board->Add( graphic ); - graphic->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + m_view->Add( aGraphic ); + m_board->Add( aGraphic ); + aGraphic->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); m_frame->OnModify(); - m_frame->SaveCopyInUndoList( graphic, UR_NEW ); - - preview.Remove( graphic ); - ++addedSegments; - - if( aContinous ) - { - graphic = new DRAWSEGMENT( *graphic ); - - // Start the new line in the same spot where the previous one has ended - graphic->SetStart( graphic->GetEnd() ); - - if( direction45 ) - graphic->SetEnd( line45.GetEnd() ); - - preview.Add( graphic ); - } - else // start a new graphic - { - addedSegments = 0; - m_controls->SetAutoPan( false ); - graphic = NULL; - } + m_frame->SaveCopyInUndoList( aGraphic, UR_NEW ); } - else if( addedSegments > 0 ) // User has clicked twice in the same spot + else // User has clicked twice in the same spot { // a clear sign that the current drawing is finished - preview.Clear(); // but only if at least one graphic was created - // otherwise - force user to draw more or cancel - delete graphic; - graphic = NULL; - - m_controls->SetAutoPan( false ); + delete aGraphic; // but only if at least one graphic was created + started = false; // otherwise - force user to draw more or cancel } + + preview.Clear(); + break; } } - else if( graphic && evt->IsMotion() ) + else if( evt->IsMotion() ) { // 45 degree lines if( direction45 && aShape == S_SEGMENT ) - make45DegLine( graphic, &line45 ); + make45DegLine( aGraphic, &line45 ); else - graphic->SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); + aGraphic->SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); updatePreview = true; } @@ -1058,10 +867,185 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) m_controls->SetAutoPan( false ); m_view->Remove( &preview ); - setTransitions(); - m_frame->SetToolID( ID_NO_TOOL_SELECTED, wxCURSOR_DEFAULT, wxEmptyString ); + return started; +} - return 0; + +bool DRAWING_TOOL::drawArc( DRAWSEGMENT* aGraphic ) +{ + bool clockwise = true; // drawing direction of the arc + double startAngle = 0.0f; // angle of the first arc line + VECTOR2I cursorPos = m_controls->GetCursorPosition(); + + DRAWSEGMENT helperLine; + helperLine.SetShape( S_SEGMENT ); + helperLine.SetLayer( Dwgs_User ); + helperLine.SetWidth( 1 ); + + // Add a VIEW_GROUP that serves as a preview for the new item + KIGFX::VIEW_GROUP preview( m_view ); + m_view->Add( &preview ); + + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + m_controls->ShowCursor( true ); + m_controls->SetSnapping( true ); + + Activate(); + + enum ARC_STEPS + { + SET_ORIGIN = 0, + SET_END, + SET_ANGLE, + FINISHED + }; + int step = SET_ORIGIN; + + // Main loop: keep receiving events + while( OPT_TOOL_EVENT evt = Wait() ) + { + cursorPos = m_controls->GetCursorPosition(); + + if( evt->IsCancel() || evt->IsActivate() ) + { + preview.Clear(); + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + delete aGraphic; + break; + } + + else if( evt->IsKeyPressed() && step != SET_ORIGIN ) + { + int width = aGraphic->GetWidth(); + + // Modify the new item width + if( evt->KeyCode() == '-' && width > WIDTH_STEP ) // TODO convert to tool actions + aGraphic->SetWidth( width - WIDTH_STEP ); + else if( evt->KeyCode() == '=' ) + aGraphic->SetWidth( width + WIDTH_STEP ); + else if( evt->KeyCode() == '/' ) + { + if( clockwise ) + aGraphic->SetAngle( aGraphic->GetAngle() - 3600.0 ); + else + aGraphic->SetAngle( aGraphic->GetAngle() + 3600.0 ); + + clockwise = !clockwise; + } + + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + + else if( evt->IsClick( BUT_LEFT ) ) + { + switch( step ) + { + case SET_ORIGIN: + { + LAYER_ID layer = m_frame->GetScreen()->m_Active_Layer; + + if( IsCopperLayer( layer ) ) + { + DisplayInfoMessage( NULL, _( "Graphic not allowed on Copper layers" ) ); + --step; + } + else + { + // Init the new item attributes + aGraphic->SetShape( S_ARC ); + aGraphic->SetAngle( 0.0 ); + aGraphic->SetWidth( m_board->GetDesignSettings().m_DrawSegmentWidth ); + aGraphic->SetCenter( wxPoint( cursorPos.x, cursorPos.y ) ); + aGraphic->SetLayer( layer ); + + helperLine.SetStart( aGraphic->GetCenter() ); + helperLine.SetEnd( aGraphic->GetCenter() ); + + preview.Add( aGraphic ); + preview.Add( &helperLine ); + + m_controls->SetAutoPan( true ); + } + } + break; + + case SET_END: + { + if( wxPoint( cursorPos.x, cursorPos.y ) != aGraphic->GetCenter() ) + { + VECTOR2D startLine( aGraphic->GetArcStart() - aGraphic->GetCenter() ); + startAngle = startLine.Angle(); + aGraphic->SetArcStart( wxPoint( cursorPos.x, cursorPos.y ) ); + } + else + --step; // one another chance to draw a proper arc + } + break; + + case SET_ANGLE: + { + if( wxPoint( cursorPos.x, cursorPos.y ) != aGraphic->GetArcStart() ) + { + assert( aGraphic->GetAngle() != 0 ); + assert( aGraphic->GetArcStart() != aGraphic->GetArcEnd() ); + assert( aGraphic->GetWidth() > 0 ); + + m_view->Add( aGraphic ); + m_board->Add( aGraphic ); + aGraphic->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + + m_frame->OnModify(); + m_frame->SaveCopyInUndoList( aGraphic, UR_NEW ); + + preview.Remove( aGraphic ); + preview.Remove( &helperLine ); + } + else + --step; // one another chance to draw a proper arc + } + break; + } + + if( ++step == FINISHED ) + break; + } + + else if( evt->IsMotion() ) + { + switch( step ) + { + case SET_END: + helperLine.SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); + aGraphic->SetArcStart( wxPoint( cursorPos.x, cursorPos.y ) ); + break; + + case SET_ANGLE: + { + VECTOR2D endLine( wxPoint( cursorPos.x, cursorPos.y ) - aGraphic->GetCenter() ); + double newAngle = RAD2DECIDEG( endLine.Angle() - startAngle ); + + // Adjust the new angle to (counter)clockwise setting + if( clockwise && newAngle < 0.0 ) + newAngle += 3600.0; + else if( !clockwise && newAngle > 0.0 ) + newAngle -= 3600.0; + + aGraphic->SetAngle( newAngle ); + } + break; + } + + // Show a preview of the item + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + } + + m_controls->ShowCursor( false ); + m_controls->SetSnapping( false ); + m_controls->SetAutoPan( false ); + m_view->Remove( &preview ); + + return ( step > SET_ORIGIN ); } diff --git a/pcbnew/tools/drawing_tool.h b/pcbnew/tools/drawing_tool.h index 99427a77be..57e865bfd7 100644 --- a/pcbnew/tools/drawing_tool.h +++ b/pcbnew/tools/drawing_tool.h @@ -130,8 +130,18 @@ public: private: ///> Starts drawing a selected shape (i.e. DRAWSEGMENT). ///> @param aShape is the type of created shape (@see STROKE_T). - ///> @param aContinous decides if there is only one or multiple shapes to draw. - int drawSegment( int aShape, bool aContinous ); + ///> @param aGraphic is an object that is going to be used by the tool for drawing. It has to + ///> be already created. The tool deletes the object if it is not added to a BOARD. + ///> @return False if the tool was cancelled before the origin was set or origin and end are + ///> the same point. + bool drawSegment( int aShape, DRAWSEGMENT* aGraphic ); + + ///> Starts drawing an arc. + ///> @param aGraphic is an object that is going to be used by the tool for drawing. It has to + ///> be already created. The tool deletes the object if it is not added to a BOARD. + ///> @return False if the tool was cancelled before the origin was set or origin and end are + ///> the same point. + bool drawArc( DRAWSEGMENT* aGraphic ); ///> Draws a polygon, that is added as a zone or a keepout area. ///> @param aKeepout decides if the drawn polygon is a zone or a keepout area. From d085ace884214ebbfd6bb98b6e5044245f2b0315 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 14:01:06 +0200 Subject: [PATCH 614/741] Created a header file for DialogEditModuleText class. --- pcbnew/dialogs/dialog_edit_module_text.cpp | 24 +--------- pcbnew/dialogs/dialog_edit_module_text.h | 53 ++++++++++++++++++++++ 2 files changed, 54 insertions(+), 23 deletions(-) create mode 100644 pcbnew/dialogs/dialog_edit_module_text.h diff --git a/pcbnew/dialogs/dialog_edit_module_text.cpp b/pcbnew/dialogs/dialog_edit_module_text.cpp index 928ca8541c..05ec826763 100644 --- a/pcbnew/dialogs/dialog_edit_module_text.cpp +++ b/pcbnew/dialogs/dialog_edit_module_text.cpp @@ -44,34 +44,12 @@ #include #include -#include +#include extern wxPoint MoveVector; // Move vector for move edge, imported from edtxtmod.cpp -/*************** **************/ -/* class DialogEditModuleText */ -/*************** **************/ -class DialogEditModuleText : public DialogEditModuleText_base -{ -private: - PCB_BASE_FRAME* m_parent; - wxDC* m_dc; - MODULE* m_module; - TEXTE_MODULE* m_currentText; - -public: - DialogEditModuleText( PCB_BASE_FRAME* aParent, TEXTE_MODULE* aTextMod, wxDC* aDC ); - ~DialogEditModuleText() {}; - -private: - void initDlg( ); - void OnOkClick( wxCommandEvent& event ); - void OnCancelClick( wxCommandEvent& event ); -}; - - void PCB_BASE_FRAME::InstallTextModOptionsFrame( TEXTE_MODULE* TextMod, wxDC* DC ) { m_canvas->SetIgnoreMouseEvents( true ); diff --git a/pcbnew/dialogs/dialog_edit_module_text.h b/pcbnew/dialogs/dialog_edit_module_text.h new file mode 100644 index 0000000000..674481b891 --- /dev/null +++ b/pcbnew/dialogs/dialog_edit_module_text.h @@ -0,0 +1,53 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 Jean-Pierre Charras + * Copyright (C) 2013 Dick Hollenbeck, dick@softplc.com + * Copyright (C) 2008-2013 Wayne Stambaugh + * 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 + * 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 DIALOG_EDIT_MODULE_TEXT_H +#define DIALOG_EDIT_MODULE_TEXT_H + +#include + +/*************** **************/ +/* class DialogEditModuleText */ +/*************** **************/ +class DialogEditModuleText : public DialogEditModuleText_base +{ +private: + PCB_BASE_FRAME* m_parent; + wxDC* m_dc; + MODULE* m_module; + TEXTE_MODULE* m_currentText; + +public: + DialogEditModuleText( PCB_BASE_FRAME* aParent, TEXTE_MODULE* aTextMod, wxDC* aDC ); + ~DialogEditModuleText() {}; + +private: + void initDlg( ); + void OnOkClick( wxCommandEvent& event ); + void OnCancelClick( wxCommandEvent& event ); +}; + +#endif /* DIALOG_EDIT_MODULE_TEXT_H */ From fc44f34adebae4748890845797fa1ad1ba905f16 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 14:01:06 +0200 Subject: [PATCH 615/741] Fixed DRAWING_TOOL::PlaceTextModule() method. --- pcbnew/tools/drawing_tool.cpp | 59 +++++++++++++++++++++-------------- pcbnew/tools/drawing_tool.h | 4 +-- 2 files changed, 38 insertions(+), 25 deletions(-) diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index 71a8b2501f..3fe19576b9 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -64,7 +65,7 @@ void DRAWING_TOOL::Reset( RESET_REASON aReason ) m_view = getView(); m_controls = getViewControls(); m_board = getModel(); - m_frame = getEditFrame(); + m_frame = getEditFrame(); setTransitions(); } @@ -126,7 +127,9 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) int DRAWING_TOOL::PlaceTextModule( TOOL_EVENT& aEvent ) { - TEXTE_MODULE* text = NULL; + TEXTE_MODULE* text = new TEXTE_MODULE( NULL ); + const BOARD_DESIGN_SETTINGS& dsnSettings = m_frame->GetDesignSettings(); + MODULE* module = m_frame->GetBoard()->m_Modules; // Add a VIEW_GROUP that serves as a preview for the new item KIGFX::VIEW_GROUP preview( m_view ); @@ -139,6 +142,7 @@ int DRAWING_TOOL::PlaceTextModule( TOOL_EVENT& aEvent ) Activate(); m_frame->SetToolID( ID_PCB_ADD_TEXT_BUTT, wxCURSOR_PENCIL, _( "Add text" ) ); + bool placing = false; // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) @@ -147,28 +151,26 @@ int DRAWING_TOOL::PlaceTextModule( TOOL_EVENT& aEvent ) if( evt->IsCancel() || evt->IsActivate() ) { - if( text ) - { - // Delete the old text and have another try - m_board->Delete( text ); // it was already added by CreateTextPcb() - text = NULL; + preview.Clear(); + preview.ViewUpdate(); + m_controls->ShowCursor( true ); - preview.Clear(); - preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - m_controls->ShowCursor( true ); + if( !placing || evt->IsActivate() ) + { + delete text; + break; } else - break; - - if( evt->IsActivate() ) // now finish unconditionally - break; + { + placing = false; // start from the beginning + } } else if( text && evt->Category() == TC_COMMAND ) { if( evt->IsAction( &COMMON_ACTIONS::rotate ) ) { - text->Rotate( text->GetPosition(), 900.0 /*m_frame->GetRotationAngle()*/ ); // FIXME + text->Rotate( text->GetPosition(), m_frame->GetRotationAngle() ); preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); } else if( evt->IsAction( &COMMON_ACTIONS::flip ) ) @@ -180,15 +182,21 @@ int DRAWING_TOOL::PlaceTextModule( TOOL_EVENT& aEvent ) else if( evt->IsClick( BUT_LEFT ) ) { - if( !text ) + if( !placing ) { - // Init the new item attributes - text = m_frame->CreateTextModule( m_frame->GetBoard()->m_Modules, NULL ); + text->SetSize( dsnSettings.m_ModuleTextSize ); + text->SetThickness( dsnSettings.m_ModuleTextWidth ); + text->SetTextPosition( wxPoint( cursorPos.x, cursorPos.y ) ); - if( text == NULL ) + DialogEditModuleText textDialog( m_frame, text, NULL ); + placing = textDialog.ShowModal() && ( text->GetText().Length() > 0 ); + + if( !placing ) continue; m_controls->ShowCursor( false ); + text->SetParent( module ); // it has to set after the settings dialog + // otherwise the dialog stores it in undo buffer preview.Add( text ); } else @@ -196,18 +204,23 @@ int DRAWING_TOOL::PlaceTextModule( TOOL_EVENT& aEvent ) assert( text->GetText().Length() > 0 ); assert( text->GetSize().x > 0 && text->GetSize().y > 0 ); + text->SetLocalCoord(); text->ClearFlags(); + + // Module has to be saved before any modification is made + m_frame->SaveCopyInUndoList( m_frame->GetBoard()->m_Modules, UR_MODEDIT ); + module->GraphicalItems().PushFront( text ); + m_view->Add( text ); - // m_board->Add( text ); // it is already added by CreateTextePcb() text->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); m_frame->OnModify(); - m_frame->SaveCopyInUndoList( text, UR_NEW ); preview.Remove( text ); m_controls->ShowCursor( true ); - text = NULL; + text = new TEXTE_MODULE( NULL ); + placing = false; } } @@ -276,7 +289,7 @@ int DRAWING_TOOL::PlaceTextPcb( TOOL_EVENT& aEvent ) { if( evt->IsAction( &COMMON_ACTIONS::rotate ) ) { - text->Rotate( text->GetPosition(), /*m_frame->GetRotationAngle()*/ 900.0 ); // FIXME + text->Rotate( text->GetPosition(), m_frame->GetRotationAngle() ); preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); } else if( evt->IsAction( &COMMON_ACTIONS::flip ) ) diff --git a/pcbnew/tools/drawing_tool.h b/pcbnew/tools/drawing_tool.h index 57e865bfd7..1a38edbd62 100644 --- a/pcbnew/tools/drawing_tool.h +++ b/pcbnew/tools/drawing_tool.h @@ -33,7 +33,7 @@ namespace KIGFX class VIEW_CONTROLS; } class BOARD; -class PCB_BASE_FRAME; +class PCB_EDIT_FRAME; class DRAWSEGMENT; /** @@ -160,7 +160,7 @@ private: KIGFX::VIEW* m_view; KIGFX::VIEW_CONTROLS* m_controls; BOARD* m_board; - PCB_BASE_FRAME* m_frame; + PCB_EDIT_FRAME* m_frame; // How does line width change after one -/+ key press. static const int WIDTH_STEP = 100000; From ba320ac7c3b2a598409b2fec7463e1b6f3d948bc Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 14:01:06 +0200 Subject: [PATCH 616/741] Added "edit modules" mode for DRAWING_TOOL. --- pcbnew/tools/common_actions.cpp | 10 +- pcbnew/tools/common_actions.h | 3 +- pcbnew/tools/drawing_tool.cpp | 478 ++++++++++++++++---------------- pcbnew/tools/drawing_tool.h | 41 ++- 4 files changed, 277 insertions(+), 255 deletions(-) diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 343f1813f3..71c5b928f3 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -73,11 +73,7 @@ TOOL_ACTION COMMON_ACTIONS::drawArc( "pcbnew.InteractiveDrawing.arc", AS_GLOBAL, 0, "Draw an arc", "Draw an arc", AF_ACTIVATE ); -TOOL_ACTION COMMON_ACTIONS::placeTextModule( "pcbnew.InteractiveDrawing.textPcb", - AS_GLOBAL, 0, - "Add a text", "Add a text", AF_ACTIVATE ); - -TOOL_ACTION COMMON_ACTIONS::placeTextPcb( "pcbnew.InteractiveDrawing.textModule", +TOOL_ACTION COMMON_ACTIONS::placeText( "pcbnew.InteractiveDrawing.text", AS_GLOBAL, 0, "Add a text", "Add a text", AF_ACTIVATE ); @@ -299,10 +295,8 @@ boost::optional COMMON_ACTIONS::TranslateLegacyId( int aId ) return COMMON_ACTIONS::drawArc.MakeEvent(); case ID_PCB_ADD_TEXT_BUTT: - return COMMON_ACTIONS::placeTextPcb.MakeEvent(); - case ID_MODEDIT_TEXT_TOOL: - return COMMON_ACTIONS::placeTextModule.MakeEvent(); + return COMMON_ACTIONS::placeText.MakeEvent(); case ID_PCB_DIMENSION_BUTT: return COMMON_ACTIONS::drawDimension.MakeEvent(); diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index 9eec3ce112..0cd45e56c2 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -73,8 +73,7 @@ public: static TOOL_ACTION drawArc; /// Activation of the drawing tool (text) - static TOOL_ACTION placeTextPcb; - static TOOL_ACTION placeTextModule; + static TOOL_ACTION placeText; /// Activation of the drawing tool (dimension) static TOOL_ACTION drawDimension; diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index 3fe19576b9..e2fde67446 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -49,7 +49,7 @@ #include DRAWING_TOOL::DRAWING_TOOL() : - TOOL_INTERACTIVE( "pcbnew.InteractiveDrawing" ) + TOOL_INTERACTIVE( "pcbnew.InteractiveDrawing" ), m_editModules( false ) { } @@ -125,231 +125,12 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) } -int DRAWING_TOOL::PlaceTextModule( TOOL_EVENT& aEvent ) +int DRAWING_TOOL::PlaceText( TOOL_EVENT& aEvent ) { - TEXTE_MODULE* text = new TEXTE_MODULE( NULL ); - const BOARD_DESIGN_SETTINGS& dsnSettings = m_frame->GetDesignSettings(); - MODULE* module = m_frame->GetBoard()->m_Modules; - - // Add a VIEW_GROUP that serves as a preview for the new item - KIGFX::VIEW_GROUP preview( m_view ); - m_view->Add( &preview ); - - m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); - m_controls->ShowCursor( true ); - m_controls->SetSnapping( true ); - m_controls->SetAutoPan( true ); - - Activate(); - m_frame->SetToolID( ID_PCB_ADD_TEXT_BUTT, wxCURSOR_PENCIL, _( "Add text" ) ); - bool placing = false; - - // Main loop: keep receiving events - while( OPT_TOOL_EVENT evt = Wait() ) - { - VECTOR2I cursorPos = m_controls->GetCursorPosition(); - - if( evt->IsCancel() || evt->IsActivate() ) - { - preview.Clear(); - preview.ViewUpdate(); - m_controls->ShowCursor( true ); - - if( !placing || evt->IsActivate() ) - { - delete text; - break; - } - else - { - placing = false; // start from the beginning - } - } - - else if( text && evt->Category() == TC_COMMAND ) - { - if( evt->IsAction( &COMMON_ACTIONS::rotate ) ) - { - text->Rotate( text->GetPosition(), m_frame->GetRotationAngle() ); - preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - } - else if( evt->IsAction( &COMMON_ACTIONS::flip ) ) - { - text->Flip( text->GetPosition() ); - preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - } - } - - else if( evt->IsClick( BUT_LEFT ) ) - { - if( !placing ) - { - text->SetSize( dsnSettings.m_ModuleTextSize ); - text->SetThickness( dsnSettings.m_ModuleTextWidth ); - text->SetTextPosition( wxPoint( cursorPos.x, cursorPos.y ) ); - - DialogEditModuleText textDialog( m_frame, text, NULL ); - placing = textDialog.ShowModal() && ( text->GetText().Length() > 0 ); - - if( !placing ) - continue; - - m_controls->ShowCursor( false ); - text->SetParent( module ); // it has to set after the settings dialog - // otherwise the dialog stores it in undo buffer - preview.Add( text ); - } - else - { - assert( text->GetText().Length() > 0 ); - assert( text->GetSize().x > 0 && text->GetSize().y > 0 ); - - text->SetLocalCoord(); - text->ClearFlags(); - - // Module has to be saved before any modification is made - m_frame->SaveCopyInUndoList( m_frame->GetBoard()->m_Modules, UR_MODEDIT ); - module->GraphicalItems().PushFront( text ); - - m_view->Add( text ); - text->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - - m_frame->OnModify(); - - preview.Remove( text ); - m_controls->ShowCursor( true ); - - text = new TEXTE_MODULE( NULL ); - placing = false; - } - } - - else if( text && evt->IsMotion() ) - { - text->SetTextPosition( wxPoint( cursorPos.x, cursorPos.y ) ); - - // Show a preview of the item - preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - } - } - - m_controls->ShowCursor( false ); - m_controls->SetSnapping( false ); - m_controls->SetAutoPan( false ); - m_view->Remove( &preview ); - - setTransitions(); - m_frame->SetToolID( ID_NO_TOOL_SELECTED, wxCURSOR_DEFAULT, wxEmptyString ); - - return 0; -} - - -int DRAWING_TOOL::PlaceTextPcb( TOOL_EVENT& aEvent ) -{ - TEXTE_PCB* text = NULL; - - // Add a VIEW_GROUP that serves as a preview for the new item - KIGFX::VIEW_GROUP preview( m_view ); - m_view->Add( &preview ); - - m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); - m_controls->ShowCursor( true ); - m_controls->SetSnapping( true ); - m_controls->SetAutoPan( true ); - - Activate(); - m_frame->SetToolID( ID_PCB_ADD_TEXT_BUTT, wxCURSOR_PENCIL, _( "Add text" ) ); - - // Main loop: keep receiving events - while( OPT_TOOL_EVENT evt = Wait() ) - { - VECTOR2I cursorPos = m_controls->GetCursorPosition(); - - if( evt->IsCancel() || evt->IsActivate() ) - { - if( text ) - { - // Delete the old text and have another try - m_board->Delete( text ); // it was already added by CreateTextPcb() - text = NULL; - - preview.Clear(); - preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - m_controls->ShowCursor( true ); - } - else - break; - - if( evt->IsActivate() ) // now finish unconditionally - break; - } - - else if( text && evt->Category() == TC_COMMAND ) - { - if( evt->IsAction( &COMMON_ACTIONS::rotate ) ) - { - text->Rotate( text->GetPosition(), m_frame->GetRotationAngle() ); - preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - } - else if( evt->IsAction( &COMMON_ACTIONS::flip ) ) - { - text->Flip( text->GetPosition() ); - preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - } - } - - else if( evt->IsClick( BUT_LEFT ) ) - { - if( !text ) - { - // Init the new item attributes - text = static_cast( m_frame )->CreateTextePcb( NULL ); - - if( text == NULL ) - continue; - - m_controls->ShowCursor( false ); - preview.Add( text ); - } - else - { - assert( text->GetText().Length() > 0 ); - assert( text->GetSize().x > 0 && text->GetSize().y > 0 ); - - text->ClearFlags(); - m_view->Add( text ); - // m_board->Add( text ); // it is already added by CreateTextePcb() - text->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - - m_frame->OnModify(); - m_frame->SaveCopyInUndoList( text, UR_NEW ); - - preview.Remove( text ); - m_controls->ShowCursor( true ); - - text = NULL; - } - } - - else if( text && evt->IsMotion() ) - { - text->SetTextPosition( wxPoint( cursorPos.x, cursorPos.y ) ); - - // Show a preview of the item - preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - } - } - - m_controls->ShowCursor( false ); - m_controls->SetSnapping( false ); - m_controls->SetAutoPan( false ); - m_view->Remove( &preview ); - - setTransitions(); - m_frame->SetToolID( ID_NO_TOOL_SELECTED, wxCURSOR_DEFAULT, wxEmptyString ); - - return 0; + if( m_editModules ) + return placeTextModule(); + else + return placeTextPcb(); } @@ -1271,6 +1052,234 @@ int DRAWING_TOOL::drawZone( bool aKeepout ) } +int DRAWING_TOOL::placeTextModule() +{ + TEXTE_MODULE* text = new TEXTE_MODULE( NULL ); + const BOARD_DESIGN_SETTINGS& dsnSettings = m_frame->GetDesignSettings(); + MODULE* module = m_frame->GetBoard()->m_Modules; + + // Add a VIEW_GROUP that serves as a preview for the new item + KIGFX::VIEW_GROUP preview( m_view ); + m_view->Add( &preview ); + + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + m_controls->ShowCursor( true ); + m_controls->SetSnapping( true ); + m_controls->SetAutoPan( true ); + + Activate(); + m_frame->SetToolID( ID_PCB_ADD_TEXT_BUTT, wxCURSOR_PENCIL, _( "Add text" ) ); + bool placing = false; + + // Main loop: keep receiving events + while( OPT_TOOL_EVENT evt = Wait() ) + { + VECTOR2I cursorPos = m_controls->GetCursorPosition(); + + if( evt->IsCancel() || evt->IsActivate() ) + { + preview.Clear(); + preview.ViewUpdate(); + m_controls->ShowCursor( true ); + + if( !placing || evt->IsActivate() ) + { + delete text; + break; + } + else + { + placing = false; // start from the beginning + } + } + + else if( text && evt->Category() == TC_COMMAND ) + { + if( evt->IsAction( &COMMON_ACTIONS::rotate ) ) + { + text->Rotate( text->GetPosition(), m_frame->GetRotationAngle() ); + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + else if( evt->IsAction( &COMMON_ACTIONS::flip ) ) + { + text->Flip( text->GetPosition() ); + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + } + + else if( evt->IsClick( BUT_LEFT ) ) + { + if( !placing ) + { + text->SetSize( dsnSettings.m_ModuleTextSize ); + text->SetThickness( dsnSettings.m_ModuleTextWidth ); + text->SetTextPosition( wxPoint( cursorPos.x, cursorPos.y ) ); + + DialogEditModuleText textDialog( m_frame, text, NULL ); + placing = textDialog.ShowModal() && ( text->GetText().Length() > 0 ); + + if( !placing ) + continue; + + m_controls->ShowCursor( false ); + text->SetParent( module ); // it has to set after the settings dialog + // otherwise the dialog stores it in undo buffer + preview.Add( text ); + } + else + { + assert( text->GetText().Length() > 0 ); + assert( text->GetSize().x > 0 && text->GetSize().y > 0 ); + + text->SetLocalCoord(); + text->ClearFlags(); + + // Module has to be saved before any modification is made + m_frame->SaveCopyInUndoList( m_frame->GetBoard()->m_Modules, UR_MODEDIT ); + module->GraphicalItems().PushFront( text ); + + m_view->Add( text ); + text->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + + m_frame->OnModify(); + + preview.Remove( text ); + m_controls->ShowCursor( true ); + + text = new TEXTE_MODULE( NULL ); + placing = false; + } + } + + else if( text && evt->IsMotion() ) + { + text->SetTextPosition( wxPoint( cursorPos.x, cursorPos.y ) ); + + // Show a preview of the item + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + } + + m_controls->ShowCursor( false ); + m_controls->SetSnapping( false ); + m_controls->SetAutoPan( false ); + m_view->Remove( &preview ); + + setTransitions(); + m_frame->SetToolID( ID_NO_TOOL_SELECTED, wxCURSOR_DEFAULT, wxEmptyString ); + + return 0; +} + + +int DRAWING_TOOL::placeTextPcb() +{ + TEXTE_PCB* text = NULL; + + // Add a VIEW_GROUP that serves as a preview for the new item + KIGFX::VIEW_GROUP preview( m_view ); + m_view->Add( &preview ); + + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + m_controls->ShowCursor( true ); + m_controls->SetSnapping( true ); + m_controls->SetAutoPan( true ); + + Activate(); + m_frame->SetToolID( ID_PCB_ADD_TEXT_BUTT, wxCURSOR_PENCIL, _( "Add text" ) ); + + // Main loop: keep receiving events + while( OPT_TOOL_EVENT evt = Wait() ) + { + VECTOR2I cursorPos = m_controls->GetCursorPosition(); + + if( evt->IsCancel() || evt->IsActivate() ) + { + if( text ) + { + // Delete the old text and have another try + m_board->Delete( text ); // it was already added by CreateTextPcb() + text = NULL; + + preview.Clear(); + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + m_controls->ShowCursor( true ); + } + else + break; + + if( evt->IsActivate() ) // now finish unconditionally + break; + } + + else if( text && evt->Category() == TC_COMMAND ) + { + if( evt->IsAction( &COMMON_ACTIONS::rotate ) ) + { + text->Rotate( text->GetPosition(), m_frame->GetRotationAngle() ); + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + else if( evt->IsAction( &COMMON_ACTIONS::flip ) ) + { + text->Flip( text->GetPosition() ); + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + } + + else if( evt->IsClick( BUT_LEFT ) ) + { + if( !text ) + { + // Init the new item attributes + text = static_cast( m_frame )->CreateTextePcb( NULL ); + + if( text == NULL ) + continue; + + m_controls->ShowCursor( false ); + preview.Add( text ); + } + else + { + assert( text->GetText().Length() > 0 ); + assert( text->GetSize().x > 0 && text->GetSize().y > 0 ); + + text->ClearFlags(); + m_view->Add( text ); + // m_board->Add( text ); // it is already added by CreateTextePcb() + text->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + + m_frame->OnModify(); + m_frame->SaveCopyInUndoList( text, UR_NEW ); + + preview.Remove( text ); + m_controls->ShowCursor( true ); + + text = NULL; + } + } + + else if( text && evt->IsMotion() ) + { + text->SetTextPosition( wxPoint( cursorPos.x, cursorPos.y ) ); + + // Show a preview of the item + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + } + + m_controls->ShowCursor( false ); + m_controls->SetSnapping( false ); + m_controls->SetAutoPan( false ); + m_view->Remove( &preview ); + + setTransitions(); + m_frame->SetToolID( ID_NO_TOOL_SELECTED, wxCURSOR_DEFAULT, wxEmptyString ); + + return 0; +} + + void DRAWING_TOOL::make45DegLine( DRAWSEGMENT* aSegment, DRAWSEGMENT* aHelper ) const { VECTOR2I cursorPos = m_controls->GetCursorPosition(); @@ -1295,14 +1304,13 @@ void DRAWING_TOOL::make45DegLine( DRAWSEGMENT* aSegment, DRAWSEGMENT* aHelper ) void DRAWING_TOOL::setTransitions() { - Go( &DRAWING_TOOL::DrawLine, COMMON_ACTIONS::drawLine.MakeEvent() ); - Go( &DRAWING_TOOL::DrawCircle, COMMON_ACTIONS::drawCircle.MakeEvent() ); - Go( &DRAWING_TOOL::DrawArc, COMMON_ACTIONS::drawArc.MakeEvent() ); - Go( &DRAWING_TOOL::DrawDimension, COMMON_ACTIONS::drawDimension.MakeEvent() ); - Go( &DRAWING_TOOL::DrawZone, COMMON_ACTIONS::drawZone.MakeEvent() ); - Go( &DRAWING_TOOL::DrawKeepout, COMMON_ACTIONS::drawKeepout.MakeEvent() ); - Go( &DRAWING_TOOL::PlaceTextPcb, COMMON_ACTIONS::placeTextPcb.MakeEvent() ); - Go( &DRAWING_TOOL::PlaceTextModule, COMMON_ACTIONS::placeTextModule.MakeEvent() ); - Go( &DRAWING_TOOL::PlaceTarget, COMMON_ACTIONS::placeTarget.MakeEvent() ); - Go( &DRAWING_TOOL::PlaceModule, COMMON_ACTIONS::placeModule.MakeEvent() ); + Go( &DRAWING_TOOL::DrawLine, COMMON_ACTIONS::drawLine.MakeEvent() ); + Go( &DRAWING_TOOL::DrawCircle, COMMON_ACTIONS::drawCircle.MakeEvent() ); + Go( &DRAWING_TOOL::DrawArc, COMMON_ACTIONS::drawArc.MakeEvent() ); + Go( &DRAWING_TOOL::DrawDimension, COMMON_ACTIONS::drawDimension.MakeEvent() ); + Go( &DRAWING_TOOL::DrawZone, COMMON_ACTIONS::drawZone.MakeEvent() ); + Go( &DRAWING_TOOL::DrawKeepout, COMMON_ACTIONS::drawKeepout.MakeEvent() ); + Go( &DRAWING_TOOL::PlaceText, COMMON_ACTIONS::placeText.MakeEvent() ); + Go( &DRAWING_TOOL::PlaceTarget, COMMON_ACTIONS::placeTarget.MakeEvent() ); + Go( &DRAWING_TOOL::PlaceModule, COMMON_ACTIONS::placeModule.MakeEvent() ); } diff --git a/pcbnew/tools/drawing_tool.h b/pcbnew/tools/drawing_tool.h index 1a38edbd62..1137bf2c4c 100644 --- a/pcbnew/tools/drawing_tool.h +++ b/pcbnew/tools/drawing_tool.h @@ -76,18 +76,11 @@ public: int DrawArc( TOOL_EVENT& aEvent ); /** - * Function PlaceTextModule() + * Function PlaceText() * Displays a dialog that allows to input text and its settings and then lets the user decide - * where to place the text in module editor. + * where to place the text in editor. */ - int PlaceTextModule( TOOL_EVENT& aEvent ); - - /** - * Function PlaceTextPcb() - * Displays a dialog that allows to input text and its settings and then lets the user decide - * where to place the text in board editor. - */ - int PlaceTextPcb( TOOL_EVENT& aEvent ); + int PlaceText( TOOL_EVENT& aEvent ); /** * Function DrawDimension() @@ -127,6 +120,17 @@ public: */ int PlaceModule( TOOL_EVENT& aEvent ); + /** + * Function EditModules() + * Toggles edit module mode. When enabled, one may select parts of modules individually + * (graphics, pads, etc.), so they can be modified. + * @param aEnabled decides if the mode should be enabled. + */ + void EditModules( bool aEnabled ) + { + m_editModules = aEnabled; + } + private: ///> Starts drawing a selected shape (i.e. DRAWSEGMENT). ///> @param aShape is the type of created shape (@see STROKE_T). @@ -147,6 +151,20 @@ private: ///> @param aKeepout decides if the drawn polygon is a zone or a keepout area. int drawZone( bool aKeepout ); + /** + * Function placeTextModule() + * Displays a dialog that allows to input text and its settings and then lets the user decide + * where to place the text in module . + */ + int placeTextModule(); + + /** + * Function placeTextPcb() + * Displays a dialog that allows to input text and its settings and then lets the user decide + * where to place the text in board editor. + */ + int placeTextPcb(); + ///> Forces a DRAWSEGMENT to be drawn at multiple of 45 degrees. The origin ///> stays the same, the end of the aSegment is modified according to the ///> current cursor position. @@ -162,6 +180,9 @@ private: BOARD* m_board; PCB_EDIT_FRAME* m_frame; + /// Edit module mode flag + bool m_editModules; + // How does line width change after one -/+ key press. static const int WIDTH_STEP = 100000; }; From 99043b777dcaecc96cb69d63a2ac262f3f250b52 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 14:01:06 +0200 Subject: [PATCH 617/741] Adapted graphics tools to cooperate with module editor. --- pcbnew/moduleframe.cpp | 3 +- pcbnew/tools/common_actions.cpp | 7 ++ pcbnew/tools/drawing_tool.cpp | 121 +++++++++++++++++++++++++------- 3 files changed, 103 insertions(+), 28 deletions(-) diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index 451f5a9130..ed9ff6165e 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -271,11 +271,12 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : drawPanel->SetEventDispatcher( m_toolDispatcher ); m_toolManager->RegisterTool( new SELECTION_TOOL ); - m_toolManager->GetTool()->EditModules( true ); m_toolManager->RegisterTool( new EDIT_TOOL ); m_toolManager->RegisterTool( new DRAWING_TOOL ); m_toolManager->RegisterTool( new POINT_EDITOR ); m_toolManager->RegisterTool( new PCBNEW_CONTROL ); + m_toolManager->GetTool()->EditModules( true ); + m_toolManager->GetTool()->EditModules( true ); m_toolManager->ResetTools( TOOL_BASE::RUN ); // Run the selection tool, it is supposed to be always active diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 71c5b928f3..57edb54dc6 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -286,12 +286,15 @@ boost::optional COMMON_ACTIONS::TranslateLegacyId( int aId ) return COMMON_ACTIONS::drawKeepout.MakeEvent(); case ID_PCB_ADD_LINE_BUTT: + case ID_MODEDIT_LINE_TOOL: return COMMON_ACTIONS::drawLine.MakeEvent(); case ID_PCB_CIRCLE_BUTT: + case ID_MODEDIT_CIRCLE_TOOL: return COMMON_ACTIONS::drawCircle.MakeEvent(); case ID_PCB_ARC_BUTT: + case ID_MODEDIT_ARC_TOOL: return COMMON_ACTIONS::drawArc.MakeEvent(); case ID_PCB_ADD_TEXT_BUTT: @@ -305,6 +308,7 @@ boost::optional COMMON_ACTIONS::TranslateLegacyId( int aId ) return COMMON_ACTIONS::placeTarget.MakeEvent(); case ID_PCB_PLACE_GRID_COORD_BUTT: + case ID_MODEDIT_PLACE_GRID_COORD: return COMMON_ACTIONS::gridSetOrigin.MakeEvent(); case ID_ZOOM_IN: // toolbar button "Zoom In" @@ -325,6 +329,9 @@ boost::optional COMMON_ACTIONS::TranslateLegacyId( int aId ) case ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR_MICROWAVE: case ID_MENU_PCB_SHOW_HIDE_MUWAVE_TOOLBAR: case ID_MICROWAVE_V_TOOLBAR: + case ID_MODEDIT_PAD_TOOL: + case ID_MODEDIT_DELETE_TOOL: + case ID_MODEDIT_ANCHOR_TOOL: return COMMON_ACTIONS::toBeDone.MakeEvent(); } diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index e2fde67446..37264569a5 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -41,7 +41,7 @@ #include #include -#include +#include #include #include #include @@ -73,13 +73,38 @@ void DRAWING_TOOL::Reset( RESET_REASON aReason ) int DRAWING_TOOL::DrawLine( TOOL_EVENT& aEvent ) { - m_frame->SetToolID( ID_PCB_ADD_LINE_BUTT, wxCURSOR_PENCIL, _( "Add graphic line" ) ); - - DRAWSEGMENT* line = new DRAWSEGMENT; - - while( drawSegment( S_SEGMENT, line ) ) + if( m_editModules ) { - line = new DRAWSEGMENT; + m_frame->SetToolID( ID_MODEDIT_LINE_TOOL, wxCURSOR_PENCIL, _( "Add graphic line" ) ); + + MODULE* module = m_frame->GetBoard()->m_Modules; + EDGE_MODULE* line = new EDGE_MODULE( module ); + + while( drawSegment( S_SEGMENT, line ) ) + { + m_frame->OnModify(); + m_frame->SaveCopyInUndoList( module, UR_MODEDIT ); + line->SetLocalCoord(); + line->SetParent( module ); + module->GraphicalItems().PushFront( line ); + + line = new EDGE_MODULE( module ); + } + } + else + { + m_frame->SetToolID( ID_PCB_ADD_LINE_BUTT, wxCURSOR_PENCIL, _( "Add graphic line" ) ); + + DRAWSEGMENT* line = new DRAWSEGMENT; + + while( drawSegment( S_SEGMENT, line ) ) + { + m_board->Add( line ); + m_frame->OnModify(); + m_frame->SaveCopyInUndoList( line, UR_NEW ); + + line = new DRAWSEGMENT; + } } setTransitions(); @@ -91,13 +116,38 @@ int DRAWING_TOOL::DrawLine( TOOL_EVENT& aEvent ) int DRAWING_TOOL::DrawCircle( TOOL_EVENT& aEvent ) { - m_frame->SetToolID( ID_PCB_CIRCLE_BUTT, wxCURSOR_PENCIL, _( "Add graphic circle" ) ); - - DRAWSEGMENT* circle = new DRAWSEGMENT; - - while( drawSegment( S_CIRCLE, circle ) ) + if( m_editModules ) { - circle = new DRAWSEGMENT; + m_frame->SetToolID( ID_MODEDIT_CIRCLE_TOOL, wxCURSOR_PENCIL, _( "Add graphic circle" ) ); + + MODULE* module = m_frame->GetBoard()->m_Modules; + EDGE_MODULE* circle = new EDGE_MODULE( module ); + + while( drawSegment( S_CIRCLE, circle ) ) + { + m_frame->OnModify(); + m_frame->SaveCopyInUndoList( module, UR_MODEDIT ); + circle->SetLocalCoord(); + circle->SetParent( module ); + module->GraphicalItems().PushFront( circle ); + + circle = new EDGE_MODULE( module ); + } + } + else + { + m_frame->SetToolID( ID_PCB_CIRCLE_BUTT, wxCURSOR_PENCIL, _( "Add graphic circle" ) ); + + DRAWSEGMENT* circle = new DRAWSEGMENT; + + while( drawSegment( S_CIRCLE, circle ) ) + { + m_board->Add( circle ); + m_frame->OnModify(); + m_frame->SaveCopyInUndoList( circle, UR_NEW ); + + circle = new DRAWSEGMENT; + } } setTransitions(); @@ -109,13 +159,38 @@ int DRAWING_TOOL::DrawCircle( TOOL_EVENT& aEvent ) int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) { - m_frame->SetToolID( ID_PCB_ARC_BUTT, wxCURSOR_PENCIL, _( "Add graphic arc" ) ); - - DRAWSEGMENT* arc = new DRAWSEGMENT; - - while( drawArc( arc ) ) + if( m_editModules ) { - arc = new DRAWSEGMENT; + m_frame->SetToolID( ID_MODEDIT_ARC_TOOL, wxCURSOR_PENCIL, _( "Add graphic arc" ) ); + + MODULE* module = m_frame->GetBoard()->m_Modules; + EDGE_MODULE* arc = new EDGE_MODULE( module ); + + while( drawArc( arc ) ) + { + m_frame->OnModify(); + m_frame->SaveCopyInUndoList( module, UR_MODEDIT ); + arc->SetLocalCoord(); + arc->SetParent( module ); + module->GraphicalItems().PushFront( arc ); + + arc = new EDGE_MODULE( module ); + } + } + else + { + m_frame->SetToolID( ID_PCB_ARC_BUTT, wxCURSOR_PENCIL, _( "Add graphic arc" ) ); + + DRAWSEGMENT* arc = new DRAWSEGMENT; + + while( drawArc( arc ) ) + { + m_board->Add( arc ); + m_frame->OnModify(); + m_frame->SaveCopyInUndoList( arc, UR_NEW ); + + arc = new DRAWSEGMENT; + } } setTransitions(); @@ -624,11 +699,7 @@ bool DRAWING_TOOL::drawSegment( int aShape, DRAWSEGMENT* aGraphic ) assert( aGraphic->GetWidth() > 0 ); m_view->Add( aGraphic ); - m_board->Add( aGraphic ); aGraphic->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - - m_frame->OnModify(); - m_frame->SaveCopyInUndoList( aGraphic, UR_NEW ); } else // User has clicked twice in the same spot { // a clear sign that the current drawing is finished @@ -785,12 +856,8 @@ bool DRAWING_TOOL::drawArc( DRAWSEGMENT* aGraphic ) assert( aGraphic->GetWidth() > 0 ); m_view->Add( aGraphic ); - m_board->Add( aGraphic ); aGraphic->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - m_frame->OnModify(); - m_frame->SaveCopyInUndoList( aGraphic, UR_NEW ); - preview.Remove( aGraphic ); preview.Remove( &helperLine ); } From ad000aefa49300b0ab0481b5be7ff658732d2048 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 14:01:06 +0200 Subject: [PATCH 618/741] Fixed the legacy module editor. --- pcbnew/basepcbframe.cpp | 2 +- pcbnew/moduleframe.cpp | 26 ++++++++++++++------------ 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index fadf3e1774..3ff1a97f51 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -125,7 +125,7 @@ PCB_BASE_FRAME::~PCB_BASE_FRAME() { delete m_Collector; - delete m_Pcb; // is already NULL for FOOTPRINT_EDIT_FRAME + delete m_Pcb; delete GetGalCanvas(); } diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index ed9ff6165e..2fa40ac774 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -268,21 +268,23 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : m_toolManager->SetEnvironment( GetBoard(), drawPanel->GetView(), drawPanel->GetViewControls(), this ); m_toolDispatcher = new TOOL_DISPATCHER( m_toolManager ); - drawPanel->SetEventDispatcher( m_toolDispatcher ); - m_toolManager->RegisterTool( new SELECTION_TOOL ); - m_toolManager->RegisterTool( new EDIT_TOOL ); - m_toolManager->RegisterTool( new DRAWING_TOOL ); - m_toolManager->RegisterTool( new POINT_EDITOR ); - m_toolManager->RegisterTool( new PCBNEW_CONTROL ); - m_toolManager->GetTool()->EditModules( true ); - m_toolManager->GetTool()->EditModules( true ); - m_toolManager->ResetTools( TOOL_BASE::RUN ); + if( drawFrame->IsGalCanvasActive() ) + { + drawPanel->SetEventDispatcher( m_toolDispatcher ); - // Run the selection tool, it is supposed to be always active - m_toolManager->InvokeTool( "pcbnew.InteractiveSelection" ); + m_toolManager->RegisterTool( new SELECTION_TOOL ); + m_toolManager->RegisterTool( new EDIT_TOOL ); + m_toolManager->RegisterTool( new DRAWING_TOOL ); + m_toolManager->RegisterTool( new POINT_EDITOR ); + m_toolManager->RegisterTool( new PCBNEW_CONTROL ); + m_toolManager->GetTool()->EditModules( true ); + m_toolManager->GetTool()->EditModules( true ); + m_toolManager->ResetTools( TOOL_BASE::RUN ); + m_toolManager->InvokeTool( "pcbnew.InteractiveSelection" ); - UseGalCanvas( drawFrame->IsGalCanvasActive() ); + UseGalCanvas( true ); + } m_Layers->ReFill(); m_Layers->ReFillRender(); From 67136d21b10f5ae93669eee76800142a1134474d Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 14:01:06 +0200 Subject: [PATCH 619/741] MInor fixes. --- pcbnew/class_pad.cpp | 3 +-- pcbnew/tools/drawing_tool.cpp | 12 ++++++------ pcbnew/tools/drawing_tool.h | 14 ++++++++------ 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index ef2be10951..bd20fd83af 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -255,8 +255,7 @@ void D_PAD::SetLocalCoord() } m_Pos0 = m_Pos - module->GetPosition(); - double angle = module->GetOrientation(); - RotatePoint( &m_Pos0.x, &m_Pos0.y, -angle ); + RotatePoint( &m_Pos0.x, &m_Pos0.y, -module->GetOrientation() ); } diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index 37264569a5..e46ce6db27 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -77,7 +77,7 @@ int DRAWING_TOOL::DrawLine( TOOL_EVENT& aEvent ) { m_frame->SetToolID( ID_MODEDIT_LINE_TOOL, wxCURSOR_PENCIL, _( "Add graphic line" ) ); - MODULE* module = m_frame->GetBoard()->m_Modules; + MODULE* module = m_board->m_Modules; EDGE_MODULE* line = new EDGE_MODULE( module ); while( drawSegment( S_SEGMENT, line ) ) @@ -120,7 +120,7 @@ int DRAWING_TOOL::DrawCircle( TOOL_EVENT& aEvent ) { m_frame->SetToolID( ID_MODEDIT_CIRCLE_TOOL, wxCURSOR_PENCIL, _( "Add graphic circle" ) ); - MODULE* module = m_frame->GetBoard()->m_Modules; + MODULE* module = m_board->m_Modules; EDGE_MODULE* circle = new EDGE_MODULE( module ); while( drawSegment( S_CIRCLE, circle ) ) @@ -163,7 +163,7 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) { m_frame->SetToolID( ID_MODEDIT_ARC_TOOL, wxCURSOR_PENCIL, _( "Add graphic arc" ) ); - MODULE* module = m_frame->GetBoard()->m_Modules; + MODULE* module = m_board->m_Modules; EDGE_MODULE* arc = new EDGE_MODULE( module ); while( drawArc( arc ) ) @@ -527,7 +527,7 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent ) { if( evt->IsAction( &COMMON_ACTIONS::rotate ) ) { - module->Rotate( module->GetPosition(), /*m_frame->GetRotationAngle()*/ 900.0 ); + module->Rotate( module->GetPosition(), m_frame->GetRotationAngle() ); preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); } else if( evt->IsAction( &COMMON_ACTIONS::flip ) ) @@ -1123,7 +1123,7 @@ int DRAWING_TOOL::placeTextModule() { TEXTE_MODULE* text = new TEXTE_MODULE( NULL ); const BOARD_DESIGN_SETTINGS& dsnSettings = m_frame->GetDesignSettings(); - MODULE* module = m_frame->GetBoard()->m_Modules; + MODULE* module = m_board->m_Modules; // Add a VIEW_GROUP that serves as a preview for the new item KIGFX::VIEW_GROUP preview( m_view ); @@ -1202,7 +1202,7 @@ int DRAWING_TOOL::placeTextModule() text->ClearFlags(); // Module has to be saved before any modification is made - m_frame->SaveCopyInUndoList( m_frame->GetBoard()->m_Modules, UR_MODEDIT ); + m_frame->SaveCopyInUndoList( module, UR_MODEDIT ); module->GraphicalItems().PushFront( text ); m_view->Add( text ); diff --git a/pcbnew/tools/drawing_tool.h b/pcbnew/tools/drawing_tool.h index 1137bf2c4c..32c15a8401 100644 --- a/pcbnew/tools/drawing_tool.h +++ b/pcbnew/tools/drawing_tool.h @@ -116,7 +116,7 @@ public: /** * Function PlaceModule() - * Displays a dialog to selected a module to be added and then allows user to set its position. + * Displays a dialog to select a module to be added and allows the user to set its position. */ int PlaceModule( TOOL_EVENT& aEvent ); @@ -165,11 +165,13 @@ private: */ int placeTextPcb(); - ///> Forces a DRAWSEGMENT to be drawn at multiple of 45 degrees. The origin - ///> stays the same, the end of the aSegment is modified according to the - ///> current cursor position. - ///> @param aSegment is the segment that is currently drawn. - ///> @param aHelper is a helper line that shows the next possible segment. + /** + * Function make45DegLine() + * Forces a DRAWSEGMENT to be drawn at multiple of 45 degrees. The origin stays the same, + * the end of the aSegment is modified according to the current cursor position. + * @param aSegment is the segment that is currently drawn. + * @param aHelper is a helper line that shows the next possible segment. + */ void make45DegLine( DRAWSEGMENT* aSegment, DRAWSEGMENT* aHelper ) const; ///> Sets up handlers for various events. From 5dc1f9260802c3e72790c3ccc4ee5bd21f7075e9 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 14:01:06 +0200 Subject: [PATCH 620/741] Added pad placement tool for module editor (GAL). --- pcbnew/tools/common_actions.cpp | 7 +- pcbnew/tools/common_actions.h | 3 + pcbnew/tools/drawing_tool.cpp | 154 ++++++++++++++++++++++++++++++++ pcbnew/tools/drawing_tool.h | 12 +++ 4 files changed, 175 insertions(+), 1 deletion(-) diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 57edb54dc6..45305cc83e 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -97,6 +97,9 @@ TOOL_ACTION COMMON_ACTIONS::placeModule( "pcbnew.InteractiveDrawing.placeModule" AS_GLOBAL, 'O', "Add modules", "Add modules", AF_ACTIVATE ); +TOOL_ACTION COMMON_ACTIONS::placePad( "pcbnew.InteractiveDrawing.placePad", + AS_GLOBAL, 0, + "Add pads", "Add pads", AF_ACTIVATE ); // View Controls TOOL_ACTION COMMON_ACTIONS::zoomIn( "pcbnew.Control.zoomIn", @@ -307,6 +310,9 @@ boost::optional COMMON_ACTIONS::TranslateLegacyId( int aId ) case ID_PCB_MIRE_BUTT: return COMMON_ACTIONS::placeTarget.MakeEvent(); + case ID_MODEDIT_PAD_TOOL: + return COMMON_ACTIONS::placePad.MakeEvent(); + case ID_PCB_PLACE_GRID_COORD_BUTT: case ID_MODEDIT_PLACE_GRID_COORD: return COMMON_ACTIONS::gridSetOrigin.MakeEvent(); @@ -329,7 +335,6 @@ boost::optional COMMON_ACTIONS::TranslateLegacyId( int aId ) case ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR_MICROWAVE: case ID_MENU_PCB_SHOW_HIDE_MUWAVE_TOOLBAR: case ID_MICROWAVE_V_TOOLBAR: - case ID_MODEDIT_PAD_TOOL: case ID_MODEDIT_DELETE_TOOL: case ID_MODEDIT_ANCHOR_TOOL: return COMMON_ACTIONS::toBeDone.MakeEvent(); diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index 0cd45e56c2..9c812414df 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -90,6 +90,9 @@ public: /// Activation of the drawing tool (placing a MODULE) static TOOL_ACTION placeModule; + /// Activation of the drawing tool (placing a PAD) + static TOOL_ACTION placePad; + // Push and Shove Router Tool /// Activation of the Push and Shove router static TOOL_ACTION routerActivate; diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index e46ce6db27..fff955bfca 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -23,6 +23,8 @@ */ #include +#include + #include "drawing_tool.h" #include "common_actions.h" @@ -594,6 +596,110 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent ) } +int DRAWING_TOOL::PlacePad( TOOL_EVENT& aEvent ) +{ + assert( m_editModules ); + + m_frame->SetToolID( ID_MODEDIT_PAD_TOOL, wxCURSOR_PENCIL, _( "Add pads" ) ); + + MODULE* module = m_board->m_Modules; + assert( module ); + + D_PAD* pad = new D_PAD( module ); + m_frame->Import_Pad_Settings( pad, false ); // use the global settings for pad + + VECTOR2I cursorPos = m_controls->GetCursorPosition(); + pad->SetPosition( wxPoint( cursorPos.x, cursorPos.y ) ); + + // Add a VIEW_GROUP that serves as a preview for the new item + KIGFX::VIEW_GROUP preview( m_view ); + preview.Add( pad ); + m_view->Add( &preview ); + + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + m_controls->ShowCursor( true ); + m_controls->SetSnapping( true ); + + Activate(); + + // Main loop: keep receiving events + while( OPT_TOOL_EVENT evt = Wait() ) + { + cursorPos = m_controls->GetCursorPosition(); + + if( evt->IsMotion() ) + { + pad->SetPosition( wxPoint( cursorPos.x, cursorPos.y ) ); + preview.ViewUpdate(); + } + + else if( evt->Category() == TC_COMMAND ) + { + if( evt->IsAction( &COMMON_ACTIONS::rotate ) ) + { + pad->Rotate( pad->GetPosition(), m_frame->GetRotationAngle() ); + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + else if( evt->IsAction( &COMMON_ACTIONS::flip ) ) + { + pad->Flip( pad->GetPosition() ); + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + else if( evt->IsCancel() || evt->IsActivate() ) + { + preview.Clear(); + delete pad; + break; + } + } + + else if( evt->IsClick( BUT_LEFT ) ) + { + m_frame->OnModify(); + m_frame->SaveCopyInUndoList( module, UR_MODEDIT ); + + m_board->m_Status_Pcb = 0; // I have no clue why, but it is done in the legacy view + module->SetLastEditTime(); + module->Pads().PushBack( pad ); + + pad->SetNetCode( NETINFO_LIST::UNCONNECTED ); + + // Set the relative pad position + // ( pad position for module orient, 0, and relative to the module position) + pad->SetLocalCoord(); + + /* NPTH pads take empty pad number (since they can't be connected), + * other pads get incremented from the last one edited */ + wxString padName; + + if( pad->GetAttribute() != PAD_HOLE_NOT_PLATED ) + padName = getNextPadName(); + + pad->SetPadName( padName ); + + // Handle the view aspect + preview.Remove( pad ); + m_view->Add( pad ); + + // Start placing next pad + pad = new D_PAD( module ); + m_frame->Import_Pad_Settings( pad, false ); + preview.Add( pad ); + } + } + + m_controls->ShowCursor( false ); + m_controls->SetSnapping( false ); + m_controls->SetAutoPan( false ); + m_view->Remove( &preview ); + + setTransitions(); + m_frame->SetToolID( ID_NO_TOOL_SELECTED, wxCURSOR_DEFAULT, wxEmptyString ); + + return 0; +} + + bool DRAWING_TOOL::drawSegment( int aShape, DRAWSEGMENT* aGraphic ) { // Only two shapes are currently supported @@ -1369,6 +1475,53 @@ void DRAWING_TOOL::make45DegLine( DRAWSEGMENT* aSegment, DRAWSEGMENT* aHelper ) } +bool isNotDigit( char aChar ) +{ + return ( aChar < '0' || aChar > '9' ); +} + + +wxString DRAWING_TOOL::getNextPadName() const +{ + std::set usedNumbers; + + // Find the first, not used pad number + for( MODULE* module = m_board->m_Modules; module; module = module->Next() ) + { + for( D_PAD* pad = module->Pads(); pad; pad = pad->Next() ) + { + wxString padName = pad->GetPadName(); + int padNumber = 0; + int base = 1; + + // Trim and extract the trailing numeric part + while( padName.Len() && padName.Last() >= '0' && padName.Last() <= '9' ) + { + padNumber += ( padName.Last() - '0' ) * base; + padName.RemoveLast(); + base *= 10; + } + + usedNumbers.insert( padNumber ); + } + } + + int candidate = *usedNumbers.begin(); + + // Look for a gap in pad numbering + for( std::set::iterator it = usedNumbers.begin(), + itEnd = usedNumbers.end(); it != itEnd; ++it ) + { + if( *it - candidate > 1 ) + break; + + candidate = *it; + } + + return wxString::Format( wxT( "%i" ), ++candidate ); +} + + void DRAWING_TOOL::setTransitions() { Go( &DRAWING_TOOL::DrawLine, COMMON_ACTIONS::drawLine.MakeEvent() ); @@ -1380,4 +1533,5 @@ void DRAWING_TOOL::setTransitions() Go( &DRAWING_TOOL::PlaceText, COMMON_ACTIONS::placeText.MakeEvent() ); Go( &DRAWING_TOOL::PlaceTarget, COMMON_ACTIONS::placeTarget.MakeEvent() ); Go( &DRAWING_TOOL::PlaceModule, COMMON_ACTIONS::placeModule.MakeEvent() ); + Go( &DRAWING_TOOL::PlacePad, COMMON_ACTIONS::placePad.MakeEvent() ); } diff --git a/pcbnew/tools/drawing_tool.h b/pcbnew/tools/drawing_tool.h index 32c15a8401..29b87560ea 100644 --- a/pcbnew/tools/drawing_tool.h +++ b/pcbnew/tools/drawing_tool.h @@ -120,6 +120,12 @@ public: */ int PlaceModule( TOOL_EVENT& aEvent ); + /** + * Function PlacePad() + * Places a pad in the module editor. + */ + int PlacePad( TOOL_EVENT& aEvent ); + /** * Function EditModules() * Toggles edit module mode. When enabled, one may select parts of modules individually @@ -174,6 +180,12 @@ private: */ void make45DegLine( DRAWSEGMENT* aSegment, DRAWSEGMENT* aHelper ) const; + /** + * Function getNextPadName() + * Compute the 'next' pad number for autoincrement. + * */ + wxString getNextPadName() const; + ///> Sets up handlers for various events. void setTransitions(); From 637919a69973c5abae14013e60de5487bcceb6d3 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 14:01:06 +0200 Subject: [PATCH 621/741] Added support for pads, texts and graphics removal in module editor (GAL). --- pcbnew/moduleframe.cpp | 3 +++ pcbnew/tools/edit_tool.cpp | 35 ++++++++++++++++++++++++++++++++--- pcbnew/tools/edit_tool.h | 14 ++++++++++++++ 3 files changed, 49 insertions(+), 3 deletions(-) diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index 2fa40ac774..53c4e89fc6 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -278,8 +278,11 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : m_toolManager->RegisterTool( new DRAWING_TOOL ); m_toolManager->RegisterTool( new POINT_EDITOR ); m_toolManager->RegisterTool( new PCBNEW_CONTROL ); + m_toolManager->GetTool()->EditModules( true ); + m_toolManager->GetTool()->EditModules( true ); m_toolManager->GetTool()->EditModules( true ); + m_toolManager->ResetTools( TOOL_BASE::RUN ); m_toolManager->InvokeTool( "pcbnew.InteractiveSelection" ); diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 1db8267981..e4667867c3 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -40,7 +40,7 @@ #include "edit_tool.h" EDIT_TOOL::EDIT_TOOL() : - TOOL_INTERACTIVE( "pcbnew.InteractiveEdit" ), m_selectionTool( NULL ) + TOOL_INTERACTIVE( "pcbnew.InteractiveEdit" ), m_selectionTool( NULL ), m_editModules( false ) { } @@ -448,11 +448,40 @@ void EDIT_TOOL::remove( BOARD_ITEM* aItem ) } break; - // These are not supposed to be removed - case PCB_PAD_T: + // Default removal procedure case PCB_MODULE_TEXT_T: + { + if( m_editModules ) + { + TEXTE_MODULE* text = static_cast( aItem ); + + switch( text->GetType() ) + { + case TEXTE_MODULE::TEXT_is_REFERENCE: + DisplayError( getEditFrame(), _( "Cannot delete REFERENCE!" ) ); + return; + + case TEXTE_MODULE::TEXT_is_VALUE: + DisplayError( getEditFrame(), _( "Cannot delete VALUE!" ) ); + return; + } + } + } + /* no break */ + + case PCB_PAD_T: case PCB_MODULE_EDGE_T: + if( m_editModules ) + { + MODULE* module = static_cast( aItem->GetParent() ); + module->SetLastEditTime(); + + board->m_Status_Pcb = 0; // it is done in the legacy view + aItem->DeleteStructure(); + } + return; + break; case PCB_LINE_T: // a segment not on copper layers case PCB_TEXT_T: // a text on a layer diff --git a/pcbnew/tools/edit_tool.h b/pcbnew/tools/edit_tool.h index 207e446493..068727ad4d 100644 --- a/pcbnew/tools/edit_tool.h +++ b/pcbnew/tools/edit_tool.h @@ -91,6 +91,17 @@ public: */ int Remove( TOOL_EVENT& aEvent ); + /** + * Function EditModules() + * Toggles edit module mode. When enabled, one may select parts of modules individually + * (graphics, pads, etc.), so they can be modified. + * @param aEnabled decides if the mode should be enabled. + */ + void EditModules( bool aEnabled ) + { + m_editModules = aEnabled; + } + private: ///> Selection tool used for obtaining selected items SELECTION_TOOL* m_selectionTool; @@ -105,6 +116,9 @@ private: ///> of edit reference point). VECTOR2I m_cursor; + /// Edit module mode flag + bool m_editModules; + ///> Removes and frees a single BOARD_ITEM. void remove( BOARD_ITEM* aItem ); From d73ab976df192ee794dd39f7bc02af26982ae1fb Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 14:01:06 +0200 Subject: [PATCH 622/741] Added support for placing the footprint anchor. --- pcbnew/tools/common_actions.cpp | 9 ++++++- pcbnew/tools/common_actions.h | 3 +++ pcbnew/tools/drawing_tool.cpp | 47 +++++++++++++++++++++++++++++++++ pcbnew/tools/drawing_tool.h | 6 +++++ pcbnew/tools/pcbnew_control.cpp | 2 +- 5 files changed, 65 insertions(+), 2 deletions(-) diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 45305cc83e..41fbea71e8 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -101,6 +101,11 @@ TOOL_ACTION COMMON_ACTIONS::placePad( "pcbnew.InteractiveDrawing.placePad", AS_GLOBAL, 0, "Add pads", "Add pads", AF_ACTIVATE ); +TOOL_ACTION COMMON_ACTIONS::setAnchor( "pcbnew.InteractiveDrawing.setAnchor", + AS_GLOBAL, 0, + "Place the footprint anchor", "Place the footprint anchor", + AF_ACTIVATE ); + // View Controls TOOL_ACTION COMMON_ACTIONS::zoomIn( "pcbnew.Control.zoomIn", AS_GLOBAL, WXK_F1, @@ -313,6 +318,9 @@ boost::optional COMMON_ACTIONS::TranslateLegacyId( int aId ) case ID_MODEDIT_PAD_TOOL: return COMMON_ACTIONS::placePad.MakeEvent(); + case ID_MODEDIT_ANCHOR_TOOL: + return COMMON_ACTIONS::setAnchor.MakeEvent(); + case ID_PCB_PLACE_GRID_COORD_BUTT: case ID_MODEDIT_PLACE_GRID_COORD: return COMMON_ACTIONS::gridSetOrigin.MakeEvent(); @@ -336,7 +344,6 @@ boost::optional COMMON_ACTIONS::TranslateLegacyId( int aId ) case ID_MENU_PCB_SHOW_HIDE_MUWAVE_TOOLBAR: case ID_MICROWAVE_V_TOOLBAR: case ID_MODEDIT_DELETE_TOOL: - case ID_MODEDIT_ANCHOR_TOOL: return COMMON_ACTIONS::toBeDone.MakeEvent(); } diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index 9c812414df..f971116d6e 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -93,6 +93,9 @@ public: /// Activation of the drawing tool (placing a PAD) static TOOL_ACTION placePad; + /// Activation of the drawing tool (placing the footprint anchor) + static TOOL_ACTION setAnchor; + // Push and Shove Router Tool /// Activation of the Push and Shove router static TOOL_ACTION routerActivate; diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index fff955bfca..d3da87ce44 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -700,6 +700,52 @@ int DRAWING_TOOL::PlacePad( TOOL_EVENT& aEvent ) } +int DRAWING_TOOL::SetAnchor( TOOL_EVENT& aEvent ) +{ + assert( m_editModules ); + + Activate(); + m_frame->SetToolID( ID_MODEDIT_ANCHOR_TOOL, wxCURSOR_PENCIL, + _( "Place the footprint anchor" ) ); + + KIGFX::VIEW_CONTROLS* controls = getViewControls(); + controls->ShowCursor( true ); + controls->SetSnapping( true ); + controls->SetAutoPan( true ); + + while( OPT_TOOL_EVENT evt = Wait() ) + { + if( evt->IsClick( BUT_LEFT ) ) + { + MODULE* module = m_board->m_Modules; + + m_frame->SaveCopyInUndoList( module, UR_MODEDIT ); + + // set the new relative internal local coordinates of footprint items + VECTOR2I cursorPos = controls->GetCursorPosition(); + wxPoint moveVector = module->GetPosition() - wxPoint( cursorPos.x, cursorPos.y ); + module->MoveAnchorPosition( moveVector ); + + // Usually, we do not need to change twice the anchor position, + // so deselect the active tool + break; + } + + else if( evt->IsCancel() || evt->IsActivate() ) + break; + } + + controls->SetAutoPan( false ); + controls->SetSnapping( false ); + controls->ShowCursor( false ); + + setTransitions(); + m_frame->SetToolID( ID_NO_TOOL_SELECTED, wxCURSOR_DEFAULT, wxEmptyString ); + + return 0; +} + + bool DRAWING_TOOL::drawSegment( int aShape, DRAWSEGMENT* aGraphic ) { // Only two shapes are currently supported @@ -1534,4 +1580,5 @@ void DRAWING_TOOL::setTransitions() Go( &DRAWING_TOOL::PlaceTarget, COMMON_ACTIONS::placeTarget.MakeEvent() ); Go( &DRAWING_TOOL::PlaceModule, COMMON_ACTIONS::placeModule.MakeEvent() ); Go( &DRAWING_TOOL::PlacePad, COMMON_ACTIONS::placePad.MakeEvent() ); + Go( &DRAWING_TOOL::SetAnchor, COMMON_ACTIONS::setAnchor.MakeEvent() ); } diff --git a/pcbnew/tools/drawing_tool.h b/pcbnew/tools/drawing_tool.h index 29b87560ea..293674a81f 100644 --- a/pcbnew/tools/drawing_tool.h +++ b/pcbnew/tools/drawing_tool.h @@ -126,6 +126,12 @@ public: */ int PlacePad( TOOL_EVENT& aEvent ); + /** + * Function SetAnchor() + * Places the footprint anchor (only in module editor). + */ + int SetAnchor( TOOL_EVENT& aEvent ); + /** * Function EditModules() * Toggles edit module mode. When enabled, one may select parts of modules individually diff --git a/pcbnew/tools/pcbnew_control.cpp b/pcbnew/tools/pcbnew_control.cpp index 89b356c38c..3a46cbacff 100644 --- a/pcbnew/tools/pcbnew_control.cpp +++ b/pcbnew/tools/pcbnew_control.cpp @@ -452,7 +452,7 @@ int PCBNEW_CONTROL::GridSetOrigin( TOOL_EVENT& aEvent ) getView()->MarkDirty(); } - else if( evt->IsCancel() ) + else if( evt->IsCancel() || evt->IsActivate() ) break; } From 456eeaba104219c9e2a6e6f4e2d62653ecbe2455 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 14:01:07 +0200 Subject: [PATCH 623/741] Routines for handling clipboard with TOOL_MANAGER. --- common/tool/tool_manager.cpp | 36 ++++++++++++++++++++++++++++++++++++ include/tool/tool_manager.h | 13 +++++++++++++ 2 files changed, 49 insertions(+) diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 0f4e3f22e2..e225e05e2b 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -34,6 +34,7 @@ #include #include +#include #include @@ -598,6 +599,41 @@ void TOOL_MANAGER::ScheduleContextMenu( TOOL_BASE* aTool, CONTEXT_MENU* aMenu, } +bool TOOL_MANAGER::SaveClipboard( const std::string& aText ) +{ + if( wxTheClipboard->Open() ) + { + wxTheClipboard->SetData( new wxTextDataObject( aText ) ); + wxTheClipboard->Close(); + + return true; + } + + return false; +} + + +std::string TOOL_MANAGER::GetClipboard() const +{ + std::string result; + + if( wxTheClipboard->Open() ) + { + if( wxTheClipboard->IsSupported( wxDF_TEXT ) ) + { + wxTextDataObject data; + wxTheClipboard->GetData( data ); + + result = data.GetText().mb_str(); + } + + wxTheClipboard->Close(); + } + + return result; +} + + TOOL_ID TOOL_MANAGER::MakeToolId( const std::string& aToolName ) { static int currentId; diff --git a/include/tool/tool_manager.h b/include/tool/tool_manager.h index fdc17480d6..1935cf1b14 100644 --- a/include/tool/tool_manager.h +++ b/include/tool/tool_manager.h @@ -257,6 +257,19 @@ public: m_passEvent = true; } + /** + * Stores an information to the system clipboard. + * @param aText is the information to be stored. + * @return False if error occured. + */ + bool SaveClipboard( const std::string& aText ); + + /** + * Returns the information currently stored in the system clipboard. If data stored in the + * clipboard is in non-text format, empty string is returned. + */ + std::string GetClipboard() const; + /** * Returns list of TOOL_ACTIONs. TOOL_ACTIONs add themselves to the list upon their * creation. From ae431bbb054353b8ffe90704096a6d6f0655b10c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 14:22:29 +0200 Subject: [PATCH 624/741] Added MODULE::Add( BOARD_ITEM* )/Remove( BOARD_ITEM* )/Delete( BOARD_ITEM* ). Removed MODULE::AddPad(). --- pcbnew/class_module.cpp | 77 +++++++++++++++++++++++++++++++++----- pcbnew/class_module.h | 34 ++++++++++++----- pcbnew/gpcb_plugin.cpp | 4 +- pcbnew/pcb_parser.cpp | 2 +- pcbnew/tools/edit_tool.cpp | 3 ++ 5 files changed, 98 insertions(+), 22 deletions(-) diff --git a/pcbnew/class_module.cpp b/pcbnew/class_module.cpp index bc01aa1bcb..6080fa0d98 100644 --- a/pcbnew/class_module.cpp +++ b/pcbnew/class_module.cpp @@ -295,6 +295,72 @@ void MODULE::Copy( MODULE* aModule ) } +void MODULE::Add( BOARD_ITEM* aBoardItem, bool doAppend ) +{ + switch( aBoardItem->Type() ) + { + case PCB_MODULE_TEXT_T: + // Only common texts can be added this way. Reference and value are not hold in the DLIST. + assert( static_cast( aBoardItem )->GetType() == TEXTE_MODULE::TEXT_is_DIVERS ); + /* no break */ + + case PCB_MODULE_EDGE_T: + if( doAppend ) + m_Drawings.PushBack( static_cast( aBoardItem ) ); + else + m_Drawings.PushFront( static_cast( aBoardItem ) ); + break; + + case PCB_PAD_T: + if( doAppend ) + m_Pads.PushBack( static_cast( aBoardItem ) ); + else + m_Pads.PushFront( static_cast( aBoardItem ) ); + break; + + default: + { + wxString msg; + msg.Printf( wxT( "MODULE::Add() needs work: BOARD_ITEM type (%d) not handled" ), + aBoardItem->Type() ); + wxFAIL_MSG( msg ); + + return; + } + } + + aBoardItem->SetParent( this ); +} + + +BOARD_ITEM* MODULE::Remove( BOARD_ITEM* aBoardItem ) +{ + switch( aBoardItem->Type() ) + { + case PCB_MODULE_TEXT_T: + // Only common texts can be added this way. Reference and value are not hold in the DLIST. + assert( static_cast( aBoardItem )->GetType() == TEXTE_MODULE::TEXT_is_DIVERS ); + /* no break */ + + case PCB_MODULE_EDGE_T: + return m_Drawings.Remove( static_cast( aBoardItem ) ); + + case PCB_PAD_T: + return m_Pads.Remove( static_cast( aBoardItem ) ); + + default: + { + wxString msg; + msg.Printf( wxT( "MODULE::Remove() needs work: BOARD_ITEM type (%d) not handled" ), + aBoardItem->Type() ); + wxFAIL_MSG( msg ); + } + } + + return NULL; +} + + void MODULE::CopyNetlistSettings( MODULE* aModule ) { // Don't do anything foolish like trying to copy to yourself. @@ -636,13 +702,6 @@ void MODULE::Add3DModel( S3D_MASTER* a3DModel ) } -void MODULE::AddPad( D_PAD* aPad ) -{ - aPad->SetParent( this ); - m_Pads.PushBack( aPad ); -} - - // see class_module.h SEARCH_RESULT MODULE::Visit( INSPECTOR* inspector, const void* testData, const KICAD_T scanTypes[] ) @@ -738,10 +797,10 @@ EDA_ITEM* MODULE::Clone() const void MODULE::RunOnChildren( boost::function aFunction ) { - for( D_PAD* pad = m_Pads.GetFirst(); pad; pad = pad->Next() ) + for( D_PAD* pad = m_Pads; pad; pad = pad->Next() ) aFunction( static_cast( pad ) ); - for( BOARD_ITEM* drawing = m_Drawings.GetFirst(); drawing; drawing = drawing->Next() ) + for( BOARD_ITEM* drawing = m_Drawings; drawing; drawing = drawing->Next() ) aFunction( drawing ); aFunction( static_cast( m_Reference ) ); diff --git a/pcbnew/class_module.h b/pcbnew/class_module.h index 8eac8a87d8..d1496f2425 100644 --- a/pcbnew/class_module.h +++ b/pcbnew/class_module.h @@ -91,9 +91,31 @@ public: * Function Add * adds the given item to this MODULE and takes ownership of its memory. * @param aBoardItem The item to add to this board. - * @param doInsert If true, then insert, else append - * void Add( BOARD_ITEM* aBoardItem, bool doInsert = true ); + * @param doAppend If true, then append, else insert. */ + void Add( BOARD_ITEM* aBoardItem, bool doAppend = true ); + + /** + * Function Delete + * removes the given single item from this MODULE and deletes its memory. + * @param aBoardItem The item to remove from this module and delete + */ + void Delete( BOARD_ITEM* aBoardItem ) + { + // developers should run DEBUG versions and fix such calls with NULL + wxASSERT( aBoardItem ); + + if( aBoardItem ) + delete Remove( aBoardItem ); + } + + /** + * Function Remove + * removes \a aBoardItem from this MODULE and returns it to caller without deleting it. + * @param aBoardItem The item to remove from this module. + * @return BOARD_ITEM* \a aBoardItem which was passed in. + */ + BOARD_ITEM* Remove( BOARD_ITEM* aBoardItem ); /** * Function CalculateBoundingBox @@ -436,14 +458,6 @@ public: */ void Add3DModel( S3D_MASTER* a3DModel ); - /** - * Function AddPad - * adds \a aPad to the end of the pad list. - * - * @param aPad A pointer to a #D_PAD to add to the list. - */ - void AddPad( D_PAD* aPad ); - SEARCH_RESULT Visit( INSPECTOR* inspector, const void* testData, const KICAD_T scanTypes[] ); diff --git a/pcbnew/gpcb_plugin.cpp b/pcbnew/gpcb_plugin.cpp index def86f32ff..c306aa8639 100644 --- a/pcbnew/gpcb_plugin.cpp +++ b/pcbnew/gpcb_plugin.cpp @@ -637,7 +637,7 @@ MODULE* GPCB_FPL_CACHE::parseMODULE( LINE_READER* aLineReader ) throw( IO_ERROR, pad->SetShape( PAD_OVAL ); } - module->AddPad( pad ); + module->Add( pad ); continue; } @@ -701,7 +701,7 @@ MODULE* GPCB_FPL_CACHE::parseMODULE( LINE_READER* aLineReader ) throw( IO_ERROR, if( pad->GetShape() == PAD_ROUND && pad->GetSize().x != pad->GetSize().y ) pad->SetShape( PAD_OVAL ); - module->AddPad( pad ); + module->Add( pad ); continue; } } diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index 475a844948..33783ea548 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -1856,7 +1856,7 @@ MODULE* PCB_PARSER::parseMODULE( wxArrayString* aInitialComments ) throw( IO_ERR RotatePoint( &pt, module->GetOrientation() ); pad->SetPosition( pt + module->GetPosition() ); - module->AddPad( pad ); + module->Add( pad ); } break; diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index e4667867c3..c1bbcc14a9 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -464,6 +464,9 @@ void EDIT_TOOL::remove( BOARD_ITEM* aItem ) case TEXTE_MODULE::TEXT_is_VALUE: DisplayError( getEditFrame(), _( "Cannot delete VALUE!" ) ); return; + + default: // suppress warnings + break; } } } From 5e48a79639c51d8c996d65bffc7f383d428f0bff Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 14:22:29 +0200 Subject: [PATCH 625/741] Copy & paste for module editor (GAL). --- pcbnew/tools/common_actions.cpp | 8 ++ pcbnew/tools/common_actions.h | 6 ++ pcbnew/tools/edit_tool.cpp | 176 ++++++++++++++++++++++++++++++++ pcbnew/tools/edit_tool.h | 15 +++ 4 files changed, 205 insertions(+) diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 41fbea71e8..fec32b59cf 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -59,6 +59,14 @@ TOOL_ACTION COMMON_ACTIONS::properties( "pcbnew.InteractiveEdit.properties", AS_GLOBAL, 'E', "Properties...", "Displays properties window" ); +TOOL_ACTION COMMON_ACTIONS::copyItems( "pcbnew.InteractiveEdit.copyItems", + AS_GLOBAL, MD_CTRL + int( 'C' ), + "Copy items", "Copy items", AF_ACTIVATE ); + +TOOL_ACTION COMMON_ACTIONS::pasteItems( "pcbnew.InteractiveEdit.pasteItems", + AS_GLOBAL, MD_CTRL + int( 'V' ), + "Paste items", "Paste items", AF_ACTIVATE ); + // Drawing tool actions TOOL_ACTION COMMON_ACTIONS::drawLine( "pcbnew.InteractiveDrawing.line", diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index f971116d6e..c61f6e811d 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -62,6 +62,12 @@ public: /// Deleting a BOARD_ITEM static TOOL_ACTION remove; + /// Copying pad to clipboard + static TOOL_ACTION copyItems; + + /// Pasting a pad from clipboard + static TOOL_ACTION pasteItems; + // Drawing Tool /// Activation of the drawing tool (line) static TOOL_ACTION drawLine; diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index c1bbcc14a9..782fe5f90d 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -24,12 +24,15 @@ #include #include +#include #include #include + #include #include #include #include +#include #include #include @@ -428,6 +431,177 @@ int EDIT_TOOL::Remove( TOOL_EVENT& aEvent ) } +int EDIT_TOOL::CopyItems( TOOL_EVENT& aEvent ) +{ + const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); + PCB_IO io( CTL_FOR_CLIPBOARD ); + + if( !m_editModules || !makeSelection( selection ) ) + { + setTransitions(); + + return 0; + } + + // Create a temporary module that contains selected items to ease serialization + MODULE module( getModel() ); + + for( int i = 0; i < selection.Size(); ++i ) + { + BOARD_ITEM* clone = static_cast( selection.Item( i )->Clone() ); + + // Do not add reference/value - convert them to the common type + if( TEXTE_MODULE* text = dyn_cast( clone ) ) + text->SetType( TEXTE_MODULE::TEXT_is_DIVERS ); + + module.Add( clone ); + } + + io.Format( &module, 0 ); + std::string data = io.GetStringOutput( true ); + m_toolMgr->SaveClipboard( data ); + + setTransitions(); + + return 0; +} + + +int EDIT_TOOL::PasteItems( TOOL_EVENT& aEvent ) +{ + if( !m_editModules ) + { + setTransitions(); + + return 0; + } + + // Parse clipboard + PCB_IO io( CTL_FOR_CLIPBOARD ); + MODULE* currentModule = getModel()->m_Modules; + MODULE* pastedModule = NULL; + + try + { + BOARD_ITEM* item = io.Parse( m_toolMgr->GetClipboard() ); + assert( item->Type() == PCB_MODULE_T ); + pastedModule = dyn_cast( item ); + } + catch( ... ) + { + setTransitions(); + + return 0; + } + + // Placement tool part + KIGFX::VIEW* view = getView(); + KIGFX::VIEW_CONTROLS* controls = getViewControls(); + BOARD* board = getModel(); + PCB_EDIT_FRAME* frame = getEditFrame(); + VECTOR2I cursorPos = getViewControls()->GetCursorPosition(); + + // Add a VIEW_GROUP that serves as a preview for the new item + KIGFX::VIEW_GROUP preview( view ); + pastedModule->SetParent( board ); + pastedModule->RunOnChildren( boost::bind( &KIGFX::VIEW_GROUP::Add, boost::ref( preview ), _1 ) ); + preview.Add( pastedModule ); + view->Add( &preview ); + + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + controls->ShowCursor( true ); + controls->SetSnapping( true ); + + Activate(); + + // Main loop: keep receiving events + while( OPT_TOOL_EVENT evt = Wait() ) + { + cursorPos = controls->GetCursorPosition(); + + if( evt->IsMotion() ) + { + pastedModule->SetPosition( wxPoint( cursorPos.x, cursorPos.y ) ); + preview.ViewUpdate(); + } + + else if( evt->Category() == TC_COMMAND ) + { + if( evt->IsAction( &COMMON_ACTIONS::rotate ) ) + { + pastedModule->Rotate( pastedModule->GetPosition(), frame->GetRotationAngle() ); + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + else if( evt->IsAction( &COMMON_ACTIONS::flip ) ) + { + pastedModule->Flip( pastedModule->GetPosition() ); + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + else if( evt->IsCancel() || evt->IsActivate() ) + { + preview.Clear(); + break; + } + } + + else if( evt->IsClick( BUT_LEFT ) ) + { + frame->OnModify(); + frame->SaveCopyInUndoList( currentModule, UR_MODEDIT ); + + board->m_Status_Pcb = 0; // I have no clue why, but it is done in the legacy view + currentModule->SetLastEditTime(); + + // MODULE::RunOnChildren is infeasible here: we need to create copies of items, do not + // directly modify them + + for( D_PAD* pad = pastedModule->Pads(); pad; pad = pad->Next() ) + { + D_PAD* clone = static_cast( pad->Clone() ); + currentModule->Add( clone ); + clone->SetLocalCoord(); + view->Add( clone ); + } + + for( BOARD_ITEM* drawing = pastedModule->GraphicalItems(); + drawing; drawing = drawing->Next() ) + { + BOARD_ITEM* clone = static_cast( drawing->Clone() ); + + if( TEXTE_MODULE* text = dyn_cast( clone ) ) + { + // Do not add reference/value - convert them to the common type + text->SetType( TEXTE_MODULE::TEXT_is_DIVERS ); + currentModule->Add( clone ); + text->SetLocalCoord(); + } + else if( EDGE_MODULE* edge = dyn_cast( clone ) ) + { + currentModule->Add( clone ); + edge->SetLocalCoord(); + } + + view->Add( clone ); + } + + preview.Clear(); + + break; + } + } + + delete pastedModule; + controls->ShowCursor( false ); + controls->SetSnapping( false ); + controls->SetAutoPan( false ); + view->Remove( &preview ); + + setTransitions(); + + return 0; +} + + void EDIT_TOOL::remove( BOARD_ITEM* aItem ) { BOARD* board = getModel(); @@ -515,6 +689,8 @@ void EDIT_TOOL::setTransitions() Go( &EDIT_TOOL::Flip, COMMON_ACTIONS::flip.MakeEvent() ); Go( &EDIT_TOOL::Remove, COMMON_ACTIONS::remove.MakeEvent() ); Go( &EDIT_TOOL::Properties, COMMON_ACTIONS::properties.MakeEvent() ); + Go( &EDIT_TOOL::CopyItems, COMMON_ACTIONS::copyItems.MakeEvent() ); + Go( &EDIT_TOOL::PasteItems, COMMON_ACTIONS::pasteItems.MakeEvent() ); } diff --git a/pcbnew/tools/edit_tool.h b/pcbnew/tools/edit_tool.h index 068727ad4d..e68cd74894 100644 --- a/pcbnew/tools/edit_tool.h +++ b/pcbnew/tools/edit_tool.h @@ -91,8 +91,23 @@ public: */ int Remove( TOOL_EVENT& aEvent ); + /** + * Function CopyItems() + * + * Copies selected items to the clipboard. Works only in "edit modules" mode. + */ + int CopyItems( TOOL_EVENT& aEvent ); + + /** + * Function PastePad() + * + * Pastes items from the clipboard. Works only in "edit modules" mode. + */ + int PasteItems( TOOL_EVENT& aEvent ); + /** * Function EditModules() + * * Toggles edit module mode. When enabled, one may select parts of modules individually * (graphics, pads, etc.), so they can be modified. * @param aEnabled decides if the mode should be enabled. From 95a4f61eee1e8f4512589a8e8f5f20203f30208e Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 14:23:13 +0200 Subject: [PATCH 626/741] wxWidgets 2.8 compatibility fix. --- common/tool/tool_manager.cpp | 13 ++++++++++++- pcbnew/class_board.cpp | 4 +++- pcbnew/ratsnest_data.cpp | 6 +++--- pcbnew/tools/edit_tool.cpp | 2 +- 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index e225e05e2b..cb91124f31 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -137,6 +137,11 @@ struct TOOL_MANAGER::TOOL_STATE return aRhs.theTool != this->theTool; } + /** + * Function Push() + * Stores the current state of the tool on stack. Stacks are stored internally and are not + * shared between different TOOL_STATE objects. + */ void Push() { stateStack.push( *this ); @@ -144,6 +149,12 @@ struct TOOL_MANAGER::TOOL_STATE clear(); } + /** + * Function Pop() + * Restores state of the tool from stack. Stacks are stored internally and are not + * shared between different TOOL_STATE objects. + * @return True if state was restored, false if the stack was empty. + */ bool Pop() { delete cofunc; @@ -603,7 +614,7 @@ bool TOOL_MANAGER::SaveClipboard( const std::string& aText ) { if( wxTheClipboard->Open() ) { - wxTheClipboard->SetData( new wxTextDataObject( aText ) ); + wxTheClipboard->SetData( new wxTextDataObject( wxString( aText.c_str(), wxConvUTF8 ) ) ); wxTheClipboard->Close(); return true; diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index f1d304817c..6496692a47 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -688,10 +688,12 @@ void BOARD::Add( BOARD_ITEM* aBoardItem, int aControl ) m_Status_Pcb = 0; break; + case PCB_MODULE_EDGE_T: + assert( false ); // TODO Orson: I am just checking if it is supposed to be here + case PCB_DIMENSION_T: case PCB_LINE_T: case PCB_TEXT_T: - case PCB_MODULE_EDGE_T: case PCB_TARGET_T: if( aControl & ADD_APPEND ) m_Drawings.PushBack( aBoardItem ); diff --git a/pcbnew/ratsnest_data.cpp b/pcbnew/ratsnest_data.cpp index 9271f00f42..3c069e1932 100644 --- a/pcbnew/ratsnest_data.cpp +++ b/pcbnew/ratsnest_data.cpp @@ -305,7 +305,7 @@ void RN_NET::clearNode( const RN_NODE_PTR& aNode ) // Remove all ratsnest edges for associated with the node newEnd = std::remove_if( m_rnEdges->begin(), m_rnEdges->end(), - boost::bind( isEdgeConnectingNode, _1, aNode ) ); + boost::bind( isEdgeConnectingNode, _1, boost::ref( aNode ) ) ); m_rnEdges->resize( std::distance( m_rnEdges->begin(), newEnd ) ); } @@ -629,7 +629,7 @@ std::list RN_NET::GetClosestNodes( const RN_NODE_PTR& aNode, int aN closest.push_back( node ); // Sort by the distance from aNode - closest.sort( boost::bind( sortDistance, aNode, _1, _2 ) ); + closest.sort( boost::bind( sortDistance, boost::ref( aNode ), _1, _2 ) ); // Remove the first node (==aNode), as it is surely located within the smallest distance closest.pop_front(); @@ -653,7 +653,7 @@ std::list RN_NET::GetClosestNodes( const RN_NODE_PTR& aNode, closest.push_back( node ); // Sort by the distance from aNode - closest.sort( boost::bind( sortDistance, aNode, _1, _2 ) ); + closest.sort( boost::bind( sortDistance, boost::ref( aNode ), _1, _2 ) ); // Remove the first node (==aNode), as it is surely located within the smallest distance closest.pop_front(); diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 782fe5f90d..5eb6620c7a 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -483,7 +483,7 @@ int EDIT_TOOL::PasteItems( TOOL_EVENT& aEvent ) try { - BOARD_ITEM* item = io.Parse( m_toolMgr->GetClipboard() ); + BOARD_ITEM* item = io.Parse( wxString( m_toolMgr->GetClipboard().c_str(), wxConvUTF8 ) ); assert( item->Type() == PCB_MODULE_T ); pastedModule = dyn_cast( item ); } From 5941f196c31c9356d67cee1a1ff1834288c00ba4 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 14:23:13 +0200 Subject: [PATCH 627/741] Reference point is selected for copied items. Enabled autopanning for copy & paste operations (module editor/GAL). --- pcbnew/tools/edit_tool.cpp | 74 ++++++++++++++++++++++++++++++-------- 1 file changed, 60 insertions(+), 14 deletions(-) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 5eb6620c7a..6a0733cfcc 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -434,7 +434,6 @@ int EDIT_TOOL::Remove( TOOL_EVENT& aEvent ) int EDIT_TOOL::CopyItems( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); - PCB_IO io( CTL_FOR_CLIPBOARD ); if( !m_editModules || !makeSelection( selection ) ) { @@ -443,23 +442,67 @@ int EDIT_TOOL::CopyItems( TOOL_EVENT& aEvent ) return 0; } - // Create a temporary module that contains selected items to ease serialization - MODULE module( getModel() ); + Activate(); - for( int i = 0; i < selection.Size(); ++i ) + KIGFX::VIEW_CONTROLS* controls = getViewControls(); + controls->SetSnapping( true ); + controls->ShowCursor( true ); + controls->SetAutoPan( true ); + + PCB_BASE_FRAME* frame = getEditFrame(); + frame->DisplayToolMsg( _( "Select reference point" ) ); + + bool cancelled = false; + VECTOR2I cursorPos; + + while( OPT_TOOL_EVENT evt = Wait() ) { - BOARD_ITEM* clone = static_cast( selection.Item( i )->Clone() ); - - // Do not add reference/value - convert them to the common type - if( TEXTE_MODULE* text = dyn_cast( clone ) ) - text->SetType( TEXTE_MODULE::TEXT_is_DIVERS ); - - module.Add( clone ); + if( evt->IsMotion() ) + { + cursorPos = getViewControls()->GetCursorPosition(); + } + else if( evt->IsClick( BUT_LEFT ) ) + { + break; + } + else if( evt->IsCancel() || evt->IsActivate() ) + { + cancelled = true; + break; + } } - io.Format( &module, 0 ); - std::string data = io.GetStringOutput( true ); - m_toolMgr->SaveClipboard( data ); + if( !cancelled ) + { + PCB_IO io( CTL_FOR_CLIPBOARD ); + + // Create a temporary module that contains selected items to ease serialization + MODULE module( getModel() ); + + for( int i = 0; i < selection.Size(); ++i ) + { + BOARD_ITEM* clone = static_cast( selection.Item( i )->Clone() ); + + // Do not add reference/value - convert them to the common type + if( TEXTE_MODULE* text = dyn_cast( clone ) ) + text->SetType( TEXTE_MODULE::TEXT_is_DIVERS ); + + module.Add( clone ); + } + + // Set the new relative internal local coordinates of footprint items + wxPoint moveVector = module.GetPosition() - wxPoint( cursorPos.x, cursorPos.y ); + module.MoveAnchorPosition( moveVector ); + + io.Format( &module, 0 ); + std::string data = io.GetStringOutput( true ); + m_toolMgr->SaveClipboard( data ); + } + + frame->DisplayToolMsg( wxString::Format( _( "Copied %d items" ), selection.Size() ) ); + controls->SetSnapping( false ); + controls->ShowCursor( false ); + controls->SetAutoPan( false ); setTransitions(); @@ -504,6 +547,7 @@ int EDIT_TOOL::PasteItems( TOOL_EVENT& aEvent ) // Add a VIEW_GROUP that serves as a preview for the new item KIGFX::VIEW_GROUP preview( view ); pastedModule->SetParent( board ); + pastedModule->SetPosition( wxPoint( cursorPos.x, cursorPos.y ) ); pastedModule->RunOnChildren( boost::bind( &KIGFX::VIEW_GROUP::Add, boost::ref( preview ), _1 ) ); preview.Add( pastedModule ); view->Add( &preview ); @@ -511,6 +555,7 @@ int EDIT_TOOL::PasteItems( TOOL_EVENT& aEvent ) m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); controls->ShowCursor( true ); controls->SetSnapping( true ); + controls->SetAutoPan( true ); Activate(); @@ -558,6 +603,7 @@ int EDIT_TOOL::PasteItems( TOOL_EVENT& aEvent ) for( D_PAD* pad = pastedModule->Pads(); pad; pad = pad->Next() ) { D_PAD* clone = static_cast( pad->Clone() ); + currentModule->Add( clone ); clone->SetLocalCoord(); view->Add( clone ); From ac8ee56e51ceba2dcc6790d7df5d5ec20bb73443 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 14:23:13 +0200 Subject: [PATCH 628/741] Pasted module texts are rotated in the right way. --- pcbnew/tools/edit_tool.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 6a0733cfcc..1eb1b37bee 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -618,12 +618,16 @@ int EDIT_TOOL::PasteItems( TOOL_EVENT& aEvent ) { // Do not add reference/value - convert them to the common type text->SetType( TEXTE_MODULE::TEXT_is_DIVERS ); - currentModule->Add( clone ); + currentModule->Add( text ); text->SetLocalCoord(); + + // Whyyyyyyyyyyyyyyyyyyyyyy?! All other items conform to rotation performed + // on its parent module, but texts are so independent.. + text->Rotate( text->GetPosition(), pastedModule->GetOrientation() ); } else if( EDGE_MODULE* edge = dyn_cast( clone ) ) { - currentModule->Add( clone ); + currentModule->Add( edge ); edge->SetLocalCoord(); } From e3c4f425dc199599c48bca2a06fbda09a348bae6 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 14:23:13 +0200 Subject: [PATCH 629/741] Fixed wrong reference point for copied items in subsequent module editor invocations (GAL). --- pcbnew/loadcmp.cpp | 1 + pcbnew/tools/edit_tool.cpp | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pcbnew/loadcmp.cpp b/pcbnew/loadcmp.cpp index a794f3f685..6d6f6395b7 100644 --- a/pcbnew/loadcmp.cpp +++ b/pcbnew/loadcmp.cpp @@ -107,6 +107,7 @@ bool FOOTPRINT_EDIT_FRAME::Load_Module_From_BOARD( MODULE* aModule ) SetCrossHairPosition( wxPoint( 0, 0 ) ); PlaceModule( newModule, NULL ); + newModule->SetPosition( wxPoint( 0, 0 ) ); // cursor in GAL may not be initialized at the moment // Put it on FRONT layer, // because this is the default in ModEdit, and in libs diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 1eb1b37bee..6b833b2290 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -453,7 +453,7 @@ int EDIT_TOOL::CopyItems( TOOL_EVENT& aEvent ) frame->DisplayToolMsg( _( "Select reference point" ) ); bool cancelled = false; - VECTOR2I cursorPos; + VECTOR2I cursorPos = getViewControls()->GetCursorPosition(); while( OPT_TOOL_EVENT evt = Wait() ) { @@ -490,8 +490,10 @@ int EDIT_TOOL::CopyItems( TOOL_EVENT& aEvent ) module.Add( clone ); } - // Set the new relative internal local coordinates of footprint items - wxPoint moveVector = module.GetPosition() - wxPoint( cursorPos.x, cursorPos.y ); + // Set the new relative internal local coordinates of copied items + MODULE* editedModule = getModel()->m_Modules; + wxPoint moveVector = module.GetPosition() + editedModule->GetPosition() - + wxPoint( cursorPos.x, cursorPos.y ); module.MoveAnchorPosition( moveVector ); io.Format( &module, 0 ); @@ -499,7 +501,7 @@ int EDIT_TOOL::CopyItems( TOOL_EVENT& aEvent ) m_toolMgr->SaveClipboard( data ); } - frame->DisplayToolMsg( wxString::Format( _( "Copied %d items" ), selection.Size() ) ); + frame->DisplayToolMsg( wxString::Format( _( "Copied %d item(s)" ), selection.Size() ) ); controls->SetSnapping( false ); controls->ShowCursor( false ); controls->SetAutoPan( false ); From f0ff744e9783577197f3d4e9882572443f8aee9c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 14:23:13 +0200 Subject: [PATCH 630/741] Initial version of the Placement Tool. --- pcbnew/CMakeLists.txt | 1 + pcbnew/moduleframe.cpp | 2 + pcbnew/tools/common_actions.cpp | 32 +++ pcbnew/tools/common_actions.h | 19 ++ pcbnew/tools/pcb_tools.cpp | 2 + pcbnew/tools/placement_tool.cpp | 356 ++++++++++++++++++++++++++++++++ pcbnew/tools/placement_tool.h | 73 +++++++ 7 files changed, 485 insertions(+) create mode 100644 pcbnew/tools/placement_tool.cpp create mode 100644 pcbnew/tools/placement_tool.h diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 2884741b8a..bab69a7b37 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -265,6 +265,7 @@ set( PCBNEW_CLASS_SRCS tools/pcbnew_control.cpp tools/pcb_editor_control.cpp tools/pcb_tools.cpp + tools/placement_tool.cpp tools/common_actions.cpp ) diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index 53c4e89fc6..603e4e0838 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -61,6 +61,7 @@ #include "tools/drawing_tool.h" #include "tools/point_editor.h" #include "tools/pcbnew_control.h" +#include "tools/placement_tool.h" #include "tools/common_actions.h" @@ -278,6 +279,7 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : m_toolManager->RegisterTool( new DRAWING_TOOL ); m_toolManager->RegisterTool( new POINT_EDITOR ); m_toolManager->RegisterTool( new PCBNEW_CONTROL ); + m_toolManager->RegisterTool( new PLACEMENT_TOOL ); m_toolManager->GetTool()->EditModules( true ); m_toolManager->GetTool()->EditModules( true ); diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index fec32b59cf..a1b6966a06 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -285,6 +285,38 @@ TOOL_ACTION COMMON_ACTIONS::pointEditorUpdate( "pcbnew.PointEditor.update", AS_GLOBAL, 0, "", "" ); // No description, it is not supposed to be shown anywhere +// Placement tool +TOOL_ACTION COMMON_ACTIONS::alignTop( "pcbnew.Place.alignTop", + AS_GLOBAL, 0, + "Align items to the top", + "Aligns selected items to the top edge" ); + +TOOL_ACTION COMMON_ACTIONS::alignBottom( "pcbnew.Place.alignBottom", + AS_GLOBAL, 0, + "Align items to the bottom", + "Aligns selected items to the bottom edge" ); + +TOOL_ACTION COMMON_ACTIONS::alignLeft( "pcbnew.Place.alignLeft", + AS_GLOBAL, 0, + "Align items to the left", + "Aligns selected items to the top left" ); + +TOOL_ACTION COMMON_ACTIONS::alignRight( "pcbnew.Place.alignRight", + AS_GLOBAL, 0, + "Align items to the right", + "Aligns selected items to the right edge" ); + +TOOL_ACTION COMMON_ACTIONS::distributeHorizontally( "pcbnew.Place.distributeHorizontally", + AS_GLOBAL, 0, + "Distribute horizontally", + "Distributes selected items along the horizontal axis" ); + +TOOL_ACTION COMMON_ACTIONS::distributeVertically( "pcbnew.Place.distributeVertically", + AS_GLOBAL, 0, + "Distribure vertically", + "Distributes selected items along the vertical axis" ); + + boost::optional COMMON_ACTIONS::TranslateLegacyId( int aId ) { switch( aId ) diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index c61f6e811d..2cd367c05d 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -110,6 +110,25 @@ public: /// Update edit points static TOOL_ACTION pointEditorUpdate; + // Placement tool + /// Align items to the top edge of selection bounding box + static TOOL_ACTION alignTop; + + /// Align items to the bottom edge of selection bounding box + static TOOL_ACTION alignBottom; + + /// Align items to the left edge of selection bounding box + static TOOL_ACTION alignLeft; + + /// Align items to the right edge of selection bounding box + static TOOL_ACTION alignRight; + + /// Distributes items evenly along the horizontal axis + static TOOL_ACTION distributeHorizontally; + + /// Distributes items evenly along the vertical axis + static TOOL_ACTION distributeVertically; + // View controls static TOOL_ACTION zoomIn; static TOOL_ACTION zoomOut; diff --git a/pcbnew/tools/pcb_tools.cpp b/pcbnew/tools/pcb_tools.cpp index 6ba1a787e8..9e604a0b04 100644 --- a/pcbnew/tools/pcb_tools.cpp +++ b/pcbnew/tools/pcb_tools.cpp @@ -36,6 +36,7 @@ #include "point_editor.h" #include "pcbnew_control.h" #include "pcb_editor_control.h" +#include "placement_tool.h" #include "common_actions.h" #include @@ -55,6 +56,7 @@ void PCB_EDIT_FRAME::setupTools() m_toolManager->RegisterTool( new POINT_EDITOR ); m_toolManager->RegisterTool( new PCBNEW_CONTROL ); m_toolManager->RegisterTool( new PCB_EDITOR_CONTROL ); + m_toolManager->RegisterTool( new PLACEMENT_TOOL ); m_toolManager->ResetTools( TOOL_BASE::RUN ); // Run the selection tool, it is supposed to be always active diff --git a/pcbnew/tools/placement_tool.cpp b/pcbnew/tools/placement_tool.cpp new file mode 100644 index 0000000000..05ac2522ba --- /dev/null +++ b/pcbnew/tools/placement_tool.cpp @@ -0,0 +1,356 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 CERN + * @author Maciej Suminski + * + * 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 "placement_tool.h" +#include "common_actions.h" +#include "selection_tool.h" + +#include +#include +#include + +#include +#include + +PLACEMENT_TOOL::PLACEMENT_TOOL() : + TOOL_INTERACTIVE( "pcbnew.Placement" ) +{ +} + +PLACEMENT_TOOL::~PLACEMENT_TOOL() +{ +} + + +bool PLACEMENT_TOOL::Init() +{ + // Find the selection tool, so they can cooperate + m_selectionTool = static_cast( m_toolMgr->FindTool( "pcbnew.InteractiveSelection" ) ); + + if( !m_selectionTool ) + { + DisplayError( NULL, wxT( "pcbnew.InteractiveSelection tool is not available" ) ); + return false; + } + + // TODO create a context menu and add it to the selection tool + + setTransitions(); + + return true; +} + + +int PLACEMENT_TOOL::AlignTop( TOOL_EVENT& aEvent ) +{ + const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); + + if( selection.Size() > 1 ) + { + PCB_BASE_FRAME* editFrame = getEditFrame(); + RN_DATA* ratsnest = getModel()->GetRatsnest(); + + editFrame->OnModify(); + editFrame->SaveCopyInUndoList( selection.items, UR_CHANGED ); + + // Compute the highest point of selection - it will be the edge of alignment + int top = selection.Item( 0 )->GetBoundingBox().GetY(); + + for( int i = 1; i < selection.Size(); ++i ) + { + int currentTop = selection.Item( i )->GetBoundingBox().GetY(); + + if( top > currentTop ) // Y decreases when going up + top = currentTop; + } + + // Move the selected items + for( int i = 0; i < selection.Size(); ++i ) + { + BOARD_ITEM* item = selection.Item( i ); + int difference = top - item->GetBoundingBox().GetY(); + + item->Move( wxPoint( 0, difference ) ); + item->ViewUpdate(); + ratsnest->Update( item ); + } + + getModel()->GetRatsnest()->Recalculate(); + } + + setTransitions(); + + return 0; +} + + +int PLACEMENT_TOOL::AlignBottom( TOOL_EVENT& aEvent ) +{ + const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); + + if( selection.Size() > 1 ) + { + PCB_BASE_FRAME* editFrame = getEditFrame(); + RN_DATA* ratsnest = getModel()->GetRatsnest(); + + editFrame->OnModify(); + editFrame->SaveCopyInUndoList( selection.items, UR_CHANGED ); + + // Compute the lowest point of selection - it will be the edge of alignment + int bottom = selection.Item( 0 )->GetBoundingBox().GetBottom(); + + for( int i = 1; i < selection.Size(); ++i ) + { + int currentBottom = selection.Item( i )->GetBoundingBox().GetBottom(); + + if( bottom < currentBottom ) // Y increases when going down + bottom = currentBottom; + } + + // Move the selected items + for( int i = 0; i < selection.Size(); ++i ) + { + BOARD_ITEM* item = selection.Item( i ); + int difference = bottom - item->GetBoundingBox().GetBottom(); + + item->Move( wxPoint( 0, difference ) ); + item->ViewUpdate(); + ratsnest->Update( item ); + } + + getModel()->GetRatsnest()->Recalculate(); + } + + setTransitions(); + + return 0; +} + + +int PLACEMENT_TOOL::AlignLeft( TOOL_EVENT& aEvent ) +{ + const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); + + if( selection.Size() > 1 ) + { + PCB_BASE_FRAME* editFrame = getEditFrame(); + RN_DATA* ratsnest = getModel()->GetRatsnest(); + + editFrame->OnModify(); + editFrame->SaveCopyInUndoList( selection.items, UR_CHANGED ); + + // Compute the leftmost point of selection - it will be the edge of alignment + int left = selection.Item( 0 )->GetBoundingBox().GetX(); + + for( int i = 1; i < selection.Size(); ++i ) + { + int currentLeft = selection.Item( i )->GetBoundingBox().GetX(); + + if( left > currentLeft ) // X decreases when going left + left = currentLeft; + } + + // Move the selected items + for( int i = 0; i < selection.Size(); ++i ) + { + BOARD_ITEM* item = selection.Item( i ); + int difference = left - item->GetBoundingBox().GetX(); + + item->Move( wxPoint( difference, 0 ) ); + item->ViewUpdate(); + ratsnest->Update( item ); + } + + getModel()->GetRatsnest()->Recalculate(); + } + + setTransitions(); + + return 0; +} + + +int PLACEMENT_TOOL::AlignRight( TOOL_EVENT& aEvent ) +{ + const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); + + if( selection.Size() > 1 ) + { + PCB_BASE_FRAME* editFrame = getEditFrame(); + RN_DATA* ratsnest = getModel()->GetRatsnest(); + + editFrame->OnModify(); + editFrame->SaveCopyInUndoList( selection.items, UR_CHANGED ); + + // Compute the rightmost point of selection - it will be the edge of alignment + int right = selection.Item( 0 )->GetBoundingBox().GetRight(); + + for( int i = 1; i < selection.Size(); ++i ) + { + int currentRight = selection.Item( i )->GetBoundingBox().GetRight(); + + if( right < currentRight ) // X increases when going right + right = currentRight; + } + + // Move the selected items + for( int i = 0; i < selection.Size(); ++i ) + { + BOARD_ITEM* item = selection.Item( i ); + int difference = right - item->GetBoundingBox().GetRight(); + + item->Move( wxPoint( difference, 0 ) ); + item->ViewUpdate(); + ratsnest->Update( item ); + } + + getModel()->GetRatsnest()->Recalculate(); + } + + setTransitions(); + + return 0; +} + + +static bool compareX( const BOARD_ITEM* aA, const BOARD_ITEM* aB ) +{ + return aA->GetBoundingBox().Centre().x < aB->GetBoundingBox().Centre().x; +} + + +static bool compareY( const BOARD_ITEM* aA, const BOARD_ITEM* aB ) +{ + return aA->GetBoundingBox().Centre().y < aB->GetBoundingBox().Centre().y; +} + + +int PLACEMENT_TOOL::DistributeHorizontally( TOOL_EVENT& aEvent ) +{ + const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); + + if( selection.Size() > 1 ) + { + PCB_BASE_FRAME* editFrame = getEditFrame(); + RN_DATA* ratsnest = getModel()->GetRatsnest(); + + editFrame->OnModify(); + editFrame->SaveCopyInUndoList( selection.items, UR_CHANGED ); + + // Prepare a list, so the items can be sorted by their X coordinate + std::list itemsList; + for( int i = 0; i < selection.Size(); ++i ) + itemsList.push_back( selection.Item( i ) ); + + // Sort items by X coordinate + itemsList.sort( compareX ); + + // Expected X coordinate for the next item (=minX) + int position = (*itemsList.begin())->GetBoundingBox().Centre().x; + + // X coordinate for the last item + const int maxX = (*itemsList.rbegin())->GetBoundingBox().Centre().x; + + // Distance between items + const int distance = ( maxX - position ) / ( itemsList.size() - 1 ); + + BOOST_FOREACH( BOARD_ITEM* item, itemsList ) + { + int difference = position - item->GetBoundingBox().Centre().x; + + item->Move( wxPoint( difference, 0 ) ); + item->ViewUpdate(); + ratsnest->Update( item ); + + position += distance; + } + + getModel()->GetRatsnest()->Recalculate(); + } + + setTransitions(); + + return 0; +} + + +int PLACEMENT_TOOL::DistributeVertically( TOOL_EVENT& aEvent ) +{ + const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); + + if( selection.Size() > 1 ) + { + PCB_BASE_FRAME* editFrame = getEditFrame(); + RN_DATA* ratsnest = getModel()->GetRatsnest(); + + editFrame->OnModify(); + editFrame->SaveCopyInUndoList( selection.items, UR_CHANGED ); + + // Prepare a list, so the items can be sorted by their Y coordinate + std::list itemsList; + for( int i = 0; i < selection.Size(); ++i ) + itemsList.push_back( selection.Item( i ) ); + + // Sort items by Y coordinate + itemsList.sort( compareY ); + + // Expected Y coordinate for the next item (=minY) + int position = (*itemsList.begin())->GetBoundingBox().Centre().y; + + // Y coordinate for the last item + const int maxY = (*itemsList.rbegin())->GetBoundingBox().Centre().y; + + // Distance between items + const int distance = ( maxY - position ) / ( itemsList.size() - 1 ); + + BOOST_FOREACH( BOARD_ITEM* item, itemsList ) + { + int difference = position - item->GetBoundingBox().Centre().y; + + item->Move( wxPoint( 0, difference ) ); + item->ViewUpdate(); + ratsnest->Update( item ); + + position += distance; + } + + getModel()->GetRatsnest()->Recalculate(); + } + + setTransitions(); + + return 0; +} + + +void PLACEMENT_TOOL::setTransitions() +{ + Go( &PLACEMENT_TOOL::AlignTop, COMMON_ACTIONS::alignTop.MakeEvent() ); + Go( &PLACEMENT_TOOL::AlignBottom, COMMON_ACTIONS::alignBottom.MakeEvent() ); + Go( &PLACEMENT_TOOL::AlignLeft, COMMON_ACTIONS::alignLeft.MakeEvent() ); + Go( &PLACEMENT_TOOL::AlignRight, COMMON_ACTIONS::alignRight.MakeEvent() ); + + Go( &PLACEMENT_TOOL::DistributeHorizontally, COMMON_ACTIONS::distributeHorizontally.MakeEvent() ); + Go( &PLACEMENT_TOOL::DistributeVertically, COMMON_ACTIONS::distributeVertically.MakeEvent() ); +} diff --git a/pcbnew/tools/placement_tool.h b/pcbnew/tools/placement_tool.h new file mode 100644 index 0000000000..09f6983ac2 --- /dev/null +++ b/pcbnew/tools/placement_tool.h @@ -0,0 +1,73 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 CERN + * @author Maciej Suminski + * + * 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 PLACEMENT_TOOL_H_ +#define PLACEMENT_TOOL_H_ + +#include + +class SELECTION_TOOL; + +/** + * TODO description + */ + +class PLACEMENT_TOOL : public TOOL_INTERACTIVE +{ +public: + PLACEMENT_TOOL(); + virtual ~PLACEMENT_TOOL(); + + /// @copydoc TOOL_INTERACTIVE::Reset() + void Reset( RESET_REASON aReason ) {}; + + /// @copydoc TOOL_INTERACTIVE::Init() + bool Init(); + + /// TODO + int AlignTop( TOOL_EVENT& aEvent ); + + /// TODO + int AlignBottom( TOOL_EVENT& aEvent ); + + /// TODO + int AlignLeft( TOOL_EVENT& aEvent ); + + /// TODO + int AlignRight( TOOL_EVENT& aEvent ); + + /// TODO + int DistributeHorizontally( TOOL_EVENT& aEvent ); + + /// TODO + int DistributeVertically( TOOL_EVENT& aEvent ); + +private: + /// TODO + void setTransitions(); + + SELECTION_TOOL* m_selectionTool; +}; + +#endif /* PLACEMENT_TOOL_H_ */ From 77d8b2d84e0c268ec211d420ddd58b99b393ea50 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 14:23:13 +0200 Subject: [PATCH 631/741] Context menu for the Placement Tool. --- pcbnew/router/router_tool.cpp | 2 +- pcbnew/tools/placement_tool.cpp | 11 ++++++++++- pcbnew/tools/selection_tool.cpp | 6 ++++++ pcbnew/tools/selection_tool.h | 9 +++++++++ 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index f961722180..312b060920 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -220,7 +220,7 @@ public: Add( ACT_CustomTrackWidth ); - AppendSeparator ( ); + AppendSeparator(); Add( ACT_RouterOptions ); } }; diff --git a/pcbnew/tools/placement_tool.cpp b/pcbnew/tools/placement_tool.cpp index 05ac2522ba..5305d855ee 100644 --- a/pcbnew/tools/placement_tool.cpp +++ b/pcbnew/tools/placement_tool.cpp @@ -54,7 +54,16 @@ bool PLACEMENT_TOOL::Init() return false; } - // TODO create a context menu and add it to the selection tool + // Create a context menu and make it available through selection tool + CONTEXT_MENU* menu = new CONTEXT_MENU; + menu->Add( COMMON_ACTIONS::alignTop ); + menu->Add( COMMON_ACTIONS::alignBottom ); + menu->Add( COMMON_ACTIONS::alignLeft ); + menu->Add( COMMON_ACTIONS::alignRight ); + menu->AppendSeparator(); + menu->Add( COMMON_ACTIONS::distributeHorizontally ); + menu->Add( COMMON_ACTIONS::distributeVertically ); + m_selectionTool->AddSubMenu( menu, wxString( "Placement" ) ); setTransitions(); diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index ac9f1aa51c..d0abb1d60a 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -198,6 +198,12 @@ void SELECTION_TOOL::AddMenuItem( const TOOL_ACTION& aAction ) } +void SELECTION_TOOL::AddSubMenu( CONTEXT_MENU* aMenu, const wxString& aLabel ) +{ + m_menu.AppendSubMenu( aMenu, aLabel ); +} + + void SELECTION_TOOL::toggleSelection( BOARD_ITEM* aItem ) { if( aItem->IsSelected() ) diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index 6f5e06606d..4891610d16 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -122,6 +122,15 @@ public: */ void AddMenuItem( const TOOL_ACTION& aAction ); + /** + * Function AddSubMenu() + * + * Adds a submenu to the selection tool right-click context menu. + * @param aMenu is the submenu to be added. + * @param aLabel is the label of added submenu. + */ + void AddSubMenu( CONTEXT_MENU* aMenu, const wxString& aLabel ); + /** * Function EditModules() * Toggles edit module mode. When enabled, one may select parts of modules individually From 4ac277028bd5b9a2d2415de7c879636c11386502 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 14:41:52 +0200 Subject: [PATCH 632/741] Code formatting. --- pcbnew/import_dxf/dxf2brd_items.cpp | 166 +++++++++++++--------------- pcbnew/import_dxf/dxf2brd_items.h | 96 ++++++++-------- 2 files changed, 124 insertions(+), 138 deletions(-) diff --git a/pcbnew/import_dxf/dxf2brd_items.cpp b/pcbnew/import_dxf/dxf2brd_items.cpp index 6cd7e86fc4..322b787670 100644 --- a/pcbnew/import_dxf/dxf2brd_items.cpp +++ b/pcbnew/import_dxf/dxf2brd_items.cpp @@ -67,13 +67,13 @@ DXF2BRD_CONVERTER::~DXF2BRD_CONVERTER() // coordinate conversions from dxf to internal units int DXF2BRD_CONVERTER::mapX( double aDxfCoordX ) { - return Millimeter2iu( m_xOffset + (aDxfCoordX * m_Dfx2mm) ); + return Millimeter2iu( m_xOffset + ( aDxfCoordX * m_Dfx2mm ) ); } int DXF2BRD_CONVERTER::mapY( double aDxfCoordY ) { - return Millimeter2iu( m_yOffset - (aDxfCoordY * m_Dfx2mm) ); + return Millimeter2iu( m_yOffset - ( aDxfCoordY * m_Dfx2mm ) ); } @@ -95,23 +95,22 @@ bool DXF2BRD_CONVERTER::ImportDxfFile( const wxString& aFile, BOARD* aBoard ) return success; } -// Add aItem the the board -// this item is also added to the list of new items -// (for undo command for instance) -void DXF2BRD_CONVERTER::appendToBoard( BOARD_ITEM * aItem ) + +void DXF2BRD_CONVERTER::appendToBoard( BOARD_ITEM* aItem ) { m_brd->Add( aItem ); m_newItemsList.push_back( aItem ); } + /* * Implementation of the method which handles layers. */ -void DXF2BRD_CONVERTER::addLayer( const DRW_Layer& data ) +void DXF2BRD_CONVERTER::addLayer( const DRW_Layer& aData ) { // Not yet useful in Pcbnew. #if 0 - wxString name = wxString::FromUTF8( data.name.c_str() ); + wxString name = wxString::FromUTF8( aData.name.c_str() ); wxLogMessage( name ); #endif } @@ -120,25 +119,20 @@ void DXF2BRD_CONVERTER::addLayer( const DRW_Layer& data ) /* * Import line entities. */ -void DXF2BRD_CONVERTER::addLine( const DRW_Line& data ) +void DXF2BRD_CONVERTER::addLine( const DRW_Line& aData ) { - DRAWSEGMENT* segm = new DRAWSEGMENT( m_brd ); + DRAWSEGMENT* segm = new DRAWSEGMENT( m_brd ); segm->SetLayer( ToLAYER_ID( m_brdLayer ) ); - - wxPoint start( mapX( data.basePoint.x ), mapY( data.basePoint.y ) ); - + wxPoint start( mapX( aData.basePoint.x ), mapY( aData.basePoint.y ) ); segm->SetStart( start ); - - wxPoint end( mapX( data.secPoint.x ), mapY( data.secPoint.y ) ); - + wxPoint end( mapX( aData.secPoint.x ), mapY( aData.secPoint.y ) ); segm->SetEnd( end ); - - segm->SetWidth( mapDim( data.thickness == 0 ? m_defaultThickness : data.thickness ) ); + segm->SetWidth( mapDim( aData.thickness == 0 ? m_defaultThickness : aData.thickness ) ); appendToBoard( segm ); } -void DXF2BRD_CONVERTER::addPolyline(const DRW_Polyline& data ) +void DXF2BRD_CONVERTER::addPolyline(const DRW_Polyline& aData ) { // Currently, Pcbnew does not know polylines, for boards. // So we have to convert a polyline to a set of segments. @@ -146,9 +140,9 @@ void DXF2BRD_CONVERTER::addPolyline(const DRW_Polyline& data ) wxPoint startpoint; - for( unsigned ii = 0; ii < data.vertlist.size(); ii++ ) + for( unsigned ii = 0; ii < aData.vertlist.size(); ii++ ) { - DRW_Vertex* vertex = data.vertlist[ii]; + DRW_Vertex* vertex = aData.vertlist[ii]; if( ii == 0 ) { @@ -163,14 +157,14 @@ void DXF2BRD_CONVERTER::addPolyline(const DRW_Polyline& data ) segm->SetStart( startpoint ); wxPoint endpoint( mapX( vertex->basePoint.x ), mapY( vertex->basePoint.y ) ); segm->SetEnd( endpoint ); - segm->SetWidth( mapDim( data.thickness == 0 ? m_defaultThickness - : data.thickness ) ); + segm->SetWidth( mapDim( aData.thickness == 0 ? m_defaultThickness + : aData.thickness ) ); appendToBoard( segm ); startpoint = endpoint; } } -void DXF2BRD_CONVERTER::addLWPolyline(const DRW_LWPolyline& data ) +void DXF2BRD_CONVERTER::addLWPolyline(const DRW_LWPolyline& aData ) { // Currently, Pcbnew does not know polylines, for boards. // So we have to convert a polyline to a set of segments. @@ -179,9 +173,9 @@ void DXF2BRD_CONVERTER::addLWPolyline(const DRW_LWPolyline& data ) // the variable width of each vertex (when exists) is not used. wxPoint startpoint; - for( unsigned ii = 0; ii < data.vertlist.size(); ii++ ) + for( unsigned ii = 0; ii < aData.vertlist.size(); ii++ ) { - DRW_Vertex2D* vertex = data.vertlist[ii]; + DRW_Vertex2D* vertex = aData.vertlist[ii]; if( ii == 0 ) { @@ -196,8 +190,8 @@ void DXF2BRD_CONVERTER::addLWPolyline(const DRW_LWPolyline& data ) segm->SetStart( startpoint ); wxPoint endpoint( mapX( vertex->x ), mapY( vertex->y ) ); segm->SetEnd( endpoint ); - segm->SetWidth( mapDim( data.thickness == 0 ? m_defaultThickness - : data.thickness ) ); + segm->SetWidth( mapDim( aData.thickness == 0 ? m_defaultThickness + : aData.thickness ) ); appendToBoard( segm ); startpoint = endpoint; } @@ -206,19 +200,17 @@ void DXF2BRD_CONVERTER::addLWPolyline(const DRW_LWPolyline& data ) /* * Import Circle entities. */ -void DXF2BRD_CONVERTER::addCircle( const DRW_Circle& data ) +void DXF2BRD_CONVERTER::addCircle( const DRW_Circle& aData ) { DRAWSEGMENT* segm = new DRAWSEGMENT( m_brd ); segm->SetLayer( ToLAYER_ID( m_brdLayer ) ); segm->SetShape( S_CIRCLE ); - wxPoint center( mapX( data.basePoint.x ), mapY( data.basePoint.y ) ); + wxPoint center( mapX( aData.basePoint.x ), mapY( aData.basePoint.y ) ); segm->SetCenter( center ); - wxPoint circle_start( mapX( data.basePoint.x + data.radious ), - mapY( data.basePoint.y ) ); + wxPoint circle_start( mapX( aData.basePoint.x + aData.radious ), mapY( aData.basePoint.y ) ); segm->SetArcStart( circle_start ); - segm->SetWidth( mapDim( data.thickness == 0 ? m_defaultThickness - : data.thickness ) ); + segm->SetWidth( mapDim( aData.thickness == 0 ? m_defaultThickness : aData.thickness ) ); appendToBoard( segm ); } @@ -256,25 +248,24 @@ void DXF2BRD_CONVERTER::addArc( const DRW_Arc& data ) segm->SetAngle( angle ); - segm->SetWidth( mapDim( data.thickness == 0 ? m_defaultThickness - : data.thickness ) ); + segm->SetWidth( mapDim( data.thickness == 0 ? m_defaultThickness : data.thickness ) ); appendToBoard( segm ); } /** * Import texts (TEXT). */ -void DXF2BRD_CONVERTER::addText(const DRW_Text& data) +void DXF2BRD_CONVERTER::addText( const DRW_Text& aData ) { - TEXTE_PCB* pcb_text = new TEXTE_PCB( m_brd ); + TEXTE_PCB* pcb_text = new TEXTE_PCB( m_brd ); pcb_text->SetLayer( ToLAYER_ID( m_brdLayer ) ); - wxPoint refPoint( mapX(data.basePoint.x), mapY(data.basePoint.y) ); - wxPoint secPoint( mapX(data.secPoint.x), mapY(data.secPoint.y) ); + wxPoint refPoint( mapX( aData.basePoint.x ), mapY( aData.basePoint.y ) ); + wxPoint secPoint( mapX( aData.secPoint.x ), mapY( aData.secPoint.y ) ); - if (data.alignV !=0 || data.alignH !=0 ||data.alignH ==DRW_Text::HMiddle) + if( aData.alignV != 0 || aData.alignH != 0 || aData.alignH == DRW_Text::HMiddle ) { - if (data.alignH !=DRW_Text::HAligned && data.alignH !=DRW_Text::HFit) + if( aData.alignH != DRW_Text::HAligned && aData.alignH != DRW_Text::HFit ) { wxPoint tmp = secPoint; secPoint = refPoint; @@ -282,7 +273,7 @@ void DXF2BRD_CONVERTER::addText(const DRW_Text& data) } } - switch( data.alignV ) + switch( aData.alignV ) { case DRW_Text::VBaseLine: pcb_text->SetVertJustify( GR_TEXT_VJUSTIFY_BOTTOM ); @@ -301,7 +292,7 @@ void DXF2BRD_CONVERTER::addText(const DRW_Text& data) break; } - switch( data.alignH ) + switch( aData.alignH ) { case DRW_Text::HLeft: pcb_text->SetHorizJustify( GR_TEXT_HJUSTIFY_LEFT ); @@ -332,13 +323,13 @@ void DXF2BRD_CONVERTER::addText(const DRW_Text& data) } #if 0 - wxString sty = wxString::FromUTF8(data.style.c_str()); + wxString sty = wxString::FromUTF8(aData.style.c_str()); sty=sty.ToLower(); - if (data.textgen==2) + if (aData.textgen==2) { // Text dir = left to right; - } else if (data.textgen==4) + } else if (aData.textgen==4) { / Text dir = top to bottom; } else @@ -346,15 +337,14 @@ void DXF2BRD_CONVERTER::addText(const DRW_Text& data) } #endif - wxString text = toNativeString( wxString::FromUTF8( data.text.c_str() ) ); + wxString text = toNativeString( wxString::FromUTF8( aData.text.c_str() ) ); pcb_text->SetTextPosition( refPoint ); - pcb_text->SetOrientation( data.angle * 10 ); + pcb_text->SetOrientation( aData.angle * 10 ); // The 0.8 factor gives a better height/width ratio with our font - pcb_text->SetWidth( mapDim( data.height * 0.8 ) ); - pcb_text->SetHeight( mapDim( data.height ) ); - pcb_text->SetThickness( mapDim( data.thickness == 0 ? m_defaultThickness - : data.thickness ) ); + pcb_text->SetWidth( mapDim( aData.height * 0.8 ) ); + pcb_text->SetHeight( mapDim( aData.height ) ); + pcb_text->SetThickness( mapDim( aData.thickness == 0 ? m_defaultThickness : aData.thickness ) ); pcb_text->SetText( text ); appendToBoard( pcb_text ); @@ -364,9 +354,9 @@ void DXF2BRD_CONVERTER::addText(const DRW_Text& data) /** * Import multi line texts (MTEXT). */ -void DXF2BRD_CONVERTER::addMText( const DRW_MText& data ) +void DXF2BRD_CONVERTER::addMText( const DRW_MText& aData ) { - wxString text = toNativeString( wxString::FromUTF8( data.text.c_str() ) ); + wxString text = toNativeString( wxString::FromUTF8( aData.text.c_str() ) ); wxString attrib, tmp; /* Some texts start by '\' and have formating chars (font name, font option...) @@ -396,23 +386,21 @@ void DXF2BRD_CONVERTER::addMText( const DRW_MText& data ) TEXTE_PCB* pcb_text = new TEXTE_PCB( m_brd ); pcb_text->SetLayer( ToLAYER_ID( m_brdLayer ) ); - - wxPoint textpos( mapX( data.basePoint.x ), mapY( data.basePoint.y ) ); + wxPoint textpos( mapX( aData.basePoint.x ), mapY( aData.basePoint.y ) ); pcb_text->SetTextPosition( textpos ); - pcb_text->SetOrientation( data.angle * 10 ); + pcb_text->SetOrientation( aData.angle * 10 ); // The 0.8 factor gives a better height/width ratio with our font - pcb_text->SetWidth( mapDim( data.height * 0.8 ) ); - pcb_text->SetHeight( mapDim( data.height ) ); - pcb_text->SetThickness( mapDim( data.thickness == 0 ? m_defaultThickness - : data.thickness ) ); + pcb_text->SetWidth( mapDim( aData.height * 0.8 ) ); + pcb_text->SetHeight( mapDim( aData.height ) ); + pcb_text->SetThickness( mapDim( aData.thickness == 0 ? m_defaultThickness : aData.thickness ) ); pcb_text->SetText( text ); // Initialize text justifications: - if( data.textgen <= 3 ) + if( aData.textgen <= 3 ) { pcb_text->SetVertJustify( GR_TEXT_VJUSTIFY_TOP ); } - else if( data.textgen <= 6 ) + else if( aData.textgen <= 6 ) { pcb_text->SetVertJustify( GR_TEXT_VJUSTIFY_CENTER ); } @@ -421,11 +409,11 @@ void DXF2BRD_CONVERTER::addMText( const DRW_MText& data ) pcb_text->SetVertJustify( GR_TEXT_VJUSTIFY_BOTTOM ); } - if( data.textgen % 3 == 1 ) + if( aData.textgen % 3 == 1 ) { pcb_text->SetHorizJustify( GR_TEXT_HJUSTIFY_LEFT ); } - else if( data.textgen % 3 == 2 ) + else if( aData.textgen % 3 == 2 ) { pcb_text->SetHorizJustify( GR_TEXT_HJUSTIFY_CENTER ); } @@ -448,7 +436,7 @@ void DXF2BRD_CONVERTER::addMText( const DRW_MText& data ) // use ByStyle; } - if( data.alignV==1 ) + if( aData.alignV==1 ) { // use AtLeast; } @@ -490,24 +478,24 @@ void DXF2BRD_CONVERTER::addHeader( const DRW_Header* data ) * - %%%d for a degree sign * - %%%p for a plus/minus sign */ -wxString DXF2BRD_CONVERTER::toDxfString( const wxString& str ) +wxString DXF2BRD_CONVERTER::toDxfString( const wxString& aStr ) { wxString res; int j = 0; - for( unsigned i = 0; i175 || c<11 ) + if( c > 175 || c < 11 ) { - res.append( str.Mid( j, i - j ) ); + res.append( aStr.Mid( j, i - j ) ); j = i; switch( c ) { case 0x0A: - res += wxT("\\P"); + res += wxT( "\\P" ); break; // diameter: @@ -517,17 +505,17 @@ wxString DXF2BRD_CONVERTER::toDxfString( const wxString& str ) #else case 0x2205: #endif - res += wxT("%%C"); + res += wxT( "%%C" ); break; // degree: case 0x00B0: - res += wxT("%%D"); + res += wxT( "%%D" ); break; // plus/minus case 0x00B1: - res += wxT("%%P"); + res += wxT( "%%P" ); break; default: @@ -539,7 +527,7 @@ wxString DXF2BRD_CONVERTER::toDxfString( const wxString& str ) } } - res.append( str.Mid( j ) ); + res.append( aStr.Mid( j ) ); return res; } @@ -547,26 +535,26 @@ wxString DXF2BRD_CONVERTER::toDxfString( const wxString& str ) /** * Converts a DXF encoded string into a native Unicode string. */ -wxString DXF2BRD_CONVERTER::toNativeString( const wxString& data ) +wxString DXF2BRD_CONVERTER::toNativeString( const wxString& aData ) { wxString res; // Ignore font tags: int j = 0; - for( unsigned i = 0; i m_newItemsList; // The list of new items added - // to the board - BOARD * m_brd; + std::vector m_newItemsList; // The list of new items added to the board + BOARD* m_brd; double m_xOffset; // X coord offset for conversion (in mm) double m_yOffset; // Y coord offset for conversion (in mm) double m_defaultThickness; // default line thickness for conversion (in mm) double m_Dfx2mm; // The scale factor to convert DXF units to mm // Seems DRW_Interface always converts DXF coordinates in mm // (to be confirmed) - int m_brdLayer; // The board layer to place imported dfx items + int m_brdLayer; // The board layer to place imported dfx items int m_version; // the dxf version, not used here std::string m_codePage; // The code page, not used here @@ -85,7 +84,7 @@ public: * @param aFile = the full filename. * @param aBoard = where to store the graphical items and text */ - bool ImportDxfFile( const wxString& aFile, BOARD * aBoard ); + bool ImportDxfFile( const wxString& aFile, BOARD* aBoard ); /** * @return the list of new BOARD_ITEM @@ -104,65 +103,65 @@ private: // Add aItem the the board // this item is also added to the list of new items // (for undo command for instance) - void appendToBoard( BOARD_ITEM * aItem ); + void appendToBoard( BOARD_ITEM* aItem ); // Methods from DRW_CreationInterface: // They are "call back" fonctions, called when the corresponding object // is read in dxf file // Depending of the application, they can do something or not - virtual void addHeader( const DRW_Header* data ); - virtual void addLType( const DRW_LType& data ){} - virtual void addLayer( const DRW_Layer& data ); - virtual void addDimStyle( const DRW_Dimstyle& data ){} - virtual void addBlock(const DRW_Block& data ){} - virtual void endBlock(){} - virtual void addPoint(const DRW_Point& data ){} - virtual void addLine(const DRW_Line& data); - virtual void addRay(const DRW_Ray& data ){} - virtual void addXline(const DRW_Xline& data ){} - virtual void addCircle(const DRW_Circle& data ); - virtual void addArc(const DRW_Arc& data ); - virtual void addEllipse(const DRW_Ellipse& data ){} - virtual void addLWPolyline(const DRW_LWPolyline& data ); - virtual void addText(const DRW_Text& data ); - virtual void addPolyline(const DRW_Polyline& data ); - virtual void addSpline(const DRW_Spline* data ){} - virtual void addKnot(const DRW_Entity&) {} - virtual void addInsert(const DRW_Insert& data ){} - virtual void addTrace(const DRW_Trace& data ){} - virtual void addSolid(const DRW_Solid& data ){} - virtual void addMText(const DRW_MText& data); - virtual void addDimAlign(const DRW_DimAligned *data ){} - virtual void addDimLinear(const DRW_DimLinear *data ){} - virtual void addDimRadial(const DRW_DimRadial *data ){} - virtual void addDimDiametric(const DRW_DimDiametric *data ){} - virtual void addDimAngular(const DRW_DimAngular *data ){} - virtual void addDimAngular3P(const DRW_DimAngular3p *data ){} - virtual void addDimOrdinate(const DRW_DimOrdinate *data ){} - virtual void addLeader(const DRW_Leader *data ){} - virtual void addHatch(const DRW_Hatch* data ){} - virtual void addImage(const DRW_Image* data ){} - virtual void linkImage(const DRW_ImageDef* data ){} + virtual void addHeader( const DRW_Header* aData ); + virtual void addLType( const DRW_LType& aData ) {} + virtual void addLayer( const DRW_Layer& aData ); + virtual void addDimStyle( const DRW_Dimstyle& aData ) {} + virtual void addBlock( const DRW_Block& aData ) {} + virtual void endBlock() {} + virtual void addPoint( const DRW_Point& aData ) {} + virtual void addLine( const DRW_Line& aData); + virtual void addRay( const DRW_Ray& aData ) {} + virtual void addXline( const DRW_Xline& aData ) {} + virtual void addCircle( const DRW_Circle& aData ); + virtual void addArc( const DRW_Arc& aData ); + virtual void addEllipse( const DRW_Ellipse& aData ) {} + virtual void addLWPolyline( const DRW_LWPolyline& aData ); + virtual void addText( const DRW_Text& aData ); + virtual void addPolyline( const DRW_Polyline& aData ); + virtual void addSpline( const DRW_Spline* aData ) {} + virtual void addKnot( const DRW_Entity&) {} + virtual void addInsert( const DRW_Insert& aData ){} + virtual void addTrace( const DRW_Trace& aData ){} + virtual void addSolid( const DRW_Solid& aData ){} + virtual void addMText( const DRW_MText& aData); + virtual void addDimAlign( const DRW_DimAligned* aData ) {} + virtual void addDimLinear( const DRW_DimLinear* aData ) {} + virtual void addDimRadial( const DRW_DimRadial* aData ) {} + virtual void addDimDiametric( const DRW_DimDiametric* aData ) {} + virtual void addDimAngular( const DRW_DimAngular* aData ) {} + virtual void addDimAngular3P( const DRW_DimAngular3p* aData ) {} + virtual void addDimOrdinate( const DRW_DimOrdinate* aData ) {} + virtual void addLeader( const DRW_Leader* aData ) {} + virtual void addHatch( const DRW_Hatch* aData ) {} + virtual void addImage( const DRW_Image* aData ) {} + virtual void linkImage( const DRW_ImageDef* aData ) {} - virtual void add3dFace(const DRW_3Dface& data ){} - virtual void addComment(const char*){} + virtual void add3dFace( const DRW_3Dface& aData ) {} + virtual void addComment( const char*) {} - virtual void addVport(const DRW_Vport& data) {} + virtual void addVport( const DRW_Vport& aData ) {} - virtual void addTextStyle(const DRW_Textstyle& data); + virtual void addTextStyle( const DRW_Textstyle& aData ); - virtual void addViewport(const DRW_Viewport& data) {} + virtual void addViewport( const DRW_Viewport& aData ) {} - virtual void setBlock(const int handle) {} + virtual void setBlock( const int aHandle ) {} - static wxString toDxfString(const wxString& str); - static wxString toNativeString(const wxString& data); + static wxString toDxfString( const wxString& aStr ); + static wxString toNativeString( const wxString& aData ); // These functions are not used in Kicad. // But because they are virtual pure in DRW_Interface, they should be defined virtual void writeTextstyles() {} virtual void writeVports() {} - virtual void writeHeader(DRW_Header& data) {} + virtual void writeHeader( DRW_Header& aData ) {} virtual void writeEntities() {} virtual void writeLTypes() {} virtual void writeLayers() {} @@ -172,7 +171,6 @@ private: void writeLine(); void writeMtext(); - }; #endif // FILTERDXFRW_H From b2a601756e10b24a21bfccfc79c0ebcd639a9a68 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 15:02:56 +0200 Subject: [PATCH 633/741] Refactored DXF import routines: - DIALOG_DXF_IMPORT works with PCB_BASE_FRAME instead of PCB_EDIT_FRAME - imported items are not immediately added to a BOARD - imported items are held in a list, instead of vector - imported items are instantly visible in GAL view - added DIALOG_DXF_IMPORT::GetImportedItems() - code formatting --- pcbnew/edit.cpp | 3 +- pcbnew/import_dxf/dialog_dxf_import.cpp | 89 +++++++++++++++---------- pcbnew/import_dxf/dxf2brd_items.cpp | 40 +++++------ pcbnew/import_dxf/dxf2brd_items.h | 14 ++-- pcbnew/invoke_pcb_dialog.h | 13 ++-- 5 files changed, 82 insertions(+), 77 deletions(-) diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index efb92a7064..79fc20b730 100644 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -1219,8 +1219,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) default: wxString msg; - msg.Printf( wxT( "PCB_EDIT_FRAME::Process_Special_Functions() unknown event id %d" ), - id ); + msg.Printf( wxT( "PCB_EDIT_FRAME::Process_Special_Functions() unknown event id %d" ), id ); DisplayError( this, msg ); break; } diff --git a/pcbnew/import_dxf/dialog_dxf_import.cpp b/pcbnew/import_dxf/dialog_dxf_import.cpp index f442b9a352..49ab35cd79 100644 --- a/pcbnew/import_dxf/dialog_dxf_import.cpp +++ b/pcbnew/import_dxf/dialog_dxf_import.cpp @@ -34,6 +34,8 @@ #include #include #include +#include +#include // Keys to store setup in config @@ -43,20 +45,29 @@ class DIALOG_DXF_IMPORT : public DIALOG_DXF_IMPORT_BASE { -private: - PCB_EDIT_FRAME * m_parent; - wxConfigBase* m_config; // Current config - - static wxString m_dxfFilename; - static int m_offsetSelection; - static LAYER_NUM m_layer; - public: - - DIALOG_DXF_IMPORT( PCB_EDIT_FRAME* aParent ); + DIALOG_DXF_IMPORT( PCB_BASE_FRAME* aParent ); ~DIALOG_DXF_IMPORT(); + /** + * Function GetImportedItems() + * + * Returns a list of items imported from a DXF file. + */ + const std::list& GetImportedItems() const + { + return m_dxfImporter.GetItemsList(); + } + private: + PCB_BASE_FRAME* m_parent; + wxConfigBase* m_config; // Current config + DXF2BRD_CONVERTER m_dxfImporter; + + static wxString m_dxfFilename; + static int m_offsetSelection; + static LAYER_NUM m_layer; + // Virtual event handlers void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } void OnOKClick( wxCommandEvent& event ); @@ -70,8 +81,8 @@ int DIALOG_DXF_IMPORT::m_offsetSelection = 4; LAYER_NUM DIALOG_DXF_IMPORT::m_layer = Dwgs_User; -DIALOG_DXF_IMPORT::DIALOG_DXF_IMPORT( PCB_EDIT_FRAME* aParent ) : - DIALOG_DXF_IMPORT_BASE( aParent ) +DIALOG_DXF_IMPORT::DIALOG_DXF_IMPORT( PCB_BASE_FRAME* aParent ) + : DIALOG_DXF_IMPORT_BASE( aParent ) { m_parent = aParent; m_config = Kiface().KifaceSettings(); @@ -130,7 +141,7 @@ void DIALOG_DXF_IMPORT::OnBrowseDxfFiles( wxCommandEvent& event ) wxFileDialog dlg( m_parent, wxT( "Open File" ), path, m_dxfFilename, - wxT( "dxf Files (*.dxf)|*.dxf|*.DXF" ), + wxT( "dxf Files (*.dxf)|*.dxf" ), wxFD_OPEN|wxFD_FILE_MUST_EXIST ); dlg.ShowModal(); @@ -143,6 +154,7 @@ void DIALOG_DXF_IMPORT::OnBrowseDxfFiles( wxCommandEvent& event ) m_textCtrlFileName->SetValue( fileName ); } + void DIALOG_DXF_IMPORT::OnOKClick( wxCommandEvent& event ) { m_dxfFilename = m_textCtrlFileName->GetValue(); @@ -173,41 +185,50 @@ void DIALOG_DXF_IMPORT::OnOKClick( wxCommandEvent& event ) break; } - BOARD * brd = m_parent->GetBoard(); - DXF2BRD_CONVERTER dxf_importer; - // Set coordinates offset for import (offset is given in mm) - dxf_importer.SetOffset( offsetX, offsetY ); + m_dxfImporter.SetOffset( offsetX, offsetY ); m_layer = m_SelLayerBox->GetLayerSelection(); - dxf_importer.SetBrdLayer( m_layer ); + m_dxfImporter.SetBrdLayer( m_layer ); // Read dxf file: - dxf_importer.ImportDxfFile( m_dxfFilename, brd ); - - // Prepare the undo list - std::vector& list = dxf_importer.GetItemsList(); - PICKED_ITEMS_LIST picklist; - - // Build the undo list - for( unsigned ii = 0; ii < list.size(); ii++ ) - { - ITEM_PICKER itemWrapper( list[ii], UR_NEW ); - picklist.PushItem( itemWrapper ); - } - - m_parent->SaveCopyInUndoList( picklist, UR_NEW, wxPoint(0,0) ); + m_dxfImporter.ImportDxfFile( m_dxfFilename ); EndModal( wxID_OK ); } -bool InvokeDXFDialogImport( PCB_EDIT_FRAME* aCaller ) +bool InvokeDXFDialogImport( PCB_BASE_FRAME* aCaller ) { DIALOG_DXF_IMPORT dlg( aCaller ); - bool success = dlg.ShowModal() == wxID_OK; + bool success = ( dlg.ShowModal() == wxID_OK ); if( success ) + { + // Prepare the undo list + const std::list& list = dlg.GetImportedItems(); + PICKED_ITEMS_LIST picklist; + + BOARD* board = aCaller->GetBoard(); + KIGFX::VIEW* view = aCaller->GetGalCanvas()->GetView(); + + // Build the undo list & add items to the current view + std::list::const_iterator it, itEnd; + for( it = list.begin(), itEnd = list.end(); it != itEnd; ++it ) + { + BOARD_ITEM* item = *it; + + board->Add( item ); + + ITEM_PICKER itemWrapper( item, UR_NEW ); + picklist.PushItem( itemWrapper ); + + if( aCaller->IsGalCanvasActive() ) + view->Add( item ); + } + + aCaller->SaveCopyInUndoList( picklist, UR_NEW, wxPoint( 0, 0 ) ); aCaller->OnModify(); + } return success; } diff --git a/pcbnew/import_dxf/dxf2brd_items.cpp b/pcbnew/import_dxf/dxf2brd_items.cpp index 322b787670..d9ffbbf63b 100644 --- a/pcbnew/import_dxf/dxf2brd_items.cpp +++ b/pcbnew/import_dxf/dxf2brd_items.cpp @@ -52,7 +52,6 @@ DXF2BRD_CONVERTER::DXF2BRD_CONVERTER() : DRW_Interface() m_xOffset = 0.0; // X coord offset for conversion (in mm) m_yOffset = 0.0; // Y coord offset for conversion (in mm) m_Dfx2mm = 1.0; // The scale factor to convert DXF units to mm - m_brd = NULL; m_version = 0; m_defaultThickness = 0.1; m_brdLayer = Dwgs_User; @@ -83,10 +82,8 @@ int DXF2BRD_CONVERTER::mapDim( double aDxfValue ) } -bool DXF2BRD_CONVERTER::ImportDxfFile( const wxString& aFile, BOARD* aBoard ) +bool DXF2BRD_CONVERTER::ImportDxfFile( const wxString& aFile ) { - m_brd = aBoard; - dxfRW* dxf = new dxfRW( aFile.ToUTF8() ); bool success = dxf->read( this, true ); @@ -96,13 +93,6 @@ bool DXF2BRD_CONVERTER::ImportDxfFile( const wxString& aFile, BOARD* aBoard ) } -void DXF2BRD_CONVERTER::appendToBoard( BOARD_ITEM* aItem ) -{ - m_brd->Add( aItem ); - m_newItemsList.push_back( aItem ); -} - - /* * Implementation of the method which handles layers. */ @@ -121,7 +111,7 @@ void DXF2BRD_CONVERTER::addLayer( const DRW_Layer& aData ) */ void DXF2BRD_CONVERTER::addLine( const DRW_Line& aData ) { - DRAWSEGMENT* segm = new DRAWSEGMENT( m_brd ); + DRAWSEGMENT* segm = new DRAWSEGMENT; segm->SetLayer( ToLAYER_ID( m_brdLayer ) ); wxPoint start( mapX( aData.basePoint.x ), mapY( aData.basePoint.y ) ); @@ -129,7 +119,7 @@ void DXF2BRD_CONVERTER::addLine( const DRW_Line& aData ) wxPoint end( mapX( aData.secPoint.x ), mapY( aData.secPoint.y ) ); segm->SetEnd( end ); segm->SetWidth( mapDim( aData.thickness == 0 ? m_defaultThickness : aData.thickness ) ); - appendToBoard( segm ); + m_newItemsList.push_back( segm ); } void DXF2BRD_CONVERTER::addPolyline(const DRW_Polyline& aData ) @@ -151,7 +141,7 @@ void DXF2BRD_CONVERTER::addPolyline(const DRW_Polyline& aData ) continue; } - DRAWSEGMENT* segm = new DRAWSEGMENT( m_brd ); + DRAWSEGMENT* segm = new DRAWSEGMENT( NULL ); segm->SetLayer( ToLAYER_ID( m_brdLayer ) ); segm->SetStart( startpoint ); @@ -159,7 +149,7 @@ void DXF2BRD_CONVERTER::addPolyline(const DRW_Polyline& aData ) segm->SetEnd( endpoint ); segm->SetWidth( mapDim( aData.thickness == 0 ? m_defaultThickness : aData.thickness ) ); - appendToBoard( segm ); + m_newItemsList.push_back( segm ); startpoint = endpoint; } } @@ -184,7 +174,7 @@ void DXF2BRD_CONVERTER::addLWPolyline(const DRW_LWPolyline& aData ) continue; } - DRAWSEGMENT* segm = new DRAWSEGMENT( m_brd ); + DRAWSEGMENT* segm = new DRAWSEGMENT( NULL ); segm->SetLayer( ToLAYER_ID( m_brdLayer ) ); segm->SetStart( startpoint ); @@ -192,7 +182,7 @@ void DXF2BRD_CONVERTER::addLWPolyline(const DRW_LWPolyline& aData ) segm->SetEnd( endpoint ); segm->SetWidth( mapDim( aData.thickness == 0 ? m_defaultThickness : aData.thickness ) ); - appendToBoard( segm ); + m_newItemsList.push_back( segm ); startpoint = endpoint; } } @@ -202,7 +192,7 @@ void DXF2BRD_CONVERTER::addLWPolyline(const DRW_LWPolyline& aData ) */ void DXF2BRD_CONVERTER::addCircle( const DRW_Circle& aData ) { - DRAWSEGMENT* segm = new DRAWSEGMENT( m_brd ); + DRAWSEGMENT* segm = new DRAWSEGMENT; segm->SetLayer( ToLAYER_ID( m_brdLayer ) ); segm->SetShape( S_CIRCLE ); @@ -211,7 +201,7 @@ void DXF2BRD_CONVERTER::addCircle( const DRW_Circle& aData ) wxPoint circle_start( mapX( aData.basePoint.x + aData.radious ), mapY( aData.basePoint.y ) ); segm->SetArcStart( circle_start ); segm->SetWidth( mapDim( aData.thickness == 0 ? m_defaultThickness : aData.thickness ) ); - appendToBoard( segm ); + m_newItemsList.push_back( segm ); } @@ -220,7 +210,7 @@ void DXF2BRD_CONVERTER::addCircle( const DRW_Circle& aData ) */ void DXF2BRD_CONVERTER::addArc( const DRW_Arc& data ) { - DRAWSEGMENT* segm = new DRAWSEGMENT( m_brd ); + DRAWSEGMENT* segm = new DRAWSEGMENT; segm->SetLayer( ToLAYER_ID( m_brdLayer ) ); segm->SetShape( S_ARC ); @@ -249,7 +239,7 @@ void DXF2BRD_CONVERTER::addArc( const DRW_Arc& data ) segm->SetAngle( angle ); segm->SetWidth( mapDim( data.thickness == 0 ? m_defaultThickness : data.thickness ) ); - appendToBoard( segm ); + m_newItemsList.push_back( segm ); } /** @@ -257,7 +247,7 @@ void DXF2BRD_CONVERTER::addArc( const DRW_Arc& data ) */ void DXF2BRD_CONVERTER::addText( const DRW_Text& aData ) { - TEXTE_PCB* pcb_text = new TEXTE_PCB( m_brd ); + TEXTE_PCB* pcb_text = new TEXTE_PCB( NULL ); pcb_text->SetLayer( ToLAYER_ID( m_brdLayer ) ); wxPoint refPoint( mapX( aData.basePoint.x ), mapY( aData.basePoint.y ) ); @@ -347,7 +337,7 @@ void DXF2BRD_CONVERTER::addText( const DRW_Text& aData ) pcb_text->SetThickness( mapDim( aData.thickness == 0 ? m_defaultThickness : aData.thickness ) ); pcb_text->SetText( text ); - appendToBoard( pcb_text ); + m_newItemsList.push_back( pcb_text ); } @@ -384,7 +374,7 @@ void DXF2BRD_CONVERTER::addMText( const DRW_MText& aData ) text = tmp; } - TEXTE_PCB* pcb_text = new TEXTE_PCB( m_brd ); + TEXTE_PCB* pcb_text = new TEXTE_PCB( NULL ); pcb_text->SetLayer( ToLAYER_ID( m_brdLayer ) ); wxPoint textpos( mapX( aData.basePoint.x ), mapY( aData.basePoint.y ) ); pcb_text->SetTextPosition( textpos ); @@ -446,7 +436,7 @@ void DXF2BRD_CONVERTER::addMText( const DRW_MText& aData ) } #endif - appendToBoard( pcb_text ); + m_newItemsList.push_back( pcb_text ); } diff --git a/pcbnew/import_dxf/dxf2brd_items.h b/pcbnew/import_dxf/dxf2brd_items.h index f89e4b88d0..f4be640138 100644 --- a/pcbnew/import_dxf/dxf2brd_items.h +++ b/pcbnew/import_dxf/dxf2brd_items.h @@ -28,6 +28,7 @@ #include "drw_interface.h" #include "wx/wx.h" +#include class BOARD; class BOARD_ITEM; @@ -41,8 +42,7 @@ class BOARD_ITEM; class DXF2BRD_CONVERTER : public DRW_Interface { private: - std::vector m_newItemsList; // The list of new items added to the board - BOARD* m_brd; + std::list m_newItemsList; // The list of new items added to the board double m_xOffset; // X coord offset for conversion (in mm) double m_yOffset; // Y coord offset for conversion (in mm) double m_defaultThickness; // default line thickness for conversion (in mm) @@ -82,14 +82,13 @@ public: * with this filter. * * @param aFile = the full filename. - * @param aBoard = where to store the graphical items and text */ - bool ImportDxfFile( const wxString& aFile, BOARD* aBoard ); + bool ImportDxfFile( const wxString& aFile ); /** * @return the list of new BOARD_ITEM */ - std::vector& GetItemsList() + const std::list& GetItemsList() const { return m_newItemsList; } @@ -100,11 +99,6 @@ private: int mapY( double aDxfCoordY ); int mapDim( double aDxfValue ); - // Add aItem the the board - // this item is also added to the list of new items - // (for undo command for instance) - void appendToBoard( BOARD_ITEM* aItem ); - // Methods from DRW_CreationInterface: // They are "call back" fonctions, called when the corresponding object // is read in dxf file diff --git a/pcbnew/invoke_pcb_dialog.h b/pcbnew/invoke_pcb_dialog.h index ff9e89e40a..151ce609a6 100644 --- a/pcbnew/invoke_pcb_dialog.h +++ b/pcbnew/invoke_pcb_dialog.h @@ -49,10 +49,11 @@ class wxSize; //class wxRealPoint; class wxString; +class BOARD; // Often this is not used in the prototypes, since wxFrame is good enough and would // represent maximum information hiding. -class PCB_EDIT_FRAME; +class PCB_BASE_FRAME; class FP_LIB_TABLE; class BOARD; class PCB_PLOT_PARAMS; @@ -81,13 +82,13 @@ void InvokePluginOptionsEditor( wxTopLevelWindow* aCaller, const wxString& aNick const wxString& aPluginType, const wxString& aOptions, wxString* aResult ); /** - * Function InvokePcbLibTableEditor - * shows the modal DIALOG_FP_LIB_TABLE for purposes of editing two lib tables. - * + * Function InvokeDXFDialogBoardImport + * shows the modal DIALOG_DXF_IMPORT for importing a DXF file to a board. + * @param aCaller is the wxTopLevelWindow which is invoking the dialog. - * @return true if the ilport was made. + * @return true if the import was made. */ -bool InvokeDXFDialogImport( PCB_EDIT_FRAME* aCaller ); +bool InvokeDXFDialogImport( PCB_BASE_FRAME* aCaller ); /** * Function InvokeLayerSetup From da67880907a05aca6d75dd362850d0d361d902ce Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 15:02:56 +0200 Subject: [PATCH 634/741] DXF files import is supported by module editor. --- pcbnew/edit.cpp | 2 +- pcbnew/import_dxf/dialog_dxf_import.cpp | 70 ++++++++++++++++++++++++- pcbnew/invoke_pcb_dialog.h | 12 ++++- pcbnew/menubar_modedit.cpp | 7 +++ pcbnew/modedit.cpp | 6 +++ pcbnew/moduleframe.cpp | 1 + 6 files changed, 94 insertions(+), 4 deletions(-) diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index 79fc20b730..787a73827e 100644 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -1213,7 +1213,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) break; case ID_GEN_IMPORT_DXF_FILE: - InvokeDXFDialogImport( this ); + InvokeDXFDialogBoardImport( this ); m_canvas->Refresh(); break; diff --git a/pcbnew/import_dxf/dialog_dxf_import.cpp b/pcbnew/import_dxf/dialog_dxf_import.cpp index 49ab35cd79..612fba07c4 100644 --- a/pcbnew/import_dxf/dialog_dxf_import.cpp +++ b/pcbnew/import_dxf/dialog_dxf_import.cpp @@ -35,7 +35,12 @@ #include #include #include + #include +#include +#include +#include +#include // Keys to store setup in config @@ -197,7 +202,7 @@ void DIALOG_DXF_IMPORT::OnOKClick( wxCommandEvent& event ) } -bool InvokeDXFDialogImport( PCB_BASE_FRAME* aCaller ) +bool InvokeDXFDialogBoardImport( PCB_BASE_FRAME* aCaller ) { DIALOG_DXF_IMPORT dlg( aCaller ); bool success = ( dlg.ShowModal() == wxID_OK ); @@ -216,7 +221,6 @@ bool InvokeDXFDialogImport( PCB_BASE_FRAME* aCaller ) for( it = list.begin(), itEnd = list.end(); it != itEnd; ++it ) { BOARD_ITEM* item = *it; - board->Add( item ); ITEM_PICKER itemWrapper( item, UR_NEW ); @@ -232,3 +236,65 @@ bool InvokeDXFDialogImport( PCB_BASE_FRAME* aCaller ) return success; } + + +bool InvokeDXFDialogModuleImport( PCB_BASE_FRAME* aCaller, MODULE* aModule ) +{ + DIALOG_DXF_IMPORT dlg( aCaller ); + bool success = ( dlg.ShowModal() == wxID_OK ); + + if( success ) + { + // Prepare the undo list + const std::list& list = dlg.GetImportedItems(); + PICKED_ITEMS_LIST picklist; + + MODULE* module = aCaller->GetBoard()->m_Modules; + KIGFX::VIEW* view = aCaller->GetGalCanvas()->GetView(); + + aCaller->SaveCopyInUndoList( module, UR_MODEDIT ); + aCaller->OnModify(); + + // Build the undo list & add items to the current view + std::list::const_iterator it, itEnd; + for( it = list.begin(), itEnd = list.end(); it != itEnd; ++it ) + { + BOARD_ITEM* item = *it; + BOARD_ITEM* converted = NULL; + + // Modules use different types for the same things, + // so we need to convert imported items to appropriate classes. + switch( item->Type() ) + { + case PCB_LINE_T: + { + converted = new EDGE_MODULE( module ); + *static_cast( converted ) = *static_cast( item ); + module->Add( converted ); + static_cast( converted )->SetLocalCoord(); + delete item; + break; + } + + case PCB_TEXT_T: + { + converted = new TEXTE_MODULE( module ); + *static_cast( converted ) = *static_cast( item ); + module->Add( module ); + static_cast( converted )->SetLocalCoord(); + delete item; + break; + } + + default: + assert( false ); // there is a type that is currently not handled here + break; + } + + if( aCaller->IsGalCanvasActive() ) + view->Add( converted ); + } + } + + return success; +} diff --git a/pcbnew/invoke_pcb_dialog.h b/pcbnew/invoke_pcb_dialog.h index 151ce609a6..5f264ca000 100644 --- a/pcbnew/invoke_pcb_dialog.h +++ b/pcbnew/invoke_pcb_dialog.h @@ -50,6 +50,7 @@ class wxSize; class wxString; class BOARD; +class MODULE; // Often this is not used in the prototypes, since wxFrame is good enough and would // represent maximum information hiding. @@ -88,7 +89,16 @@ void InvokePluginOptionsEditor( wxTopLevelWindow* aCaller, const wxString& aNick * @param aCaller is the wxTopLevelWindow which is invoking the dialog. * @return true if the import was made. */ -bool InvokeDXFDialogImport( PCB_BASE_FRAME* aCaller ); +bool InvokeDXFDialogBoardImport( PCB_BASE_FRAME* aCaller ); + +/** + * Function InvokeDXFDialogModuleImport + * shows the modal DIALOG_DXF_IMPORT for importing a DXF file.to a module. + * + * @param aCaller is the wxTopLevelWindow which is invoking the dialog. + * @return true if the import was made. + */ +bool InvokeDXFDialogModuleImport( PCB_BASE_FRAME* aCaller, MODULE* aModule ); /** * Function InvokeLayerSetup diff --git a/pcbnew/menubar_modedit.cpp b/pcbnew/menubar_modedit.cpp index ffbe9a681f..418cc5c342 100644 --- a/pcbnew/menubar_modedit.cpp +++ b/pcbnew/menubar_modedit.cpp @@ -125,6 +125,13 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar() _( "&Export Module" ), _( "Save current loaded module into file" ), KiBitmap( export_module_xpm ) ); + + // Import DXF File + AddMenuItem( fileMenu, ID_GEN_IMPORT_DXF_FILE, + _( "&Import DXF File" ), + _( "Import a 2D Drawing DXF file to Pcbnew on the Drawings layer" ), + KiBitmap( import_xpm ) ); + fileMenu->AppendSeparator(); // Print diff --git a/pcbnew/modedit.cpp b/pcbnew/modedit.cpp index c813011dd6..3abe8f08ad 100644 --- a/pcbnew/modedit.cpp +++ b/pcbnew/modedit.cpp @@ -39,6 +39,7 @@ #include #include #include +#include #include #include @@ -777,6 +778,11 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) HandleBlockEnd( &dc ); break; + case ID_GEN_IMPORT_DXF_FILE: + InvokeDXFDialogModuleImport( this, GetBoard()->m_Modules ); + m_canvas->Refresh(); + break; + default: DisplayError( this, wxT( "FOOTPRINT_EDIT_FRAME::Process_Special_Functions error" ) ); diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index 603e4e0838..f237b245e0 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -92,6 +92,7 @@ BEGIN_EVENT_TABLE( FOOTPRINT_EDIT_FRAME, PCB_BASE_FRAME ) EVT_TOOL( ID_MODEDIT_CREATE_NEW_LIB_AND_SAVE_CURRENT_PART, FOOTPRINT_EDIT_FRAME::Process_Special_Functions ) EVT_TOOL( ID_MODEDIT_SHEET_SET, FOOTPRINT_EDIT_FRAME::Process_Special_Functions ) + EVT_TOOL( ID_GEN_IMPORT_DXF_FILE, FOOTPRINT_EDIT_FRAME::Process_Special_Functions ) EVT_TOOL( wxID_PRINT, FOOTPRINT_EDIT_FRAME::ToPrinter ) EVT_TOOL( ID_MODEDIT_LOAD_MODULE, FOOTPRINT_EDIT_FRAME::Process_Special_Functions ) EVT_TOOL( ID_MODEDIT_CHECK, FOOTPRINT_EDIT_FRAME::Process_Special_Functions ) From 72c70148e859cd4a5c96ff215e69e6f2d8e62e11 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 15:02:56 +0200 Subject: [PATCH 635/741] Fixed a few memory leaks and Valgrind warnings. --- common/painter.cpp | 1 + include/tool/context_menu.h | 2 + include/wxPcbStruct.h | 3 +- pcbnew/CMakeLists.txt | 1 - pcbnew/basepcbframe.cpp | 3 + pcbnew/dialogs/dialog_track_via_size.cpp | 1 + pcbnew/layer_widget.cpp | 9 +++ pcbnew/layer_widget.h | 2 + pcbnew/pcbframe.cpp | 36 +++++++++++- pcbnew/router/pns_routing_settings.cpp | 10 ++++ pcbnew/router/pns_routing_settings.h | 11 +--- pcbnew/router/router_tool.h | 5 -- pcbnew/tools/pcb_tools.cpp | 71 ------------------------ pcbnew/tools/selection_tool.cpp | 2 +- 14 files changed, 68 insertions(+), 89 deletions(-) delete mode 100644 pcbnew/tools/pcb_tools.cpp diff --git a/common/painter.cpp b/common/painter.cpp index 785d479a1f..0d6b1f0399 100644 --- a/common/painter.cpp +++ b/common/painter.cpp @@ -38,6 +38,7 @@ RENDER_SETTINGS::RENDER_SETTINGS() m_highlightEnabled = false; m_hiContrastEnabled = false; m_hiContrastFactor = 0.2; + m_highlightNetcode = -1; m_outlineWidth = 1; m_worksheetLineWidth = 100000; diff --git a/include/tool/context_menu.h b/include/tool/context_menu.h index e50ef207c2..0b5f28c41b 100644 --- a/include/tool/context_menu.h +++ b/include/tool/context_menu.h @@ -47,6 +47,8 @@ public: ///> Copy constructor CONTEXT_MENU( const CONTEXT_MENU& aMenu ); + virtual ~CONTEXT_MENU() {}; + /** * Function SetTitle() * Sets title for the context menu. The title is shown as a text label shown on the top of diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index fa7d78323e..cc2650fcde 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -117,9 +117,8 @@ protected: bool m_useCmpFileForFpNames; ///< is true, use the .cmp file from CvPcb, else use the netlist // to know the footprint name of components. - // Functions that handle the Tool Framework (de)initalization + // The Tool Framework initalization void setupTools(); - void destroyTools(); // we'll use lower case function names for private member functions. void createPopUpMenuForZones( ZONE_CONTAINER* edge_zone, wxMenu* aPopMenu ); diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index bab69a7b37..624418055a 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -264,7 +264,6 @@ set( PCBNEW_CLASS_SRCS tools/edit_tool.cpp tools/pcbnew_control.cpp tools/pcb_editor_control.cpp - tools/pcb_tools.cpp tools/placement_tool.cpp tools/common_actions.cpp ) diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 3ff1a97f51..8369cb0a65 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -125,6 +125,9 @@ PCB_BASE_FRAME::~PCB_BASE_FRAME() { delete m_Collector; + delete m_toolManager; + delete m_toolDispatcher; + delete m_Pcb; delete GetGalCanvas(); } diff --git a/pcbnew/dialogs/dialog_track_via_size.cpp b/pcbnew/dialogs/dialog_track_via_size.cpp index 8a51cafdb4..07b681ad43 100644 --- a/pcbnew/dialogs/dialog_track_via_size.cpp +++ b/pcbnew/dialogs/dialog_track_via_size.cpp @@ -26,6 +26,7 @@ #include #include #include +#include DIALOG_TRACK_VIA_SIZE::DIALOG_TRACK_VIA_SIZE( wxWindow* aParent, PNS_ROUTING_SETTINGS& aSettings ) : DIALOG_TRACK_VIA_SIZE_BASE( aParent ), diff --git a/pcbnew/layer_widget.cpp b/pcbnew/layer_widget.cpp index df23c188e3..84cad5da02 100644 --- a/pcbnew/layer_widget.cpp +++ b/pcbnew/layer_widget.cpp @@ -587,6 +587,15 @@ LAYER_WIDGET::LAYER_WIDGET( wxWindow* aParent, wxWindow* aFocusOwner, int aPoint } +LAYER_WIDGET::~LAYER_WIDGET() +{ + delete m_BlankBitmap; + delete m_BlankAlternateBitmap; + delete m_RightArrowBitmap; + delete m_RightArrowAlternateBitmap; +} + + wxSize LAYER_WIDGET::GetBestSize() const { // size of m_LayerScrolledWindow -------------- diff --git a/pcbnew/layer_widget.h b/pcbnew/layer_widget.h index cfb6bc384f..e788cc4608 100644 --- a/pcbnew/layer_widget.h +++ b/pcbnew/layer_widget.h @@ -227,6 +227,8 @@ public: wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL ); + virtual ~LAYER_WIDGET(); + /** * Function GetBestSize * returns the preferred minimum size, taking into consideration the diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 45267d2e0a..e9c082533b 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -70,6 +70,17 @@ #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + #if defined(KICAD_SCRIPTING) || defined(KICAD_SCRIPTING_WXPYTHON) #include // The name of the pane info handling the python console: @@ -469,7 +480,6 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : PCB_EDIT_FRAME::~PCB_EDIT_FRAME() { - destroyTools(); m_RecordingMacros = -1; for( int i = 0; i < 10; i++ ) @@ -524,6 +534,30 @@ bool PCB_EDIT_FRAME::isAutoSaveRequired() const } +void PCB_EDIT_FRAME::setupTools() +{ + // Create the manager and dispatcher & route draw panel events to the dispatcher + m_toolManager = new TOOL_MANAGER; + m_toolManager->SetEnvironment( NULL, GetGalCanvas()->GetView(), + GetGalCanvas()->GetViewControls(), this ); + m_toolDispatcher = new TOOL_DISPATCHER( m_toolManager ); + + // Register tools + m_toolManager->RegisterTool( new SELECTION_TOOL ); + m_toolManager->RegisterTool( new ROUTER_TOOL ); + m_toolManager->RegisterTool( new EDIT_TOOL ); + m_toolManager->RegisterTool( new DRAWING_TOOL ); + m_toolManager->RegisterTool( new POINT_EDITOR ); + m_toolManager->RegisterTool( new PCBNEW_CONTROL ); + m_toolManager->RegisterTool( new PCB_EDITOR_CONTROL ); + m_toolManager->RegisterTool( new PLACEMENT_TOOL ); + m_toolManager->ResetTools( TOOL_BASE::RUN ); + + // Run the selection tool, it is supposed to be always active + m_toolManager->InvokeTool( "pcbnew.InteractiveSelection" ); +} + + void PCB_EDIT_FRAME::ReFillLayerWidget() { m_Layers->ReFill(); diff --git a/pcbnew/router/pns_routing_settings.cpp b/pcbnew/router/pns_routing_settings.cpp index cf87359674..bb67840fbe 100644 --- a/pcbnew/router/pns_routing_settings.cpp +++ b/pcbnew/router/pns_routing_settings.cpp @@ -19,6 +19,7 @@ */ #include "pns_routing_settings.h" +#include "direction.h" PNS_ROUTING_SETTINGS::PNS_ROUTING_SETTINGS() { @@ -39,6 +40,15 @@ PNS_ROUTING_SETTINGS::PNS_ROUTING_SETTINGS() } +const DIRECTION_45 PNS_ROUTING_SETTINGS::InitialDirection() const +{ + if( m_startDiagonal ) + return DIRECTION_45( DIRECTION_45::NE ); + else + return DIRECTION_45( DIRECTION_45::N ); +} + + TIME_LIMIT PNS_ROUTING_SETTINGS::ShoveTimeLimit() const { return TIME_LIMIT ( m_shoveTimeLimit ); diff --git a/pcbnew/router/pns_routing_settings.h b/pcbnew/router/pns_routing_settings.h index 5f6de3fa92..84cfb5bf7e 100644 --- a/pcbnew/router/pns_routing_settings.h +++ b/pcbnew/router/pns_routing_settings.h @@ -21,8 +21,9 @@ #ifndef __PNS_ROUTING_SETTINGS #define __PNS_ROUTING_SETTINGS -#include "direction.h" #include "time_limit.h" + +class DIRECTION_45; ///> Routing modes enum PNS_MODE @@ -118,13 +119,7 @@ public: void SetViaDrill( int aDrill ) { m_viaDrill = aDrill; } int GetViaDrill() const { return m_viaDrill; } - const DIRECTION_45 InitialDirection() const - { - if( m_startDiagonal ) - return DIRECTION_45( DIRECTION_45::NE ); - else - return DIRECTION_45( DIRECTION_45::N ); - } + const DIRECTION_45 InitialDirection() const; int ShoveIterationLimit() const; TIME_LIMIT ShoveTimeLimit() const; diff --git a/pcbnew/router/router_tool.h b/pcbnew/router/router_tool.h index 4ad339f3a5..06dc75b7fe 100644 --- a/pcbnew/router/router_tool.h +++ b/pcbnew/router/router_tool.h @@ -22,18 +22,13 @@ #ifndef __ROUTER_TOOL_H #define __ROUTER_TOOL_H -#include -#include - #include #include #include -#include #include -#include "pns_layerset.h" #include "pns_routing_settings.h" class PNS_ROUTER; diff --git a/pcbnew/tools/pcb_tools.cpp b/pcbnew/tools/pcb_tools.cpp deleted file mode 100644 index 9e604a0b04..0000000000 --- a/pcbnew/tools/pcb_tools.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/* - * This program source code file is part of KiCad, a free EDA CAD application. - * - * Copyright (C) 2013 CERN - * @author Tomasz Wlostowski - * - * 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 - -#include -#include - -#include - -#include "selection_tool.h" -#include "edit_tool.h" -#include "drawing_tool.h" -#include "point_editor.h" -#include "pcbnew_control.h" -#include "pcb_editor_control.h" -#include "placement_tool.h" -#include "common_actions.h" -#include - -void PCB_EDIT_FRAME::setupTools() -{ - // Create the manager and dispatcher & route draw panel events to the dispatcher - m_toolManager = new TOOL_MANAGER; - m_toolManager->SetEnvironment( NULL, GetGalCanvas()->GetView(), - GetGalCanvas()->GetViewControls(), this ); - m_toolDispatcher = new TOOL_DISPATCHER( m_toolManager ); - - // Register tools - m_toolManager->RegisterTool( new SELECTION_TOOL ); - m_toolManager->RegisterTool( new ROUTER_TOOL ); - m_toolManager->RegisterTool( new EDIT_TOOL ); - m_toolManager->RegisterTool( new DRAWING_TOOL ); - m_toolManager->RegisterTool( new POINT_EDITOR ); - m_toolManager->RegisterTool( new PCBNEW_CONTROL ); - m_toolManager->RegisterTool( new PCB_EDITOR_CONTROL ); - m_toolManager->RegisterTool( new PLACEMENT_TOOL ); - m_toolManager->ResetTools( TOOL_BASE::RUN ); - - // Run the selection tool, it is supposed to be always active - m_toolManager->InvokeTool( "pcbnew.InteractiveSelection" ); -} - - -void PCB_EDIT_FRAME::destroyTools() -{ - delete m_toolManager; - delete m_toolDispatcher; -} diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index d0abb1d60a..3ae883ed89 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -54,7 +54,7 @@ SELECTION_TOOL::SELECTION_TOOL() : SelectedEvent( TC_MESSAGE, TA_ACTION, "pcbnew.InteractiveSelection.selected" ), DeselectedEvent( TC_MESSAGE, TA_ACTION, "pcbnew.InteractiveSelection.deselected" ), ClearedEvent( TC_MESSAGE, TA_ACTION, "pcbnew.InteractiveSelection.cleared" ), - m_additive( false ), m_multiple( false ), m_editModules( false ) + m_frame( NULL ), m_additive( false ), m_multiple( false ), m_editModules( false ) { m_selArea = new SELECTION_AREA; m_selection.group = new KIGFX::VIEW_GROUP; From 445d935880861b3ae5eee05077a07929031604dc Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 15:02:56 +0200 Subject: [PATCH 636/741] Created dialog_dxf_import.h. Cleaned up some unnecessary stuff and fixed file open dialog DIALOG_DXF_IMPORT. --- pcbnew/import_dxf/dialog_dxf_import.cpp | 46 ++------------------ pcbnew/import_dxf/dialog_dxf_import.h | 58 +++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 42 deletions(-) create mode 100644 pcbnew/import_dxf/dialog_dxf_import.h diff --git a/pcbnew/import_dxf/dialog_dxf_import.cpp b/pcbnew/import_dxf/dialog_dxf_import.cpp index 612fba07c4..5f9ff5acf1 100644 --- a/pcbnew/import_dxf/dialog_dxf_import.cpp +++ b/pcbnew/import_dxf/dialog_dxf_import.cpp @@ -27,12 +27,10 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ +#include //#include #include -#include -#include #include -#include #include #include @@ -42,43 +40,11 @@ #include #include - // Keys to store setup in config #define DXF_IMPORT_LAYER_OPTION_KEY wxT("DxfImportBrdLayer") #define DXF_IMPORT_COORD_ORIGIN_KEY wxT("DxfImportCoordOrigin") #define DXF_IMPORT_LAST_FILE_KEY wxT("DxfImportLastFile") -class DIALOG_DXF_IMPORT : public DIALOG_DXF_IMPORT_BASE -{ -public: - DIALOG_DXF_IMPORT( PCB_BASE_FRAME* aParent ); - ~DIALOG_DXF_IMPORT(); - - /** - * Function GetImportedItems() - * - * Returns a list of items imported from a DXF file. - */ - const std::list& GetImportedItems() const - { - return m_dxfImporter.GetItemsList(); - } - -private: - PCB_BASE_FRAME* m_parent; - wxConfigBase* m_config; // Current config - DXF2BRD_CONVERTER m_dxfImporter; - - static wxString m_dxfFilename; - static int m_offsetSelection; - static LAYER_NUM m_layer; - - // Virtual event handlers - void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } - void OnOKClick( wxCommandEvent& event ); - void OnBrowseDxfFiles( wxCommandEvent& event ); -}; - // Static members of DIALOG_DXF_IMPORT, to remember // the user's choices during the session wxString DIALOG_DXF_IMPORT::m_dxfFilename; @@ -137,15 +103,17 @@ DIALOG_DXF_IMPORT::~DIALOG_DXF_IMPORT() void DIALOG_DXF_IMPORT::OnBrowseDxfFiles( wxCommandEvent& event ) { wxString path; + wxString filename; if( !m_dxfFilename.IsEmpty() ) { wxFileName fn( m_dxfFilename ); path = fn.GetPath(); + filename = fn.GetFullName(); } wxFileDialog dlg( m_parent, wxT( "Open File" ), - path, m_dxfFilename, + path, filename, wxT( "dxf Files (*.dxf)|*.dxf" ), wxFD_OPEN|wxFD_FILE_MUST_EXIST ); dlg.ShowModal(); @@ -209,14 +177,12 @@ bool InvokeDXFDialogBoardImport( PCB_BASE_FRAME* aCaller ) if( success ) { - // Prepare the undo list const std::list& list = dlg.GetImportedItems(); PICKED_ITEMS_LIST picklist; BOARD* board = aCaller->GetBoard(); KIGFX::VIEW* view = aCaller->GetGalCanvas()->GetView(); - // Build the undo list & add items to the current view std::list::const_iterator it, itEnd; for( it = list.begin(), itEnd = list.end(); it != itEnd; ++it ) { @@ -245,17 +211,13 @@ bool InvokeDXFDialogModuleImport( PCB_BASE_FRAME* aCaller, MODULE* aModule ) if( success ) { - // Prepare the undo list const std::list& list = dlg.GetImportedItems(); - PICKED_ITEMS_LIST picklist; - MODULE* module = aCaller->GetBoard()->m_Modules; KIGFX::VIEW* view = aCaller->GetGalCanvas()->GetView(); aCaller->SaveCopyInUndoList( module, UR_MODEDIT ); aCaller->OnModify(); - // Build the undo list & add items to the current view std::list::const_iterator it, itEnd; for( it = list.begin(), itEnd = list.end(); it != itEnd; ++it ) { diff --git a/pcbnew/import_dxf/dialog_dxf_import.h b/pcbnew/import_dxf/dialog_dxf_import.h new file mode 100644 index 0000000000..2785732841 --- /dev/null +++ b/pcbnew/import_dxf/dialog_dxf_import.h @@ -0,0 +1,58 @@ +/* + * 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. + * + * 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 +#include + +class DIALOG_DXF_IMPORT : public DIALOG_DXF_IMPORT_BASE +{ +public: + DIALOG_DXF_IMPORT( PCB_BASE_FRAME* aParent ); + ~DIALOG_DXF_IMPORT(); + + /** + * Function GetImportedItems() + * + * Returns a list of items imported from a DXF file. + */ + const std::list& GetImportedItems() const + { + return m_dxfImporter.GetItemsList(); + } + +private: + PCB_BASE_FRAME* m_parent; + wxConfigBase* m_config; // Current config + DXF2BRD_CONVERTER m_dxfImporter; + + static wxString m_dxfFilename; + static int m_offsetSelection; + static LAYER_NUM m_layer; + + // Virtual event handlers + void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } + void OnOKClick( wxCommandEvent& event ); + void OnBrowseDxfFiles( wxCommandEvent& event ); +}; From 47f1fec31d4e14b06eb1442eb9dcb7dd14e35080 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 15:02:56 +0200 Subject: [PATCH 637/741] DXF drawing placement tool for GAL. --- pcbnew/tools/common_actions.cpp | 7 ++ pcbnew/tools/common_actions.h | 3 + pcbnew/tools/drawing_tool.cpp | 192 ++++++++++++++++++++++++++++++++ pcbnew/tools/drawing_tool.h | 8 +- 4 files changed, 209 insertions(+), 1 deletion(-) diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index a1b6966a06..e8ac80fcef 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -109,6 +109,10 @@ TOOL_ACTION COMMON_ACTIONS::placePad( "pcbnew.InteractiveDrawing.placePad", AS_GLOBAL, 0, "Add pads", "Add pads", AF_ACTIVATE ); +TOOL_ACTION COMMON_ACTIONS::placeDXF( "pcbnew.InteractiveDrawing.placeDXF", + AS_GLOBAL, 0, + "", "", AF_ACTIVATE ); + TOOL_ACTION COMMON_ACTIONS::setAnchor( "pcbnew.InteractiveDrawing.setAnchor", AS_GLOBAL, 0, "Place the footprint anchor", "Place the footprint anchor", @@ -358,6 +362,9 @@ boost::optional COMMON_ACTIONS::TranslateLegacyId( int aId ) case ID_MODEDIT_PAD_TOOL: return COMMON_ACTIONS::placePad.MakeEvent(); + case ID_GEN_IMPORT_DXF_FILE: + return COMMON_ACTIONS::placeDXF.MakeEvent(); + case ID_MODEDIT_ANCHOR_TOOL: return COMMON_ACTIONS::setAnchor.MakeEvent(); diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index 2cd367c05d..2abaf054bd 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -99,6 +99,9 @@ public: /// Activation of the drawing tool (placing a PAD) static TOOL_ACTION placePad; + /// Activation of the drawing tool (placing a drawing from DXF file) + static TOOL_ACTION placeDXF; + /// Activation of the drawing tool (placing the footprint anchor) static TOOL_ACTION setAnchor; diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index d3da87ce44..dda1d36b6e 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -700,6 +701,196 @@ int DRAWING_TOOL::PlacePad( TOOL_EVENT& aEvent ) } +int DRAWING_TOOL::PlaceDXF( TOOL_EVENT& aEvent ) +{ + DIALOG_DXF_IMPORT dlg( m_frame ); + int dlgResult = dlg.ShowModal(); + + const std::list& list = dlg.GetImportedItems(); + MODULE* module = m_board->m_Modules; + + if( dlgResult != wxID_OK || module == NULL || list.empty() ) + { + setTransitions(); + + return 0; + } + + VECTOR2I cursorPos = m_controls->GetCursorPosition(); + VECTOR2I delta = cursorPos - (*list.begin())->GetPosition(); + + // Add a VIEW_GROUP that serves as a preview for the new item + KIGFX::VIEW_GROUP preview( m_view ); + + // Build the undo list & add items to the current view + std::list::const_iterator it, itEnd; + for( it = list.begin(), itEnd = list.end(); it != itEnd; ++it ) + { + BOARD_ITEM* item = *it; + BOARD_ITEM* converted = NULL; + + // Modules use different types for the same things, + // so we need to convert imported items to appropriate classes. + switch( item->Type() ) + { + case PCB_LINE_T: + { + if( m_editModules ) + { + converted = new EDGE_MODULE( module ); + *static_cast( converted ) = *static_cast( item ); + converted->Move( wxPoint( delta.x, delta.y ) ); + preview.Add( converted ); + delete item; + } + else + { + preview.Add( item ); + } + + break; + } + + case PCB_TEXT_T: + { + if( m_editModules ) + { + converted = new TEXTE_MODULE( module ); + *static_cast( converted ) = *static_cast( item ); + converted->Move( wxPoint( delta.x, delta.y ) ); + preview.Add( converted ); + delete item; + } + else + { + preview.Add( item ); + } + break; + } + + default: + assert( false ); // there is a type that is currently not handled here + break; + } + } + + BOARD_ITEM* firstItem = static_cast( *preview.Begin() ); + m_view->Add( &preview ); + + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + m_controls->ShowCursor( true ); + m_controls->SetSnapping( true ); + + Activate(); + + // Main loop: keep receiving events + while( OPT_TOOL_EVENT evt = Wait() ) + { + cursorPos = m_controls->GetCursorPosition(); + + if( evt->IsMotion() ) + { + delta = cursorPos - firstItem->GetPosition(); + + for( KIGFX::VIEW_GROUP::iter it = preview.Begin(), end = preview.End(); it != end; ++it ) + static_cast( *it )->Move( wxPoint( delta.x, delta.y ) ); + + preview.ViewUpdate(); + } + + else if( evt->Category() == TC_COMMAND ) + { + if( evt->IsAction( &COMMON_ACTIONS::rotate ) ) + { + for( KIGFX::VIEW_GROUP::iter it = preview.Begin(), end = preview.End(); it != end; ++it ) + static_cast( *it )->Rotate( wxPoint( cursorPos.x, cursorPos.y ), + m_frame->GetRotationAngle() ); + + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + else if( evt->IsAction( &COMMON_ACTIONS::flip ) ) + { + for( KIGFX::VIEW_GROUP::iter it = preview.Begin(), end = preview.End(); it != end; ++it ) + static_cast( *it )->Flip( wxPoint( cursorPos.x, cursorPos.y ) ); + + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + else if( evt->IsCancel() || evt->IsActivate() ) + { + preview.FreeItems(); + break; + } + } + + else if( evt->IsClick( BUT_LEFT ) ) + { + // Place the drawing + + if( m_editModules ) + { + m_frame->SaveCopyInUndoList( module, UR_MODEDIT ); + module->SetLastEditTime(); + + for( KIGFX::VIEW_GROUP::iter it = preview.Begin(), end = preview.End(); it != end; ++it ) + { + BOARD_ITEM* item = static_cast( *it ); + module->Add( item ); + + switch( item->Type() ) + { + case PCB_MODULE_TEXT_T: + static_cast( item )->SetLocalCoord(); + break; + + case PCB_MODULE_EDGE_T: + static_cast( item )->SetLocalCoord(); + break; + + default: + assert( false ); + break; + } + + m_view->Add( item ); + } + } + else + { + PICKED_ITEMS_LIST picklist; + + for( KIGFX::VIEW_GROUP::iter it = preview.Begin(), end = preview.End(); it != end; ++it ) + { + BOARD_ITEM* item = static_cast( *it ); + m_board->Add( item ); + + ITEM_PICKER itemWrapper( item, UR_NEW ); + picklist.PushItem( itemWrapper ); + + m_view->Add( item ); + } + + m_frame->SaveCopyInUndoList( picklist, UR_NEW ); + } + + m_frame->OnModify(); + + break; + } + } + + preview.Clear(); + + m_controls->ShowCursor( false ); + m_controls->SetSnapping( false ); + m_controls->SetAutoPan( false ); + m_view->Remove( &preview ); + + setTransitions(); + + return 0; +} + + int DRAWING_TOOL::SetAnchor( TOOL_EVENT& aEvent ) { assert( m_editModules ); @@ -1580,5 +1771,6 @@ void DRAWING_TOOL::setTransitions() Go( &DRAWING_TOOL::PlaceTarget, COMMON_ACTIONS::placeTarget.MakeEvent() ); Go( &DRAWING_TOOL::PlaceModule, COMMON_ACTIONS::placeModule.MakeEvent() ); Go( &DRAWING_TOOL::PlacePad, COMMON_ACTIONS::placePad.MakeEvent() ); + Go( &DRAWING_TOOL::PlaceDXF, COMMON_ACTIONS::placeDXF.MakeEvent() ); Go( &DRAWING_TOOL::SetAnchor, COMMON_ACTIONS::setAnchor.MakeEvent() ); } diff --git a/pcbnew/tools/drawing_tool.h b/pcbnew/tools/drawing_tool.h index 293674a81f..b1bc2675b3 100644 --- a/pcbnew/tools/drawing_tool.h +++ b/pcbnew/tools/drawing_tool.h @@ -122,10 +122,16 @@ public: /** * Function PlacePad() - * Places a pad in the module editor. + * Places a pad in module editor. */ int PlacePad( TOOL_EVENT& aEvent ); + /** + * Function PlaceDXF() + * Places a drawing imported from a DXF file in module editor. + */ + int PlaceDXF( TOOL_EVENT& aEvent ); + /** * Function SetAnchor() * Places the footprint anchor (only in module editor). From 2b1d6b303a81f6b62f1d6a1f3ecae91e75a50ba5 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 15:02:56 +0200 Subject: [PATCH 638/741] Added support for module edge splitting with double click. --- pcbnew/tools/point_editor.cpp | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp index 64ad775a06..14e66424e3 100644 --- a/pcbnew/tools/point_editor.cpp +++ b/pcbnew/tools/point_editor.cpp @@ -40,6 +40,7 @@ #include #include #include +#include // Few constants to avoid using bare numbers for point indices enum SEG_POINTS @@ -710,8 +711,14 @@ void POINT_EDITOR::breakOutline( const VECTOR2I& aBreakPoint ) else if( item->Type() == PCB_LINE_T || item->Type() == PCB_MODULE_EDGE_T ) { + bool moduleEdge = item->Type() == PCB_MODULE_EDGE_T; + getEditFrame()->OnModify(); - getEditFrame()->SaveCopyInUndoList( selection.items, UR_CHANGED ); + + if( moduleEdge ) + getEditFrame()->SaveCopyInUndoList( getModel()->m_Modules, UR_MODEDIT ); + else + getEditFrame()->SaveCopyInUndoList( selection.items, UR_CHANGED ); DRAWSEGMENT* segment = static_cast( item ); @@ -724,12 +731,34 @@ void POINT_EDITOR::breakOutline( const VECTOR2I& aBreakPoint ) segment->SetEnd( wxPoint( nearestPoint.x, nearestPoint.y ) ); // and add another one starting from the break point - DRAWSEGMENT* newSegment = new DRAWSEGMENT( *segment ); + DRAWSEGMENT* newSegment; + + if( moduleEdge ) + { + EDGE_MODULE* edge = static_cast( segment ); + assert( segment->GetParent()->Type() == PCB_MODULE_T ); + newSegment = new EDGE_MODULE( *edge ); + edge->SetLocalCoord(); + } + else + { + newSegment = new DRAWSEGMENT( *segment ); + } + newSegment->ClearSelected(); newSegment->SetStart( wxPoint( nearestPoint.x, nearestPoint.y ) ); newSegment->SetEnd( wxPoint( seg.B.x, seg.B.y ) ); - getModel()->Add( newSegment ); + if( moduleEdge ) + { + static_cast( newSegment )->SetLocalCoord(); + getModel()->m_Modules->Add( newSegment ); + } + else + { + getModel()->Add( newSegment ); + } + getView()->Add( newSegment ); } } From 84fa537b22aa7281bc8d803b529136b4a6183319 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 15:02:56 +0200 Subject: [PATCH 639/741] Changes in display options are handled by PCBNEW_CONTROL (GAL). --- pcbnew/dialogs/dialog_general_options.cpp | 33 ----------- pcbnew/tools/common_actions.cpp | 35 +++++++++++ pcbnew/tools/common_actions.h | 3 + pcbnew/tools/pcbnew_control.cpp | 71 ++++++++++++++++++++--- pcbnew/tools/pcbnew_control.h | 1 + 5 files changed, 101 insertions(+), 42 deletions(-) diff --git a/pcbnew/dialogs/dialog_general_options.cpp b/pcbnew/dialogs/dialog_general_options.cpp index 9004aecf26..696859b820 100644 --- a/pcbnew/dialogs/dialog_general_options.cpp +++ b/pcbnew/dialogs/dialog_general_options.cpp @@ -154,11 +154,6 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) { int id = event.GetId(); bool state = event.IsChecked(); - KIGFX::PCB_PAINTER* painter = - static_cast ( GetGalCanvas()->GetView()->GetPainter() ); - KIGFX::PCB_RENDER_SETTINGS* settings = - static_cast ( painter->GetSettings() ); - KICAD_T updateType = EOT; switch( id ) { @@ -193,44 +188,33 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) case ID_TB_OPTIONS_SHOW_ZONES: DisplayOpt.DisplayZonesMode = 0; - updateType = PCB_ZONE_AREA_T; m_canvas->Refresh(); break; case ID_TB_OPTIONS_SHOW_ZONES_DISABLE: DisplayOpt.DisplayZonesMode = 1; - updateType = PCB_ZONE_AREA_T; m_canvas->Refresh(); break; case ID_TB_OPTIONS_SHOW_ZONES_OUTLINES_ONLY: DisplayOpt.DisplayZonesMode = 2; - updateType = PCB_ZONE_AREA_T; m_canvas->Refresh(); break; case ID_TB_OPTIONS_SHOW_VIAS_SKETCH: m_DisplayViaFill = DisplayOpt.DisplayViaFill = !state; - updateType = PCB_VIA_T; m_canvas->Refresh(); break; case ID_TB_OPTIONS_SHOW_TRACKS_SKETCH: m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill = !state; - updateType = PCB_TRACE_T; m_canvas->Refresh(); break; case ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE: { DisplayOpt.ContrastModeDisplay = state; - - // Apply new display options to the GAL canvas (this is faster than recaching) - settings->LoadDisplayOptions( DisplayOpt ); - - GetGalCanvas()->SetHighContrastLayer( GetActiveLayer() ); m_canvas->Refresh(); - break; } @@ -260,21 +244,4 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) wxT( "PCB_EDIT_FRAME::OnSelectOptionToolbar error \n (event not handled!)" ) ); break; } - - if( updateType != EOT ) - { - // Apply new display options to the GAL canvas - settings->LoadDisplayOptions( DisplayOpt ); - - // Find items that require update - KICAD_T scanList[] = { updateType, EOT }; - TYPE_COLLECTOR collector; - collector.Collect( GetBoard(), scanList ); - - for( int i = 0; i < collector.GetCount(); ++i ) - collector[i]->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - } - - if( IsGalCanvasActive() ) - GetGalCanvas()->Refresh(); } diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index e8ac80fcef..38190b8ea6 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -157,6 +157,18 @@ TOOL_ACTION COMMON_ACTIONS::viaDisplayMode( "pcbnew.Control.viaDisplayMode", AS_GLOBAL, 'L', // TODO temporarily, find a better hot key "", "" ); +TOOL_ACTION COMMON_ACTIONS::zoneDisplayEnable( "pcbnew.Control.zoneDisplayEnable", + AS_GLOBAL, 0, + "", "" ); + +TOOL_ACTION COMMON_ACTIONS::zoneDisplayDisable( "pcbnew.Control.zoneDisplayDisable", + AS_GLOBAL, 0, + "", "" ); + +TOOL_ACTION COMMON_ACTIONS::zoneDisplayOutlines( "pcbnew.Control.zoneDisplayOutlines", + AS_GLOBAL, 0, + "", "" ); + TOOL_ACTION COMMON_ACTIONS::highContrastMode( "pcbnew.Control.highContrastMode", AS_GLOBAL, 'H', "", "" ); @@ -381,6 +393,29 @@ boost::optional COMMON_ACTIONS::TranslateLegacyId( int aId ) case ID_ZOOM_PAGE: // toolbar button "Fit on Screen" return COMMON_ACTIONS::zoomFitScreen.MakeEvent(); + case ID_TB_OPTIONS_SHOW_TRACKS_SKETCH: + return COMMON_ACTIONS::trackDisplayMode.MakeEvent(); + + case ID_TB_OPTIONS_SHOW_PADS_SKETCH: + return COMMON_ACTIONS::padDisplayMode.MakeEvent(); + + case ID_TB_OPTIONS_SHOW_VIAS_SKETCH: + return COMMON_ACTIONS::viaDisplayMode.MakeEvent(); + + case ID_TB_OPTIONS_SHOW_ZONES: + return COMMON_ACTIONS::zoneDisplayEnable.MakeEvent(); + + case ID_TB_OPTIONS_SHOW_ZONES_DISABLE: + return COMMON_ACTIONS::zoneDisplayDisable.MakeEvent(); + + case ID_TB_OPTIONS_SHOW_ZONES_OUTLINES_ONLY: + return COMMON_ACTIONS::zoneDisplayOutlines.MakeEvent(); + + case ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE: + return COMMON_ACTIONS::highContrastMode.MakeEvent(); + + case ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH: + case ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH: case ID_PCB_DELETE_ITEM_BUTT: case ID_PCB_HIGHLIGHT_BUTT: case ID_PCB_SHOW_1_RATSNEST_BUTT: diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index 2abaf054bd..c5b32dbc70 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -144,6 +144,9 @@ public: static TOOL_ACTION trackDisplayMode; static TOOL_ACTION padDisplayMode; static TOOL_ACTION viaDisplayMode; + static TOOL_ACTION zoneDisplayEnable; + static TOOL_ACTION zoneDisplayDisable; + static TOOL_ACTION zoneDisplayOutlines; static TOOL_ACTION highContrastMode; static TOOL_ACTION highContrastInc; static TOOL_ACTION highContrastDec; diff --git a/pcbnew/tools/pcbnew_control.cpp b/pcbnew/tools/pcbnew_control.cpp index 3a46cbacff..3eba7f495b 100644 --- a/pcbnew/tools/pcbnew_control.cpp +++ b/pcbnew/tools/pcbnew_control.cpp @@ -28,7 +28,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -129,17 +131,20 @@ int PCBNEW_CONTROL::TrackDisplayMode( TOOL_EVENT& aEvent ) KIGFX::PCB_PAINTER* painter = static_cast( m_frame->GetGalCanvas()->GetView()->GetPainter() ); KIGFX::PCB_RENDER_SETTINGS* settings = - static_cast ( painter->GetSettings() ); + static_cast( painter->GetSettings() ); // Apply new display options to the GAL canvas DisplayOpt.DisplayPcbTrackFill = !DisplayOpt.DisplayPcbTrackFill; m_frame->m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill; settings->LoadDisplayOptions( DisplayOpt ); - BOARD* board = getModel(); - for( TRACK* track = board->m_Track; track; track = track->Next() ) - track->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + for( TRACK* track = getModel()->m_Track; track; track = track->Next() ) + { + if( track->Type() == PCB_TRACE_T ) + track->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + m_frame->GetGalCanvas()->Refresh(); setTransitions(); return 0; @@ -148,8 +153,23 @@ int PCBNEW_CONTROL::TrackDisplayMode( TOOL_EVENT& aEvent ) int PCBNEW_CONTROL::PadDisplayMode( TOOL_EVENT& aEvent ) { - wxCommandEvent dummy; - m_frame->OnTogglePadDrawMode( dummy ); + KIGFX::PCB_PAINTER* painter = + static_cast( m_frame->GetGalCanvas()->GetView()->GetPainter() ); + KIGFX::PCB_RENDER_SETTINGS* settings = + static_cast( painter->GetSettings() ); + + // Apply new display options to the GAL canvas + DisplayOpt.DisplayPadFill = !DisplayOpt.DisplayPadFill; + m_frame->m_DisplayPadFill = DisplayOpt.DisplayPadFill; + settings->LoadDisplayOptions( DisplayOpt ); + + for( MODULE* module = getModel()->m_Modules; module; module = module->Next() ) + { + for( D_PAD* pad = module->Pads(); pad; pad = pad->Next() ) + pad->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + + m_frame->GetGalCanvas()->Refresh(); setTransitions(); return 0; @@ -161,20 +181,50 @@ int PCBNEW_CONTROL::ViaDisplayMode( TOOL_EVENT& aEvent ) KIGFX::PCB_PAINTER* painter = static_cast( m_frame->GetGalCanvas()->GetView()->GetPainter() ); KIGFX::PCB_RENDER_SETTINGS* settings = - static_cast ( painter->GetSettings() ); + static_cast( painter->GetSettings() ); // Apply new display options to the GAL canvas DisplayOpt.DisplayViaFill = !DisplayOpt.DisplayViaFill; m_frame->m_DisplayViaFill = DisplayOpt.DisplayViaFill; settings->LoadDisplayOptions( DisplayOpt ); - BOARD* board = getModel(); - for( TRACK* track = board->m_Track; track; track = track->Next() ) + for( TRACK* track = getModel()->m_Track; track; track = track->Next() ) { if( track->Type() == PCB_VIA_T ) track->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); } + m_frame->GetGalCanvas()->Refresh(); + setTransitions(); + + return 0; +} + + +int PCBNEW_CONTROL::ZoneDisplayMode( TOOL_EVENT& aEvent ) +{ + KIGFX::PCB_PAINTER* painter = + static_cast( m_frame->GetGalCanvas()->GetView()->GetPainter() ); + KIGFX::PCB_RENDER_SETTINGS* settings = + static_cast( painter->GetSettings() ); + + // Apply new display options to the GAL canvas + if( aEvent.IsAction( &COMMON_ACTIONS::zoneDisplayEnable ) ) + DisplayOpt.DisplayZonesMode = 0; + else if( aEvent.IsAction( &COMMON_ACTIONS::zoneDisplayDisable ) ) + DisplayOpt.DisplayZonesMode = 1; + else if( aEvent.IsAction( &COMMON_ACTIONS::zoneDisplayOutlines ) ) + DisplayOpt.DisplayZonesMode = 2; + else + assert( false ); + + settings->LoadDisplayOptions( DisplayOpt ); + + BOARD* board = getModel(); + for( int i = 0; i < board->GetAreaCount(); ++i ) + board->GetArea( i )->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + + m_frame->GetGalCanvas()->Refresh(); setTransitions(); return 0; @@ -529,6 +579,9 @@ void PCBNEW_CONTROL::setTransitions() Go( &PCBNEW_CONTROL::TrackDisplayMode, COMMON_ACTIONS::trackDisplayMode.MakeEvent() ); Go( &PCBNEW_CONTROL::PadDisplayMode, COMMON_ACTIONS::padDisplayMode.MakeEvent() ); Go( &PCBNEW_CONTROL::ViaDisplayMode, COMMON_ACTIONS::viaDisplayMode.MakeEvent() ); + Go( &PCBNEW_CONTROL::ZoneDisplayMode, COMMON_ACTIONS::zoneDisplayEnable.MakeEvent() ); + Go( &PCBNEW_CONTROL::ZoneDisplayMode, COMMON_ACTIONS::zoneDisplayDisable.MakeEvent() ); + Go( &PCBNEW_CONTROL::ZoneDisplayMode, COMMON_ACTIONS::zoneDisplayOutlines.MakeEvent() ); Go( &PCBNEW_CONTROL::HighContrastMode, COMMON_ACTIONS::highContrastMode.MakeEvent() ); Go( &PCBNEW_CONTROL::HighContrastInc, COMMON_ACTIONS::highContrastInc.MakeEvent() ); Go( &PCBNEW_CONTROL::HighContrastDec, COMMON_ACTIONS::highContrastDec.MakeEvent() ); diff --git a/pcbnew/tools/pcbnew_control.h b/pcbnew/tools/pcbnew_control.h index 62c7a9c7cd..61f7d5d511 100644 --- a/pcbnew/tools/pcbnew_control.h +++ b/pcbnew/tools/pcbnew_control.h @@ -56,6 +56,7 @@ public: int TrackDisplayMode( TOOL_EVENT& aEvent ); int PadDisplayMode( TOOL_EVENT& aEvent ); int ViaDisplayMode( TOOL_EVENT& aEvent ); + int ZoneDisplayMode( TOOL_EVENT& aEvent ); int HighContrastMode( TOOL_EVENT& aEvent ); int HighContrastInc( TOOL_EVENT& aEvent ); int HighContrastDec( TOOL_EVENT& aEvent ); From b076f3fe4eed0977ef0c33f94905365edb27df9f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 15:02:56 +0200 Subject: [PATCH 640/741] Fixed grid drawing when the grid origin has negative coordinates. --- common/gal/graphics_abstraction_layer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/gal/graphics_abstraction_layer.cpp b/common/gal/graphics_abstraction_layer.cpp index 00e976b19a..d21b12b783 100644 --- a/common/gal/graphics_abstraction_layer.cpp +++ b/common/gal/graphics_abstraction_layer.cpp @@ -157,10 +157,10 @@ void GAL::DrawGrid() assert( gridEndY >= gridStartY ); // Correct the index, else some lines are not correctly painted - gridStartX -= ( gridOrigin.x / gridSize.x ) + 1; - gridStartY -= ( gridOrigin.y / gridSize.y ) + 1; - gridEndX += ( gridOrigin.x / gridSize.x ) + 1; - gridEndY += ( gridOrigin.y / gridSize.y ) + 1; + gridStartX -= abs( gridOrigin.x / gridSize.x ) + 1; + gridStartY -= abs( gridOrigin.y / gridSize.y ) + 1; + gridEndX += abs( gridOrigin.x / gridSize.x ) + 1; + gridEndY += abs( gridOrigin.y / gridSize.y ) + 1; // Draw the grid behind all other layers SetLayerDepth( depthRange.y * 0.75 ); From 6f772c90d9f491c434aa17341b299d72992d99eb Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 15:02:56 +0200 Subject: [PATCH 641/741] Renamed "Placement" context menu to "Align/distribute". --- pcbnew/tools/placement_tool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/tools/placement_tool.cpp b/pcbnew/tools/placement_tool.cpp index 5305d855ee..4956c51c45 100644 --- a/pcbnew/tools/placement_tool.cpp +++ b/pcbnew/tools/placement_tool.cpp @@ -63,7 +63,7 @@ bool PLACEMENT_TOOL::Init() menu->AppendSeparator(); menu->Add( COMMON_ACTIONS::distributeHorizontally ); menu->Add( COMMON_ACTIONS::distributeVertically ); - m_selectionTool->AddSubMenu( menu, wxString( "Placement" ) ); + m_selectionTool->AddSubMenu( menu, wxString( "Align/distribute" ) ); setTransitions(); From 5f297726ca1489afbf0edfde31776cc91573d777 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 15:02:56 +0200 Subject: [PATCH 642/741] Module anchors are visible in GAL canvas. --- pcbnew/class_module.cpp | 15 +++++++++++++++ pcbnew/class_module.h | 6 ++++++ pcbnew/pcb_draw_panel_gal.cpp | 4 +++- pcbnew/pcb_painter.cpp | 26 ++++++++++++++++++++++++-- pcbnew/pcb_painter.h | 1 + 5 files changed, 49 insertions(+), 3 deletions(-) diff --git a/pcbnew/class_module.cpp b/pcbnew/class_module.cpp index 6080fa0d98..4488598fd1 100644 --- a/pcbnew/class_module.cpp +++ b/pcbnew/class_module.cpp @@ -830,6 +830,21 @@ void MODULE::ViewUpdate( int aUpdateFlags ) } +void MODULE::ViewGetLayers( int aLayers[], int& aCount ) const +{ + aCount = 1; + aLayers[0] = ITEM_GAL_LAYER( ANCHOR_VISIBLE ); +} + + +unsigned int MODULE::ViewGetLOD( int aLayer ) const +{ + // Currently there is only one layer, so there is nothing to check +// if( aLayer == ITEM_GAL_LAYER( ANCHOR_VISIBLE ) ) + return 30; +} + + /* Test for validity of the name in a library of the footprint * ( no spaces, dir separators ... ) * return true if the given name is valid diff --git a/pcbnew/class_module.h b/pcbnew/class_module.h index d1496f2425..b1309d758d 100644 --- a/pcbnew/class_module.h +++ b/pcbnew/class_module.h @@ -483,6 +483,12 @@ public: /// @copydoc VIEW_ITEM::ViewUpdate() void ViewUpdate( int aUpdateFlags = KIGFX::VIEW_ITEM::ALL ); + /// @copydoc VIEW_ITEM::ViewGetLayers() + virtual void ViewGetLayers( int aLayers[], int& aCount ) const; + + /// @copydoc VIEW_ITEM::ViewGetLOD() + virtual unsigned int ViewGetLOD( int aLayer ) const; + /** * Function CopyNetlistSettings * copies the netlist settings to \a aModule. diff --git a/pcbnew/pcb_draw_panel_gal.cpp b/pcbnew/pcb_draw_panel_gal.cpp index 12965f3e03..1aed5a86bd 100644 --- a/pcbnew/pcb_draw_panel_gal.cpp +++ b/pcbnew/pcb_draw_panel_gal.cpp @@ -47,7 +47,7 @@ const LAYER_NUM GAL_LAYER_ORDER[] = ITEM_GAL_LAYER( MOD_TEXT_FR_VISIBLE ), ITEM_GAL_LAYER( MOD_REFERENCES_VISIBLE), ITEM_GAL_LAYER( MOD_VALUES_VISIBLE ), - ITEM_GAL_LAYER( RATSNEST_VISIBLE ), + ITEM_GAL_LAYER( RATSNEST_VISIBLE ), ITEM_GAL_LAYER( ANCHOR_VISIBLE ), ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), ITEM_GAL_LAYER( VIA_THROUGH_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), @@ -141,6 +141,8 @@ EDA_DRAW_PANEL_GAL( aParentWindow, aWindowId, aPosition, aSize, aGalType ) } } + m_view->SetLayerTarget( ITEM_GAL_LAYER( ANCHOR_VISIBLE ), KIGFX::TARGET_NONCACHED ); + // Some more required layers settings m_view->SetRequired( ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( VIA_THROUGH_VISIBLE ) ); m_view->SetRequired( ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ) ); diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 9a9ac26e31..6d42a29d64 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -79,6 +79,7 @@ void PCB_RENDER_SETTINGS::ImportLegacyColors( const COLORS_DESIGN_SETTINGS* aSet m_layerColors[NETNAMES_GAL_LAYER( PADS_NETNAMES_VISIBLE )] = COLOR4D( 1.0, 1.0, 1.0, 0.9 ); m_layerColors[NETNAMES_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE )] = COLOR4D( 1.0, 1.0, 1.0, 0.9 ); m_layerColors[NETNAMES_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE )] = COLOR4D( 1.0, 1.0, 1.0, 0.9 ); + m_layerColors[ITEM_GAL_LAYER( ANCHOR_VISIBLE )] = COLOR4D( 0.3, 0.3, 1.0, 0.9 ); m_layerColors[ITEM_GAL_LAYER( RATSNEST_VISIBLE )] = COLOR4D( 0.4, 0.4, 0.4, 0.8 ); m_layerColors[ITEM_GAL_LAYER( WORKSHEET )] = COLOR4D( 0.5, 0.0, 0.0, 0.8 ); m_layerColors[ITEM_GAL_LAYER( DRC_VISIBLE )] = COLOR4D( 1.0, 0.0, 0.0, 0.8 ); @@ -233,6 +234,10 @@ bool PCB_PAINTER::Draw( const VIEW_ITEM* aItem, int aLayer ) draw( (TEXTE_MODULE*) item, aLayer ); break; + case PCB_MODULE_T: + draw( (MODULE*) item ); + break; + case PCB_ZONE_AREA_T: draw( (ZONE_CONTAINER*) item ); break; @@ -284,7 +289,7 @@ void PCB_PAINTER::draw( const TRACK* aTrack, int aLayer ) // Set a proper color for the label const COLOR4D& color = m_pcbSettings.GetColor( aTrack, aTrack->GetLayer() ); - COLOR4D labelColor = m_pcbSettings.GetColor( NULL, aLayer ); + const COLOR4D labelColor = m_pcbSettings.GetColor( NULL, aLayer ); if( color.GetBrightness() > 0.5 ) m_gal->SetStrokeColor( labelColor.Inverted() ); @@ -421,7 +426,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) // Set a proper color for the label const COLOR4D& color = m_pcbSettings.GetColor( aPad, aPad->GetLayer() ); - COLOR4D labelColor = m_pcbSettings.GetColor( NULL, aLayer ); + const COLOR4D labelColor = m_pcbSettings.GetColor( NULL, aLayer ); if( color.GetBrightness() > 0.5 ) m_gal->SetStrokeColor( labelColor.Inverted() ); @@ -726,6 +731,23 @@ void PCB_PAINTER::draw( const TEXTE_MODULE* aText, int aLayer ) } +void PCB_PAINTER::draw( const MODULE* aModule ) +{ + const COLOR4D color = m_pcbSettings.GetColor( aModule, ITEM_GAL_LAYER( ANCHOR_VISIBLE ) ); + + // Draw anchor + m_gal->SetStrokeColor( color ); + m_gal->SetLineWidth( 1.0 ); + + // Keep the size constant, not related to the scale + double anchorSize = 5.0 / m_gal->GetWorldScale(); + + VECTOR2D center = aModule->GetPosition(); + m_gal->DrawLine( center - VECTOR2D( anchorSize, 0 ), center + VECTOR2D( anchorSize, 0 ) ); + m_gal->DrawLine( center - VECTOR2D( 0, anchorSize ), center + VECTOR2D( 0, anchorSize ) ); +} + + void PCB_PAINTER::draw( const ZONE_CONTAINER* aZone ) { const COLOR4D& color = m_pcbSettings.GetColor( aZone, aZone->GetLayer() ); diff --git a/pcbnew/pcb_painter.h b/pcbnew/pcb_painter.h index 46e7bb7da3..93bcb034f7 100644 --- a/pcbnew/pcb_painter.h +++ b/pcbnew/pcb_painter.h @@ -213,6 +213,7 @@ protected: void draw( const DRAWSEGMENT* aSegment ); void draw( const TEXTE_PCB* aText, int aLayer ); void draw( const TEXTE_MODULE* aText, int aLayer ); + void draw( const MODULE* aModule ); void draw( const ZONE_CONTAINER* aZone ); void draw( const DIMENSION* aDimension, int aLayer ); void draw( const PCB_TARGET* aTarget ); From b42091bc06feb592a028bfa899f9ba953d346c7c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 15:02:56 +0200 Subject: [PATCH 643/741] Fixed anchor placement tool in module editor (GAL). --- pcbnew/tools/drawing_tool.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index dda1d36b6e..54d9c8e691 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -917,6 +917,8 @@ int DRAWING_TOOL::SetAnchor( TOOL_EVENT& aEvent ) wxPoint moveVector = module->GetPosition() - wxPoint( cursorPos.x, cursorPos.y ); module->MoveAnchorPosition( moveVector ); + module->ViewUpdate(); + // Usually, we do not need to change twice the anchor position, // so deselect the active tool break; From a6484f1acb61278a144500e26a8b3f2077a5d003 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 15:02:56 +0200 Subject: [PATCH 644/741] Drawing tools used to crash when the drawing tool was interrupted - fixed. --- pcbnew/tools/drawing_tool.cpp | 81 ++++++++++++++++++++++------------- pcbnew/tools/drawing_tool.h | 4 +- 2 files changed, 53 insertions(+), 32 deletions(-) diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index 54d9c8e691..061fb41008 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -83,13 +83,16 @@ int DRAWING_TOOL::DrawLine( TOOL_EVENT& aEvent ) MODULE* module = m_board->m_Modules; EDGE_MODULE* line = new EDGE_MODULE( module ); - while( drawSegment( S_SEGMENT, line ) ) + while( drawSegment( S_SEGMENT, reinterpret_cast( line ) ) ) { - m_frame->OnModify(); - m_frame->SaveCopyInUndoList( module, UR_MODEDIT ); - line->SetLocalCoord(); - line->SetParent( module ); - module->GraphicalItems().PushFront( line ); + if( line ) + { + m_frame->OnModify(); + m_frame->SaveCopyInUndoList( module, UR_MODEDIT ); + line->SetLocalCoord(); + line->SetParent( module ); + module->GraphicalItems().PushFront( line ); + } line = new EDGE_MODULE( module ); } @@ -102,9 +105,12 @@ int DRAWING_TOOL::DrawLine( TOOL_EVENT& aEvent ) while( drawSegment( S_SEGMENT, line ) ) { - m_board->Add( line ); - m_frame->OnModify(); - m_frame->SaveCopyInUndoList( line, UR_NEW ); + if( line ) + { + m_board->Add( line ); + m_frame->OnModify(); + m_frame->SaveCopyInUndoList( line, UR_NEW ); + } line = new DRAWSEGMENT; } @@ -126,13 +132,16 @@ int DRAWING_TOOL::DrawCircle( TOOL_EVENT& aEvent ) MODULE* module = m_board->m_Modules; EDGE_MODULE* circle = new EDGE_MODULE( module ); - while( drawSegment( S_CIRCLE, circle ) ) + while( drawSegment( S_CIRCLE, reinterpret_cast( circle ) ) ) { - m_frame->OnModify(); - m_frame->SaveCopyInUndoList( module, UR_MODEDIT ); - circle->SetLocalCoord(); - circle->SetParent( module ); - module->GraphicalItems().PushFront( circle ); + if( circle ) + { + m_frame->OnModify(); + m_frame->SaveCopyInUndoList( module, UR_MODEDIT ); + circle->SetLocalCoord(); + circle->SetParent( module ); + module->GraphicalItems().PushFront( circle ); + } circle = new EDGE_MODULE( module ); } @@ -145,9 +154,12 @@ int DRAWING_TOOL::DrawCircle( TOOL_EVENT& aEvent ) while( drawSegment( S_CIRCLE, circle ) ) { - m_board->Add( circle ); - m_frame->OnModify(); - m_frame->SaveCopyInUndoList( circle, UR_NEW ); + if( circle ) + { + m_board->Add( circle ); + m_frame->OnModify(); + m_frame->SaveCopyInUndoList( circle, UR_NEW ); + } circle = new DRAWSEGMENT; } @@ -169,13 +181,16 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) MODULE* module = m_board->m_Modules; EDGE_MODULE* arc = new EDGE_MODULE( module ); - while( drawArc( arc ) ) + while( drawArc( reinterpret_cast( arc ) ) ) { - m_frame->OnModify(); - m_frame->SaveCopyInUndoList( module, UR_MODEDIT ); - arc->SetLocalCoord(); - arc->SetParent( module ); - module->GraphicalItems().PushFront( arc ); + if( arc ) + { + m_frame->OnModify(); + m_frame->SaveCopyInUndoList( module, UR_MODEDIT ); + arc->SetLocalCoord(); + arc->SetParent( module ); + module->GraphicalItems().PushFront( arc ); + } arc = new EDGE_MODULE( module ); } @@ -188,9 +203,12 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) while( drawArc( arc ) ) { - m_board->Add( arc ); - m_frame->OnModify(); - m_frame->SaveCopyInUndoList( arc, UR_NEW ); + if( arc ) + { + m_board->Add( arc ); + m_frame->OnModify(); + m_frame->SaveCopyInUndoList( arc, UR_NEW ); + } arc = new DRAWSEGMENT; } @@ -939,7 +957,7 @@ int DRAWING_TOOL::SetAnchor( TOOL_EVENT& aEvent ) } -bool DRAWING_TOOL::drawSegment( int aShape, DRAWSEGMENT* aGraphic ) +bool DRAWING_TOOL::drawSegment( int aShape, DRAWSEGMENT*& aGraphic ) { // Only two shapes are currently supported assert( aShape == S_SEGMENT || aShape == S_CIRCLE ); @@ -989,6 +1007,7 @@ bool DRAWING_TOOL::drawSegment( int aShape, DRAWSEGMENT* aGraphic ) preview.Clear(); updatePreview = true; delete aGraphic; + aGraphic = NULL; break; } @@ -1049,7 +1068,8 @@ bool DRAWING_TOOL::drawSegment( int aShape, DRAWSEGMENT* aGraphic ) else // User has clicked twice in the same spot { // a clear sign that the current drawing is finished delete aGraphic; // but only if at least one graphic was created - started = false; // otherwise - force user to draw more or cancel + aGraphic = NULL; // otherwise - force user to draw more or cancel + started = false; } preview.Clear(); @@ -1081,7 +1101,7 @@ bool DRAWING_TOOL::drawSegment( int aShape, DRAWSEGMENT* aGraphic ) } -bool DRAWING_TOOL::drawArc( DRAWSEGMENT* aGraphic ) +bool DRAWING_TOOL::drawArc( DRAWSEGMENT*& aGraphic ) { bool clockwise = true; // drawing direction of the arc double startAngle = 0.0f; // angle of the first arc line @@ -1121,6 +1141,7 @@ bool DRAWING_TOOL::drawArc( DRAWSEGMENT* aGraphic ) preview.Clear(); preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); delete aGraphic; + aGraphic = NULL; break; } diff --git a/pcbnew/tools/drawing_tool.h b/pcbnew/tools/drawing_tool.h index b1bc2675b3..c0735a8ec2 100644 --- a/pcbnew/tools/drawing_tool.h +++ b/pcbnew/tools/drawing_tool.h @@ -156,14 +156,14 @@ private: ///> be already created. The tool deletes the object if it is not added to a BOARD. ///> @return False if the tool was cancelled before the origin was set or origin and end are ///> the same point. - bool drawSegment( int aShape, DRAWSEGMENT* aGraphic ); + bool drawSegment( int aShape, DRAWSEGMENT*& aGraphic ); ///> Starts drawing an arc. ///> @param aGraphic is an object that is going to be used by the tool for drawing. It has to ///> be already created. The tool deletes the object if it is not added to a BOARD. ///> @return False if the tool was cancelled before the origin was set or origin and end are ///> the same point. - bool drawArc( DRAWSEGMENT* aGraphic ); + bool drawArc( DRAWSEGMENT*& aGraphic ); ///> Draws a polygon, that is added as a zone or a keepout area. ///> @param aKeepout decides if the drawn polygon is a zone or a keepout area. From 0b9387fb1232cc9aab18370e7f015b9c1a41b92a Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 15:02:56 +0200 Subject: [PATCH 645/741] Added support for graphics on Edge.Cuts layer in modules. Tested functionality that works fine: - zone filling algorithm - printing - plotting (pdf & gerbers) - SVG export - Specctra export - 3D viewer --- pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp b/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp index 13b1203b66..5144e4c88e 100644 --- a/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp +++ b/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp @@ -297,13 +297,13 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb ) /* Add module edge items that are on copper layers * Pcbnew allows these items to be on copper layers in microwave applictions - * This is a bad thing, but must be handle here, until a better way is found + * This is a bad thing, but must be handled here, until a better way is found */ for( MODULE* module = aPcb->m_Modules; module; module = module->Next() ) { for( BOARD_ITEM* item = module->GraphicalItems(); item; item = item->Next() ) { - if( !item->IsOnLayer( GetLayer() ) ) + if( !item->IsOnLayer( GetLayer() ) && !item->IsOnLayer( EDGE_N ) ) continue; if( item->Type() != PCB_MODULE_EDGE_T ) From ed88c40be583cfb7c82d51cad86362941dc46ee2 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 15:02:56 +0200 Subject: [PATCH 646/741] Moved module editor-specific tools to a separate class (MODULE_TOOLS). --- pcbnew/CMakeLists.txt | 1 + pcbnew/moduleframe.cpp | 2 + pcbnew/tools/common_actions.cpp | 26 +- pcbnew/tools/common_actions.h | 20 +- pcbnew/tools/drawing_tool.cpp | 152 ----------- pcbnew/tools/drawing_tool.h | 12 - pcbnew/tools/edit_tool.cpp | 226 ---------------- pcbnew/tools/edit_tool.h | 14 - pcbnew/tools/module_tools.cpp | 422 ++++++++++++++++++++++++++++++ pcbnew/tools/module_tools.h | 84 ++++++ pcbnew/tools/pcb_editor_control.h | 2 +- 11 files changed, 536 insertions(+), 425 deletions(-) create mode 100644 pcbnew/tools/module_tools.cpp create mode 100644 pcbnew/tools/module_tools.h diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 624418055a..1f032f2c93 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -264,6 +264,7 @@ set( PCBNEW_CLASS_SRCS tools/edit_tool.cpp tools/pcbnew_control.cpp tools/pcb_editor_control.cpp + tools/module_tools.cpp tools/placement_tool.cpp tools/common_actions.cpp ) diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index f237b245e0..a3af6dc5fe 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -61,6 +61,7 @@ #include "tools/drawing_tool.h" #include "tools/point_editor.h" #include "tools/pcbnew_control.h" +#include "tools/module_tools.h" #include "tools/placement_tool.h" #include "tools/common_actions.h" @@ -280,6 +281,7 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : m_toolManager->RegisterTool( new DRAWING_TOOL ); m_toolManager->RegisterTool( new POINT_EDITOR ); m_toolManager->RegisterTool( new PCBNEW_CONTROL ); + m_toolManager->RegisterTool( new MODULE_TOOLS ); m_toolManager->RegisterTool( new PLACEMENT_TOOL ); m_toolManager->GetTool()->EditModules( true ); diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 38190b8ea6..96c819e890 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -59,14 +59,6 @@ TOOL_ACTION COMMON_ACTIONS::properties( "pcbnew.InteractiveEdit.properties", AS_GLOBAL, 'E', "Properties...", "Displays properties window" ); -TOOL_ACTION COMMON_ACTIONS::copyItems( "pcbnew.InteractiveEdit.copyItems", - AS_GLOBAL, MD_CTRL + int( 'C' ), - "Copy items", "Copy items", AF_ACTIVATE ); - -TOOL_ACTION COMMON_ACTIONS::pasteItems( "pcbnew.InteractiveEdit.pasteItems", - AS_GLOBAL, MD_CTRL + int( 'V' ), - "Paste items", "Paste items", AF_ACTIVATE ); - // Drawing tool actions TOOL_ACTION COMMON_ACTIONS::drawLine( "pcbnew.InteractiveDrawing.line", @@ -105,10 +97,6 @@ TOOL_ACTION COMMON_ACTIONS::placeModule( "pcbnew.InteractiveDrawing.placeModule" AS_GLOBAL, 'O', "Add modules", "Add modules", AF_ACTIVATE ); -TOOL_ACTION COMMON_ACTIONS::placePad( "pcbnew.InteractiveDrawing.placePad", - AS_GLOBAL, 0, - "Add pads", "Add pads", AF_ACTIVATE ); - TOOL_ACTION COMMON_ACTIONS::placeDXF( "pcbnew.InteractiveDrawing.placeDXF", AS_GLOBAL, 0, "", "", AF_ACTIVATE ); @@ -276,6 +264,20 @@ TOOL_ACTION COMMON_ACTIONS::trackViaSizeChanged( "pcbnew.EditorControl.trackViaS "", "" ); +// Module editor tools +TOOL_ACTION COMMON_ACTIONS::placePad( "pcbnew.ModuleEditor.placePad", + AS_GLOBAL, 0, + "Add pads", "Add pads", AF_ACTIVATE ); + +TOOL_ACTION COMMON_ACTIONS::copyItems( "pcbnew.ModuleEditor.copyItems", + AS_GLOBAL, MD_CTRL + int( 'C' ), + "Copy items", "Copy items", AF_ACTIVATE ); + +TOOL_ACTION COMMON_ACTIONS::pasteItems( "pcbnew.ModuleEditor.pasteItems", + AS_GLOBAL, MD_CTRL + int( 'V' ), + "Paste items", "Paste items", AF_ACTIVATE ); + + // Miscellaneous TOOL_ACTION COMMON_ACTIONS::resetCoords( "pcbnew.Control.resetCoords", AS_GLOBAL, ' ', diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index c5b32dbc70..e25e4a431f 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -62,11 +62,6 @@ public: /// Deleting a BOARD_ITEM static TOOL_ACTION remove; - /// Copying pad to clipboard - static TOOL_ACTION copyItems; - - /// Pasting a pad from clipboard - static TOOL_ACTION pasteItems; // Drawing Tool /// Activation of the drawing tool (line) @@ -96,9 +91,6 @@ public: /// Activation of the drawing tool (placing a MODULE) static TOOL_ACTION placeModule; - /// Activation of the drawing tool (placing a PAD) - static TOOL_ACTION placePad; - /// Activation of the drawing tool (placing a drawing from DXF file) static TOOL_ACTION placeDXF; @@ -180,6 +172,18 @@ public: static TOOL_ACTION trackViaSizeChanged; // notification + + // Module editor tools + /// Activation of the drawing tool (placing a PAD) + static TOOL_ACTION placePad; + + /// Copying module items to clipboard + static TOOL_ACTION copyItems; + + /// Pasting module items from clipboard + static TOOL_ACTION pasteItems; + + // Miscellaneous static TOOL_ACTION resetCoords; static TOOL_ACTION switchUnits; diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index 061fb41008..9d19cc3541 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -615,110 +615,6 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent ) } -int DRAWING_TOOL::PlacePad( TOOL_EVENT& aEvent ) -{ - assert( m_editModules ); - - m_frame->SetToolID( ID_MODEDIT_PAD_TOOL, wxCURSOR_PENCIL, _( "Add pads" ) ); - - MODULE* module = m_board->m_Modules; - assert( module ); - - D_PAD* pad = new D_PAD( module ); - m_frame->Import_Pad_Settings( pad, false ); // use the global settings for pad - - VECTOR2I cursorPos = m_controls->GetCursorPosition(); - pad->SetPosition( wxPoint( cursorPos.x, cursorPos.y ) ); - - // Add a VIEW_GROUP that serves as a preview for the new item - KIGFX::VIEW_GROUP preview( m_view ); - preview.Add( pad ); - m_view->Add( &preview ); - - m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); - m_controls->ShowCursor( true ); - m_controls->SetSnapping( true ); - - Activate(); - - // Main loop: keep receiving events - while( OPT_TOOL_EVENT evt = Wait() ) - { - cursorPos = m_controls->GetCursorPosition(); - - if( evt->IsMotion() ) - { - pad->SetPosition( wxPoint( cursorPos.x, cursorPos.y ) ); - preview.ViewUpdate(); - } - - else if( evt->Category() == TC_COMMAND ) - { - if( evt->IsAction( &COMMON_ACTIONS::rotate ) ) - { - pad->Rotate( pad->GetPosition(), m_frame->GetRotationAngle() ); - preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - } - else if( evt->IsAction( &COMMON_ACTIONS::flip ) ) - { - pad->Flip( pad->GetPosition() ); - preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - } - else if( evt->IsCancel() || evt->IsActivate() ) - { - preview.Clear(); - delete pad; - break; - } - } - - else if( evt->IsClick( BUT_LEFT ) ) - { - m_frame->OnModify(); - m_frame->SaveCopyInUndoList( module, UR_MODEDIT ); - - m_board->m_Status_Pcb = 0; // I have no clue why, but it is done in the legacy view - module->SetLastEditTime(); - module->Pads().PushBack( pad ); - - pad->SetNetCode( NETINFO_LIST::UNCONNECTED ); - - // Set the relative pad position - // ( pad position for module orient, 0, and relative to the module position) - pad->SetLocalCoord(); - - /* NPTH pads take empty pad number (since they can't be connected), - * other pads get incremented from the last one edited */ - wxString padName; - - if( pad->GetAttribute() != PAD_HOLE_NOT_PLATED ) - padName = getNextPadName(); - - pad->SetPadName( padName ); - - // Handle the view aspect - preview.Remove( pad ); - m_view->Add( pad ); - - // Start placing next pad - pad = new D_PAD( module ); - m_frame->Import_Pad_Settings( pad, false ); - preview.Add( pad ); - } - } - - m_controls->ShowCursor( false ); - m_controls->SetSnapping( false ); - m_controls->SetAutoPan( false ); - m_view->Remove( &preview ); - - setTransitions(); - m_frame->SetToolID( ID_NO_TOOL_SELECTED, wxCURSOR_DEFAULT, wxEmptyString ); - - return 0; -} - - int DRAWING_TOOL::PlaceDXF( TOOL_EVENT& aEvent ) { DIALOG_DXF_IMPORT dlg( m_frame ); @@ -1735,53 +1631,6 @@ void DRAWING_TOOL::make45DegLine( DRAWSEGMENT* aSegment, DRAWSEGMENT* aHelper ) } -bool isNotDigit( char aChar ) -{ - return ( aChar < '0' || aChar > '9' ); -} - - -wxString DRAWING_TOOL::getNextPadName() const -{ - std::set usedNumbers; - - // Find the first, not used pad number - for( MODULE* module = m_board->m_Modules; module; module = module->Next() ) - { - for( D_PAD* pad = module->Pads(); pad; pad = pad->Next() ) - { - wxString padName = pad->GetPadName(); - int padNumber = 0; - int base = 1; - - // Trim and extract the trailing numeric part - while( padName.Len() && padName.Last() >= '0' && padName.Last() <= '9' ) - { - padNumber += ( padName.Last() - '0' ) * base; - padName.RemoveLast(); - base *= 10; - } - - usedNumbers.insert( padNumber ); - } - } - - int candidate = *usedNumbers.begin(); - - // Look for a gap in pad numbering - for( std::set::iterator it = usedNumbers.begin(), - itEnd = usedNumbers.end(); it != itEnd; ++it ) - { - if( *it - candidate > 1 ) - break; - - candidate = *it; - } - - return wxString::Format( wxT( "%i" ), ++candidate ); -} - - void DRAWING_TOOL::setTransitions() { Go( &DRAWING_TOOL::DrawLine, COMMON_ACTIONS::drawLine.MakeEvent() ); @@ -1793,7 +1642,6 @@ void DRAWING_TOOL::setTransitions() Go( &DRAWING_TOOL::PlaceText, COMMON_ACTIONS::placeText.MakeEvent() ); Go( &DRAWING_TOOL::PlaceTarget, COMMON_ACTIONS::placeTarget.MakeEvent() ); Go( &DRAWING_TOOL::PlaceModule, COMMON_ACTIONS::placeModule.MakeEvent() ); - Go( &DRAWING_TOOL::PlacePad, COMMON_ACTIONS::placePad.MakeEvent() ); Go( &DRAWING_TOOL::PlaceDXF, COMMON_ACTIONS::placeDXF.MakeEvent() ); Go( &DRAWING_TOOL::SetAnchor, COMMON_ACTIONS::setAnchor.MakeEvent() ); } diff --git a/pcbnew/tools/drawing_tool.h b/pcbnew/tools/drawing_tool.h index c0735a8ec2..42a6dbfdf3 100644 --- a/pcbnew/tools/drawing_tool.h +++ b/pcbnew/tools/drawing_tool.h @@ -120,12 +120,6 @@ public: */ int PlaceModule( TOOL_EVENT& aEvent ); - /** - * Function PlacePad() - * Places a pad in module editor. - */ - int PlacePad( TOOL_EVENT& aEvent ); - /** * Function PlaceDXF() * Places a drawing imported from a DXF file in module editor. @@ -192,12 +186,6 @@ private: */ void make45DegLine( DRAWSEGMENT* aSegment, DRAWSEGMENT* aHelper ) const; - /** - * Function getNextPadName() - * Compute the 'next' pad number for autoincrement. - * */ - wxString getNextPadName() const; - ///> Sets up handlers for various events. void setTransitions(); diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 6b833b2290..5bea4c9829 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -32,7 +32,6 @@ #include #include #include -#include #include #include @@ -431,229 +430,6 @@ int EDIT_TOOL::Remove( TOOL_EVENT& aEvent ) } -int EDIT_TOOL::CopyItems( TOOL_EVENT& aEvent ) -{ - const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); - - if( !m_editModules || !makeSelection( selection ) ) - { - setTransitions(); - - return 0; - } - - Activate(); - - KIGFX::VIEW_CONTROLS* controls = getViewControls(); - controls->SetSnapping( true ); - controls->ShowCursor( true ); - controls->SetAutoPan( true ); - - PCB_BASE_FRAME* frame = getEditFrame(); - frame->DisplayToolMsg( _( "Select reference point" ) ); - - bool cancelled = false; - VECTOR2I cursorPos = getViewControls()->GetCursorPosition(); - - while( OPT_TOOL_EVENT evt = Wait() ) - { - if( evt->IsMotion() ) - { - cursorPos = getViewControls()->GetCursorPosition(); - } - else if( evt->IsClick( BUT_LEFT ) ) - { - break; - } - else if( evt->IsCancel() || evt->IsActivate() ) - { - cancelled = true; - break; - } - } - - if( !cancelled ) - { - PCB_IO io( CTL_FOR_CLIPBOARD ); - - // Create a temporary module that contains selected items to ease serialization - MODULE module( getModel() ); - - for( int i = 0; i < selection.Size(); ++i ) - { - BOARD_ITEM* clone = static_cast( selection.Item( i )->Clone() ); - - // Do not add reference/value - convert them to the common type - if( TEXTE_MODULE* text = dyn_cast( clone ) ) - text->SetType( TEXTE_MODULE::TEXT_is_DIVERS ); - - module.Add( clone ); - } - - // Set the new relative internal local coordinates of copied items - MODULE* editedModule = getModel()->m_Modules; - wxPoint moveVector = module.GetPosition() + editedModule->GetPosition() - - wxPoint( cursorPos.x, cursorPos.y ); - module.MoveAnchorPosition( moveVector ); - - io.Format( &module, 0 ); - std::string data = io.GetStringOutput( true ); - m_toolMgr->SaveClipboard( data ); - } - - frame->DisplayToolMsg( wxString::Format( _( "Copied %d item(s)" ), selection.Size() ) ); - controls->SetSnapping( false ); - controls->ShowCursor( false ); - controls->SetAutoPan( false ); - - setTransitions(); - - return 0; -} - - -int EDIT_TOOL::PasteItems( TOOL_EVENT& aEvent ) -{ - if( !m_editModules ) - { - setTransitions(); - - return 0; - } - - // Parse clipboard - PCB_IO io( CTL_FOR_CLIPBOARD ); - MODULE* currentModule = getModel()->m_Modules; - MODULE* pastedModule = NULL; - - try - { - BOARD_ITEM* item = io.Parse( wxString( m_toolMgr->GetClipboard().c_str(), wxConvUTF8 ) ); - assert( item->Type() == PCB_MODULE_T ); - pastedModule = dyn_cast( item ); - } - catch( ... ) - { - setTransitions(); - - return 0; - } - - // Placement tool part - KIGFX::VIEW* view = getView(); - KIGFX::VIEW_CONTROLS* controls = getViewControls(); - BOARD* board = getModel(); - PCB_EDIT_FRAME* frame = getEditFrame(); - VECTOR2I cursorPos = getViewControls()->GetCursorPosition(); - - // Add a VIEW_GROUP that serves as a preview for the new item - KIGFX::VIEW_GROUP preview( view ); - pastedModule->SetParent( board ); - pastedModule->SetPosition( wxPoint( cursorPos.x, cursorPos.y ) ); - pastedModule->RunOnChildren( boost::bind( &KIGFX::VIEW_GROUP::Add, boost::ref( preview ), _1 ) ); - preview.Add( pastedModule ); - view->Add( &preview ); - - m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); - controls->ShowCursor( true ); - controls->SetSnapping( true ); - controls->SetAutoPan( true ); - - Activate(); - - // Main loop: keep receiving events - while( OPT_TOOL_EVENT evt = Wait() ) - { - cursorPos = controls->GetCursorPosition(); - - if( evt->IsMotion() ) - { - pastedModule->SetPosition( wxPoint( cursorPos.x, cursorPos.y ) ); - preview.ViewUpdate(); - } - - else if( evt->Category() == TC_COMMAND ) - { - if( evt->IsAction( &COMMON_ACTIONS::rotate ) ) - { - pastedModule->Rotate( pastedModule->GetPosition(), frame->GetRotationAngle() ); - preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - } - else if( evt->IsAction( &COMMON_ACTIONS::flip ) ) - { - pastedModule->Flip( pastedModule->GetPosition() ); - preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - } - else if( evt->IsCancel() || evt->IsActivate() ) - { - preview.Clear(); - break; - } - } - - else if( evt->IsClick( BUT_LEFT ) ) - { - frame->OnModify(); - frame->SaveCopyInUndoList( currentModule, UR_MODEDIT ); - - board->m_Status_Pcb = 0; // I have no clue why, but it is done in the legacy view - currentModule->SetLastEditTime(); - - // MODULE::RunOnChildren is infeasible here: we need to create copies of items, do not - // directly modify them - - for( D_PAD* pad = pastedModule->Pads(); pad; pad = pad->Next() ) - { - D_PAD* clone = static_cast( pad->Clone() ); - - currentModule->Add( clone ); - clone->SetLocalCoord(); - view->Add( clone ); - } - - for( BOARD_ITEM* drawing = pastedModule->GraphicalItems(); - drawing; drawing = drawing->Next() ) - { - BOARD_ITEM* clone = static_cast( drawing->Clone() ); - - if( TEXTE_MODULE* text = dyn_cast( clone ) ) - { - // Do not add reference/value - convert them to the common type - text->SetType( TEXTE_MODULE::TEXT_is_DIVERS ); - currentModule->Add( text ); - text->SetLocalCoord(); - - // Whyyyyyyyyyyyyyyyyyyyyyy?! All other items conform to rotation performed - // on its parent module, but texts are so independent.. - text->Rotate( text->GetPosition(), pastedModule->GetOrientation() ); - } - else if( EDGE_MODULE* edge = dyn_cast( clone ) ) - { - currentModule->Add( edge ); - edge->SetLocalCoord(); - } - - view->Add( clone ); - } - - preview.Clear(); - - break; - } - } - - delete pastedModule; - controls->ShowCursor( false ); - controls->SetSnapping( false ); - controls->SetAutoPan( false ); - view->Remove( &preview ); - - setTransitions(); - - return 0; -} - - void EDIT_TOOL::remove( BOARD_ITEM* aItem ) { BOARD* board = getModel(); @@ -741,8 +517,6 @@ void EDIT_TOOL::setTransitions() Go( &EDIT_TOOL::Flip, COMMON_ACTIONS::flip.MakeEvent() ); Go( &EDIT_TOOL::Remove, COMMON_ACTIONS::remove.MakeEvent() ); Go( &EDIT_TOOL::Properties, COMMON_ACTIONS::properties.MakeEvent() ); - Go( &EDIT_TOOL::CopyItems, COMMON_ACTIONS::copyItems.MakeEvent() ); - Go( &EDIT_TOOL::PasteItems, COMMON_ACTIONS::pasteItems.MakeEvent() ); } diff --git a/pcbnew/tools/edit_tool.h b/pcbnew/tools/edit_tool.h index e68cd74894..5e9d93a7c2 100644 --- a/pcbnew/tools/edit_tool.h +++ b/pcbnew/tools/edit_tool.h @@ -91,20 +91,6 @@ public: */ int Remove( TOOL_EVENT& aEvent ); - /** - * Function CopyItems() - * - * Copies selected items to the clipboard. Works only in "edit modules" mode. - */ - int CopyItems( TOOL_EVENT& aEvent ); - - /** - * Function PastePad() - * - * Pastes items from the clipboard. Works only in "edit modules" mode. - */ - int PasteItems( TOOL_EVENT& aEvent ); - /** * Function EditModules() * diff --git a/pcbnew/tools/module_tools.cpp b/pcbnew/tools/module_tools.cpp new file mode 100644 index 0000000000..091823366d --- /dev/null +++ b/pcbnew/tools/module_tools.cpp @@ -0,0 +1,422 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 CERN + * @author Maciej Suminski + * + * 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 "module_tools.h" +#include "selection_tool.h" +#include "common_actions.h" + +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include + +MODULE_TOOLS::MODULE_TOOLS() : + TOOL_INTERACTIVE( "pcbnew.ModuleEditor" ) +{ +} + + +void MODULE_TOOLS::Reset( RESET_REASON aReason ) +{ + // Init variables used by every drawing tool + m_view = getView(); + m_controls = getViewControls(); + m_board = getModel(); + m_frame = getEditFrame(); +} + + +bool MODULE_TOOLS::Init() +{ + setTransitions(); + + return true; +} + + +static wxString getNextPadName( MODULE* aModule ) +{ + std::set usedNumbers; + + // Create a set of used pad numbers + for( D_PAD* pad = aModule->Pads(); pad; pad = pad->Next() ) + { + wxString padName = pad->GetPadName(); + int padNumber = 0; + int base = 1; + + // Trim and extract the trailing numeric part + while( padName.Len() && padName.Last() >= '0' && padName.Last() <= '9' ) + { + padNumber += ( padName.Last() - '0' ) * base; + padName.RemoveLast(); + base *= 10; + } + + usedNumbers.insert( padNumber ); + } + + int candidate = *usedNumbers.begin(); + + // Look for a gap in pad numbering + for( std::set::iterator it = usedNumbers.begin(), + itEnd = usedNumbers.end(); it != itEnd; ++it ) + { + if( *it - candidate > 1 ) + break; + + candidate = *it; + } + + return wxString::Format( wxT( "%i" ), ++candidate ); +} + + +int MODULE_TOOLS::PlacePad( TOOL_EVENT& aEvent ) +{ + m_frame->SetToolID( ID_MODEDIT_PAD_TOOL, wxCURSOR_PENCIL, _( "Add pads" ) ); + + MODULE* module = m_board->m_Modules; + assert( module ); + + D_PAD* pad = new D_PAD( module ); + m_frame->Import_Pad_Settings( pad, false ); // use the global settings for pad + + VECTOR2I cursorPos = m_controls->GetCursorPosition(); + pad->SetPosition( wxPoint( cursorPos.x, cursorPos.y ) ); + + // Add a VIEW_GROUP that serves as a preview for the new item + KIGFX::VIEW_GROUP preview( m_view ); + preview.Add( pad ); + m_view->Add( &preview ); + + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + m_controls->ShowCursor( true ); + m_controls->SetSnapping( true ); + + Activate(); + + // Main loop: keep receiving events + while( OPT_TOOL_EVENT evt = Wait() ) + { + cursorPos = m_controls->GetCursorPosition(); + + if( evt->IsMotion() ) + { + pad->SetPosition( wxPoint( cursorPos.x, cursorPos.y ) ); + preview.ViewUpdate(); + } + + else if( evt->Category() == TC_COMMAND ) + { + if( evt->IsAction( &COMMON_ACTIONS::rotate ) ) + { + pad->Rotate( pad->GetPosition(), m_frame->GetRotationAngle() ); + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + else if( evt->IsAction( &COMMON_ACTIONS::flip ) ) + { + pad->Flip( pad->GetPosition() ); + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + else if( evt->IsCancel() || evt->IsActivate() ) + { + preview.Clear(); + delete pad; + break; + } + } + + else if( evt->IsClick( BUT_LEFT ) ) + { + m_frame->OnModify(); + m_frame->SaveCopyInUndoList( module, UR_MODEDIT ); + + m_board->m_Status_Pcb = 0; // I have no clue why, but it is done in the legacy view + module->SetLastEditTime(); + module->Pads().PushBack( pad ); + + pad->SetNetCode( NETINFO_LIST::UNCONNECTED ); + + // Set the relative pad position + // ( pad position for module orient, 0, and relative to the module position) + pad->SetLocalCoord(); + + /* NPTH pads take empty pad number (since they can't be connected), + * other pads get incremented from the last one edited */ + wxString padName; + + if( pad->GetAttribute() != PAD_HOLE_NOT_PLATED ) + padName = getNextPadName( module ); + + pad->SetPadName( padName ); + + // Handle the view aspect + preview.Remove( pad ); + m_view->Add( pad ); + + // Start placing next pad + pad = new D_PAD( module ); + m_frame->Import_Pad_Settings( pad, false ); + preview.Add( pad ); + } + } + + m_controls->ShowCursor( false ); + m_controls->SetSnapping( false ); + m_controls->SetAutoPan( false ); + m_view->Remove( &preview ); + + setTransitions(); + m_frame->SetToolID( ID_NO_TOOL_SELECTED, wxCURSOR_DEFAULT, wxEmptyString ); + + return 0; +} + + +int MODULE_TOOLS::CopyItems( TOOL_EVENT& aEvent ) +{ + const SELECTION_TOOL::SELECTION& selection = m_toolMgr->GetTool()->GetSelection(); + + Activate(); + + KIGFX::VIEW_CONTROLS* controls = getViewControls(); + controls->SetSnapping( true ); + controls->ShowCursor( true ); + controls->SetAutoPan( true ); + + PCB_BASE_FRAME* frame = getEditFrame(); + frame->DisplayToolMsg( _( "Select reference point" ) ); + + bool cancelled = false; + VECTOR2I cursorPos = getViewControls()->GetCursorPosition(); + + while( OPT_TOOL_EVENT evt = Wait() ) + { + if( evt->IsMotion() ) + { + cursorPos = getViewControls()->GetCursorPosition(); + } + else if( evt->IsClick( BUT_LEFT ) ) + { + break; + } + else if( evt->IsCancel() || evt->IsActivate() ) + { + cancelled = true; + break; + } + } + + if( !cancelled ) + { + PCB_IO io( CTL_FOR_CLIPBOARD ); + + // Create a temporary module that contains selected items to ease serialization + MODULE module( getModel() ); + + for( int i = 0; i < selection.Size(); ++i ) + { + BOARD_ITEM* clone = static_cast( selection.Item( i )->Clone() ); + + // Do not add reference/value - convert them to the common type + if( TEXTE_MODULE* text = dyn_cast( clone ) ) + text->SetType( TEXTE_MODULE::TEXT_is_DIVERS ); + + module.Add( clone ); + } + + // Set the new relative internal local coordinates of copied items + MODULE* editedModule = getModel()->m_Modules; + wxPoint moveVector = module.GetPosition() + editedModule->GetPosition() - + wxPoint( cursorPos.x, cursorPos.y ); + module.MoveAnchorPosition( moveVector ); + + io.Format( &module, 0 ); + std::string data = io.GetStringOutput( true ); + m_toolMgr->SaveClipboard( data ); + } + + frame->DisplayToolMsg( wxString::Format( _( "Copied %d item(s)" ), selection.Size() ) ); + controls->SetSnapping( false ); + controls->ShowCursor( false ); + controls->SetAutoPan( false ); + + setTransitions(); + + return 0; +} + + +int MODULE_TOOLS::PasteItems( TOOL_EVENT& aEvent ) +{ + // Parse clipboard + PCB_IO io( CTL_FOR_CLIPBOARD ); + MODULE* currentModule = getModel()->m_Modules; + MODULE* pastedModule = NULL; + + try + { + BOARD_ITEM* item = io.Parse( wxString( m_toolMgr->GetClipboard().c_str(), wxConvUTF8 ) ); + assert( item->Type() == PCB_MODULE_T ); + pastedModule = dyn_cast( item ); + } + catch( ... ) + { + m_frame->DisplayToolMsg( _( "Invalid clipboard contents" ) ); + setTransitions(); + + return 0; + } + + // Placement tool part + KIGFX::VIEW* view = getView(); + KIGFX::VIEW_CONTROLS* controls = getViewControls(); + BOARD* board = getModel(); + PCB_EDIT_FRAME* frame = getEditFrame(); + VECTOR2I cursorPos = getViewControls()->GetCursorPosition(); + + // Add a VIEW_GROUP that serves as a preview for the new item + KIGFX::VIEW_GROUP preview( view ); + pastedModule->SetParent( board ); + pastedModule->SetPosition( wxPoint( cursorPos.x, cursorPos.y ) ); + pastedModule->RunOnChildren( boost::bind( &KIGFX::VIEW_GROUP::Add, boost::ref( preview ), _1 ) ); + preview.Add( pastedModule ); + view->Add( &preview ); + + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + controls->ShowCursor( true ); + controls->SetSnapping( true ); + controls->SetAutoPan( true ); + + Activate(); + + // Main loop: keep receiving events + while( OPT_TOOL_EVENT evt = Wait() ) + { + cursorPos = controls->GetCursorPosition(); + + if( evt->IsMotion() ) + { + pastedModule->SetPosition( wxPoint( cursorPos.x, cursorPos.y ) ); + preview.ViewUpdate(); + } + + else if( evt->Category() == TC_COMMAND ) + { + if( evt->IsAction( &COMMON_ACTIONS::rotate ) ) + { + pastedModule->Rotate( pastedModule->GetPosition(), frame->GetRotationAngle() ); + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + else if( evt->IsAction( &COMMON_ACTIONS::flip ) ) + { + pastedModule->Flip( pastedModule->GetPosition() ); + preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + else if( evt->IsCancel() || evt->IsActivate() ) + { + preview.Clear(); + break; + } + } + + else if( evt->IsClick( BUT_LEFT ) ) + { + frame->OnModify(); + frame->SaveCopyInUndoList( currentModule, UR_MODEDIT ); + + board->m_Status_Pcb = 0; // I have no clue why, but it is done in the legacy view + currentModule->SetLastEditTime(); + + // MODULE::RunOnChildren is infeasible here: we need to create copies of items, do not + // directly modify them + + for( D_PAD* pad = pastedModule->Pads(); pad; pad = pad->Next() ) + { + D_PAD* clone = static_cast( pad->Clone() ); + + currentModule->Add( clone ); + clone->SetLocalCoord(); + view->Add( clone ); + } + + for( BOARD_ITEM* drawing = pastedModule->GraphicalItems(); + drawing; drawing = drawing->Next() ) + { + BOARD_ITEM* clone = static_cast( drawing->Clone() ); + + if( TEXTE_MODULE* text = dyn_cast( clone ) ) + { + // Do not add reference/value - convert them to the common type + text->SetType( TEXTE_MODULE::TEXT_is_DIVERS ); + currentModule->Add( text ); + text->SetLocalCoord(); + + // Whyyyyyyyyyyyyyyyyyyyyyy?! All other items conform to rotation performed + // on its parent module, but texts are so independent.. + text->Rotate( text->GetPosition(), pastedModule->GetOrientation() ); + } + else if( EDGE_MODULE* edge = dyn_cast( clone ) ) + { + currentModule->Add( edge ); + edge->SetLocalCoord(); + } + + view->Add( clone ); + } + + preview.Clear(); + + break; + } + } + + delete pastedModule; + controls->ShowCursor( false ); + controls->SetSnapping( false ); + controls->SetAutoPan( false ); + view->Remove( &preview ); + + setTransitions(); + + return 0; +} + + +void MODULE_TOOLS::setTransitions() +{ + Go( &MODULE_TOOLS::PlacePad, COMMON_ACTIONS::placePad.MakeEvent() ); + Go( &MODULE_TOOLS::CopyItems, COMMON_ACTIONS::copyItems.MakeEvent() ); + Go( &MODULE_TOOLS::PasteItems, COMMON_ACTIONS::pasteItems.MakeEvent() ); +} diff --git a/pcbnew/tools/module_tools.h b/pcbnew/tools/module_tools.h new file mode 100644 index 0000000000..b23898c02c --- /dev/null +++ b/pcbnew/tools/module_tools.h @@ -0,0 +1,84 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 CERN + * @author Maciej Suminski + * + * 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 MODULE_TOOLS_H +#define MODULE_TOOLS_H + +#include + +namespace KIGFX +{ + class VIEW; + class VIEW_CONTROLS; +} +class BOARD; +class PCB_EDIT_FRAME; + +/** + * Class MODULE_TOOLS + * + * Module editor specific tools. + */ +class MODULE_TOOLS : public TOOL_INTERACTIVE +{ +public: + MODULE_TOOLS(); + + /// @copydoc TOOL_INTERACTIVE::Reset() + void Reset( RESET_REASON aReason ); + + /// @copydoc TOOL_INTERACTIVE::Init() + bool Init(); + + /** + * Function PlacePad() + * Places a pad in module editor. + */ + int PlacePad( TOOL_EVENT& aEvent ); + + /** + * Function CopyItems() + * + * Copies selected items to the clipboard. Works only in "edit modules" mode. + */ + int CopyItems( TOOL_EVENT& aEvent ); + + /** + * Function PastePad() + * + * Pastes items from the clipboard. Works only in "edit modules" mode. + */ + int PasteItems( TOOL_EVENT& aEvent ); + +private: + ///> Sets up handlers for various events. + void setTransitions(); + + KIGFX::VIEW* m_view; + KIGFX::VIEW_CONTROLS* m_controls; + BOARD* m_board; + PCB_EDIT_FRAME* m_frame; +}; + +#endif diff --git a/pcbnew/tools/pcb_editor_control.h b/pcbnew/tools/pcb_editor_control.h index 50b9a6c691..8d879907fa 100644 --- a/pcbnew/tools/pcb_editor_control.h +++ b/pcbnew/tools/pcb_editor_control.h @@ -55,7 +55,7 @@ private: ///> Sets up handlers for various events. void setTransitions(); - ///> Pointerto the currently used edit frame. + ///> Pointer to the currently used edit frame. PCB_EDIT_FRAME* m_frame; }; From cf79b4c64f6e90870c21d0ed41d3e5f121ce2132 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 15:02:56 +0200 Subject: [PATCH 647/741] Removed redundant accessor calls in MODULE_TOOLS. --- pcbnew/tools/module_tools.cpp | 68 ++++++++++++++++------------------- 1 file changed, 31 insertions(+), 37 deletions(-) diff --git a/pcbnew/tools/module_tools.cpp b/pcbnew/tools/module_tools.cpp index 091823366d..dffc355133 100644 --- a/pcbnew/tools/module_tools.cpp +++ b/pcbnew/tools/module_tools.cpp @@ -210,22 +210,20 @@ int MODULE_TOOLS::CopyItems( TOOL_EVENT& aEvent ) Activate(); - KIGFX::VIEW_CONTROLS* controls = getViewControls(); - controls->SetSnapping( true ); - controls->ShowCursor( true ); - controls->SetAutoPan( true ); + m_controls->SetSnapping( true ); + m_controls->ShowCursor( true ); + m_controls->SetAutoPan( true ); - PCB_BASE_FRAME* frame = getEditFrame(); - frame->DisplayToolMsg( _( "Select reference point" ) ); + m_frame->DisplayToolMsg( _( "Select reference point" ) ); bool cancelled = false; - VECTOR2I cursorPos = getViewControls()->GetCursorPosition(); + VECTOR2I cursorPos = m_controls->GetCursorPosition(); while( OPT_TOOL_EVENT evt = Wait() ) { if( evt->IsMotion() ) { - cursorPos = getViewControls()->GetCursorPosition(); + cursorPos = m_controls->GetCursorPosition(); } else if( evt->IsClick( BUT_LEFT ) ) { @@ -243,7 +241,7 @@ int MODULE_TOOLS::CopyItems( TOOL_EVENT& aEvent ) PCB_IO io( CTL_FOR_CLIPBOARD ); // Create a temporary module that contains selected items to ease serialization - MODULE module( getModel() ); + MODULE module( m_board ); for( int i = 0; i < selection.Size(); ++i ) { @@ -257,7 +255,7 @@ int MODULE_TOOLS::CopyItems( TOOL_EVENT& aEvent ) } // Set the new relative internal local coordinates of copied items - MODULE* editedModule = getModel()->m_Modules; + MODULE* editedModule = m_board->m_Modules; wxPoint moveVector = module.GetPosition() + editedModule->GetPosition() - wxPoint( cursorPos.x, cursorPos.y ); module.MoveAnchorPosition( moveVector ); @@ -267,10 +265,10 @@ int MODULE_TOOLS::CopyItems( TOOL_EVENT& aEvent ) m_toolMgr->SaveClipboard( data ); } - frame->DisplayToolMsg( wxString::Format( _( "Copied %d item(s)" ), selection.Size() ) ); - controls->SetSnapping( false ); - controls->ShowCursor( false ); - controls->SetAutoPan( false ); + m_frame->DisplayToolMsg( wxString::Format( _( "Copied %d item(s)" ), selection.Size() ) ); + m_controls->SetSnapping( false ); + m_controls->ShowCursor( false ); + m_controls->SetAutoPan( false ); setTransitions(); @@ -282,7 +280,7 @@ int MODULE_TOOLS::PasteItems( TOOL_EVENT& aEvent ) { // Parse clipboard PCB_IO io( CTL_FOR_CLIPBOARD ); - MODULE* currentModule = getModel()->m_Modules; + MODULE* currentModule = m_board->m_Modules; MODULE* pastedModule = NULL; try @@ -300,31 +298,27 @@ int MODULE_TOOLS::PasteItems( TOOL_EVENT& aEvent ) } // Placement tool part - KIGFX::VIEW* view = getView(); - KIGFX::VIEW_CONTROLS* controls = getViewControls(); - BOARD* board = getModel(); - PCB_EDIT_FRAME* frame = getEditFrame(); - VECTOR2I cursorPos = getViewControls()->GetCursorPosition(); + VECTOR2I cursorPos = m_controls->GetCursorPosition(); // Add a VIEW_GROUP that serves as a preview for the new item - KIGFX::VIEW_GROUP preview( view ); - pastedModule->SetParent( board ); + KIGFX::VIEW_GROUP preview( m_view ); + pastedModule->SetParent( m_board ); pastedModule->SetPosition( wxPoint( cursorPos.x, cursorPos.y ) ); pastedModule->RunOnChildren( boost::bind( &KIGFX::VIEW_GROUP::Add, boost::ref( preview ), _1 ) ); preview.Add( pastedModule ); - view->Add( &preview ); + m_view->Add( &preview ); m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); - controls->ShowCursor( true ); - controls->SetSnapping( true ); - controls->SetAutoPan( true ); + m_controls->ShowCursor( true ); + m_controls->SetSnapping( true ); + m_controls->SetAutoPan( true ); Activate(); // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { - cursorPos = controls->GetCursorPosition(); + cursorPos = m_controls->GetCursorPosition(); if( evt->IsMotion() ) { @@ -336,7 +330,7 @@ int MODULE_TOOLS::PasteItems( TOOL_EVENT& aEvent ) { if( evt->IsAction( &COMMON_ACTIONS::rotate ) ) { - pastedModule->Rotate( pastedModule->GetPosition(), frame->GetRotationAngle() ); + pastedModule->Rotate( pastedModule->GetPosition(), m_frame->GetRotationAngle() ); preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); } else if( evt->IsAction( &COMMON_ACTIONS::flip ) ) @@ -353,10 +347,10 @@ int MODULE_TOOLS::PasteItems( TOOL_EVENT& aEvent ) else if( evt->IsClick( BUT_LEFT ) ) { - frame->OnModify(); - frame->SaveCopyInUndoList( currentModule, UR_MODEDIT ); + m_frame->OnModify(); + m_frame->SaveCopyInUndoList( currentModule, UR_MODEDIT ); - board->m_Status_Pcb = 0; // I have no clue why, but it is done in the legacy view + m_board->m_Status_Pcb = 0; // I have no clue why, but it is done in the legacy view currentModule->SetLastEditTime(); // MODULE::RunOnChildren is infeasible here: we need to create copies of items, do not @@ -368,7 +362,7 @@ int MODULE_TOOLS::PasteItems( TOOL_EVENT& aEvent ) currentModule->Add( clone ); clone->SetLocalCoord(); - view->Add( clone ); + m_view->Add( clone ); } for( BOARD_ITEM* drawing = pastedModule->GraphicalItems(); @@ -393,7 +387,7 @@ int MODULE_TOOLS::PasteItems( TOOL_EVENT& aEvent ) edge->SetLocalCoord(); } - view->Add( clone ); + m_view->Add( clone ); } preview.Clear(); @@ -403,10 +397,10 @@ int MODULE_TOOLS::PasteItems( TOOL_EVENT& aEvent ) } delete pastedModule; - controls->ShowCursor( false ); - controls->SetSnapping( false ); - controls->SetAutoPan( false ); - view->Remove( &preview ); + m_controls->ShowCursor( false ); + m_controls->SetSnapping( false ); + m_controls->SetAutoPan( false ); + m_view->Remove( &preview ); setTransitions(); From 2bcbb67528fd511fd5743aa97b061c4570793974 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 15:02:56 +0200 Subject: [PATCH 648/741] Initial version of the Pad Enumeration tool. --- pcbnew/tools/common_actions.cpp | 4 ++ pcbnew/tools/common_actions.h | 3 + pcbnew/tools/module_tools.cpp | 116 ++++++++++++++++++++++++++++++++ pcbnew/tools/module_tools.h | 6 ++ 4 files changed, 129 insertions(+) diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 96c819e890..c1b538ba04 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -269,6 +269,10 @@ TOOL_ACTION COMMON_ACTIONS::placePad( "pcbnew.ModuleEditor.placePad", AS_GLOBAL, 0, "Add pads", "Add pads", AF_ACTIVATE ); +TOOL_ACTION COMMON_ACTIONS::enumeratePads( "pcbnew.ModuleEditor.enumeratePads", + AS_GLOBAL, 0, + "Enumerate pads", "Enumerate pads", AF_ACTIVATE ); + TOOL_ACTION COMMON_ACTIONS::copyItems( "pcbnew.ModuleEditor.copyItems", AS_GLOBAL, MD_CTRL + int( 'C' ), "Copy items", "Copy items", AF_ACTIVATE ); diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index e25e4a431f..78bc6f50d1 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -177,6 +177,9 @@ public: /// Activation of the drawing tool (placing a PAD) static TOOL_ACTION placePad; + /// Tool for quick pad enumeration + static TOOL_ACTION enumeratePads; + /// Copying module items to clipboard static TOOL_ACTION copyItems; diff --git a/pcbnew/tools/module_tools.cpp b/pcbnew/tools/module_tools.cpp index dffc355133..2a297052e0 100644 --- a/pcbnew/tools/module_tools.cpp +++ b/pcbnew/tools/module_tools.cpp @@ -32,6 +32,8 @@ #include #include +#include +#include #include #include @@ -39,6 +41,7 @@ #include #include +#include MODULE_TOOLS::MODULE_TOOLS() : TOOL_INTERACTIVE( "pcbnew.ModuleEditor" ) @@ -58,6 +61,17 @@ void MODULE_TOOLS::Reset( RESET_REASON aReason ) bool MODULE_TOOLS::Init() { + // Find the selection tool, so they can cooperate + SELECTION_TOOL* selectionTool = m_toolMgr->GetTool(); + + if( !selectionTool ) + { + DisplayError( NULL, wxT( "pcbnew.InteractiveSelection tool is not available" ) ); + return false; + } + + selectionTool->AddMenuItem( COMMON_ACTIONS::enumeratePads ); + setTransitions(); return true; @@ -204,6 +218,107 @@ int MODULE_TOOLS::PlacePad( TOOL_EVENT& aEvent ) } +int MODULE_TOOLS::EnumeratePads( TOOL_EVENT& aEvent ) +{ + std::list pads; + std::set allPads; + MODULE* module = m_board->m_Modules; + + GENERAL_COLLECTOR collector; + const KICAD_T types[] = { PCB_PAD_T, EOT }; + + GENERAL_COLLECTORS_GUIDE guide = m_frame->GetCollectorsGuide(); + guide.SetIgnoreMTextsMarkedNoShow( true ); + guide.SetIgnoreMTextsOnCopper( true ); + guide.SetIgnoreMTextsOnCmp( true ); + guide.SetIgnoreModulesOnCu( true ); + guide.SetIgnoreModulesOnCmp( true ); + guide.SetIgnoreModulesVals( true ); + guide.SetIgnoreModulesRefs( true ); + + // Create a set containing all pads (to avoid double adding to a list); + for( D_PAD* p = module->Pads(); p; p = p->Next() ) + allPads.insert( p ); + + // TODO display settings window + int padNumber = 1; + wxString padPrefix = ""; + + m_frame->DisplayToolMsg( _( "Hold left mouse button and move cursor over pads to enumerate them" ) ); + + Activate(); + + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + m_controls->ShowCursor( true ); + + while( OPT_TOOL_EVENT evt = Wait() ) + { + if( evt->IsDrag( BUT_LEFT ) || evt->IsClick( BUT_LEFT ) ) + { + // Add pads to the list according to the selection order + VECTOR2I cursorPos = m_controls->GetCursorPosition(); + + collector.Empty(); + collector.Collect( m_board, types, wxPoint( cursorPos.x, cursorPos.y ), guide ); + + for( int i = 0; i < collector.GetCount(); ++i ) + { + if( collector[i]->Type() == PCB_PAD_T ) + { + D_PAD* pad = static_cast( collector[i] ); + + std::set::iterator it = allPads.find( pad ); + + // Add the pad to the list, if it was not selected previously.. + if( it != allPads.end() ) + { + allPads.erase( it ); + pads.push_back( pad ); + pad->SetSelected(); + } + + // ..or remove it from the list if it was clicked + else if( evt->IsClick( BUT_LEFT ) ) + { + allPads.insert( pad ); + pads.remove( pad ); + pad->ClearSelected(); + } + } + } + } + + else if( ( evt->IsKeyPressed() && evt->KeyCode() == WXK_RETURN ) || + evt->IsDblClick( BUT_LEFT ) ) + { + // Accept changes + m_frame->OnModify(); + m_frame->SaveCopyInUndoList( module, UR_MODEDIT ); + + BOOST_FOREACH( D_PAD* pad, pads ) + pad->SetPadName( wxString::Format( "%s%d", padPrefix, padNumber++ ) ); + + break; + } + + else if( evt->IsCancel() || evt->IsActivate() ) + { + break; + } + } + + BOOST_FOREACH( D_PAD* pad, pads ) + pad->ClearSelected(); + + m_frame->DisplayToolMsg( wxEmptyString ); + m_controls->ShowCursor( false ); + + setTransitions(); + + return 0; +} + + int MODULE_TOOLS::CopyItems( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_toolMgr->GetTool()->GetSelection(); @@ -411,6 +526,7 @@ int MODULE_TOOLS::PasteItems( TOOL_EVENT& aEvent ) void MODULE_TOOLS::setTransitions() { Go( &MODULE_TOOLS::PlacePad, COMMON_ACTIONS::placePad.MakeEvent() ); + Go( &MODULE_TOOLS::EnumeratePads, COMMON_ACTIONS::enumeratePads.MakeEvent() ); Go( &MODULE_TOOLS::CopyItems, COMMON_ACTIONS::copyItems.MakeEvent() ); Go( &MODULE_TOOLS::PasteItems, COMMON_ACTIONS::pasteItems.MakeEvent() ); } diff --git a/pcbnew/tools/module_tools.h b/pcbnew/tools/module_tools.h index b23898c02c..64899e4182 100644 --- a/pcbnew/tools/module_tools.h +++ b/pcbnew/tools/module_tools.h @@ -57,6 +57,12 @@ public: */ int PlacePad( TOOL_EVENT& aEvent ); + /** + * Function EnumeratePads() + * Tool for quick pad enumeration. + */ + int EnumeratePads( TOOL_EVENT& aEvent ); + /** * Function CopyItems() * From 709dfcc16e1db2281da4e1e80cee66db33a08a07 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 15:10:32 +0200 Subject: [PATCH 649/741] Added settings dialog for Pad Enumeration tool. --- pcbnew/CMakeLists.txt | 2 + pcbnew/dialogs/dialog_enum_pads.cpp | 42 ++ pcbnew/dialogs/dialog_enum_pads.h | 49 ++ pcbnew/dialogs/dialog_enum_pads_base.cpp | 68 +++ pcbnew/dialogs/dialog_enum_pads_base.fbp | 572 +++++++++++++++++++++++ pcbnew/dialogs/dialog_enum_pads_base.h | 53 +++ pcbnew/tools/module_tools.cpp | 16 +- 7 files changed, 799 insertions(+), 3 deletions(-) create mode 100644 pcbnew/dialogs/dialog_enum_pads.cpp create mode 100644 pcbnew/dialogs/dialog_enum_pads.h create mode 100644 pcbnew/dialogs/dialog_enum_pads_base.cpp create mode 100644 pcbnew/dialogs/dialog_enum_pads_base.fbp create mode 100644 pcbnew/dialogs/dialog_enum_pads_base.h diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 1f032f2c93..187b73a45a 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -59,6 +59,8 @@ set( PCBNEW_DIALOGS dialogs/dialog_edit_module_for_Modedit.cpp dialogs/dialog_edit_module_text.cpp dialogs/dialog_edit_module_text_base.cpp + dialogs/dialog_enum_pads.cpp + dialogs/dialog_enum_pads_base.cpp dialogs/dialog_exchange_modules_base.cpp dialogs/dialog_export_idf.cpp dialogs/dialog_export_idf_base.cpp diff --git a/pcbnew/dialogs/dialog_enum_pads.cpp b/pcbnew/dialogs/dialog_enum_pads.cpp new file mode 100644 index 0000000000..51f822047e --- /dev/null +++ b/pcbnew/dialogs/dialog_enum_pads.cpp @@ -0,0 +1,42 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 CERN + * @author Maciej Suminski + * + * 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 "dialog_enum_pads.h" + +DIALOG_ENUM_PADS::DIALOG_ENUM_PADS( wxWindow* aParent ) : + DIALOG_ENUM_PADS_BASE( aParent ) +{ +} + + +int DIALOG_ENUM_PADS::GetStartNumber() const +{ + return m_padStartNum->GetValue(); +} + + +wxString DIALOG_ENUM_PADS::GetPrefix() const +{ + return m_padPrefix->GetValue(); +} diff --git a/pcbnew/dialogs/dialog_enum_pads.h b/pcbnew/dialogs/dialog_enum_pads.h new file mode 100644 index 0000000000..188c7328dc --- /dev/null +++ b/pcbnew/dialogs/dialog_enum_pads.h @@ -0,0 +1,49 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 CERN + * @author Maciej Suminski + * + * 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 __dialog_enum_pads__ +#define __dialog_enum_pads__ + +/** +@file +Subclass of DIALOG_ENUM_PADS_BASE, which is generated by wxFormBuilder. +*/ + +#include "dialog_enum_pads_base.h" + +/** Implementing DIALOG_ENUM_PADS_BASE */ +class DIALOG_ENUM_PADS : public DIALOG_ENUM_PADS_BASE +{ +public: + /** Constructor */ + DIALOG_ENUM_PADS( wxWindow* parent ); + + ///> Returns the starting number that is going to be used for the first enumerated pad. + int GetStartNumber() const; + + ///> Returns common prefix for all enumerated pads. + wxString GetPrefix() const; +}; + +#endif // __dialog_enum_pads__ diff --git a/pcbnew/dialogs/dialog_enum_pads_base.cpp b/pcbnew/dialogs/dialog_enum_pads_base.cpp new file mode 100644 index 0000000000..af1ac745f3 --- /dev/null +++ b/pcbnew/dialogs/dialog_enum_pads_base.cpp @@ -0,0 +1,68 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Apr 30 2013) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "dialog_enum_pads_base.h" + +/////////////////////////////////////////////////////////////////////////// + +DIALOG_ENUM_PADS_BASE::DIALOG_ENUM_PADS_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bMainSizer; + bMainSizer = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bPrefixSizer; + bPrefixSizer = new wxBoxSizer( wxHORIZONTAL ); + + m_lblPadPrefix = new wxStaticText( this, wxID_ANY, _("Pad name prefix:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_lblPadPrefix->Wrap( -1 ); + bPrefixSizer->Add( m_lblPadPrefix, 1, wxALL, 5 ); + + m_padPrefix = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_padPrefix->SetMaxLength( 4 ); + bPrefixSizer->Add( m_padPrefix, 0, wxALL, 5 ); + + + bMainSizer->Add( bPrefixSizer, 1, wxEXPAND, 5 ); + + wxBoxSizer* bPadNumSizer; + bPadNumSizer = new wxBoxSizer( wxHORIZONTAL ); + + m_lblPadStartNum = new wxStaticText( this, wxID_ANY, _("First pad number:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_lblPadStartNum->Wrap( -1 ); + bPadNumSizer->Add( m_lblPadStartNum, 1, wxALL, 5 ); + + m_padStartNum = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 999, 1 ); + bPadNumSizer->Add( m_padStartNum, 0, wxALL, 5 ); + + + bMainSizer->Add( bPadNumSizer, 1, wxEXPAND, 5 ); + + m_lblInfo = new wxStaticText( this, wxID_ANY, _("Pad names are restricted to 4 characters (including number)."), wxDefaultPosition, wxDefaultSize, 0 ); + m_lblInfo->Wrap( 320 ); + bMainSizer->Add( m_lblInfo, 0, wxALL, 5 ); + + m_stdButtons = new wxStdDialogButtonSizer(); + m_stdButtonsOK = new wxButton( this, wxID_OK ); + m_stdButtons->AddButton( m_stdButtonsOK ); + m_stdButtonsCancel = new wxButton( this, wxID_CANCEL ); + m_stdButtons->AddButton( m_stdButtonsCancel ); + m_stdButtons->Realize(); + + bMainSizer->Add( m_stdButtons, 2, wxEXPAND, 5 ); + + + this->SetSizer( bMainSizer ); + this->Layout(); + + this->Centre( wxBOTH ); +} + +DIALOG_ENUM_PADS_BASE::~DIALOG_ENUM_PADS_BASE() +{ +} diff --git a/pcbnew/dialogs/dialog_enum_pads_base.fbp b/pcbnew/dialogs/dialog_enum_pads_base.fbp new file mode 100644 index 0000000000..f17006d1f9 --- /dev/null +++ b/pcbnew/dialogs/dialog_enum_pads_base.fbp @@ -0,0 +1,572 @@ + + + + + + C++ + 1 + source_name + 0 + 0 + res + UTF-8 + connect + dialog_enum_pads_base + 1000 + none + 1 + DIALOG_ENUM_PADS_BASE + + . + + 1 + 1 + 1 + 0 + 0 + + 0 + wxAUI_MGR_DEFAULT + + wxBOTH + + 1 + 1 + impl_virtual + + + + 0 + wxID_ANY + + + DIALOG_ENUM_PADS_BASE + + 340,240 + wxDEFAULT_DIALOG_STYLE + + Pad enumeration settings + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bMainSizer + wxVERTICAL + none + + 5 + wxEXPAND + 1 + + + bPrefixSizer + wxHORIZONTAL + none + + 5 + wxALL + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Pad name prefix: + + 0 + + + 0 + + 1 + m_lblPadPrefix + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 4 + + 0 + + 1 + m_padPrefix + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bPadNumSizer + wxHORIZONTAL + none + + 5 + wxALL + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + First pad number: + + 0 + + + 0 + + 1 + m_lblPadStartNum + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + 1 + 999 + + 0 + + 0 + + 0 + + 1 + m_padStartNum + 1 + + + protected + 1 + + Resizable + 1 + + wxSP_ARROW_KEYS + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Pad names are restricted to 4 characters (including number). + + 0 + + + 0 + + 1 + m_lblInfo + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + 320 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 2 + + 0 + 1 + 0 + 0 + 0 + 1 + 0 + 0 + + m_stdButtons + protected + + + + + + + + + + + + + + diff --git a/pcbnew/dialogs/dialog_enum_pads_base.h b/pcbnew/dialogs/dialog_enum_pads_base.h new file mode 100644 index 0000000000..caed966dcd --- /dev/null +++ b/pcbnew/dialogs/dialog_enum_pads_base.h @@ -0,0 +1,53 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Apr 30 2013) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __DIALOG_ENUM_PADS_BASE_H__ +#define __DIALOG_ENUM_PADS_BASE_H__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class DIALOG_ENUM_PADS_BASE +/////////////////////////////////////////////////////////////////////////////// +class DIALOG_ENUM_PADS_BASE : public wxDialog +{ + private: + + protected: + wxStaticText* m_lblPadPrefix; + wxTextCtrl* m_padPrefix; + wxStaticText* m_lblPadStartNum; + wxSpinCtrl* m_padStartNum; + wxStaticText* m_lblInfo; + wxStdDialogButtonSizer* m_stdButtons; + wxButton* m_stdButtonsOK; + wxButton* m_stdButtonsCancel; + + public: + + DIALOG_ENUM_PADS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Pad enumeration settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 340,240 ), long style = wxDEFAULT_DIALOG_STYLE ); + ~DIALOG_ENUM_PADS_BASE(); + +}; + +#endif //__DIALOG_ENUM_PADS_BASE_H__ diff --git a/pcbnew/tools/module_tools.cpp b/pcbnew/tools/module_tools.cpp index 2a297052e0..447e249229 100644 --- a/pcbnew/tools/module_tools.cpp +++ b/pcbnew/tools/module_tools.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -42,6 +43,7 @@ #include #include +#include MODULE_TOOLS::MODULE_TOOLS() : TOOL_INTERACTIVE( "pcbnew.ModuleEditor" ) @@ -240,9 +242,17 @@ int MODULE_TOOLS::EnumeratePads( TOOL_EVENT& aEvent ) for( D_PAD* p = module->Pads(); p; p = p->Next() ) allPads.insert( p ); - // TODO display settings window - int padNumber = 1; - wxString padPrefix = ""; + DIALOG_ENUM_PADS settingsDlg( m_frame ); + + if( settingsDlg.ShowModal() == wxID_CANCEL ) + { + setTransitions(); + + return 0; + } + + int padNumber = settingsDlg.GetStartNumber(); + wxString padPrefix = settingsDlg.GetPrefix(); m_frame->DisplayToolMsg( _( "Hold left mouse button and move cursor over pads to enumerate them" ) ); From d21271b432e665e760485e559863280c6460cfe9 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 15:10:32 +0200 Subject: [PATCH 650/741] Pad Enumeration tool support for SMD pads. --- pcbnew/tools/module_tools.cpp | 4 +--- pcbnew/tools/selection_tool.cpp | 6 +++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/pcbnew/tools/module_tools.cpp b/pcbnew/tools/module_tools.cpp index 447e249229..d3e5b85cf3 100644 --- a/pcbnew/tools/module_tools.cpp +++ b/pcbnew/tools/module_tools.cpp @@ -233,12 +233,10 @@ int MODULE_TOOLS::EnumeratePads( TOOL_EVENT& aEvent ) guide.SetIgnoreMTextsMarkedNoShow( true ); guide.SetIgnoreMTextsOnCopper( true ); guide.SetIgnoreMTextsOnCmp( true ); - guide.SetIgnoreModulesOnCu( true ); - guide.SetIgnoreModulesOnCmp( true ); guide.SetIgnoreModulesVals( true ); guide.SetIgnoreModulesRefs( true ); - // Create a set containing all pads (to avoid double adding to a list); + // Create a set containing all pads (to avoid double adding to a list) for( D_PAD* p = module->Pads(); p; p = p->Next() ) allPads.insert( p ); diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 3ae883ed89..511564c216 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -47,8 +47,6 @@ #include "bright_box.h" #include "common_actions.h" -using boost::optional; - SELECTION_TOOL::SELECTION_TOOL() : TOOL_INTERACTIVE( "pcbnew.InteractiveSelection" ), SelectedEvent( TC_MESSAGE, TA_ACTION, "pcbnew.InteractiveSelection.selected" ), @@ -393,6 +391,7 @@ int SELECTION_TOOL::SingleSelection( TOOL_EVENT& aEvent ) return 0; } + int SELECTION_TOOL::ClearSelection( TOOL_EVENT& aEvent ) { clearSelection(); @@ -401,6 +400,7 @@ int SELECTION_TOOL::ClearSelection( TOOL_EVENT& aEvent ) return 0; } + void SELECTION_TOOL::clearSelection() { if( m_selection.Empty() ) @@ -472,7 +472,7 @@ BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector ) } else if( evt->Action() == TA_CONTEXT_MENU_CHOICE ) { - optional id = evt->GetCommandId(); + boost::optional id = evt->GetCommandId(); // User has selected an item, so this one will be returned if( id && ( *id >= 0 ) ) From bfa15d8db0cd8d93b03cddf1838930ed7ae5bca1 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 15:10:32 +0200 Subject: [PATCH 651/741] Moved SELECTION out of SELECTION_TOOL class. --- pcbnew/tools/edit_tool.cpp | 16 ++++---- pcbnew/tools/edit_tool.h | 4 +- pcbnew/tools/module_tools.cpp | 2 +- pcbnew/tools/placement_tool.cpp | 12 +++--- pcbnew/tools/point_editor.cpp | 4 +- pcbnew/tools/selection_tool.cpp | 2 +- pcbnew/tools/selection_tool.h | 71 ++++++++++++++++----------------- 7 files changed, 55 insertions(+), 56 deletions(-) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 5bea4c9829..72cb824dd0 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -73,7 +73,7 @@ bool EDIT_TOOL::Init() int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) { - const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); + const SELECTION& selection = m_selectionTool->GetSelection(); // Shall the selection be cleared at the end? bool unselect = selection.Empty(); @@ -218,7 +218,7 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) { - const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); + const SELECTION& selection = m_selectionTool->GetSelection(); PCB_BASE_EDIT_FRAME* editFrame = getEditFrame(); if( !makeSelection( selection ) ) @@ -287,7 +287,7 @@ int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) int EDIT_TOOL::Rotate( TOOL_EVENT& aEvent ) { - const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); + const SELECTION& selection = m_selectionTool->GetSelection(); PCB_BASE_EDIT_FRAME* editFrame = getEditFrame(); // Shall the selection be cleared at the end? @@ -341,7 +341,7 @@ int EDIT_TOOL::Rotate( TOOL_EVENT& aEvent ) int EDIT_TOOL::Flip( TOOL_EVENT& aEvent ) { - const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); + const SELECTION& selection = m_selectionTool->GetSelection(); PCB_BASE_FRAME* editFrame = getEditFrame(); // Shall the selection be cleared at the end? @@ -395,7 +395,7 @@ int EDIT_TOOL::Flip( TOOL_EVENT& aEvent ) int EDIT_TOOL::Remove( TOOL_EVENT& aEvent ) { - const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); + const SELECTION& selection = m_selectionTool->GetSelection(); if( !makeSelection( selection ) ) { @@ -522,7 +522,7 @@ void EDIT_TOOL::setTransitions() void EDIT_TOOL::updateRatsnest( bool aRedraw ) { - const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); + const SELECTION& selection = m_selectionTool->GetSelection(); RN_DATA* ratsnest = getModel()->GetRatsnest(); ratsnest->ClearSimple(); @@ -538,7 +538,7 @@ void EDIT_TOOL::updateRatsnest( bool aRedraw ) } -wxPoint EDIT_TOOL::getModificationPoint( const SELECTION_TOOL::SELECTION& aSelection ) +wxPoint EDIT_TOOL::getModificationPoint( const SELECTION& aSelection ) { if( aSelection.Size() == 1 ) { @@ -556,7 +556,7 @@ wxPoint EDIT_TOOL::getModificationPoint( const SELECTION_TOOL::SELECTION& aSelec } -bool EDIT_TOOL::makeSelection( const SELECTION_TOOL::SELECTION& aSelection ) +bool EDIT_TOOL::makeSelection( const SELECTION& aSelection ) { if( aSelection.Empty() ) // Try to find an item that could be modified m_toolMgr->RunAction( COMMON_ACTIONS::selectionSingle ); diff --git a/pcbnew/tools/edit_tool.h b/pcbnew/tools/edit_tool.h index 5e9d93a7c2..76b161ae01 100644 --- a/pcbnew/tools/edit_tool.h +++ b/pcbnew/tools/edit_tool.h @@ -143,11 +143,11 @@ private: ///> Returns the right modification point (e.g. for rotation), depending on the number of ///> selected items. - wxPoint getModificationPoint( const SELECTION_TOOL::SELECTION& aSelection ); + wxPoint getModificationPoint( const SELECTION& aSelection ); ///> If there are no items currently selected, it tries to choose the item that is under ///> the cursor or displays a disambiguation menu if there are multpile items. - bool makeSelection( const SELECTION_TOOL::SELECTION& aSelection ); + bool makeSelection( const SELECTION& aSelection ); ///> Updates view with the changes in the list. void processChanges( const PICKED_ITEMS_LIST* aList ); diff --git a/pcbnew/tools/module_tools.cpp b/pcbnew/tools/module_tools.cpp index d3e5b85cf3..a23dec3be3 100644 --- a/pcbnew/tools/module_tools.cpp +++ b/pcbnew/tools/module_tools.cpp @@ -329,7 +329,7 @@ int MODULE_TOOLS::EnumeratePads( TOOL_EVENT& aEvent ) int MODULE_TOOLS::CopyItems( TOOL_EVENT& aEvent ) { - const SELECTION_TOOL::SELECTION& selection = m_toolMgr->GetTool()->GetSelection(); + const SELECTION& selection = m_toolMgr->GetTool()->GetSelection(); Activate(); diff --git a/pcbnew/tools/placement_tool.cpp b/pcbnew/tools/placement_tool.cpp index 4956c51c45..d436862394 100644 --- a/pcbnew/tools/placement_tool.cpp +++ b/pcbnew/tools/placement_tool.cpp @@ -73,7 +73,7 @@ bool PLACEMENT_TOOL::Init() int PLACEMENT_TOOL::AlignTop( TOOL_EVENT& aEvent ) { - const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); + const SELECTION& selection = m_selectionTool->GetSelection(); if( selection.Size() > 1 ) { @@ -116,7 +116,7 @@ int PLACEMENT_TOOL::AlignTop( TOOL_EVENT& aEvent ) int PLACEMENT_TOOL::AlignBottom( TOOL_EVENT& aEvent ) { - const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); + const SELECTION& selection = m_selectionTool->GetSelection(); if( selection.Size() > 1 ) { @@ -159,7 +159,7 @@ int PLACEMENT_TOOL::AlignBottom( TOOL_EVENT& aEvent ) int PLACEMENT_TOOL::AlignLeft( TOOL_EVENT& aEvent ) { - const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); + const SELECTION& selection = m_selectionTool->GetSelection(); if( selection.Size() > 1 ) { @@ -202,7 +202,7 @@ int PLACEMENT_TOOL::AlignLeft( TOOL_EVENT& aEvent ) int PLACEMENT_TOOL::AlignRight( TOOL_EVENT& aEvent ) { - const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); + const SELECTION& selection = m_selectionTool->GetSelection(); if( selection.Size() > 1 ) { @@ -257,7 +257,7 @@ static bool compareY( const BOARD_ITEM* aA, const BOARD_ITEM* aB ) int PLACEMENT_TOOL::DistributeHorizontally( TOOL_EVENT& aEvent ) { - const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); + const SELECTION& selection = m_selectionTool->GetSelection(); if( selection.Size() > 1 ) { @@ -306,7 +306,7 @@ int PLACEMENT_TOOL::DistributeHorizontally( TOOL_EVENT& aEvent ) int PLACEMENT_TOOL::DistributeVertically( TOOL_EVENT& aEvent ) { - const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); + const SELECTION& selection = m_selectionTool->GetSelection(); if( selection.Size() > 1 ) { diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp index 14e66424e3..3df09c4ce0 100644 --- a/pcbnew/tools/point_editor.cpp +++ b/pcbnew/tools/point_editor.cpp @@ -203,7 +203,7 @@ bool POINT_EDITOR::Init() int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) { - const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); + const SELECTION& selection = m_selectionTool->GetSelection(); if( selection.Size() == 1 ) { @@ -666,7 +666,7 @@ EDIT_POINT POINT_EDITOR::get45DegConstrainer() const void POINT_EDITOR::breakOutline( const VECTOR2I& aBreakPoint ) { EDA_ITEM* item = m_editPoints->GetParent(); - const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); + const SELECTION& selection = m_selectionTool->GetSelection(); if( item->Type() == PCB_ZONE_AREA_T ) { diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 511564c216..2fa5508685 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -764,7 +764,7 @@ BOARD_ITEM* SELECTION_TOOL::prefer( GENERAL_COLLECTOR& aCollector, const KICAD_T } -void SELECTION_TOOL::SELECTION::clear() +void SELECTION::clear() { items.ClearItemsList(); group->Clear(); diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index 4891610d16..55108221a3 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -41,6 +41,41 @@ namespace KIGFX class VIEW_GROUP; } +struct SELECTION +{ + /// Set of selected items + PICKED_ITEMS_LIST items; + + /// VIEW_GROUP that holds currently selected items + KIGFX::VIEW_GROUP* group; + + /// Checks if there is anything selected + bool Empty() const + { + return ( items.GetCount() == 0 ); + } + + /// Returns the number of selected parts + int Size() const + { + return items.GetCount(); + } + + /// Alias to make code shorter and clearer + template + T* Item( unsigned int aIndex ) const + { + return static_cast( items.GetPickedItem( aIndex ) ); + } + +private: + /// Clears both the VIEW_GROUP and set of selected items. Please note that it does not + /// change properties of selected items (e.g. selection flag). + void clear(); + + friend class SELECTION_TOOL; +}; + /** * Class SELECTION_TOOL * @@ -52,48 +87,12 @@ class VIEW_GROUP; * - takes into account high-contrast & layer visibility settings * - invokes InteractiveEdit tool when user starts to drag selected items */ - class SELECTION_TOOL : public TOOL_INTERACTIVE { public: SELECTION_TOOL(); ~SELECTION_TOOL(); - struct SELECTION - { - /// Set of selected items - PICKED_ITEMS_LIST items; - - /// VIEW_GROUP that holds currently selected items - KIGFX::VIEW_GROUP* group; - - /// Checks if there is anything selected - bool Empty() const - { - return ( items.GetCount() == 0 ); - } - - /// Returns the number of selected parts - int Size() const - { - return items.GetCount(); - } - - /// Alias to make code shorter and clearer - template - T* Item( unsigned int aIndex ) const - { - return static_cast( items.GetPickedItem( aIndex ) ); - } - - private: - /// Clears both the VIEW_GROUP and set of selected items. Please note that it does not - /// change properties of selected items (e.g. selection flag). - void clear(); - - friend class SELECTION_TOOL; - }; - /// @copydoc TOOL_INTERACTIVE::Reset() void Reset( RESET_REASON aReason ); From 2b0e27f132b7d7bf6f246b81c148b5331fefc4c1 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 15:10:32 +0200 Subject: [PATCH 652/741] Introduced SELECTION_CONDITIONS to determine which menu entries should be visible in the SELECTION_TOOL context menu, depending on the selection. --- common/tool/context_menu.cpp | 50 ++++++++- include/tool/context_menu.h | 5 +- include/tool/tool_event.h | 4 +- pcbnew/CMakeLists.txt | 1 + pcbnew/tools/edit_tool.cpp | 10 +- pcbnew/tools/placement_tool.cpp | 3 +- pcbnew/tools/selection_conditions.cpp | 120 +++++++++++++++++++++ pcbnew/tools/selection_conditions.h | 148 ++++++++++++++++++++++++++ pcbnew/tools/selection_tool.cpp | 42 +++++--- pcbnew/tools/selection_tool.h | 36 +++++-- 10 files changed, 382 insertions(+), 37 deletions(-) create mode 100644 pcbnew/tools/selection_conditions.cpp create mode 100644 pcbnew/tools/selection_conditions.h diff --git a/common/tool/context_menu.cpp b/common/tool/context_menu.cpp index e68473dd6c..57756e66fc 100644 --- a/common/tool/context_menu.cpp +++ b/common/tool/context_menu.cpp @@ -71,6 +71,47 @@ CONTEXT_MENU::CONTEXT_MENU( const CONTEXT_MENU& aMenu ) : } +CONTEXT_MENU& CONTEXT_MENU::operator=( const CONTEXT_MENU& aMenu ) +{ + Clear(); + + m_titleSet = aMenu.m_titleSet; + m_selected = aMenu.m_selected; + m_tool = aMenu.m_tool; + m_toolActions = aMenu.m_toolActions; + m_customHandler = aMenu.m_customHandler; + + // Copy all the menu entries + for( unsigned i = 0; i < aMenu.GetMenuItemCount(); ++i ) + { + wxMenuItem* item = aMenu.FindItemByPosition( i ); + + if( item->IsSubMenu() ) + { +#ifdef DEBUG + // Submenus of a CONTEXT_MENU are supposed to be CONTEXT_MENUs as well + assert( dynamic_cast( item->GetSubMenu() ) ); +#endif + + CONTEXT_MENU* menu = new CONTEXT_MENU( static_cast( *item->GetSubMenu() ) ); + AppendSubMenu( menu, item->GetItemLabel(), wxEmptyString ); + } + else + { + wxMenuItem* newItem = new wxMenuItem( this, item->GetId(), item->GetItemLabel(), + wxEmptyString, item->GetKind() ); + + Append( newItem ); + copyItem( item, newItem ); + } + } + + setupEvents(); + + return *this; +} + + void CONTEXT_MENU::setupEvents() { Connect( wxEVT_MENU_HIGHLIGHT, wxEventHandler( CONTEXT_MENU::onMenuEvent ), NULL, this ); @@ -144,11 +185,12 @@ void CONTEXT_MENU::Clear() { m_titleSet = false; - // Remove all the entries from context menu - for( unsigned i = 0; i < GetMenuItemCount(); ++i ) - Destroy( FindItemByPosition( 0 ) ); - + GetMenuItems().DeleteContents( true ); + GetMenuItems().Clear(); m_toolActions.clear(); + GetMenuItems().DeleteContents( false ); // restore the default so destructor does not go wild + + assert( GetMenuItemCount() == 0 ); } diff --git a/include/tool/context_menu.h b/include/tool/context_menu.h index 0b5f28c41b..72b69315d6 100644 --- a/include/tool/context_menu.h +++ b/include/tool/context_menu.h @@ -47,7 +47,9 @@ public: ///> Copy constructor CONTEXT_MENU( const CONTEXT_MENU& aMenu ); - virtual ~CONTEXT_MENU() {}; + CONTEXT_MENU& operator=( const CONTEXT_MENU& aMenu ); + + virtual ~CONTEXT_MENU() {} /** * Function SetTitle() @@ -74,7 +76,6 @@ public: */ void Add( const TOOL_ACTION& aAction ); - /** * Function Clear() * Removes all the entries from the menu (as well as its title). It leaves the menu in the diff --git a/include/tool/tool_event.h b/include/tool/tool_event.h index fd6eaa2c72..b140fa3953 100644 --- a/include/tool/tool_event.h +++ b/include/tool/tool_event.h @@ -328,10 +328,10 @@ public: if( m_category == TC_COMMAND || m_category == TC_MESSAGE ) { - if( m_commandStr && aEvent.m_commandStr ) + if( (bool) m_commandStr && (bool) aEvent.m_commandStr ) return *m_commandStr == *aEvent.m_commandStr; - if( m_commandId && aEvent.m_commandId ) + if( (bool) m_commandId && (bool) aEvent.m_commandId ) return *m_commandId == *aEvent.m_commandId; } diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 187b73a45a..8b66ab9a49 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -258,6 +258,7 @@ set( PCBNEW_CLASS_SRCS tools/selection_tool.cpp tools/selection_area.cpp + tools/selection_conditions.cpp tools/bright_box.cpp tools/edit_points.cpp tools/edit_constraints.cpp diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 72cb824dd0..ed69da782b 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -59,11 +59,11 @@ bool EDIT_TOOL::Init() } // Add context menu entries that are displayed when selection tool is active - m_selectionTool->AddMenuItem( COMMON_ACTIONS::editActivate ); - m_selectionTool->AddMenuItem( COMMON_ACTIONS::rotate ); - m_selectionTool->AddMenuItem( COMMON_ACTIONS::flip ); - m_selectionTool->AddMenuItem( COMMON_ACTIONS::remove ); - m_selectionTool->AddMenuItem( COMMON_ACTIONS::properties ); + m_selectionTool->AddMenuItem( COMMON_ACTIONS::editActivate, SELECTION_CONDITIONS::NotEmpty ); + m_selectionTool->AddMenuItem( COMMON_ACTIONS::rotate, SELECTION_CONDITIONS::NotEmpty ); + m_selectionTool->AddMenuItem( COMMON_ACTIONS::flip, SELECTION_CONDITIONS::NotEmpty ); + m_selectionTool->AddMenuItem( COMMON_ACTIONS::remove, SELECTION_CONDITIONS::NotEmpty ); + m_selectionTool->AddMenuItem( COMMON_ACTIONS::properties, SELECTION_CONDITIONS::NotEmpty ); setTransitions(); diff --git a/pcbnew/tools/placement_tool.cpp b/pcbnew/tools/placement_tool.cpp index d436862394..82d7570e5e 100644 --- a/pcbnew/tools/placement_tool.cpp +++ b/pcbnew/tools/placement_tool.cpp @@ -63,7 +63,8 @@ bool PLACEMENT_TOOL::Init() menu->AppendSeparator(); menu->Add( COMMON_ACTIONS::distributeHorizontally ); menu->Add( COMMON_ACTIONS::distributeVertically ); - m_selectionTool->AddSubMenu( menu, wxString( "Align/distribute" ) ); + m_selectionTool->AddSubMenu( menu, wxString( "Align/distribute" ), + SELECTION_CONDITIONS::MoreThan( 1 ) ); setTransitions(); diff --git a/pcbnew/tools/selection_conditions.cpp b/pcbnew/tools/selection_conditions.cpp new file mode 100644 index 0000000000..f1679dac8b --- /dev/null +++ b/pcbnew/tools/selection_conditions.cpp @@ -0,0 +1,120 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 CERN + * @author Maciej Suminski + * + * 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 "selection_conditions.h" +#include "selection_tool.h" + +#include + + +bool SELECTION_CONDITIONS::NotEmpty( const SELECTION& aSelection ) +{ + return !aSelection.Empty(); +} + + +SELECTION_CONDITION SELECTION_CONDITIONS::HasType( KICAD_T aType ) +{ + return boost::bind( &SELECTION_CONDITIONS::hasTypeFunc, _1, aType ); +} + + +SELECTION_CONDITION SELECTION_CONDITIONS::OnlyType( KICAD_T aType ) +{ + return boost::bind( &SELECTION_CONDITIONS::onlyTypeFunc, _1, aType ); +} + + +SELECTION_CONDITION SELECTION_CONDITIONS::Count( int aNumber ) +{ + return boost::bind( &SELECTION_CONDITIONS::countFunc, _1, aNumber ); +} + + +SELECTION_CONDITION SELECTION_CONDITIONS::MoreThan( int aNumber ) +{ + return boost::bind( &SELECTION_CONDITIONS::moreThanFunc, _1, aNumber ); +} + + +SELECTION_CONDITION SELECTION_CONDITIONS::LessThan( int aNumber ) +{ + return boost::bind( &SELECTION_CONDITIONS::lessThanFunc, _1, aNumber ); +} + + +bool SELECTION_CONDITIONS::hasTypeFunc( const SELECTION& aSelection, KICAD_T aType ) +{ + for( int i = 0; i < aSelection.Size(); ++i ) + { + if( aSelection.Item( i )->Type() == aType ) + return true; + } + + return false; +} + + +bool SELECTION_CONDITIONS::onlyTypeFunc( const SELECTION& aSelection, KICAD_T aType ) +{ + for( int i = 0; i < aSelection.Size(); ++i ) + { + if( aSelection.Item( i )->Type() != aType ) + return false; + } + + return true; +} + + +bool SELECTION_CONDITIONS::countFunc( const SELECTION& aSelection, int aNumber ) +{ + return aSelection.Size() == aNumber; +} + + +bool SELECTION_CONDITIONS::moreThanFunc( const SELECTION& aSelection, int aNumber ) +{ + return aSelection.Size() > aNumber; +} + + +bool SELECTION_CONDITIONS::lessThanFunc( const SELECTION& aSelection, int aNumber ) +{ + return aSelection.Size() > aNumber; +} + + +SELECTION_CONDITION operator||( const SELECTION_CONDITION& aConditionA, + const SELECTION_CONDITION& aConditionB ) +{ + return boost::bind( &SELECTION_CONDITIONS::orFunc, aConditionA, aConditionB, _1 ); +} + + +SELECTION_CONDITION operator&&( const SELECTION_CONDITION& aConditionA, + const SELECTION_CONDITION& aConditionB ) +{ + return boost::bind( &SELECTION_CONDITIONS::andFunc, aConditionA, aConditionB, _1 ); +} diff --git a/pcbnew/tools/selection_conditions.h b/pcbnew/tools/selection_conditions.h new file mode 100644 index 0000000000..39827b3bd0 --- /dev/null +++ b/pcbnew/tools/selection_conditions.h @@ -0,0 +1,148 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 CERN + * @author Maciej Suminski + * + * 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 SELECTION_CONDITIONS_H_ +#define SELECTION_CONDITIONS_H_ + +#include +#include + +class SELECTION; + +///> Functor type that checks a specific condition for selected items. +typedef boost::function SELECTION_CONDITION; + +SELECTION_CONDITION operator||( const SELECTION_CONDITION& aConditionA, + const SELECTION_CONDITION& aConditionB ); + +SELECTION_CONDITION operator&&( const SELECTION_CONDITION& aConditionA, + const SELECTION_CONDITION& aConditionB ); + + +/** + * Class that groups generic conditions for selected items. + */ +class SELECTION_CONDITIONS +{ +public: + /** + * Function ShowAlways + * The default condition function (always returns true). + * @param aSelection is the selection to be tested. + * @return Always true; + */ + static bool ShowAlways( const SELECTION& aSelection ) + { + return true; + } + + /** + * Function NotEmpty + * Tests if there are any items selected. + * @param aSelection is the selection to be tested. + * @return True if there is at least one item selected. + */ + static bool NotEmpty( const SELECTION& aSelection ); + + /** + * Function HasType + * Creates functor that tests if among the selected items there is at least one of a given type. + * @param aType is the type that is searched. + * @return Functor testing for presence of items of a given type. + */ + static SELECTION_CONDITION HasType( KICAD_T aType ); + + /** + * Function OnlyType + * Creates functor that tests if the selected items are *only* of given type. + * @param aType is the type that is searched. + * @return Functor testing if selected items are exclusively of one type.. + */ + static SELECTION_CONDITION OnlyType( KICAD_T aType ); + + /** + * Function Count + * Creates functor that tests if the number of selected items is equal to the value given as + * parameter. + * @param aNumber is the number of expected items. + * @return Functor testing if the number of selected items is equal aNumber. + */ + static SELECTION_CONDITION Count( int aNumber ); + + /** + * Function MoreThan + * Creates functor that tests if the number of selected items is greater than the value given + * as parameter. + * @param aNumber is the number used for comparison. + * @return Functor testing if the number of selected items is greater than aNumber. + */ + static SELECTION_CONDITION MoreThan( int aNumber ); + + /** + * Function LessThan + * Creates functor that tests if the number of selected items is smaller than the value given + * as parameter. + * @param aNumber is the number used for comparison. + * @return Functor testing if the number of selected items is smaller than aNumber. + */ + static SELECTION_CONDITION LessThan( int aNumber ); + +private: + ///> Helper function used by HasType() + static bool hasTypeFunc( const SELECTION& aSelection, KICAD_T aType ); + + ///> Helper function used by OnlyType() + static bool onlyTypeFunc( const SELECTION& aSelection, KICAD_T aType ); + + ///> Helper function used by Count() + static bool countFunc( const SELECTION& aSelection, int aNumber ); + + ///> Helper function used by MoreThan() + static bool moreThanFunc( const SELECTION& aSelection, int aNumber ); + + ///> Helper function used by LessThan() + static bool lessThanFunc( const SELECTION& aSelection, int aNumber ); + + ///> Helper function used by operator|| + static bool orFunc( const SELECTION_CONDITION& aConditionA, + const SELECTION_CONDITION& aConditionB, const SELECTION& aSelection ) + { + return aConditionA( aSelection ) || aConditionB( aSelection ); + } + + ///> Helper function used by operator&& + static bool andFunc( const SELECTION_CONDITION& aConditionA, + const SELECTION_CONDITION& aConditionB, const SELECTION& aSelection ) + { + return aConditionA( aSelection ) && aConditionB( aSelection ); + } + + friend SELECTION_CONDITION operator||( const SELECTION_CONDITION& aConditionA, + const SELECTION_CONDITION& aConditionB ); + + friend SELECTION_CONDITION operator&&( const SELECTION_CONDITION& aConditionA, + const SELECTION_CONDITION& aConditionB ); +}; + +#endif /* SELECTION_CONDITIONS_H_ */ diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 2fa5508685..b281091923 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -117,8 +117,7 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) if( m_selection.Empty() ) selectSingle( evt->Position() ); - if( !m_selection.Empty() ) - SetContextMenu( &m_menu, CMENU_NOW ); + generateMenu(); } // double click? Display the properties window @@ -188,17 +187,19 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) } -void SELECTION_TOOL::AddMenuItem( const TOOL_ACTION& aAction ) +void SELECTION_TOOL::AddMenuItem( const TOOL_ACTION& aAction, const SELECTION_CONDITION& aCondition ) { assert( aAction.GetId() > 0 ); // Check if the action was registered before in ACTION_MANAGER m_menu.Add( aAction ); + m_menuConditions.push_back( aCondition ); } -void SELECTION_TOOL::AddSubMenu( CONTEXT_MENU* aMenu, const wxString& aLabel ) +void SELECTION_TOOL::AddSubMenu( CONTEXT_MENU* aMenu, const wxString& aLabel, const SELECTION_CONDITION& aCondition ) { m_menu.AppendSubMenu( aMenu, aLabel ); + m_menuConditions.push_back( aCondition ); } @@ -420,9 +421,6 @@ void SELECTION_TOOL::clearSelection() getEditFrame()->SetCurItem( NULL ); - // Do not show the context menu when there is nothing selected - SetContextMenu( &m_menu, CMENU_OFF ); - // Inform other potentially interested tools TOOL_EVENT clearEvent( ClearedEvent ); m_toolMgr->ProcessEvent( clearEvent ); @@ -622,14 +620,10 @@ void SELECTION_TOOL::select( BOARD_ITEM* aItem ) ITEM_PICKER picker( aItem ); m_selection.items.PushItem( picker ); - // It is enough to do it only for the first selected item if( m_selection.Size() == 1 ) { // Set as the current item, so the information about selection is displayed m_frame->SetCurItem( aItem, true ); - - // Now the context menu should be enabled - SetContextMenu( &m_menu, CMENU_BUTTON ); } else if( m_selection.Size() == 2 ) // Check only for 2, so it will not be { // called for every next selected item @@ -655,12 +649,8 @@ void SELECTION_TOOL::deselect( BOARD_ITEM* aItem ) if( itemIdx >= 0 ) m_selection.items.RemovePicker( itemIdx ); - // If there is nothing selected, disable the context menu if( m_selection.Empty() ) - { - SetContextMenu( &m_menu, CMENU_OFF ); m_frame->SetCurItem( NULL ); - } // Inform other potentially interested tools TOOL_EVENT deselected( DeselectedEvent ); @@ -764,6 +754,28 @@ BOARD_ITEM* SELECTION_TOOL::prefer( GENERAL_COLLECTOR& aCollector, const KICAD_T } +void SELECTION_TOOL::generateMenu() +{ + // Create a copy of the master context menu + m_menuCopy = m_menu; + + assert( m_menuCopy.GetMenuItemCount() == m_menuConditions.size() ); + + // Filter out entries that does not apply to the current selection + for( int i = m_menuCopy.GetMenuItemCount() - 1; i >= 0; --i ) + { + if( !m_menuConditions[i]( m_selection ) ) + { + wxMenuItem* item = m_menuCopy.FindItemByPosition( i ); + m_menuCopy.Destroy( item ); + } + } + + if( m_menuCopy.GetMenuItemCount() > 0 ) + SetContextMenu( &m_menuCopy, CMENU_NOW ); +} + + void SELECTION::clear() { items.ClearItemsList(); diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index 55108221a3..06a0af35e6 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -31,6 +31,8 @@ #include #include +#include "selection_conditions.h" + class PCB_BASE_FRAME; class SELECTION_AREA; class BOARD_ITEM; @@ -118,8 +120,10 @@ public: * * Adds a menu entry to run a TOOL_ACTION on selected items. * @param aAction is a menu entry to be added. + * @param aCondition is a condition that has to be fulfilled to enable the menu entry. */ - void AddMenuItem( const TOOL_ACTION& aAction ); + void AddMenuItem( const TOOL_ACTION& aAction, + const SELECTION_CONDITION& aCondition = SELECTION_CONDITIONS::ShowAlways ); /** * Function AddSubMenu() @@ -127,11 +131,14 @@ public: * Adds a submenu to the selection tool right-click context menu. * @param aMenu is the submenu to be added. * @param aLabel is the label of added submenu. + * @param aCondition is a condition that has to be fulfilled to enable the submenu entry. */ - void AddSubMenu( CONTEXT_MENU* aMenu, const wxString& aLabel ); + void AddSubMenu( CONTEXT_MENU* aMenu, const wxString& aLabel, + const SELECTION_CONDITION& aCondition = SELECTION_CONDITIONS::ShowAlways ); /** * Function EditModules() + * * Toggles edit module mode. When enabled, one may select parts of modules individually * (graphics, pads, etc.), so they can be modified. * @param aEnabled decides if the mode should be enabled. @@ -275,26 +282,39 @@ private: */ BOARD_ITEM* prefer( GENERAL_COLLECTOR& aCollector, const KICAD_T aTypes[] ) const; + /** + * Function generateMenu() + * Creates a copy of context menu that is filtered by menu conditions and displayed to + * the user. + */ + void generateMenu(); + /// Pointer to the parent frame. PCB_BASE_FRAME* m_frame; - /// Visual representation of selection box + /// Visual representation of selection box. SELECTION_AREA* m_selArea; - /// Current state of selection + /// Current state of selection. SELECTION m_selection; - /// Flag saying if items should be added to the current selection or rather replace it + /// Flag saying if items should be added to the current selection or rather replace it. bool m_additive; - /// Flag saying if multiple selection mode is active + /// Flag saying if multiple selection mode is active. bool m_multiple; - /// Right click popup menu + /// Right click popup menu (master instance). CONTEXT_MENU m_menu; - /// Edit module mode flag + /// Copy of the context menu that is filtered by menu conditions and displayed to the user. + CONTEXT_MENU m_menuCopy; + + /// Edit module mode flag. bool m_editModules; + + /// Conditions for specific context menu entries. + std::deque m_menuConditions; }; #endif From 31e25ac4cfb51db634149d8f38868133c59aa77e Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 15:10:32 +0200 Subject: [PATCH 653/741] Fixed module viewer crash. --- pcbnew/modview_frame.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pcbnew/modview_frame.cpp b/pcbnew/modview_frame.cpp index cd0622fd12..75a20bcdee 100644 --- a/pcbnew/modview_frame.cpp +++ b/pcbnew/modview_frame.cpp @@ -149,6 +149,8 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent m_footprintList = new wxListBox( this, ID_MODVIEW_FOOTPRINT_LIST, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_HSCROLL ); + SetBoard( new BOARD() ); + // Ensure all layers and items are visible: GetBoard()->SetVisibleAlls(); SetScreen( new PCB_SCREEN( GetPageSizeIU() ) ); From 15f5c228ccd8cdf988dde0d4ed308739f904d834 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 15:10:32 +0200 Subject: [PATCH 654/741] Fixed autozooming with empty board/module. --- pcbnew/moduleframe.cpp | 20 +------------------- pcbnew/modview_frame.cpp | 26 ++++++++++++++++++++------ pcbnew/modview_frame.h | 2 +- pcbnew/tools/pcbnew_control.cpp | 28 ++++++++++++++++++++-------- 4 files changed, 42 insertions(+), 34 deletions(-) diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index a3af6dc5fe..bd5b92e70a 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -696,24 +696,6 @@ void FOOTPRINT_EDIT_FRAME::updateTitle() void FOOTPRINT_EDIT_FRAME::updateView() { static_cast( GetGalCanvas() )->DisplayBoard( GetBoard() ); - - m_Pcb->ComputeBoundingBox( false ); - EDA_RECT boardBbox = m_Pcb->GetBoundingBox(); - BOX2D bbox; - - if( boardBbox.GetSize().x > 0 && boardBbox.GetSize().y > 0 ) - { - bbox.SetOrigin( VECTOR2D( boardBbox.GetOrigin() ) ); - bbox.SetSize( VECTOR2D( boardBbox.GetSize() ) ); - } - else - { - // Default empty view - bbox.SetOrigin( VECTOR2D( -1000, -1000 ) ); - bbox.SetSize( VECTOR2D( 2000, 2000 ) ); - } - - GetGalCanvas()->GetView()->SetViewport( bbox ); - + m_toolManager->RunAction( COMMON_ACTIONS::zoomFitScreen ); m_toolManager->ResetTools( TOOL_BASE::MODEL_RELOAD ); } diff --git a/pcbnew/modview_frame.cpp b/pcbnew/modview_frame.cpp index 75a20bcdee..3404a5b349 100644 --- a/pcbnew/modview_frame.cpp +++ b/pcbnew/modview_frame.cpp @@ -466,7 +466,7 @@ void FOOTPRINT_VIEWER_FRAME::ClickOnFootprintList( wxCommandEvent& event ) UpdateTitle(); if( IsGalCanvasActive() ) - redrawGal(); + updateView(); Zoom_Automatique( false ); m_canvas->Refresh(); @@ -851,7 +851,7 @@ void FOOTPRINT_VIEWER_FRAME::SelectAndViewFootprint( int aMode ) Update3D_Frame(); if( IsGalCanvasActive() ) - redrawGal(); + updateView(); } @@ -880,12 +880,26 @@ void FOOTPRINT_VIEWER_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg ) } -void FOOTPRINT_VIEWER_FRAME::redrawGal() +void FOOTPRINT_VIEWER_FRAME::updateView() { - static_cast( GetGalCanvas() )->DisplayBoard( m_Pcb ); + static_cast( GetGalCanvas() )->DisplayBoard( GetBoard() ); - // Autozoom m_Pcb->ComputeBoundingBox( false ); EDA_RECT boardBbox = m_Pcb->GetBoundingBox(); - GetGalCanvas()->GetView()->SetViewport( BOX2D( boardBbox.GetOrigin(), boardBbox.GetSize() ) ); + BOX2D bbox; + + // Autozoom + if( boardBbox.GetSize().x > 0 && boardBbox.GetSize().y > 0 ) + { + bbox.SetOrigin( VECTOR2D( boardBbox.GetOrigin() ) ); + bbox.SetSize( VECTOR2D( boardBbox.GetSize() ) ); + } + else + { + // Default empty view + bbox.SetOrigin( VECTOR2D( -1000, -1000 ) ); + bbox.SetSize( VECTOR2D( 2000, 2000 ) ); + } + + GetGalCanvas()->GetView()->SetViewport( bbox ); } diff --git a/pcbnew/modview_frame.h b/pcbnew/modview_frame.h index 4dd1210979..311f150ed8 100644 --- a/pcbnew/modview_frame.h +++ b/pcbnew/modview_frame.h @@ -172,7 +172,7 @@ private: void SaveCopyInUndoList( BOARD_ITEM*, UNDO_REDO_T, const wxPoint& ) {} void SaveCopyInUndoList( const PICKED_ITEMS_LIST&, UNDO_REDO_T, const wxPoint &) {} - void redrawGal(); + void updateView(); DECLARE_EVENT_TABLE() }; diff --git a/pcbnew/tools/pcbnew_control.cpp b/pcbnew/tools/pcbnew_control.cpp index 3eba7f495b..0a75ce975e 100644 --- a/pcbnew/tools/pcbnew_control.cpp +++ b/pcbnew/tools/pcbnew_control.cpp @@ -109,17 +109,29 @@ int PCBNEW_CONTROL::ZoomFitScreen( TOOL_EVENT& aEvent ) KIGFX::VIEW* view = m_frame->GetGalCanvas()->GetView(); KIGFX::GAL* gal = m_frame->GetGalCanvas()->GetGAL(); BOX2I boardBBox = getModel()->ViewBBox(); - VECTOR2I screenSize = gal->GetScreenPixelSize(); - double iuPerX = screenSize.x ? boardBBox.GetWidth() / screenSize.x : 1.0; - double iuPerY = screenSize.y ? boardBBox.GetHeight() / screenSize.y : 1.0; + if( boardBBox.GetSize().x == 0 || boardBBox.GetSize().y == 0 ) + { + // Empty view + view->SetScale( 100000.0 ); + view->SetCenter( VECTOR2D( 0, 0 ) ); + } + else + { + // Autozoom to board + VECTOR2I screenSize = gal->GetScreenPixelSize(); - double bestZoom = std::max( iuPerX, iuPerY ); - double zoomFactor = gal->GetWorldScale() / gal->GetZoomFactor(); - double zoom = 1.0 / ( zoomFactor * bestZoom ); + double iuPerX = screenSize.x ? boardBBox.GetWidth() / screenSize.x : 1.0; + double iuPerY = screenSize.y ? boardBBox.GetHeight() / screenSize.y : 1.0; + + double bestZoom = std::max( iuPerX, iuPerY ); + double zoomFactor = gal->GetWorldScale() / gal->GetZoomFactor(); + double zoom = 1.0 / ( zoomFactor * bestZoom ); + + view->SetScale( zoom ); + view->SetCenter( boardBBox.Centre() ); + } - view->SetScale( zoom ); - view->SetCenter( boardBBox.Centre() ); setTransitions(); return 0; From 65c116621d1c6fa46c6d3ee017a968a77a647968 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 15:10:32 +0200 Subject: [PATCH 655/741] Added support for changing the cursor size. --- common/gal/cairo/cairo_gal.cpp | 16 ++++++++++++++++ include/gal/cairo/cairo_gal.h | 3 +++ include/gal/graphics_abstraction_layer.h | 12 +++++++++++- pcbnew/tools/common_actions.cpp | 20 +++++++++++++++----- pcbnew/tools/common_actions.h | 1 + pcbnew/tools/pcbnew_control.cpp | 19 +++++++++++++++++++ pcbnew/tools/pcbnew_control.h | 1 + 7 files changed, 66 insertions(+), 6 deletions(-) diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index 73ca64294d..b0b033d037 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -75,6 +75,9 @@ CAIRO_GAL::CAIRO_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, SetSize( aParent->GetSize() ); screenSize = VECTOR2I( aParent->GetSize() ); + + cursorPixels = NULL; + cursorPixelsSaved = NULL; initCursor(); // Grid color settings are different in Cairo and OpenGL @@ -808,6 +811,13 @@ void CAIRO_GAL::ClearTarget( RENDER_TARGET aTarget ) } +void CAIRO_GAL::SetCursorSize( unsigned int aCursorSize ) +{ + GAL::SetCursorSize( aCursorSize ); + initCursor(); +} + + void CAIRO_GAL::DrawCursor( const VECTOR2D& aCursorPosition ) { // Now we should only store the position of the mouse cursor @@ -890,6 +900,12 @@ void CAIRO_GAL::skipMouseEvent( wxMouseEvent& aEvent ) void CAIRO_GAL::initCursor() { + if( cursorPixels ) + delete cursorPixels; + + if( cursorPixelsSaved ) + delete cursorPixelsSaved; + cursorPixels = new wxBitmap( cursorSize, cursorSize ); cursorPixelsSaved = new wxBitmap( cursorSize, cursorSize ); diff --git a/include/gal/cairo/cairo_gal.h b/include/gal/cairo/cairo_gal.h index e0b1dba963..dca18acc05 100644 --- a/include/gal/cairo/cairo_gal.h +++ b/include/gal/cairo/cairo_gal.h @@ -229,6 +229,9 @@ public: // Cursor // ------- + /// @copydoc GAL::SetCursorSize() + virtual void SetCursorSize( unsigned int aCursorSize ); + /// @copydoc GAL::DrawCursor() virtual void DrawCursor( const VECTOR2D& aCursorPosition ); diff --git a/include/gal/graphics_abstraction_layer.h b/include/gal/graphics_abstraction_layer.h index f607e96975..3fef15d1fc 100644 --- a/include/gal/graphics_abstraction_layer.h +++ b/include/gal/graphics_abstraction_layer.h @@ -783,12 +783,22 @@ public: cursorColor = aCursorColor; } + /** + * @brief Returns the cursor size. + * + * @return The current cursor size (in pixels). + */ + inline unsigned int GetCursorSize() const + { + return cursorSize; + } + /** * @brief Set the cursor size. * * @param aCursorSize is the size of the cursor expressed in pixels. */ - inline void SetCursorSize( unsigned int aCursorSize ) + virtual inline void SetCursorSize( unsigned int aCursorSize ) { cursorSize = aCursorSize; } diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index c1b538ba04..3e2118eb84 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -29,13 +29,16 @@ // Selection tool actions TOOL_ACTION COMMON_ACTIONS::selectionActivate( "pcbnew.InteractiveSelection", - AS_GLOBAL, 0, "", "", AF_ACTIVATE ); // No description, it is not supposed to be shown anywhere + AS_GLOBAL, 0, + "", "", AF_ACTIVATE ); // No description, it is not supposed to be shown anywhere TOOL_ACTION COMMON_ACTIONS::selectionSingle( "pcbnew.InteractiveSelection.Single", - AS_GLOBAL, 0, "", "" ); // No description, it is not supposed to be shown anywhere + AS_GLOBAL, 0, + "", "" ); // No description, it is not supposed to be shown anywhere TOOL_ACTION COMMON_ACTIONS::selectionClear( "pcbnew.InteractiveSelection.Clear", - AS_GLOBAL, 0, "", "" ); // No description, it is not supposed to be shown anywhere + AS_GLOBAL, 0, + "", "" ); // No description, it is not supposed to be shown anywhere // Edit tool actions @@ -287,6 +290,10 @@ TOOL_ACTION COMMON_ACTIONS::resetCoords( "pcbnew.Control.resetCoords", AS_GLOBAL, ' ', "", "" ); +TOOL_ACTION COMMON_ACTIONS::switchCursor( "pcbnew.Control.switchCursor", + AS_GLOBAL, 0, + "", "" ); + TOOL_ACTION COMMON_ACTIONS::switchUnits( "pcbnew.Control.switchUnits", AS_GLOBAL, MD_CTRL + int( 'U' ), "", "" ); @@ -304,7 +311,8 @@ TOOL_ACTION COMMON_ACTIONS::routerActivate( "pcbnew.InteractiveRouter", "Run push & shove router", "Run push & shove router", AF_ACTIVATE ); TOOL_ACTION COMMON_ACTIONS::pointEditorUpdate( "pcbnew.PointEditor.update", - AS_GLOBAL, 0, "", "" ); // No description, it is not supposed to be shown anywhere + AS_GLOBAL, 0, + "", "" ); // No description, it is not supposed to be shown anywhere // Placement tool @@ -420,6 +428,9 @@ boost::optional COMMON_ACTIONS::TranslateLegacyId( int aId ) case ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE: return COMMON_ACTIONS::highContrastMode.MakeEvent(); + case ID_TB_OPTIONS_SELECT_CURSOR: + return COMMON_ACTIONS::switchCursor.MakeEvent(); + case ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH: case ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH: case ID_PCB_DELETE_ITEM_BUTT: @@ -427,7 +438,6 @@ boost::optional COMMON_ACTIONS::TranslateLegacyId( int aId ) case ID_PCB_SHOW_1_RATSNEST_BUTT: case ID_PCB_PLACE_OFFSET_COORD_BUTT: case ID_TB_OPTIONS_SHOW_MODULE_RATSNEST: - case ID_TB_OPTIONS_SELECT_CURSOR: case ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR_MICROWAVE: case ID_MENU_PCB_SHOW_HIDE_MUWAVE_TOOLBAR: case ID_MICROWAVE_V_TOOLBAR: diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index 78bc6f50d1..a47513acd9 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -189,6 +189,7 @@ public: // Miscellaneous static TOOL_ACTION resetCoords; + static TOOL_ACTION switchCursor; static TOOL_ACTION switchUnits; static TOOL_ACTION showHelp; static TOOL_ACTION toBeDone; diff --git a/pcbnew/tools/pcbnew_control.cpp b/pcbnew/tools/pcbnew_control.cpp index 0a75ce975e..2d92566530 100644 --- a/pcbnew/tools/pcbnew_control.cpp +++ b/pcbnew/tools/pcbnew_control.cpp @@ -541,6 +541,24 @@ int PCBNEW_CONTROL::ResetCoords( TOOL_EVENT& aEvent ) } +int PCBNEW_CONTROL::SwitchCursor( TOOL_EVENT& aEvent ) +{ + const unsigned int BIG_CURSOR = 4000; + const unsigned int SMALL_CURSOR = 80; + + KIGFX::GAL* gal = getEditFrame()->GetGalCanvas()->GetGAL(); + + if( gal->GetCursorSize() == BIG_CURSOR ) + gal->SetCursorSize( SMALL_CURSOR ); + else + gal->SetCursorSize( BIG_CURSOR ); + + setTransitions(); + + return 0; +} + + int PCBNEW_CONTROL::SwitchUnits( TOOL_EVENT& aEvent ) { // TODO should not it be refactored to pcb_frame member function? @@ -621,6 +639,7 @@ void PCBNEW_CONTROL::setTransitions() // Miscellaneous Go( &PCBNEW_CONTROL::ResetCoords, COMMON_ACTIONS::resetCoords.MakeEvent() ); + Go( &PCBNEW_CONTROL::SwitchCursor, COMMON_ACTIONS::switchCursor.MakeEvent() ); Go( &PCBNEW_CONTROL::SwitchUnits, COMMON_ACTIONS::switchUnits.MakeEvent() ); Go( &PCBNEW_CONTROL::ShowHelp, COMMON_ACTIONS::showHelp.MakeEvent() ); Go( &PCBNEW_CONTROL::ToBeDone, COMMON_ACTIONS::toBeDone.MakeEvent() ); diff --git a/pcbnew/tools/pcbnew_control.h b/pcbnew/tools/pcbnew_control.h index 61f7d5d511..4c11b9777b 100644 --- a/pcbnew/tools/pcbnew_control.h +++ b/pcbnew/tools/pcbnew_control.h @@ -90,6 +90,7 @@ public: // Miscellaneous int ResetCoords( TOOL_EVENT& aEvent ); + int SwitchCursor( TOOL_EVENT& aEvent ); int SwitchUnits( TOOL_EVENT& aEvent ); int ShowHelp( TOOL_EVENT& aEvent ); int ToBeDone( TOOL_EVENT& aEvent ); From 3b5ece39a18793b8ee639ad2d826a80d2e8a817a Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 15:10:32 +0200 Subject: [PATCH 656/741] Modules inserted from the module editor are instantly visible in GAL. Ratsnest is updated after exporting changes from the module editor to the layout editor. --- pcbnew/modedit.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/pcbnew/modedit.cpp b/pcbnew/modedit.cpp index 3abe8f08ad..933339b3e3 100644 --- a/pcbnew/modedit.cpp +++ b/pcbnew/modedit.cpp @@ -45,6 +45,7 @@ #include #include +#include #include #include #include @@ -59,6 +60,8 @@ #include #include +#include + // Functions defined in block_module_editor, but used here // These 2 functions are used in modedit to rotate or mirror the whole footprint @@ -452,15 +455,31 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) pcbframe->SetCrossHairPosition( wxPoint( 0, 0 ) ); pcbframe->PlaceModule( newmodule, NULL ); + newmodule->SetPosition( wxPoint( 0, 0 ) ); pcbframe->SetCrossHairPosition( cursor_pos ); newmodule->SetTimeStamp( GetNewTimeStamp() ); pcbframe->SaveCopyInUndoList( newmodule, UR_NEW ); + + if( IsGalCanvasActive() ) + { + KIGFX::VIEW* view = pcbframe->GetGalCanvas()->GetView(); + + newmodule->RunOnChildren( boost::bind( &KIGFX::VIEW::Add, view, _1 ) ); + view->Add( newmodule ); + } } newmodule->ClearFlags(); GetScreen()->ClrModify(); pcbframe->SetCurItem( NULL ); mainpcb->m_Status_Pcb = 0; + + if( IsGalCanvasActive() ) + { + RN_DATA* ratsnest = pcbframe->GetBoard()->GetRatsnest(); + ratsnest->Update( newmodule ); + ratsnest->Recalculate(); + } } break; From 587f22e10b6c73c7c3fe46aa453e8822b4d0c13a Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 15:10:32 +0200 Subject: [PATCH 657/741] Outline display mode for module edges & texts in the module editor. --- pcbnew/pcb_painter.cpp | 59 +++++++++++++++++++---- pcbnew/pcb_painter.h | 8 +--- pcbnew/tools/common_actions.cpp | 16 ++++++- pcbnew/tools/common_actions.h | 6 +++ pcbnew/tools/module_tools.cpp | 85 +++++++++++++++++++++++++++++++-- pcbnew/tools/module_tools.h | 14 ++++++ 6 files changed, 165 insertions(+), 23 deletions(-) diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 6d42a29d64..fce609d27e 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -223,7 +223,7 @@ bool PCB_PAINTER::Draw( const VIEW_ITEM* aItem, int aLayer ) case PCB_LINE_T: case PCB_MODULE_EDGE_T: - draw( (DRAWSEGMENT*) item ); + draw( (DRAWSEGMENT*) item, aLayer ); break; case PCB_TEXT_T: @@ -325,6 +325,7 @@ void PCB_PAINTER::draw( const TRACK* aTrack, int aLayer ) m_gal->SetFillColor( color ); m_gal->SetIsFill( true ); } + m_gal->DrawSegment( start, end, width ); } } @@ -622,14 +623,26 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) } -void PCB_PAINTER::draw( const DRAWSEGMENT* aSegment ) +void PCB_PAINTER::draw( const DRAWSEGMENT* aSegment, int aLayer ) { const COLOR4D& color = m_pcbSettings.GetColor( aSegment, aSegment->GetLayer() ); - m_gal->SetIsFill( false ); m_gal->SetIsStroke( true ); m_gal->SetStrokeColor( color ); - m_gal->SetLineWidth( aSegment->GetWidth() ); + + if( m_pcbSettings.m_sketchMode[aLayer] ) + { + // Outline mode + m_gal->SetLineWidth( m_pcbSettings.m_outlineWidth ); + m_gal->SetIsFill( false ); + } + else + { + // Filled mode + m_gal->SetLineWidth( aSegment->GetWidth() ); + m_gal->SetFillColor( color ); + m_gal->SetIsFill( true ); + } switch( aSegment->GetShape() ) { @@ -704,12 +717,25 @@ void PCB_PAINTER::draw( const TEXTE_PCB* aText, int aLayer ) if( aText->GetText().Length() == 0 ) return; - const COLOR4D& strokeColor = m_pcbSettings.GetColor( aText, aText->GetLayer() ); + const COLOR4D& color = m_pcbSettings.GetColor( aText, aText->GetLayer() ); VECTOR2D position( aText->GetTextPosition().x, aText->GetTextPosition().y ); double orientation = aText->GetOrientation() * M_PI / 1800.0; - m_gal->SetStrokeColor( strokeColor ); - m_gal->SetLineWidth( aText->GetThickness() ); + if( m_pcbSettings.m_sketchMode[aLayer] ) + { + // Outline mode + m_gal->SetLineWidth( m_pcbSettings.m_outlineWidth ); + m_gal->SetIsFill( false ); + } + else + { + // Filled mode + m_gal->SetLineWidth( aText->GetThickness() ); + m_gal->SetFillColor( color ); + m_gal->SetIsFill( true ); + } + + m_gal->SetStrokeColor( color ); m_gal->SetTextAttributes( aText ); m_gal->StrokeText( aText->GetText(), position, orientation ); } @@ -720,12 +746,25 @@ void PCB_PAINTER::draw( const TEXTE_MODULE* aText, int aLayer ) if( aText->GetLength() == 0 ) return; - const COLOR4D& strokeColor = m_pcbSettings.GetColor( aText, aLayer ); + const COLOR4D& color = m_pcbSettings.GetColor( aText, aLayer ); VECTOR2D position( aText->GetTextPosition().x, aText->GetTextPosition().y ); double orientation = aText->GetDrawRotation() * M_PI / 1800.0; - m_gal->SetStrokeColor( strokeColor ); - m_gal->SetLineWidth( aText->GetThickness() ); + if( m_pcbSettings.m_sketchMode[aLayer] ) + { + // Outline mode + m_gal->SetLineWidth( m_pcbSettings.m_outlineWidth ); + m_gal->SetIsFill( false ); + } + else + { + // Filled mode + m_gal->SetLineWidth( aText->GetThickness() ); + m_gal->SetFillColor( color ); + m_gal->SetIsFill( true ); + } + + m_gal->SetStrokeColor( color ); m_gal->SetTextAttributes( aText ); m_gal->StrokeText( aText->GetText(), position, orientation ); } diff --git a/pcbnew/pcb_painter.h b/pcbnew/pcb_painter.h index 93bcb034f7..2b79696ec3 100644 --- a/pcbnew/pcb_painter.h +++ b/pcbnew/pcb_painter.h @@ -124,9 +124,6 @@ public: */ inline void SetSketchMode( int aItemLayer, bool aEnabled ) { - // It is supposed to work only with item layers - assert( aItemLayer >= ITEM_GAL_LAYER( 0 ) ); - m_sketchMode[aItemLayer] = aEnabled; } @@ -137,9 +134,6 @@ public: */ inline bool GetSketchMode( int aItemLayer ) const { - // It is supposed to work only with item layers - assert( aItemLayer >= ITEM_GAL_LAYER( 0 ) ); - return m_sketchMode[aItemLayer]; } @@ -210,7 +204,7 @@ protected: void draw( const TRACK* aTrack, int aLayer ); void draw( const VIA* aVia, int aLayer ); void draw( const D_PAD* aPad, int aLayer ); - void draw( const DRAWSEGMENT* aSegment ); + void draw( const DRAWSEGMENT* aSegment, int aLayer ); void draw( const TEXTE_PCB* aText, int aLayer ); void draw( const TEXTE_MODULE* aText, int aLayer ); void draw( const MODULE* aModule ); diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 3e2118eb84..0e1ebc0818 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -284,6 +284,14 @@ TOOL_ACTION COMMON_ACTIONS::pasteItems( "pcbnew.ModuleEditor.pasteItems", AS_GLOBAL, MD_CTRL + int( 'V' ), "Paste items", "Paste items", AF_ACTIVATE ); +TOOL_ACTION COMMON_ACTIONS::moduleEdgeOutlines( "pcbnew.ModuleEditor.graphicOutlines", + AS_GLOBAL, 0, + "", "" ); + +TOOL_ACTION COMMON_ACTIONS::moduleTextOutlines( "pcbnew.ModuleEditor.textOutlines", + AS_GLOBAL, 0, + "", "" ); + // Miscellaneous TOOL_ACTION COMMON_ACTIONS::resetCoords( "pcbnew.Control.resetCoords", @@ -425,14 +433,18 @@ boost::optional COMMON_ACTIONS::TranslateLegacyId( int aId ) case ID_TB_OPTIONS_SHOW_ZONES_OUTLINES_ONLY: return COMMON_ACTIONS::zoneDisplayOutlines.MakeEvent(); + case ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH: + return COMMON_ACTIONS::moduleEdgeOutlines.MakeEvent(); + + case ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH: + return COMMON_ACTIONS::moduleTextOutlines.MakeEvent(); + case ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE: return COMMON_ACTIONS::highContrastMode.MakeEvent(); case ID_TB_OPTIONS_SELECT_CURSOR: return COMMON_ACTIONS::switchCursor.MakeEvent(); - case ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH: - case ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH: case ID_PCB_DELETE_ITEM_BUTT: case ID_PCB_HIGHLIGHT_BUTT: case ID_PCB_SHOW_1_RATSNEST_BUTT: diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index a47513acd9..fb53fed993 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -186,6 +186,12 @@ public: /// Pasting module items from clipboard static TOOL_ACTION pasteItems; + /// Display module edges as outlines + static TOOL_ACTION moduleEdgeOutlines; + + /// Display module texts as outlines + static TOOL_ACTION moduleTextOutlines; + // Miscellaneous static TOOL_ACTION resetCoords; diff --git a/pcbnew/tools/module_tools.cpp b/pcbnew/tools/module_tools.cpp index a23dec3be3..e9302b6c60 100644 --- a/pcbnew/tools/module_tools.cpp +++ b/pcbnew/tools/module_tools.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -531,10 +532,86 @@ int MODULE_TOOLS::PasteItems( TOOL_EVENT& aEvent ) } +int MODULE_TOOLS::ModuleTextOutlines( TOOL_EVENT& aEvent ) +{ + KIGFX::PCB_PAINTER* painter = + static_cast( m_frame->GetGalCanvas()->GetView()->GetPainter() ); + KIGFX::PCB_RENDER_SETTINGS* settings = + static_cast( painter->GetSettings() ); + + const LAYER_NUM layers[] = { ITEM_GAL_LAYER( MOD_TEXT_BK_VISIBLE ), + ITEM_GAL_LAYER( MOD_TEXT_FR_VISIBLE ), + ITEM_GAL_LAYER( MOD_TEXT_INVISIBLE ), + ITEM_GAL_LAYER( MOD_REFERENCES_VISIBLE ), + ITEM_GAL_LAYER( MOD_VALUES_VISIBLE ) }; + + bool enable = !settings->GetSketchMode( layers[0] ); + + BOOST_FOREACH( LAYER_NUM layer, layers ) + settings->SetSketchMode( layer, enable ); + + for( MODULE* module = getModel()->m_Modules; module; module = module->Next() ) + { + for( BOARD_ITEM* item = module->GraphicalItems(); item; item = item ->Next() ) + { + if( item->Type() == PCB_MODULE_TEXT_T ) + item->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + + module->Reference().ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + module->Value().ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + + m_frame->GetGalCanvas()->Refresh(); + setTransitions(); + + return 0; +} + + +int MODULE_TOOLS::ModuleEdgeOutlines( TOOL_EVENT& aEvent ) +{ + KIGFX::PCB_PAINTER* painter = + static_cast( m_frame->GetGalCanvas()->GetView()->GetPainter() ); + KIGFX::PCB_RENDER_SETTINGS* settings = + static_cast( painter->GetSettings() ); + + const LAYER_NUM layers[] = { ADHESIVE_N_FRONT, ADHESIVE_N_BACK,\ + SOLDERPASTE_N_FRONT, SOLDERPASTE_N_BACK,\ + SILKSCREEN_N_FRONT, SILKSCREEN_N_BACK,\ + SOLDERMASK_N_FRONT, SOLDERMASK_N_BACK,\ + DRAW_N,\ + COMMENT_N,\ + ECO1_N, ECO2_N,\ + EDGE_N }; + + bool enable = !settings->GetSketchMode( layers[0] ); + + BOOST_FOREACH( LAYER_NUM layer, layers ) + settings->SetSketchMode( layer, enable ); + + for( MODULE* module = getModel()->m_Modules; module; module = module->Next() ) + { + for( BOARD_ITEM* item = module->GraphicalItems(); item; item = item ->Next() ) + { + if( item->Type() == PCB_MODULE_EDGE_T ) + item->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + } + + m_frame->GetGalCanvas()->Refresh(); + setTransitions(); + + return 0; +} + + void MODULE_TOOLS::setTransitions() { - Go( &MODULE_TOOLS::PlacePad, COMMON_ACTIONS::placePad.MakeEvent() ); - Go( &MODULE_TOOLS::EnumeratePads, COMMON_ACTIONS::enumeratePads.MakeEvent() ); - Go( &MODULE_TOOLS::CopyItems, COMMON_ACTIONS::copyItems.MakeEvent() ); - Go( &MODULE_TOOLS::PasteItems, COMMON_ACTIONS::pasteItems.MakeEvent() ); + Go( &MODULE_TOOLS::PlacePad, COMMON_ACTIONS::placePad.MakeEvent() ); + Go( &MODULE_TOOLS::EnumeratePads, COMMON_ACTIONS::enumeratePads.MakeEvent() ); + Go( &MODULE_TOOLS::CopyItems, COMMON_ACTIONS::copyItems.MakeEvent() ); + Go( &MODULE_TOOLS::PasteItems, COMMON_ACTIONS::pasteItems.MakeEvent() ); + Go( &MODULE_TOOLS::ModuleTextOutlines, COMMON_ACTIONS::moduleTextOutlines.MakeEvent() ); + Go( &MODULE_TOOLS::ModuleEdgeOutlines, COMMON_ACTIONS::moduleEdgeOutlines.MakeEvent() ); } diff --git a/pcbnew/tools/module_tools.h b/pcbnew/tools/module_tools.h index 64899e4182..71d83acc7e 100644 --- a/pcbnew/tools/module_tools.h +++ b/pcbnew/tools/module_tools.h @@ -77,6 +77,20 @@ public: */ int PasteItems( TOOL_EVENT& aEvent ); + /** + * Function ModuleTextOutlines() + * + * Toggles display mode for module texts (outline/filled). + */ + int ModuleTextOutlines( TOOL_EVENT& aEvent ); + + /** + * Function ModuleEdgeOutlines() + * + * Toggles display mode for module edges (outline/filled). + */ + int ModuleEdgeOutlines( TOOL_EVENT& aEvent ); + private: ///> Sets up handlers for various events. void setTransitions(); From 7614b93bf807943cc840a9bb59579cb423176a9d Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 15:10:32 +0200 Subject: [PATCH 658/741] Tool indicator is resetted on canvas switch. --- common/draw_frame.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/draw_frame.cpp b/common/draw_frame.cpp index 0d8030953f..b43d1669d0 100644 --- a/common/draw_frame.cpp +++ b/common/draw_frame.cpp @@ -1033,6 +1033,9 @@ void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable ) m_auimgr.GetPane( wxT( "DrawFrameGal" ) ).Show( aEnable ); m_auimgr.Update(); + // Reset current tool on switch(); + SetToolID( ID_NO_TOOL_SELECTED, wxCURSOR_DEFAULT, wxEmptyString ); + m_galCanvasActive = aEnable; } From 778011a893aa3fb7760b7776a06612f67b44da75 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 15:10:32 +0200 Subject: [PATCH 659/741] Ratsnest is recalculated after global deletion of tracks and after importing a netlist. --- pcbnew/dialogs/dialog_global_deletion.cpp | 3 +++ pcbnew/ratsnest_data.cpp | 2 ++ 2 files changed, 5 insertions(+) diff --git a/pcbnew/dialogs/dialog_global_deletion.cpp b/pcbnew/dialogs/dialog_global_deletion.cpp index e06f990b29..b4998f2a4d 100644 --- a/pcbnew/dialogs/dialog_global_deletion.cpp +++ b/pcbnew/dialogs/dialog_global_deletion.cpp @@ -254,6 +254,9 @@ void DIALOG_GLOBAL_DELETION::AcceptPcbDelete( ) if( gen_rastnest ) m_Parent->Compile_Ratsnest( NULL, true ); + if( m_Parent->IsGalCanvasActive() ) + pcb->GetRatsnest()->Recalculate(); + } m_Parent->GetCanvas()->Refresh(); diff --git a/pcbnew/ratsnest_data.cpp b/pcbnew/ratsnest_data.cpp index 3c069e1932..deb6d08024 100644 --- a/pcbnew/ratsnest_data.cpp +++ b/pcbnew/ratsnest_data.cpp @@ -1009,6 +1009,8 @@ void RN_DATA::ProcessBoard() if( netCode > 0 ) m_nets[netCode].AddItem( zone ); } + + Recalculate(); } From 5275d4b58f35ef13b8211dc66cbfc22d98c288d1 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 15:10:32 +0200 Subject: [PATCH 660/741] Fixed minor bugs introduced with outline mode display for module texts and edges. --- pcbnew/pcb_painter.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index fce609d27e..1c299c6984 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -627,6 +627,7 @@ void PCB_PAINTER::draw( const DRAWSEGMENT* aSegment, int aLayer ) { const COLOR4D& color = m_pcbSettings.GetColor( aSegment, aSegment->GetLayer() ); + m_gal->SetIsFill( false ); m_gal->SetIsStroke( true ); m_gal->SetStrokeColor( color ); @@ -634,14 +635,11 @@ void PCB_PAINTER::draw( const DRAWSEGMENT* aSegment, int aLayer ) { // Outline mode m_gal->SetLineWidth( m_pcbSettings.m_outlineWidth ); - m_gal->SetIsFill( false ); } else { // Filled mode m_gal->SetLineWidth( aSegment->GetWidth() ); - m_gal->SetFillColor( color ); - m_gal->SetIsFill( true ); } switch( aSegment->GetShape() ) @@ -725,16 +723,15 @@ void PCB_PAINTER::draw( const TEXTE_PCB* aText, int aLayer ) { // Outline mode m_gal->SetLineWidth( m_pcbSettings.m_outlineWidth ); - m_gal->SetIsFill( false ); } else { // Filled mode m_gal->SetLineWidth( aText->GetThickness() ); - m_gal->SetFillColor( color ); - m_gal->SetIsFill( true ); } + m_gal->SetIsFill( false ); + m_gal->SetIsStroke( true ); m_gal->SetStrokeColor( color ); m_gal->SetTextAttributes( aText ); m_gal->StrokeText( aText->GetText(), position, orientation ); @@ -754,16 +751,15 @@ void PCB_PAINTER::draw( const TEXTE_MODULE* aText, int aLayer ) { // Outline mode m_gal->SetLineWidth( m_pcbSettings.m_outlineWidth ); - m_gal->SetIsFill( false ); } else { // Filled mode m_gal->SetLineWidth( aText->GetThickness() ); - m_gal->SetFillColor( color ); - m_gal->SetIsFill( true ); } + m_gal->SetIsFill( false ); + m_gal->SetIsStroke( true ); m_gal->SetStrokeColor( color ); m_gal->SetTextAttributes( aText ); m_gal->StrokeText( aText->GetText(), position, orientation ); From d7c3c7828ba8dbb7292f502cd1063d0861154bf4 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 15:10:32 +0200 Subject: [PATCH 661/741] wxWidgets 2.8 compatibility fixes. --- pcbnew/tools/module_tools.cpp | 2 +- pcbnew/tools/placement_tool.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pcbnew/tools/module_tools.cpp b/pcbnew/tools/module_tools.cpp index e9302b6c60..cf9a142448 100644 --- a/pcbnew/tools/module_tools.cpp +++ b/pcbnew/tools/module_tools.cpp @@ -305,7 +305,7 @@ int MODULE_TOOLS::EnumeratePads( TOOL_EVENT& aEvent ) m_frame->SaveCopyInUndoList( module, UR_MODEDIT ); BOOST_FOREACH( D_PAD* pad, pads ) - pad->SetPadName( wxString::Format( "%s%d", padPrefix, padNumber++ ) ); + pad->SetPadName( wxString::Format( wxT( "%s%d" ), padPrefix.c_str(), padNumber++ ) ); break; } diff --git a/pcbnew/tools/placement_tool.cpp b/pcbnew/tools/placement_tool.cpp index 82d7570e5e..d77f05089b 100644 --- a/pcbnew/tools/placement_tool.cpp +++ b/pcbnew/tools/placement_tool.cpp @@ -63,7 +63,7 @@ bool PLACEMENT_TOOL::Init() menu->AppendSeparator(); menu->Add( COMMON_ACTIONS::distributeHorizontally ); menu->Add( COMMON_ACTIONS::distributeVertically ); - m_selectionTool->AddSubMenu( menu, wxString( "Align/distribute" ), + m_selectionTool->AddSubMenu( menu, _( "Align/distribute" ), SELECTION_CONDITIONS::MoreThan( 1 ) ); setTransitions(); From b2d073732912ff7d0d3436d82937b1e464e0f9c4 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 15:10:32 +0200 Subject: [PATCH 662/741] Fixed continous line drawing. Outline mode can be set up on any layer. --- pcbnew/modedit.cpp | 5 +++- pcbnew/pcb_painter.cpp | 18 +++++++------- pcbnew/tools/drawing_tool.cpp | 46 +++++++++++++++++++++++++++++------ pcbnew/tools/drawing_tool.h | 4 ++- 4 files changed, 54 insertions(+), 19 deletions(-) diff --git a/pcbnew/modedit.cpp b/pcbnew/modedit.cpp index 933339b3e3..ff22550845 100644 --- a/pcbnew/modedit.cpp +++ b/pcbnew/modedit.cpp @@ -295,7 +295,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) case ID_MODEDIT_NEW_MODULE: { - if( ! Clear_Pcb( true ) ) + if( !Clear_Pcb( true ) ) break; SetCrossHairPosition( wxPoint( 0, 0 ) ); @@ -317,6 +317,9 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) Zoom_Automatique( false ); } + if( IsGalCanvasActive() ) + updateView(); + GetScreen()->ClrModify(); } break; diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 1c299c6984..4adc0bc13c 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -50,7 +50,7 @@ PCB_RENDER_SETTINGS::PCB_RENDER_SETTINGS() m_displayZoneMode = DZ_SHOW_FILLED; // By default everything should be displayed as filled - for( unsigned int i = 0; i < END_PCB_VISIBLE_LIST; ++i ) + for( unsigned int i = 0; i < TOTAL_LAYER_COUNT; ++i ) { m_sketchMode[i] = false; } @@ -102,9 +102,9 @@ void PCB_RENDER_SETTINGS::LoadDisplayOptions( const DISPLAY_OPTIONS& aOptions ) m_padNumbers = aOptions.DisplayPadNum; // Whether to draw tracks, vias & pads filled or as outlines - m_sketchMode[PADS_VISIBLE] = !aOptions.DisplayPadFill; - m_sketchMode[VIA_THROUGH_VISIBLE] = !aOptions.DisplayViaFill; - m_sketchMode[TRACKS_VISIBLE] = !aOptions.DisplayPcbTrackFill; + m_sketchMode[ITEM_GAL_LAYER( PADS_VISIBLE )] = !aOptions.DisplayPadFill; + m_sketchMode[ITEM_GAL_LAYER( VIA_THROUGH_VISIBLE )] = !aOptions.DisplayViaFill; + m_sketchMode[ITEM_GAL_LAYER( TRACKS_VISIBLE )] = !aOptions.DisplayPcbTrackFill; switch( aOptions.DisplayNetNamesMode ) { @@ -313,7 +313,7 @@ void PCB_PAINTER::draw( const TRACK* aTrack, int aLayer ) m_gal->SetStrokeColor( color ); m_gal->SetIsStroke( true ); - if( m_pcbSettings.m_sketchMode[TRACKS_VISIBLE] ) + if( m_pcbSettings.m_sketchMode[ITEM_GAL_LAYER( TRACKS_VISIBLE )] ) { // Outline mode m_gal->SetLineWidth( m_pcbSettings.m_outlineWidth ); @@ -350,7 +350,7 @@ void PCB_PAINTER::draw( const VIA* aVia, int aLayer ) const COLOR4D& color = m_pcbSettings.GetColor( aVia, aLayer ); - if( m_pcbSettings.m_sketchMode[VIA_THROUGH_VISIBLE] ) + if( m_pcbSettings.m_sketchMode[ITEM_GAL_LAYER( VIA_THROUGH_VISIBLE )] ) { // Outline mode m_gal->SetIsFill( false ); @@ -481,7 +481,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) // Pad drawing const COLOR4D& color = m_pcbSettings.GetColor( aPad, aLayer ); - if( m_pcbSettings.m_sketchMode[PADS_VISIBLE] ) + if( m_pcbSettings.m_sketchMode[ITEM_GAL_LAYER( PADS_VISIBLE )] ) { // Outline mode m_gal->SetIsFill( false ); @@ -544,7 +544,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) m = ( size.y - size.x ); n = size.x; - if( m_pcbSettings.m_sketchMode[PADS_VISIBLE] ) + if( m_pcbSettings.m_sketchMode[ITEM_GAL_LAYER( PADS_VISIBLE )] ) { // Outline mode m_gal->DrawArc( VECTOR2D( 0, -m ), n, -M_PI, 0 ); @@ -565,7 +565,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) m = ( size.x - size.y ); n = size.y; - if( m_pcbSettings.m_sketchMode[PADS_VISIBLE] ) + if( m_pcbSettings.m_sketchMode[ITEM_GAL_LAYER( PADS_VISIBLE )] ) { // Outline mode m_gal->DrawArc( VECTOR2D( -m, 0 ), n, M_PI / 2, 3 * M_PI / 2 ); diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index 9d19cc3541..170f723e09 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -76,6 +76,8 @@ void DRAWING_TOOL::Reset( RESET_REASON aReason ) int DRAWING_TOOL::DrawLine( TOOL_EVENT& aEvent ) { + boost::optional startingPoint; + if( m_editModules ) { m_frame->SetToolID( ID_MODEDIT_LINE_TOOL, wxCURSOR_PENCIL, _( "Add graphic line" ) ); @@ -83,7 +85,7 @@ int DRAWING_TOOL::DrawLine( TOOL_EVENT& aEvent ) MODULE* module = m_board->m_Modules; EDGE_MODULE* line = new EDGE_MODULE( module ); - while( drawSegment( S_SEGMENT, reinterpret_cast( line ) ) ) + while( drawSegment( S_SEGMENT, reinterpret_cast( line ), startingPoint ) ) { if( line ) { @@ -92,6 +94,11 @@ int DRAWING_TOOL::DrawLine( TOOL_EVENT& aEvent ) line->SetLocalCoord(); line->SetParent( module ); module->GraphicalItems().PushFront( line ); + startingPoint = line->GetEnd(); + } + else + { + startingPoint = boost::none; } line = new EDGE_MODULE( module ); @@ -103,13 +110,18 @@ int DRAWING_TOOL::DrawLine( TOOL_EVENT& aEvent ) DRAWSEGMENT* line = new DRAWSEGMENT; - while( drawSegment( S_SEGMENT, line ) ) + while( drawSegment( S_SEGMENT, line, startingPoint ) ) { if( line ) { m_board->Add( line ); m_frame->OnModify(); m_frame->SaveCopyInUndoList( line, UR_NEW ); + startingPoint = line->GetEnd(); + } + else + { + startingPoint = boost::none; } line = new DRAWSEGMENT; @@ -853,7 +865,8 @@ int DRAWING_TOOL::SetAnchor( TOOL_EVENT& aEvent ) } -bool DRAWING_TOOL::drawSegment( int aShape, DRAWSEGMENT*& aGraphic ) +bool DRAWING_TOOL::drawSegment( int aShape, DRAWSEGMENT*& aGraphic, + boost::optional aStartingPoint ) { // Only two shapes are currently supported assert( aShape == S_SEGMENT || aShape == S_CIRCLE ); @@ -872,12 +885,33 @@ bool DRAWING_TOOL::drawSegment( int aShape, DRAWSEGMENT*& aGraphic ) bool direction45 = false; // 45 degrees only mode bool started = false; + VECTOR2I cursorPos = m_controls->GetCursorPosition(); + + if( aStartingPoint ) + { + LAYER_NUM layer = m_frame->GetScreen()->m_Active_Layer; + + // Init the new item attributes + aGraphic->SetShape( (STROKE_T) aShape ); + aGraphic->SetWidth( m_board->GetDesignSettings().m_DrawSegmentWidth ); + aGraphic->SetStart( wxPoint( aStartingPoint->x, aStartingPoint->y ) ); + aGraphic->SetEnd( wxPoint( cursorPos.x, cursorPos.y ) ); + aGraphic->SetLayer( layer ); + + if( aShape == S_SEGMENT ) + line45 = *aGraphic; // used only for direction 45 mode with lines + + preview.Add( aGraphic ); + m_controls->SetAutoPan( true ); + + started = true; + } // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { bool updatePreview = false; // should preview be updated - VECTOR2I cursorPos = m_controls->GetCursorPosition(); + cursorPos = m_controls->GetCursorPosition(); // Enable 45 degrees lines only mode by holding control if( direction45 != evt->Modifier( MD_CTRL ) && started && aShape == S_SEGMENT ) @@ -940,10 +974,7 @@ bool DRAWING_TOOL::drawSegment( int aShape, DRAWSEGMENT*& aGraphic ) aGraphic->SetLayer( layer ); if( aShape == S_SEGMENT ) - { line45 = *aGraphic; // used only for direction 45 mode with lines - line45.SetLayer( layer ); - } preview.Add( aGraphic ); m_controls->SetAutoPan( true ); @@ -965,7 +996,6 @@ bool DRAWING_TOOL::drawSegment( int aShape, DRAWSEGMENT*& aGraphic ) { // a clear sign that the current drawing is finished delete aGraphic; // but only if at least one graphic was created aGraphic = NULL; // otherwise - force user to draw more or cancel - started = false; } preview.Clear(); diff --git a/pcbnew/tools/drawing_tool.h b/pcbnew/tools/drawing_tool.h index 42a6dbfdf3..178d751a8f 100644 --- a/pcbnew/tools/drawing_tool.h +++ b/pcbnew/tools/drawing_tool.h @@ -26,6 +26,7 @@ #define __DRAWING_TOOL_H #include +#include namespace KIGFX { @@ -150,7 +151,8 @@ private: ///> be already created. The tool deletes the object if it is not added to a BOARD. ///> @return False if the tool was cancelled before the origin was set or origin and end are ///> the same point. - bool drawSegment( int aShape, DRAWSEGMENT*& aGraphic ); + bool drawSegment( int aShape, DRAWSEGMENT*& aGraphic, + boost::optional aStartingPoint = boost::none ); ///> Starts drawing an arc. ///> @param aGraphic is an object that is going to be used by the tool for drawing. It has to From c0a96141dfa676b87553dc3fd6591b3bafac0087 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 15:10:32 +0200 Subject: [PATCH 663/741] Added AF_NOTIFY flag for TOOL_ACTIONs. --- common/tool/tool_manager.cpp | 4 ++-- include/tool/tool_action.h | 10 ++++++++++ include/tool/tool_event.h | 3 ++- pcbnew/tools/common_actions.cpp | 2 +- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index cb91124f31..14d963839e 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -448,8 +448,8 @@ void TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent ) { if( st->waitEvents.Matches( aEvent ) ) { - // By default, already processed events are not passed further - m_passEvent = false; + // By default, only messages are passed further + m_passEvent = ( aEvent.m_category == TC_MESSAGE ); // got matching event? clear wait list and wake up the coroutine st->wakeupEvent = aEvent; diff --git a/include/tool/tool_action.h b/include/tool/tool_action.h index e215efba83..5db3701301 100644 --- a/include/tool/tool_action.h +++ b/include/tool/tool_action.h @@ -148,6 +148,8 @@ public: { if( IsActivation() ) return TOOL_EVENT( TC_COMMAND, TA_ACTIVATE, m_name, m_scope ); + else if( IsNotification() ) + return TOOL_EVENT( TC_MESSAGE, TA_ANY, m_name, m_scope ); else return TOOL_EVENT( TC_COMMAND, TA_ACTION, m_name, m_scope ); } @@ -192,6 +194,14 @@ public: return m_flags & AF_ACTIVATE; } + /** + * Returns true if the action is a notification. + */ + bool IsNotification() const + { + return m_flags & AF_NOTIFY; + } + private: friend class ACTION_MANAGER; diff --git a/include/tool/tool_event.h b/include/tool/tool_event.h index b140fa3953..bffca332f5 100644 --- a/include/tool/tool_event.h +++ b/include/tool/tool_event.h @@ -130,7 +130,8 @@ enum TOOL_ACTION_SCOPE enum TOOL_ACTION_FLAGS { AF_NONE = 0, - AF_ACTIVATE = 1 ///> Action activates a tool + AF_ACTIVATE = 1, ///> Action activates a tool + AF_NOTIFY = 2 ///> Action is a notification (it is by default passed to all tools) }; /// Defines when a context menu is opened. diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 0e1ebc0818..0ef2778256 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -264,7 +264,7 @@ TOOL_ACTION COMMON_ACTIONS::viaSizeDec( "pcbnew.EditorControl.viaSizeDec", TOOL_ACTION COMMON_ACTIONS::trackViaSizeChanged( "pcbnew.EditorControl.trackViaSizeChanged", AS_GLOBAL, 0, - "", "" ); + "", "", AF_NOTIFY ); // Module editor tools From db0d7083007106ac2693268862096e3b3bc7c978 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 16:25:50 +0200 Subject: [PATCH 664/741] Simplified code for switching layers in GAL view. Tools are notified of layer change event. --- pcbnew/pcbframe.cpp | 3 + pcbnew/tools/common_actions.cpp | 4 + pcbnew/tools/common_actions.h | 2 + pcbnew/tools/drawing_tool.cpp | 2 +- pcbnew/tools/module_tools.cpp | 11 +- pcbnew/tools/pcbnew_control.cpp | 120 +++++------------- pcbnew/tools/pcbnew_control.h | 9 +- ...nvert_brd_items_to_polygons_with_Boost.cpp | 2 +- 8 files changed, 50 insertions(+), 103 deletions(-) diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index e9c082533b..eb72a49fd6 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -828,7 +828,10 @@ void PCB_EDIT_FRAME::SetActiveLayer( LAYER_ID aLayer ) syncLayerWidgetLayer(); if( IsGalCanvasActive() ) + { + m_toolManager->RunAction( COMMON_ACTIONS::layerChanged ); // notify other tools GetGalCanvas()->Refresh(); + } } diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 0ef2778256..cf2879e725 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -222,6 +222,10 @@ TOOL_ACTION COMMON_ACTIONS::layerAlphaDec( "pcbnew.Control.layerAlphaDec", AS_GLOBAL, '{', "", "" ); +TOOL_ACTION COMMON_ACTIONS::layerChanged( "pcbnew.Control.layerChanged", + AS_GLOBAL, 0, + "", "", AF_NOTIFY ); + // Grid control TOOL_ACTION COMMON_ACTIONS::gridFast1( "pcbnew.Control.gridFast1", diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index fb53fed993..6df00fae9b 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -157,6 +157,8 @@ public: static TOOL_ACTION layerAlphaInc; static TOOL_ACTION layerAlphaDec; + static TOOL_ACTION layerChanged; // notification + // Grid control static TOOL_ACTION gridFast1; static TOOL_ACTION gridFast2; diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index 170f723e09..83ae2129b8 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -889,7 +889,7 @@ bool DRAWING_TOOL::drawSegment( int aShape, DRAWSEGMENT*& aGraphic, if( aStartingPoint ) { - LAYER_NUM layer = m_frame->GetScreen()->m_Active_Layer; + LAYER_ID layer = m_frame->GetScreen()->m_Active_Layer; // Init the new item attributes aGraphic->SetShape( (STROKE_T) aShape ); diff --git a/pcbnew/tools/module_tools.cpp b/pcbnew/tools/module_tools.cpp index cf9a142448..3a6827a9d9 100644 --- a/pcbnew/tools/module_tools.cpp +++ b/pcbnew/tools/module_tools.cpp @@ -576,14 +576,9 @@ int MODULE_TOOLS::ModuleEdgeOutlines( TOOL_EVENT& aEvent ) KIGFX::PCB_RENDER_SETTINGS* settings = static_cast( painter->GetSettings() ); - const LAYER_NUM layers[] = { ADHESIVE_N_FRONT, ADHESIVE_N_BACK,\ - SOLDERPASTE_N_FRONT, SOLDERPASTE_N_BACK,\ - SILKSCREEN_N_FRONT, SILKSCREEN_N_BACK,\ - SOLDERMASK_N_FRONT, SOLDERMASK_N_BACK,\ - DRAW_N,\ - COMMENT_N,\ - ECO1_N, ECO2_N,\ - EDGE_N }; + const LAYER_ID layers[] = { F_Adhes, B_Adhes, F_Paste, B_Paste, + F_SilkS, B_SilkS, F_Mask, B_Mask, + Dwgs_User, Cmts_User, Eco1_User, Eco2_User, Edge_Cuts }; bool enable = !settings->GetSketchMode( layers[0] ); diff --git a/pcbnew/tools/pcbnew_control.cpp b/pcbnew/tools/pcbnew_control.cpp index 2d92566530..537b051bed 100644 --- a/pcbnew/tools/pcbnew_control.cpp +++ b/pcbnew/tools/pcbnew_control.cpp @@ -279,79 +279,25 @@ int PCBNEW_CONTROL::HighContrastDec( TOOL_EVENT& aEvent ) // Layer control -int PCBNEW_CONTROL::LayerTop( TOOL_EVENT& aEvent ) +int PCBNEW_CONTROL::LayerSwitch( TOOL_EVENT& aEvent ) { - m_frame->SwitchLayer( NULL, F_Cu ); - m_frame->GetGalCanvas()->SetFocus(); - setTransitions(); + if( aEvent.IsAction( &COMMON_ACTIONS::layerTop ) ) + m_frame->SwitchLayer( NULL, F_Cu ); + else if( aEvent.IsAction( &COMMON_ACTIONS::layerInner1 ) ) + m_frame->SwitchLayer( NULL, In1_Cu ); + else if( aEvent.IsAction( &COMMON_ACTIONS::layerInner2 ) ) + m_frame->SwitchLayer( NULL, In2_Cu ); + else if( aEvent.IsAction( &COMMON_ACTIONS::layerInner3 ) ) + m_frame->SwitchLayer( NULL, In3_Cu ); + else if( aEvent.IsAction( &COMMON_ACTIONS::layerInner4 ) ) + m_frame->SwitchLayer( NULL, In4_Cu ); + else if( aEvent.IsAction( &COMMON_ACTIONS::layerInner5 ) ) + m_frame->SwitchLayer( NULL, In5_Cu ); + else if( aEvent.IsAction( &COMMON_ACTIONS::layerInner6 ) ) + m_frame->SwitchLayer( NULL, In6_Cu ); + else if( aEvent.IsAction( &COMMON_ACTIONS::layerBottom ) ) + m_frame->SwitchLayer( NULL, B_Cu ); - return 0; -} - - -int PCBNEW_CONTROL::LayerInner1( TOOL_EVENT& aEvent ) -{ - m_frame->SwitchLayer( NULL, In1_Cu ); - m_frame->GetGalCanvas()->SetFocus(); - setTransitions(); - - return 0; -} - - -int PCBNEW_CONTROL::LayerInner2( TOOL_EVENT& aEvent ) -{ - m_frame->SwitchLayer( NULL, In2_Cu ); - m_frame->GetGalCanvas()->SetFocus(); - setTransitions(); - - return 0; -} - - -int PCBNEW_CONTROL::LayerInner3( TOOL_EVENT& aEvent ) -{ - m_frame->SwitchLayer( NULL, In3_Cu ); - m_frame->GetGalCanvas()->SetFocus(); - setTransitions(); - - return 0; -} - - -int PCBNEW_CONTROL::LayerInner4( TOOL_EVENT& aEvent ) -{ - m_frame->SwitchLayer( NULL, In4_Cu ); - m_frame->GetGalCanvas()->SetFocus(); - setTransitions(); - - return 0; -} - - -int PCBNEW_CONTROL::LayerInner5( TOOL_EVENT& aEvent ) -{ - m_frame->SwitchLayer( NULL, In5_Cu ); - m_frame->GetGalCanvas()->SetFocus(); - setTransitions(); - - return 0; -} - - -int PCBNEW_CONTROL::LayerInner6( TOOL_EVENT& aEvent ) -{ - m_frame->SwitchLayer( NULL, In6_Cu ); - m_frame->GetGalCanvas()->SetFocus(); - setTransitions(); - - return 0; -} - - -int PCBNEW_CONTROL::LayerBottom( TOOL_EVENT& aEvent ) -{ - m_frame->SetActiveLayer( B_Cu ); m_frame->GetGalCanvas()->SetFocus(); setTransitions(); @@ -364,15 +310,17 @@ int PCBNEW_CONTROL::LayerNext( TOOL_EVENT& aEvent ) PCB_BASE_FRAME* editFrame = m_frame; LAYER_NUM layer = editFrame->GetActiveLayer(); - if( layer < F_Cu || layer >= B_Cu ) + if( layer < F_Cu || layer > B_Cu ) { setTransitions(); return 0; } - if( getModel()->GetCopperLayerCount() < 2 ) // Single layer + int layerCount = getModel()->GetCopperLayerCount(); + + if( layer == layerCount - 2 || layerCount < 2 ) layer = B_Cu; - else if( layer >= getModel()->GetCopperLayerCount() - 2 ) + else if( layer == B_Cu ) layer = F_Cu; else ++layer; @@ -390,16 +338,18 @@ int PCBNEW_CONTROL::LayerPrev( TOOL_EVENT& aEvent ) PCB_BASE_FRAME* editFrame = m_frame; LAYER_NUM layer = editFrame->GetActiveLayer(); - if( layer <= F_Cu || layer > B_Cu ) + if( layer < F_Cu || layer > B_Cu ) { setTransitions(); return 0; } - if( getModel()->GetCopperLayerCount() < 2 ) // Single layer + int layerCount = getModel()->GetCopperLayerCount(); + + if( layer == F_Cu || layerCount < 2 ) layer = B_Cu; else if( layer == B_Cu ) - layer = std::max( int( F_Cu ), getModel()->GetCopperLayerCount() - 2 ); + layer = layerCount - 2; else --layer; @@ -617,14 +567,14 @@ void PCBNEW_CONTROL::setTransitions() Go( &PCBNEW_CONTROL::HighContrastDec, COMMON_ACTIONS::highContrastDec.MakeEvent() ); // Layer control - Go( &PCBNEW_CONTROL::LayerTop, COMMON_ACTIONS::layerTop.MakeEvent() ); - Go( &PCBNEW_CONTROL::LayerInner1, COMMON_ACTIONS::layerInner1.MakeEvent() ); - Go( &PCBNEW_CONTROL::LayerInner2, COMMON_ACTIONS::layerInner2.MakeEvent() ); - Go( &PCBNEW_CONTROL::LayerInner3, COMMON_ACTIONS::layerInner3.MakeEvent() ); - Go( &PCBNEW_CONTROL::LayerInner4, COMMON_ACTIONS::layerInner4.MakeEvent() ); - Go( &PCBNEW_CONTROL::LayerInner5, COMMON_ACTIONS::layerInner5.MakeEvent() ); - Go( &PCBNEW_CONTROL::LayerInner6, COMMON_ACTIONS::layerInner6.MakeEvent() ); - Go( &PCBNEW_CONTROL::LayerBottom, COMMON_ACTIONS::layerBottom.MakeEvent() ); + Go( &PCBNEW_CONTROL::LayerSwitch, COMMON_ACTIONS::layerTop.MakeEvent() ); + Go( &PCBNEW_CONTROL::LayerSwitch, COMMON_ACTIONS::layerInner1.MakeEvent() ); + Go( &PCBNEW_CONTROL::LayerSwitch, COMMON_ACTIONS::layerInner2.MakeEvent() ); + Go( &PCBNEW_CONTROL::LayerSwitch, COMMON_ACTIONS::layerInner3.MakeEvent() ); + Go( &PCBNEW_CONTROL::LayerSwitch, COMMON_ACTIONS::layerInner4.MakeEvent() ); + Go( &PCBNEW_CONTROL::LayerSwitch, COMMON_ACTIONS::layerInner5.MakeEvent() ); + Go( &PCBNEW_CONTROL::LayerSwitch, COMMON_ACTIONS::layerInner6.MakeEvent() ); + Go( &PCBNEW_CONTROL::LayerSwitch, COMMON_ACTIONS::layerBottom.MakeEvent() ); Go( &PCBNEW_CONTROL::LayerNext, COMMON_ACTIONS::layerNext.MakeEvent() ); Go( &PCBNEW_CONTROL::LayerPrev, COMMON_ACTIONS::layerPrev.MakeEvent() ); Go( &PCBNEW_CONTROL::LayerAlphaInc, COMMON_ACTIONS::layerAlphaInc.MakeEvent() ); diff --git a/pcbnew/tools/pcbnew_control.h b/pcbnew/tools/pcbnew_control.h index 4c11b9777b..7fc9978b60 100644 --- a/pcbnew/tools/pcbnew_control.h +++ b/pcbnew/tools/pcbnew_control.h @@ -62,14 +62,7 @@ public: int HighContrastDec( TOOL_EVENT& aEvent ); // Layer control - int LayerTop( TOOL_EVENT& aEvent ); - int LayerInner1( TOOL_EVENT& aEvent ); - int LayerInner2( TOOL_EVENT& aEvent ); - int LayerInner3( TOOL_EVENT& aEvent ); - int LayerInner4( TOOL_EVENT& aEvent ); - int LayerInner5( TOOL_EVENT& aEvent ); - int LayerInner6( TOOL_EVENT& aEvent ); - int LayerBottom( TOOL_EVENT& aEvent ); + int LayerSwitch( TOOL_EVENT& aEvent ); int LayerNext( TOOL_EVENT& aEvent ); int LayerPrev( TOOL_EVENT& aEvent ); int LayerAlphaInc( TOOL_EVENT& aEvent ); diff --git a/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp b/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp index 5144e4c88e..4d2117592e 100644 --- a/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp +++ b/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp @@ -303,7 +303,7 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb ) { for( BOARD_ITEM* item = module->GraphicalItems(); item; item = item->Next() ) { - if( !item->IsOnLayer( GetLayer() ) && !item->IsOnLayer( EDGE_N ) ) + if( !item->IsOnLayer( GetLayer() ) && !item->IsOnLayer( Edge_Cuts ) ) continue; if( item->Type() != PCB_MODULE_EDGE_T ) From 81ad03cf91350cbbcfcb72294cba111a4e6e2eda Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 16:25:50 +0200 Subject: [PATCH 665/741] Code formatting. --- pcbnew/router/pns_line_placer.cpp | 10 +++++----- pcbnew/router/pns_line_placer.h | 2 +- pcbnew/router/pns_router.cpp | 2 +- pcbnew/router/pns_router.h | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pcbnew/router/pns_line_placer.cpp b/pcbnew/router/pns_line_placer.cpp index 2c26df7c96..ba52d3544b 100644 --- a/pcbnew/router/pns_line_placer.cpp +++ b/pcbnew/router/pns_line_placer.cpp @@ -790,12 +790,12 @@ void PNS_LINE_PLACER::Start( const VECTOR2I& aP, PNS_ITEM* aStartItem ) m_currentEnd = p; m_currentNet = net; - PNS_NODE *rootNode = Router()->GetWorld()->Branch(); + PNS_NODE* rootNode = Router()->GetWorld()->Branch(); if( splitSeg ) splitAdjacentSegments( rootNode, aStartItem, p ); - setWorld ( rootNode ); + setWorld( rootNode ); setInitialDirection( Settings().InitialDirection() ); startPlacement( p, m_currentNet, m_currentWidth, m_currentLayer ); } @@ -848,7 +848,7 @@ bool PNS_LINE_PLACER::FixRoute( const VECTOR2I& aP, PNS_ITEM* aEndItem ) PNS_LINE pl = Trace(); - if (m_currentMode == RM_MarkObstacles && + if( m_currentMode == RM_MarkObstacles && !Settings().CanViolateDRC() && m_world->CheckColliding( &pl ) ) return false; @@ -889,9 +889,9 @@ bool PNS_LINE_PLACER::FixRoute( const VECTOR2I& aP, PNS_ITEM* aEndItem ) m_lastNode->Add( pl.Via().Clone() ); if( realEnd ) - simplifyNewLine ( m_lastNode, lastSeg ); + simplifyNewLine( m_lastNode, lastSeg ); - Router()->CommitRouting ( m_lastNode ); + Router()->CommitRouting( m_lastNode ); m_lastNode = NULL; diff --git a/pcbnew/router/pns_line_placer.h b/pcbnew/router/pns_line_placer.h index 1ae3b2d69c..e859180674 100644 --- a/pcbnew/router/pns_line_placer.h +++ b/pcbnew/router/pns_line_placer.h @@ -55,7 +55,7 @@ public: * Starts routing a single track at point aP, taking item aStartItem as anchor * (unless NULL). */ - void Start ( const VECTOR2I& aP, PNS_ITEM* aStartItem ); + void Start( const VECTOR2I& aP, PNS_ITEM* aStartItem ); /** * Function Move() diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index 8813a854f1..5e16d95993 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -612,7 +612,7 @@ void PNS_ROUTER::moveDragging( const VECTOR2I& aP, PNS_ITEM* aEndItem ) m_dragger->Drag( aP ); PNS_ITEMSET dragged = m_dragger->Traces(); - updateView ( m_dragger->CurrentNode(), dragged ); + updateView( m_dragger->CurrentNode(), dragged ); } diff --git a/pcbnew/router/pns_router.h b/pcbnew/router/pns_router.h index b5fc2a6daa..8a92794f16 100644 --- a/pcbnew/router/pns_router.h +++ b/pcbnew/router/pns_router.h @@ -234,7 +234,7 @@ private: PNS_NODE* m_world; PNS_NODE* m_lastNode; PNS_LINE_PLACER* m_placer; - PNS_DRAGGER *m_dragger; + PNS_DRAGGER* m_dragger; PNS_LINE* m_draggedLine; PNS_SHOVE* m_shove; int m_draggedSegmentIndex; From b1837615aa891e00d9d791471ee00cdc82139035 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 16:25:50 +0200 Subject: [PATCH 666/741] Added event queue to handle events at the end of the event processing cycle. --- common/tool/action_manager.cpp | 35 ++++++++++++-------------- common/tool/tool_manager.cpp | 45 ++++++++++++++++++++++++++++++---- include/tool/action_manager.h | 18 ++++---------- include/tool/tool_manager.h | 36 +++++++++++++++++++-------- pcbnew/router/router_tool.cpp | 6 +---- pcbnew/tools/edit_tool.cpp | 2 +- 6 files changed, 88 insertions(+), 54 deletions(-) diff --git a/common/tool/action_manager.cpp b/common/tool/action_manager.cpp index b065cb2d55..a64ab9e1d5 100644 --- a/common/tool/action_manager.cpp +++ b/common/tool/action_manager.cpp @@ -89,24 +89,14 @@ int ACTION_MANAGER::MakeActionId( const std::string& aActionName ) } -bool ACTION_MANAGER::RunAction( const std::string& aActionName ) const +TOOL_ACTION* ACTION_MANAGER::FindAction( const std::string& aActionName ) const { std::map::const_iterator it = m_actionNameIndex.find( aActionName ); - if( it == m_actionNameIndex.end() ) - return false; // no action with given name found + if( it != m_actionNameIndex.end() ) + return it->second; - RunAction( it->second ); - - return true; -} - - -void ACTION_MANAGER::RunAction( const TOOL_ACTION* aAction ) const -{ - TOOL_EVENT event = aAction->MakeEvent(); - - m_toolMgr->ProcessEvent( event ); + return NULL; } @@ -153,6 +143,8 @@ bool ACTION_MANAGER::RunHotKey( int aHotKey ) const if( tool ) { + // Choose the action that goes to the tool with highest priority + // (i.e. is on the top of active tools stack) priority = m_toolMgr->GetPriority( tool->GetId() ); if( priority >= 0 && priority > highestPriority ) @@ -163,13 +155,16 @@ bool ACTION_MANAGER::RunHotKey( int aHotKey ) const } } - if( !global && !context ) // currently there is no valid action to run - return false; - if( context ) - RunAction( context ); + { + m_toolMgr->RunAction( *context, true ); + return true; + } else if( global ) - RunAction( global ); + { + m_toolMgr->RunAction( *global, true ); + return true; + } - return true; + return false; } diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 14d963839e..7a6df985fe 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -290,15 +290,40 @@ void TOOL_MANAGER::UnregisterAction( TOOL_ACTION* aAction ) } -bool TOOL_MANAGER::RunAction( const std::string& aActionName ) +bool TOOL_MANAGER::RunAction( const std::string& aActionName, bool aNow ) { - return m_actionMgr->RunAction( aActionName ); + TOOL_ACTION* action = m_actionMgr->FindAction( aActionName ); + + if( action ) + { + if( aNow ) + { + TOOL_EVENT event = action->MakeEvent(); + ProcessEvent( event ); + } + else + { + PostEvent( action->MakeEvent() ); + } + + return true; + } + + return false; } -void TOOL_MANAGER::RunAction( const TOOL_ACTION& aAction ) +void TOOL_MANAGER::RunAction( const TOOL_ACTION& aAction, bool aNow ) { - m_actionMgr->RunAction( &aAction ); + if( aNow ) + { + TOOL_EVENT event = aAction.MakeEvent(); + ProcessEvent( event ); + } + else + { + PostEvent( aAction.MakeEvent() ); + } } @@ -424,6 +449,8 @@ optional TOOL_MANAGER::ScheduleWait( TOOL_BASE* aTool, { TOOL_STATE* st = m_toolState[aTool]; + assert( !st->pendingWait ); // everything collapses on two Yield() in a row + // indicate to the manager that we are going to sleep and we shall be // woken up when an event matching aConditions arrive st->pendingWait = true; @@ -477,7 +504,7 @@ void TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent ) { if( tr.first.Matches( aEvent ) ) { - // no tool context allocated yet? Create one. + // if there is already a context, then store it if( st->cofunc ) st->Push(); @@ -590,6 +617,14 @@ bool TOOL_MANAGER::ProcessEvent( TOOL_EVENT& aEvent ) dispatchActivation( aEvent ); dispatchContextMenu( aEvent ); + // Dispatch queue + while( !m_eventQueue.empty() ) + { + TOOL_EVENT event = m_eventQueue.front(); + m_eventQueue.pop_front(); + ProcessEvent( event ); + } + if( m_view->IsDirty() ) { PCB_EDIT_FRAME* f = static_cast( GetEditFrame() ); diff --git a/include/tool/action_manager.h b/include/tool/action_manager.h index 626f795eff..7c4c52cd4d 100644 --- a/include/tool/action_manager.h +++ b/include/tool/action_manager.h @@ -75,20 +75,12 @@ public: static int MakeActionId( const std::string& aActionName ); /** - * Function RunAction() - * Runs an action with a given name (if there is one available). - * @param aActionName is the name of action to be run. - * @return True if there was an action associated with the name, false otherwise. + * Function FindAction() + * Finds an action with a given name (if there is one available). + * @param aActionName is the searched action. + * @return Pointer to a TOOL_ACTION object or NULL if there is no such action. */ - bool RunAction( const std::string& aActionName ) const; - - /** - * Function RunAction() - * Prepares an appropriate event and sends it to the destination specified in a TOOL_ACTION - * object. - * @param aAction is the action to be run. - */ - void RunAction( const TOOL_ACTION* aAction ) const; + TOOL_ACTION* FindAction( const std::string& aActionName ) const; /** * Function RunHotKey() diff --git a/include/tool/tool_manager.h b/include/tool/tool_manager.h index 1935cf1b14..e5d4ce9458 100644 --- a/include/tool/tool_manager.h +++ b/include/tool/tool_manager.h @@ -106,17 +106,21 @@ public: * Runs the specified action. The common format for action names is "application.ToolName.Action". * * @param aActionName is the name of action to be invoked. - * @return True if the action finished successfully, false otherwise. + * @param aNow decides if the action has to be run immediately or after the current coroutine + * is preemptied. + * @return False if the action was not found. */ - bool RunAction( const std::string& aActionName ); + bool RunAction( const std::string& aActionName, bool aNow = false ); /** * Function RunAction() * Runs the specified action. * * @param aAction is the action to be invoked. + * @param aNow decides if the action has to be run immediately or after the current coroutine + * is preemptied. */ - void RunAction( const TOOL_ACTION& aAction ); + void RunAction( const TOOL_ACTION& aAction, bool aNow = false ); /** * Function FindTool() @@ -158,11 +162,20 @@ public: void ResetTools( TOOL_BASE::RESET_REASON aReason ); /** - * Takes an event from the TOOL_DISPATCHER and propagates it to - * tools that requested events of matching type(s) + * Propagates an event to tools that requested events of matching type(s). + * @param aEvent is the event to be processed. */ bool ProcessEvent( TOOL_EVENT& aEvent ); + /** + * Puts an event to the event queue to be processed at the end of event processing cycle. + * @param aEvent is the event to be put into the queue. + */ + inline void PostEvent( const TOOL_EVENT& aEvent ) + { + m_eventQueue.push_back( aEvent ); + } + /** * Sets the work environment (model, view, view controls and the parent window). * These are made available to the tool. Called by the parent frame (PCB_EDIT_FRAME) @@ -177,17 +190,17 @@ public: return m_view; } - KIGFX::VIEW_CONTROLS* GetViewControls() const + inline KIGFX::VIEW_CONTROLS* GetViewControls() const { return m_viewControls; } - EDA_ITEM* GetModel() const + inline EDA_ITEM* GetModel() const { return m_model; } - wxWindow* GetEditFrame() const + inline wxWindow* GetEditFrame() const { return m_editFrame; } @@ -197,7 +210,7 @@ public: * (was invoked the most recently). * @return Id of the currently used tool. */ - int GetCurrentToolId() const + inline int GetCurrentToolId() const { return m_activeTools.front(); } @@ -207,7 +220,7 @@ public: * (was invoked the most recently). * @return Pointer to the currently used tool. */ - TOOL_BASE* GetCurrentTool() const + inline TOOL_BASE* GetCurrentTool() const { return FindTool( GetCurrentToolId() ); } @@ -405,6 +418,9 @@ private: KIGFX::VIEW_CONTROLS* m_viewControls; wxWindow* m_editFrame; + /// Queue that stores events to be processed at the end of the event processing cycle. + std::list m_eventQueue; + /// Flag saying if the currently processed event should be passed to other tools. bool m_passEvent; }; diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index 312b060920..4dc89ddebb 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -404,11 +404,7 @@ void ROUTER_TOOL::handleCommonEvents( TOOL_EVENT& aEvent ) bds.SetCustomViaDrill( m_router->Settings().GetViaDrill() ); bds.UseCustomTrackViaSize( true ); - // TODO Should be done another way, but RunAction() won't work here. As the ROUTER_TOOL - // did not call Wait(), it does not wait for events and therefore the sent event - // won't arrive here - TOOL_EVENT event = COMMON_ACTIONS::trackViaSizeChanged.MakeEvent(); - handleCommonEvents( event ); + m_toolMgr->RunAction( COMMON_ACTIONS::trackViaSizeChanged ); } else if( aEvent.IsAction( &COMMON_ACTIONS::trackViaSizeChanged ) ) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index ed69da782b..6c5a6082fd 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -559,7 +559,7 @@ wxPoint EDIT_TOOL::getModificationPoint( const SELECTION& aSelection ) bool EDIT_TOOL::makeSelection( const SELECTION& aSelection ) { if( aSelection.Empty() ) // Try to find an item that could be modified - m_toolMgr->RunAction( COMMON_ACTIONS::selectionSingle ); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionSingle, true ); return !aSelection.Empty(); } From 0163b589b4f9f888c8ba0bdd9887ac9f117ad19e Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 16:44:22 +0200 Subject: [PATCH 667/741] Workarounded restoring focus to GAL canvas after layer switching. --- pcbnew/pcbframe.cpp | 1 + pcbnew/router/router_tool.cpp | 2 -- pcbnew/tools/pcbnew_control.cpp | 4 +--- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index eb72a49fd6..08eb9e36a0 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -830,6 +830,7 @@ void PCB_EDIT_FRAME::SetActiveLayer( LAYER_ID aLayer ) if( IsGalCanvasActive() ) { m_toolManager->RunAction( COMMON_ACTIONS::layerChanged ); // notify other tools + GetGalCanvas()->SetFocus(); // otherwise hotkeys are stuck somewhere GetGalCanvas()->Refresh(); } } diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index 4dc89ddebb..a77d5e32b5 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -532,9 +532,7 @@ void ROUTER_TOOL::performRouting() } m_router->SwitchLayer( m_startLayer ); - frame->SetActiveLayer( ToLAYER_ID( m_startLayer ) ); - frame->GetGalCanvas()->SetFocus(); if( m_startItem && m_startItem->Net() >= 0 ) highlightNet( true, m_startItem->Net() ); diff --git a/pcbnew/tools/pcbnew_control.cpp b/pcbnew/tools/pcbnew_control.cpp index 537b051bed..1bbddbc432 100644 --- a/pcbnew/tools/pcbnew_control.cpp +++ b/pcbnew/tools/pcbnew_control.cpp @@ -298,7 +298,6 @@ int PCBNEW_CONTROL::LayerSwitch( TOOL_EVENT& aEvent ) else if( aEvent.IsAction( &COMMON_ACTIONS::layerBottom ) ) m_frame->SwitchLayer( NULL, B_Cu ); - m_frame->GetGalCanvas()->SetFocus(); setTransitions(); return 0; @@ -325,8 +324,8 @@ int PCBNEW_CONTROL::LayerNext( TOOL_EVENT& aEvent ) else ++layer; + assert( IsCopperLayer( layer ) ); editFrame->SwitchLayer( NULL, ToLAYER_ID( layer ) ); - editFrame->GetGalCanvas()->SetFocus(); setTransitions(); return 0; @@ -355,7 +354,6 @@ int PCBNEW_CONTROL::LayerPrev( TOOL_EVENT& aEvent ) assert( IsCopperLayer( layer ) ); editFrame->SwitchLayer( NULL, ToLAYER_ID( layer ) ); - editFrame->GetGalCanvas()->SetFocus(); setTransitions(); return 0; From f2b5cf7d94ffadafa610e1198291c4d97c7beaaa Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 16:44:23 +0200 Subject: [PATCH 668/741] Fixed module editor crash when pcbnew is started from the main launcher. --- pcbnew/moduleframe.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index bd5b92e70a..58dc823b44 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -182,9 +182,9 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : updateTitle(); // Create GAL canvas - EDA_DRAW_FRAME* drawFrame = static_cast( aParent ); + PCB_BASE_FRAME* parentFrame = static_cast( Kiway().Player( FRAME_PCB, true ) ); PCB_DRAW_PANEL_GAL* drawPanel = new PCB_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), m_FrameSize, - drawFrame->GetGalCanvas()->GetBackend() ); + parentFrame->GetGalCanvas()->GetBackend() ); SetGalCanvas( drawPanel ); SetBoard( new BOARD() ); @@ -252,7 +252,7 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : // Add the layer manager ( most right side of pcbframe ) m_auimgr.AddPane( m_Layers, lyrs.Name( wxT( "m_LayersManagerToolBar" ) ).Right().Layer( 2 ) ); // Layers manager is visible and served only in GAL canvas mode. - m_auimgr.GetPane( wxT( "m_LayersManagerToolBar" ) ).Show( drawFrame->IsGalCanvasActive() ); + m_auimgr.GetPane( wxT( "m_LayersManagerToolBar" ) ).Show( parentFrame->IsGalCanvasActive() ); // The left vertical toolbar (fast acces to display options) m_auimgr.AddPane( m_optionsToolBar, @@ -272,7 +272,7 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : drawPanel->GetViewControls(), this ); m_toolDispatcher = new TOOL_DISPATCHER( m_toolManager ); - if( drawFrame->IsGalCanvasActive() ) + if( parentFrame->IsGalCanvasActive() ) { drawPanel->SetEventDispatcher( m_toolDispatcher ); From 0953d5730b2c3e9b5804c8c4c7ba3e9715782e71 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 16:44:23 +0200 Subject: [PATCH 669/741] Clear selection before opening the module editor. --- pcbnew/tools/edit_tool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 6c5a6082fd..55db5259bb 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -253,7 +253,7 @@ int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) std::vector& undoList = editFrame->GetScreen()->m_UndoList.m_CommandsList; // Some of properties dialogs alter pointers, so we should deselect them - m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true ); STATUS_FLAGS flags = item->GetFlags(); item->ClearFlags(); From 327f307a7f695206e86e262cd67b0fea6c042dbc Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 16:50:31 +0200 Subject: [PATCH 670/741] FIx layer switching after via placement in PNS router. --- pcbnew/router/pns_line_placer.cpp | 18 +++++++++++++--- pcbnew/router/pns_line_placer.h | 2 +- pcbnew/router/pns_router.cpp | 6 ++++-- pcbnew/router/pns_router.h | 4 ++-- pcbnew/router/pns_routing_settings.h | 21 +++++++++++++++++++ pcbnew/router/router_tool.cpp | 31 +++++++++++++--------------- 6 files changed, 57 insertions(+), 25 deletions(-) diff --git a/pcbnew/router/pns_line_placer.cpp b/pcbnew/router/pns_line_placer.cpp index ba52d3544b..c967008b74 100644 --- a/pcbnew/router/pns_line_placer.cpp +++ b/pcbnew/router/pns_line_placer.cpp @@ -758,9 +758,12 @@ void PNS_LINE_PLACER::splitAdjacentSegments( PNS_NODE* aNode, PNS_ITEM* aSeg, co } -void PNS_LINE_PLACER::SetLayer(int aLayer) +void PNS_LINE_PLACER::SetLayer( int aLayer ) { m_currentLayer = aLayer; + + m_head.SetLayer( aLayer ); + m_tail.SetLayer( aLayer ); } @@ -901,9 +904,18 @@ bool PNS_LINE_PLACER::FixRoute( const VECTOR2I& aP, PNS_ITEM* aEndItem ) VECTOR2I p_start = m_placingVia ? p_last : p_pre_last; if( m_placingVia ) - m_currentLayer = Router()->NextCopperLayer( true ); + { + int layerTop = Router()->Settings().GetLayerTop(); + int layerBottom = Router()->Settings().GetLayerBottom(); - setWorld ( Router()->GetWorld()->Branch() ); + // Change the current layer to the other side of the board + if( m_currentLayer == layerTop ) + m_currentLayer = layerBottom; + else + m_currentLayer = layerTop; + } + + setWorld( Router()->GetWorld()->Branch() ); startPlacement( p_start, m_head.Net(), m_head.Width(), m_currentLayer ); m_startsOnVia = m_placingVia; diff --git a/pcbnew/router/pns_line_placer.h b/pcbnew/router/pns_line_placer.h index e859180674..4d126866ea 100644 --- a/pcbnew/router/pns_line_placer.h +++ b/pcbnew/router/pns_line_placer.h @@ -212,7 +212,7 @@ private: * * Sets the board to route. */ - void setWorld ( PNS_NODE* aWorld ); + void setWorld( PNS_NODE* aWorld ); /** * Function startPlacement() diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index 5e16d95993..67d54ceda5 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -323,6 +323,7 @@ PNS_ROUTER::PNS_ROUTER() m_currentLayer = 1; m_placingVia = false; + m_startsOnVia = false; m_currentNet = -1; m_state = IDLE; m_world = NULL; @@ -758,6 +759,7 @@ void PNS_ROUTER::CommitRouting( PNS_NODE* aNode ) via_board->SetWidth( via->Diameter() ); via_board->SetDrill( via->Drill() ); via_board->SetNetCode( via->Net() ); + via_board->SetLayerPair( m_settings.GetLayerTop(), m_settings.GetLayerBottom() ); newBI = via_board; break; } @@ -809,6 +811,7 @@ bool PNS_ROUTER::FixRoute( const VECTOR2I& aP, PNS_ITEM* aEndItem ) { case ROUTE_TRACK: rv = m_placer->FixRoute( aP, aEndItem ); + m_startsOnVia = m_placingVia; m_placingVia = false; break; @@ -874,8 +877,7 @@ void PNS_ROUTER::SwitchLayer( int aLayer ) if( m_startsOnVia ) { m_currentLayer = aLayer; - //m_placer->StartPlacement( m_currentStart, m_currentNet, m_currentWidth, - // m_currentLayer ); + m_placer->SetLayer( aLayer ); } break; diff --git a/pcbnew/router/pns_router.h b/pcbnew/router/pns_router.h index 8a92794f16..fc22c60d16 100644 --- a/pcbnew/router/pns_router.h +++ b/pcbnew/router/pns_router.h @@ -107,7 +107,7 @@ public: void DisplayItems( const PNS_ITEMSET& aItems ); void DisplayDebugLine( const SHAPE_LINE_CHAIN& aLine, int aType = 0, int aWidth = 0 ); - void DisplayDebugPoint( const VECTOR2I aPos, int aType = 0); + void DisplayDebugPoint( const VECTOR2I aPos, int aType = 0 ); void DisplayDebugBox( const BOX2I& aBox, int aType = 0, int aWidth = 0 ); void SwitchLayer( int layer ); @@ -223,7 +223,7 @@ private: void highlightCurrent( bool enabled ); - void markViolations( PNS_NODE *aNode, PNS_ITEMSET& aCurrent, PNS_NODE::ITEM_VECTOR& aRemoved ); + void markViolations( PNS_NODE* aNode, PNS_ITEMSET& aCurrent, PNS_NODE::ITEM_VECTOR& aRemoved ); int m_currentLayer; int m_currentNet; diff --git a/pcbnew/router/pns_routing_settings.h b/pcbnew/router/pns_routing_settings.h index 84cfb5bf7e..0cd615cecb 100644 --- a/pcbnew/router/pns_routing_settings.h +++ b/pcbnew/router/pns_routing_settings.h @@ -127,6 +127,23 @@ public: int WalkaroundIterationLimit() const { return m_walkaroundIterationLimit; }; TIME_LIMIT WalkaroundTimeLimit() const; + void SetLayerPair( int aLayer1, int aLayer2 ) + { + if( aLayer1 > aLayer2 ) + { + m_layerTop = aLayer1; + m_layerBottom = aLayer2; + } + else + { + m_layerBottom = aLayer1; + m_layerTop = aLayer2; + } + } + + int GetLayerTop() const { return m_layerTop; } + int GetLayerBottom() const { return m_layerBottom; } + private: bool m_shoveVias; bool m_startDiagonal; @@ -150,6 +167,10 @@ private: int m_shoveIterationLimit; TIME_LIMIT m_shoveTimeLimit; TIME_LIMIT m_walkaroundTimeLimit; + + // Routing layers pair + int m_layerTop; + int m_layerBottom; }; #endif diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index a77d5e32b5..884af6a172 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -478,7 +478,7 @@ void ROUTER_TOOL::updateEndItem( TOOL_EVENT& aEvent ) int layer; bool snapEnabled = !aEvent.Modifier( MD_SHIFT ); - m_router->EnableSnapping ( snapEnabled ); + m_router->EnableSnapping( snapEnabled ); if( !snapEnabled || m_router->GetCurrentNet() < 0 || !m_startItem ) { @@ -566,39 +566,36 @@ void ROUTER_TOOL::performRouting() if( m_router->FixRoute( m_endSnapPoint, m_endItem ) ) break; + // Synchronize the indicated layer + frame->SetActiveLayer( m_router->GetCurrentLayer() ); + m_router->Move( m_endSnapPoint, m_endItem ); } else if( evt->IsAction( &ACT_PlaceThroughVia ) ) { + m_router->Settings().SetLayerPair( frame->GetScreen()->m_Route_Layer_TOP, + frame->GetScreen()->m_Route_Layer_BOTTOM ); m_router->ToggleViaPlacement(); - frame->GetGalCanvas()->SetTopLayer( ToLAYER_ID( m_router->GetCurrentLayer() ) ); - m_router->Move( m_endSnapPoint, m_endItem ); + m_router->Move( m_endSnapPoint, m_endItem ); // refresh } else if( evt->IsAction( &ACT_SwitchPosture ) ) { m_router->FlipPosture(); - m_router->Move( m_endSnapPoint, m_endItem ); + m_router->Move( m_endSnapPoint, m_endItem ); // refresh } - else if( evt->IsAction( &COMMON_ACTIONS::layerNext ) ) + else if( evt->IsAction( &COMMON_ACTIONS::layerChanged ) ) { - m_router->SwitchLayer( m_router->NextCopperLayer( true ) ); updateEndItem( *evt ); - frame->SetActiveLayer( ToLAYER_ID( m_router->GetCurrentLayer() ) ); - m_router->Move( m_endSnapPoint, m_endItem ); - } - else if( evt->IsAction( &COMMON_ACTIONS::layerPrev ) ) - { - m_router->SwitchLayer( m_router->NextCopperLayer( false ) ); - frame->SetActiveLayer( ToLAYER_ID( m_router->GetCurrentLayer() ) ); - m_router->Move( m_endSnapPoint, m_endItem ); + m_router->SwitchLayer( frame->GetActiveLayer() ); + m_router->Move( m_endSnapPoint, m_endItem ); // refresh } else if( evt->IsAction( &ACT_EndTrack ) ) { if( m_router->FixRoute( m_endSnapPoint, m_endItem ) ) break; } - - handleCommonEvents(*evt); + + handleCommonEvents( *evt ); } m_router->StopRouting(); @@ -642,7 +639,7 @@ int ROUTER_TOOL::Main( TOOL_EVENT& aEvent ) m_router->Settings().SetViaDiameter( bds.GetCurrentViaSize() ); m_router->Settings().SetViaDrill( bds.GetCurrentViaDrill() ); - ROUTER_TOOL_MENU *ctxMenu = new ROUTER_TOOL_MENU( board ); + ROUTER_TOOL_MENU* ctxMenu = new ROUTER_TOOL_MENU( board ); SetContextMenu ( ctxMenu ); From f32419f7e60e697b13dd9e40ed3bbd8a6bc12028 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 16:50:31 +0200 Subject: [PATCH 671/741] New pads in the module editor does not show up in the center of the edited module. --- pcbnew/tools/module_tools.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pcbnew/tools/module_tools.cpp b/pcbnew/tools/module_tools.cpp index 3a6827a9d9..effaf732dc 100644 --- a/pcbnew/tools/module_tools.cpp +++ b/pcbnew/tools/module_tools.cpp @@ -137,7 +137,7 @@ int MODULE_TOOLS::PlacePad( TOOL_EVENT& aEvent ) preview.Add( pad ); m_view->Add( &preview ); - m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true ); m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); @@ -205,6 +205,7 @@ int MODULE_TOOLS::PlacePad( TOOL_EVENT& aEvent ) // Start placing next pad pad = new D_PAD( module ); m_frame->Import_Pad_Settings( pad, false ); + pad->SetPosition( wxPoint( cursorPos.x, cursorPos.y ) ); preview.Add( pad ); } } From 49dd416c53b205961014f7a5dadc0c3d8fa6de02 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 16:50:31 +0200 Subject: [PATCH 672/741] Dragged items offset is cleared when dragging is finished. --- pcbnew/tools/edit_tool.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 55db5259bb..9d6e646c96 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -65,6 +65,9 @@ bool EDIT_TOOL::Init() m_selectionTool->AddMenuItem( COMMON_ACTIONS::remove, SELECTION_CONDITIONS::NotEmpty ); m_selectionTool->AddMenuItem( COMMON_ACTIONS::properties, SELECTION_CONDITIONS::NotEmpty ); + m_offset.x = 0; + m_offset.y = 0; + setTransitions(); return true; @@ -186,6 +189,8 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) } m_dragging = false; + m_offset.x = 0; + m_offset.y = 0; if( restore ) { From c1eda6b88c1cced3bfe315285acd6cb7d990b3e5 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 16:50:31 +0200 Subject: [PATCH 673/741] Some of the Tool Actions need to be run in immediate mode - fixed. --- pcbnew/router/router_tool.cpp | 2 +- pcbnew/tools/drawing_tool.cpp | 18 +++++++++--------- pcbnew/tools/edit_tool.cpp | 16 ++++++++-------- pcbnew/tools/module_tools.cpp | 4 ++-- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index 884af6a172..03298fd9a1 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -626,7 +626,7 @@ int ROUTER_TOOL::Main( TOOL_EVENT& aEvent ) BOARD_DESIGN_SETTINGS& bds = board->GetDesignSettings(); // Deselect all items - m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true ); getEditFrame()->SetToolID( ID_TRACK_BUTT, wxCURSOR_PENCIL, _( "Interactive Router" ) ); diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index 83ae2129b8..e1e15322fa 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -251,7 +251,7 @@ int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent ) KIGFX::VIEW_GROUP preview( m_view ); m_view->Add( &preview ); - m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true ); m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); @@ -450,7 +450,7 @@ int DRAWING_TOOL::PlaceTarget( TOOL_EVENT& aEvent ) m_view->Add( &preview ); preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true ); m_controls->SetSnapping( true ); m_controls->SetAutoPan( true ); @@ -525,7 +525,7 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent ) KIGFX::VIEW_GROUP preview( m_view ); m_view->Add( &preview ); - m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true ); m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); m_controls->SetAutoPan( true ); @@ -703,7 +703,7 @@ int DRAWING_TOOL::PlaceDXF( TOOL_EVENT& aEvent ) BOARD_ITEM* firstItem = static_cast( *preview.Begin() ); m_view->Add( &preview ); - m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true ); m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); @@ -877,7 +877,7 @@ bool DRAWING_TOOL::drawSegment( int aShape, DRAWSEGMENT*& aGraphic, KIGFX::VIEW_GROUP preview( m_view ); m_view->Add( &preview ); - m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true ); m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); @@ -1042,7 +1042,7 @@ bool DRAWING_TOOL::drawArc( DRAWSEGMENT*& aGraphic ) KIGFX::VIEW_GROUP preview( m_view ); m_view->Add( &preview ); - m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true ); m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); @@ -1212,7 +1212,7 @@ int DRAWING_TOOL::drawZone( bool aKeepout ) KIGFX::VIEW_GROUP preview( m_view ); m_view->Add( &preview ); - m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true ); m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); @@ -1421,7 +1421,7 @@ int DRAWING_TOOL::placeTextModule() KIGFX::VIEW_GROUP preview( m_view ); m_view->Add( &preview ); - m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true ); m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); m_controls->SetAutoPan( true ); @@ -1539,7 +1539,7 @@ int DRAWING_TOOL::placeTextPcb() KIGFX::VIEW_GROUP preview( m_view ); m_view->Add( &preview ); - m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true ); m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); m_controls->SetAutoPan( true ); diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 9d6e646c96..da350c4aa8 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -181,7 +181,7 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) } selection.group->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate ); + m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate, true ); } else if( evt->IsMouseUp( BUT_LEFT ) || evt->IsClick( BUT_LEFT ) ) @@ -205,7 +205,7 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) } if( unselect ) - m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true ); RN_DATA* ratsnest = getModel()->GetRatsnest(); ratsnest->ClearSimple(); @@ -278,7 +278,7 @@ int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) getModel()->GetRatsnest()->Recalculate(); item->ViewUpdate(); - m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate ); + m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate, true ); } item->SetFlags( flags ); @@ -335,9 +335,9 @@ int EDIT_TOOL::Rotate( TOOL_EVENT& aEvent ) getModel()->GetRatsnest()->Recalculate(); if( unselect ) - m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true ); - m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate ); + m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate, true ); setTransitions(); return 0; @@ -389,9 +389,9 @@ int EDIT_TOOL::Flip( TOOL_EVENT& aEvent ) getModel()->GetRatsnest()->Recalculate(); if( unselect ) - m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true ); - m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate ); + m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate, true ); setTransitions(); return 0; @@ -414,7 +414,7 @@ int EDIT_TOOL::Remove( TOOL_EVENT& aEvent ) PCB_BASE_FRAME* editFrame = getEditFrame(); // As we are about to remove items, they have to be removed from the selection first - m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true ); // Save them for( unsigned int i = 0; i < selectedItems.GetCount(); ++i ) diff --git a/pcbnew/tools/module_tools.cpp b/pcbnew/tools/module_tools.cpp index effaf732dc..a03ea3adcf 100644 --- a/pcbnew/tools/module_tools.cpp +++ b/pcbnew/tools/module_tools.cpp @@ -258,7 +258,7 @@ int MODULE_TOOLS::EnumeratePads( TOOL_EVENT& aEvent ) Activate(); - m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true ); m_controls->ShowCursor( true ); while( OPT_TOOL_EVENT evt = Wait() ) @@ -433,7 +433,7 @@ int MODULE_TOOLS::PasteItems( TOOL_EVENT& aEvent ) preview.Add( pastedModule ); m_view->Add( &preview ); - m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true ); m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); m_controls->SetAutoPan( true ); From 433e17a5821d4c5264ae3d5377f4c75c23881afb Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 16:50:31 +0200 Subject: [PATCH 674/741] Support for "locked" property for modules (GAL). --- pcbnew/tools/edit_tool.cpp | 9 +++-- pcbnew/tools/selection_tool.cpp | 59 ++++++++++++++++++++++++++++++--- pcbnew/tools/selection_tool.h | 18 ++++++---- 3 files changed, 72 insertions(+), 14 deletions(-) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index da350c4aa8..9b5924327e 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -158,6 +158,9 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) } else // Prepare to start dragging { + if( m_selectionTool->CheckLock() ) + break; + // Save items, so changes can be undone editFrame->OnModify(); editFrame->SaveCopyInUndoList( selection.items, UR_CHANGED ); @@ -298,7 +301,7 @@ int EDIT_TOOL::Rotate( TOOL_EVENT& aEvent ) // Shall the selection be cleared at the end? bool unselect = selection.Empty(); - if( !makeSelection( selection ) ) + if( !makeSelection( selection ) || m_selectionTool->CheckLock() ) { setTransitions(); @@ -352,7 +355,7 @@ int EDIT_TOOL::Flip( TOOL_EVENT& aEvent ) // Shall the selection be cleared at the end? bool unselect = selection.Empty(); - if( !makeSelection( selection ) ) + if( !makeSelection( selection ) || m_selectionTool->CheckLock() ) { setTransitions(); @@ -402,7 +405,7 @@ int EDIT_TOOL::Remove( TOOL_EVENT& aEvent ) { const SELECTION& selection = m_selectionTool->GetSelection(); - if( !makeSelection( selection ) ) + if( !makeSelection( selection ) || m_selectionTool->CheckLock() ) { setTransitions(); diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index b281091923..303dd30987 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -25,9 +25,7 @@ #include #include -#include -#include #include #include #include @@ -35,6 +33,9 @@ #include #include +#include + +#include #include #include #include @@ -52,7 +53,8 @@ SELECTION_TOOL::SELECTION_TOOL() : SelectedEvent( TC_MESSAGE, TA_ACTION, "pcbnew.InteractiveSelection.selected" ), DeselectedEvent( TC_MESSAGE, TA_ACTION, "pcbnew.InteractiveSelection.deselected" ), ClearedEvent( TC_MESSAGE, TA_ACTION, "pcbnew.InteractiveSelection.cleared" ), - m_frame( NULL ), m_additive( false ), m_multiple( false ), m_editModules( false ) + m_frame( NULL ), m_additive( false ), m_multiple( false ), + m_editModules( false ), m_locked( true ) { m_selArea = new SELECTION_AREA; m_selection.group = new KIGFX::VIEW_GROUP; @@ -77,6 +79,7 @@ void SELECTION_TOOL::Reset( RESET_REASON aReason ) clearSelection(); m_frame = getEditFrame(); + m_locked = true; // Reinsert the VIEW_GROUP, in case it was removed from the VIEW getView()->Remove( m_selection.group ); @@ -384,6 +387,48 @@ void SELECTION_TOOL::setTransitions() } +bool SELECTION_TOOL::CheckLock() +{ + if( !m_locked ) + return false; + + bool containsLocked = false; + + // Check if the selection contains locked items + for( int i = 0; i < m_selection.Size(); ++i ) + { + BOARD_ITEM* item = m_selection.Item( i ); + + switch( item->Type() ) + { + case PCB_MODULE_T: + if( static_cast( item )->IsLocked() ) + containsLocked = true; + break; + + case PCB_MODULE_EDGE_T: + case PCB_MODULE_TEXT_T: + if( static_cast( item->GetParent() )->IsLocked() ) + containsLocked = true; + break; + + default: // suppress warnings + break; + } + } + + if( containsLocked && + !IsOK( m_frame, _( "Selection contains locked items. Do you want to continue?" ) ) ) + { + return true; + } + + m_locked = false; + + return false; +} + + int SELECTION_TOOL::SingleSelection( TOOL_EVENT& aEvent ) { selectSingle( getView()->ToWorld( getViewControls()->GetMousePosition() ) ); @@ -419,7 +464,8 @@ void SELECTION_TOOL::clearSelection() } m_selection.clear(); - getEditFrame()->SetCurItem( NULL ); + m_frame->SetCurItem( NULL ); + m_locked = true; // Inform other potentially interested tools TOOL_EVENT clearEvent( ClearedEvent ); @@ -650,7 +696,10 @@ void SELECTION_TOOL::deselect( BOARD_ITEM* aItem ) m_selection.items.RemovePicker( itemIdx ); if( m_selection.Empty() ) + { m_frame->SetCurItem( NULL ); + m_locked = true; + } // Inform other potentially interested tools TOOL_EVENT deselected( DeselectedEvent ); @@ -772,7 +821,7 @@ void SELECTION_TOOL::generateMenu() } if( m_menuCopy.GetMenuItemCount() > 0 ) - SetContextMenu( &m_menuCopy, CMENU_NOW ); + SetContextMenu( &m_menuCopy, CMENU_NOW ); } diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index 06a0af35e6..beceefee5d 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -148,6 +148,15 @@ public: m_editModules = aEnabled; } + ///> Checks if the user has agreed to modify locked items for the given selection. + bool CheckLock(); + + ///> Select single item event handler. + int SingleSelection( TOOL_EVENT& aEvent ); + + ///> Clear current selection event handler. + int ClearSelection( TOOL_EVENT& aEvent ); + ///> Event sent after an item is selected. const TOOL_EVENT SelectedEvent; @@ -157,12 +166,6 @@ public: ///> Event sent after selection is cleared. const TOOL_EVENT ClearedEvent; - ///> Select single item event handler. - int SingleSelection( TOOL_EVENT& aEvent ); - - ///> Clear current selection event handler. - int ClearSelection( TOOL_EVENT& aEvent ); - private: /** * Function selectSingle() @@ -313,6 +316,9 @@ private: /// Edit module mode flag. bool m_editModules; + /// Can other tools modify locked items. + bool m_locked; + /// Conditions for specific context menu entries. std::deque m_menuConditions; }; From b8fd1de71ccf0d7ebc3b05878880f01cc4792437 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 16:50:31 +0200 Subject: [PATCH 675/741] Added module texts to the preferred types list in SELECTION_TOOL. --- pcbnew/tools/selection_tool.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 303dd30987..13151cdf65 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -239,7 +239,9 @@ bool SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere, bool aAllowDisambigua BOARD_ITEM* item; GENERAL_COLLECTORS_GUIDE guide = m_frame->GetCollectorsGuide(); GENERAL_COLLECTOR collector; - const KICAD_T types[] = { PCB_TRACE_T, PCB_VIA_T, PCB_LINE_T, EOT }; // preferred types + + // Preferred types (they have the priority when if they are covered by a bigger item) + const KICAD_T types[] = { PCB_TRACE_T, PCB_VIA_T, PCB_LINE_T, PCB_MODULE_TEXT_T, EOT }; if( m_editModules ) collector.Collect( getModel(), GENERAL_COLLECTOR::ModuleItems, From 4068d6c858b4113052dc0815e9df07de0a8845d1 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 16:50:31 +0200 Subject: [PATCH 676/741] Selection tool uses the real drag origin to compute offset when dragging items. --- pcbnew/tools/edit_tool.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 9b5924327e..f174753c6d 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -30,6 +30,7 @@ #include #include +#include #include #include @@ -175,9 +176,11 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) } else { + const VECTOR2D& dragOrigin = getView()->GetGAL()->GetGridPoint( evt->DragOrigin() ); + // Update dragging offset (distance between cursor and the first dragged item) m_offset = static_cast( selection.items.GetPickedItem( 0 ) )->GetPosition() - - wxPoint( m_cursor.x, m_cursor.y ); + wxPoint( dragOrigin.x, dragOrigin.y ); } m_dragging = true; From ff30ced4f4cc75c3dd8fb9003f87b7f29314b4dd Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 16:50:31 +0200 Subject: [PATCH 677/741] Cursor position is frozen when a context menu is displayed (GAL). --- common/tool/tool_manager.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 7a6df985fe..cf64603b4d 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -37,6 +37,7 @@ #include #include +#include #include #include @@ -577,6 +578,10 @@ void TOOL_MANAGER::dispatchContextMenu( TOOL_EVENT& aEvent ) if( st->contextMenuTrigger == CMENU_NOW ) st->contextMenuTrigger = CMENU_OFF; + // Temporarily store the cursor position, so the tools could execute actions + // using the point where the user has invoked a context menu + m_viewControls->ForceCursorPosition( true, m_viewControls->GetCursorPosition() ); + boost::scoped_ptr menu( new CONTEXT_MENU( *st->contextMenu ) ); GetEditFrame()->PopupMenu( menu.get() ); @@ -587,6 +592,8 @@ void TOOL_MANAGER::dispatchContextMenu( TOOL_EVENT& aEvent ) dispatchInternal( evt ); } + m_viewControls->ForceCursorPosition( false ); + break; } } From e6c1254dc88d6e93992790d2902a1f197a78d7d6 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 16:50:31 +0200 Subject: [PATCH 678/741] "Create corner" context menu entry for draw segments and zone outlines (GAL). --- pcbnew/tools/common_actions.cpp | 6 +++++ pcbnew/tools/common_actions.h | 3 +++ pcbnew/tools/point_editor.cpp | 47 ++++++++++++++++++++++++++++----- pcbnew/tools/point_editor.h | 13 +++++---- 4 files changed, 56 insertions(+), 13 deletions(-) diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index cf2879e725..47321a67c5 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -322,10 +322,16 @@ TOOL_ACTION COMMON_ACTIONS::routerActivate( "pcbnew.InteractiveRouter", AS_GLOBAL, 'X', "Run push & shove router", "Run push & shove router", AF_ACTIVATE ); + +// Point editor TOOL_ACTION COMMON_ACTIONS::pointEditorUpdate( "pcbnew.PointEditor.update", AS_GLOBAL, 0, "", "" ); // No description, it is not supposed to be shown anywhere +TOOL_ACTION COMMON_ACTIONS::pointEditorBreakOutline( "pcbnew.PointEditor.breakOutline", + AS_GLOBAL, 0, + "Create corner", "Create corner" ); + // Placement tool TOOL_ACTION COMMON_ACTIONS::alignTop( "pcbnew.Place.alignTop", diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index 6df00fae9b..79af0ee129 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -105,6 +105,9 @@ public: /// Update edit points static TOOL_ACTION pointEditorUpdate; + /// Break outline (insert additional points to an edge) + static TOOL_ACTION pointEditorBreakOutline; + // Placement tool /// Align items to the top edge of selection bounding box static TOOL_ACTION alignTop; diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp index 3df09c4ce0..8951cb3f25 100644 --- a/pcbnew/tools/point_editor.cpp +++ b/pcbnew/tools/point_editor.cpp @@ -195,6 +195,9 @@ bool POINT_EDITOR::Init() return false; } + m_selectionTool->AddMenuItem( COMMON_ACTIONS::pointEditorBreakOutline, + POINT_EDITOR::breakOutlineCondition ); + setTransitions(); return true; @@ -259,9 +262,10 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) m_dragPoint = point; } - else if( evt->IsDblClick( BUT_LEFT ) ) + else if( evt->IsAction( &COMMON_ACTIONS::pointEditorBreakOutline ) ) { breakOutline( controls->GetCursorPosition() ); + updatePoints(); } else if( evt->IsDrag( BUT_LEFT ) && m_dragPoint ) @@ -446,8 +450,9 @@ void POINT_EDITOR::updateItem() const for( int i = 0; i < outline->GetCornersCount(); ++i ) { - outline->SetX( i, m_editPoints->Point( i ).GetPosition().x ); - outline->SetY( i, m_editPoints->Point( i ).GetPosition().y ); + VECTOR2I point = m_editPoints->Point( i ).GetPosition(); + outline->SetX( i, point.x ); + outline->SetY( i, point.y ); } break; @@ -521,7 +526,7 @@ void POINT_EDITOR::finishItem() const } -void POINT_EDITOR::updatePoints() const +void POINT_EDITOR::updatePoints() { EDA_ITEM* item = m_editPoints->GetParent(); @@ -563,8 +568,17 @@ void POINT_EDITOR::updatePoints() const const ZONE_CONTAINER* zone = static_cast( item ); const CPolyLine* outline = zone->Outline(); - for( int i = 0; i < outline->GetCornersCount(); ++i ) - m_editPoints->Point( i ).SetPosition( outline->GetPos( i ) ); + if( m_editPoints->PointsSize() != (unsigned) outline->GetCornersCount() ) + { + getView()->Remove( m_editPoints.get() ); + m_editPoints = EDIT_POINTS_FACTORY::Make( item, getView()->GetGAL() ); + getView()->Add( m_editPoints.get() ); + } + else + { + for( int i = 0; i < outline->GetCornersCount(); ++i ) + m_editPoints->Point( i ).SetPosition( outline->GetPos( i ) ); + } break; } @@ -763,3 +777,24 @@ void POINT_EDITOR::breakOutline( const VECTOR2I& aBreakPoint ) } } } + + +void POINT_EDITOR::setTransitions() +{ + Go( &POINT_EDITOR::OnSelectionChange, m_selectionTool->SelectedEvent ); + Go( &POINT_EDITOR::OnSelectionChange, m_selectionTool->DeselectedEvent ); +} + + +bool POINT_EDITOR::breakOutlineCondition( const SELECTION& aSelection ) +{ + if( aSelection.Size() != 1 ) + return false; + + BOARD_ITEM* item = aSelection.Item( 0 ); + + // Works only for zones and line segments + return item->Type() == PCB_ZONE_AREA_T || + ( ( item->Type() == PCB_LINE_T || item->Type() == PCB_MODULE_EDGE_T ) && + static_cast( item )->GetShape() == S_SEGMENT ); +} diff --git a/pcbnew/tools/point_editor.h b/pcbnew/tools/point_editor.h index b87224f613..d6f4b30611 100644 --- a/pcbnew/tools/point_editor.h +++ b/pcbnew/tools/point_editor.h @@ -81,7 +81,7 @@ private: void finishItem() const; ///> Updates edit points with item's points. - void updatePoints() const; + void updatePoints(); ///> Returns true if aPoint is the currently modified point. inline bool isModified( const EDIT_POINT& aPoint ) const @@ -95,15 +95,14 @@ private: ///> Returns a point that should be used as a constrainer for 45 degrees mode. EDIT_POINT get45DegConstrainer() const; - ///> Adds a new edit point on a zone outline. + ///> Adds a new edit point on a zone outline/line. void breakOutline( const VECTOR2I& aBreakPoint ); ///> Sets up handlers for various events. - void setTransitions() - { - Go( &POINT_EDITOR::OnSelectionChange, m_selectionTool->SelectedEvent ); - Go( &POINT_EDITOR::OnSelectionChange, m_selectionTool->DeselectedEvent ); - } + void setTransitions(); + + ///> Condition to display "Create corner" context menu entry. + static bool breakOutlineCondition( const SELECTION& aSelection ); }; #endif From 898e4e269e2bd3e37988673e7bec67f428179da6 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 16:50:31 +0200 Subject: [PATCH 679/741] Fixed the only-type condition for empty selection case. --- pcbnew/tools/selection_conditions.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pcbnew/tools/selection_conditions.cpp b/pcbnew/tools/selection_conditions.cpp index f1679dac8b..fe130b9db4 100644 --- a/pcbnew/tools/selection_conditions.cpp +++ b/pcbnew/tools/selection_conditions.cpp @@ -78,6 +78,9 @@ bool SELECTION_CONDITIONS::hasTypeFunc( const SELECTION& aSelection, KICAD_T aTy bool SELECTION_CONDITIONS::onlyTypeFunc( const SELECTION& aSelection, KICAD_T aType ) { + if( aSelection.Empty() ) + return false; + for( int i = 0; i < aSelection.Size(); ++i ) { if( aSelection.Item( i )->Type() != aType ) From 78853febbe50ad7bbccd4328cf77a62d23a1a79e Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 16:57:01 +0200 Subject: [PATCH 680/741] Zone fill/unfill actions in context menu (GAL). --- pcbnew/router/pns_router.cpp | 3 +- pcbnew/router/router_tool.cpp | 6 +- pcbnew/tools/common_actions.cpp | 15 +++++ pcbnew/tools/common_actions.h | 6 +- pcbnew/tools/pcb_editor_control.cpp | 90 +++++++++++++++++++++++++++++ pcbnew/tools/pcb_editor_control.h | 9 ++- pcbnew/tools/pcbnew_control.cpp | 1 + pcbnew/tools/pcbnew_control.h | 8 +-- 8 files changed, 123 insertions(+), 15 deletions(-) diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index 67d54ceda5..d9db594a0f 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -759,7 +759,8 @@ void PNS_ROUTER::CommitRouting( PNS_NODE* aNode ) via_board->SetWidth( via->Diameter() ); via_board->SetDrill( via->Drill() ); via_board->SetNetCode( via->Net() ); - via_board->SetLayerPair( m_settings.GetLayerTop(), m_settings.GetLayerBottom() ); + via_board->SetLayerPair( ToLAYER_ID( m_settings.GetLayerTop() ), + ToLAYER_ID( m_settings.GetLayerBottom() ) ); newBI = via_board; break; } diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index 03298fd9a1..29de1909db 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -212,8 +212,8 @@ public: Add( ACT_PlaceThroughVia ); Add( ACT_SwitchPosture ); - AppendSeparator ( ); - + AppendSeparator(); + CONTEXT_TRACK_WIDTH_MENU* trackMenu = new CONTEXT_TRACK_WIDTH_MENU; trackMenu->SetBoard( aBoard ); AppendSubMenu( trackMenu, wxT( "Select Track Width" ) ); @@ -567,7 +567,7 @@ void ROUTER_TOOL::performRouting() break; // Synchronize the indicated layer - frame->SetActiveLayer( m_router->GetCurrentLayer() ); + frame->SetActiveLayer( ToLAYER_ID( m_router->GetCurrentLayer() ) ); m_router->Move( m_endSnapPoint, m_endItem ); } diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 47321a67c5..0ce1c0f806 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -109,6 +109,7 @@ TOOL_ACTION COMMON_ACTIONS::setAnchor( "pcbnew.InteractiveDrawing.setAnchor", "Place the footprint anchor", "Place the footprint anchor", AF_ACTIVATE ); + // View Controls TOOL_ACTION COMMON_ACTIONS::zoomIn( "pcbnew.Control.zoomIn", AS_GLOBAL, WXK_F1, @@ -271,6 +272,20 @@ TOOL_ACTION COMMON_ACTIONS::trackViaSizeChanged( "pcbnew.EditorControl.trackViaS "", "", AF_NOTIFY ); +// Zone actions +TOOL_ACTION COMMON_ACTIONS::zoneFill( "pcbnew.EditorControl.zoneFill", + AS_GLOBAL, 0, + "Fill", "Fill zone(s)" ); + +TOOL_ACTION COMMON_ACTIONS::zoneFillAll( "pcbnew.EditorControl.zoneFillAll", + AS_GLOBAL, 0, + "Fill all", "Fill all zones" ); + +TOOL_ACTION COMMON_ACTIONS::zoneUnfill( "pcbnew.EditorControl.zoneUnfill", + AS_GLOBAL, 0, + "Unfill", "Unfill zone(s)" ); + + // Module editor tools TOOL_ACTION COMMON_ACTIONS::placePad( "pcbnew.ModuleEditor.placePad", AS_GLOBAL, 0, diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index 79af0ee129..4712b42525 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -62,7 +62,6 @@ public: /// Deleting a BOARD_ITEM static TOOL_ACTION remove; - // Drawing Tool /// Activation of the drawing tool (line) static TOOL_ACTION drawLine; @@ -177,6 +176,10 @@ public: static TOOL_ACTION trackViaSizeChanged; // notification + // Zone actions + static TOOL_ACTION zoneFill; + static TOOL_ACTION zoneFillAll; + static TOOL_ACTION zoneUnfill; // Module editor tools /// Activation of the drawing tool (placing a PAD) @@ -197,7 +200,6 @@ public: /// Display module texts as outlines static TOOL_ACTION moduleTextOutlines; - // Miscellaneous static TOOL_ACTION resetCoords; static TOOL_ACTION switchCursor; diff --git a/pcbnew/tools/pcb_editor_control.cpp b/pcbnew/tools/pcb_editor_control.cpp index a1b46c8a46..f1c8fe3833 100644 --- a/pcbnew/tools/pcb_editor_control.cpp +++ b/pcbnew/tools/pcb_editor_control.cpp @@ -25,10 +25,26 @@ #include "pcb_editor_control.h" #include "common_actions.h" +#include "selection_tool.h" + #include #include +#include #include + +class ZONE_CONTEXT_MENU : public CONTEXT_MENU +{ +public: + ZONE_CONTEXT_MENU() + { + Add( COMMON_ACTIONS::zoneFill ); + Add( COMMON_ACTIONS::zoneFillAll ); + Add( COMMON_ACTIONS::zoneUnfill ); + } +}; + + PCB_EDITOR_CONTROL::PCB_EDITOR_CONTROL() : TOOL_INTERACTIVE( "pcbnew.EditorControl" ) { @@ -43,6 +59,14 @@ void PCB_EDITOR_CONTROL::Reset( RESET_REASON aReason ) bool PCB_EDITOR_CONTROL::Init() { + SELECTION_TOOL* selTool = m_toolMgr->GetTool(); + + if( selTool ) + { + selTool->AddSubMenu( new ZONE_CONTEXT_MENU, wxT( "Zones" ), + SELECTION_CONDITIONS::OnlyType( PCB_ZONE_AREA_T ) ); + } + setTransitions(); return true; @@ -134,6 +158,67 @@ int PCB_EDITOR_CONTROL::ViaSizeDec( TOOL_EVENT& aEvent ) } +// Zone actions +int PCB_EDITOR_CONTROL::ZoneFill( TOOL_EVENT& aEvent ) +{ + SELECTION_TOOL* selTool = m_toolMgr->GetTool(); + const SELECTION& selection = selTool->GetSelection(); + + for( int i = 0; i < selection.Size(); ++i ) + { + assert( selection.Item( i )->Type() == PCB_ZONE_AREA_T ); + + ZONE_CONTAINER* zone = selection.Item( i ); + m_frame->Fill_Zone( zone ); + zone->SetIsFilled( true ); + zone->ViewUpdate(); + } + + setTransitions(); + + return 0; +} + + +int PCB_EDITOR_CONTROL::ZoneFillAll( TOOL_EVENT& aEvent ) +{ + BOARD* board = getModel(); + + for( int i = 0; i < board->GetAreaCount(); ++i ) + { + ZONE_CONTAINER* zone = board->GetArea( i ); + m_frame->Fill_Zone( zone ); + zone->SetIsFilled( true ); + zone->ViewUpdate(); + } + + setTransitions(); + + return 0; +} + + +int PCB_EDITOR_CONTROL::ZoneUnfill( TOOL_EVENT& aEvent ) +{ + SELECTION_TOOL* selTool = m_toolMgr->GetTool(); + const SELECTION& selection = selTool->GetSelection(); + + for( int i = 0; i < selection.Size(); ++i ) + { + assert( selection.Item( i )->Type() == PCB_ZONE_AREA_T ); + + ZONE_CONTAINER* zone = selection.Item( i ); + zone->SetIsFilled( false ); + zone->ClearFilledPolysList(); + zone->ViewUpdate(); + } + + setTransitions(); + + return 0; +} + + void PCB_EDITOR_CONTROL::setTransitions() { // Track & via size control @@ -141,4 +226,9 @@ void PCB_EDITOR_CONTROL::setTransitions() Go( &PCB_EDITOR_CONTROL::TrackWidthDec, COMMON_ACTIONS::trackWidthDec.MakeEvent() ); Go( &PCB_EDITOR_CONTROL::ViaSizeInc, COMMON_ACTIONS::viaSizeInc.MakeEvent() ); Go( &PCB_EDITOR_CONTROL::ViaSizeDec, COMMON_ACTIONS::viaSizeDec.MakeEvent() ); + + // Zone actions + Go( &PCB_EDITOR_CONTROL::ZoneFill, COMMON_ACTIONS::zoneFill.MakeEvent() ); + Go( &PCB_EDITOR_CONTROL::ZoneFillAll, COMMON_ACTIONS::zoneFillAll.MakeEvent() ); + Go( &PCB_EDITOR_CONTROL::ZoneUnfill, COMMON_ACTIONS::zoneUnfill.MakeEvent() ); } diff --git a/pcbnew/tools/pcb_editor_control.h b/pcbnew/tools/pcb_editor_control.h index 8d879907fa..6d272884c9 100644 --- a/pcbnew/tools/pcb_editor_control.h +++ b/pcbnew/tools/pcb_editor_control.h @@ -30,9 +30,9 @@ class PCB_EDIT_FRAME; /** - * Class PCBNEW_CONTROL + * Class PCB_EDITOR_CONTROL * - * Handles hot keys that are not accepted by any other tool. + * Handles actions specific to the board editor in pcbnew. */ class PCB_EDITOR_CONTROL : public TOOL_INTERACTIVE { @@ -51,6 +51,11 @@ public: int ViaSizeInc( TOOL_EVENT& aEvent ); int ViaSizeDec( TOOL_EVENT& aEvent ); + // Zone actions + int ZoneFill( TOOL_EVENT& aEvent ); + int ZoneFillAll( TOOL_EVENT& aEvent ); + int ZoneUnfill( TOOL_EVENT& aEvent ); + private: ///> Sets up handlers for various events. void setTransitions(); diff --git a/pcbnew/tools/pcbnew_control.cpp b/pcbnew/tools/pcbnew_control.cpp index 1bbddbc432..a0573b3118 100644 --- a/pcbnew/tools/pcbnew_control.cpp +++ b/pcbnew/tools/pcbnew_control.cpp @@ -40,6 +40,7 @@ #include #include + PCBNEW_CONTROL::PCBNEW_CONTROL() : TOOL_INTERACTIVE( "pcbnew.Control" ) { diff --git a/pcbnew/tools/pcbnew_control.h b/pcbnew/tools/pcbnew_control.h index 7fc9978b60..e9e87cb1e4 100644 --- a/pcbnew/tools/pcbnew_control.h +++ b/pcbnew/tools/pcbnew_control.h @@ -32,7 +32,7 @@ class PCB_BASE_FRAME; /** * Class PCBNEW_CONTROL * - * Handles hot keys that are not accepted by any other tool. + * Handles actions that are shared between different frames in pcbnew. */ class PCBNEW_CONTROL : public TOOL_INTERACTIVE @@ -75,12 +75,6 @@ public: int GridPrev( TOOL_EVENT& aEvent ); int GridSetOrigin( TOOL_EVENT& aEvent ); - // Track & via size control - int TrackWidthInc( TOOL_EVENT& aEvent ); - int TrackWidthDec( TOOL_EVENT& aEvent ); - int ViaSizeInc( TOOL_EVENT& aEvent ); - int ViaSizeDec( TOOL_EVENT& aEvent ); - // Miscellaneous int ResetCoords( TOOL_EVENT& aEvent ); int SwitchCursor( TOOL_EVENT& aEvent ); From 14cfd173e6b8a18d657b34ab4270db030d578614 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 16:57:01 +0200 Subject: [PATCH 681/741] Fixed the Module viewer crash when there is no footprint loaded. --- common/gal/cairo/cairo_compositor.cpp | 3 +++ pcbnew/modview_frame.cpp | 10 ++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/common/gal/cairo/cairo_compositor.cpp b/common/gal/cairo/cairo_compositor.cpp index e749c4db9a..5afa67d55a 100644 --- a/common/gal/cairo/cairo_compositor.cpp +++ b/common/gal/cairo/cairo_compositor.cpp @@ -55,6 +55,9 @@ void CAIRO_COMPOSITOR::Resize( unsigned int aWidth, unsigned int aHeight ) { clean(); + assert( m_width > 0 ); + assert( m_height > 0 ); + m_width = aWidth; m_height = aHeight; diff --git a/pcbnew/modview_frame.cpp b/pcbnew/modview_frame.cpp index 3404a5b349..d83e220234 100644 --- a/pcbnew/modview_frame.cpp +++ b/pcbnew/modview_frame.cpp @@ -168,11 +168,11 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent ReCreateLibraryList(); UpdateTitle(); - EDA_DRAW_FRAME* drawFrame = static_cast( aParent ); + PCB_BASE_FRAME* parentFrame = static_cast( Kiway().Player( FRAME_PCB, true ) ); // Create GAL canvas PCB_DRAW_PANEL_GAL* drawPanel = new PCB_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), m_FrameSize, - drawFrame->GetGalCanvas()->GetBackend() ); + parentFrame->GetGalCanvas()->GetBackend() ); SetGalCanvas( drawPanel ); // Create the manager and dispatcher & route draw panel events to the dispatcher @@ -193,9 +193,11 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent id.SetLibNickname( getCurNickname() ); id.SetFootprintName( getCurFootprintName() ); GetBoard()->Add( loadFootprint( id ) ); - drawPanel->DisplayBoard( m_Pcb ); } + drawPanel->DisplayBoard( m_Pcb ); + updateView(); + if( m_canvas ) m_canvas->SetAcceleratorTable( table ); @@ -273,7 +275,7 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent Show( true ); - UseGalCanvas( drawFrame->IsGalCanvasActive() ); + UseGalCanvas( parentFrame->IsGalCanvasActive() ); } From 49884da3e696177d87cd9a4c194110d6a7c322fc Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 9 Jul 2014 18:31:39 +0200 Subject: [PATCH 682/741] Gerber files generation: fix a rounding issue when drawing circles. (explains bug Bug #1339086 ). Gerbview: allows x.7 format (recently indroduced in Gerber format) Also minor coding style fixes. --- common/common_plotGERBER_functions.cpp | 7 ++- gerbview/rs274_read_XY_and_IJ_coordinates.cpp | 44 ++++++++++++------- gerbview/rs274d.cpp | 1 - gerbview/rs274x.cpp | 13 +++--- 4 files changed, 39 insertions(+), 26 deletions(-) diff --git a/common/common_plotGERBER_functions.cpp b/common/common_plotGERBER_functions.cpp index 94a84af4e3..6c5b07bcfb 100644 --- a/common/common_plotGERBER_functions.cpp +++ b/common/common_plotGERBER_functions.cpp @@ -356,14 +356,17 @@ void GERBER_PLOTTER::Arc( const wxPoint& aCenter, double aStAngle, double aEndAn DPOINT devEnd = userToDeviceCoordinates( end ); DPOINT devCenter = userToDeviceCoordinates( aCenter ) - userToDeviceCoordinates( start ); + fprintf( outputFile, "G75*\n" ); // Multiquadrant mode if( aStAngle < aEndAngle ) fprintf( outputFile, "G03" ); else fprintf( outputFile, "G02" ); - fprintf( outputFile, "X%dY%dI%dJ%dD01*\n", int( devEnd.x ), int( devEnd.y ), - int( devCenter.x ), int( devCenter.y ) ); + + fprintf( outputFile, "X%dY%dI%dJ%dD01*\n", + KiROUND( devEnd.x ), KiROUND( devEnd.y ), + KiROUND( devCenter.x ), KiROUND( devCenter.y ) ); fprintf( outputFile, "G74*\nG01*\n" ); // Back to single quadrant and linear interp. } diff --git a/gerbview/rs274_read_XY_and_IJ_coordinates.cpp b/gerbview/rs274_read_XY_and_IJ_coordinates.cpp index f3fa381310..d2b53fd86f 100644 --- a/gerbview/rs274_read_XY_and_IJ_coordinates.cpp +++ b/gerbview/rs274_read_XY_and_IJ_coordinates.cpp @@ -19,25 +19,24 @@ // depending on the gerber file format // this scale list assumes gerber units are imperial. // for metric gerber units, the imperial to metric conversion is made in read functions -static double scale_list[10] = +#define SCALE_LIST_SIZE 10 +static double scale_list[SCALE_LIST_SIZE] = { - 1000.0 * IU_PER_MILS, - 100.0 * IU_PER_MILS, - 10.0 * IU_PER_MILS, - 1.0 * IU_PER_MILS, - 0.1 * IU_PER_MILS, - 0.01 * IU_PER_MILS, - 0.001 * IU_PER_MILS, - 0.0001 * IU_PER_MILS, - 0.00001 * IU_PER_MILS, + 1000.0 * IU_PER_MILS, // x.1 format (certainly useless) + 100.0 * IU_PER_MILS, // x.2 format (certainly useless) + 10.0 * IU_PER_MILS, // x.3 format + 1.0 * IU_PER_MILS, // x.4 format + 0.1 * IU_PER_MILS, // x.5 format + 0.01 * IU_PER_MILS, // x.6 format + 0.0001 * IU_PER_MILS, // x.7 format + 0.00001 * IU_PER_MILS, // provided, but not used 0.000001 * IU_PER_MILS }; - -/** +/* * Function scale - * converts a distance given in floating point to our internal units - * (deci-mils or nano units) + * converts a coordinate given in floating point to Gerbvies internal units + * (currently = 10 nanometers) */ int scaletoIU( double aCoord, bool isMetric ) { @@ -78,6 +77,7 @@ wxPoint GERBER_IMAGE::ReadXYCoord( char*& Text ) Text++; text = line; nbdigits = 0; + while( IsNumber( *Text ) ) { if( *Text == '.' ) // Force decimat format if reading a floating point number @@ -90,6 +90,7 @@ wxPoint GERBER_IMAGE::ReadXYCoord( char*& Text ) } *text = 0; + if( is_float ) { // When X or Y values are float numbers, they are given in mm or inches @@ -101,6 +102,7 @@ wxPoint GERBER_IMAGE::ReadXYCoord( char*& Text ) else { int fmt_scale = (type_coord == 'X') ? m_FmtScale.x : m_FmtScale.y; + if( m_NoTrailingZeros ) { int min_digit = @@ -113,6 +115,7 @@ wxPoint GERBER_IMAGE::ReadXYCoord( char*& Text ) *text = 0; } + current_coord = atoi( line ); double real_scale = scale_list[fmt_scale]; @@ -177,6 +180,7 @@ wxPoint GERBER_IMAGE::ReadIJCoord( char*& Text ) // count digits only (sign and decimal point are not counted) if( (*Text >= '0') && (*Text <='9') ) nbdigits++; + *(text++) = *(Text++); } @@ -193,6 +197,7 @@ wxPoint GERBER_IMAGE::ReadIJCoord( char*& Text ) { int fmt_scale = (type_coord == 'I') ? m_FmtScale.x : m_FmtScale.y; + if( m_NoTrailingZeros ) { int min_digit = @@ -205,20 +210,21 @@ wxPoint GERBER_IMAGE::ReadIJCoord( char*& Text ) *text = 0; } + current_coord = atoi( line ); - if( fmt_scale < 0 || fmt_scale > 9 ) - fmt_scale = 4; // select scale 1.0 - double real_scale = scale_list[fmt_scale]; + if( m_GerbMetric ) real_scale = real_scale / 25.4; + current_coord = KiROUND( current_coord * real_scale ); } if( type_coord == 'I' ) pos.x = current_coord; else if( type_coord == 'J' ) pos.y = current_coord; + continue; } else @@ -246,8 +252,10 @@ int ReadInt( char*& text, bool aSkipSeparator = true ) int ret = (int) strtol( text, &text, 10 ); if( *text == ',' || isspace( *text ) ) + { if( aSkipSeparator ) ++text; + } return ret; } @@ -267,8 +275,10 @@ double ReadDouble( char*& text, bool aSkipSeparator = true ) double ret = strtod( text, &text ); if( *text == ',' || isspace( *text ) ) + { if( aSkipSeparator ) ++text; + } return ret; } diff --git a/gerbview/rs274d.cpp b/gerbview/rs274d.cpp index 74cb464cb9..cb9475d6a1 100644 --- a/gerbview/rs274d.cpp +++ b/gerbview/rs274d.cpp @@ -222,7 +222,6 @@ static void fillArcGBRITEM( GERBER_DRAW_ITEM* aGbrItem, int Dcode_index, int aL aGbrItem->m_Size = aPenSize; aGbrItem->m_Flashed = false; - if( aMultiquadrant ) center = aStart + aRelCenter; else diff --git a/gerbview/rs274x.cpp b/gerbview/rs274x.cpp index aeb7871429..b6ebbf7432 100644 --- a/gerbview/rs274x.cpp +++ b/gerbview/rs274x.cpp @@ -235,15 +235,16 @@ bool GERBER_IMAGE::ExecuteRS274XCommand( int command, if( code == 'X' ) { x_fmt_known = true; - // number of digits after the decimal point (0 to 6 allowed) + // number of digits after the decimal point (0 to 7 allowed) m_FmtScale.x = *text - '0'; m_FmtLen.x = ctmp + m_FmtScale.x; - // m_FmtScale is 0 to 6 + // m_FmtScale is 0 to 7 + // (Old Gerber specification was 0 to 6) if( m_FmtScale.x < 0 ) m_FmtScale.x = 0; - if( m_FmtScale.x > 6 ) - m_FmtScale.x = 6; + if( m_FmtScale.x > 7 ) + m_FmtScale.x = 7; } else { @@ -252,8 +253,8 @@ bool GERBER_IMAGE::ExecuteRS274XCommand( int command, m_FmtLen.y = ctmp + m_FmtScale.y; if( m_FmtScale.y < 0 ) m_FmtScale.y = 0; - if( m_FmtScale.y > 6 ) - m_FmtScale.y = 6; + if( m_FmtScale.y > 7 ) + m_FmtScale.y = 7; } text++; } From 3f8f6caf1b1effb69b541185dda76faa210dd812 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 11 Jul 2014 17:04:35 +0200 Subject: [PATCH 683/741] Increase panning area in GAL view. --- pcbnew/pcbframe.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 9d709e8ad8..36dbaf748d 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -550,7 +550,6 @@ void PCB_EDIT_FRAME::ViewReloadBoard( const BOARD* aBoard ) const } // Limit panning to the size of worksheet frame - GetGalCanvas()->GetViewControls()->SetPanBoundary( aBoard->GetWorksheetViewItem()->ViewBBox() ); view->RecacheAllItems( true ); if( IsGalCanvasActive() ) From 7161c5bdd516691788d993ee363e5f7c2d80a2e3 Mon Sep 17 00:00:00 2001 From: Kirill Mavreshko Date: Sun, 13 Jul 2014 19:08:42 +0200 Subject: [PATCH 684/741] bugfix: pcbnew crashes when you try to save a file --- pcbnew/kicad_plugin.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index 3cfb646176..8c04a1e192 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -63,12 +63,14 @@ static const wxString traceFootprintLibrary( wxT( "KicadFootprintLib" ) ); ///> Removes empty nets (i.e. with node count equal zero) from net classes void filterNetClass( const BOARD& aBoard, NETCLASS& aNetClass ) { - for( NETCLASS::const_iterator it = aNetClass.begin(); it != aNetClass.end(); ++it ) + for( NETCLASS::const_iterator it = aNetClass.begin(); it != aNetClass.end(); ) { NETINFO_ITEM* netinfo = aBoard.FindNet( *it ); if( netinfo && netinfo->GetNodesCount() <= 0 ) // hopefully there are no nets with negative - aNetClass.Remove( it ); // node count, but you never know.. + aNetClass.Remove( it++ ); // node count, but you never know.. + else + ++it; } } From 7d1c1f3085df2cdb33d8658bf9507078170a7bd6 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 14 Jul 2014 09:36:37 +0200 Subject: [PATCH 685/741] Gerber files generation: fix a rounding issue when drawing circles. (explains bug Bug #1339086 ). Gerbview: allows x.7 format (recently indroduced in Gerber format) Also minor coding style fixes. --- common/common_plotGERBER_functions.cpp | 7 ++- gerbview/rs274_read_XY_and_IJ_coordinates.cpp | 44 ++++++++++++------- gerbview/rs274d.cpp | 1 - gerbview/rs274x.cpp | 13 +++--- 4 files changed, 39 insertions(+), 26 deletions(-) diff --git a/common/common_plotGERBER_functions.cpp b/common/common_plotGERBER_functions.cpp index 94a84af4e3..6c5b07bcfb 100644 --- a/common/common_plotGERBER_functions.cpp +++ b/common/common_plotGERBER_functions.cpp @@ -356,14 +356,17 @@ void GERBER_PLOTTER::Arc( const wxPoint& aCenter, double aStAngle, double aEndAn DPOINT devEnd = userToDeviceCoordinates( end ); DPOINT devCenter = userToDeviceCoordinates( aCenter ) - userToDeviceCoordinates( start ); + fprintf( outputFile, "G75*\n" ); // Multiquadrant mode if( aStAngle < aEndAngle ) fprintf( outputFile, "G03" ); else fprintf( outputFile, "G02" ); - fprintf( outputFile, "X%dY%dI%dJ%dD01*\n", int( devEnd.x ), int( devEnd.y ), - int( devCenter.x ), int( devCenter.y ) ); + + fprintf( outputFile, "X%dY%dI%dJ%dD01*\n", + KiROUND( devEnd.x ), KiROUND( devEnd.y ), + KiROUND( devCenter.x ), KiROUND( devCenter.y ) ); fprintf( outputFile, "G74*\nG01*\n" ); // Back to single quadrant and linear interp. } diff --git a/gerbview/rs274_read_XY_and_IJ_coordinates.cpp b/gerbview/rs274_read_XY_and_IJ_coordinates.cpp index f3fa381310..d2b53fd86f 100644 --- a/gerbview/rs274_read_XY_and_IJ_coordinates.cpp +++ b/gerbview/rs274_read_XY_and_IJ_coordinates.cpp @@ -19,25 +19,24 @@ // depending on the gerber file format // this scale list assumes gerber units are imperial. // for metric gerber units, the imperial to metric conversion is made in read functions -static double scale_list[10] = +#define SCALE_LIST_SIZE 10 +static double scale_list[SCALE_LIST_SIZE] = { - 1000.0 * IU_PER_MILS, - 100.0 * IU_PER_MILS, - 10.0 * IU_PER_MILS, - 1.0 * IU_PER_MILS, - 0.1 * IU_PER_MILS, - 0.01 * IU_PER_MILS, - 0.001 * IU_PER_MILS, - 0.0001 * IU_PER_MILS, - 0.00001 * IU_PER_MILS, + 1000.0 * IU_PER_MILS, // x.1 format (certainly useless) + 100.0 * IU_PER_MILS, // x.2 format (certainly useless) + 10.0 * IU_PER_MILS, // x.3 format + 1.0 * IU_PER_MILS, // x.4 format + 0.1 * IU_PER_MILS, // x.5 format + 0.01 * IU_PER_MILS, // x.6 format + 0.0001 * IU_PER_MILS, // x.7 format + 0.00001 * IU_PER_MILS, // provided, but not used 0.000001 * IU_PER_MILS }; - -/** +/* * Function scale - * converts a distance given in floating point to our internal units - * (deci-mils or nano units) + * converts a coordinate given in floating point to Gerbvies internal units + * (currently = 10 nanometers) */ int scaletoIU( double aCoord, bool isMetric ) { @@ -78,6 +77,7 @@ wxPoint GERBER_IMAGE::ReadXYCoord( char*& Text ) Text++; text = line; nbdigits = 0; + while( IsNumber( *Text ) ) { if( *Text == '.' ) // Force decimat format if reading a floating point number @@ -90,6 +90,7 @@ wxPoint GERBER_IMAGE::ReadXYCoord( char*& Text ) } *text = 0; + if( is_float ) { // When X or Y values are float numbers, they are given in mm or inches @@ -101,6 +102,7 @@ wxPoint GERBER_IMAGE::ReadXYCoord( char*& Text ) else { int fmt_scale = (type_coord == 'X') ? m_FmtScale.x : m_FmtScale.y; + if( m_NoTrailingZeros ) { int min_digit = @@ -113,6 +115,7 @@ wxPoint GERBER_IMAGE::ReadXYCoord( char*& Text ) *text = 0; } + current_coord = atoi( line ); double real_scale = scale_list[fmt_scale]; @@ -177,6 +180,7 @@ wxPoint GERBER_IMAGE::ReadIJCoord( char*& Text ) // count digits only (sign and decimal point are not counted) if( (*Text >= '0') && (*Text <='9') ) nbdigits++; + *(text++) = *(Text++); } @@ -193,6 +197,7 @@ wxPoint GERBER_IMAGE::ReadIJCoord( char*& Text ) { int fmt_scale = (type_coord == 'I') ? m_FmtScale.x : m_FmtScale.y; + if( m_NoTrailingZeros ) { int min_digit = @@ -205,20 +210,21 @@ wxPoint GERBER_IMAGE::ReadIJCoord( char*& Text ) *text = 0; } + current_coord = atoi( line ); - if( fmt_scale < 0 || fmt_scale > 9 ) - fmt_scale = 4; // select scale 1.0 - double real_scale = scale_list[fmt_scale]; + if( m_GerbMetric ) real_scale = real_scale / 25.4; + current_coord = KiROUND( current_coord * real_scale ); } if( type_coord == 'I' ) pos.x = current_coord; else if( type_coord == 'J' ) pos.y = current_coord; + continue; } else @@ -246,8 +252,10 @@ int ReadInt( char*& text, bool aSkipSeparator = true ) int ret = (int) strtol( text, &text, 10 ); if( *text == ',' || isspace( *text ) ) + { if( aSkipSeparator ) ++text; + } return ret; } @@ -267,8 +275,10 @@ double ReadDouble( char*& text, bool aSkipSeparator = true ) double ret = strtod( text, &text ); if( *text == ',' || isspace( *text ) ) + { if( aSkipSeparator ) ++text; + } return ret; } diff --git a/gerbview/rs274d.cpp b/gerbview/rs274d.cpp index 74cb464cb9..cb9475d6a1 100644 --- a/gerbview/rs274d.cpp +++ b/gerbview/rs274d.cpp @@ -222,7 +222,6 @@ static void fillArcGBRITEM( GERBER_DRAW_ITEM* aGbrItem, int Dcode_index, int aL aGbrItem->m_Size = aPenSize; aGbrItem->m_Flashed = false; - if( aMultiquadrant ) center = aStart + aRelCenter; else diff --git a/gerbview/rs274x.cpp b/gerbview/rs274x.cpp index aeb7871429..b6ebbf7432 100644 --- a/gerbview/rs274x.cpp +++ b/gerbview/rs274x.cpp @@ -235,15 +235,16 @@ bool GERBER_IMAGE::ExecuteRS274XCommand( int command, if( code == 'X' ) { x_fmt_known = true; - // number of digits after the decimal point (0 to 6 allowed) + // number of digits after the decimal point (0 to 7 allowed) m_FmtScale.x = *text - '0'; m_FmtLen.x = ctmp + m_FmtScale.x; - // m_FmtScale is 0 to 6 + // m_FmtScale is 0 to 7 + // (Old Gerber specification was 0 to 6) if( m_FmtScale.x < 0 ) m_FmtScale.x = 0; - if( m_FmtScale.x > 6 ) - m_FmtScale.x = 6; + if( m_FmtScale.x > 7 ) + m_FmtScale.x = 7; } else { @@ -252,8 +253,8 @@ bool GERBER_IMAGE::ExecuteRS274XCommand( int command, m_FmtLen.y = ctmp + m_FmtScale.y; if( m_FmtScale.y < 0 ) m_FmtScale.y = 0; - if( m_FmtScale.y > 6 ) - m_FmtScale.y = 6; + if( m_FmtScale.y > 7 ) + m_FmtScale.y = 7; } text++; } From ae44fb62fcc5c39eb1a92831ed3d40d502bd5a4a Mon Sep 17 00:00:00 2001 From: Kirill Mavreshko Date: Mon, 14 Jul 2014 09:41:02 +0200 Subject: [PATCH 686/741] bugfix: pcbnew crashes when you try to save a file --- pcbnew/kicad_plugin.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index 3cfb646176..8c04a1e192 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -63,12 +63,14 @@ static const wxString traceFootprintLibrary( wxT( "KicadFootprintLib" ) ); ///> Removes empty nets (i.e. with node count equal zero) from net classes void filterNetClass( const BOARD& aBoard, NETCLASS& aNetClass ) { - for( NETCLASS::const_iterator it = aNetClass.begin(); it != aNetClass.end(); ++it ) + for( NETCLASS::const_iterator it = aNetClass.begin(); it != aNetClass.end(); ) { NETINFO_ITEM* netinfo = aBoard.FindNet( *it ); if( netinfo && netinfo->GetNodesCount() <= 0 ) // hopefully there are no nets with negative - aNetClass.Remove( it ); // node count, but you never know.. + aNetClass.Remove( it++ ); // node count, but you never know.. + else + ++it; } } From c3ed210e5da68d59f41b792f7d8632fb48da5641 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 14 Jul 2014 09:43:20 +0200 Subject: [PATCH 687/741] Increase panning area in GAL view. --- pcbnew/pcb_draw_panel_gal.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/pcbnew/pcb_draw_panel_gal.cpp b/pcbnew/pcb_draw_panel_gal.cpp index 1aed5a86bd..8d2e89f275 100644 --- a/pcbnew/pcb_draw_panel_gal.cpp +++ b/pcbnew/pcb_draw_panel_gal.cpp @@ -229,9 +229,6 @@ void PCB_DRAW_PANEL_GAL::SetWorksheet( KIGFX::WORKSHEET_VIEWITEM* aWorksheet ) m_worksheet = aWorksheet; m_view->Add( m_worksheet ); - - // Limit panning to the size of worksheet frame - m_viewControls->SetPanBoundary( aWorksheet->ViewBBox() ); } From 91e9df59d4683166e4637e7d971b9bc21830ef86 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 14 Jul 2014 11:36:34 +0200 Subject: [PATCH 688/741] Fixed layers order after changing the active layer. --- common/draw_panel_gal.cpp | 4 ++-- include/class_draw_panel_gal.h | 4 ++-- include/view/view.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common/draw_panel_gal.cpp b/common/draw_panel_gal.cpp index 4bf7835371..5d00f85654 100644 --- a/common/draw_panel_gal.cpp +++ b/common/draw_panel_gal.cpp @@ -243,7 +243,7 @@ void EDA_DRAW_PANEL_GAL::StopDrawing() } -void EDA_DRAW_PANEL_GAL::SetHighContrastLayer( LAYER_NUM aLayer ) +void EDA_DRAW_PANEL_GAL::SetHighContrastLayer( LAYER_ID aLayer ) { // Set display settings for high contrast mode KIGFX::RENDER_SETTINGS* rSettings = m_view->GetPainter()->GetSettings(); @@ -257,7 +257,7 @@ void EDA_DRAW_PANEL_GAL::SetHighContrastLayer( LAYER_NUM aLayer ) } -void EDA_DRAW_PANEL_GAL::SetTopLayer( LAYER_NUM aLayer ) +void EDA_DRAW_PANEL_GAL::SetTopLayer( LAYER_ID aLayer ) { m_view->ClearTopLayers(); m_view->SetTopLayer( aLayer ); diff --git a/include/class_draw_panel_gal.h b/include/class_draw_panel_gal.h index 6d9dae1bba..8795d94f29 100644 --- a/include/class_draw_panel_gal.h +++ b/include/class_draw_panel_gal.h @@ -136,13 +136,13 @@ public: * Function SetHighContrastLayer * Takes care of display settings for the given layer to be displayed in high contrast mode. */ - virtual void SetHighContrastLayer( LAYER_NUM aLayer ); + virtual void SetHighContrastLayer( LAYER_ID aLayer ); /** * Function SetTopLayer * Moves the selected layer to the top, so it is displayed above all others. */ - virtual void SetTopLayer( LAYER_NUM aLayer ); + virtual void SetTopLayer( LAYER_ID aLayer ); protected: void onPaint( wxPaintEvent& WXUNUSED( aEvent ) ); diff --git a/include/view/view.h b/include/view/view.h index 529f3c63ce..57e7a8bf3f 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -508,7 +508,7 @@ public: const BOX2I CalculateExtents() ; - static const int VIEW_MAX_LAYERS = 128; ///< maximum number of layers that may be shown + static const int VIEW_MAX_LAYERS = 256; ///< maximum number of layers that may be shown private: struct VIEW_LAYER From ef9b0678c65fae70b055ace522c0233d47f9413e Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 14 Jul 2014 15:14:37 +0200 Subject: [PATCH 689/741] Fixed Python scripting enabled builds. --- include/dlist.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/dlist.h b/include/dlist.h index 2acf80271c..d8fcd31b3b 100644 --- a/include/dlist.h +++ b/include/dlist.h @@ -143,6 +143,8 @@ class DLIST : public DHEAD { public: +// Without the following ifdef, SWIG appends methods from the templated class +#ifndef SWIG /** * operator T* * is a casting operator that returns \a GetFirst(), a T* @@ -154,6 +156,7 @@ public: * is a dereferencing operator that returns \a GetFirst(), a T* */ T* operator -> () const { return GetFirst(); } +#endif /* SWIG */ /** * Function GetFirst From 3aef4252ab1b17651993834553fd16bb5eabb244 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 14 Jul 2014 16:43:21 +0200 Subject: [PATCH 690/741] Refinement to commit #4993. --- include/dlist.h | 3 --- pcbnew/scripting/pcbnew.i | 5 +++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/dlist.h b/include/dlist.h index d8fcd31b3b..2acf80271c 100644 --- a/include/dlist.h +++ b/include/dlist.h @@ -143,8 +143,6 @@ class DLIST : public DHEAD { public: -// Without the following ifdef, SWIG appends methods from the templated class -#ifndef SWIG /** * operator T* * is a casting operator that returns \a GetFirst(), a T* @@ -156,7 +154,6 @@ public: * is a dereferencing operator that returns \a GetFirst(), a T* */ T* operator -> () const { return GetFirst(); } -#endif /* SWIG */ /** * Function GetFirst diff --git a/pcbnew/scripting/pcbnew.i b/pcbnew/scripting/pcbnew.i index 71687e4980..e893a55859 100644 --- a/pcbnew/scripting/pcbnew.i +++ b/pcbnew/scripting/pcbnew.i @@ -47,6 +47,11 @@ %rename(AddNative) *::Add; +// fix method names conflicts +%rename(AddChild) MODULE::Add; +%rename(RemoveChild) MODULE::Remove; +%rename(DeleteChild) MODULE::Delete; + %exception { try{ $action From c5e14ef1802f5bd21eac06f32a598b82ce8f4f57 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Mon, 14 Jul 2014 10:03:51 -0500 Subject: [PATCH 691/741] wxJoin version dependency change --- common/prependpath.cpp | 2 +- kicad/class_treeproject_item.h | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/common/prependpath.cpp b/common/prependpath.cpp index 6f68678642..a7c80f6c69 100644 --- a/common/prependpath.cpp +++ b/common/prependpath.cpp @@ -5,7 +5,7 @@ -#if !wxCHECK_VERSION( 3, 0, 0 ) +#if !wxCHECK_VERSION( 2, 9, 0 ) // implement missing wx2.8 function until >= wx3.0 pervades. static wxString wxJoin(const wxArrayString& arr, const wxChar sep, diff --git a/kicad/class_treeproject_item.h b/kicad/class_treeproject_item.h index 3793638cd6..a050330e9d 100644 --- a/kicad/class_treeproject_item.h +++ b/kicad/class_treeproject_item.h @@ -27,11 +27,7 @@ public: void SetType( TreeFileType aType ) { m_Type = aType; } const wxString& GetFileName() const { return m_file_name; } - void SetFileName( const wxString& name ) - { - m_file_name = name; - // DBG(printf("%s: '%s'\n", __func__, TO_UTF8( name ) );) - } + void SetFileName( const wxString& name ) { m_file_name = name; } bool IsRootFile() const { return m_IsRootFile; } void SetRootFile( bool aValue ) { m_IsRootFile = aValue; } From a82127277c51c5d3d3e4a5ddce7a5cc83b151b7d Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 14 Jul 2014 20:59:41 +0200 Subject: [PATCH 692/741] Gerbview: fix scaling error in x.6 file format. Minor cleaning code. Better separation between Pcbnew code and Gerber code. Update export to Pcb code (uses now the version 4 kicad_pcb file format). --- gerbview/CMakeLists.txt | 4 +- .../dialogs/dialog_select_one_pcb_layer.cpp | 183 ++++++------ gerbview/events_called_functions.cpp | 2 +- gerbview/export_to_pcbnew.cpp | 201 +++++++------ gerbview/files.cpp | 8 +- gerbview/gerbview_frame.cpp | 1 + gerbview/gerbview_frame.h | 4 +- .../{initpcb.cpp => init_gbr_drawlayers.cpp} | 6 +- gerbview/printout_control.cpp | 270 ++++++++++++++++++ gerbview/rs274_read_XY_and_IJ_coordinates.cpp | 6 +- gerbview/select_layers_to_pcb.cpp | 6 +- pcbnew/printout_controler.cpp | 33 +-- 12 files changed, 518 insertions(+), 206 deletions(-) rename gerbview/{initpcb.cpp => init_gbr_drawlayers.cpp} (95%) create mode 100644 gerbview/printout_control.cpp diff --git a/gerbview/CMakeLists.txt b/gerbview/CMakeLists.txt index 4ffae72958..a4c5c28ae5 100644 --- a/gerbview/CMakeLists.txt +++ b/gerbview/CMakeLists.txt @@ -50,12 +50,13 @@ set( GERBVIEW_SRCS gerbview_config.cpp gerbview_frame.cpp hotkeys.cpp - initpcb.cpp + init_gbr_drawlayers.cpp locate.cpp menubar.cpp onleftclick.cpp onrightclick.cpp pcbplot.cpp + printout_control.cpp readgerb.cpp rs274_read_XY_and_IJ_coordinates.cpp rs274d.cpp @@ -71,7 +72,6 @@ set( GERBVIEW_EXTRA_SRCS ../common/class_layer_box_selector.cpp ../common/class_page_info.cpp ../pcbnew/layer_widget.cpp - ../pcbnew/printout_controler.cpp ) if( MINGW ) diff --git a/gerbview/dialogs/dialog_select_one_pcb_layer.cpp b/gerbview/dialogs/dialog_select_one_pcb_layer.cpp index 00dcc9b657..7c3fd4b345 100644 --- a/gerbview/dialogs/dialog_select_one_pcb_layer.cpp +++ b/gerbview/dialogs/dialog_select_one_pcb_layer.cpp @@ -7,8 +7,12 @@ #include #include +#define NB_PCB_LAYERS LAYER_ID_COUNT +#define FIRST_COPPER_LAYER 0 +#define LAST_COPPER_LAYER 31 + // Exported function -const wxString GetPCBDefaultLayerName( int aLayerNumber ); +const wxString GetPCBDefaultLayerName( int aLayerId ); enum layer_sel_id { @@ -21,9 +25,8 @@ enum layer_sel_id { class SELECT_LAYER_DIALOG : public wxDialog { private: - GERBVIEW_FRAME* m_Parent; - wxRadioBox* m_LayerList; - int m_LayerId[int(GERBER_DRAWLAYERS_COUNT) + 1]; // One extra element for "(Deselect)" radiobutton + wxRadioBox* m_layerList; + std::vector m_layerId; public: // Constructor and destructor @@ -64,12 +67,11 @@ END_EVENT_TABLE() int GERBVIEW_FRAME::SelectPCBLayer( int aDefaultLayer, int aCopperLayerCount, bool aShowDeselectOption ) { - int layer; SELECT_LAYER_DIALOG* frame = new SELECT_LAYER_DIALOG( this, aDefaultLayer, aCopperLayerCount, aShowDeselectOption ); - layer = frame->ShowModal(); + int layer = frame->ShowModal(); frame->Destroy(); return layer; } @@ -88,85 +90,73 @@ SELECT_LAYER_DIALOG::SELECT_LAYER_DIALOG( GERBVIEW_FRAME* parent, wxSize( 470, 250 ), wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER ) { - #define NB_PCB_LAYERS 64 - #define FIRST_COPPER_LAYER 0 - #define LAST_COPPER_LAYER 31 - wxButton* Button; + wxButton* button; int ii; - wxString LayerList[NB_PCB_LAYERS + 1]; // One extra element for "(Deselect)" - // radiobutton - int LayerCount, LayerSelect = -1; - - m_Parent = parent; + wxArrayString layerList; + int layerSelect = -1; // Build the layer list; first build copper layers list - LayerCount = 0; + int layerCount = 0; for( ii = FIRST_COPPER_LAYER; ii <= LAST_COPPER_LAYER; ++ii ) { - m_LayerId[ii] = 0; - if( ii == FIRST_COPPER_LAYER || ii == LAST_COPPER_LAYER || ii < aCopperLayerCount-1 ) { - LayerList[LayerCount] = GetPCBDefaultLayerName( ii ); + layerList.Add( GetPCBDefaultLayerName( ii ) ); if( ii == aDefaultLayer ) - LayerSelect = LayerCount; + layerSelect = layerCount; - m_LayerId[LayerCount] = ii; - LayerCount++; + m_layerId.push_back( ii ); + layerCount++; } } // Build the layer list; build non copper layers list for( ; ii < NB_PCB_LAYERS; ++ii ) { - m_LayerId[ii] = 0; - - LayerList[LayerCount] = GetPCBDefaultLayerName( ii ); + layerList.Add( GetPCBDefaultLayerName( ii ) ); if( ii == aDefaultLayer ) - LayerSelect = LayerCount; + layerSelect = layerCount; - m_LayerId[LayerCount] = ii; - LayerCount++; + m_layerId.push_back( ii ); + layerCount++; } // When appropriate, also provide a "(Deselect)" radiobutton if( aShowDeselectOption ) { - LayerList[LayerCount] = _( "(Deselect)" ); + layerList.Add( _( "Do not export" ) ); - if( NB_PCB_LAYERS == aDefaultLayer ) - LayerSelect = LayerCount; + if( UNSELECTED_LAYER == aDefaultLayer ) + layerSelect = layerCount; - m_LayerId[LayerCount] = NB_PCB_LAYERS; - LayerCount++; + m_layerId.push_back( UNSELECTED_LAYER ); + layerCount++; } - m_LayerList = new wxRadioBox( this, ID_LAYER_SELECT, _( "Layer" ), + m_layerList = new wxRadioBox( this, ID_LAYER_SELECT, _( "Layer" ), wxPoint( -1, -1 ), wxSize( -1, -1 ), - LayerCount, LayerList, - (LayerCount < 8) ? LayerCount : 8, + layerList, + (layerCount < 8) ? layerCount : 8, wxRA_SPECIFY_ROWS ); - if( LayerSelect >= 0 ) - m_LayerList->SetSelection( LayerSelect ); + if( layerSelect >= 0 ) + m_layerList->SetSelection( layerSelect ); wxBoxSizer* FrameBoxSizer = new wxBoxSizer( wxHORIZONTAL ); SetSizer( FrameBoxSizer ); - FrameBoxSizer->Add( m_LayerList, 0, wxALIGN_TOP | wxALL, 5 ); + FrameBoxSizer->Add( m_layerList, 0, wxALIGN_TOP | wxALL, 5 ); wxBoxSizer* ButtonBoxSizer = new wxBoxSizer( wxVERTICAL ); FrameBoxSizer->Add( ButtonBoxSizer, 0, wxALIGN_BOTTOM | wxALL, 0 ); - Button = new wxButton( this, wxID_OK, _( "OK" ) ); - Button->SetDefault(); - ButtonBoxSizer->Add( Button, 0, wxGROW | wxALL, 5 ); + button = new wxButton( this, wxID_OK, _( "OK" ) ); + button->SetDefault(); + ButtonBoxSizer->Add( button, 0, wxGROW | wxALL, 5 ); - Button = new wxButton( this, wxID_CANCEL, _( "Cancel" ) ); - ButtonBoxSizer->Add( Button, 0, wxGROW | wxALL, 5 ); - - SetFocus(); + button = new wxButton( this, wxID_CANCEL, _( "Cancel" ) ); + ButtonBoxSizer->Add( button, 0, wxGROW | wxALL, 5 ); GetSizer()->SetSizeHints( this ); @@ -176,7 +166,7 @@ SELECT_LAYER_DIALOG::SELECT_LAYER_DIALOG( GERBVIEW_FRAME* parent, void SELECT_LAYER_DIALOG::OnLayerSelected( wxCommandEvent& event ) { - int ii = m_LayerId[m_LayerList->GetSelection()]; + int ii = m_layerId[m_layerList->GetSelection()]; EndModal( ii ); } @@ -187,43 +177,76 @@ void SELECT_LAYER_DIALOG::OnCancelClick( wxCommandEvent& event ) EndModal( -1 ); } -const wxString GetPCBDefaultLayerName( int aLayerNumber ) +// This function is a duplicate of +// const wxChar* LSET::Name( LAYER_ID aLayerId ) +// However it avoids a dependency to Pcbnew code. +const wxString GetPCBDefaultLayerName( int aLayerId ) { const wxChar* txt; - // Use a switch to explicitly show the mapping more clearly - switch( aLayerNumber ) + // using a switch to explicitly show the mapping more clearly + switch( aLayerId ) { - case F_Cu: txt = wxT( "F.Cu" ); break; - case In1_Cu: txt = wxT( "In1.Cu" ); break; - case In2_Cu: txt = wxT( "In2.Cu" ); break; - case In3_Cu: txt = wxT( "In3.Cu" ); break; - case In4_Cu: txt = wxT( "In4.Cu" ); break; - case In5_Cu: txt = wxT( "In5.Cu" ); break; - case In6_Cu: txt = wxT( "In6.Cu" ); break; - case In7_Cu: txt = wxT( "In7.Cu" ); break; - case In8_Cu: txt = wxT( "In8.Cu" ); break; - case In9_Cu: txt = wxT( "In9.Cu" ); break; - case In10_Cu: txt = wxT( "In10.Cu" ); break; - case In11_Cu: txt = wxT( "In11.Cu" ); break; - case In12_Cu: txt = wxT( "In12.Cu" ); break; - case In13_Cu: txt = wxT( "In13.Cu" ); break; - case In14_Cu: txt = wxT( "In14.Cu" ); break; - case B_Cu: txt = wxT( "B.Cu" ); break; - case B_Adhes: txt = wxT( "B.Adhes" ); break; - case F_Adhes: txt = wxT( "F.Adhes" ); break; - case B_Paste: txt = wxT( "B.Paste" ); break; - case F_Paste: txt = wxT( "F.Paste" ); break; - case B_SilkS: txt = wxT( "B.SilkS" ); break; - case F_SilkS: txt = wxT( "F.SilkS" ); break; - case B_Mask: txt = wxT( "B.Mask" ); break; - case F_Mask: txt = wxT( "F.Mask" ); break; - case Dwgs_User: txt = wxT( "Dwgs.User" ); break; - case Cmts_User: txt = wxT( "Cmts.User" ); break; - case Eco1_User: txt = wxT( "Eco1.User" ); break; - case Eco2_User: txt = wxT( "Eco2.User" ); break; - case Edge_Cuts: txt = wxT( "Edge.Cuts" ); break; - default: txt = wxT( "BAD_INDEX" ); break; + case F_Cu: txt = wxT( "F.Cu" ); break; + case In1_Cu: txt = wxT( "In1.Cu" ); break; + case In2_Cu: txt = wxT( "In2.Cu" ); break; + case In3_Cu: txt = wxT( "In3.Cu" ); break; + case In4_Cu: txt = wxT( "In4.Cu" ); break; + case In5_Cu: txt = wxT( "In5.Cu" ); break; + case In6_Cu: txt = wxT( "In6.Cu" ); break; + case In7_Cu: txt = wxT( "In7.Cu" ); break; + case In8_Cu: txt = wxT( "In8.Cu" ); break; + case In9_Cu: txt = wxT( "In9.Cu" ); break; + case In10_Cu: txt = wxT( "In10.Cu" ); break; + case In11_Cu: txt = wxT( "In11.Cu" ); break; + case In12_Cu: txt = wxT( "In12.Cu" ); break; + case In13_Cu: txt = wxT( "In13.Cu" ); break; + case In14_Cu: txt = wxT( "In14.Cu" ); break; + case In15_Cu: txt = wxT( "In15.Cu" ); break; + case In16_Cu: txt = wxT( "In16.Cu" ); break; + case In17_Cu: txt = wxT( "In17.Cu" ); break; + case In18_Cu: txt = wxT( "In18.Cu" ); break; + case In19_Cu: txt = wxT( "In19.Cu" ); break; + case In20_Cu: txt = wxT( "In20.Cu" ); break; + case In21_Cu: txt = wxT( "In21.Cu" ); break; + case In22_Cu: txt = wxT( "In22.Cu" ); break; + case In23_Cu: txt = wxT( "In23.Cu" ); break; + case In24_Cu: txt = wxT( "In24.Cu" ); break; + case In25_Cu: txt = wxT( "In25.Cu" ); break; + case In26_Cu: txt = wxT( "In26.Cu" ); break; + case In27_Cu: txt = wxT( "In27.Cu" ); break; + case In28_Cu: txt = wxT( "In28.Cu" ); break; + case In29_Cu: txt = wxT( "In29.Cu" ); break; + case In30_Cu: txt = wxT( "In30.Cu" ); break; + case B_Cu: txt = wxT( "B.Cu" ); break; + + // Technicals + case B_Adhes: txt = wxT( "B.Adhes" ); break; + case F_Adhes: txt = wxT( "F.Adhes" ); break; + case B_Paste: txt = wxT( "B.Paste" ); break; + case F_Paste: txt = wxT( "F.Paste" ); break; + case B_SilkS: txt = wxT( "B.SilkS" ); break; + case F_SilkS: txt = wxT( "F.SilkS" ); break; + case B_Mask: txt = wxT( "B.Mask" ); break; + case F_Mask: txt = wxT( "F.Mask" ); break; + + // Users + case Dwgs_User: txt = wxT( "Dwgs.User" ); break; + case Cmts_User: txt = wxT( "Cmts.User" ); break; + case Eco1_User: txt = wxT( "Eco1.User" ); break; + case Eco2_User: txt = wxT( "Eco2.User" ); break; + case Edge_Cuts: txt = wxT( "Edge.Cuts" ); break; + case Margin: txt = wxT( "Margin" ); break; + + // Footprint + case F_CrtYd: txt = wxT( "F.CrtYd" ); break; + case B_CrtYd: txt = wxT( "B.CrtYd" ); break; + case F_Fab: txt = wxT( "F.Fab" ); break; + case B_Fab: txt = wxT( "B.Fab" ); break; + + default: + wxASSERT_MSG( 0, wxT( "aLayerId out of range" ) ); + txt = wxT( "BAD INDEX!" ); break; } return wxString( txt ); diff --git a/gerbview/events_called_functions.cpp b/gerbview/events_called_functions.cpp index bfbff86459..c735424a4c 100644 --- a/gerbview/events_called_functions.cpp +++ b/gerbview/events_called_functions.cpp @@ -164,7 +164,7 @@ void GERBVIEW_FRAME::Process_Special_Functions( wxCommandEvent& event ) break; case ID_GERBVIEW_GLOBAL_DELETE: - Erase_Current_Layer( true ); + Erase_Current_DrawLayer( true ); ClearMsgPanel(); break; diff --git a/gerbview/export_to_pcbnew.cpp b/gerbview/export_to_pcbnew.cpp index f770256667..86347eb349 100644 --- a/gerbview/export_to_pcbnew.cpp +++ b/gerbview/export_to_pcbnew.cpp @@ -19,10 +19,12 @@ #include #include -#define TO_PCB_UNIT( x ) KiROUND( x / IU_PER_DECIMILS ) +// Imported function +extern const wxString GetPCBDefaultLayerName( LAYER_NUM aLayerNumber ); + +#define TO_PCB_UNIT( x ) ( x / IU_PER_MM) #define TRACK_TYPE 0 -#define VIA_TYPE 1 /* A helper class to export a Gerber set of files to Pcbnew */ @@ -44,7 +46,7 @@ public: * Function ExportPcb * saves a board from a set of Gerber images. */ - bool ExportPcb( LAYER_NUM* LayerLookUpTable, int aCopperLayers ); + bool ExportPcb( LAYER_NUM* aLayerLookUpTable, int aCopperLayers ); private: /** @@ -89,17 +91,25 @@ private: /** * function writePcbLineItem - * basic write function to write a DRAWSEGMENT item or a TRACK/VIA item - * to the board file + * basic write function to write a DRAWSEGMENT item or a TRACK item + * to the board file, from a non flashed item */ - void writePcbLineItem( int aShape, int aType, wxPoint& aStart, wxPoint& aEnd, - int aWidth, LAYER_NUM aLayer, int aDrill, int aAngle = 0 ); + void writePcbLineItem( bool aIsArc, wxPoint& aStart, wxPoint& aEnd, + int aWidth, LAYER_NUM aLayer, double aAngle = 0 ); + + /** + * function writeCopperLineItem + * basic write function to write a a TRACK item + * to the board file, from a non flashed item + */ + void writeCopperLineItem( wxPoint& aStart, wxPoint& aEnd, + int aWidth, LAYER_NUM aLayer ); /** * function writePcbHeader * Write a very basic header to the board file */ - void writePcbHeader(); + void writePcbHeader( LAYER_NUM* aLayerLookUpTable ); }; @@ -140,7 +150,7 @@ void GERBVIEW_FRAME::ExportDataInPcbnewFormat( wxCommandEvent& event ) wxString path = wxGetCwd();; wxFileDialog filedlg( this, _( "Board file name:" ), - path, fileName, LegacyPcbFileWildcard, + path, fileName, PcbFileWildcard, wxFD_SAVE ); if( filedlg.ShowModal() == wxID_CANCEL ) @@ -171,21 +181,23 @@ void GERBVIEW_FRAME::ExportDataInPcbnewFormat( wxCommandEvent& event ) } -bool GBR_TO_PCB_EXPORTER::ExportPcb( LAYER_NUM* LayerLookUpTable, int aCopperLayers ) +bool GBR_TO_PCB_EXPORTER::ExportPcb( LAYER_NUM* aLayerLookUpTable, int aCopperLayers ) { + LOCALE_IO toggle; // toggles on, then off, the C locale. + m_fp = wxFopen( m_pcb_file_name, wxT( "wt" ) ); if( m_fp == NULL ) { wxString msg; - msg.Printf( _( "Cannot create file <%s>" ), GetChars( m_pcb_file_name ) ); + msg.Printf( _( "Cannot create file '%s'" ), GetChars( m_pcb_file_name ) ); DisplayError( m_gerbview_frame, msg ); return false; } m_pcbCopperLayersCount = aCopperLayers; - writePcbHeader(); + writePcbHeader( aLayerLookUpTable ); // create an image of gerber data // First: non copper layers: @@ -195,7 +207,7 @@ bool GBR_TO_PCB_EXPORTER::ExportPcb( LAYER_NUM* LayerLookUpTable, int aCopperLay for( ; gerb_item; gerb_item = gerb_item->Next() ) { int layer = gerb_item->GetLayer(); - LAYER_NUM pcb_layer_number = LayerLookUpTable[layer]; + LAYER_NUM pcb_layer_number = aLayerLookUpTable[layer]; if( !IsPcbLayer( pcb_layer_number ) ) continue; @@ -205,13 +217,12 @@ bool GBR_TO_PCB_EXPORTER::ExportPcb( LAYER_NUM* LayerLookUpTable, int aCopperLay } // Copper layers - fprintf( m_fp, "$TRACK\n" ); gerb_item = m_gerbview_frame->GetItemsList(); for( ; gerb_item; gerb_item = gerb_item->Next() ) { int layer = gerb_item->GetLayer(); - LAYER_NUM pcb_layer_number = LayerLookUpTable[layer]; + LAYER_NUM pcb_layer_number = aLayerLookUpTable[layer]; if( pcb_layer_number < 0 || pcb_layer_number > pcbCopperLayerMax ) continue; @@ -220,8 +231,7 @@ bool GBR_TO_PCB_EXPORTER::ExportPcb( LAYER_NUM* LayerLookUpTable, int aCopperLay export_copper_item( gerb_item, pcb_layer_number ); } - fprintf( m_fp, "$EndTRACK\n" ); - fprintf( m_fp, "$EndBOARD\n" ); + fprintf( m_fp, ")\n" ); fclose( m_fp ); m_fp = NULL; @@ -231,16 +241,11 @@ bool GBR_TO_PCB_EXPORTER::ExportPcb( LAYER_NUM* LayerLookUpTable, int aCopperLay void GBR_TO_PCB_EXPORTER::export_non_copper_item( GERBER_DRAW_ITEM* aGbrItem, LAYER_NUM aLayer ) { - #define SEG_SHAPE 0 - #define ARC_SHAPE 2 - int shape = SEG_SHAPE; + bool isArc = false; - // please note: the old PCB format only has integer support for angles - int angle = 0; - wxPoint seg_start, seg_end; - - seg_start = aGbrItem->m_Start; - seg_end = aGbrItem->m_End; + double angle = 0; + wxPoint seg_start = aGbrItem->m_Start; + wxPoint seg_end = aGbrItem->m_End; if( aGbrItem->m_Shape == GBR_ARC ) { @@ -249,21 +254,19 @@ void GBR_TO_PCB_EXPORTER::export_non_copper_item( GERBER_DRAW_ITEM* aGbrItem, LA double b = atan2( (double) ( aGbrItem->m_End.y - aGbrItem->m_ArcCentre.y ), (double) ( aGbrItem->m_End.x - aGbrItem->m_ArcCentre.x ) ); - shape = ARC_SHAPE; - angle = KiROUND( RAD2DECIDEG(a - b) ); + isArc = true; + angle = RAD2DEG(b - a); seg_start = aGbrItem->m_ArcCentre; + // Ensure arc orientation is CCW if( angle < 0 ) - { - NEGATE( angle ); - seg_end = aGbrItem->m_Start; - } + angle += 360.0; } // Reverse Y axis: NEGATE( seg_start.y ); NEGATE( seg_end.y ); - writePcbLineItem( shape, 0, seg_start, seg_end, aGbrItem->m_Size.x, aLayer, -2, angle ); + writePcbLineItem( isArc, seg_start, seg_end, aGbrItem->m_Size.x, aLayer, angle ); } @@ -300,7 +303,20 @@ void GBR_TO_PCB_EXPORTER::export_segline_copper_item( GERBER_DRAW_ITEM* aGbrItem NEGATE( seg_start.y ); NEGATE( seg_end.y ); - writePcbLineItem( 0, TRACK_TYPE, seg_start, seg_end, aGbrItem->m_Size.x, aLayer, -1 ); + writeCopperLineItem( seg_start, seg_end, aGbrItem->m_Size.x, aLayer ); +} + + +void GBR_TO_PCB_EXPORTER::writeCopperLineItem( wxPoint& aStart, wxPoint& aEnd, + int aWidth, LAYER_NUM aLayer ) +{ + fprintf( m_fp, "(segment (start %s %s) (end %s %s) (width %s) (layer %s) (net 0))\n", + Double2Str( TO_PCB_UNIT(aStart.x) ).c_str(), + Double2Str( TO_PCB_UNIT(aStart.y) ).c_str(), + Double2Str( TO_PCB_UNIT(aEnd.x) ).c_str(), + Double2Str( TO_PCB_UNIT(aEnd.y) ).c_str(), + Double2Str( TO_PCB_UNIT( aWidth ) ).c_str(), + TO_UTF8( GetPCBDefaultLayerName( aLayer ) ) ); } @@ -316,7 +332,7 @@ void GBR_TO_PCB_EXPORTER::export_segarc_copper_item( GERBER_DRAW_ITEM* aGbrItem, /* Because Pcbnew does not know arcs in tracks, * approximate arc by segments (SEG_COUNT__CIRCLE segment per 360 deg) - * The arc is drawn in an anticlockwise direction from the start point to the end point. + * The arc is drawn anticlockwise from the start point to the end point. */ #define SEG_COUNT_CIRCLE 16 #define DELTA_ANGLE 2 * M_PI / SEG_COUNT_CIRCLE @@ -341,7 +357,7 @@ void GBR_TO_PCB_EXPORTER::export_segarc_copper_item( GERBER_DRAW_ITEM* aGbrItem, // Reverse Y axis: NEGATE( seg_start.y ); NEGATE( seg_end.y ); - writePcbLineItem( 0, TRACK_TYPE, seg_start, seg_end, aGbrItem->m_Size.x, aLayer, -1 ); + writeCopperLineItem( seg_start, seg_end, aGbrItem->m_Size.x, aLayer ); curr_start = curr_end; } @@ -352,7 +368,7 @@ void GBR_TO_PCB_EXPORTER::export_segarc_copper_item( GERBER_DRAW_ITEM* aGbrItem, // Reverse Y axis: NEGATE( seg_start.y ); NEGATE( seg_end.y ); - writePcbLineItem( 0, TRACK_TYPE, seg_start, seg_end, aGbrItem->m_Size.x, aLayer, -1 ); + writeCopperLineItem( seg_start, seg_end, aGbrItem->m_Size.x, aLayer ); } } @@ -373,59 +389,84 @@ void GBR_TO_PCB_EXPORTER::export_flashed_copper_item( GERBER_DRAW_ITEM* aGbrItem m_vias_coordinates.push_back( aGbrItem->m_Start ); - wxPoint via_pos; - int width; - - via_pos = aGbrItem->m_Start; - width = (aGbrItem->m_Size.x + aGbrItem->m_Size.y) / 2; + wxPoint via_pos = aGbrItem->m_Start; + int width = (aGbrItem->m_Size.x + aGbrItem->m_Size.y) / 2; // Reverse Y axis: NEGATE( via_pos.y ); - // Layers are 0 to 15 (Cu/Cmp) = 0x0F - #define IS_VIA 1 - #define SHAPE_VIA_THROUGH 3 - // XXX EVIL usage of LAYER - writePcbLineItem( SHAPE_VIA_THROUGH, IS_VIA, via_pos, via_pos, width, - 0x0F, -1 ); + + // Layers are Front to Back + fprintf( m_fp, " (via (at %s %s) (size %s)", + Double2Str( TO_PCB_UNIT(via_pos.x) ).c_str(), + Double2Str( TO_PCB_UNIT(via_pos.y) ).c_str(), + Double2Str( TO_PCB_UNIT( width ) ).c_str() ); + + fprintf( m_fp, " (layers %s %s))\n", + TO_UTF8( GetPCBDefaultLayerName( F_Cu ) ), + TO_UTF8( GetPCBDefaultLayerName( B_Cu ) ) ); } - -void GBR_TO_PCB_EXPORTER::writePcbHeader() +void GBR_TO_PCB_EXPORTER::writePcbHeader( LAYER_NUM* aLayerLookUpTable ) { - fprintf( m_fp, "PCBNEW-BOARD Version 1 date %s\n\n# Created by GerbView %s\n\n", - TO_UTF8( DateAndTime() ), TO_UTF8( GetBuildVersion() ) ); - fprintf( m_fp, "$GENERAL\n" ); - fprintf( m_fp, "encoding utf-8\n" ); - fprintf( m_fp, "Units deci-mils\n" ); + fprintf( m_fp, "(kicad_pcb (version 4) (host Gerbview \"%s\")\n\n", + TO_UTF8( GetBuildVersion() ) ); - // Write copper layer count - fprintf( m_fp, "LayerCount %d\n", m_pcbCopperLayersCount ); + // Write layers section + fprintf( m_fp, " (layers \n" ); - fprintf( m_fp, "$EndGENERAL\n\n" ); + for( int ii = 0; ii < m_pcbCopperLayersCount; ii++ ) + { + int id = ii; - // Creates void setup - fprintf( m_fp, "$SETUP\n" ); - fprintf( m_fp, "$EndSETUP\n\n" ); + if( ii == m_pcbCopperLayersCount-1) + id = B_Cu; + + fprintf( m_fp, " (%d %s signal)\n", id, TO_UTF8( GetPCBDefaultLayerName( id ) ) ); + } + + for( int ii = B_Adhes; ii < LAYER_ID_COUNT; ii++ ) + { + fprintf( m_fp, " (%d %s user)\n", ii, TO_UTF8( GetPCBDefaultLayerName( ii ) ) ); + } + + fprintf( m_fp, " )\n\n" ); } -void GBR_TO_PCB_EXPORTER::writePcbLineItem( int aShape, int aType, wxPoint& aStart, wxPoint& aEnd, - int aWidth, LAYER_NUM aLayer, int aDrill, int aAngle ) +void GBR_TO_PCB_EXPORTER::writePcbLineItem( bool aIsArc, wxPoint& aStart, wxPoint& aEnd, + int aWidth, LAYER_NUM aLayer, double aAngle ) { - if( aDrill <= -2 ) - fprintf( m_fp, "$DRAWSEGMENT\n" ); - - fprintf( m_fp, "Po %d %d %d %d %d %d\n", aShape, - TO_PCB_UNIT( aStart.x ), TO_PCB_UNIT( aStart.y ), - TO_PCB_UNIT( aEnd.x ), TO_PCB_UNIT( aEnd.y ), - TO_PCB_UNIT( aWidth ) ); - fprintf( m_fp, "De %d %d %d %lX %X", - aLayer, aType, aAngle, 0l, 0 ); - - if( aDrill > -2 ) - fprintf( m_fp, " %d", aDrill ); - - fprintf( m_fp, "\n" ); - - if( aDrill <= -2 ) - fprintf( m_fp, "$EndDRAWSEGMENT\n" ); + if( aIsArc && ( aAngle == 360.0 || aAngle == 0 ) ) + { + fprintf( m_fp, "(gr_circle (center %s %s) (end %s %s)(layer %s) (width %s))\n", + Double2Str( TO_PCB_UNIT(aStart.x) ).c_str(), + Double2Str( TO_PCB_UNIT(aStart.y) ).c_str(), + Double2Str( TO_PCB_UNIT(aEnd.x) ).c_str(), + Double2Str( TO_PCB_UNIT(aEnd.y) ).c_str(), + TO_UTF8( GetPCBDefaultLayerName( aLayer ) ), + Double2Str( TO_PCB_UNIT( aWidth ) ).c_str() + ); + } + else if( aIsArc ) + { + fprintf( m_fp, "(gr_arc (start %s %s) (end %s %s) (angle %s)(layer %s) (width %s))\n", + Double2Str( TO_PCB_UNIT(aStart.x) ).c_str(), + Double2Str( TO_PCB_UNIT(aStart.y) ).c_str(), + Double2Str( TO_PCB_UNIT(aEnd.x) ).c_str(), + Double2Str( TO_PCB_UNIT(aEnd.y) ).c_str(), + Double2Str( aAngle ).c_str(), + TO_UTF8( GetPCBDefaultLayerName( aLayer ) ), + Double2Str( TO_PCB_UNIT( aWidth ) ).c_str() + ); + } + else + { + fprintf( m_fp, "(gr_line (start %s %s) (end %s %s)(layer %s) (width %s))\n", + Double2Str( TO_PCB_UNIT(aStart.x) ).c_str(), + Double2Str( TO_PCB_UNIT(aStart.y) ).c_str(), + Double2Str( TO_PCB_UNIT(aEnd.x) ).c_str(), + Double2Str( TO_PCB_UNIT(aEnd.y) ).c_str(), + TO_UTF8( GetPCBDefaultLayerName( aLayer ) ), + Double2Str( TO_PCB_UNIT( aWidth ) ).c_str() + ); + } } diff --git a/gerbview/files.cpp b/gerbview/files.cpp index 7daa9d9b80..5b5aaf7bb1 100644 --- a/gerbview/files.cpp +++ b/gerbview/files.cpp @@ -47,7 +47,7 @@ void GERBVIEW_FRAME::OnGbrFileHistory( wxCommandEvent& event ) if( !fn.IsEmpty() ) { - Erase_Current_Layer( false ); + Erase_Current_DrawLayer( false ); LoadGerberFiles( fn ); } } @@ -61,7 +61,7 @@ void GERBVIEW_FRAME::OnDrlFileHistory( wxCommandEvent& event ) if( !fn.IsEmpty() ) { - Erase_Current_Layer( false ); + Erase_Current_DrawLayer( false ); LoadExcellonFiles( fn ); } } @@ -75,12 +75,12 @@ void GERBVIEW_FRAME::Files_io( wxCommandEvent& event ) switch( id ) { case wxID_FILE: - Erase_Current_Layer( false ); + Erase_Current_DrawLayer( false ); LoadGerberFiles( wxEmptyString ); break; case ID_GERBVIEW_ERASE_ALL: - Clear_Pcb( true ); + Clear_DrawLayers( true ); Zoom_Automatique( false ); m_canvas->Refresh(); ClearMsgPanel(); diff --git a/gerbview/gerbview_frame.cpp b/gerbview/gerbview_frame.cpp index ccb7cbf431..d4163f7dfe 100644 --- a/gerbview/gerbview_frame.cpp +++ b/gerbview/gerbview_frame.cpp @@ -138,6 +138,7 @@ GERBVIEW_FRAME::GERBVIEW_FRAME( KIWAY* aKiway, wxWindow* aParent ): lyrs.MinSize( m_LayersManager->GetBestSize() ); lyrs.BestSize( m_LayersManager->GetBestSize() ); lyrs.Caption( _( "Visibles" ) ); + lyrs.TopDockable( false ).BottomDockable( false ); if( m_mainToolBar ) diff --git a/gerbview/gerbview_frame.h b/gerbview/gerbview_frame.h index fc35c3d4a5..20d549dd59 100644 --- a/gerbview/gerbview_frame.h +++ b/gerbview/gerbview_frame.h @@ -630,8 +630,8 @@ public: void Liste_D_Codes(); // PCB handling - bool Clear_Pcb( bool query ); - void Erase_Current_Layer( bool query ); + bool Clear_DrawLayers( bool query ); + void Erase_Current_DrawLayer( bool query ); // Conversion function void ExportDataInPcbnewFormat( wxCommandEvent& event ); diff --git a/gerbview/initpcb.cpp b/gerbview/init_gbr_drawlayers.cpp similarity index 95% rename from gerbview/initpcb.cpp rename to gerbview/init_gbr_drawlayers.cpp index f428dd9a54..3f7c6a8145 100644 --- a/gerbview/initpcb.cpp +++ b/gerbview/init_gbr_drawlayers.cpp @@ -23,7 +23,7 @@ */ /** - * @file gerbview/initpcb.cpp + * @file init_gbr_drawlayers.cpp */ #include @@ -38,7 +38,7 @@ #include #include -bool GERBVIEW_FRAME::Clear_Pcb( bool query ) +bool GERBVIEW_FRAME::Clear_DrawLayers( bool query ) { int layer; @@ -73,7 +73,7 @@ bool GERBVIEW_FRAME::Clear_Pcb( bool query ) } -void GERBVIEW_FRAME::Erase_Current_Layer( bool query ) +void GERBVIEW_FRAME::Erase_Current_DrawLayer( bool query ) { int layer = getActiveLayer(); wxString msg; diff --git a/gerbview/printout_control.cpp b/gerbview/printout_control.cpp new file mode 100644 index 0000000000..1ae5d969da --- /dev/null +++ b/gerbview/printout_control.cpp @@ -0,0 +1,270 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 Jean-Pierre Charras, jp.charras at wanadoo.fr + * Copyright (C) 1992-2014 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 + */ + +/** + * @file printout_controller.cpp + * @brief Board print handler implementation file. + */ + + +// Set this to 1 if you want to test PostScript printing under MSW. +#define wxTEST_POSTSCRIPT_IN_MSW 1 + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + + + +PRINT_PARAMETERS::PRINT_PARAMETERS() +{ + m_PenDefaultSize = Millimeter2iu( 0.2 ); // A reasonable default value to draw items + // which do not have a specified line width + m_PrintScale = 1.0; + m_XScaleAdjust = 1.0; + m_YScaleAdjust = 1.0; + m_Print_Sheet_Ref = false; + m_PrintMaskLayer.set(); + m_PrintMirror = false; + m_Print_Black_and_White = true; + m_OptionPrintPage = 1; + m_PageCount = 1; + m_ForceCentered = false; + m_Flags = 0; + m_DrillShapeOpt = PRINT_PARAMETERS::SMALL_DRILL_SHAPE; + m_PageSetupData = NULL; +} + + +BOARD_PRINTOUT_CONTROLLER::BOARD_PRINTOUT_CONTROLLER( const PRINT_PARAMETERS& aParams, + EDA_DRAW_FRAME* aParent, + const wxString& aTitle ) : + wxPrintout( aTitle ) +{ + m_PrintParams = aParams; // Make a local copy of the print parameters. + m_Parent = aParent; +} + + +bool BOARD_PRINTOUT_CONTROLLER::OnPrintPage( int aPage ) +{ + // in gerbview, draw layers are always printed on separate pages + // because handling negative objects when using only one page is tricky + m_PrintParams.m_Flags = aPage-1; // = gerber draw layer id + DrawPage(); + + return true; +} + + +void BOARD_PRINTOUT_CONTROLLER::GetPageInfo( int* minPage, int* maxPage, + int* selPageFrom, int* selPageTo ) +{ + *minPage = 1; + *selPageFrom = 1; + + int icnt = 1; + + if( m_PrintParams.m_OptionPrintPage == 0 ) + icnt = m_PrintParams.m_PageCount; + + *maxPage = icnt; + *selPageTo = icnt; +} + + +void BOARD_PRINTOUT_CONTROLLER::DrawPage() +{ + wxPoint offset; + double userscale; + EDA_RECT boardBoundingBox; + EDA_RECT drawRect; + wxDC* dc = GetDC(); + BASE_SCREEN* screen = m_Parent->GetScreen(); + bool printMirror = m_PrintParams.m_PrintMirror; + wxSize pageSizeIU = m_Parent->GetPageSizeIU(); + + wxBusyCursor dummy; + + boardBoundingBox = ((GERBVIEW_FRAME*) m_Parent)->GetGerberLayoutBoundingBox(); + wxString titleblockFilename; // TODO see if we uses the gerber file name + + // Use the page size as the drawing area when the board is shown or the user scale + // is less than 1. + if( m_PrintParams.PrintBorderAndTitleBlock() ) + boardBoundingBox = EDA_RECT( wxPoint( 0, 0 ), pageSizeIU ); + + // Compute the PCB size in internal units + userscale = m_PrintParams.m_PrintScale; + + if( m_PrintParams.m_PrintScale == 0 ) // fit in page option + { + if(boardBoundingBox.GetWidth() && boardBoundingBox.GetHeight()) + { + int margin = Millimeter2iu( 10.0 ); // add a margin around the drawings + double scaleX = (double)(pageSizeIU.x - (2 * margin)) / + boardBoundingBox.GetWidth(); + double scaleY = (double)(pageSizeIU.y - (2 * margin)) / + boardBoundingBox.GetHeight(); + userscale = (scaleX < scaleY) ? scaleX : scaleY; + } + else + userscale = 1.0; + } + + wxSize scaledPageSize = pageSizeIU; + drawRect.SetSize( scaledPageSize ); + scaledPageSize.x = wxRound( scaledPageSize.x / userscale ); + scaledPageSize.y = wxRound( scaledPageSize.y / userscale ); + + + if( m_PrintParams.m_PageSetupData ) + { + // Always scale to the size of the paper. + FitThisSizeToPageMargins( scaledPageSize, *m_PrintParams.m_PageSetupData ); + } + + // Compute Accurate scale 1 + if( m_PrintParams.m_PrintScale == 1.0 ) + { + // We want a 1:1 scale, regardless the page setup + // like page size, margin ... + MapScreenSizeToPaper(); // set best scale and offset (scale is not used) + int w, h; + GetPPIPrinter( &w, &h ); + double accurate_Xscale = (double) w / (IU_PER_MILS*1000); + double accurate_Yscale = (double) h / (IU_PER_MILS*1000); + + if( IsPreview() ) // Scale must take in account the DC size in Preview + { + // Get the size of the DC in pixels + wxSize PlotAreaSize; + dc->GetSize( &PlotAreaSize.x, &PlotAreaSize.y ); + GetPageSizePixels( &w, &h ); + accurate_Xscale *= (double)PlotAreaSize.x / w; + accurate_Yscale *= (double)PlotAreaSize.y / h; + } + // Fine scale adjust + accurate_Xscale *= m_PrintParams.m_XScaleAdjust; + accurate_Yscale *= m_PrintParams.m_YScaleAdjust; + + // Set print scale for 1:1 exact scale + dc->SetUserScale( accurate_Xscale, accurate_Yscale ); + } + + // Get the final size of the DC in pixels + wxSize PlotAreaSizeInPixels; + dc->GetSize( &PlotAreaSizeInPixels.x, &PlotAreaSizeInPixels.y ); + + double scalex, scaley; + dc->GetUserScale( &scalex, &scaley ); + + wxSize PlotAreaSizeInUserUnits; + PlotAreaSizeInUserUnits.x = KiROUND( PlotAreaSizeInPixels.x / scalex ); + PlotAreaSizeInUserUnits.y = KiROUND( PlotAreaSizeInPixels.y / scaley ); + + // In some cases the plot origin is the centre of the board outline rather than the center + // of the selected paper size. + if( m_PrintParams.CenterOnBoardOutline() ) + { + // Here we are only drawing the board and it's contents. + drawRect = boardBoundingBox; + offset.x += wxRound( (double) -scaledPageSize.x / 2.0 ); + offset.y += wxRound( (double) -scaledPageSize.y / 2.0 ); + + wxPoint center = boardBoundingBox.Centre(); + + if( printMirror ) + { + // Calculate the mirrored center of the board. + center.x = m_Parent->GetPageSizeIU().x - boardBoundingBox.Centre().x; + } + + offset += center; + } + + GRResetPenAndBrush( dc ); + + EDA_DRAW_PANEL* panel = m_Parent->GetCanvas(); + EDA_RECT tmp = *panel->GetClipBox(); + + // Set clip box to the max size + #define MAX_VALUE (INT_MAX/2) // MAX_VALUE is the max we can use in an integer + // and that allows calculations without overflow + panel->SetClipBox( EDA_RECT( wxPoint( 0, 0 ), wxSize( MAX_VALUE, MAX_VALUE ) ) ); + + screen->m_IsPrinting = true; + EDA_COLOR_T bg_color = m_Parent->GetDrawBgColor(); + + // Print frame reference, if requested, before printing draw layers + if( m_PrintParams.m_Print_Black_and_White ) + GRForceBlackPen( true ); + + if( m_PrintParams.PrintBorderAndTitleBlock() ) + m_Parent->DrawWorkSheet( dc, screen, m_PrintParams.m_PenDefaultSize, + IU_PER_MILS, titleblockFilename ); + + if( printMirror ) + { + // To plot mirror, we reverse the x axis, and modify the plot x origin + dc->SetAxisOrientation( false, false); + + /* Plot offset x is moved by the x plot area size in order to have + * the old draw area in the new draw area, because the draw origin has not moved + * (this is the upper left corner) but the X axis is reversed, therefore the plotting area + * is the x coordinate values from - PlotAreaSize.x to 0 */ + int x_dc_offset = PlotAreaSizeInPixels.x; + x_dc_offset = KiROUND( x_dc_offset * userscale ); + dc->SetDeviceOrigin( x_dc_offset, 0 ); + + panel->SetClipBox( EDA_RECT( wxPoint( -MAX_VALUE/2, -MAX_VALUE/2 ), + panel->GetClipBox()->GetSize() ) ); + } + + // screen->m_DrawOrg = offset; + dc->SetLogicalOrigin( offset.x, offset.y ); + m_Parent->SetDrawBgColor( WHITE ); + + // Never force black pen to print draw layers + // because negative objects need a white pen, not a black pen + // B&W mode is handled in print page function + GRForceBlackPen( false ); + + m_Parent->PrintPage( dc, m_PrintParams.m_PrintMaskLayer, printMirror, + &m_PrintParams ); + + m_Parent->SetDrawBgColor( bg_color ); + screen->m_IsPrinting = false; + panel->SetClipBox( tmp ); +} diff --git a/gerbview/rs274_read_XY_and_IJ_coordinates.cpp b/gerbview/rs274_read_XY_and_IJ_coordinates.cpp index d2b53fd86f..260b16c483 100644 --- a/gerbview/rs274_read_XY_and_IJ_coordinates.cpp +++ b/gerbview/rs274_read_XY_and_IJ_coordinates.cpp @@ -19,7 +19,7 @@ // depending on the gerber file format // this scale list assumes gerber units are imperial. // for metric gerber units, the imperial to metric conversion is made in read functions -#define SCALE_LIST_SIZE 10 +#define SCALE_LIST_SIZE 9 static double scale_list[SCALE_LIST_SIZE] = { 1000.0 * IU_PER_MILS, // x.1 format (certainly useless) @@ -28,9 +28,9 @@ static double scale_list[SCALE_LIST_SIZE] = 1.0 * IU_PER_MILS, // x.4 format 0.1 * IU_PER_MILS, // x.5 format 0.01 * IU_PER_MILS, // x.6 format - 0.0001 * IU_PER_MILS, // x.7 format + 0.001 * IU_PER_MILS, // x.7 format (currently the max allowed precision) + 0.0001 * IU_PER_MILS, // provided, but not used 0.00001 * IU_PER_MILS, // provided, but not used - 0.000001 * IU_PER_MILS }; /* diff --git a/gerbview/select_layers_to_pcb.cpp b/gerbview/select_layers_to_pcb.cpp index 03e48aa3c9..40c9f4e018 100644 --- a/gerbview/select_layers_to_pcb.cpp +++ b/gerbview/select_layers_to_pcb.cpp @@ -359,17 +359,19 @@ void LAYERS_MAP_DIALOG::OnSelectLayer( wxCommandEvent& event ) } LAYER_NUM jj = m_layersLookUpTable[m_buttonTable[ii]]; - if( !IsValidLayer( jj ) ) + + if( jj != UNSELECTED_LAYER && !IsValidLayer( jj ) ) jj = B_Cu; // (Defaults to "Copper" layer.) jj = m_Parent->SelectPCBLayer( jj, m_exportBoardCopperLayersCount, true ); - if( !IsValidLayer( jj ) ) + if( jj != UNSELECTED_LAYER && !IsValidLayer( jj ) ) return; if( jj != m_layersLookUpTable[m_buttonTable[ii]] ) { m_layersLookUpTable[m_buttonTable[ii]] = jj; + if( jj == UNSELECTED_LAYER ) { m_layersList[ii]->SetLabel( _( "Do not export" ) ); diff --git a/pcbnew/printout_controler.cpp b/pcbnew/printout_controler.cpp index 3b982fe2bf..f9b78102a3 100644 --- a/pcbnew/printout_controler.cpp +++ b/pcbnew/printout_controler.cpp @@ -37,16 +37,10 @@ #include #include #include -#ifdef PCBNEW - #include - #include - #include -#else - #include - #include - #include - #include -#endif +#include +#include +#include + #include @@ -89,7 +83,6 @@ BOARD_PRINTOUT_CONTROLLER::BOARD_PRINTOUT_CONTROLLER( const PRINT_PARAMETERS& aP bool BOARD_PRINTOUT_CONTROLLER::OnPrintPage( int aPage ) { -#ifdef PCBNEW LSET lset = m_PrintParams.m_PrintMaskLayer; // compute layer mask from page number if we want one page per layer @@ -115,11 +108,6 @@ bool BOARD_PRINTOUT_CONTROLLER::OnPrintPage( int aPage ) DrawPage(); m_PrintParams.m_PrintMaskLayer = lset; -#else // GERBVIEW - // in gerbview, draw layers are printed on separate pages - m_PrintParams.m_Flags = aPage-1; // = gerber draw layer id - DrawPage(); -#endif return true; } @@ -154,16 +142,9 @@ void BOARD_PRINTOUT_CONTROLLER::DrawPage() wxBusyCursor dummy; -#if defined (PCBNEW) BOARD * brd = ((PCB_BASE_FRAME*) m_Parent)->GetBoard(); boardBoundingBox = brd->ComputeBoundingBox(); wxString titleblockFilename = brd->GetFileName(); -#elif defined (GERBVIEW) - boardBoundingBox = ((GERBVIEW_FRAME*) m_Parent)->GetGerberLayoutBoundingBox(); - wxString titleblockFilename; // TODO see if we uses the gerber file name -#else - #error BOARD_PRINTOUT_CONTROLLER::DrawPage() works only for PCBNEW or GERBVIEW -#endif // Use the page size as the drawing area when the board is shown or the user scale // is less than 1. @@ -362,12 +343,6 @@ void BOARD_PRINTOUT_CONTROLLER::DrawPage() GRForceBlackPen( true ); -#if defined (GERBVIEW) - // In B&W mode, do not force black pen for Gerbview - // because negative objects need a white pen, not a black pen - // B&W mode is handled in print page - GRForceBlackPen( false ); -#endif m_Parent->PrintPage( dc, m_PrintParams.m_PrintMaskLayer, printMirror, &m_PrintParams ); From 8d9158786354eb6e21346ab646d48db3a32bccea Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 15 Jul 2014 10:57:51 +0200 Subject: [PATCH 693/741] PNS settings dialog size corrected. --- pcbnew/dialogs/dialog_pns_settings_base.cpp | 7 +++--- pcbnew/dialogs/dialog_pns_settings_base.fbp | 24 ++++++++++----------- pcbnew/dialogs/dialog_pns_settings_base.h | 4 ++-- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/pcbnew/dialogs/dialog_pns_settings_base.cpp b/pcbnew/dialogs/dialog_pns_settings_base.cpp index fb1214e740..e74590e0d9 100644 --- a/pcbnew/dialogs/dialog_pns_settings_base.cpp +++ b/pcbnew/dialogs/dialog_pns_settings_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Nov 6 2013) +// C++ code generated with wxFormBuilder (version Jun 6 2014) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -11,7 +11,7 @@ DIALOG_PNS_SETTINGS_BASE::DIALOG_PNS_SETTINGS_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) { - this->SetSizeHints( wxSize( 280,380 ), wxDefaultSize ); + this->SetSizeHints( wxSize( 280,480 ), wxDefaultSize ); wxBoxSizer* bMainSizer; bMainSizer = new wxBoxSizer( wxVERTICAL ); @@ -101,11 +101,12 @@ DIALOG_PNS_SETTINGS_BASE::DIALOG_PNS_SETTINGS_BASE( wxWindow* parent, wxWindowID m_stdButtons->AddButton( m_stdButtonsCancel ); m_stdButtons->Realize(); - bMainSizer->Add( m_stdButtons, 0, wxEXPAND|wxALL, 5 ); + bMainSizer->Add( m_stdButtons, 0, wxALL|wxEXPAND, 5 ); this->SetSizer( bMainSizer ); this->Layout(); + bMainSizer->Fit( this ); // Connect Events this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PNS_SETTINGS_BASE::OnClose ) ); diff --git a/pcbnew/dialogs/dialog_pns_settings_base.fbp b/pcbnew/dialogs/dialog_pns_settings_base.fbp index 7350038cd1..c109fdd667 100644 --- a/pcbnew/dialogs/dialog_pns_settings_base.fbp +++ b/pcbnew/dialogs/dialog_pns_settings_base.fbp @@ -1,6 +1,6 @@ - + C++ @@ -41,11 +41,11 @@ 0 wxID_ANY - 280,380 + 280,480 DIALOG_PNS_SETTINGS_BASE - 298,410 - wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER + -1,-1 + wxDEFAULT_DIALOG_STYLE DIALOG_SHIM; dialog_shim.h Interactive Router settings @@ -88,16 +88,16 @@ - + bMainSizer wxVERTICAL none - + 5 wxALL|wxEXPAND 0 - + 1 1 1 @@ -183,11 +183,11 @@ - + 5 wxEXPAND|wxALL 1 - + wxID_ANY Options @@ -1223,11 +1223,11 @@ - + 5 - wxEXPAND|wxALL + wxALL|wxEXPAND 0 - + 0 1 0 diff --git a/pcbnew/dialogs/dialog_pns_settings_base.h b/pcbnew/dialogs/dialog_pns_settings_base.h index 22f07b2bb4..67c1df9aa8 100644 --- a/pcbnew/dialogs/dialog_pns_settings_base.h +++ b/pcbnew/dialogs/dialog_pns_settings_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Nov 6 2013) +// C++ code generated with wxFormBuilder (version Jun 6 2014) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -63,7 +63,7 @@ class DIALOG_PNS_SETTINGS_BASE : public DIALOG_SHIM public: - DIALOG_PNS_SETTINGS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Interactive Router settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 298,410 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + DIALOG_PNS_SETTINGS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Interactive Router settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE ); ~DIALOG_PNS_SETTINGS_BASE(); }; From a1e08ae568fe0e2be413e7a9e0fe5b5f74b4f30a Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 15 Jul 2014 11:41:55 +0200 Subject: [PATCH 694/741] Drawing tools reset its state on layer change. --- pcbnew/tools/drawing_tool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index e1e15322fa..f7730efe58 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -932,7 +932,7 @@ bool DRAWING_TOOL::drawSegment( int aShape, DRAWSEGMENT*& aGraphic, updatePreview = true; } - if( evt->IsCancel() || evt->IsActivate() ) + if( evt->IsCancel() || evt->IsActivate() || evt->IsAction( &COMMON_ACTIONS::layerChanged ) ) { preview.Clear(); updatePreview = true; From 568fc74a3c60e8aecb71370f2ea6c5b0bdf05bbc Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 15 Jul 2014 11:50:00 +0200 Subject: [PATCH 695/741] Clicking on the Selection Tool toolbar button deactivates the current tool (GAL). --- pcbnew/tools/common_actions.cpp | 7 +++++++ pcbnew/tools/common_actions.h | 1 + 2 files changed, 8 insertions(+) diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 0ce1c0f806..9e1fa03ba4 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -313,6 +313,10 @@ TOOL_ACTION COMMON_ACTIONS::moduleTextOutlines( "pcbnew.ModuleEditor.textOutline // Miscellaneous +TOOL_ACTION COMMON_ACTIONS::selectionTool( "pcbnew.Control.selectionTool", + AS_GLOBAL, ' ', + "", "", AF_ACTIVATE ); + TOOL_ACTION COMMON_ACTIONS::resetCoords( "pcbnew.Control.resetCoords", AS_GLOBAL, ' ', "", "" ); @@ -470,6 +474,9 @@ boost::optional COMMON_ACTIONS::TranslateLegacyId( int aId ) case ID_TB_OPTIONS_SELECT_CURSOR: return COMMON_ACTIONS::switchCursor.MakeEvent(); + case ID_NO_TOOL_SELECTED: + return COMMON_ACTIONS::selectionTool.MakeEvent(); + case ID_PCB_DELETE_ITEM_BUTT: case ID_PCB_HIGHLIGHT_BUTT: case ID_PCB_SHOW_1_RATSNEST_BUTT: diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index 4712b42525..ca06829aa1 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -201,6 +201,7 @@ public: static TOOL_ACTION moduleTextOutlines; // Miscellaneous + static TOOL_ACTION selectionTool; static TOOL_ACTION resetCoords; static TOOL_ACTION switchCursor; static TOOL_ACTION switchUnits; From 2c5b79456ebd7a2014750b8552b875048d5c6513 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 15 Jul 2014 16:02:08 +0200 Subject: [PATCH 696/741] Fixed crash in pad properties dialog with wxWidgets 2.8. --- pcbnew/dialogs/dialog_pad_properties.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/pcbnew/dialogs/dialog_pad_properties.cpp b/pcbnew/dialogs/dialog_pad_properties.cpp index de92b283a4..089ae54bf3 100644 --- a/pcbnew/dialogs/dialog_pad_properties.cpp +++ b/pcbnew/dialogs/dialog_pad_properties.cpp @@ -130,6 +130,7 @@ private: bool transferDataToPad( D_PAD* aPad ); // event handlers: + void OnResize( wxSizeEvent& event ); void OnPadShapeSelection( wxCommandEvent& event ); void OnDrillShapeSelected( wxCommandEvent& event ); @@ -180,10 +181,15 @@ DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, D_PAD* aP { m_panelShowPadGal->UseColorScheme( m_board->GetColorsSettings() ); m_panelShowPadGal->SwitchBackend( m_parent->GetGalCanvas()->GetBackend() ); - m_panelShowPad->Hide(); +#if !wxCHECK_VERSION( 3, 0, 0 ) + m_panelShowPadGal->SetSize( m_panelShowPad->GetSize() ); +#endif m_panelShowPadGal->Show(); + m_panelShowPad->Hide(); m_panelShowPadGal->GetView()->Add( m_dummyPad ); m_panelShowPadGal->StartDrawing(); + + Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_PAD_PROPERTIES::OnResize ) ); } else { @@ -516,6 +522,13 @@ void DIALOG_PAD_PROPERTIES::initValues() } +void DIALOG_PAD_PROPERTIES::OnResize( wxSizeEvent& event ) +{ + redraw(); + event.Skip(); +} + + void DIALOG_PAD_PROPERTIES::OnPadShapeSelection( wxCommandEvent& event ) { switch( m_PadShape->GetSelection() ) From f24075bbf54da27c08d3ca3761bfc68087b49ecb Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 15 Jul 2014 16:33:46 +0200 Subject: [PATCH 697/741] Fixed offset of dragged items when the moving tool is invoked by the hotkey (GAL). --- pcbnew/tools/edit_tool.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index f174753c6d..664f59a499 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -176,11 +176,16 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) } else { - const VECTOR2D& dragOrigin = getView()->GetGAL()->GetGridPoint( evt->DragOrigin() ); + VECTOR2D origin; + + if( evt->IsDrag( BUT_LEFT ) ) + origin = getView()->GetGAL()->GetGridPoint( evt->DragOrigin() ); + else + origin = getViewControls()->GetCursorPosition(); // Update dragging offset (distance between cursor and the first dragged item) m_offset = static_cast( selection.items.GetPickedItem( 0 ) )->GetPosition() - - wxPoint( dragOrigin.x, dragOrigin.y ); + wxPoint( origin.x, origin.y ); } m_dragging = true; From 0adb6fa9431939aedadf7f37e35f2f1ee1cea217 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 15 Jul 2014 17:33:19 +0200 Subject: [PATCH 698/741] Module editor does not ask for permission to modify a locked module. --- pcbnew/tools/selection_tool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 13151cdf65..4c6ad9eff5 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -391,7 +391,7 @@ void SELECTION_TOOL::setTransitions() bool SELECTION_TOOL::CheckLock() { - if( !m_locked ) + if( !m_locked || m_editModules ) return false; bool containsLocked = false; From a525c890fbba25f1c6f2fd4ebd86041d59a0db44 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 15 Jul 2014 17:34:53 +0200 Subject: [PATCH 699/741] Alternative way to handle mouse buttons (GAL). --- common/tool/tool_dispatcher.cpp | 40 +++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index cd416f7c50..7166f6596d 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -85,6 +85,30 @@ struct TOOL_DISPATCHER::BUTTON_STATE dragging = false; pressed = false; } + + ///> Checks the current state of the button. + bool GetState() const + { + wxMouseState mouseState = wxGetMouseState(); + + switch( button ) + { + case BUT_LEFT: + return mouseState.LeftIsDown(); + + case BUT_MIDDLE: + return mouseState.MiddleIsDown(); + + case BUT_RIGHT: + return mouseState.RightIsDown(); + + default: + assert( false ); + break; + } + + return false; + } }; @@ -129,9 +153,21 @@ bool TOOL_DISPATCHER::handleMouseButton( wxEvent& aEvent, int aIndex, bool aMoti boost::optional evt; bool isClick = false; - bool up = type == st->upEvent; - bool down = type == st->downEvent; +// bool up = type == st->upEvent; +// bool down = type == st->downEvent; + bool up = false, down = false; bool dblClick = type == st->dblClickEvent; + bool state = st->GetState(); + + if( !dblClick ) + { + // Sometimes the dispatcher does not receive mouse button up event, so it stays + // in the dragging mode even if the mouse button is not held anymore + if( st->pressed && !state ) + up = true; + else if( !st->pressed && state ) + down = true; + } int mods = decodeModifiers( static_cast( &aEvent ) ); int args = st->button | mods; From 197371de5f529b4c3959fa15af9603f2892646e9 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 15 Jul 2014 18:53:13 +0200 Subject: [PATCH 700/741] dialog non copper zones: better look. dialog copper zones: fix a minor bug. --- gerbview/gerbview_frame.cpp | 2 + pcbnew/CMakeLists.txt | 2 +- pcbnew/dialogs/dialog_copper_zones.cpp | 5 +- .../dialog_non_copper_zones_properties.cpp} | 108 ++++++++++++++---- ...ialog_non_copper_zones_properties_base.cpp | 17 +-- ...ialog_non_copper_zones_properties_base.fbp | 35 ++++-- .../dialog_non_copper_zones_properties_base.h | 17 +-- pcbnew/pcbframe.cpp | 1 + 8 files changed, 138 insertions(+), 49 deletions(-) rename pcbnew/{zones_non_copper_type_functions.cpp => dialogs/dialog_non_copper_zones_properties.cpp} (54%) diff --git a/gerbview/gerbview_frame.cpp b/gerbview/gerbview_frame.cpp index d4163f7dfe..ad5ddaa8d0 100644 --- a/gerbview/gerbview_frame.cpp +++ b/gerbview/gerbview_frame.cpp @@ -133,6 +133,8 @@ GERBVIEW_FRAME::GERBVIEW_FRAME( KIWAY* aKiway, wxWindow* aParent ): EDA_PANEINFO mesg; mesg.MessageToolbarPane(); + // Create a wxAuiPaneInfo for the Layers Manager, not derived from the template. + // the Layers Manager is floatable, but initially docked at far right EDA_PANEINFO lyrs; lyrs.LayersToolbarPane(); lyrs.MinSize( m_LayersManager->GetBestSize() ); diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 8b66ab9a49..875b75076e 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -102,6 +102,7 @@ set( PCBNEW_DIALOGS dialogs/dialog_pcb_text_properties_base.cpp dialogs/dialog_pns_settings.cpp dialogs/dialog_pns_settings_base.cpp + dialogs/dialog_non_copper_zones_properties.cpp dialogs/dialog_non_copper_zones_properties_base.cpp dialogs/dialog_pad_properties.cpp dialogs/dialog_pad_properties_base.cpp @@ -250,7 +251,6 @@ set( PCBNEW_CLASS_SRCS zones_by_polygon_fill_functions.cpp zone_filling_algorithm.cpp zones_functions_for_undo_redo.cpp - zones_non_copper_type_functions.cpp zones_polygons_insulated_copper_islands.cpp zones_polygons_test_connections.cpp zones_test_and_combine_areas.cpp diff --git a/pcbnew/dialogs/dialog_copper_zones.cpp b/pcbnew/dialogs/dialog_copper_zones.cpp index f92b132202..407ff8f3dd 100644 --- a/pcbnew/dialogs/dialog_copper_zones.cpp +++ b/pcbnew/dialogs/dialog_copper_zones.cpp @@ -253,10 +253,11 @@ void DIALOG_COPPER_ZONE::initDialog() m_LayerSelectionCtrl->AssignImageList( imageList, wxIMAGE_LIST_SMALL ); int ctrlWidth = 0; // Min width for m_LayerSelectionCtrl to show the layers names + int imgIdx = 0; LSET cu_set = LSET::AllCuMask( board->GetCopperLayerCount() ); - for( LSEQ cu_stack = cu_set.UIOrder(); cu_stack; ++cu_stack ) + for( LSEQ cu_stack = cu_set.UIOrder(); cu_stack; ++cu_stack, imgIdx++ ) { LAYER_ID layer = *cu_stack; @@ -271,7 +272,7 @@ void DIALOG_COPPER_ZONE::initDialog() imageList->Add( makeLayerBitmap( layerColor ) ); int itemIndex = m_LayerSelectionCtrl->InsertItem( - m_LayerSelectionCtrl->GetItemCount(), msg, layer ); + m_LayerSelectionCtrl->GetItemCount(), msg, imgIdx ); if( m_settings.m_CurrentZone_Layer == layer ) m_LayerSelectionCtrl->Select( itemIndex ); diff --git a/pcbnew/zones_non_copper_type_functions.cpp b/pcbnew/dialogs/dialog_non_copper_zones_properties.cpp similarity index 54% rename from pcbnew/zones_non_copper_type_functions.cpp rename to pcbnew/dialogs/dialog_non_copper_zones_properties.cpp index a6b5e17f9c..a0e65d477e 100644 --- a/pcbnew/zones_non_copper_type_functions.cpp +++ b/pcbnew/dialogs/dialog_non_copper_zones_properties.cpp @@ -1,9 +1,32 @@ /** * @file zones_non_copper_type_functions.cpp */ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 Jean-Pierre Charras, jp.charras at wanadoo.fr + * Copyright (C) 2014 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 1992-2014 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 -//#include #include #include #include @@ -17,17 +40,19 @@ #include +#define LAYER_BITMAP_SIZE_X 20 +#define LAYER_BITMAP_SIZE_Y 10 /** * Class DIALOG_NON_COPPER_ZONES_EDITOR * is a dialog editor for non copper zones properties, - * derived from DialogNonCopperZonesPropertiesBase, which is maintained and + * derived from DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE, which is maintained and * created by wxFormBuilder */ -class DIALOG_NON_COPPER_ZONES_EDITOR : public DialogNonCopperZonesPropertiesBase +class DIALOG_NON_COPPER_ZONES_EDITOR : public DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE { private: - PCB_BASE_FRAME* m_Parent; + PCB_BASE_FRAME* m_parent; ZONE_CONTAINER* m_zone; ZONE_SETTINGS* m_ptr; ZONE_SETTINGS m_settings; // working copy of zone settings @@ -39,6 +64,14 @@ private: public: DIALOG_NON_COPPER_ZONES_EDITOR( PCB_BASE_FRAME* aParent, ZONE_CONTAINER* aZone, ZONE_SETTINGS* aSettings ); + +private: + /** + * Function makeLayerBitmap + * creates the colored rectangle bitmaps used in the layer selection widget. + * @param aColor is the color to fill the rectangle with. + */ + wxBitmap makeLayerBitmap( EDA_COLOR_T aColor ); }; @@ -49,8 +82,6 @@ ZONE_EDIT_T InvokeNonCopperZonesEditor( PCB_BASE_FRAME* aParent, ZONE_EDIT_T result = ZONE_EDIT_T( dlg.ShowModal() ); - // D(printf( "%s: result:%d\n", __FUNCTION__, result );) - return result; } @@ -58,9 +89,9 @@ ZONE_EDIT_T InvokeNonCopperZonesEditor( PCB_BASE_FRAME* aParent, DIALOG_NON_COPPER_ZONES_EDITOR::DIALOG_NON_COPPER_ZONES_EDITOR( PCB_BASE_FRAME* aParent, ZONE_CONTAINER* aZone, ZONE_SETTINGS* aSettings ) : - DialogNonCopperZonesPropertiesBase( aParent ) + DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE( aParent ) { - m_Parent = aParent; + m_parent = aParent; m_zone = aZone; m_ptr = aSettings; @@ -75,6 +106,8 @@ DIALOG_NON_COPPER_ZONES_EDITOR::DIALOG_NON_COPPER_ZONES_EDITOR( PCB_BASE_FRAME* void DIALOG_NON_COPPER_ZONES_EDITOR::Init() { + BOARD* board = m_parent->GetBoard(); + SetReturnCode( ZONE_ABORT ); // Will be changed on button click AddUnitSymbol( *m_MinThicknessValueTitle, g_UserUnit ); @@ -99,28 +132,36 @@ void DIALOG_NON_COPPER_ZONES_EDITOR::Init() break; } - int ii = 0; + // Create one column in m_LayerSelectionCtrl + wxListItem column0; + column0.SetId( 0 ); + m_LayerSelectionCtrl->InsertColumn( 0, column0 ); - for( LSEQ seq = LSET::AllNonCuMask().Seq(); seq; ++seq, ++ii ) + // Create an icon list: + wxImageList* imageList = new wxImageList( LAYER_BITMAP_SIZE_X, LAYER_BITMAP_SIZE_Y ); + m_LayerSelectionCtrl->AssignImageList( imageList, wxIMAGE_LIST_SMALL ); + + int ii = 0; + int lyrSelect = ( (PCB_SCREEN*) m_parent->GetScreen() )->m_Active_Layer; + + if( m_zone ) + lyrSelect = m_zone->GetLayer(); + + for( LSEQ seq = LSET::AllNonCuMask().Seq(); seq; ++seq, ++ii ) { LAYER_ID layer = *seq; - wxString msg = m_Parent->GetBoard()->GetLayerName( layer ); + EDA_COLOR_T layerColor = board->GetLayerColor( layer ); + imageList->Add( makeLayerBitmap( layerColor ) ); + wxString msg = board->GetLayerName( layer ); msg.Trim(); - m_LayerSelectionCtrl->InsertItems( 1, &msg, ii ); + int itemIndex = m_LayerSelectionCtrl->InsertItem( + m_LayerSelectionCtrl->GetItemCount(), msg, ii ); - if( m_zone ) - { - if( m_zone->GetLayer() == layer ) - m_LayerSelectionCtrl->SetSelection( ii ); - } - else - { - if( ( (PCB_SCREEN*) m_Parent->GetScreen() )->m_Active_Layer == layer ) - m_LayerSelectionCtrl->SetSelection( ii ); - } + if(lyrSelect == layer ) + m_LayerSelectionCtrl->Select( itemIndex ); } } @@ -166,7 +207,7 @@ void DIALOG_NON_COPPER_ZONES_EDITOR::OnOkClick( wxCommandEvent& event ) m_settings.m_Zone_45_Only = true; // Get the layer selection for this zone - int ii = m_LayerSelectionCtrl->GetSelection(); + int ii = m_LayerSelectionCtrl->GetFirstSelected(); if( ii < 0 ) { @@ -191,3 +232,24 @@ void DIALOG_NON_COPPER_ZONES_EDITOR::OnCancelClick( wxCommandEvent& event ) EndModal( ZONE_ABORT ); } + +wxBitmap DIALOG_NON_COPPER_ZONES_EDITOR::makeLayerBitmap( EDA_COLOR_T aColor ) +{ + wxBitmap bitmap( LAYER_BITMAP_SIZE_X, LAYER_BITMAP_SIZE_Y ); + wxBrush brush; + wxMemoryDC iconDC; + + iconDC.SelectObject( bitmap ); + brush.SetColour( MakeColour( aColor ) ); + +#if wxCHECK_VERSION( 3, 0, 0 ) + brush.SetStyle( wxBRUSHSTYLE_SOLID ); +#else + brush.SetStyle( wxSOLID ); +#endif + + iconDC.SetBrush( brush ); + iconDC.DrawRectangle( 0, 0, LAYER_BITMAP_SIZE_X, LAYER_BITMAP_SIZE_Y ); + + return bitmap; +} diff --git a/pcbnew/dialogs/dialog_non_copper_zones_properties_base.cpp b/pcbnew/dialogs/dialog_non_copper_zones_properties_base.cpp index 624e68c038..4d5c254f31 100644 --- a/pcbnew/dialogs/dialog_non_copper_zones_properties_base.cpp +++ b/pcbnew/dialogs/dialog_non_copper_zones_properties_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 10 2012) +// C++ code generated with wxFormBuilder (version Nov 6 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -9,12 +9,12 @@ /////////////////////////////////////////////////////////////////////////// -BEGIN_EVENT_TABLE( DialogNonCopperZonesPropertiesBase, DIALOG_SHIM ) - EVT_BUTTON( wxID_CANCEL, DialogNonCopperZonesPropertiesBase::_wxFB_OnCancelClick ) - EVT_BUTTON( wxID_OK, DialogNonCopperZonesPropertiesBase::_wxFB_OnOkClick ) +BEGIN_EVENT_TABLE( DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE, DIALOG_SHIM ) + EVT_BUTTON( wxID_CANCEL, DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::_wxFB_OnCancelClick ) + EVT_BUTTON( wxID_OK, DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::_wxFB_OnOkClick ) END_EVENT_TABLE() -DialogNonCopperZonesPropertiesBase::DialogNonCopperZonesPropertiesBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) +DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); @@ -31,8 +31,8 @@ DialogNonCopperZonesPropertiesBase::DialogNonCopperZonesPropertiesBase( wxWindow m_staticTextLayerSelection->Wrap( -1 ); bSizerLeft->Add( m_staticTextLayerSelection, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - m_LayerSelectionCtrl = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - bSizerLeft->Add( m_LayerSelectionCtrl, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + m_LayerSelectionCtrl = new wxListView( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_ALIGN_LEFT|wxLC_NO_HEADER|wxLC_REPORT|wxLC_SINGLE_SEL ); + bSizerLeft->Add( m_LayerSelectionCtrl, 1, wxALL|wxEXPAND, 5 ); m_UpperSizer->Add( bSizerLeft, 1, wxEXPAND, 5 ); @@ -63,6 +63,7 @@ DialogNonCopperZonesPropertiesBase::DialogNonCopperZonesPropertiesBase( wxWindow bSizerRight->Add( m_MinThicknessValueTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_ZoneMinThicknessCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_ZoneMinThicknessCtrl->SetMaxLength( 0 ); bSizerRight->Add( m_ZoneMinThicknessCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); @@ -90,6 +91,6 @@ DialogNonCopperZonesPropertiesBase::DialogNonCopperZonesPropertiesBase( wxWindow this->Centre( wxBOTH ); } -DialogNonCopperZonesPropertiesBase::~DialogNonCopperZonesPropertiesBase() +DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::~DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE() { } diff --git a/pcbnew/dialogs/dialog_non_copper_zones_properties_base.fbp b/pcbnew/dialogs/dialog_non_copper_zones_properties_base.fbp index 0eb038f7a3..c543505ccc 100644 --- a/pcbnew/dialogs/dialog_non_copper_zones_properties_base.fbp +++ b/pcbnew/dialogs/dialog_non_copper_zones_properties_base.fbp @@ -20,8 +20,10 @@ . 1 + 1 1 1 + UI 1 0 @@ -40,7 +42,7 @@ wxID_ANY - DialogNonCopperZonesPropertiesBase + DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE 369,317 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER @@ -194,9 +196,9 @@ 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + wxALL|wxEXPAND 1 - + 1 1 1 @@ -210,7 +212,6 @@ 1 0 - 1 1 @@ -242,8 +243,8 @@ Resizable 1 - - + wxLC_ALIGN_LEFT|wxLC_NO_HEADER|wxLC_REPORT|wxLC_SINGLE_SEL + wxListView; 0 @@ -263,8 +264,26 @@ - - + + + + + + + + + + + + + + + + + + + + diff --git a/pcbnew/dialogs/dialog_non_copper_zones_properties_base.h b/pcbnew/dialogs/dialog_non_copper_zones_properties_base.h index 37b07c5dfa..4890a2872d 100644 --- a/pcbnew/dialogs/dialog_non_copper_zones_properties_base.h +++ b/pcbnew/dialogs/dialog_non_copper_zones_properties_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 10 2012) +// C++ code generated with wxFormBuilder (version Nov 6 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -11,6 +11,9 @@ #include #include #include +class DIALOG_SHIM; +class wxListView; + #include "dialog_shim.h" #include #include @@ -18,7 +21,7 @@ #include #include #include -#include +#include #include #include #include @@ -30,9 +33,9 @@ /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// -/// Class DialogNonCopperZonesPropertiesBase +/// Class DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE /////////////////////////////////////////////////////////////////////////////// -class DialogNonCopperZonesPropertiesBase : public DIALOG_SHIM +class DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE : public DIALOG_SHIM { DECLARE_EVENT_TABLE() private: @@ -44,7 +47,7 @@ class DialogNonCopperZonesPropertiesBase : public DIALOG_SHIM protected: wxStaticText* m_staticTextLayerSelection; - wxListBox* m_LayerSelectionCtrl; + wxListView* m_LayerSelectionCtrl; wxRadioBox* m_OrientEdgesOpt; wxRadioBox* m_OutlineAppearanceCtrl; wxStaticText* m_MinThicknessValueTitle; @@ -61,8 +64,8 @@ class DialogNonCopperZonesPropertiesBase : public DIALOG_SHIM public: - DialogNonCopperZonesPropertiesBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Non Copper Zones Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 369,317 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxFULL_REPAINT_ON_RESIZE|wxSUNKEN_BORDER ); - ~DialogNonCopperZonesPropertiesBase(); + DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Non Copper Zones Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 369,317 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxFULL_REPAINT_ON_RESIZE|wxSUNKEN_BORDER ); + ~DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE(); }; diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 08eb9e36a0..1924d8ee51 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -420,6 +420,7 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : lyrs.MinSize( m_Layers->GetBestSize() ); // updated in ReFillLayerWidget lyrs.BestSize( m_Layers->GetBestSize() ); lyrs.Caption( _( "Visibles" ) ); + lyrs.TopDockable( false ).BottomDockable( false ); if( m_mainToolBar ) // The main horizontal toolbar { From 9ecb10996c8ce9121fec557ba12734d0bcce4507 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 15 Jul 2014 20:13:08 +0200 Subject: [PATCH 701/741] Fix wx28 compil issue, and a compil warning. --- pcbnew/dialogs/dialog_non_copper_zones_properties.cpp | 2 ++ utils/idftools/idf_outlines.cpp | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pcbnew/dialogs/dialog_non_copper_zones_properties.cpp b/pcbnew/dialogs/dialog_non_copper_zones_properties.cpp index a0e65d477e..1108a03059 100644 --- a/pcbnew/dialogs/dialog_non_copper_zones_properties.cpp +++ b/pcbnew/dialogs/dialog_non_copper_zones_properties.cpp @@ -38,6 +38,8 @@ #include #include +#include // needed for wx/listctrl.h, in wxGTK 2.8.12 + #include #define LAYER_BITMAP_SIZE_X 20 diff --git a/utils/idftools/idf_outlines.cpp b/utils/idftools/idf_outlines.cpp index 456b427c27..614480b0b1 100644 --- a/utils/idftools/idf_outlines.cpp +++ b/utils/idftools/idf_outlines.cpp @@ -1362,7 +1362,6 @@ bool BOARD_OUTLINE::DelOutline( IDF_OUTLINE* aOutline ) bool BOARD_OUTLINE::DelOutline( size_t aIndex ) { std::list< IDF_OUTLINE* >::iterator itS = outlines.begin(); - std::list< IDF_OUTLINE* >::iterator itE = outlines.end(); if( outlines.empty() ) { From 6da86c12dece1a6c21a41b70df3691eafa0330fd Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Thu, 17 Jul 2014 09:10:15 -0500 Subject: [PATCH 702/741] KIWAY::player_destroy_handler() skips on the wxWindowDestroyEvent, just in case --- common/kiway.cpp | 2 +- common/single_top.cpp | 1 - scripts/library-repos-install.sh | 10 +++++++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/common/kiway.cpp b/common/kiway.cpp index 39bbdab38f..9562945030 100644 --- a/common/kiway.cpp +++ b/common/kiway.cpp @@ -74,7 +74,7 @@ void KIWAY::player_destroy_handler( wxWindowDestroyEvent& event ) } } - // event.Skip(); skip to who, the wxApp? I'm the top window. + event.Skip(); // skip to who, the wxApp? I'm the top window. } diff --git a/common/single_top.cpp b/common/single_top.cpp index 26e260651b..0a0dbf986a 100644 --- a/common/single_top.cpp +++ b/common/single_top.cpp @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include diff --git a/scripts/library-repos-install.sh b/scripts/library-repos-install.sh index b34b570343..cda6be8c18 100755 --- a/scripts/library-repos-install.sh +++ b/scripts/library-repos-install.sh @@ -114,6 +114,10 @@ detect_pretty_repos() | sed -r 's:.+ "KiCad/(.+)",:\1:'` #echo "PRETTY_REPOS:$PRETTY_REPOS" + + PRETTY_REPOS=`echo $PRETTY_REPOS | tr " " "\n" | sort` + + #echo "PRETTY_REPOS sorted:$PRETTY_REPOS" } @@ -226,9 +230,13 @@ if [ $# -eq 1 -a "$1" == "--list-libraries" ]; then detect_pretty_repos # add the "schematic parts & 3D model" kicad-library to total - for repo in kicad-library $PRETTY_REPOS; do + for repo in $PRETTY_REPOS; do echo "$repo" done + + echo + echo "and the special 'kicad-library' which holds 3D stuff and schematic parts" + exit fi From 4c77724134882ee4c19e8b1d055051e61a954f13 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sun, 20 Jul 2014 12:41:14 +0200 Subject: [PATCH 703/741] Very minor fixes. *.kicad_pcb files update to current Pcbnew version. --- common/build_version.cpp | 2 +- demos/flat_hierarchy/flat_hierarchy.kicad_pcb | 4 +- demos/test_xil_95108/carte_test.kicad_pcb | 1354 +- demos/video/video.kicad_pcb | 16135 ++++++---------- pcbnew/dialogs/dialog_plot_base.cpp | 4 +- pcbnew/dialogs/dialog_plot_base.fbp | 4 +- pcbnew/dialogs/dialog_pns_settings_base.cpp | 3 +- pcbnew/dialogs/dialog_pns_settings_base.fbp | 6 +- pcbnew/dialogs/dialog_pns_settings_base.h | 4 +- 9 files changed, 6515 insertions(+), 11001 deletions(-) diff --git a/common/build_version.cpp b/common/build_version.cpp index b2f7739735..6ac1dc8c4a 100644 --- a/common/build_version.cpp +++ b/common/build_version.cpp @@ -6,7 +6,7 @@ #endif #ifndef KICAD_BUILD_VERSION -# define KICAD_BUILD_VERSION "(2014-jan-25)" +# define KICAD_BUILD_VERSION "(2014-jul-16 BZR unknown)" #endif /** diff --git a/demos/flat_hierarchy/flat_hierarchy.kicad_pcb b/demos/flat_hierarchy/flat_hierarchy.kicad_pcb index b43c7ea596..9985f4896e 100644 --- a/demos/flat_hierarchy/flat_hierarchy.kicad_pcb +++ b/demos/flat_hierarchy/flat_hierarchy.kicad_pcb @@ -1061,7 +1061,7 @@ (pad 8 thru_hole circle (at 1.397 -1.27 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) (net 1 /pic_programmer/CTS)) (pad 9 thru_hole circle (at 4.191 -1.27 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) - (model Conn_DBxx/db9_female_pin90deg.wrl + (model conn_DBxx/db9_female_pin90deg.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) @@ -1137,7 +1137,7 @@ (net 3 GND)) (pad 2 thru_hole circle (at 2.54 0 90) (size 2.54 2.54) (drill 1.524) (layers *.Cu *.Mask F.SilkS) (net 16 "Net-(D1-Pad1)")) - (model Device/bornier_2.wrl + (model device/bornier_2.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) diff --git a/demos/test_xil_95108/carte_test.kicad_pcb b/demos/test_xil_95108/carte_test.kicad_pcb index ea4eb73e1b..3839bc0c41 100644 --- a/demos/test_xil_95108/carte_test.kicad_pcb +++ b/demos/test_xil_95108/carte_test.kicad_pcb @@ -1,4 +1,4 @@ -(kicad_pcb (version 4) (host pcbnew "(2014-07-02 BZR 4969)-product") +(kicad_pcb (version 4) (host pcbnew "(2014-07-17 BZR 5006)-product") (general (links 173) @@ -1225,7 +1225,7 @@ (net 78 "Net-(K1-Pad2)")) (pad 3 thru_hole circle (at 2.54 0 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) (net 29 /MD14)) - (model pins_array_3x1.wrl + (model pin_array/pins_array_3x1.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) @@ -1324,7 +1324,7 @@ (net 73 "Net-(C5-Pad1)")) (pad 2 thru_hole circle (at 2.54 0 270) (size 1.778 1.778) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) (net 72 "Net-(C4-Pad1)")) - (model discret/crystal_hc18u_horizontal.wrl + (model discret/xtal/crystal_hc18u_horizontal.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) @@ -1971,763 +1971,763 @@ (gr_line (start 94.615 46.355) (end 94.615 53.975) (angle 90) (layer Edge.Cuts) (width 0.3048)) (gr_line (start 94.615 53.975) (end 94.615 132.715) (angle 90) (layer Edge.Cuts) (width 0.3048)) - (segment (start 185.42 70.485) (end 173.99 59.055) (width 1.016) (layer Dessus) (net 1)) - (segment (start 156.845 112.395) (end 155.575 113.665) (width 1.016) (layer Dessous) (net 1)) - (segment (start 183.515 110.49) (end 185.42 108.585) (width 1.016) (layer Dessus) (net 1)) - (segment (start 179.705 110.49) (end 183.515 110.49) (width 1.016) (layer Dessus) (net 1)) - (segment (start 169.545 112.395) (end 179.705 112.395) (width 1.016) (layer Dessous) (net 1) (status 400)) - (segment (start 185.42 108.585) (end 186.69 107.315) (width 1.016) (layer Dessus) (net 1)) - (segment (start 163.83 112.395) (end 156.845 112.395) (width 1.016) (layer Dessous) (net 1)) - (segment (start 186.69 71.755) (end 185.42 70.485) (width 1.016) (layer Dessus) (net 1)) - (segment (start 186.69 107.315) (end 186.69 71.755) (width 1.016) (layer Dessus) (net 1)) - (segment (start 124.46 41.275) (end 124.46 39.37) (width 1.016) (layer Dessus) (net 1) (status 400)) - (segment (start 125.095 41.91) (end 124.46 41.275) (width 1.016) (layer Dessus) (net 1)) - (segment (start 179.705 112.395) (end 179.705 110.49) (width 1.016) (layer Dessus) (net 1) (status 800)) - (segment (start 163.83 106.68) (end 163.83 112.395) (width 1.016) (layer Dessous) (net 1) (status 800)) - (segment (start 133.35 40.005) (end 131.445 41.91) (width 1.016) (layer Dessus) (net 1)) - (segment (start 173.99 59.055) (end 160.02 59.055) (width 1.016) (layer Dessus) (net 1)) - (segment (start 169.545 112.395) (end 163.83 112.395) (width 1.016) (layer Dessous) (net 1)) - (segment (start 159.385 40.64) (end 158.75 40.005) (width 1.016) (layer Dessus) (net 1)) - (segment (start 159.385 58.42) (end 159.385 40.64) (width 1.016) (layer Dessus) (net 1)) - (segment (start 158.75 40.005) (end 133.35 40.005) (width 1.016) (layer Dessus) (net 1)) - (segment (start 155.575 113.665) (end 155.575 117.475) (width 1.016) (layer Dessous) (net 1) (status 400)) - (segment (start 160.02 59.055) (end 159.385 58.42) (width 1.016) (layer Dessus) (net 1)) (segment (start 131.445 41.91) (end 125.095 41.91) (width 1.016) (layer Dessus) (net 1)) - (segment (start 162.56 41.275) (end 169.545 41.275) (width 1.016) (layer Dessous) (net 2)) - (segment (start 131.445 46.99) (end 133.35 48.895) (width 1.016) (layer Dessous) (net 2)) - (segment (start 191.135 46.355) (end 191.77 46.99) (width 1.016) (layer Dessous) (net 2)) - (segment (start 141.605 43.815) (end 142.24 43.18) (width 1.016) (layer Dessous) (net 2)) - (segment (start 148.59 43.18) (end 149.225 43.815) (width 1.016) (layer Dessous) (net 2)) - (segment (start 142.24 43.18) (end 148.59 43.18) (width 0.4318) (layer Dessous) (net 2)) - (segment (start 141.605 45.72) (end 141.605 43.815) (width 1.016) (layer Dessous) (net 2)) - (segment (start 133.35 48.895) (end 138.43 48.895) (width 1.016) (layer Dessous) (net 2)) - (segment (start 194.31 49.53) (end 191.77 46.99) (width 1.016) (layer Dessous) (net 2)) - (segment (start 138.43 48.895) (end 141.605 45.72) (width 1.016) (layer Dessous) (net 2)) - (segment (start 151.765 43.815) (end 160.02 43.815) (width 1.016) (layer Dessous) (net 2) (status 800)) - (segment (start 149.225 43.815) (end 151.765 43.815) (width 1.016) (layer Dessous) (net 2) (status 400)) - (segment (start 169.545 41.275) (end 174.625 46.355) (width 1.016) (layer Dessous) (net 2)) - (segment (start 160.02 43.815) (end 162.56 41.275) (width 1.016) (layer Dessous) (net 2)) - (segment (start 174.625 46.355) (end 191.135 46.355) (width 1.016) (layer Dessous) (net 2)) - (segment (start 129.54 46.99) (end 131.445 46.99) (width 1.016) (layer Dessous) (net 2) (status 800)) + (segment (start 160.02 59.055) (end 159.385 58.42) (width 1.016) (layer Dessus) (net 1)) + (segment (start 155.575 113.665) (end 155.575 117.475) (width 1.016) (layer Dessous) (net 1) (status 400)) + (segment (start 158.75 40.005) (end 133.35 40.005) (width 1.016) (layer Dessus) (net 1)) + (segment (start 159.385 58.42) (end 159.385 40.64) (width 1.016) (layer Dessus) (net 1)) + (segment (start 159.385 40.64) (end 158.75 40.005) (width 1.016) (layer Dessus) (net 1)) + (segment (start 169.545 112.395) (end 163.83 112.395) (width 1.016) (layer Dessous) (net 1)) + (segment (start 173.99 59.055) (end 160.02 59.055) (width 1.016) (layer Dessus) (net 1)) + (segment (start 133.35 40.005) (end 131.445 41.91) (width 1.016) (layer Dessus) (net 1)) + (segment (start 163.83 106.68) (end 163.83 112.395) (width 1.016) (layer Dessous) (net 1) (status 800)) + (segment (start 179.705 112.395) (end 179.705 110.49) (width 1.016) (layer Dessus) (net 1) (status 800)) + (segment (start 125.095 41.91) (end 124.46 41.275) (width 1.016) (layer Dessus) (net 1)) + (segment (start 124.46 41.275) (end 124.46 39.37) (width 1.016) (layer Dessus) (net 1) (status 400)) + (segment (start 186.69 107.315) (end 186.69 71.755) (width 1.016) (layer Dessus) (net 1)) + (segment (start 186.69 71.755) (end 185.42 70.485) (width 1.016) (layer Dessus) (net 1)) + (segment (start 163.83 112.395) (end 156.845 112.395) (width 1.016) (layer Dessous) (net 1)) + (segment (start 185.42 108.585) (end 186.69 107.315) (width 1.016) (layer Dessus) (net 1)) + (segment (start 169.545 112.395) (end 179.705 112.395) (width 1.016) (layer Dessous) (net 1) (status 400)) + (segment (start 179.705 110.49) (end 183.515 110.49) (width 1.016) (layer Dessus) (net 1)) + (segment (start 183.515 110.49) (end 185.42 108.585) (width 1.016) (layer Dessus) (net 1)) + (segment (start 156.845 112.395) (end 155.575 113.665) (width 1.016) (layer Dessous) (net 1)) + (segment (start 185.42 70.485) (end 173.99 59.055) (width 1.016) (layer Dessus) (net 1)) (segment (start 194.31 94.615) (end 194.31 49.53) (width 1.016) (layer Dessous) (net 2) (status 800)) - (segment (start 173.355 93.345) (end 172.085 92.075) (width 0.4318) (layer Dessous) (net 3)) - (segment (start 180.975 93.345) (end 183.515 93.345) (width 0.4318) (layer Dessous) (net 3) (status 400)) - (segment (start 175.895 93.345) (end 173.355 93.345) (width 0.4318) (layer Dessous) (net 3) (status 800)) - (segment (start 150.495 92.075) (end 172.085 92.075) (width 0.4318) (layer Dessous) (net 3) (status 800)) + (segment (start 129.54 46.99) (end 131.445 46.99) (width 1.016) (layer Dessous) (net 2) (status 800)) + (segment (start 174.625 46.355) (end 191.135 46.355) (width 1.016) (layer Dessous) (net 2)) + (segment (start 160.02 43.815) (end 162.56 41.275) (width 1.016) (layer Dessous) (net 2)) + (segment (start 169.545 41.275) (end 174.625 46.355) (width 1.016) (layer Dessous) (net 2)) + (segment (start 149.225 43.815) (end 151.765 43.815) (width 1.016) (layer Dessous) (net 2) (status 400)) + (segment (start 151.765 43.815) (end 160.02 43.815) (width 1.016) (layer Dessous) (net 2) (status 800)) + (segment (start 138.43 48.895) (end 141.605 45.72) (width 1.016) (layer Dessous) (net 2)) + (segment (start 194.31 49.53) (end 191.77 46.99) (width 1.016) (layer Dessous) (net 2)) + (segment (start 133.35 48.895) (end 138.43 48.895) (width 1.016) (layer Dessous) (net 2)) + (segment (start 141.605 45.72) (end 141.605 43.815) (width 1.016) (layer Dessous) (net 2)) + (segment (start 142.24 43.18) (end 148.59 43.18) (width 0.4318) (layer Dessous) (net 2)) + (segment (start 148.59 43.18) (end 149.225 43.815) (width 1.016) (layer Dessous) (net 2)) + (segment (start 141.605 43.815) (end 142.24 43.18) (width 1.016) (layer Dessous) (net 2)) + (segment (start 191.135 46.355) (end 191.77 46.99) (width 1.016) (layer Dessous) (net 2)) + (segment (start 131.445 46.99) (end 133.35 48.895) (width 1.016) (layer Dessous) (net 2)) + (segment (start 162.56 41.275) (end 169.545 41.275) (width 1.016) (layer Dessous) (net 2)) (segment (start 180.975 93.345) (end 175.895 93.345) (width 0.4318) (layer Dessous) (net 3) (status 400)) - (segment (start 130.175 67.945) (end 130.175 62.865) (width 0.4318) (layer Dessous) (net 4)) - (segment (start 130.175 74.295) (end 128.905 73.025) (width 0.4318) (layer Dessous) (net 4) (status 800)) - (segment (start 133.985 60.96) (end 133.985 57.785) (width 0.4318) (layer Dessous) (net 4) (status 400)) - (segment (start 133.35 61.595) (end 133.985 60.96) (width 0.4318) (layer Dessous) (net 4)) - (segment (start 128.905 73.025) (end 128.905 69.215) (width 0.4318) (layer Dessous) (net 4)) - (segment (start 131.445 61.595) (end 133.35 61.595) (width 0.4318) (layer Dessous) (net 4)) - (segment (start 128.905 69.215) (end 130.175 67.945) (width 0.4318) (layer Dessous) (net 4)) + (segment (start 150.495 92.075) (end 172.085 92.075) (width 0.4318) (layer Dessous) (net 3) (status 800)) + (segment (start 175.895 93.345) (end 173.355 93.345) (width 0.4318) (layer Dessous) (net 3) (status 800)) + (segment (start 180.975 93.345) (end 183.515 93.345) (width 0.4318) (layer Dessous) (net 3) (status 400)) + (segment (start 173.355 93.345) (end 172.085 92.075) (width 0.4318) (layer Dessous) (net 3)) (segment (start 130.175 62.865) (end 131.445 61.595) (width 0.4318) (layer Dessous) (net 4)) - (segment (start 135.255 61.595) (end 136.525 60.325) (width 0.4318) (layer Dessous) (net 5)) - (segment (start 136.525 57.785) (end 136.525 60.325) (width 0.4318) (layer Dessous) (net 5) (status 800)) - (segment (start 132.715 69.215) (end 135.255 66.675) (width 0.4318) (layer Dessous) (net 5)) - (segment (start 132.715 69.215) (end 132.715 71.755) (width 0.4318) (layer Dessous) (net 5) (status 400)) + (segment (start 128.905 69.215) (end 130.175 67.945) (width 0.4318) (layer Dessous) (net 4)) + (segment (start 131.445 61.595) (end 133.35 61.595) (width 0.4318) (layer Dessous) (net 4)) + (segment (start 128.905 73.025) (end 128.905 69.215) (width 0.4318) (layer Dessous) (net 4)) + (segment (start 133.35 61.595) (end 133.985 60.96) (width 0.4318) (layer Dessous) (net 4)) + (segment (start 133.985 60.96) (end 133.985 57.785) (width 0.4318) (layer Dessous) (net 4) (status 400)) + (segment (start 130.175 74.295) (end 128.905 73.025) (width 0.4318) (layer Dessous) (net 4) (status 800)) + (segment (start 130.175 67.945) (end 130.175 62.865) (width 0.4318) (layer Dessous) (net 4)) (segment (start 135.255 61.595) (end 135.255 66.675) (width 0.4318) (layer Dessous) (net 5)) - (segment (start 128.905 65.405) (end 128.905 67.945) (width 0.4318) (layer Dessous) (net 6) (status 800)) - (segment (start 128.905 67.945) (end 127.635 69.215) (width 0.4318) (layer Dessous) (net 6)) + (segment (start 132.715 69.215) (end 132.715 71.755) (width 0.4318) (layer Dessous) (net 5) (status 400)) + (segment (start 132.715 69.215) (end 135.255 66.675) (width 0.4318) (layer Dessous) (net 5)) + (segment (start 136.525 57.785) (end 136.525 60.325) (width 0.4318) (layer Dessous) (net 5) (status 800)) + (segment (start 135.255 61.595) (end 136.525 60.325) (width 0.4318) (layer Dessous) (net 5)) (segment (start 127.635 69.215) (end 127.635 71.755) (width 0.4318) (layer Dessous) (net 6) (status 400)) - (segment (start 130.175 71.755) (end 130.175 69.215) (width 0.4318) (layer Dessous) (net 7) (status 800)) - (segment (start 131.445 67.945) (end 131.445 65.405) (width 0.4318) (layer Dessous) (net 7) (status 400)) + (segment (start 128.905 67.945) (end 127.635 69.215) (width 0.4318) (layer Dessous) (net 6)) + (segment (start 128.905 65.405) (end 128.905 67.945) (width 0.4318) (layer Dessous) (net 6) (status 800)) (segment (start 130.175 69.215) (end 131.445 67.945) (width 0.4318) (layer Dessous) (net 7)) - (segment (start 136.525 73.025) (end 137.795 74.295) (width 0.4318) (layer Dessous) (net 8) (status 400)) - (segment (start 139.065 60.325) (end 137.795 61.595) (width 0.4318) (layer Dessous) (net 8)) - (segment (start 137.795 69.85) (end 137.795 61.595) (width 0.4318) (layer Dessous) (net 8)) - (segment (start 136.525 71.12) (end 136.525 73.025) (width 0.4318) (layer Dessous) (net 8)) - (segment (start 136.525 71.12) (end 137.795 69.85) (width 0.4318) (layer Dessous) (net 8)) + (segment (start 131.445 67.945) (end 131.445 65.405) (width 0.4318) (layer Dessous) (net 7) (status 400)) + (segment (start 130.175 71.755) (end 130.175 69.215) (width 0.4318) (layer Dessous) (net 7) (status 800)) (segment (start 139.065 57.785) (end 139.065 60.325) (width 0.4318) (layer Dessous) (net 8) (status 800)) - (segment (start 141.605 57.785) (end 141.605 60.325) (width 0.4318) (layer Dessous) (net 9) (status 800)) - (segment (start 140.335 74.295) (end 141.605 73.025) (width 0.4318) (layer Dessous) (net 9) (status 800)) - (segment (start 141.605 73.025) (end 141.605 67.945) (width 0.4318) (layer Dessous) (net 9)) - (segment (start 141.605 67.945) (end 140.335 66.675) (width 0.4318) (layer Dessous) (net 9)) - (segment (start 141.605 60.325) (end 140.335 61.595) (width 0.4318) (layer Dessous) (net 9)) + (segment (start 136.525 71.12) (end 137.795 69.85) (width 0.4318) (layer Dessous) (net 8)) + (segment (start 136.525 71.12) (end 136.525 73.025) (width 0.4318) (layer Dessous) (net 8)) + (segment (start 137.795 69.85) (end 137.795 61.595) (width 0.4318) (layer Dessous) (net 8)) + (segment (start 139.065 60.325) (end 137.795 61.595) (width 0.4318) (layer Dessous) (net 8)) + (segment (start 136.525 73.025) (end 137.795 74.295) (width 0.4318) (layer Dessous) (net 8) (status 400)) (segment (start 140.335 61.595) (end 140.335 66.675) (width 0.4318) (layer Dessous) (net 9)) - (segment (start 142.24 65.405) (end 141.605 65.405) (width 0.4318) (layer Dessous) (net 10) (status 400)) - (segment (start 142.875 66.04) (end 142.24 65.405) (width 0.4318) (layer Dessous) (net 10)) + (segment (start 141.605 60.325) (end 140.335 61.595) (width 0.4318) (layer Dessous) (net 9)) + (segment (start 141.605 67.945) (end 140.335 66.675) (width 0.4318) (layer Dessous) (net 9)) + (segment (start 141.605 73.025) (end 141.605 67.945) (width 0.4318) (layer Dessous) (net 9)) + (segment (start 140.335 74.295) (end 141.605 73.025) (width 0.4318) (layer Dessous) (net 9) (status 800)) + (segment (start 141.605 57.785) (end 141.605 60.325) (width 0.4318) (layer Dessous) (net 9) (status 800)) (segment (start 142.875 71.755) (end 142.875 66.04) (width 0.4318) (layer Dessous) (net 10) (status 800)) - (segment (start 139.065 65.405) (end 139.065 70.485) (width 0.4318) (layer Dessous) (net 11) (status 800)) + (segment (start 142.875 66.04) (end 142.24 65.405) (width 0.4318) (layer Dessous) (net 10)) + (segment (start 142.24 65.405) (end 141.605 65.405) (width 0.4318) (layer Dessous) (net 10) (status 400)) (segment (start 139.065 70.485) (end 137.795 71.755) (width 0.4318) (layer Dessous) (net 11) (status 400)) - (segment (start 132.715 74.295) (end 131.445 73.025) (width 0.4318) (layer Dessous) (net 12) (status 800)) - (segment (start 131.445 73.025) (end 131.445 69.215) (width 0.4318) (layer Dessous) (net 12)) - (segment (start 131.445 69.215) (end 133.985 66.675) (width 0.4318) (layer Dessous) (net 12)) + (segment (start 139.065 65.405) (end 139.065 70.485) (width 0.4318) (layer Dessous) (net 11) (status 800)) (segment (start 133.985 66.675) (end 133.985 65.405) (width 0.4318) (layer Dessous) (net 12) (status 400)) - (segment (start 121.285 73.025) (end 122.555 74.295) (width 0.4318) (layer Dessous) (net 13) (status 400)) - (segment (start 116.205 73.025) (end 121.285 73.025) (width 0.4318) (layer Dessous) (net 13)) - (segment (start 116.205 73.025) (end 114.935 71.755) (width 0.4318) (layer Dessous) (net 13)) + (segment (start 131.445 69.215) (end 133.985 66.675) (width 0.4318) (layer Dessous) (net 12)) + (segment (start 131.445 73.025) (end 131.445 69.215) (width 0.4318) (layer Dessous) (net 12)) + (segment (start 132.715 74.295) (end 131.445 73.025) (width 0.4318) (layer Dessous) (net 12) (status 800)) (segment (start 114.935 62.865) (end 114.935 71.755) (width 0.4318) (layer Dessous) (net 13) (status 800)) - (segment (start 117.475 71.12) (end 118.11 71.755) (width 0.4318) (layer Dessous) (net 14)) - (segment (start 118.11 71.755) (end 122.555 71.755) (width 0.4318) (layer Dessous) (net 14) (status 400)) + (segment (start 116.205 73.025) (end 114.935 71.755) (width 0.4318) (layer Dessous) (net 13)) + (segment (start 116.205 73.025) (end 121.285 73.025) (width 0.4318) (layer Dessous) (net 13)) + (segment (start 121.285 73.025) (end 122.555 74.295) (width 0.4318) (layer Dessous) (net 13) (status 400)) (segment (start 117.475 62.865) (end 117.475 71.12) (width 0.4318) (layer Dessous) (net 14) (status 800)) - (segment (start 163.195 98.425) (end 168.275 98.425) (width 0.4318) (layer Dessous) (net 15) (status 400)) - (segment (start 161.925 99.695) (end 163.195 98.425) (width 0.4318) (layer Dessous) (net 15)) + (segment (start 118.11 71.755) (end 122.555 71.755) (width 0.4318) (layer Dessous) (net 14) (status 400)) + (segment (start 117.475 71.12) (end 118.11 71.755) (width 0.4318) (layer Dessous) (net 14)) (segment (start 150.495 99.695) (end 161.925 99.695) (width 0.4318) (layer Dessous) (net 15) (status 800)) - (segment (start 163.195 100.965) (end 168.275 100.965) (width 0.4318) (layer Dessous) (net 16) (status 400)) - (segment (start 161.925 102.235) (end 163.195 100.965) (width 0.4318) (layer Dessous) (net 16)) + (segment (start 161.925 99.695) (end 163.195 98.425) (width 0.4318) (layer Dessous) (net 15)) + (segment (start 163.195 98.425) (end 168.275 98.425) (width 0.4318) (layer Dessous) (net 15) (status 400)) (segment (start 147.955 102.235) (end 161.925 102.235) (width 0.4318) (layer Dessous) (net 16) (status 800)) - (segment (start 140.97 104.775) (end 140.97 105.41) (width 0.4318) (layer Dessous) (net 17)) - (segment (start 140.335 104.14) (end 140.97 104.775) (width 0.4318) (layer Dessous) (net 17)) - (segment (start 140.335 102.235) (end 140.335 104.14) (width 0.4318) (layer Dessous) (net 17) (status 800)) - (segment (start 151.13 105.41) (end 161.925 105.41) (width 0.4318) (layer Dessus) (net 17)) - (segment (start 161.925 105.41) (end 163.83 103.505) (width 0.4318) (layer Dessus) (net 17)) - (via (at 140.97 105.41) (size 1.651) (layers Dessus Dessous) (net 17)) - (segment (start 140.97 105.41) (end 151.13 105.41) (width 0.4318) (layer Dessus) (net 17)) + (segment (start 161.925 102.235) (end 163.195 100.965) (width 0.4318) (layer Dessous) (net 16)) + (segment (start 163.195 100.965) (end 168.275 100.965) (width 0.4318) (layer Dessous) (net 16) (status 400)) (segment (start 163.83 103.505) (end 168.275 103.505) (width 0.4318) (layer Dessus) (net 17) (status 400)) - (segment (start 182.88 109.22) (end 183.515 108.585) (width 0.4318) (layer Dessus) (net 18)) - (via (at 135.255 107.315) (size 1.651) (layers Dessus Dessous) (net 18)) - (segment (start 141.605 109.22) (end 182.88 109.22) (width 0.4318) (layer Dessus) (net 18)) - (segment (start 140.335 107.95) (end 141.605 109.22) (width 0.4318) (layer Dessus) (net 18)) - (segment (start 183.515 108.585) (end 183.515 106.045) (width 0.4318) (layer Dessus) (net 18) (status 400)) - (segment (start 136.525 103.505) (end 136.525 100.965) (width 0.4318) (layer Dessous) (net 18)) - (segment (start 135.255 104.775) (end 136.525 103.505) (width 0.4318) (layer Dessous) (net 18)) - (segment (start 140.335 107.95) (end 137.16 107.95) (width 0.4318) (layer Dessus) (net 18)) - (segment (start 175.895 106.045) (end 183.515 106.045) (width 0.4318) (layer Dessous) (net 18) (status C00)) - (segment (start 136.525 107.315) (end 135.255 107.315) (width 0.4318) (layer Dessus) (net 18)) - (segment (start 136.525 100.965) (end 137.795 99.695) (width 0.4318) (layer Dessous) (net 18) (status 400)) - (segment (start 137.16 107.95) (end 136.525 107.315) (width 0.4318) (layer Dessus) (net 18)) + (segment (start 140.97 105.41) (end 151.13 105.41) (width 0.4318) (layer Dessus) (net 17)) + (via (at 140.97 105.41) (size 1.651) (layers Dessus Dessous) (net 17)) + (segment (start 161.925 105.41) (end 163.83 103.505) (width 0.4318) (layer Dessus) (net 17)) + (segment (start 151.13 105.41) (end 161.925 105.41) (width 0.4318) (layer Dessus) (net 17)) + (segment (start 140.335 102.235) (end 140.335 104.14) (width 0.4318) (layer Dessous) (net 17) (status 800)) + (segment (start 140.335 104.14) (end 140.97 104.775) (width 0.4318) (layer Dessous) (net 17)) + (segment (start 140.97 104.775) (end 140.97 105.41) (width 0.4318) (layer Dessous) (net 17)) (segment (start 135.255 107.315) (end 135.255 104.775) (width 0.4318) (layer Dessous) (net 18)) - (segment (start 139.065 106.68) (end 140.335 106.68) (width 0.4318) (layer Dessus) (net 19)) - (segment (start 137.795 104.14) (end 137.16 104.775) (width 0.4318) (layer Dessous) (net 19)) - (segment (start 140.335 106.68) (end 140.97 107.315) (width 0.4318) (layer Dessus) (net 19)) - (via (at 137.16 106.045) (size 1.651) (layers Dessus Dessous) (net 19)) - (segment (start 183.515 103.505) (end 181.61 103.505) (width 0.4318) (layer Dessus) (net 19) (status 800)) - (segment (start 137.16 104.775) (end 137.16 106.045) (width 0.4318) (layer Dessous) (net 19)) - (segment (start 181.61 103.505) (end 177.165 107.95) (width 0.4318) (layer Dessus) (net 19)) - (segment (start 144.145 107.95) (end 143.51 107.315) (width 0.4318) (layer Dessus) (net 19)) - (segment (start 138.43 106.045) (end 139.065 106.68) (width 0.4318) (layer Dessus) (net 19)) - (segment (start 177.165 107.95) (end 144.145 107.95) (width 0.4318) (layer Dessus) (net 19)) - (segment (start 137.795 104.14) (end 137.795 102.235) (width 0.4318) (layer Dessous) (net 19) (status 400)) - (segment (start 143.51 107.315) (end 140.97 107.315) (width 0.4318) (layer Dessus) (net 19)) - (segment (start 137.16 106.045) (end 138.43 106.045) (width 0.4318) (layer Dessus) (net 19)) + (segment (start 137.16 107.95) (end 136.525 107.315) (width 0.4318) (layer Dessus) (net 18)) + (segment (start 136.525 100.965) (end 137.795 99.695) (width 0.4318) (layer Dessous) (net 18) (status 400)) + (segment (start 136.525 107.315) (end 135.255 107.315) (width 0.4318) (layer Dessus) (net 18)) + (segment (start 175.895 106.045) (end 183.515 106.045) (width 0.4318) (layer Dessous) (net 18) (status C00)) + (segment (start 140.335 107.95) (end 137.16 107.95) (width 0.4318) (layer Dessus) (net 18)) + (segment (start 135.255 104.775) (end 136.525 103.505) (width 0.4318) (layer Dessous) (net 18)) + (segment (start 136.525 103.505) (end 136.525 100.965) (width 0.4318) (layer Dessous) (net 18)) + (segment (start 183.515 108.585) (end 183.515 106.045) (width 0.4318) (layer Dessus) (net 18) (status 400)) + (segment (start 140.335 107.95) (end 141.605 109.22) (width 0.4318) (layer Dessus) (net 18)) + (segment (start 141.605 109.22) (end 182.88 109.22) (width 0.4318) (layer Dessus) (net 18)) + (via (at 135.255 107.315) (size 1.651) (layers Dessus Dessous) (net 18)) + (segment (start 182.88 109.22) (end 183.515 108.585) (width 0.4318) (layer Dessus) (net 18)) (segment (start 183.515 103.505) (end 175.895 103.505) (width 0.4318) (layer Dessous) (net 19) (status C00)) - (segment (start 163.195 99.695) (end 172.72 99.695) (width 0.4318) (layer Dessous) (net 20)) - (segment (start 175.895 100.965) (end 173.99 100.965) (width 0.4318) (layer Dessous) (net 20) (status 800)) - (segment (start 161.925 100.965) (end 163.195 99.695) (width 0.4318) (layer Dessous) (net 20)) - (segment (start 146.685 100.965) (end 161.925 100.965) (width 0.4318) (layer Dessous) (net 20)) - (segment (start 173.99 100.965) (end 172.72 99.695) (width 0.4318) (layer Dessous) (net 20)) - (segment (start 145.415 99.695) (end 146.685 100.965) (width 0.4318) (layer Dessous) (net 20) (status 800)) - (segment (start 180.975 100.965) (end 175.895 100.965) (width 0.4318) (layer Dessous) (net 20) (status 400)) + (segment (start 137.16 106.045) (end 138.43 106.045) (width 0.4318) (layer Dessus) (net 19)) + (segment (start 143.51 107.315) (end 140.97 107.315) (width 0.4318) (layer Dessus) (net 19)) + (segment (start 137.795 104.14) (end 137.795 102.235) (width 0.4318) (layer Dessous) (net 19) (status 400)) + (segment (start 177.165 107.95) (end 144.145 107.95) (width 0.4318) (layer Dessus) (net 19)) + (segment (start 138.43 106.045) (end 139.065 106.68) (width 0.4318) (layer Dessus) (net 19)) + (segment (start 144.145 107.95) (end 143.51 107.315) (width 0.4318) (layer Dessus) (net 19)) + (segment (start 181.61 103.505) (end 177.165 107.95) (width 0.4318) (layer Dessus) (net 19)) + (segment (start 137.16 104.775) (end 137.16 106.045) (width 0.4318) (layer Dessous) (net 19)) + (segment (start 183.515 103.505) (end 181.61 103.505) (width 0.4318) (layer Dessus) (net 19) (status 800)) + (via (at 137.16 106.045) (size 1.651) (layers Dessus Dessous) (net 19)) + (segment (start 140.335 106.68) (end 140.97 107.315) (width 0.4318) (layer Dessus) (net 19)) + (segment (start 137.795 104.14) (end 137.16 104.775) (width 0.4318) (layer Dessous) (net 19)) + (segment (start 139.065 106.68) (end 140.335 106.68) (width 0.4318) (layer Dessus) (net 19)) (segment (start 180.975 100.965) (end 183.515 100.965) (width 0.4318) (layer Dessous) (net 20) (status 400)) - (segment (start 147.955 99.695) (end 149.225 98.425) (width 0.4318) (layer Dessous) (net 21) (status 800)) - (segment (start 173.355 98.425) (end 172.085 97.155) (width 0.4318) (layer Dessous) (net 21)) - (segment (start 149.225 98.425) (end 161.925 98.425) (width 0.4318) (layer Dessous) (net 21)) - (segment (start 163.195 97.155) (end 172.085 97.155) (width 0.4318) (layer Dessous) (net 21)) - (segment (start 161.925 98.425) (end 163.195 97.155) (width 0.4318) (layer Dessous) (net 21)) - (segment (start 180.975 98.425) (end 183.515 98.425) (width 0.4318) (layer Dessous) (net 21) (status 400)) - (segment (start 180.975 98.425) (end 175.895 98.425) (width 0.4318) (layer Dessous) (net 21) (status 400)) + (segment (start 180.975 100.965) (end 175.895 100.965) (width 0.4318) (layer Dessous) (net 20) (status 400)) + (segment (start 145.415 99.695) (end 146.685 100.965) (width 0.4318) (layer Dessous) (net 20) (status 800)) + (segment (start 173.99 100.965) (end 172.72 99.695) (width 0.4318) (layer Dessous) (net 20)) + (segment (start 146.685 100.965) (end 161.925 100.965) (width 0.4318) (layer Dessous) (net 20)) + (segment (start 161.925 100.965) (end 163.195 99.695) (width 0.4318) (layer Dessous) (net 20)) + (segment (start 175.895 100.965) (end 173.99 100.965) (width 0.4318) (layer Dessous) (net 20) (status 800)) + (segment (start 163.195 99.695) (end 172.72 99.695) (width 0.4318) (layer Dessous) (net 20)) (segment (start 175.895 98.425) (end 173.355 98.425) (width 0.4318) (layer Dessous) (net 21) (status 800)) - (segment (start 180.975 95.885) (end 183.515 95.885) (width 0.4318) (layer Dessous) (net 22) (status 400)) - (segment (start 180.975 95.885) (end 175.895 95.885) (width 0.4318) (layer Dessous) (net 22) (status 400)) - (segment (start 158.115 95.885) (end 159.385 94.615) (width 0.4318) (layer Dessous) (net 22)) - (segment (start 149.225 95.885) (end 158.115 95.885) (width 0.4318) (layer Dessous) (net 22)) - (segment (start 159.385 94.615) (end 172.085 94.615) (width 0.4318) (layer Dessous) (net 22)) - (segment (start 147.955 97.155) (end 149.225 95.885) (width 0.4318) (layer Dessous) (net 22) (status 800)) - (segment (start 173.99 95.885) (end 172.72 94.615) (width 0.4318) (layer Dessous) (net 22)) - (segment (start 175.895 95.885) (end 173.99 95.885) (width 0.4318) (layer Dessous) (net 22) (status 800)) + (segment (start 180.975 98.425) (end 175.895 98.425) (width 0.4318) (layer Dessous) (net 21) (status 400)) + (segment (start 180.975 98.425) (end 183.515 98.425) (width 0.4318) (layer Dessous) (net 21) (status 400)) + (segment (start 161.925 98.425) (end 163.195 97.155) (width 0.4318) (layer Dessous) (net 21)) + (segment (start 163.195 97.155) (end 172.085 97.155) (width 0.4318) (layer Dessous) (net 21)) + (segment (start 149.225 98.425) (end 161.925 98.425) (width 0.4318) (layer Dessous) (net 21)) + (segment (start 173.355 98.425) (end 172.085 97.155) (width 0.4318) (layer Dessous) (net 21)) + (segment (start 147.955 99.695) (end 149.225 98.425) (width 0.4318) (layer Dessous) (net 21) (status 800)) (segment (start 172.72 94.615) (end 172.085 94.615) (width 0.4318) (layer Dessous) (net 22)) - (segment (start 150.495 97.155) (end 159.385 97.155) (width 0.4318) (layer Dessous) (net 23) (status 800)) - (segment (start 160.655 95.885) (end 168.275 95.885) (width 0.4318) (layer Dessous) (net 23) (status 400)) + (segment (start 175.895 95.885) (end 173.99 95.885) (width 0.4318) (layer Dessous) (net 22) (status 800)) + (segment (start 173.99 95.885) (end 172.72 94.615) (width 0.4318) (layer Dessous) (net 22)) + (segment (start 147.955 97.155) (end 149.225 95.885) (width 0.4318) (layer Dessous) (net 22) (status 800)) + (segment (start 159.385 94.615) (end 172.085 94.615) (width 0.4318) (layer Dessous) (net 22)) + (segment (start 149.225 95.885) (end 158.115 95.885) (width 0.4318) (layer Dessous) (net 22)) + (segment (start 158.115 95.885) (end 159.385 94.615) (width 0.4318) (layer Dessous) (net 22)) + (segment (start 180.975 95.885) (end 175.895 95.885) (width 0.4318) (layer Dessous) (net 22) (status 400)) + (segment (start 180.975 95.885) (end 183.515 95.885) (width 0.4318) (layer Dessous) (net 22) (status 400)) (segment (start 159.385 97.155) (end 160.655 95.885) (width 0.4318) (layer Dessous) (net 23)) - (segment (start 150.495 94.615) (end 151.765 93.345) (width 0.4318) (layer Dessous) (net 24) (status 800)) + (segment (start 160.655 95.885) (end 168.275 95.885) (width 0.4318) (layer Dessous) (net 23) (status 400)) + (segment (start 150.495 97.155) (end 159.385 97.155) (width 0.4318) (layer Dessous) (net 23) (status 800)) (segment (start 151.765 93.345) (end 168.275 93.345) (width 0.4318) (layer Dessous) (net 24) (status 400)) - (segment (start 150.495 89.535) (end 172.72 89.535) (width 0.4318) (layer Dessous) (net 25) (status 800)) - (segment (start 180.975 90.805) (end 183.515 90.805) (width 0.4318) (layer Dessous) (net 25) (status 400)) - (segment (start 180.975 90.805) (end 175.895 90.805) (width 0.4318) (layer Dessous) (net 25) (status 400)) - (segment (start 175.895 90.805) (end 173.99 90.805) (width 0.4318) (layer Dessous) (net 25) (status 800)) + (segment (start 150.495 94.615) (end 151.765 93.345) (width 0.4318) (layer Dessous) (net 24) (status 800)) (segment (start 173.99 90.805) (end 172.72 89.535) (width 0.4318) (layer Dessous) (net 25)) - (segment (start 173.99 85.725) (end 172.72 84.455) (width 0.4318) (layer Dessous) (net 26)) - (segment (start 180.975 85.725) (end 183.515 85.725) (width 0.4318) (layer Dessous) (net 26) (status 400)) - (segment (start 175.895 85.725) (end 180.975 85.725) (width 0.4318) (layer Dessous) (net 26) (status 800)) - (segment (start 150.495 84.455) (end 172.72 84.455) (width 0.4318) (layer Dessous) (net 26) (status 800)) + (segment (start 175.895 90.805) (end 173.99 90.805) (width 0.4318) (layer Dessous) (net 25) (status 800)) + (segment (start 180.975 90.805) (end 175.895 90.805) (width 0.4318) (layer Dessous) (net 25) (status 400)) + (segment (start 180.975 90.805) (end 183.515 90.805) (width 0.4318) (layer Dessous) (net 25) (status 400)) + (segment (start 150.495 89.535) (end 172.72 89.535) (width 0.4318) (layer Dessous) (net 25) (status 800)) (segment (start 175.895 85.725) (end 173.99 85.725) (width 0.4318) (layer Dessous) (net 26) (status 800)) - (segment (start 158.115 73.025) (end 160.655 75.565) (width 0.4318) (layer Dessous) (net 27)) - (segment (start 149.225 73.025) (end 158.115 73.025) (width 0.4318) (layer Dessous) (net 27)) - (segment (start 160.655 75.565) (end 168.275 75.565) (width 0.4318) (layer Dessous) (net 27) (status 400)) + (segment (start 150.495 84.455) (end 172.72 84.455) (width 0.4318) (layer Dessous) (net 26) (status 800)) + (segment (start 175.895 85.725) (end 180.975 85.725) (width 0.4318) (layer Dessous) (net 26) (status 800)) + (segment (start 180.975 85.725) (end 183.515 85.725) (width 0.4318) (layer Dessous) (net 26) (status 400)) + (segment (start 173.99 85.725) (end 172.72 84.455) (width 0.4318) (layer Dessous) (net 26)) (segment (start 147.955 74.295) (end 149.225 73.025) (width 0.4318) (layer Dessous) (net 27) (status 800)) - (segment (start 160.655 76.835) (end 170.815 76.835) (width 0.4318) (layer Dessous) (net 28)) - (segment (start 158.115 74.295) (end 150.495 74.295) (width 0.4318) (layer Dessous) (net 28) (status 400)) - (segment (start 170.815 76.835) (end 172.085 78.105) (width 0.4318) (layer Dessous) (net 28)) - (segment (start 158.115 74.295) (end 160.655 76.835) (width 0.4318) (layer Dessous) (net 28)) - (segment (start 175.895 78.105) (end 183.515 78.105) (width 0.4318) (layer Dessous) (net 28) (status C00)) + (segment (start 160.655 75.565) (end 168.275 75.565) (width 0.4318) (layer Dessous) (net 27) (status 400)) + (segment (start 149.225 73.025) (end 158.115 73.025) (width 0.4318) (layer Dessous) (net 27)) + (segment (start 158.115 73.025) (end 160.655 75.565) (width 0.4318) (layer Dessous) (net 27)) (segment (start 175.895 78.105) (end 172.085 78.105) (width 0.4318) (layer Dessous) (net 28) (status 800)) - (segment (start 145.415 71.755) (end 145.415 68.58) (width 0.4318) (layer Dessous) (net 29) (status 800)) - (segment (start 160.655 66.675) (end 165.735 66.675) (width 0.4318) (layer Dessous) (net 29) (status 400)) - (segment (start 145.415 68.58) (end 146.05 67.945) (width 0.4318) (layer Dessous) (net 29)) - (segment (start 159.385 67.945) (end 160.655 66.675) (width 0.4318) (layer Dessous) (net 29)) + (segment (start 175.895 78.105) (end 183.515 78.105) (width 0.4318) (layer Dessous) (net 28) (status C00)) + (segment (start 158.115 74.295) (end 160.655 76.835) (width 0.4318) (layer Dessous) (net 28)) + (segment (start 170.815 76.835) (end 172.085 78.105) (width 0.4318) (layer Dessous) (net 28)) + (segment (start 158.115 74.295) (end 150.495 74.295) (width 0.4318) (layer Dessous) (net 28) (status 400)) + (segment (start 160.655 76.835) (end 170.815 76.835) (width 0.4318) (layer Dessous) (net 28)) (segment (start 146.05 67.945) (end 159.385 67.945) (width 0.4318) (layer Dessous) (net 29)) - (segment (start 149.225 90.805) (end 168.275 90.805) (width 0.4318) (layer Dessous) (net 30) (status 400)) + (segment (start 159.385 67.945) (end 160.655 66.675) (width 0.4318) (layer Dessous) (net 29)) + (segment (start 145.415 68.58) (end 146.05 67.945) (width 0.4318) (layer Dessous) (net 29)) + (segment (start 160.655 66.675) (end 165.735 66.675) (width 0.4318) (layer Dessous) (net 29) (status 400)) + (segment (start 145.415 71.755) (end 145.415 68.58) (width 0.4318) (layer Dessous) (net 29) (status 800)) (segment (start 147.955 92.075) (end 149.225 90.805) (width 0.4318) (layer Dessous) (net 30) (status 800)) - (segment (start 147.955 86.995) (end 149.225 88.265) (width 0.4318) (layer Dessous) (net 31) (status 800)) + (segment (start 149.225 90.805) (end 168.275 90.805) (width 0.4318) (layer Dessous) (net 30) (status 400)) (segment (start 149.225 88.265) (end 168.275 88.265) (width 0.4318) (layer Dessous) (net 31) (status 400)) - (segment (start 168.275 85.725) (end 149.225 85.725) (width 0.4318) (layer Dessous) (net 32) (status 800)) + (segment (start 147.955 86.995) (end 149.225 88.265) (width 0.4318) (layer Dessous) (net 31) (status 800)) (segment (start 149.225 85.725) (end 147.955 84.455) (width 0.4318) (layer Dessous) (net 32) (status 400)) - (segment (start 168.275 83.185) (end 149.225 83.185) (width 0.4318) (layer Dessous) (net 33) (status 800)) + (segment (start 168.275 85.725) (end 149.225 85.725) (width 0.4318) (layer Dessous) (net 32) (status 800)) (segment (start 149.225 83.185) (end 147.955 81.915) (width 0.4318) (layer Dessous) (net 33) (status 400)) - (segment (start 149.225 80.645) (end 168.275 80.645) (width 0.4318) (layer Dessous) (net 34) (status 400)) + (segment (start 168.275 83.185) (end 149.225 83.185) (width 0.4318) (layer Dessous) (net 33) (status 800)) (segment (start 147.955 79.375) (end 149.225 80.645) (width 0.4318) (layer Dessous) (net 34) (status 800)) - (segment (start 168.275 78.105) (end 159.385 78.105) (width 0.4318) (layer Dessous) (net 35) (status 800)) - (segment (start 159.385 78.105) (end 156.845 75.565) (width 0.4318) (layer Dessous) (net 35)) - (segment (start 156.845 75.565) (end 149.225 75.565) (width 0.4318) (layer Dessous) (net 35)) + (segment (start 149.225 80.645) (end 168.275 80.645) (width 0.4318) (layer Dessous) (net 34) (status 400)) (segment (start 149.225 75.565) (end 147.955 76.835) (width 0.4318) (layer Dessous) (net 35) (status 400)) - (segment (start 150.495 76.835) (end 156.845 76.835) (width 0.4318) (layer Dessous) (net 36) (status 800)) - (segment (start 175.895 80.645) (end 180.975 80.645) (width 0.4318) (layer Dessous) (net 36) (status 800)) - (segment (start 180.975 80.645) (end 183.515 80.645) (width 0.4318) (layer Dessous) (net 36) (status 400)) - (segment (start 175.895 80.645) (end 173.99 80.645) (width 0.4318) (layer Dessous) (net 36) (status 800)) - (segment (start 156.845 76.835) (end 159.385 79.375) (width 0.4318) (layer Dessous) (net 36)) - (segment (start 173.99 80.645) (end 172.72 79.375) (width 0.4318) (layer Dessous) (net 36)) + (segment (start 156.845 75.565) (end 149.225 75.565) (width 0.4318) (layer Dessous) (net 35)) + (segment (start 159.385 78.105) (end 156.845 75.565) (width 0.4318) (layer Dessous) (net 35)) + (segment (start 168.275 78.105) (end 159.385 78.105) (width 0.4318) (layer Dessous) (net 35) (status 800)) (segment (start 159.385 79.375) (end 172.72 79.375) (width 0.4318) (layer Dessous) (net 36)) - (segment (start 180.975 83.185) (end 183.515 83.185) (width 0.4318) (layer Dessous) (net 37) (status 400)) - (segment (start 175.895 83.185) (end 180.975 83.185) (width 0.4318) (layer Dessous) (net 37) (status 800)) - (segment (start 175.895 83.185) (end 173.99 83.185) (width 0.4318) (layer Dessous) (net 37) (status 800)) - (segment (start 150.495 81.915) (end 172.72 81.915) (width 0.4318) (layer Dessous) (net 37) (status 800)) + (segment (start 173.99 80.645) (end 172.72 79.375) (width 0.4318) (layer Dessous) (net 36)) + (segment (start 156.845 76.835) (end 159.385 79.375) (width 0.4318) (layer Dessous) (net 36)) + (segment (start 175.895 80.645) (end 173.99 80.645) (width 0.4318) (layer Dessous) (net 36) (status 800)) + (segment (start 180.975 80.645) (end 183.515 80.645) (width 0.4318) (layer Dessous) (net 36) (status 400)) + (segment (start 175.895 80.645) (end 180.975 80.645) (width 0.4318) (layer Dessous) (net 36) (status 800)) + (segment (start 150.495 76.835) (end 156.845 76.835) (width 0.4318) (layer Dessous) (net 36) (status 800)) (segment (start 173.99 83.185) (end 172.72 81.915) (width 0.4318) (layer Dessous) (net 37)) - (segment (start 180.975 88.265) (end 175.895 88.265) (width 0.4318) (layer Dessous) (net 38) (status 400)) - (segment (start 175.895 88.265) (end 173.99 88.265) (width 0.4318) (layer Dessous) (net 38) (status 800)) - (segment (start 150.495 86.995) (end 172.72 86.995) (width 0.4318) (layer Dessous) (net 38) (status 800)) - (segment (start 180.975 88.265) (end 183.515 88.265) (width 0.4318) (layer Dessous) (net 38) (status 400)) + (segment (start 150.495 81.915) (end 172.72 81.915) (width 0.4318) (layer Dessous) (net 37) (status 800)) + (segment (start 175.895 83.185) (end 173.99 83.185) (width 0.4318) (layer Dessous) (net 37) (status 800)) + (segment (start 175.895 83.185) (end 180.975 83.185) (width 0.4318) (layer Dessous) (net 37) (status 800)) + (segment (start 180.975 83.185) (end 183.515 83.185) (width 0.4318) (layer Dessous) (net 37) (status 400)) (segment (start 173.99 88.265) (end 172.72 86.995) (width 0.4318) (layer Dessous) (net 38)) - (segment (start 102.235 101.981) (end 112.395 101.981) (width 0.4318) (layer Dessous) (net 39) (status 800)) - (segment (start 112.395 101.981) (end 115.951 98.425) (width 0.4318) (layer Dessous) (net 39)) - (segment (start 121.285 98.425) (end 122.555 97.155) (width 0.4318) (layer Dessous) (net 39) (status 400)) + (segment (start 180.975 88.265) (end 183.515 88.265) (width 0.4318) (layer Dessous) (net 38) (status 400)) + (segment (start 150.495 86.995) (end 172.72 86.995) (width 0.4318) (layer Dessous) (net 38) (status 800)) + (segment (start 175.895 88.265) (end 173.99 88.265) (width 0.4318) (layer Dessous) (net 38) (status 800)) + (segment (start 180.975 88.265) (end 175.895 88.265) (width 0.4318) (layer Dessous) (net 38) (status 400)) (segment (start 115.951 98.425) (end 121.285 98.425) (width 0.4318) (layer Dessous) (net 39)) - (segment (start 112.395 95.885) (end 118.745 95.885) (width 0.4318) (layer Dessous) (net 40)) - (segment (start 118.745 95.885) (end 120.015 94.615) (width 0.4318) (layer Dessous) (net 40) (status 400)) - (segment (start 112.395 95.885) (end 109.22 99.06) (width 0.4318) (layer Dessous) (net 40)) - (segment (start 102.235 99.06) (end 102.235 99.314) (width 0.4318) (layer Dessous) (net 40) (status 400)) + (segment (start 121.285 98.425) (end 122.555 97.155) (width 0.4318) (layer Dessous) (net 39) (status 400)) + (segment (start 112.395 101.981) (end 115.951 98.425) (width 0.4318) (layer Dessous) (net 39)) + (segment (start 102.235 101.981) (end 112.395 101.981) (width 0.4318) (layer Dessous) (net 39) (status 800)) (segment (start 109.22 99.06) (end 102.235 99.06) (width 0.4318) (layer Dessous) (net 40)) - (segment (start 111.125 93.345) (end 117.475 93.345) (width 0.4318) (layer Dessous) (net 41)) - (segment (start 104.775 96.52) (end 105.41 95.885) (width 0.4318) (layer Dessous) (net 41)) - (segment (start 105.41 95.885) (end 108.585 95.885) (width 0.4318) (layer Dessous) (net 41)) - (segment (start 108.585 95.885) (end 111.125 93.345) (width 0.4318) (layer Dessous) (net 41)) - (segment (start 118.745 92.075) (end 120.015 92.075) (width 0.4318) (layer Dessous) (net 41) (status 400)) - (segment (start 102.235 96.52) (end 104.775 96.52) (width 0.4318) (layer Dessous) (net 41) (status 800)) + (segment (start 102.235 99.06) (end 102.235 99.314) (width 0.4318) (layer Dessous) (net 40) (status 400)) + (segment (start 112.395 95.885) (end 109.22 99.06) (width 0.4318) (layer Dessous) (net 40)) + (segment (start 118.745 95.885) (end 120.015 94.615) (width 0.4318) (layer Dessous) (net 40) (status 400)) + (segment (start 112.395 95.885) (end 118.745 95.885) (width 0.4318) (layer Dessous) (net 40)) (segment (start 117.475 93.345) (end 118.745 92.075) (width 0.4318) (layer Dessous) (net 41)) - (segment (start 107.061 92.075) (end 107.95 92.075) (width 0.4318) (layer Dessous) (net 42)) - (segment (start 116.84 90.805) (end 118.11 89.535) (width 0.4318) (layer Dessous) (net 42)) - (segment (start 107.95 92.075) (end 109.22 90.805) (width 0.4318) (layer Dessous) (net 42)) - (segment (start 105.41 93.726) (end 107.061 92.075) (width 0.4318) (layer Dessous) (net 42)) - (segment (start 109.22 90.805) (end 116.84 90.805) (width 0.4318) (layer Dessous) (net 42)) - (segment (start 118.11 89.535) (end 120.015 89.535) (width 0.4318) (layer Dessous) (net 42) (status 400)) + (segment (start 102.235 96.52) (end 104.775 96.52) (width 0.4318) (layer Dessous) (net 41) (status 800)) + (segment (start 118.745 92.075) (end 120.015 92.075) (width 0.4318) (layer Dessous) (net 41) (status 400)) + (segment (start 108.585 95.885) (end 111.125 93.345) (width 0.4318) (layer Dessous) (net 41)) + (segment (start 105.41 95.885) (end 108.585 95.885) (width 0.4318) (layer Dessous) (net 41)) + (segment (start 104.775 96.52) (end 105.41 95.885) (width 0.4318) (layer Dessous) (net 41)) + (segment (start 111.125 93.345) (end 117.475 93.345) (width 0.4318) (layer Dessous) (net 41)) (segment (start 102.235 93.726) (end 105.41 93.726) (width 0.4318) (layer Dessous) (net 42) (status 800)) - (segment (start 102.235 90.932) (end 104.775 90.932) (width 0.4318) (layer Dessous) (net 43) (status 800)) - (segment (start 104.775 90.805) (end 106.68 88.9) (width 0.4318) (layer Dessous) (net 43)) - (segment (start 116.84 84.455) (end 118.11 85.725) (width 0.4318) (layer Dessous) (net 43)) - (segment (start 118.11 85.725) (end 121.285 85.725) (width 0.4318) (layer Dessous) (net 43)) - (segment (start 106.68 87.63) (end 109.855 84.455) (width 0.4318) (layer Dessous) (net 43)) - (segment (start 109.855 84.455) (end 116.84 84.455) (width 0.4318) (layer Dessous) (net 43)) - (segment (start 104.775 90.932) (end 104.775 90.805) (width 0.4318) (layer Dessous) (net 43)) - (segment (start 106.68 88.9) (end 106.68 87.63) (width 0.4318) (layer Dessous) (net 43)) + (segment (start 118.11 89.535) (end 120.015 89.535) (width 0.4318) (layer Dessous) (net 42) (status 400)) + (segment (start 109.22 90.805) (end 116.84 90.805) (width 0.4318) (layer Dessous) (net 42)) + (segment (start 105.41 93.726) (end 107.061 92.075) (width 0.4318) (layer Dessous) (net 42)) + (segment (start 107.95 92.075) (end 109.22 90.805) (width 0.4318) (layer Dessous) (net 42)) + (segment (start 116.84 90.805) (end 118.11 89.535) (width 0.4318) (layer Dessous) (net 42)) + (segment (start 107.061 92.075) (end 107.95 92.075) (width 0.4318) (layer Dessous) (net 42)) (segment (start 121.285 85.725) (end 122.555 84.455) (width 0.4318) (layer Dessous) (net 43) (status 400)) - (segment (start 117.475 83.185) (end 118.745 84.455) (width 0.4318) (layer Dessous) (net 44)) - (segment (start 104.14 88.265) (end 109.22 83.185) (width 0.4318) (layer Dessous) (net 44)) - (segment (start 118.745 84.455) (end 120.015 84.455) (width 0.4318) (layer Dessous) (net 44) (status 400)) - (segment (start 102.235 88.265) (end 104.14 88.265) (width 0.4318) (layer Dessous) (net 44) (status 800)) + (segment (start 106.68 88.9) (end 106.68 87.63) (width 0.4318) (layer Dessous) (net 43)) + (segment (start 104.775 90.932) (end 104.775 90.805) (width 0.4318) (layer Dessous) (net 43)) + (segment (start 109.855 84.455) (end 116.84 84.455) (width 0.4318) (layer Dessous) (net 43)) + (segment (start 106.68 87.63) (end 109.855 84.455) (width 0.4318) (layer Dessous) (net 43)) + (segment (start 118.11 85.725) (end 121.285 85.725) (width 0.4318) (layer Dessous) (net 43)) + (segment (start 116.84 84.455) (end 118.11 85.725) (width 0.4318) (layer Dessous) (net 43)) + (segment (start 104.775 90.805) (end 106.68 88.9) (width 0.4318) (layer Dessous) (net 43)) + (segment (start 102.235 90.932) (end 104.775 90.932) (width 0.4318) (layer Dessous) (net 43) (status 800)) (segment (start 109.22 83.185) (end 117.475 83.185) (width 0.4318) (layer Dessous) (net 44)) - (segment (start 104.14 85.471) (end 104.14 85.09) (width 0.4318) (layer Dessous) (net 45)) - (segment (start 102.235 85.471) (end 104.14 85.471) (width 0.4318) (layer Dessous) (net 45) (status 800)) - (segment (start 104.14 85.09) (end 107.315 81.915) (width 0.4318) (layer Dessous) (net 45)) + (segment (start 102.235 88.265) (end 104.14 88.265) (width 0.4318) (layer Dessous) (net 44) (status 800)) + (segment (start 118.745 84.455) (end 120.015 84.455) (width 0.4318) (layer Dessous) (net 44) (status 400)) + (segment (start 104.14 88.265) (end 109.22 83.185) (width 0.4318) (layer Dessous) (net 44)) + (segment (start 117.475 83.185) (end 118.745 84.455) (width 0.4318) (layer Dessous) (net 44)) (segment (start 107.315 81.915) (end 120.015 81.915) (width 0.4318) (layer Dessous) (net 45) (status 400)) - (segment (start 121.285 80.645) (end 122.555 81.915) (width 0.4318) (layer Dessous) (net 46) (status 400)) - (segment (start 105.41 80.645) (end 121.285 80.645) (width 0.4318) (layer Dessous) (net 46)) - (segment (start 103.505 82.677) (end 103.505 82.55) (width 0.4318) (layer Dessous) (net 46)) - (segment (start 102.235 82.677) (end 103.505 82.677) (width 0.4318) (layer Dessous) (net 46) (status 800)) + (segment (start 104.14 85.09) (end 107.315 81.915) (width 0.4318) (layer Dessous) (net 45)) + (segment (start 102.235 85.471) (end 104.14 85.471) (width 0.4318) (layer Dessous) (net 45) (status 800)) + (segment (start 104.14 85.471) (end 104.14 85.09) (width 0.4318) (layer Dessous) (net 45)) (segment (start 103.505 82.55) (end 105.41 80.645) (width 0.4318) (layer Dessous) (net 46)) - (segment (start 102.235 104.775) (end 117.475 104.775) (width 0.4318) (layer Dessous) (net 47) (status 800)) + (segment (start 102.235 82.677) (end 103.505 82.677) (width 0.4318) (layer Dessous) (net 46) (status 800)) + (segment (start 103.505 82.677) (end 103.505 82.55) (width 0.4318) (layer Dessous) (net 46)) + (segment (start 105.41 80.645) (end 121.285 80.645) (width 0.4318) (layer Dessous) (net 46)) + (segment (start 121.285 80.645) (end 122.555 81.915) (width 0.4318) (layer Dessous) (net 46) (status 400)) (segment (start 117.475 104.775) (end 122.555 99.695) (width 0.4318) (layer Dessous) (net 47) (status 400)) - (segment (start 109.855 100.6602) (end 113.3602 97.155) (width 0.4318) (layer Dessous) (net 48)) - (segment (start 99.695 100.6602) (end 109.855 100.6602) (width 0.4318) (layer Dessous) (net 48) (status 800)) + (segment (start 102.235 104.775) (end 117.475 104.775) (width 0.4318) (layer Dessous) (net 47) (status 800)) (segment (start 113.3602 97.155) (end 120.015 97.155) (width 0.4318) (layer Dessous) (net 48) (status 400)) - (segment (start 99.695 103.2002) (end 100.965 103.2002) (width 0.4318) (layer Dessous) (net 49) (status 800)) - (segment (start 100.965 103.2002) (end 100.965 103.505) (width 0.4318) (layer Dessous) (net 49)) - (segment (start 116.205 103.505) (end 120.015 99.695) (width 0.4318) (layer Dessous) (net 49) (status 400)) + (segment (start 99.695 100.6602) (end 109.855 100.6602) (width 0.4318) (layer Dessous) (net 48) (status 800)) + (segment (start 109.855 100.6602) (end 113.3602 97.155) (width 0.4318) (layer Dessous) (net 48)) (segment (start 100.965 103.505) (end 116.205 103.505) (width 0.4318) (layer Dessous) (net 49)) - (segment (start 120.015 74.168) (end 120.015 74.295) (width 0.4318) (layer Dessous) (net 50) (status 400)) - (segment (start 111.125 74.168) (end 120.015 74.168) (width 0.4318) (layer Dessous) (net 50)) - (segment (start 108.585 71.628) (end 111.125 74.168) (width 0.4318) (layer Dessous) (net 50)) + (segment (start 116.205 103.505) (end 120.015 99.695) (width 0.4318) (layer Dessous) (net 49) (status 400)) + (segment (start 100.965 103.2002) (end 100.965 103.505) (width 0.4318) (layer Dessous) (net 49)) + (segment (start 99.695 103.2002) (end 100.965 103.2002) (width 0.4318) (layer Dessous) (net 49) (status 800)) (segment (start 102.235 71.628) (end 108.585 71.628) (width 0.4318) (layer Dessous) (net 50) (status 800)) - (segment (start 102.235 74.422) (end 109.855 74.422) (width 0.4318) (layer Dessous) (net 51) (status 800)) - (segment (start 112.268 76.835) (end 120.015 76.835) (width 0.4318) (layer Dessous) (net 51) (status 400)) + (segment (start 108.585 71.628) (end 111.125 74.168) (width 0.4318) (layer Dessous) (net 50)) + (segment (start 111.125 74.168) (end 120.015 74.168) (width 0.4318) (layer Dessous) (net 50)) + (segment (start 120.015 74.168) (end 120.015 74.295) (width 0.4318) (layer Dessous) (net 50) (status 400)) (segment (start 109.855 74.422) (end 112.268 76.835) (width 0.4318) (layer Dessous) (net 51)) - (segment (start 121.285 78.105) (end 122.555 79.375) (width 0.4318) (layer Dessous) (net 52) (status 400)) - (segment (start 102.235 77.216) (end 111.125 77.216) (width 0.4318) (layer Dessous) (net 52) (status 800)) - (segment (start 111.125 77.216) (end 112.014 78.105) (width 0.4318) (layer Dessous) (net 52)) + (segment (start 112.268 76.835) (end 120.015 76.835) (width 0.4318) (layer Dessous) (net 51) (status 400)) + (segment (start 102.235 74.422) (end 109.855 74.422) (width 0.4318) (layer Dessous) (net 51) (status 800)) (segment (start 112.014 78.105) (end 121.285 78.105) (width 0.4318) (layer Dessous) (net 52)) - (segment (start 103.505 79.883) (end 103.505 79.375) (width 0.4318) (layer Dessous) (net 53)) - (segment (start 102.235 79.883) (end 103.505 79.883) (width 0.4318) (layer Dessous) (net 53) (status 800)) + (segment (start 111.125 77.216) (end 112.014 78.105) (width 0.4318) (layer Dessous) (net 52)) + (segment (start 102.235 77.216) (end 111.125 77.216) (width 0.4318) (layer Dessous) (net 52) (status 800)) + (segment (start 121.285 78.105) (end 122.555 79.375) (width 0.4318) (layer Dessous) (net 52) (status 400)) (segment (start 103.505 79.375) (end 120.015 79.375) (width 0.4318) (layer Dessous) (net 53) (status 400)) - (segment (start 111.76 94.615) (end 117.475 94.615) (width 0.4318) (layer Dessous) (net 54)) - (segment (start 99.695 97.8662) (end 99.8728 98.044) (width 0.4318) (layer Dessous) (net 54) (status 800)) - (segment (start 99.8728 98.044) (end 104.394 98.044) (width 0.4318) (layer Dessous) (net 54)) - (segment (start 118.745 93.345) (end 121.285 93.345) (width 0.4318) (layer Dessous) (net 54)) - (segment (start 121.285 93.345) (end 122.555 92.075) (width 0.4318) (layer Dessous) (net 54) (status 400)) - (segment (start 104.394 98.044) (end 104.648 97.79) (width 0.4318) (layer Dessous) (net 54)) - (segment (start 118.745 93.345) (end 117.475 94.615) (width 0.4318) (layer Dessous) (net 54)) - (segment (start 108.585 97.79) (end 111.76 94.615) (width 0.4318) (layer Dessous) (net 54)) + (segment (start 102.235 79.883) (end 103.505 79.883) (width 0.4318) (layer Dessous) (net 53) (status 800)) + (segment (start 103.505 79.883) (end 103.505 79.375) (width 0.4318) (layer Dessous) (net 53)) (segment (start 104.648 97.79) (end 108.585 97.79) (width 0.4318) (layer Dessous) (net 54)) - (segment (start 104.775 95.123) (end 105.283 94.615) (width 0.4318) (layer Dessous) (net 55)) - (segment (start 108.585 94.615) (end 111.125 92.075) (width 0.4318) (layer Dessous) (net 55)) - (segment (start 121.285 90.805) (end 122.555 89.535) (width 0.4318) (layer Dessous) (net 55) (status 400)) - (segment (start 118.745 90.805) (end 121.285 90.805) (width 0.4318) (layer Dessous) (net 55)) - (segment (start 117.475 92.075) (end 118.745 90.805) (width 0.4318) (layer Dessous) (net 55)) - (segment (start 111.125 92.075) (end 117.475 92.075) (width 0.4318) (layer Dessous) (net 55)) - (segment (start 99.695 95.123) (end 104.775 95.123) (width 0.4318) (layer Dessous) (net 55) (status 800)) + (segment (start 108.585 97.79) (end 111.76 94.615) (width 0.4318) (layer Dessous) (net 54)) + (segment (start 118.745 93.345) (end 117.475 94.615) (width 0.4318) (layer Dessous) (net 54)) + (segment (start 104.394 98.044) (end 104.648 97.79) (width 0.4318) (layer Dessous) (net 54)) + (segment (start 121.285 93.345) (end 122.555 92.075) (width 0.4318) (layer Dessous) (net 54) (status 400)) + (segment (start 118.745 93.345) (end 121.285 93.345) (width 0.4318) (layer Dessous) (net 54)) + (segment (start 99.8728 98.044) (end 104.394 98.044) (width 0.4318) (layer Dessous) (net 54)) + (segment (start 99.695 97.8662) (end 99.8728 98.044) (width 0.4318) (layer Dessous) (net 54) (status 800)) + (segment (start 111.76 94.615) (end 117.475 94.615) (width 0.4318) (layer Dessous) (net 54)) (segment (start 105.283 94.615) (end 108.585 94.615) (width 0.4318) (layer Dessous) (net 55)) - (segment (start 116.84 86.995) (end 120.015 86.995) (width 0.4318) (layer Dessous) (net 56) (status 400)) - (segment (start 116.205 86.36) (end 116.84 86.995) (width 0.4318) (layer Dessous) (net 56)) + (segment (start 99.695 95.123) (end 104.775 95.123) (width 0.4318) (layer Dessous) (net 55) (status 800)) + (segment (start 111.125 92.075) (end 117.475 92.075) (width 0.4318) (layer Dessous) (net 55)) + (segment (start 117.475 92.075) (end 118.745 90.805) (width 0.4318) (layer Dessous) (net 55)) + (segment (start 118.745 90.805) (end 121.285 90.805) (width 0.4318) (layer Dessous) (net 55)) + (segment (start 121.285 90.805) (end 122.555 89.535) (width 0.4318) (layer Dessous) (net 55) (status 400)) + (segment (start 108.585 94.615) (end 111.125 92.075) (width 0.4318) (layer Dessous) (net 55)) + (segment (start 104.775 95.123) (end 105.283 94.615) (width 0.4318) (layer Dessous) (net 55)) (segment (start 113.665 86.36) (end 116.205 86.36) (width 0.4318) (layer Dessous) (net 56) (status 800)) - (segment (start 113.665 88.9) (end 116.205 88.9) (width 0.4318) (layer Dessous) (net 57) (status 800)) - (segment (start 121.285 88.265) (end 122.555 86.995) (width 0.4318) (layer Dessous) (net 57) (status 400)) - (segment (start 116.84 88.265) (end 121.285 88.265) (width 0.4318) (layer Dessous) (net 57)) + (segment (start 116.205 86.36) (end 116.84 86.995) (width 0.4318) (layer Dessous) (net 56)) + (segment (start 116.84 86.995) (end 120.015 86.995) (width 0.4318) (layer Dessous) (net 56) (status 400)) (segment (start 116.205 88.9) (end 116.84 88.265) (width 0.4318) (layer Dessous) (net 57)) - (segment (start 175.895 75.565) (end 172.085 75.565) (width 0.4318) (layer Dessous) (net 58) (status 800)) - (segment (start 170.815 74.295) (end 161.925 74.295) (width 0.4318) (layer Dessous) (net 58)) - (segment (start 159.385 71.755) (end 147.955 71.755) (width 0.4318) (layer Dessous) (net 58) (status 400)) - (segment (start 170.815 74.295) (end 172.085 75.565) (width 0.4318) (layer Dessous) (net 58)) - (segment (start 161.925 74.295) (end 159.385 71.755) (width 0.4318) (layer Dessous) (net 58)) + (segment (start 116.84 88.265) (end 121.285 88.265) (width 0.4318) (layer Dessous) (net 57)) + (segment (start 121.285 88.265) (end 122.555 86.995) (width 0.4318) (layer Dessous) (net 57) (status 400)) + (segment (start 113.665 88.9) (end 116.205 88.9) (width 0.4318) (layer Dessous) (net 57) (status 800)) (segment (start 175.895 75.565) (end 183.515 75.565) (width 0.4318) (layer Dessous) (net 58) (status C00)) - (segment (start 120.015 69.215) (end 120.65 69.85) (width 0.4318) (layer Dessous) (net 59)) - (segment (start 121.92 48.895) (end 135.89 48.895) (width 0.4318) (layer Dessus) (net 59)) - (segment (start 150.495 51.435) (end 154.305 51.435) (width 0.4318) (layer Dessous) (net 59) (status 400)) - (segment (start 147.955 53.975) (end 150.495 51.435) (width 0.4318) (layer Dessous) (net 59) (status 800)) - (segment (start 120.65 69.85) (end 123.19 69.85) (width 0.4318) (layer Dessous) (net 59)) - (segment (start 120.015 50.8) (end 121.92 48.895) (width 0.4318) (layer Dessus) (net 59)) - (segment (start 120.015 67.945) (end 120.015 50.8) (width 0.4318) (layer Dessus) (net 59)) - (segment (start 120.015 67.945) (end 120.015 69.215) (width 0.4318) (layer Dessous) (net 59)) - (segment (start 135.89 48.895) (end 139.065 52.07) (width 0.4318) (layer Dessus) (net 59)) - (segment (start 147.955 53.975) (end 146.05 52.07) (width 0.4318) (layer Dessus) (net 59) (status 800)) - (via (at 120.015 67.945) (size 1.651) (layers Dessus Dessous) (net 59)) - (segment (start 123.19 69.85) (end 125.095 71.755) (width 0.4318) (layer Dessous) (net 59) (status 400)) + (segment (start 161.925 74.295) (end 159.385 71.755) (width 0.4318) (layer Dessous) (net 58)) + (segment (start 170.815 74.295) (end 172.085 75.565) (width 0.4318) (layer Dessous) (net 58)) + (segment (start 159.385 71.755) (end 147.955 71.755) (width 0.4318) (layer Dessous) (net 58) (status 400)) + (segment (start 170.815 74.295) (end 161.925 74.295) (width 0.4318) (layer Dessous) (net 58)) + (segment (start 175.895 75.565) (end 172.085 75.565) (width 0.4318) (layer Dessous) (net 58) (status 800)) (segment (start 139.065 52.07) (end 146.05 52.07) (width 0.4318) (layer Dessus) (net 59)) - (via (at 121.92 67.945) (size 1.651) (layers Dessus Dessous) (net 60)) - (segment (start 123.19 52.07) (end 121.92 53.34) (width 0.4318) (layer Dessus) (net 60)) - (segment (start 121.92 67.945) (end 121.92 53.34) (width 0.4318) (layer Dessus) (net 60)) - (segment (start 126.365 70.485) (end 123.825 67.945) (width 0.4318) (layer Dessous) (net 60)) - (segment (start 135.89 52.07) (end 139.065 55.245) (width 0.4318) (layer Dessus) (net 60)) - (segment (start 150.495 55.245) (end 150.495 53.975) (width 0.4318) (layer Dessus) (net 60) (status 400)) - (segment (start 161.925 51.435) (end 168.275 51.435) (width 0.4318) (layer Dessous) (net 60) (status 400)) - (segment (start 144.145 55.88) (end 149.86 55.88) (width 0.4318) (layer Dessus) (net 60)) - (segment (start 135.89 52.07) (end 123.19 52.07) (width 0.4318) (layer Dessus) (net 60)) - (segment (start 127.635 74.295) (end 126.365 73.025) (width 0.4318) (layer Dessous) (net 60) (status 800)) - (segment (start 126.365 73.025) (end 126.365 70.485) (width 0.4318) (layer Dessous) (net 60)) - (segment (start 143.51 55.245) (end 144.145 55.88) (width 0.4318) (layer Dessus) (net 60)) - (segment (start 123.825 67.945) (end 121.92 67.945) (width 0.4318) (layer Dessous) (net 60)) - (segment (start 149.86 55.88) (end 150.495 55.245) (width 0.4318) (layer Dessus) (net 60)) - (segment (start 150.495 53.975) (end 159.385 53.975) (width 0.4318) (layer Dessous) (net 60) (status 800)) - (segment (start 139.065 55.245) (end 143.51 55.245) (width 0.4318) (layer Dessus) (net 60)) + (segment (start 123.19 69.85) (end 125.095 71.755) (width 0.4318) (layer Dessous) (net 59) (status 400)) + (via (at 120.015 67.945) (size 1.651) (layers Dessus Dessous) (net 59)) + (segment (start 147.955 53.975) (end 146.05 52.07) (width 0.4318) (layer Dessus) (net 59) (status 800)) + (segment (start 135.89 48.895) (end 139.065 52.07) (width 0.4318) (layer Dessus) (net 59)) + (segment (start 120.015 67.945) (end 120.015 69.215) (width 0.4318) (layer Dessous) (net 59)) + (segment (start 120.015 67.945) (end 120.015 50.8) (width 0.4318) (layer Dessus) (net 59)) + (segment (start 120.015 50.8) (end 121.92 48.895) (width 0.4318) (layer Dessus) (net 59)) + (segment (start 120.65 69.85) (end 123.19 69.85) (width 0.4318) (layer Dessous) (net 59)) + (segment (start 147.955 53.975) (end 150.495 51.435) (width 0.4318) (layer Dessous) (net 59) (status 800)) + (segment (start 150.495 51.435) (end 154.305 51.435) (width 0.4318) (layer Dessous) (net 59) (status 400)) + (segment (start 121.92 48.895) (end 135.89 48.895) (width 0.4318) (layer Dessus) (net 59)) + (segment (start 120.015 69.215) (end 120.65 69.85) (width 0.4318) (layer Dessous) (net 59)) (segment (start 159.385 53.975) (end 161.925 51.435) (width 0.4318) (layer Dessous) (net 60)) - (segment (start 154.94 125.73) (end 154.94 129.54) (width 0.4318) (layer Dessous) (net 61)) - (segment (start 153.035 123.825) (end 154.94 125.73) (width 0.4318) (layer Dessous) (net 61)) - (segment (start 153.035 122.555) (end 153.035 123.19) (width 0.4318) (layer Dessous) (net 61)) - (segment (start 153.035 123.19) (end 153.035 123.825) (width 0.4318) (layer Dessous) (net 61)) - (segment (start 145.415 113.665) (end 145.415 102.235) (width 0.4318) (layer Dessous) (net 61) (status 400)) - (segment (start 153.035 121.285) (end 153.035 122.555) (width 0.4318) (layer Dessous) (net 61)) - (segment (start 155.575 130.175) (end 155.575 133.35) (width 0.4318) (layer Dessous) (net 61) (status 400)) - (segment (start 154.94 129.54) (end 155.575 130.175) (width 0.4318) (layer Dessous) (net 61)) + (segment (start 139.065 55.245) (end 143.51 55.245) (width 0.4318) (layer Dessus) (net 60)) + (segment (start 150.495 53.975) (end 159.385 53.975) (width 0.4318) (layer Dessous) (net 60) (status 800)) + (segment (start 149.86 55.88) (end 150.495 55.245) (width 0.4318) (layer Dessus) (net 60)) + (segment (start 123.825 67.945) (end 121.92 67.945) (width 0.4318) (layer Dessous) (net 60)) + (segment (start 143.51 55.245) (end 144.145 55.88) (width 0.4318) (layer Dessus) (net 60)) + (segment (start 126.365 73.025) (end 126.365 70.485) (width 0.4318) (layer Dessous) (net 60)) + (segment (start 127.635 74.295) (end 126.365 73.025) (width 0.4318) (layer Dessous) (net 60) (status 800)) + (segment (start 135.89 52.07) (end 123.19 52.07) (width 0.4318) (layer Dessus) (net 60)) + (segment (start 144.145 55.88) (end 149.86 55.88) (width 0.4318) (layer Dessus) (net 60)) + (segment (start 161.925 51.435) (end 168.275 51.435) (width 0.4318) (layer Dessous) (net 60) (status 400)) + (segment (start 150.495 55.245) (end 150.495 53.975) (width 0.4318) (layer Dessus) (net 60) (status 400)) + (segment (start 135.89 52.07) (end 139.065 55.245) (width 0.4318) (layer Dessus) (net 60)) + (segment (start 126.365 70.485) (end 123.825 67.945) (width 0.4318) (layer Dessous) (net 60)) + (segment (start 121.92 67.945) (end 121.92 53.34) (width 0.4318) (layer Dessus) (net 60)) + (segment (start 123.19 52.07) (end 121.92 53.34) (width 0.4318) (layer Dessus) (net 60)) + (via (at 121.92 67.945) (size 1.651) (layers Dessus Dessous) (net 60)) (segment (start 153.035 121.285) (end 145.415 113.665) (width 0.4318) (layer Dessous) (net 61)) - (segment (start 152.4 129.54) (end 152.4 130.175) (width 0.4318) (layer Dessous) (net 62)) - (segment (start 151.765 128.905) (end 152.4 129.54) (width 0.4318) (layer Dessous) (net 62)) - (segment (start 152.781 133.35) (end 152.781 130.175) (width 0.4318) (layer Dessous) (net 62) (status 800)) - (segment (start 144.145 103.505) (end 144.145 114.935) (width 0.4318) (layer Dessous) (net 62)) - (segment (start 142.875 102.235) (end 144.145 103.505) (width 0.4318) (layer Dessous) (net 62) (status 800)) - (segment (start 144.145 114.935) (end 151.765 122.555) (width 0.4318) (layer Dessous) (net 62)) - (segment (start 151.765 122.555) (end 151.765 128.905) (width 0.4318) (layer Dessous) (net 62)) + (segment (start 154.94 129.54) (end 155.575 130.175) (width 0.4318) (layer Dessous) (net 61)) + (segment (start 155.575 130.175) (end 155.575 133.35) (width 0.4318) (layer Dessous) (net 61) (status 400)) + (segment (start 153.035 121.285) (end 153.035 122.555) (width 0.4318) (layer Dessous) (net 61)) + (segment (start 145.415 113.665) (end 145.415 102.235) (width 0.4318) (layer Dessous) (net 61) (status 400)) + (segment (start 153.035 123.19) (end 153.035 123.825) (width 0.4318) (layer Dessous) (net 61)) + (segment (start 153.035 122.555) (end 153.035 123.19) (width 0.4318) (layer Dessous) (net 61)) + (segment (start 153.035 123.825) (end 154.94 125.73) (width 0.4318) (layer Dessous) (net 61)) + (segment (start 154.94 125.73) (end 154.94 129.54) (width 0.4318) (layer Dessous) (net 61)) (segment (start 152.781 130.175) (end 152.4 130.175) (width 0.4318) (layer Dessous) (net 62)) - (via (at 149.86 128.27) (size 1.651) (layers Dessus Dessous) (net 63)) - (segment (start 149.86 128.27) (end 149.86 130.175) (width 0.4318) (layer Dessous) (net 63)) - (segment (start 149.987 133.35) (end 149.987 130.175) (width 0.4318) (layer Dessous) (net 63) (status 800)) - (segment (start 154.305 102.235) (end 152.4 104.14) (width 0.4318) (layer Dessus) (net 63)) - (segment (start 144.145 73.025) (end 142.875 74.295) (width 0.4318) (layer Dessous) (net 63) (status 400)) - (segment (start 144.78 66.675) (end 151.765 66.675) (width 0.4318) (layer Dessous) (net 63)) - (segment (start 144.145 67.31) (end 144.78 66.675) (width 0.4318) (layer Dessous) (net 63)) - (segment (start 152.4 66.04) (end 154.305 66.04) (width 0.4318) (layer Dessous) (net 63)) - (segment (start 149.987 130.175) (end 149.86 130.175) (width 0.4318) (layer Dessous) (net 63)) - (segment (start 154.305 102.235) (end 154.305 66.04) (width 0.4318) (layer Dessus) (net 63)) - (via (at 154.305 66.04) (size 1.651) (layers Dessus Dessous) (net 63)) - (segment (start 151.765 66.675) (end 152.4 66.04) (width 0.4318) (layer Dessous) (net 63)) - (segment (start 145.415 128.27) (end 149.86 128.27) (width 0.4318) (layer Dessus) (net 63)) - (segment (start 118.11 129.54) (end 144.145 129.54) (width 0.4318) (layer Dessus) (net 63)) - (segment (start 116.205 127.635) (end 118.11 129.54) (width 0.4318) (layer Dessus) (net 63)) - (segment (start 116.205 108.585) (end 116.205 127.635) (width 0.4318) (layer Dessus) (net 63)) - (segment (start 144.145 67.31) (end 144.145 73.025) (width 0.4318) (layer Dessous) (net 63)) - (segment (start 120.65 104.14) (end 116.205 108.585) (width 0.4318) (layer Dessus) (net 63)) - (segment (start 139.573 104.14) (end 120.65 104.14) (width 0.4318) (layer Dessus) (net 63)) - (segment (start 139.827 103.886) (end 139.573 104.14) (width 0.4318) (layer Dessus) (net 63)) - (segment (start 144.145 129.54) (end 145.415 128.27) (width 0.4318) (layer Dessus) (net 63)) - (segment (start 141.986 103.886) (end 139.827 103.886) (width 0.4318) (layer Dessus) (net 63)) - (segment (start 142.24 104.14) (end 141.986 103.886) (width 0.4318) (layer Dessus) (net 63)) + (segment (start 151.765 122.555) (end 151.765 128.905) (width 0.4318) (layer Dessous) (net 62)) + (segment (start 144.145 114.935) (end 151.765 122.555) (width 0.4318) (layer Dessous) (net 62)) + (segment (start 142.875 102.235) (end 144.145 103.505) (width 0.4318) (layer Dessous) (net 62) (status 800)) + (segment (start 144.145 103.505) (end 144.145 114.935) (width 0.4318) (layer Dessous) (net 62)) + (segment (start 152.781 133.35) (end 152.781 130.175) (width 0.4318) (layer Dessous) (net 62) (status 800)) + (segment (start 151.765 128.905) (end 152.4 129.54) (width 0.4318) (layer Dessous) (net 62)) + (segment (start 152.4 129.54) (end 152.4 130.175) (width 0.4318) (layer Dessous) (net 62)) (segment (start 152.4 104.14) (end 142.24 104.14) (width 0.4318) (layer Dessus) (net 63)) - (via (at 147.32 125.095) (size 1.651) (layers Dessus Dessous) (net 64)) - (segment (start 147.32 123.825) (end 147.32 125.095) (width 0.4318) (layer Dessous) (net 64)) - (segment (start 147.32 125.095) (end 148.59 126.365) (width 0.4318) (layer Dessus) (net 64)) - (segment (start 142.875 99.695) (end 141.605 100.965) (width 0.4318) (layer Dessous) (net 64) (status 800)) - (segment (start 158.75 128.27) (end 158.75 126.365) (width 0.4318) (layer Dessous) (net 64)) - (via (at 158.75 126.365) (size 1.651) (layers Dessus Dessous) (net 64)) - (segment (start 141.605 103.505) (end 142.875 104.775) (width 0.4318) (layer Dessous) (net 64)) - (segment (start 158.75 128.524) (end 158.75 128.27) (width 0.4318) (layer Dessous) (net 64)) - (segment (start 158.369 133.35) (end 158.369 128.905) (width 0.4318) (layer Dessous) (net 64) (status 800)) - (segment (start 141.605 103.505) (end 141.605 100.965) (width 0.4318) (layer Dessous) (net 64)) - (segment (start 158.369 128.905) (end 158.75 128.524) (width 0.4318) (layer Dessous) (net 64)) - (segment (start 148.59 126.365) (end 158.75 126.365) (width 0.4318) (layer Dessus) (net 64)) - (segment (start 142.875 119.38) (end 142.875 104.775) (width 0.4318) (layer Dessous) (net 64)) + (segment (start 142.24 104.14) (end 141.986 103.886) (width 0.4318) (layer Dessus) (net 63)) + (segment (start 141.986 103.886) (end 139.827 103.886) (width 0.4318) (layer Dessus) (net 63)) + (segment (start 144.145 129.54) (end 145.415 128.27) (width 0.4318) (layer Dessus) (net 63)) + (segment (start 139.827 103.886) (end 139.573 104.14) (width 0.4318) (layer Dessus) (net 63)) + (segment (start 139.573 104.14) (end 120.65 104.14) (width 0.4318) (layer Dessus) (net 63)) + (segment (start 120.65 104.14) (end 116.205 108.585) (width 0.4318) (layer Dessus) (net 63)) + (segment (start 144.145 67.31) (end 144.145 73.025) (width 0.4318) (layer Dessous) (net 63)) + (segment (start 116.205 108.585) (end 116.205 127.635) (width 0.4318) (layer Dessus) (net 63)) + (segment (start 116.205 127.635) (end 118.11 129.54) (width 0.4318) (layer Dessus) (net 63)) + (segment (start 118.11 129.54) (end 144.145 129.54) (width 0.4318) (layer Dessus) (net 63)) + (segment (start 145.415 128.27) (end 149.86 128.27) (width 0.4318) (layer Dessus) (net 63)) + (segment (start 151.765 66.675) (end 152.4 66.04) (width 0.4318) (layer Dessous) (net 63)) + (via (at 154.305 66.04) (size 1.651) (layers Dessus Dessous) (net 63)) + (segment (start 154.305 102.235) (end 154.305 66.04) (width 0.4318) (layer Dessus) (net 63)) + (segment (start 149.987 130.175) (end 149.86 130.175) (width 0.4318) (layer Dessous) (net 63)) + (segment (start 152.4 66.04) (end 154.305 66.04) (width 0.4318) (layer Dessous) (net 63)) + (segment (start 144.145 67.31) (end 144.78 66.675) (width 0.4318) (layer Dessous) (net 63)) + (segment (start 144.78 66.675) (end 151.765 66.675) (width 0.4318) (layer Dessous) (net 63)) + (segment (start 144.145 73.025) (end 142.875 74.295) (width 0.4318) (layer Dessous) (net 63) (status 400)) + (segment (start 154.305 102.235) (end 152.4 104.14) (width 0.4318) (layer Dessus) (net 63)) + (segment (start 149.987 133.35) (end 149.987 130.175) (width 0.4318) (layer Dessous) (net 63) (status 800)) + (segment (start 149.86 128.27) (end 149.86 130.175) (width 0.4318) (layer Dessous) (net 63)) + (via (at 149.86 128.27) (size 1.651) (layers Dessus Dessous) (net 63)) (segment (start 142.875 119.38) (end 147.32 123.825) (width 0.4318) (layer Dessous) (net 64)) - (segment (start 122.555 114.935) (end 121.285 116.205) (width 0.4318) (layer Dessous) (net 65)) - (segment (start 116.84 117.475) (end 116.205 116.84) (width 0.4318) (layer Dessous) (net 65)) - (segment (start 121.285 116.84) (end 120.65 117.475) (width 0.4318) (layer Dessous) (net 65)) - (segment (start 121.285 116.205) (end 121.285 116.84) (width 0.4318) (layer Dessous) (net 65)) - (segment (start 131.445 115.57) (end 130.81 114.935) (width 0.4318) (layer Dessous) (net 65)) - (segment (start 121.285 107.315) (end 122.555 106.045) (width 0.4318) (layer Dessous) (net 65)) - (segment (start 122.555 106.045) (end 122.555 102.235) (width 0.4318) (layer Dessous) (net 65) (status 400)) - (segment (start 116.205 107.95) (end 116.84 107.315) (width 0.4318) (layer Dessous) (net 65)) - (segment (start 131.445 117.475) (end 131.445 115.57) (width 0.4318) (layer Dessous) (net 65) (status 800)) - (segment (start 130.81 114.935) (end 122.555 114.935) (width 0.4318) (layer Dessous) (net 65)) - (segment (start 116.84 107.315) (end 121.285 107.315) (width 0.4318) (layer Dessous) (net 65)) - (segment (start 116.205 116.84) (end 116.205 107.95) (width 0.4318) (layer Dessous) (net 65)) + (segment (start 142.875 119.38) (end 142.875 104.775) (width 0.4318) (layer Dessous) (net 64)) + (segment (start 148.59 126.365) (end 158.75 126.365) (width 0.4318) (layer Dessus) (net 64)) + (segment (start 158.369 128.905) (end 158.75 128.524) (width 0.4318) (layer Dessous) (net 64)) + (segment (start 141.605 103.505) (end 141.605 100.965) (width 0.4318) (layer Dessous) (net 64)) + (segment (start 158.369 133.35) (end 158.369 128.905) (width 0.4318) (layer Dessous) (net 64) (status 800)) + (segment (start 158.75 128.524) (end 158.75 128.27) (width 0.4318) (layer Dessous) (net 64)) + (segment (start 141.605 103.505) (end 142.875 104.775) (width 0.4318) (layer Dessous) (net 64)) + (via (at 158.75 126.365) (size 1.651) (layers Dessus Dessous) (net 64)) + (segment (start 158.75 128.27) (end 158.75 126.365) (width 0.4318) (layer Dessous) (net 64)) + (segment (start 142.875 99.695) (end 141.605 100.965) (width 0.4318) (layer Dessous) (net 64) (status 800)) + (segment (start 147.32 125.095) (end 148.59 126.365) (width 0.4318) (layer Dessus) (net 64)) + (segment (start 147.32 123.825) (end 147.32 125.095) (width 0.4318) (layer Dessous) (net 64)) + (via (at 147.32 125.095) (size 1.651) (layers Dessus Dessous) (net 64)) (segment (start 120.65 117.475) (end 116.84 117.475) (width 0.4318) (layer Dessous) (net 65)) - (segment (start 135.255 114.935) (end 137.795 114.935) (width 1.016) (layer Dessous) (net 66)) - (segment (start 139.065 125.095) (end 139.065 117.475) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 139.065 117.475) (end 147.32 117.475) (width 1.016) (layer Dessus) (net 66) (status 800)) - (segment (start 149.86 120.015) (end 155.575 120.015) (width 1.016) (layer Dessus) (net 66) (status 400)) - (segment (start 147.32 117.475) (end 149.86 120.015) (width 1.016) (layer Dessus) (net 66)) - (segment (start 148.59 133.35) (end 151.13 133.35) (width 1.016) (layer Dessus) (net 66) (status 800)) - (segment (start 151.13 133.35) (end 151.384 133.35) (width 1.016) (layer Dessus) (net 66) (status 400)) - (segment (start 151.384 133.35) (end 154.305 133.35) (width 1.016) (layer Dessus) (net 66) (status 800)) - (segment (start 154.305 133.35) (end 154.178 133.35) (width 1.016) (layer Dessus) (net 66) (status 400)) - (segment (start 154.178 133.35) (end 156.845 133.35) (width 1.016) (layer Dessus) (net 66) (status 800)) - (segment (start 174.879 69.85) (end 174.879 66.675) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 175.895 65.659) (end 175.895 65.405) (width 1.016) (layer Dessous) (net 66)) - (segment (start 174.879 66.675) (end 175.895 65.659) (width 1.016) (layer Dessous) (net 66)) - (segment (start 148.59 106.68) (end 154.94 106.68) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 167.005 106.045) (end 168.275 106.045) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 165.1 104.14) (end 167.005 106.045) (width 1.016) (layer Dessous) (net 66)) - (segment (start 164.465 104.14) (end 165.1 104.14) (width 1.016) (layer Dessous) (net 66)) - (segment (start 157.48 104.14) (end 164.465 104.14) (width 1.016) (layer Dessous) (net 66)) - (segment (start 154.94 106.68) (end 157.48 104.14) (width 1.016) (layer Dessous) (net 66)) - (segment (start 155.575 120.015) (end 153.67 120.015) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 151.765 118.11) (end 151.765 114.935) (width 1.016) (layer Dessous) (net 66)) - (segment (start 153.67 120.015) (end 151.765 118.11) (width 1.016) (layer Dessous) (net 66)) - (segment (start 139.446 76.835) (end 139.065 76.835) (width 1.016) (layer Dessous) (net 66)) - (segment (start 139.065 76.835) (end 139.065 73.025) (width 0.4318) (layer Dessous) (net 66)) - (segment (start 139.065 73.025) (end 140.335 71.755) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 139.446 79.375) (end 139.446 76.835) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 126.365 112.395) (end 132.715 112.395) (width 1.016) (layer Dessous) (net 66)) - (segment (start 127.635 104.775) (end 126.365 106.045) (width 1.016) (layer Dessous) (net 66)) - (segment (start 126.365 106.045) (end 126.365 109.855) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 127.635 102.235) (end 127.635 104.775) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 118.745 115.316) (end 120.015 114.046) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 97.79 86.8426) (end 97.155 86.2076) (width 1.016) (layer Dessous) (net 66)) - (segment (start 163.195 126.365) (end 156.845 120.015) (width 1.016) (layer Dessous) (net 66)) - (segment (start 183.515 125.095) (end 187.325 125.095) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 151.13 114.3) (end 151.765 114.935) (width 1.016) (layer Dessous) (net 66)) - (segment (start 148.59 111.76) (end 151.13 114.3) (width 1.016) (layer Dessous) (net 66)) - (segment (start 148.59 106.68) (end 148.59 111.76) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 97.155 76.2) (end 97.155 73.66) (width 1.016) (layer Dessous) (net 66)) - (segment (start 97.155 78.74) (end 97.155 76.2) (width 1.016) (layer Dessous) (net 66)) - (segment (start 97.155 81.28) (end 97.155 78.74) (width 1.016) (layer Dessous) (net 66)) - (segment (start 133.985 117.475) (end 133.985 116.205) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 133.985 116.205) (end 135.255 114.935) (width 1.016) (layer Dessous) (net 66)) - (segment (start 139.065 116.205) (end 139.065 117.475) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 137.795 114.935) (end 139.065 116.205) (width 1.016) (layer Dessous) (net 66)) - (segment (start 99.695 92.075) (end 99.695 92.3798) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 97.79 92.075) (end 99.695 92.075) (width 1.016) (layer Dessous) (net 66)) - (segment (start 97.155 91.44) (end 97.79 92.075) (width 1.016) (layer Dessous) (net 66)) - (segment (start 99.695 89.5858) (end 97.155 89.5858) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 97.155 89.5858) (end 97.155 89.535) (width 1.016) (layer Dessous) (net 66)) - (segment (start 111.125 88.9) (end 111.125 86.36) (width 1.016) (layer Dessous) (net 66) (status C00)) - (segment (start 99.695 92.3798) (end 104.775 92.3798) (width 0.635) (layer Dessous) (net 66) (status 800)) - (segment (start 108.2548 88.9) (end 111.125 88.9) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 140.97 127) (end 139.065 125.095) (width 1.016) (layer Dessous) (net 66)) - (segment (start 140.97 133.35) (end 140.97 127) (width 1.016) (layer Dessous) (net 66)) - (via (at 140.97 133.35) (size 1.651) (layers Dessus Dessous) (net 66)) - (segment (start 148.59 133.35) (end 146.685 133.35) (width 1.016) (layer Dessus) (net 66) (status 800)) - (segment (start 146.685 133.35) (end 140.97 133.35) (width 1.016) (layer Dessus) (net 66)) - (segment (start 190.5 96.52) (end 189.865 96.52) (width 1.016) (layer Dessous) (net 66)) - (segment (start 108.585 60.325) (end 108.585 52.705) (width 1.016) (layer Dessous) (net 66) (status C00)) - (segment (start 121.285 53.34) (end 121.285 61.214) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 117.475 49.53) (end 121.285 53.34) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 116.84 48.895) (end 117.475 49.53) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 109.22 48.895) (end 116.84 48.895) (width 1.016) (layer Dessous) (net 66)) - (segment (start 171.45 48.26) (end 171.45 56.515) (width 1.016) (layer Dessous) (net 66)) - (segment (start 189.865 108.585) (end 189.865 96.52) (width 1.016) (layer Dessous) (net 66)) - (segment (start 149.225 78.105) (end 150.495 79.375) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 191.135 95.885) (end 190.5 96.52) (width 1.016) (layer Dessous) (net 66)) - (segment (start 104.775 92.3798) (end 108.2548 88.9) (width 1.016) (layer Dessous) (net 66)) - (segment (start 183.515 114.935) (end 183.515 125.095) (width 0.635) (layer Dessous) (net 66)) - (segment (start 189.865 108.585) (end 183.515 114.935) (width 1.016) (layer Dessous) (net 66)) - (segment (start 183.515 114.935) (end 183.515 125.095) (width 1.016) (layer Dessous) (net 66)) - (segment (start 136.525 67.945) (end 136.525 65.405) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 179.705 125.095) (end 183.515 125.095) (width 1.016) (layer Dessous) (net 66)) - (segment (start 127.635 102.235) (end 126.365 100.965) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 178.435 126.365) (end 179.705 125.095) (width 1.016) (layer Dessous) (net 66)) - (segment (start 147.955 89.535) (end 141.605 89.535) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 163.195 126.365) (end 178.435 126.365) (width 1.016) (layer Dessous) (net 66)) - (segment (start 139.446 79.375) (end 140.716 78.105) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 155.575 120.015) (end 156.845 120.015) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 99.695 78.5622) (end 97.155 78.5622) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 97.155 78.5622) (end 97.155 78.74) (width 1.016) (layer Dessous) (net 66)) - (segment (start 99.695 81.2546) (end 97.155 81.2546) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 97.155 81.2546) (end 97.155 81.28) (width 1.016) (layer Dessous) (net 66)) - (segment (start 99.695 84.0994) (end 97.155 84.0994) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 97.155 84.0994) (end 97.155 83.82) (width 1.016) (layer Dessous) (net 66)) - (segment (start 97.155 86.36) (end 97.155 89.535) (width 1.016) (layer Dessous) (net 66)) - (segment (start 97.155 89.535) (end 97.155 91.44) (width 1.016) (layer Dessous) (net 66)) - (segment (start 156.21 62.865) (end 173.355 62.865) (width 1.016) (layer Dessus) (net 66)) - (segment (start 173.355 62.865) (end 175.895 65.405) (width 1.016) (layer Dessus) (net 66)) - (via (at 175.895 65.405) (size 1.651) (layers Dessus Dessous) (net 66)) - (segment (start 150.495 79.375) (end 153.67 79.375) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 156.21 78.74) (end 156.21 62.865) (width 1.016) (layer Dessus) (net 66)) - (via (at 156.21 78.74) (size 1.651) (layers Dessus Dessous) (net 66)) - (segment (start 153.67 79.375) (end 154.305 78.74) (width 1.016) (layer Dessous) (net 66)) - (segment (start 154.305 78.74) (end 156.21 78.74) (width 1.016) (layer Dessous) (net 66)) - (segment (start 99.695 75.819) (end 97.155 75.819) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 97.155 75.819) (end 97.155 76.2) (width 1.016) (layer Dessous) (net 66)) - (segment (start 140.716 78.105) (end 141.605 78.105) (width 1.016) (layer Dessous) (net 66)) - (segment (start 99.695 73.025) (end 99.695 70.485) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 108.585 61.595) (end 108.585 60.325) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 99.695 70.485) (end 108.585 61.595) (width 1.016) (layer Dessous) (net 66)) - (segment (start 141.605 89.535) (end 141.605 78.105) (width 1.016) (layer Dessous) (net 66)) - (segment (start 126.365 100.965) (end 126.365 94.615) (width 0.4318) (layer Dessous) (net 66)) - (segment (start 189.865 96.52) (end 188.595 96.52) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 191.135 73.025) (end 191.135 95.885) (width 1.016) (layer Dessous) (net 66)) - (segment (start 189.865 71.755) (end 191.135 73.025) (width 1.016) (layer Dessous) (net 66)) - (segment (start 189.23 64.135) (end 187.325 64.135) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 189.865 64.77) (end 189.23 64.135) (width 1.016) (layer Dessous) (net 66)) - (segment (start 189.865 71.755) (end 189.865 64.77) (width 1.016) (layer Dessous) (net 66)) - (segment (start 108.585 49.53) (end 109.22 48.895) (width 1.016) (layer Dessous) (net 66)) - (segment (start 108.585 52.705) (end 108.585 49.53) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 141.605 78.105) (end 149.225 78.105) (width 0.4318) (layer Dessous) (net 66)) - (segment (start 187.325 64.135) (end 178.435 64.135) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 167.005 43.815) (end 171.45 48.26) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 156.845 133.35) (end 156.972 133.35) (width 1.016) (layer Dessus) (net 66) (status 400)) - (segment (start 178.435 64.135) (end 178.435 65.405) (width 1.016) (layer Dessous) (net 66)) - (segment (start 178.435 56.515) (end 178.435 64.135) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 171.45 56.515) (end 178.435 56.515) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 144.145 55.88) (end 147.32 59.055) (width 1.016) (layer Dessous) (net 66)) - (segment (start 138.43 55.88) (end 144.145 55.88) (width 0.635) (layer Dessous) (net 66)) - (segment (start 137.795 56.515) (end 138.43 55.88) (width 0.635) (layer Dessous) (net 66)) - (segment (start 137.795 60.325) (end 137.795 56.515) (width 0.4318) (layer Dessous) (net 66)) - (segment (start 136.525 61.595) (end 137.795 60.325) (width 0.635) (layer Dessous) (net 66)) - (segment (start 126.365 67.945) (end 126.365 65.405) (width 1.016) (layer Dessous) (net 66) (status 400)) - (via (at 126.365 67.945) (size 1.651) (layers Dessus Dessous) (net 66)) - (segment (start 135.89 68.58) (end 142.24 68.58) (width 1.016) (layer Dessus) (net 66)) - (segment (start 144.78 66.04) (end 151.765 66.04) (width 1.016) (layer Dessus) (net 66)) - (segment (start 142.24 68.58) (end 144.78 66.04) (width 1.016) (layer Dessus) (net 66)) - (segment (start 151.765 66.04) (end 154.94 62.865) (width 1.016) (layer Dessus) (net 66)) - (segment (start 154.94 62.865) (end 156.21 62.865) (width 1.016) (layer Dessus) (net 66)) - (segment (start 175.895 65.405) (end 178.435 65.405) (width 1.016) (layer Dessous) (net 66)) - (segment (start 127.635 93.98) (end 127 94.615) (width 1.016) (layer Dessous) (net 66)) - (segment (start 127.635 87.376) (end 127.635 93.98) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 125.73 114.046) (end 126.365 113.411) (width 0.635) (layer Dessous) (net 66)) - (segment (start 120.015 114.046) (end 125.73 114.046) (width 0.635) (layer Dessous) (net 66)) - (segment (start 131.826 121.285) (end 133.35 121.285) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 133.985 120.65) (end 133.985 117.475) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 133.35 121.285) (end 133.985 120.65) (width 1.016) (layer Dessous) (net 66)) - (segment (start 131.826 126.365) (end 131.826 121.285) (width 1.016) (layer Dessous) (net 66) (status C00)) - (segment (start 140.335 99.695) (end 139.065 100.965) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 139.065 100.965) (end 139.065 107.315) (width 0.4318) (layer Dessous) (net 66)) - (segment (start 126.365 112.395) (end 126.365 109.855) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 131.445 109.855) (end 131.445 111.76) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 131.445 111.76) (end 132.08 112.395) (width 1.016) (layer Dessous) (net 66)) - (segment (start 132.08 112.395) (end 132.715 112.395) (width 1.016) (layer Dessous) (net 66)) - (segment (start 126.365 113.411) (end 126.365 112.395) (width 1.016) (layer Dessous) (net 66)) - (segment (start 135.255 112.395) (end 135.255 114.935) (width 1.016) (layer Dessous) (net 66)) - (segment (start 135.255 112.395) (end 135.89 112.395) (width 1.016) (layer Dessous) (net 66)) - (segment (start 132.715 112.395) (end 135.255 112.395) (width 1.016) (layer Dessous) (net 66)) - (segment (start 135.89 112.395) (end 136.525 111.76) (width 1.016) (layer Dessous) (net 66)) - (segment (start 136.525 111.76) (end 136.525 109.855) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 164.465 56.515) (end 171.45 56.515) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 123.825 61.214) (end 126.365 63.754) (width 1.016) (layer Dessous) (net 66)) - (segment (start 126.365 63.754) (end 126.365 65.405) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 121.285 61.214) (end 123.825 61.214) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 136.525 109.855) (end 139.065 107.315) (width 0.635) (layer Dessous) (net 66) (status 800)) - (segment (start 132.715 67.945) (end 133.35 68.58) (width 1.016) (layer Dessus) (net 66)) - (segment (start 135.89 68.58) (end 136.525 67.945) (width 1.016) (layer Dessous) (net 66)) - (via (at 135.89 68.58) (size 1.651) (layers Dessus Dessous) (net 66)) - (segment (start 133.35 68.58) (end 135.89 68.58) (width 1.016) (layer Dessus) (net 66)) - (segment (start 141.605 90.424) (end 141.605 89.535) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 126.365 67.945) (end 132.715 67.945) (width 1.016) (layer Dessus) (net 66)) - (segment (start 136.525 65.405) (end 136.525 61.595) (width 0.635) (layer Dessous) (net 66) (status 800)) - (segment (start 164.465 58.42) (end 164.465 56.515) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 163.83 59.055) (end 164.465 58.42) (width 1.016) (layer Dessous) (net 66)) - (segment (start 147.32 59.055) (end 163.83 59.055) (width 1.016) (layer Dessous) (net 66)) - (segment (start 97.155 83.82) (end 97.155 81.28) (width 1.016) (layer Dessous) (net 66)) - (segment (start 97.155 86.36) (end 97.155 83.82) (width 1.016) (layer Dessous) (net 66)) - (segment (start 97.155 86.2076) (end 97.155 86.36) (width 1.016) (layer Dessous) (net 66)) - (segment (start 97.155 73.66) (end 97.79 73.025) (width 1.016) (layer Dessous) (net 66)) - (segment (start 97.79 73.025) (end 99.695 73.025) (width 1.016) (layer Dessous) (net 66) (status 400)) - (segment (start 99.695 86.8426) (end 97.79 86.8426) (width 1.016) (layer Dessous) (net 66) (status 800)) - (segment (start 126.365 94.615) (end 122.555 94.615) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 116.205 116.84) (end 116.205 107.95) (width 0.4318) (layer Dessous) (net 65)) + (segment (start 116.84 107.315) (end 121.285 107.315) (width 0.4318) (layer Dessous) (net 65)) + (segment (start 130.81 114.935) (end 122.555 114.935) (width 0.4318) (layer Dessous) (net 65)) + (segment (start 131.445 117.475) (end 131.445 115.57) (width 0.4318) (layer Dessous) (net 65) (status 800)) + (segment (start 116.205 107.95) (end 116.84 107.315) (width 0.4318) (layer Dessous) (net 65)) + (segment (start 122.555 106.045) (end 122.555 102.235) (width 0.4318) (layer Dessous) (net 65) (status 400)) + (segment (start 121.285 107.315) (end 122.555 106.045) (width 0.4318) (layer Dessous) (net 65)) + (segment (start 131.445 115.57) (end 130.81 114.935) (width 0.4318) (layer Dessous) (net 65)) + (segment (start 121.285 116.205) (end 121.285 116.84) (width 0.4318) (layer Dessous) (net 65)) + (segment (start 121.285 116.84) (end 120.65 117.475) (width 0.4318) (layer Dessous) (net 65)) + (segment (start 116.84 117.475) (end 116.205 116.84) (width 0.4318) (layer Dessous) (net 65)) + (segment (start 122.555 114.935) (end 121.285 116.205) (width 0.4318) (layer Dessous) (net 65)) (segment (start 127 94.615) (end 126.365 94.615) (width 1.016) (layer Dessous) (net 66)) - (segment (start 121.285 64.516) (end 121.285 65.405) (width 0.4318) (layer Dessous) (net 67) (status 800)) + (segment (start 126.365 94.615) (end 122.555 94.615) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 99.695 86.8426) (end 97.79 86.8426) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 97.79 73.025) (end 99.695 73.025) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 97.155 73.66) (end 97.79 73.025) (width 1.016) (layer Dessous) (net 66)) + (segment (start 97.155 86.2076) (end 97.155 86.36) (width 1.016) (layer Dessous) (net 66)) + (segment (start 97.155 86.36) (end 97.155 83.82) (width 1.016) (layer Dessous) (net 66)) + (segment (start 97.155 83.82) (end 97.155 81.28) (width 1.016) (layer Dessous) (net 66)) + (segment (start 147.32 59.055) (end 163.83 59.055) (width 1.016) (layer Dessous) (net 66)) + (segment (start 163.83 59.055) (end 164.465 58.42) (width 1.016) (layer Dessous) (net 66)) + (segment (start 164.465 58.42) (end 164.465 56.515) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 136.525 65.405) (end 136.525 61.595) (width 0.635) (layer Dessous) (net 66) (status 800)) + (segment (start 126.365 67.945) (end 132.715 67.945) (width 1.016) (layer Dessus) (net 66)) + (segment (start 141.605 90.424) (end 141.605 89.535) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 133.35 68.58) (end 135.89 68.58) (width 1.016) (layer Dessus) (net 66)) + (via (at 135.89 68.58) (size 1.651) (layers Dessus Dessous) (net 66)) + (segment (start 135.89 68.58) (end 136.525 67.945) (width 1.016) (layer Dessous) (net 66)) + (segment (start 132.715 67.945) (end 133.35 68.58) (width 1.016) (layer Dessus) (net 66)) + (segment (start 136.525 109.855) (end 139.065 107.315) (width 0.635) (layer Dessous) (net 66) (status 800)) + (segment (start 121.285 61.214) (end 123.825 61.214) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 126.365 63.754) (end 126.365 65.405) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 123.825 61.214) (end 126.365 63.754) (width 1.016) (layer Dessous) (net 66)) + (segment (start 164.465 56.515) (end 171.45 56.515) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 136.525 111.76) (end 136.525 109.855) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 135.89 112.395) (end 136.525 111.76) (width 1.016) (layer Dessous) (net 66)) + (segment (start 132.715 112.395) (end 135.255 112.395) (width 1.016) (layer Dessous) (net 66)) + (segment (start 135.255 112.395) (end 135.89 112.395) (width 1.016) (layer Dessous) (net 66)) + (segment (start 135.255 112.395) (end 135.255 114.935) (width 1.016) (layer Dessous) (net 66)) + (segment (start 126.365 113.411) (end 126.365 112.395) (width 1.016) (layer Dessous) (net 66)) + (segment (start 132.08 112.395) (end 132.715 112.395) (width 1.016) (layer Dessous) (net 66)) + (segment (start 131.445 111.76) (end 132.08 112.395) (width 1.016) (layer Dessous) (net 66)) + (segment (start 131.445 109.855) (end 131.445 111.76) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 126.365 112.395) (end 126.365 109.855) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 139.065 100.965) (end 139.065 107.315) (width 0.4318) (layer Dessous) (net 66)) + (segment (start 140.335 99.695) (end 139.065 100.965) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 131.826 126.365) (end 131.826 121.285) (width 1.016) (layer Dessous) (net 66) (status C00)) + (segment (start 133.35 121.285) (end 133.985 120.65) (width 1.016) (layer Dessous) (net 66)) + (segment (start 133.985 120.65) (end 133.985 117.475) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 131.826 121.285) (end 133.35 121.285) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 120.015 114.046) (end 125.73 114.046) (width 0.635) (layer Dessous) (net 66)) + (segment (start 125.73 114.046) (end 126.365 113.411) (width 0.635) (layer Dessous) (net 66)) + (segment (start 127.635 87.376) (end 127.635 93.98) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 127.635 93.98) (end 127 94.615) (width 1.016) (layer Dessous) (net 66)) + (segment (start 175.895 65.405) (end 178.435 65.405) (width 1.016) (layer Dessous) (net 66)) + (segment (start 154.94 62.865) (end 156.21 62.865) (width 1.016) (layer Dessus) (net 66)) + (segment (start 151.765 66.04) (end 154.94 62.865) (width 1.016) (layer Dessus) (net 66)) + (segment (start 142.24 68.58) (end 144.78 66.04) (width 1.016) (layer Dessus) (net 66)) + (segment (start 144.78 66.04) (end 151.765 66.04) (width 1.016) (layer Dessus) (net 66)) + (segment (start 135.89 68.58) (end 142.24 68.58) (width 1.016) (layer Dessus) (net 66)) + (via (at 126.365 67.945) (size 1.651) (layers Dessus Dessous) (net 66)) + (segment (start 126.365 67.945) (end 126.365 65.405) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 136.525 61.595) (end 137.795 60.325) (width 0.635) (layer Dessous) (net 66)) + (segment (start 137.795 60.325) (end 137.795 56.515) (width 0.4318) (layer Dessous) (net 66)) + (segment (start 137.795 56.515) (end 138.43 55.88) (width 0.635) (layer Dessous) (net 66)) + (segment (start 138.43 55.88) (end 144.145 55.88) (width 0.635) (layer Dessous) (net 66)) + (segment (start 144.145 55.88) (end 147.32 59.055) (width 1.016) (layer Dessous) (net 66)) + (segment (start 171.45 56.515) (end 178.435 56.515) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 178.435 56.515) (end 178.435 64.135) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 178.435 64.135) (end 178.435 65.405) (width 1.016) (layer Dessous) (net 66)) + (segment (start 156.845 133.35) (end 156.972 133.35) (width 1.016) (layer Dessus) (net 66) (status 400)) + (segment (start 167.005 43.815) (end 171.45 48.26) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 187.325 64.135) (end 178.435 64.135) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 141.605 78.105) (end 149.225 78.105) (width 0.4318) (layer Dessous) (net 66)) + (segment (start 108.585 52.705) (end 108.585 49.53) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 108.585 49.53) (end 109.22 48.895) (width 1.016) (layer Dessous) (net 66)) + (segment (start 189.865 71.755) (end 189.865 64.77) (width 1.016) (layer Dessous) (net 66)) + (segment (start 189.865 64.77) (end 189.23 64.135) (width 1.016) (layer Dessous) (net 66)) + (segment (start 189.23 64.135) (end 187.325 64.135) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 189.865 71.755) (end 191.135 73.025) (width 1.016) (layer Dessous) (net 66)) + (segment (start 191.135 73.025) (end 191.135 95.885) (width 1.016) (layer Dessous) (net 66)) + (segment (start 189.865 96.52) (end 188.595 96.52) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 126.365 100.965) (end 126.365 94.615) (width 0.4318) (layer Dessous) (net 66)) + (segment (start 141.605 89.535) (end 141.605 78.105) (width 1.016) (layer Dessous) (net 66)) + (segment (start 99.695 70.485) (end 108.585 61.595) (width 1.016) (layer Dessous) (net 66)) + (segment (start 108.585 61.595) (end 108.585 60.325) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 99.695 73.025) (end 99.695 70.485) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 140.716 78.105) (end 141.605 78.105) (width 1.016) (layer Dessous) (net 66)) + (segment (start 97.155 75.819) (end 97.155 76.2) (width 1.016) (layer Dessous) (net 66)) + (segment (start 99.695 75.819) (end 97.155 75.819) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 154.305 78.74) (end 156.21 78.74) (width 1.016) (layer Dessous) (net 66)) + (segment (start 153.67 79.375) (end 154.305 78.74) (width 1.016) (layer Dessous) (net 66)) + (via (at 156.21 78.74) (size 1.651) (layers Dessus Dessous) (net 66)) + (segment (start 156.21 78.74) (end 156.21 62.865) (width 1.016) (layer Dessus) (net 66)) + (segment (start 150.495 79.375) (end 153.67 79.375) (width 1.016) (layer Dessous) (net 66) (status 800)) + (via (at 175.895 65.405) (size 1.651) (layers Dessus Dessous) (net 66)) + (segment (start 173.355 62.865) (end 175.895 65.405) (width 1.016) (layer Dessus) (net 66)) + (segment (start 156.21 62.865) (end 173.355 62.865) (width 1.016) (layer Dessus) (net 66)) + (segment (start 97.155 89.535) (end 97.155 91.44) (width 1.016) (layer Dessous) (net 66)) + (segment (start 97.155 86.36) (end 97.155 89.535) (width 1.016) (layer Dessous) (net 66)) + (segment (start 97.155 84.0994) (end 97.155 83.82) (width 1.016) (layer Dessous) (net 66)) + (segment (start 99.695 84.0994) (end 97.155 84.0994) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 97.155 81.2546) (end 97.155 81.28) (width 1.016) (layer Dessous) (net 66)) + (segment (start 99.695 81.2546) (end 97.155 81.2546) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 97.155 78.5622) (end 97.155 78.74) (width 1.016) (layer Dessous) (net 66)) + (segment (start 99.695 78.5622) (end 97.155 78.5622) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 155.575 120.015) (end 156.845 120.015) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 139.446 79.375) (end 140.716 78.105) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 163.195 126.365) (end 178.435 126.365) (width 1.016) (layer Dessous) (net 66)) + (segment (start 147.955 89.535) (end 141.605 89.535) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 178.435 126.365) (end 179.705 125.095) (width 1.016) (layer Dessous) (net 66)) + (segment (start 127.635 102.235) (end 126.365 100.965) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 179.705 125.095) (end 183.515 125.095) (width 1.016) (layer Dessous) (net 66)) + (segment (start 136.525 67.945) (end 136.525 65.405) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 183.515 114.935) (end 183.515 125.095) (width 1.016) (layer Dessous) (net 66)) + (segment (start 189.865 108.585) (end 183.515 114.935) (width 1.016) (layer Dessous) (net 66)) + (segment (start 183.515 114.935) (end 183.515 125.095) (width 0.635) (layer Dessous) (net 66)) + (segment (start 104.775 92.3798) (end 108.2548 88.9) (width 1.016) (layer Dessous) (net 66)) + (segment (start 191.135 95.885) (end 190.5 96.52) (width 1.016) (layer Dessous) (net 66)) + (segment (start 149.225 78.105) (end 150.495 79.375) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 189.865 108.585) (end 189.865 96.52) (width 1.016) (layer Dessous) (net 66)) + (segment (start 171.45 48.26) (end 171.45 56.515) (width 1.016) (layer Dessous) (net 66)) + (segment (start 109.22 48.895) (end 116.84 48.895) (width 1.016) (layer Dessous) (net 66)) + (segment (start 116.84 48.895) (end 117.475 49.53) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 117.475 49.53) (end 121.285 53.34) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 121.285 53.34) (end 121.285 61.214) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 108.585 60.325) (end 108.585 52.705) (width 1.016) (layer Dessous) (net 66) (status C00)) + (segment (start 190.5 96.52) (end 189.865 96.52) (width 1.016) (layer Dessous) (net 66)) + (segment (start 146.685 133.35) (end 140.97 133.35) (width 1.016) (layer Dessus) (net 66)) + (segment (start 148.59 133.35) (end 146.685 133.35) (width 1.016) (layer Dessus) (net 66) (status 800)) + (via (at 140.97 133.35) (size 1.651) (layers Dessus Dessous) (net 66)) + (segment (start 140.97 133.35) (end 140.97 127) (width 1.016) (layer Dessous) (net 66)) + (segment (start 140.97 127) (end 139.065 125.095) (width 1.016) (layer Dessous) (net 66)) + (segment (start 108.2548 88.9) (end 111.125 88.9) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 99.695 92.3798) (end 104.775 92.3798) (width 0.635) (layer Dessous) (net 66) (status 800)) + (segment (start 111.125 88.9) (end 111.125 86.36) (width 1.016) (layer Dessous) (net 66) (status C00)) + (segment (start 97.155 89.5858) (end 97.155 89.535) (width 1.016) (layer Dessous) (net 66)) + (segment (start 99.695 89.5858) (end 97.155 89.5858) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 97.155 91.44) (end 97.79 92.075) (width 1.016) (layer Dessous) (net 66)) + (segment (start 97.79 92.075) (end 99.695 92.075) (width 1.016) (layer Dessous) (net 66)) + (segment (start 99.695 92.075) (end 99.695 92.3798) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 137.795 114.935) (end 139.065 116.205) (width 1.016) (layer Dessous) (net 66)) + (segment (start 139.065 116.205) (end 139.065 117.475) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 133.985 116.205) (end 135.255 114.935) (width 1.016) (layer Dessous) (net 66)) + (segment (start 133.985 117.475) (end 133.985 116.205) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 97.155 81.28) (end 97.155 78.74) (width 1.016) (layer Dessous) (net 66)) + (segment (start 97.155 78.74) (end 97.155 76.2) (width 1.016) (layer Dessous) (net 66)) + (segment (start 97.155 76.2) (end 97.155 73.66) (width 1.016) (layer Dessous) (net 66)) + (segment (start 148.59 106.68) (end 148.59 111.76) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 148.59 111.76) (end 151.13 114.3) (width 1.016) (layer Dessous) (net 66)) + (segment (start 151.13 114.3) (end 151.765 114.935) (width 1.016) (layer Dessous) (net 66)) + (segment (start 183.515 125.095) (end 187.325 125.095) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 163.195 126.365) (end 156.845 120.015) (width 1.016) (layer Dessous) (net 66)) + (segment (start 97.79 86.8426) (end 97.155 86.2076) (width 1.016) (layer Dessous) (net 66)) + (segment (start 118.745 115.316) (end 120.015 114.046) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 127.635 102.235) (end 127.635 104.775) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 126.365 106.045) (end 126.365 109.855) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 127.635 104.775) (end 126.365 106.045) (width 1.016) (layer Dessous) (net 66)) + (segment (start 126.365 112.395) (end 132.715 112.395) (width 1.016) (layer Dessous) (net 66)) + (segment (start 139.446 79.375) (end 139.446 76.835) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 139.065 73.025) (end 140.335 71.755) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 139.065 76.835) (end 139.065 73.025) (width 0.4318) (layer Dessous) (net 66)) + (segment (start 139.446 76.835) (end 139.065 76.835) (width 1.016) (layer Dessous) (net 66)) + (segment (start 153.67 120.015) (end 151.765 118.11) (width 1.016) (layer Dessous) (net 66)) + (segment (start 151.765 118.11) (end 151.765 114.935) (width 1.016) (layer Dessous) (net 66)) + (segment (start 155.575 120.015) (end 153.67 120.015) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 154.94 106.68) (end 157.48 104.14) (width 1.016) (layer Dessous) (net 66)) + (segment (start 157.48 104.14) (end 164.465 104.14) (width 1.016) (layer Dessous) (net 66)) + (segment (start 164.465 104.14) (end 165.1 104.14) (width 1.016) (layer Dessous) (net 66)) + (segment (start 165.1 104.14) (end 167.005 106.045) (width 1.016) (layer Dessous) (net 66)) + (segment (start 167.005 106.045) (end 168.275 106.045) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 148.59 106.68) (end 154.94 106.68) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 174.879 66.675) (end 175.895 65.659) (width 1.016) (layer Dessous) (net 66)) + (segment (start 175.895 65.659) (end 175.895 65.405) (width 1.016) (layer Dessous) (net 66)) + (segment (start 174.879 69.85) (end 174.879 66.675) (width 1.016) (layer Dessous) (net 66) (status 800)) + (segment (start 154.178 133.35) (end 156.845 133.35) (width 1.016) (layer Dessus) (net 66) (status 800)) + (segment (start 154.305 133.35) (end 154.178 133.35) (width 1.016) (layer Dessus) (net 66) (status 400)) + (segment (start 151.384 133.35) (end 154.305 133.35) (width 1.016) (layer Dessus) (net 66) (status 800)) + (segment (start 151.13 133.35) (end 151.384 133.35) (width 1.016) (layer Dessus) (net 66) (status 400)) + (segment (start 148.59 133.35) (end 151.13 133.35) (width 1.016) (layer Dessus) (net 66) (status 800)) + (segment (start 147.32 117.475) (end 149.86 120.015) (width 1.016) (layer Dessus) (net 66)) + (segment (start 149.86 120.015) (end 155.575 120.015) (width 1.016) (layer Dessus) (net 66) (status 400)) + (segment (start 139.065 117.475) (end 147.32 117.475) (width 1.016) (layer Dessus) (net 66) (status 800)) + (segment (start 139.065 125.095) (end 139.065 117.475) (width 1.016) (layer Dessous) (net 66) (status 400)) + (segment (start 135.255 114.935) (end 137.795 114.935) (width 1.016) (layer Dessous) (net 66)) (segment (start 121.285 65.405) (end 123.825 65.405) (width 0.4318) (layer Dessous) (net 67) (status 400)) - (segment (start 126.365 50.8) (end 126.365 57.785) (width 0.4318) (layer Dessous) (net 68) (status 400)) - (segment (start 127 50.165) (end 126.365 50.8) (width 0.4318) (layer Dessous) (net 68)) + (segment (start 121.285 64.516) (end 121.285 65.405) (width 0.4318) (layer Dessous) (net 67) (status 800)) (segment (start 129.54 50.165) (end 127 50.165) (width 0.4318) (layer Dessous) (net 68) (status 800)) - (segment (start 146.05 44.45) (end 146.685 45.085) (width 0.4318) (layer Dessous) (net 69)) - (segment (start 146.685 45.085) (end 146.685 49.53) (width 0.4318) (layer Dessous) (net 69)) - (segment (start 144.78 44.45) (end 146.05 44.45) (width 0.4318) (layer Dessous) (net 69) (status 800)) - (segment (start 146.685 49.53) (end 146.05 50.165) (width 0.4318) (layer Dessous) (net 69)) + (segment (start 127 50.165) (end 126.365 50.8) (width 0.4318) (layer Dessous) (net 68)) + (segment (start 126.365 50.8) (end 126.365 57.785) (width 0.4318) (layer Dessous) (net 68) (status 400)) (segment (start 146.05 50.165) (end 144.78 50.165) (width 0.4318) (layer Dessous) (net 69) (status 400)) - (segment (start 128.905 57.785) (end 128.905 54.61) (width 0.4318) (layer Dessous) (net 70) (status 800)) + (segment (start 146.685 49.53) (end 146.05 50.165) (width 0.4318) (layer Dessous) (net 69)) + (segment (start 144.78 44.45) (end 146.05 44.45) (width 0.4318) (layer Dessous) (net 69) (status 800)) + (segment (start 146.685 45.085) (end 146.685 49.53) (width 0.4318) (layer Dessous) (net 69)) + (segment (start 146.05 44.45) (end 146.685 45.085) (width 0.4318) (layer Dessous) (net 69)) (segment (start 128.905 54.61) (end 129.54 53.975) (width 0.4318) (layer Dessous) (net 70) (status 400)) - (segment (start 142.875 47.625) (end 142.875 53.34) (width 0.4318) (layer Dessous) (net 71)) - (segment (start 143.51 53.975) (end 144.78 53.975) (width 0.4318) (layer Dessous) (net 71) (status 400)) - (segment (start 143.51 46.99) (end 142.875 47.625) (width 0.4318) (layer Dessous) (net 71)) - (segment (start 144.78 46.99) (end 143.51 46.99) (width 0.4318) (layer Dessous) (net 71) (status 800)) + (segment (start 128.905 57.785) (end 128.905 54.61) (width 0.4318) (layer Dessous) (net 70) (status 800)) (segment (start 142.875 53.34) (end 143.51 53.975) (width 0.4318) (layer Dessous) (net 71)) - (segment (start 130.175 118.745) (end 130.175 123.825) (width 0.4318) (layer Dessous) (net 72)) - (segment (start 128.524 126.365) (end 125.095 126.365) (width 0.4318) (layer Dessous) (net 72) (status C00)) - (segment (start 130.175 123.825) (end 128.905 125.095) (width 0.4318) (layer Dessous) (net 72)) - (segment (start 128.905 125.095) (end 128.905 126.365) (width 0.4318) (layer Dessous) (net 72)) - (segment (start 128.905 117.475) (end 130.175 118.745) (width 0.4318) (layer Dessous) (net 72) (status 800)) - (segment (start 128.905 126.365) (end 128.524 126.365) (width 0.4318) (layer Dessous) (net 72) (status 400)) - (segment (start 125.095 126.365) (end 121.285 126.365) (width 0.4318) (layer Dessous) (net 72) (status C00)) + (segment (start 144.78 46.99) (end 143.51 46.99) (width 0.4318) (layer Dessous) (net 71) (status 800)) + (segment (start 143.51 46.99) (end 142.875 47.625) (width 0.4318) (layer Dessous) (net 71)) + (segment (start 143.51 53.975) (end 144.78 53.975) (width 0.4318) (layer Dessous) (net 71) (status 400)) + (segment (start 142.875 47.625) (end 142.875 53.34) (width 0.4318) (layer Dessous) (net 71)) (segment (start 126.365 117.475) (end 128.905 117.475) (width 0.4318) (layer Dessous) (net 72) (status C00)) - (segment (start 121.285 121.285) (end 123.825 121.285) (width 0.4318) (layer Dessous) (net 73) (status 800)) - (segment (start 135.255 126.365) (end 132.715 128.905) (width 0.4318) (layer Dessous) (net 73) (status 800)) - (segment (start 118.745 121.92) (end 119.38 121.285) (width 0.4318) (layer Dessous) (net 73)) - (segment (start 123.825 121.285) (end 128.524 121.285) (width 0.4318) (layer Dessous) (net 73) (status 400)) - (segment (start 132.715 128.905) (end 120.015 128.905) (width 0.4318) (layer Dessous) (net 73)) - (segment (start 120.015 128.905) (end 118.745 127.635) (width 0.4318) (layer Dessous) (net 73)) - (segment (start 118.745 127.635) (end 118.745 121.92) (width 0.4318) (layer Dessous) (net 73)) - (segment (start 123.825 117.475) (end 123.825 121.285) (width 0.4318) (layer Dessous) (net 73) (status 800)) + (segment (start 125.095 126.365) (end 121.285 126.365) (width 0.4318) (layer Dessous) (net 72) (status C00)) + (segment (start 128.905 126.365) (end 128.524 126.365) (width 0.4318) (layer Dessous) (net 72) (status 400)) + (segment (start 128.905 117.475) (end 130.175 118.745) (width 0.4318) (layer Dessous) (net 72) (status 800)) + (segment (start 128.905 125.095) (end 128.905 126.365) (width 0.4318) (layer Dessous) (net 72)) + (segment (start 130.175 123.825) (end 128.905 125.095) (width 0.4318) (layer Dessous) (net 72)) + (segment (start 128.524 126.365) (end 125.095 126.365) (width 0.4318) (layer Dessous) (net 72) (status C00)) + (segment (start 130.175 118.745) (end 130.175 123.825) (width 0.4318) (layer Dessous) (net 72)) (segment (start 119.38 121.285) (end 121.285 121.285) (width 0.4318) (layer Dessous) (net 73) (status 400)) - (segment (start 187.325 120.015) (end 191.135 120.015) (width 1.016) (layer Dessous) (net 74) (status 800)) - (segment (start 192.405 118.745) (end 192.405 112.395) (width 1.016) (layer Dessous) (net 74) (status 400)) + (segment (start 123.825 117.475) (end 123.825 121.285) (width 0.4318) (layer Dessous) (net 73) (status 800)) + (segment (start 118.745 127.635) (end 118.745 121.92) (width 0.4318) (layer Dessous) (net 73)) + (segment (start 120.015 128.905) (end 118.745 127.635) (width 0.4318) (layer Dessous) (net 73)) + (segment (start 132.715 128.905) (end 120.015 128.905) (width 0.4318) (layer Dessous) (net 73)) + (segment (start 123.825 121.285) (end 128.524 121.285) (width 0.4318) (layer Dessous) (net 73) (status 400)) + (segment (start 118.745 121.92) (end 119.38 121.285) (width 0.4318) (layer Dessous) (net 73)) + (segment (start 135.255 126.365) (end 132.715 128.905) (width 0.4318) (layer Dessous) (net 73) (status 800)) + (segment (start 121.285 121.285) (end 123.825 121.285) (width 0.4318) (layer Dessous) (net 73) (status 800)) (segment (start 191.135 120.015) (end 192.405 118.745) (width 1.016) (layer Dessous) (net 74)) - (segment (start 111.125 57.785) (end 114.935 53.975) (width 0.4318) (layer Dessous) (net 75)) - (segment (start 111.125 60.325) (end 111.125 57.785) (width 0.4318) (layer Dessous) (net 75) (status 800)) + (segment (start 192.405 118.745) (end 192.405 112.395) (width 1.016) (layer Dessous) (net 74) (status 400)) + (segment (start 187.325 120.015) (end 191.135 120.015) (width 1.016) (layer Dessous) (net 74) (status 800)) (segment (start 114.935 53.975) (end 114.935 52.705) (width 0.4318) (layer Dessous) (net 75) (status 400)) - (segment (start 111.76 50.165) (end 114.935 50.165) (width 0.4318) (layer Dessous) (net 76)) - (segment (start 117.475 52.705) (end 114.935 50.165) (width 0.4318) (layer Dessous) (net 76) (status 800)) - (segment (start 111.125 52.705) (end 111.125 50.8) (width 0.4318) (layer Dessous) (net 76) (status 800)) + (segment (start 111.125 60.325) (end 111.125 57.785) (width 0.4318) (layer Dessous) (net 75) (status 800)) + (segment (start 111.125 57.785) (end 114.935 53.975) (width 0.4318) (layer Dessous) (net 75)) (segment (start 111.125 50.8) (end 111.76 50.165) (width 0.4318) (layer Dessous) (net 76)) - (segment (start 194.945 107.95) (end 194.945 128.905) (width 1.016) (layer Dessous) (net 77)) - (segment (start 193.675 130.175) (end 187.325 130.175) (width 1.016) (layer Dessous) (net 77) (status 400)) - (segment (start 194.945 128.905) (end 193.675 130.175) (width 1.016) (layer Dessous) (net 77)) + (segment (start 111.125 52.705) (end 111.125 50.8) (width 0.4318) (layer Dessous) (net 76) (status 800)) + (segment (start 117.475 52.705) (end 114.935 50.165) (width 0.4318) (layer Dessous) (net 76) (status 800)) + (segment (start 111.76 50.165) (end 114.935 50.165) (width 0.4318) (layer Dessous) (net 76)) (segment (start 194.31 107.315) (end 194.945 107.95) (width 1.016) (layer Dessous) (net 77) (status 800)) + (segment (start 194.945 128.905) (end 193.675 130.175) (width 1.016) (layer Dessous) (net 77)) + (segment (start 193.675 130.175) (end 187.325 130.175) (width 1.016) (layer Dessous) (net 77) (status 400)) + (segment (start 194.945 107.95) (end 194.945 128.905) (width 1.016) (layer Dessous) (net 77)) (segment (start 168.275 66.675) (end 168.275 73.025) (width 0.4318) (layer Dessous) (net 78) (status C00)) (segment (start 187.325 52.07) (end 187.325 59.055) (width 0.4318) (layer Dessous) (net 79) (status C00)) - (segment (start 170.815 40.005) (end 172.72 41.91) (width 0.4318) (layer Dessous) (net 80)) - (segment (start 127 41.275) (end 127.635 41.91) (width 0.4318) (layer Dessous) (net 80)) - (segment (start 139.065 41.91) (end 134.62 41.91) (width 0.4318) (layer Dessous) (net 80) (status 400)) - (segment (start 140.97 40.005) (end 139.065 41.91) (width 0.4318) (layer Dessous) (net 80)) - (segment (start 140.97 40.005) (end 170.815 40.005) (width 0.4318) (layer Dessous) (net 80)) - (segment (start 127 39.37) (end 127 41.275) (width 0.4318) (layer Dessous) (net 80) (status 800)) - (segment (start 187.325 41.91) (end 172.72 41.91) (width 0.4318) (layer Dessous) (net 80) (status 800)) (segment (start 127.635 41.91) (end 134.62 41.91) (width 0.4318) (layer Dessous) (net 80) (status 400)) - (segment (start 120.015 49.53) (end 125.095 49.53) (width 0.4318) (layer Dessous) (net 81)) - (segment (start 125.73 48.895) (end 126.365 48.895) (width 0.4318) (layer Dessous) (net 81)) - (segment (start 126.365 48.895) (end 127 48.26) (width 0.4318) (layer Dessous) (net 81)) - (segment (start 117.475 45.72) (end 119.38 47.625) (width 0.4318) (layer Dessous) (net 81)) - (segment (start 119.38 47.625) (end 119.38 48.895) (width 0.4318) (layer Dessous) (net 81)) - (segment (start 127 46.99) (end 127 45.72) (width 0.4318) (layer Dessous) (net 81) (status 800)) - (segment (start 133.35 46.99) (end 134.62 46.99) (width 0.4318) (layer Dessous) (net 81) (status 400)) - (segment (start 127 48.26) (end 127 46.99) (width 0.4318) (layer Dessous) (net 81) (status 400)) - (segment (start 117.475 39.37) (end 117.475 45.72) (width 0.4318) (layer Dessous) (net 81) (status 800)) - (segment (start 127 45.72) (end 127.635 45.085) (width 0.4318) (layer Dessous) (net 81)) - (segment (start 131.445 45.085) (end 133.35 46.99) (width 0.4318) (layer Dessous) (net 81)) - (segment (start 125.095 49.53) (end 125.73 48.895) (width 0.4318) (layer Dessous) (net 81)) - (segment (start 119.38 48.895) (end 120.015 49.53) (width 0.4318) (layer Dessous) (net 81)) + (segment (start 187.325 41.91) (end 172.72 41.91) (width 0.4318) (layer Dessous) (net 80) (status 800)) + (segment (start 127 39.37) (end 127 41.275) (width 0.4318) (layer Dessous) (net 80) (status 800)) + (segment (start 140.97 40.005) (end 170.815 40.005) (width 0.4318) (layer Dessous) (net 80)) + (segment (start 140.97 40.005) (end 139.065 41.91) (width 0.4318) (layer Dessous) (net 80)) + (segment (start 139.065 41.91) (end 134.62 41.91) (width 0.4318) (layer Dessous) (net 80) (status 400)) + (segment (start 127 41.275) (end 127.635 41.91) (width 0.4318) (layer Dessous) (net 80)) + (segment (start 170.815 40.005) (end 172.72 41.91) (width 0.4318) (layer Dessous) (net 80)) (segment (start 127.635 45.085) (end 131.445 45.085) (width 0.4318) (layer Dessous) (net 81)) - (segment (start 132.715 44.45) (end 134.62 44.45) (width 0.4318) (layer Dessous) (net 82) (status 400)) - (segment (start 132.08 43.815) (end 132.715 44.45) (width 0.4318) (layer Dessous) (net 82)) - (segment (start 125.095 43.815) (end 132.08 43.815) (width 0.4318) (layer Dessous) (net 82)) - (segment (start 124.46 44.45) (end 125.095 43.815) (width 0.4318) (layer Dessous) (net 82)) - (segment (start 134.62 44.45) (end 139.065 44.45) (width 0.4318) (layer Dessous) (net 82) (status 800)) - (segment (start 124.46 46.99) (end 124.46 44.45) (width 0.4318) (layer Dessous) (net 82) (status 800)) - (segment (start 139.065 44.45) (end 141.605 41.91) (width 0.4318) (layer Dessous) (net 82)) + (segment (start 119.38 48.895) (end 120.015 49.53) (width 0.4318) (layer Dessous) (net 81)) + (segment (start 125.095 49.53) (end 125.73 48.895) (width 0.4318) (layer Dessous) (net 81)) + (segment (start 131.445 45.085) (end 133.35 46.99) (width 0.4318) (layer Dessous) (net 81)) + (segment (start 127 45.72) (end 127.635 45.085) (width 0.4318) (layer Dessous) (net 81)) + (segment (start 117.475 39.37) (end 117.475 45.72) (width 0.4318) (layer Dessous) (net 81) (status 800)) + (segment (start 127 48.26) (end 127 46.99) (width 0.4318) (layer Dessous) (net 81) (status 400)) + (segment (start 133.35 46.99) (end 134.62 46.99) (width 0.4318) (layer Dessous) (net 81) (status 400)) + (segment (start 127 46.99) (end 127 45.72) (width 0.4318) (layer Dessous) (net 81) (status 800)) + (segment (start 119.38 47.625) (end 119.38 48.895) (width 0.4318) (layer Dessous) (net 81)) + (segment (start 117.475 45.72) (end 119.38 47.625) (width 0.4318) (layer Dessous) (net 81)) + (segment (start 126.365 48.895) (end 127 48.26) (width 0.4318) (layer Dessous) (net 81)) + (segment (start 125.73 48.895) (end 126.365 48.895) (width 0.4318) (layer Dessous) (net 81)) + (segment (start 120.015 49.53) (end 125.095 49.53) (width 0.4318) (layer Dessous) (net 81)) (segment (start 141.605 41.91) (end 144.78 41.91) (width 0.4318) (layer Dessous) (net 82) (status 400)) - (segment (start 141.605 93.726) (end 142.494 94.615) (width 1.016) (layer Dessous) (net 83) (status 800)) - (segment (start 147.066 129.54) (end 147.066 127.635) (width 1.016) (layer Dessous) (net 83)) - (segment (start 147.193 129.54) (end 147.066 129.54) (width 1.016) (layer Dessous) (net 83)) - (segment (start 147.193 133.35) (end 147.193 129.54) (width 1.016) (layer Dessous) (net 83) (status 800)) - (segment (start 147.066 127.635) (end 142.24 122.809) (width 1.016) (layer Dessous) (net 83)) - (via (at 142.24 122.809) (size 1.651) (layers Dessus Dessous) (net 83)) - (segment (start 142.24 122.809) (end 142.24 122.555) (width 1.016) (layer Dessus) (net 83)) - (segment (start 175.895 73.025) (end 178.435 73.025) (width 1.016) (layer Dessous) (net 83) (status 800)) - (segment (start 178.435 73.025) (end 183.515 73.025) (width 1.016) (layer Dessous) (net 83) (status 400)) - (segment (start 123.825 57.785) (end 123.825 59.69) (width 1.016) (layer Dessus) (net 83) (status 800)) - (segment (start 125.095 60.96) (end 143.51 60.96) (width 1.016) (layer Dessus) (net 83)) - (segment (start 131.445 59.69) (end 131.445 57.785) (width 1.016) (layer Dessous) (net 83) (status 400)) - (segment (start 133.985 100.965) (end 133.985 93.98) (width 0.4318) (layer Dessous) (net 83)) - (segment (start 183.515 73.025) (end 187.96 73.025) (width 1.016) (layer Dessous) (net 83) (status 800)) - (segment (start 187.96 73.025) (end 188.595 73.66) (width 1.016) (layer Dessous) (net 83)) - (segment (start 182.245 115.57) (end 180.34 115.57) (width 1.016) (layer Dessus) (net 83)) - (segment (start 155.575 122.555) (end 161.925 122.555) (width 1.016) (layer Dessus) (net 83) (status 800)) - (segment (start 161.925 122.555) (end 166.37 127) (width 1.016) (layer Dessus) (net 83)) - (segment (start 166.37 127) (end 178.435 127) (width 1.016) (layer Dessus) (net 83)) - (segment (start 173.355 73.025) (end 175.895 73.025) (width 1.016) (layer Dessous) (net 83) (status 400)) - (segment (start 178.181 69.85) (end 178.181 73.025) (width 1.016) (layer Dessous) (net 83) (status 800)) - (segment (start 189.865 81.28) (end 188.595 81.28) (width 1.016) (layer Dessus) (net 83) (status 400)) - (segment (start 170.815 70.485) (end 173.355 73.025) (width 1.016) (layer Dessous) (net 83)) - (segment (start 179.07 116.84) (end 180.34 115.57) (width 1.016) (layer Dessus) (net 83)) - (segment (start 155.575 122.555) (end 142.24 122.555) (width 1.016) (layer Dessus) (net 83) (status 800)) - (segment (start 142.24 122.555) (end 123.825 122.555) (width 1.016) (layer Dessus) (net 83)) - (segment (start 119.38 107.315) (end 123.825 107.315) (width 1.016) (layer Dessus) (net 83)) - (segment (start 123.825 122.555) (end 122.555 123.825) (width 1.016) (layer Dessus) (net 83)) - (segment (start 170.18 64.135) (end 170.815 64.77) (width 1.016) (layer Dessous) (net 83)) - (segment (start 122.555 123.825) (end 119.38 123.825) (width 1.016) (layer Dessus) (net 83)) - (segment (start 118.745 123.19) (end 118.745 107.95) (width 1.016) (layer Dessus) (net 83)) - (segment (start 142.494 94.615) (end 147.955 94.615) (width 1.016) (layer Dessous) (net 83) (status 400)) - (segment (start 118.745 112.014) (end 123.19 112.014) (width 1.016) (layer Dessous) (net 83) (status 800)) - (segment (start 123.825 111.379) (end 123.825 109.855) (width 1.016) (layer Dessous) (net 83) (status 400)) - (segment (start 123.19 112.014) (end 123.825 111.379) (width 1.016) (layer Dessous) (net 83)) - (segment (start 141.605 93.345) (end 141.605 93.726) (width 1.016) (layer Dessous) (net 83) (status 400)) - (segment (start 137.795 93.345) (end 141.605 93.345) (width 1.016) (layer Dessous) (net 83)) - (segment (start 133.985 73.025) (end 133.985 78.74) (width 0.4318) (layer Dessous) (net 83)) - (segment (start 123.825 57.785) (end 123.825 59.69) (width 1.016) (layer Dessous) (net 83) (status 800)) - (segment (start 170.815 66.675) (end 170.815 70.485) (width 1.016) (layer Dessous) (net 83) (status 800)) - (segment (start 178.181 73.025) (end 178.435 73.025) (width 1.016) (layer Dessous) (net 83)) - (segment (start 127.635 84.455) (end 127.635 84.074) (width 1.016) (layer Dessous) (net 83) (status 400)) - (segment (start 123.825 59.69) (end 125.095 60.96) (width 1.016) (layer Dessus) (net 83)) - (segment (start 123.825 107.315) (end 131.445 107.315) (width 1.016) (layer Dessus) (net 83)) - (segment (start 175.895 73.025) (end 175.514 73.025) (width 1.016) (layer Dessous) (net 83) (status 800)) - (segment (start 146.685 64.135) (end 147.955 64.135) (width 1.016) (layer Dessus) (net 83) (status 400)) - (segment (start 191.135 104.775) (end 191.135 82.55) (width 1.016) (layer Dessus) (net 83)) - (segment (start 191.135 104.775) (end 191.135 106.68) (width 1.016) (layer Dessus) (net 83)) - (segment (start 136.144 79.375) (end 136.144 83.82) (width 1.016) (layer Dessous) (net 83) (status 800)) - (segment (start 178.435 127) (end 179.07 126.365) (width 1.016) (layer Dessus) (net 83)) - (segment (start 123.825 59.69) (end 124.46 60.325) (width 0.635) (layer Dessous) (net 83)) - (segment (start 143.51 60.96) (end 146.685 64.135) (width 1.016) (layer Dessus) (net 83)) - (segment (start 136.144 83.82) (end 135.509 84.455) (width 1.016) (layer Dessous) (net 83)) - (segment (start 133.985 84.455) (end 127.635 84.455) (width 1.016) (layer Dessous) (net 83)) - (segment (start 135.509 84.455) (end 133.985 84.455) (width 1.016) (layer Dessous) (net 83)) - (segment (start 135.255 71.755) (end 133.985 73.025) (width 1.016) (layer Dessous) (net 83) (status 800)) - (segment (start 133.985 88.9) (end 134.62 89.535) (width 1.016) (layer Dessous) (net 83)) - (segment (start 134.62 89.535) (end 137.16 89.535) (width 1.016) (layer Dessous) (net 83)) - (segment (start 137.16 89.535) (end 137.795 90.17) (width 1.016) (layer Dessous) (net 83)) - (segment (start 137.795 90.17) (end 137.795 93.345) (width 1.016) (layer Dessous) (net 83)) - (segment (start 133.985 84.455) (end 133.985 88.9) (width 1.016) (layer Dessous) (net 83)) - (segment (start 125.095 79.375) (end 127.635 81.915) (width 1.016) (layer Dessous) (net 83)) - (segment (start 127.635 81.915) (end 127.635 84.455) (width 1.016) (layer Dessous) (net 83)) - (segment (start 125.095 76.835) (end 125.095 79.375) (width 1.016) (layer Dessous) (net 83)) - (segment (start 124.46 60.325) (end 130.81 60.325) (width 0.635) (layer Dessous) (net 83)) - (segment (start 130.81 60.325) (end 131.445 59.69) (width 1.016) (layer Dessous) (net 83)) - (segment (start 119.38 123.825) (end 118.745 123.19) (width 1.016) (layer Dessus) (net 83)) - (segment (start 188.595 73.66) (end 188.595 81.28) (width 1.016) (layer Dessous) (net 83) (status 400)) - (segment (start 122.555 76.835) (end 125.095 76.835) (width 1.016) (layer Dessous) (net 83) (status 800)) - (segment (start 123.825 109.855) (end 123.825 107.315) (width 1.016) (layer Dessous) (net 83) (status 800)) - (via (at 123.825 107.315) (size 1.651) (layers Dessus Dessous) (net 83)) - (segment (start 131.445 107.315) (end 132.715 106.045) (width 1.016) (layer Dessus) (net 83)) - (segment (start 132.715 104.775) (end 132.715 106.045) (width 1.016) (layer Dessous) (net 83)) - (via (at 132.715 106.045) (size 1.651) (layers Dessus Dessous) (net 83)) - (segment (start 135.255 102.235) (end 132.715 104.775) (width 1.016) (layer Dessous) (net 83) (status 800)) - (segment (start 125.095 74.295) (end 125.095 76.835) (width 1.016) (layer Dessous) (net 83) (status 800)) - (segment (start 179.07 126.365) (end 179.07 116.84) (width 1.016) (layer Dessus) (net 83)) - (segment (start 118.745 107.95) (end 119.38 107.315) (width 1.016) (layer Dessus) (net 83)) - (segment (start 134.62 79.375) (end 136.144 79.375) (width 1.016) (layer Dessous) (net 83) (status 400)) - (segment (start 133.985 78.74) (end 134.62 79.375) (width 1.016) (layer Dessous) (net 83)) - (segment (start 170.815 64.77) (end 170.815 66.675) (width 1.016) (layer Dessous) (net 83) (status 400)) - (segment (start 150.495 64.135) (end 170.18 64.135) (width 1.016) (layer Dessous) (net 83) (status 800)) - (segment (start 147.955 64.135) (end 150.495 64.135) (width 1.016) (layer Dessous) (net 83) (status C00)) - (segment (start 191.135 82.55) (end 189.865 81.28) (width 1.016) (layer Dessus) (net 83)) - (segment (start 133.985 93.98) (end 134.62 93.345) (width 1.016) (layer Dessous) (net 83)) - (segment (start 134.62 93.345) (end 137.795 93.345) (width 1.016) (layer Dessous) (net 83)) - (segment (start 135.255 102.235) (end 133.985 100.965) (width 1.016) (layer Dessous) (net 83) (status 800)) + (segment (start 139.065 44.45) (end 141.605 41.91) (width 0.4318) (layer Dessous) (net 82)) + (segment (start 124.46 46.99) (end 124.46 44.45) (width 0.4318) (layer Dessous) (net 82) (status 800)) + (segment (start 134.62 44.45) (end 139.065 44.45) (width 0.4318) (layer Dessous) (net 82) (status 800)) + (segment (start 124.46 44.45) (end 125.095 43.815) (width 0.4318) (layer Dessous) (net 82)) + (segment (start 125.095 43.815) (end 132.08 43.815) (width 0.4318) (layer Dessous) (net 82)) + (segment (start 132.08 43.815) (end 132.715 44.45) (width 0.4318) (layer Dessous) (net 82)) + (segment (start 132.715 44.45) (end 134.62 44.45) (width 0.4318) (layer Dessous) (net 82) (status 400)) (segment (start 191.135 106.68) (end 182.245 115.57) (width 1.016) (layer Dessus) (net 83)) + (segment (start 135.255 102.235) (end 133.985 100.965) (width 1.016) (layer Dessous) (net 83) (status 800)) + (segment (start 134.62 93.345) (end 137.795 93.345) (width 1.016) (layer Dessous) (net 83)) + (segment (start 133.985 93.98) (end 134.62 93.345) (width 1.016) (layer Dessous) (net 83)) + (segment (start 191.135 82.55) (end 189.865 81.28) (width 1.016) (layer Dessus) (net 83)) + (segment (start 147.955 64.135) (end 150.495 64.135) (width 1.016) (layer Dessous) (net 83) (status C00)) + (segment (start 150.495 64.135) (end 170.18 64.135) (width 1.016) (layer Dessous) (net 83) (status 800)) + (segment (start 170.815 64.77) (end 170.815 66.675) (width 1.016) (layer Dessous) (net 83) (status 400)) + (segment (start 133.985 78.74) (end 134.62 79.375) (width 1.016) (layer Dessous) (net 83)) + (segment (start 134.62 79.375) (end 136.144 79.375) (width 1.016) (layer Dessous) (net 83) (status 400)) + (segment (start 118.745 107.95) (end 119.38 107.315) (width 1.016) (layer Dessus) (net 83)) + (segment (start 179.07 126.365) (end 179.07 116.84) (width 1.016) (layer Dessus) (net 83)) + (segment (start 125.095 74.295) (end 125.095 76.835) (width 1.016) (layer Dessous) (net 83) (status 800)) + (segment (start 135.255 102.235) (end 132.715 104.775) (width 1.016) (layer Dessous) (net 83) (status 800)) + (via (at 132.715 106.045) (size 1.651) (layers Dessus Dessous) (net 83)) + (segment (start 132.715 104.775) (end 132.715 106.045) (width 1.016) (layer Dessous) (net 83)) + (segment (start 131.445 107.315) (end 132.715 106.045) (width 1.016) (layer Dessus) (net 83)) + (via (at 123.825 107.315) (size 1.651) (layers Dessus Dessous) (net 83)) + (segment (start 123.825 109.855) (end 123.825 107.315) (width 1.016) (layer Dessous) (net 83) (status 800)) + (segment (start 122.555 76.835) (end 125.095 76.835) (width 1.016) (layer Dessous) (net 83) (status 800)) + (segment (start 188.595 73.66) (end 188.595 81.28) (width 1.016) (layer Dessous) (net 83) (status 400)) + (segment (start 119.38 123.825) (end 118.745 123.19) (width 1.016) (layer Dessus) (net 83)) + (segment (start 130.81 60.325) (end 131.445 59.69) (width 1.016) (layer Dessous) (net 83)) + (segment (start 124.46 60.325) (end 130.81 60.325) (width 0.635) (layer Dessous) (net 83)) + (segment (start 125.095 76.835) (end 125.095 79.375) (width 1.016) (layer Dessous) (net 83)) + (segment (start 127.635 81.915) (end 127.635 84.455) (width 1.016) (layer Dessous) (net 83)) + (segment (start 125.095 79.375) (end 127.635 81.915) (width 1.016) (layer Dessous) (net 83)) + (segment (start 133.985 84.455) (end 133.985 88.9) (width 1.016) (layer Dessous) (net 83)) + (segment (start 137.795 90.17) (end 137.795 93.345) (width 1.016) (layer Dessous) (net 83)) + (segment (start 137.16 89.535) (end 137.795 90.17) (width 1.016) (layer Dessous) (net 83)) + (segment (start 134.62 89.535) (end 137.16 89.535) (width 1.016) (layer Dessous) (net 83)) + (segment (start 133.985 88.9) (end 134.62 89.535) (width 1.016) (layer Dessous) (net 83)) + (segment (start 135.255 71.755) (end 133.985 73.025) (width 1.016) (layer Dessous) (net 83) (status 800)) + (segment (start 135.509 84.455) (end 133.985 84.455) (width 1.016) (layer Dessous) (net 83)) + (segment (start 133.985 84.455) (end 127.635 84.455) (width 1.016) (layer Dessous) (net 83)) + (segment (start 136.144 83.82) (end 135.509 84.455) (width 1.016) (layer Dessous) (net 83)) + (segment (start 143.51 60.96) (end 146.685 64.135) (width 1.016) (layer Dessus) (net 83)) + (segment (start 123.825 59.69) (end 124.46 60.325) (width 0.635) (layer Dessous) (net 83)) + (segment (start 178.435 127) (end 179.07 126.365) (width 1.016) (layer Dessus) (net 83)) + (segment (start 136.144 79.375) (end 136.144 83.82) (width 1.016) (layer Dessous) (net 83) (status 800)) + (segment (start 191.135 104.775) (end 191.135 106.68) (width 1.016) (layer Dessus) (net 83)) + (segment (start 191.135 104.775) (end 191.135 82.55) (width 1.016) (layer Dessus) (net 83)) + (segment (start 146.685 64.135) (end 147.955 64.135) (width 1.016) (layer Dessus) (net 83) (status 400)) + (segment (start 175.895 73.025) (end 175.514 73.025) (width 1.016) (layer Dessous) (net 83) (status 800)) + (segment (start 123.825 107.315) (end 131.445 107.315) (width 1.016) (layer Dessus) (net 83)) + (segment (start 123.825 59.69) (end 125.095 60.96) (width 1.016) (layer Dessus) (net 83)) + (segment (start 127.635 84.455) (end 127.635 84.074) (width 1.016) (layer Dessous) (net 83) (status 400)) + (segment (start 178.181 73.025) (end 178.435 73.025) (width 1.016) (layer Dessous) (net 83)) + (segment (start 170.815 66.675) (end 170.815 70.485) (width 1.016) (layer Dessous) (net 83) (status 800)) + (segment (start 123.825 57.785) (end 123.825 59.69) (width 1.016) (layer Dessous) (net 83) (status 800)) + (segment (start 133.985 73.025) (end 133.985 78.74) (width 0.4318) (layer Dessous) (net 83)) + (segment (start 137.795 93.345) (end 141.605 93.345) (width 1.016) (layer Dessous) (net 83)) + (segment (start 141.605 93.345) (end 141.605 93.726) (width 1.016) (layer Dessous) (net 83) (status 400)) + (segment (start 123.19 112.014) (end 123.825 111.379) (width 1.016) (layer Dessous) (net 83)) + (segment (start 123.825 111.379) (end 123.825 109.855) (width 1.016) (layer Dessous) (net 83) (status 400)) + (segment (start 118.745 112.014) (end 123.19 112.014) (width 1.016) (layer Dessous) (net 83) (status 800)) + (segment (start 142.494 94.615) (end 147.955 94.615) (width 1.016) (layer Dessous) (net 83) (status 400)) + (segment (start 118.745 123.19) (end 118.745 107.95) (width 1.016) (layer Dessus) (net 83)) + (segment (start 122.555 123.825) (end 119.38 123.825) (width 1.016) (layer Dessus) (net 83)) + (segment (start 170.18 64.135) (end 170.815 64.77) (width 1.016) (layer Dessous) (net 83)) + (segment (start 123.825 122.555) (end 122.555 123.825) (width 1.016) (layer Dessus) (net 83)) + (segment (start 119.38 107.315) (end 123.825 107.315) (width 1.016) (layer Dessus) (net 83)) + (segment (start 142.24 122.555) (end 123.825 122.555) (width 1.016) (layer Dessus) (net 83)) + (segment (start 155.575 122.555) (end 142.24 122.555) (width 1.016) (layer Dessus) (net 83) (status 800)) + (segment (start 179.07 116.84) (end 180.34 115.57) (width 1.016) (layer Dessus) (net 83)) + (segment (start 170.815 70.485) (end 173.355 73.025) (width 1.016) (layer Dessous) (net 83)) + (segment (start 189.865 81.28) (end 188.595 81.28) (width 1.016) (layer Dessus) (net 83) (status 400)) + (segment (start 178.181 69.85) (end 178.181 73.025) (width 1.016) (layer Dessous) (net 83) (status 800)) + (segment (start 173.355 73.025) (end 175.895 73.025) (width 1.016) (layer Dessous) (net 83) (status 400)) + (segment (start 166.37 127) (end 178.435 127) (width 1.016) (layer Dessus) (net 83)) + (segment (start 161.925 122.555) (end 166.37 127) (width 1.016) (layer Dessus) (net 83)) + (segment (start 155.575 122.555) (end 161.925 122.555) (width 1.016) (layer Dessus) (net 83) (status 800)) + (segment (start 182.245 115.57) (end 180.34 115.57) (width 1.016) (layer Dessus) (net 83)) + (segment (start 187.96 73.025) (end 188.595 73.66) (width 1.016) (layer Dessous) (net 83)) + (segment (start 183.515 73.025) (end 187.96 73.025) (width 1.016) (layer Dessous) (net 83) (status 800)) + (segment (start 133.985 100.965) (end 133.985 93.98) (width 0.4318) (layer Dessous) (net 83)) + (segment (start 131.445 59.69) (end 131.445 57.785) (width 1.016) (layer Dessous) (net 83) (status 400)) + (segment (start 125.095 60.96) (end 143.51 60.96) (width 1.016) (layer Dessus) (net 83)) + (segment (start 123.825 57.785) (end 123.825 59.69) (width 1.016) (layer Dessus) (net 83) (status 800)) + (segment (start 178.435 73.025) (end 183.515 73.025) (width 1.016) (layer Dessous) (net 83) (status 400)) + (segment (start 175.895 73.025) (end 178.435 73.025) (width 1.016) (layer Dessous) (net 83) (status 800)) + (segment (start 142.24 122.809) (end 142.24 122.555) (width 1.016) (layer Dessus) (net 83)) + (via (at 142.24 122.809) (size 1.651) (layers Dessus Dessous) (net 83)) + (segment (start 147.066 127.635) (end 142.24 122.809) (width 1.016) (layer Dessous) (net 83)) + (segment (start 147.193 133.35) (end 147.193 129.54) (width 1.016) (layer Dessous) (net 83) (status 800)) + (segment (start 147.193 129.54) (end 147.066 129.54) (width 1.016) (layer Dessous) (net 83)) + (segment (start 147.066 129.54) (end 147.066 127.635) (width 1.016) (layer Dessous) (net 83)) + (segment (start 141.605 93.726) (end 142.494 94.615) (width 1.016) (layer Dessous) (net 83) (status 800)) (zone (net 66) (net_name GND) (layer Dessous) (tstamp 47AB4739) (hatch edge 0.508) (connect_pads (clearance 0.508)) diff --git a/demos/video/video.kicad_pcb b/demos/video/video.kicad_pcb index ca1b31ab13..a7fe893824 100644 --- a/demos/video/video.kicad_pcb +++ b/demos/video/video.kicad_pcb @@ -1,9 +1,9 @@ -(kicad_pcb (version 3) (host pcbnew "(2013-01-12 BZR 3902)-testing") +(kicad_pcb (version 4) (host pcbnew "(2014-07-17 BZR 5006)-product") (general (links 1558) (no_connects 0) - (area 40.893999 55.7022 365.734601 163.525201) + (area 40.893999 55.3974 365.734601 163.525201) (thickness 1.6002) (drawings 39) (tracks 9185) @@ -14,23 +14,23 @@ (page A3) (layers - (15 Composant signal) - (2 Interne_2 signal) - (1 Interne_1 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) - (25 Cmts.User user) - (26 Eco1.User user) - (27 Eco2.User user) - (28 Contours.Ci user) + (0 Composant signal) + (1 Interne_2 signal) + (2 Interne_1 signal) + (31 Cuivre signal) + (32 B.Adhes user) + (33 F.Adhes user) + (34 B.Paste user) + (35 F.Paste user) + (36 B.SilkS user) + (37 F.SilkS user) + (38 B.Mask user) + (39 F.Mask user) + (40 Dwgs.User user) + (41 Cmts.User user) + (42 Eco1.User user) + (43 Eco2.User user) + (44 Edge.Cuts user) ) (setup @@ -59,12 +59,12 @@ (pad_drill 3.048) (pad_to_mask_clearance 0.254) (aux_axis_origin 0 0) - (visible_elements FFFFFFBF) + (visible_elements 7FFFFFFF) (pcbplotparams - (layerselection 3178497) - (usegerberextensions true) + (layerselection 0x00030_80000001) + (usegerberextensions false) (excludeedgelayer true) - (linewidth 79) + (linewidth 0.150000) (plotframeref false) (viasonmask false) (mode 1) @@ -77,13 +77,12 @@ (psa4output false) (plotreference true) (plotvalue true) - (plotothertext true) (plotinvisibletext false) (padsonsilk false) (subtractmaskfromsilk false) (outputformat 1) (mirror false) - (drillshape 1) + (drillshape 0) (scaleselection 1) (outputdirectory "")) ) @@ -469,7 +468,6 @@ (via_drill 0.635) (uvia_dia 0.508) (uvia_drill 0.127) - (add_net "") (add_net +5V) (add_net /ESVIDEO-RVB/BLUE) (add_net /ESVIDEO-RVB/BLUE_IN) @@ -858,36 +856,27 @@ (descr "Quartz boitier HC-18 horizontal") (tags "QUARTZ DEV") (path /4BF0367F/22760FA3) - (fp_text reference X3 (at 0 6.35 180) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text reference X3 (at 0 6.35 180) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) - (fp_text value 4,433618MH (at 0 11.43 180) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (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)) - (pad 1 thru_hole circle (at -2.54 0 180) (size 1.778 1.778) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 324 N-000102) - ) - (pad 2 thru_hole circle (at 2.54 0 180) (size 1.778 1.778) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 316 N-000094) - ) - (model discret/crystal_hc18u_horizontal.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) + (fp_text value 4,433618MH (at 0 11.43 180) (layer F.SilkS) + (effects (font (thickness 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 180) (size 1.778 1.778) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 324 N-000102)) + (pad 2 thru_hole circle (at 2.54 0 180) (size 1.778 1.778) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 316 N-000094)) (model discret/xtal/crystal_hc18u_horizontal.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -898,36 +887,28 @@ (module LRTDK (layer Composant) (tedit 200000) (tstamp 349FB562) (at 72.771 110.617 270) (path /4BF0367F/349FB562) - (fp_text reference L6 (at -0.381 -5.08 450) (layer Dessus.SilkS) + (fp_text reference L6 (at -0.381 -5.08 450) (layer F.SilkS) (effects (font (size 1.524 1.016) (thickness 0.254))) ) - (fp_text value 470nS (at 0 -5.08 270) (layer Dessus.SilkS) hide + (fp_text value 470nS (at 0 -5.08 270) (layer F.SilkS) hide (effects (font (size 1.524 1.016) (thickness 0.254))) ) - (fp_line (start 12.7 -1.27) (end 12.7 0) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 7.62 -1.27) (end 7.62 0) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -10.16 0) (end -10.16 -1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -12.7 0) (end -12.7 -1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -15.24 -1.27) (end -15.24 -11.43) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -15.24 -11.43) (end 15.24 -11.43) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 15.24 -11.43) (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)) - (pad 1 thru_hole circle (at -12.7 0 270) (size 1.524 1.524) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 306 N-000084) - ) - (pad 3 thru_hole circle (at -10.16 0 270) (size 1.524 1.524) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 3 thru_hole circle (at 7.62 0 270) (size 1.524 1.524) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 2 thru_hole circle (at 12.7 0 270) (size 1.524 1.524) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 314 N-000092) - ) + (fp_line (start 12.7 -1.27) (end 12.7 0) (layer F.SilkS) (width 0.381)) + (fp_line (start 7.62 -1.27) (end 7.62 0) (layer F.SilkS) (width 0.381)) + (fp_line (start -10.16 0) (end -10.16 -1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -12.7 0) (end -12.7 -1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -15.24 -1.27) (end -15.24 -11.43) (layer F.SilkS) (width 0.381)) + (fp_line (start -15.24 -11.43) (end 15.24 -11.43) (layer F.SilkS) (width 0.381)) + (fp_line (start 15.24 -11.43) (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)) + (pad 1 thru_hole circle (at -12.7 0 270) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 306 N-000084)) + (pad 3 thru_hole circle (at -10.16 0 270) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 3 thru_hole circle (at 7.62 0 270) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 2 thru_hole circle (at 12.7 0 270) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 314 N-000092)) ) (module SO20L (layer Cuivre) (tedit 200000) (tstamp 33A7E303) @@ -936,99 +917,59 @@ (tags "CMS SOJ") (path /4BF0367D/33A7E303) (attr smd) - (fp_text reference U3 (at 0 -1.27 90) (layer Dessous.SilkS) + (fp_text reference U3 (at 0 -1.27 90) (layer B.SilkS) (effects (font (size 1.524 1.016) (thickness 0.2032)) (justify mirror)) ) - (fp_text value 74LS245 (at 0 1.27 90) (layer Dessous.SilkS) + (fp_text value 74LS245 (at 0 1.27 90) (layer B.SilkS) (effects (font (size 1.524 1.016) (thickness 0.2032)) (justify mirror)) ) - (fp_line (start 6.35 -3.683) (end 6.35 3.683) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -6.35 3.683) (end -6.35 -3.683) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 6.35 -3.683) (end -6.35 -3.683) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -6.35 3.683) (end 6.35 3.683) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -6.35 0.635) (end -5.08 0.635) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -5.08 0.635) (end -5.08 -0.635) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -5.08 -0.635) (end -6.35 -0.635) (layer Dessous.SilkS) (width 0.127)) - (pad 11 smd rect (at 5.715 4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 80 /RAMS/TVRAM7) - ) - (pad 12 smd rect (at 4.445 4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 79 /RAMS/TVRAM6) - ) - (pad 13 smd rect (at 3.175 4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 78 /RAMS/TVRAM5) - ) - (pad 14 smd rect (at 1.905 4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 77 /RAMS/TVRAM4) - ) - (pad 15 smd rect (at 0.635 4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 74 /RAMS/TVRAM3) - ) - (pad 16 smd rect (at -0.635 4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 63 /RAMS/TVRAM2) - ) - (pad 17 smd rect (at -1.905 4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 52 /RAMS/TVRAM1) - ) - (pad 18 smd rect (at -3.175 4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 51 /RAMS/TVRAM0) - ) - (pad 19 smd rect (at -4.445 4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 250 /muxdata/ACCES_RAM-) - ) - (pad 20 smd rect (at -5.715 4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 4 +5V) - ) - (pad 1 smd rect (at -5.715 -4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 252 /muxdata/DATA_WR) - ) - (pad 2 smd rect (at -4.445 -4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 7 /ESVIDEO-RVB/DPC0) - ) - (pad 3 smd rect (at -3.175 -4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 8 /ESVIDEO-RVB/DPC1) - ) - (pad 4 smd rect (at -1.905 -4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 9 /ESVIDEO-RVB/DPC2) - ) - (pad 5 smd rect (at -0.635 -4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 273 /muxdata/DPC3) - ) - (pad 6 smd rect (at 0.635 -4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 10 /ESVIDEO-RVB/DPC4) - ) - (pad 7 smd rect (at 1.905 -4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 11 /ESVIDEO-RVB/DPC5) - ) - (pad 8 smd rect (at 3.175 -4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 276 /muxdata/DPC6) - ) - (pad 9 smd rect (at 4.445 -4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 12 /ESVIDEO-RVB/DPC7) - ) - (pad 10 smd rect (at 5.715 -4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start 6.35 -3.683) (end 6.35 3.683) (layer B.SilkS) (width 0.127)) + (fp_line (start -6.35 3.683) (end -6.35 -3.683) (layer B.SilkS) (width 0.127)) + (fp_line (start 6.35 -3.683) (end -6.35 -3.683) (layer B.SilkS) (width 0.127)) + (fp_line (start -6.35 3.683) (end 6.35 3.683) (layer B.SilkS) (width 0.127)) + (fp_line (start -6.35 0.635) (end -5.08 0.635) (layer B.SilkS) (width 0.127)) + (fp_line (start -5.08 0.635) (end -5.08 -0.635) (layer B.SilkS) (width 0.127)) + (fp_line (start -5.08 -0.635) (end -6.35 -0.635) (layer B.SilkS) (width 0.127)) + (pad 11 smd rect (at 5.715 4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 80 /RAMS/TVRAM7)) + (pad 12 smd rect (at 4.445 4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 79 /RAMS/TVRAM6)) + (pad 13 smd rect (at 3.175 4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 78 /RAMS/TVRAM5)) + (pad 14 smd rect (at 1.905 4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 77 /RAMS/TVRAM4)) + (pad 15 smd rect (at 0.635 4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 74 /RAMS/TVRAM3)) + (pad 16 smd rect (at -0.635 4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 63 /RAMS/TVRAM2)) + (pad 17 smd rect (at -1.905 4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 52 /RAMS/TVRAM1)) + (pad 18 smd rect (at -3.175 4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 51 /RAMS/TVRAM0)) + (pad 19 smd rect (at -4.445 4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 250 /muxdata/ACCES_RAM-)) + (pad 20 smd rect (at -5.715 4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 4 +5V)) + (pad 1 smd rect (at -5.715 -4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 252 /muxdata/DATA_WR)) + (pad 2 smd rect (at -4.445 -4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 7 /ESVIDEO-RVB/DPC0)) + (pad 3 smd rect (at -3.175 -4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 8 /ESVIDEO-RVB/DPC1)) + (pad 4 smd rect (at -1.905 -4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 9 /ESVIDEO-RVB/DPC2)) + (pad 5 smd rect (at -0.635 -4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 273 /muxdata/DPC3)) + (pad 6 smd rect (at 0.635 -4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 10 /ESVIDEO-RVB/DPC4)) + (pad 7 smd rect (at 1.905 -4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 11 /ESVIDEO-RVB/DPC5)) + (pad 8 smd rect (at 3.175 -4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 276 /muxdata/DPC6)) + (pad 9 smd rect (at 4.445 -4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 12 /ESVIDEO-RVB/DPC7)) + (pad 10 smd rect (at 5.715 -4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/cms_so20.wrl (at (xyz 0 0 0)) (scale (xyz 0.5 0.6 0.5)) @@ -1042,99 +983,59 @@ (tags "CMS SOJ") (path /4BF0367D/4BF036D7) (attr smd) - (fp_text reference U4 (at 0 -1.27 90) (layer Dessous.SilkS) + (fp_text reference U4 (at 0 -1.27 90) (layer B.SilkS) (effects (font (size 1.524 1.016) (thickness 0.2032)) (justify mirror)) ) - (fp_text value 74LS245 (at 0 1.27 90) (layer Dessous.SilkS) + (fp_text value 74LS245 (at 0 1.27 90) (layer B.SilkS) (effects (font (size 1.524 1.016) (thickness 0.2032)) (justify mirror)) ) - (fp_line (start 6.35 -3.683) (end 6.35 3.683) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -6.35 3.683) (end -6.35 -3.683) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 6.35 -3.683) (end -6.35 -3.683) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -6.35 3.683) (end 6.35 3.683) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -6.35 0.635) (end -5.08 0.635) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -5.08 0.635) (end -5.08 -0.635) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -5.08 -0.635) (end -6.35 -0.635) (layer Dessous.SilkS) (width 0.127)) - (pad 11 smd rect (at 5.715 4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 58 /RAMS/TVRAM15) - ) - (pad 12 smd rect (at 4.445 4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 57 /RAMS/TVRAM14) - ) - (pad 13 smd rect (at 3.175 4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 56 /RAMS/TVRAM13) - ) - (pad 14 smd rect (at 1.905 4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 55 /RAMS/TVRAM12) - ) - (pad 15 smd rect (at 0.635 4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 54 /RAMS/TVRAM11) - ) - (pad 16 smd rect (at -0.635 4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 53 /RAMS/TVRAM10) - ) - (pad 17 smd rect (at -1.905 4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 82 /RAMS/TVRAM9) - ) - (pad 18 smd rect (at -3.175 4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 81 /RAMS/TVRAM8) - ) - (pad 19 smd rect (at -4.445 4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 250 /muxdata/ACCES_RAM-) - ) - (pad 20 smd rect (at -5.715 4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 4 +5V) - ) - (pad 1 smd rect (at -5.715 -4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 252 /muxdata/DATA_WR) - ) - (pad 2 smd rect (at -4.445 -4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 277 /muxdata/DPC8) - ) - (pad 3 smd rect (at -3.175 -4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 278 /muxdata/DPC9) - ) - (pad 4 smd rect (at -1.905 -4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 253 /muxdata/DPC10) - ) - (pad 5 smd rect (at -0.635 -4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 254 /muxdata/DPC11) - ) - (pad 6 smd rect (at 0.635 -4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 255 /muxdata/DPC12) - ) - (pad 7 smd rect (at 1.905 -4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 256 /muxdata/DPC13) - ) - (pad 8 smd rect (at 3.175 -4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 257 /muxdata/DPC14) - ) - (pad 9 smd rect (at 4.445 -4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 258 /muxdata/DPC15) - ) - (pad 10 smd rect (at 5.715 -4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start 6.35 -3.683) (end 6.35 3.683) (layer B.SilkS) (width 0.127)) + (fp_line (start -6.35 3.683) (end -6.35 -3.683) (layer B.SilkS) (width 0.127)) + (fp_line (start 6.35 -3.683) (end -6.35 -3.683) (layer B.SilkS) (width 0.127)) + (fp_line (start -6.35 3.683) (end 6.35 3.683) (layer B.SilkS) (width 0.127)) + (fp_line (start -6.35 0.635) (end -5.08 0.635) (layer B.SilkS) (width 0.127)) + (fp_line (start -5.08 0.635) (end -5.08 -0.635) (layer B.SilkS) (width 0.127)) + (fp_line (start -5.08 -0.635) (end -6.35 -0.635) (layer B.SilkS) (width 0.127)) + (pad 11 smd rect (at 5.715 4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 58 /RAMS/TVRAM15)) + (pad 12 smd rect (at 4.445 4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 57 /RAMS/TVRAM14)) + (pad 13 smd rect (at 3.175 4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 56 /RAMS/TVRAM13)) + (pad 14 smd rect (at 1.905 4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 55 /RAMS/TVRAM12)) + (pad 15 smd rect (at 0.635 4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 54 /RAMS/TVRAM11)) + (pad 16 smd rect (at -0.635 4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 53 /RAMS/TVRAM10)) + (pad 17 smd rect (at -1.905 4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 82 /RAMS/TVRAM9)) + (pad 18 smd rect (at -3.175 4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 81 /RAMS/TVRAM8)) + (pad 19 smd rect (at -4.445 4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 250 /muxdata/ACCES_RAM-)) + (pad 20 smd rect (at -5.715 4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 4 +5V)) + (pad 1 smd rect (at -5.715 -4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 252 /muxdata/DATA_WR)) + (pad 2 smd rect (at -4.445 -4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 277 /muxdata/DPC8)) + (pad 3 smd rect (at -3.175 -4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 278 /muxdata/DPC9)) + (pad 4 smd rect (at -1.905 -4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 253 /muxdata/DPC10)) + (pad 5 smd rect (at -0.635 -4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 254 /muxdata/DPC11)) + (pad 6 smd rect (at 0.635 -4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 255 /muxdata/DPC12)) + (pad 7 smd rect (at 1.905 -4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 256 /muxdata/DPC13)) + (pad 8 smd rect (at 3.175 -4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 257 /muxdata/DPC14)) + (pad 9 smd rect (at 4.445 -4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 258 /muxdata/DPC15)) + (pad 10 smd rect (at 5.715 -4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/cms_so20.wrl (at (xyz 0 0 0)) (scale (xyz 0.5 0.6 0.5)) @@ -1148,99 +1049,59 @@ (tags "CMS SOJ") (path /4BF0367D/4BF036D5) (attr smd) - (fp_text reference U6 (at 0 -1.27 270) (layer Dessus.SilkS) + (fp_text reference U6 (at 0 -1.27 270) (layer F.SilkS) (effects (font (size 1.524 1.016) (thickness 0.2032))) ) - (fp_text value 74LS245 (at 0 1.27 270) (layer Dessus.SilkS) + (fp_text value 74LS245 (at 0 1.27 270) (layer F.SilkS) (effects (font (size 1.524 1.016) (thickness 0.2032))) ) - (fp_line (start 6.35 3.683) (end 6.35 -3.683) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -6.35 -3.683) (end -6.35 3.683) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 6.35 3.683) (end -6.35 3.683) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -6.35 -3.683) (end 6.35 -3.683) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -6.35 -0.635) (end -5.08 -0.635) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -5.08 -0.635) (end -5.08 0.635) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -5.08 0.635) (end -6.35 0.635) (layer Dessus.SilkS) (width 0.127)) - (pad 11 smd rect (at 5.715 -4.826 270) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 76 /RAMS/TVRAM31) - ) - (pad 12 smd rect (at 4.445 -4.826 270) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 75 /RAMS/TVRAM30) - ) - (pad 13 smd rect (at 3.175 -4.826 270) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 73 /RAMS/TVRAM29) - ) - (pad 14 smd rect (at 1.905 -4.826 270) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 72 /RAMS/TVRAM28) - ) - (pad 15 smd rect (at 0.635 -4.826 270) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 71 /RAMS/TVRAM27) - ) - (pad 16 smd rect (at -0.635 -4.826 270) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 70 /RAMS/TVRAM26) - ) - (pad 17 smd rect (at -1.905 -4.826 270) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 69 /RAMS/TVRAM25) - ) - (pad 18 smd rect (at -3.175 -4.826 270) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 68 /RAMS/TVRAM24) - ) - (pad 19 smd rect (at -4.445 -4.826 270) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 250 /muxdata/ACCES_RAM-) - ) - (pad 20 smd rect (at -5.715 -4.826 270) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 1 smd rect (at -5.715 4.826 270) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 252 /muxdata/DATA_WR) - ) - (pad 2 smd rect (at -4.445 4.826 270) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 267 /muxdata/DPC24) - ) - (pad 3 smd rect (at -3.175 4.826 270) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 268 /muxdata/DPC25) - ) - (pad 4 smd rect (at -1.905 4.826 270) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 269 /muxdata/DPC26) - ) - (pad 5 smd rect (at -0.635 4.826 270) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 270 /muxdata/DPC27) - ) - (pad 6 smd rect (at 0.635 4.826 270) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 271 /muxdata/DPC28) - ) - (pad 7 smd rect (at 1.905 4.826 270) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 272 /muxdata/DPC29) - ) - (pad 8 smd rect (at 3.175 4.826 270) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 274 /muxdata/DPC30) - ) - (pad 9 smd rect (at 4.445 4.826 270) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 275 /muxdata/DPC31) - ) - (pad 10 smd rect (at 5.715 4.826 270) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) + (fp_line (start 6.35 3.683) (end 6.35 -3.683) (layer F.SilkS) (width 0.127)) + (fp_line (start -6.35 -3.683) (end -6.35 3.683) (layer F.SilkS) (width 0.127)) + (fp_line (start 6.35 3.683) (end -6.35 3.683) (layer F.SilkS) (width 0.127)) + (fp_line (start -6.35 -3.683) (end 6.35 -3.683) (layer F.SilkS) (width 0.127)) + (fp_line (start -6.35 -0.635) (end -5.08 -0.635) (layer F.SilkS) (width 0.127)) + (fp_line (start -5.08 -0.635) (end -5.08 0.635) (layer F.SilkS) (width 0.127)) + (fp_line (start -5.08 0.635) (end -6.35 0.635) (layer F.SilkS) (width 0.127)) + (pad 11 smd rect (at 5.715 -4.826 270) (size 0.508 1.27) (layers Composant F.Paste F.Mask) + (net 76 /RAMS/TVRAM31)) + (pad 12 smd rect (at 4.445 -4.826 270) (size 0.508 1.27) (layers Composant F.Paste F.Mask) + (net 75 /RAMS/TVRAM30)) + (pad 13 smd rect (at 3.175 -4.826 270) (size 0.508 1.27) (layers Composant F.Paste F.Mask) + (net 73 /RAMS/TVRAM29)) + (pad 14 smd rect (at 1.905 -4.826 270) (size 0.508 1.27) (layers Composant F.Paste F.Mask) + (net 72 /RAMS/TVRAM28)) + (pad 15 smd rect (at 0.635 -4.826 270) (size 0.508 1.27) (layers Composant F.Paste F.Mask) + (net 71 /RAMS/TVRAM27)) + (pad 16 smd rect (at -0.635 -4.826 270) (size 0.508 1.27) (layers Composant F.Paste F.Mask) + (net 70 /RAMS/TVRAM26)) + (pad 17 smd rect (at -1.905 -4.826 270) (size 0.508 1.27) (layers Composant F.Paste F.Mask) + (net 69 /RAMS/TVRAM25)) + (pad 18 smd rect (at -3.175 -4.826 270) (size 0.508 1.27) (layers Composant F.Paste F.Mask) + (net 68 /RAMS/TVRAM24)) + (pad 19 smd rect (at -4.445 -4.826 270) (size 0.508 1.27) (layers Composant F.Paste F.Mask) + (net 250 /muxdata/ACCES_RAM-)) + (pad 20 smd rect (at -5.715 -4.826 270) (size 0.508 1.27) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 1 smd rect (at -5.715 4.826 270) (size 0.508 1.27) (layers Composant F.Paste F.Mask) + (net 252 /muxdata/DATA_WR)) + (pad 2 smd rect (at -4.445 4.826 270) (size 0.508 1.27) (layers Composant F.Paste F.Mask) + (net 267 /muxdata/DPC24)) + (pad 3 smd rect (at -3.175 4.826 270) (size 0.508 1.27) (layers Composant F.Paste F.Mask) + (net 268 /muxdata/DPC25)) + (pad 4 smd rect (at -1.905 4.826 270) (size 0.508 1.27) (layers Composant F.Paste F.Mask) + (net 269 /muxdata/DPC26)) + (pad 5 smd rect (at -0.635 4.826 270) (size 0.508 1.27) (layers Composant F.Paste F.Mask) + (net 270 /muxdata/DPC27)) + (pad 6 smd rect (at 0.635 4.826 270) (size 0.508 1.27) (layers Composant F.Paste F.Mask) + (net 271 /muxdata/DPC28)) + (pad 7 smd rect (at 1.905 4.826 270) (size 0.508 1.27) (layers Composant F.Paste F.Mask) + (net 272 /muxdata/DPC29)) + (pad 8 smd rect (at 3.175 4.826 270) (size 0.508 1.27) (layers Composant F.Paste F.Mask) + (net 274 /muxdata/DPC30)) + (pad 9 smd rect (at 4.445 4.826 270) (size 0.508 1.27) (layers Composant F.Paste F.Mask) + (net 275 /muxdata/DPC31)) + (pad 10 smd rect (at 5.715 4.826 270) (size 0.508 1.27) (layers Composant F.Paste F.Mask) + (net 301 GND)) (model smd/cms_so20.wrl (at (xyz 0 0 0)) (scale (xyz 0.5 0.6 0.5)) @@ -1254,99 +1115,59 @@ (tags "CMS SOJ") (path /4BF0367D/4BF036D6) (attr smd) - (fp_text reference U5 (at 0 -1.27 90) (layer Dessous.SilkS) + (fp_text reference U5 (at 0 -1.27 90) (layer B.SilkS) (effects (font (size 1.524 1.016) (thickness 0.2032)) (justify mirror)) ) - (fp_text value 74LS245 (at 0 1.27 90) (layer Dessous.SilkS) + (fp_text value 74LS245 (at 0 1.27 90) (layer B.SilkS) (effects (font (size 1.524 1.016) (thickness 0.2032)) (justify mirror)) ) - (fp_line (start 6.35 -3.683) (end 6.35 3.683) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -6.35 3.683) (end -6.35 -3.683) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 6.35 -3.683) (end -6.35 -3.683) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -6.35 3.683) (end 6.35 3.683) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -6.35 0.635) (end -5.08 0.635) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -5.08 0.635) (end -5.08 -0.635) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -5.08 -0.635) (end -6.35 -0.635) (layer Dessous.SilkS) (width 0.127)) - (pad 11 smd rect (at 5.715 4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 67 /RAMS/TVRAM23) - ) - (pad 12 smd rect (at 4.445 4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 66 /RAMS/TVRAM22) - ) - (pad 13 smd rect (at 3.175 4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 65 /RAMS/TVRAM21) - ) - (pad 14 smd rect (at 1.905 4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 64 /RAMS/TVRAM20) - ) - (pad 15 smd rect (at 0.635 4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 62 /RAMS/TVRAM19) - ) - (pad 16 smd rect (at -0.635 4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 61 /RAMS/TVRAM18) - ) - (pad 17 smd rect (at -1.905 4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 60 /RAMS/TVRAM17) - ) - (pad 18 smd rect (at -3.175 4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 59 /RAMS/TVRAM16) - ) - (pad 19 smd rect (at -4.445 4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 250 /muxdata/ACCES_RAM-) - ) - (pad 20 smd rect (at -5.715 4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 4 +5V) - ) - (pad 1 smd rect (at -5.715 -4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 252 /muxdata/DATA_WR) - ) - (pad 2 smd rect (at -4.445 -4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 259 /muxdata/DPC16) - ) - (pad 3 smd rect (at -3.175 -4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 260 /muxdata/DPC17) - ) - (pad 4 smd rect (at -1.905 -4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 261 /muxdata/DPC18) - ) - (pad 5 smd rect (at -0.635 -4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 262 /muxdata/DPC19) - ) - (pad 6 smd rect (at 0.635 -4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 263 /muxdata/DPC20) - ) - (pad 7 smd rect (at 1.905 -4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 264 /muxdata/DPC21) - ) - (pad 8 smd rect (at 3.175 -4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 265 /muxdata/DPC22) - ) - (pad 9 smd rect (at 4.445 -4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 266 /muxdata/DPC23) - ) - (pad 10 smd rect (at 5.715 -4.826 90) (size 0.508 1.27) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start 6.35 -3.683) (end 6.35 3.683) (layer B.SilkS) (width 0.127)) + (fp_line (start -6.35 3.683) (end -6.35 -3.683) (layer B.SilkS) (width 0.127)) + (fp_line (start 6.35 -3.683) (end -6.35 -3.683) (layer B.SilkS) (width 0.127)) + (fp_line (start -6.35 3.683) (end 6.35 3.683) (layer B.SilkS) (width 0.127)) + (fp_line (start -6.35 0.635) (end -5.08 0.635) (layer B.SilkS) (width 0.127)) + (fp_line (start -5.08 0.635) (end -5.08 -0.635) (layer B.SilkS) (width 0.127)) + (fp_line (start -5.08 -0.635) (end -6.35 -0.635) (layer B.SilkS) (width 0.127)) + (pad 11 smd rect (at 5.715 4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 67 /RAMS/TVRAM23)) + (pad 12 smd rect (at 4.445 4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 66 /RAMS/TVRAM22)) + (pad 13 smd rect (at 3.175 4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 65 /RAMS/TVRAM21)) + (pad 14 smd rect (at 1.905 4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 64 /RAMS/TVRAM20)) + (pad 15 smd rect (at 0.635 4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 62 /RAMS/TVRAM19)) + (pad 16 smd rect (at -0.635 4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 61 /RAMS/TVRAM18)) + (pad 17 smd rect (at -1.905 4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 60 /RAMS/TVRAM17)) + (pad 18 smd rect (at -3.175 4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 59 /RAMS/TVRAM16)) + (pad 19 smd rect (at -4.445 4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 250 /muxdata/ACCES_RAM-)) + (pad 20 smd rect (at -5.715 4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 4 +5V)) + (pad 1 smd rect (at -5.715 -4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 252 /muxdata/DATA_WR)) + (pad 2 smd rect (at -4.445 -4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 259 /muxdata/DPC16)) + (pad 3 smd rect (at -3.175 -4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 260 /muxdata/DPC17)) + (pad 4 smd rect (at -1.905 -4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 261 /muxdata/DPC18)) + (pad 5 smd rect (at -0.635 -4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 262 /muxdata/DPC19)) + (pad 6 smd rect (at 0.635 -4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 263 /muxdata/DPC20)) + (pad 7 smd rect (at 1.905 -4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 264 /muxdata/DPC21)) + (pad 8 smd rect (at 3.175 -4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 265 /muxdata/DPC22)) + (pad 9 smd rect (at 4.445 -4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 266 /muxdata/DPC23)) + (pad 10 smd rect (at 5.715 -4.826 90) (size 0.508 1.27) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/cms_so20.wrl (at (xyz 0 0 0)) (scale (xyz 0.5 0.6 0.5)) @@ -1360,407 +1181,207 @@ (tags "CMS VQFP") (path /4BF0367D/33A567B8) (attr smd) - (fp_text reference U22 (at 0 -1.905) (layer Dessus.SilkS) + (fp_text reference U22 (at 0 -1.905) (layer F.SilkS) (effects (font (size 1.524 1.016) (thickness 0.254))) ) - (fp_text value XC4003-VQ100 (at 0 2.54) (layer Dessus.SilkS) + (fp_text value XC4003-VQ100 (at 0 2.54) (layer F.SilkS) (effects (font (size 1.524 1.016) (thickness 0.254))) ) - (fp_circle (center 6.096 -6.477) (end 6.096 -6.985) (layer Dessus.SilkS) (width 0.2032)) - (fp_line (start 6.985 -6.35) (end 6.35 -6.985) (layer Dessus.SilkS) (width 0.2032)) - (fp_line (start -6.985 -6.731) (end -6.731 -6.985) (layer Dessus.SilkS) (width 0.2032)) - (fp_line (start -6.985 6.731) (end -6.731 6.985) (layer Dessus.SilkS) (width 0.2032)) - (fp_line (start 6.731 6.985) (end 6.985 6.731) (layer Dessus.SilkS) (width 0.2032)) - (fp_line (start 6.35 -6.985) (end -6.731 -6.985) (layer Dessus.SilkS) (width 0.2032)) - (fp_line (start -6.985 -6.731) (end -6.985 6.731) (layer Dessus.SilkS) (width 0.2032)) - (fp_line (start -6.731 6.985) (end 6.731 6.985) (layer Dessus.SilkS) (width 0.2032)) - (fp_line (start 6.985 6.731) (end 6.985 -6.35) (layer Dessus.SilkS) (width 0.2032)) - (pad 100 smd rect (at 7.747 -5.9944) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 76 smd rect (at 7.747 5.9944) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 77 smd rect (at 7.747 5.4864) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 78 smd rect (at 7.747 5.0038) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 27 /ESVIDEO-RVB/TVG5) - ) - (pad 79 smd rect (at 7.747 4.4958) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 182 /graphic/CDACLK) - ) - (pad 80 smd rect (at 7.747 3.9878) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 282 /muxdata/TVG6) - ) - (pad 81 smd rect (at 7.747 3.5052) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 283 /muxdata/TVG7) - ) - (pad 82 smd rect (at 7.747 2.9972) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 28 /ESVIDEO-RVB/TVR0) - ) - (pad 83 smd rect (at 7.747 2.4892) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 29 /ESVIDEO-RVB/TVR1) - ) - (pad 84 smd rect (at 7.747 2.0066) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 30 /ESVIDEO-RVB/TVR2) - ) - (pad 85 smd rect (at 7.747 1.4986) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 295 /pal-ntsc.sch/TVR3) - ) - (pad 86 smd rect (at 7.747 0.9906) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 296 /pal-ntsc.sch/TVR4) - ) - (pad 87 smd rect (at 7.747 0.4826) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 31 /ESVIDEO-RVB/TVR5) - ) - (pad 88 smd rect (at 7.747 0) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 89 smd rect (at 7.747 -0.508) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 90 smd rect (at 7.747 -1.016) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 32 /ESVIDEO-RVB/TVR6) - ) - (pad 91 smd rect (at 7.747 -1.4986) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 33 /ESVIDEO-RVB/TVR7) - ) - (pad 92 smd rect (at 7.747 -2.0066) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 279 /muxdata/TVB0) - ) - (pad 93 smd rect (at 7.747 -2.5146) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 280 /muxdata/TVB1) - ) - (pad 94 smd rect (at 7.747 -2.9972) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 20 /ESVIDEO-RVB/TVB2) - ) - (pad 95 smd rect (at 7.747 -3.5052) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 21 /ESVIDEO-RVB/TVB3) - ) - (pad 96 smd rect (at 7.747 -4.0132) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 281 /muxdata/TVB4) - ) - (pad 97 smd rect (at 7.747 -4.4958) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 292 /pal-ntsc.sch/TVB5) - ) - (pad 98 smd rect (at 7.747 -5.0038) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 293 /pal-ntsc.sch/TVB6) - ) - (pad 99 smd rect (at 7.747 -5.5118) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 294 /pal-ntsc.sch/TVB7) - ) - (pad 75 smd rect (at 5.9944 7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 51 smd rect (at -5.9944 7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 52 smd rect (at -5.4864 7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - (net 241 /graphic/X_PROG-) - ) - (pad 53 smd rect (at -5.0038 7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - (net 66 /RAMS/TVRAM22) - ) - (pad 54 smd rect (at -4.4958 7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - (net 67 /RAMS/TVRAM23) - ) - (pad 55 smd rect (at -3.9878 7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - (net 68 /RAMS/TVRAM24) - ) - (pad 56 smd rect (at -3.5052 7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - (net 69 /RAMS/TVRAM25) - ) - (pad 57 smd rect (at -2.9972 7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - (net 70 /RAMS/TVRAM26) - ) - (pad 58 smd rect (at -2.4892 7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - (net 71 /RAMS/TVRAM27) - ) - (pad 59 smd rect (at -2.0066 7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - (net 72 /RAMS/TVRAM28) - ) - (pad 60 smd rect (at -1.4986 7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - (net 73 /RAMS/TVRAM29) - ) - (pad 61 smd rect (at -0.9906 7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - (net 75 /RAMS/TVRAM30) - ) - (pad 62 smd rect (at -0.4826 7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - (net 76 /RAMS/TVRAM31) - ) - (pad 63 smd rect (at 0 7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 64 smd rect (at 0.508 7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 65 smd rect (at 1.016 7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 66 smd rect (at 1.4986 7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 67 smd rect (at 2.0066 7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - (net 22 /ESVIDEO-RVB/TVG0) - ) - (pad 68 smd rect (at 2.5146 7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - (net 23 /ESVIDEO-RVB/TVG1) - ) - (pad 69 smd rect (at 2.9972 7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - (net 24 /ESVIDEO-RVB/TVG2) - ) - (pad 70 smd rect (at 3.5052 7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - (net 25 /ESVIDEO-RVB/TVG3) - ) - (pad 71 smd rect (at 4.0132 7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - (net 26 /ESVIDEO-RVB/TVG4) - ) - (pad 72 smd rect (at 4.4958 7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - (net 284 /muxdata/X_DIN) - ) - (pad 73 smd rect (at 5.0038 7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 74 smd rect (at 5.5118 7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - (net 239 /graphic/X_CLK) - ) - (pad 1 smd rect (at 5.9944 -7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 2 smd rect (at 5.4864 -7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - (net 179 /graphic/CADCLK) - ) - (pad 3 smd rect (at 5.0038 -7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 4 smd rect (at 4.4958 -7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 5 smd rect (at 3.9878 -7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 6 smd rect (at 3.5052 -7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 7 smd rect (at 2.9972 -7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - (net 183 /graphic/CLAMP) - ) - (pad 8 smd rect (at 2.4892 -7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - (net 176 /graphic/BLANK-) - ) - (pad 9 smd rect (at 2.0066 -7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - (net 245 /modul/CSYNC-OUT) - ) - (pad 10 smd rect (at 1.4986 -7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 11 smd rect (at 0.9906 -7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 12 smd rect (at 0.4826 -7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 13 smd rect (at 0 -7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - (net 251 /muxdata/ACQ_ON) - ) - (pad 14 smd rect (at -0.508 -7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 15 smd rect (at -1.016 -7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 16 smd rect (at -1.4986 -7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 17 smd rect (at -2.0066 -7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - (net 51 /RAMS/TVRAM0) - ) - (pad 18 smd rect (at -2.5146 -7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - (net 74 /RAMS/TVRAM3) - ) - (pad 19 smd rect (at -2.9972 -7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - (net 52 /RAMS/TVRAM1) - ) - (pad 20 smd rect (at -3.5052 -7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - (net 63 /RAMS/TVRAM2) - ) - (pad 21 smd rect (at -4.0132 -7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - (net 250 /muxdata/ACCES_RAM-) - ) - (pad 22 smd rect (at -4.4958 -7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 23 smd rect (at -5.0038 -7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 24 smd rect (at -5.5118 -7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 25 smd rect (at -5.9944 -7.747) (size 0.254 1.016) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 26 smd rect (at -7.747 -5.9944) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 27 smd rect (at -7.747 -5.4864) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 28 smd rect (at -7.747 -5.0038) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 77 /RAMS/TVRAM4) - ) - (pad 29 smd rect (at -7.747 -4.4958) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 78 /RAMS/TVRAM5) - ) - (pad 30 smd rect (at -7.747 -3.9878) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 31 smd rect (at -7.747 -3.5052) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 79 /RAMS/TVRAM6) - ) - (pad 32 smd rect (at -7.747 -2.9972) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 80 /RAMS/TVRAM7) - ) - (pad 33 smd rect (at -7.747 -2.4892) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 81 /RAMS/TVRAM8) - ) - (pad 34 smd rect (at -7.747 -2.0066) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 82 /RAMS/TVRAM9) - ) - (pad 35 smd rect (at -7.747 -1.4986) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 53 /RAMS/TVRAM10) - ) - (pad 36 smd rect (at -7.747 -0.9906) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 54 /RAMS/TVRAM11) - ) - (pad 37 smd rect (at -7.747 -0.4826) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 38 smd rect (at -7.747 0) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 39 smd rect (at -7.747 0.508) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 55 /RAMS/TVRAM12) - ) - (pad 40 smd rect (at -7.747 1.016) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 56 /RAMS/TVRAM13) - ) - (pad 41 smd rect (at -7.747 1.4986) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 57 /RAMS/TVRAM14) - ) - (pad 42 smd rect (at -7.747 2.0066) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 58 /RAMS/TVRAM15) - ) - (pad 43 smd rect (at -7.747 2.5146) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 59 /RAMS/TVRAM16) - ) - (pad 44 smd rect (at -7.747 2.9972) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 60 /RAMS/TVRAM17) - ) - (pad 45 smd rect (at -7.747 3.5052) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 61 /RAMS/TVRAM18) - ) - (pad 46 smd rect (at -7.747 4.0132) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 62 /RAMS/TVRAM19) - ) - (pad 47 smd rect (at -7.747 4.4958) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 64 /RAMS/TVRAM20) - ) - (pad 48 smd rect (at -7.747 5.0038) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 65 /RAMS/TVRAM21) - ) - (pad 49 smd rect (at -7.747 5.5118) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 50 smd rect (at -7.747 5.9944) (size 1.016 0.254) - (layers Composant Dessus.Pate Dessus.Masque) - (net 285 /muxdata/X_DONE) - ) + (fp_circle (center 6.096 -6.477) (end 6.096 -6.985) (layer F.SilkS) (width 0.2032)) + (fp_line (start 6.985 -6.35) (end 6.35 -6.985) (layer F.SilkS) (width 0.2032)) + (fp_line (start -6.985 -6.731) (end -6.731 -6.985) (layer F.SilkS) (width 0.2032)) + (fp_line (start -6.985 6.731) (end -6.731 6.985) (layer F.SilkS) (width 0.2032)) + (fp_line (start 6.731 6.985) (end 6.985 6.731) (layer F.SilkS) (width 0.2032)) + (fp_line (start 6.35 -6.985) (end -6.731 -6.985) (layer F.SilkS) (width 0.2032)) + (fp_line (start -6.985 -6.731) (end -6.985 6.731) (layer F.SilkS) (width 0.2032)) + (fp_line (start -6.731 6.985) (end 6.731 6.985) (layer F.SilkS) (width 0.2032)) + (fp_line (start 6.985 6.731) (end 6.985 -6.35) (layer F.SilkS) (width 0.2032)) + (pad 100 smd rect (at 7.747 -5.9944) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 76 smd rect (at 7.747 5.9944) (size 1.016 0.254) (layers Composant F.Paste F.Mask)) + (pad 77 smd rect (at 7.747 5.4864) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 78 smd rect (at 7.747 5.0038) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 27 /ESVIDEO-RVB/TVG5)) + (pad 79 smd rect (at 7.747 4.4958) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 182 /graphic/CDACLK)) + (pad 80 smd rect (at 7.747 3.9878) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 282 /muxdata/TVG6)) + (pad 81 smd rect (at 7.747 3.5052) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 283 /muxdata/TVG7)) + (pad 82 smd rect (at 7.747 2.9972) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 28 /ESVIDEO-RVB/TVR0)) + (pad 83 smd rect (at 7.747 2.4892) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 29 /ESVIDEO-RVB/TVR1)) + (pad 84 smd rect (at 7.747 2.0066) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 30 /ESVIDEO-RVB/TVR2)) + (pad 85 smd rect (at 7.747 1.4986) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 295 /pal-ntsc.sch/TVR3)) + (pad 86 smd rect (at 7.747 0.9906) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 296 /pal-ntsc.sch/TVR4)) + (pad 87 smd rect (at 7.747 0.4826) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 31 /ESVIDEO-RVB/TVR5)) + (pad 88 smd rect (at 7.747 0) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 89 smd rect (at 7.747 -0.508) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 90 smd rect (at 7.747 -1.016) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 32 /ESVIDEO-RVB/TVR6)) + (pad 91 smd rect (at 7.747 -1.4986) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 33 /ESVIDEO-RVB/TVR7)) + (pad 92 smd rect (at 7.747 -2.0066) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 279 /muxdata/TVB0)) + (pad 93 smd rect (at 7.747 -2.5146) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 280 /muxdata/TVB1)) + (pad 94 smd rect (at 7.747 -2.9972) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 20 /ESVIDEO-RVB/TVB2)) + (pad 95 smd rect (at 7.747 -3.5052) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 21 /ESVIDEO-RVB/TVB3)) + (pad 96 smd rect (at 7.747 -4.0132) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 281 /muxdata/TVB4)) + (pad 97 smd rect (at 7.747 -4.4958) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 292 /pal-ntsc.sch/TVB5)) + (pad 98 smd rect (at 7.747 -5.0038) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 293 /pal-ntsc.sch/TVB6)) + (pad 99 smd rect (at 7.747 -5.5118) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 294 /pal-ntsc.sch/TVB7)) + (pad 75 smd rect (at 5.9944 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 51 smd rect (at -5.9944 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 52 smd rect (at -5.4864 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 241 /graphic/X_PROG-)) + (pad 53 smd rect (at -5.0038 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 66 /RAMS/TVRAM22)) + (pad 54 smd rect (at -4.4958 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 67 /RAMS/TVRAM23)) + (pad 55 smd rect (at -3.9878 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 68 /RAMS/TVRAM24)) + (pad 56 smd rect (at -3.5052 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 69 /RAMS/TVRAM25)) + (pad 57 smd rect (at -2.9972 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 70 /RAMS/TVRAM26)) + (pad 58 smd rect (at -2.4892 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 71 /RAMS/TVRAM27)) + (pad 59 smd rect (at -2.0066 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 72 /RAMS/TVRAM28)) + (pad 60 smd rect (at -1.4986 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 73 /RAMS/TVRAM29)) + (pad 61 smd rect (at -0.9906 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 75 /RAMS/TVRAM30)) + (pad 62 smd rect (at -0.4826 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 76 /RAMS/TVRAM31)) + (pad 63 smd rect (at 0 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 64 smd rect (at 0.508 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 65 smd rect (at 1.016 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask)) + (pad 66 smd rect (at 1.4986 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask)) + (pad 67 smd rect (at 2.0066 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 22 /ESVIDEO-RVB/TVG0)) + (pad 68 smd rect (at 2.5146 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 23 /ESVIDEO-RVB/TVG1)) + (pad 69 smd rect (at 2.9972 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 24 /ESVIDEO-RVB/TVG2)) + (pad 70 smd rect (at 3.5052 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 25 /ESVIDEO-RVB/TVG3)) + (pad 71 smd rect (at 4.0132 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 26 /ESVIDEO-RVB/TVG4)) + (pad 72 smd rect (at 4.4958 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 284 /muxdata/X_DIN)) + (pad 73 smd rect (at 5.0038 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask)) + (pad 74 smd rect (at 5.5118 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 239 /graphic/X_CLK)) + (pad 1 smd rect (at 5.9944 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 2 smd rect (at 5.4864 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 179 /graphic/CADCLK)) + (pad 3 smd rect (at 5.0038 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask)) + (pad 4 smd rect (at 4.4958 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask)) + (pad 5 smd rect (at 3.9878 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask)) + (pad 6 smd rect (at 3.5052 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask)) + (pad 7 smd rect (at 2.9972 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 183 /graphic/CLAMP)) + (pad 8 smd rect (at 2.4892 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 176 /graphic/BLANK-)) + (pad 9 smd rect (at 2.0066 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 245 /modul/CSYNC-OUT)) + (pad 10 smd rect (at 1.4986 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask)) + (pad 11 smd rect (at 0.9906 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 12 smd rect (at 0.4826 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 13 smd rect (at 0 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 251 /muxdata/ACQ_ON)) + (pad 14 smd rect (at -0.508 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask)) + (pad 15 smd rect (at -1.016 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask)) + (pad 16 smd rect (at -1.4986 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask)) + (pad 17 smd rect (at -2.0066 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 51 /RAMS/TVRAM0)) + (pad 18 smd rect (at -2.5146 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 74 /RAMS/TVRAM3)) + (pad 19 smd rect (at -2.9972 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 52 /RAMS/TVRAM1)) + (pad 20 smd rect (at -3.5052 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 63 /RAMS/TVRAM2)) + (pad 21 smd rect (at -4.0132 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 250 /muxdata/ACCES_RAM-)) + (pad 22 smd rect (at -4.4958 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 23 smd rect (at -5.0038 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 24 smd rect (at -5.5118 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 25 smd rect (at -5.9944 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 26 smd rect (at -7.747 -5.9944) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 27 smd rect (at -7.747 -5.4864) (size 1.016 0.254) (layers Composant F.Paste F.Mask)) + (pad 28 smd rect (at -7.747 -5.0038) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 77 /RAMS/TVRAM4)) + (pad 29 smd rect (at -7.747 -4.4958) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 78 /RAMS/TVRAM5)) + (pad 30 smd rect (at -7.747 -3.9878) (size 1.016 0.254) (layers Composant F.Paste F.Mask)) + (pad 31 smd rect (at -7.747 -3.5052) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 79 /RAMS/TVRAM6)) + (pad 32 smd rect (at -7.747 -2.9972) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 80 /RAMS/TVRAM7)) + (pad 33 smd rect (at -7.747 -2.4892) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 81 /RAMS/TVRAM8)) + (pad 34 smd rect (at -7.747 -2.0066) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 82 /RAMS/TVRAM9)) + (pad 35 smd rect (at -7.747 -1.4986) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 53 /RAMS/TVRAM10)) + (pad 36 smd rect (at -7.747 -0.9906) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 54 /RAMS/TVRAM11)) + (pad 37 smd rect (at -7.747 -0.4826) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 38 smd rect (at -7.747 0) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 39 smd rect (at -7.747 0.508) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 55 /RAMS/TVRAM12)) + (pad 40 smd rect (at -7.747 1.016) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 56 /RAMS/TVRAM13)) + (pad 41 smd rect (at -7.747 1.4986) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 57 /RAMS/TVRAM14)) + (pad 42 smd rect (at -7.747 2.0066) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 58 /RAMS/TVRAM15)) + (pad 43 smd rect (at -7.747 2.5146) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 59 /RAMS/TVRAM16)) + (pad 44 smd rect (at -7.747 2.9972) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 60 /RAMS/TVRAM17)) + (pad 45 smd rect (at -7.747 3.5052) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 61 /RAMS/TVRAM18)) + (pad 46 smd rect (at -7.747 4.0132) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 62 /RAMS/TVRAM19)) + (pad 47 smd rect (at -7.747 4.4958) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 64 /RAMS/TVRAM20)) + (pad 48 smd rect (at -7.747 5.0038) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 65 /RAMS/TVRAM21)) + (pad 49 smd rect (at -7.747 5.5118) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 50 smd rect (at -7.747 5.9944) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 285 /muxdata/X_DONE)) (model smd/vqfp100.wrl (at (xyz 0 0 0)) (scale (xyz 0.394 0.394 0.4)) @@ -1774,28 +1395,22 @@ (tags "CMS SOT") (path /4BF0367F/22761039) (attr smd) - (fp_text reference Q1 (at 0 -2.413) (layer Dessous.SilkS) + (fp_text reference Q1 (at 0 -2.413) (layer B.SilkS) (effects (font (size 0.762 0.762) (thickness 0.1905)) (justify mirror)) ) - (fp_text value BC848 (at 0 0) (layer Dessous.SilkS) hide + (fp_text value BC848 (at 0 0) (layer B.SilkS) hide (effects (font (size 0.762 0.762) (thickness 0.1905)) (justify mirror)) ) - (fp_line (start -1.524 0.381) (end 1.524 0.381) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 1.524 0.381) (end 1.524 -0.381) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.381) (end -1.524 -0.381) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.381) (end -1.524 0.381) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.889 1.016) (size 0.9144 0.9144) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 305 N-000083) - ) - (pad 2 smd rect (at 0.889 1.016) (size 0.9144 0.9144) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 313 N-000091) - ) - (pad 3 smd rect (at 0 -1.016) (size 0.9144 0.9144) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 3 +5F) - ) + (fp_line (start -1.524 0.381) (end 1.524 0.381) (layer B.SilkS) (width 0.127)) + (fp_line (start 1.524 0.381) (end 1.524 -0.381) (layer B.SilkS) (width 0.127)) + (fp_line (start 1.524 -0.381) (end -1.524 -0.381) (layer B.SilkS) (width 0.127)) + (fp_line (start -1.524 -0.381) (end -1.524 0.381) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -0.889 1.016) (size 0.9144 0.9144) (layers Cuivre B.Paste B.Mask) + (net 305 N-000083)) + (pad 2 smd rect (at 0.889 1.016) (size 0.9144 0.9144) (layers Cuivre B.Paste B.Mask) + (net 313 N-000091)) + (pad 3 smd rect (at 0 -1.016) (size 0.9144 0.9144) (layers Cuivre B.Paste B.Mask) + (net 3 +5F)) (model smd/cms_sot23.wrl (at (xyz 0 0 0)) (scale (xyz 0.13 0.15 0.15)) @@ -1809,28 +1424,22 @@ (tags "CMS SOT") (path /4BF0367F/2276107F) (attr smd) - (fp_text reference Q3 (at 0 -2.413) (layer Dessous.SilkS) + (fp_text reference Q3 (at 0 -2.413) (layer B.SilkS) (effects (font (size 0.762 0.762) (thickness 0.1905)) (justify mirror)) ) - (fp_text value BC848 (at 0 0) (layer Dessous.SilkS) hide + (fp_text value BC848 (at 0 0) (layer B.SilkS) hide (effects (font (size 0.762 0.762) (thickness 0.1905)) (justify mirror)) ) - (fp_line (start -1.524 0.381) (end 1.524 0.381) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 1.524 0.381) (end 1.524 -0.381) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.381) (end -1.524 -0.381) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.381) (end -1.524 0.381) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.889 1.016) (size 0.9144 0.9144) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 309 N-000087) - ) - (pad 2 smd rect (at 0.889 1.016) (size 0.9144 0.9144) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 304 N-000082) - ) - (pad 3 smd rect (at 0 -1.016) (size 0.9144 0.9144) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 3 +5F) - ) + (fp_line (start -1.524 0.381) (end 1.524 0.381) (layer B.SilkS) (width 0.127)) + (fp_line (start 1.524 0.381) (end 1.524 -0.381) (layer B.SilkS) (width 0.127)) + (fp_line (start 1.524 -0.381) (end -1.524 -0.381) (layer B.SilkS) (width 0.127)) + (fp_line (start -1.524 -0.381) (end -1.524 0.381) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -0.889 1.016) (size 0.9144 0.9144) (layers Cuivre B.Paste B.Mask) + (net 309 N-000087)) + (pad 2 smd rect (at 0.889 1.016) (size 0.9144 0.9144) (layers Cuivre B.Paste B.Mask) + (net 304 N-000082)) + (pad 3 smd rect (at 0 -1.016) (size 0.9144 0.9144) (layers Cuivre B.Paste B.Mask) + (net 3 +5F)) (model smd/cms_sot23.wrl (at (xyz 0 0 0)) (scale (xyz 0.13 0.15 0.15)) @@ -1844,28 +1453,22 @@ (tags "CMS SOT") (path /4BF0367F/22761066) (attr smd) - (fp_text reference Q2 (at 0 -2.413) (layer Dessous.SilkS) + (fp_text reference Q2 (at 0 -2.413) (layer B.SilkS) (effects (font (size 0.762 0.762) (thickness 0.1905)) (justify mirror)) ) - (fp_text value BC848 (at 0 0) (layer Dessous.SilkS) hide + (fp_text value BC848 (at 0 0) (layer B.SilkS) hide (effects (font (size 0.762 0.762) (thickness 0.1905)) (justify mirror)) ) - (fp_line (start -1.524 0.381) (end 1.524 0.381) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 1.524 0.381) (end 1.524 -0.381) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.381) (end -1.524 -0.381) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.381) (end -1.524 0.381) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.889 1.016) (size 0.9144 0.9144) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 312 N-000090) - ) - (pad 2 smd rect (at 0.889 1.016) (size 0.9144 0.9144) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 303 N-000081) - ) - (pad 3 smd rect (at 0 -1.016) (size 0.9144 0.9144) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 3 +5F) - ) + (fp_line (start -1.524 0.381) (end 1.524 0.381) (layer B.SilkS) (width 0.127)) + (fp_line (start 1.524 0.381) (end 1.524 -0.381) (layer B.SilkS) (width 0.127)) + (fp_line (start 1.524 -0.381) (end -1.524 -0.381) (layer B.SilkS) (width 0.127)) + (fp_line (start -1.524 -0.381) (end -1.524 0.381) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -0.889 1.016) (size 0.9144 0.9144) (layers Cuivre B.Paste B.Mask) + (net 312 N-000090)) + (pad 2 smd rect (at 0.889 1.016) (size 0.9144 0.9144) (layers Cuivre B.Paste B.Mask) + (net 303 N-000081)) + (pad 3 smd rect (at 0 -1.016) (size 0.9144 0.9144) (layers Cuivre B.Paste B.Mask) + (net 3 +5F)) (model smd/cms_sot23.wrl (at (xyz 0 0 0)) (scale (xyz 0.13 0.15 0.15)) @@ -1879,51 +1482,35 @@ (tags "CMS SOJ") (path /4BF03683/2295D392) (attr smd) - (fp_text reference U7 (at -3.68046 -0.12446 90) (layer Dessus.SilkS) + (fp_text reference U7 (at -3.68046 -0.12446 90) (layer F.SilkS) (effects (font (size 1.143 1.143) (thickness 0.1524))) ) - (fp_text value AV9173 (at -0.12446 0.127) (layer Dessus.SilkS) + (fp_text value AV9173 (at -0.12446 0.127) (layer F.SilkS) (effects (font (size 0.889 0.889) (thickness 0.1524))) ) - (fp_line (start -2.667 1.778) (end -2.667 1.905) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -2.667 1.905) (end 2.667 1.905) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.667 -1.905) (end -2.667 -1.905) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -2.667 -1.905) (end -2.667 1.778) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -2.667 -0.508) (end -2.159 -0.508) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -2.159 -0.508) (end -2.159 0.508) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -2.159 0.508) (end -2.667 0.508) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.667 -1.905) (end 2.667 1.905) (layer Dessus.SilkS) (width 0.127)) - (pad 8 smd rect (at -1.905 -2.667) (size 0.508 1.143) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 1 smd rect (at -1.905 2.667) (size 0.508 1.143) - (layers Composant Dessus.Pate Dessus.Masque) - (net 189 /graphic/HDOUT) - ) - (pad 7 smd rect (at -0.635 -2.667) (size 0.508 1.143) - (layers Composant Dessus.Pate Dessus.Masque) - (net 234 /graphic/VOSC) - ) - (pad 6 smd rect (at 0.635 -2.667) (size 0.508 1.143) - (layers Composant Dessus.Pate Dessus.Masque) - (net 167 /graphic/14MHZOUT) - ) - (pad 5 smd rect (at 1.905 -2.667) (size 0.508 1.143) - (layers Composant Dessus.Pate Dessus.Masque) - (net 234 /graphic/VOSC) - ) - (pad 2 smd rect (at -0.635 2.667) (size 0.508 1.143) - (layers Composant Dessus.Pate Dessus.Masque) - (net 190 /graphic/HDREFOUT) - ) - (pad 3 smd rect (at 0.635 2.667) (size 0.508 1.143) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 4 smd rect (at 1.905 2.667) (size 0.508 1.143) - (layers Composant Dessus.Pate Dessus.Masque) - (net 234 /graphic/VOSC) - ) + (fp_line (start -2.667 1.778) (end -2.667 1.905) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.667 1.905) (end 2.667 1.905) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.667 -1.905) (end -2.667 -1.905) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.667 -1.905) (end -2.667 1.778) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.667 -0.508) (end -2.159 -0.508) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.159 -0.508) (end -2.159 0.508) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.159 0.508) (end -2.667 0.508) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.667 -1.905) (end 2.667 1.905) (layer F.SilkS) (width 0.127)) + (pad 8 smd rect (at -1.905 -2.667) (size 0.508 1.143) (layers Composant F.Paste F.Mask)) + (pad 1 smd rect (at -1.905 2.667) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 189 /graphic/HDOUT)) + (pad 7 smd rect (at -0.635 -2.667) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 234 /graphic/VOSC)) + (pad 6 smd rect (at 0.635 -2.667) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 167 /graphic/14MHZOUT)) + (pad 5 smd rect (at 1.905 -2.667) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 234 /graphic/VOSC)) + (pad 2 smd rect (at -0.635 2.667) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 190 /graphic/HDREFOUT)) + (pad 3 smd rect (at 0.635 2.667) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 4 smd rect (at 1.905 2.667) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 234 /graphic/VOSC)) (model smd/cms_so8.wrl (at (xyz 0 0 0)) (scale (xyz 0.5 0.32 0.5)) @@ -1936,27 +1523,23 @@ (tags "CMS SM") (path /4BF03689/84DFBB99) (attr smd) - (fp_text reference L5 (at -0.74676 0 270) (layer Dessus.SilkS) + (fp_text reference L5 (at -0.74676 0 270) (layer F.SilkS) (effects (font (size 1.016 0.762) (thickness 0.127))) ) - (fp_text value 22uH (at 0.762 0 270) (layer Dessus.SilkS) + (fp_text value 22uH (at 0.762 0 270) (layer F.SilkS) (effects (font (size 1.016 0.762) (thickness 0.127))) ) - (fp_circle (center -3.302 2.159) (end -3.175 2.032) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 1.524 2.032) (end 3.175 2.032) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 3.175 2.032) (end 3.175 -2.032) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 3.175 -2.032) (end 1.524 -2.032) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -1.524 -2.032) (end -3.175 -2.032) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -3.175 -2.032) (end -3.175 2.032) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -3.175 2.032) (end -1.524 2.032) (layer Dessus.SilkS) (width 0.127)) - (pad 1 smd rect (at -2.286 0 180) (size 1.397 3.81) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 2 smd rect (at 2.286 0 180) (size 1.397 3.81) - (layers Composant Dessus.Pate Dessus.Masque) - (net 34 /ESVIDEO-RVB/VAA) - ) + (fp_circle (center -3.302 2.159) (end -3.175 2.032) (layer F.SilkS) (width 0.127)) + (fp_line (start 1.524 2.032) (end 3.175 2.032) (layer F.SilkS) (width 0.127)) + (fp_line (start 3.175 2.032) (end 3.175 -2.032) (layer F.SilkS) (width 0.127)) + (fp_line (start 3.175 -2.032) (end 1.524 -2.032) (layer F.SilkS) (width 0.127)) + (fp_line (start -1.524 -2.032) (end -3.175 -2.032) (layer F.SilkS) (width 0.127)) + (fp_line (start -3.175 -2.032) (end -3.175 2.032) (layer F.SilkS) (width 0.127)) + (fp_line (start -3.175 2.032) (end -1.524 2.032) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -2.286 0 180) (size 1.397 3.81) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 2 smd rect (at 2.286 0 180) (size 1.397 3.81) (layers Composant F.Paste F.Mask) + (net 34 /ESVIDEO-RVB/VAA)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.21 0.3 0.2)) @@ -1969,27 +1552,23 @@ (tags "CMS SM") (path /4BF0367F/22760FF3) (attr smd) - (fp_text reference L1 (at -0.74676 0 90) (layer Dessus.SilkS) + (fp_text reference L1 (at -0.74676 0 90) (layer F.SilkS) (effects (font (size 1.016 0.762) (thickness 0.127))) ) - (fp_text value 2,2uH (at 0.762 0 90) (layer Dessus.SilkS) + (fp_text value 2,2uH (at 0.762 0 90) (layer F.SilkS) (effects (font (size 1.016 0.762) (thickness 0.127))) ) - (fp_circle (center -3.302 2.159) (end -3.175 2.032) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 1.524 2.032) (end 3.175 2.032) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 3.175 2.032) (end 3.175 -2.032) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 3.175 -2.032) (end 1.524 -2.032) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -1.524 -2.032) (end -3.175 -2.032) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -3.175 -2.032) (end -3.175 2.032) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -3.175 2.032) (end -1.524 2.032) (layer Dessus.SilkS) (width 0.127)) - (pad 1 smd rect (at -2.286 0) (size 1.397 3.81) - (layers Composant Dessus.Pate Dessus.Masque) - (net 318 N-000096) - ) - (pad 2 smd rect (at 2.286 0) (size 1.397 3.81) - (layers Composant Dessus.Pate Dessus.Masque) - (net 319 N-000097) - ) + (fp_circle (center -3.302 2.159) (end -3.175 2.032) (layer F.SilkS) (width 0.127)) + (fp_line (start 1.524 2.032) (end 3.175 2.032) (layer F.SilkS) (width 0.127)) + (fp_line (start 3.175 2.032) (end 3.175 -2.032) (layer F.SilkS) (width 0.127)) + (fp_line (start 3.175 -2.032) (end 1.524 -2.032) (layer F.SilkS) (width 0.127)) + (fp_line (start -1.524 -2.032) (end -3.175 -2.032) (layer F.SilkS) (width 0.127)) + (fp_line (start -3.175 -2.032) (end -3.175 2.032) (layer F.SilkS) (width 0.127)) + (fp_line (start -3.175 2.032) (end -1.524 2.032) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -2.286 0) (size 1.397 3.81) (layers Composant F.Paste F.Mask) + (net 318 N-000096)) + (pad 2 smd rect (at 2.286 0) (size 1.397 3.81) (layers Composant F.Paste F.Mask) + (net 319 N-000097)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.21 0.3 0.2)) @@ -2002,27 +1581,23 @@ (tags "CMS SM") (path /4BF03681/811D9080) (attr smd) - (fp_text reference L4 (at -0.74676 0 90) (layer Dessus.SilkS) + (fp_text reference L4 (at -0.74676 0 90) (layer F.SilkS) (effects (font (size 1.016 0.762) (thickness 0.127))) ) - (fp_text value 22uF (at 0.762 0 90) (layer Dessus.SilkS) + (fp_text value 22uF (at 0.762 0 90) (layer F.SilkS) (effects (font (size 1.016 0.762) (thickness 0.127))) ) - (fp_circle (center -3.302 2.159) (end -3.175 2.032) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 1.524 2.032) (end 3.175 2.032) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 3.175 2.032) (end 3.175 -2.032) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 3.175 -2.032) (end 1.524 -2.032) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -1.524 -2.032) (end -3.175 -2.032) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -3.175 -2.032) (end -3.175 2.032) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -3.175 2.032) (end -1.524 2.032) (layer Dessus.SilkS) (width 0.127)) - (pad 1 smd rect (at -2.286 0) (size 1.397 3.81) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 2 smd rect (at 2.286 0) (size 1.397 3.81) - (layers Composant Dessus.Pate Dessus.Masque) - (net 297 /pal-ntsc.sch/VAF) - ) + (fp_circle (center -3.302 2.159) (end -3.175 2.032) (layer F.SilkS) (width 0.127)) + (fp_line (start 1.524 2.032) (end 3.175 2.032) (layer F.SilkS) (width 0.127)) + (fp_line (start 3.175 2.032) (end 3.175 -2.032) (layer F.SilkS) (width 0.127)) + (fp_line (start 3.175 -2.032) (end 1.524 -2.032) (layer F.SilkS) (width 0.127)) + (fp_line (start -1.524 -2.032) (end -3.175 -2.032) (layer F.SilkS) (width 0.127)) + (fp_line (start -3.175 -2.032) (end -3.175 2.032) (layer F.SilkS) (width 0.127)) + (fp_line (start -3.175 2.032) (end -1.524 2.032) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -2.286 0) (size 1.397 3.81) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 2 smd rect (at 2.286 0) (size 1.397 3.81) (layers Composant F.Paste F.Mask) + (net 297 /pal-ntsc.sch/VAF)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.21 0.3 0.2)) @@ -2035,27 +1610,23 @@ (tags "CMS SM") (path /4BF0367F/22761052) (attr smd) - (fp_text reference L3 (at -0.74676 0 90) (layer Dessus.SilkS) + (fp_text reference L3 (at -0.74676 0 90) (layer F.SilkS) (effects (font (size 1.016 0.762) (thickness 0.127))) ) - (fp_text value 22uH (at 0.762 0 90) (layer Dessus.SilkS) + (fp_text value 22uH (at 0.762 0 90) (layer F.SilkS) (effects (font (size 1.016 0.762) (thickness 0.127))) ) - (fp_circle (center -3.302 2.159) (end -3.175 2.032) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 1.524 2.032) (end 3.175 2.032) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 3.175 2.032) (end 3.175 -2.032) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 3.175 -2.032) (end 1.524 -2.032) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -1.524 -2.032) (end -3.175 -2.032) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -3.175 -2.032) (end -3.175 2.032) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -3.175 2.032) (end -1.524 2.032) (layer Dessus.SilkS) (width 0.127)) - (pad 1 smd rect (at -2.286 0) (size 1.397 3.81) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 2 smd rect (at 2.286 0) (size 1.397 3.81) - (layers Composant Dessus.Pate Dessus.Masque) - (net 3 +5F) - ) + (fp_circle (center -3.302 2.159) (end -3.175 2.032) (layer F.SilkS) (width 0.127)) + (fp_line (start 1.524 2.032) (end 3.175 2.032) (layer F.SilkS) (width 0.127)) + (fp_line (start 3.175 2.032) (end 3.175 -2.032) (layer F.SilkS) (width 0.127)) + (fp_line (start 3.175 -2.032) (end 1.524 -2.032) (layer F.SilkS) (width 0.127)) + (fp_line (start -1.524 -2.032) (end -3.175 -2.032) (layer F.SilkS) (width 0.127)) + (fp_line (start -3.175 -2.032) (end -3.175 2.032) (layer F.SilkS) (width 0.127)) + (fp_line (start -3.175 2.032) (end -1.524 2.032) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -2.286 0) (size 1.397 3.81) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 2 smd rect (at 2.286 0) (size 1.397 3.81) (layers Composant F.Paste F.Mask) + (net 3 +5F)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.21 0.3 0.2)) @@ -2068,27 +1639,23 @@ (tags "CMS SM") (path /4BF0367F/22760F71) (attr smd) - (fp_text reference L2 (at -0.74676 0 270) (layer Dessus.SilkS) + (fp_text reference L2 (at -0.74676 0 270) (layer F.SilkS) (effects (font (size 1.016 0.762) (thickness 0.127))) ) - (fp_text value 22uH (at 0.762 0 270) (layer Dessus.SilkS) + (fp_text value 22uH (at 0.762 0 270) (layer F.SilkS) (effects (font (size 1.016 0.762) (thickness 0.127))) ) - (fp_circle (center -3.302 2.159) (end -3.175 2.032) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 1.524 2.032) (end 3.175 2.032) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 3.175 2.032) (end 3.175 -2.032) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 3.175 -2.032) (end 1.524 -2.032) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -1.524 -2.032) (end -3.175 -2.032) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -3.175 -2.032) (end -3.175 2.032) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -3.175 2.032) (end -1.524 2.032) (layer Dessus.SilkS) (width 0.127)) - (pad 1 smd rect (at -2.286 0 180) (size 1.397 3.81) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 2 smd rect (at 2.286 0 180) (size 1.397 3.81) - (layers Composant Dessus.Pate Dessus.Masque) - (net 302 N-000079) - ) + (fp_circle (center -3.302 2.159) (end -3.175 2.032) (layer F.SilkS) (width 0.127)) + (fp_line (start 1.524 2.032) (end 3.175 2.032) (layer F.SilkS) (width 0.127)) + (fp_line (start 3.175 2.032) (end 3.175 -2.032) (layer F.SilkS) (width 0.127)) + (fp_line (start 3.175 -2.032) (end 1.524 -2.032) (layer F.SilkS) (width 0.127)) + (fp_line (start -1.524 -2.032) (end -3.175 -2.032) (layer F.SilkS) (width 0.127)) + (fp_line (start -3.175 -2.032) (end -3.175 2.032) (layer F.SilkS) (width 0.127)) + (fp_line (start -3.175 2.032) (end -1.524 2.032) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -2.286 0 180) (size 1.397 3.81) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 2 smd rect (at 2.286 0 180) (size 1.397 3.81) (layers Composant F.Paste F.Mask) + (net 302 N-000079)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.21 0.3 0.2)) @@ -2101,27 +1668,23 @@ (tags "CMS SM") (path /4BF03683/228C4700) (attr smd) - (fp_text reference C63 (at 0 0 90) (layer Dessus.SilkS) + (fp_text reference C63 (at 0 0 90) (layer F.SilkS) (effects (font (size 0.635 0.635) (thickness 0.127))) ) - (fp_text value 47uF (at 0 0 90) (layer Dessus.SilkS) hide + (fp_text value 47uF (at 0 0 90) (layer F.SilkS) hide (effects (font (size 0.889 0.762) (thickness 0.1905))) ) - (fp_circle (center -2.921 1.651) (end -2.794 1.524) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 0.889 1.524) (end 2.794 1.524) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.794 1.524) (end 2.794 -1.524) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.794 -1.524) (end 0.889 -1.524) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -0.762 -1.524) (end -2.794 -1.524) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -2.794 -1.524) (end -2.794 1.524) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -2.794 1.524) (end -0.762 1.524) (layer Dessus.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.778 0) (size 1.778 2.794) - (layers Composant Dessus.Pate Dessus.Masque) - (net 234 /graphic/VOSC) - ) - (pad 2 smd rect (at 1.778 0) (size 1.778 2.794) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) + (fp_circle (center -2.921 1.651) (end -2.794 1.524) (layer F.SilkS) (width 0.127)) + (fp_line (start 0.889 1.524) (end 2.794 1.524) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.794 1.524) (end 2.794 -1.524) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.794 -1.524) (end 0.889 -1.524) (layer F.SilkS) (width 0.127)) + (fp_line (start -0.762 -1.524) (end -2.794 -1.524) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.794 -1.524) (end -2.794 1.524) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.794 1.524) (end -0.762 1.524) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.778 0) (size 1.778 2.794) (layers Composant F.Paste F.Mask) + (net 234 /graphic/VOSC)) + (pad 2 smd rect (at 1.778 0) (size 1.778 2.794) (layers Composant F.Paste F.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.2 0.2 0.2)) @@ -2134,27 +1697,23 @@ (tags "CMS SM") (path /4BF03689/A44C037F) (attr smd) - (fp_text reference C39 (at 0 0 90) (layer Dessus.SilkS) + (fp_text reference C39 (at 0 0 90) (layer F.SilkS) (effects (font (size 0.635 0.635) (thickness 0.127))) ) - (fp_text value 1uF (at 0 0 90) (layer Dessus.SilkS) hide + (fp_text value 1uF (at 0 0 90) (layer F.SilkS) hide (effects (font (size 0.889 0.762) (thickness 0.1905))) ) - (fp_circle (center -2.921 1.651) (end -2.794 1.524) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 0.889 1.524) (end 2.794 1.524) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.794 1.524) (end 2.794 -1.524) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.794 -1.524) (end 0.889 -1.524) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -0.762 -1.524) (end -2.794 -1.524) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -2.794 -1.524) (end -2.794 1.524) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -2.794 1.524) (end -0.762 1.524) (layer Dessus.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.778 0) (size 1.778 2.794) - (layers Composant Dessus.Pate Dessus.Masque) - (net 357 N-000343) - ) - (pad 2 smd rect (at 1.778 0) (size 1.778 2.794) - (layers Composant Dessus.Pate Dessus.Masque) - (net 364 N-000351) - ) + (fp_circle (center -2.921 1.651) (end -2.794 1.524) (layer F.SilkS) (width 0.127)) + (fp_line (start 0.889 1.524) (end 2.794 1.524) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.794 1.524) (end 2.794 -1.524) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.794 -1.524) (end 0.889 -1.524) (layer F.SilkS) (width 0.127)) + (fp_line (start -0.762 -1.524) (end -2.794 -1.524) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.794 -1.524) (end -2.794 1.524) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.794 1.524) (end -0.762 1.524) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.778 0) (size 1.778 2.794) (layers Composant F.Paste F.Mask) + (net 357 N-000343)) + (pad 2 smd rect (at 1.778 0) (size 1.778 2.794) (layers Composant F.Paste F.Mask) + (net 364 N-000351)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.2 0.2 0.2)) @@ -2167,27 +1726,23 @@ (tags "CMS SM") (path /4BF0367F/22761057) (attr smd) - (fp_text reference C55 (at 0 0 540) (layer Dessous.SilkS) + (fp_text reference C55 (at 0 0 540) (layer B.SilkS) (effects (font (size 0.635 0.635) (thickness 0.127)) (justify mirror)) ) - (fp_text value 4,7uF (at 0 0 540) (layer Dessous.SilkS) hide + (fp_text value 4,7uF (at 0 0 540) (layer B.SilkS) hide (effects (font (size 0.889 0.762) (thickness 0.1905)) (justify mirror)) ) - (fp_circle (center -2.921 -1.651) (end -2.794 -1.524) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 -1.524) (end 2.794 -1.524) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.794 -1.524) (end 2.794 1.524) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.794 1.524) (end 0.889 1.524) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.762 1.524) (end -2.794 1.524) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.794 1.524) (end -2.794 -1.524) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.794 -1.524) (end -0.762 -1.524) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.778 0 270) (size 1.778 2.794) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 3 +5F) - ) - (pad 2 smd rect (at 1.778 0 270) (size 1.778 2.794) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_circle (center -2.921 -1.651) (end -2.794 -1.524) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 -1.524) (end 2.794 -1.524) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.794 -1.524) (end 2.794 1.524) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.794 1.524) (end 0.889 1.524) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.762 1.524) (end -2.794 1.524) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.794 1.524) (end -2.794 -1.524) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.794 -1.524) (end -0.762 -1.524) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.778 0 270) (size 1.778 2.794) (layers Cuivre B.Paste B.Mask) + (net 3 +5F)) + (pad 2 smd rect (at 1.778 0 270) (size 1.778 2.794) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.2 0.2 0.2)) @@ -2200,27 +1755,23 @@ (tags "CMS SM") (path /4BF03681/811D9071) (attr smd) - (fp_text reference C62 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference C62 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.635 0.635) (thickness 0.127)) (justify mirror)) ) - (fp_text value 47uF (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 47uF (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.889 0.762) (thickness 0.1905)) (justify mirror)) ) - (fp_circle (center -2.921 -1.651) (end -2.794 -1.524) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 -1.524) (end 2.794 -1.524) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.794 -1.524) (end 2.794 1.524) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.794 1.524) (end 0.889 1.524) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.762 1.524) (end -2.794 1.524) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.794 1.524) (end -2.794 -1.524) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.794 -1.524) (end -0.762 -1.524) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.778 0) (size 1.778 2.794) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 297 /pal-ntsc.sch/VAF) - ) - (pad 2 smd rect (at 1.778 0) (size 1.778 2.794) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_circle (center -2.921 -1.651) (end -2.794 -1.524) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 -1.524) (end 2.794 -1.524) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.794 -1.524) (end 2.794 1.524) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.794 1.524) (end 0.889 1.524) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.762 1.524) (end -2.794 1.524) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.794 1.524) (end -2.794 -1.524) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.794 -1.524) (end -0.762 -1.524) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.778 0) (size 1.778 2.794) (layers Cuivre B.Paste B.Mask) + (net 297 /pal-ntsc.sch/VAF)) + (pad 2 smd rect (at 1.778 0) (size 1.778 2.794) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.2 0.2 0.2)) @@ -2233,27 +1784,23 @@ (tags "CMS SM") (path /4BF03689/28ED6A43) (attr smd) - (fp_text reference C51 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference C51 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.635 0.635) (thickness 0.127)) (justify mirror)) ) - (fp_text value 22uF (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 22uF (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.889 0.762) (thickness 0.1905)) (justify mirror)) ) - (fp_circle (center -2.921 -1.651) (end -2.794 -1.524) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 -1.524) (end 2.794 -1.524) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.794 -1.524) (end 2.794 1.524) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.794 1.524) (end 0.889 1.524) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.762 1.524) (end -2.794 1.524) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.794 1.524) (end -2.794 -1.524) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.794 -1.524) (end -0.762 -1.524) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.778 0) (size 1.778 2.794) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 34 /ESVIDEO-RVB/VAA) - ) - (pad 2 smd rect (at 1.778 0) (size 1.778 2.794) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_circle (center -2.921 -1.651) (end -2.794 -1.524) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 -1.524) (end 2.794 -1.524) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.794 -1.524) (end 2.794 1.524) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.794 1.524) (end 0.889 1.524) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.762 1.524) (end -2.794 1.524) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.794 1.524) (end -2.794 -1.524) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.794 -1.524) (end -0.762 -1.524) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.778 0) (size 1.778 2.794) (layers Cuivre B.Paste B.Mask) + (net 34 /ESVIDEO-RVB/VAA)) + (pad 2 smd rect (at 1.778 0) (size 1.778 2.794) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.2 0.2 0.2)) @@ -2266,27 +1813,23 @@ (tags "CMS SM") (path /4BF0367F/22760FC1) (attr smd) - (fp_text reference C64 (at 0 0 540) (layer Dessous.SilkS) + (fp_text reference C64 (at 0 0 540) (layer B.SilkS) (effects (font (size 0.635 0.635) (thickness 0.127)) (justify mirror)) ) - (fp_text value 6,8uF (at 0 0 540) (layer Dessous.SilkS) hide + (fp_text value 6,8uF (at 0 0 540) (layer B.SilkS) hide (effects (font (size 0.889 0.762) (thickness 0.1905)) (justify mirror)) ) - (fp_circle (center -2.921 -1.651) (end -2.794 -1.524) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 -1.524) (end 2.794 -1.524) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.794 -1.524) (end 2.794 1.524) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.794 1.524) (end 0.889 1.524) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.762 1.524) (end -2.794 1.524) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.794 1.524) (end -2.794 -1.524) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.794 -1.524) (end -0.762 -1.524) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.778 0 270) (size 1.778 2.794) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 311 N-000089) - ) - (pad 2 smd rect (at 1.778 0 270) (size 1.778 2.794) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_circle (center -2.921 -1.651) (end -2.794 -1.524) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 -1.524) (end 2.794 -1.524) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.794 -1.524) (end 2.794 1.524) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.794 1.524) (end 0.889 1.524) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.762 1.524) (end -2.794 1.524) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.794 1.524) (end -2.794 -1.524) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.794 -1.524) (end -0.762 -1.524) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.778 0 270) (size 1.778 2.794) (layers Cuivre B.Paste B.Mask) + (net 311 N-000089)) + (pad 2 smd rect (at 1.778 0 270) (size 1.778 2.794) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.2 0.2 0.2)) @@ -2299,27 +1842,23 @@ (tags "CMS SM") (path /4BF03683/B9ED7AB5) (attr smd) - (fp_text reference C57 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference C57 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.635 0.635) (thickness 0.127)) (justify mirror)) ) - (fp_text value 4,7uF (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 4,7uF (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.889 0.762) (thickness 0.1905)) (justify mirror)) ) - (fp_circle (center -2.921 -1.651) (end -2.794 -1.524) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 -1.524) (end 2.794 -1.524) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.794 -1.524) (end 2.794 1.524) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.794 1.524) (end 0.889 1.524) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.762 1.524) (end -2.794 1.524) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.794 1.524) (end -2.794 -1.524) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.794 -1.524) (end -0.762 -1.524) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.778 0) (size 1.778 2.794) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 4 +5V) - ) - (pad 2 smd rect (at 1.778 0) (size 1.778 2.794) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_circle (center -2.921 -1.651) (end -2.794 -1.524) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 -1.524) (end 2.794 -1.524) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.794 -1.524) (end 2.794 1.524) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.794 1.524) (end 0.889 1.524) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.762 1.524) (end -2.794 1.524) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.794 1.524) (end -2.794 -1.524) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.794 -1.524) (end -0.762 -1.524) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.778 0) (size 1.778 2.794) (layers Cuivre B.Paste B.Mask) + (net 4 +5V)) + (pad 2 smd rect (at 1.778 0) (size 1.778 2.794) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.2 0.2 0.2)) @@ -2332,27 +1871,23 @@ (tags "CMS SM") (path /4BF03689/A44C0384) (attr smd) - (fp_text reference C40 (at 0 0 90) (layer Dessus.SilkS) + (fp_text reference C40 (at 0 0 90) (layer F.SilkS) (effects (font (size 0.635 0.635) (thickness 0.127))) ) - (fp_text value 1uF (at 0 0 90) (layer Dessus.SilkS) hide + (fp_text value 1uF (at 0 0 90) (layer F.SilkS) hide (effects (font (size 0.889 0.762) (thickness 0.1905))) ) - (fp_circle (center -2.921 1.651) (end -2.794 1.524) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 0.889 1.524) (end 2.794 1.524) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.794 1.524) (end 2.794 -1.524) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.794 -1.524) (end 0.889 -1.524) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -0.762 -1.524) (end -2.794 -1.524) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -2.794 -1.524) (end -2.794 1.524) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -2.794 1.524) (end -0.762 1.524) (layer Dessus.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.778 0) (size 1.778 2.794) - (layers Composant Dessus.Pate Dessus.Masque) - (net 362 N-000349) - ) - (pad 2 smd rect (at 1.778 0) (size 1.778 2.794) - (layers Composant Dessus.Pate Dessus.Masque) - (net 363 N-000350) - ) + (fp_circle (center -2.921 1.651) (end -2.794 1.524) (layer F.SilkS) (width 0.127)) + (fp_line (start 0.889 1.524) (end 2.794 1.524) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.794 1.524) (end 2.794 -1.524) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.794 -1.524) (end 0.889 -1.524) (layer F.SilkS) (width 0.127)) + (fp_line (start -0.762 -1.524) (end -2.794 -1.524) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.794 -1.524) (end -2.794 1.524) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.794 1.524) (end -0.762 1.524) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.778 0) (size 1.778 2.794) (layers Composant F.Paste F.Mask) + (net 362 N-000349)) + (pad 2 smd rect (at 1.778 0) (size 1.778 2.794) (layers Composant F.Paste F.Mask) + (net 363 N-000350)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.2 0.2 0.2)) @@ -2365,27 +1900,23 @@ (tags "CMS SM") (path /4BF03689/A44C0389) (attr smd) - (fp_text reference C41 (at 0 0 270) (layer Dessus.SilkS) + (fp_text reference C41 (at 0 0 270) (layer F.SilkS) (effects (font (size 0.635 0.635) (thickness 0.127))) ) - (fp_text value 1uF (at 0 0 270) (layer Dessus.SilkS) hide + (fp_text value 1uF (at 0 0 270) (layer F.SilkS) hide (effects (font (size 0.889 0.762) (thickness 0.1905))) ) - (fp_circle (center -2.921 1.651) (end -2.794 1.524) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 0.889 1.524) (end 2.794 1.524) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.794 1.524) (end 2.794 -1.524) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.794 -1.524) (end 0.889 -1.524) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -0.762 -1.524) (end -2.794 -1.524) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -2.794 -1.524) (end -2.794 1.524) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -2.794 1.524) (end -0.762 1.524) (layer Dessus.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.778 0 180) (size 1.778 2.794) - (layers Composant Dessus.Pate Dessus.Masque) - (net 360 N-000347) - ) - (pad 2 smd rect (at 1.778 0 180) (size 1.778 2.794) - (layers Composant Dessus.Pate Dessus.Masque) - (net 361 N-000348) - ) + (fp_circle (center -2.921 1.651) (end -2.794 1.524) (layer F.SilkS) (width 0.127)) + (fp_line (start 0.889 1.524) (end 2.794 1.524) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.794 1.524) (end 2.794 -1.524) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.794 -1.524) (end 0.889 -1.524) (layer F.SilkS) (width 0.127)) + (fp_line (start -0.762 -1.524) (end -2.794 -1.524) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.794 -1.524) (end -2.794 1.524) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.794 1.524) (end -0.762 1.524) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.778 0 180) (size 1.778 2.794) (layers Composant F.Paste F.Mask) + (net 360 N-000347)) + (pad 2 smd rect (at 1.778 0 180) (size 1.778 2.794) (layers Composant F.Paste F.Mask) + (net 361 N-000348)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.2 0.2 0.2)) @@ -2398,27 +1929,23 @@ (tags "CMS SM") (path /4BF03689/84DFBAEF) (attr smd) - (fp_text reference C42 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference C42 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.635 0.635) (thickness 0.127)) (justify mirror)) ) - (fp_text value 2,2uF (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 2,2uF (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.889 0.762) (thickness 0.1905)) (justify mirror)) ) - (fp_circle (center -2.921 -1.651) (end -2.794 -1.524) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 -1.524) (end 2.794 -1.524) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.794 -1.524) (end 2.794 1.524) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.794 1.524) (end 0.889 1.524) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.762 1.524) (end -2.794 1.524) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.794 1.524) (end -2.794 -1.524) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.794 -1.524) (end -0.762 -1.524) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.778 0) (size 1.778 2.794) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 34 /ESVIDEO-RVB/VAA) - ) - (pad 2 smd rect (at 1.778 0) (size 1.778 2.794) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 372 N-000369) - ) + (fp_circle (center -2.921 -1.651) (end -2.794 -1.524) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 -1.524) (end 2.794 -1.524) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.794 -1.524) (end 2.794 1.524) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.794 1.524) (end 0.889 1.524) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.762 1.524) (end -2.794 1.524) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.794 1.524) (end -2.794 -1.524) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.794 -1.524) (end -0.762 -1.524) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.778 0) (size 1.778 2.794) (layers Cuivre B.Paste B.Mask) + (net 34 /ESVIDEO-RVB/VAA)) + (pad 2 smd rect (at 1.778 0) (size 1.778 2.794) (layers Cuivre B.Paste B.Mask) + (net 372 N-000369)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.2 0.2 0.2)) @@ -2431,299 +1958,149 @@ (descr "Support 72 pins pour barettes SIMM 32 bits") (tags SIMM) (path /4BF03685/4BF036CF) - (fp_text reference U14 (at -18.542 -3.302) (layer Dessus.SilkS) + (fp_text reference U14 (at -18.542 -3.302) (layer F.SilkS) (effects (font (size 2.032 2.032) (thickness 0.3048))) ) - (fp_text value SIM4X32 (at 11.176 -3.302) (layer Dessus.SilkS) + (fp_text value SIM4X32 (at 11.176 -3.302) (layer F.SilkS) (effects (font (size 2.032 2.032) (thickness 0.3048))) ) - (fp_line (start 57.785 -4.445) (end -57.785 -4.445) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -57.785 -4.445) (end -57.785 3.175) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -57.785 3.175) (end 57.785 3.175) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 57.785 3.175) (end 57.785 -4.445) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 46.99 3.175) (end 47.625 1.905) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 47.625 1.905) (end 48.26 3.175) (layer Dessus.SilkS) (width 0.3048)) - (pad "" thru_hole circle (at 0 0) (size 3.048 3.048) (drill 2.54) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole circle (at -55.88 0) (size 3.048 3.048) (drill 2.54) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole circle (at 55.88 0) (size 3.048 3.048) (drill 2.54) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 1 thru_hole rect (at 47.625 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 301 GND) - ) - (pad 2 thru_hole circle (at 46.355 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 51 /RAMS/TVRAM0) - ) - (pad 3 thru_hole circle (at 45.085 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 59 /RAMS/TVRAM16) - ) - (pad 4 thru_hole circle (at 43.815 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 52 /RAMS/TVRAM1) - ) - (pad 5 thru_hole circle (at 42.545 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 60 /RAMS/TVRAM17) - ) - (pad 6 thru_hole circle (at 41.275 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 63 /RAMS/TVRAM2) - ) - (pad 7 thru_hole circle (at 40.005 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 61 /RAMS/TVRAM18) - ) - (pad 8 thru_hole circle (at 38.735 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 74 /RAMS/TVRAM3) - ) - (pad 9 thru_hole circle (at 37.465 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 62 /RAMS/TVRAM19) - ) - (pad 10 thru_hole circle (at 36.195 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 4 +5V) - ) - (pad 11 thru_hole circle (at 34.925 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 12 thru_hole circle (at 33.655 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 38 /RAMS/MXA0) - ) - (pad 13 thru_hole circle (at 32.385 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 39 /RAMS/MXA1) - ) - (pad 14 thru_hole circle (at 31.115 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 41 /RAMS/MXA2) - ) - (pad 15 thru_hole circle (at 29.845 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 42 /RAMS/MXA3) - ) - (pad 16 thru_hole circle (at 28.575 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 43 /RAMS/MXA4) - ) - (pad 17 thru_hole circle (at 27.305 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 44 /RAMS/MXA5) - ) - (pad 18 thru_hole circle (at 26.035 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 45 /RAMS/MXA6) - ) - (pad 19 thru_hole circle (at 24.765 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 40 /RAMS/MXA10) - ) - (pad 20 thru_hole circle (at 23.495 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 77 /RAMS/TVRAM4) - ) - (pad 21 thru_hole circle (at 22.225 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 64 /RAMS/TVRAM20) - ) - (pad 22 thru_hole circle (at 20.955 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 78 /RAMS/TVRAM5) - ) - (pad 23 thru_hole circle (at 19.685 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 65 /RAMS/TVRAM21) - ) - (pad 24 thru_hole circle (at 18.415 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 79 /RAMS/TVRAM6) - ) - (pad 25 thru_hole circle (at 17.145 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 66 /RAMS/TVRAM22) - ) - (pad 26 thru_hole circle (at 15.875 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 80 /RAMS/TVRAM7) - ) - (pad 27 thru_hole circle (at 14.605 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 67 /RAMS/TVRAM23) - ) - (pad 28 thru_hole circle (at 13.335 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 46 /RAMS/MXA7) - ) - (pad 29 thru_hole circle (at 12.065 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 30 thru_hole circle (at 10.795 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 4 +5V) - ) - (pad 31 thru_hole circle (at 9.525 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 47 /RAMS/MXA8) - ) - (pad 32 thru_hole circle (at 8.255 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 48 /RAMS/MXA9) - ) - (pad 33 thru_hole circle (at 6.985 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 34 thru_hole circle (at 5.715 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 225 /graphic/RAS6-) - ) - (pad 35 thru_hole circle (at 4.445 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 36 thru_hole circle (at 3.175 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 37 thru_hole circle (at -3.175 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 38 thru_hole circle (at -4.445 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 39 thru_hole circle (at -5.715 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 301 GND) - ) - (pad 40 thru_hole circle (at -6.985 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 35 /RAMS/CAS0-) - ) - (pad 41 thru_hole circle (at -8.255 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 180 /graphic/CAS1-) - ) - (pad 42 thru_hole circle (at -9.525 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 36 /RAMS/CAS2-) - ) - (pad 43 thru_hole circle (at -10.795 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 37 /RAMS/CAS3-) - ) - (pad 44 thru_hole circle (at -12.065 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 225 /graphic/RAS6-) - ) - (pad 45 thru_hole circle (at -13.335 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 46 thru_hole circle (at -14.605 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 47 thru_hole circle (at -15.875 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 83 /RAMS/WRAM-) - ) - (pad 48 thru_hole circle (at -17.145 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 49 thru_hole circle (at -18.415 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 81 /RAMS/TVRAM8) - ) - (pad 50 thru_hole circle (at -19.685 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 68 /RAMS/TVRAM24) - ) - (pad 51 thru_hole circle (at -20.955 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 82 /RAMS/TVRAM9) - ) - (pad 52 thru_hole circle (at -22.225 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 69 /RAMS/TVRAM25) - ) - (pad 53 thru_hole circle (at -23.495 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 53 /RAMS/TVRAM10) - ) - (pad 54 thru_hole circle (at -24.765 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 70 /RAMS/TVRAM26) - ) - (pad 55 thru_hole circle (at -26.035 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 54 /RAMS/TVRAM11) - ) - (pad 56 thru_hole circle (at -27.305 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 71 /RAMS/TVRAM27) - ) - (pad 57 thru_hole circle (at -28.575 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 55 /RAMS/TVRAM12) - ) - (pad 58 thru_hole circle (at -29.845 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 72 /RAMS/TVRAM28) - ) - (pad 59 thru_hole circle (at -31.115 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 4 +5V) - ) - (pad 60 thru_hole circle (at -32.385 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 73 /RAMS/TVRAM29) - ) - (pad 61 thru_hole circle (at -33.655 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 56 /RAMS/TVRAM13) - ) - (pad 62 thru_hole circle (at -34.925 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 75 /RAMS/TVRAM30) - ) - (pad 63 thru_hole circle (at -36.195 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 57 /RAMS/TVRAM14) - ) - (pad 64 thru_hole circle (at -37.465 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 76 /RAMS/TVRAM31) - ) - (pad 65 thru_hole circle (at -38.735 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 58 /RAMS/TVRAM15) - ) - (pad 66 thru_hole circle (at -40.005 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 67 thru_hole circle (at -41.275 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 68 thru_hole circle (at -42.545 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 69 thru_hole circle (at -43.815 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 70 thru_hole circle (at -45.085 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 71 thru_hole circle (at -46.355 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 72 thru_hole circle (at -47.625 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 301 GND) - ) + (fp_line (start 57.785 -4.445) (end -57.785 -4.445) (layer F.SilkS) (width 0.3048)) + (fp_line (start -57.785 -4.445) (end -57.785 3.175) (layer F.SilkS) (width 0.3048)) + (fp_line (start -57.785 3.175) (end 57.785 3.175) (layer F.SilkS) (width 0.3048)) + (fp_line (start 57.785 3.175) (end 57.785 -4.445) (layer F.SilkS) (width 0.3048)) + (fp_line (start 46.99 3.175) (end 47.625 1.905) (layer F.SilkS) (width 0.3048)) + (fp_line (start 47.625 1.905) (end 48.26 3.175) (layer F.SilkS) (width 0.3048)) + (pad "" thru_hole circle (at 0 0) (size 3.048 3.048) (drill 2.54) (layers *.Cu *.Mask F.SilkS)) + (pad "" thru_hole circle (at -55.88 0) (size 3.048 3.048) (drill 2.54) (layers *.Cu *.Mask F.SilkS)) + (pad "" thru_hole circle (at 55.88 0) (size 3.048 3.048) (drill 2.54) (layers *.Cu *.Mask F.SilkS)) + (pad 1 thru_hole rect (at 47.625 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 301 GND)) + (pad 2 thru_hole circle (at 46.355 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 51 /RAMS/TVRAM0)) + (pad 3 thru_hole circle (at 45.085 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 59 /RAMS/TVRAM16)) + (pad 4 thru_hole circle (at 43.815 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 52 /RAMS/TVRAM1)) + (pad 5 thru_hole circle (at 42.545 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 60 /RAMS/TVRAM17)) + (pad 6 thru_hole circle (at 41.275 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 63 /RAMS/TVRAM2)) + (pad 7 thru_hole circle (at 40.005 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 61 /RAMS/TVRAM18)) + (pad 8 thru_hole circle (at 38.735 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 74 /RAMS/TVRAM3)) + (pad 9 thru_hole circle (at 37.465 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 62 /RAMS/TVRAM19)) + (pad 10 thru_hole circle (at 36.195 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 4 +5V)) + (pad 11 thru_hole circle (at 34.925 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 12 thru_hole circle (at 33.655 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 38 /RAMS/MXA0)) + (pad 13 thru_hole circle (at 32.385 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 39 /RAMS/MXA1)) + (pad 14 thru_hole circle (at 31.115 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 41 /RAMS/MXA2)) + (pad 15 thru_hole circle (at 29.845 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 42 /RAMS/MXA3)) + (pad 16 thru_hole circle (at 28.575 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 43 /RAMS/MXA4)) + (pad 17 thru_hole circle (at 27.305 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 44 /RAMS/MXA5)) + (pad 18 thru_hole circle (at 26.035 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 45 /RAMS/MXA6)) + (pad 19 thru_hole circle (at 24.765 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 40 /RAMS/MXA10)) + (pad 20 thru_hole circle (at 23.495 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 77 /RAMS/TVRAM4)) + (pad 21 thru_hole circle (at 22.225 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 64 /RAMS/TVRAM20)) + (pad 22 thru_hole circle (at 20.955 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 78 /RAMS/TVRAM5)) + (pad 23 thru_hole circle (at 19.685 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 65 /RAMS/TVRAM21)) + (pad 24 thru_hole circle (at 18.415 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 79 /RAMS/TVRAM6)) + (pad 25 thru_hole circle (at 17.145 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 66 /RAMS/TVRAM22)) + (pad 26 thru_hole circle (at 15.875 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 80 /RAMS/TVRAM7)) + (pad 27 thru_hole circle (at 14.605 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 67 /RAMS/TVRAM23)) + (pad 28 thru_hole circle (at 13.335 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 46 /RAMS/MXA7)) + (pad 29 thru_hole circle (at 12.065 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 30 thru_hole circle (at 10.795 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 4 +5V)) + (pad 31 thru_hole circle (at 9.525 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 47 /RAMS/MXA8)) + (pad 32 thru_hole circle (at 8.255 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 48 /RAMS/MXA9)) + (pad 33 thru_hole circle (at 6.985 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 34 thru_hole circle (at 5.715 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 225 /graphic/RAS6-)) + (pad 35 thru_hole circle (at 4.445 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 36 thru_hole circle (at 3.175 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 37 thru_hole circle (at -3.175 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 38 thru_hole circle (at -4.445 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 39 thru_hole circle (at -5.715 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 301 GND)) + (pad 40 thru_hole circle (at -6.985 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 35 /RAMS/CAS0-)) + (pad 41 thru_hole circle (at -8.255 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 180 /graphic/CAS1-)) + (pad 42 thru_hole circle (at -9.525 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 36 /RAMS/CAS2-)) + (pad 43 thru_hole circle (at -10.795 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 37 /RAMS/CAS3-)) + (pad 44 thru_hole circle (at -12.065 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 225 /graphic/RAS6-)) + (pad 45 thru_hole circle (at -13.335 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 46 thru_hole circle (at -14.605 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 47 thru_hole circle (at -15.875 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 83 /RAMS/WRAM-)) + (pad 48 thru_hole circle (at -17.145 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 49 thru_hole circle (at -18.415 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 81 /RAMS/TVRAM8)) + (pad 50 thru_hole circle (at -19.685 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 68 /RAMS/TVRAM24)) + (pad 51 thru_hole circle (at -20.955 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 82 /RAMS/TVRAM9)) + (pad 52 thru_hole circle (at -22.225 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 69 /RAMS/TVRAM25)) + (pad 53 thru_hole circle (at -23.495 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 53 /RAMS/TVRAM10)) + (pad 54 thru_hole circle (at -24.765 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 70 /RAMS/TVRAM26)) + (pad 55 thru_hole circle (at -26.035 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 54 /RAMS/TVRAM11)) + (pad 56 thru_hole circle (at -27.305 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 71 /RAMS/TVRAM27)) + (pad 57 thru_hole circle (at -28.575 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 55 /RAMS/TVRAM12)) + (pad 58 thru_hole circle (at -29.845 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 72 /RAMS/TVRAM28)) + (pad 59 thru_hole circle (at -31.115 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 4 +5V)) + (pad 60 thru_hole circle (at -32.385 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 73 /RAMS/TVRAM29)) + (pad 61 thru_hole circle (at -33.655 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 56 /RAMS/TVRAM13)) + (pad 62 thru_hole circle (at -34.925 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 75 /RAMS/TVRAM30)) + (pad 63 thru_hole circle (at -36.195 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 57 /RAMS/TVRAM14)) + (pad 64 thru_hole circle (at -37.465 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 76 /RAMS/TVRAM31)) + (pad 65 thru_hole circle (at -38.735 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 58 /RAMS/TVRAM15)) + (pad 66 thru_hole circle (at -40.005 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 67 thru_hole circle (at -41.275 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 68 thru_hole circle (at -42.545 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 69 thru_hole circle (at -43.815 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 70 thru_hole circle (at -45.085 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 71 thru_hole circle (at -46.355 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 72 thru_hole circle (at -47.625 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 301 GND)) ) (module SIM72 (layer Composant) (tedit 200000) (tstamp 32FA1E5B) @@ -2731,299 +2108,149 @@ (descr "Support 72 pins pour barettes SIMM 32 bits") (tags SIMM) (path /4BF03685/4BF036D1) - (fp_text reference U15 (at -18.542 -3.302) (layer Dessus.SilkS) + (fp_text reference U15 (at -18.542 -3.302) (layer F.SilkS) (effects (font (size 2.032 2.032) (thickness 0.3048))) ) - (fp_text value SIM4X32 (at 11.176 -3.302) (layer Dessus.SilkS) + (fp_text value SIM4X32 (at 11.176 -3.302) (layer F.SilkS) (effects (font (size 2.032 2.032) (thickness 0.3048))) ) - (fp_line (start 57.785 -4.445) (end -57.785 -4.445) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -57.785 -4.445) (end -57.785 3.175) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -57.785 3.175) (end 57.785 3.175) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 57.785 3.175) (end 57.785 -4.445) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 46.99 3.175) (end 47.625 1.905) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 47.625 1.905) (end 48.26 3.175) (layer Dessus.SilkS) (width 0.3048)) - (pad "" thru_hole circle (at 0 0) (size 3.048 3.048) (drill 2.54) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole circle (at -55.88 0) (size 3.048 3.048) (drill 2.54) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole circle (at 55.88 0) (size 3.048 3.048) (drill 2.54) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 1 thru_hole rect (at 47.625 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 301 GND) - ) - (pad 2 thru_hole circle (at 46.355 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 51 /RAMS/TVRAM0) - ) - (pad 3 thru_hole circle (at 45.085 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 59 /RAMS/TVRAM16) - ) - (pad 4 thru_hole circle (at 43.815 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 52 /RAMS/TVRAM1) - ) - (pad 5 thru_hole circle (at 42.545 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 60 /RAMS/TVRAM17) - ) - (pad 6 thru_hole circle (at 41.275 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 63 /RAMS/TVRAM2) - ) - (pad 7 thru_hole circle (at 40.005 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 61 /RAMS/TVRAM18) - ) - (pad 8 thru_hole circle (at 38.735 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 74 /RAMS/TVRAM3) - ) - (pad 9 thru_hole circle (at 37.465 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 62 /RAMS/TVRAM19) - ) - (pad 10 thru_hole circle (at 36.195 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 4 +5V) - ) - (pad 11 thru_hole circle (at 34.925 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 12 thru_hole circle (at 33.655 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 38 /RAMS/MXA0) - ) - (pad 13 thru_hole circle (at 32.385 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 39 /RAMS/MXA1) - ) - (pad 14 thru_hole circle (at 31.115 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 41 /RAMS/MXA2) - ) - (pad 15 thru_hole circle (at 29.845 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 42 /RAMS/MXA3) - ) - (pad 16 thru_hole circle (at 28.575 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 43 /RAMS/MXA4) - ) - (pad 17 thru_hole circle (at 27.305 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 44 /RAMS/MXA5) - ) - (pad 18 thru_hole circle (at 26.035 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 45 /RAMS/MXA6) - ) - (pad 19 thru_hole circle (at 24.765 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 40 /RAMS/MXA10) - ) - (pad 20 thru_hole circle (at 23.495 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 77 /RAMS/TVRAM4) - ) - (pad 21 thru_hole circle (at 22.225 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 64 /RAMS/TVRAM20) - ) - (pad 22 thru_hole circle (at 20.955 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 78 /RAMS/TVRAM5) - ) - (pad 23 thru_hole circle (at 19.685 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 65 /RAMS/TVRAM21) - ) - (pad 24 thru_hole circle (at 18.415 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 79 /RAMS/TVRAM6) - ) - (pad 25 thru_hole circle (at 17.145 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 66 /RAMS/TVRAM22) - ) - (pad 26 thru_hole circle (at 15.875 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 80 /RAMS/TVRAM7) - ) - (pad 27 thru_hole circle (at 14.605 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 67 /RAMS/TVRAM23) - ) - (pad 28 thru_hole circle (at 13.335 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 46 /RAMS/MXA7) - ) - (pad 29 thru_hole circle (at 12.065 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 30 thru_hole circle (at 10.795 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 4 +5V) - ) - (pad 31 thru_hole circle (at 9.525 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 47 /RAMS/MXA8) - ) - (pad 32 thru_hole circle (at 8.255 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 48 /RAMS/MXA9) - ) - (pad 33 thru_hole circle (at 6.985 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 34 thru_hole circle (at 5.715 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 49 /RAMS/RAS3-) - ) - (pad 35 thru_hole circle (at 4.445 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 36 thru_hole circle (at 3.175 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 37 thru_hole circle (at -3.175 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 38 thru_hole circle (at -4.445 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 39 thru_hole circle (at -5.715 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 301 GND) - ) - (pad 40 thru_hole circle (at -6.985 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 35 /RAMS/CAS0-) - ) - (pad 41 thru_hole circle (at -8.255 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 180 /graphic/CAS1-) - ) - (pad 42 thru_hole circle (at -9.525 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 36 /RAMS/CAS2-) - ) - (pad 43 thru_hole circle (at -10.795 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 37 /RAMS/CAS3-) - ) - (pad 44 thru_hole circle (at -12.065 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 49 /RAMS/RAS3-) - ) - (pad 45 thru_hole circle (at -13.335 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 46 thru_hole circle (at -14.605 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 47 thru_hole circle (at -15.875 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 83 /RAMS/WRAM-) - ) - (pad 48 thru_hole circle (at -17.145 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 49 thru_hole circle (at -18.415 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 81 /RAMS/TVRAM8) - ) - (pad 50 thru_hole circle (at -19.685 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 68 /RAMS/TVRAM24) - ) - (pad 51 thru_hole circle (at -20.955 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 82 /RAMS/TVRAM9) - ) - (pad 52 thru_hole circle (at -22.225 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 69 /RAMS/TVRAM25) - ) - (pad 53 thru_hole circle (at -23.495 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 53 /RAMS/TVRAM10) - ) - (pad 54 thru_hole circle (at -24.765 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 70 /RAMS/TVRAM26) - ) - (pad 55 thru_hole circle (at -26.035 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 54 /RAMS/TVRAM11) - ) - (pad 56 thru_hole circle (at -27.305 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 71 /RAMS/TVRAM27) - ) - (pad 57 thru_hole circle (at -28.575 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 55 /RAMS/TVRAM12) - ) - (pad 58 thru_hole circle (at -29.845 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 72 /RAMS/TVRAM28) - ) - (pad 59 thru_hole circle (at -31.115 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 4 +5V) - ) - (pad 60 thru_hole circle (at -32.385 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 73 /RAMS/TVRAM29) - ) - (pad 61 thru_hole circle (at -33.655 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 56 /RAMS/TVRAM13) - ) - (pad 62 thru_hole circle (at -34.925 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 75 /RAMS/TVRAM30) - ) - (pad 63 thru_hole circle (at -36.195 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 57 /RAMS/TVRAM14) - ) - (pad 64 thru_hole circle (at -37.465 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 76 /RAMS/TVRAM31) - ) - (pad 65 thru_hole circle (at -38.735 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 58 /RAMS/TVRAM15) - ) - (pad 66 thru_hole circle (at -40.005 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 67 thru_hole circle (at -41.275 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 68 thru_hole circle (at -42.545 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 69 thru_hole circle (at -43.815 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 70 thru_hole circle (at -45.085 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 71 thru_hole circle (at -46.355 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 72 thru_hole circle (at -47.625 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 301 GND) - ) + (fp_line (start 57.785 -4.445) (end -57.785 -4.445) (layer F.SilkS) (width 0.3048)) + (fp_line (start -57.785 -4.445) (end -57.785 3.175) (layer F.SilkS) (width 0.3048)) + (fp_line (start -57.785 3.175) (end 57.785 3.175) (layer F.SilkS) (width 0.3048)) + (fp_line (start 57.785 3.175) (end 57.785 -4.445) (layer F.SilkS) (width 0.3048)) + (fp_line (start 46.99 3.175) (end 47.625 1.905) (layer F.SilkS) (width 0.3048)) + (fp_line (start 47.625 1.905) (end 48.26 3.175) (layer F.SilkS) (width 0.3048)) + (pad "" thru_hole circle (at 0 0) (size 3.048 3.048) (drill 2.54) (layers *.Cu *.Mask F.SilkS)) + (pad "" thru_hole circle (at -55.88 0) (size 3.048 3.048) (drill 2.54) (layers *.Cu *.Mask F.SilkS)) + (pad "" thru_hole circle (at 55.88 0) (size 3.048 3.048) (drill 2.54) (layers *.Cu *.Mask F.SilkS)) + (pad 1 thru_hole rect (at 47.625 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 301 GND)) + (pad 2 thru_hole circle (at 46.355 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 51 /RAMS/TVRAM0)) + (pad 3 thru_hole circle (at 45.085 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 59 /RAMS/TVRAM16)) + (pad 4 thru_hole circle (at 43.815 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 52 /RAMS/TVRAM1)) + (pad 5 thru_hole circle (at 42.545 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 60 /RAMS/TVRAM17)) + (pad 6 thru_hole circle (at 41.275 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 63 /RAMS/TVRAM2)) + (pad 7 thru_hole circle (at 40.005 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 61 /RAMS/TVRAM18)) + (pad 8 thru_hole circle (at 38.735 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 74 /RAMS/TVRAM3)) + (pad 9 thru_hole circle (at 37.465 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 62 /RAMS/TVRAM19)) + (pad 10 thru_hole circle (at 36.195 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 4 +5V)) + (pad 11 thru_hole circle (at 34.925 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 12 thru_hole circle (at 33.655 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 38 /RAMS/MXA0)) + (pad 13 thru_hole circle (at 32.385 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 39 /RAMS/MXA1)) + (pad 14 thru_hole circle (at 31.115 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 41 /RAMS/MXA2)) + (pad 15 thru_hole circle (at 29.845 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 42 /RAMS/MXA3)) + (pad 16 thru_hole circle (at 28.575 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 43 /RAMS/MXA4)) + (pad 17 thru_hole circle (at 27.305 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 44 /RAMS/MXA5)) + (pad 18 thru_hole circle (at 26.035 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 45 /RAMS/MXA6)) + (pad 19 thru_hole circle (at 24.765 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 40 /RAMS/MXA10)) + (pad 20 thru_hole circle (at 23.495 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 77 /RAMS/TVRAM4)) + (pad 21 thru_hole circle (at 22.225 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 64 /RAMS/TVRAM20)) + (pad 22 thru_hole circle (at 20.955 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 78 /RAMS/TVRAM5)) + (pad 23 thru_hole circle (at 19.685 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 65 /RAMS/TVRAM21)) + (pad 24 thru_hole circle (at 18.415 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 79 /RAMS/TVRAM6)) + (pad 25 thru_hole circle (at 17.145 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 66 /RAMS/TVRAM22)) + (pad 26 thru_hole circle (at 15.875 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 80 /RAMS/TVRAM7)) + (pad 27 thru_hole circle (at 14.605 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 67 /RAMS/TVRAM23)) + (pad 28 thru_hole circle (at 13.335 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 46 /RAMS/MXA7)) + (pad 29 thru_hole circle (at 12.065 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 30 thru_hole circle (at 10.795 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 4 +5V)) + (pad 31 thru_hole circle (at 9.525 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 47 /RAMS/MXA8)) + (pad 32 thru_hole circle (at 8.255 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 48 /RAMS/MXA9)) + (pad 33 thru_hole circle (at 6.985 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 34 thru_hole circle (at 5.715 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 49 /RAMS/RAS3-)) + (pad 35 thru_hole circle (at 4.445 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 36 thru_hole circle (at 3.175 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 37 thru_hole circle (at -3.175 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 38 thru_hole circle (at -4.445 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 39 thru_hole circle (at -5.715 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 301 GND)) + (pad 40 thru_hole circle (at -6.985 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 35 /RAMS/CAS0-)) + (pad 41 thru_hole circle (at -8.255 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 180 /graphic/CAS1-)) + (pad 42 thru_hole circle (at -9.525 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 36 /RAMS/CAS2-)) + (pad 43 thru_hole circle (at -10.795 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 37 /RAMS/CAS3-)) + (pad 44 thru_hole circle (at -12.065 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 49 /RAMS/RAS3-)) + (pad 45 thru_hole circle (at -13.335 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 46 thru_hole circle (at -14.605 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 47 thru_hole circle (at -15.875 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 83 /RAMS/WRAM-)) + (pad 48 thru_hole circle (at -17.145 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 49 thru_hole circle (at -18.415 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 81 /RAMS/TVRAM8)) + (pad 50 thru_hole circle (at -19.685 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 68 /RAMS/TVRAM24)) + (pad 51 thru_hole circle (at -20.955 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 82 /RAMS/TVRAM9)) + (pad 52 thru_hole circle (at -22.225 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 69 /RAMS/TVRAM25)) + (pad 53 thru_hole circle (at -23.495 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 53 /RAMS/TVRAM10)) + (pad 54 thru_hole circle (at -24.765 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 70 /RAMS/TVRAM26)) + (pad 55 thru_hole circle (at -26.035 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 54 /RAMS/TVRAM11)) + (pad 56 thru_hole circle (at -27.305 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 71 /RAMS/TVRAM27)) + (pad 57 thru_hole circle (at -28.575 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 55 /RAMS/TVRAM12)) + (pad 58 thru_hole circle (at -29.845 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 72 /RAMS/TVRAM28)) + (pad 59 thru_hole circle (at -31.115 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 4 +5V)) + (pad 60 thru_hole circle (at -32.385 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 73 /RAMS/TVRAM29)) + (pad 61 thru_hole circle (at -33.655 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 56 /RAMS/TVRAM13)) + (pad 62 thru_hole circle (at -34.925 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 75 /RAMS/TVRAM30)) + (pad 63 thru_hole circle (at -36.195 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 57 /RAMS/TVRAM14)) + (pad 64 thru_hole circle (at -37.465 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 76 /RAMS/TVRAM31)) + (pad 65 thru_hole circle (at -38.735 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 58 /RAMS/TVRAM15)) + (pad 66 thru_hole circle (at -40.005 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 67 thru_hole circle (at -41.275 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 68 thru_hole circle (at -42.545 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 69 thru_hole circle (at -43.815 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 70 thru_hole circle (at -45.085 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 71 thru_hole circle (at -46.355 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 72 thru_hole circle (at -47.625 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 301 GND)) ) (module SIM72 (layer Composant) (tedit 200000) (tstamp 32FA1E5B) @@ -3031,299 +2258,149 @@ (descr "Support 72 pins pour barettes SIMM 32 bits") (tags SIMM) (path /4BF03685/4BF036CE) - (fp_text reference U12 (at -18.542 -3.302) (layer Dessus.SilkS) + (fp_text reference U12 (at -18.542 -3.302) (layer F.SilkS) (effects (font (size 2.032 2.032) (thickness 0.3048))) ) - (fp_text value SIM4X32 (at 11.176 -3.302) (layer Dessus.SilkS) + (fp_text value SIM4X32 (at 11.176 -3.302) (layer F.SilkS) (effects (font (size 2.032 2.032) (thickness 0.3048))) ) - (fp_line (start 57.785 -4.445) (end -57.785 -4.445) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -57.785 -4.445) (end -57.785 3.175) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -57.785 3.175) (end 57.785 3.175) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 57.785 3.175) (end 57.785 -4.445) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 46.99 3.175) (end 47.625 1.905) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 47.625 1.905) (end 48.26 3.175) (layer Dessus.SilkS) (width 0.3048)) - (pad "" thru_hole circle (at 0 0) (size 3.048 3.048) (drill 2.54) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole circle (at -55.88 0) (size 3.048 3.048) (drill 2.54) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole circle (at 55.88 0) (size 3.048 3.048) (drill 2.54) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 1 thru_hole rect (at 47.625 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 301 GND) - ) - (pad 2 thru_hole circle (at 46.355 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 51 /RAMS/TVRAM0) - ) - (pad 3 thru_hole circle (at 45.085 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 59 /RAMS/TVRAM16) - ) - (pad 4 thru_hole circle (at 43.815 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 52 /RAMS/TVRAM1) - ) - (pad 5 thru_hole circle (at 42.545 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 60 /RAMS/TVRAM17) - ) - (pad 6 thru_hole circle (at 41.275 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 63 /RAMS/TVRAM2) - ) - (pad 7 thru_hole circle (at 40.005 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 61 /RAMS/TVRAM18) - ) - (pad 8 thru_hole circle (at 38.735 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 74 /RAMS/TVRAM3) - ) - (pad 9 thru_hole circle (at 37.465 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 62 /RAMS/TVRAM19) - ) - (pad 10 thru_hole circle (at 36.195 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 4 +5V) - ) - (pad 11 thru_hole circle (at 34.925 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 12 thru_hole circle (at 33.655 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 38 /RAMS/MXA0) - ) - (pad 13 thru_hole circle (at 32.385 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 39 /RAMS/MXA1) - ) - (pad 14 thru_hole circle (at 31.115 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 41 /RAMS/MXA2) - ) - (pad 15 thru_hole circle (at 29.845 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 42 /RAMS/MXA3) - ) - (pad 16 thru_hole circle (at 28.575 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 43 /RAMS/MXA4) - ) - (pad 17 thru_hole circle (at 27.305 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 44 /RAMS/MXA5) - ) - (pad 18 thru_hole circle (at 26.035 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 45 /RAMS/MXA6) - ) - (pad 19 thru_hole circle (at 24.765 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 40 /RAMS/MXA10) - ) - (pad 20 thru_hole circle (at 23.495 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 77 /RAMS/TVRAM4) - ) - (pad 21 thru_hole circle (at 22.225 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 64 /RAMS/TVRAM20) - ) - (pad 22 thru_hole circle (at 20.955 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 78 /RAMS/TVRAM5) - ) - (pad 23 thru_hole circle (at 19.685 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 65 /RAMS/TVRAM21) - ) - (pad 24 thru_hole circle (at 18.415 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 79 /RAMS/TVRAM6) - ) - (pad 25 thru_hole circle (at 17.145 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 66 /RAMS/TVRAM22) - ) - (pad 26 thru_hole circle (at 15.875 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 80 /RAMS/TVRAM7) - ) - (pad 27 thru_hole circle (at 14.605 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 67 /RAMS/TVRAM23) - ) - (pad 28 thru_hole circle (at 13.335 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 46 /RAMS/MXA7) - ) - (pad 29 thru_hole circle (at 12.065 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 30 thru_hole circle (at 10.795 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 4 +5V) - ) - (pad 31 thru_hole circle (at 9.525 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 47 /RAMS/MXA8) - ) - (pad 32 thru_hole circle (at 8.255 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 48 /RAMS/MXA9) - ) - (pad 33 thru_hole circle (at 6.985 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 34 thru_hole circle (at 5.715 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 50 /RAMS/RAS5-) - ) - (pad 35 thru_hole circle (at 4.445 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 36 thru_hole circle (at 3.175 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 37 thru_hole circle (at -3.175 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 38 thru_hole circle (at -4.445 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 39 thru_hole circle (at -5.715 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 301 GND) - ) - (pad 40 thru_hole circle (at -6.985 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 35 /RAMS/CAS0-) - ) - (pad 41 thru_hole circle (at -8.255 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 180 /graphic/CAS1-) - ) - (pad 42 thru_hole circle (at -9.525 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 36 /RAMS/CAS2-) - ) - (pad 43 thru_hole circle (at -10.795 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 37 /RAMS/CAS3-) - ) - (pad 44 thru_hole circle (at -12.065 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 50 /RAMS/RAS5-) - ) - (pad 45 thru_hole circle (at -13.335 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 46 thru_hole circle (at -14.605 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 47 thru_hole circle (at -15.875 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 83 /RAMS/WRAM-) - ) - (pad 48 thru_hole circle (at -17.145 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 49 thru_hole circle (at -18.415 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 81 /RAMS/TVRAM8) - ) - (pad 50 thru_hole circle (at -19.685 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 68 /RAMS/TVRAM24) - ) - (pad 51 thru_hole circle (at -20.955 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 82 /RAMS/TVRAM9) - ) - (pad 52 thru_hole circle (at -22.225 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 69 /RAMS/TVRAM25) - ) - (pad 53 thru_hole circle (at -23.495 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 53 /RAMS/TVRAM10) - ) - (pad 54 thru_hole circle (at -24.765 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 70 /RAMS/TVRAM26) - ) - (pad 55 thru_hole circle (at -26.035 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 54 /RAMS/TVRAM11) - ) - (pad 56 thru_hole circle (at -27.305 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 71 /RAMS/TVRAM27) - ) - (pad 57 thru_hole circle (at -28.575 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 55 /RAMS/TVRAM12) - ) - (pad 58 thru_hole circle (at -29.845 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 72 /RAMS/TVRAM28) - ) - (pad 59 thru_hole circle (at -31.115 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 4 +5V) - ) - (pad 60 thru_hole circle (at -32.385 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 73 /RAMS/TVRAM29) - ) - (pad 61 thru_hole circle (at -33.655 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 56 /RAMS/TVRAM13) - ) - (pad 62 thru_hole circle (at -34.925 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 75 /RAMS/TVRAM30) - ) - (pad 63 thru_hole circle (at -36.195 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 57 /RAMS/TVRAM14) - ) - (pad 64 thru_hole circle (at -37.465 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 76 /RAMS/TVRAM31) - ) - (pad 65 thru_hole circle (at -38.735 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 58 /RAMS/TVRAM15) - ) - (pad 66 thru_hole circle (at -40.005 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 67 thru_hole circle (at -41.275 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 68 thru_hole circle (at -42.545 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 69 thru_hole circle (at -43.815 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 70 thru_hole circle (at -45.085 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 71 thru_hole circle (at -46.355 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 72 thru_hole circle (at -47.625 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 301 GND) - ) + (fp_line (start 57.785 -4.445) (end -57.785 -4.445) (layer F.SilkS) (width 0.3048)) + (fp_line (start -57.785 -4.445) (end -57.785 3.175) (layer F.SilkS) (width 0.3048)) + (fp_line (start -57.785 3.175) (end 57.785 3.175) (layer F.SilkS) (width 0.3048)) + (fp_line (start 57.785 3.175) (end 57.785 -4.445) (layer F.SilkS) (width 0.3048)) + (fp_line (start 46.99 3.175) (end 47.625 1.905) (layer F.SilkS) (width 0.3048)) + (fp_line (start 47.625 1.905) (end 48.26 3.175) (layer F.SilkS) (width 0.3048)) + (pad "" thru_hole circle (at 0 0) (size 3.048 3.048) (drill 2.54) (layers *.Cu *.Mask F.SilkS)) + (pad "" thru_hole circle (at -55.88 0) (size 3.048 3.048) (drill 2.54) (layers *.Cu *.Mask F.SilkS)) + (pad "" thru_hole circle (at 55.88 0) (size 3.048 3.048) (drill 2.54) (layers *.Cu *.Mask F.SilkS)) + (pad 1 thru_hole rect (at 47.625 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 301 GND)) + (pad 2 thru_hole circle (at 46.355 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 51 /RAMS/TVRAM0)) + (pad 3 thru_hole circle (at 45.085 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 59 /RAMS/TVRAM16)) + (pad 4 thru_hole circle (at 43.815 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 52 /RAMS/TVRAM1)) + (pad 5 thru_hole circle (at 42.545 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 60 /RAMS/TVRAM17)) + (pad 6 thru_hole circle (at 41.275 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 63 /RAMS/TVRAM2)) + (pad 7 thru_hole circle (at 40.005 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 61 /RAMS/TVRAM18)) + (pad 8 thru_hole circle (at 38.735 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 74 /RAMS/TVRAM3)) + (pad 9 thru_hole circle (at 37.465 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 62 /RAMS/TVRAM19)) + (pad 10 thru_hole circle (at 36.195 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 4 +5V)) + (pad 11 thru_hole circle (at 34.925 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 12 thru_hole circle (at 33.655 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 38 /RAMS/MXA0)) + (pad 13 thru_hole circle (at 32.385 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 39 /RAMS/MXA1)) + (pad 14 thru_hole circle (at 31.115 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 41 /RAMS/MXA2)) + (pad 15 thru_hole circle (at 29.845 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 42 /RAMS/MXA3)) + (pad 16 thru_hole circle (at 28.575 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 43 /RAMS/MXA4)) + (pad 17 thru_hole circle (at 27.305 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 44 /RAMS/MXA5)) + (pad 18 thru_hole circle (at 26.035 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 45 /RAMS/MXA6)) + (pad 19 thru_hole circle (at 24.765 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 40 /RAMS/MXA10)) + (pad 20 thru_hole circle (at 23.495 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 77 /RAMS/TVRAM4)) + (pad 21 thru_hole circle (at 22.225 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 64 /RAMS/TVRAM20)) + (pad 22 thru_hole circle (at 20.955 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 78 /RAMS/TVRAM5)) + (pad 23 thru_hole circle (at 19.685 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 65 /RAMS/TVRAM21)) + (pad 24 thru_hole circle (at 18.415 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 79 /RAMS/TVRAM6)) + (pad 25 thru_hole circle (at 17.145 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 66 /RAMS/TVRAM22)) + (pad 26 thru_hole circle (at 15.875 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 80 /RAMS/TVRAM7)) + (pad 27 thru_hole circle (at 14.605 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 67 /RAMS/TVRAM23)) + (pad 28 thru_hole circle (at 13.335 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 46 /RAMS/MXA7)) + (pad 29 thru_hole circle (at 12.065 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 30 thru_hole circle (at 10.795 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 4 +5V)) + (pad 31 thru_hole circle (at 9.525 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 47 /RAMS/MXA8)) + (pad 32 thru_hole circle (at 8.255 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 48 /RAMS/MXA9)) + (pad 33 thru_hole circle (at 6.985 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 34 thru_hole circle (at 5.715 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 50 /RAMS/RAS5-)) + (pad 35 thru_hole circle (at 4.445 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 36 thru_hole circle (at 3.175 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 37 thru_hole circle (at -3.175 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 38 thru_hole circle (at -4.445 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 39 thru_hole circle (at -5.715 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 301 GND)) + (pad 40 thru_hole circle (at -6.985 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 35 /RAMS/CAS0-)) + (pad 41 thru_hole circle (at -8.255 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 180 /graphic/CAS1-)) + (pad 42 thru_hole circle (at -9.525 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 36 /RAMS/CAS2-)) + (pad 43 thru_hole circle (at -10.795 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 37 /RAMS/CAS3-)) + (pad 44 thru_hole circle (at -12.065 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 50 /RAMS/RAS5-)) + (pad 45 thru_hole circle (at -13.335 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 46 thru_hole circle (at -14.605 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 47 thru_hole circle (at -15.875 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 83 /RAMS/WRAM-)) + (pad 48 thru_hole circle (at -17.145 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 49 thru_hole circle (at -18.415 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 81 /RAMS/TVRAM8)) + (pad 50 thru_hole circle (at -19.685 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 68 /RAMS/TVRAM24)) + (pad 51 thru_hole circle (at -20.955 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 82 /RAMS/TVRAM9)) + (pad 52 thru_hole circle (at -22.225 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 69 /RAMS/TVRAM25)) + (pad 53 thru_hole circle (at -23.495 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 53 /RAMS/TVRAM10)) + (pad 54 thru_hole circle (at -24.765 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 70 /RAMS/TVRAM26)) + (pad 55 thru_hole circle (at -26.035 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 54 /RAMS/TVRAM11)) + (pad 56 thru_hole circle (at -27.305 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 71 /RAMS/TVRAM27)) + (pad 57 thru_hole circle (at -28.575 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 55 /RAMS/TVRAM12)) + (pad 58 thru_hole circle (at -29.845 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 72 /RAMS/TVRAM28)) + (pad 59 thru_hole circle (at -31.115 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 4 +5V)) + (pad 60 thru_hole circle (at -32.385 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 73 /RAMS/TVRAM29)) + (pad 61 thru_hole circle (at -33.655 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 56 /RAMS/TVRAM13)) + (pad 62 thru_hole circle (at -34.925 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 75 /RAMS/TVRAM30)) + (pad 63 thru_hole circle (at -36.195 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 57 /RAMS/TVRAM14)) + (pad 64 thru_hole circle (at -37.465 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 76 /RAMS/TVRAM31)) + (pad 65 thru_hole circle (at -38.735 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 58 /RAMS/TVRAM15)) + (pad 66 thru_hole circle (at -40.005 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 67 thru_hole circle (at -41.275 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 68 thru_hole circle (at -42.545 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 69 thru_hole circle (at -43.815 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 70 thru_hole circle (at -45.085 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 71 thru_hole circle (at -46.355 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 72 thru_hole circle (at -47.625 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 301 GND)) ) (module SIM72 (layer Composant) (tedit 200000) (tstamp 32FA1E5B) @@ -3331,299 +2408,149 @@ (descr "Support 72 pins pour barettes SIMM 32 bits") (tags SIMM) (path /4BF03685/4BF036D3) - (fp_text reference U18 (at -18.542 -3.302) (layer Dessus.SilkS) + (fp_text reference U18 (at -18.542 -3.302) (layer F.SilkS) (effects (font (size 2.032 2.032) (thickness 0.3048))) ) - (fp_text value SIM4X32 (at 11.176 -3.302) (layer Dessus.SilkS) + (fp_text value SIM4X32 (at 11.176 -3.302) (layer F.SilkS) (effects (font (size 2.032 2.032) (thickness 0.3048))) ) - (fp_line (start 57.785 -4.445) (end -57.785 -4.445) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -57.785 -4.445) (end -57.785 3.175) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -57.785 3.175) (end 57.785 3.175) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 57.785 3.175) (end 57.785 -4.445) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 46.99 3.175) (end 47.625 1.905) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 47.625 1.905) (end 48.26 3.175) (layer Dessus.SilkS) (width 0.3048)) - (pad "" thru_hole circle (at 0 0) (size 3.048 3.048) (drill 2.54) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole circle (at -55.88 0) (size 3.048 3.048) (drill 2.54) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole circle (at 55.88 0) (size 3.048 3.048) (drill 2.54) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 1 thru_hole rect (at 47.625 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 301 GND) - ) - (pad 2 thru_hole circle (at 46.355 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 51 /RAMS/TVRAM0) - ) - (pad 3 thru_hole circle (at 45.085 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 59 /RAMS/TVRAM16) - ) - (pad 4 thru_hole circle (at 43.815 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 52 /RAMS/TVRAM1) - ) - (pad 5 thru_hole circle (at 42.545 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 60 /RAMS/TVRAM17) - ) - (pad 6 thru_hole circle (at 41.275 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 63 /RAMS/TVRAM2) - ) - (pad 7 thru_hole circle (at 40.005 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 61 /RAMS/TVRAM18) - ) - (pad 8 thru_hole circle (at 38.735 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 74 /RAMS/TVRAM3) - ) - (pad 9 thru_hole circle (at 37.465 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 62 /RAMS/TVRAM19) - ) - (pad 10 thru_hole circle (at 36.195 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 4 +5V) - ) - (pad 11 thru_hole circle (at 34.925 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 12 thru_hole circle (at 33.655 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 38 /RAMS/MXA0) - ) - (pad 13 thru_hole circle (at 32.385 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 39 /RAMS/MXA1) - ) - (pad 14 thru_hole circle (at 31.115 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 41 /RAMS/MXA2) - ) - (pad 15 thru_hole circle (at 29.845 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 42 /RAMS/MXA3) - ) - (pad 16 thru_hole circle (at 28.575 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 43 /RAMS/MXA4) - ) - (pad 17 thru_hole circle (at 27.305 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 44 /RAMS/MXA5) - ) - (pad 18 thru_hole circle (at 26.035 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 45 /RAMS/MXA6) - ) - (pad 19 thru_hole circle (at 24.765 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 40 /RAMS/MXA10) - ) - (pad 20 thru_hole circle (at 23.495 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 77 /RAMS/TVRAM4) - ) - (pad 21 thru_hole circle (at 22.225 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 64 /RAMS/TVRAM20) - ) - (pad 22 thru_hole circle (at 20.955 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 78 /RAMS/TVRAM5) - ) - (pad 23 thru_hole circle (at 19.685 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 65 /RAMS/TVRAM21) - ) - (pad 24 thru_hole circle (at 18.415 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 79 /RAMS/TVRAM6) - ) - (pad 25 thru_hole circle (at 17.145 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 66 /RAMS/TVRAM22) - ) - (pad 26 thru_hole circle (at 15.875 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 80 /RAMS/TVRAM7) - ) - (pad 27 thru_hole circle (at 14.605 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 67 /RAMS/TVRAM23) - ) - (pad 28 thru_hole circle (at 13.335 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 46 /RAMS/MXA7) - ) - (pad 29 thru_hole circle (at 12.065 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 30 thru_hole circle (at 10.795 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 4 +5V) - ) - (pad 31 thru_hole circle (at 9.525 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 47 /RAMS/MXA8) - ) - (pad 32 thru_hole circle (at 8.255 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 48 /RAMS/MXA9) - ) - (pad 33 thru_hole circle (at 6.985 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 34 thru_hole circle (at 5.715 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 222 /graphic/RAS1-) - ) - (pad 35 thru_hole circle (at 4.445 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 36 thru_hole circle (at 3.175 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 37 thru_hole circle (at -3.175 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 38 thru_hole circle (at -4.445 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 39 thru_hole circle (at -5.715 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 301 GND) - ) - (pad 40 thru_hole circle (at -6.985 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 35 /RAMS/CAS0-) - ) - (pad 41 thru_hole circle (at -8.255 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 180 /graphic/CAS1-) - ) - (pad 42 thru_hole circle (at -9.525 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 36 /RAMS/CAS2-) - ) - (pad 43 thru_hole circle (at -10.795 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 37 /RAMS/CAS3-) - ) - (pad 44 thru_hole circle (at -12.065 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 222 /graphic/RAS1-) - ) - (pad 45 thru_hole circle (at -13.335 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 46 thru_hole circle (at -14.605 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 47 thru_hole circle (at -15.875 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 83 /RAMS/WRAM-) - ) - (pad 48 thru_hole circle (at -17.145 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 49 thru_hole circle (at -18.415 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 81 /RAMS/TVRAM8) - ) - (pad 50 thru_hole circle (at -19.685 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 68 /RAMS/TVRAM24) - ) - (pad 51 thru_hole circle (at -20.955 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 82 /RAMS/TVRAM9) - ) - (pad 52 thru_hole circle (at -22.225 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 69 /RAMS/TVRAM25) - ) - (pad 53 thru_hole circle (at -23.495 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 53 /RAMS/TVRAM10) - ) - (pad 54 thru_hole circle (at -24.765 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 70 /RAMS/TVRAM26) - ) - (pad 55 thru_hole circle (at -26.035 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 54 /RAMS/TVRAM11) - ) - (pad 56 thru_hole circle (at -27.305 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 71 /RAMS/TVRAM27) - ) - (pad 57 thru_hole circle (at -28.575 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 55 /RAMS/TVRAM12) - ) - (pad 58 thru_hole circle (at -29.845 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 72 /RAMS/TVRAM28) - ) - (pad 59 thru_hole circle (at -31.115 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 4 +5V) - ) - (pad 60 thru_hole circle (at -32.385 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 73 /RAMS/TVRAM29) - ) - (pad 61 thru_hole circle (at -33.655 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 56 /RAMS/TVRAM13) - ) - (pad 62 thru_hole circle (at -34.925 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 75 /RAMS/TVRAM30) - ) - (pad 63 thru_hole circle (at -36.195 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 57 /RAMS/TVRAM14) - ) - (pad 64 thru_hole circle (at -37.465 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 76 /RAMS/TVRAM31) - ) - (pad 65 thru_hole circle (at -38.735 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 58 /RAMS/TVRAM15) - ) - (pad 66 thru_hole circle (at -40.005 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 67 thru_hole circle (at -41.275 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 68 thru_hole circle (at -42.545 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 69 thru_hole circle (at -43.815 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 70 thru_hole circle (at -45.085 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 71 thru_hole circle (at -46.355 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 72 thru_hole circle (at -47.625 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 301 GND) - ) + (fp_line (start 57.785 -4.445) (end -57.785 -4.445) (layer F.SilkS) (width 0.3048)) + (fp_line (start -57.785 -4.445) (end -57.785 3.175) (layer F.SilkS) (width 0.3048)) + (fp_line (start -57.785 3.175) (end 57.785 3.175) (layer F.SilkS) (width 0.3048)) + (fp_line (start 57.785 3.175) (end 57.785 -4.445) (layer F.SilkS) (width 0.3048)) + (fp_line (start 46.99 3.175) (end 47.625 1.905) (layer F.SilkS) (width 0.3048)) + (fp_line (start 47.625 1.905) (end 48.26 3.175) (layer F.SilkS) (width 0.3048)) + (pad "" thru_hole circle (at 0 0) (size 3.048 3.048) (drill 2.54) (layers *.Cu *.Mask F.SilkS)) + (pad "" thru_hole circle (at -55.88 0) (size 3.048 3.048) (drill 2.54) (layers *.Cu *.Mask F.SilkS)) + (pad "" thru_hole circle (at 55.88 0) (size 3.048 3.048) (drill 2.54) (layers *.Cu *.Mask F.SilkS)) + (pad 1 thru_hole rect (at 47.625 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 301 GND)) + (pad 2 thru_hole circle (at 46.355 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 51 /RAMS/TVRAM0)) + (pad 3 thru_hole circle (at 45.085 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 59 /RAMS/TVRAM16)) + (pad 4 thru_hole circle (at 43.815 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 52 /RAMS/TVRAM1)) + (pad 5 thru_hole circle (at 42.545 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 60 /RAMS/TVRAM17)) + (pad 6 thru_hole circle (at 41.275 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 63 /RAMS/TVRAM2)) + (pad 7 thru_hole circle (at 40.005 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 61 /RAMS/TVRAM18)) + (pad 8 thru_hole circle (at 38.735 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 74 /RAMS/TVRAM3)) + (pad 9 thru_hole circle (at 37.465 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 62 /RAMS/TVRAM19)) + (pad 10 thru_hole circle (at 36.195 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 4 +5V)) + (pad 11 thru_hole circle (at 34.925 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 12 thru_hole circle (at 33.655 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 38 /RAMS/MXA0)) + (pad 13 thru_hole circle (at 32.385 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 39 /RAMS/MXA1)) + (pad 14 thru_hole circle (at 31.115 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 41 /RAMS/MXA2)) + (pad 15 thru_hole circle (at 29.845 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 42 /RAMS/MXA3)) + (pad 16 thru_hole circle (at 28.575 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 43 /RAMS/MXA4)) + (pad 17 thru_hole circle (at 27.305 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 44 /RAMS/MXA5)) + (pad 18 thru_hole circle (at 26.035 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 45 /RAMS/MXA6)) + (pad 19 thru_hole circle (at 24.765 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 40 /RAMS/MXA10)) + (pad 20 thru_hole circle (at 23.495 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 77 /RAMS/TVRAM4)) + (pad 21 thru_hole circle (at 22.225 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 64 /RAMS/TVRAM20)) + (pad 22 thru_hole circle (at 20.955 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 78 /RAMS/TVRAM5)) + (pad 23 thru_hole circle (at 19.685 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 65 /RAMS/TVRAM21)) + (pad 24 thru_hole circle (at 18.415 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 79 /RAMS/TVRAM6)) + (pad 25 thru_hole circle (at 17.145 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 66 /RAMS/TVRAM22)) + (pad 26 thru_hole circle (at 15.875 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 80 /RAMS/TVRAM7)) + (pad 27 thru_hole circle (at 14.605 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 67 /RAMS/TVRAM23)) + (pad 28 thru_hole circle (at 13.335 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 46 /RAMS/MXA7)) + (pad 29 thru_hole circle (at 12.065 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 30 thru_hole circle (at 10.795 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 4 +5V)) + (pad 31 thru_hole circle (at 9.525 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 47 /RAMS/MXA8)) + (pad 32 thru_hole circle (at 8.255 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 48 /RAMS/MXA9)) + (pad 33 thru_hole circle (at 6.985 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 34 thru_hole circle (at 5.715 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 222 /graphic/RAS1-)) + (pad 35 thru_hole circle (at 4.445 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 36 thru_hole circle (at 3.175 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 37 thru_hole circle (at -3.175 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 38 thru_hole circle (at -4.445 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 39 thru_hole circle (at -5.715 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 301 GND)) + (pad 40 thru_hole circle (at -6.985 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 35 /RAMS/CAS0-)) + (pad 41 thru_hole circle (at -8.255 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 180 /graphic/CAS1-)) + (pad 42 thru_hole circle (at -9.525 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 36 /RAMS/CAS2-)) + (pad 43 thru_hole circle (at -10.795 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 37 /RAMS/CAS3-)) + (pad 44 thru_hole circle (at -12.065 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 222 /graphic/RAS1-)) + (pad 45 thru_hole circle (at -13.335 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 46 thru_hole circle (at -14.605 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 47 thru_hole circle (at -15.875 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 83 /RAMS/WRAM-)) + (pad 48 thru_hole circle (at -17.145 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 49 thru_hole circle (at -18.415 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 81 /RAMS/TVRAM8)) + (pad 50 thru_hole circle (at -19.685 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 68 /RAMS/TVRAM24)) + (pad 51 thru_hole circle (at -20.955 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 82 /RAMS/TVRAM9)) + (pad 52 thru_hole circle (at -22.225 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 69 /RAMS/TVRAM25)) + (pad 53 thru_hole circle (at -23.495 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 53 /RAMS/TVRAM10)) + (pad 54 thru_hole circle (at -24.765 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 70 /RAMS/TVRAM26)) + (pad 55 thru_hole circle (at -26.035 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 54 /RAMS/TVRAM11)) + (pad 56 thru_hole circle (at -27.305 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 71 /RAMS/TVRAM27)) + (pad 57 thru_hole circle (at -28.575 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 55 /RAMS/TVRAM12)) + (pad 58 thru_hole circle (at -29.845 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 72 /RAMS/TVRAM28)) + (pad 59 thru_hole circle (at -31.115 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 4 +5V)) + (pad 60 thru_hole circle (at -32.385 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 73 /RAMS/TVRAM29)) + (pad 61 thru_hole circle (at -33.655 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 56 /RAMS/TVRAM13)) + (pad 62 thru_hole circle (at -34.925 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 75 /RAMS/TVRAM30)) + (pad 63 thru_hole circle (at -36.195 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 57 /RAMS/TVRAM14)) + (pad 64 thru_hole circle (at -37.465 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 76 /RAMS/TVRAM31)) + (pad 65 thru_hole circle (at -38.735 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 58 /RAMS/TVRAM15)) + (pad 66 thru_hole circle (at -40.005 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 67 thru_hole circle (at -41.275 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 68 thru_hole circle (at -42.545 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 69 thru_hole circle (at -43.815 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 70 thru_hole circle (at -45.085 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 71 thru_hole circle (at -46.355 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 72 thru_hole circle (at -47.625 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 301 GND)) ) (module SIM72 (layer Composant) (tedit 200000) (tstamp 32FA1E5B) @@ -3631,299 +2558,149 @@ (descr "Support 72 pins pour barettes SIMM 32 bits") (tags SIMM) (path /4BF03685/4BF036D4) - (fp_text reference U19 (at -18.542 -3.302) (layer Dessus.SilkS) + (fp_text reference U19 (at -18.542 -3.302) (layer F.SilkS) (effects (font (size 2.032 2.032) (thickness 0.3048))) ) - (fp_text value SIM4X32 (at 11.176 -3.302) (layer Dessus.SilkS) + (fp_text value SIM4X32 (at 11.176 -3.302) (layer F.SilkS) (effects (font (size 2.032 2.032) (thickness 0.3048))) ) - (fp_line (start 57.785 -4.445) (end -57.785 -4.445) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -57.785 -4.445) (end -57.785 3.175) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -57.785 3.175) (end 57.785 3.175) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 57.785 3.175) (end 57.785 -4.445) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 46.99 3.175) (end 47.625 1.905) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 47.625 1.905) (end 48.26 3.175) (layer Dessus.SilkS) (width 0.3048)) - (pad "" thru_hole circle (at 0 0) (size 3.048 3.048) (drill 2.54) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole circle (at -55.88 0) (size 3.048 3.048) (drill 2.54) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole circle (at 55.88 0) (size 3.048 3.048) (drill 2.54) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 1 thru_hole rect (at 47.625 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 301 GND) - ) - (pad 2 thru_hole circle (at 46.355 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 51 /RAMS/TVRAM0) - ) - (pad 3 thru_hole circle (at 45.085 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 59 /RAMS/TVRAM16) - ) - (pad 4 thru_hole circle (at 43.815 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 52 /RAMS/TVRAM1) - ) - (pad 5 thru_hole circle (at 42.545 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 60 /RAMS/TVRAM17) - ) - (pad 6 thru_hole circle (at 41.275 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 63 /RAMS/TVRAM2) - ) - (pad 7 thru_hole circle (at 40.005 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 61 /RAMS/TVRAM18) - ) - (pad 8 thru_hole circle (at 38.735 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 74 /RAMS/TVRAM3) - ) - (pad 9 thru_hole circle (at 37.465 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 62 /RAMS/TVRAM19) - ) - (pad 10 thru_hole circle (at 36.195 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 4 +5V) - ) - (pad 11 thru_hole circle (at 34.925 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 12 thru_hole circle (at 33.655 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 38 /RAMS/MXA0) - ) - (pad 13 thru_hole circle (at 32.385 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 39 /RAMS/MXA1) - ) - (pad 14 thru_hole circle (at 31.115 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 41 /RAMS/MXA2) - ) - (pad 15 thru_hole circle (at 29.845 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 42 /RAMS/MXA3) - ) - (pad 16 thru_hole circle (at 28.575 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 43 /RAMS/MXA4) - ) - (pad 17 thru_hole circle (at 27.305 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 44 /RAMS/MXA5) - ) - (pad 18 thru_hole circle (at 26.035 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 45 /RAMS/MXA6) - ) - (pad 19 thru_hole circle (at 24.765 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 40 /RAMS/MXA10) - ) - (pad 20 thru_hole circle (at 23.495 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 77 /RAMS/TVRAM4) - ) - (pad 21 thru_hole circle (at 22.225 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 64 /RAMS/TVRAM20) - ) - (pad 22 thru_hole circle (at 20.955 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 78 /RAMS/TVRAM5) - ) - (pad 23 thru_hole circle (at 19.685 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 65 /RAMS/TVRAM21) - ) - (pad 24 thru_hole circle (at 18.415 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 79 /RAMS/TVRAM6) - ) - (pad 25 thru_hole circle (at 17.145 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 66 /RAMS/TVRAM22) - ) - (pad 26 thru_hole circle (at 15.875 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 80 /RAMS/TVRAM7) - ) - (pad 27 thru_hole circle (at 14.605 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 67 /RAMS/TVRAM23) - ) - (pad 28 thru_hole circle (at 13.335 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 46 /RAMS/MXA7) - ) - (pad 29 thru_hole circle (at 12.065 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 30 thru_hole circle (at 10.795 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 4 +5V) - ) - (pad 31 thru_hole circle (at 9.525 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 47 /RAMS/MXA8) - ) - (pad 32 thru_hole circle (at 8.255 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 48 /RAMS/MXA9) - ) - (pad 33 thru_hole circle (at 6.985 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 34 thru_hole circle (at 5.715 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 221 /graphic/RAS0-) - ) - (pad 35 thru_hole circle (at 4.445 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 36 thru_hole circle (at 3.175 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 37 thru_hole circle (at -3.175 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 38 thru_hole circle (at -4.445 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 39 thru_hole circle (at -5.715 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 301 GND) - ) - (pad 40 thru_hole circle (at -6.985 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 35 /RAMS/CAS0-) - ) - (pad 41 thru_hole circle (at -8.255 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 180 /graphic/CAS1-) - ) - (pad 42 thru_hole circle (at -9.525 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 36 /RAMS/CAS2-) - ) - (pad 43 thru_hole circle (at -10.795 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 37 /RAMS/CAS3-) - ) - (pad 44 thru_hole circle (at -12.065 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 221 /graphic/RAS0-) - ) - (pad 45 thru_hole circle (at -13.335 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 46 thru_hole circle (at -14.605 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 47 thru_hole circle (at -15.875 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 83 /RAMS/WRAM-) - ) - (pad 48 thru_hole circle (at -17.145 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 49 thru_hole circle (at -18.415 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 81 /RAMS/TVRAM8) - ) - (pad 50 thru_hole circle (at -19.685 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 68 /RAMS/TVRAM24) - ) - (pad 51 thru_hole circle (at -20.955 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 82 /RAMS/TVRAM9) - ) - (pad 52 thru_hole circle (at -22.225 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 69 /RAMS/TVRAM25) - ) - (pad 53 thru_hole circle (at -23.495 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 53 /RAMS/TVRAM10) - ) - (pad 54 thru_hole circle (at -24.765 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 70 /RAMS/TVRAM26) - ) - (pad 55 thru_hole circle (at -26.035 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 54 /RAMS/TVRAM11) - ) - (pad 56 thru_hole circle (at -27.305 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 71 /RAMS/TVRAM27) - ) - (pad 57 thru_hole circle (at -28.575 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 55 /RAMS/TVRAM12) - ) - (pad 58 thru_hole circle (at -29.845 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 72 /RAMS/TVRAM28) - ) - (pad 59 thru_hole circle (at -31.115 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 4 +5V) - ) - (pad 60 thru_hole circle (at -32.385 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 73 /RAMS/TVRAM29) - ) - (pad 61 thru_hole circle (at -33.655 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 56 /RAMS/TVRAM13) - ) - (pad 62 thru_hole circle (at -34.925 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 75 /RAMS/TVRAM30) - ) - (pad 63 thru_hole circle (at -36.195 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 57 /RAMS/TVRAM14) - ) - (pad 64 thru_hole circle (at -37.465 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 76 /RAMS/TVRAM31) - ) - (pad 65 thru_hole circle (at -38.735 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 58 /RAMS/TVRAM15) - ) - (pad 66 thru_hole circle (at -40.005 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 67 thru_hole circle (at -41.275 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 68 thru_hole circle (at -42.545 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 69 thru_hole circle (at -43.815 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 70 thru_hole circle (at -45.085 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 71 thru_hole circle (at -46.355 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 72 thru_hole circle (at -47.625 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 301 GND) - ) + (fp_line (start 57.785 -4.445) (end -57.785 -4.445) (layer F.SilkS) (width 0.3048)) + (fp_line (start -57.785 -4.445) (end -57.785 3.175) (layer F.SilkS) (width 0.3048)) + (fp_line (start -57.785 3.175) (end 57.785 3.175) (layer F.SilkS) (width 0.3048)) + (fp_line (start 57.785 3.175) (end 57.785 -4.445) (layer F.SilkS) (width 0.3048)) + (fp_line (start 46.99 3.175) (end 47.625 1.905) (layer F.SilkS) (width 0.3048)) + (fp_line (start 47.625 1.905) (end 48.26 3.175) (layer F.SilkS) (width 0.3048)) + (pad "" thru_hole circle (at 0 0) (size 3.048 3.048) (drill 2.54) (layers *.Cu *.Mask F.SilkS)) + (pad "" thru_hole circle (at -55.88 0) (size 3.048 3.048) (drill 2.54) (layers *.Cu *.Mask F.SilkS)) + (pad "" thru_hole circle (at 55.88 0) (size 3.048 3.048) (drill 2.54) (layers *.Cu *.Mask F.SilkS)) + (pad 1 thru_hole rect (at 47.625 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 301 GND)) + (pad 2 thru_hole circle (at 46.355 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 51 /RAMS/TVRAM0)) + (pad 3 thru_hole circle (at 45.085 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 59 /RAMS/TVRAM16)) + (pad 4 thru_hole circle (at 43.815 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 52 /RAMS/TVRAM1)) + (pad 5 thru_hole circle (at 42.545 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 60 /RAMS/TVRAM17)) + (pad 6 thru_hole circle (at 41.275 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 63 /RAMS/TVRAM2)) + (pad 7 thru_hole circle (at 40.005 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 61 /RAMS/TVRAM18)) + (pad 8 thru_hole circle (at 38.735 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 74 /RAMS/TVRAM3)) + (pad 9 thru_hole circle (at 37.465 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 62 /RAMS/TVRAM19)) + (pad 10 thru_hole circle (at 36.195 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 4 +5V)) + (pad 11 thru_hole circle (at 34.925 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 12 thru_hole circle (at 33.655 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 38 /RAMS/MXA0)) + (pad 13 thru_hole circle (at 32.385 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 39 /RAMS/MXA1)) + (pad 14 thru_hole circle (at 31.115 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 41 /RAMS/MXA2)) + (pad 15 thru_hole circle (at 29.845 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 42 /RAMS/MXA3)) + (pad 16 thru_hole circle (at 28.575 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 43 /RAMS/MXA4)) + (pad 17 thru_hole circle (at 27.305 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 44 /RAMS/MXA5)) + (pad 18 thru_hole circle (at 26.035 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 45 /RAMS/MXA6)) + (pad 19 thru_hole circle (at 24.765 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 40 /RAMS/MXA10)) + (pad 20 thru_hole circle (at 23.495 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 77 /RAMS/TVRAM4)) + (pad 21 thru_hole circle (at 22.225 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 64 /RAMS/TVRAM20)) + (pad 22 thru_hole circle (at 20.955 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 78 /RAMS/TVRAM5)) + (pad 23 thru_hole circle (at 19.685 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 65 /RAMS/TVRAM21)) + (pad 24 thru_hole circle (at 18.415 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 79 /RAMS/TVRAM6)) + (pad 25 thru_hole circle (at 17.145 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 66 /RAMS/TVRAM22)) + (pad 26 thru_hole circle (at 15.875 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 80 /RAMS/TVRAM7)) + (pad 27 thru_hole circle (at 14.605 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 67 /RAMS/TVRAM23)) + (pad 28 thru_hole circle (at 13.335 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 46 /RAMS/MXA7)) + (pad 29 thru_hole circle (at 12.065 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 30 thru_hole circle (at 10.795 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 4 +5V)) + (pad 31 thru_hole circle (at 9.525 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 47 /RAMS/MXA8)) + (pad 32 thru_hole circle (at 8.255 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 48 /RAMS/MXA9)) + (pad 33 thru_hole circle (at 6.985 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 34 thru_hole circle (at 5.715 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 221 /graphic/RAS0-)) + (pad 35 thru_hole circle (at 4.445 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 36 thru_hole circle (at 3.175 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 37 thru_hole circle (at -3.175 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 38 thru_hole circle (at -4.445 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 39 thru_hole circle (at -5.715 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 301 GND)) + (pad 40 thru_hole circle (at -6.985 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 35 /RAMS/CAS0-)) + (pad 41 thru_hole circle (at -8.255 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 180 /graphic/CAS1-)) + (pad 42 thru_hole circle (at -9.525 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 36 /RAMS/CAS2-)) + (pad 43 thru_hole circle (at -10.795 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 37 /RAMS/CAS3-)) + (pad 44 thru_hole circle (at -12.065 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 221 /graphic/RAS0-)) + (pad 45 thru_hole circle (at -13.335 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 46 thru_hole circle (at -14.605 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 47 thru_hole circle (at -15.875 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 83 /RAMS/WRAM-)) + (pad 48 thru_hole circle (at -17.145 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 49 thru_hole circle (at -18.415 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 81 /RAMS/TVRAM8)) + (pad 50 thru_hole circle (at -19.685 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 68 /RAMS/TVRAM24)) + (pad 51 thru_hole circle (at -20.955 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 82 /RAMS/TVRAM9)) + (pad 52 thru_hole circle (at -22.225 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 69 /RAMS/TVRAM25)) + (pad 53 thru_hole circle (at -23.495 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 53 /RAMS/TVRAM10)) + (pad 54 thru_hole circle (at -24.765 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 70 /RAMS/TVRAM26)) + (pad 55 thru_hole circle (at -26.035 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 54 /RAMS/TVRAM11)) + (pad 56 thru_hole circle (at -27.305 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 71 /RAMS/TVRAM27)) + (pad 57 thru_hole circle (at -28.575 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 55 /RAMS/TVRAM12)) + (pad 58 thru_hole circle (at -29.845 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 72 /RAMS/TVRAM28)) + (pad 59 thru_hole circle (at -31.115 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 4 +5V)) + (pad 60 thru_hole circle (at -32.385 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 73 /RAMS/TVRAM29)) + (pad 61 thru_hole circle (at -33.655 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 56 /RAMS/TVRAM13)) + (pad 62 thru_hole circle (at -34.925 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 75 /RAMS/TVRAM30)) + (pad 63 thru_hole circle (at -36.195 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 57 /RAMS/TVRAM14)) + (pad 64 thru_hole circle (at -37.465 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 76 /RAMS/TVRAM31)) + (pad 65 thru_hole circle (at -38.735 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 58 /RAMS/TVRAM15)) + (pad 66 thru_hole circle (at -40.005 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 67 thru_hole circle (at -41.275 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 68 thru_hole circle (at -42.545 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 69 thru_hole circle (at -43.815 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 70 thru_hole circle (at -45.085 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 71 thru_hole circle (at -46.355 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 72 thru_hole circle (at -47.625 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 301 GND)) ) (module SIM72 (layer Composant) (tedit 200000) (tstamp 32FA1E5B) @@ -3931,299 +2708,149 @@ (descr "Support 72 pins pour barettes SIMM 32 bits") (tags SIMM) (path /4BF03685/4BF036D2) - (fp_text reference U17 (at -18.542 -3.302) (layer Dessus.SilkS) + (fp_text reference U17 (at -18.542 -3.302) (layer F.SilkS) (effects (font (size 2.032 2.032) (thickness 0.3048))) ) - (fp_text value SIM4X32 (at 11.176 -3.302) (layer Dessus.SilkS) + (fp_text value SIM4X32 (at 11.176 -3.302) (layer F.SilkS) (effects (font (size 2.032 2.032) (thickness 0.3048))) ) - (fp_line (start 57.785 -4.445) (end -57.785 -4.445) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -57.785 -4.445) (end -57.785 3.175) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -57.785 3.175) (end 57.785 3.175) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 57.785 3.175) (end 57.785 -4.445) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 46.99 3.175) (end 47.625 1.905) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 47.625 1.905) (end 48.26 3.175) (layer Dessus.SilkS) (width 0.3048)) - (pad "" thru_hole circle (at 0 0) (size 3.048 3.048) (drill 2.54) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole circle (at -55.88 0) (size 3.048 3.048) (drill 2.54) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole circle (at 55.88 0) (size 3.048 3.048) (drill 2.54) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 1 thru_hole rect (at 47.625 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 301 GND) - ) - (pad 2 thru_hole circle (at 46.355 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 51 /RAMS/TVRAM0) - ) - (pad 3 thru_hole circle (at 45.085 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 59 /RAMS/TVRAM16) - ) - (pad 4 thru_hole circle (at 43.815 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 52 /RAMS/TVRAM1) - ) - (pad 5 thru_hole circle (at 42.545 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 60 /RAMS/TVRAM17) - ) - (pad 6 thru_hole circle (at 41.275 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 63 /RAMS/TVRAM2) - ) - (pad 7 thru_hole circle (at 40.005 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 61 /RAMS/TVRAM18) - ) - (pad 8 thru_hole circle (at 38.735 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 74 /RAMS/TVRAM3) - ) - (pad 9 thru_hole circle (at 37.465 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 62 /RAMS/TVRAM19) - ) - (pad 10 thru_hole circle (at 36.195 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 4 +5V) - ) - (pad 11 thru_hole circle (at 34.925 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 12 thru_hole circle (at 33.655 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 38 /RAMS/MXA0) - ) - (pad 13 thru_hole circle (at 32.385 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 39 /RAMS/MXA1) - ) - (pad 14 thru_hole circle (at 31.115 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 41 /RAMS/MXA2) - ) - (pad 15 thru_hole circle (at 29.845 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 42 /RAMS/MXA3) - ) - (pad 16 thru_hole circle (at 28.575 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 43 /RAMS/MXA4) - ) - (pad 17 thru_hole circle (at 27.305 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 44 /RAMS/MXA5) - ) - (pad 18 thru_hole circle (at 26.035 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 45 /RAMS/MXA6) - ) - (pad 19 thru_hole circle (at 24.765 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 40 /RAMS/MXA10) - ) - (pad 20 thru_hole circle (at 23.495 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 77 /RAMS/TVRAM4) - ) - (pad 21 thru_hole circle (at 22.225 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 64 /RAMS/TVRAM20) - ) - (pad 22 thru_hole circle (at 20.955 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 78 /RAMS/TVRAM5) - ) - (pad 23 thru_hole circle (at 19.685 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 65 /RAMS/TVRAM21) - ) - (pad 24 thru_hole circle (at 18.415 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 79 /RAMS/TVRAM6) - ) - (pad 25 thru_hole circle (at 17.145 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 66 /RAMS/TVRAM22) - ) - (pad 26 thru_hole circle (at 15.875 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 80 /RAMS/TVRAM7) - ) - (pad 27 thru_hole circle (at 14.605 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 67 /RAMS/TVRAM23) - ) - (pad 28 thru_hole circle (at 13.335 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 46 /RAMS/MXA7) - ) - (pad 29 thru_hole circle (at 12.065 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 30 thru_hole circle (at 10.795 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 4 +5V) - ) - (pad 31 thru_hole circle (at 9.525 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 47 /RAMS/MXA8) - ) - (pad 32 thru_hole circle (at 8.255 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 48 /RAMS/MXA9) - ) - (pad 33 thru_hole circle (at 6.985 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 34 thru_hole circle (at 5.715 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 223 /graphic/RAS2-) - ) - (pad 35 thru_hole circle (at 4.445 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 36 thru_hole circle (at 3.175 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 37 thru_hole circle (at -3.175 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 38 thru_hole circle (at -4.445 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 39 thru_hole circle (at -5.715 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 301 GND) - ) - (pad 40 thru_hole circle (at -6.985 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 35 /RAMS/CAS0-) - ) - (pad 41 thru_hole circle (at -8.255 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 180 /graphic/CAS1-) - ) - (pad 42 thru_hole circle (at -9.525 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 36 /RAMS/CAS2-) - ) - (pad 43 thru_hole circle (at -10.795 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 37 /RAMS/CAS3-) - ) - (pad 44 thru_hole circle (at -12.065 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 223 /graphic/RAS2-) - ) - (pad 45 thru_hole circle (at -13.335 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 46 thru_hole circle (at -14.605 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 47 thru_hole circle (at -15.875 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 83 /RAMS/WRAM-) - ) - (pad 48 thru_hole circle (at -17.145 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 49 thru_hole circle (at -18.415 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 81 /RAMS/TVRAM8) - ) - (pad 50 thru_hole circle (at -19.685 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 68 /RAMS/TVRAM24) - ) - (pad 51 thru_hole circle (at -20.955 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 82 /RAMS/TVRAM9) - ) - (pad 52 thru_hole circle (at -22.225 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 69 /RAMS/TVRAM25) - ) - (pad 53 thru_hole circle (at -23.495 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 53 /RAMS/TVRAM10) - ) - (pad 54 thru_hole circle (at -24.765 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 70 /RAMS/TVRAM26) - ) - (pad 55 thru_hole circle (at -26.035 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 54 /RAMS/TVRAM11) - ) - (pad 56 thru_hole circle (at -27.305 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 71 /RAMS/TVRAM27) - ) - (pad 57 thru_hole circle (at -28.575 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 55 /RAMS/TVRAM12) - ) - (pad 58 thru_hole circle (at -29.845 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 72 /RAMS/TVRAM28) - ) - (pad 59 thru_hole circle (at -31.115 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 4 +5V) - ) - (pad 60 thru_hole circle (at -32.385 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 73 /RAMS/TVRAM29) - ) - (pad 61 thru_hole circle (at -33.655 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 56 /RAMS/TVRAM13) - ) - (pad 62 thru_hole circle (at -34.925 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 75 /RAMS/TVRAM30) - ) - (pad 63 thru_hole circle (at -36.195 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 57 /RAMS/TVRAM14) - ) - (pad 64 thru_hole circle (at -37.465 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 76 /RAMS/TVRAM31) - ) - (pad 65 thru_hole circle (at -38.735 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 58 /RAMS/TVRAM15) - ) - (pad 66 thru_hole circle (at -40.005 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 67 thru_hole circle (at -41.275 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 68 thru_hole circle (at -42.545 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 69 thru_hole circle (at -43.815 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 70 thru_hole circle (at -45.085 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 71 thru_hole circle (at -46.355 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 72 thru_hole circle (at -47.625 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 301 GND) - ) + (fp_line (start 57.785 -4.445) (end -57.785 -4.445) (layer F.SilkS) (width 0.3048)) + (fp_line (start -57.785 -4.445) (end -57.785 3.175) (layer F.SilkS) (width 0.3048)) + (fp_line (start -57.785 3.175) (end 57.785 3.175) (layer F.SilkS) (width 0.3048)) + (fp_line (start 57.785 3.175) (end 57.785 -4.445) (layer F.SilkS) (width 0.3048)) + (fp_line (start 46.99 3.175) (end 47.625 1.905) (layer F.SilkS) (width 0.3048)) + (fp_line (start 47.625 1.905) (end 48.26 3.175) (layer F.SilkS) (width 0.3048)) + (pad "" thru_hole circle (at 0 0) (size 3.048 3.048) (drill 2.54) (layers *.Cu *.Mask F.SilkS)) + (pad "" thru_hole circle (at -55.88 0) (size 3.048 3.048) (drill 2.54) (layers *.Cu *.Mask F.SilkS)) + (pad "" thru_hole circle (at 55.88 0) (size 3.048 3.048) (drill 2.54) (layers *.Cu *.Mask F.SilkS)) + (pad 1 thru_hole rect (at 47.625 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 301 GND)) + (pad 2 thru_hole circle (at 46.355 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 51 /RAMS/TVRAM0)) + (pad 3 thru_hole circle (at 45.085 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 59 /RAMS/TVRAM16)) + (pad 4 thru_hole circle (at 43.815 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 52 /RAMS/TVRAM1)) + (pad 5 thru_hole circle (at 42.545 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 60 /RAMS/TVRAM17)) + (pad 6 thru_hole circle (at 41.275 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 63 /RAMS/TVRAM2)) + (pad 7 thru_hole circle (at 40.005 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 61 /RAMS/TVRAM18)) + (pad 8 thru_hole circle (at 38.735 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 74 /RAMS/TVRAM3)) + (pad 9 thru_hole circle (at 37.465 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 62 /RAMS/TVRAM19)) + (pad 10 thru_hole circle (at 36.195 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 4 +5V)) + (pad 11 thru_hole circle (at 34.925 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 12 thru_hole circle (at 33.655 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 38 /RAMS/MXA0)) + (pad 13 thru_hole circle (at 32.385 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 39 /RAMS/MXA1)) + (pad 14 thru_hole circle (at 31.115 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 41 /RAMS/MXA2)) + (pad 15 thru_hole circle (at 29.845 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 42 /RAMS/MXA3)) + (pad 16 thru_hole circle (at 28.575 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 43 /RAMS/MXA4)) + (pad 17 thru_hole circle (at 27.305 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 44 /RAMS/MXA5)) + (pad 18 thru_hole circle (at 26.035 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 45 /RAMS/MXA6)) + (pad 19 thru_hole circle (at 24.765 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 40 /RAMS/MXA10)) + (pad 20 thru_hole circle (at 23.495 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 77 /RAMS/TVRAM4)) + (pad 21 thru_hole circle (at 22.225 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 64 /RAMS/TVRAM20)) + (pad 22 thru_hole circle (at 20.955 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 78 /RAMS/TVRAM5)) + (pad 23 thru_hole circle (at 19.685 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 65 /RAMS/TVRAM21)) + (pad 24 thru_hole circle (at 18.415 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 79 /RAMS/TVRAM6)) + (pad 25 thru_hole circle (at 17.145 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 66 /RAMS/TVRAM22)) + (pad 26 thru_hole circle (at 15.875 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 80 /RAMS/TVRAM7)) + (pad 27 thru_hole circle (at 14.605 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 67 /RAMS/TVRAM23)) + (pad 28 thru_hole circle (at 13.335 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 46 /RAMS/MXA7)) + (pad 29 thru_hole circle (at 12.065 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 30 thru_hole circle (at 10.795 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 4 +5V)) + (pad 31 thru_hole circle (at 9.525 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 47 /RAMS/MXA8)) + (pad 32 thru_hole circle (at 8.255 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 48 /RAMS/MXA9)) + (pad 33 thru_hole circle (at 6.985 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 34 thru_hole circle (at 5.715 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 223 /graphic/RAS2-)) + (pad 35 thru_hole circle (at 4.445 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 36 thru_hole circle (at 3.175 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 37 thru_hole circle (at -3.175 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 38 thru_hole circle (at -4.445 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 39 thru_hole circle (at -5.715 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 301 GND)) + (pad 40 thru_hole circle (at -6.985 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 35 /RAMS/CAS0-)) + (pad 41 thru_hole circle (at -8.255 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 180 /graphic/CAS1-)) + (pad 42 thru_hole circle (at -9.525 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 36 /RAMS/CAS2-)) + (pad 43 thru_hole circle (at -10.795 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 37 /RAMS/CAS3-)) + (pad 44 thru_hole circle (at -12.065 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 223 /graphic/RAS2-)) + (pad 45 thru_hole circle (at -13.335 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 46 thru_hole circle (at -14.605 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 47 thru_hole circle (at -15.875 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 83 /RAMS/WRAM-)) + (pad 48 thru_hole circle (at -17.145 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 49 thru_hole circle (at -18.415 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 81 /RAMS/TVRAM8)) + (pad 50 thru_hole circle (at -19.685 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 68 /RAMS/TVRAM24)) + (pad 51 thru_hole circle (at -20.955 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 82 /RAMS/TVRAM9)) + (pad 52 thru_hole circle (at -22.225 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 69 /RAMS/TVRAM25)) + (pad 53 thru_hole circle (at -23.495 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 53 /RAMS/TVRAM10)) + (pad 54 thru_hole circle (at -24.765 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 70 /RAMS/TVRAM26)) + (pad 55 thru_hole circle (at -26.035 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 54 /RAMS/TVRAM11)) + (pad 56 thru_hole circle (at -27.305 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 71 /RAMS/TVRAM27)) + (pad 57 thru_hole circle (at -28.575 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 55 /RAMS/TVRAM12)) + (pad 58 thru_hole circle (at -29.845 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 72 /RAMS/TVRAM28)) + (pad 59 thru_hole circle (at -31.115 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 4 +5V)) + (pad 60 thru_hole circle (at -32.385 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 73 /RAMS/TVRAM29)) + (pad 61 thru_hole circle (at -33.655 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 56 /RAMS/TVRAM13)) + (pad 62 thru_hole circle (at -34.925 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 75 /RAMS/TVRAM30)) + (pad 63 thru_hole circle (at -36.195 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 57 /RAMS/TVRAM14)) + (pad 64 thru_hole circle (at -37.465 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 76 /RAMS/TVRAM31)) + (pad 65 thru_hole circle (at -38.735 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 58 /RAMS/TVRAM15)) + (pad 66 thru_hole circle (at -40.005 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 67 thru_hole circle (at -41.275 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 68 thru_hole circle (at -42.545 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 69 thru_hole circle (at -43.815 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 70 thru_hole circle (at -45.085 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 71 thru_hole circle (at -46.355 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 72 thru_hole circle (at -47.625 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 301 GND)) ) (module SIM72 (layer Composant) (tedit 200000) (tstamp 32FA1E5B) @@ -4231,299 +2858,149 @@ (descr "Support 72 pins pour barettes SIMM 32 bits") (tags SIMM) (path /4BF03685/4BF036D0) - (fp_text reference U16 (at -18.542 -3.302) (layer Dessus.SilkS) + (fp_text reference U16 (at -18.542 -3.302) (layer F.SilkS) (effects (font (size 2.032 2.032) (thickness 0.3048))) ) - (fp_text value SIM4X32 (at 11.176 -3.302) (layer Dessus.SilkS) + (fp_text value SIM4X32 (at 11.176 -3.302) (layer F.SilkS) (effects (font (size 2.032 2.032) (thickness 0.3048))) ) - (fp_line (start 57.785 -4.445) (end -57.785 -4.445) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -57.785 -4.445) (end -57.785 3.175) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -57.785 3.175) (end 57.785 3.175) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 57.785 3.175) (end 57.785 -4.445) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 46.99 3.175) (end 47.625 1.905) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 47.625 1.905) (end 48.26 3.175) (layer Dessus.SilkS) (width 0.3048)) - (pad "" thru_hole circle (at 0 0) (size 3.048 3.048) (drill 2.54) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole circle (at -55.88 0) (size 3.048 3.048) (drill 2.54) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole circle (at 55.88 0) (size 3.048 3.048) (drill 2.54) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 1 thru_hole rect (at 47.625 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 301 GND) - ) - (pad 2 thru_hole circle (at 46.355 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 51 /RAMS/TVRAM0) - ) - (pad 3 thru_hole circle (at 45.085 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 59 /RAMS/TVRAM16) - ) - (pad 4 thru_hole circle (at 43.815 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 52 /RAMS/TVRAM1) - ) - (pad 5 thru_hole circle (at 42.545 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 60 /RAMS/TVRAM17) - ) - (pad 6 thru_hole circle (at 41.275 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 63 /RAMS/TVRAM2) - ) - (pad 7 thru_hole circle (at 40.005 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 61 /RAMS/TVRAM18) - ) - (pad 8 thru_hole circle (at 38.735 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 74 /RAMS/TVRAM3) - ) - (pad 9 thru_hole circle (at 37.465 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 62 /RAMS/TVRAM19) - ) - (pad 10 thru_hole circle (at 36.195 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 4 +5V) - ) - (pad 11 thru_hole circle (at 34.925 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 12 thru_hole circle (at 33.655 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 38 /RAMS/MXA0) - ) - (pad 13 thru_hole circle (at 32.385 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 39 /RAMS/MXA1) - ) - (pad 14 thru_hole circle (at 31.115 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 41 /RAMS/MXA2) - ) - (pad 15 thru_hole circle (at 29.845 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 42 /RAMS/MXA3) - ) - (pad 16 thru_hole circle (at 28.575 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 43 /RAMS/MXA4) - ) - (pad 17 thru_hole circle (at 27.305 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 44 /RAMS/MXA5) - ) - (pad 18 thru_hole circle (at 26.035 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 45 /RAMS/MXA6) - ) - (pad 19 thru_hole circle (at 24.765 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 40 /RAMS/MXA10) - ) - (pad 20 thru_hole circle (at 23.495 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 77 /RAMS/TVRAM4) - ) - (pad 21 thru_hole circle (at 22.225 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 64 /RAMS/TVRAM20) - ) - (pad 22 thru_hole circle (at 20.955 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 78 /RAMS/TVRAM5) - ) - (pad 23 thru_hole circle (at 19.685 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 65 /RAMS/TVRAM21) - ) - (pad 24 thru_hole circle (at 18.415 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 79 /RAMS/TVRAM6) - ) - (pad 25 thru_hole circle (at 17.145 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 66 /RAMS/TVRAM22) - ) - (pad 26 thru_hole circle (at 15.875 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 80 /RAMS/TVRAM7) - ) - (pad 27 thru_hole circle (at 14.605 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 67 /RAMS/TVRAM23) - ) - (pad 28 thru_hole circle (at 13.335 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 46 /RAMS/MXA7) - ) - (pad 29 thru_hole circle (at 12.065 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 30 thru_hole circle (at 10.795 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 4 +5V) - ) - (pad 31 thru_hole circle (at 9.525 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 47 /RAMS/MXA8) - ) - (pad 32 thru_hole circle (at 8.255 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 48 /RAMS/MXA9) - ) - (pad 33 thru_hole circle (at 6.985 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 34 thru_hole circle (at 5.715 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 224 /graphic/RAS4-) - ) - (pad 35 thru_hole circle (at 4.445 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 36 thru_hole circle (at 3.175 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 37 thru_hole circle (at -3.175 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 38 thru_hole circle (at -4.445 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 39 thru_hole circle (at -5.715 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 301 GND) - ) - (pad 40 thru_hole circle (at -6.985 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 35 /RAMS/CAS0-) - ) - (pad 41 thru_hole circle (at -8.255 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 180 /graphic/CAS1-) - ) - (pad 42 thru_hole circle (at -9.525 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 36 /RAMS/CAS2-) - ) - (pad 43 thru_hole circle (at -10.795 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 37 /RAMS/CAS3-) - ) - (pad 44 thru_hole circle (at -12.065 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 224 /graphic/RAS4-) - ) - (pad 45 thru_hole circle (at -13.335 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 46 thru_hole circle (at -14.605 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 47 thru_hole circle (at -15.875 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 83 /RAMS/WRAM-) - ) - (pad 48 thru_hole circle (at -17.145 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 49 thru_hole circle (at -18.415 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 81 /RAMS/TVRAM8) - ) - (pad 50 thru_hole circle (at -19.685 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 68 /RAMS/TVRAM24) - ) - (pad 51 thru_hole circle (at -20.955 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 82 /RAMS/TVRAM9) - ) - (pad 52 thru_hole circle (at -22.225 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 69 /RAMS/TVRAM25) - ) - (pad 53 thru_hole circle (at -23.495 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 53 /RAMS/TVRAM10) - ) - (pad 54 thru_hole circle (at -24.765 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 70 /RAMS/TVRAM26) - ) - (pad 55 thru_hole circle (at -26.035 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 54 /RAMS/TVRAM11) - ) - (pad 56 thru_hole circle (at -27.305 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 71 /RAMS/TVRAM27) - ) - (pad 57 thru_hole circle (at -28.575 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 55 /RAMS/TVRAM12) - ) - (pad 58 thru_hole circle (at -29.845 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 72 /RAMS/TVRAM28) - ) - (pad 59 thru_hole circle (at -31.115 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 4 +5V) - ) - (pad 60 thru_hole circle (at -32.385 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 73 /RAMS/TVRAM29) - ) - (pad 61 thru_hole circle (at -33.655 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 56 /RAMS/TVRAM13) - ) - (pad 62 thru_hole circle (at -34.925 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 75 /RAMS/TVRAM30) - ) - (pad 63 thru_hole circle (at -36.195 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 57 /RAMS/TVRAM14) - ) - (pad 64 thru_hole circle (at -37.465 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 76 /RAMS/TVRAM31) - ) - (pad 65 thru_hole circle (at -38.735 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 58 /RAMS/TVRAM15) - ) - (pad 66 thru_hole circle (at -40.005 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 67 thru_hole circle (at -41.275 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 68 thru_hole circle (at -42.545 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 69 thru_hole circle (at -43.815 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 70 thru_hole circle (at -45.085 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 71 thru_hole circle (at -46.355 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 72 thru_hole circle (at -47.625 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 301 GND) - ) + (fp_line (start 57.785 -4.445) (end -57.785 -4.445) (layer F.SilkS) (width 0.3048)) + (fp_line (start -57.785 -4.445) (end -57.785 3.175) (layer F.SilkS) (width 0.3048)) + (fp_line (start -57.785 3.175) (end 57.785 3.175) (layer F.SilkS) (width 0.3048)) + (fp_line (start 57.785 3.175) (end 57.785 -4.445) (layer F.SilkS) (width 0.3048)) + (fp_line (start 46.99 3.175) (end 47.625 1.905) (layer F.SilkS) (width 0.3048)) + (fp_line (start 47.625 1.905) (end 48.26 3.175) (layer F.SilkS) (width 0.3048)) + (pad "" thru_hole circle (at 0 0) (size 3.048 3.048) (drill 2.54) (layers *.Cu *.Mask F.SilkS)) + (pad "" thru_hole circle (at -55.88 0) (size 3.048 3.048) (drill 2.54) (layers *.Cu *.Mask F.SilkS)) + (pad "" thru_hole circle (at 55.88 0) (size 3.048 3.048) (drill 2.54) (layers *.Cu *.Mask F.SilkS)) + (pad 1 thru_hole rect (at 47.625 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 301 GND)) + (pad 2 thru_hole circle (at 46.355 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 51 /RAMS/TVRAM0)) + (pad 3 thru_hole circle (at 45.085 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 59 /RAMS/TVRAM16)) + (pad 4 thru_hole circle (at 43.815 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 52 /RAMS/TVRAM1)) + (pad 5 thru_hole circle (at 42.545 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 60 /RAMS/TVRAM17)) + (pad 6 thru_hole circle (at 41.275 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 63 /RAMS/TVRAM2)) + (pad 7 thru_hole circle (at 40.005 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 61 /RAMS/TVRAM18)) + (pad 8 thru_hole circle (at 38.735 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 74 /RAMS/TVRAM3)) + (pad 9 thru_hole circle (at 37.465 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 62 /RAMS/TVRAM19)) + (pad 10 thru_hole circle (at 36.195 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 4 +5V)) + (pad 11 thru_hole circle (at 34.925 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 12 thru_hole circle (at 33.655 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 38 /RAMS/MXA0)) + (pad 13 thru_hole circle (at 32.385 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 39 /RAMS/MXA1)) + (pad 14 thru_hole circle (at 31.115 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 41 /RAMS/MXA2)) + (pad 15 thru_hole circle (at 29.845 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 42 /RAMS/MXA3)) + (pad 16 thru_hole circle (at 28.575 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 43 /RAMS/MXA4)) + (pad 17 thru_hole circle (at 27.305 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 44 /RAMS/MXA5)) + (pad 18 thru_hole circle (at 26.035 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 45 /RAMS/MXA6)) + (pad 19 thru_hole circle (at 24.765 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 40 /RAMS/MXA10)) + (pad 20 thru_hole circle (at 23.495 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 77 /RAMS/TVRAM4)) + (pad 21 thru_hole circle (at 22.225 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 64 /RAMS/TVRAM20)) + (pad 22 thru_hole circle (at 20.955 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 78 /RAMS/TVRAM5)) + (pad 23 thru_hole circle (at 19.685 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 65 /RAMS/TVRAM21)) + (pad 24 thru_hole circle (at 18.415 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 79 /RAMS/TVRAM6)) + (pad 25 thru_hole circle (at 17.145 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 66 /RAMS/TVRAM22)) + (pad 26 thru_hole circle (at 15.875 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 80 /RAMS/TVRAM7)) + (pad 27 thru_hole circle (at 14.605 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 67 /RAMS/TVRAM23)) + (pad 28 thru_hole circle (at 13.335 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 46 /RAMS/MXA7)) + (pad 29 thru_hole circle (at 12.065 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 30 thru_hole circle (at 10.795 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 4 +5V)) + (pad 31 thru_hole circle (at 9.525 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 47 /RAMS/MXA8)) + (pad 32 thru_hole circle (at 8.255 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 48 /RAMS/MXA9)) + (pad 33 thru_hole circle (at 6.985 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 34 thru_hole circle (at 5.715 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 224 /graphic/RAS4-)) + (pad 35 thru_hole circle (at 4.445 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 36 thru_hole circle (at 3.175 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 37 thru_hole circle (at -3.175 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 38 thru_hole circle (at -4.445 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 39 thru_hole circle (at -5.715 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 301 GND)) + (pad 40 thru_hole circle (at -6.985 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 35 /RAMS/CAS0-)) + (pad 41 thru_hole circle (at -8.255 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 180 /graphic/CAS1-)) + (pad 42 thru_hole circle (at -9.525 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 36 /RAMS/CAS2-)) + (pad 43 thru_hole circle (at -10.795 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 37 /RAMS/CAS3-)) + (pad 44 thru_hole circle (at -12.065 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 224 /graphic/RAS4-)) + (pad 45 thru_hole circle (at -13.335 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 46 thru_hole circle (at -14.605 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 47 thru_hole circle (at -15.875 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 83 /RAMS/WRAM-)) + (pad 48 thru_hole circle (at -17.145 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 49 thru_hole circle (at -18.415 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 81 /RAMS/TVRAM8)) + (pad 50 thru_hole circle (at -19.685 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 68 /RAMS/TVRAM24)) + (pad 51 thru_hole circle (at -20.955 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 82 /RAMS/TVRAM9)) + (pad 52 thru_hole circle (at -22.225 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 69 /RAMS/TVRAM25)) + (pad 53 thru_hole circle (at -23.495 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 53 /RAMS/TVRAM10)) + (pad 54 thru_hole circle (at -24.765 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 70 /RAMS/TVRAM26)) + (pad 55 thru_hole circle (at -26.035 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 54 /RAMS/TVRAM11)) + (pad 56 thru_hole circle (at -27.305 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 71 /RAMS/TVRAM27)) + (pad 57 thru_hole circle (at -28.575 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 55 /RAMS/TVRAM12)) + (pad 58 thru_hole circle (at -29.845 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 72 /RAMS/TVRAM28)) + (pad 59 thru_hole circle (at -31.115 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 4 +5V)) + (pad 60 thru_hole circle (at -32.385 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 73 /RAMS/TVRAM29)) + (pad 61 thru_hole circle (at -33.655 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 56 /RAMS/TVRAM13)) + (pad 62 thru_hole circle (at -34.925 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 75 /RAMS/TVRAM30)) + (pad 63 thru_hole circle (at -36.195 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 57 /RAMS/TVRAM14)) + (pad 64 thru_hole circle (at -37.465 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 76 /RAMS/TVRAM31)) + (pad 65 thru_hole circle (at -38.735 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 58 /RAMS/TVRAM15)) + (pad 66 thru_hole circle (at -40.005 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 67 thru_hole circle (at -41.275 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 68 thru_hole circle (at -42.545 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 69 thru_hole circle (at -43.815 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 70 thru_hole circle (at -45.085 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 71 thru_hole circle (at -46.355 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 72 thru_hole circle (at -47.625 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 301 GND)) ) (module SIM72 (layer Composant) (tedit 200000) (tstamp 32FA1E5B) @@ -4531,299 +3008,149 @@ (descr "Support 72 pins pour barettes SIMM 32 bits") (tags SIMM) (path /4BF03685/32FA1E5B) - (fp_text reference U13 (at -18.542 -3.302) (layer Dessus.SilkS) + (fp_text reference U13 (at -18.542 -3.302) (layer F.SilkS) (effects (font (size 2.032 2.032) (thickness 0.3048))) ) - (fp_text value SIM4X32 (at 11.176 -3.302) (layer Dessus.SilkS) + (fp_text value SIM4X32 (at 11.176 -3.302) (layer F.SilkS) (effects (font (size 2.032 2.032) (thickness 0.3048))) ) - (fp_line (start 57.785 -4.445) (end -57.785 -4.445) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -57.785 -4.445) (end -57.785 3.175) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -57.785 3.175) (end 57.785 3.175) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 57.785 3.175) (end 57.785 -4.445) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 46.99 3.175) (end 47.625 1.905) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 47.625 1.905) (end 48.26 3.175) (layer Dessus.SilkS) (width 0.3048)) - (pad "" thru_hole circle (at 0 0) (size 3.048 3.048) (drill 2.54) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole circle (at -55.88 0) (size 3.048 3.048) (drill 2.54) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole circle (at 55.88 0) (size 3.048 3.048) (drill 2.54) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 1 thru_hole rect (at 47.625 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 301 GND) - ) - (pad 2 thru_hole circle (at 46.355 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 51 /RAMS/TVRAM0) - ) - (pad 3 thru_hole circle (at 45.085 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 59 /RAMS/TVRAM16) - ) - (pad 4 thru_hole circle (at 43.815 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 52 /RAMS/TVRAM1) - ) - (pad 5 thru_hole circle (at 42.545 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 60 /RAMS/TVRAM17) - ) - (pad 6 thru_hole circle (at 41.275 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 63 /RAMS/TVRAM2) - ) - (pad 7 thru_hole circle (at 40.005 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 61 /RAMS/TVRAM18) - ) - (pad 8 thru_hole circle (at 38.735 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 74 /RAMS/TVRAM3) - ) - (pad 9 thru_hole circle (at 37.465 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 62 /RAMS/TVRAM19) - ) - (pad 10 thru_hole circle (at 36.195 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 4 +5V) - ) - (pad 11 thru_hole circle (at 34.925 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 12 thru_hole circle (at 33.655 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 38 /RAMS/MXA0) - ) - (pad 13 thru_hole circle (at 32.385 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 39 /RAMS/MXA1) - ) - (pad 14 thru_hole circle (at 31.115 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 41 /RAMS/MXA2) - ) - (pad 15 thru_hole circle (at 29.845 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 42 /RAMS/MXA3) - ) - (pad 16 thru_hole circle (at 28.575 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 43 /RAMS/MXA4) - ) - (pad 17 thru_hole circle (at 27.305 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 44 /RAMS/MXA5) - ) - (pad 18 thru_hole circle (at 26.035 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 45 /RAMS/MXA6) - ) - (pad 19 thru_hole circle (at 24.765 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 40 /RAMS/MXA10) - ) - (pad 20 thru_hole circle (at 23.495 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 77 /RAMS/TVRAM4) - ) - (pad 21 thru_hole circle (at 22.225 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 64 /RAMS/TVRAM20) - ) - (pad 22 thru_hole circle (at 20.955 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 78 /RAMS/TVRAM5) - ) - (pad 23 thru_hole circle (at 19.685 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 65 /RAMS/TVRAM21) - ) - (pad 24 thru_hole circle (at 18.415 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 79 /RAMS/TVRAM6) - ) - (pad 25 thru_hole circle (at 17.145 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 66 /RAMS/TVRAM22) - ) - (pad 26 thru_hole circle (at 15.875 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 80 /RAMS/TVRAM7) - ) - (pad 27 thru_hole circle (at 14.605 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 67 /RAMS/TVRAM23) - ) - (pad 28 thru_hole circle (at 13.335 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 46 /RAMS/MXA7) - ) - (pad 29 thru_hole circle (at 12.065 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 30 thru_hole circle (at 10.795 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 4 +5V) - ) - (pad 31 thru_hole circle (at 9.525 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 47 /RAMS/MXA8) - ) - (pad 32 thru_hole circle (at 8.255 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 48 /RAMS/MXA9) - ) - (pad 33 thru_hole circle (at 6.985 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 34 thru_hole circle (at 5.715 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 226 /graphic/RAS7-) - ) - (pad 35 thru_hole circle (at 4.445 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 36 thru_hole circle (at 3.175 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 37 thru_hole circle (at -3.175 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 38 thru_hole circle (at -4.445 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 39 thru_hole circle (at -5.715 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 301 GND) - ) - (pad 40 thru_hole circle (at -6.985 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 35 /RAMS/CAS0-) - ) - (pad 41 thru_hole circle (at -8.255 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 180 /graphic/CAS1-) - ) - (pad 42 thru_hole circle (at -9.525 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 36 /RAMS/CAS2-) - ) - (pad 43 thru_hole circle (at -10.795 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 37 /RAMS/CAS3-) - ) - (pad 44 thru_hole circle (at -12.065 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 226 /graphic/RAS7-) - ) - (pad 45 thru_hole circle (at -13.335 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 46 thru_hole circle (at -14.605 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 47 thru_hole circle (at -15.875 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 83 /RAMS/WRAM-) - ) - (pad 48 thru_hole circle (at -17.145 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 49 thru_hole circle (at -18.415 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 81 /RAMS/TVRAM8) - ) - (pad 50 thru_hole circle (at -19.685 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 68 /RAMS/TVRAM24) - ) - (pad 51 thru_hole circle (at -20.955 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 82 /RAMS/TVRAM9) - ) - (pad 52 thru_hole circle (at -22.225 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 69 /RAMS/TVRAM25) - ) - (pad 53 thru_hole circle (at -23.495 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 53 /RAMS/TVRAM10) - ) - (pad 54 thru_hole circle (at -24.765 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 70 /RAMS/TVRAM26) - ) - (pad 55 thru_hole circle (at -26.035 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 54 /RAMS/TVRAM11) - ) - (pad 56 thru_hole circle (at -27.305 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 71 /RAMS/TVRAM27) - ) - (pad 57 thru_hole circle (at -28.575 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 55 /RAMS/TVRAM12) - ) - (pad 58 thru_hole circle (at -29.845 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 72 /RAMS/TVRAM28) - ) - (pad 59 thru_hole circle (at -31.115 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 4 +5V) - ) - (pad 60 thru_hole circle (at -32.385 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 73 /RAMS/TVRAM29) - ) - (pad 61 thru_hole circle (at -33.655 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 56 /RAMS/TVRAM13) - ) - (pad 62 thru_hole circle (at -34.925 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 75 /RAMS/TVRAM30) - ) - (pad 63 thru_hole circle (at -36.195 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 57 /RAMS/TVRAM14) - ) - (pad 64 thru_hole circle (at -37.465 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 76 /RAMS/TVRAM31) - ) - (pad 65 thru_hole circle (at -38.735 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 58 /RAMS/TVRAM15) - ) - (pad 66 thru_hole circle (at -40.005 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 67 thru_hole circle (at -41.275 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 68 thru_hole circle (at -42.545 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 69 thru_hole circle (at -43.815 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 70 thru_hole circle (at -45.085 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 71 thru_hole circle (at -46.355 1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - ) - (pad 72 thru_hole circle (at -47.625 -1.27) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.SilkS *.Mask) - (net 301 GND) - ) + (fp_line (start 57.785 -4.445) (end -57.785 -4.445) (layer F.SilkS) (width 0.3048)) + (fp_line (start -57.785 -4.445) (end -57.785 3.175) (layer F.SilkS) (width 0.3048)) + (fp_line (start -57.785 3.175) (end 57.785 3.175) (layer F.SilkS) (width 0.3048)) + (fp_line (start 57.785 3.175) (end 57.785 -4.445) (layer F.SilkS) (width 0.3048)) + (fp_line (start 46.99 3.175) (end 47.625 1.905) (layer F.SilkS) (width 0.3048)) + (fp_line (start 47.625 1.905) (end 48.26 3.175) (layer F.SilkS) (width 0.3048)) + (pad "" thru_hole circle (at 0 0) (size 3.048 3.048) (drill 2.54) (layers *.Cu *.Mask F.SilkS)) + (pad "" thru_hole circle (at -55.88 0) (size 3.048 3.048) (drill 2.54) (layers *.Cu *.Mask F.SilkS)) + (pad "" thru_hole circle (at 55.88 0) (size 3.048 3.048) (drill 2.54) (layers *.Cu *.Mask F.SilkS)) + (pad 1 thru_hole rect (at 47.625 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 301 GND)) + (pad 2 thru_hole circle (at 46.355 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 51 /RAMS/TVRAM0)) + (pad 3 thru_hole circle (at 45.085 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 59 /RAMS/TVRAM16)) + (pad 4 thru_hole circle (at 43.815 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 52 /RAMS/TVRAM1)) + (pad 5 thru_hole circle (at 42.545 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 60 /RAMS/TVRAM17)) + (pad 6 thru_hole circle (at 41.275 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 63 /RAMS/TVRAM2)) + (pad 7 thru_hole circle (at 40.005 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 61 /RAMS/TVRAM18)) + (pad 8 thru_hole circle (at 38.735 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 74 /RAMS/TVRAM3)) + (pad 9 thru_hole circle (at 37.465 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 62 /RAMS/TVRAM19)) + (pad 10 thru_hole circle (at 36.195 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 4 +5V)) + (pad 11 thru_hole circle (at 34.925 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 12 thru_hole circle (at 33.655 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 38 /RAMS/MXA0)) + (pad 13 thru_hole circle (at 32.385 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 39 /RAMS/MXA1)) + (pad 14 thru_hole circle (at 31.115 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 41 /RAMS/MXA2)) + (pad 15 thru_hole circle (at 29.845 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 42 /RAMS/MXA3)) + (pad 16 thru_hole circle (at 28.575 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 43 /RAMS/MXA4)) + (pad 17 thru_hole circle (at 27.305 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 44 /RAMS/MXA5)) + (pad 18 thru_hole circle (at 26.035 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 45 /RAMS/MXA6)) + (pad 19 thru_hole circle (at 24.765 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 40 /RAMS/MXA10)) + (pad 20 thru_hole circle (at 23.495 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 77 /RAMS/TVRAM4)) + (pad 21 thru_hole circle (at 22.225 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 64 /RAMS/TVRAM20)) + (pad 22 thru_hole circle (at 20.955 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 78 /RAMS/TVRAM5)) + (pad 23 thru_hole circle (at 19.685 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 65 /RAMS/TVRAM21)) + (pad 24 thru_hole circle (at 18.415 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 79 /RAMS/TVRAM6)) + (pad 25 thru_hole circle (at 17.145 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 66 /RAMS/TVRAM22)) + (pad 26 thru_hole circle (at 15.875 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 80 /RAMS/TVRAM7)) + (pad 27 thru_hole circle (at 14.605 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 67 /RAMS/TVRAM23)) + (pad 28 thru_hole circle (at 13.335 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 46 /RAMS/MXA7)) + (pad 29 thru_hole circle (at 12.065 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 30 thru_hole circle (at 10.795 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 4 +5V)) + (pad 31 thru_hole circle (at 9.525 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 47 /RAMS/MXA8)) + (pad 32 thru_hole circle (at 8.255 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 48 /RAMS/MXA9)) + (pad 33 thru_hole circle (at 6.985 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 34 thru_hole circle (at 5.715 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 226 /graphic/RAS7-)) + (pad 35 thru_hole circle (at 4.445 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 36 thru_hole circle (at 3.175 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 37 thru_hole circle (at -3.175 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 38 thru_hole circle (at -4.445 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 39 thru_hole circle (at -5.715 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 301 GND)) + (pad 40 thru_hole circle (at -6.985 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 35 /RAMS/CAS0-)) + (pad 41 thru_hole circle (at -8.255 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 180 /graphic/CAS1-)) + (pad 42 thru_hole circle (at -9.525 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 36 /RAMS/CAS2-)) + (pad 43 thru_hole circle (at -10.795 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 37 /RAMS/CAS3-)) + (pad 44 thru_hole circle (at -12.065 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 226 /graphic/RAS7-)) + (pad 45 thru_hole circle (at -13.335 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 46 thru_hole circle (at -14.605 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 47 thru_hole circle (at -15.875 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 83 /RAMS/WRAM-)) + (pad 48 thru_hole circle (at -17.145 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 49 thru_hole circle (at -18.415 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 81 /RAMS/TVRAM8)) + (pad 50 thru_hole circle (at -19.685 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 68 /RAMS/TVRAM24)) + (pad 51 thru_hole circle (at -20.955 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 82 /RAMS/TVRAM9)) + (pad 52 thru_hole circle (at -22.225 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 69 /RAMS/TVRAM25)) + (pad 53 thru_hole circle (at -23.495 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 53 /RAMS/TVRAM10)) + (pad 54 thru_hole circle (at -24.765 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 70 /RAMS/TVRAM26)) + (pad 55 thru_hole circle (at -26.035 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 54 /RAMS/TVRAM11)) + (pad 56 thru_hole circle (at -27.305 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 71 /RAMS/TVRAM27)) + (pad 57 thru_hole circle (at -28.575 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 55 /RAMS/TVRAM12)) + (pad 58 thru_hole circle (at -29.845 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 72 /RAMS/TVRAM28)) + (pad 59 thru_hole circle (at -31.115 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 4 +5V)) + (pad 60 thru_hole circle (at -32.385 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 73 /RAMS/TVRAM29)) + (pad 61 thru_hole circle (at -33.655 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 56 /RAMS/TVRAM13)) + (pad 62 thru_hole circle (at -34.925 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 75 /RAMS/TVRAM30)) + (pad 63 thru_hole circle (at -36.195 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 57 /RAMS/TVRAM14)) + (pad 64 thru_hole circle (at -37.465 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 76 /RAMS/TVRAM31)) + (pad 65 thru_hole circle (at -38.735 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 58 /RAMS/TVRAM15)) + (pad 66 thru_hole circle (at -40.005 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 67 thru_hole circle (at -41.275 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 68 thru_hole circle (at -42.545 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 69 thru_hole circle (at -43.815 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 70 thru_hole circle (at -45.085 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 71 thru_hole circle (at -46.355 1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask)) + (pad 72 thru_hole circle (at -47.625 -1.27) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.SilkS *.Mask) + (net 301 GND)) ) (module SIL-2 (layer Composant) (tedit 200000) (tstamp 33A7E0C8) @@ -4831,24 +3158,20 @@ (descr "Connecteurs 2 pins") (tags "CONN DEV") (path /4BF03683/33A7E0C8) - (fp_text reference P4 (at 0 -2.54 90) (layer Dessus.SilkS) + (fp_text reference P4 (at 0 -2.54 90) (layer F.SilkS) (effects (font (size 1.72974 1.08712) (thickness 0.27178))) ) - (fp_text value CONN_2 (at 0 -2.54 90) (layer Dessus.SilkS) hide + (fp_text value CONN_2 (at 0 -2.54 90) (layer F.SilkS) hide (effects (font (size 1.524 1.016) (thickness 0.254))) ) - (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 1.27) (end -2.54 1.27) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at -1.27 0 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 348 N-000183) - ) - (pad 2 thru_hole circle (at 1.27 0 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) + (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 1.27) (end -2.54 1.27) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole rect (at -1.27 0 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 348 N-000183)) + (pad 2 thru_hole circle (at 1.27 0 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) ) (module POT_CMS (layer Composant) (tedit 3D638D33) (tstamp 2276109D) @@ -4857,31 +3180,25 @@ (tags "CMS POT") (path /4BF0367F/2276109D) (attr smd) - (fp_text reference POT1 (at 0 -0.88646) (layer Dessus.SilkS) + (fp_text reference POT1 (at 0 -0.88646) (layer F.SilkS) (effects (font (size 0.762 0.762) (thickness 0.127))) ) - (fp_text value 100K (at 0 0.635) (layer Dessus.SilkS) + (fp_text value 100K (at 0 0.635) (layer F.SilkS) (effects (font (size 0.762 0.762) (thickness 0.127))) ) - (fp_line (start -2.54 1.27) (end -2.54 3.556) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -2.54 3.556) (end 2.54 3.556) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.54 3.556) (end 2.54 1.27) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.778) (end -1.016 -3.556) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -1.016 -3.556) (end 1.016 -3.556) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 1.016 -3.556) (end 2.54 -1.778) (layer Dessus.SilkS) (width 0.127)) - (fp_circle (center 0 0) (end 0.254 -0.762) (layer Dessus.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.27 2.54) (size 1.27 1.524) - (layers Composant Dessus.Pate Dessus.Masque) - (net 310 N-000088) - ) - (pad 2 smd rect (at 0 -2.54) (size 1.27 1.524) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 3 smd rect (at 1.27 2.54) (size 1.27 1.524) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.27) (end -2.54 3.556) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 3.556) (end 2.54 3.556) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 3.556) (end 2.54 1.27) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.778) (end -1.016 -3.556) (layer F.SilkS) (width 0.127)) + (fp_line (start -1.016 -3.556) (end 1.016 -3.556) (layer F.SilkS) (width 0.127)) + (fp_line (start 1.016 -3.556) (end 2.54 -1.778) (layer F.SilkS) (width 0.127)) + (fp_circle (center 0 0) (end 0.254 -0.762) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.27 2.54) (size 1.27 1.524) (layers Composant F.Paste F.Mask) + (net 310 N-000088)) + (pad 2 smd rect (at 0 -2.54) (size 1.27 1.524) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 3 smd rect (at 1.27 2.54) (size 1.27 1.524) (layers Composant F.Paste F.Mask) + (net 301 GND)) ) (module PLCC84 (layer Composant) (tedit 200000) (tstamp 32F9E7F1) @@ -4889,352 +3206,184 @@ (descr "Support Plcc 84 pins, pads ronds") (tags PLCC) (path /4BF03689/32F9E7F1) - (fp_text reference U8 (at 0 -2.54 90) (layer Dessus.SilkS) + (fp_text reference U8 (at 0 -2.54 90) (layer F.SilkS) (effects (font (size 3.33756 1.94818) (thickness 0.3048))) ) - (fp_text value BT253 (at 0 3.81 90) (layer Dessus.SilkS) + (fp_text value BT253 (at 0 3.81 90) (layer F.SilkS) (effects (font (size 2.90576 1.69672) (thickness 0.3048))) ) - (fp_line (start -10.16 6.35) (end -7.62 10.16) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -7.62 10.16) (end 10.16 10.16) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 10.16 10.16) (end 10.16 -10.16) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 10.16 -10.16) (end -10.16 -10.16) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -16.51 -16.51) (end -16.51 16.51) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -16.51 16.51) (end 16.51 16.51) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 16.51 16.51) (end 16.51 -16.51) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 16.51 -16.51) (end -16.51 -16.51) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -10.16 -10.16) (end -10.16 6.35) (layer Dessus.SilkS) (width 0.381)) - (pad 1 thru_hole rect (at -15.24 0 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 34 /ESVIDEO-RVB/VAA) - ) - (pad 2 thru_hole circle (at -12.7 0 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 3 thru_hole circle (at -15.24 2.54 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 4 thru_hole circle (at -12.7 2.54 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 5 thru_hole circle (at -15.24 5.08 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 6 thru_hole circle (at -12.7 5.08 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 369 N-000361) - ) - (pad 7 thru_hole circle (at -15.24 7.62 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 358 N-000345) - ) - (pad 8 thru_hole circle (at -12.7 7.62 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 186 /graphic/CSYNCIN-) - ) - (pad 9 thru_hole circle (at -15.24 10.16 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 12 /ESVIDEO-RVB/DPC7) - ) - (pad 10 thru_hole circle (at -12.7 10.16 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 276 /muxdata/DPC6) - ) - (pad 11 thru_hole circle (at -15.24 12.7 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 11 /ESVIDEO-RVB/DPC5) - ) - (pad 12 thru_hole circle (at -12.7 15.24 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 10 /ESVIDEO-RVB/DPC4) - ) - (pad 13 thru_hole circle (at -12.7 12.7 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 273 /muxdata/DPC3) - ) - (pad 14 thru_hole circle (at -10.16 15.24 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 /ESVIDEO-RVB/DPC2) - ) - (pad 15 thru_hole circle (at -10.16 12.7 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 8 /ESVIDEO-RVB/DPC1) - ) - (pad 16 thru_hole circle (at -7.62 15.24 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 7 /ESVIDEO-RVB/DPC0) - ) - (pad 17 thru_hole circle (at -7.62 12.7 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 16 /ESVIDEO-RVB/PCA0) - ) - (pad 18 thru_hole circle (at -5.08 15.24 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 212 /graphic/PCA1) - ) - (pad 19 thru_hole circle (at -5.08 12.7 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 17 /ESVIDEO-RVB/PCA2) - ) - (pad 20 thru_hole circle (at -2.54 15.24 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 228 /graphic/RDCAD-) - ) - (pad 21 thru_hole circle (at -2.54 12.7 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 22 thru_hole circle (at 0 15.24 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 23 thru_hole circle (at 0 12.7 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 24 thru_hole circle (at 2.54 15.24 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 236 /graphic/WRCAD-) - ) - (pad 25 thru_hole circle (at 2.54 12.7 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 294 /pal-ntsc.sch/TVB7) - ) - (pad 26 thru_hole circle (at 5.08 15.24 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 293 /pal-ntsc.sch/TVB6) - ) - (pad 27 thru_hole circle (at 5.08 12.7 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 292 /pal-ntsc.sch/TVB5) - ) - (pad 28 thru_hole circle (at 7.62 15.24 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 281 /muxdata/TVB4) - ) - (pad 29 thru_hole circle (at 7.62 12.7 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 21 /ESVIDEO-RVB/TVB3) - ) - (pad 30 thru_hole circle (at 10.16 15.24 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 20 /ESVIDEO-RVB/TVB2) - ) - (pad 31 thru_hole circle (at 10.16 12.7 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 280 /muxdata/TVB1) - ) - (pad 32 thru_hole circle (at 12.7 15.24 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 279 /muxdata/TVB0) - ) - (pad 33 thru_hole circle (at 15.24 12.7 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 283 /muxdata/TVG7) - ) - (pad 34 thru_hole circle (at 12.7 12.7 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 282 /muxdata/TVG6) - ) - (pad 35 thru_hole circle (at 15.24 10.16 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 27 /ESVIDEO-RVB/TVG5) - ) - (pad 36 thru_hole circle (at 12.7 10.16 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 26 /ESVIDEO-RVB/TVG4) - ) - (pad 37 thru_hole circle (at 15.24 7.62 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 183 /graphic/CLAMP) - ) - (pad 38 thru_hole circle (at 12.7 7.62 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 179 /graphic/CADCLK) - ) - (pad 39 thru_hole circle (at 15.24 5.08 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 179 /graphic/CADCLK) - ) - (pad 40 thru_hole circle (at 12.7 5.08 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 179 /graphic/CADCLK) - ) - (pad 41 thru_hole circle (at 15.24 2.54 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 42 thru_hole circle (at 12.7 2.54 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 43 thru_hole circle (at 15.24 0 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 34 /ESVIDEO-RVB/VAA) - ) - (pad 44 thru_hole circle (at 12.7 0 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 34 /ESVIDEO-RVB/VAA) - ) - (pad 45 thru_hole circle (at 15.24 -2.54 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 25 /ESVIDEO-RVB/TVG3) - ) - (pad 46 thru_hole circle (at 12.7 -2.54 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 24 /ESVIDEO-RVB/TVG2) - ) - (pad 47 thru_hole circle (at 15.24 -5.08 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 23 /ESVIDEO-RVB/TVG1) - ) - (pad 48 thru_hole circle (at 12.7 -5.08 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 22 /ESVIDEO-RVB/TVG0) - ) - (pad 49 thru_hole circle (at 15.24 -7.62 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 33 /ESVIDEO-RVB/TVR7) - ) - (pad 50 thru_hole circle (at 12.7 -7.62 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 32 /ESVIDEO-RVB/TVR6) - ) - (pad 51 thru_hole circle (at 15.24 -10.16 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 31 /ESVIDEO-RVB/TVR5) - ) - (pad 52 thru_hole circle (at 12.7 -10.16 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 296 /pal-ntsc.sch/TVR4) - ) - (pad 53 thru_hole circle (at 15.24 -12.7 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 295 /pal-ntsc.sch/TVR3) - ) - (pad 54 thru_hole circle (at 12.7 -15.24 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 30 /ESVIDEO-RVB/TVR2) - ) - (pad 55 thru_hole circle (at 12.7 -12.7 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 29 /ESVIDEO-RVB/TVR1) - ) - (pad 56 thru_hole circle (at 10.16 -15.24 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 28 /ESVIDEO-RVB/TVR0) - ) - (pad 57 thru_hole circle (at 10.16 -12.7 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 15 /ESVIDEO-RVB/OE_RVB-) - ) - (pad 58 thru_hole circle (at 7.62 -15.24 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 365 N-000353) - ) - (pad 59 thru_hole circle (at 7.62 -12.7 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 183 /graphic/CLAMP) - ) - (pad 60 thru_hole circle (at 5.08 -15.24 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 366 N-000355) - ) - (pad 61 thru_hole circle (at 5.08 -12.7 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 62 thru_hole circle (at 2.54 -15.24 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 367 N-000357) - ) - (pad 63 thru_hole circle (at 2.54 -12.7 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 64 thru_hole circle (at 0 -15.24 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 19 /ESVIDEO-RVB/REF+) - ) - (pad 65 thru_hole circle (at 0 -12.7 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 19 /ESVIDEO-RVB/REF+) - ) - (pad 66 thru_hole circle (at -2.54 -15.24 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 19 /ESVIDEO-RVB/REF+) - ) - (pad 67 thru_hole circle (at -2.54 -12.7 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 68 thru_hole circle (at -5.08 -15.24 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 365 N-000353) - ) - (pad 69 thru_hole circle (at -5.08 -12.7 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 368 N-000360) - ) - (pad 70 thru_hole circle (at -7.62 -15.24 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 366 N-000355) - ) - (pad 71 thru_hole circle (at -7.62 -12.7 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 19 /ESVIDEO-RVB/REF+) - ) - (pad 72 thru_hole circle (at -10.16 -15.24 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 367 N-000357) - ) - (pad 73 thru_hole circle (at -10.16 -12.7 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 19 /ESVIDEO-RVB/REF+) - ) - (pad 74 thru_hole circle (at -12.7 -15.24 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 75 thru_hole circle (at -15.24 -12.7 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 360 N-000347) - ) - (pad 76 thru_hole circle (at -12.7 -12.7 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 19 /ESVIDEO-RVB/REF+) - ) - (pad 77 thru_hole circle (at -15.24 -10.16 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 78 thru_hole circle (at -12.7 -10.16 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 19 /ESVIDEO-RVB/REF+) - ) - (pad 79 thru_hole circle (at -15.24 -7.62 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 362 N-000349) - ) - (pad 80 thru_hole circle (at -12.7 -7.62 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 19 /ESVIDEO-RVB/REF+) - ) - (pad 81 thru_hole circle (at -15.24 -5.08 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 82 thru_hole circle (at -12.7 -5.08 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 19 /ESVIDEO-RVB/REF+) - ) - (pad 83 thru_hole circle (at -15.24 -2.54 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 357 N-000343) - ) - (pad 84 thru_hole circle (at -12.7 -2.54 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 34 /ESVIDEO-RVB/VAA) - ) + (fp_line (start -10.16 6.35) (end -7.62 10.16) (layer F.SilkS) (width 0.381)) + (fp_line (start -7.62 10.16) (end 10.16 10.16) (layer F.SilkS) (width 0.381)) + (fp_line (start 10.16 10.16) (end 10.16 -10.16) (layer F.SilkS) (width 0.381)) + (fp_line (start 10.16 -10.16) (end -10.16 -10.16) (layer F.SilkS) (width 0.381)) + (fp_line (start -16.51 -16.51) (end -16.51 16.51) (layer F.SilkS) (width 0.381)) + (fp_line (start -16.51 16.51) (end 16.51 16.51) (layer F.SilkS) (width 0.381)) + (fp_line (start 16.51 16.51) (end 16.51 -16.51) (layer F.SilkS) (width 0.381)) + (fp_line (start 16.51 -16.51) (end -16.51 -16.51) (layer F.SilkS) (width 0.381)) + (fp_line (start -10.16 -10.16) (end -10.16 6.35) (layer F.SilkS) (width 0.381)) + (pad 1 thru_hole rect (at -15.24 0 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 34 /ESVIDEO-RVB/VAA)) + (pad 2 thru_hole circle (at -12.7 0 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 3 thru_hole circle (at -15.24 2.54 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 4 thru_hole circle (at -12.7 2.54 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS)) + (pad 5 thru_hole circle (at -15.24 5.08 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS)) + (pad 6 thru_hole circle (at -12.7 5.08 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 369 N-000361)) + (pad 7 thru_hole circle (at -15.24 7.62 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 358 N-000345)) + (pad 8 thru_hole circle (at -12.7 7.62 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 186 /graphic/CSYNCIN-)) + (pad 9 thru_hole circle (at -15.24 10.16 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 12 /ESVIDEO-RVB/DPC7)) + (pad 10 thru_hole circle (at -12.7 10.16 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 276 /muxdata/DPC6)) + (pad 11 thru_hole circle (at -15.24 12.7 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 11 /ESVIDEO-RVB/DPC5)) + (pad 12 thru_hole circle (at -12.7 15.24 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 10 /ESVIDEO-RVB/DPC4)) + (pad 13 thru_hole circle (at -12.7 12.7 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 273 /muxdata/DPC3)) + (pad 14 thru_hole circle (at -10.16 15.24 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 9 /ESVIDEO-RVB/DPC2)) + (pad 15 thru_hole circle (at -10.16 12.7 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 8 /ESVIDEO-RVB/DPC1)) + (pad 16 thru_hole circle (at -7.62 15.24 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 7 /ESVIDEO-RVB/DPC0)) + (pad 17 thru_hole circle (at -7.62 12.7 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 16 /ESVIDEO-RVB/PCA0)) + (pad 18 thru_hole circle (at -5.08 15.24 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 212 /graphic/PCA1)) + (pad 19 thru_hole circle (at -5.08 12.7 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 17 /ESVIDEO-RVB/PCA2)) + (pad 20 thru_hole circle (at -2.54 15.24 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 228 /graphic/RDCAD-)) + (pad 21 thru_hole circle (at -2.54 12.7 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 22 thru_hole circle (at 0 15.24 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 23 thru_hole circle (at 0 12.7 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 24 thru_hole circle (at 2.54 15.24 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 236 /graphic/WRCAD-)) + (pad 25 thru_hole circle (at 2.54 12.7 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 294 /pal-ntsc.sch/TVB7)) + (pad 26 thru_hole circle (at 5.08 15.24 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 293 /pal-ntsc.sch/TVB6)) + (pad 27 thru_hole circle (at 5.08 12.7 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 292 /pal-ntsc.sch/TVB5)) + (pad 28 thru_hole circle (at 7.62 15.24 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 281 /muxdata/TVB4)) + (pad 29 thru_hole circle (at 7.62 12.7 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 21 /ESVIDEO-RVB/TVB3)) + (pad 30 thru_hole circle (at 10.16 15.24 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 20 /ESVIDEO-RVB/TVB2)) + (pad 31 thru_hole circle (at 10.16 12.7 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 280 /muxdata/TVB1)) + (pad 32 thru_hole circle (at 12.7 15.24 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 279 /muxdata/TVB0)) + (pad 33 thru_hole circle (at 15.24 12.7 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 283 /muxdata/TVG7)) + (pad 34 thru_hole circle (at 12.7 12.7 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 282 /muxdata/TVG6)) + (pad 35 thru_hole circle (at 15.24 10.16 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 27 /ESVIDEO-RVB/TVG5)) + (pad 36 thru_hole circle (at 12.7 10.16 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 26 /ESVIDEO-RVB/TVG4)) + (pad 37 thru_hole circle (at 15.24 7.62 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 183 /graphic/CLAMP)) + (pad 38 thru_hole circle (at 12.7 7.62 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 179 /graphic/CADCLK)) + (pad 39 thru_hole circle (at 15.24 5.08 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 179 /graphic/CADCLK)) + (pad 40 thru_hole circle (at 12.7 5.08 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 179 /graphic/CADCLK)) + (pad 41 thru_hole circle (at 15.24 2.54 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 42 thru_hole circle (at 12.7 2.54 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 43 thru_hole circle (at 15.24 0 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 34 /ESVIDEO-RVB/VAA)) + (pad 44 thru_hole circle (at 12.7 0 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 34 /ESVIDEO-RVB/VAA)) + (pad 45 thru_hole circle (at 15.24 -2.54 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 25 /ESVIDEO-RVB/TVG3)) + (pad 46 thru_hole circle (at 12.7 -2.54 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 24 /ESVIDEO-RVB/TVG2)) + (pad 47 thru_hole circle (at 15.24 -5.08 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 23 /ESVIDEO-RVB/TVG1)) + (pad 48 thru_hole circle (at 12.7 -5.08 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 22 /ESVIDEO-RVB/TVG0)) + (pad 49 thru_hole circle (at 15.24 -7.62 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 33 /ESVIDEO-RVB/TVR7)) + (pad 50 thru_hole circle (at 12.7 -7.62 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 32 /ESVIDEO-RVB/TVR6)) + (pad 51 thru_hole circle (at 15.24 -10.16 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 31 /ESVIDEO-RVB/TVR5)) + (pad 52 thru_hole circle (at 12.7 -10.16 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 296 /pal-ntsc.sch/TVR4)) + (pad 53 thru_hole circle (at 15.24 -12.7 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 295 /pal-ntsc.sch/TVR3)) + (pad 54 thru_hole circle (at 12.7 -15.24 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 30 /ESVIDEO-RVB/TVR2)) + (pad 55 thru_hole circle (at 12.7 -12.7 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 29 /ESVIDEO-RVB/TVR1)) + (pad 56 thru_hole circle (at 10.16 -15.24 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 28 /ESVIDEO-RVB/TVR0)) + (pad 57 thru_hole circle (at 10.16 -12.7 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 15 /ESVIDEO-RVB/OE_RVB-)) + (pad 58 thru_hole circle (at 7.62 -15.24 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 365 N-000353)) + (pad 59 thru_hole circle (at 7.62 -12.7 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 183 /graphic/CLAMP)) + (pad 60 thru_hole circle (at 5.08 -15.24 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 366 N-000355)) + (pad 61 thru_hole circle (at 5.08 -12.7 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 62 thru_hole circle (at 2.54 -15.24 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 367 N-000357)) + (pad 63 thru_hole circle (at 2.54 -12.7 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 64 thru_hole circle (at 0 -15.24 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 19 /ESVIDEO-RVB/REF+)) + (pad 65 thru_hole circle (at 0 -12.7 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 19 /ESVIDEO-RVB/REF+)) + (pad 66 thru_hole circle (at -2.54 -15.24 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 19 /ESVIDEO-RVB/REF+)) + (pad 67 thru_hole circle (at -2.54 -12.7 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 68 thru_hole circle (at -5.08 -15.24 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 365 N-000353)) + (pad 69 thru_hole circle (at -5.08 -12.7 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 368 N-000360)) + (pad 70 thru_hole circle (at -7.62 -15.24 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 366 N-000355)) + (pad 71 thru_hole circle (at -7.62 -12.7 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 19 /ESVIDEO-RVB/REF+)) + (pad 72 thru_hole circle (at -10.16 -15.24 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 367 N-000357)) + (pad 73 thru_hole circle (at -10.16 -12.7 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 19 /ESVIDEO-RVB/REF+)) + (pad 74 thru_hole circle (at -12.7 -15.24 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS)) + (pad 75 thru_hole circle (at -15.24 -12.7 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 360 N-000347)) + (pad 76 thru_hole circle (at -12.7 -12.7 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 19 /ESVIDEO-RVB/REF+)) + (pad 77 thru_hole circle (at -15.24 -10.16 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS)) + (pad 78 thru_hole circle (at -12.7 -10.16 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 19 /ESVIDEO-RVB/REF+)) + (pad 79 thru_hole circle (at -15.24 -7.62 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 362 N-000349)) + (pad 80 thru_hole circle (at -12.7 -7.62 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 19 /ESVIDEO-RVB/REF+)) + (pad 81 thru_hole circle (at -15.24 -5.08 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS)) + (pad 82 thru_hole circle (at -12.7 -5.08 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 19 /ESVIDEO-RVB/REF+)) + (pad 83 thru_hole circle (at -15.24 -2.54 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 357 N-000343)) + (pad 84 thru_hole circle (at -12.7 -2.54 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 34 /ESVIDEO-RVB/VAA)) (model support/supp_plcc84.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -5247,289 +3396,153 @@ (descr "Support Plcc 68 pins, pads ronds") (tags PLCC) (path /4BF03689/32F9E902) - (fp_text reference U9 (at 0 -2.54 270) (layer Dessus.SilkS) + (fp_text reference U9 (at 0 -2.54 270) (layer F.SilkS) (effects (font (size 2.56794 1.50622) (thickness 0.3048))) ) - (fp_text value BT473 (at 0 2.54 270) (layer Dessus.SilkS) + (fp_text value BT473 (at 0 2.54 270) (layer F.SilkS) (effects (font (size 2.55778 1.48844) (thickness 0.3048))) ) - (fp_line (start -13.97 -13.97) (end 13.97 -13.97) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 13.97 -13.97) (end 13.97 13.97) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 13.97 13.97) (end -13.97 13.97) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -13.97 13.97) (end -13.97 -13.97) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -7.62 -7.62) (end 7.62 -7.62) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 7.62 -7.62) (end 7.62 7.62) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 7.62 7.62) (end -5.08 7.62) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -5.08 7.62) (end -7.62 5.08) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -7.62 5.08) (end -7.62 -7.62) (layer Dessus.SilkS) (width 0.381)) - (pad 1 thru_hole rect (at -12.7 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 34 /ESVIDEO-RVB/VAA) - ) - (pad 2 thru_hole circle (at -10.16 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 34 /ESVIDEO-RVB/VAA) - ) - (pad 3 thru_hole circle (at -12.7 2.54 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 4 thru_hole circle (at -10.16 2.54 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 5 thru_hole circle (at -12.7 5.08 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 6 thru_hole circle (at -10.16 5.08 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 7 thru_hole circle (at -12.7 7.62 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 176 /graphic/BLANK-) - ) - (pad 8 thru_hole circle (at -10.16 7.62 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 245 /modul/CSYNC-OUT) - ) - (pad 9 thru_hole circle (at -12.7 10.16 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 182 /graphic/CDACLK) - ) - (pad 10 thru_hole circle (at -10.16 12.7 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 232 /graphic/TVI0) - ) - (pad 11 thru_hole circle (at -10.16 10.16 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 233 /graphic/TVI1) - ) - (pad 12 thru_hole circle (at -7.62 12.7 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 13 thru_hole circle (at -7.62 10.16 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 14 thru_hole circle (at -5.08 12.7 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 7 /ESVIDEO-RVB/DPC0) - ) - (pad 15 thru_hole circle (at -5.08 10.16 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 8 /ESVIDEO-RVB/DPC1) - ) - (pad 16 thru_hole circle (at -2.54 12.7 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 /ESVIDEO-RVB/DPC2) - ) - (pad 17 thru_hole circle (at -2.54 10.16 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 273 /muxdata/DPC3) - ) - (pad 18 thru_hole circle (at 0 12.7 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 10 /ESVIDEO-RVB/DPC4) - ) - (pad 19 thru_hole circle (at 0 10.16 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 11 /ESVIDEO-RVB/DPC5) - ) - (pad 20 thru_hole circle (at 2.54 12.7 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 276 /muxdata/DPC6) - ) - (pad 21 thru_hole circle (at 2.54 10.16 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 12 /ESVIDEO-RVB/DPC7) - ) - (pad 22 thru_hole circle (at 5.08 12.7 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 18 /ESVIDEO-RVB/RDCDA-) - ) - (pad 23 thru_hole circle (at 5.08 10.16 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 237 /graphic/WRCDA-) - ) - (pad 24 thru_hole circle (at 7.62 12.7 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 16 /ESVIDEO-RVB/PCA0) - ) - (pad 25 thru_hole circle (at 7.62 10.16 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 212 /graphic/PCA1) - ) - (pad 26 thru_hole circle (at 10.16 12.7 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 17 /ESVIDEO-RVB/PCA2) - ) - (pad 27 thru_hole circle (at 12.7 10.16 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 28 thru_hole circle (at 10.16 10.16 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 289 /pal-ntsc.sch/OE_PAL-) - ) - (pad 29 thru_hole circle (at 12.7 7.62 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 15 /ESVIDEO-RVB/OE_RVB-) - ) - (pad 30 thru_hole circle (at 10.16 7.62 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 31 thru_hole circle (at 12.7 5.08 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 32 thru_hole circle (at 10.16 5.08 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 33 thru_hole circle (at 12.7 2.54 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 34 /ESVIDEO-RVB/VAA) - ) - (pad 34 thru_hole circle (at 10.16 2.54 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 34 /ESVIDEO-RVB/VAA) - ) - (pad 35 thru_hole circle (at 12.7 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 34 /ESVIDEO-RVB/VAA) - ) - (pad 36 thru_hole circle (at 10.16 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 34 /ESVIDEO-RVB/VAA) - ) - (pad 37 thru_hole circle (at 12.7 -2.54 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 242 /modul/BLEU) - ) - (pad 38 thru_hole circle (at 10.16 -2.54 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 13 /ESVIDEO-RVB/GREEN) - ) - (pad 39 thru_hole circle (at 12.7 -5.08 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 5 /ESVIDEO-RVB/BLUE) - ) - (pad 40 thru_hole circle (at 10.16 -5.08 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 372 N-000369) - ) - (pad 41 thru_hole circle (at 12.7 -7.62 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 371 N-000365) - ) - (pad 42 thru_hole circle (at 10.16 -7.62 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 371 N-000365) - ) - (pad 43 thru_hole circle (at 12.7 -10.16 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 370 N-000363) - ) - (pad 44 thru_hole circle (at 10.16 -12.7 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 370 N-000363) - ) - (pad 45 thru_hole circle (at 10.16 -10.16 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 28 /ESVIDEO-RVB/TVR0) - ) - (pad 46 thru_hole circle (at 7.62 -12.7 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 29 /ESVIDEO-RVB/TVR1) - ) - (pad 47 thru_hole circle (at 7.62 -10.16 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 30 /ESVIDEO-RVB/TVR2) - ) - (pad 48 thru_hole circle (at 5.08 -12.7 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 295 /pal-ntsc.sch/TVR3) - ) - (pad 49 thru_hole circle (at 5.08 -10.16 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 296 /pal-ntsc.sch/TVR4) - ) - (pad 50 thru_hole circle (at 2.54 -12.7 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 31 /ESVIDEO-RVB/TVR5) - ) - (pad 51 thru_hole circle (at 2.54 -10.16 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 32 /ESVIDEO-RVB/TVR6) - ) - (pad 52 thru_hole circle (at 0 -12.7 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 33 /ESVIDEO-RVB/TVR7) - ) - (pad 53 thru_hole circle (at 0 -10.16 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 22 /ESVIDEO-RVB/TVG0) - ) - (pad 54 thru_hole circle (at -2.54 -12.7 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 23 /ESVIDEO-RVB/TVG1) - ) - (pad 55 thru_hole circle (at -2.54 -10.16 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 24 /ESVIDEO-RVB/TVG2) - ) - (pad 56 thru_hole circle (at -5.08 -12.7 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 25 /ESVIDEO-RVB/TVG3) - ) - (pad 57 thru_hole circle (at -5.08 -10.16 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 26 /ESVIDEO-RVB/TVG4) - ) - (pad 58 thru_hole circle (at -7.62 -12.7 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 27 /ESVIDEO-RVB/TVG5) - ) - (pad 59 thru_hole circle (at -7.62 -10.16 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 282 /muxdata/TVG6) - ) - (pad 60 thru_hole circle (at -10.16 -12.7 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 283 /muxdata/TVG7) - ) - (pad 61 thru_hole circle (at -12.7 -10.16 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 279 /muxdata/TVB0) - ) - (pad 62 thru_hole circle (at -10.16 -10.16 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 280 /muxdata/TVB1) - ) - (pad 63 thru_hole circle (at -12.7 -7.62 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 20 /ESVIDEO-RVB/TVB2) - ) - (pad 64 thru_hole circle (at -10.16 -7.62 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 21 /ESVIDEO-RVB/TVB3) - ) - (pad 65 thru_hole circle (at -12.7 -5.08 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 281 /muxdata/TVB4) - ) - (pad 66 thru_hole circle (at -10.16 -5.08 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 292 /pal-ntsc.sch/TVB5) - ) - (pad 67 thru_hole circle (at -12.7 -2.54 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 293 /pal-ntsc.sch/TVB6) - ) - (pad 68 thru_hole circle (at -10.16 -2.54 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 294 /pal-ntsc.sch/TVB7) - ) + (fp_line (start -13.97 -13.97) (end 13.97 -13.97) (layer F.SilkS) (width 0.381)) + (fp_line (start 13.97 -13.97) (end 13.97 13.97) (layer F.SilkS) (width 0.381)) + (fp_line (start 13.97 13.97) (end -13.97 13.97) (layer F.SilkS) (width 0.381)) + (fp_line (start -13.97 13.97) (end -13.97 -13.97) (layer F.SilkS) (width 0.381)) + (fp_line (start -7.62 -7.62) (end 7.62 -7.62) (layer F.SilkS) (width 0.381)) + (fp_line (start 7.62 -7.62) (end 7.62 7.62) (layer F.SilkS) (width 0.381)) + (fp_line (start 7.62 7.62) (end -5.08 7.62) (layer F.SilkS) (width 0.381)) + (fp_line (start -5.08 7.62) (end -7.62 5.08) (layer F.SilkS) (width 0.381)) + (fp_line (start -7.62 5.08) (end -7.62 -7.62) (layer F.SilkS) (width 0.381)) + (pad 1 thru_hole rect (at -12.7 0 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 34 /ESVIDEO-RVB/VAA)) + (pad 2 thru_hole circle (at -10.16 0 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 34 /ESVIDEO-RVB/VAA)) + (pad 3 thru_hole circle (at -12.7 2.54 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 4 thru_hole circle (at -10.16 2.54 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 5 thru_hole circle (at -12.7 5.08 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS)) + (pad 6 thru_hole circle (at -10.16 5.08 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS)) + (pad 7 thru_hole circle (at -12.7 7.62 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 176 /graphic/BLANK-)) + (pad 8 thru_hole circle (at -10.16 7.62 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 245 /modul/CSYNC-OUT)) + (pad 9 thru_hole circle (at -12.7 10.16 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 182 /graphic/CDACLK)) + (pad 10 thru_hole circle (at -10.16 12.7 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 232 /graphic/TVI0)) + (pad 11 thru_hole circle (at -10.16 10.16 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 233 /graphic/TVI1)) + (pad 12 thru_hole circle (at -7.62 12.7 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 13 thru_hole circle (at -7.62 10.16 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 14 thru_hole circle (at -5.08 12.7 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 7 /ESVIDEO-RVB/DPC0)) + (pad 15 thru_hole circle (at -5.08 10.16 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 8 /ESVIDEO-RVB/DPC1)) + (pad 16 thru_hole circle (at -2.54 12.7 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 9 /ESVIDEO-RVB/DPC2)) + (pad 17 thru_hole circle (at -2.54 10.16 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 273 /muxdata/DPC3)) + (pad 18 thru_hole circle (at 0 12.7 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 10 /ESVIDEO-RVB/DPC4)) + (pad 19 thru_hole circle (at 0 10.16 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 11 /ESVIDEO-RVB/DPC5)) + (pad 20 thru_hole circle (at 2.54 12.7 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 276 /muxdata/DPC6)) + (pad 21 thru_hole circle (at 2.54 10.16 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 12 /ESVIDEO-RVB/DPC7)) + (pad 22 thru_hole circle (at 5.08 12.7 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 18 /ESVIDEO-RVB/RDCDA-)) + (pad 23 thru_hole circle (at 5.08 10.16 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 237 /graphic/WRCDA-)) + (pad 24 thru_hole circle (at 7.62 12.7 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 16 /ESVIDEO-RVB/PCA0)) + (pad 25 thru_hole circle (at 7.62 10.16 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 212 /graphic/PCA1)) + (pad 26 thru_hole circle (at 10.16 12.7 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 17 /ESVIDEO-RVB/PCA2)) + (pad 27 thru_hole circle (at 12.7 10.16 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS)) + (pad 28 thru_hole circle (at 10.16 10.16 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 289 /pal-ntsc.sch/OE_PAL-)) + (pad 29 thru_hole circle (at 12.7 7.62 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 15 /ESVIDEO-RVB/OE_RVB-)) + (pad 30 thru_hole circle (at 10.16 7.62 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS)) + (pad 31 thru_hole circle (at 12.7 5.08 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 32 thru_hole circle (at 10.16 5.08 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 33 thru_hole circle (at 12.7 2.54 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 34 /ESVIDEO-RVB/VAA)) + (pad 34 thru_hole circle (at 10.16 2.54 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 34 /ESVIDEO-RVB/VAA)) + (pad 35 thru_hole circle (at 12.7 0 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 34 /ESVIDEO-RVB/VAA)) + (pad 36 thru_hole circle (at 10.16 0 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 34 /ESVIDEO-RVB/VAA)) + (pad 37 thru_hole circle (at 12.7 -2.54 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 242 /modul/BLEU)) + (pad 38 thru_hole circle (at 10.16 -2.54 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 13 /ESVIDEO-RVB/GREEN)) + (pad 39 thru_hole circle (at 12.7 -5.08 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 5 /ESVIDEO-RVB/BLUE)) + (pad 40 thru_hole circle (at 10.16 -5.08 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 372 N-000369)) + (pad 41 thru_hole circle (at 12.7 -7.62 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 371 N-000365)) + (pad 42 thru_hole circle (at 10.16 -7.62 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 371 N-000365)) + (pad 43 thru_hole circle (at 12.7 -10.16 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 370 N-000363)) + (pad 44 thru_hole circle (at 10.16 -12.7 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 370 N-000363)) + (pad 45 thru_hole circle (at 10.16 -10.16 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 28 /ESVIDEO-RVB/TVR0)) + (pad 46 thru_hole circle (at 7.62 -12.7 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 29 /ESVIDEO-RVB/TVR1)) + (pad 47 thru_hole circle (at 7.62 -10.16 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 30 /ESVIDEO-RVB/TVR2)) + (pad 48 thru_hole circle (at 5.08 -12.7 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 295 /pal-ntsc.sch/TVR3)) + (pad 49 thru_hole circle (at 5.08 -10.16 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 296 /pal-ntsc.sch/TVR4)) + (pad 50 thru_hole circle (at 2.54 -12.7 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 31 /ESVIDEO-RVB/TVR5)) + (pad 51 thru_hole circle (at 2.54 -10.16 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 32 /ESVIDEO-RVB/TVR6)) + (pad 52 thru_hole circle (at 0 -12.7 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 33 /ESVIDEO-RVB/TVR7)) + (pad 53 thru_hole circle (at 0 -10.16 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 22 /ESVIDEO-RVB/TVG0)) + (pad 54 thru_hole circle (at -2.54 -12.7 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 23 /ESVIDEO-RVB/TVG1)) + (pad 55 thru_hole circle (at -2.54 -10.16 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 24 /ESVIDEO-RVB/TVG2)) + (pad 56 thru_hole circle (at -5.08 -12.7 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 25 /ESVIDEO-RVB/TVG3)) + (pad 57 thru_hole circle (at -5.08 -10.16 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 26 /ESVIDEO-RVB/TVG4)) + (pad 58 thru_hole circle (at -7.62 -12.7 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 27 /ESVIDEO-RVB/TVG5)) + (pad 59 thru_hole circle (at -7.62 -10.16 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 282 /muxdata/TVG6)) + (pad 60 thru_hole circle (at -10.16 -12.7 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 283 /muxdata/TVG7)) + (pad 61 thru_hole circle (at -12.7 -10.16 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 279 /muxdata/TVB0)) + (pad 62 thru_hole circle (at -10.16 -10.16 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 280 /muxdata/TVB1)) + (pad 63 thru_hole circle (at -12.7 -7.62 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 20 /ESVIDEO-RVB/TVB2)) + (pad 64 thru_hole circle (at -10.16 -7.62 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 21 /ESVIDEO-RVB/TVB3)) + (pad 65 thru_hole circle (at -12.7 -5.08 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 281 /muxdata/TVB4)) + (pad 66 thru_hole circle (at -10.16 -5.08 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 292 /pal-ntsc.sch/TVB5)) + (pad 67 thru_hole circle (at -12.7 -2.54 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 293 /pal-ntsc.sch/TVB6)) + (pad 68 thru_hole circle (at -10.16 -2.54 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 294 /pal-ntsc.sch/TVB7)) (model support/supp_plcc68.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -5543,28 +3556,24 @@ (tags "QUARTZ DEV") (path /4BF03681/B15DA8C0) (autoplace_cost180 10) - (fp_text reference X2 (at -1.778 -5.588 270) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text reference X2 (at -1.778 -5.588 270) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) - (fp_text value 30MHz (at 0 5.08 450) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) - ) - (fp_line (start -6.985 -1.27) (end -5.715 -2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.715 -2.54) (end 6.985 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 6.985 1.27) (end 5.715 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -6.985 1.27) (end -5.715 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.715 -2.54) (end 5.715 -2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -6.985 -1.27) (end -6.985 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.715 2.54) (end 5.715 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 6.985 1.27) (end 6.985 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -2.54 0 270) (size 1.778 1.778) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 333 N-000120) - ) - (pad 2 thru_hole circle (at 2.54 0 270) (size 1.778 1.778) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 332 N-000119) + (fp_text value 30MHz (at 0 5.08 450) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) + (fp_line (start -6.985 -1.27) (end -5.715 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.715 -2.54) (end 6.985 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 6.985 1.27) (end 5.715 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -6.985 1.27) (end -5.715 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.715 -2.54) (end 5.715 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -6.985 -1.27) (end -6.985 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.715 2.54) (end 5.715 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 6.985 1.27) (end 6.985 -1.27) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -2.54 0 270) (size 1.778 1.778) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 333 N-000120)) + (pad 2 thru_hole circle (at 2.54 0 270) (size 1.778 1.778) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 332 N-000119)) (model discret/crystal_hc18u_vertical.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -5577,64 +3586,42 @@ (descr "Connecteur DB9 femelle couche") (tags "CONN DB9") (path /84DFBB8F) - (fp_text reference J4 (at 1.27 -10.16 90) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text reference J4 (at 1.27 -10.16 90) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) - (fp_text value DB9FEM (at 1.27 -3.81 90) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) - ) - (fp_line (start -15.748 3.556) (end 16.764 3.556) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 16.764 3.556) (end 16.764 -14.224) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 16.764 -14.224) (end -15.748 -14.224) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -15.748 -14.224) (end -15.748 3.556) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -8.636 -14.224) (end -8.636 -6.604) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -8.636 -6.604) (end 9.652 -6.604) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 9.652 -6.604) (end 9.652 -14.224) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -7.112 -14.224) (end -7.112 -22.86) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -7.112 -22.86) (end 8.128 -22.86) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 8.128 -22.86) (end 8.128 -14.224) (layer Dessus.SilkS) (width 0.3048)) - (pad "" thru_hole oval (at 13.208 0 90) (size 3.81 5.08) (drill 3.048) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad "" thru_hole circle (at -12.192 0 90) (size 3.81 3.81) (drill 3.048) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 1 thru_hole rect (at -5.08 2.54 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - (net 242 /modul/BLEU) - ) - (pad 2 thru_hole circle (at -2.286 2.54 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - (net 13 /ESVIDEO-RVB/GREEN) - ) - (pad 3 thru_hole circle (at 0.381 2.54 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - (net 5 /ESVIDEO-RVB/BLUE) - ) - (pad 4 thru_hole circle (at 3.175 2.54 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 5 thru_hole circle (at 5.969 2.54 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 6 thru_hole circle (at -3.683 0 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 7 thru_hole circle (at -0.889 0 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 8 thru_hole circle (at 1.778 0 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - (net 244 /modul/COUT) - ) - (pad 9 thru_hole circle (at 4.572 0 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - (net 249 /modul/YOUT) + (fp_text value DB9FEM (at 1.27 -3.81 90) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) + (fp_line (start -15.748 3.556) (end 16.764 3.556) (layer F.SilkS) (width 0.3048)) + (fp_line (start 16.764 3.556) (end 16.764 -14.224) (layer F.SilkS) (width 0.3048)) + (fp_line (start 16.764 -14.224) (end -15.748 -14.224) (layer F.SilkS) (width 0.3048)) + (fp_line (start -15.748 -14.224) (end -15.748 3.556) (layer F.SilkS) (width 0.3048)) + (fp_line (start -8.636 -14.224) (end -8.636 -6.604) (layer F.SilkS) (width 0.3048)) + (fp_line (start -8.636 -6.604) (end 9.652 -6.604) (layer F.SilkS) (width 0.3048)) + (fp_line (start 9.652 -6.604) (end 9.652 -14.224) (layer F.SilkS) (width 0.3048)) + (fp_line (start -7.112 -14.224) (end -7.112 -22.86) (layer F.SilkS) (width 0.3048)) + (fp_line (start -7.112 -22.86) (end 8.128 -22.86) (layer F.SilkS) (width 0.3048)) + (fp_line (start 8.128 -22.86) (end 8.128 -14.224) (layer F.SilkS) (width 0.3048)) + (pad "" thru_hole oval (at 13.208 0 90) (size 3.81 5.08) (drill 3.048) (layers *.Cu *.Mask F.SilkS)) + (pad "" thru_hole circle (at -12.192 0 90) (size 3.81 3.81) (drill 3.048) (layers *.Cu *.Mask F.SilkS)) + (pad 1 thru_hole rect (at -5.08 2.54 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 242 /modul/BLEU)) + (pad 2 thru_hole circle (at -2.286 2.54 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 13 /ESVIDEO-RVB/GREEN)) + (pad 3 thru_hole circle (at 0.381 2.54 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 5 /ESVIDEO-RVB/BLUE)) + (pad 4 thru_hole circle (at 3.175 2.54 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 5 thru_hole circle (at 5.969 2.54 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 6 thru_hole circle (at -3.683 0 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 7 thru_hole circle (at -0.889 0 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 8 thru_hole circle (at 1.778 0 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 244 /modul/COUT)) + (pad 9 thru_hole circle (at 4.572 0 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 249 /modul/YOUT)) (model conn_DBxx/db9_female_pin90deg.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -5647,30 +3634,26 @@ (descr "Diode 3 pas") (tags "DIODE DEV") (path /4BF03681/A9CA7F8E) - (fp_text reference D3 (at 0 0) (layer Dessus.SilkS) + (fp_text reference D3 (at 0 0) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value BAT46 (at 0 0) (layer Dessus.SilkS) hide + (fp_text value BAT46 (at 0 0) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start 3.81 0) (end 3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 0) (end 3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 -1.016) (end -3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.81 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.048 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 1.016) (end 3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (pad 2 thru_hole rect (at 3.81 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 286 /pal-ntsc.sch/C-VIDEO) - ) - (pad 1 thru_hole circle (at -3.81 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) + (fp_line (start 3.81 0) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 0) (end 3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 -1.016) (end -3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.81 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 1.016) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 2 thru_hole rect (at 3.81 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 286 /pal-ntsc.sch/C-VIDEO)) + (pad 1 thru_hole circle (at -3.81 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) (model discret/diode.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -5683,30 +3666,26 @@ (descr "Diode 3 pas") (tags "DIODE DEV") (path /4BF03681/A9CA7F84) - (fp_text reference D2 (at 0 0) (layer Dessus.SilkS) + (fp_text reference D2 (at 0 0) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value BAT46 (at 0 0) (layer Dessus.SilkS) hide + (fp_text value BAT46 (at 0 0) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start 3.81 0) (end 3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 0) (end 3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 -1.016) (end -3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.81 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.048 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 1.016) (end 3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (pad 2 thru_hole rect (at 3.81 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 4 +5V) - ) - (pad 1 thru_hole circle (at -3.81 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 299 /pal-ntsc.sch/Y-VIDEO) - ) + (fp_line (start 3.81 0) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 0) (end 3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 -1.016) (end -3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.81 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 1.016) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 2 thru_hole rect (at 3.81 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 4 +5V)) + (pad 1 thru_hole circle (at -3.81 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 299 /pal-ntsc.sch/Y-VIDEO)) (model discret/diode.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -5719,30 +3698,26 @@ (descr "Diode 3 pas") (tags "DIODE DEV") (path /4BF03681/A9CA7F7F) - (fp_text reference D1 (at 0 0) (layer Dessus.SilkS) + (fp_text reference D1 (at 0 0) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value BAT46 (at 0 0) (layer Dessus.SilkS) hide + (fp_text value BAT46 (at 0 0) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start 3.81 0) (end 3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 0) (end 3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 -1.016) (end -3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.81 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.048 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 1.016) (end 3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (pad 2 thru_hole rect (at 3.81 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 299 /pal-ntsc.sch/Y-VIDEO) - ) - (pad 1 thru_hole circle (at -3.81 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) + (fp_line (start 3.81 0) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 0) (end 3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 -1.016) (end -3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.81 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 1.016) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 2 thru_hole rect (at 3.81 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 299 /pal-ntsc.sch/Y-VIDEO)) + (pad 1 thru_hole circle (at -3.81 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) (model discret/diode.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -5755,30 +3730,26 @@ (descr "Diode 3 pas") (tags "DIODE DEV") (path /4BF03681/A9CA7F93) - (fp_text reference D4 (at 0 0) (layer Dessus.SilkS) + (fp_text reference D4 (at 0 0) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value BAT46 (at 0 0) (layer Dessus.SilkS) hide + (fp_text value BAT46 (at 0 0) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start 3.81 0) (end 3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 0) (end 3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 -1.016) (end -3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.81 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 0) (end -3.048 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.048 1.016) (end 3.048 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (pad 2 thru_hole rect (at 3.81 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 4 +5V) - ) - (pad 1 thru_hole circle (at -3.81 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 286 /pal-ntsc.sch/C-VIDEO) - ) + (fp_line (start 3.81 0) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 0) (end 3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 -1.016) (end -3.048 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 -1.016) (end -3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.81 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 0) (end -3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.048 1.016) (end 3.048 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.048 1.016) (end 3.048 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.016) (end 2.54 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.286 1.016) (end 2.286 -1.016) (layer F.SilkS) (width 0.3048)) + (pad 2 thru_hole rect (at 3.81 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 4 +5V)) + (pad 1 thru_hole circle (at -3.81 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 286 /pal-ntsc.sch/C-VIDEO)) (model discret/diode.wrl (at (xyz 0 0 0)) (scale (xyz 0.3 0.3 0.3)) @@ -5791,22 +3762,18 @@ (descr "Condensateur ajustable miniature") (tags "C DEV") (path /4BF0367F/22760FA8) - (fp_text reference CV1 (at 0 4.445 180) (layer Dessus.SilkS) + (fp_text reference CV1 (at 0 4.445 180) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value 5/30pF (at 0 4.445 180) (layer Dessus.SilkS) hide + (fp_text value 5/30pF (at 0 4.445 180) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_circle (center 0 0) (end 3.175 0) (layer Dessus.SilkS) (width 0.381)) - (fp_circle (center 0 0) (end 0.635 0.635) (layer Dessus.SilkS) (width 0.381)) - (pad 1 thru_hole circle (at 2.54 0 180) (size 1.524 1.524) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 324 N-000102) - ) - (pad 2 thru_hole circle (at -2.54 0 180) (size 1.524 1.524) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) + (fp_circle (center 0 0) (end 3.175 0) (layer F.SilkS) (width 0.381)) + (fp_circle (center 0 0) (end 0.635 0.635) (layer F.SilkS) (width 0.381)) + (pad 1 thru_hole circle (at 2.54 0 180) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 324 N-000102)) + (pad 2 thru_hole circle (at -2.54 0 180) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) ) (module 8dip300 (layer Composant) (tedit 200000) (tstamp 33A7DDDD) @@ -5814,50 +3781,34 @@ (descr "Module Dil 8 pins, pads ronds") (tags DIL) (path /4BF03683/33A7DDDD) - (fp_text reference U21 (at -6.35 0 90) (layer Dessus.SilkS) + (fp_text reference U21 (at -6.35 0 90) (layer F.SilkS) (effects (font (size 1.778 1.143) (thickness 0.28702))) ) - (fp_text value XC1736APD8 (at 0 0) (layer Dessus.SilkS) + (fp_text value XC1736APD8 (at 0 0) (layer F.SilkS) (effects (font (size 1.778 1.016) (thickness 0.254))) ) - (fp_line (start -5.08 -1.27) (end -3.81 -1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -3.81 1.27) (end -5.08 1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -5.08 -2.54) (end 5.08 -2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 5.08 -2.54) (end 5.08 2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -5.08 2.54) (end -5.08 -2.54) (layer Dessus.SilkS) (width 0.381)) - (pad 1 thru_hole rect (at -3.81 3.81) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 187 /graphic/DIN) - ) - (pad 2 thru_hole circle (at -1.27 3.81) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 181 /graphic/CCLK) - ) - (pad 3 thru_hole circle (at 1.27 3.81) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 213 /graphic/PROG*) - ) - (pad 4 thru_hole circle (at 3.81 3.81) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 213 /graphic/PROG*) - ) - (pad 5 thru_hole circle (at 3.81 -3.81) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 6 thru_hole circle (at 1.27 -3.81) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 7 thru_hole circle (at -1.27 -3.81) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 4 +5V) - ) - (pad 8 thru_hole circle (at -3.81 -3.81) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 4 +5V) - ) + (fp_line (start -5.08 -1.27) (end -3.81 -1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -3.81 1.27) (end -5.08 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -5.08 -2.54) (end 5.08 -2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 5.08 -2.54) (end 5.08 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start -5.08 2.54) (end -5.08 -2.54) (layer F.SilkS) (width 0.381)) + (pad 1 thru_hole rect (at -3.81 3.81) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 187 /graphic/DIN)) + (pad 2 thru_hole circle (at -1.27 3.81) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 181 /graphic/CCLK)) + (pad 3 thru_hole circle (at 1.27 3.81) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 213 /graphic/PROG*)) + (pad 4 thru_hole circle (at 3.81 3.81) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 213 /graphic/PROG*)) + (pad 5 thru_hole circle (at 3.81 -3.81) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 6 thru_hole circle (at 1.27 -3.81) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS)) + (pad 7 thru_hole circle (at -1.27 -3.81) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 4 +5V)) + (pad 8 thru_hole circle (at -3.81 -3.81) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 4 +5V)) (model dil/dil_8.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -5870,53 +3821,35 @@ (descr "Connecteur 9 pins") (tags "CONN DEV") (path /4BF03687/C9363A3F) - (fp_text reference RR8 (at -7.62 -2.54 270) (layer Dessus.SilkS) + (fp_text reference RR8 (at -7.62 -2.54 270) (layer F.SilkS) (effects (font (size 1.72974 1.08712) (thickness 0.27178))) ) - (fp_text value 8x10K (at 5.08 -2.54 270) (layer Dessus.SilkS) + (fp_text value 8x10K (at 5.08 -2.54 270) (layer F.SilkS) (effects (font (size 1.524 1.016) (thickness 0.254))) ) - (fp_line (start 11.43 -1.27) (end 11.43 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 11.43 1.27) (end -11.43 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -11.43 1.27) (end -11.43 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 11.43 -1.27) (end -11.43 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -8.89 -1.27) (end -8.89 1.27) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at -10.16 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 4 +5V) - ) - (pad 2 thru_hole circle (at -7.62 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 258 /muxdata/DPC15) - ) - (pad 3 thru_hole circle (at -5.08 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 257 /muxdata/DPC14) - ) - (pad 4 thru_hole circle (at -2.54 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 256 /muxdata/DPC13) - ) - (pad 5 thru_hole circle (at 0 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 255 /muxdata/DPC12) - ) - (pad 6 thru_hole circle (at 2.54 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 254 /muxdata/DPC11) - ) - (pad 7 thru_hole circle (at 5.08 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 253 /muxdata/DPC10) - ) - (pad 8 thru_hole circle (at 7.62 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 278 /muxdata/DPC9) - ) - (pad 9 thru_hole circle (at 10.16 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 277 /muxdata/DPC8) - ) + (fp_line (start 11.43 -1.27) (end 11.43 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 11.43 1.27) (end -11.43 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -11.43 1.27) (end -11.43 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 11.43 -1.27) (end -11.43 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -8.89 -1.27) (end -8.89 1.27) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole rect (at -10.16 0 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 4 +5V)) + (pad 2 thru_hole circle (at -7.62 0 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 258 /muxdata/DPC15)) + (pad 3 thru_hole circle (at -5.08 0 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 257 /muxdata/DPC14)) + (pad 4 thru_hole circle (at -2.54 0 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 256 /muxdata/DPC13)) + (pad 5 thru_hole circle (at 0 0 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 255 /muxdata/DPC12)) + (pad 6 thru_hole circle (at 2.54 0 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 254 /muxdata/DPC11)) + (pad 7 thru_hole circle (at 5.08 0 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 253 /muxdata/DPC10)) + (pad 8 thru_hole circle (at 7.62 0 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 278 /muxdata/DPC9)) + (pad 9 thru_hole circle (at 10.16 0 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 277 /muxdata/DPC8)) ) (module SIL-9 (layer Composant) (tedit 200000) (tstamp 7FFFFFFF) @@ -5924,53 +3857,35 @@ (descr "Connecteur 9 pins") (tags "CONN DEV") (path /4BF03687/C93123CE) - (fp_text reference RR6 (at -7.62 -2.54) (layer Dessus.SilkS) + (fp_text reference RR6 (at -7.62 -2.54) (layer F.SilkS) (effects (font (size 1.72974 1.08712) (thickness 0.27178))) ) - (fp_text value 8x10K (at 5.08 -2.54) (layer Dessus.SilkS) + (fp_text value 8x10K (at 5.08 -2.54) (layer F.SilkS) (effects (font (size 1.524 1.016) (thickness 0.254))) ) - (fp_line (start 11.43 -1.27) (end 11.43 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 11.43 1.27) (end -11.43 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -11.43 1.27) (end -11.43 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 11.43 -1.27) (end -11.43 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -8.89 -1.27) (end -8.89 1.27) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at -10.16 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 4 +5V) - ) - (pad 2 thru_hole circle (at -7.62 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 111 /buspci.sch/PTRDY-) - ) - (pad 3 thru_hole circle (at -5.08 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 263 /muxdata/DPC20) - ) - (pad 4 thru_hole circle (at -2.54 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 90 /buspci.sch/EA13) - ) - (pad 5 thru_hole circle (at 0 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 89 /buspci.sch/EA12) - ) - (pad 6 thru_hole circle (at 2.54 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 261 /muxdata/DPC18) - ) - (pad 7 thru_hole circle (at 5.08 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 88 /buspci.sch/EA11) - ) - (pad 8 thru_hole circle (at 7.62 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 262 /muxdata/DPC19) - ) - (pad 9 thru_hole circle (at 10.16 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 87 /buspci.sch/EA10) - ) + (fp_line (start 11.43 -1.27) (end 11.43 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 11.43 1.27) (end -11.43 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -11.43 1.27) (end -11.43 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 11.43 -1.27) (end -11.43 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -8.89 -1.27) (end -8.89 1.27) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole rect (at -10.16 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 4 +5V)) + (pad 2 thru_hole circle (at -7.62 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 111 /buspci.sch/PTRDY-)) + (pad 3 thru_hole circle (at -5.08 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 263 /muxdata/DPC20)) + (pad 4 thru_hole circle (at -2.54 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 90 /buspci.sch/EA13)) + (pad 5 thru_hole circle (at 0 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 89 /buspci.sch/EA12)) + (pad 6 thru_hole circle (at 2.54 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 261 /muxdata/DPC18)) + (pad 7 thru_hole circle (at 5.08 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 88 /buspci.sch/EA11)) + (pad 8 thru_hole circle (at 7.62 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 262 /muxdata/DPC19)) + (pad 9 thru_hole circle (at 10.16 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 87 /buspci.sch/EA10)) (model discret/r_pack8.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -5983,53 +3898,35 @@ (descr "Connecteur 9 pins") (tags "CONN DEV") (path /4BF03687/C8B23B9F) - (fp_text reference RR3 (at -7.62 -2.54 180) (layer Dessus.SilkS) + (fp_text reference RR3 (at -7.62 -2.54 180) (layer F.SilkS) (effects (font (size 1.72974 1.08712) (thickness 0.27178))) ) - (fp_text value 8x10K (at 5.08 -2.54 180) (layer Dessus.SilkS) + (fp_text value 8x10K (at 5.08 -2.54 180) (layer F.SilkS) (effects (font (size 1.524 1.016) (thickness 0.254))) ) - (fp_line (start 11.43 -1.27) (end 11.43 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 11.43 1.27) (end -11.43 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -11.43 1.27) (end -11.43 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 11.43 -1.27) (end -11.43 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -8.89 -1.27) (end -8.89 1.27) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at -10.16 0 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 4 +5V) - ) - (pad 2 thru_hole circle (at -7.62 0 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 95 /buspci.sch/EA4) - ) - (pad 3 thru_hole circle (at -5.08 0 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 267 /muxdata/DPC24) - ) - (pad 4 thru_hole circle (at -2.54 0 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 231 /graphic/SELECT-) - ) - (pad 5 thru_hole circle (at 0 0 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 235 /graphic/WR-) - ) - (pad 6 thru_hole circle (at 2.54 0 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 94 /buspci.sch/EA3) - ) - (pad 7 thru_hole circle (at 5.08 0 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 227 /graphic/RD-) - ) - (pad 8 thru_hole circle (at 7.62 0 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 93 /buspci.sch/EA2) - ) - (pad 9 thru_hole circle (at 10.16 0 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 268 /muxdata/DPC25) - ) + (fp_line (start 11.43 -1.27) (end 11.43 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 11.43 1.27) (end -11.43 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -11.43 1.27) (end -11.43 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 11.43 -1.27) (end -11.43 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -8.89 -1.27) (end -8.89 1.27) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole rect (at -10.16 0 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 4 +5V)) + (pad 2 thru_hole circle (at -7.62 0 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 95 /buspci.sch/EA4)) + (pad 3 thru_hole circle (at -5.08 0 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 267 /muxdata/DPC24)) + (pad 4 thru_hole circle (at -2.54 0 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 231 /graphic/SELECT-)) + (pad 5 thru_hole circle (at 0 0 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 235 /graphic/WR-)) + (pad 6 thru_hole circle (at 2.54 0 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 94 /buspci.sch/EA3)) + (pad 7 thru_hole circle (at 5.08 0 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 227 /graphic/RD-)) + (pad 8 thru_hole circle (at 7.62 0 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 93 /buspci.sch/EA2)) + (pad 9 thru_hole circle (at 10.16 0 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 268 /muxdata/DPC25)) (model discret/r_pack8.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -6042,53 +3939,35 @@ (descr "Connecteur 9 pins") (tags "CONN DEV") (path /4BF03687/C8B01EF2) - (fp_text reference RR2 (at -7.62 -2.54 180) (layer Dessus.SilkS) + (fp_text reference RR2 (at -7.62 -2.54 180) (layer F.SilkS) (effects (font (size 1.72974 1.08712) (thickness 0.27178))) ) - (fp_text value 8x10K (at 5.08 -2.54 180) (layer Dessus.SilkS) + (fp_text value 8x10K (at 5.08 -2.54 180) (layer F.SilkS) (effects (font (size 1.524 1.016) (thickness 0.254))) ) - (fp_line (start 11.43 -1.27) (end 11.43 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 11.43 1.27) (end -11.43 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -11.43 1.27) (end -11.43 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 11.43 -1.27) (end -11.43 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -8.89 -1.27) (end -8.89 1.27) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at -10.16 0 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 4 +5V) - ) - (pad 2 thru_hole circle (at -7.62 0 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 106 /buspci.sch/EQ6) - ) - (pad 3 thru_hole circle (at -5.08 0 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 271 /muxdata/DPC28) - ) - (pad 4 thru_hole circle (at -2.54 0 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 105 /buspci.sch/EQ5) - ) - (pad 5 thru_hole circle (at 0 0 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 270 /muxdata/DPC27) - ) - (pad 6 thru_hole circle (at 2.54 0 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 86 /buspci.sch/EA1) - ) - (pad 7 thru_hole circle (at 5.08 0 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 209 /graphic/IRQ_SLR) - ) - (pad 8 thru_hole circle (at 7.62 0 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 269 /muxdata/DPC26) - ) - (pad 9 thru_hole circle (at 10.16 0 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 107 /buspci.sch/EQ7) - ) + (fp_line (start 11.43 -1.27) (end 11.43 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 11.43 1.27) (end -11.43 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -11.43 1.27) (end -11.43 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 11.43 -1.27) (end -11.43 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -8.89 -1.27) (end -8.89 1.27) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole rect (at -10.16 0 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 4 +5V)) + (pad 2 thru_hole circle (at -7.62 0 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 106 /buspci.sch/EQ6)) + (pad 3 thru_hole circle (at -5.08 0 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 271 /muxdata/DPC28)) + (pad 4 thru_hole circle (at -2.54 0 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 105 /buspci.sch/EQ5)) + (pad 5 thru_hole circle (at 0 0 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 270 /muxdata/DPC27)) + (pad 6 thru_hole circle (at 2.54 0 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 86 /buspci.sch/EA1)) + (pad 7 thru_hole circle (at 5.08 0 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 209 /graphic/IRQ_SLR)) + (pad 8 thru_hole circle (at 7.62 0 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 269 /muxdata/DPC26)) + (pad 9 thru_hole circle (at 10.16 0 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 107 /buspci.sch/EQ7)) (model discret/r_pack8.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -6101,53 +3980,35 @@ (descr "Connecteur 9 pins") (tags "CONN DEV") (path /4BF03687/C8AF8090) - (fp_text reference RR1 (at -7.62 -2.54 180) (layer Dessus.SilkS) + (fp_text reference RR1 (at -7.62 -2.54 180) (layer F.SilkS) (effects (font (size 1.72974 1.08712) (thickness 0.27178))) ) - (fp_text value 8x10K (at 5.08 -2.54 180) (layer Dessus.SilkS) + (fp_text value 8x10K (at 5.08 -2.54 180) (layer F.SilkS) (effects (font (size 1.524 1.016) (thickness 0.254))) ) - (fp_line (start 11.43 -1.27) (end 11.43 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 11.43 1.27) (end -11.43 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -11.43 1.27) (end -11.43 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 11.43 -1.27) (end -11.43 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -8.89 -1.27) (end -8.89 1.27) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at -10.16 0 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 4 +5V) - ) - (pad 2 thru_hole circle (at -7.62 0 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 100 /buspci.sch/EQ0) - ) - (pad 3 thru_hole circle (at -5.08 0 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 275 /muxdata/DPC31) - ) - (pad 4 thru_hole circle (at -2.54 0 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 101 /buspci.sch/EQ1) - ) - (pad 5 thru_hole circle (at 0 0 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 274 /muxdata/DPC30) - ) - (pad 6 thru_hole circle (at 2.54 0 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 102 /buspci.sch/EQ2) - ) - (pad 7 thru_hole circle (at 5.08 0 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 103 /buspci.sch/EQ3) - ) - (pad 8 thru_hole circle (at 7.62 0 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 272 /muxdata/DPC29) - ) - (pad 9 thru_hole circle (at 10.16 0 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 104 /buspci.sch/EQ4) - ) + (fp_line (start 11.43 -1.27) (end 11.43 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 11.43 1.27) (end -11.43 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -11.43 1.27) (end -11.43 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 11.43 -1.27) (end -11.43 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -8.89 -1.27) (end -8.89 1.27) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole rect (at -10.16 0 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 4 +5V)) + (pad 2 thru_hole circle (at -7.62 0 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 100 /buspci.sch/EQ0)) + (pad 3 thru_hole circle (at -5.08 0 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 275 /muxdata/DPC31)) + (pad 4 thru_hole circle (at -2.54 0 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 101 /buspci.sch/EQ1)) + (pad 5 thru_hole circle (at 0 0 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 274 /muxdata/DPC30)) + (pad 6 thru_hole circle (at 2.54 0 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 102 /buspci.sch/EQ2)) + (pad 7 thru_hole circle (at 5.08 0 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 103 /buspci.sch/EQ3)) + (pad 8 thru_hole circle (at 7.62 0 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 272 /muxdata/DPC29)) + (pad 9 thru_hole circle (at 10.16 0 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 104 /buspci.sch/EQ4)) (model discret/r_pack8.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -6160,27 +4021,23 @@ (tags "CMS SM") (path /4BF03687/2820F08A) (attr smd) - (fp_text reference C38 (at -0.62992 0 450) (layer Dessous.SilkS) + (fp_text reference C38 (at -0.62992 0 450) (layer B.SilkS) (effects (font (size 0.889 0.762) (thickness 0.127)) (justify mirror)) ) - (fp_text value 4,7uF (at 0.635 0 450) (layer Dessous.SilkS) + (fp_text value 4,7uF (at 0.635 0 450) (layer B.SilkS) (effects (font (size 0.889 0.762) (thickness 0.127)) (justify mirror)) ) - (fp_circle (center -3.81 -2.032) (end -3.683 -1.905) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 1.397 -1.905) (end 3.683 -1.905) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 3.683 -1.905) (end 3.683 1.905) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 3.683 1.905) (end 1.397 1.905) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -1.397 1.905) (end -3.683 1.905) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -3.683 1.905) (end -3.683 -1.905) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -3.683 -1.905) (end -1.397 -1.905) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -2.54 0 180) (size 2.032 3.556) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 4 +5V) - ) - (pad 2 smd rect (at 2.54 0 180) (size 2.032 3.556) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_circle (center -3.81 -2.032) (end -3.683 -1.905) (layer B.SilkS) (width 0.127)) + (fp_line (start 1.397 -1.905) (end 3.683 -1.905) (layer B.SilkS) (width 0.127)) + (fp_line (start 3.683 -1.905) (end 3.683 1.905) (layer B.SilkS) (width 0.127)) + (fp_line (start 3.683 1.905) (end 1.397 1.905) (layer B.SilkS) (width 0.127)) + (fp_line (start -1.397 1.905) (end -3.683 1.905) (layer B.SilkS) (width 0.127)) + (fp_line (start -3.683 1.905) (end -3.683 -1.905) (layer B.SilkS) (width 0.127)) + (fp_line (start -3.683 -1.905) (end -1.397 -1.905) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -2.54 0 180) (size 2.032 3.556) (layers Cuivre B.Paste B.Mask) + (net 4 +5V)) + (pad 2 smd rect (at 2.54 0 180) (size 2.032 3.556) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.27 0.3 0.3)) @@ -6193,27 +4050,23 @@ (tags "CMS SM") (path /4BF03683/B9ED7AB0) (attr smd) - (fp_text reference C56 (at -0.62992 0 270) (layer Dessous.SilkS) + (fp_text reference C56 (at -0.62992 0 270) (layer B.SilkS) (effects (font (size 0.889 0.762) (thickness 0.127)) (justify mirror)) ) - (fp_text value 4,7uF (at 0.635 0 270) (layer Dessous.SilkS) + (fp_text value 4,7uF (at 0.635 0 270) (layer B.SilkS) (effects (font (size 0.889 0.762) (thickness 0.127)) (justify mirror)) ) - (fp_circle (center -3.81 -2.032) (end -3.683 -1.905) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 1.397 -1.905) (end 3.683 -1.905) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 3.683 -1.905) (end 3.683 1.905) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 3.683 1.905) (end 1.397 1.905) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -1.397 1.905) (end -3.683 1.905) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -3.683 1.905) (end -3.683 -1.905) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -3.683 -1.905) (end -1.397 -1.905) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -2.54 0) (size 2.032 3.556) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 4 +5V) - ) - (pad 2 smd rect (at 2.54 0) (size 2.032 3.556) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_circle (center -3.81 -2.032) (end -3.683 -1.905) (layer B.SilkS) (width 0.127)) + (fp_line (start 1.397 -1.905) (end 3.683 -1.905) (layer B.SilkS) (width 0.127)) + (fp_line (start 3.683 -1.905) (end 3.683 1.905) (layer B.SilkS) (width 0.127)) + (fp_line (start 3.683 1.905) (end 1.397 1.905) (layer B.SilkS) (width 0.127)) + (fp_line (start -1.397 1.905) (end -3.683 1.905) (layer B.SilkS) (width 0.127)) + (fp_line (start -3.683 1.905) (end -3.683 -1.905) (layer B.SilkS) (width 0.127)) + (fp_line (start -3.683 -1.905) (end -1.397 -1.905) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -2.54 0) (size 2.032 3.556) (layers Cuivre B.Paste B.Mask) + (net 4 +5V)) + (pad 2 smd rect (at 2.54 0) (size 2.032 3.556) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.27 0.3 0.3)) @@ -6226,24 +4079,20 @@ (descr "Led verticale diam 6mm") (tags "LED DEV") (path /4BF03683/2D5AA041) - (fp_text reference D6 (at 0 -3.81) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text reference D6 (at 0 -3.81) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) - (fp_text value LED (at 0 -3.81) (layer Dessus.SilkS) hide - (effects (font (size 1.524 1.524) (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)) - (pad 1 thru_hole rect (at -1.27 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 343 N-000153) - ) - (pad 2 thru_hole circle (at 1.27 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 211 /graphic/LED) + (fp_text value LED (at 0 -3.81) (layer F.SilkS) hide + (effects (font (thickness 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) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 343 N-000153)) + (pad 2 thru_hole circle (at 1.27 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 211 /graphic/LED)) (model discret/led5_vertical.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -6256,25 +4105,21 @@ (descr "Condensateur e = 1 pas") (tags C) (path /4BF03683/B3BF4EE8) - (fp_text reference C50 (at -1.651 -1.905) (layer Dessus.SilkS) + (fp_text reference C50 (at -1.651 -1.905) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value 22pF (at 0 -2.286) (layer Dessus.SilkS) hide + (fp_text value 22pF (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)) - (pad 1 thru_hole circle (at -1.27 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 238 /graphic/XTAL_I) - ) - (pad 2 thru_hole circle (at 1.27 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) + (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.8128) (layers *.Cu *.Mask F.SilkS) + (net 238 /graphic/XTAL_I)) + (pad 2 thru_hole circle (at 1.27 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) (model discret/capa_1_pas.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -6287,25 +4132,21 @@ (descr "Condensateur e = 1 pas") (tags C) (path /4BF03687/2691B632) - (fp_text reference W4 (at 0.254 -2.286 270) (layer Dessus.SilkS) + (fp_text reference W4 (at 0.254 -2.286 270) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value TEST (at 0 -2.286 270) (layer Dessus.SilkS) hide + (fp_text value TEST (at 0 -2.286 270) (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)) - (pad 1 thru_hole circle (at -1.27 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 2 thru_hole circle (at 1.27 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 355 N-000337) - ) + (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 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 2 thru_hole circle (at 1.27 0 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 355 N-000337)) (model discret/capa_1_pas.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -6318,25 +4159,21 @@ (descr "Condensateur e = 1 pas") (tags C) (path /4BF03683/B3BF4EDE) - (fp_text reference C49 (at -3.175 -1.778 180) (layer Dessus.SilkS) + (fp_text reference C49 (at -3.175 -1.778 180) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value 22pF (at 0.254 -2.032 180) (layer Dessus.SilkS) hide + (fp_text value 22pF (at 0.254 -2.032 180) (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)) - (pad 1 thru_hole circle (at -1.27 0 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 344 N-000162) - ) - (pad 2 thru_hole circle (at 1.27 0 180) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) + (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 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 344 N-000162)) + (pad 2 thru_hole circle (at 1.27 0 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) (model discret/capa_1_pas.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -6349,25 +4186,21 @@ (descr "Condensateur e = 1 pas") (tags C) (path /4BF03687/2691B637) - (fp_text reference W5 (at 0.254 -2.286) (layer Dessus.SilkS) + (fp_text reference W5 (at 0.254 -2.286) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value TEST (at 0 -2.286) (layer Dessus.SilkS) hide + (fp_text value TEST (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)) - (pad 1 thru_hole circle (at -1.27 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 2 thru_hole circle (at 1.27 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 356 N-000338) - ) + (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.8128) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 2 thru_hole circle (at 1.27 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 356 N-000338)) (model discret/capa_1_pas.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -6380,25 +4213,21 @@ (descr "Condensateur e = 1 pas") (tags C) (path /4BF03687/26A79A10) - (fp_text reference W3 (at 0.254 -2.286 270) (layer Dessus.SilkS) + (fp_text reference W3 (at 0.254 -2.286 270) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value SERNV (at 0 -2.286 270) (layer Dessus.SilkS) hide + (fp_text value SERNV (at 0 -2.286 270) (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)) - (pad 1 thru_hole circle (at -1.27 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 2 thru_hole circle (at 1.27 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 349 N-000315) - ) + (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 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 2 thru_hole circle (at 1.27 0 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 349 N-000315)) (model discret/capa_1_pas.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -6411,25 +4240,21 @@ (descr "Condensateur e = 1 pas") (tags C) (path /4BF03687/26A799F7) - (fp_text reference W2 (at 0.254 -2.286 270) (layer Dessus.SilkS) + (fp_text reference W2 (at 0.254 -2.286 270) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value FLOAT# (at 0 -2.286 270) (layer Dessus.SilkS) hide + (fp_text value FLOAT# (at 0 -2.286 270) (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)) - (pad 1 thru_hole circle (at -1.27 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 2 thru_hole circle (at 1.27 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 350 N-000316) - ) + (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 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 2 thru_hole circle (at 1.27 0 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 350 N-000316)) (model discret/capa_1_pas.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -6442,51 +4267,35 @@ (descr "Module Dil 8 pins, pads ronds") (tags DIL) (path /4BF03687/2F5F7E5C) - (fp_text reference U1 (at -6.35 0 90) (layer Dessus.SilkS) + (fp_text reference U1 (at -6.35 0 90) (layer F.SilkS) (effects (font (size 1.778 1.143) (thickness 0.28702))) ) - (fp_text value 24C16 (at 0 0) (layer Dessus.SilkS) + (fp_text value 24C16 (at 0 0) (layer F.SilkS) (effects (font (size 1.778 1.016) (thickness 0.254))) ) - (fp_line (start -5.08 -1.27) (end -3.81 -1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -3.81 1.27) (end -5.08 1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -5.08 -2.54) (end 5.08 -2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 5.08 -2.54) (end 5.08 2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -5.08 2.54) (end -5.08 -2.54) (layer Dessus.SilkS) (width 0.381)) - (pad 1 thru_hole rect (at -3.81 3.81) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 2 thru_hole circle (at -1.27 3.81) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 3 thru_hole circle (at 1.27 3.81) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 4 thru_hole circle (at 3.81 3.81) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 5 thru_hole circle (at 3.81 -3.81) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 352 N-000318) - ) - (pad 6 thru_hole circle (at 1.27 -3.81) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 353 N-000319) - ) - (pad 7 thru_hole circle (at -1.27 -3.81) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 4 +5V) - ) - (pad 8 thru_hole circle (at -3.81 -3.81) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 4 +5V) - ) + (fp_line (start -5.08 -1.27) (end -3.81 -1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -3.81 -1.27) (end -3.81 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -3.81 1.27) (end -5.08 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -5.08 -2.54) (end 5.08 -2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 5.08 -2.54) (end 5.08 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start -5.08 2.54) (end -5.08 -2.54) (layer F.SilkS) (width 0.381)) + (pad 1 thru_hole rect (at -3.81 3.81) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 2 thru_hole circle (at -1.27 3.81) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 3 thru_hole circle (at 1.27 3.81) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 4 thru_hole circle (at 3.81 3.81) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 5 thru_hole circle (at 3.81 -3.81) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 352 N-000318)) + (pad 6 thru_hole circle (at 1.27 -3.81) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 353 N-000319)) + (pad 7 thru_hole circle (at -1.27 -3.81) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 4 +5V)) + (pad 8 thru_hole circle (at -3.81 -3.81) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 4 +5V)) (model dil/dil_8.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -6498,26 +4307,22 @@ (at 319.151 120.015 270) (path /4BF03689/A44D984D) (attr smd) - (fp_text reference C37 (at 0 0 540) (layer Dessous.SilkS) + (fp_text reference C37 (at 0 0 540) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 100pF (at 0 0 540) (layer Dessous.SilkS) hide + (fp_text value 100pF (at 0 0 540) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 270) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) - (pad 2 smd rect (at 1.651 0 270) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 359 N-000346) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 270) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) + (pad 2 smd rect (at 1.651 0 270) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 359 N-000346)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -6529,26 +4334,22 @@ (at 74.041 85.344 90) (path /4BF0367F/22760F99) (attr smd) - (fp_text reference C44 (at 0 0 360) (layer Dessous.SilkS) + (fp_text reference C44 (at 0 0 360) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 220nF (at 0 0 360) (layer Dessous.SilkS) hide + (fp_text value 220nF (at 0 0 360) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 90) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 326 N-000108) - ) - (pad 2 smd rect (at 1.651 0 90) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 90) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 326 N-000108)) + (pad 2 smd rect (at 1.651 0 90) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -6560,26 +4361,22 @@ (at 313.944 120.015 270) (path /4BF03689/A44D9848) (attr smd) - (fp_text reference C36 (at 0 0 540) (layer Dessous.SilkS) + (fp_text reference C36 (at 0 0 540) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 100nF (at 0 0 540) (layer Dessous.SilkS) hide + (fp_text value 100nF (at 0 0 540) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 270) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 358 N-000345) - ) - (pad 2 smd rect (at 1.651 0 270) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 359 N-000346) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 270) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 358 N-000345)) + (pad 2 smd rect (at 1.651 0 270) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 359 N-000346)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -6591,26 +4388,22 @@ (at 79.121 82.931) (path /4BF0367F/22760FCB) (attr smd) - (fp_text reference C48 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference C48 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 22nF (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 22nF (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 311 N-000089) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 311 N-000089)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -6622,26 +4415,22 @@ (at 79.121 88.011) (path /4BF0367F/22760F8F) (attr smd) - (fp_text reference C43 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference C43 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 220nF (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 220nF (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 323 N-000101) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 323 N-000101)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -6653,26 +4442,22 @@ (at 80.391 111.887) (path /4BF0367F/22760FF8) (attr smd) - (fp_text reference C53 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference C53 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 330pF (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 330pF (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 319 N-000097) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 319 N-000097)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -6684,26 +4469,22 @@ (at 79.121 85.471) (path /4BF0367F/22760FD5) (attr smd) - (fp_text reference C45 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference C45 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 220nF (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 220nF (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 317 N-000095) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 317 N-000095)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -6715,26 +4496,22 @@ (at 353.949 131.699) (path /4BF03689/84DFBB21) (attr smd) - (fp_text reference C35 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference C35 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 100nF (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 100nF (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 34 /ESVIDEO-RVB/VAA) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 371 N-000365) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 34 /ESVIDEO-RVB/VAA)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 371 N-000365)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -6746,26 +4523,22 @@ (at 82.169 92.71) (path /4BF0367F/22760F53) (attr smd) - (fp_text reference C58 (at 0 0 90) (layer Dessus.SilkS) + (fp_text reference C58 (at 0 0 90) (layer F.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127))) ) - (fp_text value 47nF (at 0 0 90) (layer Dessus.SilkS) hide + (fp_text value 47nF (at 0 0 90) (layer F.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127))) ) - (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer Dessus.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 321 N-000099) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 242 /modul/BLEU) - ) + (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 321 N-000099)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 242 /modul/BLEU)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -6777,26 +4550,22 @@ (at 80.391 114.935) (path /4BF0367F/22760FFD) (attr smd) - (fp_text reference C46 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference C46 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 220pF (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 220pF (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 319 N-000097) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 319 N-000097)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -6808,26 +4577,22 @@ (at 82.423 100.965) (path /4BF0367F/22760F67) (attr smd) - (fp_text reference C60 (at 0 0 90) (layer Dessus.SilkS) + (fp_text reference C60 (at 0 0 90) (layer F.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127))) ) - (fp_text value 47nF (at 0 0 90) (layer Dessus.SilkS) hide + (fp_text value 47nF (at 0 0 90) (layer F.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127))) ) - (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer Dessus.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 327 N-000109) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 5 /ESVIDEO-RVB/BLUE) - ) + (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 327 N-000109)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 5 /ESVIDEO-RVB/BLUE)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -6839,26 +4604,22 @@ (at 68.707 102.235 180) (path /4BF0367F/22760F8A) (attr smd) - (fp_text reference C61 (at 0 0 270) (layer Dessus.SilkS) + (fp_text reference C61 (at 0 0 270) (layer F.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127))) ) - (fp_text value 47nF (at 0 0 270) (layer Dessus.SilkS) hide + (fp_text value 47nF (at 0 0 270) (layer F.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127))) ) - (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer Dessus.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 308 N-000086) - ) - (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 322 N-000100) - ) + (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 308 N-000086)) + (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 322 N-000100)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -6870,26 +4631,22 @@ (at 82.169 96.647) (path /4BF0367F/22760F62) (attr smd) - (fp_text reference C59 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference C59 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 47nF (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 47nF (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 320 N-000098) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 13 /ESVIDEO-RVB/GREEN) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 320 N-000098)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 13 /ESVIDEO-RVB/GREEN)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -6901,26 +4658,22 @@ (at 343.789 117.602) (path /4BF03689/84DFBA36) (attr smd) - (fp_text reference C34 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference C34 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 100nF (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 100nF (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 34 /ESVIDEO-RVB/VAA) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 372 N-000369) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 34 /ESVIDEO-RVB/VAA)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 372 N-000369)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -6932,26 +4685,22 @@ (at 345.313 111.76) (path /4BF03689/84DFBA31) (attr smd) - (fp_text reference C33 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference C33 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 100nF (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 100nF (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 34 /ESVIDEO-RVB/VAA) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 34 /ESVIDEO-RVB/VAA)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -6963,26 +4712,22 @@ (at 351.409 93.091) (path /4BF03681/B15DA8C5) (attr smd) - (fp_text reference C65 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference C65 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 22pF (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 22pF (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 333 N-000120) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 333 N-000120)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -6994,26 +4739,22 @@ (at 351.409 95.885) (path /4BF03681/B15DA8CA) (attr smd) - (fp_text reference C66 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference C66 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 22pF (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 22pF (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 332 N-000119) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 332 N-000119)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -7025,26 +4766,22 @@ (at 130.175 61.595) (path /4BF03683/33A7DC91) (attr smd) - (fp_text reference C23 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference C23 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 100nF (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 100nF (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 234 /graphic/VOSC) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 234 /graphic/VOSC)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -7056,26 +4793,22 @@ (at 338.201 84.709 180) (path /4BF03681/0F47DCB8) (attr smd) - (fp_text reference C16 (at 0 0 450) (layer Dessous.SilkS) + (fp_text reference C16 (at 0 0 450) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 100nF (at 0 0 450) (layer Dessous.SilkS) hide + (fp_text value 100nF (at 0 0 450) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 331 N-000118) - ) - (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 331 N-000118)) + (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -7087,26 +4820,22 @@ (at 325.755 87.249) (path /4BF03681/0939A342) (attr smd) - (fp_text reference C15 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference C15 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 100nF (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 100nF (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 4 +5V) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 4 +5V)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -7118,26 +4847,22 @@ (at 324.231 81.915 90) (path /4BF03681/BF69A17B) (attr smd) - (fp_text reference C14 (at 0 0 360) (layer Dessous.SilkS) + (fp_text reference C14 (at 0 0 360) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 100nF (at 0 0 360) (layer Dessous.SilkS) hide + (fp_text value 100nF (at 0 0 360) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 90) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 297 /pal-ntsc.sch/VAF) - ) - (pad 2 smd rect (at 1.651 0 90) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 90) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 297 /pal-ntsc.sch/VAF)) + (pad 2 smd rect (at 1.651 0 90) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -7149,26 +4874,22 @@ (at 326.009 64.643) (path /4BF03681/BF69A176) (attr smd) - (fp_text reference C13 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference C13 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 100nF (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 100nF (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 297 /pal-ntsc.sch/VAF) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 297 /pal-ntsc.sch/VAF)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -7180,26 +4901,22 @@ (at 345.567 80.391 90) (path /4BF03681/BF69A171) (attr smd) - (fp_text reference C12 (at 0 0 360) (layer Dessous.SilkS) + (fp_text reference C12 (at 0 0 360) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 100nF (at 0 0 360) (layer Dessous.SilkS) hide + (fp_text value 100nF (at 0 0 360) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 90) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 297 /pal-ntsc.sch/VAF) - ) - (pad 2 smd rect (at 1.651 0 90) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 90) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 297 /pal-ntsc.sch/VAF)) + (pad 2 smd rect (at 1.651 0 90) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -7211,26 +4928,22 @@ (at 319.278 69.977 90) (path /4BF03681/BF69A167) (attr smd) - (fp_text reference C11 (at 0 0 360) (layer Dessous.SilkS) + (fp_text reference C11 (at 0 0 360) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 100nF (at 0 0 360) (layer Dessous.SilkS) hide + (fp_text value 100nF (at 0 0 360) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 90) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 4 +5V) - ) - (pad 2 smd rect (at 1.651 0 90) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 90) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 4 +5V)) + (pad 2 smd rect (at 1.651 0 90) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -7242,26 +4955,22 @@ (at 357.759 127.635 180) (path /4BF03689/335F5DF2) (attr smd) - (fp_text reference C32 (at 0 0 450) (layer Dessous.SilkS) + (fp_text reference C32 (at 0 0 450) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 100nF (at 0 0 450) (layer Dessous.SilkS) hide + (fp_text value 100nF (at 0 0 450) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) - (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 370 N-000363) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) + (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 370 N-000363)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -7273,26 +4982,22 @@ (at 67.945 85.217 270) (path /4BF0367F/22761098) (attr smd) - (fp_text reference R9 (at 0 0 540) (layer Dessous.SilkS) + (fp_text reference R9 (at 0 0 540) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 150K (at 0 0 540) (layer Dessous.SilkS) hide + (fp_text value 150K (at 0 0 540) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 270) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 310 N-000088) - ) - (pad 2 smd rect (at 1.651 0 270) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 315 N-000093) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 270) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 310 N-000088)) + (pad 2 smd rect (at 1.651 0 270) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 315 N-000093)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -7304,26 +5009,22 @@ (at 80.391 136.779) (path /4BF0367F/22761043) (attr smd) - (fp_text reference R32 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference R32 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 470 (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 470 (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 305 N-000083) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 305 N-000083)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -7335,26 +5036,22 @@ (at 80.391 133.731) (path /4BF0367F/22761070) (attr smd) - (fp_text reference R33 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference R33 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 470 (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 470 (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 312 N-000090) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 312 N-000090)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -7366,26 +5063,22 @@ (at 313.69 132.08 180) (path /4BF03689/A44C0343) (attr smd) - (fp_text reference R23 (at 0 0 270) (layer Dessus.SilkS) + (fp_text reference R23 (at 0 0 270) (layer F.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127))) ) - (fp_text value 220 (at 0 0 270) (layer Dessus.SilkS) hide + (fp_text value 220 (at 0 0 270) (layer F.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127))) ) - (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer Dessus.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 14 /ESVIDEO-RVB/GREEN_IN) - ) - (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 363 N-000350) - ) + (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 14 /ESVIDEO-RVB/GREEN_IN)) + (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 363 N-000350)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -7397,26 +5090,22 @@ (at 358.521 58.293) (path /4BF03681/821CDAC2) (attr smd) - (fp_text reference C1 (at 0 0 90) (layer Dessus.SilkS) + (fp_text reference C1 (at 0 0 90) (layer F.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127))) ) - (fp_text value 100nF (at 0 0 90) (layer Dessus.SilkS) hide + (fp_text value 100nF (at 0 0 90) (layer F.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127))) ) - (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer Dessus.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 329 N-000116) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 334 N-000122) - ) + (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 329 N-000116)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 334 N-000122)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -7428,26 +5117,22 @@ (at 345.567 67.437 90) (path /4BF03681/A9CA7F6B) (attr smd) - (fp_text reference C2 (at 0 0 360) (layer Dessous.SilkS) + (fp_text reference C2 (at 0 0 360) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 100nF (at 0 0 360) (layer Dessous.SilkS) hide + (fp_text value 100nF (at 0 0 360) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 90) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 297 /pal-ntsc.sch/VAF) - ) - (pad 2 smd rect (at 1.651 0 90) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 90) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 297 /pal-ntsc.sch/VAF)) + (pad 2 smd rect (at 1.651 0 90) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -7459,26 +5144,22 @@ (at 358.14 73.787 270) (path /4BF03681/A9CA7F75) (attr smd) - (fp_text reference C3 (at 0 0 360) (layer Dessus.SilkS) + (fp_text reference C3 (at 0 0 360) (layer F.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127))) ) - (fp_text value 100nF (at 0 0 360) (layer Dessus.SilkS) hide + (fp_text value 100nF (at 0 0 360) (layer F.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127))) ) - (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer Dessus.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 270) (size 1.524 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 338 N-000126) - ) - (pad 2 smd rect (at 1.651 0 270) (size 1.524 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 14 /ESVIDEO-RVB/GREEN_IN) - ) + (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 270) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 338 N-000126)) + (pad 2 smd rect (at 1.651 0 270) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 14 /ESVIDEO-RVB/GREEN_IN)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -7490,26 +5171,22 @@ (at 339.598 131.318 180) (path /4BF03689/A44C034D) (attr smd) - (fp_text reference R24 (at 0 0 270) (layer Dessus.SilkS) + (fp_text reference R24 (at 0 0 270) (layer F.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127))) ) - (fp_text value 220 (at 0 0 270) (layer Dessus.SilkS) hide + (fp_text value 220 (at 0 0 270) (layer F.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127))) ) - (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer Dessus.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 290 /pal-ntsc.sch/RED_IN) - ) - (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 364 N-000351) - ) + (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 290 /pal-ntsc.sch/RED_IN)) + (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 364 N-000351)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -7521,26 +5198,22 @@ (at 344.297 84.709) (path /4BF03681/A9CA7FC5) (attr smd) - (fp_text reference R27 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference R27 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 27K (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 27K (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 342 N-000130) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 328 N-000115) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 342 N-000130)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 328 N-000115)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -7552,26 +5225,22 @@ (at 355.981 78.105) (path /4BF03681/A9CA7F7A) (attr smd) - (fp_text reference C4 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference C4 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 100nF (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 100nF (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 337 N-000125) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 290 /pal-ntsc.sch/RED_IN) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 337 N-000125)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 290 /pal-ntsc.sch/RED_IN)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -7583,26 +5252,22 @@ (at 346.202 97.282 270) (path /4BF03681/A9CA7FAC) (attr smd) - (fp_text reference C5 (at 0 0 540) (layer Dessous.SilkS) + (fp_text reference C5 (at 0 0 540) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 100nF (at 0 0 540) (layer Dessous.SilkS) hide + (fp_text value 100nF (at 0 0 540) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 270) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 335 N-000123) - ) - (pad 2 smd rect (at 1.651 0 270) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 341 N-000129) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 270) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 335 N-000123)) + (pad 2 smd rect (at 1.651 0 270) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 341 N-000129)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -7614,26 +5279,22 @@ (at 345.567 73.279 90) (path /4BF03681/A9CA7FB1) (attr smd) - (fp_text reference C6 (at 0 0 360) (layer Dessous.SilkS) + (fp_text reference C6 (at 0 0 360) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 100nF (at 0 0 360) (layer Dessous.SilkS) hide + (fp_text value 100nF (at 0 0 360) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 90) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 330 N-000117) - ) - (pad 2 smd rect (at 1.651 0 90) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 90) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 330 N-000117)) + (pad 2 smd rect (at 1.651 0 90) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -7645,26 +5306,22 @@ (at 344.297 87.757) (path /4BF03681/BF69A162) (attr smd) - (fp_text reference C10 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference C10 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 100nF (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 100nF (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 4 +5V) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 4 +5V)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -7676,26 +5333,22 @@ (at 355.346 94.615 90) (path /4BF03681/B1754313) (attr smd) - (fp_text reference R25 (at 0 0 360) (layer Dessous.SilkS) + (fp_text reference R25 (at 0 0 360) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 220K (at 0 0 360) (layer Dessous.SilkS) hide + (fp_text value 220K (at 0 0 360) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 90) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 332 N-000119) - ) - (pad 2 smd rect (at 1.651 0 90) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 333 N-000120) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 90) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 332 N-000119)) + (pad 2 smd rect (at 1.651 0 90) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 333 N-000120)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -7707,26 +5360,22 @@ (at 338.201 87.757 180) (path /4BF03681/A9CA7FB6) (attr smd) - (fp_text reference C7 (at 0 0 450) (layer Dessous.SilkS) + (fp_text reference C7 (at 0 0 450) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 100nF (at 0 0 450) (layer Dessous.SilkS) hide + (fp_text value 100nF (at 0 0 450) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 328 N-000115) - ) - (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 328 N-000115)) + (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -7738,26 +5387,22 @@ (at 333.883 64.897) (path /4BF03681/BF69A15D) (attr smd) - (fp_text reference C9 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference C9 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 100nF (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 100nF (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 4 +5V) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 4 +5V)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -7769,26 +5414,22 @@ (at 123.825 63.119) (path /4BF03683/33A7DCE3) (attr smd) - (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 0.762 0.508) (thickness 0.127))) ) - (fp_text value 10 (at 0 0 90) (layer Dessus.SilkS) hide + (fp_text value 10 (at 0 0 90) (layer F.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127))) ) - (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer Dessus.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 234 /graphic/VOSC) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) + (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 234 /graphic/VOSC)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 4 +5V)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -7800,26 +5441,22 @@ (at 355.981 81.153) (path /4BF03681/8116F4A5) (attr smd) - (fp_text reference R2 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference R2 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 100 (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 100 (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 286 /pal-ntsc.sch/C-VIDEO) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 337 N-000125) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 286 /pal-ntsc.sch/C-VIDEO)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 337 N-000125)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -7831,26 +5468,22 @@ (at 358.14 72.263 270) (path /4BF03681/8116F4AA) (attr smd) - (fp_text reference R3 (at 0 0 540) (layer Dessous.SilkS) + (fp_text reference R3 (at 0 0 540) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 100 (at 0 0 540) (layer Dessous.SilkS) hide + (fp_text value 100 (at 0 0 540) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 270) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 299 /pal-ntsc.sch/Y-VIDEO) - ) - (pad 2 smd rect (at 1.651 0 270) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 338 N-000126) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 270) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 299 /pal-ntsc.sch/Y-VIDEO)) + (pad 2 smd rect (at 1.651 0 270) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 338 N-000126)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -7862,26 +5495,22 @@ (at 67.945 111.887) (path /4BF0367F/33A51A4E) (attr smd) - (fp_text reference R4 (at 0 0 90) (layer Dessus.SilkS) + (fp_text reference R4 (at 0 0 90) (layer F.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127))) ) - (fp_text value 10K (at 0 0 90) (layer Dessus.SilkS) hide + (fp_text value 10K (at 0 0 90) (layer F.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127))) ) - (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer Dessus.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 325 N-000104) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) + (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 325 N-000104)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 4 +5V)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -7893,26 +5522,22 @@ (at 348.234 131.699 180) (path /4BF03689/A4586827) (attr smd) - (fp_text reference R8 (at 0 0 270) (layer Dessus.SilkS) + (fp_text reference R8 (at 0 0 270) (layer F.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127))) ) - (fp_text value 150 (at 0 0 270) (layer Dessus.SilkS) hide + (fp_text value 150 (at 0 0 270) (layer F.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127))) ) - (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer Dessus.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 372 N-000369) - ) - (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 372 N-000369)) + (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -7924,26 +5549,22 @@ (at 108.331 86.741) (path /4BF03683/33A7E0B2) (attr smd) - (fp_text reference R48 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference R48 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 10K (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 10K (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 4 +5V) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 348 N-000183) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 4 +5V)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 348 N-000183)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -7955,26 +5576,22 @@ (at 70.739 76.835 180) (path /4BF0367F/22760F80) (attr smd) - (fp_text reference R10 (at 0 0 270) (layer Dessus.SilkS) + (fp_text reference R10 (at 0 0 270) (layer F.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127))) ) - (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 0.762 0.508) (thickness 0.127))) ) - (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer Dessus.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 306 N-000084) - ) - (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 307 N-000085) - ) + (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 306 N-000084)) + (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 307 N-000085)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -7986,26 +5603,22 @@ (at 77.343 76.835) (path /4BF0367F/22760FBC) (attr smd) - (fp_text reference R11 (at 0 0 90) (layer Dessus.SilkS) + (fp_text reference R11 (at 0 0 90) (layer F.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127))) ) - (fp_text value 1K (at 0 0 90) (layer Dessus.SilkS) hide + (fp_text value 1K (at 0 0 90) (layer F.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127))) ) - (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer Dessus.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 314 N-000092) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 311 N-000089) - ) + (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 314 N-000092)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 311 N-000089)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -8017,26 +5630,22 @@ (at 355.727 72.263 90) (path /4BF03681/A9CA7FCA) (attr smd) - (fp_text reference R12 (at 0 0 360) (layer Dessous.SilkS) + (fp_text reference R12 (at 0 0 360) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 1K (at 0 0 360) (layer Dessous.SilkS) hide + (fp_text value 1K (at 0 0 360) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 90) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 330 N-000117) - ) - (pad 2 smd rect (at 1.651 0 90) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 297 /pal-ntsc.sch/VAF) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 90) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 330 N-000117)) + (pad 2 smd rect (at 1.651 0 90) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 297 /pal-ntsc.sch/VAF)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -8048,26 +5657,22 @@ (at 358.521 63.627 180) (path /4BF03681/821CDA9A) (attr smd) - (fp_text reference R14 (at 0 0 270) (layer Dessus.SilkS) + (fp_text reference R14 (at 0 0 270) (layer F.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127))) ) - (fp_text value 1M (at 0 0 270) (layer Dessus.SilkS) hide + (fp_text value 1M (at 0 0 270) (layer F.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127))) ) - (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer Dessus.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 334 N-000122) - ) - (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 334 N-000122)) + (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -8079,26 +5684,22 @@ (at 321.437 120.015 270) (path /4BF03689/A44D982A) (attr smd) - (fp_text reference R15 (at 0 0 540) (layer Dessous.SilkS) + (fp_text reference R15 (at 0 0 540) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 1M (at 0 0 540) (layer Dessous.SilkS) hide + (fp_text value 1M (at 0 0 540) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 270) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) - (pad 2 smd rect (at 1.651 0 270) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 358 N-000345) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 270) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) + (pad 2 smd rect (at 1.651 0 270) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 358 N-000345)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -8110,26 +5711,22 @@ (at 79.883 122.555 90) (path /4BF0367F/2276103E) (attr smd) - (fp_text reference R16 (at 0 0 360) (layer Dessous.SilkS) + (fp_text reference R16 (at 0 0 360) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 220 (at 0 0 360) (layer Dessous.SilkS) hide + (fp_text value 220 (at 0 0 360) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 90) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 313 N-000091) - ) - (pad 2 smd rect (at 1.651 0 90) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 243 /modul/CHROM) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 90) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 313 N-000091)) + (pad 2 smd rect (at 1.651 0 90) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 243 /modul/CHROM)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -8141,26 +5738,22 @@ (at 75.565 122.555 90) (path /4BF0367F/2276107A) (attr smd) - (fp_text reference R17 (at 0 0 360) (layer Dessous.SilkS) + (fp_text reference R17 (at 0 0 360) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 220 (at 0 0 360) (layer Dessous.SilkS) hide + (fp_text value 220 (at 0 0 360) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 90) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 303 N-000081) - ) - (pad 2 smd rect (at 1.651 0 90) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 248 /modul/LUM) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 90) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 303 N-000081)) + (pad 2 smd rect (at 1.651 0 90) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 248 /modul/LUM)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -8172,26 +5765,22 @@ (at 70.739 85.217 270) (path /4BF0367F/22761093) (attr smd) - (fp_text reference R18 (at 0 0 540) (layer Dessous.SilkS) + (fp_text reference R18 (at 0 0 540) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 220 (at 0 0 540) (layer Dessous.SilkS) hide + (fp_text value 220 (at 0 0 540) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 270) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 304 N-000082) - ) - (pad 2 smd rect (at 1.651 0 270) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 246 /modul/CVBS) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 270) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 304 N-000082)) + (pad 2 smd rect (at 1.651 0 270) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 246 /modul/CVBS)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -8203,26 +5792,22 @@ (at 343.408 97.282 90) (path /4BF03681/A9CA7FA7) (attr smd) - (fp_text reference R19 (at 0 0 360) (layer Dessous.SilkS) + (fp_text reference R19 (at 0 0 360) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 220 (at 0 0 360) (layer Dessous.SilkS) hide + (fp_text value 220 (at 0 0 360) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 90) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 341 N-000129) - ) - (pad 2 smd rect (at 1.651 0 90) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 340 N-000128) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 90) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 341 N-000129)) + (pad 2 smd rect (at 1.651 0 90) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 340 N-000128)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -8234,26 +5819,22 @@ (at 343.027 58.039) (path /4BF03681/B176B9C3) (attr smd) - (fp_text reference R20 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference R20 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 220 (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 220 (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 339 N-000127) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 300 /pal-ntsc.sch/Y_SYNC) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 339 N-000127)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 300 /pal-ntsc.sch/Y_SYNC)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -8265,26 +5846,22 @@ (at 294.767 131.572) (path /4BF03689/A44C0334) (attr smd) - (fp_text reference R22 (at 0 0 90) (layer Dessus.SilkS) + (fp_text reference R22 (at 0 0 90) (layer F.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127))) ) - (fp_text value 220 (at 0 0 90) (layer Dessus.SilkS) hide + (fp_text value 220 (at 0 0 90) (layer F.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127))) ) - (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer Dessus.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 6 /ESVIDEO-RVB/BLUE_IN) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 361 N-000348) - ) + (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 6 /ESVIDEO-RVB/BLUE_IN)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 361 N-000348)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -8296,26 +5873,22 @@ (at 81.407 102.743 180) (path /4BF0367F/22760FDF) (attr smd) - (fp_text reference R31 (at 0 0 450) (layer Dessous.SilkS) + (fp_text reference R31 (at 0 0 450) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 470 (at 0 0 450) (layer Dessous.SilkS) hide + (fp_text value 470 (at 0 0 450) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) - (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 308 N-000086) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) + (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 308 N-000086)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -8327,26 +5900,22 @@ (at 309.372 121.285 180) (path /4BF03689/5D7688E4) (attr smd) - (fp_text reference R37 (at 0 0 450) (layer Dessous.SilkS) + (fp_text reference R37 (at 0 0 450) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 510 (at 0 0 450) (layer Dessous.SilkS) hide + (fp_text value 510 (at 0 0 450) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) - (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 19 /ESVIDEO-RVB/REF+) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) + (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 19 /ESVIDEO-RVB/REF+)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -8358,26 +5927,22 @@ (at 304.165 117.729) (path /4BF03689/A44C03AC) (attr smd) - (fp_text reference R38 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference R38 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 510 (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 510 (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 368 N-000360) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 368 N-000360)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -8389,26 +5954,22 @@ (at 67.945 114.046) (path /4BF03689/A44C0348) (attr smd) - (fp_text reference R47 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference R47 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 75 (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 75 (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 290 /pal-ntsc.sch/RED_IN) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 290 /pal-ntsc.sch/RED_IN)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -8420,26 +5981,22 @@ (at 81.407 99.441) (path /4BF0367F/22760FE4) (attr smd) - (fp_text reference R30 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference R30 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 3,3K (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 3,3K (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 308 N-000086) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 245 /modul/CSYNC-OUT) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 308 N-000086)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 245 /modul/CSYNC-OUT)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -8451,26 +6008,22 @@ (at 75.057 136.779) (path /4BF0367F/22761048) (attr smd) - (fp_text reference R39 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference R39 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 68 (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 68 (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 244 /modul/COUT) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 305 N-000083) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 244 /modul/COUT)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 305 N-000083)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -8482,26 +6035,22 @@ (at 349.123 58.039 180) (path /4BF03681/B176B9C8) (attr smd) - (fp_text reference C8 (at 0 0 450) (layer Dessous.SilkS) + (fp_text reference C8 (at 0 0 450) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 100nF (at 0 0 450) (layer Dessous.SilkS) hide + (fp_text value 100nF (at 0 0 450) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 336 N-000124) - ) - (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 339 N-000127) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 336 N-000124)) + (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 339 N-000127)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -8513,26 +6062,22 @@ (at 75.057 133.731 180) (path /4BF0367F/22761075) (attr smd) - (fp_text reference R40 (at 0 0 450) (layer Dessous.SilkS) + (fp_text reference R40 (at 0 0 450) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 68 (at 0 0 450) (layer Dessous.SilkS) hide + (fp_text value 68 (at 0 0 450) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 312 N-000090) - ) - (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 249 /modul/YOUT) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 312 N-000090)) + (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 249 /modul/YOUT)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -8544,26 +6089,22 @@ (at 68.707 98.933 180) (path /4BF0367F/22761089) (attr smd) - (fp_text reference R34 (at 0 0 450) (layer Dessous.SilkS) + (fp_text reference R34 (at 0 0 450) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 470 (at 0 0 450) (layer Dessous.SilkS) hide + (fp_text value 470 (at 0 0 450) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 309 N-000087) - ) - (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 309 N-000087)) + (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -8575,26 +6116,22 @@ (at 352.679 60.833 180) (path /4BF03681/821CDAB8) (attr smd) - (fp_text reference R35 (at 0 0 270) (layer Dessus.SilkS) + (fp_text reference R35 (at 0 0 270) (layer F.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127))) ) - (fp_text value 470 (at 0 0 270) (layer Dessus.SilkS) hide + (fp_text value 470 (at 0 0 270) (layer F.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127))) ) - (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer Dessus.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 329 N-000116) - ) - (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 300 /pal-ntsc.sch/Y_SYNC) - ) + (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 329 N-000116)) + (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 300 /pal-ntsc.sch/Y_SYNC)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -8606,26 +6143,22 @@ (at 316.357 120.015 90) (path /4BF03689/A44D9843) (attr smd) - (fp_text reference R36 (at 0 0 360) (layer Dessous.SilkS) + (fp_text reference R36 (at 0 0 360) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 470 (at 0 0 360) (layer Dessous.SilkS) hide + (fp_text value 470 (at 0 0 360) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 90) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 359 N-000346) - ) - (pad 2 smd rect (at 1.651 0 90) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 369 N-000361) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 90) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 359 N-000346)) + (pad 2 smd rect (at 1.651 0 90) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 369 N-000361)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -8637,26 +6170,22 @@ (at 68.707 95.631) (path /4BF0367F/2276108E) (attr smd) - (fp_text reference R41 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference R41 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 68 (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 68 (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 247 /modul/CVBSOUT) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 309 N-000087) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 247 /modul/CVBSOUT)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 309 N-000087)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -8668,26 +6197,22 @@ (at 75.057 145.923 180) (path /4BF03689/84DFB9D2) (attr smd) - (fp_text reference R42 (at 0 0 450) (layer Dessous.SilkS) + (fp_text reference R42 (at 0 0 450) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 75 (at 0 0 450) (layer Dessous.SilkS) hide + (fp_text value 75 (at 0 0 450) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) - (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 242 /modul/BLEU) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) + (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 242 /modul/BLEU)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -8699,26 +6224,22 @@ (at 75.057 142.875 180) (path /4BF03689/84DFB9D7) (attr smd) - (fp_text reference R43 (at 0 0 450) (layer Dessous.SilkS) + (fp_text reference R43 (at 0 0 450) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 75 (at 0 0 450) (layer Dessous.SilkS) hide + (fp_text value 75 (at 0 0 450) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) - (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 13 /ESVIDEO-RVB/GREEN) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) + (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 13 /ESVIDEO-RVB/GREEN)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -8730,26 +6251,22 @@ (at 66.548 107.696 270) (path /4BF03689/A44C0339) (attr smd) - (fp_text reference R46 (at 0 0 540) (layer Dessous.SilkS) + (fp_text reference R46 (at 0 0 540) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 75 (at 0 0 540) (layer Dessous.SilkS) hide + (fp_text value 75 (at 0 0 540) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 270) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 6 /ESVIDEO-RVB/BLUE_IN) - ) - (pad 2 smd rect (at 1.651 0 270) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 270) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 6 /ESVIDEO-RVB/BLUE_IN)) + (pad 2 smd rect (at 1.651 0 270) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -8761,26 +6278,22 @@ (at 67.945 116.205) (path /4BF03689/A44C032F) (attr smd) - (fp_text reference R45 (at 0 0 90) (layer Dessus.SilkS) + (fp_text reference R45 (at 0 0 90) (layer F.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127))) ) - (fp_text value 75 (at 0 0 90) (layer Dessus.SilkS) hide + (fp_text value 75 (at 0 0 90) (layer F.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127))) ) - (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer Dessus.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 14 /ESVIDEO-RVB/GREEN_IN) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 14 /ESVIDEO-RVB/GREEN_IN)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -8792,26 +6305,22 @@ (at 75.057 139.827 180) (path /4BF03689/84DFB9DC) (attr smd) - (fp_text reference R44 (at 0 0 450) (layer Dessous.SilkS) + (fp_text reference R44 (at 0 0 450) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 75 (at 0 0 450) (layer Dessous.SilkS) hide + (fp_text value 75 (at 0 0 450) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) - (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 5 /ESVIDEO-RVB/BLUE) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) + (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 5 /ESVIDEO-RVB/BLUE)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -8825,29 +6334,25 @@ (tags "QUARTZ DEV") (path /4BF03683/B3BF4ED4) (autoplace_cost180 10) - (fp_text reference X1 (at 0 0.381 180) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text reference X1 (at 0 0.381 180) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) - (fp_text value 10MHz (at -5.588 -2.032 180) (layer Dessus.SilkS) + (fp_text value 10MHz (at -5.588 -2.032 180) (layer F.SilkS) (effects (font (size 1.27 1.27) (thickness 0.254))) ) - (fp_line (start -6.985 -1.27) (end -5.715 -2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.715 -2.54) (end 6.985 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 6.985 1.27) (end 5.715 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -6.985 1.27) (end -5.715 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.715 -2.54) (end 5.715 -2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -6.985 -1.27) (end -6.985 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.715 2.54) (end 5.715 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 6.985 1.27) (end 6.985 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -2.54 0 180) (size 1.778 1.778) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 344 N-000162) - ) - (pad 2 thru_hole circle (at 2.54 0 180) (size 1.778 1.778) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 238 /graphic/XTAL_I) - ) - (model discret/crystal_hc18u_vertical.wrl + (fp_line (start -6.985 -1.27) (end -5.715 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.715 -2.54) (end 6.985 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 6.985 1.27) (end 5.715 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -6.985 1.27) (end -5.715 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.715 -2.54) (end 5.715 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -6.985 -1.27) (end -6.985 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.715 2.54) (end 5.715 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 6.985 1.27) (end 6.985 -1.27) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -2.54 0 180) (size 1.778 1.778) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 344 N-000162)) + (pad 2 thru_hole circle (at 2.54 0 180) (size 1.778 1.778) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 238 /graphic/XTAL_I)) + (model discret/xtal/crystal_hc18u_vertical.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) @@ -8859,17 +6364,15 @@ (descr "module 1 pin (ou trou mecanique de percage)") (tags DEV) (path /4BF03683/4BF036DA) - (fp_text reference P11 (at 0 -1.26746) (layer Dessus.SilkS) + (fp_text reference P11 (at 0 -1.26746) (layer F.SilkS) (effects (font (size 0.508 0.508) (thickness 0.127))) ) - (fp_text value CONN_1 (at 0 1.27) (layer Dessus.SilkS) hide + (fp_text value CONN_1 (at 0 1.27) (layer F.SilkS) hide (effects (font (size 0.508 0.508) (thickness 0.127))) ) - (fp_circle (center 0 0) (end -0.254 -0.762) (layer Dessus.SilkS) (width 0.127)) - (pad 1 thru_hole circle (at 0 0) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.Mask Dessus.SilkS) - (net 346 N-000177) - ) + (fp_circle (center 0 0) (end -0.254 -0.762) (layer F.SilkS) (width 0.127)) + (pad 1 thru_hole circle (at 0 0) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.Mask F.SilkS) + (net 346 N-000177)) (model pin_array/pin_array_1x1.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -8882,17 +6385,15 @@ (descr "module 1 pin (ou trou mecanique de percage)") (tags DEV) (path /4BF03683/4BF036D9) - (fp_text reference P10 (at 0 -1.26746) (layer Dessus.SilkS) + (fp_text reference P10 (at 0 -1.26746) (layer F.SilkS) (effects (font (size 0.508 0.508) (thickness 0.127))) ) - (fp_text value CONN_1 (at 0 1.27) (layer Dessus.SilkS) hide + (fp_text value CONN_1 (at 0 1.27) (layer F.SilkS) hide (effects (font (size 0.508 0.508) (thickness 0.127))) ) - (fp_circle (center 0 0) (end -0.254 -0.762) (layer Dessus.SilkS) (width 0.127)) - (pad 1 thru_hole circle (at 0 0) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.Mask Dessus.SilkS) - (net 345 N-000163) - ) + (fp_circle (center 0 0) (end -0.254 -0.762) (layer F.SilkS) (width 0.127)) + (pad 1 thru_hole circle (at 0 0) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.Mask F.SilkS) + (net 345 N-000163)) (model pin_array/pin_array_1x1.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -8905,17 +6406,15 @@ (descr "module 1 pin (ou trou mecanique de percage)") (tags DEV) (path /4BF03683/34E1718B) - (fp_text reference P9 (at 0 -1.26746) (layer Dessus.SilkS) + (fp_text reference P9 (at 0 -1.26746) (layer F.SilkS) (effects (font (size 0.508 0.508) (thickness 0.127))) ) - (fp_text value CONN_1 (at 0 1.27) (layer Dessus.SilkS) hide + (fp_text value CONN_1 (at 0 1.27) (layer F.SilkS) hide (effects (font (size 0.508 0.508) (thickness 0.127))) ) - (fp_circle (center 0 0) (end -0.254 -0.762) (layer Dessus.SilkS) (width 0.127)) - (pad 1 thru_hole circle (at 0 0) (size 1.143 1.143) (drill 0.635) - (layers *.Cu *.Mask Dessus.SilkS) - (net 347 N-000178) - ) + (fp_circle (center 0 0) (end -0.254 -0.762) (layer F.SilkS) (width 0.127)) + (pad 1 thru_hole circle (at 0 0) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.Mask F.SilkS) + (net 347 N-000178)) (model pin_array/pin_array_1x1.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -8929,124 +6428,68 @@ (tags "CMS SOJ SO SOIC") (path /4BF03683/33A805F8) (attr smd) - (fp_text reference U2 (at 0 -1.26492) (layer Dessus.SilkS) + (fp_text reference U2 (at 0 -1.26492) (layer F.SilkS) (effects (font (size 1.27 1.27) (thickness 0.2032))) ) - (fp_text value 4C4001 (at 0 1.27) (layer Dessus.SilkS) + (fp_text value 4C4001 (at 0 1.27) (layer F.SilkS) (effects (font (size 1.27 1.27) (thickness 0.2032))) ) - (fp_line (start 8.89 -2.54) (end 8.89 3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 8.89 3.81) (end -8.89 3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -8.89 3.81) (end -8.89 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -8.89 -3.81) (end 8.89 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 8.89 -3.81) (end 8.89 -2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -8.89 -0.635) (end -7.62 -0.635) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -7.62 -0.635) (end -7.62 0.635) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -7.62 0.635) (end -8.89 0.635) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 smd rect (at -8.255 4.572) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 202 /graphic/ID0) - ) - (pad 2 smd rect (at -6.985 4.572) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 203 /graphic/ID1) - ) - (pad 3 smd rect (at -5.715 4.572) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 210 /graphic/IWR-) - ) - (pad 4 smd rect (at -4.445 4.572) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 207 /graphic/IRAS-) - ) - (pad 5 smd rect (at -3.175 4.572) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 200 /graphic/IA9) - ) - (pad 6 smd rect (at -1.905 4.572) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 191 /graphic/IA0) - ) - (pad 7 smd rect (at -0.635 4.572) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 192 /graphic/IA1) - ) - (pad 8 smd rect (at 0.635 4.572) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 193 /graphic/IA2) - ) - (pad 9 smd rect (at 1.905 4.572) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 194 /graphic/IA3) - ) - (pad 10 smd rect (at 3.175 4.572) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 11 smd rect (at 4.445 4.572) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 195 /graphic/IA4) - ) - (pad 12 smd rect (at 5.715 4.572) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 196 /graphic/IA5) - ) - (pad 13 smd rect (at 6.985 4.572) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 197 /graphic/IA6) - ) - (pad 14 smd rect (at 8.255 4.572) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 198 /graphic/IA7) - ) - (pad 15 smd rect (at 8.255 -4.572) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 199 /graphic/IA8) - ) - (pad 16 smd rect (at 6.985 -4.572) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 206 /graphic/IOE-) - ) - (pad 17 smd rect (at 5.715 -4.572) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 201 /graphic/ICAS-) - ) - (pad 18 smd rect (at 4.445 -4.572) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 204 /graphic/ID2) - ) - (pad 19 smd rect (at 3.175 -4.572) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 205 /graphic/ID3) - ) - (pad 20 smd rect (at 1.905 -4.572) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 21 smd rect (at 0.635 -4.572) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 22 smd rect (at -0.635 -4.572) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 23 smd rect (at -1.905 -4.572) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 24 smd rect (at -3.175 -4.572) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 25 smd rect (at -4.445 -4.572) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 26 smd rect (at -5.715 -4.572) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 27 smd rect (at -6.985 -4.572) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 28 smd rect (at -8.255 -4.572) (size 0.508 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - ) + (fp_line (start 8.89 -2.54) (end 8.89 3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 8.89 3.81) (end -8.89 3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -8.89 3.81) (end -8.89 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -8.89 -3.81) (end 8.89 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 8.89 -3.81) (end 8.89 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -8.89 -0.635) (end -7.62 -0.635) (layer F.SilkS) (width 0.3048)) + (fp_line (start -7.62 -0.635) (end -7.62 0.635) (layer F.SilkS) (width 0.3048)) + (fp_line (start -7.62 0.635) (end -8.89 0.635) (layer F.SilkS) (width 0.3048)) + (pad 1 smd rect (at -8.255 4.572) (size 0.508 1.27) (layers Composant F.Paste F.Mask) + (net 202 /graphic/ID0)) + (pad 2 smd rect (at -6.985 4.572) (size 0.508 1.27) (layers Composant F.Paste F.Mask) + (net 203 /graphic/ID1)) + (pad 3 smd rect (at -5.715 4.572) (size 0.508 1.27) (layers Composant F.Paste F.Mask) + (net 210 /graphic/IWR-)) + (pad 4 smd rect (at -4.445 4.572) (size 0.508 1.27) (layers Composant F.Paste F.Mask) + (net 207 /graphic/IRAS-)) + (pad 5 smd rect (at -3.175 4.572) (size 0.508 1.27) (layers Composant F.Paste F.Mask) + (net 200 /graphic/IA9)) + (pad 6 smd rect (at -1.905 4.572) (size 0.508 1.27) (layers Composant F.Paste F.Mask) + (net 191 /graphic/IA0)) + (pad 7 smd rect (at -0.635 4.572) (size 0.508 1.27) (layers Composant F.Paste F.Mask) + (net 192 /graphic/IA1)) + (pad 8 smd rect (at 0.635 4.572) (size 0.508 1.27) (layers Composant F.Paste F.Mask) + (net 193 /graphic/IA2)) + (pad 9 smd rect (at 1.905 4.572) (size 0.508 1.27) (layers Composant F.Paste F.Mask) + (net 194 /graphic/IA3)) + (pad 10 smd rect (at 3.175 4.572) (size 0.508 1.27) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 11 smd rect (at 4.445 4.572) (size 0.508 1.27) (layers Composant F.Paste F.Mask) + (net 195 /graphic/IA4)) + (pad 12 smd rect (at 5.715 4.572) (size 0.508 1.27) (layers Composant F.Paste F.Mask) + (net 196 /graphic/IA5)) + (pad 13 smd rect (at 6.985 4.572) (size 0.508 1.27) (layers Composant F.Paste F.Mask) + (net 197 /graphic/IA6)) + (pad 14 smd rect (at 8.255 4.572) (size 0.508 1.27) (layers Composant F.Paste F.Mask) + (net 198 /graphic/IA7)) + (pad 15 smd rect (at 8.255 -4.572) (size 0.508 1.27) (layers Composant F.Paste F.Mask) + (net 199 /graphic/IA8)) + (pad 16 smd rect (at 6.985 -4.572) (size 0.508 1.27) (layers Composant F.Paste F.Mask) + (net 206 /graphic/IOE-)) + (pad 17 smd rect (at 5.715 -4.572) (size 0.508 1.27) (layers Composant F.Paste F.Mask) + (net 201 /graphic/ICAS-)) + (pad 18 smd rect (at 4.445 -4.572) (size 0.508 1.27) (layers Composant F.Paste F.Mask) + (net 204 /graphic/ID2)) + (pad 19 smd rect (at 3.175 -4.572) (size 0.508 1.27) (layers Composant F.Paste F.Mask) + (net 205 /graphic/ID3)) + (pad 20 smd rect (at 1.905 -4.572) (size 0.508 1.27) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 21 smd rect (at 0.635 -4.572) (size 0.508 1.27) (layers Composant F.Paste F.Mask)) + (pad 22 smd rect (at -0.635 -4.572) (size 0.508 1.27) (layers Composant F.Paste F.Mask)) + (pad 23 smd rect (at -1.905 -4.572) (size 0.508 1.27) (layers Composant F.Paste F.Mask)) + (pad 24 smd rect (at -3.175 -4.572) (size 0.508 1.27) (layers Composant F.Paste F.Mask)) + (pad 25 smd rect (at -4.445 -4.572) (size 0.508 1.27) (layers Composant F.Paste F.Mask)) + (pad 26 smd rect (at -5.715 -4.572) (size 0.508 1.27) (layers Composant F.Paste F.Mask)) + (pad 27 smd rect (at -6.985 -4.572) (size 0.508 1.27) (layers Composant F.Paste F.Mask)) + (pad 28 smd rect (at -8.255 -4.572) (size 0.508 1.27) (layers Composant F.Paste F.Mask)) (model smd/cms_soj28.wrl (at (xyz 0 0 0)) (scale (xyz 0.5 0.55 0.5)) @@ -9058,111 +6501,63 @@ (at 73.914 85.09) (path /4BF0367F/22760F4E) (attr smd) - (fp_text reference U20 (at 0 -1.524) (layer Dessus.SilkS) + (fp_text reference U20 (at 0 -1.524) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value TDA8501 (at 0 1.524) (layer Dessus.SilkS) hide + (fp_text value TDA8501 (at 0 1.524) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start 7.62 -4.191) (end -7.62 -4.191) (layer Dessus.SilkS) (width 0.2032)) - (fp_line (start -7.62 -4.191) (end -7.62 4.191) (layer Dessus.SilkS) (width 0.2032)) - (fp_line (start -7.62 -0.635) (end -6.35 -0.635) (layer Dessus.SilkS) (width 0.2032)) - (fp_line (start -6.35 -0.635) (end -6.35 0.635) (layer Dessus.SilkS) (width 0.2032)) - (fp_line (start -6.35 0.635) (end -7.62 0.635) (layer Dessus.SilkS) (width 0.2032)) - (fp_line (start 7.62 4.191) (end 7.62 -4.191) (layer Dessus.SilkS) (width 0.2032)) - (fp_line (start -7.62 4.191) (end 7.62 4.191) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 smd rect (at -6.985 4.826) (size 0.762 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 2 smd rect (at -5.715 4.826) (size 0.762 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 325 N-000104) - ) - (pad 3 smd rect (at -4.445 4.826) (size 0.762 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 4 smd rect (at -3.175 4.826) (size 0.762 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 5 smd rect (at -1.905 4.826) (size 0.762 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 6 smd rect (at -0.635 4.826) (size 0.762 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 326 N-000108) - ) - (pad 7 smd rect (at 0.635 4.826) (size 0.762 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 327 N-000109) - ) - (pad 8 smd rect (at 1.905 4.826) (size 0.762 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 302 N-000079) - ) - (pad 9 smd rect (at 3.175 4.826) (size 0.762 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 320 N-000098) - ) - (pad 10 smd rect (at 4.445 4.826) (size 0.762 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 11 smd rect (at 5.715 4.826) (size 0.762 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 321 N-000099) - ) - (pad 12 smd rect (at 6.985 4.826) (size 0.762 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 323 N-000101) - ) - (pad 24 smd rect (at -6.985 -4.826) (size 0.762 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 322 N-000100) - ) - (pad 23 smd rect (at -5.715 -4.826) (size 0.762 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 316 N-000094) - ) - (pad 22 smd rect (at -4.445 -4.826) (size 0.762 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 307 N-000085) - ) - (pad 21 smd rect (at -3.175 -4.826) (size 0.762 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 315 N-000093) - ) - (pad 20 smd rect (at -1.905 -4.826) (size 0.762 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 314 N-000092) - ) - (pad 19 smd rect (at -0.635 -4.826) (size 0.762 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 248 /modul/LUM) - ) - (pad 18 smd rect (at 0.635 -4.826) (size 0.762 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 318 N-000096) - ) - (pad 17 smd rect (at 1.905 -4.826) (size 0.762 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 16 smd rect (at 3.175 -4.826) (size 0.762 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 246 /modul/CVBS) - ) - (pad 15 smd rect (at 4.445 -4.826) (size 0.762 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 317 N-000095) - ) - (pad 14 smd rect (at 5.715 -4.826) (size 0.762 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 243 /modul/CHROM) - ) - (pad 13 smd rect (at 6.985 -4.826) (size 0.762 1.27) - (layers Composant Dessus.Pate Dessus.Masque) - (net 311 N-000089) - ) + (fp_line (start 7.62 -4.191) (end -7.62 -4.191) (layer F.SilkS) (width 0.2032)) + (fp_line (start -7.62 -4.191) (end -7.62 4.191) (layer F.SilkS) (width 0.2032)) + (fp_line (start -7.62 -0.635) (end -6.35 -0.635) (layer F.SilkS) (width 0.2032)) + (fp_line (start -6.35 -0.635) (end -6.35 0.635) (layer F.SilkS) (width 0.2032)) + (fp_line (start -6.35 0.635) (end -7.62 0.635) (layer F.SilkS) (width 0.2032)) + (fp_line (start 7.62 4.191) (end 7.62 -4.191) (layer F.SilkS) (width 0.2032)) + (fp_line (start -7.62 4.191) (end 7.62 4.191) (layer F.SilkS) (width 0.3048)) + (pad 1 smd rect (at -6.985 4.826) (size 0.762 1.27) (layers Composant F.Paste F.Mask)) + (pad 2 smd rect (at -5.715 4.826) (size 0.762 1.27) (layers Composant F.Paste F.Mask) + (net 325 N-000104)) + (pad 3 smd rect (at -4.445 4.826) (size 0.762 1.27) (layers Composant F.Paste F.Mask)) + (pad 4 smd rect (at -3.175 4.826) (size 0.762 1.27) (layers Composant F.Paste F.Mask)) + (pad 5 smd rect (at -1.905 4.826) (size 0.762 1.27) (layers Composant F.Paste F.Mask)) + (pad 6 smd rect (at -0.635 4.826) (size 0.762 1.27) (layers Composant F.Paste F.Mask) + (net 326 N-000108)) + (pad 7 smd rect (at 0.635 4.826) (size 0.762 1.27) (layers Composant F.Paste F.Mask) + (net 327 N-000109)) + (pad 8 smd rect (at 1.905 4.826) (size 0.762 1.27) (layers Composant F.Paste F.Mask) + (net 302 N-000079)) + (pad 9 smd rect (at 3.175 4.826) (size 0.762 1.27) (layers Composant F.Paste F.Mask) + (net 320 N-000098)) + (pad 10 smd rect (at 4.445 4.826) (size 0.762 1.27) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 11 smd rect (at 5.715 4.826) (size 0.762 1.27) (layers Composant F.Paste F.Mask) + (net 321 N-000099)) + (pad 12 smd rect (at 6.985 4.826) (size 0.762 1.27) (layers Composant F.Paste F.Mask) + (net 323 N-000101)) + (pad 24 smd rect (at -6.985 -4.826) (size 0.762 1.27) (layers Composant F.Paste F.Mask) + (net 322 N-000100)) + (pad 23 smd rect (at -5.715 -4.826) (size 0.762 1.27) (layers Composant F.Paste F.Mask) + (net 316 N-000094)) + (pad 22 smd rect (at -4.445 -4.826) (size 0.762 1.27) (layers Composant F.Paste F.Mask) + (net 307 N-000085)) + (pad 21 smd rect (at -3.175 -4.826) (size 0.762 1.27) (layers Composant F.Paste F.Mask) + (net 315 N-000093)) + (pad 20 smd rect (at -1.905 -4.826) (size 0.762 1.27) (layers Composant F.Paste F.Mask) + (net 314 N-000092)) + (pad 19 smd rect (at -0.635 -4.826) (size 0.762 1.27) (layers Composant F.Paste F.Mask) + (net 248 /modul/LUM)) + (pad 18 smd rect (at 0.635 -4.826) (size 0.762 1.27) (layers Composant F.Paste F.Mask) + (net 318 N-000096)) + (pad 17 smd rect (at 1.905 -4.826) (size 0.762 1.27) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 16 smd rect (at 3.175 -4.826) (size 0.762 1.27) (layers Composant F.Paste F.Mask) + (net 246 /modul/CVBS)) + (pad 15 smd rect (at 4.445 -4.826) (size 0.762 1.27) (layers Composant F.Paste F.Mask) + (net 317 N-000095)) + (pad 14 smd rect (at 5.715 -4.826) (size 0.762 1.27) (layers Composant F.Paste F.Mask) + (net 243 /modul/CHROM)) + (pad 13 smd rect (at 6.985 -4.826) (size 0.762 1.27) (layers Composant F.Paste F.Mask) + (net 311 N-000089)) (model smd/cms_soj24.wrl (at (xyz 0 0 0)) (scale (xyz 0.5 0.6 0.5)) @@ -9176,403 +6571,203 @@ (tags "CMS PQFP") (path /4BF03683/33BA5628) (attr smd) - (fp_text reference U23 (at 0 -2.54) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.381))) - ) - (fp_text value XC4003/PQ100 (at 0 2.54) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) - ) - (fp_circle (center -8.255 5.207) (end -8.255 5.842) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -9.525 -6.223) (end 9.525 -6.223) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 9.525 -6.223) (end 9.525 6.477) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 9.525 6.477) (end -8.89 6.477) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -8.89 6.477) (end -9.525 6.477) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -9.525 6.477) (end -9.525 -6.223) (layer Dessus.SilkS) (width 0.3048)) - (pad 65 smd rect (at 0.3302 -8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 16 /ESVIDEO-RVB/PCA0) - ) - (pad 64 smd rect (at 0.9906 -8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 212 /graphic/PCA1) - ) - (pad 63 smd rect (at 1.6256 -8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 17 /ESVIDEO-RVB/PCA2) - ) - (pad 62 smd rect (at 2.286 -8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 61 smd rect (at 2.921 -8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 185 /graphic/CSIO-) - ) - (pad 60 smd rect (at 3.5814 -8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 59 smd rect (at 4.2418 -8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 230 /graphic/RESERV1) - ) - (pad 58 smd rect (at 4.8768 -8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 57 smd rect (at 5.5372 -8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 184 /graphic/CLK10MHz) - ) - (pad 56 smd rect (at 6.1722 -8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 238 /graphic/XTAL_I) - ) - (pad 55 smd rect (at 6.8326 -8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 213 /graphic/PROG*) - ) - (pad 54 smd rect (at 7.4676 -8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 53 smd rect (at 8.128 -8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 188 /graphic/DONE) - ) - (pad 52 smd rect (at 8.7884 -8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 51 smd rect (at 9.4234 -8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 347 N-000178) - ) - (pad 16 smd rect (at 0.3302 8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 220 /graphic/PTWR) - ) - (pad 17 smd rect (at 0.9906 8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 218 /graphic/PTBURST-) - ) - (pad 18 smd rect (at 1.6256 8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 108 /buspci.sch/PTATN-) - ) - (pad 19 smd rect (at 2.286 8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 111 /buspci.sch/PTRDY-) - ) - (pad 20 smd rect (at 2.921 8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 215 /graphic/PTBE-0) - ) - (pad 21 smd rect (at 3.5814 8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 109 /buspci.sch/PTBE-1) - ) - (pad 22 smd rect (at 4.2418 8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 216 /graphic/PTBE-2) - ) - (pad 23 smd rect (at 4.8768 8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 217 /graphic/PTBE-3) - ) - (pad 24 smd rect (at 5.5372 8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 214 /graphic/PTADR-) - ) - (pad 25 smd rect (at 6.1722 8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 348 N-000183) - ) - (pad 26 smd rect (at 6.8326 8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 27 smd rect (at 7.4676 8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 348 N-000183) - ) - (pad 28 smd rect (at 8.128 8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 29 smd rect (at 8.7884 8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 348 N-000183) - ) - (pad 30 smd rect (at 9.4234 8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 85 /buspci.sch/BPCLK) - ) - (pad 66 smd rect (at -0.3302 -8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 67 smd rect (at -0.9652 -8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 68 smd rect (at -1.6256 -8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 69 smd rect (at -2.2606 -8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 236 /graphic/WRCAD-) - ) - (pad 70 smd rect (at -2.921 -8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 178 /graphic/BT812_WR-) - ) - (pad 71 smd rect (at -3.5814 -8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 177 /graphic/BT812_RD-) - ) - (pad 72 smd rect (at -4.2164 -8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 18 /ESVIDEO-RVB/RDCDA-) - ) - (pad 73 smd rect (at -4.8768 -8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 237 /graphic/WRCDA-) - ) - (pad 74 smd rect (at -5.5118 -8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 228 /graphic/RDCAD-) - ) - (pad 75 smd rect (at -6.1722 -8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 187 /graphic/DIN) - ) - (pad 76 smd rect (at -6.8326 -8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 77 smd rect (at -7.4676 -8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 181 /graphic/CCLK) - ) - (pad 78 smd rect (at -8.128 -8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 79 smd rect (at -8.763 -8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 80 smd rect (at -9.4234 -8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 15 smd rect (at -0.3302 8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 14 smd rect (at -0.9652 8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 13 smd rect (at -1.6256 8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 7 /ESVIDEO-RVB/DPC0) - ) - (pad 12 smd rect (at -2.2606 8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 8 /ESVIDEO-RVB/DPC1) - ) - (pad 11 smd rect (at -2.921 8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 9 /ESVIDEO-RVB/DPC2) - ) - (pad 10 smd rect (at -3.5814 8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 9 smd rect (at -4.2164 8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 10 /ESVIDEO-RVB/DPC4) - ) - (pad 8 smd rect (at -4.8768 8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 11 /ESVIDEO-RVB/DPC5) - ) - (pad 7 smd rect (at -5.5118 8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 273 /muxdata/DPC3) - ) - (pad 6 smd rect (at -6.1722 8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 276 /muxdata/DPC6) - ) - (pad 5 smd rect (at -6.8326 8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 12 /ESVIDEO-RVB/DPC7) - ) - (pad 4 smd rect (at -7.4676 8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 3 smd rect (at -8.128 8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 2 smd rect (at -8.763 8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 1 smd rect (at -9.4234 8.001) (size 0.3302 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 291 /pal-ntsc.sch/RESET-) - ) - (pad 100 smd rect (at -11.049 6.1722) (size 2.032 0.3302) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 99 smd rect (at -11.049 5.5372) (size 2.032 0.3302) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 98 smd rect (at -11.049 4.8768) (size 2.032 0.3302) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 97 smd rect (at -11.049 4.2164) (size 2.032 0.3302) - (layers Composant Dessus.Pate Dessus.Masque) - (net 277 /muxdata/DPC8) - ) - (pad 96 smd rect (at -11.049 3.5814) (size 2.032 0.3302) - (layers Composant Dessus.Pate Dessus.Masque) - (net 278 /muxdata/DPC9) - ) - (pad 95 smd rect (at -11.049 2.921) (size 2.032 0.3302) - (layers Composant Dessus.Pate Dessus.Masque) - (net 253 /muxdata/DPC10) - ) - (pad 94 smd rect (at -11.049 2.286) (size 2.032 0.3302) - (layers Composant Dessus.Pate Dessus.Masque) - (net 254 /muxdata/DPC11) - ) - (pad 93 smd rect (at -11.049 1.6256) (size 2.032 0.3302) - (layers Composant Dessus.Pate Dessus.Masque) - (net 255 /muxdata/DPC12) - ) - (pad 92 smd rect (at -11.049 0.9652) (size 2.032 0.3302) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 91 smd rect (at -11.049 0.3302) (size 2.032 0.3302) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 31 smd rect (at 11.049 6.1722) (size 2.032 0.3302) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 32 smd rect (at 11.049 5.5372) (size 2.032 0.3302) - (layers Composant Dessus.Pate Dessus.Masque) - (net 219 /graphic/PTNUM1) - ) - (pad 33 smd rect (at 11.049 4.8768) (size 2.032 0.3302) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 34 smd rect (at 11.049 4.2164) (size 2.032 0.3302) - (layers Composant Dessus.Pate Dessus.Masque) - (net 110 /buspci.sch/PTNUM0) - ) - (pad 35 smd rect (at 11.049 3.5814) (size 2.032 0.3302) - (layers Composant Dessus.Pate Dessus.Masque) - (net 175 /graphic/BE-3) - ) - (pad 36 smd rect (at 11.049 2.921) (size 2.032 0.3302) - (layers Composant Dessus.Pate Dessus.Masque) - (net 174 /graphic/BE-2) - ) - (pad 37 smd rect (at 11.049 2.286) (size 2.032 0.3302) - (layers Composant Dessus.Pate Dessus.Masque) - (net 173 /graphic/BE-1) - ) - (pad 38 smd rect (at 11.049 1.6256) (size 2.032 0.3302) - (layers Composant Dessus.Pate Dessus.Masque) - (net 172 /graphic/BE-0) - ) - (pad 39 smd rect (at 11.049 0.9652) (size 2.032 0.3302) - (layers Composant Dessus.Pate Dessus.Masque) - (net 84 /buspci.sch/ADR6) - ) - (pad 40 smd rect (at 11.049 0.3302) (size 2.032 0.3302) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 90 smd rect (at -11.049 -0.3302) (size 2.032 0.3302) - (layers Composant Dessus.Pate Dessus.Masque) - (net 256 /muxdata/DPC13) - ) - (pad 89 smd rect (at -11.049 -0.9652) (size 2.032 0.3302) - (layers Composant Dessus.Pate Dessus.Masque) - (net 258 /muxdata/DPC15) - ) - (pad 88 smd rect (at -11.049 -1.6256) (size 2.032 0.3302) - (layers Composant Dessus.Pate Dessus.Masque) - (net 257 /muxdata/DPC14) - ) - (pad 87 smd rect (at -11.049 -2.286) (size 2.032 0.3302) - (layers Composant Dessus.Pate Dessus.Masque) - (net 345 N-000163) - ) - (pad 86 smd rect (at -11.049 -2.921) (size 2.032 0.3302) - (layers Composant Dessus.Pate Dessus.Masque) - (net 239 /graphic/X_CLK) - ) - (pad 85 smd rect (at -11.049 -3.5814) (size 2.032 0.3302) - (layers Composant Dessus.Pate Dessus.Masque) - (net 240 /graphic/X_DIN) - ) - (pad 84 smd rect (at -11.049 -4.2164) (size 2.032 0.3302) - (layers Composant Dessus.Pate Dessus.Masque) - (net 241 /graphic/X_PROG-) - ) - (pad 83 smd rect (at -11.049 -4.8768) (size 2.032 0.3302) - (layers Composant Dessus.Pate Dessus.Masque) - (net 285 /muxdata/X_DONE) - ) - (pad 82 smd rect (at -11.049 -5.5372) (size 2.032 0.3302) - (layers Composant Dessus.Pate Dessus.Masque) - (net 346 N-000177) - ) - (pad 81 smd rect (at -11.049 -6.1722) (size 2.032 0.3302) - (layers Composant Dessus.Pate Dessus.Masque) - (net 211 /graphic/LED) - ) - (pad 50 smd rect (at 11.049 -6.1722) (size 2.032 0.3302) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 49 smd rect (at 11.049 -5.5372) (size 2.032 0.3302) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 48 smd rect (at 11.049 -4.8768) (size 2.032 0.3302) - (layers Composant Dessus.Pate Dessus.Masque) - (net 168 /graphic/ADR2) - ) - (pad 47 smd rect (at 11.049 -4.2164) (size 2.032 0.3302) - (layers Composant Dessus.Pate Dessus.Masque) - (net 235 /graphic/WR-) - ) - (pad 46 smd rect (at 11.049 -3.5814) (size 2.032 0.3302) - (layers Composant Dessus.Pate Dessus.Masque) - (net 227 /graphic/RD-) - ) - (pad 45 smd rect (at 11.049 -2.921) (size 2.032 0.3302) - (layers Composant Dessus.Pate Dessus.Masque) - (net 231 /graphic/SELECT-) - ) - (pad 44 smd rect (at 11.049 -2.286) (size 2.032 0.3302) - (layers Composant Dessus.Pate Dessus.Masque) - (net 169 /graphic/ADR3) - ) - (pad 43 smd rect (at 11.049 -1.6256) (size 2.032 0.3302) - (layers Composant Dessus.Pate Dessus.Masque) - (net 170 /graphic/ADR4) - ) - (pad 42 smd rect (at 11.049 -0.9652) (size 2.032 0.3302) - (layers Composant Dessus.Pate Dessus.Masque) - (net 171 /graphic/ADR5) - ) - (pad 41 smd rect (at 11.049 -0.3302) (size 2.032 0.3302) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) + (fp_text reference U23 (at 0 -2.54) (layer F.SilkS) + (effects (font (thickness 0.381))) + ) + (fp_text value XC4003/PQ100 (at 0 2.54) (layer F.SilkS) + (effects (font (thickness 0.3048))) + ) + (fp_circle (center -8.255 5.207) (end -8.255 5.842) (layer F.SilkS) (width 0.3048)) + (fp_line (start -9.525 -6.223) (end 9.525 -6.223) (layer F.SilkS) (width 0.3048)) + (fp_line (start 9.525 -6.223) (end 9.525 6.477) (layer F.SilkS) (width 0.3048)) + (fp_line (start 9.525 6.477) (end -8.89 6.477) (layer F.SilkS) (width 0.3048)) + (fp_line (start -8.89 6.477) (end -9.525 6.477) (layer F.SilkS) (width 0.3048)) + (fp_line (start -9.525 6.477) (end -9.525 -6.223) (layer F.SilkS) (width 0.3048)) + (pad 65 smd rect (at 0.3302 -8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 16 /ESVIDEO-RVB/PCA0)) + (pad 64 smd rect (at 0.9906 -8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 212 /graphic/PCA1)) + (pad 63 smd rect (at 1.6256 -8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 17 /ESVIDEO-RVB/PCA2)) + (pad 62 smd rect (at 2.286 -8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask)) + (pad 61 smd rect (at 2.921 -8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 185 /graphic/CSIO-)) + (pad 60 smd rect (at 3.5814 -8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask)) + (pad 59 smd rect (at 4.2418 -8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 230 /graphic/RESERV1)) + (pad 58 smd rect (at 4.8768 -8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask)) + (pad 57 smd rect (at 5.5372 -8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 184 /graphic/CLK10MHz)) + (pad 56 smd rect (at 6.1722 -8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 238 /graphic/XTAL_I)) + (pad 55 smd rect (at 6.8326 -8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 213 /graphic/PROG*)) + (pad 54 smd rect (at 7.4676 -8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 53 smd rect (at 8.128 -8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 188 /graphic/DONE)) + (pad 52 smd rect (at 8.7884 -8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 51 smd rect (at 9.4234 -8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 347 N-000178)) + (pad 16 smd rect (at 0.3302 8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 220 /graphic/PTWR)) + (pad 17 smd rect (at 0.9906 8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 218 /graphic/PTBURST-)) + (pad 18 smd rect (at 1.6256 8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 108 /buspci.sch/PTATN-)) + (pad 19 smd rect (at 2.286 8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 111 /buspci.sch/PTRDY-)) + (pad 20 smd rect (at 2.921 8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 215 /graphic/PTBE-0)) + (pad 21 smd rect (at 3.5814 8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 109 /buspci.sch/PTBE-1)) + (pad 22 smd rect (at 4.2418 8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 216 /graphic/PTBE-2)) + (pad 23 smd rect (at 4.8768 8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 217 /graphic/PTBE-3)) + (pad 24 smd rect (at 5.5372 8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 214 /graphic/PTADR-)) + (pad 25 smd rect (at 6.1722 8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 348 N-000183)) + (pad 26 smd rect (at 6.8326 8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 27 smd rect (at 7.4676 8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 348 N-000183)) + (pad 28 smd rect (at 8.128 8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 29 smd rect (at 8.7884 8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 348 N-000183)) + (pad 30 smd rect (at 9.4234 8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 85 /buspci.sch/BPCLK)) + (pad 66 smd rect (at -0.3302 -8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 67 smd rect (at -0.9652 -8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 68 smd rect (at -1.6256 -8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask)) + (pad 69 smd rect (at -2.2606 -8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 236 /graphic/WRCAD-)) + (pad 70 smd rect (at -2.921 -8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 178 /graphic/BT812_WR-)) + (pad 71 smd rect (at -3.5814 -8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 177 /graphic/BT812_RD-)) + (pad 72 smd rect (at -4.2164 -8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 18 /ESVIDEO-RVB/RDCDA-)) + (pad 73 smd rect (at -4.8768 -8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 237 /graphic/WRCDA-)) + (pad 74 smd rect (at -5.5118 -8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 228 /graphic/RDCAD-)) + (pad 75 smd rect (at -6.1722 -8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 187 /graphic/DIN)) + (pad 76 smd rect (at -6.8326 -8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask)) + (pad 77 smd rect (at -7.4676 -8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 181 /graphic/CCLK)) + (pad 78 smd rect (at -8.128 -8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 79 smd rect (at -8.763 -8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask)) + (pad 80 smd rect (at -9.4234 -8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 15 smd rect (at -0.3302 8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 14 smd rect (at -0.9652 8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 13 smd rect (at -1.6256 8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 7 /ESVIDEO-RVB/DPC0)) + (pad 12 smd rect (at -2.2606 8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 8 /ESVIDEO-RVB/DPC1)) + (pad 11 smd rect (at -2.921 8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 9 /ESVIDEO-RVB/DPC2)) + (pad 10 smd rect (at -3.5814 8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask)) + (pad 9 smd rect (at -4.2164 8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 10 /ESVIDEO-RVB/DPC4)) + (pad 8 smd rect (at -4.8768 8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 11 /ESVIDEO-RVB/DPC5)) + (pad 7 smd rect (at -5.5118 8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 273 /muxdata/DPC3)) + (pad 6 smd rect (at -6.1722 8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 276 /muxdata/DPC6)) + (pad 5 smd rect (at -6.8326 8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 12 /ESVIDEO-RVB/DPC7)) + (pad 4 smd rect (at -7.4676 8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 3 smd rect (at -8.128 8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 2 smd rect (at -8.763 8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask)) + (pad 1 smd rect (at -9.4234 8.001) (size 0.3302 2.032) (layers Composant F.Paste F.Mask) + (net 291 /pal-ntsc.sch/RESET-)) + (pad 100 smd rect (at -11.049 6.1722) (size 2.032 0.3302) (layers Composant F.Paste F.Mask)) + (pad 99 smd rect (at -11.049 5.5372) (size 2.032 0.3302) (layers Composant F.Paste F.Mask)) + (pad 98 smd rect (at -11.049 4.8768) (size 2.032 0.3302) (layers Composant F.Paste F.Mask)) + (pad 97 smd rect (at -11.049 4.2164) (size 2.032 0.3302) (layers Composant F.Paste F.Mask) + (net 277 /muxdata/DPC8)) + (pad 96 smd rect (at -11.049 3.5814) (size 2.032 0.3302) (layers Composant F.Paste F.Mask) + (net 278 /muxdata/DPC9)) + (pad 95 smd rect (at -11.049 2.921) (size 2.032 0.3302) (layers Composant F.Paste F.Mask) + (net 253 /muxdata/DPC10)) + (pad 94 smd rect (at -11.049 2.286) (size 2.032 0.3302) (layers Composant F.Paste F.Mask) + (net 254 /muxdata/DPC11)) + (pad 93 smd rect (at -11.049 1.6256) (size 2.032 0.3302) (layers Composant F.Paste F.Mask) + (net 255 /muxdata/DPC12)) + (pad 92 smd rect (at -11.049 0.9652) (size 2.032 0.3302) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 91 smd rect (at -11.049 0.3302) (size 2.032 0.3302) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 31 smd rect (at 11.049 6.1722) (size 2.032 0.3302) (layers Composant F.Paste F.Mask)) + (pad 32 smd rect (at 11.049 5.5372) (size 2.032 0.3302) (layers Composant F.Paste F.Mask) + (net 219 /graphic/PTNUM1)) + (pad 33 smd rect (at 11.049 4.8768) (size 2.032 0.3302) (layers Composant F.Paste F.Mask)) + (pad 34 smd rect (at 11.049 4.2164) (size 2.032 0.3302) (layers Composant F.Paste F.Mask) + (net 110 /buspci.sch/PTNUM0)) + (pad 35 smd rect (at 11.049 3.5814) (size 2.032 0.3302) (layers Composant F.Paste F.Mask) + (net 175 /graphic/BE-3)) + (pad 36 smd rect (at 11.049 2.921) (size 2.032 0.3302) (layers Composant F.Paste F.Mask) + (net 174 /graphic/BE-2)) + (pad 37 smd rect (at 11.049 2.286) (size 2.032 0.3302) (layers Composant F.Paste F.Mask) + (net 173 /graphic/BE-1)) + (pad 38 smd rect (at 11.049 1.6256) (size 2.032 0.3302) (layers Composant F.Paste F.Mask) + (net 172 /graphic/BE-0)) + (pad 39 smd rect (at 11.049 0.9652) (size 2.032 0.3302) (layers Composant F.Paste F.Mask) + (net 84 /buspci.sch/ADR6)) + (pad 40 smd rect (at 11.049 0.3302) (size 2.032 0.3302) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 90 smd rect (at -11.049 -0.3302) (size 2.032 0.3302) (layers Composant F.Paste F.Mask) + (net 256 /muxdata/DPC13)) + (pad 89 smd rect (at -11.049 -0.9652) (size 2.032 0.3302) (layers Composant F.Paste F.Mask) + (net 258 /muxdata/DPC15)) + (pad 88 smd rect (at -11.049 -1.6256) (size 2.032 0.3302) (layers Composant F.Paste F.Mask) + (net 257 /muxdata/DPC14)) + (pad 87 smd rect (at -11.049 -2.286) (size 2.032 0.3302) (layers Composant F.Paste F.Mask) + (net 345 N-000163)) + (pad 86 smd rect (at -11.049 -2.921) (size 2.032 0.3302) (layers Composant F.Paste F.Mask) + (net 239 /graphic/X_CLK)) + (pad 85 smd rect (at -11.049 -3.5814) (size 2.032 0.3302) (layers Composant F.Paste F.Mask) + (net 240 /graphic/X_DIN)) + (pad 84 smd rect (at -11.049 -4.2164) (size 2.032 0.3302) (layers Composant F.Paste F.Mask) + (net 241 /graphic/X_PROG-)) + (pad 83 smd rect (at -11.049 -4.8768) (size 2.032 0.3302) (layers Composant F.Paste F.Mask) + (net 285 /muxdata/X_DONE)) + (pad 82 smd rect (at -11.049 -5.5372) (size 2.032 0.3302) (layers Composant F.Paste F.Mask) + (net 346 N-000177)) + (pad 81 smd rect (at -11.049 -6.1722) (size 2.032 0.3302) (layers Composant F.Paste F.Mask) + (net 211 /graphic/LED)) + (pad 50 smd rect (at 11.049 -6.1722) (size 2.032 0.3302) (layers Composant F.Paste F.Mask)) + (pad 49 smd rect (at 11.049 -5.5372) (size 2.032 0.3302) (layers Composant F.Paste F.Mask)) + (pad 48 smd rect (at 11.049 -4.8768) (size 2.032 0.3302) (layers Composant F.Paste F.Mask) + (net 168 /graphic/ADR2)) + (pad 47 smd rect (at 11.049 -4.2164) (size 2.032 0.3302) (layers Composant F.Paste F.Mask) + (net 235 /graphic/WR-)) + (pad 46 smd rect (at 11.049 -3.5814) (size 2.032 0.3302) (layers Composant F.Paste F.Mask) + (net 227 /graphic/RD-)) + (pad 45 smd rect (at 11.049 -2.921) (size 2.032 0.3302) (layers Composant F.Paste F.Mask) + (net 231 /graphic/SELECT-)) + (pad 44 smd rect (at 11.049 -2.286) (size 2.032 0.3302) (layers Composant F.Paste F.Mask) + (net 169 /graphic/ADR3)) + (pad 43 smd rect (at 11.049 -1.6256) (size 2.032 0.3302) (layers Composant F.Paste F.Mask) + (net 170 /graphic/ADR4)) + (pad 42 smd rect (at 11.049 -0.9652) (size 2.032 0.3302) (layers Composant F.Paste F.Mask) + (net 171 /graphic/ADR5)) + (pad 41 smd rect (at 11.049 -0.3302) (size 2.032 0.3302) (layers Composant F.Paste F.Mask) + (net 301 GND)) (model smd/pqfp100.wrl (at (xyz 0 0 0)) (scale (xyz 0.514 0.514 0.5)) @@ -9586,642 +6781,322 @@ (tags "CMS PQFP") (path /4BF03683/3366016A) (attr smd) - (fp_text reference U24 (at 0 -2.54 180) (layer Dessus.SilkS) + (fp_text reference U24 (at 0 -2.54 180) (layer F.SilkS) (effects (font (size 2.032 1.524) (thickness 0.3048))) ) - (fp_text value XC4005-PQ160 (at 0 2.54 180) (layer Dessus.SilkS) + (fp_text value XC4005-PQ160 (at 0 2.54 180) (layer F.SilkS) (effects (font (size 2.032 1.524) (thickness 0.3048))) ) - (fp_text user 1 (at 13.589 -15.494 270) (layer Dessus.SilkS) + (fp_text user 1 (at 13.589 -15.494 270) (layer F.SilkS) (effects (font (size 1.524 1.016) (thickness 0.254))) ) - (fp_line (start 12.827 -13.97) (end 14.097 -12.7) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -14.0462 14.1732) (end 14.097 14.1732) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 12.827 -13.97) (end -14.0462 -13.97) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -14.0462 -13.97) (end -14.0462 14.1732) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 14.097 14.1732) (end 14.097 -12.7) (layer Dessus.SilkS) (width 0.3048)) - (fp_circle (center 12.192 -12.065) (end 12.192 -11.303) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 smd rect (at 12.7 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 2 smd rect (at 12.065 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 184 /graphic/CLK10MHz) - ) - (pad 3 smd rect (at 11.4046 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 111 /buspci.sch/PTRDY-) - ) - (pad 4 smd rect (at 10.7696 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 108 /buspci.sch/PTATN-) - ) - (pad 5 smd rect (at 10.1092 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 218 /graphic/PTBURST-) - ) - (pad 6 smd rect (at 9.4488 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 190 /graphic/HDREFOUT) - ) - (pad 7 smd rect (at 8.8138 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 189 /graphic/HDOUT) - ) - (pad 8 smd rect (at 8.1534 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 9 smd rect (at 7.5184 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 10 smd rect (at 6.858 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 11 smd rect (at 6.1976 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 166 /buspci.sch/X_IRQ) - ) - (pad 12 smd rect (at 5.5626 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 220 /graphic/PTWR) - ) - (pad 13 smd rect (at 4.9022 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 245 /modul/CSYNC-OUT) - ) - (pad 14 smd rect (at 4.2672 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 214 /graphic/PTADR-) - ) - (pad 15 smd rect (at 3.6068 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 229 /graphic/RDEMPTY) - ) - (pad 16 smd rect (at 2.9464 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 163 /buspci.sch/RDFIFO-) - ) - (pad 17 smd rect (at 2.3114 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 165 /buspci.sch/WRFULL) - ) - (pad 18 smd rect (at 1.651 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 164 /buspci.sch/WRFIFO-) - ) - (pad 19 smd rect (at 1.016 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 20 smd rect (at 0.3556 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 21 smd rect (at -0.3048 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 7 /ESVIDEO-RVB/DPC0) - ) - (pad 22 smd rect (at -0.9398 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 8 /ESVIDEO-RVB/DPC1) - ) - (pad 23 smd rect (at -1.6002 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 9 /ESVIDEO-RVB/DPC2) - ) - (pad 24 smd rect (at -2.2352 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 273 /muxdata/DPC3) - ) - (pad 25 smd rect (at -2.8956 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 10 /ESVIDEO-RVB/DPC4) - ) - (pad 26 smd rect (at -3.556 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 11 /ESVIDEO-RVB/DPC5) - ) - (pad 27 smd rect (at -4.191 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 276 /muxdata/DPC6) - ) - (pad 28 smd rect (at -4.8514 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 12 /ESVIDEO-RVB/DPC7) - ) - (pad 29 smd rect (at -5.4864 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 30 smd rect (at -6.1468 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 31 smd rect (at -6.8072 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 32 smd rect (at -7.4422 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 277 /muxdata/DPC8) - ) - (pad 33 smd rect (at -8.1026 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 278 /muxdata/DPC9) - ) - (pad 34 smd rect (at -8.7376 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 253 /muxdata/DPC10) - ) - (pad 35 smd rect (at -9.398 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 254 /muxdata/DPC11) - ) - (pad 36 smd rect (at -10.0584 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 255 /muxdata/DPC12) - ) - (pad 37 smd rect (at -10.6934 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 298 /pal-ntsc.sch/VD_PAL-) - ) - (pad 38 smd rect (at -11.3538 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 39 smd rect (at -11.9888 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 40 smd rect (at -12.6492 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 41 smd rect (at -15.5702 -12.573 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 42 smd rect (at -15.5702 -11.938 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 43 smd rect (at -15.5702 -11.2776 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 287 /pal-ntsc.sch/F_PALIN) - ) - (pad 44 smd rect (at -15.5702 -10.6426 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 230 /graphic/RESERV1) - ) - (pad 45 smd rect (at -15.5702 -9.9822 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 256 /muxdata/DPC13) - ) - (pad 46 smd rect (at -15.5702 -9.3218 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 257 /muxdata/DPC14) - ) - (pad 47 smd rect (at -15.5702 -8.6868 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 258 /muxdata/DPC15) - ) - (pad 48 smd rect (at -15.5702 -8.0264 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 251 /muxdata/ACQ_ON) - ) - (pad 49 smd rect (at -15.5702 -7.3914 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 50 smd rect (at -15.5702 -6.731 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 51 smd rect (at -15.5702 -6.0706 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 52 smd rect (at -15.5702 -5.4356 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 288 /pal-ntsc.sch/HD_PAL-) - ) - (pad 53 smd rect (at -15.5702 -4.7752 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 176 /graphic/BLANK-) - ) - (pad 54 smd rect (at -15.5702 -4.1402 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 186 /graphic/CSYNCIN-) - ) - (pad 55 smd rect (at -15.5702 -3.4798 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 252 /muxdata/DATA_WR) - ) - (pad 56 smd rect (at -15.5702 -2.8194 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 250 /muxdata/ACCES_RAM-) - ) - (pad 57 smd rect (at -15.5702 -2.1844 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 35 /RAMS/CAS0-) - ) - (pad 58 smd rect (at -15.5702 -1.524 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 180 /graphic/CAS1-) - ) - (pad 59 smd rect (at -15.5702 -0.889 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 36 /RAMS/CAS2-) - ) - (pad 60 smd rect (at -15.5702 -0.2286 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 61 smd rect (at -15.5702 0.4318 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 62 smd rect (at -15.5702 1.0668 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 37 /RAMS/CAS3-) - ) - (pad 63 smd rect (at -15.5702 1.7272 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 83 /RAMS/WRAM-) - ) - (pad 64 smd rect (at -15.5702 2.3622 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 226 /graphic/RAS7-) - ) - (pad 65 smd rect (at -15.5702 3.0226 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 225 /graphic/RAS6-) - ) - (pad 66 smd rect (at -15.5702 3.683 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 50 /RAMS/RAS5-) - ) - (pad 67 smd rect (at -15.5702 4.318 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 224 /graphic/RAS4-) - ) - (pad 68 smd rect (at -15.5702 4.9784 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 49 /RAMS/RAS3-) - ) - (pad 69 smd rect (at -15.5702 5.6134 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 223 /graphic/RAS2-) - ) - (pad 70 smd rect (at -15.5702 6.2738 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 71 smd rect (at -15.5702 6.9342 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 72 smd rect (at -15.5702 7.5692 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 73 smd rect (at -15.5702 8.2296 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 222 /graphic/RAS1-) - ) - (pad 74 smd rect (at -15.5702 8.8646 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 221 /graphic/RAS0-) - ) - (pad 75 smd rect (at -15.5702 9.525 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 183 /graphic/CLAMP) - ) - (pad 76 smd rect (at -15.5702 10.1854 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 182 /graphic/CDACLK) - ) - (pad 77 smd rect (at -15.5702 10.8204 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 179 /graphic/CADCLK) - ) - (pad 78 smd rect (at -15.5702 11.4808 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 198 /graphic/IA7) - ) - (pad 79 smd rect (at -15.5702 12.1158 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 80 smd rect (at -15.5702 12.7762 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 285 /muxdata/X_DONE) - ) - (pad 121 smd rect (at 15.621 12.7762 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 122 smd rect (at 15.621 12.1158 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 123 smd rect (at 15.621 11.4808 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 44 /RAMS/MXA5) - ) - (pad 124 smd rect (at 15.621 10.8204 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 43 /RAMS/MXA4) - ) - (pad 125 smd rect (at 15.621 10.1854 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 42 /RAMS/MXA3) - ) - (pad 126 smd rect (at 15.621 9.525 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 41 /RAMS/MXA2) - ) - (pad 127 smd rect (at 15.621 8.8646 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 39 /RAMS/MXA1) - ) - (pad 128 smd rect (at 15.621 8.2296 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 38 /RAMS/MXA0) - ) - (pad 129 smd rect (at 15.621 7.5692 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 130 smd rect (at 15.621 6.9342 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 131 smd rect (at 15.621 6.2738 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 132 smd rect (at 15.621 5.6134 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 235 /graphic/WR-) - ) - (pad 133 smd rect (at 15.621 4.9784 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 227 /graphic/RD-) - ) - (pad 134 smd rect (at 15.621 4.318 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 209 /graphic/IRQ_SLR) - ) - (pad 135 smd rect (at 15.621 3.683 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 231 /graphic/SELECT-) - ) - (pad 136 smd rect (at 15.621 3.0226 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 137 smd rect (at 15.621 2.3622 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 168 /graphic/ADR2) - ) - (pad 138 smd rect (at 15.621 1.7272 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 169 /graphic/ADR3) - ) - (pad 139 smd rect (at 15.621 1.0668 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 170 /graphic/ADR4) - ) - (pad 140 smd rect (at 15.621 0.4318 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 171 /graphic/ADR5) - ) - (pad 141 smd rect (at 15.621 -0.2286 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 142 smd rect (at 15.621 -0.889 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 143 smd rect (at 15.621 -1.524 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 84 /buspci.sch/ADR6) - ) - (pad 144 smd rect (at 15.621 -2.1844 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 172 /graphic/BE-0) - ) - (pad 145 smd rect (at 15.621 -2.8194 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 173 /graphic/BE-1) - ) - (pad 146 smd rect (at 15.621 -3.4798 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 174 /graphic/BE-2) - ) - (pad 147 smd rect (at 15.621 -4.1402 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 175 /graphic/BE-3) - ) - (pad 148 smd rect (at 15.621 -4.7752 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 291 /pal-ntsc.sch/RESET-) - ) - (pad 149 smd rect (at 15.621 -5.4356 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 208 /graphic/IRQ-) - ) - (pad 150 smd rect (at 15.621 -6.0706 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 110 /buspci.sch/PTNUM0) - ) - (pad 151 smd rect (at 15.621 -6.731 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 152 smd rect (at 15.621 -7.3914 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 153 smd rect (at 15.621 -8.0264 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 154 smd rect (at 15.621 -8.6868 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 219 /graphic/PTNUM1) - ) - (pad 155 smd rect (at 15.621 -9.3218 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 217 /graphic/PTBE-3) - ) - (pad 156 smd rect (at 15.621 -9.9822 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 216 /graphic/PTBE-2) - ) - (pad 157 smd rect (at 15.621 -10.6426 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 109 /buspci.sch/PTBE-1) - ) - (pad 158 smd rect (at 15.621 -11.2776 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 215 /graphic/PTBE-0) - ) - (pad 159 smd rect (at 15.621 -11.938 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 185 /graphic/CSIO-) - ) - (pad 160 smd rect (at 15.621 -12.573 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 81 smd rect (at -12.6492 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 82 smd rect (at -11.9888 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 241 /graphic/X_PROG-) - ) - (pad 83 smd rect (at -11.3538 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 197 /graphic/IA6) - ) - (pad 84 smd rect (at -10.6934 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 85 smd rect (at -10.0584 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 196 /graphic/IA5) - ) - (pad 86 smd rect (at -9.398 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 195 /graphic/IA4) - ) - (pad 87 smd rect (at -8.7376 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 194 /graphic/IA3) - ) - (pad 88 smd rect (at -8.1026 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 193 /graphic/IA2) - ) - (pad 89 smd rect (at -7.4422 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 90 smd rect (at -6.8072 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 91 smd rect (at -6.1468 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 92 smd rect (at -5.4864 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 192 /graphic/IA1) - ) - (pad 93 smd rect (at -4.8514 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 199 /graphic/IA8) - ) - (pad 94 smd rect (at -4.191 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 191 /graphic/IA0) - ) - (pad 95 smd rect (at -3.556 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 167 /graphic/14MHZOUT) - ) - (pad 96 smd rect (at -2.8956 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 200 /graphic/IA9) - ) - (pad 97 smd rect (at -2.2352 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 207 /graphic/IRAS-) - ) - (pad 98 smd rect (at -1.6002 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 210 /graphic/IWR-) - ) - (pad 99 smd rect (at -0.9398 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 203 /graphic/ID1) - ) - (pad 100 smd rect (at -0.3048 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 101 smd rect (at 0.3556 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 102 smd rect (at 1.016 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 202 /graphic/ID0) - ) - (pad 103 smd rect (at 1.651 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 206 /graphic/IOE-) - ) - (pad 104 smd rect (at 2.3114 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 201 /graphic/ICAS-) - ) - (pad 105 smd rect (at 2.9464 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 204 /graphic/ID2) - ) - (pad 106 smd rect (at 3.6068 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 205 /graphic/ID3) - ) - (pad 107 smd rect (at 4.2672 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 233 /graphic/TVI1) - ) - (pad 108 smd rect (at 4.9022 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 232 /graphic/TVI0) - ) - (pad 109 smd rect (at 5.5626 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 40 /RAMS/MXA10) - ) - (pad 110 smd rect (at 6.1976 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 111 smd rect (at 6.858 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 112 smd rect (at 7.5184 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 113 smd rect (at 8.1534 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 48 /RAMS/MXA9) - ) - (pad 114 smd rect (at 8.8138 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 47 /RAMS/MXA8) - ) - (pad 115 smd rect (at 9.4488 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 46 /RAMS/MXA7) - ) - (pad 116 smd rect (at 10.1092 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 45 /RAMS/MXA6) - ) - (pad 117 smd rect (at 10.7696 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 240 /graphic/X_DIN) - ) - (pad 118 smd rect (at 11.4046 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 284 /muxdata/X_DIN) - ) - (pad 119 smd rect (at 12.065 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 239 /graphic/X_CLK) - ) - (pad 120 smd rect (at 12.7 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) + (fp_line (start 12.827 -13.97) (end 14.097 -12.7) (layer F.SilkS) (width 0.3048)) + (fp_line (start -14.0462 14.1732) (end 14.097 14.1732) (layer F.SilkS) (width 0.3048)) + (fp_line (start 12.827 -13.97) (end -14.0462 -13.97) (layer F.SilkS) (width 0.3048)) + (fp_line (start -14.0462 -13.97) (end -14.0462 14.1732) (layer F.SilkS) (width 0.3048)) + (fp_line (start 14.097 14.1732) (end 14.097 -12.7) (layer F.SilkS) (width 0.3048)) + (fp_circle (center 12.192 -12.065) (end 12.192 -11.303) (layer F.SilkS) (width 0.3048)) + (pad 1 smd rect (at 12.7 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 2 smd rect (at 12.065 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 184 /graphic/CLK10MHz)) + (pad 3 smd rect (at 11.4046 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 111 /buspci.sch/PTRDY-)) + (pad 4 smd rect (at 10.7696 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 108 /buspci.sch/PTATN-)) + (pad 5 smd rect (at 10.1092 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 218 /graphic/PTBURST-)) + (pad 6 smd rect (at 9.4488 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 190 /graphic/HDREFOUT)) + (pad 7 smd rect (at 8.8138 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 189 /graphic/HDOUT)) + (pad 8 smd rect (at 8.1534 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask)) + (pad 9 smd rect (at 7.5184 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask)) + (pad 10 smd rect (at 6.858 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 11 smd rect (at 6.1976 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 166 /buspci.sch/X_IRQ)) + (pad 12 smd rect (at 5.5626 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 220 /graphic/PTWR)) + (pad 13 smd rect (at 4.9022 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 245 /modul/CSYNC-OUT)) + (pad 14 smd rect (at 4.2672 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 214 /graphic/PTADR-)) + (pad 15 smd rect (at 3.6068 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 229 /graphic/RDEMPTY)) + (pad 16 smd rect (at 2.9464 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 163 /buspci.sch/RDFIFO-)) + (pad 17 smd rect (at 2.3114 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 165 /buspci.sch/WRFULL)) + (pad 18 smd rect (at 1.651 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 164 /buspci.sch/WRFIFO-)) + (pad 19 smd rect (at 1.016 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 20 smd rect (at 0.3556 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 21 smd rect (at -0.3048 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 7 /ESVIDEO-RVB/DPC0)) + (pad 22 smd rect (at -0.9398 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 8 /ESVIDEO-RVB/DPC1)) + (pad 23 smd rect (at -1.6002 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 9 /ESVIDEO-RVB/DPC2)) + (pad 24 smd rect (at -2.2352 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 273 /muxdata/DPC3)) + (pad 25 smd rect (at -2.8956 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 10 /ESVIDEO-RVB/DPC4)) + (pad 26 smd rect (at -3.556 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 11 /ESVIDEO-RVB/DPC5)) + (pad 27 smd rect (at -4.191 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 276 /muxdata/DPC6)) + (pad 28 smd rect (at -4.8514 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 12 /ESVIDEO-RVB/DPC7)) + (pad 29 smd rect (at -5.4864 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 30 smd rect (at -6.1468 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask)) + (pad 31 smd rect (at -6.8072 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask)) + (pad 32 smd rect (at -7.4422 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 277 /muxdata/DPC8)) + (pad 33 smd rect (at -8.1026 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 278 /muxdata/DPC9)) + (pad 34 smd rect (at -8.7376 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 253 /muxdata/DPC10)) + (pad 35 smd rect (at -9.398 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 254 /muxdata/DPC11)) + (pad 36 smd rect (at -10.0584 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 255 /muxdata/DPC12)) + (pad 37 smd rect (at -10.6934 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 298 /pal-ntsc.sch/VD_PAL-)) + (pad 38 smd rect (at -11.3538 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 39 smd rect (at -11.9888 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 40 smd rect (at -12.6492 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 41 smd rect (at -15.5702 -12.573 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 42 smd rect (at -15.5702 -11.938 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 43 smd rect (at -15.5702 -11.2776 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 287 /pal-ntsc.sch/F_PALIN)) + (pad 44 smd rect (at -15.5702 -10.6426 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 230 /graphic/RESERV1)) + (pad 45 smd rect (at -15.5702 -9.9822 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 256 /muxdata/DPC13)) + (pad 46 smd rect (at -15.5702 -9.3218 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 257 /muxdata/DPC14)) + (pad 47 smd rect (at -15.5702 -8.6868 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 258 /muxdata/DPC15)) + (pad 48 smd rect (at -15.5702 -8.0264 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 251 /muxdata/ACQ_ON)) + (pad 49 smd rect (at -15.5702 -7.3914 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask)) + (pad 50 smd rect (at -15.5702 -6.731 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask)) + (pad 51 smd rect (at -15.5702 -6.0706 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 52 smd rect (at -15.5702 -5.4356 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 288 /pal-ntsc.sch/HD_PAL-)) + (pad 53 smd rect (at -15.5702 -4.7752 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 176 /graphic/BLANK-)) + (pad 54 smd rect (at -15.5702 -4.1402 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 186 /graphic/CSYNCIN-)) + (pad 55 smd rect (at -15.5702 -3.4798 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 252 /muxdata/DATA_WR)) + (pad 56 smd rect (at -15.5702 -2.8194 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 250 /muxdata/ACCES_RAM-)) + (pad 57 smd rect (at -15.5702 -2.1844 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 35 /RAMS/CAS0-)) + (pad 58 smd rect (at -15.5702 -1.524 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 180 /graphic/CAS1-)) + (pad 59 smd rect (at -15.5702 -0.889 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 36 /RAMS/CAS2-)) + (pad 60 smd rect (at -15.5702 -0.2286 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 61 smd rect (at -15.5702 0.4318 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 62 smd rect (at -15.5702 1.0668 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 37 /RAMS/CAS3-)) + (pad 63 smd rect (at -15.5702 1.7272 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 83 /RAMS/WRAM-)) + (pad 64 smd rect (at -15.5702 2.3622 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 226 /graphic/RAS7-)) + (pad 65 smd rect (at -15.5702 3.0226 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 225 /graphic/RAS6-)) + (pad 66 smd rect (at -15.5702 3.683 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 50 /RAMS/RAS5-)) + (pad 67 smd rect (at -15.5702 4.318 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 224 /graphic/RAS4-)) + (pad 68 smd rect (at -15.5702 4.9784 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 49 /RAMS/RAS3-)) + (pad 69 smd rect (at -15.5702 5.6134 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 223 /graphic/RAS2-)) + (pad 70 smd rect (at -15.5702 6.2738 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 71 smd rect (at -15.5702 6.9342 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask)) + (pad 72 smd rect (at -15.5702 7.5692 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask)) + (pad 73 smd rect (at -15.5702 8.2296 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 222 /graphic/RAS1-)) + (pad 74 smd rect (at -15.5702 8.8646 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 221 /graphic/RAS0-)) + (pad 75 smd rect (at -15.5702 9.525 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 183 /graphic/CLAMP)) + (pad 76 smd rect (at -15.5702 10.1854 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 182 /graphic/CDACLK)) + (pad 77 smd rect (at -15.5702 10.8204 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 179 /graphic/CADCLK)) + (pad 78 smd rect (at -15.5702 11.4808 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 198 /graphic/IA7)) + (pad 79 smd rect (at -15.5702 12.1158 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 80 smd rect (at -15.5702 12.7762 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 285 /muxdata/X_DONE)) + (pad 121 smd rect (at 15.621 12.7762 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask)) + (pad 122 smd rect (at 15.621 12.1158 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 123 smd rect (at 15.621 11.4808 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 44 /RAMS/MXA5)) + (pad 124 smd rect (at 15.621 10.8204 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 43 /RAMS/MXA4)) + (pad 125 smd rect (at 15.621 10.1854 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 42 /RAMS/MXA3)) + (pad 126 smd rect (at 15.621 9.525 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 41 /RAMS/MXA2)) + (pad 127 smd rect (at 15.621 8.8646 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 39 /RAMS/MXA1)) + (pad 128 smd rect (at 15.621 8.2296 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 38 /RAMS/MXA0)) + (pad 129 smd rect (at 15.621 7.5692 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask)) + (pad 130 smd rect (at 15.621 6.9342 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask)) + (pad 131 smd rect (at 15.621 6.2738 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 132 smd rect (at 15.621 5.6134 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 235 /graphic/WR-)) + (pad 133 smd rect (at 15.621 4.9784 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 227 /graphic/RD-)) + (pad 134 smd rect (at 15.621 4.318 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 209 /graphic/IRQ_SLR)) + (pad 135 smd rect (at 15.621 3.683 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 231 /graphic/SELECT-)) + (pad 136 smd rect (at 15.621 3.0226 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask)) + (pad 137 smd rect (at 15.621 2.3622 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 168 /graphic/ADR2)) + (pad 138 smd rect (at 15.621 1.7272 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 169 /graphic/ADR3)) + (pad 139 smd rect (at 15.621 1.0668 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 170 /graphic/ADR4)) + (pad 140 smd rect (at 15.621 0.4318 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 171 /graphic/ADR5)) + (pad 141 smd rect (at 15.621 -0.2286 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 142 smd rect (at 15.621 -0.889 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 143 smd rect (at 15.621 -1.524 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 84 /buspci.sch/ADR6)) + (pad 144 smd rect (at 15.621 -2.1844 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 172 /graphic/BE-0)) + (pad 145 smd rect (at 15.621 -2.8194 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 173 /graphic/BE-1)) + (pad 146 smd rect (at 15.621 -3.4798 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 174 /graphic/BE-2)) + (pad 147 smd rect (at 15.621 -4.1402 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 175 /graphic/BE-3)) + (pad 148 smd rect (at 15.621 -4.7752 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 291 /pal-ntsc.sch/RESET-)) + (pad 149 smd rect (at 15.621 -5.4356 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 208 /graphic/IRQ-)) + (pad 150 smd rect (at 15.621 -6.0706 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 110 /buspci.sch/PTNUM0)) + (pad 151 smd rect (at 15.621 -6.731 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 152 smd rect (at 15.621 -7.3914 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask)) + (pad 153 smd rect (at 15.621 -8.0264 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask)) + (pad 154 smd rect (at 15.621 -8.6868 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 219 /graphic/PTNUM1)) + (pad 155 smd rect (at 15.621 -9.3218 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 217 /graphic/PTBE-3)) + (pad 156 smd rect (at 15.621 -9.9822 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 216 /graphic/PTBE-2)) + (pad 157 smd rect (at 15.621 -10.6426 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 109 /buspci.sch/PTBE-1)) + (pad 158 smd rect (at 15.621 -11.2776 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 215 /graphic/PTBE-0)) + (pad 159 smd rect (at 15.621 -11.938 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 185 /graphic/CSIO-)) + (pad 160 smd rect (at 15.621 -12.573 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 81 smd rect (at -12.6492 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 82 smd rect (at -11.9888 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 241 /graphic/X_PROG-)) + (pad 83 smd rect (at -11.3538 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 197 /graphic/IA6)) + (pad 84 smd rect (at -10.6934 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask)) + (pad 85 smd rect (at -10.0584 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 196 /graphic/IA5)) + (pad 86 smd rect (at -9.398 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 195 /graphic/IA4)) + (pad 87 smd rect (at -8.7376 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 194 /graphic/IA3)) + (pad 88 smd rect (at -8.1026 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 193 /graphic/IA2)) + (pad 89 smd rect (at -7.4422 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask)) + (pad 90 smd rect (at -6.8072 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask)) + (pad 91 smd rect (at -6.1468 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 92 smd rect (at -5.4864 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 192 /graphic/IA1)) + (pad 93 smd rect (at -4.8514 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 199 /graphic/IA8)) + (pad 94 smd rect (at -4.191 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 191 /graphic/IA0)) + (pad 95 smd rect (at -3.556 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 167 /graphic/14MHZOUT)) + (pad 96 smd rect (at -2.8956 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 200 /graphic/IA9)) + (pad 97 smd rect (at -2.2352 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 207 /graphic/IRAS-)) + (pad 98 smd rect (at -1.6002 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 210 /graphic/IWR-)) + (pad 99 smd rect (at -0.9398 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 203 /graphic/ID1)) + (pad 100 smd rect (at -0.3048 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 101 smd rect (at 0.3556 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 102 smd rect (at 1.016 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 202 /graphic/ID0)) + (pad 103 smd rect (at 1.651 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 206 /graphic/IOE-)) + (pad 104 smd rect (at 2.3114 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 201 /graphic/ICAS-)) + (pad 105 smd rect (at 2.9464 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 204 /graphic/ID2)) + (pad 106 smd rect (at 3.6068 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 205 /graphic/ID3)) + (pad 107 smd rect (at 4.2672 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 233 /graphic/TVI1)) + (pad 108 smd rect (at 4.9022 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 232 /graphic/TVI0)) + (pad 109 smd rect (at 5.5626 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 40 /RAMS/MXA10)) + (pad 110 smd rect (at 6.1976 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 111 smd rect (at 6.858 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask)) + (pad 112 smd rect (at 7.5184 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask)) + (pad 113 smd rect (at 8.1534 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 48 /RAMS/MXA9)) + (pad 114 smd rect (at 8.8138 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 47 /RAMS/MXA8)) + (pad 115 smd rect (at 9.4488 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 46 /RAMS/MXA7)) + (pad 116 smd rect (at 10.1092 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 45 /RAMS/MXA6)) + (pad 117 smd rect (at 10.7696 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 240 /graphic/X_DIN)) + (pad 118 smd rect (at 11.4046 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 284 /muxdata/X_DIN)) + (pad 119 smd rect (at 12.065 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 239 /graphic/X_CLK)) + (pad 120 smd rect (at 12.7 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 4 +5V)) (model smd/pqfp160.wrl (at (xyz 0 0 0)) (scale (xyz 0.512 0.512 0.5)) @@ -10235,659 +7110,339 @@ (tags "CMS PQFP") (path /4BF03687/21FA8347) (attr smd) - (fp_text reference U11 (at 0 -2.54 180) (layer Dessus.SilkS) + (fp_text reference U11 (at 0 -2.54 180) (layer F.SilkS) (effects (font (size 2.032 1.524) (thickness 0.3048))) ) - (fp_text value S5933_PQ160 (at 0 2.54 180) (layer Dessus.SilkS) + (fp_text value S5933_PQ160 (at 0 2.54 180) (layer F.SilkS) (effects (font (size 2.032 1.524) (thickness 0.3048))) ) - (fp_text user 1 (at 13.589 -15.494 270) (layer Dessus.SilkS) + (fp_text user 1 (at 13.589 -15.494 270) (layer F.SilkS) (effects (font (size 1.524 1.016) (thickness 0.254))) ) - (fp_line (start 12.827 -13.97) (end 14.097 -12.7) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -14.0462 14.1732) (end 14.097 14.1732) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 12.827 -13.97) (end -14.0462 -13.97) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -14.0462 -13.97) (end -14.0462 14.1732) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 14.097 14.1732) (end 14.097 -12.7) (layer Dessus.SilkS) (width 0.3048)) - (fp_circle (center 12.192 -12.065) (end 12.192 -11.303) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 smd rect (at 12.7 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 100 /buspci.sch/EQ0) - ) - (pad 2 smd rect (at 12.065 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 128 /buspci.sch/P_AD23) - ) - (pad 3 smd rect (at 11.4046 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 127 /buspci.sch/P_AD22) - ) - (pad 4 smd rect (at 10.7696 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 126 /buspci.sch/P_AD21) - ) - (pad 5 smd rect (at 10.1092 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 275 /muxdata/DPC31) - ) - (pad 6 smd rect (at 9.4488 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 125 /buspci.sch/P_AD20) - ) - (pad 7 smd rect (at 8.8138 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 123 /buspci.sch/P_AD19) - ) - (pad 8 smd rect (at 8.1534 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 122 /buspci.sch/P_AD18) - ) - (pad 9 smd rect (at 7.5184 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 101 /buspci.sch/EQ1) - ) - (pad 10 smd rect (at 6.858 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 11 smd rect (at 6.1976 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 12 smd rect (at 5.5626 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 121 /buspci.sch/P_AD17) - ) - (pad 13 smd rect (at 4.9022 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 274 /muxdata/DPC30) - ) - (pad 14 smd rect (at 4.2672 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 120 /buspci.sch/P_AD16) - ) - (pad 15 smd rect (at 3.6068 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 146 /buspci.sch/P_C/BE2#) - ) - (pad 16 smd rect (at 2.9464 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 150 /buspci.sch/P_FRAME#) - ) - (pad 17 smd rect (at 2.3114 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 102 /buspci.sch/EQ2) - ) - (pad 18 smd rect (at 1.651 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 154 /buspci.sch/P_IRDY#) - ) - (pad 19 smd rect (at 1.016 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 162 /buspci.sch/P_TRDY#) - ) - (pad 20 smd rect (at 0.3556 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 149 /buspci.sch/P_DEVSEL#) - ) - (pad 21 smd rect (at -0.3048 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 103 /buspci.sch/EQ3) - ) - (pad 22 smd rect (at -0.9398 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 161 /buspci.sch/P_STOP#) - ) - (pad 23 smd rect (at -1.6002 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 155 /buspci.sch/P_LOCK#) - ) - (pad 24 smd rect (at -2.2352 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 157 /buspci.sch/P_PERR#) - ) - (pad 25 smd rect (at -2.8956 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 272 /muxdata/DPC29) - ) - (pad 26 smd rect (at -3.556 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 160 /buspci.sch/P_SERR#) - ) - (pad 27 smd rect (at -4.191 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 156 /buspci.sch/P_PAR) - ) - (pad 28 smd rect (at -4.8514 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 145 /buspci.sch/P_C/BE1#) - ) - (pad 29 smd rect (at -5.4864 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 104 /buspci.sch/EQ4) - ) - (pad 30 smd rect (at -6.1468 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 31 smd rect (at -6.8072 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 32 smd rect (at -7.4422 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 119 /buspci.sch/P_AD15) - ) - (pad 33 smd rect (at -8.1026 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 105 /buspci.sch/EQ5) - ) - (pad 34 smd rect (at -8.7376 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 118 /buspci.sch/P_AD14) - ) - (pad 35 smd rect (at -9.398 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 117 /buspci.sch/P_AD13) - ) - (pad 36 smd rect (at -10.0584 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 116 /buspci.sch/P_AD12) - ) - (pad 37 smd rect (at -10.6934 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 271 /muxdata/DPC28) - ) - (pad 38 smd rect (at -11.3538 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 115 /buspci.sch/P_AD11) - ) - (pad 39 smd rect (at -11.9888 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 114 /buspci.sch/P_AD10) - ) - (pad 40 smd rect (at -12.6492 -15.494 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 143 /buspci.sch/P_AD9) - ) - (pad 41 smd rect (at -15.5702 -12.573 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 106 /buspci.sch/EQ6) - ) - (pad 42 smd rect (at -15.5702 -11.938 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 142 /buspci.sch/P_AD8) - ) - (pad 43 smd rect (at -15.5702 -11.2776 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 144 /buspci.sch/P_C/BE0#) - ) - (pad 44 smd rect (at -15.5702 -10.6426 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 141 /buspci.sch/P_AD7) - ) - (pad 45 smd rect (at -15.5702 -9.9822 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 270 /muxdata/DPC27) - ) - (pad 46 smd rect (at -15.5702 -9.3218 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 140 /buspci.sch/P_AD6) - ) - (pad 47 smd rect (at -15.5702 -8.6868 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 139 /buspci.sch/P_AD5) - ) - (pad 48 smd rect (at -15.5702 -8.0264 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 138 /buspci.sch/P_AD4) - ) - (pad 49 smd rect (at -15.5702 -7.3914 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 107 /buspci.sch/EQ7) - ) - (pad 50 smd rect (at -15.5702 -6.731 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 51 smd rect (at -15.5702 -6.0706 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 52 smd rect (at -15.5702 -5.4356 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 135 /buspci.sch/P_AD3) - ) - (pad 53 smd rect (at -15.5702 -4.7752 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 269 /muxdata/DPC26) - ) - (pad 54 smd rect (at -15.5702 -4.1402 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 124 /buspci.sch/P_AD2) - ) - (pad 55 smd rect (at -15.5702 -3.4798 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 113 /buspci.sch/P_AD1) - ) - (pad 56 smd rect (at -15.5702 -2.8194 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 112 /buspci.sch/P_AD0) - ) - (pad 57 smd rect (at -15.5702 -2.1844 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 209 /graphic/IRQ_SLR) - ) - (pad 58 smd rect (at -15.5702 -1.524 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 153 /buspci.sch/P_INTA#) - ) - (pad 59 smd rect (at -15.5702 -0.889 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 351 N-000317) - ) - (pad 60 smd rect (at -15.5702 -0.2286 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 175 /graphic/BE-3) - ) - (pad 61 smd rect (at -15.5702 0.4318 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 86 /buspci.sch/EA1) - ) - (pad 62 smd rect (at -15.5702 1.0668 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 174 /graphic/BE-2) - ) - (pad 63 smd rect (at -15.5702 1.7272 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 173 /graphic/BE-1) - ) - (pad 64 smd rect (at -15.5702 2.3622 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 171 /graphic/ADR5) - ) - (pad 65 smd rect (at -15.5702 3.0226 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 268 /muxdata/DPC25) - ) - (pad 66 smd rect (at -15.5702 3.683 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 170 /graphic/ADR4) - ) - (pad 67 smd rect (at -15.5702 4.318 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 169 /graphic/ADR3) - ) - (pad 68 smd rect (at -15.5702 4.9784 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 168 /graphic/ADR2) - ) - (pad 69 smd rect (at -15.5702 5.6134 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 93 /buspci.sch/EA2) - ) - (pad 70 smd rect (at -15.5702 6.2738 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 71 smd rect (at -15.5702 6.9342 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 72 smd rect (at -15.5702 7.5692 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 227 /graphic/RD-) - ) - (pad 73 smd rect (at -15.5702 8.2296 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 94 /buspci.sch/EA3) - ) - (pad 74 smd rect (at -15.5702 8.8646 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 235 /graphic/WR-) - ) - (pad 75 smd rect (at -15.5702 9.525 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 231 /graphic/SELECT-) - ) - (pad 76 smd rect (at -15.5702 10.1854 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 258 /muxdata/DPC15) - ) - (pad 77 smd rect (at -15.5702 10.8204 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 267 /muxdata/DPC24) - ) - (pad 78 smd rect (at -15.5702 11.4808 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 257 /muxdata/DPC14) - ) - (pad 79 smd rect (at -15.5702 12.1158 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 256 /muxdata/DPC13) - ) - (pad 80 smd rect (at -15.5702 12.7762 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 255 /muxdata/DPC12) - ) - (pad 121 smd rect (at 15.621 12.7762 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 87 /buspci.sch/EA10) - ) - (pad 122 smd rect (at 15.621 12.1158 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 219 /graphic/PTNUM1) - ) - (pad 123 smd rect (at 15.621 11.4808 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 110 /buspci.sch/PTNUM0) - ) - (pad 124 smd rect (at 15.621 10.8204 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 208 /graphic/IRQ-) - ) - (pad 125 smd rect (at 15.621 10.1854 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 262 /muxdata/DPC19) - ) - (pad 126 smd rect (at 15.621 9.525 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 291 /pal-ntsc.sch/RESET-) - ) - (pad 127 smd rect (at 15.621 8.8646 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 352 N-000318) - ) - (pad 128 smd rect (at 15.621 8.2296 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 353 N-000319) - ) - (pad 129 smd rect (at 15.621 7.5692 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 88 /buspci.sch/EA11) - ) - (pad 130 smd rect (at 15.621 6.9342 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 131 smd rect (at 15.621 6.2738 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 132 smd rect (at 15.621 5.6134 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 84 /buspci.sch/ADR6) - ) - (pad 133 smd rect (at 15.621 4.9784 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 261 /muxdata/DPC18) - ) - (pad 134 smd rect (at 15.621 4.318 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 135 smd rect (at 15.621 3.683 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 349 N-000315) - ) - (pad 136 smd rect (at 15.621 3.0226 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 137 smd rect (at 15.621 2.3622 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 89 /buspci.sch/EA12) - ) - (pad 138 smd rect (at 15.621 1.7272 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 350 N-000316) - ) - (pad 139 smd rect (at 15.621 1.0668 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 159 /buspci.sch/P_RST#) - ) - (pad 140 smd rect (at 15.621 0.4318 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 85 /buspci.sch/BPCLK) - ) - (pad 141 smd rect (at 15.621 -0.2286 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 90 /buspci.sch/EA13) - ) - (pad 142 smd rect (at 15.621 -0.889 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 148 /buspci.sch/P_CLK) - ) - (pad 143 smd rect (at 15.621 -1.524 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 151 /buspci.sch/P_GNT#) - ) - (pad 144 smd rect (at 15.621 -2.1844 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 158 /buspci.sch/P_REQ#) - ) - (pad 145 smd rect (at 15.621 -2.8194 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 260 /muxdata/DPC17) - ) - (pad 146 smd rect (at 15.621 -3.4798 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 137 /buspci.sch/P_AD31) - ) - (pad 147 smd rect (at 15.621 -4.1402 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 136 /buspci.sch/P_AD30) - ) - (pad 148 smd rect (at 15.621 -4.7752 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 134 /buspci.sch/P_AD29) - ) - (pad 149 smd rect (at 15.621 -5.4356 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 91 /buspci.sch/EA14) - ) - (pad 150 smd rect (at 15.621 -6.0706 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 151 smd rect (at 15.621 -6.731 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 152 smd rect (at 15.621 -7.3914 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 133 /buspci.sch/P_AD28) - ) - (pad 153 smd rect (at 15.621 -8.0264 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 92 /buspci.sch/EA15) - ) - (pad 154 smd rect (at 15.621 -8.6868 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 132 /buspci.sch/P_AD27) - ) - (pad 155 smd rect (at 15.621 -9.3218 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 131 /buspci.sch/P_AD26) - ) - (pad 156 smd rect (at 15.621 -9.9822 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 130 /buspci.sch/P_AD25) - ) - (pad 157 smd rect (at 15.621 -10.6426 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 259 /muxdata/DPC16) - ) - (pad 158 smd rect (at 15.621 -11.2776 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 129 /buspci.sch/P_AD24) - ) - (pad 159 smd rect (at 15.621 -11.938 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 147 /buspci.sch/P_C/BE3#) - ) - (pad 160 smd rect (at 15.621 -12.573 180) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 152 /buspci.sch/P_IDSEL) - ) - (pad 81 smd rect (at -12.6492 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 95 /buspci.sch/EA4) - ) - (pad 82 smd rect (at -11.9888 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 254 /muxdata/DPC11) - ) - (pad 83 smd rect (at -11.3538 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 253 /muxdata/DPC10) - ) - (pad 84 smd rect (at -10.6934 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 278 /muxdata/DPC9) - ) - (pad 85 smd rect (at -10.0584 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 266 /muxdata/DPC23) - ) - (pad 86 smd rect (at -9.398 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 277 /muxdata/DPC8) - ) - (pad 87 smd rect (at -8.7376 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 172 /graphic/BE-0) - ) - (pad 88 smd rect (at -8.1026 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 12 /ESVIDEO-RVB/DPC7) - ) - (pad 89 smd rect (at -7.4422 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 96 /buspci.sch/EA5) - ) - (pad 90 smd rect (at -6.8072 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 91 smd rect (at -6.1468 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 92 smd rect (at -5.4864 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 276 /muxdata/DPC6) - ) - (pad 93 smd rect (at -4.8514 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 265 /muxdata/DPC22) - ) - (pad 94 smd rect (at -4.191 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 11 /ESVIDEO-RVB/DPC5) - ) - (pad 95 smd rect (at -3.556 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 10 /ESVIDEO-RVB/DPC4) - ) - (pad 96 smd rect (at -2.8956 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 273 /muxdata/DPC3) - ) - (pad 97 smd rect (at -2.2352 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 97 /buspci.sch/EA6) - ) - (pad 98 smd rect (at -1.6002 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 9 /ESVIDEO-RVB/DPC2) - ) - (pad 99 smd rect (at -0.9398 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 8 /ESVIDEO-RVB/DPC1) - ) - (pad 100 smd rect (at -0.3048 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 7 /ESVIDEO-RVB/DPC0) - ) - (pad 101 smd rect (at 0.3556 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 98 /buspci.sch/EA7) - ) - (pad 102 smd rect (at 1.016 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 164 /buspci.sch/WRFIFO-) - ) - (pad 103 smd rect (at 1.651 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 165 /buspci.sch/WRFULL) - ) - (pad 104 smd rect (at 2.3114 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 163 /buspci.sch/RDFIFO-) - ) - (pad 105 smd rect (at 2.9464 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 264 /muxdata/DPC21) - ) - (pad 106 smd rect (at 3.6068 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 229 /graphic/RDEMPTY) - ) - (pad 107 smd rect (at 4.2672 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 214 /graphic/PTADR-) - ) - (pad 108 smd rect (at 4.9022 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 220 /graphic/PTWR) - ) - (pad 109 smd rect (at 5.5626 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 166 /buspci.sch/X_IRQ) - ) - (pad 110 smd rect (at 6.1976 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 111 smd rect (at 6.858 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 112 smd rect (at 7.5184 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 218 /graphic/PTBURST-) - ) - (pad 113 smd rect (at 8.1534 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 99 /buspci.sch/EA9) - ) - (pad 114 smd rect (at 8.8138 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 108 /buspci.sch/PTATN-) - ) - (pad 115 smd rect (at 9.4488 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 111 /buspci.sch/PTRDY-) - ) - (pad 116 smd rect (at 10.1092 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 215 /graphic/PTBE-0) - ) - (pad 117 smd rect (at 10.7696 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 263 /muxdata/DPC20) - ) - (pad 118 smd rect (at 11.4046 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 109 /buspci.sch/PTBE-1) - ) - (pad 119 smd rect (at 12.065 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 216 /graphic/PTBE-2) - ) - (pad 120 smd rect (at 12.7 15.6972 180) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 217 /graphic/PTBE-3) - ) + (fp_line (start 12.827 -13.97) (end 14.097 -12.7) (layer F.SilkS) (width 0.3048)) + (fp_line (start -14.0462 14.1732) (end 14.097 14.1732) (layer F.SilkS) (width 0.3048)) + (fp_line (start 12.827 -13.97) (end -14.0462 -13.97) (layer F.SilkS) (width 0.3048)) + (fp_line (start -14.0462 -13.97) (end -14.0462 14.1732) (layer F.SilkS) (width 0.3048)) + (fp_line (start 14.097 14.1732) (end 14.097 -12.7) (layer F.SilkS) (width 0.3048)) + (fp_circle (center 12.192 -12.065) (end 12.192 -11.303) (layer F.SilkS) (width 0.3048)) + (pad 1 smd rect (at 12.7 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 100 /buspci.sch/EQ0)) + (pad 2 smd rect (at 12.065 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 128 /buspci.sch/P_AD23)) + (pad 3 smd rect (at 11.4046 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 127 /buspci.sch/P_AD22)) + (pad 4 smd rect (at 10.7696 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 126 /buspci.sch/P_AD21)) + (pad 5 smd rect (at 10.1092 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 275 /muxdata/DPC31)) + (pad 6 smd rect (at 9.4488 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 125 /buspci.sch/P_AD20)) + (pad 7 smd rect (at 8.8138 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 123 /buspci.sch/P_AD19)) + (pad 8 smd rect (at 8.1534 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 122 /buspci.sch/P_AD18)) + (pad 9 smd rect (at 7.5184 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 101 /buspci.sch/EQ1)) + (pad 10 smd rect (at 6.858 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 11 smd rect (at 6.1976 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 12 smd rect (at 5.5626 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 121 /buspci.sch/P_AD17)) + (pad 13 smd rect (at 4.9022 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 274 /muxdata/DPC30)) + (pad 14 smd rect (at 4.2672 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 120 /buspci.sch/P_AD16)) + (pad 15 smd rect (at 3.6068 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 146 /buspci.sch/P_C/BE2#)) + (pad 16 smd rect (at 2.9464 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 150 /buspci.sch/P_FRAME#)) + (pad 17 smd rect (at 2.3114 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 102 /buspci.sch/EQ2)) + (pad 18 smd rect (at 1.651 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 154 /buspci.sch/P_IRDY#)) + (pad 19 smd rect (at 1.016 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 162 /buspci.sch/P_TRDY#)) + (pad 20 smd rect (at 0.3556 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 149 /buspci.sch/P_DEVSEL#)) + (pad 21 smd rect (at -0.3048 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 103 /buspci.sch/EQ3)) + (pad 22 smd rect (at -0.9398 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 161 /buspci.sch/P_STOP#)) + (pad 23 smd rect (at -1.6002 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 155 /buspci.sch/P_LOCK#)) + (pad 24 smd rect (at -2.2352 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 157 /buspci.sch/P_PERR#)) + (pad 25 smd rect (at -2.8956 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 272 /muxdata/DPC29)) + (pad 26 smd rect (at -3.556 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 160 /buspci.sch/P_SERR#)) + (pad 27 smd rect (at -4.191 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 156 /buspci.sch/P_PAR)) + (pad 28 smd rect (at -4.8514 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 145 /buspci.sch/P_C/BE1#)) + (pad 29 smd rect (at -5.4864 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 104 /buspci.sch/EQ4)) + (pad 30 smd rect (at -6.1468 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 31 smd rect (at -6.8072 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 32 smd rect (at -7.4422 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 119 /buspci.sch/P_AD15)) + (pad 33 smd rect (at -8.1026 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 105 /buspci.sch/EQ5)) + (pad 34 smd rect (at -8.7376 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 118 /buspci.sch/P_AD14)) + (pad 35 smd rect (at -9.398 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 117 /buspci.sch/P_AD13)) + (pad 36 smd rect (at -10.0584 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 116 /buspci.sch/P_AD12)) + (pad 37 smd rect (at -10.6934 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 271 /muxdata/DPC28)) + (pad 38 smd rect (at -11.3538 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 115 /buspci.sch/P_AD11)) + (pad 39 smd rect (at -11.9888 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 114 /buspci.sch/P_AD10)) + (pad 40 smd rect (at -12.6492 -15.494 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 143 /buspci.sch/P_AD9)) + (pad 41 smd rect (at -15.5702 -12.573 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 106 /buspci.sch/EQ6)) + (pad 42 smd rect (at -15.5702 -11.938 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 142 /buspci.sch/P_AD8)) + (pad 43 smd rect (at -15.5702 -11.2776 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 144 /buspci.sch/P_C/BE0#)) + (pad 44 smd rect (at -15.5702 -10.6426 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 141 /buspci.sch/P_AD7)) + (pad 45 smd rect (at -15.5702 -9.9822 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 270 /muxdata/DPC27)) + (pad 46 smd rect (at -15.5702 -9.3218 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 140 /buspci.sch/P_AD6)) + (pad 47 smd rect (at -15.5702 -8.6868 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 139 /buspci.sch/P_AD5)) + (pad 48 smd rect (at -15.5702 -8.0264 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 138 /buspci.sch/P_AD4)) + (pad 49 smd rect (at -15.5702 -7.3914 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 107 /buspci.sch/EQ7)) + (pad 50 smd rect (at -15.5702 -6.731 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 51 smd rect (at -15.5702 -6.0706 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 52 smd rect (at -15.5702 -5.4356 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 135 /buspci.sch/P_AD3)) + (pad 53 smd rect (at -15.5702 -4.7752 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 269 /muxdata/DPC26)) + (pad 54 smd rect (at -15.5702 -4.1402 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 124 /buspci.sch/P_AD2)) + (pad 55 smd rect (at -15.5702 -3.4798 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 113 /buspci.sch/P_AD1)) + (pad 56 smd rect (at -15.5702 -2.8194 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 112 /buspci.sch/P_AD0)) + (pad 57 smd rect (at -15.5702 -2.1844 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 209 /graphic/IRQ_SLR)) + (pad 58 smd rect (at -15.5702 -1.524 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 153 /buspci.sch/P_INTA#)) + (pad 59 smd rect (at -15.5702 -0.889 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 351 N-000317)) + (pad 60 smd rect (at -15.5702 -0.2286 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 175 /graphic/BE-3)) + (pad 61 smd rect (at -15.5702 0.4318 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 86 /buspci.sch/EA1)) + (pad 62 smd rect (at -15.5702 1.0668 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 174 /graphic/BE-2)) + (pad 63 smd rect (at -15.5702 1.7272 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 173 /graphic/BE-1)) + (pad 64 smd rect (at -15.5702 2.3622 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 171 /graphic/ADR5)) + (pad 65 smd rect (at -15.5702 3.0226 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 268 /muxdata/DPC25)) + (pad 66 smd rect (at -15.5702 3.683 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 170 /graphic/ADR4)) + (pad 67 smd rect (at -15.5702 4.318 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 169 /graphic/ADR3)) + (pad 68 smd rect (at -15.5702 4.9784 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 168 /graphic/ADR2)) + (pad 69 smd rect (at -15.5702 5.6134 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 93 /buspci.sch/EA2)) + (pad 70 smd rect (at -15.5702 6.2738 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 71 smd rect (at -15.5702 6.9342 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 72 smd rect (at -15.5702 7.5692 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 227 /graphic/RD-)) + (pad 73 smd rect (at -15.5702 8.2296 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 94 /buspci.sch/EA3)) + (pad 74 smd rect (at -15.5702 8.8646 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 235 /graphic/WR-)) + (pad 75 smd rect (at -15.5702 9.525 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 231 /graphic/SELECT-)) + (pad 76 smd rect (at -15.5702 10.1854 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 258 /muxdata/DPC15)) + (pad 77 smd rect (at -15.5702 10.8204 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 267 /muxdata/DPC24)) + (pad 78 smd rect (at -15.5702 11.4808 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 257 /muxdata/DPC14)) + (pad 79 smd rect (at -15.5702 12.1158 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 256 /muxdata/DPC13)) + (pad 80 smd rect (at -15.5702 12.7762 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 255 /muxdata/DPC12)) + (pad 121 smd rect (at 15.621 12.7762 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 87 /buspci.sch/EA10)) + (pad 122 smd rect (at 15.621 12.1158 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 219 /graphic/PTNUM1)) + (pad 123 smd rect (at 15.621 11.4808 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 110 /buspci.sch/PTNUM0)) + (pad 124 smd rect (at 15.621 10.8204 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 208 /graphic/IRQ-)) + (pad 125 smd rect (at 15.621 10.1854 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 262 /muxdata/DPC19)) + (pad 126 smd rect (at 15.621 9.525 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 291 /pal-ntsc.sch/RESET-)) + (pad 127 smd rect (at 15.621 8.8646 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 352 N-000318)) + (pad 128 smd rect (at 15.621 8.2296 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 353 N-000319)) + (pad 129 smd rect (at 15.621 7.5692 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 88 /buspci.sch/EA11)) + (pad 130 smd rect (at 15.621 6.9342 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 131 smd rect (at 15.621 6.2738 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 132 smd rect (at 15.621 5.6134 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 84 /buspci.sch/ADR6)) + (pad 133 smd rect (at 15.621 4.9784 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 261 /muxdata/DPC18)) + (pad 134 smd rect (at 15.621 4.318 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask)) + (pad 135 smd rect (at 15.621 3.683 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 349 N-000315)) + (pad 136 smd rect (at 15.621 3.0226 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask)) + (pad 137 smd rect (at 15.621 2.3622 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 89 /buspci.sch/EA12)) + (pad 138 smd rect (at 15.621 1.7272 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 350 N-000316)) + (pad 139 smd rect (at 15.621 1.0668 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 159 /buspci.sch/P_RST#)) + (pad 140 smd rect (at 15.621 0.4318 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 85 /buspci.sch/BPCLK)) + (pad 141 smd rect (at 15.621 -0.2286 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 90 /buspci.sch/EA13)) + (pad 142 smd rect (at 15.621 -0.889 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 148 /buspci.sch/P_CLK)) + (pad 143 smd rect (at 15.621 -1.524 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 151 /buspci.sch/P_GNT#)) + (pad 144 smd rect (at 15.621 -2.1844 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 158 /buspci.sch/P_REQ#)) + (pad 145 smd rect (at 15.621 -2.8194 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 260 /muxdata/DPC17)) + (pad 146 smd rect (at 15.621 -3.4798 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 137 /buspci.sch/P_AD31)) + (pad 147 smd rect (at 15.621 -4.1402 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 136 /buspci.sch/P_AD30)) + (pad 148 smd rect (at 15.621 -4.7752 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 134 /buspci.sch/P_AD29)) + (pad 149 smd rect (at 15.621 -5.4356 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 91 /buspci.sch/EA14)) + (pad 150 smd rect (at 15.621 -6.0706 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 151 smd rect (at 15.621 -6.731 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 152 smd rect (at 15.621 -7.3914 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 133 /buspci.sch/P_AD28)) + (pad 153 smd rect (at 15.621 -8.0264 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 92 /buspci.sch/EA15)) + (pad 154 smd rect (at 15.621 -8.6868 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 132 /buspci.sch/P_AD27)) + (pad 155 smd rect (at 15.621 -9.3218 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 131 /buspci.sch/P_AD26)) + (pad 156 smd rect (at 15.621 -9.9822 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 130 /buspci.sch/P_AD25)) + (pad 157 smd rect (at 15.621 -10.6426 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 259 /muxdata/DPC16)) + (pad 158 smd rect (at 15.621 -11.2776 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 129 /buspci.sch/P_AD24)) + (pad 159 smd rect (at 15.621 -11.938 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 147 /buspci.sch/P_C/BE3#)) + (pad 160 smd rect (at 15.621 -12.573 180) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 152 /buspci.sch/P_IDSEL)) + (pad 81 smd rect (at -12.6492 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 95 /buspci.sch/EA4)) + (pad 82 smd rect (at -11.9888 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 254 /muxdata/DPC11)) + (pad 83 smd rect (at -11.3538 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 253 /muxdata/DPC10)) + (pad 84 smd rect (at -10.6934 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 278 /muxdata/DPC9)) + (pad 85 smd rect (at -10.0584 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 266 /muxdata/DPC23)) + (pad 86 smd rect (at -9.398 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 277 /muxdata/DPC8)) + (pad 87 smd rect (at -8.7376 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 172 /graphic/BE-0)) + (pad 88 smd rect (at -8.1026 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 12 /ESVIDEO-RVB/DPC7)) + (pad 89 smd rect (at -7.4422 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 96 /buspci.sch/EA5)) + (pad 90 smd rect (at -6.8072 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 91 smd rect (at -6.1468 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 92 smd rect (at -5.4864 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 276 /muxdata/DPC6)) + (pad 93 smd rect (at -4.8514 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 265 /muxdata/DPC22)) + (pad 94 smd rect (at -4.191 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 11 /ESVIDEO-RVB/DPC5)) + (pad 95 smd rect (at -3.556 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 10 /ESVIDEO-RVB/DPC4)) + (pad 96 smd rect (at -2.8956 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 273 /muxdata/DPC3)) + (pad 97 smd rect (at -2.2352 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 97 /buspci.sch/EA6)) + (pad 98 smd rect (at -1.6002 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 9 /ESVIDEO-RVB/DPC2)) + (pad 99 smd rect (at -0.9398 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 8 /ESVIDEO-RVB/DPC1)) + (pad 100 smd rect (at -0.3048 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 7 /ESVIDEO-RVB/DPC0)) + (pad 101 smd rect (at 0.3556 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 98 /buspci.sch/EA7)) + (pad 102 smd rect (at 1.016 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 164 /buspci.sch/WRFIFO-)) + (pad 103 smd rect (at 1.651 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 165 /buspci.sch/WRFULL)) + (pad 104 smd rect (at 2.3114 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 163 /buspci.sch/RDFIFO-)) + (pad 105 smd rect (at 2.9464 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 264 /muxdata/DPC21)) + (pad 106 smd rect (at 3.6068 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 229 /graphic/RDEMPTY)) + (pad 107 smd rect (at 4.2672 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 214 /graphic/PTADR-)) + (pad 108 smd rect (at 4.9022 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 220 /graphic/PTWR)) + (pad 109 smd rect (at 5.5626 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 166 /buspci.sch/X_IRQ)) + (pad 110 smd rect (at 6.1976 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 111 smd rect (at 6.858 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 112 smd rect (at 7.5184 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 218 /graphic/PTBURST-)) + (pad 113 smd rect (at 8.1534 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 99 /buspci.sch/EA9)) + (pad 114 smd rect (at 8.8138 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 108 /buspci.sch/PTATN-)) + (pad 115 smd rect (at 9.4488 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 111 /buspci.sch/PTRDY-)) + (pad 116 smd rect (at 10.1092 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 215 /graphic/PTBE-0)) + (pad 117 smd rect (at 10.7696 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 263 /muxdata/DPC20)) + (pad 118 smd rect (at 11.4046 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 109 /buspci.sch/PTBE-1)) + (pad 119 smd rect (at 12.065 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 216 /graphic/PTBE-2)) + (pad 120 smd rect (at 12.7 15.6972 180) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 217 /graphic/PTBE-3)) (model smd/pqfp160.wrl (at (xyz 0 0 0)) (scale (xyz 0.512 0.512 0.5)) @@ -10901,621 +7456,301 @@ (tags "CMS PQFP") (path /4BF03681/BECCB834) (attr smd) - (fp_text reference U10 (at 0 -2.54) (layer Dessus.SilkS) + (fp_text reference U10 (at 0 -2.54) (layer F.SilkS) (effects (font (size 2.032 1.524) (thickness 0.3048))) ) - (fp_text value BT812 (at 0 2.54) (layer Dessus.SilkS) + (fp_text value BT812 (at 0 2.54) (layer F.SilkS) (effects (font (size 2.032 1.524) (thickness 0.3048))) ) - (fp_text user 1 (at 13.589 -15.494) (layer Dessus.SilkS) + (fp_text user 1 (at 13.589 -15.494) (layer F.SilkS) (effects (font (size 1.524 1.016) (thickness 0.254))) ) - (fp_line (start 12.827 -13.97) (end 14.097 -12.7) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -14.0462 14.1732) (end 14.097 14.1732) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 12.827 -13.97) (end -14.0462 -13.97) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -14.0462 -13.97) (end -14.0462 14.1732) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 14.097 14.1732) (end 14.097 -12.7) (layer Dessus.SilkS) (width 0.3048)) - (fp_circle (center 12.192 -12.065) (end 12.192 -11.303) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 smd rect (at 12.7 -15.494) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 297 /pal-ntsc.sch/VAF) - ) - (pad 2 smd rect (at 12.065 -15.494) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 297 /pal-ntsc.sch/VAF) - ) - (pad 3 smd rect (at 11.4046 -15.494) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 4 smd rect (at 10.7696 -15.494) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 336 N-000124) - ) - (pad 5 smd rect (at 10.1092 -15.494) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 6 smd rect (at 9.4488 -15.494) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 300 /pal-ntsc.sch/Y_SYNC) - ) - (pad 7 smd rect (at 8.8138 -15.494) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 8 smd rect (at 8.1534 -15.494) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 9 smd rect (at 7.5184 -15.494) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 10 smd rect (at 6.858 -15.494) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 11 smd rect (at 6.1976 -15.494) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 12 smd rect (at 5.5626 -15.494) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 13 smd rect (at 4.9022 -15.494) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 14 smd rect (at 4.2672 -15.494) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 15 smd rect (at 3.6068 -15.494) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 16 smd rect (at 2.9464 -15.494) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 17 smd rect (at 2.3114 -15.494) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 18 smd rect (at 1.651 -15.494) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 19 smd rect (at 1.016 -15.494) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 20 smd rect (at 0.3556 -15.494) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 21 smd rect (at -0.3048 -15.494) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 22 smd rect (at -0.9398 -15.494) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 23 smd rect (at -1.6002 -15.494) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 24 smd rect (at -2.2352 -15.494) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 25 smd rect (at -2.8956 -15.494) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 26 smd rect (at -3.556 -15.494) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 27 smd rect (at -4.191 -15.494) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 28 smd rect (at -4.8514 -15.494) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 29 smd rect (at -5.4864 -15.494) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 30 smd rect (at -6.1468 -15.494) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 31 smd rect (at -6.8072 -15.494) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 32 smd rect (at -7.4422 -15.494) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 33 smd rect (at -8.1026 -15.494) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 34 smd rect (at -8.7376 -15.494) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 298 /pal-ntsc.sch/VD_PAL-) - ) - (pad 35 smd rect (at -9.398 -15.494) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 36 smd rect (at -10.0584 -15.494) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 288 /pal-ntsc.sch/HD_PAL-) - ) - (pad 37 smd rect (at -10.6934 -15.494) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 38 smd rect (at -11.3538 -15.494) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 39 smd rect (at -11.9888 -15.494) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 297 /pal-ntsc.sch/VAF) - ) - (pad 40 smd rect (at -12.6492 -15.494) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 297 /pal-ntsc.sch/VAF) - ) - (pad 41 smd rect (at -15.5702 -12.573) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 297 /pal-ntsc.sch/VAF) - ) - (pad 42 smd rect (at -15.5702 -11.938) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 297 /pal-ntsc.sch/VAF) - ) - (pad 43 smd rect (at -15.5702 -11.2776) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 297 /pal-ntsc.sch/VAF) - ) - (pad 44 smd rect (at -15.5702 -10.6426) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 45 smd rect (at -15.5702 -9.9822) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 46 smd rect (at -15.5702 -9.3218) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 289 /pal-ntsc.sch/OE_PAL-) - ) - (pad 47 smd rect (at -15.5702 -8.6868) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 289 /pal-ntsc.sch/OE_PAL-) - ) - (pad 48 smd rect (at -15.5702 -8.0264) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 294 /pal-ntsc.sch/TVB7) - ) - (pad 49 smd rect (at -15.5702 -7.3914) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 293 /pal-ntsc.sch/TVB6) - ) - (pad 50 smd rect (at -15.5702 -6.731) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 292 /pal-ntsc.sch/TVB5) - ) - (pad 51 smd rect (at -15.5702 -6.0706) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 281 /muxdata/TVB4) - ) - (pad 52 smd rect (at -15.5702 -5.4356) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 21 /ESVIDEO-RVB/TVB3) - ) - (pad 53 smd rect (at -15.5702 -4.7752) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 20 /ESVIDEO-RVB/TVB2) - ) - (pad 54 smd rect (at -15.5702 -4.1402) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 280 /muxdata/TVB1) - ) - (pad 55 smd rect (at -15.5702 -3.4798) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 279 /muxdata/TVB0) - ) - (pad 56 smd rect (at -15.5702 -2.8194) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 57 smd rect (at -15.5702 -2.1844) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 58 smd rect (at -15.5702 -1.524) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 33 /ESVIDEO-RVB/TVR7) - ) - (pad 59 smd rect (at -15.5702 -0.889) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 32 /ESVIDEO-RVB/TVR6) - ) - (pad 60 smd rect (at -15.5702 -0.2286) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 31 /ESVIDEO-RVB/TVR5) - ) - (pad 61 smd rect (at -15.5702 0.4318) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 296 /pal-ntsc.sch/TVR4) - ) - (pad 62 smd rect (at -15.5702 1.0668) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 295 /pal-ntsc.sch/TVR3) - ) - (pad 63 smd rect (at -15.5702 1.7272) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 30 /ESVIDEO-RVB/TVR2) - ) - (pad 64 smd rect (at -15.5702 2.3622) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 29 /ESVIDEO-RVB/TVR1) - ) - (pad 65 smd rect (at -15.5702 3.0226) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 28 /ESVIDEO-RVB/TVR0) - ) - (pad 66 smd rect (at -15.5702 3.683) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 67 smd rect (at -15.5702 4.318) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 283 /muxdata/TVG7) - ) - (pad 68 smd rect (at -15.5702 4.9784) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 282 /muxdata/TVG6) - ) - (pad 69 smd rect (at -15.5702 5.6134) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 27 /ESVIDEO-RVB/TVG5) - ) - (pad 70 smd rect (at -15.5702 6.2738) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 26 /ESVIDEO-RVB/TVG4) - ) - (pad 71 smd rect (at -15.5702 6.9342) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 25 /ESVIDEO-RVB/TVG3) - ) - (pad 72 smd rect (at -15.5702 7.5692) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 24 /ESVIDEO-RVB/TVG2) - ) - (pad 73 smd rect (at -15.5702 8.2296) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 23 /ESVIDEO-RVB/TVG1) - ) - (pad 74 smd rect (at -15.5702 8.8646) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 22 /ESVIDEO-RVB/TVG0) - ) - (pad 75 smd rect (at -15.5702 9.525) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 76 smd rect (at -15.5702 10.1854) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 77 smd rect (at -15.5702 10.8204) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 78 smd rect (at -15.5702 11.4808) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 297 /pal-ntsc.sch/VAF) - ) - (pad 79 smd rect (at -15.5702 12.1158) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 297 /pal-ntsc.sch/VAF) - ) - (pad 80 smd rect (at -15.5702 12.7762) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 297 /pal-ntsc.sch/VAF) - ) - (pad 121 smd rect (at 15.621 12.7762) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 297 /pal-ntsc.sch/VAF) - ) - (pad 122 smd rect (at 15.621 12.1158) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 297 /pal-ntsc.sch/VAF) - ) - (pad 123 smd rect (at 15.621 11.4808) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 297 /pal-ntsc.sch/VAF) - ) - (pad 124 smd rect (at 15.621 10.8204) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 125 smd rect (at 15.621 10.1854) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 286 /pal-ntsc.sch/C-VIDEO) - ) - (pad 126 smd rect (at 15.621 9.525) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 127 smd rect (at 15.621 8.8646) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 128 smd rect (at 15.621 8.2296) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 129 smd rect (at 15.621 7.5692) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 130 smd rect (at 15.621 6.9342) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 131 smd rect (at 15.621 6.2738) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 132 smd rect (at 15.621 5.6134) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 297 /pal-ntsc.sch/VAF) - ) - (pad 133 smd rect (at 15.621 4.9784) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 134 smd rect (at 15.621 4.318) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 135 smd rect (at 15.621 3.683) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 342 N-000130) - ) - (pad 136 smd rect (at 15.621 3.0226) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 137 smd rect (at 15.621 2.3622) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 330 N-000117) - ) - (pad 138 smd rect (at 15.621 1.7272) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 139 smd rect (at 15.621 1.0668) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 140 smd rect (at 15.621 0.4318) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 334 N-000122) - ) - (pad 141 smd rect (at 15.621 -0.2286) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 297 /pal-ntsc.sch/VAF) - ) - (pad 142 smd rect (at 15.621 -0.889) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 297 /pal-ntsc.sch/VAF) - ) - (pad 143 smd rect (at 15.621 -1.524) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 144 smd rect (at 15.621 -2.1844) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 330 N-000117) - ) - (pad 145 smd rect (at 15.621 -2.8194) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 146 smd rect (at 15.621 -3.4798) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 147 smd rect (at 15.621 -4.1402) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 148 smd rect (at 15.621 -4.7752) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 149 smd rect (at 15.621 -5.4356) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 297 /pal-ntsc.sch/VAF) - ) - (pad 150 smd rect (at 15.621 -6.0706) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 151 smd rect (at 15.621 -6.731) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 152 smd rect (at 15.621 -7.3914) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 153 smd rect (at 15.621 -8.0264) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 154 smd rect (at 15.621 -8.6868) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 155 smd rect (at 15.621 -9.3218) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 156 smd rect (at 15.621 -9.9822) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 299 /pal-ntsc.sch/Y-VIDEO) - ) - (pad 157 smd rect (at 15.621 -10.6426) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 158 smd rect (at 15.621 -11.2776) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 297 /pal-ntsc.sch/VAF) - ) - (pad 159 smd rect (at 15.621 -11.938) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 297 /pal-ntsc.sch/VAF) - ) - (pad 160 smd rect (at 15.621 -12.573) (size 2.54 0.381) - (layers Composant Dessus.Pate Dessus.Masque) - (net 297 /pal-ntsc.sch/VAF) - ) - (pad 81 smd rect (at -12.6492 15.6972) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 297 /pal-ntsc.sch/VAF) - ) - (pad 82 smd rect (at -11.9888 15.6972) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 297 /pal-ntsc.sch/VAF) - ) - (pad 83 smd rect (at -11.3538 15.6972) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 178 /graphic/BT812_WR-) - ) - (pad 84 smd rect (at -10.6934 15.6972) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 16 /ESVIDEO-RVB/PCA0) - ) - (pad 85 smd rect (at -10.0584 15.6972) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 212 /graphic/PCA1) - ) - (pad 86 smd rect (at -9.398 15.6972) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 177 /graphic/BT812_RD-) - ) - (pad 87 smd rect (at -8.7376 15.6972) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 291 /pal-ntsc.sch/RESET-) - ) - (pad 88 smd rect (at -8.1026 15.6972) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 89 smd rect (at -7.4422 15.6972) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 90 smd rect (at -6.8072 15.6972) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 91 smd rect (at -6.1468 15.6972) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 92 smd rect (at -5.4864 15.6972) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 7 /ESVIDEO-RVB/DPC0) - ) - (pad 93 smd rect (at -4.8514 15.6972) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 8 /ESVIDEO-RVB/DPC1) - ) - (pad 94 smd rect (at -4.191 15.6972) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 9 /ESVIDEO-RVB/DPC2) - ) - (pad 95 smd rect (at -3.556 15.6972) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 273 /muxdata/DPC3) - ) - (pad 96 smd rect (at -2.8956 15.6972) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 10 /ESVIDEO-RVB/DPC4) - ) - (pad 97 smd rect (at -2.2352 15.6972) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 11 /ESVIDEO-RVB/DPC5) - ) - (pad 98 smd rect (at -1.6002 15.6972) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 99 smd rect (at -0.9398 15.6972) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 276 /muxdata/DPC6) - ) - (pad 100 smd rect (at -0.3048 15.6972) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 12 /ESVIDEO-RVB/DPC7) - ) - (pad 101 smd rect (at 0.3556 15.6972) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 102 smd rect (at 1.016 15.6972) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 103 smd rect (at 1.651 15.6972) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 104 smd rect (at 2.3114 15.6972) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 287 /pal-ntsc.sch/F_PALIN) - ) - (pad 105 smd rect (at 2.9464 15.6972) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 106 smd rect (at 3.6068 15.6972) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 107 smd rect (at 4.2672 15.6972) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - ) - (pad 108 smd rect (at 4.9022 15.6972) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 332 N-000119) - ) - (pad 109 smd rect (at 5.5626 15.6972) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 333 N-000120) - ) - (pad 110 smd rect (at 6.1976 15.6972) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 331 N-000118) - ) - (pad 111 smd rect (at 6.858 15.6972) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 112 smd rect (at 7.5184 15.6972) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 113 smd rect (at 8.1534 15.6972) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 330 N-000117) - ) - (pad 114 smd rect (at 8.8138 15.6972) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 328 N-000115) - ) - (pad 115 smd rect (at 9.4488 15.6972) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 340 N-000128) - ) - (pad 116 smd rect (at 10.1092 15.6972) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 117 smd rect (at 10.7696 15.6972) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 335 N-000123) - ) - (pad 118 smd rect (at 11.4046 15.6972) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) - (pad 119 smd rect (at 12.065 15.6972) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 297 /pal-ntsc.sch/VAF) - ) - (pad 120 smd rect (at 12.7 15.6972) (size 0.381 2.54) - (layers Composant Dessus.Pate Dessus.Masque) - (net 297 /pal-ntsc.sch/VAF) - ) + (fp_line (start 12.827 -13.97) (end 14.097 -12.7) (layer F.SilkS) (width 0.3048)) + (fp_line (start -14.0462 14.1732) (end 14.097 14.1732) (layer F.SilkS) (width 0.3048)) + (fp_line (start 12.827 -13.97) (end -14.0462 -13.97) (layer F.SilkS) (width 0.3048)) + (fp_line (start -14.0462 -13.97) (end -14.0462 14.1732) (layer F.SilkS) (width 0.3048)) + (fp_line (start 14.097 14.1732) (end 14.097 -12.7) (layer F.SilkS) (width 0.3048)) + (fp_circle (center 12.192 -12.065) (end 12.192 -11.303) (layer F.SilkS) (width 0.3048)) + (pad 1 smd rect (at 12.7 -15.494) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 297 /pal-ntsc.sch/VAF)) + (pad 2 smd rect (at 12.065 -15.494) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 297 /pal-ntsc.sch/VAF)) + (pad 3 smd rect (at 11.4046 -15.494) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 4 smd rect (at 10.7696 -15.494) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 336 N-000124)) + (pad 5 smd rect (at 10.1092 -15.494) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 6 smd rect (at 9.4488 -15.494) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 300 /pal-ntsc.sch/Y_SYNC)) + (pad 7 smd rect (at 8.8138 -15.494) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 8 smd rect (at 8.1534 -15.494) (size 0.381 2.54) (layers Composant F.Paste F.Mask)) + (pad 9 smd rect (at 7.5184 -15.494) (size 0.381 2.54) (layers Composant F.Paste F.Mask)) + (pad 10 smd rect (at 6.858 -15.494) (size 0.381 2.54) (layers Composant F.Paste F.Mask)) + (pad 11 smd rect (at 6.1976 -15.494) (size 0.381 2.54) (layers Composant F.Paste F.Mask)) + (pad 12 smd rect (at 5.5626 -15.494) (size 0.381 2.54) (layers Composant F.Paste F.Mask)) + (pad 13 smd rect (at 4.9022 -15.494) (size 0.381 2.54) (layers Composant F.Paste F.Mask)) + (pad 14 smd rect (at 4.2672 -15.494) (size 0.381 2.54) (layers Composant F.Paste F.Mask)) + (pad 15 smd rect (at 3.6068 -15.494) (size 0.381 2.54) (layers Composant F.Paste F.Mask)) + (pad 16 smd rect (at 2.9464 -15.494) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 17 smd rect (at 2.3114 -15.494) (size 0.381 2.54) (layers Composant F.Paste F.Mask)) + (pad 18 smd rect (at 1.651 -15.494) (size 0.381 2.54) (layers Composant F.Paste F.Mask)) + (pad 19 smd rect (at 1.016 -15.494) (size 0.381 2.54) (layers Composant F.Paste F.Mask)) + (pad 20 smd rect (at 0.3556 -15.494) (size 0.381 2.54) (layers Composant F.Paste F.Mask)) + (pad 21 smd rect (at -0.3048 -15.494) (size 0.381 2.54) (layers Composant F.Paste F.Mask)) + (pad 22 smd rect (at -0.9398 -15.494) (size 0.381 2.54) (layers Composant F.Paste F.Mask)) + (pad 23 smd rect (at -1.6002 -15.494) (size 0.381 2.54) (layers Composant F.Paste F.Mask)) + (pad 24 smd rect (at -2.2352 -15.494) (size 0.381 2.54) (layers Composant F.Paste F.Mask)) + (pad 25 smd rect (at -2.8956 -15.494) (size 0.381 2.54) (layers Composant F.Paste F.Mask)) + (pad 26 smd rect (at -3.556 -15.494) (size 0.381 2.54) (layers Composant F.Paste F.Mask)) + (pad 27 smd rect (at -4.191 -15.494) (size 0.381 2.54) (layers Composant F.Paste F.Mask)) + (pad 28 smd rect (at -4.8514 -15.494) (size 0.381 2.54) (layers Composant F.Paste F.Mask)) + (pad 29 smd rect (at -5.4864 -15.494) (size 0.381 2.54) (layers Composant F.Paste F.Mask)) + (pad 30 smd rect (at -6.1468 -15.494) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 31 smd rect (at -6.8072 -15.494) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 32 smd rect (at -7.4422 -15.494) (size 0.381 2.54) (layers Composant F.Paste F.Mask)) + (pad 33 smd rect (at -8.1026 -15.494) (size 0.381 2.54) (layers Composant F.Paste F.Mask)) + (pad 34 smd rect (at -8.7376 -15.494) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 298 /pal-ntsc.sch/VD_PAL-)) + (pad 35 smd rect (at -9.398 -15.494) (size 0.381 2.54) (layers Composant F.Paste F.Mask)) + (pad 36 smd rect (at -10.0584 -15.494) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 288 /pal-ntsc.sch/HD_PAL-)) + (pad 37 smd rect (at -10.6934 -15.494) (size 0.381 2.54) (layers Composant F.Paste F.Mask)) + (pad 38 smd rect (at -11.3538 -15.494) (size 0.381 2.54) (layers Composant F.Paste F.Mask)) + (pad 39 smd rect (at -11.9888 -15.494) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 297 /pal-ntsc.sch/VAF)) + (pad 40 smd rect (at -12.6492 -15.494) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 297 /pal-ntsc.sch/VAF)) + (pad 41 smd rect (at -15.5702 -12.573) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 297 /pal-ntsc.sch/VAF)) + (pad 42 smd rect (at -15.5702 -11.938) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 297 /pal-ntsc.sch/VAF)) + (pad 43 smd rect (at -15.5702 -11.2776) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 297 /pal-ntsc.sch/VAF)) + (pad 44 smd rect (at -15.5702 -10.6426) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 45 smd rect (at -15.5702 -9.9822) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 46 smd rect (at -15.5702 -9.3218) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 289 /pal-ntsc.sch/OE_PAL-)) + (pad 47 smd rect (at -15.5702 -8.6868) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 289 /pal-ntsc.sch/OE_PAL-)) + (pad 48 smd rect (at -15.5702 -8.0264) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 294 /pal-ntsc.sch/TVB7)) + (pad 49 smd rect (at -15.5702 -7.3914) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 293 /pal-ntsc.sch/TVB6)) + (pad 50 smd rect (at -15.5702 -6.731) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 292 /pal-ntsc.sch/TVB5)) + (pad 51 smd rect (at -15.5702 -6.0706) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 281 /muxdata/TVB4)) + (pad 52 smd rect (at -15.5702 -5.4356) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 21 /ESVIDEO-RVB/TVB3)) + (pad 53 smd rect (at -15.5702 -4.7752) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 20 /ESVIDEO-RVB/TVB2)) + (pad 54 smd rect (at -15.5702 -4.1402) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 280 /muxdata/TVB1)) + (pad 55 smd rect (at -15.5702 -3.4798) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 279 /muxdata/TVB0)) + (pad 56 smd rect (at -15.5702 -2.8194) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 57 smd rect (at -15.5702 -2.1844) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 58 smd rect (at -15.5702 -1.524) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 33 /ESVIDEO-RVB/TVR7)) + (pad 59 smd rect (at -15.5702 -0.889) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 32 /ESVIDEO-RVB/TVR6)) + (pad 60 smd rect (at -15.5702 -0.2286) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 31 /ESVIDEO-RVB/TVR5)) + (pad 61 smd rect (at -15.5702 0.4318) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 296 /pal-ntsc.sch/TVR4)) + (pad 62 smd rect (at -15.5702 1.0668) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 295 /pal-ntsc.sch/TVR3)) + (pad 63 smd rect (at -15.5702 1.7272) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 30 /ESVIDEO-RVB/TVR2)) + (pad 64 smd rect (at -15.5702 2.3622) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 29 /ESVIDEO-RVB/TVR1)) + (pad 65 smd rect (at -15.5702 3.0226) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 28 /ESVIDEO-RVB/TVR0)) + (pad 66 smd rect (at -15.5702 3.683) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 67 smd rect (at -15.5702 4.318) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 283 /muxdata/TVG7)) + (pad 68 smd rect (at -15.5702 4.9784) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 282 /muxdata/TVG6)) + (pad 69 smd rect (at -15.5702 5.6134) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 27 /ESVIDEO-RVB/TVG5)) + (pad 70 smd rect (at -15.5702 6.2738) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 26 /ESVIDEO-RVB/TVG4)) + (pad 71 smd rect (at -15.5702 6.9342) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 25 /ESVIDEO-RVB/TVG3)) + (pad 72 smd rect (at -15.5702 7.5692) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 24 /ESVIDEO-RVB/TVG2)) + (pad 73 smd rect (at -15.5702 8.2296) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 23 /ESVIDEO-RVB/TVG1)) + (pad 74 smd rect (at -15.5702 8.8646) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 22 /ESVIDEO-RVB/TVG0)) + (pad 75 smd rect (at -15.5702 9.525) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 76 smd rect (at -15.5702 10.1854) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 77 smd rect (at -15.5702 10.8204) (size 2.54 0.381) (layers Composant F.Paste F.Mask)) + (pad 78 smd rect (at -15.5702 11.4808) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 297 /pal-ntsc.sch/VAF)) + (pad 79 smd rect (at -15.5702 12.1158) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 297 /pal-ntsc.sch/VAF)) + (pad 80 smd rect (at -15.5702 12.7762) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 297 /pal-ntsc.sch/VAF)) + (pad 121 smd rect (at 15.621 12.7762) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 297 /pal-ntsc.sch/VAF)) + (pad 122 smd rect (at 15.621 12.1158) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 297 /pal-ntsc.sch/VAF)) + (pad 123 smd rect (at 15.621 11.4808) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 297 /pal-ntsc.sch/VAF)) + (pad 124 smd rect (at 15.621 10.8204) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 125 smd rect (at 15.621 10.1854) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 286 /pal-ntsc.sch/C-VIDEO)) + (pad 126 smd rect (at 15.621 9.525) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 127 smd rect (at 15.621 8.8646) (size 2.54 0.381) (layers Composant F.Paste F.Mask)) + (pad 128 smd rect (at 15.621 8.2296) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 129 smd rect (at 15.621 7.5692) (size 2.54 0.381) (layers Composant F.Paste F.Mask)) + (pad 130 smd rect (at 15.621 6.9342) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 131 smd rect (at 15.621 6.2738) (size 2.54 0.381) (layers Composant F.Paste F.Mask)) + (pad 132 smd rect (at 15.621 5.6134) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 297 /pal-ntsc.sch/VAF)) + (pad 133 smd rect (at 15.621 4.9784) (size 2.54 0.381) (layers Composant F.Paste F.Mask)) + (pad 134 smd rect (at 15.621 4.318) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 135 smd rect (at 15.621 3.683) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 342 N-000130)) + (pad 136 smd rect (at 15.621 3.0226) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 137 smd rect (at 15.621 2.3622) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 330 N-000117)) + (pad 138 smd rect (at 15.621 1.7272) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 139 smd rect (at 15.621 1.0668) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 140 smd rect (at 15.621 0.4318) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 334 N-000122)) + (pad 141 smd rect (at 15.621 -0.2286) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 297 /pal-ntsc.sch/VAF)) + (pad 142 smd rect (at 15.621 -0.889) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 297 /pal-ntsc.sch/VAF)) + (pad 143 smd rect (at 15.621 -1.524) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 144 smd rect (at 15.621 -2.1844) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 330 N-000117)) + (pad 145 smd rect (at 15.621 -2.8194) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 146 smd rect (at 15.621 -3.4798) (size 2.54 0.381) (layers Composant F.Paste F.Mask)) + (pad 147 smd rect (at 15.621 -4.1402) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 148 smd rect (at 15.621 -4.7752) (size 2.54 0.381) (layers Composant F.Paste F.Mask)) + (pad 149 smd rect (at 15.621 -5.4356) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 297 /pal-ntsc.sch/VAF)) + (pad 150 smd rect (at 15.621 -6.0706) (size 2.54 0.381) (layers Composant F.Paste F.Mask)) + (pad 151 smd rect (at 15.621 -6.731) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 152 smd rect (at 15.621 -7.3914) (size 2.54 0.381) (layers Composant F.Paste F.Mask)) + (pad 153 smd rect (at 15.621 -8.0264) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 154 smd rect (at 15.621 -8.6868) (size 2.54 0.381) (layers Composant F.Paste F.Mask)) + (pad 155 smd rect (at 15.621 -9.3218) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 156 smd rect (at 15.621 -9.9822) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 299 /pal-ntsc.sch/Y-VIDEO)) + (pad 157 smd rect (at 15.621 -10.6426) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 158 smd rect (at 15.621 -11.2776) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 297 /pal-ntsc.sch/VAF)) + (pad 159 smd rect (at 15.621 -11.938) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 297 /pal-ntsc.sch/VAF)) + (pad 160 smd rect (at 15.621 -12.573) (size 2.54 0.381) (layers Composant F.Paste F.Mask) + (net 297 /pal-ntsc.sch/VAF)) + (pad 81 smd rect (at -12.6492 15.6972) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 297 /pal-ntsc.sch/VAF)) + (pad 82 smd rect (at -11.9888 15.6972) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 297 /pal-ntsc.sch/VAF)) + (pad 83 smd rect (at -11.3538 15.6972) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 178 /graphic/BT812_WR-)) + (pad 84 smd rect (at -10.6934 15.6972) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 16 /ESVIDEO-RVB/PCA0)) + (pad 85 smd rect (at -10.0584 15.6972) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 212 /graphic/PCA1)) + (pad 86 smd rect (at -9.398 15.6972) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 177 /graphic/BT812_RD-)) + (pad 87 smd rect (at -8.7376 15.6972) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 291 /pal-ntsc.sch/RESET-)) + (pad 88 smd rect (at -8.1026 15.6972) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 89 smd rect (at -7.4422 15.6972) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 90 smd rect (at -6.8072 15.6972) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 91 smd rect (at -6.1468 15.6972) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 92 smd rect (at -5.4864 15.6972) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 7 /ESVIDEO-RVB/DPC0)) + (pad 93 smd rect (at -4.8514 15.6972) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 8 /ESVIDEO-RVB/DPC1)) + (pad 94 smd rect (at -4.191 15.6972) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 9 /ESVIDEO-RVB/DPC2)) + (pad 95 smd rect (at -3.556 15.6972) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 273 /muxdata/DPC3)) + (pad 96 smd rect (at -2.8956 15.6972) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 10 /ESVIDEO-RVB/DPC4)) + (pad 97 smd rect (at -2.2352 15.6972) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 11 /ESVIDEO-RVB/DPC5)) + (pad 98 smd rect (at -1.6002 15.6972) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 99 smd rect (at -0.9398 15.6972) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 276 /muxdata/DPC6)) + (pad 100 smd rect (at -0.3048 15.6972) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 12 /ESVIDEO-RVB/DPC7)) + (pad 101 smd rect (at 0.3556 15.6972) (size 0.381 2.54) (layers Composant F.Paste F.Mask)) + (pad 102 smd rect (at 1.016 15.6972) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 103 smd rect (at 1.651 15.6972) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 104 smd rect (at 2.3114 15.6972) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 287 /pal-ntsc.sch/F_PALIN)) + (pad 105 smd rect (at 2.9464 15.6972) (size 0.381 2.54) (layers Composant F.Paste F.Mask)) + (pad 106 smd rect (at 3.6068 15.6972) (size 0.381 2.54) (layers Composant F.Paste F.Mask)) + (pad 107 smd rect (at 4.2672 15.6972) (size 0.381 2.54) (layers Composant F.Paste F.Mask)) + (pad 108 smd rect (at 4.9022 15.6972) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 332 N-000119)) + (pad 109 smd rect (at 5.5626 15.6972) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 333 N-000120)) + (pad 110 smd rect (at 6.1976 15.6972) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 331 N-000118)) + (pad 111 smd rect (at 6.858 15.6972) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 112 smd rect (at 7.5184 15.6972) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 113 smd rect (at 8.1534 15.6972) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 330 N-000117)) + (pad 114 smd rect (at 8.8138 15.6972) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 328 N-000115)) + (pad 115 smd rect (at 9.4488 15.6972) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 340 N-000128)) + (pad 116 smd rect (at 10.1092 15.6972) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 117 smd rect (at 10.7696 15.6972) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 335 N-000123)) + (pad 118 smd rect (at 11.4046 15.6972) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 301 GND)) + (pad 119 smd rect (at 12.065 15.6972) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 297 /pal-ntsc.sch/VAF)) + (pad 120 smd rect (at 12.7 15.6972) (size 0.381 2.54) (layers Composant F.Paste F.Mask) + (net 297 /pal-ntsc.sch/VAF)) (model smd/pqfp160.wrl (at (xyz 0 0 0)) (scale (xyz 0.512 0.512 0.5)) @@ -11528,53 +7763,35 @@ (descr "8 R pack") (tags R) (path /4BF03687/C931248E) - (fp_text reference RR7 (at -1.27 -2.794 90) (layer Dessus.SilkS) + (fp_text reference RR7 (at -1.27 -2.794 90) (layer F.SilkS) (effects (font (size 1.27 1.27) (thickness 0.2032))) ) - (fp_text value 8x10K (at 0 2.032 90) (layer Dessus.SilkS) + (fp_text value 8x10K (at 0 2.032 90) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start 11.43 -1.27) (end 11.43 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 11.43 1.27) (end -11.43 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -11.43 1.27) (end -11.43 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 11.43 -1.27) (end -11.43 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -8.89 -1.27) (end -8.89 1.27) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at -10.16 0 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 4 +5V) - ) - (pad 2 thru_hole circle (at -7.62 0 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 7 /ESVIDEO-RVB/DPC0) - ) - (pad 3 thru_hole circle (at -5.08 0 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 8 /ESVIDEO-RVB/DPC1) - ) - (pad 4 thru_hole circle (at -2.54 0 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 9 /ESVIDEO-RVB/DPC2) - ) - (pad 5 thru_hole circle (at 0 0 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 273 /muxdata/DPC3) - ) - (pad 6 thru_hole circle (at 2.54 0 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 10 /ESVIDEO-RVB/DPC4) - ) - (pad 7 thru_hole circle (at 5.08 0 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 11 /ESVIDEO-RVB/DPC5) - ) - (pad 8 thru_hole circle (at 7.62 0 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 276 /muxdata/DPC6) - ) - (pad 9 thru_hole circle (at 10.16 0 90) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 12 /ESVIDEO-RVB/DPC7) - ) + (fp_line (start 11.43 -1.27) (end 11.43 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 11.43 1.27) (end -11.43 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -11.43 1.27) (end -11.43 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 11.43 -1.27) (end -11.43 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -8.89 -1.27) (end -8.89 1.27) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole rect (at -10.16 0 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 4 +5V)) + (pad 2 thru_hole circle (at -7.62 0 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 7 /ESVIDEO-RVB/DPC0)) + (pad 3 thru_hole circle (at -5.08 0 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 8 /ESVIDEO-RVB/DPC1)) + (pad 4 thru_hole circle (at -2.54 0 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 9 /ESVIDEO-RVB/DPC2)) + (pad 5 thru_hole circle (at 0 0 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 273 /muxdata/DPC3)) + (pad 6 thru_hole circle (at 2.54 0 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 10 /ESVIDEO-RVB/DPC4)) + (pad 7 thru_hole circle (at 5.08 0 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 11 /ESVIDEO-RVB/DPC5)) + (pad 8 thru_hole circle (at 7.62 0 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 276 /muxdata/DPC6)) + (pad 9 thru_hole circle (at 10.16 0 90) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 12 /ESVIDEO-RVB/DPC7)) (model discret/r_pack8.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -11587,53 +7804,35 @@ (descr "8 R pack") (tags R) (path /4BF03687/C8B2B4E3) - (fp_text reference RR5 (at -1.27 -2.794) (layer Dessus.SilkS) + (fp_text reference RR5 (at -1.27 -2.794) (layer F.SilkS) (effects (font (size 1.27 1.27) (thickness 0.2032))) ) - (fp_text value 8x10K (at 0 2.032) (layer Dessus.SilkS) + (fp_text value 8x10K (at 0 2.032) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start 11.43 -1.27) (end 11.43 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 11.43 1.27) (end -11.43 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -11.43 1.27) (end -11.43 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 11.43 -1.27) (end -11.43 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -8.89 -1.27) (end -8.89 1.27) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at -10.16 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 4 +5V) - ) - (pad 2 thru_hole circle (at -7.62 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 108 /buspci.sch/PTATN-) - ) - (pad 3 thru_hole circle (at -5.08 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 99 /buspci.sch/EA9) - ) - (pad 4 thru_hole circle (at -2.54 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 166 /buspci.sch/X_IRQ) - ) - (pad 5 thru_hole circle (at 0 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 214 /graphic/PTADR-) - ) - (pad 6 thru_hole circle (at 2.54 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 264 /muxdata/DPC21) - ) - (pad 7 thru_hole circle (at 5.08 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 163 /buspci.sch/RDFIFO-) - ) - (pad 8 thru_hole circle (at 7.62 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 164 /buspci.sch/WRFIFO-) - ) - (pad 9 thru_hole circle (at 10.16 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 98 /buspci.sch/EA7) - ) + (fp_line (start 11.43 -1.27) (end 11.43 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 11.43 1.27) (end -11.43 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -11.43 1.27) (end -11.43 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 11.43 -1.27) (end -11.43 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -8.89 -1.27) (end -8.89 1.27) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole rect (at -10.16 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 4 +5V)) + (pad 2 thru_hole circle (at -7.62 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 108 /buspci.sch/PTATN-)) + (pad 3 thru_hole circle (at -5.08 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 99 /buspci.sch/EA9)) + (pad 4 thru_hole circle (at -2.54 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 166 /buspci.sch/X_IRQ)) + (pad 5 thru_hole circle (at 0 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 214 /graphic/PTADR-)) + (pad 6 thru_hole circle (at 2.54 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 264 /muxdata/DPC21)) + (pad 7 thru_hole circle (at 5.08 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 163 /buspci.sch/RDFIFO-)) + (pad 8 thru_hole circle (at 7.62 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 164 /buspci.sch/WRFIFO-)) + (pad 9 thru_hole circle (at 10.16 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 98 /buspci.sch/EA7)) (model discret/r_pack8.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -11646,53 +7845,35 @@ (descr "8 R pack") (tags R) (path /4BF03687/C8B2B4CE) - (fp_text reference RR4 (at -1.27 -2.794) (layer Dessus.SilkS) + (fp_text reference RR4 (at -1.27 -2.794) (layer F.SilkS) (effects (font (size 1.27 1.27) (thickness 0.2032))) ) - (fp_text value 8x10K (at 0 2.032) (layer Dessus.SilkS) + (fp_text value 8x10K (at 0 2.032) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start 11.43 -1.27) (end 11.43 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 11.43 1.27) (end -11.43 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -11.43 1.27) (end -11.43 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 11.43 -1.27) (end -11.43 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -8.89 -1.27) (end -8.89 1.27) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at -10.16 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 4 +5V) - ) - (pad 2 thru_hole circle (at -7.62 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 97 /buspci.sch/EA6) - ) - (pad 3 thru_hole circle (at -5.08 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 265 /muxdata/DPC22) - ) - (pad 4 thru_hole circle (at -2.54 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 96 /buspci.sch/EA5) - ) - (pad 5 thru_hole circle (at 0 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 266 /muxdata/DPC23) - ) - (pad 6 thru_hole circle (at 2.54 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 92 /buspci.sch/EA15) - ) - (pad 7 thru_hole circle (at 5.08 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 259 /muxdata/DPC16) - ) - (pad 8 thru_hole circle (at 7.62 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 91 /buspci.sch/EA14) - ) - (pad 9 thru_hole circle (at 10.16 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 260 /muxdata/DPC17) - ) + (fp_line (start 11.43 -1.27) (end 11.43 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 11.43 1.27) (end -11.43 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -11.43 1.27) (end -11.43 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 11.43 -1.27) (end -11.43 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -8.89 -1.27) (end -8.89 1.27) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole rect (at -10.16 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 4 +5V)) + (pad 2 thru_hole circle (at -7.62 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 97 /buspci.sch/EA6)) + (pad 3 thru_hole circle (at -5.08 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 265 /muxdata/DPC22)) + (pad 4 thru_hole circle (at -2.54 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 96 /buspci.sch/EA5)) + (pad 5 thru_hole circle (at 0 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 266 /muxdata/DPC23)) + (pad 6 thru_hole circle (at 2.54 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 92 /buspci.sch/EA15)) + (pad 7 thru_hole circle (at 5.08 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 259 /muxdata/DPC16)) + (pad 8 thru_hole circle (at 7.62 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 91 /buspci.sch/EA14)) + (pad 9 thru_hole circle (at 10.16 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 260 /muxdata/DPC17)) (model discret/r_pack8.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -11705,46 +7886,36 @@ (descr "Connecteur Subclick") (tags "CONN DEV") (path /30705D02) - (fp_text reference P8 (at 0 6.35 180) (layer Dessus.SilkS) + (fp_text reference P8 (at 0 6.35 180) (layer F.SilkS) (effects (font (size 1.524 1.016) (thickness 0.254))) ) - (fp_text value BNC (at -0.254 -6.35 180) (layer Dessus.SilkS) + (fp_text value BNC (at -0.254 -6.35 180) (layer F.SilkS) (effects (font (size 2.032 1.27) (thickness 0.3048))) ) - (fp_line (start -2.54 -1.27) (end -1.27 -2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -1.27 -2.54) (end 17.78 -2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 17.78 -2.54) (end 17.78 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 17.78 2.54) (end -1.27 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -1.27 2.54) (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 -3.81 -5.08) (end 3.81 -5.08) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.81 -5.08) (end 5.08 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 -3.81) (end 5.08 3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 3.81) (end 3.81 5.08) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.81 5.08) (end -3.81 5.08) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.81 5.08) (end -5.08 3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 3.81) (end -5.08 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 -3.81) (end -3.81 -5.08) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at 0 0 180) (size 1.778 1.778) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - (net 247 /modul/CVBSOUT) - ) - (pad 2 thru_hole circle (at -2.54 -2.54 180) (size 3.048 3.048) (drill 1.524) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 2 thru_hole circle (at 2.54 -2.54 180) (size 3.048 3.048) (drill 1.524) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 2 thru_hole circle (at 2.54 2.54 180) (size 3.048 3.048) (drill 1.524) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 2 thru_hole circle (at -2.54 2.54 180) (size 3.048 3.048) (drill 1.524) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) + (fp_line (start -2.54 -1.27) (end -1.27 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -1.27 -2.54) (end 17.78 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 17.78 -2.54) (end 17.78 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 17.78 2.54) (end -1.27 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -1.27 2.54) (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 -3.81 -5.08) (end 3.81 -5.08) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.81 -5.08) (end 5.08 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 -3.81) (end 5.08 3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 3.81) (end 3.81 5.08) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.81 5.08) (end -3.81 5.08) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.81 5.08) (end -5.08 3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 3.81) (end -5.08 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 -3.81) (end -3.81 -5.08) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at 0 0 180) (size 1.778 1.778) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 247 /modul/CVBSOUT)) + (pad 2 thru_hole circle (at -2.54 -2.54 180) (size 3.048 3.048) (drill 1.524) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 2 thru_hole circle (at 2.54 -2.54 180) (size 3.048 3.048) (drill 1.524) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 2 thru_hole circle (at 2.54 2.54 180) (size 3.048 3.048) (drill 1.524) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 2 thru_hole circle (at -2.54 2.54 180) (size 3.048 3.048) (drill 1.524) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) (model connectors/subclick_horiz.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -11757,46 +7928,36 @@ (descr "Connecteur Subclick") (tags "CONN DEV") (path /32F9F1AD) - (fp_text reference P3 (at 0 6.35 180) (layer Dessus.SilkS) + (fp_text reference P3 (at 0 6.35 180) (layer F.SilkS) (effects (font (size 1.524 1.016) (thickness 0.254))) ) - (fp_text value BNC (at -0.254 -6.35 180) (layer Dessus.SilkS) + (fp_text value BNC (at -0.254 -6.35 180) (layer F.SilkS) (effects (font (size 2.032 1.27) (thickness 0.3048))) ) - (fp_line (start -2.54 -1.27) (end -1.27 -2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -1.27 -2.54) (end 17.78 -2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 17.78 -2.54) (end 17.78 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 17.78 2.54) (end -1.27 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -1.27 2.54) (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 -3.81 -5.08) (end 3.81 -5.08) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.81 -5.08) (end 5.08 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 -3.81) (end 5.08 3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 3.81) (end 3.81 5.08) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.81 5.08) (end -3.81 5.08) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.81 5.08) (end -5.08 3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 3.81) (end -5.08 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 -3.81) (end -3.81 -5.08) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at 0 0 180) (size 1.778 1.778) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - (net 6 /ESVIDEO-RVB/BLUE_IN) - ) - (pad 2 thru_hole circle (at -2.54 -2.54 180) (size 3.048 3.048) (drill 1.524) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 2 thru_hole circle (at 2.54 -2.54 180) (size 3.048 3.048) (drill 1.524) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 2 thru_hole circle (at 2.54 2.54 180) (size 3.048 3.048) (drill 1.524) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 2 thru_hole circle (at -2.54 2.54 180) (size 3.048 3.048) (drill 1.524) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) + (fp_line (start -2.54 -1.27) (end -1.27 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -1.27 -2.54) (end 17.78 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 17.78 -2.54) (end 17.78 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 17.78 2.54) (end -1.27 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -1.27 2.54) (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 -3.81 -5.08) (end 3.81 -5.08) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.81 -5.08) (end 5.08 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 -3.81) (end 5.08 3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 3.81) (end 3.81 5.08) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.81 5.08) (end -3.81 5.08) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.81 5.08) (end -5.08 3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 3.81) (end -5.08 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 -3.81) (end -3.81 -5.08) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at 0 0 180) (size 1.778 1.778) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 6 /ESVIDEO-RVB/BLUE_IN)) + (pad 2 thru_hole circle (at -2.54 -2.54 180) (size 3.048 3.048) (drill 1.524) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 2 thru_hole circle (at 2.54 -2.54 180) (size 3.048 3.048) (drill 1.524) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 2 thru_hole circle (at 2.54 2.54 180) (size 3.048 3.048) (drill 1.524) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 2 thru_hole circle (at -2.54 2.54 180) (size 3.048 3.048) (drill 1.524) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) (model connectors/subclick_horiz.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -11809,46 +7970,36 @@ (descr "Connecteur Subclick") (tags "CONN DEV") (path /32F9F1A3) - (fp_text reference P2 (at 0 6.35 180) (layer Dessus.SilkS) + (fp_text reference P2 (at 0 6.35 180) (layer F.SilkS) (effects (font (size 1.524 1.016) (thickness 0.254))) ) - (fp_text value BNC (at -0.254 -6.35 180) (layer Dessus.SilkS) + (fp_text value BNC (at -0.254 -6.35 180) (layer F.SilkS) (effects (font (size 2.032 1.27) (thickness 0.3048))) ) - (fp_line (start -2.54 -1.27) (end -1.27 -2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -1.27 -2.54) (end 17.78 -2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 17.78 -2.54) (end 17.78 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 17.78 2.54) (end -1.27 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -1.27 2.54) (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 -3.81 -5.08) (end 3.81 -5.08) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.81 -5.08) (end 5.08 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 -3.81) (end 5.08 3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 3.81) (end 3.81 5.08) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.81 5.08) (end -3.81 5.08) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.81 5.08) (end -5.08 3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 3.81) (end -5.08 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 -3.81) (end -3.81 -5.08) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at 0 0 180) (size 1.778 1.778) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - (net 14 /ESVIDEO-RVB/GREEN_IN) - ) - (pad 2 thru_hole circle (at -2.54 -2.54 180) (size 3.048 3.048) (drill 1.524) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 2 thru_hole circle (at 2.54 -2.54 180) (size 3.048 3.048) (drill 1.524) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 2 thru_hole circle (at 2.54 2.54 180) (size 3.048 3.048) (drill 1.524) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 2 thru_hole circle (at -2.54 2.54 180) (size 3.048 3.048) (drill 1.524) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) + (fp_line (start -2.54 -1.27) (end -1.27 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -1.27 -2.54) (end 17.78 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 17.78 -2.54) (end 17.78 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 17.78 2.54) (end -1.27 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -1.27 2.54) (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 -3.81 -5.08) (end 3.81 -5.08) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.81 -5.08) (end 5.08 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 -3.81) (end 5.08 3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 3.81) (end 3.81 5.08) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.81 5.08) (end -3.81 5.08) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.81 5.08) (end -5.08 3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 3.81) (end -5.08 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 -3.81) (end -3.81 -5.08) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at 0 0 180) (size 1.778 1.778) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 14 /ESVIDEO-RVB/GREEN_IN)) + (pad 2 thru_hole circle (at -2.54 -2.54 180) (size 3.048 3.048) (drill 1.524) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 2 thru_hole circle (at 2.54 -2.54 180) (size 3.048 3.048) (drill 1.524) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 2 thru_hole circle (at 2.54 2.54 180) (size 3.048 3.048) (drill 1.524) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 2 thru_hole circle (at -2.54 2.54 180) (size 3.048 3.048) (drill 1.524) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) (model connectors/subclick_horiz.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -11861,46 +8012,36 @@ (descr "Connecteur Subclick") (tags "CONN DEV") (path /32F9F198) - (fp_text reference P1 (at 0 6.35 180) (layer Dessus.SilkS) + (fp_text reference P1 (at 0 6.35 180) (layer F.SilkS) (effects (font (size 1.524 1.016) (thickness 0.254))) ) - (fp_text value BNC (at -0.254 -6.35 180) (layer Dessus.SilkS) + (fp_text value BNC (at -0.254 -6.35 180) (layer F.SilkS) (effects (font (size 2.032 1.27) (thickness 0.3048))) ) - (fp_line (start -2.54 -1.27) (end -1.27 -2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -1.27 -2.54) (end 17.78 -2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 17.78 -2.54) (end 17.78 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 17.78 2.54) (end -1.27 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -1.27 2.54) (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 -3.81 -5.08) (end 3.81 -5.08) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.81 -5.08) (end 5.08 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 -3.81) (end 5.08 3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.08 3.81) (end 3.81 5.08) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.81 5.08) (end -3.81 5.08) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.81 5.08) (end -5.08 3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 3.81) (end -5.08 -3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.08 -3.81) (end -3.81 -5.08) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at 0 0 180) (size 1.778 1.778) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - (net 290 /pal-ntsc.sch/RED_IN) - ) - (pad 2 thru_hole circle (at -2.54 -2.54 180) (size 3.048 3.048) (drill 1.524) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 2 thru_hole circle (at 2.54 -2.54 180) (size 3.048 3.048) (drill 1.524) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 2 thru_hole circle (at 2.54 2.54 180) (size 3.048 3.048) (drill 1.524) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 2 thru_hole circle (at -2.54 2.54 180) (size 3.048 3.048) (drill 1.524) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) + (fp_line (start -2.54 -1.27) (end -1.27 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -1.27 -2.54) (end 17.78 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 17.78 -2.54) (end 17.78 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 17.78 2.54) (end -1.27 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -1.27 2.54) (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 -3.81 -5.08) (end 3.81 -5.08) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.81 -5.08) (end 5.08 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 -3.81) (end 5.08 3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 3.81) (end 3.81 5.08) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.81 5.08) (end -3.81 5.08) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.81 5.08) (end -5.08 3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 3.81) (end -5.08 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 -3.81) (end -3.81 -5.08) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at 0 0 180) (size 1.778 1.778) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 290 /pal-ntsc.sch/RED_IN)) + (pad 2 thru_hole circle (at -2.54 -2.54 180) (size 3.048 3.048) (drill 1.524) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 2 thru_hole circle (at 2.54 -2.54 180) (size 3.048 3.048) (drill 1.524) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 2 thru_hole circle (at 2.54 2.54 180) (size 3.048 3.048) (drill 1.524) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 2 thru_hole circle (at -2.54 2.54 180) (size 3.048 3.048) (drill 1.524) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) (model connectors/subclick_horiz.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -11912,26 +8053,22 @@ (at 163.703 132.08 180) (path /4BF03687/26A799ED) (attr smd) - (fp_text reference W1 (at 0 0 450) (layer Dessous.SilkS) + (fp_text reference W1 (at 0 0 450) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 16/32 (at 0 0 450) (layer Dessous.SilkS) hide + (fp_text value 16/32 (at 0 0 450) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) - (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 351 N-000317) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) + (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 351 N-000317)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -11943,26 +8080,22 @@ (at 124.714 90.805) (path /4BF03683/268A4E83) (attr smd) - (fp_text reference C21 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference C21 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 100nF (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 100nF (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 4 +5V) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 4 +5V)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -11974,26 +8107,22 @@ (at 127 104.14) (path /4BF03683/268A4E88) (attr smd) - (fp_text reference C22 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference C22 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 100nF (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 100nF (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 4 +5V) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 4 +5V)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -12005,26 +8134,22 @@ (at 136.779 139.7) (path /4BF03687/26B21215) (attr smd) - (fp_text reference C30 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference C30 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 100nF (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 100nF (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 4 +5V) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 4 +5V)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -12036,26 +8161,22 @@ (at 147.066 139.7 180) (path /4BF03687/26B2120B) (attr smd) - (fp_text reference C29 (at 0 0 450) (layer Dessous.SilkS) + (fp_text reference C29 (at 0 0 450) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 100nF (at 0 0 450) (layer Dessous.SilkS) hide + (fp_text value 100nF (at 0 0 450) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 4 +5V) - ) - (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 4 +5V)) + (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -12067,26 +8188,22 @@ (at 150.241 135.89 180) (path /4BF03687/26B21201) (attr smd) - (fp_text reference C28 (at 0 0 450) (layer Dessous.SilkS) + (fp_text reference C28 (at 0 0 450) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 100nF (at 0 0 450) (layer Dessous.SilkS) hide + (fp_text value 100nF (at 0 0 450) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 4 +5V) - ) - (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 4 +5V)) + (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -12098,26 +8215,22 @@ (at 150.622 122.936 180) (path /4BF03687/26B211ED) (attr smd) - (fp_text reference C26 (at 0 0 450) (layer Dessous.SilkS) + (fp_text reference C26 (at 0 0 450) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 100nF (at 0 0 450) (layer Dessous.SilkS) hide + (fp_text value 100nF (at 0 0 450) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 4 +5V) - ) - (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 4 +5V)) + (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -12129,26 +8242,22 @@ (at 146.431 114.935 180) (path /4BF03687/26B211E3) (attr smd) - (fp_text reference C25 (at 0 0 450) (layer Dessous.SilkS) + (fp_text reference C25 (at 0 0 450) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 100nF (at 0 0 450) (layer Dessous.SilkS) hide + (fp_text value 100nF (at 0 0 450) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 4 +5V) - ) - (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 4 +5V)) + (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -12160,26 +8269,22 @@ (at 138.049 116.84) (path /4BF03687/26B211D9) (attr smd) - (fp_text reference C24 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference C24 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 100nF (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 100nF (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 4 +5V) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 4 +5V)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -12191,26 +8296,22 @@ (at 132.334 123.19) (path /4BF03687/26B211F7) (attr smd) - (fp_text reference C27 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference C27 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 100nF (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 100nF (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 4 +5V) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 4 +5V)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -12222,26 +8323,22 @@ (at 132.334 136.525) (path /4BF03687/26B2121F) (attr smd) - (fp_text reference C31 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference C31 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 100nF (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 100nF (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 4 +5V) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 4 +5V)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -12253,26 +8350,22 @@ (at 117.983 148.463 180) (path /4BF03687/4BF036D8) (attr smd) - (fp_text reference C68 (at 0 0 450) (layer Dessous.SilkS) + (fp_text reference C68 (at 0 0 450) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 4,7uF (at 0 0 450) (layer Dessous.SilkS) hide + (fp_text value 4,7uF (at 0 0 450) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 2 +3.3V) - ) - (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 2 +3.3V)) + (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -12284,26 +8377,22 @@ (at 358.521 60.833) (path /4BF03681/821CDABD) (attr smd) - (fp_text reference C47 (at 0 0 90) (layer Dessus.SilkS) + (fp_text reference C47 (at 0 0 90) (layer F.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127))) ) - (fp_text value 220pF (at 0 0 90) (layer Dessus.SilkS) hide + (fp_text value 220pF (at 0 0 90) (layer F.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127))) ) - (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer Dessus.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 329 N-000116) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 329 N-000116)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -12315,26 +8404,22 @@ (at 130.81 73.025) (path /4BF03683/BF805556) (attr smd) - (fp_text reference C20 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference C20 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 100nF (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 100nF (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 4 +5V) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 4 +5V)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -12346,26 +8431,22 @@ (at 140.97 73.66 180) (path /4BF03683/BF805551) (attr smd) - (fp_text reference C19 (at 0 0 450) (layer Dessous.SilkS) + (fp_text reference C19 (at 0 0 450) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 100nF (at 0 0 450) (layer Dessous.SilkS) hide + (fp_text value 100nF (at 0 0 450) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 4 +5V) - ) - (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 4 +5V)) + (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -12377,26 +8458,22 @@ (at 151.638 148.463) (path /4BF03687/33AFD43A) (attr smd) - (fp_text reference C69 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference C69 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 4,7uF (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 4,7uF (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 2 +3.3V) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 2 +3.3V)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -12408,26 +8485,22 @@ (at 310.261 117.729) (path /4BF03689/84DFB9B9) (attr smd) - (fp_text reference C52 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference C52 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 22uF (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 22uF (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 34 /ESVIDEO-RVB/VAA) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 34 /ESVIDEO-RVB/VAA)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -12439,26 +8512,22 @@ (at 99.441 149.733 180) (path /4BF03687/33AFD420) (attr smd) - (fp_text reference C67 (at 0 0 450) (layer Dessous.SilkS) + (fp_text reference C67 (at 0 0 450) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 4,7uF (at 0 0 450) (layer Dessous.SilkS) hide + (fp_text value 4,7uF (at 0 0 450) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 4 +5V) - ) - (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 4 +5V)) + (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -12470,26 +8539,22 @@ (at 78.613 66.04 270) (path /4BF0367F/22760F76) (attr smd) - (fp_text reference C54 (at 0 0 540) (layer Dessous.SilkS) + (fp_text reference C54 (at 0 0 540) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 4,7uF (at 0 0 540) (layer Dessous.SilkS) hide + (fp_text value 4,7uF (at 0 0 540) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 270) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 302 N-000079) - ) - (pad 2 smd rect (at 1.651 0 270) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 270) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 302 N-000079)) + (pad 2 smd rect (at 1.651 0 270) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -12501,26 +8566,22 @@ (at 94.615 94.615) (path /4BF03683/33AFD8EF) (attr smd) - (fp_text reference C73 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference C73 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 100nF (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 100nF (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 4 +5V) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 4 +5V)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -12532,26 +8593,22 @@ (at 97.536 85.09 90) (path /4BF03683/33AFD8AF) (attr smd) - (fp_text reference C70 (at 0 0 360) (layer Dessous.SilkS) + (fp_text reference C70 (at 0 0 360) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 100nF (at 0 0 360) (layer Dessous.SilkS) hide + (fp_text value 100nF (at 0 0 360) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 90) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 4 +5V) - ) - (pad 2 smd rect (at 1.651 0 90) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 90) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 4 +5V)) + (pad 2 smd rect (at 1.651 0 90) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -12563,26 +8620,22 @@ (at 106.426 83.185 180) (path /4BF03683/33AFD8E9) (attr smd) - (fp_text reference C71 (at 0 0 450) (layer Dessous.SilkS) + (fp_text reference C71 (at 0 0 450) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 100nF (at 0 0 450) (layer Dessous.SilkS) hide + (fp_text value 100nF (at 0 0 450) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 4 +5V) - ) - (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 4 +5V)) + (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -12594,26 +8647,22 @@ (at 110.236 90.805 180) (path /4BF03683/33AFD8ED) (attr smd) - (fp_text reference C72 (at 0 0 450) (layer Dessous.SilkS) + (fp_text reference C72 (at 0 0 450) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 100nF (at 0 0 450) (layer Dessous.SilkS) hide + (fp_text value 100nF (at 0 0 450) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 4 +5V) - ) - (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 4 +5V)) + (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -12625,26 +8674,22 @@ (at 157.48 74.295 270) (path /4BF03683/BF80554C) (attr smd) - (fp_text reference C18 (at 0 0 540) (layer Dessous.SilkS) + (fp_text reference C18 (at 0 0 540) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 100nF (at 0 0 540) (layer Dessous.SilkS) hide + (fp_text value 100nF (at 0 0 540) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 270) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 4 +5V) - ) - (pad 2 smd rect (at 1.651 0 270) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 270) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 4 +5V)) + (pad 2 smd rect (at 1.651 0 270) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -12656,26 +8701,22 @@ (at 155.194 85.344 90) (path /4BF03683/BF805547) (attr smd) - (fp_text reference C17 (at 0 0 360) (layer Dessous.SilkS) + (fp_text reference C17 (at 0 0 360) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 100nF (at 0 0 360) (layer Dessous.SilkS) hide + (fp_text value 100nF (at 0 0 360) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 90) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 4 +5V) - ) - (pad 2 smd rect (at 1.651 0 90) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 301 GND) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 90) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 4 +5V)) + (pad 2 smd rect (at 1.651 0 90) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 301 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -12687,26 +8728,22 @@ (at 163.449 134.62) (path /4BF03687/26A799E8) (attr smd) - (fp_text reference R5 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference R5 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 10K (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 10K (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 351 N-000317) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 4 +5V) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 351 N-000317)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 4 +5V)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -12718,26 +8755,22 @@ (at 114.935 123.19 180) (path /4BF03687/26A79A01) (attr smd) - (fp_text reference R6 (at 0 0 450) (layer Dessous.SilkS) + (fp_text reference R6 (at 0 0 450) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 10K (at 0 0 450) (layer Dessous.SilkS) hide + (fp_text value 10K (at 0 0 450) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 350 N-000316) - ) - (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 4 +5V) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 350 N-000316)) + (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 4 +5V)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -12749,26 +8782,22 @@ (at 118.745 120.65 180) (path /4BF03687/26A79A0B) (attr smd) - (fp_text reference R7 (at 0 0 450) (layer Dessous.SilkS) + (fp_text reference R7 (at 0 0 450) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 10K (at 0 0 450) (layer Dessous.SilkS) hide + (fp_text value 10K (at 0 0 450) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 349 N-000315) - ) - (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 4 +5V) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 349 N-000315)) + (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 4 +5V)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -12780,26 +8809,22 @@ (at 111.76 114.935) (path /4BF03687/26B211C0) (attr smd) - (fp_text reference R28 (at 0 0 90) (layer Dessus.SilkS) + (fp_text reference R28 (at 0 0 90) (layer F.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127))) ) - (fp_text value 2,2K (at 0 0 90) (layer Dessus.SilkS) hide + (fp_text value 2,2K (at 0 0 90) (layer F.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127))) ) - (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer Dessus.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 353 N-000319) - ) + (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 353 N-000319)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -12811,26 +8836,22 @@ (at 114.3 111.76) (path /4BF03687/26B211CF) (attr smd) - (fp_text reference R29 (at 0 0 90) (layer Dessus.SilkS) + (fp_text reference R29 (at 0 0 90) (layer F.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127))) ) - (fp_text value 2,2K (at 0 0 90) (layer Dessus.SilkS) hide + (fp_text value 2,2K (at 0 0 90) (layer F.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127))) ) - (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer Dessus.SilkS) (width 0.127)) - (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer Dessus.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 4 +5V) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Composant Dessus.Pate Dessus.Masque) - (net 352 N-000318) - ) + (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 4 +5V)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 352 N-000318)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -12842,26 +8863,22 @@ (at 86.233 75.565) (path /4BF03683/2D5AA03C) (attr smd) - (fp_text reference R13 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference R13 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 1K (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 1K (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 4 +5V) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 343 N-000153) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 4 +5V)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 343 N-000153)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -12873,26 +8890,22 @@ (at 111.887 62.103) (path /4BF03683/B3BF4ED9) (attr smd) - (fp_text reference R26 (at 0 0 270) (layer Dessous.SilkS) + (fp_text reference R26 (at 0 0 270) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 220K (at 0 0 270) (layer Dessous.SilkS) hide + (fp_text value 220K (at 0 0 270) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 238 /graphic/XTAL_I) - ) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 344 N-000162) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 238 /graphic/XTAL_I)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 344 N-000162)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -12904,26 +8917,22 @@ (at 109.22 67.564 180) (path /4BF03683/525FE207) (attr smd) - (fp_text reference R21 (at 0 0 450) (layer Dessous.SilkS) + (fp_text reference R21 (at 0 0 450) (layer B.SilkS) (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_text value 220 (at 0 0 450) (layer Dessous.SilkS) hide + (fp_text value 220 (at 0 0 450) (layer B.SilkS) hide (effects (font (size 0.762 0.508) (thickness 0.127)) (justify mirror)) ) - (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer Dessous.SilkS) (width 0.127)) - (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer Dessous.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 344 N-000162) - ) - (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) - (layers Cuivre Dessous.Pate Dessous.Masque) - (net 184 /graphic/CLK10MHz) - ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 344 N-000162)) + (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Cuivre B.Paste B.Mask) + (net 184 /graphic/CLK10MHz)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) (scale (xyz 0.17 0.16 0.16)) @@ -12936,36 +8945,26 @@ (descr "Double rangee de contacts 2 x 5 pins") (tags CONN) (path /4BF03683/33A7DFAB) - (fp_text reference P5 (at 0 -2.54) (layer Dessus.SilkS) + (fp_text reference P5 (at 0 -2.54) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value CONN_5 (at 0 2.54) (layer Dessus.SilkS) hide + (fp_text value CONN_5 (at 0 2.54) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start -6.35 -1.27) (end -6.35 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 6.35 1.27) (end 6.35 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -6.35 -1.27) (end 6.35 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 6.35 1.27) (end -6.35 1.27) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at -5.08 0) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 2 thru_hole circle (at -2.54 0) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - (net 181 /graphic/CCLK) - ) - (pad 3 thru_hole circle (at 0 0) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - (net 187 /graphic/DIN) - ) - (pad 4 thru_hole circle (at 2.54 0) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - (net 188 /graphic/DONE) - ) - (pad 5 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - (net 213 /graphic/PROG*) - ) + (fp_line (start -6.35 -1.27) (end -6.35 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 6.35 1.27) (end 6.35 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -6.35 -1.27) (end 6.35 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 6.35 1.27) (end -6.35 1.27) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole rect (at -5.08 0) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 2 thru_hole circle (at -2.54 0) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 181 /graphic/CCLK)) + (pad 3 thru_hole circle (at 0 0) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 187 /graphic/DIN)) + (pad 4 thru_hole circle (at 2.54 0) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 188 /graphic/DONE)) + (pad 5 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 213 /graphic/PROG*)) (model pin_array/pins_array_5x1.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -12978,28 +8977,24 @@ (descr "Connecteurs 2 pins") (tags "CONN DEV") (path /4BF03683/34E1751D) - (fp_text reference P12 (at 0 -1.524) (layer Dessus.SilkS) + (fp_text reference P12 (at 0 -1.524) (layer F.SilkS) (effects (font (size 0.762 0.762) (thickness 0.1524))) ) - (fp_text value CONN_1 (at 0.127 1.524) (layer Dessus.SilkS) + (fp_text value CONN_1 (at 0.127 1.524) (layer F.SilkS) (effects (font (size 0.762 0.762) (thickness 0.1524))) ) - (fp_line (start -1.905 -0.889) (end 1.778 -0.889) (layer Dessus.SilkS) (width 0.2032)) - (fp_line (start 1.778 -0.889) (end 2.286 -0.381) (layer Dessus.SilkS) (width 0.2032)) - (fp_line (start 2.286 -0.381) (end 2.286 0.381) (layer Dessus.SilkS) (width 0.2032)) - (fp_line (start 2.286 0.381) (end 1.778 0.889) (layer Dessus.SilkS) (width 0.2032)) - (fp_line (start 1.778 0.889) (end -1.905 0.889) (layer Dessus.SilkS) (width 0.2032)) - (fp_line (start -1.905 0.889) (end -2.413 0.381) (layer Dessus.SilkS) (width 0.2032)) - (fp_line (start -2.413 0.381) (end -2.413 -0.381) (layer Dessus.SilkS) (width 0.2032)) - (fp_line (start -2.413 -0.381) (end -1.905 -0.889) (layer Dessus.SilkS) (width 0.2032)) - (pad 1 thru_hole circle (at -1.27 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) - (pad 1 thru_hole circle (at 1.27 0) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 301 GND) - ) + (fp_line (start -1.905 -0.889) (end 1.778 -0.889) (layer F.SilkS) (width 0.2032)) + (fp_line (start 1.778 -0.889) (end 2.286 -0.381) (layer F.SilkS) (width 0.2032)) + (fp_line (start 2.286 -0.381) (end 2.286 0.381) (layer F.SilkS) (width 0.2032)) + (fp_line (start 2.286 0.381) (end 1.778 0.889) (layer F.SilkS) (width 0.2032)) + (fp_line (start 1.778 0.889) (end -1.905 0.889) (layer F.SilkS) (width 0.2032)) + (fp_line (start -1.905 0.889) (end -2.413 0.381) (layer F.SilkS) (width 0.2032)) + (fp_line (start -2.413 0.381) (end -2.413 -0.381) (layer F.SilkS) (width 0.2032)) + (fp_line (start -2.413 -0.381) (end -1.905 -0.889) (layer F.SilkS) (width 0.2032)) + (pad 1 thru_hole circle (at -1.27 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) + (pad 1 thru_hole circle (at 1.27 0) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 301 GND)) (model connectors/testpoint.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -13007,953 +9002,473 @@ ) ) - (module BUSPCI locked (layer Composant) (tedit 47238700) (tstamp 269C6109) + (module BUSPCI locked (layer Composant) (tedit 47238700) (tstamp 269C6109) (at 158.115 158.75) (descr "Connecteur Bus PCI") (tags "PCI CONN") (path /4BF03687/269C6109) - (fp_text reference BUS1 (at -35.941 -4.699) (layer Dessus.SilkS) + (fp_text reference BUS1 (at -35.941 -4.699) (layer F.SilkS) (effects (font (size 1.524 1.016) (thickness 0.2032))) ) - (fp_text value BUSPCI_5V (at -5.842 -4.699) (layer Dessus.SilkS) + (fp_text value BUSPCI_5V (at -5.842 -4.699) (layer F.SilkS) (effects (font (size 1.524 1.016) (thickness 0.2032))) ) - (fp_line (start -63.754 -3.81) (end -63.754 4.445) (layer Dessus.SilkS) (width 0.2032)) - (fp_line (start -63.754 4.445) (end -0.889 4.445) (layer Dessus.SilkS) (width 0.2032)) - (fp_line (start -0.889 4.445) (end -0.889 -3.81) (layer Dessus.SilkS) (width 0.2032)) - (fp_line (start -0.889 -3.81) (end 0.889 -3.81) (layer Dessus.SilkS) (width 0.2032)) - (fp_line (start 0.889 -3.81) (end 0.889 4.445) (layer Dessus.SilkS) (width 0.2032)) - (fp_line (start 0.889 4.445) (end 15.494 4.445) (layer Dessus.SilkS) (width 0.2032)) - (fp_line (start 15.494 4.445) (end 15.494 -3.81) (layer Dessus.SilkS) (width 0.2032)) - (pad B1 connect rect (at -62.865 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - ) - (pad B2 connect rect (at -61.595 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - ) - (pad B3 connect rect (at -60.325 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 301 GND) - ) - (pad B4 connect rect (at -59.055 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 354 N-000320) - ) - (pad B5 connect rect (at -57.785 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 4 +5V) - ) - (pad B6 connect rect (at -56.515 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 4 +5V) - ) - (pad B7 connect rect (at -55.245 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - ) - (pad B8 connect rect (at -53.975 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - ) - (pad B9 connect rect (at -52.705 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 356 N-000338) - ) - (pad B10 connect rect (at -51.435 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - ) - (pad B11 connect rect (at -50.165 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 355 N-000337) - ) - (pad B12 connect rect (at -48.895 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - ) - (pad B13 connect rect (at -47.625 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - ) - (pad B14 connect rect (at -46.355 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - ) - (pad B15 connect rect (at -45.085 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 301 GND) - ) - (pad B16 connect rect (at -43.815 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 148 /buspci.sch/P_CLK) - ) - (pad B17 connect rect (at -42.545 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 301 GND) - ) - (pad B18 connect rect (at -41.275 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 158 /buspci.sch/P_REQ#) - ) - (pad B19 connect rect (at -40.005 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 4 +5V) - ) - (pad B20 connect rect (at -38.735 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 137 /buspci.sch/P_AD31) - ) - (pad B21 connect rect (at -37.465 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 134 /buspci.sch/P_AD29) - ) - (pad B22 connect rect (at -36.195 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 301 GND) - ) - (pad B23 connect rect (at -34.925 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 132 /buspci.sch/P_AD27) - ) - (pad B24 connect rect (at -33.655 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 130 /buspci.sch/P_AD25) - ) - (pad B25 connect rect (at -32.385 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 2 +3.3V) - ) - (pad B26 connect rect (at -31.115 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 147 /buspci.sch/P_C/BE3#) - ) - (pad B27 connect rect (at -29.845 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 128 /buspci.sch/P_AD23) - ) - (pad B28 connect rect (at -28.575 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 301 GND) - ) - (pad B29 connect rect (at -27.305 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 126 /buspci.sch/P_AD21) - ) - (pad B30 connect rect (at -26.035 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 123 /buspci.sch/P_AD19) - ) - (pad B31 connect rect (at -24.765 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 2 +3.3V) - ) - (pad B32 connect rect (at -23.495 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 121 /buspci.sch/P_AD17) - ) - (pad B33 connect rect (at -22.225 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 146 /buspci.sch/P_C/BE2#) - ) - (pad B34 connect rect (at -20.955 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 301 GND) - ) - (pad B35 connect rect (at -19.685 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 154 /buspci.sch/P_IRDY#) - ) - (pad B36 connect rect (at -18.415 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 2 +3.3V) - ) - (pad B37 connect rect (at -17.145 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 149 /buspci.sch/P_DEVSEL#) - ) - (pad B38 connect rect (at -15.875 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 301 GND) - ) - (pad B39 connect rect (at -14.605 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 155 /buspci.sch/P_LOCK#) - ) - (pad B40 connect rect (at -13.335 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 157 /buspci.sch/P_PERR#) - ) - (pad B41 connect rect (at -12.065 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 2 +3.3V) - ) - (pad B42 connect rect (at -10.795 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 160 /buspci.sch/P_SERR#) - ) - (pad B43 connect rect (at -9.525 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 2 +3.3V) - ) - (pad B44 connect rect (at -8.255 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 145 /buspci.sch/P_C/BE1#) - ) - (pad B45 connect rect (at -6.985 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 118 /buspci.sch/P_AD14) - ) - (pad B46 connect rect (at -5.715 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 301 GND) - ) - (pad B47 connect rect (at -4.445 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 116 /buspci.sch/P_AD12) - ) - (pad B48 connect rect (at -3.175 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 114 /buspci.sch/P_AD10) - ) - (pad B49 connect rect (at -1.905 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 301 GND) - ) - (pad B52 connect rect (at 1.905 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 142 /buspci.sch/P_AD8) - ) - (pad B53 connect rect (at 3.175 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 141 /buspci.sch/P_AD7) - ) - (pad B54 connect rect (at 4.445 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 2 +3.3V) - ) - (pad B55 connect rect (at 5.715 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 139 /buspci.sch/P_AD5) - ) - (pad B56 connect rect (at 6.985 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 135 /buspci.sch/P_AD3) - ) - (pad B57 connect rect (at 8.255 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 301 GND) - ) - (pad B58 connect rect (at 9.525 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 113 /buspci.sch/P_AD1) - ) - (pad B59 connect rect (at 10.795 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 4 +5V) - ) - (pad B60 connect rect (at 12.065 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - ) - (pad B61 connect rect (at 13.335 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 4 +5V) - ) - (pad B62 connect rect (at 14.605 -0.254) (size 1.016 4.572) - (layers Composant Dessus.Masque) - (net 4 +5V) - ) - (pad A1 connect rect (at -62.865 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - ) - (pad A2 connect rect (at -61.595 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 1 +12V) - ) - (pad A3 connect rect (at -60.325 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - ) - (pad A4 connect rect (at -59.055 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 354 N-000320) - ) - (pad A5 connect rect (at -57.785 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 4 +5V) - ) - (pad A6 connect rect (at -56.515 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 153 /buspci.sch/P_INTA#) - ) - (pad A7 connect rect (at -55.245 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - ) - (pad A8 connect rect (at -53.975 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 4 +5V) - ) - (pad A9 connect rect (at -52.705 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - ) - (pad A10 connect rect (at -51.435 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 4 +5V) - ) - (pad A11 connect rect (at -50.165 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - ) - (pad A12 connect rect (at -48.895 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - ) - (pad A13 connect rect (at -47.625 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - ) - (pad A14 connect rect (at -46.355 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - ) - (pad A15 connect rect (at -45.085 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 159 /buspci.sch/P_RST#) - ) - (pad A16 connect rect (at -43.815 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 4 +5V) - ) - (pad A17 connect rect (at -42.545 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 151 /buspci.sch/P_GNT#) - ) - (pad A18 connect rect (at -41.275 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 301 GND) - ) - (pad A19 connect rect (at -40.005 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - ) - (pad A20 connect rect (at -38.735 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 136 /buspci.sch/P_AD30) - ) - (pad A21 connect rect (at -37.465 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 2 +3.3V) - ) - (pad A22 connect rect (at -36.195 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 133 /buspci.sch/P_AD28) - ) - (pad A23 connect rect (at -34.925 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 131 /buspci.sch/P_AD26) - ) - (pad A24 connect rect (at -33.655 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 301 GND) - ) - (pad A25 connect rect (at -32.385 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 129 /buspci.sch/P_AD24) - ) - (pad A26 connect rect (at -31.115 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 152 /buspci.sch/P_IDSEL) - ) - (pad A27 connect rect (at -29.845 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 2 +3.3V) - ) - (pad A28 connect rect (at -28.575 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 127 /buspci.sch/P_AD22) - ) - (pad A29 connect rect (at -27.305 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 125 /buspci.sch/P_AD20) - ) - (pad A30 connect rect (at -26.035 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 301 GND) - ) - (pad A31 connect rect (at -24.765 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 122 /buspci.sch/P_AD18) - ) - (pad A32 connect rect (at -23.495 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 120 /buspci.sch/P_AD16) - ) - (pad A33 connect rect (at -22.225 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 2 +3.3V) - ) - (pad A34 connect rect (at -20.955 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 150 /buspci.sch/P_FRAME#) - ) - (pad A35 connect rect (at -19.685 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 301 GND) - ) - (pad A36 connect rect (at -18.415 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 162 /buspci.sch/P_TRDY#) - ) - (pad A37 connect rect (at -17.145 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 301 GND) - ) - (pad A38 connect rect (at -15.875 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 161 /buspci.sch/P_STOP#) - ) - (pad A39 connect rect (at -14.605 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 2 +3.3V) - ) - (pad A40 connect rect (at -13.335 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - ) - (pad A41 connect rect (at -12.065 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - ) - (pad A42 connect rect (at -10.795 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 301 GND) - ) - (pad A43 connect rect (at -9.525 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 156 /buspci.sch/P_PAR) - ) - (pad A44 connect rect (at -8.255 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 119 /buspci.sch/P_AD15) - ) - (pad A45 connect rect (at -6.985 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 2 +3.3V) - ) - (pad A46 connect rect (at -5.715 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 117 /buspci.sch/P_AD13) - ) - (pad A47 connect rect (at -4.445 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 115 /buspci.sch/P_AD11) - ) - (pad A48 connect rect (at -3.175 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 301 GND) - ) - (pad A49 connect rect (at -1.905 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 143 /buspci.sch/P_AD9) - ) - (pad A52 connect rect (at 1.905 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 144 /buspci.sch/P_C/BE0#) - ) - (pad A53 connect rect (at 3.175 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 2 +3.3V) - ) - (pad A54 connect rect (at 4.445 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 140 /buspci.sch/P_AD6) - ) - (pad A55 connect rect (at 5.715 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 138 /buspci.sch/P_AD4) - ) - (pad A56 connect rect (at 6.985 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 301 GND) - ) - (pad A57 connect rect (at 8.255 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 124 /buspci.sch/P_AD2) - ) - (pad A58 connect rect (at 9.525 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 112 /buspci.sch/P_AD0) - ) - (pad A59 connect rect (at 10.795 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 4 +5V) - ) - (pad A60 connect rect (at 12.065 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - ) - (pad A61 connect rect (at 13.335 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 4 +5V) - ) - (pad A62 connect rect (at 14.605 -0.254) (size 1.016 4.572) - (layers Cuivre Dessous.Masque) - (net 4 +5V) - ) - (pad B2 connect rect (at -61.595 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - ) - (pad B3 connect rect (at -60.325 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 301 GND) - ) - (pad B4 connect rect (at -59.055 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 354 N-000320) - ) - (pad B5 connect rect (at -57.785 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 4 +5V) - ) - (pad B6 connect rect (at -56.515 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 4 +5V) - ) - (pad B7 connect rect (at -55.245 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - ) - (pad B8 connect rect (at -53.975 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - ) - (pad B9 connect rect (at -52.705 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 356 N-000338) - ) - (pad B10 connect rect (at -51.435 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - ) - (pad B11 connect rect (at -50.165 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 355 N-000337) - ) - (pad B12 connect rect (at -48.895 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - ) - (pad B13 connect rect (at -47.625 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - ) - (pad B14 connect rect (at -46.355 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - ) - (pad B15 connect rect (at -45.085 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 301 GND) - ) - (pad B16 connect rect (at -43.815 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 148 /buspci.sch/P_CLK) - ) - (pad B17 connect rect (at -42.545 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 301 GND) - ) - (pad B18 connect rect (at -41.275 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 158 /buspci.sch/P_REQ#) - ) - (pad B19 connect rect (at -40.005 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 4 +5V) - ) - (pad B20 connect rect (at -38.735 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 137 /buspci.sch/P_AD31) - ) - (pad B21 connect rect (at -37.465 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 134 /buspci.sch/P_AD29) - ) - (pad B22 connect rect (at -36.195 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 301 GND) - ) - (pad B23 connect rect (at -34.925 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 132 /buspci.sch/P_AD27) - ) - (pad B24 connect rect (at -33.655 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 130 /buspci.sch/P_AD25) - ) - (pad B25 connect rect (at -32.385 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 2 +3.3V) - ) - (pad B26 connect rect (at -31.115 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 147 /buspci.sch/P_C/BE3#) - ) - (pad B27 connect rect (at -29.845 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 128 /buspci.sch/P_AD23) - ) - (pad B28 connect rect (at -28.575 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 301 GND) - ) - (pad B29 connect rect (at -27.305 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 126 /buspci.sch/P_AD21) - ) - (pad B30 connect rect (at -26.035 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 123 /buspci.sch/P_AD19) - ) - (pad B31 connect rect (at -24.765 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 2 +3.3V) - ) - (pad B32 connect rect (at -23.495 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 121 /buspci.sch/P_AD17) - ) - (pad B33 connect rect (at -22.225 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 146 /buspci.sch/P_C/BE2#) - ) - (pad B34 connect rect (at -20.955 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 301 GND) - ) - (pad B35 connect rect (at -19.685 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 154 /buspci.sch/P_IRDY#) - ) - (pad B36 connect rect (at -18.415 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 2 +3.3V) - ) - (pad B37 connect rect (at -17.145 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 149 /buspci.sch/P_DEVSEL#) - ) - (pad B38 connect rect (at -15.875 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 301 GND) - ) - (pad B39 connect rect (at -14.605 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 155 /buspci.sch/P_LOCK#) - ) - (pad B40 connect rect (at -13.335 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 157 /buspci.sch/P_PERR#) - ) - (pad B41 connect rect (at -12.065 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 2 +3.3V) - ) - (pad B42 connect rect (at -10.795 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 160 /buspci.sch/P_SERR#) - ) - (pad B43 connect rect (at -9.525 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 2 +3.3V) - ) - (pad B44 connect rect (at -8.255 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 145 /buspci.sch/P_C/BE1#) - ) - (pad B45 connect rect (at -6.985 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 118 /buspci.sch/P_AD14) - ) - (pad B46 connect rect (at -5.715 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 301 GND) - ) - (pad B47 connect rect (at -4.445 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 116 /buspci.sch/P_AD12) - ) - (pad B48 connect rect (at -3.175 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 114 /buspci.sch/P_AD10) - ) - (pad B49 connect rect (at -1.905 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 301 GND) - ) - (pad B52 connect rect (at 1.905 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 142 /buspci.sch/P_AD8) - ) - (pad B53 connect rect (at 3.175 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 141 /buspci.sch/P_AD7) - ) - (pad B54 connect rect (at 4.445 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 2 +3.3V) - ) - (pad B55 connect rect (at 5.715 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 139 /buspci.sch/P_AD5) - ) - (pad B56 connect rect (at 6.985 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 135 /buspci.sch/P_AD3) - ) - (pad B57 connect rect (at 8.255 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 301 GND) - ) - (pad B58 connect rect (at 9.525 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 113 /buspci.sch/P_AD1) - ) - (pad B59 connect rect (at 10.795 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 4 +5V) - ) - (pad B60 connect rect (at 12.065 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - ) - (pad B61 connect rect (at 13.335 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 4 +5V) - ) - (pad B62 connect rect (at 14.605 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - (net 4 +5V) - ) - (pad B1 connect rect (at -62.865 2.413) (size 0.508 0.762) - (layers Composant Dessus.Masque) - ) - (pad A1 connect rect (at -62.865 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - ) - (pad A2 connect rect (at -61.595 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 1 +12V) - ) - (pad A3 connect rect (at -60.325 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - ) - (pad A4 connect rect (at -59.055 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 354 N-000320) - ) - (pad A5 connect rect (at -57.785 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 4 +5V) - ) - (pad A6 connect rect (at -56.515 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 153 /buspci.sch/P_INTA#) - ) - (pad A7 connect rect (at -55.245 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - ) - (pad A8 connect rect (at -53.975 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 4 +5V) - ) - (pad A9 connect rect (at -52.705 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - ) - (pad A10 connect rect (at -51.435 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 4 +5V) - ) - (pad A11 connect rect (at -50.165 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - ) - (pad A12 connect rect (at -48.895 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - ) - (pad A13 connect rect (at -47.625 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - ) - (pad A14 connect rect (at -46.355 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - ) - (pad A15 connect rect (at -45.085 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 159 /buspci.sch/P_RST#) - ) - (pad A16 connect rect (at -43.815 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 4 +5V) - ) - (pad A17 connect rect (at -42.545 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 151 /buspci.sch/P_GNT#) - ) - (pad A18 connect rect (at -41.275 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 301 GND) - ) - (pad A19 connect rect (at -40.005 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - ) - (pad A20 connect rect (at -38.735 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 136 /buspci.sch/P_AD30) - ) - (pad A21 connect rect (at -37.465 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 2 +3.3V) - ) - (pad A22 connect rect (at -36.195 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 133 /buspci.sch/P_AD28) - ) - (pad A23 connect rect (at -34.925 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 131 /buspci.sch/P_AD26) - ) - (pad A24 connect rect (at -33.655 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 301 GND) - ) - (pad A25 connect rect (at -32.385 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 129 /buspci.sch/P_AD24) - ) - (pad A26 connect rect (at -31.115 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 152 /buspci.sch/P_IDSEL) - ) - (pad A27 connect rect (at -29.845 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 2 +3.3V) - ) - (pad A28 connect rect (at -28.575 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 127 /buspci.sch/P_AD22) - ) - (pad A29 connect rect (at -27.305 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 125 /buspci.sch/P_AD20) - ) - (pad A30 connect rect (at -26.035 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 301 GND) - ) - (pad A31 connect rect (at -24.765 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 122 /buspci.sch/P_AD18) - ) - (pad A32 connect rect (at -23.495 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 120 /buspci.sch/P_AD16) - ) - (pad A33 connect rect (at -22.225 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 2 +3.3V) - ) - (pad A34 connect rect (at -20.955 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 150 /buspci.sch/P_FRAME#) - ) - (pad A35 connect rect (at -19.685 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 301 GND) - ) - (pad A36 connect rect (at -18.415 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 162 /buspci.sch/P_TRDY#) - ) - (pad A37 connect rect (at -17.145 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 301 GND) - ) - (pad A38 connect rect (at -15.875 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 161 /buspci.sch/P_STOP#) - ) - (pad A39 connect rect (at -14.605 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 2 +3.3V) - ) - (pad A40 connect rect (at -13.335 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - ) - (pad A41 connect rect (at -12.065 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - ) - (pad A42 connect rect (at -10.795 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 301 GND) - ) - (pad A43 connect rect (at -9.525 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 156 /buspci.sch/P_PAR) - ) - (pad A44 connect rect (at -8.255 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 119 /buspci.sch/P_AD15) - ) - (pad A45 connect rect (at -6.985 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 2 +3.3V) - ) - (pad A46 connect rect (at -5.715 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 117 /buspci.sch/P_AD13) - ) - (pad A47 connect rect (at -4.445 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 115 /buspci.sch/P_AD11) - ) - (pad A48 connect rect (at -3.175 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 301 GND) - ) - (pad A49 connect rect (at -1.905 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 143 /buspci.sch/P_AD9) - ) - (pad A52 connect rect (at 1.905 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 144 /buspci.sch/P_C/BE0#) - ) - (pad A53 connect rect (at 3.175 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 2 +3.3V) - ) - (pad A54 connect rect (at 4.445 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 140 /buspci.sch/P_AD6) - ) - (pad A55 connect rect (at 5.715 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 138 /buspci.sch/P_AD4) - ) - (pad A56 connect rect (at 6.985 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 301 GND) - ) - (pad A57 connect rect (at 8.255 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 124 /buspci.sch/P_AD2) - ) - (pad A58 connect rect (at 9.525 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 112 /buspci.sch/P_AD0) - ) - (pad A59 connect rect (at 10.795 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 4 +5V) - ) - (pad A60 connect rect (at 12.065 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - ) - (pad A61 connect rect (at 13.335 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 4 +5V) - ) - (pad A62 connect rect (at 14.605 2.413) (size 0.508 0.762) - (layers Cuivre Dessous.Masque) - (net 4 +5V) - ) + (fp_line (start -63.754 -3.81) (end -63.754 4.445) (layer F.SilkS) (width 0.2032)) + (fp_line (start -63.754 4.445) (end -0.889 4.445) (layer F.SilkS) (width 0.2032)) + (fp_line (start -0.889 4.445) (end -0.889 -3.81) (layer F.SilkS) (width 0.2032)) + (fp_line (start -0.889 -3.81) (end 0.889 -3.81) (layer F.SilkS) (width 0.2032)) + (fp_line (start 0.889 -3.81) (end 0.889 4.445) (layer F.SilkS) (width 0.2032)) + (fp_line (start 0.889 4.445) (end 15.494 4.445) (layer F.SilkS) (width 0.2032)) + (fp_line (start 15.494 4.445) (end 15.494 -3.81) (layer F.SilkS) (width 0.2032)) + (pad B1 connect rect (at -62.865 -0.254) (size 1.016 4.572) (layers Composant F.Mask)) + (pad B2 connect rect (at -61.595 -0.254) (size 1.016 4.572) (layers Composant F.Mask)) + (pad B3 connect rect (at -60.325 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 301 GND)) + (pad B4 connect rect (at -59.055 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 354 N-000320)) + (pad B5 connect rect (at -57.785 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 4 +5V)) + (pad B6 connect rect (at -56.515 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 4 +5V)) + (pad B7 connect rect (at -55.245 -0.254) (size 1.016 4.572) (layers Composant F.Mask)) + (pad B8 connect rect (at -53.975 -0.254) (size 1.016 4.572) (layers Composant F.Mask)) + (pad B9 connect rect (at -52.705 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 356 N-000338)) + (pad B10 connect rect (at -51.435 -0.254) (size 1.016 4.572) (layers Composant F.Mask)) + (pad B11 connect rect (at -50.165 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 355 N-000337)) + (pad B12 connect rect (at -48.895 -0.254) (size 1.016 4.572) (layers Composant F.Mask)) + (pad B13 connect rect (at -47.625 -0.254) (size 1.016 4.572) (layers Composant F.Mask)) + (pad B14 connect rect (at -46.355 -0.254) (size 1.016 4.572) (layers Composant F.Mask)) + (pad B15 connect rect (at -45.085 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 301 GND)) + (pad B16 connect rect (at -43.815 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 148 /buspci.sch/P_CLK)) + (pad B17 connect rect (at -42.545 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 301 GND)) + (pad B18 connect rect (at -41.275 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 158 /buspci.sch/P_REQ#)) + (pad B19 connect rect (at -40.005 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 4 +5V)) + (pad B20 connect rect (at -38.735 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 137 /buspci.sch/P_AD31)) + (pad B21 connect rect (at -37.465 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 134 /buspci.sch/P_AD29)) + (pad B22 connect rect (at -36.195 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 301 GND)) + (pad B23 connect rect (at -34.925 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 132 /buspci.sch/P_AD27)) + (pad B24 connect rect (at -33.655 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 130 /buspci.sch/P_AD25)) + (pad B25 connect rect (at -32.385 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 2 +3.3V)) + (pad B26 connect rect (at -31.115 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 147 /buspci.sch/P_C/BE3#)) + (pad B27 connect rect (at -29.845 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 128 /buspci.sch/P_AD23)) + (pad B28 connect rect (at -28.575 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 301 GND)) + (pad B29 connect rect (at -27.305 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 126 /buspci.sch/P_AD21)) + (pad B30 connect rect (at -26.035 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 123 /buspci.sch/P_AD19)) + (pad B31 connect rect (at -24.765 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 2 +3.3V)) + (pad B32 connect rect (at -23.495 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 121 /buspci.sch/P_AD17)) + (pad B33 connect rect (at -22.225 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 146 /buspci.sch/P_C/BE2#)) + (pad B34 connect rect (at -20.955 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 301 GND)) + (pad B35 connect rect (at -19.685 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 154 /buspci.sch/P_IRDY#)) + (pad B36 connect rect (at -18.415 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 2 +3.3V)) + (pad B37 connect rect (at -17.145 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 149 /buspci.sch/P_DEVSEL#)) + (pad B38 connect rect (at -15.875 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 301 GND)) + (pad B39 connect rect (at -14.605 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 155 /buspci.sch/P_LOCK#)) + (pad B40 connect rect (at -13.335 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 157 /buspci.sch/P_PERR#)) + (pad B41 connect rect (at -12.065 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 2 +3.3V)) + (pad B42 connect rect (at -10.795 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 160 /buspci.sch/P_SERR#)) + (pad B43 connect rect (at -9.525 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 2 +3.3V)) + (pad B44 connect rect (at -8.255 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 145 /buspci.sch/P_C/BE1#)) + (pad B45 connect rect (at -6.985 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 118 /buspci.sch/P_AD14)) + (pad B46 connect rect (at -5.715 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 301 GND)) + (pad B47 connect rect (at -4.445 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 116 /buspci.sch/P_AD12)) + (pad B48 connect rect (at -3.175 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 114 /buspci.sch/P_AD10)) + (pad B49 connect rect (at -1.905 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 301 GND)) + (pad B52 connect rect (at 1.905 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 142 /buspci.sch/P_AD8)) + (pad B53 connect rect (at 3.175 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 141 /buspci.sch/P_AD7)) + (pad B54 connect rect (at 4.445 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 2 +3.3V)) + (pad B55 connect rect (at 5.715 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 139 /buspci.sch/P_AD5)) + (pad B56 connect rect (at 6.985 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 135 /buspci.sch/P_AD3)) + (pad B57 connect rect (at 8.255 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 301 GND)) + (pad B58 connect rect (at 9.525 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 113 /buspci.sch/P_AD1)) + (pad B59 connect rect (at 10.795 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 4 +5V)) + (pad B60 connect rect (at 12.065 -0.254) (size 1.016 4.572) (layers Composant F.Mask)) + (pad B61 connect rect (at 13.335 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 4 +5V)) + (pad B62 connect rect (at 14.605 -0.254) (size 1.016 4.572) (layers Composant F.Mask) + (net 4 +5V)) + (pad A1 connect rect (at -62.865 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask)) + (pad A2 connect rect (at -61.595 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 1 +12V)) + (pad A3 connect rect (at -60.325 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask)) + (pad A4 connect rect (at -59.055 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 354 N-000320)) + (pad A5 connect rect (at -57.785 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 4 +5V)) + (pad A6 connect rect (at -56.515 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 153 /buspci.sch/P_INTA#)) + (pad A7 connect rect (at -55.245 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask)) + (pad A8 connect rect (at -53.975 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 4 +5V)) + (pad A9 connect rect (at -52.705 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask)) + (pad A10 connect rect (at -51.435 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 4 +5V)) + (pad A11 connect rect (at -50.165 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask)) + (pad A12 connect rect (at -48.895 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask)) + (pad A13 connect rect (at -47.625 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask)) + (pad A14 connect rect (at -46.355 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask)) + (pad A15 connect rect (at -45.085 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 159 /buspci.sch/P_RST#)) + (pad A16 connect rect (at -43.815 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 4 +5V)) + (pad A17 connect rect (at -42.545 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 151 /buspci.sch/P_GNT#)) + (pad A18 connect rect (at -41.275 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 301 GND)) + (pad A19 connect rect (at -40.005 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask)) + (pad A20 connect rect (at -38.735 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 136 /buspci.sch/P_AD30)) + (pad A21 connect rect (at -37.465 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 2 +3.3V)) + (pad A22 connect rect (at -36.195 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 133 /buspci.sch/P_AD28)) + (pad A23 connect rect (at -34.925 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 131 /buspci.sch/P_AD26)) + (pad A24 connect rect (at -33.655 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 301 GND)) + (pad A25 connect rect (at -32.385 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 129 /buspci.sch/P_AD24)) + (pad A26 connect rect (at -31.115 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 152 /buspci.sch/P_IDSEL)) + (pad A27 connect rect (at -29.845 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 2 +3.3V)) + (pad A28 connect rect (at -28.575 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 127 /buspci.sch/P_AD22)) + (pad A29 connect rect (at -27.305 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 125 /buspci.sch/P_AD20)) + (pad A30 connect rect (at -26.035 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 301 GND)) + (pad A31 connect rect (at -24.765 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 122 /buspci.sch/P_AD18)) + (pad A32 connect rect (at -23.495 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 120 /buspci.sch/P_AD16)) + (pad A33 connect rect (at -22.225 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 2 +3.3V)) + (pad A34 connect rect (at -20.955 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 150 /buspci.sch/P_FRAME#)) + (pad A35 connect rect (at -19.685 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 301 GND)) + (pad A36 connect rect (at -18.415 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 162 /buspci.sch/P_TRDY#)) + (pad A37 connect rect (at -17.145 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 301 GND)) + (pad A38 connect rect (at -15.875 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 161 /buspci.sch/P_STOP#)) + (pad A39 connect rect (at -14.605 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 2 +3.3V)) + (pad A40 connect rect (at -13.335 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask)) + (pad A41 connect rect (at -12.065 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask)) + (pad A42 connect rect (at -10.795 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 301 GND)) + (pad A43 connect rect (at -9.525 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 156 /buspci.sch/P_PAR)) + (pad A44 connect rect (at -8.255 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 119 /buspci.sch/P_AD15)) + (pad A45 connect rect (at -6.985 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 2 +3.3V)) + (pad A46 connect rect (at -5.715 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 117 /buspci.sch/P_AD13)) + (pad A47 connect rect (at -4.445 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 115 /buspci.sch/P_AD11)) + (pad A48 connect rect (at -3.175 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 301 GND)) + (pad A49 connect rect (at -1.905 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 143 /buspci.sch/P_AD9)) + (pad A52 connect rect (at 1.905 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 144 /buspci.sch/P_C/BE0#)) + (pad A53 connect rect (at 3.175 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 2 +3.3V)) + (pad A54 connect rect (at 4.445 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 140 /buspci.sch/P_AD6)) + (pad A55 connect rect (at 5.715 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 138 /buspci.sch/P_AD4)) + (pad A56 connect rect (at 6.985 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 301 GND)) + (pad A57 connect rect (at 8.255 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 124 /buspci.sch/P_AD2)) + (pad A58 connect rect (at 9.525 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 112 /buspci.sch/P_AD0)) + (pad A59 connect rect (at 10.795 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 4 +5V)) + (pad A60 connect rect (at 12.065 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask)) + (pad A61 connect rect (at 13.335 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 4 +5V)) + (pad A62 connect rect (at 14.605 -0.254) (size 1.016 4.572) (layers Cuivre B.Mask) + (net 4 +5V)) + (pad B2 connect rect (at -61.595 2.413) (size 0.508 0.762) (layers Composant F.Mask)) + (pad B3 connect rect (at -60.325 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 301 GND)) + (pad B4 connect rect (at -59.055 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 354 N-000320)) + (pad B5 connect rect (at -57.785 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 4 +5V)) + (pad B6 connect rect (at -56.515 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 4 +5V)) + (pad B7 connect rect (at -55.245 2.413) (size 0.508 0.762) (layers Composant F.Mask)) + (pad B8 connect rect (at -53.975 2.413) (size 0.508 0.762) (layers Composant F.Mask)) + (pad B9 connect rect (at -52.705 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 356 N-000338)) + (pad B10 connect rect (at -51.435 2.413) (size 0.508 0.762) (layers Composant F.Mask)) + (pad B11 connect rect (at -50.165 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 355 N-000337)) + (pad B12 connect rect (at -48.895 2.413) (size 0.508 0.762) (layers Composant F.Mask)) + (pad B13 connect rect (at -47.625 2.413) (size 0.508 0.762) (layers Composant F.Mask)) + (pad B14 connect rect (at -46.355 2.413) (size 0.508 0.762) (layers Composant F.Mask)) + (pad B15 connect rect (at -45.085 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 301 GND)) + (pad B16 connect rect (at -43.815 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 148 /buspci.sch/P_CLK)) + (pad B17 connect rect (at -42.545 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 301 GND)) + (pad B18 connect rect (at -41.275 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 158 /buspci.sch/P_REQ#)) + (pad B19 connect rect (at -40.005 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 4 +5V)) + (pad B20 connect rect (at -38.735 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 137 /buspci.sch/P_AD31)) + (pad B21 connect rect (at -37.465 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 134 /buspci.sch/P_AD29)) + (pad B22 connect rect (at -36.195 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 301 GND)) + (pad B23 connect rect (at -34.925 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 132 /buspci.sch/P_AD27)) + (pad B24 connect rect (at -33.655 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 130 /buspci.sch/P_AD25)) + (pad B25 connect rect (at -32.385 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 2 +3.3V)) + (pad B26 connect rect (at -31.115 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 147 /buspci.sch/P_C/BE3#)) + (pad B27 connect rect (at -29.845 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 128 /buspci.sch/P_AD23)) + (pad B28 connect rect (at -28.575 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 301 GND)) + (pad B29 connect rect (at -27.305 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 126 /buspci.sch/P_AD21)) + (pad B30 connect rect (at -26.035 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 123 /buspci.sch/P_AD19)) + (pad B31 connect rect (at -24.765 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 2 +3.3V)) + (pad B32 connect rect (at -23.495 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 121 /buspci.sch/P_AD17)) + (pad B33 connect rect (at -22.225 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 146 /buspci.sch/P_C/BE2#)) + (pad B34 connect rect (at -20.955 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 301 GND)) + (pad B35 connect rect (at -19.685 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 154 /buspci.sch/P_IRDY#)) + (pad B36 connect rect (at -18.415 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 2 +3.3V)) + (pad B37 connect rect (at -17.145 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 149 /buspci.sch/P_DEVSEL#)) + (pad B38 connect rect (at -15.875 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 301 GND)) + (pad B39 connect rect (at -14.605 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 155 /buspci.sch/P_LOCK#)) + (pad B40 connect rect (at -13.335 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 157 /buspci.sch/P_PERR#)) + (pad B41 connect rect (at -12.065 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 2 +3.3V)) + (pad B42 connect rect (at -10.795 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 160 /buspci.sch/P_SERR#)) + (pad B43 connect rect (at -9.525 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 2 +3.3V)) + (pad B44 connect rect (at -8.255 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 145 /buspci.sch/P_C/BE1#)) + (pad B45 connect rect (at -6.985 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 118 /buspci.sch/P_AD14)) + (pad B46 connect rect (at -5.715 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 301 GND)) + (pad B47 connect rect (at -4.445 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 116 /buspci.sch/P_AD12)) + (pad B48 connect rect (at -3.175 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 114 /buspci.sch/P_AD10)) + (pad B49 connect rect (at -1.905 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 301 GND)) + (pad B52 connect rect (at 1.905 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 142 /buspci.sch/P_AD8)) + (pad B53 connect rect (at 3.175 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 141 /buspci.sch/P_AD7)) + (pad B54 connect rect (at 4.445 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 2 +3.3V)) + (pad B55 connect rect (at 5.715 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 139 /buspci.sch/P_AD5)) + (pad B56 connect rect (at 6.985 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 135 /buspci.sch/P_AD3)) + (pad B57 connect rect (at 8.255 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 301 GND)) + (pad B58 connect rect (at 9.525 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 113 /buspci.sch/P_AD1)) + (pad B59 connect rect (at 10.795 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 4 +5V)) + (pad B60 connect rect (at 12.065 2.413) (size 0.508 0.762) (layers Composant F.Mask)) + (pad B61 connect rect (at 13.335 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 4 +5V)) + (pad B62 connect rect (at 14.605 2.413) (size 0.508 0.762) (layers Composant F.Mask) + (net 4 +5V)) + (pad B1 connect rect (at -62.865 2.413) (size 0.508 0.762) (layers Composant F.Mask)) + (pad A1 connect rect (at -62.865 2.413) (size 0.508 0.762) (layers Cuivre B.Mask)) + (pad A2 connect rect (at -61.595 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 1 +12V)) + (pad A3 connect rect (at -60.325 2.413) (size 0.508 0.762) (layers Cuivre B.Mask)) + (pad A4 connect rect (at -59.055 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 354 N-000320)) + (pad A5 connect rect (at -57.785 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 4 +5V)) + (pad A6 connect rect (at -56.515 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 153 /buspci.sch/P_INTA#)) + (pad A7 connect rect (at -55.245 2.413) (size 0.508 0.762) (layers Cuivre B.Mask)) + (pad A8 connect rect (at -53.975 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 4 +5V)) + (pad A9 connect rect (at -52.705 2.413) (size 0.508 0.762) (layers Cuivre B.Mask)) + (pad A10 connect rect (at -51.435 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 4 +5V)) + (pad A11 connect rect (at -50.165 2.413) (size 0.508 0.762) (layers Cuivre B.Mask)) + (pad A12 connect rect (at -48.895 2.413) (size 0.508 0.762) (layers Cuivre B.Mask)) + (pad A13 connect rect (at -47.625 2.413) (size 0.508 0.762) (layers Cuivre B.Mask)) + (pad A14 connect rect (at -46.355 2.413) (size 0.508 0.762) (layers Cuivre B.Mask)) + (pad A15 connect rect (at -45.085 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 159 /buspci.sch/P_RST#)) + (pad A16 connect rect (at -43.815 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 4 +5V)) + (pad A17 connect rect (at -42.545 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 151 /buspci.sch/P_GNT#)) + (pad A18 connect rect (at -41.275 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 301 GND)) + (pad A19 connect rect (at -40.005 2.413) (size 0.508 0.762) (layers Cuivre B.Mask)) + (pad A20 connect rect (at -38.735 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 136 /buspci.sch/P_AD30)) + (pad A21 connect rect (at -37.465 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 2 +3.3V)) + (pad A22 connect rect (at -36.195 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 133 /buspci.sch/P_AD28)) + (pad A23 connect rect (at -34.925 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 131 /buspci.sch/P_AD26)) + (pad A24 connect rect (at -33.655 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 301 GND)) + (pad A25 connect rect (at -32.385 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 129 /buspci.sch/P_AD24)) + (pad A26 connect rect (at -31.115 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 152 /buspci.sch/P_IDSEL)) + (pad A27 connect rect (at -29.845 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 2 +3.3V)) + (pad A28 connect rect (at -28.575 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 127 /buspci.sch/P_AD22)) + (pad A29 connect rect (at -27.305 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 125 /buspci.sch/P_AD20)) + (pad A30 connect rect (at -26.035 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 301 GND)) + (pad A31 connect rect (at -24.765 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 122 /buspci.sch/P_AD18)) + (pad A32 connect rect (at -23.495 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 120 /buspci.sch/P_AD16)) + (pad A33 connect rect (at -22.225 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 2 +3.3V)) + (pad A34 connect rect (at -20.955 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 150 /buspci.sch/P_FRAME#)) + (pad A35 connect rect (at -19.685 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 301 GND)) + (pad A36 connect rect (at -18.415 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 162 /buspci.sch/P_TRDY#)) + (pad A37 connect rect (at -17.145 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 301 GND)) + (pad A38 connect rect (at -15.875 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 161 /buspci.sch/P_STOP#)) + (pad A39 connect rect (at -14.605 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 2 +3.3V)) + (pad A40 connect rect (at -13.335 2.413) (size 0.508 0.762) (layers Cuivre B.Mask)) + (pad A41 connect rect (at -12.065 2.413) (size 0.508 0.762) (layers Cuivre B.Mask)) + (pad A42 connect rect (at -10.795 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 301 GND)) + (pad A43 connect rect (at -9.525 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 156 /buspci.sch/P_PAR)) + (pad A44 connect rect (at -8.255 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 119 /buspci.sch/P_AD15)) + (pad A45 connect rect (at -6.985 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 2 +3.3V)) + (pad A46 connect rect (at -5.715 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 117 /buspci.sch/P_AD13)) + (pad A47 connect rect (at -4.445 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 115 /buspci.sch/P_AD11)) + (pad A48 connect rect (at -3.175 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 301 GND)) + (pad A49 connect rect (at -1.905 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 143 /buspci.sch/P_AD9)) + (pad A52 connect rect (at 1.905 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 144 /buspci.sch/P_C/BE0#)) + (pad A53 connect rect (at 3.175 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 2 +3.3V)) + (pad A54 connect rect (at 4.445 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 140 /buspci.sch/P_AD6)) + (pad A55 connect rect (at 5.715 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 138 /buspci.sch/P_AD4)) + (pad A56 connect rect (at 6.985 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 301 GND)) + (pad A57 connect rect (at 8.255 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 124 /buspci.sch/P_AD2)) + (pad A58 connect rect (at 9.525 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 112 /buspci.sch/P_AD0)) + (pad A59 connect rect (at 10.795 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 4 +5V)) + (pad A60 connect rect (at 12.065 2.413) (size 0.508 0.762) (layers Cuivre B.Mask)) + (pad A61 connect rect (at 13.335 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 4 +5V)) + (pad A62 connect rect (at 14.605 2.413) (size 0.508 0.762) (layers Cuivre B.Mask) + (net 4 +5V)) ) - (gr_line (start 173.609 154.94) (end 185.42 154.94) (angle 90) (layer Contours.Ci) (width 0.2032)) + (gr_line (start 173.609 154.94) (end 185.42 154.94) (angle 90) (layer Edge.Cuts) (width 0.2032)) (gr_text TEXTE (at 59.5376 150.9776) (layer Cuivre) - (effects (font (size 1.524 1.524) (thickness 0.2032)) (justify mirror)) + (effects (font (thickness 0.2032)) (justify mirror)) ) - (gr_line (start 204.851 145.542) (end 204.851 134.366) (layer Contours.Ci) (width 0.2032)) - (gr_line (start 204.851 134.366) (end 216.027 134.366) (layer Contours.Ci) (width 0.2032)) - (dimension 0 (width 0.381) (layer Dessin.User) - (gr_text 20.574mm (at 228.7524 144.653 90) (layer Dessin.User) - (effects (font (size 1.524 1.524) (thickness 0.4318))) + (gr_line (start 204.851 145.542) (end 204.851 134.366) (layer Edge.Cuts) (width 0.2032)) + (gr_line (start 204.851 134.366) (end 216.027 134.366) (layer Edge.Cuts) (width 0.2032)) + (dimension 0 (width 0.381) (layer Dwgs.User) + (gr_text 20.574mm (at 228.7524 144.653 90) (layer Dwgs.User) + (effects (font (thickness 0.4318))) ) (feature1 (pts (xy 224.028 134.366) (xy 230.3018 134.366))) (feature2 (pts (xy 224.028 154.94) (xy 230.3018 154.94))) @@ -13963,10 +9478,10 @@ (arrow2a (pts (xy 227.203 154.94) (xy 227.7872 153.81478))) (arrow2b (pts (xy 227.203 154.94) (xy 226.6188 153.81478))) ) - (gr_line (start 192.659 154.94) (end 224.028 154.94) (layer Dessin.User) (width 0.381)) - (dimension 0 (width 0.381) (layer Dessin.User) - (gr_text 8.255mm (at 191.1604 159.0675 90) (layer Dessin.User) - (effects (font (size 1.524 1.524) (thickness 0.381))) + (gr_line (start 192.659 154.94) (end 224.028 154.94) (layer Dwgs.User) (width 0.381)) + (dimension 0 (width 0.381) (layer Dwgs.User) + (gr_text 8.255mm (at 191.1604 159.0675 90) (layer Dwgs.User) + (effects (font (thickness 0.381))) ) (feature1 (pts (xy 173.609 154.94) (xy 192.7098 154.94))) (feature2 (pts (xy 173.609 163.195) (xy 192.7098 163.195))) @@ -13976,38 +9491,38 @@ (arrow2a (pts (xy 189.611 163.195) (xy 190.1952 162.06978))) (arrow2b (pts (xy 189.611 163.195) (xy 189.0268 162.06978))) ) - (gr_line (start 290.957 134.366) (end 216.027 134.366) (layer Contours.Ci) (width 0.2032)) - (gr_line (start 360.553 66.675) (end 360.553 134.366) (layer Dessin.User) (width 0.2032)) - (gr_line (start 365.633 134.366) (end 365.633 56.515) (layer Contours.Ci) (width 0.2032)) - (gr_line (start 360.553 134.366) (end 365.633 134.366) (layer Contours.Ci) (width 0.2032)) - (gr_line (start 185.42 154.94) (end 194.818 145.542) (layer Contours.Ci) (width 0.2032)) - (gr_line (start 194.818 145.542) (end 204.851 145.542) (layer Contours.Ci) (width 0.2032)) - (gr_line (start 290.957 134.366) (end 360.553 134.366) (layer Contours.Ci) (width 0.2032)) - (gr_line (start 224.155 56.515) (end 365.633 56.515) (layer Contours.Ci) (width 0.2032)) - (gr_line (start 358.013 61.595) (end 363.093 61.595) (layer Dessin.User) (width 0.2032)) - (gr_line (start 360.553 59.055) (end 360.553 64.135) (layer Dessin.User) (width 0.2032)) - (gr_line (start 355.473 66.675) (end 360.553 66.675) (layer Dessin.User) (width 0.2032)) - (gr_line (start 355.473 66.675) (end 355.473 56.515) (layer Dessin.User) (width 0.2032)) - (gr_line (start 66.294 154.432) (end 53.594 154.432) (layer Dessin.User) (width 0.2032)) - (gr_line (start 66.294 76.962) (end 53.594 76.962) (layer Dessin.User) (width 0.2032)) - (gr_line (start 66.294 56.515) (end 66.294 76.962) (layer Dessin.User) (width 0.2032)) - (gr_line (start 58.674 76.962) (end 58.674 154.432) (layer Dessin.User) (width 0.2032)) - (gr_line (start 66.294 154.432) (end 66.294 163.195) (layer Dessin.User) (width 0.2032)) - (gr_line (start 61.087 160.909) (end 61.087 70.485) (layer Dessin.User) (width 0.2032)) - (gr_line (start 58.547 158.369) (end 63.627 158.369) (layer Dessin.User) (width 0.2032)) - (gr_line (start 58.547 73.025) (end 63.627 73.025) (layer Dessin.User) (width 0.2032)) - (gr_line (start 53.594 163.195) (end 68.58 163.195) (layer Contours.Ci) (width 0.2032)) - (gr_line (start 53.594 56.515) (end 224.155 56.515) (layer Contours.Ci) (width 0.2032)) - (gr_line (start 53.594 163.195) (end 53.594 56.515) (layer Contours.Ci) (width 0.2032)) - (gr_line (start 68.58 154.94) (end 94.361 154.94) (layer Contours.Ci) (width 0.2032)) - (gr_line (start 68.58 163.195) (end 68.58 154.94) (layer Contours.Ci) (width 0.2032)) - (gr_line (start 173.609 163.195) (end 159.004 163.195) (layer Contours.Ci) (width 0.2032)) - (gr_line (start 173.609 154.94) (end 173.609 163.195) (layer Contours.Ci) (width 0.2032)) - (gr_line (start 94.361 163.195) (end 157.226 163.195) (layer Contours.Ci) (width 0.2032)) - (gr_line (start 94.361 154.94) (end 94.361 163.195) (layer Contours.Ci) (width 0.2032)) - (gr_line (start 159.004 154.94) (end 159.004 163.195) (layer Contours.Ci) (width 0.2032)) - (gr_line (start 157.226 154.94) (end 159.004 154.94) (layer Contours.Ci) (width 0.2032)) - (gr_line (start 157.226 163.195) (end 157.226 154.94) (layer Contours.Ci) (width 0.2032)) + (gr_line (start 290.957 134.366) (end 216.027 134.366) (layer Edge.Cuts) (width 0.2032)) + (gr_line (start 360.553 66.675) (end 360.553 134.366) (layer Dwgs.User) (width 0.2032)) + (gr_line (start 365.633 134.366) (end 365.633 56.515) (layer Edge.Cuts) (width 0.2032)) + (gr_line (start 360.553 134.366) (end 365.633 134.366) (layer Edge.Cuts) (width 0.2032)) + (gr_line (start 185.42 154.94) (end 194.818 145.542) (layer Edge.Cuts) (width 0.2032)) + (gr_line (start 194.818 145.542) (end 204.851 145.542) (layer Edge.Cuts) (width 0.2032)) + (gr_line (start 290.957 134.366) (end 360.553 134.366) (layer Edge.Cuts) (width 0.2032)) + (gr_line (start 224.155 56.515) (end 365.633 56.515) (layer Edge.Cuts) (width 0.2032)) + (gr_line (start 358.013 61.595) (end 363.093 61.595) (layer Dwgs.User) (width 0.2032)) + (gr_line (start 360.553 59.055) (end 360.553 64.135) (layer Dwgs.User) (width 0.2032)) + (gr_line (start 355.473 66.675) (end 360.553 66.675) (layer Dwgs.User) (width 0.2032)) + (gr_line (start 355.473 66.675) (end 355.473 56.515) (layer Dwgs.User) (width 0.2032)) + (gr_line (start 66.294 154.432) (end 53.594 154.432) (layer Dwgs.User) (width 0.2032)) + (gr_line (start 66.294 76.962) (end 53.594 76.962) (layer Dwgs.User) (width 0.2032)) + (gr_line (start 66.294 56.515) (end 66.294 76.962) (layer Dwgs.User) (width 0.2032)) + (gr_line (start 58.674 76.962) (end 58.674 154.432) (layer Dwgs.User) (width 0.2032)) + (gr_line (start 66.294 154.432) (end 66.294 163.195) (layer Dwgs.User) (width 0.2032)) + (gr_line (start 61.087 160.909) (end 61.087 70.485) (layer Dwgs.User) (width 0.2032)) + (gr_line (start 58.547 158.369) (end 63.627 158.369) (layer Dwgs.User) (width 0.2032)) + (gr_line (start 58.547 73.025) (end 63.627 73.025) (layer Dwgs.User) (width 0.2032)) + (gr_line (start 53.594 163.195) (end 68.58 163.195) (layer Edge.Cuts) (width 0.2032)) + (gr_line (start 53.594 56.515) (end 224.155 56.515) (layer Edge.Cuts) (width 0.2032)) + (gr_line (start 53.594 163.195) (end 53.594 56.515) (layer Edge.Cuts) (width 0.2032)) + (gr_line (start 68.58 154.94) (end 94.361 154.94) (layer Edge.Cuts) (width 0.2032)) + (gr_line (start 68.58 163.195) (end 68.58 154.94) (layer Edge.Cuts) (width 0.2032)) + (gr_line (start 173.609 163.195) (end 159.004 163.195) (layer Edge.Cuts) (width 0.2032)) + (gr_line (start 173.609 154.94) (end 173.609 163.195) (layer Edge.Cuts) (width 0.2032)) + (gr_line (start 94.361 163.195) (end 157.226 163.195) (layer Edge.Cuts) (width 0.2032)) + (gr_line (start 94.361 154.94) (end 94.361 163.195) (layer Edge.Cuts) (width 0.2032)) + (gr_line (start 159.004 154.94) (end 159.004 163.195) (layer Edge.Cuts) (width 0.2032)) + (gr_line (start 157.226 154.94) (end 159.004 154.94) (layer Edge.Cuts) (width 0.2032)) + (gr_line (start 157.226 163.195) (end 157.226 154.94) (layer Edge.Cuts) (width 0.2032)) (segment (start 96.52 161.163) (end 96.52 158.496) (width 0.3048) (layer Cuivre) (net 1) (status C02)) (segment (start 162.56 161.163) (end 162.56 158.496) (width 0.3048) (layer Composant) (net 2) (status C00)) diff --git a/pcbnew/dialogs/dialog_plot_base.cpp b/pcbnew/dialogs/dialog_plot_base.cpp index dfaf33b0b6..c0b2d82c65 100644 --- a/pcbnew/dialogs/dialog_plot_base.cpp +++ b/pcbnew/dialogs/dialog_plot_base.cpp @@ -245,8 +245,8 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr wxString m_rbGerberFormatChoices[] = { _("4.5 (unit mm)"), _("4.6 (unit mm)") }; int m_rbGerberFormatNChoices = sizeof( m_rbGerberFormatChoices ) / sizeof( wxString ); m_rbGerberFormat = new wxRadioBox( this, wxID_ANY, _("Format"), wxDefaultPosition, wxDefaultSize, m_rbGerberFormatNChoices, m_rbGerberFormatChoices, 1, wxRA_SPECIFY_COLS ); - m_rbGerberFormat->SetSelection( 1 ); - m_rbGerberFormat->SetToolTip( _("Precision of coordinates in Gerber files/\nUse the highter value if possible.") ); + m_rbGerberFormat->SetSelection( 0 ); + m_rbGerberFormat->SetToolTip( _("Precision of coordinates in Gerber files.\nUse the highter value if possible.") ); m_GerberOptionsSizer->Add( m_rbGerberFormat, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); diff --git a/pcbnew/dialogs/dialog_plot_base.fbp b/pcbnew/dialogs/dialog_plot_base.fbp index 9bfcd299fe..2326520795 100644 --- a/pcbnew/dialogs/dialog_plot_base.fbp +++ b/pcbnew/dialogs/dialog_plot_base.fbp @@ -3015,13 +3015,13 @@ 1 Resizable - 1 + 0 1 wxRA_SPECIFY_COLS 0 - Precision of coordinates in Gerber files/ Use the highter value if possible. + Precision of coordinates in Gerber files. Use the highter value if possible. wxFILTER_NONE wxDefaultValidator diff --git a/pcbnew/dialogs/dialog_pns_settings_base.cpp b/pcbnew/dialogs/dialog_pns_settings_base.cpp index e74590e0d9..7fc9eff220 100644 --- a/pcbnew/dialogs/dialog_pns_settings_base.cpp +++ b/pcbnew/dialogs/dialog_pns_settings_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Jun 6 2014) +// C++ code generated with wxFormBuilder (version Jun 5 2014) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -106,7 +106,6 @@ DIALOG_PNS_SETTINGS_BASE::DIALOG_PNS_SETTINGS_BASE( wxWindow* parent, wxWindowID this->SetSizer( bMainSizer ); this->Layout(); - bMainSizer->Fit( this ); // Connect Events this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PNS_SETTINGS_BASE::OnClose ) ); diff --git a/pcbnew/dialogs/dialog_pns_settings_base.fbp b/pcbnew/dialogs/dialog_pns_settings_base.fbp index c109fdd667..b15698ba15 100644 --- a/pcbnew/dialogs/dialog_pns_settings_base.fbp +++ b/pcbnew/dialogs/dialog_pns_settings_base.fbp @@ -44,8 +44,8 @@ 280,480 DIALOG_PNS_SETTINGS_BASE - -1,-1 - wxDEFAULT_DIALOG_STYLE + 286,480 + wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER DIALOG_SHIM; dialog_shim.h Interactive Router settings @@ -88,7 +88,7 @@ - + bMainSizer wxVERTICAL diff --git a/pcbnew/dialogs/dialog_pns_settings_base.h b/pcbnew/dialogs/dialog_pns_settings_base.h index 67c1df9aa8..d85930dd44 100644 --- a/pcbnew/dialogs/dialog_pns_settings_base.h +++ b/pcbnew/dialogs/dialog_pns_settings_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Jun 6 2014) +// C++ code generated with wxFormBuilder (version Jun 5 2014) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -63,7 +63,7 @@ class DIALOG_PNS_SETTINGS_BASE : public DIALOG_SHIM public: - DIALOG_PNS_SETTINGS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Interactive Router settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE ); + DIALOG_PNS_SETTINGS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Interactive Router settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 286,480 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_PNS_SETTINGS_BASE(); }; From d6fbfbc001b25263eb44c72aa7c163fd17ef8f84 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 20 Jul 2014 16:46:59 +0200 Subject: [PATCH 704/741] Pcbnew: fix bug when generating drill files for blind/buried vias. --- pcbnew/dialogs/dialog_gendrill.cpp | 51 ++++++++++--------- pcbnew/exporters/gendrill_Excellon_writer.cpp | 17 ++++--- 2 files changed, 36 insertions(+), 32 deletions(-) diff --git a/pcbnew/dialogs/dialog_gendrill.cpp b/pcbnew/dialogs/dialog_gendrill.cpp index 7567d3d2c1..34ef9d48dc 100644 --- a/pcbnew/dialogs/dialog_gendrill.cpp +++ b/pcbnew/dialogs/dialog_gendrill.cpp @@ -354,21 +354,23 @@ void DIALOG_GENDRILL::SetParams() void DIALOG_GENDRILL::GenDrillAndMapFiles(bool aGenDrill, bool aGenMap) { - wxString layer_extend; /* added to the Board FileName to - * create FullFileName (= Board - * FileName + layer pair names) */ + wxString layername_extend; /* added to the Board FileName to + * create FullFileName (= Board + * FileName + layer pair names) + */ wxString msg; - bool hasBuriedVias = false; /* If true, drill files are created - * layer pair by layer pair for - * buried vias */ - int layer1 = B_Cu; - int layer2 = F_Cu; + bool hasBuriedVias = false; /* If true, drill files are created + * layer pair by layer pair for + * buried vias + */ + int layer1 = F_Cu; + int layer2 = B_Cu; bool gen_through_holes = true; bool gen_NPTH_holes = false; wxString currentWD = ::wxGetCwd(); - UpdateConfig(); // set params and Save drill options + UpdateConfig(); // set params and Save drill options m_parent->ClearMsgPanel(); @@ -392,26 +394,26 @@ void DIALOG_GENDRILL::GenDrillAndMapFiles(bool aGenDrill, bool aGenMap) if( excellonWriter.GetHolesCount() > 0 ) // has holes? { fn = m_parent->GetBoard()->GetFileName(); - layer_extend.Empty(); + layername_extend.Empty(); if( gen_NPTH_holes ) { - layer_extend << wxT( "-NPTH" ); + layername_extend << wxT( "-NPTH" ); } else if( !gen_through_holes ) { - if( layer1 == B_Cu ) - layer_extend << wxT( "-back" ); + if( layer1 == F_Cu ) + layername_extend << wxT( "-front" ); else - layer_extend << wxT( "-inner" ) << layer1; + layername_extend << wxT( "-inner" ) << layer1; - if( layer2 == F_Cu ) - layer_extend << wxT( "-front" ); + if( layer2 == B_Cu ) + layername_extend << wxT( "-back" ); else - layer_extend << wxT( "-inner" ) << layer2; + layername_extend << wxT( "-inner" ) << layer2; } - fn.SetName( fn.GetName() + layer_extend ); + fn.SetName( fn.GetName() + layername_extend ); wxString defaultPath = m_plotOpts.GetOutputDirectory(); if( defaultPath.IsEmpty() ) @@ -468,14 +470,14 @@ void DIALOG_GENDRILL::GenDrillAndMapFiles(bool aGenDrill, bool aGenMap) gen_NPTH_holes = true; else { - if( gen_through_holes ) - layer2 = layer1 + 1; // prepare generation of first layer pair + if( gen_through_holes ) + layer2 = layer1 + 1; // done with through-board holes, prepare generation of first layer pair else { - if( layer2 >= F_Cu ) // no more layer pair to consider + if( layer2 >= B_Cu ) // no more layer pair to consider { - layer1 = B_Cu; - layer2 = F_Cu; + layer1 = F_Cu; + layer2 = B_Cu; gen_NPTH_holes = true; continue; } @@ -484,8 +486,7 @@ void DIALOG_GENDRILL::GenDrillAndMapFiles(bool aGenDrill, bool aGenMap) layer2++; // use next layer pair if( layer2 == m_parent->GetBoard()->GetCopperLayerCount() - 1 ) - layer2 = F_Cu; // the last layer is always the - // Front layer + layer2 = B_Cu; // the last layer is always the back layer } gen_through_holes = false; diff --git a/pcbnew/exporters/gendrill_Excellon_writer.cpp b/pcbnew/exporters/gendrill_Excellon_writer.cpp index a369b2b5f4..5a950ad4e9 100644 --- a/pcbnew/exporters/gendrill_Excellon_writer.cpp +++ b/pcbnew/exporters/gendrill_Excellon_writer.cpp @@ -471,14 +471,15 @@ void EXCELLON_WRITER::BuildHolesList( int aFirstLayer, via->LayerPair( &new_hole.m_Hole_Top_Layer, &new_hole.m_Hole_Bottom_Layer ); // LayerPair return params with m_Hole_Bottom_Layer > m_Hole_Top_Layer - // (remember top layer = 0 and bottom layer = 31 for through hole vias) - if( (new_hole.m_Hole_Top_Layer < aFirstLayer) && (aFirstLayer >= 0) ) - continue; + // Remember: top layer = 0 and bottom layer = 31 for through hole vias + // the via should be at least from aFirstLayer to aLastLayer + if( (new_hole.m_Hole_Top_Layer > aFirstLayer) && (aFirstLayer >= 0) ) + continue; // via above the first layer - if( (new_hole.m_Hole_Bottom_Layer > aLastLayer) && (aLastLayer >= 0) ) - continue; + if( (new_hole.m_Hole_Bottom_Layer < aLastLayer) && (aLastLayer >= 0) ) + continue; // via below the last layer - if( aExcludeThroughHoles && (new_hole.m_Hole_Bottom_Layer == B_Cu) + if( aExcludeThroughHoles && (new_hole.m_Hole_Bottom_Layer == B_Cu) && (new_hole.m_Hole_Top_Layer == F_Cu) ) continue; @@ -494,7 +495,9 @@ void EXCELLON_WRITER::BuildHolesList( int aFirstLayer, // Read and analyse pads for( D_PAD* pad = module->Pads(); pad; pad = pad->Next() ) { - if( ! aGenerateNPTH_list && pad->GetAttribute() == PAD_HOLE_NOT_PLATED && ! aMergePTHNPTH ) + if( ! aGenerateNPTH_list && + pad->GetAttribute() == PAD_HOLE_NOT_PLATED && + ! aMergePTHNPTH ) continue; if( aGenerateNPTH_list && pad->GetAttribute() != PAD_HOLE_NOT_PLATED ) From 2196ed21c9a4f145030d3a9019d5c2a8e3e79a58 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sun, 20 Jul 2014 17:23:48 +0200 Subject: [PATCH 705/741] Apply a workaround to fix a wxWidgets bug in versions 3.0.x relative to mouse wheel event (Windows specific). Therefore wxWidgets 3.0.1 can be used without need to patch it. (This bug is fixed in wxWidgets 3.1) --- common/draw_panel.cpp | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/common/draw_panel.cpp b/common/draw_panel.cpp index 0367238bd6..791ac524dd 100644 --- a/common/draw_panel.cpp +++ b/common/draw_panel.cpp @@ -389,12 +389,10 @@ void EDA_DRAW_PANEL::OnActivate( wxActivateEvent& event ) void EDA_DRAW_PANEL::OnScroll( wxScrollWinEvent& event ) { int id = event.GetEventType(); - int dir; int x, y; int ppux, ppuy; int csizeX, csizeY; int unitsX, unitsY; - int maxX, maxY; GetViewStart( &x, &y ); GetScrollPixelsPerUnit( &ppux, &ppuy ); @@ -410,10 +408,18 @@ void EDA_DRAW_PANEL::OnScroll( wxScrollWinEvent& event ) unitsX /= ppux; unitsY /= ppuy; - maxX = unitsX - csizeX; - maxY = unitsY - csizeY; + int dir = event.GetOrientation(); // wxHORIZONTAL or wxVERTICAL - dir = event.GetOrientation(); // wxHORIZONTAL or wxVERTICAL + // On windows and on wxWidgets >= 2.9.5 and < 3.1, + // there is a bug in mousewheel event which always generates 2 scroll events + // (should be the case only for the default mousewheel event) + // with id = wxEVT_SCROLLWIN_LINEUP or wxEVT_SCROLLWIN_LINEDOWN + // so we skip these events. + // Note they are here just in case, because they are not actually used + // in Kicad +#if wxCHECK_VERSION( 3, 1, 0 ) || !wxCHECK_VERSION( 2, 9, 5 ) || !defined (__WINDOWS__) + int maxX = unitsX - csizeX; + int maxY = unitsY - csizeY; if( id == wxEVT_SCROLLWIN_LINEUP ) { @@ -448,7 +454,9 @@ void EDA_DRAW_PANEL::OnScroll( wxScrollWinEvent& event ) y = maxY; } } - else if( id == wxEVT_SCROLLWIN_THUMBTRACK ) + else +#endif + if( id == wxEVT_SCROLLWIN_THUMBTRACK ) { if( dir == wxHORIZONTAL ) x = event.GetPosition(); From 680ca22279804d0b1c53faec47601050def3bf79 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sun, 20 Jul 2014 19:41:12 +0200 Subject: [PATCH 706/741] Fix crash in Pcbnew and Gerbview when seceting (in layers manager) "always hide all layers but activer" --- gerbview/class_gerbview_layer_widget.cpp | 4 ++-- pcbnew/class_pcb_layer_widget.cpp | 6 +++--- pcbnew/layer_widget.h | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/gerbview/class_gerbview_layer_widget.cpp b/gerbview/class_gerbview_layer_widget.cpp index 6101db824d..3cccd72f37 100644 --- a/gerbview/class_gerbview_layer_widget.cpp +++ b/gerbview/class_gerbview_layer_widget.cpp @@ -186,7 +186,7 @@ void GERBER_LAYER_WIDGET::onPopupSelection( wxCommandEvent& event ) rowCount = GetLayerRowCount(); for( int row=0; row < rowCount; ++row ) { - wxCheckBox* cb = (wxCheckBox*) getLayerComp( row, 3 ); + wxCheckBox* cb = (wxCheckBox*) getLayerComp( row, COLUMN_COLOR_LYR_CB ); int layer = getDecodedId( cb->GetId() ); bool loc_visible = visible; @@ -317,7 +317,7 @@ void GERBER_LAYER_WIDGET::UpdateLayerIcons() int row_count = GetLayerRowCount(); for( int row = 0; row < row_count ; row++ ) { - wxStaticBitmap* bm = (wxStaticBitmap*) getLayerComp( row, 0 ); + wxStaticBitmap* bm = (wxStaticBitmap*) getLayerComp( row, COLUMN_ICON_ACTIVE ); if( bm == NULL) continue; diff --git a/pcbnew/class_pcb_layer_widget.cpp b/pcbnew/class_pcb_layer_widget.cpp index 04954b1248..e975ea3430 100644 --- a/pcbnew/class_pcb_layer_widget.cpp +++ b/pcbnew/class_pcb_layer_widget.cpp @@ -167,7 +167,7 @@ void PCB_LAYER_WIDGET::onPopupSelection( wxCommandEvent& event ) rowCount = GetLayerRowCount(); for( int row = rowCount-1; row>=0; --row ) { - wxCheckBox* cb = (wxCheckBox*) getLayerComp( row, 3 ); + wxCheckBox* cb = (wxCheckBox*) getLayerComp( row, COLUMN_COLOR_LYR_CB ); LAYER_ID layer = ToLAYER_ID( getDecodedId( cb->GetId() ) ); if( IsCopperLayer( layer ) ) @@ -180,7 +180,7 @@ void PCB_LAYER_WIDGET::onPopupSelection( wxCommandEvent& event ) // Enable/disable the copper layers visibility: for( int row=0; rowGetId() ) ); if( IsCopperLayer( layer ) ) @@ -264,7 +264,7 @@ void PCB_LAYER_WIDGET::SyncLayerVisibilities() // this utilizes more implementation knowledge than ideal, eventually // add member ROW getRow() or similar to base LAYER_WIDGET. - wxWindow* w = getLayerComp( row, 0 ); + wxWindow* w = getLayerComp( row, COLUMN_ICON_ACTIVE ); LAYER_ID layerId = ToLAYER_ID( getDecodedId( w->GetId() ) ); diff --git a/pcbnew/layer_widget.h b/pcbnew/layer_widget.h index e788cc4608..a5dd8490b6 100644 --- a/pcbnew/layer_widget.h +++ b/pcbnew/layer_widget.h @@ -47,6 +47,7 @@ #define LYR_COLUMN_COUNT 4 ///< Layer tab column count #define RND_COLUMN_COUNT 2 ///< Rendering tab column count +#define COLUMN_ICON_ACTIVE 0 #define COLUMN_COLORBM 1 #define COLUMN_COLOR_LYR_CB 2 #define COLUMN_COLOR_LYRNAME 3 From aad359fcf9101d8e2a19f5de7f0bdadc1d265d11 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Sun, 20 Jul 2014 20:58:33 +0200 Subject: [PATCH 707/741] Fixed Mac OS build. --- common/tool/tool_manager.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index cf64603b4d..6aec0a9002 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -145,7 +145,7 @@ struct TOOL_MANAGER::TOOL_STATE */ void Push() { - stateStack.push( *this ); + stateStack.push( new TOOL_STATE( *this ) ); clear(); } @@ -162,7 +162,8 @@ struct TOOL_MANAGER::TOOL_STATE if( !stateStack.empty() ) { - *this = stateStack.top(); + *this = *stateStack.top(); + delete stateStack.top(); stateStack.pop(); return true; @@ -177,7 +178,7 @@ struct TOOL_MANAGER::TOOL_STATE private: ///> Stack preserving previous states of a TOOL. - std::stack stateStack; + std::stack stateStack; ///> Restores the initial state. void clear() From a57f7ae8cd0fa5cccdd43832b2fbc687f41e541f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Sun, 20 Jul 2014 21:14:42 +0200 Subject: [PATCH 708/741] Fix OpenGL canvas freeze under Windows. --- common/gal/opengl/opengl_gal.cpp | 2 +- include/gal/opengl/opengl_gal.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index f7b7842a04..a5f7265a2f 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -124,7 +124,7 @@ void OPENGL_GAL::BeginDrawing() { SetCurrent( *glContext ); - clientDC = new wxPaintDC( this ); + clientDC = new wxClientDC( this ); // Initialize GLEW, FBOs & VBOs if( !isGlewInitialized ) diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index 417cdd389e..779a119ac7 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -252,7 +252,7 @@ private: static const int CIRCLE_POINTS = 64; ///< The number of points for circle approximation static const int CURVE_POINTS = 32; ///< The number of points for curve approximation - wxPaintDC* clientDC; ///< Drawing context + wxClientDC* clientDC; ///< Drawing context static wxGLContext* glContext; ///< OpenGL context of wxWidgets wxWindow* parentWindow; ///< Parent window wxEvtHandler* mouseListener; From cab7e67b59abf93b4e3919d1603df3bd84dcbdac Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 21 Jul 2014 11:42:36 +0200 Subject: [PATCH 709/741] fix Bug #1345193: Drill Map coordinates alway 0 when using Gerber format (due to a missing plotter initialization). --- common/common_plotGERBER_functions.cpp | 3 +++ pcbnew/exporters/gen_drill_report_files.cpp | 1 + 2 files changed, 4 insertions(+) diff --git a/common/common_plotGERBER_functions.cpp b/common/common_plotGERBER_functions.cpp index 6c5b07bcfb..a13064b5db 100644 --- a/common/common_plotGERBER_functions.cpp +++ b/common/common_plotGERBER_functions.cpp @@ -43,6 +43,9 @@ void GERBER_PLOTTER::SetViewport( const wxPoint& aOffset, double aIusPerDecimil, plotScale = 1; // Plot scale is *always* 1.0 m_IUsPerDecimil = aIusPerDecimil; + // gives now a default value to iuPerDeviceUnit (because the units of the caller is now known) + // which could be modified later by calling SetGerberCoordinatesFormat() + iuPerDeviceUnit = pow( 10.0, m_gerberUnitFmt ) / ( m_IUsPerDecimil * 10000.0 ); // We don't handle the filmbox, and it's more useful to keep the // origin at the origin diff --git a/pcbnew/exporters/gen_drill_report_files.cpp b/pcbnew/exporters/gen_drill_report_files.cpp index 7c474553c3..5a2c6ad5fb 100644 --- a/pcbnew/exporters/gen_drill_report_files.cpp +++ b/pcbnew/exporters/gen_drill_report_files.cpp @@ -78,6 +78,7 @@ bool EXCELLON_WRITER::GenDrillMapFile( const wxString& aFullFileName, offset = GetOffset(); plotter = new GERBER_PLOTTER(); plotter->SetViewport( offset, IU_PER_DECIMILS, scale, false ); + plotter->SetGerberCoordinatesFormat( 5 ); // format x.5 unit = mm break; case PLOT_FORMAT_HPGL: // Scale for HPGL format. From cfed0a7202169a4620d509004c1f7a27a150fbc4 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 21 Jul 2014 13:15:54 +0200 Subject: [PATCH 710/741] Add interactive router doc, from Tomasz Wlostowski (see github.com/twlostow/kicad-dev/blob/junk/Documentation/interactive_router) Remove the outdated pns_router.txt file. --- Documentation/interactive_router/build.sh | 5 ++ .../interactive_router/interactive_router.mmd | 73 ++++++++++++++++++ .../pictures/opengl_menu.png | Bin 0 -> 44164 bytes .../pictures/route_icon.png | Bin 0 -> 547 bytes .../pictures/router_options.png | Bin 0 -> 38081 bytes .../pictures/rules_editor.png | Bin 0 -> 59613 bytes Documentation/pns_router.txt | 11 --- 7 files changed, 78 insertions(+), 11 deletions(-) create mode 100644 Documentation/interactive_router/build.sh create mode 100644 Documentation/interactive_router/interactive_router.mmd create mode 100644 Documentation/interactive_router/pictures/opengl_menu.png create mode 100644 Documentation/interactive_router/pictures/route_icon.png create mode 100644 Documentation/interactive_router/pictures/router_options.png create mode 100644 Documentation/interactive_router/pictures/rules_editor.png delete mode 100644 Documentation/pns_router.txt diff --git a/Documentation/interactive_router/build.sh b/Documentation/interactive_router/build.sh new file mode 100644 index 0000000000..4d44c89c91 --- /dev/null +++ b/Documentation/interactive_router/build.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +pandoc -f markdown_mmd -t html interactive_router.mmd > interactive_router.html +pandoc -f markdown_mmd -t latex interactive_router.mmd > tmp.tex +pdflatex interactive_router.tex \ No newline at end of file diff --git a/Documentation/interactive_router/interactive_router.mmd b/Documentation/interactive_router/interactive_router.mmd new file mode 100644 index 0000000000..573a4818f9 --- /dev/null +++ b/Documentation/interactive_router/interactive_router.mmd @@ -0,0 +1,73 @@ +# Interactive Router # + +The Interactive Router lets you quickly and efficient route your PCBs by shoving off or walking around items on the PCB that collide with the trace you are currently drawing. + +Following modes are supported: + +- **Shove**, attempting to push and shove all items colliding with the currently routed track. +- **Walk around**, trying to avoid obstacles by hugging/walking around them. +- **Highlight collisions** which highlights all violating objects with a nice, shiny green color and shows violating clearance regions. + + +## Setting up ## + +Before using the Interactive Router, please set up these two things: +- Clearance settings. To set the clearances, open the *Design Rules* dialog and make sure at least the default clearance +value looks sensible. + +- Enable OpenGL mode by selecting *View->Switch canvas to OpenGL* menu option or pressing **F11**. + +![Screenshot](pictures/opengl_menu.png) + +## Laying out tracks ## + +To activate the router tool press the *Interactive Router* button ![Interactive Router Button](pictures/route_icon.png) or the **X** key. +The cursor will turn into a cross and the tool name, will appear in the status bar. + +To start a track, click on any item (a pad, track or a via) or press the **X** key again hovering the mouse over that item. +The new track will use the net of the starting item. Clicking or pressing **X** on empty PCB space starts a track with no net assigned. + +Move the mouse to define shape of the track. The router will try to follow mouse trail, hugging unmovable obstacles +(such as pads) and shoving colliding traces/vias, depending on the mode. Retreating mouse cursor will cause the shoved items to spring back +to their former locations. + +Clicking on a pad/track/via in the same net finishes routing. Clicking in empty space fixes the segments routed so far and continues routing the trace. + +In order to stop routing and undo all changes (shoved items, etc.), simply press **Esc**. + +Pressing **V** or selecting *Place Through Via* from the context menu while routing a track attaches a via at the end of the trace being routed. +Pressing **V** again disables via placement. Clicking in any spot establishes the via and continues routing. + +Pressing **/** or selecting *Switch Track Posture* from the context menu toggles the direction of the initial track segment between straight or diagonal. + +**Note**: By default, the router snaps to centers/axes of the items. Snapping can be disabled by holding **Shift** while routing or selecting items. + +## Setting track widths and via sizes ## + +There are several ways to pre-select a track width/via size or to change it during routing: +- Use standard Kicad shortcuts. +- Press **W** or select *Custom Track Width* from the context menu to type in a custom width/via size. +- Pick a predefined width from the *Select Track Width* sub-menu of the context menu. +- Select *Use the starting track width* in the *Select Track Width* menu to pick the width from the start item (or the traces already connected to it). + +## Dragging ## + +The router can drag track segments, corners and vias. To drag an item, click on it with **Ctrl** key pressed, hover the mouse and press **G** or select *Drag Track/Via* from the context menu. +Finish dragging by clicking again or abort by pressing *Esc*. + +## Options ## + +The router behavior be configured by pressing *E* or selecting *Routing Options* from the context menu. It opens a window like the one below: + +![Screenshot](pictures/router_options.png) + +The options are: + +- **Mode** - select how the router handles DRC violation (shoving, walking around, etc.) +- **Shove vias** - when disabled, vias are treated as un-movable objects and hugged instead of shoved. +- **Jump over obstacles** - when enabled, the router tries to move colliding traces behind solid obstacles (e.g. pads) instead of "reflecting" back the collision +- **Remove redundant tracks** - removes loops while routing (e.g. if the new track ensures same connectivity as an already existing one, the old track is removed). Loop removal works locally (only between the start and end of the currently routed trace). +- **Automatic neckdown** - when enabled, the router tries to break out pads/vias in a clean way, avoiding acute angles and jagged breakout traces. +- **Smooth dragged segments** - when enabled, the router attempts to merge several jagged segments into a single straight one (dragging mode). +- **Allow DRC violations** (*Highlight collisions* mode only) - allows to establish a track even if is violating the DRC rules. +- **Optimizer effort** - defines how much time the router shall spend optimizing the routed/shoved traces. More effort means cleaner routing (but slower), less effort means faster routing but somewhat jagged traces. diff --git a/Documentation/interactive_router/pictures/opengl_menu.png b/Documentation/interactive_router/pictures/opengl_menu.png new file mode 100644 index 0000000000000000000000000000000000000000..cd6decbbfc46409ee5de0d6c1f01a06eec99b2c9 GIT binary patch literal 44164 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%0AfwLHFqUad1!d0gnfRag65PeX} z+ETwfEO}N`cb4_?YK77lEEezwda+(Tw?$ex2P@EJB!(qpTxt?wQCsl}(Q#OO>-~!| z{F!mPiva)3*=00SLQ-x#7dAir)~~tcH-e#?e1rn4Tn|+JX5_2=IP+8sRDSL<#WI~> z8k{Ry#Wc~k2m#Z~iiOY6@)^*TTy{qI9RG+aD2yyN+Pn%hWKTs24)hW$NJvP~EC;1y z;Qv#3o$|okm@8GQ^vL=(Xd>ifWbp|J_$a~M3u<7EVAKQ8%3953GrOm`8%@R+-)Ef4 zz>!G9`GK(ZLk3vIZT-UL;b}UU?it?zfG`K-(*rqK zaNbjwj)~9?--p@W-p$c;9!W__BO{|65?#zyh1Nlajgb3LVOc-t?KAuruV=6{dXIhS zIdmaC7<1ovBHe4{6^>_8=?Yi&G+r?iz?$fuW3ldz!Z`@y;8NbB-GTDoj9^jTqRM5 zSE;mAr*d|*IBoS07Jx-bxmIH&VVO%6+e%*oF5r4&hHPM>O^A(scC=8xJDx3HsA^+# z2r7i{A0AMH#RI7@$oXACr7BqcdX9X17Z(=?0;zR}A=dnavZVuV`=v!3=aX z+%}ze{ZP{&2ALEFAZoXEY(qSz^+-npns4q`$A$$ge7N!}$jWBMRkIWi?|f6o)tuFy zy>GMm?5f<|n0+2*b;`MhCGe9g&Jm<;en`{v7&Iw{bQa~&LsEtr(U=~%EMqg13gy{^ z{~etUYn@FFYyE6Y)YMy``zWSyVxt6yVp5(g)E9#~OAv(z^Ek1>B16UL?BQ)tWen0H zGMT7%2Vf><-MBb2)9Ckf->PMf1D~r}3NFoDinkzEEu8(bo9!P@4YCT_!HvyaX{ZT< zWCHF-NsL-!Swc(I1|neUH{_la&~3J#?EkrL`eN}?%L(1_|6Q$s% z8W3yn5$*z=_Bi*zIDy|HWPBHsod0rbFd?1WuE%K^giUjyfA1cD{P=Nmx+WkXP_AAE zigDYTo9CC7kPr~S5JH=vjW0XtYry;jVWP7Au*b$hz6~Gvn*c9|TDvwU z9xyE^zGz-%$DU&!k{c}6sVsW0lnbR#k^>9$V`k_5NgA+6U<7tZh<8=yd5fGkV;vb0 zQ8JKFst4x8dMtC+jlusNuKYsu^#3qmFk3(fi;3ZhLj^=>6I809!R{!qrI8enV5$7v zDz6pc@_SN1#Tg9qETDr+gkrz|t?tJ<2#S?0dSGxwh6mw#e!s_CaDWJzK44*C89Jii ziebgcG-*;^v5q)=*dvKg+%C;q6%5YWWR;qsgcU=Nr?AAv(dz=*l zX?5L?m!Wocap6ctZA_^yFF$-}7hKW&0kRaSsi^=U_ksoQ1p1Y`d(qTB2wHhx?qR14 zORA`Y#Ex#Ep!fAie}6w%DP2RECw&exi(b$AmJ67qm|5isk(BOyt@e?Pytm^>ccyAEZIc-Pg?zg06L z)jU%g`N~^qG}oAD=lEDraj9=$;ILYyupvJu=X3A+Cr?ihIq`kEnoD6d&@5H=^YeT4 z>J=GAsE+*#m=HkF&?4kxSh&tCab|4p7nphL`eE*k-h3CK?+c4T{$~2P^^+K z<#~4pvZT(Aj`ZO8yX<0w_By$`7Q8v_r~1R~gC(=_^*#;rN;E7#fAd$|TRyVr>gv;Q zTsn~FxSC_u%(mVU$AV8E{n+fd4leI9@$D|VW2ap&e#eVkCcA2j<`_E-x~cgZC6VEm z3}Q60@x$Ab`>sQ}SKx7TgNcl6sV;8#-vNe7u|bL^Y;0_h&sC$xgMonofh`=AVD{7s z6olVg0m;9s_*#leE$Xpet_zJZbw(SGr&hPy6Ced|0>Z@dhZ84}WN)se=|G^yzDa4@c3 zUtdoznU4@l{gx4<$}UVh7>WD9M1Twrrm%m`KD~bZdipzCa$#BvDAP5r4M8XUZZZ%J zmR&qnlV6;Vev$MW5+qed?mHi7-W`0cJSn6_Y-*ZfZnm1O&;~0f&=)Sw&nW~yi7KvZ zdE4q}%Q>eQ?(rH(M9Z_Apotx>8FJh0aetL

    WVPH}8x$lFeArl$KYfioO+K1H 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%0Aljfj7c<7>sFVa9Nnx>h=^V4BMJaxFKydOpsj>T0 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 H75aYw>u=F0 literal 0 HcmV?d00001 diff --git a/Documentation/interactive_router/pictures/route_icon.png b/Documentation/interactive_router/pictures/route_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..c87ac05c8f5a2d33a6ed52f62928fd3dfdfe221c GIT binary patch literal 547 zcmV+;0^I$HP)i>6S6h=vRfVzd=30poB% zG}y+{T&Mig35Vq4-u(B!2f3~bvZv$UXO;DMU3( zO@R|)TTSp&E3+#A@DY6I*Lo12!keZ^8ZPRc`kVho>ffwo*2I(u0A0U(Y#)=tAVA8Z z@@0nr0#b%9ibam*0O0oJ_S`)ug<)uBE4zj3>UEXi@l+&*LKFa;IcImTccd@^Cv41Z z06+kNVHx9NCI&S$NjrTw1%RWQqts+7@JyW*RiunVHlbzWlOlm{w6g*sgjCwz4h3N7&*of&+>b#dpyUN lm&>6RavUcaZW9c7eFE@bN&OE?Zs`C3002ovPDHLkV1l{~@|OSr literal 0 HcmV?d00001 diff --git a/Documentation/interactive_router/pictures/router_options.png b/Documentation/interactive_router/pictures/router_options.png new file mode 100644 index 0000000000000000000000000000000000000000..9eaecf461431de8e50e3f0e2a30dec0602edab32 GIT binary patch literal 38081 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 ROX*-J%Bsnfy)=LS{{XmyJm3HT literal 0 HcmV?d00001 diff --git a/Documentation/pns_router.txt b/Documentation/pns_router.txt deleted file mode 100644 index 209a950931..0000000000 --- a/Documentation/pns_router.txt +++ /dev/null @@ -1,11 +0,0 @@ -So, finally we've got an integrated interactive, push-and-sometimes-shove router, although with a very limited user interface: - -- Edit->Interactive router launches the tool, -- while routing: 'V' key places a via, -- '+' and '-' keys cycle through available layers, -- '/' key switches track posture. - -Via/track dimensions are taken from the netclasses. -There are no other options available for the time being - promise to add them soon :) - -Tom \ No newline at end of file From 0ec256ccb4297b12375768cfefc7dd3720a86bf6 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 21 Jul 2014 12:54:58 +0200 Subject: [PATCH 711/741] Fixed bug: solder paste clearance is not displayed (GAL). --- pcbnew/pcb_painter.cpp | 6 +++--- pcbnew/pcbnew_config.cpp | 11 ++++++++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 4adc0bc13c..a1eb3f77af 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -521,11 +521,11 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) else if( aLayer == F_Paste || aLayer == B_Paste ) { // Drawing solderpaste - int solderpasteMargin = aPad->GetLocalSolderPasteMargin(); + wxSize solderpasteMargin = aPad->GetSolderPasteMargin(); m_gal->Translate( VECTOR2D( aPad->GetOffset() ) ); - size = VECTOR2D( aPad->GetSize().x / 2.0 + solderpasteMargin, - aPad->GetSize().y / 2.0 + solderpasteMargin ); + size = VECTOR2D( aPad->GetSize().x / 2.0 + solderpasteMargin.x, + aPad->GetSize().y / 2.0 + solderpasteMargin.y ); shape = aPad->GetShape(); } else diff --git a/pcbnew/pcbnew_config.cpp b/pcbnew/pcbnew_config.cpp index 963f9c4ba2..1125628dfe 100644 --- a/pcbnew/pcbnew_config.cpp +++ b/pcbnew/pcbnew_config.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -47,6 +48,7 @@ #include #include +#include #include #include #include @@ -166,7 +168,14 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event ) case ID_PCB_MASK_CLEARANCE: { DIALOG_PADS_MASK_CLEARANCE dlg( this ); - dlg.ShowModal(); + + if( dlg.ShowModal() == 1 && IsGalCanvasActive() ) + { + for( MODULE* module = GetBoard()->m_Modules; module; module = module->Next() ) + module->ViewUpdate(); + + GetGalCanvas()->Refresh(); + } } break; From 2f7b9bcd71892a10104b48cc05976ca77204e32e Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 21 Jul 2014 13:17:11 +0200 Subject: [PATCH 712/741] Fixed bug: module editor doesn't respect global "per module" solder mask clearance (GAL). --- pcbnew/modedit.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pcbnew/modedit.cpp b/pcbnew/modedit.cpp index ff22550845..00dbc83123 100644 --- a/pcbnew/modedit.cpp +++ b/pcbnew/modedit.cpp @@ -580,10 +580,11 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) { SetCurItem( GetBoard()->m_Modules ); - DIALOG_MODULE_MODULE_EDITOR dialog( this, (MODULE*) GetScreen()-> GetCurItem() ); + DIALOG_MODULE_MODULE_EDITOR dialog( this, (MODULE*) GetScreen()->GetCurItem() ); int ret = dialog.ShowModal(); GetScreen()->GetCurItem()->ClearFlags(); + GetBoard()->m_Modules.GetFirst()->ViewUpdate(); if( ret > 0 ) m_canvas->Refresh(); From 38027eb9987f2d31031cb833a5e0986be2dac5dc Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 21 Jul 2014 18:26:18 +0200 Subject: [PATCH 713/741] 3d viewer: Add high quality mode option is realistic mode (Shows holes in copper zones, but with longer calculation time) Gal: fix a very minor issue: the keys to switch between copper layers are now - and + (according to the doc and the normall mode), instead of - and = --- 3d-viewer/3d_draw.cpp | 26 ++++++++++++++++----- 3d-viewer/3d_frame.cpp | 10 ++++++++ 3d-viewer/3d_toolbar.cpp | 41 +++++++++++++++++++++------------ 3d-viewer/3d_viewer_id.h | 1 + 3d-viewer/info3d_visu.cpp | 39 ++++++++++++++++--------------- 3d-viewer/info3d_visu.h | 23 +++++++++--------- pcbnew/tools/common_actions.cpp | 2 +- 7 files changed, 90 insertions(+), 52 deletions(-) diff --git a/3d-viewer/3d_draw.cpp b/3d-viewer/3d_draw.cpp index f8ba411577..14a04ff7bd 100644 --- a/3d-viewer/3d_draw.cpp +++ b/3d-viewer/3d_draw.cpp @@ -188,12 +188,21 @@ static inline void SetGLCopperColor() glColor4f( 255.0*lum, 223.0*lum, 0.0*lum, 1.0 ); } -// Helper function: initialize the color to draw the epoxy layers -// ( body board and solder mask layers) in realistic mode. +// Helper function: initialize the color to draw the epoxy +// body board in realistic mode. static inline void SetGLEpoxyColor( double aTransparency = 1.0 ) { // Generates an epoxy color, near board color const double lum = 0.2/255.0; + glColor4f( 255.0*lum, 218.0*lum, 110.0*lum, aTransparency ); +} + +// Helper function: initialize the color to draw the +// solder mask layers in realistic mode. +static inline void SetGLSolderMaskColor( double aTransparency = 1.0 ) +{ + // Generates a solder mask color + const double lum = 0.2/255.0; glColor4f( 100.0*lum, 255.0*lum, 180.0*lum, aTransparency ); } @@ -217,7 +226,7 @@ static inline void SetGLTechLayersColor( LAYER_NUM aLayer ) case B_Mask: case F_Mask: - SetGLEpoxyColor( 0.7 ); + SetGLSolderMaskColor( 0.7 ); break; default: @@ -237,6 +246,12 @@ static inline void SetGLTechLayersColor( LAYER_NUM aLayer ) void EDA_3D_CANVAS::BuildBoard3DView() { BOARD* pcb = GetBoard(); + + // If hightQualityMode is true, holes are correctly removed from copper zones areas. + // If hightQualityMode is false, holes are not removed from copper zones areas, + // but the calculation time is twice shorter. + bool hightQualityMode = g_Parm_3D_Visu.HightQualityMode(); + bool realistic_mode = g_Parm_3D_Visu.IsRealisticMode(); // Number of segments to convert a circle to polygon @@ -276,7 +291,6 @@ void EDA_3D_CANVAS::BuildBoard3DView() CPOLYGONS_LIST currLayerHoles; // Contains holes for the current layer bool throughHolesListBuilt = false; // flag to build the through hole polygon list only once - bool hightQualityMode = false; LSET cu_set = LSET::AllCuMask( g_Parm_3D_Visu.m_CopperLayersCount ); @@ -520,7 +534,7 @@ void EDA_3D_CANVAS::BuildTechLayers3DView() BOARD* pcb = GetBoard(); // Number of segments to draw a circle using segments - const int segcountforcircle = 16; + const int segcountforcircle = 18; double correctionFactor = 1.0 / cos( M_PI / (segcountforcircle * 2) ); const int segcountLowQuality = 12; // segments to draw a circle with low quality // to reduce time calculations @@ -736,7 +750,7 @@ void EDA_3D_CANVAS::BuildTechLayers3DView() */ void EDA_3D_CANVAS::BuildBoard3DAuxLayers() { - const int segcountforcircle = 16; + const int segcountforcircle = 18; double correctionFactor = 1.0 / cos( M_PI / (segcountforcircle * 2) ); BOARD* pcb = GetBoard(); diff --git a/3d-viewer/3d_frame.cpp b/3d-viewer/3d_frame.cpp index c1fabb0b7a..3ae8cb0853 100644 --- a/3d-viewer/3d_frame.cpp +++ b/3d-viewer/3d_frame.cpp @@ -45,6 +45,7 @@ static const wxChar keyBgColor_Red[] = wxT( "BgColor_Red" ); static const wxChar keyBgColor_Green[] = wxT( "BgColor_Green" ); static const wxChar keyBgColor_Blue[] = wxT( "BgColor_Blue" ); static const wxChar keyShowRealisticMode[] = wxT( "ShowRealisticMode" ); +static const wxChar keyUseHQinRealisticMode[] = wxT( "UseHQinRealisticMode" ); static const wxChar keyShowAxis[] = wxT( "ShowAxis" ); static const wxChar keyShowGrid[] = wxT( "ShowGrid3D" ); static const wxChar keyShowGridSize[] = wxT( "Grid3DSize" ); @@ -159,6 +160,9 @@ void EDA_3D_FRAME::LoadSettings( wxConfigBase* aCfg ) aCfg->Read( keyShowRealisticMode, &tmp, false ); prms.SetFlag( FL_USE_REALISTIC_MODE, tmp ); + aCfg->Read( keyUseHQinRealisticMode, &tmp, false ); + prms.SetFlag( FL_USE_MAXQUALITY_IN_REALISTIC_MODE, tmp ); + aCfg->Read( keyShowAxis, &tmp, true ); prms.SetFlag( FL_AXIS, tmp ); @@ -210,6 +214,7 @@ void EDA_3D_FRAME::SaveSettings( wxConfigBase* aCfg ) aCfg->Write( keyBgColor_Green, g_Parm_3D_Visu.m_BgColor.m_Green ); aCfg->Write( keyBgColor_Blue, g_Parm_3D_Visu.m_BgColor.m_Blue ); aCfg->Write( keyShowRealisticMode, prms.GetFlag( FL_USE_REALISTIC_MODE ) ); + aCfg->Write( keyUseHQinRealisticMode, prms.GetFlag( FL_USE_MAXQUALITY_IN_REALISTIC_MODE ) ); aCfg->Write( keyShowAxis, prms.GetFlag( FL_AXIS ) ); aCfg->Write( keyShowGrid, prms.GetFlag( FL_GRID ) ); aCfg->Write( keyShowGridSize, prms.m_3D_Grid ); @@ -363,6 +368,11 @@ void EDA_3D_FRAME::Process_Special_Functions( wxCommandEvent& event ) NewDisplay(); return; + case ID_MENU3D_MAX_QUALITY_FOR_REALISTIC_MODE: + g_Parm_3D_Visu.SetFlag( FL_USE_MAXQUALITY_IN_REALISTIC_MODE, isChecked ); + NewDisplay(); + return; + case ID_MENU3D_SHOW_BOARD_BODY: g_Parm_3D_Visu.SetFlag( FL_SHOW_BOARD_BODY, isChecked ); NewDisplay(); diff --git a/3d-viewer/3d_toolbar.cpp b/3d-viewer/3d_toolbar.cpp index a1c7d2c90a..ece01f4ded 100644 --- a/3d-viewer/3d_toolbar.cpp +++ b/3d-viewer/3d_toolbar.cpp @@ -153,14 +153,22 @@ void EDA_3D_FRAME::CreateMenuBar() menuBar->Append( prefsMenu, _( "&Preferences" ) ); AddMenuItem( prefsMenu, ID_MENU3D_REALISTIC_MODE, - _( "Realistic Mode" ), KiBitmap( use_3D_copper_thickness_xpm ), wxITEM_CHECK ); + _( "Realistic Mode" ), + KiBitmap( use_3D_copper_thickness_xpm ), wxITEM_CHECK ); + + AddMenuItem( prefsMenu, ID_MENU3D_MAX_QUALITY_FOR_REALISTIC_MODE, + _( "Max Quality in Realistic Mode" ), + _( "When using max quality, holes are removed from copper zones, " + "but the calculation time is longer" ), + KiBitmap( green_xpm ), wxITEM_CHECK ); + prefsMenu->AppendSeparator(); AddMenuItem( prefsMenu, ID_MENU3D_BGCOLOR_SELECTION, - _( "Choose background color" ), KiBitmap( palette_xpm ) ); + _( "Choose Background Color" ), KiBitmap( palette_xpm ) ); AddMenuItem( prefsMenu, ID_MENU3D_AXIS_ONOFF, - _( "Show 3D &Axis" ), KiBitmap( axis3d_front_xpm ), wxITEM_CHECK ); + _( "Show 3D &Axis" ), KiBitmap( axis3d_front_xpm ), wxITEM_CHECK ); // Creates grid menu wxMenu * gridlistMenu = new wxMenu; @@ -231,40 +239,43 @@ void EDA_3D_FRAME::SetMenuBarOptionsState() wxMenuItem* item; // Set the state of toggle menus according to the current display options item = menuBar->FindItem( ID_MENU3D_REALISTIC_MODE ); - item->Check(g_Parm_3D_Visu.GetFlag( FL_USE_REALISTIC_MODE ) ); + item->Check( g_Parm_3D_Visu.IsRealisticMode() ); + + item = menuBar->FindItem( ID_MENU3D_MAX_QUALITY_FOR_REALISTIC_MODE ); + item->Check( g_Parm_3D_Visu.HightQualityMode() ); item = menuBar->FindItem( ID_MENU3D_SHOW_BOARD_BODY ); - item->Check(g_Parm_3D_Visu.GetFlag( FL_SHOW_BOARD_BODY ) ); + item->Check( g_Parm_3D_Visu.GetFlag( FL_SHOW_BOARD_BODY ) ); item = menuBar->FindItem( ID_MENU3D_USE_COPPER_THICKNESS ); - item->Check(g_Parm_3D_Visu.GetFlag( FL_USE_COPPER_THICKNESS ) ); + item->Check( g_Parm_3D_Visu.GetFlag( FL_USE_COPPER_THICKNESS ) ); item = menuBar->FindItem( ID_MENU3D_MODULE_ONOFF ); - item->Check(g_Parm_3D_Visu.GetFlag( FL_MODULE ) ); + item->Check( g_Parm_3D_Visu.GetFlag( FL_MODULE ) ); item = menuBar->FindItem( ID_MENU3D_ZONE_ONOFF ); - item->Check(g_Parm_3D_Visu.GetFlag( FL_ZONE ) ); + item->Check( g_Parm_3D_Visu.GetFlag( FL_ZONE ) ); item = menuBar->FindItem( ID_MENU3D_AXIS_ONOFF ); - item->Check(g_Parm_3D_Visu.GetFlag( FL_AXIS ) ); + item->Check( g_Parm_3D_Visu.GetFlag( FL_AXIS ) ); item = menuBar->FindItem( ID_MENU3D_ADHESIVE_ONOFF ); - item->Check(g_Parm_3D_Visu.GetFlag( FL_ADHESIVE ) ); + item->Check( g_Parm_3D_Visu.GetFlag( FL_ADHESIVE ) ); item = menuBar->FindItem( ID_MENU3D_SILKSCREEN_ONOFF ); - item->Check(g_Parm_3D_Visu.GetFlag( FL_SILKSCREEN ) ); + item->Check( g_Parm_3D_Visu.GetFlag( FL_SILKSCREEN ) ); item = menuBar->FindItem( ID_MENU3D_SOLDER_MASK_ONOFF ); - item->Check(g_Parm_3D_Visu.GetFlag( FL_SOLDERMASK ) ); + item->Check( g_Parm_3D_Visu.GetFlag( FL_SOLDERMASK ) ); item = menuBar->FindItem( ID_MENU3D_SOLDER_PASTE_ONOFF ); - item->Check(g_Parm_3D_Visu.GetFlag( FL_SOLDERPASTE ) ); + item->Check( g_Parm_3D_Visu.GetFlag( FL_SOLDERPASTE ) ); item = menuBar->FindItem( ID_MENU3D_COMMENTS_ONOFF ); - item->Check(g_Parm_3D_Visu.GetFlag( FL_COMMENTS ) ); + item->Check( g_Parm_3D_Visu.GetFlag( FL_COMMENTS ) ); item = menuBar->FindItem( ID_MENU3D_ECO_ONOFF ); - item->Check(g_Parm_3D_Visu.GetFlag( FL_ECO )); + item->Check( g_Parm_3D_Visu.GetFlag( FL_ECO )); } void EDA_3D_FRAME::SetToolbars() diff --git a/3d-viewer/3d_viewer_id.h b/3d-viewer/3d_viewer_id.h index 3af2a35db6..85288ea4cf 100644 --- a/3d-viewer/3d_viewer_id.h +++ b/3d-viewer/3d_viewer_id.h @@ -41,6 +41,7 @@ enum id_3dview_frm ID_MENU3D_ECO_ONOFF, ID_MENU3D_SHOW_BOARD_BODY, ID_MENU3D_REALISTIC_MODE, + ID_MENU3D_MAX_QUALITY_FOR_REALISTIC_MODE, ID_END_COMMAND_3D, ID_TOOL_SET_VISIBLE_ITEMS, diff --git a/3d-viewer/info3d_visu.cpp b/3d-viewer/info3d_visu.cpp index ee8b7ab2ed..23b5400e52 100644 --- a/3d-viewer/info3d_visu.cpp +++ b/3d-viewer/info3d_visu.cpp @@ -62,9 +62,9 @@ INFO3D_VISU::INFO3D_VISU() m_CopperLayersCount = 2; m_BoardSettings = NULL; - m_CopperThickness = 0; - m_EpoxyThickness = 0; - m_NonCopperLayerThickness = 0; + m_copperThickness = 0; + m_epoxyThickness = 0; + m_nonCopperLayerThickness = 0; // default all special item layers Visible for( ii = 0; ii < FL_LAST; ii++ ) @@ -72,6 +72,7 @@ INFO3D_VISU::INFO3D_VISU() SetFlag( FL_GRID, false ); SetFlag( FL_USE_COPPER_THICKNESS, false ); + SetFlag( FL_USE_MAXQUALITY_IN_REALISTIC_MODE, false ); } @@ -107,36 +108,36 @@ void INFO3D_VISU::InitSettings( BOARD* aBoard ) m_BiuTo3Dunits = 2.0 / std::max( m_BoardSize.x, m_BoardSize.y ); - m_EpoxyThickness = aBoard->GetDesignSettings().GetBoardThickness() * m_BiuTo3Dunits; + m_epoxyThickness = aBoard->GetDesignSettings().GetBoardThickness() * m_BiuTo3Dunits; // TODO use value defined by user (currently use default values by ctor - m_CopperThickness = COPPER_THICKNESS * m_BiuTo3Dunits; - m_NonCopperLayerThickness = TECH_LAYER_THICKNESS * m_BiuTo3Dunits; + m_copperThickness = COPPER_THICKNESS * m_BiuTo3Dunits; + m_nonCopperLayerThickness = TECH_LAYER_THICKNESS * m_BiuTo3Dunits; // Init Z position of each layer // calculate z position for each copper layer // Z = 0 is the z position of the back (bottom) layer (layer id = 31) - // Z = m_EpoxyThickness is the z position of the front (top) layer (layer id = 0) + // Z = m_epoxyThickness is the z position of the front (top) layer (layer id = 0) // all unused copper layer z position are set to 0 int layer; int copper_layers_cnt = m_CopperLayersCount; for( layer = 0; layer < copper_layers_cnt; layer++ ) { - m_LayerZcoord[layer] = - m_EpoxyThickness - (m_EpoxyThickness * layer / (copper_layers_cnt - 1)); + m_layerZcoord[layer] = + m_epoxyThickness - (m_epoxyThickness * layer / (copper_layers_cnt - 1)); } #define layerThicknessMargin 1.1 - double zpos_offset = m_NonCopperLayerThickness * layerThicknessMargin; - double zpos_copper_back = - layerThicknessMargin*m_CopperThickness/2; - double zpos_copper_front = m_EpoxyThickness + layerThicknessMargin*m_CopperThickness/2; + double zpos_offset = m_nonCopperLayerThickness * layerThicknessMargin; + double zpos_copper_back = - layerThicknessMargin*m_copperThickness/2; + double zpos_copper_front = m_epoxyThickness + layerThicknessMargin*m_copperThickness/2; // Fill remaining unused copper layers and back layer zpos // with 0 for( ; layer < MAX_CU_LAYERS; layer++ ) { - m_LayerZcoord[layer] = 0; + m_layerZcoord[layer] = 0; } // calculate z position for each non copper layer @@ -184,22 +185,22 @@ void INFO3D_VISU::InitSettings( BOARD* aBoard ) break; } - m_LayerZcoord[layer_id] = zpos; + m_layerZcoord[layer_id] = zpos; } } /* return the Z position of 3D shapes, in 3D Units * aIsFlipped: true for modules on Front (top) layer, false * if on back (bottom) layer - * Note: in draw functions, the copper has a thickness = m_CopperThickness - * Vias and tracks are draw with the top side position = m_CopperThickness/2 - * and the bottom side position = -m_CopperThickness/2 from the Z layer position + * Note: in draw functions, the copper has a thickness = m_copperThickness + * Vias and tracks are draw with the top side position = m_copperThickness/2 + * and the bottom side position = -m_copperThickness/2 from the Z layer position */ double INFO3D_VISU::GetModulesZcoord3DIU( bool aIsFlipped ) { if( aIsFlipped ) - return m_LayerZcoord[B_Cu] - ( m_CopperThickness / 2 ); + return m_layerZcoord[B_Cu] - ( m_copperThickness / 2 ); else - return m_LayerZcoord[F_Cu] + ( m_CopperThickness / 2 ); + return m_layerZcoord[F_Cu] + ( m_copperThickness / 2 ); } diff --git a/3d-viewer/info3d_visu.h b/3d-viewer/info3d_visu.h index 10149d2ed8..4b00ecc768 100644 --- a/3d-viewer/info3d_visu.h +++ b/3d-viewer/info3d_visu.h @@ -71,6 +71,7 @@ enum DISPLAY3D_FLG { FL_USE_COPPER_THICKNESS, FL_SHOW_BOARD_BODY, FL_USE_REALISTIC_MODE, + FL_USE_MAXQUALITY_IN_REALISTIC_MODE, FL_LAST }; @@ -95,10 +96,10 @@ public: double m_CurrentZpos; // temporary storage of current value of Z position, // used in some calculation private: - double m_LayerZcoord[LAYER_ID_COUNT]; // Z position of each layer (normalized) - double m_CopperThickness; // Copper thickness (normalized) - double m_EpoxyThickness; // Epoxy thickness (normalized) - double m_NonCopperLayerThickness; // Non copper layers thickness + double m_layerZcoord[LAYER_ID_COUNT]; // Z position of each layer (normalized) + double m_copperThickness; // Copper thickness (normalized) + double m_epoxyThickness; // Epoxy thickness (normalized) + double m_nonCopperLayerThickness; // Non copper layers thickness bool m_drawFlags[FL_LAST]; // Enable/disable flags (see DISPLAY3D_FLG list) public: INFO3D_VISU(); @@ -133,7 +134,7 @@ public: INFO3D_VISU(); */ int GetLayerZcoordBIU( int aLayerId ) { - return KiROUND( m_LayerZcoord[aLayerId] / m_BiuTo3Dunits ); + return KiROUND( m_layerZcoord[aLayerId] / m_BiuTo3Dunits ); } /** @@ -147,11 +148,10 @@ public: INFO3D_VISU(); */ int GetCopperThicknessBIU() const { - bool use_thickness = GetFlag( FL_USE_COPPER_THICKNESS ) -// || GetFlag( FL_USE_REALISTIC_MODE ) - ; + bool use_thickness = GetFlag( FL_USE_COPPER_THICKNESS ); + return use_thickness ? - KiROUND( m_CopperThickness / m_BiuTo3Dunits ) + KiROUND( m_copperThickness / m_BiuTo3Dunits ) : 0; } @@ -161,7 +161,7 @@ public: INFO3D_VISU(); */ int GetEpoxyThicknessBIU() const { - return KiROUND( m_EpoxyThickness / m_BiuTo3Dunits ); + return KiROUND( m_epoxyThickness / m_BiuTo3Dunits ); } /** @@ -177,7 +177,7 @@ public: INFO3D_VISU(); // || GetFlag( FL_USE_REALISTIC_MODE ) ; return use_thickness ? - KiROUND( m_NonCopperLayerThickness / m_BiuTo3Dunits ) + KiROUND( m_nonCopperLayerThickness / m_BiuTo3Dunits ) : 0; } @@ -197,6 +197,7 @@ public: INFO3D_VISU(); } bool IsRealisticMode() { return GetFlag( FL_USE_REALISTIC_MODE ); } + bool HightQualityMode() { return GetFlag( FL_USE_MAXQUALITY_IN_REALISTIC_MODE ); } }; extern INFO3D_VISU g_Parm_3D_Visu; diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 9e1fa03ba4..5bb01cfdf5 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -208,7 +208,7 @@ TOOL_ACTION COMMON_ACTIONS::layerBottom( "pcbnew.Control.layerBottom", "", "" ); TOOL_ACTION COMMON_ACTIONS::layerNext( "pcbnew.Control.layerNext", - AS_GLOBAL, '=', + AS_GLOBAL, '+', "", "" ); TOOL_ACTION COMMON_ACTIONS::layerPrev( "pcbnew.Control.layerPrev", From e46780f89fbd1ba210860bf82a709cacbe1d4b79 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 22 Jul 2014 09:50:40 +0200 Subject: [PATCH 714/741] Modules loaded by the module editor are placed in the world origin (GAL). --- pcbnew/librairi.cpp | 4 ++++ pcbnew/loadcmp.cpp | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/pcbnew/librairi.cpp b/pcbnew/librairi.cpp index b793856792..502b8c2fce 100644 --- a/pcbnew/librairi.cpp +++ b/pcbnew/librairi.cpp @@ -272,6 +272,10 @@ MODULE* FOOTPRINT_EDIT_FRAME::Import_Module() // Display info : SetMsgPanel( module ); PlaceModule( module, NULL ); + + if( IsGalCanvasActive() ) + module->SetPosition( wxPoint( 0, 0 ) ); + GetBoard()->m_Status_Pcb = 0; GetBoard()->BuildListOfNets(); updateView(); diff --git a/pcbnew/loadcmp.cpp b/pcbnew/loadcmp.cpp index 6d6f6395b7..6ef9ba91ec 100644 --- a/pcbnew/loadcmp.cpp +++ b/pcbnew/loadcmp.cpp @@ -276,7 +276,12 @@ MODULE* PCB_BASE_FRAME::LoadModuleFromLibrary( const wxString& aLibrary, module->SetFlags( IS_NEW ); module->SetLink( 0 ); - module->SetPosition( curspos ); + + if( IsGalCanvasActive() ) + module->SetPosition( wxPoint( 0, 0 ) ); // cursor in GAL may not be initialized at the moment + else + module->SetPosition( curspos ); + module->SetTimeStamp( GetNewTimeStamp() ); GetBoard()->m_Status_Pcb = 0; From 580a1a6aa0d277af90549470c1317d524c1ac400 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 23 Jul 2014 12:28:48 +0200 Subject: [PATCH 715/741] ModEdit: fix some issues due to the fact legacy footprint libraries cannot handle 32 copper layers, and are therefore no more editable: * in file/library save as..., remove option to save a lib under the legacy format (which is not possible and creates an error message) * if the current loaded lib is a legacy lib, when the user try to save or delete a footprint, displays a message which explains what the user should do. * add a suitable dialog to select/create a .pretty folder library (a file dialog or a dir dialog coming from wxWidgets is not friendly usable.) --- pcbnew/CMakeLists.txt | 2 + pcbnew/dialogs/dialog_select_pretty_lib.cpp | 46 ++ pcbnew/dialogs/dialog_select_pretty_lib.h | 52 ++ .../dialogs/dialog_select_pretty_lib_base.cpp | 66 ++ .../dialogs/dialog_select_pretty_lib_base.fbp | 565 ++++++++++++++++++ .../dialogs/dialog_select_pretty_lib_base.h | 58 ++ pcbnew/librairi.cpp | 85 ++- 7 files changed, 843 insertions(+), 31 deletions(-) create mode 100644 pcbnew/dialogs/dialog_select_pretty_lib.cpp create mode 100644 pcbnew/dialogs/dialog_select_pretty_lib.h create mode 100644 pcbnew/dialogs/dialog_select_pretty_lib_base.cpp create mode 100644 pcbnew/dialogs/dialog_select_pretty_lib_base.fbp create mode 100644 pcbnew/dialogs/dialog_select_pretty_lib_base.h diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 875b75076e..ab7f49f4de 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -118,6 +118,8 @@ set( PCBNEW_DIALOGS dialogs/dialog_mask_clearance_base.cpp dialogs/dialog_SVG_print.cpp dialogs/dialog_SVG_print_base.cpp + dialogs/dialog_select_pretty_lib.cpp + dialogs/dialog_select_pretty_lib_base.cpp dialogs/dialog_set_grid.cpp dialogs/dialog_set_grid_base.cpp dialogs/dialog_target_properties_base.cpp diff --git a/pcbnew/dialogs/dialog_select_pretty_lib.cpp b/pcbnew/dialogs/dialog_select_pretty_lib.cpp new file mode 100644 index 0000000000..c080855c27 --- /dev/null +++ b/pcbnew/dialogs/dialog_select_pretty_lib.cpp @@ -0,0 +1,46 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 Jean-Pierre Charras, jp.charras at wanadoo.fr + * Copyright (C) 1992-2014 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 dialog_select_pretty_lib.cpp + * @brief A dialog to select/create a .pretty folder which is a + * footprint library. + * footprints are .kicad_mod files inside this folder + */ + +#include + + +DIALOG_SELECT_PRETTY_LIB::DIALOG_SELECT_PRETTY_LIB( wxWindow* parent ) + :DIALOG_SELECT_PRETTY_LIB_BASE( parent ) +{ + m_dirCtrl->SetPath( wxGetCwd() ); +} + + +void DIALOG_SELECT_PRETTY_LIB::OnSelectFolder( wxTreeEvent& event ) +{ + m_libName->SetValue( m_dirCtrl->GetPath() ); +} diff --git a/pcbnew/dialogs/dialog_select_pretty_lib.h b/pcbnew/dialogs/dialog_select_pretty_lib.h new file mode 100644 index 0000000000..a1f1c59f32 --- /dev/null +++ b/pcbnew/dialogs/dialog_select_pretty_lib.h @@ -0,0 +1,52 @@ +#ifndef __DIALOG_SELECT_PRETTY_LIB_H__ +#define __DIALOG_SELECT_PRETTY_LIB_H__ + +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 Jean-Pierre Charras, jp.charras at wanadoo.fr + * Copyright (C) 1992-2014 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 dialog_select_pretty_lib.h + * @brief A dialog to select/create a .pretty folder which is a + * footprint library. + * footprints are .kicad_mod files inside this folder + */ + +#include + + +class DIALOG_SELECT_PRETTY_LIB : public DIALOG_SELECT_PRETTY_LIB_BASE +{ +public: + DIALOG_SELECT_PRETTY_LIB( wxWindow* parent ); + ~DIALOG_SELECT_PRETTY_LIB() {}; + + const wxString GetPath() { return m_libName->GetValue(); } + +private: + virtual void OnSelectFolder( wxTreeEvent& event ); +}; + + +#endif //__DIALOG_SELECT_PRETTY_LIB_BASE_H__ diff --git a/pcbnew/dialogs/dialog_select_pretty_lib_base.cpp b/pcbnew/dialogs/dialog_select_pretty_lib_base.cpp new file mode 100644 index 0000000000..58dd0f65b6 --- /dev/null +++ b/pcbnew/dialogs/dialog_select_pretty_lib_base.cpp @@ -0,0 +1,66 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Nov 6 2013) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "dialog_select_pretty_lib_base.h" + +/////////////////////////////////////////////////////////////////////////// + +DIALOG_SELECT_PRETTY_LIB_BASE::DIALOG_SELECT_PRETTY_LIB_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxSize( 400,300 ), wxDefaultSize ); + + wxBoxSizer* bSizerMain; + bSizerMain = new wxBoxSizer( wxVERTICAL ); + + m_staticText = new wxStaticText( this, wxID_ANY, _("The footprint library is a folder with a name ending by .pretty\nFootprints are .kicad_mod files inside this folder."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText->Wrap( -1 ); + m_staticText->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) ); + + bSizerMain->Add( m_staticText, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_dirCtrl = new wxGenericDirCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDIRCTRL_3D_INTERNAL|wxDIRCTRL_DIR_ONLY|wxSUNKEN_BORDER, wxEmptyString, 0 ); + + m_dirCtrl->ShowHidden( false ); + bSizerMain->Add( m_dirCtrl, 1, wxEXPAND | wxALL, 5 ); + + m_staticTextDirname = new wxStaticText( this, wxID_ANY, _("Library (.pretty folder)"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextDirname->Wrap( -1 ); + bSizerMain->Add( m_staticTextDirname, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_libName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizerMain->Add( m_libName, 0, wxALL|wxEXPAND, 5 ); + + m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizerMain->Add( m_staticline1, 0, wxEXPAND | 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, wxALIGN_RIGHT, 5 ); + + + this->SetSizer( bSizerMain ); + this->Layout(); + + this->Centre( wxBOTH ); + + // Connect Events + m_dirCtrl->Connect( wxEVT_COMMAND_TREE_ITEM_ACTIVATED, wxTreeEventHandler( DIALOG_SELECT_PRETTY_LIB_BASE::OnSelectFolder ), NULL, this ); + m_dirCtrl->Connect( wxEVT_COMMAND_TREE_SEL_CHANGED, wxTreeEventHandler( DIALOG_SELECT_PRETTY_LIB_BASE::OnSelectFolder ), NULL, this ); +} + +DIALOG_SELECT_PRETTY_LIB_BASE::~DIALOG_SELECT_PRETTY_LIB_BASE() +{ + // Disconnect Events + m_dirCtrl->Disconnect( wxEVT_COMMAND_TREE_ITEM_ACTIVATED, wxTreeEventHandler( DIALOG_SELECT_PRETTY_LIB_BASE::OnSelectFolder ), NULL, this ); + m_dirCtrl->Disconnect( wxEVT_COMMAND_TREE_SEL_CHANGED, wxTreeEventHandler( DIALOG_SELECT_PRETTY_LIB_BASE::OnSelectFolder ), NULL, this ); + +} diff --git a/pcbnew/dialogs/dialog_select_pretty_lib_base.fbp b/pcbnew/dialogs/dialog_select_pretty_lib_base.fbp new file mode 100644 index 0000000000..bac0e1981b --- /dev/null +++ b/pcbnew/dialogs/dialog_select_pretty_lib_base.fbp @@ -0,0 +1,565 @@ + + + + + + C++ + 1 + source_name + 0 + 0 + res + UTF-8 + connect + dialog_select_pretty_lib_base + 1000 + none + 1 + dialog_select_pretty_lib_base + + . + + 1 + 1 + 1 + 1 + UI + 0 + 0 + + 0 + wxAUI_MGR_DEFAULT + + wxBOTH + + 1 + 1 + impl_virtual + + + + 0 + wxID_ANY + + 400,300 + DIALOG_SELECT_PRETTY_LIB_BASE + + 400,300 + wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER + + Select Footprint Library Folder + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizerMain + wxVERTICAL + none + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,92,-1,70,0 + 0 + 0 + wxID_ANY + The footprint library is a folder with a name ending by .pretty Footprints are .kicad_mod files inside this folder. + + 0 + + + 0 + + 1 + m_staticText + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + + Dock + 0 + Left + 1 + + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_dirCtrl + 1 + + + protected + 1 + + Resizable + 1 + 0 + + wxDIRCTRL_3D_INTERNAL|wxDIRCTRL_DIR_ONLY + + 0 + + + + wxSUNKEN_BORDER + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnSelectFolder + + + + + + + + + OnSelectFolder + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Library (.pretty folder) + + 0 + + + 0 + + 1 + m_staticTextDirname + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_libName + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + wxALIGN_RIGHT + 0 + + 0 + 1 + 0 + 0 + 0 + 1 + 0 + 0 + + m_sdbSizer + protected + + + + + + + + + + + + + + diff --git a/pcbnew/dialogs/dialog_select_pretty_lib_base.h b/pcbnew/dialogs/dialog_select_pretty_lib_base.h new file mode 100644 index 0000000000..b1d7eb2aaf --- /dev/null +++ b/pcbnew/dialogs/dialog_select_pretty_lib_base.h @@ -0,0 +1,58 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Nov 6 2013) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __DIALOG_SELECT_PRETTY_LIB_BASE_H__ +#define __DIALOG_SELECT_PRETTY_LIB_BASE_H__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class DIALOG_SELECT_PRETTY_LIB_BASE +/////////////////////////////////////////////////////////////////////////////// +class DIALOG_SELECT_PRETTY_LIB_BASE : public wxDialog +{ + private: + + protected: + wxStaticText* m_staticText; + wxGenericDirCtrl* m_dirCtrl; + wxStaticText* m_staticTextDirname; + wxTextCtrl* m_libName; + wxStaticLine* m_staticline1; + wxStdDialogButtonSizer* m_sdbSizer; + wxButton* m_sdbSizerOK; + wxButton* m_sdbSizerCancel; + + // Virtual event handlers, overide them in your derived class + virtual void OnSelectFolder( wxTreeEvent& event ) { event.Skip(); } + + + public: + + DIALOG_SELECT_PRETTY_LIB_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Select Footprint Library Folder"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 400,300 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DIALOG_SELECT_PRETTY_LIB_BASE(); + +}; + +#endif //__DIALOG_SELECT_PRETTY_LIB_BASE_H__ diff --git a/pcbnew/librairi.cpp b/pcbnew/librairi.cpp index 502b8c2fce..efe27218e4 100644 --- a/pcbnew/librairi.cpp +++ b/pcbnew/librairi.cpp @@ -52,11 +52,13 @@ #include #include +#include + // unique, "file local" translations: #define FMT_OK_OVERWRITE _( "Library '%s' exists, OK to replace ?" ) -#define FMT_CREATE_LIB _( "Create New Library" ) +#define FMT_CREATE_LIB _( "Create New Library Folder (the .pretty Library is the folder)" ) #define FMT_OK_DELETE _( "OK to delete module %s in library '%s'" ) #define FMT_IMPORT_MODULE _( "Import Footprint" ) #define FMT_FILE_NOT_FOUND _( "File '%s' not found" ) @@ -74,22 +76,27 @@ #define FMT_MOD_CREATE _( "New Footprint" ) #define FMT_NO_MODULES _( "No footprints to archive!" ) -#define FMT_LIBRARY _( "Library" ) // window title #define FMT_MOD_EXISTS _( "Footprint %s already exists in library '%s'" ) #define FMT_NO_REF_ABORTED _( "No footprint name defined." ) #define FMT_SELECT_LIB _( "Select Library" ) +static const wxString INFO_LEGACY_LIB_WARN_EDIT( + _( "Writing/modifying legacy libraries (.mod files) is not allowed\n"\ + "Please save the current library to the new .pretty format\n"\ + "and update your footprint lib table\n"\ + "to save your footprint (a .kicad_mod file) in the .pretty library folder" ) ); -static const wxString ModExportFileWildcard( _( "KiCad foot print export files (*.emp)|*.emp" ) ); +static const wxString INFO_LEGACY_LIB_WARN_DELETE( + _( "Modifying legacy libraries (.mod files) is not allowed\n"\ + "Please save the current library under the new .pretty format\n"\ + "before deleting a footprint" ) ); + +static const wxString ModLegacyExportFileWildcard( _( "Legacy foot print export files (*.emp)|*.emp" ) ); static const wxString ModImportFileWildcard( _( "GPcb foot print files (*)|*" ) ); -#define BACKUP_EXT wxT( "bak" ) -#define FILETMP_EXT wxT( "$$$" ) #define EXPORT_IMPORT_LASTPATH_KEY wxT( "import_last_path" ) -const wxString ModExportFileExtension( wxT( "emp" ) ); - MODULE* FOOTPRINT_EDIT_FRAME::Import_Module() { @@ -107,7 +114,7 @@ MODULE* FOOTPRINT_EDIT_FRAME::Import_Module() wxString wildCard; wildCard << wxGetTranslation( KiCadFootprintLibFileWildcard ) << wxChar( '|' ) - << wxGetTranslation( ModExportFileWildcard ) << wxChar( '|' ) + << wxGetTranslation( ModLegacyExportFileWildcard ) << wxChar( '|' ) << wxGetTranslation( ModImportFileWildcard ) << wxChar( '|' ) << wxGetTranslation( GedaPcbFootprintLibFileWildcard ); @@ -349,13 +356,19 @@ void FOOTPRINT_EDIT_FRAME::Export_Module( MODULE* aModule ) DisplayInfoMessage( this, msg ); } - bool FOOTPRINT_EDIT_FRAME::SaveCurrentModule( const wxString* aLibPath ) { wxString libPath = aLibPath ? *aLibPath : getLibPath(); IO_MGR::PCB_FILE_T piType = IO_MGR::GuessPluginTypeFromLibPath( libPath ); + // Legacy libraries are readable, but writing legacy format is not allowed + if( piType == IO_MGR::LEGACY ) + { + DisplayInfoMessage( this, INFO_LEGACY_LIB_WARN_EDIT ); + return false; + } + try { PLUGIN::RELEASER pi( IO_MGR::PluginFind( piType ) ); @@ -370,7 +383,6 @@ bool FOOTPRINT_EDIT_FRAME::SaveCurrentModule( const wxString* aLibPath ) return true; } - wxString FOOTPRINT_EDIT_FRAME::CreateNewLibrary() { wxFileName fn; @@ -383,19 +395,14 @@ wxString FOOTPRINT_EDIT_FRAME::CreateNewLibrary() fn.SetPath( path ); } - wxString wildcard; + // Kicad cannot write legacy format libraries, only .pretty new format + // because the legacy format cannot handle current features. + // The lib is actually a directory + wxString wildcard = wxGetTranslation( KiCadFootprintLibPathWildcard ); -// wildcard << wxGetTranslation( LegacyFootprintLibPathWildcard ) << wxChar( '|' ) -// << wxGetTranslation( KiCadFootprintLibPathWildcard ); - wildcard << wxGetTranslation( KiCadFootprintLibPathWildcard ) << wxChar( '|' ) - << wxGetTranslation( LegacyFootprintLibPathWildcard ); - - // prompt user for libPath and PLUGIN (library) type - wxFileDialog dlg( this, FMT_CREATE_LIB, fn.GetPath(), wxEmptyString, - wildcard, wxFD_SAVE - // | wxFD_OVERWRITE_PROMPT overwrite is tested below - // after file extension has been added. - ); + // prompt user for libPath +// wxDirDialog dlg( this, FMT_CREATE_LIB, fn.GetPath(), wxDD_DEFAULT_STYLE ); + DIALOG_SELECT_PRETTY_LIB dlg( this ); if( dlg.ShowModal() == wxID_CANCEL ) return wxEmptyString; @@ -408,17 +415,10 @@ wxString FOOTPRINT_EDIT_FRAME::CreateNewLibrary() } // wildcard's filter index has legacy in position 0. - IO_MGR::PCB_FILE_T piType = ( dlg.GetFilterIndex() == 1 ) ? IO_MGR::LEGACY : IO_MGR::KICAD; + IO_MGR::PCB_FILE_T piType = IO_MGR::KICAD; // wxFileDialog does not supply nor enforce the file extension, add it here. - if( piType == IO_MGR::LEGACY ) - { - fn.SetExt( LegacyFootprintLibPathExtension ); - } - else - { - fn.SetExt( KiCadFootprintLibPathExtension ); - } + fn.SetExt( KiCadFootprintLibPathExtension ); wxString libPath = fn.GetFullPath(); @@ -474,6 +474,17 @@ bool FOOTPRINT_EDIT_FRAME::DeleteModuleFromCurrentLibrary() { wxString nickname = GetCurrentLib(); + // Legacy libraries are readable, but modifying legacy format is not allowed + // So prompt the user if he try to delete a footprint from a legacy lib + wxString libfullname = Prj().PcbFootprintLibs()->FindRow(nickname)->GetFullURI(); + IO_MGR::PCB_FILE_T piType = IO_MGR::GuessPluginTypeFromLibPath( libfullname ); + + if( piType == IO_MGR::LEGACY ) + { + DisplayInfoMessage( this, INFO_LEGACY_LIB_WARN_DELETE ); + return false; + } + if( !Prj().PcbFootprintLibs()->IsFootprintLibWritable( nickname ) ) { wxString msg = wxString::Format( @@ -591,6 +602,18 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibrary, SetMsgPanel( aModule ); + + // Legacy libraries are readable, but modifying legacy format is not allowed + // So prompt the user if he try to add/replace a footprint in a legacy lib + wxString libfullname = Prj().PcbFootprintLibs()->FindRow( aLibrary )->GetFullURI(); + IO_MGR::PCB_FILE_T piType = IO_MGR::GuessPluginTypeFromLibPath( libfullname ); + + if( piType == IO_MGR::LEGACY ) + { + DisplayInfoMessage( this, INFO_LEGACY_LIB_WARN_EDIT ); + return false; + } + // Ask what to use as the footprint name in the library wxString footprintName = aModule->GetFPID().GetFootprintName(); From 4fc4ea61474ce09816febf6e625ee5addb6b432d Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 23 Jul 2014 12:48:30 +0200 Subject: [PATCH 716/741] Make some system error messages not translatable. Better comments in some dialogs. --- common/gal/opengl/opengl_compositor.cpp | 18 +++++++++--------- pcbnew/dialogs/dialog_plot_base.cpp | 2 +- pcbnew/dialogs/dialog_plot_base.fbp | 2 +- pcbnew/librairi.cpp | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/common/gal/opengl/opengl_compositor.cpp b/common/gal/opengl/opengl_compositor.cpp index 2843204d78..26b136bbbc 100644 --- a/common/gal/opengl/opengl_compositor.cpp +++ b/common/gal/opengl/opengl_compositor.cpp @@ -98,7 +98,7 @@ unsigned int OPENGL_COMPOSITOR::CreateBuffer() if( usedBuffers() >= maxBuffers ) { - DisplayError( NULL, _( "Cannot create more framebuffers. OpenGL rendering " + DisplayError( NULL, wxT( "Cannot create more framebuffers. OpenGL rendering " "backend requires at least 3 framebuffers. You may try to update/change " "your graphic drivers." ) ); return 0; // Unfortunately we have no more free buffers left @@ -133,38 +133,38 @@ unsigned int OPENGL_COMPOSITOR::CreateBuffer() switch( status ) { case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT: - DisplayError( NULL, _( "Cannot create the framebuffer." ) ); + DisplayError( NULL,wxT( "Cannot create the framebuffer." ) ); break; case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT: - DisplayError( NULL, _( "The framebuffer attachment points are incomplete." ) ); + DisplayError( NULL, wxT( "The framebuffer attachment points are incomplete." ) ); break; case GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT: - DisplayError( NULL, _( "The framebuffer does not have at least " + DisplayError( NULL, wxT( "The framebuffer does not have at least " "one image attached to it." ) ); break; case GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT: - DisplayError( NULL, _( "The framebuffer read buffer is incomplete." ) ); + DisplayError( NULL, wxT( "The framebuffer read buffer is incomplete." ) ); break; case GL_FRAMEBUFFER_UNSUPPORTED_EXT: - DisplayError( NULL, _( "The combination of internal formats of the attached images " + DisplayError( NULL, wxT( "The combination of internal formats of the attached images " "violates an implementation-dependent set of restrictions." ) ); break; case GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT: - DisplayError( NULL, _( "GL_RENDERBUFFER_SAMPLES is not the same " + DisplayError( NULL, wxT( "GL_RENDERBUFFER_SAMPLES is not the same " "for all attached renderbuffers" ) ); break; case GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT: - DisplayError( NULL, _( "Framebuffer incomplete layer targets errors." ) ); + DisplayError( NULL, wxT( "Framebuffer incomplete layer targets errors." ) ); break; default: - DisplayError( NULL, _( "Cannot create the framebuffer." ) ); + DisplayError( NULL, wxT( "Cannot create the framebuffer." ) ); break; } diff --git a/pcbnew/dialogs/dialog_plot_base.cpp b/pcbnew/dialogs/dialog_plot_base.cpp index c0b2d82c65..fb2f7ed3c1 100644 --- a/pcbnew/dialogs/dialog_plot_base.cpp +++ b/pcbnew/dialogs/dialog_plot_base.cpp @@ -230,7 +230,7 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr bSizerGbrOpt->Add( m_useGerberExtensions, 0, wxALL, 2 ); m_useGerberAttributes = new wxCheckBox( this, wxID_ANY, _("Include extended attributes"), wxDefaultPosition, wxDefaultSize, 0 ); - m_useGerberAttributes->SetToolTip( _("Include extended attributes for non-image data in the Gerber file") ); + m_useGerberAttributes->SetToolTip( _("Include extended attributes (X2 Gerber files format) in the Gerber file") ); bSizerGbrOpt->Add( m_useGerberAttributes, 0, wxALL, 2 ); diff --git a/pcbnew/dialogs/dialog_plot_base.fbp b/pcbnew/dialogs/dialog_plot_base.fbp index 2326520795..e460059ba5 100644 --- a/pcbnew/dialogs/dialog_plot_base.fbp +++ b/pcbnew/dialogs/dialog_plot_base.fbp @@ -2841,7 +2841,7 @@ 0 - Include extended attributes for non-image data in the Gerber file + Include extended attributes (X2 Gerber files format) in the Gerber file wxFILTER_NONE wxDefaultValidator diff --git a/pcbnew/librairi.cpp b/pcbnew/librairi.cpp index efe27218e4..9174f7dcbe 100644 --- a/pcbnew/librairi.cpp +++ b/pcbnew/librairi.cpp @@ -58,7 +58,7 @@ // unique, "file local" translations: #define FMT_OK_OVERWRITE _( "Library '%s' exists, OK to replace ?" ) -#define FMT_CREATE_LIB _( "Create New Library Folder (the .pretty Library is the folder)" ) +#define FMT_CREATE_LIB _( "Create New Library Folder (the .pretty folder is the library)" ) #define FMT_OK_DELETE _( "OK to delete module %s in library '%s'" ) #define FMT_IMPORT_MODULE _( "Import Footprint" ) #define FMT_FILE_NOT_FOUND _( "File '%s' not found" ) From 1d378cfcd15f72df5392c036599f5eacaeb102aa Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 23 Jul 2014 12:06:24 +0200 Subject: [PATCH 717/741] View is automatically centered when a module editor or viewer are opened (GAL). --- common/gal/cairo/cairo_compositor.cpp | 4 ++-- pcbnew/moduleframe.cpp | 2 +- pcbnew/modview_frame.cpp | 22 ++++------------------ pcbnew/tools/pcbnew_control.cpp | 4 +++- 4 files changed, 10 insertions(+), 22 deletions(-) diff --git a/common/gal/cairo/cairo_compositor.cpp b/common/gal/cairo/cairo_compositor.cpp index 5afa67d55a..d94b19b3c0 100644 --- a/common/gal/cairo/cairo_compositor.cpp +++ b/common/gal/cairo/cairo_compositor.cpp @@ -55,8 +55,8 @@ void CAIRO_COMPOSITOR::Resize( unsigned int aWidth, unsigned int aHeight ) { clean(); - assert( m_width > 0 ); - assert( m_height > 0 ); + assert( aWidth > 0 ); + assert( aHeight > 0 ); m_width = aWidth; m_height = aHeight; diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index 58dc823b44..88212e408a 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -696,6 +696,6 @@ void FOOTPRINT_EDIT_FRAME::updateTitle() void FOOTPRINT_EDIT_FRAME::updateView() { static_cast( GetGalCanvas() )->DisplayBoard( GetBoard() ); - m_toolManager->RunAction( COMMON_ACTIONS::zoomFitScreen ); m_toolManager->ResetTools( TOOL_BASE::MODEL_RELOAD ); + m_toolManager->RunAction( COMMON_ACTIONS::zoomFitScreen, true ); } diff --git a/pcbnew/modview_frame.cpp b/pcbnew/modview_frame.cpp index d83e220234..29c194b75e 100644 --- a/pcbnew/modview_frame.cpp +++ b/pcbnew/modview_frame.cpp @@ -884,24 +884,10 @@ void FOOTPRINT_VIEWER_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg ) void FOOTPRINT_VIEWER_FRAME::updateView() { - static_cast( GetGalCanvas() )->DisplayBoard( GetBoard() ); - - m_Pcb->ComputeBoundingBox( false ); - EDA_RECT boardBbox = m_Pcb->GetBoundingBox(); - BOX2D bbox; - - // Autozoom - if( boardBbox.GetSize().x > 0 && boardBbox.GetSize().y > 0 ) + if( IsGalCanvasActive() ) { - bbox.SetOrigin( VECTOR2D( boardBbox.GetOrigin() ) ); - bbox.SetSize( VECTOR2D( boardBbox.GetSize() ) ); + static_cast( GetGalCanvas() )->DisplayBoard( GetBoard() ); + m_toolManager->ResetTools( TOOL_BASE::MODEL_RELOAD ); + m_toolManager->RunAction( COMMON_ACTIONS::zoomFitScreen, true ); } - else - { - // Default empty view - bbox.SetOrigin( VECTOR2D( -1000, -1000 ) ); - bbox.SetSize( VECTOR2D( 2000, 2000 ) ); - } - - GetGalCanvas()->GetView()->SetViewport( bbox ); } diff --git a/pcbnew/tools/pcbnew_control.cpp b/pcbnew/tools/pcbnew_control.cpp index a0573b3118..da1d028aca 100644 --- a/pcbnew/tools/pcbnew_control.cpp +++ b/pcbnew/tools/pcbnew_control.cpp @@ -109,7 +109,9 @@ int PCBNEW_CONTROL::ZoomFitScreen( TOOL_EVENT& aEvent ) { KIGFX::VIEW* view = m_frame->GetGalCanvas()->GetView(); KIGFX::GAL* gal = m_frame->GetGalCanvas()->GetGAL(); - BOX2I boardBBox = getModel()->ViewBBox(); + BOARD* board = getModel(); + board->ComputeBoundingBox(); + BOX2I boardBBox = board->ViewBBox(); if( boardBBox.GetSize().x == 0 || boardBBox.GetSize().y == 0 ) { From bde2a0a1bec551b85d3b286249b2e19712316163 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 23 Jul 2014 15:01:23 +0200 Subject: [PATCH 718/741] Pcbnew: fix issue for "one file per layer" option in "Export SVG file" --- pcbnew/dialogs/dialog_SVG_print.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pcbnew/dialogs/dialog_SVG_print.cpp b/pcbnew/dialogs/dialog_SVG_print.cpp index 6ba70d8baa..5e90b3bfa3 100644 --- a/pcbnew/dialogs/dialog_SVG_print.cpp +++ b/pcbnew/dialogs/dialog_SVG_print.cpp @@ -279,7 +279,7 @@ void DIALOG_SVG_PRINT::ExportSVGFile( bool aOnlyOneFile ) if( !EnsureOutputDirectory( &outputDir, boardFilename, &reporter ) ) { wxString msg = wxString::Format( - _( "Could not write plot files to folder \"%s\"." ), + _( "Could not write plot files to folder '%s'." ), GetChars( outputDir.GetPath() ) ); DisplayError( this, msg ); @@ -302,7 +302,7 @@ void DIALOG_SVG_PRINT::ExportSVGFile( bool aOnlyOneFile ) BuildPlotFileName( &fn, outputDir.GetPath(), suffix, SVGFileExtension ); - m_printMaskLayer = aOnlyOneFile ? LSET( layer ) : all_selected; + m_printMaskLayer = aOnlyOneFile ? all_selected : LSET( layer ); if( m_PrintBoardEdgesCtrl->IsChecked() ) m_printMaskLayer.set( Edge_Cuts ); @@ -310,13 +310,13 @@ void DIALOG_SVG_PRINT::ExportSVGFile( bool aOnlyOneFile ) if( CreateSVGFile( fn.GetFullPath() ) ) { m_messagesBox->AppendText( - wxString::Format( _( "Plot: %s OK\n" ), GetChars( fn.GetFullPath() ) ) + wxString::Format( _( "Plot: '%s' OK\n" ), GetChars( fn.GetFullPath() ) ) ); } else // Error { m_messagesBox->AppendText( - wxString::Format( _( "** Unable to create %s **\n" ), GetChars( fn.GetFullPath() ) ) + wxString::Format( _( "** Unable to create '%s'**\n" ), GetChars( fn.GetFullPath() ) ) ); } From c1f11a1bd184d31be7f170eafd380aaa26cf4705 Mon Sep 17 00:00:00 2001 From: Andrew Zonenberg Date: Wed, 23 Jul 2014 11:27:52 -0500 Subject: [PATCH 719/741] Draw VIAs only if a layer they penetrate is visible. --- pcbnew/class_pcb_layer_widget.cpp | 1 + pcbnew/class_track.cpp | 17 ++++++++--------- pcbnew/pcb_painter.cpp | 5 +++++ 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/pcbnew/class_pcb_layer_widget.cpp b/pcbnew/class_pcb_layer_widget.cpp index e975ea3430..f03b0d87ce 100644 --- a/pcbnew/class_pcb_layer_widget.cpp +++ b/pcbnew/class_pcb_layer_widget.cpp @@ -413,6 +413,7 @@ void PCB_LAYER_WIDGET::OnLayerVisible( int aLayer, bool isVisible, bool isFinal { KIGFX::VIEW* view = galCanvas->GetView(); view->SetLayerVisible( aLayer, isVisible ); + view->RecacheAllItems( true ); } if( isFinal ) diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index 08d7aea310..18059d5a4e 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -393,17 +393,12 @@ LSET VIA::GetLayerSet() const // VIA_BLIND_BURIED or VIA_MICRVIA: - LAYER_ID bottom_layer, top_layer; - - // LayerPair() knows how layers are stored - LayerPair( &top_layer, &bottom_layer ); - LSET layermask; - wxASSERT( top_layer <= bottom_layer ); + wxASSERT( m_Layer <= m_BottomLayer ); // LAYER_IDs are numbered from front to back, this is top to bottom. - for( LAYER_NUM id = top_layer; id <= bottom_layer; ++id ) + for( LAYER_NUM id = m_Layer; id <= m_BottomLayer; ++id ) { layermask.set( id ); } @@ -780,13 +775,17 @@ void VIA::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, GRSetDrawMode( aDC, aDrawMode ); - BOARD * brd = GetBoard( ); - EDA_COLOR_T color = brd->GetVisibleElementColor(VIAS_VISIBLE + GetViaType()); + BOARD * brd = GetBoard(); + EDA_COLOR_T color = brd->GetVisibleElementColor( VIAS_VISIBLE + GetViaType() ); if( brd->IsElementVisible( PCB_VISIBLE(VIAS_VISIBLE + GetViaType()) ) == false && ( color & HIGHLIGHT_FLAG ) != HIGHLIGHT_FLAG ) return; + // Only draw the via if at least one of the layers it crosses is being displayed + if( !( brd->GetVisibleLayers() & GetLayerSet() ).any() ) + return; + if( DisplayOpt.ContrastModeDisplay ) { if( !IsOnLayer( curr_layer ) ) diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index a1eb3f77af..3b01c0d902 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -336,6 +336,11 @@ void PCB_PAINTER::draw( const VIA* aVia, int aLayer ) VECTOR2D center( aVia->GetStart() ); double radius; + // Only draw the via if at least one of the layers it crosses is being displayed + BOARD* brd = aVia->GetBoard( ); + if( !( brd->GetVisibleLayers() & aVia->GetLayerSet() ).any() ) + return; + // Choose drawing settings depending on if we are drawing via's pad or hole if( aLayer == ITEM_GAL_LAYER( VIA_THROUGH_VISIBLE ) ) { From 13b0784cd59463b001f5877f1c153d88e7539941 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 24 Jul 2014 08:43:23 +0200 Subject: [PATCH 720/741] Fix overflow in track len calculations and display (Bug #1347878). --- pcbnew/class_board.cpp | 4 ++-- pcbnew/class_track.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index 6496692a47..b51657ff0a 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -1878,10 +1878,10 @@ TRACK* BOARD::MarkTrace( TRACK* aTrace, int* aCount, } if( aTraceLength ) - *aTraceLength = KiROUND( full_len ); + *aTraceLength = full_len; if( aPadToDieLength ) - *aPadToDieLength = KiROUND( lenPadToDie ); + *aPadToDieLength = lenPadToDie; if( aCount ) *aCount = NbSegmBusy; diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index 18059d5a4e..d190a9449f 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -1002,7 +1002,7 @@ void TRACK::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) double trackLen = 0; double lenPadToDie = 0; board->MarkTrace( this, NULL, &trackLen, &lenPadToDie, false ); - msg = ::CoordinateToString( trackLen ); + msg = ::LengthDoubleToString( trackLen ); aList.push_back( MSG_PANEL_ITEM( _( "Track Len" ), msg, DARKCYAN ) ); if( lenPadToDie != 0 ) From 893618bf3f07eb539f76a2a0dc677da4b870ef9b Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 24 Jul 2014 13:09:16 +0200 Subject: [PATCH 721/741] Fixed a hot key conflict. --- common/tool/action_manager.cpp | 9 +++++++++ pcbnew/tools/common_actions.cpp | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/common/tool/action_manager.cpp b/common/tool/action_manager.cpp index a64ab9e1d5..91d5c4d7df 100644 --- a/common/tool/action_manager.cpp +++ b/common/tool/action_manager.cpp @@ -58,6 +58,15 @@ void ACTION_MANAGER::RegisterAction( TOOL_ACTION* aAction ) m_actionNameIndex[aAction->m_name] = aAction; m_actionIdIndex[aAction->m_id] = aAction; +#ifndef NDEBUG + // Check if there are two global actions assigned to the same hotkey + if( aAction->GetScope() == AS_GLOBAL ) + { + BOOST_FOREACH( const TOOL_ACTION* action, m_actionHotKeys[aAction->m_currentHotKey] ) + assert( action->GetScope() != AS_GLOBAL ); + } +#endif /* not NDEBUG */ + if( aAction->HasHotKey() ) m_actionHotKeys[aAction->m_currentHotKey].push_back( aAction ); } diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 5bb01cfdf5..a239d27aa2 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -314,7 +314,7 @@ TOOL_ACTION COMMON_ACTIONS::moduleTextOutlines( "pcbnew.ModuleEditor.textOutline // Miscellaneous TOOL_ACTION COMMON_ACTIONS::selectionTool( "pcbnew.Control.selectionTool", - AS_GLOBAL, ' ', + AS_GLOBAL, 0, "", "", AF_ACTIVATE ); TOOL_ACTION COMMON_ACTIONS::resetCoords( "pcbnew.Control.resetCoords", From 6cc3addc681664c72ac452344b3de71bb1bf8e33 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 24 Jul 2014 19:36:26 +0200 Subject: [PATCH 722/741] Fix overflow in track len calculations and display (Bug #1347878), in high-light tool. --- pcbnew/class_netinfo_item.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pcbnew/class_netinfo_item.cpp b/pcbnew/class_netinfo_item.cpp index d4917568e6..4f54221a98 100644 --- a/pcbnew/class_netinfo_item.cpp +++ b/pcbnew/class_netinfo_item.cpp @@ -84,8 +84,8 @@ void NETINFO_ITEM::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) wxString txt; MODULE* module; D_PAD* pad; - double lengthnet = 0; // This is the lenght of tracks on pcb - double lengthPadToDie = 0; // this is the lenght of internal ICs connections + double lengthnet = 0.0; // This is the lenght of tracks on pcb + double lengthPadToDie = 0.0; // this is the lenght of internal ICs connections aList.push_back( MSG_PANEL_ITEM( _( "Net Name" ), GetNetname(), RED ) ); @@ -131,15 +131,15 @@ void NETINFO_ITEM::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) aList.push_back( MSG_PANEL_ITEM( _( "Vias" ), txt, BLUE ) ); // Displays the full net length (tracks on pcb + internal ICs connections ): - txt = ::CoordinateToString( lengthnet + lengthPadToDie ); + txt = ::LengthDoubleToString( lengthnet + lengthPadToDie ); aList.push_back( MSG_PANEL_ITEM( _( "Net Length:" ), txt, RED ) ); // Displays the net length of tracks only: - txt = ::CoordinateToString( lengthnet ); + txt = ::LengthDoubleToString( lengthnet ); aList.push_back( MSG_PANEL_ITEM( _( "On Board" ), txt, RED ) ); // Displays the net length of internal ICs connections (wires inside ICs): - txt = ::CoordinateToString( lengthPadToDie ); + txt = ::LengthDoubleToString( lengthPadToDie ); aList.push_back( MSG_PANEL_ITEM( _( "In Package" ), txt, RED ) ); } From 37757b5283b59bcef0c595358e05143fe9d87bea Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 25 Jul 2014 19:49:14 +0200 Subject: [PATCH 723/741] * Fix Bug #1348607 and a possible crash in libedit dialog component properties after moving up the first user field (which in not possible now). * better info message in pcbnew when trying to delete a footprint in legacy library --- common/common_plotPDF_functions.cpp | 3 ++- .../dialogs/dialog_edit_libentry_fields_in_lib.cpp | 11 ++++++----- pcbnew/librairi.cpp | 1 + 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/common/common_plotPDF_functions.cpp b/common/common_plotPDF_functions.cpp index 7de4a6bd6a..09821b902e 100644 --- a/common/common_plotPDF_functions.cpp +++ b/common/common_plotPDF_functions.cpp @@ -79,6 +79,8 @@ void PDF_PLOTTER::SetViewport( const wxPoint& aOffset, double aIusPerDecimil, // The CTM is set to 1 user unit per decimil iuPerDeviceUnit = 1.0 / aIusPerDecimil; + SetDefaultLineWidth( 100 / iuPerDeviceUnit ); // arbitrary default + /* The paper size in this engined is handled page by page Look in the StartPage function */ } @@ -511,7 +513,6 @@ void PDF_PLOTTER::StartPage() paperSize = pageInfo.GetSizeMils(); paperSize.x *= 10.0 / iuPerDeviceUnit; paperSize.y *= 10.0 / iuPerDeviceUnit; - SetDefaultLineWidth( 100 / iuPerDeviceUnit ); // arbitrary default // Open the content stream; the page object will go later pageStreamHandle = startPdfStream(); diff --git a/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp index 4378cc00c9..67d891b23f 100644 --- a/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp +++ b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp @@ -353,11 +353,10 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB:: moveUpButtonHandler( wxCommandEvent& e if( fieldNdx >= m_FieldsBuf.size() ) // traps the -1 case too return; - if( fieldNdx < MANDATORY_FIELDS ) - { - wxBell(); + // The first field which can be moved up is the second user field + // so any field which id <= MANDATORY_FIELDS cannot be moved up + if( fieldNdx <= MANDATORY_FIELDS ) return; - } if( !copyPanelToSelectedField() ) return; @@ -368,9 +367,11 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB:: moveUpButtonHandler( wxCommandEvent& e m_FieldsBuf[fieldNdx - 1] = m_FieldsBuf[fieldNdx]; setRowItem( fieldNdx - 1, m_FieldsBuf[fieldNdx] ); + m_FieldsBuf[fieldNdx - 1].SetId(fieldNdx - 1); m_FieldsBuf[fieldNdx] = tmp; setRowItem( fieldNdx, tmp ); + m_FieldsBuf[fieldNdx].SetId(fieldNdx); updateDisplay( ); @@ -665,7 +666,7 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::copySelectedFieldToPanel() // only user defined fields may be moved, and not the top most user defined // field since it would be moving up into the fixed fields, > not >= - moveUpButton->Enable( fieldNdx >= MANDATORY_FIELDS ); + moveUpButton->Enable( fieldNdx > MANDATORY_FIELDS ); // if fieldNdx == REFERENCE, VALUE, then disable delete button deleteFieldButton->Enable( fieldNdx >= MANDATORY_FIELDS ); diff --git a/pcbnew/librairi.cpp b/pcbnew/librairi.cpp index 9174f7dcbe..e28b6c84bd 100644 --- a/pcbnew/librairi.cpp +++ b/pcbnew/librairi.cpp @@ -89,6 +89,7 @@ static const wxString INFO_LEGACY_LIB_WARN_EDIT( static const wxString INFO_LEGACY_LIB_WARN_DELETE( _( "Modifying legacy libraries (.mod files) is not allowed\n"\ "Please save the current library under the new .pretty format\n"\ + "and update your footprint lib table\n"\ "before deleting a footprint" ) ); static const wxString ModLegacyExportFileWildcard( _( "Legacy foot print export files (*.emp)|*.emp" ) ); From 8c1dd1392e2b1ae448409bc5e7ee82b779c0a7e6 Mon Sep 17 00:00:00 2001 From: Andrew Zonenberg Date: Sun, 27 Jul 2014 15:00:39 -0400 Subject: [PATCH 724/741] Fixed divide-by-zero in D_PAD::ViewGetLOD() --- pcbnew/class_pad.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index bd20fd83af..8349d79577 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -965,6 +965,11 @@ unsigned int D_PAD::ViewGetLOD( int aLayer ) const // Netnames will be shown only if zoom is appropriate if( IsNetnameLayer( aLayer ) ) { + // Pad sizes can be zero briefly when someone is typing a number like "0.5" in the pad properties dialog. + // Fail gracefully if this happens. + if( (m_Size.x == 0) && (m_Size.y == 0) ) + return UINT_MAX; + return ( 100000000 / std::max( m_Size.x, m_Size.y ) ); } From e6fba84e13efd060d76508f79b0c0d6628990f3c Mon Sep 17 00:00:00 2001 From: Andrew Zonenberg Date: Sun, 27 Jul 2014 15:01:06 -0400 Subject: [PATCH 725/741] Push-and-shove router now handles existing blind/buried vias properly. Can't yet create new ones. --- pcbnew/router/pns_router.cpp | 12 ++++++++---- pcbnew/router/pns_via.cpp | 1 + pcbnew/router/pns_via.h | 17 ++++++++++++++++- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index d9db594a0f..809e4e5e09 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -227,12 +227,15 @@ PNS_ITEM* PNS_ROUTER::syncTrack( TRACK* aTrack ) PNS_ITEM* PNS_ROUTER::syncVia( VIA* aVia ) { + LAYER_ID top, bottom; + aVia->LayerPair(&top, &bottom); PNS_VIA* v = new PNS_VIA( aVia->GetPosition(), - PNS_LAYERSET( 0, MAX_CU_LAYERS - 1 ), + PNS_LAYERSET( top, bottom ), aVia->GetWidth(), aVia->GetDrillValue(), - aVia->GetNetCode() ); + aVia->GetNetCode(), + aVia->GetViaType() ); v->SetParent( aVia ); @@ -759,8 +762,9 @@ void PNS_ROUTER::CommitRouting( PNS_NODE* aNode ) via_board->SetWidth( via->Diameter() ); via_board->SetDrill( via->Drill() ); via_board->SetNetCode( via->Net() ); - via_board->SetLayerPair( ToLAYER_ID( m_settings.GetLayerTop() ), - ToLAYER_ID( m_settings.GetLayerBottom() ) ); + via_board->SetViaType(via->ViaType()); //MUST be before SetLayerPair() + via_board->SetLayerPair( ToLAYER_ID( via->Layers().Start() ), + ToLAYER_ID( via->Layers().End() ) ); newBI = via_board; break; } diff --git a/pcbnew/router/pns_via.cpp b/pcbnew/router/pns_via.cpp index f7ff5e9461..1b5c369bf2 100644 --- a/pcbnew/router/pns_via.cpp +++ b/pcbnew/router/pns_via.cpp @@ -91,6 +91,7 @@ PNS_VIA* PNS_VIA::Clone ( ) const v->m_shape = SHAPE_CIRCLE( m_pos, m_diameter / 2 ); v->m_rank = m_rank; v->m_marker = m_marker; + v->m_viaType = m_viaType; return v; } diff --git a/pcbnew/router/pns_via.h b/pcbnew/router/pns_via.h index dcf7abdf1f..97f33be32e 100644 --- a/pcbnew/router/pns_via.h +++ b/pcbnew/router/pns_via.h @@ -24,6 +24,8 @@ #include #include +#include "../class_track.h" + #include "pns_item.h" class PNS_NODE; @@ -36,7 +38,7 @@ public: {} PNS_VIA( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, - int aDiameter, int aDrill, int aNet = -1 ) : + int aDiameter, int aDrill, int aNet = -1, VIATYPE_T aViaType = VIA_THROUGH ) : PNS_ITEM( VIA ) { SetNet( aNet ); @@ -45,6 +47,7 @@ public: m_diameter = aDiameter; m_drill = aDrill; m_shape = SHAPE_CIRCLE( aPos, aDiameter / 2 ); + m_viaType = aViaType; } @@ -60,6 +63,7 @@ public: m_rank = aB.m_rank; m_owner = aB.m_owner; m_drill = aB.m_drill; + m_viaType = aB.m_viaType; } const VECTOR2I& Pos() const @@ -73,6 +77,16 @@ public: m_shape.SetCenter( aPos ); } + VIATYPE_T ViaType() const + { + return m_viaType; + } + + void SetViaType(VIATYPE_T aViaType) + { + m_viaType = aViaType; + } + int Diameter() const { return m_diameter; @@ -124,6 +138,7 @@ private: int m_drill; VECTOR2I m_pos; SHAPE_CIRCLE m_shape; + VIATYPE_T m_viaType; }; #endif From 33605eaaec2029208ad870a38b3368c48d1b8823 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 28 Jul 2014 11:24:15 +0200 Subject: [PATCH 726/741] Eeschema fixes: fix Bug #1348983 save cmp file crashes cvpcb when eeschema is opened (backannotation crashes). Happens only when some footprint names are not set (blank names). Also fix incorrect backannotation when footprint names contain spaces (put spaces in names is always a bad idea) * Fix minor Bug #1349058 Choose component dialog: Search field loses focus after entering a character and internationalize the dialog. * Fix a subtle bug which prevent eeschema to read the project config file when launched from kicad manager, and when kicad.pro is not found. --- cvpcb/readwrite_dlgs.cpp | 2 +- eeschema/backanno.cpp | 12 +++- eeschema/dialogs/dialog_choose_component.cpp | 1 + .../dialogs/dialog_choose_component_base.cpp | 48 ++++++------- .../dialogs/dialog_choose_component_base.fbp | 67 ++++++++----------- .../dialogs/dialog_choose_component_base.h | 9 +-- eeschema/files-io.cpp | 2 +- pcbnew/pcb_netlist.cpp | 2 +- 8 files changed, 69 insertions(+), 74 deletions(-) diff --git a/cvpcb/readwrite_dlgs.cpp b/cvpcb/readwrite_dlgs.cpp index c48d6dfe89..b0f89692d4 100644 --- a/cvpcb/readwrite_dlgs.cpp +++ b/cvpcb/readwrite_dlgs.cpp @@ -394,7 +394,7 @@ int CVPCB_MAINFRAME::SaveCmpLinkFile( const wxString& aFullFileName ) STRING_FORMATTER sf; m_netlist.FormatBackAnnotation( &sf ); - +wxMessageBox(sf.GetString()); Kiway().ExpressMail( FRAME_SCH, MAIL_BACKANNOTATE_FOOTPRINTS, sf.GetString() ); } diff --git a/eeschema/backanno.cpp b/eeschema/backanno.cpp index ea7628a86f..de39e8bcb4 100644 --- a/eeschema/backanno.cpp +++ b/eeschema/backanno.cpp @@ -70,13 +70,23 @@ void SCH_EDIT_FRAME::backAnnotateFootprints( const std::string& aChangedSetOfRef #endif CPTREE& back_anno = doc.get_child( "back_annotation" ); + wxString footprint; for( PTREE::const_iterator ref = back_anno.begin(); ref != back_anno.end(); ++ref ) { wxASSERT( ref->first == "ref" ); wxString reference = (UTF8&) ref->second.front().first; - wxString footprint = (UTF8&) ref->second.get_child( "fpid" ).front().first; + + // Ensure the "fpid" node contains a footprint name, + // and get it if exists + if( ref->second.get_child( "fpid" ).size() ) + { + wxString tmp = (UTF8&) ref->second.get_child( "fpid" ).front().first; + footprint = tmp; + } + else + footprint.Empty(); DBG( printf( "%s: ref:%s fpid:%s\n", __func__, TO_UTF8( reference ), TO_UTF8( footprint ) ); ) diff --git a/eeschema/dialogs/dialog_choose_component.cpp b/eeschema/dialogs/dialog_choose_component.cpp index 7356137b32..c442a6e0f5 100644 --- a/eeschema/dialogs/dialog_choose_component.cpp +++ b/eeschema/dialogs/dialog_choose_component.cpp @@ -77,6 +77,7 @@ void DIALOG_CHOOSE_COMPONENT::OnSearchBoxChange( wxCommandEvent& aEvent ) { m_search_container->UpdateSearchTerm( m_searchBox->GetLineText(0) ); updateSelection(); + m_searchBox->SetFocus(); } diff --git a/eeschema/dialogs/dialog_choose_component_base.cpp b/eeschema/dialogs/dialog_choose_component_base.cpp index 2d84ff23cd..2c69e8edfb 100644 --- a/eeschema/dialogs/dialog_choose_component_base.cpp +++ b/eeschema/dialogs/dialog_choose_component_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Feb 22 2014) +// C++ code generated with wxFormBuilder (version Jun 5 2014) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -13,60 +13,54 @@ DIALOG_CHOOSE_COMPONENT_BASE::DIALOG_CHOOSE_COMPONENT_BASE( wxWindow* parent, wx { this->SetSizeHints( wxSize( 450,100 ), wxDefaultSize ); - wxBoxSizer* bSizer1; - bSizer1 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizerMain; + bSizerMain = new wxBoxSizer( wxVERTICAL ); wxBoxSizer* bSearchSizer; bSearchSizer = new wxBoxSizer( wxHORIZONTAL ); - m_searchLabel = new wxStaticText( this, wxID_ANY, wxT("Search"), wxDefaultPosition, wxDefaultSize, 0 ); + m_searchLabel = new wxStaticText( this, wxID_ANY, _("Filter:"), wxDefaultPosition, wxDefaultSize, 0 ); m_searchLabel->Wrap( -1 ); - bSearchSizer->Add( m_searchLabel, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + bSearchSizer->Add( m_searchLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); m_searchBox = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER ); - bSearchSizer->Add( m_searchBox, 1, wxALL, 5 ); + bSearchSizer->Add( m_searchBox, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - bSizer1->Add( bSearchSizer, 0, wxEXPAND, 5 ); + bSizerMain->Add( bSearchSizer, 0, wxEXPAND, 5 ); m_libraryComponentTree = new wxTreeCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTR_DEFAULT_STYLE|wxTR_HIDE_ROOT ); m_libraryComponentTree->SetMinSize( wxSize( -1,50 ) ); - bSizer1->Add( m_libraryComponentTree, 1, wxALL|wxEXPAND, 5 ); + bSizerMain->Add( m_libraryComponentTree, 1, wxALL|wxEXPAND, 5 ); - wxBoxSizer* bSizer3; - bSizer3 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizerView; + bSizerView = new wxBoxSizer( wxHORIZONTAL ); m_componentView = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE|wxSUNKEN_BORDER ); m_componentView->SetMinSize( wxSize( 150,150 ) ); - bSizer3->Add( m_componentView, 4, wxEXPAND | wxALL, 5 ); + bSizerView->Add( m_componentView, 4, wxEXPAND | wxALL, 5 ); m_componentDetails = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE ); m_componentDetails->SetMinSize( wxSize( -1,100 ) ); - bSizer3->Add( m_componentDetails, 3, wxALL|wxEXPAND, 5 ); + bSizerView->Add( m_componentDetails, 3, wxALL|wxEXPAND, 5 ); - bSizer1->Add( bSizer3, 1, wxEXPAND, 5 ); + bSizerMain->Add( bSizerView, 1, wxEXPAND, 5 ); - wxBoxSizer* bSizer5; - bSizer5 = new wxBoxSizer( wxVERTICAL ); + m_stdButtons = new wxStdDialogButtonSizer(); + m_stdButtonsOK = new wxButton( this, wxID_OK ); + m_stdButtons->AddButton( m_stdButtonsOK ); + m_stdButtonsCancel = new wxButton( this, wxID_CANCEL ); + m_stdButtons->AddButton( m_stdButtonsCancel ); + m_stdButtons->Realize(); - m_button = new wxStdDialogButtonSizer(); - m_buttonOK = new wxButton( this, wxID_OK ); - m_button->AddButton( m_buttonOK ); - m_buttonCancel = new wxButton( this, wxID_CANCEL ); - m_button->AddButton( m_buttonCancel ); - m_button->Realize(); - - bSizer5->Add( m_button, 0, wxALL|wxEXPAND, 5 ); + bSizerMain->Add( m_stdButtons, 0, wxALL|wxEXPAND, 5 ); - bSizer1->Add( bSizer5, 0, wxALIGN_RIGHT, 5 ); - - - this->SetSizer( bSizer1 ); + this->SetSizer( bSizerMain ); this->Layout(); this->Centre( wxBOTH ); diff --git a/eeschema/dialogs/dialog_choose_component_base.fbp b/eeschema/dialogs/dialog_choose_component_base.fbp index 77cf06af9e..10a46ef4b1 100644 --- a/eeschema/dialogs/dialog_choose_component_base.fbp +++ b/eeschema/dialogs/dialog_choose_component_base.fbp @@ -1,6 +1,6 @@ - + C++ @@ -14,7 +14,7 @@ dialog_choose_component_base 1000 none - 0 + 1 dialog_choose_component_base . @@ -90,7 +90,7 @@ - bSizer1 + bSizerMain wxVERTICAL none @@ -104,7 +104,7 @@ none 5 - wxALIGN_CENTER_VERTICAL|wxALL + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT 0 1 @@ -134,7 +134,7 @@ 0 0 wxID_ANY - Search + Filter: 0 @@ -187,7 +187,7 @@ 5 - wxALL + wxALL|wxALIGN_CENTER_VERTICAL 1 1 @@ -386,7 +386,7 @@ 1 - bSizer3 + bSizerView wxHORIZONTAL none @@ -562,41 +562,30 @@ - + 5 - wxALIGN_RIGHT + wxALL|wxEXPAND 0 - + + 0 + 1 + 0 + 0 + 0 + 1 + 0 + 0 - bSizer5 - wxVERTICAL - none - - 5 - wxALL|wxEXPAND - 0 - - 0 - 1 - 0 - 0 - 0 - 1 - 0 - 0 - - m_button - protected - - - - - - - - - - + m_stdButtons + protected + + + + + + + + diff --git a/eeschema/dialogs/dialog_choose_component_base.h b/eeschema/dialogs/dialog_choose_component_base.h index 881b5a5ea3..3897d5ca76 100644 --- a/eeschema/dialogs/dialog_choose_component_base.h +++ b/eeschema/dialogs/dialog_choose_component_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Feb 22 2014) +// C++ code generated with wxFormBuilder (version Jun 5 2014) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -10,6 +10,7 @@ #include #include +#include class DIALOG_SHIM; #include "dialog_shim.h" @@ -42,9 +43,9 @@ class DIALOG_CHOOSE_COMPONENT_BASE : public DIALOG_SHIM wxTreeCtrl* m_libraryComponentTree; wxPanel* m_componentView; wxTextCtrl* m_componentDetails; - wxStdDialogButtonSizer* m_button; - wxButton* m_buttonOK; - wxButton* m_buttonCancel; + wxStdDialogButtonSizer* m_stdButtons; + wxButton* m_stdButtonsOK; + wxButton* m_stdButtonsCancel; // Virtual event handlers, overide them in your derived class virtual void OnInterceptSearchBoxKey( wxKeyEvent& event ) { event.Skip(); } diff --git a/eeschema/files-io.cpp b/eeschema/files-io.cpp index 3832ce3ca6..83950e0a9d 100644 --- a/eeschema/files-io.cpp +++ b/eeschema/files-io.cpp @@ -358,7 +358,7 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector& aFileSet, in msg.Printf( _( "Ready\nWorking dir: '%s'\n" ), GetChars( wxGetCwd() ) ); PrintMsg( msg ); - LoadProjectFile( wxEmptyString, false ); + LoadProjectFile( wxEmptyString, true ); // Clear (if needed) the current active library in libedit because it could be // removed from memory diff --git a/pcbnew/pcb_netlist.cpp b/pcbnew/pcb_netlist.cpp index db56251d8a..90a45a2981 100644 --- a/pcbnew/pcb_netlist.cpp +++ b/pcbnew/pcb_netlist.cpp @@ -95,7 +95,7 @@ void COMPONENT::Format( OUTPUTFORMATTER* aOut, int aNestLevel, int aCtl ) int nl = aNestLevel; aOut->Print( nl, "(ref %s ", aOut->Quotew( m_reference ).c_str() ); - aOut->Print( 0, "(fpid %s)\n", m_fpid.Format().c_str() ); + aOut->Print( 0, "(fpid %s)\n", aOut->Quotew( m_fpid.Format() ).c_str() ); if( ! ( aCtl & CTL_OMIT_EXTRA ) ) { From f51ad438b3e20aaa003582bee336d7309a9e4aa3 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 28 Jul 2014 13:59:50 +0200 Subject: [PATCH 727/741] wxWidgets 2.8 compatibility fix. --- cvpcb/readwrite_dlgs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cvpcb/readwrite_dlgs.cpp b/cvpcb/readwrite_dlgs.cpp index b0f89692d4..a5aa0b8811 100644 --- a/cvpcb/readwrite_dlgs.cpp +++ b/cvpcb/readwrite_dlgs.cpp @@ -394,7 +394,7 @@ int CVPCB_MAINFRAME::SaveCmpLinkFile( const wxString& aFullFileName ) STRING_FORMATTER sf; m_netlist.FormatBackAnnotation( &sf ); -wxMessageBox(sf.GetString()); + wxMessageBox( wxString( sf.GetString().c_str(), wxConvUTF8 ) ); Kiway().ExpressMail( FRAME_SCH, MAIL_BACKANNOTATE_FOOTPRINTS, sf.GetString() ); } From 6ba14100545dfc04f87316dea631972f10fdb84d Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 28 Jul 2014 14:01:29 +0200 Subject: [PATCH 728/741] Fixed vanishing pads issue in the pad properties dialog (GAL). --- pcbnew/dialogs/dialog_pad_properties.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pcbnew/dialogs/dialog_pad_properties.cpp b/pcbnew/dialogs/dialog_pad_properties.cpp index 089ae54bf3..baebdcab6a 100644 --- a/pcbnew/dialogs/dialog_pad_properties.cpp +++ b/pcbnew/dialogs/dialog_pad_properties.cpp @@ -796,13 +796,16 @@ void DIALOG_PAD_PROPERTIES::redraw() BOX2I bbox = m_dummyPad->ViewBBox(); - // Autozoom - m_panelShowPadGal->GetView()->SetViewport( BOX2D( bbox.GetOrigin(), bbox.GetSize() ) ); + if( bbox.GetSize().x > 0 && bbox.GetSize().y > 0 ) + { + // Autozoom + m_panelShowPadGal->GetView()->SetViewport( BOX2D( bbox.GetOrigin(), bbox.GetSize() ) ); - // Add a margin - m_panelShowPadGal->GetView()->SetScale( m_panelShowPadGal->GetView()->GetScale() * 0.7 ); + // Add a margin + m_panelShowPadGal->GetView()->SetScale( m_panelShowPadGal->GetView()->GetScale() * 0.7 ); - m_panelShowPadGal->Refresh(); + m_panelShowPadGal->Refresh(); + } } else { From 281ce25dd232f6ef056b74c4d1e9cadc693efb0d Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 28 Jul 2014 14:16:14 +0200 Subject: [PATCH 729/741] cvPcb: Remove a debug message displayed when saving .cmp file. --- cvpcb/readwrite_dlgs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cvpcb/readwrite_dlgs.cpp b/cvpcb/readwrite_dlgs.cpp index a5aa0b8811..c48d6dfe89 100644 --- a/cvpcb/readwrite_dlgs.cpp +++ b/cvpcb/readwrite_dlgs.cpp @@ -394,7 +394,7 @@ int CVPCB_MAINFRAME::SaveCmpLinkFile( const wxString& aFullFileName ) STRING_FORMATTER sf; m_netlist.FormatBackAnnotation( &sf ); - wxMessageBox( wxString( sf.GetString().c_str(), wxConvUTF8 ) ); + Kiway().ExpressMail( FRAME_SCH, MAIL_BACKANNOTATE_FOOTPRINTS, sf.GetString() ); } From 64e38bd741cf8eb9f60d710fe14ce6c68b34235e Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Mon, 28 Jul 2014 09:06:08 -0500 Subject: [PATCH 730/741] KICAD_MANAGER_FRAME::SetProjectFileName() uses PROJECT::SetProjectFullName() and forces absolute path. --- kicad/mainframe.cpp | 15 +++++++++------ kicad/prjconfig.cpp | 7 +++++-- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/kicad/mainframe.cpp b/kicad/mainframe.cpp index 51bb45b8c4..cf6690cd1a 100644 --- a/kicad/mainframe.cpp +++ b/kicad/mainframe.cpp @@ -127,16 +127,19 @@ wxConfigBase* KICAD_MANAGER_FRAME::config() void KICAD_MANAGER_FRAME::SetProjectFileName( const wxString& aFullProjectProFileName ) { - m_project_file_name = aFullProjectProFileName; + // ensure file name is absolute: + wxFileName fn( aFullProjectProFileName ); - wxASSERT( wxFileName( m_project_file_name ).IsAbsolute() || - wxFileName( m_project_file_name ).GetName() == NAMELESS_PROJECT wxT( ".pro" ) ); + if( !fn.IsAbsolute() ) + fn.MakeAbsolute(); + + Prj().SetProjectFullName( fn.GetFullPath() ); } const wxString KICAD_MANAGER_FRAME::GetProjectFileName() { - return m_project_file_name; + return Prj().GetProjectFullName(); } @@ -287,7 +290,7 @@ void KICAD_MANAGER_FRAME::RunEeschema( const wxString& aProjectSchematicFileName void KICAD_MANAGER_FRAME::OnRunEeschema( wxCommandEvent& event ) { - wxFileName fn( m_project_file_name ); + wxFileName fn( GetProjectFileName() ); fn.SetExt( SchematicFileExtension ); @@ -339,7 +342,7 @@ void KICAD_MANAGER_FRAME::OnRunPageLayoutEditor( wxCommandEvent& event ) void KICAD_MANAGER_FRAME::OnRunCvpcb( wxCommandEvent& event ) { - wxFileName fn( m_project_file_name ); + wxFileName fn( GetProjectFileName() ); fn.SetExt( NetlistFileExtension ); diff --git a/kicad/prjconfig.cpp b/kicad/prjconfig.cpp index 260cc03164..ee391c6bdf 100644 --- a/kicad/prjconfig.cpp +++ b/kicad/prjconfig.cpp @@ -182,8 +182,6 @@ void KICAD_MANAGER_FRAME::OnLoadProject( wxCommandEvent& event ) { wxString title; - // this is still a pr, will work on it tomorrow. - ClearMsg(); if( event.GetId() != wxID_ANY ) @@ -210,8 +208,13 @@ void KICAD_MANAGER_FRAME::OnLoadProject( wxCommandEvent& event ) if( dlg.ShowModal() == wxID_CANCEL ) return; + DBG( printf( "%s: wxFileDialog::GetPath=%s\n", __func__, TO_UTF8( dlg.GetPath() ) );) + wxFileName pro( dlg.GetPath() ); + if( !pro.IsAbsolute() ) + pro.MakeAbsolute(); + pro.SetExt( ProjectFileExtension ); if( newProject ) From 57e537699ed422ac110a25bfa7f5d6967e52cdf5 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Mon, 28 Jul 2014 09:13:59 -0500 Subject: [PATCH 731/741] remove un-used member --- kicad/kicad.h | 1 - 1 file changed, 1 deletion(-) diff --git a/kicad/kicad.h b/kicad/kicad.h index 317ad498ed..3b7e45c036 100644 --- a/kicad/kicad.h +++ b/kicad/kicad.h @@ -259,7 +259,6 @@ private: LAUNCHER_PANEL* m_Launcher; wxTextCtrl* m_MessagesBox; wxAuiToolBar* m_VToolBar; // Vertical toolbar (not used) - wxString m_project_file_name; int m_leftWinWidth; From 1540368422cbd0dba89e2191bd06a0e68c68d185 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 29 Jul 2014 18:38:27 +0200 Subject: [PATCH 732/741] Minor fixes and changes: Remove a minor warning message in Debug mode for 2 dialogs. Pcbnew: update Gerber X2 file format (File Attribute) to very last X2 specification Eeschema: Fix a minor bug in block selection (sometimes the last selected component was select instead of items in selected area) and better drag behavior when draging an item by the drag hotkey. --- common/block_commande.cpp | 4 ++ common/draw_frame.cpp | 28 ++++----- eeschema/block.cpp | 12 +++- eeschema/block_libedit.cpp | 14 +++-- eeschema/dialogs/dialog_edit_label_base.cpp | 4 +- eeschema/dialogs/dialog_edit_label_base.fbp | 6 +- eeschema/dialogs/dialog_edit_label_base.h | 2 +- eeschema/sch_screen.cpp | 15 ++--- eeschema/schedit.cpp | 70 ++++++++++++--------- include/block_commande.h | 7 ++- pcbnew/dialogs/dialog_netlist_fbp.cpp | 1 - pcbnew/dialogs/dialog_netlist_fbp.fbp | 2 +- pcbnew/pcbplot.cpp | 7 ++- 13 files changed, 97 insertions(+), 75 deletions(-) diff --git a/common/block_commande.cpp b/common/block_commande.cpp index dfc27995b3..990fa6cee0 100644 --- a/common/block_commande.cpp +++ b/common/block_commande.cpp @@ -71,6 +71,10 @@ void BLOCK_SELECTOR::SetMessageBlock( EDA_DRAW_FRAME* frame ) msg = _( "Block Drag" ); break; + case BLOCK_DRAG_ITEM: // Drag + msg = _( "Drag item" ); + break; + case BLOCK_COPY: // Copy msg = _( "Block Copy" ); break; diff --git a/common/draw_frame.cpp b/common/draw_frame.cpp index b43d1669d0..fe259933b4 100644 --- a/common/draw_frame.cpp +++ b/common/draw_frame.cpp @@ -717,17 +717,18 @@ bool EDA_DRAW_FRAME::HandleBlockBegin( wxDC* aDC, int aKey, const wxPoint& aPosi case BLOCK_IDLE: break; - case BLOCK_MOVE: /* Move */ - case BLOCK_DRAG: /* Drag */ - case BLOCK_COPY: /* Copy */ - case BLOCK_DELETE: /* Delete */ - case BLOCK_SAVE: /* Save */ - case BLOCK_ROTATE: /* Rotate 90 deg */ - case BLOCK_FLIP: /* Flip */ - case BLOCK_ZOOM: /* Window Zoom */ + case BLOCK_MOVE: // Move + case BLOCK_DRAG: // Drag (block defined) + case BLOCK_DRAG_ITEM: // Drag from a drag item command + case BLOCK_COPY: // Copy + case BLOCK_DELETE: // Delete + case BLOCK_SAVE: // Save + case BLOCK_ROTATE: // Rotate 90 deg + case BLOCK_FLIP: // Flip + case BLOCK_ZOOM: // Window Zoom case BLOCK_MIRROR_X: - case BLOCK_MIRROR_Y: /* mirror */ - case BLOCK_PRESELECT_MOVE: /* Move with preselection list*/ + case BLOCK_MIRROR_Y: // mirror + case BLOCK_PRESELECT_MOVE: // Move with preselection list Block->InitData( m_canvas, aPosition ); break; @@ -736,7 +737,7 @@ bool EDA_DRAW_FRAME::HandleBlockBegin( wxDC* aDC, int aKey, const wxPoint& aPosi Block->SetLastCursorPosition( wxPoint( 0, 0 ) ); InitBlockPasteInfos(); - if( Block->GetCount() == 0 ) /* No data to paste */ + if( Block->GetCount() == 0 ) // No data to paste { DisplayError( this, wxT( "No Block to paste" ), 20 ); GetScreen()->m_BlockLocate.SetCommand( BLOCK_IDLE ); @@ -771,10 +772,7 @@ bool EDA_DRAW_FRAME::HandleBlockBegin( wxDC* aDC, int aKey, const wxPoint& aPosi } -// See comment in classpcb.cpp near line 66 -//static const double MAX_AXIS = 1518500251; - -// However I am not seeing a problem with this size yet: +// I am not seeing a problem with this size yet: static const double MAX_AXIS = INT_MAX - 100; #define VIRT_MIN (-MAX_AXIS/2.0) ///< min X or Y coordinate in virtual space diff --git a/eeschema/block.cpp b/eeschema/block.cpp index 98ea9e62a1..01c7c3fb04 100644 --- a/eeschema/block.cpp +++ b/eeschema/block.cpp @@ -133,8 +133,9 @@ void SCH_EDIT_FRAME::HandleBlockPlace( wxDC* DC ) switch( block->GetCommand() ) { - case BLOCK_DRAG: /* Drag */ - case BLOCK_MOVE: /* Move */ + case BLOCK_DRAG: // Drag from mouse + case BLOCK_DRAG_ITEM: // Drag from a component selection and drag command + case BLOCK_MOVE: if( m_canvas->IsMouseCaptured() ) m_canvas->CallMouseCapture( DC, wxDefaultPosition, false ); @@ -238,19 +239,24 @@ bool SCH_EDIT_FRAME::HandleBlockEnd( wxDC* aDC ) break; case BLOCK_DRAG: + case BLOCK_DRAG_ITEM: // Drag from a drag command GetScreen()->BreakSegmentsOnJunctions(); // fall through case BLOCK_MOVE: case BLOCK_COPY: - if( GetScreen()->GetCurItem() != NULL ) + if( block->GetCommand() == BLOCK_DRAG_ITEM && + GetScreen()->GetCurItem() != NULL ) { + // This is a drag command, not a mouse block command + // Only this item is put in list ITEM_PICKER picker; picker.SetItem( GetScreen()->GetCurItem() ); block->PushItem( picker ); } else { + // Collect all items in the locate block GetScreen()->UpdatePickList(); } // fall through diff --git a/eeschema/block_libedit.cpp b/eeschema/block_libedit.cpp index abf7fc66ed..139e6cf3ff 100644 --- a/eeschema/block_libedit.cpp +++ b/eeschema/block_libedit.cpp @@ -109,9 +109,10 @@ bool LIB_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: + case BLOCK_DRAG_ITEM: + case BLOCK_MOVE: + case BLOCK_COPY: if ( m_component ) ItemCount = m_component->SelectItems( GetScreen()->m_BlockLocate, m_unit, m_convert, @@ -132,7 +133,7 @@ bool LIB_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 ); @@ -232,8 +233,9 @@ void LIB_EDIT_FRAME::HandleBlockPlace( wxDC* DC ) case BLOCK_IDLE: break; - case BLOCK_DRAG: /* Drag */ - case BLOCK_MOVE: /* Move */ + case BLOCK_DRAG: + case BLOCK_DRAG_ITEM: + case BLOCK_MOVE: case BLOCK_PRESELECT_MOVE: /* Move with preselection list*/ GetScreen()->m_BlockLocate.ClearItemsList(); diff --git a/eeschema/dialogs/dialog_edit_label_base.cpp b/eeschema/dialogs/dialog_edit_label_base.cpp index 739f6a03d0..c46b70895b 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 30 2013) +// C++ code generated with wxFormBuilder (version Nov 6 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -32,7 +32,6 @@ 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 ); @@ -54,7 +53,6 @@ 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 3008bf2acc..1d8f475b0e 100644 --- a/eeschema/dialogs/dialog_edit_label_base.fbp +++ b/eeschema/dialogs/dialog_edit_label_base.fbp @@ -20,8 +20,10 @@ . 1 + 1 1 1 + UI 1 0 @@ -234,7 +236,7 @@ 0 - 0 + 0 @@ -510,7 +512,7 @@ 0 - 0 + 0 diff --git a/eeschema/dialogs/dialog_edit_label_base.h b/eeschema/dialogs/dialog_edit_label_base.h index c704426370..7f92c37c39 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 30 2013) +// C++ code generated with wxFormBuilder (version Nov 6 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! diff --git a/eeschema/sch_screen.cpp b/eeschema/sch_screen.cpp index 9a7d2a5390..fff8788f30 100644 --- a/eeschema/sch_screen.cpp +++ b/eeschema/sch_screen.cpp @@ -759,8 +759,6 @@ void SCH_SCREEN::GetHierarchicalItems( EDA_ITEMS& aItems ) void SCH_SCREEN::SelectBlockItems() { - SCH_ITEM* item; - PICKED_ITEMS_LIST* pickedlist = &m_BlockLocate.GetItems(); if( pickedlist->GetCount() == 0 ) @@ -770,7 +768,7 @@ void SCH_SCREEN::SelectBlockItems() for( unsigned ii = 0; ii < pickedlist->GetCount(); ii++ ) { - item = (SCH_ITEM*) pickedlist->GetPickedItem( ii ); + SCH_ITEM* item = (SCH_ITEM*) pickedlist->GetPickedItem( ii ); item->SetFlags( SELECTED ); } @@ -781,18 +779,17 @@ void SCH_SCREEN::SelectBlockItems() // be sure end lines that are on the block limits are seen inside this block m_BlockLocate.Inflate( 1 ); unsigned last_select_id = pickedlist->GetCount(); - unsigned ii = 0; - for( ; ii < last_select_id; ii++ ) + for( unsigned ii = 0; ii < last_select_id; ii++ ) { - item = (SCH_ITEM*)pickedlist->GetPickedItem( ii ); + SCH_ITEM* item = (SCH_ITEM*)pickedlist->GetPickedItem( ii ); item->SetFlags( IS_DRAGGED ); if( item->Type() == SCH_LINE_T ) { item->IsSelectStateChanged( m_BlockLocate ); - if( ( item->GetFlags() & SELECTED ) == 0 ) + if( !item->IsSelected() ) { // This is a special case: // this selected wire has no ends in block. // But it was selected (because it intersects the selecting area), @@ -814,8 +811,8 @@ void SCH_SCREEN::SelectBlockItems() item->GetConnectionPoints( connections ); - for( size_t i = 0; i < connections.size(); i++ ) - addConnectedItemsToBlock( connections[i] ); + for( size_t jj = 0; jj < connections.size(); jj++ ) + addConnectedItemsToBlock( connections[jj] ); } } diff --git a/eeschema/schedit.cpp b/eeschema/schedit.cpp index ff42fdc9af..d9accae049 100644 --- a/eeschema/schedit.cpp +++ b/eeschema/schedit.cpp @@ -940,7 +940,14 @@ void SCH_EDIT_FRAME::OnDragItem( wxCommandEvent& aEvent ) SCH_SCREEN* screen = GetScreen(); SCH_ITEM* item = screen->GetCurItem(); - INSTALL_UNBUFFERED_DC( dc, m_canvas ); + // The easiest way to handle a menu or a hot key drag command + // is to simulate a block drag command + // + // When a drag item is requested, some items use a BLOCK_DRAG_ITEM drag type + // an some items use a BLOCK_DRAG drag type (mainly a junction) + // a BLOCK_DRAG collects all items in a block (here a 2x2 rect centered on the cursor) + // and BLOCK_DRAG_ITEM drag only the selected item + BLOCK_COMMAND_T dragType = BLOCK_DRAG_ITEM; if( item == NULL ) { @@ -958,42 +965,43 @@ void SCH_EDIT_FRAME::OnDragItem( wxCommandEvent& aEvent ) // Exit if no item found at the current location or the item is already being edited. if( (item == NULL) || (item->GetFlags() != 0) ) return; + + // When a junction or a node is found, a BLOCK_DRAG is better + if( m_collectedItems.IsCorner() || m_collectedItems.IsNode( false ) + || m_collectedItems.IsDraggableJunction() ) + dragType = BLOCK_DRAG; } switch( item->Type() ) { - case SCH_BUS_BUS_ENTRY_T: - case SCH_BUS_WIRE_ENTRY_T: - case SCH_LINE_T: - case SCH_JUNCTION_T: - if( item->GetLayer() == LAYER_BUS ) + case SCH_BUS_BUS_ENTRY_T: + case SCH_BUS_WIRE_ENTRY_T: + case SCH_LINE_T: + case SCH_JUNCTION_T: + case SCH_COMPONENT_T: + case SCH_LABEL_T: + case SCH_GLOBAL_LABEL_T: + case SCH_HIERARCHICAL_LABEL_T: + case SCH_SHEET_T: + m_canvas->MoveCursorToCrossHair(); + + if( screen->m_BlockLocate.GetState() == STATE_NO_BLOCK ) + { + INSTALL_UNBUFFERED_DC( dc, m_canvas ); + + if( !HandleBlockBegin( &dc, dragType, GetCrossHairPosition() ) ) + break; + + // Give a non null size to the search block: + screen->m_BlockLocate.Inflate( 1 ); + HandleBlockEnd( &dc ); + } + break; - // Fall thru if item is not on bus layer. - case SCH_COMPONENT_T: - case SCH_LABEL_T: - case SCH_GLOBAL_LABEL_T: - case SCH_HIERARCHICAL_LABEL_T: - case SCH_SHEET_T: - m_canvas->MoveCursorToCrossHair(); - - // The easiest way to handle a drag component or sheet command - // is to simulate a block drag command - if( screen->m_BlockLocate.GetState() == STATE_NO_BLOCK ) - { - if( !HandleBlockBegin( &dc, BLOCK_DRAG, GetCrossHairPosition() ) ) - break; - - // Give a non null size to the search block: - screen->m_BlockLocate.Inflate( 1 ); - HandleBlockEnd( &dc ); - } - - break; - - default: - wxFAIL_MSG( wxString::Format( wxT( "Cannot drag schematic item type %s." ), - GetChars( item->GetClass() ) ) ); + default: + wxFAIL_MSG( wxString::Format( wxT( "Cannot drag schematic item type %s." ), + GetChars( item->GetClass() ) ) ); } } diff --git a/include/block_commande.h b/include/block_commande.h index c8579c1c14..cf2c140237 100644 --- a/include/block_commande.h +++ b/include/block_commande.h @@ -55,6 +55,8 @@ typedef enum { BLOCK_DELETE, BLOCK_PASTE, BLOCK_DRAG, + BLOCK_DRAG_ITEM, // like BLOCK_DRAG, when used to drag a selected component + // and not using an area defined by a mouse drag BLOCK_ROTATE, BLOCK_FLIP, BLOCK_ZOOM, @@ -166,7 +168,10 @@ public: * Function IsDragging * returns true if the current block command is a drag operation. */ - bool IsDragging() const { return m_command == BLOCK_DRAG; } + bool IsDragging() const + { + return m_command == BLOCK_DRAG || m_command == BLOCK_DRAG_ITEM; + } /** * Function IsIdle diff --git a/pcbnew/dialogs/dialog_netlist_fbp.cpp b/pcbnew/dialogs/dialog_netlist_fbp.cpp index 716e38c6a1..13ebd9d7ab 100644 --- a/pcbnew/dialogs/dialog_netlist_fbp.cpp +++ b/pcbnew/dialogs/dialog_netlist_fbp.cpp @@ -159,7 +159,6 @@ DIALOG_NETLIST_FBP::DIALOG_NETLIST_FBP( wxWindow* parent, wxWindowID id, const w bSizerNetlistFilename = new wxBoxSizer( wxHORIZONTAL ); m_NetlistFilenameCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_NetlistFilenameCtrl->SetMaxLength( 0 ); bSizerNetlistFilename->Add( m_NetlistFilenameCtrl, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 ); m_buttonBrowse = new wxButton( this, ID_OPEN_NELIST, _("Browse"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); diff --git a/pcbnew/dialogs/dialog_netlist_fbp.fbp b/pcbnew/dialogs/dialog_netlist_fbp.fbp index cdc4eb9c25..393a071cb5 100644 --- a/pcbnew/dialogs/dialog_netlist_fbp.fbp +++ b/pcbnew/dialogs/dialog_netlist_fbp.fbp @@ -1712,7 +1712,7 @@ 0 - 0 + 0 diff --git a/pcbnew/pcbplot.cpp b/pcbnew/pcbplot.cpp index d638439bbf..c5ad76183c 100644 --- a/pcbnew/pcbplot.cpp +++ b/pcbnew/pcbplot.cpp @@ -146,14 +146,17 @@ wxString GetGerberFileFunction( const BOARD *aBoard, LAYER_NUM aLayer ) break; case B_Cu: - attrib = wxString::Format( wxT( "Copper,L%d" ), aBoard->GetCopperLayerCount() ); + attrib = wxString::Format( wxT( "Copper,L%d,Bot" ), aBoard->GetCopperLayerCount() ); break; case F_Cu: + attrib = wxString::Format( wxT( "Copper,L1,Top" ) ); + break; + default: if( IsCopperLayer( aLayer ) ) { - attrib = wxString::Format( wxT( "Copper,L%d" ), aLayer+1 ); + attrib = wxString::Format( wxT( "Copper,L%d,Inr" ), aLayer+1 ); } break; } From 7a4ea8955e0f0d44715231a131673e847c044c5b Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 30 Jul 2014 11:01:25 +0200 Subject: [PATCH 733/741] 3D viewer enhancements (better render + better vrml reader) from Mario Luzeiro --- 3d-viewer/3d_aux.cpp | 30 +- 3d-viewer/3d_canvas.cpp | 105 ++- 3d-viewer/3d_canvas.h | 43 +- 3d-viewer/3d_class.cpp | 42 +- 3d-viewer/3d_draw.cpp | 695 ++++++++++++++++--- 3d-viewer/3d_draw_basic_functions.cpp | 29 +- 3d-viewer/3d_draw_basic_functions.h | 8 + 3d-viewer/3d_frame.cpp | 3 +- 3d-viewer/3d_material.cpp | 136 ++++ 3d-viewer/3d_material.h | 66 ++ 3d-viewer/3d_mesh_model.cpp | 387 +++++++++++ 3d-viewer/3d_mesh_model.h | 100 +++ 3d-viewer/3d_struct.h | 59 +- 3d-viewer/CMakeLists.txt | 8 +- 3d-viewer/info3d_visu.cpp | 7 +- 3d-viewer/info3d_visu.h | 3 + 3d-viewer/modelparsers.h | 147 ++-- 3d-viewer/textures/text_pcb.c | 922 ++++++++++++++++++++++++++ 3d-viewer/textures/text_silk.c | 922 ++++++++++++++++++++++++++ 3d-viewer/vrml_aux.cpp | 206 ++++++ 3d-viewer/vrml_aux.h | 58 ++ 3d-viewer/vrml_v1_modelparser.cpp | 444 +++++++++++++ 3d-viewer/vrml_v2_modelparser.cpp | 737 ++++++++++++++++++++ 3d-viewer/vrmlmodelparser.cpp | 545 +-------------- 3d-viewer/x3dmodelparser.cpp | 208 ++++-- pcbnew/block_module_editor.cpp | 1 + pcbnew/class_module.h | 4 +- pcbnew/exporters/export_vrml.cpp | 2 +- pcbnew/legacy_plugin.cpp | 6 +- 29 files changed, 5064 insertions(+), 859 deletions(-) create mode 100644 3d-viewer/3d_material.cpp create mode 100644 3d-viewer/3d_material.h create mode 100644 3d-viewer/3d_mesh_model.cpp create mode 100644 3d-viewer/3d_mesh_model.h create mode 100644 3d-viewer/textures/text_pcb.c create mode 100644 3d-viewer/textures/text_silk.c create mode 100644 3d-viewer/vrml_aux.cpp create mode 100644 3d-viewer/vrml_aux.h create mode 100644 3d-viewer/vrml_v1_modelparser.cpp create mode 100644 3d-viewer/vrml_v2_modelparser.cpp diff --git a/3d-viewer/3d_aux.cpp b/3d-viewer/3d_aux.cpp index a8ccab2b8d..2a5c758fcd 100644 --- a/3d-viewer/3d_aux.cpp +++ b/3d-viewer/3d_aux.cpp @@ -57,13 +57,31 @@ void S3D_MASTER::ObjectCoordsTo3DUnits( std::vector< S3D_VERTEX >& aVertices ) // adjust rotation if( m_MatRotation.x ) - RotatePoint( &aVertices[ii].y, &aVertices[ii].z, m_MatRotation.x * 10 ); + { + double a = aVertices[ii].y; + double b = aVertices[ii].z; + RotatePoint( &a, &b, m_MatRotation.x * 10 ); + aVertices[ii].y = (float)a; + aVertices[ii].z = (float)b; + } if( m_MatRotation.y ) - RotatePoint( &aVertices[ii].z, &aVertices[ii].x, m_MatRotation.y * 10 ); + { + double a = aVertices[ii].z; + double b = aVertices[ii].x; + RotatePoint( &a, &b, m_MatRotation.x * 10 ); + aVertices[ii].z = (float)a; + aVertices[ii].x = (float)b; + } if( m_MatRotation.z ) - RotatePoint( &aVertices[ii].x, &aVertices[ii].y, m_MatRotation.z * 10 ); + { + double a = aVertices[ii].x; + double b = aVertices[ii].y; + RotatePoint( &a, &b, m_MatRotation.x * 10 ); + aVertices[ii].x = (float)a; + aVertices[ii].y = (float)b; + } /* adjust offset position (offset is given in UNIT 3D (0.1 inch) */ #define SCALE_3D_CONV ((IU_PER_MILS * 1000) / UNITS3D_TO_UNITSPCB) @@ -138,9 +156,9 @@ VERTEX_VALUE_CTRL::VERTEX_VALUE_CTRL( wxWindow* aParent, wxBoxSizer* aBoxSizer ) wxString text; wxFlexGridSizer* gridSizer = new wxFlexGridSizer( 0, 2, 0, 0 ); - gridSizer->AddGrowableCol( 1 ); - gridSizer->SetFlexibleDirection( wxHORIZONTAL ); - gridSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + gridSizer->AddGrowableCol( 1 ); + gridSizer->SetFlexibleDirection( wxHORIZONTAL ); + gridSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); aBoxSizer->Add( gridSizer, 0, wxEXPAND, 5 ); diff --git a/3d-viewer/3d_canvas.cpp b/3d-viewer/3d_canvas.cpp index db1ace2851..ca106f8db2 100644 --- a/3d-viewer/3d_canvas.cpp +++ b/3d-viewer/3d_canvas.cpp @@ -16,17 +16,21 @@ #include +#include // must be included before gl.h + #include <3d_viewer.h> #include <3d_canvas.h> #include #include #include <3d_viewer_id.h> +#include +#include // ----------------- // helper function (from wxWidgets, opengl/cube.cpp sample // ----------------- -void CheckGLError() +void CheckGLError(const char *aFileName, int aLineNumber) { GLenum errLast = GL_NO_ERROR; @@ -47,7 +51,7 @@ void CheckGLError() errLast = err; - wxLogError(wxT("OpenGL error %d"), err); + wxLogError( wxT( "OpenGL error %d\nAt: %s, line: %d" ), err, aFileName, aLineNumber ); } } @@ -78,6 +82,7 @@ EDA_3D_CANVAS::EDA_3D_CANVAS( EDA_3D_FRAME* parent, int* attribList ) : wxFULL_REPAINT_ON_RESIZE ) { m_init = false; + m_shadow_init = false; // Clear all gl list identifiers: for( int ii = GL_ID_BEGIN; ii < GL_ID_END; ii++ ) @@ -490,15 +495,46 @@ void EDA_3D_CANVAS::OnEraseBackground( wxEraseEvent& event ) // Do nothing, to avoid flashing. } +typedef struct s_sImage +{ + unsigned int width; + unsigned int height; + unsigned int bytes_per_pixel; /* 2:RGB16, 3:RGB, 4:RGBA */ + unsigned char pixel_data[64 * 64 * 4 + 1]; +}tsImage; + + +GLuint load_and_generate_texture( tsImage *image ) +{ + + GLuint texture; + glPixelStorei (GL_UNPACK_ALIGNMENT, 1); + glPixelStorei (GL_PACK_ALIGNMENT, 1); + + glGenTextures( 1, &texture ); + glBindTexture( GL_TEXTURE_2D, texture ); + gluBuild2DMipmaps( GL_TEXTURE_2D, GL_RGBA, image->width, image->height, GL_RGBA, GL_UNSIGNED_BYTE, image->pixel_data ); + + glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR ); + glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR ); + glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_MIRRORED_REPEAT); + glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_MIRRORED_REPEAT); + + glTexEnvf( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE ); + return texture; +} /* Initialize broad parameters for OpenGL */ void EDA_3D_CANVAS::InitGL() { - wxSize size = GetClientSize(); - if( !m_init ) { m_init = true; + + + m_text_pcb = load_and_generate_texture( (tsImage *)&text_pcb ); + m_text_silk = load_and_generate_texture( (tsImage *)&text_silk ); + g_Parm_3D_Visu.m_Zoom = 1.0; m_ZBottom = 1.0; m_ZTop = 10.0; @@ -513,7 +549,7 @@ void EDA_3D_CANVAS::InitGL() glColorMaterial( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE ); // speedups - glEnable( GL_DITHER ); + //glEnable( GL_DITHER ); glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_DONT_CARE ); glHint( GL_LINE_SMOOTH_HINT, GL_NICEST ); glHint( GL_POLYGON_SMOOTH_HINT, GL_NICEST ); @@ -521,52 +557,7 @@ void EDA_3D_CANVAS::InitGL() // Initialize alpha blending function. glEnable( GL_BLEND ); glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); -} - - // set viewing projection - - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - -#define MAX_VIEW_ANGLE 160.0 / 45.0 - if( g_Parm_3D_Visu.m_Zoom > MAX_VIEW_ANGLE ) - g_Parm_3D_Visu.m_Zoom = MAX_VIEW_ANGLE; - - if( Parent()->ModeIsOrtho() ) - { - // OrthoReductionFactor is chosen so as to provide roughly the same size as - // Perspective View - const double orthoReductionFactor = 400 / g_Parm_3D_Visu.m_Zoom; - - // Initialize Projection Matrix for Ortographic View - glOrtho( -size.x / orthoReductionFactor, size.x / orthoReductionFactor, - -size.y / orthoReductionFactor, size.y / orthoReductionFactor, 1, 10 ); - } - else - { - // Ratio width / height of the window display - double ratio_HV = (double) size.x / size.y; - - // Initialize Projection Matrix for Perspective View - gluPerspective( 45.0 * g_Parm_3D_Visu.m_Zoom, ratio_HV, 1, 10 ); - } - - - // position viewer - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - glTranslatef( 0.0F, 0.0F, -( m_ZBottom + m_ZTop) / 2 ); - - // clear color and depth buffers - glClearColor( g_Parm_3D_Visu.m_BgColor.m_Red, - g_Parm_3D_Visu.m_BgColor.m_Green, - g_Parm_3D_Visu.m_BgColor.m_Blue, 1 ); - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - - // Setup light sources: - SetLights(); - - CheckGLError(); + } } @@ -578,16 +569,19 @@ void EDA_3D_CANVAS::SetLights() /* set viewing projection */ light_color[3] = 1.0; - GLfloat Z_axis_pos[4] = { 0.0, 0.0, 3.0, 0.0 }; - GLfloat lowZ_axis_pos[4] = { 0.0, 0.0, -3.0, 0.5 }; + GLfloat Z_axis_pos[4] = { 0.0, 0.0, 30.0, 0.0 }; + GLfloat lowZ_axis_pos[4] = { 0.0, 0.0, -30.0, 0.5 }; /* activate light */ light = 1.0; light_color[0] = light_color[1] = light_color[2] = light; glLightfv( GL_LIGHT0, GL_POSITION, Z_axis_pos ); glLightfv( GL_LIGHT0, GL_DIFFUSE, light_color ); - light = 0.3; - light_color[0] = light_color[1] = light_color[2] = light; + + light_color[0] = 0.3; + light_color[1] = 0.3; + light_color[2] = 0.4; + glLightfv( GL_LIGHT1, GL_POSITION, lowZ_axis_pos ); glLightfv( GL_LIGHT1, GL_DIFFUSE, light_color ); glEnable( GL_LIGHT0 ); // White spot on Z axis @@ -654,7 +648,6 @@ void EDA_3D_CANVAS::TakeScreenshot( wxCommandEvent& event ) viewport.x, viewport.y, GL_ALPHA, GL_UNSIGNED_BYTE, alphabuffer ); - image.SetData( pixelbuffer ); image.SetAlpha( alphabuffer ); image = image.Mirror( false ); diff --git a/3d-viewer/3d_canvas.h b/3d-viewer/3d_canvas.h index b68541dfdf..6831cc8a04 100644 --- a/3d-viewer/3d_canvas.h +++ b/3d-viewer/3d_canvas.h @@ -43,10 +43,11 @@ #endif #include <3d_struct.h> - +#include + class BOARD_DESIGN_SETTINGS; class EDA_3D_FRAME; -class S3D_VERTEX; + class VIA; class D_PAD; @@ -61,8 +62,14 @@ enum GL_LIST_ID GL_ID_BOARD, // List id for copper layers GL_ID_TECH_LAYERS, // List id for non copper layers (masks...) GL_ID_AUX_LAYERS, // List id for user layers (draw, eco, comment) - GL_ID_3DSHAPES_SOLID, // List id for 3D shapes, non transparent entities - GL_ID_3DSHAPES_TRANSP, // List id for 3D shapes, transparent entities + GL_ID_3DSHAPES_SOLID_FRONT, // List id for 3D shapes, non transparent entities + GL_ID_3DSHAPES_TRANSP_FRONT,// List id for 3D shapes, transparent entities + GL_ID_3DSHAPES_SOLID_BACK, // List id for 3D shapes, non transparent entities + GL_ID_3DSHAPES_TRANSP_BACK,// List id for 3D shapes, transparent entities + GL_ID_SHADOW_FRONT, + GL_ID_SHADOW_BACK, + GL_ID_SHADOW_BOARD, + GL_ID_BODY, // Body only list GL_ID_END }; @@ -76,6 +83,16 @@ private: double m_ZBottom; // position of the back layer double m_ZTop; // position of the front layer + GLuint m_text_pcb; + GLuint m_text_silk; + + bool m_shadow_init; + GLuint m_text_fake_shadow_front; + GLuint m_text_fake_shadow_back; + GLuint m_text_fake_shadow_board; + + void Create_and_Render_Shadow_Buffer( GLuint *aDst_gl_texture, GLuint aTexture_size, bool aDraw_body, int aBlurPasses ); + public: EDA_3D_CANVAS( EDA_3D_FRAME* parent, int* attribList = 0 ); ~EDA_3D_CANVAS(); @@ -122,6 +139,9 @@ public: m_draw3dOffset.x = aPosX; m_draw3dOffset.y = aPosY; } + void SetGLTechLayersColor( LAYER_NUM aLayer ); + void SetGLCopperColor(); + void SetGLEpoxyColor( double aTransparency = 1.0 ); /** * Function BuildBoard3DView @@ -129,7 +149,7 @@ public: * Populates the OpenGL GL_ID_BOARD draw list with board items only on copper layers. * 3D footprint shapes, tech layers and aux layers are not on this list */ - void BuildBoard3DView(); + void BuildBoard3DView(GLuint aBoardList, GLuint aBodyOnlyList); /** * Function BuildTechLayers3DView @@ -138,6 +158,12 @@ public: */ void BuildTechLayers3DView(); + /** + * Function BuildShadowList + * Called by CreateDrawGL_List() + */ + void BuildShadowList( GLuint aFrontList, GLuint aBacklist, GLuint aBoardList ); + /** * Function BuildFootprintShape3DList * Called by CreateDrawGL_List() @@ -148,7 +174,8 @@ public: * which need to be drawn after all other items */ void BuildFootprintShape3DList( GLuint aOpaqueList, - GLuint aTransparentList); + GLuint aTransparentList, + bool aSideToLoad ); /** * Function BuildBoard3DAuxLayers * Called by CreateDrawGL_List() @@ -163,7 +190,11 @@ public: void Draw3DViaHole( const VIA * aVia ); void Draw3DPadHole( const D_PAD * aPad ); + void GenerateFakeShadowsTextures(); + DECLARE_EVENT_TABLE() }; +void CheckGLError(const char *aFileName, int aLineNumber); + #endif /* _3D_CANVAS_H_ */ diff --git a/3d-viewer/3d_class.cpp b/3d-viewer/3d_class.cpp index b364d23e5b..3aae8e8c17 100644 --- a/3d-viewer/3d_class.cpp +++ b/3d-viewer/3d_class.cpp @@ -30,36 +30,6 @@ #include <3d_viewer.h> -S3D_MATERIAL::S3D_MATERIAL( S3D_MASTER* father, const wxString& name ) : - EDA_ITEM( father, NOT_USED ) -{ - m_DiffuseColor.x = m_DiffuseColor.y = m_DiffuseColor.z = 1.0; - m_SpecularColor.x = m_SpecularColor.y = m_SpecularColor.z = 1.0; - m_AmbientIntensity = 1.0; - m_Transparency = 0.0; - m_Shininess = 1.0; - m_Name = name; -} - -void S3D_MATERIAL::SetMaterial() -{ - S3D_MASTER * s3dParent = (S3D_MASTER *) GetParent(); - s3dParent->SetLastTransparency( m_Transparency ); - - if( ! s3dParent->IsOpenGlAllowed() ) - return; - - glColorMaterial( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE ); - glColor4f( m_DiffuseColor.x * m_AmbientIntensity, - m_DiffuseColor.y * m_AmbientIntensity, - m_DiffuseColor.z * m_AmbientIntensity, - 1.0 - m_Transparency ); -#if 0 - glColorMaterial( GL_FRONT_AND_BACK, GL_SPECULAR ); - glColor3f( m_SpecularColor.x, m_SpecularColor.y, m_SpecularColor.z ); - glColorMaterial( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE ); -#endif -} bool S3D_MASTER::IsOpenGlAllowed() { @@ -68,9 +38,12 @@ bool S3D_MASTER::IsOpenGlAllowed() if( m_lastTransparency == 0.0 ) return true; } - if( m_loadTransparentObjects ) // return true for transparent objects only + + if( m_loadTransparentObjects ) // return true for transparent objects only + { if( m_lastTransparency != 0.0 ) return true; + } return false; } @@ -102,6 +75,13 @@ S3D_MASTER::S3D_MASTER( EDA_ITEM* aParent ) : m_3D_Drawings = NULL; m_Materials = NULL; m_ShapeType = FILE3D_NONE; + + m_use_modelfile_diffuseColor = true; + m_use_modelfile_emissiveColor = false; + m_use_modelfile_specularColor = false; + m_use_modelfile_ambientIntensity = false; + m_use_modelfile_transparency = true; + m_use_modelfile_shininess = false; } diff --git a/3d-viewer/3d_draw.cpp b/3d-viewer/3d_draw.cpp index 14a04ff7bd..1faac36d9b 100644 --- a/3d-viewer/3d_draw.cpp +++ b/3d-viewer/3d_draw.cpp @@ -1,7 +1,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2014 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 @@ -43,15 +43,14 @@ #include #include +#include // must be included before gl.h + #include <3d_viewer.h> #include <3d_canvas.h> #include #include #include <3d_draw_basic_functions.h> -// Imported function: -extern void CheckGLError(); - /* Helper function * returns true if aLayer should be displayed, false otherwise */ @@ -99,6 +98,252 @@ static void BuildPadShapeThickOutlineAsPolygon( D_PAD* aPad, } +// Based on the tutorial by http://www.ulrichmierendorff.com/software/opengl_blur.html +/* It will blur a openGL texture + * + */ +static void blur_tex( GLuint aTex, int aPasses, GLuint aTexture_size ) +{ + int i, x, y; + + glFlush(); + glFinish(); + + glPushAttrib( GL_ALL_ATTRIB_BITS ); + + glDisable( GL_LIGHTING ); + + glDisable( GL_CULL_FACE ); + glDisable( GL_DEPTH_TEST ); + glDisable( GL_ALPHA_TEST ); + glDisable( GL_COLOR_MATERIAL ); + + glReadBuffer( GL_BACK_LEFT ); + glPixelStorei( GL_PACK_ALIGNMENT, 1 ); + glPixelStorei( GL_UNPACK_ALIGNMENT, 1 ); + + + glViewport( 0, 0, aTexture_size, aTexture_size ); + + glClearColor( 1.0f, 1.0f, 1.0f, 1.0f ); + glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); + + glMatrixMode( GL_PROJECTION ); + glPushMatrix(); + glLoadIdentity(); + + glOrtho( 0.0f, aTexture_size, aTexture_size, 0.0f, -1.0f, 1.0f ); + + glMatrixMode( GL_MODELVIEW ); + glLoadIdentity(); + + glEnable( GL_BLEND ); + glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); + + glEnable( GL_TEXTURE_2D ); + glBindTexture( GL_TEXTURE_2D, aTex ); + glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE ); + glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE ); + + while (aPasses > 0) + { + i = 0; + for (x = 0; x < 2; x++) + { + for (y = 0; y < 2; y++, i++) + { + glColor4f (1.0f,1.0f,1.0f,1.0 / (i + 1.0)); + glBegin(GL_TRIANGLE_STRIP); + glTexCoord2f( 0 + (x - 0.5)/aTexture_size, 1 + (y-0.5)/aTexture_size ); + glVertex2f( 0, 0 ); + glTexCoord2f( 0 + (x - 0.5)/aTexture_size, 0 + (y-0.5)/aTexture_size ); + glVertex2f( 0, aTexture_size ); + glTexCoord2f( 1 + (x - 0.5)/aTexture_size, 1 + (y-0.5)/aTexture_size ); + glVertex2f( aTexture_size, 0 ); + glTexCoord2f( 1 + (x - 0.5)/aTexture_size, 0 + (y-0.5)/aTexture_size ); + glVertex2f( aTexture_size, aTexture_size ); + glEnd (); + } + } + glCopyTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, 0, 0, aTexture_size, aTexture_size, 0 ); + aPasses--; + } + + glFlush(); + glFinish(); + glDisable( GL_BLEND ); + + glMatrixMode( GL_PROJECTION ); + glPopMatrix(); + + glPopAttrib(); + + glEnable(GL_DEPTH_TEST); +} + + +void EDA_3D_CANVAS::Create_and_Render_Shadow_Buffer( GLuint *aDst_gl_texture, + GLuint aTexture_size, bool aDraw_body, int aBlurPasses ) +{ + + float *depthbufferFloat = (float*) malloc( aTexture_size * aTexture_size * sizeof(float) ); + unsigned char *depthbufferRGBA = (unsigned char*) malloc( aTexture_size * aTexture_size * 4 ); + + glDisable( GL_TEXTURE_2D ); + + glViewport( 0, 0, aTexture_size, aTexture_size ); + + glClearColor( 1.0f, 1.0f, 1.0f, 1.0f ); + glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); + + // move the board in order to draw it with its center at 0,0 3D coordinates + glTranslatef( -g_Parm_3D_Visu.m_BoardPos.x * g_Parm_3D_Visu.m_BiuTo3Dunits, + -g_Parm_3D_Visu.m_BoardPos.y * g_Parm_3D_Visu.m_BiuTo3Dunits, + 0.0F ); + + if( aDraw_body ) + { + if( m_glLists[GL_ID_BODY] ) + { + glCallList( m_glLists[GL_ID_BOARD] ); + } + } + + // Call model list + glCallList( m_glLists[GL_ID_3DSHAPES_SOLID_FRONT] ); + + if( m_glLists[GL_ID_3DSHAPES_TRANSP_FRONT] ) + { + glCallList( m_glLists[GL_ID_3DSHAPES_TRANSP_FRONT] ); + } + + glPixelStorei( GL_PACK_ALIGNMENT, 4 ); + glReadBuffer( GL_BACK_LEFT ); + + glFinish(); + + glReadPixels( 0, 0, + aTexture_size, aTexture_size, + GL_DEPTH_COMPONENT, GL_FLOAT, depthbufferFloat ); + + + glFinish(); + + for( unsigned int i = 0; i< (aTexture_size * aTexture_size); i++ ) + { + unsigned char v = depthbufferFloat[i] * 255; + depthbufferRGBA[i * 4 + 0] = v; + depthbufferRGBA[i * 4 + 1] = v; + depthbufferRGBA[i * 4 + 2] = v; + depthbufferRGBA[i * 4 + 3] = 255; + } + + glFinish(); + + glEnable( GL_TEXTURE_2D ); + glGenTextures( 1, aDst_gl_texture ); + glBindTexture( GL_TEXTURE_2D, *aDst_gl_texture ); + glTexEnvf( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE ); + + + glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE ); + glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE ); + glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR ); + glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR ); + + glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, aTexture_size, aTexture_size, 0, GL_RGBA, GL_UNSIGNED_BYTE, depthbufferRGBA ); + + glFlush(); + glFinish(); + + CheckGLError( __FILE__, __LINE__ ); + + blur_tex( *aDst_gl_texture, aBlurPasses, aTexture_size ); + + glEnable( GL_TEXTURE_2D ); + glBindTexture( GL_TEXTURE_2D, *aDst_gl_texture ); + + glGetTexImage( GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE, depthbufferRGBA ); + + for(unsigned int i = 0; i< (aTexture_size * aTexture_size); i++) + { + float v = (float)depthbufferRGBA[i * 4] / 255.0f; + v = v * v; + depthbufferRGBA[i * 4 + 0] = 0; + depthbufferRGBA[i * 4 + 1] = 0; + depthbufferRGBA[i * 4 + 2] = 0; + depthbufferRGBA[i * 4 + 3] = 255 - (unsigned char)(v * 255); + } + + glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE ); + glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE ); + glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR ); + glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR ); + + glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, aTexture_size, aTexture_size, 0, GL_RGBA, GL_UNSIGNED_BYTE, depthbufferRGBA ); + + free( depthbufferRGBA ); + free( depthbufferFloat ); +} + +#define SHADOW_BOARD_SCALE 1.5f + +void EDA_3D_CANVAS::GenerateFakeShadowsTextures() +{ + if( m_shadow_init == true ) + { + return; + } + m_shadow_init = true; + + CreateDrawGL_List(); + + glClearColor( 0, 0, 0, 1 ); + + glMatrixMode( GL_PROJECTION ); + glLoadIdentity(); + glOrtho( -g_Parm_3D_Visu.m_BoardSize.x * g_Parm_3D_Visu.m_BiuTo3Dunits / 2.0f, + g_Parm_3D_Visu.m_BoardSize.x * g_Parm_3D_Visu.m_BiuTo3Dunits / 2.0f, + -g_Parm_3D_Visu.m_BoardSize.y * g_Parm_3D_Visu.m_BiuTo3Dunits / 2.0f, + g_Parm_3D_Visu.m_BoardSize.y * g_Parm_3D_Visu.m_BiuTo3Dunits / 2.0f, + 0.0, 3500000 * g_Parm_3D_Visu.m_BiuTo3Dunits ); + + + // Render FRONT shadow + glMatrixMode( GL_MODELVIEW ); + glLoadIdentity(); + glTranslatef( 0, 0, 0.03 ); + glRotatef( 180, 0.0, 1.0, 0.0 ); + + Create_and_Render_Shadow_Buffer( &m_text_fake_shadow_front, 512, false, 5 ); + + + // Render BACK shadow + glMatrixMode( GL_MODELVIEW ); + glLoadIdentity(); + glTranslatef( 0, 0, 0.03 ); + ///glRotatef( 0.0, 0.0, 1.0, 0.0 ); + + Create_and_Render_Shadow_Buffer( &m_text_fake_shadow_back, 512, false, 5 ); + + // Render ALL BOARD shadow + glMatrixMode( GL_PROJECTION ); + glLoadIdentity(); + glOrtho( -g_Parm_3D_Visu.m_BoardSize.x * SHADOW_BOARD_SCALE * g_Parm_3D_Visu.m_BiuTo3Dunits / 2.0f, + g_Parm_3D_Visu.m_BoardSize.x * SHADOW_BOARD_SCALE * g_Parm_3D_Visu.m_BiuTo3Dunits / 2.0f, + -g_Parm_3D_Visu.m_BoardSize.y * SHADOW_BOARD_SCALE * g_Parm_3D_Visu.m_BiuTo3Dunits / 2.0f, + g_Parm_3D_Visu.m_BoardSize.y * SHADOW_BOARD_SCALE * g_Parm_3D_Visu.m_BiuTo3Dunits / 2.0f, + 0.0, 6.0f * 3500000 * g_Parm_3D_Visu.m_BiuTo3Dunits ); + + glMatrixMode( GL_MODELVIEW ); + glLoadIdentity(); + glTranslatef( 0, 0, -0.4f ); + glRotatef( 180.0, 0.0, 1.0, 0.0 ); + + Create_and_Render_Shadow_Buffer( &m_text_fake_shadow_board, 512, true, 10 ); +} + + void EDA_3D_CANVAS::Redraw() { // SwapBuffer requires the window to be shown before calling @@ -113,13 +358,90 @@ void EDA_3D_CANVAS::Redraw() // multiple canvases: If we updated the viewport in the wxSizeEvent // handler, changing the size of one canvas causes a viewport setting that // is wrong when next another canvas is repainted. - const wxSize ClientSize = GetClientSize(); - - // *MUST* be called *after* SetCurrent( ): - glViewport( 0, 0, ClientSize.x, ClientSize.y ); + wxSize size = GetClientSize(); InitGL(); + if( g_Parm_3D_Visu.GetFlag( FL_MODULE ) && g_Parm_3D_Visu.IsRealisticMode() && g_Parm_3D_Visu.HightQualityMode() ) + { + GenerateFakeShadowsTextures (); + } + + // *MUST* be called *after* SetCurrent( ): + glViewport( 0, 0, size.x, size.y ); + + // clear color and depth buffers + glClearColor( 0.95, 0.95, 1.0, 1.0 ); + glClearStencil( 0 ); + glClearDepth( 1.0 ); + glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT ); + + // Draw background + glMatrixMode( GL_PROJECTION ); + glLoadIdentity(); + + glMatrixMode( GL_MODELVIEW ); + glLoadIdentity(); + + glDisable( GL_LIGHTING ); + glDisable( GL_COLOR_MATERIAL ); + glDisable( GL_DEPTH_TEST ); + glDisable( GL_TEXTURE_2D ); + + glBegin( GL_QUADS ); + glColor4f( 0.95, 0.95, 1.0, 1.0 ); + glVertex2f( -1.0, 0.85 ); + + glColor4f( g_Parm_3D_Visu.m_BgColor.m_Red, + g_Parm_3D_Visu.m_BgColor.m_Green, + g_Parm_3D_Visu.m_BgColor.m_Blue, 1.0 ); + glVertex2f( -1.0,-1.0 ); + glVertex2f( 1.0,-1.0 ); + + glColor4f( 0.95, 0.95, 1.0, 1.0 ); + glVertex2f( 1.0, 0.85 ); + glEnd(); + glEnable( GL_DEPTH_TEST ); + + + // set viewing projection + glMatrixMode( GL_PROJECTION ); + glLoadIdentity(); + +#define MAX_VIEW_ANGLE 160.0 / 45.0 + if( g_Parm_3D_Visu.m_Zoom > MAX_VIEW_ANGLE ) + g_Parm_3D_Visu.m_Zoom = MAX_VIEW_ANGLE; + + if( Parent()->ModeIsOrtho() ) + { + // OrthoReductionFactor is chosen to provide roughly the same size as + // Perspective View + const double orthoReductionFactor = 400 / g_Parm_3D_Visu.m_Zoom; + + // Initialize Projection Matrix for Ortographic View + glOrtho( -size.x / orthoReductionFactor, size.x / orthoReductionFactor, + -size.y / orthoReductionFactor, size.y / orthoReductionFactor, 1, 100 ); + } + else + { + // Ratio width / height of the window display + double ratio_HV = (double) size.x / size.y; + + // Initialize Projection Matrix for Perspective View + gluPerspective( 45.0 * g_Parm_3D_Visu.m_Zoom, ratio_HV, 1, 100 ); + } + + // position viewer + glMatrixMode( GL_MODELVIEW ); + glLoadIdentity(); + + glTranslatef( 0.0F, 0.0F, -( m_ZBottom + m_ZTop) / 2 ); + + // Setup light sources: + SetLights(); + + CheckGLError( __FILE__, __LINE__ ); + glMatrixMode( GL_MODELVIEW ); // position viewer // transformations GLfloat mat[4][4]; @@ -134,6 +456,7 @@ void EDA_3D_CANVAS::Redraw() glRotatef( g_Parm_3D_Visu.m_Rot[1], 0.0, 1.0, 0.0 ); glRotatef( g_Parm_3D_Visu.m_Rot[2], 0.0, 0.0, 1.0 ); + if( ! m_glLists[GL_ID_BOARD] || ! m_glLists[GL_ID_TECH_LAYERS] ) CreateDrawGL_List(); @@ -147,8 +470,28 @@ void EDA_3D_CANVAS::Redraw() // draw all objects in lists // transparent objects should be drawn after opaque objects - glCallList( m_glLists[GL_ID_BOARD] ); - glCallList( m_glLists[GL_ID_TECH_LAYERS] ); + + if( g_Parm_3D_Visu.GetFlag( FL_MODULE ) ) + { + if( ! m_glLists[GL_ID_3DSHAPES_SOLID_FRONT] ) + CreateDrawGL_List(); + } + + + glDisable( GL_TEXTURE_2D ); + glEnable( GL_COLOR_MATERIAL ); + SetOpenGlDefaultMaterial(); + glColor4f( 1.0, 1.0, 1.0, 1.0 ); + + if( m_glLists[GL_ID_BOARD] ) + { + glCallList( m_glLists[GL_ID_BOARD] ); + } + + if( m_glLists[GL_ID_TECH_LAYERS] ) + { + glCallList( m_glLists[GL_ID_TECH_LAYERS] ); + } if( g_Parm_3D_Visu.GetFlag( FL_COMMENTS ) || g_Parm_3D_Visu.GetFlag( FL_COMMENTS ) ) { @@ -158,12 +501,56 @@ void EDA_3D_CANVAS::Redraw() glCallList( m_glLists[GL_ID_AUX_LAYERS] ); } + // Draw Component Shadow + if( g_Parm_3D_Visu.GetFlag( FL_MODULE ) && g_Parm_3D_Visu.IsRealisticMode() && g_Parm_3D_Visu.HightQualityMode() ) + { + glEnable( GL_CULL_FACE ); + glDisable( GL_DEPTH_TEST ); + + glEnable( GL_COLOR_MATERIAL ) ; + SetOpenGlDefaultMaterial(); + glColor4f( 1.0, 1.0, 1.0, 1.0 ); + + glEnable( GL_TEXTURE_2D ); + + glEnable( GL_BLEND ); + glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); + + if( m_glLists[GL_ID_SHADOW_FRONT] ) + { + glBindTexture( GL_TEXTURE_2D, m_text_fake_shadow_front ); + glCallList( m_glLists[GL_ID_SHADOW_FRONT] ); + } + + if( m_glLists[GL_ID_SHADOW_BACK] ) + { + glBindTexture( GL_TEXTURE_2D, m_text_fake_shadow_back ); + glCallList( m_glLists[GL_ID_SHADOW_BACK] ); + } + + glColor4f( 1.0, 1.0, 1.0, 1.0 ); + + glEnable( GL_DEPTH_TEST ); + glDisable( GL_TEXTURE_2D ); + glDisable( GL_CULL_FACE ); + } + + glEnable(GL_COLOR_MATERIAL); + SetOpenGlDefaultMaterial(); + + + glEnable( GL_BLEND ); + glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); + + glColor4f( 1.0, 1.0, 1.0, 1.0 ); + + // Draw Solid Shapes if( g_Parm_3D_Visu.GetFlag( FL_MODULE ) ) { - if( ! m_glLists[GL_ID_3DSHAPES_SOLID] ) + if( ! m_glLists[GL_ID_3DSHAPES_SOLID_FRONT] ) CreateDrawGL_List(); - glCallList( m_glLists[GL_ID_3DSHAPES_SOLID] ); + glCallList( m_glLists[GL_ID_3DSHAPES_SOLID_FRONT] ); } // Grid uses transparency: draw it after all objects @@ -173,16 +560,31 @@ void EDA_3D_CANVAS::Redraw() // This list must be drawn last, because it contains the // transparent gl objects, which should be drawn after all // non transparent objects - if( g_Parm_3D_Visu.GetFlag( FL_MODULE ) && m_glLists[GL_ID_3DSHAPES_TRANSP] ) - glCallList( m_glLists[GL_ID_3DSHAPES_TRANSP] ); + if( g_Parm_3D_Visu.GetFlag( FL_MODULE ) && m_glLists[GL_ID_3DSHAPES_TRANSP_FRONT] ) + glCallList( m_glLists[GL_ID_3DSHAPES_TRANSP_FRONT] ); + // Draw Board Shadow + if( g_Parm_3D_Visu.GetFlag( FL_MODULE ) && g_Parm_3D_Visu.IsRealisticMode() && g_Parm_3D_Visu.HightQualityMode() ) + { + if( m_glLists[GL_ID_SHADOW_BOARD] ) + { + glEnable( GL_CULL_FACE ); + glDisable( GL_COLOR_MATERIAL ); + glEnable( GL_TEXTURE_2D ); + glBindTexture( GL_TEXTURE_2D, m_text_fake_shadow_board ); + glCallList( m_glLists[GL_ID_SHADOW_BOARD] ); + glDisable( GL_CULL_FACE ); + } + } SwapBuffers(); } // Helper function: initialize the copper color to draw the board // in realistic mode. -static inline void SetGLCopperColor() +void EDA_3D_CANVAS::SetGLCopperColor() { + glDisable( GL_TEXTURE_2D ); + // Generates a golden yellow color, near board "copper" color const double lum = 0.7/255.0; glColor4f( 255.0*lum, 223.0*lum, 0.0*lum, 1.0 ); @@ -190,7 +592,7 @@ static inline void SetGLCopperColor() // Helper function: initialize the color to draw the epoxy // body board in realistic mode. -static inline void SetGLEpoxyColor( double aTransparency = 1.0 ) +void EDA_3D_CANVAS::SetGLEpoxyColor( double aTransparency ) { // Generates an epoxy color, near board color const double lum = 0.2/255.0; @@ -208,8 +610,10 @@ static inline void SetGLSolderMaskColor( double aTransparency = 1.0 ) // Helper function: initialize the color to draw the non copper layers // in realistic mode and normal mode. -static inline void SetGLTechLayersColor( LAYER_NUM aLayer ) +void EDA_3D_CANVAS::SetGLTechLayersColor( LAYER_NUM aLayer ) { + EDA_COLOR_T color; + if( g_Parm_3D_Visu.IsRealisticMode() ) { switch( aLayer ) @@ -222,28 +626,112 @@ static inline void SetGLTechLayersColor( LAYER_NUM aLayer ) case B_SilkS: case F_SilkS: SetGLColor( LIGHTGRAY, 0.9 ); + if( g_Parm_3D_Visu.HightQualityMode() ) + { + SetGLTexture( m_text_silk, 50.0f ); + } break; case B_Mask: case F_Mask: SetGLSolderMaskColor( 0.7 ); + if( g_Parm_3D_Visu.HightQualityMode() ) + { + SetGLTexture( m_text_pcb, 35.0f ); + } break; default: - EDA_COLOR_T color = g_ColorsSettings.GetLayerColor( aLayer ); + color = g_ColorsSettings.GetLayerColor( aLayer ); SetGLColor( color, 0.7 ); break; } } else { - EDA_COLOR_T color = g_ColorsSettings.GetLayerColor( aLayer ); + color = g_ColorsSettings.GetLayerColor( aLayer ); SetGLColor( color, 0.7 ); } } -void EDA_3D_CANVAS::BuildBoard3DView() +void EDA_3D_CANVAS::BuildShadowList( GLuint aFrontList, GLuint aBacklist, GLuint aBoardList ) +{ + // Use similar calculation as Grid limits, in 3D units + wxSize brd_size = g_Parm_3D_Visu.m_BoardSize; + wxPoint brd_center_pos = g_Parm_3D_Visu.m_BoardPos; + + float xsize = brd_size.x; + float ysize = brd_size.y; + + float scale = g_Parm_3D_Visu.m_BiuTo3Dunits; + float xmin = (brd_center_pos.x - xsize / 2.0) * scale; + float xmax = (brd_center_pos.x + xsize / 2.0) * scale; + float ymin = (brd_center_pos.y - ysize / 2.0) * scale; + float ymax = (brd_center_pos.y + ysize / 2.0) * scale; + + float zpos = g_Parm_3D_Visu.GetLayerZcoordBIU( F_Paste ); + zpos *= g_Parm_3D_Visu.m_BiuTo3Dunits; + + // Shadow FRONT + glNewList( aFrontList, GL_COMPILE ); + + glNormal3f( 0.0, 0.0, Get3DLayer_Z_Orientation( F_Paste ) ); + + glBegin (GL_QUADS); + glTexCoord2f( 1.0, 0.0 ); glVertex3f( xmin, ymin, zpos ); + glTexCoord2f( 0.0, 0.0 ); glVertex3f( xmax, ymin, zpos ); + glTexCoord2f( 0.0, 1.0 ); glVertex3f( xmax, ymax, zpos ); + glTexCoord2f( 1.0, 1.0 ); glVertex3f( xmin, ymax, zpos ); + glEnd(); + + glEndList(); + + + // Shadow BACK + zpos = g_Parm_3D_Visu.GetLayerZcoordBIU( B_Paste ); + zpos *= g_Parm_3D_Visu.m_BiuTo3Dunits; + + glNewList( aBacklist, GL_COMPILE ); + + glNormal3f( 0.0, 0.0, Get3DLayer_Z_Orientation( B_Paste ) ); + + glBegin (GL_QUADS); + glTexCoord2f( 0.0, 0.0 ); glVertex3f( xmin, ymin, zpos ); + glTexCoord2f( 0.0, 1.0 ); glVertex3f( xmin, ymax, zpos ); + glTexCoord2f( 1.0, 1.0 ); glVertex3f( xmax, ymax, zpos ); + glTexCoord2f( 1.0, 0.0 ); glVertex3f( xmax, ymin, zpos ); + glEnd(); + + glEndList(); + + + // Shadow BOARD + xsize = brd_size.x * SHADOW_BOARD_SCALE; + ysize = brd_size.y * SHADOW_BOARD_SCALE; + + scale = g_Parm_3D_Visu.m_BiuTo3Dunits; + xmin = (brd_center_pos.x - xsize / 2.0) * scale; + xmax = (brd_center_pos.x + xsize / 2.0) * scale; + ymin = (brd_center_pos.y - ysize / 2.0) * scale; + ymax = (brd_center_pos.y + ysize / 2.0) * scale; + + + glNewList( aBoardList, GL_COMPILE ); + glNormal3f( 0.0, 0.0, Get3DLayer_Z_Orientation( F_Paste ) ); + + glBegin (GL_QUADS); + glTexCoord2f( 1.0, 0.0 ); glVertex3f( xmin, ymin, zpos * 30.0); + glTexCoord2f( 0.0, 0.0 ); glVertex3f( xmax, ymin, zpos * 30.0); + glTexCoord2f( 0.0, 1.0 ); glVertex3f( xmax, ymax, zpos * 30.0); + glTexCoord2f( 1.0, 1.0 ); glVertex3f( xmin, ymax, zpos * 30.0); + glEnd(); + + glEndList(); +} + + +void EDA_3D_CANVAS::BuildBoard3DView(GLuint aBoardList, GLuint aBodyOnlyList) { BOARD* pcb = GetBoard(); @@ -298,6 +786,8 @@ void EDA_3D_CANVAS::BuildBoard3DView() LAYER_ID cu_seq[MAX_CU_LAYERS]; // preferred sequence, could have called CuStack() // but I assume that's backwards + glNewList( aBoardList, GL_COMPILE ); + for( unsigned i=0; im_Track; track; track = track->Next() ) + if ( !g_Parm_3D_Visu.GetFlag( FL_SHOW_BOARD_BODY ) ) { - const VIA *via = dynamic_cast(track); + SetGLCopperColor(); - if( via ) - Draw3DViaHole( via ); + // Draw vias holes (vertical cylinders) + for( const TRACK* track = pcb->m_Track; track; track = track->Next() ) + { + const VIA *via = dynamic_cast(track); + + if( via ) + Draw3DViaHole( via ); + } + + // Draw pads holes (vertical cylinders) + for( const MODULE* module = pcb->m_Modules; module; module = module->Next() ) + { + for( D_PAD* pad = module->Pads(); pad; pad = pad->Next() ) + Draw3DPadHole( pad ); + } } - // Draw pads holes (vertical cylinders) - for( const MODULE* module = pcb->m_Modules; module; module = module->Next() ) + if( g_Parm_3D_Visu.IsRealisticMode() ) { - for( D_PAD* pad = module->Pads(); pad; pad = pad->Next() ) - Draw3DPadHole( pad ); + SetGLEpoxyColor( 0.9 ); + if( g_Parm_3D_Visu.HightQualityMode() ) + { + SetGLTexture( m_text_pcb, 35.0f ); + } } + else + { + EDA_COLOR_T color = g_ColorsSettings.GetLayerColor( Edge_Cuts ); + SetGLColor( color, 0.7 ); + } + + float copper_thickness = g_Parm_3D_Visu.GetCopperThicknessBIU(); + + // a small offset between substrate and external copper layer to avoid artifacts + // when drawing copper items on board + float epsilon = Millimeter2iu( 0.01 ); + float zpos = g_Parm_3D_Visu.GetLayerZcoordBIU( B_Cu ); + float board_thickness = g_Parm_3D_Visu.GetLayerZcoordBIU( F_Cu ) + - g_Parm_3D_Visu.GetLayerZcoordBIU( B_Cu ); + + // items on copper layers and having a thickness = copper_thickness + // are drawn from zpos - copper_thickness/2 to zpos + copper_thickness + // therefore substrate position is copper_thickness/2 to + // substrate_height - copper_thickness/2 + zpos += (copper_thickness + epsilon) / 2.0; + board_thickness -= copper_thickness + epsilon; + + glNormal3f( 0.0, 0.0, Get3DLayer_Z_Orientation( F_Cu ) ); + KI_POLYGON_SET currLayerPolyset; + KI_POLYGON_SET polysetHoles; + + // Add polygons, without holes + bufferPcbOutlines.ExportTo( currLayerPolyset ); + + // Build holes list + allLayerHoles.ExportTo( polysetHoles ); + + // remove holes + currLayerPolyset -= polysetHoles; + + bufferPcbOutlines.RemoveAllContours(); + bufferPcbOutlines.ImportFrom( currLayerPolyset ); // Draw board substrate: if( bufferPcbOutlines.GetCornersCount() && - ( realistic_mode || g_Parm_3D_Visu.GetFlag( FL_SHOW_BOARD_BODY ) ) ) + ( g_Parm_3D_Visu.GetFlag( FL_SHOW_BOARD_BODY ) ) ) { - int copper_thickness = g_Parm_3D_Visu.GetCopperThicknessBIU(); - - // a small offset between substrate and external copper layer to avoid artifacts - // when drawing copper items on board - int epsilon = Millimeter2iu( 0.01 ); - int zpos = g_Parm_3D_Visu.GetLayerZcoordBIU( B_Cu ); - int board_thickness = g_Parm_3D_Visu.GetLayerZcoordBIU( F_Cu ) - - g_Parm_3D_Visu.GetLayerZcoordBIU( B_Cu ); - - // items on copper layers and having a thickness = copper_thickness - // are drawn from zpos - copper_thickness/2 to zpos + copper_thickness - // therefore substrate position is copper_thickness/2 to - // substrate_height - copper_thickness/2 - zpos += (copper_thickness + epsilon) / 2; - board_thickness -= copper_thickness + epsilon; - - if( realistic_mode ) - SetGLEpoxyColor(); - else - { - EDA_COLOR_T color = g_ColorsSettings.GetLayerColor( Edge_Cuts ); - SetGLColor( color, 0.7 ); - } - - glNormal3f( 0.0, 0.0, Get3DLayer_Z_Orientation( F_Cu ) ); - KI_POLYGON_SET currLayerPolyset; - KI_POLYGON_SET polysetHoles; - - // Add polygons, without holes - bufferPcbOutlines.ExportTo( currLayerPolyset ); - - // Build holes list - allLayerHoles.ExportTo( polysetHoles ); - - // remove holes - currLayerPolyset -= polysetHoles; - - bufferPcbOutlines.RemoveAllContours(); - bufferPcbOutlines.ImportFrom( currLayerPolyset ); // for Draw3D_SolidHorizontalPolyPolygons, zpos it the middle between bottom and top // sides - Draw3D_SolidHorizontalPolyPolygons( bufferPcbOutlines, zpos + board_thickness/2, + Draw3D_SolidHorizontalPolyPolygons( bufferPcbOutlines, zpos + board_thickness/2.0, board_thickness, g_Parm_3D_Visu.m_BiuTo3Dunits ); } + + glEndList(); + + + glNewList( aBodyOnlyList, GL_COMPILE ); + if( bufferPcbOutlines.GetCornersCount() ) + { + glColor4f( 1.0, 1.0, 1.0, 1.0 ); + Draw3D_SolidHorizontalPolyPolygons( bufferPcbOutlines, zpos + board_thickness/2.0, + board_thickness, g_Parm_3D_Visu.m_BiuTo3Dunits ); + } + glEndList(); } @@ -879,9 +1394,9 @@ void EDA_3D_CANVAS::CreateDrawGL_List() if( ! m_glLists[GL_ID_BOARD] ) { m_glLists[GL_ID_BOARD] = glGenLists( 1 ); - glNewList( m_glLists[GL_ID_BOARD], GL_COMPILE ); - BuildBoard3DView(); - glEndList(); + m_glLists[GL_ID_BODY] = glGenLists( 1 ); + BuildBoard3DView(m_glLists[GL_ID_BOARD], m_glLists[GL_ID_BODY]); + } if( ! m_glLists[GL_ID_TECH_LAYERS] ) @@ -902,22 +1417,27 @@ void EDA_3D_CANVAS::CreateDrawGL_List() // draw modules 3D shapes - if( ! m_glLists[GL_ID_3DSHAPES_SOLID] && g_Parm_3D_Visu.GetFlag( FL_MODULE ) ) + if( ! m_glLists[GL_ID_3DSHAPES_SOLID_FRONT] && g_Parm_3D_Visu.GetFlag( FL_MODULE ) ) { - m_glLists[GL_ID_3DSHAPES_SOLID] = glGenLists( 1 ); + m_glLists[GL_ID_3DSHAPES_SOLID_FRONT] = glGenLists( 1 ); - // GL_ID_3DSHAPES_TRANSP is an auxiliary list for 3D shapes; + // GL_ID_3DSHAPES_TRANSP_FRONT is an auxiliary list for 3D shapes; // Ensure it is cleared before rebuilding it - if( m_glLists[GL_ID_3DSHAPES_TRANSP] ) - glDeleteLists( m_glLists[GL_ID_3DSHAPES_TRANSP], 1 ); + if( m_glLists[GL_ID_3DSHAPES_TRANSP_FRONT] ) + glDeleteLists( m_glLists[GL_ID_3DSHAPES_TRANSP_FRONT], 1 ); - m_glLists[GL_ID_3DSHAPES_TRANSP] = glGenLists( 1 ); - BuildFootprintShape3DList( m_glLists[GL_ID_3DSHAPES_SOLID], - m_glLists[GL_ID_3DSHAPES_TRANSP] ); + m_glLists[GL_ID_3DSHAPES_TRANSP_FRONT] = glGenLists( 1 ); + BuildFootprintShape3DList( m_glLists[GL_ID_3DSHAPES_SOLID_FRONT], + m_glLists[GL_ID_3DSHAPES_TRANSP_FRONT], false ); + + m_glLists[GL_ID_SHADOW_FRONT] = glGenLists( 1 ); + m_glLists[GL_ID_SHADOW_BACK] = glGenLists( 1 ); + m_glLists[GL_ID_SHADOW_BOARD] = glGenLists( 1 ); + BuildShadowList(m_glLists[GL_ID_SHADOW_FRONT], m_glLists[GL_ID_SHADOW_BACK], m_glLists[GL_ID_SHADOW_BOARD]); } // Test for errors - CheckGLError(); + CheckGLError( __FILE__, __LINE__ ); #ifdef PRINT_CALCULATION_TIME unsigned endtime = GetRunningMicroSecs(); @@ -929,7 +1449,7 @@ void EDA_3D_CANVAS::CreateDrawGL_List() void EDA_3D_CANVAS::BuildFootprintShape3DList( GLuint aOpaqueList, - GLuint aTransparentList) + GLuint aTransparentList, bool aSideToLoad) { // aOpaqueList is the gl list for non transparent items // aTransparentList is the gl list for non transparent items, @@ -941,7 +1461,7 @@ void EDA_3D_CANVAS::BuildFootprintShape3DList( GLuint aOpaqueList, for( MODULE* module = pcb->m_Modules; module; module = module->Next() ) module->ReadAndInsert3DComponentShape( this, !loadTransparentObjects, - loadTransparentObjects ); + loadTransparentObjects, aSideToLoad ); glEndList(); @@ -950,7 +1470,7 @@ void EDA_3D_CANVAS::BuildFootprintShape3DList( GLuint aOpaqueList, for( MODULE* module = pcb->m_Modules; module; module = module->Next() ) module->ReadAndInsert3DComponentShape( this, !loadTransparentObjects, - loadTransparentObjects ); + loadTransparentObjects, aSideToLoad ); glEndList(); } @@ -1144,7 +1664,8 @@ void EDA_3D_CANVAS::Draw3DViaHole( const VIA* aVia ) void MODULE::ReadAndInsert3DComponentShape( EDA_3D_CANVAS* glcanvas, bool aAllowNonTransparentObjects, - bool aAllowTransparentObjects ) + bool aAllowTransparentObjects, + bool aSideToLoad ) { // Read from disk and draws the footprint 3D shapes if exists diff --git a/3d-viewer/3d_draw_basic_functions.cpp b/3d-viewer/3d_draw_basic_functions.cpp index 81654c4af7..b5d76f9884 100644 --- a/3d-viewer/3d_draw_basic_functions.cpp +++ b/3d-viewer/3d_draw_basic_functions.cpp @@ -33,10 +33,7 @@ #include <3d_viewer.h> #include #include <3d_draw_basic_functions.h> - -// Imported function: -extern void TransfertToGLlist( std::vector& aVertices, double aBiuTo3DUnits ); -extern void CheckGLError(); +#include // Number of segments to approximate a circle by segments #define SEGM_PER_CIRCLE 16 @@ -62,6 +59,7 @@ static inline void SetNormalZneg() glNormal3f( 0.0, 0.0, -1.0 ); } +void TransfertToGLlist( std::vector< S3D_VERTEX >& aVertices, double aBiuTo3DUnits ); /* Draw3D_VerticalPolygonalCylinder is a helper function. * @@ -132,6 +130,15 @@ void SetGLColor( EDA_COLOR_T color, double alpha ) glColor4f( red, green, blue, alpha ); } +static float m_texture_scale; + +void SetGLTexture( GLuint text_id, float scale ) +{ + glEnable( GL_TEXTURE_2D ); + glBindTexture( GL_TEXTURE_2D, text_id ); + m_texture_scale = scale; +} + /* draw all solid polygons found in aPolysList * aZpos = z position in board internal units @@ -152,9 +159,9 @@ void Draw3D_SolidHorizontalPolyPolygons( const CPOLYGONS_LIST& aPolysList, gluTessCallback( tess, GLU_TESS_VERTEX, ( void (CALLBACK*) () )tessCPolyPt2Vertex ); GLdouble v_data[3]; - double zpos = ( aZpos + (aThickness / 2) ) * aBiuTo3DUnits; + double zpos = ( aZpos + (aThickness / 2.0) ) * aBiuTo3DUnits; g_Parm_3D_Visu.m_CurrentZpos = zpos; - v_data[2] = aZpos + (aThickness / 2); + v_data[2] = aZpos + (aThickness / 2.0); // Set normal to toward positive Z axis, for a solid object only (to draw the top side) if( aThickness ) @@ -198,7 +205,7 @@ void Draw3D_SolidHorizontalPolyPolygons( const CPOLYGONS_LIST& aPolysList, break; // Prepare the bottom side of solid areas - zpos = ( aZpos - (aThickness / 2) ) * aBiuTo3DUnits; + zpos = ( aZpos - (aThickness / 2.0) ) * aBiuTo3DUnits; g_Parm_3D_Visu.m_CurrentZpos = zpos; v_data[2] = zpos; // Now;, set normal to toward negative Z axis, for the solid object bottom side @@ -211,7 +218,7 @@ void Draw3D_SolidHorizontalPolyPolygons( const CPOLYGONS_LIST& aPolysList, return; // Build the 3D data : vertical side - Draw3D_VerticalPolygonalCylinder( polylist, aThickness, aZpos - (aThickness / 2), false, aBiuTo3DUnits ); + Draw3D_VerticalPolygonalCylinder( polylist, aThickness, aZpos - (aThickness / 2.0), false, aBiuTo3DUnits ); } @@ -400,6 +407,12 @@ void CALLBACK tessCPolyPt2Vertex( const GLvoid* data ) // cast back to double type const CPolyPt* ptr = (const CPolyPt*) data; + if( g_Parm_3D_Visu.IsRealisticMode() && g_Parm_3D_Visu.HightQualityMode() ) + { + glTexCoord2f( ptr->x* g_Parm_3D_Visu.m_BiuTo3Dunits * m_texture_scale, + -ptr->y * g_Parm_3D_Visu.m_BiuTo3Dunits * m_texture_scale); + } + glVertex3d( ptr->x * g_Parm_3D_Visu.m_BiuTo3Dunits, -ptr->y * g_Parm_3D_Visu.m_BiuTo3Dunits, g_Parm_3D_Visu.m_CurrentZpos ); diff --git a/3d-viewer/3d_draw_basic_functions.h b/3d-viewer/3d_draw_basic_functions.h index a4fb60ab34..5cccba689f 100644 --- a/3d-viewer/3d_draw_basic_functions.h +++ b/3d-viewer/3d_draw_basic_functions.h @@ -126,4 +126,12 @@ void Draw3D_ZaxisOblongCylinder( wxPoint aAxis1Pos, wxPoint aAxis2Pos, void SetGLColor( EDA_COLOR_T aColor, double aTransparency = 1.0 ); +/** + * Set a texture id and a scale to apply when rendering the polygons + * @param text_id = texture ID created by glGenTextures + * @param scale = scale to apply to texture coords + */ +void SetGLTexture( GLuint text_id, float scale ); + + #endif // _3D_DRAW_BASIC_FUNCTIONS_H_ diff --git a/3d-viewer/3d_frame.cpp b/3d-viewer/3d_frame.cpp index 3ae8cb0853..c3c487ed3a 100644 --- a/3d-viewer/3d_frame.cpp +++ b/3d-viewer/3d_frame.cpp @@ -107,7 +107,8 @@ EDA_3D_FRAME::EDA_3D_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent, ReCreateMainToolbar(); // Make a EDA_3D_CANVAS - int attrs[] = { WX_GL_RGBA, WX_GL_DOUBLEBUFFER, WX_GL_DEPTH_SIZE, 16, 0 }; + int attrs[] = { WX_GL_RGBA, WX_GL_DOUBLEBUFFER, WX_GL_DEPTH_SIZE, 16, + WX_GL_STENCIL_SIZE, 1, 0 }; m_canvas = new EDA_3D_CANVAS( this, attrs ); m_auimgr.SetManagedWindow( this ); diff --git a/3d-viewer/3d_material.cpp b/3d-viewer/3d_material.cpp new file mode 100644 index 0000000000..ece265d25e --- /dev/null +++ b/3d-viewer/3d_material.cpp @@ -0,0 +1,136 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 Mario Luzeiro + * Copyright (C) 1992-2012 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 + */ +/** + * @file 3d_class.cpp + */ + +#include +#include <3d_struct.h> +#include <3d_material.h> + +#ifdef __WXMAC__ +# ifdef __DARWIN__ +# include +# else +# include +# endif +#else +# include +#endif + +S3D_MATERIAL::S3D_MATERIAL( S3D_MASTER* father, const wxString& name ) : + EDA_ITEM( father, NOT_USED ) +{ + m_Name = name; + m_AmbientColor.clear(); + m_DiffuseColor.clear(); + m_EmissiveColor.clear(); + m_SpecularColor.clear(); + m_Shininess.clear(); + m_Transparency.clear(); +} + + +void SetOpenGlDefaultMaterial() +{ + glm::vec4 ambient( 0.2, 0.2, 0.2, 1.0 ); + glm::vec4 specular( 0.1, 0.1, 0.1, 1.0 ); + glm::vec4 emissive( 0.1, 0.1, 0.1, 1.0 ); + GLint shininess_value = 100; + + glColorMaterial( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE ); + //glColor4f( 1.0, 1.0, 1.0, 1.0 ); + glMateriali ( GL_FRONT_AND_BACK, GL_SHININESS, shininess_value ); + glMaterialfv( GL_FRONT_AND_BACK, GL_EMISSION, &emissive.x ); + glMaterialfv( GL_FRONT_AND_BACK, GL_SPECULAR, &specular.x ); + glMaterialfv( GL_FRONT_AND_BACK, GL_AMBIENT, &ambient.x ); + +} + + +void S3D_MATERIAL::SetOpenGLMaterial( unsigned int materialIndex ) +{ + S3D_MASTER * s3dParent = (S3D_MASTER *) GetParent(); + + if( ! s3dParent->IsOpenGlAllowed() ) + return; + + float transparency_value = 0.0f; + if( m_Transparency.size() > materialIndex ) + { + transparency_value = m_Transparency[materialIndex]; + s3dParent->SetLastTransparency( transparency_value ); + } + + if( m_DiffuseColor.size() > materialIndex ) + { + glm::vec3 color = m_DiffuseColor[materialIndex]; + + if( m_AmbientColor.size() == 0 ) + { + glColorMaterial( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE ); + } + + glColor4f( color.x, color.y, color.z, 1.0 - transparency_value ); + } + + if( m_Shininess.size() > materialIndex ) + { + glMateriali(GL_FRONT_AND_BACK, GL_SHININESS, m_Shininess[materialIndex] ); + } + + // emissive + if( m_EmissiveColor.size() > materialIndex ) + { + glm::vec4 emissive; + emissive[0] = m_EmissiveColor[materialIndex].x; + emissive[1] = m_EmissiveColor[materialIndex].y; + emissive[2] = m_EmissiveColor[materialIndex].z; + emissive[3] = 1.0f; + glMaterialfv( GL_FRONT_AND_BACK, GL_EMISSION, &emissive.x ); + } + + // specular + if( m_SpecularColor.size() > materialIndex ) + { + glm::vec4 specular; + specular[0] = m_SpecularColor[materialIndex].x; + specular[1] = m_SpecularColor[materialIndex].y; + specular[2] = m_SpecularColor[materialIndex].z; + specular[3] = 1.0f; + glMaterialfv( GL_FRONT_AND_BACK, GL_SPECULAR, &specular.x ); + } + + // ambient + if( m_AmbientColor.size() > materialIndex ) + { + glm::vec4 ambient; + ambient[0] = m_AmbientColor[materialIndex].x; + ambient[1] = m_AmbientColor[materialIndex].y; + ambient[2] = m_AmbientColor[materialIndex].z; + ambient[3] = 1.0f; + glMaterialfv( GL_FRONT_AND_BACK, GL_AMBIENT, &ambient.x ); + } +} + diff --git a/3d-viewer/3d_material.h b/3d-viewer/3d_material.h new file mode 100644 index 0000000000..180825d105 --- /dev/null +++ b/3d-viewer/3d_material.h @@ -0,0 +1,66 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 Mario Luzeiro + * Copyright (C) 1992-2014 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 + */ + +/** + * @file 3d_material.h + */ + +#ifndef STRUCT_3D_MATERIAL_H +#define STRUCT_3D_MATERIAL_H + +#include +#include +#include + +class S3D_MASTER; + +class S3D_MATERIAL : public EDA_ITEM /* openGL "material" data*/ +{ +public: + wxString m_Name; + + // Material list + std::vector< glm::vec3 > m_AmbientColor; + std::vector< glm::vec3 > m_DiffuseColor; + std::vector< glm::vec3 > m_EmissiveColor; + std::vector< glm::vec3 > m_SpecularColor; + std::vector< float > m_Shininess; + std::vector< float > m_Transparency; + +public: + S3D_MATERIAL( S3D_MASTER* father, const wxString& name ); + + S3D_MATERIAL* Next() const { return (S3D_MATERIAL*) Pnext; } + S3D_MATERIAL* Back() const { return (S3D_MATERIAL*) Pback; } + + void SetOpenGLMaterial(unsigned int materialIndex); + +#if defined(DEBUG) + void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override +#endif +}; + +void SetOpenGlDefaultMaterial(); + +#endif diff --git a/3d-viewer/3d_mesh_model.cpp b/3d-viewer/3d_mesh_model.cpp new file mode 100644 index 0000000000..b951733d50 --- /dev/null +++ b/3d-viewer/3d_mesh_model.cpp @@ -0,0 +1,387 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 Mario Luzeiro + * Copyright (C) 1992-2014 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 + */ + +/** + * @file 3d_mesh_model.cpp + * @brief + */ + + +#include <3d_mesh_model.h> +#include + +S3D_MESH::S3D_MESH() +{ + isPerFaceNormalsComputed = false; + isPointNormalizedComputed = false; + isPerPointNormalsComputed = false; + m_Materials = NULL; + childs.clear(); + + m_translation = glm::vec3( 0.0f, 0.0f, 0.0f ); + m_rotation = glm::vec4( 0.0f, 0.0f, 0.0f, 0.0f ); + m_scale = glm::vec3( 1.0f, 1.0f, 1.0f ); + m_scaleOrientation = glm::vec4( 0.0f, 0.0f, 1.0f, 0.0f ); // not used + m_center = glm::vec3( 0.0f, 0.0f, 0.0f ); // not used +} + + +S3D_MESH::~S3D_MESH() +{ + for( unsigned int idx = 0; idx < childs.size(); idx++ ) + { + delete childs[idx]; + } +} + +void S3D_MESH::openGL_RenderAllChilds() +{ + glPushMatrix(); + glTranslatef( m_translation.x, m_translation.y, m_translation.z ); + glRotatef( m_rotation[3], m_rotation[0], m_rotation[1], m_rotation[2] ); + glScalef( m_scale.x, m_scale.y, m_scale.z ); + + SetOpenGlDefaultMaterial(); + + // Render your self + openGL_Render(); + + // Render childs + for( unsigned int idx = 0; idx < childs.size(); idx++ ) + { + childs[idx]->openGL_Render(); + } + + SetOpenGlDefaultMaterial(); + + glPopMatrix(); +} + + +void S3D_MESH::openGL_Render() +{ + //DBG( printf( " render\n" ) ); + + if( m_Materials ) + { + m_Materials->SetOpenGLMaterial( 0 ); + } + + if( m_CoordIndex.size() == 0) + { + return; + } + + glPushMatrix(); + glTranslatef( m_translation.x, m_translation.y, m_translation.z ); + glRotatef( m_rotation[3], m_rotation[0], m_rotation[1], m_rotation[2] ); + glScalef( m_scale.x, m_scale.y, m_scale.z ); + + std::vector< glm::vec3 > normals; + + calcPointNormalized(); + calcPerFaceNormals(); + + if( m_PerVertexNormalsNormalized.size() == 0 ) + { + if( g_Parm_3D_Visu.IsRealisticMode() && g_Parm_3D_Visu.HightQualityMode() ) + { + calcPerPointNormals(); + } + } + + for( unsigned int idx = 0; idx < m_CoordIndex.size(); idx++ ) + { + if( m_MaterialIndex.size() > 1 ) + { + if( m_Materials ) + { + m_Materials->SetOpenGLMaterial(m_MaterialIndex[idx]); + } + } + + + switch( m_CoordIndex[idx].size() ) + { + case 3: glBegin( GL_TRIANGLES );break; + case 4: glBegin( GL_QUADS ); break; + default: glBegin( GL_POLYGON ); break; + } + + + if( m_PerVertexNormalsNormalized.size() > 0 ) + { + for(unsigned int ii = 0; ii < m_CoordIndex[idx].size(); ii++ ) + { + glm::vec3 normal = m_PerVertexNormalsNormalized[m_CoordIndex[idx][ii]]; + glNormal3fv( &normal.x ); + + glm::vec3 point = m_Point[m_CoordIndex[idx][ii]]; + glVertex3fv( &point.x ); + } + } else if( g_Parm_3D_Visu.IsRealisticMode() && g_Parm_3D_Visu.HightQualityMode() ) + { + std::vector< glm::vec3 > normals_list; + normals_list = m_PerFaceVertexNormals[idx]; + + for( unsigned int ii = 0; ii < m_CoordIndex[idx].size(); ii++ ) + { + glm::vec3 normal = normals_list[ii]; + glNormal3fv( &normal.x ); + + glm::vec3 point = m_Point[m_CoordIndex[idx][ii]]; + glVertex3fv( &point.x ); + } + } else + { + // Flat + glm::vec3 normal = m_PerFaceNormalsNormalized[idx]; + + for( unsigned int ii = 0; ii < m_CoordIndex[idx].size(); ii++ ) + { + glNormal3fv( &normal.x ); + + glm::vec3 point = m_Point[m_CoordIndex[idx][ii]]; + glVertex3fv( &point.x ); + } + } + + glEnd(); + } + + glPopMatrix(); +} + + +void S3D_MESH::calcPointNormalized () +{ + if( isPointNormalizedComputed == true ) + { + return; + } + isPointNormalizedComputed = true; + + if( m_PerVertexNormalsNormalized.size() > 0 ) + { + return; + } + + m_PointNormalized.clear(); + + float biggerPoint = 0.0f; + for( unsigned int i = 0; i< m_Point.size(); i++ ) + { + if( fabs( m_Point[i].x ) > biggerPoint) biggerPoint = fabs( m_Point[i].x ); + if( fabs( m_Point[i].y ) > biggerPoint) biggerPoint = fabs( m_Point[i].y ); + if( fabs( m_Point[i].z ) > biggerPoint) biggerPoint = fabs( m_Point[i].z ); + } + + biggerPoint = 1.0 / biggerPoint; + + for( unsigned int i= 0; i< m_Point.size(); i++ ) + { + glm::vec3 p; + p = m_Point[i] * biggerPoint; + m_PointNormalized.push_back( p ); + } +} + +bool IsClockwise(glm::vec3 v0, glm::vec3 v1, glm::vec3 v2) +{ + double sum = 0.0; + + sum += (v1.x - v0.x) * (v1.y + v0.y); + sum += (v2.x - v1.x) * (v2.y + v1.y); + sum += (v0.x - v2.x) * (v0.y + v2.y); + + return sum > FLT_EPSILON; +} + + +void S3D_MESH::calcPerFaceNormals () +{ + if( isPerFaceNormalsComputed == true ) + { + return; + } + isPerFaceNormalsComputed = true; + + + if( m_PerVertexNormalsNormalized.size() > 0 ) + { + return; + } + + bool haveAlreadyNormals_from_model_file = false; + + if( m_PerFaceNormalsNormalized.size() > 0 ) + { + haveAlreadyNormals_from_model_file = true; + } + + m_PerFaceNormalsRaw.clear(); + m_PerFaceSquaredArea.clear(); + + for( unsigned int idx = 0; idx < m_CoordIndex.size(); idx++ ) + { + + // User normalized and multiply to get better resolution + glm::vec3 v0 = m_PointNormalized[m_CoordIndex[idx][0]]; + glm::vec3 v1 = m_PointNormalized[m_CoordIndex[idx][1]]; + glm::vec3 v2 = m_PointNormalized[m_CoordIndex[idx][m_CoordIndex[idx].size() - 1]]; + + /* + // !TODO: improove and check what is best to calc the normal (check what have more resolution) + glm::vec3 v0 = m_Point[m_CoordIndex[idx][0]]; + glm::vec3 v1 = m_Point[m_CoordIndex[idx][1]]; + glm::vec3 v2 = m_Point[m_CoordIndex[idx][m_CoordIndex[idx].size() - 1]]; + */ + + glm::vec3 cross_prod; + + /* + // This is not working as good as it is expected :/ + if( IsClockwise( v0, v1, v2 ) ) + { + // CW + cross_prod = glm::cross( v1 - v2, v0 - v2 ); + } else + {*/ + // CCW + cross_prod = glm::cross( v1 - v0, v2 - v0 ); + //} + + float area = glm::dot( cross_prod, cross_prod ); + + if( cross_prod[2] < 0.0 ) + { + area = -area; + } + + if (area < FLT_EPSILON) + { + area = FLT_EPSILON * 2.0f; + } + + m_PerFaceSquaredArea.push_back( area ); + + m_PerFaceNormalsRaw.push_back( cross_prod ); + + if( haveAlreadyNormals_from_model_file == false ) + { + + // normalize vertex normal + float l = glm::length( cross_prod ); + + if( l > FLT_EPSILON ) // avoid division by zero + { + cross_prod = cross_prod / l; + } + else + { + // Cannot calc normal + if( (cross_prod.x > cross_prod.y) && (cross_prod.x > cross_prod.z)) + { + cross_prod.x = 1.0; cross_prod.y = 0.0; cross_prod.z = 0.0; + } else if( (cross_prod.y > cross_prod.x) && (cross_prod.y > cross_prod.z)) + { + cross_prod.x = 0.0; cross_prod.y = 1.0; cross_prod.z = 0.0; + } else + { + cross_prod.x = 0.0; cross_prod.y = 1.0; cross_prod.z = 0.0; + } + } + + m_PerFaceNormalsNormalized.push_back( cross_prod ); + } + + } +} + +// http://www.bytehazard.com/code/vertnorm.html +// http://www.emeyex.com/site/tuts/VertexNormals.pdf +void S3D_MESH::calcPerPointNormals () +{ + if( isPerPointNormalsComputed == true ) + { + return; + } + isPerPointNormalsComputed = true; + + if( m_PerVertexNormalsNormalized.size() > 0 ) + { + return; + } + + m_PerFaceVertexNormals.clear(); + + // for each face A in mesh + for( unsigned int each_face_A_idx = 0; each_face_A_idx < m_CoordIndex.size(); each_face_A_idx++ ) + { + // n = face A facet normal + std::vector< glm::vec3 > face_A_normals; + face_A_normals.clear(); + face_A_normals.resize(m_CoordIndex[each_face_A_idx].size()); + + // loop through all 3 vertices + // for each vert in face A + for( unsigned int each_vert_A_idx = 0; each_vert_A_idx < m_CoordIndex[each_face_A_idx].size(); each_vert_A_idx++ ) + { + face_A_normals[each_vert_A_idx] = m_PerFaceNormalsRaw[each_face_A_idx] * (m_PerFaceSquaredArea[each_face_A_idx]); + + // for each face A in mesh + for( unsigned int each_face_B_idx = 0; each_face_B_idx < m_CoordIndex.size(); each_face_B_idx++ ) + { + //if A != B { // ignore self + if ( each_face_A_idx != each_face_B_idx) + { + if( (m_CoordIndex[each_face_B_idx][0] == (int)(m_CoordIndex[each_face_A_idx][each_vert_A_idx])) || + (m_CoordIndex[each_face_B_idx][1] == (int)(m_CoordIndex[each_face_A_idx][each_vert_A_idx])) || + (m_CoordIndex[each_face_B_idx][2] == (int)(m_CoordIndex[each_face_A_idx][each_vert_A_idx])) ) + { + glm::vec3 vector_face_A = m_PerFaceNormalsNormalized[each_face_A_idx]; + glm::vec3 vector_face_B = m_PerFaceNormalsNormalized[each_face_B_idx]; + + float dot_prod = glm::dot(vector_face_A, vector_face_B); + if( dot_prod > 0.05f ) + { + face_A_normals[each_vert_A_idx] += m_PerFaceNormalsRaw[each_face_B_idx] * (m_PerFaceSquaredArea[each_face_B_idx] * dot_prod); + } + } + } + } + + // normalize vertex normal + float l = glm::length( face_A_normals[each_vert_A_idx] ); + + if( l > FLT_EPSILON ) // avoid division by zero + { + face_A_normals[each_vert_A_idx] /= l; + } + + } + + m_PerFaceVertexNormals.push_back( face_A_normals ); + } +} diff --git a/3d-viewer/3d_mesh_model.h b/3d-viewer/3d_mesh_model.h new file mode 100644 index 0000000000..d8dda92122 --- /dev/null +++ b/3d-viewer/3d_mesh_model.h @@ -0,0 +1,100 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 Mario Luzeiro + * Copyright (C) 1992-2014 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 + */ + +/** + * @file 3d_mesh_model.h + * @brief + */ + +#ifndef __3D_MESH_MODEL_H__ +#define __3D_MESH_MODEL_H__ + +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef __WXMAC__ +# ifdef __DARWIN__ +# include +# else +# include +# endif +#else +# include +#endif +#include + +class S3D_MESH; + +class S3D_MESH +{ +public: + + S3D_MESH(); + ~S3D_MESH(); + + void openGL_Render(); + void openGL_RenderAllChilds(); + + S3D_MATERIAL *m_Materials; + + // Point and index list + std::vector< glm::vec3 > m_Point; + std::vector< std::vector > m_CoordIndex; + std::vector< glm::vec3 > m_PerFaceNormalsNormalized; + std::vector< glm::vec3 > m_PerVertexNormalsNormalized; + + std::vector< int > m_MaterialIndex; + + glm::vec3 m_translation; + glm::vec4 m_rotation; + glm::vec3 m_scale; + glm::vec4 m_scaleOrientation; // not used + glm::vec3 m_center; // not used + + std::vector childs; + +private: + std::vector< glm::vec3 > m_PerFaceNormalsRaw; + std::vector< std::vector< glm::vec3 > > m_PerFaceVertexNormals; + std::vector< glm::vec3 > m_PointNormalized; + std::vector< float > m_PerFaceSquaredArea; + std::vector< std::vector > m_InvalidCoordIndexes; //!TODO: check for invalid CoordIndex in file and remove the index and the same material index + + bool isPerFaceNormalsComputed; + void calcPerFaceNormals (); + + bool isPointNormalizedComputed; + void calcPointNormalized(); + + bool isPerPointNormalsComputed; + void calcPerPointNormals(); +}; + + +#endif diff --git a/3d-viewer/3d_struct.h b/3d-viewer/3d_struct.h index 2a82effd93..34384ad29d 100644 --- a/3d-viewer/3d_struct.h +++ b/3d-viewer/3d_struct.h @@ -1,6 +1,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * + * Copyright (C) 2014 Mario Luzeiro * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com * Copyright (C) 2011 Wayne Stambaugh * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. @@ -32,8 +33,9 @@ #include #include - - +#include <3d_material.h> +#include + /* 3D modeling units -> PCB units conversion scale: * 1 "3D model unit" wings3d = 1 unit = 2.54 mm = 0.1 inch = 100 mils */ @@ -44,48 +46,7 @@ class S3D_MASTER; class STRUCT_3D_SHAPE; /* S3D_VERTEX manages a 3D coordinate (3 float numbers: x,y,z coordinates)*/ -class S3D_VERTEX -{ -public: - double x, y, z; - -public: - S3D_VERTEX() - { - x = y = z = 0.0; - } - - S3D_VERTEX( double px, double py, double pz) - { - x = px; - y = py; - z = pz; - } -}; - -class S3D_MATERIAL : public EDA_ITEM /* openGL "material" data*/ -{ -public: - wxString m_Name; - S3D_VERTEX m_DiffuseColor; - S3D_VERTEX m_EmissiveColor; - S3D_VERTEX m_SpecularColor; - float m_AmbientIntensity; - float m_Transparency; - float m_Shininess; - -public: - S3D_MATERIAL( S3D_MASTER* father, const wxString& name ); - - S3D_MATERIAL* Next() const { return (S3D_MATERIAL*) Pnext; } - S3D_MATERIAL* Back() const { return (S3D_MATERIAL*) Pback; } - - void SetMaterial(); - -#if defined(DEBUG) - void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override -#endif -}; +#define S3D_VERTEX glm::vec3 /* Master structure for a 3D item description */ @@ -106,6 +67,14 @@ public: FILE3D_UNKNOWN }; + // Check defaults in S3D_MASTER + bool m_use_modelfile_diffuseColor; + bool m_use_modelfile_emissiveColor; + bool m_use_modelfile_specularColor; + bool m_use_modelfile_ambientIntensity; + bool m_use_modelfile_transparency; + bool m_use_modelfile_shininess; + private: wxString m_Shape3DName; /* 3D shape name in 3D library */ FILE3D_TYPE m_ShapeType; @@ -114,6 +83,8 @@ private: bool m_loadTransparentObjects; bool m_loadNonTransparentObjects; + + public: S3D_MASTER( EDA_ITEM* aParent ); ~S3D_MASTER(); diff --git a/3d-viewer/CMakeLists.txt b/3d-viewer/CMakeLists.txt index 56af4eba6a..31cf55bc5b 100644 --- a/3d-viewer/CMakeLists.txt +++ b/3d-viewer/CMakeLists.txt @@ -2,6 +2,7 @@ add_definitions(-DPCBNEW) include_directories(BEFORE ${INC_BEFORE}) include_directories( + textures ../pcbnew ../polygon ${INC_AFTER} @@ -16,12 +17,17 @@ set(3D-VIEWER_SRCS 3d_draw.cpp 3d_draw_basic_functions.cpp 3d_frame.cpp + 3d_material.cpp + 3d_mesh_model.cpp 3d_read_mesh.cpp 3d_toolbar.cpp info3d_visu.cpp trackball.cpp - x3dmodelparser.cpp vrmlmodelparser.cpp + vrml_aux.cpp + vrml_v1_modelparser.cpp + vrml_v2_modelparser.cpp + x3dmodelparser.cpp ) add_library(3d-viewer STATIC ${3D-VIEWER_SRCS}) diff --git a/3d-viewer/info3d_visu.cpp b/3d-viewer/info3d_visu.cpp index 23b5400e52..a0417689b2 100644 --- a/3d-viewer/info3d_visu.cpp +++ b/3d-viewer/info3d_visu.cpp @@ -85,7 +85,7 @@ INFO3D_VISU::~INFO3D_VISU() */ void INFO3D_VISU::InitSettings( BOARD* aBoard ) { - EDA_RECT bbbox = aBoard->ComputeBoundingBox( false ); + EDA_RECT bbbox = aBoard->ComputeBoundingBox( true ); if( bbbox.GetWidth() == 0 && bbbox.GetHeight() == 0 ) { @@ -93,6 +93,7 @@ void INFO3D_VISU::InitSettings( BOARD* aBoard ) bbbox.SetHeight( Millimeter2iu( 100 ) ); } + m_BoardSettings = &aBoard->GetDesignSettings(); m_BoardSize = bbbox.GetSize(); @@ -199,8 +200,8 @@ void INFO3D_VISU::InitSettings( BOARD* aBoard ) double INFO3D_VISU::GetModulesZcoord3DIU( bool aIsFlipped ) { if( aIsFlipped ) - return m_layerZcoord[B_Cu] - ( m_copperThickness / 2 ); + return m_layerZcoord[B_Paste] - ( m_copperThickness / 2 ); //B_Cu NOTE: in order to display modules in top of Paste and near the shadow else - return m_layerZcoord[F_Cu] + ( m_copperThickness / 2 ); + return m_layerZcoord[F_Paste] + ( m_copperThickness / 2 ); //F_Cu } diff --git a/3d-viewer/info3d_visu.h b/3d-viewer/info3d_visu.h index 4b00ecc768..663f5c53e1 100644 --- a/3d-viewer/info3d_visu.h +++ b/3d-viewer/info3d_visu.h @@ -95,6 +95,9 @@ public: // to scale 3D units between -1.0 and +1.0 double m_CurrentZpos; // temporary storage of current value of Z position, // used in some calculation + + double zpos_offset; + private: double m_layerZcoord[LAYER_ID_COUNT]; // Z position of each layer (normalized) double m_copperThickness; // Copper thickness (normalized) diff --git a/3d-viewer/modelparsers.h b/3d-viewer/modelparsers.h index d1c5f23461..ba9f038be3 100644 --- a/3d-viewer/modelparsers.h +++ b/3d-viewer/modelparsers.h @@ -32,13 +32,9 @@ #include #include #include - +#include <3d_mesh_model.h> class S3D_MASTER; -class S3D_VERTEX; - -extern void TransfertToGLlist( std::vector< S3D_VERTEX >& aVertices, double aBiuTo3DUnits ); - class S3D_MODEL_PARSER; class X3D_MODEL_PARSER; @@ -118,13 +114,17 @@ public: static void GetNodeProperties( wxXmlNode* aNode, PROPERTY_MAP& aProps ); /** - * Return string representing x3d file in vrml format + * Return string representing x3d file in vrml2 format * Function Load must be called before this function, otherwise empty * data set is returned. */ - wxString VRML_representation(); + wxString VRML2_representation(); private: + wxString m_Filename; + S3D_MESH *m_model; + std::vector childs; + std::vector< wxString > vrml_materials; std::vector< wxString > vrml_points; std::vector< wxString > vrml_coord_indexes; @@ -137,8 +137,97 @@ private: void rotate( S3D_VERTEX& aCoordinate, S3D_VERTEX& aRotAxis, double angle ); }; + + /** - * class WRL_MODEL_PARSER + * class VRML2_MODEL_PARSER + * Parses + */ +class VRML2_MODEL_PARSER: public S3D_MODEL_PARSER +{ +public: + VRML2_MODEL_PARSER( S3D_MASTER* aMaster ); + ~VRML2_MODEL_PARSER(); + void Load( const wxString aFilename ); + + /** + * Return string representing VRML2 file in vrml2 format + * Function Load must be called before this function, otherwise empty + * data set is returned. + */ + wxString VRML2_representation(); + +private: + int read_Transform(); + int read_DEF(); + int read_Shape(); + int read_Appearance(); + int read_material(); + int read_Material(); + int read_IndexedFaceSet(); + int read_Coordinate(); + int read_Normal(); + int read_Color(); + int read_coordIndex(); + int read_colorIndex(); + + bool m_normalPerVertex; + bool colorPerVertex; + S3D_MESH *m_model; + std::vector childs; + FILE *m_file; + S3D_MATERIAL *m_Materials; + wxString m_Filename; +}; + + +/** + * class VRML1_MODEL_PARSER + * Parses + */ +class VRML1_MODEL_PARSER: public S3D_MODEL_PARSER +{ +public: + VRML1_MODEL_PARSER( S3D_MASTER* aMaster ); + ~VRML1_MODEL_PARSER(); + void Load( const wxString aFilename ); + + /** + * Return string representing VRML2 file in vrml2 format + * Function Load must be called before this function, otherwise empty + * data set is returned. + */ + wxString VRML2_representation(); + +private: + int read_separator(); + int readMaterial(); + int readCoordinate3(); + int readIndexedFaceSet(); + + int readMaterial_ambientColor(); + int readMaterial_diffuseColor(); + int readMaterial_emissiveColor(); + int readMaterial_specularColor(); + int readMaterial_shininess(); + int readMaterial_transparency(); + + int readCoordinate3_point(); + + int readIndexedFaceSet_coordIndex(); + int readIndexedFaceSet_materialIndex(); + + bool m_normalPerVertex; + bool colorPerVertex; + S3D_MESH *m_model; + std::vector childs; + S3D_MATERIAL *m_Materials; + FILE *m_file; + wxString m_Filename; +}; + +/** + * class VRML_MODEL_PARSER * Parses */ class VRML_MODEL_PARSER: public S3D_MODEL_PARSER @@ -149,45 +238,9 @@ public: void Load( const wxString aFilename ); private: - /** - * Function ReadMaterial - * read the description of a 3D material definition in the form: - * DEF yellow material Material ( - * DiffuseColor 1.00000 1.00000 0.00000e 0 - * EmissiveColor 0.00000e 0 0.00000e 0 0.00000e 0 - * SpecularColor 1.00000 1.00000 1.00000 - * AmbientIntensity 1.00000 - * Transparency 0.00000e 0 - * Shininess 1.00000 - *) - * Or type: - * USE yellow material - */ - int readMaterial( FILE* file, int* LineNum ); - int readChildren( FILE* file, int* LineNum ); - int readShape( FILE* file, int* LineNum ); - int readAppearance( FILE* file, int* LineNum ); - int readGeometry( FILE* file, int* LineNum ); - - /** - * Function ReadCoordList - * reads 3D coordinate lists like: - * coord Coordinate { point [ - * -5.24489 6.57640e-3 -9.42129e-2, - * -5.11821 6.57421e-3 0.542654, - * -3.45868 0.256565 1.32000 ] } - * or: - * normal Normal { vector [ - * 0.995171 -6.08102e-6 9.81541e-2, - * 0.923880 -4.09802e-6 0.382683, - * 0.707107 -9.38186e-7 0.707107] - * } - * - * text_buffer contains the first line of this node : - * "coord Coordinate { point [" - */ - void readCoordsList( FILE* file, char* text_buffer, std::vector< double >& aList, - int* LineNum ); + VRML1_MODEL_PARSER *vrml1_parser; + VRML2_MODEL_PARSER *vrml2_parser; }; + #endif // MODELPARSERS_H diff --git a/3d-viewer/textures/text_pcb.c b/3d-viewer/textures/text_pcb.c new file mode 100644 index 0000000000..653b0930db --- /dev/null +++ b/3d-viewer/textures/text_pcb.c @@ -0,0 +1,922 @@ +/* GIMP RGBA C-Source image dump (text_pcb.c) */ + +static const struct { + unsigned int width; + unsigned int height; + unsigned int bytes_per_pixel; /* 2:RGB16, 3:RGB, 4:RGBA */ + unsigned char pixel_data[64 * 64 * 4 + 1]; +} text_pcb = { + 64, 64, 4, + "\357\357\357\377\357\357\357\377\355\355\355\377\362\362\362\377\362\362" + "\362\377\366\366\366\377\366\366\366\377\370\370\370\377\370\370\370\377" + "\363\363\363\377\363\363\363\377\357\357\357\377\360\360\360\377\354\354" + "\354\377\354\354\354\377\351\351\351\377\351\351\351\377\357\357\357\377" + "\357\357\357\377\363\363\363\377\357\357\357\377\366\366\366\377\366\366" + "\366\377\366\366\366\377\366\366\366\377\362\362\362\377\363\363\363\377" + "\355\355\355\377\346\346\346\377\340\340\340\377\335\335\335\377\331\331" + "\331\377\331\331\331\377\335\335\335\377\335\335\335\377\343\343\343\377" + "\351\351\351\377\355\355\355\377\355\355\355\377\362\362\362\377\362\362" + "\362\377\363\363\363\377\363\363\363\377\363\363\363\377\363\363\363\377" + "\360\360\360\377\360\360\360\377\354\354\354\377\351\351\351\377\343\343" + "\343\377\343\343\343\377\343\343\343\377\343\343\343\377\352\352\352\377" + "\352\352\352\377\357\357\357\377\355\355\355\377\360\360\360\377\360\360" + "\360\377\355\355\355\377\355\355\355\377\357\357\357\377\357\357\357\377" + "\357\357\357\377\355\355\355\377\357\357\357\377\355\355\355\377\362\362" + "\362\377\362\362\362\377\362\362\362\377\363\363\363\377\363\363\363\377" + "\363\363\363\377\363\363\363\377\363\363\363\377\357\357\357\377\357\357" + "\357\377\354\354\354\377\346\346\346\377\346\346\346\377\351\351\351\377" + "\357\357\357\377\360\360\360\377\363\363\363\377\360\360\360\377\366\366" + "\366\377\366\366\366\377\366\366\366\377\366\366\366\377\363\363\363\377" + "\363\363\363\377\355\355\355\377\346\346\346\377\343\343\343\377\335\335" + "\335\377\331\331\331\377\331\331\331\377\335\335\335\377\340\340\340\377" + "\343\343\343\377\351\351\351\377\355\355\355\377\357\357\357\377\362\362" + "\362\377\362\362\362\377\363\363\363\377\363\363\363\377\363\363\363\377" + "\363\363\363\377\360\360\360\377\360\360\360\377\354\354\354\377\351\351" + "\351\377\343\343\343\377\343\343\343\377\344\344\344\377\344\344\344\377" + "\352\352\352\377\352\352\352\377\357\357\357\377\357\357\357\377\357\357" + "\357\377\357\357\357\377\360\360\360\377\355\355\355\377\357\357\357\377" + "\357\357\357\377\354\354\354\377\357\357\357\377\357\357\357\377\357\357" + "\357\377\357\357\357\377\362\362\362\377\363\363\363\377\363\363\363\377" + "\363\363\363\377\363\363\363\377\363\363\363\377\360\360\360\377\357\357" + "\357\377\357\357\357\377\351\351\351\377\351\351\351\377\351\351\351\377" + "\351\351\351\377\355\355\355\377\355\355\355\377\363\363\363\377\363\363" + "\363\377\366\366\366\377\366\366\366\377\366\366\366\377\363\363\363\377" + "\363\363\363\377\363\363\363\377\355\355\355\377\343\343\343\377\340\340" + "\340\377\335\335\335\377\331\331\331\377\331\331\331\377\335\335\335\377" + "\340\340\340\377\346\346\346\377\351\351\351\377\355\355\355\377\357\357" + "\357\377\362\362\362\377\362\362\362\377\363\363\363\377\363\363\363\377" + "\363\363\363\377\363\363\363\377\360\360\360\377\360\360\360\377\354\354" + "\354\377\354\354\354\377\351\351\351\377\343\343\343\377\344\344\344\377" + "\344\344\344\377\352\352\352\377\352\352\352\377\357\357\357\377\357\357" + "\357\377\357\357\357\377\357\357\357\377\360\360\360\377\360\360\360\377" + "\360\360\360\377\357\357\357\377\354\354\354\377\352\352\352\377\352\352" + "\352\377\352\352\352\377\357\357\357\377\357\357\357\377\357\357\357\377" + "\357\357\357\377\357\357\357\377\357\357\357\377\357\357\357\377\360\360" + "\360\377\354\354\354\377\355\355\355\377\354\354\354\377\351\351\351\377" + "\351\351\351\377\351\351\351\377\355\355\355\377\355\355\355\377\363\363" + "\363\377\363\363\363\377\362\362\362\377\362\362\362\377\362\362\362\377" + "\366\366\366\377\363\363\363\377\363\363\363\377\355\355\355\377\346\346" + "\346\377\340\340\340\377\335\335\335\377\331\331\331\377\331\331\331\377" + "\335\335\335\377\340\340\340\377\346\346\346\377\351\351\351\377\355\355" + "\355\377\360\360\360\377\362\362\362\377\362\362\362\377\363\363\363\377" + "\363\363\363\377\363\363\363\377\363\363\363\377\360\360\360\377\360\360" + "\360\377\354\354\354\377\355\355\355\377\351\351\351\377\343\343\343\377" + "\344\344\344\377\344\344\344\377\352\352\352\377\352\352\352\377\357\357" + "\357\377\355\355\355\377\357\357\357\377\357\357\357\377\357\357\357\377" + "\357\357\357\377\352\352\352\377\351\351\351\377\354\354\354\377\354\354" + "\354\377\354\354\354\377\354\354\354\377\360\360\360\377\360\360\360\377" + "\357\357\357\377\357\357\357\377\357\357\357\377\357\357\357\377\363\363" + "\363\377\363\363\363\377\355\355\355\377\355\355\355\377\351\351\351\377" + "\351\351\351\377\351\351\351\377\351\351\351\377\357\357\357\377\357\357" + "\357\377\363\363\363\377\363\363\363\377\362\362\362\377\362\362\362\377" + "\363\363\363\377\366\366\366\377\363\363\363\377\355\355\355\377\351\351" + "\351\377\346\346\346\377\340\340\340\377\335\335\335\377\332\332\332\377" + "\332\332\332\377\335\335\335\377\335\335\335\377\343\343\343\377\352\352" + "\352\377\355\355\355\377\360\360\360\377\365\365\365\377\363\363\363\377" + "\363\363\363\377\363\363\363\377\363\363\363\377\363\363\363\377\362\362" + "\362\377\362\362\362\377\355\355\355\377\357\357\357\377\352\352\352\377" + "\344\344\344\377\344\344\344\377\344\344\344\377\352\352\352\377\352\352" + "\352\377\357\357\357\377\355\355\355\377\357\357\357\377\357\357\357\377" + "\357\357\357\377\357\357\357\377\355\355\355\377\351\351\351\377\354\354" + "\354\377\354\354\354\377\357\357\357\377\357\357\357\377\354\354\354\377" + "\354\354\354\377\357\357\357\377\357\357\357\377\357\357\357\377\360\360" + "\360\377\360\360\360\377\360\360\360\377\355\355\355\377\355\355\355\377" + "\351\351\351\377\343\343\343\377\343\343\343\377\352\352\352\377\357\357" + "\357\377\357\357\357\377\362\362\362\377\362\362\362\377\362\362\362\377" + "\362\362\362\377\363\363\363\377\365\365\365\377\363\363\363\377\355\355" + "\355\377\352\352\352\377\346\346\346\377\342\342\342\377\337\337\337\377" + "\332\332\332\377\327\327\327\377\335\335\335\377\337\337\337\377\343\343" + "\343\377\352\352\352\377\355\355\355\377\360\360\360\377\365\365\365\377" + "\363\363\363\377\362\362\362\377\362\362\362\377\363\363\363\377\363\363" + "\363\377\362\362\362\377\362\362\362\377\355\355\355\377\357\357\357\377" + "\352\352\352\377\344\344\344\377\344\344\344\377\344\344\344\377\352\352" + "\352\377\352\352\352\377\357\357\357\377\357\357\357\377\355\355\355\377" + "\355\355\355\377\355\355\355\377\355\355\355\377\357\357\357\377\357\357" + "\357\377\362\362\362\377\354\354\354\377\357\357\357\377\357\357\357\377" + "\354\354\354\377\354\354\354\377\357\357\357\377\357\357\357\377\362\362" + "\362\377\362\362\362\377\362\362\362\377\362\362\362\377\355\355\355\377" + "\352\352\352\377\344\344\344\377\344\344\344\377\344\344\344\377\344\344" + "\344\377\352\352\352\377\355\355\355\377\362\362\362\377\362\362\362\377" + "\362\362\362\377\363\363\363\377\365\365\365\377\365\365\365\377\360\360" + "\360\377\355\355\355\377\352\352\352\377\347\347\347\377\342\342\342\377" + "\335\335\335\377\327\327\327\377\327\327\327\377\335\335\335\377\337\337" + "\337\377\344\344\344\377\346\346\346\377\352\352\352\377\360\360\360\377" + "\365\365\365\377\365\365\365\377\365\365\365\377\363\363\363\377\365\365" + "\365\377\363\363\363\377\362\362\362\377\362\362\362\377\355\355\355\377" + "\357\357\357\377\352\352\352\377\344\344\344\377\344\344\344\377\344\344" + "\344\377\352\352\352\377\352\352\352\377\357\357\357\377\357\357\357\377" + "\355\355\355\377\355\355\355\377\355\355\355\377\355\355\355\377\357\357" + "\357\377\357\357\357\377\362\362\362\377\354\354\354\377\354\354\354\377" + "\354\354\354\377\357\357\357\377\357\357\357\377\360\360\360\377\360\360" + "\360\377\362\362\362\377\362\362\362\377\362\362\362\377\357\357\357\377" + "\355\355\355\377\352\352\352\377\344\344\344\377\344\344\344\377\337\337" + "\337\377\344\344\344\377\352\352\352\377\355\355\355\377\362\362\362\377" + "\362\362\362\377\363\363\363\377\365\365\365\377\365\365\365\377\365\365" + "\365\377\360\360\360\377\360\360\360\377\354\354\354\377\347\347\347\377" + "\342\342\342\377\335\335\335\377\327\327\327\377\327\327\327\377\335\335" + "\335\377\337\337\337\377\344\344\344\377\347\347\347\377\352\352\352\377" + "\360\360\360\377\365\365\365\377\365\365\365\377\365\365\365\377\363\363" + "\363\377\363\363\363\377\362\362\362\377\362\362\362\377\362\362\362\377" + "\355\355\355\377\355\355\355\377\352\352\352\377\344\344\344\377\344\344" + "\344\377\344\344\344\377\352\352\352\377\352\352\352\377\357\357\357\377" + "\357\357\357\377\352\352\352\377\352\352\352\377\355\355\355\377\355\355" + "\355\377\357\357\357\377\357\357\357\377\357\357\357\377\354\354\354\377" + "\354\354\354\377\354\354\354\377\357\357\357\377\357\357\357\377\360\360" + "\360\377\362\362\362\377\362\362\362\377\362\362\362\377\357\357\357\377" + "\357\357\357\377\352\352\352\377\352\352\352\377\344\344\344\377\344\344" + "\344\377\337\337\337\377\337\337\337\377\344\344\344\377\352\352\352\377" + "\357\357\357\377\362\362\362\377\365\365\365\377\365\365\365\377\363\363" + "\363\377\363\363\363\377\360\360\360\377\352\352\352\377\347\347\347\377" + "\344\344\344\377\337\337\337\377\335\335\335\377\331\331\331\377\331\331" + "\331\377\335\335\335\377\337\337\337\377\344\344\344\377\347\347\347\377" + "\354\354\354\377\360\360\360\377\363\363\363\377\363\363\363\377\365\365" + "\365\377\365\365\365\377\363\363\363\377\362\362\362\377\362\362\362\377" + "\362\362\362\377\355\355\355\377\352\352\352\377\344\344\344\377\344\344" + "\344\377\344\344\344\377\344\344\344\377\352\352\352\377\352\352\352\377" + "\357\357\357\377\357\357\357\377\352\352\352\377\352\352\352\377\355\355" + "\355\377\355\355\355\377\357\357\357\377\357\357\357\377\357\357\357\377" + "\355\355\355\377\355\355\355\377\355\355\355\377\355\355\355\377\354\354" + "\354\377\354\354\354\377\355\355\355\377\355\355\355\377\355\355\355\377" + "\355\355\355\377\355\355\355\377\352\352\352\377\352\352\352\377\344\344" + "\344\377\342\342\342\377\337\337\337\377\337\337\337\377\344\344\344\377" + "\354\354\354\377\360\360\360\377\360\360\360\377\360\360\360\377\360\360" + "\360\377\360\360\360\377\360\360\360\377\360\360\360\377\352\352\352\377" + "\347\347\347\377\344\344\344\377\342\342\342\377\337\337\337\377\331\331" + "\331\377\331\331\331\377\337\337\337\377\342\342\342\377\344\344\344\377" + "\347\347\347\377\354\354\354\377\360\360\360\377\360\360\360\377\360\360" + "\360\377\360\360\360\377\360\360\360\377\360\360\360\377\355\355\355\377" + "\355\355\355\377\355\355\355\377\355\355\355\377\347\347\347\377\347\347" + "\347\377\347\347\347\377\347\347\347\377\347\347\347\377\354\354\354\377" + "\354\354\354\377\354\354\354\377\362\362\362\377\357\357\357\377\357\357" + "\357\377\357\357\357\377\357\357\357\377\357\357\357\377\355\355\355\377" + "\355\355\355\377\355\355\355\377\355\355\355\377\355\355\355\377\355\355" + "\355\377\355\355\355\377\355\355\355\377\357\357\357\377\357\357\357\377" + "\357\357\357\377\355\355\355\377\352\352\352\377\352\352\352\377\344\344" + "\344\377\342\342\342\377\342\342\342\377\342\342\342\377\342\342\342\377" + "\347\347\347\377\354\354\354\377\355\355\355\377\360\360\360\377\363\363" + "\363\377\363\363\363\377\360\360\360\377\360\360\360\377\352\352\352\377" + "\352\352\352\377\344\344\344\377\344\344\344\377\342\342\342\377\337\337" + "\337\377\331\331\331\377\331\331\331\377\337\337\337\377\342\342\342\377" + "\347\347\347\377\344\344\344\377\352\352\352\377\352\352\352\377\355\355" + "\355\377\360\360\360\377\363\363\363\377\363\363\363\377\363\363\363\377" + "\363\363\363\377\355\355\355\377\352\352\352\377\347\347\347\377\344\344" + "\344\377\347\347\347\377\347\347\347\377\351\351\351\377\351\351\351\377" + "\351\351\351\377\354\354\354\377\355\355\355\377\354\354\354\377\357\357" + "\357\377\357\357\357\377\357\357\357\377\357\357\357\377\357\357\357\377" + "\357\357\357\377\357\357\357\377\351\351\351\377\351\351\351\377\351\351" + "\351\377\351\351\351\377\351\351\351\377\352\352\352\377\352\352\352\377" + "\352\352\352\377\352\352\352\377\352\352\352\377\352\352\352\377\344\344" + "\344\377\344\344\344\377\342\342\342\377\342\342\342\377\342\342\342\377" + "\343\343\343\377\343\343\343\377\351\351\351\377\351\351\351\377\355\355" + "\355\377\355\355\355\377\355\355\355\377\360\360\360\377\355\355\355\377" + "\354\354\354\377\352\352\352\377\344\344\344\377\347\347\347\377\342\342" + "\342\377\334\334\334\377\331\331\331\377\331\331\331\377\334\334\334\377" + "\342\342\342\377\347\347\347\377\344\344\344\377\352\352\352\377\354\354" + "\354\377\355\355\355\377\355\355\355\377\355\355\355\377\355\355\355\377" + "\355\355\355\377\355\355\355\377\355\355\355\377\351\351\351\377\351\351" + "\351\377\344\344\344\377\343\343\343\377\343\343\343\377\343\343\343\377" + "\343\343\343\377\346\346\346\377\351\351\351\377\351\351\351\377\355\355" + "\355\377\354\354\354\377\352\352\352\377\352\352\352\377\352\352\352\377" + "\352\352\352\377\352\352\352\377\352\352\352\377\351\351\351\377\352\352" + "\352\377\352\352\352\377\352\352\352\377\352\352\352\377\352\352\352\377" + "\352\352\352\377\352\352\352\377\352\352\352\377\352\352\352\377\347\347" + "\347\377\344\344\344\377\344\344\344\377\342\342\342\377\342\342\342\377" + "\343\343\343\377\343\343\343\377\343\343\343\377\346\346\346\377\346\346" + "\346\377\351\351\351\377\351\351\351\377\352\352\352\377\352\352\352\377" + "\354\354\354\377\352\352\352\377\347\347\347\377\344\344\344\377\342\342" + "\342\377\334\334\334\377\331\331\331\377\331\331\331\377\331\331\331\377" + "\331\331\331\377\334\334\334\377\342\342\342\377\344\344\344\377\347\347" + "\347\377\352\352\352\377\354\354\354\377\352\352\352\377\351\351\351\377" + "\351\351\351\377\351\351\351\377\351\351\351\377\351\351\351\377\351\351" + "\351\377\346\346\346\377\346\346\346\377\343\343\343\377\343\343\343\377" + "\343\343\343\377\343\343\343\377\346\346\346\377\346\346\346\377\351\351" + "\351\377\351\351\351\377\347\347\347\377\347\347\347\377\344\344\344\377" + "\344\344\344\377\344\344\344\377\344\344\344\377\344\344\344\377\344\344" + "\344\377\344\344\344\377\344\344\344\377\344\344\344\377\344\344\344\377" + "\344\344\344\377\344\344\344\377\344\344\344\377\344\344\344\377\347\347" + "\347\377\344\344\344\377\343\343\343\377\343\343\343\377\340\340\340\377" + "\340\340\340\377\335\335\335\377\335\335\335\377\340\340\340\377\340\340" + "\340\377\343\343\343\377\343\343\343\377\343\343\343\377\346\346\346\377" + "\346\346\346\377\347\347\347\377\347\347\347\377\351\351\351\377\344\344" + "\344\377\342\342\342\377\334\334\334\377\331\331\331\377\325\325\325\377" + "\325\325\325\377\331\331\331\377\334\334\334\377\342\342\342\377\344\344" + "\344\377\351\351\351\377\347\347\347\377\347\347\347\377\346\346\346\377" + "\346\346\346\377\343\343\343\377\343\343\343\377\343\343\343\377\343\343" + "\343\377\343\343\343\377\343\343\343\377\343\343\343\377\340\340\340\377" + "\340\340\340\377\340\340\340\377\340\340\340\377\343\343\343\377\343\343" + "\343\377\343\343\343\377\343\343\343\377\343\343\343\377\342\342\342\377" + "\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337" + "\337\377\344\344\344\377\344\344\344\377\344\344\344\377\344\344\344\377" + "\344\344\344\377\344\344\344\377\344\344\344\377\344\344\344\377\344\344" + "\344\377\344\344\344\377\346\346\346\377\343\343\343\377\343\343\343\377" + "\340\340\340\377\335\335\335\377\335\335\335\377\335\335\335\377\340\340" + "\340\377\340\340\340\377\340\340\340\377\343\343\343\377\351\351\351\377" + "\346\346\346\377\346\346\346\377\352\352\352\377\347\347\347\377\347\347" + "\347\377\342\342\342\377\337\337\337\377\331\331\331\377\334\334\334\377" + "\326\326\326\377\326\326\326\377\334\334\334\377\331\331\331\377\337\337" + "\337\377\342\342\342\377\347\347\347\377\347\347\347\377\352\352\352\377" + "\346\346\346\377\346\346\346\377\343\343\343\377\343\343\343\377\343\343" + "\343\377\343\343\343\377\346\346\346\377\343\343\343\377\343\343\343\377" + "\340\340\340\377\335\335\335\377\335\335\335\377\340\340\340\377\343\343" + "\343\377\343\343\343\377\351\351\351\377\343\343\343\377\343\343\343\377" + "\343\343\343\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337" + "\337\377\337\337\337\377\344\344\344\377\344\344\344\377\344\344\344\377" + "\344\344\344\377\344\344\344\377\344\344\344\377\344\344\344\377\344\344" + "\344\377\344\344\344\377\344\344\344\377\346\346\346\377\343\343\343\377" + "\343\343\343\377\340\340\340\377\335\335\335\377\335\335\335\377\335\335" + "\335\377\340\340\340\377\340\340\340\377\340\340\340\377\346\346\346\377" + "\351\351\351\377\346\346\346\377\352\352\352\377\352\352\352\377\347\347" + "\347\377\347\347\347\377\342\342\342\377\337\337\337\377\334\334\334\377" + "\335\335\335\377\327\327\327\377\327\327\327\377\335\335\335\377\334\334" + "\334\377\337\337\337\377\342\342\342\377\347\347\347\377\344\344\344\377" + "\352\352\352\377\351\351\351\377\346\346\346\377\346\346\346\377\343\343" + "\343\377\343\343\343\377\343\343\343\377\343\343\343\377\340\340\340\377" + "\340\340\340\377\340\340\340\377\335\335\335\377\335\335\335\377\340\340" + "\340\377\343\343\343\377\343\343\343\377\351\351\351\377\351\351\351\377" + "\351\351\351\377\351\351\351\377\344\344\344\377\344\344\344\377\344\344" + "\344\377\344\344\344\377\344\344\344\377\344\344\344\377\344\344\344\377" + "\344\344\344\377\344\344\344\377\344\344\344\377\344\344\344\377\344\344" + "\344\377\344\344\344\377\344\344\344\377\347\347\347\377\346\346\346\377" + "\343\343\343\377\343\343\343\377\340\340\340\377\340\340\340\377\335\335" + "\335\377\335\335\335\377\340\340\340\377\340\340\340\377\343\343\343\377" + "\346\346\346\377\346\346\346\377\346\346\346\377\347\347\347\377\352\352" + "\352\377\347\347\347\377\347\347\347\377\342\342\342\377\337\337\337\377" + "\334\334\334\377\335\335\335\377\327\327\327\377\327\327\327\377\335\335" + "\335\377\334\334\334\377\337\337\337\377\342\342\342\377\347\347\347\377" + "\347\347\347\377\352\352\352\377\346\346\346\377\346\346\346\377\346\346" + "\346\377\346\346\346\377\343\343\343\377\343\343\343\377\343\343\343\377" + "\340\340\340\377\340\340\340\377\340\340\340\377\340\340\340\377\340\340" + "\340\377\340\340\340\377\343\343\343\377\343\343\343\377\351\351\351\377" + "\351\351\351\377\351\351\351\377\347\347\347\377\344\344\344\377\344\344" + "\344\377\344\344\344\377\344\344\344\377\344\344\344\377\352\352\352\377" + "\352\352\352\377\352\352\352\377\352\352\352\377\352\352\352\377\352\352" + "\352\377\352\352\352\377\352\352\352\377\352\352\352\377\354\354\354\377" + "\351\351\351\377\346\346\346\377\346\346\346\377\343\343\343\377\343\343" + "\343\377\343\343\343\377\343\343\343\377\343\343\343\377\346\346\346\377" + "\346\346\346\377\352\352\352\377\352\352\352\377\352\352\352\377\354\354" + "\354\377\352\352\352\377\347\347\347\377\347\347\347\377\342\342\342\377" + "\340\340\340\377\334\334\334\377\335\335\335\377\327\327\327\377\327\327" + "\327\377\335\335\335\377\335\335\335\377\340\340\340\377\342\342\342\377" + "\347\347\347\377\347\347\347\377\352\352\352\377\354\354\354\377\352\352" + "\352\377\352\352\352\377\352\352\352\377\351\351\351\377\351\351\351\377" + "\346\346\346\377\346\346\346\377\346\346\346\377\343\343\343\377\343\343" + "\343\377\340\340\340\377\343\343\343\377\346\346\346\377\351\351\351\377" + "\351\351\351\377\355\355\355\377\355\355\355\377\355\355\355\377\352\352" + "\352\377\352\352\352\377\352\352\352\377\352\352\352\377\352\352\352\377" + "\352\352\352\377\352\352\352\377\355\355\355\377\355\355\355\377\355\355" + "\355\377\355\355\355\377\355\355\355\377\355\355\355\377\352\352\352\377" + "\354\354\354\377\351\351\351\377\351\351\351\377\351\351\351\377\343\343" + "\343\377\343\343\343\377\343\343\343\377\343\343\343\377\343\343\343\377" + "\351\351\351\377\352\352\352\377\352\352\352\377\352\352\352\377\354\354" + "\354\377\354\354\354\377\354\354\354\377\351\351\351\377\351\351\351\377" + "\344\344\344\377\340\340\340\377\335\335\335\377\335\335\335\377\327\327" + "\327\377\327\327\327\377\335\335\335\377\335\335\335\377\340\340\340\377" + "\344\344\344\377\351\351\351\377\351\351\351\377\352\352\352\377\354\354" + "\354\377\354\354\354\377\352\352\352\377\352\352\352\377\351\351\351\377" + "\351\351\351\377\351\351\351\377\351\351\351\377\351\351\351\377\343\343" + "\343\377\343\343\343\377\340\340\340\377\343\343\343\377\351\351\351\377" + "\355\355\355\377\355\355\355\377\355\355\355\377\355\355\355\377\355\355" + "\355\377\352\352\352\377\352\352\352\377\352\352\352\377\352\352\352\377" + "\352\352\352\377\357\357\357\377\357\357\357\377\357\357\357\377\362\362" + "\362\377\362\362\362\377\362\362\362\377\362\362\362\377\357\357\357\377" + "\357\357\357\377\360\360\360\377\355\355\355\377\351\351\351\377\351\351" + "\351\377\343\343\343\377\346\346\346\377\346\346\346\377\343\343\343\377" + "\351\351\351\377\355\355\355\377\360\360\360\377\360\360\360\377\362\362" + "\362\377\362\362\362\377\362\362\362\377\357\357\357\377\354\354\354\377" + "\351\351\351\377\346\346\346\377\343\343\343\377\335\335\335\377\335\335" + "\335\377\327\327\327\377\327\327\327\377\335\335\335\377\335\335\335\377" + "\343\343\343\377\346\346\346\377\351\351\351\377\354\354\354\377\357\357" + "\357\377\362\362\362\377\362\362\362\377\362\362\362\377\360\360\360\377" + "\355\355\355\377\355\355\355\377\355\355\355\377\351\351\351\377\351\351" + "\351\377\343\343\343\377\346\346\346\377\346\346\346\377\346\346\346\377" + "\351\351\351\377\355\355\355\377\363\363\363\377\363\363\363\377\363\363" + "\363\377\363\363\363\377\357\357\357\377\357\357\357\377\357\357\357\377" + "\357\357\357\377\357\357\357\377\357\357\357\377\357\357\357\377\362\362" + "\362\377\362\362\362\377\362\362\362\377\362\362\362\377\362\362\362\377" + "\363\363\363\377\362\362\362\377\363\363\363\377\360\360\360\377\355\355" + "\355\377\351\351\351\377\343\343\343\377\343\343\343\377\343\343\343\377" + "\343\343\343\377\351\351\351\377\360\360\360\377\360\360\360\377\360\360" + "\360\377\362\362\362\377\362\362\362\377\362\362\362\377\363\363\363\377" + "\357\357\357\377\351\351\351\377\346\346\346\377\343\343\343\377\335\335" + "\335\377\335\335\335\377\327\327\327\377\327\327\327\377\335\335\335\377" + "\335\335\335\377\343\343\343\377\346\346\346\377\351\351\351\377\357\357" + "\357\377\363\363\363\377\362\362\362\377\362\362\362\377\362\362\362\377" + "\360\360\360\377\360\360\360\377\355\355\355\377\355\355\355\377\351\351" + "\351\377\351\351\351\377\343\343\343\377\343\343\343\377\346\346\346\377" + "\351\351\351\377\355\355\355\377\360\360\360\377\363\363\363\377\363\363" + "\363\377\363\363\363\377\363\363\363\377\357\357\357\377\357\357\357\377" + "\357\357\357\377\357\357\357\377\357\357\357\377\362\362\362\377\362\362" + "\362\377\362\362\362\377\357\357\357\377\357\357\357\377\357\357\357\377" + "\357\357\357\377\363\363\363\377\363\363\363\377\363\363\363\377\363\363" + "\363\377\355\355\355\377\351\351\351\377\351\351\351\377\346\346\346\377" + "\346\346\346\377\351\351\351\377\351\351\351\377\360\360\360\377\363\363" + "\363\377\363\363\363\377\365\365\365\377\365\365\365\377\363\363\363\377" + "\363\363\363\377\357\357\357\377\354\354\354\377\347\347\347\377\343\343" + "\343\377\335\335\335\377\335\335\335\377\327\327\327\377\327\327\327\377" + "\335\335\335\377\335\335\335\377\343\343\343\377\347\347\347\377\351\351" + "\351\377\357\357\357\377\363\363\363\377\363\363\363\377\365\365\365\377" + "\365\365\365\377\365\365\365\377\363\363\363\377\360\360\360\377\355\355" + "\355\377\351\351\351\377\351\351\351\377\351\351\351\377\346\346\346\377" + "\351\351\351\377\351\351\351\377\355\355\355\377\360\360\360\377\365\365" + "\365\377\365\365\365\377\365\365\365\377\365\365\365\377\363\363\363\377" + "\362\362\362\377\362\362\362\377\362\362\362\377\362\362\362\377\362\362" + "\362\377\362\362\362\377\362\362\362\377\357\357\357\377\357\357\357\377" + "\357\357\357\377\362\362\362\377\363\363\363\377\363\363\363\377\363\363" + "\363\377\363\363\363\377\355\355\355\377\355\355\355\377\351\351\351\377" + "\351\351\351\377\351\351\351\377\351\351\351\377\360\360\360\377\360\360" + "\360\377\363\363\363\377\363\363\363\377\365\365\365\377\365\365\365\377" + "\363\363\363\377\363\363\363\377\357\357\357\377\355\355\355\377\347\347" + "\347\377\343\343\343\377\335\335\335\377\335\335\335\377\327\327\327\377" + "\327\327\327\377\335\335\335\377\335\335\335\377\343\343\343\377\347\347" + "\347\377\351\351\351\377\357\357\357\377\363\363\363\377\363\363\363\377" + "\365\365\365\377\365\365\365\377\365\365\365\377\363\363\363\377\363\363" + "\363\377\360\360\360\377\355\355\355\377\355\355\355\377\351\351\351\377" + "\351\351\351\377\351\351\351\377\351\351\351\377\355\355\355\377\360\360" + "\360\377\365\365\365\377\365\365\365\377\365\365\365\377\365\365\365\377" + "\363\363\363\377\362\362\362\377\362\362\362\377\362\362\362\377\362\362" + "\362\377\362\362\362\377\362\362\362\377\362\362\362\377\362\362\362\377" + "\362\362\362\377\363\363\363\377\365\365\365\377\365\365\365\377\365\365" + "\365\377\363\363\363\377\363\363\363\377\355\355\355\377\355\355\355\377" + "\351\351\351\377\351\351\351\377\351\351\351\377\352\352\352\377\360\360" + "\360\377\360\360\360\377\363\363\363\377\365\365\365\377\365\365\365\377" + "\370\370\370\377\363\363\363\377\363\363\363\377\360\360\360\377\355\355" + "\355\377\347\347\347\377\343\343\343\377\335\335\335\377\335\335\335\377" + "\327\327\327\377\327\327\327\377\335\335\335\377\335\335\335\377\343\343" + "\343\377\347\347\347\377\354\354\354\377\357\357\357\377\363\363\363\377" + "\363\363\363\377\362\362\362\377\362\362\362\377\362\362\362\377\363\363" + "\363\377\363\363\363\377\360\360\360\377\360\360\360\377\360\360\360\377" + "\352\352\352\377\351\351\351\377\351\351\351\377\351\351\351\377\355\355" + "\355\377\360\360\360\377\365\365\365\377\365\365\365\377\365\365\365\377" + "\365\365\365\377\365\365\365\377\363\363\363\377\362\362\362\377\362\362" + "\362\377\362\362\362\377\363\363\363\377\363\363\363\377\363\363\363\377" + "\363\363\363\377\365\365\365\377\365\365\365\377\365\365\365\377\365\365" + "\365\377\365\365\365\377\363\363\363\377\363\363\363\377\355\355\355\377" + "\355\355\355\377\351\351\351\377\352\352\352\377\352\352\352\377\352\352" + "\352\377\360\360\360\377\360\360\360\377\365\365\365\377\365\365\365\377" + "\365\365\365\377\370\370\370\377\363\363\363\377\357\357\357\377\352\352" + "\352\377\355\355\355\377\347\347\347\377\343\343\343\377\335\335\335\377" + "\335\335\335\377\327\327\327\377\327\327\327\377\335\335\335\377\335\335" + "\335\377\343\343\343\377\347\347\347\377\355\355\355\377\354\354\354\377" + "\357\357\357\377\363\363\363\377\363\363\363\377\362\362\362\377\362\362" + "\362\377\363\363\363\377\363\363\363\377\360\360\360\377\360\360\360\377" + "\352\352\352\377\352\352\352\377\352\352\352\377\352\352\352\377\351\351" + "\351\377\351\351\351\377\355\355\355\377\363\363\363\377\365\365\365\377" + "\365\365\365\377\365\365\365\377\365\365\365\377\365\365\365\377\363\363" + "\363\377\363\363\363\377\363\363\363\377\360\360\360\377\360\360\360\377" + "\360\360\360\377\360\360\360\377\360\360\360\377\360\360\360\377\360\360" + "\360\377\360\360\360\377\360\360\360\377\360\360\360\377\360\360\360\377" + "\355\355\355\377\355\355\355\377\352\352\352\377\351\351\351\377\351\351" + "\351\377\352\352\352\377\362\362\362\377\362\362\362\377\362\362\362\377" + "\363\363\363\377\363\363\363\377\363\363\363\377\363\363\363\377\357\357" + "\357\377\355\355\355\377\355\355\355\377\347\347\347\377\343\343\343\377" + "\335\335\335\377\337\337\337\377\331\331\331\377\331\331\331\377\337\337" + "\337\377\335\335\335\377\343\343\343\377\347\347\347\377\355\355\355\377" + "\352\352\352\377\357\357\357\377\357\357\357\377\357\357\357\377\354\354" + "\354\377\354\354\354\377\362\362\362\377\360\360\360\377\360\360\360\377" + "\352\352\352\377\351\351\351\377\346\346\346\377\346\346\346\377\346\346" + "\346\377\346\346\346\377\351\351\351\377\355\355\355\377\355\355\355\377" + "\360\360\360\377\360\360\360\377\360\360\360\377\360\360\360\377\360\360" + "\360\377\360\360\360\377\360\360\360\377\360\360\360\377\355\355\355\377" + "\355\355\355\377\355\355\355\377\355\355\355\377\355\355\355\377\355\355" + "\355\377\355\355\355\377\355\355\355\377\355\355\355\377\355\355\355\377" + "\355\355\355\377\360\360\360\377\352\352\352\377\351\351\351\377\351\351" + "\351\377\352\352\352\377\354\354\354\377\354\354\354\377\354\354\354\377" + "\354\354\354\377\357\357\357\377\357\357\357\377\357\357\357\377\357\357" + "\357\377\355\355\355\377\355\355\355\377\352\352\352\377\346\346\346\377" + "\335\335\335\377\332\332\332\377\331\331\331\377\331\331\331\377\331\331" + "\331\377\337\337\337\377\335\335\335\377\343\343\343\377\346\346\346\377" + "\352\352\352\377\352\352\352\377\354\354\354\377\357\357\357\377\357\357" + "\357\377\357\357\357\377\357\357\357\377\354\354\354\377\354\354\354\377" + "\354\354\354\377\354\354\354\377\351\351\351\377\346\346\346\377\346\346" + "\346\377\346\346\346\377\346\346\346\377\351\351\351\377\354\354\354\377" + "\352\352\352\377\360\360\360\377\360\360\360\377\355\355\355\377\355\355" + "\355\377\355\355\355\377\355\355\355\377\355\355\355\377\355\355\355\377" + "\351\351\351\377\351\351\351\377\351\351\351\377\351\351\351\377\351\351" + "\351\377\351\351\351\377\351\351\351\377\351\351\351\377\351\351\351\377" + "\351\351\351\377\352\352\352\377\352\352\352\377\352\352\352\377\347\347" + "\347\377\344\344\344\377\344\344\344\377\347\347\347\377\347\347\347\377" + "\347\347\347\377\351\351\351\377\351\351\351\377\351\351\351\377\351\351" + "\351\377\351\351\351\377\352\352\352\377\352\352\352\377\347\347\347\377" + "\343\343\343\377\335\335\335\377\327\327\327\377\331\331\331\377\331\331" + "\331\377\331\331\331\377\337\337\337\377\335\335\335\377\343\343\343\377" + "\346\346\346\377\352\352\352\377\351\351\351\377\347\347\347\377\351\351" + "\351\377\351\351\351\377\351\351\351\377\351\351\351\377\347\347\347\377" + "\347\347\347\377\347\347\347\377\347\347\347\377\344\344\344\377\344\344" + "\344\377\342\342\342\377\342\342\342\377\344\344\344\377\344\344\344\377" + "\347\347\347\377\347\347\347\377\354\354\354\377\352\352\352\377\352\352" + "\352\377\351\351\351\377\351\351\351\377\351\351\351\377\351\351\351\377" + "\351\351\351\377\343\343\343\377\343\343\343\377\343\343\343\377\343\343" + "\343\377\343\343\343\377\343\343\343\377\343\343\343\377\343\343\343\377" + "\343\343\343\377\346\346\346\377\346\346\346\377\346\346\346\377\347\347" + "\347\377\347\347\347\377\344\344\344\377\344\344\344\377\344\344\344\377" + "\347\347\347\377\347\347\347\377\347\347\347\377\347\347\347\377\347\347" + "\347\377\347\347\347\377\351\351\351\377\346\346\346\377\346\346\346\377" + "\343\343\343\377\340\340\340\377\335\335\335\377\327\327\327\377\331\331" + "\331\377\331\331\331\377\331\331\331\377\334\334\334\377\335\335\335\377" + "\335\335\335\377\340\340\340\377\346\346\346\377\351\351\351\377\347\347" + "\347\377\347\347\347\377\347\347\347\377\347\347\347\377\347\347\347\377" + "\344\344\344\377\344\344\344\377\344\344\344\377\344\344\344\377\337\337" + "\337\377\337\337\337\377\337\337\337\377\337\337\337\377\344\344\344\377" + "\344\344\344\377\344\344\344\377\344\344\344\377\347\347\347\377\347\347" + "\347\377\346\346\346\377\346\346\346\377\343\343\343\377\343\343\343\377" + "\343\343\343\377\343\343\343\377\335\335\335\377\335\335\335\377\335\335" + "\335\377\335\335\335\377\335\335\335\377\335\335\335\377\340\340\340\377" + "\340\340\340\377\340\340\340\377\342\342\342\377\342\342\342\377\342\342" + "\342\377\342\342\342\377\342\342\342\377\337\337\337\377\337\337\337\377" + "\337\337\337\377\342\342\342\377\342\342\342\377\342\342\342\377\342\342" + "\342\377\342\342\342\377\342\342\342\377\346\346\346\377\340\340\340\377" + "\340\340\340\377\335\335\335\377\335\335\335\377\335\335\335\377\327\327" + "\327\377\331\331\331\377\337\337\337\377\337\337\337\377\331\331\331\377" + "\327\327\327\377\335\335\335\377\340\340\340\377\346\346\346\377\343\343" + "\343\377\342\342\342\377\342\342\342\377\342\342\342\377\342\342\342\377" + "\342\342\342\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337" + "\337\377\335\335\335\377\332\332\332\377\332\332\332\377\335\335\335\377" + "\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377\342\342" + "\342\377\342\342\342\377\342\342\342\377\340\340\340\377\340\340\340\377" + "\335\335\335\377\335\335\335\377\335\335\335\377\334\334\334\377\334\334" + "\334\377\334\334\334\377\334\334\334\377\335\335\335\377\335\335\335\377" + "\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337" + "\337\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377" + "\337\337\337\377\342\342\342\377\342\342\342\377\337\337\337\377\337\337" + "\337\377\337\337\337\377\337\337\337\377\337\337\337\377\340\340\340\377" + "\335\335\335\377\335\335\335\377\335\335\335\377\335\335\335\377\335\335" + "\335\377\327\327\327\377\331\331\331\377\337\337\337\377\335\335\335\377" + "\327\327\327\377\327\327\327\377\335\335\335\377\335\335\335\377\343\343" + "\343\377\337\337\337\377\342\342\342\377\342\342\342\377\342\342\342\377" + "\342\342\342\377\337\337\337\377\337\337\337\377\335\335\335\377\335\335" + "\335\377\335\335\335\377\332\332\332\377\332\332\332\377\332\332\332\377" + "\335\335\335\377\335\335\335\377\335\335\335\377\335\335\335\377\337\337" + "\337\377\337\337\337\377\337\337\337\377\337\337\337\377\335\335\335\377" + "\335\335\335\377\334\334\334\377\334\334\334\377\334\334\334\377\331\331" + "\331\377\331\331\331\377\331\331\331\377\331\331\331\377\331\331\331\377" + "\331\331\331\377\332\332\332\377\332\332\332\377\332\332\332\377\332\332" + "\332\377\332\332\332\377\332\332\332\377\332\332\332\377\332\332\332\377" + "\332\332\332\377\332\332\332\377\334\334\334\377\334\334\334\377\331\331" + "\331\377\331\331\331\377\331\331\331\377\331\331\331\377\331\331\331\377" + "\335\335\335\377\335\335\335\377\327\327\327\377\327\327\327\377\327\327" + "\327\377\327\327\327\377\327\327\327\377\327\327\327\377\327\327\327\377" + "\327\327\327\377\332\332\332\377\335\335\335\377\335\335\335\377\335\335" + "\335\377\340\340\340\377\334\334\334\377\334\334\334\377\334\334\334\377" + "\334\334\334\377\332\332\332\377\332\332\332\377\332\332\332\377\332\332" + "\332\377\332\332\332\377\327\327\327\377\332\332\332\377\332\332\332\377" + "\327\327\327\377\327\327\327\377\327\327\327\377\332\332\332\377\332\332" + "\332\377\332\332\332\377\332\332\332\377\332\332\332\377\332\332\332\377" + "\331\331\331\377\331\331\331\377\331\331\331\377\326\326\326\377\326\326" + "\326\377\326\326\326\377\326\326\326\377\326\326\326\377\331\331\331\377" + "\331\331\331\377\331\331\331\377\332\332\332\377\332\332\332\377\332\332" + "\332\377\332\332\332\377\332\332\332\377\332\332\332\377\332\332\332\377" + "\332\332\332\377\332\332\332\377\332\332\332\377\334\334\334\377\331\331" + "\331\377\331\331\331\377\331\331\331\377\331\331\331\377\331\331\331\377" + "\331\331\331\377\335\335\335\377\335\335\335\377\327\327\327\377\327\327" + "\327\377\327\327\327\377\327\327\327\377\327\327\327\377\327\327\327\377" + "\327\327\327\377\327\327\327\377\335\335\335\377\335\335\335\377\335\335" + "\335\377\335\335\335\377\334\334\334\377\334\334\334\377\334\334\334\377" + "\334\334\334\377\332\332\332\377\332\332\332\377\332\332\332\377\332\332" + "\332\377\332\332\332\377\332\332\332\377\332\332\332\377\332\332\332\377" + "\332\332\332\377\327\327\327\377\327\327\327\377\332\332\332\377\332\332" + "\332\377\332\332\332\377\332\332\332\377\332\332\332\377\332\332\332\377" + "\332\332\332\377\331\331\331\377\331\331\331\377\326\326\326\377\326\326" + "\326\377\326\326\326\377\334\334\334\377\334\334\334\377\334\334\334\377" + "\334\334\334\377\335\335\335\377\335\335\335\377\335\335\335\377\335\335" + "\335\377\335\335\335\377\337\337\337\377\337\337\337\377\337\337\337\377" + "\337\337\337\377\337\337\337\377\337\337\337\377\335\335\335\377\332\332" + "\332\377\334\334\334\377\337\337\337\377\337\337\337\377\337\337\337\377" + "\337\337\337\377\337\337\337\377\335\335\335\377\335\335\335\377\335\335" + "\335\377\335\335\335\377\335\335\335\377\335\335\335\377\335\335\335\377" + "\332\332\332\377\327\327\327\377\335\335\335\377\335\335\335\377\335\335" + "\335\377\340\340\340\377\342\342\342\377\342\342\342\377\342\342\342\377" + "\342\342\342\377\337\337\337\377\337\337\337\377\337\337\337\377\335\335" + "\335\377\335\335\335\377\335\335\335\377\335\335\335\377\335\335\335\377" + "\335\335\335\377\335\335\335\377\332\332\332\377\332\332\332\377\335\335" + "\335\377\335\335\335\377\335\335\335\377\335\335\335\377\335\335\335\377" + "\335\335\335\377\335\335\335\377\335\335\335\377\334\334\334\377\334\334" + "\334\377\334\334\334\377\334\334\334\377\335\335\335\377\335\335\335\377" + "\335\335\335\377\335\335\335\377\340\340\340\377\340\340\340\377\340\340" + "\340\377\343\343\343\377\343\343\343\377\343\343\343\377\340\340\340\377" + "\340\340\340\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337" + "\337\377\332\332\332\377\334\334\334\377\342\342\342\377\342\342\342\377" + "\342\342\342\377\342\342\342\377\342\342\342\377\342\342\342\377\335\335" + "\335\377\340\340\340\377\340\340\340\377\340\340\340\377\335\335\335\377" + "\335\335\335\377\335\335\335\377\335\335\335\377\335\335\335\377\335\335" + "\335\377\334\334\334\377\337\337\337\377\342\342\342\377\342\342\342\377" + "\347\347\347\377\344\344\344\377\344\344\344\377\344\344\344\377\343\343" + "\343\377\340\340\340\377\340\340\340\377\340\340\340\377\335\335\335\377" + "\335\335\335\377\335\335\335\377\335\335\335\377\334\334\334\377\334\334" + "\334\377\335\335\335\377\335\335\335\377\335\335\335\377\335\335\335\377" + "\335\335\335\377\335\335\335\377\335\335\335\377\335\335\335\377\335\335" + "\335\377\335\335\335\377\335\335\335\377\335\335\335\377\343\343\343\377" + "\343\343\343\377\343\343\343\377\343\343\343\377\346\346\346\377\346\346" + "\346\377\346\346\346\377\346\346\346\377\346\346\346\377\346\346\346\377" + "\343\343\343\377\346\346\346\377\343\343\343\377\344\344\344\377\344\344" + "\344\377\342\342\342\377\337\337\337\377\337\337\337\377\344\344\344\377" + "\344\344\344\377\347\347\347\377\347\347\347\377\347\347\347\377\347\347" + "\347\377\342\342\342\377\342\342\342\377\342\342\342\377\346\346\346\377" + "\343\343\343\377\335\335\335\377\335\335\335\377\335\335\335\377\331\331" + "\331\377\337\337\337\377\337\337\337\377\342\342\342\377\344\344\344\377" + "\344\344\344\377\352\352\352\377\351\351\351\377\351\351\351\377\351\351" + "\351\377\346\346\346\377\346\346\346\377\346\346\346\377\346\346\346\377" + "\343\343\343\377\343\343\343\377\343\343\343\377\343\343\343\377\340\340" + "\340\377\340\340\340\377\343\343\343\377\343\343\343\377\343\343\343\377" + "\343\343\343\377\343\343\343\377\343\343\343\377\343\343\343\377\343\343" + "\343\377\343\343\343\377\343\343\343\377\343\343\343\377\343\343\343\377" + "\351\351\351\377\351\351\351\377\351\351\351\377\351\351\351\377\351\351" + "\351\377\351\351\351\377\355\355\355\377\355\355\355\377\355\355\355\377" + "\355\355\355\377\351\351\351\377\352\352\352\377\346\346\346\377\346\346" + "\346\377\343\343\343\377\344\344\344\377\344\344\344\377\344\344\344\377" + "\344\344\344\377\344\344\344\377\347\347\347\377\351\351\351\377\351\351" + "\351\377\351\351\351\377\347\347\347\377\347\347\347\377\344\344\344\377" + "\344\344\344\377\343\343\343\377\335\335\335\377\334\334\334\377\331\331" + "\331\377\334\334\334\377\342\342\342\377\342\342\342\377\344\344\344\377" + "\347\347\347\377\352\352\352\377\355\355\355\377\360\360\360\377\355\355" + "\355\377\360\360\360\377\360\360\360\377\360\360\360\377\360\360\360\377" + "\360\360\360\377\355\355\355\377\355\355\355\377\351\351\351\377\351\351" + "\351\377\343\343\343\377\343\343\343\377\351\351\351\377\351\351\351\377" + "\355\355\355\377\355\355\355\377\355\355\355\377\355\355\355\377\351\351" + "\351\377\351\351\351\377\351\351\351\377\351\351\351\377\343\343\343\377" + "\343\343\343\377\354\354\354\377\354\354\354\377\354\354\354\377\355\355" + "\355\377\355\355\355\377\355\355\355\377\363\363\363\377\363\363\363\377" + "\363\363\363\377\363\363\363\377\355\355\355\377\355\355\355\377\351\351" + "\351\377\346\346\346\377\346\346\346\377\346\346\346\377\346\346\346\377" + "\351\351\351\377\351\351\351\377\351\351\351\377\352\352\352\377\354\354" + "\354\377\354\354\354\377\357\357\357\377\354\354\354\377\354\354\354\377" + "\351\351\351\377\344\344\344\377\342\342\342\377\337\337\337\377\337\337" + "\337\377\337\337\337\377\334\334\334\377\342\342\342\377\342\342\342\377" + "\344\344\344\377\352\352\352\377\355\355\355\377\362\362\362\377\363\363" + "\363\377\365\365\365\377\365\365\365\377\365\365\365\377\362\362\362\377" + "\362\362\362\377\362\362\362\377\357\357\357\377\357\357\357\377\352\352" + "\352\377\352\352\352\377\344\344\344\377\344\344\344\377\352\352\352\377" + "\354\354\354\377\363\363\363\377\363\363\363\377\363\363\363\377\363\363" + "\363\377\355\355\355\377\355\355\355\377\354\354\354\377\354\354\354\377" + "\347\347\347\377\347\347\347\377\355\355\355\377\355\355\355\377\355\355" + "\355\377\355\355\355\377\360\360\360\377\360\360\360\377\363\363\363\377" + "\363\363\363\377\363\363\363\377\363\363\363\377\363\363\363\377\360\360" + "\360\377\355\355\355\377\351\351\351\377\343\343\343\377\343\343\343\377" + "\343\343\343\377\351\351\351\377\352\352\352\377\352\352\352\377\360\360" + "\360\377\362\362\362\377\362\362\362\377\362\362\362\377\357\357\357\377" + "\354\354\354\377\354\354\354\377\347\347\347\377\347\347\347\377\342\342" + "\342\377\337\337\337\377\334\334\334\377\334\334\334\377\337\337\337\377" + "\344\344\344\377\351\351\351\377\355\355\355\377\360\360\360\377\365\365" + "\365\377\366\366\366\377\371\371\371\377\370\370\370\377\366\366\366\377" + "\366\366\366\377\362\362\362\377\362\362\362\377\362\362\362\377\362\362" + "\362\377\355\355\355\377\355\355\355\377\352\352\352\377\352\352\352\377" + "\355\355\355\377\357\357\357\377\357\357\357\377\357\357\357\377\357\357" + "\357\377\357\357\357\377\355\355\355\377\355\355\355\377\355\355\355\377" + "\355\355\355\377\355\355\355\377\355\355\355\377\362\362\362\377\362\362" + "\362\377\362\362\362\377\362\362\362\377\362\362\362\377\362\362\362\377" + "\362\362\362\377\363\363\363\377\363\363\363\377\363\363\363\377\363\363" + "\363\377\360\360\360\377\355\355\355\377\351\351\351\377\351\351\351\377" + "\343\343\343\377\343\343\343\377\351\351\351\377\354\354\354\377\355\355" + "\355\377\362\362\362\377\363\363\363\377\363\363\363\377\363\363\363\377" + "\362\362\362\377\357\357\357\377\352\352\352\377\347\347\347\377\344\344" + "\344\377\337\337\337\377\337\337\337\377\332\332\332\377\337\337\337\377" + "\337\337\337\377\343\343\343\377\351\351\351\377\355\355\355\377\363\363" + "\363\377\366\366\366\377\366\366\366\377\371\371\371\377\373\373\373\377" + "\373\373\373\377\371\371\371\377\365\365\365\377\365\365\365\377\365\365" + "\365\377\365\365\365\377\360\360\360\377\360\360\360\377\355\355\355\377" + "\357\357\357\377\357\357\357\377\362\362\362\377\362\362\362\377\363\363" + "\363\377\363\363\363\377\362\362\362\377\362\362\362\377\362\362\362\377" + "\362\362\362\377\362\362\362\377\362\362\362\377\362\362\362\377\362\362" + "\362\377\362\362\362\377\362\362\362\377\362\362\362\377\362\362\362\377" + "\362\362\362\377\362\362\362\377\363\363\363\377\363\363\363\377\362\362" + "\362\377\362\362\362\377\355\355\355\377\355\355\355\377\351\351\351\377" + "\351\351\351\377\343\343\343\377\343\343\343\377\351\351\351\377\355\355" + "\355\377\360\360\360\377\363\363\363\377\363\363\363\377\363\363\363\377" + "\363\363\363\377\362\362\362\377\360\360\360\377\355\355\355\377\354\354" + "\354\377\347\347\347\377\342\342\342\377\337\337\337\377\335\335\335\377" + "\337\337\337\377\340\340\340\377\343\343\343\377\346\346\346\377\355\355" + "\355\377\365\365\365\377\370\370\370\377\371\371\371\377\373\373\373\377" + "\373\373\373\377\373\373\373\377\371\371\371\377\366\366\366\377\366\366" + "\366\377\366\366\366\377\365\365\365\377\365\365\365\377\360\360\360\377" + "\360\360\360\377\355\355\355\377\355\355\355\377\360\360\360\377\363\363" + "\363\377\363\363\363\377\363\363\363\377\362\362\362\377\362\362\362\377" + "\362\362\362\377\362\362\362\377\357\357\357\377\362\362\362\377\362\362" + "\362\377\363\363\363\377\363\363\363\377\363\363\363\377\363\363\363\377" + "\363\363\363\377\362\362\362\377\362\362\362\377\362\362\362\377\362\362" + "\362\377\362\362\362\377\362\362\362\377\355\355\355\377\352\352\352\377" + "\347\347\347\377\347\347\347\377\343\343\343\377\351\351\351\377\351\351" + "\351\377\355\355\355\377\363\363\363\377\363\363\363\377\363\363\363\377" + "\363\363\363\377\363\363\363\377\363\363\363\377\360\360\360\377\360\360" + "\360\377\352\352\352\377\346\346\346\377\342\342\342\377\337\337\337\377" + "\335\335\335\377\335\335\335\377\340\340\340\377\340\340\340\377\351\351" + "\351\377\360\360\360\377\363\363\363\377\366\366\366\377\373\373\373\377" + "\373\373\373\377\371\371\371\377\371\371\371\377\373\373\373\377\373\373" + "\373\377\370\370\370\377\370\370\370\377\363\363\363\377\363\363\363\377" + "\357\357\357\377\357\357\357\377\357\357\357\377\357\357\357\377\363\363" + "\363\377\363\363\363\377\363\363\363\377\363\363\363\377\365\365\365\377" + "\365\365\365\377\363\363\363\377\363\363\363\377\360\360\360\377\360\360" + "\360\377\363\363\363\377\360\360\360\377\360\360\360\377\360\360\360\377" + "\360\360\360\377\363\363\363\377\362\362\362\377\362\362\362\377\362\362" + "\362\377\362\362\362\377\362\362\362\377\362\362\362\377\355\355\355\377" + "\352\352\352\377\344\344\344\377\344\344\344\377\344\344\344\377\344\344" + "\344\377\352\352\352\377\354\354\354\377\363\363\363\377\363\363\363\377" + "\363\363\363\377\363\363\363\377\363\363\363\377\363\363\363\377\360\360" + "\360\377\355\355\355\377\351\351\351\377\346\346\346\377\343\343\343\377" + "\335\335\335\377\335\335\335\377\334\334\334\377\340\340\340\377\343\343" + "\343\377\351\351\351\377\357\357\357\377\362\362\362\377\366\366\366\377" + "\373\373\373\377\371\371\371\377\371\371\371\377\370\370\370\377\373\373" + "\373\377\373\373\373\377\370\370\370\377\370\370\370\377\363\363\363\377" + "\363\363\363\377\357\357\357\377\357\357\357\377\357\357\357\377\357\357" + "\357\377\360\360\360\377\363\363\363\377\362\362\362\377\362\362\362\377" + "\363\363\363\377\363\363\363\377\360\360\360\377\360\360\360\377\357\357" + "\357\377\357\357\357\377\360\360\360\377\360\360\360\377\360\360\360\377" + "\360\360\360\377\357\357\357\377\360\360\360\377\363\363\363\377\363\363" + "\363\377\363\363\363\377\363\363\363\377\362\362\362\377\362\362\362\377" + "\355\355\355\377\352\352\352\377\344\344\344\377\344\344\344\377\344\344" + "\344\377\344\344\344\377\352\352\352\377\352\352\352\377\357\357\357\377" + "\355\355\355\377\365\365\365\377\365\365\365\377\365\365\365\377\365\365" + "\365\377\363\363\363\377\355\355\355\377\351\351\351\377\346\346\346\377" + "\340\340\340\377\340\340\340\377\334\334\334\377\334\334\334\377\340\340" + "\340\377\343\343\343\377\347\347\347\377\355\355\355\377\362\362\362\377" + "\366\366\366\377\371\371\371\377\371\371\371\377\366\366\366\377\365\365" + "\365\377\365\365\365\377\365\365\365\377\366\366\366\377\366\366\366\377" + "\362\362\362\377\362\362\362\377\355\355\355\377\357\357\357\377\360\360" + "\360\377\360\360\360\377\357\357\357\377\357\357\357\377\363\363\363\377" + "\363\363\363\377\363\363\363\377\363\363\363\377\360\360\360\377\360\360" + "\360\377\357\357\357\377\357\357\357\377\360\360\360\377\360\360\360\377" + "\360\360\360\377\360\360\360\377\357\357\357\377\357\357\357\377\360\360" + "\360\377\360\360\360\377\360\360\360\377\360\360\360\377\355\355\355\377" + "\360\360\360\377\354\354\354\377\352\352\352\377\344\344\344\377\344\344" + "\344\377\344\344\344\377\344\344\344\377\352\352\352\377\355\355\355\377" + "\357\357\357\377\360\360\360\377\362\362\362\377\362\362\362\377\363\363" + "\363\377\365\365\365\377\363\363\363\377\363\363\363\377\355\355\355\377" + "\346\346\346\377\340\340\340\377\340\340\340\377\334\334\334\377\334\334" + "\334\377\340\340\340\377\343\343\343\377\347\347\347\377\355\355\355\377" + "\362\362\362\377\366\366\366\377\371\371\371\377\371\371\371\377\365\365" + "\365\377\365\365\365\377\365\365\365\377\365\365\365\377\366\366\366\377" + "\366\366\366\377\362\362\362\377\362\362\362\377\355\355\355\377\357\357" + "\357\377\357\357\357\377\360\360\360\377\357\357\357\377\357\357\357\377" + "\363\363\363\377\363\363\363\377\363\363\363\377\363\363\363\377\360\360" + "\360\377\360\360\360\377\357\357\357\377\357\357\357\377\360\360\360\377" + "\357\357\357\377\357\357\357\377\357\357\357\377\357\357\357\377\357\357" + "\357\377\360\360\360\377\360\360\360\377\360\360\360\377\360\360\360\377" + "\354\354\354\377\357\357\357\377\351\351\351\377\351\351\351\377\343\343" + "\343\377\343\343\343\377\344\344\344\377\344\344\344\377\352\352\352\377" + "\355\355\355\377\362\362\362\377\362\362\362\377\357\357\357\377\357\357" + "\357\377\363\363\363\377\363\363\363\377\362\362\362\377\363\363\363\377" + "\355\355\355\377\346\346\346\377\340\340\340\377\340\340\340\377\335\335" + "\335\377\335\335\335\377\340\340\340\377\342\342\342\377\344\344\344\377" + "\355\355\355\377\362\362\362\377\366\366\366\377\363\363\363\377\365\365" + "\365\377\370\370\370\377\370\370\370\377\366\366\366\377\366\366\366\377" + "\363\363\363\377\363\363\363\377\362\362\362\377\362\362\362\377\355\355" + "\355\377\355\355\355\377\352\352\352\377\352\352\352\377\360\360\360\377" + "\360\360\360\377\363\363\363\377\363\363\363\377\360\360\360\377\360\360" + "\360\377\360\360\360\377\360\360\360\377\354\354\354\377\354\354\354\377" + "\357\357\357\377\357\357\357\377\357\357\357\377\357\357\357\377\354\354" + "\354\377\357\357\357\377\360\360\360\377\360\360\360\377\360\360\360\377" + "\360\360\360\377\357\357\357\377\357\357\357\377\351\351\351\377\351\351" + "\351\377\343\343\343\377\343\343\343\377\343\343\343\377\343\343\343\377" + "\351\351\351\377\354\354\354\377\360\360\360\377\362\362\362\377\357\357" + "\357\377\362\362\362\377\363\363\363\377\363\363\363\377\357\357\357\377" + "\357\357\357\377\354\354\354\377\351\351\351\377\343\343\343\377\340\340" + "\340\377\335\335\335\377\335\335\335\377\337\337\337\377\337\337\337\377" + "\344\344\344\377\355\355\355\377\362\362\362\377\363\363\363\377\363\363" + "\363\377\363\363\363\377\370\370\370\377\370\370\370\377\366\366\366\377" + "\366\366\366\377\363\363\363\377\362\362\362\377\357\357\357\377\357\357" + "\357\377\355\355\355\377\355\355\355\377\355\355\355\377\352\352\352\377" + "\357\357\357\377\360\360\360\377\363\363\363\377\363\363\363\377\360\360" + "\360\377\357\357\357\377\357\357\357\377\357\357\357\377\354\354\354\377" + "\354\354\354\377\357\357\357\377\355\355\355\377\355\355\355\377\355\355" + "\355\377\355\355\355\377\357\357\357\377\354\354\354\377\354\354\354\377" + "\354\354\354\377\354\354\354\377\357\357\357\377\357\357\357\377\351\351" + "\351\377\346\346\346\377\343\343\343\377\343\343\343\377\343\343\343\377" + "\343\343\343\377\351\351\351\377\354\354\354\377\355\355\355\377\360\360" + "\360\377\362\362\362\377\362\362\362\377\362\362\362\377\362\362\362\377" + "\357\357\357\377\357\357\357\377\352\352\352\377\347\347\347\377\343\343" + "\343\377\343\343\343\377\335\335\335\377\335\335\335\377\337\337\337\377" + "\337\337\337\377\344\344\344\377\355\355\355\377\362\362\362\377\360\360" + "\360\377\360\360\360\377\363\363\363\377\363\363\363\377\363\363\363\377" + "\362\362\362\377\362\362\362\377\362\362\362\377\357\357\357\377\355\355" + "\355\377\352\352\352\377\352\352\352\377\352\352\352\377\352\352\352\377" + "\352\352\352\377\355\355\355\377\357\357\357\377\357\357\357\377\357\357" + "\357\377\357\357\357\377\355\355\355\377\352\352\352\377\352\352\352\377" + "\355\355\355\377\355\355\355\377\355\355\355\377\355\355\355\377\355\355" + "\355\377\355\355\355\377\355\355\355\377\355\355\355\377\352\352\352\377" + "\352\352\352\377\352\352\352\377\354\354\354\377\357\357\357\377\357\357" + "\357\377\351\351\351\377\346\346\346\377\340\340\340\377\340\340\340\377" + "\340\340\340\377\343\343\343\377\351\351\351\377\351\351\351\377\355\355" + "\355\377\355\355\355\377\360\360\360\377\360\360\360\377\362\362\362\377" + "\362\362\362\377\357\357\357\377\357\357\357\377\352\352\352\377\344\344" + "\344\377\342\342\342\377\342\342\342\377\334\334\334\377\334\334\334\377" + "\337\337\337\377\337\337\337\377\344\344\344\377\352\352\352\377\357\357" + "\357\377\360\360\360\377\360\360\360\377\360\360\360\377\360\360\360\377" + "\360\360\360\377\357\357\357\377\357\357\357\377\357\357\357\377\357\357" + "\357\377\355\355\355\377\352\352\352\377\352\352\352\377\352\352\352\377" + "\352\352\352\377\352\352\352\377\352\352\352\377\357\357\357\377\357\357" + "\357\377\357\357\357\377\355\355\355\377\355\355\355\377\355\355\355\377" + "\355\355\355\377\355\355\355\377\355\355\355\377\355\355\355\377\344\344" + "\344\377\344\344\344\377\344\344\344\377\344\344\344\377\347\347\347\377" + "\352\352\352\377\347\347\347\377\347\347\347\377\347\347\347\377\347\347" + "\347\377\352\352\352\377\347\347\347\377\346\346\346\377\340\340\340\377" + "\340\340\340\377\340\340\340\377\340\340\340\377\346\346\346\377\346\346" + "\346\377\354\354\354\377\354\354\354\377\355\355\355\377\355\355\355\377" + "\355\355\355\377\355\355\355\377\355\355\355\377\357\357\357\377\352\352" + "\352\377\344\344\344\377\342\342\342\377\342\342\342\377\334\334\334\377" + "\334\334\334\377\337\337\337\377\337\337\337\377\344\344\344\377\352\352" + "\352\377\357\357\357\377\355\355\355\377\360\360\360\377\354\354\354\377" + "\354\354\354\377\354\354\354\377\352\352\352\377\352\352\352\377\352\352" + "\352\377\352\352\352\377\352\352\352\377\344\344\344\377\344\344\344\377" + "\346\346\346\377\346\346\346\377\346\346\346\377\346\346\346\377\351\351" + "\351\377\351\351\351\377\351\351\351\377\347\347\347\377\347\347\347\377" + "\347\347\347\377\347\347\347\377\347\347\347\377\347\347\347\377\347\347" + "\347\377\344\344\344\377\344\344\344\377\344\344\344\377\344\344\344\377" + "\347\347\347\377\352\352\352\377\347\347\347\377\347\347\347\377\347\347" + "\347\377\347\347\347\377\347\347\347\377\344\344\344\377\344\344\344\377" + "\337\337\337\377\332\332\332\377\332\332\332\377\337\337\337\377\346\346" + "\346\377\346\346\346\377\351\351\351\377\351\351\351\377\354\354\354\377" + "\351\351\351\377\354\354\354\377\355\355\355\377\354\354\354\377\357\357" + "\357\377\352\352\352\377\344\344\344\377\342\342\342\377\342\342\342\377" + "\334\334\334\377\334\334\334\377\335\335\335\377\335\335\335\377\342\342" + "\342\377\344\344\344\377\352\352\352\377\354\354\354\377\360\360\360\377" + "\357\357\357\377\354\354\354\377\354\354\354\377\354\354\354\377\355\355" + "\355\377\352\352\352\377\352\352\352\377\347\347\347\377\344\344\344\377" + "\340\340\340\377\340\340\340\377\340\340\340\377\340\340\340\377\346\346" + "\346\377\346\346\346\377\354\354\354\377\354\354\354\377\347\347\347\377" + "\347\347\347\377\347\347\347\377\347\347\347\377\347\347\347\377\347\347" + "\347\377\347\347\347\377\347\347\347\377\347\347\347\377\347\347\347\377" + "\347\347\347\377\347\347\347\377\352\352\352\377\352\352\352\377\355\355" + "\355\377\355\355\355\377\352\352\352\377\352\352\352\377\344\344\344\377" + "\344\344\344\377\342\342\342\377\337\337\337\377\337\337\337\377\342\342" + "\342\377\344\344\344\377\344\344\344\377\352\352\352\377\354\354\354\377" + "\357\357\357\377\357\357\357\377\357\357\357\377\360\360\360\377\360\360" + "\360\377\355\355\355\377\352\352\352\377\344\344\344\377\342\342\342\377" + "\342\342\342\377\334\334\334\377\332\332\332\377\335\335\335\377\335\335" + "\335\377\342\342\342\377\344\344\344\377\352\352\352\377\354\354\354\377" + "\360\360\360\377\357\357\357\377\354\354\354\377\354\354\354\377\354\354" + "\354\377\355\355\355\377\352\352\352\377\352\352\352\377\344\344\344\377" + "\344\344\344\377\340\340\340\377\340\340\340\377\340\340\340\377\340\340" + "\340\377\346\346\346\377\346\346\346\377\354\354\354\377\351\351\351\377" + "\354\354\354\377\352\352\352\377\352\352\352\377\352\352\352\377\352\352" + "\352\377\352\352\352\377\352\352\352\377\346\346\346\377\346\346\346\377" + "\346\346\346\377\347\347\347\377\347\347\347\377\347\347\347\377\352\352" + "\352\377\352\352\352\377\352\352\352\377\355\355\355\377\352\352\352\377" + "\352\352\352\377\347\347\347\377\347\347\347\377\344\344\344\377\344\344" + "\344\377\347\347\347\377\347\347\347\377\352\352\352\377\352\352\352\377" + "\355\355\355\377\357\357\357\377\357\357\357\377\357\357\357\377\360\360" + "\360\377\360\360\360\377\360\360\360\377\355\355\355\377\344\344\344\377" + "\337\337\337\377\337\337\337\377\332\332\332\377\332\332\332\377\337\337" + "\337\377\337\337\337\377\344\344\344\377\352\352\352\377\357\357\357\377" + "\355\355\355\377\360\360\360\377\354\354\354\377\354\354\354\377\354\354" + "\354\377\354\354\354\377\354\354\354\377\352\352\352\377\352\352\352\377" + "\351\351\351\377\351\351\351\377\346\346\346\377\340\340\340\377\340\340" + "\340\377\340\340\340\377\346\346\346\377\351\351\351\377\351\351\351\377" + "\351\351\351\377\354\354\354\377\352\352\352\377\352\352\352\377\352\352" + "\352\377\352\352\352\377\352\352\352\377\352\352\352\377\354\354\354\377" + "\354\354\354\377\354\354\354\377\354\354\354\377\354\354\354\377\354\354" + "\354\377\357\357\357\377\357\357\357\377\360\360\360\377\362\362\362\377" + "\357\357\357\377\357\357\357\377\355\355\355\377\355\355\355\377\352\352" + "\352\377\352\352\352\377\355\355\355\377\355\355\355\377\357\357\357\377" + "\357\357\357\377\362\362\362\377\362\362\362\377\363\363\363\377\363\363" + "\363\377\365\365\365\377\365\365\365\377\360\360\360\377\354\354\354\377" + "\344\344\344\377\337\337\337\377\337\337\337\377\332\332\332\377\332\332" + "\332\377\337\337\337\377\337\337\337\377\344\344\344\377\352\352\352\377" + "\357\357\357\377\360\360\360\377\363\363\363\377\360\360\360\377\360\360" + "\360\377\360\360\360\377\360\360\360\377\360\360\360\377\357\357\357\377" + "\357\357\357\377\354\354\354\377\354\354\354\377\346\346\346\377\346\346" + "\346\377\343\343\343\377\346\346\346\377\346\346\346\377\354\354\354\377" + "\357\357\357\377\357\357\357\377\357\357\357\377\355\355\355\377\357\357" + "\357\377\357\357\357\377\357\357\357\377\357\357\357\377\357\357\357\377" + "\357\357\357\377\357\357\357\377\357\357\357\377\357\357\357\377\360\360" + "\360\377\360\360\360\377\360\360\360\377\360\360\360\377\360\360\360\377" + "\360\360\360\377\357\357\357\377\357\357\357\377\352\352\352\377\355\355" + "\355\377\352\352\352\377\352\352\352\377\355\355\355\377\362\362\362\377" + "\362\362\362\377\362\362\362\377\363\363\363\377\363\363\363\377\363\363" + "\363\377\365\365\365\377\365\365\365\377\365\365\365\377\363\363\363\377" + "\355\355\355\377\352\352\352\377\344\344\344\377\337\337\337\377\332\332" + "\332\377\332\332\332\377\337\337\337\377\337\337\337\377\344\344\344\377" + "\355\355\355\377\362\362\362\377\360\360\360\377\363\363\363\377\360\360" + "\360\377\360\360\360\377\360\360\360\377\360\360\360\377\360\360\360\377" + "\357\357\357\377\357\357\357\377\354\354\354\377\354\354\354\377\346\346" + "\346\377\346\346\346\377\346\346\346\377\346\346\346\377\354\354\354\377" + "\354\354\354\377\357\357\357\377\357\357\357\377\357\357\357\377\355\355" + "\355\377\357\357\357\377\355\355\355\377\357\357\357\377\362\362\362\377" + "\362\362\362\377\363\363\363\377\363\363\363\377\363\363\363\377\363\363" + "\363\377\365\365\365\377\365\365\365\377\365\365\365\377\365\365\365\377" + "\365\365\365\377\365\365\365\377\363\363\363\377\360\360\360\377\357\357" + "\357\377\354\354\354\377\354\354\354\377\354\354\354\377\351\351\351\377" + "\362\362\362\377\363\363\363\377\366\366\366\377\370\370\370\377\370\370" + "\370\377\370\370\370\377\370\370\370\377\370\370\370\377\365\365\365\377" + "\363\363\363\377\355\355\355\377\352\352\352\377\344\344\344\377\337\337" + "\337\377\332\332\332\377\332\332\332\377\337\337\337\377\337\337\337\377" + "\344\344\344\377\355\355\355\377\362\362\362\377\360\360\360\377\365\365" + "\365\377\363\363\363\377\363\363\363\377\363\363\363\377\362\362\362\377" + "\362\362\362\377\360\360\360\377\360\360\360\377\354\354\354\377\354\354" + "\354\377\346\346\346\377\346\346\346\377\346\346\346\377\346\346\346\377" + "\354\354\354\377\354\354\354\377\360\360\360\377\360\360\360\377\363\363" + "\363\377\357\357\357\377\362\362\362\377\362\362\362\377\362\362\362\377" + "\362\362\362\377\366\366\366\377\360\360\360\377\360\360\360\377\360\360" + "\360\377\363\363\363\377\365\365\365\377\365\365\365\377\365\365\365\377" + "\365\365\365\377\365\365\365\377\365\365\365\377\365\365\365\377\360\360" + "\360\377\360\360\360\377\357\357\357\377\354\354\354\377\351\351\351\377" + "\351\351\351\377\357\357\357\377\362\362\362\377\370\370\370\377\370\370" + "\370\377\370\370\370\377\370\370\370\377\370\370\370\377\370\370\370\377" + "\365\365\365\377\365\365\365\377\360\360\360\377\352\352\352\377\344\344" + "\344\377\337\337\337\377\332\332\332\377\332\332\332\377\337\337\337\377" + "\337\337\337\377\344\344\344\377\355\355\355\377\362\362\362\377\360\360" + "\360\377\365\365\365\377\363\363\363\377\363\363\363\377\363\363\363\377" + "\362\362\362\377\362\362\362\377\360\360\360\377\360\360\360\377\354\354" + "\354\377\354\354\354\377\346\346\346\377\346\346\346\377\346\346\346\377" + "\346\346\346\377\354\354\354\377\354\354\354\377\360\360\360\377\360\360" + "\360\377\362\362\362\377\355\355\355\377\362\362\362\377\362\362\362\377" + "\362\362\362\377\366\366\366\377\366\366\366\377\363\363\363\377\365\365" + "\365\377\365\365\365\377\365\365\365\377\365\365\365\377\371\371\371\377" + "\371\371\371\377\371\371\371\377\371\371\371\377\365\365\365\377\365\365" + "\365\377\360\360\360\377\363\363\363\377\357\357\357\377\357\357\357\377" + "\354\354\354\377\357\357\357\377\357\357\357\377\360\360\360\377\365\365" + "\365\377\370\370\370\377\376\376\376\377\376\376\376\377\370\370\370\377" + "\370\370\370\377\365\365\365\377\363\363\363\377\360\360\360\377\352\352" + "\352\377\344\344\344\377\337\337\337\377\332\332\332\377\332\332\332\377" + "\337\337\337\377\337\337\337\377\344\344\344\377\355\355\355\377\362\362" + "\362\377\362\362\362\377\365\365\365\377\363\363\363\377\363\363\363\377" + "\363\363\363\377\357\357\357\377\357\357\357\377\360\360\360\377\360\360" + "\360\377\354\354\354\377\354\354\354\377\346\346\346\377\346\346\346\377" + "\346\346\346\377\346\346\346\377\354\354\354\377\354\354\354\377\360\360" + "\360\377\360\360\360\377\357\357\357\377\355\355\355\377\362\362\362\377" + "\362\362\362\377\362\362\362\377\362\362\362\377\366\366\366\377\362\362" + "\362\377\363\363\363\377\363\363\363\377\363\363\363\377\370\370\370\377" + "\370\370\370\377\370\370\370\377\370\370\370\377\371\371\371\377\365\365" + "\365\377\365\365\365\377\360\360\360\377\363\363\363\377\357\357\357\377" + "\357\357\357\377\357\357\357\377\357\357\357\377\360\360\360\377\360\360" + "\360\377\365\365\365\377\366\366\366\377\376\376\376\377\376\376\376\377" + "\370\370\370\377\370\370\370\377\365\365\365\377\360\360\360\377\355\355" + "\355\377\343\343\343\377\337\337\337\377\337\337\337\377\332\332\332\377" + "\332\332\332\377\337\337\337\377\337\337\337\377\344\344\344\377\355\355" + "\355\377\362\362\362\377\362\362\362\377\365\365\365\377\363\363\363\377" + "\363\363\363\377\363\363\363\377\357\357\357\377\357\357\357\377\360\360" + "\360\377\360\360\360\377\354\354\354\377\354\354\354\377\346\346\346\377" + "\346\346\346\377\346\346\346\377\346\346\346\377\354\354\354\377\354\354" + "\354\377\360\360\360\377\360\360\360\377\357\357\357\377\357\357\357\377" + "\362\362\362\377\362\362\362\377\362\362\362\377\362\362\362\377\366\366" + "\366\377\357\357\357\377\363\363\363\377\363\363\363\377\363\363\363\377" + "\370\370\370\377\370\370\370\377\370\370\370\377\370\370\370\377\370\370" + "\370\377\363\363\363\377\363\363\363\377\360\360\360\377\360\360\360\377" + "\357\357\357\377\354\354\354\377\354\354\354\377\357\357\357\377\360\360" + "\360\377\360\360\360\377\365\365\365\377\365\365\365\377\376\376\376\377" + "\370\370\370\377\370\370\370\377\370\370\370\377\365\365\365\377\360\360" + "\360\377\355\355\355\377\343\343\343\377\337\337\337\377\335\335\335\377" + "\332\332\332\377\332\332\332\377\335\335\335\377\337\337\337\377\344\344" + "\344\377\355\355\355\377\362\362\362\377\362\362\362\377\363\363\363\377" + "\363\363\363\377\363\363\363\377\360\360\360\377\360\360\360\377\360\360" + "\360\377\354\354\354\377\357\357\357\377\354\354\354\377\354\354\354\377" + "\346\346\346\377\346\346\346\377\346\346\346\377\346\346\346\377\354\354" + "\354\377\354\354\354\377\357\357\357\377\357\357\357\377\357\357\357\377" + "\357\357\357\377\355\355\355\377\355\355\355\377\362\362\362\377\362\362" + "\362\377\366\366\366\377\355\355\355\377\360\360\360\377\362\362\362\377" + "\362\362\362\377\362\362\362\377\366\366\366\377\370\370\370\377\370\370" + "\370\377\370\370\370\377\363\363\363\377\363\363\363\377\360\360\360\377" + "\357\357\357\377\354\354\354\377\354\354\354\377\354\354\354\377\354\354" + "\354\377\357\357\357\377\360\360\360\377\365\365\365\377\365\365\365\377" + "\371\371\371\377\370\370\370\377\370\370\370\377\366\366\366\377\362\362" + "\362\377\360\360\360\377\355\355\355\377\343\343\343\377\337\337\337\377" + "\335\335\335\377\332\332\332\377\332\332\332\377\335\335\335\377\335\335" + "\335\377\342\342\342\377\352\352\352\377\357\357\357\377\362\362\362\377" + "\363\363\363\377\360\360\360\377\360\360\360\377\360\360\360\377\360\360" + "\360\377\360\360\360\377\354\354\354\377\357\357\357\377\354\354\354\377" + "\354\354\354\377\346\346\346\377\346\346\346\377\346\346\346\377\346\346" + "\346\377\354\354\354\377\354\354\354\377\357\357\357\377\357\357\357\377" + "\357\357\357\377\357\357\357\377\355\355\355\377\355\355\355\377\362\362" + "\362\377\362\362\362\377\363\363\363\377\352\352\352\377\355\355\355\377" + "\355\355\355\377\362\362\362\377\362\362\362\377\362\362\362\377\362\362" + "\362\377\363\363\363\377\363\363\363\377\363\363\363\377\363\363\363\377" + "\357\357\357\377\357\357\357\377\351\351\351\377\351\351\351\377\346\346" + "\346\377\351\351\351\377\357\357\357\377\360\360\360\377\365\365\365\377" + "\365\365\365\377\365\365\365\377\370\370\370\377\363\363\363\377\363\363" + "\363\377\362\362\362\377\360\360\360\377\355\355\355\377\343\343\343\377" + "\337\337\337\377\335\335\335\377\327\327\327\377\327\327\327\377\335\335" + "\335\377\335\335\335\377\342\342\342\377\352\352\352\377\357\357\357\377" + "\357\357\357\377\363\363\363\377\360\360\360\377\360\360\360\377\360\360" + "\360\377\357\357\357\377\357\357\357\377\357\357\357\377\357\357\357\377" + "\351\351\351\377\351\351\351\377\346\346\346\377\340\340\340\377\340\340" + "\340\377\346\346\346\377\351\351\351\377\351\351\351\377\357\357\357\377" + "\354\354\354\377\352\352\352\377\352\352\352\377\355\355\355\377\355\355" + "\355\377\362\362\362\377\362\362\362\377\360\360\360\377\355\355\355\377" + "\352\352\352\377\355\355\355\377\360\360\360\377\362\362\362\377\362\362" + "\362\377\362\362\362\377\363\363\363\377\363\363\363\377\363\363\363\377" + "\362\362\362\377\354\354\354\377\354\354\354\377\351\351\351\377\351\351" + "\351\377\346\346\346\377\346\346\346\377\354\354\354\377\357\357\357\377" + "\363\363\363\377\365\365\365\377\365\365\365\377\363\363\363\377\362\362" + "\362\377\362\362\362\377\355\355\355\377\357\357\357\377\354\354\354\377" + "\343\343\343\377\335\335\335\377\335\335\335\377\327\327\327\377\327\327" + "\327\377\335\335\335\377\335\335\335\377\342\342\342\377\352\352\352\377" + "\357\357\357\377\357\357\357\377\363\363\363\377\360\360\360\377\360\360" + "\360\377\360\360\360\377\357\357\357\377\357\357\357\377\357\357\357\377" + "\357\357\357\377\351\351\351\377\346\346\346\377\340\340\340\377\340\340" + "\340\377\340\340\340\377\340\340\340\377\346\346\346\377\351\351\351\377" + "\357\357\357\377\357\357\357\377\352\352\352\377\352\352\352\377\354\354" + "\354\377\357\357\357\377\357\357\357\377\360\360\360\377\360\360\360\377" + "\352\352\352\377\355\355\355\377\355\355\355\377\355\355\355\377\355\355" + "\355\377\357\357\357\377\355\355\355\377\357\357\357\377\362\362\362\377" + "\357\357\357\377\362\362\362\377\354\354\354\377\354\354\354\377\346\346" + "\346\377\346\346\346\377\344\344\344\377\344\344\344\377\354\354\354\377" + "\357\357\357\377\363\363\363\377\360\360\360\377\360\360\360\377\363\363" + "\363\377\362\362\362\377\362\362\362\377\355\355\355\377\357\357\357\377" + "\354\354\354\377\340\340\340\377\335\335\335\377\335\335\335\377\327\327" + "\327\377\327\327\327\377\335\335\335\377\335\335\335\377\342\342\342\377" + "\352\352\352\377\357\357\357\377\357\357\357\377\363\363\363\377\357\357" + "\357\377\357\357\357\377\357\357\357\377\360\360\360\377\360\360\360\377" + "\357\357\357\377\357\357\357\377\351\351\351\377\346\346\346\377\340\340" + "\340\377\340\340\340\377\340\340\340\377\340\340\340\377\346\346\346\377" + "\351\351\351\377\357\357\357\377\354\354\354\377\355\355\355\377\355\355" + "\355\377\354\354\354\377\354\354\354\377\355\355\355\377\352\352\352\377" + "\352\352\352\377", +}; + diff --git a/3d-viewer/textures/text_silk.c b/3d-viewer/textures/text_silk.c new file mode 100644 index 0000000000..c73e59cd84 --- /dev/null +++ b/3d-viewer/textures/text_silk.c @@ -0,0 +1,922 @@ +/* GIMP RGBA C-Source image dump (text_silk.c) */ + +static const struct { + unsigned int width; + unsigned int height; + unsigned int bytes_per_pixel; /* 2:RGB16, 3:RGB, 4:RGBA */ + unsigned char pixel_data[64 * 64 * 4 + 1]; +} text_silk = { + 64, 64, 4, + "\377\377\377\366\377\377\377\372\377\377\377\375\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\376\377\377\377\377" + "\377\377\377\377\377\377\377\376\377\377\377\377\377\377\377\374\377\377" + "\377\366\377\377\377\365\377\377\377\364\377\377\377\366\377\377\377\370" + "\377\377\377\365\377\377\377\362\377\377\377\364\377\377\377\366\377\377" + "\377\370\377\377\377\372\377\377\377\363\377\377\377\354\377\377\377\350" + "\377\377\377\351\377\377\377\352\377\377\377\354\377\377\377\356\377\377" + "\377\361\377\377\377\366\377\377\377\372\377\377\377\375\377\377\377\375" + "\377\377\377\373\377\377\377\365\377\377\377\366\377\377\377\371\377\377" + "\377\372\377\377\377\374\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\375\377\377\377\366\377\377" + "\377\357\377\377\377\350\377\377\377\346\377\377\377\342\377\377\377\335" + "\377\377\377\346\377\377\377\351\377\377\377\351\377\377\377\357\377\377" + "\377\357\377\377\377\363\377\377\377\363\377\377\377\361\377\377\377\361" + "\377\377\377\362\377\377\377\357\377\377\377\365\377\377\377\372\377\377" + "\377\376\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\375\377\377\377\377\377\377" + "\377\375\377\377\377\370\377\377\377\365\377\377\377\364\377\377\377\367" + "\377\377\377\370\377\377\377\363\377\377\377\357\377\377\377\356\377\377" + "\377\360\377\377\377\364\377\377\377\370\377\377\377\365\377\377\377\355" + "\377\377\377\350\377\377\377\347\377\377\377\344\377\377\377\344\377\377" + "\377\352\377\377\377\357\377\377\377\362\377\377\377\370\377\377\377\374" + "\377\377\377\372\377\377\377\366\377\377\377\362\377\377\377\363\377\377" + "\377\363\377\377\377\363\377\377\377\365\377\377\377\371\377\377\377\375" + "\377\377\377\375\377\377\377\376\377\377\377\377\377\377\377\377\377\377" + "\377\373\377\377\377\363\377\377\377\352\377\377\377\347\377\377\377\346" + "\377\377\377\342\377\377\377\345\377\377\377\344\377\377\377\340\377\377" + "\377\344\377\377\377\351\377\377\377\355\377\377\377\356\377\377\377\357" + "\377\377\377\354\377\377\377\354\377\377\377\356\377\377\377\364\377\377" + "\377\371\377\377\377\375\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\376\377\377\377\374\377\377\377\373\377\377\377\372" + "\377\377\377\374\377\377\377\372\377\377\377\362\377\377\377\360\377\377" + "\377\356\377\377\377\357\377\377\377\366\377\377\377\367\377\377\377\361" + "\377\377\377\351\377\377\377\346\377\377\377\350\377\377\377\344\377\377" + "\377\340\377\377\377\347\377\377\377\360\377\377\377\361\377\377\377\365" + "\377\377\377\370\377\377\377\365\377\377\377\362\377\377\377\356\377\377" + "\377\355\377\377\377\355\377\377\377\354\377\377\377\356\377\377\377\360" + "\377\377\377\364\377\377\377\370\377\377\377\372\377\377\377\377\377\377" + "\377\377\377\377\377\372\377\377\377\364\377\377\377\352\377\377\377\342" + "\377\377\377\342\377\377\377\340\377\377\377\342\377\377\377\342\377\377" + "\377\333\377\377\377\327\377\377\377\336\377\377\377\345\377\377\377\352" + "\377\377\377\357\377\377\377\355\377\377\377\354\377\377\377\357\377\377" + "\377\364\377\377\377\371\377\377\377\374\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\376\377\377\377\372\377\377\377\366\377\377" + "\377\363\377\377\377\362\377\377\377\365\377\377\377\370\377\377\377\365" + "\377\377\377\357\377\377\377\352\377\377\377\351\377\377\377\355\377\377" + "\377\351\377\377\377\343\377\377\377\347\377\377\377\360\377\377\377\364" + "\377\377\377\366\377\377\377\365\377\377\377\363\377\377\377\360\377\377" + "\377\351\377\377\377\346\377\377\377\352\377\377\377\353\377\377\377\347" + "\377\377\377\352\377\377\377\361\377\377\377\365\377\377\377\370\377\377" + "\377\376\377\377\377\376\377\377\377\366\377\377\377\361\377\377\377\353" + "\377\377\377\336\377\377\377\332\377\377\377\334\377\377\377\335\377\377" + "\377\336\377\377\377\327\377\377\377\316\377\377\377\322\377\377\377\333" + "\377\377\377\344\377\377\377\357\377\377\377\357\377\377\377\357\377\377" + "\377\361\377\377\377\364\377\377\377\372\377\377\377\375\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\376\377\377\377\366\377\377" + "\377\365\377\377\377\365\377\377\377\370\377\377\377\374\377\377\377\374" + "\377\377\377\366\377\377\377\360\377\377\377\353\377\377\377\353\377\377" + "\377\361\377\377\377\356\377\377\377\353\377\377\377\357\377\377\377\365" + "\377\377\377\371\377\377\377\371\377\377\377\367\377\377\377\361\377\377" + "\377\354\377\377\377\351\377\377\377\351\377\377\377\352\377\377\377\350" + "\377\377\377\343\377\377\377\354\377\377\377\366\377\377\377\373\377\377" + "\377\374\377\377\377\375\377\377\377\374\377\377\377\363\377\377\377\351" + "\377\377\377\342\377\377\377\332\377\377\377\333\377\377\377\340\377\377" + "\377\341\377\377\377\340\377\377\377\326\377\377\377\312\377\377\377\317" + "\377\377\377\327\377\377\377\343\377\377\377\357\377\377\377\360\377\377" + "\377\361\377\377\377\357\377\377\377\364\377\377\377\372\377\377\377\376" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\372\377\377\377\371\377\377\377\372\377\377\377\374\377\377\377\377" + "\377\377\377\377\377\377\377\371\377\377\377\357\377\377\377\355\377\377" + "\377\360\377\377\377\365\377\377\377\365\377\377\377\362\377\377\377\365" + "\377\377\377\372\377\377\377\374\377\377\377\372\377\377\377\366\377\377" + "\377\361\377\377\377\360\377\377\377\356\377\377\377\356\377\377\377\353" + "\377\377\377\347\377\377\377\347\377\377\377\361\377\377\377\372\377\377" + "\377\377\377\377\377\377\377\377\377\373\377\377\377\365\377\377\377\355" + "\377\377\377\345\377\377\377\335\377\377\377\333\377\377\377\337\377\377" + "\377\344\377\377\377\347\377\377\377\343\377\377\377\330\377\377\377\317" + "\377\377\377\317\377\377\377\322\377\377\377\337\377\377\377\352\377\377" + "\377\354\377\377\377\356\377\377\377\364\377\377\377\367\377\377\377\372" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\376\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\376\377\377\377\376\377\377\377\377\377\377\377\377" + "\377\377\377\375\377\377\377\373\377\377\377\370\377\377\377\363\377\377" + "\377\361\377\377\377\363\377\377\377\366\377\377\377\367\377\377\377\365" + "\377\377\377\371\377\377\377\373\377\377\377\371\377\377\377\370\377\377" + "\377\364\377\377\377\360\377\377\377\361\377\377\377\357\377\377\377\356" + "\377\377\377\357\377\377\377\357\377\377\377\361\377\377\377\366\377\377" + "\377\372\377\377\377\375\377\377\377\377\377\377\377\370\377\377\377\361" + "\377\377\377\355\377\377\377\351\377\377\377\342\377\377\377\337\377\377" + "\377\340\377\377\377\345\377\377\377\350\377\377\377\343\377\377\377\334" + "\377\377\377\325\377\377\377\320\377\377\377\316\377\377\377\335\377\377" + "\377\351\377\377\377\356\377\377\377\361\377\377\377\370\377\377\377\372" + "\377\377\377\375\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\376\377\377\377\375\377\377\377\377" + "\377\377\377\377\377\377\377\372\377\377\377\365\377\377\377\363\377\377" + "\377\365\377\377\377\363\377\377\377\363\377\377\377\366\377\377\377\366" + "\377\377\377\370\377\377\377\374\377\377\377\372\377\377\377\364\377\377" + "\377\361\377\377\377\357\377\377\377\354\377\377\377\356\377\377\377\353" + "\377\377\377\355\377\377\377\362\377\377\377\367\377\377\377\373\377\377" + "\377\375\377\377\377\374\377\377\377\374\377\377\377\375\377\377\377\371" + "\377\377\377\363\377\377\377\356\377\377\377\350\377\377\377\343\377\377" + "\377\342\377\377\377\344\377\377\377\350\377\377\377\350\377\377\377\346" + "\377\377\377\340\377\377\377\333\377\377\377\330\377\377\377\331\377\377" + "\377\342\377\377\377\354\377\377\377\362\377\377\377\367\377\377\377\366" + "\377\377\377\366\377\377\377\373\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\376\377\377\377\372\377\377\377\374" + "\377\377\377\375\377\377\377\373\377\377\377\370\377\377\377\364\377\377" + "\377\361\377\377\377\365\377\377\377\365\377\377\377\365\377\377\377\367" + "\377\377\377\365\377\377\377\370\377\377\377\373\377\377\377\372\377\377" + "\377\366\377\377\377\357\377\377\377\351\377\377\377\351\377\377\377\354" + "\377\377\377\352\377\377\377\360\377\377\377\363\377\377\377\370\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\370\377\377\377\363\377\377\377\356\377\377\377\350\377\377" + "\377\344\377\377\377\342\377\377\377\343\377\377\377\352\377\377\377\354" + "\377\377\377\352\377\377\377\343\377\377\377\340\377\377\377\335\377\377" + "\377\340\377\377\377\346\377\377\377\356\377\377\377\362\377\377\377\367" + "\377\377\377\363\377\377\377\361\377\377\377\367\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\374\377\377\377\370\377\377\377\366" + "\377\377\377\372\377\377\377\372\377\377\377\367\377\377\377\367\377\377" + "\377\366\377\377\377\365\377\377\377\366\377\377\377\362\377\377\377\361" + "\377\377\377\364\377\377\377\364\377\377\377\370\377\377\377\372\377\377" + "\377\374\377\377\377\373\377\377\377\363\377\377\377\355\377\377\377\353" + "\377\377\377\352\377\377\377\354\377\377\377\364\377\377\377\367\377\377" + "\377\374\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\372\377\377\377\362\377\377\377\356\377\377" + "\377\350\377\377\377\346\377\377\377\342\377\377\377\342\377\377\377\353" + "\377\377\377\361\377\377\377\356\377\377\377\353\377\377\377\346\377\377" + "\377\337\377\377\377\341\377\377\377\351\377\377\377\361\377\377\377\362" + "\377\377\377\364\377\377\377\361\377\377\377\360\377\377\377\370\377\377" + "\377\376\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\375\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\375\377\377\377\372" + "\377\377\377\365\377\377\377\364\377\377\377\365\377\377\377\364\377\377" + "\377\364\377\377\377\364\377\377\377\364\377\377\377\361\377\377\377\352" + "\377\377\377\354\377\377\377\357\377\377\377\362\377\377\377\372\377\377" + "\377\376\377\377\377\375\377\377\377\373\377\377\377\365\377\377\377\361" + "\377\377\377\363\377\377\377\362\377\377\377\363\377\377\377\370\377\377" + "\377\373\377\377\377\376\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\375\377\377\377\363\377\377" + "\377\353\377\377\377\346\377\377\377\346\377\377\377\347\377\377\377\352" + "\377\377\377\356\377\377\377\361\377\377\377\356\377\377\377\357\377\377" + "\377\354\377\377\377\350\377\377\377\350\377\377\377\360\377\377\377\366" + "\377\377\377\363\377\377\377\362\377\377\377\361\377\377\377\364\377\377" + "\377\374\377\377\377\376\377\377\377\376\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\375\377\377\377\374\377\377" + "\377\377\377\377\377\375\377\377\377\374\377\377\377\375\377\377\377\376" + "\377\377\377\374\377\377\377\366\377\377\377\361\377\377\377\363\377\377" + "\377\366\377\377\377\365\377\377\377\363\377\377\377\361\377\377\377\355" + "\377\377\377\344\377\377\377\351\377\377\377\355\377\377\377\360\377\377" + "\377\372\377\377\377\377\377\377\377\377\377\377\377\372\377\377\377\366" + "\377\377\377\367\377\377\377\370\377\377\377\371\377\377\377\371\377\377" + "\377\373\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\376\377\377" + "\377\366\377\377\377\357\377\377\377\351\377\377\377\350\377\377\377\354" + "\377\377\377\360\377\377\377\361\377\377\377\363\377\377\377\357\377\377" + "\377\361\377\377\377\357\377\377\377\355\377\377\377\360\377\377\377\363" + "\377\377\377\365\377\377\377\365\377\377\377\364\377\377\377\370\377\377" + "\377\370\377\377\377\375\377\377\377\375\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\375\377\377" + "\377\372\377\377\377\376\377\377\377\376\377\377\377\376\377\377\377\377" + "\377\377\377\376\377\377\377\372\377\377\377\365\377\377\377\362\377\377" + "\377\361\377\377\377\363\377\377\377\365\377\377\377\367\377\377\377\363" + "\377\377\377\353\377\377\377\341\377\377\377\345\377\377\377\356\377\377" + "\377\365\377\377\377\372\377\377\377\377\377\377\377\377\377\377\377\374" + "\377\377\377\367\377\377\377\371\377\377\377\372\377\377\377\375\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\375\377\377\377\370\377\377\377\363\377\377\377\357\377\377\377\356" + "\377\377\377\357\377\377\377\357\377\377\377\360\377\377\377\362\377\377" + "\377\357\377\377\377\361\377\377\377\356\377\377\377\355\377\377\377\365" + "\377\377\377\367\377\377\377\366\377\377\377\372\377\377\377\373\377\377" + "\377\376\377\377\377\374\377\377\377\376\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\374\377\377\377\371\377\377\377\375\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\374\377\377\377\370\377\377\377\364\377\377" + "\377\361\377\377\377\356\377\377\377\355\377\377\377\362\377\377\377\365" + "\377\377\377\357\377\377\377\353\377\377\377\344\377\377\377\344\377\377" + "\377\353\377\377\377\365\377\377\377\374\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\370\377\377\377\367\377\377\377\371\377\377" + "\377\374\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\372\377\377" + "\377\372\377\377\377\371\377\377\377\370\377\377\377\364\377\377\377\362" + "\377\377\377\361\377\377\377\357\377\377\377\356\377\377\377\354\377\377" + "\377\357\377\377\377\357\377\377\377\361\377\377\377\361\377\377\377\361" + "\377\377\377\366\377\377\377\373\377\377\377\376\377\377\377\377\377\377" + "\377\377\377\377\377\375\377\377\377\374\377\377\377\376\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\376\377\377\377\376\377\377\377\374\377\377\377\376\377\377\377\377" + "\377\377\377\377\377\377\377\372\377\377\377\370\377\377\377\367\377\377" + "\377\365\377\377\377\362\377\377\377\356\377\377\377\355\377\377\377\356" + "\377\377\377\355\377\377\377\350\377\377\377\352\377\377\377\355\377\377" + "\377\354\377\377\377\355\377\377\377\363\377\377\377\374\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\372\377\377\377\371\377\377" + "\377\372\377\377\377\374\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\375\377\377\377\374\377\377" + "\377\364\377\377\377\361\377\377\377\362\377\377\377\365\377\377\377\366" + "\377\377\377\364\377\377\377\361\377\377\377\356\377\377\377\355\377\377" + "\377\353\377\377\377\361\377\377\377\360\377\377\377\356\377\377\377\362" + "\377\377\377\363\377\377\377\367\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\372\377\377\377\365\377\377\377\372" + "\377\377\377\377\377\377\377\377\377\377\377\376\377\377\377\377\377\377" + "\377\377\377\377\377\376\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\372\377\377\377\365\377\377\377\366\377\377" + "\377\366\377\377\377\364\377\377\377\363\377\377\377\361\377\377\377\360" + "\377\377\377\357\377\377\377\351\377\377\377\350\377\377\377\354\377\377" + "\377\361\377\377\377\364\377\377\377\364\377\377\377\364\377\377\377\371" + "\377\377\377\373\377\377\377\373\377\377\377\373\377\377\377\370\377\377" + "\377\371\377\377\377\374\377\377\377\375\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\373\377\377" + "\377\370\377\377\377\362\377\377\377\356\377\377\377\356\377\377\377\361" + "\377\377\377\365\377\377\377\364\377\377\377\361\377\377\377\360\377\377" + "\377\360\377\377\377\361\377\377\377\365\377\377\377\361\377\377\377\353" + "\377\377\377\357\377\377\377\365\377\377\377\372\377\377\377\376\377\377" + "\377\377\377\377\377\377\377\377\377\376\377\377\377\366\377\377\377\357" + "\377\377\377\365\377\377\377\372\377\377\377\373\377\377\377\373\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\376\377\377\377\374\377\377\377\367\377\377\377\363\377\377" + "\377\366\377\377\377\366\377\377\377\364\377\377\377\367\377\377\377\365" + "\377\377\377\362\377\377\377\363\377\377\377\353\377\377\377\353\377\377" + "\377\355\377\377\377\362\377\377\377\366\377\377\377\365\377\377\377\363" + "\377\377\377\363\377\377\377\365\377\377\377\363\377\377\377\366\377\377" + "\377\363\377\377\377\362\377\377\377\370\377\377\377\372\377\377\377\372" + "\377\377\377\377\377\377\377\377\377\377\377\376\377\377\377\375\377\377" + "\377\374\377\377\377\367\377\377\377\363\377\377\377\357\377\377\377\355" + "\377\377\377\362\377\377\377\366\377\377\377\367\377\377\377\364\377\377" + "\377\362\377\377\377\357\377\377\377\360\377\377\377\361\377\377\377\356" + "\377\377\377\347\377\377\377\350\377\377\377\357\377\377\377\366\377\377" + "\377\370\377\377\377\370\377\377\377\372\377\377\377\373\377\377\377\357" + "\377\377\377\351\377\377\377\356\377\377\377\364\377\377\377\370\377\377" + "\377\373\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\375\377\377\377\374\377\377\377\370\377\377" + "\377\365\377\377\377\364\377\377\377\362\377\377\377\362\377\377\377\365" + "\377\377\377\364\377\377\377\365\377\377\377\365\377\377\377\356\377\377" + "\377\353\377\377\377\356\377\377\377\364\377\377\377\366\377\377\377\365" + "\377\377\377\363\377\377\377\357\377\377\377\355\377\377\377\354\377\377" + "\377\353\377\377\377\352\377\377\377\353\377\377\377\362\377\377\377\370" + "\377\377\377\373\377\377\377\376\377\377\377\376\377\377\377\372\377\377" + "\377\374\377\377\377\375\377\377\377\372\377\377\377\366\377\377\377\362" + "\377\377\377\361\377\377\377\366\377\377\377\372\377\377\377\367\377\377" + "\377\364\377\377\377\357\377\377\377\352\377\377\377\355\377\377\377\352" + "\377\377\377\346\377\377\377\343\377\377\377\344\377\377\377\351\377\377" + "\377\355\377\377\377\355\377\377\377\356\377\377\377\362\377\377\377\364" + "\377\377\377\353\377\377\377\344\377\377\377\346\377\377\377\352\377\377" + "\377\357\377\377\377\371\377\377\377\376\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\374\377\377\377\372\377\377" + "\377\370\377\377\377\365\377\377\377\362\377\377\377\357\377\377\377\355" + "\377\377\377\355\377\377\377\354\377\377\377\362\377\377\377\365\377\377" + "\377\362\377\377\377\356\377\377\377\357\377\377\377\364\377\377\377\363" + "\377\377\377\362\377\377\377\362\377\377\377\356\377\377\377\356\377\377" + "\377\355\377\377\377\351\377\377\377\351\377\377\377\353\377\377\377\357" + "\377\377\377\370\377\377\377\373\377\377\377\374\377\377\377\375\377\377" + "\377\370\377\377\377\370\377\377\377\372\377\377\377\372\377\377\377\371" + "\377\377\377\367\377\377\377\366\377\377\377\370\377\377\377\370\377\377" + "\377\361\377\377\377\356\377\377\377\350\377\377\377\346\377\377\377\353" + "\377\377\377\347\377\377\377\337\377\377\377\342\377\377\377\346\377\377" + "\377\347\377\377\377\350\377\377\377\350\377\377\377\350\377\377\377\355" + "\377\377\377\361\377\377\377\351\377\377\377\340\377\377\377\340\377\377" + "\377\343\377\377\377\353\377\377\377\367\377\377\377\374\377\377\377\377" + "\377\377\377\377\377\377\377\376\377\377\377\372\377\377\377\371\377\377" + "\377\370\377\377\377\372\377\377\377\372\377\377\377\363\377\377\377\356" + "\377\377\377\350\377\377\377\346\377\377\377\344\377\377\377\353\377\377" + "\377\363\377\377\377\363\377\377\377\356\377\377\377\355\377\377\377\361" + "\377\377\377\360\377\377\377\361\377\377\377\361\377\377\377\357\377\377" + "\377\360\377\377\377\361\377\377\377\360\377\377\377\355\377\377\377\353" + "\377\377\377\360\377\377\377\367\377\377\377\371\377\377\377\371\377\377" + "\377\370\377\377\377\365\377\377\377\366\377\377\377\370\377\377\377\372" + "\377\377\377\370\377\377\377\367\377\377\377\371\377\377\377\370\377\377" + "\377\365\377\377\377\355\377\377\377\344\377\377\377\337\377\377\377\341" + "\377\377\377\344\377\377\377\342\377\377\377\340\377\377\377\340\377\377" + "\377\342\377\377\377\342\377\377\377\346\377\377\377\347\377\377\377\346" + "\377\377\377\351\377\377\377\354\377\377\377\342\377\377\377\334\377\377" + "\377\337\377\377\377\344\377\377\377\360\377\377\377\370\377\377\377\371" + "\377\377\377\372\377\377\377\372\377\377\377\365\377\377\377\367\377\377" + "\377\370\377\377\377\371\377\377\377\375\377\377\377\374\377\377\377\365" + "\377\377\377\356\377\377\377\344\377\377\377\334\377\377\377\332\377\377" + "\377\342\377\377\377\354\377\377\377\354\377\377\377\350\377\377\377\350" + "\377\377\377\354\377\377\377\354\377\377\377\357\377\377\377\361\377\377" + "\377\361\377\377\377\363\377\377\377\363\377\377\377\362\377\377\377\360" + "\377\377\377\355\377\377\377\355\377\377\377\360\377\377\377\363\377\377" + "\377\365\377\377\377\363\377\377\377\365\377\377\377\367\377\377\377\367" + "\377\377\377\372\377\377\377\370\377\377\377\365\377\377\377\366\377\377" + "\377\363\377\377\377\357\377\377\377\350\377\377\377\335\377\377\377\326" + "\377\377\377\332\377\377\377\333\377\377\377\332\377\377\377\336\377\377" + "\377\333\377\377\377\340\377\377\377\347\377\377\377\352\377\377\377\347" + "\377\377\377\346\377\377\377\347\377\377\377\346\377\377\377\340\377\377" + "\377\336\377\377\377\337\377\377\377\350\377\377\377\363\377\377\377\371" + "\377\377\377\367\377\377\377\365\377\377\377\364\377\377\377\363\377\377" + "\377\366\377\377\377\366\377\377\377\367\377\377\377\373\377\377\377\373" + "\377\377\377\365\377\377\377\362\377\377\377\346\377\377\377\325\377\377" + "\377\322\377\377\377\332\377\377\377\346\377\377\377\347\377\377\377\345" + "\377\377\377\346\377\377\377\346\377\377\377\347\377\377\377\352\377\377" + "\377\353\377\377\377\360\377\377\377\365\377\377\377\365\377\377\377\365" + "\377\377\377\362\377\377\377\360\377\377\377\357\377\377\377\353\377\377" + "\377\357\377\377\377\364\377\377\377\366\377\377\377\371\377\377\377\371" + "\377\377\377\370\377\377\377\372\377\377\377\371\377\377\377\362\377\377" + "\377\362\377\377\377\357\377\377\377\351\377\377\377\344\377\377\377\330" + "\377\377\377\316\377\377\377\322\377\377\377\327\377\377\377\327\377\377" + "\377\326\377\377\377\325\377\377\377\335\377\377\377\350\377\377\377\354" + "\377\377\377\352\377\377\377\350\377\377\377\344\377\377\377\343\377\377" + "\377\340\377\377\377\344\377\377\377\346\377\377\377\356\377\377\377\366" + "\377\377\377\371\377\377\377\365\377\377\377\362\377\377\377\362\377\377" + "\377\363\377\377\377\364\377\377\377\364\377\377\377\365\377\377\377\370" + "\377\377\377\371\377\377\377\363\377\377\377\362\377\377\377\353\377\377" + "\377\336\377\377\377\325\377\377\377\330\377\377\377\343\377\377\377\344" + "\377\377\377\343\377\377\377\343\377\377\377\341\377\377\377\347\377\377" + "\377\354\377\377\377\356\377\377\377\363\377\377\377\366\377\377\377\367" + "\377\377\377\371\377\377\377\365\377\377\377\361\377\377\377\363\377\377" + "\377\355\377\377\377\356\377\377\377\364\377\377\377\372\377\377\377\374" + "\377\377\377\374\377\377\377\374\377\377\377\373\377\377\377\370\377\377" + "\377\363\377\377\377\364\377\377\377\360\377\377\377\350\377\377\377\340" + "\377\377\377\317\377\377\377\306\377\377\377\322\377\377\377\327\377\377" + "\377\325\377\377\377\324\377\377\377\326\377\377\377\334\377\377\377\344" + "\377\377\377\351\377\377\377\353\377\377\377\354\377\377\377\352\377\377" + "\377\344\377\377\377\347\377\377\377\351\377\377\377\354\377\377\377\360" + "\377\377\377\370\377\377\377\372\377\377\377\366\377\377\377\363\377\377" + "\377\361\377\377\377\364\377\377\377\370\377\377\377\370\377\377\377\371" + "\377\377\377\370\377\377\377\364\377\377\377\361\377\377\377\362\377\377" + "\377\355\377\377\377\344\377\377\377\333\377\377\377\327\377\377\377\335" + "\377\377\377\341\377\377\377\342\377\377\377\342\377\377\377\343\377\377" + "\377\352\377\377\377\360\377\377\377\364\377\377\377\366\377\377\377\370" + "\377\377\377\372\377\377\377\372\377\377\377\365\377\377\377\365\377\377" + "\377\365\377\377\377\356\377\377\377\355\377\377\377\363\377\377\377\372" + "\377\377\377\374\377\377\377\375\377\377\377\377\377\377\377\375\377\377" + "\377\373\377\377\377\367\377\377\377\365\377\377\377\361\377\377\377\346" + "\377\377\377\327\377\377\377\310\377\377\377\302\377\377\377\316\377\377" + "\377\326\377\377\377\325\377\377\377\332\377\377\377\341\377\377\377\342" + "\377\377\377\344\377\377\377\351\377\377\377\354\377\377\377\361\377\377" + "\377\361\377\377\377\353\377\377\377\357\377\377\377\356\377\377\377\356" + "\377\377\377\356\377\377\377\365\377\377\377\367\377\377\377\364\377\377" + "\377\364\377\377\377\364\377\377\377\366\377\377\377\373\377\377\377\372" + "\377\377\377\372\377\377\377\372\377\377\377\364\377\377\377\357\377\377" + "\377\356\377\377\377\347\377\377\377\335\377\377\377\333\377\377\377\325" + "\377\377\377\333\377\377\377\344\377\377\377\351\377\377\377\350\377\377" + "\377\351\377\377\377\355\377\377\377\362\377\377\377\365\377\377\377\367" + "\377\377\377\372\377\377\377\372\377\377\377\367\377\377\377\361\377\377" + "\377\365\377\377\377\366\377\377\377\362\377\377\377\356\377\377\377\363" + "\377\377\377\372\377\377\377\371\377\377\377\372\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\376\377\377\377\371\377\377\377\364" + "\377\377\377\347\377\377\377\322\377\377\377\307\377\377\377\303\377\377" + "\377\312\377\377\377\331\377\377\377\333\377\377\377\340\377\377\377\345" + "\377\377\377\347\377\377\377\350\377\377\377\353\377\377\377\357\377\377" + "\377\363\377\377\377\365\377\377\377\361\377\377\377\366\377\377\377\364" + "\377\377\377\363\377\377\377\364\377\377\377\367\377\377\377\370\377\377" + "\377\365\377\377\377\365\377\377\377\365\377\377\377\367\377\377\377\374" + "\377\377\377\373\377\377\377\374\377\377\377\374\377\377\377\366\377\377" + "\377\355\377\377\377\350\377\377\377\337\377\377\377\327\377\377\377\324" + "\377\377\377\317\377\377\377\333\377\377\377\347\377\377\377\351\377\377" + "\377\351\377\377\377\356\377\377\377\364\377\377\377\366\377\377\377\370" + "\377\377\377\372\377\377\377\372\377\377\377\370\377\377\377\366\377\377" + "\377\364\377\377\377\365\377\377\377\367\377\377\377\366\377\377\377\361" + "\377\377\377\361\377\377\377\366\377\377\377\367\377\377\377\370\377\377" + "\377\373\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\373" + "\377\377\377\362\377\377\377\350\377\377\377\333\377\377\377\317\377\377" + "\377\307\377\377\377\305\377\377\377\322\377\377\377\335\377\377\377\343" + "\377\377\377\351\377\377\377\354\377\377\377\354\377\377\377\356\377\377" + "\377\363\377\377\377\367\377\377\377\372\377\377\377\372\377\377\377\374" + "\377\377\377\371\377\377\377\370\377\377\377\371\377\377\377\371\377\377" + "\377\372\377\377\377\371\377\377\377\367\377\377\377\365\377\377\377\366" + "\377\377\377\372\377\377\377\373\377\377\377\376\377\377\377\376\377\377" + "\377\364\377\377\377\355\377\377\377\347\377\377\377\337\377\377\377\335" + "\377\377\377\331\377\377\377\324\377\377\377\334\377\377\377\343\377\377" + "\377\346\377\377\377\354\377\377\377\360\377\377\377\364\377\377\377\366" + "\377\377\377\370\377\377\377\373\377\377\377\370\377\377\377\364\377\377" + "\377\365\377\377\377\367\377\377\377\365\377\377\377\366\377\377\377\365" + "\377\377\377\362\377\377\377\361\377\377\377\360\377\377\377\361\377\377" + "\377\366\377\377\377\373\377\377\377\377\377\377\377\377\377\377\377\373" + "\377\377\377\364\377\377\377\353\377\377\377\350\377\377\377\342\377\377" + "\377\325\377\377\377\320\377\377\377\314\377\377\377\315\377\377\377\332" + "\377\377\377\342\377\377\377\352\377\377\377\362\377\377\377\363\377\377" + "\377\362\377\377\377\365\377\377\377\370\377\377\377\372\377\377\377\376" + "\377\377\377\372\377\377\377\372\377\377\377\367\377\377\377\371\377\377" + "\377\374\377\377\377\373\377\377\377\373\377\377\377\372\377\377\377\366" + "\377\377\377\367\377\377\377\370\377\377\377\367\377\377\377\373\377\377" + "\377\373\377\377\377\365\377\377\377\354\377\377\377\347\377\377\377\345" + "\377\377\377\343\377\377\377\336\377\377\377\336\377\377\377\342\377\377" + "\377\344\377\377\377\353\377\377\377\361\377\377\377\361\377\377\377\361" + "\377\377\377\364\377\377\377\366\377\377\377\366\377\377\377\364\377\377" + "\377\364\377\377\377\366\377\377\377\370\377\377\377\367\377\377\377\366" + "\377\377\377\365\377\377\377\365\377\377\377\365\377\377\377\362\377\377" + "\377\356\377\377\377\363\377\377\377\374\377\377\377\374\377\377\377\372" + "\377\377\377\364\377\377\377\353\377\377\377\347\377\377\377\354\377\377" + "\377\351\377\377\377\341\377\377\377\337\377\377\377\332\377\377\377\324" + "\377\377\377\327\377\377\377\340\377\377\377\351\377\377\377\363\377\377" + "\377\371\377\377\377\370\377\377\377\367\377\377\377\366\377\377\377\366" + "\377\377\377\371\377\377\377\372\377\377\377\374\377\377\377\367\377\377" + "\377\370\377\377\377\373\377\377\377\374\377\377\377\377\377\377\377\377" + "\377\377\377\374\377\377\377\373\377\377\377\367\377\377\377\363\377\377" + "\377\366\377\377\377\365\377\377\377\360\377\377\377\347\377\377\377\344" + "\377\377\377\350\377\377\377\344\377\377\377\336\377\377\377\340\377\377" + "\377\347\377\377\377\350\377\377\377\357\377\377\377\362\377\377\377\363" + "\377\377\377\365\377\377\377\362\377\377\377\361\377\377\377\361\377\377" + "\377\362\377\377\377\365\377\377\377\367\377\377\377\367\377\377\377\370" + "\377\377\377\367\377\377\377\370\377\377\377\367\377\377\377\365\377\377" + "\377\367\377\377\377\365\377\377\377\363\377\377\377\370\377\377\377\367" + "\377\377\377\365\377\377\377\361\377\377\377\351\377\377\377\347\377\377" + "\377\353\377\377\377\355\377\377\377\354\377\377\377\355\377\377\377\347" + "\377\377\377\343\377\377\377\344\377\377\377\350\377\377\377\355\377\377" + "\377\364\377\377\377\372\377\377\377\372\377\377\377\371\377\377\377\370" + "\377\377\377\370\377\377\377\367\377\377\377\372\377\377\377\370\377\377" + "\377\364\377\377\377\362\377\377\377\370\377\377\377\374\377\377\377\377" + "\377\377\377\377\377\377\377\376\377\377\377\370\377\377\377\363\377\377" + "\377\363\377\377\377\366\377\377\377\363\377\377\377\353\377\377\377\345" + "\377\377\377\342\377\377\377\346\377\377\377\350\377\377\377\345\377\377" + "\377\344\377\377\377\350\377\377\377\352\377\377\377\361\377\377\377\364" + "\377\377\377\364\377\377\377\365\377\377\377\357\377\377\377\351\377\377" + "\377\355\377\377\377\364\377\377\377\367\377\377\377\366\377\377\377\367" + "\377\377\377\371\377\377\377\370\377\377\377\371\377\377\377\370\377\377" + "\377\366\377\377\377\371\377\377\377\372\377\377\377\365\377\377\377\365" + "\377\377\377\364\377\377\377\357\377\377\377\356\377\377\377\353\377\377" + "\377\347\377\377\377\352\377\377\377\360\377\377\377\364\377\377\377\365" + "\377\377\377\363\377\377\377\363\377\377\377\360\377\377\377\357\377\377" + "\377\362\377\377\377\371\377\377\377\374\377\377\377\374\377\377\377\374" + "\377\377\377\372\377\377\377\371\377\377\377\371\377\377\377\370\377\377" + "\377\361\377\377\377\356\377\377\377\354\377\377\377\365\377\377\377\372" + "\377\377\377\374\377\377\377\377\377\377\377\371\377\377\377\361\377\377" + "\377\361\377\377\377\361\377\377\377\362\377\377\377\364\377\377\377\363" + "\377\377\377\355\377\377\377\350\377\377\377\346\377\377\377\350\377\377" + "\377\355\377\377\377\355\377\377\377\355\377\377\377\356\377\377\377\361" + "\377\377\377\360\377\377\377\355\377\377\377\353\377\377\377\351\377\377" + "\377\345\377\377\377\347\377\377\377\357\377\377\377\365\377\377\377\367" + "\377\377\377\366\377\377\377\371\377\377\377\371\377\377\377\374\377\377" + "\377\376\377\377\377\373\377\377\377\373\377\377\377\373\377\377\377\371" + "\377\377\377\372\377\377\377\370\377\377\377\361\377\377\377\356\377\377" + "\377\353\377\377\377\353\377\377\377\361\377\377\377\365\377\377\377\370" + "\377\377\377\371\377\377\377\372\377\377\377\374\377\377\377\367\377\377" + "\377\363\377\377\377\365\377\377\377\373\377\377\377\373\377\377\377\375" + "\377\377\377\375\377\377\377\374\377\377\377\374\377\377\377\374\377\377" + "\377\370\377\377\377\355\377\377\377\347\377\377\377\352\377\377\377\363" + "\377\377\377\365\377\377\377\371\377\377\377\372\377\377\377\363\377\377" + "\377\355\377\377\377\357\377\377\377\361\377\377\377\362\377\377\377\370" + "\377\377\377\375\377\377\377\366\377\377\377\356\377\377\377\351\377\377" + "\377\347\377\377\377\356\377\377\377\361\377\377\377\356\377\377\377\355" + "\377\377\377\354\377\377\377\352\377\377\377\351\377\377\377\343\377\377" + "\377\342\377\377\377\342\377\377\377\345\377\377\377\354\377\377\377\364" + "\377\377\377\367\377\377\377\366\377\377\377\370\377\377\377\372\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\375" + "\377\377\377\375\377\377\377\377\377\377\377\374\377\377\377\366\377\377" + "\377\360\377\377\377\355\377\377\377\360\377\377\377\365\377\377\377\367" + "\377\377\377\372\377\377\377\374\377\377\377\375\377\377\377\375\377\377" + "\377\374\377\377\377\372\377\377\377\371\377\377\377\371\377\377\377\373" + "\377\377\377\375\377\377\377\374\377\377\377\375\377\377\377\377\377\377" + "\377\377\377\377\377\366\377\377\377\353\377\377\377\346\377\377\377\351" + "\377\377\377\357\377\377\377\361\377\377\377\367\377\377\377\370\377\377" + "\377\363\377\377\377\356\377\377\377\357\377\377\377\365\377\377\377\367" + "\377\377\377\374\377\377\377\377\377\377\377\374\377\377\377\366\377\377" + "\377\361\377\377\377\356\377\377\377\361\377\377\377\360\377\377\377\352" + "\377\377\377\353\377\377\377\352\377\377\377\352\377\377\377\354\377\377" + "\377\343\377\377\377\337\377\377\377\337\377\377\377\346\377\377\377\356" + "\377\377\377\364\377\377\377\366\377\377\377\367\377\377\377\371\377\377" + "\377\372\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\376\377\377" + "\377\366\377\377\377\363\377\377\377\364\377\377\377\365\377\377\377\366" + "\377\377\377\370\377\377\377\375\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\372\377\377\377\366" + "\377\377\377\371\377\377\377\375\377\377\377\374\377\377\377\373\377\377" + "\377\375\377\377\377\375\377\377\377\361\377\377\377\345\377\377\377\343" + "\377\377\377\350\377\377\377\355\377\377\377\357\377\377\377\363\377\377" + "\377\366\377\377\377\366\377\377\377\363\377\377\377\364\377\377\377\366" + "\377\377\377\370\377\377\377\374\377\377\377\377\377\377\377\377\377\377" + "\377\375\377\377\377\370\377\377\377\365\377\377\377\365\377\377\377\360" + "\377\377\377\354\377\377\377\356\377\377\377\356\377\377\377\354\377\377" + "\377\354\377\377\377\347\377\377\377\340\377\377\377\337\377\377\377\347" + "\377\377\377\354\377\377\377\361\377\377\377\362\377\377\377\361\377\377" + "\377\365\377\377\377\372\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\370\377\377\377\367\377\377\377\367\377\377\377\366" + "\377\377\377\371\377\377\377\374\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\374" + "\377\377\377\367\377\377\377\365\377\377\377\371\377\377\377\373\377\377" + "\377\372\377\377\377\372\377\377\377\370\377\377\377\356\377\377\377\340" + "\377\377\377\340\377\377\377\344\377\377\377\350\377\377\377\355\377\377" + "\377\360\377\377\377\361\377\377\377\363\377\377\377\364\377\377\377\365" + "\377\377\377\370\377\377\377\372\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\375\377\377\377\370\377\377\377\367\377\377\377\366" + "\377\377\377\361\377\377\377\354\377\377\377\354\377\377\377\356\377\377" + "\377\353\377\377\377\347\377\377\377\346\377\377\377\342\377\377\377\345" + "\377\377\377\352\377\377\377\351\377\377\377\354\377\377\377\355\377\377" + "\377\354\377\377\377\364\377\377\377\374\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\374\377\377\377\374\377\377\377\367" + "\377\377\377\365\377\377\377\371\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\375\377\377\377\372\377\377\377\366\377\377\377\365\377\377" + "\377\366\377\377\377\370\377\377\377\367\377\377\377\365\377\377\377\356" + "\377\377\377\340\377\377\377\335\377\377\377\340\377\377\377\340\377\377" + "\377\346\377\377\377\352\377\377\377\350\377\377\377\354\377\377\377\361" + "\377\377\377\364\377\377\377\372\377\377\377\375\377\377\377\376\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\374\377\377\377\372" + "\377\377\377\372\377\377\377\363\377\377\377\353\377\377\377\354\377\377" + "\377\357\377\377\377\352\377\377\377\346\377\377\377\346\377\377\377\345" + "\377\377\377\346\377\377\377\347\377\377\377\351\377\377\377\351\377\377" + "\377\347\377\377\377\351\377\377\377\363\377\377\377\372\377\377\377\374" + "\377\377\377\372\377\377\377\372\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\373\377\377\377\370\377\377\377\371\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\375\377\377\377\372\377\377\377\370\377\377\377\366\377\377" + "\377\363\377\377\377\364\377\377\377\366\377\377\377\367\377\377\377\364" + "\377\377\377\355\377\377\377\341\377\377\377\334\377\377\377\335\377\377" + "\377\333\377\377\377\336\377\377\377\337\377\377\377\335\377\377\377\346" + "\377\377\377\360\377\377\377\366\377\377\377\373\377\377\377\374\377\377" + "\377\374\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\376\377\377\377\364\377\377\377\353\377\377" + "\377\355\377\377\377\360\377\377\377\351\377\377\377\347\377\377\377\350" + "\377\377\377\351\377\377\377\350\377\377\377\344\377\377\377\347\377\377" + "\377\352\377\377\377\350\377\377\377\350\377\377\377\354\377\377\377\360" + "\377\377\377\361\377\377\377\356\377\377\377\364\377\377\377\374\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\375\377\377\377\375\377\377\377\375\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\374\377\377\377\372\377\377\377\371\377\377\377\366\377\377" + "\377\362\377\377\377\363\377\377\377\365\377\377\377\370\377\377\377\370" + "\377\377\377\363\377\377\377\354\377\377\377\343\377\377\377\335\377\377" + "\377\332\377\377\377\330\377\377\377\327\377\377\377\327\377\377\377\332" + "\377\377\377\344\377\377\377\355\377\377\377\367\377\377\377\373\377\377" + "\377\371\377\377\377\373\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\376\377\377\377\371\377\377\377\360\377\377" + "\377\350\377\377\377\347\377\377\377\353\377\377\377\347\377\377\377\345" + "\377\377\377\352\377\377\377\356\377\377\377\357\377\377\377\353\377\377" + "\377\350\377\377\377\353\377\377\377\353\377\377\377\346\377\377\377\345" + "\377\377\377\350\377\377\377\352\377\377\377\351\377\377\377\357\377\377" + "\377\364\377\377\377\374\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\376\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\376\377\377\377\374" + "\377\377\377\374\377\377\377\373\377\377\377\371\377\377\377\365\377\377" + "\377\361\377\377\377\355\377\377\377\362\377\377\377\365\377\377\377\366" + "\377\377\377\367\377\377\377\364\377\377\377\354\377\377\377\343\377\377" + "\377\332\377\377\377\325\377\377\377\326\377\377\377\325\377\377\377\325" + "\377\377\377\333\377\377\377\342\377\377\377\350\377\377\377\366\377\377" + "\377\374\377\377\377\372\377\377\377\372\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\372\377\377\377\366\377\377\377\357\377\377" + "\377\354\377\377\377\352\377\377\377\350\377\377\377\352\377\377\377\350" + "\377\377\377\350\377\377\377\361\377\377\377\365\377\377\377\364\377\377" + "\377\364\377\377\377\355\377\377\377\352\377\377\377\350\377\377\377\345" + "\377\377\377\344\377\377\377\344\377\377\377\345\377\377\377\346\377\377" + "\377\350\377\377\377\354\377\377\377\370\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\375\377\377\377\375\377\377\377\377\377\377\377\377\377\377\377\375" + "\377\377\377\372\377\377\377\371\377\377\377\370\377\377\377\367\377\377" + "\377\363\377\377\377\356\377\377\377\354\377\377\377\360\377\377\377\357" + "\377\377\377\357\377\377\377\362\377\377\377\363\377\377\377\344\377\377" + "\377\333\377\377\377\330\377\377\377\330\377\377\377\325\377\377\377\327" + "\377\377\377\335\377\377\377\337\377\377\377\346\377\377\377\356\377\377" + "\377\366\377\377\377\374\377\377\377\372\377\377\377\367\377\377\377\372" + "\377\377\377\375\377\377\377\372\377\377\377\363\377\377\377\352\377\377" + "\377\350\377\377\377\353\377\377\377\353\377\377\377\352\377\377\377\354" + "\377\377\377\354\377\377\377\360\377\377\377\370\377\377\377\372\377\377" + "\377\372\377\377\377\367\377\377\377\360\377\377\377\355\377\377\377\347" + "\377\377\377\342\377\377\377\341\377\377\377\340\377\377\377\340\377\377" + "\377\335\377\377\377\336\377\377\377\344\377\377\377\361\377\377\377\374" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\374\377\377" + "\377\372\377\377\377\372\377\377\377\372\377\377\377\374\377\377\377\377" + "\377\377\377\374\377\377\377\366\377\377\377\365\377\377\377\366\377\377" + "\377\367\377\377\377\363\377\377\377\356\377\377\377\355\377\377\377\352" + "\377\377\377\347\377\377\377\351\377\377\377\352\377\377\377\352\377\377" + "\377\341\377\377\377\325\377\377\377\325\377\377\377\333\377\377\377\327" + "\377\377\377\325\377\377\377\335\377\377\377\345\377\377\377\360\377\377" + "\377\370\377\377\377\374\377\377\377\375\377\377\377\370\377\377\377\364" + "\377\377\377\366\377\377\377\365\377\377\377\363\377\377\377\360\377\377" + "\377\346\377\377\377\345\377\377\377\347\377\377\377\352\377\377\377\354" + "\377\377\377\355\377\377\377\357\377\377\377\365\377\377\377\373\377\377" + "\377\373\377\377\377\375\377\377\377\370\377\377\377\362\377\377\377\362" + "\377\377\377\354\377\377\377\342\377\377\377\340\377\377\377\332\377\377" + "\377\325\377\377\377\325\377\377\377\330\377\377\377\337\377\377\377\352" + "\377\377\377\365\377\377\377\375\377\377\377\377\377\377\377\376\377\377" + "\377\372\377\377\377\367\377\377\377\367\377\377\377\365\377\377\377\366" + "\377\377\377\370\377\377\377\370\377\377\377\362\377\377\377\360\377\377" + "\377\362\377\377\377\363\377\377\377\355\377\377\377\347\377\377\377\347" + "\377\377\377\344\377\377\377\347\377\377\377\352\377\377\377\350\377\377" + "\377\346\377\377\377\343\377\377\377\332\377\377\377\323\377\377\377\325" + "\377\377\377\327\377\377\377\332\377\377\377\340\377\377\377\354\377\377" + "\377\371\377\377\377\375\377\377\377\377\377\377\377\376\377\377\377\370" + "\377\377\377\364\377\377\377\363\377\377\377\360\377\377\377\356\377\377" + "\377\352\377\377\377\345\377\377\377\350\377\377\377\350\377\377\377\354" + "\377\377\377\357\377\377\377\360\377\377\377\360\377\377\377\366\377\377" + "\377\374\377\377\377\376\377\377\377\377\377\377\377\370\377\377\377\365" + "\377\377\377\365\377\377\377\362\377\377\377\355\377\377\377\343\377\377" + "\377\321\377\377\377\307\377\377\377\314\377\377\377\325\377\377\377\332" + "\377\377\377\343\377\377\377\356\377\377\377\370\377\377\377\375\377\377" + "\377\375\377\377\377\371\377\377\377\364\377\377\377\362\377\377\377\360" + "\377\377\377\362\377\377\377\363\377\377\377\362\377\377\377\357\377\377" + "\377\354\377\377\377\351\377\377\377\352\377\377\377\347\377\377\377\340" + "\377\377\377\337\377\377\377\343\377\377\377\350\377\377\377\345\377\377" + "\377\343\377\377\377\344\377\377\377\337\377\377\377\337\377\377\377\333" + "\377\377\377\327\377\377\377\333\377\377\377\344\377\377\377\350\377\377" + "\377\361\377\377\377\372\377\377\377\374\377\377\377\377\377\377\377\377" + "\377\377\377\371\377\377\377\365\377\377\377\361\377\377\377\353\377\377" + "\377\353\377\377\377\347\377\377\377\347\377\377\377\355\377\377\377\353" + "\377\377\377\353\377\377\377\354\377\377\377\355\377\377\377\357\377\377" + "\377\365\377\377\377\372\377\377\377\376\377\377\377\376\377\377\377\370" + "\377\377\377\370\377\377\377\367\377\377\377\367\377\377\377\365\377\377" + "\377\346\377\377\377\321\377\377\377\312\377\377\377\311\377\377\377\312" + "\377\377\377\325\377\377\377\340\377\377\377\353\377\377\377\366\377\377" + "\377\371\377\377\377\370\377\377\377\366\377\377\377\363\377\377\377\363" + "\377\377\377\362\377\377\377\362\377\377\377\355\377\377\377\350\377\377" + "\377\347\377\377\377\350\377\377\377\345\377\377\377\341\377\377\377\334" + "\377\377\377\333\377\377\377\333\377\377\377\336\377\377\377\337\377\377" + "\377\332\377\377\377\337\377\377\377\340\377\377\377\336\377\377\377\343" + "\377\377\377\347\377\377\377\341\377\377\377\340\377\377\377\350\377\377" + "\377\355\377\377\377\366\377\377\377\372\377\377\377\375\377\377\377\377" + "\377\377\377\377\377\377\377\372\377\377\377\367\377\377\377\361\377\377" + "\377\355\377\377\377\354\377\377\377\350\377\377\377\350\377\377\377\355" + "\377\377\377\353\377\377\377\351\377\377\377\351\377\377\377\351\377\377" + "\377\356\377\377\377\362\377\377\377\371\377\377\377\376\377\377\377\375" + "\377\377\377\367\377\377\377\370\377\377\377\371\377\377\377\372\377\377" + "\377\367\377\377\377\353\377\377\377\334\377\377\377\325\377\377\377\317" + "\377\377\377\314\377\377\377\325\377\377\377\337\377\377\377\352\377\377" + "\377\363\377\377\377\367\377\377\377\365\377\377\377\365\377\377\377\366" + "\377\377\377\365\377\377\377\362\377\377\377\356\377\377\377\351\377\377" + "\377\344\377\377\377\343\377\377\377\346\377\377\377\346\377\377\377\334" + "\377\377\377\325\377\377\377\331\377\377\377\332\377\377\377\332\377\377" + "\377\330\377\377\377\322\377\377\377\330\377\377\377\335\377\377\377\336" + "\377\377\377\341\377\377\377\347\377\377\377\346\377\377\377\351\377\377" + "\377\357\377\377\377\365\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\371\377\377\377\366\377\377" + "\377\357\377\377\377\355\377\377\377\353\377\377\377\351\377\377\377\353" + "\377\377\377\355\377\377\377\353\377\377\377\351\377\377\377\353\377\377" + "\377\352\377\377\377\360\377\377\377\363\377\377\377\370\377\377\377\377" + "\377\377\377\374\377\377\377\366\377\377\377\367\377\377\377\370\377\377" + "\377\371\377\377\377\370\377\377\377\363\377\377\377\351\377\377\377\341" + "\377\377\377\332\377\377\377\324\377\377\377\330\377\377\377\337\377\377" + "\377\353\377\377\377\363\377\377\377\367\377\377\377\364\377\377\377\361" + "\377\377\377\361\377\377\377\361\377\377\377\356\377\377\377\350\377\377" + "\377\346\377\377\377\346\377\377\377\347\377\377\377\347\377\377\377\347" + "\377\377\377\340\377\377\377\337\377\377\377\342\377\377\377\337\377\377" + "\377\337\377\377\377\334\377\377\377\324\377\377\377\327\377\377\377\337" + "\377\377\377\344\377\377\377\344\377\377\377\350\377\377\377\353\377\377" + "\377\357\377\377\377\364\377\377\377\372\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\373\377\377" + "\377\370\377\377\377\362\377\377\377\356\377\377\377\352\377\377\377\353" + "\377\377\377\357\377\377\377\361\377\377\377\361\377\377\377\355\377\377" + "\377\360\377\377\377\362\377\377\377\367\377\377\377\371\377\377\377\371" + "\377\377\377\371\377\377\377\370\377\377\377\366\377\377\377\370\377\377" + "\377\370\377\377\377\370\377\377\377\371\377\377\377\371\377\377\377\362" + "\377\377\377\354\377\377\377\343\377\377\377\327\377\377\377\331\377\377" + "\377\337\377\377\377\354\377\377\377\364\377\377\377\365\377\377\377\362" + "\377\377\377\360\377\377\377\354\377\377\377\356\377\377\377\355\377\377" + "\377\350\377\377\377\344\377\377\377\350\377\377\377\353\377\377\377\350" + "\377\377\377\350\377\377\377\351\377\377\377\347\377\377\377\347\377\377" + "\377\345\377\377\377\340\377\377\377\337\377\377\377\334\377\377\377\334" + "\377\377\377\342\377\377\377\352\377\377\377\353\377\377\377\361\377\377" + "\377\364\377\377\377\364\377\377\377\370\377\377\377\372\377\377\377\376" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\375\377\377\377\370\377\377\377\364\377\377\377\360\377\377\377\356" + "\377\377\377\356\377\377\377\361\377\377\377\365\377\377\377\370\377\377" + "\377\364\377\377\377\370\377\377\377\371\377\377\377\373\377\377\377\377" + "\377\377\377\373\377\377\377\365\377\377\377\365\377\377\377\365\377\377" + "\377\365\377\377\377\370\377\377\377\374\377\377\377\373\377\377\377\371" + "\377\377\377\364\377\377\377\356\377\377\377\352\377\377\377\343\377\377" + "\377\337\377\377\377\337\377\377\377\347\377\377\377\353\377\377\377\356" + "\377\377\377\360\377\377\377\362\377\377\377\361\377\377\377\356\377\377" + "\377\354\377\377\377\352\377\377\377\352\377\377\377\353\377\377\377\355" + "\377\377\377\352\377\377\377\357\377\377\377\362\377\377\377\355\377\377" + "\377\352\377\377\377\351\377\377\377\344\377\377\377\346\377\377\377\347" + "\377\377\377\345\377\377\377\350\377\377\377\361\377\377\377\360\377\377" + "\377\365\377\377\377\370\377\377\377\371\377\377\377\373\377\377\377\372" + "\377\377\377\374\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\373\377\377\377\370\377\377\377\365\377\377\377\364" + "\377\377\377\363\377\377\377\362\377\377\377\363\377\377\377\370\377\377" + "\377\374\377\377\377\375\377\377\377\377\377\377\377\375\377\377\377\377" + "\377\377\377\377\377\377\377\375\377\377\377\370\377\377\377\370\377\377" + "\377\366\377\377\377\363\377\377\377\370\377\377\377\375\377\377\377\372" + "\377\377\377\365\377\377\377\361\377\377\377\352\377\377\377\352\377\377" + "\377\350\377\377\377\340\377\377\377\336\377\377\377\342\377\377\377\343" + "\377\377\377\353\377\377\377\360\377\377\377\362\377\377\377\364\377\377" + "\377\364\377\377\377\361\377\377\377\356\377\377\377\357\377\377\377\361" + "\377\377\377\356\377\377\377\354\377\377\377\364\377\377\377\370\377\377" + "\377\362\377\377\377\357\377\377\377\356\377\377\377\353\377\377\377\354" + "\377\377\377\356\377\377\377\362\377\377\377\363\377\377\377\366\377\377" + "\377\362\377\377\377\367\377\377\377\367\377\377\377\367\377\377\377\371" + "\377\377\377\367\377\377\377\371\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\376\377\377\377\372\377\377\377\370\377\377\377\371" + "\377\377\377\370\377\377\377\366\377\377\377\367\377\377\377\370\377\377" + "\377\374\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\375" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\374\377\377" + "\377\371\377\377\377\367\377\377\377\363\377\377\377\363\377\377\377\366" + "\377\377\377\363\377\377\377\361\377\377\377\356\377\377\377\346\377\377" + "\377\345\377\377\377\344\377\377\377\334\377\377\377\334\377\377\377\342" + "\377\377\377\347\377\377\377\361\377\377\377\365\377\377\377\366\377\377" + "\377\373\377\377\377\373\377\377\377\366\377\377\377\361\377\377\377\364" + "\377\377\377\370\377\377\377\364\377\377\377\357\377\377\377\365\377\377" + "\377\372\377\377\377\365\377\377\377\361\377\377\377\362\377\377\377\363" + "\377\377\377\364\377\377\377\362\377\377\377\365\377\377\377\370\377\377" + "\377\374\377\377\377\371\377\377\377\374\377\377\377\375\377\377\377\372" + "\377\377\377\371\377\377\377\373\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\376\377\377\377\372\377\377\377\371" + "\377\377\377\374\377\377\377\372\377\377\377\367\377\377\377\371\377\377" + "\377\375\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\375\377\377\377\370\377\377\377\364\377\377\377\361" + "\377\377\377\356\377\377\377\355\377\377\377\355\377\377\377\350\377\377" + "\377\342\377\377\377\342\377\377\377\337\377\377\377\331\377\377\377\331" + "\377\377\377\342\377\377\377\353\377\377\377\365\377\377\377\371\377\377" + "\377\374\377\377\377\377\377\377\377\373\377\377\377\365\377\377\377\364" + "\377\377\377\370\377\377\377\372\377\377\377\373\377\377\377\370\377\377" + "\377\370\377\377\377\372\377\377\377\371\377\377\377\371\377\377\377\371" + "\377\377\377\374\377\377\377\377\377\377\377\372\377\377\377\370\377\377" + "\377\374\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\375\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\374" + "\377\377\377\371\377\377\377\372\377\377\377\373\377\377\377\370\377\377" + "\377\370\377\377\377\372\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\372\377\377\377\365" + "\377\377\377\365\377\377\377\361\377\377\377\354\377\377\377\350\377\377" + "\377\342\377\377\377\337\377\377\377\343\377\377\377\335\377\377\377\330" + "\377\377\377\330\377\377\377\340\377\377\377\353\377\377\377\365\377\377" + "\377\373\377\377\377\373\377\377\377\373\377\377\377\372\377\377\377\370" + "\377\377\377\371\377\377\377\374\377\377\377\374\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\376\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\373\377\377\377\371\377\377\377\366\377\377" + "\377\366\377\377\377\365\377\377\377\367\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\373" + "\377\377\377\371\377\377\377\370\377\377\377\365\377\377\377\355\377\377" + "\377\347\377\377\377\347\377\377\377\347\377\377\377\350\377\377\377\346" + "\377\377\377\341\377\377\377\336\377\377\377\345\377\377\377\357\377\377" + "\377\367\377\377\377\371\377\377\377\371\377\377\377\371\377\377\377\370" + "\377\377\377\372\377\377\377\375\377\377\377\376\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\374\377\377\377\371\377\377" + "\377\362\377\377\377\362\377\377\377\361\377\377\377\365\377\377\377\376" + "\377\377\377\377\377\377\377\375\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\376\377\377\377\374\377\377\377\374\377\377\377\370\377\377" + "\377\364\377\377\377\361\377\377\377\362\377\377\377\361\377\377\377\356" + "\377\377\377\355\377\377\377\352\377\377\377\346\377\377\377\350\377\377" + "\377\360\377\377\377\366\377\377\377\367\377\377\377\366\377\377\377\370" + "\377\377\377\372\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\372\377\377" + "\377\367\377\377\377\362\377\377\377\361\377\377\377\361\377\377\377\361" + "\377\377\377\366\377\377\377\371\377\377\377\373\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\375\377\377\377\375\377\377" + "\377\374\377\377\377\374\377\377\377\373\377\377\377\373\377\377\377\372" + "\377\377\377\367\377\377\377\363\377\377\377\362\377\377\377\362\377\377" + "\377\363\377\377\377\364\377\377\377\367\377\377\377\371\377\377\377\367" + "\377\377\377\372\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\372\377\377\377\372\377\377\377\365\377\377\377\360\377\377\377\362" + "\377\377\377\361\377\377\377\361\377\377\377\366\377\377\377\370\377\377" + "\377\372\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\376\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\375\377\377\377\372\377\377\377\367\377\377" + "\377\370\377\377\377\372\377\377\377\373\377\377\377\372\377\377\377\372" + "\377\377\377\372\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\372\377\377\377\363" + "\377\377\377\362\377\377\377\363\377\377\377\364\377\377\377\367\377\377" + "\377\363\377\377\377\361\377\377\377\372\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\376\377\377\377\374\377\377" + "\377\372\377\377\377\372\377\377\377\375\377\377\377\377\377\377\377\375" + "\377\377\377\373\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\375\377\377\377\376" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\371\377\377\377\364\377\377\377\367\377\377\377\366\377\377" + "\377\362\377\377\377\360\377\377\377\361\377\377\377\367\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\375\377\377\377\375\377\377\377\376\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\374\377\377\377\374\377\377\377\374\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\376\377\377\377\376" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\375\377\377\377\372\377\377\377\372\377\377" + "\377\364\377\377\377\355\377\377\377\355\377\377\377\363\377\377\377\372" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\375\377\377" + "\377\374\377\377\377\374\377\377\377\373\377\377\377\372\377\377\377\374" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\375\377\377\377\375\377\377\377\376\377\377\377\376" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\375\377\377" + "\377\367\377\377\377\363\377\377\377\361\377\377\377\360\377\377\377\365" + "\377\377\377\372\377\377\377\377\377\377\377\377\377\377\377\376\377\377" + "\377\371\377\377\377\366\377\377\377\367\377\377\377\364\377\377\377\364" + "\377\377\377\371\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\376\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\375\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\373\377\377\377\361\377\377\377\361\377\377\377\365\377\377\377\366" + "\377\377\377\370\377\377\377\372\377\377\377\373\377\377\377\375\377\377" + "\377\374\377\377\377\372\377\377\377\370\377\377\377\366\377\377\377\364" + "\377\377\377\364\377\377\377\366\377\377\377\375\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\374\377\377" + "\377\370\377\377\377\376\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\371\377\377\377\364\377\377\377\362\377\377\377\366" + "\377\377\377\370\377\377\377\370\377\377\377\370\377\377\377\371\377\377" + "\377\372\377\377\377\371\377\377\377\371\377\377\377\366\377\377\377\364" + "\377\377\377\364\377\377\377\366\377\377\377\370\377\377\377\373\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\375\377\377\377\373\377\377" + "\377\376\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\376\377\377\377\374\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\374\377\377" + "\377\372\377\377\377\373\377\377\377\377\377\377\377\377\377\377\377\376" + "\377\377\377\376\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\373\377\377\377\367\377\377\377\366\377\377\377\370" + "\377\377\377\373\377\377\377\372\377\377\377\365\377\377\377\364\377\377" + "\377\364\377\377\377\370\377\377\377\371\377\377\377\371\377\377\377\370" + "\377\377\377\366\377\377\377\363\377\377\377\366\377\377\377\373\377\377" + "\377\375\377\377\377\375\377\377\377\376\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\367\377\377\377\361\377\377" + "\377\362\377\377\377\366\377\377\377\366\377\377\377\372\377\377\377\376" + "\377\377\377\375\377\377\377\374\377\377\377\375\377\377\377\375\377\377" + "\377\374\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\372\377\377\377\375\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\374\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\375\377\377\377\372\377\377\377\366\377\377\377\367" + "\377\377\377\371\377\377\377\373\377\377\377\374\377\377\377\371\377\377" + "\377\364\377\377\377\361\377\377\377\362\377\377\377\361\377\377\377\363" + "\377\377\377\367\377\377\377\370\377\377\377\365\377\377\377\365\377\377" + "\377\372\377\377\377\376\377\377\377\375\377\377\377\374\377\377\377\374" + "\377\377\377\375\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\370\377\377\377\356\377\377" + "\377\353\377\377\377\351\377\377\377\347\377\377\377\351\377\377\377\362" + "\377\377\377\372\377\377\377\370\377\377\377\364\377\377\377\370\377\377" + "\377\375\377\377\377\372\377\377\377\372\377\377\377\376\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\376\377\377\377\375\377\377" + "\377\372\377\377\377\370\377\377\377\370\377\377\377\372\377\377\377\370" + "\377\377\377\365\377\377\377\366\377\377\377\370\377\377\377\374\377\377" + "\377\374\377\377\377\371\377\377\377\363\377\377\377\356\377\377\377\351" + "\377\377\377\354\377\377\377\360\377\377\377\362\377\377\377\363\377\377" + "\377\364\377\377\377\371\377\377\377\374\377\377\377\374\377\377\377\373" + "\377\377\377\372\377\377\377\371\377\377\377\376\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\364\377\377" + "\377\353\377\377\377\347\377\377\377\343\377\377\377\335\377\377\377\336" + "\377\377\377\351\377\377\377\361\377\377\377\361\377\377\377\361\377\377" + "\377\363\377\377\377\370\377\377\377\370\377\377\377\366\377\377\377\367" + "\377\377\377\374", +}; + diff --git a/3d-viewer/vrml_aux.cpp b/3d-viewer/vrml_aux.cpp new file mode 100644 index 0000000000..4a0e875daf --- /dev/null +++ b/3d-viewer/vrml_aux.cpp @@ -0,0 +1,206 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 Mario Luzeiro + * Copyright (C) 1992-2014 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 + */ + +/** + * @file vrml_aux.cpp + */ + +#include "vrml_aux.h" + +char SkipGetChar ( FILE* File ) +{ + char c; + bool re_parse; + + if( (c = fgetc( File )) == EOF ) + { + //DBG( printf( "EOF\n" ) ); + return EOF; + } + + //DBG( printf( "c %c 0x%02X\n", c, c ) ); + + do + { + re_parse = false; + + if ((c == ' ') || (c == '\t') || (c == '{') || (c == '[')) + { + //DBG( printf( "Skipping space \\t or { or [\n" ) ); + do + { + if( (c = fgetc( File )) == EOF ) + { + //DBG( printf( "EOF\n" ) ); + + return EOF; + } + } + while((c == ' ') || (c == '\t') || (c == '{') || (c == '[')); + } + + if ((c == '#') || (c == '\n') || (c == '\r') || (c == 0) || (c == ',')) + { + if (c == '#') + { + //DBG( printf( "Skipping # \\n or \\r or 0, 0x%02X\n", c ) ); + do + { + if( (c = fgetc( File )) == EOF ) + { + //DBG( printf( "EOF\n" ) ); + return EOF; + } + } + while((c != '\n') && (c != '\r') && (c != 0) && (c != ',')); + } + else + { + if( (c = fgetc( File )) == EOF ) + { + //DBG( printf( "EOF\n" ) ); + return EOF; + } + } + + re_parse = true; + } + }while(re_parse == true); + + return c; +} + + +char* GetNextTag( FILE* File, char* tag ) +{ + + char c = SkipGetChar( File ); + + if (c == EOF) + { + return NULL; + } + tag[0] = c; + tag[1] = 0; + //DBG( printf( "tag[0] %c\n", tag[0] ) ); + if( (c != '}') && (c != ']') ) + { + char *dst = &tag[1]; + while (fscanf( File, "%c", dst)) + { + if( (*dst == ' ') || (*dst == '[') || (*dst == '{') || (*dst == '\t') || (*dst == '\n')|| (*dst == '\r') ) + { + *dst = 0; + break; + } + dst++; + } + + + //DBG( printf( "tag %s\n", tag ) ); + c = SkipGetChar( File ); + + if (c != EOF) + { + // Puts again the read char in the buffer + ungetc( c, File ); + } + } + + return tag; +} + + +int read_NotImplemented( FILE* File, char closeChar) +{ + char c; + //DBG( printf( "look for %c\n", closeChar) ); + while( (c = fgetc( File )) != EOF ) + { + if( c == '{' ) + { + //DBG( printf( "{\n") ); + read_NotImplemented( File, '}' ); + } else if( c == '[' ) + { + //DBG( printf( "[\n") ); + read_NotImplemented( File, ']' ); + } else if( c == closeChar ) + { + //DBG( printf( "%c\n", closeChar) ); + return 0; + } + } + + DBG( printf( " NotImplemented failed\n" ) ); + return -1; +} + + +int parseVertexList( FILE* File, std::vector< glm::vec3 > &dst_vector) +{ + //DBG( printf( " parseVertexList\n" ) ); + + dst_vector.clear(); + + glm::vec3 vertex; + while( parseVertex ( File, vertex ) == 3 ) + { + dst_vector.push_back( vertex ); + } + + return 0; +} + + +int parseVertex( FILE* File, glm::vec3 &dst_vertex ) +{ + float a,b,c; + int ret = fscanf( File, "%e %e %e", &a, &b, &c ); + + dst_vertex.x = a; + dst_vertex.y = b; + dst_vertex.z = c; + + char s = SkipGetChar( File ); + + if (s != EOF) + { + // Puts again the read char in the buffer + ungetc( s, File ); + } + //DBG( printf( "ret%d(%.9f,%.9f,%.9f)", ret, a,b,c) ); + + return ret; +} + + +int parseFloat( FILE* File, float *dst_float ) +{ + float value; + int ret = fscanf( File, "%e", &value ); + *dst_float = value; + + return ret; +} diff --git a/3d-viewer/vrml_aux.h b/3d-viewer/vrml_aux.h new file mode 100644 index 0000000000..479a4039fc --- /dev/null +++ b/3d-viewer/vrml_aux.h @@ -0,0 +1,58 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 Mario Luzeiro + * Copyright (C) 1992-2014 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 + */ + +/** + * @file vrml_aux.h + */ + +#ifndef _VRML_AUX_H +#define _VRML_AUX_H + +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef __WXMAC__ +# ifdef __DARWIN__ +# include +# else +# include +# endif +#else +# include +#endif +#include + +int read_NotImplemented( FILE* File, char closeChar); +char SkipGetChar ( FILE* File ); +int parseVertexList( FILE* File, std::vector< glm::vec3 > &dst_vector); +int parseVertex( FILE* File, glm::vec3 &dst_vertex ); +int parseFloat( FILE* File, float *dst_float ); +char* GetNextTag( FILE* File, char* tag ); + +#endif diff --git a/3d-viewer/vrml_v1_modelparser.cpp b/3d-viewer/vrml_v1_modelparser.cpp new file mode 100644 index 0000000000..d95dac985f --- /dev/null +++ b/3d-viewer/vrml_v1_modelparser.cpp @@ -0,0 +1,444 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 Mario Luzeiro + * Copyright (C) 1992-2014 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 + */ + +/** + * @file vrml_v1_modelparser.cpp + */ + +#include +#include +#include +#include +#include + +#include "3d_struct.h" +#include "modelparsers.h" +#include "vrml_aux.h" + +VRML1_MODEL_PARSER::VRML1_MODEL_PARSER( S3D_MASTER* aMaster ) : + S3D_MODEL_PARSER( aMaster ) +{ + m_model = NULL; + m_file = NULL; +} + + +VRML1_MODEL_PARSER::~VRML1_MODEL_PARSER() +{ + for( unsigned int idx = 0; idx < childs.size(); idx++ ) + { + delete childs[idx]; + } +} + + +void VRML1_MODEL_PARSER::Load( const wxString aFilename ) +{ + char text[128]; + + //DBG( printf( "Load %s\n", static_cast(aFilename.mb_str()) ) ); + m_file = wxFopen( aFilename, wxT( "rt" ) ); + + if( m_file == NULL ) + { + return; + } + + glShadeModel( GL_SMOOTH ); + glEnable( GL_NORMALIZE ); + + glm::vec3 matScale( GetMaster()->m_MatScale.x, GetMaster()->m_MatScale.y, GetMaster()->m_MatScale.z ); + glm::vec3 matRot( GetMaster()->m_MatRotation.x, GetMaster()->m_MatRotation.y, GetMaster()->m_MatRotation.z ); + glm::vec3 matPos( GetMaster()->m_MatPosition.x, GetMaster()->m_MatPosition.y, GetMaster()->m_MatPosition.z ); + + +#define SCALE_3D_CONV ((IU_PER_MILS * 1000.0f) / UNITS3D_TO_UNITSPCB) + + //glPushMatrix(); + glTranslatef( matPos.x * SCALE_3D_CONV, matPos.y * SCALE_3D_CONV, matPos.z * SCALE_3D_CONV ); + + glRotatef( matRot.z, 0.0f, 0.0f, 1.0f ); + glRotatef( matRot.y, 0.0f, 1.0f, 0.0f ); + glRotatef( matRot.x, 1.0f, 0.0f, 0.0f ); + + glScalef( matScale.x, matScale.y, matScale.z ); + + float vrmlunits_to_3Dunits = g_Parm_3D_Visu.m_BiuTo3Dunits * UNITS3D_TO_UNITSPCB; + glScalef( vrmlunits_to_3Dunits, vrmlunits_to_3Dunits, vrmlunits_to_3Dunits ); + + // Switch the locale to standard C (needed to print floating point numbers like 1.3) + SetLocaleTo_C_standard(); + + childs.clear(); + + while( GetNextTag( m_file, text ) ) + { + + if ( ( text == NULL ) || ( *text == '}' ) || ( *text == ']' ) ) + { + continue; + } + + if( strcmp( text, "Separator" ) == 0 ) + { + m_model = new S3D_MESH(); + + childs.push_back( m_model ); + + read_separator(); + } + } + + fclose( m_file ); + SetLocaleTo_Default(); // revert to the current locale + + + //DBG( printf( "chils size:%lu\n", childs.size() ) ); + + if( GetMaster()->IsOpenGlAllowed() ) + { + for( unsigned int idx = 0; idx < childs.size(); idx++ ) + { + childs[idx]->openGL_RenderAllChilds(); + } + } +} + +int VRML1_MODEL_PARSER::read_separator() +{ + char text[128]; + + //DBG( printf( "Separator\n" ) ); + + while( GetNextTag( m_file, text) ) + { + + if( strcmp( text, "Material" ) == 0 ) + { + readMaterial( ); + } else if( strcmp( text, "Coordinate3" ) == 0 ) + { + readCoordinate3(); + } else if( strcmp( text, "IndexedFaceSet" ) == 0 ) + { + readIndexedFaceSet(); + } else if( strcmp( text, "Separator" ) == 0 ) + { + S3D_MESH *parent = m_model; + + S3D_MESH *new_mesh_model = new S3D_MESH(); + + m_model->childs.push_back( new_mesh_model ); + + m_model = new_mesh_model; + + // recursive + read_separator(); + + m_model = parent; + }else if ( ( *text != '}' ) ) + { + //DBG( printf( "read_NotImplemented %s\n", text ) ); + read_NotImplemented( m_file, '}'); + } else + { + break; + } + } + + return 0; +} + + +int VRML1_MODEL_PARSER::readMaterial() +{ + char text[128]; + S3D_MATERIAL* material = NULL; + + //DBG( printf( " readMaterial\n" ) ); + + wxString mat_name; + + material = new S3D_MATERIAL( GetMaster(), mat_name ); + + GetMaster()->Insert( material ); + + m_model->m_Materials = material; + + while( GetNextTag( m_file, text ) ) + { + if ( ( text == NULL ) || ( *text == ']' ) ) + { + continue; + } + + if ( ( *text == '}' ) ) + { + return 0; + } + + if( strcmp( text, "ambientColor" ) == 0 ) + { + readMaterial_ambientColor(); + } else if( strcmp( text, "diffuseColor" ) == 0 ) + { + readMaterial_diffuseColor( ); + } else if( strcmp( text, "emissiveColor" ) == 0 ) + { + readMaterial_emissiveColor( ); + }else if( strcmp( text, "specularColor" ) == 0 ) + { + readMaterial_specularColor( ); + }else if( strcmp( text, "shininess" ) == 0 ) + { + readMaterial_shininess( ); + }else if( strcmp( text, "transparency" ) == 0 ) + { + readMaterial_transparency( ); + } + } + + return -1; +} + + +int VRML1_MODEL_PARSER::readCoordinate3( ) +{ + char text[128]; + + //DBG( printf( " readCoordinate3\n" ) ); + + while( GetNextTag( m_file, text ) ) + { + if ( ( text == NULL ) || ( *text == ']' ) ) + { + continue; + } + + if ( ( *text == '}' ) ) + { + return 0; + } + + if( strcmp( text, "point" ) == 0 ) + { + readCoordinate3_point( ); + } + } + + return -1; +} + + +int VRML1_MODEL_PARSER::readIndexedFaceSet( ) +{ + char text[128]; + + //DBG( printf( " readIndexedFaceSet\n" ) ); + + while( GetNextTag( m_file, text ) ) + { + if ( ( text == NULL ) || ( *text == ']' ) ) + { + continue; + } + + if ( ( *text == '}' ) ) + { + return 0; + } + + if( strcmp( text, "coordIndex" ) == 0 ) + { + readIndexedFaceSet_coordIndex( ); + } else if( strcmp( text, "materialIndex" ) == 0 ) + { + readIndexedFaceSet_materialIndex( ); + } + } + + return -1; +} + +int VRML1_MODEL_PARSER::readMaterial_ambientColor( ) +{ + //DBG( printf( " readMaterial_ambientColor\n" ) ); + + return parseVertexList( m_file, m_model->m_Materials->m_AmbientColor); +} + + +int VRML1_MODEL_PARSER::readMaterial_diffuseColor( ) +{ + //DBG( printf( " readMaterial_diffuseColor\n" ) ); + + return parseVertexList( m_file, m_model->m_Materials->m_DiffuseColor); +} + + +int VRML1_MODEL_PARSER::readMaterial_emissiveColor( ) +{ + //DBG( printf( " readMaterial_emissiveColor\n" ) ); + + int ret = parseVertexList( m_file, m_model->m_Materials->m_EmissiveColor); + + if( GetMaster()->m_use_modelfile_emissiveColor == false) + { + m_model->m_Materials->m_EmissiveColor.clear(); + } + + return ret; +} + + +int VRML1_MODEL_PARSER::readMaterial_specularColor() +{ + //DBG( printf( " readMaterial_specularColor\n" ) ); + + int ret = parseVertexList( m_file, m_model->m_Materials->m_SpecularColor ); + + if( GetMaster()->m_use_modelfile_specularColor == false) + { + m_model->m_Materials->m_SpecularColor.clear(); + } + + return ret; +} + + +int VRML1_MODEL_PARSER::readMaterial_shininess( ) +{ + //DBG( printf( " readMaterial_shininess\n" ) ); + + m_model->m_Materials->m_Shininess.clear(); + + float shininess_value; + while( fscanf( m_file, "%f,", &shininess_value ) ) + { + // VRML value is normalized and openGL expects a value 0 - 128 + shininess_value = shininess_value * 128.0f; + m_model->m_Materials->m_Shininess.push_back( shininess_value ); + } + + if( GetMaster()->m_use_modelfile_shininess == false ) + { + m_model->m_Materials->m_Shininess.clear(); + } + + //DBG( printf( " m_Shininess.size: %ld\n", m_model->m_Materials->m_Shininess.size() ) ); + + return 0; +} + + +int VRML1_MODEL_PARSER::readMaterial_transparency() +{ + //DBG( printf( " readMaterial_transparency\n" ) ); + + m_model->m_Materials->m_Transparency.clear(); + + float tmp; + while( fscanf (m_file, "%f,", &tmp) ) + { + m_model->m_Materials->m_Transparency.push_back( tmp ); + } + + if( GetMaster()->m_use_modelfile_transparency == false ) + { + m_model->m_Materials->m_Transparency.clear(); + } + + //DBG( printf( " m_Transparency.size: %ld\n", m_model->m_Materials->m_Transparency.size() ) ); + + return 0; +} + + +int VRML1_MODEL_PARSER::readCoordinate3_point() +{ + //DBG( printf( " readCoordinate3_point\n" ) ); + + if( parseVertexList( m_file, m_model->m_Point ) == 0 ) + { + return 0; + } + + return -1; +} + + +int VRML1_MODEL_PARSER::readIndexedFaceSet_coordIndex() +{ + //DBG( printf( " readIndexedFaceSet_coordIndex\n" ) ); + + m_model->m_CoordIndex.clear(); + + glm::ivec3 coord; + + int dummy; // should be -1 + while( fscanf( m_file, "%d,%d,%d,%d,", &coord[0], &coord[1], &coord[2], &dummy ) ) + { + std::vector coord_list; + + coord_list.resize( 3 ); + coord_list[0] = coord[0]; + coord_list[1] = coord[1]; + coord_list[2] = coord[2]; + + if( (coord[0] == coord[1]) || + (coord[0] == coord[2]) || + (coord[2] == coord[1]) ) + { + //DBG( printf( " invalid coordIndex at index %lu (%d, %d, %d, %d)\n", m_model->m_CoordIndex.size()+1,coord[0], coord[1], coord[2], dummy ) ); + } + + if (dummy != -1) + { + //DBG( printf( " Error at index %lu, -1 Expected, got %d\n", m_model->m_CoordIndex.size()+1, dummy ) ); + } + m_model->m_CoordIndex.push_back( coord_list ); + } + + //DBG( printf( " m_CoordIndex.size: %ld\n", m_model->m_CoordIndex.size() ) ); + + return 0; +} + + +int VRML1_MODEL_PARSER::readIndexedFaceSet_materialIndex() +{ + //DBG( printf( " readIndexedFaceSet_materialIndex\n" ) ); + + m_model->m_MaterialIndex.clear(); + + int index; + while( fscanf( m_file, "%d,", &index ) ) + { + m_model->m_MaterialIndex.push_back( index ); + } + + //DBG( printf( " m_MaterialIndex.size: %ld\n", m_model->m_MaterialIndex.size() ) ); + + return 0; +} diff --git a/3d-viewer/vrml_v2_modelparser.cpp b/3d-viewer/vrml_v2_modelparser.cpp new file mode 100644 index 0000000000..9202610149 --- /dev/null +++ b/3d-viewer/vrml_v2_modelparser.cpp @@ -0,0 +1,737 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 Mario Luzeiro + * Copyright (C) 2013 Tuomas Vaherkoski + * Copyright (C) 2012 Jean-Pierre Charras, jp.charras@wanadoo.fr + * Copyright (C) 2011 Wayne Stambaugh + * Copyright (C) 1992-2014 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 + */ + +/** + * @file vrml_v2_modelparser.cpp + */ + +#include +#include +#include +#include +#include + +#include "3d_struct.h" +#include "modelparsers.h" +#include "vrml_aux.h" + +VRML2_MODEL_PARSER::VRML2_MODEL_PARSER( S3D_MASTER* aMaster ) : + S3D_MODEL_PARSER( aMaster ) +{ + m_model = NULL; +} + + +VRML2_MODEL_PARSER::~VRML2_MODEL_PARSER() +{ + for(unsigned int idx = 0; idx < childs.size(); idx++) + { + delete childs[idx]; + } +} + + +void VRML2_MODEL_PARSER::Load( const wxString aFilename ) +{ + char text[128]; + + //DBG( printf( "Load %s\n", static_cast(aFilename.mb_str()) ) ); + m_file = wxFopen( aFilename, wxT( "rt" ) ); + + if( m_file == NULL ) + { + return; + } + + glShadeModel(GL_SMOOTH); + glEnable(GL_NORMALIZE); + + glm::vec3 matScale( GetMaster()->m_MatScale.x, GetMaster()->m_MatScale.y, GetMaster()->m_MatScale.z ); + glm::vec3 matRot( GetMaster()->m_MatRotation.x, GetMaster()->m_MatRotation.y, GetMaster()->m_MatRotation.z ); + glm::vec3 matPos( GetMaster()->m_MatPosition.x, GetMaster()->m_MatPosition.y, GetMaster()->m_MatPosition.z ); + + +#define SCALE_3D_CONV ((IU_PER_MILS * 1000.0f) / UNITS3D_TO_UNITSPCB) + + //glPushMatrix(); + glTranslatef( matPos.x * SCALE_3D_CONV, matPos.y * SCALE_3D_CONV, matPos.z * SCALE_3D_CONV ); + + glRotatef( matRot.z, 0.0f, 0.0f, 1.0f ); + glRotatef( matRot.y, 0.0f, 1.0f, 0.0f ); + glRotatef( matRot.x, 1.0f, 0.0f, 0.0f ); + + glScalef( matScale.x, matScale.y, matScale.z ); + + float vrmlunits_to_3Dunits = g_Parm_3D_Visu.m_BiuTo3Dunits * UNITS3D_TO_UNITSPCB; + glScalef( vrmlunits_to_3Dunits, vrmlunits_to_3Dunits, vrmlunits_to_3Dunits ); + + // Switch the locale to standard C (needed to print floating point numbers like 1.3) + SetLocaleTo_C_standard(); + + childs.clear(); + + while( GetNextTag( m_file, text ) ) + { + + if( ( text == NULL ) || ( *text == '}' ) || ( *text == ']' ) ) + { + continue; + } + + if( strcmp( text, "Transform" ) == 0 ) + { + m_model = new S3D_MESH(); + + childs.push_back( m_model ); + + read_Transform(); + + } else if( strcmp( text, "DEF" ) == 0 ) + { + m_model = new S3D_MESH(); + + childs.push_back( m_model ); + + read_DEF(); + } + } + + fclose( m_file ); + SetLocaleTo_Default(); // revert to the current locale + + + //DBG( printf( "chils size:%lu\n", childs.size() ) ); + + if( GetMaster()->IsOpenGlAllowed() ) + { + for( unsigned int idx = 0; idx < childs.size(); idx++ ) + { + childs[idx]->openGL_RenderAllChilds(); + } + } +} + + +int VRML2_MODEL_PARSER::read_Transform() +{ + char text[128]; + + ///DBG( printf( "Transform\n" ) ); + + while( GetNextTag( m_file, text ) ) + { + if ( ( text == NULL ) || ( *text == ']' ) ) + { + continue; + } + if ( ( *text == '}' ) ) + { + //DBG( printf( " } Exit Transform\n" ) ); + break; + } + if( strcmp( text, "translation" ) == 0 ) + { + parseVertex( m_file, m_model->m_translation ); + } else if( strcmp( text, "rotation" ) == 0 ) + { + fscanf( m_file, "%f %f %f %f", &m_model->m_rotation[0], &m_model->m_rotation[1], &m_model->m_rotation[2], &m_model->m_rotation[3]); + m_model->m_rotation[3] = m_model->m_rotation[3] * 180.0f / 3.14f; // !TODO: use constants or functions + } else if( strcmp( text, "scale" ) == 0 ) + { + parseVertex( m_file, m_model->m_scale ); + } else if( strcmp( text, "scaleOrientation" ) == 0 ) + { + fscanf( m_file, "%f %f %f %f", &m_model->m_scaleOrientation[0], &m_model->m_scaleOrientation[1], &m_model->m_scaleOrientation[2], &m_model->m_scaleOrientation[3]); + } else if( strcmp( text, "center" ) == 0 ) + { + parseVertex( m_file, m_model->m_center ); + } else if( strcmp( text, "children" ) == 0 ) + { + // skip + } else if( strcmp( text, "Switch" ) == 0 ) + { + // skip + } else if( strcmp( text, "whichChoice" ) == 0 ) + { + int dummy; + fscanf( m_file, "%d", &dummy ); + } else if( strcmp( text, "choice" ) == 0 ) + { + // skip + } else if( strcmp( text, "Group" ) == 0 ) + { + // skip + } else if( strcmp( text, "Shape" ) == 0 ) + { + S3D_MESH *parent = m_model; + + S3D_MESH *new_mesh_model = new S3D_MESH(); + + m_model->childs.push_back( new_mesh_model ); + + m_model = new_mesh_model; + + read_Shape(); + + m_model = parent; + + } else if( strcmp( text, "DEF" ) == 0 ) + { + read_DEF(); + } else + { + //DBG( printf( " %s NotImplemented\n", text ) ); + read_NotImplemented( m_file, '}' ); + } + } + return 0; +} + + +int VRML2_MODEL_PARSER::read_DEF() +{ + char text[128]; + + GetNextTag( m_file, text); + //DBG( printf( "DEF %s ", text ) ); + + while( GetNextTag( m_file, text ) ) + { + if( ( text == NULL ) || ( *text == ']' ) ) + { + //DBG( printf( " skiping %c\n", *text) ); + continue; + } + + if( ( *text == '}' ) ) + { + //DBG( printf( " } Exit DEF\n") ); + return 0; + } + + if( strcmp( text, "Transform" ) == 0 ) + { + return read_Transform (); + } else if( strcmp( text, "children" ) == 0 ) + { + // skip + } else if( strcmp( text, "Switch" ) == 0 ) + { + // skip + } else if( strcmp( text, "whichChoice" ) == 0 ) + { + // skip + } else if( strcmp( text, "choice" ) == 0 ) + { + // skip + }else if( strcmp( text, "Shape" ) == 0 ) + { + S3D_MESH *parent = m_model; + + S3D_MESH *new_mesh_model = new S3D_MESH(); + + m_model->childs.push_back( new_mesh_model ); + + m_model = new_mesh_model; + + read_Shape(); + + m_model = parent; + } + } + + //DBG( printf( " DEF failed\n" ) ); + return -1; +} + + +int VRML2_MODEL_PARSER::read_Shape() +{ + char text[128]; + + //DBG( printf( " Shape\n") ); + + while( GetNextTag( m_file, text ) ) + { + if ( ( text == NULL ) || ( *text == ']' ) ) + { + continue; + } + + if ( ( *text == '}' ) ) + { + //DBG( printf( " } Exit Shape\n") ); + return 0; + } + + if( strcmp( text, "appearance" ) == 0 ) + { + //skip + } else if( strcmp( text, "Appearance" ) == 0 ) + { + read_Appearance(); + } else if( strcmp( text, "geometry" ) == 0 ) + { + //skip + } else if( strcmp( text, "IndexedFaceSet" ) == 0 ) + { + read_IndexedFaceSet(); + } else + { + //DBG( printf( " %s NotImplemented\n", text ) ); + read_NotImplemented( m_file, '}' ); + } + } + + //DBG( printf( " Shape failed\n") ); + return -1; +} + + +int VRML2_MODEL_PARSER::read_Appearance() +{ + char text[128]; + + //DBG( printf( " Appearance\n") ); + + while( GetNextTag( m_file, text ) ) + { + if ( ( text == NULL ) || ( *text == ']' ) ) + { + continue; + } + + if ( ( *text == '}' ) ) + { + return 0; + } + + if( strcmp( text, "material" ) == 0 ) + { + read_material(); + } + } + + //DBG( printf( " Appearance failed\n") ); + return -1; +} + + +int VRML2_MODEL_PARSER::read_material() +{ + S3D_MATERIAL* material = NULL; + char text[128]; + + //DBG( printf( " material ") ); + + if( GetNextTag( m_file, text ) ) + { + if( strcmp( text, "Material" ) == 0 ) + { + wxString mat_name; + material = new S3D_MATERIAL( GetMaster(), mat_name ); + + GetMaster()->Insert( material ); + + m_model->m_Materials = material; + + if( strcmp( text, "Material" ) == 0 ) + { + return read_Material(); + } + } else if( strcmp( text, "DEF" ) == 0 ) + { + //DBG( printf( "DEF") ); + + if( GetNextTag( m_file, text ) ) + { + //DBG( printf( "%s", text ) ); + + wxString mat_name; + mat_name = FROM_UTF8( text ); + + material = new S3D_MATERIAL( GetMaster(), mat_name ); + + GetMaster()->Insert( material ); + + m_model->m_Materials = material; + + if( GetNextTag( m_file, text ) ) + { + if( strcmp( text, "Material" ) == 0 ) + { + return read_Material(); + } + } + } + } else if( strcmp( text, "USE" ) == 0 ) + { + //DBG( printf( "USE") ); + + if( GetNextTag( m_file, text ) ) + { + //DBG( printf( "%s\n", text ) ); + + wxString mat_name; + mat_name = FROM_UTF8( text ); + + for( material = GetMaster()->m_Materials; material; material = material->Next() ) + { + if( material->m_Name == mat_name ) + { + m_model->m_Materials = material; + return 0; + } + } + //DBG( printf( " read_material error: material not found\n" ) ); + } + } + } + + //DBG( printf( " failed material\n") ); + return -1; +} + + +int VRML2_MODEL_PARSER::read_Material() +{ + char text[128]; + glm::vec3 vertex; + + //DBG( printf( " Material\n") ); + + while( GetNextTag( m_file, text ) ) + { + if ( ( text == NULL ) || ( *text == ']' ) ) + { + continue; + } + + if ( ( *text == '}' ) ) + { + return 0; + } + + if( strcmp( text, "diffuseColor" ) == 0 ) + { + //DBG( printf( " diffuseColor") ); + parseVertex ( m_file, vertex); + //DBG( printf( "\n") ); + m_model->m_Materials->m_DiffuseColor.push_back( vertex ); + } else if( strcmp( text, "emissiveColor" ) == 0 ) + { + //DBG( printf( " emissiveColor") ); + parseVertex ( m_file, vertex); + //DBG( printf( "\n") ); + if( GetMaster()->m_use_modelfile_emissiveColor == true ) + { + m_model->m_Materials->m_EmissiveColor.push_back( vertex ); + } + } else if( strcmp( text, "specularColor" ) == 0 ) + { + //DBG( printf( " specularColor") ); + parseVertex ( m_file, vertex); + //DBG( printf( "\n") ); + if( GetMaster()->m_use_modelfile_specularColor == true ) + { + m_model->m_Materials->m_SpecularColor.push_back( vertex ); + } + } else if( strcmp( text, "ambientIntensity" ) == 0 ) + { + float ambientIntensity; + parseFloat( m_file, &ambientIntensity ); + //DBG( printf( " ambientIntensity %f\n", ambientIntensity) ); + if( GetMaster()->m_use_modelfile_ambientIntensity == true ) + { + m_model->m_Materials->m_AmbientColor.push_back( glm::vec3( ambientIntensity, ambientIntensity, ambientIntensity ) ); + } + } else if( strcmp( text, "transparency" ) == 0 ) + { + float transparency; + parseFloat( m_file, &transparency ); + //DBG( printf( " transparency %f\n", transparency) ); + if( GetMaster()->m_use_modelfile_transparency == true ) + { + m_model->m_Materials->m_Transparency.push_back( transparency ); + } + } else if( strcmp( text, "shininess" ) == 0 ) + { + float shininess; + parseFloat( m_file, &shininess ); + //DBG( printf( " shininess %f\n", shininess) ); + // VRML value is normalized and openGL expects a value 0 - 128 + if( GetMaster()->m_use_modelfile_shininess == true ) + { + shininess = shininess * 128.0f; + m_model->m_Materials->m_Shininess.push_back( shininess ); + } + } + } + + DBG( printf( " Material failed\n") ); + return -1; +} + + +int VRML2_MODEL_PARSER::read_IndexedFaceSet() +{ + char text[128]; + + //DBG( printf( " IndexedFaceSet\n") ); + + m_normalPerVertex = false; + colorPerVertex = false; + + while( GetNextTag( m_file, text ) ) + { + if ( ( text == NULL ) || ( *text == ']' ) ) + { + continue; + } + + if ( ( *text == '}' ) ) + { + //DBG( printf( " } Exit IndexedFaceSet\n") ); + return 0; + } + + if( strcmp( text, "normalPerVertex" ) == 0 ) + { + if( GetNextTag( m_file, text ) ) + { + if( strcmp( text, "TRUE" ) == 0 ) + { + //DBG( printf( " m_normalPerVertex TRUE\n") ); + m_normalPerVertex = true; + } + } + } else if( strcmp( text, "colorPerVertex" ) == 0 ) + { + GetNextTag( m_file, text ); + if( strcmp( text, "TRUE" ) ) + { + //DBG( printf( " colorPerVertex = true\n") ); + colorPerVertex = true; + } else + { + colorPerVertex = false; + } + + } else if( strcmp( text, "Coordinate" ) == 0 ) + { + read_Coordinate(); + } else if( strcmp( text, "Normal" ) == 0 ) + { + //read_Normal(); + read_NotImplemented( m_file, '}' ); + } else if( strcmp( text, "normalIndex" ) == 0 ) + { + //DBG( printf( " normalIndex NotImplemented\n" ) ); + read_NotImplemented( m_file, ']' ); + } else if( strcmp( text, "Color" ) == 0 ) + { + read_Color(); + } else if( strcmp( text, "coordIndex" ) == 0 ) + { + read_coordIndex(); + } else if( strcmp( text, "colorIndex" ) == 0 ) + { + read_colorIndex(); + } + + } + + DBG( printf( " IndexedFaceSet failed %s\n", text) ); + return -1; +} + + +int VRML2_MODEL_PARSER::read_colorIndex() +{ + //DBG( printf( " read_colorIndex\n" ) ); + + m_model->m_MaterialIndex.clear(); + + if( colorPerVertex == true ) + { + int index; + int first_index; + while( fscanf( m_file, "%d, ", &index ) ) + { + if( index == -1 ) + { + // it only implemented color per face, so it will store as the first in the list + m_model->m_MaterialIndex.push_back( first_index ); + } else + { + first_index = index; + } + } + } else + { + int index; + while( fscanf( m_file, "%d,", &index ) ) + { + m_model->m_MaterialIndex.push_back( index ); + } + } + + //DBG( printf( " m_MaterialIndex.size: %ld\n", m_model->m_MaterialIndex.size() ) ); + + return 0; +} + + +int VRML2_MODEL_PARSER::read_coordIndex() +{ + //DBG( printf( " read_coordIndex\n" ) ); + + m_model->m_CoordIndex.clear(); + + glm::ivec3 coord; + + int dummy; // should be -1 + + std::vector coord_list; + coord_list.clear(); + while( fscanf (m_file, "%d, ", &dummy ) == 1 ) + { + if( dummy == -1 ) + { + m_model->m_CoordIndex.push_back( coord_list ); + //DBG( printf( " size: %lu ", coord_list.size()) ); + coord_list.clear(); + } else + { + coord_list.push_back( dummy ); + //DBG( printf( "%d ", dummy) ); + } + } + + //DBG( printf( " m_CoordIndex.size: %ld\n", m_model->m_CoordIndex.size() ) ); + + return 0; +} + + +int VRML2_MODEL_PARSER::read_Color() +{ + char text[128]; + + //DBG( printf( " read_Color\n") ); + + while( GetNextTag( m_file, text ) ) + { + if ( ( text == NULL ) || ( *text == ']' ) ) + { + continue; + } + + if ( ( *text == '}' ) ) + { + //DBG( printf( " m_DiffuseColor.size: %ld\n", m_model->m_Materials->m_DiffuseColor.size() ) ); + return 0; + } + + if( strcmp( text, "color" ) == 0 ) + { + parseVertexList( m_file, m_model->m_Materials->m_DiffuseColor ); + } + } + + //DBG( printf( " read_Color failed\n") ); + return -1; +} + + + + +int VRML2_MODEL_PARSER::read_Normal() +{ + char text[128]; + + //DBG( printf( " Normal\n") ); + + while( GetNextTag( m_file, text ) ) + { + if ( ( text == NULL ) || ( *text == ']' ) ) + { + continue; + } + + if ( ( *text == '}' ) ) + { + //DBG( printf( " m_PerFaceNormalsNormalized.size: %lu\n", m_model->m_PerFaceNormalsNormalized.size() ) ); + return 0; + } + + if( strcmp( text, "vector" ) == 0 ) + { + if(m_normalPerVertex == false ) + { + parseVertexList( m_file, m_model->m_PerFaceNormalsNormalized ); + } else + { + parseVertexList( m_file, m_model->m_PerVertexNormalsNormalized ); + + //DBG( printf( " m_PerVertexNormalsNormalized.size: %lu\n", m_model->m_PerVertexNormalsNormalized.size() ) ); + } + } + } + + return -1; +} + + +int VRML2_MODEL_PARSER::read_Coordinate() +{ + char text[128]; + + //DBG( printf( " Coordinate\n") ); + + while( GetNextTag( m_file, text ) ) + { + if ( ( text == NULL ) || ( *text == ']' ) ) + { + continue; + } + + if ( ( *text == '}' ) ) + { + //DBG( printf( " m_Point.size: %lu\n", m_model->m_Point.size() ) ); + return 0; + } + + if( strcmp( text, "point" ) == 0 ) + { + parseVertexList( m_file, m_model->m_Point); + } + } + + return -1; +} + diff --git a/3d-viewer/vrmlmodelparser.cpp b/3d-viewer/vrmlmodelparser.cpp index 0e3877eea4..e7d1bcdec1 100644 --- a/3d-viewer/vrmlmodelparser.cpp +++ b/3d-viewer/vrmlmodelparser.cpp @@ -37,23 +37,34 @@ #include "3d_struct.h" #include "modelparsers.h" -// separator chars -static const char* sep_chars = " \t\n\r"; VRML_MODEL_PARSER::VRML_MODEL_PARSER( S3D_MASTER* aMaster ) : S3D_MODEL_PARSER( aMaster ) -{} +{ + vrml1_parser = new VRML1_MODEL_PARSER( aMaster ); + vrml2_parser = new VRML2_MODEL_PARSER( aMaster ); +} VRML_MODEL_PARSER::~VRML_MODEL_PARSER() -{} +{ + if( vrml1_parser ) + { + delete vrml1_parser; + } + if( vrml2_parser ) + { + delete vrml2_parser; + } +} void VRML_MODEL_PARSER::Load( const wxString aFilename ) { - char line[1024], * text; + char line[12]; FILE* file; - int LineNum = 0; + + // DBG( printf( "Load %s\n", static_cast(aFilename.mb_str()) ) ); file = wxFopen( aFilename, wxT( "rt" ) ); @@ -62,515 +73,29 @@ void VRML_MODEL_PARSER::Load( const wxString aFilename ) return; } - // Switch the locale to standard C (needed to print floating point numbers like 1.3) - SetLocaleTo_C_standard(); - - while( GetLine( file, line, &LineNum, 512 ) ) + if( fgets( line, 11, file ) == NULL ) { - text = strtok( line, sep_chars ); - if ( text == NULL ) - continue; - - if( stricmp( text, "DEF" ) == 0 || stricmp( text, "Transform" ) == 0 || stricmp( text, "Group" ) == 0 ) - { - while( GetLine( file, line, &LineNum, 512 ) ) - { - text = strtok( line, sep_chars ); - - if( text == NULL ) - continue; - - if( *text == '}' ) - break; - - if( stricmp( text, "children" ) == 0 ) - { - readChildren( file, &LineNum ); - } - } - } + fclose( file ); + + return; } - fclose( file ); - SetLocaleTo_Default(); // revert to the current locale -} - - -int VRML_MODEL_PARSER::readMaterial( FILE* file, int* LineNum ) -{ - char line[512], * text, * command; - wxString mat_name; - S3D_MATERIAL* material = NULL; - - command = strtok( NULL, sep_chars ); - text = strtok( NULL, sep_chars ); - mat_name = FROM_UTF8( text ); - - if( stricmp( command, "USE" ) == 0 ) + + + if( stricmp( line, "#VRML V2.0" ) == 0) { - for( material = GetMaster()->m_Materials; material; material = material->Next() ) - { - if( material->m_Name == mat_name ) - { - material->SetMaterial(); - return 1; - } - } + //DBG( printf( "About to parser a #VRML V2.0 file\n" ) ); + vrml2_parser->Load( aFilename ); - DBG( printf( "ReadMaterial error: material not found\n" ) ); - return 0; + return; + } + else if( stricmp( line, "#VRML V1.0" ) == 0) + { + //DBG( printf( "About to parser a #VRML V1.0 file\n" ) ); + vrml1_parser->Load( aFilename ); + + return; } - if( stricmp( command, "DEF" ) == 0 || stricmp( command,"Transform" ) == 0 || stricmp( command, "Material") == 0) - { - material = new S3D_MATERIAL( GetMaster(), mat_name ); - - GetMaster()->Insert( material ); - - while( GetLine( file, line, LineNum, 512 ) ) - { - text = strtok( line, sep_chars ); - - if( text == NULL ) - continue; - - if( text[0] == '}' ) - { - material->SetMaterial(); - return 0; - } - - if( stricmp( text, "diffuseColor" ) == 0 ) - { - text = strtok( NULL, sep_chars ); - material->m_DiffuseColor.x = atof( text ); - text = strtok( NULL, sep_chars ); - material->m_DiffuseColor.y = atof( text ); - text = strtok( NULL, sep_chars ); - material->m_DiffuseColor.z = atof( text ); - } - else if( stricmp( text, "emissiveColor" ) == 0 ) - { - text = strtok( NULL, sep_chars ); - material->m_EmissiveColor.x = atof( text ); - text = strtok( NULL, sep_chars ); - material->m_EmissiveColor.y = atof( text ); - text = strtok( NULL, sep_chars ); - material->m_EmissiveColor.z = atof( text ); - } - else if( strnicmp( text, "specularColor", 13 ) == 0 ) - { - text = strtok( NULL, sep_chars ); - material->m_SpecularColor.x = atof( text ); - text = strtok( NULL, sep_chars ); - material->m_SpecularColor.y = atof( text ); - text = strtok( NULL, sep_chars ); - material->m_SpecularColor.z = atof( text ); - } - else if( strnicmp( text, "ambientIntensity", 16 ) == 0 ) - { - text = strtok( NULL, sep_chars ); - material->m_AmbientIntensity = atof( text ); - } - else if( strnicmp( text, "transparency", 12 ) == 0 ) - { - text = strtok( NULL, sep_chars ); - material->m_Transparency = atof( text ); - } - else if( strnicmp( text, "shininess", 9 ) == 0 ) - { - text = strtok( NULL, sep_chars ); - material->m_Shininess = atof( text ); - } - } - } - - return -1; -} - - -int VRML_MODEL_PARSER::readChildren( FILE* file, int* LineNum ) -{ - char line[1024], * text; - - while( GetLine( file, line, LineNum, 512 ) ) - { - text = strtok( line, sep_chars ); - - if( *text == '[' ) - continue; - - if( *text == ']' ) - return 0; - - if( *text == ',' ) - continue; - - if( stricmp( text, "Shape" ) == 0 ) - { - readShape( file, LineNum ); - } - else - { - DBG( printf( "ReadChildren error line %d <%s> \n", *LineNum, text ) ); - break; - } - } - - return 1; -} - - -int VRML_MODEL_PARSER::readShape( FILE* file, int* LineNum ) -{ - char line[1024], * text; - int err = 1; - - while( GetLine( file, line, LineNum, 512 ) ) - { - text = strtok( line, sep_chars ); - - if( *text == '}' ) - { - err = 0; - break; - } - - if( *text == '{' ) - { - continue; - } - - if( stricmp( text, "appearance" ) == 0 ) - { - readAppearance( file, LineNum ); - } - else if( stricmp( text, "geometry" ) == 0 ) - { - readGeometry( file, LineNum ); - } - else - { - DBG( printf( "ReadShape error line %d <%s> \n", *LineNum, text ) ); - break; - } - } - - return err; -} - - -int VRML_MODEL_PARSER::readAppearance( FILE* file, int* LineNum ) -{ - char line[1024], * text; - int err = 1; - - while( GetLine( file, line, LineNum, 512 ) ) - { - text = strtok( line, sep_chars ); - - if( *text == '}' ) - { - err = 0; - break; - } - - if( *text == '{' ) - { - continue; - } - - if( stricmp( text, "material" ) == 0 ) - { - readMaterial( file, LineNum ); - } - else - { - DBG( printf( "ReadAppearance error line %d <%s> \n", *LineNum, text ) ); - break; - } - } - - return err; -} - - -void VRML_MODEL_PARSER::readCoordsList( FILE* file, char* text_buffer, - std::vector< double >& aList, int* LineNum ) -{ - unsigned int ii = 0, jj = 0; - char* text; - bool HasData = false; - bool StartData = false; - bool EndNode = false; - char string_num[512]; - - text = text_buffer; - - while( !EndNode ) - { - if( *text == 0 ) // Needs data ! - { - text = text_buffer; - GetLine( file, text_buffer, LineNum, 512 ); - } - - while( !EndNode && *text ) - { - switch( *text ) - { - case '[': - StartData = true; - jj = 0; - string_num[jj] = 0; - break; - - case '}': - EndNode = true; - break; - - case ']': - case '\t': - case ' ': - case ',': - jj = 0; - - if( !StartData || !HasData ) - break; - - aList.push_back( atof( string_num ) ); - string_num[jj] = 0; - ii++; - - HasData = false; - - if( *text == ']' ) - { - StartData = false; - } - - break; - - default: - if( !StartData ) - break; - - if( jj >= sizeof( string_num ) ) - break; - - string_num[jj] = *text; - jj++; - string_num[jj] = 0; - HasData = true; - break; - } - - text++; - } - } -} - - -int VRML_MODEL_PARSER::readGeometry( FILE* file, int* LineNum ) -{ - char line[1024], buffer[1024], * text; - int err = 1; - std::vector< double > points; - std::vector< double > list; - double vrmlunits_to_3Dunits = g_Parm_3D_Visu.m_BiuTo3Dunits * UNITS3D_TO_UNITSPCB; - - while( GetLine( file, line, LineNum, 512 ) ) - { - strcpy( buffer, line ); - text = strtok( buffer, sep_chars ); - - if( text == NULL ) - continue; - - if( *text == '}' ) - { - err = 0; - break; - } - - if( stricmp( text, "creaseAngle" ) == 0 ) - { - continue; - } - - if( *text == '{' ) - { - continue; - } - - if( stricmp( text, "normalPerVertex" ) == 0 ) - { - text = strtok( NULL, " ,\t\n\r" ); - - if( text && stricmp( text, "true" ) == 0 ) - { - } - else - { - } - - continue; - } - - if( stricmp( text, "colorPerVertex" ) == 0 ) - { - text = strtok( NULL, " ,\t\n\r" ); - - if( text && stricmp( text, "true" ) == 0 ) - { - } - else - { - } - continue; - } - - if( stricmp( text, "normal" ) == 0 ) - { - readCoordsList( file, line, list, LineNum ); - list.clear(); - continue; - } - - if( stricmp( text, "normalIndex" ) == 0 ) - { - while( GetLine( file, line, LineNum, 512 ) ) - { - text = strtok( line, " ,\t\n\r" ); - - while( text ) - { - if( *text == ']' ) - break; - - text = strtok( NULL, " ,\t\n\r" ); - } - - if( text && (*text == ']') ) - break; - } - - continue; - } - - if( stricmp( text, "color" ) == 0 ) - { - readCoordsList( file, line, list, LineNum ); - list.clear(); - continue; - } - - if( stricmp( text, "solid" ) == 0 ) - { - // ignore solid - continue; - } - - if( stricmp( text, "colorIndex" ) == 0 ) - { - while( GetLine( file, line, LineNum, 512 ) ) - { - text = strtok( line, " ,\t\n\r" ); - - while( text ) - { - if( *text == ']' ) - break; - - text = strtok( NULL, " ,\t\n\r" ); - } - - if( text && (*text == ']') ) - break; - } - - continue; - } - - if( stricmp( text, "coord" ) == 0 ) - { - readCoordsList( file, line, points, LineNum ); - } - else if( stricmp( text, "coordIndex" ) == 0 ) - { - if( points.size() < 3 || points.size() % 3 != 0 ) - { - wxLogError( wxT( "3D geometry read error <%s> at line %d." ), - GetChars( FROM_UTF8( text ) ), *LineNum ); - err = 1; - break; - } - - std::vector< int > coordIndex; - std::vector< S3D_VERTEX > vertices; - - while( GetLine( file, line, LineNum, 512 ) ) - { - int jj; - text = strtok( line, " ,\t\n\r" ); - - while( text ) - { - if( *text == ']' ) - break; - - jj = atoi( text ); - - if( jj < 0 ) - { - for( jj = 0; jj < (int) coordIndex.size(); jj++ ) - { - int kk = coordIndex[jj] * 3; - - if( (kk < 0) || ((kk + 3) > (int)points.size()) ) - { - wxLogError( wxT( "3D geometry index read error <%s> at line %d." ), - GetChars( FROM_UTF8( text ) ), *LineNum ); - err = 1; - break; - } - - S3D_VERTEX vertex; - vertex.x = points[kk]; - vertex.y = points[kk + 1]; - vertex.z = points[kk + 2]; - vertices.push_back( vertex ); - } - - if( GetMaster()->IsOpenGlAllowed() ) - { - GetMaster()->ObjectCoordsTo3DUnits( vertices ); - TransfertToGLlist( vertices, vrmlunits_to_3Dunits ); - } - - vertices.clear(); - coordIndex.clear(); - } - else - { - coordIndex.push_back( jj ); - } - - text = strtok( NULL, " ,\t\n\r" ); - } - - if( text && (*text == ']') ) - break; - } - } - else - { - wxLogError( wxT( "3D geometry read error <%s> at line %d." ), - GetChars( FROM_UTF8( text ) ), *LineNum ); - err = 1; - break; - } - } - - return err; + DBG( printf( "Unknown VRML file format: %s\n", line ) ); } diff --git a/3d-viewer/x3dmodelparser.cpp b/3d-viewer/x3dmodelparser.cpp index e4f7d283b2..8d87e39c0b 100644 --- a/3d-viewer/x3dmodelparser.cpp +++ b/3d-viewer/x3dmodelparser.cpp @@ -66,6 +66,28 @@ void X3D_MODEL_PARSER::Load( const wxString aFilename ) return; } + glShadeModel(GL_SMOOTH); + glEnable(GL_NORMALIZE); + + glm::vec3 matScale(GetMaster()->m_MatScale.x, GetMaster()->m_MatScale.y, GetMaster()->m_MatScale.z ); + glm::vec3 matRot(GetMaster()->m_MatRotation.x, GetMaster()->m_MatRotation.y, GetMaster()->m_MatRotation.z ); + glm::vec3 matPos(GetMaster()->m_MatPosition.x, GetMaster()->m_MatPosition.y, GetMaster()->m_MatPosition.z ); + + + //glPushMatrix(); + glTranslatef( matPos.x, matPos.y, matPos.z); + + glRotatef( matRot.z, 0.0f, 0.0f, 1.0f); + glRotatef( matRot.y, 0.0f, 1.0f, 0.0f); + glRotatef( matRot.x, 1.0f, 0.0f, 0.0f); + + glScalef( matScale.x, matScale.y, matScale.z ); + + // Switch the locale to standard C (needed to print floating point numbers) + LOCALE_IO toggle; + + childs.clear(); + // Shapes are inside of Transform nodes // Transform node contains information about // transition, scale and rotation of the shape @@ -76,12 +98,25 @@ void X3D_MODEL_PARSER::Load( const wxString aFilename ) node_it != transforms.end(); node_it++ ) { + m_model = new S3D_MESH(); + childs.push_back( m_model ); + readTransform( *node_it ); } + + //DBG( printf( "chils size:%lu\n", childs.size() ) ); + + if( GetMaster()->IsOpenGlAllowed() ) + { + for( unsigned int idx = 0; idx < childs.size(); idx++ ) + { + childs[idx]->openGL_RenderAllChilds(); + } + } } -wxString X3D_MODEL_PARSER::VRML_representation() +wxString X3D_MODEL_PARSER::VRML2_representation() { wxString output; @@ -188,6 +223,8 @@ void X3D_MODEL_PARSER::readTransform( wxXmlNode* aTransformNode ) void X3D_MODEL_PARSER::readMaterial( wxXmlNode* aMatNode ) { + glm::vec3 color; + PROPERTY_MAP properties; GetNodeProperties( aMatNode, properties ); @@ -199,22 +236,33 @@ void X3D_MODEL_PARSER::readMaterial( wxXmlNode* aMatNode ) S3D_MATERIAL* material = new S3D_MATERIAL( GetMaster(), properties[ wxT( "DEF" ) ] ); GetMaster()->Insert( material ); + m_model->m_Materials = material; + if( !parseDoubleTriplet( properties[ wxT( "diffuseColor" ) ], - material->m_DiffuseColor ) ) + color ) ) { DBG( printf("diffuseColor parsing error") ); + } else + { + // Do not use this diffuse color } if( !parseDoubleTriplet( properties[ wxT( "specularColor" ) ], - material->m_SpecularColor ) ) + color ) ) { DBG( printf("specularColor parsing error") ); + } else + { + m_model->m_Materials->m_SpecularColor.push_back( color ); } if( !parseDoubleTriplet( properties[ wxT( "emissiveColor" ) ], - material->m_EmissiveColor ) ) + color ) ) { DBG( printf("emissiveColor parsing error") ); + } else + { + m_model->m_Materials->m_EmissiveColor.push_back( color ); } wxStringTokenizer values; @@ -222,7 +270,7 @@ void X3D_MODEL_PARSER::readMaterial( wxXmlNode* aMatNode ) if( values.GetNextToken().ToDouble( &amb ) ) { - material->m_AmbientIntensity = amb; + m_model->m_Materials->m_AmbientColor.push_back( glm::vec3( amb, amb, amb ) ); } else { @@ -233,7 +281,9 @@ void X3D_MODEL_PARSER::readMaterial( wxXmlNode* aMatNode ) if( values.GetNextToken().ToDouble( &shine ) ) { - material->m_Shininess = shine; + // VRML value is normalized and openGL expects a value 0 - 128 + shine = shine * 128.0f; + m_model->m_Materials->m_Shininess.push_back( shine ); } else { @@ -244,15 +294,13 @@ void X3D_MODEL_PARSER::readMaterial( wxXmlNode* aMatNode ) if( values.GetNextToken().ToDouble( &transp ) ) { - material->m_Transparency = transp; + m_model->m_Materials->m_Transparency.push_back( transp ); } else { DBG( printf( "trans error") ); } - material->SetMaterial(); - // VRML wxString vrml_material; PROPERTY_MAP::const_iterator p = ++properties.begin(); // skip DEF @@ -278,32 +326,33 @@ void X3D_MODEL_PARSER::readMaterial( wxXmlNode* aMatNode ) wxString vrml_material; vrml_material.Append( wxString::Format( wxT( "specularColor %f %f %f\n" ), - material->m_SpecularColor.x, - material->m_SpecularColor.y, - material->m_SpecularColor.z ) ); - + material->m_SpecularColor[0].x, + material->m_SpecularColor[0].y, + material->m_SpecularColor[0].z ) ); +/* vrml_material.Append( wxString::Format( wxT( "diffuseColor %f %f %f\n" ), - material->m_DiffuseColor.x, - material->m_DiffuseColor.y, - material->m_DiffuseColor.z ) ); - + material->m_DiffuseColor[0].x, + material->m_DiffuseColor[0].y, + material->m_DiffuseColor[0].z ) ); +*/ vrml_material.Append( wxString::Format( wxT( "emissiveColor %f %f %f\n" ), - material->m_EmissiveColor.x, - material->m_EmissiveColor.y, - material->m_EmissiveColor.z ) ); + material->m_EmissiveColor[0].x, + material->m_EmissiveColor[0].y, + material->m_EmissiveColor[0].z ) ); vrml_material.Append( wxString::Format( wxT( "ambientIntensity %f\n"), - material->m_AmbientIntensity ) ); + material->m_AmbientColor[0].x ) ); vrml_material.Append( wxString::Format( wxT( "shininess %f\n"), - material->m_Shininess ) ); + material->m_Shininess[0] ) ); vrml_material.Append( wxString::Format( wxT( "transparency %f\n"), - material->m_Transparency ) ); + material->m_Transparency[0] ) ); vrml_materials.push_back( vrml_material ); - material->SetMaterial(); + m_model->m_Materials = material; + return; } } @@ -318,9 +367,17 @@ bool X3D_MODEL_PARSER::parseDoubleTriplet( const wxString& aData, { wxStringTokenizer tokens(aData); - return tokens.GetNextToken().ToDouble( &aResult.x ) && - tokens.GetNextToken().ToDouble( &aResult.y ) && - tokens.GetNextToken().ToDouble( &aResult.z ); + double x,y,z; + + bool ret = tokens.GetNextToken().ToDouble( &x ) && + tokens.GetNextToken().ToDouble( &y ) && + tokens.GetNextToken().ToDouble( &z ); + + aResult.x = x; + aResult.y = y; + aResult.z = z; + + return ret; } @@ -373,16 +430,20 @@ void X3D_MODEL_PARSER::readIndexedFaceSet( wxXmlNode* aFaceNode, double angle = 0.0; wxStringTokenizer tokens(aTransformProps[ wxT( "rotation" ) ]); - if( !(tokens.GetNextToken().ToDouble( &rotation.x ) && - tokens.GetNextToken().ToDouble( &rotation.y ) && - tokens.GetNextToken().ToDouble( &rotation.z ) && + double x,y,z; + if( !(tokens.GetNextToken().ToDouble( &x ) && + tokens.GetNextToken().ToDouble( &y ) && + tokens.GetNextToken().ToDouble( &z ) && tokens.GetNextToken().ToDouble( &angle ) ) ) { DBG( printf("rotation read error") ); } - - double vrmlunits_to_3Dunits = g_Parm_3D_Visu.m_BiuTo3Dunits * - UNITS3D_TO_UNITSPCB; + else + { + rotation.x = x; + rotation.y = y; + rotation.z = z; + } /* Step 2: Read all coordinate points * ---------------------------- */ @@ -439,7 +500,12 @@ void X3D_MODEL_PARSER::readIndexedFaceSet( wxXmlNode* aFaceNode, point.y += translation.y; point.z += translation.z; - triplets.push_back(point); + //triplets.push_back(point); + + double vrmlunits_to_3Dunits = g_Parm_3D_Visu.m_BiuTo3Dunits * UNITS3D_TO_UNITSPCB; + point *= vrmlunits_to_3Dunits; + + m_model->m_Point.push_back( point ); // VRML vrml_pointlist.Append( wxString::Format( wxT( "%f %f %f\n" ), point.x, point.y, point.z ) ); @@ -447,18 +513,66 @@ void X3D_MODEL_PARSER::readIndexedFaceSet( wxXmlNode* aFaceNode, vrml_points.push_back( vrml_pointlist ); + + /* Step 3: Read all color points + * ---------------------------- */ + std::vector< double > color_points; + NODE_LIST color; + GetChildsByName( aFaceNode, wxT( "Color" ), color); + + PROPERTY_MAP color_properties; + // IndexedFaceSet has one Coordinate child node + GetNodeProperties( color[0], color_properties ); + + // Save points to vector as doubles + wxStringTokenizer colorpoint_tokens( color_properties[ wxT("color") ] ); + double color_point = 0.0; + + while( colorpoint_tokens.HasMoreTokens() ) + { + if( colorpoint_tokens.GetNextToken().ToDouble( &color_point ) ) + { + color_points.push_back( color_point ); + } + else + { + wxLogError( wxT( "Error converting to double" ) ); + } + } + + if( color_points.size() % 3 != 0 ) + { + DBG( printf( "Number of points is incorrect" ) ); + return; + } + + /* Create 3D face color from 3 color points + */ + for( unsigned id = 0; id < color_points.size() / 3; id++ ) + { + m_model->m_MaterialIndex.push_back( id ); + + int color_triplet_indx = id * 3; + glm::vec3 colorface( color_points[ color_triplet_indx + 0 ], + color_points[ color_triplet_indx + 1 ], + color_points[ color_triplet_indx + 2 ] ); + + m_model->m_Materials->m_DiffuseColor.push_back( colorface ); + } + + /* -- Read coordinate indexes -- */ PROPERTY_MAP faceset_properties; GetNodeProperties( aFaceNode, faceset_properties ); - std::vector< S3D_VERTEX > vertices; - std::vector< int > coordIndex; - wxString coordIndex_str = faceset_properties[ wxT( "coordIndex" ) ]; wxStringTokenizer index_tokens( coordIndex_str ); wxString vrml_coord_indx_list; + std::vector coord_list; + coord_list.clear(); + while( index_tokens.HasMoreTokens() ) { long index = 0; @@ -470,28 +584,14 @@ void X3D_MODEL_PARSER::readIndexedFaceSet( wxXmlNode* aFaceNode, { /* Step 4: Apply geometry to Master object * --------------------------------------- */ - std::vector::const_iterator id; + m_model->m_CoordIndex.push_back( coord_list ); - for( id = coordIndex.begin(); - id != coordIndex.end(); - id++ ) - { - vertices.push_back( triplets.at( *id ) ); - } - - if( GetMaster()->IsOpenGlAllowed() ) - { - GetMaster()->ObjectCoordsTo3DUnits( vertices ); - TransfertToGLlist( vertices, vrmlunits_to_3Dunits ); - } - - vertices.clear(); - coordIndex.clear(); + coord_list.clear(); vrml_coord_indx_list.Append( wxT( "-1\n" ) ); } else { - coordIndex.push_back( index ); + coord_list.push_back( index ); vrml_coord_indx_list.Append( wxString::Format( wxT( "%u " ), index ) ); } } diff --git a/pcbnew/block_module_editor.cpp b/pcbnew/block_module_editor.cpp index abba8d6d01..cd2b295435 100644 --- a/pcbnew/block_module_editor.cpp +++ b/pcbnew/block_module_editor.cpp @@ -144,6 +144,7 @@ bool FOOTPRINT_EDIT_FRAME::HandleBlockEnd( wxDC* DC ) break; case BLOCK_DRAG: // Drag + case BLOCK_DRAG_ITEM: // Drag a given item (not used here) case BLOCK_MOVE: // Move case BLOCK_COPY: // Copy itemsCount = MarkItemsInBloc( currentModule, GetScreen()->m_BlockLocate ); diff --git a/pcbnew/class_module.h b/pcbnew/class_module.h index b1309d758d..ddae865bd4 100644 --- a/pcbnew/class_module.h +++ b/pcbnew/class_module.h @@ -281,11 +281,13 @@ public: * @param glcanvas = the openGL canvas * @param aAllowNonTransparentObjects = true to load non transparent objects * @param aAllowTransparentObjects = true to load non transparent objects + * @param aSideToLoad = false will load not fliped, true will load fliped objects * in openGL, transparent objects should be drawn *after* non transparent objects */ void ReadAndInsert3DComponentShape( EDA_3D_CANVAS* glcanvas, bool aAllowNonTransparentObjects, - bool aAllowTransparentObjects ); + bool aAllowTransparentObjects, + bool aSideToLoad ); /** * function TransformPadsShapesWithClearanceToPolygon diff --git a/pcbnew/exporters/export_vrml.cpp b/pcbnew/exporters/export_vrml.cpp index 94413fe66e..5ed34e30ec 100644 --- a/pcbnew/exporters/export_vrml.cpp +++ b/pcbnew/exporters/export_vrml.cpp @@ -1325,7 +1325,7 @@ static void export_vrml_module( MODEL_VRML& aModel, BOARD* aPcb, MODULE* aModule try { aOutputFile << " children [\n "; - aOutputFile << TO_UTF8( parser->VRML_representation() ) << " ]\n"; + aOutputFile << TO_UTF8( parser->VRML2_representation() ) << " ]\n"; aOutputFile << " }\n"; } catch( const std::exception& e ) diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index e92c20454c..ceca0ddb4d 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -1936,7 +1936,7 @@ void LEGACY_PLUGIN::load3D( MODULE* aModule ) else if( TESTLINE( "Sc" ) ) // Scale { - sscanf( line + SZ( "Sc" ), "%lf %lf %lf\n", + sscanf( line + SZ( "Sc" ), "%f %f %f\n", &t3D->m_MatScale.x, &t3D->m_MatScale.y, &t3D->m_MatScale.z ); @@ -1944,7 +1944,7 @@ void LEGACY_PLUGIN::load3D( MODULE* aModule ) else if( TESTLINE( "Of" ) ) // Offset { - sscanf( line + SZ( "Of" ), "%lf %lf %lf\n", + sscanf( line + SZ( "Of" ), "%f %f %f\n", &t3D->m_MatPosition.x, &t3D->m_MatPosition.y, &t3D->m_MatPosition.z ); @@ -1952,7 +1952,7 @@ void LEGACY_PLUGIN::load3D( MODULE* aModule ) else if( TESTLINE( "Ro" ) ) // Rotation { - sscanf( line + SZ( "Ro" ), "%lf %lf %lf\n", + sscanf( line + SZ( "Ro" ), "%f %f %f\n", &t3D->m_MatRotation.x, &t3D->m_MatRotation.y, &t3D->m_MatRotation.z ); From 01a8442b35dd82da366f640bfd140f8a20102b98 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 30 Jul 2014 17:39:55 +0200 Subject: [PATCH 734/741] 3d viewer: minor code cleaning (remove useless #include ) dialog_track_via_size: set minimal size and make dialog resizable. Update demo file. --- 3d-viewer/3d_canvas.cpp | 2 +- 3d-viewer/3d_canvas.h | 12 +- 3d-viewer/3d_class.cpp | 1 + 3d-viewer/3d_draw.cpp | 10 +- 3d-viewer/3d_frame.cpp | 4 +- 3d-viewer/3d_viewer.h | 16 +- .../in_out_conn.sch | 152 +- .../kit-dev-coldfire-xilinx_5213.cmp | 708 +- .../kit-dev-coldfire-xilinx_5213.kicad_pcb | 23923 +++++++--------- .../kit-dev-coldfire-xilinx_5213.net | 971 +- .../kit-dev-coldfire-xilinx_5213.sch | 136 +- demos/kit-dev-coldfire-xilinx_5213/xilinx.sch | 42 +- pcbnew/dialogs/dialog_track_via_size.cpp | 1 + pcbnew/dialogs/dialog_track_via_size_base.cpp | 4 +- pcbnew/dialogs/dialog_track_via_size_base.fbp | 14 +- pcbnew/dialogs/dialog_track_via_size_base.h | 6 +- 16 files changed, 12048 insertions(+), 13954 deletions(-) diff --git a/3d-viewer/3d_canvas.cpp b/3d-viewer/3d_canvas.cpp index 807af4e6d4..17913c4ed3 100644 --- a/3d-viewer/3d_canvas.cpp +++ b/3d-viewer/3d_canvas.cpp @@ -105,7 +105,7 @@ EDA_3D_CANVAS::~EDA_3D_CANVAS() } -void EDA_3D_CANVAS::ClearLists( GLuint aGlList ) +void EDA_3D_CANVAS::ClearLists( int aGlList ) { if( aGlList ) { diff --git a/3d-viewer/3d_canvas.h b/3d-viewer/3d_canvas.h index 6831cc8a04..09a5c05dcd 100644 --- a/3d-viewer/3d_canvas.h +++ b/3d-viewer/3d_canvas.h @@ -43,8 +43,7 @@ #endif #include <3d_struct.h> -#include - + class BOARD_DESIGN_SETTINGS; class EDA_3D_FRAME; @@ -91,8 +90,9 @@ private: GLuint m_text_fake_shadow_back; GLuint m_text_fake_shadow_board; - void Create_and_Render_Shadow_Buffer( GLuint *aDst_gl_texture, GLuint aTexture_size, bool aDraw_body, int aBlurPasses ); - + void Create_and_Render_Shadow_Buffer( GLuint *aDst_gl_texture, + GLuint aTexture_size, bool aDraw_body, int aBlurPasses ); + public: EDA_3D_CANVAS( EDA_3D_FRAME* parent, int* attribList = 0 ); ~EDA_3D_CANVAS(); @@ -107,7 +107,7 @@ public: * @param aGlList = the list to clear. * if 0 (default) all lists are cleared */ - void ClearLists( GLuint aGlList = 0 ); + void ClearLists( int aGlList = 0 ); // Event functions: void OnPaint( wxPaintEvent& event ); @@ -154,7 +154,7 @@ public: /** * Function BuildTechLayers3DView * Called by CreateDrawGL_List() - * Populates the OpenGL GL_ID_BOARD draw list with items on tech layers + * Populates the OpenGL GL_ID_TECH_LAYERS draw list with items on tech layers */ void BuildTechLayers3DView(); diff --git a/3d-viewer/3d_class.cpp b/3d-viewer/3d_class.cpp index 3aae8e8c17..3b0288c674 100644 --- a/3d-viewer/3d_class.cpp +++ b/3d-viewer/3d_class.cpp @@ -29,6 +29,7 @@ #include #include <3d_viewer.h> +#include <3d_struct.h> bool S3D_MASTER::IsOpenGlAllowed() diff --git a/3d-viewer/3d_draw.cpp b/3d-viewer/3d_draw.cpp index 277218bdd4..a4dd5e5c98 100644 --- a/3d-viewer/3d_draw.cpp +++ b/3d-viewer/3d_draw.cpp @@ -253,7 +253,8 @@ void EDA_3D_CANVAS::Create_and_Render_Shadow_Buffer( GLuint *aDst_gl_texture, glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR ); - glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, aTexture_size, aTexture_size, 0, GL_RGBA, GL_UNSIGNED_BYTE, depthbufferRGBA ); + glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, aTexture_size, aTexture_size, 0, + GL_RGBA, GL_UNSIGNED_BYTE, depthbufferRGBA ); glFlush(); glFinish(); @@ -364,7 +365,8 @@ void EDA_3D_CANVAS::Redraw() InitGL(); - if( g_Parm_3D_Visu.GetFlag( FL_MODULE ) && g_Parm_3D_Visu.IsRealisticMode() && g_Parm_3D_Visu.HightQualityMode() ) + if( g_Parm_3D_Visu.GetFlag( FL_MODULE ) && g_Parm_3D_Visu.IsRealisticMode() && + g_Parm_3D_Visu.HightQualityMode() ) { GenerateFakeShadowsTextures (); } @@ -926,8 +928,8 @@ void EDA_3D_CANVAS::BuildBoard3DView(GLuint aBoardList, GLuint aBodyOnlyList) // Merge polygons, remove holes currLayerPolyset -= polysetHoles; - int thickness = g_Parm_3D_Visu.GetLayerObjectThicknessBIU( layer ); - int zpos = g_Parm_3D_Visu.GetLayerZcoordBIU( layer ); + int thickness = g_Parm_3D_Visu.GetLayerObjectThicknessBIU( layer ); + int zpos = g_Parm_3D_Visu.GetLayerZcoordBIU( layer ); if( realistic_mode ) { diff --git a/3d-viewer/3d_frame.cpp b/3d-viewer/3d_frame.cpp index c3c487ed3a..6b570c75fd 100644 --- a/3d-viewer/3d_frame.cpp +++ b/3d-viewer/3d_frame.cpp @@ -411,7 +411,7 @@ void EDA_3D_FRAME::Process_Special_Functions( wxCommandEvent& event ) case ID_MENU3D_SOLDER_MASK_ONOFF: g_Parm_3D_Visu.SetFlag( FL_SOLDERMASK, isChecked ); - NewDisplay(GL_ID_TECH_LAYERS); + NewDisplay(GL_ID_TECH_LAYERS); return; case ID_MENU3D_SOLDER_PASTE_ONOFF: @@ -486,7 +486,7 @@ void EDA_3D_FRAME::On3DGridSelection( wxCommandEvent& event ) } -void EDA_3D_FRAME::NewDisplay( GLuint aGlList ) +void EDA_3D_FRAME::NewDisplay( int aGlList ) { m_reloadRequest = false; diff --git a/3d-viewer/3d_viewer.h b/3d-viewer/3d_viewer.h index c0f950a67a..7778720576 100644 --- a/3d-viewer/3d_viewer.h +++ b/3d-viewer/3d_viewer.h @@ -37,20 +37,6 @@ #endif #include - -#ifdef __WXMAC__ -# ifdef __DARWIN__ -# include -# else -# include -# endif -#else -# include -#endif - - -#define KISYS3DMOD "KISYS3DMOD" - #include <3d_struct.h> #define KISYS3DMOD "KISYS3DMOD" @@ -103,7 +89,7 @@ public: * @param aGlList = the list to rebuild. * if 0 (default) all lists are rebuilt */ - void NewDisplay( GLuint aGlList = 0 ); + void NewDisplay( int aGlList = 0 ); void SetDefaultFileName(const wxString &aFn) { m_defaultFileName = aFn; } const wxString &GetDefaultFileName() const { return m_defaultFileName; } diff --git a/demos/kit-dev-coldfire-xilinx_5213/in_out_conn.sch b/demos/kit-dev-coldfire-xilinx_5213/in_out_conn.sch index 656f059324..c1427ab608 100644 --- a/demos/kit-dev-coldfire-xilinx_5213/in_out_conn.sch +++ b/demos/kit-dev-coldfire-xilinx_5213/in_out_conn.sch @@ -608,7 +608,7 @@ U 1 1 46603376 P 10650 6950 F 0 "VR1" H 10900 7400 60 0000 C CNN F 1 "LT1129_QPACK" H 11150 6455 60 0000 C CNN -F 2 "" H 10650 6950 60 0001 C CNN +F 2 "lib_smd:DPAK5" H 10650 6950 60 0001 C CNN F 3 "" H 10650 6950 60 0001 C CNN 1 10650 6950 1 0 0 -1 @@ -630,7 +630,7 @@ U 1 1 46546CA6 P 7450 1500 F 0 "C26" H 7500 1600 50 0000 L CNN F 1 "100nF" H 7500 1400 50 0000 L CNN -F 2 "" H 7450 1500 60 0001 C CNN +F 2 "lib_smd:SM0805" H 7450 1500 60 0001 C CNN F 3 "" H 7450 1500 60 0001 C CNN 1 7450 1500 1 0 0 -1 @@ -678,7 +678,7 @@ U 1 1 4654018B P 14250 9400 F 0 "RCAN1" V 14330 9400 50 0000 C CNN F 1 "R" V 14250 9400 50 0000 C CNN -F 2 "" H 14250 9400 60 0001 C CNN +F 2 "lib_smd:SM0805" H 14250 9400 60 0001 C CNN F 3 "" H 14250 9400 60 0001 C CNN 1 14250 9400 0 1 1 0 @@ -689,7 +689,7 @@ U 1 1 46540184 P 13150 9400 F 0 "RCAN2" V 13230 9400 50 0000 C CNN F 1 "R" V 13150 9400 50 0000 C CNN -F 2 "" H 13150 9400 60 0001 C CNN +F 2 "lib_smd:SM0805" H 13150 9400 60 0001 C CNN F 3 "" H 13150 9400 60 0001 C CNN 1 13150 9400 0 1 1 0 @@ -700,7 +700,7 @@ U 1 1 46540164 P 13750 9150 F 0 "R38" V 13830 9150 50 0000 C CNN F 1 "62" V 13750 9150 50 0000 C CNN -F 2 "" H 13750 9150 60 0001 C CNN +F 2 "lib_smd:SM0805" H 13750 9150 60 0001 C CNN F 3 "" H 13750 9150 60 0001 C CNN 1 13750 9150 0 1 1 0 @@ -711,7 +711,7 @@ U 1 1 46540159 P 13200 9150 F 0 "CAN_TERM1" H 13200 9300 60 0000 C CNN F 1 "JUMPER" H 13200 9070 40 0000 C CNN -F 2 "" H 13200 9150 60 0001 C CNN +F 2 "pin_array:PIN_ARRAY_2X1" H 13200 9150 60 0001 C CNN F 3 "" H 13200 9150 60 0001 C CNN 1 13200 9150 1 0 0 -1 @@ -730,7 +730,7 @@ U 1 1 4654007F P 10250 9200 F 0 "RS1" H 10330 9200 40 0000 C CNN F 1 "CONN_1" H 10200 9240 30 0001 C CNN -F 2 "" H 10250 9200 60 0001 C CNN +F 2 "connect:PINTST" H 10250 9200 60 0001 C CNN F 3 "" H 10250 9200 60 0001 C CNN 1 10250 9200 -1 0 0 1 @@ -752,7 +752,7 @@ U 1 1 46540063 P 10400 9600 F 0 "R36" V 10480 9600 50 0000 C CNN F 1 "1K" V 10400 9600 50 0000 C CNN -F 2 "" H 10400 9600 60 0001 C CNN +F 2 "lib_smd:SM0805" H 10400 9600 60 0001 C CNN F 3 "" H 10400 9600 60 0001 C CNN 1 10400 9600 1 0 0 -1 @@ -763,7 +763,7 @@ U 1 1 4654003D P 12150 8900 F 0 "VREF1" H 12230 8900 40 0000 C CNN F 1 "CONN_1" H 12100 8940 30 0001 C CNN -F 2 "" H 12150 8900 60 0001 C CNN +F 2 "connect:PINTST" H 12150 8900 60 0001 C CNN F 3 "" H 12150 8900 60 0001 C CNN 1 12150 8900 1 0 0 -1 @@ -785,7 +785,7 @@ U 1 1 4653FFFE P 10650 8750 F 0 "C34" V 10700 8900 50 0000 L CNN F 1 "100nF" V 10500 8750 50 0000 L CNN -F 2 "" H 10650 8750 60 0001 C CNN +F 2 "lib_smd:SM0805" H 10650 8750 60 0001 C CNN F 3 "" H 10650 8750 60 0001 C CNN 1 10650 8750 0 1 1 0 @@ -822,7 +822,7 @@ U 1 1 4653FF97 P 11400 9200 F 0 "U7" H 11550 9650 60 0000 C CNN F 1 "PCA82C251" H 11700 8850 60 0000 C CNN -F 2 "" H 11400 9200 60 0001 C CNN +F 2 "lib_smd:SO8E" H 11400 9200 60 0001 C CNN F 3 "" H 11400 9200 60 0001 C CNN 1 11400 9200 1 0 0 -1 @@ -844,7 +844,7 @@ U 1 1 46530806 P 7400 7300 F 0 "TB1" V 7350 7300 40 0000 C CNN F 1 "CONN_2" V 7450 7300 40 0000 C CNN -F 2 "" H 7400 7300 60 0001 C CNN +F 2 "connect:bornier2" H 7400 7300 60 0001 C CNN F 3 "" H 7400 7300 60 0001 C CNN 1 7400 7300 -1 0 0 -1 @@ -866,7 +866,7 @@ U 1 1 465307C6 P 7450 6500 F 0 "J1" H 7100 6300 60 0000 C CNN F 1 "JACK_2P" H 7300 6750 60 0000 C CNN -F 2 "" H 7450 6500 60 0001 C CNN +F 2 "connect:JACK_ALIM" H 7450 6500 60 0001 C CNN F 3 "" H 7450 6500 60 0001 C CNN 1 7450 6500 1 0 0 -1 @@ -878,7 +878,7 @@ U 1 1 46530763 P 8650 6300 F 0 "SW_ONOFF1" H 8450 6450 50 0000 C CNN F 1 "SWITCH_INV" H 8500 6150 50 0000 C CNN -F 2 "" H 8650 6300 60 0001 C CNN +F 2 "discret:SW_SPDT" H 8650 6300 60 0001 C CNN F 3 "" H 8650 6300 60 0001 C CNN 1 8650 6300 -1 0 0 1 @@ -889,7 +889,7 @@ U 1 1 46530747 P 9400 6300 F 0 "F1" H 9500 6350 40 0000 C CNN F 1 "FUSE" H 9300 6250 40 0000 C CNN -F 2 "" H 9400 6300 60 0001 C CNN +F 2 "lib_smd:FSUPCMS" H 9400 6300 60 0001 C CNN F 3 "" H 9400 6300 60 0001 C CNN 1 9400 6300 1 0 0 -1 @@ -911,7 +911,7 @@ U 1 1 465306F6 P 9250 6900 F 0 "C41" H 9300 7000 50 0000 L CNN F 1 "100nF" H 9300 6800 50 0000 L CNN -F 2 "" H 9250 6900 60 0001 C CNN +F 2 "lib_smd:SM0805" H 9250 6900 60 0001 C CNN F 3 "" H 9250 6900 60 0001 C CNN 1 9250 6900 1 0 0 -1 @@ -933,7 +933,7 @@ U 1 1 465306C8 P 8500 6900 F 0 "D7" H 8500 7000 40 0000 C CNN F 1 "1N4004" H 8500 6800 40 0000 C CNN -F 2 "" H 8500 6900 60 0001 C CNN +F 2 "discret:D5" H 8500 6900 60 0001 C CNN F 3 "" H 8500 6900 60 0001 C CNN 1 8500 6900 0 -1 -1 0 @@ -955,7 +955,7 @@ U 1 1 465306B1 P 8850 6900 F 0 "C38" H 8900 7000 50 0000 L CNN F 1 "10uF" H 8900 6800 50 0000 L CNN -F 2 "" H 8850 6900 60 0001 C CNN +F 2 "discret:C2V8" H 8850 6900 60 0001 C CNN F 3 "" H 8850 6900 60 0001 C CNN 1 8850 6900 1 0 0 -1 @@ -988,7 +988,7 @@ U 1 1 46530639 P 12450 6650 F 0 "LED5" H 12450 6750 50 0000 C CNN F 1 "LED" H 12450 6550 50 0000 C CNN -F 2 "" H 12450 6650 60 0001 C CNN +F 2 "lib_smd:SM1206POL" H 12450 6650 60 0001 C CNN F 3 "" H 12450 6650 60 0001 C CNN 1 12450 6650 1 0 0 -1 @@ -999,7 +999,7 @@ U 1 1 46530638 P 12000 6650 F 0 "R53" V 12080 6650 50 0000 C CNN F 1 "270" V 12000 6650 50 0000 C CNN -F 2 "" H 12000 6650 60 0001 C CNN +F 2 "lib_smd:SM0805" H 12000 6650 60 0001 C CNN F 3 "" H 12000 6650 60 0001 C CNN 1 12000 6650 0 1 1 0 @@ -1021,7 +1021,7 @@ U 1 1 465305FE P 11600 6950 F 0 "C40" H 11650 7050 50 0000 L CNN F 1 "220uF" H 11650 6850 50 0000 L CNN -F 2 "" H 11600 6950 60 0001 C CNN +F 2 "discret:C2V8" H 11600 6950 60 0001 C CNN F 3 "" H 11600 6950 60 0001 C CNN 1 11600 6950 1 0 0 -1 @@ -1058,7 +1058,7 @@ U 1 1 4652DDE7 P 7800 5450 F 0 "SW2" H 7950 5560 50 0000 C CNN F 1 "SW_PUSH" H 7800 5370 50 0000 C CNN -F 2 "" H 7800 5450 60 0001 C CNN +F 2 "discret:SW_PUSH_SMALL" H 7800 5450 60 0001 C CNN F 3 "" H 7800 5450 60 0001 C CNN 1 7800 5450 1 0 0 -1 @@ -1069,7 +1069,7 @@ U 1 1 4652DDDF P 7800 5050 F 0 "SW1" H 7950 5160 50 0000 C CNN F 1 "SW_PUSH" H 7800 4970 50 0000 C CNN -F 2 "" H 7800 5050 60 0001 C CNN +F 2 "discret:SW_PUSH_SMALL" H 7800 5050 60 0001 C CNN F 3 "" H 7800 5050 60 0001 C CNN 1 7800 5050 1 0 0 -1 @@ -1084,7 +1084,7 @@ U 1 1 4652BFF1 P 11400 10100 F 0 "CAN_EN1" H 11400 10250 50 0000 C CNN F 1 "CONN_2X2" H 11410 9970 40 0000 C CNN -F 2 "" H 11400 10100 60 0001 C CNN +F 2 "pin_array:PIN_ARRAY_2X2" H 11400 10100 60 0001 C CNN F 3 "" H 11400 10100 60 0001 C CNN 1 11400 10100 -1 0 0 -1 @@ -1147,7 +1147,7 @@ U 1 1 4652BF65 P 9700 9250 F 0 "R47" V 9780 9250 50 0000 C CNN F 1 "4,7K" V 9700 9250 50 0000 C CNN -F 2 "" H 9700 9250 60 0001 C CNN +F 2 "lib_smd:SM0805" H 9700 9250 60 0001 C CNN F 3 "" H 9700 9250 60 0001 C CNN 1 9700 9250 1 0 0 -1 @@ -1158,7 +1158,7 @@ U 1 1 4652BF62 P 9500 9250 F 0 "R48" V 9580 9250 50 0000 C CNN F 1 "4,7K" V 9500 9250 50 0000 C CNN -F 2 "" H 9500 9250 60 0001 C CNN +F 2 "lib_smd:SM0805" H 9500 9250 60 0001 C CNN F 3 "" H 9500 9250 60 0001 C CNN 1 9500 9250 1 0 0 -1 @@ -1169,7 +1169,7 @@ U 1 1 4652BF5C P 9300 9250 F 0 "R49" V 9380 9250 50 0000 C CNN F 1 "4,7K" V 9300 9250 50 0000 C CNN -F 2 "" H 9300 9250 60 0001 C CNN +F 2 "lib_smd:SM0805" H 9300 9250 60 0001 C CNN F 3 "" H 9300 9250 60 0001 C CNN 1 9300 9250 1 0 0 -1 @@ -1180,7 +1180,7 @@ U 1 1 4652BF48 P 9100 9250 F 0 "R50" V 9180 9250 50 0000 C CNN F 1 "4,7K" V 9100 9250 50 0000 C CNN -F 2 "" H 9100 9250 60 0001 C CNN +F 2 "lib_smd:SM0805" H 9100 9250 60 0001 C CNN F 3 "" H 9100 9250 60 0001 C CNN 1 9100 9250 1 0 0 -1 @@ -1191,7 +1191,7 @@ U 1 1 4652BF26 P 8500 9700 F 0 "PULUPEN1" H 8500 9950 50 0000 C CNN F 1 "CONN_4X2" V 8500 9700 40 0000 C CNN -F 2 "" H 8500 9700 60 0001 C CNN +F 2 "pin_array:pin_array_4x2" H 8500 9700 60 0001 C CNN F 3 "" H 8500 9700 60 0001 C CNN 1 8500 9700 1 0 0 -1 @@ -1248,7 +1248,7 @@ U 1 1 4652BADD P 2050 8650 F 0 "COM_SEL1" V 2200 8650 50 0000 C CNN F 1 "CONN_3" V 2100 8650 40 0000 C CNN -F 2 "" H 2050 8650 60 0001 C CNN +F 2 "pin_array:PIN_ARRAY_3X1" H 2050 8650 60 0001 C CNN F 3 "" H 2050 8650 60 0001 C CNN 1 2050 8650 0 -1 -1 0 @@ -1259,7 +1259,7 @@ U 1 1 4652BAD4 P 2050 7800 F 0 "COM_SEL2" V 2200 7800 50 0000 C CNN F 1 "CONN_3" V 2100 7800 40 0000 C CNN -F 2 "" H 2050 7800 60 0001 C CNN +F 2 "pin_array:PIN_ARRAY_3X1" H 2050 7800 60 0001 C CNN F 3 "" H 2050 7800 60 0001 C CNN 1 2050 7800 0 -1 -1 0 @@ -1272,7 +1272,7 @@ U 1 1 4652BA65 P 2050 6700 F 0 "COM_SEL3" V 2200 6700 50 0000 C CNN F 1 "CONN_3" V 2100 6700 40 0000 C CNN -F 2 "" H 2050 6700 60 0001 C CNN +F 2 "pin_array:PIN_ARRAY_3X1" H 2050 6700 60 0001 C CNN F 3 "" H 2050 6700 60 0001 C CNN 1 2050 6700 0 -1 -1 0 @@ -1294,7 +1294,7 @@ U 1 1 4652B9D5 P 4200 3250 F 0 "R30" V 4280 3250 50 0000 C CNN F 1 "10K" V 4200 3250 50 0000 C CNN -F 2 "" H 4200 3250 60 0001 C CNN +F 2 "lib_smd:SM0805" H 4200 3250 60 0001 C CNN F 3 "" H 4200 3250 60 0001 C CNN 1 4200 3250 0 1 1 0 @@ -1316,7 +1316,7 @@ U 1 1 4652B9CC P 4250 5850 F 0 "R35" V 4330 5850 50 0000 C CNN F 1 "10K" V 4250 5850 50 0000 C CNN -F 2 "" H 4250 5850 60 0001 C CNN +F 2 "lib_smd:SM0805" H 4250 5850 60 0001 C CNN F 3 "" H 4250 5850 60 0001 C CNN 1 4250 5850 0 1 1 0 @@ -1338,7 +1338,7 @@ U 1 1 4652B5F4 P 5200 8550 F 0 "R23" V 5280 8550 50 0000 C CNN F 1 "10K" V 5200 8550 50 0000 C CNN -F 2 "" H 5200 8550 60 0001 C CNN +F 2 "lib_smd:SM0805" H 5200 8550 60 0001 C CNN F 3 "" H 5200 8550 60 0001 C CNN 1 5200 8550 0 1 1 0 @@ -1371,7 +1371,7 @@ U 1 1 4652B4DC P 3050 8550 F 0 "C45" H 3100 8650 50 0000 L CNN F 1 "100nF" H 3100 8450 50 0000 L CNN -F 2 "" H 3050 8550 60 0001 C CNN +F 2 "lib_smd:SM0805" H 3050 8550 60 0001 C CNN F 3 "" H 3050 8550 60 0001 C CNN 1 3050 8550 1 0 0 -1 @@ -1413,7 +1413,7 @@ U 1 1 4652B4D9 P 2800 6650 F 0 "C46" H 2850 6750 50 0000 L CNN F 1 "100nF" H 2850 6550 50 0000 L CNN -F 2 "" H 2800 6650 60 0001 C CNN +F 2 "lib_smd:SM0805" H 2800 6650 60 0001 C CNN F 3 "" H 2800 6650 60 0001 C CNN 1 2800 6650 0 1 1 0 @@ -1424,7 +1424,7 @@ U 1 1 4652B4D8 P 4900 7600 F 0 "C36" H 4950 7700 50 0000 L CNN F 1 "100nF" H 4950 7500 50 0000 L CNN -F 2 "" H 4900 7600 60 0001 C CNN +F 2 "lib_smd:SM0805" H 4900 7600 60 0001 C CNN F 3 "" H 4900 7600 60 0001 C CNN 1 4900 7600 1 0 0 -1 @@ -1435,7 +1435,7 @@ U 1 1 4652B4D7 P 4900 7100 F 0 "C44" H 4950 7200 50 0000 L CNN F 1 "100nF" H 4950 7000 50 0000 L CNN -F 2 "" H 4900 7100 60 0001 C CNN +F 2 "lib_smd:SM0805" H 4900 7100 60 0001 C CNN F 3 "" H 4900 7100 60 0001 C CNN 1 4900 7100 1 0 0 -1 @@ -1446,7 +1446,7 @@ U 1 1 4652B4D6 P 3000 7100 F 0 "C35" H 3050 7200 50 0000 L CNN F 1 "100nF" H 3050 7000 50 0000 L CNN -F 2 "" H 3000 7100 60 0001 C CNN +F 2 "lib_smd:SM0805" H 3000 7100 60 0001 C CNN F 3 "" H 3000 7100 60 0001 C CNN 1 3000 7100 1 0 0 -1 @@ -1465,7 +1465,7 @@ U 1 1 4652B4D5 P 5550 8150 F 0 "UART_EN2" H 5550 8400 50 0000 C CNN F 1 "CONN_4X2" V 5550 8150 40 0000 C CNN -F 2 "" H 5550 8150 60 0001 C CNN +F 2 "pin_array:pin_array_4x2" H 5550 8150 60 0001 C CNN F 3 "" H 5550 8150 60 0001 C CNN 1 5550 8150 1 0 0 -1 @@ -1476,7 +1476,7 @@ U 1 1 4652B4D4 P 900 7400 F 0 "UARTCAN2" H 900 7950 70 0000 C CNN F 1 "DB9" H 900 6850 70 0000 C CNN -F 2 "" H 900 7400 60 0001 C CNN +F 2 "connect:DB9FC" H 900 7400 60 0001 C CNN F 3 "" H 900 7400 60 0001 C CNN 1 900 7400 -1 0 0 1 @@ -1487,7 +1487,7 @@ U 1 1 4652B4D3 P 3950 7600 F 0 "U8" H 3950 8450 70 0000 C CNN F 1 "MAX202" H 3950 6750 70 0000 C CNN -F 2 "" H 3950 7600 60 0001 C CNN +F 2 "lib_smd:SO16E" H 3950 7600 60 0001 C CNN F 3 "" H 3950 7600 60 0001 C CNN 1 3950 7600 -1 0 0 -1 @@ -1520,7 +1520,7 @@ U 1 1 4652B4CA P 2100 5900 F 0 "C33" H 2150 6000 50 0000 L CNN F 1 "100nF" H 2150 5800 50 0000 L CNN -F 2 "" H 2100 5900 60 0001 C CNN +F 2 "lib_smd:SM0805" H 2100 5900 60 0001 C CNN F 3 "" H 2100 5900 60 0001 C CNN 1 2100 5900 1 0 0 -1 @@ -1562,7 +1562,7 @@ U 1 1 4652B4C7 P 1850 4000 F 0 "C28" H 1900 4100 50 0000 L CNN F 1 "100nF" H 1900 3900 50 0000 L CNN -F 2 "" H 1850 4000 60 0001 C CNN +F 2 "lib_smd:SM0805" H 1850 4000 60 0001 C CNN F 3 "" H 1850 4000 60 0001 C CNN 1 1850 4000 0 1 1 0 @@ -1573,7 +1573,7 @@ U 1 1 4652B4C6 P 3950 4950 F 0 "C32" H 4000 5050 50 0000 L CNN F 1 "100nF" H 4000 4850 50 0000 L CNN -F 2 "" H 3950 4950 60 0001 C CNN +F 2 "lib_smd:SM0805" H 3950 4950 60 0001 C CNN F 3 "" H 3950 4950 60 0001 C CNN 1 3950 4950 1 0 0 -1 @@ -1584,7 +1584,7 @@ U 1 1 4652B4C5 P 3950 4450 F 0 "C31" H 4000 4550 50 0000 L CNN F 1 "100nF" H 4000 4350 50 0000 L CNN -F 2 "" H 3950 4450 60 0001 C CNN +F 2 "lib_smd:SM0805" H 3950 4450 60 0001 C CNN F 3 "" H 3950 4450 60 0001 C CNN 1 3950 4450 1 0 0 -1 @@ -1595,7 +1595,7 @@ U 1 1 4652B4C4 P 2050 4450 F 0 "C30" H 2100 4550 50 0000 L CNN F 1 "100nF" H 2100 4350 50 0000 L CNN -F 2 "" H 2050 4450 60 0001 C CNN +F 2 "lib_smd:SM0805" H 2050 4450 60 0001 C CNN F 3 "" H 2050 4450 60 0001 C CNN 1 2050 4450 1 0 0 -1 @@ -1614,7 +1614,7 @@ U 1 1 4652B4C3 P 4600 5500 F 0 "UART_EN1" H 4600 5750 50 0000 C CNN F 1 "CONN_4X2" V 4600 5500 40 0000 C CNN -F 2 "" H 4600 5500 60 0001 C CNN +F 2 "pin_array:pin_array_4x2" H 4600 5500 60 0001 C CNN F 3 "" H 4600 5500 60 0001 C CNN 1 4600 5500 1 0 0 -1 @@ -1625,7 +1625,7 @@ U 1 1 4652B4C2 P 900 4750 F 0 "UARTCAN1" H 900 5300 70 0000 C CNN F 1 "DB9" H 900 4200 70 0000 C CNN -F 2 "" H 900 4750 60 0001 C CNN +F 2 "connect:DB9FC" H 900 4750 60 0001 C CNN F 3 "" H 900 4750 60 0001 C CNN 1 900 4750 -1 0 0 1 @@ -1636,7 +1636,7 @@ U 1 1 4652B4C1 P 3000 4950 F 0 "U5" H 3000 5800 70 0000 C CNN F 1 "MAX202" H 3000 4100 70 0000 C CNN -F 2 "" H 3000 4950 60 0001 C CNN +F 2 "lib_smd:SO16E" H 3000 4950 60 0001 C CNN F 3 "" H 3000 4950 60 0001 C CNN 1 3000 4950 -1 0 0 -1 @@ -1669,7 +1669,7 @@ U 1 1 4652B486 P 2050 3250 F 0 "C27" H 2100 3350 50 0000 L CNN F 1 "100nF" H 2100 3150 50 0000 L CNN -F 2 "" H 2050 3250 60 0001 C CNN +F 2 "lib_smd:SM0805" H 2050 3250 60 0001 C CNN F 3 "" H 2050 3250 60 0001 C CNN 1 2050 3250 1 0 0 -1 @@ -1711,7 +1711,7 @@ U 1 1 4652B365 P 1800 1350 F 0 "C22" H 1850 1450 50 0000 L CNN F 1 "100nF" H 1850 1250 50 0000 L CNN -F 2 "" H 1800 1350 60 0001 C CNN +F 2 "lib_smd:SM0805" H 1800 1350 60 0001 C CNN F 3 "" H 1800 1350 60 0001 C CNN 1 1800 1350 0 1 1 0 @@ -1722,7 +1722,7 @@ U 1 1 4652B35B P 3900 2300 F 0 "C25" H 3950 2400 50 0000 L CNN F 1 "100nF" H 3950 2200 50 0000 L CNN -F 2 "" H 3900 2300 60 0001 C CNN +F 2 "lib_smd:SM0805" H 3900 2300 60 0001 C CNN F 3 "" H 3900 2300 60 0001 C CNN 1 3900 2300 1 0 0 -1 @@ -1733,7 +1733,7 @@ U 1 1 4652B354 P 3900 1800 F 0 "C24" H 3950 1900 50 0000 L CNN F 1 "100nF" H 3950 1700 50 0000 L CNN -F 2 "" H 3900 1800 60 0001 C CNN +F 2 "lib_smd:SM0805" H 3900 1800 60 0001 C CNN F 3 "" H 3900 1800 60 0001 C CNN 1 3900 1800 1 0 0 -1 @@ -1744,7 +1744,7 @@ U 1 1 4652B33B P 2000 1800 F 0 "C23" H 2050 1900 50 0000 L CNN F 1 "100nF" H 2050 1700 50 0000 L CNN -F 2 "" H 2000 1800 60 0001 C CNN +F 2 "lib_smd:SM0805" H 2000 1800 60 0001 C CNN F 3 "" H 2000 1800 60 0001 C CNN 1 2000 1800 1 0 0 -1 @@ -1763,7 +1763,7 @@ U 1 1 4652B289 P 4550 2850 F 0 "UART_EN0" H 4550 3100 50 0000 C CNN F 1 "CONN_4X2" V 4550 2850 40 0000 C CNN -F 2 "" H 4550 2850 60 0001 C CNN +F 2 "pin_array:pin_array_4x2" H 4550 2850 60 0001 C CNN F 3 "" H 4550 2850 60 0001 C CNN 1 4550 2850 1 0 0 -1 @@ -1774,7 +1774,7 @@ U 1 1 4652B26D P 850 2100 F 0 "UARTCAN0" H 850 2650 70 0000 C CNN F 1 "DB9" H 850 1550 70 0000 C CNN -F 2 "" H 850 2100 60 0001 C CNN +F 2 "connect:DB9FC" H 850 2100 60 0001 C CNN F 3 "" H 850 2100 60 0001 C CNN 1 850 2100 -1 0 0 1 @@ -1785,7 +1785,7 @@ U 1 1 4652B22B P 2950 2300 F 0 "U3" H 2950 3150 70 0000 C CNN F 1 "MAX202" H 2950 1450 70 0000 C CNN -F 2 "" H 2950 2300 60 0001 C CNN +F 2 "lib_smd:SO16E" H 2950 2300 60 0001 C CNN F 3 "" H 2950 2300 60 0001 C CNN 1 2950 2300 -1 0 0 -1 @@ -1862,7 +1862,7 @@ U 1 1 4652B111 P 7900 4150 F 0 "R34" V 7980 4150 50 0000 C CNN F 1 "10K" V 7900 4150 50 0000 C CNN -F 2 "" H 7900 4150 60 0001 C CNN +F 2 "lib_smd:SM0805" H 7900 4150 60 0001 C CNN F 3 "" H 7900 4150 60 0001 C CNN 1 7900 4150 0 1 1 0 @@ -1873,7 +1873,7 @@ U 1 1 4652B108 P 7100 4150 F 0 "LED_EN1" H 7100 4300 60 0000 C CNN F 1 "JUMPER" H 7100 4070 40 0000 C CNN -F 2 "" H 7100 4150 60 0001 C CNN +F 2 "pin_array:PIN_ARRAY_2X1" H 7100 4150 60 0001 C CNN F 3 "" H 7100 4150 60 0001 C CNN 1 7100 4150 1 0 0 -1 @@ -1892,7 +1892,7 @@ U 1 1 4652B0BC P 9000 3650 F 0 "LED4" H 9000 3750 50 0000 C CNN F 1 "LED" H 9000 3550 50 0000 C CNN -F 2 "" H 9000 3650 60 0001 C CNN +F 2 "lib_smd:SM1206POL" H 9000 3650 60 0001 C CNN F 3 "" H 9000 3650 60 0001 C CNN 1 9000 3650 1 0 0 -1 @@ -1903,7 +1903,7 @@ U 1 1 4652B0BB P 9000 3100 F 0 "LED3" H 9000 3200 50 0000 C CNN F 1 "LED" H 9000 3000 50 0000 C CNN -F 2 "" H 9000 3100 60 0001 C CNN +F 2 "lib_smd:SM1206POL" H 9000 3100 60 0001 C CNN F 3 "" H 9000 3100 60 0001 C CNN 1 9000 3100 1 0 0 -1 @@ -1914,7 +1914,7 @@ U 1 1 4652B0B7 P 9000 2550 F 0 "LED2" H 9000 2650 50 0000 C CNN F 1 "LED" H 9000 2450 50 0000 C CNN -F 2 "" H 9000 2550 60 0001 C CNN +F 2 "lib_smd:SM1206POL" H 9000 2550 60 0001 C CNN F 3 "" H 9000 2550 60 0001 C CNN 1 9000 2550 1 0 0 -1 @@ -1925,7 +1925,7 @@ U 1 1 4652B0AE P 9000 2000 F 0 "LED1" H 9000 2100 50 0000 C CNN F 1 "LED" H 9000 1900 50 0000 C CNN -F 2 "" H 9000 2000 60 0001 C CNN +F 2 "lib_smd:SM1206POL" H 9000 2000 60 0001 C CNN F 3 "" H 9000 2000 60 0001 C CNN 1 9000 2000 1 0 0 -1 @@ -1936,7 +1936,7 @@ U 1 1 4652B06A P 8550 3650 F 0 "R33" V 8630 3650 50 0000 C CNN F 1 "270" V 8550 3650 50 0000 C CNN -F 2 "" H 8550 3650 60 0001 C CNN +F 2 "lib_smd:SM0805" H 8550 3650 60 0001 C CNN F 3 "" H 8550 3650 60 0001 C CNN 1 8550 3650 0 1 1 0 @@ -1947,7 +1947,7 @@ U 1 1 4652B069 P 8550 3100 F 0 "R32" V 8630 3100 50 0000 C CNN F 1 "270" V 8550 3100 50 0000 C CNN -F 2 "" H 8550 3100 60 0001 C CNN +F 2 "lib_smd:SM0805" H 8550 3100 60 0001 C CNN F 3 "" H 8550 3100 60 0001 C CNN 1 8550 3100 0 1 1 0 @@ -1958,7 +1958,7 @@ U 1 1 4652B067 P 8550 2550 F 0 "R31" V 8630 2550 50 0000 C CNN F 1 "270" V 8550 2550 50 0000 C CNN -F 2 "" H 8550 2550 60 0001 C CNN +F 2 "lib_smd:SM0805" H 8550 2550 60 0001 C CNN F 3 "" H 8550 2550 60 0001 C CNN 1 8550 2550 0 1 1 0 @@ -1969,7 +1969,7 @@ U 1 1 4652B061 P 8550 2000 F 0 "R28" V 8630 2000 50 0000 C CNN F 1 "270" V 8550 2000 50 0000 C CNN -F 2 "" H 8550 2000 60 0001 C CNN +F 2 "lib_smd:SM0805" H 8550 2000 60 0001 C CNN F 3 "" H 8550 2000 60 0001 C CNN 1 8550 2000 0 1 1 0 @@ -1980,7 +1980,7 @@ U 3 1 4652B03E P 7850 3650 F 0 "U4" H 7850 3750 50 0000 L BNN F 1 "74HC125" H 7900 3500 40 0000 L TNN -F 2 "" H 7850 3650 60 0001 C CNN +F 2 "lib_smd:SO14E" H 7850 3650 60 0001 C CNN F 3 "" H 7850 3650 60 0001 C CNN 3 7850 3650 1 0 0 -1 @@ -1991,7 +1991,7 @@ U 4 1 4652B035 P 7850 3100 F 0 "U4" H 7850 3200 50 0000 L BNN F 1 "74HC125" H 7900 2950 40 0000 L TNN -F 2 "" H 7850 3100 60 0001 C CNN +F 2 "lib_smd:SO14E" H 7850 3100 60 0001 C CNN F 3 "" H 7850 3100 60 0001 C CNN 4 7850 3100 1 0 0 -1 @@ -2002,7 +2002,7 @@ U 2 1 4652B02E P 7850 2550 F 0 "U4" H 7850 2650 50 0000 L BNN F 1 "74HC125" H 7900 2400 40 0000 L TNN -F 2 "" H 7850 2550 60 0001 C CNN +F 2 "lib_smd:SO14E" H 7850 2550 60 0001 C CNN F 3 "" H 7850 2550 60 0001 C CNN 2 7850 2550 1 0 0 -1 @@ -2013,7 +2013,7 @@ U 1 1 4652B019 P 7850 2000 F 0 "U4" H 7850 2100 50 0000 L BNN F 1 "74HC125" H 7900 1850 40 0000 L TNN -F 2 "" H 7850 2000 60 0001 C CNN +F 2 "lib_smd:SO14E" H 7850 2000 60 0001 C CNN F 3 "" H 7850 2000 60 0001 C CNN 1 7850 2000 1 0 0 -1 @@ -2074,7 +2074,7 @@ U 1 1 4652A9D3 P 13050 1200 F 0 "C43" H 12850 1350 50 0000 L CNN F 1 "100nF" V 12850 1100 50 0000 L CNN -F 2 "" H 13050 1200 60 0001 C CNN +F 2 "lib_smd:SM0805" H 13050 1200 60 0001 C CNN F 3 "" H 13050 1200 60 0001 C CNN 1 13050 1200 0 1 1 0 @@ -2085,7 +2085,7 @@ U 1 1 4652A9C4 P 12350 1200 F 0 "VX_EN1" H 12350 1350 60 0000 C CNN F 1 "JUMPER" H 12350 1120 40 0000 C CNN -F 2 "" H 12350 1200 60 0001 C CNN +F 2 "pin_array:PIN_ARRAY_2X1" H 12350 1200 60 0001 C CNN F 3 "" H 12350 1200 60 0001 C CNN 1 12350 1200 1 0 0 -1 @@ -2202,7 +2202,7 @@ U 1 1 4652A4FB P 13100 2950 F 0 "MCU_PORT1" H 13100 1350 60 0000 C CNN F 1 "CONN_30X2" V 13100 2950 50 0000 C CNN -F 2 "" H 13100 2950 60 0001 C CNN +F 2 "pin_array:PIN_ARRAY_30X2" H 13100 2950 60 0001 C CNN F 3 "" H 13100 2950 60 0001 C CNN 1 13100 2950 1 0 0 -1 diff --git a/demos/kit-dev-coldfire-xilinx_5213/kit-dev-coldfire-xilinx_5213.cmp b/demos/kit-dev-coldfire-xilinx_5213/kit-dev-coldfire-xilinx_5213.cmp index 786972f28e..4adcb975c4 100644 --- a/demos/kit-dev-coldfire-xilinx_5213/kit-dev-coldfire-xilinx_5213.cmp +++ b/demos/kit-dev-coldfire-xilinx_5213/kit-dev-coldfire-xilinx_5213.cmp @@ -1,1193 +1,1137 @@ -Cmp-Mod V01 Created by Cvpcb (2008-01-06) date = 19/1/2008-10:51:47 +Cmp-Mod V01 Created by Cvpcb (2014-07-29 BZR 5035)-product date = 30/07/2014 13:09:03 BeginCmp -TimeStamp = 46237F50; +TimeStamp = /46237F50; Reference = ABRT_SW1; ValeurCmp = SW_PUSH; -IdModule = SW_PUSH_SMALL; +IdModule = discret:SW_PUSH_SMALL; EndCmp BeginCmp -TimeStamp = 46238965; +TimeStamp = /46238965; Reference = ALLPST1; ValeurCmp = CONN_1; -IdModule = PINTST; +IdModule = connect:PINTST; EndCmp BeginCmp -TimeStamp = 461BAF4F; +TimeStamp = /461BAF4F; Reference = BDM_EN1; ValeurCmp = JUMPER; -IdModule = PIN_ARRAY_2X1; +IdModule = pin_array:PIN_ARRAY_2X1; EndCmp BeginCmp -TimeStamp = 461BAEE7; +TimeStamp = /461BAEE7; Reference = BDM_PORT1; ValeurCmp = CONN_13X2; -IdModule = pin_array_13x2; +IdModule = pin_array:pin_array_13x2; EndCmp BeginCmp -TimeStamp = 462389BC; +TimeStamp = /462389BC; Reference = C1; ValeurCmp = 10pF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 462389C0; +TimeStamp = /462389C0; Reference = C2; ValeurCmp = 10pF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 46238468; +TimeStamp = /46238468; Reference = C3; ValeurCmp = 1nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 46161CB5; +TimeStamp = /46161CB5; Reference = C4; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 46161CB8; +TimeStamp = /46161CB8; Reference = C5; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 461BB5E5; +TimeStamp = /461BB5E5; Reference = C6; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 46161CD3; +TimeStamp = /46161CD3; Reference = C7; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 46161CD4; +TimeStamp = /46161CD4; Reference = C8; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 46161CD7; +TimeStamp = /46161CD7; Reference = C9; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 46161CD8; +TimeStamp = /46161CD8; Reference = C10; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 46161CD9; +TimeStamp = /46161CD9; Reference = C11; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 46161CDA; +TimeStamp = /46161CDA; Reference = C12; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 46161CE3; -Reference = C13; -ValeurCmp = 100nF; -IdModule = SM0805; -EndCmp - -BeginCmp -TimeStamp = 46237DF9; +TimeStamp = /46237DF9; Reference = C14; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 46237E36; +TimeStamp = /46237E36; Reference = C15; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 462382CE; +TimeStamp = /462382CE; Reference = C16; ValeurCmp = 10uF; -IdModule = SM1206POL; +IdModule = lib_smd:SM1206POL; EndCmp BeginCmp -TimeStamp = 46161D3C; +TimeStamp = /46161D3C; Reference = C17; ValeurCmp = 100uF; -IdModule = SM1206POL; +IdModule = lib_smd:SM1206POL; EndCmp BeginCmp -TimeStamp = 46238286; +TimeStamp = /46238286; Reference = C18; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 4623829A; -Reference = C19; -ValeurCmp = 100nF; -IdModule = SM0805; -EndCmp - -BeginCmp -TimeStamp = 461BE364; +TimeStamp = /461BE364; Reference = C20; ValeurCmp = 1nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 461BE35C; +TimeStamp = /461BE35C; Reference = C21; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 4652B365; +TimeStamp = /47D80202/4652B365; Reference = C22; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 4652B33B; +TimeStamp = /47D80202/4652B33B; Reference = C23; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 4652B354; +TimeStamp = /47D80202/4652B354; Reference = C24; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 4652B35B; +TimeStamp = /47D80202/4652B35B; Reference = C25; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 46546CA6; +TimeStamp = /47D80202/46546CA6; Reference = C26; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 4652B486; +TimeStamp = /47D80202/4652B486; Reference = C27; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 4652B4C7; +TimeStamp = /47D80202/4652B4C7; Reference = C28; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 4652B4C4; +TimeStamp = /47D80202/4652B4C4; Reference = C30; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 4652B4C5; +TimeStamp = /47D80202/4652B4C5; Reference = C31; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 4652B4C6; +TimeStamp = /47D80202/4652B4C6; Reference = C32; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 4652B4CA; +TimeStamp = /47D80202/4652B4CA; Reference = C33; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 4653FFFE; +TimeStamp = /47D80202/4653FFFE; Reference = C34; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 4652B4D6; +TimeStamp = /47D80202/4652B4D6; Reference = C35; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 4652B4D8; +TimeStamp = /47D80202/4652B4D8; Reference = C36; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 461BAE38; -Reference = C37; -ValeurCmp = 100nF; -IdModule = SM0805; -EndCmp - -BeginCmp -TimeStamp = 465306B1; +TimeStamp = /47D80202/465306B1; Reference = C38; ValeurCmp = 10uF; -IdModule = C2V8; +IdModule = discret:C2V8; EndCmp BeginCmp -TimeStamp = 465305FE; +TimeStamp = /47D80202/465305FE; Reference = C40; ValeurCmp = 220uF; -IdModule = C2V8; +IdModule = discret:C2V8; EndCmp BeginCmp -TimeStamp = 465306F6; +TimeStamp = /47D80202/465306F6; Reference = C41; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 4652A9D3; +TimeStamp = /47D80202/4652A9D3; Reference = C43; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 4652B4D7; +TimeStamp = /47D80202/4652B4D7; Reference = C44; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 4652B4DC; +TimeStamp = /47D80202/4652B4DC; Reference = C45; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 4652B4D9; +TimeStamp = /47D80202/4652B4D9; Reference = C46; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 46A76BB2; +TimeStamp = /47D80204/46A76BB2; Reference = C51; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 46A76BB3; +TimeStamp = /47D80204/46A76BB3; Reference = C52; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 46A76BB4; +TimeStamp = /47D80204/46A76BB4; Reference = C53; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 46A76BB5; +TimeStamp = /47D80204/46A76BB5; Reference = C54; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 46A76BAE; +TimeStamp = /47D80204/46A76BAE; Reference = C55; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 46A76BAF; +TimeStamp = /47D80204/46A76BAF; Reference = C56; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 46A76BB0; +TimeStamp = /47D80204/46A76BB0; Reference = C57; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 46A76BB1; +TimeStamp = /47D80204/46A76BB1; Reference = C58; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 46A76BBA; +TimeStamp = /47D80204/46A76BBA; Reference = C59; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 46A76BBB; +TimeStamp = /47D80204/46A76BBB; Reference = C60; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 46A76BBC; +TimeStamp = /47D80204/46A76BBC; Reference = C61; ValeurCmp = 100nF; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 4652BFF1; +TimeStamp = /47D80202/4652BFF1; Reference = CAN_EN1; ValeurCmp = CONN_2X2; -IdModule = PIN_ARRAY_2X2; +IdModule = pin_array:PIN_ARRAY_2X2; EndCmp BeginCmp -TimeStamp = 46540159; +TimeStamp = /47D80202/46540159; Reference = CAN_TERM1; ValeurCmp = JUMPER; -IdModule = PIN_ARRAY_2X1; +IdModule = pin_array:PIN_ARRAY_2X1; EndCmp BeginCmp -TimeStamp = 461BB62E; +TimeStamp = /461BB62E; Reference = CLK0; ValeurCmp = JUMPER; -IdModule = PIN_ARRAY_2X1; +IdModule = pin_array:PIN_ARRAY_2X1; EndCmp BeginCmp -TimeStamp = 461BB648; +TimeStamp = /461BB648; Reference = CLK1; ValeurCmp = JUMPER; -IdModule = PIN_ARRAY_2X1; +IdModule = pin_array:PIN_ARRAY_2X1; EndCmp BeginCmp -TimeStamp = 461BB894; +TimeStamp = /461BB894; Reference = CLKOUT1; ValeurCmp = CONN_1; -IdModule = PINTST; +IdModule = connect:PINTST; EndCmp BeginCmp -TimeStamp = 4652BADD; +TimeStamp = /47D80202/4652BADD; Reference = COM_SEL1; ValeurCmp = CONN_3; -IdModule = PIN_ARRAY_3X1; +IdModule = pin_array:PIN_ARRAY_3X1; EndCmp BeginCmp -TimeStamp = 4652BAD4; +TimeStamp = /47D80202/4652BAD4; Reference = COM_SEL2; ValeurCmp = CONN_3; -IdModule = PIN_ARRAY_3X1; +IdModule = pin_array:PIN_ARRAY_3X1; EndCmp BeginCmp -TimeStamp = 4652BA65; +TimeStamp = /47D80202/4652BA65; Reference = COM_SEL3; ValeurCmp = CONN_3; -IdModule = PIN_ARRAY_3X1; +IdModule = pin_array:PIN_ARRAY_3X1; EndCmp BeginCmp -TimeStamp = 46545507; +TimeStamp = /46545507; Reference = CT1; ValeurCmp = JUMPER; -IdModule = PIN_ARRAY_2X1; +IdModule = pin_array:PIN_ARRAY_2X1; EndCmp BeginCmp -TimeStamp = 46237F86; +TimeStamp = /46237F86; Reference = D1; ValeurCmp = BAT54; -IdModule = ST23AK#1; +IdModule = lib_smd:ST23AK#1; EndCmp BeginCmp -TimeStamp = 4623846D; +TimeStamp = /4623846D; Reference = D3; ValeurCmp = BAT54; -IdModule = ST23AK#1; +IdModule = lib_smd:ST23AK#1; EndCmp BeginCmp -TimeStamp = 465306C8; +TimeStamp = /47D80202/465306C8; Reference = D7; ValeurCmp = 1N4004; -IdModule = D5; +IdModule = discret:D5; EndCmp BeginCmp -TimeStamp = 46A76BC4; +TimeStamp = /47D80204/46A76BC4; Reference = D8; ValeurCmp = LED; -IdModule = SM1206POL; +IdModule = lib_smd:SM1206POL; EndCmp BeginCmp -TimeStamp = 46A76BA8; +TimeStamp = /47D80204/46A76BA8; Reference = D9; ValeurCmp = LED; -IdModule = SM1206POL; +IdModule = lib_smd:SM1206POL; EndCmp BeginCmp -TimeStamp = 46530747; +TimeStamp = /47D80202/46530747; Reference = F1; ValeurCmp = FUSE; -IdModule = FSUPCMS; +IdModule = lib_smd:FSUPCMS; EndCmp BeginCmp -TimeStamp = 462380B8; +TimeStamp = /462380B8; Reference = FB1; ValeurCmp = BEAD; -IdModule = SM1206; +IdModule = lib_smd:SM1206; EndCmp BeginCmp -TimeStamp = 465FE6C5; +TimeStamp = /465FE6C5; Reference = GND1; ValeurCmp = CONN_1; -IdModule = PINTST; +IdModule = connect:PINTST; EndCmp BeginCmp -TimeStamp = 465307C6; +TimeStamp = /47D80202/465307C6; Reference = J1; ValeurCmp = JACK_2P; -IdModule = JACK_ALIM; +IdModule = connect:JACK_ALIM; EndCmp BeginCmp -TimeStamp = 46238092; +TimeStamp = /46238092; Reference = L1; ValeurCmp = 10uH; -IdModule = SM1206; +IdModule = lib_smd:SM1206; EndCmp BeginCmp -TimeStamp = 461BE327; +TimeStamp = /461BE327; Reference = L2; ValeurCmp = 10uH; -IdModule = SM1206; +IdModule = lib_smd:SM1206; EndCmp BeginCmp -TimeStamp = 4652B0AE; +TimeStamp = /47D80202/4652B0AE; Reference = LED1; ValeurCmp = LED; -IdModule = SM1206POL; +IdModule = lib_smd:SM1206POL; EndCmp BeginCmp -TimeStamp = 4652B0B7; +TimeStamp = /47D80202/4652B0B7; Reference = LED2; ValeurCmp = LED; -IdModule = SM1206POL; +IdModule = lib_smd:SM1206POL; EndCmp BeginCmp -TimeStamp = 4652B0BB; +TimeStamp = /47D80202/4652B0BB; Reference = LED3; ValeurCmp = LED; -IdModule = SM1206POL; +IdModule = lib_smd:SM1206POL; EndCmp BeginCmp -TimeStamp = 4652B0BC; +TimeStamp = /47D80202/4652B0BC; Reference = LED4; ValeurCmp = LED; -IdModule = SM1206POL; +IdModule = lib_smd:SM1206POL; EndCmp BeginCmp -TimeStamp = 46530639; +TimeStamp = /47D80202/46530639; Reference = LED5; ValeurCmp = LED; -IdModule = SM1206POL; +IdModule = lib_smd:SM1206POL; EndCmp BeginCmp -TimeStamp = 46237E52; +TimeStamp = /46237E52; Reference = LEDABRT1; ValeurCmp = RED; -IdModule = SM1206POL; +IdModule = lib_smd:SM1206POL; EndCmp BeginCmp -TimeStamp = 4652B108; +TimeStamp = /47D80202/4652B108; Reference = LED_EN1; ValeurCmp = JUMPER; -IdModule = PIN_ARRAY_2X1; +IdModule = pin_array:PIN_ARRAY_2X1; EndCmp BeginCmp -TimeStamp = 462383E5; +TimeStamp = /462383E5; Reference = LV1; ValeurCmp = DS1818; -IdModule = TO92-INVERT; +IdModule = discret:TO92-INVERT; EndCmp BeginCmp -TimeStamp = 4652A4FB; +TimeStamp = /47D80202/4652A4FB; Reference = MCU_PORT1; ValeurCmp = CONN_30X2; -IdModule = PIN_ARRAY_30X2; +IdModule = pin_array:PIN_ARRAY_30X2; EndCmp BeginCmp -TimeStamp = 46A76BA6; +TimeStamp = /47D80204/46A76BA6; Reference = P1; ValeurCmp = CONN_6; -IdModule = PIN_ARRAY-6X1; +IdModule = pin_array:PIN_ARRAY-6X1; EndCmp BeginCmp -TimeStamp = 46A76EB2; +TimeStamp = /47D80204/46A76EB2; Reference = P3; ValeurCmp = CONN_2X2; -IdModule = PIN_ARRAY_2X2; +IdModule = pin_array:PIN_ARRAY_2X2; EndCmp BeginCmp -TimeStamp = 46ADE55A; +TimeStamp = /47D80204/46ADE55A; Reference = P4; ValeurCmp = CONN_20X2; -IdModule = PIN_ARRAY_20X2; +IdModule = pin_array:PIN_ARRAY_20X2; EndCmp BeginCmp -TimeStamp = 4652BF26; +TimeStamp = /47D80202/4652BF26; Reference = PULUPEN1; ValeurCmp = CONN_4X2; -IdModule = pin_array_4x2; +IdModule = pin_array:pin_array_4x2; EndCmp BeginCmp -TimeStamp = 46238519; +TimeStamp = /46238519; Reference = Q1; ValeurCmp = 3906; -IdModule = SOT23EBC; +IdModule = lib_smd:SOT23EBC; EndCmp BeginCmp -TimeStamp = 462389B6; +TimeStamp = /462389B6; Reference = R1; -ValeurCmp = 10M; -IdModule = SM0805; +ValeurCmp = 1M; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 461BB661; +TimeStamp = /461BB661; Reference = R2; ValeurCmp = 4,7K; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 461BE039; +TimeStamp = /461BE039; Reference = R4; ValeurCmp = 10K; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 461BE041; +TimeStamp = /461BE041; Reference = R5; ValeurCmp = 10K; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 461BE046; +TimeStamp = /461BE046; Reference = R6; ValeurCmp = 10K; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 46237E28; +TimeStamp = /46237E28; Reference = R7; ValeurCmp = 1K; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 461BE047; +TimeStamp = /461BE047; Reference = R8; ValeurCmp = 10K; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 461BE230; +TimeStamp = /461BE230; Reference = R9; ValeurCmp = 0; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 461BE04B; +TimeStamp = /461BE04B; Reference = R10; ValeurCmp = 10K; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 461BE051; +TimeStamp = /461BE051; Reference = R11; ValeurCmp = 10K; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 46237E2F; +TimeStamp = /46237E2F; Reference = R12; ValeurCmp = 20K; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 461BE054; +TimeStamp = /461BE054; Reference = R13; ValeurCmp = 10K; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 46237E3D; +TimeStamp = /46237E3D; Reference = R14; ValeurCmp = 270; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 4623847B; +TimeStamp = /4623847B; Reference = R15; ValeurCmp = 4,7K; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 461BAF5C; +TimeStamp = /461BAF5C; Reference = R16; ValeurCmp = 4,7K; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 461BB790; +TimeStamp = /461BB790; Reference = R17; ValeurCmp = 4,7K; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 461BB795; +TimeStamp = /461BB795; Reference = R18; ValeurCmp = 4,7K; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 461BB798; +TimeStamp = /461BB798; Reference = R19; ValeurCmp = 4,7K; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 461BB799; +TimeStamp = /461BB799; Reference = R20; ValeurCmp = 4,7K; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 46238545; +TimeStamp = /46238545; Reference = R21; ValeurCmp = 4,7K; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 4623857F; +TimeStamp = /4623857F; Reference = R22; ValeurCmp = 270; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 4652B5F4; +TimeStamp = /47D80202/4652B5F4; Reference = R23; ValeurCmp = 10K; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 461BB65F; +TimeStamp = /461BB65F; Reference = R25; ValeurCmp = 4,7K; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 461BB8C0; +TimeStamp = /461BB8C0; Reference = R26; ValeurCmp = 10K; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 4652B061; +TimeStamp = /47D80202/4652B061; Reference = R28; ValeurCmp = 270; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 4652B9D5; +TimeStamp = /47D80202/4652B9D5; Reference = R30; ValeurCmp = 10K; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 4652B067; +TimeStamp = /47D80202/4652B067; Reference = R31; ValeurCmp = 270; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 4652B069; +TimeStamp = /47D80202/4652B069; Reference = R32; ValeurCmp = 270; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 4652B06A; +TimeStamp = /47D80202/4652B06A; Reference = R33; ValeurCmp = 270; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 4652B111; +TimeStamp = /47D80202/4652B111; Reference = R34; ValeurCmp = 10K; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 4652B9CC; +TimeStamp = /47D80202/4652B9CC; Reference = R35; ValeurCmp = 10K; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 46540063; +TimeStamp = /47D80202/46540063; Reference = R36; ValeurCmp = 1K; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 46540164; +TimeStamp = /47D80202/46540164; Reference = R38; ValeurCmp = 62; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 461BE50C; +TimeStamp = /461BE50C; Reference = R45; ValeurCmp = 4,7K; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 461BB742; +TimeStamp = /461BB742; Reference = R46; ValeurCmp = 22; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 4652BF65; +TimeStamp = /47D80202/4652BF65; Reference = R47; ValeurCmp = 4,7K; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 4652BF62; +TimeStamp = /47D80202/4652BF62; Reference = R48; ValeurCmp = 4,7K; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 4652BF5C; +TimeStamp = /47D80202/4652BF5C; Reference = R49; ValeurCmp = 4,7K; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 4652BF48; +TimeStamp = /47D80202/4652BF48; Reference = R50; ValeurCmp = 4,7K; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 46530638; +TimeStamp = /47D80202/46530638; Reference = R53; ValeurCmp = 270; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 46A76BCA; +TimeStamp = /47D80204/46A76BCA; Reference = R57; ValeurCmp = 4K7; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 46A76BC3; +TimeStamp = /47D80204/46A76BC3; Reference = R62; ValeurCmp = 1K; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 46A76BA7; +TimeStamp = /47D80204/46A76BA7; Reference = R63; ValeurCmp = 1K; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 4791D59D; +TimeStamp = /47D80204/4791D59D; Reference = R64; ValeurCmp = 3,3; -IdModule = R4; +IdModule = discret:R4; EndCmp BeginCmp -TimeStamp = 4654018B; +TimeStamp = /47D80202/4654018B; Reference = RCAN1; ValeurCmp = R; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 46540184; +TimeStamp = /47D80202/46540184; Reference = RCAN2; ValeurCmp = R; -IdModule = SM0805; +IdModule = lib_smd:SM0805; EndCmp BeginCmp -TimeStamp = 46238597; +TimeStamp = /46238597; Reference = RED1; ValeurCmp = LED_RESET1; -IdModule = SM1206POL; +IdModule = lib_smd:SM1206POL; EndCmp BeginCmp -TimeStamp = 4654007F; +TimeStamp = /47D80202/4654007F; Reference = RS1; ValeurCmp = CONN_1; -IdModule = PINTST; +IdModule = connect:PINTST; EndCmp BeginCmp -TimeStamp = 465451D4; +TimeStamp = /465451D4; Reference = RST_SW1; ValeurCmp = SW_PUSH; -IdModule = SW_PUSH_SMALL; +IdModule = discret:SW_PUSH_SMALL; EndCmp BeginCmp -TimeStamp = 4652DDDF; +TimeStamp = /47D80202/4652DDDF; Reference = SW1; ValeurCmp = SW_PUSH; -IdModule = SW_PUSH_SMALL; +IdModule = discret:SW_PUSH_SMALL; EndCmp BeginCmp -TimeStamp = 4652DDE7; +TimeStamp = /47D80202/4652DDE7; Reference = SW2; ValeurCmp = SW_PUSH; -IdModule = SW_PUSH_SMALL; +IdModule = discret:SW_PUSH_SMALL; EndCmp BeginCmp -TimeStamp = 46530763; +TimeStamp = /47D80202/46530763; Reference = SW_ONOFF1; ValeurCmp = SWITCH_INV; -IdModule = SW_SPDT; +IdModule = discret:SW_SPDT; EndCmp BeginCmp -TimeStamp = 461BBA34; +TimeStamp = /461BBA34; Reference = TA-1; ValeurCmp = CONN_1; -IdModule = PINTST; +IdModule = connect:PINTST; EndCmp BeginCmp -TimeStamp = 46530806; +TimeStamp = /47D80202/46530806; Reference = TB1; ValeurCmp = CONN_2; -IdModule = BORNIER2; +IdModule = connect:bornier2; EndCmp BeginCmp -TimeStamp = 46161C39; +TimeStamp = /46161C39; Reference = U1; ValeurCmp = MCF5213-LQFP100; -IdModule = VQFP100; +IdModule = lib_smd:VQFP100; EndCmp BeginCmp -TimeStamp = 46554FB5; +TimeStamp = /46554FB5; Reference = U2; ValeurCmp = 74AHC1G14; -IdModule = SOT353; +IdModule = lib_smd:SOT353; EndCmp BeginCmp -TimeStamp = 4652B22B; +TimeStamp = /47D80202/4652B22B; Reference = U3; ValeurCmp = MAX202; -IdModule = SO16E; +IdModule = lib_smd:SO16E; EndCmp BeginCmp -TimeStamp = 4652B03E; +TimeStamp = /47D80202/4652B03E; Reference = U4; ValeurCmp = 74HC125; -IdModule = SO14E; +IdModule = lib_smd:SO14E; EndCmp BeginCmp -TimeStamp = 4652B4C1; +TimeStamp = /47D80202/4652B4C1; Reference = U5; ValeurCmp = MAX202; -IdModule = SO16E; +IdModule = lib_smd:SO16E; EndCmp BeginCmp -TimeStamp = 4653FF97; +TimeStamp = /47D80202/4653FF97; Reference = U7; ValeurCmp = PCA82C251; -IdModule = SO8E; +IdModule = lib_smd:SO8E; EndCmp BeginCmp -TimeStamp = 4652B4D3; +TimeStamp = /47D80202/4652B4D3; Reference = U8; ValeurCmp = MAX202; -IdModule = SO16E; +IdModule = lib_smd:SO16E; EndCmp BeginCmp -TimeStamp = 470F38BE; +TimeStamp = /47D80204/470F38BE; Reference = U9; ValeurCmp = XCR3256-TQ144; -IdModule = TQFP144; +IdModule = lib_smd:TQFP144; EndCmp BeginCmp -TimeStamp = 4652B26D; +TimeStamp = /47D80202/4652B26D; Reference = UARTCAN0; ValeurCmp = DB9; -IdModule = DB9FC; +IdModule = connect:DB9FC; EndCmp BeginCmp -TimeStamp = 4652B4C2; +TimeStamp = /47D80202/4652B4C2; Reference = UARTCAN1; ValeurCmp = DB9; -IdModule = DB9FC; +IdModule = connect:DB9FC; EndCmp BeginCmp -TimeStamp = 4652B4D4; +TimeStamp = /47D80202/4652B4D4; Reference = UARTCAN2; ValeurCmp = DB9; -IdModule = DB9FC; +IdModule = connect:DB9FC; EndCmp BeginCmp -TimeStamp = 4652B289; +TimeStamp = /47D80202/4652B289; Reference = UART_EN0; ValeurCmp = CONN_4X2; -IdModule = pin_array_4x2; +IdModule = pin_array:pin_array_4x2; EndCmp BeginCmp -TimeStamp = 4652B4C3; +TimeStamp = /47D80202/4652B4C3; Reference = UART_EN1; ValeurCmp = CONN_4X2; -IdModule = pin_array_4x2; +IdModule = pin_array:pin_array_4x2; EndCmp BeginCmp -TimeStamp = 4652B4D5; +TimeStamp = /47D80202/4652B4D5; Reference = UART_EN2; ValeurCmp = CONN_4X2; -IdModule = pin_array_4x2; +IdModule = pin_array:pin_array_4x2; EndCmp BeginCmp -TimeStamp = 46238079; +TimeStamp = /46238079; Reference = VDDA1; ValeurCmp = JUMPER; -IdModule = PIN_ARRAY_2X1; +IdModule = pin_array:PIN_ARRAY_2X1; EndCmp BeginCmp -TimeStamp = 461BE319; -Reference = VDDPLL1; -ValeurCmp = JUMPER; -IdModule = PIN_ARRAY_2X1; -EndCmp - -BeginCmp -TimeStamp = 461BAE95; -Reference = VDD_EN1; -ValeurCmp = JUMPER; -IdModule = PIN_ARRAY_2X1; -EndCmp - -BeginCmp -TimeStamp = 46603376; +TimeStamp = /47D80202/46603376; Reference = VR1; ValeurCmp = LT1129_QPACK; -IdModule = DPAK5; +IdModule = lib_smd:DPAK5; EndCmp BeginCmp -TimeStamp = 4654003D; +TimeStamp = /47D80202/4654003D; Reference = VREF1; ValeurCmp = CONN_1; -IdModule = PINTST; +IdModule = connect:PINTST; EndCmp BeginCmp -TimeStamp = 462380FA; -Reference = VRH1; -ValeurCmp = JUMPER; -IdModule = PIN_ARRAY_2X1; -EndCmp - -BeginCmp -TimeStamp = 46238129; -Reference = VRL1; -ValeurCmp = JUMPER; -IdModule = PIN_ARRAY_2X1; -EndCmp - -BeginCmp -TimeStamp = 461BAE2B; -Reference = VSTDBY1; -ValeurCmp = JUMPER; -IdModule = PIN_ARRAY_2X1; -EndCmp - -BeginCmp -TimeStamp = 4652A9C4; +TimeStamp = /47D80202/4652A9C4; Reference = VX_EN1; ValeurCmp = JUMPER; -IdModule = PIN_ARRAY_2X1; +IdModule = pin_array:PIN_ARRAY_2X1; EndCmp BeginCmp -TimeStamp = 462389C7; +TimeStamp = /462389C7; Reference = Y1; ValeurCmp = 8MHz; -IdModule = HC-18UH; +IdModule = discret:HC-18UH; EndCmp EndListe diff --git a/demos/kit-dev-coldfire-xilinx_5213/kit-dev-coldfire-xilinx_5213.kicad_pcb b/demos/kit-dev-coldfire-xilinx_5213/kit-dev-coldfire-xilinx_5213.kicad_pcb index 3edd909494..ff26d1ebae 100644 --- a/demos/kit-dev-coldfire-xilinx_5213/kit-dev-coldfire-xilinx_5213.kicad_pcb +++ b/demos/kit-dev-coldfire-xilinx_5213/kit-dev-coldfire-xilinx_5213.kicad_pcb @@ -1,15 +1,15 @@ -(kicad_pcb (version 4) (host pcbnew "(2014-07-04 BZR 4974)-product") +(kicad_pcb (version 4) (host pcbnew "(2014-07-29 BZR 5035)-product") (general (links 534) (no_connects 0) - (area 65.582458 36.771599 237.49 147.510501) + (area 70.929499 55.689499 228.790501 147.510501) (thickness 1.6) (drawings 7) (tracks 3535) (zones 0) (modules 162) - (nets 279) + (nets 211) ) (page A4) @@ -31,21 +31,23 @@ (42 Eco1.User user) (43 Eco2.User user) (44 Edge.Cuts user) + (45 Margin user) ) (setup - (last_trace_width 0.25) - (trace_clearance 0.16) - (zone_clearance 0.508) - (zone_45_only no) - (trace_min 0.18) + (last_trace_width 0.2) + (user_trace_width 0.4) + (trace_clearance 0.15) + (zone_clearance 0.381) + (zone_45_only yes) + (trace_min 0.19812) (segment_width 0.381) (edge_width 0.381) - (via_size 0.635) - (via_drill 0.3) - (via_min_size 0.45) - (via_min_drill 0.2) - (uvia_size 0.2) + (via_size 0.6) + (via_drill 0.4) + (via_min_size 0.5) + (via_min_drill 0.4) + (uvia_size 0.3) (uvia_drill 0.1) (uvias_allowed no) (uvia_min_size 0.2) @@ -55,16 +57,16 @@ (mod_edge_width 0.1524) (mod_text_size 1.524 1.524) (mod_text_width 0.3048) - (pad_size 0.4064 1.27) - (pad_drill 0) + (pad_size 4.8006 4.8006) + (pad_drill 1.016) (pad_to_mask_clearance 0.2) - (aux_axis_origin 63.7 155.6) + (aux_axis_origin 62.9 158.3) (visible_elements 7FFFFFFF) (pcbplotparams (layerselection 0x010fc_80000007) (usegerberextensions false) (usegerberattributes true) - (excludeedgelayer true) + (excludeedgelayer false) (linewidth 0.150000) (plotframeref false) (viasonmask false) @@ -85,197 +87,197 @@ (mirror false) (drillshape 0) (scaleselection 1) - (outputdirectory plots)) + (outputdirectory plots/)) ) (net 0 "") - (net 1 /ALLPST) - (net 2 /AN0) - (net 3 /AN1) - (net 4 /AN2) - (net 5 /AN3) - (net 6 /AN4) - (net 7 /AN5) - (net 8 /AN6) - (net 9 /AN7) - (net 10 /BKPT-) - (net 11 /CLKIN/EXTAL) - (net 12 /CLKMOD0) - (net 13 /CLKMOD1) - (net 14 /DDAT0) - (net 15 /DDAT1) - (net 16 /DDAT2) - (net 17 /DDAT3) - (net 18 /DSCLK) - (net 19 /DSI) - (net 20 /DSO) - (net 21 /DTIN0) - (net 22 /DTIN1) - (net 23 /DTIN2) - (net 24 /DTIN3) - (net 25 /GPT0) - (net 26 /GPT1) - (net 27 /GPT2) - (net 28 /GPT3) - (net 29 /IRQ-4) - (net 30 /IRQ-5) - (net 31 /IRQ-6) - (net 32 /IRQ-7) - (net 33 /JTAG_EN) - (net 34 /PST0) - (net 35 /PST1) - (net 36 /PST2) - (net 37 /PST3) - (net 38 /QSPI_CS0) - (net 39 /QSPI_CS3) - (net 40 /TCLK) - (net 41 /VDDPLL) - (net 42 /inout_user/CANRX) - (net 43 /inout_user/CANTX) - (net 44 /inout_user/CAN_H) - (net 45 /inout_user/CAN_L) - (net 46 /inout_user/CTS0) - (net 47 /inout_user/CTS1) - (net 48 /inout_user/CTS2/CANH) - (net 49 /inout_user/PWM1) - (net 50 /inout_user/PWM3) - (net 51 /inout_user/PWM5) - (net 52 /inout_user/PWM7) - (net 53 /inout_user/QSPI_DIN) - (net 54 /inout_user/QSPI_DOUT) - (net 55 /inout_user/QSPI_SCLK) - (net 56 /inout_user/RCON-) - (net 57 /inout_user/RSTI-) - (net 58 /inout_user/RTS0) - (net 59 /inout_user/RTS0-) - (net 60 /inout_user/RTS1) - (net 61 /inout_user/RTS2) - (net 62 /inout_user/RXD0) - (net 63 /inout_user/RXD1) - (net 64 /inout_user/RXD2) - (net 65 /inout_user/RxD_CAN) - (net 66 /inout_user/TXD0) - (net 67 /inout_user/TXD1) - (net 68 /inout_user/TXD2/CANL) - (net 69 /inout_user/TxD_CAN) - (net 70 /inout_user/UCTS0) - (net 71 /inout_user/UCTS1) - (net 72 /inout_user/UCTS2) - (net 73 /inout_user/URTS0) - (net 74 /inout_user/URTS1) - (net 75 /inout_user/URTS2) - (net 76 /inout_user/URXD0) - (net 77 /inout_user/URXD1) - (net 78 /inout_user/URXD2) - (net 79 /inout_user/UTXD0) - (net 80 /inout_user/UTXD1) - (net 81 /inout_user/UTXD2) - (net 82 /inout_user/VCCA) - (net 83 /xilinx/+3,3V_OUT) - (net 84 /xilinx/GLCK2) - (net 85 /xilinx/IRQ-1) - (net 86 /xilinx/IRQ-2) - (net 87 /xilinx/IRQ-3) - (net 88 /xilinx/LED_TEST1) - (net 89 /xilinx/LED_TEST2) - (net 90 /xilinx/QSPI_CS1) - (net 91 /xilinx/QSPI_CS2) - (net 92 /xilinx/TCK) - (net 93 /xilinx/TDI) - (net 94 /xilinx/TDO) - (net 95 /xilinx/TMS) - (net 96 /xilinx/XIL_D0) - (net 97 /xilinx/XIL_D1) - (net 98 /xilinx/XIL_D10) - (net 99 /xilinx/XIL_D11) - (net 100 /xilinx/XIL_D12) - (net 101 /xilinx/XIL_D13) - (net 102 /xilinx/XIL_D14) - (net 103 /xilinx/XIL_D15) - (net 104 /xilinx/XIL_D16) - (net 105 /xilinx/XIL_D17) - (net 106 /xilinx/XIL_D18) - (net 107 /xilinx/XIL_D19) - (net 108 /xilinx/XIL_D2) - (net 109 /xilinx/XIL_D20) - (net 110 /xilinx/XIL_D21) - (net 111 /xilinx/XIL_D22) - (net 112 /xilinx/XIL_D23) - (net 113 /xilinx/XIL_D24) - (net 114 /xilinx/XIL_D25) - (net 115 /xilinx/XIL_D26) - (net 116 /xilinx/XIL_D27) - (net 117 /xilinx/XIL_D28) - (net 118 /xilinx/XIL_D29) - (net 119 /xilinx/XIL_D3) - (net 120 /xilinx/XIL_D30) - (net 121 /xilinx/XIL_D31) - (net 122 /xilinx/XIL_D32) - (net 123 /xilinx/XIL_D33) - (net 124 /xilinx/XIL_D34) - (net 125 /xilinx/XIL_D35) - (net 126 /xilinx/XIL_D36) - (net 127 /xilinx/XIL_D4) - (net 128 /xilinx/XIL_D5) - (net 129 /xilinx/XIL_D6) - (net 130 /xilinx/XIL_D7) - (net 131 /xilinx/XIL_D8) - (net 132 /xilinx/XIL_D9) - (net 133 GND) - (net 134 GNDA) - (net 135 "Net-(ABRT_SW1-Pad1)") - (net 136 "Net-(BDM_PORT1-Pad1)") - (net 137 "Net-(BDM_PORT1-Pad21)") - (net 138 "Net-(BDM_PORT1-Pad22)") - (net 139 "Net-(BDM_PORT1-Pad26)") - (net 140 "Net-(BDM_PORT1-Pad6)") - (net 141 "Net-(C15-Pad1)") - (net 142 "Net-(C23-Pad2)") - (net 143 "Net-(C24-Pad1)") - (net 144 "Net-(C24-Pad2)") - (net 145 "Net-(C25-Pad1)") - (net 146 "Net-(C25-Pad2)") - (net 147 "Net-(C27-Pad1)") - (net 148 "Net-(C3-Pad1)") - (net 149 "Net-(C30-Pad2)") - (net 150 "Net-(C31-Pad1)") - (net 151 "Net-(C31-Pad2)") - (net 152 "Net-(C32-Pad1)") - (net 153 "Net-(C32-Pad2)") - (net 154 "Net-(C33-Pad1)") - (net 155 "Net-(C35-Pad2)") - (net 156 "Net-(C36-Pad1)") - (net 157 "Net-(C36-Pad2)") - (net 158 "Net-(C38-Pad1)") - (net 159 "Net-(C43-Pad2)") - (net 160 "Net-(C44-Pad1)") - (net 161 "Net-(C44-Pad2)") - (net 162 "Net-(C45-Pad1)") - (net 163 "Net-(CAN_TERM1-Pad2)") - (net 164 "Net-(COM_SEL1-Pad3)") - (net 165 "Net-(COM_SEL2-Pad3)") - (net 166 "Net-(COM_SEL3-Pad3)") - (net 167 "Net-(D1-Pad2)") - (net 168 "Net-(D8-Pad1)") - (net 169 "Net-(D9-Pad1)") - (net 170 "Net-(F1-Pad1)") - (net 171 "Net-(J1-Pad3)") - (net 172 "Net-(L1-Pad1)") - (net 173 "Net-(LED1-Pad1)") - (net 174 "Net-(LED2-Pad1)") - (net 175 "Net-(LED3-Pad1)") - (net 176 "Net-(LED4-Pad1)") - (net 177 "Net-(LED5-Pad1)") - (net 178 "Net-(LEDABRT1-Pad2)") - (net 179 "Net-(LED_EN1-Pad2)") - (net 180 "Net-(P3-Pad2)") - (net 181 "Net-(P3-Pad4)") - (net 182 "Net-(PULUPEN1-Pad2)") - (net 183 "Net-(PULUPEN1-Pad4)") - (net 184 "Net-(PULUPEN1-Pad6)") - (net 185 "Net-(PULUPEN1-Pad8)") - (net 186 "Net-(Q1-Pad2)") - (net 187 "Net-(Q1-Pad3)") + (net 1 +3.3V) + (net 2 /ALLPST) + (net 3 /AN2) + (net 4 /AN3) + (net 5 /AN4) + (net 6 /AN6) + (net 7 /BKPT-) + (net 8 /CLKIN/EXTAL) + (net 9 /CLKMOD0) + (net 10 /CLKMOD1) + (net 11 /DDAT0) + (net 12 /DDAT1) + (net 13 /DDAT2) + (net 14 /DDAT3) + (net 15 /DSCLK) + (net 16 /DSI) + (net 17 /DSO) + (net 18 /DTIN1) + (net 19 /GPT1) + (net 20 /GPT3) + (net 21 /IRQ-5) + (net 22 /IRQ-6) + (net 23 /IRQ-7) + (net 24 /JTAG_EN) + (net 25 /PST0) + (net 26 /PST1) + (net 27 /PST2) + (net 28 /PST3) + (net 29 /QSPI_CS3) + (net 30 /TCLK) + (net 31 /VDDPLL) + (net 32 /inout_user/CANRX) + (net 33 /inout_user/CAN_H) + (net 34 /inout_user/CAN_L) + (net 35 /inout_user/CTS0) + (net 36 /inout_user/CTS1) + (net 37 /inout_user/CTS2/CANH) + (net 38 /inout_user/PWM5) + (net 39 /inout_user/PWM7) + (net 40 /inout_user/RTS0) + (net 41 /inout_user/RTS1) + (net 42 /inout_user/RTS2) + (net 43 /inout_user/RXD0) + (net 44 /inout_user/RXD1) + (net 45 /inout_user/RXD2) + (net 46 /inout_user/RxD_CAN) + (net 47 /inout_user/TXD0) + (net 48 /inout_user/TXD1) + (net 49 /inout_user/TXD2/CANL) + (net 50 /inout_user/TxD_CAN) + (net 51 /inout_user/UCTS2) + (net 52 /inout_user/URTS0) + (net 53 /inout_user/URTS2) + (net 54 /inout_user/URXD1) + (net 55 /inout_user/URXD2) + (net 56 /inout_user/UTXD0) + (net 57 /xilinx/+3,3V_OUT) + (net 58 /xilinx/GLCK2) + (net 59 /xilinx/LED_TEST1) + (net 60 /xilinx/LED_TEST2) + (net 61 /xilinx/QSPI_CS2) + (net 62 /xilinx/TCK) + (net 63 /xilinx/TDI) + (net 64 /xilinx/TDO) + (net 65 /xilinx/TMS) + (net 66 /xilinx/XIL_D0) + (net 67 /xilinx/XIL_D1) + (net 68 /xilinx/XIL_D10) + (net 69 /xilinx/XIL_D11) + (net 70 /xilinx/XIL_D12) + (net 71 /xilinx/XIL_D13) + (net 72 /xilinx/XIL_D14) + (net 73 /xilinx/XIL_D15) + (net 74 /xilinx/XIL_D16) + (net 75 /xilinx/XIL_D17) + (net 76 /xilinx/XIL_D18) + (net 77 /xilinx/XIL_D19) + (net 78 /xilinx/XIL_D2) + (net 79 /xilinx/XIL_D20) + (net 80 /xilinx/XIL_D21) + (net 81 /xilinx/XIL_D22) + (net 82 /xilinx/XIL_D23) + (net 83 /xilinx/XIL_D24) + (net 84 /xilinx/XIL_D25) + (net 85 /xilinx/XIL_D26) + (net 86 /xilinx/XIL_D27) + (net 87 /xilinx/XIL_D28) + (net 88 /xilinx/XIL_D29) + (net 89 /xilinx/XIL_D3) + (net 90 /xilinx/XIL_D30) + (net 91 /xilinx/XIL_D31) + (net 92 /xilinx/XIL_D32) + (net 93 /xilinx/XIL_D33) + (net 94 /xilinx/XIL_D34) + (net 95 /xilinx/XIL_D35) + (net 96 /xilinx/XIL_D36) + (net 97 /xilinx/XIL_D4) + (net 98 /xilinx/XIL_D5) + (net 99 /xilinx/XIL_D6) + (net 100 /xilinx/XIL_D7) + (net 101 /xilinx/XIL_D8) + (net 102 /xilinx/XIL_D9) + (net 103 GND) + (net 104 "Net-(ABRT_SW1-Pad1)") + (net 105 VDD) + (net 106 "Net-(BDM_PORT1-Pad6)") + (net 107 /inout_user/RSTI-) + (net 108 "Net-(BDM_PORT1-Pad26)") + (net 109 "Net-(C3-Pad1)") + (net 110 "Net-(C15-Pad1)") + (net 111 /inout_user/VCCA) + (net 112 GNDA) + (net 113 "Net-(C23-Pad2)") + (net 114 "Net-(C24-Pad1)") + (net 115 "Net-(C24-Pad2)") + (net 116 "Net-(C25-Pad1)") + (net 117 "Net-(C25-Pad2)") + (net 118 "Net-(C27-Pad1)") + (net 119 "Net-(C30-Pad2)") + (net 120 "Net-(C31-Pad1)") + (net 121 "Net-(C31-Pad2)") + (net 122 "Net-(C32-Pad1)") + (net 123 "Net-(C32-Pad2)") + (net 124 "Net-(C33-Pad1)") + (net 125 "Net-(C35-Pad2)") + (net 126 "Net-(C36-Pad1)") + (net 127 "Net-(C36-Pad2)") + (net 128 "Net-(C38-Pad1)") + (net 129 "Net-(C43-Pad2)") + (net 130 "Net-(C44-Pad1)") + (net 131 "Net-(C44-Pad2)") + (net 132 "Net-(C45-Pad1)") + (net 133 /inout_user/CANTX) + (net 134 "Net-(CAN_TERM1-Pad2)") + (net 135 "Net-(COM_SEL1-Pad3)") + (net 136 "Net-(COM_SEL2-Pad3)") + (net 137 "Net-(COM_SEL3-Pad3)") + (net 138 "Net-(D1-Pad2)") + (net 139 "Net-(D8-Pad1)") + (net 140 "Net-(D9-Pad1)") + (net 141 "Net-(F1-Pad1)") + (net 142 "Net-(J1-Pad3)") + (net 143 "Net-(L1-Pad1)") + (net 144 "Net-(LED1-Pad1)") + (net 145 "Net-(LED2-Pad1)") + (net 146 "Net-(LED3-Pad1)") + (net 147 "Net-(LED4-Pad1)") + (net 148 "Net-(LED5-Pad1)") + (net 149 "Net-(LEDABRT1-Pad2)") + (net 150 "Net-(LED_EN1-Pad2)") + (net 151 /xilinx/IRQ-1) + (net 152 /inout_user/UCTS1) + (net 153 /inout_user/RTS0-) + (net 154 /inout_user/PWM1) + (net 155 /inout_user/PWM3) + (net 156 /xilinx/IRQ-2) + (net 157 /inout_user/QSPI_DOUT) + (net 158 /AN0) + (net 159 /inout_user/QSPI_DIN) + (net 160 /AN1) + (net 161 /inout_user/QSPI_SCLK) + (net 162 /QSPI_CS0) + (net 163 /xilinx/QSPI_CS1) + (net 164 /AN5) + (net 165 /xilinx/IRQ-3) + (net 166 /AN7) + (net 167 /IRQ-4) + (net 168 /DTIN0) + (net 169 /DTIN2) + (net 170 /inout_user/UTXD1) + (net 171 /inout_user/URTS1) + (net 172 /DTIN3) + (net 173 /inout_user/URXD0) + (net 174 /inout_user/UCTS0) + (net 175 /inout_user/UTXD2) + (net 176 /GPT0) + (net 177 /GPT2) + (net 178 /inout_user/RCON-) + (net 179 "Net-(P3-Pad2)") + (net 180 "Net-(P3-Pad4)") + (net 181 "Net-(PULUPEN1-Pad2)") + (net 182 "Net-(PULUPEN1-Pad4)") + (net 183 "Net-(PULUPEN1-Pad6)") + (net 184 "Net-(PULUPEN1-Pad8)") + (net 185 "Net-(Q1-Pad2)") + (net 186 "Net-(Q1-Pad3)") + (net 187 "Net-(R9-Pad1)") (net 188 "Net-(R22-Pad2)") (net 189 "Net-(R23-Pad2)") (net 190 "Net-(R28-Pad2)") @@ -286,94 +288,26 @@ (net 195 "Net-(R35-Pad2)") (net 196 "Net-(R36-Pad1)") (net 197 "Net-(R46-Pad1)") - (net 198 "Net-(R9-Pad1)") - (net 199 "Net-(SW_ONOFF1-Pad1)") - (net 200 "Net-(U3-Pad11)") - (net 201 "Net-(U3-Pad12)") - (net 202 "Net-(U3-Pad9)") - (net 203 "Net-(U5-Pad11)") - (net 204 "Net-(U5-Pad12)") - (net 205 "Net-(U5-Pad9)") - (net 206 "Net-(U7-Pad5)") - (net 207 "Net-(U8-Pad10)") - (net 208 "Net-(U8-Pad12)") - (net 209 "Net-(U8-Pad9)") - (net 210 "Net-(U9-Pad102)") - (net 211 "Net-(U9-Pad103)") - (net 212 "Net-(U9-Pad106)") - (net 213 "Net-(U9-Pad110)") - (net 214 "Net-(U9-Pad120)") - (net 215 "Net-(U9-Pad121)") - (net 216 "Net-(U9-Pad133)") - (net 217 "Net-(U9-Pad14)") - (net 218 "Net-(U9-Pad141)") - (net 219 "Net-(U9-Pad15)") - (net 220 "Net-(U9-Pad16)") - (net 221 "Net-(U9-Pad18)") - (net 222 "Net-(U9-Pad19)") - (net 223 "Net-(U9-Pad21)") - (net 224 "Net-(U9-Pad22)") - (net 225 "Net-(U9-Pad23)") - (net 226 "Net-(U9-Pad25)") - (net 227 "Net-(U9-Pad26)") - (net 228 "Net-(U9-Pad29)") - (net 229 "Net-(U9-Pad30)") - (net 230 "Net-(U9-Pad34)") - (net 231 "Net-(U9-Pad35)") - (net 232 "Net-(U9-Pad36)") - (net 233 "Net-(U9-Pad37)") - (net 234 "Net-(U9-Pad38)") - (net 235 "Net-(U9-Pad39)") - (net 236 "Net-(U9-Pad40)") - (net 237 "Net-(U9-Pad41)") - (net 238 "Net-(U9-Pad55)") - (net 239 "Net-(U9-Pad56)") - (net 240 "Net-(U9-Pad60)") - (net 241 "Net-(U9-Pad61)") - (net 242 "Net-(U9-Pad62)") - (net 243 "Net-(U9-Pad63)") - (net 244 "Net-(U9-Pad65)") - (net 245 "Net-(U9-Pad66)") - (net 246 "Net-(U9-Pad67)") - (net 247 "Net-(U9-Pad68)") - (net 248 "Net-(U9-Pad69)") - (net 249 "Net-(U9-Pad70)") - (net 250 "Net-(U9-Pad71)") - (net 251 "Net-(U9-Pad72)") - (net 252 "Net-(U9-Pad74)") - (net 253 "Net-(U9-Pad75)") - (net 254 "Net-(U9-Pad77)") - (net 255 "Net-(U9-Pad78)") - (net 256 "Net-(U9-Pad79)") - (net 257 "Net-(U9-Pad80)") - (net 258 "Net-(U9-Pad81)") - (net 259 "Net-(U9-Pad82)") - (net 260 "Net-(U9-Pad83)") - (net 261 "Net-(U9-Pad84)") - (net 262 "Net-(U9-Pad86)") - (net 263 "Net-(U9-Pad87)") - (net 264 "Net-(U9-Pad88)") - (net 265 "Net-(U9-Pad9)") - (net 266 "Net-(U9-Pad90)") - (net 267 "Net-(U9-Pad91)") - (net 268 "Net-(U9-Pad92)") - (net 269 "Net-(U9-Pad93)") - (net 270 "Net-(U9-Pad94)") - (net 271 "Net-(UARTCAN0-Pad1)") - (net 272 "Net-(UARTCAN0-Pad9)") - (net 273 "Net-(UARTCAN1-Pad1)") - (net 274 "Net-(UARTCAN1-Pad9)") - (net 275 "Net-(UARTCAN2-Pad1)") - (net 276 "Net-(UARTCAN2-Pad9)") - (net 277 "Net-(VR1-Pad4)") - (net 278 VDD) + (net 198 "Net-(U3-Pad9)") + (net 199 "Net-(U3-Pad11)") + (net 200 "Net-(U3-Pad12)") + (net 201 "Net-(U5-Pad9)") + (net 202 "Net-(U5-Pad11)") + (net 203 "Net-(U5-Pad12)") + (net 204 "Net-(U7-Pad5)") + (net 205 "Net-(U8-Pad9)") + (net 206 "Net-(U8-Pad10)") + (net 207 "Net-(U8-Pad12)") + (net 208 "Net-(UARTCAN0-Pad1)") + (net 209 "Net-(UARTCAN1-Pad1)") + (net 210 "Net-(UARTCAN2-Pad1)") (net_class Default "Ceci est la Netclass par défaut" - (clearance 0.16) - (trace_width 0.25) - (via_dia 0.635) - (via_drill 0.3) - (uvia_dia 0.2) + (clearance 0.15) + (trace_width 0.2) + (via_dia 0.6) + (via_drill 0.4) + (uvia_dia 0.3) (uvia_drill 0.1) (add_net /ALLPST) (add_net /AN0) @@ -508,9 +442,6 @@ (add_net /xilinx/XIL_D8) (add_net /xilinx/XIL_D9) (add_net "Net-(ABRT_SW1-Pad1)") - (add_net "Net-(BDM_PORT1-Pad1)") - (add_net "Net-(BDM_PORT1-Pad21)") - (add_net "Net-(BDM_PORT1-Pad22)") (add_net "Net-(BDM_PORT1-Pad26)") (add_net "Net-(BDM_PORT1-Pad6)") (add_net "Net-(C15-Pad1)") @@ -571,7 +502,6 @@ (add_net "Net-(R36-Pad1)") (add_net "Net-(R46-Pad1)") (add_net "Net-(R9-Pad1)") - (add_net "Net-(SW_ONOFF1-Pad1)") (add_net "Net-(U3-Pad11)") (add_net "Net-(U3-Pad12)") (add_net "Net-(U3-Pad9)") @@ -582,198 +512,558 @@ (add_net "Net-(U8-Pad10)") (add_net "Net-(U8-Pad12)") (add_net "Net-(U8-Pad9)") - (add_net "Net-(U9-Pad102)") - (add_net "Net-(U9-Pad103)") - (add_net "Net-(U9-Pad106)") - (add_net "Net-(U9-Pad110)") - (add_net "Net-(U9-Pad120)") - (add_net "Net-(U9-Pad121)") - (add_net "Net-(U9-Pad133)") - (add_net "Net-(U9-Pad14)") - (add_net "Net-(U9-Pad141)") - (add_net "Net-(U9-Pad15)") - (add_net "Net-(U9-Pad16)") - (add_net "Net-(U9-Pad18)") - (add_net "Net-(U9-Pad19)") - (add_net "Net-(U9-Pad21)") - (add_net "Net-(U9-Pad22)") - (add_net "Net-(U9-Pad23)") - (add_net "Net-(U9-Pad25)") - (add_net "Net-(U9-Pad26)") - (add_net "Net-(U9-Pad29)") - (add_net "Net-(U9-Pad30)") - (add_net "Net-(U9-Pad34)") - (add_net "Net-(U9-Pad35)") - (add_net "Net-(U9-Pad36)") - (add_net "Net-(U9-Pad37)") - (add_net "Net-(U9-Pad38)") - (add_net "Net-(U9-Pad39)") - (add_net "Net-(U9-Pad40)") - (add_net "Net-(U9-Pad41)") - (add_net "Net-(U9-Pad55)") - (add_net "Net-(U9-Pad56)") - (add_net "Net-(U9-Pad60)") - (add_net "Net-(U9-Pad61)") - (add_net "Net-(U9-Pad62)") - (add_net "Net-(U9-Pad63)") - (add_net "Net-(U9-Pad65)") - (add_net "Net-(U9-Pad66)") - (add_net "Net-(U9-Pad67)") - (add_net "Net-(U9-Pad68)") - (add_net "Net-(U9-Pad69)") - (add_net "Net-(U9-Pad70)") - (add_net "Net-(U9-Pad71)") - (add_net "Net-(U9-Pad72)") - (add_net "Net-(U9-Pad74)") - (add_net "Net-(U9-Pad75)") - (add_net "Net-(U9-Pad77)") - (add_net "Net-(U9-Pad78)") - (add_net "Net-(U9-Pad79)") - (add_net "Net-(U9-Pad80)") - (add_net "Net-(U9-Pad81)") - (add_net "Net-(U9-Pad82)") - (add_net "Net-(U9-Pad83)") - (add_net "Net-(U9-Pad84)") - (add_net "Net-(U9-Pad86)") - (add_net "Net-(U9-Pad87)") - (add_net "Net-(U9-Pad88)") - (add_net "Net-(U9-Pad9)") - (add_net "Net-(U9-Pad90)") - (add_net "Net-(U9-Pad91)") - (add_net "Net-(U9-Pad92)") - (add_net "Net-(U9-Pad93)") - (add_net "Net-(U9-Pad94)") (add_net "Net-(UARTCAN0-Pad1)") - (add_net "Net-(UARTCAN0-Pad9)") (add_net "Net-(UARTCAN1-Pad1)") - (add_net "Net-(UARTCAN1-Pad9)") (add_net "Net-(UARTCAN2-Pad1)") - (add_net "Net-(UARTCAN2-Pad9)") - (add_net "Net-(VR1-Pad4)") - (add_net VDD) ) - (net_class power "" - (clearance 0.16) + (net_class POWER "" + (clearance 0.15) (trace_width 0.4) - (via_dia 0.635) - (via_drill 0.3) - (uvia_dia 0.2) + (via_dia 0.8) + (via_drill 0.4) + (uvia_dia 0.3) (uvia_drill 0.1) (add_net GND) (add_net GNDA) + (add_net VDD) ) - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 46546CA6) - (at 102.616 111.252) - (path /47D80202/46546CA6) + (module discret:SW_PUSH_SMALL (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DC13) + (at 172.339 100.33) + (path /46237F50) + (fp_text reference ABRT_SW1 (at 0 -0.762) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_text value SW_PUSH (at 0 1.016) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_circle (center 0 0) (end 0 -2.54) (layer F.SilkS) (width 0.127)) + (fp_line (start -3.81 -3.81) (end 3.81 -3.81) (layer F.SilkS) (width 0.127)) + (fp_line (start 3.81 -3.81) (end 3.81 3.81) (layer F.SilkS) (width 0.127)) + (fp_line (start 3.81 3.81) (end -3.81 3.81) (layer F.SilkS) (width 0.127)) + (fp_line (start -3.81 -3.81) (end -3.81 3.81) (layer F.SilkS) (width 0.127)) + (pad 1 thru_hole circle (at 3.81 -2.54) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 104 "Net-(ABRT_SW1-Pad1)")) + (pad 2 thru_hole circle (at 3.81 2.54) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 105 VDD)) + (pad 1 thru_hole circle (at -3.81 -2.54) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 104 "Net-(ABRT_SW1-Pad1)")) + (pad 2 thru_hole circle (at -3.81 2.54) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 105 VDD)) + ) + + (module connect:PINTST (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DC1F) + (at 152.019 102.489 270) + (descr "module 1 pin (ou trou mecanique de percage)") + (tags DEV) + (path /46238965) + (fp_text reference ALLPST1 (at 0 -1.26746 270) (layer F.SilkS) + (effects (font (size 0.508 0.508) (thickness 0.127))) + ) + (fp_text value CONN_1 (at 0 1.27 270) (layer F.SilkS) hide + (effects (font (size 0.508 0.508) (thickness 0.127))) + ) + (fp_circle (center 0 0) (end -0.254 -0.762) (layer F.SilkS) (width 0.127)) + (pad 1 thru_hole circle (at 0 0 270) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.Mask F.SilkS) + (net 2 /ALLPST)) + (model Pin_Array/pin_array_1x1.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module pin_array:PIN_ARRAY_2X1 (layer Composant) (tedit 4565C520) (tstamp 53D8DC24) + (at 113.792 93.345) + (descr "Connecteurs 2 pins") + (tags "CONN DEV") + (path /461BAF4F) + (fp_text reference BDM_EN1 (at 0 -1.905) (layer F.SilkS) + (effects (font (size 0.762 0.762) (thickness 0.1524))) + ) + (fp_text value JUMPER (at 0 -1.905) (layer F.SilkS) hide + (effects (font (size 0.762 0.762) (thickness 0.1524))) + ) + (fp_line (start -2.54 1.27) (end -2.54 -1.27) (layer F.SilkS) (width 0.1524)) + (fp_line (start -2.54 -1.27) (end 2.54 -1.27) (layer F.SilkS) (width 0.1524)) + (fp_line (start 2.54 -1.27) (end 2.54 1.27) (layer F.SilkS) (width 0.1524)) + (fp_line (start 2.54 1.27) (end -2.54 1.27) (layer F.SilkS) (width 0.1524)) + (pad 1 thru_hole rect (at -1.27 0) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 103 GND)) + (pad 2 thru_hole circle (at 1.27 0) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 24 /JTAG_EN)) + (model pin_array/pins_array_2x1.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module pin_array:pin_array_13x2 (layer Composant) (tedit 5031D825) (tstamp 53D8DC2D) + (at 77.597 121.539 270) + (descr "2 x 13 pins connector") + (tags CONN) + (path /461BAEE7) + (fp_text reference BDM_PORT1 (at -7.62 -3.81 270) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_text value CONN_13X2 (at 7.62 -3.81 270) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_line (start -16.51 2.54) (end 16.51 2.54) (layer F.SilkS) (width 0.2032)) + (fp_line (start 16.51 -2.54) (end -16.51 -2.54) (layer F.SilkS) (width 0.2032)) + (fp_line (start -16.51 -2.54) (end -16.51 2.54) (layer F.SilkS) (width 0.2032)) + (fp_line (start 16.51 2.54) (end 16.51 -2.54) (layer F.SilkS) (width 0.2032)) + (pad 1 thru_hole rect (at -15.24 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) + (pad 2 thru_hole circle (at -15.24 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 7 /BKPT-)) + (pad 3 thru_hole circle (at -12.7 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 103 GND)) + (pad 4 thru_hole circle (at -12.7 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 15 /DSCLK)) + (pad 5 thru_hole circle (at -10.16 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 103 GND)) + (pad 6 thru_hole circle (at -10.16 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 106 "Net-(BDM_PORT1-Pad6)")) + (pad 7 thru_hole circle (at -7.62 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 107 /inout_user/RSTI-)) + (pad 8 thru_hole circle (at -7.62 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 16 /DSI)) + (pad 9 thru_hole circle (at -5.08 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 105 VDD)) + (pad 10 thru_hole circle (at -5.08 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 17 /DSO)) + (pad 11 thru_hole circle (at -2.54 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 103 GND)) + (pad 12 thru_hole circle (at -2.54 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 28 /PST3)) + (pad 13 thru_hole circle (at 0 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 27 /PST2)) + (pad 14 thru_hole circle (at 0 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 26 /PST1)) + (pad 15 thru_hole circle (at 2.54 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 25 /PST0)) + (pad 16 thru_hole circle (at 2.54 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 14 /DDAT3)) + (pad 17 thru_hole circle (at 5.08 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 13 /DDAT2)) + (pad 18 thru_hole circle (at 5.08 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 12 /DDAT1)) + (pad 19 thru_hole circle (at 7.62 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 11 /DDAT0)) + (pad 20 thru_hole circle (at 7.62 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 103 GND)) + (pad 21 thru_hole circle (at 10.16 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) + (pad 22 thru_hole circle (at 10.16 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) + (pad 23 thru_hole circle (at 12.7 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 103 GND)) + (pad 24 thru_hole circle (at 12.7 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 30 /TCLK)) + (pad 25 thru_hole circle (at 15.24 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 105 VDD)) + (pad 26 thru_hole circle (at 15.24 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 108 "Net-(BDM_PORT1-Pad26)")) + (model pin_array/pins_array_13x2.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DC4E) + (at 136.652 117.729 270) + (path /462389BC) (attr smd) - (fp_text reference C26 (at 0 0) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) + (fp_text reference C1 (at 0 -0.3175 270) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) ) - (fp_text value 100nF (at 0 0) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) + (fp_text value 10pF (at 0 0.381 270) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 8 /CLKIN/EXTAL)) + (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DC5A) + (at 136.652 123.063 90) + (path /462389C0) + (attr smd) + (fp_text reference C2 (at 0 -0.3175 90) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 10pF (at 0 0.381 90) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 58 /xilinx/GLCK2)) + (pad 2 smd rect (at 0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DC66) + (at 164.846 94.361 90) + (path /46238468) + (attr smd) + (fp_text reference C3 (at 0 -0.3175 90) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 1nF (at 0 0.381 90) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 109 "Net-(C3-Pad1)")) + (pad 2 smd rect (at 0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DC72) + (at 141.605 91.059 180) + (path /46161CB5) + (attr smd) + (fp_text reference C4 (at 0 -0.3175 180) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 100nF (at 0 0.381 180) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DC7E) + (at 134.493 91.44 180) + (path /46161CB8) + (attr smd) + (fp_text reference C5 (at 0 -0.3175 180) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 100nF (at 0 0.381 180) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Cuivre) (tedit 53D8D2B1) (tstamp 53D8DC8A) + (at 129.921 91.44 180) + (path /461BB5E5) + (attr smd) + (fp_text reference C6 (at 0 0.3175 180) (layer B.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922)) (justify mirror)) + ) + (fp_text value 100nF (at 0 -0.381 180) (layer B.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922)) (justify mirror)) + ) + (fp_circle (center -1.651 -0.762) (end -1.651 -0.635) (layer B.SilkS) (width 0.09906)) + (fp_line (start -0.508 -0.762) (end -1.524 -0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -1.524 0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -0.508 0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start 0.508 0.762) (end 1.524 0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 1.524 -0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 0.508 -0.762) (layer B.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) + (net 103 GND)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DC96) + (at 125.349 99.822 270) + (path /46161CD3) + (attr smd) + (fp_text reference C7 (at 0 -0.3175 270) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 100nF (at 0 0.381 270) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DCA2) + (at 124.587 103.505 180) + (path /46161CD4) + (attr smd) + (fp_text reference C8 (at 0 -0.3175 180) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 100nF (at 0 0.381 180) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DCAE) + (at 131.953 112.268 180) + (path /46161CD7) + (attr smd) + (fp_text reference C9 (at 0 -0.3175 180) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 100nF (at 0 0.381 180) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DCBA) + (at 137.541 111.633 180) + (path /46161CD8) + (attr smd) + (fp_text reference C10 (at 0 -0.3175 180) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 100nF (at 0 0.381 180) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Cuivre) (tedit 53D8D2B1) (tstamp 53D8DCC6) + (at 145.288 104.775 90) + (path /46161CD9) + (attr smd) + (fp_text reference C11 (at 0 0.3175 90) (layer B.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922)) (justify mirror)) + ) + (fp_text value 100nF (at 0 -0.381 90) (layer B.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922)) (justify mirror)) + ) + (fp_circle (center -1.651 -0.762) (end -1.651 -0.635) (layer B.SilkS) (width 0.09906)) + (fp_line (start -0.508 -0.762) (end -1.524 -0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -1.524 0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -0.508 0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start 0.508 0.762) (end 1.524 0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 1.524 -0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 0.508 -0.762) (layer B.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 90) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.9525 0 90) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) + (net 103 GND)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Cuivre) (tedit 53D8D2B1) (tstamp 53D8DCD2) + (at 145.415 99.314 270) + (path /46161CDA) + (attr smd) + (fp_text reference C12 (at 0 0.3175 270) (layer B.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922)) (justify mirror)) + ) + (fp_text value 100nF (at 0 -0.381 270) (layer B.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922)) (justify mirror)) + ) + (fp_circle (center -1.651 -0.762) (end -1.651 -0.635) (layer B.SilkS) (width 0.09906)) + (fp_line (start -0.508 -0.762) (end -1.524 -0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -1.524 0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -0.508 0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start 0.508 0.762) (end 1.524 0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 1.524 -0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 0.508 -0.762) (layer B.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) + (net 103 GND)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DCDE) + (at 160.401 105.537) + (path /46237DF9) + (attr smd) + (fp_text reference C14 (at 0 -0.3175) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 100nF (at 0 0.381) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) (pad 1 smd rect (at -0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 278 VDD)) + (net 103 GND)) (pad 2 smd rect (at 0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 133 GND)) + (net 105 VDD)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) (rotate (xyz 0 0 0)) ) ) - (module SM1206 (layer Composant) (tedit 42806E24) (tstamp 462380B8) - (at 119.634 101.346 180) - (path /462380B8) + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DCEA) + (at 160.401 111.252 180) + (path /46237E36) (attr smd) - (fp_text reference FB1 (at 0 0 180) (layer F.SilkS) - (effects (font (size 0.762 0.762) (thickness 0.127))) + (fp_text reference C15 (at 0 -0.3175 180) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) ) - (fp_text value BEAD (at 0 0 180) (layer F.SilkS) hide - (effects (font (size 0.762 0.762) (thickness 0.127))) + (fp_text value 100nF (at 0 0.381 180) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) ) - (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Composant F.Paste F.Mask) - (net 134 GNDA)) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 110 "Net-(C15-Pad1)")) + (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 103 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) - (scale (xyz 0.17 0.16 0.16)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) (rotate (xyz 0 0 0)) ) ) - (module SM1206 (layer Composant) (tedit 42806E24) (tstamp 461BE327) - (at 151.892 109.22 180) - (path /461BE327) - (attr smd) - (fp_text reference L2 (at 0 0 180) (layer F.SilkS) - (effects (font (size 0.762 0.762) (thickness 0.127))) - ) - (fp_text value 10uH (at 0 0 180) (layer F.SilkS) hide - (effects (font (size 0.762 0.762) (thickness 0.127))) - ) - (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Composant F.Paste F.Mask) - (net 41 /VDDPLL)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.17 0.16 0.16)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM1206 (layer Composant) (tedit 42806E24) (tstamp 46238092) - (at 118.999 110.236) - (path /46238092) - (attr smd) - (fp_text reference L1 (at 0 0) (layer F.SilkS) - (effects (font (size 0.762 0.762) (thickness 0.127))) - ) - (fp_text value 10uH (at 0 0) (layer F.SilkS) hide - (effects (font (size 0.762 0.762) (thickness 0.127))) - ) - (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Composant F.Paste F.Mask) - (net 172 "Net-(L1-Pad1)")) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Composant F.Paste F.Mask) - (net 82 /inout_user/VCCA)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.17 0.16 0.16)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM1206POL (layer Composant) (tedit 42806E4C) (tstamp 462382CE) + (module lib_smd:SM1206POL (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DCF6) (at 120.777 106.045 90) (path /462382CE) (attr smd) @@ -793,168 +1083,523 @@ (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) (pad 1 smd rect (at -1.651 0 90) (size 1.524 2.032) (layers Composant F.Paste F.Mask) - (net 82 /inout_user/VCCA)) + (net 111 /inout_user/VCCA)) (pad 2 smd rect (at 1.651 0 90) (size 1.524 2.032) (layers Composant F.Paste F.Mask) - (net 134 GNDA)) + (net 112 GNDA)) (model smd/chip_cms_pol.wrl (at (xyz 0 0 0)) - (scale (xyz 0.17 0.16 0.16)) + (scale (xyz 0.1700000017881393 0.1599999964237213 0.1599999964237213)) (rotate (xyz 0 0 0)) ) ) - (module PIN_ARRAY_2X1 (layer Composant) (tedit 4565C520) (tstamp 46545507) - (at 90.17 134.62 180) - (descr "Connecteurs 2 pins") - (tags "CONN DEV") - (path /46545507) - (fp_text reference CT1 (at 0 -1.905 180) (layer F.SilkS) - (effects (font (size 0.762 0.762) (thickness 0.1524))) - ) - (fp_text value JUMPER (at 0 -1.905 180) (layer F.SilkS) hide - (effects (font (size 0.762 0.762) (thickness 0.1524))) - ) - (fp_line (start -2.54 1.27) (end -2.54 -1.27) (layer F.SilkS) (width 0.1524)) - (fp_line (start -2.54 -1.27) (end 2.54 -1.27) (layer F.SilkS) (width 0.1524)) - (fp_line (start 2.54 -1.27) (end 2.54 1.27) (layer F.SilkS) (width 0.1524)) - (fp_line (start 2.54 1.27) (end -2.54 1.27) (layer F.SilkS) (width 0.1524)) - (pad 1 thru_hole rect (at -1.27 0 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 140 "Net-(BDM_PORT1-Pad6)")) - (pad 2 thru_hole circle (at 1.27 0 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 40 /TCLK)) - (model pin_array/pins_array_2x1.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SW_PUSH_SMALL (layer Composant) (tedit 465D95FF) (tstamp 465451D4) - (at 172.339 89.789 180) - (path /465451D4) - (fp_text reference RST_SW1 (at 0 -0.762 180) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_text value SW_PUSH (at 0 1.016 180) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_circle (center 0 0) (end 0 -2.54) (layer F.SilkS) (width 0.127)) - (fp_line (start -3.81 -3.81) (end 3.81 -3.81) (layer F.SilkS) (width 0.127)) - (fp_line (start 3.81 -3.81) (end 3.81 3.81) (layer F.SilkS) (width 0.127)) - (fp_line (start 3.81 3.81) (end -3.81 3.81) (layer F.SilkS) (width 0.127)) - (fp_line (start -3.81 -3.81) (end -3.81 3.81) (layer F.SilkS) (width 0.127)) - (pad 1 thru_hole circle (at 3.81 -2.54 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) - (net 148 "Net-(C3-Pad1)")) - (pad 2 thru_hole circle (at 3.81 2.54 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) - (net 133 GND)) - (pad 1 thru_hole circle (at -3.81 -2.54 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) - (net 148 "Net-(C3-Pad1)")) - (pad 2 thru_hole circle (at -3.81 2.54 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) - (net 133 GND)) - ) - - (module SW_PUSH_SMALL (layer Composant) (tedit 46544DB3) (tstamp 4652DDDF) - (at 172.339 110.617) - (path /47D80202/4652DDDF) - (fp_text reference SW1 (at 0 -0.762) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_text value SW_PUSH (at 0 1.016) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_circle (center 0 0) (end 0 -2.54) (layer F.SilkS) (width 0.127)) - (fp_line (start -3.81 -3.81) (end 3.81 -3.81) (layer F.SilkS) (width 0.127)) - (fp_line (start 3.81 -3.81) (end 3.81 3.81) (layer F.SilkS) (width 0.127)) - (fp_line (start 3.81 3.81) (end -3.81 3.81) (layer F.SilkS) (width 0.127)) - (fp_line (start -3.81 -3.81) (end -3.81 3.81) (layer F.SilkS) (width 0.127)) - (pad 1 thru_hole circle (at 3.81 -2.54) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) - (net 29 /IRQ-4)) - (pad 2 thru_hole circle (at 3.81 2.54) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) - (net 133 GND)) - (pad 1 thru_hole circle (at -3.81 -2.54) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) - (net 29 /IRQ-4)) - (pad 2 thru_hole circle (at -3.81 2.54) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) - (net 133 GND)) - ) - - (module SW_PUSH_SMALL (layer Composant) (tedit 465D95D8) (tstamp 46237F50) - (at 172.339 100.33) - (path /46237F50) - (fp_text reference ABRT_SW1 (at 0 -0.762) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_text value SW_PUSH (at 0 1.016) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_circle (center 0 0) (end 0 -2.54) (layer F.SilkS) (width 0.127)) - (fp_line (start -3.81 -3.81) (end 3.81 -3.81) (layer F.SilkS) (width 0.127)) - (fp_line (start 3.81 -3.81) (end 3.81 3.81) (layer F.SilkS) (width 0.127)) - (fp_line (start 3.81 3.81) (end -3.81 3.81) (layer F.SilkS) (width 0.127)) - (fp_line (start -3.81 -3.81) (end -3.81 3.81) (layer F.SilkS) (width 0.127)) - (pad 1 thru_hole circle (at 3.81 -2.54) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) - (net 135 "Net-(ABRT_SW1-Pad1)")) - (pad 2 thru_hole circle (at 3.81 2.54) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) - (net 278 VDD)) - (pad 1 thru_hole circle (at -3.81 -2.54) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) - (net 135 "Net-(ABRT_SW1-Pad1)")) - (pad 2 thru_hole circle (at -3.81 2.54) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) - (net 278 VDD)) - ) - - (module SW_PUSH_SMALL (layer Composant) (tedit 46544DB3) (tstamp 4652DDE7) - (at 172.466 122.301) - (path /47D80202/4652DDE7) - (fp_text reference SW2 (at 0 -0.762) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_text value SW_PUSH (at 0 1.016) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_circle (center 0 0) (end 0 -2.54) (layer F.SilkS) (width 0.127)) - (fp_line (start -3.81 -3.81) (end 3.81 -3.81) (layer F.SilkS) (width 0.127)) - (fp_line (start 3.81 -3.81) (end 3.81 3.81) (layer F.SilkS) (width 0.127)) - (fp_line (start 3.81 3.81) (end -3.81 3.81) (layer F.SilkS) (width 0.127)) - (fp_line (start -3.81 -3.81) (end -3.81 3.81) (layer F.SilkS) (width 0.127)) - (pad 1 thru_hole circle (at 3.81 -2.54) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) - (net 30 /IRQ-5)) - (pad 2 thru_hole circle (at 3.81 2.54) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) - (net 133 GND)) - (pad 1 thru_hole circle (at -3.81 -2.54) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) - (net 30 /IRQ-5)) - (pad 2 thru_hole circle (at -3.81 2.54) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) - (net 133 GND)) - ) - - (module SOT23EBC (layer Composant) (tedit 3F980186) (tstamp 46238519) - (at 161.798 90.043 90) - (descr "Module CMS SOT23 Transistore EBC") - (tags "CMS SOT") - (path /46238519) + (module lib_smd:SM1206POL (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DD04) + (at 150.241 120.015) + (path /46161D3C) (attr smd) - (fp_text reference Q1 (at 0 -2.413 90) (layer F.SilkS) - (effects (font (size 0.762 0.762) (thickness 0.1905))) + (fp_text reference C17 (at 0 0) (layer F.SilkS) + (effects (font (size 0.762 0.762) (thickness 0.127))) ) - (fp_text value 3906 (at 0 0 90) (layer F.SilkS) hide - (effects (font (size 0.762 0.762) (thickness 0.1905))) + (fp_text value 100uF (at 0 0) (layer F.SilkS) hide + (effects (font (size 0.762 0.762) (thickness 0.127))) ) - (fp_line (start -1.524 -0.381) (end 1.524 -0.381) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.381) (end 1.524 0.381) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.381) (end -1.524 0.381) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.381) (end -1.524 -0.381) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.889 -1.016 90) (size 0.9144 0.9144) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 0.889 -1.016 90) (size 0.9144 0.9144) (layers Composant F.Paste F.Mask) - (net 186 "Net-(Q1-Pad2)")) - (pad 3 smd rect (at 0 1.016 90) (size 0.9144 0.9144) (layers Composant F.Paste F.Mask) - (net 187 "Net-(Q1-Pad3)")) - (model smd/cms_sot23.wrl + (fp_line (start -2.54 -1.143) (end -2.794 -1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.794 -1.143) (end -2.794 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.794 1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (model smd/chip_cms_pol.wrl (at (xyz 0 0 0)) - (scale (xyz 0.13 0.15 0.15)) + (scale (xyz 0.1700000017881393 0.1599999964237213 0.1599999964237213)) (rotate (xyz 0 0 0)) ) ) - (module C2V8 (layer Composant) (tedit 46544AA3) (tstamp 465306B1) + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DD12) + (at 123.825 108.712) + (path /46238286) + (attr smd) + (fp_text reference C18 (at 0 -0.3175) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 100nF (at 0 0.381) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 111 /inout_user/VCCA)) + (pad 2 smd rect (at 0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 112 GNDA)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DD1E) + (at 141.732 112.395 270) + (path /461BE364) + (attr smd) + (fp_text reference C20 (at 0 -0.3175 270) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 1nF (at 0 0.381 270) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 31 /VDDPLL)) + (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DD2A) + (at 143.51 112.649 270) + (path /461BE35C) + (attr smd) + (fp_text reference C21 (at 0 -0.3175 270) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 100nF (at 0 0.381 270) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 31 /VDDPLL)) + (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DD36) + (at 192.532 74.168 270) + (path /47D80202/4652B365) + (attr smd) + (fp_text reference C22 (at 0 -0.3175 270) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 100nF (at 0 0.381 270) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DD42) + (at 189.23 71.247 180) + (path /47D80202/4652B33B) + (attr smd) + (fp_text reference C23 (at 0 -0.3175 180) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 100nF (at 0 0.381 180) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 113 "Net-(C23-Pad2)")) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DD4E) + (at 181.102 73.914 270) + (path /47D80202/4652B354) + (attr smd) + (fp_text reference C24 (at 0 -0.3175 270) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 100nF (at 0 0.381 270) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 114 "Net-(C24-Pad1)")) + (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 115 "Net-(C24-Pad2)")) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DD5A) + (at 181.102 78.232 270) + (path /47D80202/4652B35B) + (attr smd) + (fp_text reference C25 (at 0 -0.3175 270) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 100nF (at 0 0.381 270) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 116 "Net-(C25-Pad1)")) + (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 117 "Net-(C25-Pad2)")) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DD66) + (at 102.616 111.252) + (path /47D80202/46546CA6) + (attr smd) + (fp_text reference C26 (at 0 -0.3175) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 100nF (at 0 0.381) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DD72) + (at 178.562 78.105 90) + (path /47D80202/4652B486) + (attr smd) + (fp_text reference C27 (at 0 -0.3175 90) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 100nF (at 0 0.381 90) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 118 "Net-(C27-Pad1)")) + (pad 2 smd rect (at 0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DD7E) + (at 164.592 74.168 270) + (path /47D80202/4652B4C7) + (attr smd) + (fp_text reference C28 (at 0 -0.3175 270) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 100nF (at 0 0.381 270) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DD8A) + (at 161.29 71.247 180) + (path /47D80202/4652B4C4) + (attr smd) + (fp_text reference C30 (at 0 -0.3175 180) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 100nF (at 0 0.381 180) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 119 "Net-(C30-Pad2)")) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DD96) + (at 153.162 73.787 270) + (path /47D80202/4652B4C5) + (attr smd) + (fp_text reference C31 (at 0 -0.3175 270) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 100nF (at 0 0.381 270) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 120 "Net-(C31-Pad1)")) + (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 121 "Net-(C31-Pad2)")) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DDA2) + (at 153.035 78.105 270) + (path /47D80202/4652B4C6) + (attr smd) + (fp_text reference C32 (at 0 -0.3175 270) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 100nF (at 0 0.381 270) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 122 "Net-(C32-Pad1)")) + (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 123 "Net-(C32-Pad2)")) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DDAE) + (at 150.876 78.105 90) + (path /47D80202/4652B4CA) + (attr smd) + (fp_text reference C33 (at 0 -0.3175 90) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 100nF (at 0 0.381 90) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 124 "Net-(C33-Pad1)")) + (pad 2 smd rect (at 0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DDBA) + (at 108.458 84.328) + (path /47D80202/4653FFFE) + (attr smd) + (fp_text reference C34 (at 0 -0.3175) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 100nF (at 0 0.381) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DDC6) + (at 128.27 71.247 180) + (path /47D80202/4652B4D6) + (attr smd) + (fp_text reference C35 (at 0 -0.3175 180) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 100nF (at 0 0.381 180) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 125 "Net-(C35-Pad2)")) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DDD2) + (at 120.142 78.105 270) + (path /47D80202/4652B4D8) + (attr smd) + (fp_text reference C36 (at 0 -0.3175 270) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 100nF (at 0 0.381 270) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 126 "Net-(C36-Pad1)")) + (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 127 "Net-(C36-Pad2)")) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:C2V8 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DDDE) (at 88.9 85.09 90) (descr "Condensateur polarise") (tags CP) @@ -967,9 +1612,9 @@ ) (fp_circle (center 0 0) (end -4.445 0) (layer F.SilkS) (width 0.3048)) (pad 1 thru_hole rect (at -2.54 0 90) (size 1.778 1.778) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 158 "Net-(C38-Pad1)")) + (net 128 "Net-(C38-Pad1)")) (pad 2 thru_hole circle (at 2.54 0 90) (size 1.778 1.778) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 133 GND)) + (net 103 GND)) (model discret/c_vert_c2v10.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -977,7 +1622,7 @@ ) ) - (module C2V8 (layer Composant) (tedit 46544AA3) (tstamp 465305FE) + (module discret:C2V8 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DDE4) (at 88.9 97.79 90) (descr "Condensateur polarise") (tags CP) @@ -990,9 +1635,9 @@ ) (fp_circle (center 0 0) (end -4.445 0) (layer F.SilkS) (width 0.3048)) (pad 1 thru_hole rect (at -2.54 0 90) (size 1.778 1.778) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 278 VDD)) + (net 105 VDD)) (pad 2 thru_hole circle (at 2.54 0 90) (size 1.778 1.778) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 133 GND)) + (net 103 GND)) (model discret/c_vert_c2v10.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -1000,3229 +1645,563 @@ ) ) - (module SM1206POL (layer Composant) (tedit 42806E4C) (tstamp 46238597) - (at 164.846 89.281 270) - (path /46238597) - (attr smd) - (fp_text reference RED1 (at 0 0 270) (layer F.SilkS) - (effects (font (size 0.762 0.762) (thickness 0.127))) - ) - (fp_text value LED_RESET1 (at 0 0 270) (layer F.SilkS) hide - (effects (font (size 0.762 0.762) (thickness 0.127))) - ) - (fp_line (start -2.54 -1.143) (end -2.794 -1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.794 -1.143) (end -2.794 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.794 1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 270) (size 1.524 2.032) (layers Composant F.Paste F.Mask) - (net 188 "Net-(R22-Pad2)")) - (pad 2 smd rect (at 1.651 0 270) (size 1.524 2.032) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (model smd/chip_cms_pol.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.17 0.16 0.16)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM1206POL (layer Composant) (tedit 42806E4C) (tstamp 4652B0AE) - (at 88.392 117.094 180) - (path /47D80202/4652B0AE) - (attr smd) - (fp_text reference LED1 (at 0 0 180) (layer F.SilkS) - (effects (font (size 0.762 0.762) (thickness 0.127))) - ) - (fp_text value LED (at 0 0 180) (layer F.SilkS) hide - (effects (font (size 0.762 0.762) (thickness 0.127))) - ) - (fp_line (start -2.54 -1.143) (end -2.794 -1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.794 -1.143) (end -2.794 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.794 1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Composant F.Paste F.Mask) - (net 173 "Net-(LED1-Pad1)")) - (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (model smd/chip_cms_pol.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.17 0.16 0.16)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM1206POL (layer Composant) (tedit 42806E4C) (tstamp 4652B0B7) - (at 88.392 121.158 180) - (path /47D80202/4652B0B7) - (attr smd) - (fp_text reference LED2 (at 0 0 180) (layer F.SilkS) - (effects (font (size 0.762 0.762) (thickness 0.127))) - ) - (fp_text value LED (at 0 0 180) (layer F.SilkS) hide - (effects (font (size 0.762 0.762) (thickness 0.127))) - ) - (fp_line (start -2.54 -1.143) (end -2.794 -1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.794 -1.143) (end -2.794 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.794 1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Composant F.Paste F.Mask) - (net 174 "Net-(LED2-Pad1)")) - (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (model smd/chip_cms_pol.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.17 0.16 0.16)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM1206POL (layer Composant) (tedit 465D9620) (tstamp 46237E52) - (at 164.846 100.457 270) - (path /46237E52) - (attr smd) - (fp_text reference LEDABRT1 (at 0 0 270) (layer F.SilkS) - (effects (font (size 0.762 0.762) (thickness 0.127))) - ) - (fp_text value RED (at 0 0 270) (layer F.SilkS) hide - (effects (font (size 0.762 0.762) (thickness 0.127))) - ) - (fp_line (start -2.54 -1.143) (end -2.794 -1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.794 -1.143) (end -2.794 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.794 1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 270) (size 1.524 2.032) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 1.651 0 270) (size 1.524 2.032) (layers Composant F.Paste F.Mask) - (net 178 "Net-(LEDABRT1-Pad2)")) - (model smd/chip_cms_pol.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.17 0.16 0.16)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM1206POL (layer Composant) (tedit 42806E4C) (tstamp 46530639) - (at 104.14 138.176 270) - (path /47D80202/46530639) - (attr smd) - (fp_text reference LED5 (at 0 0 270) (layer F.SilkS) - (effects (font (size 0.762 0.762) (thickness 0.127))) - ) - (fp_text value LED (at 0 0 270) (layer F.SilkS) hide - (effects (font (size 0.762 0.762) (thickness 0.127))) - ) - (fp_line (start -2.54 -1.143) (end -2.794 -1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.794 -1.143) (end -2.794 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.794 1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 270) (size 1.524 2.032) (layers Composant F.Paste F.Mask) - (net 177 "Net-(LED5-Pad1)")) - (pad 2 smd rect (at 1.651 0 270) (size 1.524 2.032) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (model smd/chip_cms_pol.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.17 0.16 0.16)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM1206POL (layer Composant) (tedit 42806E4C) (tstamp 4652B0BC) - (at 88.392 129.54 180) - (path /47D80202/4652B0BC) - (attr smd) - (fp_text reference LED4 (at 0 0 180) (layer F.SilkS) - (effects (font (size 0.762 0.762) (thickness 0.127))) - ) - (fp_text value LED (at 0 0 180) (layer F.SilkS) hide - (effects (font (size 0.762 0.762) (thickness 0.127))) - ) - (fp_line (start -2.54 -1.143) (end -2.794 -1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.794 -1.143) (end -2.794 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.794 1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Composant F.Paste F.Mask) - (net 176 "Net-(LED4-Pad1)")) - (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (model smd/chip_cms_pol.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.17 0.16 0.16)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM1206POL (layer Composant) (tedit 42806E4C) (tstamp 4652B0BB) - (at 88.392 125.349 180) - (path /47D80202/4652B0BB) - (attr smd) - (fp_text reference LED3 (at 0 0 180) (layer F.SilkS) - (effects (font (size 0.762 0.762) (thickness 0.127))) - ) - (fp_text value LED (at 0 0 180) (layer F.SilkS) hide - (effects (font (size 0.762 0.762) (thickness 0.127))) - ) - (fp_line (start -2.54 -1.143) (end -2.794 -1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.794 -1.143) (end -2.794 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.794 1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Composant F.Paste F.Mask) - (net 175 "Net-(LED3-Pad1)")) - (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (model smd/chip_cms_pol.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.17 0.16 0.16)) - (rotate (xyz 0 0 0)) - ) - ) - - (module PIN_ARRAY_30X2 (layer Composant) (tedit 46602C82) (tstamp 4652A4FB) - (at 147.574 138.176 180) - (descr "Double rangee de contacts 2 x 12 pins") - (tags CONN) - (path /47D80202/4652A4FB) - (fp_text reference MCU_PORT1 (at 0 -3.81 180) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.254))) - ) - (fp_text value CONN_30X2 (at 0 3.81 180) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_line (start 12.7 2.54) (end 38.1 2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start 12.7 -2.54) (end 38.1 -2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start 12.7 2.54) (end -38.1 2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start 12.7 -2.54) (end -38.1 -2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start 38.1 -2.54) (end 38.1 2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start -38.1 -2.54) (end -38.1 2.54) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at -36.83 1.27 180) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) - (net 159 "Net-(C43-Pad2)")) - (pad 2 thru_hole circle (at -36.83 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 85 /xilinx/IRQ-1)) - (pad 11 thru_hole circle (at -24.13 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 71 /inout_user/UCTS1)) - (pad 4 thru_hole circle (at -34.29 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 59 /inout_user/RTS0-)) - (pad 13 thru_hole circle (at -21.59 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 49 /inout_user/PWM1)) - (pad 6 thru_hole circle (at -31.75 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 57 /inout_user/RSTI-)) - (pad 15 thru_hole circle (at -19.05 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 50 /inout_user/PWM3)) - (pad 8 thru_hole circle (at -29.21 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 86 /xilinx/IRQ-2)) - (pad 17 thru_hole circle (at -16.51 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 54 /inout_user/QSPI_DOUT)) - (pad 10 thru_hole circle (at -26.67 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 2 /AN0)) - (pad 19 thru_hole circle (at -13.97 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 53 /inout_user/QSPI_DIN)) - (pad 12 thru_hole circle (at -24.13 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 3 /AN1)) - (pad 21 thru_hole circle (at -11.43 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 55 /inout_user/QSPI_SCLK)) - (pad 14 thru_hole circle (at -21.59 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 4 /AN2)) - (pad 23 thru_hole circle (at -8.89 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 38 /QSPI_CS0)) - (pad 16 thru_hole circle (at -19.05 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 5 /AN3)) - (pad 25 thru_hole circle (at -6.35 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 90 /xilinx/QSPI_CS1)) - (pad 18 thru_hole circle (at -16.51 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 6 /AN4)) - (pad 27 thru_hole circle (at -3.81 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 91 /xilinx/QSPI_CS2)) - (pad 20 thru_hole circle (at -13.97 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 7 /AN5)) - (pad 29 thru_hole circle (at -1.27 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 39 /QSPI_CS3)) - (pad 22 thru_hole circle (at -11.43 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 8 /AN6)) - (pad 31 thru_hole circle (at 1.27 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 87 /xilinx/IRQ-3)) - (pad 24 thru_hole circle (at -8.89 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 9 /AN7)) - (pad 26 thru_hole circle (at -6.35 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 43 /inout_user/CANTX)) - (pad 33 thru_hole circle (at 3.81 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 29 /IRQ-4)) - (pad 28 thru_hole circle (at -3.81 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 42 /inout_user/CANRX)) - (pad 32 thru_hole circle (at 1.27 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 52 /inout_user/PWM7)) - (pad 34 thru_hole circle (at 3.81 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 21 /DTIN0)) - (pad 36 thru_hole circle (at 6.35 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 22 /DTIN1)) - (pad 38 thru_hole circle (at 8.89 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 23 /DTIN2)) - (pad 35 thru_hole circle (at 6.35 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 30 /IRQ-5)) - (pad 37 thru_hole circle (at 8.89 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 31 /IRQ-6)) - (pad 3 thru_hole circle (at -34.29 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 133 GND)) - (pad 5 thru_hole circle (at -31.75 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 80 /inout_user/UTXD1)) - (pad 7 thru_hole circle (at -29.21 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 77 /inout_user/URXD1)) - (pad 9 thru_hole circle (at -26.67 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 74 /inout_user/URTS1)) - (pad 39 thru_hole circle (at 11.43 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 32 /IRQ-7)) - (pad 40 thru_hole circle (at 11.43 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 24 /DTIN3)) - (pad 30 thru_hole circle (at -1.27 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 51 /inout_user/PWM5)) - (pad 41 thru_hole circle (at 13.97 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 79 /inout_user/UTXD0)) - (pad 42 thru_hole circle (at 13.97 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 73 /inout_user/URTS0)) - (pad 43 thru_hole circle (at 16.51 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 76 /inout_user/URXD0)) - (pad 44 thru_hole circle (at 16.51 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 70 /inout_user/UCTS0)) - (pad 45 thru_hole circle (at 19.05 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 81 /inout_user/UTXD2)) - (pad 46 thru_hole circle (at 19.05 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 75 /inout_user/URTS2)) - (pad 47 thru_hole circle (at 21.59 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 78 /inout_user/URXD2)) - (pad 48 thru_hole circle (at 21.59 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 72 /inout_user/UCTS2)) - (pad 49 thru_hole circle (at 24.13 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 25 /GPT0)) - (pad 50 thru_hole circle (at 24.13 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 26 /GPT1)) - (pad 51 thru_hole circle (at 26.67 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 27 /GPT2)) - (pad 52 thru_hole circle (at 26.67 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 28 /GPT3)) - (pad 53 thru_hole circle (at 29.21 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 56 /inout_user/RCON-)) - (pad 54 thru_hole circle (at 29.21 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 133 GND)) - (pad 55 thru_hole circle (at 31.75 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 82 /inout_user/VCCA)) - (pad 56 thru_hole circle (at 31.75 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 134 GNDA)) - (pad 57 thru_hole circle (at 34.29 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 82 /inout_user/VCCA)) - (pad 58 thru_hole circle (at 34.29 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 134 GNDA)) - (pad 59 thru_hole circle (at 36.83 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 278 VDD)) - (pad 60 thru_hole circle (at 36.83 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 133 GND)) - (model pin_array/pins_array_30x2.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module bornier2 (layer Composant) (tedit 3EC0ED69) (tstamp 46530806) - (at 75.438 70.485 270) - (descr "Bornier d'alimentation 2 pins") - (tags DEV) - (path /47D80202/46530806) - (fp_text reference TB1 (at 0 -5.08 270) (layer F.SilkS) - (effects (font (thickness 0.3048))) - ) - (fp_text value CONN_2 (at 0 5.08 270) (layer F.SilkS) - (effects (font (thickness 0.3048))) - ) - (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 3.81) (end 5.08 -3.81) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 -3.81) (end -5.08 -3.81) (layer F.SilkS) (width 0.3048)) - (fp_line (start -5.08 -3.81) (end -5.08 3.81) (layer F.SilkS) (width 0.3048)) - (fp_line (start -5.08 3.81) (end 5.08 3.81) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at -2.54 0 270) (size 2.54 2.54) (drill 1.524) (layers *.Cu *.Mask F.SilkS) - (net 171 "Net-(J1-Pad3)")) - (pad 2 thru_hole circle (at 2.54 0 270) (size 2.54 2.54) (drill 1.524) (layers *.Cu *.Mask F.SilkS) - (net 133 GND)) - (model device/bornier_2.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 4652B4CA) - (at 150.876 78.105 90) - (path /47D80202/4652B4CA) - (attr smd) - (fp_text reference C33 (at 0 0 90) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 100nF (at 0 0 90) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 154 "Net-(C33-Pad1)")) - (pad 2 smd rect (at 0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SO16E (layer Composant) (tedit 4280700D) (tstamp 4652B4C1) - (at 158.75 77.851 270) - (descr "Module CMS SOJ 16 pins etroit") - (tags "CMS SOJ") - (path /47D80202/4652B4C1) - (attr smd) - (fp_text reference U5 (at 0 -0.762 270) (layer F.SilkS) - (effects (font (size 1.016 1.143) (thickness 0.127))) - ) - (fp_text value MAX202 (at 0 0.762 270) (layer F.SilkS) - (effects (font (size 1.016 1.143) (thickness 0.127))) - ) - (fp_line (start -5.461 -1.778) (end 5.461 -1.778) (layer F.SilkS) (width 0.2032)) - (fp_line (start 5.461 -1.778) (end 5.461 1.778) (layer F.SilkS) (width 0.2032)) - (fp_line (start 5.461 1.778) (end -5.461 1.778) (layer F.SilkS) (width 0.2032)) - (fp_line (start -5.461 1.778) (end -5.461 -1.778) (layer F.SilkS) (width 0.2032)) - (fp_line (start -5.461 -0.508) (end -4.699 -0.508) (layer F.SilkS) (width 0.2032)) - (fp_line (start -4.699 -0.508) (end -4.699 0.508) (layer F.SilkS) (width 0.2032)) - (fp_line (start -4.699 0.508) (end -5.461 0.508) (layer F.SilkS) (width 0.2032)) - (pad 1 smd rect (at -4.445 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 150 "Net-(C31-Pad1)")) - (pad 2 smd rect (at -3.175 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 149 "Net-(C30-Pad2)")) - (pad 3 smd rect (at -1.905 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 151 "Net-(C31-Pad2)")) - (pad 4 smd rect (at -0.635 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 152 "Net-(C32-Pad1)")) - (pad 5 smd rect (at 0.635 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 153 "Net-(C32-Pad2)")) - (pad 6 smd rect (at 1.905 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 154 "Net-(C33-Pad1)")) - (pad 7 smd rect (at 3.175 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 60 /inout_user/RTS1)) - (pad 8 smd rect (at 4.445 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 47 /inout_user/CTS1)) - (pad 9 smd rect (at 4.445 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 205 "Net-(U5-Pad9)")) - (pad 10 smd rect (at 3.175 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 195 "Net-(R35-Pad2)")) - (pad 11 smd rect (at 1.905 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 203 "Net-(U5-Pad11)")) - (pad 12 smd rect (at 0.635 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 204 "Net-(U5-Pad12)")) - (pad 13 smd rect (at -0.635 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 63 /inout_user/RXD1)) - (pad 14 smd rect (at -1.905 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 67 /inout_user/TXD1)) - (pad 15 smd rect (at -3.175 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (pad 16 smd rect (at -4.445 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (model smd/cms_so16.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.5 0.3 0.5)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SO8E (layer Composant) (tedit 42806F54) (tstamp 4653FF97) - (at 105.918 88.392 90) - (descr "module CMS SOJ 8 pins etroit") - (tags "CMS SOJ") - (path /47D80202/4653FF97) - (attr smd) - (fp_text reference U7 (at 0 -0.889 90) (layer F.SilkS) - (effects (font (size 1.143 1.143) (thickness 0.1524))) - ) - (fp_text value PCA82C251 (at 0 1.016 90) (layer F.SilkS) - (effects (font (size 0.889 0.889) (thickness 0.1524))) - ) - (fp_line (start -2.667 1.778) (end -2.667 1.905) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.667 1.905) (end 2.667 1.905) (layer F.SilkS) (width 0.127)) - (fp_line (start 2.667 -1.905) (end -2.667 -1.905) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.667 -1.905) (end -2.667 1.778) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.667 -0.508) (end -2.159 -0.508) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.159 -0.508) (end -2.159 0.508) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.159 0.508) (end -2.667 0.508) (layer F.SilkS) (width 0.127)) - (fp_line (start 2.667 -1.905) (end 2.667 1.905) (layer F.SilkS) (width 0.127)) - (pad 8 smd rect (at -1.905 -2.667 90) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 196 "Net-(R36-Pad1)")) - (pad 1 smd rect (at -1.905 2.667 90) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 69 /inout_user/TxD_CAN)) - (pad 7 smd rect (at -0.635 -2.667 90) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 44 /inout_user/CAN_H)) - (pad 6 smd rect (at 0.635 -2.667 90) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 45 /inout_user/CAN_L)) - (pad 5 smd rect (at 1.905 -2.667 90) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 206 "Net-(U7-Pad5)")) - (pad 2 smd rect (at -0.635 2.667 90) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (pad 3 smd rect (at 0.635 2.667 90) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 4 smd rect (at 1.905 2.667 90) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 65 /inout_user/RxD_CAN)) - (model smd/cms_so8.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.5 0.32 0.5)) - (rotate (xyz 0 0 0)) - ) - ) - - (module DB9FC (layer Composant) (tedit 200000) (tstamp 4652B26D) - (at 189.103 67.31) - (descr "Connecteur DB9 femelle couche") - (tags "CONN DB9") - (path /47D80202/4652B26D) - (fp_text reference UARTCAN0 (at 1.27 -10.16) (layer F.SilkS) - (effects (font (thickness 0.3048))) - ) - (fp_text value DB9 (at 1.27 -3.81) (layer F.SilkS) - (effects (font (thickness 0.3048))) - ) - (fp_line (start -16.129 2.286) (end 16.383 2.286) (layer F.SilkS) (width 0.3048)) - (fp_line (start 16.383 2.286) (end 16.383 -15.494) (layer F.SilkS) (width 0.3048)) - (fp_line (start 16.383 -15.494) (end -16.129 -15.494) (layer F.SilkS) (width 0.3048)) - (fp_line (start -16.129 -15.494) (end -16.129 2.286) (layer F.SilkS) (width 0.3048)) - (fp_line (start -9.017 -15.494) (end -9.017 -7.874) (layer F.SilkS) (width 0.3048)) - (fp_line (start -9.017 -7.874) (end 9.271 -7.874) (layer F.SilkS) (width 0.3048)) - (fp_line (start 9.271 -7.874) (end 9.271 -15.494) (layer F.SilkS) (width 0.3048)) - (fp_line (start -7.493 -15.494) (end -7.493 -24.13) (layer F.SilkS) (width 0.3048)) - (fp_line (start -7.493 -24.13) (end 7.747 -24.13) (layer F.SilkS) (width 0.3048)) - (fp_line (start 7.747 -24.13) (end 7.747 -15.494) (layer F.SilkS) (width 0.3048)) - (pad "" thru_hole circle (at 12.827 -1.27) (size 3.81 3.81) (drill 3.048) (layers *.Cu *.Mask F.SilkS)) - (pad "" thru_hole circle (at -12.573 -1.27) (size 3.81 3.81) (drill 3.048) (layers *.Cu *.Mask F.SilkS)) - (pad 1 thru_hole rect (at -5.461 1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 271 "Net-(UARTCAN0-Pad1)")) - (pad 2 thru_hole circle (at -2.667 1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 66 /inout_user/TXD0)) - (pad 3 thru_hole circle (at 0 1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 62 /inout_user/RXD0)) - (pad 4 thru_hole circle (at 2.794 1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 271 "Net-(UARTCAN0-Pad1)")) - (pad 5 thru_hole circle (at 5.588 1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 133 GND)) - (pad 6 thru_hole circle (at -4.064 -1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 271 "Net-(UARTCAN0-Pad1)")) - (pad 7 thru_hole circle (at -1.27 -1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 46 /inout_user/CTS0)) - (pad 8 thru_hole circle (at 1.397 -1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 58 /inout_user/RTS0)) - (pad 9 thru_hole circle (at 4.191 -1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 272 "Net-(UARTCAN0-Pad9)")) - (model conn_DBxx/db9_female_pin90deg.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module DB9FC (layer Composant) (tedit 200000) (tstamp 4652B4D4) - (at 122.047 67.31) - (descr "Connecteur DB9 femelle couche") - (tags "CONN DB9") - (path /47D80202/4652B4D4) - (fp_text reference UARTCAN2 (at 1.27 -10.16) (layer F.SilkS) - (effects (font (thickness 0.3048))) - ) - (fp_text value DB9 (at 1.27 -3.81) (layer F.SilkS) - (effects (font (thickness 0.3048))) - ) - (fp_line (start -16.129 2.286) (end 16.383 2.286) (layer F.SilkS) (width 0.3048)) - (fp_line (start 16.383 2.286) (end 16.383 -15.494) (layer F.SilkS) (width 0.3048)) - (fp_line (start 16.383 -15.494) (end -16.129 -15.494) (layer F.SilkS) (width 0.3048)) - (fp_line (start -16.129 -15.494) (end -16.129 2.286) (layer F.SilkS) (width 0.3048)) - (fp_line (start -9.017 -15.494) (end -9.017 -7.874) (layer F.SilkS) (width 0.3048)) - (fp_line (start -9.017 -7.874) (end 9.271 -7.874) (layer F.SilkS) (width 0.3048)) - (fp_line (start 9.271 -7.874) (end 9.271 -15.494) (layer F.SilkS) (width 0.3048)) - (fp_line (start -7.493 -15.494) (end -7.493 -24.13) (layer F.SilkS) (width 0.3048)) - (fp_line (start -7.493 -24.13) (end 7.747 -24.13) (layer F.SilkS) (width 0.3048)) - (fp_line (start 7.747 -24.13) (end 7.747 -15.494) (layer F.SilkS) (width 0.3048)) - (pad "" thru_hole circle (at 12.827 -1.27) (size 3.81 3.81) (drill 3.048) (layers *.Cu *.Mask F.SilkS)) - (pad "" thru_hole circle (at -12.573 -1.27) (size 3.81 3.81) (drill 3.048) (layers *.Cu *.Mask F.SilkS)) - (pad 1 thru_hole rect (at -5.461 1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 275 "Net-(UARTCAN2-Pad1)")) - (pad 2 thru_hole circle (at -2.667 1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 68 /inout_user/TXD2/CANL)) - (pad 3 thru_hole circle (at 0 1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 64 /inout_user/RXD2)) - (pad 4 thru_hole circle (at 2.794 1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 275 "Net-(UARTCAN2-Pad1)")) - (pad 5 thru_hole circle (at 5.588 1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 133 GND)) - (pad 6 thru_hole circle (at -4.064 -1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 275 "Net-(UARTCAN2-Pad1)")) - (pad 7 thru_hole circle (at -1.27 -1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 48 /inout_user/CTS2/CANH)) - (pad 8 thru_hole circle (at 1.397 -1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 61 /inout_user/RTS2)) - (pad 9 thru_hole circle (at 4.191 -1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 276 "Net-(UARTCAN2-Pad9)")) - (model conn_DBxx/db9_female_pin90deg.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module DB9FC (layer Composant) (tedit 200000) (tstamp 4652B4C2) - (at 155.575 67.31) - (descr "Connecteur DB9 femelle couche") - (tags "CONN DB9") - (path /47D80202/4652B4C2) - (fp_text reference UARTCAN1 (at 1.27 -10.16) (layer F.SilkS) - (effects (font (thickness 0.3048))) - ) - (fp_text value DB9 (at 1.27 -3.81) (layer F.SilkS) - (effects (font (thickness 0.3048))) - ) - (fp_line (start -16.129 2.286) (end 16.383 2.286) (layer F.SilkS) (width 0.3048)) - (fp_line (start 16.383 2.286) (end 16.383 -15.494) (layer F.SilkS) (width 0.3048)) - (fp_line (start 16.383 -15.494) (end -16.129 -15.494) (layer F.SilkS) (width 0.3048)) - (fp_line (start -16.129 -15.494) (end -16.129 2.286) (layer F.SilkS) (width 0.3048)) - (fp_line (start -9.017 -15.494) (end -9.017 -7.874) (layer F.SilkS) (width 0.3048)) - (fp_line (start -9.017 -7.874) (end 9.271 -7.874) (layer F.SilkS) (width 0.3048)) - (fp_line (start 9.271 -7.874) (end 9.271 -15.494) (layer F.SilkS) (width 0.3048)) - (fp_line (start -7.493 -15.494) (end -7.493 -24.13) (layer F.SilkS) (width 0.3048)) - (fp_line (start -7.493 -24.13) (end 7.747 -24.13) (layer F.SilkS) (width 0.3048)) - (fp_line (start 7.747 -24.13) (end 7.747 -15.494) (layer F.SilkS) (width 0.3048)) - (pad "" thru_hole circle (at 12.827 -1.27) (size 3.81 3.81) (drill 3.048) (layers *.Cu *.Mask F.SilkS)) - (pad "" thru_hole circle (at -12.573 -1.27) (size 3.81 3.81) (drill 3.048) (layers *.Cu *.Mask F.SilkS)) - (pad 1 thru_hole rect (at -5.461 1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 273 "Net-(UARTCAN1-Pad1)")) - (pad 2 thru_hole circle (at -2.667 1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 67 /inout_user/TXD1)) - (pad 3 thru_hole circle (at 0 1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 63 /inout_user/RXD1)) - (pad 4 thru_hole circle (at 2.794 1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 273 "Net-(UARTCAN1-Pad1)")) - (pad 5 thru_hole circle (at 5.588 1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 133 GND)) - (pad 6 thru_hole circle (at -4.064 -1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 273 "Net-(UARTCAN1-Pad1)")) - (pad 7 thru_hole circle (at -1.27 -1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 47 /inout_user/CTS1)) - (pad 8 thru_hole circle (at 1.397 -1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 60 /inout_user/RTS1)) - (pad 9 thru_hole circle (at 4.191 -1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 274 "Net-(UARTCAN1-Pad9)")) - (model conn_DBxx/db9_female_pin90deg.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module VQFP100 (layer Composant) (tedit 49489CC7) (tstamp 46161C39) - (at 135.382 101.473) - (descr "Module CMS Vqfp 100 pins") - (tags "CMS VQFP") - (path /46161C39) - (attr smd) - (fp_text reference U1 (at 0 -1.905) (layer F.SilkS) - (effects (font (size 1.524 1.016) (thickness 0.254))) - ) - (fp_text value MCF5213-LQFP100 (at 0 2.54) (layer F.SilkS) - (effects (font (size 1.016 0.762) (thickness 0.1524))) - ) - (fp_circle (center 6.096 -6.477) (end 6.096 -6.985) (layer F.SilkS) (width 0.2032)) - (fp_line (start 6.985 -6.35) (end 6.35 -6.985) (layer F.SilkS) (width 0.2032)) - (fp_line (start -6.985 -6.731) (end -6.731 -6.985) (layer F.SilkS) (width 0.2032)) - (fp_line (start -6.985 6.731) (end -6.731 6.985) (layer F.SilkS) (width 0.2032)) - (fp_line (start 6.731 6.985) (end 6.985 6.731) (layer F.SilkS) (width 0.2032)) - (fp_line (start 6.35 -6.985) (end -6.731 -6.985) (layer F.SilkS) (width 0.2032)) - (fp_line (start -6.985 -6.731) (end -6.985 6.731) (layer F.SilkS) (width 0.2032)) - (fp_line (start -6.731 6.985) (end 6.731 6.985) (layer F.SilkS) (width 0.2032)) - (fp_line (start 6.985 6.731) (end 6.985 -6.35) (layer F.SilkS) (width 0.2032)) - (pad 100 smd rect (at 7.747 -5.9944) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 77 /inout_user/URXD1)) - (pad 76 smd rect (at 7.747 5.9944) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 10 /BKPT-)) - (pad 77 smd rect (at 7.747 5.4864) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 14 /DDAT0)) - (pad 78 smd rect (at 7.747 5.0038) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 15 /DDAT1)) - (pad 79 smd rect (at 7.747 4.4958) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 19 /DSI)) - (pad 80 smd rect (at 7.747 3.9878) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 20 /DSO)) - (pad 81 smd rect (at 7.747 3.5052) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 82 smd rect (at 7.747 2.9972) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (pad 83 smd rect (at 7.747 2.4892) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 16 /DDAT2)) - (pad 84 smd rect (at 7.747 2.0066) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 17 /DDAT3)) - (pad 85 smd rect (at 7.747 1.4986) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 18 /DSCLK)) - (pad 86 smd rect (at 7.747 0.9906) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 1 /ALLPST)) - (pad 87 smd rect (at 7.747 0.4826) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 85 /xilinx/IRQ-1)) - (pad 88 smd rect (at 7.747 0) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 86 /xilinx/IRQ-2)) - (pad 89 smd rect (at 7.747 -0.508) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 87 /xilinx/IRQ-3)) - (pad 90 smd rect (at 7.747 -1.016) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 29 /IRQ-4)) - (pad 91 smd rect (at 7.747 -1.4986) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 30 /IRQ-5)) - (pad 92 smd rect (at 7.747 -2.0066) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (pad 93 smd rect (at 7.747 -2.5146) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 94 smd rect (at 7.747 -2.9972) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 31 /IRQ-6)) - (pad 95 smd rect (at 7.747 -3.5052) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 32 /IRQ-7)) - (pad 96 smd rect (at 7.747 -4.0132) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 57 /inout_user/RSTI-)) - (pad 97 smd rect (at 7.747 -4.4958) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 59 /inout_user/RTS0-)) - (pad 98 smd rect (at 7.747 -5.0038) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 71 /inout_user/UCTS1)) - (pad 99 smd rect (at 7.747 -5.5118) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 80 /inout_user/UTXD1)) - (pad 75 smd rect (at 5.9944 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (pad 51 smd rect (at -5.9944 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 9 /AN7)) - (pad 52 smd rect (at -5.4864 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 8 /AN6)) - (pad 53 smd rect (at -5.0038 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 7 /AN5)) - (pad 54 smd rect (at -4.4958 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 6 /AN4)) - (pad 55 smd rect (at -3.9878 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 56 smd rect (at -3.5052 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (pad 57 smd rect (at -2.9972 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 58 smd rect (at -2.4892 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 25 /GPT0)) - (pad 59 smd rect (at -2.0066 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 26 /GPT1)) - (pad 60 smd rect (at -1.4986 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 51 /inout_user/PWM5)) - (pad 61 smd rect (at -0.9906 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 27 /GPT2)) - (pad 62 smd rect (at -0.4826 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 28 /GPT3)) - (pad 63 smd rect (at 0 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 52 /inout_user/PWM7)) - (pad 64 smd rect (at 0.508 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 197 "Net-(R46-Pad1)")) - (pad 65 smd rect (at 1.016 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 34 /PST0)) - (pad 66 smd rect (at 1.4986 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 35 /PST1)) - (pad 67 smd rect (at 2.0066 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (pad 68 smd rect (at 2.5146 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 69 smd rect (at 2.9972 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 36 /PST2)) - (pad 70 smd rect (at 3.5052 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 37 /PST3)) - (pad 71 smd rect (at 4.0132 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (pad 72 smd rect (at 4.4958 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 84 /xilinx/GLCK2)) - (pad 73 smd rect (at 5.0038 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 11 /CLKIN/EXTAL)) - (pad 74 smd rect (at 5.5118 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 41 /VDDPLL)) - (pad 1 smd rect (at 5.9944 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 5.4864 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 3 smd rect (at 5.0038 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (pad 4 smd rect (at 4.4958 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 74 /inout_user/URTS1)) - (pad 5 smd rect (at 3.9878 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 198 "Net-(R9-Pad1)")) - (pad 6 smd rect (at 3.5052 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 70 /inout_user/UCTS0)) - (pad 7 smd rect (at 2.9972 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 76 /inout_user/URXD0)) - (pad 8 smd rect (at 2.4892 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 79 /inout_user/UTXD0)) - (pad 9 smd rect (at 2.0066 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 73 /inout_user/URTS0)) - (pad 10 smd rect (at 1.4986 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 43 /inout_user/CANTX)) - (pad 11 smd rect (at 0.9906 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 42 /inout_user/CANRX)) - (pad 12 smd rect (at 0.4826 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 39 /QSPI_CS3)) - (pad 13 smd rect (at 0 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 91 /xilinx/QSPI_CS2)) - (pad 14 smd rect (at -0.508 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 15 smd rect (at -1.016 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (pad 16 smd rect (at -1.4986 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 53 /inout_user/QSPI_DIN)) - (pad 17 smd rect (at -2.0066 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 54 /inout_user/QSPI_DOUT)) - (pad 18 smd rect (at -2.5146 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 55 /inout_user/QSPI_SCLK)) - (pad 19 smd rect (at -2.9972 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 90 /xilinx/QSPI_CS1)) - (pad 20 smd rect (at -3.5052 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 38 /QSPI_CS0)) - (pad 21 smd rect (at -4.0132 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 56 /inout_user/RCON-)) - (pad 22 smd rect (at -4.4958 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 23 smd rect (at -5.0038 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 24 smd rect (at -5.5118 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (pad 25 smd rect (at -5.9944 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (pad 26 smd rect (at -7.747 -5.9944) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 33 /JTAG_EN)) - (pad 27 smd rect (at -7.747 -5.4864) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 72 /inout_user/UCTS2)) - (pad 28 smd rect (at -7.747 -5.0038) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 78 /inout_user/URXD2)) - (pad 29 smd rect (at -7.747 -4.4958) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 81 /inout_user/UTXD2)) - (pad 30 smd rect (at -7.747 -3.9878) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 75 /inout_user/URTS2)) - (pad 31 smd rect (at -7.747 -3.5052) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 23 /DTIN2)) - (pad 32 smd rect (at -7.747 -2.9972) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 24 /DTIN3)) - (pad 33 smd rect (at -7.747 -2.4892) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 50 /inout_user/PWM3)) - (pad 34 smd rect (at -7.747 -2.0066) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 35 smd rect (at -7.747 -1.4986) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (pad 36 smd rect (at -7.747 -0.9906) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 21 /DTIN0)) - (pad 37 smd rect (at -7.747 -0.4826) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 22 /DTIN1)) - (pad 38 smd rect (at -7.747 0) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 49 /inout_user/PWM1)) - (pad 39 smd rect (at -7.747 0.508) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 13 /CLKMOD1)) - (pad 40 smd rect (at -7.747 1.016) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 12 /CLKMOD0)) - (pad 41 smd rect (at -7.747 1.4986) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 42 smd rect (at -7.747 2.0066) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (pad 43 smd rect (at -7.747 2.5146) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 2 /AN0)) - (pad 44 smd rect (at -7.747 2.9972) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 3 /AN1)) - (pad 45 smd rect (at -7.747 3.5052) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 4 /AN2)) - (pad 46 smd rect (at -7.747 4.0132) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 5 /AN3)) - (pad 47 smd rect (at -7.747 4.4958) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 134 GNDA)) - (pad 48 smd rect (at -7.747 5.0038) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 134 GNDA)) - (pad 49 smd rect (at -7.747 5.5118) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 82 /inout_user/VCCA)) - (pad 50 smd rect (at -7.747 5.9944) (size 1.016 0.254) (layers Composant F.Paste F.Mask) - (net 82 /inout_user/VCCA)) - (model smd/vqfp100.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.394 0.394 0.4)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SO16E (layer Composant) (tedit 4280700D) (tstamp 4652B4D3) - (at 125.73 77.851 270) - (descr "Module CMS SOJ 16 pins etroit") - (tags "CMS SOJ") - (path /47D80202/4652B4D3) - (attr smd) - (fp_text reference U8 (at 0 -0.762 270) (layer F.SilkS) - (effects (font (size 1.016 1.143) (thickness 0.127))) - ) - (fp_text value MAX202 (at 0 0.762 270) (layer F.SilkS) - (effects (font (size 1.016 1.143) (thickness 0.127))) - ) - (fp_line (start -5.461 -1.778) (end 5.461 -1.778) (layer F.SilkS) (width 0.2032)) - (fp_line (start 5.461 -1.778) (end 5.461 1.778) (layer F.SilkS) (width 0.2032)) - (fp_line (start 5.461 1.778) (end -5.461 1.778) (layer F.SilkS) (width 0.2032)) - (fp_line (start -5.461 1.778) (end -5.461 -1.778) (layer F.SilkS) (width 0.2032)) - (fp_line (start -5.461 -0.508) (end -4.699 -0.508) (layer F.SilkS) (width 0.2032)) - (fp_line (start -4.699 -0.508) (end -4.699 0.508) (layer F.SilkS) (width 0.2032)) - (fp_line (start -4.699 0.508) (end -5.461 0.508) (layer F.SilkS) (width 0.2032)) - (pad 1 smd rect (at -4.445 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 160 "Net-(C44-Pad1)")) - (pad 2 smd rect (at -3.175 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 155 "Net-(C35-Pad2)")) - (pad 3 smd rect (at -1.905 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 161 "Net-(C44-Pad2)")) - (pad 4 smd rect (at -0.635 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 156 "Net-(C36-Pad1)")) - (pad 5 smd rect (at 0.635 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 157 "Net-(C36-Pad2)")) - (pad 6 smd rect (at 1.905 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 162 "Net-(C45-Pad1)")) - (pad 7 smd rect (at 3.175 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 166 "Net-(COM_SEL3-Pad3)")) - (pad 8 smd rect (at 4.445 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 165 "Net-(COM_SEL2-Pad3)")) - (pad 9 smd rect (at 4.445 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 209 "Net-(U8-Pad9)")) - (pad 10 smd rect (at 3.175 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 207 "Net-(U8-Pad10)")) - (pad 11 smd rect (at 1.905 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 189 "Net-(R23-Pad2)")) - (pad 12 smd rect (at 0.635 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 208 "Net-(U8-Pad12)")) - (pad 13 smd rect (at -0.635 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 164 "Net-(COM_SEL1-Pad3)")) - (pad 14 smd rect (at -1.905 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 61 /inout_user/RTS2)) - (pad 15 smd rect (at -3.175 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (pad 16 smd rect (at -4.445 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (model smd/cms_so16.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.5 0.3 0.5)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SO16E (layer Composant) (tedit 4280700D) (tstamp 4652B22B) - (at 186.69 77.851 270) - (descr "Module CMS SOJ 16 pins etroit") - (tags "CMS SOJ") - (path /47D80202/4652B22B) - (attr smd) - (fp_text reference U3 (at 0 -0.762 270) (layer F.SilkS) - (effects (font (size 1.016 1.143) (thickness 0.127))) - ) - (fp_text value MAX202 (at 0 0.762 270) (layer F.SilkS) - (effects (font (size 1.016 1.143) (thickness 0.127))) - ) - (fp_line (start -5.461 -1.778) (end 5.461 -1.778) (layer F.SilkS) (width 0.2032)) - (fp_line (start 5.461 -1.778) (end 5.461 1.778) (layer F.SilkS) (width 0.2032)) - (fp_line (start 5.461 1.778) (end -5.461 1.778) (layer F.SilkS) (width 0.2032)) - (fp_line (start -5.461 1.778) (end -5.461 -1.778) (layer F.SilkS) (width 0.2032)) - (fp_line (start -5.461 -0.508) (end -4.699 -0.508) (layer F.SilkS) (width 0.2032)) - (fp_line (start -4.699 -0.508) (end -4.699 0.508) (layer F.SilkS) (width 0.2032)) - (fp_line (start -4.699 0.508) (end -5.461 0.508) (layer F.SilkS) (width 0.2032)) - (pad 1 smd rect (at -4.445 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 143 "Net-(C24-Pad1)")) - (pad 2 smd rect (at -3.175 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 142 "Net-(C23-Pad2)")) - (pad 3 smd rect (at -1.905 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 144 "Net-(C24-Pad2)")) - (pad 4 smd rect (at -0.635 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 145 "Net-(C25-Pad1)")) - (pad 5 smd rect (at 0.635 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 146 "Net-(C25-Pad2)")) - (pad 6 smd rect (at 1.905 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 147 "Net-(C27-Pad1)")) - (pad 7 smd rect (at 3.175 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 58 /inout_user/RTS0)) - (pad 8 smd rect (at 4.445 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 46 /inout_user/CTS0)) - (pad 9 smd rect (at 4.445 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 202 "Net-(U3-Pad9)")) - (pad 10 smd rect (at 3.175 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 191 "Net-(R30-Pad2)")) - (pad 11 smd rect (at 1.905 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 200 "Net-(U3-Pad11)")) - (pad 12 smd rect (at 0.635 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 201 "Net-(U3-Pad12)")) - (pad 13 smd rect (at -0.635 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 62 /inout_user/RXD0)) - (pad 14 smd rect (at -1.905 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 66 /inout_user/TXD0)) - (pad 15 smd rect (at -3.175 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (pad 16 smd rect (at -4.445 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (model smd/cms_so16.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.5 0.3 0.5)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SO14E (layer Composant) (tedit 42806FBF) (tstamp 4652B03E) - (at 100.203 117.602 270) - (descr "module CMS SOJ 14 pins etroit") - (tags "CMS SOJ") - (path /47D80202/4652B03E) - (attr smd) - (fp_text reference U4 (at 0 -0.762 270) (layer F.SilkS) - (effects (font (size 1.016 1.143) (thickness 0.127))) - ) - (fp_text value 74HC125 (at 0 1.016 270) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.127))) - ) - (fp_line (start -4.826 -1.778) (end 4.826 -1.778) (layer F.SilkS) (width 0.2032)) - (fp_line (start 4.826 -1.778) (end 4.826 2.032) (layer F.SilkS) (width 0.2032)) - (fp_line (start 4.826 2.032) (end -4.826 2.032) (layer F.SilkS) (width 0.2032)) - (fp_line (start -4.826 2.032) (end -4.826 -1.778) (layer F.SilkS) (width 0.2032)) - (fp_line (start -4.826 -0.508) (end -4.064 -0.508) (layer F.SilkS) (width 0.2032)) - (fp_line (start -4.064 -0.508) (end -4.064 0.508) (layer F.SilkS) (width 0.2032)) - (fp_line (start -4.064 0.508) (end -4.826 0.508) (layer F.SilkS) (width 0.2032)) - (pad 1 smd rect (at -3.81 2.794 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 179 "Net-(LED_EN1-Pad2)")) - (pad 2 smd rect (at -2.54 2.794 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 21 /DTIN0)) - (pad 3 smd rect (at -1.27 2.794 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 190 "Net-(R28-Pad2)")) - (pad 4 smd rect (at 0 2.794 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 179 "Net-(LED_EN1-Pad2)")) - (pad 5 smd rect (at 1.27 2.794 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 22 /DTIN1)) - (pad 6 smd rect (at 2.54 2.794 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 192 "Net-(R31-Pad2)")) - (pad 7 smd rect (at 3.81 2.794 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (pad 8 smd rect (at 3.81 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 194 "Net-(R33-Pad2)")) - (pad 9 smd rect (at 2.54 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 24 /DTIN3)) - (pad 10 smd rect (at 1.27 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 179 "Net-(LED_EN1-Pad2)")) - (pad 11 smd rect (at 0 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 193 "Net-(R32-Pad2)")) - (pad 12 smd rect (at -1.27 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 23 /DTIN2)) - (pad 13 smd rect (at -2.54 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 179 "Net-(LED_EN1-Pad2)")) - (pad 14 smd rect (at -3.81 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (model smd/cms_so14.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.5 0.3 0.5)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 46161CB5) - (at 141.605 91.059 180) - (path /46161CB5) - (attr smd) - (fp_text reference C4 (at 0 0 180) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 100nF (at 0 0 180) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 46161CB8) - (at 134.493 91.44 180) - (path /46161CB8) - (attr smd) - (fp_text reference C5 (at 0 0 180) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 100nF (at 0 0 180) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Cuivre) (tedit 42806E04) (tstamp 461BB5E5) - (at 129.921 91.44 180) - (path /461BB5E5) - (attr smd) - (fp_text reference C6 (at 0 0 180) (layer B.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127)) (justify mirror)) - ) - (fp_text value 100nF (at 0 0 180) (layer B.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127)) (justify mirror)) - ) - (fp_circle (center -1.651 -0.762) (end -1.651 -0.635) (layer B.SilkS) (width 0.127)) - (fp_line (start -0.508 -0.762) (end -1.524 -0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -1.524 0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -0.508 0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start 0.508 0.762) (end 1.524 0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 1.524 -0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 0.508 -0.762) (layer B.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) - (net 133 GND)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 46161CD3) - (at 125.349 99.822 270) - (path /46161CD3) - (attr smd) - (fp_text reference C7 (at 0 0 270) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 100nF (at 0 0 270) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 46161CD4) - (at 124.587 103.505 180) - (path /46161CD4) - (attr smd) - (fp_text reference C8 (at 0 0 180) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 100nF (at 0 0 180) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 46161CD7) - (at 131.953 112.268 180) - (path /46161CD7) - (attr smd) - (fp_text reference C9 (at 0 0 180) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 100nF (at 0 0 180) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 46161CD8) - (at 137.541 111.633 180) - (path /46161CD8) - (attr smd) - (fp_text reference C10 (at 0 0 180) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 100nF (at 0 0 180) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Cuivre) (tedit 42806E04) (tstamp 46161CD9) - (at 145.288 104.775 90) - (path /46161CD9) - (attr smd) - (fp_text reference C11 (at 0 0 90) (layer B.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127)) (justify mirror)) - ) - (fp_text value 100nF (at 0 0 90) (layer B.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127)) (justify mirror)) - ) - (fp_circle (center -1.651 -0.762) (end -1.651 -0.635) (layer B.SilkS) (width 0.127)) - (fp_line (start -0.508 -0.762) (end -1.524 -0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -1.524 0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -0.508 0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start 0.508 0.762) (end 1.524 0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 1.524 -0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 0.508 -0.762) (layer B.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 90) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 0.9525 0 90) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) - (net 133 GND)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Cuivre) (tedit 42806E04) (tstamp 46161CDA) - (at 145.415 99.314 270) - (path /46161CDA) - (attr smd) - (fp_text reference C12 (at 0 0 270) (layer B.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127)) (justify mirror)) - ) - (fp_text value 100nF (at 0 0 270) (layer B.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127)) (justify mirror)) - ) - (fp_circle (center -1.651 -0.762) (end -1.651 -0.635) (layer B.SilkS) (width 0.127)) - (fp_line (start -0.508 -0.762) (end -1.524 -0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -1.524 0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -0.508 0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start 0.508 0.762) (end 1.524 0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 1.524 -0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 0.508 -0.762) (layer B.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) - (net 133 GND)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 46237DF9) - (at 160.401 105.537) - (path /46237DF9) - (attr smd) - (fp_text reference C14 (at 0 0) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 100nF (at 0 0) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (pad 2 smd rect (at 0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 46237E36) - (at 160.401 111.252 180) - (path /46237E36) - (attr smd) - (fp_text reference C15 (at 0 0 180) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 100nF (at 0 0 180) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 141 "Net-(C15-Pad1)")) - (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 4652B067) - (at 93.218 121.158) - (path /47D80202/4652B067) - (attr smd) - (fp_text reference R31 (at 0 0) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 270 (at 0 0) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 174 "Net-(LED2-Pad1)")) - (pad 2 smd rect (at 0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 192 "Net-(R31-Pad2)")) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 46238286) - (at 123.825 108.712) - (path /46238286) - (attr smd) - (fp_text reference C18 (at 0 0) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 100nF (at 0 0) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 82 /inout_user/VCCA)) - (pad 2 smd rect (at 0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 134 GNDA)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 461BE364) - (at 141.732 112.395 270) - (path /461BE364) - (attr smd) - (fp_text reference C20 (at 0 0 270) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 1nF (at 0 0 270) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 41 /VDDPLL)) - (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 461BE35C) - (at 143.51 112.649 270) - (path /461BE35C) - (attr smd) - (fp_text reference C21 (at 0 0 270) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 100nF (at 0 0 270) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 41 /VDDPLL)) - (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 4652B365) - (at 192.532 74.168 270) - (path /47D80202/4652B365) - (attr smd) - (fp_text reference C22 (at 0 0 270) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 100nF (at 0 0 270) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 4652B33B) - (at 189.23 71.247 180) - (path /47D80202/4652B33B) - (attr smd) - (fp_text reference C23 (at 0 0 180) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 100nF (at 0 0 180) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 142 "Net-(C23-Pad2)")) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 4652B354) - (at 181.102 73.914 270) - (path /47D80202/4652B354) - (attr smd) - (fp_text reference C24 (at 0 0 270) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 100nF (at 0 0 270) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 143 "Net-(C24-Pad1)")) - (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 144 "Net-(C24-Pad2)")) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 4652B35B) - (at 181.102 78.232 270) - (path /47D80202/4652B35B) - (attr smd) - (fp_text reference C25 (at 0 0 270) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 100nF (at 0 0 270) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 145 "Net-(C25-Pad1)")) - (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 146 "Net-(C25-Pad2)")) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 4652B486) - (at 178.562 78.105 90) - (path /47D80202/4652B486) - (attr smd) - (fp_text reference C27 (at 0 0 90) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 100nF (at 0 0 90) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 147 "Net-(C27-Pad1)")) - (pad 2 smd rect (at 0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 4652B4C7) - (at 164.592 74.168 270) - (path /47D80202/4652B4C7) - (attr smd) - (fp_text reference C28 (at 0 0 270) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 100nF (at 0 0 270) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 4652B4C4) - (at 161.29 71.247 180) - (path /47D80202/4652B4C4) - (attr smd) - (fp_text reference C30 (at 0 0 180) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 100nF (at 0 0 180) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 149 "Net-(C30-Pad2)")) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 4652B4C5) - (at 153.162 73.787 270) - (path /47D80202/4652B4C5) - (attr smd) - (fp_text reference C31 (at 0 0 270) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 100nF (at 0 0 270) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 150 "Net-(C31-Pad1)")) - (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 151 "Net-(C31-Pad2)")) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 4652B4C6) - (at 153.035 78.105 270) - (path /47D80202/4652B4C6) - (attr smd) - (fp_text reference C32 (at 0 0 270) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 100nF (at 0 0 270) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 152 "Net-(C32-Pad1)")) - (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 153 "Net-(C32-Pad2)")) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 4653FFFE) - (at 108.458 84.328) - (path /47D80202/4653FFFE) - (attr smd) - (fp_text reference C34 (at 0 0) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 100nF (at 0 0) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 4652B4D6) - (at 128.27 71.247 180) - (path /47D80202/4652B4D6) - (attr smd) - (fp_text reference C35 (at 0 0 180) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 100nF (at 0 0 180) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 155 "Net-(C35-Pad2)")) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 4652B4D8) - (at 120.142 78.105 270) - (path /47D80202/4652B4D8) - (attr smd) - (fp_text reference C36 (at 0 0 270) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 100nF (at 0 0 270) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 156 "Net-(C36-Pad1)")) - (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 157 "Net-(C36-Pad2)")) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 46238468) - (at 164.846 94.361 90) - (path /46238468) - (attr smd) - (fp_text reference C3 (at 0 0 90) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 1nF (at 0 0 90) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 148 "Net-(C3-Pad1)")) - (pad 2 smd rect (at 0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 462389C0) - (at 136.652 123.063 90) - (path /462389C0) - (attr smd) - (fp_text reference C2 (at 0 0 90) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 10pF (at 0 0 90) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 84 /xilinx/GLCK2)) - (pad 2 smd rect (at 0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 462389BC) - (at 136.652 117.729 270) - (path /462389BC) - (attr smd) - (fp_text reference C1 (at 0 0 270) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 10pF (at 0 0 270) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 11 /CLKIN/EXTAL)) - (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 465306F6) + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DDEA) (at 104.267 73.152 90) (path /47D80202/465306F6) (attr smd) - (fp_text reference C41 (at 0 0 90) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) + (fp_text reference C41 (at 0 -0.3175 90) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) ) - (fp_text value 100nF (at 0 0 90) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) + (fp_text value 100nF (at 0 0.381 90) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) (pad 1 smd rect (at -0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 158 "Net-(C38-Pad1)")) + (net 128 "Net-(C38-Pad1)")) (pad 2 smd rect (at 0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 133 GND)) + (net 103 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) (rotate (xyz 0 0 0)) ) ) - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 4652A9D3) + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DDF6) (at 183.769 125.73) (path /47D80202/4652A9D3) (attr smd) - (fp_text reference C43 (at 0 0) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) + (fp_text reference C43 (at 0 -0.3175) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) ) - (fp_text value 100nF (at 0 0) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) + (fp_text value 100nF (at 0 0.381) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) (pad 1 smd rect (at -0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 133 GND)) + (net 103 GND)) (pad 2 smd rect (at 0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 159 "Net-(C43-Pad2)")) + (net 129 "Net-(C43-Pad2)")) (model smd/chip_cms.wrl (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) (rotate (xyz 0 0 0)) ) ) - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 4652B4D7) + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DE02) (at 120.142 73.787 270) (path /47D80202/4652B4D7) (attr smd) - (fp_text reference C44 (at 0 0 270) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) + (fp_text reference C44 (at 0 -0.3175 270) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) ) - (fp_text value 100nF (at 0 0 270) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) + (fp_text value 100nF (at 0 0.381 270) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 160 "Net-(C44-Pad1)")) + (net 130 "Net-(C44-Pad1)")) (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 161 "Net-(C44-Pad2)")) + (net 131 "Net-(C44-Pad2)")) (model smd/chip_cms.wrl (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) (rotate (xyz 0 0 0)) ) ) - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 4652B4DC) + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DE0E) (at 117.602 78.105 90) (path /47D80202/4652B4DC) (attr smd) - (fp_text reference C45 (at 0 0 90) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) + (fp_text reference C45 (at 0 -0.3175 90) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) ) - (fp_text value 100nF (at 0 0 90) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) + (fp_text value 100nF (at 0 0.381 90) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) (pad 1 smd rect (at -0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 162 "Net-(C45-Pad1)")) + (net 132 "Net-(C45-Pad1)")) (pad 2 smd rect (at 0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 133 GND)) + (net 103 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) (rotate (xyz 0 0 0)) ) ) - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 4652B4D9) + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DE1A) (at 130.937 74.549 270) (path /47D80202/4652B4D9) (attr smd) - (fp_text reference C46 (at 0 0 270) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) + (fp_text reference C46 (at 0 -0.3175 270) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) ) - (fp_text value 100nF (at 0 0 270) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) + (fp_text value 100nF (at 0 0.381 270) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 278 VDD)) + (net 105 VDD)) (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 133 GND)) + (net 103 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) (rotate (xyz 0 0 0)) ) ) - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 46540063) - (at 101.854 93.345) - (path /47D80202/46540063) + (module lib_smd:SM0805 (layer Cuivre) (tedit 53D8D2B1) (tstamp 53D8DE26) + (at 209.296 100.838 90) + (path /47D80204/46A76BB2) (attr smd) - (fp_text reference R36 (at 0 0) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) + (fp_text reference C51 (at 0 0.3175 90) (layer B.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922)) (justify mirror)) ) - (fp_text value 1K (at 0 0) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) + (fp_text value 100nF (at 0 -0.381 90) (layer B.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922)) (justify mirror)) ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 196 "Net-(R36-Pad1)")) - (pad 2 smd rect (at 0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 133 GND)) + (fp_circle (center -1.651 -0.762) (end -1.651 -0.635) (layer B.SilkS) (width 0.09906)) + (fp_line (start -0.508 -0.762) (end -1.524 -0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -1.524 0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -0.508 0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start 0.508 0.762) (end 1.524 0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 1.524 -0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 0.508 -0.762) (layer B.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 90) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.9525 0 90) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) + (net 103 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) (rotate (xyz 0 0 0)) ) ) - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 4652B9D5) - (at 192.532 82.296 90) - (path /47D80202/4652B9D5) + (module lib_smd:SM0805 (layer Cuivre) (tedit 53D8D2B1) (tstamp 53D8DE32) + (at 191.008 107.315 180) + (path /47D80204/46A76BB3) (attr smd) - (fp_text reference R30 (at 0 0 90) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) + (fp_text reference C52 (at 0 0.3175 180) (layer B.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922)) (justify mirror)) ) - (fp_text value 10K (at 0 0 90) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) + (fp_text value 100nF (at 0 -0.381 180) (layer B.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922)) (justify mirror)) ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (pad 2 smd rect (at 0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 191 "Net-(R30-Pad2)")) + (fp_circle (center -1.651 -0.762) (end -1.651 -0.635) (layer B.SilkS) (width 0.09906)) + (fp_line (start -0.508 -0.762) (end -1.524 -0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -1.524 0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -0.508 0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start 0.508 0.762) (end 1.524 0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 1.524 -0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 0.508 -0.762) (layer B.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) + (net 103 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) (rotate (xyz 0 0 0)) ) ) - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 4652B069) - (at 93.218 125.349) - (path /47D80202/4652B069) + (module lib_smd:SM0805 (layer Cuivre) (tedit 53D8D2B1) (tstamp 53D8DE3E) + (at 203.454 100.838 90) + (path /47D80204/46A76BB4) (attr smd) - (fp_text reference R32 (at 0 0) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) + (fp_text reference C53 (at 0 0.3175 90) (layer B.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922)) (justify mirror)) ) - (fp_text value 270 (at 0 0) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) + (fp_text value 100nF (at 0 -0.381 90) (layer B.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922)) (justify mirror)) ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 175 "Net-(LED3-Pad1)")) - (pad 2 smd rect (at 0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 193 "Net-(R32-Pad2)")) + (fp_circle (center -1.651 -0.762) (end -1.651 -0.635) (layer B.SilkS) (width 0.09906)) + (fp_line (start -0.508 -0.762) (end -1.524 -0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -1.524 0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -0.508 0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start 0.508 0.762) (end 1.524 0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 1.524 -0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 0.508 -0.762) (layer B.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 90) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.9525 0 90) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) + (net 103 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) (rotate (xyz 0 0 0)) ) ) - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 4652B06A) - (at 93.218 129.413) - (path /47D80202/4652B06A) + (module lib_smd:SM0805 (layer Cuivre) (tedit 53D8D2B1) (tstamp 53D8DE4A) + (at 208.28 110.49 270) + (path /47D80204/46A76BB5) (attr smd) - (fp_text reference R33 (at 0 0) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) + (fp_text reference C54 (at 0 0.3175 270) (layer B.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922)) (justify mirror)) ) - (fp_text value 270 (at 0 0) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) + (fp_text value 100nF (at 0 -0.381 270) (layer B.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922)) (justify mirror)) ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 176 "Net-(LED4-Pad1)")) - (pad 2 smd rect (at 0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 194 "Net-(R33-Pad2)")) + (fp_circle (center -1.651 -0.762) (end -1.651 -0.635) (layer B.SilkS) (width 0.09906)) + (fp_line (start -0.508 -0.762) (end -1.524 -0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -1.524 0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -0.508 0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start 0.508 0.762) (end 1.524 0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 1.524 -0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 0.508 -0.762) (layer B.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) + (net 103 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) (rotate (xyz 0 0 0)) ) ) - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 4652B111) - (at 96.52 110.236 180) - (path /47D80202/4652B111) + (module lib_smd:SM0805 (layer Cuivre) (tedit 53D8D2B1) (tstamp 53D8DE56) + (at 201.422 123.444 270) + (path /47D80204/46A76BAE) (attr smd) - (fp_text reference R34 (at 0 0 180) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) + (fp_text reference C55 (at 0 0.3175 270) (layer B.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922)) (justify mirror)) ) - (fp_text value 10K (at 0 0 180) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) + (fp_text value 100nF (at 0 -0.381 270) (layer B.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922)) (justify mirror)) ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 179 "Net-(LED_EN1-Pad2)")) + (fp_circle (center -1.651 -0.762) (end -1.651 -0.635) (layer B.SilkS) (width 0.09906)) + (fp_line (start -0.508 -0.762) (end -1.524 -0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -1.524 0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -0.508 0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start 0.508 0.762) (end 1.524 0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 1.524 -0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 0.508 -0.762) (layer B.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) + (net 103 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) (rotate (xyz 0 0 0)) ) ) - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 4652B061) - (at 93.218 117.094) - (path /47D80202/4652B061) + (module lib_smd:SM0805 (layer Cuivre) (tedit 53D8D2B1) (tstamp 53D8DE62) + (at 208.28 119.38 270) + (path /47D80204/46A76BAF) (attr smd) - (fp_text reference R28 (at 0 0) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) + (fp_text reference C56 (at 0 0.3175 270) (layer B.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922)) (justify mirror)) ) - (fp_text value 270 (at 0 0) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) + (fp_text value 100nF (at 0 -0.381 270) (layer B.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922)) (justify mirror)) ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 173 "Net-(LED1-Pad1)")) - (pad 2 smd rect (at 0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 190 "Net-(R28-Pad2)")) + (fp_circle (center -1.651 -0.762) (end -1.651 -0.635) (layer B.SilkS) (width 0.09906)) + (fp_line (start -0.508 -0.762) (end -1.524 -0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -1.524 0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -0.508 0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start 0.508 0.762) (end 1.524 0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 1.524 -0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 0.508 -0.762) (layer B.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) + (net 103 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) (rotate (xyz 0 0 0)) ) ) - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 461BB8C0) - (at 84.836 113.792 270) - (path /461BB8C0) + (module lib_smd:SM0805 (layer Cuivre) (tedit 53D8D2B1) (tstamp 53D8DE6E) + (at 190.5 99.06 90) + (path /47D80204/46A76BB0) (attr smd) - (fp_text reference R26 (at 0 0 270) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) + (fp_text reference C57 (at 0 0.3175 90) (layer B.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922)) (justify mirror)) ) - (fp_text value 10K (at 0 0 270) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) + (fp_text value 100nF (at 0 -0.381 90) (layer B.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922)) (justify mirror)) ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 40 /TCLK)) - (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 133 GND)) + (fp_circle (center -1.651 -0.762) (end -1.651 -0.635) (layer B.SilkS) (width 0.09906)) + (fp_line (start -0.508 -0.762) (end -1.524 -0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -1.524 0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -0.508 0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start 0.508 0.762) (end 1.524 0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 1.524 -0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 0.508 -0.762) (layer B.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 90) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.9525 0 90) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) + (net 103 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) (rotate (xyz 0 0 0)) ) ) - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 461BB65F) - (at 103.886 98.933) - (path /461BB65F) + (module lib_smd:SM0805 (layer Cuivre) (tedit 53D8D2B1) (tstamp 53D8DE7A) + (at 199.009 100.838 90) + (path /47D80204/46A76BB1) (attr smd) - (fp_text reference R25 (at 0 0) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) + (fp_text reference C58 (at 0 0.3175 90) (layer B.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922)) (justify mirror)) ) - (fp_text value 4,7K (at 0 0) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) + (fp_text value 100nF (at 0 -0.381 90) (layer B.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922)) (justify mirror)) ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 12 /CLKMOD0)) + (fp_circle (center -1.651 -0.762) (end -1.651 -0.635) (layer B.SilkS) (width 0.09906)) + (fp_line (start -0.508 -0.762) (end -1.524 -0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -1.524 0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -0.508 0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start 0.508 0.762) (end 1.524 0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 1.524 -0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 0.508 -0.762) (layer B.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 90) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.9525 0 90) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) + (net 103 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) (rotate (xyz 0 0 0)) ) ) - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 4652B5F4) - (at 127.889 84.455 180) - (path /47D80202/4652B5F4) + (module lib_smd:SM0805 (layer Cuivre) (tedit 53D8D2B1) (tstamp 53D8DE86) + (at 205.359 123.444 270) + (path /47D80204/46A76BBA) (attr smd) - (fp_text reference R23 (at 0 0 180) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) + (fp_text reference C59 (at 0 0.3175 270) (layer B.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922)) (justify mirror)) ) - (fp_text value 10K (at 0 0 180) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) + (fp_text value 100nF (at 0 -0.381 270) (layer B.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922)) (justify mirror)) ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 189 "Net-(R23-Pad2)")) + (fp_circle (center -1.651 -0.762) (end -1.651 -0.635) (layer B.SilkS) (width 0.09906)) + (fp_line (start -0.508 -0.762) (end -1.524 -0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -1.524 0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -0.508 0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start 0.508 0.762) (end 1.524 0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 1.524 -0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 0.508 -0.762) (layer B.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) + (net 103 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) (rotate (xyz 0 0 0)) ) ) - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 4623857F) - (at 161.544 86.995) - (path /4623857F) + (module lib_smd:SM0805 (layer Cuivre) (tedit 53D8D2B1) (tstamp 53D8DE92) + (at 197.485 123.444 270) + (path /47D80204/46A76BBB) (attr smd) - (fp_text reference R22 (at 0 0) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) + (fp_text reference C60 (at 0 0.3175 270) (layer B.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922)) (justify mirror)) ) - (fp_text value 270 (at 0 0) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) + (fp_text value 100nF (at 0 -0.381 270) (layer B.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922)) (justify mirror)) ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 187 "Net-(Q1-Pad3)")) - (pad 2 smd rect (at 0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 188 "Net-(R22-Pad2)")) + (fp_circle (center -1.651 -0.762) (end -1.651 -0.635) (layer B.SilkS) (width 0.09906)) + (fp_line (start -0.508 -0.762) (end -1.524 -0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -1.524 0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -0.508 0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start 0.508 0.762) (end 1.524 0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 1.524 -0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 0.508 -0.762) (layer B.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) + (net 103 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) (rotate (xyz 0 0 0)) ) ) - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 46238545) - (at 158.623 90.297 90) - (path /46238545) + (module lib_smd:SM0805 (layer Cuivre) (tedit 53D8D2B1) (tstamp 53D8DE9E) + (at 191.008 115.189 180) + (path /47D80204/46A76BBC) (attr smd) - (fp_text reference R21 (at 0 0 90) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) + (fp_text reference C61 (at 0 0.3175 180) (layer B.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922)) (justify mirror)) ) - (fp_text value 4,7K (at 0 0 90) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) + (fp_text value 100nF (at 0 -0.381 180) (layer B.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922)) (justify mirror)) ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 59 /inout_user/RTS0-)) - (pad 2 smd rect (at 0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 186 "Net-(Q1-Pad2)")) + (fp_circle (center -1.651 -0.762) (end -1.651 -0.635) (layer B.SilkS) (width 0.09906)) + (fp_line (start -0.508 -0.762) (end -1.524 -0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -1.524 0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -0.508 0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start 0.508 0.762) (end 1.524 0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 1.524 -0.762) (layer B.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 0.508 -0.762) (layer B.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) + (net 103 GND)) (model smd/chip_cms.wrl (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) (rotate (xyz 0 0 0)) ) ) - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 4652B9CC) - (at 164.592 82.296 90) - (path /47D80202/4652B9CC) - (attr smd) - (fp_text reference R35 (at 0 0 90) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 10K (at 0 0 90) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (pad 2 smd rect (at 0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 195 "Net-(R35-Pad2)")) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 461BB799) - (at 83.312 121.412 180) - (path /461BB799) - (attr smd) - (fp_text reference R20 (at 0 0 180) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 4,7K (at 0 0 180) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 20 /DSO)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 461BB798) - (at 83.312 119.126 180) - (path /461BB798) - (attr smd) - (fp_text reference R19 (at 0 0 180) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 4,7K (at 0 0 180) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 19 /DSI)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 46540184) - (at 99.695 90.043) - (path /47D80202/46540184) - (attr smd) - (fp_text reference RCAN2 (at 0 0) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value R (at 0 0) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (pad 2 smd rect (at 0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 44 /inout_user/CAN_H)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 4654018B) - (at 99.695 87.757) - (path /47D80202/4654018B) - (attr smd) - (fp_text reference RCAN1 (at 0 0) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value R (at 0 0) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 45 /inout_user/CAN_L)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 46530638) - (at 105.41 133.858) - (path /47D80202/46530638) - (attr smd) - (fp_text reference R53 (at 0 0) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 270 (at 0 0) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 177 "Net-(LED5-Pad1)")) - (pad 2 smd rect (at 0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 4652BF48) - (at 165.354 125.476 90) - (path /47D80202/4652BF48) - (attr smd) - (fp_text reference R50 (at 0 0 90) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 4,7K (at 0 0 90) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 182 "Net-(PULUPEN1-Pad2)")) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 4652BF5C) - (at 162.814 125.476 90) - (path /47D80202/4652BF5C) - (attr smd) - (fp_text reference R49 (at 0 0 90) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 4,7K (at 0 0 90) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 183 "Net-(PULUPEN1-Pad4)")) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 4652BF62) - (at 160.274 125.476 90) - (path /47D80202/4652BF62) - (attr smd) - (fp_text reference R48 (at 0 0 90) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 4,7K (at 0 0 90) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 184 "Net-(PULUPEN1-Pad6)")) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 4652BF65) - (at 157.734 125.476 90) - (path /47D80202/4652BF65) - (attr smd) - (fp_text reference R47 (at 0 0 90) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 4,7K (at 0 0 90) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 185 "Net-(PULUPEN1-Pad8)")) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 461BB742) - (at 134.874 113.411 270) - (path /461BB742) - (attr smd) - (fp_text reference R46 (at 0 0 270) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 22 (at 0 0 270) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 197 "Net-(R46-Pad1)")) - (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 40 /TCLK)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 461BE50C) - (at 100.584 101.473 90) - (path /461BE50C) - (attr smd) - (fp_text reference R45 (at 0 0 90) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 4,7K (at 0 0 90) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 56 /inout_user/RCON-)) - (pad 2 smd rect (at 0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 46540164) - (at 99.695 85.471 180) - (path /47D80202/46540164) - (attr smd) - (fp_text reference R38 (at 0 0 180) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 62 (at 0 0 180) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 45 /inout_user/CAN_L)) - (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 163 "Net-(CAN_TERM1-Pad2)")) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 462389B6) - (at 128.27 121.285 90) - (path /462389B6) - (attr smd) - (fp_text reference R1 (at 0 0 90) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 1M (at 0 0 90) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 84 /xilinx/GLCK2)) - (pad 2 smd rect (at 0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 11 /CLKIN/EXTAL)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 461BB661) - (at 103.886 96.647) - (path /461BB661) - (attr smd) - (fp_text reference R2 (at 0 0) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 4,7K (at 0 0) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 13 /CLKMOD1)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 461BE039) - (at 183.769 121.158 180) - (path /461BE039) - (attr smd) - (fp_text reference R4 (at 0 0 180) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 10K (at 0 0 180) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 85 /xilinx/IRQ-1)) - (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 461BE041) - (at 183.769 123.444 180) - (path /461BE041) - (attr smd) - (fp_text reference R5 (at 0 0 180) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 10K (at 0 0 180) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 86 /xilinx/IRQ-2)) - (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 461BE046) - (at 153.035 93.853) - (path /461BE046) - (attr smd) - (fp_text reference R6 (at 0 0) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 10K (at 0 0) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 87 /xilinx/IRQ-3)) - (pad 2 smd rect (at 0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 46237E28) - (at 163.957 112.268 270) - (path /46237E28) - (attr smd) - (fp_text reference R7 (at 0 0 270) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 1K (at 0 0 270) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 135 "Net-(ABRT_SW1-Pad1)")) - (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 141 "Net-(C15-Pad1)")) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 461BE047) - (at 169.672 117.094) - (path /461BE047) - (attr smd) - (fp_text reference R8 (at 0 0) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 10K (at 0 0) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 29 /IRQ-4)) - (pad 2 smd rect (at 0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 461BE230) - (at 141.478 85.852 90) - (path /461BE230) - (attr smd) - (fp_text reference R9 (at 0 0 90) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 0 (at 0 0 90) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 198 "Net-(R9-Pad1)")) - (pad 2 smd rect (at 0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 461BE04B) - (at 173.863 117.094 180) - (path /461BE04B) - (attr smd) - (fp_text reference R10 (at 0 0 180) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 10K (at 0 0 180) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 30 /IRQ-5)) - (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 461BE051) - (at 153.035 98.298) - (path /461BE051) - (attr smd) - (fp_text reference R11 (at 0 0) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 10K (at 0 0) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 31 /IRQ-6)) - (pad 2 smd rect (at 0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 46237E2F) - (at 160.401 114.046 180) - (path /46237E2F) - (attr smd) - (fp_text reference R12 (at 0 0 180) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 20K (at 0 0 180) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 141 "Net-(C15-Pad1)")) - (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 461BE054) - (at 153.035 96.012) - (path /461BE054) - (attr smd) - (fp_text reference R13 (at 0 0) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 10K (at 0 0) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 32 /IRQ-7)) - (pad 2 smd rect (at 0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 46237E3D) - (at 164.846 105.41 270) - (path /46237E3D) - (attr smd) - (fp_text reference R14 (at 0 0 270) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 270 (at 0 0 270) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 178 "Net-(LEDABRT1-Pad2)")) - (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 167 "Net-(D1-Pad2)")) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 4623847B) - (at 158.623 94.869 90) - (path /4623847B) - (attr smd) - (fp_text reference R15 (at 0 0 90) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 4,7K (at 0 0 90) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 57 /inout_user/RSTI-)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 461BAF5C) - (at 120.142 97.282 180) - (path /461BAF5C) - (attr smd) - (fp_text reference R16 (at 0 0 180) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 4,7K (at 0 0 180) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 33 /JTAG_EN)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 461BB790) - (at 83.312 104.267 180) - (path /461BB790) - (attr smd) - (fp_text reference R17 (at 0 0 180) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 4,7K (at 0 0 180) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 10 /BKPT-)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 461BB795) - (at 83.312 106.553 180) - (path /461BB795) - (attr smd) - (fp_text reference R18 (at 0 0 180) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 4,7K (at 0 0 180) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 18 /DSCLK)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module PINTST (layer Composant) (tedit 3D649DF9) (tstamp 4654007F) - (at 100.457 95.758 270) - (descr "module 1 pin (ou trou mecanique de percage)") - (tags DEV) - (path /47D80202/4654007F) - (fp_text reference RS1 (at 0 -1.26746 270) (layer F.SilkS) - (effects (font (size 0.508 0.508) (thickness 0.127))) - ) - (fp_text value CONN_1 (at 0 1.27 270) (layer F.SilkS) hide - (effects (font (size 0.508 0.508) (thickness 0.127))) - ) - (fp_circle (center 0 0) (end -0.254 -0.762) (layer F.SilkS) (width 0.127)) - (pad 1 thru_hole circle (at 0 0 270) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.Mask F.SilkS) - (net 196 "Net-(R36-Pad1)")) - (model pin_array/pin_array_1x1.wrl + (module pin_array:PIN_ARRAY_2X2 (layer Composant) (tedit 3FAB87D4) (tstamp 53D8DEAA) + (at 113.03 87.757 270) + (descr "Double rangee de contacts 2 x 2 pins") + (tags CONN) + (path /47D80202/4652BFF1) + (fp_text reference CAN_EN1 (at -0.381 -3.429 270) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_text value CONN_2X2 (at 0 3.048 270) (layer F.SilkS) hide + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_line (start -2.54 -2.54) (end 2.54 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -2.54) (end 2.54 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 2.54) (end -2.54 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -2.54 2.54) (end -2.54 -2.54) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole rect (at -1.27 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 133 /inout_user/CANTX)) + (pad 2 thru_hole circle (at -1.27 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 46 /inout_user/RxD_CAN)) + (pad 3 thru_hole circle (at 1.27 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 50 /inout_user/TxD_CAN)) + (pad 4 thru_hole circle (at 1.27 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 32 /inout_user/CANRX)) + (model pin_array/pins_array_2x2.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) - (module PINTST (layer Composant) (tedit 3D649DF9) (tstamp 461BBA34) - (at 83.439 138.557 270) - (descr "module 1 pin (ou trou mecanique de percage)") - (tags DEV) - (path /461BBA34) - (fp_text reference TA-1 (at 0 -1.26746 270) (layer F.SilkS) - (effects (font (size 0.508 0.508) (thickness 0.127))) + (module pin_array:PIN_ARRAY_2X1 (layer Composant) (tedit 4565C520) (tstamp 53D8DEB5) + (at 97.79 94.488 90) + (descr "Connecteurs 2 pins") + (tags "CONN DEV") + (path /47D80202/46540159) + (fp_text reference CAN_TERM1 (at 0 -1.905 90) (layer F.SilkS) + (effects (font (size 0.762 0.762) (thickness 0.1524))) ) - (fp_text value CONN_1 (at 0 1.27 270) (layer F.SilkS) hide - (effects (font (size 0.508 0.508) (thickness 0.127))) + (fp_text value JUMPER (at 0 -1.905 90) (layer F.SilkS) hide + (effects (font (size 0.762 0.762) (thickness 0.1524))) ) - (fp_circle (center 0 0) (end -0.254 -0.762) (layer F.SilkS) (width 0.127)) - (pad 1 thru_hole circle (at 0 0 270) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.Mask F.SilkS) - (net 139 "Net-(BDM_PORT1-Pad26)")) - (model pin_array/pin_array_1x1.wrl + (fp_line (start -2.54 1.27) (end -2.54 -1.27) (layer F.SilkS) (width 0.1524)) + (fp_line (start -2.54 -1.27) (end 2.54 -1.27) (layer F.SilkS) (width 0.1524)) + (fp_line (start 2.54 -1.27) (end 2.54 1.27) (layer F.SilkS) (width 0.1524)) + (fp_line (start 2.54 1.27) (end -2.54 1.27) (layer F.SilkS) (width 0.1524)) + (pad 1 thru_hole rect (at -1.27 0 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 33 /inout_user/CAN_H)) + (pad 2 thru_hole circle (at 1.27 0 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 134 "Net-(CAN_TERM1-Pad2)")) + (model pin_array/pins_array_2x1.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) - (module PINTST (layer Composant) (tedit 3D649DF9) (tstamp 461BB894) + (module pin_array:PIN_ARRAY_2X1 (layer Composant) (tedit 4565C520) (tstamp 53D8DEBE) + (at 113.792 98.425) + (descr "Connecteurs 2 pins") + (tags "CONN DEV") + (path /461BB62E) + (fp_text reference CLK0 (at 0 -1.905) (layer F.SilkS) + (effects (font (size 0.762 0.762) (thickness 0.1524))) + ) + (fp_text value JUMPER (at 0 -1.905) (layer F.SilkS) hide + (effects (font (size 0.762 0.762) (thickness 0.1524))) + ) + (fp_line (start -2.54 1.27) (end -2.54 -1.27) (layer F.SilkS) (width 0.1524)) + (fp_line (start -2.54 -1.27) (end 2.54 -1.27) (layer F.SilkS) (width 0.1524)) + (fp_line (start 2.54 -1.27) (end 2.54 1.27) (layer F.SilkS) (width 0.1524)) + (fp_line (start 2.54 1.27) (end -2.54 1.27) (layer F.SilkS) (width 0.1524)) + (pad 1 thru_hole rect (at -1.27 0) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 103 GND)) + (pad 2 thru_hole circle (at 1.27 0) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 9 /CLKMOD0)) + (model pin_array/pins_array_2x1.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module pin_array:PIN_ARRAY_2X1 (layer Composant) (tedit 4565C520) (tstamp 53D8DEC7) + (at 113.792 95.885) + (descr "Connecteurs 2 pins") + (tags "CONN DEV") + (path /461BB648) + (fp_text reference CLK1 (at 0 -1.905) (layer F.SilkS) + (effects (font (size 0.762 0.762) (thickness 0.1524))) + ) + (fp_text value JUMPER (at 0 -1.905) (layer F.SilkS) hide + (effects (font (size 0.762 0.762) (thickness 0.1524))) + ) + (fp_line (start -2.54 1.27) (end -2.54 -1.27) (layer F.SilkS) (width 0.1524)) + (fp_line (start -2.54 -1.27) (end 2.54 -1.27) (layer F.SilkS) (width 0.1524)) + (fp_line (start 2.54 -1.27) (end 2.54 1.27) (layer F.SilkS) (width 0.1524)) + (fp_line (start 2.54 1.27) (end -2.54 1.27) (layer F.SilkS) (width 0.1524)) + (pad 1 thru_hole rect (at -1.27 0) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 103 GND)) + (pad 2 thru_hole circle (at 1.27 0) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 10 /CLKMOD1)) + (model pin_array/pins_array_2x1.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module connect:PINTST (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DED0) (at 83.439 134.239 270) (descr "module 1 pin (ou trou mecanique de percage)") (tags DEV) @@ -4235,200 +2214,15 @@ ) (fp_circle (center 0 0) (end -0.254 -0.762) (layer F.SilkS) (width 0.127)) (pad 1 thru_hole circle (at 0 0 270) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.Mask F.SilkS) - (net 40 /TCLK)) - (model pin_array/pin_array_1x1.wrl + (net 30 /TCLK)) + (model Pin_Array/pin_array_1x1.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) - (module PINTST (layer Composant) (tedit 3D649DF9) (tstamp 4654003D) - (at 103.124 84.582 270) - (descr "module 1 pin (ou trou mecanique de percage)") - (tags DEV) - (path /47D80202/4654003D) - (fp_text reference VREF1 (at 0 -1.26746 270) (layer F.SilkS) - (effects (font (size 0.508 0.508) (thickness 0.127))) - ) - (fp_text value CONN_1 (at 0 1.27 270) (layer F.SilkS) hide - (effects (font (size 0.508 0.508) (thickness 0.127))) - ) - (fp_circle (center 0 0) (end -0.254 -0.762) (layer F.SilkS) (width 0.127)) - (pad 1 thru_hole circle (at 0 0 270) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.Mask F.SilkS) - (net 206 "Net-(U7-Pad5)")) - (model pin_array/pin_array_1x1.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module PINTST (layer Composant) (tedit 3D649DF9) (tstamp 46238965) - (at 152.019 102.489 270) - (descr "module 1 pin (ou trou mecanique de percage)") - (tags DEV) - (path /46238965) - (fp_text reference ALLPST1 (at 0 -1.26746 270) (layer F.SilkS) - (effects (font (size 0.508 0.508) (thickness 0.127))) - ) - (fp_text value CONN_1 (at 0 1.27 270) (layer F.SilkS) hide - (effects (font (size 0.508 0.508) (thickness 0.127))) - ) - (fp_circle (center 0 0) (end -0.254 -0.762) (layer F.SilkS) (width 0.127)) - (pad 1 thru_hole circle (at 0 0 270) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.Mask F.SilkS) - (net 1 /ALLPST)) - (model pin_array/pin_array_1x1.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module pin_array_4x2 (layer Composant) (tedit 3FAB90E6) (tstamp 4652B4D5) - (at 137.033 78.359 270) - (descr "Double rangee de contacts 2 x 4 pins") - (tags CONN) - (path /47D80202/4652B4D5) - (fp_text reference UART_EN2 (at 0 -3.81 270) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_text value CONN_4X2 (at 0 3.81 270) (layer F.SilkS) hide - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_line (start -5.08 -2.54) (end 5.08 -2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 -2.54) (end 5.08 2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start -5.08 2.54) (end -5.08 -2.54) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at -3.81 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 207 "Net-(U8-Pad10)")) - (pad 2 thru_hole circle (at -3.81 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 81 /inout_user/UTXD2)) - (pad 3 thru_hole circle (at -1.27 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 209 "Net-(U8-Pad9)")) - (pad 4 thru_hole circle (at -1.27 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 78 /inout_user/URXD2)) - (pad 5 thru_hole circle (at 1.27 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 189 "Net-(R23-Pad2)")) - (pad 6 thru_hole circle (at 1.27 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 75 /inout_user/URTS2)) - (pad 7 thru_hole circle (at 3.81 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 208 "Net-(U8-Pad12)")) - (pad 8 thru_hole circle (at 3.81 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 72 /inout_user/UCTS2)) - (model pin_array/pins_array_4x2.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module pin_array_4x2 (layer Composant) (tedit 3FAB90E6) (tstamp 4652B289) - (at 198.755 78.359 270) - (descr "Double rangee de contacts 2 x 4 pins") - (tags CONN) - (path /47D80202/4652B289) - (fp_text reference UART_EN0 (at 0 -3.81 270) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_text value CONN_4X2 (at 0 3.81 270) (layer F.SilkS) hide - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_line (start -5.08 -2.54) (end 5.08 -2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 -2.54) (end 5.08 2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start -5.08 2.54) (end -5.08 -2.54) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at -3.81 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 200 "Net-(U3-Pad11)")) - (pad 2 thru_hole circle (at -3.81 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 79 /inout_user/UTXD0)) - (pad 3 thru_hole circle (at -1.27 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 201 "Net-(U3-Pad12)")) - (pad 4 thru_hole circle (at -1.27 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 76 /inout_user/URXD0)) - (pad 5 thru_hole circle (at 1.27 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 191 "Net-(R30-Pad2)")) - (pad 6 thru_hole circle (at 1.27 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 73 /inout_user/URTS0)) - (pad 7 thru_hole circle (at 3.81 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 202 "Net-(U3-Pad9)")) - (pad 8 thru_hole circle (at 3.81 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 70 /inout_user/UCTS0)) - (model pin_array/pins_array_4x2.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module pin_array_4x2 (layer Composant) (tedit 3FAB90E6) (tstamp 4652B4C3) - (at 170.815 78.359 270) - (descr "Double rangee de contacts 2 x 4 pins") - (tags CONN) - (path /47D80202/4652B4C3) - (fp_text reference UART_EN1 (at 0 -3.81 270) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_text value CONN_4X2 (at 0 3.81 270) (layer F.SilkS) hide - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_line (start -5.08 -2.54) (end 5.08 -2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 -2.54) (end 5.08 2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start -5.08 2.54) (end -5.08 -2.54) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at -3.81 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 203 "Net-(U5-Pad11)")) - (pad 2 thru_hole circle (at -3.81 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 80 /inout_user/UTXD1)) - (pad 3 thru_hole circle (at -1.27 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 204 "Net-(U5-Pad12)")) - (pad 4 thru_hole circle (at -1.27 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 77 /inout_user/URXD1)) - (pad 5 thru_hole circle (at 1.27 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 195 "Net-(R35-Pad2)")) - (pad 6 thru_hole circle (at 1.27 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 74 /inout_user/URTS1)) - (pad 7 thru_hole circle (at 3.81 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 205 "Net-(U5-Pad9)")) - (pad 8 thru_hole circle (at 3.81 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 71 /inout_user/UCTS1)) - (model pin_array/pins_array_4x2.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module PIN_ARRAY_3X1 (layer Composant) (tedit 4565C6B8) (tstamp 4652BA65) - (at 108.204 76.073 90) - (descr "Connecteur 3 pins") - (tags "CONN DEV") - (path /47D80202/4652BA65) - (fp_text reference COM_SEL3 (at 0.254 -2.159 90) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.1524))) - ) - (fp_text value CONN_3 (at 0 -2.159 90) (layer F.SilkS) hide - (effects (font (size 1.016 1.016) (thickness 0.1524))) - ) - (fp_line (start -3.81 1.27) (end -3.81 -1.27) (layer F.SilkS) (width 0.1524)) - (fp_line (start -3.81 -1.27) (end 3.81 -1.27) (layer F.SilkS) (width 0.1524)) - (fp_line (start 3.81 -1.27) (end 3.81 1.27) (layer F.SilkS) (width 0.1524)) - (fp_line (start 3.81 1.27) (end -3.81 1.27) (layer F.SilkS) (width 0.1524)) - (fp_line (start -1.27 -1.27) (end -1.27 1.27) (layer F.SilkS) (width 0.1524)) - (pad 1 thru_hole rect (at -2.54 0 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 45 /inout_user/CAN_L)) - (pad 2 thru_hole circle (at 0 0 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 68 /inout_user/TXD2/CANL)) - (pad 3 thru_hole circle (at 2.54 0 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 166 "Net-(COM_SEL3-Pad3)")) - (model pin_array/pins_array_3x1.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module PIN_ARRAY_3X1 (layer Composant) (tedit 4565C6B8) (tstamp 4652BADD) + (module pin_array:PIN_ARRAY_3X1 (layer Composant) (tedit 4C1130E0) (tstamp 53D8DED5) (at 113.284 76.073 90) (descr "Connecteur 3 pins") (tags "CONN DEV") @@ -4445,11 +2239,11 @@ (fp_line (start 3.81 1.27) (end -3.81 1.27) (layer F.SilkS) (width 0.1524)) (fp_line (start -1.27 -1.27) (end -1.27 1.27) (layer F.SilkS) (width 0.1524)) (pad 1 thru_hole rect (at -2.54 0 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 44 /inout_user/CAN_H)) + (net 33 /inout_user/CAN_H)) (pad 2 thru_hole circle (at 0 0 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 48 /inout_user/CTS2/CANH)) + (net 37 /inout_user/CTS2/CANH)) (pad 3 thru_hole circle (at 2.54 0 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 164 "Net-(COM_SEL1-Pad3)")) + (net 135 "Net-(COM_SEL1-Pad3)")) (model pin_array/pins_array_3x1.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -4457,7 +2251,7 @@ ) ) - (module PIN_ARRAY_3X1 (layer Composant) (tedit 4565C6B8) (tstamp 4652BAD4) + (module pin_array:PIN_ARRAY_3X1 (layer Composant) (tedit 4C1130E0) (tstamp 53D8DEE0) (at 110.744 76.073 90) (descr "Connecteur 3 pins") (tags "CONN DEV") @@ -4474,11 +2268,11 @@ (fp_line (start 3.81 1.27) (end -3.81 1.27) (layer F.SilkS) (width 0.1524)) (fp_line (start -1.27 -1.27) (end -1.27 1.27) (layer F.SilkS) (width 0.1524)) (pad 1 thru_hole rect (at -2.54 0 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 133 GND)) + (net 103 GND)) (pad 2 thru_hole circle (at 0 0 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 64 /inout_user/RXD2)) + (net 45 /inout_user/RXD2)) (pad 3 thru_hole circle (at 2.54 0 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 165 "Net-(COM_SEL2-Pad3)")) + (net 136 "Net-(COM_SEL2-Pad3)")) (model pin_array/pins_array_3x1.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -4486,55 +2280,54 @@ ) ) - (module PIN_ARRAY_2X2 (layer Composant) (tedit 3FAB87D4) (tstamp 4652BFF1) - (at 113.03 87.757 270) - (descr "Double rangee de contacts 2 x 2 pins") - (tags CONN) - (path /47D80202/4652BFF1) - (fp_text reference CAN_EN1 (at -0.381 -3.429 270) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.2032))) + (module pin_array:PIN_ARRAY_3X1 (layer Composant) (tedit 4C1130E0) (tstamp 53D8DEEB) + (at 108.204 76.073 90) + (descr "Connecteur 3 pins") + (tags "CONN DEV") + (path /47D80202/4652BA65) + (fp_text reference COM_SEL3 (at 0.254 -2.159 90) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.1524))) ) - (fp_text value CONN_2X2 (at 0 3.048 270) (layer F.SilkS) hide - (effects (font (size 1.016 1.016) (thickness 0.2032))) + (fp_text value CONN_3 (at 0 -2.159 90) (layer F.SilkS) hide + (effects (font (size 1.016 1.016) (thickness 0.1524))) ) - (fp_line (start -2.54 -2.54) (end 2.54 -2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start 2.54 -2.54) (end 2.54 2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start 2.54 2.54) (end -2.54 2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start -2.54 2.54) (end -2.54 -2.54) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at -1.27 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 43 /inout_user/CANTX)) - (pad 2 thru_hole circle (at -1.27 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 65 /inout_user/RxD_CAN)) - (pad 3 thru_hole circle (at 1.27 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 69 /inout_user/TxD_CAN)) - (pad 4 thru_hole circle (at 1.27 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 42 /inout_user/CANRX)) - (model pin_array/pins_array_2x2.wrl + (fp_line (start -3.81 1.27) (end -3.81 -1.27) (layer F.SilkS) (width 0.1524)) + (fp_line (start -3.81 -1.27) (end 3.81 -1.27) (layer F.SilkS) (width 0.1524)) + (fp_line (start 3.81 -1.27) (end 3.81 1.27) (layer F.SilkS) (width 0.1524)) + (fp_line (start 3.81 1.27) (end -3.81 1.27) (layer F.SilkS) (width 0.1524)) + (fp_line (start -1.27 -1.27) (end -1.27 1.27) (layer F.SilkS) (width 0.1524)) + (pad 1 thru_hole rect (at -2.54 0 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 34 /inout_user/CAN_L)) + (pad 2 thru_hole circle (at 0 0 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 49 /inout_user/TXD2/CANL)) + (pad 3 thru_hole circle (at 2.54 0 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 137 "Net-(COM_SEL3-Pad3)")) + (model pin_array/pins_array_3x1.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) - (module PIN_ARRAY_2X1 (layer Composant) (tedit 4565C520) (tstamp 4652A9C4) - (at 183.134 130.302) + (module pin_array:PIN_ARRAY_2X1 (layer Composant) (tedit 4565C520) (tstamp 53D8DEF6) + (at 90.17 134.62 180) (descr "Connecteurs 2 pins") (tags "CONN DEV") - (path /47D80202/4652A9C4) - (fp_text reference VX_EN1 (at 0 -1.905) (layer F.SilkS) + (path /46545507) + (fp_text reference CT1 (at 0 -1.905 180) (layer F.SilkS) (effects (font (size 0.762 0.762) (thickness 0.1524))) ) - (fp_text value JUMPER (at 0 -1.905) (layer F.SilkS) hide + (fp_text value JUMPER (at 0 -1.905 180) (layer F.SilkS) hide (effects (font (size 0.762 0.762) (thickness 0.1524))) ) (fp_line (start -2.54 1.27) (end -2.54 -1.27) (layer F.SilkS) (width 0.1524)) (fp_line (start -2.54 -1.27) (end 2.54 -1.27) (layer F.SilkS) (width 0.1524)) (fp_line (start 2.54 -1.27) (end 2.54 1.27) (layer F.SilkS) (width 0.1524)) (fp_line (start 2.54 1.27) (end -2.54 1.27) (layer F.SilkS) (width 0.1524)) - (pad 1 thru_hole rect (at -1.27 0) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 278 VDD)) - (pad 2 thru_hole circle (at 1.27 0) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 159 "Net-(C43-Pad2)")) + (pad 1 thru_hole rect (at -1.27 0 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 106 "Net-(BDM_PORT1-Pad6)")) + (pad 2 thru_hole circle (at 1.27 0 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 30 /TCLK)) (model pin_array/pins_array_2x1.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -4542,301 +2335,157 @@ ) ) - (module PIN_ARRAY_2X1 (layer Composant) (tedit 4565C520) (tstamp 4652B108) - (at 92.964 112.903) - (descr "Connecteurs 2 pins") - (tags "CONN DEV") - (path /47D80202/4652B108) - (fp_text reference LED_EN1 (at 0 -1.905) (layer F.SilkS) - (effects (font (size 0.762 0.762) (thickness 0.1524))) - ) - (fp_text value JUMPER (at 0 -1.905) (layer F.SilkS) hide - (effects (font (size 0.762 0.762) (thickness 0.1524))) - ) - (fp_line (start -2.54 1.27) (end -2.54 -1.27) (layer F.SilkS) (width 0.1524)) - (fp_line (start -2.54 -1.27) (end 2.54 -1.27) (layer F.SilkS) (width 0.1524)) - (fp_line (start 2.54 -1.27) (end 2.54 1.27) (layer F.SilkS) (width 0.1524)) - (fp_line (start 2.54 1.27) (end -2.54 1.27) (layer F.SilkS) (width 0.1524)) - (pad 1 thru_hole rect (at -1.27 0) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 133 GND)) - (pad 2 thru_hole circle (at 1.27 0) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 179 "Net-(LED_EN1-Pad2)")) - (model pin_array/pins_array_2x1.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module PIN_ARRAY_2X1 (layer Composant) (tedit 4565C520) (tstamp 46238079) - (at 113.792 109.855) - (descr "Connecteurs 2 pins") - (tags "CONN DEV") - (path /46238079) - (fp_text reference VDDA1 (at 0 -1.905) (layer F.SilkS) - (effects (font (size 0.762 0.762) (thickness 0.1524))) - ) - (fp_text value JUMPER (at 0 -1.905) (layer F.SilkS) hide - (effects (font (size 0.762 0.762) (thickness 0.1524))) - ) - (fp_line (start -2.54 1.27) (end -2.54 -1.27) (layer F.SilkS) (width 0.1524)) - (fp_line (start -2.54 -1.27) (end 2.54 -1.27) (layer F.SilkS) (width 0.1524)) - (fp_line (start 2.54 -1.27) (end 2.54 1.27) (layer F.SilkS) (width 0.1524)) - (fp_line (start 2.54 1.27) (end -2.54 1.27) (layer F.SilkS) (width 0.1524)) - (pad 1 thru_hole rect (at -1.27 0) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 278 VDD)) - (pad 2 thru_hole circle (at 1.27 0) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 172 "Net-(L1-Pad1)")) - (model pin_array/pins_array_2x1.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module PIN_ARRAY_2X1 (layer Composant) (tedit 4565C520) (tstamp 461BAF4F) - (at 113.792 93.345) - (descr "Connecteurs 2 pins") - (tags "CONN DEV") - (path /461BAF4F) - (fp_text reference BDM_EN1 (at 0 -1.905) (layer F.SilkS) - (effects (font (size 0.762 0.762) (thickness 0.1524))) - ) - (fp_text value JUMPER (at 0 -1.905) (layer F.SilkS) hide - (effects (font (size 0.762 0.762) (thickness 0.1524))) - ) - (fp_line (start -2.54 1.27) (end -2.54 -1.27) (layer F.SilkS) (width 0.1524)) - (fp_line (start -2.54 -1.27) (end 2.54 -1.27) (layer F.SilkS) (width 0.1524)) - (fp_line (start 2.54 -1.27) (end 2.54 1.27) (layer F.SilkS) (width 0.1524)) - (fp_line (start 2.54 1.27) (end -2.54 1.27) (layer F.SilkS) (width 0.1524)) - (pad 1 thru_hole rect (at -1.27 0) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 133 GND)) - (pad 2 thru_hole circle (at 1.27 0) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 33 /JTAG_EN)) - (model pin_array/pins_array_2x1.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module PIN_ARRAY_2X1 (layer Composant) (tedit 4565C520) (tstamp 461BB648) - (at 113.792 95.885) - (descr "Connecteurs 2 pins") - (tags "CONN DEV") - (path /461BB648) - (fp_text reference CLK1 (at 0 -1.905) (layer F.SilkS) - (effects (font (size 0.762 0.762) (thickness 0.1524))) - ) - (fp_text value JUMPER (at 0 -1.905) (layer F.SilkS) hide - (effects (font (size 0.762 0.762) (thickness 0.1524))) - ) - (fp_line (start -2.54 1.27) (end -2.54 -1.27) (layer F.SilkS) (width 0.1524)) - (fp_line (start -2.54 -1.27) (end 2.54 -1.27) (layer F.SilkS) (width 0.1524)) - (fp_line (start 2.54 -1.27) (end 2.54 1.27) (layer F.SilkS) (width 0.1524)) - (fp_line (start 2.54 1.27) (end -2.54 1.27) (layer F.SilkS) (width 0.1524)) - (pad 1 thru_hole rect (at -1.27 0) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 133 GND)) - (pad 2 thru_hole circle (at 1.27 0) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 13 /CLKMOD1)) - (model pin_array/pins_array_2x1.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module PIN_ARRAY_2X1 (layer Composant) (tedit 4565C520) (tstamp 461BB62E) - (at 113.792 98.425) - (descr "Connecteurs 2 pins") - (tags "CONN DEV") - (path /461BB62E) - (fp_text reference CLK0 (at 0 -1.905) (layer F.SilkS) - (effects (font (size 0.762 0.762) (thickness 0.1524))) - ) - (fp_text value JUMPER (at 0 -1.905) (layer F.SilkS) hide - (effects (font (size 0.762 0.762) (thickness 0.1524))) - ) - (fp_line (start -2.54 1.27) (end -2.54 -1.27) (layer F.SilkS) (width 0.1524)) - (fp_line (start -2.54 -1.27) (end 2.54 -1.27) (layer F.SilkS) (width 0.1524)) - (fp_line (start 2.54 -1.27) (end 2.54 1.27) (layer F.SilkS) (width 0.1524)) - (fp_line (start 2.54 1.27) (end -2.54 1.27) (layer F.SilkS) (width 0.1524)) - (pad 1 thru_hole rect (at -1.27 0) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 133 GND)) - (pad 2 thru_hole circle (at 1.27 0) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 12 /CLKMOD0)) - (model pin_array/pins_array_2x1.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module PIN_ARRAY_2X1 (layer Composant) (tedit 46602CAB) (tstamp 46540159) - (at 97.79 94.488 90) - (descr "Connecteurs 2 pins") - (tags "CONN DEV") - (path /47D80202/46540159) - (fp_text reference CAN_TERM1 (at 0 -1.905 90) (layer F.SilkS) - (effects (font (size 0.762 0.762) (thickness 0.1524))) - ) - (fp_text value JUMPER (at 0 -1.905 90) (layer F.SilkS) hide - (effects (font (size 0.762 0.762) (thickness 0.1524))) - ) - (fp_line (start -2.54 1.27) (end -2.54 -1.27) (layer F.SilkS) (width 0.1524)) - (fp_line (start -2.54 -1.27) (end 2.54 -1.27) (layer F.SilkS) (width 0.1524)) - (fp_line (start 2.54 -1.27) (end 2.54 1.27) (layer F.SilkS) (width 0.1524)) - (fp_line (start 2.54 1.27) (end -2.54 1.27) (layer F.SilkS) (width 0.1524)) - (pad 1 thru_hole rect (at -1.27 0 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 44 /inout_user/CAN_H)) - (pad 2 thru_hole circle (at 1.27 0 90) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 163 "Net-(CAN_TERM1-Pad2)")) - (model pin_array/pins_array_2x1.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module pin_array_13x2 (layer Composant) (tedit 46602BEA) (tstamp 461BAEE7) - (at 77.597 121.539 270) - (descr "Double rangee de contacts 2 x 12 pins") - (tags CONN) - (path /461BAEE7) - (fp_text reference BDM_PORT1 (at -7.62 -3.81 270) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_text value CONN_13X2 (at 7.62 -3.81 270) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_line (start -16.51 2.54) (end 16.51 2.54) (layer F.SilkS) (width 0.2032)) - (fp_line (start 16.51 -2.54) (end -16.51 -2.54) (layer F.SilkS) (width 0.2032)) - (fp_line (start -16.51 -2.54) (end -16.51 2.54) (layer F.SilkS) (width 0.2032)) - (fp_line (start 16.51 2.54) (end 16.51 -2.54) (layer F.SilkS) (width 0.2032)) - (pad 1 thru_hole rect (at -15.24 1.27 270) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) - (net 136 "Net-(BDM_PORT1-Pad1)")) - (pad 2 thru_hole circle (at -15.24 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 10 /BKPT-)) - (pad 3 thru_hole circle (at -12.7 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 133 GND)) - (pad 4 thru_hole circle (at -12.7 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 18 /DSCLK)) - (pad 5 thru_hole circle (at -10.16 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 133 GND)) - (pad 6 thru_hole circle (at -10.16 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 140 "Net-(BDM_PORT1-Pad6)")) - (pad 7 thru_hole circle (at -7.62 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 57 /inout_user/RSTI-)) - (pad 8 thru_hole circle (at -7.62 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 19 /DSI)) - (pad 9 thru_hole circle (at -5.08 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 278 VDD)) - (pad 10 thru_hole circle (at -5.08 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 20 /DSO)) - (pad 11 thru_hole circle (at -2.54 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 133 GND)) - (pad 12 thru_hole circle (at -2.54 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 37 /PST3)) - (pad 13 thru_hole circle (at 0 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 36 /PST2)) - (pad 14 thru_hole circle (at 0 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 35 /PST1)) - (pad 15 thru_hole circle (at 2.54 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 34 /PST0)) - (pad 16 thru_hole circle (at 2.54 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 17 /DDAT3)) - (pad 17 thru_hole circle (at 5.08 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 16 /DDAT2)) - (pad 18 thru_hole circle (at 5.08 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 15 /DDAT1)) - (pad 19 thru_hole circle (at 7.62 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 14 /DDAT0)) - (pad 20 thru_hole circle (at 7.62 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 133 GND)) - (pad 21 thru_hole circle (at 10.16 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 137 "Net-(BDM_PORT1-Pad21)")) - (pad 22 thru_hole circle (at 10.16 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 138 "Net-(BDM_PORT1-Pad22)")) - (pad 23 thru_hole circle (at 12.7 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 133 GND)) - (pad 24 thru_hole circle (at 12.7 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 40 /TCLK)) - (pad 25 thru_hole circle (at 15.24 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 278 VDD)) - (pad 26 thru_hole circle (at 15.24 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 139 "Net-(BDM_PORT1-Pad26)")) - (model pin_array/pins_array_13x2.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SOT353 (layer Composant) (tedit 46555299) (tstamp 46554FB5) - (at 160.528 108.331) - (descr SOT353) - (path /46554FB5) + (module lib_smd:ST23AK#1 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DEFF) + (at 160.401 102.489 90) + (path /46237F86) (attr smd) - (fp_text reference U2 (at 0 0 90) (layer F.SilkS) + (fp_text reference D1 (at 0 0 90) (layer F.SilkS) (effects (font (size 0.762 0.635) (thickness 0.127))) ) - (fp_text value 74AHC1G14 (at 0 0 90) (layer F.SilkS) hide + (fp_text value BAT54 (at 0 0 90) (layer F.SilkS) hide (effects (font (size 0.762 0.635) (thickness 0.127))) ) - (fp_line (start 0.635 1.016) (end 0.635 -1.016) (layer F.SilkS) (width 0.1524)) - (fp_line (start 0.635 -1.016) (end -0.635 -1.016) (layer F.SilkS) (width 0.1524)) - (fp_line (start -0.635 -1.016) (end -0.635 1.016) (layer F.SilkS) (width 0.1524)) - (fp_line (start -0.635 1.016) (end 0.635 1.016) (layer F.SilkS) (width 0.1524)) - (pad 1 smd rect (at -1.016 -0.635) (size 0.508 0.3048) (layers Composant F.Paste F.Mask)) - (pad 3 smd rect (at -1.016 0.635) (size 0.508 0.3048) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (pad 5 smd rect (at 1.016 -0.635) (size 0.508 0.3048) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 2 smd rect (at -1.016 0) (size 0.508 0.3048) (layers Composant F.Paste F.Mask) - (net 141 "Net-(C15-Pad1)")) - (pad 4 smd rect (at 1.016 0.635) (size 0.508 0.3048) (layers Composant F.Paste F.Mask) - (net 167 "Net-(D1-Pad2)")) - ) - - (module pin_array_4x2 (layer Composant) (tedit 3FAB90E6) (tstamp 4652BF26) - (at 161.417 119.253 180) - (descr "Double rangee de contacts 2 x 4 pins") - (tags CONN) - (path /47D80202/4652BF26) - (fp_text reference PULUPEN1 (at 0 -3.81 180) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_text value CONN_4X2 (at 0 3.81 180) (layer F.SilkS) hide - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_line (start -5.08 -2.54) (end 5.08 -2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 -2.54) (end 5.08 2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start -5.08 2.54) (end -5.08 -2.54) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at -3.81 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 55 /inout_user/QSPI_SCLK)) - (pad 2 thru_hole circle (at -3.81 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 182 "Net-(PULUPEN1-Pad2)")) - (pad 3 thru_hole circle (at -1.27 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 38 /QSPI_CS0)) - (pad 4 thru_hole circle (at -1.27 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 183 "Net-(PULUPEN1-Pad4)")) - (pad 5 thru_hole circle (at 1.27 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 43 /inout_user/CANTX)) - (pad 6 thru_hole circle (at 1.27 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 184 "Net-(PULUPEN1-Pad6)")) - (pad 7 thru_hole circle (at 3.81 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 42 /inout_user/CANRX)) - (pad 8 thru_hole circle (at 3.81 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 185 "Net-(PULUPEN1-Pad8)")) - (model pin_array/pins_array_4x2.wrl + (fp_line (start -1.524 -0.508) (end -1.524 -0.508) (layer F.SilkS) (width 0.127)) + (fp_line (start -1.524 -0.508) (end -1.524 -0.508) (layer F.SilkS) (width 0.127)) + (fp_line (start -1.524 -0.508) (end 1.524 -0.508) (layer F.SilkS) (width 0.127)) + (fp_line (start 1.524 -0.508) (end 1.524 0.508) (layer F.SilkS) (width 0.127)) + (fp_line (start 1.524 0.508) (end 1.524 0.508) (layer F.SilkS) (width 0.127)) + (fp_line (start 1.524 0.508) (end -1.524 0.508) (layer F.SilkS) (width 0.127)) + (fp_line (start -1.524 0.508) (end -1.524 -0.508) (layer F.SilkS) (width 0.127)) + (pad 2 smd rect (at 0 0.9525 90) (size 0.9144 0.9144) (layers Composant F.Paste F.Mask) + (net 138 "Net-(D1-Pad2)")) + (pad 1 smd rect (at 0.9525 -0.9525 90) (size 0.9144 0.9144) (layers Composant F.Paste F.Mask) + (net 23 /IRQ-7)) + (pad 3 smd rect (at -0.9525 -0.9525 90) (size 0.9144 0.9144) (layers Composant F.Paste F.Mask)) + (model smd/cms_sot23.wrl (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) + (scale (xyz 0.1299999952316284 0.1500000059604645 0.1500000059604645)) (rotate (xyz 0 0 0)) ) ) - (module FSUPCMS (layer Composant) (tedit 451BA9BC) (tstamp 46530747) + (module lib_smd:ST23AK#1 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DF0C) + (at 161.798 95.631 90) + (path /4623846D) + (attr smd) + (fp_text reference D3 (at 0 0 90) (layer F.SilkS) + (effects (font (size 0.762 0.635) (thickness 0.127))) + ) + (fp_text value BAT54 (at 0 0 90) (layer F.SilkS) hide + (effects (font (size 0.762 0.635) (thickness 0.127))) + ) + (fp_line (start -1.524 -0.508) (end -1.524 -0.508) (layer F.SilkS) (width 0.127)) + (fp_line (start -1.524 -0.508) (end -1.524 -0.508) (layer F.SilkS) (width 0.127)) + (fp_line (start -1.524 -0.508) (end 1.524 -0.508) (layer F.SilkS) (width 0.127)) + (fp_line (start 1.524 -0.508) (end 1.524 0.508) (layer F.SilkS) (width 0.127)) + (fp_line (start 1.524 0.508) (end 1.524 0.508) (layer F.SilkS) (width 0.127)) + (fp_line (start 1.524 0.508) (end -1.524 0.508) (layer F.SilkS) (width 0.127)) + (fp_line (start -1.524 0.508) (end -1.524 -0.508) (layer F.SilkS) (width 0.127)) + (pad 2 smd rect (at 0 0.9525 90) (size 0.9144 0.9144) (layers Composant F.Paste F.Mask) + (net 109 "Net-(C3-Pad1)")) + (pad 1 smd rect (at 0.9525 -0.9525 90) (size 0.9144 0.9144) (layers Composant F.Paste F.Mask) + (net 107 /inout_user/RSTI-)) + (pad 3 smd rect (at -0.9525 -0.9525 90) (size 0.9144 0.9144) (layers Composant F.Paste F.Mask)) + (model smd/cms_sot23.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1299999952316284 0.1500000059604645 0.1500000059604645)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:D5 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DF19) + (at 87.122 77.089) + (descr "Diode 5 pas") + (tags "DIODE DEV") + (path /47D80202/465306C8) + (fp_text reference D7 (at 0 0) (layer F.SilkS) + (effects (font (size 1.524 1.016) (thickness 0.3048))) + ) + (fp_text value 1N4004 (at -0.254 0) (layer F.SilkS) hide + (effects (font (size 1.524 1.016) (thickness 0.3048))) + ) + (fp_line (start 6.35 0) (end 5.08 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 0) (end 5.08 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 -1.27) (end -5.08 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 -1.27) (end -5.08 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 0) (end -6.35 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 0) (end -5.08 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 1.27) (end 5.08 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 1.27) (end 5.08 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.81 -1.27) (end 3.81 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 4.064 -1.27) (end 4.064 1.27) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole circle (at -6.35 0) (size 1.778 1.778) (drill 1.143) (layers *.Cu *.Mask F.SilkS) + (net 103 GND)) + (pad 2 thru_hole rect (at 6.35 0) (size 1.778 1.778) (drill 1.143) (layers *.Cu *.Mask F.SilkS) + (net 128 "Net-(C38-Pad1)")) + (model discret/diode.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.5 0.5 0.5)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM1206POL (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DF28) + (at 212.09 76.835) + (path /47D80204/46A76BC4) + (attr smd) + (fp_text reference D8 (at 0 0) (layer F.SilkS) + (effects (font (size 0.762 0.762) (thickness 0.127))) + ) + (fp_text value LED (at 0 0) (layer F.SilkS) hide + (effects (font (size 0.762 0.762) (thickness 0.127))) + ) + (fp_line (start -2.54 -1.143) (end -2.794 -1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.794 -1.143) (end -2.794 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.794 1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 139 "Net-(D8-Pad1)")) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (model smd/chip_cms_pol.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1700000017881393 0.1599999964237213 0.1599999964237213)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM1206POL (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DF36) + (at 212.09 80.645) + (path /47D80204/46A76BA8) + (attr smd) + (fp_text reference D9 (at 0 0) (layer F.SilkS) + (effects (font (size 0.762 0.762) (thickness 0.127))) + ) + (fp_text value LED (at 0 0) (layer F.SilkS) hide + (effects (font (size 0.762 0.762) (thickness 0.127))) + ) + (fp_line (start -2.54 -1.143) (end -2.794 -1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.794 -1.143) (end -2.794 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.794 1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 140 "Net-(D9-Pad1)")) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (model smd/chip_cms_pol.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1700000017881393 0.1599999964237213 0.1599999964237213)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:FSUPCMS (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DF44) (at 99.949 76.454) (path /47D80202/46530747) (attr smd) @@ -4859,17 +2508,44 @@ (fp_line (start 2.54 5.588) (end -2.54 5.588) (layer F.SilkS) (width 0.2032)) (fp_line (start -2.54 -5.461) (end 2.54 -5.461) (layer F.SilkS) (width 0.2032)) (pad 1 smd rect (at 0 -3.175) (size 3.556 4.191) (layers Composant F.Paste F.Mask) - (net 170 "Net-(F1-Pad1)")) + (net 141 "Net-(F1-Pad1)")) (pad 2 smd rect (at 0 3.175) (size 3.556 4.191) (layers Composant F.Paste F.Mask) - (net 158 "Net-(C38-Pad1)")) + (net 128 "Net-(C38-Pad1)")) (model smd/smd_fuse_socket.wrl (at (xyz 0 0 0)) - (scale (xyz 0.4 0.4 0.4)) + (scale (xyz 0.4000000059604645 0.4000000059604645 0.4000000059604645)) (rotate (xyz 0 0 90)) ) ) - (module PINTST (layer Composant) (tedit 3D649DF9) (tstamp 465FE6C5) + (module lib_smd:SM1206 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DF55) + (at 119.634 101.346 180) + (path /462380B8) + (attr smd) + (fp_text reference FB1 (at 0 0 180) (layer F.SilkS) + (effects (font (size 0.762 0.762) (thickness 0.127))) + ) + (fp_text value BEAD (at 0 0 180) (layer F.SilkS) hide + (effects (font (size 0.762 0.762) (thickness 0.127))) + ) + (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 112 GNDA)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1700000017881393 0.1599999964237213 0.1599999964237213)) + (rotate (xyz 0 0 0)) + ) + ) + + (module connect:PINTST (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DF60) (at 89.535 140.97 270) (descr "module 1 pin (ou trou mecanique de percage)") (tags DEV) @@ -4882,73 +2558,306 @@ ) (fp_circle (center 0 0) (end -0.254 -0.762) (layer F.SilkS) (width 0.127)) (pad 1 thru_hole circle (at 0 0 270) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.Mask F.SilkS) - (net 133 GND)) - (model pin_array/pin_array_1x1.wrl + (net 103 GND)) + (model Pin_Array/pin_array_1x1.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) - (module ST23AK#1 (layer Composant) (tedit 3F980130) (tstamp 46237F86) - (at 160.401 102.489 90) - (path /46237F86) - (attr smd) - (fp_text reference D1 (at 0 0 90) (layer F.SilkS) - (effects (font (size 0.762 0.635) (thickness 0.127))) + (module connect:JACK_ALIM (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DF65) + (at 100.965 60.833 270) + (descr "module 1 pin (ou trou mecanique de percage)") + (tags "CONN JACK") + (path /47D80202/465307C6) + (fp_text reference J1 (at 0.254 -5.588 270) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.254))) ) - (fp_text value BAT54 (at 0 0 90) (layer F.SilkS) hide - (effects (font (size 0.762 0.635) (thickness 0.127))) + (fp_text value JACK_2P (at -5.08 5.588 270) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.254))) ) - (fp_line (start -1.524 -0.508) (end -1.524 -0.508) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.508) (end -1.524 -0.508) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.508) (end 1.524 -0.508) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.508) (end 1.524 0.508) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.508) (end 1.524 0.508) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.508) (end -1.524 0.508) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.508) (end -1.524 -0.508) (layer F.SilkS) (width 0.127)) - (pad 2 smd rect (at 0 0.9525 90) (size 0.9144 0.9144) (layers Composant F.Paste F.Mask) - (net 167 "Net-(D1-Pad2)")) - (pad 1 smd rect (at 0.9525 -0.9525 90) (size 0.9144 0.9144) (layers Composant F.Paste F.Mask) - (net 32 /IRQ-7)) - (pad 3 smd rect (at -0.9525 -0.9525 90) (size 0.9144 0.9144) (layers Composant F.Paste F.Mask)) - (model smd/cms_sot23.wrl + (fp_line (start -7.112 -4.318) (end -7.874 -4.318) (layer F.SilkS) (width 0.381)) + (fp_line (start -7.874 -4.318) (end -7.874 4.318) (layer F.SilkS) (width 0.381)) + (fp_line (start -7.874 4.318) (end -7.112 4.318) (layer F.SilkS) (width 0.381)) + (fp_line (start -4.064 -4.318) (end -4.064 4.318) (layer F.SilkS) (width 0.381)) + (fp_line (start 5.588 -4.318) (end 5.588 4.318) (layer F.SilkS) (width 0.381)) + (fp_line (start -7.112 4.318) (end 5.588 4.318) (layer F.SilkS) (width 0.381)) + (fp_line (start -7.112 -4.318) (end 5.588 -4.318) (layer F.SilkS) (width 0.381)) + (pad 2 thru_hole circle (at 0 0 270) (size 4.8006 4.8006) (drill oval 1.016 2.54) (layers *.Cu *.Mask F.SilkS) + (net 103 GND)) + (pad 1 thru_hole rect (at 6.096 0 270) (size 4.8006 4.8006) (drill oval 1.016 2.54) (layers *.Cu *.Mask F.SilkS) + (net 103 GND)) + (pad 3 thru_hole circle (at 2.286 5.08 270) (size 4.8006 4.8006) (drill oval 2.54 1.016) (layers *.Cu *.Mask F.SilkS) + (net 142 "Net-(J1-Pad3)")) + (model Connectors/POWER_21.wrl (at (xyz 0 0 0)) - (scale (xyz 0.13 0.15 0.15)) + (scale (xyz 0.800000011920929 0.800000011920929 0.800000011920929)) (rotate (xyz 0 0 0)) ) ) - (module ST23AK#1 (layer Composant) (tedit 3F980130) (tstamp 4623846D) - (at 161.798 95.631 90) - (path /4623846D) + (module lib_smd:SM1206 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DF72) + (at 118.999 110.236) + (path /46238092) (attr smd) - (fp_text reference D3 (at 0 0 90) (layer F.SilkS) - (effects (font (size 0.762 0.635) (thickness 0.127))) + (fp_text reference L1 (at 0 0) (layer F.SilkS) + (effects (font (size 0.762 0.762) (thickness 0.127))) ) - (fp_text value BAT54 (at 0 0 90) (layer F.SilkS) hide - (effects (font (size 0.762 0.635) (thickness 0.127))) + (fp_text value 10uH (at 0 0) (layer F.SilkS) hide + (effects (font (size 0.762 0.762) (thickness 0.127))) ) - (fp_line (start -1.524 -0.508) (end -1.524 -0.508) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.508) (end -1.524 -0.508) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.508) (end 1.524 -0.508) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.508) (end 1.524 0.508) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.508) (end 1.524 0.508) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.508) (end -1.524 0.508) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.508) (end -1.524 -0.508) (layer F.SilkS) (width 0.127)) - (pad 2 smd rect (at 0 0.9525 90) (size 0.9144 0.9144) (layers Composant F.Paste F.Mask) - (net 148 "Net-(C3-Pad1)")) - (pad 1 smd rect (at 0.9525 -0.9525 90) (size 0.9144 0.9144) (layers Composant F.Paste F.Mask) - (net 57 /inout_user/RSTI-)) - (pad 3 smd rect (at -0.9525 -0.9525 90) (size 0.9144 0.9144) (layers Composant F.Paste F.Mask)) - (model smd/cms_sot23.wrl + (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 143 "Net-(L1-Pad1)")) + (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 111 /inout_user/VCCA)) + (model smd/chip_cms.wrl (at (xyz 0 0 0)) - (scale (xyz 0.13 0.15 0.15)) + (scale (xyz 0.1700000017881393 0.1599999964237213 0.1599999964237213)) (rotate (xyz 0 0 0)) ) ) - (module TO92-INVERT (layer Composant) (tedit 443CFFF4) (tstamp 462383E5) + (module lib_smd:SM1206 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DF7D) + (at 151.892 109.22 180) + (path /461BE327) + (attr smd) + (fp_text reference L2 (at 0 0 180) (layer F.SilkS) + (effects (font (size 0.762 0.762) (thickness 0.127))) + ) + (fp_text value 10uH (at 0 0 180) (layer F.SilkS) hide + (effects (font (size 0.762 0.762) (thickness 0.127))) + ) + (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 31 /VDDPLL)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1700000017881393 0.1599999964237213 0.1599999964237213)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM1206POL (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DF88) + (at 88.392 117.094 180) + (path /47D80202/4652B0AE) + (attr smd) + (fp_text reference LED1 (at 0 0 180) (layer F.SilkS) + (effects (font (size 0.762 0.762) (thickness 0.127))) + ) + (fp_text value LED (at 0 0 180) (layer F.SilkS) hide + (effects (font (size 0.762 0.762) (thickness 0.127))) + ) + (fp_line (start -2.54 -1.143) (end -2.794 -1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.794 -1.143) (end -2.794 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.794 1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 144 "Net-(LED1-Pad1)")) + (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (model smd/chip_cms_pol.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1700000017881393 0.1599999964237213 0.1599999964237213)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM1206POL (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DF96) + (at 88.392 121.158 180) + (path /47D80202/4652B0B7) + (attr smd) + (fp_text reference LED2 (at 0 0 180) (layer F.SilkS) + (effects (font (size 0.762 0.762) (thickness 0.127))) + ) + (fp_text value LED (at 0 0 180) (layer F.SilkS) hide + (effects (font (size 0.762 0.762) (thickness 0.127))) + ) + (fp_line (start -2.54 -1.143) (end -2.794 -1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.794 -1.143) (end -2.794 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.794 1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 145 "Net-(LED2-Pad1)")) + (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (model smd/chip_cms_pol.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1700000017881393 0.1599999964237213 0.1599999964237213)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM1206POL (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DFA4) + (at 88.392 125.349 180) + (path /47D80202/4652B0BB) + (attr smd) + (fp_text reference LED3 (at 0 0 180) (layer F.SilkS) + (effects (font (size 0.762 0.762) (thickness 0.127))) + ) + (fp_text value LED (at 0 0 180) (layer F.SilkS) hide + (effects (font (size 0.762 0.762) (thickness 0.127))) + ) + (fp_line (start -2.54 -1.143) (end -2.794 -1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.794 -1.143) (end -2.794 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.794 1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 146 "Net-(LED3-Pad1)")) + (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (model smd/chip_cms_pol.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1700000017881393 0.1599999964237213 0.1599999964237213)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM1206POL (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DFB2) + (at 88.392 129.54 180) + (path /47D80202/4652B0BC) + (attr smd) + (fp_text reference LED4 (at 0 0 180) (layer F.SilkS) + (effects (font (size 0.762 0.762) (thickness 0.127))) + ) + (fp_text value LED (at 0 0 180) (layer F.SilkS) hide + (effects (font (size 0.762 0.762) (thickness 0.127))) + ) + (fp_line (start -2.54 -1.143) (end -2.794 -1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.794 -1.143) (end -2.794 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.794 1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 180) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 147 "Net-(LED4-Pad1)")) + (pad 2 smd rect (at 1.651 0 180) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (model smd/chip_cms_pol.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1700000017881393 0.1599999964237213 0.1599999964237213)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM1206POL (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DFC0) + (at 104.14 138.176 270) + (path /47D80202/46530639) + (attr smd) + (fp_text reference LED5 (at 0 0 270) (layer F.SilkS) + (effects (font (size 0.762 0.762) (thickness 0.127))) + ) + (fp_text value LED (at 0 0 270) (layer F.SilkS) hide + (effects (font (size 0.762 0.762) (thickness 0.127))) + ) + (fp_line (start -2.54 -1.143) (end -2.794 -1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.794 -1.143) (end -2.794 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.794 1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 270) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 148 "Net-(LED5-Pad1)")) + (pad 2 smd rect (at 1.651 0 270) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (model smd/chip_cms_pol.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1700000017881393 0.1599999964237213 0.1599999964237213)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM1206POL (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DFCE) + (at 164.846 100.457 270) + (path /46237E52) + (attr smd) + (fp_text reference LEDABRT1 (at 0 0 270) (layer F.SilkS) + (effects (font (size 0.762 0.762) (thickness 0.127))) + ) + (fp_text value RED (at 0 0 270) (layer F.SilkS) hide + (effects (font (size 0.762 0.762) (thickness 0.127))) + ) + (fp_line (start -2.54 -1.143) (end -2.794 -1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.794 -1.143) (end -2.794 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.794 1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 270) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 1.651 0 270) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 149 "Net-(LEDABRT1-Pad2)")) + (model smd/chip_cms_pol.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1700000017881393 0.1599999964237213 0.1599999964237213)) + (rotate (xyz 0 0 0)) + ) + ) + + (module pin_array:PIN_ARRAY_2X1 (layer Composant) (tedit 4565C520) (tstamp 53D8DFDC) + (at 92.964 112.903) + (descr "Connecteurs 2 pins") + (tags "CONN DEV") + (path /47D80202/4652B108) + (fp_text reference LED_EN1 (at 0 -1.905) (layer F.SilkS) + (effects (font (size 0.762 0.762) (thickness 0.1524))) + ) + (fp_text value JUMPER (at 0 -1.905) (layer F.SilkS) hide + (effects (font (size 0.762 0.762) (thickness 0.1524))) + ) + (fp_line (start -2.54 1.27) (end -2.54 -1.27) (layer F.SilkS) (width 0.1524)) + (fp_line (start -2.54 -1.27) (end 2.54 -1.27) (layer F.SilkS) (width 0.1524)) + (fp_line (start 2.54 -1.27) (end 2.54 1.27) (layer F.SilkS) (width 0.1524)) + (fp_line (start 2.54 1.27) (end -2.54 1.27) (layer F.SilkS) (width 0.1524)) + (pad 1 thru_hole rect (at -1.27 0) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 103 GND)) + (pad 2 thru_hole circle (at 1.27 0) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 150 "Net-(LED_EN1-Pad2)")) + (model pin_array/pins_array_2x1.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:TO92-INVERT (layer Composant) (tedit 53D8D2B1) (tstamp 53D8DFE5) (at 187.96 89.535 270) (descr "Transistor TO92 brochage type BC237") (tags "TR TO92") @@ -4968,11 +2877,11 @@ (fp_line (start -3.81 1.27) (end -2.54 2.54) (layer F.SilkS) (width 0.3048)) (fp_line (start -2.54 2.54) (end -1.27 2.54) (layer F.SilkS) (width 0.3048)) (pad 1 thru_hole rect (at -1.27 1.27 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) - (net 148 "Net-(C3-Pad1)")) + (net 109 "Net-(C3-Pad1)")) (pad 2 thru_hole circle (at -1.27 -1.27 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) - (net 278 VDD)) + (net 105 VDD)) (pad 3 thru_hole circle (at 1.27 -1.27 270) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) - (net 133 GND)) + (net 103 GND)) (model discret/to98.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -4980,118 +2889,151 @@ ) ) - (module DPAK5 (layer Composant) (tedit 428087B0) (tstamp 46603376) - (at 78.105 93.091) - (tags "CMS DPACK") - (path /47D80202/46603376) - (fp_text reference VR1 (at 0 -14.224) (layer F.SilkS) - (effects (font (size 1.27 1.27) (thickness 0.1524))) + (module pin_array:PIN_ARRAY_30X2 (layer Composant) (tedit 5031D875) (tstamp 53D8DFF3) + (at 147.574 138.176 180) + (descr "Double rangee de contacts 2 x 12 pins") + (tags CONN) + (path /47D80202/4652A4FB) + (fp_text reference MCU_PORT1 (at 0 -3.81 180) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.27432))) ) - (fp_text value LT1129_QPACK (at 0 -3.302) (layer F.SilkS) - (effects (font (size 1.27 1.27) (thickness 0.1524))) + (fp_text value CONN_30X2 (at 0 3.81 180) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start 2.794 -2.413) (end 2.794 1.27) (layer F.SilkS) (width 0.127)) - (fp_line (start 2.794 1.27) (end 4.064 1.27) (layer F.SilkS) (width 0.127)) - (fp_line (start 4.064 1.27) (end 4.064 -2.413) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.143 -2.413) (end 1.143 1.27) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.143 1.27) (end 2.413 1.27) (layer F.SilkS) (width 0.127)) - (fp_line (start 2.413 1.27) (end 2.413 -2.413) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.635 -2.413) (end -0.635 1.27) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.635 1.27) (end 0.635 1.27) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.635 1.27) (end 0.635 -2.413) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.286 -2.413) (end -2.286 1.27) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.286 1.27) (end -1.143 1.27) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.143 1.27) (end -1.016 1.27) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.016 1.27) (end -1.016 -2.413) (layer F.SilkS) (width 0.127)) - (fp_line (start -4.064 -2.413) (end -4.064 1.27) (layer F.SilkS) (width 0.127)) - (fp_line (start -4.064 1.27) (end -2.794 1.27) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.794 1.27) (end -2.794 -2.413) (layer F.SilkS) (width 0.127)) - (fp_line (start -5.334 -2.413) (end 5.334 -2.413) (layer F.SilkS) (width 0.127)) - (fp_line (start 5.334 -2.413) (end 5.334 -12.573) (layer F.SilkS) (width 0.127)) - (fp_line (start 5.334 -12.573) (end -5.334 -12.573) (layer F.SilkS) (width 0.127)) - (fp_line (start -5.334 -12.573) (end -5.334 -2.413) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -3.4036 0) (size 1.0668 2.286) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 3 smd rect (at 0 -8.763) (size 10.668 8.89) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (pad 3 smd rect (at 0 0) (size 1.0668 2.286) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (pad 2 smd rect (at -1.7018 0) (size 1.0668 2.286) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 4 smd rect (at 1.7018 0) (size 1.0668 2.286) (layers Composant F.Paste F.Mask) - (net 277 "Net-(VR1-Pad4)")) - (pad 5 smd rect (at 3.4036 0) (size 1.0668 2.286) (layers Composant F.Paste F.Mask) - (net 158 "Net-(C38-Pad1)")) - (model smd/dpack_5.wrl + (fp_line (start 12.7 2.54) (end 38.1 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 12.7 -2.54) (end 38.1 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 12.7 2.54) (end -38.1 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 12.7 -2.54) (end -38.1 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 38.1 -2.54) (end 38.1 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -38.1 -2.54) (end -38.1 2.54) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole rect (at -36.83 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 129 "Net-(C43-Pad2)")) + (pad 2 thru_hole circle (at -36.83 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 151 /xilinx/IRQ-1)) + (pad 11 thru_hole circle (at -24.13 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 152 /inout_user/UCTS1)) + (pad 4 thru_hole circle (at -34.29 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 153 /inout_user/RTS0-)) + (pad 13 thru_hole circle (at -21.59 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 154 /inout_user/PWM1)) + (pad 6 thru_hole circle (at -31.75 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 107 /inout_user/RSTI-)) + (pad 15 thru_hole circle (at -19.05 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 155 /inout_user/PWM3)) + (pad 8 thru_hole circle (at -29.21 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 156 /xilinx/IRQ-2)) + (pad 17 thru_hole circle (at -16.51 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 157 /inout_user/QSPI_DOUT)) + (pad 10 thru_hole circle (at -26.67 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 158 /AN0)) + (pad 19 thru_hole circle (at -13.97 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 159 /inout_user/QSPI_DIN)) + (pad 12 thru_hole circle (at -24.13 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 160 /AN1)) + (pad 21 thru_hole circle (at -11.43 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 161 /inout_user/QSPI_SCLK)) + (pad 14 thru_hole circle (at -21.59 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 3 /AN2)) + (pad 23 thru_hole circle (at -8.89 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 162 /QSPI_CS0)) + (pad 16 thru_hole circle (at -19.05 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 4 /AN3)) + (pad 25 thru_hole circle (at -6.35 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 163 /xilinx/QSPI_CS1)) + (pad 18 thru_hole circle (at -16.51 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 5 /AN4)) + (pad 27 thru_hole circle (at -3.81 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 61 /xilinx/QSPI_CS2)) + (pad 20 thru_hole circle (at -13.97 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 164 /AN5)) + (pad 29 thru_hole circle (at -1.27 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 29 /QSPI_CS3)) + (pad 22 thru_hole circle (at -11.43 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 6 /AN6)) + (pad 31 thru_hole circle (at 1.27 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 165 /xilinx/IRQ-3)) + (pad 24 thru_hole circle (at -8.89 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 166 /AN7)) + (pad 26 thru_hole circle (at -6.35 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 133 /inout_user/CANTX)) + (pad 33 thru_hole circle (at 3.81 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 167 /IRQ-4)) + (pad 28 thru_hole circle (at -3.81 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 32 /inout_user/CANRX)) + (pad 32 thru_hole circle (at 1.27 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 39 /inout_user/PWM7)) + (pad 34 thru_hole circle (at 3.81 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 168 /DTIN0)) + (pad 36 thru_hole circle (at 6.35 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 18 /DTIN1)) + (pad 38 thru_hole circle (at 8.89 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 169 /DTIN2)) + (pad 35 thru_hole circle (at 6.35 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 21 /IRQ-5)) + (pad 37 thru_hole circle (at 8.89 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 22 /IRQ-6)) + (pad 3 thru_hole circle (at -34.29 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 103 GND)) + (pad 5 thru_hole circle (at -31.75 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 170 /inout_user/UTXD1)) + (pad 7 thru_hole circle (at -29.21 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 54 /inout_user/URXD1)) + (pad 9 thru_hole circle (at -26.67 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 171 /inout_user/URTS1)) + (pad 39 thru_hole circle (at 11.43 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 23 /IRQ-7)) + (pad 40 thru_hole circle (at 11.43 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 172 /DTIN3)) + (pad 30 thru_hole circle (at -1.27 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 38 /inout_user/PWM5)) + (pad 41 thru_hole circle (at 13.97 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 56 /inout_user/UTXD0)) + (pad 42 thru_hole circle (at 13.97 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 52 /inout_user/URTS0)) + (pad 43 thru_hole circle (at 16.51 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 173 /inout_user/URXD0)) + (pad 44 thru_hole circle (at 16.51 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 174 /inout_user/UCTS0)) + (pad 45 thru_hole circle (at 19.05 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 175 /inout_user/UTXD2)) + (pad 46 thru_hole circle (at 19.05 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 53 /inout_user/URTS2)) + (pad 47 thru_hole circle (at 21.59 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 55 /inout_user/URXD2)) + (pad 48 thru_hole circle (at 21.59 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 51 /inout_user/UCTS2)) + (pad 49 thru_hole circle (at 24.13 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 176 /GPT0)) + (pad 50 thru_hole circle (at 24.13 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 19 /GPT1)) + (pad 51 thru_hole circle (at 26.67 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 177 /GPT2)) + (pad 52 thru_hole circle (at 26.67 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 20 /GPT3)) + (pad 53 thru_hole circle (at 29.21 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 178 /inout_user/RCON-)) + (pad 54 thru_hole circle (at 29.21 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 103 GND)) + (pad 55 thru_hole circle (at 31.75 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 111 /inout_user/VCCA)) + (pad 56 thru_hole circle (at 31.75 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 112 GNDA)) + (pad 57 thru_hole circle (at 34.29 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 111 /inout_user/VCCA)) + (pad 58 thru_hole circle (at 34.29 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 112 GNDA)) + (pad 59 thru_hole circle (at 36.83 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 105 VDD)) + (pad 60 thru_hole circle (at 36.83 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 103 GND)) + (model pin_array/pins_array_30x2.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) - (module D5 (layer Composant) (tedit 200000) (tstamp 465306C8) - (at 87.122 77.089) - (descr "Diode 5 pas") - (tags "DIODE DEV") - (path /47D80202/465306C8) - (fp_text reference D7 (at 0 0) (layer F.SilkS) - (effects (font (size 1.524 1.016) (thickness 0.254))) - ) - (fp_text value 1N4004 (at -0.254 0) (layer F.SilkS) hide - (effects (font (size 1.524 1.016) (thickness 0.254))) - ) - (fp_line (start 6.35 0) (end 5.08 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 0) (end 5.08 -1.27) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 -1.27) (end -5.08 -1.27) (layer F.SilkS) (width 0.3048)) - (fp_line (start -5.08 -1.27) (end -5.08 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -5.08 0) (end -6.35 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start -5.08 0) (end -5.08 1.27) (layer F.SilkS) (width 0.3048)) - (fp_line (start -5.08 1.27) (end 5.08 1.27) (layer F.SilkS) (width 0.3048)) - (fp_line (start 5.08 1.27) (end 5.08 0) (layer F.SilkS) (width 0.3048)) - (fp_line (start 3.81 -1.27) (end 3.81 1.27) (layer F.SilkS) (width 0.3048)) - (fp_line (start 4.064 -1.27) (end 4.064 1.27) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole circle (at -6.35 0) (size 1.778 1.778) (drill 1.143) (layers *.Cu *.Mask F.SilkS) - (net 133 GND)) - (pad 2 thru_hole rect (at 6.35 0) (size 1.778 1.778) (drill 1.143) (layers *.Cu *.Mask F.SilkS) - (net 158 "Net-(C38-Pad1)")) - (model discret/diode.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.5 0.5 0.5)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM1206POL (layer Composant) (tedit 42806E4C) (tstamp 46161D3C) - (at 150.241 120.015) - (path /46161D3C) - (attr smd) - (fp_text reference C17 (at 0 0) (layer F.SilkS) - (effects (font (size 0.762 0.762) (thickness 0.127))) - ) - (fp_text value 100uF (at 0 0) (layer F.SilkS) hide - (effects (font (size 0.762 0.762) (thickness 0.127))) - ) - (fp_line (start -2.54 -1.143) (end -2.794 -1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.794 -1.143) (end -2.794 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.794 1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (model smd/chip_cms_pol.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.17 0.16 0.16)) - (rotate (xyz 0 0 0)) - ) - ) - - (module PIN_ARRAY-6X1 (layer Composant) (tedit 41402119) (tstamp 46A76BA6) + (module pin_array:PIN_ARRAY-6X1 (layer Composant) (tedit 41402119) (tstamp 53D8E038) (at 223.52 69.85 270) (descr "Connecteur 6 pins") (tags "CONN DEV") @@ -5108,17 +3050,17 @@ (fp_line (start 7.62 1.27) (end -7.62 1.27) (layer F.SilkS) (width 0.3048)) (fp_line (start -5.08 1.27) (end -5.08 -1.27) (layer F.SilkS) (width 0.3048)) (pad 1 thru_hole rect (at -6.35 0 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 278 VDD)) + (net 105 VDD)) (pad 2 thru_hole circle (at -3.81 0 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 133 GND)) + (net 103 GND)) (pad 3 thru_hole circle (at -1.27 0 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 95 /xilinx/TMS)) + (net 65 /xilinx/TMS)) (pad 4 thru_hole circle (at 1.27 0 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 93 /xilinx/TDI)) + (net 63 /xilinx/TDI)) (pad 5 thru_hole circle (at 3.81 0 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 92 /xilinx/TCK)) + (net 62 /xilinx/TCK)) (pad 6 thru_hole circle (at 6.35 0 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 94 /xilinx/TDO)) + (net 64 /xilinx/TDO)) (model pin_array/pins_array_6x1.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -5126,109 +3068,7 @@ ) ) - (module PIN_ARRAY_20X2 (layer Composant) (tedit 444612A3) (tstamp 46ADE55A) - (at 223.52 113.03 270) - (descr "Double rangee de contacts 2 x 12 pins") - (tags CONN) - (path /47D80204/46ADE55A) - (fp_text reference P4 (at 0 -3.81 270) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.254))) - ) - (fp_text value CONN_20X2 (at 0 3.81 270) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_line (start 25.4 2.54) (end -25.4 2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start 25.4 -2.54) (end -25.4 -2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start 25.4 -2.54) (end 25.4 2.54) (layer F.SilkS) (width 0.3048)) - (fp_line (start -25.4 -2.54) (end -25.4 2.54) (layer F.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at -24.13 1.27 270) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) - (net 96 /xilinx/XIL_D0)) - (pad 2 thru_hole circle (at -24.13 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 133 GND)) - (pad 11 thru_hole circle (at -11.43 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 128 /xilinx/XIL_D5)) - (pad 4 thru_hole circle (at -21.59 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 109 /xilinx/XIL_D20)) - (pad 13 thru_hole circle (at -8.89 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 129 /xilinx/XIL_D6)) - (pad 6 thru_hole circle (at -19.05 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 110 /xilinx/XIL_D21)) - (pad 15 thru_hole circle (at -6.35 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 130 /xilinx/XIL_D7)) - (pad 8 thru_hole circle (at -16.51 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 111 /xilinx/XIL_D22)) - (pad 17 thru_hole circle (at -3.81 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 131 /xilinx/XIL_D8)) - (pad 10 thru_hole circle (at -13.97 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 112 /xilinx/XIL_D23)) - (pad 19 thru_hole circle (at -1.27 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 132 /xilinx/XIL_D9)) - (pad 12 thru_hole circle (at -11.43 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 113 /xilinx/XIL_D24)) - (pad 21 thru_hole circle (at 1.27 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 98 /xilinx/XIL_D10)) - (pad 14 thru_hole circle (at -8.89 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 114 /xilinx/XIL_D25)) - (pad 23 thru_hole circle (at 3.81 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 99 /xilinx/XIL_D11)) - (pad 16 thru_hole circle (at -6.35 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 115 /xilinx/XIL_D26)) - (pad 25 thru_hole circle (at 6.35 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 100 /xilinx/XIL_D12)) - (pad 18 thru_hole circle (at -3.81 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 116 /xilinx/XIL_D27)) - (pad 27 thru_hole circle (at 8.89 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 101 /xilinx/XIL_D13)) - (pad 20 thru_hole circle (at -1.27 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 117 /xilinx/XIL_D28)) - (pad 29 thru_hole circle (at 11.43 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 102 /xilinx/XIL_D14)) - (pad 22 thru_hole circle (at 1.27 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 118 /xilinx/XIL_D29)) - (pad 31 thru_hole circle (at 13.97 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 103 /xilinx/XIL_D15)) - (pad 24 thru_hole circle (at 3.81 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 120 /xilinx/XIL_D30)) - (pad 26 thru_hole circle (at 6.35 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 121 /xilinx/XIL_D31)) - (pad 33 thru_hole circle (at 16.51 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 104 /xilinx/XIL_D16)) - (pad 28 thru_hole circle (at 8.89 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 122 /xilinx/XIL_D32)) - (pad 32 thru_hole circle (at 13.97 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 124 /xilinx/XIL_D34)) - (pad 34 thru_hole circle (at 16.51 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 125 /xilinx/XIL_D35)) - (pad 36 thru_hole circle (at 19.05 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 126 /xilinx/XIL_D36)) - (pad 38 thru_hole circle (at 21.59 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 83 /xilinx/+3,3V_OUT)) - (pad 35 thru_hole circle (at 19.05 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 105 /xilinx/XIL_D17)) - (pad 37 thru_hole circle (at 21.59 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 106 /xilinx/XIL_D18)) - (pad 3 thru_hole circle (at -21.59 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 97 /xilinx/XIL_D1)) - (pad 5 thru_hole circle (at -19.05 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 108 /xilinx/XIL_D2)) - (pad 7 thru_hole circle (at -16.51 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 119 /xilinx/XIL_D3)) - (pad 9 thru_hole circle (at -13.97 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 127 /xilinx/XIL_D4)) - (pad 39 thru_hole circle (at 24.13 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 107 /xilinx/XIL_D19)) - (pad 40 thru_hole circle (at 24.13 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 133 GND)) - (pad 30 thru_hole circle (at 11.43 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 123 /xilinx/XIL_D33)) - (model pin_array/pins_array_20x2.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module PIN_ARRAY_2X2 (layer Composant) (tedit 3FAB87D4) (tstamp 46A76EB2) + (module pin_array:PIN_ARRAY_2X2 (layer Composant) (tedit 3FAB87D4) (tstamp 53D8E046) (at 198.755 88.265 270) (descr "Double rangee de contacts 2 x 2 pins") (tags CONN) @@ -5244,13 +3084,13 @@ (fp_line (start 2.54 2.54) (end -2.54 2.54) (layer F.SilkS) (width 0.3048)) (fp_line (start -2.54 2.54) (end -2.54 -2.54) (layer F.SilkS) (width 0.3048)) (pad 1 thru_hole rect (at -1.27 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 71 /inout_user/UCTS1)) + (net 152 /inout_user/UCTS1)) (pad 2 thru_hole circle (at -1.27 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 180 "Net-(P3-Pad2)")) + (net 179 "Net-(P3-Pad2)")) (pad 3 thru_hole circle (at 1.27 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 74 /inout_user/URTS1)) + (net 171 /inout_user/URTS1)) (pad 4 thru_hole circle (at 1.27 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) - (net 181 "Net-(P3-Pad4)")) + (net 180 "Net-(P3-Pad4)")) (model pin_array/pins_array_2x2.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) @@ -5258,840 +3098,1380 @@ ) ) - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 46A76BCA) - (at 218.44 67.31 270) - (path /47D80204/46A76BCA) - (attr smd) - (fp_text reference R57 (at 0 0 270) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) + (module pin_array:PIN_ARRAY_20X2 (layer Composant) (tedit 5031D84E) (tstamp 53D8E051) + (at 223.52 113.03 270) + (descr "Double rangee de contacts 2 x 12 pins") + (tags CONN) + (path /47D80204/46ADE55A) + (fp_text reference P4 (at 0 -3.81 270) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.27432))) ) - (fp_text value 4K7 (at 0 0 270) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) + (fp_text value CONN_20X2 (at 0 3.81 270) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 92 /xilinx/TCK)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 46A76BA7) - (at 206.375 80.645) - (path /47D80204/46A76BA7) - (attr smd) - (fp_text reference R63 (at 0 0) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 1K (at 0 0) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 89 /xilinx/LED_TEST2)) - (pad 2 smd rect (at 0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 169 "Net-(D9-Pad1)")) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Composant) (tedit 42806E04) (tstamp 46A76BC3) - (at 206.375 76.835) - (path /47D80204/46A76BC3) - (attr smd) - (fp_text reference R62 (at 0 0) (layer F.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_text value 1K (at 0 0) (layer F.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127))) - ) - (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 88 /xilinx/LED_TEST1)) - (pad 2 smd rect (at 0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) - (net 168 "Net-(D8-Pad1)")) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Cuivre) (tedit 42806E04) (tstamp 46A76BBC) - (at 191.008 115.189 180) - (path /47D80204/46A76BBC) - (attr smd) - (fp_text reference C61 (at 0 0 180) (layer B.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127)) (justify mirror)) - ) - (fp_text value 100nF (at 0 0 180) (layer B.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127)) (justify mirror)) - ) - (fp_circle (center -1.651 -0.762) (end -1.651 -0.635) (layer B.SilkS) (width 0.127)) - (fp_line (start -0.508 -0.762) (end -1.524 -0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -1.524 0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -0.508 0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start 0.508 0.762) (end 1.524 0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 1.524 -0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 0.508 -0.762) (layer B.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) - (net 133 GND)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Cuivre) (tedit 42806E04) (tstamp 46A76BBB) - (at 197.485 123.444 270) - (path /47D80204/46A76BBB) - (attr smd) - (fp_text reference C60 (at 0 0 270) (layer B.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127)) (justify mirror)) - ) - (fp_text value 100nF (at 0 0 270) (layer B.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127)) (justify mirror)) - ) - (fp_circle (center -1.651 -0.762) (end -1.651 -0.635) (layer B.SilkS) (width 0.127)) - (fp_line (start -0.508 -0.762) (end -1.524 -0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -1.524 0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -0.508 0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start 0.508 0.762) (end 1.524 0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 1.524 -0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 0.508 -0.762) (layer B.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) - (net 133 GND)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Cuivre) (tedit 42806E04) (tstamp 46A76BBA) - (at 205.359 123.444 270) - (path /47D80204/46A76BBA) - (attr smd) - (fp_text reference C59 (at 0 0 270) (layer B.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127)) (justify mirror)) - ) - (fp_text value 100nF (at 0 0 270) (layer B.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127)) (justify mirror)) - ) - (fp_circle (center -1.651 -0.762) (end -1.651 -0.635) (layer B.SilkS) (width 0.127)) - (fp_line (start -0.508 -0.762) (end -1.524 -0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -1.524 0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -0.508 0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start 0.508 0.762) (end 1.524 0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 1.524 -0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 0.508 -0.762) (layer B.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) - (net 133 GND)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Cuivre) (tedit 42806E04) (tstamp 46A76BB1) - (at 199.009 100.838 90) - (path /47D80204/46A76BB1) - (attr smd) - (fp_text reference C58 (at 0 0 90) (layer B.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127)) (justify mirror)) - ) - (fp_text value 100nF (at 0 0 90) (layer B.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127)) (justify mirror)) - ) - (fp_circle (center -1.651 -0.762) (end -1.651 -0.635) (layer B.SilkS) (width 0.127)) - (fp_line (start -0.508 -0.762) (end -1.524 -0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -1.524 0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -0.508 0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start 0.508 0.762) (end 1.524 0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 1.524 -0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 0.508 -0.762) (layer B.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 90) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 0.9525 0 90) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) - (net 133 GND)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Cuivre) (tedit 42806E04) (tstamp 46A76BB0) - (at 190.5 99.06 90) - (path /47D80204/46A76BB0) - (attr smd) - (fp_text reference C57 (at 0 0 90) (layer B.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127)) (justify mirror)) - ) - (fp_text value 100nF (at 0 0 90) (layer B.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127)) (justify mirror)) - ) - (fp_circle (center -1.651 -0.762) (end -1.651 -0.635) (layer B.SilkS) (width 0.127)) - (fp_line (start -0.508 -0.762) (end -1.524 -0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -1.524 0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -0.508 0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start 0.508 0.762) (end 1.524 0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 1.524 -0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 0.508 -0.762) (layer B.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 90) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 0.9525 0 90) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) - (net 133 GND)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Cuivre) (tedit 42806E04) (tstamp 46A76BAF) - (at 208.28 119.38 270) - (path /47D80204/46A76BAF) - (attr smd) - (fp_text reference C56 (at 0 0 270) (layer B.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127)) (justify mirror)) - ) - (fp_text value 100nF (at 0 0 270) (layer B.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127)) (justify mirror)) - ) - (fp_circle (center -1.651 -0.762) (end -1.651 -0.635) (layer B.SilkS) (width 0.127)) - (fp_line (start -0.508 -0.762) (end -1.524 -0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -1.524 0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -0.508 0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start 0.508 0.762) (end 1.524 0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 1.524 -0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 0.508 -0.762) (layer B.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) - (net 133 GND)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Cuivre) (tedit 42806E04) (tstamp 46A76BAE) - (at 201.422 123.444 270) - (path /47D80204/46A76BAE) - (attr smd) - (fp_text reference C55 (at 0 0 270) (layer B.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127)) (justify mirror)) - ) - (fp_text value 100nF (at 0 0 270) (layer B.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127)) (justify mirror)) - ) - (fp_circle (center -1.651 -0.762) (end -1.651 -0.635) (layer B.SilkS) (width 0.127)) - (fp_line (start -0.508 -0.762) (end -1.524 -0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -1.524 0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -0.508 0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start 0.508 0.762) (end 1.524 0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 1.524 -0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 0.508 -0.762) (layer B.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) - (net 133 GND)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Cuivre) (tedit 42806E04) (tstamp 46A76BB5) - (at 208.28 110.49 270) - (path /47D80204/46A76BB5) - (attr smd) - (fp_text reference C54 (at 0 0 270) (layer B.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127)) (justify mirror)) - ) - (fp_text value 100nF (at 0 0 270) (layer B.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127)) (justify mirror)) - ) - (fp_circle (center -1.651 -0.762) (end -1.651 -0.635) (layer B.SilkS) (width 0.127)) - (fp_line (start -0.508 -0.762) (end -1.524 -0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -1.524 0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -0.508 0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start 0.508 0.762) (end 1.524 0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 1.524 -0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 0.508 -0.762) (layer B.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) - (net 133 GND)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Cuivre) (tedit 42806E04) (tstamp 46A76BB4) - (at 203.454 100.838 90) - (path /47D80204/46A76BB4) - (attr smd) - (fp_text reference C53 (at 0 0 90) (layer B.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127)) (justify mirror)) - ) - (fp_text value 100nF (at 0 0 90) (layer B.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127)) (justify mirror)) - ) - (fp_circle (center -1.651 -0.762) (end -1.651 -0.635) (layer B.SilkS) (width 0.127)) - (fp_line (start -0.508 -0.762) (end -1.524 -0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -1.524 0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -0.508 0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start 0.508 0.762) (end 1.524 0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 1.524 -0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 0.508 -0.762) (layer B.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 90) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 0.9525 0 90) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) - (net 133 GND)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Cuivre) (tedit 42806E04) (tstamp 46A76BB3) - (at 191.008 107.315 180) - (path /47D80204/46A76BB3) - (attr smd) - (fp_text reference C52 (at 0 0 180) (layer B.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127)) (justify mirror)) - ) - (fp_text value 100nF (at 0 0 180) (layer B.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127)) (justify mirror)) - ) - (fp_circle (center -1.651 -0.762) (end -1.651 -0.635) (layer B.SilkS) (width 0.127)) - (fp_line (start -0.508 -0.762) (end -1.524 -0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -1.524 0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -0.508 0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start 0.508 0.762) (end 1.524 0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 1.524 -0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 0.508 -0.762) (layer B.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) - (net 133 GND)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM0805 (layer Cuivre) (tedit 42806E04) (tstamp 46A76BB2) - (at 209.296 100.838 90) - (path /47D80204/46A76BB2) - (attr smd) - (fp_text reference C51 (at 0 0 90) (layer B.SilkS) - (effects (font (size 0.635 0.635) (thickness 0.127)) (justify mirror)) - ) - (fp_text value 100nF (at 0 0 90) (layer B.SilkS) hide - (effects (font (size 0.635 0.635) (thickness 0.127)) (justify mirror)) - ) - (fp_circle (center -1.651 -0.762) (end -1.651 -0.635) (layer B.SilkS) (width 0.127)) - (fp_line (start -0.508 -0.762) (end -1.524 -0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start -1.524 -0.762) (end -1.524 0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start -1.524 0.762) (end -0.508 0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start 0.508 0.762) (end 1.524 0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start 1.524 0.762) (end 1.524 -0.762) (layer B.SilkS) (width 0.127)) - (fp_line (start 1.524 -0.762) (end 0.508 -0.762) (layer B.SilkS) (width 0.127)) - (pad 1 smd rect (at -0.9525 0 90) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) - (net 278 VDD)) - (pad 2 smd rect (at 0.9525 0 90) (size 0.889 1.397) (layers Cuivre B.Paste B.Mask) - (net 133 GND)) - (model smd/chip_cms.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.1 0.1 0.1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM1206POL (layer Composant) (tedit 42806E4C) (tstamp 46A76BA8) - (at 212.09 80.645) - (path /47D80204/46A76BA8) - (attr smd) - (fp_text reference D9 (at 0 0) (layer F.SilkS) - (effects (font (size 0.762 0.762) (thickness 0.127))) - ) - (fp_text value LED (at 0 0) (layer F.SilkS) hide - (effects (font (size 0.762 0.762) (thickness 0.127))) - ) - (fp_line (start -2.54 -1.143) (end -2.794 -1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.794 -1.143) (end -2.794 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.794 1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Composant F.Paste F.Mask) - (net 169 "Net-(D9-Pad1)")) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (model smd/chip_cms_pol.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.17 0.16 0.16)) - (rotate (xyz 0 0 0)) - ) - ) - - (module SM1206POL (layer Composant) (tedit 42806E4C) (tstamp 46A76BC4) - (at 212.09 76.835) - (path /47D80204/46A76BC4) - (attr smd) - (fp_text reference D8 (at 0 0) (layer F.SilkS) - (effects (font (size 0.762 0.762) (thickness 0.127))) - ) - (fp_text value LED (at 0 0) (layer F.SilkS) hide - (effects (font (size 0.762 0.762) (thickness 0.127))) - ) - (fp_line (start -2.54 -1.143) (end -2.794 -1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.794 -1.143) (end -2.794 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.794 1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) - (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) - (pad 1 smd rect (at -1.651 0) (size 1.524 2.032) (layers Composant F.Paste F.Mask) - (net 168 "Net-(D8-Pad1)")) - (pad 2 smd rect (at 1.651 0) (size 1.524 2.032) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (model smd/chip_cms_pol.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.17 0.16 0.16)) - (rotate (xyz 0 0 0)) - ) - ) - - (module TQFP144 (layer Composant) (tedit 200000) (tstamp 470F38BE) - (at 201.93 111.76) - (path /47D80204/470F38BE) - (attr smd) - (fp_text reference U9 (at 0 -1.905) (layer F.SilkS) - (effects (font (size 1.524 1.016) (thickness 0.254))) - ) - (fp_text value XCR3256-TQ144 (at 0 1.905) (layer F.SilkS) - (effects (font (size 1.524 1.016) (thickness 0.254))) - ) - (fp_circle (center 8.255 -8.255) (end 8.255 -8.89) (layer F.SilkS) (width 0.3048)) - (fp_line (start 8.636 -9.398) (end 8.8646 -9.398) (layer F.SilkS) (width 0.3048)) - (fp_line (start 8.8646 -9.398) (end 8.8646 -10.16) (layer F.SilkS) (width 0.3048)) - (fp_line (start 8.636 -10.16) (end 8.636 -9.398) (layer F.SilkS) (width 0.3048)) - (fp_line (start -9.525 -10.16) (end -10.16 -9.525) (layer F.SilkS) (width 0.3048)) - (fp_line (start -10.16 -9.525) (end -10.16 9.525) (layer F.SilkS) (width 0.3048)) - (fp_line (start -10.16 9.525) (end -9.525 10.16) (layer F.SilkS) (width 0.3048)) - (fp_line (start -9.525 10.16) (end 9.525 10.16) (layer F.SilkS) (width 0.3048)) - (fp_line (start 9.525 10.16) (end 10.16 9.525) (layer F.SilkS) (width 0.3048)) - (fp_line (start 10.16 9.525) (end 10.16 -9.525) (layer F.SilkS) (width 0.3048)) - (fp_line (start 10.16 -9.525) (end 9.525 -10.16) (layer F.SilkS) (width 0.3048)) - (fp_line (start 9.525 -10.16) (end -9.525 -10.16) (layer F.SilkS) (width 0.3048)) - (pad 1 smd rect (at 8.7503 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 112 /xilinx/XIL_D23)) - (pad 2 smd rect (at 8.2423 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 127 /xilinx/XIL_D4)) - (pad 3 smd rect (at 7.747 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (pad 4 smd rect (at 7.2517 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 93 /xilinx/TDI)) - (pad 5 smd rect (at 6.7437 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 111 /xilinx/XIL_D22)) - (pad 6 smd rect (at 6.2484 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 109 /xilinx/XIL_D20)) - (pad 7 smd rect (at 5.7531 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 108 /xilinx/XIL_D2)) - (pad 8 smd rect (at 5.2451 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 119 /xilinx/XIL_D3)) - (pad 9 smd rect (at 4.7498 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 265 "Net-(U9-Pad9)")) - (pad 10 smd rect (at 4.2545 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 110 /xilinx/XIL_D21)) - (pad 11 smd rect (at 3.7465 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 97 /xilinx/XIL_D1)) - (pad 12 smd rect (at 3.2512 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 96 /xilinx/XIL_D0)) - (pad 13 smd rect (at 2.7559 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (pad 14 smd rect (at 2.2479 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 217 "Net-(U9-Pad14)")) - (pad 15 smd rect (at 1.7526 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 219 "Net-(U9-Pad15)")) - (pad 16 smd rect (at 1.2573 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 220 "Net-(U9-Pad16)")) - (pad 17 smd rect (at 0.7493 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (pad 18 smd rect (at 0.254 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 221 "Net-(U9-Pad18)")) - (pad 19 smd rect (at -0.254 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 222 "Net-(U9-Pad19)")) - (pad 20 smd rect (at -0.7493 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 95 /xilinx/TMS)) - (pad 21 smd rect (at -1.2573 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 223 "Net-(U9-Pad21)")) - (pad 22 smd rect (at -1.7526 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 224 "Net-(U9-Pad22)")) - (pad 23 smd rect (at -2.2479 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 225 "Net-(U9-Pad23)")) - (pad 24 smd rect (at -2.7559 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 25 smd rect (at -3.2512 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 226 "Net-(U9-Pad25)")) - (pad 26 smd rect (at -3.7465 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 227 "Net-(U9-Pad26)")) - (pad 27 smd rect (at -4.2545 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 89 /xilinx/LED_TEST2)) - (pad 28 smd rect (at -4.7498 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 88 /xilinx/LED_TEST1)) - (pad 29 smd rect (at -5.2451 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 228 "Net-(U9-Pad29)")) - (pad 30 smd rect (at -5.7531 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 229 "Net-(U9-Pad30)")) - (pad 31 smd rect (at -6.2484 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 181 "Net-(P3-Pad4)")) - (pad 32 smd rect (at -6.7437 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 180 "Net-(P3-Pad2)")) - (pad 33 smd rect (at -7.2517 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (pad 34 smd rect (at -7.747 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 230 "Net-(U9-Pad34)")) - (pad 35 smd rect (at -8.2423 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 231 "Net-(U9-Pad35)")) - (pad 36 smd rect (at -8.7503 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 232 "Net-(U9-Pad36)")) - (pad 66 smd rect (at -10.9855 5.7531) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 245 "Net-(U9-Pad66)")) - (pad 67 smd rect (at -10.9855 6.2484) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 246 "Net-(U9-Pad67)")) - (pad 68 smd rect (at -10.9855 6.7437) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 247 "Net-(U9-Pad68)")) - (pad 69 smd rect (at -10.9855 7.2517) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 248 "Net-(U9-Pad69)")) - (pad 70 smd rect (at -10.9855 7.747) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 249 "Net-(U9-Pad70)")) - (pad 71 smd rect (at -10.9855 8.2423) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 250 "Net-(U9-Pad71)")) - (pad 72 smd rect (at -10.9855 8.7503) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 251 "Net-(U9-Pad72)")) - (pad 114 smd rect (at 10.9855 6.2484) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 100 /xilinx/XIL_D12)) - (pad 115 smd rect (at 10.9855 5.7531) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 116 smd rect (at 10.9855 5.2451) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 121 /xilinx/XIL_D31)) - (pad 117 smd rect (at 10.9855 4.7498) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 118 /xilinx/XIL_D29)) - (pad 118 smd rect (at 10.9855 4.2545) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 120 /xilinx/XIL_D30)) - (pad 119 smd rect (at 10.9855 3.7465) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 99 /xilinx/XIL_D11)) - (pad 120 smd rect (at 10.9855 3.2512) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 214 "Net-(U9-Pad120)")) - (pad 121 smd rect (at 10.9855 2.7559) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 215 "Net-(U9-Pad121)")) - (pad 122 smd rect (at 10.9855 2.2479) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 98 /xilinx/XIL_D10)) - (pad 123 smd rect (at 10.9855 1.7526) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 124 smd rect (at 10.9855 1.2573) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (pad 125 smd rect (at 10.9855 0.7493) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (pad 126 smd rect (at 10.9855 0.254) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (pad 127 smd rect (at 10.9855 -0.254) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (pad 128 smd rect (at 10.9855 -0.7493) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 84 /xilinx/GLCK2)) - (pad 129 smd rect (at 10.9855 -1.2573) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (pad 130 smd rect (at 10.9855 -1.7526) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 131 smd rect (at 10.9855 -2.2479) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 132 /xilinx/XIL_D9)) - (pad 132 smd rect (at 10.9855 -2.7559) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 117 /xilinx/XIL_D28)) - (pad 133 smd rect (at 10.9855 -3.2512) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 216 "Net-(U9-Pad133)")) - (pad 134 smd rect (at 10.9855 -3.7465) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 116 /xilinx/XIL_D27)) - (pad 135 smd rect (at 10.9855 -4.2545) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (pad 136 smd rect (at 10.9855 -4.7498) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 131 /xilinx/XIL_D8)) - (pad 137 smd rect (at 10.9855 -5.2451) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 115 /xilinx/XIL_D26)) - (pad 138 smd rect (at 10.9855 -5.7531) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 130 /xilinx/XIL_D7)) - (pad 139 smd rect (at 10.9855 -6.2484) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 114 /xilinx/XIL_D25)) - (pad 140 smd rect (at 10.9855 -6.7437) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 129 /xilinx/XIL_D6)) - (pad 141 smd rect (at 10.9855 -7.2517) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 218 "Net-(U9-Pad141)")) - (pad 142 smd rect (at 10.9855 -7.747) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 113 /xilinx/XIL_D24)) - (pad 143 smd rect (at 10.9855 -8.2423) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 128 /xilinx/XIL_D5)) - (pad 144 smd rect (at 10.9855 -8.7503) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 37 smd rect (at -10.9855 -8.7503) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 233 "Net-(U9-Pad37)")) - (pad 38 smd rect (at -10.9855 -8.2423) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 234 "Net-(U9-Pad38)")) - (pad 39 smd rect (at -10.9855 -7.747) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 235 "Net-(U9-Pad39)")) - (pad 40 smd rect (at -10.9855 -7.2517) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 236 "Net-(U9-Pad40)")) - (pad 41 smd rect (at -10.9855 -6.7437) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 237 "Net-(U9-Pad41)")) - (pad 42 smd rect (at -10.9855 -6.2484) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 85 /xilinx/IRQ-1)) - (pad 43 smd rect (at -10.9855 -5.7531) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 86 /xilinx/IRQ-2)) - (pad 44 smd rect (at -10.9855 -5.2451) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 87 /xilinx/IRQ-3)) - (pad 45 smd rect (at -10.9855 -4.7498) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 91 /xilinx/QSPI_CS2)) - (pad 46 smd rect (at -10.9855 -4.2545) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 53 /inout_user/QSPI_DIN)) - (pad 47 smd rect (at -10.9855 -3.7465) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 54 /inout_user/QSPI_DOUT)) - (pad 48 smd rect (at -10.9855 -3.2512) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 55 /inout_user/QSPI_SCLK)) - (pad 49 smd rect (at -10.9855 -2.7559) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 71 /inout_user/UCTS1)) - (pad 50 smd rect (at -10.9855 -2.2479) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 51 smd rect (at -10.9855 -1.7526) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 52 smd rect (at -10.9855 -1.2573) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (pad 53 smd rect (at -10.9855 -0.7493) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 74 /inout_user/URTS1)) - (pad 54 smd rect (at -10.9855 -0.254) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 90 /xilinx/QSPI_CS1)) - (pad 55 smd rect (at -10.9855 0.254) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 238 "Net-(U9-Pad55)")) - (pad 56 smd rect (at -10.9855 0.7493) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 239 "Net-(U9-Pad56)")) - (pad 57 smd rect (at -10.9855 1.2573) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (pad 58 smd rect (at -10.9855 1.7526) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 59 smd rect (at -10.9855 2.2479) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (pad 60 smd rect (at -10.9855 2.7559) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 240 "Net-(U9-Pad60)")) - (pad 61 smd rect (at -10.9855 3.2512) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 241 "Net-(U9-Pad61)")) - (pad 62 smd rect (at -10.9855 3.7465) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 242 "Net-(U9-Pad62)")) - (pad 63 smd rect (at -10.9855 4.2545) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 243 "Net-(U9-Pad63)")) - (pad 64 smd rect (at -10.9855 4.7498) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (pad 65 smd rect (at -10.9855 5.2451) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 244 "Net-(U9-Pad65)")) - (pad 78 smd rect (at -6.2484 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 255 "Net-(U9-Pad78)")) - (pad 79 smd rect (at -5.7531 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 256 "Net-(U9-Pad79)")) - (pad 80 smd rect (at -5.2451 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 257 "Net-(U9-Pad80)")) - (pad 81 smd rect (at -4.7498 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 258 "Net-(U9-Pad81)")) - (pad 82 smd rect (at -4.2545 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 259 "Net-(U9-Pad82)")) - (pad 83 smd rect (at -3.7465 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 260 "Net-(U9-Pad83)")) - (pad 84 smd rect (at -3.2512 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 261 "Net-(U9-Pad84)")) - (pad 85 smd rect (at -2.7559 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (pad 86 smd rect (at -2.2479 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 262 "Net-(U9-Pad86)")) - (pad 87 smd rect (at -1.7526 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 263 "Net-(U9-Pad87)")) - (pad 88 smd rect (at -1.2573 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 264 "Net-(U9-Pad88)")) - (pad 89 smd rect (at -0.7493 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 92 /xilinx/TCK)) - (pad 90 smd rect (at -0.254 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 266 "Net-(U9-Pad90)")) - (pad 91 smd rect (at 0.254 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 267 "Net-(U9-Pad91)")) - (pad 92 smd rect (at 0.7493 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 268 "Net-(U9-Pad92)")) - (pad 93 smd rect (at 1.2573 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 269 "Net-(U9-Pad93)")) - (pad 94 smd rect (at 1.7526 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 270 "Net-(U9-Pad94)")) - (pad 95 smd rect (at 2.2479 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 96 smd rect (at 2.7559 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 107 /xilinx/XIL_D19)) - (pad 97 smd rect (at 3.2512 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 106 /xilinx/XIL_D18)) - (pad 98 smd rect (at 3.7465 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 122 /xilinx/XIL_D32)) - (pad 99 smd rect (at 4.2545 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 126 /xilinx/XIL_D36)) - (pad 100 smd rect (at 4.7498 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 104 /xilinx/XIL_D16)) - (pad 101 smd rect (at 5.2451 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 105 /xilinx/XIL_D17)) - (pad 102 smd rect (at 5.7531 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 210 "Net-(U9-Pad102)")) - (pad 103 smd rect (at 6.2484 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 211 "Net-(U9-Pad103)")) - (pad 104 smd rect (at 6.7437 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 94 /xilinx/TDO)) - (pad 105 smd rect (at 7.2517 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 133 GND)) - (pad 106 smd rect (at 7.747 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 212 "Net-(U9-Pad106)")) - (pad 107 smd rect (at 8.2423 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 125 /xilinx/XIL_D35)) - (pad 108 smd rect (at 8.7503 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 103 /xilinx/XIL_D15)) - (pad 73 smd rect (at -8.7503 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 74 smd rect (at -8.2423 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 252 "Net-(U9-Pad74)")) - (pad 75 smd rect (at -7.747 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 253 "Net-(U9-Pad75)")) - (pad 76 smd rect (at -7.2517 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 278 VDD)) - (pad 77 smd rect (at -6.7437 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) - (net 254 "Net-(U9-Pad77)")) - (pad 109 smd rect (at 10.9855 8.7503) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 102 /xilinx/XIL_D14)) - (pad 110 smd rect (at 10.9855 8.2423) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 213 "Net-(U9-Pad110)")) - (pad 111 smd rect (at 10.9855 7.747) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 101 /xilinx/XIL_D13)) - (pad 112 smd rect (at 10.9855 7.2517) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 123 /xilinx/XIL_D33)) - (pad 113 smd rect (at 10.9855 6.7437) (size 1.524 0.254) (layers Composant F.Paste F.Mask) - (net 124 /xilinx/XIL_D34)) - (model smd/tqfp144.wrl - (at (xyz 0 0 0)) - (scale (xyz 0.394 0.394 0.4)) - (rotate (xyz 0 0 0)) - ) - ) - - (module HC-18UH (layer Composant) (tedit 200000) (tstamp 462389C7) - (at 123.444 123.317 270) - (descr "Quartz boitier HC-18 horizontal") - (tags "QUARTZ DEV") - (path /462389C7) - (fp_text reference Y1 (at 0 6.35 270) (layer F.SilkS) - (effects (font (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 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.8128) (layers *.Cu *.Mask F.SilkS) - (net 11 /CLKIN/EXTAL)) - (pad 2 thru_hole circle (at 2.54 0 270) (size 1.778 1.778) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) - (net 84 /xilinx/GLCK2)) - (model discret/crystal_hc18u_horizontal.wrl + (fp_line (start 25.4 2.54) (end -25.4 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 25.4 -2.54) (end -25.4 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 25.4 -2.54) (end 25.4 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -25.4 -2.54) (end -25.4 2.54) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole rect (at -24.13 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 66 /xilinx/XIL_D0)) + (pad 2 thru_hole circle (at -24.13 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 103 GND)) + (pad 11 thru_hole circle (at -11.43 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 98 /xilinx/XIL_D5)) + (pad 4 thru_hole circle (at -21.59 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 79 /xilinx/XIL_D20)) + (pad 13 thru_hole circle (at -8.89 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 99 /xilinx/XIL_D6)) + (pad 6 thru_hole circle (at -19.05 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 80 /xilinx/XIL_D21)) + (pad 15 thru_hole circle (at -6.35 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 100 /xilinx/XIL_D7)) + (pad 8 thru_hole circle (at -16.51 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 81 /xilinx/XIL_D22)) + (pad 17 thru_hole circle (at -3.81 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 101 /xilinx/XIL_D8)) + (pad 10 thru_hole circle (at -13.97 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 82 /xilinx/XIL_D23)) + (pad 19 thru_hole circle (at -1.27 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 102 /xilinx/XIL_D9)) + (pad 12 thru_hole circle (at -11.43 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 83 /xilinx/XIL_D24)) + (pad 21 thru_hole circle (at 1.27 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 68 /xilinx/XIL_D10)) + (pad 14 thru_hole circle (at -8.89 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 84 /xilinx/XIL_D25)) + (pad 23 thru_hole circle (at 3.81 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 69 /xilinx/XIL_D11)) + (pad 16 thru_hole circle (at -6.35 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 85 /xilinx/XIL_D26)) + (pad 25 thru_hole circle (at 6.35 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 70 /xilinx/XIL_D12)) + (pad 18 thru_hole circle (at -3.81 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 86 /xilinx/XIL_D27)) + (pad 27 thru_hole circle (at 8.89 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 71 /xilinx/XIL_D13)) + (pad 20 thru_hole circle (at -1.27 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 87 /xilinx/XIL_D28)) + (pad 29 thru_hole circle (at 11.43 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 72 /xilinx/XIL_D14)) + (pad 22 thru_hole circle (at 1.27 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 88 /xilinx/XIL_D29)) + (pad 31 thru_hole circle (at 13.97 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 73 /xilinx/XIL_D15)) + (pad 24 thru_hole circle (at 3.81 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 90 /xilinx/XIL_D30)) + (pad 26 thru_hole circle (at 6.35 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 91 /xilinx/XIL_D31)) + (pad 33 thru_hole circle (at 16.51 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 74 /xilinx/XIL_D16)) + (pad 28 thru_hole circle (at 8.89 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 92 /xilinx/XIL_D32)) + (pad 32 thru_hole circle (at 13.97 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 94 /xilinx/XIL_D34)) + (pad 34 thru_hole circle (at 16.51 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 95 /xilinx/XIL_D35)) + (pad 36 thru_hole circle (at 19.05 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 96 /xilinx/XIL_D36)) + (pad 38 thru_hole circle (at 21.59 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 57 /xilinx/+3,3V_OUT)) + (pad 35 thru_hole circle (at 19.05 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 75 /xilinx/XIL_D17)) + (pad 37 thru_hole circle (at 21.59 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 76 /xilinx/XIL_D18)) + (pad 3 thru_hole circle (at -21.59 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 67 /xilinx/XIL_D1)) + (pad 5 thru_hole circle (at -19.05 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 78 /xilinx/XIL_D2)) + (pad 7 thru_hole circle (at -16.51 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 89 /xilinx/XIL_D3)) + (pad 9 thru_hole circle (at -13.97 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 97 /xilinx/XIL_D4)) + (pad 39 thru_hole circle (at 24.13 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 77 /xilinx/XIL_D19)) + (pad 40 thru_hole circle (at 24.13 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 103 GND)) + (pad 30 thru_hole circle (at 11.43 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 93 /xilinx/XIL_D33)) + (model pin_array/pins_array_20x2.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) - (module JACK_ALIM (layer Composant) (tedit 4745DE9E) (tstamp 465307C6) - (at 100.965 60.833 270) - (descr "module 1 pin (ou trou mecanique de percage)") - (tags "CONN JACK") - (path /47D80202/465307C6) - (fp_text reference J1 (at 0.254 -5.588 270) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.254))) + (module pin_array:pin_array_4x2 (layer Composant) (tedit 3FAB90E6) (tstamp 53D8E080) + (at 161.417 119.253 180) + (descr "Double rangee de contacts 2 x 4 pins") + (tags CONN) + (path /47D80202/4652BF26) + (fp_text reference PULUPEN1 (at 0 -3.81 180) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value JACK_2P (at -5.08 5.588 270) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.254))) + (fp_text value CONN_4X2 (at 0 3.81 180) (layer F.SilkS) hide + (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start -7.112 -4.318) (end -7.874 -4.318) (layer F.SilkS) (width 0.381)) - (fp_line (start -7.874 -4.318) (end -7.874 4.318) (layer F.SilkS) (width 0.381)) - (fp_line (start -7.874 4.318) (end -7.112 4.318) (layer F.SilkS) (width 0.381)) - (fp_line (start -4.064 -4.318) (end -4.064 4.318) (layer F.SilkS) (width 0.381)) - (fp_line (start 5.588 -4.318) (end 5.588 4.318) (layer F.SilkS) (width 0.381)) - (fp_line (start -7.112 4.318) (end 5.588 4.318) (layer F.SilkS) (width 0.381)) - (fp_line (start -7.112 -4.318) (end 5.588 -4.318) (layer F.SilkS) (width 0.381)) - (pad 2 thru_hole circle (at 0 0 270) (size 4.8006 4.8006) (drill oval 1.016 2.54) (layers *.Cu *.Mask F.SilkS) - (net 133 GND)) - (pad 1 thru_hole rect (at 6.096 0 270) (size 4.8006 4.8006) (drill oval 1.016 2.54) (layers *.Cu *.Mask F.SilkS) - (net 133 GND)) - (pad 3 thru_hole circle (at 2.286 5.08 270) (size 4.8006 4.8006) (drill oval 2.54 1.016) (layers *.Cu *.Mask F.SilkS) - (net 171 "Net-(J1-Pad3)")) - (model connectors/POWER_21.wrl + (fp_line (start -5.08 -2.54) (end 5.08 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 -2.54) (end 5.08 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 2.54) (end -5.08 -2.54) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole rect (at -3.81 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 161 /inout_user/QSPI_SCLK)) + (pad 2 thru_hole circle (at -3.81 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 181 "Net-(PULUPEN1-Pad2)")) + (pad 3 thru_hole circle (at -1.27 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 162 /QSPI_CS0)) + (pad 4 thru_hole circle (at -1.27 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 182 "Net-(PULUPEN1-Pad4)")) + (pad 5 thru_hole circle (at 1.27 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 133 /inout_user/CANTX)) + (pad 6 thru_hole circle (at 1.27 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 183 "Net-(PULUPEN1-Pad6)")) + (pad 7 thru_hole circle (at 3.81 1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 32 /inout_user/CANRX)) + (pad 8 thru_hole circle (at 3.81 -1.27 180) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 184 "Net-(PULUPEN1-Pad8)")) + (model pin_array/pins_array_4x2.wrl (at (xyz 0 0 0)) - (scale (xyz 0.8 0.8 0.8)) + (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) - (module R4 (layer Composant) (tedit 200000) (tstamp 4791D59D) + (module lib_smd:SOT23EBC (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E08F) + (at 161.798 90.043 90) + (descr "Module CMS SOT23 Transistore EBC") + (tags "CMS SOT") + (path /46238519) + (attr smd) + (fp_text reference Q1 (at 0 -2.413 90) (layer F.SilkS) + (effects (font (size 0.762 0.762) (thickness 0.2032))) + ) + (fp_text value 3906 (at 0 0 90) (layer F.SilkS) hide + (effects (font (size 0.762 0.762) (thickness 0.2032))) + ) + (fp_line (start -1.524 -0.381) (end 1.524 -0.381) (layer F.SilkS) (width 0.127)) + (fp_line (start 1.524 -0.381) (end 1.524 0.381) (layer F.SilkS) (width 0.127)) + (fp_line (start 1.524 0.381) (end -1.524 0.381) (layer F.SilkS) (width 0.127)) + (fp_line (start -1.524 0.381) (end -1.524 -0.381) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -0.889 -1.016 90) (size 0.9144 0.9144) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.889 -1.016 90) (size 0.9144 0.9144) (layers Composant F.Paste F.Mask) + (net 185 "Net-(Q1-Pad2)")) + (pad 3 smd rect (at 0 1.016 90) (size 0.9144 0.9144) (layers Composant F.Paste F.Mask) + (net 186 "Net-(Q1-Pad3)")) + (model smd/cms_sot23.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1299999952316284 0.1500000059604645 0.1500000059604645)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E099) + (at 128.27 121.285 90) + (path /462389B6) + (attr smd) + (fp_text reference R1 (at 0 -0.3175 90) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 1M (at 0 0.381 90) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 58 /xilinx/GLCK2)) + (pad 2 smd rect (at 0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 8 /CLKIN/EXTAL)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E0A5) + (at 103.886 96.647) + (path /461BB661) + (attr smd) + (fp_text reference R2 (at 0 -0.3175) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 4,7K (at 0 0.381) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 10 /CLKMOD1)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E0B1) + (at 183.769 121.158 180) + (path /461BE039) + (attr smd) + (fp_text reference R4 (at 0 -0.3175 180) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 10K (at 0 0.381 180) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 151 /xilinx/IRQ-1)) + (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E0BD) + (at 183.769 123.444 180) + (path /461BE041) + (attr smd) + (fp_text reference R5 (at 0 -0.3175 180) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 10K (at 0 0.381 180) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 156 /xilinx/IRQ-2)) + (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E0C9) + (at 153.035 93.853) + (path /461BE046) + (attr smd) + (fp_text reference R6 (at 0 -0.3175) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 10K (at 0 0.381) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 165 /xilinx/IRQ-3)) + (pad 2 smd rect (at 0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E0D5) + (at 163.957 112.268 270) + (path /46237E28) + (attr smd) + (fp_text reference R7 (at 0 -0.3175 270) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 1K (at 0 0.381 270) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 104 "Net-(ABRT_SW1-Pad1)")) + (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 110 "Net-(C15-Pad1)")) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E0E1) + (at 169.672 117.094) + (path /461BE047) + (attr smd) + (fp_text reference R8 (at 0 -0.3175) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 10K (at 0 0.381) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 167 /IRQ-4)) + (pad 2 smd rect (at 0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E0ED) + (at 141.478 85.852 90) + (path /461BE230) + (attr smd) + (fp_text reference R9 (at 0 -0.3175 90) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 0 (at 0 0.381 90) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 187 "Net-(R9-Pad1)")) + (pad 2 smd rect (at 0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E0F9) + (at 173.863 117.094 180) + (path /461BE04B) + (attr smd) + (fp_text reference R10 (at 0 -0.3175 180) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 10K (at 0 0.381 180) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 21 /IRQ-5)) + (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E105) + (at 153.035 98.298) + (path /461BE051) + (attr smd) + (fp_text reference R11 (at 0 -0.3175) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 10K (at 0 0.381) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 22 /IRQ-6)) + (pad 2 smd rect (at 0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E111) + (at 160.401 114.046 180) + (path /46237E2F) + (attr smd) + (fp_text reference R12 (at 0 -0.3175 180) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 20K (at 0 0.381 180) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 110 "Net-(C15-Pad1)")) + (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E11D) + (at 153.035 96.012) + (path /461BE054) + (attr smd) + (fp_text reference R13 (at 0 -0.3175) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 10K (at 0 0.381) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 23 /IRQ-7)) + (pad 2 smd rect (at 0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E129) + (at 164.846 105.41 270) + (path /46237E3D) + (attr smd) + (fp_text reference R14 (at 0 -0.3175 270) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 270 (at 0 0.381 270) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 149 "Net-(LEDABRT1-Pad2)")) + (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 138 "Net-(D1-Pad2)")) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E135) + (at 158.623 94.869 90) + (path /4623847B) + (attr smd) + (fp_text reference R15 (at 0 -0.3175 90) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 4,7K (at 0 0.381 90) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 107 /inout_user/RSTI-)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E141) + (at 120.142 97.282 180) + (path /461BAF5C) + (attr smd) + (fp_text reference R16 (at 0 -0.3175 180) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 4,7K (at 0 0.381 180) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 24 /JTAG_EN)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E14D) + (at 83.312 104.267 180) + (path /461BB790) + (attr smd) + (fp_text reference R17 (at 0 -0.3175 180) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 4,7K (at 0 0.381 180) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 7 /BKPT-)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E159) + (at 83.312 106.553 180) + (path /461BB795) + (attr smd) + (fp_text reference R18 (at 0 -0.3175 180) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 4,7K (at 0 0.381 180) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 15 /DSCLK)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E165) + (at 83.312 119.126 180) + (path /461BB798) + (attr smd) + (fp_text reference R19 (at 0 -0.3175 180) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 4,7K (at 0 0.381 180) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 16 /DSI)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E171) + (at 83.312 121.412 180) + (path /461BB799) + (attr smd) + (fp_text reference R20 (at 0 -0.3175 180) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 4,7K (at 0 0.381 180) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 17 /DSO)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E17D) + (at 158.623 90.297 90) + (path /46238545) + (attr smd) + (fp_text reference R21 (at 0 -0.3175 90) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 4,7K (at 0 0.381 90) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 153 /inout_user/RTS0-)) + (pad 2 smd rect (at 0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 185 "Net-(Q1-Pad2)")) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E189) + (at 161.544 86.995) + (path /4623857F) + (attr smd) + (fp_text reference R22 (at 0 -0.3175) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 270 (at 0 0.381) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 186 "Net-(Q1-Pad3)")) + (pad 2 smd rect (at 0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 188 "Net-(R22-Pad2)")) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E195) + (at 127.889 84.455 180) + (path /47D80202/4652B5F4) + (attr smd) + (fp_text reference R23 (at 0 -0.3175 180) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 10K (at 0 0.381 180) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 189 "Net-(R23-Pad2)")) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E1A1) + (at 103.886 98.933) + (path /461BB65F) + (attr smd) + (fp_text reference R25 (at 0 -0.3175) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 4,7K (at 0 0.381) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 9 /CLKMOD0)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E1AD) + (at 84.836 113.792 270) + (path /461BB8C0) + (attr smd) + (fp_text reference R26 (at 0 -0.3175 270) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 10K (at 0 0.381 270) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 30 /TCLK)) + (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E1B9) + (at 93.218 117.094) + (path /47D80202/4652B061) + (attr smd) + (fp_text reference R28 (at 0 -0.3175) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 270 (at 0 0.381) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 144 "Net-(LED1-Pad1)")) + (pad 2 smd rect (at 0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 190 "Net-(R28-Pad2)")) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E1C5) + (at 192.532 82.296 90) + (path /47D80202/4652B9D5) + (attr smd) + (fp_text reference R30 (at 0 -0.3175 90) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 10K (at 0 0.381 90) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (pad 2 smd rect (at 0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 191 "Net-(R30-Pad2)")) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E1D1) + (at 93.218 121.158) + (path /47D80202/4652B067) + (attr smd) + (fp_text reference R31 (at 0 -0.3175) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 270 (at 0 0.381) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 145 "Net-(LED2-Pad1)")) + (pad 2 smd rect (at 0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 192 "Net-(R31-Pad2)")) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E1DD) + (at 93.218 125.349) + (path /47D80202/4652B069) + (attr smd) + (fp_text reference R32 (at 0 -0.3175) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 270 (at 0 0.381) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 146 "Net-(LED3-Pad1)")) + (pad 2 smd rect (at 0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 193 "Net-(R32-Pad2)")) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E1E9) + (at 93.218 129.413) + (path /47D80202/4652B06A) + (attr smd) + (fp_text reference R33 (at 0 -0.3175) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 270 (at 0 0.381) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 147 "Net-(LED4-Pad1)")) + (pad 2 smd rect (at 0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 194 "Net-(R33-Pad2)")) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E1F5) + (at 96.52 110.236 180) + (path /47D80202/4652B111) + (attr smd) + (fp_text reference R34 (at 0 -0.3175 180) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 10K (at 0 0.381 180) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 150 "Net-(LED_EN1-Pad2)")) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E201) + (at 164.592 82.296 90) + (path /47D80202/4652B9CC) + (attr smd) + (fp_text reference R35 (at 0 -0.3175 90) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 10K (at 0 0.381 90) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (pad 2 smd rect (at 0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 195 "Net-(R35-Pad2)")) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E20D) + (at 101.854 93.345) + (path /47D80202/46540063) + (attr smd) + (fp_text reference R36 (at 0 -0.3175) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 1K (at 0 0.381) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 196 "Net-(R36-Pad1)")) + (pad 2 smd rect (at 0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E219) + (at 99.695 85.471 180) + (path /47D80202/46540164) + (attr smd) + (fp_text reference R38 (at 0 -0.3175 180) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 62 (at 0 0.381 180) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 34 /inout_user/CAN_L)) + (pad 2 smd rect (at 0.9525 0 180) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 134 "Net-(CAN_TERM1-Pad2)")) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E225) + (at 100.584 101.473 90) + (path /461BE50C) + (attr smd) + (fp_text reference R45 (at 0 -0.3175 90) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 4,7K (at 0 0.381 90) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 178 /inout_user/RCON-)) + (pad 2 smd rect (at 0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E231) + (at 134.874 113.411 270) + (path /461BB742) + (attr smd) + (fp_text reference R46 (at 0 -0.3175 270) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 22 (at 0 0.381 270) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 197 "Net-(R46-Pad1)")) + (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 30 /TCLK)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E23D) + (at 157.734 125.476 90) + (path /47D80202/4652BF65) + (attr smd) + (fp_text reference R47 (at 0 -0.3175 90) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 4,7K (at 0 0.381 90) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 184 "Net-(PULUPEN1-Pad8)")) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E249) + (at 160.274 125.476 90) + (path /47D80202/4652BF62) + (attr smd) + (fp_text reference R48 (at 0 -0.3175 90) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 4,7K (at 0 0.381 90) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 183 "Net-(PULUPEN1-Pad6)")) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E255) + (at 162.814 125.476 90) + (path /47D80202/4652BF5C) + (attr smd) + (fp_text reference R49 (at 0 -0.3175 90) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 4,7K (at 0 0.381 90) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 182 "Net-(PULUPEN1-Pad4)")) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E261) + (at 165.354 125.476 90) + (path /47D80202/4652BF48) + (attr smd) + (fp_text reference R50 (at 0 -0.3175 90) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 4,7K (at 0 0.381 90) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.9525 0 90) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 181 "Net-(PULUPEN1-Pad2)")) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E26D) + (at 105.41 133.858) + (path /47D80202/46530638) + (attr smd) + (fp_text reference R53 (at 0 -0.3175) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 270 (at 0 0.381) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 148 "Net-(LED5-Pad1)")) + (pad 2 smd rect (at 0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E279) + (at 218.44 67.31 270) + (path /47D80204/46A76BCA) + (attr smd) + (fp_text reference R57 (at 0 -0.3175 270) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 4K7 (at 0 0.381 270) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.9525 0 270) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 62 /xilinx/TCK)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E285) + (at 206.375 76.835) + (path /47D80204/46A76BC3) + (attr smd) + (fp_text reference R62 (at 0 -0.3175) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 1K (at 0 0.381) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 59 /xilinx/LED_TEST1)) + (pad 2 smd rect (at 0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 139 "Net-(D8-Pad1)")) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E291) + (at 206.375 80.645) + (path /47D80204/46A76BA7) + (attr smd) + (fp_text reference R63 (at 0 -0.3175) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value 1K (at 0 0.381) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 60 /xilinx/LED_TEST2)) + (pad 2 smd rect (at 0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 140 "Net-(D9-Pad1)")) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:R4 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E29D) (at 212.09 134.62) (descr "Resitance 4 pas") (tags R) @@ -6112,17 +4492,196 @@ (fp_line (start -4.064 -0.508) (end -3.556 -1.016) (layer F.SilkS) (width 0.3048)) (fp_line (start 5.08 0) (end 4.064 0) (layer F.SilkS) (width 0.3048)) (pad 1 thru_hole circle (at -5.08 0) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) - (net 278 VDD)) + (net 105 VDD)) (pad 2 thru_hole circle (at 5.08 0) (size 1.524 1.524) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) - (net 83 /xilinx/+3,3V_OUT)) + (net 57 /xilinx/+3,3V_OUT)) (model discret/resistor.wrl (at (xyz 0 0 0)) - (scale (xyz 0.4 0.4 0.4)) + (scale (xyz 0.4000000059604645 0.4000000059604645 0.4000000059604645)) (rotate (xyz 0 0 0)) ) ) - (module SW_SPDT (layer Composant) (tedit 489B0992) (tstamp 46530763) + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E2AA) + (at 99.695 87.757) + (path /47D80202/4654018B) + (attr smd) + (fp_text reference RCAN1 (at 0 -0.3175) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value R (at 0 0.381) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 34 /inout_user/CAN_L)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM0805 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E2B6) + (at 99.695 90.043) + (path /47D80202/46540184) + (attr smd) + (fp_text reference RCAN2 (at 0 -0.3175) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_text value R (at 0 0.381) (layer F.SilkS) + (effects (font (size 0.50038 0.50038) (thickness 0.10922))) + ) + (fp_circle (center -1.651 0.762) (end -1.651 0.635) (layer F.SilkS) (width 0.09906)) + (fp_line (start -0.508 0.762) (end -1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 0.762) (end -1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start -1.524 -0.762) (end -0.508 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 0.508 -0.762) (end 1.524 -0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 -0.762) (end 1.524 0.762) (layer F.SilkS) (width 0.09906)) + (fp_line (start 1.524 0.762) (end 0.508 0.762) (layer F.SilkS) (width 0.09906)) + (pad 1 smd rect (at -0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (pad 2 smd rect (at 0.9525 0) (size 0.889 1.397) (layers Composant F.Paste F.Mask) + (net 33 /inout_user/CAN_H)) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1000000014901161 0.1000000014901161 0.1000000014901161)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SM1206POL (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E2C2) + (at 164.846 89.281 270) + (path /46238597) + (attr smd) + (fp_text reference RED1 (at 0 0 270) (layer F.SilkS) + (effects (font (size 0.762 0.762) (thickness 0.127))) + ) + (fp_text value LED_RESET1 (at 0 0 270) (layer F.SilkS) hide + (effects (font (size 0.762 0.762) (thickness 0.127))) + ) + (fp_line (start -2.54 -1.143) (end -2.794 -1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.794 -1.143) (end -2.794 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.794 1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.54 1.143) (end -0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 0.889 -1.143) (end 2.54 -1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 2.54 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 0.889 1.143) (layer F.SilkS) (width 0.127)) + (fp_line (start -0.889 -1.143) (end -2.54 -1.143) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 270) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 188 "Net-(R22-Pad2)")) + (pad 2 smd rect (at 1.651 0 270) (size 1.524 2.032) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (model smd/chip_cms_pol.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.1700000017881393 0.1599999964237213 0.1599999964237213)) + (rotate (xyz 0 0 0)) + ) + ) + + (module connect:PINTST (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E2D0) + (at 100.457 95.758 270) + (descr "module 1 pin (ou trou mecanique de percage)") + (tags DEV) + (path /47D80202/4654007F) + (fp_text reference RS1 (at 0 -1.26746 270) (layer F.SilkS) + (effects (font (size 0.508 0.508) (thickness 0.127))) + ) + (fp_text value CONN_1 (at 0 1.27 270) (layer F.SilkS) hide + (effects (font (size 0.508 0.508) (thickness 0.127))) + ) + (fp_circle (center 0 0) (end -0.254 -0.762) (layer F.SilkS) (width 0.127)) + (pad 1 thru_hole circle (at 0 0 270) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.Mask F.SilkS) + (net 196 "Net-(R36-Pad1)")) + (model Pin_Array/pin_array_1x1.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:SW_PUSH_SMALL (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E2D5) + (at 172.339 89.789 180) + (path /465451D4) + (fp_text reference RST_SW1 (at 0 -0.762 180) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_text value SW_PUSH (at 0 1.016 180) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_circle (center 0 0) (end 0 -2.54) (layer F.SilkS) (width 0.127)) + (fp_line (start -3.81 -3.81) (end 3.81 -3.81) (layer F.SilkS) (width 0.127)) + (fp_line (start 3.81 -3.81) (end 3.81 3.81) (layer F.SilkS) (width 0.127)) + (fp_line (start 3.81 3.81) (end -3.81 3.81) (layer F.SilkS) (width 0.127)) + (fp_line (start -3.81 -3.81) (end -3.81 3.81) (layer F.SilkS) (width 0.127)) + (pad 1 thru_hole circle (at 3.81 -2.54 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 109 "Net-(C3-Pad1)")) + (pad 2 thru_hole circle (at 3.81 2.54 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 103 GND)) + (pad 1 thru_hole circle (at -3.81 -2.54 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 109 "Net-(C3-Pad1)")) + (pad 2 thru_hole circle (at -3.81 2.54 180) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 103 GND)) + ) + + (module discret:SW_PUSH_SMALL (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E2E1) + (at 172.339 110.617) + (path /47D80202/4652DDDF) + (fp_text reference SW1 (at 0 -0.762) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_text value SW_PUSH (at 0 1.016) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_circle (center 0 0) (end 0 -2.54) (layer F.SilkS) (width 0.127)) + (fp_line (start -3.81 -3.81) (end 3.81 -3.81) (layer F.SilkS) (width 0.127)) + (fp_line (start 3.81 -3.81) (end 3.81 3.81) (layer F.SilkS) (width 0.127)) + (fp_line (start 3.81 3.81) (end -3.81 3.81) (layer F.SilkS) (width 0.127)) + (fp_line (start -3.81 -3.81) (end -3.81 3.81) (layer F.SilkS) (width 0.127)) + (pad 1 thru_hole circle (at 3.81 -2.54) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 167 /IRQ-4)) + (pad 2 thru_hole circle (at 3.81 2.54) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 103 GND)) + (pad 1 thru_hole circle (at -3.81 -2.54) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 167 /IRQ-4)) + (pad 2 thru_hole circle (at -3.81 2.54) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 103 GND)) + ) + + (module discret:SW_PUSH_SMALL (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E2ED) + (at 172.466 122.301) + (path /47D80202/4652DDE7) + (fp_text reference SW2 (at 0 -0.762) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_text value SW_PUSH (at 0 1.016) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_circle (center 0 0) (end 0 -2.54) (layer F.SilkS) (width 0.127)) + (fp_line (start -3.81 -3.81) (end 3.81 -3.81) (layer F.SilkS) (width 0.127)) + (fp_line (start 3.81 -3.81) (end 3.81 3.81) (layer F.SilkS) (width 0.127)) + (fp_line (start 3.81 3.81) (end -3.81 3.81) (layer F.SilkS) (width 0.127)) + (fp_line (start -3.81 -3.81) (end -3.81 3.81) (layer F.SilkS) (width 0.127)) + (pad 1 thru_hole circle (at 3.81 -2.54) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 21 /IRQ-5)) + (pad 2 thru_hole circle (at 3.81 2.54) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 103 GND)) + (pad 1 thru_hole circle (at -3.81 -2.54) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 21 /IRQ-5)) + (pad 2 thru_hole circle (at -3.81 2.54) (size 1.397 1.397) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 103 GND)) + ) + + (module discret:SW_SPDT (layer Composant) (tedit 53D8DE95) (tstamp 53D8E2F9) (at 86.614 71.374 90) (descr "Switch inverseur") (tags "SWITCH DEV") @@ -6158,18 +4717,1260 @@ (fp_line (start 34.29 -1.27) (end 33.655 -0.635) (layer F.SilkS) (width 0.3048)) (fp_line (start 33.655 -0.635) (end 22.86 1.27) (layer F.SilkS) (width 0.3048)) (pad 2 thru_hole rect (at 0 0 90) (size 3.81 2.54) (drill 1.27) (layers *.Cu *.Mask F.SilkS) - (net 170 "Net-(F1-Pad1)")) - (pad 1 thru_hole rect (at 0 -5.08 90) (size 3.81 2.54) (drill 1.27) (layers *.Cu *.Mask F.SilkS) - (net 199 "Net-(SW_ONOFF1-Pad1)")) + (net 141 "Net-(F1-Pad1)")) + (pad 1 thru_hole rect (at 0 -5.08 90) (size 3.81 2.54) (drill 1.27) (layers *.Cu *.Mask F.SilkS)) (pad 3 thru_hole rect (at 0 5.08 90) (size 3.81 2.54) (drill 1.27) (layers *.Cu *.Mask F.SilkS) - (net 171 "Net-(J1-Pad3)")) + (net 142 "Net-(J1-Pad3)")) (model device/switch_toggle_horizontal_right_angle_PC_terminal.wrl - (at (xyz 0.36 0 0)) - (scale (xyz 0.65 0.65 0.65)) + (at (xyz 0.009999999776482582 0 0)) + (scale (xyz 0.6000000238418579 0.6000000238418579 0.6000000238418579)) (rotate (xyz 0 0 180)) ) ) + (module connect:PINTST (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E319) + (at 83.439 138.557 270) + (descr "module 1 pin (ou trou mecanique de percage)") + (tags DEV) + (path /461BBA34) + (fp_text reference TA-1 (at 0 -1.26746 270) (layer F.SilkS) + (effects (font (size 0.508 0.508) (thickness 0.127))) + ) + (fp_text value CONN_1 (at 0 1.27 270) (layer F.SilkS) hide + (effects (font (size 0.508 0.508) (thickness 0.127))) + ) + (fp_circle (center 0 0) (end -0.254 -0.762) (layer F.SilkS) (width 0.127)) + (pad 1 thru_hole circle (at 0 0 270) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.Mask F.SilkS) + (net 108 "Net-(BDM_PORT1-Pad26)")) + (model Pin_Array/pin_array_1x1.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module connect:bornier2 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E31E) + (at 75.438 70.485 270) + (descr "Bornier d'alimentation 2 pins") + (tags DEV) + (path /47D80202/46530806) + (fp_text reference TB1 (at 0 -5.08 270) (layer F.SilkS) + (effects (font (thickness 0.3048))) + ) + (fp_text value CONN_2 (at 0 5.08 270) (layer F.SilkS) + (effects (font (thickness 0.3048))) + ) + (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 3.81) (end 5.08 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 -3.81) (end -5.08 -3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 -3.81) (end -5.08 3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 3.81) (end 5.08 3.81) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole rect (at -2.54 0 270) (size 2.54 2.54) (drill 1.524) (layers *.Cu *.Mask F.SilkS) + (net 142 "Net-(J1-Pad3)")) + (pad 2 thru_hole circle (at 2.54 0 270) (size 2.54 2.54) (drill 1.524) (layers *.Cu *.Mask F.SilkS) + (net 103 GND)) + (model Device/bornier_2.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:VQFP100 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E328) + (at 135.382 101.473) + (descr "Module CMS Vqfp 100 pins") + (tags "CMS VQFP") + (path /46161C39) + (attr smd) + (fp_text reference U1 (at 0 -1.905) (layer F.SilkS) + (effects (font (size 1.524 1.016) (thickness 0.3048))) + ) + (fp_text value MCF5213-LQFP100 (at 0 2.54) (layer F.SilkS) + (effects (font (size 1.524 1.016) (thickness 0.3048))) + ) + (fp_circle (center 6.096 -6.477) (end 6.096 -6.985) (layer F.SilkS) (width 0.2032)) + (fp_line (start 6.985 -6.35) (end 6.35 -6.985) (layer F.SilkS) (width 0.2032)) + (fp_line (start -6.985 -6.731) (end -6.731 -6.985) (layer F.SilkS) (width 0.2032)) + (fp_line (start -6.985 6.731) (end -6.731 6.985) (layer F.SilkS) (width 0.2032)) + (fp_line (start 6.731 6.985) (end 6.985 6.731) (layer F.SilkS) (width 0.2032)) + (fp_line (start 6.35 -6.985) (end -6.731 -6.985) (layer F.SilkS) (width 0.2032)) + (fp_line (start -6.985 -6.731) (end -6.985 6.731) (layer F.SilkS) (width 0.2032)) + (fp_line (start -6.731 6.985) (end 6.731 6.985) (layer F.SilkS) (width 0.2032)) + (fp_line (start 6.985 6.731) (end 6.985 -6.35) (layer F.SilkS) (width 0.2032)) + (pad 100 smd rect (at 7.747 -5.9944) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 54 /inout_user/URXD1)) + (pad 76 smd rect (at 7.747 5.9944) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 7 /BKPT-)) + (pad 77 smd rect (at 7.747 5.4864) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 11 /DDAT0)) + (pad 78 smd rect (at 7.747 5.0038) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 12 /DDAT1)) + (pad 79 smd rect (at 7.747 4.4958) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 16 /DSI)) + (pad 80 smd rect (at 7.747 3.9878) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 17 /DSO)) + (pad 81 smd rect (at 7.747 3.5052) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 82 smd rect (at 7.747 2.9972) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (pad 83 smd rect (at 7.747 2.4892) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 13 /DDAT2)) + (pad 84 smd rect (at 7.747 2.0066) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 14 /DDAT3)) + (pad 85 smd rect (at 7.747 1.4986) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 15 /DSCLK)) + (pad 86 smd rect (at 7.747 0.9906) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 2 /ALLPST)) + (pad 87 smd rect (at 7.747 0.4826) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 151 /xilinx/IRQ-1)) + (pad 88 smd rect (at 7.747 0) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 156 /xilinx/IRQ-2)) + (pad 89 smd rect (at 7.747 -0.508) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 165 /xilinx/IRQ-3)) + (pad 90 smd rect (at 7.747 -1.016) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 167 /IRQ-4)) + (pad 91 smd rect (at 7.747 -1.4986) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 21 /IRQ-5)) + (pad 92 smd rect (at 7.747 -2.0066) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (pad 93 smd rect (at 7.747 -2.5146) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 94 smd rect (at 7.747 -2.9972) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 22 /IRQ-6)) + (pad 95 smd rect (at 7.747 -3.5052) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 23 /IRQ-7)) + (pad 96 smd rect (at 7.747 -4.0132) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 107 /inout_user/RSTI-)) + (pad 97 smd rect (at 7.747 -4.4958) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 153 /inout_user/RTS0-)) + (pad 98 smd rect (at 7.747 -5.0038) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 152 /inout_user/UCTS1)) + (pad 99 smd rect (at 7.747 -5.5118) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 170 /inout_user/UTXD1)) + (pad 75 smd rect (at 5.9944 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (pad 51 smd rect (at -5.9944 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 166 /AN7)) + (pad 52 smd rect (at -5.4864 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 6 /AN6)) + (pad 53 smd rect (at -5.0038 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 164 /AN5)) + (pad 54 smd rect (at -4.4958 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 5 /AN4)) + (pad 55 smd rect (at -3.9878 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 56 smd rect (at -3.5052 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (pad 57 smd rect (at -2.9972 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 58 smd rect (at -2.4892 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 176 /GPT0)) + (pad 59 smd rect (at -2.0066 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 19 /GPT1)) + (pad 60 smd rect (at -1.4986 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 38 /inout_user/PWM5)) + (pad 61 smd rect (at -0.9906 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 177 /GPT2)) + (pad 62 smd rect (at -0.4826 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 20 /GPT3)) + (pad 63 smd rect (at 0 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 39 /inout_user/PWM7)) + (pad 64 smd rect (at 0.508 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 197 "Net-(R46-Pad1)")) + (pad 65 smd rect (at 1.016 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 25 /PST0)) + (pad 66 smd rect (at 1.4986 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 26 /PST1)) + (pad 67 smd rect (at 2.0066 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (pad 68 smd rect (at 2.5146 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 69 smd rect (at 2.9972 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 27 /PST2)) + (pad 70 smd rect (at 3.5052 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 28 /PST3)) + (pad 71 smd rect (at 4.0132 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (pad 72 smd rect (at 4.4958 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 58 /xilinx/GLCK2)) + (pad 73 smd rect (at 5.0038 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 8 /CLKIN/EXTAL)) + (pad 74 smd rect (at 5.5118 7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 31 /VDDPLL)) + (pad 1 smd rect (at 5.9944 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 2 smd rect (at 5.4864 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 3 smd rect (at 5.0038 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (pad 4 smd rect (at 4.4958 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 171 /inout_user/URTS1)) + (pad 5 smd rect (at 3.9878 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 187 "Net-(R9-Pad1)")) + (pad 6 smd rect (at 3.5052 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 174 /inout_user/UCTS0)) + (pad 7 smd rect (at 2.9972 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 173 /inout_user/URXD0)) + (pad 8 smd rect (at 2.4892 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 56 /inout_user/UTXD0)) + (pad 9 smd rect (at 2.0066 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 52 /inout_user/URTS0)) + (pad 10 smd rect (at 1.4986 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 133 /inout_user/CANTX)) + (pad 11 smd rect (at 0.9906 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 32 /inout_user/CANRX)) + (pad 12 smd rect (at 0.4826 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 29 /QSPI_CS3)) + (pad 13 smd rect (at 0 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 61 /xilinx/QSPI_CS2)) + (pad 14 smd rect (at -0.508 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 15 smd rect (at -1.016 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (pad 16 smd rect (at -1.4986 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 159 /inout_user/QSPI_DIN)) + (pad 17 smd rect (at -2.0066 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 157 /inout_user/QSPI_DOUT)) + (pad 18 smd rect (at -2.5146 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 161 /inout_user/QSPI_SCLK)) + (pad 19 smd rect (at -2.9972 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 163 /xilinx/QSPI_CS1)) + (pad 20 smd rect (at -3.5052 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 162 /QSPI_CS0)) + (pad 21 smd rect (at -4.0132 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 178 /inout_user/RCON-)) + (pad 22 smd rect (at -4.4958 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 23 smd rect (at -5.0038 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 24 smd rect (at -5.5118 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (pad 25 smd rect (at -5.9944 -7.747) (size 0.254 1.016) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (pad 26 smd rect (at -7.747 -5.9944) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 24 /JTAG_EN)) + (pad 27 smd rect (at -7.747 -5.4864) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 51 /inout_user/UCTS2)) + (pad 28 smd rect (at -7.747 -5.0038) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 55 /inout_user/URXD2)) + (pad 29 smd rect (at -7.747 -4.4958) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 175 /inout_user/UTXD2)) + (pad 30 smd rect (at -7.747 -3.9878) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 53 /inout_user/URTS2)) + (pad 31 smd rect (at -7.747 -3.5052) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 169 /DTIN2)) + (pad 32 smd rect (at -7.747 -2.9972) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 172 /DTIN3)) + (pad 33 smd rect (at -7.747 -2.4892) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 155 /inout_user/PWM3)) + (pad 34 smd rect (at -7.747 -2.0066) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 35 smd rect (at -7.747 -1.4986) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (pad 36 smd rect (at -7.747 -0.9906) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 168 /DTIN0)) + (pad 37 smd rect (at -7.747 -0.4826) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 18 /DTIN1)) + (pad 38 smd rect (at -7.747 0) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 154 /inout_user/PWM1)) + (pad 39 smd rect (at -7.747 0.508) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 10 /CLKMOD1)) + (pad 40 smd rect (at -7.747 1.016) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 9 /CLKMOD0)) + (pad 41 smd rect (at -7.747 1.4986) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 42 smd rect (at -7.747 2.0066) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (pad 43 smd rect (at -7.747 2.5146) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 158 /AN0)) + (pad 44 smd rect (at -7.747 2.9972) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 160 /AN1)) + (pad 45 smd rect (at -7.747 3.5052) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 3 /AN2)) + (pad 46 smd rect (at -7.747 4.0132) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 4 /AN3)) + (pad 47 smd rect (at -7.747 4.4958) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 112 GNDA)) + (pad 48 smd rect (at -7.747 5.0038) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 112 GNDA)) + (pad 49 smd rect (at -7.747 5.5118) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 111 /inout_user/VCCA)) + (pad 50 smd rect (at -7.747 5.9944) (size 1.016 0.254) (layers Composant F.Paste F.Mask) + (net 111 /inout_user/VCCA)) + (model smd/vqfp100.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.3939999938011169 0.3939999938011169 0.4000000059604645)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SOT353 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E398) + (at 160.528 108.331) + (descr SOT353) + (path /46554FB5) + (attr smd) + (fp_text reference U2 (at 0.09906 0 90) (layer F.SilkS) + (effects (font (size 0.762 0.635) (thickness 0.127))) + ) + (fp_text value 74AHC1G14 (at 0.09906 0 90) (layer F.SilkS) hide + (effects (font (size 0.762 0.635) (thickness 0.127))) + ) + (fp_line (start 0.635 1.016) (end 0.635 -1.016) (layer F.SilkS) (width 0.1524)) + (fp_line (start 0.635 -1.016) (end -0.635 -1.016) (layer F.SilkS) (width 0.1524)) + (fp_line (start -0.635 -1.016) (end -0.635 1.016) (layer F.SilkS) (width 0.1524)) + (fp_line (start -0.635 1.016) (end 0.635 1.016) (layer F.SilkS) (width 0.1524)) + (pad 1 smd rect (at -1.016 -0.635) (size 0.508 0.3048) (layers Composant F.Paste F.Mask)) + (pad 3 smd rect (at -1.016 0.635) (size 0.508 0.3048) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (pad 5 smd rect (at 1.016 -0.635) (size 0.508 0.3048) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 2 smd rect (at -1.016 0) (size 0.508 0.3048) (layers Composant F.Paste F.Mask) + (net 110 "Net-(C15-Pad1)")) + (pad 4 smd rect (at 1.016 0.635) (size 0.508 0.3048) (layers Composant F.Paste F.Mask) + (net 138 "Net-(D1-Pad2)")) + (model smd/SOT23_5.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.07000000029802322 0.09000000357627869 0.07999999821186066)) + (rotate (xyz 0 0 90)) + ) + ) + + (module lib_smd:SO16E (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E3A4) + (at 186.69 77.851 270) + (descr "Module CMS SOJ 16 pins etroit") + (tags "CMS SOJ") + (path /47D80202/4652B22B) + (attr smd) + (fp_text reference U3 (at 0 -0.762 270) (layer F.SilkS) + (effects (font (size 1.016 1.143) (thickness 0.127))) + ) + (fp_text value MAX202 (at 0 0.762 270) (layer F.SilkS) + (effects (font (size 1.016 1.143) (thickness 0.127))) + ) + (fp_line (start -5.461 -1.778) (end 5.461 -1.778) (layer F.SilkS) (width 0.2032)) + (fp_line (start 5.461 -1.778) (end 5.461 1.778) (layer F.SilkS) (width 0.2032)) + (fp_line (start 5.461 1.778) (end -5.461 1.778) (layer F.SilkS) (width 0.2032)) + (fp_line (start -5.461 1.778) (end -5.461 -1.778) (layer F.SilkS) (width 0.2032)) + (fp_line (start -5.461 -0.508) (end -4.699 -0.508) (layer F.SilkS) (width 0.2032)) + (fp_line (start -4.699 -0.508) (end -4.699 0.508) (layer F.SilkS) (width 0.2032)) + (fp_line (start -4.699 0.508) (end -5.461 0.508) (layer F.SilkS) (width 0.2032)) + (pad 1 smd rect (at -4.445 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 114 "Net-(C24-Pad1)")) + (pad 2 smd rect (at -3.175 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 113 "Net-(C23-Pad2)")) + (pad 3 smd rect (at -1.905 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 115 "Net-(C24-Pad2)")) + (pad 4 smd rect (at -0.635 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 116 "Net-(C25-Pad1)")) + (pad 5 smd rect (at 0.635 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 117 "Net-(C25-Pad2)")) + (pad 6 smd rect (at 1.905 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 118 "Net-(C27-Pad1)")) + (pad 7 smd rect (at 3.175 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 40 /inout_user/RTS0)) + (pad 8 smd rect (at 4.445 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 35 /inout_user/CTS0)) + (pad 9 smd rect (at 4.445 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 198 "Net-(U3-Pad9)")) + (pad 10 smd rect (at 3.175 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 191 "Net-(R30-Pad2)")) + (pad 11 smd rect (at 1.905 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 199 "Net-(U3-Pad11)")) + (pad 12 smd rect (at 0.635 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 200 "Net-(U3-Pad12)")) + (pad 13 smd rect (at -0.635 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 43 /inout_user/RXD0)) + (pad 14 smd rect (at -1.905 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 47 /inout_user/TXD0)) + (pad 15 smd rect (at -3.175 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (pad 16 smd rect (at -4.445 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (model smd/cms_so16.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.5 0.300000011920929 0.5)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SO14E (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E3BE) + (at 100.203 117.602 270) + (descr "module CMS SOJ 14 pins etroit") + (tags "CMS SOJ") + (path /47D80202/4652B03E) + (attr smd) + (fp_text reference U4 (at 0 -0.762 270) (layer F.SilkS) + (effects (font (size 1.016 1.143) (thickness 0.127))) + ) + (fp_text value 74HC125 (at 0 1.016 270) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.127))) + ) + (fp_line (start -4.826 -1.778) (end 4.826 -1.778) (layer F.SilkS) (width 0.2032)) + (fp_line (start 4.826 -1.778) (end 4.826 2.032) (layer F.SilkS) (width 0.2032)) + (fp_line (start 4.826 2.032) (end -4.826 2.032) (layer F.SilkS) (width 0.2032)) + (fp_line (start -4.826 2.032) (end -4.826 -1.778) (layer F.SilkS) (width 0.2032)) + (fp_line (start -4.826 -0.508) (end -4.064 -0.508) (layer F.SilkS) (width 0.2032)) + (fp_line (start -4.064 -0.508) (end -4.064 0.508) (layer F.SilkS) (width 0.2032)) + (fp_line (start -4.064 0.508) (end -4.826 0.508) (layer F.SilkS) (width 0.2032)) + (pad 1 smd rect (at -3.81 2.794 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 150 "Net-(LED_EN1-Pad2)")) + (pad 2 smd rect (at -2.54 2.794 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 168 /DTIN0)) + (pad 3 smd rect (at -1.27 2.794 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 190 "Net-(R28-Pad2)")) + (pad 4 smd rect (at 0 2.794 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 150 "Net-(LED_EN1-Pad2)")) + (pad 5 smd rect (at 1.27 2.794 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 18 /DTIN1)) + (pad 6 smd rect (at 2.54 2.794 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 192 "Net-(R31-Pad2)")) + (pad 7 smd rect (at 3.81 2.794 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (pad 8 smd rect (at 3.81 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 194 "Net-(R33-Pad2)")) + (pad 9 smd rect (at 2.54 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 172 /DTIN3)) + (pad 10 smd rect (at 1.27 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 150 "Net-(LED_EN1-Pad2)")) + (pad 11 smd rect (at 0 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 193 "Net-(R32-Pad2)")) + (pad 12 smd rect (at -1.27 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 169 /DTIN2)) + (pad 13 smd rect (at -2.54 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 150 "Net-(LED_EN1-Pad2)")) + (pad 14 smd rect (at -3.81 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (model smd/cms_so14.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.5 0.300000011920929 0.5)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SO16E (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E3D6) + (at 158.75 77.851 270) + (descr "Module CMS SOJ 16 pins etroit") + (tags "CMS SOJ") + (path /47D80202/4652B4C1) + (attr smd) + (fp_text reference U5 (at 0 -0.762 270) (layer F.SilkS) + (effects (font (size 1.016 1.143) (thickness 0.127))) + ) + (fp_text value MAX202 (at 0 0.762 270) (layer F.SilkS) + (effects (font (size 1.016 1.143) (thickness 0.127))) + ) + (fp_line (start -5.461 -1.778) (end 5.461 -1.778) (layer F.SilkS) (width 0.2032)) + (fp_line (start 5.461 -1.778) (end 5.461 1.778) (layer F.SilkS) (width 0.2032)) + (fp_line (start 5.461 1.778) (end -5.461 1.778) (layer F.SilkS) (width 0.2032)) + (fp_line (start -5.461 1.778) (end -5.461 -1.778) (layer F.SilkS) (width 0.2032)) + (fp_line (start -5.461 -0.508) (end -4.699 -0.508) (layer F.SilkS) (width 0.2032)) + (fp_line (start -4.699 -0.508) (end -4.699 0.508) (layer F.SilkS) (width 0.2032)) + (fp_line (start -4.699 0.508) (end -5.461 0.508) (layer F.SilkS) (width 0.2032)) + (pad 1 smd rect (at -4.445 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 120 "Net-(C31-Pad1)")) + (pad 2 smd rect (at -3.175 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 119 "Net-(C30-Pad2)")) + (pad 3 smd rect (at -1.905 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 121 "Net-(C31-Pad2)")) + (pad 4 smd rect (at -0.635 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 122 "Net-(C32-Pad1)")) + (pad 5 smd rect (at 0.635 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 123 "Net-(C32-Pad2)")) + (pad 6 smd rect (at 1.905 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 124 "Net-(C33-Pad1)")) + (pad 7 smd rect (at 3.175 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 41 /inout_user/RTS1)) + (pad 8 smd rect (at 4.445 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 36 /inout_user/CTS1)) + (pad 9 smd rect (at 4.445 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 201 "Net-(U5-Pad9)")) + (pad 10 smd rect (at 3.175 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 195 "Net-(R35-Pad2)")) + (pad 11 smd rect (at 1.905 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 202 "Net-(U5-Pad11)")) + (pad 12 smd rect (at 0.635 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 203 "Net-(U5-Pad12)")) + (pad 13 smd rect (at -0.635 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 44 /inout_user/RXD1)) + (pad 14 smd rect (at -1.905 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 48 /inout_user/TXD1)) + (pad 15 smd rect (at -3.175 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (pad 16 smd rect (at -4.445 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (model smd/cms_so16.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.5 0.300000011920929 0.5)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SO8E (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E3F0) + (at 105.918 88.392 90) + (descr "module CMS SOJ 8 pins etroit") + (tags "CMS SOJ") + (path /47D80202/4653FF97) + (attr smd) + (fp_text reference U7 (at 0 -0.889 90) (layer F.SilkS) + (effects (font (size 1.143 1.143) (thickness 0.1524))) + ) + (fp_text value PCA82C251 (at 0 1.016 90) (layer F.SilkS) + (effects (font (size 0.889 0.889) (thickness 0.1524))) + ) + (fp_line (start -2.667 1.778) (end -2.667 1.905) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.667 1.905) (end 2.667 1.905) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.667 -1.905) (end -2.667 -1.905) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.667 -1.905) (end -2.667 1.778) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.667 -0.508) (end -2.159 -0.508) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.159 -0.508) (end -2.159 0.508) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.159 0.508) (end -2.667 0.508) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.667 -1.905) (end 2.667 1.905) (layer F.SilkS) (width 0.127)) + (pad 8 smd rect (at -1.905 -2.667 90) (size 0.59944 1.39954) (layers Composant F.Paste F.Mask) + (net 196 "Net-(R36-Pad1)")) + (pad 1 smd rect (at -1.905 2.667 90) (size 0.59944 1.39954) (layers Composant F.Paste F.Mask) + (net 50 /inout_user/TxD_CAN)) + (pad 7 smd rect (at -0.635 -2.667 90) (size 0.59944 1.39954) (layers Composant F.Paste F.Mask) + (net 33 /inout_user/CAN_H)) + (pad 6 smd rect (at 0.635 -2.667 90) (size 0.59944 1.39954) (layers Composant F.Paste F.Mask) + (net 34 /inout_user/CAN_L)) + (pad 5 smd rect (at 1.905 -2.667 90) (size 0.59944 1.39954) (layers Composant F.Paste F.Mask) + (net 204 "Net-(U7-Pad5)")) + (pad 2 smd rect (at -0.635 2.667 90) (size 0.59944 1.39954) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (pad 3 smd rect (at 0.635 2.667 90) (size 0.59944 1.39954) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 4 smd rect (at 1.905 2.667 90) (size 0.59944 1.39954) (layers Composant F.Paste F.Mask) + (net 46 /inout_user/RxD_CAN)) + (model smd/cms_so8.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.5 0.3199999928474426 0.5)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:SO16E (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E403) + (at 125.73 77.851 270) + (descr "Module CMS SOJ 16 pins etroit") + (tags "CMS SOJ") + (path /47D80202/4652B4D3) + (attr smd) + (fp_text reference U8 (at 0 -0.762 270) (layer F.SilkS) + (effects (font (size 1.016 1.143) (thickness 0.127))) + ) + (fp_text value MAX202 (at 0 0.762 270) (layer F.SilkS) + (effects (font (size 1.016 1.143) (thickness 0.127))) + ) + (fp_line (start -5.461 -1.778) (end 5.461 -1.778) (layer F.SilkS) (width 0.2032)) + (fp_line (start 5.461 -1.778) (end 5.461 1.778) (layer F.SilkS) (width 0.2032)) + (fp_line (start 5.461 1.778) (end -5.461 1.778) (layer F.SilkS) (width 0.2032)) + (fp_line (start -5.461 1.778) (end -5.461 -1.778) (layer F.SilkS) (width 0.2032)) + (fp_line (start -5.461 -0.508) (end -4.699 -0.508) (layer F.SilkS) (width 0.2032)) + (fp_line (start -4.699 -0.508) (end -4.699 0.508) (layer F.SilkS) (width 0.2032)) + (fp_line (start -4.699 0.508) (end -5.461 0.508) (layer F.SilkS) (width 0.2032)) + (pad 1 smd rect (at -4.445 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 130 "Net-(C44-Pad1)")) + (pad 2 smd rect (at -3.175 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 125 "Net-(C35-Pad2)")) + (pad 3 smd rect (at -1.905 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 131 "Net-(C44-Pad2)")) + (pad 4 smd rect (at -0.635 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 126 "Net-(C36-Pad1)")) + (pad 5 smd rect (at 0.635 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 127 "Net-(C36-Pad2)")) + (pad 6 smd rect (at 1.905 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 132 "Net-(C45-Pad1)")) + (pad 7 smd rect (at 3.175 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 137 "Net-(COM_SEL3-Pad3)")) + (pad 8 smd rect (at 4.445 2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 136 "Net-(COM_SEL2-Pad3)")) + (pad 9 smd rect (at 4.445 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 205 "Net-(U8-Pad9)")) + (pad 10 smd rect (at 3.175 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 206 "Net-(U8-Pad10)")) + (pad 11 smd rect (at 1.905 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 189 "Net-(R23-Pad2)")) + (pad 12 smd rect (at 0.635 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 207 "Net-(U8-Pad12)")) + (pad 13 smd rect (at -0.635 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 135 "Net-(COM_SEL1-Pad3)")) + (pad 14 smd rect (at -1.905 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 42 /inout_user/RTS2)) + (pad 15 smd rect (at -3.175 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (pad 16 smd rect (at -4.445 -2.54 270) (size 0.508 1.143) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (model smd/cms_so16.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.5 0.300000011920929 0.5)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:TQFP144 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E41D) + (at 201.93 111.76) + (path /47D80204/470F38BE) + (attr smd) + (fp_text reference U9 (at 0 -1.905) (layer F.SilkS) + (effects (font (size 1.524 1.016) (thickness 0.3048))) + ) + (fp_text value XCR3256-TQ144 (at 0 1.905) (layer F.SilkS) + (effects (font (size 1.524 1.016) (thickness 0.3048))) + ) + (fp_circle (center 8.255 -8.255) (end 8.255 -8.89) (layer F.SilkS) (width 0.3048)) + (fp_line (start 8.636 -9.398) (end 8.8646 -9.398) (layer F.SilkS) (width 0.3048)) + (fp_line (start 8.8646 -9.398) (end 8.8646 -10.16) (layer F.SilkS) (width 0.3048)) + (fp_line (start 8.636 -10.16) (end 8.636 -9.398) (layer F.SilkS) (width 0.3048)) + (fp_line (start -9.525 -10.16) (end -10.16 -9.525) (layer F.SilkS) (width 0.3048)) + (fp_line (start -10.16 -9.525) (end -10.16 9.525) (layer F.SilkS) (width 0.3048)) + (fp_line (start -10.16 9.525) (end -9.525 10.16) (layer F.SilkS) (width 0.3048)) + (fp_line (start -9.525 10.16) (end 9.525 10.16) (layer F.SilkS) (width 0.3048)) + (fp_line (start 9.525 10.16) (end 10.16 9.525) (layer F.SilkS) (width 0.3048)) + (fp_line (start 10.16 9.525) (end 10.16 -9.525) (layer F.SilkS) (width 0.3048)) + (fp_line (start 10.16 -9.525) (end 9.525 -10.16) (layer F.SilkS) (width 0.3048)) + (fp_line (start 9.525 -10.16) (end -9.525 -10.16) (layer F.SilkS) (width 0.3048)) + (pad 1 smd rect (at 8.7503 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) + (net 82 /xilinx/XIL_D23)) + (pad 2 smd rect (at 8.2423 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) + (net 97 /xilinx/XIL_D4)) + (pad 3 smd rect (at 7.747 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (pad 4 smd rect (at 7.2517 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) + (net 63 /xilinx/TDI)) + (pad 5 smd rect (at 6.7437 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) + (net 81 /xilinx/XIL_D22)) + (pad 6 smd rect (at 6.2484 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) + (net 79 /xilinx/XIL_D20)) + (pad 7 smd rect (at 5.7531 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) + (net 78 /xilinx/XIL_D2)) + (pad 8 smd rect (at 5.2451 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) + (net 89 /xilinx/XIL_D3)) + (pad 9 smd rect (at 4.7498 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask)) + (pad 10 smd rect (at 4.2545 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) + (net 80 /xilinx/XIL_D21)) + (pad 11 smd rect (at 3.7465 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) + (net 67 /xilinx/XIL_D1)) + (pad 12 smd rect (at 3.2512 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) + (net 66 /xilinx/XIL_D0)) + (pad 13 smd rect (at 2.7559 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (pad 14 smd rect (at 2.2479 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask)) + (pad 15 smd rect (at 1.7526 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask)) + (pad 16 smd rect (at 1.2573 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask)) + (pad 17 smd rect (at 0.7493 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (pad 18 smd rect (at 0.254 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask)) + (pad 19 smd rect (at -0.254 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask)) + (pad 20 smd rect (at -0.7493 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) + (net 65 /xilinx/TMS)) + (pad 21 smd rect (at -1.2573 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask)) + (pad 22 smd rect (at -1.7526 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask)) + (pad 23 smd rect (at -2.2479 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask)) + (pad 24 smd rect (at -2.7559 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 25 smd rect (at -3.2512 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask)) + (pad 26 smd rect (at -3.7465 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask)) + (pad 27 smd rect (at -4.2545 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) + (net 60 /xilinx/LED_TEST2)) + (pad 28 smd rect (at -4.7498 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) + (net 59 /xilinx/LED_TEST1)) + (pad 29 smd rect (at -5.2451 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask)) + (pad 30 smd rect (at -5.7531 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask)) + (pad 31 smd rect (at -6.2484 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) + (net 180 "Net-(P3-Pad4)")) + (pad 32 smd rect (at -6.7437 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) + (net 179 "Net-(P3-Pad2)")) + (pad 33 smd rect (at -7.2517 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (pad 34 smd rect (at -7.747 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask)) + (pad 35 smd rect (at -8.2423 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask)) + (pad 36 smd rect (at -8.7503 -10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask)) + (pad 66 smd rect (at -10.9855 5.7531) (size 1.524 0.254) (layers Composant F.Paste F.Mask)) + (pad 67 smd rect (at -10.9855 6.2484) (size 1.524 0.254) (layers Composant F.Paste F.Mask)) + (pad 68 smd rect (at -10.9855 6.7437) (size 1.524 0.254) (layers Composant F.Paste F.Mask)) + (pad 69 smd rect (at -10.9855 7.2517) (size 1.524 0.254) (layers Composant F.Paste F.Mask)) + (pad 70 smd rect (at -10.9855 7.747) (size 1.524 0.254) (layers Composant F.Paste F.Mask)) + (pad 71 smd rect (at -10.9855 8.2423) (size 1.524 0.254) (layers Composant F.Paste F.Mask)) + (pad 72 smd rect (at -10.9855 8.7503) (size 1.524 0.254) (layers Composant F.Paste F.Mask)) + (pad 114 smd rect (at 10.9855 6.2484) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 70 /xilinx/XIL_D12)) + (pad 115 smd rect (at 10.9855 5.7531) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 116 smd rect (at 10.9855 5.2451) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 91 /xilinx/XIL_D31)) + (pad 117 smd rect (at 10.9855 4.7498) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 88 /xilinx/XIL_D29)) + (pad 118 smd rect (at 10.9855 4.2545) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 90 /xilinx/XIL_D30)) + (pad 119 smd rect (at 10.9855 3.7465) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 69 /xilinx/XIL_D11)) + (pad 120 smd rect (at 10.9855 3.2512) (size 1.524 0.254) (layers Composant F.Paste F.Mask)) + (pad 121 smd rect (at 10.9855 2.7559) (size 1.524 0.254) (layers Composant F.Paste F.Mask)) + (pad 122 smd rect (at 10.9855 2.2479) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 68 /xilinx/XIL_D10)) + (pad 123 smd rect (at 10.9855 1.7526) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 124 smd rect (at 10.9855 1.2573) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (pad 125 smd rect (at 10.9855 0.7493) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (pad 126 smd rect (at 10.9855 0.254) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (pad 127 smd rect (at 10.9855 -0.254) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (pad 128 smd rect (at 10.9855 -0.7493) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 58 /xilinx/GLCK2)) + (pad 129 smd rect (at 10.9855 -1.2573) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (pad 130 smd rect (at 10.9855 -1.7526) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 131 smd rect (at 10.9855 -2.2479) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 102 /xilinx/XIL_D9)) + (pad 132 smd rect (at 10.9855 -2.7559) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 87 /xilinx/XIL_D28)) + (pad 133 smd rect (at 10.9855 -3.2512) (size 1.524 0.254) (layers Composant F.Paste F.Mask)) + (pad 134 smd rect (at 10.9855 -3.7465) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 86 /xilinx/XIL_D27)) + (pad 135 smd rect (at 10.9855 -4.2545) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (pad 136 smd rect (at 10.9855 -4.7498) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 101 /xilinx/XIL_D8)) + (pad 137 smd rect (at 10.9855 -5.2451) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 85 /xilinx/XIL_D26)) + (pad 138 smd rect (at 10.9855 -5.7531) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 100 /xilinx/XIL_D7)) + (pad 139 smd rect (at 10.9855 -6.2484) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 84 /xilinx/XIL_D25)) + (pad 140 smd rect (at 10.9855 -6.7437) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 99 /xilinx/XIL_D6)) + (pad 141 smd rect (at 10.9855 -7.2517) (size 1.524 0.254) (layers Composant F.Paste F.Mask)) + (pad 142 smd rect (at 10.9855 -7.747) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 83 /xilinx/XIL_D24)) + (pad 143 smd rect (at 10.9855 -8.2423) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 98 /xilinx/XIL_D5)) + (pad 144 smd rect (at 10.9855 -8.7503) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 37 smd rect (at -10.9855 -8.7503) (size 1.524 0.254) (layers Composant F.Paste F.Mask)) + (pad 38 smd rect (at -10.9855 -8.2423) (size 1.524 0.254) (layers Composant F.Paste F.Mask)) + (pad 39 smd rect (at -10.9855 -7.747) (size 1.524 0.254) (layers Composant F.Paste F.Mask)) + (pad 40 smd rect (at -10.9855 -7.2517) (size 1.524 0.254) (layers Composant F.Paste F.Mask)) + (pad 41 smd rect (at -10.9855 -6.7437) (size 1.524 0.254) (layers Composant F.Paste F.Mask)) + (pad 42 smd rect (at -10.9855 -6.2484) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 151 /xilinx/IRQ-1)) + (pad 43 smd rect (at -10.9855 -5.7531) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 156 /xilinx/IRQ-2)) + (pad 44 smd rect (at -10.9855 -5.2451) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 165 /xilinx/IRQ-3)) + (pad 45 smd rect (at -10.9855 -4.7498) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 61 /xilinx/QSPI_CS2)) + (pad 46 smd rect (at -10.9855 -4.2545) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 159 /inout_user/QSPI_DIN)) + (pad 47 smd rect (at -10.9855 -3.7465) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 157 /inout_user/QSPI_DOUT)) + (pad 48 smd rect (at -10.9855 -3.2512) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 161 /inout_user/QSPI_SCLK)) + (pad 49 smd rect (at -10.9855 -2.7559) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 152 /inout_user/UCTS1)) + (pad 50 smd rect (at -10.9855 -2.2479) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 51 smd rect (at -10.9855 -1.7526) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 52 smd rect (at -10.9855 -1.2573) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (pad 53 smd rect (at -10.9855 -0.7493) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 171 /inout_user/URTS1)) + (pad 54 smd rect (at -10.9855 -0.254) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 163 /xilinx/QSPI_CS1)) + (pad 55 smd rect (at -10.9855 0.254) (size 1.524 0.254) (layers Composant F.Paste F.Mask)) + (pad 56 smd rect (at -10.9855 0.7493) (size 1.524 0.254) (layers Composant F.Paste F.Mask)) + (pad 57 smd rect (at -10.9855 1.2573) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (pad 58 smd rect (at -10.9855 1.7526) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 59 smd rect (at -10.9855 2.2479) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (pad 60 smd rect (at -10.9855 2.7559) (size 1.524 0.254) (layers Composant F.Paste F.Mask)) + (pad 61 smd rect (at -10.9855 3.2512) (size 1.524 0.254) (layers Composant F.Paste F.Mask)) + (pad 62 smd rect (at -10.9855 3.7465) (size 1.524 0.254) (layers Composant F.Paste F.Mask)) + (pad 63 smd rect (at -10.9855 4.2545) (size 1.524 0.254) (layers Composant F.Paste F.Mask)) + (pad 64 smd rect (at -10.9855 4.7498) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (pad 65 smd rect (at -10.9855 5.2451) (size 1.524 0.254) (layers Composant F.Paste F.Mask)) + (pad 78 smd rect (at -6.2484 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask)) + (pad 79 smd rect (at -5.7531 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask)) + (pad 80 smd rect (at -5.2451 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask)) + (pad 81 smd rect (at -4.7498 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask)) + (pad 82 smd rect (at -4.2545 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask)) + (pad 83 smd rect (at -3.7465 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask)) + (pad 84 smd rect (at -3.2512 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask)) + (pad 85 smd rect (at -2.7559 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (pad 86 smd rect (at -2.2479 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask)) + (pad 87 smd rect (at -1.7526 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask)) + (pad 88 smd rect (at -1.2573 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask)) + (pad 89 smd rect (at -0.7493 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) + (net 62 /xilinx/TCK)) + (pad 90 smd rect (at -0.254 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask)) + (pad 91 smd rect (at 0.254 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask)) + (pad 92 smd rect (at 0.7493 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask)) + (pad 93 smd rect (at 1.2573 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask)) + (pad 94 smd rect (at 1.7526 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask)) + (pad 95 smd rect (at 2.2479 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 96 smd rect (at 2.7559 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) + (net 77 /xilinx/XIL_D19)) + (pad 97 smd rect (at 3.2512 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) + (net 76 /xilinx/XIL_D18)) + (pad 98 smd rect (at 3.7465 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) + (net 92 /xilinx/XIL_D32)) + (pad 99 smd rect (at 4.2545 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) + (net 96 /xilinx/XIL_D36)) + (pad 100 smd rect (at 4.7498 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) + (net 74 /xilinx/XIL_D16)) + (pad 101 smd rect (at 5.2451 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) + (net 75 /xilinx/XIL_D17)) + (pad 102 smd rect (at 5.7531 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask)) + (pad 103 smd rect (at 6.2484 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask)) + (pad 104 smd rect (at 6.7437 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) + (net 64 /xilinx/TDO)) + (pad 105 smd rect (at 7.2517 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (pad 106 smd rect (at 7.747 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask)) + (pad 107 smd rect (at 8.2423 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) + (net 95 /xilinx/XIL_D35)) + (pad 108 smd rect (at 8.7503 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) + (net 73 /xilinx/XIL_D15)) + (pad 73 smd rect (at -8.7503 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 74 smd rect (at -8.2423 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask)) + (pad 75 smd rect (at -7.747 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask)) + (pad 76 smd rect (at -7.2517 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 77 smd rect (at -6.7437 10.9855) (size 0.254 1.524) (layers Composant F.Paste F.Mask)) + (pad 109 smd rect (at 10.9855 8.7503) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 72 /xilinx/XIL_D14)) + (pad 110 smd rect (at 10.9855 8.2423) (size 1.524 0.254) (layers Composant F.Paste F.Mask)) + (pad 111 smd rect (at 10.9855 7.747) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 71 /xilinx/XIL_D13)) + (pad 112 smd rect (at 10.9855 7.2517) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 93 /xilinx/XIL_D33)) + (pad 113 smd rect (at 10.9855 6.7437) (size 1.524 0.254) (layers Composant F.Paste F.Mask) + (net 94 /xilinx/XIL_D34)) + (model smd/tqfp144.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.3939999938011169 0.3939999938011169 0.4000000059604645)) + (rotate (xyz 0 0 0)) + ) + ) + + (module connect:DB9FC (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E4BC) + (at 189.103 67.31) + (descr "Connecteur DB9 femelle couche") + (tags "CONN DB9") + (path /47D80202/4652B26D) + (fp_text reference UARTCAN0 (at 1.27 -10.16) (layer F.SilkS) + (effects (font (thickness 0.3048))) + ) + (fp_text value DB9 (at 1.27 -3.81) (layer F.SilkS) + (effects (font (thickness 0.3048))) + ) + (fp_line (start -16.129 2.286) (end 16.383 2.286) (layer F.SilkS) (width 0.3048)) + (fp_line (start 16.383 2.286) (end 16.383 -15.494) (layer F.SilkS) (width 0.3048)) + (fp_line (start 16.383 -15.494) (end -16.129 -15.494) (layer F.SilkS) (width 0.3048)) + (fp_line (start -16.129 -15.494) (end -16.129 2.286) (layer F.SilkS) (width 0.3048)) + (fp_line (start -9.017 -15.494) (end -9.017 -7.874) (layer F.SilkS) (width 0.3048)) + (fp_line (start -9.017 -7.874) (end 9.271 -7.874) (layer F.SilkS) (width 0.3048)) + (fp_line (start 9.271 -7.874) (end 9.271 -15.494) (layer F.SilkS) (width 0.3048)) + (fp_line (start -7.493 -15.494) (end -7.493 -24.13) (layer F.SilkS) (width 0.3048)) + (fp_line (start -7.493 -24.13) (end 7.747 -24.13) (layer F.SilkS) (width 0.3048)) + (fp_line (start 7.747 -24.13) (end 7.747 -15.494) (layer F.SilkS) (width 0.3048)) + (pad "" thru_hole circle (at 12.827 -1.27) (size 3.81 3.81) (drill 3.048) (layers *.Cu *.Mask F.SilkS)) + (pad "" thru_hole circle (at -12.573 -1.27) (size 3.81 3.81) (drill 3.048) (layers *.Cu *.Mask F.SilkS)) + (pad 1 thru_hole rect (at -5.461 1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 208 "Net-(UARTCAN0-Pad1)")) + (pad 2 thru_hole circle (at -2.667 1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 47 /inout_user/TXD0)) + (pad 3 thru_hole circle (at 0 1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 43 /inout_user/RXD0)) + (pad 4 thru_hole circle (at 2.794 1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 208 "Net-(UARTCAN0-Pad1)")) + (pad 5 thru_hole circle (at 5.588 1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 103 GND)) + (pad 6 thru_hole circle (at -4.064 -1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 208 "Net-(UARTCAN0-Pad1)")) + (pad 7 thru_hole circle (at -1.27 -1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 35 /inout_user/CTS0)) + (pad 8 thru_hole circle (at 1.397 -1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 40 /inout_user/RTS0)) + (pad 9 thru_hole circle (at 4.191 -1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) + (model Conn_DBxx/db9_female_pin90deg.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module connect:DB9FC (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E4D4) + (at 155.575 67.31) + (descr "Connecteur DB9 femelle couche") + (tags "CONN DB9") + (path /47D80202/4652B4C2) + (fp_text reference UARTCAN1 (at 1.27 -10.16) (layer F.SilkS) + (effects (font (thickness 0.3048))) + ) + (fp_text value DB9 (at 1.27 -3.81) (layer F.SilkS) + (effects (font (thickness 0.3048))) + ) + (fp_line (start -16.129 2.286) (end 16.383 2.286) (layer F.SilkS) (width 0.3048)) + (fp_line (start 16.383 2.286) (end 16.383 -15.494) (layer F.SilkS) (width 0.3048)) + (fp_line (start 16.383 -15.494) (end -16.129 -15.494) (layer F.SilkS) (width 0.3048)) + (fp_line (start -16.129 -15.494) (end -16.129 2.286) (layer F.SilkS) (width 0.3048)) + (fp_line (start -9.017 -15.494) (end -9.017 -7.874) (layer F.SilkS) (width 0.3048)) + (fp_line (start -9.017 -7.874) (end 9.271 -7.874) (layer F.SilkS) (width 0.3048)) + (fp_line (start 9.271 -7.874) (end 9.271 -15.494) (layer F.SilkS) (width 0.3048)) + (fp_line (start -7.493 -15.494) (end -7.493 -24.13) (layer F.SilkS) (width 0.3048)) + (fp_line (start -7.493 -24.13) (end 7.747 -24.13) (layer F.SilkS) (width 0.3048)) + (fp_line (start 7.747 -24.13) (end 7.747 -15.494) (layer F.SilkS) (width 0.3048)) + (pad "" thru_hole circle (at 12.827 -1.27) (size 3.81 3.81) (drill 3.048) (layers *.Cu *.Mask F.SilkS)) + (pad "" thru_hole circle (at -12.573 -1.27) (size 3.81 3.81) (drill 3.048) (layers *.Cu *.Mask F.SilkS)) + (pad 1 thru_hole rect (at -5.461 1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 209 "Net-(UARTCAN1-Pad1)")) + (pad 2 thru_hole circle (at -2.667 1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 48 /inout_user/TXD1)) + (pad 3 thru_hole circle (at 0 1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 44 /inout_user/RXD1)) + (pad 4 thru_hole circle (at 2.794 1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 209 "Net-(UARTCAN1-Pad1)")) + (pad 5 thru_hole circle (at 5.588 1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 103 GND)) + (pad 6 thru_hole circle (at -4.064 -1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 209 "Net-(UARTCAN1-Pad1)")) + (pad 7 thru_hole circle (at -1.27 -1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 36 /inout_user/CTS1)) + (pad 8 thru_hole circle (at 1.397 -1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 41 /inout_user/RTS1)) + (pad 9 thru_hole circle (at 4.191 -1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) + (model Conn_DBxx/db9_female_pin90deg.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module connect:DB9FC (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E4EC) + (at 122.047 67.31) + (descr "Connecteur DB9 femelle couche") + (tags "CONN DB9") + (path /47D80202/4652B4D4) + (fp_text reference UARTCAN2 (at 1.27 -10.16) (layer F.SilkS) + (effects (font (thickness 0.3048))) + ) + (fp_text value DB9 (at 1.27 -3.81) (layer F.SilkS) + (effects (font (thickness 0.3048))) + ) + (fp_line (start -16.129 2.286) (end 16.383 2.286) (layer F.SilkS) (width 0.3048)) + (fp_line (start 16.383 2.286) (end 16.383 -15.494) (layer F.SilkS) (width 0.3048)) + (fp_line (start 16.383 -15.494) (end -16.129 -15.494) (layer F.SilkS) (width 0.3048)) + (fp_line (start -16.129 -15.494) (end -16.129 2.286) (layer F.SilkS) (width 0.3048)) + (fp_line (start -9.017 -15.494) (end -9.017 -7.874) (layer F.SilkS) (width 0.3048)) + (fp_line (start -9.017 -7.874) (end 9.271 -7.874) (layer F.SilkS) (width 0.3048)) + (fp_line (start 9.271 -7.874) (end 9.271 -15.494) (layer F.SilkS) (width 0.3048)) + (fp_line (start -7.493 -15.494) (end -7.493 -24.13) (layer F.SilkS) (width 0.3048)) + (fp_line (start -7.493 -24.13) (end 7.747 -24.13) (layer F.SilkS) (width 0.3048)) + (fp_line (start 7.747 -24.13) (end 7.747 -15.494) (layer F.SilkS) (width 0.3048)) + (pad "" thru_hole circle (at 12.827 -1.27) (size 3.81 3.81) (drill 3.048) (layers *.Cu *.Mask F.SilkS)) + (pad "" thru_hole circle (at -12.573 -1.27) (size 3.81 3.81) (drill 3.048) (layers *.Cu *.Mask F.SilkS)) + (pad 1 thru_hole rect (at -5.461 1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 210 "Net-(UARTCAN2-Pad1)")) + (pad 2 thru_hole circle (at -2.667 1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 49 /inout_user/TXD2/CANL)) + (pad 3 thru_hole circle (at 0 1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 45 /inout_user/RXD2)) + (pad 4 thru_hole circle (at 2.794 1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 210 "Net-(UARTCAN2-Pad1)")) + (pad 5 thru_hole circle (at 5.588 1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 103 GND)) + (pad 6 thru_hole circle (at -4.064 -1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 210 "Net-(UARTCAN2-Pad1)")) + (pad 7 thru_hole circle (at -1.27 -1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 37 /inout_user/CTS2/CANH)) + (pad 8 thru_hole circle (at 1.397 -1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 42 /inout_user/RTS2)) + (pad 9 thru_hole circle (at 4.191 -1.27) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) + (model Conn_DBxx/db9_female_pin90deg.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module pin_array:pin_array_4x2 (layer Composant) (tedit 3FAB90E6) (tstamp 53D8E504) + (at 198.755 78.359 270) + (descr "Double rangee de contacts 2 x 4 pins") + (tags CONN) + (path /47D80202/4652B289) + (fp_text reference UART_EN0 (at 0 -3.81 270) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_text value CONN_4X2 (at 0 3.81 270) (layer F.SilkS) hide + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_line (start -5.08 -2.54) (end 5.08 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 -2.54) (end 5.08 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 2.54) (end -5.08 -2.54) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole rect (at -3.81 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 199 "Net-(U3-Pad11)")) + (pad 2 thru_hole circle (at -3.81 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 56 /inout_user/UTXD0)) + (pad 3 thru_hole circle (at -1.27 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 200 "Net-(U3-Pad12)")) + (pad 4 thru_hole circle (at -1.27 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 173 /inout_user/URXD0)) + (pad 5 thru_hole circle (at 1.27 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 191 "Net-(R30-Pad2)")) + (pad 6 thru_hole circle (at 1.27 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 52 /inout_user/URTS0)) + (pad 7 thru_hole circle (at 3.81 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 198 "Net-(U3-Pad9)")) + (pad 8 thru_hole circle (at 3.81 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 174 /inout_user/UCTS0)) + (model pin_array/pins_array_4x2.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module pin_array:pin_array_4x2 (layer Composant) (tedit 3FAB90E6) (tstamp 53D8E513) + (at 170.815 78.359 270) + (descr "Double rangee de contacts 2 x 4 pins") + (tags CONN) + (path /47D80202/4652B4C3) + (fp_text reference UART_EN1 (at 0 -3.81 270) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_text value CONN_4X2 (at 0 3.81 270) (layer F.SilkS) hide + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_line (start -5.08 -2.54) (end 5.08 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 -2.54) (end 5.08 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 2.54) (end -5.08 -2.54) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole rect (at -3.81 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 202 "Net-(U5-Pad11)")) + (pad 2 thru_hole circle (at -3.81 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 170 /inout_user/UTXD1)) + (pad 3 thru_hole circle (at -1.27 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 203 "Net-(U5-Pad12)")) + (pad 4 thru_hole circle (at -1.27 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 54 /inout_user/URXD1)) + (pad 5 thru_hole circle (at 1.27 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 195 "Net-(R35-Pad2)")) + (pad 6 thru_hole circle (at 1.27 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 171 /inout_user/URTS1)) + (pad 7 thru_hole circle (at 3.81 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 201 "Net-(U5-Pad9)")) + (pad 8 thru_hole circle (at 3.81 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 152 /inout_user/UCTS1)) + (model pin_array/pins_array_4x2.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module pin_array:pin_array_4x2 (layer Composant) (tedit 3FAB90E6) (tstamp 53D8E522) + (at 137.033 78.359 270) + (descr "Double rangee de contacts 2 x 4 pins") + (tags CONN) + (path /47D80202/4652B4D5) + (fp_text reference UART_EN2 (at 0 -3.81 270) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_text value CONN_4X2 (at 0 3.81 270) (layer F.SilkS) hide + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_line (start -5.08 -2.54) (end 5.08 -2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 -2.54) (end 5.08 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.08 2.54) (end -5.08 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.08 2.54) (end -5.08 -2.54) (layer F.SilkS) (width 0.3048)) + (pad 1 thru_hole rect (at -3.81 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 206 "Net-(U8-Pad10)")) + (pad 2 thru_hole circle (at -3.81 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 175 /inout_user/UTXD2)) + (pad 3 thru_hole circle (at -1.27 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 205 "Net-(U8-Pad9)")) + (pad 4 thru_hole circle (at -1.27 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 55 /inout_user/URXD2)) + (pad 5 thru_hole circle (at 1.27 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 189 "Net-(R23-Pad2)")) + (pad 6 thru_hole circle (at 1.27 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 53 /inout_user/URTS2)) + (pad 7 thru_hole circle (at 3.81 1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 207 "Net-(U8-Pad12)")) + (pad 8 thru_hole circle (at 3.81 -1.27 270) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 51 /inout_user/UCTS2)) + (model pin_array/pins_array_4x2.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module pin_array:PIN_ARRAY_2X1 (layer Composant) (tedit 4565C520) (tstamp 53D8E531) + (at 113.792 109.855) + (descr "Connecteurs 2 pins") + (tags "CONN DEV") + (path /46238079) + (fp_text reference VDDA1 (at 0 -1.905) (layer F.SilkS) + (effects (font (size 0.762 0.762) (thickness 0.1524))) + ) + (fp_text value JUMPER (at 0 -1.905) (layer F.SilkS) hide + (effects (font (size 0.762 0.762) (thickness 0.1524))) + ) + (fp_line (start -2.54 1.27) (end -2.54 -1.27) (layer F.SilkS) (width 0.1524)) + (fp_line (start -2.54 -1.27) (end 2.54 -1.27) (layer F.SilkS) (width 0.1524)) + (fp_line (start 2.54 -1.27) (end 2.54 1.27) (layer F.SilkS) (width 0.1524)) + (fp_line (start 2.54 1.27) (end -2.54 1.27) (layer F.SilkS) (width 0.1524)) + (pad 1 thru_hole rect (at -1.27 0) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 105 VDD)) + (pad 2 thru_hole circle (at 1.27 0) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 143 "Net-(L1-Pad1)")) + (model pin_array/pins_array_2x1.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module lib_smd:DPAK5 (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E53A) + (at 78.105 93.091) + (tags "CMS DPACK") + (path /47D80202/46603376) + (fp_text reference VR1 (at 0 -14.224) (layer F.SilkS) + (effects (font (size 1.27 1.27) (thickness 0.1524))) + ) + (fp_text value LT1129_QPACK (at 0 -3.302) (layer F.SilkS) + (effects (font (size 1.27 1.27) (thickness 0.1524))) + ) + (fp_line (start 2.794 -2.413) (end 2.794 1.27) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.794 1.27) (end 4.064 1.27) (layer F.SilkS) (width 0.127)) + (fp_line (start 4.064 1.27) (end 4.064 -2.413) (layer F.SilkS) (width 0.127)) + (fp_line (start 1.143 -2.413) (end 1.143 1.27) (layer F.SilkS) (width 0.127)) + (fp_line (start 1.143 1.27) (end 2.413 1.27) (layer F.SilkS) (width 0.127)) + (fp_line (start 2.413 1.27) (end 2.413 -2.413) (layer F.SilkS) (width 0.127)) + (fp_line (start -0.635 -2.413) (end -0.635 1.27) (layer F.SilkS) (width 0.127)) + (fp_line (start -0.635 1.27) (end 0.635 1.27) (layer F.SilkS) (width 0.127)) + (fp_line (start 0.635 1.27) (end 0.635 -2.413) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.286 -2.413) (end -2.286 1.27) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.286 1.27) (end -1.143 1.27) (layer F.SilkS) (width 0.127)) + (fp_line (start -1.143 1.27) (end -1.016 1.27) (layer F.SilkS) (width 0.127)) + (fp_line (start -1.016 1.27) (end -1.016 -2.413) (layer F.SilkS) (width 0.127)) + (fp_line (start -4.064 -2.413) (end -4.064 1.27) (layer F.SilkS) (width 0.127)) + (fp_line (start -4.064 1.27) (end -2.794 1.27) (layer F.SilkS) (width 0.127)) + (fp_line (start -2.794 1.27) (end -2.794 -2.413) (layer F.SilkS) (width 0.127)) + (fp_line (start -5.334 -2.413) (end 5.334 -2.413) (layer F.SilkS) (width 0.127)) + (fp_line (start 5.334 -2.413) (end 5.334 -12.573) (layer F.SilkS) (width 0.127)) + (fp_line (start 5.334 -12.573) (end -5.334 -12.573) (layer F.SilkS) (width 0.127)) + (fp_line (start -5.334 -12.573) (end -5.334 -2.413) (layer F.SilkS) (width 0.127)) + (pad 1 smd rect (at -3.4036 0) (size 1.0668 2.286) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 3 smd rect (at 0 -8.763) (size 10.668 8.89) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (pad 3 smd rect (at 0 0) (size 1.0668 2.286) (layers Composant F.Paste F.Mask) + (net 103 GND)) + (pad 2 smd rect (at -1.7018 0) (size 1.0668 2.286) (layers Composant F.Paste F.Mask) + (net 105 VDD)) + (pad 4 smd rect (at 1.7018 0) (size 1.0668 2.286) (layers Composant F.Paste F.Mask)) + (pad 5 smd rect (at 3.4036 0) (size 1.0668 2.286) (layers Composant F.Paste F.Mask) + (net 128 "Net-(C38-Pad1)")) + (model smd/dpack_5.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module connect:PINTST (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E557) + (at 103.124 84.582 270) + (descr "module 1 pin (ou trou mecanique de percage)") + (tags DEV) + (path /47D80202/4654003D) + (fp_text reference VREF1 (at 0 -1.26746 270) (layer F.SilkS) + (effects (font (size 0.508 0.508) (thickness 0.127))) + ) + (fp_text value CONN_1 (at 0 1.27 270) (layer F.SilkS) hide + (effects (font (size 0.508 0.508) (thickness 0.127))) + ) + (fp_circle (center 0 0) (end -0.254 -0.762) (layer F.SilkS) (width 0.127)) + (pad 1 thru_hole circle (at 0 0 270) (size 1.143 1.143) (drill 0.635) (layers *.Cu *.Mask F.SilkS) + (net 204 "Net-(U7-Pad5)")) + (model Pin_Array/pin_array_1x1.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module pin_array:PIN_ARRAY_2X1 (layer Composant) (tedit 4565C520) (tstamp 53D8E55C) + (at 183.134 130.302) + (descr "Connecteurs 2 pins") + (tags "CONN DEV") + (path /47D80202/4652A9C4) + (fp_text reference VX_EN1 (at 0 -1.905) (layer F.SilkS) + (effects (font (size 0.762 0.762) (thickness 0.1524))) + ) + (fp_text value JUMPER (at 0 -1.905) (layer F.SilkS) hide + (effects (font (size 0.762 0.762) (thickness 0.1524))) + ) + (fp_line (start -2.54 1.27) (end -2.54 -1.27) (layer F.SilkS) (width 0.1524)) + (fp_line (start -2.54 -1.27) (end 2.54 -1.27) (layer F.SilkS) (width 0.1524)) + (fp_line (start 2.54 -1.27) (end 2.54 1.27) (layer F.SilkS) (width 0.1524)) + (fp_line (start 2.54 1.27) (end -2.54 1.27) (layer F.SilkS) (width 0.1524)) + (pad 1 thru_hole rect (at -1.27 0) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 105 VDD)) + (pad 2 thru_hole circle (at 1.27 0) (size 1.524 1.524) (drill 1.016) (layers *.Cu *.Mask F.SilkS) + (net 129 "Net-(C43-Pad2)")) + (model pin_array/pins_array_2x1.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module discret:HC-18UH (layer Composant) (tedit 53D8D2B1) (tstamp 53D8E565) + (at 123.444 123.317 270) + (descr "Quartz boitier HC-18 horizontal") + (tags "QUARTZ DEV") + (path /462389C7) + (fp_text reference Y1 (at 0 6.35 270) (layer F.SilkS) + (effects (font (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 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.8128) (layers *.Cu *.Mask F.SilkS) + (net 8 /CLKIN/EXTAL)) + (pad 2 thru_hole circle (at 2.54 0 270) (size 1.778 1.778) (drill 0.8128) (layers *.Cu *.Mask F.SilkS) + (net 58 /xilinx/GLCK2)) + (model discret/xtal/crystal_hc18u_horizontal.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + (gr_text "CARTE COLDFIRE" (at 213.995 58.42) (layer Composant) (effects (font (size 2.032 1.524) (thickness 0.3048))) ) @@ -6182,5753 +5983,3557 @@ (gr_line (start 228.6 55.88) (end 71.12 55.88) (angle 90) (layer Edge.Cuts) (width 0.381)) (gr_line (start 228.6 55.88) (end 228.6 147.32) (angle 90) (layer Edge.Cuts) (width 0.381)) - (segment (start 152.019 102.489) (end 143.129 102.4636) (width 0.254) (layer Composant) (net 1) (status C00)) - (segment (start 174.244 139.446) (end 172.974 138.176) (width 0.254) (layer 3.3V_layer) (net 2) (status 800)) - (segment (start 146.05 128.27) (end 143.383 125.603) (width 0.254) (layer 3.3V_layer) (net 2)) - (segment (start 165.735 128.27) (end 146.05 128.27) (width 0.254) (layer 3.3V_layer) (net 2)) - (segment (start 132.334 105.41) (end 131.826 104.902) (width 0.254) (layer 3.3V_layer) (net 2)) - (segment (start 172.974 138.176) (end 172.974 135.509) (width 0.254) (layer 3.3V_layer) (net 2)) - (segment (start 129.0574 103.9622) (end 127.635 103.9876) (width 0.254) (layer Composant) (net 2) (status 400)) - (segment (start 129.286 104.14) (end 129.0574 103.9622) (width 0.254) (layer Composant) (net 2)) - (segment (start 130.81 104.14) (end 129.286 104.14) (width 0.254) (layer Composant) (net 2)) - (segment (start 131.191 104.521) (end 130.81 104.14) (width 0.254) (layer Composant) (net 2)) - (segment (start 131.318 104.902) (end 131.191 104.521) (width 0.254) (layer Composant) (net 2)) - (segment (start 172.974 135.509) (end 165.735 128.27) (width 0.254) (layer 3.3V_layer) (net 2)) - (segment (start 131.826 104.902) (end 131.318 104.902) (width 0.254) (layer 3.3V_layer) (net 2)) - (via (at 131.318 104.902) (size 0.635) (layers Composant Cuivre) (net 2)) - (segment (start 132.334 112.903) (end 132.334 105.41) (width 0.254) (layer 3.3V_layer) (net 2)) - (segment (start 134.239 114.808) (end 132.334 112.903) (width 0.254) (layer 3.3V_layer) (net 2)) - (segment (start 143.383 125.603) (end 137.414 125.603) (width 0.254) (layer 3.3V_layer) (net 2)) - (segment (start 137.414 125.603) (end 134.239 122.428) (width 0.254) (layer 3.3V_layer) (net 2)) - (segment (start 134.239 122.428) (end 134.239 114.808) (width 0.254) (layer 3.3V_layer) (net 2)) - (segment (start 170.434 138.176) (end 171.704 139.446) (width 0.254) (layer 3.3V_layer) (net 3) (status 400)) - (segment (start 131.826 113.919) (end 133.35 115.443) (width 0.254) (layer 3.3V_layer) (net 3)) - (segment (start 133.35 115.443) (end 133.35 122.809) (width 0.254) (layer 3.3V_layer) (net 3)) - (segment (start 133.35 122.809) (end 138.684 128.143) (width 0.254) (layer 3.3V_layer) (net 3)) - (segment (start 138.684 128.143) (end 143.51 128.143) (width 0.254) (layer 3.3V_layer) (net 3)) - (segment (start 143.51 128.143) (end 144.78 129.413) (width 0.254) (layer 3.3V_layer) (net 3)) - (segment (start 144.78 129.413) (end 163.576 129.413) (width 0.254) (layer 3.3V_layer) (net 3)) - (segment (start 163.576 129.413) (end 170.434 136.271) (width 0.254) (layer 3.3V_layer) (net 3)) - (via (at 130.429 104.902) (size 0.635) (layers Composant Cuivre) (net 3)) - (segment (start 131.445 105.664) (end 131.826 106.045) (width 0.254) (layer 3.3V_layer) (net 3)) - (segment (start 130.683 105.664) (end 131.445 105.664) (width 0.254) (layer 3.3V_layer) (net 3)) - (segment (start 130.429 105.41) (end 130.683 105.664) (width 0.254) (layer 3.3V_layer) (net 3)) - (segment (start 130.429 104.902) (end 130.429 105.41) (width 0.254) (layer 3.3V_layer) (net 3)) - (segment (start 130.048 104.648) (end 130.429 104.902) (width 0.254) (layer Composant) (net 3)) - (segment (start 129.159 104.648) (end 130.048 104.648) (width 0.254) (layer Composant) (net 3)) - (segment (start 128.9304 104.4702) (end 129.159 104.648) (width 0.254) (layer Composant) (net 3)) - (segment (start 127.635 104.4702) (end 128.9304 104.4702) (width 0.254) (layer Composant) (net 3) (status 800)) - (segment (start 170.434 136.271) (end 170.434 138.176) (width 0.254) (layer 3.3V_layer) (net 3)) - (segment (start 131.826 106.045) (end 131.826 113.919) (width 0.254) (layer 3.3V_layer) (net 3)) - (segment (start 129.54 104.521) (end 129.921 104.14) (width 0.254) (layer 3.3V_layer) (net 4)) - (segment (start 128.8034 104.9782) (end 127.635 104.9782) (width 0.254) (layer Composant) (net 4) (status 400)) - (segment (start 170.561 140.843) (end 169.164 139.446) (width 0.254) (layer 3.3V_layer) (net 4) (status 400)) - (segment (start 174.879 140.843) (end 170.561 140.843) (width 0.254) (layer 3.3V_layer) (net 4)) - (segment (start 175.514 140.208) (end 174.879 140.843) (width 0.254) (layer 3.3V_layer) (net 4)) - (segment (start 175.514 133.604) (end 175.514 140.208) (width 0.254) (layer 3.3V_layer) (net 4)) - (segment (start 168.402 126.492) (end 175.514 133.604) (width 0.254) (layer 3.3V_layer) (net 4)) - (segment (start 146.812 126.492) (end 168.402 126.492) (width 0.254) (layer 3.3V_layer) (net 4)) - (segment (start 143.383 123.063) (end 146.812 126.492) (width 0.254) (layer 3.3V_layer) (net 4)) - (segment (start 136.398 123.063) (end 143.383 123.063) (width 0.254) (layer 3.3V_layer) (net 4)) - (segment (start 134.874 121.539) (end 136.398 123.063) (width 0.254) (layer 3.3V_layer) (net 4)) - (segment (start 134.874 113.919) (end 134.874 121.539) (width 0.254) (layer 3.3V_layer) (net 4)) - (segment (start 132.842 111.887) (end 134.874 113.919) (width 0.254) (layer 3.3V_layer) (net 4)) - (segment (start 132.842 105.156) (end 132.842 111.887) (width 0.254) (layer 3.3V_layer) (net 4)) - (segment (start 129.921 104.14) (end 131.826 104.14) (width 0.254) (layer 3.3V_layer) (net 4)) - (segment (start 129.54 105.41) (end 129.032 105.156) (width 0.254) (layer Composant) (net 4)) - (segment (start 129.032 105.156) (end 128.8034 104.9782) (width 0.254) (layer Composant) (net 4)) - (via (at 129.54 105.41) (size 0.635) (layers Composant Cuivre) (net 4)) - (segment (start 129.54 105.41) (end 129.54 104.521) (width 0.254) (layer 3.3V_layer) (net 4)) - (segment (start 131.826 104.14) (end 132.842 105.156) (width 0.254) (layer 3.3V_layer) (net 4)) - (segment (start 165.481 124.714) (end 165.481 124.841) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 146.939 124.714) (end 165.481 124.714) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 145.796 123.571) (end 146.939 124.714) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 145.796 122.555) (end 145.796 123.571) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 143.764 120.523) (end 145.796 122.555) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 139.192 120.523) (end 143.764 120.523) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 138.303 121.412) (end 139.192 120.523) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 136.017 121.412) (end 138.303 121.412) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 135.509 120.904) (end 136.017 121.412) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 135.509 113.157) (end 135.509 120.904) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 129.54 106.299) (end 129.032 106.299) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 129.032 106.299) (end 128.651 105.918) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 128.651 105.918) (end 128.651 104.394) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 129.032 105.918) (end 129.54 106.299) (width 0.254) (layer Composant) (net 5)) - (segment (start 128.905 105.664) (end 129.032 105.918) (width 0.254) (layer Composant) (net 5)) - (segment (start 128.6764 105.4862) (end 128.905 105.664) (width 0.254) (layer Composant) (net 5)) - (segment (start 127.635 105.4862) (end 128.6764 105.4862) (width 0.254) (layer Composant) (net 5) (status 800)) - (segment (start 168.783 141.605) (end 166.624 139.446) (width 0.254) (layer 3.3V_layer) (net 5) (status 400)) - (segment (start 132.207 103.632) (end 133.35 104.775) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 176.911 141.605) (end 168.783 141.605) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 178.054 140.462) (end 176.911 141.605) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 178.054 133.604) (end 178.054 140.462) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 170.815 126.365) (end 178.054 133.604) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 170.815 124.46) (end 170.815 126.365) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 169.672 123.317) (end 170.815 124.46) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 167.005 123.317) (end 169.672 123.317) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 165.481 124.841) (end 167.005 123.317) (width 0.254) (layer 3.3V_layer) (net 5)) - (via (at 129.54 106.299) (size 0.635) (layers Composant Cuivre) (net 5)) - (segment (start 133.35 104.775) (end 133.35 110.998) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 133.35 110.998) (end 135.509 113.157) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 129.413 103.632) (end 132.207 103.632) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 128.651 104.394) (end 129.413 103.632) (width 0.254) (layer 3.3V_layer) (net 5)) - (segment (start 164.084 139.446) (end 162.814 138.176) (width 0.254) (layer 3.3V_layer) (net 6) (status 800)) - (segment (start 130.8862 107.6198) (end 131.064 107.442) (width 0.254) (layer Composant) (net 6)) - (segment (start 131.064 107.442) (end 131.064 106.426) (width 0.254) (layer Composant) (net 6)) - (segment (start 130.937 107.061) (end 131.064 106.934) (width 0.254) (layer 3.3V_layer) (net 6)) - (segment (start 131.064 106.934) (end 131.064 106.426) (width 0.254) (layer 3.3V_layer) (net 6)) - (segment (start 130.937 107.061) (end 130.937 114.681) (width 0.254) (layer 3.3V_layer) (net 6)) - (segment (start 130.937 114.681) (end 132.461 116.205) (width 0.254) (layer 3.3V_layer) (net 6)) - (segment (start 132.461 123.571) (end 132.461 116.205) (width 0.254) (layer 3.3V_layer) (net 6)) - (segment (start 139.573 130.683) (end 132.461 123.571) (width 0.254) (layer 3.3V_layer) (net 6)) - (segment (start 157.226 130.683) (end 139.573 130.683) (width 0.254) (layer 3.3V_layer) (net 6)) - (segment (start 162.814 136.271) (end 157.226 130.683) (width 0.254) (layer 3.3V_layer) (net 6)) - (segment (start 162.814 138.176) (end 162.814 136.271) (width 0.254) (layer 3.3V_layer) (net 6)) - (segment (start 130.8862 107.6198) (end 130.8862 109.22) (width 0.254) (layer Composant) (net 6) (status 400)) - (via (at 131.064 106.426) (size 0.635) (layers Composant Cuivre) (net 6)) - (segment (start 130.175 107.315) (end 130.048 107.188) (width 0.254) (layer 3.3V_layer) (net 7)) - (segment (start 130.175 107.315) (end 130.175 115.697) (width 0.254) (layer 3.3V_layer) (net 7)) - (segment (start 130.3782 107.7468) (end 130.048 107.188) (width 0.254) (layer Composant) (net 7)) - (segment (start 130.3782 109.22) (end 130.3782 107.7468) (width 0.254) (layer Composant) (net 7) (status 800)) - (segment (start 130.175 115.697) (end 131.699 117.221) (width 0.254) (layer 3.3V_layer) (net 7)) - (segment (start 160.274 138.176) (end 160.274 136.271) (width 0.254) (layer 3.3V_layer) (net 7)) - (segment (start 131.699 124.206) (end 131.699 117.221) (width 0.254) (layer 3.3V_layer) (net 7)) - (segment (start 139.319 131.826) (end 131.699 124.206) (width 0.254) (layer 3.3V_layer) (net 7)) - (segment (start 155.829 131.826) (end 139.319 131.826) (width 0.254) (layer 3.3V_layer) (net 7)) - (segment (start 160.274 136.271) (end 155.829 131.826) (width 0.254) (layer 3.3V_layer) (net 7)) - (segment (start 161.544 139.446) (end 160.274 138.176) (width 0.254) (layer 3.3V_layer) (net 7) (status 800)) - (via (at 130.048 107.188) (size 0.889) (layers Composant Cuivre) (net 7)) - (via (at 129.159 112.014) (size 0.889) (layers Composant Cuivre) (net 8)) - (segment (start 129.159 111.252) (end 129.413 110.998) (width 0.254) (layer Composant) (net 8)) - (segment (start 129.159 112.014) (end 129.159 111.252) (width 0.254) (layer Composant) (net 8)) - (segment (start 159.004 139.319) (end 157.734 138.049) (width 0.254) (layer Cuivre) (net 8)) - (segment (start 157.734 138.049) (end 157.734 136.017) (width 0.254) (layer Cuivre) (net 8)) - (segment (start 157.734 136.017) (end 154.178 132.461) (width 0.254) (layer Cuivre) (net 8)) - (segment (start 154.178 132.461) (end 138.43 132.461) (width 0.254) (layer Cuivre) (net 8)) - (segment (start 138.43 132.461) (end 129.159 123.19) (width 0.254) (layer Cuivre) (net 8)) - (segment (start 129.159 123.19) (end 129.159 112.014) (width 0.254) (layer Cuivre) (net 8)) - (segment (start 129.413 110.998) (end 129.413 110.617) (width 0.254) (layer Composant) (net 8)) - (segment (start 129.413 110.617) (end 129.87528 110.15472) (width 0.254) (layer Composant) (net 8)) - (segment (start 159.004 139.446) (end 159.004 139.319) (width 0.254) (layer Cuivre) (net 8) (status 800)) - (segment (start 129.87528 110.15472) (end 129.8956 109.22) (width 0.254) (layer Composant) (net 8) (status 400)) - (segment (start 128.905 109.22) (end 128.397 109.728) (width 0.254) (layer Composant) (net 9)) - (segment (start 152.908 133.35) (end 155.194 135.636) (width 0.254) (layer Cuivre) (net 9)) - (segment (start 137.414 133.35) (end 152.908 133.35) (width 0.254) (layer Cuivre) (net 9)) - (segment (start 155.194 135.636) (end 155.194 138.176) (width 0.254) (layer Cuivre) (net 9)) - (segment (start 128.397 113.665) (end 128.397 124.333) (width 0.254) (layer Cuivre) (net 9)) - (segment (start 129.3876 109.22) (end 128.905 109.22) (width 0.254) (layer Composant) (net 9) (status 800)) - (segment (start 155.194 138.176) (end 156.464 139.446) (width 0.254) (layer Cuivre) (net 9) (status 400)) - (via (at 128.397 113.665) (size 0.889) (layers Composant Cuivre) (net 9)) - (segment (start 128.397 124.333) (end 137.414 133.35) (width 0.254) (layer Cuivre) (net 9)) - (segment (start 128.397 109.728) (end 128.397 113.665) (width 0.254) (layer Composant) (net 9)) - (via (at 146.685 109.855) (size 0.889) (layers Composant Cuivre) (net 10)) - (segment (start 83.566 106.299) (end 78.867 106.299) (width 0.254) (layer GND_layer) (net 10) (status 400)) - (segment (start 82.3595 104.267) (end 80.899 104.267) (width 0.4318) (layer Composant) (net 10) (status 800)) - (segment (start 80.899 104.267) (end 80.391 104.775) (width 0.4318) (layer Composant) (net 10)) - (segment (start 83.566 106.299) (end 86.487 109.22) (width 0.254) (layer GND_layer) (net 10)) - (segment (start 143.637 109.855) (end 146.685 109.855) (width 0.254) (layer Cuivre) (net 10)) - (segment (start 141.732 111.76) (end 143.637 109.855) (width 0.254) (layer Cuivre) (net 10)) - (segment (start 133.604 111.76) (end 141.732 111.76) (width 0.254) (layer Cuivre) (net 10)) - (segment (start 132.461 110.617) (end 133.604 111.76) (width 0.254) (layer Cuivre) (net 10)) - (segment (start 127.508 110.617) (end 132.461 110.617) (width 0.254) (layer Cuivre) (net 10)) - (segment (start 125.476 112.649) (end 127.508 110.617) (width 0.254) (layer Cuivre) (net 10)) - (segment (start 78.867 106.299) (end 80.391 104.775) (width 0.381) (layer Composant) (net 10) (status 800)) - (segment (start 119.253 112.649) (end 125.476 112.649) (width 0.254) (layer Cuivre) (net 10)) - (segment (start 87.63 112.141) (end 90.17 114.681) (width 0.254) (layer Cuivre) (net 10)) - (segment (start 90.17 114.681) (end 94.361 114.681) (width 0.254) (layer Cuivre) (net 10)) - (segment (start 86.487 109.22) (end 86.487 110.998) (width 0.254) (layer GND_layer) (net 10)) - (segment (start 86.487 110.998) (end 87.63 112.141) (width 0.254) (layer GND_layer) (net 10)) - (segment (start 145.288 108.204) (end 144.5514 107.4674) (width 0.254) (layer Composant) (net 10)) - (segment (start 145.288 108.712) (end 145.288 108.204) (width 0.254) (layer Composant) (net 10)) - (segment (start 146.431 109.855) (end 145.288 108.712) (width 0.254) (layer Composant) (net 10)) - (segment (start 146.685 109.855) (end 146.431 109.855) (width 0.254) (layer Composant) (net 10)) - (segment (start 117.729 114.173) (end 119.253 112.649) (width 0.254) (layer Cuivre) (net 10)) - (segment (start 144.5514 107.4674) (end 143.129 107.4674) (width 0.254) (layer Composant) (net 10) (status 400)) - (via (at 87.63 112.141) (size 0.889) (layers Composant Cuivre) (net 10)) - (segment (start 94.361 114.681) (end 95.377 113.665) (width 0.254) (layer Cuivre) (net 10)) - (segment (start 95.377 113.665) (end 97.917 113.665) (width 0.254) (layer Cuivre) (net 10)) - (segment (start 97.917 113.665) (end 100.203 111.379) (width 0.254) (layer Cuivre) (net 10)) - (segment (start 100.203 111.379) (end 107.696 111.379) (width 0.254) (layer Cuivre) (net 10)) - (segment (start 107.696 111.379) (end 110.49 114.173) (width 0.254) (layer Cuivre) (net 10)) - (segment (start 110.49 114.173) (end 117.729 114.173) (width 0.254) (layer Cuivre) (net 10)) - (segment (start 123.8885 120.3325) (end 123.444 120.777) (width 0.381) (layer Composant) (net 11) (status 400)) - (segment (start 128.27 120.3325) (end 123.8885 120.3325) (width 0.381) (layer Composant) (net 11) (status 800)) - (segment (start 131.826 116.7765) (end 128.27 120.3325) (width 0.381) (layer Composant) (net 11) (status 400)) - (segment (start 136.652 116.7765) (end 131.826 116.7765) (width 0.381) (layer Composant) (net 11) (status 800)) - (segment (start 141.859 114.554) (end 141.224 114.554) (width 0.2) (layer Composant) (net 11)) - (segment (start 142.621 115.316) (end 141.859 114.554) (width 0.2) (layer Composant) (net 11)) - (segment (start 142.621 116.205) (end 142.621 115.316) (width 0.2) (layer Composant) (net 11)) - (segment (start 139.446 116.205) (end 142.621 116.205) (width 0.2) (layer Cuivre) (net 11)) - (segment (start 140.589 113.919) (end 140.589 111.379) (width 0.2) (layer Composant) (net 11)) - (segment (start 140.3858 109.22) (end 140.3858 111.0488) (width 0.2) (layer Composant) (net 11) (status 800)) - (segment (start 140.3858 111.0488) (end 140.589 111.379) (width 0.2) (layer Composant) (net 11)) - (segment (start 136.652 116.7765) (end 138.8745 116.7765) (width 0.2) (layer Composant) (net 11) (status 800)) - (segment (start 138.8745 116.7765) (end 139.446 116.205) (width 0.2) (layer Composant) (net 11)) - (via (at 142.621 116.205) (size 0.635) (layers Composant Cuivre) (net 11)) - (segment (start 141.224 114.554) (end 140.589 113.919) (width 0.2) (layer Composant) (net 11)) - (via (at 139.446 116.205) (size 0.635) (layers Composant Cuivre) (net 11)) - (segment (start 127.635 102.489) (end 126.492 102.489) (width 0.254) (layer Composant) (net 12) (status 800)) - (segment (start 118.11 99.949) (end 116.586 98.425) (width 0.254) (layer Composant) (net 12)) - (segment (start 116.586 98.425) (end 115.062 98.425) (width 0.254) (layer Composant) (net 12) (status 400)) - (segment (start 115.062 98.425) (end 113.792 97.155) (width 0.254) (layer Composant) (net 12) (status 800)) - (segment (start 113.792 97.155) (end 108.966 97.155) (width 0.254) (layer Composant) (net 12)) - (segment (start 108.966 97.155) (end 107.188 98.933) (width 0.254) (layer Composant) (net 12)) - (segment (start 107.188 98.933) (end 104.8385 98.933) (width 0.254) (layer Composant) (net 12) (status 400)) - (segment (start 123.19 100.965) (end 122.174 99.949) (width 0.254) (layer Composant) (net 12)) - (segment (start 122.174 99.949) (end 118.11 99.949) (width 0.254) (layer Composant) (net 12)) - (segment (start 123.19 101.981) (end 123.19 100.965) (width 0.254) (layer Composant) (net 12)) - (segment (start 123.444 102.235) (end 123.19 101.981) (width 0.254) (layer Composant) (net 12)) - (segment (start 126.238 102.235) (end 123.444 102.235) (width 0.254) (layer Composant) (net 12)) - (segment (start 126.492 102.489) (end 126.238 102.235) (width 0.254) (layer Composant) (net 12)) - (segment (start 126.492 101.727) (end 124.587 101.727) (width 0.254) (layer Composant) (net 13)) - (segment (start 122.809 99.949) (end 122.809 99.695) (width 0.254) (layer Composant) (net 13)) - (segment (start 106.934 96.647) (end 104.8385 96.647) (width 0.254) (layer Composant) (net 13) (status 400)) - (segment (start 108.966 94.615) (end 106.934 96.647) (width 0.254) (layer Composant) (net 13)) - (segment (start 113.792 94.615) (end 108.966 94.615) (width 0.254) (layer Composant) (net 13)) - (segment (start 115.062 95.885) (end 113.792 94.615) (width 0.254) (layer Composant) (net 13) (status 800)) - (segment (start 118.618 99.441) (end 115.062 95.885) (width 0.254) (layer Composant) (net 13) (status 400)) - (segment (start 122.555 99.441) (end 118.618 99.441) (width 0.254) (layer Composant) (net 13)) - (segment (start 122.809 99.695) (end 122.555 99.441) (width 0.254) (layer Composant) (net 13)) - (segment (start 124.587 101.727) (end 122.809 99.949) (width 0.254) (layer Composant) (net 13)) - (segment (start 126.746 101.981) (end 126.492 101.727) (width 0.254) (layer Composant) (net 13)) - (segment (start 127.635 101.981) (end 126.746 101.981) (width 0.254) (layer Composant) (net 13) (status 800)) - (segment (start 122.936 103.632) (end 122.682 103.886) (width 0.254) (layer Cuivre) (net 14)) - (segment (start 122.682 103.886) (end 120.523 103.886) (width 0.254) (layer Cuivre) (net 14)) - (via (at 84.836 108.585) (size 0.635) (layers Composant Cuivre) (net 14)) - (via (at 146.558 107.95) (size 0.889) (layers Composant Cuivre) (net 14)) - (segment (start 81.788 111.633) (end 84.836 108.585) (width 0.254) (layer GND_layer) (net 14)) - (segment (start 81.788 125.984) (end 81.788 111.633) (width 0.254) (layer GND_layer) (net 14)) - (segment (start 79.883 127.889) (end 81.788 125.984) (width 0.254) (layer GND_layer) (net 14)) - (segment (start 77.597 127.889) (end 79.883 127.889) (width 0.254) (layer GND_layer) (net 14)) - (segment (start 76.327 129.159) (end 77.597 127.889) (width 0.254) (layer GND_layer) (net 14) (status 800)) - (segment (start 145.796 107.95) (end 146.558 107.95) (width 0.254) (layer Composant) (net 14)) - (segment (start 144.907 107.061) (end 145.796 107.95) (width 0.254) (layer Composant) (net 14)) - (segment (start 144.78 106.9594) (end 144.907 107.061) (width 0.254) (layer Composant) (net 14)) - (segment (start 143.129 106.9594) (end 144.78 106.9594) (width 0.254) (layer Composant) (net 14) (status 800)) - (segment (start 85.725 107.696) (end 84.836 108.585) (width 0.254) (layer Cuivre) (net 14)) - (segment (start 106.299 107.696) (end 85.725 107.696) (width 0.254) (layer Cuivre) (net 14)) - (segment (start 120.523 103.886) (end 119.888 103.251) (width 0.254) (layer Cuivre) (net 14)) - (segment (start 119.888 103.251) (end 116.84 103.251) (width 0.254) (layer Cuivre) (net 14)) - (segment (start 116.84 103.251) (end 116.205 103.886) (width 0.254) (layer Cuivre) (net 14)) - (segment (start 116.205 103.886) (end 116.205 105.664) (width 0.254) (layer Cuivre) (net 14)) - (segment (start 116.205 105.664) (end 115.824 106.045) (width 0.254) (layer Cuivre) (net 14)) - (segment (start 115.824 106.045) (end 107.95 106.045) (width 0.254) (layer Cuivre) (net 14)) - (segment (start 107.95 106.045) (end 106.299 107.696) (width 0.254) (layer Cuivre) (net 14)) - (segment (start 132.842 103.632) (end 122.936 103.632) (width 0.254) (layer Cuivre) (net 14)) - (segment (start 133.477 102.997) (end 132.842 103.632) (width 0.254) (layer Cuivre) (net 14)) - (segment (start 134.493 102.997) (end 133.477 102.997) (width 0.254) (layer Cuivre) (net 14)) - (segment (start 135.509 104.013) (end 134.493 102.997) (width 0.254) (layer Cuivre) (net 14)) - (segment (start 137.16 104.013) (end 135.509 104.013) (width 0.254) (layer Cuivre) (net 14)) - (segment (start 144.653 107.95) (end 144.526 107.823) (width 0.254) (layer Cuivre) (net 14)) - (segment (start 144.526 107.823) (end 140.97 107.823) (width 0.254) (layer Cuivre) (net 14)) - (segment (start 140.97 107.823) (end 137.16 104.013) (width 0.254) (layer Cuivre) (net 14)) - (segment (start 146.558 107.95) (end 144.653 107.95) (width 0.254) (layer Cuivre) (net 14)) - (segment (start 106.045 107.188) (end 85.217 107.188) (width 0.254) (layer Cuivre) (net 15)) - (via (at 83.82 108.585) (size 0.635) (layers Composant Cuivre) (net 15)) - (segment (start 136.017 102.108) (end 128.651 102.108) (width 0.254) (layer Cuivre) (net 15)) - (segment (start 128.651 102.108) (end 127.381 100.838) (width 0.254) (layer Cuivre) (net 15)) - (segment (start 127.381 100.838) (end 118.237 100.838) (width 0.254) (layer Cuivre) (net 15)) - (segment (start 118.237 100.838) (end 115.57 103.505) (width 0.254) (layer Cuivre) (net 15)) - (segment (start 115.57 103.505) (end 109.728 103.505) (width 0.254) (layer Cuivre) (net 15)) - (segment (start 140.7795 106.8705) (end 141.097 107.188) (width 0.254) (layer Cuivre) (net 15)) - (segment (start 145.034 107.188) (end 145.542 106.68) (width 0.254) (layer Cuivre) (net 15)) - (segment (start 141.097 107.188) (end 145.034 107.188) (width 0.254) (layer Cuivre) (net 15)) - (segment (start 140.7795 106.8705) (end 136.017 102.108) (width 0.254) (layer Cuivre) (net 15)) - (via (at 146.558 106.68) (size 0.889) (layers Composant Cuivre) (net 15)) - (segment (start 146.558 106.68) (end 145.542 106.68) (width 0.254) (layer Cuivre) (net 15)) - (segment (start 143.129 106.4768) (end 145.2118 106.4768) (width 0.254) (layer Composant) (net 15) (status 800)) - (segment (start 145.2118 106.4768) (end 145.415 106.68) (width 0.254) (layer Composant) (net 15)) - (segment (start 145.415 106.68) (end 146.558 106.68) (width 0.254) (layer Composant) (net 15)) - (segment (start 80.01 126.619) (end 78.867 126.619) (width 0.254) (layer GND_layer) (net 15) (status 400)) - (segment (start 81.28 125.349) (end 80.01 126.619) (width 0.254) (layer GND_layer) (net 15)) - (segment (start 81.28 111.125) (end 81.28 125.349) (width 0.254) (layer GND_layer) (net 15)) - (segment (start 83.82 108.585) (end 81.28 111.125) (width 0.254) (layer GND_layer) (net 15)) - (segment (start 85.217 107.188) (end 83.82 108.585) (width 0.254) (layer Cuivre) (net 15)) - (segment (start 109.728 103.505) (end 106.045 107.188) (width 0.254) (layer Cuivre) (net 15)) - (segment (start 131.572 100.203) (end 136.779 100.203) (width 0.254) (layer Cuivre) (net 16)) - (segment (start 105.283 105.664) (end 83.566 105.664) (width 0.254) (layer Cuivre) (net 16)) - (segment (start 139.827 103.378) (end 139.827 102.743) (width 0.254) (layer Composant) (net 16)) - (segment (start 83.566 105.664) (end 81.788 107.442) (width 0.254) (layer Cuivre) (net 16)) - (via (at 139.827 102.743) (size 0.889) (layers Composant Cuivre) (net 16)) - (segment (start 81.788 107.442) (end 81.788 108.585) (width 0.254) (layer Cuivre) (net 16)) - (segment (start 81.788 108.585) (end 80.772 109.601) (width 0.254) (layer GND_layer) (net 16)) - (segment (start 80.772 109.601) (end 80.772 124.206) (width 0.254) (layer GND_layer) (net 16)) - (segment (start 80.772 124.206) (end 79.629 125.349) (width 0.254) (layer GND_layer) (net 16)) - (segment (start 79.629 125.349) (end 77.597 125.349) (width 0.254) (layer GND_layer) (net 16)) - (segment (start 77.597 125.349) (end 76.327 126.619) (width 0.254) (layer GND_layer) (net 16) (status 400)) - (segment (start 110.871 100.076) (end 105.283 105.664) (width 0.254) (layer Cuivre) (net 16)) - (via (at 81.788 108.585) (size 0.635) (layers Composant Cuivre) (net 16)) - (segment (start 136.779 100.203) (end 138.811 102.235) (width 0.254) (layer Cuivre) (net 16)) - (segment (start 141.351 103.98252) (end 143.129 103.9622) (width 0.254) (layer Composant) (net 16) (status 400)) - (segment (start 131.572 100.203) (end 129.667 98.298) (width 0.254) (layer Cuivre) (net 16)) - (segment (start 129.667 98.298) (end 127.762 98.298) (width 0.254) (layer Cuivre) (net 16)) - (segment (start 127.762 98.298) (end 126.111 96.647) (width 0.254) (layer Cuivre) (net 16)) - (segment (start 126.111 96.647) (end 120.142 96.647) (width 0.254) (layer Cuivre) (net 16)) - (segment (start 120.142 96.647) (end 116.713 100.076) (width 0.254) (layer Cuivre) (net 16)) - (segment (start 116.713 100.076) (end 110.871 100.076) (width 0.254) (layer Cuivre) (net 16)) - (segment (start 139.065 102.489) (end 139.573 102.489) (width 0.254) (layer Cuivre) (net 16)) - (segment (start 139.573 102.489) (end 139.827 102.743) (width 0.254) (layer Cuivre) (net 16)) - (segment (start 141.351 103.98252) (end 140.43152 103.98252) (width 0.254) (layer Composant) (net 16)) - (segment (start 138.811 102.235) (end 139.065 102.489) (width 0.254) (layer Cuivre) (net 16)) - (segment (start 140.43152 103.98252) (end 139.827 103.378) (width 0.254) (layer Composant) (net 16)) - (segment (start 142.367 101.854) (end 142.367 102.87) (width 0.254) (layer Cuivre) (net 17)) - (via (at 140.97 103.124) (size 0.889) (layers Composant Cuivre) (net 17)) - (segment (start 142.113 103.124) (end 140.97 103.124) (width 0.254) (layer Cuivre) (net 17)) - (segment (start 142.367 102.87) (end 142.113 103.124) (width 0.254) (layer Cuivre) (net 17)) - (segment (start 141.4145 100.9015) (end 142.367 101.854) (width 0.254) (layer Cuivre) (net 17)) - (segment (start 80.264 106.68) (end 82.296 104.648) (width 0.254) (layer Cuivre) (net 17)) - (segment (start 82.296 104.648) (end 104.775 104.648) (width 0.254) (layer Cuivre) (net 17)) - (segment (start 104.775 104.648) (end 110.998 98.425) (width 0.254) (layer Cuivre) (net 17)) - (segment (start 110.998 98.425) (end 110.998 97.663) (width 0.254) (layer Cuivre) (net 17)) - (segment (start 80.264 108.585) (end 80.264 122.682) (width 0.254) (layer GND_layer) (net 17)) - (segment (start 110.998 97.663) (end 111.506 97.155) (width 0.254) (layer Cuivre) (net 17)) - (segment (start 118.11 97.155) (end 119.634 95.631) (width 0.254) (layer Cuivre) (net 17)) - (segment (start 119.634 95.631) (end 126.619 95.631) (width 0.254) (layer Cuivre) (net 17)) - (segment (start 132.207 99.06) (end 137.541 99.06) (width 0.254) (layer Cuivre) (net 17)) - (segment (start 130.429 97.282) (end 132.207 99.06) (width 0.254) (layer Cuivre) (net 17)) - (segment (start 128.27 97.282) (end 130.429 97.282) (width 0.254) (layer Cuivre) (net 17)) - (segment (start 126.619 95.631) (end 128.27 97.282) (width 0.254) (layer Cuivre) (net 17)) - (segment (start 141.4145 100.9015) (end 139.3825 100.9015) (width 0.254) (layer Cuivre) (net 17)) - (segment (start 139.3825 100.9015) (end 137.541 99.06) (width 0.254) (layer Cuivre) (net 17)) - (segment (start 111.506 97.155) (end 118.11 97.155) (width 0.254) (layer Cuivre) (net 17)) - (segment (start 140.97 103.124) (end 141.3002 103.4542) (width 0.254) (layer Composant) (net 17)) - (segment (start 80.264 108.585) (end 80.264 106.68) (width 0.254) (layer Cuivre) (net 17)) - (via (at 80.264 108.585) (size 0.635) (layers Composant Cuivre) (net 17)) - (segment (start 80.264 122.682) (end 78.867 124.079) (width 0.254) (layer GND_layer) (net 17) (status 400)) - (segment (start 141.3002 103.4542) (end 143.129 103.4796) (width 0.254) (layer Composant) (net 17) (status 400)) - (segment (start 78.867 108.839) (end 79.756 109.347) (width 0.254) (layer Cuivre) (net 18) (status 800)) - (segment (start 140.9065 101.7905) (end 140.97 101.854) (width 0.254) (layer Cuivre) (net 18)) - (segment (start 79.756 109.347) (end 80.518 109.347) (width 0.254) (layer Cuivre) (net 18)) - (segment (start 81.026 108.839) (end 81.026 106.807) (width 0.254) (layer Cuivre) (net 18)) - (segment (start 81.026 106.807) (end 82.677 105.156) (width 0.254) (layer Cuivre) (net 18)) - (segment (start 82.677 105.156) (end 105.029 105.156) (width 0.254) (layer Cuivre) (net 18)) - (segment (start 105.029 105.156) (end 110.617 99.568) (width 0.254) (layer Cuivre) (net 18)) - (segment (start 110.617 99.568) (end 116.459 99.568) (width 0.254) (layer Cuivre) (net 18)) - (segment (start 116.459 99.568) (end 119.888 96.139) (width 0.254) (layer Cuivre) (net 18)) - (segment (start 82.3595 106.553) (end 81.153 106.553) (width 0.4318) (layer Composant) (net 18) (status 800)) - (segment (start 126.365 96.139) (end 128.016 97.79) (width 0.254) (layer Cuivre) (net 18)) - (segment (start 128.016 97.79) (end 130.175 97.79) (width 0.254) (layer Cuivre) (net 18)) - (segment (start 130.175 97.79) (end 131.953 99.568) (width 0.254) (layer Cuivre) (net 18)) - (segment (start 131.953 99.568) (end 137.033 99.568) (width 0.254) (layer Cuivre) (net 18)) - (segment (start 80.518 109.347) (end 81.026 108.839) (width 0.254) (layer Cuivre) (net 18)) - (segment (start 81.153 106.553) (end 80.645 107.061) (width 0.4318) (layer Composant) (net 18)) - (segment (start 78.867 108.839) (end 80.645 107.061) (width 0.381) (layer Composant) (net 18) (status 800)) - (via (at 140.97 101.854) (size 0.889) (layers Composant Cuivre) (net 18)) - (segment (start 140.9065 101.7905) (end 139.2555 101.7905) (width 0.254) (layer Cuivre) (net 18)) - (segment (start 119.888 96.139) (end 126.365 96.139) (width 0.254) (layer Cuivre) (net 18)) - (segment (start 139.2555 101.7905) (end 137.033 99.568) (width 0.254) (layer Cuivre) (net 18)) - (segment (start 142.0876 102.9716) (end 143.129 102.9716) (width 0.254) (layer Composant) (net 18) (status 400)) - (segment (start 140.97 101.854) (end 142.0876 102.9716) (width 0.254) (layer Composant) (net 18)) - (segment (start 128.143 100.33) (end 129.159 101.346) (width 0.254) (layer Cuivre) (net 19)) - (segment (start 117.221 101.092) (end 117.983 100.33) (width 0.254) (layer Cuivre) (net 19)) - (segment (start 117.983 100.33) (end 128.143 100.33) (width 0.254) (layer Cuivre) (net 19)) - (segment (start 140.716 105.664) (end 140.97 105.918) (width 0.254) (layer Cuivre) (net 19)) - (segment (start 136.398 101.346) (end 140.716 105.664) (width 0.254) (layer Cuivre) (net 19)) - (segment (start 82.3595 119.126) (end 82.3595 117.4115) (width 0.4318) (layer Composant) (net 19) (status 800)) - (segment (start 142.0114 105.9942) (end 143.129 105.9688) (width 0.254) (layer Composant) (net 19) (status 400)) - (segment (start 129.159 101.346) (end 136.398 101.346) (width 0.254) (layer Cuivre) (net 19)) - (via (at 141.478 106.426) (size 0.889) (layers Composant Cuivre) (net 19)) - (segment (start 141.478 106.426) (end 141.9352 105.9688) (width 0.254) (layer Composant) (net 19)) - (segment (start 141.9352 105.9688) (end 143.129 105.9688) (width 0.254) (layer Composant) (net 19) (status 400)) - (segment (start 140.716 105.664) (end 141.478 106.426) (width 0.254) (layer Cuivre) (net 19)) - (segment (start 83.058 107.95) (end 84.328 106.68) (width 0.254) (layer Cuivre) (net 19)) - (segment (start 82.3595 117.4115) (end 78.867 113.919) (width 0.4318) (layer Composant) (net 19) (status 400)) - (segment (start 78.867 113.919) (end 79.248 113.03) (width 0.254) (layer Cuivre) (net 19) (status 800)) - (segment (start 79.248 113.03) (end 83.058 109.22) (width 0.254) (layer Cuivre) (net 19)) - (segment (start 83.058 109.22) (end 83.058 107.95) (width 0.254) (layer Cuivre) (net 19)) - (segment (start 84.328 106.68) (end 105.791 106.68) (width 0.254) (layer Cuivre) (net 19)) - (segment (start 105.791 106.68) (end 111.379 101.092) (width 0.254) (layer Cuivre) (net 19)) - (segment (start 111.379 101.092) (end 117.221 101.092) (width 0.254) (layer Cuivre) (net 19)) - (segment (start 105.537 106.172) (end 84.074 106.172) (width 0.254) (layer Cuivre) (net 20)) - (segment (start 84.074 106.172) (end 82.55 107.696) (width 0.254) (layer Cuivre) (net 20)) - (segment (start 82.55 107.696) (end 82.55 108.839) (width 0.254) (layer Cuivre) (net 20)) - (segment (start 82.55 108.839) (end 81.28 110.109) (width 0.254) (layer Cuivre) (net 20)) - (segment (start 81.28 110.109) (end 78.232 110.109) (width 0.254) (layer Cuivre) (net 20)) - (segment (start 78.232 110.109) (end 77.597 110.744) (width 0.254) (layer Cuivre) (net 20)) - (segment (start 77.597 110.744) (end 77.597 115.189) (width 0.254) (layer Cuivre) (net 20)) - (segment (start 77.597 115.189) (end 78.867 116.459) (width 0.254) (layer Cuivre) (net 20) (status 400)) - (segment (start 78.867 116.459) (end 80.391 117.983) (width 0.381) (layer Composant) (net 20) (status 800)) - (segment (start 80.391 117.983) (end 80.391 120.269) (width 0.381) (layer Composant) (net 20)) - (segment (start 82.3595 121.412) (end 81.534 121.412) (width 0.4318) (layer Composant) (net 20) (status 800)) - (segment (start 81.534 121.412) (end 80.391 120.269) (width 0.4318) (layer Composant) (net 20)) - (segment (start 141.478 105.283) (end 142.0114 105.4862) (width 0.254) (layer Composant) (net 20)) - (segment (start 142.0114 105.4862) (end 143.129 105.4608) (width 0.254) (layer Composant) (net 20) (status 400)) - (via (at 141.478 105.283) (size 0.635) (layers Composant Cuivre) (net 20)) - (segment (start 116.967 100.584) (end 111.125 100.584) (width 0.254) (layer Cuivre) (net 20)) - (segment (start 141.478 105.283) (end 140.97 105.156) (width 0.254) (layer Cuivre) (net 20)) - (segment (start 136.652 100.838) (end 140.97 105.156) (width 0.254) (layer Cuivre) (net 20)) - (segment (start 129.54 100.838) (end 136.652 100.838) (width 0.254) (layer Cuivre) (net 20)) - (segment (start 129.54 100.838) (end 125.857 97.155) (width 0.254) (layer Cuivre) (net 20)) - (segment (start 111.125 100.584) (end 105.537 106.172) (width 0.254) (layer Cuivre) (net 20)) - (segment (start 125.857 97.155) (end 120.396 97.155) (width 0.254) (layer Cuivre) (net 20)) - (segment (start 120.396 97.155) (end 116.967 100.584) (width 0.254) (layer Cuivre) (net 20)) - (segment (start 103.251 101.727) (end 103.251 103.886) (width 0.254) (layer GND_layer) (net 21)) - (segment (start 102.235 103.886) (end 102.235 102.743) (width 0.381) (layer Composant) (net 21)) - (segment (start 102.235 102.743) (end 103.378 101.6) (width 0.381) (layer Composant) (net 21)) - (segment (start 103.378 101.6) (end 104.013 101.6) (width 0.381) (layer Composant) (net 21)) - (segment (start 104.013 101.6) (end 103.378 101.6) (width 0.254) (layer GND_layer) (net 21)) - (segment (start 103.378 101.6) (end 103.251 101.727) (width 0.254) (layer GND_layer) (net 21)) - (segment (start 99.06 107.061) (end 102.235 103.886) (width 0.381) (layer Composant) (net 21)) - (segment (start 103.251 103.886) (end 104.267 104.902) (width 0.254) (layer GND_layer) (net 21)) - (segment (start 104.267 104.902) (end 104.267 137.922) (width 0.254) (layer GND_layer) (net 21)) - (segment (start 104.267 137.922) (end 109.093 142.748) (width 0.254) (layer GND_layer) (net 21)) - (segment (start 109.093 142.748) (end 140.462 142.748) (width 0.254) (layer GND_layer) (net 21)) - (segment (start 140.462 142.748) (end 143.764 139.446) (width 0.254) (layer GND_layer) (net 21) (status 400)) - (segment (start 127.635 100.4824) (end 128.905 100.457) (width 0.254) (layer Composant) (net 21) (status 800)) - (segment (start 128.905 100.457) (end 130.048 99.314) (width 0.254) (layer Composant) (net 21)) - (segment (start 130.048 95.25) (end 130.048 94.996) (width 0.254) (layer Cuivre) (net 21)) - (segment (start 130.048 94.996) (end 126.238 91.186) (width 0.254) (layer Cuivre) (net 21)) - (segment (start 126.238 91.186) (end 110.744 91.186) (width 0.254) (layer Cuivre) (net 21)) - (segment (start 110.744 91.186) (end 108.966 92.964) (width 0.254) (layer Cuivre) (net 21)) - (segment (start 130.048 99.314) (end 130.048 95.25) (width 0.254) (layer Composant) (net 21)) - (segment (start 108.966 92.964) (end 108.966 97.155) (width 0.254) (layer Cuivre) (net 21)) - (segment (start 108.966 97.155) (end 104.521 101.6) (width 0.254) (layer Cuivre) (net 21)) - (segment (start 104.521 101.6) (end 104.013 101.6) (width 0.254) (layer Cuivre) (net 21)) - (via (at 104.013 101.6) (size 0.635) (layers Composant Cuivre) (net 21)) - (via (at 130.048 95.25) (size 0.635) (layers Composant Cuivre) (net 21)) - (segment (start 99.06 114.808) (end 99.06 107.061) (width 0.381) (layer Composant) (net 21)) - (segment (start 98.806 115.062) (end 99.06 114.808) (width 0.381) (layer Composant) (net 21)) - (segment (start 97.409 115.062) (end 98.806 115.062) (width 0.381) (layer Composant) (net 21) (status 800)) - (segment (start 130.937 95.25) (end 130.937 95.758) (width 0.254) (layer Cuivre) (net 22)) - (segment (start 138.43 142.24) (end 109.347 142.24) (width 0.254) (layer GND_layer) (net 22)) - (segment (start 109.347 142.24) (end 104.775 137.668) (width 0.254) (layer GND_layer) (net 22)) - (segment (start 104.775 137.668) (end 104.775 104.14) (width 0.254) (layer GND_layer) (net 22)) - (segment (start 104.775 104.14) (end 104.013 103.378) (width 0.254) (layer GND_layer) (net 22)) - (segment (start 127.635 100.9904) (end 129.159 100.965) (width 0.254) (layer Composant) (net 22) (status 800)) - (segment (start 129.159 100.965) (end 130.937 99.187) (width 0.254) (layer Composant) (net 22)) - (segment (start 141.224 139.446) (end 138.43 142.24) (width 0.254) (layer GND_layer) (net 22) (status 800)) - (segment (start 99.822 107.569) (end 104.013 103.378) (width 0.381) (layer Composant) (net 22)) - (segment (start 99.822 117.729) (end 99.822 107.569) (width 0.381) (layer Composant) (net 22)) - (segment (start 98.679 118.872) (end 99.822 117.729) (width 0.381) (layer Composant) (net 22)) - (segment (start 97.409 118.872) (end 98.679 118.872) (width 0.381) (layer Composant) (net 22) (status 800)) - (via (at 104.013 103.378) (size 0.635) (layers Composant Cuivre) (net 22)) - (segment (start 130.683 96.012) (end 128.905 96.012) (width 0.254) (layer Cuivre) (net 22)) - (segment (start 104.521 103.378) (end 104.013 103.378) (width 0.254) (layer Cuivre) (net 22)) - (segment (start 109.982 97.917) (end 104.521 103.378) (width 0.254) (layer Cuivre) (net 22)) - (segment (start 109.982 93.472) (end 109.982 97.917) (width 0.254) (layer Cuivre) (net 22)) - (segment (start 130.937 99.187) (end 130.937 95.25) (width 0.254) (layer Composant) (net 22)) - (segment (start 111.252 92.202) (end 109.982 93.472) (width 0.254) (layer Cuivre) (net 22)) - (segment (start 125.73 92.202) (end 111.252 92.202) (width 0.254) (layer Cuivre) (net 22)) - (segment (start 128.397 94.869) (end 125.73 92.202) (width 0.254) (layer Cuivre) (net 22)) - (segment (start 128.397 95.504) (end 128.397 94.869) (width 0.254) (layer Cuivre) (net 22)) - (segment (start 128.905 96.012) (end 128.397 95.504) (width 0.254) (layer Cuivre) (net 22)) - (via (at 130.937 95.25) (size 0.635) (layers Composant Cuivre) (net 22)) - (segment (start 130.937 95.758) (end 130.683 96.012) (width 0.254) (layer Cuivre) (net 22)) - (segment (start 129.159 95.25) (end 129.159 94.869) (width 0.254) (layer Cuivre) (net 23)) - (segment (start 129.159 94.869) (end 125.984 91.694) (width 0.254) (layer Cuivre) (net 23)) - (segment (start 125.984 91.694) (end 110.998 91.694) (width 0.254) (layer Cuivre) (net 23)) - (segment (start 110.998 91.694) (end 109.474 93.218) (width 0.254) (layer Cuivre) (net 23)) - (via (at 129.159 95.25) (size 0.635) (layers Composant Cuivre) (net 23)) - (via (at 104.013 102.489) (size 0.635) (layers Composant Cuivre) (net 23)) - (segment (start 104.775 102.489) (end 104.013 102.489) (width 0.381) (layer Composant) (net 23)) - (segment (start 105.283 102.997) (end 104.775 102.489) (width 0.381) (layer Composant) (net 23)) - (segment (start 105.283 115.062) (end 105.283 102.997) (width 0.381) (layer Composant) (net 23)) - (segment (start 104.013 116.332) (end 105.283 115.062) (width 0.381) (layer Composant) (net 23)) - (segment (start 102.743 116.332) (end 104.013 116.332) (width 0.381) (layer Composant) (net 23) (status 800)) - (segment (start 128.7272 97.9678) (end 127.635 97.9678) (width 0.254) (layer Composant) (net 23) (status 400)) - (segment (start 129.159 97.536) (end 128.7272 97.9678) (width 0.254) (layer Composant) (net 23)) - (segment (start 104.394 102.743) (end 104.013 102.489) (width 0.254) (layer GND_layer) (net 23)) - (segment (start 105.283 103.632) (end 104.394 102.743) (width 0.254) (layer GND_layer) (net 23)) - (segment (start 105.283 137.414) (end 105.283 103.632) (width 0.254) (layer GND_layer) (net 23)) - (segment (start 109.601 141.732) (end 105.283 137.414) (width 0.254) (layer GND_layer) (net 23)) - (segment (start 136.398 141.732) (end 109.601 141.732) (width 0.254) (layer GND_layer) (net 23)) - (segment (start 138.684 139.446) (end 136.398 141.732) (width 0.254) (layer GND_layer) (net 23) (status 800)) - (segment (start 104.521 102.489) (end 104.013 102.489) (width 0.254) (layer Cuivre) (net 23)) - (segment (start 109.474 97.536) (end 104.521 102.489) (width 0.254) (layer Cuivre) (net 23)) - (segment (start 109.474 93.218) (end 109.474 97.536) (width 0.254) (layer Cuivre) (net 23)) - (segment (start 129.159 95.25) (end 129.159 97.536) (width 0.254) (layer Composant) (net 23)) - (segment (start 105.791 102.362) (end 104.394 100.965) (width 0.254) (layer GND_layer) (net 24)) - (segment (start 110.49 90.678) (end 108.458 92.71) (width 0.254) (layer Cuivre) (net 24)) - (segment (start 122.428 90.678) (end 110.49 90.678) (width 0.254) (layer Cuivre) (net 24)) - (segment (start 122.936 90.043) (end 122.428 90.678) (width 0.254) (layer Cuivre) (net 24)) - (segment (start 121.412 91.821) (end 122.936 90.043) (width 0.254) (layer Composant) (net 24)) - (segment (start 121.412 94.234) (end 121.412 91.821) (width 0.254) (layer Composant) (net 24)) - (segment (start 125.1204 97.9424) (end 121.412 94.234) (width 0.254) (layer Composant) (net 24)) - (segment (start 126.0856 97.9424) (end 125.1204 97.9424) (width 0.254) (layer Composant) (net 24)) - (segment (start 126.619 98.4758) (end 126.0856 97.9424) (width 0.254) (layer Composant) (net 24)) - (via (at 122.936 90.043) (size 0.889) (layers Composant Cuivre) (net 24)) - (segment (start 104.394 100.965) (end 104.013 100.711) (width 0.254) (layer GND_layer) (net 24)) - (via (at 104.013 100.711) (size 0.635) (layers Composant Cuivre) (net 24)) - (segment (start 105.029 100.711) (end 104.013 100.711) (width 0.381) (layer Composant) (net 24)) - (segment (start 106.045 101.727) (end 105.029 100.711) (width 0.381) (layer Composant) (net 24)) - (segment (start 106.045 118.237) (end 106.045 101.727) (width 0.381) (layer Composant) (net 24)) - (segment (start 104.14 120.142) (end 106.045 118.237) (width 0.381) (layer Composant) (net 24)) - (segment (start 102.743 120.142) (end 104.14 120.142) (width 0.381) (layer Composant) (net 24) (status 800)) - (segment (start 108.458 96.266) (end 104.013 100.711) (width 0.254) (layer Cuivre) (net 24)) - (segment (start 108.458 92.71) (end 108.458 96.266) (width 0.254) (layer Cuivre) (net 24)) - (segment (start 105.791 137.16) (end 105.791 102.362) (width 0.254) (layer GND_layer) (net 24)) - (segment (start 109.855 141.224) (end 105.791 137.16) (width 0.254) (layer GND_layer) (net 24)) - (segment (start 134.366 141.224) (end 109.855 141.224) (width 0.254) (layer GND_layer) (net 24)) - (segment (start 136.144 139.446) (end 134.366 141.224) (width 0.254) (layer GND_layer) (net 24) (status 800)) - (segment (start 127.635 98.4758) (end 126.619 98.4758) (width 0.254) (layer Composant) (net 24) (status 800)) - (segment (start 132.8928 108.1278) (end 132.842 107.823) (width 0.254) (layer Composant) (net 25)) - (segment (start 132.8928 109.22) (end 132.8928 108.1278) (width 0.254) (layer Composant) (net 25) (status 800)) - (segment (start 133.731 105.41) (end 134.112 105.156) (width 0.254) (layer Composant) (net 25)) - (segment (start 123.444 136.906) (end 126.619 133.731) (width 0.254) (layer Cuivre) (net 25) (status 800)) - (segment (start 126.619 133.731) (end 133.858 133.731) (width 0.254) (layer Cuivre) (net 25)) - (segment (start 133.858 133.731) (end 134.493 134.366) (width 0.254) (layer Cuivre) (net 25)) - (segment (start 134.493 134.366) (end 134.493 135.001) (width 0.254) (layer Cuivre) (net 25)) - (segment (start 134.493 128.524) (end 131.953 125.984) (width 0.254) (layer GND_layer) (net 25)) - (segment (start 131.953 125.984) (end 131.953 107.315) (width 0.254) (layer GND_layer) (net 25)) - (segment (start 131.953 107.315) (end 133.223 106.045) (width 0.254) (layer GND_layer) (net 25)) - (segment (start 133.223 106.045) (end 133.223 105.537) (width 0.254) (layer GND_layer) (net 25)) - (segment (start 134.493 135.001) (end 134.493 128.524) (width 0.254) (layer GND_layer) (net 25)) - (segment (start 133.223 105.537) (end 133.604 105.156) (width 0.254) (layer GND_layer) (net 25)) - (segment (start 133.604 105.156) (end 134.112 105.156) (width 0.254) (layer GND_layer) (net 25)) - (via (at 134.493 135.001) (size 0.635) (layers Composant Cuivre) (net 25)) - (segment (start 132.842 106.299) (end 133.731 105.41) (width 0.254) (layer Composant) (net 25)) - (segment (start 132.842 107.823) (end 132.842 106.299) (width 0.254) (layer Composant) (net 25)) - (via (at 134.112 105.156) (size 0.635) (layers Composant Cuivre) (net 25)) - (segment (start 132.461 107.569) (end 132.461 125.73) (width 0.254) (layer GND_layer) (net 26)) - (via (at 134.112 106.045) (size 0.635) (layers Composant Cuivre) (net 26)) - (via (at 135.382 135.001) (size 0.635) (layers Composant Cuivre) (net 26)) - (segment (start 133.731 106.299) (end 133.3754 106.6546) (width 0.254) (layer Composant) (net 26)) - (segment (start 134.112 106.045) (end 133.731 106.299) (width 0.254) (layer Composant) (net 26)) - (segment (start 135.382 128.651) (end 135.382 135.001) (width 0.254) (layer GND_layer) (net 26)) - (segment (start 132.461 125.73) (end 135.382 128.651) (width 0.254) (layer GND_layer) (net 26)) - (segment (start 133.3754 106.6546) (end 133.3754 109.22) (width 0.254) (layer Composant) (net 26) (status 400)) - (segment (start 123.444 139.446) (end 122.174 138.176) (width 0.254) (layer Cuivre) (net 26) (status 800)) - (segment (start 122.174 138.176) (end 122.174 136.398) (width 0.254) (layer Cuivre) (net 26)) - (segment (start 122.174 136.398) (end 125.349 133.223) (width 0.254) (layer Cuivre) (net 26)) - (segment (start 125.349 133.223) (end 134.239 133.223) (width 0.254) (layer Cuivre) (net 26)) - (segment (start 134.239 133.223) (end 135.382 134.366) (width 0.254) (layer Cuivre) (net 26)) - (segment (start 135.382 134.366) (end 135.382 135.001) (width 0.254) (layer Cuivre) (net 26)) - (segment (start 134.112 106.045) (end 133.604 106.426) (width 0.254) (layer GND_layer) (net 26)) - (segment (start 133.604 106.426) (end 132.461 107.569) (width 0.254) (layer GND_layer) (net 26)) - (segment (start 134.3914 109.22) (end 134.3914 107.823) (width 0.254) (layer Composant) (net 27) (status 800)) - (segment (start 134.62 132.715) (end 136.271 134.366) (width 0.254) (layer Cuivre) (net 27)) - (segment (start 136.271 135.001) (end 136.271 128.778) (width 0.254) (layer GND_layer) (net 27)) - (via (at 134.112 106.934) (size 0.635) (layers Composant Cuivre) (net 27)) - (via (at 136.271 135.001) (size 0.635) (layers Composant Cuivre) (net 27)) - (segment (start 134.3914 107.823) (end 134.112 106.934) (width 0.254) (layer Composant) (net 27)) - (segment (start 136.271 128.778) (end 132.969 125.476) (width 0.254) (layer GND_layer) (net 27)) - (segment (start 136.271 134.366) (end 136.271 135.001) (width 0.254) (layer Cuivre) (net 27)) - (segment (start 125.095 132.715) (end 134.62 132.715) (width 0.254) (layer Cuivre) (net 27)) - (segment (start 120.904 136.906) (end 125.095 132.715) (width 0.254) (layer Cuivre) (net 27) (status 800)) - (segment (start 132.969 108.077) (end 134.112 106.934) (width 0.254) (layer GND_layer) (net 27)) - (segment (start 132.969 125.476) (end 132.969 108.077) (width 0.254) (layer GND_layer) (net 27)) - (segment (start 137.16 128.905) (end 133.477 125.222) (width 0.254) (layer GND_layer) (net 28)) - (segment (start 137.16 134.239) (end 137.16 135.001) (width 0.254) (layer Cuivre) (net 28)) - (segment (start 135.128 132.207) (end 137.16 134.239) (width 0.254) (layer Cuivre) (net 28)) - (segment (start 120.904 139.446) (end 119.634 138.176) (width 0.254) (layer Cuivre) (net 28) (status 800)) - (segment (start 119.634 138.176) (end 119.634 136.398) (width 0.254) (layer Cuivre) (net 28)) - (segment (start 119.634 136.398) (end 123.825 132.207) (width 0.254) (layer Cuivre) (net 28)) - (segment (start 123.825 132.207) (end 135.128 132.207) (width 0.254) (layer Cuivre) (net 28)) - (segment (start 137.16 135.001) (end 137.16 128.905) (width 0.254) (layer GND_layer) (net 28)) - (via (at 137.16 135.001) (size 0.635) (layers Composant Cuivre) (net 28)) - (via (at 135.001 106.934) (size 0.635) (layers Composant Cuivre) (net 28)) - (segment (start 134.874 107.569) (end 134.8994 109.22) (width 0.254) (layer Composant) (net 28) (status 400)) - (segment (start 135.001 106.934) (end 134.874 107.569) (width 0.254) (layer Composant) (net 28)) - (segment (start 135.001 108.077) (end 135.001 106.934) (width 0.254) (layer GND_layer) (net 28)) - (segment (start 133.477 109.601) (end 135.001 108.077) (width 0.254) (layer GND_layer) (net 28)) - (segment (start 133.477 125.222) (end 133.477 109.601) (width 0.254) (layer GND_layer) (net 28)) - (segment (start 143.764 136.906) (end 145.288 135.382) (width 0.254) (layer GND_layer) (net 29) (status 800)) - (segment (start 142.494 98.933) (end 143.891 97.536) (width 0.254) (layer Cuivre) (net 29)) - (segment (start 138.811 98.933) (end 142.494 98.933) (width 0.254) (layer Cuivre) (net 29)) - (via (at 138.811 98.933) (size 0.889) (layers Composant Cuivre) (net 29)) - (segment (start 147.955 114.173) (end 149.225 112.903) (width 0.254) (layer GND_layer) (net 29)) - (segment (start 138.811 98.933) (end 140.3604 100.4824) (width 0.254) (layer Composant) (net 29)) - (segment (start 168.783 107.823) (end 168.783 104.902) (width 0.4318) (layer Composant) (net 29)) - (segment (start 140.3604 100.4824) (end 141.2494 100.4824) (width 0.254) (layer Composant) (net 29)) - (via (at 150.495 99.06) (size 0.635) (layers Composant Cuivre) (net 29)) - (segment (start 176.149 108.077) (end 168.529 108.077) (width 0.4318) (layer Composant) (net 29) (status C00)) - (segment (start 167.259 110.49) (end 168.275 109.474) (width 0.381) (layer Composant) (net 29)) - (segment (start 167.259 115.57) (end 167.259 110.49) (width 0.381) (layer Composant) (net 29)) - (segment (start 168.275 108.331) (end 168.529 108.077) (width 0.4318) (layer Composant) (net 29) (status 400)) - (segment (start 168.275 109.474) (end 168.275 108.331) (width 0.4318) (layer Composant) (net 29)) - (segment (start 143.129 100.457) (end 141.2494 100.4824) (width 0.254) (layer Composant) (net 29) (status 800)) - (segment (start 149.733 99.06) (end 150.495 99.06) (width 0.254) (layer Cuivre) (net 29)) - (segment (start 148.209 97.536) (end 149.733 99.06) (width 0.254) (layer Cuivre) (net 29)) - (segment (start 149.225 100.203) (end 150.495 99.06) (width 0.254) (layer GND_layer) (net 29)) - (segment (start 147.701 114.173) (end 147.955 114.173) (width 0.254) (layer GND_layer) (net 29)) - (segment (start 145.288 116.586) (end 147.701 114.173) (width 0.254) (layer GND_layer) (net 29)) - (segment (start 168.529 108.077) (end 168.783 107.823) (width 0.4318) (layer Composant) (net 29) (status 800)) - (segment (start 150.622 99.441) (end 150.495 99.06) (width 0.381) (layer Composant) (net 29)) - (segment (start 150.876 99.695) (end 150.622 99.441) (width 0.381) (layer Composant) (net 29)) - (segment (start 160.528 99.695) (end 150.876 99.695) (width 0.381) (layer Composant) (net 29)) - (segment (start 163.449 96.774) (end 160.528 99.695) (width 0.381) (layer Composant) (net 29)) - (segment (start 166.751 96.774) (end 163.449 96.774) (width 0.381) (layer Composant) (net 29)) - (segment (start 167.259 97.282) (end 166.751 96.774) (width 0.381) (layer Composant) (net 29)) - (segment (start 167.259 103.378) (end 167.259 97.282) (width 0.381) (layer Composant) (net 29)) - (segment (start 168.783 104.902) (end 167.259 103.378) (width 0.381) (layer Composant) (net 29)) - (segment (start 168.7195 117.0305) (end 167.259 115.57) (width 0.4318) (layer Composant) (net 29)) - (segment (start 168.7195 117.094) (end 168.7195 117.0305) (width 0.4318) (layer Composant) (net 29) (status 800)) - (segment (start 145.288 135.382) (end 145.288 116.586) (width 0.254) (layer GND_layer) (net 29)) - (segment (start 149.225 112.903) (end 149.225 100.203) (width 0.254) (layer GND_layer) (net 29)) - (segment (start 143.891 97.536) (end 148.209 97.536) (width 0.254) (layer Cuivre) (net 29)) - (segment (start 148.717 112.649) (end 148.717 98.806) (width 0.254) (layer GND_layer) (net 30)) - (segment (start 148.717 98.806) (end 149.352 98.171) (width 0.254) (layer GND_layer) (net 30)) - (segment (start 149.352 98.171) (end 150.495 98.171) (width 0.254) (layer GND_layer) (net 30)) - (segment (start 176.276 119.761) (end 176.276 118.5545) (width 0.4318) (layer Composant) (net 30) (status 800)) - (segment (start 176.276 118.5545) (end 174.8155 117.094) (width 0.4318) (layer Composant) (net 30) (status 400)) - (segment (start 176.276 119.761) (end 168.656 119.761) (width 0.4318) (layer Composant) (net 30) (status C00)) - (via (at 150.495 98.171) (size 0.635) (layers Composant Cuivre) (net 30)) - (segment (start 150.495 98.171) (end 149.733 98.171) (width 0.254) (layer Cuivre) (net 30)) - (segment (start 138.811 97.282) (end 138.811 96.266) (width 0.254) (layer Composant) (net 30)) - (segment (start 138.811 96.266) (end 138.811 97.028) (width 0.254) (layer Cuivre) (net 30)) - (segment (start 142.621 97.917) (end 143.51 97.028) (width 0.254) (layer Cuivre) (net 30)) - (segment (start 139.7 97.917) (end 142.621 97.917) (width 0.254) (layer Cuivre) (net 30)) - (segment (start 138.811 97.028) (end 139.7 97.917) (width 0.254) (layer Cuivre) (net 30)) - (segment (start 160.909 100.457) (end 163.83 97.536) (width 0.381) (layer Composant) (net 30)) - (segment (start 163.83 97.536) (end 166.116 97.536) (width 0.381) (layer Composant) (net 30)) - (segment (start 147.32 113.665) (end 147.701 113.665) (width 0.254) (layer GND_layer) (net 30)) - (segment (start 147.701 113.665) (end 148.717 112.649) (width 0.254) (layer GND_layer) (net 30)) - (segment (start 150.495 100.457) (end 160.909 100.457) (width 0.381) (layer Composant) (net 30)) - (segment (start 144.78 116.205) (end 147.32 113.665) (width 0.254) (layer GND_layer) (net 30)) - (segment (start 144.78 133.35) (end 144.78 116.205) (width 0.254) (layer GND_layer) (net 30)) - (segment (start 141.224 136.906) (end 144.78 133.35) (width 0.254) (layer GND_layer) (net 30) (status 800)) - (segment (start 166.497 117.602) (end 168.656 119.761) (width 0.381) (layer Composant) (net 30) (status 400)) - (segment (start 149.987 98.171) (end 150.495 98.171) (width 0.254) (layer Composant) (net 30)) - (segment (start 166.116 97.536) (end 166.497 97.917) (width 0.381) (layer Composant) (net 30)) - (segment (start 149.733 98.425) (end 149.987 98.171) (width 0.254) (layer Composant) (net 30)) - (segment (start 149.733 99.695) (end 149.733 98.425) (width 0.254) (layer Composant) (net 30)) - (segment (start 150.495 100.457) (end 149.733 99.695) (width 0.254) (layer Composant) (net 30)) - (segment (start 149.733 98.171) (end 148.59 97.028) (width 0.254) (layer Cuivre) (net 30)) - (segment (start 143.51 97.028) (end 148.59 97.028) (width 0.254) (layer Cuivre) (net 30)) - (segment (start 166.497 108.331) (end 166.497 117.602) (width 0.381) (layer Composant) (net 30)) - (segment (start 168.021 106.807) (end 166.497 108.331) (width 0.381) (layer Composant) (net 30)) - (segment (start 168.021 105.283) (end 168.021 106.807) (width 0.381) (layer Composant) (net 30)) - (segment (start 166.497 103.759) (end 168.021 105.283) (width 0.381) (layer Composant) (net 30)) - (segment (start 166.497 97.917) (end 166.497 103.759) (width 0.381) (layer Composant) (net 30)) - (segment (start 138.811 97.282) (end 141.5034 99.9744) (width 0.254) (layer Composant) (net 30)) - (segment (start 141.5034 99.9744) (end 143.129 99.9744) (width 0.254) (layer Composant) (net 30) (status 400)) - (via (at 138.811 96.266) (size 0.889) (layers Composant Cuivre) (net 30)) - (segment (start 139.573 136.398) (end 144.272 131.699) (width 0.254) (layer GND_layer) (net 31)) - (segment (start 150.495 97.282) (end 151.0665 97.282) (width 0.254) (layer Composant) (net 31)) - (segment (start 140.335 96.139) (end 140.716 96.52) (width 0.254) (layer Composant) (net 31)) - (via (at 140.335 96.139) (size 0.889) (layers Composant Cuivre) (net 31)) - (segment (start 140.335 96.139) (end 140.335 96.774) (width 0.254) (layer Cuivre) (net 31)) - (segment (start 142.367 97.282) (end 143.129 96.52) (width 0.254) (layer Cuivre) (net 31)) - (segment (start 140.843 97.282) (end 142.367 97.282) (width 0.254) (layer Cuivre) (net 31)) - (segment (start 140.335 96.774) (end 140.843 97.282) (width 0.254) (layer Cuivre) (net 31)) - (segment (start 138.684 136.906) (end 139.573 136.398) (width 0.254) (layer GND_layer) (net 31) (status 800)) - (segment (start 144.272 131.699) (end 144.272 115.951) (width 0.254) (layer GND_layer) (net 31)) - (segment (start 144.272 115.951) (end 147.066 113.157) (width 0.254) (layer GND_layer) (net 31)) - (segment (start 147.066 113.157) (end 147.447 113.157) (width 0.254) (layer GND_layer) (net 31)) - (segment (start 147.447 113.157) (end 148.209 112.395) (width 0.254) (layer GND_layer) (net 31)) - (segment (start 148.209 112.395) (end 148.209 98.298) (width 0.254) (layer GND_layer) (net 31)) - (segment (start 148.209 98.298) (end 149.225 97.282) (width 0.254) (layer GND_layer) (net 31)) - (segment (start 149.225 97.282) (end 150.495 97.282) (width 0.254) (layer GND_layer) (net 31)) - (segment (start 150.495 97.282) (end 149.733 97.282) (width 0.254) (layer Cuivre) (net 31)) - (segment (start 148.971 96.52) (end 143.129 96.52) (width 0.254) (layer Cuivre) (net 31)) - (segment (start 149.733 97.282) (end 148.971 96.52) (width 0.254) (layer Cuivre) (net 31)) - (segment (start 151.0665 97.282) (end 152.0825 98.298) (width 0.254) (layer Composant) (net 31) (status 400)) - (segment (start 140.716 96.52) (end 140.716 97.663) (width 0.254) (layer Composant) (net 31)) - (segment (start 140.716 97.663) (end 141.5288 98.4758) (width 0.254) (layer Composant) (net 31)) - (segment (start 141.5288 98.4758) (end 143.129 98.4758) (width 0.254) (layer Composant) (net 31) (status 400)) - (via (at 150.495 97.282) (size 0.635) (layers Composant Cuivre) (net 31)) - (via (at 141.605 96.266) (size 0.889) (layers Composant Cuivre) (net 32)) - (segment (start 149.86 96.647) (end 149.225 97.282) (width 0.254) (layer Composant) (net 32)) - (via (at 150.495 96.393) (size 0.635) (layers Composant Cuivre) (net 32)) - (segment (start 150.495 96.393) (end 149.86 96.647) (width 0.254) (layer Composant) (net 32)) - (segment (start 141.7828 97.9678) (end 143.129 97.9678) (width 0.254) (layer Composant) (net 32) (status 400)) - (segment (start 141.605 97.79) (end 141.7828 97.9678) (width 0.254) (layer Composant) (net 32)) - (segment (start 141.605 96.266) (end 141.605 97.79) (width 0.254) (layer Composant) (net 32)) - (segment (start 150.876 96.012) (end 150.495 96.393) (width 0.254) (layer Composant) (net 32)) - (segment (start 152.0825 96.012) (end 150.876 96.012) (width 0.254) (layer Composant) (net 32) (status 800)) - (segment (start 149.733 96.393) (end 150.495 96.393) (width 0.254) (layer Cuivre) (net 32)) - (segment (start 149.225 95.885) (end 149.733 96.393) (width 0.254) (layer Cuivre) (net 32)) - (segment (start 141.986 95.885) (end 149.225 95.885) (width 0.254) (layer Cuivre) (net 32)) - (segment (start 149.098 96.393) (end 150.495 96.393) (width 0.254) (layer GND_layer) (net 32)) - (segment (start 147.701 97.79) (end 149.098 96.393) (width 0.254) (layer GND_layer) (net 32)) - (segment (start 147.701 112.014) (end 147.701 97.79) (width 0.254) (layer GND_layer) (net 32)) - (segment (start 143.764 131.318) (end 143.764 115.57) (width 0.254) (layer GND_layer) (net 32)) - (segment (start 147.066 112.649) (end 147.701 112.014) (width 0.254) (layer GND_layer) (net 32)) - (segment (start 146.685 112.649) (end 147.066 112.649) (width 0.254) (layer GND_layer) (net 32)) - (segment (start 143.764 115.57) (end 146.685 112.649) (width 0.254) (layer GND_layer) (net 32)) - (segment (start 149.225 97.282) (end 149.225 100.203) (width 0.254) (layer Composant) (net 32)) - (segment (start 149.225 100.203) (end 150.241 101.219) (width 0.254) (layer Composant) (net 32)) - (segment (start 150.241 101.219) (end 157.607 101.219) (width 0.381) (layer Composant) (net 32)) - (segment (start 157.607 101.219) (end 157.9245 101.5365) (width 0.381) (layer Composant) (net 32)) - (segment (start 157.9245 101.5365) (end 159.4485 101.5365) (width 0.381) (layer Composant) (net 32) (status 400)) - (segment (start 136.144 136.906) (end 137.287 135.763) (width 0.254) (layer GND_layer) (net 32) (status 800)) - (segment (start 137.287 135.763) (end 139.319 135.763) (width 0.254) (layer GND_layer) (net 32)) - (segment (start 139.319 135.763) (end 143.764 131.318) (width 0.254) (layer GND_layer) (net 32)) - (segment (start 141.986 95.885) (end 141.605 96.266) (width 0.254) (layer Cuivre) (net 32)) - (segment (start 119.1895 95.1865) (end 117.348 93.345) (width 0.4318) (layer Composant) (net 33)) - (segment (start 126.5174 95.2754) (end 127.635 95.4786) (width 0.254) (layer Composant) (net 33) (status 400)) - (segment (start 116.078 92.964) (end 115.062 93.345) (width 0.254) (layer Cuivre) (net 33) (status 400)) - (segment (start 117.348 93.345) (end 115.062 93.345) (width 0.4318) (layer Composant) (net 33) (status 400)) - (segment (start 125.603 93.345) (end 125.603 94.361) (width 0.254) (layer Composant) (net 33)) - (segment (start 125.476 92.964) (end 125.603 93.345) (width 0.254) (layer Composant) (net 33)) - (segment (start 125.476 92.964) (end 116.078 92.964) (width 0.254) (layer Cuivre) (net 33)) - (segment (start 125.603 94.361) (end 126.5174 95.2754) (width 0.254) (layer Composant) (net 33)) - (via (at 125.476 92.964) (size 0.635) (layers Composant Cuivre) (net 33)) - (segment (start 119.1895 97.282) (end 119.1895 95.1865) (width 0.4318) (layer Composant) (net 33) (status 800)) - (segment (start 80.01 113.919) (end 83.185 110.744) (width 0.254) (layer Cuivre) (net 34)) - (segment (start 111.506 111.125) (end 115.951 111.125) (width 0.254) (layer Cuivre) (net 34)) - (segment (start 80.01 117.348) (end 80.01 113.919) (width 0.254) (layer Cuivre) (net 34)) - (segment (start 79.629 117.729) (end 80.01 117.348) (width 0.254) (layer Cuivre) (net 34)) - (segment (start 75.438 117.729) (end 79.629 117.729) (width 0.254) (layer Cuivre) (net 34)) - (segment (start 74.676 118.491) (end 75.438 117.729) (width 0.254) (layer Cuivre) (net 34)) - (segment (start 74.676 122.428) (end 74.676 118.491) (width 0.254) (layer Cuivre) (net 34)) - (segment (start 76.327 124.079) (end 74.676 122.428) (width 0.254) (layer Cuivre) (net 34) (status 800)) - (segment (start 119.507 107.569) (end 127.127 107.569) (width 0.254) (layer Cuivre) (net 34)) - (segment (start 136.37768 106.40568) (end 135.89 105.918) (width 0.254) (layer Composant) (net 34)) - (segment (start 135.001 108.077) (end 135.89 107.188) (width 0.254) (layer Cuivre) (net 34)) - (segment (start 135.89 107.188) (end 135.89 105.918) (width 0.254) (layer Cuivre) (net 34)) - (via (at 135.89 105.918) (size 0.889) (layers Composant Cuivre) (net 34)) - (segment (start 127.127 107.569) (end 127.635 108.077) (width 0.254) (layer Cuivre) (net 34)) - (segment (start 136.37768 107.81792) (end 136.37768 106.40568) (width 0.254) (layer Composant) (net 34)) - (segment (start 115.951 111.125) (end 119.507 107.569) (width 0.254) (layer Cuivre) (net 34)) - (segment (start 136.398 109.22) (end 136.37768 107.81792) (width 0.254) (layer Composant) (net 34) (status 800)) - (segment (start 109.347 108.966) (end 111.506 111.125) (width 0.254) (layer Cuivre) (net 34)) - (segment (start 86.741 108.966) (end 109.347 108.966) (width 0.254) (layer Cuivre) (net 34)) - (segment (start 84.963 110.744) (end 86.741 108.966) (width 0.254) (layer Cuivre) (net 34)) - (segment (start 83.185 110.744) (end 84.963 110.744) (width 0.254) (layer Cuivre) (net 34)) - (segment (start 127.635 108.077) (end 135.001 108.077) (width 0.254) (layer Cuivre) (net 34)) - (segment (start 115.951 111.887) (end 119.761 108.077) (width 0.254) (layer Cuivre) (net 35)) - (segment (start 111.125 111.887) (end 115.951 111.887) (width 0.254) (layer Cuivre) (net 35)) - (segment (start 136.8806 105.9434) (end 136.906 105.918) (width 0.254) (layer Composant) (net 35)) - (segment (start 78.867 121.539) (end 80.518 119.888) (width 0.254) (layer Cuivre) (net 35) (status 800)) - (segment (start 80.518 119.888) (end 80.518 114.173) (width 0.254) (layer Cuivre) (net 35)) - (segment (start 80.518 114.173) (end 83.439 111.252) (width 0.254) (layer Cuivre) (net 35)) - (segment (start 83.439 111.252) (end 85.217 111.252) (width 0.254) (layer Cuivre) (net 35)) - (segment (start 85.217 111.252) (end 86.995 109.474) (width 0.254) (layer Cuivre) (net 35)) - (segment (start 86.995 109.474) (end 108.712 109.474) (width 0.254) (layer Cuivre) (net 35)) - (segment (start 108.712 109.474) (end 111.125 111.887) (width 0.254) (layer Cuivre) (net 35)) - (segment (start 119.761 108.077) (end 126.873 108.077) (width 0.254) (layer Cuivre) (net 35)) - (via (at 136.906 105.918) (size 0.635) (layers Composant Cuivre) (net 35)) - (segment (start 136.906 107.061) (end 136.906 105.918) (width 0.254) (layer Cuivre) (net 35)) - (segment (start 135.382 108.585) (end 136.906 107.061) (width 0.254) (layer Cuivre) (net 35)) - (segment (start 127.381 108.585) (end 135.382 108.585) (width 0.254) (layer Cuivre) (net 35)) - (segment (start 126.873 108.077) (end 127.381 108.585) (width 0.254) (layer Cuivre) (net 35)) - (segment (start 136.8806 109.22) (end 136.8806 105.9434) (width 0.254) (layer Composant) (net 35) (status 800)) - (segment (start 138.3792 109.22) (end 138.3792 107.9754) (width 0.254) (layer Composant) (net 36) (status 800)) - (segment (start 127.127 109.093) (end 126.619 108.585) (width 0.254) (layer Cuivre) (net 36)) - (segment (start 126.619 108.585) (end 120.015 108.585) (width 0.254) (layer Cuivre) (net 36)) - (segment (start 85.471 111.76) (end 83.693 111.76) (width 0.254) (layer Cuivre) (net 36)) - (segment (start 108.331 110.109) (end 110.871 112.649) (width 0.254) (layer Cuivre) (net 36)) - (segment (start 81.026 114.427) (end 81.026 121.285) (width 0.254) (layer Cuivre) (net 36)) - (segment (start 138.28014 106.82986) (end 138.43 106.68) (width 0.254) (layer Composant) (net 36)) - (segment (start 81.026 121.285) (end 79.502 122.809) (width 0.254) (layer Cuivre) (net 36)) - (segment (start 87.122 110.109) (end 85.471 111.76) (width 0.254) (layer Cuivre) (net 36)) - (segment (start 79.502 122.809) (end 77.597 122.809) (width 0.254) (layer Cuivre) (net 36)) - (segment (start 77.597 122.809) (end 76.327 121.539) (width 0.254) (layer Cuivre) (net 36) (status 400)) - (via (at 138.43 106.68) (size 0.635) (layers Composant Cuivre) (net 36)) - (segment (start 138.3792 107.9754) (end 138.28014 107.84078) (width 0.254) (layer Composant) (net 36)) - (segment (start 136.017 109.093) (end 127.127 109.093) (width 0.254) (layer Cuivre) (net 36)) - (segment (start 138.28014 107.84078) (end 138.28014 106.82986) (width 0.254) (layer Composant) (net 36)) - (segment (start 87.122 110.109) (end 108.331 110.109) (width 0.254) (layer Cuivre) (net 36)) - (segment (start 83.693 111.76) (end 81.026 114.427) (width 0.254) (layer Cuivre) (net 36)) - (segment (start 120.015 108.585) (end 115.951 112.649) (width 0.254) (layer Cuivre) (net 36)) - (segment (start 115.951 112.649) (end 110.871 112.649) (width 0.254) (layer Cuivre) (net 36)) - (segment (start 138.43 106.68) (end 136.017 109.093) (width 0.254) (layer Cuivre) (net 36)) - (segment (start 83.82 112.395) (end 85.598 112.395) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 76.835 122.809) (end 77.597 123.571) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 81.534 123.444) (end 81.534 114.681) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 79.629 125.349) (end 81.534 123.444) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 77.978 125.349) (end 79.629 125.349) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 78.867 118.999) (end 77.597 120.269) (width 0.254) (layer Cuivre) (net 37) (status 800)) - (via (at 139.065 107.442) (size 0.635) (layers Composant Cuivre) (net 37)) - (segment (start 138.8872 109.22) (end 138.8872 107.8992) (width 0.254) (layer Composant) (net 37) (status 800)) - (segment (start 136.779 109.728) (end 139.065 107.442) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 127 109.728) (end 136.779 109.728) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 81.534 114.681) (end 83.82 112.395) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 126.365 109.093) (end 127 109.728) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 120.269 109.093) (end 126.365 109.093) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 116.078 113.284) (end 120.269 109.093) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 110.49 113.284) (end 116.078 113.284) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 107.95 110.744) (end 110.49 113.284) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 87.249 110.744) (end 107.95 110.744) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 138.8872 107.8992) (end 139.065 107.442) (width 0.254) (layer Composant) (net 37)) - (segment (start 77.597 120.269) (end 75.819 120.269) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 75.819 120.269) (end 75.184 120.904) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 75.184 120.904) (end 75.184 122.174) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 75.184 122.174) (end 75.819 122.809) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 75.819 122.809) (end 76.835 122.809) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 85.598 112.395) (end 87.249 110.744) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 77.597 123.571) (end 77.597 124.968) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 77.597 124.968) (end 77.978 125.349) (width 0.254) (layer Cuivre) (net 37)) - (segment (start 163.957 129.413) (end 163.957 119.253) (width 0.254) (layer GND_layer) (net 38)) - (segment (start 137.16 90.424) (end 151.257 90.424) (width 0.254) (layer Cuivre) (net 38)) - (segment (start 151.257 90.424) (end 152.019 89.662) (width 0.254) (layer Cuivre) (net 38)) - (segment (start 133.604 93.98) (end 137.16 90.424) (width 0.254) (layer Cuivre) (net 38)) - (segment (start 152.019 89.662) (end 155.067 89.662) (width 0.254) (layer Cuivre) (net 38)) - (segment (start 155.067 89.662) (end 155.829 88.9) (width 0.254) (layer Cuivre) (net 38)) - (segment (start 131.8768 93.726) (end 131.8768 94.361) (width 0.254) (layer Composant) (net 38) (status 800)) - (via (at 131.826 96.393) (size 0.889) (layers Composant Cuivre) (net 38)) - (segment (start 131.826 96.393) (end 131.826 94.742) (width 0.254) (layer Cuivre) (net 38)) - (segment (start 162.687 116.586) (end 156.718 110.744) (width 0.254) (layer GND_layer) (net 38)) - (segment (start 156.718 110.744) (end 156.718 92.075) (width 0.254) (layer GND_layer) (net 38)) - (segment (start 156.718 92.075) (end 155.829 91.186) (width 0.254) (layer GND_layer) (net 38)) - (segment (start 162.687 117.983) (end 162.687 116.586) (width 0.254) (layer GND_layer) (net 38) (status 800)) - (segment (start 131.826 96.393) (end 131.826 94.361) (width 0.254) (layer Composant) (net 38)) - (segment (start 155.829 88.138) (end 155.829 88.9) (width 0.254) (layer Cuivre) (net 38)) - (via (at 155.829 88.138) (size 0.889) (layers Composant Cuivre) (net 38)) - (segment (start 163.957 119.253) (end 162.687 117.983) (width 0.254) (layer GND_layer) (net 38) (status 400)) - (segment (start 131.826 94.361) (end 131.8768 94.361) (width 0.254) (layer Composant) (net 38)) - (segment (start 156.464 136.906) (end 163.957 129.413) (width 0.254) (layer GND_layer) (net 38) (status 800)) - (segment (start 131.826 94.742) (end 132.588 93.98) (width 0.254) (layer Cuivre) (net 38)) - (segment (start 132.588 93.98) (end 133.604 93.98) (width 0.254) (layer Cuivre) (net 38)) - (segment (start 155.829 91.186) (end 155.829 88.138) (width 0.254) (layer GND_layer) (net 38)) - (segment (start 148.844 136.906) (end 154.686 131.064) (width 0.254) (layer GND_layer) (net 39) (status 800)) - (segment (start 137.0711 95.66656) (end 137.0711 96.9899) (width 0.254) (layer Cuivre) (net 39)) - (via (at 153.035 92.71) (size 0.635) (layers Composant Cuivre) (net 39)) - (segment (start 152.654 92.964) (end 153.035 92.71) (width 0.254) (layer Cuivre) (net 39)) - (segment (start 139.573 92.964) (end 152.654 92.964) (width 0.254) (layer Cuivre) (net 39)) - (segment (start 137.0711 95.66656) (end 139.573 92.964) (width 0.254) (layer Cuivre) (net 39)) - (segment (start 154.686 94.361) (end 153.035 92.71) (width 0.254) (layer GND_layer) (net 39)) - (segment (start 154.686 131.064) (end 154.686 94.361) (width 0.254) (layer GND_layer) (net 39)) - (via (at 136.271 97.282) (size 0.889) (layers Composant Cuivre) (net 39)) - (segment (start 135.88746 94.7547) (end 135.8646 93.726) (width 0.254) (layer Composant) (net 39) (status 400)) - (segment (start 136.271 97.282) (end 136.779 97.282) (width 0.254) (layer Cuivre) (net 39)) - (segment (start 136.779 97.282) (end 137.0711 96.9899) (width 0.254) (layer Cuivre) (net 39)) - (segment (start 136.271 97.282) (end 136.398 97.282) (width 0.254) (layer Composant) (net 39)) - (segment (start 135.88746 94.73946) (end 135.88746 94.7547) (width 0.254) (layer Composant) (net 39)) - (segment (start 136.779 95.631) (end 135.88746 94.73946) (width 0.254) (layer Composant) (net 39)) - (segment (start 136.779 96.901) (end 136.779 95.631) (width 0.254) (layer Composant) (net 39)) - (segment (start 136.398 97.282) (end 136.779 96.901) (width 0.254) (layer Composant) (net 39)) - (via (at 122.428 115.316) (size 0.889) (layers Composant Cuivre) (net 40)) - (segment (start 83.312 115.316) (end 83.312 134.112) (width 0.4318) (layer Composant) (net 40)) - (segment (start 93.853 116.459) (end 104.775 116.459) (width 0.4318) (layer Cuivre) (net 40)) - (segment (start 93.345 116.967) (end 93.853 116.459) (width 0.4318) (layer Cuivre) (net 40)) - (segment (start 85.09 116.967) (end 93.345 116.967) (width 0.4318) (layer Cuivre) (net 40)) - (segment (start 83.439 115.316) (end 85.09 116.967) (width 0.4318) (layer Cuivre) (net 40)) - (segment (start 83.312 115.316) (end 83.439 115.316) (width 0.4318) (layer Cuivre) (net 40)) - (segment (start 83.312 134.112) (end 83.439 134.239) (width 0.4318) (layer Composant) (net 40) (status 400)) - (segment (start 122.301 115.189) (end 122.428 115.316) (width 0.4318) (layer Cuivre) (net 40)) - (segment (start 122.428 115.316) (end 122.555 115.189) (width 0.4318) (layer Composant) (net 40)) - (segment (start 122.555 115.189) (end 134.0485 115.189) (width 0.4318) (layer Composant) (net 40)) - (segment (start 134.0485 115.189) (end 134.874 114.3635) (width 0.4318) (layer Composant) (net 40) (status 400)) - (segment (start 88.519 134.239) (end 88.9 134.62) (width 0.4318) (layer Cuivre) (net 40) (status 400)) - (segment (start 83.439 134.239) (end 88.519 134.239) (width 0.4318) (layer Cuivre) (net 40) (status 800)) - (segment (start 104.775 116.459) (end 106.045 115.189) (width 0.4318) (layer Cuivre) (net 40)) - (via (at 83.312 115.316) (size 0.889) (layers Composant Cuivre) (net 40)) - (segment (start 106.045 115.189) (end 122.301 115.189) (width 0.4318) (layer Cuivre) (net 40)) - (segment (start 83.8835 112.8395) (end 84.836 112.8395) (width 0.4318) (layer Composant) (net 40) (status 400)) - (segment (start 83.312 113.411) (end 83.8835 112.8395) (width 0.4318) (layer Composant) (net 40)) - (segment (start 83.439 134.239) (end 78.867 134.239) (width 0.4318) (layer Cuivre) (net 40) (status C00)) - (segment (start 83.312 115.316) (end 83.312 113.411) (width 0.4318) (layer Composant) (net 40)) - (segment (start 149.733 111.6965) (end 150.114 112.0775) (width 0.381) (layer Composant) (net 41)) - (segment (start 140.8938 109.22) (end 140.8938 110.7948) (width 0.254) (layer Composant) (net 41) (status 800)) - (segment (start 141.986 111.6965) (end 141.732 111.4425) (width 0.381) (layer Composant) (net 41) (status 400)) - (segment (start 143.51 111.6965) (end 141.986 111.6965) (width 0.381) (layer Composant) (net 41) (status 800)) - (segment (start 140.8938 110.7948) (end 141.732 111.4425) (width 0.254) (layer Composant) (net 41) (status 400)) - (segment (start 150.241 109.22) (end 150.241 111.9505) (width 0.254) (layer Composant) (net 41) (status 800)) - (segment (start 150.241 111.9505) (end 150.114 112.0775) (width 0.254) (layer Composant) (net 41)) - (segment (start 143.51 111.6965) (end 149.733 111.6965) (width 0.381) (layer Composant) (net 41) (status 800)) - (segment (start 150.622 88.9) (end 151.13 88.9) (width 0.254) (layer GND_layer) (net 42)) - (segment (start 151.13 88.9) (end 153.67 91.44) (width 0.254) (layer GND_layer) (net 42)) - (segment (start 150.114 136.398) (end 150.114 138.176) (width 0.254) (layer GND_layer) (net 42)) - (segment (start 156.337 130.175) (end 150.114 136.398) (width 0.254) (layer GND_layer) (net 42)) - (segment (start 156.337 119.253) (end 156.337 130.175) (width 0.254) (layer GND_layer) (net 42)) - (segment (start 157.607 117.983) (end 156.337 119.253) (width 0.254) (layer GND_layer) (net 42) (status 800)) - (segment (start 134.366 85.598) (end 134.747 85.217) (width 0.254) (layer Cuivre) (net 42)) - (segment (start 136.3726 93.726) (end 136.3853 92.329) (width 0.254) (layer Composant) (net 42) (status 800)) - (segment (start 149.86 88.138) (end 150.622 88.9) (width 0.254) (layer Cuivre) (net 42)) - (segment (start 141.097 88.138) (end 149.86 88.138) (width 0.254) (layer Cuivre) (net 42)) - (via (at 134.747 85.217) (size 0.889) (layers Composant Cuivre) (net 42)) - (via (at 150.622 88.9) (size 0.889) (layers Composant Cuivre) (net 42)) - (segment (start 150.114 138.176) (end 151.384 139.446) (width 0.254) (layer GND_layer) (net 42) (status 400)) - (segment (start 127.381 85.598) (end 134.366 85.598) (width 0.254) (layer Cuivre) (net 42)) - (segment (start 134.747 85.217) (end 135.636 86.106) (width 0.254) (layer Composant) (net 42)) - (segment (start 135.636 86.106) (end 135.636 88.646) (width 0.254) (layer Composant) (net 42)) - (segment (start 139.827 89.408) (end 141.097 88.138) (width 0.254) (layer Cuivre) (net 42)) - (segment (start 126.111 84.328) (end 118.999 84.328) (width 0.254) (layer Cuivre) (net 42)) - (segment (start 127.381 85.598) (end 126.111 84.328) (width 0.254) (layer Cuivre) (net 42)) - (segment (start 118.999 84.328) (end 114.3 89.027) (width 0.254) (layer Cuivre) (net 42) (status 400)) - (segment (start 155.194 115.57) (end 155.194 93.726) (width 0.254) (layer GND_layer) (net 42)) - (segment (start 155.194 93.726) (end 153.67 92.202) (width 0.254) (layer GND_layer) (net 42)) - (segment (start 153.67 92.202) (end 153.67 91.44) (width 0.254) (layer GND_layer) (net 42)) - (segment (start 157.607 117.983) (end 155.194 115.57) (width 0.254) (layer GND_layer) (net 42) (status 800)) - (segment (start 136.3853 92.329) (end 136.271 91.94038) (width 0.254) (layer Composant) (net 42)) - (via (at 135.636 88.646) (size 0.635) (layers Composant Cuivre) (net 42)) - (segment (start 136.271 91.94038) (end 136.271 89.535) (width 0.254) (layer Composant) (net 42)) - (segment (start 136.271 89.535) (end 135.763 89.027) (width 0.254) (layer Composant) (net 42)) - (segment (start 135.763 89.027) (end 135.636 88.646) (width 0.254) (layer Composant) (net 42)) - (segment (start 135.636 88.646) (end 135.636 89.154) (width 0.254) (layer Cuivre) (net 42)) - (segment (start 135.636 89.154) (end 136.144 89.408) (width 0.254) (layer Cuivre) (net 42)) - (segment (start 136.144 89.408) (end 139.827 89.408) (width 0.254) (layer Cuivre) (net 42)) - (segment (start 152.527 88.392) (end 151.765 87.63) (width 0.254) (layer Cuivre) (net 43)) - (segment (start 161.544 127.508) (end 152.654 136.398) (width 0.254) (layer GND_layer) (net 43)) - (segment (start 161.544 119.38) (end 161.544 127.508) (width 0.254) (layer GND_layer) (net 43)) - (segment (start 160.147 117.983) (end 161.544 119.38) (width 0.254) (layer GND_layer) (net 43) (status 800)) - (segment (start 156.21 114.046) (end 156.21 92.329) (width 0.254) (layer GND_layer) (net 43)) - (segment (start 156.21 92.329) (end 154.813 90.932) (width 0.254) (layer GND_layer) (net 43)) - (segment (start 160.147 117.983) (end 156.21 114.046) (width 0.254) (layer GND_layer) (net 43) (status 800)) - (segment (start 136.779 89.027) (end 136.525 88.646) (width 0.254) (layer Composant) (net 43)) - (segment (start 136.779 91.948) (end 136.779 89.027) (width 0.254) (layer Composant) (net 43)) - (segment (start 136.8933 92.3163) (end 136.779 91.948) (width 0.254) (layer Composant) (net 43)) - (segment (start 136.017 84.709) (end 136.017 85.344) (width 0.254) (layer Cuivre) (net 43)) - (segment (start 135.763 84.455) (end 136.017 84.709) (width 0.254) (layer Cuivre) (net 43)) - (segment (start 111.76 86.487) (end 111.76 85.852) (width 0.254) (layer Cuivre) (net 43) (status 800)) - (segment (start 127.127 84.455) (end 135.763 84.455) (width 0.254) (layer Cuivre) (net 43)) - (segment (start 136.8806 93.726) (end 136.8933 92.3163) (width 0.254) (layer Composant) (net 43) (status 800)) - (segment (start 139.827 88.646) (end 136.525 88.646) (width 0.254) (layer Cuivre) (net 43)) - (segment (start 151.765 87.63) (end 140.843 87.63) (width 0.254) (layer Cuivre) (net 43)) - (segment (start 126.365 83.693) (end 127.127 84.455) (width 0.254) (layer Cuivre) (net 43)) - (segment (start 113.919 83.693) (end 126.365 83.693) (width 0.254) (layer Cuivre) (net 43)) - (segment (start 111.76 85.852) (end 113.919 83.693) (width 0.254) (layer Cuivre) (net 43)) - (segment (start 140.843 87.63) (end 139.827 88.646) (width 0.254) (layer Cuivre) (net 43)) - (segment (start 153.035 88.392) (end 152.527 88.392) (width 0.254) (layer Cuivre) (net 43)) - (segment (start 153.543 88.392) (end 154.813 89.662) (width 0.254) (layer GND_layer) (net 43)) - (segment (start 154.813 89.662) (end 154.813 90.932) (width 0.254) (layer GND_layer) (net 43)) - (segment (start 153.035 88.392) (end 153.543 88.392) (width 0.254) (layer GND_layer) (net 43)) - (via (at 153.035 88.392) (size 0.889) (layers Composant Cuivre) (net 43)) - (segment (start 152.654 136.398) (end 152.654 138.176) (width 0.254) (layer GND_layer) (net 43)) - (segment (start 152.654 138.176) (end 153.924 139.446) (width 0.254) (layer GND_layer) (net 43) (status 400)) - (segment (start 136.017 85.344) (end 136.525 86.106) (width 0.254) (layer Composant) (net 43)) - (segment (start 136.525 86.106) (end 136.525 88.646) (width 0.254) (layer Composant) (net 43)) - (via (at 136.017 85.344) (size 0.889) (layers Composant Cuivre) (net 43)) - (via (at 136.525 88.646) (size 0.635) (layers Composant Cuivre) (net 43)) - (segment (start 100.457 90.551) (end 100.6475 90.043) (width 0.381) (layer Composant) (net 44) (status 400)) - (segment (start 104.775 89.027) (end 105.918 87.884) (width 0.381) (layer Composant) (net 44)) - (segment (start 105.918 87.884) (end 105.918 82.296) (width 0.381) (layer Composant) (net 44)) - (segment (start 105.918 82.296) (end 108.077 80.137) (width 0.381) (layer Composant) (net 44)) - (segment (start 108.077 80.137) (end 111.76 80.137) (width 0.381) (layer Composant) (net 44)) - (segment (start 111.76 80.137) (end 113.284 78.613) (width 0.381) (layer Composant) (net 44) (status 400)) - (segment (start 100.6475 90.043) (end 101.219 89.408) (width 0.381) (layer Composant) (net 44) (status 800)) - (segment (start 101.219 89.408) (end 102.108 89.408) (width 0.381) (layer Composant) (net 44)) - (segment (start 100.457 91.186) (end 100.457 90.551) (width 0.381) (layer Composant) (net 44)) - (segment (start 99.187 92.456) (end 100.457 91.186) (width 0.381) (layer Composant) (net 44)) - (segment (start 99.187 94.361) (end 99.187 92.456) (width 0.381) (layer Composant) (net 44)) - (segment (start 97.79 95.758) (end 99.187 94.361) (width 0.381) (layer Composant) (net 44) (status 800)) - (segment (start 102.489 89.027) (end 103.251 89.027) (width 0.381) (layer Composant) (net 44) (status 400)) - (segment (start 103.251 89.027) (end 104.775 89.027) (width 0.381) (layer Composant) (net 44) (status 800)) - (segment (start 102.108 89.408) (end 102.489 89.027) (width 0.381) (layer Composant) (net 44)) - (segment (start 108.204 78.613) (end 105.156 81.661) (width 0.381) (layer Composant) (net 45) (status 800)) - (segment (start 100.6475 87.757) (end 103.251 87.757) (width 0.4318) (layer Composant) (net 45) (status C00)) - (segment (start 100.6475 85.471) (end 100.6475 87.757) (width 0.762) (layer Composant) (net 45) (status C00)) - (segment (start 105.156 81.661) (end 105.156 87.249) (width 0.381) (layer Composant) (net 45)) - (segment (start 105.156 87.249) (end 104.648 87.757) (width 0.381) (layer Composant) (net 45)) - (segment (start 104.648 87.757) (end 103.251 87.757) (width 0.381) (layer Composant) (net 45) (status 400)) - (segment (start 178.816 80.518) (end 177.038 80.518) (width 0.381) (layer Composant) (net 46)) - (segment (start 175.006 63.754) (end 185.801 63.754) (width 0.381) (layer Composant) (net 46)) - (segment (start 184.15 82.296) (end 180.594 82.296) (width 0.381) (layer Composant) (net 46) (status 800)) - (segment (start 173.482 65.278) (end 175.006 63.754) (width 0.381) (layer Composant) (net 46)) - (segment (start 177.038 80.518) (end 176.022 79.502) (width 0.381) (layer Composant) (net 46)) - (segment (start 176.022 79.502) (end 176.022 71.12) (width 0.381) (layer Composant) (net 46)) - (segment (start 176.022 71.12) (end 173.482 68.58) (width 0.381) (layer Composant) (net 46)) - (segment (start 173.482 68.58) (end 173.482 65.278) (width 0.381) (layer Composant) (net 46)) - (segment (start 185.801 63.754) (end 187.833 66.04) (width 0.381) (layer Composant) (net 46) (status 400)) - (segment (start 180.594 82.296) (end 178.816 80.518) (width 0.381) (layer Composant) (net 46)) - (segment (start 150.241 63.754) (end 148.717 65.278) (width 0.381) (layer Composant) (net 47)) - (segment (start 148.717 65.278) (end 148.717 79.121) (width 0.381) (layer Composant) (net 47)) - (segment (start 154.305 65.151) (end 152.908 63.754) (width 0.381) (layer Composant) (net 47)) - (segment (start 152.908 63.754) (end 150.241 63.754) (width 0.381) (layer Composant) (net 47)) - (segment (start 148.717 79.121) (end 151.892 82.296) (width 0.381) (layer Composant) (net 47)) - (segment (start 151.892 82.296) (end 156.21 82.296) (width 0.381) (layer Composant) (net 47) (status 400)) - (segment (start 154.305 66.04) (end 154.305 65.151) (width 0.381) (layer Composant) (net 47) (status 800)) - (segment (start 120.777 66.04) (end 120.523 66.04) (width 0.381) (layer Composant) (net 48) (status 800)) - (via (at 109.474 71.374) (size 0.889) (layers Composant Cuivre) (net 48)) - (segment (start 115.443 67.183) (end 112.776 69.85) (width 0.381) (layer Composant) (net 48)) - (segment (start 112.776 69.85) (end 110.998 69.85) (width 0.381) (layer Composant) (net 48)) - (segment (start 110.998 69.85) (end 109.474 71.374) (width 0.381) (layer Composant) (net 48)) - (segment (start 113.284 76.073) (end 112.014 77.343) (width 0.381) (layer GND_layer) (net 48) (status 800)) - (segment (start 112.014 77.343) (end 109.982 77.343) (width 0.381) (layer GND_layer) (net 48)) - (segment (start 109.982 77.343) (end 109.474 76.835) (width 0.381) (layer GND_layer) (net 48)) - (segment (start 109.474 76.835) (end 109.474 71.374) (width 0.381) (layer GND_layer) (net 48)) - (segment (start 120.523 66.04) (end 119.38 67.183) (width 0.381) (layer Composant) (net 48)) - (segment (start 119.38 67.183) (end 115.443 67.183) (width 0.381) (layer Composant) (net 48)) - (segment (start 129.25 101.945) (end 128.778 101.473) (width 0.254) (layer Composant) (net 49) (tstamp 52D04C54)) - (segment (start 132.334 135.89) (end 132.334 139.954) (width 0.254) (layer Cuivre) (net 49)) - (segment (start 128.778 101.473) (end 127.635 101.473) (width 0.254) (layer Composant) (net 49) (status 400)) - (via (at 132.588 102.87) (size 0.635) (layers Composant Cuivre) (net 49)) - (segment (start 167.894 140.208) (end 167.894 138.176) (width 0.254) (layer Cuivre) (net 49)) - (segment (start 132.334 102.489) (end 131.953 102.108) (width 0.254) (layer Composant) (net 49)) - (segment (start 132.588 102.87) (end 132.334 102.489) (width 0.254) (layer Composant) (net 49)) - (segment (start 167.894 138.176) (end 169.164 136.906) (width 0.254) (layer Cuivre) (net 49) (status 400)) - (segment (start 132.588 102.87) (end 132.588 105.918) (width 0.254) (layer GND_layer) (net 49)) - (segment (start 132.588 105.918) (end 131.445 107.061) (width 0.254) (layer GND_layer) (net 49)) - (segment (start 131.445 107.061) (end 131.445 126.238) (width 0.254) (layer GND_layer) (net 49)) - (segment (start 131.445 126.238) (end 133.604 128.397) (width 0.254) (layer GND_layer) (net 49)) - (segment (start 133.604 128.397) (end 133.604 135.001) (width 0.254) (layer GND_layer) (net 49)) - (segment (start 133.604 135.001) (end 133.604 134.493) (width 0.254) (layer Cuivre) (net 49)) - (segment (start 133.604 134.493) (end 133.35 134.239) (width 0.254) (layer Cuivre) (net 49)) - (segment (start 133.35 134.239) (end 132.461 134.239) (width 0.254) (layer Cuivre) (net 49)) - (segment (start 132.461 134.239) (end 131.953 134.747) (width 0.254) (layer Cuivre) (net 49)) - (segment (start 131.953 134.747) (end 131.953 135.509) (width 0.254) (layer Cuivre) (net 49)) - (segment (start 131.953 135.509) (end 132.334 135.89) (width 0.254) (layer Cuivre) (net 49)) - (segment (start 132.334 139.954) (end 133.604 141.224) (width 0.254) (layer Cuivre) (net 49)) - (segment (start 133.604 141.224) (end 166.878 141.224) (width 0.254) (layer Cuivre) (net 49)) - (segment (start 166.878 141.224) (end 167.894 140.208) (width 0.254) (layer Cuivre) (net 49)) - (via (at 133.604 135.001) (size 0.635) (layers Composant Cuivre) (net 49)) - (segment (start 131.953 102.108) (end 131.45 102.108) (width 0.254) (layer Composant) (net 49)) - (segment (start 129.408 102.108) (end 129.25 101.95) (width 0.2) (layer Composant) (net 49) (tstamp 52D04C51)) - (segment (start 129.25 101.95) (end 129.25 101.945) (width 0.2) (layer Composant) (net 49) (tstamp 52D04C53)) - (segment (start 131.45 102.108) (end 129.408 102.108) (width 0.2) (layer Composant) (net 49)) - (segment (start 132.715 135.509) (end 132.715 135.001) (width 0.254) (layer Cuivre) (net 50)) - (segment (start 132.715 135.001) (end 130.937 133.223) (width 0.254) (layer GND_layer) (net 50)) - (segment (start 130.937 133.223) (end 130.937 129.413) (width 0.254) (layer GND_layer) (net 50)) - (via (at 132.715 135.001) (size 0.635) (layers Composant Cuivre) (net 50)) - (segment (start 166.624 136.906) (end 165.354 138.176) (width 0.254) (layer Cuivre) (net 50) (status 800)) - (segment (start 132.969 135.763) (end 132.715 135.509) (width 0.254) (layer Cuivre) (net 50)) - (segment (start 134.62 135.763) (end 132.969 135.763) (width 0.254) (layer Cuivre) (net 50)) - (segment (start 134.874 136.017) (end 134.62 135.763) (width 0.254) (layer Cuivre) (net 50)) - (segment (start 134.874 139.954) (end 134.874 136.017) (width 0.254) (layer Cuivre) (net 50)) - (segment (start 135.636 140.716) (end 134.874 139.954) (width 0.254) (layer Cuivre) (net 50)) - (segment (start 164.719 140.716) (end 135.636 140.716) (width 0.254) (layer Cuivre) (net 50)) - (segment (start 165.354 140.081) (end 164.719 140.716) (width 0.254) (layer Cuivre) (net 50)) - (segment (start 165.354 138.176) (end 165.354 140.081) (width 0.254) (layer Cuivre) (net 50)) - (segment (start 130.556 109.601) (end 128.651 107.696) (width 0.254) (layer GND_layer) (net 50)) - (segment (start 128.651 107.696) (end 128.651 99.568) (width 0.254) (layer GND_layer) (net 50)) - (segment (start 128.651 99.568) (end 129.159 99.06) (width 0.254) (layer GND_layer) (net 50)) - (segment (start 127.635 98.9838) (end 128.7526 98.9584) (width 0.254) (layer Composant) (net 50) (status 800)) - (segment (start 128.7526 98.9584) (end 129.159 99.06) (width 0.254) (layer Composant) (net 50)) - (via (at 129.159 99.06) (size 0.889) (layers Composant Cuivre) (net 50)) - (segment (start 130.556 109.601) (end 130.556 129.032) (width 0.254) (layer GND_layer) (net 50)) - (segment (start 130.556 129.032) (end 130.937 129.413) (width 0.254) (layer GND_layer) (net 50)) - (segment (start 138.049 135.001) (end 138.049 134.493) (width 0.254) (layer Cuivre) (net 51)) - (via (at 134.239 110.871) (size 0.635) (layers Composant Cuivre) (net 51)) - (segment (start 138.303 134.239) (end 145.542 134.239) (width 0.254) (layer Cuivre) (net 51)) - (segment (start 145.542 134.239) (end 147.574 136.271) (width 0.254) (layer Cuivre) (net 51)) - (segment (start 147.574 136.271) (end 147.574 138.176) (width 0.254) (layer Cuivre) (net 51)) - (segment (start 147.574 138.176) (end 148.844 139.446) (width 0.254) (layer Cuivre) (net 51) (status 400)) - (segment (start 134.239 110.871) (end 133.8834 110.4646) (width 0.254) (layer Composant) (net 51)) - (segment (start 133.8834 110.4646) (end 133.8834 109.22) (width 0.254) (layer Composant) (net 51) (status 400)) - (segment (start 134.239 110.871) (end 134.239 125.222) (width 0.254) (layer GND_layer) (net 51)) - (segment (start 134.239 125.222) (end 138.049 129.032) (width 0.254) (layer GND_layer) (net 51)) - (segment (start 138.049 129.032) (end 138.049 135.001) (width 0.254) (layer GND_layer) (net 51)) - (via (at 138.049 135.001) (size 0.635) (layers Composant Cuivre) (net 51)) - (segment (start 138.049 134.493) (end 138.303 134.239) (width 0.254) (layer Cuivre) (net 51)) - (segment (start 138.684 132.969) (end 138.938 133.223) (width 0.254) (layer GND_layer) (net 52)) - (segment (start 135.382 110.49) (end 135.128 110.871) (width 0.254) (layer Composant) (net 52)) - (segment (start 135.382 109.22) (end 135.382 110.49) (width 0.254) (layer Composant) (net 52) (status 800)) - (via (at 138.938 135.001) (size 0.635) (layers Composant Cuivre) (net 52)) - (segment (start 138.938 135.001) (end 143.891 135.001) (width 0.254) (layer Cuivre) (net 52)) - (segment (start 143.891 135.001) (end 145.034 136.144) (width 0.254) (layer Cuivre) (net 52)) - (segment (start 145.034 136.144) (end 145.034 138.176) (width 0.254) (layer Cuivre) (net 52)) - (segment (start 145.034 138.176) (end 146.304 139.446) (width 0.254) (layer Cuivre) (net 52) (status 400)) - (segment (start 138.938 133.223) (end 138.938 135.001) (width 0.254) (layer GND_layer) (net 52)) - (via (at 135.128 110.871) (size 0.635) (layers Composant Cuivre) (net 52)) - (segment (start 135.128 125.349) (end 138.684 128.905) (width 0.254) (layer GND_layer) (net 52)) - (segment (start 138.684 128.905) (end 138.684 132.969) (width 0.254) (layer GND_layer) (net 52)) - (segment (start 135.128 110.871) (end 135.128 125.349) (width 0.254) (layer GND_layer) (net 52)) - (segment (start 134.747 96.393) (end 134.747 95.504) (width 0.254) (layer Cuivre) (net 53)) - (segment (start 134.112 97.028) (end 134.747 96.393) (width 0.254) (layer Cuivre) (net 53)) - (segment (start 188.37402 108.02112) (end 188.88964 107.5055) (width 0.254) (layer Composant) (net 53)) - (segment (start 188.88964 107.5055) (end 190.9445 107.5055) (width 0.254) (layer Composant) (net 53) (status 400)) - (segment (start 178.816 107.061) (end 177.038 107.061) (width 0.254) (layer GND_layer) (net 53)) - (segment (start 181.61 109.347) (end 187.04814 109.347) (width 0.254) (layer Cuivre) (net 53)) - (segment (start 187.04814 109.347) (end 188.37402 108.02112) (width 0.254) (layer Cuivre) (net 53)) - (segment (start 181.61 109.347) (end 181.102 109.347) (width 0.254) (layer GND_layer) (net 53)) - (segment (start 159.258 92.71) (end 157.099 90.551) (width 0.254) (layer GND_layer) (net 53)) - (via (at 188.37402 108.02112) (size 0.889) (layers Composant Cuivre) (net 53)) - (via (at 181.61 109.347) (size 0.635) (layers Composant Cuivre) (net 53)) - (via (at 157.099 90.551) (size 0.635) (layers Composant Cuivre) (net 53)) - (via (at 177.038 89.408) (size 0.635) (layers Composant Cuivre) (net 53)) - (via (at 134.112 97.028) (size 0.889) (layers Composant Cuivre) (net 53)) - (segment (start 134.112 97.028) (end 134.112 95.631) (width 0.254) (layer Composant) (net 53)) - (segment (start 134.747 95.504) (end 138.303 91.948) (width 0.254) (layer Cuivre) (net 53)) - (segment (start 159.258 109.347) (end 159.258 92.71) (width 0.254) (layer GND_layer) (net 53)) - (segment (start 167.132 117.221) (end 159.258 109.347) (width 0.254) (layer GND_layer) (net 53)) - (segment (start 167.132 131.318) (end 167.132 117.221) (width 0.254) (layer GND_layer) (net 53)) - (segment (start 161.544 136.906) (end 167.132 131.318) (width 0.254) (layer GND_layer) (net 53) (status 800)) - (segment (start 133.8834 95.4024) (end 134.112 95.631) (width 0.254) (layer Composant) (net 53)) - (segment (start 181.102 109.347) (end 178.816 107.061) (width 0.254) (layer GND_layer) (net 53)) - (segment (start 133.8834 93.726) (end 133.8834 95.4024) (width 0.254) (layer Composant) (net 53) (status 800)) - (segment (start 156.464 91.186) (end 157.099 90.551) (width 0.254) (layer Cuivre) (net 53)) - (segment (start 152.781 91.186) (end 156.464 91.186) (width 0.254) (layer Cuivre) (net 53)) - (segment (start 152.019 91.948) (end 152.781 91.186) (width 0.254) (layer Cuivre) (net 53)) - (segment (start 138.303 91.948) (end 152.019 91.948) (width 0.254) (layer Cuivre) (net 53)) - (segment (start 157.607 90.551) (end 157.099 90.551) (width 0.254) (layer Cuivre) (net 53)) - (segment (start 159.512 88.646) (end 157.607 90.551) (width 0.254) (layer Cuivre) (net 53)) - (segment (start 164.846 88.646) (end 159.512 88.646) (width 0.254) (layer Cuivre) (net 53)) - (segment (start 165.481 89.281) (end 164.846 88.646) (width 0.254) (layer Cuivre) (net 53)) - (segment (start 172.974 89.281) (end 165.481 89.281) (width 0.254) (layer Cuivre) (net 53)) - (segment (start 173.609 88.646) (end 172.974 89.281) (width 0.254) (layer Cuivre) (net 53)) - (segment (start 175.133 88.646) (end 173.609 88.646) (width 0.254) (layer Cuivre) (net 53)) - (segment (start 175.895 89.408) (end 175.133 88.646) (width 0.254) (layer Cuivre) (net 53)) - (segment (start 177.038 89.408) (end 175.895 89.408) (width 0.254) (layer Cuivre) (net 53)) - (segment (start 174.752 91.694) (end 177.038 89.408) (width 0.254) (layer GND_layer) (net 53)) - (segment (start 174.752 104.775) (end 174.752 91.694) (width 0.254) (layer GND_layer) (net 53)) - (segment (start 177.038 107.061) (end 174.752 104.775) (width 0.254) (layer GND_layer) (net 53)) - (segment (start 173.101 88.138) (end 172.466 88.773) (width 0.254) (layer Cuivre) (net 54)) - (segment (start 172.466 88.773) (end 165.735 88.773) (width 0.254) (layer Cuivre) (net 54)) - (segment (start 165.735 88.773) (end 165.1 88.138) (width 0.254) (layer Cuivre) (net 54)) - (segment (start 165.1 88.138) (end 158.623 88.138) (width 0.254) (layer Cuivre) (net 54)) - (segment (start 158.623 88.138) (end 157.099 89.662) (width 0.254) (layer Cuivre) (net 54)) - (segment (start 181.61 108.458) (end 181.102 108.458) (width 0.254) (layer GND_layer) (net 54)) - (segment (start 181.102 108.458) (end 179.197 106.553) (width 0.254) (layer GND_layer) (net 54)) - (segment (start 179.197 106.553) (end 177.8 106.553) (width 0.254) (layer GND_layer) (net 54)) - (segment (start 177.8 106.553) (end 177.292 106.045) (width 0.254) (layer GND_layer) (net 54)) - (segment (start 177.292 106.045) (end 177.292 90.17) (width 0.254) (layer GND_layer) (net 54)) - (segment (start 177.292 90.17) (end 178.181 89.281) (width 0.254) (layer GND_layer) (net 54)) - (segment (start 178.181 89.281) (end 178.308 88.773) (width 0.254) (layer GND_layer) (net 54)) - (via (at 193.294 105.41) (size 0.889) (layers Composant Cuivre) (net 54)) - (via (at 157.099 89.662) (size 0.635) (layers Composant Cuivre) (net 54)) - (via (at 133.35 96.012) (size 0.889) (layers Composant Cuivre) (net 54)) - (via (at 181.61 108.458) (size 0.635) (layers Composant Cuivre) (net 54)) - (segment (start 156.591 89.662) (end 155.575 90.678) (width 0.254) (layer Cuivre) (net 54)) - (via (at 178.308 88.773) (size 0.635) (layers Composant Cuivre) (net 54)) - (segment (start 193.294 105.41) (end 192.00368 106.6546) (width 0.254) (layer Composant) (net 54)) - (segment (start 192.00368 106.6546) (end 192.00368 108.0135) (width 0.254) (layer Composant) (net 54)) - (segment (start 181.61 108.458) (end 183.81472 106.25328) (width 0.254) (layer Cuivre) (net 54)) - (segment (start 183.81472 106.25328) (end 192.405 106.25328) (width 0.254) (layer Cuivre) (net 54)) - (segment (start 192.405 106.25328) (end 193.294 105.41) (width 0.254) (layer Cuivre) (net 54)) - (segment (start 190.9445 108.0135) (end 192.00368 108.0135) (width 0.254) (layer Composant) (net 54) (status 800)) - (segment (start 164.084 136.906) (end 164.084 135.382) (width 0.254) (layer GND_layer) (net 54) (status 800)) - (segment (start 164.084 135.382) (end 167.64 131.826) (width 0.254) (layer GND_layer) (net 54)) - (segment (start 167.64 131.826) (end 167.64 116.967) (width 0.254) (layer GND_layer) (net 54)) - (segment (start 167.64 116.967) (end 159.766 109.093) (width 0.254) (layer GND_layer) (net 54)) - (segment (start 159.766 109.093) (end 159.766 91.821) (width 0.254) (layer GND_layer) (net 54)) - (segment (start 159.766 91.821) (end 157.607 89.662) (width 0.254) (layer GND_layer) (net 54)) - (segment (start 157.607 89.662) (end 157.099 89.662) (width 0.254) (layer GND_layer) (net 54)) - (segment (start 133.3754 93.726) (end 133.4008 95.5294) (width 0.254) (layer Composant) (net 54) (status 800)) - (segment (start 133.4008 95.5294) (end 133.35 96.012) (width 0.254) (layer Composant) (net 54)) - (segment (start 157.099 89.662) (end 156.591 89.662) (width 0.254) (layer Cuivre) (net 54)) - (segment (start 175.387 88.138) (end 173.101 88.138) (width 0.254) (layer Cuivre) (net 54)) - (segment (start 176.022 88.773) (end 175.387 88.138) (width 0.254) (layer Cuivre) (net 54)) - (segment (start 178.308 88.773) (end 176.022 88.773) (width 0.254) (layer Cuivre) (net 54)) - (segment (start 133.731 95.504) (end 133.35 96.012) (width 0.254) (layer Cuivre) (net 54)) - (segment (start 137.795 91.44) (end 133.731 95.504) (width 0.254) (layer Cuivre) (net 54)) - (segment (start 151.765 91.44) (end 137.795 91.44) (width 0.254) (layer Cuivre) (net 54)) - (segment (start 152.527 90.678) (end 151.765 91.44) (width 0.254) (layer Cuivre) (net 54)) - (segment (start 155.575 90.678) (end 152.527 90.678) (width 0.254) (layer Cuivre) (net 54)) - (segment (start 189.05728 104.34828) (end 187.9346 104.34828) (width 0.254) (layer 3.3V_layer) (net 55)) - (segment (start 157.226 87.884) (end 158.369 87.122) (width 0.254) (layer Cuivre) (net 55)) - (segment (start 174.117 91.186) (end 174.117 105.537) (width 0.254) (layer GND_layer) (net 55)) - (segment (start 187.9346 104.34828) (end 185.3311 106.95178) (width 0.254) (layer 3.3V_layer) (net 55)) - (segment (start 185.3311 106.95178) (end 179.324 106.95178) (width 0.254) (layer 3.3V_layer) (net 55)) - (segment (start 192.00368 108.5088) (end 192.00368 108.50626) (width 0.254) (layer Composant) (net 55)) - (segment (start 192.00368 108.50626) (end 193.07556 108.50626) (width 0.254) (layer Composant) (net 55)) - (segment (start 193.07556 108.50626) (end 193.12636 108.45546) (width 0.254) (layer Composant) (net 55)) - (segment (start 190.9445 108.5088) (end 192.00368 108.5088) (width 0.254) (layer Composant) (net 55) (status 800)) - (via (at 193.12636 108.45546) (size 0.889) (layers Composant Cuivre) (net 55)) - (segment (start 193.12636 108.45546) (end 193.12636 108.41736) (width 0.254) (layer 3.3V_layer) (net 55)) - (segment (start 158.369 87.122) (end 165.227 87.122) (width 0.254) (layer Cuivre) (net 55)) - (segment (start 165.227 87.122) (end 166.37 88.265) (width 0.254) (layer Cuivre) (net 55)) - (segment (start 166.37 88.265) (end 171.704 88.265) (width 0.254) (layer Cuivre) (net 55)) - (segment (start 171.704 88.265) (end 172.339 87.63) (width 0.254) (layer Cuivre) (net 55)) - (segment (start 172.339 87.63) (end 173.355 87.63) (width 0.254) (layer Cuivre) (net 55)) - (segment (start 173.355 87.63) (end 175.133 85.852) (width 0.254) (layer Cuivre) (net 55)) - (segment (start 175.133 85.852) (end 176.53 85.852) (width 0.254) (layer Cuivre) (net 55)) - (segment (start 176.53 85.852) (end 178.1175 87.4395) (width 0.254) (layer Cuivre) (net 55)) - (segment (start 178.1175 87.4395) (end 178.1175 87.757) (width 0.254) (layer Cuivre) (net 55)) - (segment (start 178.1175 87.757) (end 178.308 87.884) (width 0.254) (layer Cuivre) (net 55)) - (segment (start 165.227 117.983) (end 158.75 111.506) (width 0.254) (layer GND_layer) (net 55) (status 800)) - (segment (start 158.75 111.506) (end 158.75 93.345) (width 0.254) (layer GND_layer) (net 55)) - (segment (start 158.75 93.345) (end 156.337 90.932) (width 0.254) (layer GND_layer) (net 55)) - (segment (start 156.337 90.932) (end 156.337 89.408) (width 0.254) (layer GND_layer) (net 55)) - (segment (start 156.337 89.408) (end 157.226 88.519) (width 0.254) (layer GND_layer) (net 55)) - (segment (start 157.226 88.519) (end 157.226 87.884) (width 0.254) (layer GND_layer) (net 55)) - (segment (start 132.588 95.25) (end 133.223 95.123) (width 0.254) (layer Cuivre) (net 55)) - (segment (start 133.223 95.123) (end 137.414 90.932) (width 0.254) (layer Cuivre) (net 55)) - (segment (start 137.414 90.932) (end 151.511 90.932) (width 0.254) (layer Cuivre) (net 55)) - (segment (start 151.511 90.932) (end 152.273 90.17) (width 0.254) (layer Cuivre) (net 55)) - (segment (start 152.273 90.17) (end 155.321 90.17) (width 0.254) (layer Cuivre) (net 55)) - (segment (start 155.321 90.17) (end 157.226 88.265) (width 0.254) (layer Cuivre) (net 55)) - (segment (start 157.226 88.265) (end 157.226 87.884) (width 0.254) (layer Cuivre) (net 55)) - (segment (start 165.227 117.983) (end 166.624 119.38) (width 0.254) (layer GND_layer) (net 55) (status 800)) - (segment (start 166.624 119.38) (end 166.624 129.286) (width 0.254) (layer GND_layer) (net 55)) - (segment (start 166.624 129.286) (end 159.004 136.906) (width 0.254) (layer GND_layer) (net 55) (status 400)) - (segment (start 132.8674 93.726) (end 132.8674 95.0976) (width 0.254) (layer Composant) (net 55) (status 800)) - (segment (start 132.8674 95.0976) (end 132.588 95.25) (width 0.254) (layer Composant) (net 55)) - (via (at 178.308 87.884) (size 0.635) (layers Composant Cuivre) (net 55)) - (via (at 157.226 87.884) (size 0.889) (layers Composant Cuivre) (net 55)) - (via (at 132.588 95.25) (size 0.889) (layers Composant Cuivre) (net 55)) - (segment (start 179.324 106.934) (end 179.324 106.95178) (width 0.254) (layer 3.3V_layer) (net 55)) - (segment (start 177.292 106.934) (end 179.324 106.934) (width 0.254) (layer 3.3V_layer) (net 55)) - (segment (start 176.657 106.299) (end 177.292 106.934) (width 0.254) (layer 3.3V_layer) (net 55)) - (segment (start 174.879 106.299) (end 176.657 106.299) (width 0.254) (layer 3.3V_layer) (net 55)) - (segment (start 174.625 106.045) (end 174.879 106.299) (width 0.254) (layer 3.3V_layer) (net 55)) - (via (at 174.625 106.045) (size 0.889) (layers Composant Cuivre) (net 55)) - (segment (start 174.117 105.537) (end 174.625 106.045) (width 0.254) (layer GND_layer) (net 55)) - (segment (start 177.419 87.884) (end 174.117 91.186) (width 0.254) (layer GND_layer) (net 55)) - (segment (start 178.308 87.884) (end 177.419 87.884) (width 0.254) (layer GND_layer) (net 55)) - (segment (start 193.12636 108.41736) (end 189.05728 104.34828) (width 0.254) (layer 3.3V_layer) (net 55)) - (segment (start 127.508 88.519) (end 126.873 89.154) (width 0.254) (layer Cuivre) (net 56)) - (segment (start 107.95 92.456) (end 107.95 95.758) (width 0.254) (layer Cuivre) (net 56)) - (segment (start 132.08 91.313) (end 132.08 89.535) (width 0.254) (layer Cuivre) (net 56)) - (segment (start 132.08 89.535) (end 131.064 88.519) (width 0.254) (layer Cuivre) (net 56)) - (segment (start 131.064 88.519) (end 127.508 88.519) (width 0.254) (layer Cuivre) (net 56)) - (segment (start 126.873 89.154) (end 122.301 89.154) (width 0.254) (layer Cuivre) (net 56)) - (segment (start 122.301 89.154) (end 121.285 90.17) (width 0.254) (layer Cuivre) (net 56)) - (segment (start 121.285 90.17) (end 110.236 90.17) (width 0.254) (layer Cuivre) (net 56)) - (segment (start 110.236 90.17) (end 107.95 92.456) (width 0.254) (layer Cuivre) (net 56)) - (segment (start 107.95 95.758) (end 103.378 100.33) (width 0.254) (layer Cuivre) (net 56)) - (segment (start 103.378 100.33) (end 102.87 100.711) (width 0.254) (layer Cuivre) (net 56)) - (segment (start 118.364 136.906) (end 119.634 138.176) (width 0.254) (layer GND_layer) (net 56) (status 800)) - (segment (start 119.634 138.176) (end 119.634 140.208) (width 0.254) (layer GND_layer) (net 56)) - (segment (start 119.634 140.208) (end 119.126 140.716) (width 0.254) (layer GND_layer) (net 56)) - (segment (start 119.126 140.716) (end 110.109 140.716) (width 0.254) (layer GND_layer) (net 56)) - (segment (start 110.109 140.716) (end 106.299 136.906) (width 0.254) (layer GND_layer) (net 56)) - (segment (start 106.299 136.906) (end 106.299 101.6) (width 0.254) (layer GND_layer) (net 56)) - (segment (start 106.299 101.6) (end 104.648 99.949) (width 0.254) (layer GND_layer) (net 56)) - (segment (start 104.648 99.949) (end 103.505 99.949) (width 0.254) (layer GND_layer) (net 56)) - (segment (start 103.505 99.949) (end 102.87 100.584) (width 0.254) (layer GND_layer) (net 56)) - (segment (start 102.87 100.584) (end 102.87 100.711) (width 0.254) (layer GND_layer) (net 56)) - (segment (start 131.3688 93.726) (end 131.3688 92.5068) (width 0.254) (layer Composant) (net 56) (status 800)) - (segment (start 131.3688 92.5068) (end 131.699 92.202) (width 0.254) (layer Composant) (net 56)) - (segment (start 131.699 92.202) (end 131.699 91.694) (width 0.254) (layer Composant) (net 56)) - (segment (start 131.699 91.694) (end 132.08 91.313) (width 0.254) (layer Composant) (net 56)) - (segment (start 102.87 100.711) (end 102.2985 100.711) (width 0.381) (layer Composant) (net 56)) - (segment (start 102.2985 100.711) (end 100.584 102.4255) (width 0.381) (layer Composant) (net 56) (status 400)) - (via (at 102.87 100.711) (size 0.889) (layers Composant Cuivre) (net 56)) - (via (at 132.08 91.313) (size 0.635) (layers Composant Cuivre) (net 56)) - (segment (start 74.93 105.41) (end 74.93 112.522) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 147.574 95.25) (end 147.066 94.996) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 145.2372 97.4598) (end 143.129 97.4598) (width 0.254) (layer Composant) (net 57) (status 400)) - (segment (start 147.193 95.504) (end 145.2372 97.4598) (width 0.254) (layer Composant) (net 57)) - (segment (start 147.574 95.25) (end 147.193 95.504) (width 0.254) (layer Composant) (net 57)) - (segment (start 174.625 90.17) (end 181.991 90.17) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 174.244 90.551) (end 174.625 90.17) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 165.354 90.551) (end 174.244 90.551) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 164.719 89.916) (end 165.354 90.551) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 159.766 89.916) (end 164.719 89.916) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 156.21 93.472) (end 159.766 89.916) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 148.717 93.472) (end 156.21 93.472) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 147.574 94.615) (end 148.717 93.472) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 147.574 95.25) (end 147.574 94.615) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 147.574 95.25) (end 147.574 92.71) (width 0.254) (layer Composant) (net 57)) - (segment (start 178.054 138.176) (end 179.324 139.446) (width 0.254) (layer GND_layer) (net 57) (status 400)) - (segment (start 178.054 130.175) (end 178.054 138.176) (width 0.254) (layer GND_layer) (net 57)) - (segment (start 178.054 130.175) (end 185.928 122.301) (width 0.254) (layer GND_layer) (net 57)) - (segment (start 185.928 106.172) (end 185.928 122.301) (width 0.254) (layer GND_layer) (net 57)) - (segment (start 181.991 102.235) (end 185.928 106.172) (width 0.254) (layer GND_layer) (net 57)) - (segment (start 181.991 90.17) (end 181.991 102.235) (width 0.254) (layer GND_layer) (net 57)) - (segment (start 74.93 112.522) (end 76.327 113.919) (width 0.254) (layer Cuivre) (net 57) (status 400)) - (segment (start 147.574 92.71) (end 149.225 91.059) (width 0.381) (layer Composant) (net 57)) - (segment (start 149.225 91.059) (end 154.94 91.059) (width 0.381) (layer Composant) (net 57)) - (segment (start 154.94 91.059) (end 157.7975 93.9165) (width 0.381) (layer Composant) (net 57)) - (segment (start 157.7975 93.9165) (end 158.623 93.9165) (width 0.381) (layer Composant) (net 57) (status 400)) - (segment (start 160.8455 94.6785) (end 159.385 94.6785) (width 0.4318) (layer Composant) (net 57) (status 800)) - (segment (start 159.385 94.6785) (end 158.623 93.9165) (width 0.4318) (layer Composant) (net 57) (status 400)) - (via (at 181.991 90.17) (size 0.889) (layers Composant Cuivre) (net 57)) - (via (at 147.574 95.25) (size 0.635) (layers Composant Cuivre) (net 57)) - (segment (start 137.033 98.425) (end 137.668 97.79) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 137.668 95.881) (end 137.668 97.79) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 138.553 94.996) (end 137.668 95.881) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 147.066 94.996) (end 138.553 94.996) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 132.334 98.425) (end 137.033 98.425) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 132.334 98.425) (end 130.683 96.774) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 130.683 96.774) (end 128.524 96.774) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 128.524 96.774) (end 126.873 95.123) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 126.873 95.123) (end 117.094 95.123) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 117.094 95.123) (end 116.586 94.615) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 116.586 94.615) (end 111.633 94.615) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 111.633 94.615) (end 110.49 95.758) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 110.49 95.758) (end 110.49 98.171) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 110.49 98.171) (end 104.521 104.14) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 104.521 104.14) (end 76.2 104.14) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 76.2 104.14) (end 74.93 105.41) (width 0.254) (layer Cuivre) (net 57)) - (segment (start 176.403 81.28) (end 178.435 81.28) (width 0.381) (layer Composant) (net 58)) - (segment (start 187.579 62.865) (end 174.498 62.865) (width 0.381) (layer Composant) (net 58)) - (segment (start 174.498 62.865) (end 172.72 64.643) (width 0.381) (layer Composant) (net 58)) - (segment (start 172.72 64.643) (end 172.72 68.961) (width 0.381) (layer Composant) (net 58)) - (segment (start 172.72 68.961) (end 175.26 71.501) (width 0.381) (layer Composant) (net 58)) - (segment (start 175.26 71.501) (end 175.26 80.137) (width 0.381) (layer Composant) (net 58)) - (segment (start 185.039 81.026) (end 184.15 81.026) (width 0.4318) (layer Composant) (net 58) (status 400)) - (segment (start 190.5 65.786) (end 187.579 62.865) (width 0.4318) (layer Composant) (net 58)) - (segment (start 190.5 66.04) (end 190.5 65.786) (width 0.4318) (layer Composant) (net 58) (status 800)) - (segment (start 185.674 81.661) (end 185.039 81.026) (width 0.381) (layer Composant) (net 58)) - (segment (start 185.674 82.804) (end 185.674 81.661) (width 0.381) (layer Composant) (net 58)) - (segment (start 185.42 83.058) (end 185.674 82.804) (width 0.381) (layer Composant) (net 58)) - (segment (start 180.213 83.058) (end 185.42 83.058) (width 0.381) (layer Composant) (net 58)) - (segment (start 178.435 81.28) (end 180.213 83.058) (width 0.381) (layer Composant) (net 58)) - (segment (start 175.26 80.137) (end 176.403 81.28) (width 0.381) (layer Composant) (net 58)) - (via (at 163.322 93.472) (size 0.889) (layers Composant Cuivre) (net 59)) - (via (at 179.197 93.726) (size 0.635) (layers Composant Cuivre) (net 59)) - (segment (start 146.685 95.25) (end 146.812 94.869) (width 0.254) (layer Composant) (net 59)) - (segment (start 144.9578 96.9772) (end 146.685 95.25) (width 0.254) (layer Composant) (net 59)) - (segment (start 143.129 96.9772) (end 144.9578 96.9772) (width 0.254) (layer Composant) (net 59) (status 800)) - (segment (start 164.465 94.615) (end 163.322 93.472) (width 0.254) (layer Cuivre) (net 59)) - (segment (start 178.816 94.615) (end 164.465 94.615) (width 0.254) (layer Cuivre) (net 59)) - (segment (start 179.197 94.234) (end 178.816 94.615) (width 0.254) (layer Cuivre) (net 59)) - (segment (start 179.197 93.726) (end 179.197 94.234) (width 0.254) (layer Cuivre) (net 59)) - (segment (start 158.369 91.44) (end 158.623 91.2495) (width 0.381) (layer Composant) (net 59) (status 400)) - (segment (start 156.337 91.44) (end 158.369 91.44) (width 0.381) (layer Composant) (net 59)) - (segment (start 154.813 89.916) (end 156.337 91.44) (width 0.381) (layer Composant) (net 59)) - (segment (start 149.352 89.916) (end 154.813 89.916) (width 0.381) (layer Composant) (net 59)) - (segment (start 179.197 93.726) (end 178.943 94.234) (width 0.254) (layer GND_layer) (net 59)) - (segment (start 146.812 92.456) (end 149.352 89.916) (width 0.381) (layer Composant) (net 59)) - (segment (start 146.812 94.869) (end 146.812 92.456) (width 0.254) (layer Composant) (net 59)) - (segment (start 160.782 93.472) (end 163.322 93.472) (width 0.381) (layer Composant) (net 59)) - (segment (start 158.623 91.2495) (end 160.782 93.472) (width 0.381) (layer Composant) (net 59) (status 800)) - (segment (start 180.594 140.716) (end 181.864 139.446) (width 0.254) (layer GND_layer) (net 59) (status 400)) - (segment (start 173.736 140.716) (end 180.594 140.716) (width 0.254) (layer GND_layer) (net 59)) - (segment (start 172.974 139.954) (end 173.736 140.716) (width 0.254) (layer GND_layer) (net 59)) - (segment (start 172.974 131.826) (end 172.974 139.954) (width 0.254) (layer GND_layer) (net 59)) - (segment (start 172.974 131.826) (end 183.007 121.793) (width 0.254) (layer GND_layer) (net 59)) - (segment (start 183.007 107.442) (end 183.007 121.793) (width 0.254) (layer GND_layer) (net 59)) - (segment (start 182.245 106.68) (end 183.007 107.442) (width 0.254) (layer GND_layer) (net 59)) - (segment (start 181.102 106.68) (end 182.245 106.68) (width 0.254) (layer GND_layer) (net 59)) - (segment (start 178.943 104.521) (end 181.102 106.68) (width 0.254) (layer GND_layer) (net 59)) - (segment (start 178.943 94.234) (end 178.943 104.521) (width 0.254) (layer GND_layer) (net 59)) - (segment (start 157.734 82.804) (end 157.48 83.058) (width 0.381) (layer Composant) (net 60)) - (segment (start 147.955 79.756) (end 147.955 64.77) (width 0.381) (layer Composant) (net 60)) - (segment (start 147.955 79.756) (end 151.257 83.058) (width 0.381) (layer Composant) (net 60)) - (segment (start 151.257 83.058) (end 157.48 83.058) (width 0.381) (layer Composant) (net 60)) - (segment (start 156.972 65.532) (end 156.972 66.04) (width 0.381) (layer Composant) (net 60) (status 400)) - (segment (start 157.734 82.042) (end 157.734 82.804) (width 0.381) (layer Composant) (net 60)) - (segment (start 156.718 81.026) (end 157.734 82.042) (width 0.381) (layer Composant) (net 60)) - (segment (start 156.21 81.026) (end 156.718 81.026) (width 0.381) (layer Composant) (net 60) (status 800)) - (segment (start 147.955 64.77) (end 149.86 62.865) (width 0.381) (layer Composant) (net 60)) - (segment (start 149.86 62.865) (end 154.305 62.865) (width 0.381) (layer Composant) (net 60)) - (segment (start 154.305 62.865) (end 156.972 65.532) (width 0.381) (layer Composant) (net 60)) - (segment (start 123.444 70.485) (end 126.746 73.787) (width 0.381) (layer Composant) (net 61)) - (segment (start 123.444 66.04) (end 123.444 70.485) (width 0.381) (layer Composant) (net 61) (status 800)) - (segment (start 127.381 75.946) (end 128.27 75.946) (width 0.381) (layer Composant) (net 61) (status 400)) - (segment (start 126.746 75.311) (end 127.381 75.946) (width 0.381) (layer Composant) (net 61)) - (segment (start 126.746 73.787) (end 126.746 75.311) (width 0.381) (layer Composant) (net 61)) - (segment (start 189.103 68.58) (end 189.103 68.453) (width 0.381) (layer Composant) (net 62) (status 800)) - (segment (start 185.039 69.723) (end 184.404 70.358) (width 0.381) (layer Composant) (net 62)) - (segment (start 185.039 67.818) (end 185.039 69.723) (width 0.381) (layer Composant) (net 62)) - (segment (start 184.404 70.358) (end 184.404 71.501) (width 0.381) (layer Composant) (net 62)) - (segment (start 187.198 67.183) (end 185.674 67.183) (width 0.381) (layer Composant) (net 62)) - (segment (start 187.452 67.437) (end 187.198 67.183) (width 0.381) (layer Composant) (net 62)) - (segment (start 184.404 71.501) (end 186.944 74.041) (width 0.381) (layer Composant) (net 62)) - (segment (start 186.944 74.041) (end 186.944 76.327) (width 0.381) (layer Composant) (net 62)) - (segment (start 186.944 76.327) (end 187.833 77.216) (width 0.381) (layer Composant) (net 62)) - (segment (start 187.833 77.216) (end 189.23 77.216) (width 0.381) (layer Composant) (net 62) (status 400)) - (segment (start 188.087 67.437) (end 187.452 67.437) (width 0.381) (layer Composant) (net 62)) - (segment (start 189.103 68.453) (end 188.087 67.437) (width 0.381) (layer Composant) (net 62)) - (segment (start 185.674 67.183) (end 185.039 67.818) (width 0.381) (layer Composant) (net 62)) - (segment (start 159.004 76.581) (end 159.639 77.216) (width 0.381) (layer Composant) (net 63)) - (segment (start 159.004 74.041) (end 159.004 76.581) (width 0.381) (layer Composant) (net 63)) - (segment (start 155.702 70.739) (end 159.004 74.041) (width 0.381) (layer Composant) (net 63)) - (segment (start 155.575 68.58) (end 154.305 67.31) (width 0.381) (layer Composant) (net 63) (status 800)) - (segment (start 154.305 67.31) (end 152.019 67.31) (width 0.381) (layer Composant) (net 63)) - (segment (start 153.035 70.739) (end 155.702 70.739) (width 0.381) (layer Composant) (net 63)) - (segment (start 151.511 69.215) (end 153.035 70.739) (width 0.381) (layer Composant) (net 63)) - (segment (start 151.511 67.818) (end 151.511 69.215) (width 0.381) (layer Composant) (net 63)) - (segment (start 159.639 77.216) (end 161.29 77.216) (width 0.381) (layer Composant) (net 63) (status 400)) - (segment (start 152.019 67.31) (end 151.511 67.818) (width 0.381) (layer Composant) (net 63)) - (segment (start 112.014 74.803) (end 112.014 71.628) (width 0.381) (layer GND_layer) (net 64)) - (via (at 112.014 71.628) (size 0.889) (layers Composant Cuivre) (net 64)) - (segment (start 122.047 68.58) (end 120.269 70.358) (width 0.381) (layer Composant) (net 64) (status 800)) - (segment (start 120.269 70.358) (end 118.11 70.358) (width 0.381) (layer Composant) (net 64)) - (segment (start 118.11 70.358) (end 117.221 71.628) (width 0.381) (layer Composant) (net 64)) - (segment (start 117.221 71.628) (end 112.014 71.628) (width 0.381) (layer Composant) (net 64)) - (segment (start 110.744 76.073) (end 112.014 74.803) (width 0.381) (layer GND_layer) (net 64) (status 800)) - (segment (start 110.744 85.217) (end 113.03 85.217) (width 0.381) (layer Composant) (net 65)) - (segment (start 109.474 86.487) (end 110.744 85.217) (width 0.381) (layer Composant) (net 65)) - (segment (start 113.03 85.217) (end 114.3 86.487) (width 0.381) (layer Composant) (net 65) (status 400)) - (segment (start 108.585 86.487) (end 109.474 86.487) (width 0.381) (layer Composant) (net 65) (status 800)) - (segment (start 187.706 73.787) (end 185.293 71.374) (width 0.381) (layer Composant) (net 66)) - (segment (start 187.706 75.311) (end 187.706 73.787) (width 0.381) (layer Composant) (net 66)) - (segment (start 188.341 75.946) (end 187.706 75.311) (width 0.381) (layer Composant) (net 66)) - (segment (start 189.23 75.946) (end 188.341 75.946) (width 0.381) (layer Composant) (net 66) (status 800)) - (segment (start 186.182 69.723) (end 186.436 68.58) (width 0.381) (layer Composant) (net 66) (status 400)) - (segment (start 185.293 70.612) (end 186.182 69.723) (width 0.381) (layer Composant) (net 66)) - (segment (start 185.293 71.374) (end 185.293 70.612) (width 0.381) (layer Composant) (net 66)) - (segment (start 159.766 73.787) (end 159.766 75.311) (width 0.381) (layer Composant) (net 67)) - (segment (start 155.956 69.977) (end 159.766 73.787) (width 0.381) (layer Composant) (net 67)) - (segment (start 159.766 75.311) (end 160.401 75.946) (width 0.381) (layer Composant) (net 67)) - (segment (start 160.401 75.946) (end 161.29 75.946) (width 0.381) (layer Composant) (net 67) (status 400)) - (segment (start 152.908 68.58) (end 154.305 69.977) (width 0.381) (layer Composant) (net 67) (status 800)) - (segment (start 154.305 69.977) (end 155.956 69.977) (width 0.381) (layer Composant) (net 67)) - (segment (start 120.65 67.945) (end 122.0978 66.4972) (width 0.381) (layer Composant) (net 68)) - (segment (start 109.22 68.834) (end 106.807 71.247) (width 0.381) (layer Composant) (net 68)) - (segment (start 122.0978 66.4972) (end 122.0978 65.0748) (width 0.381) (layer Composant) (net 68)) - (segment (start 122.0978 65.0748) (end 120.523 63.5) (width 0.381) (layer Composant) (net 68)) - (segment (start 106.807 74.676) (end 108.204 76.073) (width 0.381) (layer Composant) (net 68) (status 400)) - (segment (start 106.807 71.247) (end 106.807 74.676) (width 0.381) (layer Composant) (net 68)) - (segment (start 120.523 63.5) (end 117.856 63.5) (width 0.381) (layer Composant) (net 68)) - (segment (start 112.522 68.834) (end 109.22 68.834) (width 0.381) (layer Composant) (net 68)) - (segment (start 117.856 63.5) (end 112.522 68.834) (width 0.381) (layer Composant) (net 68)) - (segment (start 119.38 68.58) (end 120.65 67.945) (width 0.381) (layer Composant) (net 68) (status 800)) - (segment (start 108.585 90.297) (end 110.49 90.297) (width 0.381) (layer Composant) (net 69) (status 800)) - (segment (start 110.49 90.297) (end 111.76 89.027) (width 0.381) (layer Composant) (net 69) (status 400)) - (via (at 120.269 85.598) (size 0.889) (layers Composant Cuivre) (net 70)) - (via (at 139.954 85.598) (size 0.635) (layers Composant Cuivre) (net 70)) - (segment (start 127.635 119.507) (end 127.635 131.699) (width 0.254) (layer GND_layer) (net 70)) - (segment (start 120.904 87.884) (end 139.827 87.884) (width 0.254) (layer Cuivre) (net 70)) - (segment (start 120.269 87.249) (end 120.904 87.884) (width 0.254) (layer Cuivre) (net 70)) - (segment (start 120.269 85.598) (end 120.269 87.249) (width 0.254) (layer Cuivre) (net 70)) - (segment (start 139.954 86.487) (end 140.589 87.122) (width 0.254) (layer Cuivre) (net 70)) - (segment (start 139.954 85.598) (end 139.954 86.487) (width 0.254) (layer Cuivre) (net 70)) - (segment (start 120.269 86.487) (end 120.269 85.598) (width 0.254) (layer GND_layer) (net 70)) - (segment (start 122.174 88.392) (end 120.269 86.487) (width 0.254) (layer GND_layer) (net 70)) - (segment (start 124.46 88.392) (end 122.174 88.392) (width 0.254) (layer GND_layer) (net 70)) - (segment (start 166.751 85.598) (end 166.878 85.471) (width 0.254) (layer Cuivre) (net 70)) - (segment (start 187.96 85.471) (end 192.405 81.026) (width 0.254) (layer Cuivre) (net 70)) - (segment (start 173.355 85.471) (end 174.371 84.455) (width 0.254) (layer Cuivre) (net 70)) - (segment (start 166.878 85.471) (end 173.355 85.471) (width 0.254) (layer Cuivre) (net 70)) - (segment (start 139.827 87.884) (end 140.589 87.122) (width 0.254) (layer Cuivre) (net 70)) - (segment (start 155.321 85.598) (end 166.751 85.598) (width 0.254) (layer Cuivre) (net 70)) - (segment (start 153.797 87.122) (end 155.321 85.598) (width 0.254) (layer Cuivre) (net 70)) - (segment (start 140.589 87.122) (end 153.797 87.122) (width 0.254) (layer Cuivre) (net 70)) - (segment (start 128.778 132.842) (end 127.635 131.699) (width 0.254) (layer GND_layer) (net 70)) - (segment (start 126.619 90.551) (end 124.46 88.392) (width 0.254) (layer GND_layer) (net 70)) - (segment (start 126.619 118.491) (end 126.619 90.551) (width 0.254) (layer GND_layer) (net 70)) - (segment (start 126.619 118.491) (end 127.635 119.507) (width 0.254) (layer GND_layer) (net 70)) - (segment (start 128.778 135.001) (end 128.778 132.842) (width 0.254) (layer GND_layer) (net 70)) - (segment (start 129.794 136.017) (end 128.778 135.001) (width 0.254) (layer GND_layer) (net 70)) - (segment (start 129.794 138.176) (end 129.794 136.017) (width 0.254) (layer GND_layer) (net 70)) - (segment (start 131.064 139.446) (end 129.794 138.176) (width 0.254) (layer GND_layer) (net 70) (status 800)) - (segment (start 139.954 86.741) (end 139.954 85.598) (width 0.254) (layer Composant) (net 70)) - (segment (start 138.811 87.884) (end 139.954 86.741) (width 0.254) (layer Composant) (net 70)) - (segment (start 138.811 91.948) (end 138.811 87.884) (width 0.254) (layer Composant) (net 70)) - (segment (start 138.8872 92.3036) (end 138.811 91.948) (width 0.254) (layer Composant) (net 70)) - (segment (start 138.8872 93.726) (end 138.8872 92.3036) (width 0.254) (layer Composant) (net 70) (status 800)) - (segment (start 198.882 81.026) (end 200.025 82.169) (width 0.254) (layer Cuivre) (net 70) (status 400)) - (segment (start 192.405 81.026) (end 198.882 81.026) (width 0.254) (layer Cuivre) (net 70)) - (segment (start 174.371 84.455) (end 177.038 84.455) (width 0.254) (layer Cuivre) (net 70)) - (segment (start 178.054 85.471) (end 187.96 85.471) (width 0.254) (layer Cuivre) (net 70)) - (segment (start 177.038 84.455) (end 178.054 85.471) (width 0.254) (layer Cuivre) (net 70)) - (segment (start 171.704 132.207) (end 171.704 136.906) (width 0.254) (layer GND_layer) (net 71) (status 400)) - (segment (start 171.704 132.207) (end 181.102 122.809) (width 0.254) (layer GND_layer) (net 71)) - (segment (start 182.245 107.569) (end 182.499 107.823) (width 0.254) (layer GND_layer) (net 71)) - (segment (start 182.499 107.823) (end 182.499 119.888) (width 0.254) (layer GND_layer) (net 71)) - (segment (start 181.61 107.569) (end 182.245 107.569) (width 0.254) (layer GND_layer) (net 71)) - (segment (start 152.4 85.852) (end 152.4 84.836) (width 0.254) (layer Composant) (net 71)) - (segment (start 146.177 92.075) (end 152.4 85.852) (width 0.254) (layer Composant) (net 71)) - (segment (start 181.61 107.569) (end 181.102 107.569) (width 0.254) (layer GND_layer) (net 71)) - (segment (start 144.7038 96.4692) (end 146.177 94.996) (width 0.254) (layer Composant) (net 71)) - (segment (start 143.129 96.4692) (end 144.7038 96.4692) (width 0.254) (layer Composant) (net 71) (status 800)) - (segment (start 183.65978 105.51922) (end 181.61 107.569) (width 0.254) (layer Cuivre) (net 71)) - (segment (start 183.65978 100.82022) (end 183.65978 105.51922) (width 0.254) (layer Cuivre) (net 71)) - (segment (start 196.42582 88.05418) (end 183.65978 100.82022) (width 0.254) (layer Cuivre) (net 71)) - (segment (start 197.485 88.05418) (end 196.42582 88.05418) (width 0.254) (layer Cuivre) (net 71)) - (segment (start 197.485 86.995) (end 197.485 88.05418) (width 0.254) (layer Cuivre) (net 71) (status 800)) - (segment (start 183.0451 109.0041) (end 190.9445 109.0041) (width 0.254) (layer Composant) (net 71) (status 400)) - (segment (start 181.102 107.569) (end 178.435 104.902) (width 0.254) (layer GND_layer) (net 71)) - (segment (start 178.435 104.902) (end 178.435 90.551) (width 0.254) (layer GND_layer) (net 71)) - (segment (start 178.435 90.551) (end 179.959 89.027) (width 0.254) (layer GND_layer) (net 71)) - (segment (start 179.959 89.027) (end 179.959 77.597) (width 0.254) (layer GND_layer) (net 71)) - (segment (start 179.959 77.597) (end 178.181 75.819) (width 0.254) (layer GND_layer) (net 71)) - (segment (start 178.181 75.819) (end 176.911 75.819) (width 0.254) (layer GND_layer) (net 71)) - (segment (start 176.911 75.819) (end 173.99 78.74) (width 0.254) (layer GND_layer) (net 71)) - (segment (start 173.99 78.74) (end 173.99 80.264) (width 0.254) (layer GND_layer) (net 71)) - (segment (start 173.99 80.264) (end 172.085 82.169) (width 0.254) (layer GND_layer) (net 71) (status 400)) - (segment (start 172.085 82.169) (end 170.942 83.312) (width 0.254) (layer Cuivre) (net 71) (status 800)) - (segment (start 170.942 83.312) (end 168.656 83.312) (width 0.254) (layer Cuivre) (net 71)) - (segment (start 168.656 83.312) (end 168.275 82.931) (width 0.254) (layer Cuivre) (net 71)) - (segment (start 168.275 82.931) (end 164.846 82.931) (width 0.254) (layer Cuivre) (net 71)) - (segment (start 164.973 82.804) (end 164.846 82.931) (width 0.254) (layer Cuivre) (net 71)) - (segment (start 154.432 82.804) (end 164.973 82.804) (width 0.254) (layer Cuivre) (net 71)) - (segment (start 152.4 84.836) (end 154.432 82.804) (width 0.254) (layer Cuivre) (net 71)) - (via (at 181.61 107.569) (size 0.635) (layers Composant Cuivre) (net 71)) - (via (at 152.4 84.836) (size 0.889) (layers Composant Cuivre) (net 71)) - (segment (start 181.102 122.809) (end 181.102 121.285) (width 0.254) (layer GND_layer) (net 71)) - (segment (start 146.177 94.996) (end 146.177 92.075) (width 0.254) (layer Composant) (net 71)) - (segment (start 181.61 107.569) (end 183.0451 109.0041) (width 0.254) (layer Composant) (net 71)) - (segment (start 181.102 121.285) (end 182.499 119.888) (width 0.254) (layer GND_layer) (net 71)) - (segment (start 140.208 82.169) (end 140.208 82.804) (width 0.254) (layer Composant) (net 72)) - (segment (start 122.174 96.266) (end 123.952 96.266) (width 0.254) (layer GND_layer) (net 72)) - (segment (start 120.396 129.54) (end 124.714 133.858) (width 0.254) (layer GND_layer) (net 72)) - (segment (start 120.396 105.537) (end 120.396 129.54) (width 0.254) (layer GND_layer) (net 72)) - (segment (start 120.904 93.345) (end 120.904 94.996) (width 0.254) (layer GND_layer) (net 72)) - (segment (start 131.064 87.757) (end 129.159 87.757) (width 0.254) (layer Composant) (net 72)) - (segment (start 129.159 87.757) (end 124.714 92.202) (width 0.254) (layer Composant) (net 72)) - (segment (start 124.714 92.202) (end 124.714 93.472) (width 0.254) (layer Composant) (net 72)) - (segment (start 124.714 93.472) (end 124.841 93.98) (width 0.254) (layer Composant) (net 72)) - (segment (start 124.841 93.98) (end 124.841 93.472) (width 0.254) (layer GND_layer) (net 72)) - (segment (start 124.841 93.472) (end 123.952 92.583) (width 0.254) (layer GND_layer) (net 72)) - (segment (start 123.952 92.583) (end 121.666 92.583) (width 0.254) (layer GND_layer) (net 72)) - (segment (start 121.666 92.583) (end 120.904 93.345) (width 0.254) (layer GND_layer) (net 72)) - (segment (start 134.493 84.328) (end 131.064 87.757) (width 0.254) (layer Composant) (net 72)) - (segment (start 138.684 84.328) (end 134.493 84.328) (width 0.254) (layer Composant) (net 72)) - (segment (start 140.208 82.804) (end 138.684 84.328) (width 0.254) (layer Composant) (net 72)) - (segment (start 120.396 105.537) (end 124.587 101.346) (width 0.254) (layer GND_layer) (net 72)) - (segment (start 125.984 138.938) (end 124.714 137.668) (width 0.254) (layer GND_layer) (net 72)) - (segment (start 125.984 139.446) (end 125.984 138.938) (width 0.254) (layer GND_layer) (net 72) (status 800)) - (via (at 140.208 82.169) (size 0.889) (layers Composant Cuivre) (net 72)) - (segment (start 140.208 82.169) (end 138.303 82.169) (width 0.254) (layer Cuivre) (net 72) (status 400)) - (segment (start 126.4412 95.9612) (end 127.635 95.9866) (width 0.254) (layer Composant) (net 72) (status 400)) - (segment (start 124.968 94.488) (end 126.4412 95.9612) (width 0.254) (layer Composant) (net 72)) - (segment (start 124.841 93.98) (end 124.968 94.488) (width 0.254) (layer Composant) (net 72)) - (segment (start 120.904 94.996) (end 122.174 96.266) (width 0.254) (layer GND_layer) (net 72)) - (segment (start 123.952 96.266) (end 124.587 96.901) (width 0.254) (layer GND_layer) (net 72)) - (segment (start 124.587 96.901) (end 124.587 101.346) (width 0.254) (layer GND_layer) (net 72)) - (via (at 124.841 93.98) (size 0.635) (layers Composant Cuivre) (net 72)) - (segment (start 124.714 133.858) (end 124.714 137.668) (width 0.254) (layer GND_layer) (net 72)) - (segment (start 173.736 82.804) (end 172.593 83.947) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 178.054 82.804) (end 173.736 82.804) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 179.197 83.947) (end 178.054 82.804) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 185.801 83.947) (end 179.197 83.947) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 196.723 73.025) (end 185.801 83.947) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 201.168 73.025) (end 196.723 73.025) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 201.676 73.533) (end 201.168 73.025) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 201.676 77.978) (end 201.676 73.533) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 200.025 79.629) (end 201.676 77.978) (width 0.254) (layer Cuivre) (net 73) (status 800)) - (segment (start 127.635 116.84) (end 129.032 118.237) (width 0.254) (layer GND_layer) (net 73)) - (segment (start 129.032 118.237) (end 129.032 130.175) (width 0.254) (layer GND_layer) (net 73)) - (segment (start 129.032 130.175) (end 129.921 131.064) (width 0.254) (layer GND_layer) (net 73)) - (via (at 123.19 85.598) (size 0.889) (layers Composant Cuivre) (net 73)) - (segment (start 132.334 138.176) (end 133.604 139.446) (width 0.254) (layer GND_layer) (net 73) (status 400)) - (segment (start 132.334 136.398) (end 132.334 138.176) (width 0.254) (layer GND_layer) (net 73)) - (segment (start 129.921 133.985) (end 132.334 136.398) (width 0.254) (layer GND_layer) (net 73)) - (segment (start 129.921 131.064) (end 129.921 133.985) (width 0.254) (layer GND_layer) (net 73)) - (segment (start 127.635 89.789) (end 127.635 116.84) (width 0.254) (layer GND_layer) (net 73)) - (segment (start 124.841 86.995) (end 127.635 89.789) (width 0.254) (layer GND_layer) (net 73)) - (segment (start 123.825 86.995) (end 124.841 86.995) (width 0.254) (layer GND_layer) (net 73)) - (segment (start 123.19 86.36) (end 123.825 86.995) (width 0.254) (layer GND_layer) (net 73)) - (segment (start 123.19 85.598) (end 123.19 86.36) (width 0.254) (layer GND_layer) (net 73)) - (segment (start 125.349 84.836) (end 126.873 86.36) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 123.952 84.836) (end 125.349 84.836) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 123.19 85.598) (end 123.952 84.836) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 137.3886 92.3036) (end 137.287 91.948) (width 0.254) (layer Composant) (net 73)) - (segment (start 137.287 91.948) (end 137.16 85.344) (width 0.254) (layer Composant) (net 73)) - (segment (start 137.3886 93.726) (end 137.3886 92.3036) (width 0.254) (layer Composant) (net 73) (status 800)) - (segment (start 126.873 86.36) (end 137.033 86.36) (width 0.254) (layer Cuivre) (net 73)) - (via (at 137.16 85.344) (size 0.889) (layers Composant Cuivre) (net 73)) - (segment (start 172.593 83.947) (end 164.846 83.947) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 155.067 83.566) (end 164.465 83.566) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 153.035 85.598) (end 155.067 83.566) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 153.035 85.598) (end 143.637 85.598) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 143.637 85.598) (end 141.859 83.82) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 164.846 83.947) (end 164.465 83.566) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 137.033 86.36) (end 137.16 86.233) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 137.16 86.233) (end 137.16 85.344) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 141.859 83.82) (end 137.922 83.82) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 137.16 84.582) (end 137.16 85.344) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 137.922 83.82) (end 137.16 84.582) (width 0.254) (layer Cuivre) (net 73)) - (segment (start 183.515 107.061) (end 183.515 122.047) (width 0.254) (layer GND_layer) (net 74)) - (segment (start 178.943 90.805) (end 180.467 89.281) (width 0.254) (layer GND_layer) (net 74)) - (segment (start 180.467 89.281) (end 180.467 77.216) (width 0.254) (layer GND_layer) (net 74)) - (segment (start 180.467 77.216) (end 178.308 75.057) (width 0.254) (layer GND_layer) (net 74)) - (segment (start 179.959 93.472) (end 178.943 92.456) (width 0.254) (layer GND_layer) (net 74)) - (segment (start 179.959 102.362) (end 179.959 93.472) (width 0.254) (layer GND_layer) (net 74)) - (segment (start 179.705 102.87) (end 179.959 102.362) (width 0.254) (layer GND_layer) (net 74)) - (segment (start 197.28942 89.535) (end 197.485 89.535) (width 0.254) (layer 3.3V_layer) (net 74) (status 400)) - (segment (start 183.95442 102.87) (end 197.28942 89.535) (width 0.254) (layer 3.3V_layer) (net 74)) - (segment (start 179.705 102.87) (end 183.95442 102.87) (width 0.254) (layer 3.3V_layer) (net 74)) - (segment (start 180.24602 102.32898) (end 179.705 102.87) (width 0.254) (layer Composant) (net 74)) - (segment (start 191.62522 102.32898) (end 180.24602 102.32898) (width 0.254) (layer Composant) (net 74)) - (segment (start 194.91706 105.62082) (end 191.62522 102.32898) (width 0.254) (layer Composant) (net 74)) - (segment (start 194.91706 110.12678) (end 194.91706 105.62082) (width 0.254) (layer Composant) (net 74)) - (segment (start 190.9445 111.0107) (end 194.03314 111.0107) (width 0.254) (layer Composant) (net 74) (status 800)) - (segment (start 194.03314 111.0107) (end 194.91706 110.12678) (width 0.254) (layer Composant) (net 74)) - (segment (start 151.638 83.82) (end 151.511 83.947) (width 0.254) (layer Cuivre) (net 74)) - (via (at 151.511 83.947) (size 0.889) (layers Composant Cuivre) (net 74)) - (segment (start 151.511 83.947) (end 151.4475 83.8835) (width 0.254) (layer Composant) (net 74)) - (segment (start 151.4475 83.8835) (end 150.8125 83.8835) (width 0.254) (layer Composant) (net 74)) - (segment (start 152.4 83.82) (end 151.638 83.82) (width 0.254) (layer Cuivre) (net 74)) - (via (at 179.705 102.87) (size 0.889) (layers Composant Cuivre) (net 74)) - (segment (start 139.8905 92.3036) (end 139.827 91.948) (width 0.254) (layer Composant) (net 74)) - (segment (start 139.827 91.948) (end 139.827 88.519) (width 0.254) (layer Composant) (net 74)) - (segment (start 139.827 88.519) (end 140.208 88.138) (width 0.254) (layer Composant) (net 74)) - (segment (start 140.208 88.138) (end 143.002 88.138) (width 0.254) (layer Composant) (net 74)) - (segment (start 143.002 88.138) (end 143.383 87.757) (width 0.254) (layer Composant) (net 74)) - (segment (start 143.383 87.757) (end 143.383 84.074) (width 0.254) (layer Composant) (net 74)) - (segment (start 143.383 84.074) (end 144.145 83.312) (width 0.254) (layer Composant) (net 74)) - (segment (start 144.145 83.312) (end 150.241 83.312) (width 0.254) (layer Composant) (net 74)) - (segment (start 150.241 83.312) (end 150.8125 83.8835) (width 0.254) (layer Composant) (net 74)) - (segment (start 139.8778 93.726) (end 139.8905 92.3036) (width 0.254) (layer Composant) (net 74) (status 800)) - (segment (start 170.815 80.899) (end 165.862 80.899) (width 0.254) (layer Cuivre) (net 74)) - (segment (start 164.973 81.788) (end 165.862 80.899) (width 0.254) (layer Cuivre) (net 74)) - (segment (start 154.432 81.788) (end 164.973 81.788) (width 0.254) (layer Cuivre) (net 74)) - (segment (start 152.4 83.82) (end 154.432 81.788) (width 0.254) (layer Cuivre) (net 74)) - (segment (start 172.085 79.629) (end 170.815 80.899) (width 0.254) (layer Cuivre) (net 74) (status 800)) - (segment (start 179.705 104.394) (end 179.705 102.87) (width 0.254) (layer GND_layer) (net 74)) - (segment (start 181.102 105.791) (end 179.705 104.394) (width 0.254) (layer GND_layer) (net 74)) - (segment (start 182.245 105.791) (end 181.102 105.791) (width 0.254) (layer GND_layer) (net 74)) - (segment (start 183.515 107.061) (end 182.245 105.791) (width 0.254) (layer GND_layer) (net 74)) - (segment (start 174.244 131.318) (end 183.515 122.047) (width 0.254) (layer GND_layer) (net 74)) - (segment (start 174.244 131.318) (end 174.244 136.906) (width 0.254) (layer GND_layer) (net 74) (status 400)) - (segment (start 176.657 75.057) (end 172.085 79.629) (width 0.254) (layer GND_layer) (net 74) (status 400)) - (segment (start 178.308 75.057) (end 176.657 75.057) (width 0.254) (layer GND_layer) (net 74)) - (segment (start 178.943 92.456) (end 178.943 90.805) (width 0.254) (layer GND_layer) (net 74)) - (segment (start 122.428 94.488) (end 122.174 93.98) (width 0.254) (layer Composant) (net 75)) - (segment (start 134.366 82.55) (end 134.366 81.661) (width 0.254) (layer Cuivre) (net 75)) - (segment (start 134.366 81.661) (end 135.128 80.899) (width 0.254) (layer Cuivre) (net 75)) - (segment (start 135.128 80.899) (end 137.033 80.899) (width 0.254) (layer Cuivre) (net 75)) - (segment (start 137.033 80.899) (end 138.303 79.629) (width 0.254) (layer Cuivre) (net 75) (status 400)) - (via (at 134.366 82.55) (size 0.889) (layers Composant Cuivre) (net 75)) - (segment (start 125.603 120.015) (end 126.111 120.523) (width 0.254) (layer GND_layer) (net 75)) - (segment (start 127.254 138.176) (end 128.524 139.446) (width 0.254) (layer GND_layer) (net 75) (status 400)) - (segment (start 126.111 133.858) (end 126.111 120.523) (width 0.254) (layer GND_layer) (net 75)) - (segment (start 122.174 93.98) (end 122.174 92.456) (width 0.254) (layer Composant) (net 75)) - (segment (start 122.174 92.456) (end 128.397 86.233) (width 0.254) (layer Composant) (net 75)) - (segment (start 128.397 86.233) (end 130.302 86.233) (width 0.254) (layer Composant) (net 75)) - (segment (start 130.302 86.233) (end 133.858 82.677) (width 0.254) (layer Composant) (net 75)) - (segment (start 133.858 82.677) (end 134.366 82.55) (width 0.254) (layer Composant) (net 75)) - (segment (start 127.635 97.4852) (end 125.4252 97.4852) (width 0.254) (layer Composant) (net 75) (status 800)) - (segment (start 125.4252 97.4852) (end 122.428 94.488) (width 0.254) (layer Composant) (net 75)) - (segment (start 127.254 135.001) (end 126.111 133.858) (width 0.254) (layer GND_layer) (net 75)) - (segment (start 127.254 135.001) (end 127.254 138.176) (width 0.254) (layer GND_layer) (net 75)) - (segment (start 122.174 94.488) (end 122.936 95.25) (width 0.254) (layer GND_layer) (net 75)) - (segment (start 122.936 95.25) (end 124.841 95.25) (width 0.254) (layer GND_layer) (net 75)) - (segment (start 124.841 95.25) (end 125.603 96.012) (width 0.254) (layer GND_layer) (net 75)) - (segment (start 125.603 96.012) (end 125.603 120.015) (width 0.254) (layer GND_layer) (net 75)) - (via (at 122.174 93.98) (size 0.635) (layers Composant Cuivre) (net 75)) - (segment (start 122.174 93.98) (end 122.174 94.488) (width 0.254) (layer GND_layer) (net 75)) - (segment (start 187.325 84.963) (end 193.929 78.359) (width 0.254) (layer Cuivre) (net 76)) - (segment (start 141.351 84.836) (end 143.129 86.614) (width 0.254) (layer Cuivre) (net 76)) - (segment (start 139.446 84.836) (end 141.351 84.836) (width 0.254) (layer Cuivre) (net 76)) - (segment (start 139.065 85.217) (end 139.446 84.836) (width 0.254) (layer Cuivre) (net 76)) - (segment (start 139.065 85.598) (end 139.065 85.217) (width 0.254) (layer Cuivre) (net 76)) - (segment (start 131.064 135.89) (end 131.064 136.906) (width 0.254) (layer GND_layer) (net 76) (status 400)) - (segment (start 129.413 134.239) (end 131.064 135.89) (width 0.254) (layer GND_layer) (net 76)) - (segment (start 129.413 132.08) (end 129.413 134.239) (width 0.254) (layer GND_layer) (net 76)) - (segment (start 121.793 86.995) (end 122.555 87.757) (width 0.254) (layer GND_layer) (net 76)) - (segment (start 122.555 87.757) (end 124.714 87.757) (width 0.254) (layer GND_layer) (net 76)) - (segment (start 124.714 87.757) (end 127.127 90.17) (width 0.254) (layer GND_layer) (net 76)) - (segment (start 127.127 90.17) (end 127.127 117.856) (width 0.254) (layer GND_layer) (net 76)) - (segment (start 127.127 117.856) (end 128.27 118.999) (width 0.254) (layer GND_layer) (net 76)) - (segment (start 121.793 85.598) (end 121.793 86.741) (width 0.254) (layer Cuivre) (net 76)) - (segment (start 121.793 86.741) (end 122.428 87.376) (width 0.254) (layer Cuivre) (net 76)) - (segment (start 122.428 87.376) (end 137.795 87.376) (width 0.254) (layer Cuivre) (net 76)) - (segment (start 137.795 87.376) (end 139.065 86.106) (width 0.254) (layer Cuivre) (net 76)) - (segment (start 139.065 86.106) (end 139.065 85.598) (width 0.254) (layer Cuivre) (net 76)) - (via (at 121.793 85.598) (size 0.889) (layers Composant Cuivre) (net 76)) - (segment (start 143.129 86.614) (end 153.543 86.614) (width 0.254) (layer Cuivre) (net 76)) - (segment (start 153.543 86.614) (end 155.194 84.963) (width 0.254) (layer Cuivre) (net 76)) - (segment (start 155.194 84.963) (end 173.101 84.963) (width 0.254) (layer Cuivre) (net 76)) - (segment (start 173.101 84.963) (end 174.117 83.947) (width 0.254) (layer Cuivre) (net 76)) - (segment (start 177.419 83.947) (end 178.435 84.963) (width 0.254) (layer Cuivre) (net 76)) - (segment (start 178.435 84.963) (end 187.325 84.963) (width 0.254) (layer Cuivre) (net 76)) - (segment (start 121.793 85.598) (end 121.793 86.995) (width 0.254) (layer GND_layer) (net 76)) - (segment (start 128.27 118.999) (end 128.27 130.937) (width 0.254) (layer GND_layer) (net 76)) - (segment (start 129.413 132.08) (end 128.27 130.937) (width 0.254) (layer GND_layer) (net 76)) - (via (at 139.065 85.598) (size 0.635) (layers Composant Cuivre) (net 76)) - (segment (start 139.065 86.741) (end 139.065 85.598) (width 0.254) (layer Composant) (net 76)) - (segment (start 138.303 87.503) (end 139.065 86.741) (width 0.254) (layer Composant) (net 76)) - (segment (start 138.303 91.948) (end 138.303 87.503) (width 0.254) (layer Composant) (net 76)) - (segment (start 138.3919 92.3036) (end 138.303 91.948) (width 0.254) (layer Composant) (net 76)) - (segment (start 138.3792 93.726) (end 138.3919 92.3036) (width 0.254) (layer Composant) (net 76) (status 800)) - (segment (start 198.755 78.359) (end 200.025 77.089) (width 0.254) (layer Cuivre) (net 76) (status 400)) - (segment (start 193.929 78.359) (end 198.755 78.359) (width 0.254) (layer Cuivre) (net 76)) - (segment (start 174.117 83.947) (end 177.419 83.947) (width 0.254) (layer Cuivre) (net 76)) - (segment (start 148.844 87.884) (end 145.161 91.567) (width 0.254) (layer Composant) (net 77)) - (segment (start 176.784 130.556) (end 185.42 121.92) (width 0.254) (layer GND_layer) (net 77)) - (segment (start 148.844 84.836) (end 148.844 87.884) (width 0.254) (layer Composant) (net 77)) - (segment (start 176.784 130.556) (end 176.784 136.906) (width 0.254) (layer GND_layer) (net 77) (status 400)) - (segment (start 153.289 80.772) (end 164.973 80.772) (width 0.254) (layer Cuivre) (net 77)) - (segment (start 164.973 80.772) (end 167.386 78.359) (width 0.254) (layer Cuivre) (net 77)) - (segment (start 167.386 78.359) (end 170.815 78.359) (width 0.254) (layer Cuivre) (net 77)) - (segment (start 170.815 78.359) (end 172.085 77.089) (width 0.254) (layer Cuivre) (net 77) (status 400)) - (segment (start 172.085 77.089) (end 174.879 74.295) (width 0.254) (layer GND_layer) (net 77) (status 800)) - (segment (start 174.879 74.295) (end 178.562 74.295) (width 0.254) (layer GND_layer) (net 77)) - (segment (start 178.562 74.295) (end 180.975 76.708) (width 0.254) (layer GND_layer) (net 77)) - (segment (start 180.975 76.708) (end 180.975 90.932) (width 0.254) (layer GND_layer) (net 77)) - (segment (start 180.975 90.932) (end 181.483 91.44) (width 0.254) (layer GND_layer) (net 77)) - (segment (start 181.483 91.44) (end 181.483 102.489) (width 0.254) (layer GND_layer) (net 77)) - (segment (start 181.483 102.489) (end 185.42 106.426) (width 0.254) (layer GND_layer) (net 77)) - (segment (start 185.42 106.426) (end 185.42 121.92) (width 0.254) (layer GND_layer) (net 77)) - (segment (start 149.14452 85.13652) (end 150.06748 85.13652) (width 0.254) (layer Cuivre) (net 77)) - (segment (start 150.06748 85.13652) (end 150.749 84.455) (width 0.254) (layer Cuivre) (net 77)) - (segment (start 150.749 84.455) (end 150.749 83.312) (width 0.254) (layer Cuivre) (net 77)) - (segment (start 150.749 83.312) (end 153.289 80.772) (width 0.254) (layer Cuivre) (net 77)) - (segment (start 148.844 84.836) (end 149.14452 85.13652) (width 0.254) (layer Cuivre) (net 77)) - (via (at 148.844 84.836) (size 0.889) (layers Composant Cuivre) (net 77)) - (segment (start 143.9164 95.4786) (end 143.129 95.4786) (width 0.254) (layer Composant) (net 77) (status 400)) - (segment (start 145.161 94.234) (end 143.9164 95.4786) (width 0.254) (layer Composant) (net 77)) - (segment (start 145.161 91.567) (end 145.161 94.234) (width 0.254) (layer Composant) (net 77)) - (segment (start 121.158 114.95532) (end 122.174 113.93932) (width 0.254) (layer GND_layer) (net 78)) - (segment (start 121.158 114.95532) (end 121.158 128.397) (width 0.254) (layer GND_layer) (net 78)) - (segment (start 121.158 128.397) (end 125.349 132.588) (width 0.254) (layer GND_layer) (net 78)) - (segment (start 125.984 135.89) (end 125.349 135.255) (width 0.254) (layer GND_layer) (net 78)) - (segment (start 125.984 136.906) (end 125.984 135.89) (width 0.254) (layer GND_layer) (net 78) (status 800)) - (via (at 123.952 93.98) (size 0.635) (layers Composant Cuivre) (net 78)) - (segment (start 125.9078 96.4438) (end 127.635 96.4692) (width 0.254) (layer Composant) (net 78) (status 400)) - (segment (start 123.952 94.488) (end 125.9078 96.4438) (width 0.254) (layer Composant) (net 78)) - (segment (start 122.174 104.902) (end 122.174 113.93932) (width 0.254) (layer GND_layer) (net 78)) - (segment (start 125.095 96.393) (end 125.095 101.981) (width 0.254) (layer GND_layer) (net 78)) - (segment (start 134.239 83.82) (end 130.81 87.249) (width 0.254) (layer Composant) (net 78)) - (segment (start 130.81 87.249) (end 128.905 87.249) (width 0.254) (layer Composant) (net 78)) - (segment (start 128.905 87.249) (end 123.952 92.202) (width 0.254) (layer Composant) (net 78)) - (segment (start 123.952 92.202) (end 123.952 93.98) (width 0.254) (layer Composant) (net 78)) - (segment (start 123.952 93.98) (end 123.952 93.472) (width 0.254) (layer GND_layer) (net 78)) - (segment (start 123.952 93.472) (end 123.571 93.091) (width 0.254) (layer GND_layer) (net 78)) - (segment (start 123.571 93.091) (end 121.92 93.091) (width 0.254) (layer GND_layer) (net 78)) - (segment (start 138.303 83.82) (end 134.239 83.82) (width 0.254) (layer Composant) (net 78)) - (segment (start 139.446 82.677) (end 138.303 83.82) (width 0.254) (layer Composant) (net 78)) - (segment (start 138.303 77.089) (end 139.446 78.232) (width 0.254) (layer Composant) (net 78) (status 800)) - (segment (start 121.92 93.091) (end 121.412 93.599) (width 0.254) (layer GND_layer) (net 78)) - (segment (start 121.412 93.599) (end 121.412 94.615) (width 0.254) (layer GND_layer) (net 78)) - (segment (start 121.412 94.615) (end 122.555 95.758) (width 0.254) (layer GND_layer) (net 78)) - (segment (start 122.555 95.758) (end 124.46 95.758) (width 0.254) (layer GND_layer) (net 78)) - (segment (start 139.446 78.232) (end 139.446 82.677) (width 0.254) (layer Composant) (net 78)) - (segment (start 123.952 93.98) (end 123.952 94.488) (width 0.254) (layer Composant) (net 78)) - (segment (start 125.349 132.588) (end 125.349 135.255) (width 0.254) (layer GND_layer) (net 78)) - (segment (start 124.46 95.758) (end 125.095 96.393) (width 0.254) (layer GND_layer) (net 78)) - (segment (start 125.095 101.981) (end 122.174 104.902) (width 0.254) (layer GND_layer) (net 78)) - (segment (start 130.429 129.921) (end 130.429 133.731) (width 0.254) (layer GND_layer) (net 79)) - (segment (start 141.605 84.328) (end 143.383 86.106) (width 0.254) (layer Cuivre) (net 79)) - (segment (start 125.095 85.852) (end 128.143 88.9) (width 0.254) (layer GND_layer) (net 79)) - (segment (start 124.587 86.233) (end 125.222 86.868) (width 0.254) (layer Cuivre) (net 79)) - (segment (start 124.587 85.852) (end 124.587 86.233) (width 0.254) (layer Cuivre) (net 79)) - (segment (start 130.429 133.731) (end 133.604 136.906) (width 0.254) (layer GND_layer) (net 79) (status 400)) - (segment (start 129.9845 129.4765) (end 130.429 129.921) (width 0.254) (layer GND_layer) (net 79)) - (segment (start 129.9845 109.7915) (end 129.9845 129.4765) (width 0.254) (layer GND_layer) (net 79)) - (via (at 124.587 85.852) (size 0.889) (layers Composant Cuivre) (net 79)) - (via (at 138.176 85.598) (size 0.635) (layers Composant Cuivre) (net 79)) - (segment (start 138.176 86.614) (end 138.176 85.598) (width 0.254) (layer Composant) (net 79)) - (segment (start 138.176 85.598) (end 138.176 85.217) (width 0.254) (layer Cuivre) (net 79)) - (segment (start 137.795 86.995) (end 138.176 86.614) (width 0.254) (layer Composant) (net 79)) - (segment (start 137.795 91.948) (end 137.795 86.995) (width 0.254) (layer Composant) (net 79)) - (segment (start 137.8839 92.3036) (end 137.795 91.948) (width 0.254) (layer Composant) (net 79)) - (segment (start 137.8712 93.726) (end 137.8839 92.3036) (width 0.254) (layer Composant) (net 79) (status 800)) - (segment (start 138.176 86.106) (end 138.176 85.598) (width 0.254) (layer Cuivre) (net 79)) - (segment (start 138.176 85.217) (end 139.065 84.328) (width 0.254) (layer Cuivre) (net 79)) - (segment (start 139.065 84.328) (end 141.605 84.328) (width 0.254) (layer Cuivre) (net 79)) - (segment (start 125.222 86.868) (end 137.414 86.868) (width 0.254) (layer Cuivre) (net 79)) - (segment (start 143.383 86.106) (end 153.289 86.106) (width 0.254) (layer Cuivre) (net 79)) - (segment (start 153.289 86.106) (end 154.94 84.455) (width 0.254) (layer Cuivre) (net 79)) - (segment (start 154.94 84.455) (end 172.847 84.455) (width 0.254) (layer Cuivre) (net 79)) - (segment (start 172.847 84.455) (end 173.99 83.312) (width 0.254) (layer Cuivre) (net 79)) - (segment (start 173.99 83.312) (end 177.673 83.312) (width 0.254) (layer Cuivre) (net 79)) - (segment (start 177.673 83.312) (end 178.816 84.455) (width 0.254) (layer Cuivre) (net 79)) - (segment (start 178.816 84.455) (end 186.563 84.455) (width 0.254) (layer Cuivre) (net 79)) - (segment (start 186.563 84.455) (end 195.199 75.819) (width 0.254) (layer Cuivre) (net 79)) - (segment (start 195.199 75.819) (end 198.755 75.819) (width 0.254) (layer Cuivre) (net 79)) - (segment (start 198.755 75.819) (end 200.025 74.549) (width 0.254) (layer Cuivre) (net 79) (status 400)) - (segment (start 124.587 85.852) (end 125.095 85.852) (width 0.254) (layer GND_layer) (net 79)) - (segment (start 137.414 86.868) (end 138.176 86.106) (width 0.254) (layer Cuivre) (net 79)) - (segment (start 128.143 88.9) (end 128.143 107.95) (width 0.254) (layer GND_layer) (net 79)) - (segment (start 128.143 107.95) (end 129.9845 109.7915) (width 0.254) (layer GND_layer) (net 79)) - (segment (start 152.654 80.01) (end 149.86 82.804) (width 0.254) (layer Cuivre) (net 80)) - (segment (start 186.436 105.918) (end 186.436 122.936) (width 0.254) (layer GND_layer) (net 80)) - (segment (start 179.324 130.048) (end 186.436 122.936) (width 0.254) (layer GND_layer) (net 80)) - (segment (start 183.134 77.089) (end 183.134 102.616) (width 0.254) (layer GND_layer) (net 80)) - (segment (start 178.562 72.517) (end 183.134 77.089) (width 0.254) (layer GND_layer) (net 80)) - (segment (start 174.117 72.517) (end 178.562 72.517) (width 0.254) (layer GND_layer) (net 80)) - (segment (start 172.085 74.549) (end 174.117 72.517) (width 0.254) (layer GND_layer) (net 80) (status 800)) - (segment (start 170.815 75.819) (end 172.085 74.549) (width 0.254) (layer Cuivre) (net 80) (status 400)) - (segment (start 168.91 75.819) (end 170.815 75.819) (width 0.254) (layer Cuivre) (net 80)) - (segment (start 164.719 80.01) (end 168.91 75.819) (width 0.254) (layer Cuivre) (net 80)) - (segment (start 152.654 80.01) (end 164.719 80.01) (width 0.254) (layer Cuivre) (net 80)) - (segment (start 145.669 94.742) (end 144.4498 95.9612) (width 0.254) (layer Composant) (net 80)) - (via (at 149.86 84.201) (size 0.889) (layers Composant Cuivre) (net 80)) - (segment (start 144.4498 95.9612) (end 143.129 95.9612) (width 0.254) (layer Composant) (net 80) (status 400)) - (segment (start 149.86 82.804) (end 149.86 84.201) (width 0.254) (layer Cuivre) (net 80)) - (segment (start 145.669 91.821) (end 145.669 94.742) (width 0.254) (layer Composant) (net 80)) - (segment (start 183.134 102.616) (end 186.436 105.918) (width 0.254) (layer GND_layer) (net 80)) - (segment (start 149.86 87.63) (end 145.669 91.821) (width 0.254) (layer Composant) (net 80)) - (segment (start 149.86 84.201) (end 149.86 87.63) (width 0.254) (layer Composant) (net 80)) - (segment (start 179.324 130.048) (end 179.324 136.906) (width 0.254) (layer GND_layer) (net 80) (status 400)) - (segment (start 126.873 120.142) (end 126.873 132.715) (width 0.254) (layer GND_layer) (net 81)) - (segment (start 123.063 93.98) (end 123.317 94.361) (width 0.254) (layer GND_layer) (net 81)) - (via (at 123.063 93.98) (size 0.635) (layers Composant Cuivre) (net 81)) - (segment (start 123.063 93.98) (end 123.063 92.329) (width 0.254) (layer Composant) (net 81)) - (segment (start 126.111 119.38) (end 126.873 120.142) (width 0.254) (layer GND_layer) (net 81)) - (segment (start 126.111 95.631) (end 126.111 119.38) (width 0.254) (layer GND_layer) (net 81)) - (segment (start 125.222 94.742) (end 126.111 95.631) (width 0.254) (layer GND_layer) (net 81)) - (segment (start 123.698 94.742) (end 125.222 94.742) (width 0.254) (layer GND_layer) (net 81)) - (segment (start 123.317 94.361) (end 123.698 94.742) (width 0.254) (layer GND_layer) (net 81)) - (segment (start 123.063 93.98) (end 123.19 94.488) (width 0.254) (layer Composant) (net 81)) - (segment (start 123.19 94.488) (end 125.6792 96.9772) (width 0.254) (layer Composant) (net 81)) - (segment (start 128.143 133.985) (end 126.873 132.715) (width 0.254) (layer GND_layer) (net 81)) - (segment (start 125.6792 96.9772) (end 127.635 96.9772) (width 0.254) (layer Composant) (net 81) (status 400)) - (segment (start 123.063 92.329) (end 128.651 86.741) (width 0.254) (layer Composant) (net 81)) - (segment (start 128.651 86.741) (end 130.556 86.741) (width 0.254) (layer Composant) (net 81)) - (segment (start 130.556 86.741) (end 133.985 83.312) (width 0.254) (layer Composant) (net 81)) - (segment (start 133.985 83.312) (end 136.271 83.312) (width 0.254) (layer Composant) (net 81)) - (segment (start 136.271 83.312) (end 137.033 82.55) (width 0.254) (layer Composant) (net 81)) - (segment (start 137.033 82.55) (end 137.033 75.819) (width 0.254) (layer Composant) (net 81)) - (segment (start 137.033 75.819) (end 138.303 74.549) (width 0.254) (layer Composant) (net 81) (status 400)) - (segment (start 128.143 133.985) (end 128.143 135.382) (width 0.254) (layer GND_layer) (net 81)) - (segment (start 128.524 135.763) (end 128.524 136.906) (width 0.254) (layer GND_layer) (net 81) (status 400)) - (segment (start 128.143 135.382) (end 128.524 135.763) (width 0.254) (layer GND_layer) (net 81)) - (segment (start 117.729 116.332) (end 117.729 131.445) (width 0.381) (layer GND_layer) (net 82)) - (segment (start 122.8725 108.712) (end 121.793 108.712) (width 0.381) (layer Composant) (net 82) (status 800)) - (segment (start 121.793 108.712) (end 120.777 107.696) (width 0.381) (layer Composant) (net 82) (status 400)) - (via (at 117.729 116.332) (size 0.889) (layers Composant Cuivre) (net 82)) - (segment (start 125.984 107.569) (end 126.3015 107.2515) (width 0.254) (layer Composant) (net 82)) - (segment (start 125.984 110.49) (end 125.984 107.569) (width 0.254) (layer Composant) (net 82)) - (segment (start 127.635 107.4674) (end 126.5174 107.4674) (width 0.254) (layer Composant) (net 82) (status 800)) - (segment (start 126.56312 106.9848) (end 126.3015 107.2515) (width 0.254) (layer Composant) (net 82)) - (segment (start 127.635 106.9848) (end 126.56312 106.9848) (width 0.254) (layer Composant) (net 82) (status 800)) - (segment (start 113.284 136.906) (end 115.824 136.906) (width 0.254) (layer 3.3V_layer) (net 82) (status C00)) - (segment (start 120.65 111.506) (end 120.65 113.411) (width 0.381) (layer Composant) (net 82)) - (segment (start 120.65 113.411) (end 117.729 116.332) (width 0.381) (layer Composant) (net 82)) - (segment (start 117.602 131.572) (end 115.824 133.35) (width 0.381) (layer GND_layer) (net 82)) - (segment (start 115.824 133.35) (end 115.824 136.906) (width 0.381) (layer GND_layer) (net 82) (status 400)) - (segment (start 120.777 107.696) (end 120.777 110.109) (width 0.381) (layer Composant) (net 82) (status 800)) - (segment (start 120.777 110.109) (end 120.65 110.236) (width 0.381) (layer Composant) (net 82) (status 400)) - (segment (start 125.984 110.49) (end 124.968 111.506) (width 0.254) (layer Composant) (net 82)) - (segment (start 124.968 111.506) (end 120.65 111.506) (width 0.254) (layer Composant) (net 82)) - (segment (start 126.5174 107.4674) (end 126.3015 107.2515) (width 0.254) (layer Composant) (net 82)) - (segment (start 117.729 131.445) (end 117.602 131.445) (width 0.381) (layer GND_layer) (net 82)) - (segment (start 117.602 131.445) (end 117.602 131.572) (width 0.381) (layer GND_layer) (net 82)) - (segment (start 120.65 110.236) (end 120.65 111.506) (width 0.381) (layer Composant) (net 82) (status 800)) - (segment (start 217.17 134.62) (end 218.44 135.89) (width 0.254) (layer 3.3V_layer) (net 83) (status 800)) - (segment (start 223.52 135.89) (end 224.79 134.62) (width 0.254) (layer 3.3V_layer) (net 83) (status 400)) - (segment (start 218.44 135.89) (end 223.52 135.89) (width 0.254) (layer 3.3V_layer) (net 83)) - (segment (start 178.19624 123.00204) (end 179.63642 124.44222) (width 0.254) (layer Composant) (net 84)) - (segment (start 136.652 124.0155) (end 130.048 124.0155) (width 0.381) (layer Composant) (net 84) (status 800)) - (segment (start 202.4761 111.0107) (end 212.9155 111.0107) (width 0.254) (layer Composant) (net 84) (status 400)) - (segment (start 168.6179 123.00204) (end 178.19624 123.00204) (width 0.254) (layer Composant) (net 84)) - (segment (start 138.049 123.317) (end 137.62736 123.73864) (width 0.25) (layer Composant) (net 84)) - (segment (start 139.8778 109.22) (end 139.8778 111.0488) (width 0.25) (layer Composant) (net 84) (status 800)) - (segment (start 139.8778 111.0488) (end 139.954 111.379) (width 0.25) (layer Composant) (net 84)) - (segment (start 138.049 121.031) (end 138.049 123.317) (width 0.25) (layer Composant) (net 84)) - (segment (start 141.224 117.856) (end 138.049 121.031) (width 0.25) (layer Composant) (net 84)) - (segment (start 141.224 115.697) (end 141.224 117.856) (width 0.25) (layer Composant) (net 84)) - (segment (start 139.954 114.3) (end 141.224 115.697) (width 0.25) (layer Composant) (net 84)) - (segment (start 139.954 111.379) (end 139.954 114.3) (width 0.25) (layer Composant) (net 84)) - (segment (start 137.3505 124.0155) (end 136.652 124.0155) (width 0.381) (layer Composant) (net 84) (status 400)) - (segment (start 137.62736 123.73864) (end 137.3505 124.0155) (width 0.381) (layer Composant) (net 84)) - (segment (start 166.35222 125.26772) (end 168.6179 123.00204) (width 0.254) (layer Composant) (net 84)) - (segment (start 189.04458 124.44222) (end 202.4761 111.0107) (width 0.254) (layer Composant) (net 84)) - (segment (start 179.63642 124.44222) (end 189.04458 124.44222) (width 0.254) (layer Composant) (net 84)) - (segment (start 130.048 124.0155) (end 128.27 122.2375) (width 0.381) (layer Composant) (net 84) (status 400)) - (segment (start 128.27 122.2375) (end 127.0635 122.2375) (width 0.381) (layer Composant) (net 84) (status 800)) - (segment (start 127.0635 122.2375) (end 123.444 125.857) (width 0.381) (layer Composant) (net 84) (status 400)) - (segment (start 137.62736 123.73864) (end 139.15644 125.26772) (width 0.254) (layer Composant) (net 84)) - (segment (start 139.15644 125.26772) (end 166.35222 125.26772) (width 0.254) (layer Composant) (net 84)) - (segment (start 181.61 118.999) (end 182.372 119.761) (width 0.381) (layer Composant) (net 85)) - (segment (start 181.61 118.999) (end 181.61 110.236) (width 0.254) (layer GND_layer) (net 85)) - (segment (start 179.705 120.904) (end 181.61 118.999) (width 0.254) (layer GND_layer) (net 85)) - (segment (start 182.499 141.351) (end 171.323 141.351) (width 0.254) (layer GND_layer) (net 85)) - (segment (start 171.323 141.351) (end 170.434 140.462) (width 0.254) (layer GND_layer) (net 85)) - (segment (start 170.434 140.462) (end 170.434 131.953) (width 0.254) (layer GND_layer) (net 85)) - (segment (start 179.705 123.317) (end 175.133 127.889) (width 0.254) (layer GND_layer) (net 85)) - (via (at 181.61 118.999) (size 0.889) (layers Composant Cuivre) (net 85)) - (via (at 172.466 92.964) (size 0.889) (layers Composant Cuivre) (net 85)) - (segment (start 184.404 139.446) (end 182.499 141.351) (width 0.254) (layer GND_layer) (net 85) (status 800)) - (via (at 150.495 95.25) (size 0.889) (layers Composant Cuivre) (net 85)) - (via (at 181.61 110.236) (size 0.635) (layers Composant Cuivre) (net 85)) - (segment (start 179.705 120.904) (end 179.705 123.317) (width 0.254) (layer GND_layer) (net 85)) - (segment (start 174.498 127.889) (end 170.434 131.953) (width 0.254) (layer GND_layer) (net 85)) - (segment (start 175.133 127.889) (end 174.498 127.889) (width 0.254) (layer GND_layer) (net 85)) - (segment (start 188.7982 105.3211) (end 188.9887 105.5116) (width 0.254) (layer Composant) (net 85)) - (segment (start 188.9887 105.5116) (end 190.9445 105.5116) (width 0.254) (layer Composant) (net 85) (status 400)) - (segment (start 181.61 110.236) (end 183.8833 110.236) (width 0.254) (layer 3.3V_layer) (net 85)) - (segment (start 183.8833 110.236) (end 188.7982 105.3211) (width 0.254) (layer 3.3V_layer) (net 85)) - (segment (start 150.495 95.25) (end 156.718 95.25) (width 0.254) (layer Cuivre) (net 85)) - (via (at 188.7982 105.3211) (size 0.889) (layers Composant Cuivre) (net 85)) - (segment (start 182.372 119.761) (end 183.769 119.761) (width 0.381) (layer Composant) (net 85)) - (segment (start 183.769 119.761) (end 184.7215 121.158) (width 0.381) (layer Composant) (net 85) (status 400)) - (segment (start 147.574 101.981) (end 143.129 101.9556) (width 0.254) (layer Composant) (net 85) (status 400)) - (segment (start 148.717 100.838) (end 147.574 101.981) (width 0.254) (layer Composant) (net 85)) - (segment (start 148.717 97.028) (end 148.717 100.838) (width 0.254) (layer Composant) (net 85)) - (segment (start 150.495 95.25) (end 148.717 97.028) (width 0.254) (layer Composant) (net 85)) - (segment (start 179.451 110.236) (end 181.61 110.236) (width 0.254) (layer GND_layer) (net 85)) - (segment (start 178.562 111.125) (end 179.451 110.236) (width 0.254) (layer GND_layer) (net 85)) - (segment (start 175.641 111.125) (end 178.562 111.125) (width 0.254) (layer GND_layer) (net 85)) - (segment (start 156.718 95.25) (end 160.528 91.44) (width 0.254) (layer Cuivre) (net 85)) - (segment (start 160.528 91.44) (end 163.576 91.44) (width 0.254) (layer Cuivre) (net 85)) - (segment (start 163.576 91.44) (end 165.989 93.853) (width 0.254) (layer Cuivre) (net 85)) - (segment (start 165.989 93.853) (end 170.561 93.853) (width 0.254) (layer Cuivre) (net 85)) - (segment (start 170.561 93.853) (end 171.45 92.964) (width 0.254) (layer Cuivre) (net 85)) - (segment (start 171.45 92.964) (end 172.466 92.964) (width 0.254) (layer Cuivre) (net 85)) - (segment (start 172.466 92.964) (end 172.466 107.95) (width 0.254) (layer GND_layer) (net 85)) - (segment (start 172.466 107.95) (end 175.641 111.125) (width 0.254) (layer GND_layer) (net 85)) - (segment (start 188.43752 106.18978) (end 189.16142 106.18978) (width 0.254) (layer Composant) (net 86)) - (segment (start 147.32 101.473) (end 143.129 101.473) (width 0.254) (layer Composant) (net 86) (status 400)) - (via (at 179.705 92.202) (size 0.635) (layers Composant Cuivre) (net 86)) - (via (at 181.61 104.902) (size 0.635) (layers Composant Cuivre) (net 86)) - (via (at 149.352 95.25) (size 0.635) (layers Composant Cuivre) (net 86)) - (via (at 184.531 118.872) (size 0.889) (layers Composant Cuivre) (net 86)) - (segment (start 175.514 130.937) (end 175.514 138.176) (width 0.254) (layer GND_layer) (net 86)) - (segment (start 148.209 100.584) (end 147.32 101.473) (width 0.254) (layer Composant) (net 86)) - (segment (start 189.3443 106.0069) (end 190.9445 106.0069) (width 0.254) (layer Composant) (net 86) (status 400)) - (segment (start 189.16142 106.18978) (end 189.3443 106.0069) (width 0.254) (layer Composant) (net 86)) - (segment (start 148.209 96.647) (end 148.209 100.584) (width 0.254) (layer Composant) (net 86)) - (segment (start 149.098 95.758) (end 148.209 96.647) (width 0.254) (layer Composant) (net 86)) - (segment (start 149.352 95.25) (end 149.098 95.758) (width 0.254) (layer Composant) (net 86)) - (segment (start 182.245 104.902) (end 181.61 104.902) (width 0.254) (layer GND_layer) (net 86)) - (segment (start 181.61 104.902) (end 187.14974 104.902) (width 0.254) (layer Composant) (net 86)) - (segment (start 184.531 107.188) (end 182.245 104.902) (width 0.254) (layer GND_layer) (net 86)) - (segment (start 184.7215 123.444) (end 185.928 122.2375) (width 0.254) (layer Composant) (net 86) (status 800)) - (segment (start 180.467 92.964) (end 179.705 92.202) (width 0.254) (layer GND_layer) (net 86)) - (segment (start 180.467 104.267) (end 180.467 92.964) (width 0.254) (layer GND_layer) (net 86)) - (segment (start 185.928 122.2375) (end 185.928 119.253) (width 0.254) (layer Composant) (net 86)) - (segment (start 185.928 119.253) (end 185.547 118.872) (width 0.254) (layer Composant) (net 86)) - (segment (start 185.547 118.872) (end 184.531 118.872) (width 0.254) (layer Composant) (net 86)) - (segment (start 184.531 118.872) (end 184.531 107.188) (width 0.254) (layer GND_layer) (net 86)) - (segment (start 187.14974 104.902) (end 188.43752 106.18978) (width 0.254) (layer Composant) (net 86)) - (segment (start 181.102 104.902) (end 180.467 104.267) (width 0.254) (layer GND_layer) (net 86)) - (segment (start 181.61 104.902) (end 181.102 104.902) (width 0.254) (layer GND_layer) (net 86)) - (segment (start 179.197 91.694) (end 179.705 92.202) (width 0.254) (layer Cuivre) (net 86)) - (segment (start 177.927 91.694) (end 179.197 91.694) (width 0.254) (layer Cuivre) (net 86)) - (segment (start 177.419 91.186) (end 177.927 91.694) (width 0.254) (layer Cuivre) (net 86)) - (segment (start 175.514 91.186) (end 177.419 91.186) (width 0.254) (layer Cuivre) (net 86)) - (segment (start 175.006 91.694) (end 175.514 91.186) (width 0.254) (layer Cuivre) (net 86)) - (segment (start 171.45 91.694) (end 175.006 91.694) (width 0.254) (layer Cuivre) (net 86)) - (segment (start 169.799 93.345) (end 171.45 91.694) (width 0.254) (layer Cuivre) (net 86)) - (segment (start 166.37 93.345) (end 169.799 93.345) (width 0.254) (layer Cuivre) (net 86)) - (segment (start 163.957 90.932) (end 166.37 93.345) (width 0.254) (layer Cuivre) (net 86)) - (segment (start 160.274 90.932) (end 163.957 90.932) (width 0.254) (layer Cuivre) (net 86)) - (segment (start 156.718 94.488) (end 160.274 90.932) (width 0.254) (layer Cuivre) (net 86)) - (segment (start 149.606 94.488) (end 156.718 94.488) (width 0.254) (layer Cuivre) (net 86)) - (segment (start 149.352 94.742) (end 149.606 94.488) (width 0.254) (layer Cuivre) (net 86)) - (segment (start 149.352 95.25) (end 149.352 94.742) (width 0.254) (layer Cuivre) (net 86)) - (segment (start 184.531 118.872) (end 184.531 121.92) (width 0.254) (layer GND_layer) (net 86)) - (segment (start 175.514 130.937) (end 184.531 121.92) (width 0.254) (layer GND_layer) (net 86)) - (segment (start 176.784 139.446) (end 175.514 138.176) (width 0.254) (layer GND_layer) (net 86) (status 800)) - (segment (start 183.32196 106.61396) (end 189.33922 106.61396) (width 0.254) (layer Composant) (net 87)) - (segment (start 182.45582 105.74782) (end 183.32196 106.61396) (width 0.254) (layer Composant) (net 87)) - (segment (start 181.58714 105.74782) (end 182.45582 105.74782) (width 0.254) (layer Composant) (net 87)) - (segment (start 180.76926 104.92994) (end 181.58714 105.74782) (width 0.254) (layer Composant) (net 87)) - (segment (start 180.76926 104.85374) (end 180.76926 104.92994) (width 0.254) (layer Composant) (net 87)) - (segment (start 181.61 104.013) (end 180.76926 104.85374) (width 0.254) (layer Composant) (net 87)) - (segment (start 148.717 94.869) (end 149.098 94.488) (width 0.254) (layer GND_layer) (net 87)) - (segment (start 149.098 94.488) (end 150.876 94.488) (width 0.254) (layer GND_layer) (net 87)) - (segment (start 150.876 94.488) (end 151.257 94.869) (width 0.254) (layer GND_layer) (net 87)) - (segment (start 151.257 94.869) (end 151.257 99.568) (width 0.254) (layer GND_layer) (net 87)) - (segment (start 151.257 99.568) (end 149.733 101.092) (width 0.254) (layer GND_layer) (net 87)) - (segment (start 149.733 101.092) (end 149.733 113.157) (width 0.254) (layer GND_layer) (net 87)) - (segment (start 149.733 113.157) (end 148.209 114.681) (width 0.254) (layer GND_layer) (net 87)) - (segment (start 148.209 114.681) (end 148.082 114.681) (width 0.254) (layer GND_layer) (net 87)) - (segment (start 148.082 114.681) (end 145.796 116.967) (width 0.254) (layer GND_layer) (net 87)) - (segment (start 145.796 116.967) (end 145.796 135.001) (width 0.254) (layer GND_layer) (net 87)) - (segment (start 146.304 135.509) (end 146.304 136.906) (width 0.254) (layer GND_layer) (net 87) (status 400)) - (segment (start 152.0825 93.853) (end 148.971 93.853) (width 0.381) (layer Composant) (net 87) (status 800)) - (segment (start 148.463 94.361) (end 148.463 95.25) (width 0.381) (layer Composant) (net 87)) - (segment (start 143.129 100.965) (end 147.066 100.965) (width 0.254) (layer Composant) (net 87) (status 800)) - (segment (start 147.066 100.965) (end 147.701 100.33) (width 0.254) (layer Composant) (net 87)) - (segment (start 147.701 100.33) (end 147.701 96.393) (width 0.254) (layer Composant) (net 87)) - (segment (start 147.701 96.393) (end 148.463 95.631) (width 0.254) (layer Composant) (net 87)) - (segment (start 148.463 95.631) (end 148.463 95.25) (width 0.254) (layer Composant) (net 87)) - (via (at 148.463 95.25) (size 0.635) (layers Composant Cuivre) (net 87)) - (via (at 179.959 91.059) (size 0.889) (layers Composant Cuivre) (net 87)) - (segment (start 174.752 91.059) (end 175.133 90.678) (width 0.254) (layer Cuivre) (net 87)) - (via (at 181.61 104.013) (size 0.635) (layers Composant Cuivre) (net 87)) - (segment (start 145.796 135.001) (end 146.304 135.509) (width 0.254) (layer GND_layer) (net 87)) - (segment (start 178.308 91.059) (end 179.959 91.059) (width 0.254) (layer Cuivre) (net 87)) - (segment (start 148.971 93.853) (end 148.463 94.361) (width 0.381) (layer Composant) (net 87)) - (segment (start 177.927 90.678) (end 178.308 91.059) (width 0.254) (layer Cuivre) (net 87)) - (segment (start 175.133 90.678) (end 177.927 90.678) (width 0.254) (layer Cuivre) (net 87)) - (segment (start 148.463 95.25) (end 148.717 94.869) (width 0.254) (layer GND_layer) (net 87)) - (segment (start 165.1 91.059) (end 174.752 91.059) (width 0.254) (layer Cuivre) (net 87)) - (segment (start 164.465 90.424) (end 165.1 91.059) (width 0.254) (layer Cuivre) (net 87)) - (segment (start 160.02 90.424) (end 164.465 90.424) (width 0.254) (layer Cuivre) (net 87)) - (segment (start 156.464 93.98) (end 160.02 90.424) (width 0.254) (layer Cuivre) (net 87)) - (segment (start 149.225 93.98) (end 156.464 93.98) (width 0.254) (layer Cuivre) (net 87)) - (segment (start 148.463 94.742) (end 149.225 93.98) (width 0.254) (layer Cuivre) (net 87)) - (segment (start 148.463 95.25) (end 148.463 94.742) (width 0.254) (layer Cuivre) (net 87)) - (segment (start 179.959 91.44) (end 179.959 91.059) (width 0.254) (layer GND_layer) (net 87)) - (segment (start 180.975 92.456) (end 179.959 91.44) (width 0.254) (layer GND_layer) (net 87)) - (segment (start 180.975 103.378) (end 180.975 92.456) (width 0.254) (layer GND_layer) (net 87)) - (segment (start 181.61 104.013) (end 180.975 103.378) (width 0.254) (layer GND_layer) (net 87)) - (segment (start 189.43828 106.5149) (end 190.9445 106.5149) (width 0.254) (layer Composant) (net 87) (status 400)) - (segment (start 189.33922 106.61396) (end 189.43828 106.5149) (width 0.254) (layer Composant) (net 87)) - (segment (start 199.136 95.123) (end 202.819 91.44) (width 0.254) (layer Cuivre) (net 88)) - (via (at 205.66126 78.74) (size 0.889) (layers Composant Cuivre) (net 88)) - (segment (start 197.1802 98.7552) (end 197.1802 100.7745) (width 0.254) (layer Composant) (net 88) (status 400)) - (segment (start 197.104 98.679) (end 197.1802 98.7552) (width 0.254) (layer Composant) (net 88)) - (via (at 197.104 98.679) (size 0.889) (layers Composant Cuivre) (net 88)) - (segment (start 197.104 96.647) (end 197.104 98.679) (width 0.254) (layer Cuivre) (net 88)) - (segment (start 199.136 95.123) (end 198.628 95.123) (width 0.254) (layer Cuivre) (net 88)) - (segment (start 202.819 91.44) (end 202.819 81.58226) (width 0.254) (layer Cuivre) (net 88)) - (segment (start 202.819 81.58226) (end 205.66126 78.74) (width 0.254) (layer Cuivre) (net 88)) - (segment (start 198.628 95.123) (end 197.104 96.647) (width 0.254) (layer Cuivre) (net 88)) - (segment (start 205.4225 76.835) (end 205.4225 77.83068) (width 0.254) (layer Composant) (net 88) (status 800)) - (segment (start 205.66126 78.06944) (end 205.66126 78.74) (width 0.254) (layer Composant) (net 88)) - (segment (start 205.4225 77.83068) (end 205.66126 78.06944) (width 0.254) (layer Composant) (net 88)) - (segment (start 205.4225 80.645) (end 205.4225 84.35594) (width 0.254) (layer Composant) (net 89) (status 800)) - (segment (start 204.56652 85.21192) (end 204.56652 90.96248) (width 0.254) (layer Cuivre) (net 89)) - (via (at 204.56652 85.21192) (size 0.889) (layers Composant Cuivre) (net 89)) - (segment (start 205.4225 84.35594) (end 204.56652 85.21192) (width 0.254) (layer Composant) (net 89)) - (segment (start 197.6755 99.3775) (end 198.247 98.806) (width 0.254) (layer Composant) (net 89)) - (segment (start 197.6755 100.7745) (end 197.6755 99.3775) (width 0.254) (layer Composant) (net 89) (status 800)) - (segment (start 199.39 96.139) (end 204.56652 90.96248) (width 0.254) (layer Cuivre) (net 89)) - (segment (start 198.247 98.806) (end 198.247 97.282) (width 0.254) (layer Composant) (net 89)) - (segment (start 198.247 97.282) (end 199.39 96.139) (width 0.254) (layer Composant) (net 89)) - (via (at 199.39 96.139) (size 0.889) (layers Composant Cuivre) (net 89)) - (segment (start 160.274 108.839) (end 160.274 89.916) (width 0.254) (layer GND_layer) (net 90)) - (segment (start 134.747 92.075) (end 132.461 92.075) (width 0.254) (layer Cuivre) (net 90)) - (segment (start 156.21 86.36) (end 167.259 86.36) (width 0.254) (layer Cuivre) (net 90)) - (segment (start 167.259 86.36) (end 167.513 86.106) (width 0.254) (layer Cuivre) (net 90)) - (segment (start 167.513 86.106) (end 173.482 86.106) (width 0.254) (layer Cuivre) (net 90)) - (segment (start 173.482 86.106) (end 174.625 84.963) (width 0.254) (layer Cuivre) (net 90)) - (segment (start 174.625 84.963) (end 176.53 84.963) (width 0.254) (layer Cuivre) (net 90)) - (segment (start 176.53 84.963) (end 177.673 86.106) (width 0.254) (layer Cuivre) (net 90)) - (segment (start 177.673 86.106) (end 178.816 86.106) (width 0.254) (layer Cuivre) (net 90)) - (segment (start 178.816 86.106) (end 179.197 86.487) (width 0.254) (layer Cuivre) (net 90)) - (segment (start 179.197 86.487) (end 179.197 89.027) (width 0.254) (layer GND_layer) (net 90)) - (segment (start 179.197 89.027) (end 177.8 90.424) (width 0.254) (layer GND_layer) (net 90)) - (segment (start 177.8 90.424) (end 177.8 105.283) (width 0.254) (layer GND_layer) (net 90)) - (segment (start 177.8 105.283) (end 178.054 105.664) (width 0.254) (layer GND_layer) (net 90)) - (segment (start 132.3848 93.726) (end 132.3848 92.5576) (width 0.254) (layer Composant) (net 90) (status 800)) - (segment (start 164.846 138.176) (end 165.354 137.668) (width 0.254) (layer GND_layer) (net 90)) - (segment (start 132.3848 92.5576) (end 132.461 92.075) (width 0.254) (layer Composant) (net 90)) - (via (at 180.721 111.45774) (size 0.889) (layers Composant Cuivre) (net 90)) - (segment (start 136.906 89.916) (end 134.747 92.075) (width 0.254) (layer Cuivre) (net 90)) - (via (at 154.813 87.757) (size 0.889) (layers Composant Cuivre) (net 90)) - (via (at 179.197 86.487) (size 0.889) (layers Composant Cuivre) (net 90)) - (via (at 178.054 105.664) (size 0.889) (layers Composant Cuivre) (net 90)) - (via (at 132.461 92.075) (size 0.635) (layers Composant Cuivre) (net 90)) - (segment (start 154.813 87.757) (end 154.813 89.027) (width 0.254) (layer Cuivre) (net 90)) - (segment (start 165.354 137.668) (end 165.354 135.001) (width 0.254) (layer GND_layer) (net 90)) - (segment (start 165.354 135.001) (end 168.656 131.699) (width 0.254) (layer GND_layer) (net 90)) - (segment (start 168.656 131.699) (end 168.656 127.508) (width 0.254) (layer GND_layer) (net 90)) - (segment (start 168.656 127.508) (end 169.926 126.238) (width 0.254) (layer GND_layer) (net 90)) - (segment (start 169.926 126.238) (end 169.926 118.491) (width 0.254) (layer GND_layer) (net 90)) - (segment (start 169.926 118.491) (end 160.274 108.839) (width 0.254) (layer GND_layer) (net 90)) - (segment (start 155.194 138.176) (end 164.846 138.176) (width 0.254) (layer GND_layer) (net 90)) - (segment (start 160.274 89.916) (end 159.004 88.646) (width 0.254) (layer GND_layer) (net 90)) - (segment (start 153.924 136.906) (end 155.194 138.176) (width 0.254) (layer GND_layer) (net 90) (status 800)) - (segment (start 180.721 108.331) (end 180.721 111.45774) (width 0.254) (layer Cuivre) (net 90)) - (segment (start 154.813 89.027) (end 154.686 89.154) (width 0.254) (layer Cuivre) (net 90)) - (segment (start 154.813 87.757) (end 154.813 86.995) (width 0.254) (layer GND_layer) (net 90)) - (segment (start 159.004 87.884) (end 159.004 88.646) (width 0.254) (layer GND_layer) (net 90)) - (segment (start 157.734 86.614) (end 159.004 87.884) (width 0.254) (layer GND_layer) (net 90)) - (segment (start 155.194 86.614) (end 157.734 86.614) (width 0.254) (layer GND_layer) (net 90)) - (segment (start 154.813 86.995) (end 155.194 86.614) (width 0.254) (layer GND_layer) (net 90)) - (segment (start 154.813 87.757) (end 156.21 86.36) (width 0.254) (layer Cuivre) (net 90)) - (segment (start 151.003 89.916) (end 136.906 89.916) (width 0.254) (layer Cuivre) (net 90)) - (segment (start 151.765 89.154) (end 151.003 89.916) (width 0.254) (layer Cuivre) (net 90)) - (segment (start 154.686 89.154) (end 151.765 89.154) (width 0.254) (layer Cuivre) (net 90)) - (segment (start 190.9445 111.506) (end 189.88532 111.506) (width 0.254) (layer Composant) (net 90) (status 800)) - (segment (start 178.054 105.664) (end 180.721 108.331) (width 0.254) (layer Cuivre) (net 90)) - (segment (start 189.83706 111.45774) (end 189.88532 111.506) (width 0.254) (layer Composant) (net 90)) - (segment (start 180.721 111.45774) (end 189.83706 111.45774) (width 0.254) (layer Composant) (net 90)) - (segment (start 182.51678 106.68) (end 182.87492 107.03814) (width 0.254) (layer Composant) (net 91)) - (segment (start 135.382 95.123) (end 135.636 95.377) (width 0.254) (layer Composant) (net 91)) - (segment (start 135.636 95.377) (end 135.89 96.139) (width 0.254) (layer Composant) (net 91)) - (segment (start 174.752 89.408) (end 174.244 89.408) (width 0.254) (layer Cuivre) (net 91)) - (segment (start 174.244 89.408) (end 173.609 90.043) (width 0.254) (layer Cuivre) (net 91)) - (segment (start 173.609 90.043) (end 165.608 90.043) (width 0.254) (layer Cuivre) (net 91)) - (segment (start 165.608 90.043) (end 164.973 89.408) (width 0.254) (layer Cuivre) (net 91)) - (segment (start 164.973 89.408) (end 159.512 89.408) (width 0.254) (layer Cuivre) (net 91)) - (segment (start 159.512 89.408) (end 156.972 91.948) (width 0.254) (layer Cuivre) (net 91)) - (segment (start 156.972 91.948) (end 154.432 91.948) (width 0.254) (layer Cuivre) (net 91)) - (segment (start 135.382 93.726) (end 135.382 95.123) (width 0.254) (layer Composant) (net 91) (status 800)) - (segment (start 155.702 93.218) (end 154.432 91.948) (width 0.254) (layer GND_layer) (net 91)) - (segment (start 155.702 114.3) (end 155.702 93.218) (width 0.254) (layer GND_layer) (net 91)) - (segment (start 158.877 117.475) (end 155.702 114.3) (width 0.254) (layer GND_layer) (net 91)) - (segment (start 174.752 89.408) (end 174.244 89.408) (width 0.254) (layer GND_layer) (net 91)) - (segment (start 158.877 129.413) (end 158.877 117.475) (width 0.254) (layer GND_layer) (net 91)) - (segment (start 151.384 136.906) (end 158.877 129.413) (width 0.254) (layer GND_layer) (net 91) (status 800)) - (segment (start 152.781 91.948) (end 154.432 91.948) (width 0.254) (layer Cuivre) (net 91)) - (segment (start 190.9445 107.0102) (end 189.88532 107.0102) (width 0.254) (layer Composant) (net 91) (status 800)) - (segment (start 152.273 92.456) (end 152.781 91.948) (width 0.254) (layer Cuivre) (net 91)) - (segment (start 139.065 92.456) (end 152.273 92.456) (width 0.254) (layer Cuivre) (net 91)) - (segment (start 136.017 95.504) (end 139.065 92.456) (width 0.254) (layer Cuivre) (net 91)) - (segment (start 135.89 96.139) (end 136.017 95.504) (width 0.254) (layer Cuivre) (net 91)) - (segment (start 189.85738 107.03814) (end 189.88532 107.0102) (width 0.254) (layer Composant) (net 91)) - (segment (start 178.054 108.077) (end 179.451 106.68) (width 0.254) (layer Composant) (net 91)) - (segment (start 178.054 110.363) (end 178.054 108.077) (width 0.254) (layer Composant) (net 91)) - (via (at 154.432 91.948) (size 0.635) (layers Composant Cuivre) (net 91)) - (via (at 178.054 110.363) (size 0.889) (layers Composant Cuivre) (net 91)) - (segment (start 182.87492 107.03814) (end 189.85738 107.03814) (width 0.254) (layer Composant) (net 91)) - (segment (start 174.244 89.408) (end 173.355 90.297) (width 0.254) (layer GND_layer) (net 91)) - (segment (start 173.355 90.297) (end 173.355 107.95) (width 0.254) (layer GND_layer) (net 91)) - (segment (start 179.451 106.68) (end 182.51678 106.68) (width 0.254) (layer Composant) (net 91)) - (segment (start 173.355 107.95) (end 175.768 110.363) (width 0.254) (layer GND_layer) (net 91)) - (segment (start 175.768 110.363) (end 178.054 110.363) (width 0.254) (layer GND_layer) (net 91)) - (via (at 135.89 96.139) (size 0.889) (layers Composant Cuivre) (net 91)) - (via (at 174.752 89.408) (size 0.889) (layers Composant Cuivre) (net 91)) - (segment (start 201.1807 122.7455) (end 201.1807 121.68632) (width 0.254) (layer Composant) (net 92) (status 800)) - (segment (start 201.1807 121.68632) (end 204.14488 118.72214) (width 0.254) (layer Composant) (net 92)) - (segment (start 204.14488 118.72214) (end 204.14488 116.9543) (width 0.254) (layer Composant) (net 92)) - (segment (start 218.44 68.2625) (end 218.44 69.00418) (width 0.254) (layer Composant) (net 92) (status 800)) - (segment (start 223.52 73.66) (end 218.86418 69.00418) (width 0.254) (layer Composant) (net 92) (status 800)) - (segment (start 218.86418 69.00418) (end 218.44 69.00418) (width 0.254) (layer Composant) (net 92)) - (via (at 204.14488 116.9543) (size 0.889) (layers Composant Cuivre) (net 92)) - (segment (start 204.14488 116.9543) (end 204.2287 116.9543) (width 0.254) (layer Cuivre) (net 92)) - (segment (start 205.867 91.313) (end 223.52 73.66) (width 0.254) (layer Cuivre) (net 92) (status 400)) - (segment (start 205.867 91.313) (end 205.867 115.316) (width 0.254) (layer Cuivre) (net 92)) - (segment (start 204.2287 116.9543) (end 205.867 115.316) (width 0.254) (layer Cuivre) (net 92)) - (segment (start 210.43138 103.08336) (end 210.43138 103.47706) (width 0.254) (layer Composant) (net 93)) - (segment (start 224.58172 72.18172) (end 223.52 71.12) (width 0.254) (layer GND_layer) (net 93) (status 400)) - (segment (start 209.1817 101.83368) (end 210.43138 103.08336) (width 0.254) (layer Composant) (net 93)) - (segment (start 210.43138 103.47706) (end 210.43138 99.40036) (width 0.254) (layer GND_layer) (net 93)) - (segment (start 210.43138 99.40036) (end 210.86064 98.9711) (width 0.254) (layer GND_layer) (net 93)) - (segment (start 210.86064 98.9711) (end 210.86064 87.35822) (width 0.254) (layer GND_layer) (net 93)) - (segment (start 210.86064 87.35822) (end 223.46412 74.75474) (width 0.254) (layer GND_layer) (net 93)) - (segment (start 223.46412 74.75474) (end 224.5106 74.75474) (width 0.254) (layer GND_layer) (net 93)) - (segment (start 224.5106 74.75474) (end 224.58172 74.68362) (width 0.254) (layer GND_layer) (net 93)) - (segment (start 224.58172 74.68362) (end 224.58172 72.18172) (width 0.254) (layer GND_layer) (net 93)) - (segment (start 209.1817 100.7745) (end 209.1817 101.83368) (width 0.254) (layer Composant) (net 93) (status 800)) - (via (at 210.43138 103.47706) (size 0.889) (layers Composant Cuivre) (net 93)) - (segment (start 207.772 107.44454) (end 213.26856 101.94798) (width 0.254) (layer GND_layer) (net 94)) - (segment (start 213.26856 101.94798) (end 213.26856 86.45144) (width 0.254) (layer GND_layer) (net 94)) - (segment (start 213.26856 86.45144) (end 223.52 76.2) (width 0.254) (layer GND_layer) (net 94) (status 400)) - (segment (start 208.6737 122.7455) (end 208.6737 114.5667) (width 0.254) (layer Composant) (net 94) (status 800)) - (segment (start 208.6737 114.5667) (end 209.37982 113.86058) (width 0.254) (layer Composant) (net 94)) - (via (at 209.37982 113.86058) (size 0.889) (layers Composant Cuivre) (net 94)) - (segment (start 209.37982 113.86058) (end 207.772 112.25276) (width 0.254) (layer GND_layer) (net 94)) - (segment (start 207.772 112.25276) (end 207.772 107.44454) (width 0.254) (layer GND_layer) (net 94)) - (segment (start 201.1807 96.44634) (end 201.1807 100.7745) (width 0.254) (layer Composant) (net 95) (status 400)) - (segment (start 224.50806 74.78776) (end 222.83928 74.78776) (width 0.254) (layer Composant) (net 95)) - (segment (start 223.52 68.58) (end 224.57918 69.63918) (width 0.254) (layer Composant) (net 95) (status 800)) - (segment (start 224.57918 69.63918) (end 224.57918 74.71664) (width 0.254) (layer Composant) (net 95)) - (segment (start 224.57918 74.71664) (end 224.50806 74.78776) (width 0.254) (layer Composant) (net 95)) - (segment (start 222.83928 74.78776) (end 201.1807 96.44634) (width 0.254) (layer Composant) (net 95)) - (segment (start 205.1812 97.98558) (end 205.1812 100.7745) (width 0.254) (layer Composant) (net 96) (status 400)) - (segment (start 214.26678 88.9) (end 205.1812 97.98558) (width 0.254) (layer Composant) (net 96)) - (segment (start 222.25 88.9) (end 214.26678 88.9) (width 0.254) (layer Composant) (net 96) (status 800)) - (segment (start 205.6765 100.7745) (end 205.6765 98.21926) (width 0.254) (layer Composant) (net 97) (status 800)) - (segment (start 212.45576 91.44) (end 222.25 91.44) (width 0.254) (layer Composant) (net 97) (status 400)) - (segment (start 205.6765 98.21926) (end 212.45576 91.44) (width 0.254) (layer Composant) (net 97)) - (segment (start 212.9155 114.0079) (end 221.9579 114.0079) (width 0.254) (layer Composant) (net 98) (status 800)) - (segment (start 221.9579 114.0079) (end 222.25 114.3) (width 0.254) (layer Composant) (net 98) (status 400)) - (segment (start 218.2495 116.84) (end 222.25 116.84) (width 0.254) (layer 3.3V_layer) (net 99) (status 400)) - (via (at 216.68994 115.28044) (size 0.889) (layers Composant Cuivre) (net 99)) - (segment (start 216.46388 115.5065) (end 216.68994 115.28044) (width 0.254) (layer Composant) (net 99)) - (segment (start 212.9155 115.5065) (end 216.46388 115.5065) (width 0.254) (layer Composant) (net 99) (status 800)) - (segment (start 216.68994 115.28044) (end 218.2495 116.84) (width 0.254) (layer 3.3V_layer) (net 99)) - (segment (start 219.5449 118.0084) (end 220.9165 119.38) (width 0.254) (layer Composant) (net 100)) - (segment (start 220.9165 119.38) (end 222.25 119.38) (width 0.254) (layer Composant) (net 100) (status 400)) - (segment (start 212.9155 118.0084) (end 219.5449 118.0084) (width 0.254) (layer Composant) (net 100) (status 800)) - (segment (start 212.9155 119.507) (end 219.837 119.507) (width 0.254) (layer Composant) (net 101) (status 800)) - (segment (start 219.837 119.507) (end 222.25 121.92) (width 0.254) (layer Composant) (net 101) (status 400)) - (segment (start 212.9155 120.5103) (end 218.3003 120.5103) (width 0.254) (layer Composant) (net 102) (status 800)) - (segment (start 218.3003 120.5103) (end 222.25 124.46) (width 0.254) (layer Composant) (net 102) (status 400)) - (segment (start 218.186 123.825) (end 221.361 127) (width 0.254) (layer Composant) (net 103)) - (segment (start 210.6803 122.7455) (end 210.6803 123.80468) (width 0.254) (layer Composant) (net 103) (status 800)) - (segment (start 210.6803 123.80468) (end 218.186 123.80468) (width 0.254) (layer Composant) (net 103)) - (segment (start 218.186 123.80468) (end 218.186 123.825) (width 0.254) (layer Composant) (net 103)) - (segment (start 221.361 127) (end 222.25 127) (width 0.254) (layer Composant) (net 103) (status 400)) - (segment (start 206.6798 122.7455) (end 206.6798 123.80468) (width 0.254) (layer Composant) (net 104) (status 800)) - (segment (start 222.25 129.54) (end 212.41512 129.54) (width 0.254) (layer Composant) (net 104) (status 800)) - (segment (start 212.41512 129.54) (end 206.6798 123.80468) (width 0.254) (layer Composant) (net 104)) - (segment (start 210.07324 125.27534) (end 216.8779 132.08) (width 0.254) (layer GND_layer) (net 105)) - (segment (start 207.1751 123.65228) (end 207.1751 122.7455) (width 0.254) (layer Composant) (net 105) (status 400)) - (segment (start 208.79816 125.27534) (end 207.1751 123.65228) (width 0.254) (layer Composant) (net 105)) - (segment (start 210.07324 125.27534) (end 208.79816 125.27534) (width 0.254) (layer Composant) (net 105)) - (via (at 210.07324 125.27534) (size 0.889) (layers Composant Cuivre) (net 105)) - (segment (start 216.8779 132.08) (end 222.25 132.08) (width 0.254) (layer GND_layer) (net 105) (status 400)) - (segment (start 205.1812 126.76378) (end 211.55914 133.14172) (width 0.254) (layer Composant) (net 106)) - (segment (start 211.55914 133.14172) (end 220.77172 133.14172) (width 0.254) (layer Composant) (net 106)) - (segment (start 220.77172 133.14172) (end 222.25 134.62) (width 0.254) (layer Composant) (net 106) (status 400)) - (segment (start 205.1812 122.7455) (end 205.1812 126.76378) (width 0.254) (layer Composant) (net 106) (status 800)) - (segment (start 204.6859 127.50546) (end 214.34044 137.16) (width 0.254) (layer Composant) (net 107)) - (segment (start 204.6859 122.7455) (end 204.6859 127.50546) (width 0.254) (layer Composant) (net 107) (status 800)) - (segment (start 214.34044 137.16) (end 222.25 137.16) (width 0.254) (layer Composant) (net 107) (status 400)) - (segment (start 211.37372 93.98) (end 207.6831 97.67062) (width 0.254) (layer Composant) (net 108)) - (segment (start 207.6831 97.67062) (end 207.6831 100.7745) (width 0.254) (layer Composant) (net 108) (status 400)) - (segment (start 222.25 93.98) (end 211.37372 93.98) (width 0.254) (layer Composant) (net 108) (status 800)) - (segment (start 210.8962 95.1865) (end 208.1784 97.9043) (width 0.254) (layer Composant) (net 109)) - (segment (start 224.79 91.44) (end 225.86442 92.51442) (width 0.254) (layer Composant) (net 109) (status 800)) - (segment (start 225.86442 94.98838) (end 225.6663 95.1865) (width 0.254) (layer Composant) (net 109)) - (segment (start 225.6663 95.1865) (end 210.8962 95.1865) (width 0.254) (layer Composant) (net 109)) - (segment (start 225.86442 92.51442) (end 225.86442 94.98838) (width 0.254) (layer Composant) (net 109)) - (segment (start 208.1784 97.9043) (end 208.1784 100.7745) (width 0.254) (layer Composant) (net 109) (status 400)) - (segment (start 223.52 92.71) (end 211.91474 92.71) (width 0.254) (layer Composant) (net 110)) - (segment (start 206.1845 98.44024) (end 206.1845 100.7745) (width 0.254) (layer Composant) (net 110) (status 400)) - (segment (start 224.79 93.98) (end 223.52 92.71) (width 0.254) (layer Composant) (net 110) (status 800)) - (segment (start 211.91474 92.71) (end 206.1845 98.44024) (width 0.254) (layer Composant) (net 110)) - (segment (start 208.6737 98.40976) (end 209.29346 97.79) (width 0.254) (layer Composant) (net 111)) - (segment (start 209.29346 97.79) (end 223.52 97.79) (width 0.254) (layer Composant) (net 111)) - (segment (start 208.6737 100.7745) (end 208.6737 98.40976) (width 0.254) (layer Composant) (net 111) (status 800)) - (segment (start 223.52 97.79) (end 224.79 96.52) (width 0.254) (layer Composant) (net 111) (status 400)) - (segment (start 223.52 100.33) (end 224.79 99.06) (width 0.254) (layer Composant) (net 112) (status 400)) - (segment (start 210.6803 100.7745) (end 211.1248 100.33) (width 0.254) (layer Composant) (net 112) (status 800)) - (segment (start 211.1248 100.33) (end 223.52 100.33) (width 0.254) (layer Composant) (net 112)) - (segment (start 212.9155 104.013) (end 220.56852 104.013) (width 0.254) (layer Composant) (net 113) (status 800)) - (segment (start 220.56852 104.013) (end 221.71152 102.87) (width 0.254) (layer Composant) (net 113)) - (segment (start 221.71152 102.87) (end 223.52 102.87) (width 0.254) (layer Composant) (net 113)) - (segment (start 223.52 102.87) (end 224.79 101.6) (width 0.254) (layer Composant) (net 113) (status 400)) - (segment (start 223.4184 105.5116) (end 224.79 104.14) (width 0.254) (layer Composant) (net 114) (status 400)) - (segment (start 212.9155 105.5116) (end 223.4184 105.5116) (width 0.254) (layer Composant) (net 114) (status 800)) - (segment (start 218.53144 106.5149) (end 219.96654 107.95) (width 0.254) (layer Composant) (net 115)) - (segment (start 223.52 107.95) (end 224.79 106.68) (width 0.254) (layer Composant) (net 115) (status 400)) - (segment (start 219.96654 107.95) (end 223.52 107.95) (width 0.254) (layer Composant) (net 115)) - (segment (start 212.9155 106.5149) (end 218.53144 106.5149) (width 0.254) (layer Composant) (net 115) (status 800)) - (segment (start 223.57588 108.00588) (end 224.79 109.22) (width 0.254) (layer 3.3V_layer) (net 116) (status 400)) - (segment (start 212.9155 108.0135) (end 213.97468 108.0135) (width 0.254) (layer Composant) (net 116) (status 800)) - (segment (start 214.91448 108.00588) (end 223.57588 108.00588) (width 0.254) (layer 3.3V_layer) (net 116)) - (segment (start 213.97468 108.0135) (end 213.9823 108.00588) (width 0.254) (layer Composant) (net 116)) - (segment (start 213.9823 108.00588) (end 214.91448 108.00588) (width 0.254) (layer Composant) (net 116)) - (via (at 214.91448 108.00588) (size 0.889) (layers Composant Cuivre) (net 116)) - (segment (start 218.75496 110.65764) (end 223.68764 110.65764) (width 0.254) (layer Composant) (net 117)) - (segment (start 217.10142 109.0041) (end 218.75496 110.65764) (width 0.254) (layer Composant) (net 117)) - (segment (start 212.9155 109.0041) (end 217.10142 109.0041) (width 0.254) (layer Composant) (net 117) (status 800)) - (segment (start 223.68764 110.65764) (end 224.79 111.76) (width 0.254) (layer Composant) (net 117) (status 400)) - (segment (start 221.6531 115.57) (end 223.52 115.57) (width 0.254) (layer Composant) (net 118)) - (segment (start 219.38488 116.5733) (end 219.456 116.64442) (width 0.254) (layer Composant) (net 118)) - (segment (start 214.03818 116.5733) (end 219.38488 116.5733) (width 0.254) (layer Composant) (net 118)) - (segment (start 213.97468 116.5098) (end 214.03818 116.5733) (width 0.254) (layer Composant) (net 118)) - (segment (start 223.52 115.57) (end 224.79 114.3) (width 0.254) (layer Composant) (net 118) (status 400)) - (segment (start 212.9155 116.5098) (end 213.97468 116.5098) (width 0.254) (layer Composant) (net 118) (status 800)) - (segment (start 220.57868 116.64442) (end 221.6531 115.57) (width 0.254) (layer Composant) (net 118)) - (segment (start 219.456 116.64442) (end 220.57868 116.64442) (width 0.254) (layer Composant) (net 118)) - (segment (start 213.40826 96.52) (end 222.25 96.52) (width 0.254) (layer 3.3V_layer) (net 119) (status 400)) - (segment (start 207.1751 100.7745) (end 207.1751 101.83368) (width 0.254) (layer Composant) (net 119) (status 800)) - (segment (start 207.6196 102.30612) (end 207.62214 102.30612) (width 0.254) (layer Composant) (net 119)) - (segment (start 207.62214 102.30612) (end 213.40826 96.52) (width 0.254) (layer 3.3V_layer) (net 119)) - (via (at 207.62214 102.30612) (size 0.889) (layers Composant Cuivre) (net 119)) - (segment (start 207.6196 102.27818) (end 207.6196 102.30612) (width 0.254) (layer Composant) (net 119)) - (segment (start 207.1751 101.83368) (end 207.6196 102.27818) (width 0.254) (layer Composant) (net 119)) - (segment (start 223.70542 115.75542) (end 224.79 116.84) (width 0.254) (layer 3.3V_layer) (net 120) (status 400)) - (segment (start 220.0021 115.75542) (end 223.70542 115.75542) (width 0.254) (layer 3.3V_layer) (net 120)) - (segment (start 216.32926 116.14912) (end 219.6084 116.14912) (width 0.254) (layer Composant) (net 120)) - (segment (start 216.19464 116.0145) (end 216.32926 116.14912) (width 0.254) (layer Composant) (net 120)) - (segment (start 219.6084 116.14912) (end 220.0021 115.75542) (width 0.254) (layer Composant) (net 120)) - (segment (start 212.9155 116.0145) (end 216.19464 116.0145) (width 0.254) (layer Composant) (net 120) (status 800)) - (via (at 220.0021 115.75542) (size 0.889) (layers Composant Cuivre) (net 120)) - (segment (start 219.2147 117.0051) (end 220.3196 118.11) (width 0.254) (layer Composant) (net 121)) - (segment (start 223.52 118.11) (end 224.79 119.38) (width 0.254) (layer Composant) (net 121) (status 400)) - (segment (start 220.3196 118.11) (end 223.52 118.11) (width 0.254) (layer Composant) (net 121)) - (segment (start 212.9155 117.0051) (end 219.2147 117.0051) (width 0.254) (layer Composant) (net 121) (status 800)) - (segment (start 223.52 123.19) (end 224.79 121.92) (width 0.254) (layer 3.3V_layer) (net 122) (status 400)) - (via (at 206.502 126.238) (size 0.889) (layers Composant Cuivre) (net 122)) - (segment (start 208.407 123.19) (end 223.52 123.19) (width 0.254) (layer 3.3V_layer) (net 122)) - (segment (start 206.502 125.58522) (end 205.6765 124.75972) (width 0.254) (layer Composant) (net 122)) - (segment (start 206.502 126.238) (end 206.502 125.095) (width 0.254) (layer 3.3V_layer) (net 122)) - (segment (start 206.502 126.238) (end 206.502 125.58522) (width 0.254) (layer Composant) (net 122)) - (segment (start 206.502 125.095) (end 208.407 123.19) (width 0.254) (layer 3.3V_layer) (net 122)) - (segment (start 205.6765 122.7455) (end 205.6765 124.75972) (width 0.254) (layer Composant) (net 122) (status 800)) - (segment (start 219.94368 119.0117) (end 221.79026 120.85828) (width 0.254) (layer Composant) (net 123)) - (segment (start 221.79026 120.85828) (end 223.30664 120.85828) (width 0.254) (layer Composant) (net 123)) - (segment (start 212.9155 119.0117) (end 219.94368 119.0117) (width 0.254) (layer Composant) (net 123) (status 800)) - (segment (start 223.37776 123.04776) (end 224.79 124.46) (width 0.254) (layer Composant) (net 123) (status 400)) - (segment (start 223.37776 120.9294) (end 223.37776 123.04776) (width 0.254) (layer Composant) (net 123)) - (segment (start 223.30664 120.85828) (end 223.37776 120.9294) (width 0.254) (layer Composant) (net 123)) - (segment (start 223.52 125.73) (end 224.79 127) (width 0.254) (layer Composant) (net 124) (status 400)) - (segment (start 211.85632 118.5037) (end 211.85632 120.88876) (width 0.254) (layer Composant) (net 124)) - (segment (start 211.85632 120.88876) (end 212.32876 121.3612) (width 0.254) (layer Composant) (net 124)) - (segment (start 212.9155 118.5037) (end 211.85632 118.5037) (width 0.254) (layer Composant) (net 124) (status 800)) - (segment (start 212.32876 121.3612) (end 217.21572 121.3612) (width 0.254) (layer Composant) (net 124)) - (segment (start 217.21572 121.3612) (end 221.58452 125.73) (width 0.254) (layer Composant) (net 124)) - (segment (start 221.58452 125.73) (end 223.52 125.73) (width 0.254) (layer Composant) (net 124)) - (segment (start 223.52 128.27) (end 224.79 129.54) (width 0.254) (layer Composant) (net 125) (status 400)) - (segment (start 210.1723 122.7455) (end 210.1723 124.13996) (width 0.254) (layer Composant) (net 125) (status 800)) - (segment (start 214.30234 128.27) (end 223.52 128.27) (width 0.254) (layer Composant) (net 125)) - (segment (start 210.1723 124.13996) (end 214.30234 128.27) (width 0.254) (layer Composant) (net 125)) - (segment (start 223.52 130.81) (end 212.95868 130.81) (width 0.254) (layer Composant) (net 126)) - (segment (start 224.79 132.08) (end 223.52 130.81) (width 0.254) (layer Composant) (net 126) (status 800)) - (segment (start 206.1845 124.03582) (end 206.1845 122.7455) (width 0.254) (layer Composant) (net 126) (status 400)) - (segment (start 212.95868 130.81) (end 206.1845 124.03582) (width 0.254) (layer Composant) (net 126)) - (segment (start 210.1723 99.71532) (end 221.59468 99.71532) (width 0.254) (layer Composant) (net 127)) - (segment (start 210.1723 100.7745) (end 210.1723 99.71532) (width 0.254) (layer Composant) (net 127) (status 800)) - (segment (start 221.59468 99.71532) (end 222.25 99.06) (width 0.254) (layer Composant) (net 127) (status 400)) - (segment (start 220.3323 103.5177) (end 222.25 101.6) (width 0.254) (layer Composant) (net 128) (status 400)) - (segment (start 212.9155 103.5177) (end 220.3323 103.5177) (width 0.254) (layer Composant) (net 128) (status 800)) - (segment (start 212.9155 105.0163) (end 221.3737 105.0163) (width 0.254) (layer Composant) (net 129) (status 800)) - (segment (start 221.3737 105.0163) (end 222.25 104.14) (width 0.254) (layer Composant) (net 129) (status 400)) - (segment (start 212.9155 106.0069) (end 221.5769 106.0069) (width 0.254) (layer Composant) (net 130) (status 800)) - (segment (start 221.5769 106.0069) (end 222.25 106.68) (width 0.254) (layer Composant) (net 130) (status 400)) - (segment (start 222.25 109.22) (end 218.67368 109.22) (width 0.254) (layer Composant) (net 131) (status 800)) - (segment (start 218.67368 109.22) (end 216.46388 107.0102) (width 0.254) (layer Composant) (net 131)) - (segment (start 216.46388 107.0102) (end 212.9155 107.0102) (width 0.254) (layer Composant) (net 131) (status 400)) - (segment (start 212.9155 109.5121) (end 215.392 109.5121) (width 0.254) (layer Composant) (net 132) (status 800)) - (segment (start 215.392 109.5121) (end 217.6399 111.76) (width 0.254) (layer Composant) (net 132)) - (segment (start 217.6399 111.76) (end 222.25 111.76) (width 0.254) (layer Composant) (net 132) (status 400)) - (segment (start 190.0555 109.88548) (end 190.0555 107.315) (width 0.5588) (layer Cuivre) (net 133) (status 400)) - (segment (start 129.032 91.3765) (end 128.9685 91.44) (width 0.5588) (layer Cuivre) (net 133) (status 400)) - (segment (start 109.4105 84.328) (end 109.601 84.328) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 110.744 83.312) (end 110.744 81.407) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 110.744 81.407) (end 110.744 78.613) (width 0.5588) (layer Cuivre) (net 133) (status 400)) - (segment (start 76.327 111.379) (end 75.311 111.379) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 75.311 111.379) (end 74.549 112.141) (width 0.5588) (layer Composant) (net 133)) - (segment (start 74.549 112.141) (end 74.549 117.221) (width 0.5588) (layer Composant) (net 133)) - (segment (start 74.549 117.221) (end 76.327 118.999) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 134.3914 94.9452) (end 135.001 95.5548) (width 0.4318) (layer Composant) (net 133)) - (segment (start 135.001 95.5548) (end 135.001 97.663) (width 0.5588) (layer Composant) (net 133)) - (segment (start 163.068 75.311) (end 163.068 73.406) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 163.068 73.406) (end 162.56 72.898) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 162.56 72.898) (end 151.003 72.898) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 137.3886 108.077) (end 137.668 107.823) (width 0.4) (layer Composant) (net 133)) - (segment (start 137.3886 109.22) (end 137.3886 108.077) (width 0.4) (layer Composant) (net 133) (status 800)) - (segment (start 137.668 107.823) (end 137.668 105.029) (width 0.4) (layer Composant) (net 133)) - (segment (start 97.409 121.412) (end 96.901 121.412) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 96.901 121.412) (end 95.25 123.063) (width 0.5588) (layer Composant) (net 133)) - (segment (start 95.25 123.063) (end 88.646 123.063) (width 0.5588) (layer Composant) (net 133)) - (segment (start 88.646 123.063) (end 86.741 121.158) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 100.965 60.833) (end 100.965 66.929) (width 0.5588) (layer Composant) (net 133) (status C00)) - (segment (start 189.23 74.676) (end 191.008 74.676) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 191.008 74.676) (end 191.008 75.438) (width 0.5588) (layer Composant) (net 133)) - (segment (start 191.008 75.438) (end 191.897 75.438) (width 0.5588) (layer Composant) (net 133)) - (segment (start 191.897 75.438) (end 192.532 75.1205) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 127.635 99.9744) (end 126.4412 99.9744) (width 0.254) (layer Composant) (net 133) (status 800)) - (segment (start 141.478 82.423) (end 141.605 82.55) (width 0.5588) (layer GND_layer) (net 133)) - (via (at 141.478 82.423) (size 1.143) (layers Composant Cuivre) (net 133)) - (segment (start 141.478 82.423) (end 141.478 84.8995) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 141.605 82.55) (end 141.605 86.741) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 141.605 86.741) (end 141.605 89.027) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 141.605 86.741) (end 134.366 86.741) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 133.477 85.852) (end 131.699 85.852) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 134.366 86.741) (end 133.477 85.852) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 175.641 78.613) (end 175.641 86.741) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 177.165 77.089) (end 175.641 78.613) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 176.149 87.249) (end 168.529 87.249) (width 0.5588) (layer Composant) (net 133) (status C00)) - (segment (start 140.6525 90.4875) (end 140.6525 91.059) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 141.605 89.535) (end 140.6525 90.4875) (width 0.5588) (layer Composant) (net 133)) - (segment (start 141.605 89.027) (end 141.605 89.535) (width 0.5588) (layer Composant) (net 133)) - (segment (start 121.158 101.854) (end 121.158 102.616) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 123.571 99.06) (end 121.158 101.854) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 183.134 128.27) (end 183.134 133.604) (width 0.5588) (layer Composant) (net 133)) - (segment (start 86.741 117.094) (end 86.741 115.57) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 128.9685 91.44) (end 128.9685 89.8525) (width 0.5588) (layer Composant) (net 133)) - (segment (start 129.8702 92.3417) (end 128.9685 91.44) (width 0.5588) (layer Composant) (net 133)) - (segment (start 129.8702 93.726) (end 129.8702 92.3417) (width 0.254) (layer Composant) (net 133) (status 800)) - (segment (start 194.691 73.66) (end 194.691 73.406) (width 0.5588) (layer Composant) (net 133)) - (segment (start 194.183 74.168) (end 194.691 73.66) (width 0.5588) (layer Composant) (net 133)) - (segment (start 194.183 75.311) (end 194.183 74.168) (width 0.5588) (layer Composant) (net 133)) - (segment (start 193.167 75.311) (end 194.183 75.311) (width 0.5588) (layer Composant) (net 133)) - (segment (start 192.532 75.1205) (end 193.167 75.311) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 86.741 117.094) (end 86.741 121.158) (width 0.5588) (layer Composant) (net 133) (status C00)) - (segment (start 119.38 102.616) (end 121.158 102.616) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 117.348 100.584) (end 119.38 102.616) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 114.681 100.584) (end 117.348 100.584) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 112.522 98.425) (end 114.681 100.584) (width 0.5588) (layer GND_layer) (net 133) (status 800)) - (segment (start 80.772 77.089) (end 75.438 73.025) (width 0.5588) (layer Composant) (net 133) (status C00)) - (segment (start 93.599 106.934) (end 93.599 96.774) (width 0.5588) (layer Composant) (net 133)) - (segment (start 92.075 95.25) (end 88.9 95.25) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 93.599 96.774) (end 92.075 95.25) (width 0.5588) (layer Composant) (net 133)) - (segment (start 190.0555 115.189) (end 190.0555 116.18468) (width 0.5588) (layer Cuivre) (net 133) (status 800)) - (segment (start 189.48146 116.18468) (end 190.0555 116.18468) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 132.588 104.775) (end 132.588 103.632) (width 0.4) (layer Composant) (net 133)) - (segment (start 131.826 105.537) (end 132.588 104.775) (width 0.4) (layer Composant) (net 133)) - (segment (start 131.826 107.95) (end 131.826 105.537) (width 0.4) (layer Composant) (net 133)) - (segment (start 131.8768 108.1278) (end 131.826 107.95) (width 0.4) (layer Composant) (net 133)) - (segment (start 131.8768 109.22) (end 131.8768 108.1278) (width 0.254) (layer Composant) (net 133) (status 800)) - (segment (start 126.4412 99.9744) (end 125.349 100.7745) (width 0.4318) (layer Composant) (net 133) (status 400)) - (segment (start 109.4105 84.328) (end 109.4105 82.8675) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 129.032 89.789) (end 129.032 91.3765) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 189.15634 116.5098) (end 189.48146 116.18468) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 189.88532 116.5098) (end 190.9445 116.5098) (width 0.254) (layer Composant) (net 133) (status 400)) - (segment (start 189.15634 116.5098) (end 189.88532 116.5098) (width 0.5588) (layer Composant) (net 133)) - (segment (start 189.88532 116.5098) (end 189.88532 114.0079) (width 0.254) (layer Composant) (net 133)) - (segment (start 189.88532 114.0079) (end 190.9445 114.0079) (width 0.254) (layer Composant) (net 133) (status 400)) - (segment (start 189.88532 113.0173) (end 189.88532 114.0079) (width 0.254) (layer Composant) (net 133)) - (segment (start 209.1817 122.7455) (end 209.1817 124.24918) (width 0.254) (layer Composant) (net 133) (status 800)) - (segment (start 209.1817 124.24918) (end 209.16646 124.26442) (width 0.5588) (layer Composant) (net 133)) - (segment (start 91.694 108.839) (end 91.694 112.903) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 208.28 123.37796) (end 209.16646 124.26442) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 213.97468 110.5027) (end 214.45474 110.5027) (width 0.5588) (layer Composant) (net 133)) - (segment (start 152.4 115.57) (end 152.273 115.697) (width 0.5588) (layer 3.3V_layer) (net 133)) - (segment (start 211.4042 107.5055) (end 211.45754 107.5055) (width 0.5588) (layer GND_layer) (net 133)) - (via (at 211.4042 107.5055) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 214.45474 110.5027) (size 1.143) (layers Composant Cuivre) (net 133)) - (segment (start 211.4042 107.5055) (end 212.9155 107.5055) (width 0.254) (layer Composant) (net 133) (status 400)) - (segment (start 213.44636 111.506) (end 213.97468 111.506) (width 0.254) (layer Composant) (net 133)) - (segment (start 212.9155 111.506) (end 213.44636 111.506) (width 0.254) (layer Composant) (net 133) (status 800)) - (segment (start 213.44636 112.014) (end 213.97468 112.014) (width 0.5588) (layer Composant) (net 133)) - (segment (start 212.9155 112.014) (end 213.44636 112.014) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 213.44636 111.506) (end 213.44636 112.014) (width 0.254) (layer Composant) (net 133)) - (segment (start 213.83244 112.5093) (end 213.97468 112.36706) (width 0.5588) (layer Composant) (net 133)) - (segment (start 213.97468 112.36706) (end 213.97468 112.014) (width 0.5588) (layer Composant) (net 133)) - (segment (start 212.9155 112.5093) (end 213.83244 112.5093) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 213.83244 112.5093) (end 213.97468 112.65154) (width 0.5588) (layer Composant) (net 133)) - (segment (start 213.97468 112.65154) (end 213.97468 113.0173) (width 0.5588) (layer Composant) (net 133)) - (segment (start 212.9155 113.0173) (end 213.97468 113.0173) (width 0.254) (layer Composant) (net 133) (status 800)) - (segment (start 209.677 98.69424) (end 209.296 99.07524) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 209.296 99.07524) (end 209.296 99.8855) (width 0.5588) (layer Cuivre) (net 133) (status 400)) - (segment (start 209.677 98.69424) (end 209.677 100.7745) (width 0.254) (layer Composant) (net 133) (status 400)) - (segment (start 203.454 99.71532) (end 202.6793 99.71532) (width 0.254) (layer Composant) (net 133)) - (segment (start 204.6859 99.71532) (end 203.454 99.71532) (width 0.254) (layer Composant) (net 133)) - (segment (start 203.454 98.67392) (end 203.454 99.71532) (width 0.254) (layer Composant) (net 133)) - (via (at 199.644 97.536) (size 1.143) (layers Composant Cuivre) (net 133)) - (segment (start 199.644 97.536) (end 199.644 99.2505) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 199.644 99.2505) (end 199.009 99.8855) (width 0.5588) (layer Cuivre) (net 133) (status 400)) - (segment (start 190.9445 113.0173) (end 189.88532 113.0173) (width 0.254) (layer Composant) (net 133) (status 800)) - (segment (start 93.599 106.934) (end 91.694 108.839) (width 0.5588) (layer Composant) (net 133)) - (segment (start 97.409 82.931) (end 103.632 76.708) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 102.108 66.929) (end 100.965 66.929) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 175.641 86.741) (end 176.149 87.249) (width 0.5588) (layer GND_layer) (net 133) (status 400)) - (segment (start 104.267 72.1995) (end 104.267 69.088) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 104.14 139.827) (end 104.14 140.462) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 128.27 74.676) (end 130.1115 74.676) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 85.9155 114.7445) (end 84.836 114.7445) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 86.741 115.57) (end 85.9155 114.7445) (width 0.5588) (layer Composant) (net 133)) - (segment (start 140.3858 94.9198) (end 140.208 95.123) (width 0.5588) (layer Composant) (net 133)) - (segment (start 140.3858 93.726) (end 140.3858 94.9198) (width 0.254) (layer Composant) (net 133) (status 800)) - (segment (start 77.597 130.429) (end 74.422 130.429) (width 0.5588) (layer Composant) (net 133)) - (segment (start 78.867 129.159) (end 77.597 130.429) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 145.415 100.076) (end 146.812 100.076) (width 0.5588) (layer Composant) (net 133)) - (segment (start 144.8054 99.4664) (end 145.415 100.076) (width 0.254) (layer Composant) (net 133)) - (segment (start 143.129 99.4664) (end 144.8054 99.4664) (width 0.254) (layer Composant) (net 133) (status 800)) - (segment (start 105.156 91.948) (end 106.68 90.424) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 145.3515 103.886) (end 145.288 103.8225) (width 0.5588) (layer Cuivre) (net 133) (status 400)) - (segment (start 101.6 98.933) (end 105.156 95.377) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 110.744 141.859) (end 115.951 141.859) (width 0.5588) (layer Composant) (net 133)) - (segment (start 103.378 112.522) (end 101.6 110.744) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 109.601 84.328) (end 110.109 83.82) (width 0.5588) (layer Composant) (net 133)) - (segment (start 146.6215 100.2665) (end 146.812 100.076) (width 0.5588) (layer Cuivre) (net 133)) - (via (at 111.252 83.82) (size 1.143) (layers Composant Cuivre) (net 133)) - (segment (start 152.4 119.507) (end 152.4 115.57) (width 0.5588) (layer Composant) (net 133)) - (segment (start 151.892 120.015) (end 152.4 119.507) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 159.385 115.57) (end 152.4 115.57) (width 0.5588) (layer 3.3V_layer) (net 133)) - (segment (start 159.512 115.697) (end 159.385 115.57) (width 0.5588) (layer 3.3V_layer) (net 133)) - (segment (start 159.4485 115.6335) (end 159.512 115.697) (width 0.5588) (layer Composant) (net 133)) - (segment (start 159.4485 114.046) (end 159.4485 115.6335) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 123.6345 103.505) (end 124.587 104.521) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 105.7275 90.424) (end 102.8065 93.345) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 106.68 90.424) (end 105.7275 90.424) (width 0.5588) (layer Composant) (net 133)) - (segment (start 158.623 108.966) (end 159.512 108.966) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 158.242 108.585) (end 158.623 108.966) (width 0.5588) (layer Composant) (net 133)) - (segment (start 158.242 106.045) (end 158.242 108.585) (width 0.5588) (layer Composant) (net 133)) - (segment (start 158.75 105.537) (end 158.242 106.045) (width 0.5588) (layer Composant) (net 133)) - (segment (start 98.7425 90.043) (end 97.282 90.043) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 97.663 90.424) (end 106.68 90.424) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 97.282 90.043) (end 97.663 90.424) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 75.438 81.661) (end 78.105 84.328) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 75.438 73.025) (end 75.438 81.661) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 78.105 93.091) (end 78.105 84.328) (width 0.5588) (layer Composant) (net 133) (status C00)) - (segment (start 133.731 89.535) (end 133.731 89.535) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 133.731 89.535) (end 131.699 87.503) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 131.699 87.503) (end 131.699 87.122) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 144.653 113.03) (end 144.0815 113.6015) (width 0.5588) (layer Composant) (net 133)) - (segment (start 144.0815 113.6015) (end 143.51 113.6015) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 142.24 108.839) (end 143.637 110.236) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 194.183 60.452) (end 162.814 60.452) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 196.215 62.484) (end 194.183 60.452) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 196.215 68.326) (end 196.215 62.484) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 195.961 68.58) (end 196.215 68.326) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 194.691 68.58) (end 195.961 68.58) (width 0.5588) (layer GND_layer) (net 133) (status 800)) - (segment (start 130.937 60.452) (end 129.286 62.103) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 129.286 62.103) (end 129.286 66.929) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 129.286 66.929) (end 127.635 68.58) (width 0.5588) (layer GND_layer) (net 133) (status 400)) - (segment (start 162.814 60.452) (end 130.937 60.452) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 131.064 111.252) (end 131.064 112.2045) (width 0.254) (layer Composant) (net 133)) - (segment (start 131.064 112.2045) (end 131.0005 112.268) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 131.8768 110.4392) (end 131.064 111.252) (width 0.254) (layer Composant) (net 133)) - (segment (start 110.744 141.859) (end 110.744 139.446) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 194.6783 98.4377) (end 195.58 97.536) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 195.58 97.536) (end 199.644 97.536) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 194.6783 99.25304) (end 194.6783 98.4377) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 200.78192 98.67392) (end 199.644 97.536) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 135.001 97.663) (end 135.636 98.298) (width 0.5588) (layer Composant) (net 133)) - (segment (start 135.636 98.298) (end 137.668 98.298) (width 0.5588) (layer Composant) (net 133)) - (segment (start 194.6783 100.7237) (end 190.5 104.902) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 190.5 104.902) (end 190.5 109.44098) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 190.5 109.44098) (end 189.43828 110.5027) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 194.6783 99.25304) (end 194.6783 100.7237) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 175.133 113.157) (end 173.863 114.427) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 173.863 114.427) (end 173.863 122.428) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 173.863 122.428) (end 176.276 124.841) (width 0.5588) (layer GND_layer) (net 133) (status 400)) - (segment (start 176.149 113.157) (end 175.133 113.157) (width 0.5588) (layer GND_layer) (net 133) (status 800)) - (segment (start 214.45474 118.97614) (end 209.16646 124.26442) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 214.45474 110.5027) (end 214.45474 118.97614) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 203.47432 98.69424) (end 203.454 98.67392) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 209.677 98.69424) (end 203.47432 98.69424) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 203.454 98.67392) (end 200.78192 98.67392) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 207.96504 123.063) (end 209.16646 124.26442) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 204.851 123.063) (end 207.96504 123.063) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 203.79436 124.11964) (end 204.851 123.063) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 203.79436 124.61748) (end 203.79436 124.11964) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 221.869 66.04) (end 215.773 72.136) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 215.773 72.136) (end 211.074 72.136) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 223.52 66.04) (end 221.869 66.04) (width 0.5588) (layer GND_layer) (net 133) (status 800)) - (segment (start 211.074 72.136) (end 212.23732 73.29932) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 212.23732 73.29932) (end 212.23732 76.24826) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 195.961 72.136) (end 211.074 72.136) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 194.691 73.406) (end 195.961 72.136) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 194.691 73.406) (end 194.691 68.58) (width 0.5588) (layer GND_layer) (net 133) (status 400)) - (segment (start 224.79 87.884) (end 226.187 86.487) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 226.187 86.487) (end 226.187 68.707) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 226.187 68.707) (end 223.52 66.04) (width 0.5588) (layer GND_layer) (net 133) (status 400)) - (segment (start 224.79 88.9) (end 224.79 87.884) (width 0.5588) (layer GND_layer) (net 133) (status 800)) - (segment (start 198.3105 136.3345) (end 201.676 139.7) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 201.676 139.7) (end 224.155 139.7) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 224.155 139.7) (end 224.79 139.065) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 224.79 139.065) (end 224.79 137.16) (width 0.5588) (layer GND_layer) (net 133) (status 400)) - (segment (start 198.3105 127.5715) (end 198.3105 136.3345) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 189.15634 126.29134) (end 190.5 127.635) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 143.637 110.236) (end 143.637 112.014) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 143.637 112.014) (end 144.653 113.03) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 141.859 109.22) (end 142.24 108.839) (width 0.5588) (layer Composant) (net 133)) - (segment (start 141.3764 109.22) (end 141.859 109.22) (width 0.381) (layer Composant) (net 133) (status 800)) - (segment (start 141.732 113.3475) (end 143.256 113.3475) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 143.256 113.3475) (end 143.51 113.6015) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 137.287 113.538) (end 137.287 117.475) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 137.287 117.475) (end 136.652 118.11) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 136.652 118.11) (end 136.652 120.396) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 136.5885 111.633) (end 136.5885 112.8395) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 136.5885 112.8395) (end 137.287 113.538) (width 0.5588) (layer Composant) (net 133)) - (segment (start 81.28 140.843) (end 79.375 138.938) (width 0.5588) (layer Composant) (net 133)) - (segment (start 79.375 138.938) (end 78.74 138.938) (width 0.5588) (layer Composant) (net 133)) - (segment (start 78.74 138.938) (end 77.597 137.795) (width 0.5588) (layer Composant) (net 133)) - (segment (start 77.597 137.795) (end 77.597 135.509) (width 0.5588) (layer Composant) (net 133)) - (segment (start 77.597 135.509) (end 76.327 134.239) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 140.335 107.823) (end 140.335 104.4956) (width 0.4318) (layer Composant) (net 133)) - (segment (start 139.3952 108.1024) (end 139.3952 109.22) (width 0.254) (layer Composant) (net 133) (status 400)) - (segment (start 141.097 107.823) (end 140.335 107.823) (width 0.4) (layer Composant) (net 133)) - (segment (start 141.351 108.077) (end 141.097 107.823) (width 0.4) (layer Composant) (net 133)) - (segment (start 141.3764 108.077) (end 141.351 108.077) (width 0.4) (layer Composant) (net 133)) - (segment (start 141.3764 109.22) (end 141.3764 108.077) (width 0.254) (layer Composant) (net 133) (status 800)) - (segment (start 140.335 107.823) (end 139.7 107.823) (width 0.4318) (layer Composant) (net 133)) - (via (at 131.699 82.804) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 209.677 98.69424) (size 1.143) (layers Composant Cuivre) (net 133)) - (segment (start 146.812 100.076) (end 146.812 103.886) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 146.7485 103.8225) (end 146.812 103.886) (width 0.4) (layer Composant) (net 133)) - (segment (start 143.129 104.4702) (end 144.8054 104.4702) (width 0.4) (layer Composant) (net 133) (status 800)) - (segment (start 144.8054 104.4702) (end 145.288 103.8225) (width 0.4) (layer Composant) (net 133)) - (segment (start 145.288 103.8225) (end 146.7485 103.8225) (width 0.4) (layer Composant) (net 133)) - (segment (start 150.876 77.1525) (end 150.876 75.311) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 151.003 75.184) (end 151.003 72.898) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 150.876 75.311) (end 151.003 75.184) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 164.592 83.312) (end 168.529 87.249) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 164.592 83.2485) (end 164.592 83.312) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 108.077 89.027) (end 108.585 89.027) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 106.68 90.424) (end 108.077 89.027) (width 0.5588) (layer Composant) (net 133)) - (segment (start 106.68 91.313) (end 106.68 90.424) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 108.712 93.345) (end 106.68 91.313) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 112.522 93.345) (end 108.712 93.345) (width 0.5588) (layer GND_layer) (net 133) (status 800)) - (segment (start 168.529 87.249) (end 165.989 87.249) (width 0.5588) (layer GND_layer) (net 133) (status 800)) - (segment (start 194.691 83.185) (end 194.691 73.406) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 193.929 83.947) (end 194.691 83.185) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 193.2305 83.2485) (end 193.929 83.947) (width 0.5588) (layer Composant) (net 133)) - (segment (start 192.532 83.2485) (end 193.2305 83.2485) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 192.532 87.503) (end 189.23 90.805) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 192.532 83.2485) (end 192.532 87.503) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 105.664 74.676) (end 103.632 76.708) (width 0.5588) (layer Composant) (net 133)) - (segment (start 105.664 72.898) (end 105.664 74.676) (width 0.5588) (layer Composant) (net 133)) - (segment (start 104.9655 72.1995) (end 105.664 72.898) (width 0.5588) (layer Composant) (net 133)) - (segment (start 104.267 72.1995) (end 104.9655 72.1995) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 80.772 77.089) (end 85.979 77.089) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 106.68 82.931) (end 106.68 88.392) (width 0.4318) (layer Composant) (net 133)) - (segment (start 107.442 82.169) (end 106.68 82.931) (width 0.4318) (layer Composant) (net 133)) - (segment (start 108.712 82.169) (end 107.442 82.169) (width 0.5588) (layer Composant) (net 133)) - (segment (start 177.2285 77.1525) (end 177.165 77.089) (width 0.5588) (layer Composant) (net 133)) - (segment (start 178.562 77.1525) (end 177.2285 77.1525) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 123.571 99.695) (end 123.571 99.06) (width 0.5588) (layer Composant) (net 133)) - (segment (start 124.587 100.711) (end 123.571 99.695) (width 0.5588) (layer Composant) (net 133)) - (segment (start 140.208 95.123) (end 138.049 95.123) (width 0.5588) (layer Composant) (net 133)) - (via (at 189.15634 116.5098) (size 1.143) (layers Composant Cuivre) (net 133)) - (segment (start 166.243 89.535) (end 168.529 87.249) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 166.243 90.932) (end 166.243 89.535) (width 0.5588) (layer Composant) (net 133)) - (segment (start 159.4485 109.0295) (end 159.512 108.966) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 164.846 90.932) (end 166.243 90.932) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 129.3114 103.4542) (end 129.54 103.632) (width 0.254) (layer Composant) (net 133)) - (segment (start 127.635 103.4796) (end 129.3114 103.4542) (width 0.254) (layer Composant) (net 133) (status 800)) - (segment (start 139.7 107.823) (end 139.446 108.077) (width 0.4318) (layer Composant) (net 133)) - (segment (start 139.446 108.077) (end 139.4206 108.077) (width 0.4318) (layer Composant) (net 133)) - (segment (start 139.4206 108.077) (end 139.3952 108.1024) (width 0.4318) (layer Composant) (net 133)) - (segment (start 137.668 95.504) (end 137.668 98.298) (width 0.5588) (layer Composant) (net 133)) - (segment (start 137.668 98.298) (end 137.668 105.029) (width 0.4) (layer Composant) (net 133)) - (segment (start 131.699 82.804) (end 131.699 85.852) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 131.699 85.852) (end 131.699 86.741) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 131.699 86.741) (end 131.699 87.122) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 161.163 68.58) (end 161.544 68.58) (width 0.5588) (layer GND_layer) (net 133) (status 800)) - (segment (start 161.544 68.58) (end 162.814 67.31) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 162.814 67.31) (end 162.814 60.452) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 131.699 82.804) (end 130.048 84.455) (width 0.5588) (layer Composant) (net 133)) - (segment (start 130.048 84.455) (end 128.8415 84.455) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 190.5 127.635) (end 198.247 127.635) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 198.3105 127.5715) (end 199.644 126.238) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 198.247 127.635) (end 198.3105 127.5715) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 189.15634 116.5098) (end 189.15634 126.29134) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 188.214 115.56746) (end 189.15634 116.5098) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 188.214 111.125) (end 188.214 115.56746) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 188.8363 110.5027) (end 188.214 111.125) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 189.43828 110.5027) (end 188.8363 110.5027) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 93.726 132.588) (end 100.965 139.827) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 86.741 132.588) (end 93.726 132.588) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 85.852 132.588) (end 82.423 129.159) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 82.423 129.159) (end 78.867 129.159) (width 0.5588) (layer GND_layer) (net 133) (status 400)) - (segment (start 132.715 75.438) (end 132.715 81.788) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 132.715 81.788) (end 131.699 82.804) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 91.694 112.903) (end 89.408 112.903) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 89.408 112.903) (end 86.741 115.57) (width 0.5588) (layer Composant) (net 133)) - (segment (start 104.267 69.088) (end 102.108 66.929) (width 0.5588) (layer Composant) (net 133)) - (segment (start 97.282 90.043) (end 91.694 90.043) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 164.846 90.932) (end 164.846 93.4085) (width 0.5588) (layer Composant) (net 133) (status C00)) - (segment (start 147.32 115.697) (end 144.653 113.03) (width 0.5588) (layer 3.3V_layer) (net 133)) - (segment (start 159.4485 105.537) (end 158.75 105.537) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 104.14 140.462) (end 105.537 141.859) (width 0.5588) (layer Composant) (net 133)) - (segment (start 130.1115 74.676) (end 130.937 75.5015) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 105.537 141.859) (end 110.744 141.859) (width 0.5588) (layer Composant) (net 133)) - (segment (start 121.285 102.489) (end 121.285 101.346) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 121.158 102.616) (end 121.285 102.489) (width 0.5588) (layer Composant) (net 133)) - (segment (start 86.741 132.588) (end 85.852 132.588) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 103.632 79.883) (end 105.156 81.407) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 105.156 81.407) (end 110.744 81.407) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 103.632 76.708) (end 103.632 79.883) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 97.409 82.931) (end 89.281 82.931) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 89.281 82.931) (end 88.9 82.55) (width 0.5588) (layer Cuivre) (net 133) (status 400)) - (segment (start 91.694 90.043) (end 88.9 92.837) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 88.9 92.837) (end 88.9 95.25) (width 0.5588) (layer GND_layer) (net 133) (status 400)) - (segment (start 85.979 77.089) (end 88.9 80.01) (width 0.5588) (layer Composant) (net 133)) - (segment (start 88.9 80.01) (end 88.9 82.55) (width 0.5588) (layer Composant) (net 133) (status 400)) - (via (at 146.812 103.886) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 146.812 100.076) (size 0.889) (layers Composant Cuivre) (net 133)) - (via (at 150.876 75.311) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 163.068 75.311) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 106.68 90.424) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 132.715 75.438) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 86.741 132.588) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 100.965 139.827) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 117.729 75.184) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 103.632 76.708) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 97.282 90.043) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 152.4 115.57) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 159.512 115.697) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 103.378 112.522) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 193.929 83.947) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 194.691 73.406) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 123.571 99.06) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 121.158 102.616) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 129.032 89.789) (size 1.143) (layers Composant Cuivre) (net 133)) - (segment (start 163.068 74.676) (end 161.29 74.676) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 115.951 141.859) (end 118.364 139.446) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 101.6 110.744) (end 101.6 98.933) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 86.741 125.349) (end 86.741 129.54) (width 0.5588) (layer Composant) (net 133) (status C00)) - (segment (start 163.068 75.311) (end 163.068 74.676) (width 0.5588) (layer Composant) (net 133)) - (segment (start 165.989 115.697) (end 168.529 113.157) (width 0.5588) (layer 3.3V_layer) (net 133) (status 400)) - (segment (start 159.512 115.697) (end 165.989 115.697) (width 0.5588) (layer 3.3V_layer) (net 133)) - (segment (start 165.9255 75.1205) (end 164.592 75.1205) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 146.812 103.886) (end 145.3515 103.886) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 110.109 83.82) (end 111.252 83.82) (width 0.5588) (layer Composant) (net 133)) - (segment (start 166.624 74.422) (end 165.9255 75.1205) (width 0.5588) (layer Composant) (net 133)) - (segment (start 166.624 71.247) (end 166.624 74.422) (width 0.5588) (layer Composant) (net 133)) - (segment (start 163.957 68.58) (end 166.624 71.247) (width 0.5588) (layer Composant) (net 133)) - (segment (start 161.163 68.58) (end 163.957 68.58) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 145.415 100.2665) (end 146.6215 100.2665) (width 0.5588) (layer Cuivre) (net 133) (status 800)) - (segment (start 111.252 83.82) (end 110.744 83.312) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 131.8768 109.22) (end 131.8768 110.4392) (width 0.254) (layer Composant) (net 133) (status 800)) - (segment (start 140.3858 91.3257) (end 140.6525 91.059) (width 0.254) (layer Composant) (net 133) (status 400)) - (segment (start 140.3858 93.726) (end 140.3858 91.3257) (width 0.254) (layer Composant) (net 133) (status 800)) - (segment (start 110.744 78.486) (end 111.887 77.343) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 110.744 78.613) (end 110.744 78.486) (width 0.5588) (layer Cuivre) (net 133) (status 800)) - (segment (start 74.422 120.015) (end 74.422 130.429) (width 0.5588) (layer Composant) (net 133)) - (segment (start 105.156 95.377) (end 105.156 91.948) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 152.273 115.697) (end 147.32 115.697) (width 0.5588) (layer 3.3V_layer) (net 133)) - (segment (start 75.438 118.999) (end 74.422 120.015) (width 0.5588) (layer Composant) (net 133)) - (segment (start 76.327 118.999) (end 75.438 118.999) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 103.5685 112.3315) (end 103.378 112.522) (width 0.5588) (layer Composant) (net 133)) - (segment (start 126.746 103.4796) (end 127.635 103.4796) (width 0.254) (layer Composant) (net 133) (status 400)) - (segment (start 191.15278 96.90608) (end 190.69304 97.36582) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 189.23 94.9833) (end 191.15278 96.90608) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 189.23 90.805) (end 189.23 94.9833) (width 0.5588) (layer GND_layer) (net 133) (status 800)) - (via (at 191.15278 96.90608) (size 1.143) (layers Composant Cuivre) (net 133)) - (segment (start 81.28 140.97) (end 81.28 140.843) (width 0.5588) (layer Composant) (net 133)) - (segment (start 89.535 140.97) (end 81.28 140.97) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 86.741 121.158) (end 86.741 125.349) (width 0.5588) (layer Composant) (net 133) (status C00)) - (segment (start 159.4485 114.046) (end 159.4485 111.252) (width 0.5588) (layer Composant) (net 133) (status C00)) - (segment (start 159.4485 111.252) (end 159.4485 109.0295) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 199.1741 124.27204) (end 199.1741 122.7455) (width 0.254) (layer Composant) (net 133) (status 400)) - (segment (start 213.97468 110.5027) (end 213.97468 111.506) (width 0.254) (layer Composant) (net 133)) - (via (at 133.731 89.535) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 141.605 89.027) (size 1.143) (layers Composant Cuivre) (net 133)) - (segment (start 129.54 103.632) (end 132.588 103.632) (width 0.2) (layer Composant) (net 133)) - (via (at 136.652 120.396) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 137.287 113.538) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 142.24 108.839) (size 1.143) (layers Composant Cuivre) (net 133)) - (segment (start 126.746 103.505) (end 126.746 103.4796) (width 0.254) (layer Composant) (net 133)) - (segment (start 126.619 103.632) (end 126.746 103.505) (width 0.254) (layer Composant) (net 133)) - (segment (start 126.619 104.394) (end 126.619 103.632) (width 0.5588) (layer Composant) (net 133)) - (segment (start 126.492 104.521) (end 126.619 104.394) (width 0.5588) (layer Composant) (net 133)) - (segment (start 124.587 104.521) (end 126.492 104.521) (width 0.254) (layer Composant) (net 133)) - (segment (start 211.45754 107.5055) (end 214.45474 110.5027) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 104.14 139.827) (end 100.965 139.827) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 133.731 91.2495) (end 133.5405 91.44) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 133.731 89.535) (end 133.731 91.2495) (width 0.5588) (layer Composant) (net 133)) - (segment (start 111.887 77.343) (end 115.57 77.343) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 117.729 75.184) (end 115.57 77.343) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 117.602 75.311) (end 117.729 75.184) (width 0.5588) (layer Composant) (net 133)) - (segment (start 117.602 77.1525) (end 117.602 75.311) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 163.957 75.311) (end 164.592 75.1205) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 163.068 75.311) (end 163.957 75.311) (width 0.5588) (layer Composant) (net 133)) - (segment (start 212.9155 110.5027) (end 213.97468 110.5027) (width 0.254) (layer Composant) (net 133) (status 800)) - (via (at 194.6783 99.25304) (size 1.143) (layers Composant Cuivre) (net 133)) - (segment (start 192.33134 96.90608) (end 191.15278 96.90608) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 192.33134 96.90608) (end 194.6783 99.25304) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 194.6783 100.7745) (end 194.6783 99.25304) (width 0.254) (layer Composant) (net 133) (status 800)) - (segment (start 204.6859 100.7745) (end 204.6859 99.71532) (width 0.254) (layer Composant) (net 133) (status 800)) - (segment (start 202.6793 100.7745) (end 202.6793 99.71532) (width 0.254) (layer Composant) (net 133) (status 800)) - (segment (start 212.68182 76.835) (end 213.741 76.835) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 138.049 95.123) (end 137.668 95.504) (width 0.5588) (layer Composant) (net 133)) - (segment (start 212.68182 76.69276) (end 212.68182 76.835) (width 0.5588) (layer Composant) (net 133)) - (segment (start 212.23732 76.24826) (end 212.68182 76.69276) (width 0.5588) (layer Composant) (net 133)) - (via (at 212.23732 76.24826) (size 1.143) (layers Composant Cuivre) (net 133)) - (segment (start 212.19414 76.29144) (end 212.23732 76.24826) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 212.19414 80.645) (end 212.19414 76.29144) (width 0.5588) (layer GND_layer) (net 133)) - (via (at 212.19414 80.645) (size 1.143) (layers Composant Cuivre) (net 133)) - (segment (start 213.741 80.645) (end 212.19414 80.645) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 103.5685 111.252) (end 103.5685 112.3315) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 132.6515 75.5015) (end 130.937 75.5015) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 132.715 75.438) (end 132.6515 75.5015) (width 0.5588) (layer Composant) (net 133)) - (segment (start 162.941 75.438) (end 163.068 75.311) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 162.941 84.201) (end 162.941 75.438) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 165.989 87.249) (end 162.941 84.201) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 203.454 98.67392) (end 203.454 99.8855) (width 0.5588) (layer Cuivre) (net 133) (status 400)) - (segment (start 209.27568 111.53648) (end 209.27568 111.4425) (width 0.5588) (layer Cuivre) (net 133)) - (via (at 144.653 113.03) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 177.165 77.089) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 209.16646 124.26442) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 199.1741 124.27204) (size 1.143) (layers Composant Cuivre) (net 133)) - (via (at 203.454 98.67392) (size 1.143) (layers Composant Cuivre) (net 133)) - (segment (start 109.4105 82.8675) (end 108.712 82.169) (width 0.5588) (layer Composant) (net 133)) - (segment (start 190.5 97.36582) (end 190.5 98.1075) (width 0.5588) (layer Cuivre) (net 133) (status 400)) - (segment (start 190.69304 97.36582) (end 190.5 97.36582) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 86.741 132.588) (end 86.741 129.54) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 134.366 93.726) (end 134.3914 94.9452) (width 0.254) (layer Composant) (net 133) (status 800)) - (segment (start 176.276 124.841) (end 168.656 124.841) (width 0.5588) (layer Composant) (net 133) (status C00)) - (segment (start 136.652 118.6815) (end 136.652 120.396) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 136.652 120.396) (end 136.652 122.1105) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 138.938 104.4956) (end 140.335 104.4956) (width 0.4318) (layer Composant) (net 133)) - (segment (start 138.938 104.4956) (end 137.668 105.029) (width 0.5588) (layer Composant) (net 133)) - (segment (start 140.335 104.4956) (end 143.129 104.4702) (width 0.4) (layer Composant) (net 133) (status 400)) - (segment (start 182.8165 125.73) (end 177.165 125.73) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 177.165 125.73) (end 176.276 124.841) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 182.8165 125.73) (end 182.8165 127.9525) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 189.43828 110.5027) (end 190.0555 109.88548) (width 0.5588) (layer Cuivre) (net 133)) - (via (at 189.43828 110.5027) (size 1.143) (layers Composant Cuivre) (net 133)) - (segment (start 189.43828 110.5027) (end 190.9445 110.5027) (width 0.254) (layer Composant) (net 133) (status 400)) - (segment (start 204.36332 124.3965) (end 204.14234 124.61748) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 204.14234 124.61748) (end 203.79436 124.61748) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 204.36332 124.3965) (end 205.359 124.3965) (width 0.5588) (layer Cuivre) (net 133) (status 400)) - (via (at 203.79436 124.61748) (size 1.143) (layers Composant Cuivre) (net 133)) - (segment (start 203.79436 124.61748) (end 203.79436 125.64364) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 203.79436 125.64364) (end 203.2 126.238) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 203.2 126.238) (end 199.644 126.238) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 199.1741 124.27204) (end 199.1741 125.7681) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 199.644 126.238) (end 199.1741 125.7681) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 197.485 124.3965) (end 198.48068 124.3965) (width 0.5588) (layer Cuivre) (net 133) (status 800)) - (segment (start 199.1741 124.27204) (end 198.60514 124.27204) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 198.60514 124.27204) (end 198.48068 124.3965) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 200.42632 124.3965) (end 200.30186 124.27204) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 200.30186 124.27204) (end 199.1741 124.27204) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 201.422 124.3965) (end 200.42632 124.3965) (width 0.5588) (layer Cuivre) (net 133) (status 800)) - (segment (start 209.74812 112.00892) (end 209.27568 111.53648) (width 0.5588) (layer Cuivre) (net 133)) - (segment (start 214.45474 110.5027) (end 212.94852 112.00892) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 208.28 120.3325) (end 208.28 123.37796) (width 0.5588) (layer Cuivre) (net 133) (status 800)) - (segment (start 209.74812 112.00892) (end 212.94852 112.00892) (width 0.5588) (layer GND_layer) (net 133)) - (via (at 209.74812 112.00892) (size 1.143) (layers Composant Cuivre) (net 133)) - (segment (start 209.27568 111.4425) (end 208.28 111.4425) (width 0.5588) (layer Cuivre) (net 133) (status 400)) - (segment (start 128.9685 89.8525) (end 129.032 89.789) (width 0.5588) (layer Composant) (net 133)) - (segment (start 131.699 87.122) (end 129.032 89.789) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 129.3876 93.726) (end 129.8702 93.726) (width 0.254) (layer Composant) (net 133) (status C00)) - (segment (start 123.6345 103.505) (end 123.19 103.505) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 123.19 103.505) (end 122.301 102.616) (width 0.5588) (layer Composant) (net 133)) - (segment (start 122.301 102.616) (end 121.158 102.616) (width 0.5588) (layer Composant) (net 133)) - (segment (start 151.003 72.898) (end 133.604 72.898) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 133.604 72.898) (end 132.715 73.787) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 132.715 73.787) (end 132.715 75.438) (width 0.5588) (layer GND_layer) (net 133)) - (segment (start 137.3886 109.22) (end 137.3886 110.7694) (width 0.4318) (layer Composant) (net 133) (status 800)) - (segment (start 182.8165 127.9525) (end 183.134 128.27) (width 0.5588) (layer Composant) (net 133)) - (segment (start 183.134 133.604) (end 181.864 134.874) (width 0.5588) (layer Composant) (net 133)) - (segment (start 181.864 134.874) (end 181.864 136.906) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 168.529 113.157) (end 176.149 113.157) (width 0.5588) (layer Composant) (net 133) (status C00)) - (segment (start 74.422 130.429) (end 74.422 133.477) (width 0.5588) (layer Composant) (net 133)) - (segment (start 74.422 133.477) (end 75.184 134.239) (width 0.5588) (layer Composant) (net 133)) - (segment (start 75.184 134.239) (end 76.327 134.239) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 76.327 108.839) (end 76.327 111.379) (width 0.5588) (layer Cuivre) (net 133) (status C00)) - (segment (start 112.522 93.345) (end 112.522 95.885) (width 0.5588) (layer GND_layer) (net 133) (status C00)) - (segment (start 112.522 95.885) (end 112.522 98.425) (width 0.5588) (layer GND_layer) (net 133) (status C00)) - (segment (start 137.3886 110.7694) (end 136.5885 111.633) (width 0.4318) (layer Composant) (net 133) (status 400)) - (segment (start 134.366 93.726) (end 134.366 92.2655) (width 0.254) (layer Composant) (net 133) (status 800)) - (segment (start 134.366 92.2655) (end 133.5405 91.44) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 125.349 100.7745) (end 124.587 100.711) (width 0.5588) (layer Composant) (net 133) (status 800)) - (segment (start 106.68 88.392) (end 107.315 89.027) (width 0.5588) (layer Composant) (net 133)) - (segment (start 107.315 89.027) (end 108.585 89.027) (width 0.5588) (layer Composant) (net 133) (status 400)) - (segment (start 135.763 102.997) (end 137.668 105.029) (width 0.4) (layer Composant) (net 133)) - (segment (start 133.218 103.632) (end 133.853 102.997) (width 0.4) (layer Composant) (net 133) (tstamp 52D04C3B)) - (segment (start 133.853 102.997) (end 135.763 102.997) (width 0.4) (layer Composant) (net 133) (tstamp 52D04C3E)) - (segment (start 132.588 103.632) (end 133.218 103.632) (width 0.4) (layer Composant) (net 133)) - (segment (start 118.872 110.49) (end 118.872 113.792) (width 0.381) (layer GND_layer) (net 134)) - (segment (start 118.872 105.029) (end 119.507 104.394) (width 0.381) (layer Composant) (net 134)) - (segment (start 119.507 104.394) (end 120.777 104.394) (width 0.381) (layer Composant) (net 134) (status 400)) - (segment (start 117.221 134.747) (end 119.38 132.588) (width 0.381) (layer GND_layer) (net 134)) - (segment (start 124.714 110.363) (end 124.7775 110.2995) (width 0.4318) (layer Composant) (net 134)) - (segment (start 124.7775 110.2995) (end 124.7775 108.712) (width 0.4318) (layer Composant) (net 134) (status 400)) - (segment (start 123.444 105.283) (end 123.825 105.664) (width 0.4318) (layer GND_layer) (net 134)) - (segment (start 123.825 105.664) (end 123.825 110.109) (width 0.4318) (layer GND_layer) (net 134)) - (segment (start 123.825 110.109) (end 123.571 110.363) (width 0.4318) (layer GND_layer) (net 134)) - (segment (start 117.983 101.346) (end 117.983 104.14) (width 0.381) (layer Composant) (net 134) (status 800)) - (segment (start 117.983 104.14) (end 118.872 105.029) (width 0.381) (layer Composant) (net 134)) - (via (at 118.872 105.029) (size 0.889) (layers Composant Cuivre) (net 134)) - (via (at 123.444 105.283) (size 0.889) (layers Composant Cuivre) (net 134)) - (via (at 123.571 110.363) (size 0.889) (layers Composant Cuivre) (net 134)) - (segment (start 119.38 114.3) (end 119.38 132.588) (width 0.381) (layer GND_layer) (net 134)) - (segment (start 119.38 132.588) (end 119.38 132.715) (width 0.381) (layer GND_layer) (net 134)) - (segment (start 126.492 105.9688) (end 126.492 106.426) (width 0.254) (layer Composant) (net 134)) - (segment (start 126.5428 106.4768) (end 127.635 106.4768) (width 0.254) (layer Composant) (net 134) (status 400)) - (segment (start 126.492 106.426) (end 126.5428 106.4768) (width 0.254) (layer Composant) (net 134)) - (segment (start 123.444 105.283) (end 124.206 106.045) (width 0.4318) (layer Composant) (net 134)) - (segment (start 125.8062 106.045) (end 125.8824 105.9688) (width 0.4318) (layer Composant) (net 134)) - (segment (start 124.206 106.045) (end 125.8062 106.045) (width 0.4318) (layer Composant) (net 134)) - (segment (start 123.444 105.283) (end 121.666 105.283) (width 0.4318) (layer Composant) (net 134)) - (segment (start 121.666 105.283) (end 120.777 104.394) (width 0.4318) (layer Composant) (net 134) (status 400)) - (segment (start 123.571 110.363) (end 124.714 110.363) (width 0.4318) (layer Composant) (net 134)) - (segment (start 117.348 115.062) (end 117.348 110.49) (width 0.381) (layer GND_layer) (net 134)) - (segment (start 116.078 139.446) (end 115.824 139.446) (width 0.381) (layer GND_layer) (net 134) (status 400)) - (segment (start 117.221 138.303) (end 116.078 139.446) (width 0.381) (layer GND_layer) (net 134)) - (segment (start 117.221 134.747) (end 117.221 138.303) (width 0.381) (layer GND_layer) (net 134)) - (segment (start 118.872 105.029) (end 118.872 110.49) (width 0.381) (layer GND_layer) (net 134)) - (segment (start 113.284 139.446) (end 113.665 139.446) (width 0.381) (layer GND_layer) (net 134) (status 800)) - (segment (start 113.665 139.446) (end 114.554 138.557) (width 0.381) (layer GND_layer) (net 134)) - (segment (start 118.872 113.792) (end 119.38 114.3) (width 0.381) (layer GND_layer) (net 134)) - (segment (start 126.492 105.9688) (end 125.8824 105.9688) (width 0.254) (layer Composant) (net 134)) - (segment (start 127.635 105.9688) (end 126.492 105.9688) (width 0.254) (layer Composant) (net 134) (status 800)) - (segment (start 117.348 110.49) (end 118.872 110.49) (width 0.254) (layer GND_layer) (net 134)) - (segment (start 114.554 138.557) (end 114.554 132.334) (width 0.381) (layer GND_layer) (net 134)) - (segment (start 116.332 116.078) (end 117.348 115.062) (width 0.381) (layer GND_layer) (net 134)) - (segment (start 116.332 130.556) (end 116.332 116.078) (width 0.381) (layer GND_layer) (net 134)) - (segment (start 114.554 132.334) (end 116.332 130.556) (width 0.381) (layer GND_layer) (net 134)) - (segment (start 167.132 99.187) (end 168.529 97.79) (width 0.4318) (layer Cuivre) (net 135) (status 400)) - (segment (start 166.751 105.791) (end 167.132 105.41) (width 0.254) (layer Cuivre) (net 135)) - (segment (start 166.751 106.934) (end 166.751 105.791) (width 0.4318) (layer Composant) (net 135)) - (segment (start 167.132 105.41) (end 167.132 99.187) (width 0.4318) (layer Cuivre) (net 135)) - (segment (start 176.149 97.79) (end 168.529 97.79) (width 0.762) (layer Composant) (net 135) (status C00)) - (segment (start 163.957 109.728) (end 166.751 106.934) (width 0.4318) (layer Composant) (net 135)) - (segment (start 163.957 111.3155) (end 163.957 109.728) (width 0.4318) (layer Composant) (net 135) (status 800)) - (via (at 166.751 105.791) (size 0.889) (layers Composant Cuivre) (net 135)) - (segment (start 80.645 138.557) (end 78.867 136.779) (width 0.381) (layer Cuivre) (net 139) (status 400)) - (segment (start 83.439 138.557) (end 80.645 138.557) (width 0.381) (layer Cuivre) (net 139) (status 800)) - (segment (start 82.423 136.398) (end 81.28 135.255) (width 0.254) (layer Composant) (net 140)) - (segment (start 77.597 124.714) (end 77.597 112.649) (width 0.254) (layer Composant) (net 140)) - (segment (start 80.264 125.349) (end 81.28 126.365) (width 0.254) (layer Composant) (net 140)) - (segment (start 91.44 135.382) (end 90.424 136.398) (width 0.254) (layer Composant) (net 140)) - (segment (start 81.28 135.255) (end 81.28 126.365) (width 0.254) (layer Composant) (net 140)) - (segment (start 78.232 125.349) (end 77.597 124.714) (width 0.254) (layer Composant) (net 140)) - (segment (start 80.264 125.349) (end 78.232 125.349) (width 0.254) (layer Composant) (net 140)) - (segment (start 90.424 136.398) (end 82.423 136.398) (width 0.254) (layer Composant) (net 140)) - (segment (start 91.44 134.62) (end 91.44 135.382) (width 0.254) (layer Composant) (net 140) (status 800)) - (segment (start 77.597 112.649) (end 78.867 111.379) (width 0.254) (layer Composant) (net 140) (status 400)) - (segment (start 161.3535 110.5535) (end 160.401 109.601) (width 0.254) (layer Composant) (net 141)) - (segment (start 160.401 109.601) (end 160.401 108.712) (width 0.254) (layer Composant) (net 141)) - (segment (start 160.401 108.712) (end 160.02 108.331) (width 0.254) (layer Composant) (net 141)) - (segment (start 160.02 108.331) (end 159.512 108.331) (width 0.254) (layer Composant) (net 141) (status 400)) - (segment (start 161.3535 111.252) (end 161.3535 110.5535) (width 0.254) (layer Composant) (net 141) (status 800)) - (segment (start 163.957 113.2205) (end 163.957 113.284) (width 0.762) (layer Composant) (net 141) (status 800)) - (segment (start 161.3535 111.252) (end 161.3535 114.046) (width 0.762) (layer Composant) (net 141) (status C00)) - (segment (start 163.957 113.284) (end 163.195 114.046) (width 0.762) (layer Composant) (net 141)) - (segment (start 163.195 114.046) (end 161.3535 114.046) (width 0.762) (layer Composant) (net 141) (status 400)) - (via (at 186.182 71.12) (size 0.889) (layers Composant Cuivre) (net 142)) - (segment (start 187.579 71.12) (end 186.182 71.12) (width 0.381) (layer Composant) (net 142)) - (segment (start 187.706 71.247) (end 187.579 71.12) (width 0.381) (layer Composant) (net 142)) - (segment (start 188.2775 71.247) (end 187.706 71.247) (width 0.381) (layer Composant) (net 142) (status 800)) - (segment (start 184.15 74.676) (end 186.182 74.676) (width 0.381) (layer Composant) (net 142) (status 800)) - (via (at 186.182 74.676) (size 0.635) (layers Composant Cuivre) (net 142)) - (segment (start 186.182 71.12) (end 186.182 74.676) (width 0.381) (layer GND_layer) (net 142)) - (segment (start 183.7055 72.9615) (end 184.15 73.406) (width 0.4318) (layer Composant) (net 143) (status 400)) - (segment (start 181.102 72.9615) (end 183.7055 72.9615) (width 0.4318) (layer Composant) (net 143) (status 800)) - (segment (start 181.61 75.438) (end 181.102 74.93) (width 0.381) (layer Composant) (net 144)) - (segment (start 182.245 75.438) (end 181.61 75.438) (width 0.381) (layer Composant) (net 144)) - (segment (start 184.15 75.946) (end 182.753 75.946) (width 0.381) (layer Composant) (net 144) (status 800)) - (segment (start 181.102 74.93) (end 181.102 74.8665) (width 0.381) (layer Composant) (net 144) (status 400)) - (segment (start 182.753 75.946) (end 182.245 75.438) (width 0.381) (layer Composant) (net 144)) - (segment (start 181.102 77.2795) (end 184.0865 77.2795) (width 0.4318) (layer Composant) (net 145) (status 800)) - (segment (start 184.0865 77.2795) (end 184.15 77.216) (width 0.4318) (layer Composant) (net 145) (status 400)) - (segment (start 184.15 78.486) (end 181.8005 78.486) (width 0.4318) (layer Composant) (net 146) (status 800)) - (segment (start 181.8005 78.486) (end 181.102 79.1845) (width 0.4318) (layer Composant) (net 146) (status 400)) - (segment (start 183.007 79.756) (end 182.245 80.518) (width 0.381) (layer Composant) (net 147)) - (segment (start 178.562 79.121) (end 179.959 80.518) (width 0.4318) (layer Composant) (net 147)) - (segment (start 178.562 79.0575) (end 178.562 79.121) (width 0.4318) (layer Composant) (net 147) (status 800)) - (segment (start 182.245 80.518) (end 179.959 80.518) (width 0.381) (layer Composant) (net 147)) - (segment (start 184.15 79.756) (end 183.007 79.756) (width 0.381) (layer Composant) (net 147) (status 800)) - (segment (start 176.149 92.075) (end 175.641 91.567) (width 0.381) (layer Composant) (net 148)) - (segment (start 169.291 91.567) (end 168.529 92.329) (width 0.381) (layer Composant) (net 148) (status 400)) - (segment (start 164.846 95.3135) (end 165.2905 95.758) (width 0.254) (layer Composant) (net 148) (status 800)) - (via (at 166.878 95.758) (size 0.889) (layers Composant Cuivre) (net 148)) - (segment (start 176.149 92.329) (end 178.562 92.329) (width 0.381) (layer Cuivre) (net 148) (status 800)) - (segment (start 176.149 92.329) (end 176.149 92.075) (width 0.381) (layer Composant) (net 148) (status 800)) - (segment (start 165.2905 95.758) (end 166.878 95.758) (width 0.381) (layer Composant) (net 148)) - (segment (start 166.878 92.964) (end 166.878 95.758) (width 0.381) (layer Composant) (net 148)) - (segment (start 167.513 92.329) (end 166.878 92.964) (width 0.381) (layer Composant) (net 148)) - (segment (start 168.529 92.329) (end 167.513 92.329) (width 0.381) (layer Composant) (net 148) (status 800)) - (segment (start 186.69 89.408) (end 186.69 88.265) (width 0.381) (layer Cuivre) (net 148) (status 400)) - (segment (start 164.846 95.3135) (end 163.068 95.3135) (width 0.4318) (layer Composant) (net 148) (status 800)) - (segment (start 175.641 91.567) (end 169.291 91.567) (width 0.4318) (layer Composant) (net 148)) - (segment (start 163.068 95.3135) (end 162.7505 95.631) (width 0.4318) (layer Composant) (net 148) (status 400)) - (segment (start 178.562 92.329) (end 179.197 92.964) (width 0.381) (layer Cuivre) (net 148)) - (segment (start 179.197 92.964) (end 183.134 92.964) (width 0.381) (layer Cuivre) (net 148)) - (segment (start 183.134 92.964) (end 186.69 89.408) (width 0.381) (layer Cuivre) (net 148)) - (segment (start 158.242 71.247) (end 158.242 74.676) (width 0.381) (layer Cuivre) (net 149)) - (segment (start 160.3375 71.247) (end 158.242 71.247) (width 0.381) (layer Composant) (net 149) (status 800)) - (via (at 158.242 71.247) (size 0.635) (layers Composant Cuivre) (net 149)) - (segment (start 156.21 74.676) (end 158.242 74.676) (width 0.381) (layer Composant) (net 149) (status 800)) - (via (at 158.242 74.676) (size 0.635) (layers Composant Cuivre) (net 149)) - (segment (start 154.3685 72.8345) (end 154.94 73.406) (width 0.381) (layer Composant) (net 150)) - (segment (start 153.162 72.8345) (end 154.3685 72.8345) (width 0.381) (layer Composant) (net 150) (status 800)) - (segment (start 154.94 73.406) (end 156.21 73.406) (width 0.381) (layer Composant) (net 150) (status 400)) - (segment (start 153.162 74.93) (end 153.67 75.438) (width 0.254) (layer Composant) (net 151)) - (segment (start 153.162 74.7395) (end 153.162 74.93) (width 0.254) (layer Composant) (net 151) (status 800)) - (segment (start 154.305 75.438) (end 153.67 75.438) (width 0.381) (layer Composant) (net 151)) - (segment (start 156.21 75.946) (end 154.813 75.946) (width 0.381) (layer Composant) (net 151) (status 800)) - (segment (start 154.813 75.946) (end 154.305 75.438) (width 0.381) (layer Composant) (net 151)) - (segment (start 153.8605 77.1525) (end 153.924 77.216) (width 0.381) (layer Composant) (net 152)) - (segment (start 153.035 77.1525) (end 153.8605 77.1525) (width 0.381) (layer Composant) (net 152) (status 800)) - (segment (start 153.924 77.216) (end 156.21 77.216) (width 0.381) (layer Composant) (net 152) (status 400)) - (segment (start 153.035 79.0575) (end 153.6065 79.0575) (width 0.381) (layer Composant) (net 153) (status 800)) - (segment (start 154.178 78.486) (end 156.21 78.486) (width 0.381) (layer Composant) (net 153) (status 400)) - (segment (start 153.6065 79.0575) (end 154.178 78.486) (width 0.381) (layer Composant) (net 153)) - (segment (start 150.876 79.756) (end 151.638 80.518) (width 0.381) (layer Composant) (net 154)) - (segment (start 150.876 79.0575) (end 150.876 79.756) (width 0.381) (layer Composant) (net 154) (status 800)) - (segment (start 155.067 79.756) (end 156.21 79.756) (width 0.381) (layer Composant) (net 154) (status 400)) - (segment (start 151.638 80.518) (end 154.305 80.518) (width 0.381) (layer Composant) (net 154)) - (segment (start 154.305 80.518) (end 155.067 79.756) (width 0.381) (layer Composant) (net 154)) - (via (at 125.222 74.676) (size 0.635) (layers Composant Cuivre) (net 155)) - (segment (start 125.222 71.247) (end 127.3175 71.247) (width 0.381) (layer Composant) (net 155) (status 400)) - (via (at 125.222 71.247) (size 0.635) (layers Composant Cuivre) (net 155)) - (segment (start 125.222 71.247) (end 125.222 74.676) (width 0.381) (layer GND_layer) (net 155)) - (segment (start 123.19 74.676) (end 125.222 74.676) (width 0.381) (layer Composant) (net 155) (status 800)) - (segment (start 120.142 77.1525) (end 121.7295 77.1525) (width 0.381) (layer Composant) (net 156) (status 800)) - (segment (start 121.793 77.216) (end 123.19 77.216) (width 0.381) (layer Composant) (net 156) (status 400)) - (segment (start 121.7295 77.1525) (end 121.793 77.216) (width 0.381) (layer Composant) (net 156)) - (segment (start 121.539 78.486) (end 120.9675 79.0575) (width 0.381) (layer Composant) (net 157)) - (segment (start 123.19 78.486) (end 121.539 78.486) (width 0.381) (layer Composant) (net 157) (status 800)) - (segment (start 120.9675 79.0575) (end 120.142 79.0575) (width 0.381) (layer Composant) (net 157) (status 400)) - (segment (start 94.361 79.629) (end 99.949 79.629) (width 0.762) (layer Composant) (net 158) (status 400)) - (segment (start 104.267 74.168) (end 99.949 78.486) (width 0.4318) (layer Composant) (net 158)) - (segment (start 87.6935 88.8365) (end 88.9 87.63) (width 0.762) (layer Composant) (net 158) (status 400)) - (segment (start 99.949 79.629) (end 99.949 81.026) (width 0.762) (layer Composant) (net 158) (status 800)) - (segment (start 93.472 77.089) (end 93.472 78.74) (width 0.762) (layer Composant) (net 158) (status 800)) - (segment (start 93.472 78.74) (end 94.361 79.629) (width 0.762) (layer Composant) (net 158)) - (segment (start 87.6935 90.2335) (end 87.6935 88.8365) (width 0.762) (layer Composant) (net 158)) - (segment (start 97.282 83.693) (end 92.837 83.693) (width 0.762) (layer Composant) (net 158)) - (segment (start 104.267 74.1045) (end 104.267 74.168) (width 0.4318) (layer Composant) (net 158) (status 800)) - (segment (start 92.837 83.693) (end 88.9 87.63) (width 0.762) (layer Composant) (net 158) (status 400)) - (segment (start 99.949 78.486) (end 99.949 79.629) (width 0.4318) (layer Composant) (net 158) (status 400)) - (segment (start 99.949 81.026) (end 97.282 83.693) (width 0.762) (layer Composant) (net 158)) - (segment (start 87.6935 90.2335) (end 84.836 93.091) (width 0.762) (layer Composant) (net 158)) - (segment (start 84.836 93.091) (end 81.5086 93.091) (width 0.762) (layer Composant) (net 158) (status 400)) - (segment (start 184.404 126.0475) (end 184.7215 125.73) (width 0.4318) (layer Composant) (net 159) (status 400)) - (segment (start 184.404 130.302) (end 184.404 126.0475) (width 0.4318) (layer Composant) (net 159) (status 800)) - (segment (start 184.404 130.302) (end 184.404 136.906) (width 0.4318) (layer GND_layer) (net 159) (status C00)) - (segment (start 123.19 73.406) (end 120.7135 73.406) (width 0.381) (layer Composant) (net 160) (status 800)) - (segment (start 120.7135 73.406) (end 120.142 72.8345) (width 0.381) (layer Composant) (net 160) (status 400)) - (segment (start 123.19 75.946) (end 121.793 75.946) (width 0.381) (layer Composant) (net 161) (status 800)) - (segment (start 120.142 74.93) (end 120.65 75.438) (width 0.254) (layer Composant) (net 161)) - (segment (start 121.285 75.438) (end 120.65 75.438) (width 0.381) (layer Composant) (net 161)) - (segment (start 120.142 74.7395) (end 120.142 74.93) (width 0.254) (layer Composant) (net 161) (status 800)) - (segment (start 121.793 75.946) (end 121.285 75.438) (width 0.381) (layer Composant) (net 161)) - (segment (start 123.19 79.756) (end 122.047 79.756) (width 0.381) (layer Composant) (net 162) (status 800)) - (segment (start 122.047 79.756) (end 121.285 80.518) (width 0.381) (layer Composant) (net 162)) - (segment (start 118.999 80.518) (end 117.602 79.0575) (width 0.381) (layer Composant) (net 162) (status 400)) - (segment (start 121.285 80.518) (end 118.999 80.518) (width 0.381) (layer Composant) (net 162)) - (segment (start 98.7425 85.471) (end 97.155 85.471) (width 0.381) (layer Composant) (net 163) (status 800)) - (segment (start 95.885 86.741) (end 95.885 91.313) (width 0.381) (layer Composant) (net 163)) - (segment (start 95.885 91.313) (end 97.79 93.218) (width 0.381) (layer Composant) (net 163) (status 400)) - (segment (start 97.155 85.471) (end 95.885 86.741) (width 0.381) (layer Composant) (net 163)) - (segment (start 125.984 74.041) (end 123.317 71.374) (width 0.381) (layer Composant) (net 164)) - (segment (start 116.459 73.533) (end 113.284 73.533) (width 0.381) (layer Composant) (net 164) (status 400)) - (segment (start 118.618 71.374) (end 116.459 73.533) (width 0.381) (layer Composant) (net 164)) - (segment (start 123.317 71.374) (end 118.618 71.374) (width 0.381) (layer Composant) (net 164)) - (segment (start 125.984 76.581) (end 125.984 74.041) (width 0.381) (layer Composant) (net 164)) - (segment (start 126.619 77.216) (end 125.984 76.581) (width 0.381) (layer Composant) (net 164)) - (segment (start 128.27 77.216) (end 126.619 77.216) (width 0.381) (layer Composant) (net 164) (status 800)) - (segment (start 116.078 75.311) (end 115.57 74.803) (width 0.381) (layer Composant) (net 165)) - (segment (start 119.634 82.296) (end 117.856 80.518) (width 0.381) (layer Composant) (net 165)) - (segment (start 112.014 74.803) (end 110.744 73.533) (width 0.381) (layer Composant) (net 165) (status 400)) - (segment (start 123.19 82.296) (end 119.634 82.296) (width 0.381) (layer Composant) (net 165) (status 800)) - (segment (start 115.57 74.803) (end 112.014 74.803) (width 0.381) (layer Composant) (net 165)) - (segment (start 116.078 80.137) (end 116.078 75.311) (width 0.381) (layer Composant) (net 165)) - (segment (start 116.459 80.518) (end 116.078 80.137) (width 0.381) (layer Composant) (net 165)) - (segment (start 117.856 80.518) (end 116.459 80.518) (width 0.381) (layer Composant) (net 165)) - (segment (start 109.474 76.835) (end 109.474 74.803) (width 0.381) (layer Composant) (net 166)) - (segment (start 123.19 81.026) (end 124.079 81.026) (width 0.381) (layer Composant) (net 166) (status 800)) - (segment (start 109.982 77.343) (end 109.474 76.835) (width 0.381) (layer Composant) (net 166)) - (segment (start 114.808 77.343) (end 109.982 77.343) (width 0.381) (layer Composant) (net 166)) - (segment (start 115.316 77.851) (end 114.808 77.343) (width 0.381) (layer Composant) (net 166)) - (segment (start 124.079 81.026) (end 124.841 81.788) (width 0.381) (layer Composant) (net 166)) - (segment (start 124.841 81.788) (end 124.841 82.804) (width 0.381) (layer Composant) (net 166)) - (segment (start 119.253 83.058) (end 117.475 81.28) (width 0.381) (layer Composant) (net 166)) - (segment (start 124.841 82.804) (end 124.587 83.058) (width 0.381) (layer Composant) (net 166)) - (segment (start 109.474 74.803) (end 108.204 73.533) (width 0.381) (layer Composant) (net 166) (status 400)) - (segment (start 124.587 83.058) (end 119.253 83.058) (width 0.381) (layer Composant) (net 166)) - (segment (start 115.316 80.645) (end 115.316 77.851) (width 0.381) (layer Composant) (net 166)) - (segment (start 115.951 81.28) (end 115.316 80.645) (width 0.381) (layer Composant) (net 166)) - (segment (start 117.475 81.28) (end 115.951 81.28) (width 0.381) (layer Composant) (net 166)) - (segment (start 161.3535 102.489) (end 162.179 102.489) (width 0.381) (layer Composant) (net 167) (status 800)) - (segment (start 163.195 103.505) (end 163.195 105.918) (width 0.381) (layer Composant) (net 167)) - (segment (start 163.195 105.918) (end 163.6395 106.3625) (width 0.381) (layer Composant) (net 167)) - (segment (start 163.6395 106.3625) (end 164.846 106.3625) (width 0.381) (layer Composant) (net 167) (status 400)) - (segment (start 162.2425 108.966) (end 164.846 106.3625) (width 0.254) (layer Composant) (net 167) (status 400)) - (segment (start 162.179 102.489) (end 163.195 103.505) (width 0.381) (layer Composant) (net 167)) - (segment (start 161.544 108.966) (end 162.2425 108.966) (width 0.254) (layer Composant) (net 167) (status 800)) - (segment (start 210.439 76.835) (end 207.3275 76.835) (width 0.254) (layer Composant) (net 168) (status C00)) - (segment (start 210.439 80.645) (end 207.3275 80.645) (width 0.254) (layer Composant) (net 169) (status C00)) - (segment (start 99.949 73.279) (end 97.155 73.279) (width 0.762) (layer Composant) (net 170) (status 800)) - (segment (start 95.631 74.803) (end 90.043 74.803) (width 0.762) (layer Composant) (net 170)) - (segment (start 97.155 73.279) (end 95.631 74.803) (width 0.762) (layer Composant) (net 170)) - (segment (start 90.043 74.803) (end 86.614 71.374) (width 0.762) (layer Composant) (net 170) (status 400)) - (segment (start 75.438 66.929) (end 79.248 63.119) (width 1.524) (layer Composant) (net 171)) - (segment (start 79.248 63.119) (end 95.885 63.119) (width 1.524) (layer Composant) (net 171) (status 400)) - (segment (start 91.694 71.374) (end 91.694 67.31) (width 1.524) (layer Composant) (net 171) (status 800)) - (segment (start 91.694 67.31) (end 95.885 63.119) (width 1.524) (layer Composant) (net 171) (status 400)) - (segment (start 75.438 67.945) (end 75.438 66.929) (width 1.524) (layer Composant) (net 171) (status 800)) - (segment (start 115.443 110.236) (end 115.062 109.855) (width 0.381) (layer Composant) (net 172) (status 400)) - (segment (start 117.348 110.236) (end 115.443 110.236) (width 0.381) (layer Composant) (net 172) (status 800)) - (segment (start 92.2655 117.094) (end 90.043 117.094) (width 0.4318) (layer Composant) (net 173) (status C00)) - (segment (start 92.2655 121.158) (end 90.043 121.158) (width 0.4318) (layer Composant) (net 174) (status C00)) - (segment (start 92.2655 125.349) (end 90.043 125.349) (width 0.4318) (layer Composant) (net 175) (status C00)) - (segment (start 92.2655 129.413) (end 90.17 129.413) (width 0.4318) (layer Composant) (net 176) (status 800)) - (segment (start 90.17 129.413) (end 90.043 129.54) (width 0.4318) (layer Composant) (net 176) (status 400)) - (segment (start 104.4575 136.2075) (end 104.14 136.525) (width 0.4318) (layer Composant) (net 177) (status 400)) - (segment (start 104.4575 133.858) (end 104.4575 136.2075) (width 0.4318) (layer Composant) (net 177) (status 800)) - (segment (start 164.846 102.108) (end 164.846 104.4575) (width 0.4318) (layer Composant) (net 178) (status C00)) - (segment (start 101.092 115.062) (end 101.092 118.872) (width 0.254) (layer GND_layer) (net 179)) - (via (at 95.758 115.062) (size 0.889) (layers Composant Cuivre) (net 179)) - (via (at 101.092 115.062) (size 0.889) (layers Composant Cuivre) (net 179)) - (segment (start 96.139 113.792) (end 97.409 113.792) (width 0.381) (layer Composant) (net 179) (status 400)) - (via (at 101.092 118.872) (size 0.889) (layers Composant Cuivre) (net 179)) - (via (at 95.758 117.602) (size 0.889) (layers Composant Cuivre) (net 179)) - (segment (start 101.092 115.062) (end 102.743 115.062) (width 0.381) (layer Composant) (net 179) (status 400)) - (segment (start 95.758 115.062) (end 95.758 117.602) (width 0.254) (layer GND_layer) (net 179)) - (segment (start 101.092 118.872) (end 102.743 118.872) (width 0.381) (layer Composant) (net 179) (status 400)) - (segment (start 101.092 115.062) (end 95.758 115.062) (width 0.4318) (layer GND_layer) (net 179)) - (segment (start 95.123 113.792) (end 94.234 112.903) (width 0.381) (layer Composant) (net 179) (status 400)) - (segment (start 96.139 113.792) (end 95.123 113.792) (width 0.381) (layer Composant) (net 179)) - (segment (start 95.5675 111.5695) (end 94.234 112.903) (width 0.381) (layer Composant) (net 179) (status 400)) - (segment (start 95.5675 110.236) (end 95.5675 111.5695) (width 0.381) (layer Composant) (net 179) (status 800)) - (segment (start 95.758 114.173) (end 96.139 113.792) (width 0.381) (layer Composant) (net 179)) - (segment (start 95.758 115.062) (end 95.758 114.173) (width 0.381) (layer Composant) (net 179)) - (segment (start 97.409 117.602) (end 95.758 117.602) (width 0.381) (layer Composant) (net 179) (status 800)) - (segment (start 195.1863 100.7745) (end 195.1863 101.83368) (width 0.254) (layer Composant) (net 180) (status 800)) - (segment (start 195.1863 101.83368) (end 192.82664 101.83368) (width 0.254) (layer Composant) (net 180)) - (segment (start 192.82664 101.83368) (end 192.75552 101.76256) (width 0.254) (layer Composant) (net 180)) - (segment (start 192.75552 101.76256) (end 192.75552 97.31248) (width 0.254) (layer Composant) (net 180)) - (segment (start 192.75552 97.31248) (end 198.755 91.313) (width 0.254) (layer Composant) (net 180)) - (segment (start 198.755 91.313) (end 198.755 88.265) (width 0.254) (layer Composant) (net 180)) - (segment (start 198.755 88.265) (end 200.025 86.995) (width 0.254) (layer Composant) (net 180) (status 400)) - (segment (start 200.025 89.535) (end 200.025 92.97482) (width 0.254) (layer Composant) (net 181) (status 800)) - (segment (start 200.025 92.97482) (end 196.17491 96.82491) (width 0.254) (layer Composant) (net 181)) - (segment (start 195.6816 99.8684) (end 195.6816 100.7745) (width 0.254) (layer Composant) (net 181) (tstamp 52D04700) (status 400)) - (segment (start 196.04991 99.50009) (end 195.6816 99.8684) (width 0.2) (layer Composant) (net 181) (tstamp 52D046FC)) - (segment (start 196.17491 96.82509) (end 196.04991 96.95009) (width 0.254) (layer Composant) (net 181) (tstamp 52D0472D)) - (segment (start 196.04991 96.95009) (end 196.04991 99.50009) (width 0.254) (layer Composant) (net 181) (tstamp 52D04731)) - (segment (start 196.17491 96.82491) (end 196.17491 96.82509) (width 0.254) (layer Composant) (net 181)) - (segment (start 164.719 121.412) (end 165.227 120.523) (width 0.381) (layer Composant) (net 182) (status 400)) - (segment (start 164.719 124.206) (end 164.719 121.412) (width 0.381) (layer Composant) (net 182)) - (segment (start 165.354 124.5235) (end 164.719 124.206) (width 0.381) (layer Composant) (net 182) (status 800)) - (segment (start 162.687 120.523) (end 162.687 124.206) (width 0.381) (layer Composant) (net 183) (status 800)) - (segment (start 162.687 124.206) (end 162.814 124.5235) (width 0.381) (layer Composant) (net 183) (status 400)) - (segment (start 160.147 120.523) (end 160.147 124.3965) (width 0.4318) (layer Composant) (net 184) (status 800)) - (segment (start 160.147 124.3965) (end 160.274 124.5235) (width 0.4318) (layer Composant) (net 184) (status 400)) - (segment (start 157.607 120.523) (end 157.607 124.3965) (width 0.4318) (layer Composant) (net 185) (status 800)) - (segment (start 157.607 124.3965) (end 157.734 124.5235) (width 0.4318) (layer Composant) (net 185) (status 400)) - (segment (start 158.8135 89.154) (end 158.623 89.3445) (width 0.381) (layer Composant) (net 186) (status 400)) - (segment (start 160.782 89.154) (end 158.8135 89.154) (width 0.381) (layer Composant) (net 186) (status 800)) - (segment (start 161.925 88.392) (end 162.433 88.392) (width 0.381) (layer Composant) (net 187)) - (segment (start 162.814 88.773) (end 162.814 90.043) (width 0.381) (layer Composant) (net 187) (status 400)) - (segment (start 162.433 88.392) (end 162.814 88.773) (width 0.381) (layer Composant) (net 187)) - (segment (start 160.5915 87.0585) (end 161.925 88.392) (width 0.381) (layer Composant) (net 187)) - (segment (start 160.5915 86.995) (end 160.5915 87.0585) (width 0.381) (layer Composant) (net 187) (status 800)) - (segment (start 164.211 86.995) (end 164.846 87.63) (width 0.381) (layer Composant) (net 188) (status 400)) - (segment (start 162.4965 86.995) (end 164.211 86.995) (width 0.381) (layer Composant) (net 188) (status 800)) - (segment (start 126.492 83.82) (end 126.492 80.137) (width 0.254) (layer Composant) (net 189)) - (segment (start 130.048 83.058) (end 133.477 79.629) (width 0.254) (layer Composant) (net 189)) - (segment (start 126.873 79.756) (end 128.27 79.756) (width 0.254) (layer Composant) (net 189) (status 400)) - (segment (start 126.9365 84.455) (end 126.9365 84.2645) (width 0.254) (layer Composant) (net 189) (status 800)) - (segment (start 126.9365 84.2645) (end 126.9365 84.0105) (width 0.254) (layer Composant) (net 189)) - (segment (start 133.477 79.629) (end 135.763 79.629) (width 0.254) (layer Composant) (net 189) (status 400)) - (segment (start 126.9365 84.2645) (end 126.492 83.82) (width 0.254) (layer Composant) (net 189)) - (segment (start 127.889 83.058) (end 130.048 83.058) (width 0.254) (layer Composant) (net 189)) - (segment (start 126.9365 84.0105) (end 127.889 83.058) (width 0.254) (layer Composant) (net 189)) + (segment (start 152.019 102.489) (end 143.129 102.4636) (width 0.254) (layer Composant) (net 2) (status C30)) + (segment (start 129.54 104.521) (end 129.921 104.14) (width 0.254) (layer 3.3V_layer) (net 3)) + (segment (start 128.8034 104.9782) (end 127.635 104.9782) (width 0.254) (layer Composant) (net 3) (status 420)) + (segment (start 170.561 140.843) (end 169.164 139.446) (width 0.254) (layer 3.3V_layer) (net 3) (status 420)) + (segment (start 174.879 140.843) (end 170.561 140.843) (width 0.254) (layer 3.3V_layer) (net 3)) + (segment (start 175.514 140.208) (end 174.879 140.843) (width 0.254) (layer 3.3V_layer) (net 3)) + (segment (start 175.514 133.604) (end 175.514 140.208) (width 0.254) (layer 3.3V_layer) (net 3)) + (segment (start 168.402 126.492) (end 175.514 133.604) (width 0.254) (layer 3.3V_layer) (net 3)) + (segment (start 146.812 126.492) (end 168.402 126.492) (width 0.254) (layer 3.3V_layer) (net 3)) + (segment (start 143.383 123.063) (end 146.812 126.492) (width 0.254) (layer 3.3V_layer) (net 3)) + (segment (start 136.398 123.063) (end 143.383 123.063) (width 0.254) (layer 3.3V_layer) (net 3)) + (segment (start 134.874 121.539) (end 136.398 123.063) (width 0.254) (layer 3.3V_layer) (net 3)) + (segment (start 134.874 113.919) (end 134.874 121.539) (width 0.254) (layer 3.3V_layer) (net 3)) + (segment (start 132.842 111.887) (end 134.874 113.919) (width 0.254) (layer 3.3V_layer) (net 3)) + (segment (start 132.842 105.156) (end 132.842 111.887) (width 0.254) (layer 3.3V_layer) (net 3)) + (segment (start 129.921 104.14) (end 131.826 104.14) (width 0.254) (layer 3.3V_layer) (net 3)) + (segment (start 129.54 105.41) (end 129.032 105.156) (width 0.254) (layer Composant) (net 3)) + (segment (start 129.032 105.156) (end 128.8034 104.9782) (width 0.254) (layer Composant) (net 3)) + (via (at 129.54 105.41) (size 0.635) (layers Composant Cuivre) (net 3)) + (segment (start 129.54 105.41) (end 129.54 104.521) (width 0.254) (layer 3.3V_layer) (net 3)) + (segment (start 131.826 104.14) (end 132.842 105.156) (width 0.254) (layer 3.3V_layer) (net 3)) + (segment (start 165.481 124.714) (end 165.481 124.841) (width 0.254) (layer 3.3V_layer) (net 4)) + (segment (start 146.939 124.714) (end 165.481 124.714) (width 0.254) (layer 3.3V_layer) (net 4)) + (segment (start 145.796 123.571) (end 146.939 124.714) (width 0.254) (layer 3.3V_layer) (net 4)) + (segment (start 145.796 122.555) (end 145.796 123.571) (width 0.254) (layer 3.3V_layer) (net 4)) + (segment (start 143.764 120.523) (end 145.796 122.555) (width 0.254) (layer 3.3V_layer) (net 4)) + (segment (start 139.192 120.523) (end 143.764 120.523) (width 0.254) (layer 3.3V_layer) (net 4)) + (segment (start 138.303 121.412) (end 139.192 120.523) (width 0.254) (layer 3.3V_layer) (net 4)) + (segment (start 136.017 121.412) (end 138.303 121.412) (width 0.254) (layer 3.3V_layer) (net 4)) + (segment (start 135.509 120.904) (end 136.017 121.412) (width 0.254) (layer 3.3V_layer) (net 4)) + (segment (start 135.509 113.157) (end 135.509 120.904) (width 0.254) (layer 3.3V_layer) (net 4)) + (segment (start 129.54 106.299) (end 129.032 106.299) (width 0.254) (layer 3.3V_layer) (net 4)) + (segment (start 129.032 106.299) (end 128.651 105.918) (width 0.254) (layer 3.3V_layer) (net 4)) + (segment (start 128.651 105.918) (end 128.651 104.394) (width 0.254) (layer 3.3V_layer) (net 4)) + (segment (start 129.032 105.918) (end 129.54 106.299) (width 0.254) (layer Composant) (net 4)) + (segment (start 128.905 105.664) (end 129.032 105.918) (width 0.254) (layer Composant) (net 4)) + (segment (start 128.6764 105.4862) (end 128.905 105.664) (width 0.254) (layer Composant) (net 4)) + (segment (start 127.635 105.4862) (end 128.6764 105.4862) (width 0.254) (layer Composant) (net 4) (status 810)) + (segment (start 168.783 141.605) (end 166.624 139.446) (width 0.254) (layer 3.3V_layer) (net 4) (status 420)) + (segment (start 132.207 103.632) (end 133.35 104.775) (width 0.254) (layer 3.3V_layer) (net 4)) + (segment (start 176.911 141.605) (end 168.783 141.605) (width 0.254) (layer 3.3V_layer) (net 4)) + (segment (start 178.054 140.462) (end 176.911 141.605) (width 0.254) (layer 3.3V_layer) (net 4)) + (segment (start 178.054 133.604) (end 178.054 140.462) (width 0.254) (layer 3.3V_layer) (net 4)) + (segment (start 170.815 126.365) (end 178.054 133.604) (width 0.254) (layer 3.3V_layer) (net 4)) + (segment (start 170.815 124.46) (end 170.815 126.365) (width 0.254) (layer 3.3V_layer) (net 4)) + (segment (start 169.672 123.317) (end 170.815 124.46) (width 0.254) (layer 3.3V_layer) (net 4)) + (segment (start 167.005 123.317) (end 169.672 123.317) (width 0.254) (layer 3.3V_layer) (net 4)) + (segment (start 165.481 124.841) (end 167.005 123.317) (width 0.254) (layer 3.3V_layer) (net 4)) + (via (at 129.54 106.299) (size 0.635) (layers Composant Cuivre) (net 4)) + (segment (start 133.35 104.775) (end 133.35 110.998) (width 0.254) (layer 3.3V_layer) (net 4)) + (segment (start 133.35 110.998) (end 135.509 113.157) (width 0.254) (layer 3.3V_layer) (net 4)) + (segment (start 129.413 103.632) (end 132.207 103.632) (width 0.254) (layer 3.3V_layer) (net 4)) + (segment (start 128.651 104.394) (end 129.413 103.632) (width 0.254) (layer 3.3V_layer) (net 4)) + (segment (start 164.084 139.446) (end 162.814 138.176) (width 0.254) (layer 3.3V_layer) (net 5) (status 810)) + (segment (start 130.8862 107.6198) (end 131.064 107.442) (width 0.254) (layer Composant) (net 5)) + (segment (start 131.064 107.442) (end 131.064 106.426) (width 0.254) (layer Composant) (net 5)) + (segment (start 130.937 107.061) (end 131.064 106.934) (width 0.254) (layer 3.3V_layer) (net 5)) + (segment (start 131.064 106.934) (end 131.064 106.426) (width 0.254) (layer 3.3V_layer) (net 5)) + (segment (start 130.937 107.061) (end 130.937 114.681) (width 0.254) (layer 3.3V_layer) (net 5)) + (segment (start 130.937 114.681) (end 132.461 116.205) (width 0.254) (layer 3.3V_layer) (net 5)) + (segment (start 132.461 123.571) (end 132.461 116.205) (width 0.254) (layer 3.3V_layer) (net 5)) + (segment (start 139.573 130.683) (end 132.461 123.571) (width 0.254) (layer 3.3V_layer) (net 5)) + (segment (start 157.226 130.683) (end 139.573 130.683) (width 0.254) (layer 3.3V_layer) (net 5)) + (segment (start 162.814 136.271) (end 157.226 130.683) (width 0.254) (layer 3.3V_layer) (net 5)) + (segment (start 162.814 138.176) (end 162.814 136.271) (width 0.254) (layer 3.3V_layer) (net 5)) + (segment (start 130.8862 107.6198) (end 130.8862 109.22) (width 0.254) (layer Composant) (net 5) (status 420)) + (via (at 131.064 106.426) (size 0.635) (layers Composant Cuivre) (net 5)) + (via (at 129.159 112.014) (size 0.889) (layers Composant Cuivre) (net 6)) + (segment (start 129.159 112.014) (end 129.159 111.3) (width 0.254) (layer Composant) (net 6)) + (segment (start 159.004 139.319) (end 157.734 138.049) (width 0.254) (layer Cuivre) (net 6) (status 10)) + (segment (start 157.734 138.049) (end 157.734 136.017) (width 0.254) (layer Cuivre) (net 6)) + (segment (start 157.734 136.017) (end 154.178 132.461) (width 0.254) (layer Cuivre) (net 6)) + (segment (start 154.178 132.461) (end 138.43 132.461) (width 0.254) (layer Cuivre) (net 6)) + (segment (start 138.43 132.461) (end 129.159 123.19) (width 0.254) (layer Cuivre) (net 6)) + (segment (start 129.159 123.19) (end 129.159 112.014) (width 0.254) (layer Cuivre) (net 6)) + (segment (start 159.004 139.446) (end 159.004 139.319) (width 0.254) (layer Cuivre) (net 6) (status 830)) + (segment (start 129.413 110.617) (end 129.87528 110.15472) (width 0.254) (layer Composant) (net 6)) + (segment (start 129.87528 110.15472) (end 129.8956 109.22) (width 0.254) (layer Composant) (net 6) (status 420)) + (segment (start 129.159 110.871) (end 129.413 110.617) (width 0.254) (layer Composant) (net 6) (tstamp 53D8E6FD)) + (segment (start 129.159 111.3) (end 129.159 110.871) (width 0.254) (layer Composant) (net 6)) + (via (at 146.685 109.855) (size 0.889) (layers Composant Cuivre) (net 7)) + (segment (start 83.566 106.299) (end 78.867 106.299) (width 0.254) (layer GND_layer) (net 7) (status 420)) + (segment (start 82.3595 104.267) (end 80.899 104.267) (width 0.4318) (layer Composant) (net 7) (status 810)) + (segment (start 80.899 104.267) (end 80.391 104.775) (width 0.4318) (layer Composant) (net 7)) + (segment (start 83.566 106.299) (end 86.487 109.22) (width 0.254) (layer GND_layer) (net 7)) + (segment (start 143.637 109.855) (end 146.685 109.855) (width 0.254) (layer Cuivre) (net 7)) + (segment (start 141.732 111.76) (end 143.637 109.855) (width 0.254) (layer Cuivre) (net 7)) + (segment (start 133.604 111.76) (end 141.732 111.76) (width 0.254) (layer Cuivre) (net 7)) + (segment (start 132.461 110.617) (end 133.604 111.76) (width 0.254) (layer Cuivre) (net 7)) + (segment (start 127.508 110.617) (end 132.461 110.617) (width 0.254) (layer Cuivre) (net 7)) + (segment (start 125.476 112.649) (end 127.508 110.617) (width 0.254) (layer Cuivre) (net 7)) + (segment (start 78.867 106.299) (end 80.391 104.775) (width 0.381) (layer Composant) (net 7) (status 810)) + (segment (start 119.253 112.649) (end 125.476 112.649) (width 0.254) (layer Cuivre) (net 7)) + (segment (start 87.63 112.141) (end 90.17 114.681) (width 0.254) (layer Cuivre) (net 7)) + (segment (start 90.17 114.681) (end 94.361 114.681) (width 0.254) (layer Cuivre) (net 7)) + (segment (start 86.487 109.22) (end 86.487 110.998) (width 0.254) (layer GND_layer) (net 7)) + (segment (start 86.487 110.998) (end 87.63 112.141) (width 0.254) (layer GND_layer) (net 7)) + (segment (start 145.288 108.204) (end 144.5514 107.4674) (width 0.254) (layer Composant) (net 7)) + (segment (start 145.288 108.712) (end 145.288 108.204) (width 0.254) (layer Composant) (net 7)) + (segment (start 146.431 109.855) (end 145.288 108.712) (width 0.254) (layer Composant) (net 7)) + (segment (start 146.685 109.855) (end 146.431 109.855) (width 0.254) (layer Composant) (net 7)) + (segment (start 117.729 114.173) (end 119.253 112.649) (width 0.254) (layer Cuivre) (net 7)) + (segment (start 144.5514 107.4674) (end 143.129 107.4674) (width 0.254) (layer Composant) (net 7) (status 420)) + (via (at 87.63 112.141) (size 0.889) (layers Composant Cuivre) (net 7)) + (segment (start 94.361 114.681) (end 95.377 113.665) (width 0.254) (layer Cuivre) (net 7)) + (segment (start 95.377 113.665) (end 97.917 113.665) (width 0.254) (layer Cuivre) (net 7)) + (segment (start 97.917 113.665) (end 100.203 111.379) (width 0.254) (layer Cuivre) (net 7)) + (segment (start 100.203 111.379) (end 107.696 111.379) (width 0.254) (layer Cuivre) (net 7)) + (segment (start 107.696 111.379) (end 110.49 114.173) (width 0.254) (layer Cuivre) (net 7)) + (segment (start 110.49 114.173) (end 117.729 114.173) (width 0.254) (layer Cuivre) (net 7)) + (segment (start 141.224 114.554) (end 140.589 113.919) (width 0.381) (layer Composant) (net 8)) + (segment (start 123.8885 120.3325) (end 123.444 120.777) (width 0.381) (layer Composant) (net 8) (status 430)) + (via (at 142.621 116.205) (size 0.889) (layers Composant Cuivre) (net 8)) + (segment (start 128.27 120.3325) (end 123.8885 120.3325) (width 0.381) (layer Composant) (net 8) (status 830)) + (segment (start 138.8745 116.7765) (end 139.446 116.205) (width 0.381) (layer Composant) (net 8)) + (segment (start 136.652 116.7765) (end 138.8745 116.7765) (width 0.381) (layer Composant) (net 8) (status 810)) + (segment (start 140.3858 111.0488) (end 140.589 111.379) (width 0.254) (layer Composant) (net 8)) + (segment (start 140.3858 109.22) (end 140.3858 111.0488) (width 0.254) (layer Composant) (net 8) (status 810)) + (segment (start 131.826 116.7765) (end 128.27 120.3325) (width 0.381) (layer Composant) (net 8) (status 420)) + (segment (start 136.652 116.7765) (end 131.826 116.7765) (width 0.381) (layer Composant) (net 8) (status 810)) + (segment (start 140.589 113.919) (end 140.589 111.379) (width 0.381) (layer Composant) (net 8)) + (segment (start 139.446 116.205) (end 142.621 116.205) (width 0.381) (layer Cuivre) (net 8)) + (segment (start 142.621 116.205) (end 142.621 115.316) (width 0.381) (layer Composant) (net 8)) + (segment (start 142.621 115.316) (end 141.859 114.554) (width 0.381) (layer Composant) (net 8)) + (segment (start 141.859 114.554) (end 141.224 114.554) (width 0.381) (layer Composant) (net 8)) + (via (at 139.446 116.205) (size 0.889) (layers Composant Cuivre) (net 8)) + (segment (start 127.635 102.489) (end 126.492 102.489) (width 0.254) (layer Composant) (net 9) (status 810)) + (segment (start 118.11 99.949) (end 116.586 98.425) (width 0.254) (layer Composant) (net 9)) + (segment (start 116.586 98.425) (end 115.062 98.425) (width 0.254) (layer Composant) (net 9) (status 420)) + (segment (start 115.062 98.425) (end 113.792 97.155) (width 0.254) (layer Composant) (net 9) (status 810)) + (segment (start 113.792 97.155) (end 108.966 97.155) (width 0.254) (layer Composant) (net 9)) + (segment (start 108.966 97.155) (end 107.188 98.933) (width 0.254) (layer Composant) (net 9)) + (segment (start 107.188 98.933) (end 104.8385 98.933) (width 0.254) (layer Composant) (net 9) (status 420)) + (segment (start 123.19 100.965) (end 122.174 99.949) (width 0.254) (layer Composant) (net 9)) + (segment (start 122.174 99.949) (end 118.11 99.949) (width 0.254) (layer Composant) (net 9)) + (segment (start 123.19 101.981) (end 123.19 100.965) (width 0.254) (layer Composant) (net 9)) + (segment (start 123.444 102.235) (end 123.19 101.981) (width 0.254) (layer Composant) (net 9)) + (segment (start 126.238 102.235) (end 123.444 102.235) (width 0.254) (layer Composant) (net 9)) + (segment (start 126.492 102.489) (end 126.238 102.235) (width 0.254) (layer Composant) (net 9)) + (segment (start 126.492 101.727) (end 124.587 101.727) (width 0.254) (layer Composant) (net 10)) + (segment (start 122.809 99.949) (end 122.809 99.695) (width 0.254) (layer Composant) (net 10)) + (segment (start 106.934 96.647) (end 104.8385 96.647) (width 0.254) (layer Composant) (net 10) (status 420)) + (segment (start 108.966 94.615) (end 106.934 96.647) (width 0.254) (layer Composant) (net 10)) + (segment (start 113.792 94.615) (end 108.966 94.615) (width 0.254) (layer Composant) (net 10)) + (segment (start 115.062 95.885) (end 113.792 94.615) (width 0.254) (layer Composant) (net 10) (status 810)) + (segment (start 118.618 99.441) (end 115.062 95.885) (width 0.254) (layer Composant) (net 10) (status 420)) + (segment (start 122.555 99.441) (end 118.618 99.441) (width 0.254) (layer Composant) (net 10)) + (segment (start 122.809 99.695) (end 122.555 99.441) (width 0.254) (layer Composant) (net 10)) + (segment (start 124.587 101.727) (end 122.809 99.949) (width 0.254) (layer Composant) (net 10)) + (segment (start 126.746 101.981) (end 126.492 101.727) (width 0.254) (layer Composant) (net 10)) + (segment (start 127.635 101.981) (end 126.746 101.981) (width 0.254) (layer Composant) (net 10) (status 810)) + (segment (start 122.936 103.632) (end 122.682 103.886) (width 0.254) (layer Cuivre) (net 11)) + (segment (start 122.682 103.886) (end 120.523 103.886) (width 0.254) (layer Cuivre) (net 11)) + (via (at 84.836 108.585) (size 0.635) (layers Composant Cuivre) (net 11)) + (via (at 146.558 107.95) (size 0.889) (layers Composant Cuivre) (net 11)) + (segment (start 81.788 111.633) (end 84.836 108.585) (width 0.254) (layer GND_layer) (net 11)) + (segment (start 81.788 125.984) (end 81.788 111.633) (width 0.254) (layer GND_layer) (net 11)) + (segment (start 79.883 127.889) (end 81.788 125.984) (width 0.254) (layer GND_layer) (net 11)) + (segment (start 77.597 127.889) (end 79.883 127.889) (width 0.254) (layer GND_layer) (net 11)) + (segment (start 76.327 129.159) (end 77.597 127.889) (width 0.254) (layer GND_layer) (net 11) (status 810)) + (segment (start 145.796 107.95) (end 146.558 107.95) (width 0.254) (layer Composant) (net 11)) + (segment (start 144.907 107.061) (end 145.796 107.95) (width 0.254) (layer Composant) (net 11)) + (segment (start 144.78 106.9594) (end 144.907 107.061) (width 0.254) (layer Composant) (net 11)) + (segment (start 143.129 106.9594) (end 144.78 106.9594) (width 0.254) (layer Composant) (net 11) (status 810)) + (segment (start 85.725 107.696) (end 84.836 108.585) (width 0.254) (layer Cuivre) (net 11)) + (segment (start 108.6993 107.696) (end 85.725 107.696) (width 0.254) (layer Cuivre) (net 11)) + (segment (start 120.523 103.886) (end 119.888 103.251) (width 0.254) (layer Cuivre) (net 11)) + (segment (start 119.888 103.251) (end 116.84 103.251) (width 0.254) (layer Cuivre) (net 11)) + (segment (start 116.84 103.251) (end 116.205 103.886) (width 0.254) (layer Cuivre) (net 11)) + (segment (start 116.205 103.886) (end 116.205 105.664) (width 0.254) (layer Cuivre) (net 11)) + (segment (start 116.205 105.664) (end 115.824 106.045) (width 0.254) (layer Cuivre) (net 11)) + (segment (start 115.824 106.045) (end 110.3503 106.045) (width 0.254) (layer Cuivre) (net 11)) + (segment (start 110.3503 106.045) (end 108.6993 107.696) (width 0.254) (layer Cuivre) (net 11)) + (segment (start 132.842 103.632) (end 122.936 103.632) (width 0.254) (layer Cuivre) (net 11)) + (segment (start 133.477 102.997) (end 132.842 103.632) (width 0.254) (layer Cuivre) (net 11)) + (segment (start 134.493 102.997) (end 133.477 102.997) (width 0.254) (layer Cuivre) (net 11)) + (segment (start 135.509 104.013) (end 134.493 102.997) (width 0.254) (layer Cuivre) (net 11)) + (segment (start 137.16 104.013) (end 135.509 104.013) (width 0.254) (layer Cuivre) (net 11)) + (segment (start 144.653 107.95) (end 144.526 107.823) (width 0.254) (layer Cuivre) (net 11)) + (segment (start 144.526 107.823) (end 140.97 107.823) (width 0.254) (layer Cuivre) (net 11)) + (segment (start 140.97 107.823) (end 137.16 104.013) (width 0.254) (layer Cuivre) (net 11)) + (segment (start 146.558 107.95) (end 144.653 107.95) (width 0.254) (layer Cuivre) (net 11)) + (segment (start 107.9881 107.188) (end 85.217 107.188) (width 0.254) (layer Cuivre) (net 12)) + (via (at 83.82 108.585) (size 0.635) (layers Composant Cuivre) (net 12)) + (segment (start 136.017 102.108) (end 128.651 102.108) (width 0.254) (layer Cuivre) (net 12)) + (segment (start 128.651 102.108) (end 127.381 100.838) (width 0.254) (layer Cuivre) (net 12)) + (segment (start 127.381 100.838) (end 118.237 100.838) (width 0.254) (layer Cuivre) (net 12)) + (segment (start 118.237 100.838) (end 115.57 103.505) (width 0.254) (layer Cuivre) (net 12)) + (segment (start 115.57 103.505) (end 111.6711 103.505) (width 0.254) (layer Cuivre) (net 12)) + (segment (start 145.034 107.188) (end 145.542 106.68) (width 0.254) (layer Cuivre) (net 12)) + (segment (start 141.097 107.188) (end 145.034 107.188) (width 0.254) (layer Cuivre) (net 12)) + (segment (start 141.097 107.188) (end 136.017 102.108) (width 0.254) (layer Cuivre) (net 12)) + (via (at 146.558 106.68) (size 0.889) (layers Composant Cuivre) (net 12)) + (segment (start 146.558 106.68) (end 145.542 106.68) (width 0.254) (layer Cuivre) (net 12)) + (segment (start 143.129 106.4768) (end 145.2118 106.4768) (width 0.254) (layer Composant) (net 12) (status 810)) + (segment (start 145.2118 106.4768) (end 145.415 106.68) (width 0.254) (layer Composant) (net 12)) + (segment (start 145.415 106.68) (end 146.558 106.68) (width 0.254) (layer Composant) (net 12)) + (segment (start 80.01 126.619) (end 78.867 126.619) (width 0.254) (layer GND_layer) (net 12) (status 420)) + (segment (start 81.28 125.349) (end 80.01 126.619) (width 0.254) (layer GND_layer) (net 12)) + (segment (start 81.28 111.125) (end 81.28 125.349) (width 0.254) (layer GND_layer) (net 12)) + (segment (start 83.82 108.585) (end 81.28 111.125) (width 0.254) (layer GND_layer) (net 12)) + (segment (start 85.217 107.188) (end 83.82 108.585) (width 0.254) (layer Cuivre) (net 12)) + (segment (start 111.6711 103.505) (end 107.9881 107.188) (width 0.254) (layer Cuivre) (net 12)) + (segment (start 131.572 100.203) (end 136.779 100.203) (width 0.254) (layer Cuivre) (net 13)) + (segment (start 105.983 105.664) (end 83.566 105.664) (width 0.254) (layer Cuivre) (net 13)) + (segment (start 139.827 103.378) (end 139.827 102.743) (width 0.254) (layer Composant) (net 13)) + (segment (start 83.566 105.664) (end 81.788 107.442) (width 0.254) (layer Cuivre) (net 13)) + (via (at 139.827 102.743) (size 0.889) (layers Composant Cuivre) (net 13)) + (segment (start 81.788 107.442) (end 81.788 108.585) (width 0.254) (layer Cuivre) (net 13)) + (segment (start 81.788 108.585) (end 80.772 109.601) (width 0.254) (layer GND_layer) (net 13)) + (segment (start 80.772 109.601) (end 80.772 124.206) (width 0.254) (layer GND_layer) (net 13)) + (segment (start 80.772 124.206) (end 79.629 125.349) (width 0.254) (layer GND_layer) (net 13)) + (segment (start 79.629 125.349) (end 77.597 125.349) (width 0.254) (layer GND_layer) (net 13)) + (segment (start 77.597 125.349) (end 76.327 126.619) (width 0.254) (layer GND_layer) (net 13) (status 420)) + (segment (start 111.571 100.076) (end 105.983 105.664) (width 0.254) (layer Cuivre) (net 13)) + (via (at 81.788 108.585) (size 0.635) (layers Composant Cuivre) (net 13)) + (segment (start 141.351 103.98252) (end 143.129 103.9622) (width 0.254) (layer Composant) (net 13) (status 420)) + (segment (start 131.572 100.203) (end 129.667 98.298) (width 0.254) (layer Cuivre) (net 13)) + (segment (start 129.667 98.298) (end 127.762 98.298) (width 0.254) (layer Cuivre) (net 13)) + (segment (start 127.762 98.298) (end 126.111 96.647) (width 0.254) (layer Cuivre) (net 13)) + (segment (start 126.111 96.647) (end 120.142 96.647) (width 0.254) (layer Cuivre) (net 13)) + (segment (start 120.142 96.647) (end 116.713 100.076) (width 0.254) (layer Cuivre) (net 13)) + (segment (start 116.713 100.076) (end 111.571 100.076) (width 0.254) (layer Cuivre) (net 13)) + (segment (start 139.065 102.489) (end 139.573 102.489) (width 0.254) (layer Cuivre) (net 13)) + (segment (start 139.573 102.489) (end 139.827 102.743) (width 0.254) (layer Cuivre) (net 13)) + (segment (start 141.351 103.98252) (end 140.43152 103.98252) (width 0.254) (layer Composant) (net 13)) + (segment (start 136.779 100.203) (end 139.065 102.489) (width 0.254) (layer Cuivre) (net 13)) + (segment (start 140.43152 103.98252) (end 139.827 103.378) (width 0.254) (layer Composant) (net 13)) + (segment (start 142.367 101.854) (end 142.367 102.87) (width 0.254) (layer Cuivre) (net 14)) + (via (at 140.97 103.124) (size 0.889) (layers Composant Cuivre) (net 14)) + (segment (start 142.113 103.124) (end 140.97 103.124) (width 0.254) (layer Cuivre) (net 14)) + (segment (start 142.367 102.87) (end 142.113 103.124) (width 0.254) (layer Cuivre) (net 14)) + (segment (start 141.4145 100.9015) (end 142.367 101.854) (width 0.254) (layer Cuivre) (net 14)) + (segment (start 80.264 106.68) (end 82.296 104.648) (width 0.254) (layer Cuivre) (net 14)) + (segment (start 82.296 104.648) (end 105.075 104.648) (width 0.254) (layer Cuivre) (net 14)) + (segment (start 105.075 104.648) (end 110.998 98.725) (width 0.254) (layer Cuivre) (net 14)) + (segment (start 110.998 98.725) (end 110.998 97.663) (width 0.254) (layer Cuivre) (net 14)) + (segment (start 80.264 108.585) (end 80.264 122.682) (width 0.254) (layer GND_layer) (net 14)) + (segment (start 110.998 97.663) (end 111.506 97.155) (width 0.254) (layer Cuivre) (net 14)) + (segment (start 118.11 97.155) (end 119.634 95.631) (width 0.254) (layer Cuivre) (net 14)) + (segment (start 119.634 95.631) (end 126.619 95.631) (width 0.254) (layer Cuivre) (net 14)) + (segment (start 132.207 99.06) (end 137.541 99.06) (width 0.254) (layer Cuivre) (net 14)) + (segment (start 130.429 97.282) (end 132.207 99.06) (width 0.254) (layer Cuivre) (net 14)) + (segment (start 128.27 97.282) (end 130.429 97.282) (width 0.254) (layer Cuivre) (net 14)) + (segment (start 126.619 95.631) (end 128.27 97.282) (width 0.254) (layer Cuivre) (net 14)) + (segment (start 141.4145 100.9015) (end 139.3825 100.9015) (width 0.254) (layer Cuivre) (net 14)) + (segment (start 139.3825 100.9015) (end 137.541 99.06) (width 0.254) (layer Cuivre) (net 14)) + (segment (start 111.506 97.155) (end 118.11 97.155) (width 0.254) (layer Cuivre) (net 14)) + (segment (start 140.97 103.124) (end 141.3002 103.4542) (width 0.254) (layer Composant) (net 14)) + (segment (start 80.264 108.585) (end 80.264 106.68) (width 0.254) (layer Cuivre) (net 14)) + (via (at 80.264 108.585) (size 0.635) (layers Composant Cuivre) (net 14)) + (segment (start 80.264 122.682) (end 78.867 124.079) (width 0.254) (layer GND_layer) (net 14) (status 420)) + (segment (start 141.3002 103.4542) (end 143.129 103.4796) (width 0.254) (layer Composant) (net 14) (status 420)) + (segment (start 78.867 108.839) (end 79.756 109.347) (width 0.254) (layer Cuivre) (net 15) (status 810)) + (segment (start 140.9065 101.7905) (end 140.97 101.854) (width 0.254) (layer Cuivre) (net 15)) + (segment (start 79.756 109.347) (end 80.518 109.347) (width 0.254) (layer Cuivre) (net 15)) + (segment (start 81.026 108.839) (end 81.026 106.807) (width 0.254) (layer Cuivre) (net 15)) + (segment (start 81.026 106.807) (end 82.677 105.156) (width 0.254) (layer Cuivre) (net 15)) + (segment (start 82.677 105.156) (end 105.629 105.156) (width 0.254) (layer Cuivre) (net 15)) + (segment (start 105.629 105.156) (end 111.217 99.568) (width 0.254) (layer Cuivre) (net 15)) + (segment (start 111.217 99.568) (end 116.459 99.568) (width 0.254) (layer Cuivre) (net 15)) + (segment (start 116.459 99.568) (end 119.888 96.139) (width 0.254) (layer Cuivre) (net 15)) + (segment (start 82.3595 106.553) (end 81.153 106.553) (width 0.4318) (layer Composant) (net 15) (status 810)) + (segment (start 126.365 96.139) (end 128.016 97.79) (width 0.254) (layer Cuivre) (net 15)) + (segment (start 128.016 97.79) (end 130.175 97.79) (width 0.254) (layer Cuivre) (net 15)) + (segment (start 130.175 97.79) (end 131.953 99.568) (width 0.254) (layer Cuivre) (net 15)) + (segment (start 131.953 99.568) (end 137.033 99.568) (width 0.254) (layer Cuivre) (net 15)) + (segment (start 80.518 109.347) (end 81.026 108.839) (width 0.254) (layer Cuivre) (net 15)) + (segment (start 81.153 106.553) (end 80.645 107.061) (width 0.4318) (layer Composant) (net 15)) + (segment (start 78.867 108.839) (end 80.645 107.061) (width 0.381) (layer Composant) (net 15) (status 810)) + (via (at 140.97 101.854) (size 0.889) (layers Composant Cuivre) (net 15)) + (segment (start 140.9065 101.7905) (end 139.2555 101.7905) (width 0.254) (layer Cuivre) (net 15)) + (segment (start 119.888 96.139) (end 126.365 96.139) (width 0.254) (layer Cuivre) (net 15)) + (segment (start 139.2555 101.7905) (end 137.033 99.568) (width 0.254) (layer Cuivre) (net 15)) + (segment (start 142.0876 102.9716) (end 143.129 102.9716) (width 0.254) (layer Composant) (net 15) (status 420)) + (segment (start 140.97 101.854) (end 142.0876 102.9716) (width 0.254) (layer Composant) (net 15)) + (segment (start 128.143 100.33) (end 129.159 101.346) (width 0.254) (layer Cuivre) (net 16)) + (segment (start 117.221 101.092) (end 117.983 100.33) (width 0.254) (layer Cuivre) (net 16)) + (segment (start 117.983 100.33) (end 128.143 100.33) (width 0.254) (layer Cuivre) (net 16)) + (segment (start 136.398 101.346) (end 140.716 105.664) (width 0.254) (layer Cuivre) (net 16)) + (segment (start 82.3595 119.126) (end 82.3595 117.4115) (width 0.4318) (layer Composant) (net 16) (status 810)) + (segment (start 129.159 101.346) (end 136.398 101.346) (width 0.254) (layer Cuivre) (net 16)) + (via (at 141.478 106.426) (size 0.889) (layers Composant Cuivre) (net 16)) + (segment (start 141.478 106.426) (end 141.9352 105.9688) (width 0.254) (layer Composant) (net 16)) + (segment (start 141.9352 105.9688) (end 143.129 105.9688) (width 0.254) (layer Composant) (net 16) (status 420)) + (segment (start 140.716 105.664) (end 141.478 106.426) (width 0.254) (layer Cuivre) (net 16)) + (segment (start 83.058 107.95) (end 84.328 106.68) (width 0.254) (layer Cuivre) (net 16)) + (segment (start 82.3595 117.4115) (end 78.867 113.919) (width 0.4318) (layer Composant) (net 16) (status 420)) + (segment (start 78.867 113.919) (end 79.248 113.03) (width 0.254) (layer Cuivre) (net 16) (status 810)) + (segment (start 79.248 113.03) (end 83.058 109.22) (width 0.254) (layer Cuivre) (net 16)) + (segment (start 83.058 109.22) (end 83.058 107.95) (width 0.254) (layer Cuivre) (net 16)) + (segment (start 84.328 106.68) (end 107.2007 106.68) (width 0.254) (layer Cuivre) (net 16)) + (segment (start 107.2007 106.68) (end 112.7887 101.092) (width 0.254) (layer Cuivre) (net 16)) + (segment (start 112.7887 101.092) (end 117.221 101.092) (width 0.254) (layer Cuivre) (net 16)) + (segment (start 106.5657 106.172) (end 84.074 106.172) (width 0.254) (layer Cuivre) (net 17)) + (segment (start 84.074 106.172) (end 82.55 107.696) (width 0.254) (layer Cuivre) (net 17)) + (segment (start 82.55 107.696) (end 82.55 108.839) (width 0.254) (layer Cuivre) (net 17)) + (segment (start 82.55 108.839) (end 81.28 110.109) (width 0.254) (layer Cuivre) (net 17)) + (segment (start 81.28 110.109) (end 78.232 110.109) (width 0.254) (layer Cuivre) (net 17)) + (segment (start 78.232 110.109) (end 77.597 110.744) (width 0.254) (layer Cuivre) (net 17)) + (segment (start 77.597 110.744) (end 77.597 115.189) (width 0.254) (layer Cuivre) (net 17)) + (segment (start 77.597 115.189) (end 78.867 116.459) (width 0.254) (layer Cuivre) (net 17) (status 420)) + (segment (start 78.867 116.459) (end 80.391 117.983) (width 0.381) (layer Composant) (net 17) (status 810)) + (segment (start 80.391 117.983) (end 80.391 120.269) (width 0.381) (layer Composant) (net 17)) + (segment (start 82.3595 121.412) (end 81.534 121.412) (width 0.4318) (layer Composant) (net 17) (status 810)) + (segment (start 81.534 121.412) (end 80.391 120.269) (width 0.4318) (layer Composant) (net 17)) + (segment (start 141.478 105.283) (end 142.0114 105.4862) (width 0.254) (layer Composant) (net 17)) + (segment (start 142.0114 105.4862) (end 143.129 105.4608) (width 0.254) (layer Composant) (net 17) (status 420)) + (via (at 141.478 105.283) (size 0.635) (layers Composant Cuivre) (net 17)) + (segment (start 116.967 100.584) (end 112.1537 100.584) (width 0.254) (layer Cuivre) (net 17)) + (segment (start 141.478 105.283) (end 140.97 105.156) (width 0.254) (layer Cuivre) (net 17)) + (segment (start 136.652 100.838) (end 140.97 105.156) (width 0.254) (layer Cuivre) (net 17)) + (segment (start 129.54 100.838) (end 136.652 100.838) (width 0.254) (layer Cuivre) (net 17)) + (segment (start 129.54 100.838) (end 125.857 97.155) (width 0.254) (layer Cuivre) (net 17)) + (segment (start 112.1537 100.584) (end 106.5657 106.172) (width 0.254) (layer Cuivre) (net 17)) + (segment (start 125.857 97.155) (end 120.396 97.155) (width 0.254) (layer Cuivre) (net 17)) + (segment (start 120.396 97.155) (end 116.967 100.584) (width 0.254) (layer Cuivre) (net 17)) + (segment (start 130.937 95.25) (end 130.937 95.758) (width 0.254) (layer Cuivre) (net 18)) + (segment (start 138.43 142.24) (end 109.347 142.24) (width 0.254) (layer GND_layer) (net 18)) + (segment (start 109.347 142.24) (end 104.975 137.868) (width 0.254) (layer GND_layer) (net 18)) + (segment (start 104.975 137.868) (end 104.975 104.34) (width 0.254) (layer GND_layer) (net 18)) + (segment (start 104.975 104.34) (end 104.013 103.378) (width 0.254) (layer GND_layer) (net 18)) + (segment (start 127.635 100.9904) (end 129.159 100.965) (width 0.254) (layer Composant) (net 18) (status 810)) + (segment (start 129.159 100.965) (end 130.937 99.187) (width 0.254) (layer Composant) (net 18)) + (segment (start 141.224 139.446) (end 138.43 142.24) (width 0.254) (layer GND_layer) (net 18) (status 810)) + (segment (start 99.822 107.569) (end 104.013 103.378) (width 0.381) (layer Composant) (net 18)) + (segment (start 99.822 117.729) (end 99.822 107.569) (width 0.381) (layer Composant) (net 18)) + (segment (start 98.679 118.872) (end 99.822 117.729) (width 0.381) (layer Composant) (net 18)) + (segment (start 97.409 118.872) (end 98.679 118.872) (width 0.381) (layer Composant) (net 18) (status 810)) + (via (at 104.013 103.378) (size 0.635) (layers Composant Cuivre) (net 18)) + (segment (start 130.683 96.012) (end 128.905 96.012) (width 0.254) (layer Cuivre) (net 18)) + (segment (start 104.521 103.378) (end 104.013 103.378) (width 0.254) (layer Cuivre) (net 18)) + (segment (start 109.982 97.917) (end 104.521 103.378) (width 0.254) (layer Cuivre) (net 18)) + (segment (start 109.982 93.472) (end 109.982 97.917) (width 0.254) (layer Cuivre) (net 18)) + (segment (start 130.937 99.187) (end 130.937 95.25) (width 0.254) (layer Composant) (net 18)) + (segment (start 111.252 92.202) (end 109.982 93.472) (width 0.254) (layer Cuivre) (net 18)) + (segment (start 125.73 92.202) (end 111.252 92.202) (width 0.254) (layer Cuivre) (net 18)) + (segment (start 128.397 94.869) (end 125.73 92.202) (width 0.254) (layer Cuivre) (net 18)) + (segment (start 128.397 95.504) (end 128.397 94.869) (width 0.254) (layer Cuivre) (net 18)) + (segment (start 128.905 96.012) (end 128.397 95.504) (width 0.254) (layer Cuivre) (net 18)) + (via (at 130.937 95.25) (size 0.635) (layers Composant Cuivre) (net 18)) + (segment (start 130.937 95.758) (end 130.683 96.012) (width 0.254) (layer Cuivre) (net 18)) + (segment (start 132.461 107.569) (end 132.461 125.73) (width 0.254) (layer GND_layer) (net 19)) + (via (at 134.112 106.045) (size 0.635) (layers Composant Cuivre) (net 19)) + (via (at 135.382 135.001) (size 0.635) (layers Composant Cuivre) (net 19)) + (segment (start 133.731 106.299) (end 133.3754 106.6546) (width 0.254) (layer Composant) (net 19)) + (segment (start 134.112 106.045) (end 133.731 106.299) (width 0.254) (layer Composant) (net 19)) + (segment (start 135.382 128.651) (end 135.382 135.001) (width 0.254) (layer GND_layer) (net 19)) + (segment (start 132.461 125.73) (end 135.382 128.651) (width 0.254) (layer GND_layer) (net 19)) + (segment (start 133.3754 106.6546) (end 133.3754 109.22) (width 0.254) (layer Composant) (net 19) (status 420)) + (segment (start 123.444 139.446) (end 122.174 138.176) (width 0.254) (layer Cuivre) (net 19) (status 810)) + (segment (start 122.174 138.176) (end 122.174 136.398) (width 0.254) (layer Cuivre) (net 19)) + (segment (start 122.174 136.398) (end 125.349 133.223) (width 0.254) (layer Cuivre) (net 19)) + (segment (start 125.349 133.223) (end 134.239 133.223) (width 0.254) (layer Cuivre) (net 19)) + (segment (start 134.239 133.223) (end 135.382 134.366) (width 0.254) (layer Cuivre) (net 19)) + (segment (start 135.382 134.366) (end 135.382 135.001) (width 0.254) (layer Cuivre) (net 19)) + (segment (start 134.112 106.045) (end 133.604 106.426) (width 0.254) (layer GND_layer) (net 19)) + (segment (start 133.604 106.426) (end 132.461 107.569) (width 0.254) (layer GND_layer) (net 19)) + (segment (start 137.16 128.905) (end 133.477 125.222) (width 0.254) (layer GND_layer) (net 20)) + (segment (start 137.16 134.239) (end 137.16 135.001) (width 0.254) (layer Cuivre) (net 20)) + (segment (start 135.128 132.207) (end 137.16 134.239) (width 0.254) (layer Cuivre) (net 20)) + (segment (start 120.904 139.446) (end 119.634 138.176) (width 0.254) (layer Cuivre) (net 20) (status 810)) + (segment (start 119.634 138.176) (end 119.634 136.398) (width 0.254) (layer Cuivre) (net 20)) + (segment (start 119.634 136.398) (end 123.825 132.207) (width 0.254) (layer Cuivre) (net 20)) + (segment (start 123.825 132.207) (end 135.128 132.207) (width 0.254) (layer Cuivre) (net 20)) + (segment (start 137.16 135.001) (end 137.16 128.905) (width 0.254) (layer GND_layer) (net 20)) + (via (at 137.16 135.001) (size 0.635) (layers Composant Cuivre) (net 20)) + (via (at 135.001 106.934) (size 0.635) (layers Composant Cuivre) (net 20)) + (segment (start 134.874 107.569) (end 134.8994 109.22) (width 0.254) (layer Composant) (net 20) (status 420)) + (segment (start 135.001 106.934) (end 134.874 107.569) (width 0.254) (layer Composant) (net 20)) + (segment (start 135.001 108.077) (end 135.001 106.934) (width 0.254) (layer GND_layer) (net 20)) + (segment (start 133.477 109.601) (end 135.001 108.077) (width 0.254) (layer GND_layer) (net 20)) + (segment (start 133.477 125.222) (end 133.477 109.601) (width 0.254) (layer GND_layer) (net 20)) + (segment (start 148.817 112.549) (end 148.817 98.706) (width 0.254) (layer GND_layer) (net 21)) + (segment (start 148.817 98.706) (end 149.352 98.171) (width 0.254) (layer GND_layer) (net 21)) + (segment (start 149.352 98.171) (end 150.495 98.171) (width 0.254) (layer GND_layer) (net 21)) + (segment (start 176.276 119.761) (end 176.276 118.5545) (width 0.4318) (layer Composant) (net 21) (status 810)) + (segment (start 176.276 118.5545) (end 174.8155 117.094) (width 0.4318) (layer Composant) (net 21) (status 420)) + (segment (start 176.276 119.761) (end 168.656 119.761) (width 0.4318) (layer Composant) (net 21) (status C30)) + (via (at 150.495 98.171) (size 0.635) (layers Composant Cuivre) (net 21)) + (segment (start 150.495 98.171) (end 149.733 98.171) (width 0.254) (layer Cuivre) (net 21)) + (segment (start 138.811 97.282) (end 138.811 96.266) (width 0.254) (layer Composant) (net 21)) + (segment (start 138.811 96.266) (end 138.811 97.028) (width 0.254) (layer Cuivre) (net 21)) + (segment (start 142.621 97.917) (end 143.51 97.028) (width 0.254) (layer Cuivre) (net 21)) + (segment (start 139.7 97.917) (end 142.621 97.917) (width 0.254) (layer Cuivre) (net 21)) + (segment (start 138.811 97.028) (end 139.7 97.917) (width 0.254) (layer Cuivre) (net 21)) + (segment (start 160.909 100.457) (end 163.83 97.536) (width 0.381) (layer Composant) (net 21)) + (segment (start 163.83 97.536) (end 166.116 97.536) (width 0.381) (layer Composant) (net 21)) + (segment (start 147.32 113.665) (end 147.701 113.665) (width 0.254) (layer GND_layer) (net 21)) + (segment (start 147.701 113.665) (end 148.817 112.549) (width 0.254) (layer GND_layer) (net 21)) + (segment (start 150.495 100.457) (end 160.909 100.457) (width 0.381) (layer Composant) (net 21)) + (segment (start 144.78 116.205) (end 147.32 113.665) (width 0.254) (layer GND_layer) (net 21)) + (segment (start 144.78 133.35) (end 144.78 116.205) (width 0.254) (layer GND_layer) (net 21)) + (segment (start 141.224 136.906) (end 144.78 133.35) (width 0.254) (layer GND_layer) (net 21) (status 810)) + (segment (start 166.497 117.602) (end 168.656 119.761) (width 0.381) (layer Composant) (net 21) (status 420)) + (segment (start 149.987 98.171) (end 150.495 98.171) (width 0.254) (layer Composant) (net 21)) + (segment (start 166.116 97.536) (end 166.497 97.917) (width 0.381) (layer Composant) (net 21)) + (segment (start 149.733 98.425) (end 149.987 98.171) (width 0.254) (layer Composant) (net 21)) + (segment (start 149.733 99.695) (end 149.733 98.425) (width 0.254) (layer Composant) (net 21)) + (segment (start 150.495 100.457) (end 149.733 99.695) (width 0.254) (layer Composant) (net 21)) + (segment (start 149.733 98.171) (end 148.59 97.028) (width 0.254) (layer Cuivre) (net 21)) + (segment (start 143.51 97.028) (end 148.59 97.028) (width 0.254) (layer Cuivre) (net 21)) + (segment (start 166.497 108.331) (end 166.497 117.602) (width 0.381) (layer Composant) (net 21)) + (segment (start 168.021 106.807) (end 166.497 108.331) (width 0.381) (layer Composant) (net 21)) + (segment (start 168.021 105.283) (end 168.021 106.807) (width 0.381) (layer Composant) (net 21)) + (segment (start 166.497 103.759) (end 168.021 105.283) (width 0.381) (layer Composant) (net 21)) + (segment (start 166.497 97.917) (end 166.497 103.759) (width 0.381) (layer Composant) (net 21)) + (segment (start 138.811 97.282) (end 141.5034 99.9744) (width 0.254) (layer Composant) (net 21)) + (segment (start 141.5034 99.9744) (end 143.129 99.9744) (width 0.254) (layer Composant) (net 21) (status 420)) + (via (at 138.811 96.266) (size 0.889) (layers Composant Cuivre) (net 21)) + (segment (start 139.573 136.398) (end 144.272 131.699) (width 0.254) (layer GND_layer) (net 22)) + (segment (start 150.495 97.282) (end 151.0665 97.282) (width 0.254) (layer Composant) (net 22)) + (segment (start 140.335 96.139) (end 140.716 96.52) (width 0.254) (layer Composant) (net 22)) + (via (at 140.335 96.139) (size 0.889) (layers Composant Cuivre) (net 22)) + (segment (start 140.335 96.139) (end 140.335 96.774) (width 0.254) (layer Cuivre) (net 22)) + (segment (start 142.367 97.282) (end 143.129 96.52) (width 0.254) (layer Cuivre) (net 22)) + (segment (start 140.843 97.282) (end 142.367 97.282) (width 0.254) (layer Cuivre) (net 22)) + (segment (start 140.335 96.774) (end 140.843 97.282) (width 0.254) (layer Cuivre) (net 22)) + (segment (start 138.684 136.906) (end 139.573 136.398) (width 0.254) (layer GND_layer) (net 22) (status 810)) + (segment (start 144.272 131.699) (end 144.272 115.951) (width 0.254) (layer GND_layer) (net 22)) + (segment (start 144.272 115.951) (end 147.066 113.157) (width 0.254) (layer GND_layer) (net 22)) + (segment (start 147.066 113.157) (end 147.447 113.157) (width 0.254) (layer GND_layer) (net 22)) + (segment (start 147.447 113.157) (end 148.309 112.295) (width 0.254) (layer GND_layer) (net 22)) + (segment (start 148.309 112.295) (end 148.309 98.198) (width 0.254) (layer GND_layer) (net 22)) + (segment (start 148.309 98.198) (end 149.225 97.282) (width 0.254) (layer GND_layer) (net 22)) + (segment (start 149.225 97.282) (end 150.495 97.282) (width 0.254) (layer GND_layer) (net 22)) + (segment (start 150.495 97.282) (end 149.733 97.282) (width 0.254) (layer Cuivre) (net 22)) + (segment (start 148.971 96.52) (end 143.129 96.52) (width 0.254) (layer Cuivre) (net 22)) + (segment (start 149.733 97.282) (end 148.971 96.52) (width 0.254) (layer Cuivre) (net 22)) + (segment (start 151.0665 97.282) (end 152.0825 98.298) (width 0.254) (layer Composant) (net 22) (status 420)) + (segment (start 140.716 96.52) (end 140.716 97.663) (width 0.254) (layer Composant) (net 22)) + (segment (start 140.716 97.663) (end 141.5288 98.4758) (width 0.254) (layer Composant) (net 22)) + (segment (start 141.5288 98.4758) (end 143.129 98.4758) (width 0.254) (layer Composant) (net 22) (status 420)) + (via (at 150.495 97.282) (size 0.635) (layers Composant Cuivre) (net 22)) + (via (at 141.605 96.266) (size 0.889) (layers Composant Cuivre) (net 23)) + (segment (start 149.86 96.647) (end 149.225 97.282) (width 0.254) (layer Composant) (net 23)) + (via (at 150.495 96.393) (size 0.635) (layers Composant Cuivre) (net 23)) + (segment (start 150.495 96.393) (end 149.86 96.647) (width 0.254) (layer Composant) (net 23)) + (segment (start 141.7828 97.9678) (end 143.129 97.9678) (width 0.254) (layer Composant) (net 23) (status 420)) + (segment (start 141.605 97.79) (end 141.7828 97.9678) (width 0.254) (layer Composant) (net 23)) + (segment (start 141.605 96.266) (end 141.605 97.79) (width 0.254) (layer Composant) (net 23)) + (segment (start 150.876 96.012) (end 150.495 96.393) (width 0.254) (layer Composant) (net 23)) + (segment (start 152.0825 96.012) (end 150.876 96.012) (width 0.254) (layer Composant) (net 23) (status 810)) + (segment (start 149.733 96.393) (end 150.495 96.393) (width 0.254) (layer Cuivre) (net 23)) + (segment (start 149.225 95.885) (end 149.733 96.393) (width 0.254) (layer Cuivre) (net 23)) + (segment (start 141.986 95.885) (end 149.225 95.885) (width 0.254) (layer Cuivre) (net 23)) + (segment (start 149.098 96.393) (end 150.495 96.393) (width 0.254) (layer GND_layer) (net 23)) + (segment (start 147.801 97.69) (end 149.098 96.393) (width 0.254) (layer GND_layer) (net 23)) + (segment (start 147.801 111.914) (end 147.801 97.69) (width 0.254) (layer GND_layer) (net 23)) + (segment (start 143.764 131.318) (end 143.764 115.57) (width 0.254) (layer GND_layer) (net 23)) + (segment (start 147.066 112.649) (end 147.801 111.914) (width 0.254) (layer GND_layer) (net 23)) + (segment (start 146.685 112.649) (end 147.066 112.649) (width 0.254) (layer GND_layer) (net 23)) + (segment (start 143.764 115.57) (end 146.685 112.649) (width 0.254) (layer GND_layer) (net 23)) + (segment (start 149.225 97.282) (end 149.225 100.203) (width 0.254) (layer Composant) (net 23)) + (segment (start 149.225 100.203) (end 150.241 101.219) (width 0.254) (layer Composant) (net 23)) + (segment (start 150.241 101.219) (end 157.607 101.219) (width 0.381) (layer Composant) (net 23)) + (segment (start 157.607 101.219) (end 157.9245 101.5365) (width 0.381) (layer Composant) (net 23)) + (segment (start 157.9245 101.5365) (end 159.4485 101.5365) (width 0.381) (layer Composant) (net 23) (status 420)) + (segment (start 136.144 136.906) (end 137.287 135.763) (width 0.254) (layer GND_layer) (net 23) (status 810)) + (segment (start 137.287 135.763) (end 139.319 135.763) (width 0.254) (layer GND_layer) (net 23)) + (segment (start 139.319 135.763) (end 143.764 131.318) (width 0.254) (layer GND_layer) (net 23)) + (segment (start 141.986 95.885) (end 141.605 96.266) (width 0.254) (layer Cuivre) (net 23)) + (segment (start 119.1895 95.1865) (end 117.348 93.345) (width 0.4318) (layer Composant) (net 24)) + (segment (start 126.5174 95.2754) (end 127.635 95.4786) (width 0.254) (layer Composant) (net 24) (status 420)) + (segment (start 116.078 92.964) (end 115.062 93.345) (width 0.254) (layer Cuivre) (net 24) (status 420)) + (segment (start 117.348 93.345) (end 115.062 93.345) (width 0.4318) (layer Composant) (net 24) (status 420)) + (segment (start 125.603 93.345) (end 125.603 94.361) (width 0.254) (layer Composant) (net 24)) + (segment (start 125.476 92.964) (end 125.603 93.345) (width 0.254) (layer Composant) (net 24)) + (segment (start 125.476 92.964) (end 116.078 92.964) (width 0.254) (layer Cuivre) (net 24)) + (segment (start 125.603 94.361) (end 126.5174 95.2754) (width 0.254) (layer Composant) (net 24)) + (via (at 125.476 92.964) (size 0.635) (layers Composant Cuivre) (net 24)) + (segment (start 119.1895 97.282) (end 119.1895 95.1865) (width 0.4318) (layer Composant) (net 24) (status 810)) + (segment (start 136.37768 107.81792) (end 136.37768 107.1) (width 0.254) (layer Composant) (net 25)) + (segment (start 136.398 109.22) (end 136.37768 107.81792) (width 0.254) (layer Composant) (net 25) (status 810)) + (segment (start 80.01 113.919) (end 83.185 110.744) (width 0.254) (layer Cuivre) (net 25)) + (segment (start 111.506 111.125) (end 115.951 111.125) (width 0.254) (layer Cuivre) (net 25)) + (segment (start 80.01 117.348) (end 80.01 113.919) (width 0.254) (layer Cuivre) (net 25)) + (segment (start 79.629 117.729) (end 80.01 117.348) (width 0.254) (layer Cuivre) (net 25)) + (segment (start 75.438 117.729) (end 79.629 117.729) (width 0.254) (layer Cuivre) (net 25)) + (segment (start 74.676 118.491) (end 75.438 117.729) (width 0.254) (layer Cuivre) (net 25)) + (segment (start 74.676 122.428) (end 74.676 118.491) (width 0.254) (layer Cuivre) (net 25)) + (segment (start 76.327 124.079) (end 74.676 122.428) (width 0.254) (layer Cuivre) (net 25) (status 810)) + (segment (start 119.507 107.569) (end 127.127 107.569) (width 0.254) (layer Cuivre) (net 25)) + (segment (start 135.001 108.077) (end 135.89 107.188) (width 0.254) (layer Cuivre) (net 25)) + (via (at 135.7 105.6) (size 0.889) (layers Composant Cuivre) (net 25)) + (segment (start 127.127 107.569) (end 127.635 108.077) (width 0.254) (layer Cuivre) (net 25)) + (segment (start 115.951 111.125) (end 119.507 107.569) (width 0.254) (layer Cuivre) (net 25)) + (segment (start 109.147 108.766) (end 111.506 111.125) (width 0.254) (layer Cuivre) (net 25)) + (segment (start 86.941 108.766) (end 109.147 108.766) (width 0.254) (layer Cuivre) (net 25)) + (segment (start 84.963 110.744) (end 86.941 108.766) (width 0.254) (layer Cuivre) (net 25)) + (segment (start 83.185 110.744) (end 84.963 110.744) (width 0.254) (layer Cuivre) (net 25)) + (segment (start 127.635 108.077) (end 135.001 108.077) (width 0.254) (layer Cuivre) (net 25)) + (segment (start 135.7 106.4) (end 135.7 105.6) (width 0.254) (layer Composant) (net 25) (tstamp 53D8E668)) + (segment (start 136.37768 107.07768) (end 135.7 106.4) (width 0.254) (layer Composant) (net 25) (tstamp 53D8E667)) + (segment (start 136.37768 107.1) (end 136.37768 107.07768) (width 0.254) (layer Composant) (net 25)) + (segment (start 135.89 105.79) (end 135.7 105.6) (width 0.254) (layer Cuivre) (net 25) (tstamp 53D8E66B)) + (segment (start 135.89 107.188) (end 135.89 105.79) (width 0.254) (layer Cuivre) (net 25)) + (segment (start 116.151 111.887) (end 119.961 108.077) (width 0.254) (layer Cuivre) (net 26)) + (segment (start 111.125 111.887) (end 116.151 111.887) (width 0.254) (layer Cuivre) (net 26)) + (segment (start 136.8806 105.9434) (end 136.906 105.918) (width 0.254) (layer Composant) (net 26)) + (segment (start 78.867 121.539) (end 80.518 119.888) (width 0.254) (layer Cuivre) (net 26) (status 810)) + (segment (start 80.518 119.888) (end 80.518 114.173) (width 0.254) (layer Cuivre) (net 26)) + (segment (start 80.518 114.173) (end 83.439 111.252) (width 0.254) (layer Cuivre) (net 26)) + (segment (start 83.439 111.252) (end 85.217 111.252) (width 0.254) (layer Cuivre) (net 26)) + (segment (start 85.217 111.252) (end 86.995 109.474) (width 0.254) (layer Cuivre) (net 26)) + (segment (start 86.995 109.474) (end 108.712 109.474) (width 0.254) (layer Cuivre) (net 26)) + (segment (start 108.712 109.474) (end 111.125 111.887) (width 0.254) (layer Cuivre) (net 26)) + (segment (start 119.961 108.077) (end 126.873 108.077) (width 0.254) (layer Cuivre) (net 26)) + (via (at 136.906 105.918) (size 0.635) (layers Composant Cuivre) (net 26)) + (segment (start 136.906 107.061) (end 136.906 105.918) (width 0.254) (layer Cuivre) (net 26)) + (segment (start 135.382 108.585) (end 136.906 107.061) (width 0.254) (layer Cuivre) (net 26)) + (segment (start 127.381 108.585) (end 135.382 108.585) (width 0.254) (layer Cuivre) (net 26)) + (segment (start 126.873 108.077) (end 127.381 108.585) (width 0.254) (layer Cuivre) (net 26)) + (segment (start 136.8806 109.22) (end 136.8806 105.9434) (width 0.254) (layer Composant) (net 26) (status 810)) + (segment (start 138.3792 109.22) (end 138.3792 107.9754) (width 0.254) (layer Composant) (net 27) (status 810)) + (segment (start 116.351 112.649) (end 110.871 112.649) (width 0.254) (layer Cuivre) (net 27)) + (segment (start 120.415 108.585) (end 116.351 112.649) (width 0.254) (layer Cuivre) (net 27)) + (segment (start 83.693 111.76) (end 81.026 114.427) (width 0.254) (layer Cuivre) (net 27)) + (segment (start 87.122 110.109) (end 108.331 110.109) (width 0.254) (layer Cuivre) (net 27)) + (segment (start 136.017 109.093) (end 127.127 109.093) (width 0.254) (layer Cuivre) (net 27)) + (via (at 138.7 106.5) (size 0.635) (layers Composant Cuivre) (net 27)) + (segment (start 77.597 122.809) (end 76.327 121.539) (width 0.254) (layer Cuivre) (net 27) (status 420)) + (segment (start 79.502 122.809) (end 77.597 122.809) (width 0.254) (layer Cuivre) (net 27)) + (segment (start 87.122 110.109) (end 85.471 111.76) (width 0.254) (layer Cuivre) (net 27)) + (segment (start 81.026 121.285) (end 79.502 122.809) (width 0.254) (layer Cuivre) (net 27)) + (segment (start 81.026 114.427) (end 81.026 121.285) (width 0.254) (layer Cuivre) (net 27)) + (segment (start 108.331 110.109) (end 110.871 112.649) (width 0.254) (layer Cuivre) (net 27)) + (segment (start 85.471 111.76) (end 83.693 111.76) (width 0.254) (layer Cuivre) (net 27)) + (segment (start 126.619 108.585) (end 120.415 108.585) (width 0.254) (layer Cuivre) (net 27)) + (segment (start 127.127 109.093) (end 126.619 108.585) (width 0.254) (layer Cuivre) (net 27)) + (segment (start 138.7 106.5) (end 136.017 109.093) (width 0.254) (layer Cuivre) (net 27)) + (segment (start 138.3792 106.8208) (end 138.7 106.5) (width 0.254) (layer Composant) (net 27) (tstamp 53D8E686)) + (segment (start 138.3792 107.9754) (end 138.3792 106.8208) (width 0.254) (layer Composant) (net 27)) + (segment (start 83.82 112.395) (end 85.598 112.395) (width 0.254) (layer Cuivre) (net 28)) + (segment (start 76.835 122.809) (end 77.597 123.571) (width 0.254) (layer Cuivre) (net 28)) + (segment (start 81.534 123.444) (end 81.534 114.681) (width 0.254) (layer Cuivre) (net 28)) + (segment (start 79.629 125.349) (end 81.534 123.444) (width 0.254) (layer Cuivre) (net 28)) + (segment (start 77.978 125.349) (end 79.629 125.349) (width 0.254) (layer Cuivre) (net 28)) + (segment (start 78.867 118.999) (end 77.597 120.269) (width 0.254) (layer Cuivre) (net 28) (status 810)) + (via (at 139.065 107.442) (size 0.635) (layers Composant Cuivre) (net 28)) + (segment (start 138.8872 109.22) (end 138.8872 107.8992) (width 0.254) (layer Composant) (net 28) (status 810)) + (segment (start 136.779 109.728) (end 139.065 107.442) (width 0.254) (layer Cuivre) (net 28)) + (segment (start 127 109.728) (end 136.779 109.728) (width 0.254) (layer Cuivre) (net 28)) + (segment (start 81.534 114.681) (end 83.82 112.395) (width 0.254) (layer Cuivre) (net 28)) + (segment (start 126.365 109.093) (end 127 109.728) (width 0.254) (layer Cuivre) (net 28)) + (segment (start 120.969 109.093) (end 126.365 109.093) (width 0.254) (layer Cuivre) (net 28)) + (segment (start 116.778 113.284) (end 120.969 109.093) (width 0.254) (layer Cuivre) (net 28)) + (segment (start 110.49 113.284) (end 116.778 113.284) (width 0.254) (layer Cuivre) (net 28)) + (segment (start 107.95 110.744) (end 110.49 113.284) (width 0.254) (layer Cuivre) (net 28)) + (segment (start 87.249 110.744) (end 107.95 110.744) (width 0.254) (layer Cuivre) (net 28)) + (segment (start 138.8872 107.8992) (end 139.065 107.442) (width 0.254) (layer Composant) (net 28)) + (segment (start 77.597 120.269) (end 75.819 120.269) (width 0.254) (layer Cuivre) (net 28)) + (segment (start 75.819 120.269) (end 75.184 120.904) (width 0.254) (layer Cuivre) (net 28)) + (segment (start 75.184 120.904) (end 75.184 122.174) (width 0.254) (layer Cuivre) (net 28)) + (segment (start 75.184 122.174) (end 75.819 122.809) (width 0.254) (layer Cuivre) (net 28)) + (segment (start 75.819 122.809) (end 76.835 122.809) (width 0.254) (layer Cuivre) (net 28)) + (segment (start 85.598 112.395) (end 87.249 110.744) (width 0.254) (layer Cuivre) (net 28)) + (segment (start 77.597 123.571) (end 77.597 124.968) (width 0.254) (layer Cuivre) (net 28)) + (segment (start 77.597 124.968) (end 77.978 125.349) (width 0.254) (layer Cuivre) (net 28)) + (segment (start 148.844 136.906) (end 154.686 131.064) (width 0.254) (layer GND_layer) (net 29) (status 810)) + (segment (start 137.0711 95.66656) (end 137.0711 96.9899) (width 0.254) (layer Cuivre) (net 29)) + (via (at 153.035 92.71) (size 0.635) (layers Composant Cuivre) (net 29)) + (segment (start 152.654 92.964) (end 153.035 92.71) (width 0.254) (layer Cuivre) (net 29)) + (segment (start 139.573 92.964) (end 152.654 92.964) (width 0.254) (layer Cuivre) (net 29)) + (segment (start 137.0711 95.66656) (end 139.573 92.964) (width 0.254) (layer Cuivre) (net 29)) + (segment (start 154.686 94.361) (end 153.035 92.71) (width 0.254) (layer GND_layer) (net 29)) + (segment (start 154.686 131.064) (end 154.686 94.361) (width 0.254) (layer GND_layer) (net 29)) + (via (at 136.271 97.282) (size 0.889) (layers Composant Cuivre) (net 29)) + (segment (start 135.880068 94.42206) (end 135.8646 93.726) (width 0.254) (layer Composant) (net 29) (tstamp 53D8E5DE) (status 420)) + (segment (start 136.271 97.282) (end 136.779 97.282) (width 0.254) (layer Cuivre) (net 29)) + (segment (start 136.779 97.282) (end 137.0711 96.9899) (width 0.254) (layer Cuivre) (net 29)) + (segment (start 136.271 97.282) (end 136.398 97.282) (width 0.254) (layer Composant) (net 29)) + (segment (start 136.779 96.901) (end 136.779 95.7) (width 0.254) (layer Composant) (net 29)) + (segment (start 136.398 97.282) (end 136.779 96.901) (width 0.254) (layer Composant) (net 29)) + (segment (start 136.779 95.321) (end 135.880068 94.422068) (width 0.254) (layer Composant) (net 29) (tstamp 53D8E5DA)) + (segment (start 135.880068 94.422068) (end 135.880068 94.42206) (width 0.254) (layer Composant) (net 29) (tstamp 53D8E5DB)) + (segment (start 136.779 95.7) (end 136.779 95.321) (width 0.254) (layer Composant) (net 29)) + (via (at 122.428 115.316) (size 0.889) (layers Composant Cuivre) (net 30)) + (segment (start 83.312 115.316) (end 83.312 134.112) (width 0.4318) (layer Composant) (net 30) (status 20)) + (segment (start 93.853 116.459) (end 104.775 116.459) (width 0.4318) (layer Cuivre) (net 30)) + (segment (start 93.345 116.967) (end 93.853 116.459) (width 0.4318) (layer Cuivre) (net 30)) + (segment (start 85.09 116.967) (end 93.345 116.967) (width 0.4318) (layer Cuivre) (net 30)) + (segment (start 83.439 115.316) (end 85.09 116.967) (width 0.4318) (layer Cuivre) (net 30)) + (segment (start 83.312 115.316) (end 83.439 115.316) (width 0.4318) (layer Cuivre) (net 30)) + (segment (start 83.312 134.112) (end 83.439 134.239) (width 0.4318) (layer Composant) (net 30) (status 430)) + (segment (start 122.301 115.189) (end 122.428 115.316) (width 0.4318) (layer Cuivre) (net 30)) + (segment (start 122.428 115.316) (end 122.555 115.189) (width 0.4318) (layer Composant) (net 30)) + (segment (start 122.555 115.189) (end 134.0485 115.189) (width 0.4318) (layer Composant) (net 30)) + (segment (start 134.0485 115.189) (end 134.874 114.3635) (width 0.4318) (layer Composant) (net 30) (status 420)) + (segment (start 88.519 134.239) (end 88.9 134.62) (width 0.4318) (layer Cuivre) (net 30) (status 430)) + (segment (start 83.439 134.239) (end 88.519 134.239) (width 0.4318) (layer Cuivre) (net 30) (status 830)) + (segment (start 104.775 116.459) (end 106.045 115.189) (width 0.4318) (layer Cuivre) (net 30)) + (via (at 83.312 115.316) (size 0.889) (layers Composant Cuivre) (net 30)) + (segment (start 106.045 115.189) (end 122.301 115.189) (width 0.4318) (layer Cuivre) (net 30)) + (segment (start 83.8835 112.8395) (end 84.836 112.8395) (width 0.4318) (layer Composant) (net 30) (status 420)) + (segment (start 83.312 113.411) (end 83.8835 112.8395) (width 0.4318) (layer Composant) (net 30)) + (segment (start 83.439 134.239) (end 78.867 134.239) (width 0.4318) (layer Cuivre) (net 30) (status C30)) + (segment (start 83.312 115.316) (end 83.312 113.411) (width 0.4318) (layer Composant) (net 30)) + (segment (start 149.733 111.6965) (end 150.114 112.0775) (width 0.381) (layer Composant) (net 31)) + (segment (start 140.8938 109.22) (end 140.8938 110.7948) (width 0.254) (layer Composant) (net 31) (status 810)) + (segment (start 141.986 111.6965) (end 141.732 111.4425) (width 0.381) (layer Composant) (net 31) (status 430)) + (segment (start 143.51 111.6965) (end 141.986 111.6965) (width 0.381) (layer Composant) (net 31) (status 830)) + (segment (start 140.8938 110.7948) (end 141.732 111.4425) (width 0.254) (layer Composant) (net 31) (status 420)) + (segment (start 150.241 109.22) (end 150.241 111.9505) (width 0.254) (layer Composant) (net 31) (status 810)) + (segment (start 150.241 111.9505) (end 150.114 112.0775) (width 0.254) (layer Composant) (net 31)) + (segment (start 143.51 111.6965) (end 149.733 111.6965) (width 0.381) (layer Composant) (net 31) (status 810)) + (segment (start 150.622 88.9) (end 151.13 88.9) (width 0.254) (layer GND_layer) (net 32)) + (segment (start 151.13 88.9) (end 153.67 91.44) (width 0.254) (layer GND_layer) (net 32)) + (segment (start 150.114 136.398) (end 150.114 138.176) (width 0.254) (layer GND_layer) (net 32)) + (segment (start 156.337 130.175) (end 150.114 136.398) (width 0.254) (layer GND_layer) (net 32)) + (segment (start 156.337 119.253) (end 156.337 130.175) (width 0.254) (layer GND_layer) (net 32)) + (segment (start 157.607 117.983) (end 156.337 119.253) (width 0.254) (layer GND_layer) (net 32) (status 810)) + (segment (start 134.366 85.598) (end 134.747 85.217) (width 0.254) (layer Cuivre) (net 32)) + (segment (start 136.3726 93.726) (end 136.3853 92.329) (width 0.254) (layer Composant) (net 32) (status 810)) + (segment (start 149.86 88.138) (end 150.622 88.9) (width 0.254) (layer Cuivre) (net 32)) + (segment (start 141.097 88.138) (end 149.86 88.138) (width 0.254) (layer Cuivre) (net 32)) + (via (at 134.747 85.217) (size 0.889) (layers Composant Cuivre) (net 32)) + (via (at 150.622 88.9) (size 0.889) (layers Composant Cuivre) (net 32)) + (segment (start 150.114 138.176) (end 151.384 139.446) (width 0.254) (layer GND_layer) (net 32) (status 420)) + (segment (start 127.381 85.598) (end 134.366 85.598) (width 0.254) (layer Cuivre) (net 32)) + (segment (start 134.747 85.217) (end 135.636 86.106) (width 0.254) (layer Composant) (net 32)) + (segment (start 135.636 86.106) (end 135.636 88.646) (width 0.254) (layer Composant) (net 32)) + (segment (start 139.827 89.408) (end 141.097 88.138) (width 0.254) (layer Cuivre) (net 32)) + (segment (start 126.111 84.328) (end 118.999 84.328) (width 0.254) (layer Cuivre) (net 32)) + (segment (start 127.381 85.598) (end 126.111 84.328) (width 0.254) (layer Cuivre) (net 32)) + (segment (start 118.999 84.328) (end 114.3 89.027) (width 0.254) (layer Cuivre) (net 32) (status 420)) + (segment (start 155.194 115.57) (end 155.194 93.726) (width 0.254) (layer GND_layer) (net 32)) + (segment (start 155.194 93.726) (end 153.67 92.202) (width 0.254) (layer GND_layer) (net 32)) + (segment (start 153.67 92.202) (end 153.67 91.44) (width 0.254) (layer GND_layer) (net 32)) + (segment (start 157.607 117.983) (end 155.194 115.57) (width 0.254) (layer GND_layer) (net 32) (status 810)) + (segment (start 136.3853 92.329) (end 136.271 91.94038) (width 0.254) (layer Composant) (net 32)) + (via (at 135.636 88.646) (size 0.635) (layers Composant Cuivre) (net 32)) + (segment (start 136.271 91.94038) (end 136.271 89.535) (width 0.254) (layer Composant) (net 32)) + (segment (start 136.271 89.535) (end 135.763 89.027) (width 0.254) (layer Composant) (net 32)) + (segment (start 135.763 89.027) (end 135.636 88.646) (width 0.254) (layer Composant) (net 32)) + (segment (start 135.636 88.646) (end 135.636 89.154) (width 0.254) (layer Cuivre) (net 32)) + (segment (start 135.636 89.154) (end 136.144 89.408) (width 0.254) (layer Cuivre) (net 32)) + (segment (start 136.144 89.408) (end 139.827 89.408) (width 0.254) (layer Cuivre) (net 32)) + (segment (start 100.457 90.551) (end 100.6475 90.043) (width 0.381) (layer Composant) (net 33) (status 430)) + (segment (start 104.775 89.027) (end 105.618 88.184) (width 0.381) (layer Composant) (net 33)) + (segment (start 105.618 88.184) (end 105.618 82.596) (width 0.381) (layer Composant) (net 33)) + (segment (start 105.618 82.596) (end 108.077 80.137) (width 0.381) (layer Composant) (net 33)) + (segment (start 108.077 80.137) (end 111.76 80.137) (width 0.381) (layer Composant) (net 33)) + (segment (start 111.76 80.137) (end 113.284 78.613) (width 0.381) (layer Composant) (net 33) (status 420)) + (segment (start 100.6475 90.043) (end 101.219 89.408) (width 0.381) (layer Composant) (net 33) (status 810)) + (segment (start 101.219 89.408) (end 102.108 89.408) (width 0.381) (layer Composant) (net 33)) + (segment (start 100.457 91.186) (end 100.457 90.551) (width 0.381) (layer Composant) (net 33) (status 20)) + (segment (start 99.187 92.456) (end 100.457 91.186) (width 0.381) (layer Composant) (net 33)) + (segment (start 99.187 94.361) (end 99.187 92.456) (width 0.381) (layer Composant) (net 33)) + (segment (start 97.79 95.758) (end 99.187 94.361) (width 0.381) (layer Composant) (net 33) (status 810)) + (segment (start 102.489 89.027) (end 103.251 89.027) (width 0.381) (layer Composant) (net 33) (status 420)) + (segment (start 103.251 89.027) (end 104.775 89.027) (width 0.381) (layer Composant) (net 33) (status 810)) + (segment (start 102.108 89.408) (end 102.489 89.027) (width 0.381) (layer Composant) (net 33)) + (segment (start 108.204 78.613) (end 104.956 81.861) (width 0.381) (layer Composant) (net 34) (status 810)) + (segment (start 100.6475 87.757) (end 103.251 87.757) (width 0.4318) (layer Composant) (net 34) (status C30)) + (segment (start 100.6475 85.471) (end 100.6475 87.757) (width 0.762) (layer Composant) (net 34) (status C30)) + (segment (start 104.956 81.861) (end 104.956 87.449) (width 0.381) (layer Composant) (net 34)) + (segment (start 104.956 87.449) (end 104.648 87.757) (width 0.381) (layer Composant) (net 34)) + (segment (start 104.648 87.757) (end 103.251 87.757) (width 0.381) (layer Composant) (net 34) (status 420)) + (segment (start 178.816 80.518) (end 177.038 80.518) (width 0.381) (layer Composant) (net 35)) + (segment (start 175.006 63.754) (end 185.801 63.754) (width 0.381) (layer Composant) (net 35)) + (segment (start 184.15 82.296) (end 180.594 82.296) (width 0.381) (layer Composant) (net 35) (status 810)) + (segment (start 173.482 65.278) (end 175.006 63.754) (width 0.381) (layer Composant) (net 35)) + (segment (start 177.038 80.518) (end 176.022 79.502) (width 0.381) (layer Composant) (net 35)) + (segment (start 176.022 79.502) (end 176.022 71.12) (width 0.381) (layer Composant) (net 35)) + (segment (start 176.022 71.12) (end 173.482 68.58) (width 0.381) (layer Composant) (net 35)) + (segment (start 173.482 68.58) (end 173.482 65.278) (width 0.381) (layer Composant) (net 35)) + (segment (start 185.801 63.754) (end 187.833 66.04) (width 0.381) (layer Composant) (net 35) (status 420)) + (segment (start 180.594 82.296) (end 178.816 80.518) (width 0.381) (layer Composant) (net 35)) + (segment (start 150.241 63.754) (end 148.717 65.278) (width 0.381) (layer Composant) (net 36)) + (segment (start 148.717 65.278) (end 148.717 79.121) (width 0.381) (layer Composant) (net 36)) + (segment (start 154.305 65.151) (end 152.908 63.754) (width 0.381) (layer Composant) (net 36)) + (segment (start 152.908 63.754) (end 150.241 63.754) (width 0.381) (layer Composant) (net 36)) + (segment (start 148.717 79.121) (end 151.892 82.296) (width 0.381) (layer Composant) (net 36)) + (segment (start 151.892 82.296) (end 156.21 82.296) (width 0.381) (layer Composant) (net 36) (status 420)) + (segment (start 154.305 66.04) (end 154.305 65.151) (width 0.381) (layer Composant) (net 36) (status 810)) + (segment (start 120.777 66.04) (end 120.523 66.04) (width 0.381) (layer Composant) (net 37) (status 830)) + (via (at 109.474 71.374) (size 0.889) (layers Composant Cuivre) (net 37)) + (segment (start 115.443 67.183) (end 112.776 69.85) (width 0.381) (layer Composant) (net 37)) + (segment (start 112.776 69.85) (end 110.998 69.85) (width 0.381) (layer Composant) (net 37)) + (segment (start 110.998 69.85) (end 109.474 71.374) (width 0.381) (layer Composant) (net 37)) + (segment (start 113.284 76.073) (end 112.014 77.343) (width 0.381) (layer GND_layer) (net 37) (status 810)) + (segment (start 112.014 77.343) (end 109.982 77.343) (width 0.381) (layer GND_layer) (net 37)) + (segment (start 109.982 77.343) (end 109.474 76.835) (width 0.381) (layer GND_layer) (net 37)) + (segment (start 109.474 76.835) (end 109.474 71.374) (width 0.381) (layer GND_layer) (net 37)) + (segment (start 120.523 66.04) (end 119.38 67.183) (width 0.381) (layer Composant) (net 37) (status 10)) + (segment (start 119.38 67.183) (end 115.443 67.183) (width 0.381) (layer Composant) (net 37)) + (segment (start 138.049 135.001) (end 138.049 134.493) (width 0.254) (layer Cuivre) (net 38)) + (via (at 134.239 110.871) (size 0.635) (layers Composant Cuivre) (net 38)) + (segment (start 138.303 134.239) (end 145.542 134.239) (width 0.254) (layer Cuivre) (net 38)) + (segment (start 145.542 134.239) (end 147.574 136.271) (width 0.254) (layer Cuivre) (net 38)) + (segment (start 147.574 136.271) (end 147.574 138.176) (width 0.254) (layer Cuivre) (net 38)) + (segment (start 147.574 138.176) (end 148.844 139.446) (width 0.254) (layer Cuivre) (net 38) (status 420)) + (segment (start 134.239 110.871) (end 133.8834 110.4646) (width 0.254) (layer Composant) (net 38)) + (segment (start 133.8834 110.4646) (end 133.8834 109.22) (width 0.254) (layer Composant) (net 38) (status 420)) + (segment (start 134.239 110.871) (end 134.239 125.222) (width 0.254) (layer GND_layer) (net 38)) + (segment (start 134.239 125.222) (end 138.049 129.032) (width 0.254) (layer GND_layer) (net 38)) + (segment (start 138.049 129.032) (end 138.049 135.001) (width 0.254) (layer GND_layer) (net 38)) + (via (at 138.049 135.001) (size 0.635) (layers Composant Cuivre) (net 38)) + (segment (start 138.049 134.493) (end 138.303 134.239) (width 0.254) (layer Cuivre) (net 38)) + (segment (start 138.684 132.969) (end 138.938 133.223) (width 0.254) (layer GND_layer) (net 39)) + (segment (start 135.382 110.49) (end 135.128 110.871) (width 0.254) (layer Composant) (net 39)) + (segment (start 135.382 109.22) (end 135.382 110.49) (width 0.254) (layer Composant) (net 39) (status 810)) + (via (at 138.938 135.001) (size 0.635) (layers Composant Cuivre) (net 39)) + (segment (start 138.938 135.001) (end 143.891 135.001) (width 0.254) (layer Cuivre) (net 39)) + (segment (start 143.891 135.001) (end 145.034 136.144) (width 0.254) (layer Cuivre) (net 39)) + (segment (start 145.034 136.144) (end 145.034 138.176) (width 0.254) (layer Cuivre) (net 39)) + (segment (start 145.034 138.176) (end 146.304 139.446) (width 0.254) (layer Cuivre) (net 39) (status 420)) + (segment (start 138.938 133.223) (end 138.938 135.001) (width 0.254) (layer GND_layer) (net 39)) + (via (at 135.128 110.871) (size 0.635) (layers Composant Cuivre) (net 39)) + (segment (start 135.128 125.349) (end 138.684 128.905) (width 0.254) (layer GND_layer) (net 39)) + (segment (start 138.684 128.905) (end 138.684 132.969) (width 0.254) (layer GND_layer) (net 39)) + (segment (start 135.128 110.871) (end 135.128 125.349) (width 0.254) (layer GND_layer) (net 39)) + (segment (start 176.403 81.28) (end 178.435 81.28) (width 0.381) (layer Composant) (net 40)) + (segment (start 187.579 62.865) (end 174.498 62.865) (width 0.381) (layer Composant) (net 40)) + (segment (start 174.498 62.865) (end 172.72 64.643) (width 0.381) (layer Composant) (net 40)) + (segment (start 172.72 64.643) (end 172.72 68.961) (width 0.381) (layer Composant) (net 40)) + (segment (start 172.72 68.961) (end 175.26 71.501) (width 0.381) (layer Composant) (net 40)) + (segment (start 175.26 71.501) (end 175.26 80.137) (width 0.381) (layer Composant) (net 40)) + (segment (start 185.039 81.026) (end 184.15 81.026) (width 0.4318) (layer Composant) (net 40) (status 420)) + (segment (start 190.5 65.786) (end 187.579 62.865) (width 0.4318) (layer Composant) (net 40) (status 10)) + (segment (start 190.5 66.04) (end 190.5 65.786) (width 0.4318) (layer Composant) (net 40) (status 830)) + (segment (start 185.674 81.661) (end 185.039 81.026) (width 0.381) (layer Composant) (net 40)) + (segment (start 185.674 82.804) (end 185.674 81.661) (width 0.381) (layer Composant) (net 40)) + (segment (start 185.42 83.058) (end 185.674 82.804) (width 0.381) (layer Composant) (net 40)) + (segment (start 180.213 83.058) (end 185.42 83.058) (width 0.381) (layer Composant) (net 40)) + (segment (start 178.435 81.28) (end 180.213 83.058) (width 0.381) (layer Composant) (net 40)) + (segment (start 175.26 80.137) (end 176.403 81.28) (width 0.381) (layer Composant) (net 40)) + (segment (start 157.734 82.804) (end 157.48 83.058) (width 0.381) (layer Composant) (net 41)) + (segment (start 147.955 79.756) (end 147.955 64.77) (width 0.381) (layer Composant) (net 41)) + (segment (start 147.955 79.756) (end 151.257 83.058) (width 0.381) (layer Composant) (net 41)) + (segment (start 151.257 83.058) (end 157.48 83.058) (width 0.381) (layer Composant) (net 41)) + (segment (start 156.972 65.532) (end 156.972 66.04) (width 0.381) (layer Composant) (net 41) (status 430)) + (segment (start 157.734 82.042) (end 157.734 82.804) (width 0.381) (layer Composant) (net 41)) + (segment (start 156.718 81.026) (end 157.734 82.042) (width 0.381) (layer Composant) (net 41) (status 10)) + (segment (start 156.21 81.026) (end 156.718 81.026) (width 0.381) (layer Composant) (net 41) (status 830)) + (segment (start 147.955 64.77) (end 149.86 62.865) (width 0.381) (layer Composant) (net 41)) + (segment (start 149.86 62.865) (end 154.305 62.865) (width 0.381) (layer Composant) (net 41)) + (segment (start 154.305 62.865) (end 156.972 65.532) (width 0.381) (layer Composant) (net 41) (status 20)) + (segment (start 123.444 70.485) (end 126.746 73.787) (width 0.381) (layer Composant) (net 42)) + (segment (start 123.444 66.04) (end 123.444 70.485) (width 0.381) (layer Composant) (net 42) (status 810)) + (segment (start 127.381 75.946) (end 128.27 75.946) (width 0.381) (layer Composant) (net 42) (status 420)) + (segment (start 126.746 75.311) (end 127.381 75.946) (width 0.381) (layer Composant) (net 42)) + (segment (start 126.746 73.787) (end 126.746 75.311) (width 0.381) (layer Composant) (net 42)) + (segment (start 189.103 68.58) (end 189.103 68.453) (width 0.381) (layer Composant) (net 43) (status 830)) + (segment (start 185.039 69.723) (end 184.404 70.358) (width 0.381) (layer Composant) (net 43)) + (segment (start 185.039 67.818) (end 185.039 69.723) (width 0.381) (layer Composant) (net 43)) + (segment (start 184.404 70.358) (end 184.404 71.501) (width 0.381) (layer Composant) (net 43)) + (segment (start 187.198 67.183) (end 185.674 67.183) (width 0.381) (layer Composant) (net 43)) + (segment (start 187.452 67.437) (end 187.198 67.183) (width 0.381) (layer Composant) (net 43)) + (segment (start 184.404 71.501) (end 186.944 74.041) (width 0.381) (layer Composant) (net 43)) + (segment (start 186.944 74.041) (end 186.944 76.327) (width 0.381) (layer Composant) (net 43)) + (segment (start 186.944 76.327) (end 187.833 77.216) (width 0.381) (layer Composant) (net 43)) + (segment (start 187.833 77.216) (end 189.23 77.216) (width 0.381) (layer Composant) (net 43) (status 420)) + (segment (start 188.087 67.437) (end 187.452 67.437) (width 0.381) (layer Composant) (net 43)) + (segment (start 189.103 68.453) (end 188.087 67.437) (width 0.381) (layer Composant) (net 43) (status 10)) + (segment (start 185.674 67.183) (end 185.039 67.818) (width 0.381) (layer Composant) (net 43)) + (segment (start 159.004 76.581) (end 159.639 77.216) (width 0.381) (layer Composant) (net 44)) + (segment (start 159.004 74.041) (end 159.004 76.581) (width 0.381) (layer Composant) (net 44)) + (segment (start 155.702 70.739) (end 159.004 74.041) (width 0.381) (layer Composant) (net 44)) + (segment (start 155.575 68.58) (end 154.305 67.31) (width 0.381) (layer Composant) (net 44) (status 810)) + (segment (start 154.305 67.31) (end 152.019 67.31) (width 0.381) (layer Composant) (net 44)) + (segment (start 153.035 70.739) (end 155.702 70.739) (width 0.381) (layer Composant) (net 44)) + (segment (start 151.511 69.215) (end 153.035 70.739) (width 0.381) (layer Composant) (net 44)) + (segment (start 151.511 67.818) (end 151.511 69.215) (width 0.381) (layer Composant) (net 44)) + (segment (start 159.639 77.216) (end 161.29 77.216) (width 0.381) (layer Composant) (net 44) (status 420)) + (segment (start 152.019 67.31) (end 151.511 67.818) (width 0.381) (layer Composant) (net 44)) + (segment (start 112.014 74.803) (end 112.014 71.628) (width 0.381) (layer GND_layer) (net 45)) + (via (at 112.014 71.628) (size 0.889) (layers Composant Cuivre) (net 45)) + (segment (start 122.047 68.58) (end 120.269 70.358) (width 0.381) (layer Composant) (net 45) (status 810)) + (segment (start 120.269 70.358) (end 118.11 70.358) (width 0.381) (layer Composant) (net 45)) + (segment (start 118.11 70.358) (end 117.221 71.628) (width 0.381) (layer Composant) (net 45)) + (segment (start 117.221 71.628) (end 112.014 71.628) (width 0.381) (layer Composant) (net 45)) + (segment (start 110.744 76.073) (end 112.014 74.803) (width 0.381) (layer GND_layer) (net 45) (status 810)) + (segment (start 110.744 85.217) (end 113.03 85.217) (width 0.381) (layer Composant) (net 46)) + (segment (start 109.474 86.487) (end 110.744 85.217) (width 0.381) (layer Composant) (net 46)) + (segment (start 113.03 85.217) (end 114.3 86.487) (width 0.381) (layer Composant) (net 46) (status 420)) + (segment (start 108.585 86.487) (end 109.474 86.487) (width 0.381) (layer Composant) (net 46) (status 810)) + (segment (start 187.706 73.787) (end 185.293 71.374) (width 0.381) (layer Composant) (net 47)) + (segment (start 187.706 75.311) (end 187.706 73.787) (width 0.381) (layer Composant) (net 47)) + (segment (start 188.341 75.946) (end 187.706 75.311) (width 0.381) (layer Composant) (net 47)) + (segment (start 189.23 75.946) (end 188.341 75.946) (width 0.381) (layer Composant) (net 47) (status 810)) + (segment (start 186.182 69.723) (end 186.436 68.58) (width 0.381) (layer Composant) (net 47) (status 420)) + (segment (start 185.293 70.612) (end 186.182 69.723) (width 0.381) (layer Composant) (net 47)) + (segment (start 185.293 71.374) (end 185.293 70.612) (width 0.381) (layer Composant) (net 47)) + (segment (start 159.766 73.787) (end 159.766 75.311) (width 0.381) (layer Composant) (net 48)) + (segment (start 155.956 69.977) (end 159.766 73.787) (width 0.381) (layer Composant) (net 48)) + (segment (start 159.766 75.311) (end 160.401 75.946) (width 0.381) (layer Composant) (net 48)) + (segment (start 160.401 75.946) (end 161.29 75.946) (width 0.381) (layer Composant) (net 48) (status 420)) + (segment (start 152.908 68.58) (end 154.305 69.977) (width 0.381) (layer Composant) (net 48) (status 810)) + (segment (start 154.305 69.977) (end 155.956 69.977) (width 0.381) (layer Composant) (net 48)) + (segment (start 120.65 67.945) (end 122.0978 66.4972) (width 0.381) (layer Composant) (net 49)) + (segment (start 109.22 68.834) (end 106.807 71.247) (width 0.381) (layer Composant) (net 49)) + (segment (start 122.0978 66.4972) (end 122.0978 65.0748) (width 0.381) (layer Composant) (net 49)) + (segment (start 122.0978 65.0748) (end 120.523 63.5) (width 0.381) (layer Composant) (net 49)) + (segment (start 106.807 74.676) (end 108.204 76.073) (width 0.381) (layer Composant) (net 49) (status 420)) + (segment (start 106.807 71.247) (end 106.807 74.676) (width 0.381) (layer Composant) (net 49)) + (segment (start 120.523 63.5) (end 117.856 63.5) (width 0.381) (layer Composant) (net 49)) + (segment (start 112.522 68.834) (end 109.22 68.834) (width 0.381) (layer Composant) (net 49)) + (segment (start 117.856 63.5) (end 112.522 68.834) (width 0.381) (layer Composant) (net 49)) + (segment (start 119.38 68.58) (end 120.65 67.945) (width 0.381) (layer Composant) (net 49) (status 810)) + (segment (start 108.585 90.297) (end 110.49 90.297) (width 0.381) (layer Composant) (net 50) (status 810)) + (segment (start 110.49 90.297) (end 111.76 89.027) (width 0.381) (layer Composant) (net 50) (status 420)) + (segment (start 140.208 82.169) (end 140.208 82.804) (width 0.254) (layer Composant) (net 51)) + (segment (start 122.174 96.266) (end 123.952 96.266) (width 0.254) (layer GND_layer) (net 51)) + (segment (start 120.396 129.54) (end 124.714 133.858) (width 0.254) (layer GND_layer) (net 51)) + (segment (start 120.396 105.537) (end 120.396 129.54) (width 0.254) (layer GND_layer) (net 51)) + (segment (start 120.904 93.345) (end 120.904 94.996) (width 0.254) (layer GND_layer) (net 51)) + (segment (start 131.064 87.757) (end 129.159 87.757) (width 0.254) (layer Composant) (net 51)) + (segment (start 129.159 87.757) (end 124.714 92.202) (width 0.254) (layer Composant) (net 51)) + (segment (start 124.714 92.202) (end 124.714 93.472) (width 0.254) (layer Composant) (net 51)) + (segment (start 124.714 93.472) (end 124.841 93.98) (width 0.254) (layer Composant) (net 51)) + (segment (start 124.841 93.98) (end 124.841 93.472) (width 0.254) (layer GND_layer) (net 51)) + (segment (start 124.841 93.472) (end 123.952 92.583) (width 0.254) (layer GND_layer) (net 51)) + (segment (start 123.952 92.583) (end 121.666 92.583) (width 0.254) (layer GND_layer) (net 51)) + (segment (start 121.666 92.583) (end 120.904 93.345) (width 0.254) (layer GND_layer) (net 51)) + (segment (start 134.493 84.328) (end 131.064 87.757) (width 0.254) (layer Composant) (net 51)) + (segment (start 138.684 84.328) (end 134.493 84.328) (width 0.254) (layer Composant) (net 51)) + (segment (start 140.208 82.804) (end 138.684 84.328) (width 0.254) (layer Composant) (net 51)) + (segment (start 120.396 105.537) (end 124.587 101.346) (width 0.254) (layer GND_layer) (net 51)) + (segment (start 125.984 138.938) (end 124.714 137.668) (width 0.254) (layer GND_layer) (net 51) (status 10)) + (segment (start 125.984 139.446) (end 125.984 138.938) (width 0.254) (layer GND_layer) (net 51) (status 830)) + (via (at 140.208 82.169) (size 0.889) (layers Composant Cuivre) (net 51)) + (segment (start 140.208 82.169) (end 138.303 82.169) (width 0.254) (layer Cuivre) (net 51) (status 420)) + (segment (start 126.4412 95.9612) (end 127.635 95.9866) (width 0.254) (layer Composant) (net 51) (status 420)) + (segment (start 124.968 94.488) (end 126.4412 95.9612) (width 0.254) (layer Composant) (net 51)) + (segment (start 124.841 93.98) (end 124.968 94.488) (width 0.254) (layer Composant) (net 51)) + (segment (start 120.904 94.996) (end 122.174 96.266) (width 0.254) (layer GND_layer) (net 51)) + (segment (start 123.952 96.266) (end 124.587 96.901) (width 0.254) (layer GND_layer) (net 51)) + (segment (start 124.587 96.901) (end 124.587 101.346) (width 0.254) (layer GND_layer) (net 51)) + (via (at 124.841 93.98) (size 0.635) (layers Composant Cuivre) (net 51)) + (segment (start 124.714 133.858) (end 124.714 137.668) (width 0.254) (layer GND_layer) (net 51)) + (segment (start 173.736 82.804) (end 172.593 83.947) (width 0.254) (layer Cuivre) (net 52)) + (segment (start 178.054 82.804) (end 173.736 82.804) (width 0.254) (layer Cuivre) (net 52)) + (segment (start 179.197 83.947) (end 178.054 82.804) (width 0.254) (layer Cuivre) (net 52)) + (segment (start 185.801 83.947) (end 179.197 83.947) (width 0.254) (layer Cuivre) (net 52)) + (segment (start 196.723 73.025) (end 185.801 83.947) (width 0.254) (layer Cuivre) (net 52)) + (segment (start 201.168 73.025) (end 196.723 73.025) (width 0.254) (layer Cuivre) (net 52)) + (segment (start 201.676 73.533) (end 201.168 73.025) (width 0.254) (layer Cuivre) (net 52)) + (segment (start 201.676 77.978) (end 201.676 73.533) (width 0.254) (layer Cuivre) (net 52)) + (segment (start 200.025 79.629) (end 201.676 77.978) (width 0.254) (layer Cuivre) (net 52) (status 810)) + (segment (start 127.635 116.84) (end 129.032 118.237) (width 0.254) (layer GND_layer) (net 52)) + (segment (start 129.032 118.237) (end 129.032 130.175) (width 0.254) (layer GND_layer) (net 52)) + (segment (start 129.032 130.175) (end 129.921 131.064) (width 0.254) (layer GND_layer) (net 52)) + (via (at 123.19 85.598) (size 0.889) (layers Composant Cuivre) (net 52)) + (segment (start 132.334 138.176) (end 133.604 139.446) (width 0.254) (layer GND_layer) (net 52) (status 420)) + (segment (start 132.334 136.398) (end 132.334 138.176) (width 0.254) (layer GND_layer) (net 52)) + (segment (start 129.921 133.985) (end 132.334 136.398) (width 0.254) (layer GND_layer) (net 52)) + (segment (start 129.921 131.064) (end 129.921 133.985) (width 0.254) (layer GND_layer) (net 52)) + (segment (start 127.635 90.6) (end 127.635 116.84) (width 0.254) (layer GND_layer) (net 52) (tstamp 53D8E600)) + (segment (start 123.825 86.995) (end 124.195 86.995) (width 0.254) (layer GND_layer) (net 52)) + (segment (start 123.19 86.36) (end 123.825 86.995) (width 0.254) (layer GND_layer) (net 52)) + (segment (start 123.19 85.598) (end 123.19 86.36) (width 0.254) (layer GND_layer) (net 52)) + (segment (start 125.349 84.836) (end 126.873 86.36) (width 0.254) (layer Cuivre) (net 52)) + (segment (start 123.952 84.836) (end 125.349 84.836) (width 0.254) (layer Cuivre) (net 52)) + (segment (start 123.19 85.598) (end 123.952 84.836) (width 0.254) (layer Cuivre) (net 52)) + (segment (start 137.3886 92.3036) (end 137.287 91.948) (width 0.254) (layer Composant) (net 52)) + (segment (start 137.287 91.948) (end 137.16 85.344) (width 0.254) (layer Composant) (net 52)) + (segment (start 137.3886 93.726) (end 137.3886 92.3036) (width 0.254) (layer Composant) (net 52) (status 810)) + (segment (start 126.873 86.36) (end 137.033 86.36) (width 0.254) (layer Cuivre) (net 52)) + (via (at 137.16 85.344) (size 0.889) (layers Composant Cuivre) (net 52)) + (segment (start 172.593 83.947) (end 164.846 83.947) (width 0.254) (layer Cuivre) (net 52)) + (segment (start 155.067 83.566) (end 164.465 83.566) (width 0.254) (layer Cuivre) (net 52)) + (segment (start 153.035 85.598) (end 155.067 83.566) (width 0.254) (layer Cuivre) (net 52)) + (segment (start 153.035 85.598) (end 143.637 85.598) (width 0.254) (layer Cuivre) (net 52)) + (segment (start 143.637 85.598) (end 141.859 83.82) (width 0.254) (layer Cuivre) (net 52)) + (segment (start 164.846 83.947) (end 164.465 83.566) (width 0.254) (layer Cuivre) (net 52)) + (segment (start 137.033 86.36) (end 137.16 86.233) (width 0.254) (layer Cuivre) (net 52)) + (segment (start 137.16 86.233) (end 137.16 85.344) (width 0.254) (layer Cuivre) (net 52)) + (segment (start 141.859 83.82) (end 137.922 83.82) (width 0.254) (layer Cuivre) (net 52)) + (segment (start 137.16 84.582) (end 137.16 85.344) (width 0.254) (layer Cuivre) (net 52)) + (segment (start 137.922 83.82) (end 137.16 84.582) (width 0.254) (layer Cuivre) (net 52)) + (segment (start 127.635 90.435) (end 127.635 90.6) (width 0.254) (layer GND_layer) (net 52)) + (segment (start 127.635 90.435) (end 124.4 87.2) (width 0.254) (layer GND_layer) (net 52) (tstamp 53D8E602)) + (segment (start 124.195 86.995) (end 124.4 87.2) (width 0.254) (layer GND_layer) (net 52)) + (segment (start 122.428 94.488) (end 122.174 93.98) (width 0.254) (layer Composant) (net 53)) + (segment (start 134.366 82.55) (end 134.366 81.661) (width 0.254) (layer Cuivre) (net 53)) + (segment (start 134.366 81.661) (end 135.128 80.899) (width 0.254) (layer Cuivre) (net 53)) + (segment (start 135.128 80.899) (end 137.033 80.899) (width 0.254) (layer Cuivre) (net 53)) + (segment (start 137.033 80.899) (end 138.303 79.629) (width 0.254) (layer Cuivre) (net 53) (status 420)) + (via (at 134.366 82.55) (size 0.889) (layers Composant Cuivre) (net 53)) + (segment (start 125.603 120.015) (end 126.111 120.523) (width 0.254) (layer GND_layer) (net 53)) + (segment (start 127.254 138.176) (end 128.524 139.446) (width 0.254) (layer GND_layer) (net 53) (status 420)) + (segment (start 126.111 133.858) (end 126.111 120.523) (width 0.254) (layer GND_layer) (net 53)) + (segment (start 122.174 93.98) (end 122.174 92.456) (width 0.254) (layer Composant) (net 53)) + (segment (start 122.174 92.456) (end 128.397 86.233) (width 0.254) (layer Composant) (net 53)) + (segment (start 128.397 86.233) (end 130.302 86.233) (width 0.254) (layer Composant) (net 53)) + (segment (start 130.302 86.233) (end 133.858 82.677) (width 0.254) (layer Composant) (net 53)) + (segment (start 133.858 82.677) (end 134.366 82.55) (width 0.254) (layer Composant) (net 53)) + (segment (start 127.635 97.4852) (end 125.4252 97.4852) (width 0.254) (layer Composant) (net 53) (status 810)) + (segment (start 125.4252 97.4852) (end 122.428 94.488) (width 0.254) (layer Composant) (net 53)) + (segment (start 127.254 135.001) (end 126.111 133.858) (width 0.254) (layer GND_layer) (net 53)) + (segment (start 127.254 135.001) (end 127.254 138.176) (width 0.254) (layer GND_layer) (net 53)) + (segment (start 122.174 94.488) (end 122.936 95.25) (width 0.254) (layer GND_layer) (net 53)) + (segment (start 122.936 95.25) (end 124.841 95.25) (width 0.254) (layer GND_layer) (net 53)) + (segment (start 124.841 95.25) (end 125.603 96.012) (width 0.254) (layer GND_layer) (net 53)) + (segment (start 125.603 96.012) (end 125.603 120.015) (width 0.254) (layer GND_layer) (net 53)) + (via (at 122.174 93.98) (size 0.635) (layers Composant Cuivre) (net 53)) + (segment (start 122.174 93.98) (end 122.174 94.488) (width 0.254) (layer GND_layer) (net 53)) + (segment (start 148.844 87.884) (end 145.161 91.567) (width 0.254) (layer Composant) (net 54)) + (segment (start 176.784 130.556) (end 185.42 121.92) (width 0.254) (layer GND_layer) (net 54)) + (segment (start 148.844 84.836) (end 148.844 87.884) (width 0.254) (layer Composant) (net 54)) + (segment (start 176.784 130.556) (end 176.784 136.906) (width 0.254) (layer GND_layer) (net 54) (status 420)) + (segment (start 153.289 80.772) (end 164.973 80.772) (width 0.254) (layer Cuivre) (net 54)) + (segment (start 164.973 80.772) (end 167.386 78.359) (width 0.254) (layer Cuivre) (net 54)) + (segment (start 167.386 78.359) (end 170.815 78.359) (width 0.254) (layer Cuivre) (net 54)) + (segment (start 170.815 78.359) (end 172.085 77.089) (width 0.254) (layer Cuivre) (net 54) (status 420)) + (segment (start 172.085 77.089) (end 174.879 74.295) (width 0.254) (layer GND_layer) (net 54) (status 810)) + (segment (start 174.879 74.295) (end 178.562 74.295) (width 0.254) (layer GND_layer) (net 54)) + (segment (start 178.562 74.295) (end 180.975 76.708) (width 0.254) (layer GND_layer) (net 54)) + (segment (start 180.975 76.708) (end 180.975 90.932) (width 0.254) (layer GND_layer) (net 54)) + (segment (start 180.975 90.932) (end 181.483 91.44) (width 0.254) (layer GND_layer) (net 54)) + (segment (start 181.483 91.44) (end 181.483 102.489) (width 0.254) (layer GND_layer) (net 54)) + (segment (start 181.483 102.489) (end 185.42 106.426) (width 0.254) (layer GND_layer) (net 54)) + (segment (start 185.42 106.426) (end 185.42 121.92) (width 0.254) (layer GND_layer) (net 54)) + (segment (start 149.19452 85.18652) (end 150.01748 85.18652) (width 0.254) (layer Cuivre) (net 54)) + (segment (start 150.01748 85.18652) (end 150.749 84.455) (width 0.254) (layer Cuivre) (net 54)) + (segment (start 150.749 84.455) (end 150.749 83.312) (width 0.254) (layer Cuivre) (net 54)) + (segment (start 150.749 83.312) (end 153.289 80.772) (width 0.254) (layer Cuivre) (net 54)) + (segment (start 148.844 84.836) (end 149.19452 85.18652) (width 0.254) (layer Cuivre) (net 54)) + (via (at 148.844 84.836) (size 0.889) (layers Composant Cuivre) (net 54)) + (segment (start 143.9164 95.4786) (end 143.129 95.4786) (width 0.254) (layer Composant) (net 54) (status 420)) + (segment (start 145.161 94.234) (end 143.9164 95.4786) (width 0.254) (layer Composant) (net 54)) + (segment (start 145.161 91.567) (end 145.161 94.234) (width 0.254) (layer Composant) (net 54)) + (segment (start 121.158 114.95532) (end 122.174 113.93932) (width 0.254) (layer GND_layer) (net 55)) + (segment (start 121.158 114.95532) (end 121.158 128.397) (width 0.254) (layer GND_layer) (net 55)) + (segment (start 121.158 128.397) (end 125.349 132.588) (width 0.254) (layer GND_layer) (net 55)) + (segment (start 125.984 135.89) (end 125.349 135.255) (width 0.254) (layer GND_layer) (net 55)) + (segment (start 125.984 136.906) (end 125.984 135.89) (width 0.254) (layer GND_layer) (net 55) (status 810)) + (via (at 123.952 93.98) (size 0.635) (layers Composant Cuivre) (net 55)) + (segment (start 125.9078 96.4438) (end 127.635 96.4692) (width 0.254) (layer Composant) (net 55) (status 420)) + (segment (start 123.952 94.488) (end 125.9078 96.4438) (width 0.254) (layer Composant) (net 55)) + (segment (start 122.174 104.902) (end 122.174 113.93932) (width 0.254) (layer GND_layer) (net 55)) + (segment (start 125.095 96.393) (end 125.095 101.981) (width 0.254) (layer GND_layer) (net 55)) + (segment (start 134.239 83.82) (end 130.81 87.249) (width 0.254) (layer Composant) (net 55)) + (segment (start 130.81 87.249) (end 128.905 87.249) (width 0.254) (layer Composant) (net 55)) + (segment (start 128.905 87.249) (end 123.952 92.202) (width 0.254) (layer Composant) (net 55)) + (segment (start 123.952 92.202) (end 123.952 93.98) (width 0.254) (layer Composant) (net 55)) + (segment (start 123.952 93.98) (end 123.952 93.472) (width 0.254) (layer GND_layer) (net 55)) + (segment (start 123.952 93.472) (end 123.571 93.091) (width 0.254) (layer GND_layer) (net 55)) + (segment (start 123.571 93.091) (end 121.92 93.091) (width 0.254) (layer GND_layer) (net 55)) + (segment (start 138.303 83.82) (end 134.239 83.82) (width 0.254) (layer Composant) (net 55)) + (segment (start 139.446 82.677) (end 138.303 83.82) (width 0.254) (layer Composant) (net 55)) + (segment (start 138.303 77.089) (end 139.446 78.232) (width 0.254) (layer Composant) (net 55) (status 810)) + (segment (start 121.92 93.091) (end 121.412 93.599) (width 0.254) (layer GND_layer) (net 55)) + (segment (start 121.412 93.599) (end 121.412 94.615) (width 0.254) (layer GND_layer) (net 55)) + (segment (start 121.412 94.615) (end 122.555 95.758) (width 0.254) (layer GND_layer) (net 55)) + (segment (start 122.555 95.758) (end 124.46 95.758) (width 0.254) (layer GND_layer) (net 55)) + (segment (start 139.446 78.232) (end 139.446 82.677) (width 0.254) (layer Composant) (net 55)) + (segment (start 123.952 93.98) (end 123.952 94.488) (width 0.254) (layer Composant) (net 55)) + (segment (start 125.349 132.588) (end 125.349 135.255) (width 0.254) (layer GND_layer) (net 55)) + (segment (start 124.46 95.758) (end 125.095 96.393) (width 0.254) (layer GND_layer) (net 55)) + (segment (start 125.095 101.981) (end 122.174 104.902) (width 0.254) (layer GND_layer) (net 55)) + (segment (start 130.429 129.921) (end 130.429 133.731) (width 0.254) (layer GND_layer) (net 56)) + (segment (start 141.605 84.328) (end 143.383 86.106) (width 0.254) (layer Cuivre) (net 56)) + (segment (start 130.429 133.731) (end 133.604 136.906) (width 0.254) (layer GND_layer) (net 56) (status 420)) + (segment (start 129.9845 129.4765) (end 130.429 129.921) (width 0.254) (layer GND_layer) (net 56)) + (segment (start 129.9845 109.7915) (end 129.9845 129.4765) (width 0.254) (layer GND_layer) (net 56)) + (via (at 138.176 85.598) (size 0.635) (layers Composant Cuivre) (net 56)) + (segment (start 138.176 86.614) (end 138.176 85.598) (width 0.254) (layer Composant) (net 56)) + (segment (start 138.176 85.598) (end 138.176 85.217) (width 0.254) (layer Cuivre) (net 56)) + (segment (start 137.795 86.995) (end 138.176 86.614) (width 0.254) (layer Composant) (net 56)) + (segment (start 137.795 91.948) (end 137.795 86.995) (width 0.254) (layer Composant) (net 56)) + (segment (start 137.8839 92.3036) (end 137.795 91.948) (width 0.254) (layer Composant) (net 56)) + (segment (start 137.8712 93.726) (end 137.8839 92.3036) (width 0.254) (layer Composant) (net 56) (status 810)) + (segment (start 138.176 85.217) (end 139.065 84.328) (width 0.254) (layer Cuivre) (net 56)) + (segment (start 139.065 84.328) (end 141.605 84.328) (width 0.254) (layer Cuivre) (net 56)) + (segment (start 143.383 86.106) (end 153.289 86.106) (width 0.254) (layer Cuivre) (net 56)) + (segment (start 153.289 86.106) (end 154.94 84.455) (width 0.254) (layer Cuivre) (net 56)) + (segment (start 154.94 84.455) (end 172.847 84.455) (width 0.254) (layer Cuivre) (net 56)) + (segment (start 172.847 84.455) (end 173.99 83.312) (width 0.254) (layer Cuivre) (net 56)) + (segment (start 173.99 83.312) (end 177.673 83.312) (width 0.254) (layer Cuivre) (net 56)) + (segment (start 177.673 83.312) (end 178.816 84.455) (width 0.254) (layer Cuivre) (net 56)) + (segment (start 178.816 84.455) (end 186.563 84.455) (width 0.254) (layer Cuivre) (net 56)) + (segment (start 186.563 84.455) (end 195.199 75.819) (width 0.254) (layer Cuivre) (net 56)) + (segment (start 195.199 75.819) (end 198.755 75.819) (width 0.254) (layer Cuivre) (net 56)) + (segment (start 198.755 75.819) (end 200.025 74.549) (width 0.254) (layer Cuivre) (net 56) (status 420)) + (segment (start 124.587 85.852) (end 125.095 85.852) (width 0.254) (layer GND_layer) (net 56)) + (segment (start 125.222 86.868) (end 137.414 86.868) (width 0.254) (layer Cuivre) (net 56)) + (segment (start 138.176 86.106) (end 138.176 85.598) (width 0.254) (layer Cuivre) (net 56)) + (via (at 124.587 85.852) (size 0.889) (layers Composant Cuivre) (net 56)) + (segment (start 124.587 85.852) (end 124.587 86.233) (width 0.254) (layer Cuivre) (net 56)) + (segment (start 124.587 86.233) (end 125.222 86.868) (width 0.254) (layer Cuivre) (net 56)) + (segment (start 125.095 85.852) (end 127.5 88.257) (width 0.254) (layer GND_layer) (net 56)) + (segment (start 137.414 86.868) (end 138.176 86.106) (width 0.254) (layer Cuivre) (net 56)) + (segment (start 128.143 90.8) (end 128.143 107.95) (width 0.254) (layer GND_layer) (net 56) (tstamp 53D8E614)) + (segment (start 128.143 107.95) (end 129.9845 109.7915) (width 0.254) (layer GND_layer) (net 56)) + (segment (start 128.1 90.2) (end 127.5 89.6) (width 0.254) (layer GND_layer) (net 56) (tstamp 53D8E60E)) + (segment (start 127.5 89.6) (end 127.5 88.257) (width 0.254) (layer GND_layer) (net 56) (tstamp 53D8E60F)) + (segment (start 128.143 90.2) (end 128.1 90.2) (width 0.254) (layer GND_layer) (net 56)) + (segment (start 128.143 90.2) (end 128.1 90.2) (width 0.254) (layer GND_layer) (net 56) (tstamp 53D8E616)) + (segment (start 128.143 90.8) (end 128.143 90.2) (width 0.254) (layer GND_layer) (net 56)) + (segment (start 217.17 134.62) (end 218.44 135.89) (width 0.254) (layer 3.3V_layer) (net 57) (status 810)) + (segment (start 223.52 135.89) (end 224.79 134.62) (width 0.254) (layer 3.3V_layer) (net 57) (status 420)) + (segment (start 218.44 135.89) (end 223.52 135.89) (width 0.254) (layer 3.3V_layer) (net 57)) + (segment (start 138.049 123.317) (end 137.62736 123.73864) (width 0.381) (layer Composant) (net 58)) + (segment (start 139.8778 109.22) (end 139.8778 111.0488) (width 0.254) (layer Composant) (net 58) (status 810)) + (segment (start 178.19624 123.00204) (end 179.63642 124.44222) (width 0.254) (layer Composant) (net 58)) + (segment (start 136.652 124.0155) (end 130.048 124.0155) (width 0.381) (layer Composant) (net 58) (status 810)) + (segment (start 139.8778 111.0488) (end 139.954 111.379) (width 0.254) (layer Composant) (net 58)) + (segment (start 202.4761 111.0107) (end 212.9155 111.0107) (width 0.254) (layer Composant) (net 58) (status 420)) + (segment (start 168.4179 123.00204) (end 178.19624 123.00204) (width 0.254) (layer Composant) (net 58)) + (segment (start 138.049 121.031) (end 138.049 123.317) (width 0.381) (layer Composant) (net 58)) + (segment (start 141.224 117.856) (end 138.049 121.031) (width 0.381) (layer Composant) (net 58)) + (segment (start 141.224 115.697) (end 141.224 117.856) (width 0.381) (layer Composant) (net 58)) + (segment (start 139.954 114.3) (end 141.224 115.697) (width 0.381) (layer Composant) (net 58)) + (segment (start 139.954 111.379) (end 139.954 114.3) (width 0.381) (layer Composant) (net 58)) + (segment (start 137.3505 124.0155) (end 136.652 124.0155) (width 0.381) (layer Composant) (net 58) (status 430)) + (segment (start 137.62736 123.73864) (end 137.3505 124.0155) (width 0.381) (layer Composant) (net 58) (status 20)) + (segment (start 166.15222 125.26772) (end 168.4179 123.00204) (width 0.254) (layer Composant) (net 58)) + (segment (start 189.04458 124.44222) (end 202.4761 111.0107) (width 0.254) (layer Composant) (net 58)) + (segment (start 179.63642 124.44222) (end 189.04458 124.44222) (width 0.254) (layer Composant) (net 58)) + (segment (start 130.048 124.0155) (end 128.27 122.2375) (width 0.381) (layer Composant) (net 58) (status 420)) + (segment (start 128.27 122.2375) (end 127.0635 122.2375) (width 0.381) (layer Composant) (net 58) (status 810)) + (segment (start 127.0635 122.2375) (end 123.444 125.857) (width 0.381) (layer Composant) (net 58) (status 420)) + (segment (start 137.62736 123.73864) (end 139.15644 125.26772) (width 0.254) (layer Composant) (net 58)) + (segment (start 139.15644 125.26772) (end 166.15222 125.26772) (width 0.254) (layer Composant) (net 58)) + (segment (start 199.136 95.123) (end 202.819 91.44) (width 0.254) (layer Cuivre) (net 59)) + (via (at 205.66126 78.74) (size 0.889) (layers Composant Cuivre) (net 59)) + (segment (start 197.1802 98.7552) (end 197.1802 100.7745) (width 0.254) (layer Composant) (net 59) (status 420)) + (segment (start 197.104 98.679) (end 197.1802 98.7552) (width 0.254) (layer Composant) (net 59)) + (via (at 197.104 98.679) (size 0.889) (layers Composant Cuivre) (net 59)) + (segment (start 197.104 96.647) (end 197.104 98.679) (width 0.254) (layer Cuivre) (net 59)) + (segment (start 199.136 95.123) (end 198.628 95.123) (width 0.254) (layer Cuivre) (net 59)) + (segment (start 202.819 91.44) (end 202.819 81.58226) (width 0.254) (layer Cuivre) (net 59)) + (segment (start 202.819 81.58226) (end 205.66126 78.74) (width 0.254) (layer Cuivre) (net 59)) + (segment (start 198.628 95.123) (end 197.104 96.647) (width 0.254) (layer Cuivre) (net 59)) + (segment (start 205.4225 76.835) (end 205.4225 77.83068) (width 0.254) (layer Composant) (net 59) (status 810)) + (segment (start 205.66126 78.06944) (end 205.66126 78.74) (width 0.254) (layer Composant) (net 59)) + (segment (start 205.4225 77.83068) (end 205.66126 78.06944) (width 0.254) (layer Composant) (net 59)) + (segment (start 205.4225 80.645) (end 205.4225 84.35594) (width 0.254) (layer Composant) (net 60) (status 810)) + (segment (start 204.56652 85.21192) (end 204.56652 90.96248) (width 0.254) (layer Cuivre) (net 60)) + (via (at 204.56652 85.21192) (size 0.889) (layers Composant Cuivre) (net 60)) + (segment (start 205.4225 84.35594) (end 204.56652 85.21192) (width 0.254) (layer Composant) (net 60)) + (segment (start 197.6755 99.3775) (end 198.247 98.806) (width 0.254) (layer Composant) (net 60)) + (segment (start 197.6755 100.7745) (end 197.6755 99.3775) (width 0.254) (layer Composant) (net 60) (status 810)) + (segment (start 199.39 96.139) (end 204.56652 90.96248) (width 0.254) (layer Cuivre) (net 60)) + (segment (start 198.247 98.806) (end 198.247 97.282) (width 0.254) (layer Composant) (net 60)) + (segment (start 198.247 97.282) (end 199.39 96.139) (width 0.254) (layer Composant) (net 60)) + (via (at 199.39 96.139) (size 0.889) (layers Composant Cuivre) (net 60)) + (segment (start 182.51678 106.68) (end 182.87492 107.03814) (width 0.254) (layer Composant) (net 61)) + (segment (start 174.752 89.408) (end 174.244 89.408) (width 0.254) (layer Cuivre) (net 61)) + (segment (start 174.244 89.408) (end 173.609 90.043) (width 0.254) (layer Cuivre) (net 61)) + (segment (start 173.609 90.043) (end 165.608 90.043) (width 0.254) (layer Cuivre) (net 61)) + (segment (start 165.608 90.043) (end 164.973 89.408) (width 0.254) (layer Cuivre) (net 61)) + (segment (start 164.973 89.408) (end 159.512 89.408) (width 0.254) (layer Cuivre) (net 61)) + (segment (start 159.512 89.408) (end 156.972 91.948) (width 0.254) (layer Cuivre) (net 61)) + (segment (start 156.972 91.948) (end 154.432 91.948) (width 0.254) (layer Cuivre) (net 61)) + (segment (start 135.382 93.726) (end 135.382 94.682) (width 0.254) (layer Composant) (net 61) (status 810)) + (segment (start 155.702 93.218) (end 154.432 91.948) (width 0.254) (layer GND_layer) (net 61)) + (segment (start 155.702 114.3) (end 155.702 93.218) (width 0.254) (layer GND_layer) (net 61)) + (segment (start 158.877 117.475) (end 155.702 114.3) (width 0.254) (layer GND_layer) (net 61)) + (segment (start 174.752 89.408) (end 174.244 89.408) (width 0.254) (layer GND_layer) (net 61)) + (segment (start 158.877 129.413) (end 158.877 117.475) (width 0.254) (layer GND_layer) (net 61)) + (segment (start 151.384 136.906) (end 158.877 129.413) (width 0.254) (layer GND_layer) (net 61) (status 810)) + (segment (start 152.781 91.948) (end 154.432 91.948) (width 0.254) (layer Cuivre) (net 61)) + (segment (start 190.9445 107.0102) (end 189.88532 107.0102) (width 0.254) (layer Composant) (net 61) (status 810)) + (segment (start 152.273 92.456) (end 152.781 91.948) (width 0.254) (layer Cuivre) (net 61)) + (segment (start 139.065 92.456) (end 152.273 92.456) (width 0.254) (layer Cuivre) (net 61)) + (segment (start 136.017 95.504) (end 139.065 92.456) (width 0.254) (layer Cuivre) (net 61)) + (segment (start 135.89 96.139) (end 136.017 95.504) (width 0.254) (layer Cuivre) (net 61)) + (segment (start 189.85738 107.03814) (end 189.88532 107.0102) (width 0.254) (layer Composant) (net 61)) + (segment (start 178.054 108.077) (end 179.451 106.68) (width 0.254) (layer Composant) (net 61)) + (segment (start 178.054 110.363) (end 178.054 108.077) (width 0.254) (layer Composant) (net 61)) + (via (at 154.432 91.948) (size 0.635) (layers Composant Cuivre) (net 61)) + (via (at 178.054 110.363) (size 0.889) (layers Composant Cuivre) (net 61)) + (segment (start 182.87492 107.03814) (end 189.85738 107.03814) (width 0.254) (layer Composant) (net 61)) + (segment (start 174.244 89.408) (end 173.355 90.297) (width 0.254) (layer GND_layer) (net 61)) + (segment (start 173.355 90.297) (end 173.355 107.95) (width 0.254) (layer GND_layer) (net 61)) + (segment (start 179.451 106.68) (end 182.51678 106.68) (width 0.254) (layer Composant) (net 61)) + (segment (start 173.355 107.95) (end 175.768 110.363) (width 0.254) (layer GND_layer) (net 61)) + (segment (start 175.768 110.363) (end 178.054 110.363) (width 0.254) (layer GND_layer) (net 61)) + (via (at 135.89 96.139) (size 0.889) (layers Composant Cuivre) (net 61)) + (via (at 174.752 89.408) (size 0.889) (layers Composant Cuivre) (net 61)) + (segment (start 135.89 95.19) (end 135.382 94.682) (width 0.2) (layer Composant) (net 61) (tstamp 53D8E5E0)) + (segment (start 135.89 96.139) (end 135.89 95.19) (width 0.2) (layer Composant) (net 61)) + (segment (start 201.1807 122.7455) (end 201.1807 121.68632) (width 0.254) (layer Composant) (net 62) (status 810)) + (segment (start 201.1807 121.68632) (end 204.14488 118.72214) (width 0.254) (layer Composant) (net 62)) + (segment (start 204.14488 118.72214) (end 204.14488 116.9543) (width 0.254) (layer Composant) (net 62)) + (segment (start 218.44 68.2625) (end 218.44 69.00418) (width 0.254) (layer Composant) (net 62) (status 810)) + (segment (start 223.52 73.66) (end 218.86418 69.00418) (width 0.254) (layer Composant) (net 62) (status 810)) + (segment (start 218.86418 69.00418) (end 218.44 69.00418) (width 0.254) (layer Composant) (net 62)) + (via (at 204.14488 116.9543) (size 0.889) (layers Composant Cuivre) (net 62)) + (segment (start 204.14488 116.9543) (end 204.2287 116.9543) (width 0.254) (layer Cuivre) (net 62)) + (segment (start 205.867 91.313) (end 223.52 73.66) (width 0.254) (layer Cuivre) (net 62) (status 420)) + (segment (start 205.867 91.313) (end 205.867 115.316) (width 0.254) (layer Cuivre) (net 62)) + (segment (start 204.2287 116.9543) (end 205.867 115.316) (width 0.254) (layer Cuivre) (net 62)) + (segment (start 210.43138 103.08336) (end 210.43138 103.47706) (width 0.254) (layer Composant) (net 63)) + (segment (start 224.58172 72.18172) (end 223.52 71.12) (width 0.254) (layer GND_layer) (net 63) (status 420)) + (segment (start 209.1817 101.83368) (end 210.43138 103.08336) (width 0.254) (layer Composant) (net 63)) + (segment (start 210.43138 103.47706) (end 210.43138 99.40036) (width 0.254) (layer GND_layer) (net 63)) + (segment (start 210.43138 99.40036) (end 210.86064 98.9711) (width 0.254) (layer GND_layer) (net 63)) + (segment (start 210.86064 98.9711) (end 210.86064 87.35822) (width 0.254) (layer GND_layer) (net 63)) + (segment (start 210.86064 87.35822) (end 223.46412 74.75474) (width 0.254) (layer GND_layer) (net 63)) + (segment (start 223.46412 74.75474) (end 224.5106 74.75474) (width 0.254) (layer GND_layer) (net 63)) + (segment (start 224.5106 74.75474) (end 224.58172 74.68362) (width 0.254) (layer GND_layer) (net 63)) + (segment (start 224.58172 74.68362) (end 224.58172 72.18172) (width 0.254) (layer GND_layer) (net 63)) + (segment (start 209.1817 100.7745) (end 209.1817 101.83368) (width 0.254) (layer Composant) (net 63) (status 810)) + (via (at 210.43138 103.47706) (size 0.889) (layers Composant Cuivre) (net 63)) + (segment (start 207.772 107.44454) (end 213.26856 101.94798) (width 0.254) (layer GND_layer) (net 64)) + (segment (start 213.26856 101.94798) (end 213.26856 86.45144) (width 0.254) (layer GND_layer) (net 64)) + (segment (start 213.26856 86.45144) (end 223.52 76.2) (width 0.254) (layer GND_layer) (net 64) (status 420)) + (segment (start 208.6737 122.7455) (end 208.6737 114.5667) (width 0.254) (layer Composant) (net 64) (status 810)) + (segment (start 208.6737 114.5667) (end 209.37982 113.86058) (width 0.254) (layer Composant) (net 64)) + (via (at 209.37982 113.86058) (size 0.889) (layers Composant Cuivre) (net 64)) + (segment (start 209.37982 113.86058) (end 207.772 112.25276) (width 0.254) (layer GND_layer) (net 64)) + (segment (start 207.772 112.25276) (end 207.772 107.44454) (width 0.254) (layer GND_layer) (net 64)) + (segment (start 201.1807 96.44634) (end 201.1807 100.7745) (width 0.254) (layer Composant) (net 65) (status 420)) + (segment (start 224.50806 74.78776) (end 222.83928 74.78776) (width 0.254) (layer Composant) (net 65)) + (segment (start 223.52 68.58) (end 224.57918 69.63918) (width 0.254) (layer Composant) (net 65) (status 810)) + (segment (start 224.57918 69.63918) (end 224.57918 74.71664) (width 0.254) (layer Composant) (net 65)) + (segment (start 224.57918 74.71664) (end 224.50806 74.78776) (width 0.254) (layer Composant) (net 65)) + (segment (start 222.83928 74.78776) (end 201.1807 96.44634) (width 0.254) (layer Composant) (net 65)) + (segment (start 205.1812 98.49358) (end 205.1812 100.7745) (width 0.254) (layer Composant) (net 66) (status 420)) + (segment (start 214.77478 88.9) (end 205.1812 98.49358) (width 0.254) (layer Composant) (net 66)) + (segment (start 222.25 88.9) (end 214.77478 88.9) (width 0.254) (layer Composant) (net 66) (status 810)) + (segment (start 205.6765 100.7745) (end 205.6765 98.60026) (width 0.254) (layer Composant) (net 67) (status 810)) + (segment (start 212.83676 91.44) (end 222.25 91.44) (width 0.254) (layer Composant) (net 67) (status 420)) + (segment (start 205.6765 98.60026) (end 212.83676 91.44) (width 0.254) (layer Composant) (net 67)) + (segment (start 212.9155 114.0079) (end 221.9579 114.0079) (width 0.254) (layer Composant) (net 68) (status 830)) + (segment (start 221.9579 114.0079) (end 222.25 114.3) (width 0.254) (layer Composant) (net 68) (status 430)) + (segment (start 218.2495 116.84) (end 222.25 116.84) (width 0.254) (layer 3.3V_layer) (net 69) (status 420)) + (via (at 216.68994 115.28044) (size 0.889) (layers Composant Cuivre) (net 69)) + (segment (start 216.46388 115.5065) (end 216.68994 115.28044) (width 0.254) (layer Composant) (net 69)) + (segment (start 212.9155 115.5065) (end 216.46388 115.5065) (width 0.254) (layer Composant) (net 69) (status 810)) + (segment (start 216.68994 115.28044) (end 218.2495 116.84) (width 0.254) (layer 3.3V_layer) (net 69)) + (segment (start 219.5449 118.0084) (end 220.9165 119.38) (width 0.254) (layer Composant) (net 70)) + (segment (start 220.9165 119.38) (end 222.25 119.38) (width 0.254) (layer Composant) (net 70) (status 420)) + (segment (start 212.9155 118.0084) (end 219.5449 118.0084) (width 0.254) (layer Composant) (net 70) (status 810)) + (segment (start 212.9155 119.507) (end 219.837 119.507) (width 0.254) (layer Composant) (net 71) (status 810)) + (segment (start 219.837 119.507) (end 222.25 121.92) (width 0.254) (layer Composant) (net 71) (status 420)) + (segment (start 212.9155 120.5103) (end 218.3003 120.5103) (width 0.254) (layer Composant) (net 72) (status 810)) + (segment (start 218.3003 120.5103) (end 222.25 124.46) (width 0.254) (layer Composant) (net 72) (status 420)) + (segment (start 218.186 123.825) (end 221.361 127) (width 0.254) (layer Composant) (net 73)) + (segment (start 210.6803 122.7455) (end 210.6803 123.80468) (width 0.254) (layer Composant) (net 73) (status 810)) + (segment (start 210.6803 123.80468) (end 218.186 123.80468) (width 0.254) (layer Composant) (net 73)) + (segment (start 218.186 123.80468) (end 218.186 123.825) (width 0.254) (layer Composant) (net 73)) + (segment (start 221.361 127) (end 222.25 127) (width 0.254) (layer Composant) (net 73) (status 420)) + (segment (start 206.6798 122.7455) (end 206.6798 123.80468) (width 0.254) (layer Composant) (net 74) (status 810)) + (segment (start 222.25 129.54) (end 212.41512 129.54) (width 0.254) (layer Composant) (net 74) (status 810)) + (segment (start 212.41512 129.54) (end 206.6798 123.80468) (width 0.254) (layer Composant) (net 74)) + (segment (start 210.07324 125.27534) (end 216.8779 132.08) (width 0.254) (layer GND_layer) (net 75)) + (segment (start 207.1751 123.65228) (end 207.1751 122.7455) (width 0.254) (layer Composant) (net 75) (status 420)) + (segment (start 208.79816 125.27534) (end 207.1751 123.65228) (width 0.254) (layer Composant) (net 75)) + (segment (start 210.07324 125.27534) (end 208.79816 125.27534) (width 0.254) (layer Composant) (net 75)) + (via (at 210.07324 125.27534) (size 0.889) (layers Composant Cuivre) (net 75)) + (segment (start 216.8779 132.08) (end 222.25 132.08) (width 0.254) (layer GND_layer) (net 75) (status 420)) + (segment (start 205.1812 126.76378) (end 211.55914 133.14172) (width 0.254) (layer Composant) (net 76)) + (segment (start 211.55914 133.14172) (end 220.77172 133.14172) (width 0.254) (layer Composant) (net 76)) + (segment (start 220.77172 133.14172) (end 222.25 134.62) (width 0.254) (layer Composant) (net 76) (status 420)) + (segment (start 205.1812 122.7455) (end 205.1812 126.76378) (width 0.254) (layer Composant) (net 76) (status 810)) + (segment (start 204.6859 127.50546) (end 214.34044 137.16) (width 0.254) (layer Composant) (net 77)) + (segment (start 204.6859 122.7455) (end 204.6859 127.50546) (width 0.254) (layer Composant) (net 77) (status 810)) + (segment (start 214.34044 137.16) (end 222.25 137.16) (width 0.254) (layer Composant) (net 77) (status 420)) + (segment (start 211.50072 93.98) (end 207.6831 97.79762) (width 0.254) (layer Composant) (net 78)) + (segment (start 207.6831 97.79762) (end 207.6831 100.7745) (width 0.254) (layer Composant) (net 78) (status 420)) + (segment (start 222.25 93.98) (end 211.50072 93.98) (width 0.254) (layer Composant) (net 78) (status 810)) + (segment (start 211.0232 95.0595) (end 208.1784 97.9043) (width 0.254) (layer Composant) (net 79)) + (segment (start 224.79 91.44) (end 225.86442 92.51442) (width 0.254) (layer Composant) (net 79) (status 810)) + (segment (start 225.86442 94.98838) (end 225.7933 95.0595) (width 0.254) (layer Composant) (net 79)) + (segment (start 225.7933 95.0595) (end 211.0232 95.0595) (width 0.254) (layer Composant) (net 79)) + (segment (start 225.86442 92.51442) (end 225.86442 94.98838) (width 0.254) (layer Composant) (net 79)) + (segment (start 208.1784 97.9043) (end 208.1784 100.7745) (width 0.254) (layer Composant) (net 79) (status 420)) + (segment (start 223.52 92.71) (end 212.16874 92.71) (width 0.254) (layer Composant) (net 80)) + (segment (start 206.1845 98.69424) (end 206.1845 100.7745) (width 0.254) (layer Composant) (net 80) (status 420)) + (segment (start 224.79 93.98) (end 223.52 92.71) (width 0.254) (layer Composant) (net 80) (status 810)) + (segment (start 212.16874 92.71) (end 206.1845 98.69424) (width 0.254) (layer Composant) (net 80)) + (segment (start 208.6737 98.40976) (end 209.29346 97.79) (width 0.254) (layer Composant) (net 81)) + (segment (start 209.29346 97.79) (end 223.52 97.79) (width 0.254) (layer Composant) (net 81)) + (segment (start 208.6737 100.7745) (end 208.6737 98.40976) (width 0.254) (layer Composant) (net 81) (status 810)) + (segment (start 223.52 97.79) (end 224.79 96.52) (width 0.254) (layer Composant) (net 81) (status 420)) + (segment (start 223.52 100.33) (end 224.79 99.06) (width 0.254) (layer Composant) (net 82) (status 420)) + (segment (start 210.6803 100.7745) (end 211.1248 100.33) (width 0.254) (layer Composant) (net 82) (status 810)) + (segment (start 211.1248 100.33) (end 223.52 100.33) (width 0.254) (layer Composant) (net 82)) + (segment (start 212.9155 104.013) (end 220.44152 104.013) (width 0.254) (layer Composant) (net 83) (status 810)) + (segment (start 220.44152 104.013) (end 221.58452 102.87) (width 0.254) (layer Composant) (net 83)) + (segment (start 221.58452 102.87) (end 223.52 102.87) (width 0.254) (layer Composant) (net 83)) + (segment (start 223.52 102.87) (end 224.79 101.6) (width 0.254) (layer Composant) (net 83) (status 420)) + (segment (start 223.4184 105.5116) (end 224.79 104.14) (width 0.254) (layer Composant) (net 84) (status 420)) + (segment (start 212.9155 105.5116) (end 223.4184 105.5116) (width 0.254) (layer Composant) (net 84) (status 810)) + (segment (start 218.53144 106.5149) (end 219.96654 107.95) (width 0.254) (layer Composant) (net 85)) + (segment (start 223.52 107.95) (end 224.79 106.68) (width 0.254) (layer Composant) (net 85) (status 420)) + (segment (start 219.96654 107.95) (end 223.52 107.95) (width 0.254) (layer Composant) (net 85)) + (segment (start 212.9155 106.5149) (end 218.53144 106.5149) (width 0.254) (layer Composant) (net 85) (status 810)) + (segment (start 223.57588 108.00588) (end 224.79 109.22) (width 0.254) (layer 3.3V_layer) (net 86) (status 420)) + (segment (start 212.9155 108.0135) (end 213.97468 108.0135) (width 0.254) (layer Composant) (net 86) (status 810)) + (segment (start 214.91448 108.00588) (end 223.57588 108.00588) (width 0.254) (layer 3.3V_layer) (net 86)) + (segment (start 213.97468 108.0135) (end 213.9823 108.00588) (width 0.254) (layer Composant) (net 86)) + (segment (start 213.9823 108.00588) (end 214.91448 108.00588) (width 0.254) (layer Composant) (net 86)) + (via (at 214.91448 108.00588) (size 0.889) (layers Composant Cuivre) (net 86)) + (segment (start 218.75496 110.65764) (end 223.68764 110.65764) (width 0.254) (layer Composant) (net 87)) + (segment (start 217.10142 109.0041) (end 218.75496 110.65764) (width 0.254) (layer Composant) (net 87)) + (segment (start 212.9155 109.0041) (end 217.10142 109.0041) (width 0.254) (layer Composant) (net 87) (status 810)) + (segment (start 223.68764 110.65764) (end 224.79 111.76) (width 0.254) (layer Composant) (net 87) (status 420)) + (segment (start 221.6531 115.57) (end 223.52 115.57) (width 0.254) (layer Composant) (net 88)) + (segment (start 219.38488 116.5733) (end 219.456 116.64442) (width 0.254) (layer Composant) (net 88)) + (segment (start 214.03818 116.5733) (end 219.38488 116.5733) (width 0.254) (layer Composant) (net 88)) + (segment (start 213.97468 116.5098) (end 214.03818 116.5733) (width 0.254) (layer Composant) (net 88)) + (segment (start 223.52 115.57) (end 224.79 114.3) (width 0.254) (layer Composant) (net 88) (status 420)) + (segment (start 212.9155 116.5098) (end 213.97468 116.5098) (width 0.254) (layer Composant) (net 88) (status 810)) + (segment (start 220.57868 116.64442) (end 221.6531 115.57) (width 0.254) (layer Composant) (net 88)) + (segment (start 219.456 116.64442) (end 220.57868 116.64442) (width 0.254) (layer Composant) (net 88)) + (segment (start 213.40826 96.52) (end 222.25 96.52) (width 0.254) (layer 3.3V_layer) (net 89) (status 420)) + (segment (start 207.1751 100.7745) (end 207.1751 101.83368) (width 0.254) (layer Composant) (net 89) (status 810)) + (segment (start 207.6196 102.30612) (end 207.62214 102.30612) (width 0.254) (layer Composant) (net 89)) + (segment (start 207.62214 102.30612) (end 213.40826 96.52) (width 0.254) (layer 3.3V_layer) (net 89)) + (via (at 207.62214 102.30612) (size 0.889) (layers Composant Cuivre) (net 89)) + (segment (start 207.6196 102.27818) (end 207.6196 102.30612) (width 0.254) (layer Composant) (net 89)) + (segment (start 207.1751 101.83368) (end 207.6196 102.27818) (width 0.254) (layer Composant) (net 89)) + (segment (start 223.70542 115.75542) (end 224.79 116.84) (width 0.254) (layer 3.3V_layer) (net 90) (status 420)) + (segment (start 220.0021 115.75542) (end 223.70542 115.75542) (width 0.254) (layer 3.3V_layer) (net 90)) + (segment (start 216.32926 116.14912) (end 219.6084 116.14912) (width 0.254) (layer Composant) (net 90)) + (segment (start 216.19464 116.0145) (end 216.32926 116.14912) (width 0.254) (layer Composant) (net 90)) + (segment (start 219.6084 116.14912) (end 220.0021 115.75542) (width 0.254) (layer Composant) (net 90)) + (segment (start 212.9155 116.0145) (end 216.19464 116.0145) (width 0.254) (layer Composant) (net 90) (status 810)) + (via (at 220.0021 115.75542) (size 0.889) (layers Composant Cuivre) (net 90)) + (segment (start 219.2147 117.0051) (end 220.3196 118.11) (width 0.254) (layer Composant) (net 91)) + (segment (start 223.52 118.11) (end 224.79 119.38) (width 0.254) (layer Composant) (net 91) (status 420)) + (segment (start 220.3196 118.11) (end 223.52 118.11) (width 0.254) (layer Composant) (net 91)) + (segment (start 212.9155 117.0051) (end 219.2147 117.0051) (width 0.254) (layer Composant) (net 91) (status 810)) + (segment (start 223.52 123.19) (end 224.79 121.92) (width 0.254) (layer 3.3V_layer) (net 92) (status 420)) + (via (at 206.502 126.238) (size 0.889) (layers Composant Cuivre) (net 92)) + (segment (start 208.407 123.19) (end 223.52 123.19) (width 0.254) (layer 3.3V_layer) (net 92)) + (segment (start 206.502 125.58522) (end 205.6765 124.75972) (width 0.254) (layer Composant) (net 92)) + (segment (start 206.502 126.238) (end 206.502 125.095) (width 0.254) (layer 3.3V_layer) (net 92)) + (segment (start 206.502 126.238) (end 206.502 125.58522) (width 0.254) (layer Composant) (net 92)) + (segment (start 206.502 125.095) (end 208.407 123.19) (width 0.254) (layer 3.3V_layer) (net 92)) + (segment (start 205.6765 122.7455) (end 205.6765 124.75972) (width 0.254) (layer Composant) (net 92) (status 810)) + (segment (start 219.94368 119.0117) (end 221.79026 120.85828) (width 0.254) (layer Composant) (net 93)) + (segment (start 221.79026 120.85828) (end 223.30664 120.85828) (width 0.254) (layer Composant) (net 93)) + (segment (start 212.9155 119.0117) (end 219.94368 119.0117) (width 0.254) (layer Composant) (net 93) (status 810)) + (segment (start 223.37776 123.04776) (end 224.79 124.46) (width 0.254) (layer Composant) (net 93) (status 420)) + (segment (start 223.37776 120.9294) (end 223.37776 123.04776) (width 0.254) (layer Composant) (net 93)) + (segment (start 223.30664 120.85828) (end 223.37776 120.9294) (width 0.254) (layer Composant) (net 93)) + (segment (start 223.52 125.73) (end 224.79 127) (width 0.254) (layer Composant) (net 94) (status 420)) + (segment (start 211.85632 118.5037) (end 211.85632 120.88876) (width 0.254) (layer Composant) (net 94)) + (segment (start 211.85632 120.88876) (end 212.32876 121.3612) (width 0.254) (layer Composant) (net 94)) + (segment (start 212.9155 118.5037) (end 211.85632 118.5037) (width 0.254) (layer Composant) (net 94) (status 810)) + (segment (start 212.32876 121.3612) (end 217.21572 121.3612) (width 0.254) (layer Composant) (net 94)) + (segment (start 217.21572 121.3612) (end 221.58452 125.73) (width 0.254) (layer Composant) (net 94)) + (segment (start 221.58452 125.73) (end 223.52 125.73) (width 0.254) (layer Composant) (net 94)) + (segment (start 223.52 128.27) (end 224.79 129.54) (width 0.254) (layer Composant) (net 95) (status 420)) + (segment (start 210.1723 122.7455) (end 210.1723 124.13996) (width 0.254) (layer Composant) (net 95) (status 810)) + (segment (start 214.30234 128.27) (end 223.52 128.27) (width 0.254) (layer Composant) (net 95)) + (segment (start 210.1723 124.13996) (end 214.30234 128.27) (width 0.254) (layer Composant) (net 95)) + (segment (start 223.52 130.81) (end 212.95868 130.81) (width 0.254) (layer Composant) (net 96)) + (segment (start 224.79 132.08) (end 223.52 130.81) (width 0.254) (layer Composant) (net 96) (status 810)) + (segment (start 206.1845 124.03582) (end 206.1845 122.7455) (width 0.254) (layer Composant) (net 96) (status 420)) + (segment (start 212.95868 130.81) (end 206.1845 124.03582) (width 0.254) (layer Composant) (net 96)) + (segment (start 210.1723 99.71532) (end 221.59468 99.71532) (width 0.254) (layer Composant) (net 97)) + (segment (start 210.1723 100.7745) (end 210.1723 99.71532) (width 0.254) (layer Composant) (net 97) (status 810)) + (segment (start 221.59468 99.71532) (end 222.25 99.06) (width 0.254) (layer Composant) (net 97) (status 420)) + (segment (start 220.3323 103.5177) (end 222.25 101.6) (width 0.254) (layer Composant) (net 98) (status 420)) + (segment (start 212.9155 103.5177) (end 220.3323 103.5177) (width 0.254) (layer Composant) (net 98) (status 810)) + (segment (start 212.9155 105.0163) (end 221.3737 105.0163) (width 0.254) (layer Composant) (net 99) (status 810)) + (segment (start 221.3737 105.0163) (end 222.25 104.14) (width 0.254) (layer Composant) (net 99) (status 420)) + (segment (start 212.9155 106.0069) (end 221.5769 106.0069) (width 0.254) (layer Composant) (net 100) (status 810)) + (segment (start 221.5769 106.0069) (end 222.25 106.68) (width 0.254) (layer Composant) (net 100) (status 420)) + (segment (start 222.25 109.22) (end 218.67368 109.22) (width 0.254) (layer Composant) (net 101) (status 810)) + (segment (start 218.67368 109.22) (end 216.46388 107.0102) (width 0.254) (layer Composant) (net 101)) + (segment (start 216.46388 107.0102) (end 212.9155 107.0102) (width 0.254) (layer Composant) (net 101) (status 420)) + (segment (start 212.9155 109.5121) (end 215.392 109.5121) (width 0.254) (layer Composant) (net 102) (status 810)) + (segment (start 215.392 109.5121) (end 217.6399 111.76) (width 0.254) (layer Composant) (net 102)) + (segment (start 217.6399 111.76) (end 222.25 111.76) (width 0.254) (layer Composant) (net 102) (status 420)) + (segment (start 190.0555 109.88548) (end 190.0555 107.315) (width 0.4) (layer Cuivre) (net 103) (status 420)) + (segment (start 129.032 91.3765) (end 128.9685 91.44) (width 0.4) (layer Cuivre) (net 103) (status 430)) + (segment (start 109.4105 84.328) (end 109.601 84.328) (width 0.4) (layer Composant) (net 103) (status 830)) + (segment (start 110.744 83.312) (end 110.744 81.407) (width 0.4) (layer Cuivre) (net 103)) + (segment (start 110.744 81.407) (end 110.744 78.613) (width 0.4) (layer Cuivre) (net 103) (status 420)) + (segment (start 76.327 111.379) (end 75.311 111.379) (width 0.4) (layer Composant) (net 103) (status 810)) + (segment (start 75.311 111.379) (end 74.549 112.141) (width 0.4) (layer Composant) (net 103)) + (segment (start 74.549 112.141) (end 74.549 117.221) (width 0.4) (layer Composant) (net 103)) + (segment (start 74.549 117.221) (end 76.327 118.999) (width 0.4) (layer Composant) (net 103) (status 420)) + (segment (start 134.3914 94.9452) (end 135.001 95.5548) (width 0.4) (layer Composant) (net 103)) + (segment (start 135.001 95.5548) (end 135.001 97.663) (width 0.4) (layer Composant) (net 103)) + (segment (start 163.068 75.311) (end 163.068 73.406) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 163.068 73.406) (end 162.56 72.898) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 162.56 72.898) (end 151.003 72.898) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 137.3886 109.22) (end 137.3886 108.077) (width 0.4) (layer Composant) (net 103) (status 810)) + (segment (start 137.3886 108.077) (end 137.668 107.823) (width 0.4) (layer Composant) (net 103)) + (segment (start 137.668 107.823) (end 137.668 105.029) (width 0.4) (layer Composant) (net 103)) + (segment (start 97.409 121.412) (end 96.901 121.412) (width 0.4) (layer Composant) (net 103) (status 830)) + (segment (start 96.901 121.412) (end 95.25 123.063) (width 0.4) (layer Composant) (net 103) (status 10)) + (segment (start 95.25 123.063) (end 88.646 123.063) (width 0.4) (layer Composant) (net 103)) + (segment (start 88.646 123.063) (end 86.741 121.158) (width 0.4) (layer Composant) (net 103) (status 420)) + (segment (start 100.965 60.833) (end 100.965 66.929) (width 0.4) (layer Composant) (net 103) (status C30)) + (segment (start 189.23 74.676) (end 191.008 74.676) (width 0.4) (layer Composant) (net 103) (status 810)) + (segment (start 191.008 74.676) (end 191.008 75.438) (width 0.4) (layer Composant) (net 103)) + (segment (start 191.008 75.438) (end 191.897 75.438) (width 0.4) (layer Composant) (net 103) (status 20)) + (segment (start 191.897 75.438) (end 192.532 75.1205) (width 0.4) (layer Composant) (net 103) (status 430)) + (segment (start 127.635 99.9744) (end 126.4412 99.9744) (width 0.254) (layer Composant) (net 103) (status 810)) + (segment (start 141.478 82.423) (end 141.605 82.55) (width 0.4) (layer GND_layer) (net 103)) + (via (at 141.478 82.423) (size 0.8) (layers Composant Cuivre) (net 103)) + (segment (start 141.478 82.423) (end 141.478 84.8995) (width 0.4) (layer Composant) (net 103) (status 420)) + (segment (start 141.605 82.55) (end 141.605 86.741) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 141.605 86.741) (end 141.605 89.027) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 131.8768 108.1278) (end 131.826 107.95) (width 0.4) (layer Composant) (net 103)) + (segment (start 141.605 86.741) (end 134.366 86.741) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 133.477 85.852) (end 131.699 85.852) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 134.366 86.741) (end 133.477 85.852) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 175.641 78.613) (end 175.641 86.741) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 177.165 77.089) (end 175.641 78.613) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 176.149 87.249) (end 168.529 87.249) (width 0.4) (layer Composant) (net 103) (status C30)) + (segment (start 140.6525 90.4875) (end 140.6525 91.059) (width 0.4) (layer Composant) (net 103) (status 430)) + (segment (start 141.605 89.535) (end 140.6525 90.4875) (width 0.4) (layer Composant) (net 103) (status 20)) + (segment (start 141.605 89.027) (end 141.605 89.535) (width 0.4) (layer Composant) (net 103)) + (segment (start 121.158 101.854) (end 121.158 102.616) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 123.571 99.06) (end 121.158 101.854) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 183.134 128.27) (end 183.134 133.604) (width 0.4) (layer Composant) (net 103)) + (segment (start 86.741 117.094) (end 86.741 115.57) (width 0.4) (layer Composant) (net 103) (status 810)) + (segment (start 128.9685 91.44) (end 128.9685 89.8525) (width 0.4) (layer Composant) (net 103)) + (segment (start 129.8702 92.3417) (end 128.9685 91.44) (width 0.4) (layer Composant) (net 103)) + (segment (start 129.8702 93.726) (end 129.8702 92.3417) (width 0.254) (layer Composant) (net 103) (status 810)) + (segment (start 194.691 73.66) (end 194.691 73.406) (width 0.4) (layer Composant) (net 103)) + (segment (start 194.183 74.168) (end 194.691 73.66) (width 0.4) (layer Composant) (net 103)) + (segment (start 194.183 75.311) (end 194.183 74.168) (width 0.4) (layer Composant) (net 103)) + (segment (start 193.167 75.311) (end 194.183 75.311) (width 0.4) (layer Composant) (net 103) (status 10)) + (segment (start 192.532 75.1205) (end 193.167 75.311) (width 0.4) (layer Composant) (net 103) (status 830)) + (segment (start 86.741 117.094) (end 86.741 121.158) (width 0.4) (layer Composant) (net 103) (status C30)) + (segment (start 119.38 102.616) (end 121.158 102.616) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 117.348 100.584) (end 119.38 102.616) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 114.681 100.584) (end 117.348 100.584) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 112.522 98.425) (end 114.681 100.584) (width 0.4) (layer GND_layer) (net 103) (status 810)) + (segment (start 80.772 77.089) (end 75.438 73.025) (width 0.4) (layer Composant) (net 103) (status C30)) + (segment (start 93.599 106.934) (end 93.599 96.774) (width 0.4) (layer Composant) (net 103)) + (segment (start 92.075 95.25) (end 88.9 95.25) (width 0.4) (layer Composant) (net 103) (status 420)) + (segment (start 93.599 96.774) (end 92.075 95.25) (width 0.4) (layer Composant) (net 103)) + (segment (start 190.0555 115.189) (end 190.0555 116.18468) (width 0.4) (layer Cuivre) (net 103) (status 810)) + (segment (start 189.48146 116.18468) (end 190.0555 116.18468) (width 0.4) (layer Cuivre) (net 103)) + (segment (start 131.826 107.95) (end 131.826 105.537) (width 0.4) (layer Composant) (net 103)) + (segment (start 131.826 105.537) (end 132.588 104.775) (width 0.4) (layer Composant) (net 103)) + (segment (start 132.588 104.775) (end 132.588 103.632) (width 0.4) (layer Composant) (net 103)) + (segment (start 131.8768 109.22) (end 131.8768 108.1278) (width 0.254) (layer Composant) (net 103) (status 810)) + (segment (start 126.4412 99.9744) (end 125.349 100.7745) (width 0.4) (layer Composant) (net 103) (status 420)) + (segment (start 109.4105 84.328) (end 109.4105 82.8675) (width 0.4) (layer Composant) (net 103) (status 810)) + (segment (start 129.032 89.789) (end 129.032 91.3765) (width 0.4) (layer Cuivre) (net 103) (status 20)) + (segment (start 189.15634 116.5098) (end 189.48146 116.18468) (width 0.4) (layer Cuivre) (net 103)) + (segment (start 189.88532 116.5098) (end 190.9445 116.5098) (width 0.254) (layer Composant) (net 103) (status 420)) + (segment (start 189.15634 116.5098) (end 189.88532 116.5098) (width 0.4) (layer Composant) (net 103)) + (segment (start 189.88532 116.5098) (end 189.88532 114.0079) (width 0.254) (layer Composant) (net 103)) + (segment (start 189.88532 114.0079) (end 190.9445 114.0079) (width 0.254) (layer Composant) (net 103) (status 420)) + (segment (start 189.88532 113.0173) (end 189.88532 114.0079) (width 0.254) (layer Composant) (net 103)) + (segment (start 209.1817 122.7455) (end 209.1817 124.24918) (width 0.254) (layer Composant) (net 103) (status 810)) + (segment (start 209.1817 124.24918) (end 209.16646 124.26442) (width 0.4) (layer Composant) (net 103)) + (segment (start 91.694 108.839) (end 91.694 112.903) (width 0.4) (layer Composant) (net 103) (status 420)) + (segment (start 208.28 123.37796) (end 209.16646 124.26442) (width 0.4) (layer Cuivre) (net 103)) + (segment (start 213.97468 110.5027) (end 214.45474 110.5027) (width 0.4) (layer Composant) (net 103)) + (segment (start 152.4 115.57) (end 152.273 115.697) (width 0.4) (layer 3.3V_layer) (net 103)) + (segment (start 211.4042 107.5055) (end 211.45754 107.5055) (width 0.4) (layer GND_layer) (net 103)) + (via (at 211.4042 107.5055) (size 0.8) (layers Composant Cuivre) (net 103)) + (via (at 214.45474 110.5027) (size 0.8) (layers Composant Cuivre) (net 103)) + (segment (start 211.4042 107.5055) (end 212.9155 107.5055) (width 0.254) (layer Composant) (net 103) (status 420)) + (segment (start 213.44636 111.506) (end 213.97468 111.506) (width 0.254) (layer Composant) (net 103) (status 10)) + (segment (start 212.9155 111.506) (end 213.44636 111.506) (width 0.254) (layer Composant) (net 103) (status 830)) + (segment (start 213.44636 112.014) (end 213.97468 112.014) (width 0.4) (layer Composant) (net 103) (status 10)) + (segment (start 212.9155 112.014) (end 213.44636 112.014) (width 0.4) (layer Composant) (net 103) (status 830)) + (segment (start 213.44636 111.506) (end 213.44636 112.014) (width 0.254) (layer Composant) (net 103) (status 30)) + (segment (start 213.83244 112.5093) (end 213.97468 112.36706) (width 0.4) (layer Composant) (net 103)) + (segment (start 213.97468 112.36706) (end 213.97468 112.014) (width 0.4) (layer Composant) (net 103)) + (segment (start 212.9155 112.5093) (end 213.83244 112.5093) (width 0.4) (layer Composant) (net 103) (status 810)) + (segment (start 213.83244 112.5093) (end 213.97468 112.65154) (width 0.4) (layer Composant) (net 103)) + (segment (start 213.97468 112.65154) (end 213.97468 113.0173) (width 0.4) (layer Composant) (net 103)) + (segment (start 212.9155 113.0173) (end 213.97468 113.0173) (width 0.254) (layer Composant) (net 103) (status 810)) + (segment (start 209.677 98.69424) (end 209.296 99.07524) (width 0.4) (layer Cuivre) (net 103)) + (segment (start 209.296 99.07524) (end 209.296 99.8855) (width 0.4) (layer Cuivre) (net 103) (status 420)) + (segment (start 209.677 98.69424) (end 209.677 100.7745) (width 0.254) (layer Composant) (net 103) (status 420)) + (segment (start 203.454 99.71532) (end 202.6793 99.71532) (width 0.254) (layer Composant) (net 103)) + (segment (start 204.6859 99.71532) (end 203.454 99.71532) (width 0.254) (layer Composant) (net 103)) + (segment (start 203.454 98.67392) (end 203.454 99.71532) (width 0.254) (layer Composant) (net 103)) + (via (at 199.644 97.536) (size 0.8) (layers Composant Cuivre) (net 103)) + (segment (start 199.644 97.536) (end 199.644 99.2505) (width 0.4) (layer Cuivre) (net 103)) + (segment (start 199.644 99.2505) (end 199.009 99.8855) (width 0.4) (layer Cuivre) (net 103) (status 420)) + (segment (start 190.9445 113.0173) (end 189.88532 113.0173) (width 0.254) (layer Composant) (net 103) (status 810)) + (segment (start 93.599 106.934) (end 91.694 108.839) (width 0.4) (layer Composant) (net 103)) + (segment (start 97.409 82.931) (end 103.632 76.708) (width 0.4) (layer Cuivre) (net 103)) + (segment (start 102.108 66.929) (end 100.965 66.929) (width 0.4) (layer Composant) (net 103) (status 430)) + (segment (start 175.641 86.741) (end 176.149 87.249) (width 0.4) (layer GND_layer) (net 103) (status 420)) + (segment (start 104.267 72.1995) (end 104.267 69.088) (width 0.4) (layer Composant) (net 103) (status 810)) + (segment (start 104.14 139.827) (end 104.14 140.462) (width 0.4) (layer Composant) (net 103) (status 830)) + (segment (start 128.27 74.676) (end 130.1115 74.676) (width 0.4) (layer Composant) (net 103) (status 810)) + (segment (start 85.9155 114.7445) (end 84.836 114.7445) (width 0.4) (layer Composant) (net 103) (status 420)) + (segment (start 86.741 115.57) (end 85.9155 114.7445) (width 0.4) (layer Composant) (net 103)) + (segment (start 144.8054 104.4702) (end 145.288 103.8225) (width 0.4) (layer Composant) (net 103)) + (segment (start 143.129 104.4702) (end 144.8054 104.4702) (width 0.4) (layer Composant) (net 103) (status 810)) + (segment (start 140.3858 94.9198) (end 140.208 95.123) (width 0.4) (layer Composant) (net 103)) + (segment (start 140.3858 93.726) (end 140.3858 94.9198) (width 0.254) (layer Composant) (net 103) (status 810)) + (segment (start 77.597 130.429) (end 74.422 130.429) (width 0.4) (layer Composant) (net 103)) + (segment (start 78.867 129.159) (end 77.597 130.429) (width 0.4) (layer Composant) (net 103) (status 810)) + (segment (start 145.415 100.076) (end 146.812 100.076) (width 0.4) (layer Composant) (net 103)) + (segment (start 144.8054 99.4664) (end 145.415 100.076) (width 0.254) (layer Composant) (net 103)) + (segment (start 143.129 99.4664) (end 144.8054 99.4664) (width 0.254) (layer Composant) (net 103) (status 810)) + (segment (start 105.156 91.948) (end 106.68 90.424) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 145.3515 103.886) (end 145.288 103.8225) (width 0.4) (layer Cuivre) (net 103) (status 430)) + (segment (start 101.6 98.933) (end 105.156 95.377) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 110.744 141.859) (end 115.951 141.859) (width 0.4) (layer Composant) (net 103)) + (segment (start 103.378 112.522) (end 101.6 110.744) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 109.601 84.328) (end 110.109 83.82) (width 0.4) (layer Composant) (net 103) (status 10)) + (segment (start 146.6215 100.2665) (end 146.812 100.076) (width 0.4) (layer Cuivre) (net 103)) + (via (at 111.252 83.82) (size 0.8) (layers Composant Cuivre) (net 103)) + (segment (start 152.4 119.507) (end 152.4 115.57) (width 0.4) (layer Composant) (net 103) (status 10)) + (segment (start 151.892 120.015) (end 152.4 119.507) (width 0.4) (layer Composant) (net 103) (status 830)) + (segment (start 159.385 115.57) (end 152.4 115.57) (width 0.4) (layer 3.3V_layer) (net 103)) + (segment (start 159.512 115.697) (end 159.385 115.57) (width 0.4) (layer 3.3V_layer) (net 103)) + (segment (start 159.4485 115.6335) (end 159.512 115.697) (width 0.4) (layer Composant) (net 103)) + (segment (start 159.4485 114.046) (end 159.4485 115.6335) (width 0.4) (layer Composant) (net 103) (status 810)) + (segment (start 123.6345 103.505) (end 124.587 104.521) (width 0.4) (layer Composant) (net 103) (status 810)) + (segment (start 105.7275 90.424) (end 102.8065 93.345) (width 0.4) (layer Composant) (net 103) (status 420)) + (segment (start 106.68 90.424) (end 105.7275 90.424) (width 0.4) (layer Composant) (net 103)) + (segment (start 158.623 108.966) (end 159.512 108.966) (width 0.4) (layer Composant) (net 103) (status 420)) + (segment (start 158.242 108.585) (end 158.623 108.966) (width 0.4) (layer Composant) (net 103)) + (segment (start 158.242 106.045) (end 158.242 108.585) (width 0.4) (layer Composant) (net 103)) + (segment (start 158.75 105.537) (end 158.242 106.045) (width 0.4) (layer Composant) (net 103)) + (segment (start 98.7425 90.043) (end 97.282 90.043) (width 0.4) (layer Composant) (net 103) (status 810)) + (segment (start 97.663 90.424) (end 106.68 90.424) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 97.282 90.043) (end 97.663 90.424) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 75.438 81.661) (end 78.105 84.328) (width 0.4) (layer Composant) (net 103) (status 430)) + (segment (start 75.438 73.025) (end 75.438 81.661) (width 0.4) (layer Composant) (net 103) (status 830)) + (segment (start 78.105 93.091) (end 78.105 84.328) (width 0.4) (layer Composant) (net 103) (status C30)) + (segment (start 133.731 89.535) (end 131.699 87.503) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 131.699 87.503) (end 131.699 87.122) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 144.653 113.03) (end 144.0815 113.6015) (width 0.4) (layer Composant) (net 103) (status 20)) + (segment (start 144.0815 113.6015) (end 143.51 113.6015) (width 0.4) (layer Composant) (net 103) (status 430)) + (segment (start 142.24 108.839) (end 143.637 110.236) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 194.183 60.452) (end 162.814 60.452) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 196.215 62.484) (end 194.183 60.452) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 196.215 68.326) (end 196.215 62.484) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 195.961 68.58) (end 196.215 68.326) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 194.691 68.58) (end 195.961 68.58) (width 0.4) (layer GND_layer) (net 103) (status 810)) + (segment (start 130.937 60.452) (end 129.286 62.103) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 129.286 62.103) (end 129.286 66.929) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 129.286 66.929) (end 127.635 68.58) (width 0.4) (layer GND_layer) (net 103) (status 420)) + (segment (start 162.814 60.452) (end 130.937 60.452) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 131.064 111.252) (end 131.064 112.2045) (width 0.4) (layer Composant) (net 103) (status 20)) + (segment (start 131.064 112.2045) (end 131.0005 112.268) (width 0.4) (layer Composant) (net 103) (status 430)) + (segment (start 131.8768 110.4392) (end 131.064 111.252) (width 0.254) (layer Composant) (net 103)) + (segment (start 110.744 141.859) (end 110.744 139.446) (width 0.4) (layer Composant) (net 103) (status 420)) + (segment (start 194.6783 98.4377) (end 195.58 97.536) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 195.58 97.536) (end 199.644 97.536) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 194.6783 99.25304) (end 194.6783 98.4377) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 200.78192 98.67392) (end 199.644 97.536) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 135.001 97.663) (end 135.636 98.298) (width 0.4) (layer Composant) (net 103)) + (segment (start 135.636 98.298) (end 137.668 98.298) (width 0.4) (layer Composant) (net 103)) + (segment (start 194.6783 100.7237) (end 190.5 104.902) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 190.5 104.902) (end 190.5 109.44098) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 190.5 109.44098) (end 189.43828 110.5027) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 194.6783 99.25304) (end 194.6783 100.7237) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 175.133 113.157) (end 173.863 114.427) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 173.863 114.427) (end 173.863 122.428) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 173.863 122.428) (end 176.276 124.841) (width 0.4) (layer GND_layer) (net 103) (status 420)) + (segment (start 176.149 113.157) (end 175.133 113.157) (width 0.4) (layer GND_layer) (net 103) (status 810)) + (segment (start 214.45474 118.97614) (end 209.16646 124.26442) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 214.45474 110.5027) (end 214.45474 118.97614) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 203.47432 98.69424) (end 203.454 98.67392) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 209.677 98.69424) (end 203.47432 98.69424) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 203.454 98.67392) (end 200.78192 98.67392) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 207.96504 123.063) (end 209.16646 124.26442) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 204.851 123.063) (end 207.96504 123.063) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 203.79436 124.11964) (end 204.851 123.063) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 203.79436 124.61748) (end 203.79436 124.11964) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 221.869 66.04) (end 215.773 72.136) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 215.773 72.136) (end 211.074 72.136) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 223.52 66.04) (end 221.869 66.04) (width 0.4) (layer GND_layer) (net 103) (status 810)) + (segment (start 211.074 72.136) (end 212.23732 73.29932) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 212.23732 73.29932) (end 212.23732 76.24826) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 195.961 72.136) (end 211.074 72.136) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 194.691 73.406) (end 195.961 72.136) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 194.691 73.406) (end 194.691 68.58) (width 0.4) (layer GND_layer) (net 103) (status 420)) + (segment (start 224.79 87.884) (end 226.187 86.487) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 226.187 86.487) (end 226.187 68.707) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 226.187 68.707) (end 223.52 66.04) (width 0.4) (layer GND_layer) (net 103) (status 420)) + (segment (start 224.79 88.9) (end 224.79 87.884) (width 0.4) (layer GND_layer) (net 103) (status 810)) + (segment (start 198.3105 136.3345) (end 201.676 139.7) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 201.676 139.7) (end 224.155 139.7) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 224.155 139.7) (end 224.79 139.065) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 224.79 139.065) (end 224.79 137.16) (width 0.4) (layer GND_layer) (net 103) (status 420)) + (segment (start 198.3105 127.5715) (end 198.3105 136.3345) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 189.15634 126.29134) (end 190.5 127.635) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 143.637 110.236) (end 143.637 112.014) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 143.637 112.014) (end 144.653 113.03) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 141.859 109.22) (end 142.24 108.839) (width 0.4) (layer Composant) (net 103)) + (segment (start 141.3764 109.22) (end 141.859 109.22) (width 0.381) (layer Composant) (net 103) (status 810)) + (segment (start 141.732 113.3475) (end 143.256 113.3475) (width 0.4) (layer Composant) (net 103) (status 830)) + (segment (start 143.256 113.3475) (end 143.51 113.6015) (width 0.4) (layer Composant) (net 103) (status 430)) + (segment (start 137.287 113.538) (end 137.287 117.475) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 137.287 117.475) (end 136.652 118.11) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 136.652 118.11) (end 136.652 120.396) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 136.5885 111.633) (end 136.5885 112.8395) (width 0.4) (layer Composant) (net 103) (status 810)) + (segment (start 136.5885 112.8395) (end 137.287 113.538) (width 0.4) (layer Composant) (net 103)) + (segment (start 81.28 140.843) (end 79.375 138.938) (width 0.4) (layer Composant) (net 103)) + (segment (start 79.375 138.938) (end 78.74 138.938) (width 0.4) (layer Composant) (net 103)) + (segment (start 78.74 138.938) (end 77.597 137.795) (width 0.4) (layer Composant) (net 103)) + (segment (start 77.597 137.795) (end 77.597 135.509) (width 0.4) (layer Composant) (net 103)) + (segment (start 77.597 135.509) (end 76.327 134.239) (width 0.4) (layer Composant) (net 103) (status 420)) + (segment (start 140.335 107.823) (end 140.335 104.4956) (width 0.4) (layer Composant) (net 103)) + (segment (start 141.3764 108.077) (end 141.351 108.077) (width 0.4) (layer Composant) (net 103)) + (segment (start 141.351 108.077) (end 141.097 107.823) (width 0.4) (layer Composant) (net 103)) + (segment (start 141.097 107.823) (end 140.335 107.823) (width 0.4) (layer Composant) (net 103)) + (segment (start 139.3952 108.1024) (end 139.3952 109.22) (width 0.254) (layer Composant) (net 103) (status 420)) + (segment (start 141.3764 109.22) (end 141.3764 108.077) (width 0.254) (layer Composant) (net 103) (status 810)) + (segment (start 140.335 107.823) (end 139.7 107.823) (width 0.4) (layer Composant) (net 103)) + (via (at 131.699 82.804) (size 0.8) (layers Composant Cuivre) (net 103)) + (via (at 209.677 98.69424) (size 0.8) (layers Composant Cuivre) (net 103)) + (segment (start 146.812 100.076) (end 146.812 103.886) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 146.7485 103.8225) (end 146.812 103.886) (width 0.4) (layer Composant) (net 103)) + (segment (start 145.288 103.8225) (end 146.7485 103.8225) (width 0.4) (layer Composant) (net 103)) + (segment (start 150.876 77.1525) (end 150.876 75.311) (width 0.4) (layer Composant) (net 103) (status 810)) + (segment (start 151.003 75.184) (end 151.003 72.898) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 150.876 75.311) (end 151.003 75.184) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 164.592 83.312) (end 168.529 87.249) (width 0.4) (layer Composant) (net 103) (status 430)) + (segment (start 164.592 83.2485) (end 164.592 83.312) (width 0.4) (layer Composant) (net 103) (status 830)) + (segment (start 108.077 89.027) (end 108.585 89.027) (width 0.4) (layer Composant) (net 103) (status 430)) + (segment (start 106.68 90.424) (end 108.077 89.027) (width 0.4) (layer Composant) (net 103) (status 20)) + (segment (start 106.68 91.313) (end 106.68 90.424) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 108.712 93.345) (end 106.68 91.313) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 112.522 93.345) (end 108.712 93.345) (width 0.4) (layer GND_layer) (net 103) (status 810)) + (segment (start 168.529 87.249) (end 165.989 87.249) (width 0.4) (layer GND_layer) (net 103) (status 810)) + (segment (start 194.691 83.185) (end 194.691 73.406) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 193.929 83.947) (end 194.691 83.185) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 193.2305 83.2485) (end 193.929 83.947) (width 0.4) (layer Composant) (net 103) (status 10)) + (segment (start 192.532 83.2485) (end 193.2305 83.2485) (width 0.4) (layer Composant) (net 103) (status 830)) + (segment (start 192.532 87.503) (end 189.23 90.805) (width 0.4) (layer Composant) (net 103) (status 420)) + (segment (start 192.532 83.2485) (end 192.532 87.503) (width 0.4) (layer Composant) (net 103) (status 810)) + (segment (start 105.664 74.676) (end 103.632 76.708) (width 0.4) (layer Composant) (net 103)) + (segment (start 105.664 72.898) (end 105.664 74.676) (width 0.4) (layer Composant) (net 103)) + (segment (start 104.9655 72.1995) (end 105.664 72.898) (width 0.4) (layer Composant) (net 103) (status 10)) + (segment (start 104.267 72.1995) (end 104.9655 72.1995) (width 0.4) (layer Composant) (net 103) (status 830)) + (segment (start 80.772 77.089) (end 85.979 77.089) (width 0.4) (layer Composant) (net 103) (status 810)) + (segment (start 106.48 82.931) (end 106.48 88.192) (width 0.4) (layer Composant) (net 103)) + (segment (start 107.242 82.169) (end 106.48 82.931) (width 0.4) (layer Composant) (net 103)) + (segment (start 108.712 82.169) (end 107.242 82.169) (width 0.4) (layer Composant) (net 103)) + (segment (start 177.2285 77.1525) (end 177.165 77.089) (width 0.4) (layer Composant) (net 103)) + (segment (start 178.562 77.1525) (end 177.2285 77.1525) (width 0.4) (layer Composant) (net 103) (status 810)) + (segment (start 123.571 99.695) (end 123.571 99.06) (width 0.4) (layer Composant) (net 103)) + (segment (start 124.587 100.711) (end 123.571 99.695) (width 0.4) (layer Composant) (net 103)) + (segment (start 140.208 95.123) (end 138.049 95.123) (width 0.4) (layer Composant) (net 103)) + (via (at 189.15634 116.5098) (size 0.8) (layers Composant Cuivre) (net 103)) + (segment (start 166.243 89.535) (end 168.529 87.249) (width 0.4) (layer Composant) (net 103) (status 420)) + (segment (start 166.243 90.932) (end 166.243 89.535) (width 0.4) (layer Composant) (net 103)) + (segment (start 159.4485 109.0295) (end 159.512 108.966) (width 0.4) (layer Composant) (net 103) (status 430)) + (segment (start 164.846 90.932) (end 166.243 90.932) (width 0.4) (layer Composant) (net 103) (status 810)) + (segment (start 135.763 102.997) (end 137.668 105.029) (width 0.4) (layer Composant) (net 103)) + (segment (start 135.763 102.997) (end 132.588 103.632) (width 0.4) (layer Composant) (net 103)) + (segment (start 129.3114 103.4542) (end 129.54 103.632) (width 0.254) (layer Composant) (net 103)) + (segment (start 127.635 103.4796) (end 129.3114 103.4542) (width 0.254) (layer Composant) (net 103) (status 810)) + (segment (start 139.7 107.823) (end 139.446 108.077) (width 0.4) (layer Composant) (net 103)) + (segment (start 139.446 108.077) (end 139.4206 108.077) (width 0.4) (layer Composant) (net 103)) + (segment (start 139.4206 108.077) (end 139.3952 108.1024) (width 0.4) (layer Composant) (net 103)) + (segment (start 137.668 95.504) (end 137.668 98.298) (width 0.4) (layer Composant) (net 103)) + (segment (start 137.668 98.298) (end 137.668 105.029) (width 0.4) (layer Composant) (net 103)) + (segment (start 131.699 82.804) (end 131.699 85.852) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 131.699 85.852) (end 131.699 87.122) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 161.163 68.58) (end 161.544 68.58) (width 0.4) (layer GND_layer) (net 103) (status 830)) + (segment (start 161.544 68.58) (end 162.814 67.31) (width 0.4) (layer GND_layer) (net 103) (status 10)) + (segment (start 162.814 67.31) (end 162.814 60.452) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 131.699 82.804) (end 130.048 84.455) (width 0.4) (layer Composant) (net 103)) + (segment (start 130.048 84.455) (end 128.8415 84.455) (width 0.4) (layer Composant) (net 103) (status 420)) + (segment (start 190.5 127.635) (end 198.247 127.635) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 198.3105 127.5715) (end 199.644 126.238) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 198.247 127.635) (end 198.3105 127.5715) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 189.15634 116.5098) (end 189.15634 126.29134) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 188.214 115.56746) (end 189.15634 116.5098) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 188.214 111.125) (end 188.214 115.56746) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 188.8363 110.5027) (end 188.214 111.125) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 189.43828 110.5027) (end 188.8363 110.5027) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 93.726 132.588) (end 100.965 139.827) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 86.741 132.588) (end 93.726 132.588) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 85.852 132.588) (end 82.423 129.159) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 82.423 129.159) (end 78.867 129.159) (width 0.4) (layer GND_layer) (net 103) (status 420)) + (segment (start 132.715 75.438) (end 132.715 81.788) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 132.715 81.788) (end 131.699 82.804) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 91.694 112.903) (end 89.408 112.903) (width 0.4) (layer Composant) (net 103) (status 810)) + (segment (start 89.408 112.903) (end 86.741 115.57) (width 0.4) (layer Composant) (net 103)) + (segment (start 104.267 69.088) (end 102.108 66.929) (width 0.4) (layer Composant) (net 103) (status 20)) + (segment (start 97.282 90.043) (end 91.694 90.043) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 164.846 90.932) (end 164.846 93.4085) (width 0.4) (layer Composant) (net 103) (status C30)) + (segment (start 147.32 115.697) (end 144.653 113.03) (width 0.4) (layer 3.3V_layer) (net 103)) + (segment (start 159.4485 105.537) (end 158.75 105.537) (width 0.4) (layer Composant) (net 103) (status 810)) + (segment (start 104.14 140.462) (end 105.537 141.859) (width 0.4) (layer Composant) (net 103) (status 10)) + (segment (start 130.1115 74.676) (end 130.937 75.5015) (width 0.4) (layer Composant) (net 103) (status 420)) + (segment (start 105.537 141.859) (end 110.744 141.859) (width 0.4) (layer Composant) (net 103)) + (segment (start 121.285 102.489) (end 121.285 101.346) (width 0.4) (layer Composant) (net 103) (status 420)) + (segment (start 121.158 102.616) (end 121.285 102.489) (width 0.4) (layer Composant) (net 103)) + (segment (start 86.741 132.588) (end 85.852 132.588) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 103.632 79.883) (end 105.156 81.407) (width 0.4) (layer Cuivre) (net 103)) + (segment (start 105.156 81.407) (end 110.744 81.407) (width 0.4) (layer Cuivre) (net 103)) + (segment (start 103.632 76.708) (end 103.632 79.883) (width 0.4) (layer Cuivre) (net 103)) + (segment (start 97.409 82.931) (end 89.281 82.931) (width 0.4) (layer Cuivre) (net 103) (status 20)) + (segment (start 89.281 82.931) (end 88.9 82.55) (width 0.4) (layer Cuivre) (net 103) (status 430)) + (segment (start 91.694 90.043) (end 88.9 92.837) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 88.9 92.837) (end 88.9 95.25) (width 0.4) (layer GND_layer) (net 103) (status 420)) + (segment (start 85.979 77.089) (end 88.9 80.01) (width 0.4) (layer Composant) (net 103)) + (segment (start 88.9 80.01) (end 88.9 82.55) (width 0.4) (layer Composant) (net 103) (status 420)) + (via (at 146.812 103.886) (size 0.8) (layers Composant Cuivre) (net 103)) + (via (at 146.812 100.076) (size 0.8) (layers Composant Cuivre) (net 103)) + (via (at 150.876 75.311) (size 0.8) (layers Composant Cuivre) (net 103)) + (via (at 163.068 75.311) (size 0.8) (layers Composant Cuivre) (net 103)) + (via (at 106.68 90.424) (size 0.8) (layers Composant Cuivre) (net 103)) + (via (at 132.715 75.438) (size 0.8) (layers Composant Cuivre) (net 103)) + (via (at 86.741 132.588) (size 0.8) (layers Composant Cuivre) (net 103)) + (via (at 100.965 139.827) (size 0.8) (layers Composant Cuivre) (net 103)) + (via (at 117.729 75.184) (size 0.8) (layers Composant Cuivre) (net 103)) + (via (at 103.632 76.708) (size 0.8) (layers Composant Cuivre) (net 103)) + (via (at 97.282 90.043) (size 0.8) (layers Composant Cuivre) (net 103)) + (via (at 152.4 115.57) (size 0.8) (layers Composant Cuivre) (net 103)) + (via (at 159.512 115.697) (size 0.8) (layers Composant Cuivre) (net 103)) + (via (at 103.378 112.522) (size 0.8) (layers Composant Cuivre) (net 103)) + (via (at 193.929 83.947) (size 0.8) (layers Composant Cuivre) (net 103)) + (via (at 194.691 73.406) (size 0.8) (layers Composant Cuivre) (net 103)) + (via (at 123.571 99.06) (size 0.8) (layers Composant Cuivre) (net 103)) + (via (at 121.158 102.616) (size 0.8) (layers Composant Cuivre) (net 103)) + (via (at 129.032 89.789) (size 0.8) (layers Composant Cuivre) (net 103)) + (segment (start 163.068 74.676) (end 161.29 74.676) (width 0.4) (layer Composant) (net 103) (status 420)) + (segment (start 115.951 141.859) (end 118.364 139.446) (width 0.4) (layer Composant) (net 103) (status 420)) + (segment (start 101.6 110.744) (end 101.6 98.933) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 86.741 125.349) (end 86.741 129.54) (width 0.4) (layer Composant) (net 103) (status C30)) + (segment (start 163.068 75.311) (end 163.068 74.676) (width 0.4) (layer Composant) (net 103)) + (segment (start 165.989 115.697) (end 168.529 113.157) (width 0.4) (layer 3.3V_layer) (net 103) (status 420)) + (segment (start 159.512 115.697) (end 165.989 115.697) (width 0.4) (layer 3.3V_layer) (net 103)) + (segment (start 165.9255 75.1205) (end 164.592 75.1205) (width 0.4) (layer Composant) (net 103) (status 420)) + (segment (start 146.812 103.886) (end 145.3515 103.886) (width 0.4) (layer Cuivre) (net 103) (status 20)) + (segment (start 110.109 83.82) (end 111.252 83.82) (width 0.4) (layer Composant) (net 103)) + (segment (start 166.624 74.422) (end 165.9255 75.1205) (width 0.4) (layer Composant) (net 103)) + (segment (start 166.624 71.247) (end 166.624 74.422) (width 0.4) (layer Composant) (net 103)) + (segment (start 163.957 68.58) (end 166.624 71.247) (width 0.4) (layer Composant) (net 103)) + (segment (start 161.163 68.58) (end 163.957 68.58) (width 0.4) (layer Composant) (net 103) (status 810)) + (segment (start 145.415 100.2665) (end 146.6215 100.2665) (width 0.4) (layer Cuivre) (net 103) (status 810)) + (segment (start 111.252 83.82) (end 110.744 83.312) (width 0.4) (layer Cuivre) (net 103)) + (segment (start 131.8768 109.22) (end 131.8768 110.4392) (width 0.254) (layer Composant) (net 103) (status 810)) + (segment (start 140.3858 91.3257) (end 140.6525 91.059) (width 0.4) (layer Composant) (net 103) (status 430)) + (segment (start 140.3858 93.726) (end 140.3858 91.3257) (width 0.254) (layer Composant) (net 103) (status 830)) + (segment (start 110.744 78.486) (end 111.887 77.343) (width 0.4) (layer Cuivre) (net 103) (status 10)) + (segment (start 110.744 78.613) (end 110.744 78.486) (width 0.4) (layer Cuivre) (net 103) (status 830)) + (segment (start 74.422 120.015) (end 74.422 130.429) (width 0.4) (layer Composant) (net 103)) + (segment (start 105.156 95.377) (end 105.156 91.948) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 152.273 115.697) (end 147.32 115.697) (width 0.4) (layer 3.3V_layer) (net 103)) + (segment (start 75.438 118.999) (end 74.422 120.015) (width 0.4) (layer Composant) (net 103)) + (segment (start 76.327 118.999) (end 75.438 118.999) (width 0.4) (layer Composant) (net 103) (status 810)) + (segment (start 103.5685 112.3315) (end 103.378 112.522) (width 0.4) (layer Composant) (net 103)) + (segment (start 126.746 103.4796) (end 127.635 103.4796) (width 0.254) (layer Composant) (net 103) (status 420)) + (segment (start 191.15278 96.90608) (end 190.69304 97.36582) (width 0.4) (layer Cuivre) (net 103)) + (segment (start 189.23 94.9833) (end 191.15278 96.90608) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 189.23 90.805) (end 189.23 94.9833) (width 0.4) (layer GND_layer) (net 103) (status 810)) + (via (at 191.15278 96.90608) (size 0.8) (layers Composant Cuivre) (net 103)) + (segment (start 81.28 140.97) (end 81.28 140.843) (width 0.4) (layer Composant) (net 103)) + (segment (start 89.535 140.97) (end 81.28 140.97) (width 0.4) (layer Composant) (net 103) (status 810)) + (segment (start 86.741 121.158) (end 86.741 125.349) (width 0.4) (layer Composant) (net 103) (status C30)) + (segment (start 159.4485 114.046) (end 159.4485 111.252) (width 0.4) (layer Composant) (net 103) (status C30)) + (segment (start 159.4485 111.252) (end 159.4485 109.0295) (width 0.4) (layer Composant) (net 103) (status 830)) + (segment (start 199.1741 124.27204) (end 199.1741 122.7455) (width 0.254) (layer Composant) (net 103) (status 420)) + (segment (start 213.97468 110.5027) (end 213.97468 111.506) (width 0.254) (layer Composant) (net 103)) + (via (at 133.731 89.535) (size 0.8) (layers Composant Cuivre) (net 103)) + (via (at 141.605 89.027) (size 0.8) (layers Composant Cuivre) (net 103)) + (segment (start 129.54 103.632) (end 132.588 103.632) (width 0.4) (layer Composant) (net 103)) + (via (at 136.652 120.396) (size 0.8) (layers Composant Cuivre) (net 103)) + (via (at 137.287 113.538) (size 0.8) (layers Composant Cuivre) (net 103)) + (via (at 142.24 108.839) (size 0.8) (layers Composant Cuivre) (net 103)) + (segment (start 126.746 103.505) (end 126.746 103.4796) (width 0.254) (layer Composant) (net 103)) + (segment (start 126.619 103.632) (end 126.746 103.505) (width 0.4) (layer Composant) (net 103)) + (segment (start 126.619 104.394) (end 126.619 103.632) (width 0.4) (layer Composant) (net 103)) + (segment (start 126.492 104.521) (end 126.619 104.394) (width 0.4) (layer Composant) (net 103)) + (segment (start 124.587 104.521) (end 126.492 104.521) (width 0.254) (layer Composant) (net 103)) + (segment (start 211.45754 107.5055) (end 214.45474 110.5027) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 104.14 139.827) (end 100.965 139.827) (width 0.4) (layer Composant) (net 103) (status 810)) + (segment (start 133.731 91.2495) (end 133.5405 91.44) (width 0.4) (layer Composant) (net 103) (status 430)) + (segment (start 133.731 89.535) (end 133.731 91.2495) (width 0.4) (layer Composant) (net 103) (status 20)) + (segment (start 111.887 77.343) (end 115.57 77.343) (width 0.4) (layer Cuivre) (net 103)) + (segment (start 117.729 75.184) (end 115.57 77.343) (width 0.4) (layer Cuivre) (net 103)) + (segment (start 117.602 75.311) (end 117.729 75.184) (width 0.4) (layer Composant) (net 103)) + (segment (start 117.602 77.1525) (end 117.602 75.311) (width 0.4) (layer Composant) (net 103) (status 810)) + (segment (start 163.957 75.311) (end 164.592 75.1205) (width 0.4) (layer Composant) (net 103) (status 430)) + (segment (start 163.068 75.311) (end 163.957 75.311) (width 0.4) (layer Composant) (net 103) (status 20)) + (segment (start 212.9155 110.5027) (end 213.97468 110.5027) (width 0.254) (layer Composant) (net 103) (status 810)) + (via (at 194.6783 99.25304) (size 0.8) (layers Composant Cuivre) (net 103)) + (segment (start 192.33134 96.90608) (end 191.15278 96.90608) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 192.33134 96.90608) (end 194.6783 99.25304) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 194.6783 100.7745) (end 194.6783 99.25304) (width 0.254) (layer Composant) (net 103) (status 810)) + (segment (start 204.6859 100.7745) (end 204.6859 99.71532) (width 0.254) (layer Composant) (net 103) (status 810)) + (segment (start 202.6793 100.7745) (end 202.6793 99.71532) (width 0.254) (layer Composant) (net 103) (status 810)) + (segment (start 212.68182 76.835) (end 213.741 76.835) (width 0.4) (layer Composant) (net 103) (status 420)) + (segment (start 138.049 95.123) (end 137.668 95.504) (width 0.4) (layer Composant) (net 103)) + (segment (start 212.68182 76.69276) (end 212.68182 76.835) (width 0.4) (layer Composant) (net 103)) + (segment (start 212.23732 76.24826) (end 212.68182 76.69276) (width 0.4) (layer Composant) (net 103)) + (via (at 212.23732 76.24826) (size 0.8) (layers Composant Cuivre) (net 103)) + (segment (start 212.19414 76.29144) (end 212.23732 76.24826) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 212.19414 80.645) (end 212.19414 76.29144) (width 0.4) (layer GND_layer) (net 103)) + (via (at 212.19414 80.645) (size 0.8) (layers Composant Cuivre) (net 103)) + (segment (start 213.741 80.645) (end 212.19414 80.645) (width 0.4) (layer Composant) (net 103) (status 810)) + (segment (start 103.5685 111.252) (end 103.5685 112.3315) (width 0.4) (layer Composant) (net 103) (status 810)) + (segment (start 132.6515 75.5015) (end 130.937 75.5015) (width 0.4) (layer Composant) (net 103) (status 420)) + (segment (start 132.715 75.438) (end 132.6515 75.5015) (width 0.4) (layer Composant) (net 103)) + (segment (start 162.941 75.438) (end 163.068 75.311) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 162.941 84.201) (end 162.941 75.438) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 165.989 87.249) (end 162.941 84.201) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 203.454 98.67392) (end 203.454 99.8855) (width 0.4) (layer Cuivre) (net 103) (status 420)) + (segment (start 209.27568 111.53648) (end 209.27568 111.4425) (width 0.4) (layer Cuivre) (net 103)) + (via (at 144.653 113.03) (size 0.8) (layers Composant Cuivre) (net 103)) + (via (at 177.165 77.089) (size 0.8) (layers Composant Cuivre) (net 103)) + (via (at 209.16646 124.26442) (size 0.8) (layers Composant Cuivre) (net 103)) + (via (at 199.1741 124.27204) (size 0.8) (layers Composant Cuivre) (net 103)) + (via (at 203.454 98.67392) (size 0.8) (layers Composant Cuivre) (net 103)) + (segment (start 109.4105 82.8675) (end 108.712 82.169) (width 0.4) (layer Composant) (net 103)) + (segment (start 190.5 97.36582) (end 190.5 98.1075) (width 0.4) (layer Cuivre) (net 103) (status 420)) + (segment (start 190.69304 97.36582) (end 190.5 97.36582) (width 0.4) (layer Cuivre) (net 103)) + (segment (start 86.741 132.588) (end 86.741 129.54) (width 0.4) (layer Composant) (net 103) (status 420)) + (segment (start 134.366 93.726) (end 134.3914 94.9452) (width 0.254) (layer Composant) (net 103) (status 810)) + (segment (start 176.276 124.841) (end 168.656 124.841) (width 0.4) (layer Composant) (net 103) (status C30)) + (segment (start 136.652 118.6815) (end 136.652 120.396) (width 0.4) (layer Composant) (net 103) (status 810)) + (segment (start 136.652 120.396) (end 136.652 122.1105) (width 0.4) (layer Composant) (net 103) (status 420)) + (segment (start 138.938 104.4956) (end 140.335 104.4956) (width 0.4) (layer Composant) (net 103)) + (segment (start 138.938 104.4956) (end 137.668 105.029) (width 0.4) (layer Composant) (net 103)) + (segment (start 140.335 104.4956) (end 143.129 104.4702) (width 0.4) (layer Composant) (net 103) (status 420)) + (segment (start 182.8165 125.73) (end 177.165 125.73) (width 0.4) (layer Composant) (net 103) (status 810)) + (segment (start 177.165 125.73) (end 176.276 124.841) (width 0.4) (layer Composant) (net 103) (status 420)) + (segment (start 182.8165 125.73) (end 182.8165 127.9525) (width 0.4) (layer Composant) (net 103) (status 810)) + (segment (start 189.43828 110.5027) (end 190.0555 109.88548) (width 0.4) (layer Cuivre) (net 103)) + (via (at 189.43828 110.5027) (size 0.8) (layers Composant Cuivre) (net 103)) + (segment (start 189.43828 110.5027) (end 190.9445 110.5027) (width 0.254) (layer Composant) (net 103) (status 420)) + (segment (start 204.36332 124.3965) (end 204.14234 124.61748) (width 0.4) (layer Cuivre) (net 103)) + (segment (start 204.14234 124.61748) (end 203.79436 124.61748) (width 0.4) (layer Cuivre) (net 103)) + (segment (start 204.36332 124.3965) (end 205.359 124.3965) (width 0.4) (layer Cuivre) (net 103) (status 420)) + (via (at 203.79436 124.61748) (size 0.8) (layers Composant Cuivre) (net 103)) + (segment (start 203.79436 124.61748) (end 203.79436 125.64364) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 203.79436 125.64364) (end 203.2 126.238) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 203.2 126.238) (end 199.644 126.238) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 199.1741 124.27204) (end 199.1741 125.7681) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 199.644 126.238) (end 199.1741 125.7681) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 197.485 124.3965) (end 198.48068 124.3965) (width 0.4) (layer Cuivre) (net 103) (status 810)) + (segment (start 199.1741 124.27204) (end 198.60514 124.27204) (width 0.4) (layer Cuivre) (net 103)) + (segment (start 198.60514 124.27204) (end 198.48068 124.3965) (width 0.4) (layer Cuivre) (net 103)) + (segment (start 200.42632 124.3965) (end 200.30186 124.27204) (width 0.4) (layer Cuivre) (net 103)) + (segment (start 200.30186 124.27204) (end 199.1741 124.27204) (width 0.4) (layer Cuivre) (net 103)) + (segment (start 201.422 124.3965) (end 200.42632 124.3965) (width 0.4) (layer Cuivre) (net 103) (status 810)) + (segment (start 209.74812 112.00892) (end 209.27568 111.53648) (width 0.4) (layer Cuivre) (net 103)) + (segment (start 214.45474 110.5027) (end 212.94852 112.00892) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 208.28 120.3325) (end 208.28 123.37796) (width 0.4) (layer Cuivre) (net 103) (status 810)) + (segment (start 209.74812 112.00892) (end 212.94852 112.00892) (width 0.4) (layer GND_layer) (net 103)) + (via (at 209.74812 112.00892) (size 0.8) (layers Composant Cuivre) (net 103)) + (segment (start 209.27568 111.4425) (end 208.28 111.4425) (width 0.4) (layer Cuivre) (net 103) (status 420)) + (segment (start 128.9685 89.8525) (end 129.032 89.789) (width 0.4) (layer Composant) (net 103)) + (segment (start 131.699 87.122) (end 129.032 89.789) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 129.3876 93.726) (end 129.8702 93.726) (width 0.254) (layer Composant) (net 103) (status C30)) + (segment (start 123.6345 103.505) (end 123.19 103.505) (width 0.4) (layer Composant) (net 103) (status 830)) + (segment (start 123.19 103.505) (end 122.301 102.616) (width 0.4) (layer Composant) (net 103) (status 10)) + (segment (start 122.301 102.616) (end 121.158 102.616) (width 0.4) (layer Composant) (net 103)) + (segment (start 151.003 72.898) (end 133.604 72.898) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 133.604 72.898) (end 132.715 73.787) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 132.715 73.787) (end 132.715 75.438) (width 0.4) (layer GND_layer) (net 103)) + (segment (start 137.3886 109.22) (end 137.3886 110.7694) (width 0.2) (layer Composant) (net 103) (status 810)) + (segment (start 182.8165 127.9525) (end 183.134 128.27) (width 0.4) (layer Composant) (net 103)) + (segment (start 183.134 133.604) (end 181.864 134.874) (width 0.4) (layer Composant) (net 103)) + (segment (start 181.864 134.874) (end 181.864 136.906) (width 0.4) (layer Composant) (net 103) (status 420)) + (segment (start 168.529 113.157) (end 176.149 113.157) (width 0.4) (layer Composant) (net 103) (status C30)) + (segment (start 74.422 130.429) (end 74.422 133.477) (width 0.4) (layer Composant) (net 103)) + (segment (start 74.422 133.477) (end 75.184 134.239) (width 0.4) (layer Composant) (net 103)) + (segment (start 75.184 134.239) (end 76.327 134.239) (width 0.4) (layer Composant) (net 103) (status 420)) + (segment (start 76.327 108.839) (end 76.327 111.379) (width 0.4) (layer Cuivre) (net 103) (status C30)) + (segment (start 112.522 93.345) (end 112.522 95.885) (width 0.4) (layer GND_layer) (net 103) (status C30)) + (segment (start 112.522 95.885) (end 112.522 98.425) (width 0.4) (layer GND_layer) (net 103) (status C30)) + (segment (start 137.3886 110.7694) (end 136.5885 111.633) (width 0.4) (layer Composant) (net 103) (status 420)) + (segment (start 134.366 93.726) (end 134.366 92.2655) (width 0.254) (layer Composant) (net 103) (status 810)) + (segment (start 134.366 92.2655) (end 133.5405 91.44) (width 0.4) (layer Composant) (net 103) (status 420)) + (segment (start 125.349 100.7745) (end 124.587 100.711) (width 0.4) (layer Composant) (net 103) (status 810)) + (segment (start 106.48 88.192) (end 107.315 89.027) (width 0.4) (layer Composant) (net 103)) + (segment (start 107.315 89.027) (end 108.585 89.027) (width 0.4) (layer Composant) (net 103) (status 420)) + (segment (start 167.132 99.187) (end 168.529 97.79) (width 0.4318) (layer Cuivre) (net 104) (status 420)) + (segment (start 166.751 105.791) (end 167.132 105.41) (width 0.254) (layer Cuivre) (net 104)) + (segment (start 166.751 106.934) (end 166.751 105.791) (width 0.4318) (layer Composant) (net 104)) + (segment (start 167.132 105.41) (end 167.132 99.187) (width 0.4318) (layer Cuivre) (net 104)) + (segment (start 176.149 97.79) (end 168.529 97.79) (width 0.762) (layer Composant) (net 104) (status C30)) + (segment (start 163.957 109.728) (end 166.751 106.934) (width 0.4318) (layer Composant) (net 104)) + (segment (start 163.957 111.3155) (end 163.957 109.728) (width 0.4318) (layer Composant) (net 104) (status 810)) + (via (at 166.751 105.791) (size 0.889) (layers Composant Cuivre) (net 104)) + (segment (start 85.217 115.57) (end 87.63 115.57) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 89.789 113.411) (end 89.789 111.379) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 87.63 115.57) (end 89.789 113.411) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 132.3848 110.4138) (end 132.9055 110.9345) (width 0.254) (layer Composant) (net 105)) + (segment (start 132.9055 110.9345) (end 132.9055 112.268) (width 0.5588) (layer Composant) (net 105) (status 420)) + (segment (start 192.5955 122.7455) (end 192.33388 123.00712) (width 0.5588) (layer Composant) (net 105)) + (segment (start 192.33388 123.00712) (end 192.33388 123.84532) (width 0.5588) (layer Composant) (net 105)) + (segment (start 193.1797 122.7455) (end 192.5955 122.7455) (width 0.254) (layer Composant) (net 105) (status 810)) + (segment (start 133.096 90.551) (end 132.461 89.916) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 132.461 89.916) (end 130.937 89.916) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 132.3848 109.22) (end 132.3848 110.4138) (width 0.254) (layer Composant) (net 105) (status 810)) + (segment (start 183.66232 123.84532) (end 178.689 118.872) (width 0.5588) (layer 3.3V_layer) (net 105)) + (via (at 178.689 118.872) (size 1.143) (layers Composant Cuivre) (net 105)) + (segment (start 192.33388 123.84532) (end 183.66232 123.84532) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 194.691 128.397) (end 200.914 134.62) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 200.914 134.62) (end 207.01 134.62) (width 0.5588) (layer 3.3V_layer) (net 105) (status 420)) + (segment (start 194.691 125.222) (end 194.691 128.397) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 212.51926 102.56774) (end 212.598 102.64648) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 212.598 102.64648) (end 212.598 104.648) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 212.598 104.648) (end 211.582 105.664) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 211.582 105.664) (end 206.83474 105.664) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 211.41436 102.56774) (end 212.51926 102.56774) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 206.83474 105.664) (end 206.83474 109.98708) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 206.83474 105.10774) (end 206.83474 105.664) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 204.724 102.997) (end 206.83474 105.10774) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 202.48118 102.997) (end 204.724 102.997) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 194.818 125.222) (end 198.9709 121.0691) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 198.9709 121.0691) (end 200.56348 121.0691) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 194.691 125.222) (end 194.818 125.222) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 192.33388 125.02388) (end 192.532 125.222) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 192.532 125.222) (end 194.691 125.222) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 192.33388 123.84532) (end 192.33388 125.02388) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 193.675 109.855) (end 195.072 109.855) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 193.167 70.866) (end 205.359 70.866) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 205.359 70.866) (end 211.12226 65.10274) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 211.12226 65.10274) (end 218.44 65.10274) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 191.008 73.025) (end 193.167 70.866) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 85.09 118.237) (end 83.82 116.967) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 85.09 119.126) (end 85.09 118.237) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 194.691 124.206) (end 194.691 125.222) (width 0.5588) (layer Cuivre) (net 105)) + (segment (start 196.4055 122.4915) (end 194.691 124.206) (width 0.5588) (layer Cuivre) (net 105)) + (segment (start 197.485 122.4915) (end 196.4055 122.4915) (width 0.5588) (layer Cuivre) (net 105) (status 810)) + (via (at 191.008 73.025) (size 1.143) (layers Composant Cuivre) (net 105)) + (via (at 97.155 87.757) (size 1.143) (layers Composant Cuivre) (net 105)) + (via (at 107.95 114.173) (size 1.143) (layers Composant Cuivre) (net 105)) + (via (at 146.05 74.676) (size 1.143) (layers Composant Cuivre) (net 105)) + (via (at 164.592 71.247) (size 1.143) (layers Composant Cuivre) (net 105)) + (via (at 162.306 106.807) (size 1.143) (layers Composant Cuivre) (net 105)) + (via (at 163.449 100.33) (size 1.143) (layers Composant Cuivre) (net 105)) + (via (at 107.823 83.185) (size 1.143) (layers Composant Cuivre) (net 105)) + (via (at 100.838 113.03) (size 1.143) (layers Composant Cuivre) (net 105)) + (via (at 97.409 112.141) (size 1.143) (layers Composant Cuivre) (net 105)) + (via (at 131.572 71.247) (size 1.143) (layers Composant Cuivre) (net 105)) + (via (at 193.675 109.855) (size 1.143) (layers Composant Cuivre) (net 105)) + (via (at 130.937 89.916) (size 1.143) (layers Composant Cuivre) (net 105)) + (via (at 157.734 97.536) (size 1.143) (layers Composant Cuivre) (net 105)) + (via (at 121.666 98.425) (size 1.143) (layers Composant Cuivre) (net 105)) + (via (at 133.985 104.267) (size 0.635) (layers Composant Cuivre) (net 105)) + (via (at 168.275 115.062) (size 1.143) (layers Composant Cuivre) (net 105)) + (via (at 85.09 119.126) (size 1.143) (layers Composant Cuivre) (net 105)) + (via (at 138.8 113.2) (size 1.143) (layers Composant Cuivre) (net 105)) + (via (at 146.812 105.41) (size 1.143) (layers Composant Cuivre) (net 105)) + (via (at 161.163 92.329) (size 1.143) (layers Composant Cuivre) (net 105)) + (via (at 131.699 102.87) (size 0.635) (layers Composant Cuivre) (net 105)) + (via (at 146.812 98.679) (size 1.143) (layers Composant Cuivre) (net 105)) + (via (at 194.691 125.222) (size 1.143) (layers Composant Cuivre) (net 105)) + (via (at 211.41436 102.56774) (size 1.143) (layers Composant Cuivre) (net 105)) + (via (at 199.009 102.97668) (size 1.143) (layers Composant Cuivre) (net 105)) + (via (at 192.46088 113.5126) (size 1.143) (layers Composant Cuivre) (net 105)) + (via (at 209.73288 118.09476) (size 1.143) (layers Composant Cuivre) (net 105)) + (segment (start 191.262 86.233) (end 189.23 88.265) (width 0.5588) (layer 3.3V_layer) (net 105) (status 420)) + (segment (start 191.262 73.279) (end 191.262 86.233) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 191.008 73.025) (end 191.262 73.279) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 191.1985 73.2155) (end 191.008 73.025) (width 0.5588) (layer Composant) (net 105)) + (segment (start 192.532 73.2155) (end 191.1985 73.2155) (width 0.5588) (layer Composant) (net 105) (status 810)) + (segment (start 98.7425 87.757) (end 97.155 87.757) (width 0.5588) (layer Composant) (net 105) (status 810)) + (segment (start 102.235 114.173) (end 107.95 114.173) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 101.092 113.03) (end 102.235 114.173) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 100.838 113.03) (end 101.092 113.03) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 107.95 134.112) (end 110.744 136.906) (width 0.5588) (layer 3.3V_layer) (net 105) (status 420)) + (segment (start 107.95 114.173) (end 107.95 134.112) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 143.002 71.628) (end 146.05 74.676) (width 0.5588) (layer Composant) (net 105)) + (segment (start 134.747 71.628) (end 143.002 71.628) (width 0.5588) (layer Composant) (net 105)) + (segment (start 132.7785 73.5965) (end 134.747 71.628) (width 0.5588) (layer Composant) (net 105)) + (segment (start 130.937 73.5965) (end 132.7785 73.5965) (width 0.5588) (layer Composant) (net 105) (status 810)) + (segment (start 150.114 70.612) (end 146.05 74.676) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 152.908 70.612) (end 150.114 70.612) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 155.321 73.025) (end 152.908 70.612) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 162.814 73.025) (end 155.321 73.025) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 164.592 71.247) (end 162.814 73.025) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 164.846 70.993) (end 164.592 71.247) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 182.753 70.993) (end 164.846 70.993) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 184.785 73.025) (end 182.753 70.993) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 191.008 73.025) (end 184.785 73.025) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 179.07 130.302) (end 181.864 130.302) (width 0.5588) (layer 3.3V_layer) (net 105) (status 420)) + (segment (start 172.085 123.317) (end 179.07 130.302) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 172.085 105.283) (end 172.085 123.317) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 169.672 102.87) (end 172.085 105.283) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 168.529 102.87) (end 169.672 102.87) (width 0.5588) (layer 3.3V_layer) (net 105) (status 810)) + (segment (start 161.544 106.807) (end 162.306 106.807) (width 0.5588) (layer Composant) (net 105)) + (segment (start 166.243 102.87) (end 168.529 102.87) (width 0.5588) (layer 3.3V_layer) (net 105) (status 420)) + (segment (start 162.306 106.807) (end 166.243 102.87) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 162.306 101.473) (end 162.306 106.807) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 163.449 100.33) (end 162.306 101.473) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 161.3535 104.7115) (end 161.036 104.394) (width 0.5588) (layer Composant) (net 105)) + (segment (start 161.3535 105.537) (end 161.3535 104.7115) (width 0.5588) (layer Composant) (net 105) (status 810)) + (segment (start 104.648 87.757) (end 97.155 87.757) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 106.553 85.852) (end 104.648 87.757) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 106.553 84.455) (end 106.553 85.852) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 107.823 83.185) (end 106.553 84.455) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 107.5055 83.5025) (end 107.823 83.185) (width 0.5588) (layer Composant) (net 105)) + (segment (start 107.5055 84.328) (end 107.5055 83.5025) (width 0.5588) (layer Composant) (net 105) (status 810)) + (segment (start 162.2425 72.4535) (end 161.29 73.406) (width 0.5588) (layer Composant) (net 105) (status 420)) + (segment (start 162.2425 71.247) (end 162.2425 72.4535) (width 0.5588) (layer Composant) (net 105) (status 810)) + (segment (start 164.592 71.247) (end 164.592 73.2155) (width 0.5588) (layer Composant) (net 105) (status 420)) + (segment (start 74.7014 96.2914) (end 74.7014 93.091) (width 0.5588) (layer Composant) (net 105) (status 420)) + (segment (start 78.74 100.33) (end 88.9 100.33) (width 0.5588) (layer Composant) (net 105) (status 420)) + (segment (start 78.74 100.33) (end 74.7014 96.2914) (width 0.5588) (layer Composant) (net 105)) + (segment (start 74.7014 93.091) (end 76.4032 93.091) (width 0.5588) (layer Composant) (net 105) (status C30)) + (segment (start 107.696 133.858) (end 110.744 136.906) (width 0.5588) (layer Composant) (net 105) (status 420)) + (segment (start 106.3625 133.858) (end 107.696 133.858) (width 0.5588) (layer Composant) (net 105) (status 810)) + (segment (start 74.549 136.779) (end 76.327 136.779) (width 0.5588) (layer 3.3V_layer) (net 105) (status 420)) + (segment (start 73.914 136.144) (end 74.549 136.779) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 73.914 117.475) (end 73.914 136.144) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 74.93 116.459) (end 73.914 117.475) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 76.327 116.459) (end 74.93 116.459) (width 0.5588) (layer 3.3V_layer) (net 105) (status 810)) + (segment (start 162.814 126.4285) (end 165.354 126.4285) (width 0.5588) (layer Composant) (net 105) (status C30)) + (segment (start 160.274 126.4285) (end 162.814 126.4285) (width 0.5588) (layer Composant) (net 105) (status C30)) + (segment (start 190.1825 72.4535) (end 189.23 73.406) (width 0.5588) (layer Composant) (net 105) (status 420)) + (segment (start 190.1825 71.247) (end 190.1825 72.4535) (width 0.5588) (layer Composant) (net 105) (status 810)) + (segment (start 99.949 112.141) (end 100.838 113.03) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 97.409 112.141) (end 99.949 112.141) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 164.592 71.247) (end 162.2425 71.247) (width 0.5588) (layer Composant) (net 105) (status 420)) + (segment (start 192.532 71.247) (end 190.1825 71.247) (width 0.5588) (layer Composant) (net 105) (status 420)) + (segment (start 192.532 73.2155) (end 192.532 71.247) (width 0.5588) (layer Composant) (net 105) (status 810)) + (segment (start 129.2225 72.4535) (end 128.27 73.406) (width 0.5588) (layer Composant) (net 105) (status 420)) + (segment (start 129.2225 71.247) (end 129.2225 72.4535) (width 0.5588) (layer Composant) (net 105) (status 810)) + (segment (start 157.734 126.4285) (end 160.274 126.4285) (width 0.5588) (layer Composant) (net 105) (status C30)) + (segment (start 131.572 72.644) (end 130.937 73.5965) (width 0.5588) (layer Composant) (net 105) (status 420)) + (segment (start 131.572 71.247) (end 131.572 72.644) (width 0.5588) (layer Composant) (net 105)) + (segment (start 107.569 87.757) (end 108.585 87.757) (width 0.5588) (layer Composant) (net 105) (status 420)) + (segment (start 107.5055 87.6935) (end 107.569 87.757) (width 0.5588) (layer Composant) (net 105)) + (segment (start 131.572 77.343) (end 131.572 71.247) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 126.619 82.296) (end 131.572 77.343) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 108.712 82.296) (end 126.619 82.296) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 107.823 83.185) (end 108.712 82.296) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 107.5055 87.6) (end 107.5055 87.6935) (width 0.4) (layer Composant) (net 105) (tstamp 53D8E6D4) (status 810)) + (segment (start 169.2275 130.302) (end 165.354 126.4285) (width 0.5588) (layer Composant) (net 105) (status 420)) + (segment (start 181.864 130.302) (end 169.2275 130.302) (width 0.5588) (layer Composant) (net 105) (status 810)) + (segment (start 131.572 71.247) (end 129.2225 71.247) (width 0.5588) (layer Composant) (net 105) (status 420)) + (segment (start 168.529 102.87) (end 176.149 102.87) (width 0.5588) (layer Composant) (net 105) (status C30)) + (segment (start 101.6635 111.252) (end 101.6635 113.03) (width 0.5588) (layer Composant) (net 105) (status 810)) + (segment (start 97.4725 112.0775) (end 97.4725 110.236) (width 0.5588) (layer Composant) (net 105) (status 420)) + (segment (start 97.409 112.141) (end 97.4725 112.0775) (width 0.5588) (layer Composant) (net 105)) + (segment (start 101.6635 113.03) (end 100.838 113.03) (width 0.5588) (layer Composant) (net 105)) + (segment (start 164.846 98.933) (end 163.449 100.33) (width 0.5588) (layer Composant) (net 105) (status 10)) + (segment (start 164.846 98.806) (end 164.846 98.933) (width 0.5588) (layer Composant) (net 105) (status 830)) + (segment (start 101.854 113.792) (end 102.743 113.792) (width 0.5588) (layer Composant) (net 105) (status 420)) + (segment (start 101.6635 113.6015) (end 101.854 113.792) (width 0.5588) (layer Composant) (net 105)) + (segment (start 101.6635 113.03) (end 101.6635 113.6015) (width 0.5588) (layer Composant) (net 105)) + (segment (start 186.817 90.678) (end 189.23 88.265) (width 0.5588) (layer 3.3V_layer) (net 105) (status 420)) + (segment (start 185.547 90.678) (end 186.817 90.678) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 183.769 93.218) (end 185.547 90.678) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 183.769 101.854) (end 183.769 93.218) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 177.927 101.854) (end 183.769 101.854) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 176.911 102.87) (end 177.927 101.854) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 176.149 102.87) (end 176.911 102.87) (width 0.5588) (layer 3.3V_layer) (net 105) (status 810)) + (segment (start 146.4945 98.3615) (end 146.812 98.679) (width 0.5588) (layer Cuivre) (net 105)) + (segment (start 145.415 98.3615) (end 146.4945 98.3615) (width 0.5588) (layer Cuivre) (net 105) (status 810)) + (segment (start 145.6055 105.41) (end 145.288 105.7275) (width 0.5588) (layer Cuivre) (net 105) (status 430)) + (segment (start 146.812 105.41) (end 145.6055 105.41) (width 0.5588) (layer Cuivre) (net 105) (status 20)) + (segment (start 130.937 91.3765) (end 130.8735 91.44) (width 0.5588) (layer Cuivre) (net 105) (status 430)) + (segment (start 130.937 89.916) (end 130.937 91.3765) (width 0.5588) (layer Cuivre) (net 105) (status 20)) + (segment (start 108.585 109.855) (end 112.522 109.855) (width 0.5588) (layer Composant) (net 105) (status 420)) + (segment (start 108.0135 110.4265) (end 108.585 109.855) (width 0.5588) (layer Composant) (net 105)) + (segment (start 108.0135 114.1095) (end 108.0135 110.4265) (width 0.5588) (layer Composant) (net 105)) + (segment (start 107.95 114.173) (end 108.0135 114.1095) (width 0.5588) (layer Composant) (net 105)) + (segment (start 130.8735 89.916) (end 130.937 89.916) (width 0.5588) (layer Composant) (net 105)) + (segment (start 133.096 90.551) (end 138.2 90.551) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 130.8862 93.726) (end 130.3782 93.726) (width 0.254) (layer Composant) (net 105) (status C30)) + (segment (start 123.444 97.282) (end 121.0945 97.282) (width 0.5588) (layer Composant) (net 105) (status 420)) + (segment (start 125.17374 99.01174) (end 123.444 97.282) (width 0.5588) (layer Composant) (net 105) (status 10)) + (segment (start 125.349 98.8695) (end 125.17374 99.01174) (width 0.5588) (layer Composant) (net 105) (status 830)) + (segment (start 157.734 95.758) (end 157.734 97.536) (width 0.5588) (layer Cuivre) (net 105)) + (segment (start 161.163 92.329) (end 157.734 95.758) (width 0.5588) (layer Cuivre) (net 105)) + (segment (start 102.9335 98.933) (end 102.9335 96.647) (width 0.5588) (layer Composant) (net 105) (status C30)) + (segment (start 84.2645 121.412) (end 84.2645 119.126) (width 0.5588) (layer Composant) (net 105) (status C30)) + (segment (start 126.0729 102.9716) (end 125.5395 103.505) (width 0.5588) (layer Composant) (net 105) (status 420)) + (segment (start 127.635 102.9716) (end 126.0729 102.9716) (width 0.254) (layer Composant) (net 105) (status 810)) + (segment (start 170.6245 117.094) (end 172.9105 117.094) (width 0.5588) (layer Composant) (net 105) (status C30)) + (segment (start 137.93978 110.998) (end 138.4935 111.633) (width 0.254) (layer Composant) (net 105) (status 420)) + (segment (start 137.8966 110.9472) (end 137.93978 110.998) (width 0.254) (layer Composant) (net 105)) + (segment (start 137.8966 109.22) (end 137.8966 110.9472) (width 0.254) (layer Composant) (net 105) (status 810)) + (segment (start 84.2645 119.126) (end 85.09 119.126) (width 0.5588) (layer Composant) (net 105) (status 810)) + (segment (start 155.829 97.536) (end 157.734 97.536) (width 0.5588) (layer Composant) (net 105)) + (segment (start 155.067 98.298) (end 155.829 97.536) (width 0.5588) (layer Composant) (net 105)) + (segment (start 153.9875 98.298) (end 155.067 98.298) (width 0.5588) (layer Composant) (net 105) (status 810)) + (segment (start 182.8165 121.158) (end 182.8165 123.444) (width 0.5588) (layer Composant) (net 105) (status C30)) + (segment (start 175.641 115.824) (end 173.863 115.824) (width 0.5588) (layer Composant) (net 105)) + (segment (start 173.863 115.824) (end 173.863 116.1415) (width 0.5588) (layer Composant) (net 105)) + (segment (start 173.863 116.1415) (end 172.9105 117.094) (width 0.5588) (layer Composant) (net 105) (status 420)) + (segment (start 131.3942 109.22) (end 131.3942 110.0328) (width 0.254) (layer Composant) (net 105) (status 810)) + (segment (start 180.975 121.158) (end 178.689 118.872) (width 0.5588) (layer Composant) (net 105)) + (segment (start 182.8165 121.158) (end 180.975 121.158) (width 0.5588) (layer Composant) (net 105) (status 810)) + (segment (start 141.351 92.2655) (end 142.5575 91.059) (width 0.5588) (layer Composant) (net 105) (status 420)) + (segment (start 141.351 92.456) (end 141.351 92.2655) (width 0.5588) (layer Composant) (net 105)) + (segment (start 140.8684 92.9386) (end 141.351 92.456) (width 0.254) (layer Composant) (net 105)) + (segment (start 140.8684 93.726) (end 140.8684 92.9386) (width 0.254) (layer Composant) (net 105) (status 810)) + (segment (start 132.3848 108.1278) (end 132.3848 109.22) (width 0.254) (layer Composant) (net 105) (status 420)) + (segment (start 132.334 107.823) (end 132.3848 108.1278) (width 0.254) (layer Composant) (net 105)) + (segment (start 132.334 105.791) (end 132.334 107.823) (width 0.254) (layer Composant) (net 105)) + (segment (start 133.096 105.029) (end 132.334 105.791) (width 0.254) (layer Composant) (net 105)) + (segment (start 133.096 104.648) (end 133.096 105.029) (width 0.254) (layer Composant) (net 105)) + (segment (start 133.477 104.267) (end 133.096 104.648) (width 0.254) (layer Composant) (net 105)) + (segment (start 133.985 104.267) (end 133.477 104.267) (width 0.5588) (layer Composant) (net 105)) + (segment (start 140.8684 93.726) (end 141.3764 93.726) (width 0.254) (layer Composant) (net 105) (status C30)) + (segment (start 138.8635 113.2635) (end 138.8 113.2) (width 0.5588) (layer Composant) (net 105)) + (segment (start 138.4935 111.633) (end 138.8635 113.2635) (width 0.5588) (layer Composant) (net 105) (status 810)) + (segment (start 144.6784 104.9782) (end 143.129 104.9782) (width 0.254) (layer Composant) (net 105) (status 420)) + (segment (start 145.288 105.7275) (end 144.6784 104.9782) (width 0.254) (layer Composant) (net 105)) + (segment (start 146.4945 105.7275) (end 145.288 105.7275) (width 0.5588) (layer Composant) (net 105)) + (segment (start 146.812 105.41) (end 146.4945 105.7275) (width 0.5588) (layer Composant) (net 105)) + (segment (start 127.889 95.25) (end 130.937 92.202) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 130.937 92.202) (end 130.937 89.916) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 127.889 97.155) (end 127.889 95.25) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 153.9875 93.853) (end 153.9875 96.012) (width 0.5588) (layer Composant) (net 105) (status C30)) + (via (at 98.298 100.584) (size 1.143) (layers Composant Cuivre) (net 105)) + (segment (start 98.3615 100.5205) (end 100.584 100.5205) (width 0.5588) (layer Composant) (net 105) (status 420)) + (segment (start 98.298 100.584) (end 98.3615 100.5205) (width 0.5588) (layer Composant) (net 105)) + (segment (start 84.2645 106.553) (end 84.2645 104.267) (width 0.5588) (layer Composant) (net 105) (status C30)) + (segment (start 102.1715 98.933) (end 100.584 100.5205) (width 0.5588) (layer Composant) (net 105) (status 420)) + (segment (start 102.9335 98.933) (end 102.1715 98.933) (width 0.5588) (layer Composant) (net 105) (status 810)) + (segment (start 153.9875 96.012) (end 153.9875 98.298) (width 0.5588) (layer Composant) (net 105) (status C30)) + (segment (start 161.163 91.313) (end 160.782 90.932) (width 0.5588) (layer Composant) (net 105) (status 430)) + (segment (start 161.163 92.329) (end 161.163 91.313) (width 0.5588) (layer Composant) (net 105) (status 20)) + (segment (start 134.874 92.71) (end 134.874 93.726) (width 0.254) (layer Composant) (net 105) (status 420)) + (segment (start 135.5725 92.0115) (end 134.874 92.71) (width 0.254) (layer Composant) (net 105) (status 10)) + (segment (start 135.4455 91.44) (end 135.5725 92.0115) (width 0.5588) (layer Composant) (net 105) (status 830)) + (segment (start 142.621 120.015) (end 148.59 120.015) (width 0.5588) (layer Composant) (net 105) (status 420)) + (via (at 141.859 119.253) (size 1.143) (layers Composant Cuivre) (net 105)) + (segment (start 141.859 119.253) (end 140.97 118.364) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 138.8 113.708) (end 138.8 113.2) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 140.97 113.665) (end 138.8 113.708) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 140.97 118.364) (end 140.97 113.665) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 141.859 119.253) (end 142.621 120.015) (width 0.5588) (layer Composant) (net 105)) + (segment (start 155.194 100.076) (end 157.734 97.536) (width 0.5588) (layer Cuivre) (net 105)) + (segment (start 149.479 100.076) (end 155.194 100.076) (width 0.5588) (layer Cuivre) (net 105)) + (segment (start 148.082 98.679) (end 149.479 100.076) (width 0.5588) (layer Cuivre) (net 105)) + (segment (start 146.812 98.679) (end 148.082 98.679) (width 0.5588) (layer Cuivre) (net 105)) + (segment (start 161.163 107.95) (end 168.275 115.062) (width 0.5588) (layer GND_layer) (net 105)) + (segment (start 161.163 92.329) (end 161.163 107.95) (width 0.5588) (layer GND_layer) (net 105)) + (segment (start 121.0945 97.8535) (end 121.666 98.425) (width 0.5588) (layer Composant) (net 105) (status 10)) + (segment (start 121.0945 97.282) (end 121.0945 97.8535) (width 0.5588) (layer Composant) (net 105) (status 830)) + (segment (start 129.4384 102.9462) (end 127.635 102.9716) (width 0.254) (layer Composant) (net 105) (status 420)) + (segment (start 129.667 103.124) (end 129.4384 102.9462) (width 0.254) (layer Composant) (net 105)) + (segment (start 131.318 103.124) (end 129.667 103.124) (width 0.254) (layer Composant) (net 105)) + (segment (start 131.699 102.87) (end 131.318 103.124) (width 0.254) (layer Composant) (net 105)) + (segment (start 130.048 97.155) (end 127.889 97.155) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 131.699 98.806) (end 130.048 97.155) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 131.699 102.87) (end 131.699 98.806) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 122.936 97.155) (end 121.666 98.425) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 127.889 97.155) (end 122.936 97.155) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 130.3782 92.8878) (end 130.3782 93.726) (width 0.254) (layer Composant) (net 105) (status 420)) + (segment (start 130.8735 92.3925) (end 130.3782 92.8878) (width 0.254) (layer Composant) (net 105)) + (segment (start 130.8735 89.9795) (end 130.8735 92.3925) (width 0.254) (layer Composant) (net 105)) + (segment (start 125.7808 99.4664) (end 125.349 98.8695) (width 0.5588) (layer Composant) (net 105) (status 420)) + (segment (start 127.635 99.4664) (end 125.7808 99.4664) (width 0.254) (layer Composant) (net 105) (status 810)) + (segment (start 145.288 98.679) (end 146.812 98.679) (width 0.5588) (layer Composant) (net 105)) + (segment (start 145.0086 98.9584) (end 145.288 98.679) (width 0.254) (layer Composant) (net 105)) + (segment (start 143.129 98.9584) (end 145.0086 98.9584) (width 0.254) (layer Composant) (net 105) (status 810)) + (segment (start 170.6245 115.8875) (end 170.6245 117.094) (width 0.5588) (layer Composant) (net 105) (status 420)) + (segment (start 169.799 115.062) (end 170.6245 115.8875) (width 0.5588) (layer Composant) (net 105)) + (segment (start 168.275 115.062) (end 169.799 115.062) (width 0.5588) (layer Composant) (net 105)) + (segment (start 121.158 95.885) (end 121.0945 97.282) (width 0.5588) (layer Composant) (net 105) (status 420)) + (segment (start 117.094 91.821) (end 121.158 95.885) (width 0.5588) (layer Composant) (net 105)) + (segment (start 110.49 91.821) (end 117.094 91.821) (width 0.5588) (layer Composant) (net 105)) + (segment (start 107.315 94.996) (end 110.49 91.821) (width 0.5588) (layer Composant) (net 105)) + (segment (start 103.251 94.996) (end 107.315 94.996) (width 0.5588) (layer Composant) (net 105)) + (segment (start 102.9335 95.3135) (end 103.251 94.996) (width 0.5588) (layer Composant) (net 105)) + (segment (start 102.9335 96.647) (end 102.9335 95.3135) (width 0.5588) (layer Composant) (net 105) (status 810)) + (segment (start 77.597 117.729) (end 76.327 116.459) (width 0.5588) (layer 3.3V_layer) (net 105) (status 420)) + (segment (start 83.058 117.729) (end 77.597 117.729) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 83.82 116.967) (end 83.058 117.729) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 96.774 112.141) (end 96.012 111.379) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 97.409 112.141) (end 96.774 112.141) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 96.012 111.379) (end 89.789 111.379) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 85.217 115.57) (end 83.82 116.967) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 146.05 77.978) (end 143.129 80.899) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 143.129 80.899) (end 143.1 94) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 146.05 74.676) (end 146.05 77.978) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 161.544 107.696) (end 161.544 106.807) (width 0.5588) (layer Composant) (net 105) (status 810)) + (segment (start 161.544 105.7275) (end 161.3535 105.537) (width 0.5588) (layer Composant) (net 105) (status 430)) + (segment (start 161.544 106.807) (end 161.544 105.7275) (width 0.5588) (layer Composant) (net 105) (status 20)) + (segment (start 134.212 88.392) (end 132.461 88.392) (width 0.4) (layer Composant) (net 105)) + (segment (start 132.461 88.392) (end 130.937 89.916) (width 0.4) (layer Composant) (net 105)) + (segment (start 135.4455 91.44) (end 135.4455 89.6255) (width 0.4) (layer Composant) (net 105) (status 810)) + (segment (start 135.4455 89.6255) (end 134.212 88.392) (width 0.4) (layer Composant) (net 105)) + (segment (start 130.937 89.916) (end 130.8735 89.9795) (width 0.5588) (layer Composant) (net 105)) + (segment (start 138.8 113.2) (end 138.938 110.109) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 137.668 104.267) (end 133.985 104.267) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 139.954 106.553) (end 137.668 104.267) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 139.954 109.093) (end 139.954 106.553) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 138.938 110.109) (end 139.954 109.093) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 145.288 104.394) (end 146.304 105.41) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 145.288 99.187) (end 145.288 104.394) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 145.796 98.679) (end 145.288 99.187) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 146.812 98.679) (end 145.796 98.679) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 145.288 105.41) (end 146.304 105.41) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 143.891 106.807) (end 145.288 105.41) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 143.891 109.093) (end 143.891 106.807) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 142.875 110.109) (end 143.891 109.093) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 138.938 110.109) (end 142.875 110.109) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 146.304 105.41) (end 146.812 105.41) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 130.8735 89.916) (end 130.8735 89.9795) (width 0.5588) (layer Composant) (net 105)) + (segment (start 153.416 106.426) (end 155.448 104.394) (width 0.5588) (layer Composant) (net 105)) + (segment (start 153.416 109.093) (end 153.416 106.426) (width 0.5588) (layer Composant) (net 105) (status 10)) + (segment (start 153.543 109.22) (end 153.416 109.093) (width 0.5588) (layer Composant) (net 105) (status 830)) + (segment (start 161.036 104.394) (end 155.448 104.394) (width 0.5588) (layer Composant) (net 105)) + (segment (start 194.691 125.222) (end 194.6783 122.7455) (width 0.254) (layer Composant) (net 105) (status 420)) + (via (at 192.33388 123.84532) (size 1.143) (layers Composant Cuivre) (net 105)) + (segment (start 192.33388 123.84532) (end 192.33388 113.6396) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 192.46088 113.5126) (end 192.33388 113.6396) (width 0.5588) (layer 3.3V_layer) (net 105)) + (via (at 204.1779 121.24182) (size 1.143) (layers Composant Cuivre) (net 105)) + (segment (start 204.1779 121.24182) (end 205.6384 121.24182) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 205.6384 121.24182) (end 205.6511 121.22912) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 204.1779 122.7455) (end 204.1779 121.24182) (width 0.254) (layer Composant) (net 105) (status 810)) + (segment (start 190.9445 110.0074) (end 192.00368 110.0074) (width 0.254) (layer Composant) (net 105) (status 810)) + (segment (start 190.9445 109.5121) (end 191.86144 109.5121) (width 0.2032) (layer Composant) (net 105) (status 810)) + (segment (start 193.3321 109.5121) (end 193.675 109.855) (width 0.5588) (layer Composant) (net 105)) + (segment (start 191.86144 109.5121) (end 193.3321 109.5121) (width 0.2032) (layer Composant) (net 105)) + (segment (start 192.00368 109.65434) (end 192.00368 110.0074) (width 0.4) (layer Composant) (net 105)) + (segment (start 191.86144 109.5121) (end 192.00368 109.65434) (width 0.254) (layer Composant) (net 105)) + (segment (start 212.9155 103.0097) (end 211.85632 103.0097) (width 0.254) (layer Composant) (net 105) (status 810)) + (segment (start 211.41436 102.56774) (end 211.85632 103.0097) (width 0.5588) (layer Composant) (net 105)) + (via (at 211.40928 113.5126) (size 1.143) (layers Composant Cuivre) (net 105)) + (segment (start 211.40928 113.5126) (end 212.4456 113.5126) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 212.4456 113.5126) (end 212.979 114.046) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 212.9155 113.5126) (end 211.40928 113.5126) (width 0.254) (layer Composant) (net 105) (status 810)) + (segment (start 195.072 109.855) (end 195.072 110.90148) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 195.072 110.90148) (end 192.46088 113.5126) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 195.072 107.315) (end 195.072 109.855) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 194.8815 107.1245) (end 195.072 107.315) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 193.167 107.1245) (end 194.8815 107.1245) (width 0.5588) (layer 3.3V_layer) (net 105)) + (via (at 193.167 107.1245) (size 1.143) (layers Composant Cuivre) (net 105)) + (segment (start 192.89268 107.1245) (end 192.70218 107.315) (width 0.5588) (layer Cuivre) (net 105)) + (segment (start 193.167 107.1245) (end 192.89268 107.1245) (width 0.5588) (layer Cuivre) (net 105)) + (segment (start 191.9605 107.315) (end 192.70218 107.315) (width 0.5588) (layer Cuivre) (net 105) (status 810)) + (segment (start 199.009 102.97668) (end 199.009 101.7905) (width 0.5588) (layer Cuivre) (net 105) (status 420)) + (segment (start 205.359 121.52122) (end 205.359 122.4915) (width 0.5588) (layer Cuivre) (net 105) (status 420)) + (via (at 205.6511 121.22912) (size 1.143) (layers Composant Cuivre) (net 105)) + (segment (start 205.6511 121.22912) (end 205.6511 119.9769) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 206.375 119.253) (end 205.6511 119.9769) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 205.6511 121.22912) (end 205.359 121.52122) (width 0.5588) (layer Cuivre) (net 105)) + (segment (start 220.04274 63.5) (end 223.52 63.5) (width 0.5588) (layer 3.3V_layer) (net 105) (status 420)) + (segment (start 220.04274 63.5) (end 218.44 65.10274) (width 0.5588) (layer 3.3V_layer) (net 105)) + (via (at 218.44 65.10274) (size 1.143) (layers Composant Cuivre) (net 105)) + (segment (start 218.44 66.3575) (end 218.44 65.10274) (width 0.5588) (layer Composant) (net 105) (status 810)) + (segment (start 158.623 96.647) (end 158.623 95.8215) (width 0.5588) (layer Composant) (net 105) (status 420)) + (segment (start 157.734 97.536) (end 158.623 96.647) (width 0.5588) (layer Composant) (net 105)) + (segment (start 190.5 100.75418) (end 190.5 100.0125) (width 0.5588) (layer Cuivre) (net 105) (status 420)) + (via (at 190.04788 101.2063) (size 1.143) (layers Composant Cuivre) (net 105)) + (segment (start 190.04788 101.2063) (end 190.04788 101.78288) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 190.04788 101.78288) (end 191.24168 102.97668) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 199.009 102.97668) (end 191.24168 102.97668) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 190.5 100.75418) (end 190.04788 101.2063) (width 0.5588) (layer Cuivre) (net 105)) + (segment (start 192.46088 113.5126) (end 190.9445 113.5126) (width 0.254) (layer Composant) (net 105) (status 420)) + (segment (start 191.9605 114.01298) (end 191.9605 115.189) (width 0.5588) (layer Cuivre) (net 105) (status 420)) + (segment (start 192.46088 113.5126) (end 191.9605 114.01298) (width 0.5588) (layer Cuivre) (net 105)) + (segment (start 199.1741 102.81158) (end 199.1741 100.7745) (width 0.254) (layer Composant) (net 105) (status 420)) + (segment (start 199.009 102.97668) (end 199.1741 102.81158) (width 0.5588) (layer Composant) (net 105)) + (segment (start 206.375 119.253) (end 208.57464 119.253) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 200.56348 119.79148) (end 201.10196 119.253) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 200.56348 121.0691) (end 200.56348 119.79148) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 201.10196 119.253) (end 206.375 119.253) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 208.57464 119.253) (end 209.73288 118.09476) (width 0.5588) (layer 3.3V_layer) (net 105)) + (via (at 200.56348 121.0691) (size 1.143) (layers Composant Cuivre) (net 105)) + (segment (start 201.2442 121.74982) (end 201.422 121.74982) (width 0.5588) (layer Cuivre) (net 105)) + (segment (start 200.56348 121.0691) (end 201.2442 121.74982) (width 0.4) (layer Cuivre) (net 105)) + (segment (start 201.422 122.4915) (end 201.422 121.74982) (width 0.4) (layer Cuivre) (net 105) (status 810)) + (segment (start 202.946 102.53218) (end 203.454 102.53218) (width 0.5588) (layer Cuivre) (net 105)) + (segment (start 203.454 102.53218) (end 203.454 101.7905) (width 0.5588) (layer Cuivre) (net 105) (status 420)) + (via (at 202.48118 102.997) (size 1.143) (layers Composant Cuivre) (net 105)) + (segment (start 199.009 102.97668) (end 202.46086 102.97668) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 202.46086 102.97668) (end 202.48118 102.997) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 202.48118 102.997) (end 202.946 102.53218) (width 0.5588) (layer Cuivre) (net 105)) + (segment (start 206.83474 109.98708) (end 206.83474 118.79326) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 206.375 119.253) (end 206.83474 118.79326) (width 0.5588) (layer 3.3V_layer) (net 105)) + (via (at 206.83474 109.98708) (size 1.143) (layers Composant Cuivre) (net 105)) + (segment (start 207.28432 109.5375) (end 208.28 109.5375) (width 0.5588) (layer Cuivre) (net 105) (status 420)) + (segment (start 206.83474 109.98708) (end 207.28432 109.5375) (width 0.5588) (layer Cuivre) (net 105)) + (segment (start 209.33156 102.56774) (end 209.296 102.53218) (width 0.5588) (layer Cuivre) (net 105)) + (segment (start 211.41436 102.56774) (end 209.33156 102.56774) (width 0.5588) (layer Cuivre) (net 105)) + (segment (start 209.296 101.7905) (end 209.296 102.53218) (width 0.5588) (layer Cuivre) (net 105) (status 810)) + (segment (start 209.60842 118.09476) (end 209.27568 118.4275) (width 0.5588) (layer Cuivre) (net 105)) + (segment (start 209.73288 118.09476) (end 209.60842 118.09476) (width 0.5588) (layer Cuivre) (net 105)) + (segment (start 208.28 118.4275) (end 209.27568 118.4275) (width 0.5588) (layer Cuivre) (net 105) (status 810)) + (segment (start 131.2545 113.919) (end 132.9055 112.268) (width 0.4) (layer Composant) (net 105) (status 420)) + (segment (start 130.556 113.919) (end 131.2545 113.919) (width 0.4) (layer Composant) (net 105)) + (segment (start 130.048 113.411) (end 130.556 113.919) (width 0.4) (layer Composant) (net 105)) + (segment (start 130.048 111.125) (end 130.048 113.411) (width 0.4) (layer Composant) (net 105)) + (segment (start 130.175 110.998) (end 130.048 111.125) (width 0.5588) (layer Composant) (net 105)) + (segment (start 130.429 110.998) (end 130.175 110.998) (width 0.5588) (layer Composant) (net 105)) + (segment (start 178.689 118.872) (end 175.641 115.824) (width 0.5588) (layer Composant) (net 105)) + (via (at 211.40928 110.0074) (size 1.143) (layers Composant Cuivre) (net 105)) + (segment (start 211.40928 110.0074) (end 211.40928 110.06328) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 211.40928 110.06328) (end 212.979 111.633) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 212.979 114.046) (end 212.979 114.84864) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 212.979 111.633) (end 212.979 114.046) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 212.979 114.84864) (end 209.73288 118.09476) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 212.9155 110.0074) (end 211.40928 110.0074) (width 0.254) (layer Composant) (net 105) (status 810)) + (segment (start 210.31454 117.5131) (end 212.9155 117.5131) (width 0.254) (layer Composant) (net 105) (status 420)) + (segment (start 209.73288 118.09476) (end 210.31454 117.5131) (width 0.5588) (layer Composant) (net 105)) + (segment (start 88.9 103.505) (end 88.9 100.33) (width 0.5588) (layer 3.3V_layer) (net 105) (status 420)) + (segment (start 90.805 105.41) (end 88.9 103.505) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 97.409 112.141) (end 97.409 107.188) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 97.409 107.188) (end 95.631 105.41) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 131.3942 110.0328) (end 130.429 110.998) (width 0.254) (layer Composant) (net 105)) + (segment (start 95.631 105.41) (end 90.805 105.41) (width 0.5588) (layer 3.3V_layer) (net 105)) + (via (at 84.582 102.235) (size 1.143) (layers Composant Cuivre) (net 105)) + (segment (start 84.2645 102.5525) (end 84.582 102.235) (width 0.5588) (layer Composant) (net 105)) + (segment (start 84.2645 104.267) (end 84.2645 102.5525) (width 0.5588) (layer Composant) (net 105) (status 810)) + (segment (start 86.995 102.235) (end 88.9 100.33) (width 0.5588) (layer 3.3V_layer) (net 105) (status 420)) + (segment (start 84.582 102.235) (end 86.995 102.235) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 90.17 99.06) (end 88.9 100.33) (width 0.5588) (layer 3.3V_layer) (net 105) (status 420)) + (segment (start 92.71 99.06) (end 90.17 99.06) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 93.472 98.298) (end 92.71 99.06) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 97.155 87.757) (end 95.25 87.757) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 95.25 87.757) (end 93.472 89.535) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 93.472 89.535) (end 93.472 98.298) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 89.154 100.584) (end 88.9 100.33) (width 0.5588) (layer 3.3V_layer) (net 105) (status 430)) + (segment (start 98.298 100.584) (end 89.154 100.584) (width 0.5588) (layer 3.3V_layer) (net 105) (status 20)) + (segment (start 107.3 84.5335) (end 107.5055 84.328) (width 0.4) (layer Composant) (net 105) (tstamp 53D8E6D8)) + (segment (start 107.5 87.6) (end 107.3 87.4) (width 0.4) (layer Composant) (net 105) (tstamp 53D8E6D6)) + (segment (start 107.3 87.4) (end 107.3 84.5335) (width 0.4) (layer Composant) (net 105) (tstamp 53D8E6D7)) + (segment (start 107.5055 87.6) (end 107.5 87.6) (width 0.4) (layer Composant) (net 105)) + (via (at 143.1 94) (size 1.143) (layers Composant Cuivre) (net 105)) + (segment (start 142.826 93.726) (end 143.1 94) (width 0.4) (layer Composant) (net 105) (tstamp 53D8E6ED)) + (segment (start 141.3764 93.726) (end 142.826 93.726) (width 0.4) (layer Composant) (net 105)) + (segment (start 146.636 97.536) (end 143.1 94) (width 0.5588) (layer 3.3V_layer) (net 105) (tstamp 53D8E6F0)) + (segment (start 146.812 98.679) (end 146.812 97.536) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 146.812 97.536) (end 146.636 97.536) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 139.651 90.551) (end 143.1 94) (width 0.5588) (layer 3.3V_layer) (net 105) (tstamp 53D8E6F5)) + (segment (start 138.2 90.551) (end 139.651 90.551) (width 0.5588) (layer 3.3V_layer) (net 105)) + (segment (start 82.423 136.398) (end 81.28 135.255) (width 0.254) (layer Composant) (net 106)) + (segment (start 77.597 124.714) (end 77.597 112.649) (width 0.254) (layer Composant) (net 106)) + (segment (start 80.264 125.349) (end 81.28 126.365) (width 0.254) (layer Composant) (net 106)) + (segment (start 91.44 135.382) (end 90.424 136.398) (width 0.254) (layer Composant) (net 106) (status 10)) + (segment (start 81.28 135.255) (end 81.28 126.365) (width 0.254) (layer Composant) (net 106)) + (segment (start 78.232 125.349) (end 77.597 124.714) (width 0.254) (layer Composant) (net 106)) + (segment (start 80.264 125.349) (end 78.232 125.349) (width 0.254) (layer Composant) (net 106)) + (segment (start 90.424 136.398) (end 82.423 136.398) (width 0.254) (layer Composant) (net 106)) + (segment (start 91.44 134.62) (end 91.44 135.382) (width 0.254) (layer Composant) (net 106) (status 830)) + (segment (start 77.597 112.649) (end 78.867 111.379) (width 0.254) (layer Composant) (net 106) (status 420)) + (segment (start 74.93 105.41) (end 74.93 112.522) (width 0.254) (layer Cuivre) (net 107)) + (segment (start 147.574 95.25) (end 147.066 94.996) (width 0.254) (layer Cuivre) (net 107)) + (segment (start 145.2372 97.4598) (end 143.129 97.4598) (width 0.254) (layer Composant) (net 107) (status 420)) + (segment (start 147.193 95.504) (end 145.2372 97.4598) (width 0.254) (layer Composant) (net 107)) + (segment (start 147.574 95.25) (end 147.193 95.504) (width 0.254) (layer Composant) (net 107)) + (segment (start 174.625 90.17) (end 181.991 90.17) (width 0.254) (layer Cuivre) (net 107)) + (segment (start 174.244 90.551) (end 174.625 90.17) (width 0.254) (layer Cuivre) (net 107)) + (segment (start 165.354 90.551) (end 174.244 90.551) (width 0.254) (layer Cuivre) (net 107)) + (segment (start 164.719 89.916) (end 165.354 90.551) (width 0.254) (layer Cuivre) (net 107)) + (segment (start 159.766 89.916) (end 164.719 89.916) (width 0.254) (layer Cuivre) (net 107)) + (segment (start 156.21 93.472) (end 159.766 89.916) (width 0.254) (layer Cuivre) (net 107)) + (segment (start 148.717 93.472) (end 156.21 93.472) (width 0.254) (layer Cuivre) (net 107)) + (segment (start 147.574 94.615) (end 148.717 93.472) (width 0.254) (layer Cuivre) (net 107)) + (segment (start 147.574 95.25) (end 147.574 94.615) (width 0.254) (layer Cuivre) (net 107)) + (segment (start 147.574 95.25) (end 147.574 92.71) (width 0.254) (layer Composant) (net 107)) + (segment (start 178.054 138.176) (end 179.324 139.446) (width 0.254) (layer GND_layer) (net 107) (status 420)) + (segment (start 178.054 130.175) (end 178.054 138.176) (width 0.254) (layer GND_layer) (net 107)) + (segment (start 178.054 130.175) (end 185.928 122.301) (width 0.254) (layer GND_layer) (net 107)) + (segment (start 185.928 106.172) (end 185.928 122.301) (width 0.254) (layer GND_layer) (net 107)) + (segment (start 181.991 102.235) (end 185.928 106.172) (width 0.254) (layer GND_layer) (net 107)) + (segment (start 181.991 90.17) (end 181.991 102.235) (width 0.254) (layer GND_layer) (net 107)) + (segment (start 74.93 112.522) (end 76.327 113.919) (width 0.254) (layer Cuivre) (net 107) (status 420)) + (segment (start 147.574 92.71) (end 149.225 91.059) (width 0.381) (layer Composant) (net 107)) + (segment (start 149.225 91.059) (end 154.94 91.059) (width 0.381) (layer Composant) (net 107)) + (segment (start 154.94 91.059) (end 157.7975 93.9165) (width 0.381) (layer Composant) (net 107)) + (segment (start 157.7975 93.9165) (end 158.623 93.9165) (width 0.381) (layer Composant) (net 107) (status 420)) + (segment (start 160.8455 94.6785) (end 159.385 94.6785) (width 0.4318) (layer Composant) (net 107) (status 810)) + (segment (start 159.385 94.6785) (end 158.623 93.9165) (width 0.4318) (layer Composant) (net 107) (status 420)) + (via (at 181.991 90.17) (size 0.889) (layers Composant Cuivre) (net 107)) + (via (at 147.574 95.25) (size 0.635) (layers Composant Cuivre) (net 107)) + (segment (start 137.033 98.425) (end 137.668 97.79) (width 0.254) (layer Cuivre) (net 107)) + (segment (start 137.668 95.631) (end 137.668 97.79) (width 0.254) (layer Cuivre) (net 107)) + (segment (start 138.303 94.996) (end 137.668 95.631) (width 0.254) (layer Cuivre) (net 107)) + (segment (start 147.066 94.996) (end 138.303 94.996) (width 0.254) (layer Cuivre) (net 107)) + (segment (start 132.334 98.425) (end 137.033 98.425) (width 0.254) (layer Cuivre) (net 107)) + (segment (start 132.334 98.425) (end 130.683 96.774) (width 0.254) (layer Cuivre) (net 107)) + (segment (start 130.683 96.774) (end 128.524 96.774) (width 0.254) (layer Cuivre) (net 107)) + (segment (start 128.524 96.774) (end 126.873 95.123) (width 0.254) (layer Cuivre) (net 107)) + (segment (start 126.873 95.123) (end 117.094 95.123) (width 0.254) (layer Cuivre) (net 107)) + (segment (start 117.094 95.123) (end 116.586 94.615) (width 0.254) (layer Cuivre) (net 107)) + (segment (start 116.586 94.615) (end 111.633 94.615) (width 0.254) (layer Cuivre) (net 107)) + (segment (start 111.633 94.615) (end 110.49 95.758) (width 0.254) (layer Cuivre) (net 107)) + (segment (start 110.49 95.758) (end 110.49 98.171) (width 0.254) (layer Cuivre) (net 107)) + (segment (start 110.49 98.171) (end 104.521 104.14) (width 0.254) (layer Cuivre) (net 107)) + (segment (start 104.521 104.14) (end 76.2 104.14) (width 0.254) (layer Cuivre) (net 107)) + (segment (start 76.2 104.14) (end 74.93 105.41) (width 0.254) (layer Cuivre) (net 107)) + (segment (start 80.645 138.557) (end 78.867 136.779) (width 0.381) (layer Cuivre) (net 108) (status 420)) + (segment (start 83.439 138.557) (end 80.645 138.557) (width 0.381) (layer Cuivre) (net 108) (status 810)) + (segment (start 176.149 92.075) (end 175.641 91.567) (width 0.381) (layer Composant) (net 109) (status 10)) + (segment (start 169.291 91.567) (end 168.529 92.329) (width 0.381) (layer Composant) (net 109) (status 420)) + (segment (start 164.846 95.3135) (end 165.2905 95.758) (width 0.254) (layer Composant) (net 109) (status 830)) + (via (at 166.878 95.758) (size 0.889) (layers Composant Cuivre) (net 109)) + (segment (start 176.149 92.329) (end 178.562 92.329) (width 0.381) (layer Cuivre) (net 109) (status 810)) + (segment (start 176.149 92.329) (end 176.149 92.075) (width 0.381) (layer Composant) (net 109) (status 830)) + (segment (start 165.2905 95.758) (end 166.878 95.758) (width 0.381) (layer Composant) (net 109) (status 10)) + (segment (start 166.878 92.964) (end 166.878 95.758) (width 0.381) (layer Composant) (net 109)) + (segment (start 167.513 92.329) (end 166.878 92.964) (width 0.381) (layer Composant) (net 109)) + (segment (start 168.529 92.329) (end 167.513 92.329) (width 0.381) (layer Composant) (net 109) (status 810)) + (segment (start 186.69 89.408) (end 186.69 88.265) (width 0.381) (layer Cuivre) (net 109) (status 420)) + (segment (start 164.846 95.3135) (end 163.068 95.3135) (width 0.4318) (layer Composant) (net 109) (status 830)) + (segment (start 175.641 91.567) (end 169.291 91.567) (width 0.4318) (layer Composant) (net 109)) + (segment (start 163.068 95.3135) (end 162.7505 95.631) (width 0.4318) (layer Composant) (net 109) (status 430)) + (segment (start 178.562 92.329) (end 179.197 92.964) (width 0.381) (layer Cuivre) (net 109)) + (segment (start 179.197 92.964) (end 183.134 92.964) (width 0.381) (layer Cuivre) (net 109)) + (segment (start 183.134 92.964) (end 186.69 89.408) (width 0.381) (layer Cuivre) (net 109)) + (segment (start 161.3535 110.5535) (end 160.401 109.601) (width 0.254) (layer Composant) (net 110) (status 10)) + (segment (start 160.401 109.601) (end 160.401 108.712) (width 0.254) (layer Composant) (net 110)) + (segment (start 160.401 108.712) (end 160.02 108.331) (width 0.254) (layer Composant) (net 110)) + (segment (start 160.02 108.331) (end 159.512 108.331) (width 0.254) (layer Composant) (net 110) (status 420)) + (segment (start 161.3535 111.252) (end 161.3535 110.5535) (width 0.254) (layer Composant) (net 110) (status 830)) + (segment (start 163.957 113.2205) (end 163.957 113.284) (width 0.762) (layer Composant) (net 110) (status 830)) + (segment (start 161.3535 111.252) (end 161.3535 114.046) (width 0.762) (layer Composant) (net 110) (status C30)) + (segment (start 163.957 113.284) (end 163.195 114.046) (width 0.762) (layer Composant) (net 110) (status 10)) + (segment (start 163.195 114.046) (end 161.3535 114.046) (width 0.762) (layer Composant) (net 110) (status 420)) + (segment (start 117.729 116.332) (end 117.729 131.445) (width 0.381) (layer GND_layer) (net 111)) + (segment (start 122.8725 108.712) (end 121.793 108.712) (width 0.381) (layer Composant) (net 111) (status 810)) + (segment (start 121.793 108.712) (end 120.777 107.696) (width 0.381) (layer Composant) (net 111) (status 420)) + (via (at 117.729 116.332) (size 0.889) (layers Composant Cuivre) (net 111)) + (segment (start 125.984 107.569) (end 126.3015 107.2515) (width 0.254) (layer Composant) (net 111)) + (segment (start 125.984 110.49) (end 125.984 107.569) (width 0.254) (layer Composant) (net 111)) + (segment (start 127.635 107.4674) (end 126.5174 107.4674) (width 0.254) (layer Composant) (net 111) (status 810)) + (segment (start 126.56312 106.9848) (end 126.3015 107.2515) (width 0.254) (layer Composant) (net 111)) + (segment (start 127.635 106.9848) (end 126.56312 106.9848) (width 0.254) (layer Composant) (net 111) (status 810)) + (segment (start 113.284 136.906) (end 115.824 136.906) (width 0.254) (layer 3.3V_layer) (net 111) (status C30)) + (segment (start 120.65 111.506) (end 120.65 113.411) (width 0.381) (layer Composant) (net 111)) + (segment (start 120.65 113.411) (end 117.729 116.332) (width 0.381) (layer Composant) (net 111)) + (segment (start 117.602 131.572) (end 115.824 133.35) (width 0.381) (layer GND_layer) (net 111)) + (segment (start 115.824 133.35) (end 115.824 136.906) (width 0.381) (layer GND_layer) (net 111) (status 420)) + (segment (start 120.777 107.696) (end 120.777 110.109) (width 0.381) (layer Composant) (net 111) (status 830)) + (segment (start 120.777 110.109) (end 120.65 110.236) (width 0.381) (layer Composant) (net 111) (status 430)) + (segment (start 125.984 110.49) (end 124.968 111.506) (width 0.254) (layer Composant) (net 111)) + (segment (start 124.968 111.506) (end 120.65 111.506) (width 0.254) (layer Composant) (net 111)) + (segment (start 126.5174 107.4674) (end 126.3015 107.2515) (width 0.254) (layer Composant) (net 111)) + (segment (start 117.729 131.445) (end 117.602 131.445) (width 0.381) (layer GND_layer) (net 111)) + (segment (start 117.602 131.445) (end 117.602 131.572) (width 0.381) (layer GND_layer) (net 111)) + (segment (start 120.65 110.236) (end 120.65 111.506) (width 0.381) (layer Composant) (net 111) (status 810)) + (segment (start 124.714 110.363) (end 124.7775 110.2995) (width 0.4) (layer Composant) (net 112)) + (segment (start 124.7775 110.2995) (end 124.7775 108.712) (width 0.4) (layer Composant) (net 112) (status 420)) + (segment (start 123.444 105.283) (end 123.825 105.664) (width 0.4) (layer GND_layer) (net 112)) + (segment (start 123.825 105.664) (end 123.825 110.109) (width 0.4) (layer GND_layer) (net 112)) + (segment (start 123.825 110.109) (end 123.571 110.363) (width 0.4) (layer GND_layer) (net 112)) + (via (at 118.872 105.029) (size 0.8) (layers Composant Cuivre) (net 112)) + (via (at 123.444 105.283) (size 0.8) (layers Composant Cuivre) (net 112)) + (via (at 123.571 110.363) (size 0.8) (layers Composant Cuivre) (net 112)) + (segment (start 126.492 105.9688) (end 126.492 106.426) (width 0.4) (layer Composant) (net 112)) + (segment (start 126.5428 106.4768) (end 127.635 106.4768) (width 0.254) (layer Composant) (net 112) (status 420)) + (segment (start 126.492 106.426) (end 126.5428 106.4768) (width 0.254) (layer Composant) (net 112)) + (segment (start 123.444 105.283) (end 124.206 106.045) (width 0.4) (layer Composant) (net 112)) + (segment (start 125.8062 106.045) (end 125.8824 105.9688) (width 0.4) (layer Composant) (net 112)) + (segment (start 124.206 106.045) (end 125.8062 106.045) (width 0.4) (layer Composant) (net 112)) + (segment (start 123.444 105.283) (end 121.666 105.283) (width 0.4) (layer Composant) (net 112)) + (segment (start 121.666 105.283) (end 120.777 104.394) (width 0.4) (layer Composant) (net 112) (status 420)) + (segment (start 123.571 110.363) (end 124.714 110.363) (width 0.4) (layer Composant) (net 112)) + (segment (start 113.284 139.446) (end 113.665 139.446) (width 0.4) (layer GND_layer) (net 112) (status 830)) + (segment (start 126.492 105.9688) (end 125.8824 105.9688) (width 0.4) (layer Composant) (net 112)) + (segment (start 127.635 105.9688) (end 126.492 105.9688) (width 0.254) (layer Composant) (net 112) (status 810)) + (segment (start 115.824 139.446) (end 113.284 139.446) (width 0.4) (layer GND_layer) (net 112) (status 30)) + (segment (start 119.38 114.3) (end 119.38 132.588) (width 0.4) (layer GND_layer) (net 112) (tstamp 53D8E5AE)) + (segment (start 118.872 113.792) (end 119.38 114.3) (width 0.4) (layer GND_layer) (net 112) (tstamp 53D8E5AD)) + (segment (start 118.872 105.029) (end 118.872 113.792) (width 0.4) (layer GND_layer) (net 112)) + (segment (start 117.1 138.424) (end 117.1 134.868) (width 0.4) (layer GND_layer) (net 112) (tstamp 53D8E5B3)) + (segment (start 117.1 134.868) (end 119.38 132.588) (width 0.4) (layer GND_layer) (net 112) (tstamp 53D8E5B4)) + (segment (start 116.078 139.446) (end 117.1 138.424) (width 0.4) (layer GND_layer) (net 112) (tstamp 53D8E5B2) (status 10)) + (segment (start 115.824 139.446) (end 116.078 139.446) (width 0.4) (layer GND_layer) (net 112) (status 30)) + (segment (start 117.983 104.14) (end 118.872 105.029) (width 0.4) (layer Composant) (net 112) (tstamp 53D8E5B8)) + (segment (start 117.983 101.346) (end 117.983 104.14) (width 0.4) (layer Composant) (net 112) (status 10)) + (segment (start 119.507 104.394) (end 118.872 105.029) (width 0.4) (layer Composant) (net 112) (tstamp 53D8E5BB)) + (segment (start 120.777 104.394) (end 119.507 104.394) (width 0.4) (layer Composant) (net 112) (status 10)) + (via (at 186.182 71.12) (size 0.889) (layers Composant Cuivre) (net 113)) + (segment (start 187.579 71.12) (end 186.182 71.12) (width 0.381) (layer Composant) (net 113)) + (segment (start 187.706 71.247) (end 187.579 71.12) (width 0.381) (layer Composant) (net 113)) + (segment (start 188.2775 71.247) (end 187.706 71.247) (width 0.381) (layer Composant) (net 113) (status 810)) + (segment (start 184.15 74.676) (end 186.182 74.676) (width 0.381) (layer Composant) (net 113) (status 810)) + (via (at 186.182 74.676) (size 0.635) (layers Composant Cuivre) (net 113)) + (segment (start 186.182 71.12) (end 186.182 74.676) (width 0.381) (layer GND_layer) (net 113)) + (segment (start 183.7055 72.9615) (end 184.15 73.406) (width 0.4318) (layer Composant) (net 114) (status 420)) + (segment (start 181.102 72.9615) (end 183.7055 72.9615) (width 0.4318) (layer Composant) (net 114) (status 810)) + (segment (start 181.61 75.438) (end 181.102 74.93) (width 0.381) (layer Composant) (net 115) (status 20)) + (segment (start 182.245 75.438) (end 181.61 75.438) (width 0.381) (layer Composant) (net 115)) + (segment (start 184.15 75.946) (end 182.753 75.946) (width 0.381) (layer Composant) (net 115) (status 810)) + (segment (start 181.102 74.93) (end 181.102 74.8665) (width 0.381) (layer Composant) (net 115) (status 430)) + (segment (start 182.753 75.946) (end 182.245 75.438) (width 0.381) (layer Composant) (net 115)) + (segment (start 181.102 77.2795) (end 184.0865 77.2795) (width 0.4318) (layer Composant) (net 116) (status 830)) + (segment (start 184.0865 77.2795) (end 184.15 77.216) (width 0.4318) (layer Composant) (net 116) (status 430)) + (segment (start 184.15 78.486) (end 181.8005 78.486) (width 0.4318) (layer Composant) (net 117) (status 810)) + (segment (start 181.8005 78.486) (end 181.102 79.1845) (width 0.4318) (layer Composant) (net 117) (status 420)) + (segment (start 183.007 79.756) (end 182.245 80.518) (width 0.381) (layer Composant) (net 118)) + (segment (start 178.562 79.121) (end 179.959 80.518) (width 0.4318) (layer Composant) (net 118) (status 10)) + (segment (start 178.562 79.0575) (end 178.562 79.121) (width 0.4318) (layer Composant) (net 118) (status 830)) + (segment (start 182.245 80.518) (end 179.959 80.518) (width 0.381) (layer Composant) (net 118)) + (segment (start 184.15 79.756) (end 183.007 79.756) (width 0.381) (layer Composant) (net 118) (status 810)) + (segment (start 158.242 71.247) (end 158.242 74.676) (width 0.381) (layer Cuivre) (net 119)) + (segment (start 160.3375 71.247) (end 158.242 71.247) (width 0.381) (layer Composant) (net 119) (status 810)) + (via (at 158.242 71.247) (size 0.635) (layers Composant Cuivre) (net 119)) + (segment (start 156.21 74.676) (end 158.242 74.676) (width 0.381) (layer Composant) (net 119) (status 810)) + (via (at 158.242 74.676) (size 0.635) (layers Composant Cuivre) (net 119)) + (segment (start 154.3685 72.8345) (end 154.94 73.406) (width 0.381) (layer Composant) (net 120)) + (segment (start 153.162 72.8345) (end 154.3685 72.8345) (width 0.381) (layer Composant) (net 120) (status 810)) + (segment (start 154.94 73.406) (end 156.21 73.406) (width 0.381) (layer Composant) (net 120) (status 420)) + (segment (start 153.162 74.93) (end 153.67 75.438) (width 0.254) (layer Composant) (net 121) (status 10)) + (segment (start 153.162 74.7395) (end 153.162 74.93) (width 0.254) (layer Composant) (net 121) (status 830)) + (segment (start 154.305 75.438) (end 153.67 75.438) (width 0.381) (layer Composant) (net 121)) + (segment (start 156.21 75.946) (end 154.813 75.946) (width 0.381) (layer Composant) (net 121) (status 810)) + (segment (start 154.813 75.946) (end 154.305 75.438) (width 0.381) (layer Composant) (net 121)) + (segment (start 153.8605 77.1525) (end 153.924 77.216) (width 0.381) (layer Composant) (net 122)) + (segment (start 153.035 77.1525) (end 153.8605 77.1525) (width 0.381) (layer Composant) (net 122) (status 810)) + (segment (start 153.924 77.216) (end 156.21 77.216) (width 0.381) (layer Composant) (net 122) (status 420)) + (segment (start 153.035 79.0575) (end 153.6065 79.0575) (width 0.381) (layer Composant) (net 123) (status 830)) + (segment (start 154.178 78.486) (end 156.21 78.486) (width 0.381) (layer Composant) (net 123) (status 420)) + (segment (start 153.6065 79.0575) (end 154.178 78.486) (width 0.381) (layer Composant) (net 123) (status 10)) + (segment (start 150.876 79.756) (end 151.638 80.518) (width 0.381) (layer Composant) (net 124)) + (segment (start 150.876 79.0575) (end 150.876 79.756) (width 0.381) (layer Composant) (net 124) (status 810)) + (segment (start 155.067 79.756) (end 156.21 79.756) (width 0.381) (layer Composant) (net 124) (status 420)) + (segment (start 151.638 80.518) (end 154.305 80.518) (width 0.381) (layer Composant) (net 124)) + (segment (start 154.305 80.518) (end 155.067 79.756) (width 0.381) (layer Composant) (net 124)) + (via (at 125.222 74.676) (size 0.635) (layers Composant Cuivre) (net 125)) + (segment (start 125.222 71.247) (end 127.3175 71.247) (width 0.381) (layer Composant) (net 125) (status 420)) + (via (at 125.222 71.247) (size 0.635) (layers Composant Cuivre) (net 125)) + (segment (start 125.222 71.247) (end 125.222 74.676) (width 0.381) (layer GND_layer) (net 125)) + (segment (start 123.19 74.676) (end 125.222 74.676) (width 0.381) (layer Composant) (net 125) (status 810)) + (segment (start 120.142 77.1525) (end 121.7295 77.1525) (width 0.381) (layer Composant) (net 126) (status 810)) + (segment (start 121.793 77.216) (end 123.19 77.216) (width 0.381) (layer Composant) (net 126) (status 420)) + (segment (start 121.7295 77.1525) (end 121.793 77.216) (width 0.381) (layer Composant) (net 126)) + (segment (start 121.539 78.486) (end 120.9675 79.0575) (width 0.381) (layer Composant) (net 127)) + (segment (start 123.19 78.486) (end 121.539 78.486) (width 0.381) (layer Composant) (net 127) (status 810)) + (segment (start 120.9675 79.0575) (end 120.142 79.0575) (width 0.381) (layer Composant) (net 127) (status 420)) + (segment (start 94.361 79.629) (end 99.949 79.629) (width 0.762) (layer Composant) (net 128) (status 420)) + (segment (start 104.267 74.168) (end 99.949 78.486) (width 0.4318) (layer Composant) (net 128) (status 30)) + (segment (start 87.6935 88.8365) (end 88.9 87.63) (width 0.762) (layer Composant) (net 128) (status 420)) + (segment (start 99.949 79.629) (end 99.949 81.026) (width 0.762) (layer Composant) (net 128) (status 830)) + (segment (start 93.472 77.089) (end 93.472 78.74) (width 0.762) (layer Composant) (net 128) (status 810)) + (segment (start 93.472 78.74) (end 94.361 79.629) (width 0.762) (layer Composant) (net 128)) + (segment (start 87.6935 90.2335) (end 87.6935 88.8365) (width 0.762) (layer Composant) (net 128)) + (segment (start 97.282 83.693) (end 92.837 83.693) (width 0.762) (layer Composant) (net 128)) + (segment (start 104.267 74.1045) (end 104.267 74.168) (width 0.4318) (layer Composant) (net 128) (status 830)) + (segment (start 92.837 83.693) (end 88.9 87.63) (width 0.762) (layer Composant) (net 128) (status 420)) + (segment (start 99.949 78.486) (end 99.949 79.629) (width 0.4318) (layer Composant) (net 128) (status 430)) + (segment (start 99.949 81.026) (end 97.282 83.693) (width 0.762) (layer Composant) (net 128) (status 10)) + (segment (start 87.6935 90.2335) (end 84.836 93.091) (width 0.762) (layer Composant) (net 128)) + (segment (start 84.836 93.091) (end 81.5086 93.091) (width 0.762) (layer Composant) (net 128) (status 420)) + (segment (start 184.404 126.0475) (end 184.7215 125.73) (width 0.4318) (layer Composant) (net 129) (status 430)) + (segment (start 184.404 130.302) (end 184.404 126.0475) (width 0.4318) (layer Composant) (net 129) (status 830)) + (segment (start 184.404 130.302) (end 184.404 136.906) (width 0.4318) (layer GND_layer) (net 129) (status C30)) + (segment (start 123.19 73.406) (end 120.7135 73.406) (width 0.381) (layer Composant) (net 130) (status 810)) + (segment (start 120.7135 73.406) (end 120.142 72.8345) (width 0.381) (layer Composant) (net 130) (status 420)) + (segment (start 123.19 75.946) (end 121.793 75.946) (width 0.381) (layer Composant) (net 131) (status 810)) + (segment (start 120.142 74.93) (end 120.65 75.438) (width 0.254) (layer Composant) (net 131) (status 10)) + (segment (start 121.285 75.438) (end 120.65 75.438) (width 0.381) (layer Composant) (net 131)) + (segment (start 120.142 74.7395) (end 120.142 74.93) (width 0.254) (layer Composant) (net 131) (status 830)) + (segment (start 121.793 75.946) (end 121.285 75.438) (width 0.381) (layer Composant) (net 131)) + (segment (start 123.19 79.756) (end 122.047 79.756) (width 0.381) (layer Composant) (net 132) (status 810)) + (segment (start 122.047 79.756) (end 121.285 80.518) (width 0.381) (layer Composant) (net 132)) + (segment (start 118.999 80.518) (end 117.602 79.0575) (width 0.381) (layer Composant) (net 132) (status 420)) + (segment (start 121.285 80.518) (end 118.999 80.518) (width 0.381) (layer Composant) (net 132)) + (segment (start 152.527 88.392) (end 151.765 87.63) (width 0.254) (layer Cuivre) (net 133)) + (segment (start 161.544 127.508) (end 152.654 136.398) (width 0.254) (layer GND_layer) (net 133)) + (segment (start 161.544 119.38) (end 161.544 127.508) (width 0.254) (layer GND_layer) (net 133)) + (segment (start 160.147 117.983) (end 161.544 119.38) (width 0.254) (layer GND_layer) (net 133) (status 810)) + (segment (start 156.21 114.046) (end 156.21 92.329) (width 0.254) (layer GND_layer) (net 133)) + (segment (start 156.21 92.329) (end 154.813 90.932) (width 0.254) (layer GND_layer) (net 133)) + (segment (start 160.147 117.983) (end 156.21 114.046) (width 0.254) (layer GND_layer) (net 133) (status 810)) + (segment (start 136.779 89.027) (end 136.525 88.646) (width 0.254) (layer Composant) (net 133)) + (segment (start 136.779 91.948) (end 136.779 89.027) (width 0.254) (layer Composant) (net 133)) + (segment (start 136.8933 92.3163) (end 136.779 91.948) (width 0.254) (layer Composant) (net 133)) + (segment (start 136.017 84.709) (end 136.017 85.344) (width 0.254) (layer Cuivre) (net 133)) + (segment (start 135.763 84.455) (end 136.017 84.709) (width 0.254) (layer Cuivre) (net 133)) + (segment (start 111.76 86.487) (end 111.76 85.852) (width 0.254) (layer Cuivre) (net 133) (status 830)) + (segment (start 127.127 84.455) (end 135.763 84.455) (width 0.254) (layer Cuivre) (net 133)) + (segment (start 136.8806 93.726) (end 136.8933 92.3163) (width 0.254) (layer Composant) (net 133) (status 810)) + (segment (start 139.827 88.646) (end 136.525 88.646) (width 0.254) (layer Cuivre) (net 133)) + (segment (start 151.765 87.63) (end 140.843 87.63) (width 0.254) (layer Cuivre) (net 133)) + (segment (start 126.365 83.693) (end 127.127 84.455) (width 0.254) (layer Cuivre) (net 133)) + (segment (start 113.919 83.693) (end 126.365 83.693) (width 0.254) (layer Cuivre) (net 133)) + (segment (start 111.76 85.852) (end 113.919 83.693) (width 0.254) (layer Cuivre) (net 133) (status 10)) + (segment (start 140.843 87.63) (end 139.827 88.646) (width 0.254) (layer Cuivre) (net 133)) + (segment (start 153.035 88.392) (end 152.527 88.392) (width 0.254) (layer Cuivre) (net 133)) + (segment (start 153.543 88.392) (end 154.813 89.662) (width 0.254) (layer GND_layer) (net 133)) + (segment (start 154.813 89.662) (end 154.813 90.932) (width 0.254) (layer GND_layer) (net 133)) + (segment (start 153.035 88.392) (end 153.543 88.392) (width 0.254) (layer GND_layer) (net 133)) + (via (at 153.035 88.392) (size 0.889) (layers Composant Cuivre) (net 133)) + (segment (start 152.654 136.398) (end 152.654 138.176) (width 0.254) (layer GND_layer) (net 133)) + (segment (start 152.654 138.176) (end 153.924 139.446) (width 0.254) (layer GND_layer) (net 133) (status 420)) + (segment (start 136.017 85.344) (end 136.525 86.106) (width 0.254) (layer Composant) (net 133)) + (segment (start 136.525 86.106) (end 136.525 88.646) (width 0.254) (layer Composant) (net 133)) + (via (at 136.017 85.344) (size 0.889) (layers Composant Cuivre) (net 133)) + (via (at 136.525 88.646) (size 0.635) (layers Composant Cuivre) (net 133)) + (segment (start 98.7425 85.471) (end 97.155 85.471) (width 0.381) (layer Composant) (net 134) (status 810)) + (segment (start 95.885 86.741) (end 95.885 91.313) (width 0.381) (layer Composant) (net 134)) + (segment (start 95.885 91.313) (end 97.79 93.218) (width 0.381) (layer Composant) (net 134) (status 420)) + (segment (start 97.155 85.471) (end 95.885 86.741) (width 0.381) (layer Composant) (net 134)) + (segment (start 125.984 74.041) (end 123.317 71.374) (width 0.381) (layer Composant) (net 135)) + (segment (start 116.459 73.533) (end 113.284 73.533) (width 0.381) (layer Composant) (net 135) (status 420)) + (segment (start 118.618 71.374) (end 116.459 73.533) (width 0.381) (layer Composant) (net 135)) + (segment (start 123.317 71.374) (end 118.618 71.374) (width 0.381) (layer Composant) (net 135)) + (segment (start 125.984 76.581) (end 125.984 74.041) (width 0.381) (layer Composant) (net 135)) + (segment (start 126.619 77.216) (end 125.984 76.581) (width 0.381) (layer Composant) (net 135)) + (segment (start 128.27 77.216) (end 126.619 77.216) (width 0.381) (layer Composant) (net 135) (status 810)) + (segment (start 116.078 75.311) (end 115.57 74.803) (width 0.381) (layer Composant) (net 136)) + (segment (start 119.634 82.296) (end 117.856 80.518) (width 0.381) (layer Composant) (net 136)) + (segment (start 112.014 74.803) (end 110.744 73.533) (width 0.381) (layer Composant) (net 136) (status 420)) + (segment (start 123.19 82.296) (end 119.634 82.296) (width 0.381) (layer Composant) (net 136) (status 810)) + (segment (start 115.57 74.803) (end 112.014 74.803) (width 0.381) (layer Composant) (net 136)) + (segment (start 116.078 80.137) (end 116.078 75.311) (width 0.381) (layer Composant) (net 136)) + (segment (start 116.459 80.518) (end 116.078 80.137) (width 0.381) (layer Composant) (net 136)) + (segment (start 117.856 80.518) (end 116.459 80.518) (width 0.381) (layer Composant) (net 136)) + (segment (start 109.474 76.835) (end 109.474 74.803) (width 0.381) (layer Composant) (net 137)) + (segment (start 123.19 81.026) (end 124.079 81.026) (width 0.381) (layer Composant) (net 137) (status 810)) + (segment (start 109.982 77.343) (end 109.474 76.835) (width 0.381) (layer Composant) (net 137)) + (segment (start 114.808 77.343) (end 109.982 77.343) (width 0.381) (layer Composant) (net 137)) + (segment (start 115.316 77.851) (end 114.808 77.343) (width 0.381) (layer Composant) (net 137)) + (segment (start 124.079 81.026) (end 124.841 81.788) (width 0.381) (layer Composant) (net 137)) + (segment (start 124.841 81.788) (end 124.841 82.804) (width 0.381) (layer Composant) (net 137)) + (segment (start 119.253 83.058) (end 117.475 81.28) (width 0.381) (layer Composant) (net 137)) + (segment (start 124.841 82.804) (end 124.587 83.058) (width 0.381) (layer Composant) (net 137)) + (segment (start 109.474 74.803) (end 108.204 73.533) (width 0.381) (layer Composant) (net 137) (status 420)) + (segment (start 124.587 83.058) (end 119.253 83.058) (width 0.381) (layer Composant) (net 137)) + (segment (start 115.316 80.645) (end 115.316 77.851) (width 0.381) (layer Composant) (net 137)) + (segment (start 115.951 81.28) (end 115.316 80.645) (width 0.381) (layer Composant) (net 137)) + (segment (start 117.475 81.28) (end 115.951 81.28) (width 0.381) (layer Composant) (net 137)) + (segment (start 161.3535 102.489) (end 162.179 102.489) (width 0.381) (layer Composant) (net 138) (status 810)) + (segment (start 163.195 103.505) (end 163.195 105.918) (width 0.381) (layer Composant) (net 138)) + (segment (start 163.195 105.918) (end 163.6395 106.3625) (width 0.381) (layer Composant) (net 138)) + (segment (start 163.6395 106.3625) (end 164.846 106.3625) (width 0.381) (layer Composant) (net 138) (status 420)) + (segment (start 162.2425 108.966) (end 164.846 106.3625) (width 0.254) (layer Composant) (net 138) (status 420)) + (segment (start 162.179 102.489) (end 163.195 103.505) (width 0.381) (layer Composant) (net 138)) + (segment (start 161.544 108.966) (end 162.2425 108.966) (width 0.254) (layer Composant) (net 138) (status 810)) + (segment (start 210.439 76.835) (end 207.3275 76.835) (width 0.254) (layer Composant) (net 139) (status C30)) + (segment (start 210.439 80.645) (end 207.3275 80.645) (width 0.254) (layer Composant) (net 140) (status C30)) + (segment (start 99.949 73.279) (end 97.155 73.279) (width 0.762) (layer Composant) (net 141) (status 810)) + (segment (start 95.631 74.803) (end 90.043 74.803) (width 0.762) (layer Composant) (net 141)) + (segment (start 97.155 73.279) (end 95.631 74.803) (width 0.762) (layer Composant) (net 141)) + (segment (start 90.043 74.803) (end 86.614 71.374) (width 0.762) (layer Composant) (net 141) (status 420)) + (segment (start 75.438 66.929) (end 79.248 63.119) (width 1.524) (layer Composant) (net 142) (status 10)) + (segment (start 79.248 63.119) (end 95.885 63.119) (width 1.524) (layer Composant) (net 142) (status 420)) + (segment (start 91.694 71.374) (end 91.694 67.31) (width 1.524) (layer Composant) (net 142) (status 810)) + (segment (start 91.694 67.31) (end 95.885 63.119) (width 1.524) (layer Composant) (net 142) (status 420)) + (segment (start 75.438 67.945) (end 75.438 66.929) (width 1.524) (layer Composant) (net 142) (status 830)) + (segment (start 115.443 110.236) (end 115.062 109.855) (width 0.381) (layer Composant) (net 143) (status 430)) + (segment (start 117.348 110.236) (end 115.443 110.236) (width 0.381) (layer Composant) (net 143) (status 830)) + (segment (start 92.2655 117.094) (end 90.043 117.094) (width 0.4318) (layer Composant) (net 144) (status C30)) + (segment (start 92.2655 121.158) (end 90.043 121.158) (width 0.4318) (layer Composant) (net 145) (status C30)) + (segment (start 92.2655 125.349) (end 90.043 125.349) (width 0.4318) (layer Composant) (net 146) (status C30)) + (segment (start 92.2655 129.413) (end 90.17 129.413) (width 0.4318) (layer Composant) (net 147) (status 830)) + (segment (start 90.17 129.413) (end 90.043 129.54) (width 0.4318) (layer Composant) (net 147) (status 430)) + (segment (start 104.4575 136.2075) (end 104.14 136.525) (width 0.4318) (layer Composant) (net 148) (status 430)) + (segment (start 104.4575 133.858) (end 104.4575 136.2075) (width 0.4318) (layer Composant) (net 148) (status 830)) + (segment (start 164.846 102.108) (end 164.846 104.4575) (width 0.4318) (layer Composant) (net 149) (status C30)) + (segment (start 101.092 115.062) (end 101.092 118.872) (width 0.254) (layer GND_layer) (net 150)) + (via (at 95.758 115.062) (size 0.889) (layers Composant Cuivre) (net 150)) + (via (at 101.092 115.062) (size 0.889) (layers Composant Cuivre) (net 150)) + (segment (start 96.139 113.792) (end 97.409 113.792) (width 0.381) (layer Composant) (net 150) (status 420)) + (via (at 101.092 118.872) (size 0.889) (layers Composant Cuivre) (net 150)) + (via (at 95.758 117.602) (size 0.889) (layers Composant Cuivre) (net 150)) + (segment (start 101.092 115.062) (end 102.743 115.062) (width 0.381) (layer Composant) (net 150) (status 420)) + (segment (start 95.758 115.062) (end 95.758 117.602) (width 0.254) (layer GND_layer) (net 150)) + (segment (start 101.092 118.872) (end 102.743 118.872) (width 0.381) (layer Composant) (net 150) (status 420)) + (segment (start 101.092 115.062) (end 95.758 115.062) (width 0.4318) (layer GND_layer) (net 150)) + (segment (start 95.123 113.792) (end 94.234 112.903) (width 0.381) (layer Composant) (net 150) (status 420)) + (segment (start 96.139 113.792) (end 95.123 113.792) (width 0.381) (layer Composant) (net 150)) + (segment (start 95.5675 111.5695) (end 94.234 112.903) (width 0.381) (layer Composant) (net 150) (status 420)) + (segment (start 95.5675 110.236) (end 95.5675 111.5695) (width 0.381) (layer Composant) (net 150) (status 810)) + (segment (start 95.758 114.173) (end 96.139 113.792) (width 0.381) (layer Composant) (net 150)) + (segment (start 95.758 115.062) (end 95.758 114.173) (width 0.381) (layer Composant) (net 150)) + (segment (start 97.409 117.602) (end 95.758 117.602) (width 0.381) (layer Composant) (net 150) (status 810)) + (segment (start 181.61 118.999) (end 182.372 119.761) (width 0.381) (layer Composant) (net 151)) + (segment (start 181.61 118.999) (end 181.61 110.236) (width 0.254) (layer GND_layer) (net 151)) + (segment (start 179.705 120.904) (end 181.61 118.999) (width 0.254) (layer GND_layer) (net 151)) + (segment (start 182.499 141.351) (end 171.323 141.351) (width 0.254) (layer GND_layer) (net 151)) + (segment (start 171.323 141.351) (end 170.434 140.462) (width 0.254) (layer GND_layer) (net 151)) + (segment (start 170.434 140.462) (end 170.434 131.953) (width 0.254) (layer GND_layer) (net 151)) + (segment (start 179.705 123.317) (end 175.133 127.889) (width 0.254) (layer GND_layer) (net 151)) + (via (at 181.61 118.999) (size 0.889) (layers Composant Cuivre) (net 151)) + (via (at 172.466 92.964) (size 0.889) (layers Composant Cuivre) (net 151)) + (segment (start 184.404 139.446) (end 182.499 141.351) (width 0.254) (layer GND_layer) (net 151) (status 810)) + (via (at 150.495 95.25) (size 0.889) (layers Composant Cuivre) (net 151)) + (via (at 181.61 110.236) (size 0.635) (layers Composant Cuivre) (net 151)) + (segment (start 179.705 120.904) (end 179.705 123.317) (width 0.254) (layer GND_layer) (net 151)) + (segment (start 174.498 127.889) (end 170.434 131.953) (width 0.254) (layer GND_layer) (net 151)) + (segment (start 175.133 127.889) (end 174.498 127.889) (width 0.254) (layer GND_layer) (net 151)) + (segment (start 188.7982 105.3211) (end 188.9887 105.5116) (width 0.254) (layer Composant) (net 151)) + (segment (start 188.9887 105.5116) (end 190.9445 105.5116) (width 0.254) (layer Composant) (net 151) (status 420)) + (segment (start 181.61 110.236) (end 183.8833 110.236) (width 0.254) (layer 3.3V_layer) (net 151)) + (segment (start 183.8833 110.236) (end 188.7982 105.3211) (width 0.254) (layer 3.3V_layer) (net 151)) + (segment (start 150.495 95.25) (end 156.718 95.25) (width 0.254) (layer Cuivre) (net 151)) + (via (at 188.7982 105.3211) (size 0.889) (layers Composant Cuivre) (net 151)) + (segment (start 182.372 119.761) (end 183.769 119.761) (width 0.381) (layer Composant) (net 151)) + (segment (start 183.769 119.761) (end 184.7215 121.158) (width 0.381) (layer Composant) (net 151) (status 420)) + (segment (start 147.574 101.981) (end 143.129 101.9556) (width 0.254) (layer Composant) (net 151) (status 420)) + (segment (start 148.717 100.838) (end 147.574 101.981) (width 0.254) (layer Composant) (net 151)) + (segment (start 148.717 97.028) (end 148.717 100.838) (width 0.254) (layer Composant) (net 151)) + (segment (start 150.495 95.25) (end 148.717 97.028) (width 0.254) (layer Composant) (net 151)) + (segment (start 179.451 110.236) (end 181.61 110.236) (width 0.254) (layer GND_layer) (net 151)) + (segment (start 178.562 111.125) (end 179.451 110.236) (width 0.254) (layer GND_layer) (net 151)) + (segment (start 175.641 111.125) (end 178.562 111.125) (width 0.254) (layer GND_layer) (net 151)) + (segment (start 156.718 95.25) (end 160.528 91.44) (width 0.254) (layer Cuivre) (net 151)) + (segment (start 160.528 91.44) (end 163.576 91.44) (width 0.254) (layer Cuivre) (net 151)) + (segment (start 163.576 91.44) (end 165.989 93.853) (width 0.254) (layer Cuivre) (net 151)) + (segment (start 165.989 93.853) (end 170.561 93.853) (width 0.254) (layer Cuivre) (net 151)) + (segment (start 170.561 93.853) (end 171.45 92.964) (width 0.254) (layer Cuivre) (net 151)) + (segment (start 171.45 92.964) (end 172.466 92.964) (width 0.254) (layer Cuivre) (net 151)) + (segment (start 172.466 92.964) (end 172.466 107.95) (width 0.254) (layer GND_layer) (net 151)) + (segment (start 172.466 107.95) (end 175.641 111.125) (width 0.254) (layer GND_layer) (net 151)) + (segment (start 171.704 132.207) (end 171.704 136.906) (width 0.254) (layer GND_layer) (net 152) (status 420)) + (segment (start 171.704 132.207) (end 181.102 122.809) (width 0.254) (layer GND_layer) (net 152)) + (segment (start 182.245 107.569) (end 182.499 107.823) (width 0.254) (layer GND_layer) (net 152)) + (segment (start 182.499 107.823) (end 182.499 119.888) (width 0.254) (layer GND_layer) (net 152)) + (segment (start 181.61 107.569) (end 182.245 107.569) (width 0.254) (layer GND_layer) (net 152)) + (segment (start 152.4 85.852) (end 152.4 84.836) (width 0.254) (layer Composant) (net 152)) + (segment (start 146.177 92.075) (end 152.4 85.852) (width 0.254) (layer Composant) (net 152)) + (segment (start 181.61 107.569) (end 181.102 107.569) (width 0.254) (layer GND_layer) (net 152)) + (segment (start 144.7038 96.4692) (end 146.177 94.996) (width 0.254) (layer Composant) (net 152)) + (segment (start 143.129 96.4692) (end 144.7038 96.4692) (width 0.254) (layer Composant) (net 152) (status 810)) + (segment (start 183.65978 105.51922) (end 181.61 107.569) (width 0.254) (layer Cuivre) (net 152)) + (segment (start 183.65978 100.82022) (end 183.65978 105.51922) (width 0.254) (layer Cuivre) (net 152)) + (segment (start 196.42582 88.05418) (end 183.65978 100.82022) (width 0.254) (layer Cuivre) (net 152)) + (segment (start 197.485 88.05418) (end 196.42582 88.05418) (width 0.254) (layer Cuivre) (net 152)) + (segment (start 197.485 86.995) (end 197.485 88.05418) (width 0.254) (layer Cuivre) (net 152) (status 810)) + (segment (start 183.0451 109.0041) (end 190.9445 109.0041) (width 0.254) (layer Composant) (net 152) (status 420)) + (segment (start 181.102 107.569) (end 178.435 104.902) (width 0.254) (layer GND_layer) (net 152)) + (segment (start 178.435 104.902) (end 178.435 90.551) (width 0.254) (layer GND_layer) (net 152)) + (segment (start 178.435 90.551) (end 179.959 89.027) (width 0.254) (layer GND_layer) (net 152)) + (segment (start 179.959 89.027) (end 179.959 77.597) (width 0.254) (layer GND_layer) (net 152)) + (segment (start 179.959 77.597) (end 178.181 75.819) (width 0.254) (layer GND_layer) (net 152)) + (segment (start 178.181 75.819) (end 176.911 75.819) (width 0.254) (layer GND_layer) (net 152)) + (segment (start 176.911 75.819) (end 173.99 78.74) (width 0.254) (layer GND_layer) (net 152)) + (segment (start 173.99 78.74) (end 173.99 80.264) (width 0.254) (layer GND_layer) (net 152)) + (segment (start 173.99 80.264) (end 172.085 82.169) (width 0.254) (layer GND_layer) (net 152) (status 420)) + (segment (start 172.085 82.169) (end 170.942 83.312) (width 0.254) (layer Cuivre) (net 152) (status 810)) + (segment (start 170.942 83.312) (end 168.656 83.312) (width 0.254) (layer Cuivre) (net 152)) + (segment (start 168.656 83.312) (end 168.275 82.931) (width 0.254) (layer Cuivre) (net 152)) + (segment (start 168.275 82.931) (end 164.846 82.931) (width 0.254) (layer Cuivre) (net 152)) + (segment (start 164.973 82.804) (end 164.846 82.931) (width 0.254) (layer Cuivre) (net 152)) + (segment (start 154.432 82.804) (end 164.973 82.804) (width 0.254) (layer Cuivre) (net 152)) + (segment (start 152.4 84.836) (end 154.432 82.804) (width 0.254) (layer Cuivre) (net 152)) + (via (at 181.61 107.569) (size 0.635) (layers Composant Cuivre) (net 152)) + (via (at 152.4 84.836) (size 0.889) (layers Composant Cuivre) (net 152)) + (segment (start 181.102 122.809) (end 181.102 121.285) (width 0.254) (layer GND_layer) (net 152)) + (segment (start 146.177 94.996) (end 146.177 92.075) (width 0.254) (layer Composant) (net 152)) + (segment (start 181.61 107.569) (end 183.0451 109.0041) (width 0.254) (layer Composant) (net 152)) + (segment (start 181.102 121.285) (end 182.499 119.888) (width 0.254) (layer GND_layer) (net 152)) + (via (at 163.322 93.472) (size 0.889) (layers Composant Cuivre) (net 153)) + (via (at 179.197 93.726) (size 0.635) (layers Composant Cuivre) (net 153)) + (segment (start 146.685 95.25) (end 146.812 94.869) (width 0.254) (layer Composant) (net 153)) + (segment (start 144.9578 96.9772) (end 146.685 95.25) (width 0.254) (layer Composant) (net 153)) + (segment (start 143.129 96.9772) (end 144.9578 96.9772) (width 0.254) (layer Composant) (net 153) (status 810)) + (segment (start 164.465 94.615) (end 163.322 93.472) (width 0.254) (layer Cuivre) (net 153)) + (segment (start 178.816 94.615) (end 164.465 94.615) (width 0.254) (layer Cuivre) (net 153)) + (segment (start 179.197 94.234) (end 178.816 94.615) (width 0.254) (layer Cuivre) (net 153)) + (segment (start 179.197 93.726) (end 179.197 94.234) (width 0.254) (layer Cuivre) (net 153)) + (segment (start 158.369 91.44) (end 158.623 91.2495) (width 0.381) (layer Composant) (net 153) (status 430)) + (segment (start 156.337 91.44) (end 158.369 91.44) (width 0.381) (layer Composant) (net 153) (status 20)) + (segment (start 154.813 89.916) (end 156.337 91.44) (width 0.381) (layer Composant) (net 153)) + (segment (start 149.352 89.916) (end 154.813 89.916) (width 0.381) (layer Composant) (net 153)) + (segment (start 179.197 93.726) (end 178.943 94.234) (width 0.254) (layer GND_layer) (net 153)) + (segment (start 146.812 92.456) (end 149.352 89.916) (width 0.381) (layer Composant) (net 153)) + (segment (start 146.812 94.869) (end 146.812 92.456) (width 0.254) (layer Composant) (net 153)) + (segment (start 160.782 93.472) (end 163.322 93.472) (width 0.381) (layer Composant) (net 153)) + (segment (start 158.623 91.2495) (end 160.782 93.472) (width 0.381) (layer Composant) (net 153) (status 810)) + (segment (start 180.594 140.716) (end 181.864 139.446) (width 0.254) (layer GND_layer) (net 153) (status 420)) + (segment (start 173.736 140.716) (end 180.594 140.716) (width 0.254) (layer GND_layer) (net 153)) + (segment (start 172.974 139.954) (end 173.736 140.716) (width 0.254) (layer GND_layer) (net 153)) + (segment (start 172.974 131.826) (end 172.974 139.954) (width 0.254) (layer GND_layer) (net 153)) + (segment (start 172.974 131.826) (end 183.007 121.793) (width 0.254) (layer GND_layer) (net 153)) + (segment (start 183.007 107.442) (end 183.007 121.793) (width 0.254) (layer GND_layer) (net 153)) + (segment (start 182.245 106.68) (end 183.007 107.442) (width 0.254) (layer GND_layer) (net 153)) + (segment (start 181.102 106.68) (end 182.245 106.68) (width 0.254) (layer GND_layer) (net 153)) + (segment (start 178.943 104.521) (end 181.102 106.68) (width 0.254) (layer GND_layer) (net 153)) + (segment (start 178.943 94.234) (end 178.943 104.521) (width 0.254) (layer GND_layer) (net 153)) + (segment (start 131.445 102.108) (end 130.937 102.616) (width 0.254) (layer Composant) (net 154)) + (segment (start 129.921 102.616) (end 128.778 101.473) (width 0.254) (layer Composant) (net 154)) + (segment (start 132.334 135.89) (end 132.334 139.954) (width 0.254) (layer Cuivre) (net 154)) + (segment (start 128.778 101.473) (end 127.635 101.473) (width 0.254) (layer Composant) (net 154) (status 420)) + (via (at 132.588 102.87) (size 0.635) (layers Composant Cuivre) (net 154)) + (segment (start 167.894 140.208) (end 167.894 138.176) (width 0.254) (layer Cuivre) (net 154)) + (segment (start 130.937 102.616) (end 129.921 102.616) (width 0.254) (layer Composant) (net 154)) + (segment (start 132.334 102.489) (end 131.953 102.108) (width 0.254) (layer Composant) (net 154)) + (segment (start 132.588 102.87) (end 132.334 102.489) (width 0.254) (layer Composant) (net 154)) + (segment (start 167.894 138.176) (end 169.164 136.906) (width 0.254) (layer Cuivre) (net 154) (status 420)) + (segment (start 132.588 102.87) (end 132.588 105.918) (width 0.254) (layer GND_layer) (net 154)) + (segment (start 132.588 105.918) (end 131.445 107.061) (width 0.254) (layer GND_layer) (net 154)) + (segment (start 131.445 107.061) (end 131.445 126.238) (width 0.254) (layer GND_layer) (net 154)) + (segment (start 131.445 126.238) (end 133.604 128.397) (width 0.254) (layer GND_layer) (net 154)) + (segment (start 133.604 128.397) (end 133.604 135.001) (width 0.254) (layer GND_layer) (net 154)) + (segment (start 133.604 135.001) (end 133.604 134.493) (width 0.254) (layer Cuivre) (net 154)) + (segment (start 133.604 134.493) (end 133.35 134.239) (width 0.254) (layer Cuivre) (net 154)) + (segment (start 133.35 134.239) (end 132.461 134.239) (width 0.254) (layer Cuivre) (net 154)) + (segment (start 132.461 134.239) (end 131.953 134.747) (width 0.254) (layer Cuivre) (net 154)) + (segment (start 131.953 134.747) (end 131.953 135.509) (width 0.254) (layer Cuivre) (net 154)) + (segment (start 131.953 135.509) (end 132.334 135.89) (width 0.254) (layer Cuivre) (net 154)) + (segment (start 132.334 139.954) (end 133.604 141.224) (width 0.254) (layer Cuivre) (net 154)) + (segment (start 133.604 141.224) (end 166.878 141.224) (width 0.254) (layer Cuivre) (net 154)) + (segment (start 166.878 141.224) (end 167.894 140.208) (width 0.254) (layer Cuivre) (net 154)) + (via (at 133.604 135.001) (size 0.635) (layers Composant Cuivre) (net 154)) + (segment (start 131.953 102.108) (end 131.445 102.108) (width 0.254) (layer Composant) (net 154)) + (segment (start 132.715 135.509) (end 132.715 135.001) (width 0.254) (layer Cuivre) (net 155)) + (segment (start 132.715 135.001) (end 130.937 133.223) (width 0.254) (layer GND_layer) (net 155)) + (segment (start 130.937 133.223) (end 130.937 129.413) (width 0.254) (layer GND_layer) (net 155)) + (via (at 132.715 135.001) (size 0.635) (layers Composant Cuivre) (net 155)) + (segment (start 166.624 136.906) (end 165.354 138.176) (width 0.254) (layer Cuivre) (net 155) (status 810)) + (segment (start 132.969 135.763) (end 132.715 135.509) (width 0.254) (layer Cuivre) (net 155)) + (segment (start 134.62 135.763) (end 132.969 135.763) (width 0.254) (layer Cuivre) (net 155)) + (segment (start 134.874 136.017) (end 134.62 135.763) (width 0.254) (layer Cuivre) (net 155)) + (segment (start 134.874 139.954) (end 134.874 136.017) (width 0.254) (layer Cuivre) (net 155)) + (segment (start 135.636 140.716) (end 134.874 139.954) (width 0.254) (layer Cuivre) (net 155)) + (segment (start 164.719 140.716) (end 135.636 140.716) (width 0.254) (layer Cuivre) (net 155)) + (segment (start 165.354 140.081) (end 164.719 140.716) (width 0.254) (layer Cuivre) (net 155)) + (segment (start 165.354 138.176) (end 165.354 140.081) (width 0.254) (layer Cuivre) (net 155)) + (segment (start 130.556 109.601) (end 128.651 107.696) (width 0.254) (layer GND_layer) (net 155)) + (segment (start 128.651 107.696) (end 128.651 99.568) (width 0.254) (layer GND_layer) (net 155)) + (segment (start 128.651 99.568) (end 129.159 99.06) (width 0.254) (layer GND_layer) (net 155)) + (segment (start 127.635 98.9838) (end 128.7526 98.9584) (width 0.254) (layer Composant) (net 155) (status 810)) + (segment (start 128.7526 98.9584) (end 129.159 99.06) (width 0.254) (layer Composant) (net 155)) + (via (at 129.159 99.06) (size 0.889) (layers Composant Cuivre) (net 155)) + (segment (start 130.556 109.601) (end 130.556 129.032) (width 0.254) (layer GND_layer) (net 155)) + (segment (start 130.556 129.032) (end 130.937 129.413) (width 0.254) (layer GND_layer) (net 155)) + (segment (start 188.43752 106.18978) (end 189.16142 106.18978) (width 0.254) (layer Composant) (net 156)) + (segment (start 147.32 101.473) (end 143.129 101.473) (width 0.254) (layer Composant) (net 156) (status 420)) + (via (at 179.705 92.202) (size 0.635) (layers Composant Cuivre) (net 156)) + (via (at 181.61 104.902) (size 0.635) (layers Composant Cuivre) (net 156)) + (via (at 149.352 95.25) (size 0.635) (layers Composant Cuivre) (net 156)) + (via (at 184.531 118.872) (size 0.889) (layers Composant Cuivre) (net 156)) + (segment (start 175.514 130.937) (end 175.514 138.176) (width 0.254) (layer GND_layer) (net 156)) + (segment (start 148.209 100.584) (end 147.32 101.473) (width 0.254) (layer Composant) (net 156)) + (segment (start 189.3443 106.0069) (end 190.9445 106.0069) (width 0.254) (layer Composant) (net 156) (status 420)) + (segment (start 189.16142 106.18978) (end 189.3443 106.0069) (width 0.254) (layer Composant) (net 156)) + (segment (start 148.209 96.647) (end 148.209 100.584) (width 0.254) (layer Composant) (net 156)) + (segment (start 149.098 95.758) (end 148.209 96.647) (width 0.254) (layer Composant) (net 156)) + (segment (start 149.352 95.25) (end 149.098 95.758) (width 0.254) (layer Composant) (net 156)) + (segment (start 182.245 104.902) (end 181.61 104.902) (width 0.254) (layer GND_layer) (net 156)) + (segment (start 181.61 104.902) (end 187.14974 104.902) (width 0.254) (layer Composant) (net 156)) + (segment (start 184.531 107.188) (end 182.245 104.902) (width 0.254) (layer GND_layer) (net 156)) + (segment (start 184.7215 123.444) (end 185.928 122.2375) (width 0.254) (layer Composant) (net 156) (status 810)) + (segment (start 180.467 92.964) (end 179.705 92.202) (width 0.254) (layer GND_layer) (net 156)) + (segment (start 180.467 104.267) (end 180.467 92.964) (width 0.254) (layer GND_layer) (net 156)) + (segment (start 185.928 122.2375) (end 185.928 119.253) (width 0.254) (layer Composant) (net 156)) + (segment (start 185.928 119.253) (end 185.547 118.872) (width 0.254) (layer Composant) (net 156)) + (segment (start 185.547 118.872) (end 184.531 118.872) (width 0.254) (layer Composant) (net 156)) + (segment (start 184.531 118.872) (end 184.531 107.188) (width 0.254) (layer GND_layer) (net 156)) + (segment (start 187.14974 104.902) (end 188.43752 106.18978) (width 0.254) (layer Composant) (net 156)) + (segment (start 181.102 104.902) (end 180.467 104.267) (width 0.254) (layer GND_layer) (net 156)) + (segment (start 181.61 104.902) (end 181.102 104.902) (width 0.254) (layer GND_layer) (net 156)) + (segment (start 179.197 91.694) (end 179.705 92.202) (width 0.254) (layer Cuivre) (net 156)) + (segment (start 177.927 91.694) (end 179.197 91.694) (width 0.254) (layer Cuivre) (net 156)) + (segment (start 177.419 91.186) (end 177.927 91.694) (width 0.254) (layer Cuivre) (net 156)) + (segment (start 175.514 91.186) (end 177.419 91.186) (width 0.254) (layer Cuivre) (net 156)) + (segment (start 175.006 91.694) (end 175.514 91.186) (width 0.254) (layer Cuivre) (net 156)) + (segment (start 171.45 91.694) (end 175.006 91.694) (width 0.254) (layer Cuivre) (net 156)) + (segment (start 169.799 93.345) (end 171.45 91.694) (width 0.254) (layer Cuivre) (net 156)) + (segment (start 166.37 93.345) (end 169.799 93.345) (width 0.254) (layer Cuivre) (net 156)) + (segment (start 163.957 90.932) (end 166.37 93.345) (width 0.254) (layer Cuivre) (net 156)) + (segment (start 160.274 90.932) (end 163.957 90.932) (width 0.254) (layer Cuivre) (net 156)) + (segment (start 156.718 94.488) (end 160.274 90.932) (width 0.254) (layer Cuivre) (net 156)) + (segment (start 149.606 94.488) (end 156.718 94.488) (width 0.254) (layer Cuivre) (net 156)) + (segment (start 149.352 94.742) (end 149.606 94.488) (width 0.254) (layer Cuivre) (net 156)) + (segment (start 149.352 95.25) (end 149.352 94.742) (width 0.254) (layer Cuivre) (net 156)) + (segment (start 184.531 118.872) (end 184.531 121.92) (width 0.254) (layer GND_layer) (net 156)) + (segment (start 175.514 130.937) (end 184.531 121.92) (width 0.254) (layer GND_layer) (net 156)) + (segment (start 176.784 139.446) (end 175.514 138.176) (width 0.254) (layer GND_layer) (net 156) (status 810)) + (segment (start 173.101 88.138) (end 172.466 88.773) (width 0.254) (layer Cuivre) (net 157)) + (segment (start 172.466 88.773) (end 165.735 88.773) (width 0.254) (layer Cuivre) (net 157)) + (segment (start 165.735 88.773) (end 165.1 88.138) (width 0.254) (layer Cuivre) (net 157)) + (segment (start 165.1 88.138) (end 158.623 88.138) (width 0.254) (layer Cuivre) (net 157)) + (segment (start 158.623 88.138) (end 157.099 89.662) (width 0.254) (layer Cuivre) (net 157)) + (segment (start 181.61 108.458) (end 181.102 108.458) (width 0.254) (layer GND_layer) (net 157)) + (segment (start 181.102 108.458) (end 179.07 106.426) (width 0.254) (layer GND_layer) (net 157)) + (segment (start 179.07 106.426) (end 177.673 106.426) (width 0.254) (layer GND_layer) (net 157)) + (segment (start 177.673 106.426) (end 177.292 106.045) (width 0.254) (layer GND_layer) (net 157)) + (segment (start 177.292 106.045) (end 177.292 90.17) (width 0.254) (layer GND_layer) (net 157)) + (segment (start 177.292 90.17) (end 178.181 89.281) (width 0.254) (layer GND_layer) (net 157)) + (segment (start 178.181 89.281) (end 178.308 88.773) (width 0.254) (layer GND_layer) (net 157)) + (via (at 193.294 105.41) (size 0.889) (layers Composant Cuivre) (net 157)) + (via (at 157.099 89.662) (size 0.635) (layers Composant Cuivre) (net 157)) + (via (at 133.35 96.012) (size 0.889) (layers Composant Cuivre) (net 157)) + (via (at 181.61 108.458) (size 0.635) (layers Composant Cuivre) (net 157)) + (segment (start 156.591 89.662) (end 155.575 90.678) (width 0.254) (layer Cuivre) (net 157)) + (via (at 178.308 88.773) (size 0.635) (layers Composant Cuivre) (net 157)) + (segment (start 193.294 105.41) (end 192.00368 106.6546) (width 0.254) (layer Composant) (net 157)) + (segment (start 192.00368 106.6546) (end 192.00368 108.0135) (width 0.254) (layer Composant) (net 157)) + (segment (start 181.61 108.458) (end 183.81472 106.25328) (width 0.254) (layer Cuivre) (net 157)) + (segment (start 183.81472 106.25328) (end 192.405 106.25328) (width 0.254) (layer Cuivre) (net 157)) + (segment (start 192.405 106.25328) (end 193.294 105.41) (width 0.254) (layer Cuivre) (net 157)) + (segment (start 190.9445 108.0135) (end 192.00368 108.0135) (width 0.254) (layer Composant) (net 157) (status 810)) + (segment (start 164.084 136.906) (end 164.084 135.382) (width 0.254) (layer GND_layer) (net 157) (status 810)) + (segment (start 164.084 135.382) (end 167.44 132.026) (width 0.254) (layer GND_layer) (net 157)) + (segment (start 167.44 132.026) (end 167.44 116.767) (width 0.254) (layer GND_layer) (net 157)) + (segment (start 167.44 116.767) (end 159.766 109.093) (width 0.254) (layer GND_layer) (net 157)) + (segment (start 159.766 109.093) (end 159.766 91.821) (width 0.254) (layer GND_layer) (net 157)) + (segment (start 159.766 91.821) (end 157.607 89.662) (width 0.254) (layer GND_layer) (net 157)) + (segment (start 157.607 89.662) (end 157.099 89.662) (width 0.254) (layer GND_layer) (net 157)) + (segment (start 133.3754 93.726) (end 133.4008 95.5294) (width 0.254) (layer Composant) (net 157) (status 810)) + (segment (start 133.4008 95.5294) (end 133.35 96.012) (width 0.254) (layer Composant) (net 157)) + (segment (start 157.099 89.662) (end 156.591 89.662) (width 0.254) (layer Cuivre) (net 157)) + (segment (start 175.387 88.138) (end 173.101 88.138) (width 0.254) (layer Cuivre) (net 157)) + (segment (start 176.022 88.773) (end 175.387 88.138) (width 0.254) (layer Cuivre) (net 157)) + (segment (start 178.308 88.773) (end 176.022 88.773) (width 0.254) (layer Cuivre) (net 157)) + (segment (start 137.795 91.44) (end 133.8675 95.3675) (width 0.254) (layer Cuivre) (net 157)) + (segment (start 151.765 91.44) (end 137.795 91.44) (width 0.254) (layer Cuivre) (net 157)) + (segment (start 152.527 90.678) (end 151.765 91.44) (width 0.254) (layer Cuivre) (net 157)) + (segment (start 155.575 90.678) (end 152.527 90.678) (width 0.254) (layer Cuivre) (net 157)) + (segment (start 133.8675 95.4945) (end 133.35 96.012) (width 0.2) (layer Cuivre) (net 157) (tstamp 53D8E5CE)) + (segment (start 133.8675 95.3675) (end 133.8675 95.4945) (width 0.2) (layer Cuivre) (net 157)) + (segment (start 174.244 139.446) (end 172.974 138.176) (width 0.254) (layer 3.3V_layer) (net 158) (status 810)) + (segment (start 146.05 128.27) (end 143.383 125.603) (width 0.254) (layer 3.3V_layer) (net 158)) + (segment (start 165.735 128.27) (end 146.05 128.27) (width 0.254) (layer 3.3V_layer) (net 158)) + (segment (start 132.334 105.41) (end 131.826 104.902) (width 0.254) (layer 3.3V_layer) (net 158)) + (segment (start 172.974 138.176) (end 172.974 135.509) (width 0.254) (layer 3.3V_layer) (net 158)) + (segment (start 129.0574 103.9622) (end 127.635 103.9876) (width 0.254) (layer Composant) (net 158) (status 420)) + (segment (start 129.286 104.14) (end 129.0574 103.9622) (width 0.254) (layer Composant) (net 158)) + (segment (start 130.81 104.14) (end 129.286 104.14) (width 0.254) (layer Composant) (net 158)) + (segment (start 131.191 104.521) (end 130.81 104.14) (width 0.254) (layer Composant) (net 158)) + (segment (start 131.318 104.902) (end 131.191 104.521) (width 0.254) (layer Composant) (net 158)) + (segment (start 172.974 135.509) (end 165.735 128.27) (width 0.254) (layer 3.3V_layer) (net 158)) + (segment (start 131.826 104.902) (end 131.318 104.902) (width 0.254) (layer 3.3V_layer) (net 158)) + (via (at 131.318 104.902) (size 0.635) (layers Composant Cuivre) (net 158)) + (segment (start 132.334 112.903) (end 132.334 105.41) (width 0.254) (layer 3.3V_layer) (net 158)) + (segment (start 134.239 114.808) (end 132.334 112.903) (width 0.254) (layer 3.3V_layer) (net 158)) + (segment (start 143.383 125.603) (end 137.414 125.603) (width 0.254) (layer 3.3V_layer) (net 158)) + (segment (start 137.414 125.603) (end 134.239 122.428) (width 0.254) (layer 3.3V_layer) (net 158)) + (segment (start 134.239 122.428) (end 134.239 114.808) (width 0.254) (layer 3.3V_layer) (net 158)) + (segment (start 134.747 96.393) (end 134.747 95.504) (width 0.254) (layer Cuivre) (net 159)) + (segment (start 134.112 97.028) (end 134.747 96.393) (width 0.254) (layer Cuivre) (net 159)) + (segment (start 188.37402 108.02112) (end 188.88964 107.5055) (width 0.254) (layer Composant) (net 159)) + (segment (start 188.88964 107.5055) (end 190.9445 107.5055) (width 0.254) (layer Composant) (net 159) (status 420)) + (segment (start 178.689 106.934) (end 176.911 106.934) (width 0.254) (layer GND_layer) (net 159)) + (segment (start 181.61 109.347) (end 187.04814 109.347) (width 0.254) (layer Cuivre) (net 159)) + (segment (start 187.04814 109.347) (end 188.37402 108.02112) (width 0.254) (layer Cuivre) (net 159)) + (segment (start 181.61 109.347) (end 181.102 109.347) (width 0.254) (layer GND_layer) (net 159)) + (segment (start 159.258 92.71) (end 157.099 90.551) (width 0.254) (layer GND_layer) (net 159)) + (via (at 188.37402 108.02112) (size 0.889) (layers Composant Cuivre) (net 159)) + (via (at 181.61 109.347) (size 0.635) (layers Composant Cuivre) (net 159)) + (via (at 157.099 90.551) (size 0.635) (layers Composant Cuivre) (net 159)) + (via (at 177.038 89.408) (size 0.635) (layers Composant Cuivre) (net 159)) + (via (at 134.112 97.028) (size 0.889) (layers Composant Cuivre) (net 159)) + (segment (start 134.112 97.028) (end 134.112 95.631) (width 0.254) (layer Composant) (net 159)) + (segment (start 134.747 95.504) (end 138.303 91.948) (width 0.254) (layer Cuivre) (net 159)) + (segment (start 159.258 109.347) (end 159.258 92.71) (width 0.254) (layer GND_layer) (net 159)) + (segment (start 166.932 117.021) (end 159.258 109.347) (width 0.254) (layer GND_layer) (net 159)) + (segment (start 166.932 131.518) (end 166.932 117.021) (width 0.254) (layer GND_layer) (net 159)) + (segment (start 161.544 136.906) (end 166.932 131.518) (width 0.254) (layer GND_layer) (net 159) (status 810)) + (segment (start 133.8834 95.4024) (end 134.112 95.631) (width 0.254) (layer Composant) (net 159)) + (segment (start 181.102 109.347) (end 178.689 106.934) (width 0.254) (layer GND_layer) (net 159)) + (segment (start 133.8834 93.726) (end 133.8834 95.4024) (width 0.254) (layer Composant) (net 159) (status 810)) + (segment (start 156.464 91.186) (end 157.099 90.551) (width 0.254) (layer Cuivre) (net 159)) + (segment (start 152.781 91.186) (end 156.464 91.186) (width 0.254) (layer Cuivre) (net 159)) + (segment (start 152.019 91.948) (end 152.781 91.186) (width 0.254) (layer Cuivre) (net 159)) + (segment (start 138.303 91.948) (end 152.019 91.948) (width 0.254) (layer Cuivre) (net 159)) + (segment (start 157.607 90.551) (end 157.099 90.551) (width 0.254) (layer Cuivre) (net 159)) + (segment (start 159.512 88.646) (end 157.607 90.551) (width 0.254) (layer Cuivre) (net 159)) + (segment (start 164.846 88.646) (end 159.512 88.646) (width 0.254) (layer Cuivre) (net 159)) + (segment (start 165.481 89.281) (end 164.846 88.646) (width 0.254) (layer Cuivre) (net 159)) + (segment (start 172.974 89.281) (end 165.481 89.281) (width 0.254) (layer Cuivre) (net 159)) + (segment (start 173.609 88.646) (end 172.974 89.281) (width 0.254) (layer Cuivre) (net 159)) + (segment (start 175.133 88.646) (end 173.609 88.646) (width 0.254) (layer Cuivre) (net 159)) + (segment (start 175.895 89.408) (end 175.133 88.646) (width 0.254) (layer Cuivre) (net 159)) + (segment (start 177.038 89.408) (end 175.895 89.408) (width 0.254) (layer Cuivre) (net 159)) + (segment (start 174.752 91.694) (end 177.038 89.408) (width 0.254) (layer GND_layer) (net 159)) + (segment (start 174.752 104.775) (end 174.752 91.694) (width 0.254) (layer GND_layer) (net 159)) + (segment (start 176.911 106.934) (end 174.752 104.775) (width 0.254) (layer GND_layer) (net 159)) + (segment (start 170.434 138.176) (end 171.704 139.446) (width 0.254) (layer 3.3V_layer) (net 160) (status 420)) + (segment (start 131.826 113.919) (end 133.35 115.443) (width 0.254) (layer 3.3V_layer) (net 160)) + (segment (start 133.35 115.443) (end 133.35 122.809) (width 0.254) (layer 3.3V_layer) (net 160)) + (segment (start 133.35 122.809) (end 138.684 128.143) (width 0.254) (layer 3.3V_layer) (net 160)) + (segment (start 138.684 128.143) (end 143.51 128.143) (width 0.254) (layer 3.3V_layer) (net 160)) + (segment (start 143.51 128.143) (end 144.78 129.413) (width 0.254) (layer 3.3V_layer) (net 160)) + (segment (start 144.78 129.413) (end 163.576 129.413) (width 0.254) (layer 3.3V_layer) (net 160)) + (segment (start 163.576 129.413) (end 170.434 136.271) (width 0.254) (layer 3.3V_layer) (net 160)) + (via (at 130.429 104.902) (size 0.635) (layers Composant Cuivre) (net 160)) + (segment (start 131.445 105.664) (end 131.826 106.045) (width 0.254) (layer 3.3V_layer) (net 160)) + (segment (start 130.683 105.664) (end 131.445 105.664) (width 0.254) (layer 3.3V_layer) (net 160)) + (segment (start 130.429 105.41) (end 130.683 105.664) (width 0.254) (layer 3.3V_layer) (net 160)) + (segment (start 130.429 104.902) (end 130.429 105.41) (width 0.254) (layer 3.3V_layer) (net 160)) + (segment (start 130.048 104.648) (end 130.429 104.902) (width 0.254) (layer Composant) (net 160)) + (segment (start 129.159 104.648) (end 130.048 104.648) (width 0.254) (layer Composant) (net 160)) + (segment (start 128.9304 104.4702) (end 129.159 104.648) (width 0.254) (layer Composant) (net 160)) + (segment (start 127.635 104.4702) (end 128.9304 104.4702) (width 0.254) (layer Composant) (net 160) (status 810)) + (segment (start 170.434 136.271) (end 170.434 138.176) (width 0.254) (layer 3.3V_layer) (net 160)) + (segment (start 131.826 106.045) (end 131.826 113.919) (width 0.254) (layer 3.3V_layer) (net 160)) + (segment (start 189.05728 104.34828) (end 187.9346 104.34828) (width 0.254) (layer 3.3V_layer) (net 161)) + (segment (start 157.226 87.884) (end 158.369 87.122) (width 0.254) (layer Cuivre) (net 161)) + (segment (start 174.117 91.186) (end 174.117 105.537) (width 0.254) (layer GND_layer) (net 161)) + (segment (start 187.9346 104.34828) (end 185.3311 106.95178) (width 0.254) (layer 3.3V_layer) (net 161)) + (segment (start 185.3311 106.95178) (end 179.324 106.95178) (width 0.254) (layer 3.3V_layer) (net 161)) + (segment (start 192.00368 108.5088) (end 192.00368 108.50626) (width 0.254) (layer Composant) (net 161)) + (segment (start 192.00368 108.50626) (end 193.07556 108.50626) (width 0.254) (layer Composant) (net 161)) + (segment (start 193.07556 108.50626) (end 193.12636 108.45546) (width 0.254) (layer Composant) (net 161)) + (segment (start 190.9445 108.5088) (end 192.00368 108.5088) (width 0.254) (layer Composant) (net 161) (status 810)) + (via (at 193.12636 108.45546) (size 0.889) (layers Composant Cuivre) (net 161)) + (segment (start 193.12636 108.45546) (end 193.12636 108.41736) (width 0.254) (layer 3.3V_layer) (net 161)) + (segment (start 158.369 87.122) (end 165.227 87.122) (width 0.254) (layer Cuivre) (net 161)) + (segment (start 165.227 87.122) (end 166.37 88.265) (width 0.254) (layer Cuivre) (net 161)) + (segment (start 166.37 88.265) (end 171.704 88.265) (width 0.254) (layer Cuivre) (net 161)) + (segment (start 171.704 88.265) (end 172.339 87.63) (width 0.254) (layer Cuivre) (net 161)) + (segment (start 172.339 87.63) (end 173.355 87.63) (width 0.254) (layer Cuivre) (net 161)) + (segment (start 173.355 87.63) (end 175.133 85.852) (width 0.254) (layer Cuivre) (net 161)) + (segment (start 175.133 85.852) (end 176.53 85.852) (width 0.254) (layer Cuivre) (net 161)) + (segment (start 176.53 85.852) (end 178.1175 87.4395) (width 0.254) (layer Cuivre) (net 161)) + (segment (start 178.1175 87.4395) (end 178.1175 87.757) (width 0.254) (layer Cuivre) (net 161)) + (segment (start 178.1175 87.757) (end 178.308 87.884) (width 0.254) (layer Cuivre) (net 161)) + (segment (start 165.227 117.983) (end 158.75 111.506) (width 0.254) (layer GND_layer) (net 161) (status 810)) + (segment (start 158.75 111.506) (end 158.75 93.345) (width 0.254) (layer GND_layer) (net 161)) + (segment (start 158.75 93.345) (end 156.337 90.932) (width 0.254) (layer GND_layer) (net 161)) + (segment (start 156.337 90.932) (end 156.337 89.408) (width 0.254) (layer GND_layer) (net 161)) + (segment (start 156.337 89.408) (end 157.226 88.519) (width 0.254) (layer GND_layer) (net 161)) + (segment (start 157.226 88.519) (end 157.226 87.884) (width 0.254) (layer GND_layer) (net 161)) + (segment (start 133.673 94.673) (end 137.414 90.932) (width 0.254) (layer Cuivre) (net 161) (tstamp 53D8E5C7)) + (segment (start 137.414 90.932) (end 151.511 90.932) (width 0.254) (layer Cuivre) (net 161)) + (segment (start 151.511 90.932) (end 152.273 90.17) (width 0.254) (layer Cuivre) (net 161)) + (segment (start 152.273 90.17) (end 155.321 90.17) (width 0.254) (layer Cuivre) (net 161)) + (segment (start 155.321 90.17) (end 157.226 88.265) (width 0.254) (layer Cuivre) (net 161)) + (segment (start 157.226 88.265) (end 157.226 87.884) (width 0.254) (layer Cuivre) (net 161)) + (segment (start 165.227 117.983) (end 166.424 119.18) (width 0.254) (layer GND_layer) (net 161) (status 810)) + (segment (start 166.424 119.18) (end 166.424 129.486) (width 0.254) (layer GND_layer) (net 161)) + (segment (start 166.424 129.486) (end 159.004 136.906) (width 0.254) (layer GND_layer) (net 161) (status 420)) + (via (at 178.308 87.884) (size 0.635) (layers Composant Cuivre) (net 161)) + (via (at 157.226 87.884) (size 0.889) (layers Composant Cuivre) (net 161)) + (segment (start 132.8674 95.0976) (end 132.588 95.25) (width 0.254) (layer Composant) (net 161)) + (segment (start 132.8674 93.726) (end 132.8674 95.0976) (width 0.254) (layer Composant) (net 161) (status 810)) + (via (at 132.588 95.25) (size 0.889) (layers Composant Cuivre) (net 161)) + (segment (start 179.324 106.934) (end 179.324 106.95178) (width 0.254) (layer 3.3V_layer) (net 161)) + (segment (start 177.292 106.934) (end 179.324 106.934) (width 0.254) (layer 3.3V_layer) (net 161)) + (segment (start 176.657 106.299) (end 177.292 106.934) (width 0.254) (layer 3.3V_layer) (net 161)) + (segment (start 174.879 106.299) (end 176.657 106.299) (width 0.254) (layer 3.3V_layer) (net 161)) + (segment (start 174.625 106.045) (end 174.879 106.299) (width 0.254) (layer 3.3V_layer) (net 161)) + (via (at 174.625 106.045) (size 0.889) (layers Composant Cuivre) (net 161)) + (segment (start 174.117 105.537) (end 174.625 106.045) (width 0.254) (layer GND_layer) (net 161)) + (segment (start 177.419 87.884) (end 174.117 91.186) (width 0.254) (layer GND_layer) (net 161)) + (segment (start 178.308 87.884) (end 177.419 87.884) (width 0.254) (layer GND_layer) (net 161)) + (segment (start 193.12636 108.41736) (end 189.05728 104.34828) (width 0.254) (layer 3.3V_layer) (net 161)) + (segment (start 133.165 94.673) (end 132.588 95.25) (width 0.2) (layer Cuivre) (net 161) (tstamp 53D8E5C9)) + (segment (start 133.673 94.673) (end 133.165 94.673) (width 0.2) (layer Cuivre) (net 161)) + (segment (start 163.957 129.413) (end 163.957 119.253) (width 0.254) (layer GND_layer) (net 162)) + (segment (start 137.16 90.424) (end 151.257 90.424) (width 0.254) (layer Cuivre) (net 162)) + (segment (start 151.257 90.424) (end 152.019 89.662) (width 0.254) (layer Cuivre) (net 162)) + (segment (start 133.604 93.98) (end 137.16 90.424) (width 0.254) (layer Cuivre) (net 162)) + (segment (start 152.019 89.662) (end 155.067 89.662) (width 0.254) (layer Cuivre) (net 162)) + (segment (start 155.067 89.662) (end 155.829 88.9) (width 0.254) (layer Cuivre) (net 162)) + (segment (start 131.8768 93.726) (end 131.8768 94.361) (width 0.254) (layer Composant) (net 162) (status 810)) + (via (at 131.826 96.393) (size 0.889) (layers Composant Cuivre) (net 162)) + (segment (start 131.826 96.393) (end 131.826 94.742) (width 0.254) (layer Cuivre) (net 162)) + (segment (start 162.687 116.586) (end 156.718 110.744) (width 0.254) (layer GND_layer) (net 162)) + (segment (start 156.718 110.744) (end 156.718 92.075) (width 0.254) (layer GND_layer) (net 162)) + (segment (start 156.718 92.075) (end 155.829 91.186) (width 0.254) (layer GND_layer) (net 162)) + (segment (start 162.687 117.983) (end 162.687 116.586) (width 0.254) (layer GND_layer) (net 162) (status 810)) + (segment (start 131.826 96.393) (end 131.826 94.361) (width 0.254) (layer Composant) (net 162)) + (segment (start 155.829 88.138) (end 155.829 88.9) (width 0.254) (layer Cuivre) (net 162)) + (via (at 155.829 88.138) (size 0.889) (layers Composant Cuivre) (net 162)) + (segment (start 163.957 119.253) (end 162.687 117.983) (width 0.254) (layer GND_layer) (net 162) (status 420)) + (segment (start 131.826 94.361) (end 131.8768 94.361) (width 0.254) (layer Composant) (net 162)) + (segment (start 156.464 136.906) (end 163.957 129.413) (width 0.254) (layer GND_layer) (net 162) (status 810)) + (segment (start 131.826 94.742) (end 132.588 93.98) (width 0.254) (layer Cuivre) (net 162)) + (segment (start 132.588 93.98) (end 133.604 93.98) (width 0.254) (layer Cuivre) (net 162)) + (segment (start 155.829 91.186) (end 155.829 88.138) (width 0.254) (layer GND_layer) (net 162)) + (segment (start 160.274 108.839) (end 160.274 89.916) (width 0.254) (layer GND_layer) (net 163)) + (segment (start 134.747 92.075) (end 132.461 92.075) (width 0.254) (layer Cuivre) (net 163)) + (segment (start 156.21 86.36) (end 167.259 86.36) (width 0.254) (layer Cuivre) (net 163)) + (segment (start 167.259 86.36) (end 167.513 86.106) (width 0.254) (layer Cuivre) (net 163)) + (segment (start 167.513 86.106) (end 173.482 86.106) (width 0.254) (layer Cuivre) (net 163)) + (segment (start 173.482 86.106) (end 174.625 84.963) (width 0.254) (layer Cuivre) (net 163)) + (segment (start 174.625 84.963) (end 176.53 84.963) (width 0.254) (layer Cuivre) (net 163)) + (segment (start 176.53 84.963) (end 177.673 86.106) (width 0.254) (layer Cuivre) (net 163)) + (segment (start 177.673 86.106) (end 178.816 86.106) (width 0.254) (layer Cuivre) (net 163)) + (segment (start 178.816 86.106) (end 179.197 86.487) (width 0.254) (layer Cuivre) (net 163)) + (segment (start 179.197 86.487) (end 179.197 89.027) (width 0.254) (layer GND_layer) (net 163)) + (segment (start 179.197 89.027) (end 177.8 90.424) (width 0.254) (layer GND_layer) (net 163)) + (segment (start 177.8 90.424) (end 177.8 105.283) (width 0.254) (layer GND_layer) (net 163)) + (segment (start 177.8 105.283) (end 178.054 105.664) (width 0.254) (layer GND_layer) (net 163)) + (segment (start 132.3848 93.726) (end 132.3848 92.5576) (width 0.254) (layer Composant) (net 163) (status 810)) + (segment (start 164.846 138.176) (end 165.354 137.668) (width 0.254) (layer GND_layer) (net 163)) + (segment (start 132.3848 92.5576) (end 132.461 92.075) (width 0.254) (layer Composant) (net 163)) + (via (at 180.721 111.45774) (size 0.889) (layers Composant Cuivre) (net 163)) + (segment (start 136.906 89.916) (end 134.747 92.075) (width 0.254) (layer Cuivre) (net 163)) + (via (at 154.813 87.757) (size 0.889) (layers Composant Cuivre) (net 163)) + (via (at 179.197 86.487) (size 0.889) (layers Composant Cuivre) (net 163)) + (via (at 178.054 105.664) (size 0.889) (layers Composant Cuivre) (net 163)) + (via (at 132.461 92.075) (size 0.635) (layers Composant Cuivre) (net 163)) + (segment (start 154.813 87.757) (end 154.813 89.027) (width 0.254) (layer Cuivre) (net 163)) + (segment (start 165.354 137.668) (end 165.354 135.001) (width 0.254) (layer GND_layer) (net 163)) + (segment (start 165.354 135.001) (end 168.656 131.699) (width 0.254) (layer GND_layer) (net 163)) + (segment (start 168.656 131.699) (end 168.656 127.508) (width 0.254) (layer GND_layer) (net 163)) + (segment (start 168.656 127.508) (end 169.926 126.238) (width 0.254) (layer GND_layer) (net 163)) + (segment (start 169.926 126.238) (end 169.926 118.491) (width 0.254) (layer GND_layer) (net 163)) + (segment (start 169.926 118.491) (end 160.274 108.839) (width 0.254) (layer GND_layer) (net 163)) + (segment (start 155.194 138.176) (end 164.846 138.176) (width 0.254) (layer GND_layer) (net 163)) + (segment (start 160.274 89.916) (end 159.004 88.646) (width 0.254) (layer GND_layer) (net 163)) + (segment (start 153.924 136.906) (end 155.194 138.176) (width 0.254) (layer GND_layer) (net 163) (status 810)) + (segment (start 180.721 108.331) (end 180.721 111.45774) (width 0.254) (layer Cuivre) (net 163)) + (segment (start 154.813 89.027) (end 154.686 89.154) (width 0.254) (layer Cuivre) (net 163)) + (segment (start 154.813 87.757) (end 154.813 86.995) (width 0.254) (layer GND_layer) (net 163)) + (segment (start 159.004 87.884) (end 159.004 88.646) (width 0.254) (layer GND_layer) (net 163)) + (segment (start 157.734 86.614) (end 159.004 87.884) (width 0.254) (layer GND_layer) (net 163)) + (segment (start 155.194 86.614) (end 157.734 86.614) (width 0.254) (layer GND_layer) (net 163)) + (segment (start 154.813 86.995) (end 155.194 86.614) (width 0.254) (layer GND_layer) (net 163)) + (segment (start 154.813 87.757) (end 156.21 86.36) (width 0.254) (layer Cuivre) (net 163)) + (segment (start 151.003 89.916) (end 136.906 89.916) (width 0.254) (layer Cuivre) (net 163)) + (segment (start 151.765 89.154) (end 151.003 89.916) (width 0.254) (layer Cuivre) (net 163)) + (segment (start 154.686 89.154) (end 151.765 89.154) (width 0.254) (layer Cuivre) (net 163)) + (segment (start 190.9445 111.506) (end 189.88532 111.506) (width 0.254) (layer Composant) (net 163) (status 810)) + (segment (start 178.054 105.664) (end 180.721 108.331) (width 0.254) (layer Cuivre) (net 163)) + (segment (start 189.83706 111.45774) (end 189.88532 111.506) (width 0.254) (layer Composant) (net 163)) + (segment (start 180.721 111.45774) (end 189.83706 111.45774) (width 0.254) (layer Composant) (net 163)) + (segment (start 130.175 107.315) (end 130.048 107.188) (width 0.254) (layer 3.3V_layer) (net 164)) + (segment (start 130.175 107.315) (end 130.175 115.697) (width 0.254) (layer 3.3V_layer) (net 164)) + (segment (start 130.3782 107.7468) (end 130.048 107.188) (width 0.254) (layer Composant) (net 164)) + (segment (start 130.3782 109.22) (end 130.3782 107.7468) (width 0.254) (layer Composant) (net 164) (status 810)) + (segment (start 130.175 115.697) (end 131.699 117.221) (width 0.254) (layer 3.3V_layer) (net 164)) + (segment (start 160.274 138.176) (end 160.274 136.271) (width 0.254) (layer 3.3V_layer) (net 164)) + (segment (start 131.699 124.206) (end 131.699 117.221) (width 0.254) (layer 3.3V_layer) (net 164)) + (segment (start 139.319 131.826) (end 131.699 124.206) (width 0.254) (layer 3.3V_layer) (net 164)) + (segment (start 155.829 131.826) (end 139.319 131.826) (width 0.254) (layer 3.3V_layer) (net 164)) + (segment (start 160.274 136.271) (end 155.829 131.826) (width 0.254) (layer 3.3V_layer) (net 164)) + (segment (start 161.544 139.446) (end 160.274 138.176) (width 0.254) (layer 3.3V_layer) (net 164) (status 810)) + (via (at 130.048 107.188) (size 0.889) (layers Composant Cuivre) (net 164)) + (segment (start 183.32196 106.61396) (end 189.33922 106.61396) (width 0.254) (layer Composant) (net 165)) + (segment (start 182.45582 105.74782) (end 183.32196 106.61396) (width 0.254) (layer Composant) (net 165)) + (segment (start 181.58714 105.74782) (end 182.45582 105.74782) (width 0.254) (layer Composant) (net 165)) + (segment (start 180.76926 104.92994) (end 181.58714 105.74782) (width 0.254) (layer Composant) (net 165)) + (segment (start 180.76926 104.85374) (end 180.76926 104.92994) (width 0.254) (layer Composant) (net 165)) + (segment (start 181.61 104.013) (end 180.76926 104.85374) (width 0.254) (layer Composant) (net 165)) + (segment (start 148.717 94.869) (end 149.098 94.488) (width 0.254) (layer GND_layer) (net 165)) + (segment (start 149.098 94.488) (end 150.876 94.488) (width 0.254) (layer GND_layer) (net 165)) + (segment (start 150.876 94.488) (end 151.257 94.869) (width 0.254) (layer GND_layer) (net 165)) + (segment (start 151.257 94.869) (end 151.257 99.568) (width 0.254) (layer GND_layer) (net 165)) + (segment (start 151.257 99.568) (end 150.033 100.792) (width 0.254) (layer GND_layer) (net 165)) + (segment (start 150.033 100.792) (end 150.033 112.857) (width 0.254) (layer GND_layer) (net 165)) + (segment (start 150.033 112.857) (end 148.209 114.681) (width 0.254) (layer GND_layer) (net 165)) + (segment (start 148.209 114.681) (end 148.082 114.681) (width 0.254) (layer GND_layer) (net 165)) + (segment (start 148.082 114.681) (end 145.796 116.967) (width 0.254) (layer GND_layer) (net 165)) + (segment (start 145.796 116.967) (end 145.796 135.001) (width 0.254) (layer GND_layer) (net 165)) + (segment (start 146.304 135.509) (end 146.304 136.906) (width 0.254) (layer GND_layer) (net 165) (status 420)) + (segment (start 152.0825 93.853) (end 148.971 93.853) (width 0.381) (layer Composant) (net 165) (status 810)) + (segment (start 148.463 94.361) (end 148.463 95.25) (width 0.381) (layer Composant) (net 165)) + (segment (start 143.129 100.965) (end 147.066 100.965) (width 0.254) (layer Composant) (net 165) (status 810)) + (segment (start 147.066 100.965) (end 147.701 100.33) (width 0.254) (layer Composant) (net 165)) + (segment (start 147.701 100.33) (end 147.701 96.393) (width 0.254) (layer Composant) (net 165)) + (segment (start 147.701 96.393) (end 148.463 95.631) (width 0.254) (layer Composant) (net 165)) + (segment (start 148.463 95.631) (end 148.463 95.25) (width 0.254) (layer Composant) (net 165)) + (via (at 148.463 95.25) (size 0.635) (layers Composant Cuivre) (net 165)) + (via (at 179.959 91.059) (size 0.889) (layers Composant Cuivre) (net 165)) + (segment (start 174.752 91.059) (end 175.133 90.678) (width 0.254) (layer Cuivre) (net 165)) + (via (at 181.61 104.013) (size 0.635) (layers Composant Cuivre) (net 165)) + (segment (start 145.796 135.001) (end 146.304 135.509) (width 0.254) (layer GND_layer) (net 165)) + (segment (start 178.308 91.059) (end 179.959 91.059) (width 0.254) (layer Cuivre) (net 165)) + (segment (start 148.971 93.853) (end 148.463 94.361) (width 0.381) (layer Composant) (net 165)) + (segment (start 177.927 90.678) (end 178.308 91.059) (width 0.254) (layer Cuivre) (net 165)) + (segment (start 175.133 90.678) (end 177.927 90.678) (width 0.254) (layer Cuivre) (net 165)) + (segment (start 148.463 95.25) (end 148.717 94.869) (width 0.254) (layer GND_layer) (net 165)) + (segment (start 165.1 91.059) (end 174.752 91.059) (width 0.254) (layer Cuivre) (net 165)) + (segment (start 164.465 90.424) (end 165.1 91.059) (width 0.254) (layer Cuivre) (net 165)) + (segment (start 160.02 90.424) (end 164.465 90.424) (width 0.254) (layer Cuivre) (net 165)) + (segment (start 156.464 93.98) (end 160.02 90.424) (width 0.254) (layer Cuivre) (net 165)) + (segment (start 149.225 93.98) (end 156.464 93.98) (width 0.254) (layer Cuivre) (net 165)) + (segment (start 148.463 94.742) (end 149.225 93.98) (width 0.254) (layer Cuivre) (net 165)) + (segment (start 148.463 95.25) (end 148.463 94.742) (width 0.254) (layer Cuivre) (net 165)) + (segment (start 179.959 91.44) (end 179.959 91.059) (width 0.254) (layer GND_layer) (net 165)) + (segment (start 180.975 92.456) (end 179.959 91.44) (width 0.254) (layer GND_layer) (net 165)) + (segment (start 180.975 103.378) (end 180.975 92.456) (width 0.254) (layer GND_layer) (net 165)) + (segment (start 181.61 104.013) (end 180.975 103.378) (width 0.254) (layer GND_layer) (net 165)) + (segment (start 189.43828 106.5149) (end 190.9445 106.5149) (width 0.254) (layer Composant) (net 165) (status 420)) + (segment (start 189.33922 106.61396) (end 189.43828 106.5149) (width 0.254) (layer Composant) (net 165)) + (segment (start 128.905 109.22) (end 128.397 109.728) (width 0.254) (layer Composant) (net 166)) + (segment (start 152.908 133.35) (end 155.194 135.636) (width 0.254) (layer Cuivre) (net 166)) + (segment (start 137.414 133.35) (end 152.908 133.35) (width 0.254) (layer Cuivre) (net 166)) + (segment (start 155.194 135.636) (end 155.194 138.176) (width 0.254) (layer Cuivre) (net 166)) + (segment (start 128.397 113.665) (end 128.397 124.333) (width 0.254) (layer Cuivre) (net 166)) + (segment (start 129.3876 109.22) (end 128.905 109.22) (width 0.254) (layer Composant) (net 166) (status 810)) + (segment (start 155.194 138.176) (end 156.464 139.446) (width 0.254) (layer Cuivre) (net 166) (status 420)) + (via (at 128.397 113.665) (size 0.889) (layers Composant Cuivre) (net 166)) + (segment (start 128.397 124.333) (end 137.414 133.35) (width 0.254) (layer Cuivre) (net 166)) + (segment (start 128.397 109.728) (end 128.397 113.665) (width 0.254) (layer Composant) (net 166)) + (segment (start 143.764 136.906) (end 145.288 135.382) (width 0.254) (layer GND_layer) (net 167) (status 810)) + (segment (start 142.494 98.933) (end 143.891 97.536) (width 0.254) (layer Cuivre) (net 167)) + (segment (start 138.811 98.933) (end 142.494 98.933) (width 0.254) (layer Cuivre) (net 167)) + (via (at 138.811 98.933) (size 0.889) (layers Composant Cuivre) (net 167)) + (segment (start 147.955 114.173) (end 149.425 112.703) (width 0.254) (layer GND_layer) (net 167)) + (segment (start 138.811 98.933) (end 140.3604 100.4824) (width 0.254) (layer Composant) (net 167)) + (segment (start 168.783 107.823) (end 168.783 104.902) (width 0.4318) (layer Composant) (net 167) (status 10)) + (segment (start 140.3604 100.4824) (end 141.2494 100.4824) (width 0.254) (layer Composant) (net 167)) + (via (at 150.495 99.06) (size 0.635) (layers Composant Cuivre) (net 167)) + (segment (start 176.149 108.077) (end 168.529 108.077) (width 0.4318) (layer Composant) (net 167) (status C30)) + (segment (start 167.259 110.49) (end 168.275 109.474) (width 0.381) (layer Composant) (net 167)) + (segment (start 167.259 115.57) (end 167.259 110.49) (width 0.381) (layer Composant) (net 167)) + (segment (start 168.275 108.331) (end 168.529 108.077) (width 0.4318) (layer Composant) (net 167) (status 430)) + (segment (start 168.275 109.474) (end 168.275 108.331) (width 0.4318) (layer Composant) (net 167) (status 20)) + (segment (start 143.129 100.457) (end 141.2494 100.4824) (width 0.254) (layer Composant) (net 167) (status 810)) + (segment (start 149.733 99.06) (end 150.495 99.06) (width 0.254) (layer Cuivre) (net 167)) + (segment (start 148.209 97.536) (end 149.733 99.06) (width 0.254) (layer Cuivre) (net 167)) + (segment (start 149.425 100.023) (end 150.495 99.06) (width 0.254) (layer GND_layer) (net 167)) + (segment (start 147.701 114.173) (end 147.955 114.173) (width 0.254) (layer GND_layer) (net 167)) + (segment (start 145.288 116.586) (end 147.701 114.173) (width 0.254) (layer GND_layer) (net 167)) + (segment (start 168.529 108.077) (end 168.783 107.823) (width 0.4318) (layer Composant) (net 167) (status 830)) + (segment (start 150.622 99.441) (end 150.495 99.06) (width 0.381) (layer Composant) (net 167)) + (segment (start 150.876 99.695) (end 150.622 99.441) (width 0.381) (layer Composant) (net 167)) + (segment (start 160.528 99.695) (end 150.876 99.695) (width 0.381) (layer Composant) (net 167)) + (segment (start 163.449 96.774) (end 160.528 99.695) (width 0.381) (layer Composant) (net 167)) + (segment (start 166.751 96.774) (end 163.449 96.774) (width 0.381) (layer Composant) (net 167)) + (segment (start 167.259 97.282) (end 166.751 96.774) (width 0.381) (layer Composant) (net 167)) + (segment (start 167.259 103.378) (end 167.259 97.282) (width 0.381) (layer Composant) (net 167)) + (segment (start 168.783 104.902) (end 167.259 103.378) (width 0.381) (layer Composant) (net 167)) + (segment (start 168.7195 117.0305) (end 167.259 115.57) (width 0.4318) (layer Composant) (net 167) (status 10)) + (segment (start 168.7195 117.094) (end 168.7195 117.0305) (width 0.4318) (layer Composant) (net 167) (status 830)) + (segment (start 145.288 135.382) (end 145.288 116.586) (width 0.254) (layer GND_layer) (net 167)) + (segment (start 149.425 112.703) (end 149.425 100.023) (width 0.254) (layer GND_layer) (net 167)) + (segment (start 143.891 97.536) (end 148.209 97.536) (width 0.254) (layer Cuivre) (net 167)) + (segment (start 103.251 101.727) (end 103.251 103.886) (width 0.254) (layer GND_layer) (net 168)) + (segment (start 102.235 103.886) (end 102.235 102.743) (width 0.381) (layer Composant) (net 168)) + (segment (start 102.235 102.743) (end 103.378 101.6) (width 0.381) (layer Composant) (net 168)) + (segment (start 103.378 101.6) (end 104.013 101.6) (width 0.381) (layer Composant) (net 168)) + (segment (start 104.013 101.6) (end 103.378 101.6) (width 0.254) (layer GND_layer) (net 168)) + (segment (start 103.378 101.6) (end 103.251 101.727) (width 0.254) (layer GND_layer) (net 168)) + (segment (start 99.06 107.061) (end 102.235 103.886) (width 0.381) (layer Composant) (net 168)) + (segment (start 103.251 103.886) (end 104.467 105.102) (width 0.254) (layer GND_layer) (net 168)) + (segment (start 104.467 105.102) (end 104.467 138.122) (width 0.254) (layer GND_layer) (net 168)) + (segment (start 104.467 138.122) (end 109.093 142.748) (width 0.254) (layer GND_layer) (net 168)) + (segment (start 109.093 142.748) (end 140.462 142.748) (width 0.254) (layer GND_layer) (net 168)) + (segment (start 140.462 142.748) (end 143.764 139.446) (width 0.254) (layer GND_layer) (net 168) (status 420)) + (segment (start 127.635 100.4824) (end 128.905 100.457) (width 0.254) (layer Composant) (net 168) (status 810)) + (segment (start 128.905 100.457) (end 130.048 99.314) (width 0.254) (layer Composant) (net 168)) + (segment (start 130.048 95.25) (end 130.048 94.996) (width 0.254) (layer Cuivre) (net 168)) + (segment (start 130.048 94.996) (end 126.238 91.186) (width 0.254) (layer Cuivre) (net 168)) + (segment (start 126.238 91.186) (end 110.744 91.186) (width 0.254) (layer Cuivre) (net 168)) + (segment (start 110.744 91.186) (end 108.966 92.964) (width 0.254) (layer Cuivre) (net 168)) + (segment (start 130.048 99.314) (end 130.048 95.25) (width 0.254) (layer Composant) (net 168)) + (segment (start 108.966 92.964) (end 108.966 97.155) (width 0.254) (layer Cuivre) (net 168)) + (segment (start 108.966 97.155) (end 104.521 101.6) (width 0.254) (layer Cuivre) (net 168)) + (segment (start 104.521 101.6) (end 104.013 101.6) (width 0.254) (layer Cuivre) (net 168)) + (via (at 104.013 101.6) (size 0.635) (layers Composant Cuivre) (net 168)) + (via (at 130.048 95.25) (size 0.635) (layers Composant Cuivre) (net 168)) + (segment (start 99.06 114.808) (end 99.06 107.061) (width 0.381) (layer Composant) (net 168)) + (segment (start 98.806 115.062) (end 99.06 114.808) (width 0.381) (layer Composant) (net 168)) + (segment (start 97.409 115.062) (end 98.806 115.062) (width 0.381) (layer Composant) (net 168) (status 810)) + (segment (start 129.159 95.25) (end 129.159 94.869) (width 0.254) (layer Cuivre) (net 169)) + (segment (start 129.159 94.869) (end 125.984 91.694) (width 0.254) (layer Cuivre) (net 169)) + (segment (start 125.984 91.694) (end 110.998 91.694) (width 0.254) (layer Cuivre) (net 169)) + (segment (start 110.998 91.694) (end 109.474 93.218) (width 0.254) (layer Cuivre) (net 169)) + (via (at 129.159 95.25) (size 0.635) (layers Composant Cuivre) (net 169)) + (via (at 104.013 102.489) (size 0.635) (layers Composant Cuivre) (net 169)) + (segment (start 104.775 102.489) (end 104.013 102.489) (width 0.381) (layer Composant) (net 169)) + (segment (start 105.283 102.997) (end 104.775 102.489) (width 0.381) (layer Composant) (net 169)) + (segment (start 105.283 115.062) (end 105.283 102.997) (width 0.381) (layer Composant) (net 169)) + (segment (start 104.013 116.332) (end 105.283 115.062) (width 0.381) (layer Composant) (net 169)) + (segment (start 102.743 116.332) (end 104.013 116.332) (width 0.381) (layer Composant) (net 169) (status 810)) + (segment (start 128.7272 97.9678) (end 127.635 97.9678) (width 0.254) (layer Composant) (net 169) (status 420)) + (segment (start 129.159 97.536) (end 128.7272 97.9678) (width 0.254) (layer Composant) (net 169)) + (segment (start 104.394 102.743) (end 104.013 102.489) (width 0.254) (layer GND_layer) (net 169)) + (segment (start 105.483 103.832) (end 104.394 102.743) (width 0.254) (layer GND_layer) (net 169)) + (segment (start 105.483 137.614) (end 105.483 103.832) (width 0.254) (layer GND_layer) (net 169)) + (segment (start 109.601 141.732) (end 105.483 137.614) (width 0.254) (layer GND_layer) (net 169)) + (segment (start 136.398 141.732) (end 109.601 141.732) (width 0.254) (layer GND_layer) (net 169)) + (segment (start 138.684 139.446) (end 136.398 141.732) (width 0.254) (layer GND_layer) (net 169) (status 810)) + (segment (start 104.521 102.489) (end 104.013 102.489) (width 0.254) (layer Cuivre) (net 169)) + (segment (start 109.474 97.536) (end 104.521 102.489) (width 0.254) (layer Cuivre) (net 169)) + (segment (start 109.474 93.218) (end 109.474 97.536) (width 0.254) (layer Cuivre) (net 169)) + (segment (start 129.159 95.25) (end 129.159 97.536) (width 0.254) (layer Composant) (net 169)) + (segment (start 152.654 80.01) (end 149.86 82.804) (width 0.254) (layer Cuivre) (net 170)) + (segment (start 186.436 105.918) (end 186.436 122.936) (width 0.254) (layer GND_layer) (net 170)) + (segment (start 179.324 130.048) (end 186.436 122.936) (width 0.254) (layer GND_layer) (net 170)) + (segment (start 183.134 77.089) (end 183.134 102.616) (width 0.254) (layer GND_layer) (net 170)) + (segment (start 178.562 72.517) (end 183.134 77.089) (width 0.254) (layer GND_layer) (net 170)) + (segment (start 174.117 72.517) (end 178.562 72.517) (width 0.254) (layer GND_layer) (net 170)) + (segment (start 172.085 74.549) (end 174.117 72.517) (width 0.254) (layer GND_layer) (net 170) (status 810)) + (segment (start 170.815 75.819) (end 172.085 74.549) (width 0.254) (layer Cuivre) (net 170) (status 420)) + (segment (start 168.91 75.819) (end 170.815 75.819) (width 0.254) (layer Cuivre) (net 170)) + (segment (start 164.719 80.01) (end 168.91 75.819) (width 0.254) (layer Cuivre) (net 170)) + (segment (start 152.654 80.01) (end 164.719 80.01) (width 0.254) (layer Cuivre) (net 170)) + (segment (start 145.669 94.742) (end 144.4498 95.9612) (width 0.254) (layer Composant) (net 170)) + (via (at 149.86 84.201) (size 0.889) (layers Composant Cuivre) (net 170)) + (segment (start 144.4498 95.9612) (end 143.129 95.9612) (width 0.254) (layer Composant) (net 170) (status 420)) + (segment (start 149.86 82.804) (end 149.86 84.201) (width 0.254) (layer Cuivre) (net 170)) + (segment (start 145.669 91.821) (end 145.669 94.742) (width 0.254) (layer Composant) (net 170)) + (segment (start 183.134 102.616) (end 186.436 105.918) (width 0.254) (layer GND_layer) (net 170)) + (segment (start 149.86 87.63) (end 145.669 91.821) (width 0.254) (layer Composant) (net 170)) + (segment (start 149.86 84.201) (end 149.86 87.63) (width 0.254) (layer Composant) (net 170)) + (segment (start 179.324 130.048) (end 179.324 136.906) (width 0.254) (layer GND_layer) (net 170) (status 420)) + (segment (start 183.515 107.061) (end 183.515 122.047) (width 0.254) (layer GND_layer) (net 171)) + (segment (start 178.943 90.805) (end 180.467 89.281) (width 0.254) (layer GND_layer) (net 171)) + (segment (start 180.467 89.281) (end 180.467 77.216) (width 0.254) (layer GND_layer) (net 171)) + (segment (start 180.467 77.216) (end 178.308 75.057) (width 0.254) (layer GND_layer) (net 171)) + (segment (start 179.959 93.472) (end 178.943 92.456) (width 0.254) (layer GND_layer) (net 171)) + (segment (start 179.959 102.362) (end 179.959 93.472) (width 0.254) (layer GND_layer) (net 171)) + (segment (start 179.705 102.87) (end 179.959 102.362) (width 0.254) (layer GND_layer) (net 171)) + (segment (start 197.28942 89.535) (end 197.485 89.535) (width 0.254) (layer 3.3V_layer) (net 171) (status 430)) + (segment (start 183.95442 102.87) (end 197.28942 89.535) (width 0.254) (layer 3.3V_layer) (net 171) (status 20)) + (segment (start 179.705 102.87) (end 183.95442 102.87) (width 0.254) (layer 3.3V_layer) (net 171)) + (segment (start 180.24602 102.32898) (end 179.705 102.87) (width 0.254) (layer Composant) (net 171)) + (segment (start 191.62522 102.32898) (end 180.24602 102.32898) (width 0.254) (layer Composant) (net 171)) + (segment (start 194.91706 105.62082) (end 191.62522 102.32898) (width 0.254) (layer Composant) (net 171)) + (segment (start 194.91706 110.12678) (end 194.91706 105.62082) (width 0.254) (layer Composant) (net 171)) + (segment (start 190.9445 111.0107) (end 194.03314 111.0107) (width 0.254) (layer Composant) (net 171) (status 810)) + (segment (start 194.03314 111.0107) (end 194.91706 110.12678) (width 0.254) (layer Composant) (net 171)) + (segment (start 151.638 83.82) (end 151.511 83.947) (width 0.254) (layer Cuivre) (net 171)) + (via (at 151.511 83.947) (size 0.889) (layers Composant Cuivre) (net 171)) + (segment (start 151.511 83.947) (end 151.4475 83.8835) (width 0.254) (layer Composant) (net 171)) + (segment (start 151.4475 83.8835) (end 150.8125 83.8835) (width 0.254) (layer Composant) (net 171)) + (segment (start 152.4 83.82) (end 151.638 83.82) (width 0.254) (layer Cuivre) (net 171)) + (via (at 179.705 102.87) (size 0.889) (layers Composant Cuivre) (net 171)) + (segment (start 139.8905 92.3036) (end 139.827 91.948) (width 0.254) (layer Composant) (net 171)) + (segment (start 139.827 91.948) (end 139.827 88.519) (width 0.254) (layer Composant) (net 171)) + (segment (start 139.827 88.519) (end 140.208 88.138) (width 0.254) (layer Composant) (net 171)) + (segment (start 140.208 88.138) (end 143.002 88.138) (width 0.254) (layer Composant) (net 171)) + (segment (start 143.002 88.138) (end 143.383 87.757) (width 0.254) (layer Composant) (net 171)) + (segment (start 143.383 87.757) (end 143.383 84.074) (width 0.254) (layer Composant) (net 171)) + (segment (start 143.383 84.074) (end 144.145 83.312) (width 0.254) (layer Composant) (net 171)) + (segment (start 144.145 83.312) (end 150.241 83.312) (width 0.254) (layer Composant) (net 171)) + (segment (start 150.241 83.312) (end 150.8125 83.8835) (width 0.254) (layer Composant) (net 171)) + (segment (start 139.8778 93.726) (end 139.8905 92.3036) (width 0.254) (layer Composant) (net 171) (status 810)) + (segment (start 170.815 80.899) (end 165.862 80.899) (width 0.254) (layer Cuivre) (net 171)) + (segment (start 164.973 81.788) (end 165.862 80.899) (width 0.254) (layer Cuivre) (net 171)) + (segment (start 154.432 81.788) (end 164.973 81.788) (width 0.254) (layer Cuivre) (net 171)) + (segment (start 152.4 83.82) (end 154.432 81.788) (width 0.254) (layer Cuivre) (net 171)) + (segment (start 172.085 79.629) (end 170.815 80.899) (width 0.254) (layer Cuivre) (net 171) (status 810)) + (segment (start 179.705 104.394) (end 179.705 102.87) (width 0.254) (layer GND_layer) (net 171)) + (segment (start 181.102 105.791) (end 179.705 104.394) (width 0.254) (layer GND_layer) (net 171)) + (segment (start 182.245 105.791) (end 181.102 105.791) (width 0.254) (layer GND_layer) (net 171)) + (segment (start 183.515 107.061) (end 182.245 105.791) (width 0.254) (layer GND_layer) (net 171)) + (segment (start 174.244 131.318) (end 183.515 122.047) (width 0.254) (layer GND_layer) (net 171)) + (segment (start 174.244 131.318) (end 174.244 136.906) (width 0.254) (layer GND_layer) (net 171) (status 420)) + (segment (start 176.657 75.057) (end 172.085 79.629) (width 0.254) (layer GND_layer) (net 171) (status 420)) + (segment (start 178.308 75.057) (end 176.657 75.057) (width 0.254) (layer GND_layer) (net 171)) + (segment (start 178.943 92.456) (end 178.943 90.805) (width 0.254) (layer GND_layer) (net 171)) + (segment (start 106.091 102.662) (end 104.394 100.965) (width 0.254) (layer GND_layer) (net 172)) + (segment (start 110.49 90.678) (end 108.458 92.71) (width 0.254) (layer Cuivre) (net 172)) + (segment (start 122.428 90.678) (end 110.49 90.678) (width 0.254) (layer Cuivre) (net 172)) + (segment (start 122.936 90.043) (end 122.428 90.678) (width 0.254) (layer Cuivre) (net 172)) + (segment (start 121.412 91.821) (end 122.936 90.043) (width 0.254) (layer Composant) (net 172)) + (segment (start 121.412 94.234) (end 121.412 91.821) (width 0.254) (layer Composant) (net 172)) + (segment (start 125.1204 97.9424) (end 121.412 94.234) (width 0.254) (layer Composant) (net 172)) + (segment (start 126.0856 97.9424) (end 125.1204 97.9424) (width 0.254) (layer Composant) (net 172)) + (segment (start 126.619 98.4758) (end 126.0856 97.9424) (width 0.254) (layer Composant) (net 172)) + (via (at 122.936 90.043) (size 0.889) (layers Composant Cuivre) (net 172)) + (segment (start 104.394 100.965) (end 104.013 100.711) (width 0.254) (layer GND_layer) (net 172)) + (via (at 104.013 100.711) (size 0.635) (layers Composant Cuivre) (net 172)) + (segment (start 105.029 100.711) (end 104.013 100.711) (width 0.381) (layer Composant) (net 172)) + (segment (start 106.045 101.727) (end 105.029 100.711) (width 0.381) (layer Composant) (net 172)) + (segment (start 106.045 118.237) (end 106.045 101.727) (width 0.381) (layer Composant) (net 172)) + (segment (start 104.14 120.142) (end 106.045 118.237) (width 0.381) (layer Composant) (net 172)) + (segment (start 102.743 120.142) (end 104.14 120.142) (width 0.381) (layer Composant) (net 172) (status 810)) + (segment (start 108.458 96.266) (end 104.013 100.711) (width 0.254) (layer Cuivre) (net 172)) + (segment (start 108.458 92.71) (end 108.458 96.266) (width 0.254) (layer Cuivre) (net 172)) + (segment (start 106.091 137.46) (end 106.091 102.662) (width 0.254) (layer GND_layer) (net 172)) + (segment (start 109.855 141.224) (end 106.091 137.46) (width 0.254) (layer GND_layer) (net 172)) + (segment (start 134.366 141.224) (end 109.855 141.224) (width 0.254) (layer GND_layer) (net 172)) + (segment (start 136.144 139.446) (end 134.366 141.224) (width 0.254) (layer GND_layer) (net 172) (status 810)) + (segment (start 127.635 98.4758) (end 126.619 98.4758) (width 0.254) (layer Composant) (net 172) (status 810)) + (segment (start 187.325 84.963) (end 193.929 78.359) (width 0.254) (layer Cuivre) (net 173)) + (segment (start 141.351 84.836) (end 143.129 86.614) (width 0.254) (layer Cuivre) (net 173)) + (segment (start 139.446 84.836) (end 141.351 84.836) (width 0.254) (layer Cuivre) (net 173)) + (segment (start 139.065 85.217) (end 139.446 84.836) (width 0.254) (layer Cuivre) (net 173)) + (segment (start 139.065 85.598) (end 139.065 85.217) (width 0.254) (layer Cuivre) (net 173)) + (segment (start 131.064 135.89) (end 131.064 136.906) (width 0.254) (layer GND_layer) (net 173) (status 420)) + (segment (start 129.413 134.239) (end 131.064 135.89) (width 0.254) (layer GND_layer) (net 173)) + (segment (start 129.413 132.08) (end 129.413 134.239) (width 0.254) (layer GND_layer) (net 173)) + (segment (start 127.127 90.9) (end 127.127 117.856) (width 0.254) (layer GND_layer) (net 173) (tstamp 53D8E5F9)) + (segment (start 127.127 117.856) (end 128.27 118.999) (width 0.254) (layer GND_layer) (net 173)) + (segment (start 143.129 86.614) (end 153.543 86.614) (width 0.254) (layer Cuivre) (net 173)) + (segment (start 153.543 86.614) (end 155.194 84.963) (width 0.254) (layer Cuivre) (net 173)) + (segment (start 155.194 84.963) (end 173.101 84.963) (width 0.254) (layer Cuivre) (net 173)) + (segment (start 173.101 84.963) (end 174.117 83.947) (width 0.254) (layer Cuivre) (net 173)) + (segment (start 177.419 83.947) (end 178.435 84.963) (width 0.254) (layer Cuivre) (net 173)) + (segment (start 178.435 84.963) (end 187.325 84.963) (width 0.254) (layer Cuivre) (net 173)) + (via (at 121.793 85.598) (size 0.889) (layers Composant Cuivre) (net 173)) + (segment (start 139.065 86.106) (end 139.065 85.598) (width 0.254) (layer Cuivre) (net 173)) + (segment (start 137.795 87.376) (end 139.065 86.106) (width 0.254) (layer Cuivre) (net 173)) + (segment (start 122.428 87.376) (end 137.795 87.376) (width 0.254) (layer Cuivre) (net 173)) + (segment (start 121.793 86.741) (end 122.428 87.376) (width 0.254) (layer Cuivre) (net 173)) + (segment (start 121.793 85.598) (end 121.793 86.741) (width 0.254) (layer Cuivre) (net 173)) + (segment (start 122.555 87.757) (end 123.957 87.757) (width 0.254) (layer GND_layer) (net 173)) + (segment (start 121.793 86.995) (end 122.555 87.757) (width 0.254) (layer GND_layer) (net 173)) + (segment (start 121.793 85.598) (end 121.793 86.995) (width 0.254) (layer GND_layer) (net 173)) + (segment (start 128.27 118.999) (end 128.27 130.937) (width 0.254) (layer GND_layer) (net 173)) + (segment (start 129.413 132.08) (end 128.27 130.937) (width 0.254) (layer GND_layer) (net 173)) + (via (at 139.065 85.598) (size 0.635) (layers Composant Cuivre) (net 173)) + (segment (start 139.065 86.741) (end 139.065 85.598) (width 0.254) (layer Composant) (net 173)) + (segment (start 138.303 87.503) (end 139.065 86.741) (width 0.254) (layer Composant) (net 173)) + (segment (start 138.303 91.948) (end 138.303 87.503) (width 0.254) (layer Composant) (net 173)) + (segment (start 138.3919 92.3036) (end 138.303 91.948) (width 0.254) (layer Composant) (net 173)) + (segment (start 138.3792 93.726) (end 138.3919 92.3036) (width 0.254) (layer Composant) (net 173) (status 810)) + (segment (start 198.755 78.359) (end 200.025 77.089) (width 0.254) (layer Cuivre) (net 173) (status 420)) + (segment (start 193.929 78.359) (end 198.755 78.359) (width 0.254) (layer Cuivre) (net 173)) + (segment (start 174.117 83.947) (end 177.419 83.947) (width 0.254) (layer Cuivre) (net 173)) + (segment (start 127.1 90.9) (end 123.957 87.757) (width 0.254) (layer GND_layer) (net 173) (tstamp 53D8E5FB)) + (segment (start 127.127 90.9) (end 127.1 90.9) (width 0.254) (layer GND_layer) (net 173)) + (via (at 120.269 85.598) (size 0.889) (layers Composant Cuivre) (net 174)) + (via (at 139.954 85.598) (size 0.635) (layers Composant Cuivre) (net 174)) + (segment (start 127.635 119.507) (end 127.635 131.699) (width 0.254) (layer GND_layer) (net 174)) + (segment (start 120.904 87.884) (end 139.827 87.884) (width 0.254) (layer Cuivre) (net 174)) + (segment (start 120.269 87.249) (end 120.904 87.884) (width 0.254) (layer Cuivre) (net 174)) + (segment (start 120.269 85.598) (end 120.269 87.249) (width 0.254) (layer Cuivre) (net 174)) + (segment (start 139.954 86.487) (end 140.589 87.122) (width 0.254) (layer Cuivre) (net 174)) + (segment (start 139.954 85.598) (end 139.954 86.487) (width 0.254) (layer Cuivre) (net 174)) + (segment (start 120.269 86.487) (end 120.269 85.598) (width 0.254) (layer GND_layer) (net 174)) + (segment (start 122.174 88.392) (end 120.269 86.487) (width 0.254) (layer GND_layer) (net 174)) + (segment (start 123.792 88.392) (end 122.174 88.392) (width 0.254) (layer GND_layer) (net 174) (tstamp 53D8E5F7)) + (segment (start 166.751 85.598) (end 166.878 85.471) (width 0.254) (layer Cuivre) (net 174)) + (segment (start 187.96 85.471) (end 192.405 81.026) (width 0.254) (layer Cuivre) (net 174)) + (segment (start 173.355 85.471) (end 174.371 84.455) (width 0.254) (layer Cuivre) (net 174)) + (segment (start 166.878 85.471) (end 173.355 85.471) (width 0.254) (layer Cuivre) (net 174)) + (segment (start 139.827 87.884) (end 140.589 87.122) (width 0.254) (layer Cuivre) (net 174)) + (segment (start 155.321 85.598) (end 166.751 85.598) (width 0.254) (layer Cuivre) (net 174)) + (segment (start 153.797 87.122) (end 155.321 85.598) (width 0.254) (layer Cuivre) (net 174)) + (segment (start 140.589 87.122) (end 153.797 87.122) (width 0.254) (layer Cuivre) (net 174)) + (segment (start 128.778 132.842) (end 127.635 131.699) (width 0.254) (layer GND_layer) (net 174)) + (segment (start 126.619 118.491) (end 126.619 91.2) (width 0.254) (layer GND_layer) (net 174)) + (segment (start 126.619 118.491) (end 127.635 119.507) (width 0.254) (layer GND_layer) (net 174)) + (segment (start 128.778 135.001) (end 128.778 132.842) (width 0.254) (layer GND_layer) (net 174)) + (segment (start 129.794 136.017) (end 128.778 135.001) (width 0.254) (layer GND_layer) (net 174)) + (segment (start 129.794 138.176) (end 129.794 136.017) (width 0.254) (layer GND_layer) (net 174)) + (segment (start 131.064 139.446) (end 129.794 138.176) (width 0.254) (layer GND_layer) (net 174) (status 810)) + (segment (start 139.954 86.741) (end 139.954 85.598) (width 0.254) (layer Composant) (net 174)) + (segment (start 138.811 87.884) (end 139.954 86.741) (width 0.254) (layer Composant) (net 174)) + (segment (start 138.811 91.948) (end 138.811 87.884) (width 0.254) (layer Composant) (net 174)) + (segment (start 138.8872 92.3036) (end 138.811 91.948) (width 0.254) (layer Composant) (net 174)) + (segment (start 138.8872 93.726) (end 138.8872 92.3036) (width 0.254) (layer Composant) (net 174) (status 810)) + (segment (start 198.882 81.026) (end 200.025 82.169) (width 0.254) (layer Cuivre) (net 174) (status 420)) + (segment (start 192.405 81.026) (end 198.882 81.026) (width 0.254) (layer Cuivre) (net 174)) + (segment (start 174.371 84.455) (end 177.038 84.455) (width 0.254) (layer Cuivre) (net 174)) + (segment (start 178.054 85.471) (end 187.96 85.471) (width 0.254) (layer Cuivre) (net 174)) + (segment (start 177.038 84.455) (end 178.054 85.471) (width 0.254) (layer Cuivre) (net 174)) + (segment (start 126.6 91.2) (end 123.792 88.392) (width 0.254) (layer GND_layer) (net 174) (tstamp 53D8E5F4)) + (segment (start 126.619 91.2) (end 126.6 91.2) (width 0.254) (layer GND_layer) (net 174)) + (segment (start 126.873 120.142) (end 126.873 132.715) (width 0.254) (layer GND_layer) (net 175)) + (segment (start 123.063 93.98) (end 123.317 94.361) (width 0.254) (layer GND_layer) (net 175)) + (via (at 123.063 93.98) (size 0.635) (layers Composant Cuivre) (net 175)) + (segment (start 123.063 93.98) (end 123.063 92.329) (width 0.254) (layer Composant) (net 175)) + (segment (start 126.111 119.38) (end 126.873 120.142) (width 0.254) (layer GND_layer) (net 175)) + (segment (start 126.111 95.631) (end 126.111 119.38) (width 0.254) (layer GND_layer) (net 175)) + (segment (start 125.222 94.742) (end 126.111 95.631) (width 0.254) (layer GND_layer) (net 175)) + (segment (start 123.698 94.742) (end 125.222 94.742) (width 0.254) (layer GND_layer) (net 175)) + (segment (start 123.317 94.361) (end 123.698 94.742) (width 0.254) (layer GND_layer) (net 175)) + (segment (start 123.063 93.98) (end 123.19 94.488) (width 0.254) (layer Composant) (net 175)) + (segment (start 123.19 94.488) (end 125.6792 96.9772) (width 0.254) (layer Composant) (net 175)) + (segment (start 128.143 133.985) (end 126.873 132.715) (width 0.254) (layer GND_layer) (net 175)) + (segment (start 125.6792 96.9772) (end 127.635 96.9772) (width 0.254) (layer Composant) (net 175) (status 420)) + (segment (start 123.063 92.329) (end 128.651 86.741) (width 0.254) (layer Composant) (net 175)) + (segment (start 128.651 86.741) (end 130.556 86.741) (width 0.254) (layer Composant) (net 175)) + (segment (start 130.556 86.741) (end 133.985 83.312) (width 0.254) (layer Composant) (net 175)) + (segment (start 133.985 83.312) (end 136.271 83.312) (width 0.254) (layer Composant) (net 175)) + (segment (start 136.271 83.312) (end 137.033 82.55) (width 0.254) (layer Composant) (net 175)) + (segment (start 137.033 82.55) (end 137.033 75.819) (width 0.254) (layer Composant) (net 175)) + (segment (start 137.033 75.819) (end 138.303 74.549) (width 0.254) (layer Composant) (net 175) (status 420)) + (segment (start 128.143 133.985) (end 128.143 135.382) (width 0.254) (layer GND_layer) (net 175)) + (segment (start 128.524 135.763) (end 128.524 136.906) (width 0.254) (layer GND_layer) (net 175) (status 420)) + (segment (start 128.143 135.382) (end 128.524 135.763) (width 0.254) (layer GND_layer) (net 175)) + (segment (start 132.8928 108.1278) (end 132.842 107.823) (width 0.254) (layer Composant) (net 176)) + (segment (start 132.8928 109.22) (end 132.8928 108.1278) (width 0.254) (layer Composant) (net 176) (status 810)) + (segment (start 133.731 105.41) (end 134.112 105.156) (width 0.254) (layer Composant) (net 176)) + (segment (start 123.444 136.906) (end 126.619 133.731) (width 0.254) (layer Cuivre) (net 176) (status 810)) + (segment (start 126.619 133.731) (end 133.858 133.731) (width 0.254) (layer Cuivre) (net 176)) + (segment (start 133.858 133.731) (end 134.493 134.366) (width 0.254) (layer Cuivre) (net 176)) + (segment (start 134.493 134.366) (end 134.493 135.001) (width 0.254) (layer Cuivre) (net 176)) + (segment (start 134.493 128.524) (end 131.953 125.984) (width 0.254) (layer GND_layer) (net 176)) + (segment (start 131.953 125.984) (end 131.953 107.315) (width 0.254) (layer GND_layer) (net 176)) + (segment (start 131.953 107.315) (end 133.223 106.045) (width 0.254) (layer GND_layer) (net 176)) + (segment (start 133.223 106.045) (end 133.223 105.537) (width 0.254) (layer GND_layer) (net 176)) + (segment (start 134.493 135.001) (end 134.493 128.524) (width 0.254) (layer GND_layer) (net 176)) + (segment (start 133.223 105.537) (end 133.604 105.156) (width 0.254) (layer GND_layer) (net 176)) + (segment (start 133.604 105.156) (end 134.112 105.156) (width 0.254) (layer GND_layer) (net 176)) + (via (at 134.493 135.001) (size 0.635) (layers Composant Cuivre) (net 176)) + (segment (start 132.842 106.299) (end 133.731 105.41) (width 0.254) (layer Composant) (net 176)) + (segment (start 132.842 107.823) (end 132.842 106.299) (width 0.254) (layer Composant) (net 176)) + (via (at 134.112 105.156) (size 0.635) (layers Composant Cuivre) (net 176)) + (segment (start 134.3914 109.22) (end 134.3914 107.823) (width 0.254) (layer Composant) (net 177) (status 810)) + (segment (start 134.62 132.715) (end 136.271 134.366) (width 0.254) (layer Cuivre) (net 177)) + (segment (start 136.271 135.001) (end 136.271 128.778) (width 0.254) (layer GND_layer) (net 177)) + (via (at 134.112 106.934) (size 0.635) (layers Composant Cuivre) (net 177)) + (via (at 136.271 135.001) (size 0.635) (layers Composant Cuivre) (net 177)) + (segment (start 134.3914 107.823) (end 134.112 106.934) (width 0.254) (layer Composant) (net 177)) + (segment (start 136.271 128.778) (end 132.969 125.476) (width 0.254) (layer GND_layer) (net 177)) + (segment (start 136.271 134.366) (end 136.271 135.001) (width 0.254) (layer Cuivre) (net 177)) + (segment (start 125.095 132.715) (end 134.62 132.715) (width 0.254) (layer Cuivre) (net 177)) + (segment (start 120.904 136.906) (end 125.095 132.715) (width 0.254) (layer Cuivre) (net 177) (status 810)) + (segment (start 132.969 108.077) (end 134.112 106.934) (width 0.254) (layer GND_layer) (net 177)) + (segment (start 132.969 125.476) (end 132.969 108.077) (width 0.254) (layer GND_layer) (net 177)) + (segment (start 127.508 88.519) (end 126.873 89.154) (width 0.254) (layer Cuivre) (net 178)) + (segment (start 107.95 92.456) (end 107.95 95.758) (width 0.254) (layer Cuivre) (net 178)) + (segment (start 132.08 91.313) (end 132.08 89.535) (width 0.254) (layer Cuivre) (net 178)) + (segment (start 132.08 89.535) (end 131.064 88.519) (width 0.254) (layer Cuivre) (net 178)) + (segment (start 131.064 88.519) (end 127.508 88.519) (width 0.254) (layer Cuivre) (net 178)) + (segment (start 126.873 89.154) (end 122.301 89.154) (width 0.254) (layer Cuivre) (net 178)) + (segment (start 122.301 89.154) (end 121.285 90.17) (width 0.254) (layer Cuivre) (net 178)) + (segment (start 121.285 90.17) (end 110.236 90.17) (width 0.254) (layer Cuivre) (net 178)) + (segment (start 110.236 90.17) (end 107.95 92.456) (width 0.254) (layer Cuivre) (net 178)) + (segment (start 107.95 95.758) (end 103.378 100.33) (width 0.254) (layer Cuivre) (net 178)) + (segment (start 103.378 100.33) (end 102.87 100.711) (width 0.254) (layer Cuivre) (net 178)) + (segment (start 118.364 136.906) (end 119.634 138.176) (width 0.254) (layer GND_layer) (net 178) (status 810)) + (segment (start 119.634 138.176) (end 119.634 140.208) (width 0.254) (layer GND_layer) (net 178)) + (segment (start 119.634 140.208) (end 119.126 140.716) (width 0.254) (layer GND_layer) (net 178)) + (segment (start 119.126 140.716) (end 110.109 140.716) (width 0.254) (layer GND_layer) (net 178)) + (segment (start 110.109 140.716) (end 106.699 137.306) (width 0.254) (layer GND_layer) (net 178)) + (segment (start 106.699 137.306) (end 106.699 102) (width 0.254) (layer GND_layer) (net 178)) + (segment (start 106.699 102) (end 104.648 99.949) (width 0.254) (layer GND_layer) (net 178)) + (segment (start 104.648 99.949) (end 103.505 99.949) (width 0.254) (layer GND_layer) (net 178)) + (segment (start 103.505 99.949) (end 102.87 100.584) (width 0.254) (layer GND_layer) (net 178)) + (segment (start 102.87 100.584) (end 102.87 100.711) (width 0.254) (layer GND_layer) (net 178)) + (segment (start 131.3688 93.726) (end 131.3688 92.5068) (width 0.254) (layer Composant) (net 178) (status 810)) + (segment (start 131.3688 92.5068) (end 131.699 92.202) (width 0.254) (layer Composant) (net 178)) + (segment (start 131.699 92.202) (end 131.699 91.694) (width 0.254) (layer Composant) (net 178)) + (segment (start 131.699 91.694) (end 132.08 91.313) (width 0.254) (layer Composant) (net 178)) + (segment (start 102.87 100.711) (end 102.2985 100.711) (width 0.381) (layer Composant) (net 178)) + (segment (start 102.2985 100.711) (end 100.584 102.4255) (width 0.381) (layer Composant) (net 178) (status 420)) + (via (at 102.87 100.711) (size 0.889) (layers Composant Cuivre) (net 178)) + (via (at 132.08 91.313) (size 0.635) (layers Composant Cuivre) (net 178)) + (segment (start 195.1863 100.7745) (end 195.1863 101.93368) (width 0.254) (layer Composant) (net 179) (status 810)) + (segment (start 195.1863 101.93368) (end 192.92664 101.93368) (width 0.254) (layer Composant) (net 179)) + (segment (start 192.92664 101.93368) (end 192.75552 101.76256) (width 0.254) (layer Composant) (net 179)) + (segment (start 192.75552 101.76256) (end 192.75552 97.31248) (width 0.254) (layer Composant) (net 179)) + (segment (start 192.75552 97.31248) (end 198.755 91.313) (width 0.254) (layer Composant) (net 179)) + (segment (start 198.755 91.313) (end 198.755 88.265) (width 0.254) (layer Composant) (net 179)) + (segment (start 198.755 88.265) (end 200.025 86.995) (width 0.254) (layer Composant) (net 179) (status 420)) + (segment (start 200.025 89.535) (end 200.025 93.17482) (width 0.254) (layer Composant) (net 180) (status 810)) + (segment (start 200.025 93.17482) (end 195.6816 97.51822) (width 0.254) (layer Composant) (net 180)) + (segment (start 195.6816 97.51822) (end 195.6816 100.7745) (width 0.254) (layer Composant) (net 180) (status 420)) + (segment (start 164.719 121.412) (end 165.227 120.523) (width 0.381) (layer Composant) (net 181) (status 420)) + (segment (start 164.719 124.206) (end 164.719 121.412) (width 0.381) (layer Composant) (net 181) (status 10)) + (segment (start 165.354 124.5235) (end 164.719 124.206) (width 0.381) (layer Composant) (net 181) (status 830)) + (segment (start 162.687 120.523) (end 162.687 124.206) (width 0.381) (layer Composant) (net 182) (status 830)) + (segment (start 162.687 124.206) (end 162.814 124.5235) (width 0.381) (layer Composant) (net 182) (status 430)) + (segment (start 160.147 120.523) (end 160.147 124.3965) (width 0.4318) (layer Composant) (net 183) (status 830)) + (segment (start 160.147 124.3965) (end 160.274 124.5235) (width 0.4318) (layer Composant) (net 183) (status 430)) + (segment (start 157.607 120.523) (end 157.607 124.3965) (width 0.4318) (layer Composant) (net 184) (status 830)) + (segment (start 157.607 124.3965) (end 157.734 124.5235) (width 0.4318) (layer Composant) (net 184) (status 430)) + (segment (start 158.8135 89.154) (end 158.623 89.3445) (width 0.381) (layer Composant) (net 185) (status 430)) + (segment (start 160.782 89.154) (end 158.8135 89.154) (width 0.381) (layer Composant) (net 185) (status 830)) + (segment (start 161.925 88.392) (end 162.433 88.392) (width 0.381) (layer Composant) (net 186)) + (segment (start 162.814 88.773) (end 162.814 90.043) (width 0.381) (layer Composant) (net 186) (status 420)) + (segment (start 162.433 88.392) (end 162.814 88.773) (width 0.381) (layer Composant) (net 186)) + (segment (start 160.5915 87.0585) (end 161.925 88.392) (width 0.381) (layer Composant) (net 186) (status 10)) + (segment (start 160.5915 86.995) (end 160.5915 87.0585) (width 0.381) (layer Composant) (net 186) (status 830)) + (segment (start 141.478 86.8045) (end 141.478 87.376) (width 0.254) (layer Composant) (net 187) (status 810)) + (segment (start 141.351 87.503) (end 139.954 87.503) (width 0.254) (layer Composant) (net 187)) + (segment (start 141.478 87.376) (end 141.351 87.503) (width 0.254) (layer Composant) (net 187)) + (segment (start 139.3698 92.3036) (end 139.3698 93.726) (width 0.254) (layer Composant) (net 187) (status 420)) + (segment (start 139.319 91.948) (end 139.3698 92.3036) (width 0.254) (layer Composant) (net 187)) + (segment (start 139.319 88.138) (end 139.319 91.948) (width 0.254) (layer Composant) (net 187)) + (segment (start 139.954 87.503) (end 139.319 88.138) (width 0.254) (layer Composant) (net 187)) + (segment (start 164.211 86.995) (end 164.846 87.63) (width 0.381) (layer Composant) (net 188) (status 430)) + (segment (start 162.4965 86.995) (end 164.211 86.995) (width 0.381) (layer Composant) (net 188) (status 830)) + (segment (start 126.492 83.82) (end 126.492 80.137) (width 0.254) (layer Composant) (net 189) (status 10)) + (segment (start 126.873 79.756) (end 128.27 79.756) (width 0.254) (layer Composant) (net 189) (status 420)) + (segment (start 126.9365 84.455) (end 126.9365 84.2645) (width 0.254) (layer Composant) (net 189) (status 830)) + (segment (start 126.9365 84.2645) (end 126.9365 84.0105) (width 0.254) (layer Composant) (net 189) (status 30)) + (segment (start 133.477 79.629) (end 135.763 79.629) (width 0.254) (layer Composant) (net 189) (status 420)) + (segment (start 126.9365 84.2645) (end 126.492 83.82) (width 0.254) (layer Composant) (net 189) (status 30)) + (segment (start 127.889 83.058) (end 129.8 83.058) (width 0.254) (layer Composant) (net 189)) + (segment (start 126.9365 84.0105) (end 127.889 83.058) (width 0.254) (layer Composant) (net 189) (status 10)) (segment (start 126.492 80.137) (end 126.873 79.756) (width 0.254) (layer Composant) (net 189)) - (segment (start 97.409 116.332) (end 94.9325 116.332) (width 0.381) (layer Composant) (net 190) (status 800)) - (segment (start 94.9325 116.332) (end 94.1705 117.094) (width 0.381) (layer Composant) (net 190) (status 400)) - (segment (start 192.532 81.3435) (end 191.0715 81.3435) (width 0.381) (layer Composant) (net 191) (status 800)) + (segment (start 129.842 83.058) (end 133.271 79.629) (width 0.254) (layer Composant) (net 189) (tstamp 53D8E61C)) + (segment (start 133.271 79.629) (end 133.477 79.629) (width 0.254) (layer Composant) (net 189) (tstamp 53D8E61D)) + (segment (start 129.8 83.058) (end 129.842 83.058) (width 0.254) (layer Composant) (net 189)) + (segment (start 97.409 116.332) (end 94.9325 116.332) (width 0.381) (layer Composant) (net 190) (status 810)) + (segment (start 94.9325 116.332) (end 94.1705 117.094) (width 0.381) (layer Composant) (net 190) (status 420)) + (segment (start 192.532 81.3435) (end 191.0715 81.3435) (width 0.381) (layer Composant) (net 191) (status 810)) (segment (start 191.0715 81.3435) (end 190.754 81.026) (width 0.381) (layer Composant) (net 191)) - (segment (start 197.485 79.629) (end 196.088 81.026) (width 0.381) (layer Composant) (net 191) (status 800)) + (segment (start 197.485 79.629) (end 196.088 81.026) (width 0.381) (layer Composant) (net 191) (status 810)) (segment (start 196.088 81.026) (end 194.183 81.026) (width 0.381) (layer Composant) (net 191)) (segment (start 194.183 81.026) (end 193.8655 81.3435) (width 0.381) (layer Composant) (net 191)) - (segment (start 190.754 81.026) (end 189.23 81.026) (width 0.381) (layer Composant) (net 191) (status 400)) - (segment (start 193.8655 81.3435) (end 192.532 81.3435) (width 0.381) (layer Composant) (net 191) (status 400)) - (segment (start 97.409 120.142) (end 95.1865 120.142) (width 0.4318) (layer Composant) (net 192) (status 800)) - (segment (start 95.1865 120.142) (end 94.1705 121.158) (width 0.4318) (layer Composant) (net 192) (status 400)) + (segment (start 190.754 81.026) (end 189.23 81.026) (width 0.381) (layer Composant) (net 191) (status 420)) + (segment (start 193.8655 81.3435) (end 192.532 81.3435) (width 0.381) (layer Composant) (net 191) (status 420)) + (segment (start 97.409 120.142) (end 95.1865 120.142) (width 0.4318) (layer Composant) (net 192) (status 810)) + (segment (start 95.1865 120.142) (end 94.1705 121.158) (width 0.4318) (layer Composant) (net 192) (status 420)) (segment (start 99.314 122.428) (end 100.203 121.539) (width 0.381) (layer Composant) (net 193)) (segment (start 100.203 121.539) (end 100.203 118.491) (width 0.381) (layer Composant) (net 193)) - (segment (start 94.1705 125.349) (end 95.377 125.349) (width 0.381) (layer Composant) (net 193) (status 800)) + (segment (start 94.1705 125.349) (end 95.377 125.349) (width 0.381) (layer Composant) (net 193) (status 810)) (segment (start 98.298 122.428) (end 99.314 122.428) (width 0.381) (layer Composant) (net 193)) - (segment (start 101.092 117.602) (end 102.743 117.602) (width 0.381) (layer Composant) (net 193) (status 400)) + (segment (start 101.092 117.602) (end 102.743 117.602) (width 0.381) (layer Composant) (net 193) (status 420)) (segment (start 100.203 118.491) (end 101.092 117.602) (width 0.381) (layer Composant) (net 193)) (segment (start 95.377 125.349) (end 98.298 122.428) (width 0.381) (layer Composant) (net 193)) (segment (start 102.743 121.793) (end 101.346 123.19) (width 0.381) (layer Composant) (net 194)) (segment (start 95.885 126.111) (end 95.885 127.762) (width 0.381) (layer Composant) (net 194)) - (segment (start 95.885 127.762) (end 94.234 129.413) (width 0.381) (layer Composant) (net 194)) + (segment (start 95.885 127.762) (end 94.234 129.413) (width 0.381) (layer Composant) (net 194) (status 20)) (segment (start 98.806 123.19) (end 95.885 126.111) (width 0.381) (layer Composant) (net 194)) - (segment (start 94.234 129.413) (end 94.1705 129.413) (width 0.381) (layer Composant) (net 194) (status 400)) - (segment (start 102.743 121.412) (end 102.743 121.793) (width 0.381) (layer Composant) (net 194) (status 800)) + (segment (start 94.234 129.413) (end 94.1705 129.413) (width 0.381) (layer Composant) (net 194) (status 430)) + (segment (start 102.743 121.412) (end 102.743 121.793) (width 0.381) (layer Composant) (net 194) (status 810)) (segment (start 101.346 123.19) (end 98.806 123.19) (width 0.381) (layer Composant) (net 194)) - (segment (start 167.0685 81.3435) (end 164.592 81.3435) (width 0.4318) (layer Composant) (net 195) (status 400)) - (segment (start 168.783 79.629) (end 167.0685 81.3435) (width 0.4318) (layer Composant) (net 195)) - (segment (start 169.545 79.629) (end 168.783 79.629) (width 0.4318) (layer Composant) (net 195) (status 800)) - (segment (start 161.29 81.026) (end 164.2745 81.026) (width 0.4318) (layer Composant) (net 195) (status 800)) - (segment (start 164.2745 81.026) (end 164.592 81.3435) (width 0.4318) (layer Composant) (net 195) (status 400)) - (segment (start 100.9015 93.345) (end 100.9015 95.3135) (width 0.381) (layer Composant) (net 196) (status 800)) - (segment (start 100.9015 95.3135) (end 100.457 95.758) (width 0.381) (layer Composant) (net 196) (status 400)) - (segment (start 102.489 91.313) (end 100.9015 92.9005) (width 0.381) (layer Composant) (net 196)) + (segment (start 167.0685 81.3435) (end 164.592 81.3435) (width 0.4318) (layer Composant) (net 195) (status 420)) + (segment (start 168.783 79.629) (end 167.0685 81.3435) (width 0.4318) (layer Composant) (net 195) (status 10)) + (segment (start 169.545 79.629) (end 168.783 79.629) (width 0.4318) (layer Composant) (net 195) (status 830)) + (segment (start 161.29 81.026) (end 164.2745 81.026) (width 0.4318) (layer Composant) (net 195) (status 830)) + (segment (start 164.2745 81.026) (end 164.592 81.3435) (width 0.4318) (layer Composant) (net 195) (status 430)) + (segment (start 100.9015 93.345) (end 100.9015 95.3135) (width 0.381) (layer Composant) (net 196) (status 810)) + (segment (start 100.9015 95.3135) (end 100.457 95.758) (width 0.381) (layer Composant) (net 196) (status 420)) + (segment (start 102.489 91.313) (end 100.9015 92.9005) (width 0.381) (layer Composant) (net 196) (status 20)) (segment (start 102.489 90.297) (end 102.489 91.313) (width 0.381) (layer Composant) (net 196)) - (segment (start 100.9015 92.9005) (end 100.9015 93.345) (width 0.381) (layer Composant) (net 196) (status 400)) - (segment (start 103.251 90.297) (end 102.489 90.297) (width 0.381) (layer Composant) (net 196) (status 800)) + (segment (start 100.9015 92.9005) (end 100.9015 93.345) (width 0.381) (layer Composant) (net 196) (status 430)) + (segment (start 103.251 90.297) (end 102.489 90.297) (width 0.381) (layer Composant) (net 196) (status 810)) (segment (start 135.763 111.506) (end 135.76808 111.506) (width 0.254) (layer Composant) (net 197)) (segment (start 135.763 110.744) (end 135.763 111.506) (width 0.254) (layer Composant) (net 197)) - (segment (start 135.89 109.22) (end 135.89 110.617) (width 0.254) (layer Composant) (net 197) (status 800)) + (segment (start 135.89 109.22) (end 135.89 110.617) (width 0.254) (layer Composant) (net 197) (status 810)) (segment (start 135.89 110.617) (end 135.763 110.744) (width 0.254) (layer Composant) (net 197)) - (segment (start 135.76808 111.506) (end 134.874 112.4585) (width 0.254) (layer Composant) (net 197) (status 400)) - (segment (start 141.478 86.8045) (end 141.478 87.376) (width 0.254) (layer Composant) (net 198) (status 800)) - (segment (start 141.351 87.503) (end 139.954 87.503) (width 0.254) (layer Composant) (net 198)) - (segment (start 141.478 87.376) (end 141.351 87.503) (width 0.254) (layer Composant) (net 198)) - (segment (start 139.3698 92.3036) (end 139.3698 93.726) (width 0.254) (layer Composant) (net 198) (status 400)) - (segment (start 139.319 91.948) (end 139.3698 92.3036) (width 0.254) (layer Composant) (net 198)) - (segment (start 139.319 88.138) (end 139.319 91.948) (width 0.254) (layer Composant) (net 198)) - (segment (start 139.954 87.503) (end 139.319 88.138) (width 0.254) (layer Composant) (net 198)) - (segment (start 196.215 78.359) (end 198.247 78.359) (width 0.381) (layer Composant) (net 200)) - (segment (start 198.755 77.851) (end 198.755 75.819) (width 0.381) (layer Composant) (net 200)) - (segment (start 198.755 75.819) (end 197.485 74.549) (width 0.381) (layer Composant) (net 200) (status 400)) - (segment (start 194.818 79.756) (end 196.215 78.359) (width 0.381) (layer Composant) (net 200)) - (segment (start 189.23 79.756) (end 194.818 79.756) (width 0.381) (layer Composant) (net 200) (status 800)) - (segment (start 198.247 78.359) (end 198.755 77.851) (width 0.381) (layer Composant) (net 200)) - (segment (start 196.088 77.089) (end 197.485 77.089) (width 0.381) (layer Composant) (net 201) (status 400)) - (segment (start 189.23 78.486) (end 194.691 78.486) (width 0.381) (layer Composant) (net 201) (status 800)) - (segment (start 194.691 78.486) (end 196.088 77.089) (width 0.381) (layer Composant) (net 201)) - (segment (start 189.23 82.296) (end 197.358 82.296) (width 0.381) (layer Composant) (net 202) (status 800)) - (segment (start 197.358 82.296) (end 197.485 82.169) (width 0.381) (layer Composant) (net 202) (status 400)) - (segment (start 169.545 74.549) (end 170.815 75.819) (width 0.381) (layer Composant) (net 203) (status 800)) - (segment (start 170.307 78.359) (end 168.275 78.359) (width 0.381) (layer Composant) (net 203)) - (segment (start 166.878 79.756) (end 161.29 79.756) (width 0.381) (layer Composant) (net 203) (status 400)) - (segment (start 168.275 78.359) (end 166.878 79.756) (width 0.381) (layer Composant) (net 203)) - (segment (start 170.815 77.851) (end 170.307 78.359) (width 0.381) (layer Composant) (net 203)) - (segment (start 170.815 75.819) (end 170.815 77.851) (width 0.381) (layer Composant) (net 203)) - (segment (start 168.148 77.089) (end 169.545 77.089) (width 0.381) (layer Composant) (net 204) (status 400)) - (segment (start 166.751 78.486) (end 168.148 77.089) (width 0.381) (layer Composant) (net 204)) - (segment (start 161.29 78.486) (end 166.751 78.486) (width 0.381) (layer Composant) (net 204) (status 800)) - (segment (start 169.418 82.296) (end 169.545 82.169) (width 0.4318) (layer Composant) (net 205) (status 400)) - (segment (start 161.29 82.296) (end 169.418 82.296) (width 0.4318) (layer Composant) (net 205) (status 800)) - (segment (start 103.124 85.979) (end 103.251 86.106) (width 0.381) (layer Composant) (net 206)) - (segment (start 103.251 86.106) (end 103.251 86.487) (width 0.381) (layer Composant) (net 206) (status 400)) - (segment (start 103.124 84.582) (end 103.124 85.979) (width 0.381) (layer Composant) (net 206) (status 800)) - (segment (start 134.493 75.819) (end 135.763 74.549) (width 0.254) (layer Composant) (net 207) (status 400)) - (segment (start 134.493 76.327) (end 134.493 75.819) (width 0.254) (layer Composant) (net 207)) - (segment (start 129.794 81.026) (end 134.493 76.327) (width 0.254) (layer Composant) (net 207)) - (segment (start 128.27 81.026) (end 129.794 81.026) (width 0.254) (layer Composant) (net 207) (status 800)) - (segment (start 130.048 85.725) (end 133.985 81.788) (width 0.254) (layer Composant) (net 208)) - (segment (start 125.476 85.344) (end 125.857 85.725) (width 0.254) (layer Composant) (net 208)) - (segment (start 134.874 81.788) (end 135.763 82.169) (width 0.254) (layer Composant) (net 208) (status 400)) - (segment (start 128.27 78.486) (end 126.111 78.486) (width 0.254) (layer Composant) (net 208) (status 800)) - (segment (start 125.857 85.725) (end 130.048 85.725) (width 0.254) (layer Composant) (net 208)) - (segment (start 133.985 81.788) (end 134.874 81.788) (width 0.254) (layer Composant) (net 208)) - (segment (start 125.476 79.121) (end 125.476 85.344) (width 0.254) (layer Composant) (net 208)) - (segment (start 126.111 78.486) (end 125.476 79.121) (width 0.254) (layer Composant) (net 208)) - (segment (start 134.874 77.089) (end 135.763 77.089) (width 0.254) (layer Composant) (net 209) (status 400)) - (segment (start 128.27 82.296) (end 129.667 82.296) (width 0.254) (layer Composant) (net 209) (status 800)) - (segment (start 129.667 82.296) (end 134.874 77.089) (width 0.254) (layer Composant) (net 209)) - (segment (start 191.897 65.405) (end 191.897 68.58) (width 0.4318) (layer Cuivre) (net 271) (status 400)) - (segment (start 183.642 67.437) (end 185.039 66.04) (width 0.4318) (layer Composant) (net 271) (status 400)) - (segment (start 183.642 68.58) (end 183.642 67.437) (width 0.4318) (layer Composant) (net 271) (status 800)) - (segment (start 185.039 66.04) (end 185.166 66.04) (width 0.4318) (layer Cuivre) (net 271) (status 800)) - (segment (start 185.166 66.04) (end 186.69 64.516) (width 0.4318) (layer Cuivre) (net 271)) - (segment (start 186.69 64.516) (end 191.008 64.516) (width 0.4318) (layer Cuivre) (net 271)) - (segment (start 191.008 64.516) (end 191.897 65.405) (width 0.4318) (layer Cuivre) (net 271)) - (segment (start 158.369 64.897) (end 157.734 64.262) (width 0.381) (layer Cuivre) (net 273)) - (segment (start 158.369 68.58) (end 158.369 64.897) (width 0.381) (layer Cuivre) (net 273) (status 800)) - (segment (start 150.114 68.58) (end 150.114 67.437) (width 0.381) (layer Composant) (net 273) (status 800)) - (segment (start 157.734 64.262) (end 150.876 64.262) (width 0.381) (layer Cuivre) (net 273)) - (segment (start 150.114 67.437) (end 151.511 66.04) (width 0.381) (layer Composant) (net 273) (status 400)) - (segment (start 150.876 64.262) (end 149.987 65.151) (width 0.381) (layer Cuivre) (net 273)) - (segment (start 149.987 65.151) (end 149.987 68.453) (width 0.381) (layer Cuivre) (net 273)) - (segment (start 149.987 68.453) (end 150.114 68.58) (width 0.381) (layer Cuivre) (net 273) (status 400)) - (segment (start 117.983 66.04) (end 117.983 67.183) (width 0.381) (layer Cuivre) (net 275) (status 800)) - (segment (start 124.841 68.58) (end 124.841 65.151) (width 0.381) (layer Cuivre) (net 275) (status 800)) - (segment (start 124.206 64.516) (end 119.507 64.516) (width 0.381) (layer Cuivre) (net 275)) - (segment (start 117.983 67.183) (end 116.586 68.58) (width 0.381) (layer Cuivre) (net 275) (status 400)) - (segment (start 119.507 64.516) (end 117.983 66.04) (width 0.381) (layer Cuivre) (net 275) (status 400)) - (segment (start 124.841 65.151) (end 124.206 64.516) (width 0.381) (layer Cuivre) (net 275)) - (segment (start 85.217 115.57) (end 87.63 115.57) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 89.789 113.411) (end 89.789 111.379) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 87.63 115.57) (end 89.789 113.411) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 132.3848 110.4138) (end 132.9055 110.9345) (width 0.254) (layer Composant) (net 278)) - (segment (start 132.9055 110.9345) (end 132.9055 112.268) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 192.5955 122.7455) (end 192.33388 123.00712) (width 0.5588) (layer Composant) (net 278)) - (segment (start 192.33388 123.00712) (end 192.33388 123.84532) (width 0.5588) (layer Composant) (net 278)) - (segment (start 193.1797 122.7455) (end 192.5955 122.7455) (width 0.254) (layer Composant) (net 278) (status 800)) - (segment (start 133.096 90.551) (end 132.461 89.916) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 132.461 89.916) (end 130.937 89.916) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 132.3848 109.22) (end 132.3848 110.4138) (width 0.254) (layer Composant) (net 278) (status 800)) - (segment (start 183.66232 123.84532) (end 178.689 118.872) (width 0.5588) (layer 3.3V_layer) (net 278)) - (via (at 178.689 118.872) (size 1.143) (layers Composant Cuivre) (net 278)) - (segment (start 192.33388 123.84532) (end 183.66232 123.84532) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 194.691 128.397) (end 200.914 134.62) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 200.914 134.62) (end 207.01 134.62) (width 0.5588) (layer 3.3V_layer) (net 278) (status 400)) - (segment (start 194.691 125.222) (end 194.691 128.397) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 212.51926 102.56774) (end 212.598 102.64648) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 212.598 102.64648) (end 212.598 104.648) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 212.598 104.648) (end 211.582 105.664) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 211.582 105.664) (end 206.83474 105.664) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 211.41436 102.56774) (end 212.51926 102.56774) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 206.83474 105.664) (end 206.83474 109.98708) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 206.83474 105.10774) (end 206.83474 105.664) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 204.724 102.997) (end 206.83474 105.10774) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 202.48118 102.997) (end 204.724 102.997) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 194.818 125.222) (end 198.9709 121.0691) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 198.9709 121.0691) (end 200.56348 121.0691) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 194.691 125.222) (end 194.818 125.222) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 192.33388 125.02388) (end 192.532 125.222) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 192.532 125.222) (end 194.691 125.222) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 192.33388 123.84532) (end 192.33388 125.02388) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 193.675 109.855) (end 195.072 109.855) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 193.167 70.866) (end 205.359 70.866) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 205.359 70.866) (end 211.12226 65.10274) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 211.12226 65.10274) (end 218.44 65.10274) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 191.008 73.025) (end 193.167 70.866) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 85.09 118.237) (end 83.82 116.967) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 85.09 119.126) (end 85.09 118.237) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 194.691 124.206) (end 194.691 125.222) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 196.4055 122.4915) (end 194.691 124.206) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 197.485 122.4915) (end 196.4055 122.4915) (width 0.5588) (layer Cuivre) (net 278) (status 800)) - (via (at 191.008 73.025) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 97.155 87.757) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 107.95 114.173) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 146.05 74.676) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 164.592 71.247) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 162.306 106.807) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 163.449 100.33) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 107.823 83.185) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 100.838 113.03) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 97.409 112.141) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 131.572 71.247) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 193.675 109.855) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 130.937 89.916) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 157.734 97.536) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 121.666 98.425) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 133.985 104.267) (size 0.635) (layers Composant Cuivre) (net 278)) - (via (at 168.275 115.062) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 85.09 119.126) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 138.43 110.617) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 146.812 105.41) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 143.129 93.853) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 161.163 92.329) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 131.699 102.87) (size 0.635) (layers Composant Cuivre) (net 278)) - (via (at 146.812 98.679) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 194.691 125.222) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 211.41436 102.56774) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 199.009 102.97668) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 192.46088 113.5126) (size 1.143) (layers Composant Cuivre) (net 278)) - (via (at 209.73288 118.09476) (size 1.143) (layers Composant Cuivre) (net 278)) - (segment (start 191.262 86.233) (end 189.23 88.265) (width 0.5588) (layer 3.3V_layer) (net 278) (status 400)) - (segment (start 191.262 73.279) (end 191.262 86.233) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 191.008 73.025) (end 191.262 73.279) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 191.1985 73.2155) (end 191.008 73.025) (width 0.5588) (layer Composant) (net 278)) - (segment (start 192.532 73.2155) (end 191.1985 73.2155) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 98.7425 87.757) (end 97.155 87.757) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 102.235 114.173) (end 107.95 114.173) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 101.092 113.03) (end 102.235 114.173) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 100.838 113.03) (end 101.092 113.03) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 107.95 134.112) (end 110.744 136.906) (width 0.5588) (layer 3.3V_layer) (net 278) (status 400)) - (segment (start 107.95 114.173) (end 107.95 134.112) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 143.002 71.628) (end 146.05 74.676) (width 0.5588) (layer Composant) (net 278)) - (segment (start 134.747 71.628) (end 143.002 71.628) (width 0.5588) (layer Composant) (net 278)) - (segment (start 132.7785 73.5965) (end 134.747 71.628) (width 0.5588) (layer Composant) (net 278)) - (segment (start 130.937 73.5965) (end 132.7785 73.5965) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 150.114 70.612) (end 146.05 74.676) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 152.908 70.612) (end 150.114 70.612) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 155.321 73.025) (end 152.908 70.612) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 162.814 73.025) (end 155.321 73.025) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 164.592 71.247) (end 162.814 73.025) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 164.846 70.993) (end 164.592 71.247) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 182.753 70.993) (end 164.846 70.993) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 184.785 73.025) (end 182.753 70.993) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 191.008 73.025) (end 184.785 73.025) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 179.07 130.302) (end 181.864 130.302) (width 0.5588) (layer 3.3V_layer) (net 278) (status 400)) - (segment (start 172.085 123.317) (end 179.07 130.302) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 172.085 105.283) (end 172.085 123.317) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 169.672 102.87) (end 172.085 105.283) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 168.529 102.87) (end 169.672 102.87) (width 0.5588) (layer 3.3V_layer) (net 278) (status 800)) - (segment (start 161.544 106.807) (end 162.306 106.807) (width 0.5588) (layer Composant) (net 278)) - (segment (start 166.243 102.87) (end 168.529 102.87) (width 0.5588) (layer 3.3V_layer) (net 278) (status 400)) - (segment (start 162.306 106.807) (end 166.243 102.87) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 162.306 101.473) (end 162.306 106.807) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 163.449 100.33) (end 162.306 101.473) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 161.3535 104.7115) (end 161.036 104.394) (width 0.5588) (layer Composant) (net 278)) - (segment (start 161.3535 105.537) (end 161.3535 104.7115) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 104.648 87.757) (end 97.155 87.757) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 106.553 85.852) (end 104.648 87.757) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 106.553 84.455) (end 106.553 85.852) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 107.823 83.185) (end 106.553 84.455) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 107.5055 83.5025) (end 107.823 83.185) (width 0.5588) (layer Composant) (net 278)) - (segment (start 107.5055 84.328) (end 107.5055 83.5025) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 162.2425 72.4535) (end 161.29 73.406) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 162.2425 71.247) (end 162.2425 72.4535) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 164.592 71.247) (end 164.592 73.2155) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 74.7014 96.2914) (end 74.7014 93.091) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 78.74 100.33) (end 88.9 100.33) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 78.74 100.33) (end 74.7014 96.2914) (width 0.5588) (layer Composant) (net 278)) - (segment (start 74.7014 93.091) (end 76.4032 93.091) (width 0.5588) (layer Composant) (net 278) (status C00)) - (segment (start 107.696 133.858) (end 110.744 136.906) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 106.3625 133.858) (end 107.696 133.858) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 74.549 136.779) (end 76.327 136.779) (width 0.5588) (layer 3.3V_layer) (net 278) (status 400)) - (segment (start 73.914 136.144) (end 74.549 136.779) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 73.914 117.475) (end 73.914 136.144) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 74.93 116.459) (end 73.914 117.475) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 76.327 116.459) (end 74.93 116.459) (width 0.5588) (layer 3.3V_layer) (net 278) (status 800)) - (segment (start 162.814 126.4285) (end 165.354 126.4285) (width 0.5588) (layer Composant) (net 278) (status C00)) - (segment (start 160.274 126.4285) (end 162.814 126.4285) (width 0.5588) (layer Composant) (net 278) (status C00)) - (segment (start 190.1825 72.4535) (end 189.23 73.406) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 190.1825 71.247) (end 190.1825 72.4535) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 99.949 112.141) (end 100.838 113.03) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 97.409 112.141) (end 99.949 112.141) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 164.592 71.247) (end 162.2425 71.247) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 192.532 71.247) (end 190.1825 71.247) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 192.532 73.2155) (end 192.532 71.247) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 129.2225 72.4535) (end 128.27 73.406) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 129.2225 71.247) (end 129.2225 72.4535) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 157.734 126.4285) (end 160.274 126.4285) (width 0.5588) (layer Composant) (net 278) (status C00)) - (segment (start 131.572 72.644) (end 130.937 73.5965) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 131.572 71.247) (end 131.572 72.644) (width 0.5588) (layer Composant) (net 278)) - (segment (start 107.569 87.757) (end 108.585 87.757) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 107.5055 87.6935) (end 107.569 87.757) (width 0.5588) (layer Composant) (net 278)) - (segment (start 131.572 77.343) (end 131.572 71.247) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 126.619 82.296) (end 131.572 77.343) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 108.712 82.296) (end 126.619 82.296) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 107.823 83.185) (end 108.712 82.296) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 107.5055 84.328) (end 107.5055 87.6935) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 169.2275 130.302) (end 165.354 126.4285) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 181.864 130.302) (end 169.2275 130.302) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 131.572 71.247) (end 129.2225 71.247) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 168.529 102.87) (end 176.149 102.87) (width 0.5588) (layer Composant) (net 278) (status C00)) - (segment (start 101.6635 111.252) (end 101.6635 113.03) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 97.4725 112.0775) (end 97.4725 110.236) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 97.409 112.141) (end 97.4725 112.0775) (width 0.5588) (layer Composant) (net 278)) - (segment (start 101.6635 113.03) (end 100.838 113.03) (width 0.5588) (layer Composant) (net 278)) - (segment (start 164.846 98.933) (end 163.449 100.33) (width 0.5588) (layer Composant) (net 278)) - (segment (start 164.846 98.806) (end 164.846 98.933) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 101.854 113.792) (end 102.743 113.792) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 101.6635 113.6015) (end 101.854 113.792) (width 0.5588) (layer Composant) (net 278)) - (segment (start 101.6635 113.03) (end 101.6635 113.6015) (width 0.5588) (layer Composant) (net 278)) - (segment (start 186.817 90.678) (end 189.23 88.265) (width 0.5588) (layer 3.3V_layer) (net 278) (status 400)) - (segment (start 185.547 90.678) (end 186.817 90.678) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 183.769 93.218) (end 185.547 90.678) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 183.769 101.854) (end 183.769 93.218) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 177.927 101.854) (end 183.769 101.854) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 176.911 102.87) (end 177.927 101.854) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 176.149 102.87) (end 176.911 102.87) (width 0.5588) (layer 3.3V_layer) (net 278) (status 800)) - (segment (start 146.4945 98.3615) (end 146.812 98.679) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 145.415 98.3615) (end 146.4945 98.3615) (width 0.5588) (layer Cuivre) (net 278) (status 800)) - (segment (start 145.6055 105.41) (end 145.288 105.7275) (width 0.5588) (layer Cuivre) (net 278) (status 400)) - (segment (start 146.812 105.41) (end 145.6055 105.41) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 130.937 91.3765) (end 130.8735 91.44) (width 0.5588) (layer Cuivre) (net 278) (status 400)) - (segment (start 130.937 89.916) (end 130.937 91.3765) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 108.585 109.855) (end 112.522 109.855) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 108.0135 110.4265) (end 108.585 109.855) (width 0.5588) (layer Composant) (net 278)) - (segment (start 108.0135 114.1095) (end 108.0135 110.4265) (width 0.5588) (layer Composant) (net 278)) - (segment (start 107.95 114.173) (end 108.0135 114.1095) (width 0.5588) (layer Composant) (net 278)) - (segment (start 130.8735 89.916) (end 130.937 89.916) (width 0.5588) (layer Composant) (net 278)) - (segment (start 139.827 90.551) (end 143.129 93.853) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 133.096 90.551) (end 139.827 90.551) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 130.8862 93.726) (end 130.3782 93.726) (width 0.254) (layer Composant) (net 278) (status C00)) - (segment (start 123.444 97.282) (end 121.0945 97.282) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 125.17374 99.01174) (end 123.444 97.282) (width 0.5588) (layer Composant) (net 278)) - (segment (start 125.349 98.8695) (end 125.17374 99.01174) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 157.734 95.758) (end 157.734 97.536) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 161.163 92.329) (end 157.734 95.758) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 102.9335 98.933) (end 102.9335 96.647) (width 0.5588) (layer Composant) (net 278) (status C00)) - (segment (start 84.2645 121.412) (end 84.2645 119.126) (width 0.5588) (layer Composant) (net 278) (status C00)) - (segment (start 126.0729 102.9716) (end 125.5395 103.505) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 127.635 102.9716) (end 126.0729 102.9716) (width 0.254) (layer Composant) (net 278) (status 800)) - (segment (start 170.6245 117.094) (end 172.9105 117.094) (width 0.5588) (layer Composant) (net 278) (status C00)) - (segment (start 137.93978 110.998) (end 138.4935 111.633) (width 0.254) (layer Composant) (net 278) (status 400)) - (segment (start 137.8966 110.9472) (end 137.93978 110.998) (width 0.254) (layer Composant) (net 278)) - (segment (start 137.8966 109.22) (end 137.8966 110.9472) (width 0.254) (layer Composant) (net 278) (status 800)) - (segment (start 84.2645 119.126) (end 85.09 119.126) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 155.829 97.536) (end 157.734 97.536) (width 0.5588) (layer Composant) (net 278)) - (segment (start 155.067 98.298) (end 155.829 97.536) (width 0.5588) (layer Composant) (net 278)) - (segment (start 153.9875 98.298) (end 155.067 98.298) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 182.8165 121.158) (end 182.8165 123.444) (width 0.5588) (layer Composant) (net 278) (status C00)) - (segment (start 175.641 115.824) (end 173.863 115.824) (width 0.5588) (layer Composant) (net 278)) - (segment (start 173.863 115.824) (end 173.863 116.1415) (width 0.5588) (layer Composant) (net 278)) - (segment (start 173.863 116.1415) (end 172.9105 117.094) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 131.3942 109.22) (end 131.3942 110.0328) (width 0.254) (layer Composant) (net 278) (status 800)) - (segment (start 180.975 121.158) (end 178.689 118.872) (width 0.5588) (layer Composant) (net 278)) - (segment (start 182.8165 121.158) (end 180.975 121.158) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 141.351 92.2655) (end 142.5575 91.059) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 141.351 92.456) (end 141.351 92.2655) (width 0.5588) (layer Composant) (net 278)) - (segment (start 140.8684 92.9386) (end 141.351 92.456) (width 0.254) (layer Composant) (net 278)) - (segment (start 140.8684 93.726) (end 140.8684 92.9386) (width 0.254) (layer Composant) (net 278) (status 800)) - (segment (start 132.3848 108.1278) (end 132.3848 109.22) (width 0.254) (layer Composant) (net 278) (status 400)) - (segment (start 132.334 107.823) (end 132.3848 108.1278) (width 0.254) (layer Composant) (net 278)) - (segment (start 132.334 105.791) (end 132.334 107.823) (width 0.254) (layer Composant) (net 278)) - (segment (start 133.096 105.029) (end 132.334 105.791) (width 0.254) (layer Composant) (net 278)) - (segment (start 133.096 104.648) (end 133.096 105.029) (width 0.254) (layer Composant) (net 278)) - (segment (start 133.477 104.267) (end 133.096 104.648) (width 0.254) (layer Composant) (net 278)) - (segment (start 133.985 104.267) (end 133.477 104.267) (width 0.2) (layer Composant) (net 278)) - (segment (start 140.8684 93.726) (end 141.3764 93.726) (width 0.254) (layer Composant) (net 278) (status C00)) - (segment (start 138.4935 110.6805) (end 138.43 110.617) (width 0.5588) (layer Composant) (net 278)) - (segment (start 138.4935 111.633) (end 138.4935 110.6805) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 146.4945 105.7275) (end 145.288 105.7275) (width 0.4) (layer Composant) (net 278)) - (segment (start 145.288 105.7275) (end 144.6784 104.9782) (width 0.254) (layer Composant) (net 278)) - (segment (start 144.6784 104.9782) (end 143.129 104.9782) (width 0.254) (layer Composant) (net 278) (status 400)) - (segment (start 146.812 105.41) (end 146.4945 105.7275) (width 0.4) (layer Composant) (net 278)) - (segment (start 143.002 93.726) (end 141.3764 93.726) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 143.129 93.853) (end 143.002 93.726) (width 0.5588) (layer Composant) (net 278)) - (segment (start 146.812 97.536) (end 143.129 93.853) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 146.812 98.679) (end 146.812 97.536) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 127.889 95.25) (end 130.937 92.202) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 130.937 92.202) (end 130.937 89.916) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 127.889 97.155) (end 127.889 95.25) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 153.9875 93.853) (end 153.9875 96.012) (width 0.5588) (layer Composant) (net 278) (status C00)) - (via (at 98.298 100.584) (size 1.143) (layers Composant Cuivre) (net 278)) - (segment (start 98.3615 100.5205) (end 100.584 100.5205) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 98.298 100.584) (end 98.3615 100.5205) (width 0.5588) (layer Composant) (net 278)) - (segment (start 84.2645 106.553) (end 84.2645 104.267) (width 0.5588) (layer Composant) (net 278) (status C00)) - (segment (start 102.1715 98.933) (end 100.584 100.5205) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 102.9335 98.933) (end 102.1715 98.933) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 153.9875 96.012) (end 153.9875 98.298) (width 0.5588) (layer Composant) (net 278) (status C00)) - (segment (start 161.163 91.313) (end 160.782 90.932) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 161.163 92.329) (end 161.163 91.313) (width 0.5588) (layer Composant) (net 278)) - (segment (start 134.874 92.71) (end 134.874 93.726) (width 0.254) (layer Composant) (net 278) (status 400)) - (segment (start 135.5725 92.0115) (end 134.874 92.71) (width 0.254) (layer Composant) (net 278)) - (segment (start 135.4455 91.44) (end 135.5725 92.0115) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 142.621 120.015) (end 148.59 120.015) (width 0.5588) (layer Composant) (net 278) (status 400)) - (via (at 141.859 119.253) (size 1.143) (layers Composant Cuivre) (net 278)) - (segment (start 141.859 119.253) (end 140.97 118.364) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 138.43 111.125) (end 138.43 110.617) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 140.97 113.665) (end 138.43 111.125) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 140.97 118.364) (end 140.97 113.665) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 141.859 119.253) (end 142.621 120.015) (width 0.5588) (layer Composant) (net 278)) - (segment (start 155.194 100.076) (end 157.734 97.536) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 149.479 100.076) (end 155.194 100.076) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 148.082 98.679) (end 149.479 100.076) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 146.812 98.679) (end 148.082 98.679) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 161.163 107.95) (end 168.275 115.062) (width 0.5588) (layer GND_layer) (net 278)) - (segment (start 161.163 92.329) (end 161.163 107.95) (width 0.5588) (layer GND_layer) (net 278)) - (segment (start 121.0945 97.8535) (end 121.666 98.425) (width 0.5588) (layer Composant) (net 278)) - (segment (start 121.0945 97.282) (end 121.0945 97.8535) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 129.4384 102.9462) (end 127.635 102.9716) (width 0.254) (layer Composant) (net 278) (status 400)) - (segment (start 129.667 103.124) (end 129.4384 102.9462) (width 0.254) (layer Composant) (net 278)) - (segment (start 131.318 103.124) (end 129.667 103.124) (width 0.254) (layer Composant) (net 278)) - (segment (start 131.699 102.87) (end 131.318 103.124) (width 0.254) (layer Composant) (net 278)) - (segment (start 130.048 97.155) (end 127.889 97.155) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 131.699 98.806) (end 130.048 97.155) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 131.699 102.87) (end 131.699 98.806) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 122.936 97.155) (end 121.666 98.425) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 127.889 97.155) (end 122.936 97.155) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 130.3782 92.8878) (end 130.3782 93.726) (width 0.254) (layer Composant) (net 278) (status 400)) - (segment (start 130.8735 92.3925) (end 130.3782 92.8878) (width 0.254) (layer Composant) (net 278)) - (segment (start 130.8735 89.9795) (end 130.8735 92.3925) (width 0.254) (layer Composant) (net 278)) - (segment (start 125.7808 99.4664) (end 125.349 98.8695) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 127.635 99.4664) (end 125.7808 99.4664) (width 0.254) (layer Composant) (net 278) (status 800)) - (segment (start 145.288 98.679) (end 146.812 98.679) (width 0.5588) (layer Composant) (net 278)) - (segment (start 145.0086 98.9584) (end 145.288 98.679) (width 0.254) (layer Composant) (net 278)) - (segment (start 143.129 98.9584) (end 145.0086 98.9584) (width 0.254) (layer Composant) (net 278) (status 800)) - (segment (start 170.6245 115.8875) (end 170.6245 117.094) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 169.799 115.062) (end 170.6245 115.8875) (width 0.5588) (layer Composant) (net 278)) - (segment (start 168.275 115.062) (end 169.799 115.062) (width 0.5588) (layer Composant) (net 278)) - (segment (start 121.158 95.885) (end 121.0945 97.282) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 117.094 91.821) (end 121.158 95.885) (width 0.5588) (layer Composant) (net 278)) - (segment (start 110.49 91.821) (end 117.094 91.821) (width 0.5588) (layer Composant) (net 278)) - (segment (start 107.315 94.996) (end 110.49 91.821) (width 0.5588) (layer Composant) (net 278)) - (segment (start 103.251 94.996) (end 107.315 94.996) (width 0.5588) (layer Composant) (net 278)) - (segment (start 102.9335 95.3135) (end 103.251 94.996) (width 0.5588) (layer Composant) (net 278)) - (segment (start 102.9335 96.647) (end 102.9335 95.3135) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 77.597 117.729) (end 76.327 116.459) (width 0.5588) (layer 3.3V_layer) (net 278) (status 400)) - (segment (start 83.058 117.729) (end 77.597 117.729) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 83.82 116.967) (end 83.058 117.729) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 96.774 112.141) (end 96.012 111.379) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 97.409 112.141) (end 96.774 112.141) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 96.012 111.379) (end 89.789 111.379) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 85.217 115.57) (end 83.82 116.967) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 143.129 80.899) (end 143.129 93.853) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 146.05 77.978) (end 143.129 80.899) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 146.05 74.676) (end 146.05 77.978) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 161.544 107.696) (end 161.544 106.807) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 161.544 105.7275) (end 161.3535 105.537) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 161.544 106.807) (end 161.544 105.7275) (width 0.5588) (layer Composant) (net 278)) - (segment (start 134.112 88.392) (end 132.461 88.392) (width 0.5588) (layer Composant) (net 278)) - (segment (start 132.461 88.392) (end 130.937 89.916) (width 0.5588) (layer Composant) (net 278)) - (segment (start 135.4455 91.44) (end 135.4455 89.7255) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 135.4455 89.7255) (end 134.112 88.392) (width 0.5588) (layer Composant) (net 278)) - (segment (start 130.937 89.916) (end 130.8735 89.9795) (width 0.5588) (layer Composant) (net 278)) - (segment (start 138.43 110.617) (end 138.938 110.109) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 137.668 104.267) (end 133.985 104.267) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 139.954 106.553) (end 137.668 104.267) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 139.954 109.093) (end 139.954 106.553) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 138.938 110.109) (end 139.954 109.093) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 145.288 104.394) (end 146.304 105.41) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 145.288 99.187) (end 145.288 104.394) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 145.796 98.679) (end 145.288 99.187) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 146.812 98.679) (end 145.796 98.679) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 145.288 105.41) (end 146.304 105.41) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 143.891 106.807) (end 145.288 105.41) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 143.891 109.093) (end 143.891 106.807) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 142.875 110.109) (end 143.891 109.093) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 138.938 110.109) (end 142.875 110.109) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 146.304 105.41) (end 146.812 105.41) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 130.8735 89.916) (end 130.8735 89.9795) (width 0.5588) (layer Composant) (net 278)) - (segment (start 153.416 106.426) (end 155.448 104.394) (width 0.5588) (layer Composant) (net 278)) - (segment (start 153.416 109.093) (end 153.416 106.426) (width 0.5588) (layer Composant) (net 278)) - (segment (start 153.543 109.22) (end 153.416 109.093) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 161.036 104.394) (end 157.48 104.394) (width 0.5588) (layer Composant) (net 278)) - (segment (start 157.48 104.394) (end 155.448 104.394) (width 0.5588) (layer Composant) (net 278)) - (segment (start 194.691 125.222) (end 194.6783 122.7455) (width 0.254) (layer Composant) (net 278) (status 400)) - (via (at 192.33388 123.84532) (size 1.143) (layers Composant Cuivre) (net 278)) - (segment (start 192.33388 123.84532) (end 192.33388 113.6396) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 192.46088 113.5126) (end 192.33388 113.6396) (width 0.5588) (layer 3.3V_layer) (net 278)) - (via (at 204.1779 121.24182) (size 1.143) (layers Composant Cuivre) (net 278)) - (segment (start 204.1779 121.24182) (end 205.6384 121.24182) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 205.6384 121.24182) (end 205.6511 121.22912) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 204.1779 122.7455) (end 204.1779 121.24182) (width 0.254) (layer Composant) (net 278) (status 800)) - (segment (start 190.9445 110.0074) (end 192.00368 110.0074) (width 0.254) (layer Composant) (net 278) (status 800)) - (segment (start 190.9445 109.5121) (end 191.86144 109.5121) (width 0.2032) (layer Composant) (net 278) (status 800)) - (segment (start 193.3321 109.5121) (end 193.675 109.855) (width 0.5588) (layer Composant) (net 278)) - (segment (start 191.86144 109.5121) (end 193.3321 109.5121) (width 0.2032) (layer Composant) (net 278)) - (segment (start 192.00368 109.65434) (end 192.00368 110.0074) (width 0.5588) (layer Composant) (net 278)) - (segment (start 191.86144 109.5121) (end 192.00368 109.65434) (width 0.254) (layer Composant) (net 278)) - (segment (start 212.9155 103.0097) (end 211.85632 103.0097) (width 0.254) (layer Composant) (net 278) (status 800)) - (segment (start 211.41436 102.56774) (end 211.85632 103.0097) (width 0.5588) (layer Composant) (net 278)) - (via (at 211.40928 113.5126) (size 1.143) (layers Composant Cuivre) (net 278)) - (segment (start 211.40928 113.5126) (end 212.4456 113.5126) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 212.4456 113.5126) (end 212.979 114.046) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 212.9155 113.5126) (end 211.40928 113.5126) (width 0.254) (layer Composant) (net 278) (status 800)) - (segment (start 195.072 109.855) (end 195.072 110.90148) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 195.072 110.90148) (end 192.46088 113.5126) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 195.072 107.315) (end 195.072 109.855) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 194.8815 107.1245) (end 195.072 107.315) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 193.167 107.1245) (end 194.8815 107.1245) (width 0.5588) (layer 3.3V_layer) (net 278)) - (via (at 193.167 107.1245) (size 1.143) (layers Composant Cuivre) (net 278)) - (segment (start 192.89268 107.1245) (end 192.70218 107.315) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 193.167 107.1245) (end 192.89268 107.1245) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 191.9605 107.315) (end 192.70218 107.315) (width 0.5588) (layer Cuivre) (net 278) (status 800)) - (segment (start 199.009 102.97668) (end 199.009 101.7905) (width 0.5588) (layer Cuivre) (net 278) (status 400)) - (segment (start 205.359 121.52122) (end 205.359 122.4915) (width 0.5588) (layer Cuivre) (net 278) (status 400)) - (via (at 205.6511 121.22912) (size 1.143) (layers Composant Cuivre) (net 278)) - (segment (start 205.6511 121.22912) (end 205.6511 119.9769) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 206.375 119.253) (end 205.6511 119.9769) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 205.6511 121.22912) (end 205.359 121.52122) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 220.04274 63.5) (end 223.52 63.5) (width 0.5588) (layer 3.3V_layer) (net 278) (status 400)) - (segment (start 220.04274 63.5) (end 218.44 65.10274) (width 0.5588) (layer 3.3V_layer) (net 278)) - (via (at 218.44 65.10274) (size 1.143) (layers Composant Cuivre) (net 278)) - (segment (start 218.44 66.3575) (end 218.44 65.10274) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 158.623 96.647) (end 158.623 95.8215) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 157.734 97.536) (end 158.623 96.647) (width 0.5588) (layer Composant) (net 278)) - (segment (start 190.5 100.75418) (end 190.5 100.0125) (width 0.5588) (layer Cuivre) (net 278) (status 400)) - (via (at 190.04788 101.2063) (size 1.143) (layers Composant Cuivre) (net 278)) - (segment (start 190.04788 101.2063) (end 190.04788 101.78288) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 190.04788 101.78288) (end 191.24168 102.97668) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 199.009 102.97668) (end 191.24168 102.97668) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 190.5 100.75418) (end 190.04788 101.2063) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 192.46088 113.5126) (end 190.9445 113.5126) (width 0.254) (layer Composant) (net 278) (status 400)) - (segment (start 191.9605 114.01298) (end 191.9605 115.189) (width 0.5588) (layer Cuivre) (net 278) (status 400)) - (segment (start 192.46088 113.5126) (end 191.9605 114.01298) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 199.1741 102.81158) (end 199.1741 100.7745) (width 0.254) (layer Composant) (net 278) (status 400)) - (segment (start 199.009 102.97668) (end 199.1741 102.81158) (width 0.5588) (layer Composant) (net 278)) - (segment (start 206.375 119.253) (end 208.57464 119.253) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 200.56348 119.79148) (end 201.10196 119.253) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 200.56348 121.0691) (end 200.56348 119.79148) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 201.10196 119.253) (end 206.375 119.253) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 208.57464 119.253) (end 209.73288 118.09476) (width 0.5588) (layer 3.3V_layer) (net 278)) - (via (at 200.56348 121.0691) (size 1.143) (layers Composant Cuivre) (net 278)) - (segment (start 201.2442 121.74982) (end 201.422 121.74982) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 200.56348 121.0691) (end 201.2442 121.74982) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 201.422 122.4915) (end 201.422 121.74982) (width 0.5588) (layer Cuivre) (net 278) (status 800)) - (segment (start 202.946 102.53218) (end 203.454 102.53218) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 203.454 102.53218) (end 203.454 101.7905) (width 0.5588) (layer Cuivre) (net 278) (status 400)) - (via (at 202.48118 102.997) (size 1.143) (layers Composant Cuivre) (net 278)) - (segment (start 199.009 102.97668) (end 202.46086 102.97668) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 202.46086 102.97668) (end 202.48118 102.997) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 202.48118 102.997) (end 202.946 102.53218) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 206.83474 109.98708) (end 206.83474 118.79326) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 206.375 119.253) (end 206.83474 118.79326) (width 0.5588) (layer 3.3V_layer) (net 278)) - (via (at 206.83474 109.98708) (size 1.143) (layers Composant Cuivre) (net 278)) - (segment (start 207.28432 109.5375) (end 208.28 109.5375) (width 0.5588) (layer Cuivre) (net 278) (status 400)) - (segment (start 206.83474 109.98708) (end 207.28432 109.5375) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 209.33156 102.56774) (end 209.296 102.53218) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 211.41436 102.56774) (end 209.33156 102.56774) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 209.296 101.7905) (end 209.296 102.53218) (width 0.5588) (layer Cuivre) (net 278) (status 800)) - (segment (start 209.60842 118.09476) (end 209.27568 118.4275) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 209.73288 118.09476) (end 209.60842 118.09476) (width 0.5588) (layer Cuivre) (net 278)) - (segment (start 208.28 118.4275) (end 209.27568 118.4275) (width 0.5588) (layer Cuivre) (net 278) (status 800)) - (segment (start 131.2545 113.919) (end 132.9055 112.268) (width 0.5588) (layer Composant) (net 278) (status 400)) - (segment (start 130.556 113.919) (end 131.2545 113.919) (width 0.5588) (layer Composant) (net 278)) - (segment (start 130.048 113.411) (end 130.556 113.919) (width 0.5588) (layer Composant) (net 278)) - (segment (start 130.048 111.125) (end 130.048 113.411) (width 0.5588) (layer Composant) (net 278)) - (segment (start 130.175 110.998) (end 130.048 111.125) (width 0.5588) (layer Composant) (net 278)) - (segment (start 130.429 110.998) (end 130.175 110.998) (width 0.5588) (layer Composant) (net 278)) - (segment (start 178.689 118.872) (end 175.641 115.824) (width 0.5588) (layer Composant) (net 278)) - (via (at 211.40928 110.0074) (size 1.143) (layers Composant Cuivre) (net 278)) - (segment (start 211.40928 110.0074) (end 211.40928 110.06328) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 211.40928 110.06328) (end 212.979 111.633) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 212.979 114.046) (end 212.979 114.84864) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 212.979 111.633) (end 212.979 114.046) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 212.979 114.84864) (end 209.73288 118.09476) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 212.9155 110.0074) (end 211.40928 110.0074) (width 0.254) (layer Composant) (net 278) (status 800)) - (segment (start 210.31454 117.5131) (end 212.9155 117.5131) (width 0.254) (layer Composant) (net 278) (status 400)) - (segment (start 209.73288 118.09476) (end 210.31454 117.5131) (width 0.5588) (layer Composant) (net 278)) - (segment (start 88.9 103.505) (end 88.9 100.33) (width 0.5588) (layer 3.3V_layer) (net 278) (status 400)) - (segment (start 90.805 105.41) (end 88.9 103.505) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 97.409 112.141) (end 97.409 107.188) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 97.409 107.188) (end 95.631 105.41) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 131.3942 110.0328) (end 130.429 110.998) (width 0.254) (layer Composant) (net 278)) - (segment (start 95.631 105.41) (end 90.805 105.41) (width 0.5588) (layer 3.3V_layer) (net 278)) - (via (at 84.582 102.235) (size 1.143) (layers Composant Cuivre) (net 278)) - (segment (start 84.2645 102.5525) (end 84.582 102.235) (width 0.5588) (layer Composant) (net 278)) - (segment (start 84.2645 104.267) (end 84.2645 102.5525) (width 0.5588) (layer Composant) (net 278) (status 800)) - (segment (start 86.995 102.235) (end 88.9 100.33) (width 0.5588) (layer 3.3V_layer) (net 278) (status 400)) - (segment (start 84.582 102.235) (end 86.995 102.235) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 90.17 99.06) (end 88.9 100.33) (width 0.5588) (layer 3.3V_layer) (net 278) (status 400)) - (segment (start 92.71 99.06) (end 90.17 99.06) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 93.472 98.298) (end 92.71 99.06) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 97.155 87.757) (end 95.25 87.757) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 95.25 87.757) (end 93.472 89.535) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 93.472 89.535) (end 93.472 98.298) (width 0.5588) (layer 3.3V_layer) (net 278)) - (segment (start 89.154 100.584) (end 88.9 100.33) (width 0.5588) (layer 3.3V_layer) (net 278) (status 400)) - (segment (start 98.298 100.584) (end 89.154 100.584) (width 0.5588) (layer 3.3V_layer) (net 278)) + (segment (start 135.76808 111.506) (end 134.874 112.4585) (width 0.254) (layer Composant) (net 197) (status 420)) + (segment (start 189.23 82.296) (end 197.358 82.296) (width 0.381) (layer Composant) (net 198) (status 830)) + (segment (start 197.358 82.296) (end 197.485 82.169) (width 0.381) (layer Composant) (net 198) (status 430)) + (segment (start 196.215 78.359) (end 198.247 78.359) (width 0.381) (layer Composant) (net 199)) + (segment (start 198.755 77.851) (end 198.755 75.819) (width 0.381) (layer Composant) (net 199)) + (segment (start 198.755 75.819) (end 197.485 74.549) (width 0.381) (layer Composant) (net 199) (status 420)) + (segment (start 194.818 79.756) (end 196.215 78.359) (width 0.381) (layer Composant) (net 199)) + (segment (start 189.23 79.756) (end 194.818 79.756) (width 0.381) (layer Composant) (net 199) (status 810)) + (segment (start 198.247 78.359) (end 198.755 77.851) (width 0.381) (layer Composant) (net 199)) + (segment (start 196.088 77.089) (end 197.485 77.089) (width 0.381) (layer Composant) (net 200) (status 420)) + (segment (start 189.23 78.486) (end 194.691 78.486) (width 0.381) (layer Composant) (net 200) (status 810)) + (segment (start 194.691 78.486) (end 196.088 77.089) (width 0.381) (layer Composant) (net 200)) + (segment (start 169.418 82.296) (end 169.545 82.169) (width 0.4318) (layer Composant) (net 201) (status 430)) + (segment (start 161.29 82.296) (end 169.418 82.296) (width 0.4318) (layer Composant) (net 201) (status 830)) + (segment (start 169.545 74.549) (end 170.815 75.819) (width 0.381) (layer Composant) (net 202) (status 810)) + (segment (start 170.307 78.359) (end 168.275 78.359) (width 0.381) (layer Composant) (net 202)) + (segment (start 166.878 79.756) (end 161.29 79.756) (width 0.381) (layer Composant) (net 202) (status 420)) + (segment (start 168.275 78.359) (end 166.878 79.756) (width 0.381) (layer Composant) (net 202)) + (segment (start 170.815 77.851) (end 170.307 78.359) (width 0.381) (layer Composant) (net 202)) + (segment (start 170.815 75.819) (end 170.815 77.851) (width 0.381) (layer Composant) (net 202)) + (segment (start 168.148 77.089) (end 169.545 77.089) (width 0.381) (layer Composant) (net 203) (status 420)) + (segment (start 166.751 78.486) (end 168.148 77.089) (width 0.381) (layer Composant) (net 203)) + (segment (start 161.29 78.486) (end 166.751 78.486) (width 0.381) (layer Composant) (net 203) (status 810)) + (segment (start 103.124 85.979) (end 103.251 86.106) (width 0.381) (layer Composant) (net 204)) + (segment (start 103.251 86.106) (end 103.251 86.487) (width 0.381) (layer Composant) (net 204) (status 420)) + (segment (start 103.124 84.582) (end 103.124 85.979) (width 0.381) (layer Composant) (net 204) (status 810)) + (segment (start 134.874 77.089) (end 135.763 77.089) (width 0.254) (layer Composant) (net 205) (status 420)) + (segment (start 128.27 82.296) (end 129.667 82.296) (width 0.254) (layer Composant) (net 205) (status 810)) + (segment (start 129.667 82.296) (end 134.874 77.089) (width 0.254) (layer Composant) (net 205)) + (segment (start 134.493 75.819) (end 135.763 74.549) (width 0.254) (layer Composant) (net 206) (status 420)) + (segment (start 134.493 76.327) (end 134.493 75.819) (width 0.254) (layer Composant) (net 206)) + (segment (start 129.794 81.026) (end 134.493 76.327) (width 0.254) (layer Composant) (net 206)) + (segment (start 128.27 81.026) (end 129.794 81.026) (width 0.254) (layer Composant) (net 206) (status 810)) + (segment (start 130.048 85.725) (end 133.985 81.788) (width 0.254) (layer Composant) (net 207)) + (segment (start 125.476 85.344) (end 125.857 85.725) (width 0.254) (layer Composant) (net 207)) + (segment (start 134.874 81.788) (end 135.763 82.169) (width 0.254) (layer Composant) (net 207) (status 420)) + (segment (start 128.27 78.486) (end 126.111 78.486) (width 0.254) (layer Composant) (net 207) (status 810)) + (segment (start 125.857 85.725) (end 130.048 85.725) (width 0.254) (layer Composant) (net 207)) + (segment (start 133.985 81.788) (end 134.874 81.788) (width 0.254) (layer Composant) (net 207)) + (segment (start 125.476 79.121) (end 125.476 85.344) (width 0.254) (layer Composant) (net 207)) + (segment (start 126.111 78.486) (end 125.476 79.121) (width 0.254) (layer Composant) (net 207)) + (segment (start 191.897 65.405) (end 191.897 68.58) (width 0.4318) (layer Cuivre) (net 208) (status 420)) + (segment (start 183.642 67.437) (end 185.039 66.04) (width 0.4318) (layer Composant) (net 208) (status 420)) + (segment (start 183.642 68.58) (end 183.642 67.437) (width 0.4318) (layer Composant) (net 208) (status 810)) + (segment (start 185.039 66.04) (end 185.166 66.04) (width 0.4318) (layer Cuivre) (net 208) (status 830)) + (segment (start 185.166 66.04) (end 186.69 64.516) (width 0.4318) (layer Cuivre) (net 208) (status 10)) + (segment (start 186.69 64.516) (end 191.008 64.516) (width 0.4318) (layer Cuivre) (net 208)) + (segment (start 191.008 64.516) (end 191.897 65.405) (width 0.4318) (layer Cuivre) (net 208)) + (segment (start 158.369 64.897) (end 157.734 64.262) (width 0.381) (layer Cuivre) (net 209)) + (segment (start 158.369 68.58) (end 158.369 64.897) (width 0.381) (layer Cuivre) (net 209) (status 810)) + (segment (start 150.114 68.58) (end 150.114 67.437) (width 0.381) (layer Composant) (net 209) (status 810)) + (segment (start 157.734 64.262) (end 150.876 64.262) (width 0.381) (layer Cuivre) (net 209)) + (segment (start 150.114 67.437) (end 151.511 66.04) (width 0.381) (layer Composant) (net 209) (status 420)) + (segment (start 150.876 64.262) (end 149.987 65.151) (width 0.381) (layer Cuivre) (net 209)) + (segment (start 149.987 65.151) (end 149.987 68.453) (width 0.381) (layer Cuivre) (net 209) (status 20)) + (segment (start 149.987 68.453) (end 150.114 68.58) (width 0.381) (layer Cuivre) (net 209) (status 430)) + (segment (start 117.983 66.04) (end 117.983 67.183) (width 0.381) (layer Cuivre) (net 210) (status 810)) + (segment (start 124.841 68.58) (end 124.841 65.151) (width 0.381) (layer Cuivre) (net 210) (status 810)) + (segment (start 124.206 64.516) (end 119.507 64.516) (width 0.381) (layer Cuivre) (net 210)) + (segment (start 117.983 67.183) (end 116.586 68.58) (width 0.381) (layer Cuivre) (net 210) (status 420)) + (segment (start 119.507 64.516) (end 117.983 66.04) (width 0.381) (layer Cuivre) (net 210) (status 420)) + (segment (start 124.841 65.151) (end 124.206 64.516) (width 0.381) (layer Cuivre) (net 210)) - (zone (net 278) (net_name VDD) (layer 3.3V_layer) (tstamp 4783A2CD) (hatch edge 0.508) + (zone (net 1) (net_name +3.3V) (layer 3.3V_layer) (tstamp 4783A2CD) (hatch edge 0.508) (connect_pads (clearance 0.508)) (min_thickness 0.254) - (fill (arc_segments 32) (thermal_gap 0.508) (thermal_bridge_width 0.508)) + (fill yes (arc_segments 16) (thermal_gap 0.508) (thermal_bridge_width 0.508)) (polygon (pts (xy 227.965 146.05) (xy 227.965 60.96) (xy 215.9 60.96) (xy 215.9 64.135) (xy 105.41 64.135) (xy 105.41 74.93) (xy 72.39 74.93) (xy 72.39 146.05) ) ) - (filled_polygon - (pts - (xy 227.7745 145.923) (xy 226.187059 145.923) (xy 226.187059 137.023017) (xy 226.133846 136.754269) (xy 226.029446 136.500975) - (xy 225.877835 136.272783) (xy 225.68479 136.078385) (xy 225.457662 135.925185) (xy 225.376393 135.891022) (xy 225.422923 135.872975) - (xy 225.65424 135.726177) (xy 225.852639 135.537245) (xy 226.010561 135.313375) (xy 226.121993 135.063095) (xy 226.18269 134.795938) - (xy 226.187059 134.483017) (xy 226.133846 134.214269) (xy 226.029446 133.960975) (xy 225.877835 133.732783) (xy 225.68479 133.538385) - (xy 225.457662 133.385185) (xy 225.376393 133.351022) (xy 225.422923 133.332975) (xy 225.65424 133.186177) (xy 225.852639 132.997245) - (xy 226.010561 132.773375) (xy 226.121993 132.523095) (xy 226.18269 132.255938) (xy 226.187059 131.943017) (xy 226.133846 131.674269) - (xy 226.029446 131.420975) (xy 225.877835 131.192783) (xy 225.68479 130.998385) (xy 225.457662 130.845185) (xy 225.376393 130.811022) - (xy 225.422923 130.792975) (xy 225.65424 130.646177) (xy 225.852639 130.457245) (xy 226.010561 130.233375) (xy 226.121993 129.983095) - (xy 226.18269 129.715938) (xy 226.187059 129.403017) (xy 226.133846 129.134269) (xy 226.029446 128.880975) (xy 225.877835 128.652783) - (xy 225.68479 128.458385) (xy 225.457662 128.305185) (xy 225.376393 128.271022) (xy 225.422923 128.252975) (xy 225.65424 128.106177) - (xy 225.852639 127.917245) (xy 226.010561 127.693375) (xy 226.121993 127.443095) (xy 226.18269 127.175938) (xy 226.187059 126.863017) - (xy 226.133846 126.594269) (xy 226.029446 126.340975) (xy 225.877835 126.112783) (xy 225.68479 125.918385) (xy 225.457662 125.765185) - (xy 225.376393 125.731022) (xy 225.422923 125.712975) (xy 225.65424 125.566177) (xy 225.852639 125.377245) (xy 226.010561 125.153375) - (xy 226.121993 124.903095) (xy 226.18269 124.635938) (xy 226.187059 124.323017) (xy 226.133846 124.054269) (xy 226.029446 123.800975) - (xy 225.877835 123.572783) (xy 225.68479 123.378385) (xy 225.457662 123.225185) (xy 225.376393 123.191022) (xy 225.422923 123.172975) - (xy 225.65424 123.026177) (xy 225.852639 122.837245) (xy 226.010561 122.613375) (xy 226.121993 122.363095) (xy 226.18269 122.095938) - (xy 226.187059 121.783017) (xy 226.133846 121.514269) (xy 226.029446 121.260975) (xy 225.877835 121.032783) (xy 225.68479 120.838385) - (xy 225.457662 120.685185) (xy 225.376393 120.651022) (xy 225.422923 120.632975) (xy 225.65424 120.486177) (xy 225.852639 120.297245) - (xy 226.010561 120.073375) (xy 226.121993 119.823095) (xy 226.18269 119.555938) (xy 226.187059 119.243017) (xy 226.133846 118.974269) - (xy 226.029446 118.720975) (xy 225.877835 118.492783) (xy 225.68479 118.298385) (xy 225.457662 118.145185) (xy 225.376393 118.111022) - (xy 225.422923 118.092975) (xy 225.65424 117.946177) (xy 225.852639 117.757245) (xy 226.010561 117.533375) (xy 226.121993 117.283095) - (xy 226.18269 117.015938) (xy 226.187059 116.703017) (xy 226.133846 116.434269) (xy 226.029446 116.180975) (xy 225.877835 115.952783) - (xy 225.68479 115.758385) (xy 225.457662 115.605185) (xy 225.376393 115.571022) (xy 225.422923 115.552975) (xy 225.65424 115.406177) - (xy 225.852639 115.217245) (xy 226.010561 114.993375) (xy 226.121993 114.743095) (xy 226.18269 114.475938) (xy 226.187059 114.163017) - (xy 226.133846 113.894269) (xy 226.029446 113.640975) (xy 225.877835 113.412783) (xy 225.68479 113.218385) (xy 225.457662 113.065185) - (xy 225.376393 113.031022) (xy 225.422923 113.012975) (xy 225.65424 112.866177) (xy 225.852639 112.677245) (xy 226.010561 112.453375) - (xy 226.121993 112.203095) (xy 226.18269 111.935938) (xy 226.187059 111.623017) (xy 226.133846 111.354269) (xy 226.029446 111.100975) - (xy 225.877835 110.872783) (xy 225.68479 110.678385) (xy 225.457662 110.525185) (xy 225.376393 110.491022) (xy 225.422923 110.472975) - (xy 225.65424 110.326177) (xy 225.852639 110.137245) (xy 226.010561 109.913375) (xy 226.121993 109.663095) (xy 226.18269 109.395938) - (xy 226.187059 109.083017) (xy 226.133846 108.814269) (xy 226.029446 108.560975) (xy 225.877835 108.332783) (xy 225.68479 108.138385) - (xy 225.457662 107.985185) (xy 225.376393 107.951022) (xy 225.422923 107.932975) (xy 225.65424 107.786177) (xy 225.852639 107.597245) - (xy 226.010561 107.373375) (xy 226.121993 107.123095) (xy 226.18269 106.855938) (xy 226.187059 106.543017) (xy 226.133846 106.274269) - (xy 226.029446 106.020975) (xy 225.877835 105.792783) (xy 225.68479 105.598385) (xy 225.457662 105.445185) (xy 225.376393 105.411022) - (xy 225.422923 105.392975) (xy 225.65424 105.246177) (xy 225.852639 105.057245) (xy 226.010561 104.833375) (xy 226.121993 104.583095) - (xy 226.18269 104.315938) (xy 226.187059 104.003017) (xy 226.133846 103.734269) (xy 226.029446 103.480975) (xy 225.877835 103.252783) - (xy 225.68479 103.058385) (xy 225.457662 102.905185) (xy 225.376393 102.871022) (xy 225.422923 102.852975) (xy 225.65424 102.706177) - (xy 225.852639 102.517245) (xy 226.010561 102.293375) (xy 226.121993 102.043095) (xy 226.18269 101.775938) (xy 226.187059 101.463017) - (xy 226.133846 101.194269) (xy 226.029446 100.940975) (xy 225.877835 100.712783) (xy 225.68479 100.518385) (xy 225.457662 100.365185) - (xy 225.376393 100.331022) (xy 225.422923 100.312975) (xy 225.65424 100.166177) (xy 225.852639 99.977245) (xy 226.010561 99.753375) - (xy 226.121993 99.503095) (xy 226.18269 99.235938) (xy 226.187059 98.923017) (xy 226.133846 98.654269) (xy 226.029446 98.400975) - (xy 225.877835 98.172783) (xy 225.68479 97.978385) (xy 225.457662 97.825185) (xy 225.376393 97.791022) (xy 225.422923 97.772975) - (xy 225.65424 97.626177) (xy 225.852639 97.437245) (xy 226.010561 97.213375) (xy 226.121993 96.963095) (xy 226.18269 96.695938) - (xy 226.187059 96.383017) (xy 226.133846 96.114269) (xy 226.029446 95.860975) (xy 225.877835 95.632783) (xy 225.68479 95.438385) - (xy 225.457662 95.285185) (xy 225.376393 95.251022) (xy 225.422923 95.232975) (xy 225.65424 95.086177) (xy 225.852639 94.897245) - (xy 226.010561 94.673375) (xy 226.121993 94.423095) (xy 226.18269 94.155938) (xy 226.187059 93.843017) (xy 226.133846 93.574269) - (xy 226.029446 93.320975) (xy 225.877835 93.092783) (xy 225.68479 92.898385) (xy 225.457662 92.745185) (xy 225.376393 92.711022) - (xy 225.422923 92.692975) (xy 225.65424 92.546177) (xy 225.852639 92.357245) (xy 226.010561 92.133375) (xy 226.121993 91.883095) - (xy 226.18269 91.615938) (xy 226.187059 91.303017) (xy 226.133846 91.034269) (xy 226.029446 90.780975) (xy 225.877835 90.552783) - (xy 225.68479 90.358385) (xy 225.457662 90.205185) (xy 225.376393 90.171022) (xy 225.422923 90.152975) (xy 225.65424 90.006177) - (xy 225.852639 89.817245) (xy 226.010561 89.593375) (xy 226.121993 89.343095) (xy 226.18269 89.075938) (xy 226.187059 88.763017) - (xy 226.133846 88.494269) (xy 226.029446 88.240975) (xy 225.877835 88.012783) (xy 225.68479 87.818385) (xy 225.457662 87.665185) - (xy 225.205103 87.559019) (xy 224.936733 87.503931) (xy 224.917059 87.503793) (xy 224.917059 76.063017) (xy 224.863846 75.794269) - (xy 224.759446 75.540975) (xy 224.607835 75.312783) (xy 224.41479 75.118385) (xy 224.187662 74.965185) (xy 224.106393 74.931022) - (xy 224.152923 74.912975) (xy 224.38424 74.766177) (xy 224.582639 74.577245) (xy 224.740561 74.353375) (xy 224.851993 74.103095) - (xy 224.91269 73.835938) (xy 224.917059 73.523017) (xy 224.863846 73.254269) (xy 224.759446 73.000975) (xy 224.607835 72.772783) - (xy 224.41479 72.578385) (xy 224.187662 72.425185) (xy 224.106393 72.391022) (xy 224.152923 72.372975) (xy 224.38424 72.226177) - (xy 224.582639 72.037245) (xy 224.740561 71.813375) (xy 224.851993 71.563095) (xy 224.91269 71.295938) (xy 224.917059 70.983017) - (xy 224.863846 70.714269) (xy 224.759446 70.460975) (xy 224.607835 70.232783) (xy 224.41479 70.038385) (xy 224.187662 69.885185) - (xy 224.106393 69.851022) (xy 224.152923 69.832975) (xy 224.38424 69.686177) (xy 224.582639 69.497245) (xy 224.740561 69.273375) - (xy 224.851993 69.023095) (xy 224.91269 68.755938) (xy 224.917059 68.443017) (xy 224.863846 68.174269) (xy 224.759446 67.920975) - (xy 224.607835 67.692783) (xy 224.41479 67.498385) (xy 224.187662 67.345185) (xy 224.106393 67.311022) (xy 224.152923 67.292975) - (xy 224.38424 67.146177) (xy 224.582639 66.957245) (xy 224.740561 66.733375) (xy 224.851993 66.483095) (xy 224.91269 66.215938) - (xy 224.917059 65.903017) (xy 224.863846 65.634269) (xy 224.759446 65.380975) (xy 224.607835 65.152783) (xy 224.41479 64.958385) - (xy 224.323783 64.897) (xy 224.344542 64.897) (xy 224.467223 64.872597) (xy 224.582785 64.82473) (xy 224.686789 64.755237) - (xy 224.775237 64.666789) (xy 224.84473 64.562785) (xy 224.892597 64.447223) (xy 224.917 64.324542) (xy 224.917 63.78575) - (xy 224.917 63.21425) (xy 224.917 62.675458) (xy 224.892597 62.552777) (xy 224.84473 62.437215) (xy 224.775237 62.333211) - (xy 224.686789 62.244763) (xy 224.582785 62.17527) (xy 224.467223 62.127403) (xy 224.344542 62.103) (xy 224.219458 62.103) - (xy 223.80575 62.103) (xy 223.647 62.26175) (xy 223.647 63.373) (xy 224.75825 63.373) (xy 224.917 63.21425) - (xy 224.917 63.78575) (xy 224.75825 63.627) (xy 223.647 63.627) (xy 223.647 63.647) (xy 223.393 63.647) - (xy 223.393 63.627) (xy 223.393 63.373) (xy 223.393 62.26175) (xy 223.23425 62.103) (xy 222.820542 62.103) - (xy 222.695458 62.103) (xy 222.572777 62.127403) (xy 222.457215 62.17527) (xy 222.353211 62.244763) (xy 222.264763 62.333211) - (xy 222.19527 62.437215) (xy 222.147403 62.552777) (xy 222.123 62.675458) (xy 222.123 63.21425) (xy 222.28175 63.373) - (xy 223.393 63.373) (xy 223.393 63.627) (xy 222.28175 63.627) (xy 222.123 63.78575) (xy 222.123 64.324542) - (xy 222.147403 64.447223) (xy 222.19527 64.562785) (xy 222.264763 64.666789) (xy 222.353211 64.755237) (xy 222.457215 64.82473) - (xy 222.572777 64.872597) (xy 222.695458 64.897) (xy 222.715274 64.897) (xy 222.640399 64.945997) (xy 222.444658 65.137681) - (xy 222.289877 65.363734) (xy 222.18195 65.615546) (xy 222.124989 65.883524) (xy 222.121164 66.157464) (xy 222.17062 66.426928) - (xy 222.271474 66.681655) (xy 222.419883 66.911942) (xy 222.610196 67.109016) (xy 222.835163 67.265372) (xy 222.935699 67.309295) - (xy 222.869644 67.335984) (xy 222.640399 67.485997) (xy 222.444658 67.677681) (xy 222.289877 67.903734) (xy 222.18195 68.155546) - (xy 222.124989 68.423524) (xy 222.121164 68.697464) (xy 222.17062 68.966928) (xy 222.271474 69.221655) (xy 222.419883 69.451942) - (xy 222.610196 69.649016) (xy 222.835163 69.805372) (xy 222.935699 69.849295) (xy 222.869644 69.875984) (xy 222.640399 70.025997) - (xy 222.444658 70.217681) (xy 222.289877 70.443734) (xy 222.18195 70.695546) (xy 222.124989 70.963524) (xy 222.121164 71.237464) - (xy 222.17062 71.506928) (xy 222.271474 71.761655) (xy 222.419883 71.991942) (xy 222.610196 72.189016) (xy 222.835163 72.345372) - (xy 222.935699 72.389295) (xy 222.869644 72.415984) (xy 222.640399 72.565997) (xy 222.444658 72.757681) (xy 222.289877 72.983734) - (xy 222.18195 73.235546) (xy 222.124989 73.503524) (xy 222.121164 73.777464) (xy 222.17062 74.046928) (xy 222.271474 74.301655) - (xy 222.419883 74.531942) (xy 222.610196 74.729016) (xy 222.835163 74.885372) (xy 222.935699 74.929295) (xy 222.869644 74.955984) - (xy 222.640399 75.105997) (xy 222.444658 75.297681) (xy 222.289877 75.523734) (xy 222.18195 75.775546) (xy 222.124989 76.043524) - (xy 222.121164 76.317464) (xy 222.17062 76.586928) (xy 222.271474 76.841655) (xy 222.419883 77.071942) (xy 222.610196 77.269016) - (xy 222.835163 77.425372) (xy 223.086215 77.535054) (xy 223.353789 77.593884) (xy 223.627695 77.599622) (xy 223.897499 77.552048) - (xy 224.152923 77.452975) (xy 224.38424 77.306177) (xy 224.582639 77.117245) (xy 224.740561 76.893375) (xy 224.851993 76.643095) - (xy 224.91269 76.375938) (xy 224.917059 76.063017) (xy 224.917059 87.503793) (xy 224.662774 87.502018) (xy 224.393661 87.553354) - (xy 224.139644 87.655984) (xy 223.910399 87.805997) (xy 223.714658 87.997681) (xy 223.647 88.096493) (xy 223.647 88.075458) - (xy 223.622597 87.952777) (xy 223.57473 87.837215) (xy 223.505237 87.733211) (xy 223.416789 87.644763) (xy 223.312785 87.57527) - (xy 223.197223 87.527403) (xy 223.074542 87.503) (xy 222.949458 87.503) (xy 221.425458 87.503) (xy 221.302777 87.527403) - (xy 221.187215 87.57527) (xy 221.083211 87.644763) (xy 220.994763 87.733211) (xy 220.92527 87.837215) (xy 220.877403 87.952777) - (xy 220.853 88.075458) (xy 220.853 88.200542) (xy 220.853 89.724542) (xy 220.877403 89.847223) (xy 220.92527 89.962785) - (xy 220.994763 90.066789) (xy 221.083211 90.155237) (xy 221.187215 90.22473) (xy 221.302777 90.272597) (xy 221.425458 90.297) - (xy 221.445274 90.297) (xy 221.370399 90.345997) (xy 221.174658 90.537681) (xy 221.019877 90.763734) (xy 220.91195 91.015546) - (xy 220.854989 91.283524) (xy 220.851164 91.557464) (xy 220.90062 91.826928) (xy 221.001474 92.081655) (xy 221.149883 92.311942) - (xy 221.340196 92.509016) (xy 221.565163 92.665372) (xy 221.665699 92.709295) (xy 221.599644 92.735984) (xy 221.370399 92.885997) - (xy 221.174658 93.077681) (xy 221.019877 93.303734) (xy 220.91195 93.555546) (xy 220.854989 93.823524) (xy 220.851164 94.097464) - (xy 220.90062 94.366928) (xy 221.001474 94.621655) (xy 221.149883 94.851942) (xy 221.340196 95.049016) (xy 221.565163 95.205372) - (xy 221.665699 95.249295) (xy 221.599644 95.275984) (xy 221.370399 95.425997) (xy 221.174658 95.617681) (xy 221.07858 95.758) - (xy 213.443872 95.758) (xy 213.443872 76.129957) (xy 213.397915 75.897856) (xy 213.307751 75.679102) (xy 213.176815 75.482027) - (xy 213.010093 75.314138) (xy 212.813937 75.181829) (xy 212.595818 75.09014) (xy 212.364044 75.042563) (xy 212.127443 75.040911) - (xy 211.895027 75.085247) (xy 211.675649 75.173882) (xy 211.477664 75.303439) (xy 211.308615 75.468984) (xy 211.17494 75.664212) - (xy 211.081731 75.881685) (xy 211.032537 76.113122) (xy 211.029234 76.349706) (xy 211.071946 76.582426) (xy 211.159047 76.802417) - (xy 211.287219 77.001301) (xy 211.45158 77.171502) (xy 211.645869 77.306537) (xy 211.862687 77.401262) (xy 212.093774 77.45207) - (xy 212.330329 77.457025) (xy 212.563342 77.415939) (xy 212.783936 77.330376) (xy 212.98371 77.203595) (xy 213.155054 77.040427) - (xy 213.291442 76.847084) (xy 213.387678 76.630933) (xy 213.440098 76.400206) (xy 213.443872 76.129957) (xy 213.443872 95.758) - (xy 213.40826 95.758) (xy 213.400692 95.758742) (xy 213.400692 80.526697) (xy 213.354735 80.294596) (xy 213.264571 80.075842) - (xy 213.133635 79.878767) (xy 212.966913 79.710878) (xy 212.770757 79.578569) (xy 212.552638 79.48688) (xy 212.320864 79.439303) - (xy 212.084263 79.437651) (xy 211.851847 79.481987) (xy 211.632469 79.570622) (xy 211.434484 79.700179) (xy 211.265435 79.865724) - (xy 211.13176 80.060952) (xy 211.038551 80.278425) (xy 210.989357 80.509862) (xy 210.986054 80.746446) (xy 211.028766 80.979166) - (xy 211.115867 81.199157) (xy 211.244039 81.398041) (xy 211.4084 81.568242) (xy 211.602689 81.703277) (xy 211.819507 81.798002) - (xy 212.050594 81.84881) (xy 212.287149 81.853765) (xy 212.520162 81.812679) (xy 212.740756 81.727116) (xy 212.94053 81.600335) - (xy 213.111874 81.437167) (xy 213.248262 81.243824) (xy 213.344498 81.027673) (xy 213.396918 80.796946) (xy 213.400692 80.526697) - (xy 213.400692 95.758742) (xy 213.338109 95.764878) (xy 213.268089 95.771004) (xy 213.264245 95.77212) (xy 213.260253 95.772512) - (xy 213.192812 95.792873) (xy 213.125278 95.812494) (xy 213.121722 95.814337) (xy 213.117884 95.815496) (xy 213.055727 95.848545) - (xy 212.993245 95.880933) (xy 212.990112 95.883433) (xy 212.986576 95.885314) (xy 212.932051 95.929783) (xy 212.87702 95.973714) - (xy 212.871441 95.979215) (xy 212.871329 95.979307) (xy 212.871243 95.97941) (xy 212.869444 95.981185) (xy 210.738695 98.111933) - (xy 210.616495 97.928007) (xy 210.449773 97.760118) (xy 210.253617 97.627809) (xy 210.035498 97.53612) (xy 209.803724 97.488543) - (xy 209.567123 97.486891) (xy 209.334707 97.531227) (xy 209.115329 97.619862) (xy 208.917344 97.749419) (xy 208.748295 97.914964) - (xy 208.61462 98.110192) (xy 208.521411 98.327665) (xy 208.472217 98.559102) (xy 208.468914 98.795686) (xy 208.511626 99.028406) - (xy 208.598727 99.248397) (xy 208.726899 99.447281) (xy 208.89126 99.617482) (xy 209.085549 99.752517) (xy 209.094292 99.756336) - (xy 207.624069 101.22656) (xy 207.523829 101.225861) (xy 207.315878 101.26553) (xy 207.119592 101.344835) (xy 206.942448 101.460754) - (xy 206.791194 101.608873) (xy 206.740806 101.682463) (xy 206.740806 78.63415) (xy 206.699686 78.426481) (xy 206.619014 78.230753) - (xy 206.50186 78.054423) (xy 206.352688 77.904207) (xy 206.177181 77.785825) (xy 205.982021 77.703788) (xy 205.774644 77.661219) - (xy 205.562949 77.659741) (xy 205.354998 77.69941) (xy 205.158712 77.778715) (xy 204.981568 77.894634) (xy 204.830314 78.042753) - (xy 204.71071 78.217431) (xy 204.627312 78.412012) (xy 204.583297 78.619087) (xy 204.580341 78.830767) (xy 204.618557 79.03899) - (xy 204.69649 79.235825) (xy 204.81117 79.413773) (xy 204.958229 79.566058) (xy 205.132067 79.686879) (xy 205.326062 79.771633) - (xy 205.532824 79.817093) (xy 205.744479 79.821526) (xy 205.952964 79.784765) (xy 206.150337 79.708208) (xy 206.329082 79.594773) - (xy 206.48239 79.44878) (xy 206.604421 79.27579) (xy 206.690528 79.082392) (xy 206.73743 78.875952) (xy 206.740806 78.63415) - (xy 206.740806 101.682463) (xy 206.67159 101.783551) (xy 206.588192 101.978132) (xy 206.544177 102.185207) (xy 206.541221 102.396887) - (xy 206.579437 102.60511) (xy 206.65737 102.801945) (xy 206.77205 102.979893) (xy 206.919109 103.132178) (xy 207.092947 103.252999) - (xy 207.286942 103.337753) (xy 207.493704 103.383213) (xy 207.705359 103.387646) (xy 207.913844 103.350885) (xy 208.111217 103.274328) - (xy 208.289962 103.160893) (xy 208.44327 103.0149) (xy 208.565301 102.84191) (xy 208.651408 102.648512) (xy 208.69831 102.442072) - (xy 208.700214 102.305675) (xy 213.72389 97.282) (xy 221.07903 97.282) (xy 221.149883 97.391942) (xy 221.340196 97.589016) - (xy 221.565163 97.745372) (xy 221.665699 97.789295) (xy 221.599644 97.815984) (xy 221.370399 97.965997) (xy 221.174658 98.157681) - (xy 221.019877 98.383734) (xy 220.91195 98.635546) (xy 220.854989 98.903524) (xy 220.851164 99.177464) (xy 220.90062 99.446928) - (xy 221.001474 99.701655) (xy 221.149883 99.931942) (xy 221.340196 100.129016) (xy 221.565163 100.285372) (xy 221.665699 100.329295) - (xy 221.599644 100.355984) (xy 221.370399 100.505997) (xy 221.174658 100.697681) (xy 221.019877 100.923734) (xy 220.91195 101.175546) - (xy 220.854989 101.443524) (xy 220.851164 101.717464) (xy 220.90062 101.986928) (xy 221.001474 102.241655) (xy 221.149883 102.471942) - (xy 221.340196 102.669016) (xy 221.565163 102.825372) (xy 221.665699 102.869295) (xy 221.599644 102.895984) (xy 221.370399 103.045997) - (xy 221.174658 103.237681) (xy 221.019877 103.463734) (xy 220.91195 103.715546) (xy 220.854989 103.983524) (xy 220.851164 104.257464) - (xy 220.90062 104.526928) (xy 221.001474 104.781655) (xy 221.149883 105.011942) (xy 221.340196 105.209016) (xy 221.565163 105.365372) - (xy 221.665699 105.409295) (xy 221.599644 105.435984) (xy 221.370399 105.585997) (xy 221.174658 105.777681) (xy 221.019877 106.003734) - (xy 220.91195 106.255546) (xy 220.854989 106.523524) (xy 220.851164 106.797464) (xy 220.90062 107.066928) (xy 220.97068 107.24388) - (xy 215.679188 107.24388) (xy 215.605908 107.170087) (xy 215.430401 107.051705) (xy 215.235241 106.969668) (xy 215.027864 106.927099) - (xy 214.816169 106.925621) (xy 214.608218 106.96529) (xy 214.411932 107.044595) (xy 214.234788 107.160514) (xy 214.083534 107.308633) - (xy 213.96393 107.483311) (xy 213.880532 107.677892) (xy 213.836517 107.884967) (xy 213.833561 108.096647) (xy 213.871777 108.30487) - (xy 213.94971 108.501705) (xy 214.06439 108.679653) (xy 214.211449 108.831938) (xy 214.385287 108.952759) (xy 214.579282 109.037513) - (xy 214.786044 109.082973) (xy 214.997699 109.087406) (xy 215.206184 109.050645) (xy 215.403557 108.974088) (xy 215.582302 108.860653) - (xy 215.679723 108.76788) (xy 220.923807 108.76788) (xy 220.91195 108.795546) (xy 220.854989 109.063524) (xy 220.851164 109.337464) - (xy 220.90062 109.606928) (xy 221.001474 109.861655) (xy 221.149883 110.091942) (xy 221.340196 110.289016) (xy 221.565163 110.445372) - (xy 221.665699 110.489295) (xy 221.599644 110.515984) (xy 221.370399 110.665997) (xy 221.174658 110.857681) (xy 221.019877 111.083734) - (xy 220.91195 111.335546) (xy 220.854989 111.603524) (xy 220.851164 111.877464) (xy 220.90062 112.146928) (xy 221.001474 112.401655) - (xy 221.149883 112.631942) (xy 221.340196 112.829016) (xy 221.565163 112.985372) (xy 221.665699 113.029295) (xy 221.599644 113.055984) - (xy 221.370399 113.205997) (xy 221.174658 113.397681) (xy 221.019877 113.623734) (xy 220.91195 113.875546) (xy 220.854989 114.143524) - (xy 220.851164 114.417464) (xy 220.90062 114.686928) (xy 221.001474 114.941655) (xy 221.034834 114.99342) (xy 220.766808 114.99342) - (xy 220.693528 114.919627) (xy 220.518021 114.801245) (xy 220.322861 114.719208) (xy 220.115484 114.676639) (xy 219.903789 114.675161) - (xy 219.695838 114.71483) (xy 219.499552 114.794135) (xy 219.322408 114.910054) (xy 219.171154 115.058173) (xy 219.05155 115.232851) - (xy 218.968152 115.427432) (xy 218.924137 115.634507) (xy 218.921181 115.846187) (xy 218.959397 116.05441) (xy 218.968737 116.078) - (xy 218.56513 116.078) (xy 217.768002 115.280872) (xy 217.769486 115.17459) (xy 217.728366 114.966921) (xy 217.647694 114.771193) - (xy 217.53054 114.594863) (xy 217.381368 114.444647) (xy 217.205861 114.326265) (xy 217.010701 114.244228) (xy 216.803324 114.201659) - (xy 216.591629 114.200181) (xy 216.383678 114.23985) (xy 216.187392 114.319155) (xy 216.010248 114.435074) (xy 215.858994 114.583193) - (xy 215.73939 114.757871) (xy 215.661292 114.940086) (xy 215.661292 110.384397) (xy 215.615335 110.152296) (xy 215.525171 109.933542) - (xy 215.394235 109.736467) (xy 215.227513 109.568578) (xy 215.031357 109.436269) (xy 214.813238 109.34458) (xy 214.581464 109.297003) - (xy 214.344863 109.295351) (xy 214.112447 109.339687) (xy 213.893069 109.428322) (xy 213.695084 109.557879) (xy 213.526035 109.723424) - (xy 213.39236 109.918652) (xy 213.299151 110.136125) (xy 213.249957 110.367562) (xy 213.246654 110.604146) (xy 213.289366 110.836866) - (xy 213.376467 111.056857) (xy 213.504639 111.255741) (xy 213.669 111.425942) (xy 213.863289 111.560977) (xy 214.080107 111.655702) - (xy 214.311194 111.70651) (xy 214.547749 111.711465) (xy 214.780762 111.670379) (xy 215.001356 111.584816) (xy 215.20113 111.458035) - (xy 215.372474 111.294867) (xy 215.508862 111.101524) (xy 215.605098 110.885373) (xy 215.657518 110.654646) (xy 215.661292 110.384397) - (xy 215.661292 114.940086) (xy 215.655992 114.952452) (xy 215.611977 115.159527) (xy 215.609021 115.371207) (xy 215.647237 115.57943) - (xy 215.72517 115.776265) (xy 215.83985 115.954213) (xy 215.986909 116.106498) (xy 216.160747 116.227319) (xy 216.354742 116.312073) - (xy 216.561504 116.357533) (xy 216.692139 116.360269) (xy 217.710685 117.378815) (xy 217.765099 117.423512) (xy 217.818995 117.468736) - (xy 217.822502 117.470664) (xy 217.825603 117.473211) (xy 217.887668 117.506489) (xy 217.949316 117.540381) (xy 217.953136 117.541592) - (xy 217.956667 117.543486) (xy 218.023964 117.56406) (xy 218.091071 117.585348) (xy 218.095054 117.585794) (xy 218.098885 117.586966) - (xy 218.168872 117.594075) (xy 218.238861 117.601926) (xy 218.246697 117.60198) (xy 218.24684 117.601995) (xy 218.246973 117.601982) - (xy 218.2495 117.602) (xy 221.07903 117.602) (xy 221.149883 117.711942) (xy 221.340196 117.909016) (xy 221.565163 118.065372) - (xy 221.665699 118.109295) (xy 221.599644 118.135984) (xy 221.370399 118.285997) (xy 221.174658 118.477681) (xy 221.019877 118.703734) - (xy 220.91195 118.955546) (xy 220.854989 119.223524) (xy 220.851164 119.497464) (xy 220.90062 119.766928) (xy 221.001474 120.021655) - (xy 221.149883 120.251942) (xy 221.340196 120.449016) (xy 221.565163 120.605372) (xy 221.665699 120.649295) (xy 221.599644 120.675984) - (xy 221.370399 120.825997) (xy 221.174658 121.017681) (xy 221.019877 121.243734) (xy 220.91195 121.495546) (xy 220.854989 121.763524) - (xy 220.851164 122.037464) (xy 220.90062 122.306928) (xy 220.948556 122.428) (xy 212.610752 122.428) (xy 212.610752 107.387197) - (xy 212.564795 107.155096) (xy 212.474631 106.936342) (xy 212.343695 106.739267) (xy 212.176973 106.571378) (xy 211.980817 106.439069) - (xy 211.762698 106.34738) (xy 211.530924 106.299803) (xy 211.510926 106.299663) (xy 211.510926 103.37121) (xy 211.469806 103.163541) - (xy 211.389134 102.967813) (xy 211.27198 102.791483) (xy 211.122808 102.641267) (xy 210.947301 102.522885) (xy 210.752141 102.440848) - (xy 210.544764 102.398279) (xy 210.333069 102.396801) (xy 210.125118 102.43647) (xy 209.928832 102.515775) (xy 209.751688 102.631694) - (xy 209.600434 102.779813) (xy 209.48083 102.954491) (xy 209.397432 103.149072) (xy 209.353417 103.356147) (xy 209.350461 103.567827) - (xy 209.388677 103.77605) (xy 209.46661 103.972885) (xy 209.58129 104.150833) (xy 209.728349 104.303118) (xy 209.902187 104.423939) - (xy 210.096182 104.508693) (xy 210.302944 104.554153) (xy 210.514599 104.558586) (xy 210.723084 104.521825) (xy 210.920457 104.445268) - (xy 211.099202 104.331833) (xy 211.25251 104.18584) (xy 211.374541 104.01285) (xy 211.460648 103.819452) (xy 211.50755 103.613012) - (xy 211.510926 103.37121) (xy 211.510926 106.299663) (xy 211.294323 106.298151) (xy 211.061907 106.342487) (xy 210.842529 106.431122) - (xy 210.644544 106.560679) (xy 210.475495 106.726224) (xy 210.34182 106.921452) (xy 210.248611 107.138925) (xy 210.199417 107.370362) - (xy 210.196114 107.606946) (xy 210.238826 107.839666) (xy 210.325927 108.059657) (xy 210.454099 108.258541) (xy 210.61846 108.428742) - (xy 210.812749 108.563777) (xy 211.029567 108.658502) (xy 211.260654 108.70931) (xy 211.497209 108.714265) (xy 211.730222 108.673179) - (xy 211.950816 108.587616) (xy 212.15059 108.460835) (xy 212.321934 108.297667) (xy 212.458322 108.104324) (xy 212.554558 107.888173) - (xy 212.606978 107.657446) (xy 212.610752 107.387197) (xy 212.610752 122.428) (xy 210.954672 122.428) (xy 210.954672 111.890617) - (xy 210.908715 111.658516) (xy 210.818551 111.439762) (xy 210.687615 111.242687) (xy 210.520893 111.074798) (xy 210.324737 110.942489) - (xy 210.106618 110.8508) (xy 209.874844 110.803223) (xy 209.638243 110.801571) (xy 209.405827 110.845907) (xy 209.186449 110.934542) - (xy 208.988464 111.064099) (xy 208.819415 111.229644) (xy 208.68574 111.424872) (xy 208.592531 111.642345) (xy 208.543337 111.873782) - (xy 208.540034 112.110366) (xy 208.582746 112.343086) (xy 208.669847 112.563077) (xy 208.798019 112.761961) (xy 208.915662 112.883784) - (xy 208.877272 112.899295) (xy 208.700128 113.015214) (xy 208.548874 113.163333) (xy 208.42927 113.338011) (xy 208.345872 113.532592) - (xy 208.301857 113.739667) (xy 208.298901 113.951347) (xy 208.337117 114.15957) (xy 208.41505 114.356405) (xy 208.52973 114.534353) - (xy 208.676789 114.686638) (xy 208.850627 114.807459) (xy 209.044622 114.892213) (xy 209.251384 114.937673) (xy 209.463039 114.942106) - (xy 209.671524 114.905345) (xy 209.868897 114.828788) (xy 210.047642 114.715353) (xy 210.20095 114.56936) (xy 210.322981 114.39637) - (xy 210.409088 114.202972) (xy 210.45599 113.996532) (xy 210.459366 113.75473) (xy 210.418246 113.547061) (xy 210.337574 113.351333) - (xy 210.22042 113.175003) (xy 210.180888 113.135194) (xy 210.294736 113.091036) (xy 210.49451 112.964255) (xy 210.665854 112.801087) - (xy 210.802242 112.607744) (xy 210.898478 112.391593) (xy 210.950898 112.160866) (xy 210.954672 111.890617) (xy 210.954672 122.428) - (xy 208.407 122.428) (xy 208.336936 122.434869) (xy 208.26683 122.441003) (xy 208.262982 122.44212) (xy 208.258993 122.442512) - (xy 208.191581 122.462864) (xy 208.124018 122.482494) (xy 208.120462 122.484337) (xy 208.116624 122.485496) (xy 208.054446 122.518556) - (xy 207.991986 122.550933) (xy 207.988855 122.553431) (xy 207.985316 122.555314) (xy 207.930769 122.5998) (xy 207.87576 122.643714) - (xy 207.870185 122.649212) (xy 207.870069 122.649307) (xy 207.869979 122.649414) (xy 207.868185 122.651185) (xy 205.963185 124.556185) - (xy 205.918487 124.610599) (xy 205.873264 124.664495) (xy 205.871335 124.668002) (xy 205.868789 124.671103) (xy 205.83551 124.733168) - (xy 205.801619 124.794816) (xy 205.800407 124.798636) (xy 205.798514 124.802167) (xy 205.777939 124.869464) (xy 205.756652 124.936571) - (xy 205.756205 124.940554) (xy 205.755034 124.944385) (xy 205.747924 125.014372) (xy 205.740074 125.084361) (xy 205.740019 125.092197) - (xy 205.740005 125.09234) (xy 205.740017 125.092473) (xy 205.74 125.095) (xy 205.74 125.473236) (xy 205.671054 125.540753) - (xy 205.646066 125.577247) (xy 205.646066 85.10607) (xy 205.604946 84.898401) (xy 205.524274 84.702673) (xy 205.40712 84.526343) - (xy 205.257948 84.376127) (xy 205.082441 84.257745) (xy 204.887281 84.175708) (xy 204.679904 84.133139) (xy 204.468209 84.131661) - (xy 204.260258 84.17133) (xy 204.063972 84.250635) (xy 203.886828 84.366554) (xy 203.735574 84.514673) (xy 203.61597 84.689351) - (xy 203.532572 84.883932) (xy 203.488557 85.091007) (xy 203.485601 85.302687) (xy 203.523817 85.51091) (xy 203.60175 85.707745) - (xy 203.71643 85.885693) (xy 203.863489 86.037978) (xy 204.037327 86.158799) (xy 204.231322 86.243553) (xy 204.438084 86.289013) - (xy 204.649739 86.293446) (xy 204.858224 86.256685) (xy 205.055597 86.180128) (xy 205.234342 86.066693) (xy 205.38765 85.9207) - (xy 205.509681 85.74771) (xy 205.595788 85.554312) (xy 205.64269 85.347872) (xy 205.646066 85.10607) (xy 205.646066 125.577247) - (xy 205.55145 125.715431) (xy 205.468052 125.910012) (xy 205.424037 126.117087) (xy 205.421081 126.328767) (xy 205.459297 126.53699) - (xy 205.53723 126.733825) (xy 205.65191 126.911773) (xy 205.798969 127.064058) (xy 205.972807 127.184879) (xy 206.166802 127.269633) - (xy 206.373564 127.315093) (xy 206.585219 127.319526) (xy 206.793704 127.282765) (xy 206.991077 127.206208) (xy 207.169822 127.092773) - (xy 207.32313 126.94678) (xy 207.445161 126.77379) (xy 207.531268 126.580392) (xy 207.57817 126.373952) (xy 207.581546 126.13215) - (xy 207.540426 125.924481) (xy 207.459754 125.728753) (xy 207.3426 125.552423) (xy 207.264 125.473272) (xy 207.264 125.41063) - (xy 208.022346 124.652283) (xy 208.088187 124.818577) (xy 208.216359 125.017461) (xy 208.38072 125.187662) (xy 208.575009 125.322697) - (xy 208.791827 125.417422) (xy 209.010565 125.465515) (xy 209.030537 125.57433) (xy 209.10847 125.771165) (xy 209.22315 125.949113) - (xy 209.370209 126.101398) (xy 209.544047 126.222219) (xy 209.738042 126.306973) (xy 209.944804 126.352433) (xy 210.156459 126.356866) - (xy 210.364944 126.320105) (xy 210.562317 126.243548) (xy 210.741062 126.130113) (xy 210.89437 125.98412) (xy 211.016401 125.81113) - (xy 211.102508 125.617732) (xy 211.14941 125.411292) (xy 211.152786 125.16949) (xy 211.111666 124.961821) (xy 211.030994 124.766093) - (xy 210.91384 124.589763) (xy 210.764668 124.439547) (xy 210.589161 124.321165) (xy 210.394001 124.239128) (xy 210.371776 124.234565) - (xy 210.373012 124.146117) (xy 210.334575 123.952) (xy 220.947757 123.952) (xy 220.91195 124.035546) (xy 220.854989 124.303524) - (xy 220.851164 124.577464) (xy 220.90062 124.846928) (xy 221.001474 125.101655) (xy 221.149883 125.331942) (xy 221.340196 125.529016) - (xy 221.565163 125.685372) (xy 221.665699 125.729295) (xy 221.599644 125.755984) (xy 221.370399 125.905997) (xy 221.174658 126.097681) - (xy 221.019877 126.323734) (xy 220.91195 126.575546) (xy 220.854989 126.843524) (xy 220.851164 127.117464) (xy 220.90062 127.386928) - (xy 221.001474 127.641655) (xy 221.149883 127.871942) (xy 221.340196 128.069016) (xy 221.565163 128.225372) (xy 221.665699 128.269295) - (xy 221.599644 128.295984) (xy 221.370399 128.445997) (xy 221.174658 128.637681) (xy 221.019877 128.863734) (xy 220.91195 129.115546) - (xy 220.854989 129.383524) (xy 220.851164 129.657464) (xy 220.90062 129.926928) (xy 221.001474 130.181655) (xy 221.149883 130.411942) - (xy 221.340196 130.609016) (xy 221.565163 130.765372) (xy 221.665699 130.809295) (xy 221.599644 130.835984) (xy 221.370399 130.985997) - (xy 221.174658 131.177681) (xy 221.019877 131.403734) (xy 220.91195 131.655546) (xy 220.854989 131.923524) (xy 220.851164 132.197464) - (xy 220.90062 132.466928) (xy 221.001474 132.721655) (xy 221.149883 132.951942) (xy 221.340196 133.149016) (xy 221.565163 133.305372) - (xy 221.665699 133.349295) (xy 221.599644 133.375984) (xy 221.370399 133.525997) (xy 221.174658 133.717681) (xy 221.019877 133.943734) - (xy 220.91195 134.195546) (xy 220.854989 134.463524) (xy 220.851164 134.737464) (xy 220.90062 135.006928) (xy 220.948556 135.128) - (xy 218.75563 135.128) (xy 218.536933 134.909303) (xy 218.56269 134.795938) (xy 218.567059 134.483017) (xy 218.513846 134.214269) - (xy 218.409446 133.960975) (xy 218.257835 133.732783) (xy 218.06479 133.538385) (xy 217.837662 133.385185) (xy 217.585103 133.279019) - (xy 217.316733 133.223931) (xy 217.042774 133.222018) (xy 216.773661 133.273354) (xy 216.519644 133.375984) (xy 216.290399 133.525997) - (xy 216.094658 133.717681) (xy 215.939877 133.943734) (xy 215.83195 134.195546) (xy 215.774989 134.463524) (xy 215.771164 134.737464) - (xy 215.82062 135.006928) (xy 215.921474 135.261655) (xy 216.069883 135.491942) (xy 216.260196 135.689016) (xy 216.485163 135.845372) - (xy 216.736215 135.955054) (xy 217.003789 136.013884) (xy 217.277695 136.019622) (xy 217.459868 135.987499) (xy 217.901184 136.428815) - (xy 217.955597 136.47351) (xy 218.009495 136.518736) (xy 218.013006 136.520666) (xy 218.016103 136.52321) (xy 218.078129 136.556468) - (xy 218.139816 136.590381) (xy 218.143636 136.591592) (xy 218.147167 136.593486) (xy 218.214464 136.61406) (xy 218.281571 136.635348) - (xy 218.285554 136.635794) (xy 218.289385 136.636966) (xy 218.359372 136.644075) (xy 218.429361 136.651926) (xy 218.437197 136.65198) - (xy 218.43734 136.651995) (xy 218.437473 136.651982) (xy 218.44 136.652) (xy 220.947757 136.652) (xy 220.91195 136.735546) - (xy 220.854989 137.003524) (xy 220.851164 137.277464) (xy 220.90062 137.546928) (xy 221.001474 137.801655) (xy 221.149883 138.031942) - (xy 221.340196 138.229016) (xy 221.565163 138.385372) (xy 221.816215 138.495054) (xy 222.083789 138.553884) (xy 222.357695 138.559622) - (xy 222.627499 138.512048) (xy 222.882923 138.412975) (xy 223.11424 138.266177) (xy 223.312639 138.077245) (xy 223.470561 137.853375) - (xy 223.518934 137.744726) (xy 223.541474 137.801655) (xy 223.689883 138.031942) (xy 223.880196 138.229016) (xy 224.105163 138.385372) - (xy 224.356215 138.495054) (xy 224.623789 138.553884) (xy 224.897695 138.559622) (xy 225.167499 138.512048) (xy 225.422923 138.412975) - (xy 225.65424 138.266177) (xy 225.852639 138.077245) (xy 226.010561 137.853375) (xy 226.121993 137.603095) (xy 226.18269 137.335938) - (xy 226.187059 137.023017) (xy 226.187059 145.923) (xy 208.41191 145.923) (xy 208.41191 134.547983) (xy 208.370922 134.275867) - (xy 208.277636 134.016977) (xy 208.215656 133.90102) (xy 207.975565 133.83404) (xy 207.79596 134.013645) (xy 207.79596 133.654435) - (xy 207.72898 133.414344) (xy 207.479952 133.297244) (xy 207.212865 133.230977) (xy 206.937983 133.21809) (xy 206.665867 133.259078) - (xy 206.406977 133.352364) (xy 206.29102 133.414344) (xy 206.22404 133.654435) (xy 207.01 134.440395) (xy 207.79596 133.654435) - (xy 207.79596 134.013645) (xy 207.189605 134.62) (xy 207.975565 135.40596) (xy 208.215656 135.33898) (xy 208.332756 135.089952) - (xy 208.399023 134.822865) (xy 208.41191 134.547983) (xy 208.41191 145.923) (xy 207.79596 145.923) (xy 207.79596 135.585565) - (xy 207.01 134.799605) (xy 206.830395 134.97921) (xy 206.830395 134.62) (xy 206.044435 133.83404) (xy 205.804344 133.90102) - (xy 205.687244 134.150048) (xy 205.620977 134.417135) (xy 205.60809 134.692017) (xy 205.649078 134.964133) (xy 205.742364 135.223023) - (xy 205.804344 135.33898) (xy 206.044435 135.40596) (xy 206.830395 134.62) (xy 206.830395 134.97921) (xy 206.22404 135.585565) - (xy 206.29102 135.825656) (xy 206.540048 135.942756) (xy 206.807135 136.009023) (xy 207.082017 136.02191) (xy 207.354133 135.980922) - (xy 207.613023 135.887636) (xy 207.72898 135.825656) (xy 207.79596 135.585565) (xy 207.79596 145.923) (xy 205.224426 145.923) - (xy 205.224426 116.84845) (xy 205.183306 116.640781) (xy 205.102634 116.445053) (xy 204.98548 116.268723) (xy 204.836308 116.118507) - (xy 204.660801 116.000125) (xy 204.660552 116.00002) (xy 204.660552 98.555617) (xy 204.614595 98.323516) (xy 204.524431 98.104762) - (xy 204.393495 97.907687) (xy 204.226773 97.739798) (xy 204.030617 97.607489) (xy 203.812498 97.5158) (xy 203.580724 97.468223) - (xy 203.344123 97.466571) (xy 203.111707 97.510907) (xy 202.892329 97.599542) (xy 202.694344 97.729099) (xy 202.525295 97.894644) - (xy 202.39162 98.089872) (xy 202.298411 98.307345) (xy 202.249217 98.538782) (xy 202.245914 98.775366) (xy 202.288626 99.008086) - (xy 202.375727 99.228077) (xy 202.503899 99.426961) (xy 202.66826 99.597162) (xy 202.862549 99.732197) (xy 203.079367 99.826922) - (xy 203.310454 99.87773) (xy 203.547009 99.882685) (xy 203.780022 99.841599) (xy 204.000616 99.756036) (xy 204.20039 99.629255) - (xy 204.371734 99.466087) (xy 204.508122 99.272744) (xy 204.604358 99.056593) (xy 204.656778 98.825866) (xy 204.660552 98.555617) - (xy 204.660552 116.00002) (xy 204.465641 115.918088) (xy 204.258264 115.875519) (xy 204.046569 115.874041) (xy 203.838618 115.91371) - (xy 203.642332 115.993015) (xy 203.465188 116.108934) (xy 203.313934 116.257053) (xy 203.19433 116.431731) (xy 203.110932 116.626312) - (xy 203.066917 116.833387) (xy 203.063961 117.045067) (xy 203.102177 117.25329) (xy 203.18011 117.450125) (xy 203.29479 117.628073) - (xy 203.441849 117.780358) (xy 203.615687 117.901179) (xy 203.809682 117.985933) (xy 204.016444 118.031393) (xy 204.228099 118.035826) - (xy 204.436584 117.999065) (xy 204.633957 117.922508) (xy 204.812702 117.809073) (xy 204.96601 117.66308) (xy 205.088041 117.49009) - (xy 205.174148 117.296692) (xy 205.22105 117.090252) (xy 205.224426 116.84845) (xy 205.224426 145.923) (xy 205.000912 145.923) - (xy 205.000912 124.499177) (xy 204.954955 124.267076) (xy 204.864791 124.048322) (xy 204.733855 123.851247) (xy 204.567133 123.683358) - (xy 204.370977 123.551049) (xy 204.152858 123.45936) (xy 203.921084 123.411783) (xy 203.684483 123.410131) (xy 203.452067 123.454467) - (xy 203.232689 123.543102) (xy 203.034704 123.672659) (xy 202.865655 123.838204) (xy 202.73198 124.033432) (xy 202.638771 124.250905) - (xy 202.589577 124.482342) (xy 202.586274 124.718926) (xy 202.628986 124.951646) (xy 202.716087 125.171637) (xy 202.844259 125.370521) - (xy 203.00862 125.540722) (xy 203.202909 125.675757) (xy 203.419727 125.770482) (xy 203.650814 125.82129) (xy 203.887369 125.826245) - (xy 204.120382 125.785159) (xy 204.340976 125.699596) (xy 204.54075 125.572815) (xy 204.712094 125.409647) (xy 204.848482 125.216304) - (xy 204.944718 125.000153) (xy 204.997138 124.769426) (xy 205.000912 124.499177) (xy 205.000912 145.923) (xy 201.422059 145.923) - (xy 201.422059 89.398017) (xy 201.368846 89.129269) (xy 201.264446 88.875975) (xy 201.112835 88.647783) (xy 200.91979 88.453385) - (xy 200.692662 88.300185) (xy 200.611393 88.266022) (xy 200.657923 88.247975) (xy 200.88924 88.101177) (xy 201.087639 87.912245) - (xy 201.245561 87.688375) (xy 201.356993 87.438095) (xy 201.41769 87.170938) (xy 201.422059 86.858017) (xy 201.422059 82.032017) - (xy 201.368846 81.763269) (xy 201.264446 81.509975) (xy 201.112835 81.281783) (xy 200.91979 81.087385) (xy 200.692662 80.934185) - (xy 200.611393 80.900022) (xy 200.657923 80.881975) (xy 200.88924 80.735177) (xy 201.087639 80.546245) (xy 201.245561 80.322375) - (xy 201.356993 80.072095) (xy 201.41769 79.804938) (xy 201.422059 79.492017) (xy 201.368846 79.223269) (xy 201.264446 78.969975) - (xy 201.112835 78.741783) (xy 200.91979 78.547385) (xy 200.692662 78.394185) (xy 200.611393 78.360022) (xy 200.657923 78.341975) - (xy 200.88924 78.195177) (xy 201.087639 78.006245) (xy 201.245561 77.782375) (xy 201.356993 77.532095) (xy 201.41769 77.264938) - (xy 201.422059 76.952017) (xy 201.368846 76.683269) (xy 201.264446 76.429975) (xy 201.112835 76.201783) (xy 200.91979 76.007385) - (xy 200.692662 75.854185) (xy 200.611393 75.820022) (xy 200.657923 75.801975) (xy 200.88924 75.655177) (xy 201.087639 75.466245) - (xy 201.245561 75.242375) (xy 201.356993 74.992095) (xy 201.41769 74.724938) (xy 201.422059 74.412017) (xy 201.368846 74.143269) - (xy 201.264446 73.889975) (xy 201.112835 73.661783) (xy 200.91979 73.467385) (xy 200.692662 73.314185) (xy 200.440103 73.208019) - (xy 200.171733 73.152931) (xy 199.897774 73.151018) (xy 199.628661 73.202354) (xy 199.374644 73.304984) (xy 199.145399 73.454997) - (xy 198.949658 73.646681) (xy 198.882 73.745493) (xy 198.882 73.724458) (xy 198.857597 73.601777) (xy 198.80973 73.486215) - (xy 198.740237 73.382211) (xy 198.651789 73.293763) (xy 198.547785 73.22427) (xy 198.432223 73.176403) (xy 198.309542 73.152) - (xy 198.184458 73.152) (xy 196.660458 73.152) (xy 196.537777 73.176403) (xy 196.422215 73.22427) (xy 196.318211 73.293763) - (xy 196.229763 73.382211) (xy 196.16027 73.486215) (xy 196.112403 73.601777) (xy 196.088059 73.724161) (xy 196.088059 68.443017) - (xy 196.034846 68.174269) (xy 195.930446 67.920975) (xy 195.778835 67.692783) (xy 195.58579 67.498385) (xy 195.358662 67.345185) - (xy 195.106103 67.239019) (xy 194.837733 67.183931) (xy 194.691059 67.182906) (xy 194.691059 65.903017) (xy 194.637846 65.634269) - (xy 194.533446 65.380975) (xy 194.381835 65.152783) (xy 194.18879 64.958385) (xy 193.961662 64.805185) (xy 193.709103 64.699019) - (xy 193.440733 64.643931) (xy 193.166774 64.642018) (xy 192.897661 64.693354) (xy 192.643644 64.795984) (xy 192.414399 64.945997) - (xy 192.218658 65.137681) (xy 192.063877 65.363734) (xy 191.95595 65.615546) (xy 191.898989 65.883524) (xy 191.897059 66.021747) - (xy 191.897059 65.903017) (xy 191.843846 65.634269) (xy 191.739446 65.380975) (xy 191.587835 65.152783) (xy 191.39479 64.958385) - (xy 191.167662 64.805185) (xy 190.915103 64.699019) (xy 190.646733 64.643931) (xy 190.372774 64.642018) (xy 190.103661 64.693354) - (xy 189.849644 64.795984) (xy 189.620399 64.945997) (xy 189.424658 65.137681) (xy 189.269877 65.363734) (xy 189.165609 65.607007) - (xy 189.072446 65.380975) (xy 188.920835 65.152783) (xy 188.72779 64.958385) (xy 188.500662 64.805185) (xy 188.248103 64.699019) - (xy 187.979733 64.643931) (xy 187.705774 64.642018) (xy 187.436661 64.693354) (xy 187.182644 64.795984) (xy 186.953399 64.945997) - (xy 186.757658 65.137681) (xy 186.602877 65.363734) (xy 186.49495 65.615546) (xy 186.437989 65.883524) (xy 186.434164 66.157464) - (xy 186.48362 66.426928) (xy 186.584474 66.681655) (xy 186.732883 66.911942) (xy 186.923196 67.109016) (xy 187.148163 67.265372) - (xy 187.399215 67.375054) (xy 187.666789 67.433884) (xy 187.940695 67.439622) (xy 188.210499 67.392048) (xy 188.465923 67.292975) - (xy 188.69724 67.146177) (xy 188.895639 66.957245) (xy 189.053561 66.733375) (xy 189.164993 66.483095) (xy 189.16786 66.470472) - (xy 189.251474 66.681655) (xy 189.399883 66.911942) (xy 189.590196 67.109016) (xy 189.815163 67.265372) (xy 190.066215 67.375054) - (xy 190.333789 67.433884) (xy 190.607695 67.439622) (xy 190.877499 67.392048) (xy 191.132923 67.292975) (xy 191.36424 67.146177) - (xy 191.562639 66.957245) (xy 191.720561 66.733375) (xy 191.831993 66.483095) (xy 191.89269 66.215938) (xy 191.897059 65.903017) - (xy 191.897059 66.021747) (xy 191.895164 66.157464) (xy 191.94462 66.426928) (xy 192.045474 66.681655) (xy 192.193883 66.911942) - (xy 192.384196 67.109016) (xy 192.609163 67.265372) (xy 192.860215 67.375054) (xy 193.127789 67.433884) (xy 193.401695 67.439622) - (xy 193.671499 67.392048) (xy 193.926923 67.292975) (xy 194.15824 67.146177) (xy 194.356639 66.957245) (xy 194.514561 66.733375) - (xy 194.625993 66.483095) (xy 194.68669 66.215938) (xy 194.691059 65.903017) (xy 194.691059 67.182906) (xy 194.563774 67.182018) - (xy 194.294661 67.233354) (xy 194.040644 67.335984) (xy 193.811399 67.485997) (xy 193.615658 67.677681) (xy 193.460877 67.903734) - (xy 193.35295 68.155546) (xy 193.295989 68.423524) (xy 193.294059 68.561747) (xy 193.294059 68.443017) (xy 193.240846 68.174269) - (xy 193.136446 67.920975) (xy 192.984835 67.692783) (xy 192.79179 67.498385) (xy 192.564662 67.345185) (xy 192.312103 67.239019) - (xy 192.043733 67.183931) (xy 191.769774 67.182018) (xy 191.500661 67.233354) (xy 191.246644 67.335984) (xy 191.017399 67.485997) - (xy 190.821658 67.677681) (xy 190.666877 67.903734) (xy 190.55895 68.155546) (xy 190.501989 68.423524) (xy 190.500059 68.561747) - (xy 190.500059 68.443017) (xy 190.446846 68.174269) (xy 190.342446 67.920975) (xy 190.190835 67.692783) (xy 189.99779 67.498385) - (xy 189.770662 67.345185) (xy 189.518103 67.239019) (xy 189.249733 67.183931) (xy 188.975774 67.182018) (xy 188.706661 67.233354) - (xy 188.452644 67.335984) (xy 188.223399 67.485997) (xy 188.027658 67.677681) (xy 187.872877 67.903734) (xy 187.768609 68.147007) - (xy 187.675446 67.920975) (xy 187.523835 67.692783) (xy 187.33079 67.498385) (xy 187.103662 67.345185) (xy 186.851103 67.239019) - (xy 186.582733 67.183931) (xy 186.308774 67.182018) (xy 186.039661 67.233354) (xy 185.785644 67.335984) (xy 185.556399 67.485997) - (xy 185.360658 67.677681) (xy 185.205877 67.903734) (xy 185.09795 68.155546) (xy 185.040989 68.423524) (xy 185.039 68.565972) - (xy 185.039 67.755458) (xy 185.014597 67.632777) (xy 184.96673 67.517215) (xy 184.911593 67.434696) (xy 185.146695 67.439622) - (xy 185.416499 67.392048) (xy 185.671923 67.292975) (xy 185.90324 67.146177) (xy 186.101639 66.957245) (xy 186.259561 66.733375) - (xy 186.370993 66.483095) (xy 186.43169 66.215938) (xy 186.436059 65.903017) (xy 186.382846 65.634269) (xy 186.278446 65.380975) - (xy 186.126835 65.152783) (xy 185.93379 64.958385) (xy 185.706662 64.805185) (xy 185.454103 64.699019) (xy 185.185733 64.643931) - (xy 184.911774 64.642018) (xy 184.642661 64.693354) (xy 184.388644 64.795984) (xy 184.159399 64.945997) (xy 183.963658 65.137681) - (xy 183.808877 65.363734) (xy 183.70095 65.615546) (xy 183.643989 65.883524) (xy 183.640164 66.157464) (xy 183.68962 66.426928) - (xy 183.790474 66.681655) (xy 183.938883 66.911942) (xy 184.129196 67.109016) (xy 184.235645 67.183) (xy 182.817458 67.183) - (xy 182.694777 67.207403) (xy 182.579215 67.25527) (xy 182.475211 67.324763) (xy 182.386763 67.413211) (xy 182.31727 67.517215) - (xy 182.269403 67.632777) (xy 182.245 67.755458) (xy 182.245 67.880542) (xy 182.245 69.404542) (xy 182.269403 69.527223) - (xy 182.31727 69.642785) (xy 182.386763 69.746789) (xy 182.475211 69.835237) (xy 182.579215 69.90473) (xy 182.694777 69.952597) - (xy 182.817458 69.977) (xy 182.942542 69.977) (xy 184.466542 69.977) (xy 184.589223 69.952597) (xy 184.704785 69.90473) - (xy 184.808789 69.835237) (xy 184.897237 69.746789) (xy 184.96673 69.642785) (xy 185.014597 69.527223) (xy 185.039 69.404542) - (xy 185.039 69.279458) (xy 185.039 68.707467) (xy 185.08662 68.966928) (xy 185.187474 69.221655) (xy 185.335883 69.451942) - (xy 185.526196 69.649016) (xy 185.751163 69.805372) (xy 186.002215 69.915054) (xy 186.269789 69.973884) (xy 186.543695 69.979622) - (xy 186.813499 69.932048) (xy 187.068923 69.832975) (xy 187.30024 69.686177) (xy 187.498639 69.497245) (xy 187.656561 69.273375) - (xy 187.767993 69.023095) (xy 187.77086 69.010472) (xy 187.854474 69.221655) (xy 188.002883 69.451942) (xy 188.193196 69.649016) - (xy 188.418163 69.805372) (xy 188.669215 69.915054) (xy 188.936789 69.973884) (xy 189.210695 69.979622) (xy 189.480499 69.932048) - (xy 189.735923 69.832975) (xy 189.96724 69.686177) (xy 190.165639 69.497245) (xy 190.323561 69.273375) (xy 190.434993 69.023095) - (xy 190.49569 68.755938) (xy 190.500059 68.443017) (xy 190.500059 68.561747) (xy 190.498164 68.697464) (xy 190.54762 68.966928) - (xy 190.648474 69.221655) (xy 190.796883 69.451942) (xy 190.987196 69.649016) (xy 191.212163 69.805372) (xy 191.463215 69.915054) - (xy 191.730789 69.973884) (xy 192.004695 69.979622) (xy 192.274499 69.932048) (xy 192.529923 69.832975) (xy 192.76124 69.686177) - (xy 192.959639 69.497245) (xy 193.117561 69.273375) (xy 193.228993 69.023095) (xy 193.28969 68.755938) (xy 193.294059 68.443017) - (xy 193.294059 68.561747) (xy 193.292164 68.697464) (xy 193.34162 68.966928) (xy 193.442474 69.221655) (xy 193.590883 69.451942) - (xy 193.781196 69.649016) (xy 194.006163 69.805372) (xy 194.257215 69.915054) (xy 194.524789 69.973884) (xy 194.798695 69.979622) - (xy 195.068499 69.932048) (xy 195.323923 69.832975) (xy 195.55524 69.686177) (xy 195.753639 69.497245) (xy 195.911561 69.273375) - (xy 196.022993 69.023095) (xy 196.08369 68.755938) (xy 196.088059 68.443017) (xy 196.088059 73.724161) (xy 196.088 73.724458) - (xy 196.088 73.849542) (xy 196.088 75.373542) (xy 196.112403 75.496223) (xy 196.16027 75.611785) (xy 196.229763 75.715789) - (xy 196.318211 75.804237) (xy 196.422215 75.87373) (xy 196.537777 75.921597) (xy 196.660458 75.946) (xy 196.680274 75.946) - (xy 196.605399 75.994997) (xy 196.409658 76.186681) (xy 196.254877 76.412734) (xy 196.14695 76.664546) (xy 196.089989 76.932524) - (xy 196.086164 77.206464) (xy 196.13562 77.475928) (xy 196.236474 77.730655) (xy 196.384883 77.960942) (xy 196.575196 78.158016) - (xy 196.800163 78.314372) (xy 196.900699 78.358295) (xy 196.834644 78.384984) (xy 196.605399 78.534997) (xy 196.409658 78.726681) - (xy 196.254877 78.952734) (xy 196.14695 79.204546) (xy 196.089989 79.472524) (xy 196.086164 79.746464) (xy 196.13562 80.015928) - (xy 196.236474 80.270655) (xy 196.384883 80.500942) (xy 196.575196 80.698016) (xy 196.800163 80.854372) (xy 196.900699 80.898295) - (xy 196.834644 80.924984) (xy 196.605399 81.074997) (xy 196.409658 81.266681) (xy 196.254877 81.492734) (xy 196.14695 81.744546) - (xy 196.089989 82.012524) (xy 196.086164 82.286464) (xy 196.13562 82.555928) (xy 196.236474 82.810655) (xy 196.384883 83.040942) - (xy 196.575196 83.238016) (xy 196.800163 83.394372) (xy 197.051215 83.504054) (xy 197.318789 83.562884) (xy 197.592695 83.568622) - (xy 197.862499 83.521048) (xy 198.117923 83.421975) (xy 198.34924 83.275177) (xy 198.547639 83.086245) (xy 198.705561 82.862375) - (xy 198.753934 82.753726) (xy 198.776474 82.810655) (xy 198.924883 83.040942) (xy 199.115196 83.238016) (xy 199.340163 83.394372) - (xy 199.591215 83.504054) (xy 199.858789 83.562884) (xy 200.132695 83.568622) (xy 200.402499 83.521048) (xy 200.657923 83.421975) - (xy 200.88924 83.275177) (xy 201.087639 83.086245) (xy 201.245561 82.862375) (xy 201.356993 82.612095) (xy 201.41769 82.344938) - (xy 201.422059 82.032017) (xy 201.422059 86.858017) (xy 201.368846 86.589269) (xy 201.264446 86.335975) (xy 201.112835 86.107783) - (xy 200.91979 85.913385) (xy 200.692662 85.760185) (xy 200.440103 85.654019) (xy 200.171733 85.598931) (xy 199.897774 85.597018) - (xy 199.628661 85.648354) (xy 199.374644 85.750984) (xy 199.145399 85.900997) (xy 198.949658 86.092681) (xy 198.882 86.191493) - (xy 198.882 86.170458) (xy 198.857597 86.047777) (xy 198.80973 85.932215) (xy 198.740237 85.828211) (xy 198.651789 85.739763) - (xy 198.547785 85.67027) (xy 198.432223 85.622403) (xy 198.309542 85.598) (xy 198.184458 85.598) (xy 196.660458 85.598) - (xy 196.537777 85.622403) (xy 196.422215 85.67027) (xy 196.318211 85.739763) (xy 196.229763 85.828211) (xy 196.16027 85.932215) - (xy 196.112403 86.047777) (xy 196.088 86.170458) (xy 196.088 86.295542) (xy 196.088 87.819542) (xy 196.112403 87.942223) - (xy 196.16027 88.057785) (xy 196.229763 88.161789) (xy 196.318211 88.250237) (xy 196.422215 88.31973) (xy 196.537777 88.367597) - (xy 196.660458 88.392) (xy 196.680274 88.392) (xy 196.605399 88.440997) (xy 196.409658 88.632681) (xy 196.254877 88.858734) - (xy 196.14695 89.110546) (xy 196.089989 89.378524) (xy 196.086164 89.652464) (xy 196.087429 89.65936) (xy 195.897552 89.849237) - (xy 195.897552 73.287697) (xy 195.851595 73.055596) (xy 195.761431 72.836842) (xy 195.630495 72.639767) (xy 195.463773 72.471878) - (xy 195.267617 72.339569) (xy 195.049498 72.24788) (xy 194.817724 72.200303) (xy 194.581123 72.198651) (xy 194.348707 72.242987) - (xy 194.129329 72.331622) (xy 193.931344 72.461179) (xy 193.762295 72.626724) (xy 193.62862 72.821952) (xy 193.535411 73.039425) - (xy 193.486217 73.270862) (xy 193.482914 73.507446) (xy 193.525626 73.740166) (xy 193.612727 73.960157) (xy 193.740899 74.159041) - (xy 193.90526 74.329242) (xy 194.099549 74.464277) (xy 194.316367 74.559002) (xy 194.547454 74.60981) (xy 194.784009 74.614765) - (xy 195.017022 74.573679) (xy 195.237616 74.488116) (xy 195.43739 74.361335) (xy 195.608734 74.198167) (xy 195.745122 74.004824) - (xy 195.841358 73.788673) (xy 195.893778 73.557946) (xy 195.897552 73.287697) (xy 195.897552 89.849237) (xy 195.135552 90.611237) - (xy 195.135552 83.828697) (xy 195.089595 83.596596) (xy 194.999431 83.377842) (xy 194.868495 83.180767) (xy 194.701773 83.012878) - (xy 194.505617 82.880569) (xy 194.287498 82.78888) (xy 194.055724 82.741303) (xy 193.819123 82.739651) (xy 193.586707 82.783987) - (xy 193.367329 82.872622) (xy 193.169344 83.002179) (xy 193.000295 83.167724) (xy 192.86662 83.362952) (xy 192.773411 83.580425) - (xy 192.724217 83.811862) (xy 192.720914 84.048446) (xy 192.763626 84.281166) (xy 192.850727 84.501157) (xy 192.978899 84.700041) - (xy 193.14326 84.870242) (xy 193.337549 85.005277) (xy 193.554367 85.100002) (xy 193.785454 85.15081) (xy 194.022009 85.155765) - (xy 194.255022 85.114679) (xy 194.475616 85.029116) (xy 194.67539 84.902335) (xy 194.846734 84.739167) (xy 194.983122 84.545824) - (xy 195.079358 84.329673) (xy 195.131778 84.098946) (xy 195.135552 83.828697) (xy 195.135552 90.611237) (xy 190.567876 95.178913) - (xy 190.567876 88.190467) (xy 190.527629 87.930893) (xy 190.437514 87.684158) (xy 190.383812 87.583686) (xy 190.150197 87.524408) - (xy 189.970592 87.704013) (xy 189.970592 87.344803) (xy 189.911314 87.111188) (xy 189.673125 87.000441) (xy 189.417907 86.938289) - (xy 189.155467 86.927124) (xy 188.895893 86.967371) (xy 188.649158 87.057486) (xy 188.548686 87.111188) (xy 188.489408 87.344803) - (xy 189.23 88.085395) (xy 189.970592 87.344803) (xy 189.970592 87.704013) (xy 189.409605 88.265) (xy 190.150197 89.005592) - (xy 190.383812 88.946314) (xy 190.494559 88.708125) (xy 190.556711 88.452907) (xy 190.567876 88.190467) (xy 190.567876 95.178913) - (xy 190.563557 95.183232) (xy 190.563557 90.674244) (xy 190.512762 90.417711) (xy 190.413107 90.175931) (xy 190.268388 89.958111) - (xy 190.084118 89.772549) (xy 189.867314 89.626313) (xy 189.645284 89.53298) (xy 189.810842 89.472514) (xy 189.911314 89.418812) - (xy 189.970592 89.185197) (xy 189.23 88.444605) (xy 189.050395 88.62421) (xy 189.050395 88.265) (xy 188.309803 87.524408) - (xy 188.076188 87.583686) (xy 188.0235 87.697004) (xy 188.0235 87.503958) (xy 187.999097 87.381277) (xy 187.95123 87.265715) - (xy 187.881737 87.161711) (xy 187.793289 87.073263) (xy 187.689285 87.00377) (xy 187.573723 86.955903) (xy 187.451042 86.9315) - (xy 187.325958 86.9315) (xy 187.261546 86.9315) (xy 187.261546 71.01415) (xy 187.220426 70.806481) (xy 187.139754 70.610753) - (xy 187.0226 70.434423) (xy 186.873428 70.284207) (xy 186.697921 70.165825) (xy 186.502761 70.083788) (xy 186.295384 70.041219) - (xy 186.083689 70.039741) (xy 185.875738 70.07941) (xy 185.679452 70.158715) (xy 185.502308 70.274634) (xy 185.351054 70.422753) - (xy 185.23145 70.597431) (xy 185.148052 70.792012) (xy 185.104037 70.999087) (xy 185.101081 71.210767) (xy 185.139297 71.41899) - (xy 185.21723 71.615825) (xy 185.33191 71.793773) (xy 185.478969 71.946058) (xy 185.652807 72.066879) (xy 185.846802 72.151633) - (xy 186.053564 72.197093) (xy 186.265219 72.201526) (xy 186.473704 72.164765) (xy 186.671077 72.088208) (xy 186.849822 71.974773) - (xy 187.00313 71.82878) (xy 187.125161 71.65579) (xy 187.211268 71.462392) (xy 187.25817 71.255952) (xy 187.261546 71.01415) - (xy 187.261546 86.9315) (xy 187.134541 86.9315) (xy 187.134541 74.582603) (xy 187.098259 74.399365) (xy 187.027077 74.226665) - (xy 186.923706 74.071079) (xy 186.792084 73.938535) (xy 186.637224 73.83408) (xy 186.465025 73.761694) (xy 186.282045 73.724134) - (xy 186.095255 73.72283) (xy 185.911768 73.757832) (xy 185.738575 73.827807) (xy 185.582272 73.930089) (xy 185.448812 74.060782) - (xy 185.343279 74.214909) (xy 185.269693 74.386599) (xy 185.230856 74.569312) (xy 185.228248 74.756089) (xy 185.261968 74.939815) - (xy 185.330732 75.113493) (xy 185.43192 75.270506) (xy 185.561679 75.404875) (xy 185.715065 75.511482) (xy 185.886237 75.586265) - (xy 186.068674 75.626376) (xy 186.255428 75.630288) (xy 186.439386 75.597852) (xy 186.613539 75.530302) (xy 186.771255 75.430212) - (xy 186.906527 75.301395) (xy 187.014201 75.148756) (xy 187.090178 74.978111) (xy 187.131562 74.795958) (xy 187.134541 74.582603) - (xy 187.134541 86.9315) (xy 185.928958 86.9315) (xy 185.806277 86.955903) (xy 185.690715 87.00377) (xy 185.586711 87.073263) - (xy 185.498263 87.161711) (xy 185.42877 87.265715) (xy 185.380903 87.381277) (xy 185.3565 87.503958) (xy 185.3565 87.629042) - (xy 185.3565 89.026042) (xy 185.380903 89.148723) (xy 185.42877 89.264285) (xy 185.498263 89.368289) (xy 185.586711 89.456737) - (xy 185.690715 89.52623) (xy 185.806277 89.574097) (xy 185.928958 89.5985) (xy 186.054042 89.5985) (xy 187.451042 89.5985) - (xy 187.573723 89.574097) (xy 187.689285 89.52623) (xy 187.793289 89.456737) (xy 187.881737 89.368289) (xy 187.95123 89.264285) - (xy 187.999097 89.148723) (xy 188.0235 89.026042) (xy 188.0235 88.900958) (xy 188.0235 88.847739) (xy 188.076188 88.946314) - (xy 188.309803 89.005592) (xy 189.050395 88.265) (xy 189.050395 88.62421) (xy 188.489408 89.185197) (xy 188.548686 89.418812) - (xy 188.786875 89.529559) (xy 188.811872 89.535646) (xy 188.609206 89.61753) (xy 188.390381 89.760725) (xy 188.203537 89.943695) - (xy 188.055791 90.159473) (xy 187.95277 90.399839) (xy 187.898399 90.655637) (xy 187.894747 90.917124) (xy 187.941955 91.174341) - (xy 188.038225 91.417489) (xy 188.179888 91.637308) (xy 188.36155 91.825425) (xy 188.576291 91.974674) (xy 188.815932 92.07937) - (xy 189.071344 92.135526) (xy 189.3328 92.141003) (xy 189.59034 92.095592) (xy 189.834154 92.001022) (xy 190.054957 91.860897) - (xy 190.244337 91.680552) (xy 190.395081 91.466858) (xy 190.501448 91.227955) (xy 190.559386 90.972941) (xy 190.563557 90.674244) - (xy 190.563557 95.183232) (xy 183.63879 102.108) (xy 183.070546 102.108) (xy 183.070546 90.06415) (xy 183.029426 89.856481) - (xy 182.948754 89.660753) (xy 182.8316 89.484423) (xy 182.682428 89.334207) (xy 182.506921 89.215825) (xy 182.311761 89.133788) - (xy 182.104384 89.091219) (xy 181.892689 89.089741) (xy 181.684738 89.12941) (xy 181.488452 89.208715) (xy 181.311308 89.324634) - (xy 181.160054 89.472753) (xy 181.04045 89.647431) (xy 180.957052 89.842012) (xy 180.913037 90.049087) (xy 180.910081 90.260767) - (xy 180.948297 90.46899) (xy 181.02623 90.665825) (xy 181.14091 90.843773) (xy 181.287969 90.996058) (xy 181.461807 91.116879) - (xy 181.655802 91.201633) (xy 181.862564 91.247093) (xy 182.074219 91.251526) (xy 182.282704 91.214765) (xy 182.480077 91.138208) - (xy 182.658822 91.024773) (xy 182.81213 90.87878) (xy 182.934161 90.70579) (xy 183.020268 90.512392) (xy 183.06717 90.305952) - (xy 183.070546 90.06415) (xy 183.070546 102.108) (xy 181.038546 102.108) (xy 181.038546 90.95315) (xy 180.997426 90.745481) - (xy 180.916754 90.549753) (xy 180.7996 90.373423) (xy 180.650428 90.223207) (xy 180.474921 90.104825) (xy 180.279761 90.022788) - (xy 180.276546 90.022128) (xy 180.276546 86.38115) (xy 180.235426 86.173481) (xy 180.154754 85.977753) (xy 180.0376 85.801423) - (xy 179.888428 85.651207) (xy 179.712921 85.532825) (xy 179.517761 85.450788) (xy 179.310384 85.408219) (xy 179.098689 85.406741) - (xy 178.890738 85.44641) (xy 178.694452 85.525715) (xy 178.517308 85.641634) (xy 178.371552 85.784368) (xy 178.371552 76.970697) - (xy 178.325595 76.738596) (xy 178.235431 76.519842) (xy 178.104495 76.322767) (xy 177.937773 76.154878) (xy 177.741617 76.022569) - (xy 177.523498 75.93088) (xy 177.291724 75.883303) (xy 177.055123 75.881651) (xy 176.822707 75.925987) (xy 176.603329 76.014622) - (xy 176.405344 76.144179) (xy 176.236295 76.309724) (xy 176.10262 76.504952) (xy 176.009411 76.722425) (xy 175.960217 76.953862) - (xy 175.956914 77.190446) (xy 175.999626 77.423166) (xy 176.086727 77.643157) (xy 176.214899 77.842041) (xy 176.37926 78.012242) - (xy 176.573549 78.147277) (xy 176.790367 78.242002) (xy 177.021454 78.29281) (xy 177.258009 78.297765) (xy 177.491022 78.256679) - (xy 177.711616 78.171116) (xy 177.91139 78.044335) (xy 178.082734 77.881167) (xy 178.219122 77.687824) (xy 178.315358 77.471673) - (xy 178.367778 77.240946) (xy 178.371552 76.970697) (xy 178.371552 85.784368) (xy 178.366054 85.789753) (xy 178.24645 85.964431) - (xy 178.163052 86.159012) (xy 178.119037 86.366087) (xy 178.116081 86.577767) (xy 178.154297 86.78599) (xy 178.212318 86.932534) - (xy 178.037768 86.965832) (xy 177.864575 87.035807) (xy 177.708272 87.138089) (xy 177.574812 87.268782) (xy 177.47849 87.409455) - (xy 177.482557 87.118244) (xy 177.431762 86.861711) (xy 177.332107 86.619931) (xy 177.187388 86.402111) (xy 177.003118 86.216549) - (xy 176.786314 86.070313) (xy 176.545235 85.968973) (xy 176.289063 85.916388) (xy 176.027557 85.914563) (xy 175.770676 85.963565) - (xy 175.528206 86.06153) (xy 175.309381 86.204725) (xy 175.122537 86.387695) (xy 174.974791 86.603473) (xy 174.87177 86.843839) - (xy 174.817399 87.099637) (xy 174.813747 87.361124) (xy 174.860955 87.618341) (xy 174.957225 87.861489) (xy 175.098888 88.081308) - (xy 175.28055 88.269425) (xy 175.495291 88.418674) (xy 175.734932 88.52337) (xy 175.990344 88.579526) (xy 176.2518 88.585003) - (xy 176.50934 88.539592) (xy 176.753154 88.445022) (xy 176.973957 88.304897) (xy 177.163337 88.124552) (xy 177.314081 87.910858) - (xy 177.356315 87.815997) (xy 177.354248 87.964089) (xy 177.387968 88.147815) (xy 177.456732 88.321493) (xy 177.4618 88.329357) - (xy 177.395693 88.483599) (xy 177.387598 88.521679) (xy 177.321025 88.493694) (xy 177.138045 88.456134) (xy 176.951255 88.45483) - (xy 176.767768 88.489832) (xy 176.594575 88.559807) (xy 176.438272 88.662089) (xy 176.304812 88.792782) (xy 176.199279 88.946909) - (xy 176.125693 89.118599) (xy 176.086856 89.301312) (xy 176.084248 89.488089) (xy 176.117968 89.671815) (xy 176.186732 89.845493) - (xy 176.28792 90.002506) (xy 176.417679 90.136875) (xy 176.571065 90.243482) (xy 176.742237 90.318265) (xy 176.924674 90.358376) - (xy 177.111428 90.362288) (xy 177.295386 90.329852) (xy 177.469539 90.262302) (xy 177.627255 90.162212) (xy 177.762527 90.033395) - (xy 177.870201 89.880756) (xy 177.946178 89.710111) (xy 177.957691 89.659434) (xy 178.012237 89.683265) (xy 178.194674 89.723376) - (xy 178.381428 89.727288) (xy 178.565386 89.694852) (xy 178.739539 89.627302) (xy 178.897255 89.527212) (xy 179.032527 89.398395) - (xy 179.140201 89.245756) (xy 179.216178 89.075111) (xy 179.257562 88.892958) (xy 179.260541 88.679603) (xy 179.224259 88.496365) - (xy 179.153969 88.325831) (xy 179.216178 88.186111) (xy 179.257562 88.003958) (xy 179.260541 87.790603) (xy 179.224259 87.607365) - (xy 179.207623 87.567005) (xy 179.280219 87.568526) (xy 179.488704 87.531765) (xy 179.686077 87.455208) (xy 179.864822 87.341773) - (xy 180.01813 87.19578) (xy 180.140161 87.02279) (xy 180.226268 86.829392) (xy 180.27317 86.622952) (xy 180.276546 86.38115) - (xy 180.276546 90.022128) (xy 180.072384 89.980219) (xy 179.860689 89.978741) (xy 179.652738 90.01841) (xy 179.456452 90.097715) - (xy 179.279308 90.213634) (xy 179.128054 90.361753) (xy 179.00845 90.536431) (xy 178.925052 90.731012) (xy 178.881037 90.938087) - (xy 178.878081 91.149767) (xy 178.916297 91.35799) (xy 178.99423 91.554825) (xy 178.998182 91.560958) (xy 178.971812 91.586782) - (xy 178.866279 91.740909) (xy 178.792693 91.912599) (xy 178.753856 92.095312) (xy 178.751248 92.282089) (xy 178.784968 92.465815) - (xy 178.853732 92.639493) (xy 178.95492 92.796506) (xy 178.959776 92.801535) (xy 178.926768 92.807832) (xy 178.753575 92.877807) - (xy 178.597272 92.980089) (xy 178.463812 93.110782) (xy 178.358279 93.264909) (xy 178.284693 93.436599) (xy 178.245856 93.619312) - (xy 178.243248 93.806089) (xy 178.276968 93.989815) (xy 178.345732 94.163493) (xy 178.44692 94.320506) (xy 178.576679 94.454875) - (xy 178.730065 94.561482) (xy 178.901237 94.636265) (xy 179.083674 94.676376) (xy 179.270428 94.680288) (xy 179.454386 94.647852) - (xy 179.628539 94.580302) (xy 179.786255 94.480212) (xy 179.921527 94.351395) (xy 180.029201 94.198756) (xy 180.105178 94.028111) - (xy 180.146562 93.845958) (xy 180.149541 93.632603) (xy 180.113259 93.449365) (xy 180.042077 93.276665) (xy 179.942838 93.127298) - (xy 179.962386 93.123852) (xy 180.136539 93.056302) (xy 180.294255 92.956212) (xy 180.429527 92.827395) (xy 180.537201 92.674756) - (xy 180.613178 92.504111) (xy 180.654562 92.321958) (xy 180.657541 92.108603) (xy 180.621259 91.925365) (xy 180.618625 91.918974) - (xy 180.626822 91.913773) (xy 180.78013 91.76778) (xy 180.902161 91.59479) (xy 180.988268 91.401392) (xy 181.03517 91.194952) - (xy 181.038546 90.95315) (xy 181.038546 102.108) (xy 180.469708 102.108) (xy 180.396428 102.034207) (xy 180.220921 101.915825) - (xy 180.025761 101.833788) (xy 179.818384 101.791219) (xy 179.606689 101.789741) (xy 179.398738 101.82941) (xy 179.202452 101.908715) - (xy 179.025308 102.024634) (xy 178.874054 102.172753) (xy 178.75445 102.347431) (xy 178.671052 102.542012) (xy 178.627037 102.749087) - (xy 178.624081 102.960767) (xy 178.662297 103.16899) (xy 178.74023 103.365825) (xy 178.85491 103.543773) (xy 179.001969 103.696058) - (xy 179.175807 103.816879) (xy 179.369802 103.901633) (xy 179.576564 103.947093) (xy 179.788219 103.951526) (xy 179.996704 103.914765) - (xy 180.194077 103.838208) (xy 180.372822 103.724773) (xy 180.470243 103.632) (xy 180.736952 103.632) (xy 180.697693 103.723599) - (xy 180.658856 103.906312) (xy 180.656248 104.093089) (xy 180.689968 104.276815) (xy 180.758732 104.450493) (xy 180.7638 104.458357) - (xy 180.697693 104.612599) (xy 180.658856 104.795312) (xy 180.656248 104.982089) (xy 180.689968 105.165815) (xy 180.758732 105.339493) - (xy 180.85992 105.496506) (xy 180.989679 105.630875) (xy 181.143065 105.737482) (xy 181.314237 105.812265) (xy 181.496674 105.852376) - (xy 181.683428 105.856288) (xy 181.867386 105.823852) (xy 182.041539 105.756302) (xy 182.199255 105.656212) (xy 182.334527 105.527395) - (xy 182.442201 105.374756) (xy 182.518178 105.204111) (xy 182.559562 105.021958) (xy 182.562541 104.808603) (xy 182.526259 104.625365) - (xy 182.455969 104.454831) (xy 182.518178 104.315111) (xy 182.559562 104.132958) (xy 182.562541 103.919603) (xy 182.526259 103.736365) - (xy 182.483242 103.632) (xy 183.95442 103.632) (xy 184.024533 103.625125) (xy 184.09459 103.618996) (xy 184.098432 103.617879) - (xy 184.102427 103.617488) (xy 184.169879 103.597122) (xy 184.237402 103.577506) (xy 184.240957 103.575662) (xy 184.244796 103.574504) - (xy 184.306973 103.541443) (xy 184.369434 103.509067) (xy 184.372564 103.506568) (xy 184.376104 103.504686) (xy 184.43065 103.460199) - (xy 184.48566 103.416286) (xy 184.491234 103.410787) (xy 184.491351 103.410693) (xy 184.49144 103.410585) (xy 184.493235 103.408815) - (xy 190.222452 97.679597) (xy 190.36704 97.829322) (xy 190.561329 97.964357) (xy 190.778147 98.059082) (xy 191.009234 98.10989) - (xy 191.245789 98.114845) (xy 191.478802 98.073759) (xy 191.699396 97.988196) (xy 191.89917 97.861415) (xy 192.070514 97.698247) - (xy 192.206902 97.504904) (xy 192.303138 97.288753) (xy 192.355558 97.058026) (xy 192.359332 96.787777) (xy 192.313375 96.555676) - (xy 192.223211 96.336922) (xy 192.092275 96.139847) (xy 191.927814 95.974235) (xy 197.037839 90.86421) (xy 197.051215 90.870054) - (xy 197.318789 90.928884) (xy 197.592695 90.934622) (xy 197.862499 90.887048) (xy 198.117923 90.787975) (xy 198.34924 90.641177) - (xy 198.547639 90.452245) (xy 198.705561 90.228375) (xy 198.753934 90.119726) (xy 198.776474 90.176655) (xy 198.924883 90.406942) - (xy 199.115196 90.604016) (xy 199.340163 90.760372) (xy 199.591215 90.870054) (xy 199.858789 90.928884) (xy 200.132695 90.934622) - (xy 200.402499 90.887048) (xy 200.657923 90.787975) (xy 200.88924 90.641177) (xy 201.087639 90.452245) (xy 201.245561 90.228375) - (xy 201.356993 89.978095) (xy 201.41769 89.710938) (xy 201.422059 89.398017) (xy 201.422059 145.923) (xy 200.850552 145.923) - (xy 200.850552 97.417697) (xy 200.804595 97.185596) (xy 200.714431 96.966842) (xy 200.583495 96.769767) (xy 200.416773 96.601878) - (xy 200.377436 96.575345) (xy 200.419268 96.481392) (xy 200.46617 96.274952) (xy 200.469546 96.03315) (xy 200.428426 95.825481) - (xy 200.347754 95.629753) (xy 200.2306 95.453423) (xy 200.081428 95.303207) (xy 199.905921 95.184825) (xy 199.710761 95.102788) - (xy 199.503384 95.060219) (xy 199.291689 95.058741) (xy 199.083738 95.09841) (xy 198.887452 95.177715) (xy 198.710308 95.293634) - (xy 198.559054 95.441753) (xy 198.43945 95.616431) (xy 198.356052 95.811012) (xy 198.312037 96.018087) (xy 198.309081 96.229767) - (xy 198.347297 96.43799) (xy 198.42523 96.634825) (xy 198.53991 96.812773) (xy 198.620076 96.895788) (xy 198.58162 96.951952) - (xy 198.488411 97.169425) (xy 198.439217 97.400862) (xy 198.435914 97.637446) (xy 198.478626 97.870166) (xy 198.565727 98.090157) - (xy 198.693899 98.289041) (xy 198.85826 98.459242) (xy 199.052549 98.594277) (xy 199.269367 98.689002) (xy 199.500454 98.73981) - (xy 199.737009 98.744765) (xy 199.970022 98.703679) (xy 200.190616 98.618116) (xy 200.39039 98.491335) (xy 200.561734 98.328167) - (xy 200.698122 98.134824) (xy 200.794358 97.918673) (xy 200.846778 97.687946) (xy 200.850552 97.417697) (xy 200.850552 145.923) - (xy 200.380652 145.923) (xy 200.380652 124.153737) (xy 200.334695 123.921636) (xy 200.244531 123.702882) (xy 200.113595 123.505807) - (xy 199.946873 123.337918) (xy 199.750717 123.205609) (xy 199.532598 123.11392) (xy 199.300824 123.066343) (xy 199.064223 123.064691) - (xy 198.831807 123.109027) (xy 198.612429 123.197662) (xy 198.414444 123.327219) (xy 198.245395 123.492764) (xy 198.183546 123.583092) - (xy 198.183546 98.57315) (xy 198.142426 98.365481) (xy 198.061754 98.169753) (xy 197.9446 97.993423) (xy 197.795428 97.843207) - (xy 197.619921 97.724825) (xy 197.424761 97.642788) (xy 197.217384 97.600219) (xy 197.005689 97.598741) (xy 196.797738 97.63841) - (xy 196.601452 97.717715) (xy 196.424308 97.833634) (xy 196.273054 97.981753) (xy 196.15345 98.156431) (xy 196.070052 98.351012) - (xy 196.026037 98.558087) (xy 196.023081 98.769767) (xy 196.061297 98.97799) (xy 196.13923 99.174825) (xy 196.25391 99.352773) - (xy 196.400969 99.505058) (xy 196.574807 99.625879) (xy 196.768802 99.710633) (xy 196.975564 99.756093) (xy 197.187219 99.760526) - (xy 197.395704 99.723765) (xy 197.593077 99.647208) (xy 197.771822 99.533773) (xy 197.92513 99.38778) (xy 198.047161 99.21479) - (xy 198.133268 99.021392) (xy 198.18017 98.814952) (xy 198.183546 98.57315) (xy 198.183546 123.583092) (xy 198.11172 123.687992) - (xy 198.018511 123.905465) (xy 197.969317 124.136902) (xy 197.966014 124.373486) (xy 198.008726 124.606206) (xy 198.095827 124.826197) - (xy 198.223999 125.025081) (xy 198.38836 125.195282) (xy 198.582649 125.330317) (xy 198.799467 125.425042) (xy 199.030554 125.47585) - (xy 199.267109 125.480805) (xy 199.500122 125.439719) (xy 199.720716 125.354156) (xy 199.92049 125.227375) (xy 200.091834 125.064207) - (xy 200.228222 124.870864) (xy 200.324458 124.654713) (xy 200.376878 124.423986) (xy 200.380652 124.153737) (xy 200.380652 145.923) - (xy 195.884852 145.923) (xy 195.884852 99.134737) (xy 195.838895 98.902636) (xy 195.748731 98.683882) (xy 195.617795 98.486807) - (xy 195.451073 98.318918) (xy 195.254917 98.186609) (xy 195.036798 98.09492) (xy 194.805024 98.047343) (xy 194.568423 98.045691) - (xy 194.336007 98.090027) (xy 194.116629 98.178662) (xy 193.918644 98.308219) (xy 193.749595 98.473764) (xy 193.61592 98.668992) - (xy 193.522711 98.886465) (xy 193.473517 99.117902) (xy 193.470214 99.354486) (xy 193.512926 99.587206) (xy 193.600027 99.807197) - (xy 193.728199 100.006081) (xy 193.89256 100.176282) (xy 194.086849 100.311317) (xy 194.303667 100.406042) (xy 194.534754 100.45685) - (xy 194.771309 100.461805) (xy 195.004322 100.420719) (xy 195.224916 100.335156) (xy 195.42469 100.208375) (xy 195.596034 100.045207) - (xy 195.732422 99.851864) (xy 195.828658 99.635713) (xy 195.881078 99.404986) (xy 195.884852 99.134737) (xy 195.884852 145.923) - (xy 194.373546 145.923) (xy 194.373546 105.30415) (xy 194.332426 105.096481) (xy 194.251754 104.900753) (xy 194.1346 104.724423) - (xy 193.985428 104.574207) (xy 193.809921 104.455825) (xy 193.614761 104.373788) (xy 193.407384 104.331219) (xy 193.195689 104.329741) - (xy 192.987738 104.36941) (xy 192.791452 104.448715) (xy 192.614308 104.564634) (xy 192.463054 104.712753) (xy 192.34345 104.887431) - (xy 192.260052 105.082012) (xy 192.216037 105.289087) (xy 192.213081 105.500767) (xy 192.251297 105.70899) (xy 192.32923 105.905825) - (xy 192.44391 106.083773) (xy 192.590969 106.236058) (xy 192.764807 106.356879) (xy 192.958802 106.441633) (xy 193.165564 106.487093) - (xy 193.377219 106.491526) (xy 193.585704 106.454765) (xy 193.783077 106.378208) (xy 193.961822 106.264773) (xy 194.11513 106.11878) - (xy 194.237161 105.94579) (xy 194.323268 105.752392) (xy 194.37017 105.545952) (xy 194.373546 105.30415) (xy 194.373546 145.923) - (xy 194.205906 145.923) (xy 194.205906 108.34961) (xy 194.164786 108.141941) (xy 194.084114 107.946213) (xy 193.96696 107.769883) - (xy 193.817788 107.619667) (xy 193.642281 107.501285) (xy 193.447121 107.419248) (xy 193.239744 107.376679) (xy 193.162771 107.376141) - (xy 189.596095 103.809465) (xy 189.54168 103.764767) (xy 189.487785 103.719544) (xy 189.484277 103.717615) (xy 189.481177 103.715069) - (xy 189.419111 103.68179) (xy 189.357464 103.647899) (xy 189.353643 103.646687) (xy 189.350113 103.644794) (xy 189.282815 103.624219) - (xy 189.215709 103.602932) (xy 189.211725 103.602485) (xy 189.207895 103.601314) (xy 189.137907 103.594204) (xy 189.067919 103.586354) - (xy 189.060082 103.586299) (xy 189.05994 103.586285) (xy 189.059806 103.586297) (xy 189.05728 103.58628) (xy 187.9346 103.58628) - (xy 187.864486 103.593154) (xy 187.79443 103.599284) (xy 187.790587 103.6004) (xy 187.786593 103.600792) (xy 187.71914 103.621157) - (xy 187.651618 103.640774) (xy 187.648062 103.642617) (xy 187.644224 103.643776) (xy 187.582046 103.676836) (xy 187.519586 103.709213) - (xy 187.516455 103.711711) (xy 187.512916 103.713594) (xy 187.458369 103.75808) (xy 187.40336 103.801994) (xy 187.397785 103.807492) - (xy 187.397669 103.807587) (xy 187.397579 103.807694) (xy 187.395785 103.809465) (xy 185.01547 106.18978) (xy 179.485984 106.18978) - (xy 179.482429 106.188652) (xy 179.479773 106.188354) (xy 179.477221 106.187564) (xy 179.405947 106.180072) (xy 179.334639 106.172074) - (xy 179.329503 106.172038) (xy 179.32932 106.172019) (xy 179.329136 106.172035) (xy 179.324 106.172) (xy 179.009534 106.172) - (xy 179.083268 106.006392) (xy 179.13017 105.799952) (xy 179.133546 105.55815) (xy 179.092426 105.350481) (xy 179.011754 105.154753) - (xy 178.8946 104.978423) (xy 178.745428 104.828207) (xy 178.569921 104.709825) (xy 178.374761 104.627788) (xy 178.167384 104.585219) - (xy 177.955689 104.583741) (xy 177.747738 104.62341) (xy 177.551452 104.702715) (xy 177.486876 104.744972) (xy 177.486876 102.795467) - (xy 177.482557 102.767611) (xy 177.482557 97.659244) (xy 177.482557 92.198244) (xy 177.431762 91.941711) (xy 177.332107 91.699931) - (xy 177.187388 91.482111) (xy 177.003118 91.296549) (xy 176.786314 91.150313) (xy 176.545235 91.048973) (xy 176.289063 90.996388) - (xy 176.027557 90.994563) (xy 175.831546 91.031953) (xy 175.831546 89.30215) (xy 175.790426 89.094481) (xy 175.709754 88.898753) - (xy 175.5926 88.722423) (xy 175.443428 88.572207) (xy 175.267921 88.453825) (xy 175.072761 88.371788) (xy 174.865384 88.329219) - (xy 174.653689 88.327741) (xy 174.445738 88.36741) (xy 174.249452 88.446715) (xy 174.072308 88.562634) (xy 173.921054 88.710753) - (xy 173.80145 88.885431) (xy 173.718052 89.080012) (xy 173.674037 89.287087) (xy 173.671081 89.498767) (xy 173.709297 89.70699) - (xy 173.78723 89.903825) (xy 173.90191 90.081773) (xy 174.048969 90.234058) (xy 174.222807 90.354879) (xy 174.416802 90.439633) - (xy 174.623564 90.485093) (xy 174.835219 90.489526) (xy 175.043704 90.452765) (xy 175.241077 90.376208) (xy 175.419822 90.262773) - (xy 175.57313 90.11678) (xy 175.695161 89.94379) (xy 175.781268 89.750392) (xy 175.82817 89.543952) (xy 175.831546 89.30215) - (xy 175.831546 91.031953) (xy 175.770676 91.043565) (xy 175.528206 91.14153) (xy 175.309381 91.284725) (xy 175.122537 91.467695) - (xy 174.974791 91.683473) (xy 174.87177 91.923839) (xy 174.817399 92.179637) (xy 174.813747 92.441124) (xy 174.860955 92.698341) - (xy 174.957225 92.941489) (xy 175.098888 93.161308) (xy 175.28055 93.349425) (xy 175.495291 93.498674) (xy 175.734932 93.60337) - (xy 175.990344 93.659526) (xy 176.2518 93.665003) (xy 176.50934 93.619592) (xy 176.753154 93.525022) (xy 176.973957 93.384897) - (xy 177.163337 93.204552) (xy 177.314081 92.990858) (xy 177.420448 92.751955) (xy 177.478386 92.496941) (xy 177.482557 92.198244) - (xy 177.482557 97.659244) (xy 177.431762 97.402711) (xy 177.332107 97.160931) (xy 177.187388 96.943111) (xy 177.003118 96.757549) - (xy 176.786314 96.611313) (xy 176.545235 96.509973) (xy 176.289063 96.457388) (xy 176.027557 96.455563) (xy 175.770676 96.504565) - (xy 175.528206 96.60253) (xy 175.309381 96.745725) (xy 175.122537 96.928695) (xy 174.974791 97.144473) (xy 174.87177 97.384839) - (xy 174.817399 97.640637) (xy 174.813747 97.902124) (xy 174.860955 98.159341) (xy 174.957225 98.402489) (xy 175.098888 98.622308) - (xy 175.28055 98.810425) (xy 175.495291 98.959674) (xy 175.734932 99.06437) (xy 175.990344 99.120526) (xy 176.2518 99.126003) - (xy 176.50934 99.080592) (xy 176.753154 98.986022) (xy 176.973957 98.845897) (xy 177.163337 98.665552) (xy 177.314081 98.451858) - (xy 177.420448 98.212955) (xy 177.478386 97.957941) (xy 177.482557 97.659244) (xy 177.482557 102.767611) (xy 177.446629 102.535893) - (xy 177.356514 102.289158) (xy 177.302812 102.188686) (xy 177.069197 102.129408) (xy 176.889592 102.309013) (xy 176.889592 101.949803) - (xy 176.830314 101.716188) (xy 176.592125 101.605441) (xy 176.336907 101.543289) (xy 176.074467 101.532124) (xy 175.814893 101.572371) - (xy 175.568158 101.662486) (xy 175.467686 101.716188) (xy 175.408408 101.949803) (xy 176.149 102.690395) (xy 176.889592 101.949803) - (xy 176.889592 102.309013) (xy 176.328605 102.87) (xy 177.069197 103.610592) (xy 177.302812 103.551314) (xy 177.413559 103.313125) - (xy 177.475711 103.057907) (xy 177.486876 102.795467) (xy 177.486876 104.744972) (xy 177.374308 104.818634) (xy 177.223054 104.966753) - (xy 177.10345 105.141431) (xy 177.020052 105.336012) (xy 176.976037 105.543087) (xy 176.975123 105.608481) (xy 176.957184 105.598619) - (xy 176.953363 105.597407) (xy 176.949833 105.595514) (xy 176.889592 105.577096) (xy 176.889592 103.790197) (xy 176.149 103.049605) - (xy 175.969395 103.22921) (xy 175.969395 102.87) (xy 175.228803 102.129408) (xy 174.995188 102.188686) (xy 174.884441 102.426875) - (xy 174.822289 102.682093) (xy 174.811124 102.944533) (xy 174.851371 103.204107) (xy 174.941486 103.450842) (xy 174.995188 103.551314) - (xy 175.228803 103.610592) (xy 175.969395 102.87) (xy 175.969395 103.22921) (xy 175.408408 103.790197) (xy 175.467686 104.023812) - (xy 175.705875 104.134559) (xy 175.961093 104.196711) (xy 176.223533 104.207876) (xy 176.483107 104.167629) (xy 176.729842 104.077514) - (xy 176.830314 104.023812) (xy 176.889592 103.790197) (xy 176.889592 105.577096) (xy 176.882535 105.574939) (xy 176.815429 105.553652) - (xy 176.811445 105.553205) (xy 176.807615 105.552034) (xy 176.737627 105.544924) (xy 176.667639 105.537074) (xy 176.659802 105.537019) - (xy 176.65966 105.537005) (xy 176.659526 105.537017) (xy 176.657 105.537) (xy 175.583267 105.537) (xy 175.582754 105.535753) - (xy 175.4656 105.359423) (xy 175.316428 105.209207) (xy 175.140921 105.090825) (xy 174.945761 105.008788) (xy 174.738384 104.966219) - (xy 174.526689 104.964741) (xy 174.318738 105.00441) (xy 174.122452 105.083715) (xy 173.945308 105.199634) (xy 173.794054 105.347753) - (xy 173.67445 105.522431) (xy 173.591052 105.717012) (xy 173.547037 105.924087) (xy 173.545546 106.030857) (xy 173.545546 92.85815) - (xy 173.504426 92.650481) (xy 173.482059 92.596213) (xy 173.482059 82.032017) (xy 173.428846 81.763269) (xy 173.324446 81.509975) - (xy 173.172835 81.281783) (xy 172.97979 81.087385) (xy 172.752662 80.934185) (xy 172.671393 80.900022) (xy 172.717923 80.881975) - (xy 172.94924 80.735177) (xy 173.147639 80.546245) (xy 173.305561 80.322375) (xy 173.416993 80.072095) (xy 173.47769 79.804938) - (xy 173.482059 79.492017) (xy 173.428846 79.223269) (xy 173.324446 78.969975) (xy 173.172835 78.741783) (xy 172.97979 78.547385) - (xy 172.752662 78.394185) (xy 172.671393 78.360022) (xy 172.717923 78.341975) (xy 172.94924 78.195177) (xy 173.147639 78.006245) - (xy 173.305561 77.782375) (xy 173.416993 77.532095) (xy 173.47769 77.264938) (xy 173.482059 76.952017) (xy 173.428846 76.683269) - (xy 173.324446 76.429975) (xy 173.172835 76.201783) (xy 172.97979 76.007385) (xy 172.752662 75.854185) (xy 172.671393 75.820022) - (xy 172.717923 75.801975) (xy 172.94924 75.655177) (xy 173.147639 75.466245) (xy 173.305561 75.242375) (xy 173.416993 74.992095) - (xy 173.47769 74.724938) (xy 173.482059 74.412017) (xy 173.428846 74.143269) (xy 173.324446 73.889975) (xy 173.172835 73.661783) - (xy 172.97979 73.467385) (xy 172.752662 73.314185) (xy 172.500103 73.208019) (xy 172.231733 73.152931) (xy 171.957774 73.151018) - (xy 171.688661 73.202354) (xy 171.434644 73.304984) (xy 171.205399 73.454997) (xy 171.009658 73.646681) (xy 170.942 73.745493) - (xy 170.942 73.724458) (xy 170.917597 73.601777) (xy 170.86973 73.486215) (xy 170.800237 73.382211) (xy 170.711789 73.293763) - (xy 170.607785 73.22427) (xy 170.492223 73.176403) (xy 170.369542 73.152) (xy 170.244458 73.152) (xy 168.720458 73.152) - (xy 168.597777 73.176403) (xy 168.482215 73.22427) (xy 168.378211 73.293763) (xy 168.289763 73.382211) (xy 168.22027 73.486215) - (xy 168.172403 73.601777) (xy 168.148 73.724458) (xy 168.148 73.849542) (xy 168.148 75.373542) (xy 168.172403 75.496223) - (xy 168.22027 75.611785) (xy 168.289763 75.715789) (xy 168.378211 75.804237) (xy 168.482215 75.87373) (xy 168.597777 75.921597) - (xy 168.720458 75.946) (xy 168.740274 75.946) (xy 168.665399 75.994997) (xy 168.469658 76.186681) (xy 168.314877 76.412734) - (xy 168.20695 76.664546) (xy 168.149989 76.932524) (xy 168.146164 77.206464) (xy 168.19562 77.475928) (xy 168.296474 77.730655) - (xy 168.444883 77.960942) (xy 168.635196 78.158016) (xy 168.860163 78.314372) (xy 168.960699 78.358295) (xy 168.894644 78.384984) - (xy 168.665399 78.534997) (xy 168.469658 78.726681) (xy 168.314877 78.952734) (xy 168.20695 79.204546) (xy 168.149989 79.472524) - (xy 168.146164 79.746464) (xy 168.19562 80.015928) (xy 168.296474 80.270655) (xy 168.444883 80.500942) (xy 168.635196 80.698016) - (xy 168.860163 80.854372) (xy 168.960699 80.898295) (xy 168.894644 80.924984) (xy 168.665399 81.074997) (xy 168.469658 81.266681) - (xy 168.314877 81.492734) (xy 168.20695 81.744546) (xy 168.149989 82.012524) (xy 168.146164 82.286464) (xy 168.19562 82.555928) - (xy 168.296474 82.810655) (xy 168.444883 83.040942) (xy 168.635196 83.238016) (xy 168.860163 83.394372) (xy 169.111215 83.504054) - (xy 169.378789 83.562884) (xy 169.652695 83.568622) (xy 169.922499 83.521048) (xy 170.177923 83.421975) (xy 170.40924 83.275177) - (xy 170.607639 83.086245) (xy 170.765561 82.862375) (xy 170.813934 82.753726) (xy 170.836474 82.810655) (xy 170.984883 83.040942) - (xy 171.175196 83.238016) (xy 171.400163 83.394372) (xy 171.651215 83.504054) (xy 171.918789 83.562884) (xy 172.192695 83.568622) - (xy 172.462499 83.521048) (xy 172.717923 83.421975) (xy 172.94924 83.275177) (xy 173.147639 83.086245) (xy 173.305561 82.862375) - (xy 173.416993 82.612095) (xy 173.47769 82.344938) (xy 173.482059 82.032017) (xy 173.482059 92.596213) (xy 173.423754 92.454753) - (xy 173.3066 92.278423) (xy 173.157428 92.128207) (xy 172.981921 92.009825) (xy 172.786761 91.927788) (xy 172.579384 91.885219) - (xy 172.367689 91.883741) (xy 172.159738 91.92341) (xy 171.963452 92.002715) (xy 171.786308 92.118634) (xy 171.635054 92.266753) - (xy 171.51545 92.441431) (xy 171.432052 92.636012) (xy 171.388037 92.843087) (xy 171.385081 93.054767) (xy 171.423297 93.26299) - (xy 171.50123 93.459825) (xy 171.61591 93.637773) (xy 171.762969 93.790058) (xy 171.936807 93.910879) (xy 172.130802 93.995633) - (xy 172.337564 94.041093) (xy 172.549219 94.045526) (xy 172.757704 94.008765) (xy 172.955077 93.932208) (xy 173.133822 93.818773) - (xy 173.28713 93.67278) (xy 173.409161 93.49979) (xy 173.495268 93.306392) (xy 173.54217 93.099952) (xy 173.545546 92.85815) - (xy 173.545546 106.030857) (xy 173.544081 106.135767) (xy 173.582297 106.34399) (xy 173.66023 106.540825) (xy 173.77491 106.718773) - (xy 173.921969 106.871058) (xy 174.095807 106.991879) (xy 174.289802 107.076633) (xy 174.496564 107.122093) (xy 174.708219 107.126526) - (xy 174.916704 107.089765) (xy 174.990863 107.061) (xy 175.280507 107.061) (xy 175.122537 107.215695) (xy 174.974791 107.431473) - (xy 174.87177 107.671839) (xy 174.817399 107.927637) (xy 174.813747 108.189124) (xy 174.860955 108.446341) (xy 174.957225 108.689489) - (xy 175.098888 108.909308) (xy 175.28055 109.097425) (xy 175.495291 109.246674) (xy 175.734932 109.35137) (xy 175.990344 109.407526) - (xy 176.2518 109.413003) (xy 176.50934 109.367592) (xy 176.753154 109.273022) (xy 176.973957 109.132897) (xy 177.163337 108.952552) - (xy 177.314081 108.738858) (xy 177.420448 108.499955) (xy 177.478386 108.244941) (xy 177.482557 107.946244) (xy 177.433007 107.696) - (xy 179.162015 107.696) (xy 179.165571 107.697128) (xy 179.168226 107.697425) (xy 179.170779 107.698216) (xy 179.242052 107.705707) - (xy 179.313361 107.713706) (xy 179.318496 107.713741) (xy 179.31868 107.713761) (xy 179.318863 107.713744) (xy 179.324 107.71378) - (xy 180.668121 107.71378) (xy 180.689968 107.832815) (xy 180.758732 108.006493) (xy 180.7638 108.014357) (xy 180.697693 108.168599) - (xy 180.658856 108.351312) (xy 180.656248 108.538089) (xy 180.689968 108.721815) (xy 180.758732 108.895493) (xy 180.7638 108.903357) - (xy 180.697693 109.057599) (xy 180.658856 109.240312) (xy 180.656248 109.427089) (xy 180.689968 109.610815) (xy 180.758732 109.784493) - (xy 180.7638 109.792357) (xy 180.697693 109.946599) (xy 180.658856 110.129312) (xy 180.656248 110.316089) (xy 180.667573 110.377794) - (xy 180.622689 110.377481) (xy 180.414738 110.41715) (xy 180.218452 110.496455) (xy 180.041308 110.612374) (xy 179.890054 110.760493) - (xy 179.77045 110.935171) (xy 179.687052 111.129752) (xy 179.643037 111.336827) (xy 179.640081 111.548507) (xy 179.678297 111.75673) - (xy 179.75623 111.953565) (xy 179.87091 112.131513) (xy 180.017969 112.283798) (xy 180.191807 112.404619) (xy 180.385802 112.489373) - (xy 180.592564 112.534833) (xy 180.804219 112.539266) (xy 181.012704 112.502505) (xy 181.210077 112.425948) (xy 181.388822 112.312513) - (xy 181.54213 112.16652) (xy 181.664161 111.99353) (xy 181.750268 111.800132) (xy 181.79717 111.593692) (xy 181.800546 111.35189) - (xy 181.765676 111.175785) (xy 181.867386 111.157852) (xy 182.041539 111.090302) (xy 182.186983 110.998) (xy 183.8833 110.998) - (xy 183.953413 110.991125) (xy 184.02347 110.984996) (xy 184.027312 110.983879) (xy 184.031307 110.983488) (xy 184.098759 110.963122) - (xy 184.166282 110.943506) (xy 184.169837 110.941662) (xy 184.173676 110.940504) (xy 184.235853 110.907443) (xy 184.298314 110.875067) - (xy 184.301444 110.872568) (xy 184.304984 110.870686) (xy 184.35953 110.826199) (xy 184.41454 110.782286) (xy 184.420114 110.776787) - (xy 184.420231 110.776693) (xy 184.42032 110.776585) (xy 184.422115 110.774815) (xy 187.296047 107.900883) (xy 187.293101 108.111887) - (xy 187.331317 108.32011) (xy 187.40925 108.516945) (xy 187.52393 108.694893) (xy 187.670989 108.847178) (xy 187.844827 108.967999) - (xy 188.038822 109.052753) (xy 188.245584 109.098213) (xy 188.457239 109.102646) (xy 188.665724 109.065885) (xy 188.863097 108.989328) - (xy 189.041842 108.875893) (xy 189.19515 108.7299) (xy 189.317181 108.55691) (xy 189.403288 108.363512) (xy 189.45019 108.157072) - (xy 189.453566 107.91527) (xy 189.412446 107.707601) (xy 189.331774 107.511873) (xy 189.21462 107.335543) (xy 189.065448 107.185327) - (xy 188.889941 107.066945) (xy 188.694781 106.984908) (xy 188.487404 106.942339) (xy 188.275709 106.940861) (xy 188.25144 106.94549) - (xy 188.796092 106.400838) (xy 188.881419 106.402626) (xy 189.089904 106.365865) (xy 189.287277 106.289308) (xy 189.466022 106.175873) - (xy 189.61933 106.02988) (xy 189.636669 106.005299) (xy 192.047261 108.415891) (xy 192.045441 108.546227) (xy 192.083657 108.75445) - (xy 192.16159 108.951285) (xy 192.27627 109.129233) (xy 192.423329 109.281518) (xy 192.597167 109.402339) (xy 192.791162 109.487093) - (xy 192.997924 109.532553) (xy 193.209579 109.536986) (xy 193.418064 109.500225) (xy 193.615437 109.423668) (xy 193.794182 109.310233) - (xy 193.94749 109.16424) (xy 194.069521 108.99125) (xy 194.155628 108.797852) (xy 194.20253 108.591412) (xy 194.205906 108.34961) - (xy 194.205906 145.923) (xy 190.644832 145.923) (xy 190.644832 110.384397) (xy 190.598875 110.152296) (xy 190.508711 109.933542) - (xy 190.377775 109.736467) (xy 190.211053 109.568578) (xy 190.014897 109.436269) (xy 189.796778 109.34458) (xy 189.565004 109.297003) - (xy 189.328403 109.295351) (xy 189.095987 109.339687) (xy 188.876609 109.428322) (xy 188.678624 109.557879) (xy 188.509575 109.723424) - (xy 188.3759 109.918652) (xy 188.282691 110.136125) (xy 188.233497 110.367562) (xy 188.230194 110.604146) (xy 188.272906 110.836866) - (xy 188.360007 111.056857) (xy 188.488179 111.255741) (xy 188.65254 111.425942) (xy 188.846829 111.560977) (xy 189.063647 111.655702) - (xy 189.294734 111.70651) (xy 189.531289 111.711465) (xy 189.764302 111.670379) (xy 189.984896 111.584816) (xy 190.18467 111.458035) - (xy 190.356014 111.294867) (xy 190.492402 111.101524) (xy 190.588638 110.885373) (xy 190.641058 110.654646) (xy 190.644832 110.384397) - (xy 190.644832 145.923) (xy 190.362892 145.923) (xy 190.362892 116.391497) (xy 190.316935 116.159396) (xy 190.226771 115.940642) - (xy 190.095835 115.743567) (xy 189.929113 115.575678) (xy 189.732957 115.443369) (xy 189.514838 115.35168) (xy 189.283064 115.304103) - (xy 189.046463 115.302451) (xy 188.814047 115.346787) (xy 188.594669 115.435422) (xy 188.396684 115.564979) (xy 188.227635 115.730524) - (xy 188.09396 115.925752) (xy 188.000751 116.143225) (xy 187.951557 116.374662) (xy 187.948254 116.611246) (xy 187.990966 116.843966) - (xy 188.078067 117.063957) (xy 188.206239 117.262841) (xy 188.3706 117.433042) (xy 188.564889 117.568077) (xy 188.781707 117.662802) - (xy 189.012794 117.71361) (xy 189.249349 117.718565) (xy 189.482362 117.677479) (xy 189.702956 117.591916) (xy 189.90273 117.465135) - (xy 190.074074 117.301967) (xy 190.210462 117.108624) (xy 190.306698 116.892473) (xy 190.359118 116.661746) (xy 190.362892 116.391497) - (xy 190.362892 145.923) (xy 185.801059 145.923) (xy 185.801059 139.309017) (xy 185.801059 130.165017) (xy 185.747846 129.896269) - (xy 185.643446 129.642975) (xy 185.610546 129.593456) (xy 185.610546 118.76615) (xy 185.569426 118.558481) (xy 185.488754 118.362753) - (xy 185.3716 118.186423) (xy 185.222428 118.036207) (xy 185.046921 117.917825) (xy 184.851761 117.835788) (xy 184.644384 117.793219) - (xy 184.432689 117.791741) (xy 184.224738 117.83141) (xy 184.028452 117.910715) (xy 183.851308 118.026634) (xy 183.700054 118.174753) - (xy 183.58045 118.349431) (xy 183.497052 118.544012) (xy 183.453037 118.751087) (xy 183.450081 118.962767) (xy 183.488297 119.17099) - (xy 183.56623 119.367825) (xy 183.68091 119.545773) (xy 183.827969 119.698058) (xy 184.001807 119.818879) (xy 184.195802 119.903633) - (xy 184.402564 119.949093) (xy 184.614219 119.953526) (xy 184.822704 119.916765) (xy 185.020077 119.840208) (xy 185.198822 119.726773) - (xy 185.35213 119.58078) (xy 185.474161 119.40779) (xy 185.560268 119.214392) (xy 185.60717 119.007952) (xy 185.610546 118.76615) - (xy 185.610546 129.593456) (xy 185.491835 129.414783) (xy 185.29879 129.220385) (xy 185.071662 129.067185) (xy 184.819103 128.961019) - (xy 184.550733 128.905931) (xy 184.276774 128.904018) (xy 184.007661 128.955354) (xy 183.753644 129.057984) (xy 183.524399 129.207997) - (xy 183.328658 129.399681) (xy 183.261 129.498493) (xy 183.261 129.477458) (xy 183.236597 129.354777) (xy 183.18873 129.239215) - (xy 183.119237 129.135211) (xy 183.030789 129.046763) (xy 182.926785 128.97727) (xy 182.811223 128.929403) (xy 182.689546 128.905199) - (xy 182.689546 118.89315) (xy 182.648426 118.685481) (xy 182.567754 118.489753) (xy 182.4506 118.313423) (xy 182.301428 118.163207) - (xy 182.125921 118.044825) (xy 181.930761 117.962788) (xy 181.723384 117.920219) (xy 181.511689 117.918741) (xy 181.303738 117.95841) - (xy 181.107452 118.037715) (xy 180.930308 118.153634) (xy 180.779054 118.301753) (xy 180.65945 118.476431) (xy 180.576052 118.671012) - (xy 180.532037 118.878087) (xy 180.529081 119.089767) (xy 180.567297 119.29799) (xy 180.64523 119.494825) (xy 180.75991 119.672773) - (xy 180.906969 119.825058) (xy 181.080807 119.945879) (xy 181.274802 120.030633) (xy 181.481564 120.076093) (xy 181.693219 120.080526) - (xy 181.901704 120.043765) (xy 182.099077 119.967208) (xy 182.277822 119.853773) (xy 182.43113 119.70778) (xy 182.553161 119.53479) - (xy 182.639268 119.341392) (xy 182.68617 119.134952) (xy 182.689546 118.89315) (xy 182.689546 128.905199) (xy 182.688542 128.905) - (xy 182.14975 128.905) (xy 181.991 129.06375) (xy 181.991 130.175) (xy 182.011 130.175) (xy 182.011 130.429) - (xy 181.991 130.429) (xy 181.991 131.54025) (xy 182.14975 131.699) (xy 182.688542 131.699) (xy 182.811223 131.674597) - (xy 182.926785 131.62673) (xy 183.030789 131.557237) (xy 183.119237 131.468789) (xy 183.18873 131.364785) (xy 183.236597 131.249223) - (xy 183.261 131.126542) (xy 183.261 131.1074) (xy 183.303883 131.173942) (xy 183.494196 131.371016) (xy 183.719163 131.527372) - (xy 183.970215 131.637054) (xy 184.237789 131.695884) (xy 184.511695 131.701622) (xy 184.781499 131.654048) (xy 185.036923 131.554975) - (xy 185.26824 131.408177) (xy 185.466639 131.219245) (xy 185.624561 130.995375) (xy 185.735993 130.745095) (xy 185.79669 130.477938) - (xy 185.801059 130.165017) (xy 185.801059 139.309017) (xy 185.747846 139.040269) (xy 185.643446 138.786975) (xy 185.491835 138.558783) - (xy 185.29879 138.364385) (xy 185.207783 138.303) (xy 185.228542 138.303) (xy 185.351223 138.278597) (xy 185.466785 138.23073) - (xy 185.570789 138.161237) (xy 185.659237 138.072789) (xy 185.72873 137.968785) (xy 185.776597 137.853223) (xy 185.801 137.730542) - (xy 185.801 137.605458) (xy 185.801 136.081458) (xy 185.776597 135.958777) (xy 185.72873 135.843215) (xy 185.659237 135.739211) - (xy 185.570789 135.650763) (xy 185.466785 135.58127) (xy 185.351223 135.533403) (xy 185.228542 135.509) (xy 185.103458 135.509) - (xy 183.579458 135.509) (xy 183.456777 135.533403) (xy 183.341215 135.58127) (xy 183.237211 135.650763) (xy 183.148763 135.739211) - (xy 183.07927 135.843215) (xy 183.031403 135.958777) (xy 183.007 136.081458) (xy 183.007 136.101812) (xy 182.951835 136.018783) - (xy 182.75879 135.824385) (xy 182.531662 135.671185) (xy 182.279103 135.565019) (xy 182.010733 135.509931) (xy 181.737 135.508019) - (xy 181.737 131.54025) (xy 181.737 130.429) (xy 181.737 130.175) (xy 181.737 129.06375) (xy 181.57825 128.905) - (xy 181.039458 128.905) (xy 180.916777 128.929403) (xy 180.801215 128.97727) (xy 180.697211 129.046763) (xy 180.608763 129.135211) - (xy 180.53927 129.239215) (xy 180.491403 129.354777) (xy 180.467 129.477458) (xy 180.467 129.602542) (xy 180.467 130.01625) - (xy 180.62575 130.175) (xy 181.737 130.175) (xy 181.737 130.429) (xy 180.62575 130.429) (xy 180.467 130.58775) - (xy 180.467 131.001458) (xy 180.467 131.126542) (xy 180.491403 131.249223) (xy 180.53927 131.364785) (xy 180.608763 131.468789) - (xy 180.697211 131.557237) (xy 180.801215 131.62673) (xy 180.916777 131.674597) (xy 181.039458 131.699) (xy 181.57825 131.699) - (xy 181.737 131.54025) (xy 181.737 135.508019) (xy 181.736774 135.508018) (xy 181.467661 135.559354) (xy 181.213644 135.661984) - (xy 180.984399 135.811997) (xy 180.788658 136.003681) (xy 180.633877 136.229734) (xy 180.59435 136.321955) (xy 180.563446 136.246975) - (xy 180.411835 136.018783) (xy 180.21879 135.824385) (xy 179.991662 135.671185) (xy 179.739103 135.565019) (xy 179.470733 135.509931) - (xy 179.196774 135.508018) (xy 179.133546 135.520079) (xy 179.133546 110.25715) (xy 179.092426 110.049481) (xy 179.011754 109.853753) - (xy 178.8946 109.677423) (xy 178.745428 109.527207) (xy 178.569921 109.408825) (xy 178.374761 109.326788) (xy 178.167384 109.284219) - (xy 177.955689 109.282741) (xy 177.747738 109.32241) (xy 177.551452 109.401715) (xy 177.374308 109.517634) (xy 177.223054 109.665753) - (xy 177.10345 109.840431) (xy 177.020052 110.035012) (xy 176.976037 110.242087) (xy 176.973081 110.453767) (xy 177.011297 110.66199) - (xy 177.08923 110.858825) (xy 177.20391 111.036773) (xy 177.350969 111.189058) (xy 177.524807 111.309879) (xy 177.718802 111.394633) - (xy 177.925564 111.440093) (xy 178.137219 111.444526) (xy 178.345704 111.407765) (xy 178.543077 111.331208) (xy 178.721822 111.217773) - (xy 178.87513 111.07178) (xy 178.997161 110.89879) (xy 179.083268 110.705392) (xy 179.13017 110.498952) (xy 179.133546 110.25715) - (xy 179.133546 135.520079) (xy 178.927661 135.559354) (xy 178.816 135.604468) (xy 178.816 133.604) (xy 178.80913 133.533936) - (xy 178.802997 133.46383) (xy 178.801879 133.459982) (xy 178.801488 133.455993) (xy 178.781135 133.388581) (xy 178.761506 133.321018) - (xy 178.759662 133.317462) (xy 178.758504 133.313624) (xy 178.725443 133.251446) (xy 178.693067 133.188986) (xy 178.690568 133.185855) - (xy 178.688686 133.182316) (xy 178.644199 133.127769) (xy 178.600286 133.07276) (xy 178.594787 133.067185) (xy 178.594693 133.067069) - (xy 178.594585 133.066979) (xy 178.592815 133.065185) (xy 177.609557 132.081927) (xy 177.609557 124.710244) (xy 177.609557 119.630244) - (xy 177.558762 119.373711) (xy 177.482557 119.188824) (xy 177.482557 113.026244) (xy 177.431762 112.769711) (xy 177.332107 112.527931) - (xy 177.187388 112.310111) (xy 177.003118 112.124549) (xy 176.786314 111.978313) (xy 176.545235 111.876973) (xy 176.289063 111.824388) - (xy 176.027557 111.822563) (xy 175.770676 111.871565) (xy 175.528206 111.96953) (xy 175.309381 112.112725) (xy 175.122537 112.295695) - (xy 174.974791 112.511473) (xy 174.87177 112.751839) (xy 174.817399 113.007637) (xy 174.813747 113.269124) (xy 174.860955 113.526341) - (xy 174.957225 113.769489) (xy 175.098888 113.989308) (xy 175.28055 114.177425) (xy 175.495291 114.326674) (xy 175.734932 114.43137) - (xy 175.990344 114.487526) (xy 176.2518 114.493003) (xy 176.50934 114.447592) (xy 176.753154 114.353022) (xy 176.973957 114.212897) - (xy 177.163337 114.032552) (xy 177.314081 113.818858) (xy 177.420448 113.579955) (xy 177.478386 113.324941) (xy 177.482557 113.026244) - (xy 177.482557 119.188824) (xy 177.459107 119.131931) (xy 177.314388 118.914111) (xy 177.130118 118.728549) (xy 176.913314 118.582313) - (xy 176.672235 118.480973) (xy 176.416063 118.428388) (xy 176.154557 118.426563) (xy 175.897676 118.475565) (xy 175.655206 118.57353) - (xy 175.436381 118.716725) (xy 175.249537 118.899695) (xy 175.101791 119.115473) (xy 174.99877 119.355839) (xy 174.944399 119.611637) - (xy 174.940747 119.873124) (xy 174.987955 120.130341) (xy 175.084225 120.373489) (xy 175.225888 120.593308) (xy 175.40755 120.781425) - (xy 175.622291 120.930674) (xy 175.861932 121.03537) (xy 176.117344 121.091526) (xy 176.3788 121.097003) (xy 176.63634 121.051592) - (xy 176.880154 120.957022) (xy 177.100957 120.816897) (xy 177.290337 120.636552) (xy 177.441081 120.422858) (xy 177.547448 120.183955) - (xy 177.605386 119.928941) (xy 177.609557 119.630244) (xy 177.609557 124.710244) (xy 177.558762 124.453711) (xy 177.459107 124.211931) - (xy 177.314388 123.994111) (xy 177.130118 123.808549) (xy 176.913314 123.662313) (xy 176.672235 123.560973) (xy 176.416063 123.508388) - (xy 176.154557 123.506563) (xy 175.897676 123.555565) (xy 175.655206 123.65353) (xy 175.436381 123.796725) (xy 175.249537 123.979695) - (xy 175.101791 124.195473) (xy 174.99877 124.435839) (xy 174.944399 124.691637) (xy 174.940747 124.953124) (xy 174.987955 125.210341) - (xy 175.084225 125.453489) (xy 175.225888 125.673308) (xy 175.40755 125.861425) (xy 175.622291 126.010674) (xy 175.861932 126.11537) - (xy 176.117344 126.171526) (xy 176.3788 126.177003) (xy 176.63634 126.131592) (xy 176.880154 126.037022) (xy 177.100957 125.896897) - (xy 177.290337 125.716552) (xy 177.441081 125.502858) (xy 177.547448 125.263955) (xy 177.605386 125.008941) (xy 177.609557 124.710244) - (xy 177.609557 132.081927) (xy 171.577 126.04937) (xy 171.577 124.46) (xy 171.570125 124.38989) (xy 171.563996 124.319829) - (xy 171.562879 124.315985) (xy 171.562488 124.311993) (xy 171.542126 124.244552) (xy 171.522506 124.177018) (xy 171.520662 124.173462) - (xy 171.519504 124.169624) (xy 171.486443 124.107446) (xy 171.454067 124.044986) (xy 171.451568 124.041855) (xy 171.449686 124.038316) - (xy 171.405199 123.983769) (xy 171.361286 123.92876) (xy 171.355787 123.923185) (xy 171.355693 123.923069) (xy 171.355585 123.922979) - (xy 171.353815 123.921185) (xy 170.210815 122.778185) (xy 170.1564 122.733487) (xy 170.102505 122.688264) (xy 170.098997 122.686335) - (xy 170.095897 122.683789) (xy 170.033831 122.65051) (xy 169.989557 122.626169) (xy 169.989557 119.630244) (xy 169.938762 119.373711) - (xy 169.866876 119.199303) (xy 169.866876 102.795467) (xy 169.862557 102.767611) (xy 169.862557 97.659244) (xy 169.862557 92.198244) - (xy 169.862557 87.118244) (xy 169.811762 86.861711) (xy 169.712107 86.619931) (xy 169.567388 86.402111) (xy 169.383118 86.216549) - (xy 169.166314 86.070313) (xy 168.925235 85.968973) (xy 168.669063 85.916388) (xy 168.407557 85.914563) (xy 168.150676 85.963565) - (xy 167.908206 86.06153) (xy 167.689381 86.204725) (xy 167.502537 86.387695) (xy 167.354791 86.603473) (xy 167.25177 86.843839) - (xy 167.197399 87.099637) (xy 167.193747 87.361124) (xy 167.240955 87.618341) (xy 167.337225 87.861489) (xy 167.478888 88.081308) - (xy 167.66055 88.269425) (xy 167.875291 88.418674) (xy 168.114932 88.52337) (xy 168.370344 88.579526) (xy 168.6318 88.585003) - (xy 168.88934 88.539592) (xy 169.133154 88.445022) (xy 169.353957 88.304897) (xy 169.543337 88.124552) (xy 169.694081 87.910858) - (xy 169.800448 87.671955) (xy 169.858386 87.416941) (xy 169.862557 87.118244) (xy 169.862557 92.198244) (xy 169.811762 91.941711) - (xy 169.712107 91.699931) (xy 169.567388 91.482111) (xy 169.383118 91.296549) (xy 169.166314 91.150313) (xy 168.925235 91.048973) - (xy 168.669063 90.996388) (xy 168.407557 90.994563) (xy 168.150676 91.043565) (xy 167.908206 91.14153) (xy 167.689381 91.284725) - (xy 167.502537 91.467695) (xy 167.354791 91.683473) (xy 167.25177 91.923839) (xy 167.197399 92.179637) (xy 167.193747 92.441124) - (xy 167.240955 92.698341) (xy 167.337225 92.941489) (xy 167.478888 93.161308) (xy 167.66055 93.349425) (xy 167.875291 93.498674) - (xy 168.114932 93.60337) (xy 168.370344 93.659526) (xy 168.6318 93.665003) (xy 168.88934 93.619592) (xy 169.133154 93.525022) - (xy 169.353957 93.384897) (xy 169.543337 93.204552) (xy 169.694081 92.990858) (xy 169.800448 92.751955) (xy 169.858386 92.496941) - (xy 169.862557 92.198244) (xy 169.862557 97.659244) (xy 169.811762 97.402711) (xy 169.712107 97.160931) (xy 169.567388 96.943111) - (xy 169.383118 96.757549) (xy 169.166314 96.611313) (xy 168.925235 96.509973) (xy 168.669063 96.457388) (xy 168.407557 96.455563) - (xy 168.150676 96.504565) (xy 167.957546 96.582595) (xy 167.957546 95.65215) (xy 167.916426 95.444481) (xy 167.835754 95.248753) - (xy 167.7186 95.072423) (xy 167.569428 94.922207) (xy 167.393921 94.803825) (xy 167.198761 94.721788) (xy 166.991384 94.679219) - (xy 166.779689 94.677741) (xy 166.571738 94.71741) (xy 166.375452 94.796715) (xy 166.198308 94.912634) (xy 166.047054 95.060753) - (xy 165.92745 95.235431) (xy 165.844052 95.430012) (xy 165.800037 95.637087) (xy 165.797081 95.848767) (xy 165.835297 96.05699) - (xy 165.91323 96.253825) (xy 166.02791 96.431773) (xy 166.174969 96.584058) (xy 166.348807 96.704879) (xy 166.542802 96.789633) - (xy 166.749564 96.835093) (xy 166.961219 96.839526) (xy 167.169704 96.802765) (xy 167.367077 96.726208) (xy 167.545822 96.612773) - (xy 167.69913 96.46678) (xy 167.821161 96.29379) (xy 167.907268 96.100392) (xy 167.95417 95.893952) (xy 167.957546 95.65215) - (xy 167.957546 96.582595) (xy 167.908206 96.60253) (xy 167.689381 96.745725) (xy 167.502537 96.928695) (xy 167.354791 97.144473) - (xy 167.25177 97.384839) (xy 167.197399 97.640637) (xy 167.193747 97.902124) (xy 167.240955 98.159341) (xy 167.337225 98.402489) - (xy 167.478888 98.622308) (xy 167.66055 98.810425) (xy 167.875291 98.959674) (xy 168.114932 99.06437) (xy 168.370344 99.120526) - (xy 168.6318 99.126003) (xy 168.88934 99.080592) (xy 169.133154 98.986022) (xy 169.353957 98.845897) (xy 169.543337 98.665552) - (xy 169.694081 98.451858) (xy 169.800448 98.212955) (xy 169.858386 97.957941) (xy 169.862557 97.659244) (xy 169.862557 102.767611) - (xy 169.826629 102.535893) (xy 169.736514 102.289158) (xy 169.682812 102.188686) (xy 169.449197 102.129408) (xy 169.269592 102.309013) - (xy 169.269592 101.949803) (xy 169.210314 101.716188) (xy 168.972125 101.605441) (xy 168.716907 101.543289) (xy 168.454467 101.532124) - (xy 168.194893 101.572371) (xy 167.948158 101.662486) (xy 167.847686 101.716188) (xy 167.788408 101.949803) (xy 168.529 102.690395) - (xy 169.269592 101.949803) (xy 169.269592 102.309013) (xy 168.708605 102.87) (xy 169.449197 103.610592) (xy 169.682812 103.551314) - (xy 169.793559 103.313125) (xy 169.855711 103.057907) (xy 169.866876 102.795467) (xy 169.866876 119.199303) (xy 169.862557 119.188824) - (xy 169.862557 113.026244) (xy 169.862557 107.946244) (xy 169.811762 107.689711) (xy 169.712107 107.447931) (xy 169.567388 107.230111) - (xy 169.383118 107.044549) (xy 169.269592 106.967974) (xy 169.269592 103.790197) (xy 168.529 103.049605) (xy 168.349395 103.22921) - (xy 168.349395 102.87) (xy 167.608803 102.129408) (xy 167.375188 102.188686) (xy 167.264441 102.426875) (xy 167.202289 102.682093) - (xy 167.191124 102.944533) (xy 167.231371 103.204107) (xy 167.321486 103.450842) (xy 167.375188 103.551314) (xy 167.608803 103.610592) - (xy 168.349395 102.87) (xy 168.349395 103.22921) (xy 167.788408 103.790197) (xy 167.847686 104.023812) (xy 168.085875 104.134559) - (xy 168.341093 104.196711) (xy 168.603533 104.207876) (xy 168.863107 104.167629) (xy 169.109842 104.077514) (xy 169.210314 104.023812) - (xy 169.269592 103.790197) (xy 169.269592 106.967974) (xy 169.166314 106.898313) (xy 168.925235 106.796973) (xy 168.669063 106.744388) - (xy 168.407557 106.742563) (xy 168.150676 106.791565) (xy 167.908206 106.88953) (xy 167.830546 106.940349) (xy 167.830546 105.68515) - (xy 167.789426 105.477481) (xy 167.708754 105.281753) (xy 167.5916 105.105423) (xy 167.442428 104.955207) (xy 167.266921 104.836825) - (xy 167.071761 104.754788) (xy 166.864384 104.712219) (xy 166.652689 104.710741) (xy 166.444738 104.75041) (xy 166.248452 104.829715) - (xy 166.071308 104.945634) (xy 165.920054 105.093753) (xy 165.80045 105.268431) (xy 165.717052 105.463012) (xy 165.673037 105.670087) - (xy 165.670081 105.881767) (xy 165.708297 106.08999) (xy 165.78623 106.286825) (xy 165.90091 106.464773) (xy 166.047969 106.617058) - (xy 166.221807 106.737879) (xy 166.415802 106.822633) (xy 166.622564 106.868093) (xy 166.834219 106.872526) (xy 167.042704 106.835765) - (xy 167.240077 106.759208) (xy 167.418822 106.645773) (xy 167.57213 106.49978) (xy 167.694161 106.32679) (xy 167.780268 106.133392) - (xy 167.82717 105.926952) (xy 167.830546 105.68515) (xy 167.830546 106.940349) (xy 167.689381 107.032725) (xy 167.502537 107.215695) - (xy 167.354791 107.431473) (xy 167.25177 107.671839) (xy 167.197399 107.927637) (xy 167.193747 108.189124) (xy 167.240955 108.446341) - (xy 167.337225 108.689489) (xy 167.478888 108.909308) (xy 167.66055 109.097425) (xy 167.875291 109.246674) (xy 168.114932 109.35137) - (xy 168.370344 109.407526) (xy 168.6318 109.413003) (xy 168.88934 109.367592) (xy 169.133154 109.273022) (xy 169.353957 109.132897) - (xy 169.543337 108.952552) (xy 169.694081 108.738858) (xy 169.800448 108.499955) (xy 169.858386 108.244941) (xy 169.862557 107.946244) - (xy 169.862557 113.026244) (xy 169.811762 112.769711) (xy 169.712107 112.527931) (xy 169.567388 112.310111) (xy 169.383118 112.124549) - (xy 169.166314 111.978313) (xy 168.925235 111.876973) (xy 168.669063 111.824388) (xy 168.407557 111.822563) (xy 168.150676 111.871565) - (xy 167.908206 111.96953) (xy 167.689381 112.112725) (xy 167.502537 112.295695) (xy 167.354791 112.511473) (xy 167.25177 112.751839) - (xy 167.197399 113.007637) (xy 167.194738 113.198104) (xy 165.610243 114.7826) (xy 164.401546 114.7826) (xy 164.401546 93.36615) - (xy 164.360426 93.158481) (xy 164.279754 92.962753) (xy 164.274552 92.954923) (xy 164.274552 75.192697) (xy 164.228595 74.960596) - (xy 164.138431 74.741842) (xy 164.007495 74.544767) (xy 163.840773 74.376878) (xy 163.644617 74.244569) (xy 163.426498 74.15288) - (xy 163.194724 74.105303) (xy 162.958123 74.103651) (xy 162.725707 74.147987) (xy 162.560059 74.214913) (xy 162.560059 68.443017) - (xy 162.506846 68.174269) (xy 162.402446 67.920975) (xy 162.250835 67.692783) (xy 162.05779 67.498385) (xy 161.830662 67.345185) - (xy 161.578103 67.239019) (xy 161.309733 67.183931) (xy 161.163059 67.182906) (xy 161.163059 65.903017) (xy 161.109846 65.634269) - (xy 161.005446 65.380975) (xy 160.853835 65.152783) (xy 160.66079 64.958385) (xy 160.433662 64.805185) (xy 160.181103 64.699019) - (xy 159.912733 64.643931) (xy 159.638774 64.642018) (xy 159.369661 64.693354) (xy 159.115644 64.795984) (xy 158.886399 64.945997) - (xy 158.690658 65.137681) (xy 158.535877 65.363734) (xy 158.42795 65.615546) (xy 158.370989 65.883524) (xy 158.369059 66.021747) - (xy 158.369059 65.903017) (xy 158.315846 65.634269) (xy 158.211446 65.380975) (xy 158.059835 65.152783) (xy 157.86679 64.958385) - (xy 157.639662 64.805185) (xy 157.387103 64.699019) (xy 157.118733 64.643931) (xy 156.844774 64.642018) (xy 156.575661 64.693354) - (xy 156.321644 64.795984) (xy 156.092399 64.945997) (xy 155.896658 65.137681) (xy 155.741877 65.363734) (xy 155.637609 65.607007) - (xy 155.544446 65.380975) (xy 155.392835 65.152783) (xy 155.19979 64.958385) (xy 154.972662 64.805185) (xy 154.720103 64.699019) - (xy 154.451733 64.643931) (xy 154.177774 64.642018) (xy 153.908661 64.693354) (xy 153.654644 64.795984) (xy 153.425399 64.945997) - (xy 153.229658 65.137681) (xy 153.074877 65.363734) (xy 152.96695 65.615546) (xy 152.909989 65.883524) (xy 152.906164 66.157464) - (xy 152.95562 66.426928) (xy 153.056474 66.681655) (xy 153.204883 66.911942) (xy 153.395196 67.109016) (xy 153.620163 67.265372) - (xy 153.871215 67.375054) (xy 154.138789 67.433884) (xy 154.412695 67.439622) (xy 154.682499 67.392048) (xy 154.937923 67.292975) - (xy 155.16924 67.146177) (xy 155.367639 66.957245) (xy 155.525561 66.733375) (xy 155.636993 66.483095) (xy 155.63986 66.470472) - (xy 155.723474 66.681655) (xy 155.871883 66.911942) (xy 156.062196 67.109016) (xy 156.287163 67.265372) (xy 156.538215 67.375054) - (xy 156.805789 67.433884) (xy 157.079695 67.439622) (xy 157.349499 67.392048) (xy 157.604923 67.292975) (xy 157.83624 67.146177) - (xy 158.034639 66.957245) (xy 158.192561 66.733375) (xy 158.303993 66.483095) (xy 158.36469 66.215938) (xy 158.369059 65.903017) - (xy 158.369059 66.021747) (xy 158.367164 66.157464) (xy 158.41662 66.426928) (xy 158.517474 66.681655) (xy 158.665883 66.911942) - (xy 158.856196 67.109016) (xy 159.081163 67.265372) (xy 159.332215 67.375054) (xy 159.599789 67.433884) (xy 159.873695 67.439622) - (xy 160.143499 67.392048) (xy 160.398923 67.292975) (xy 160.63024 67.146177) (xy 160.828639 66.957245) (xy 160.986561 66.733375) - (xy 161.097993 66.483095) (xy 161.15869 66.215938) (xy 161.163059 65.903017) (xy 161.163059 67.182906) (xy 161.035774 67.182018) - (xy 160.766661 67.233354) (xy 160.512644 67.335984) (xy 160.283399 67.485997) (xy 160.087658 67.677681) (xy 159.932877 67.903734) - (xy 159.82495 68.155546) (xy 159.767989 68.423524) (xy 159.766059 68.561747) (xy 159.766059 68.443017) (xy 159.712846 68.174269) - (xy 159.608446 67.920975) (xy 159.456835 67.692783) (xy 159.26379 67.498385) (xy 159.036662 67.345185) (xy 158.784103 67.239019) - (xy 158.515733 67.183931) (xy 158.241774 67.182018) (xy 157.972661 67.233354) (xy 157.718644 67.335984) (xy 157.489399 67.485997) - (xy 157.293658 67.677681) (xy 157.138877 67.903734) (xy 157.03095 68.155546) (xy 156.973989 68.423524) (xy 156.972059 68.561747) - (xy 156.972059 68.443017) (xy 156.918846 68.174269) (xy 156.814446 67.920975) (xy 156.662835 67.692783) (xy 156.46979 67.498385) - (xy 156.242662 67.345185) (xy 155.990103 67.239019) (xy 155.721733 67.183931) (xy 155.447774 67.182018) (xy 155.178661 67.233354) - (xy 154.924644 67.335984) (xy 154.695399 67.485997) (xy 154.499658 67.677681) (xy 154.344877 67.903734) (xy 154.240609 68.147007) - (xy 154.147446 67.920975) (xy 153.995835 67.692783) (xy 153.80279 67.498385) (xy 153.575662 67.345185) (xy 153.323103 67.239019) - (xy 153.054733 67.183931) (xy 152.780774 67.182018) (xy 152.511661 67.233354) (xy 152.257644 67.335984) (xy 152.028399 67.485997) - (xy 151.832658 67.677681) (xy 151.677877 67.903734) (xy 151.56995 68.155546) (xy 151.512989 68.423524) (xy 151.511 68.565972) - (xy 151.511 67.755458) (xy 151.486597 67.632777) (xy 151.43873 67.517215) (xy 151.383593 67.434696) (xy 151.618695 67.439622) - (xy 151.888499 67.392048) (xy 152.143923 67.292975) (xy 152.37524 67.146177) (xy 152.573639 66.957245) (xy 152.731561 66.733375) - (xy 152.842993 66.483095) (xy 152.90369 66.215938) (xy 152.908059 65.903017) (xy 152.854846 65.634269) (xy 152.750446 65.380975) - (xy 152.598835 65.152783) (xy 152.40579 64.958385) (xy 152.178662 64.805185) (xy 151.926103 64.699019) (xy 151.657733 64.643931) - (xy 151.383774 64.642018) (xy 151.114661 64.693354) (xy 150.860644 64.795984) (xy 150.631399 64.945997) (xy 150.435658 65.137681) - (xy 150.280877 65.363734) (xy 150.17295 65.615546) (xy 150.115989 65.883524) (xy 150.112164 66.157464) (xy 150.16162 66.426928) - (xy 150.262474 66.681655) (xy 150.410883 66.911942) (xy 150.601196 67.109016) (xy 150.707645 67.183) (xy 149.289458 67.183) - (xy 149.166777 67.207403) (xy 149.051215 67.25527) (xy 148.947211 67.324763) (xy 148.858763 67.413211) (xy 148.78927 67.517215) - (xy 148.741403 67.632777) (xy 148.717 67.755458) (xy 148.717 67.880542) (xy 148.717 69.404542) (xy 148.741403 69.527223) - (xy 148.78927 69.642785) (xy 148.858763 69.746789) (xy 148.947211 69.835237) (xy 149.051215 69.90473) (xy 149.166777 69.952597) - (xy 149.289458 69.977) (xy 149.414542 69.977) (xy 150.938542 69.977) (xy 151.061223 69.952597) (xy 151.176785 69.90473) - (xy 151.280789 69.835237) (xy 151.369237 69.746789) (xy 151.43873 69.642785) (xy 151.486597 69.527223) (xy 151.511 69.404542) - (xy 151.511 69.279458) (xy 151.511 68.707467) (xy 151.55862 68.966928) (xy 151.659474 69.221655) (xy 151.807883 69.451942) - (xy 151.998196 69.649016) (xy 152.223163 69.805372) (xy 152.474215 69.915054) (xy 152.741789 69.973884) (xy 153.015695 69.979622) - (xy 153.285499 69.932048) (xy 153.540923 69.832975) (xy 153.77224 69.686177) (xy 153.970639 69.497245) (xy 154.128561 69.273375) - (xy 154.239993 69.023095) (xy 154.24286 69.010472) (xy 154.326474 69.221655) (xy 154.474883 69.451942) (xy 154.665196 69.649016) - (xy 154.890163 69.805372) (xy 155.141215 69.915054) (xy 155.408789 69.973884) (xy 155.682695 69.979622) (xy 155.952499 69.932048) - (xy 156.207923 69.832975) (xy 156.43924 69.686177) (xy 156.637639 69.497245) (xy 156.795561 69.273375) (xy 156.906993 69.023095) - (xy 156.96769 68.755938) (xy 156.972059 68.443017) (xy 156.972059 68.561747) (xy 156.970164 68.697464) (xy 157.01962 68.966928) - (xy 157.120474 69.221655) (xy 157.268883 69.451942) (xy 157.459196 69.649016) (xy 157.684163 69.805372) (xy 157.935215 69.915054) - (xy 158.202789 69.973884) (xy 158.476695 69.979622) (xy 158.746499 69.932048) (xy 159.001923 69.832975) (xy 159.23324 69.686177) - (xy 159.431639 69.497245) (xy 159.589561 69.273375) (xy 159.700993 69.023095) (xy 159.76169 68.755938) (xy 159.766059 68.443017) - (xy 159.766059 68.561747) (xy 159.764164 68.697464) (xy 159.81362 68.966928) (xy 159.914474 69.221655) (xy 160.062883 69.451942) - (xy 160.253196 69.649016) (xy 160.478163 69.805372) (xy 160.729215 69.915054) (xy 160.996789 69.973884) (xy 161.270695 69.979622) - (xy 161.540499 69.932048) (xy 161.795923 69.832975) (xy 162.02724 69.686177) (xy 162.225639 69.497245) (xy 162.383561 69.273375) - (xy 162.494993 69.023095) (xy 162.55569 68.755938) (xy 162.560059 68.443017) (xy 162.560059 74.214913) (xy 162.506329 74.236622) - (xy 162.308344 74.366179) (xy 162.139295 74.531724) (xy 162.00562 74.726952) (xy 161.912411 74.944425) (xy 161.863217 75.175862) - (xy 161.859914 75.412446) (xy 161.902626 75.645166) (xy 161.989727 75.865157) (xy 162.117899 76.064041) (xy 162.28226 76.234242) - (xy 162.476549 76.369277) (xy 162.693367 76.464002) (xy 162.924454 76.51481) (xy 163.161009 76.519765) (xy 163.394022 76.478679) - (xy 163.614616 76.393116) (xy 163.81439 76.266335) (xy 163.985734 76.103167) (xy 164.122122 75.909824) (xy 164.218358 75.693673) - (xy 164.270778 75.462946) (xy 164.274552 75.192697) (xy 164.274552 92.954923) (xy 164.1626 92.786423) (xy 164.013428 92.636207) - (xy 163.837921 92.517825) (xy 163.642761 92.435788) (xy 163.435384 92.393219) (xy 163.223689 92.391741) (xy 163.015738 92.43141) - (xy 162.819452 92.510715) (xy 162.642308 92.626634) (xy 162.491054 92.774753) (xy 162.37145 92.949431) (xy 162.288052 93.144012) - (xy 162.244037 93.351087) (xy 162.241081 93.562767) (xy 162.279297 93.77099) (xy 162.35723 93.967825) (xy 162.47191 94.145773) - (xy 162.618969 94.298058) (xy 162.792807 94.418879) (xy 162.986802 94.503633) (xy 163.193564 94.549093) (xy 163.405219 94.553526) - (xy 163.613704 94.516765) (xy 163.811077 94.440208) (xy 163.989822 94.326773) (xy 164.14313 94.18078) (xy 164.265161 94.00779) - (xy 164.351268 93.814392) (xy 164.39817 93.607952) (xy 164.401546 93.36615) (xy 164.401546 114.7826) (xy 160.304357 114.7826) - (xy 160.284773 114.762878) (xy 160.088617 114.630569) (xy 159.870498 114.53888) (xy 159.638724 114.491303) (xy 159.402123 114.489651) - (xy 159.194541 114.529249) (xy 159.194541 74.582603) (xy 159.194541 71.153603) (xy 159.158259 70.970365) (xy 159.087077 70.797665) - (xy 158.983706 70.642079) (xy 158.852084 70.509535) (xy 158.697224 70.40508) (xy 158.525025 70.332694) (xy 158.342045 70.295134) - (xy 158.155255 70.29383) (xy 157.971768 70.328832) (xy 157.798575 70.398807) (xy 157.642272 70.501089) (xy 157.508812 70.631782) - (xy 157.403279 70.785909) (xy 157.329693 70.957599) (xy 157.290856 71.140312) (xy 157.288248 71.327089) (xy 157.321968 71.510815) - (xy 157.390732 71.684493) (xy 157.49192 71.841506) (xy 157.621679 71.975875) (xy 157.775065 72.082482) (xy 157.946237 72.157265) - (xy 158.128674 72.197376) (xy 158.315428 72.201288) (xy 158.499386 72.168852) (xy 158.673539 72.101302) (xy 158.831255 72.001212) - (xy 158.966527 71.872395) (xy 159.074201 71.719756) (xy 159.150178 71.549111) (xy 159.191562 71.366958) (xy 159.194541 71.153603) - (xy 159.194541 74.582603) (xy 159.158259 74.399365) (xy 159.087077 74.226665) (xy 158.983706 74.071079) (xy 158.852084 73.938535) - (xy 158.697224 73.83408) (xy 158.525025 73.761694) (xy 158.342045 73.724134) (xy 158.155255 73.72283) (xy 157.971768 73.757832) - (xy 157.798575 73.827807) (xy 157.642272 73.930089) (xy 157.508812 74.060782) (xy 157.403279 74.214909) (xy 157.329693 74.386599) - (xy 157.290856 74.569312) (xy 157.288248 74.756089) (xy 157.321968 74.939815) (xy 157.390732 75.113493) (xy 157.49192 75.270506) - (xy 157.621679 75.404875) (xy 157.775065 75.511482) (xy 157.946237 75.586265) (xy 158.128674 75.626376) (xy 158.315428 75.630288) - (xy 158.499386 75.597852) (xy 158.673539 75.530302) (xy 158.831255 75.430212) (xy 158.966527 75.301395) (xy 159.074201 75.148756) - (xy 159.150178 74.978111) (xy 159.191562 74.795958) (xy 159.194541 74.582603) (xy 159.194541 114.529249) (xy 159.169707 114.533987) - (xy 158.950329 114.622622) (xy 158.899933 114.6556) (xy 158.305546 114.6556) (xy 158.305546 87.77815) (xy 158.264426 87.570481) - (xy 158.183754 87.374753) (xy 158.0666 87.198423) (xy 157.917428 87.048207) (xy 157.741921 86.929825) (xy 157.546761 86.847788) - (xy 157.339384 86.805219) (xy 157.127689 86.803741) (xy 156.919738 86.84341) (xy 156.723452 86.922715) (xy 156.546308 87.038634) - (xy 156.395054 87.186753) (xy 156.380586 87.207882) (xy 156.344921 87.183825) (xy 156.149761 87.101788) (xy 155.942384 87.059219) - (xy 155.730689 87.057741) (xy 155.654203 87.072331) (xy 155.6536 87.071423) (xy 155.504428 86.921207) (xy 155.328921 86.802825) - (xy 155.133761 86.720788) (xy 154.926384 86.678219) (xy 154.714689 86.676741) (xy 154.506738 86.71641) (xy 154.310452 86.795715) - (xy 154.133308 86.911634) (xy 153.982054 87.059753) (xy 153.86245 87.234431) (xy 153.779052 87.429012) (xy 153.747504 87.577431) - (xy 153.726428 87.556207) (xy 153.550921 87.437825) (xy 153.479546 87.407821) (xy 153.479546 84.73015) (xy 153.438426 84.522481) - (xy 153.357754 84.326753) (xy 153.2406 84.150423) (xy 153.091428 84.000207) (xy 152.915921 83.881825) (xy 152.720761 83.799788) - (xy 152.576492 83.770173) (xy 152.549426 83.633481) (xy 152.468754 83.437753) (xy 152.3516 83.261423) (xy 152.202428 83.111207) - (xy 152.082552 83.030348) (xy 152.082552 75.192697) (xy 152.036595 74.960596) (xy 151.946431 74.741842) (xy 151.815495 74.544767) - (xy 151.648773 74.376878) (xy 151.452617 74.244569) (xy 151.234498 74.15288) (xy 151.002724 74.105303) (xy 150.766123 74.103651) - (xy 150.533707 74.147987) (xy 150.314329 74.236622) (xy 150.116344 74.366179) (xy 149.947295 74.531724) (xy 149.81362 74.726952) - (xy 149.720411 74.944425) (xy 149.671217 75.175862) (xy 149.667914 75.412446) (xy 149.710626 75.645166) (xy 149.797727 75.865157) - (xy 149.925899 76.064041) (xy 150.09026 76.234242) (xy 150.284549 76.369277) (xy 150.501367 76.464002) (xy 150.732454 76.51481) - (xy 150.969009 76.519765) (xy 151.202022 76.478679) (xy 151.422616 76.393116) (xy 151.62239 76.266335) (xy 151.793734 76.103167) - (xy 151.930122 75.909824) (xy 152.026358 75.693673) (xy 152.078778 75.462946) (xy 152.082552 75.192697) (xy 152.082552 83.030348) - (xy 152.026921 82.992825) (xy 151.831761 82.910788) (xy 151.624384 82.868219) (xy 151.412689 82.866741) (xy 151.204738 82.90641) - (xy 151.008452 82.985715) (xy 150.831308 83.101634) (xy 150.680054 83.249753) (xy 150.580769 83.394754) (xy 150.551428 83.365207) - (xy 150.375921 83.246825) (xy 150.180761 83.164788) (xy 149.973384 83.122219) (xy 149.761689 83.120741) (xy 149.553738 83.16041) - (xy 149.357452 83.239715) (xy 149.180308 83.355634) (xy 149.029054 83.503753) (xy 148.90945 83.678431) (xy 148.875924 83.75665) - (xy 148.745689 83.755741) (xy 148.537738 83.79541) (xy 148.341452 83.874715) (xy 148.164308 83.990634) (xy 148.013054 84.138753) - (xy 147.89345 84.313431) (xy 147.810052 84.508012) (xy 147.766037 84.715087) (xy 147.763081 84.926767) (xy 147.801297 85.13499) - (xy 147.87923 85.331825) (xy 147.99391 85.509773) (xy 148.140969 85.662058) (xy 148.314807 85.782879) (xy 148.508802 85.867633) - (xy 148.715564 85.913093) (xy 148.927219 85.917526) (xy 149.135704 85.880765) (xy 149.333077 85.804208) (xy 149.511822 85.690773) - (xy 149.66513 85.54478) (xy 149.787161 85.37179) (xy 149.827978 85.280112) (xy 149.943219 85.282526) (xy 150.151704 85.245765) - (xy 150.349077 85.169208) (xy 150.527822 85.055773) (xy 150.68113 84.90978) (xy 150.790406 84.754871) (xy 150.807969 84.773058) - (xy 150.981807 84.893879) (xy 151.175802 84.978633) (xy 151.335025 85.01364) (xy 151.357297 85.13499) (xy 151.43523 85.331825) - (xy 151.54991 85.509773) (xy 151.696969 85.662058) (xy 151.870807 85.782879) (xy 152.064802 85.867633) (xy 152.271564 85.913093) - (xy 152.483219 85.917526) (xy 152.691704 85.880765) (xy 152.889077 85.804208) (xy 153.067822 85.690773) (xy 153.22113 85.54478) - (xy 153.343161 85.37179) (xy 153.429268 85.178392) (xy 153.47617 84.971952) (xy 153.479546 84.73015) (xy 153.479546 87.407821) - (xy 153.355761 87.355788) (xy 153.148384 87.313219) (xy 152.936689 87.311741) (xy 152.728738 87.35141) (xy 152.532452 87.430715) - (xy 152.355308 87.546634) (xy 152.204054 87.694753) (xy 152.08445 87.869431) (xy 152.001052 88.064012) (xy 151.957037 88.271087) - (xy 151.954081 88.482767) (xy 151.992297 88.69099) (xy 152.07023 88.887825) (xy 152.18491 89.065773) (xy 152.331969 89.218058) - (xy 152.505807 89.338879) (xy 152.699802 89.423633) (xy 152.906564 89.469093) (xy 153.118219 89.473526) (xy 153.326704 89.436765) - (xy 153.524077 89.360208) (xy 153.702822 89.246773) (xy 153.85613 89.10078) (xy 153.978161 88.92779) (xy 154.064268 88.734392) - (xy 154.100805 88.573569) (xy 154.109969 88.583058) (xy 154.283807 88.703879) (xy 154.477802 88.788633) (xy 154.684564 88.834093) - (xy 154.896219 88.838526) (xy 154.988954 88.822174) (xy 155.125969 88.964058) (xy 155.299807 89.084879) (xy 155.493802 89.169633) - (xy 155.700564 89.215093) (xy 155.912219 89.219526) (xy 156.120704 89.182765) (xy 156.318077 89.106208) (xy 156.330535 89.098301) - (xy 156.260279 89.200909) (xy 156.186693 89.372599) (xy 156.147856 89.555312) (xy 156.145248 89.742089) (xy 156.178968 89.925815) - (xy 156.247732 90.099493) (xy 156.2528 90.107357) (xy 156.186693 90.261599) (xy 156.147856 90.444312) (xy 156.145248 90.631089) - (xy 156.178968 90.814815) (xy 156.247732 90.988493) (xy 156.34892 91.145506) (xy 156.478679 91.279875) (xy 156.632065 91.386482) - (xy 156.803237 91.461265) (xy 156.985674 91.501376) (xy 157.172428 91.505288) (xy 157.356386 91.472852) (xy 157.530539 91.405302) - (xy 157.688255 91.305212) (xy 157.823527 91.176395) (xy 157.931201 91.023756) (xy 158.007178 90.853111) (xy 158.048562 90.670958) - (xy 158.051541 90.457603) (xy 158.015259 90.274365) (xy 157.944969 90.103831) (xy 158.007178 89.964111) (xy 158.048562 89.781958) - (xy 158.051541 89.568603) (xy 158.015259 89.385365) (xy 157.944077 89.212665) (xy 157.840706 89.057079) (xy 157.709084 88.924535) - (xy 157.643192 88.88009) (xy 157.715077 88.852208) (xy 157.893822 88.738773) (xy 158.04713 88.59278) (xy 158.169161 88.41979) - (xy 158.255268 88.226392) (xy 158.30217 88.019952) (xy 158.305546 87.77815) (xy 158.305546 114.6556) (xy 155.384541 114.6556) - (xy 155.384541 91.854603) (xy 155.348259 91.671365) (xy 155.277077 91.498665) (xy 155.173706 91.343079) (xy 155.042084 91.210535) - (xy 154.887224 91.10608) (xy 154.715025 91.033694) (xy 154.532045 90.996134) (xy 154.345255 90.99483) (xy 154.161768 91.029832) - (xy 153.988575 91.099807) (xy 153.832272 91.202089) (xy 153.698812 91.332782) (xy 153.593279 91.486909) (xy 153.519693 91.658599) - (xy 153.480856 91.841312) (xy 153.480539 91.864008) (xy 153.318025 91.795694) (xy 153.135045 91.758134) (xy 152.948255 91.75683) - (xy 152.764768 91.791832) (xy 152.591575 91.861807) (xy 152.435272 91.964089) (xy 152.301812 92.094782) (xy 152.196279 92.248909) - (xy 152.122693 92.420599) (xy 152.083856 92.603312) (xy 152.081248 92.790089) (xy 152.114968 92.973815) (xy 152.183732 93.147493) - (xy 152.28492 93.304506) (xy 152.414679 93.438875) (xy 152.568065 93.545482) (xy 152.739237 93.620265) (xy 152.921674 93.660376) - (xy 153.108428 93.664288) (xy 153.292386 93.631852) (xy 153.466539 93.564302) (xy 153.624255 93.464212) (xy 153.759527 93.335395) - (xy 153.867201 93.182756) (xy 153.943178 93.012111) (xy 153.984562 92.829958) (xy 153.985088 92.79223) (xy 154.136237 92.858265) - (xy 154.318674 92.898376) (xy 154.505428 92.902288) (xy 154.689386 92.869852) (xy 154.863539 92.802302) (xy 155.021255 92.702212) - (xy 155.156527 92.573395) (xy 155.264201 92.420756) (xy 155.340178 92.250111) (xy 155.381562 92.067958) (xy 155.384541 91.854603) - (xy 155.384541 114.6556) (xy 153.225552 114.6556) (xy 153.225552 102.370697) (xy 153.179595 102.138596) (xy 153.089431 101.919842) - (xy 152.958495 101.722767) (xy 152.791773 101.554878) (xy 152.595617 101.422569) (xy 152.377498 101.33088) (xy 152.145724 101.283303) - (xy 151.909123 101.281651) (xy 151.701546 101.321248) (xy 151.701546 88.79415) (xy 151.660426 88.586481) (xy 151.579754 88.390753) - (xy 151.4626 88.214423) (xy 151.313428 88.064207) (xy 151.137921 87.945825) (xy 150.942761 87.863788) (xy 150.735384 87.821219) - (xy 150.523689 87.819741) (xy 150.315738 87.85941) (xy 150.119452 87.938715) (xy 149.942308 88.054634) (xy 149.791054 88.202753) - (xy 149.67145 88.377431) (xy 149.588052 88.572012) (xy 149.544037 88.779087) (xy 149.541081 88.990767) (xy 149.579297 89.19899) - (xy 149.65723 89.395825) (xy 149.77191 89.573773) (xy 149.918969 89.726058) (xy 150.092807 89.846879) (xy 150.286802 89.931633) - (xy 150.493564 89.977093) (xy 150.705219 89.981526) (xy 150.913704 89.944765) (xy 151.111077 89.868208) (xy 151.289822 89.754773) - (xy 151.44313 89.60878) (xy 151.565161 89.43579) (xy 151.651268 89.242392) (xy 151.69817 89.035952) (xy 151.701546 88.79415) - (xy 151.701546 101.321248) (xy 151.676707 101.325987) (xy 151.574546 101.367262) (xy 151.574546 95.14415) (xy 151.533426 94.936481) - (xy 151.452754 94.740753) (xy 151.3356 94.564423) (xy 151.186428 94.414207) (xy 151.010921 94.295825) (xy 150.815761 94.213788) - (xy 150.608384 94.171219) (xy 150.396689 94.169741) (xy 150.188738 94.20941) (xy 149.992452 94.288715) (xy 149.815308 94.404634) - (xy 149.809927 94.409903) (xy 149.807224 94.40808) (xy 149.635025 94.335694) (xy 149.452045 94.298134) (xy 149.265255 94.29683) - (xy 149.081768 94.331832) (xy 148.908575 94.401807) (xy 148.906512 94.403156) (xy 148.746025 94.335694) (xy 148.563045 94.298134) - (xy 148.376255 94.29683) (xy 148.192768 94.331832) (xy 148.019575 94.401807) (xy 148.017512 94.403156) (xy 147.857025 94.335694) - (xy 147.674045 94.298134) (xy 147.487255 94.29683) (xy 147.303768 94.331832) (xy 147.130575 94.401807) (xy 146.974272 94.504089) - (xy 146.840812 94.634782) (xy 146.735279 94.788909) (xy 146.661693 94.960599) (xy 146.622856 95.143312) (xy 146.620248 95.330089) - (xy 146.653968 95.513815) (xy 146.722732 95.687493) (xy 146.82392 95.844506) (xy 146.953679 95.978875) (xy 147.107065 96.085482) - (xy 147.278237 96.160265) (xy 147.460674 96.200376) (xy 147.647428 96.204288) (xy 147.831386 96.171852) (xy 148.005539 96.104302) - (xy 148.01924 96.095606) (xy 148.167237 96.160265) (xy 148.349674 96.200376) (xy 148.536428 96.204288) (xy 148.720386 96.171852) - (xy 148.894539 96.104302) (xy 148.90824 96.095606) (xy 149.056237 96.160265) (xy 149.238674 96.200376) (xy 149.425428 96.204288) - (xy 149.566581 96.179399) (xy 149.543856 96.286312) (xy 149.541248 96.473089) (xy 149.574968 96.656815) (xy 149.643732 96.830493) - (xy 149.6488 96.838357) (xy 149.582693 96.992599) (xy 149.543856 97.175312) (xy 149.541248 97.362089) (xy 149.574968 97.545815) - (xy 149.643732 97.719493) (xy 149.6488 97.727357) (xy 149.582693 97.881599) (xy 149.543856 98.064312) (xy 149.541248 98.251089) - (xy 149.574968 98.434815) (xy 149.643732 98.608493) (xy 149.6488 98.616357) (xy 149.582693 98.770599) (xy 149.543856 98.953312) - (xy 149.541248 99.140089) (xy 149.574968 99.323815) (xy 149.643732 99.497493) (xy 149.74492 99.654506) (xy 149.874679 99.788875) - (xy 150.028065 99.895482) (xy 150.199237 99.970265) (xy 150.381674 100.010376) (xy 150.568428 100.014288) (xy 150.752386 99.981852) - (xy 150.926539 99.914302) (xy 151.084255 99.814212) (xy 151.219527 99.685395) (xy 151.327201 99.532756) (xy 151.403178 99.362111) - (xy 151.444562 99.179958) (xy 151.447541 98.966603) (xy 151.411259 98.783365) (xy 151.340969 98.612831) (xy 151.403178 98.473111) - (xy 151.444562 98.290958) (xy 151.447541 98.077603) (xy 151.411259 97.894365) (xy 151.340969 97.723831) (xy 151.403178 97.584111) - (xy 151.444562 97.401958) (xy 151.447541 97.188603) (xy 151.411259 97.005365) (xy 151.340969 96.834831) (xy 151.403178 96.695111) - (xy 151.444562 96.512958) (xy 151.447541 96.299603) (xy 151.411259 96.116365) (xy 151.340077 95.943665) (xy 151.333633 95.933966) - (xy 151.438161 95.78579) (xy 151.524268 95.592392) (xy 151.57117 95.385952) (xy 151.574546 95.14415) (xy 151.574546 101.367262) - (xy 151.457329 101.414622) (xy 151.259344 101.544179) (xy 151.090295 101.709724) (xy 150.95662 101.904952) (xy 150.863411 102.122425) - (xy 150.814217 102.353862) (xy 150.810914 102.590446) (xy 150.853626 102.823166) (xy 150.940727 103.043157) (xy 151.068899 103.242041) - (xy 151.23326 103.412242) (xy 151.427549 103.547277) (xy 151.644367 103.642002) (xy 151.875454 103.69281) (xy 152.112009 103.697765) - (xy 152.345022 103.656679) (xy 152.565616 103.571116) (xy 152.76539 103.444335) (xy 152.936734 103.281167) (xy 153.073122 103.087824) - (xy 153.169358 102.871673) (xy 153.221778 102.640946) (xy 153.225552 102.370697) (xy 153.225552 114.6556) (xy 153.192357 114.6556) - (xy 153.172773 114.635878) (xy 152.976617 114.503569) (xy 152.758498 114.41188) (xy 152.526724 114.364303) (xy 152.290123 114.362651) - (xy 152.057707 114.406987) (xy 151.838329 114.495622) (xy 151.640344 114.625179) (xy 151.47959 114.7826) (xy 148.018552 114.7826) - (xy 148.018552 103.767697) (xy 147.972595 103.535596) (xy 147.891546 103.338956) (xy 147.891546 99.97015) (xy 147.850426 99.762481) - (xy 147.769754 99.566753) (xy 147.6526 99.390423) (xy 147.503428 99.240207) (xy 147.327921 99.121825) (xy 147.132761 99.039788) - (xy 146.925384 98.997219) (xy 146.713689 98.995741) (xy 146.505738 99.03541) (xy 146.309452 99.114715) (xy 146.132308 99.230634) - (xy 145.981054 99.378753) (xy 145.86145 99.553431) (xy 145.778052 99.748012) (xy 145.734037 99.955087) (xy 145.731081 100.166767) - (xy 145.769297 100.37499) (xy 145.84723 100.571825) (xy 145.96191 100.749773) (xy 146.108969 100.902058) (xy 146.282807 101.022879) - (xy 146.476802 101.107633) (xy 146.683564 101.153093) (xy 146.895219 101.157526) (xy 147.103704 101.120765) (xy 147.301077 101.044208) - (xy 147.479822 100.930773) (xy 147.63313 100.78478) (xy 147.755161 100.61179) (xy 147.841268 100.418392) (xy 147.88817 100.211952) - (xy 147.891546 99.97015) (xy 147.891546 103.338956) (xy 147.882431 103.316842) (xy 147.751495 103.119767) (xy 147.584773 102.951878) - (xy 147.388617 102.819569) (xy 147.170498 102.72788) (xy 146.938724 102.680303) (xy 146.702123 102.678651) (xy 146.469707 102.722987) - (xy 146.250329 102.811622) (xy 146.052344 102.941179) (xy 145.883295 103.106724) (xy 145.74962 103.301952) (xy 145.656411 103.519425) - (xy 145.607217 103.750862) (xy 145.603914 103.987446) (xy 145.646626 104.220166) (xy 145.733727 104.440157) (xy 145.861899 104.639041) - (xy 146.02626 104.809242) (xy 146.220549 104.944277) (xy 146.437367 105.039002) (xy 146.668454 105.08981) (xy 146.905009 105.094765) - (xy 147.138022 105.053679) (xy 147.358616 104.968116) (xy 147.55839 104.841335) (xy 147.729734 104.678167) (xy 147.866122 104.484824) - (xy 147.962358 104.268673) (xy 148.014778 104.037946) (xy 148.018552 103.767697) (xy 148.018552 114.7826) (xy 147.764546 114.7826) - (xy 147.764546 109.74915) (xy 147.723426 109.541481) (xy 147.642754 109.345753) (xy 147.5256 109.169423) (xy 147.376428 109.019207) - (xy 147.200921 108.900825) (xy 147.124853 108.868849) (xy 147.225822 108.804773) (xy 147.37913 108.65878) (xy 147.501161 108.48579) - (xy 147.587268 108.292392) (xy 147.63417 108.085952) (xy 147.637546 107.84415) (xy 147.596426 107.636481) (xy 147.515754 107.440753) - (xy 147.431705 107.314249) (xy 147.501161 107.21579) (xy 147.587268 107.022392) (xy 147.63417 106.815952) (xy 147.637546 106.57415) - (xy 147.596426 106.366481) (xy 147.515754 106.170753) (xy 147.3986 105.994423) (xy 147.249428 105.844207) (xy 147.073921 105.725825) - (xy 146.878761 105.643788) (xy 146.671384 105.601219) (xy 146.459689 105.599741) (xy 146.251738 105.63941) (xy 146.055452 105.718715) - (xy 145.878308 105.834634) (xy 145.727054 105.982753) (xy 145.60745 106.157431) (xy 145.524052 106.352012) (xy 145.480037 106.559087) - (xy 145.477081 106.770767) (xy 145.515297 106.97899) (xy 145.59323 107.175825) (xy 145.683654 107.316136) (xy 145.60745 107.427431) - (xy 145.524052 107.622012) (xy 145.480037 107.829087) (xy 145.477081 108.040767) (xy 145.515297 108.24899) (xy 145.59323 108.445825) - (xy 145.70791 108.623773) (xy 145.854969 108.776058) (xy 146.028807 108.896879) (xy 146.11804 108.935864) (xy 146.005308 109.009634) - (xy 145.854054 109.157753) (xy 145.73445 109.332431) (xy 145.651052 109.527012) (xy 145.607037 109.734087) (xy 145.604081 109.945767) - (xy 145.642297 110.15399) (xy 145.72023 110.350825) (xy 145.83491 110.528773) (xy 145.981969 110.681058) (xy 146.155807 110.801879) - (xy 146.349802 110.886633) (xy 146.556564 110.932093) (xy 146.768219 110.936526) (xy 146.976704 110.899765) (xy 147.174077 110.823208) - (xy 147.352822 110.709773) (xy 147.50613 110.56378) (xy 147.628161 110.39079) (xy 147.714268 110.197392) (xy 147.76117 109.990952) - (xy 147.764546 109.74915) (xy 147.764546 114.7826) (xy 147.698756 114.7826) (xy 145.859115 112.942959) (xy 145.859552 112.911697) - (xy 145.813595 112.679596) (xy 145.723431 112.460842) (xy 145.592495 112.263767) (xy 145.425773 112.095878) (xy 145.229617 111.963569) - (xy 145.011498 111.87188) (xy 144.779724 111.824303) (xy 144.543123 111.822651) (xy 144.310707 111.866987) (xy 144.091329 111.955622) - (xy 143.893344 112.085179) (xy 143.724295 112.250724) (xy 143.59062 112.445952) (xy 143.497411 112.663425) (xy 143.448217 112.894862) - (xy 143.446552 113.01412) (xy 143.446552 108.720697) (xy 143.400595 108.488596) (xy 143.310431 108.269842) (xy 143.179495 108.072767) - (xy 143.012773 107.904878) (xy 142.816617 107.772569) (xy 142.811552 107.770439) (xy 142.811552 88.908697) (xy 142.765595 88.676596) - (xy 142.684552 88.479971) (xy 142.684552 82.304697) (xy 142.638595 82.072596) (xy 142.548431 81.853842) (xy 142.417495 81.656767) - (xy 142.250773 81.488878) (xy 142.054617 81.356569) (xy 141.836498 81.26488) (xy 141.604724 81.217303) (xy 141.368123 81.215651) - (xy 141.135707 81.259987) (xy 140.916329 81.348622) (xy 140.915363 81.349253) (xy 140.899428 81.333207) (xy 140.723921 81.214825) - (xy 140.528761 81.132788) (xy 140.321384 81.090219) (xy 140.109689 81.088741) (xy 139.901738 81.12841) (xy 139.705452 81.207715) - (xy 139.528308 81.323634) (xy 139.461868 81.388696) (xy 139.390835 81.281783) (xy 139.19779 81.087385) (xy 138.970662 80.934185) - (xy 138.889393 80.900022) (xy 138.935923 80.881975) (xy 139.16724 80.735177) (xy 139.365639 80.546245) (xy 139.523561 80.322375) - (xy 139.634993 80.072095) (xy 139.69569 79.804938) (xy 139.700059 79.492017) (xy 139.646846 79.223269) (xy 139.542446 78.969975) - (xy 139.390835 78.741783) (xy 139.19779 78.547385) (xy 138.970662 78.394185) (xy 138.889393 78.360022) (xy 138.935923 78.341975) - (xy 139.16724 78.195177) (xy 139.365639 78.006245) (xy 139.523561 77.782375) (xy 139.634993 77.532095) (xy 139.69569 77.264938) - (xy 139.700059 76.952017) (xy 139.646846 76.683269) (xy 139.542446 76.429975) (xy 139.390835 76.201783) (xy 139.19779 76.007385) - (xy 138.970662 75.854185) (xy 138.889393 75.820022) (xy 138.935923 75.801975) (xy 139.16724 75.655177) (xy 139.365639 75.466245) - (xy 139.523561 75.242375) (xy 139.634993 74.992095) (xy 139.69569 74.724938) (xy 139.700059 74.412017) (xy 139.646846 74.143269) - (xy 139.542446 73.889975) (xy 139.390835 73.661783) (xy 139.19779 73.467385) (xy 138.970662 73.314185) (xy 138.718103 73.208019) - (xy 138.449733 73.152931) (xy 138.175774 73.151018) (xy 137.906661 73.202354) (xy 137.652644 73.304984) (xy 137.423399 73.454997) - (xy 137.227658 73.646681) (xy 137.16 73.745493) (xy 137.16 73.724458) (xy 137.135597 73.601777) (xy 137.08773 73.486215) - (xy 137.018237 73.382211) (xy 136.929789 73.293763) (xy 136.825785 73.22427) (xy 136.710223 73.176403) (xy 136.587542 73.152) - (xy 136.462458 73.152) (xy 134.938458 73.152) (xy 134.815777 73.176403) (xy 134.700215 73.22427) (xy 134.596211 73.293763) - (xy 134.507763 73.382211) (xy 134.43827 73.486215) (xy 134.390403 73.601777) (xy 134.366 73.724458) (xy 134.366 73.849542) - (xy 134.366 75.373542) (xy 134.390403 75.496223) (xy 134.43827 75.611785) (xy 134.507763 75.715789) (xy 134.596211 75.804237) - (xy 134.700215 75.87373) (xy 134.815777 75.921597) (xy 134.938458 75.946) (xy 134.958274 75.946) (xy 134.883399 75.994997) - (xy 134.687658 76.186681) (xy 134.532877 76.412734) (xy 134.42495 76.664546) (xy 134.367989 76.932524) (xy 134.364164 77.206464) - (xy 134.41362 77.475928) (xy 134.514474 77.730655) (xy 134.662883 77.960942) (xy 134.853196 78.158016) (xy 135.078163 78.314372) - (xy 135.178699 78.358295) (xy 135.112644 78.384984) (xy 134.883399 78.534997) (xy 134.687658 78.726681) (xy 134.532877 78.952734) - (xy 134.42495 79.204546) (xy 134.367989 79.472524) (xy 134.364164 79.746464) (xy 134.41362 80.015928) (xy 134.514474 80.270655) - (xy 134.662883 80.500942) (xy 134.853196 80.698016) (xy 135.078163 80.854372) (xy 135.178699 80.898295) (xy 135.112644 80.924984) - (xy 134.883399 81.074997) (xy 134.687658 81.266681) (xy 134.539201 81.483497) (xy 134.479384 81.471219) (xy 134.267689 81.469741) - (xy 134.059738 81.50941) (xy 133.921552 81.56524) (xy 133.921552 75.319697) (xy 133.875595 75.087596) (xy 133.785431 74.868842) - (xy 133.654495 74.671767) (xy 133.487773 74.503878) (xy 133.291617 74.371569) (xy 133.073498 74.27988) (xy 132.841724 74.232303) - (xy 132.605123 74.230651) (xy 132.372707 74.274987) (xy 132.153329 74.363622) (xy 131.955344 74.493179) (xy 131.786295 74.658724) - (xy 131.65262 74.853952) (xy 131.559411 75.071425) (xy 131.510217 75.302862) (xy 131.506914 75.539446) (xy 131.549626 75.772166) - (xy 131.636727 75.992157) (xy 131.764899 76.191041) (xy 131.92926 76.361242) (xy 132.123549 76.496277) (xy 132.340367 76.591002) - (xy 132.571454 76.64181) (xy 132.808009 76.646765) (xy 133.041022 76.605679) (xy 133.261616 76.520116) (xy 133.46139 76.393335) - (xy 133.632734 76.230167) (xy 133.769122 76.036824) (xy 133.865358 75.820673) (xy 133.917778 75.589946) (xy 133.921552 75.319697) - (xy 133.921552 81.56524) (xy 133.863452 81.588715) (xy 133.686308 81.704634) (xy 133.535054 81.852753) (xy 133.41545 82.027431) - (xy 133.332052 82.222012) (xy 133.288037 82.429087) (xy 133.285081 82.640767) (xy 133.323297 82.84899) (xy 133.40123 83.045825) - (xy 133.51591 83.223773) (xy 133.662969 83.376058) (xy 133.836807 83.496879) (xy 134.030802 83.581633) (xy 134.237564 83.627093) - (xy 134.449219 83.631526) (xy 134.657704 83.594765) (xy 134.855077 83.518208) (xy 135.033822 83.404773) (xy 135.058843 83.380944) - (xy 135.078163 83.394372) (xy 135.329215 83.504054) (xy 135.596789 83.562884) (xy 135.870695 83.568622) (xy 136.140499 83.521048) - (xy 136.395923 83.421975) (xy 136.62724 83.275177) (xy 136.825639 83.086245) (xy 136.983561 82.862375) (xy 137.031934 82.753726) - (xy 137.054474 82.810655) (xy 137.202883 83.040942) (xy 137.393196 83.238016) (xy 137.618163 83.394372) (xy 137.869215 83.504054) - (xy 138.136789 83.562884) (xy 138.410695 83.568622) (xy 138.680499 83.521048) (xy 138.935923 83.421975) (xy 139.16724 83.275177) - (xy 139.365639 83.086245) (xy 139.461625 82.950174) (xy 139.504969 82.995058) (xy 139.678807 83.115879) (xy 139.872802 83.200633) - (xy 140.079564 83.246093) (xy 140.291219 83.250526) (xy 140.499704 83.213765) (xy 140.546718 83.195529) (xy 140.69226 83.346242) - (xy 140.886549 83.481277) (xy 141.103367 83.576002) (xy 141.334454 83.62681) (xy 141.571009 83.631765) (xy 141.804022 83.590679) - (xy 142.024616 83.505116) (xy 142.22439 83.378335) (xy 142.395734 83.215167) (xy 142.532122 83.021824) (xy 142.628358 82.805673) - (xy 142.680778 82.574946) (xy 142.684552 82.304697) (xy 142.684552 88.479971) (xy 142.675431 88.457842) (xy 142.544495 88.260767) - (xy 142.377773 88.092878) (xy 142.181617 87.960569) (xy 141.963498 87.86888) (xy 141.731724 87.821303) (xy 141.495123 87.819651) - (xy 141.262707 87.863987) (xy 141.043329 87.952622) (xy 140.906541 88.042133) (xy 140.906541 85.504603) (xy 140.870259 85.321365) - (xy 140.799077 85.148665) (xy 140.695706 84.993079) (xy 140.564084 84.860535) (xy 140.409224 84.75608) (xy 140.237025 84.683694) - (xy 140.054045 84.646134) (xy 139.867255 84.64483) (xy 139.683768 84.679832) (xy 139.510575 84.749807) (xy 139.508512 84.751156) - (xy 139.348025 84.683694) (xy 139.165045 84.646134) (xy 138.978255 84.64483) (xy 138.794768 84.679832) (xy 138.621575 84.749807) - (xy 138.619512 84.751156) (xy 138.459025 84.683694) (xy 138.276045 84.646134) (xy 138.089255 84.64483) (xy 138.002557 84.661368) - (xy 138.0006 84.658423) (xy 137.851428 84.508207) (xy 137.675921 84.389825) (xy 137.480761 84.307788) (xy 137.273384 84.265219) - (xy 137.061689 84.263741) (xy 136.853738 84.30341) (xy 136.657452 84.382715) (xy 136.588892 84.427578) (xy 136.532921 84.389825) - (xy 136.337761 84.307788) (xy 136.130384 84.265219) (xy 135.918689 84.263741) (xy 135.710738 84.30341) (xy 135.514452 84.382715) - (xy 135.469279 84.412274) (xy 135.438428 84.381207) (xy 135.262921 84.262825) (xy 135.067761 84.180788) (xy 134.860384 84.138219) - (xy 134.648689 84.136741) (xy 134.440738 84.17641) (xy 134.244452 84.255715) (xy 134.067308 84.371634) (xy 133.916054 84.519753) - (xy 133.79645 84.694431) (xy 133.713052 84.889012) (xy 133.669037 85.096087) (xy 133.666081 85.307767) (xy 133.704297 85.51599) - (xy 133.78223 85.712825) (xy 133.89691 85.890773) (xy 134.043969 86.043058) (xy 134.217807 86.163879) (xy 134.411802 86.248633) - (xy 134.618564 86.294093) (xy 134.830219 86.298526) (xy 135.038704 86.261765) (xy 135.236077 86.185208) (xy 135.293442 86.148802) - (xy 135.313969 86.170058) (xy 135.487807 86.290879) (xy 135.681802 86.375633) (xy 135.888564 86.421093) (xy 136.100219 86.425526) - (xy 136.308704 86.388765) (xy 136.506077 86.312208) (xy 136.587316 86.260652) (xy 136.630807 86.290879) (xy 136.824802 86.375633) - (xy 137.031564 86.421093) (xy 137.243219 86.425526) (xy 137.451704 86.388765) (xy 137.575588 86.340712) (xy 137.709065 86.433482) - (xy 137.880237 86.508265) (xy 138.062674 86.548376) (xy 138.249428 86.552288) (xy 138.433386 86.519852) (xy 138.607539 86.452302) - (xy 138.62124 86.443606) (xy 138.769237 86.508265) (xy 138.951674 86.548376) (xy 139.138428 86.552288) (xy 139.322386 86.519852) - (xy 139.496539 86.452302) (xy 139.51024 86.443606) (xy 139.658237 86.508265) (xy 139.840674 86.548376) (xy 140.027428 86.552288) - (xy 140.211386 86.519852) (xy 140.385539 86.452302) (xy 140.543255 86.352212) (xy 140.678527 86.223395) (xy 140.786201 86.070756) - (xy 140.862178 85.900111) (xy 140.903562 85.717958) (xy 140.906541 85.504603) (xy 140.906541 88.042133) (xy 140.845344 88.082179) - (xy 140.676295 88.247724) (xy 140.54262 88.442952) (xy 140.449411 88.660425) (xy 140.400217 88.891862) (xy 140.396914 89.128446) - (xy 140.439626 89.361166) (xy 140.526727 89.581157) (xy 140.654899 89.780041) (xy 140.81926 89.950242) (xy 141.013549 90.085277) - (xy 141.230367 90.180002) (xy 141.461454 90.23081) (xy 141.698009 90.235765) (xy 141.931022 90.194679) (xy 142.151616 90.109116) - (xy 142.35139 89.982335) (xy 142.522734 89.819167) (xy 142.659122 89.625824) (xy 142.755358 89.409673) (xy 142.807778 89.178946) - (xy 142.811552 88.908697) (xy 142.811552 107.770439) (xy 142.684546 107.717051) (xy 142.684546 96.16015) (xy 142.643426 95.952481) - (xy 142.562754 95.756753) (xy 142.4456 95.580423) (xy 142.296428 95.430207) (xy 142.120921 95.311825) (xy 141.925761 95.229788) - (xy 141.718384 95.187219) (xy 141.506689 95.185741) (xy 141.298738 95.22541) (xy 141.102452 95.304715) (xy 141.057279 95.334274) - (xy 141.026428 95.303207) (xy 140.850921 95.184825) (xy 140.655761 95.102788) (xy 140.448384 95.060219) (xy 140.236689 95.058741) - (xy 140.028738 95.09841) (xy 139.832452 95.177715) (xy 139.655308 95.293634) (xy 139.509042 95.436867) (xy 139.502428 95.430207) - (xy 139.326921 95.311825) (xy 139.131761 95.229788) (xy 138.924384 95.187219) (xy 138.712689 95.185741) (xy 138.504738 95.22541) - (xy 138.308452 95.304715) (xy 138.131308 95.420634) (xy 137.980054 95.568753) (xy 137.86045 95.743431) (xy 137.777052 95.938012) - (xy 137.733037 96.145087) (xy 137.730081 96.356767) (xy 137.768297 96.56499) (xy 137.84623 96.761825) (xy 137.96091 96.939773) - (xy 138.107969 97.092058) (xy 138.281807 97.212879) (xy 138.475802 97.297633) (xy 138.682564 97.343093) (xy 138.894219 97.347526) - (xy 139.102704 97.310765) (xy 139.300077 97.234208) (xy 139.478822 97.120773) (xy 139.63213 96.97478) (xy 139.636678 96.968331) - (xy 139.805807 97.085879) (xy 139.999802 97.170633) (xy 140.206564 97.216093) (xy 140.418219 97.220526) (xy 140.626704 97.183765) - (xy 140.824077 97.107208) (xy 140.881442 97.070802) (xy 140.901969 97.092058) (xy 141.075807 97.212879) (xy 141.269802 97.297633) - (xy 141.476564 97.343093) (xy 141.688219 97.347526) (xy 141.896704 97.310765) (xy 142.094077 97.234208) (xy 142.272822 97.120773) - (xy 142.42613 96.97478) (xy 142.548161 96.80179) (xy 142.634268 96.608392) (xy 142.68117 96.401952) (xy 142.684546 96.16015) - (xy 142.684546 107.717051) (xy 142.598498 107.68088) (xy 142.557546 107.672473) (xy 142.557546 106.32015) (xy 142.516426 106.112481) - (xy 142.435754 105.916753) (xy 142.3186 105.740423) (xy 142.317514 105.739329) (xy 142.386178 105.585111) (xy 142.427562 105.402958) - (xy 142.430541 105.189603) (xy 142.394259 105.006365) (xy 142.323077 104.833665) (xy 142.219706 104.678079) (xy 142.088084 104.545535) - (xy 142.049546 104.51954) (xy 142.049546 103.01815) (xy 142.008426 102.810481) (xy 141.927754 102.614753) (xy 141.843705 102.488249) - (xy 141.913161 102.38979) (xy 141.999268 102.196392) (xy 142.04617 101.989952) (xy 142.049546 101.74815) (xy 142.008426 101.540481) - (xy 141.927754 101.344753) (xy 141.8106 101.168423) (xy 141.661428 101.018207) (xy 141.485921 100.899825) (xy 141.290761 100.817788) - (xy 141.083384 100.775219) (xy 140.871689 100.773741) (xy 140.663738 100.81341) (xy 140.467452 100.892715) (xy 140.290308 101.008634) - (xy 140.139054 101.156753) (xy 140.01945 101.331431) (xy 139.936052 101.526012) (xy 139.906725 101.663984) (xy 139.890546 101.663871) - (xy 139.890546 98.82715) (xy 139.849426 98.619481) (xy 139.768754 98.423753) (xy 139.6516 98.247423) (xy 139.502428 98.097207) - (xy 139.326921 97.978825) (xy 139.131761 97.896788) (xy 138.924384 97.854219) (xy 138.712689 97.852741) (xy 138.504738 97.89241) - (xy 138.308452 97.971715) (xy 138.131308 98.087634) (xy 137.980054 98.235753) (xy 137.86045 98.410431) (xy 137.777052 98.605012) - (xy 137.733037 98.812087) (xy 137.730081 99.023767) (xy 137.768297 99.23199) (xy 137.84623 99.428825) (xy 137.96091 99.606773) - (xy 138.107969 99.759058) (xy 138.281807 99.879879) (xy 138.475802 99.964633) (xy 138.682564 100.010093) (xy 138.894219 100.014526) - (xy 139.102704 99.977765) (xy 139.300077 99.901208) (xy 139.478822 99.787773) (xy 139.63213 99.64178) (xy 139.754161 99.46879) - (xy 139.840268 99.275392) (xy 139.88717 99.068952) (xy 139.890546 98.82715) (xy 139.890546 101.663871) (xy 139.728689 101.662741) - (xy 139.520738 101.70241) (xy 139.324452 101.781715) (xy 139.147308 101.897634) (xy 138.996054 102.045753) (xy 138.87645 102.220431) - (xy 138.793052 102.415012) (xy 138.749037 102.622087) (xy 138.746081 102.833767) (xy 138.784297 103.04199) (xy 138.86223 103.238825) - (xy 138.97691 103.416773) (xy 139.123969 103.569058) (xy 139.297807 103.689879) (xy 139.491802 103.774633) (xy 139.698564 103.820093) - (xy 139.910219 103.824526) (xy 140.113995 103.788595) (xy 140.11991 103.797773) (xy 140.266969 103.950058) (xy 140.440807 104.070879) - (xy 140.634802 104.155633) (xy 140.841564 104.201093) (xy 141.053219 104.205526) (xy 141.261704 104.168765) (xy 141.459077 104.092208) - (xy 141.637822 103.978773) (xy 141.79113 103.83278) (xy 141.913161 103.65979) (xy 141.999268 103.466392) (xy 142.04617 103.259952) - (xy 142.049546 103.01815) (xy 142.049546 104.51954) (xy 141.933224 104.44108) (xy 141.761025 104.368694) (xy 141.578045 104.331134) - (xy 141.391255 104.32983) (xy 141.207768 104.364832) (xy 141.034575 104.434807) (xy 140.878272 104.537089) (xy 140.744812 104.667782) - (xy 140.639279 104.821909) (xy 140.565693 104.993599) (xy 140.526856 105.176312) (xy 140.524248 105.363089) (xy 140.557968 105.546815) - (xy 140.626732 105.720493) (xy 140.639327 105.740037) (xy 140.52745 105.903431) (xy 140.444052 106.098012) (xy 140.400037 106.305087) - (xy 140.397081 106.516767) (xy 140.435297 106.72499) (xy 140.51323 106.921825) (xy 140.62791 107.099773) (xy 140.774969 107.252058) - (xy 140.948807 107.372879) (xy 141.142802 107.457633) (xy 141.349564 107.503093) (xy 141.561219 107.507526) (xy 141.769704 107.470765) - (xy 141.967077 107.394208) (xy 142.145822 107.280773) (xy 142.29913 107.13478) (xy 142.421161 106.96179) (xy 142.507268 106.768392) - (xy 142.55417 106.561952) (xy 142.557546 106.32015) (xy 142.557546 107.672473) (xy 142.366724 107.633303) (xy 142.130123 107.631651) - (xy 141.897707 107.675987) (xy 141.678329 107.764622) (xy 141.480344 107.894179) (xy 141.311295 108.059724) (xy 141.17762 108.254952) - (xy 141.084411 108.472425) (xy 141.035217 108.703862) (xy 141.031914 108.940446) (xy 141.074626 109.173166) (xy 141.161727 109.393157) - (xy 141.289899 109.592041) (xy 141.45426 109.762242) (xy 141.648549 109.897277) (xy 141.865367 109.992002) (xy 142.096454 110.04281) - (xy 142.333009 110.047765) (xy 142.566022 110.006679) (xy 142.786616 109.921116) (xy 142.98639 109.794335) (xy 143.157734 109.631167) - (xy 143.294122 109.437824) (xy 143.390358 109.221673) (xy 143.442778 108.990946) (xy 143.446552 108.720697) (xy 143.446552 113.01412) - (xy 143.444914 113.131446) (xy 143.487626 113.364166) (xy 143.574727 113.584157) (xy 143.702899 113.783041) (xy 143.86726 113.953242) - (xy 144.061549 114.088277) (xy 144.278367 114.183002) (xy 144.509454 114.23381) (xy 144.564813 114.234969) (xy 146.673422 116.343579) - (xy 146.738664 116.397169) (xy 146.803394 116.451484) (xy 146.807611 116.453802) (xy 146.811324 116.456852) (xy 146.885761 116.496765) - (xy 146.95978 116.537457) (xy 146.964359 116.538909) (xy 146.968601 116.541184) (xy 147.04943 116.565895) (xy 147.129886 116.591418) - (xy 147.134662 116.591953) (xy 147.139262 116.59336) (xy 147.223321 116.601898) (xy 147.307233 116.611311) (xy 147.316626 116.611376) - (xy 147.316809 116.611395) (xy 147.316978 116.611378) (xy 147.32 116.6114) (xy 151.784266 116.6114) (xy 151.808549 116.628277) - (xy 152.025367 116.723002) (xy 152.256454 116.77381) (xy 152.493009 116.778765) (xy 152.726022 116.737679) (xy 152.946616 116.652116) - (xy 153.14639 116.525335) (xy 153.189376 116.4844) (xy 158.595079 116.4844) (xy 158.72626 116.620242) (xy 158.920549 116.755277) - (xy 159.137367 116.850002) (xy 159.279301 116.881208) (xy 159.267399 116.888997) (xy 159.071658 117.080681) (xy 158.916877 117.306734) - (xy 158.87735 117.398955) (xy 158.846446 117.323975) (xy 158.694835 117.095783) (xy 158.50179 116.901385) (xy 158.274662 116.748185) - (xy 158.022103 116.642019) (xy 157.753733 116.586931) (xy 157.479774 116.585018) (xy 157.210661 116.636354) (xy 156.956644 116.738984) - (xy 156.727399 116.888997) (xy 156.531658 117.080681) (xy 156.376877 117.306734) (xy 156.26895 117.558546) (xy 156.211989 117.826524) - (xy 156.208164 118.100464) (xy 156.25762 118.369928) (xy 156.358474 118.624655) (xy 156.506883 118.854942) (xy 156.697196 119.052016) - (xy 156.922163 119.208372) (xy 157.022699 119.252295) (xy 156.956644 119.278984) (xy 156.727399 119.428997) (xy 156.531658 119.620681) - (xy 156.376877 119.846734) (xy 156.26895 120.098546) (xy 156.211989 120.366524) (xy 156.208164 120.640464) (xy 156.25762 120.909928) - (xy 156.358474 121.164655) (xy 156.506883 121.394942) (xy 156.697196 121.592016) (xy 156.922163 121.748372) (xy 157.173215 121.858054) - (xy 157.440789 121.916884) (xy 157.714695 121.922622) (xy 157.984499 121.875048) (xy 158.239923 121.775975) (xy 158.47124 121.629177) - (xy 158.669639 121.440245) (xy 158.827561 121.216375) (xy 158.875934 121.107726) (xy 158.898474 121.164655) (xy 159.046883 121.394942) - (xy 159.237196 121.592016) (xy 159.462163 121.748372) (xy 159.713215 121.858054) (xy 159.980789 121.916884) (xy 160.254695 121.922622) - (xy 160.524499 121.875048) (xy 160.779923 121.775975) (xy 161.01124 121.629177) (xy 161.209639 121.440245) (xy 161.367561 121.216375) - (xy 161.415934 121.107726) (xy 161.438474 121.164655) (xy 161.586883 121.394942) (xy 161.777196 121.592016) (xy 162.002163 121.748372) - (xy 162.253215 121.858054) (xy 162.520789 121.916884) (xy 162.794695 121.922622) (xy 163.064499 121.875048) (xy 163.319923 121.775975) - (xy 163.55124 121.629177) (xy 163.749639 121.440245) (xy 163.907561 121.216375) (xy 163.955934 121.107726) (xy 163.978474 121.164655) - (xy 164.126883 121.394942) (xy 164.317196 121.592016) (xy 164.542163 121.748372) (xy 164.793215 121.858054) (xy 165.060789 121.916884) - (xy 165.334695 121.922622) (xy 165.604499 121.875048) (xy 165.859923 121.775975) (xy 166.09124 121.629177) (xy 166.289639 121.440245) - (xy 166.447561 121.216375) (xy 166.558993 120.966095) (xy 166.61969 120.698938) (xy 166.624059 120.386017) (xy 166.570846 120.117269) - (xy 166.466446 119.863975) (xy 166.314835 119.635783) (xy 166.12179 119.441385) (xy 166.030783 119.38) (xy 166.051542 119.38) - (xy 166.174223 119.355597) (xy 166.289785 119.30773) (xy 166.393789 119.238237) (xy 166.482237 119.149789) (xy 166.55173 119.045785) - (xy 166.599597 118.930223) (xy 166.624 118.807542) (xy 166.624 118.682458) (xy 166.624 117.158458) (xy 166.599597 117.035777) - (xy 166.55173 116.920215) (xy 166.482237 116.816211) (xy 166.393789 116.727763) (xy 166.289785 116.65827) (xy 166.174223 116.610403) - (xy 166.118023 116.599224) (xy 166.157205 116.595796) (xy 166.161823 116.594454) (xy 166.166608 116.593985) (xy 166.24748 116.569568) - (xy 166.328579 116.546007) (xy 166.332845 116.543795) (xy 166.337451 116.542405) (xy 166.412051 116.502738) (xy 166.487018 116.46388) - (xy 166.490775 116.46088) (xy 166.495021 116.458623) (xy 166.560467 116.405246) (xy 166.626488 116.352543) (xy 166.633176 116.345946) - (xy 166.633318 116.345831) (xy 166.633426 116.3457) (xy 166.635578 116.343578) (xy 168.489142 114.490014) (xy 168.6318 114.493003) - (xy 168.88934 114.447592) (xy 169.133154 114.353022) (xy 169.353957 114.212897) (xy 169.543337 114.032552) (xy 169.694081 113.818858) - (xy 169.800448 113.579955) (xy 169.858386 113.324941) (xy 169.862557 113.026244) (xy 169.862557 119.188824) (xy 169.839107 119.131931) - (xy 169.694388 118.914111) (xy 169.510118 118.728549) (xy 169.293314 118.582313) (xy 169.052235 118.480973) (xy 168.796063 118.428388) - (xy 168.534557 118.426563) (xy 168.277676 118.475565) (xy 168.035206 118.57353) (xy 167.816381 118.716725) (xy 167.629537 118.899695) - (xy 167.481791 119.115473) (xy 167.37877 119.355839) (xy 167.324399 119.611637) (xy 167.320747 119.873124) (xy 167.367955 120.130341) - (xy 167.464225 120.373489) (xy 167.605888 120.593308) (xy 167.78755 120.781425) (xy 168.002291 120.930674) (xy 168.241932 121.03537) - (xy 168.497344 121.091526) (xy 168.7588 121.097003) (xy 169.01634 121.051592) (xy 169.260154 120.957022) (xy 169.480957 120.816897) - (xy 169.670337 120.636552) (xy 169.821081 120.422858) (xy 169.927448 120.183955) (xy 169.985386 119.928941) (xy 169.989557 119.630244) - (xy 169.989557 122.626169) (xy 169.972184 122.616619) (xy 169.968363 122.615407) (xy 169.964833 122.613514) (xy 169.897535 122.592939) - (xy 169.830429 122.571652) (xy 169.826445 122.571205) (xy 169.822615 122.570034) (xy 169.752627 122.562924) (xy 169.682639 122.555074) - (xy 169.674802 122.555019) (xy 169.67466 122.555005) (xy 169.674526 122.555017) (xy 169.672 122.555) (xy 167.005 122.555) - (xy 166.934849 122.561878) (xy 166.864829 122.568004) (xy 166.860985 122.56912) (xy 166.856993 122.569512) (xy 166.789552 122.589873) - (xy 166.722018 122.609494) (xy 166.718462 122.611337) (xy 166.714624 122.612496) (xy 166.652467 122.645545) (xy 166.589985 122.677933) - (xy 166.586852 122.680433) (xy 166.583316 122.682314) (xy 166.528791 122.726783) (xy 166.47376 122.770714) (xy 166.468181 122.776215) - (xy 166.468069 122.776307) (xy 166.467983 122.77641) (xy 166.466184 122.778185) (xy 165.292369 123.952) (xy 147.25463 123.952) - (xy 146.558 123.25537) (xy 146.558 122.555) (xy 146.55113 122.484936) (xy 146.544997 122.41483) (xy 146.543879 122.410982) - (xy 146.543488 122.406993) (xy 146.523135 122.339581) (xy 146.503506 122.272018) (xy 146.501662 122.268462) (xy 146.500504 122.264624) - (xy 146.467443 122.202446) (xy 146.435067 122.139986) (xy 146.432568 122.136855) (xy 146.430686 122.133316) (xy 146.386199 122.078769) - (xy 146.342286 122.02376) (xy 146.336787 122.018185) (xy 146.336693 122.018069) (xy 146.336585 122.017979) (xy 146.334815 122.016185) - (xy 144.302815 119.984185) (xy 144.2484 119.939487) (xy 144.194505 119.894264) (xy 144.190997 119.892335) (xy 144.187897 119.889789) - (xy 144.125831 119.85651) (xy 144.064184 119.822619) (xy 144.060363 119.821407) (xy 144.056833 119.819514) (xy 143.989535 119.798939) - (xy 143.922429 119.777652) (xy 143.918445 119.777205) (xy 143.914615 119.776034) (xy 143.844627 119.768924) (xy 143.774639 119.761074) - (xy 143.766802 119.761019) (xy 143.76666 119.761005) (xy 143.766526 119.761017) (xy 143.764 119.761) (xy 143.573541 119.761) - (xy 143.573541 116.111603) (xy 143.537259 115.928365) (xy 143.466077 115.755665) (xy 143.362706 115.600079) (xy 143.231084 115.467535) - (xy 143.076224 115.36308) (xy 142.904025 115.290694) (xy 142.721045 115.253134) (xy 142.534255 115.25183) (xy 142.350768 115.286832) - (xy 142.177575 115.356807) (xy 142.021272 115.459089) (xy 141.887812 115.589782) (xy 141.782279 115.743909) (xy 141.708693 115.915599) - (xy 141.669856 116.098312) (xy 141.667248 116.285089) (xy 141.700968 116.468815) (xy 141.769732 116.642493) (xy 141.87092 116.799506) - (xy 142.000679 116.933875) (xy 142.154065 117.040482) (xy 142.325237 117.115265) (xy 142.507674 117.155376) (xy 142.694428 117.159288) - (xy 142.878386 117.126852) (xy 143.052539 117.059302) (xy 143.210255 116.959212) (xy 143.345527 116.830395) (xy 143.453201 116.677756) - (xy 143.529178 116.507111) (xy 143.570562 116.324958) (xy 143.573541 116.111603) (xy 143.573541 119.761) (xy 140.398541 119.761) - (xy 140.398541 116.111603) (xy 140.362259 115.928365) (xy 140.291077 115.755665) (xy 140.187706 115.600079) (xy 140.056084 115.467535) - (xy 139.901224 115.36308) (xy 139.729025 115.290694) (xy 139.546045 115.253134) (xy 139.359255 115.25183) (xy 139.175768 115.286832) - (xy 139.002575 115.356807) (xy 138.846272 115.459089) (xy 138.712812 115.589782) (xy 138.607279 115.743909) (xy 138.533693 115.915599) - (xy 138.494856 116.098312) (xy 138.492248 116.285089) (xy 138.525968 116.468815) (xy 138.594732 116.642493) (xy 138.69592 116.799506) - (xy 138.825679 116.933875) (xy 138.979065 117.040482) (xy 139.150237 117.115265) (xy 139.332674 117.155376) (xy 139.519428 117.159288) - (xy 139.703386 117.126852) (xy 139.877539 117.059302) (xy 140.035255 116.959212) (xy 140.170527 116.830395) (xy 140.278201 116.677756) - (xy 140.354178 116.507111) (xy 140.395562 116.324958) (xy 140.398541 116.111603) (xy 140.398541 119.761) (xy 139.192 119.761) - (xy 139.121936 119.767869) (xy 139.05183 119.774003) (xy 139.047982 119.77512) (xy 139.043993 119.775512) (xy 138.976581 119.795864) - (xy 138.909018 119.815494) (xy 138.905462 119.817337) (xy 138.901624 119.818496) (xy 138.839446 119.851556) (xy 138.776986 119.883933) - (xy 138.773855 119.886431) (xy 138.770316 119.888314) (xy 138.715769 119.9328) (xy 138.66076 119.976714) (xy 138.655185 119.982212) - (xy 138.655069 119.982307) (xy 138.654979 119.982414) (xy 138.653185 119.984185) (xy 137.98737 120.65) (xy 137.831591 120.65) - (xy 137.854778 120.547946) (xy 137.858552 120.277697) (xy 137.812595 120.045596) (xy 137.722431 119.826842) (xy 137.591495 119.629767) - (xy 137.424773 119.461878) (xy 137.228617 119.329569) (xy 137.010498 119.23788) (xy 136.778724 119.190303) (xy 136.542123 119.188651) - (xy 136.309707 119.232987) (xy 136.271 119.248625) (xy 136.271 114.188785) (xy 136.336899 114.291041) (xy 136.50126 114.461242) - (xy 136.695549 114.596277) (xy 136.912367 114.691002) (xy 137.143454 114.74181) (xy 137.380009 114.746765) (xy 137.613022 114.705679) - (xy 137.833616 114.620116) (xy 138.03339 114.493335) (xy 138.204734 114.330167) (xy 138.341122 114.136824) (xy 138.437358 113.920673) - (xy 138.489778 113.689946) (xy 138.493552 113.419697) (xy 138.447595 113.187596) (xy 138.357431 112.968842) (xy 138.226495 112.771767) - (xy 138.059773 112.603878) (xy 137.863617 112.471569) (xy 137.645498 112.37988) (xy 137.413724 112.332303) (xy 137.177123 112.330651) - (xy 136.944707 112.374987) (xy 136.725329 112.463622) (xy 136.527344 112.593179) (xy 136.358295 112.758724) (xy 136.235227 112.938459) - (xy 136.216506 112.874018) (xy 136.214662 112.870462) (xy 136.213504 112.866624) (xy 136.180443 112.804446) (xy 136.148067 112.741986) - (xy 136.145568 112.738855) (xy 136.143686 112.735316) (xy 136.099199 112.680769) (xy 136.055286 112.62576) (xy 136.049787 112.620185) - (xy 136.049693 112.620069) (xy 136.049585 112.619979) (xy 136.047815 112.618185) (xy 135.2469 111.81727) (xy 135.385386 111.792852) - (xy 135.559539 111.725302) (xy 135.717255 111.625212) (xy 135.852527 111.496395) (xy 135.960201 111.343756) (xy 136.036178 111.173111) - (xy 136.077562 110.990958) (xy 136.080541 110.777603) (xy 136.044259 110.594365) (xy 135.973077 110.421665) (xy 135.869706 110.266079) - (xy 135.738084 110.133535) (xy 135.583224 110.02908) (xy 135.411025 109.956694) (xy 135.228045 109.919134) (xy 135.041255 109.91783) - (xy 134.857768 109.952832) (xy 134.684575 110.022807) (xy 134.682512 110.024156) (xy 134.522025 109.956694) (xy 134.339045 109.919134) - (xy 134.152255 109.91783) (xy 134.112 109.925509) (xy 134.112 107.886749) (xy 134.185428 107.888288) (xy 134.369386 107.855852) - (xy 134.543539 107.788302) (xy 134.55724 107.779606) (xy 134.705237 107.844265) (xy 134.887674 107.884376) (xy 135.074428 107.888288) - (xy 135.258386 107.855852) (xy 135.432539 107.788302) (xy 135.590255 107.688212) (xy 135.725527 107.559395) (xy 135.833201 107.406756) - (xy 135.909178 107.236111) (xy 135.950562 107.053958) (xy 135.951328 106.999067) (xy 135.973219 106.999526) (xy 136.181704 106.962765) - (xy 136.379077 106.886208) (xy 136.527404 106.792076) (xy 136.610237 106.828265) (xy 136.792674 106.868376) (xy 136.979428 106.872288) - (xy 137.163386 106.839852) (xy 137.337539 106.772302) (xy 137.477316 106.683596) (xy 137.476248 106.760089) (xy 137.509968 106.943815) - (xy 137.578732 107.117493) (xy 137.67992 107.274506) (xy 137.809679 107.408875) (xy 137.963065 107.515482) (xy 138.122847 107.585289) - (xy 138.144968 107.705815) (xy 138.213732 107.879493) (xy 138.31492 108.036506) (xy 138.444679 108.170875) (xy 138.598065 108.277482) - (xy 138.769237 108.352265) (xy 138.951674 108.392376) (xy 139.138428 108.396288) (xy 139.322386 108.363852) (xy 139.496539 108.296302) - (xy 139.654255 108.196212) (xy 139.789527 108.067395) (xy 139.897201 107.914756) (xy 139.973178 107.744111) (xy 140.014562 107.561958) - (xy 140.017541 107.348603) (xy 139.981259 107.165365) (xy 139.910077 106.992665) (xy 139.806706 106.837079) (xy 139.675084 106.704535) - (xy 139.520224 106.60008) (xy 139.372951 106.538172) (xy 139.346259 106.403365) (xy 139.275077 106.230665) (xy 139.171706 106.075079) - (xy 139.040084 105.942535) (xy 138.885224 105.83808) (xy 138.713025 105.765694) (xy 138.530045 105.728134) (xy 138.343255 105.72683) - (xy 138.159768 105.761832) (xy 137.986575 105.831807) (xy 137.857258 105.916429) (xy 137.858541 105.824603) (xy 137.822259 105.641365) - (xy 137.751077 105.468665) (xy 137.647706 105.313079) (xy 137.516084 105.180535) (xy 137.477541 105.154537) (xy 137.477541 88.552603) - (xy 137.441259 88.369365) (xy 137.370077 88.196665) (xy 137.266706 88.041079) (xy 137.135084 87.908535) (xy 136.980224 87.80408) - (xy 136.808025 87.731694) (xy 136.625045 87.694134) (xy 136.438255 87.69283) (xy 136.254768 87.727832) (xy 136.081575 87.797807) - (xy 136.079512 87.799156) (xy 135.919025 87.731694) (xy 135.736045 87.694134) (xy 135.549255 87.69283) (xy 135.365768 87.727832) - (xy 135.192575 87.797807) (xy 135.036272 87.900089) (xy 134.902812 88.030782) (xy 134.797279 88.184909) (xy 134.723693 88.356599) - (xy 134.684856 88.539312) (xy 134.682248 88.726089) (xy 134.697556 88.809497) (xy 134.670495 88.768767) (xy 134.503773 88.600878) - (xy 134.307617 88.468569) (xy 134.089498 88.37688) (xy 133.857724 88.329303) (xy 133.621123 88.327651) (xy 133.388707 88.371987) - (xy 133.169329 88.460622) (xy 132.971344 88.590179) (xy 132.905552 88.654607) (xy 132.905552 82.685697) (xy 132.859595 82.453596) - (xy 132.769431 82.234842) (xy 132.638495 82.037767) (xy 132.471773 81.869878) (xy 132.275617 81.737569) (xy 132.057498 81.64588) - (xy 131.825724 81.598303) (xy 131.589123 81.596651) (xy 131.356707 81.640987) (xy 131.137329 81.729622) (xy 130.939344 81.859179) - (xy 130.770295 82.024724) (xy 130.63662 82.219952) (xy 130.543411 82.437425) (xy 130.494217 82.668862) (xy 130.490914 82.905446) - (xy 130.533626 83.138166) (xy 130.620727 83.358157) (xy 130.748899 83.557041) (xy 130.91326 83.727242) (xy 131.107549 83.862277) - (xy 131.324367 83.957002) (xy 131.555454 84.00781) (xy 131.792009 84.012765) (xy 132.025022 83.971679) (xy 132.245616 83.886116) - (xy 132.44539 83.759335) (xy 132.616734 83.596167) (xy 132.753122 83.402824) (xy 132.849358 83.186673) (xy 132.901778 82.955946) - (xy 132.905552 82.685697) (xy 132.905552 88.654607) (xy 132.802295 88.755724) (xy 132.66862 88.950952) (xy 132.575411 89.168425) - (xy 132.526217 89.399862) (xy 132.522914 89.636446) (xy 132.565626 89.869166) (xy 132.652727 90.089157) (xy 132.780899 90.288041) - (xy 132.94526 90.458242) (xy 133.139549 90.593277) (xy 133.356367 90.688002) (xy 133.587454 90.73881) (xy 133.824009 90.743765) - (xy 134.057022 90.702679) (xy 134.277616 90.617116) (xy 134.47739 90.490335) (xy 134.648734 90.327167) (xy 134.785122 90.133824) - (xy 134.881358 89.917673) (xy 134.933778 89.686946) (xy 134.937552 89.416697) (xy 134.906984 89.262318) (xy 135.015679 89.374875) - (xy 135.169065 89.481482) (xy 135.340237 89.556265) (xy 135.522674 89.596376) (xy 135.709428 89.600288) (xy 135.893386 89.567852) - (xy 136.067539 89.500302) (xy 136.08124 89.491606) (xy 136.229237 89.556265) (xy 136.411674 89.596376) (xy 136.598428 89.600288) - (xy 136.782386 89.567852) (xy 136.956539 89.500302) (xy 137.114255 89.400212) (xy 137.249527 89.271395) (xy 137.357201 89.118756) - (xy 137.433178 88.948111) (xy 137.474562 88.765958) (xy 137.477541 88.552603) (xy 137.477541 105.154537) (xy 137.361224 105.07608) - (xy 137.350546 105.071591) (xy 137.350546 97.17615) (xy 137.309426 96.968481) (xy 137.228754 96.772753) (xy 137.1116 96.596423) - (xy 136.962428 96.446207) (xy 136.931934 96.425638) (xy 136.96617 96.274952) (xy 136.969546 96.03315) (xy 136.928426 95.825481) - (xy 136.847754 95.629753) (xy 136.7306 95.453423) (xy 136.581428 95.303207) (xy 136.405921 95.184825) (xy 136.210761 95.102788) - (xy 136.003384 95.060219) (xy 135.791689 95.058741) (xy 135.583738 95.09841) (xy 135.387452 95.177715) (xy 135.210308 95.293634) - (xy 135.059054 95.441753) (xy 134.93945 95.616431) (xy 134.856052 95.811012) (xy 134.812037 96.018087) (xy 134.809519 96.198341) - (xy 134.803428 96.192207) (xy 134.627921 96.073825) (xy 134.432761 95.991788) (xy 134.428362 95.990885) (xy 134.429546 95.90615) - (xy 134.388426 95.698481) (xy 134.307754 95.502753) (xy 134.1906 95.326423) (xy 134.041428 95.176207) (xy 133.865921 95.057825) - (xy 133.670761 94.975788) (xy 133.63266 94.967966) (xy 133.626426 94.936481) (xy 133.545754 94.740753) (xy 133.4286 94.564423) - (xy 133.413541 94.549258) (xy 133.413541 91.981603) (xy 133.377259 91.798365) (xy 133.306077 91.625665) (xy 133.202706 91.470079) - (xy 133.071084 91.337535) (xy 133.031269 91.310679) (xy 133.032541 91.219603) (xy 132.996259 91.036365) (xy 132.925077 90.863665) - (xy 132.821706 90.708079) (xy 132.690084 90.575535) (xy 132.535224 90.47108) (xy 132.363025 90.398694) (xy 132.180045 90.361134) - (xy 131.993255 90.35983) (xy 131.809768 90.394832) (xy 131.636575 90.464807) (xy 131.480272 90.567089) (xy 131.346812 90.697782) - (xy 131.241279 90.851909) (xy 131.167693 91.023599) (xy 131.128856 91.206312) (xy 131.126248 91.393089) (xy 131.159968 91.576815) - (xy 131.228732 91.750493) (xy 131.32992 91.907506) (xy 131.459679 92.041875) (xy 131.508356 92.075706) (xy 131.507248 92.155089) - (xy 131.540968 92.338815) (xy 131.609732 92.512493) (xy 131.71092 92.669506) (xy 131.840679 92.803875) (xy 131.994065 92.910482) - (xy 132.165237 92.985265) (xy 132.347674 93.025376) (xy 132.534428 93.029288) (xy 132.718386 92.996852) (xy 132.892539 92.929302) - (xy 133.050255 92.829212) (xy 133.185527 92.700395) (xy 133.293201 92.547756) (xy 133.369178 92.377111) (xy 133.410562 92.194958) - (xy 133.413541 91.981603) (xy 133.413541 94.549258) (xy 133.279428 94.414207) (xy 133.103921 94.295825) (xy 132.908761 94.213788) - (xy 132.701384 94.171219) (xy 132.489689 94.169741) (xy 132.281738 94.20941) (xy 132.085452 94.288715) (xy 131.908308 94.404634) - (xy 131.757054 94.552753) (xy 131.686157 94.656294) (xy 131.678706 94.645079) (xy 131.547084 94.512535) (xy 131.392224 94.40808) - (xy 131.220025 94.335694) (xy 131.037045 94.298134) (xy 130.850255 94.29683) (xy 130.666768 94.331832) (xy 130.493575 94.401807) - (xy 130.491512 94.403156) (xy 130.331025 94.335694) (xy 130.238552 94.316712) (xy 130.238552 89.670697) (xy 130.192595 89.438596) - (xy 130.102431 89.219842) (xy 129.971495 89.022767) (xy 129.804773 88.854878) (xy 129.608617 88.722569) (xy 129.390498 88.63088) - (xy 129.158724 88.583303) (xy 129.032059 88.582418) (xy 129.032059 68.443017) (xy 128.978846 68.174269) (xy 128.874446 67.920975) - (xy 128.722835 67.692783) (xy 128.52979 67.498385) (xy 128.302662 67.345185) (xy 128.050103 67.239019) (xy 127.781733 67.183931) - (xy 127.635059 67.182906) (xy 127.635059 65.903017) (xy 127.581846 65.634269) (xy 127.477446 65.380975) (xy 127.325835 65.152783) - (xy 127.13279 64.958385) (xy 126.905662 64.805185) (xy 126.653103 64.699019) (xy 126.384733 64.643931) (xy 126.110774 64.642018) - (xy 125.841661 64.693354) (xy 125.587644 64.795984) (xy 125.358399 64.945997) (xy 125.162658 65.137681) (xy 125.007877 65.363734) - (xy 124.89995 65.615546) (xy 124.842989 65.883524) (xy 124.841059 66.021747) (xy 124.841059 65.903017) (xy 124.787846 65.634269) - (xy 124.683446 65.380975) (xy 124.531835 65.152783) (xy 124.33879 64.958385) (xy 124.111662 64.805185) (xy 123.859103 64.699019) - (xy 123.590733 64.643931) (xy 123.316774 64.642018) (xy 123.047661 64.693354) (xy 122.793644 64.795984) (xy 122.564399 64.945997) - (xy 122.368658 65.137681) (xy 122.213877 65.363734) (xy 122.109609 65.607007) (xy 122.016446 65.380975) (xy 121.864835 65.152783) - (xy 121.67179 64.958385) (xy 121.444662 64.805185) (xy 121.192103 64.699019) (xy 120.923733 64.643931) (xy 120.649774 64.642018) - (xy 120.380661 64.693354) (xy 120.126644 64.795984) (xy 119.897399 64.945997) (xy 119.701658 65.137681) (xy 119.546877 65.363734) - (xy 119.43895 65.615546) (xy 119.381989 65.883524) (xy 119.378164 66.157464) (xy 119.42762 66.426928) (xy 119.528474 66.681655) - (xy 119.676883 66.911942) (xy 119.867196 67.109016) (xy 120.092163 67.265372) (xy 120.343215 67.375054) (xy 120.610789 67.433884) - (xy 120.884695 67.439622) (xy 121.154499 67.392048) (xy 121.409923 67.292975) (xy 121.64124 67.146177) (xy 121.839639 66.957245) - (xy 121.997561 66.733375) (xy 122.108993 66.483095) (xy 122.11186 66.470472) (xy 122.195474 66.681655) (xy 122.343883 66.911942) - (xy 122.534196 67.109016) (xy 122.759163 67.265372) (xy 123.010215 67.375054) (xy 123.277789 67.433884) (xy 123.551695 67.439622) - (xy 123.821499 67.392048) (xy 124.076923 67.292975) (xy 124.30824 67.146177) (xy 124.506639 66.957245) (xy 124.664561 66.733375) - (xy 124.775993 66.483095) (xy 124.83669 66.215938) (xy 124.841059 65.903017) (xy 124.841059 66.021747) (xy 124.839164 66.157464) - (xy 124.88862 66.426928) (xy 124.989474 66.681655) (xy 125.137883 66.911942) (xy 125.328196 67.109016) (xy 125.553163 67.265372) - (xy 125.804215 67.375054) (xy 126.071789 67.433884) (xy 126.345695 67.439622) (xy 126.615499 67.392048) (xy 126.870923 67.292975) - (xy 127.10224 67.146177) (xy 127.300639 66.957245) (xy 127.458561 66.733375) (xy 127.569993 66.483095) (xy 127.63069 66.215938) - (xy 127.635059 65.903017) (xy 127.635059 67.182906) (xy 127.507774 67.182018) (xy 127.238661 67.233354) (xy 126.984644 67.335984) - (xy 126.755399 67.485997) (xy 126.559658 67.677681) (xy 126.404877 67.903734) (xy 126.29695 68.155546) (xy 126.239989 68.423524) - (xy 126.238059 68.561747) (xy 126.238059 68.443017) (xy 126.184846 68.174269) (xy 126.080446 67.920975) (xy 125.928835 67.692783) - (xy 125.73579 67.498385) (xy 125.508662 67.345185) (xy 125.256103 67.239019) (xy 124.987733 67.183931) (xy 124.713774 67.182018) - (xy 124.444661 67.233354) (xy 124.190644 67.335984) (xy 123.961399 67.485997) (xy 123.765658 67.677681) (xy 123.610877 67.903734) - (xy 123.50295 68.155546) (xy 123.445989 68.423524) (xy 123.444059 68.561747) (xy 123.444059 68.443017) (xy 123.390846 68.174269) - (xy 123.286446 67.920975) (xy 123.134835 67.692783) (xy 122.94179 67.498385) (xy 122.714662 67.345185) (xy 122.462103 67.239019) - (xy 122.193733 67.183931) (xy 121.919774 67.182018) (xy 121.650661 67.233354) (xy 121.396644 67.335984) (xy 121.167399 67.485997) - (xy 120.971658 67.677681) (xy 120.816877 67.903734) (xy 120.712609 68.147007) (xy 120.619446 67.920975) (xy 120.467835 67.692783) - (xy 120.27479 67.498385) (xy 120.047662 67.345185) (xy 119.795103 67.239019) (xy 119.526733 67.183931) (xy 119.252774 67.182018) - (xy 118.983661 67.233354) (xy 118.729644 67.335984) (xy 118.500399 67.485997) (xy 118.304658 67.677681) (xy 118.149877 67.903734) - (xy 118.04195 68.155546) (xy 117.984989 68.423524) (xy 117.983 68.565972) (xy 117.983 67.755458) (xy 117.958597 67.632777) - (xy 117.91073 67.517215) (xy 117.855593 67.434696) (xy 118.090695 67.439622) (xy 118.360499 67.392048) (xy 118.615923 67.292975) - (xy 118.84724 67.146177) (xy 119.045639 66.957245) (xy 119.203561 66.733375) (xy 119.314993 66.483095) (xy 119.37569 66.215938) - (xy 119.380059 65.903017) (xy 119.326846 65.634269) (xy 119.222446 65.380975) (xy 119.070835 65.152783) (xy 118.87779 64.958385) - (xy 118.650662 64.805185) (xy 118.398103 64.699019) (xy 118.129733 64.643931) (xy 117.855774 64.642018) (xy 117.586661 64.693354) - (xy 117.332644 64.795984) (xy 117.103399 64.945997) (xy 116.907658 65.137681) (xy 116.752877 65.363734) (xy 116.64495 65.615546) - (xy 116.587989 65.883524) (xy 116.584164 66.157464) (xy 116.63362 66.426928) (xy 116.734474 66.681655) (xy 116.882883 66.911942) - (xy 117.073196 67.109016) (xy 117.179645 67.183) (xy 115.761458 67.183) (xy 115.638777 67.207403) (xy 115.523215 67.25527) - (xy 115.419211 67.324763) (xy 115.330763 67.413211) (xy 115.26127 67.517215) (xy 115.213403 67.632777) (xy 115.189 67.755458) - (xy 115.189 67.880542) (xy 115.189 69.404542) (xy 115.213403 69.527223) (xy 115.26127 69.642785) (xy 115.330763 69.746789) - (xy 115.419211 69.835237) (xy 115.523215 69.90473) (xy 115.638777 69.952597) (xy 115.761458 69.977) (xy 115.886542 69.977) - (xy 117.410542 69.977) (xy 117.533223 69.952597) (xy 117.648785 69.90473) (xy 117.752789 69.835237) (xy 117.841237 69.746789) - (xy 117.91073 69.642785) (xy 117.958597 69.527223) (xy 117.983 69.404542) (xy 117.983 69.279458) (xy 117.983 68.707467) - (xy 118.03062 68.966928) (xy 118.131474 69.221655) (xy 118.279883 69.451942) (xy 118.470196 69.649016) (xy 118.695163 69.805372) - (xy 118.946215 69.915054) (xy 119.213789 69.973884) (xy 119.487695 69.979622) (xy 119.757499 69.932048) (xy 120.012923 69.832975) - (xy 120.24424 69.686177) (xy 120.442639 69.497245) (xy 120.600561 69.273375) (xy 120.711993 69.023095) (xy 120.71486 69.010472) - (xy 120.798474 69.221655) (xy 120.946883 69.451942) (xy 121.137196 69.649016) (xy 121.362163 69.805372) (xy 121.613215 69.915054) - (xy 121.880789 69.973884) (xy 122.154695 69.979622) (xy 122.424499 69.932048) (xy 122.679923 69.832975) (xy 122.91124 69.686177) - (xy 123.109639 69.497245) (xy 123.267561 69.273375) (xy 123.378993 69.023095) (xy 123.43969 68.755938) (xy 123.444059 68.443017) - (xy 123.444059 68.561747) (xy 123.442164 68.697464) (xy 123.49162 68.966928) (xy 123.592474 69.221655) (xy 123.740883 69.451942) - (xy 123.931196 69.649016) (xy 124.156163 69.805372) (xy 124.407215 69.915054) (xy 124.674789 69.973884) (xy 124.948695 69.979622) - (xy 125.218499 69.932048) (xy 125.473923 69.832975) (xy 125.70524 69.686177) (xy 125.903639 69.497245) (xy 126.061561 69.273375) - (xy 126.172993 69.023095) (xy 126.23369 68.755938) (xy 126.238059 68.443017) (xy 126.238059 68.561747) (xy 126.236164 68.697464) - (xy 126.28562 68.966928) (xy 126.386474 69.221655) (xy 126.534883 69.451942) (xy 126.725196 69.649016) (xy 126.950163 69.805372) - (xy 127.201215 69.915054) (xy 127.468789 69.973884) (xy 127.742695 69.979622) (xy 128.012499 69.932048) (xy 128.267923 69.832975) - (xy 128.49924 69.686177) (xy 128.697639 69.497245) (xy 128.855561 69.273375) (xy 128.966993 69.023095) (xy 129.02769 68.755938) - (xy 129.032059 68.443017) (xy 129.032059 88.582418) (xy 128.922123 88.581651) (xy 128.689707 88.625987) (xy 128.470329 88.714622) - (xy 128.272344 88.844179) (xy 128.103295 89.009724) (xy 127.96962 89.204952) (xy 127.876411 89.422425) (xy 127.827217 89.653862) - (xy 127.823914 89.890446) (xy 127.866626 90.123166) (xy 127.953727 90.343157) (xy 128.081899 90.542041) (xy 128.24626 90.712242) - (xy 128.440549 90.847277) (xy 128.657367 90.942002) (xy 128.888454 90.99281) (xy 129.125009 90.997765) (xy 129.358022 90.956679) - (xy 129.578616 90.871116) (xy 129.77839 90.744335) (xy 129.949734 90.581167) (xy 130.086122 90.387824) (xy 130.182358 90.171673) - (xy 130.234778 89.940946) (xy 130.238552 89.670697) (xy 130.238552 94.316712) (xy 130.148045 94.298134) (xy 129.961255 94.29683) - (xy 129.777768 94.331832) (xy 129.604575 94.401807) (xy 129.602512 94.403156) (xy 129.442025 94.335694) (xy 129.259045 94.298134) - (xy 129.072255 94.29683) (xy 128.888768 94.331832) (xy 128.715575 94.401807) (xy 128.559272 94.504089) (xy 128.425812 94.634782) - (xy 128.320279 94.788909) (xy 128.246693 94.960599) (xy 128.207856 95.143312) (xy 128.205248 95.330089) (xy 128.238968 95.513815) - (xy 128.307732 95.687493) (xy 128.40892 95.844506) (xy 128.538679 95.978875) (xy 128.692065 96.085482) (xy 128.863237 96.160265) - (xy 129.045674 96.200376) (xy 129.232428 96.204288) (xy 129.416386 96.171852) (xy 129.590539 96.104302) (xy 129.60424 96.095606) - (xy 129.752237 96.160265) (xy 129.934674 96.200376) (xy 130.121428 96.204288) (xy 130.305386 96.171852) (xy 130.479539 96.104302) - (xy 130.49324 96.095606) (xy 130.641237 96.160265) (xy 130.765975 96.18769) (xy 130.748037 96.272087) (xy 130.745081 96.483767) - (xy 130.783297 96.69199) (xy 130.86123 96.888825) (xy 130.97591 97.066773) (xy 131.122969 97.219058) (xy 131.296807 97.339879) - (xy 131.490802 97.424633) (xy 131.697564 97.470093) (xy 131.909219 97.474526) (xy 132.117704 97.437765) (xy 132.315077 97.361208) - (xy 132.493822 97.247773) (xy 132.64713 97.10178) (xy 132.769161 96.92879) (xy 132.771135 96.924356) (xy 132.820807 96.958879) - (xy 133.014802 97.043633) (xy 133.032077 97.047431) (xy 133.031081 97.118767) (xy 133.069297 97.32699) (xy 133.14723 97.523825) - (xy 133.26191 97.701773) (xy 133.408969 97.854058) (xy 133.582807 97.974879) (xy 133.776802 98.059633) (xy 133.983564 98.105093) - (xy 134.195219 98.109526) (xy 134.403704 98.072765) (xy 134.601077 97.996208) (xy 134.779822 97.882773) (xy 134.93313 97.73678) - (xy 135.055161 97.56379) (xy 135.141268 97.370392) (xy 135.18817 97.163952) (xy 135.190908 96.967796) (xy 135.228559 96.993964) - (xy 135.193037 97.161087) (xy 135.190081 97.372767) (xy 135.228297 97.58099) (xy 135.30623 97.777825) (xy 135.42091 97.955773) - (xy 135.567969 98.108058) (xy 135.741807 98.228879) (xy 135.935802 98.313633) (xy 136.142564 98.359093) (xy 136.354219 98.363526) - (xy 136.562704 98.326765) (xy 136.760077 98.250208) (xy 136.938822 98.136773) (xy 137.09213 97.99078) (xy 137.214161 97.81779) - (xy 137.300268 97.624392) (xy 137.34717 97.417952) (xy 137.350546 97.17615) (xy 137.350546 105.071591) (xy 137.189025 105.003694) - (xy 137.006045 104.966134) (xy 136.819255 104.96483) (xy 136.635768 104.999832) (xy 136.525407 105.04442) (xy 136.405921 104.963825) - (xy 136.210761 104.881788) (xy 136.003384 104.839219) (xy 135.791689 104.837741) (xy 135.583738 104.87741) (xy 135.387452 104.956715) - (xy 135.210308 105.072634) (xy 135.062378 105.217497) (xy 135.064541 105.062603) (xy 135.028259 104.879365) (xy 134.957077 104.706665) - (xy 134.853706 104.551079) (xy 134.722084 104.418535) (xy 134.567224 104.31408) (xy 134.395025 104.241694) (xy 134.212045 104.204134) - (xy 134.025255 104.20283) (xy 133.882661 104.230031) (xy 133.228265 103.575635) (xy 133.312527 103.495395) (xy 133.420201 103.342756) - (xy 133.496178 103.172111) (xy 133.537562 102.989958) (xy 133.540541 102.776603) (xy 133.504259 102.593365) (xy 133.433077 102.420665) - (xy 133.329706 102.265079) (xy 133.198084 102.132535) (xy 133.043224 102.02808) (xy 132.871025 101.955694) (xy 132.688045 101.918134) - (xy 132.501255 101.91683) (xy 132.317768 101.951832) (xy 132.144575 102.021807) (xy 131.988272 102.124089) (xy 131.854812 102.254782) - (xy 131.749279 102.408909) (xy 131.675693 102.580599) (xy 131.636856 102.763312) (xy 131.635366 102.87) (xy 130.238546 102.87) - (xy 130.238546 98.95415) (xy 130.197426 98.746481) (xy 130.116754 98.550753) (xy 129.9996 98.374423) (xy 129.850428 98.224207) - (xy 129.674921 98.105825) (xy 129.479761 98.023788) (xy 129.272384 97.981219) (xy 129.060689 97.979741) (xy 128.852738 98.01941) - (xy 128.656452 98.098715) (xy 128.479308 98.214634) (xy 128.328054 98.362753) (xy 128.20845 98.537431) (xy 128.125052 98.732012) - (xy 128.081037 98.939087) (xy 128.078081 99.150767) (xy 128.116297 99.35899) (xy 128.19423 99.555825) (xy 128.30891 99.733773) - (xy 128.455969 99.886058) (xy 128.629807 100.006879) (xy 128.823802 100.091633) (xy 129.030564 100.137093) (xy 129.242219 100.141526) - (xy 129.450704 100.104765) (xy 129.648077 100.028208) (xy 129.826822 99.914773) (xy 129.98013 99.76878) (xy 130.102161 99.59579) - (xy 130.188268 99.402392) (xy 130.23517 99.195952) (xy 130.238546 98.95415) (xy 130.238546 102.87) (xy 129.413 102.87) - (xy 129.342936 102.876869) (xy 129.27283 102.883003) (xy 129.268982 102.88412) (xy 129.264993 102.884512) (xy 129.197581 102.904864) - (xy 129.130018 102.924494) (xy 129.126462 102.926337) (xy 129.122624 102.927496) (xy 129.060446 102.960556) (xy 128.997986 102.992933) - (xy 128.994855 102.995431) (xy 128.991316 102.997314) (xy 128.936769 103.0418) (xy 128.88176 103.085714) (xy 128.876181 103.091215) - (xy 128.876069 103.091307) (xy 128.875983 103.09141) (xy 128.874185 103.093184) (xy 128.112185 103.855185) (xy 128.067487 103.909599) - (xy 128.022264 103.963495) (xy 128.020335 103.967002) (xy 128.017789 103.970103) (xy 127.98451 104.032168) (xy 127.950619 104.093816) - (xy 127.949407 104.097636) (xy 127.947514 104.101167) (xy 127.926939 104.168464) (xy 127.905652 104.235571) (xy 127.905205 104.239554) - (xy 127.904034 104.243385) (xy 127.896924 104.313372) (xy 127.889074 104.383361) (xy 127.889019 104.391197) (xy 127.889005 104.39134) - (xy 127.889017 104.391473) (xy 127.889 104.394) (xy 127.889 105.918) (xy 127.895874 105.988113) (xy 127.902004 106.05817) - (xy 127.90312 106.062012) (xy 127.903512 106.066007) (xy 127.923877 106.133459) (xy 127.943494 106.200982) (xy 127.945337 106.204537) - (xy 127.946496 106.208376) (xy 127.979556 106.270553) (xy 128.011933 106.333014) (xy 128.014431 106.336144) (xy 128.016314 106.339684) - (xy 128.0608 106.39423) (xy 128.104714 106.44924) (xy 128.110212 106.454814) (xy 128.110307 106.454931) (xy 128.110414 106.45502) - (xy 128.112185 106.456815) (xy 128.493184 106.837815) (xy 128.547597 106.88251) (xy 128.601495 106.927736) (xy 128.605006 106.929666) - (xy 128.608103 106.93221) (xy 128.670129 106.965468) (xy 128.731816 106.999381) (xy 128.735636 107.000592) (xy 128.739167 107.002486) - (xy 128.806464 107.02306) (xy 128.873571 107.044348) (xy 128.877554 107.044794) (xy 128.881385 107.045966) (xy 128.951372 107.053075) - (xy 128.956815 107.053685) (xy 128.970817 107.063417) (xy 128.970037 107.067087) (xy 128.967081 107.278767) (xy 129.005297 107.48699) - (xy 129.08323 107.683825) (xy 129.19791 107.861773) (xy 129.344969 108.014058) (xy 129.413 108.06134) (xy 129.413 110.964083) - (xy 129.272384 110.935219) (xy 129.060689 110.933741) (xy 128.852738 110.97341) (xy 128.656452 111.052715) (xy 128.479308 111.168634) - (xy 128.328054 111.316753) (xy 128.20845 111.491431) (xy 128.125052 111.686012) (xy 128.081037 111.893087) (xy 128.078081 112.104767) - (xy 128.116297 112.31299) (xy 128.19423 112.509825) (xy 128.24866 112.594284) (xy 128.090738 112.62441) (xy 127.894452 112.703715) - (xy 127.717308 112.819634) (xy 127.566054 112.967753) (xy 127.44645 113.142431) (xy 127.363052 113.337012) (xy 127.319037 113.544087) - (xy 127.316081 113.755767) (xy 127.354297 113.96399) (xy 127.43223 114.160825) (xy 127.54691 114.338773) (xy 127.693969 114.491058) - (xy 127.867807 114.611879) (xy 128.061802 114.696633) (xy 128.268564 114.742093) (xy 128.480219 114.746526) (xy 128.688704 114.709765) - (xy 128.886077 114.633208) (xy 129.064822 114.519773) (xy 129.21813 114.37378) (xy 129.340161 114.20079) (xy 129.413 114.037192) - (xy 129.413 115.697) (xy 129.419874 115.767113) (xy 129.426004 115.83717) (xy 129.42712 115.841012) (xy 129.427512 115.845007) - (xy 129.447877 115.912459) (xy 129.467494 115.979982) (xy 129.469337 115.983537) (xy 129.470496 115.987376) (xy 129.503556 116.049553) - (xy 129.535933 116.112014) (xy 129.538431 116.115144) (xy 129.540314 116.118684) (xy 129.5848 116.17323) (xy 129.628714 116.22824) - (xy 129.634212 116.233814) (xy 129.634307 116.233931) (xy 129.634414 116.23402) (xy 129.636185 116.235815) (xy 130.937 117.53663) - (xy 130.937 124.206) (xy 130.943874 124.276113) (xy 130.950004 124.34617) (xy 130.95112 124.350012) (xy 130.951512 124.354007) - (xy 130.971877 124.421459) (xy 130.991494 124.488982) (xy 130.993337 124.492537) (xy 130.994496 124.496376) (xy 131.027556 124.558553) - (xy 131.059933 124.621014) (xy 131.062431 124.624144) (xy 131.064314 124.627684) (xy 131.1088 124.68223) (xy 131.152714 124.73724) - (xy 131.158212 124.742814) (xy 131.158307 124.742931) (xy 131.158414 124.74302) (xy 131.160185 124.744815) (xy 138.780184 132.364815) - (xy 138.834597 132.40951) (xy 138.888495 132.454736) (xy 138.892006 132.456666) (xy 138.895103 132.45921) (xy 138.957129 132.492468) - (xy 139.018816 132.526381) (xy 139.022636 132.527592) (xy 139.026167 132.529486) (xy 139.093464 132.55006) (xy 139.160571 132.571348) - (xy 139.164554 132.571794) (xy 139.168385 132.572966) (xy 139.238372 132.580075) (xy 139.308361 132.587926) (xy 139.316197 132.58798) - (xy 139.31634 132.587995) (xy 139.316473 132.587982) (xy 139.319 132.588) (xy 155.513369 132.588) (xy 158.5201 135.59473) - (xy 158.353644 135.661984) (xy 158.124399 135.811997) (xy 157.928658 136.003681) (xy 157.773877 136.229734) (xy 157.73435 136.321955) - (xy 157.703446 136.246975) (xy 157.551835 136.018783) (xy 157.35879 135.824385) (xy 157.131662 135.671185) (xy 156.879103 135.565019) - (xy 156.610733 135.509931) (xy 156.336774 135.508018) (xy 156.067661 135.559354) (xy 155.813644 135.661984) (xy 155.584399 135.811997) - (xy 155.388658 136.003681) (xy 155.233877 136.229734) (xy 155.19435 136.321955) (xy 155.163446 136.246975) (xy 155.011835 136.018783) - (xy 154.81879 135.824385) (xy 154.591662 135.671185) (xy 154.339103 135.565019) (xy 154.070733 135.509931) (xy 153.796774 135.508018) - (xy 153.527661 135.559354) (xy 153.273644 135.661984) (xy 153.044399 135.811997) (xy 152.848658 136.003681) (xy 152.693877 136.229734) - (xy 152.65435 136.321955) (xy 152.623446 136.246975) (xy 152.471835 136.018783) (xy 152.27879 135.824385) (xy 152.051662 135.671185) - (xy 151.799103 135.565019) (xy 151.530733 135.509931) (xy 151.256774 135.508018) (xy 150.987661 135.559354) (xy 150.733644 135.661984) - (xy 150.504399 135.811997) (xy 150.308658 136.003681) (xy 150.153877 136.229734) (xy 150.11435 136.321955) (xy 150.083446 136.246975) - (xy 149.931835 136.018783) (xy 149.73879 135.824385) (xy 149.511662 135.671185) (xy 149.259103 135.565019) (xy 148.990733 135.509931) - (xy 148.716774 135.508018) (xy 148.447661 135.559354) (xy 148.193644 135.661984) (xy 147.964399 135.811997) (xy 147.768658 136.003681) - (xy 147.613877 136.229734) (xy 147.57435 136.321955) (xy 147.543446 136.246975) (xy 147.391835 136.018783) (xy 147.19879 135.824385) - (xy 146.971662 135.671185) (xy 146.719103 135.565019) (xy 146.450733 135.509931) (xy 146.176774 135.508018) (xy 145.907661 135.559354) - (xy 145.653644 135.661984) (xy 145.424399 135.811997) (xy 145.228658 136.003681) (xy 145.073877 136.229734) (xy 145.03435 136.321955) - (xy 145.003446 136.246975) (xy 144.851835 136.018783) (xy 144.65879 135.824385) (xy 144.431662 135.671185) (xy 144.179103 135.565019) - (xy 143.910733 135.509931) (xy 143.636774 135.508018) (xy 143.367661 135.559354) (xy 143.113644 135.661984) (xy 142.884399 135.811997) - (xy 142.688658 136.003681) (xy 142.533877 136.229734) (xy 142.49435 136.321955) (xy 142.463446 136.246975) (xy 142.311835 136.018783) - (xy 142.11879 135.824385) (xy 141.891662 135.671185) (xy 141.639103 135.565019) (xy 141.370733 135.509931) (xy 141.096774 135.508018) - (xy 140.827661 135.559354) (xy 140.573644 135.661984) (xy 140.344399 135.811997) (xy 140.148658 136.003681) (xy 139.993877 136.229734) - (xy 139.95435 136.321955) (xy 139.923446 136.246975) (xy 139.771835 136.018783) (xy 139.57879 135.824385) (xy 139.500968 135.771893) - (xy 139.527255 135.755212) (xy 139.662527 135.626395) (xy 139.770201 135.473756) (xy 139.846178 135.303111) (xy 139.887562 135.120958) - (xy 139.890541 134.907603) (xy 139.854259 134.724365) (xy 139.783077 134.551665) (xy 139.679706 134.396079) (xy 139.548084 134.263535) - (xy 139.393224 134.15908) (xy 139.221025 134.086694) (xy 139.038045 134.049134) (xy 138.851255 134.04783) (xy 138.667768 134.082832) - (xy 138.494575 134.152807) (xy 138.492512 134.154156) (xy 138.332025 134.086694) (xy 138.149045 134.049134) (xy 137.962255 134.04783) - (xy 137.778768 134.082832) (xy 137.605575 134.152807) (xy 137.603512 134.154156) (xy 137.443025 134.086694) (xy 137.260045 134.049134) - (xy 137.073255 134.04783) (xy 136.889768 134.082832) (xy 136.716575 134.152807) (xy 136.714512 134.154156) (xy 136.554025 134.086694) - (xy 136.371045 134.049134) (xy 136.184255 134.04783) (xy 136.000768 134.082832) (xy 135.827575 134.152807) (xy 135.825512 134.154156) - (xy 135.665025 134.086694) (xy 135.482045 134.049134) (xy 135.295255 134.04783) (xy 135.111768 134.082832) (xy 134.938575 134.152807) - (xy 134.936512 134.154156) (xy 134.776025 134.086694) (xy 134.593045 134.049134) (xy 134.406255 134.04783) (xy 134.222768 134.082832) - (xy 134.049575 134.152807) (xy 134.047512 134.154156) (xy 133.887025 134.086694) (xy 133.704045 134.049134) (xy 133.517255 134.04783) - (xy 133.333768 134.082832) (xy 133.160575 134.152807) (xy 133.158512 134.154156) (xy 132.998025 134.086694) (xy 132.815045 134.049134) - (xy 132.628255 134.04783) (xy 132.444768 134.082832) (xy 132.271575 134.152807) (xy 132.115272 134.255089) (xy 131.981812 134.385782) - (xy 131.876279 134.539909) (xy 131.802693 134.711599) (xy 131.763856 134.894312) (xy 131.761248 135.081089) (xy 131.794968 135.264815) - (xy 131.863732 135.438493) (xy 131.96492 135.595506) (xy 132.094679 135.729875) (xy 132.248065 135.836482) (xy 132.419237 135.911265) - (xy 132.585664 135.947856) (xy 132.528658 136.003681) (xy 132.373877 136.229734) (xy 132.33435 136.321955) (xy 132.303446 136.246975) - (xy 132.151835 136.018783) (xy 131.95879 135.824385) (xy 131.731662 135.671185) (xy 131.479103 135.565019) (xy 131.210733 135.509931) - (xy 130.936774 135.508018) (xy 130.667661 135.559354) (xy 130.413644 135.661984) (xy 130.184399 135.811997) (xy 129.988658 136.003681) - (xy 129.833877 136.229734) (xy 129.79435 136.321955) (xy 129.763446 136.246975) (xy 129.611835 136.018783) (xy 129.41879 135.824385) - (xy 129.191662 135.671185) (xy 128.939103 135.565019) (xy 128.670733 135.509931) (xy 128.396774 135.508018) (xy 128.127661 135.559354) - (xy 127.873644 135.661984) (xy 127.644399 135.811997) (xy 127.448658 136.003681) (xy 127.293877 136.229734) (xy 127.25435 136.321955) - (xy 127.223446 136.246975) (xy 127.071835 136.018783) (xy 126.87879 135.824385) (xy 126.651662 135.671185) (xy 126.428541 135.577393) - (xy 126.428541 92.870603) (xy 126.392259 92.687365) (xy 126.321077 92.514665) (xy 126.217706 92.359079) (xy 126.174541 92.315611) - (xy 126.174541 74.582603) (xy 126.174541 71.153603) (xy 126.138259 70.970365) (xy 126.067077 70.797665) (xy 125.963706 70.642079) - (xy 125.832084 70.509535) (xy 125.677224 70.40508) (xy 125.505025 70.332694) (xy 125.322045 70.295134) (xy 125.135255 70.29383) - (xy 124.951768 70.328832) (xy 124.778575 70.398807) (xy 124.622272 70.501089) (xy 124.488812 70.631782) (xy 124.383279 70.785909) - (xy 124.309693 70.957599) (xy 124.270856 71.140312) (xy 124.268248 71.327089) (xy 124.301968 71.510815) (xy 124.370732 71.684493) - (xy 124.47192 71.841506) (xy 124.601679 71.975875) (xy 124.755065 72.082482) (xy 124.926237 72.157265) (xy 125.108674 72.197376) - (xy 125.295428 72.201288) (xy 125.479386 72.168852) (xy 125.653539 72.101302) (xy 125.811255 72.001212) (xy 125.946527 71.872395) - (xy 126.054201 71.719756) (xy 126.130178 71.549111) (xy 126.171562 71.366958) (xy 126.174541 71.153603) (xy 126.174541 74.582603) - (xy 126.138259 74.399365) (xy 126.067077 74.226665) (xy 125.963706 74.071079) (xy 125.832084 73.938535) (xy 125.677224 73.83408) - (xy 125.505025 73.761694) (xy 125.322045 73.724134) (xy 125.135255 73.72283) (xy 124.951768 73.757832) (xy 124.778575 73.827807) - (xy 124.622272 73.930089) (xy 124.488812 74.060782) (xy 124.383279 74.214909) (xy 124.309693 74.386599) (xy 124.270856 74.569312) - (xy 124.268248 74.756089) (xy 124.301968 74.939815) (xy 124.370732 75.113493) (xy 124.47192 75.270506) (xy 124.601679 75.404875) - (xy 124.755065 75.511482) (xy 124.926237 75.586265) (xy 125.108674 75.626376) (xy 125.295428 75.630288) (xy 125.479386 75.597852) - (xy 125.653539 75.530302) (xy 125.811255 75.430212) (xy 125.946527 75.301395) (xy 126.054201 75.148756) (xy 126.130178 74.978111) - (xy 126.171562 74.795958) (xy 126.174541 74.582603) (xy 126.174541 92.315611) (xy 126.086084 92.226535) (xy 125.931224 92.12208) - (xy 125.759025 92.049694) (xy 125.666546 92.03071) (xy 125.666546 85.74615) (xy 125.625426 85.538481) (xy 125.544754 85.342753) - (xy 125.4276 85.166423) (xy 125.278428 85.016207) (xy 125.102921 84.897825) (xy 124.907761 84.815788) (xy 124.700384 84.773219) - (xy 124.488689 84.771741) (xy 124.280738 84.81141) (xy 124.084452 84.890715) (xy 124.036866 84.921854) (xy 124.0306 84.912423) - (xy 123.881428 84.762207) (xy 123.705921 84.643825) (xy 123.510761 84.561788) (xy 123.303384 84.519219) (xy 123.091689 84.517741) - (xy 122.883738 84.55741) (xy 122.687452 84.636715) (xy 122.510308 84.752634) (xy 122.492367 84.770202) (xy 122.484428 84.762207) - (xy 122.308921 84.643825) (xy 122.113761 84.561788) (xy 121.906384 84.519219) (xy 121.694689 84.517741) (xy 121.486738 84.55741) - (xy 121.290452 84.636715) (xy 121.113308 84.752634) (xy 121.030981 84.833254) (xy 120.960428 84.762207) (xy 120.784921 84.643825) - (xy 120.589761 84.561788) (xy 120.382384 84.519219) (xy 120.170689 84.517741) (xy 119.962738 84.55741) (xy 119.766452 84.636715) - (xy 119.589308 84.752634) (xy 119.438054 84.900753) (xy 119.31845 85.075431) (xy 119.235052 85.270012) (xy 119.191037 85.477087) - (xy 119.188081 85.688767) (xy 119.226297 85.89699) (xy 119.30423 86.093825) (xy 119.41891 86.271773) (xy 119.565969 86.424058) - (xy 119.739807 86.544879) (xy 119.933802 86.629633) (xy 120.140564 86.675093) (xy 120.352219 86.679526) (xy 120.560704 86.642765) - (xy 120.758077 86.566208) (xy 120.936822 86.452773) (xy 121.031047 86.363043) (xy 121.089969 86.424058) (xy 121.263807 86.544879) - (xy 121.457802 86.629633) (xy 121.664564 86.675093) (xy 121.876219 86.679526) (xy 122.084704 86.642765) (xy 122.282077 86.566208) - (xy 122.460822 86.452773) (xy 122.489285 86.425667) (xy 122.660807 86.544879) (xy 122.854802 86.629633) (xy 123.061564 86.675093) - (xy 123.273219 86.679526) (xy 123.481704 86.642765) (xy 123.679077 86.566208) (xy 123.739145 86.528087) (xy 123.883969 86.678058) - (xy 124.057807 86.798879) (xy 124.251802 86.883633) (xy 124.458564 86.929093) (xy 124.670219 86.933526) (xy 124.878704 86.896765) - (xy 125.076077 86.820208) (xy 125.254822 86.706773) (xy 125.40813 86.56078) (xy 125.530161 86.38779) (xy 125.616268 86.194392) - (xy 125.66317 85.987952) (xy 125.666546 85.74615) (xy 125.666546 92.03071) (xy 125.576045 92.012134) (xy 125.389255 92.01083) - (xy 125.205768 92.045832) (xy 125.032575 92.115807) (xy 124.876272 92.218089) (xy 124.742812 92.348782) (xy 124.637279 92.502909) - (xy 124.563693 92.674599) (xy 124.524856 92.857312) (xy 124.522248 93.044089) (xy 124.528629 93.078857) (xy 124.397575 93.131807) - (xy 124.395512 93.133156) (xy 124.235025 93.065694) (xy 124.052045 93.028134) (xy 124.015546 93.027879) (xy 124.015546 89.93715) - (xy 123.974426 89.729481) (xy 123.893754 89.533753) (xy 123.7766 89.357423) (xy 123.627428 89.207207) (xy 123.451921 89.088825) - (xy 123.256761 89.006788) (xy 123.049384 88.964219) (xy 122.837689 88.962741) (xy 122.629738 89.00241) (xy 122.433452 89.081715) - (xy 122.256308 89.197634) (xy 122.105054 89.345753) (xy 121.98545 89.520431) (xy 121.902052 89.715012) (xy 121.858037 89.922087) - (xy 121.855081 90.133767) (xy 121.893297 90.34199) (xy 121.97123 90.538825) (xy 122.08591 90.716773) (xy 122.232969 90.869058) - (xy 122.406807 90.989879) (xy 122.600802 91.074633) (xy 122.807564 91.120093) (xy 123.019219 91.124526) (xy 123.227704 91.087765) - (xy 123.425077 91.011208) (xy 123.603822 90.897773) (xy 123.75713 90.75178) (xy 123.879161 90.57879) (xy 123.965268 90.385392) - (xy 124.01217 90.178952) (xy 124.015546 89.93715) (xy 124.015546 93.027879) (xy 123.865255 93.02683) (xy 123.681768 93.061832) - (xy 123.508575 93.131807) (xy 123.506512 93.133156) (xy 123.346025 93.065694) (xy 123.163045 93.028134) (xy 122.976255 93.02683) - (xy 122.792768 93.061832) (xy 122.619575 93.131807) (xy 122.617512 93.133156) (xy 122.457025 93.065694) (xy 122.274045 93.028134) - (xy 122.087255 93.02683) (xy 121.903768 93.061832) (xy 121.730575 93.131807) (xy 121.574272 93.234089) (xy 121.440812 93.364782) - (xy 121.335279 93.518909) (xy 121.261693 93.690599) (xy 121.222856 93.873312) (xy 121.220248 94.060089) (xy 121.253968 94.243815) - (xy 121.322732 94.417493) (xy 121.42392 94.574506) (xy 121.553679 94.708875) (xy 121.707065 94.815482) (xy 121.878237 94.890265) - (xy 122.060674 94.930376) (xy 122.247428 94.934288) (xy 122.431386 94.901852) (xy 122.605539 94.834302) (xy 122.61924 94.825606) - (xy 122.767237 94.890265) (xy 122.949674 94.930376) (xy 123.136428 94.934288) (xy 123.320386 94.901852) (xy 123.494539 94.834302) - (xy 123.50824 94.825606) (xy 123.656237 94.890265) (xy 123.838674 94.930376) (xy 124.025428 94.934288) (xy 124.209386 94.901852) - (xy 124.383539 94.834302) (xy 124.39724 94.825606) (xy 124.545237 94.890265) (xy 124.727674 94.930376) (xy 124.914428 94.934288) - (xy 125.098386 94.901852) (xy 125.272539 94.834302) (xy 125.430255 94.734212) (xy 125.565527 94.605395) (xy 125.673201 94.452756) - (xy 125.749178 94.282111) (xy 125.790562 94.099958) (xy 125.793541 93.886603) (xy 125.789112 93.864236) (xy 125.907539 93.818302) - (xy 126.065255 93.718212) (xy 126.200527 93.589395) (xy 126.308201 93.436756) (xy 126.384178 93.266111) (xy 126.425562 93.083958) - (xy 126.428541 92.870603) (xy 126.428541 135.577393) (xy 126.399103 135.565019) (xy 126.130733 135.509931) (xy 125.856774 135.508018) - (xy 125.587661 135.559354) (xy 125.333644 135.661984) (xy 125.104399 135.811997) (xy 124.968065 135.945505) (xy 124.968065 125.707564) - (xy 124.968065 120.627564) (xy 124.910014 120.334384) (xy 124.796123 120.058063) (xy 124.777552 120.030111) (xy 124.777552 98.941697) - (xy 124.731595 98.709596) (xy 124.641431 98.490842) (xy 124.510495 98.293767) (xy 124.343773 98.125878) (xy 124.147617 97.993569) - (xy 123.929498 97.90188) (xy 123.697724 97.854303) (xy 123.461123 97.852651) (xy 123.228707 97.896987) (xy 123.009329 97.985622) - (xy 122.811344 98.115179) (xy 122.642295 98.280724) (xy 122.50862 98.475952) (xy 122.415411 98.693425) (xy 122.366217 98.924862) - (xy 122.362914 99.161446) (xy 122.405626 99.394166) (xy 122.492727 99.614157) (xy 122.620899 99.813041) (xy 122.78526 99.983242) - (xy 122.979549 100.118277) (xy 123.196367 100.213002) (xy 123.427454 100.26381) (xy 123.664009 100.268765) (xy 123.897022 100.227679) - (xy 124.117616 100.142116) (xy 124.31739 100.015335) (xy 124.488734 99.852167) (xy 124.625122 99.658824) (xy 124.721358 99.442673) - (xy 124.773778 99.211946) (xy 124.777552 98.941697) (xy 124.777552 120.030111) (xy 124.650546 119.838952) (xy 124.650546 110.25715) - (xy 124.609426 110.049481) (xy 124.528754 109.853753) (xy 124.523546 109.845914) (xy 124.523546 105.17715) (xy 124.482426 104.969481) - (xy 124.401754 104.773753) (xy 124.2846 104.597423) (xy 124.135428 104.447207) (xy 123.959921 104.328825) (xy 123.764761 104.246788) - (xy 123.557384 104.204219) (xy 123.345689 104.202741) (xy 123.137738 104.24241) (xy 122.941452 104.321715) (xy 122.764308 104.437634) - (xy 122.613054 104.585753) (xy 122.49345 104.760431) (xy 122.410052 104.955012) (xy 122.366037 105.162087) (xy 122.364552 105.268428) - (xy 122.364552 102.497697) (xy 122.318595 102.265596) (xy 122.228431 102.046842) (xy 122.097495 101.849767) (xy 121.930773 101.681878) - (xy 121.734617 101.549569) (xy 121.516498 101.45788) (xy 121.284724 101.410303) (xy 121.048123 101.408651) (xy 120.815707 101.452987) - (xy 120.596329 101.541622) (xy 120.398344 101.671179) (xy 120.229295 101.836724) (xy 120.09562 102.031952) (xy 120.002411 102.249425) - (xy 119.953217 102.480862) (xy 119.949914 102.717446) (xy 119.992626 102.950166) (xy 120.079727 103.170157) (xy 120.207899 103.369041) - (xy 120.37226 103.539242) (xy 120.566549 103.674277) (xy 120.783367 103.769002) (xy 121.014454 103.81981) (xy 121.251009 103.824765) - (xy 121.484022 103.783679) (xy 121.704616 103.698116) (xy 121.90439 103.571335) (xy 122.075734 103.408167) (xy 122.212122 103.214824) - (xy 122.308358 102.998673) (xy 122.360778 102.767946) (xy 122.364552 102.497697) (xy 122.364552 105.268428) (xy 122.363081 105.373767) - (xy 122.401297 105.58199) (xy 122.47923 105.778825) (xy 122.59391 105.956773) (xy 122.740969 106.109058) (xy 122.914807 106.229879) - (xy 123.108802 106.314633) (xy 123.315564 106.360093) (xy 123.527219 106.364526) (xy 123.735704 106.327765) (xy 123.933077 106.251208) - (xy 124.111822 106.137773) (xy 124.26513 105.99178) (xy 124.387161 105.81879) (xy 124.473268 105.625392) (xy 124.52017 105.418952) - (xy 124.523546 105.17715) (xy 124.523546 109.845914) (xy 124.4116 109.677423) (xy 124.262428 109.527207) (xy 124.086921 109.408825) - (xy 123.891761 109.326788) (xy 123.684384 109.284219) (xy 123.472689 109.282741) (xy 123.264738 109.32241) (xy 123.068452 109.401715) - (xy 122.891308 109.517634) (xy 122.740054 109.665753) (xy 122.62045 109.840431) (xy 122.537052 110.035012) (xy 122.493037 110.242087) - (xy 122.490081 110.453767) (xy 122.528297 110.66199) (xy 122.60623 110.858825) (xy 122.72091 111.036773) (xy 122.867969 111.189058) - (xy 123.041807 111.309879) (xy 123.235802 111.394633) (xy 123.442564 111.440093) (xy 123.654219 111.444526) (xy 123.862704 111.407765) - (xy 124.060077 111.331208) (xy 124.238822 111.217773) (xy 124.39213 111.07178) (xy 124.514161 110.89879) (xy 124.600268 110.705392) - (xy 124.64717 110.498952) (xy 124.650546 110.25715) (xy 124.650546 119.838952) (xy 124.63073 119.809127) (xy 124.420135 119.597056) - (xy 124.172359 119.429929) (xy 123.89684 119.314112) (xy 123.604072 119.254015) (xy 123.507546 119.253341) (xy 123.507546 115.21015) - (xy 123.466426 115.002481) (xy 123.385754 114.806753) (xy 123.2686 114.630423) (xy 123.119428 114.480207) (xy 122.943921 114.361825) - (xy 122.748761 114.279788) (xy 122.541384 114.237219) (xy 122.329689 114.235741) (xy 122.121738 114.27541) (xy 121.925452 114.354715) - (xy 121.748308 114.470634) (xy 121.597054 114.618753) (xy 121.47745 114.793431) (xy 121.394052 114.988012) (xy 121.350037 115.195087) - (xy 121.347081 115.406767) (xy 121.385297 115.61499) (xy 121.46323 115.811825) (xy 121.57791 115.989773) (xy 121.724969 116.142058) - (xy 121.898807 116.262879) (xy 122.092802 116.347633) (xy 122.299564 116.393093) (xy 122.511219 116.397526) (xy 122.719704 116.360765) - (xy 122.917077 116.284208) (xy 123.095822 116.170773) (xy 123.24913 116.02478) (xy 123.371161 115.85179) (xy 123.457268 115.658392) - (xy 123.50417 115.451952) (xy 123.507546 115.21015) (xy 123.507546 119.253341) (xy 123.305208 119.251929) (xy 123.01163 119.307932) - (xy 122.73452 119.419891) (xy 122.484435 119.583542) (xy 122.270899 119.792652) (xy 122.102047 120.039255) (xy 121.984309 120.313959) - (xy 121.92217 120.606299) (xy 121.917997 120.905142) (xy 121.971949 121.199104) (xy 122.081971 121.476988) (xy 122.243872 121.72821) - (xy 122.451486 121.9432) (xy 122.696904 122.11377) (xy 122.970779 122.233423) (xy 123.262679 122.297602) (xy 123.561486 122.303861) - (xy 123.855817 122.251962) (xy 124.134462 122.143883) (xy 124.386808 121.983739) (xy 124.603243 121.777631) (xy 124.775522 121.53341) - (xy 124.897084 121.260377) (xy 124.963299 120.968932) (xy 124.968065 120.627564) (xy 124.968065 125.707564) (xy 124.910014 125.414384) - (xy 124.796123 125.138063) (xy 124.63073 124.889127) (xy 124.420135 124.677056) (xy 124.172359 124.509929) (xy 123.89684 124.394112) - (xy 123.604072 124.334015) (xy 123.305208 124.331929) (xy 123.01163 124.387932) (xy 122.73452 124.499891) (xy 122.484435 124.663542) - (xy 122.270899 124.872652) (xy 122.102047 125.119255) (xy 121.984309 125.393959) (xy 121.92217 125.686299) (xy 121.917997 125.985142) - (xy 121.971949 126.279104) (xy 122.081971 126.556988) (xy 122.243872 126.80821) (xy 122.451486 127.0232) (xy 122.696904 127.19377) - (xy 122.970779 127.313423) (xy 123.262679 127.377602) (xy 123.561486 127.383861) (xy 123.855817 127.331962) (xy 124.134462 127.223883) - (xy 124.386808 127.063739) (xy 124.603243 126.857631) (xy 124.775522 126.61341) (xy 124.897084 126.340377) (xy 124.963299 126.048932) - (xy 124.968065 125.707564) (xy 124.968065 135.945505) (xy 124.908658 136.003681) (xy 124.753877 136.229734) (xy 124.71435 136.321955) - (xy 124.683446 136.246975) (xy 124.531835 136.018783) (xy 124.33879 135.824385) (xy 124.111662 135.671185) (xy 123.859103 135.565019) - (xy 123.590733 135.509931) (xy 123.316774 135.508018) (xy 123.047661 135.559354) (xy 122.793644 135.661984) (xy 122.564399 135.811997) - (xy 122.368658 136.003681) (xy 122.213877 136.229734) (xy 122.17435 136.321955) (xy 122.143446 136.246975) (xy 121.991835 136.018783) - (xy 121.79879 135.824385) (xy 121.571662 135.671185) (xy 121.319103 135.565019) (xy 121.050733 135.509931) (xy 120.776774 135.508018) - (xy 120.507661 135.559354) (xy 120.253644 135.661984) (xy 120.024399 135.811997) (xy 119.951546 135.88334) (xy 119.951546 104.92315) - (xy 119.910426 104.715481) (xy 119.829754 104.519753) (xy 119.7126 104.343423) (xy 119.563428 104.193207) (xy 119.387921 104.074825) - (xy 119.192761 103.992788) (xy 118.985384 103.950219) (xy 118.935552 103.949871) (xy 118.935552 75.065697) (xy 118.889595 74.833596) - (xy 118.799431 74.614842) (xy 118.668495 74.417767) (xy 118.501773 74.249878) (xy 118.305617 74.117569) (xy 118.087498 74.02588) - (xy 117.855724 73.978303) (xy 117.619123 73.976651) (xy 117.386707 74.020987) (xy 117.167329 74.109622) (xy 116.969344 74.239179) - (xy 116.800295 74.404724) (xy 116.66662 74.599952) (xy 116.573411 74.817425) (xy 116.524217 75.048862) (xy 116.520914 75.285446) - (xy 116.563626 75.518166) (xy 116.650727 75.738157) (xy 116.778899 75.937041) (xy 116.94326 76.107242) (xy 117.137549 76.242277) - (xy 117.354367 76.337002) (xy 117.585454 76.38781) (xy 117.822009 76.392765) (xy 118.055022 76.351679) (xy 118.275616 76.266116) - (xy 118.47539 76.139335) (xy 118.646734 75.976167) (xy 118.783122 75.782824) (xy 118.879358 75.566673) (xy 118.931778 75.335946) - (xy 118.935552 75.065697) (xy 118.935552 103.949871) (xy 118.773689 103.948741) (xy 118.565738 103.98841) (xy 118.369452 104.067715) - (xy 118.192308 104.183634) (xy 118.041054 104.331753) (xy 117.92145 104.506431) (xy 117.838052 104.701012) (xy 117.794037 104.908087) - (xy 117.791081 105.119767) (xy 117.829297 105.32799) (xy 117.90723 105.524825) (xy 118.02191 105.702773) (xy 118.168969 105.855058) - (xy 118.342807 105.975879) (xy 118.536802 106.060633) (xy 118.743564 106.106093) (xy 118.955219 106.110526) (xy 119.163704 106.073765) - (xy 119.361077 105.997208) (xy 119.539822 105.883773) (xy 119.69313 105.73778) (xy 119.815161 105.56479) (xy 119.901268 105.371392) - (xy 119.94817 105.164952) (xy 119.951546 104.92315) (xy 119.951546 135.88334) (xy 119.828658 136.003681) (xy 119.673877 136.229734) - (xy 119.63435 136.321955) (xy 119.603446 136.246975) (xy 119.451835 136.018783) (xy 119.25879 135.824385) (xy 119.031662 135.671185) - (xy 118.808546 135.577395) (xy 118.808546 116.22615) (xy 118.767426 116.018481) (xy 118.686754 115.822753) (xy 118.5696 115.646423) - (xy 118.420428 115.496207) (xy 118.244921 115.377825) (xy 118.049761 115.295788) (xy 117.842384 115.253219) (xy 117.630689 115.251741) - (xy 117.422738 115.29141) (xy 117.226452 115.370715) (xy 117.049308 115.486634) (xy 116.898054 115.634753) (xy 116.77845 115.809431) - (xy 116.695052 116.004012) (xy 116.651037 116.211087) (xy 116.648081 116.422767) (xy 116.686297 116.63099) (xy 116.76423 116.827825) - (xy 116.87891 117.005773) (xy 117.025969 117.158058) (xy 117.199807 117.278879) (xy 117.393802 117.363633) (xy 117.600564 117.409093) - (xy 117.812219 117.413526) (xy 118.020704 117.376765) (xy 118.218077 117.300208) (xy 118.396822 117.186773) (xy 118.55013 117.04078) - (xy 118.672161 116.86779) (xy 118.758268 116.674392) (xy 118.80517 116.467952) (xy 118.808546 116.22615) (xy 118.808546 135.577395) - (xy 118.779103 135.565019) (xy 118.510733 135.509931) (xy 118.236774 135.508018) (xy 117.967661 135.559354) (xy 117.713644 135.661984) - (xy 117.484399 135.811997) (xy 117.288658 136.003681) (xy 117.133877 136.229734) (xy 117.09435 136.321955) (xy 117.063446 136.246975) - (xy 116.911835 136.018783) (xy 116.71879 135.824385) (xy 116.491662 135.671185) (xy 116.459059 135.657479) (xy 116.459059 109.718017) - (xy 116.459059 98.288017) (xy 116.405846 98.019269) (xy 116.301446 97.765975) (xy 116.149835 97.537783) (xy 115.95679 97.343385) - (xy 115.729662 97.190185) (xy 115.648393 97.156022) (xy 115.694923 97.137975) (xy 115.92624 96.991177) (xy 116.124639 96.802245) - (xy 116.282561 96.578375) (xy 116.393993 96.328095) (xy 116.45469 96.060938) (xy 116.459059 95.748017) (xy 116.405846 95.479269) - (xy 116.301446 95.225975) (xy 116.149835 94.997783) (xy 115.95679 94.803385) (xy 115.729662 94.650185) (xy 115.648393 94.616022) - (xy 115.694923 94.597975) (xy 115.92624 94.451177) (xy 116.124639 94.262245) (xy 116.282561 94.038375) (xy 116.393993 93.788095) - (xy 116.45469 93.520938) (xy 116.459059 93.208017) (xy 116.405846 92.939269) (xy 116.301446 92.685975) (xy 116.149835 92.457783) - (xy 115.95679 92.263385) (xy 115.729662 92.110185) (xy 115.697059 92.096479) (xy 115.697059 88.890017) (xy 115.643846 88.621269) - (xy 115.539446 88.367975) (xy 115.387835 88.139783) (xy 115.19479 87.945385) (xy 114.967662 87.792185) (xy 114.886393 87.758022) - (xy 114.932923 87.739975) (xy 115.16424 87.593177) (xy 115.362639 87.404245) (xy 115.520561 87.180375) (xy 115.631993 86.930095) - (xy 115.69269 86.662938) (xy 115.697059 86.350017) (xy 115.643846 86.081269) (xy 115.539446 85.827975) (xy 115.387835 85.599783) - (xy 115.19479 85.405385) (xy 114.967662 85.252185) (xy 114.715103 85.146019) (xy 114.681059 85.13903) (xy 114.681059 75.936017) - (xy 114.627846 75.667269) (xy 114.523446 75.413975) (xy 114.371835 75.185783) (xy 114.17879 74.991385) (xy 113.951662 74.838185) - (xy 113.870393 74.804022) (xy 113.916923 74.785975) (xy 114.14824 74.639177) (xy 114.346639 74.450245) (xy 114.504561 74.226375) - (xy 114.615993 73.976095) (xy 114.67669 73.708938) (xy 114.681059 73.396017) (xy 114.627846 73.127269) (xy 114.523446 72.873975) - (xy 114.371835 72.645783) (xy 114.17879 72.451385) (xy 113.951662 72.298185) (xy 113.699103 72.192019) (xy 113.430733 72.136931) - (xy 113.156774 72.135018) (xy 112.949575 72.174543) (xy 112.957161 72.16379) (xy 113.043268 71.970392) (xy 113.09017 71.763952) - (xy 113.093546 71.52215) (xy 113.052426 71.314481) (xy 112.971754 71.118753) (xy 112.8546 70.942423) (xy 112.705428 70.792207) - (xy 112.529921 70.673825) (xy 112.334761 70.591788) (xy 112.127384 70.549219) (xy 111.915689 70.547741) (xy 111.707738 70.58741) - (xy 111.511452 70.666715) (xy 111.334308 70.782634) (xy 111.183054 70.930753) (xy 111.06345 71.105431) (xy 110.980052 71.300012) - (xy 110.936037 71.507087) (xy 110.933081 71.718767) (xy 110.971297 71.92699) (xy 111.04923 72.123825) (xy 111.083127 72.176423) - (xy 110.890733 72.136931) (xy 110.616774 72.135018) (xy 110.553546 72.147079) (xy 110.553546 71.26815) (xy 110.512426 71.060481) - (xy 110.431754 70.864753) (xy 110.3146 70.688423) (xy 110.165428 70.538207) (xy 109.989921 70.419825) (xy 109.794761 70.337788) - (xy 109.587384 70.295219) (xy 109.375689 70.293741) (xy 109.167738 70.33341) (xy 108.971452 70.412715) (xy 108.794308 70.528634) - (xy 108.643054 70.676753) (xy 108.52345 70.851431) (xy 108.440052 71.046012) (xy 108.396037 71.253087) (xy 108.393081 71.464767) - (xy 108.431297 71.67299) (xy 108.50923 71.869825) (xy 108.62391 72.047773) (xy 108.770969 72.200058) (xy 108.944807 72.320879) - (xy 109.138802 72.405633) (xy 109.345564 72.451093) (xy 109.557219 72.455526) (xy 109.765704 72.418765) (xy 109.963077 72.342208) - (xy 110.141822 72.228773) (xy 110.29513 72.08278) (xy 110.417161 71.90979) (xy 110.503268 71.716392) (xy 110.55017 71.509952) - (xy 110.553546 71.26815) (xy 110.553546 72.147079) (xy 110.347661 72.186354) (xy 110.093644 72.288984) (xy 109.864399 72.438997) - (xy 109.668658 72.630681) (xy 109.513877 72.856734) (xy 109.47435 72.948955) (xy 109.443446 72.873975) (xy 109.291835 72.645783) - (xy 109.09879 72.451385) (xy 108.871662 72.298185) (xy 108.619103 72.192019) (xy 108.350733 72.136931) (xy 108.076774 72.135018) - (xy 107.807661 72.186354) (xy 107.553644 72.288984) (xy 107.324399 72.438997) (xy 107.128658 72.630681) (xy 106.973877 72.856734) - (xy 106.86595 73.108546) (xy 106.808989 73.376524) (xy 106.805164 73.650464) (xy 106.85462 73.919928) (xy 106.955474 74.174655) - (xy 107.103883 74.404942) (xy 107.294196 74.602016) (xy 107.519163 74.758372) (xy 107.619699 74.802295) (xy 107.553644 74.828984) - (xy 107.324399 74.978997) (xy 107.128658 75.170681) (xy 106.973877 75.396734) (xy 106.86595 75.648546) (xy 106.808989 75.916524) - (xy 106.805164 76.190464) (xy 106.85462 76.459928) (xy 106.955474 76.714655) (xy 107.103883 76.944942) (xy 107.294196 77.142016) - (xy 107.400645 77.216) (xy 107.379458 77.216) (xy 107.256777 77.240403) (xy 107.141215 77.28827) (xy 107.037211 77.357763) - (xy 106.948763 77.446211) (xy 106.87927 77.550215) (xy 106.831403 77.665777) (xy 106.807 77.788458) (xy 106.807 77.913542) - (xy 106.807 79.437542) (xy 106.831403 79.560223) (xy 106.87927 79.675785) (xy 106.948763 79.779789) (xy 107.037211 79.868237) - (xy 107.141215 79.93773) (xy 107.256777 79.985597) (xy 107.379458 80.01) (xy 107.504542 80.01) (xy 109.028542 80.01) - (xy 109.151223 79.985597) (xy 109.266785 79.93773) (xy 109.370789 79.868237) (xy 109.459237 79.779789) (xy 109.474 79.757694) - (xy 109.488763 79.779789) (xy 109.577211 79.868237) (xy 109.681215 79.93773) (xy 109.796777 79.985597) (xy 109.919458 80.01) - (xy 110.044542 80.01) (xy 111.568542 80.01) (xy 111.691223 79.985597) (xy 111.806785 79.93773) (xy 111.910789 79.868237) - (xy 111.999237 79.779789) (xy 112.014 79.757694) (xy 112.028763 79.779789) (xy 112.117211 79.868237) (xy 112.221215 79.93773) - (xy 112.336777 79.985597) (xy 112.459458 80.01) (xy 112.584542 80.01) (xy 114.108542 80.01) (xy 114.231223 79.985597) - (xy 114.346785 79.93773) (xy 114.450789 79.868237) (xy 114.539237 79.779789) (xy 114.60873 79.675785) (xy 114.656597 79.560223) - (xy 114.681 79.437542) (xy 114.681 79.312458) (xy 114.681 77.788458) (xy 114.656597 77.665777) (xy 114.60873 77.550215) - (xy 114.539237 77.446211) (xy 114.450789 77.357763) (xy 114.346785 77.28827) (xy 114.231223 77.240403) (xy 114.108542 77.216) - (xy 114.090216 77.216) (xy 114.14824 77.179177) (xy 114.346639 76.990245) (xy 114.504561 76.766375) (xy 114.615993 76.516095) - (xy 114.67669 76.248938) (xy 114.681059 75.936017) (xy 114.681059 85.13903) (xy 114.446733 85.090931) (xy 114.172774 85.089018) - (xy 113.903661 85.140354) (xy 113.649644 85.242984) (xy 113.420399 85.392997) (xy 113.224658 85.584681) (xy 113.157 85.683493) - (xy 113.157 85.662458) (xy 113.132597 85.539777) (xy 113.08473 85.424215) (xy 113.015237 85.320211) (xy 112.926789 85.231763) - (xy 112.822785 85.16227) (xy 112.707223 85.114403) (xy 112.584542 85.09) (xy 112.459458 85.09) (xy 112.458552 85.09) - (xy 112.458552 83.701697) (xy 112.412595 83.469596) (xy 112.322431 83.250842) (xy 112.191495 83.053767) (xy 112.024773 82.885878) - (xy 111.828617 82.753569) (xy 111.610498 82.66188) (xy 111.378724 82.614303) (xy 111.142123 82.612651) (xy 110.909707 82.656987) - (xy 110.690329 82.745622) (xy 110.492344 82.875179) (xy 110.323295 83.040724) (xy 110.18962 83.235952) (xy 110.096411 83.453425) - (xy 110.047217 83.684862) (xy 110.043914 83.921446) (xy 110.086626 84.154166) (xy 110.173727 84.374157) (xy 110.301899 84.573041) - (xy 110.46626 84.743242) (xy 110.660549 84.878277) (xy 110.877367 84.973002) (xy 111.108454 85.02381) (xy 111.345009 85.028765) - (xy 111.578022 84.987679) (xy 111.798616 84.902116) (xy 111.99839 84.775335) (xy 112.169734 84.612167) (xy 112.306122 84.418824) - (xy 112.402358 84.202673) (xy 112.454778 83.971946) (xy 112.458552 83.701697) (xy 112.458552 85.09) (xy 110.935458 85.09) - (xy 110.812777 85.114403) (xy 110.697215 85.16227) (xy 110.593211 85.231763) (xy 110.504763 85.320211) (xy 110.43527 85.424215) - (xy 110.387403 85.539777) (xy 110.363 85.662458) (xy 110.363 85.787542) (xy 110.363 87.311542) (xy 110.387403 87.434223) - (xy 110.43527 87.549785) (xy 110.504763 87.653789) (xy 110.593211 87.742237) (xy 110.697215 87.81173) (xy 110.812777 87.859597) - (xy 110.935458 87.884) (xy 110.955274 87.884) (xy 110.880399 87.932997) (xy 110.684658 88.124681) (xy 110.529877 88.350734) - (xy 110.42195 88.602546) (xy 110.364989 88.870524) (xy 110.361164 89.144464) (xy 110.41062 89.413928) (xy 110.511474 89.668655) - (xy 110.659883 89.898942) (xy 110.850196 90.096016) (xy 111.075163 90.252372) (xy 111.326215 90.362054) (xy 111.593789 90.420884) - (xy 111.867695 90.426622) (xy 112.137499 90.379048) (xy 112.392923 90.279975) (xy 112.62424 90.133177) (xy 112.822639 89.944245) - (xy 112.980561 89.720375) (xy 113.028934 89.611726) (xy 113.051474 89.668655) (xy 113.199883 89.898942) (xy 113.390196 90.096016) - (xy 113.615163 90.252372) (xy 113.866215 90.362054) (xy 114.133789 90.420884) (xy 114.407695 90.426622) (xy 114.677499 90.379048) - (xy 114.932923 90.279975) (xy 115.16424 90.133177) (xy 115.362639 89.944245) (xy 115.520561 89.720375) (xy 115.631993 89.470095) - (xy 115.69269 89.202938) (xy 115.697059 88.890017) (xy 115.697059 92.096479) (xy 115.477103 92.004019) (xy 115.208733 91.948931) - (xy 114.934774 91.947018) (xy 114.665661 91.998354) (xy 114.411644 92.100984) (xy 114.182399 92.250997) (xy 113.986658 92.442681) - (xy 113.919 92.541493) (xy 113.919 92.520458) (xy 113.894597 92.397777) (xy 113.84673 92.282215) (xy 113.777237 92.178211) - (xy 113.688789 92.089763) (xy 113.584785 92.02027) (xy 113.469223 91.972403) (xy 113.346542 91.948) (xy 113.221458 91.948) - (xy 111.697458 91.948) (xy 111.574777 91.972403) (xy 111.459215 92.02027) (xy 111.355211 92.089763) (xy 111.266763 92.178211) - (xy 111.19727 92.282215) (xy 111.149403 92.397777) (xy 111.125 92.520458) (xy 111.125 92.645542) (xy 111.125 94.169542) - (xy 111.149403 94.292223) (xy 111.19727 94.407785) (xy 111.266763 94.511789) (xy 111.355211 94.600237) (xy 111.377305 94.615) - (xy 111.355211 94.629763) (xy 111.266763 94.718211) (xy 111.19727 94.822215) (xy 111.149403 94.937777) (xy 111.125 95.060458) - (xy 111.125 95.185542) (xy 111.125 96.709542) (xy 111.149403 96.832223) (xy 111.19727 96.947785) (xy 111.266763 97.051789) - (xy 111.355211 97.140237) (xy 111.377305 97.155) (xy 111.355211 97.169763) (xy 111.266763 97.258211) (xy 111.19727 97.362215) - (xy 111.149403 97.477777) (xy 111.125 97.600458) (xy 111.125 97.725542) (xy 111.125 99.249542) (xy 111.149403 99.372223) - (xy 111.19727 99.487785) (xy 111.266763 99.591789) (xy 111.355211 99.680237) (xy 111.459215 99.74973) (xy 111.574777 99.797597) - (xy 111.697458 99.822) (xy 111.822542 99.822) (xy 113.346542 99.822) (xy 113.469223 99.797597) (xy 113.584785 99.74973) - (xy 113.688789 99.680237) (xy 113.777237 99.591789) (xy 113.84673 99.487785) (xy 113.894597 99.372223) (xy 113.919 99.249542) - (xy 113.919 99.2304) (xy 113.961883 99.296942) (xy 114.152196 99.494016) (xy 114.377163 99.650372) (xy 114.628215 99.760054) - (xy 114.895789 99.818884) (xy 115.169695 99.824622) (xy 115.439499 99.777048) (xy 115.694923 99.677975) (xy 115.92624 99.531177) - (xy 116.124639 99.342245) (xy 116.282561 99.118375) (xy 116.393993 98.868095) (xy 116.45469 98.600938) (xy 116.459059 98.288017) - (xy 116.459059 109.718017) (xy 116.405846 109.449269) (xy 116.301446 109.195975) (xy 116.149835 108.967783) (xy 115.95679 108.773385) - (xy 115.729662 108.620185) (xy 115.477103 108.514019) (xy 115.208733 108.458931) (xy 114.934774 108.457018) (xy 114.665661 108.508354) - (xy 114.411644 108.610984) (xy 114.182399 108.760997) (xy 113.986658 108.952681) (xy 113.919 109.051493) (xy 113.919 109.030458) - (xy 113.894597 108.907777) (xy 113.84673 108.792215) (xy 113.777237 108.688211) (xy 113.688789 108.599763) (xy 113.584785 108.53027) - (xy 113.469223 108.482403) (xy 113.346542 108.458) (xy 112.80775 108.458) (xy 112.649 108.61675) (xy 112.649 109.728) - (xy 112.669 109.728) (xy 112.669 109.982) (xy 112.649 109.982) (xy 112.649 111.09325) (xy 112.80775 111.252) - (xy 113.346542 111.252) (xy 113.469223 111.227597) (xy 113.584785 111.17973) (xy 113.688789 111.110237) (xy 113.777237 111.021789) - (xy 113.84673 110.917785) (xy 113.894597 110.802223) (xy 113.919 110.679542) (xy 113.919 110.6604) (xy 113.961883 110.726942) - (xy 114.152196 110.924016) (xy 114.377163 111.080372) (xy 114.628215 111.190054) (xy 114.895789 111.248884) (xy 115.169695 111.254622) - (xy 115.439499 111.207048) (xy 115.694923 111.107975) (xy 115.92624 110.961177) (xy 116.124639 110.772245) (xy 116.282561 110.548375) - (xy 116.393993 110.298095) (xy 116.45469 110.030938) (xy 116.459059 109.718017) (xy 116.459059 135.657479) (xy 116.239103 135.565019) - (xy 115.970733 135.509931) (xy 115.696774 135.508018) (xy 115.427661 135.559354) (xy 115.173644 135.661984) (xy 114.944399 135.811997) - (xy 114.748658 136.003681) (xy 114.65258 136.144) (xy 114.455029 136.144) (xy 114.371835 136.018783) (xy 114.17879 135.824385) - (xy 113.951662 135.671185) (xy 113.699103 135.565019) (xy 113.430733 135.509931) (xy 113.156774 135.508018) (xy 112.887661 135.559354) - (xy 112.633644 135.661984) (xy 112.404399 135.811997) (xy 112.395 135.821201) (xy 112.395 111.09325) (xy 112.395 109.982) - (xy 112.395 109.728) (xy 112.395 108.61675) (xy 112.23625 108.458) (xy 111.697458 108.458) (xy 111.574777 108.482403) - (xy 111.459215 108.53027) (xy 111.355211 108.599763) (xy 111.266763 108.688211) (xy 111.19727 108.792215) (xy 111.149403 108.907777) - (xy 111.125 109.030458) (xy 111.125 109.155542) (xy 111.125 109.56925) (xy 111.28375 109.728) (xy 112.395 109.728) - (xy 112.395 109.982) (xy 111.28375 109.982) (xy 111.125 110.14075) (xy 111.125 110.554458) (xy 111.125 110.679542) - (xy 111.149403 110.802223) (xy 111.19727 110.917785) (xy 111.266763 111.021789) (xy 111.355211 111.110237) (xy 111.459215 111.17973) - (xy 111.574777 111.227597) (xy 111.697458 111.252) (xy 112.23625 111.252) (xy 112.395 111.09325) (xy 112.395 135.821201) - (xy 112.208658 136.003681) (xy 112.053877 136.229734) (xy 112.016591 136.316728) (xy 112.011636 136.302977) (xy 111.949656 136.18702) - (xy 111.709565 136.12004) (xy 111.52996 136.299645) (xy 111.52996 135.940435) (xy 111.46298 135.700344) (xy 111.213952 135.583244) - (xy 110.946865 135.516977) (xy 110.671983 135.50409) (xy 110.399867 135.545078) (xy 110.140977 135.638364) (xy 110.02502 135.700344) - (xy 109.95804 135.940435) (xy 110.744 136.726395) (xy 111.52996 135.940435) (xy 111.52996 136.299645) (xy 110.923605 136.906) - (xy 111.709565 137.69196) (xy 111.949656 137.62498) (xy 112.012866 137.490555) (xy 112.035474 137.547655) (xy 112.183883 137.777942) - (xy 112.374196 137.975016) (xy 112.599163 138.131372) (xy 112.699699 138.175295) (xy 112.633644 138.201984) (xy 112.404399 138.351997) - (xy 112.208658 138.543681) (xy 112.053877 138.769734) (xy 112.01435 138.861955) (xy 111.983446 138.786975) (xy 111.831835 138.558783) - (xy 111.63879 138.364385) (xy 111.411662 138.211185) (xy 111.33373 138.178425) (xy 111.347023 138.173636) (xy 111.46298 138.111656) - (xy 111.52996 137.871565) (xy 110.744 137.085605) (xy 110.564395 137.26521) (xy 110.564395 136.906) (xy 109.778435 136.12004) - (xy 109.538344 136.18702) (xy 109.421244 136.436048) (xy 109.354977 136.703135) (xy 109.34209 136.978017) (xy 109.383078 137.250133) - (xy 109.476364 137.509023) (xy 109.538344 137.62498) (xy 109.778435 137.69196) (xy 110.564395 136.906) (xy 110.564395 137.26521) - (xy 109.95804 137.871565) (xy 110.02502 138.111656) (xy 110.160053 138.175152) (xy 110.093644 138.201984) (xy 109.864399 138.351997) - (xy 109.668658 138.543681) (xy 109.513877 138.769734) (xy 109.40595 139.021546) (xy 109.348989 139.289524) (xy 109.345164 139.563464) - (xy 109.39462 139.832928) (xy 109.495474 140.087655) (xy 109.643883 140.317942) (xy 109.834196 140.515016) (xy 110.059163 140.671372) - (xy 110.310215 140.781054) (xy 110.577789 140.839884) (xy 110.851695 140.845622) (xy 111.121499 140.798048) (xy 111.376923 140.698975) - (xy 111.60824 140.552177) (xy 111.806639 140.363245) (xy 111.964561 140.139375) (xy 112.012934 140.030726) (xy 112.035474 140.087655) - (xy 112.183883 140.317942) (xy 112.374196 140.515016) (xy 112.599163 140.671372) (xy 112.850215 140.781054) (xy 113.117789 140.839884) - (xy 113.391695 140.845622) (xy 113.661499 140.798048) (xy 113.916923 140.698975) (xy 114.14824 140.552177) (xy 114.346639 140.363245) - (xy 114.504561 140.139375) (xy 114.552934 140.030726) (xy 114.575474 140.087655) (xy 114.723883 140.317942) (xy 114.914196 140.515016) - (xy 115.139163 140.671372) (xy 115.390215 140.781054) (xy 115.657789 140.839884) (xy 115.931695 140.845622) (xy 116.201499 140.798048) - (xy 116.456923 140.698975) (xy 116.68824 140.552177) (xy 116.886639 140.363245) (xy 117.044561 140.139375) (xy 117.092934 140.030726) - (xy 117.115474 140.087655) (xy 117.263883 140.317942) (xy 117.454196 140.515016) (xy 117.679163 140.671372) (xy 117.930215 140.781054) - (xy 118.197789 140.839884) (xy 118.471695 140.845622) (xy 118.741499 140.798048) (xy 118.996923 140.698975) (xy 119.22824 140.552177) - (xy 119.426639 140.363245) (xy 119.584561 140.139375) (xy 119.632934 140.030726) (xy 119.655474 140.087655) (xy 119.803883 140.317942) - (xy 119.994196 140.515016) (xy 120.219163 140.671372) (xy 120.470215 140.781054) (xy 120.737789 140.839884) (xy 121.011695 140.845622) - (xy 121.281499 140.798048) (xy 121.536923 140.698975) (xy 121.76824 140.552177) (xy 121.966639 140.363245) (xy 122.124561 140.139375) - (xy 122.172934 140.030726) (xy 122.195474 140.087655) (xy 122.343883 140.317942) (xy 122.534196 140.515016) (xy 122.759163 140.671372) - (xy 123.010215 140.781054) (xy 123.277789 140.839884) (xy 123.551695 140.845622) (xy 123.821499 140.798048) (xy 124.076923 140.698975) - (xy 124.30824 140.552177) (xy 124.506639 140.363245) (xy 124.664561 140.139375) (xy 124.712934 140.030726) (xy 124.735474 140.087655) - (xy 124.883883 140.317942) (xy 125.074196 140.515016) (xy 125.299163 140.671372) (xy 125.550215 140.781054) (xy 125.817789 140.839884) - (xy 126.091695 140.845622) (xy 126.361499 140.798048) (xy 126.616923 140.698975) (xy 126.84824 140.552177) (xy 127.046639 140.363245) - (xy 127.204561 140.139375) (xy 127.252934 140.030726) (xy 127.275474 140.087655) (xy 127.423883 140.317942) (xy 127.614196 140.515016) - (xy 127.839163 140.671372) (xy 128.090215 140.781054) (xy 128.357789 140.839884) (xy 128.631695 140.845622) (xy 128.901499 140.798048) - (xy 129.156923 140.698975) (xy 129.38824 140.552177) (xy 129.586639 140.363245) (xy 129.744561 140.139375) (xy 129.792934 140.030726) - (xy 129.815474 140.087655) (xy 129.963883 140.317942) (xy 130.154196 140.515016) (xy 130.379163 140.671372) (xy 130.630215 140.781054) - (xy 130.897789 140.839884) (xy 131.171695 140.845622) (xy 131.441499 140.798048) (xy 131.696923 140.698975) (xy 131.92824 140.552177) - (xy 132.126639 140.363245) (xy 132.284561 140.139375) (xy 132.332934 140.030726) (xy 132.355474 140.087655) (xy 132.503883 140.317942) - (xy 132.694196 140.515016) (xy 132.919163 140.671372) (xy 133.170215 140.781054) (xy 133.437789 140.839884) (xy 133.711695 140.845622) - (xy 133.981499 140.798048) (xy 134.236923 140.698975) (xy 134.46824 140.552177) (xy 134.666639 140.363245) (xy 134.824561 140.139375) - (xy 134.872934 140.030726) (xy 134.895474 140.087655) (xy 135.043883 140.317942) (xy 135.234196 140.515016) (xy 135.459163 140.671372) - (xy 135.710215 140.781054) (xy 135.977789 140.839884) (xy 136.251695 140.845622) (xy 136.521499 140.798048) (xy 136.776923 140.698975) - (xy 137.00824 140.552177) (xy 137.206639 140.363245) (xy 137.364561 140.139375) (xy 137.412934 140.030726) (xy 137.435474 140.087655) - (xy 137.583883 140.317942) (xy 137.774196 140.515016) (xy 137.999163 140.671372) (xy 138.250215 140.781054) (xy 138.517789 140.839884) - (xy 138.791695 140.845622) (xy 139.061499 140.798048) (xy 139.316923 140.698975) (xy 139.54824 140.552177) (xy 139.746639 140.363245) - (xy 139.904561 140.139375) (xy 139.952934 140.030726) (xy 139.975474 140.087655) (xy 140.123883 140.317942) (xy 140.314196 140.515016) - (xy 140.539163 140.671372) (xy 140.790215 140.781054) (xy 141.057789 140.839884) (xy 141.331695 140.845622) (xy 141.601499 140.798048) - (xy 141.856923 140.698975) (xy 142.08824 140.552177) (xy 142.286639 140.363245) (xy 142.444561 140.139375) (xy 142.492934 140.030726) - (xy 142.515474 140.087655) (xy 142.663883 140.317942) (xy 142.854196 140.515016) (xy 143.079163 140.671372) (xy 143.330215 140.781054) - (xy 143.597789 140.839884) (xy 143.871695 140.845622) (xy 144.141499 140.798048) (xy 144.396923 140.698975) (xy 144.62824 140.552177) - (xy 144.826639 140.363245) (xy 144.984561 140.139375) (xy 145.032934 140.030726) (xy 145.055474 140.087655) (xy 145.203883 140.317942) - (xy 145.394196 140.515016) (xy 145.619163 140.671372) (xy 145.870215 140.781054) (xy 146.137789 140.839884) (xy 146.411695 140.845622) - (xy 146.681499 140.798048) (xy 146.936923 140.698975) (xy 147.16824 140.552177) (xy 147.366639 140.363245) (xy 147.524561 140.139375) - (xy 147.572934 140.030726) (xy 147.595474 140.087655) (xy 147.743883 140.317942) (xy 147.934196 140.515016) (xy 148.159163 140.671372) - (xy 148.410215 140.781054) (xy 148.677789 140.839884) (xy 148.951695 140.845622) (xy 149.221499 140.798048) (xy 149.476923 140.698975) - (xy 149.70824 140.552177) (xy 149.906639 140.363245) (xy 150.064561 140.139375) (xy 150.112934 140.030726) (xy 150.135474 140.087655) - (xy 150.283883 140.317942) (xy 150.474196 140.515016) (xy 150.699163 140.671372) (xy 150.950215 140.781054) (xy 151.217789 140.839884) - (xy 151.491695 140.845622) (xy 151.761499 140.798048) (xy 152.016923 140.698975) (xy 152.24824 140.552177) (xy 152.446639 140.363245) - (xy 152.604561 140.139375) (xy 152.652934 140.030726) (xy 152.675474 140.087655) (xy 152.823883 140.317942) (xy 153.014196 140.515016) - (xy 153.239163 140.671372) (xy 153.490215 140.781054) (xy 153.757789 140.839884) (xy 154.031695 140.845622) (xy 154.301499 140.798048) - (xy 154.556923 140.698975) (xy 154.78824 140.552177) (xy 154.986639 140.363245) (xy 155.144561 140.139375) (xy 155.192934 140.030726) - (xy 155.215474 140.087655) (xy 155.363883 140.317942) (xy 155.554196 140.515016) (xy 155.779163 140.671372) (xy 156.030215 140.781054) - (xy 156.297789 140.839884) (xy 156.571695 140.845622) (xy 156.841499 140.798048) (xy 157.096923 140.698975) (xy 157.32824 140.552177) - (xy 157.526639 140.363245) (xy 157.684561 140.139375) (xy 157.732934 140.030726) (xy 157.755474 140.087655) (xy 157.903883 140.317942) - (xy 158.094196 140.515016) (xy 158.319163 140.671372) (xy 158.570215 140.781054) (xy 158.837789 140.839884) (xy 159.111695 140.845622) - (xy 159.381499 140.798048) (xy 159.636923 140.698975) (xy 159.86824 140.552177) (xy 160.066639 140.363245) (xy 160.224561 140.139375) - (xy 160.272934 140.030726) (xy 160.295474 140.087655) (xy 160.443883 140.317942) (xy 160.634196 140.515016) (xy 160.859163 140.671372) - (xy 161.110215 140.781054) (xy 161.377789 140.839884) (xy 161.651695 140.845622) (xy 161.921499 140.798048) (xy 162.176923 140.698975) - (xy 162.40824 140.552177) (xy 162.606639 140.363245) (xy 162.764561 140.139375) (xy 162.812934 140.030726) (xy 162.835474 140.087655) - (xy 162.983883 140.317942) (xy 163.174196 140.515016) (xy 163.399163 140.671372) (xy 163.650215 140.781054) (xy 163.917789 140.839884) - (xy 164.191695 140.845622) (xy 164.461499 140.798048) (xy 164.716923 140.698975) (xy 164.94824 140.552177) (xy 165.146639 140.363245) - (xy 165.304561 140.139375) (xy 165.352934 140.030726) (xy 165.375474 140.087655) (xy 165.523883 140.317942) (xy 165.714196 140.515016) - (xy 165.939163 140.671372) (xy 166.190215 140.781054) (xy 166.457789 140.839884) (xy 166.731695 140.845622) (xy 166.913869 140.813499) - (xy 168.244185 142.143815) (xy 168.298599 142.188512) (xy 168.352495 142.233736) (xy 168.356002 142.235664) (xy 168.359103 142.238211) - (xy 168.421168 142.271489) (xy 168.482816 142.305381) (xy 168.486636 142.306592) (xy 168.490167 142.308486) (xy 168.557464 142.32906) - (xy 168.624571 142.350348) (xy 168.628554 142.350794) (xy 168.632385 142.351966) (xy 168.702372 142.359075) (xy 168.772361 142.366926) - (xy 168.780197 142.36698) (xy 168.78034 142.366995) (xy 168.780473 142.366982) (xy 168.783 142.367) (xy 176.911 142.367) - (xy 176.981113 142.360125) (xy 177.05117 142.353996) (xy 177.055012 142.352879) (xy 177.059007 142.352488) (xy 177.126459 142.332122) - (xy 177.193982 142.312506) (xy 177.197537 142.310662) (xy 177.201376 142.309504) (xy 177.263553 142.276443) (xy 177.326014 142.244067) - (xy 177.329144 142.241568) (xy 177.332684 142.239686) (xy 177.38723 142.195199) (xy 177.44224 142.151286) (xy 177.447814 142.145787) - (xy 177.447931 142.145693) (xy 177.44802 142.145585) (xy 177.449815 142.143815) (xy 178.592815 141.000815) (xy 178.637512 140.9464) - (xy 178.682736 140.892505) (xy 178.684664 140.888997) (xy 178.687211 140.885897) (xy 178.720489 140.823831) (xy 178.754381 140.762184) - (xy 178.755592 140.758363) (xy 178.757486 140.754833) (xy 178.766053 140.726809) (xy 178.890215 140.781054) (xy 179.157789 140.839884) - (xy 179.431695 140.845622) (xy 179.701499 140.798048) (xy 179.956923 140.698975) (xy 180.18824 140.552177) (xy 180.386639 140.363245) - (xy 180.544561 140.139375) (xy 180.592934 140.030726) (xy 180.615474 140.087655) (xy 180.763883 140.317942) (xy 180.954196 140.515016) - (xy 181.179163 140.671372) (xy 181.430215 140.781054) (xy 181.697789 140.839884) (xy 181.971695 140.845622) (xy 182.241499 140.798048) - (xy 182.496923 140.698975) (xy 182.72824 140.552177) (xy 182.926639 140.363245) (xy 183.084561 140.139375) (xy 183.132934 140.030726) - (xy 183.155474 140.087655) (xy 183.303883 140.317942) (xy 183.494196 140.515016) (xy 183.719163 140.671372) (xy 183.970215 140.781054) - (xy 184.237789 140.839884) (xy 184.511695 140.845622) (xy 184.781499 140.798048) (xy 185.036923 140.698975) (xy 185.26824 140.552177) - (xy 185.466639 140.363245) (xy 185.624561 140.139375) (xy 185.735993 139.889095) (xy 185.79669 139.621938) (xy 185.801059 139.309017) - (xy 185.801059 145.923) (xy 107.886552 145.923) (xy 107.886552 90.305697) (xy 107.840595 90.073596) (xy 107.750431 89.854842) - (xy 107.619495 89.657767) (xy 107.452773 89.489878) (xy 107.256617 89.357569) (xy 107.038498 89.26588) (xy 106.806724 89.218303) - (xy 106.570123 89.216651) (xy 106.337707 89.260987) (xy 106.118329 89.349622) (xy 105.920344 89.479179) (xy 105.751295 89.644724) - (xy 105.61762 89.839952) (xy 105.524411 90.057425) (xy 105.475217 90.288862) (xy 105.471914 90.525446) (xy 105.514626 90.758166) - (xy 105.601727 90.978157) (xy 105.729899 91.177041) (xy 105.89426 91.347242) (xy 106.088549 91.482277) (xy 106.305367 91.577002) - (xy 106.536454 91.62781) (xy 106.773009 91.632765) (xy 107.006022 91.591679) (xy 107.226616 91.506116) (xy 107.42639 91.379335) - (xy 107.597734 91.216167) (xy 107.734122 91.022824) (xy 107.830358 90.806673) (xy 107.882778 90.575946) (xy 107.886552 90.305697) - (xy 107.886552 145.923) (xy 104.965541 145.923) (xy 104.965541 103.284603) (xy 104.929259 103.101365) (xy 104.858969 102.930831) - (xy 104.921178 102.791111) (xy 104.962562 102.608958) (xy 104.965541 102.395603) (xy 104.929259 102.212365) (xy 104.858969 102.041831) - (xy 104.921178 101.902111) (xy 104.962562 101.719958) (xy 104.965541 101.506603) (xy 104.929259 101.323365) (xy 104.858969 101.152831) - (xy 104.921178 101.013111) (xy 104.962562 100.830958) (xy 104.965541 100.617603) (xy 104.929259 100.434365) (xy 104.858077 100.261665) - (xy 104.838552 100.232277) (xy 104.838552 76.589697) (xy 104.792595 76.357596) (xy 104.702431 76.138842) (xy 104.571495 75.941767) - (xy 104.404773 75.773878) (xy 104.208617 75.641569) (xy 103.990498 75.54988) (xy 103.758724 75.502303) (xy 103.522123 75.500651) - (xy 103.289707 75.544987) (xy 103.070329 75.633622) (xy 102.872344 75.763179) (xy 102.703295 75.928724) (xy 102.56962 76.123952) - (xy 102.476411 76.341425) (xy 102.427217 76.572862) (xy 102.423914 76.809446) (xy 102.466626 77.042166) (xy 102.553727 77.262157) - (xy 102.681899 77.461041) (xy 102.84626 77.631242) (xy 103.040549 77.766277) (xy 103.257367 77.861002) (xy 103.488454 77.91181) - (xy 103.725009 77.916765) (xy 103.958022 77.875679) (xy 104.178616 77.790116) (xy 104.37839 77.663335) (xy 104.549734 77.500167) - (xy 104.686122 77.306824) (xy 104.782358 77.090673) (xy 104.834778 76.859946) (xy 104.838552 76.589697) (xy 104.838552 100.232277) - (xy 104.754706 100.106079) (xy 104.623084 99.973535) (xy 104.468224 99.86908) (xy 104.330552 99.811207) (xy 104.330552 84.463697) - (xy 104.284595 84.231596) (xy 104.194431 84.012842) (xy 104.063495 83.815767) (xy 103.896773 83.647878) (xy 103.700617 83.515569) - (xy 103.482498 83.42388) (xy 103.250724 83.376303) (xy 103.014123 83.374651) (xy 102.781707 83.418987) (xy 102.562329 83.507622) - (xy 102.364344 83.637179) (xy 102.195295 83.802724) (xy 102.06162 83.997952) (xy 101.968411 84.215425) (xy 101.919217 84.446862) - (xy 101.915914 84.683446) (xy 101.958626 84.916166) (xy 102.045727 85.136157) (xy 102.173899 85.335041) (xy 102.33826 85.505242) - (xy 102.532549 85.640277) (xy 102.749367 85.735002) (xy 102.980454 85.78581) (xy 103.217009 85.790765) (xy 103.450022 85.749679) - (xy 103.670616 85.664116) (xy 103.87039 85.537335) (xy 104.041734 85.374167) (xy 104.178122 85.180824) (xy 104.274358 84.964673) - (xy 104.326778 84.733946) (xy 104.330552 84.463697) (xy 104.330552 99.811207) (xy 104.296025 99.796694) (xy 104.113045 99.759134) - (xy 103.926255 99.75783) (xy 103.742768 99.792832) (xy 103.569575 99.862807) (xy 103.556108 99.871619) (xy 103.385921 99.756825) - (xy 103.190761 99.674788) (xy 102.983384 99.632219) (xy 102.771689 99.630741) (xy 102.563738 99.67041) (xy 102.367452 99.749715) - (xy 102.190308 99.865634) (xy 102.039054 100.013753) (xy 101.91945 100.188431) (xy 101.836052 100.383012) (xy 101.792037 100.590087) - (xy 101.789081 100.801767) (xy 101.827297 101.00999) (xy 101.90523 101.206825) (xy 102.01991 101.384773) (xy 102.166969 101.537058) - (xy 102.340807 101.657879) (xy 102.534802 101.742633) (xy 102.741564 101.788093) (xy 102.953219 101.792526) (xy 103.075913 101.770891) - (xy 103.092968 101.863815) (xy 103.161732 102.037493) (xy 103.1668 102.045357) (xy 103.100693 102.199599) (xy 103.061856 102.382312) - (xy 103.059248 102.569089) (xy 103.092968 102.752815) (xy 103.161732 102.926493) (xy 103.1668 102.934357) (xy 103.100693 103.088599) - (xy 103.061856 103.271312) (xy 103.059248 103.458089) (xy 103.092968 103.641815) (xy 103.161732 103.815493) (xy 103.26292 103.972506) - (xy 103.392679 104.106875) (xy 103.546065 104.213482) (xy 103.717237 104.288265) (xy 103.899674 104.328376) (xy 104.086428 104.332288) - (xy 104.270386 104.299852) (xy 104.444539 104.232302) (xy 104.602255 104.132212) (xy 104.737527 104.003395) (xy 104.845201 103.850756) - (xy 104.921178 103.680111) (xy 104.962562 103.497958) (xy 104.965541 103.284603) (xy 104.965541 145.923) (xy 104.584552 145.923) - (xy 104.584552 112.403697) (xy 104.538595 112.171596) (xy 104.448431 111.952842) (xy 104.317495 111.755767) (xy 104.150773 111.587878) - (xy 103.954617 111.455569) (xy 103.736498 111.36388) (xy 103.504724 111.316303) (xy 103.268123 111.314651) (xy 103.035707 111.358987) - (xy 102.816329 111.447622) (xy 102.618344 111.577179) (xy 102.449295 111.742724) (xy 102.31562 111.937952) (xy 102.222411 112.155425) - (xy 102.173217 112.386862) (xy 102.169914 112.623446) (xy 102.212626 112.856166) (xy 102.299727 113.076157) (xy 102.427899 113.275041) - (xy 102.59226 113.445242) (xy 102.786549 113.580277) (xy 103.003367 113.675002) (xy 103.234454 113.72581) (xy 103.471009 113.730765) - (xy 103.704022 113.689679) (xy 103.924616 113.604116) (xy 104.12439 113.477335) (xy 104.295734 113.314167) (xy 104.432122 113.120824) - (xy 104.528358 112.904673) (xy 104.580778 112.673946) (xy 104.584552 112.403697) (xy 104.584552 145.923) (xy 102.171552 145.923) - (xy 102.171552 139.708697) (xy 102.171546 139.708666) (xy 102.171546 118.76615) (xy 102.171546 114.95615) (xy 102.130426 114.748481) - (xy 102.049754 114.552753) (xy 101.9326 114.376423) (xy 101.783428 114.226207) (xy 101.663552 114.145348) (xy 101.663552 95.639697) - (xy 101.617595 95.407596) (xy 101.527431 95.188842) (xy 101.396495 94.991767) (xy 101.229773 94.823878) (xy 101.033617 94.691569) - (xy 100.815498 94.59988) (xy 100.583724 94.552303) (xy 100.347123 94.550651) (xy 100.114707 94.594987) (xy 99.895329 94.683622) - (xy 99.697344 94.813179) (xy 99.528295 94.978724) (xy 99.39462 95.173952) (xy 99.301411 95.391425) (xy 99.252217 95.622862) - (xy 99.248914 95.859446) (xy 99.291626 96.092166) (xy 99.378727 96.312157) (xy 99.506899 96.511041) (xy 99.67126 96.681242) - (xy 99.865549 96.816277) (xy 100.082367 96.911002) (xy 100.313454 96.96181) (xy 100.550009 96.966765) (xy 100.783022 96.925679) - (xy 101.003616 96.840116) (xy 101.20339 96.713335) (xy 101.374734 96.550167) (xy 101.511122 96.356824) (xy 101.607358 96.140673) - (xy 101.659778 95.909946) (xy 101.663552 95.639697) (xy 101.663552 114.145348) (xy 101.607921 114.107825) (xy 101.412761 114.025788) - (xy 101.205384 113.983219) (xy 100.993689 113.981741) (xy 100.785738 114.02141) (xy 100.589452 114.100715) (xy 100.412308 114.216634) - (xy 100.261054 114.364753) (xy 100.14145 114.539431) (xy 100.058052 114.734012) (xy 100.014037 114.941087) (xy 100.011081 115.152767) - (xy 100.049297 115.36099) (xy 100.12723 115.557825) (xy 100.24191 115.735773) (xy 100.388969 115.888058) (xy 100.562807 116.008879) - (xy 100.756802 116.093633) (xy 100.963564 116.139093) (xy 101.175219 116.143526) (xy 101.383704 116.106765) (xy 101.581077 116.030208) - (xy 101.759822 115.916773) (xy 101.91313 115.77078) (xy 102.035161 115.59779) (xy 102.121268 115.404392) (xy 102.16817 115.197952) - (xy 102.171546 114.95615) (xy 102.171546 118.76615) (xy 102.130426 118.558481) (xy 102.049754 118.362753) (xy 101.9326 118.186423) - (xy 101.783428 118.036207) (xy 101.607921 117.917825) (xy 101.412761 117.835788) (xy 101.205384 117.793219) (xy 100.993689 117.791741) - (xy 100.785738 117.83141) (xy 100.589452 117.910715) (xy 100.412308 118.026634) (xy 100.261054 118.174753) (xy 100.14145 118.349431) - (xy 100.058052 118.544012) (xy 100.014037 118.751087) (xy 100.011081 118.962767) (xy 100.049297 119.17099) (xy 100.12723 119.367825) - (xy 100.24191 119.545773) (xy 100.388969 119.698058) (xy 100.562807 119.818879) (xy 100.756802 119.903633) (xy 100.963564 119.949093) - (xy 101.175219 119.953526) (xy 101.383704 119.916765) (xy 101.581077 119.840208) (xy 101.759822 119.726773) (xy 101.91313 119.58078) - (xy 102.035161 119.40779) (xy 102.121268 119.214392) (xy 102.16817 119.007952) (xy 102.171546 118.76615) (xy 102.171546 139.708666) - (xy 102.125595 139.476596) (xy 102.035431 139.257842) (xy 101.904495 139.060767) (xy 101.737773 138.892878) (xy 101.541617 138.760569) - (xy 101.323498 138.66888) (xy 101.091724 138.621303) (xy 100.855123 138.619651) (xy 100.622707 138.663987) (xy 100.403329 138.752622) - (xy 100.205344 138.882179) (xy 100.036295 139.047724) (xy 99.90262 139.242952) (xy 99.809411 139.460425) (xy 99.760217 139.691862) - (xy 99.756914 139.928446) (xy 99.799626 140.161166) (xy 99.886727 140.381157) (xy 100.014899 140.580041) (xy 100.17926 140.750242) - (xy 100.373549 140.885277) (xy 100.590367 140.980002) (xy 100.821454 141.03081) (xy 101.058009 141.035765) (xy 101.291022 140.994679) - (xy 101.511616 140.909116) (xy 101.71139 140.782335) (xy 101.882734 140.619167) (xy 102.019122 140.425824) (xy 102.115358 140.209673) - (xy 102.167778 139.978946) (xy 102.171552 139.708697) (xy 102.171552 145.923) (xy 99.187059 145.923) (xy 99.187059 93.081017) - (xy 99.133846 92.812269) (xy 99.029446 92.558975) (xy 98.877835 92.330783) (xy 98.68479 92.136385) (xy 98.488552 92.00402) - (xy 98.488552 89.924697) (xy 98.442595 89.692596) (xy 98.352431 89.473842) (xy 98.221495 89.276767) (xy 98.054773 89.108878) - (xy 97.858617 88.976569) (xy 97.640498 88.88488) (xy 97.408724 88.837303) (xy 97.172123 88.835651) (xy 96.939707 88.879987) - (xy 96.720329 88.968622) (xy 96.522344 89.098179) (xy 96.353295 89.263724) (xy 96.21962 89.458952) (xy 96.126411 89.676425) - (xy 96.077217 89.907862) (xy 96.073914 90.144446) (xy 96.116626 90.377166) (xy 96.203727 90.597157) (xy 96.331899 90.796041) - (xy 96.49626 90.966242) (xy 96.690549 91.101277) (xy 96.907367 91.196002) (xy 97.138454 91.24681) (xy 97.375009 91.251765) - (xy 97.608022 91.210679) (xy 97.828616 91.125116) (xy 98.02839 90.998335) (xy 98.199734 90.835167) (xy 98.336122 90.641824) - (xy 98.432358 90.425673) (xy 98.484778 90.194946) (xy 98.488552 89.924697) (xy 98.488552 92.00402) (xy 98.457662 91.983185) - (xy 98.205103 91.877019) (xy 97.936733 91.821931) (xy 97.662774 91.820018) (xy 97.393661 91.871354) (xy 97.139644 91.973984) - (xy 96.910399 92.123997) (xy 96.714658 92.315681) (xy 96.559877 92.541734) (xy 96.45195 92.793546) (xy 96.394989 93.061524) - (xy 96.391164 93.335464) (xy 96.44062 93.604928) (xy 96.541474 93.859655) (xy 96.689883 94.089942) (xy 96.880196 94.287016) - (xy 96.986645 94.361) (xy 96.965458 94.361) (xy 96.842777 94.385403) (xy 96.727215 94.43327) (xy 96.623211 94.502763) - (xy 96.534763 94.591211) (xy 96.46527 94.695215) (xy 96.417403 94.810777) (xy 96.393 94.933458) (xy 96.393 95.058542) - (xy 96.393 96.582542) (xy 96.417403 96.705223) (xy 96.46527 96.820785) (xy 96.534763 96.924789) (xy 96.623211 97.013237) - (xy 96.727215 97.08273) (xy 96.842777 97.130597) (xy 96.965458 97.155) (xy 97.090542 97.155) (xy 98.614542 97.155) - (xy 98.737223 97.130597) (xy 98.852785 97.08273) (xy 98.956789 97.013237) (xy 99.045237 96.924789) (xy 99.11473 96.820785) - (xy 99.162597 96.705223) (xy 99.187 96.582542) (xy 99.187 96.457458) (xy 99.187 94.933458) (xy 99.162597 94.810777) - (xy 99.11473 94.695215) (xy 99.045237 94.591211) (xy 98.956789 94.502763) (xy 98.852785 94.43327) (xy 98.737223 94.385403) - (xy 98.614542 94.361) (xy 98.596216 94.361) (xy 98.65424 94.324177) (xy 98.852639 94.135245) (xy 99.010561 93.911375) - (xy 99.121993 93.661095) (xy 99.18269 93.393938) (xy 99.187059 93.081017) (xy 99.187059 145.923) (xy 96.837546 145.923) - (xy 96.837546 117.49615) (xy 96.837546 114.95615) (xy 96.796426 114.748481) (xy 96.715754 114.552753) (xy 96.5986 114.376423) - (xy 96.449428 114.226207) (xy 96.273921 114.107825) (xy 96.078761 114.025788) (xy 95.871384 113.983219) (xy 95.659689 113.981741) - (xy 95.631059 113.987202) (xy 95.631059 112.766017) (xy 95.577846 112.497269) (xy 95.473446 112.243975) (xy 95.321835 112.015783) - (xy 95.12879 111.821385) (xy 94.996 111.731816) (xy 94.996 78.040542) (xy 94.996 77.915458) (xy 94.996 76.137458) - (xy 94.971597 76.014777) (xy 94.92373 75.899215) (xy 94.854237 75.795211) (xy 94.765789 75.706763) (xy 94.661785 75.63727) - (xy 94.546223 75.589403) (xy 94.423542 75.565) (xy 94.298458 75.565) (xy 92.520458 75.565) (xy 92.397777 75.589403) - (xy 92.282215 75.63727) (xy 92.178211 75.706763) (xy 92.089763 75.795211) (xy 92.02027 75.899215) (xy 91.972403 76.014777) - (xy 91.948 76.137458) (xy 91.948 76.262542) (xy 91.948 78.040542) (xy 91.972403 78.163223) (xy 92.02027 78.278785) - (xy 92.089763 78.382789) (xy 92.178211 78.471237) (xy 92.282215 78.54073) (xy 92.397777 78.588597) (xy 92.520458 78.613) - (xy 92.645542 78.613) (xy 94.423542 78.613) (xy 94.546223 78.588597) (xy 94.661785 78.54073) (xy 94.765789 78.471237) - (xy 94.854237 78.382789) (xy 94.92373 78.278785) (xy 94.971597 78.163223) (xy 94.996 78.040542) (xy 94.996 111.731816) - (xy 94.901662 111.668185) (xy 94.649103 111.562019) (xy 94.380733 111.506931) (xy 94.106774 111.505018) (xy 93.837661 111.556354) - (xy 93.583644 111.658984) (xy 93.354399 111.808997) (xy 93.158658 112.000681) (xy 93.091 112.099493) (xy 93.091 112.078458) - (xy 93.066597 111.955777) (xy 93.01873 111.840215) (xy 92.949237 111.736211) (xy 92.860789 111.647763) (xy 92.756785 111.57827) - (xy 92.641223 111.530403) (xy 92.518542 111.506) (xy 92.393458 111.506) (xy 90.869458 111.506) (xy 90.746777 111.530403) - (xy 90.631215 111.57827) (xy 90.527211 111.647763) (xy 90.438763 111.736211) (xy 90.424065 111.758208) (xy 90.424065 95.100564) - (xy 90.424065 82.400564) (xy 90.366014 82.107384) (xy 90.252123 81.831063) (xy 90.08673 81.582127) (xy 89.876135 81.370056) - (xy 89.628359 81.202929) (xy 89.35284 81.087112) (xy 89.060072 81.027015) (xy 88.761208 81.024929) (xy 88.46763 81.080932) - (xy 88.19052 81.192891) (xy 87.940435 81.356542) (xy 87.726899 81.565652) (xy 87.558047 81.812255) (xy 87.440309 82.086959) - (xy 87.37817 82.379299) (xy 87.373997 82.678142) (xy 87.427949 82.972104) (xy 87.537971 83.249988) (xy 87.699872 83.50121) - (xy 87.907486 83.7162) (xy 88.152904 83.88677) (xy 88.426779 84.006423) (xy 88.718679 84.070602) (xy 89.017486 84.076861) - (xy 89.311817 84.024962) (xy 89.590462 83.916883) (xy 89.842808 83.756739) (xy 90.059243 83.550631) (xy 90.231522 83.30641) - (xy 90.353084 83.033377) (xy 90.419299 82.741932) (xy 90.424065 82.400564) (xy 90.424065 95.100564) (xy 90.424 95.100235) - (xy 90.424 88.581542) (xy 90.424 88.456458) (xy 90.424 86.678458) (xy 90.399597 86.555777) (xy 90.35173 86.440215) - (xy 90.282237 86.336211) (xy 90.193789 86.247763) (xy 90.089785 86.17827) (xy 89.974223 86.130403) (xy 89.851542 86.106) - (xy 89.726458 86.106) (xy 87.948458 86.106) (xy 87.825777 86.130403) (xy 87.710215 86.17827) (xy 87.606211 86.247763) - (xy 87.517763 86.336211) (xy 87.44827 86.440215) (xy 87.400403 86.555777) (xy 87.376 86.678458) (xy 87.376 86.803542) - (xy 87.376 88.581542) (xy 87.400403 88.704223) (xy 87.44827 88.819785) (xy 87.517763 88.923789) (xy 87.606211 89.012237) - (xy 87.710215 89.08173) (xy 87.825777 89.129597) (xy 87.948458 89.154) (xy 88.073542 89.154) (xy 89.851542 89.154) - (xy 89.974223 89.129597) (xy 90.089785 89.08173) (xy 90.193789 89.012237) (xy 90.282237 88.923789) (xy 90.35173 88.819785) - (xy 90.399597 88.704223) (xy 90.424 88.581542) (xy 90.424 95.100235) (xy 90.366014 94.807384) (xy 90.252123 94.531063) - (xy 90.08673 94.282127) (xy 89.876135 94.070056) (xy 89.628359 93.902929) (xy 89.35284 93.787112) (xy 89.060072 93.727015) - (xy 88.761208 93.724929) (xy 88.46763 93.780932) (xy 88.19052 93.892891) (xy 87.940435 94.056542) (xy 87.726899 94.265652) - (xy 87.558047 94.512255) (xy 87.440309 94.786959) (xy 87.37817 95.079299) (xy 87.373997 95.378142) (xy 87.427949 95.672104) - (xy 87.537971 95.949988) (xy 87.699872 96.20121) (xy 87.907486 96.4162) (xy 88.152904 96.58677) (xy 88.426779 96.706423) - (xy 88.718679 96.770602) (xy 89.017486 96.776861) (xy 89.311817 96.724962) (xy 89.590462 96.616883) (xy 89.842808 96.456739) - (xy 90.059243 96.250631) (xy 90.231522 96.00641) (xy 90.353084 95.733377) (xy 90.419299 95.441932) (xy 90.424065 95.100564) - (xy 90.424065 111.758208) (xy 90.424 111.758305) (xy 90.424 101.281542) (xy 90.424 100.61575) (xy 90.424 100.04425) - (xy 90.424 99.378458) (xy 90.399597 99.255777) (xy 90.35173 99.140215) (xy 90.282237 99.036211) (xy 90.193789 98.947763) - (xy 90.089785 98.87827) (xy 89.974223 98.830403) (xy 89.851542 98.806) (xy 89.726458 98.806) (xy 89.18575 98.806) - (xy 89.027 98.96475) (xy 89.027 100.203) (xy 90.26525 100.203) (xy 90.424 100.04425) (xy 90.424 100.61575) - (xy 90.26525 100.457) (xy 89.027 100.457) (xy 89.027 101.69525) (xy 89.18575 101.854) (xy 89.726458 101.854) - (xy 89.851542 101.854) (xy 89.974223 101.829597) (xy 90.089785 101.78173) (xy 90.193789 101.712237) (xy 90.282237 101.623789) - (xy 90.35173 101.519785) (xy 90.399597 101.404223) (xy 90.424 101.281542) (xy 90.424 111.758305) (xy 90.36927 111.840215) - (xy 90.321403 111.955777) (xy 90.297 112.078458) (xy 90.297 112.203542) (xy 90.297 113.727542) (xy 90.321403 113.850223) - (xy 90.36927 113.965785) (xy 90.438763 114.069789) (xy 90.527211 114.158237) (xy 90.631215 114.22773) (xy 90.746777 114.275597) - (xy 90.869458 114.3) (xy 90.994542 114.3) (xy 92.518542 114.3) (xy 92.641223 114.275597) (xy 92.756785 114.22773) - (xy 92.860789 114.158237) (xy 92.949237 114.069789) (xy 93.01873 113.965785) (xy 93.066597 113.850223) (xy 93.091 113.727542) - (xy 93.091 113.7084) (xy 93.133883 113.774942) (xy 93.324196 113.972016) (xy 93.549163 114.128372) (xy 93.800215 114.238054) - (xy 94.067789 114.296884) (xy 94.341695 114.302622) (xy 94.611499 114.255048) (xy 94.866923 114.155975) (xy 95.09824 114.009177) - (xy 95.296639 113.820245) (xy 95.454561 113.596375) (xy 95.565993 113.346095) (xy 95.62669 113.078938) (xy 95.631059 112.766017) - (xy 95.631059 113.987202) (xy 95.451738 114.02141) (xy 95.255452 114.100715) (xy 95.078308 114.216634) (xy 94.927054 114.364753) - (xy 94.80745 114.539431) (xy 94.724052 114.734012) (xy 94.680037 114.941087) (xy 94.677081 115.152767) (xy 94.715297 115.36099) - (xy 94.79323 115.557825) (xy 94.90791 115.735773) (xy 95.054969 115.888058) (xy 95.228807 116.008879) (xy 95.422802 116.093633) - (xy 95.629564 116.139093) (xy 95.841219 116.143526) (xy 96.049704 116.106765) (xy 96.247077 116.030208) (xy 96.425822 115.916773) - (xy 96.57913 115.77078) (xy 96.701161 115.59779) (xy 96.787268 115.404392) (xy 96.83417 115.197952) (xy 96.837546 114.95615) - (xy 96.837546 117.49615) (xy 96.796426 117.288481) (xy 96.715754 117.092753) (xy 96.5986 116.916423) (xy 96.449428 116.766207) - (xy 96.273921 116.647825) (xy 96.078761 116.565788) (xy 95.871384 116.523219) (xy 95.659689 116.521741) (xy 95.451738 116.56141) - (xy 95.255452 116.640715) (xy 95.078308 116.756634) (xy 94.927054 116.904753) (xy 94.80745 117.079431) (xy 94.724052 117.274012) - (xy 94.680037 117.481087) (xy 94.677081 117.692767) (xy 94.715297 117.90099) (xy 94.79323 118.097825) (xy 94.90791 118.275773) - (xy 95.054969 118.428058) (xy 95.228807 118.548879) (xy 95.422802 118.633633) (xy 95.629564 118.679093) (xy 95.841219 118.683526) - (xy 96.049704 118.646765) (xy 96.247077 118.570208) (xy 96.425822 118.456773) (xy 96.57913 118.31078) (xy 96.701161 118.13779) - (xy 96.787268 117.944392) (xy 96.83417 117.737952) (xy 96.837546 117.49615) (xy 96.837546 145.923) (xy 92.837 145.923) - (xy 92.837 135.444542) (xy 92.837 135.319458) (xy 92.837 133.795458) (xy 92.812597 133.672777) (xy 92.76473 133.557215) - (xy 92.695237 133.453211) (xy 92.606789 133.364763) (xy 92.502785 133.29527) (xy 92.387223 133.247403) (xy 92.264542 133.223) - (xy 92.139458 133.223) (xy 90.615458 133.223) (xy 90.492777 133.247403) (xy 90.377215 133.29527) (xy 90.273211 133.364763) - (xy 90.184763 133.453211) (xy 90.11527 133.557215) (xy 90.067403 133.672777) (xy 90.043 133.795458) (xy 90.043 133.815812) - (xy 89.987835 133.732783) (xy 89.79479 133.538385) (xy 89.567662 133.385185) (xy 89.315103 133.279019) (xy 89.046733 133.223931) - (xy 88.773 133.222019) (xy 88.773 101.69525) (xy 88.773 100.457) (xy 88.773 100.203) (xy 88.773 98.96475) - (xy 88.61425 98.806) (xy 88.073542 98.806) (xy 87.948458 98.806) (xy 87.825777 98.830403) (xy 87.710215 98.87827) - (xy 87.606211 98.947763) (xy 87.517763 99.036211) (xy 87.44827 99.140215) (xy 87.400403 99.255777) (xy 87.376 99.378458) - (xy 87.376 100.04425) (xy 87.53475 100.203) (xy 88.773 100.203) (xy 88.773 100.457) (xy 87.53475 100.457) - (xy 87.376 100.61575) (xy 87.376 101.281542) (xy 87.400403 101.404223) (xy 87.44827 101.519785) (xy 87.517763 101.623789) - (xy 87.606211 101.712237) (xy 87.710215 101.78173) (xy 87.825777 101.829597) (xy 87.948458 101.854) (xy 88.073542 101.854) - (xy 88.61425 101.854) (xy 88.773 101.69525) (xy 88.773 133.222019) (xy 88.772774 133.222018) (xy 88.709546 133.234079) - (xy 88.709546 112.03515) (xy 88.668426 111.827481) (xy 88.587754 111.631753) (xy 88.4706 111.455423) (xy 88.321428 111.305207) - (xy 88.145921 111.186825) (xy 87.950761 111.104788) (xy 87.743384 111.062219) (xy 87.531689 111.060741) (xy 87.323738 111.10041) - (xy 87.127452 111.179715) (xy 86.950308 111.295634) (xy 86.799054 111.443753) (xy 86.67945 111.618431) (xy 86.596052 111.813012) - (xy 86.552037 112.020087) (xy 86.549081 112.231767) (xy 86.587297 112.43999) (xy 86.66523 112.636825) (xy 86.77991 112.814773) - (xy 86.926969 112.967058) (xy 87.100807 113.087879) (xy 87.294802 113.172633) (xy 87.501564 113.218093) (xy 87.713219 113.222526) - (xy 87.921704 113.185765) (xy 88.119077 113.109208) (xy 88.297822 112.995773) (xy 88.45113 112.84978) (xy 88.573161 112.67679) - (xy 88.659268 112.483392) (xy 88.70617 112.276952) (xy 88.709546 112.03515) (xy 88.709546 133.234079) (xy 88.503661 133.273354) - (xy 88.249644 133.375984) (xy 88.020399 133.525997) (xy 87.947552 133.597334) (xy 87.947552 132.469697) (xy 87.901595 132.237596) - (xy 87.811431 132.018842) (xy 87.680495 131.821767) (xy 87.513773 131.653878) (xy 87.317617 131.521569) (xy 87.099498 131.42988) - (xy 86.867724 131.382303) (xy 86.631123 131.380651) (xy 86.398707 131.424987) (xy 86.179329 131.513622) (xy 85.981344 131.643179) - (xy 85.812295 131.808724) (xy 85.788541 131.843415) (xy 85.788541 108.491603) (xy 85.752259 108.308365) (xy 85.681077 108.135665) - (xy 85.577706 107.980079) (xy 85.446084 107.847535) (xy 85.291224 107.74308) (xy 85.119025 107.670694) (xy 84.936045 107.633134) - (xy 84.749255 107.63183) (xy 84.565768 107.666832) (xy 84.392575 107.736807) (xy 84.32829 107.778873) (xy 84.275224 107.74308) - (xy 84.103025 107.670694) (xy 83.920045 107.633134) (xy 83.733255 107.63183) (xy 83.549768 107.666832) (xy 83.376575 107.736807) - (xy 83.220272 107.839089) (xy 83.086812 107.969782) (xy 82.981279 108.123909) (xy 82.907693 108.295599) (xy 82.868856 108.478312) - (xy 82.866248 108.665089) (xy 82.899968 108.848815) (xy 82.968732 109.022493) (xy 83.06992 109.179506) (xy 83.199679 109.313875) - (xy 83.353065 109.420482) (xy 83.524237 109.495265) (xy 83.706674 109.535376) (xy 83.893428 109.539288) (xy 84.077386 109.506852) - (xy 84.251539 109.439302) (xy 84.327125 109.391333) (xy 84.369065 109.420482) (xy 84.540237 109.495265) (xy 84.722674 109.535376) - (xy 84.909428 109.539288) (xy 85.093386 109.506852) (xy 85.267539 109.439302) (xy 85.425255 109.339212) (xy 85.560527 109.210395) - (xy 85.668201 109.057756) (xy 85.744178 108.887111) (xy 85.785562 108.704958) (xy 85.788541 108.491603) (xy 85.788541 131.843415) - (xy 85.67862 132.003952) (xy 85.585411 132.221425) (xy 85.536217 132.452862) (xy 85.532914 132.689446) (xy 85.575626 132.922166) - (xy 85.662727 133.142157) (xy 85.790899 133.341041) (xy 85.95526 133.511242) (xy 86.149549 133.646277) (xy 86.366367 133.741002) - (xy 86.597454 133.79181) (xy 86.834009 133.796765) (xy 87.067022 133.755679) (xy 87.287616 133.670116) (xy 87.48739 133.543335) - (xy 87.658734 133.380167) (xy 87.795122 133.186824) (xy 87.891358 132.970673) (xy 87.943778 132.739946) (xy 87.947552 132.469697) - (xy 87.947552 133.597334) (xy 87.824658 133.717681) (xy 87.669877 133.943734) (xy 87.56195 134.195546) (xy 87.504989 134.463524) - (xy 87.501164 134.737464) (xy 87.55062 135.006928) (xy 87.651474 135.261655) (xy 87.799883 135.491942) (xy 87.990196 135.689016) - (xy 88.215163 135.845372) (xy 88.466215 135.955054) (xy 88.733789 136.013884) (xy 89.007695 136.019622) (xy 89.277499 135.972048) - (xy 89.532923 135.872975) (xy 89.76424 135.726177) (xy 89.962639 135.537245) (xy 90.043 135.423325) (xy 90.043 135.444542) - (xy 90.067403 135.567223) (xy 90.11527 135.682785) (xy 90.184763 135.786789) (xy 90.273211 135.875237) (xy 90.377215 135.94473) - (xy 90.492777 135.992597) (xy 90.615458 136.017) (xy 90.740542 136.017) (xy 92.264542 136.017) (xy 92.387223 135.992597) - (xy 92.502785 135.94473) (xy 92.606789 135.875237) (xy 92.695237 135.786789) (xy 92.76473 135.682785) (xy 92.812597 135.567223) - (xy 92.837 135.444542) (xy 92.837 145.923) (xy 90.741552 145.923) (xy 90.741552 140.851697) (xy 90.695595 140.619596) - (xy 90.605431 140.400842) (xy 90.474495 140.203767) (xy 90.307773 140.035878) (xy 90.111617 139.903569) (xy 89.893498 139.81188) - (xy 89.661724 139.764303) (xy 89.425123 139.762651) (xy 89.192707 139.806987) (xy 88.973329 139.895622) (xy 88.775344 140.025179) - (xy 88.606295 140.190724) (xy 88.47262 140.385952) (xy 88.379411 140.603425) (xy 88.330217 140.834862) (xy 88.326914 141.071446) - (xy 88.369626 141.304166) (xy 88.456727 141.524157) (xy 88.584899 141.723041) (xy 88.74926 141.893242) (xy 88.943549 142.028277) - (xy 89.160367 142.123002) (xy 89.391454 142.17381) (xy 89.628009 142.178765) (xy 89.861022 142.137679) (xy 90.081616 142.052116) - (xy 90.28139 141.925335) (xy 90.452734 141.762167) (xy 90.589122 141.568824) (xy 90.685358 141.352673) (xy 90.737778 141.121946) - (xy 90.741552 140.851697) (xy 90.741552 145.923) (xy 84.645552 145.923) (xy 84.645552 138.438697) (xy 84.645552 134.120697) - (xy 84.599595 133.888596) (xy 84.509431 133.669842) (xy 84.391546 133.49241) (xy 84.391546 115.21015) (xy 84.350426 115.002481) - (xy 84.269754 114.806753) (xy 84.1526 114.630423) (xy 84.003428 114.480207) (xy 83.827921 114.361825) (xy 83.632761 114.279788) - (xy 83.425384 114.237219) (xy 83.213689 114.235741) (xy 83.005738 114.27541) (xy 82.809452 114.354715) (xy 82.740541 114.399808) - (xy 82.740541 108.491603) (xy 82.704259 108.308365) (xy 82.633077 108.135665) (xy 82.529706 107.980079) (xy 82.398084 107.847535) - (xy 82.296065 107.778721) (xy 82.296065 76.939564) (xy 82.238014 76.646384) (xy 82.124123 76.370063) (xy 81.95873 76.121127) - (xy 81.748135 75.909056) (xy 81.500359 75.741929) (xy 81.22484 75.626112) (xy 80.932072 75.566015) (xy 80.633208 75.563929) - (xy 80.33963 75.619932) (xy 80.06252 75.731891) (xy 79.812435 75.895542) (xy 79.598899 76.104652) (xy 79.430047 76.351255) - (xy 79.312309 76.625959) (xy 79.25017 76.918299) (xy 79.245997 77.217142) (xy 79.299949 77.511104) (xy 79.409971 77.788988) - (xy 79.571872 78.04021) (xy 79.779486 78.2552) (xy 80.024904 78.42577) (xy 80.298779 78.545423) (xy 80.590679 78.609602) - (xy 80.889486 78.615861) (xy 81.183817 78.563962) (xy 81.462462 78.455883) (xy 81.714808 78.295739) (xy 81.931243 78.089631) - (xy 82.103522 77.84541) (xy 82.225084 77.572377) (xy 82.291299 77.280932) (xy 82.296065 76.939564) (xy 82.296065 107.778721) - (xy 82.243224 107.74308) (xy 82.071025 107.670694) (xy 81.888045 107.633134) (xy 81.701255 107.63183) (xy 81.517768 107.666832) - (xy 81.344575 107.736807) (xy 81.188272 107.839089) (xy 81.054812 107.969782) (xy 81.026417 108.011251) (xy 81.005706 107.980079) - (xy 80.874084 107.847535) (xy 80.719224 107.74308) (xy 80.547025 107.670694) (xy 80.364045 107.633134) (xy 80.177255 107.63183) - (xy 79.993768 107.666832) (xy 79.820575 107.736807) (xy 79.772558 107.768228) (xy 79.76179 107.757385) (xy 79.534662 107.604185) - (xy 79.453393 107.570022) (xy 79.499923 107.551975) (xy 79.73124 107.405177) (xy 79.929639 107.216245) (xy 80.087561 106.992375) - (xy 80.198993 106.742095) (xy 80.25969 106.474938) (xy 80.264059 106.162017) (xy 80.210846 105.893269) (xy 80.106446 105.639975) - (xy 79.954835 105.411783) (xy 79.76179 105.217385) (xy 79.534662 105.064185) (xy 79.282103 104.958019) (xy 79.013733 104.902931) - (xy 78.739774 104.901018) (xy 78.470661 104.952354) (xy 78.216644 105.054984) (xy 77.987399 105.204997) (xy 77.791658 105.396681) - (xy 77.724 105.495493) (xy 77.724 105.474458) (xy 77.699597 105.351777) (xy 77.65173 105.236215) (xy 77.582237 105.132211) - (xy 77.493789 105.043763) (xy 77.389785 104.97427) (xy 77.274223 104.926403) (xy 77.151542 104.902) (xy 77.026458 104.902) - (xy 75.502458 104.902) (xy 75.379777 104.926403) (xy 75.264215 104.97427) (xy 75.160211 105.043763) (xy 75.071763 105.132211) - (xy 75.00227 105.236215) (xy 74.954403 105.351777) (xy 74.93 105.474458) (xy 74.93 105.599542) (xy 74.93 107.123542) - (xy 74.954403 107.246223) (xy 75.00227 107.361785) (xy 75.071763 107.465789) (xy 75.160211 107.554237) (xy 75.264215 107.62373) - (xy 75.379777 107.671597) (xy 75.502458 107.696) (xy 75.522274 107.696) (xy 75.447399 107.744997) (xy 75.251658 107.936681) - (xy 75.096877 108.162734) (xy 74.98895 108.414546) (xy 74.931989 108.682524) (xy 74.928164 108.956464) (xy 74.97762 109.225928) - (xy 75.078474 109.480655) (xy 75.226883 109.710942) (xy 75.417196 109.908016) (xy 75.642163 110.064372) (xy 75.742699 110.108295) - (xy 75.676644 110.134984) (xy 75.447399 110.284997) (xy 75.251658 110.476681) (xy 75.096877 110.702734) (xy 74.98895 110.954546) - (xy 74.931989 111.222524) (xy 74.928164 111.496464) (xy 74.97762 111.765928) (xy 75.078474 112.020655) (xy 75.226883 112.250942) - (xy 75.417196 112.448016) (xy 75.642163 112.604372) (xy 75.742699 112.648295) (xy 75.676644 112.674984) (xy 75.447399 112.824997) - (xy 75.251658 113.016681) (xy 75.096877 113.242734) (xy 74.98895 113.494546) (xy 74.931989 113.762524) (xy 74.928164 114.036464) - (xy 74.97762 114.305928) (xy 75.078474 114.560655) (xy 75.226883 114.790942) (xy 75.417196 114.988016) (xy 75.642163 115.144372) - (xy 75.738086 115.186279) (xy 75.723977 115.191364) (xy 75.60802 115.253344) (xy 75.54104 115.493435) (xy 76.327 116.279395) - (xy 77.11296 115.493435) (xy 77.04598 115.253344) (xy 76.912256 115.190463) (xy 76.959923 115.171975) (xy 77.19124 115.025177) - (xy 77.389639 114.836245) (xy 77.547561 114.612375) (xy 77.595934 114.503726) (xy 77.618474 114.560655) (xy 77.766883 114.790942) - (xy 77.957196 114.988016) (xy 78.182163 115.144372) (xy 78.282699 115.188295) (xy 78.216644 115.214984) (xy 77.987399 115.364997) - (xy 77.791658 115.556681) (xy 77.636877 115.782734) (xy 77.599591 115.869728) (xy 77.594636 115.855977) (xy 77.532656 115.74002) - (xy 77.292565 115.67304) (xy 76.506605 116.459) (xy 77.292565 117.24496) (xy 77.532656 117.17798) (xy 77.595866 117.043555) - (xy 77.618474 117.100655) (xy 77.766883 117.330942) (xy 77.957196 117.528016) (xy 78.182163 117.684372) (xy 78.282699 117.728295) - (xy 78.216644 117.754984) (xy 77.987399 117.904997) (xy 77.791658 118.096681) (xy 77.636877 118.322734) (xy 77.59735 118.414955) - (xy 77.566446 118.339975) (xy 77.414835 118.111783) (xy 77.22179 117.917385) (xy 76.994662 117.764185) (xy 76.91673 117.731425) - (xy 76.930023 117.726636) (xy 77.04598 117.664656) (xy 77.11296 117.424565) (xy 76.327 116.638605) (xy 76.147395 116.81821) - (xy 76.147395 116.459) (xy 75.361435 115.67304) (xy 75.121344 115.74002) (xy 75.004244 115.989048) (xy 74.937977 116.256135) - (xy 74.92509 116.531017) (xy 74.966078 116.803133) (xy 75.059364 117.062023) (xy 75.121344 117.17798) (xy 75.361435 117.24496) - (xy 76.147395 116.459) (xy 76.147395 116.81821) (xy 75.54104 117.424565) (xy 75.60802 117.664656) (xy 75.743053 117.728152) - (xy 75.676644 117.754984) (xy 75.447399 117.904997) (xy 75.251658 118.096681) (xy 75.096877 118.322734) (xy 74.98895 118.574546) - (xy 74.931989 118.842524) (xy 74.928164 119.116464) (xy 74.97762 119.385928) (xy 75.078474 119.640655) (xy 75.226883 119.870942) - (xy 75.417196 120.068016) (xy 75.642163 120.224372) (xy 75.742699 120.268295) (xy 75.676644 120.294984) (xy 75.447399 120.444997) - (xy 75.251658 120.636681) (xy 75.096877 120.862734) (xy 74.98895 121.114546) (xy 74.931989 121.382524) (xy 74.928164 121.656464) - (xy 74.97762 121.925928) (xy 75.078474 122.180655) (xy 75.226883 122.410942) (xy 75.417196 122.608016) (xy 75.642163 122.764372) - (xy 75.742699 122.808295) (xy 75.676644 122.834984) (xy 75.447399 122.984997) (xy 75.251658 123.176681) (xy 75.096877 123.402734) - (xy 74.98895 123.654546) (xy 74.931989 123.922524) (xy 74.928164 124.196464) (xy 74.97762 124.465928) (xy 75.078474 124.720655) - (xy 75.226883 124.950942) (xy 75.417196 125.148016) (xy 75.642163 125.304372) (xy 75.742699 125.348295) (xy 75.676644 125.374984) - (xy 75.447399 125.524997) (xy 75.251658 125.716681) (xy 75.096877 125.942734) (xy 74.98895 126.194546) (xy 74.931989 126.462524) - (xy 74.928164 126.736464) (xy 74.97762 127.005928) (xy 75.078474 127.260655) (xy 75.226883 127.490942) (xy 75.417196 127.688016) - (xy 75.642163 127.844372) (xy 75.742699 127.888295) (xy 75.676644 127.914984) (xy 75.447399 128.064997) (xy 75.251658 128.256681) - (xy 75.096877 128.482734) (xy 74.98895 128.734546) (xy 74.931989 129.002524) (xy 74.928164 129.276464) (xy 74.97762 129.545928) - (xy 75.078474 129.800655) (xy 75.226883 130.030942) (xy 75.417196 130.228016) (xy 75.642163 130.384372) (xy 75.742699 130.428295) - (xy 75.676644 130.454984) (xy 75.447399 130.604997) (xy 75.251658 130.796681) (xy 75.096877 131.022734) (xy 74.98895 131.274546) - (xy 74.931989 131.542524) (xy 74.928164 131.816464) (xy 74.97762 132.085928) (xy 75.078474 132.340655) (xy 75.226883 132.570942) - (xy 75.417196 132.768016) (xy 75.642163 132.924372) (xy 75.742699 132.968295) (xy 75.676644 132.994984) (xy 75.447399 133.144997) - (xy 75.251658 133.336681) (xy 75.096877 133.562734) (xy 74.98895 133.814546) (xy 74.931989 134.082524) (xy 74.928164 134.356464) - (xy 74.97762 134.625928) (xy 75.078474 134.880655) (xy 75.226883 135.110942) (xy 75.417196 135.308016) (xy 75.642163 135.464372) - (xy 75.738086 135.506279) (xy 75.723977 135.511364) (xy 75.60802 135.573344) (xy 75.54104 135.813435) (xy 76.327 136.599395) - (xy 77.11296 135.813435) (xy 77.04598 135.573344) (xy 76.912256 135.510463) (xy 76.959923 135.491975) (xy 77.19124 135.345177) - (xy 77.389639 135.156245) (xy 77.547561 134.932375) (xy 77.595934 134.823726) (xy 77.618474 134.880655) (xy 77.766883 135.110942) - (xy 77.957196 135.308016) (xy 78.182163 135.464372) (xy 78.282699 135.508295) (xy 78.216644 135.534984) (xy 77.987399 135.684997) - (xy 77.791658 135.876681) (xy 77.636877 136.102734) (xy 77.599591 136.189728) (xy 77.594636 136.175977) (xy 77.532656 136.06002) - (xy 77.292565 135.99304) (xy 76.506605 136.779) (xy 77.292565 137.56496) (xy 77.532656 137.49798) (xy 77.595866 137.363555) - (xy 77.618474 137.420655) (xy 77.766883 137.650942) (xy 77.957196 137.848016) (xy 78.182163 138.004372) (xy 78.433215 138.114054) - (xy 78.700789 138.172884) (xy 78.974695 138.178622) (xy 79.244499 138.131048) (xy 79.499923 138.031975) (xy 79.73124 137.885177) - (xy 79.929639 137.696245) (xy 80.087561 137.472375) (xy 80.198993 137.222095) (xy 80.25969 136.954938) (xy 80.264059 136.642017) - (xy 80.210846 136.373269) (xy 80.106446 136.119975) (xy 79.954835 135.891783) (xy 79.76179 135.697385) (xy 79.534662 135.544185) - (xy 79.453393 135.510022) (xy 79.499923 135.491975) (xy 79.73124 135.345177) (xy 79.929639 135.156245) (xy 80.087561 134.932375) - (xy 80.198993 134.682095) (xy 80.25969 134.414938) (xy 80.264059 134.102017) (xy 80.210846 133.833269) (xy 80.106446 133.579975) - (xy 79.954835 133.351783) (xy 79.76179 133.157385) (xy 79.534662 133.004185) (xy 79.453393 132.970022) (xy 79.499923 132.951975) - (xy 79.73124 132.805177) (xy 79.929639 132.616245) (xy 80.087561 132.392375) (xy 80.198993 132.142095) (xy 80.25969 131.874938) - (xy 80.264059 131.562017) (xy 80.210846 131.293269) (xy 80.106446 131.039975) (xy 79.954835 130.811783) (xy 79.76179 130.617385) - (xy 79.534662 130.464185) (xy 79.453393 130.430022) (xy 79.499923 130.411975) (xy 79.73124 130.265177) (xy 79.929639 130.076245) - (xy 80.087561 129.852375) (xy 80.198993 129.602095) (xy 80.25969 129.334938) (xy 80.264059 129.022017) (xy 80.210846 128.753269) - (xy 80.106446 128.499975) (xy 79.954835 128.271783) (xy 79.76179 128.077385) (xy 79.534662 127.924185) (xy 79.453393 127.890022) - (xy 79.499923 127.871975) (xy 79.73124 127.725177) (xy 79.929639 127.536245) (xy 80.087561 127.312375) (xy 80.198993 127.062095) - (xy 80.25969 126.794938) (xy 80.264059 126.482017) (xy 80.210846 126.213269) (xy 80.106446 125.959975) (xy 79.954835 125.731783) - (xy 79.76179 125.537385) (xy 79.534662 125.384185) (xy 79.453393 125.350022) (xy 79.499923 125.331975) (xy 79.73124 125.185177) - (xy 79.929639 124.996245) (xy 80.087561 124.772375) (xy 80.198993 124.522095) (xy 80.25969 124.254938) (xy 80.264059 123.942017) - (xy 80.210846 123.673269) (xy 80.106446 123.419975) (xy 79.954835 123.191783) (xy 79.76179 122.997385) (xy 79.534662 122.844185) - (xy 79.453393 122.810022) (xy 79.499923 122.791975) (xy 79.73124 122.645177) (xy 79.929639 122.456245) (xy 80.087561 122.232375) - (xy 80.198993 121.982095) (xy 80.25969 121.714938) (xy 80.264059 121.402017) (xy 80.210846 121.133269) (xy 80.106446 120.879975) - (xy 79.954835 120.651783) (xy 79.76179 120.457385) (xy 79.534662 120.304185) (xy 79.453393 120.270022) (xy 79.499923 120.251975) - (xy 79.73124 120.105177) (xy 79.929639 119.916245) (xy 80.087561 119.692375) (xy 80.198993 119.442095) (xy 80.25969 119.174938) - (xy 80.264059 118.862017) (xy 80.210846 118.593269) (xy 80.106446 118.339975) (xy 79.954835 118.111783) (xy 79.76179 117.917385) - (xy 79.534662 117.764185) (xy 79.453393 117.730022) (xy 79.499923 117.711975) (xy 79.73124 117.565177) (xy 79.929639 117.376245) - (xy 80.087561 117.152375) (xy 80.198993 116.902095) (xy 80.25969 116.634938) (xy 80.264059 116.322017) (xy 80.210846 116.053269) - (xy 80.106446 115.799975) (xy 79.954835 115.571783) (xy 79.76179 115.377385) (xy 79.534662 115.224185) (xy 79.453393 115.190022) - (xy 79.499923 115.171975) (xy 79.73124 115.025177) (xy 79.929639 114.836245) (xy 80.087561 114.612375) (xy 80.198993 114.362095) - (xy 80.25969 114.094938) (xy 80.264059 113.782017) (xy 80.210846 113.513269) (xy 80.106446 113.259975) (xy 79.954835 113.031783) - (xy 79.76179 112.837385) (xy 79.534662 112.684185) (xy 79.453393 112.650022) (xy 79.499923 112.631975) (xy 79.73124 112.485177) - (xy 79.929639 112.296245) (xy 80.087561 112.072375) (xy 80.198993 111.822095) (xy 80.25969 111.554938) (xy 80.264059 111.242017) - (xy 80.210846 110.973269) (xy 80.106446 110.719975) (xy 79.954835 110.491783) (xy 79.76179 110.297385) (xy 79.534662 110.144185) - (xy 79.453393 110.110022) (xy 79.499923 110.091975) (xy 79.73124 109.945177) (xy 79.929639 109.756245) (xy 80.087561 109.532375) - (xy 80.091971 109.522469) (xy 80.150674 109.535376) (xy 80.337428 109.539288) (xy 80.521386 109.506852) (xy 80.695539 109.439302) - (xy 80.853255 109.339212) (xy 80.988527 109.210395) (xy 81.024741 109.159057) (xy 81.03792 109.179506) (xy 81.167679 109.313875) - (xy 81.321065 109.420482) (xy 81.492237 109.495265) (xy 81.674674 109.535376) (xy 81.861428 109.539288) (xy 82.045386 109.506852) - (xy 82.219539 109.439302) (xy 82.377255 109.339212) (xy 82.512527 109.210395) (xy 82.620201 109.057756) (xy 82.696178 108.887111) - (xy 82.737562 108.704958) (xy 82.740541 108.491603) (xy 82.740541 114.399808) (xy 82.632308 114.470634) (xy 82.481054 114.618753) - (xy 82.36145 114.793431) (xy 82.278052 114.988012) (xy 82.234037 115.195087) (xy 82.231081 115.406767) (xy 82.269297 115.61499) - (xy 82.34723 115.811825) (xy 82.46191 115.989773) (xy 82.608969 116.142058) (xy 82.782807 116.262879) (xy 82.976802 116.347633) - (xy 83.183564 116.393093) (xy 83.395219 116.397526) (xy 83.603704 116.360765) (xy 83.801077 116.284208) (xy 83.979822 116.170773) - (xy 84.13313 116.02478) (xy 84.255161 115.85179) (xy 84.341268 115.658392) (xy 84.38817 115.451952) (xy 84.391546 115.21015) - (xy 84.391546 133.49241) (xy 84.378495 133.472767) (xy 84.211773 133.304878) (xy 84.015617 133.172569) (xy 83.797498 133.08088) - (xy 83.565724 133.033303) (xy 83.329123 133.031651) (xy 83.096707 133.075987) (xy 82.877329 133.164622) (xy 82.679344 133.294179) - (xy 82.510295 133.459724) (xy 82.37662 133.654952) (xy 82.283411 133.872425) (xy 82.234217 134.103862) (xy 82.230914 134.340446) - (xy 82.273626 134.573166) (xy 82.360727 134.793157) (xy 82.488899 134.992041) (xy 82.65326 135.162242) (xy 82.847549 135.297277) - (xy 83.064367 135.392002) (xy 83.295454 135.44281) (xy 83.532009 135.447765) (xy 83.765022 135.406679) (xy 83.985616 135.321116) - (xy 84.18539 135.194335) (xy 84.356734 135.031167) (xy 84.493122 134.837824) (xy 84.589358 134.621673) (xy 84.641778 134.390946) - (xy 84.645552 134.120697) (xy 84.645552 138.438697) (xy 84.599595 138.206596) (xy 84.509431 137.987842) (xy 84.378495 137.790767) - (xy 84.211773 137.622878) (xy 84.015617 137.490569) (xy 83.797498 137.39888) (xy 83.565724 137.351303) (xy 83.329123 137.349651) - (xy 83.096707 137.393987) (xy 82.877329 137.482622) (xy 82.679344 137.612179) (xy 82.510295 137.777724) (xy 82.37662 137.972952) - (xy 82.283411 138.190425) (xy 82.234217 138.421862) (xy 82.230914 138.658446) (xy 82.273626 138.891166) (xy 82.360727 139.111157) - (xy 82.488899 139.310041) (xy 82.65326 139.480242) (xy 82.847549 139.615277) (xy 83.064367 139.710002) (xy 83.295454 139.76081) - (xy 83.532009 139.765765) (xy 83.765022 139.724679) (xy 83.985616 139.639116) (xy 84.18539 139.512335) (xy 84.356734 139.349167) - (xy 84.493122 139.155824) (xy 84.589358 138.939673) (xy 84.641778 138.708946) (xy 84.645552 138.438697) (xy 84.645552 145.923) - (xy 77.11296 145.923) (xy 77.11296 137.744565) (xy 76.327 136.958605) (xy 76.147395 137.13821) (xy 76.147395 136.779) - (xy 75.361435 135.99304) (xy 75.121344 136.06002) (xy 75.004244 136.309048) (xy 74.937977 136.576135) (xy 74.92509 136.851017) - (xy 74.966078 137.123133) (xy 75.059364 137.382023) (xy 75.121344 137.49798) (xy 75.361435 137.56496) (xy 76.147395 136.779) - (xy 76.147395 137.13821) (xy 75.54104 137.744565) (xy 75.60802 137.984656) (xy 75.857048 138.101756) (xy 76.124135 138.168023) - (xy 76.399017 138.18091) (xy 76.671133 138.139922) (xy 76.930023 138.046636) (xy 77.04598 137.984656) (xy 77.11296 137.744565) - (xy 77.11296 145.923) (xy 72.517 145.923) (xy 72.517 75.057) (xy 105.537 75.057) (xy 105.537 64.262) - (xy 107.65916 64.262) (xy 107.518832 64.39942) (xy 107.237411 64.810425) (xy 107.041181 65.268264) (xy 106.937616 65.755499) - (xy 106.930661 66.25357) (xy 107.020581 66.743506) (xy 107.203951 67.206646) (xy 107.473787 67.625349) (xy 107.81981 67.983667) - (xy 108.228841 68.26795) (xy 108.685299 68.467372) (xy 109.171799 68.574336) (xy 109.669809 68.584768) (xy 110.160361 68.49827) - (xy 110.62477 68.318138) (xy 111.045347 68.051232) (xy 111.406071 67.707719) (xy 111.693203 67.300683) (xy 111.895807 66.845628) - (xy 112.006164 66.359887) (xy 112.014109 65.79094) (xy 111.917357 65.302307) (xy 111.727538 64.841772) (xy 111.451883 64.426878) - (xy 111.288152 64.262) (xy 133.05916 64.262) (xy 132.918832 64.39942) (xy 132.637411 64.810425) (xy 132.441181 65.268264) - (xy 132.337616 65.755499) (xy 132.330661 66.25357) (xy 132.420581 66.743506) (xy 132.603951 67.206646) (xy 132.873787 67.625349) - (xy 133.21981 67.983667) (xy 133.628841 68.26795) (xy 134.085299 68.467372) (xy 134.571799 68.574336) (xy 135.069809 68.584768) - (xy 135.560361 68.49827) (xy 136.02477 68.318138) (xy 136.445347 68.051232) (xy 136.806071 67.707719) (xy 137.093203 67.300683) - (xy 137.295807 66.845628) (xy 137.406164 66.359887) (xy 137.414109 65.79094) (xy 137.317357 65.302307) (xy 137.127538 64.841772) - (xy 136.851883 64.426878) (xy 136.688152 64.262) (xy 141.18716 64.262) (xy 141.046832 64.39942) (xy 140.765411 64.810425) - (xy 140.569181 65.268264) (xy 140.465616 65.755499) (xy 140.458661 66.25357) (xy 140.548581 66.743506) (xy 140.731951 67.206646) - (xy 141.001787 67.625349) (xy 141.34781 67.983667) (xy 141.756841 68.26795) (xy 142.213299 68.467372) (xy 142.699799 68.574336) - (xy 143.197809 68.584768) (xy 143.688361 68.49827) (xy 144.15277 68.318138) (xy 144.573347 68.051232) (xy 144.934071 67.707719) - (xy 145.221203 67.300683) (xy 145.423807 66.845628) (xy 145.534164 66.359887) (xy 145.542109 65.79094) (xy 145.445357 65.302307) - (xy 145.255538 64.841772) (xy 144.979883 64.426878) (xy 144.816152 64.262) (xy 166.58716 64.262) (xy 166.446832 64.39942) - (xy 166.165411 64.810425) (xy 165.969181 65.268264) (xy 165.865616 65.755499) (xy 165.858661 66.25357) (xy 165.948581 66.743506) - (xy 166.131951 67.206646) (xy 166.401787 67.625349) (xy 166.74781 67.983667) (xy 167.156841 68.26795) (xy 167.613299 68.467372) - (xy 168.099799 68.574336) (xy 168.597809 68.584768) (xy 169.088361 68.49827) (xy 169.55277 68.318138) (xy 169.973347 68.051232) - (xy 170.334071 67.707719) (xy 170.621203 67.300683) (xy 170.823807 66.845628) (xy 170.934164 66.359887) (xy 170.942109 65.79094) - (xy 170.845357 65.302307) (xy 170.655538 64.841772) (xy 170.379883 64.426878) (xy 170.216152 64.262) (xy 174.71516 64.262) - (xy 174.574832 64.39942) (xy 174.293411 64.810425) (xy 174.097181 65.268264) (xy 173.993616 65.755499) (xy 173.986661 66.25357) - (xy 174.076581 66.743506) (xy 174.259951 67.206646) (xy 174.529787 67.625349) (xy 174.87581 67.983667) (xy 175.284841 68.26795) - (xy 175.741299 68.467372) (xy 176.227799 68.574336) (xy 176.725809 68.584768) (xy 177.216361 68.49827) (xy 177.68077 68.318138) - (xy 178.101347 68.051232) (xy 178.462071 67.707719) (xy 178.749203 67.300683) (xy 178.951807 66.845628) (xy 179.062164 66.359887) - (xy 179.070109 65.79094) (xy 178.973357 65.302307) (xy 178.783538 64.841772) (xy 178.507883 64.426878) (xy 178.344152 64.262) - (xy 200.11516 64.262) (xy 199.974832 64.39942) (xy 199.693411 64.810425) (xy 199.497181 65.268264) (xy 199.393616 65.755499) - (xy 199.386661 66.25357) (xy 199.476581 66.743506) (xy 199.659951 67.206646) (xy 199.929787 67.625349) (xy 200.27581 67.983667) - (xy 200.684841 68.26795) (xy 201.141299 68.467372) (xy 201.627799 68.574336) (xy 202.125809 68.584768) (xy 202.616361 68.49827) - (xy 203.08077 68.318138) (xy 203.501347 68.051232) (xy 203.862071 67.707719) (xy 204.149203 67.300683) (xy 204.351807 66.845628) - (xy 204.462164 66.359887) (xy 204.470109 65.79094) (xy 204.373357 65.302307) (xy 204.183538 64.841772) (xy 203.907883 64.426878) - (xy 203.744152 64.262) (xy 216.027 64.262) (xy 216.027 61.087) (xy 227.7745 61.087) (xy 227.7745 145.923) - ) - ) ) - (zone (net 133) (net_name GND) (layer GND_layer) (tstamp 489AD1F1) (hatch edge 0.508) + (zone (net 103) (net_name GND) (layer GND_layer) (tstamp 489AD1F1) (hatch edge 0.508) (connect_pads (clearance 0.508)) (min_thickness 0.254) - (fill (arc_segments 32) (thermal_gap 0.508) (thermal_bridge_width 0.508)) + (fill yes (arc_segments 16) (thermal_gap 0.508) (thermal_bridge_width 0.508)) (polygon (pts (xy 71.755 146.685) (xy 227.33 146.05) (xy 227.33 56.515) (xy 97.155 56.515) (xy 97.155 74.93) @@ -11944,10 +9549,9 @@ ) (filled_polygon (pts - (xy 161.867195 116.849867) (xy 161.807399 116.888997) (xy 161.611658 117.080681) (xy 161.456877 117.306734) (xy 161.41735 117.398955) - (xy 161.386446 117.323975) (xy 161.234835 117.095783) (xy 161.04179 116.901385) (xy 160.814662 116.748185) (xy 160.562103 116.642019) - (xy 160.293733 116.586931) (xy 160.019774 116.585018) (xy 159.857587 116.615956) (xy 156.972 113.730369) (xy 156.972 112.058824) - (xy 161.867195 116.849867) + (xy 161.855851 116.838764) (xy 161.503371 117.19063) (xy 161.41705 117.398512) (xy 161.33201 117.192697) (xy 160.93937 116.799371) + (xy 160.4261 116.586243) (xy 159.870339 116.585758) (xy 159.839946 116.598315) (xy 156.972 113.730369) (xy 156.972 112.058824) + (xy 161.855851 116.838764) ) ) (filled_polygon @@ -11959,1990 +9563,2379 @@ ) (filled_polygon (pts - (xy 183.599274 138.303) (xy 183.524399 138.351997) (xy 183.328658 138.543681) (xy 183.173877 138.769734) (xy 183.13435 138.861955) - (xy 183.103446 138.786975) (xy 182.951835 138.558783) (xy 182.75879 138.364385) (xy 182.531662 138.211185) (xy 182.45373 138.178425) - (xy 182.467023 138.173636) (xy 182.58298 138.111656) (xy 182.64996 137.871565) (xy 181.864 137.085605) (xy 181.07804 137.871565) - (xy 181.14502 138.111656) (xy 181.280053 138.175152) (xy 181.213644 138.201984) (xy 180.984399 138.351997) (xy 180.788658 138.543681) - (xy 180.633877 138.769734) (xy 180.59435 138.861955) (xy 180.563446 138.786975) (xy 180.411835 138.558783) (xy 180.21879 138.364385) - (xy 179.991662 138.211185) (xy 179.910393 138.177022) (xy 179.956923 138.158975) (xy 180.18824 138.012177) (xy 180.386639 137.823245) - (xy 180.544561 137.599375) (xy 180.591186 137.494653) (xy 180.596364 137.509023) (xy 180.658344 137.62498) (xy 180.898435 137.69196) - (xy 181.684395 136.906) (xy 180.898435 136.12004) (xy 180.658344 136.18702) (xy 180.594604 136.32257) (xy 180.563446 136.246975) - (xy 180.411835 136.018783) (xy 180.21879 135.824385) (xy 180.086 135.734816) (xy 180.086 130.36363) (xy 180.467 129.98263) - (xy 180.467 131.126542) (xy 180.491403 131.249223) (xy 180.53927 131.364785) (xy 180.608763 131.468789) (xy 180.697211 131.557237) - (xy 180.801215 131.62673) (xy 180.916777 131.674597) (xy 181.039458 131.699) (xy 181.164542 131.699) (xy 182.688542 131.699) - (xy 182.811223 131.674597) (xy 182.926785 131.62673) (xy 183.030789 131.557237) (xy 183.119237 131.468789) (xy 183.18873 131.364785) - (xy 183.236597 131.249223) (xy 183.261 131.126542) (xy 183.261 131.1074) (xy 183.303883 131.173942) (xy 183.494196 131.371016) - (xy 183.5531 131.411955) (xy 183.5531 135.514242) (xy 183.456777 135.533403) (xy 183.341215 135.58127) (xy 183.237211 135.650763) - (xy 183.148763 135.739211) (xy 183.07927 135.843215) (xy 183.031403 135.958777) (xy 183.007 136.081458) (xy 183.007 136.16954) - (xy 182.829565 136.12004) (xy 182.64996 136.299645) (xy 182.64996 135.940435) (xy 182.58298 135.700344) (xy 182.333952 135.583244) - (xy 182.066865 135.516977) (xy 181.791983 135.50409) (xy 181.519867 135.545078) (xy 181.260977 135.638364) (xy 181.14502 135.700344) - (xy 181.07804 135.940435) (xy 181.864 136.726395) (xy 182.64996 135.940435) (xy 182.64996 136.299645) (xy 182.043605 136.906) - (xy 182.829565 137.69196) (xy 183.007 137.642459) (xy 183.007 137.730542) (xy 183.031403 137.853223) (xy 183.07927 137.968785) - (xy 183.148763 138.072789) (xy 183.237211 138.161237) (xy 183.341215 138.23073) (xy 183.456777 138.278597) (xy 183.579458 138.303) - (xy 183.599274 138.303) + (xy 183.571613 138.303) (xy 183.220371 138.65363) (xy 183.13405 138.861512) (xy 183.04901 138.655697) (xy 182.65637 138.262371) + (xy 182.464272 138.182605) (xy 182.595143 138.128397) (xy 182.664608 137.886213) (xy 181.864 137.085605) (xy 181.063392 137.886213) + (xy 181.132857 138.128397) (xy 181.273317 138.178508) (xy 181.073697 138.26099) (xy 180.680371 138.65363) (xy 180.59405 138.861512) + (xy 180.50901 138.655697) (xy 180.11637 138.262371) (xy 179.908487 138.17605) (xy 180.114303 138.09101) (xy 180.507629 137.69837) + (xy 180.587394 137.506272) (xy 180.641603 137.637143) (xy 180.883787 137.706608) (xy 181.684395 136.906) (xy 180.883787 136.105392) + (xy 180.641603 136.174857) (xy 180.591491 136.315317) (xy 180.50901 136.115697) (xy 180.11637 135.722371) (xy 180.086 135.70976) + (xy 180.086 130.36363) (xy 180.467 129.98263) (xy 180.467 131.190309) (xy 180.563673 131.423698) (xy 180.742301 131.602327) + (xy 180.97569 131.699) (xy 181.228309 131.699) (xy 182.752309 131.699) (xy 182.985698 131.602327) (xy 183.164327 131.423699) + (xy 183.261 131.19031) (xy 183.261 131.134386) (xy 183.5531 131.426996) (xy 183.5531 135.509) (xy 183.515691 135.509) + (xy 183.282302 135.605673) (xy 183.103673 135.784301) (xy 183.007 136.01769) (xy 183.007 136.152083) (xy 182.844213 136.105392) + (xy 182.664608 136.284997) (xy 182.664608 135.925787) (xy 182.595143 135.683603) (xy 182.071698 135.496856) (xy 181.516632 135.524638) + (xy 181.132857 135.683603) (xy 181.063392 135.925787) (xy 181.864 136.726395) (xy 182.664608 135.925787) (xy 182.664608 136.284997) + (xy 182.043605 136.906) (xy 182.844213 137.706608) (xy 183.007 137.659916) (xy 183.007 137.794309) (xy 183.103673 138.027698) + (xy 183.282301 138.206327) (xy 183.51569 138.303) (xy 183.571613 138.303) ) ) (filled_polygon (pts - (xy 227.203 145.923517) (xy 226.19191 145.927643) (xy 226.19191 137.087983) (xy 226.19191 88.827983) (xy 226.150922 88.555867) - (xy 226.057636 88.296977) (xy 225.995656 88.18102) (xy 225.755565 88.11404) (xy 225.57596 88.293645) (xy 225.57596 87.934435) - (xy 225.50898 87.694344) (xy 225.34372 87.616634) (xy 225.34372 74.68362) (xy 225.34372 72.18172) (xy 225.33685 72.111656) - (xy 225.330717 72.04155) (xy 225.329599 72.037702) (xy 225.329208 72.033713) (xy 225.308855 71.966301) (xy 225.289226 71.898738) - (xy 225.287382 71.895182) (xy 225.286224 71.891344) (xy 225.253163 71.829166) (xy 225.220787 71.766706) (xy 225.218288 71.763575) - (xy 225.216406 71.760036) (xy 225.171919 71.705489) (xy 225.128006 71.65048) (xy 225.122507 71.644905) (xy 225.122413 71.644789) - (xy 225.122305 71.644699) (xy 225.120535 71.642905) (xy 224.92191 71.44428) (xy 224.92191 65.967983) (xy 224.917 65.935385) - (xy 224.917 64.324542) (xy 224.917 64.199458) (xy 224.917 62.675458) (xy 224.892597 62.552777) (xy 224.84473 62.437215) - (xy 224.775237 62.333211) (xy 224.686789 62.244763) (xy 224.582785 62.17527) (xy 224.467223 62.127403) (xy 224.344542 62.103) - (xy 224.219458 62.103) (xy 222.695458 62.103) (xy 222.572777 62.127403) (xy 222.457215 62.17527) (xy 222.353211 62.244763) - (xy 222.264763 62.333211) (xy 222.19527 62.437215) (xy 222.147403 62.552777) (xy 222.123 62.675458) (xy 222.123 62.800542) - (xy 222.123 64.324542) (xy 222.147403 64.447223) (xy 222.19527 64.562785) (xy 222.264763 64.666789) (xy 222.353211 64.755237) - (xy 222.457215 64.82473) (xy 222.572777 64.872597) (xy 222.695458 64.897) (xy 222.78354 64.897) (xy 222.73404 65.074435) - (xy 223.52 65.860395) (xy 224.30596 65.074435) (xy 224.256459 64.897) (xy 224.344542 64.897) (xy 224.467223 64.872597) - (xy 224.582785 64.82473) (xy 224.686789 64.755237) (xy 224.775237 64.666789) (xy 224.84473 64.562785) (xy 224.892597 64.447223) - (xy 224.917 64.324542) (xy 224.917 65.935385) (xy 224.880922 65.695867) (xy 224.787636 65.436977) (xy 224.725656 65.32102) - (xy 224.485565 65.25404) (xy 223.699605 66.04) (xy 224.485565 66.82596) (xy 224.725656 66.75898) (xy 224.842756 66.509952) - (xy 224.909023 66.242865) (xy 224.92191 65.967983) (xy 224.92191 71.44428) (xy 224.886933 71.409303) (xy 224.91269 71.295938) - (xy 224.917059 70.983017) (xy 224.863846 70.714269) (xy 224.759446 70.460975) (xy 224.607835 70.232783) (xy 224.41479 70.038385) - (xy 224.187662 69.885185) (xy 224.106393 69.851022) (xy 224.152923 69.832975) (xy 224.38424 69.686177) (xy 224.582639 69.497245) - (xy 224.740561 69.273375) (xy 224.851993 69.023095) (xy 224.91269 68.755938) (xy 224.917059 68.443017) (xy 224.863846 68.174269) - (xy 224.759446 67.920975) (xy 224.607835 67.692783) (xy 224.41479 67.498385) (xy 224.187662 67.345185) (xy 224.10973 67.312425) - (xy 224.123023 67.307636) (xy 224.23898 67.245656) (xy 224.30596 67.005565) (xy 223.52 66.219605) (xy 223.340395 66.39921) - (xy 223.340395 66.04) (xy 222.554435 65.25404) (xy 222.314344 65.32102) (xy 222.197244 65.570048) (xy 222.130977 65.837135) - (xy 222.11809 66.112017) (xy 222.159078 66.384133) (xy 222.252364 66.643023) (xy 222.314344 66.75898) (xy 222.554435 66.82596) - (xy 223.340395 66.04) (xy 223.340395 66.39921) (xy 222.73404 67.005565) (xy 222.80102 67.245656) (xy 222.936053 67.309152) - (xy 222.869644 67.335984) (xy 222.640399 67.485997) (xy 222.444658 67.677681) (xy 222.289877 67.903734) (xy 222.18195 68.155546) - (xy 222.124989 68.423524) (xy 222.121164 68.697464) (xy 222.17062 68.966928) (xy 222.271474 69.221655) (xy 222.419883 69.451942) - (xy 222.610196 69.649016) (xy 222.835163 69.805372) (xy 222.935699 69.849295) (xy 222.869644 69.875984) (xy 222.640399 70.025997) - (xy 222.444658 70.217681) (xy 222.289877 70.443734) (xy 222.18195 70.695546) (xy 222.124989 70.963524) (xy 222.121164 71.237464) - (xy 222.17062 71.506928) (xy 222.271474 71.761655) (xy 222.419883 71.991942) (xy 222.610196 72.189016) (xy 222.835163 72.345372) - (xy 222.935699 72.389295) (xy 222.869644 72.415984) (xy 222.640399 72.565997) (xy 222.444658 72.757681) (xy 222.289877 72.983734) - (xy 222.18195 73.235546) (xy 222.124989 73.503524) (xy 222.121164 73.777464) (xy 222.17062 74.046928) (xy 222.271474 74.301655) - (xy 222.419883 74.531942) (xy 222.512932 74.628296) (xy 219.646552 77.494676) (xy 219.646552 64.984437) (xy 219.600595 64.752336) - (xy 219.510431 64.533582) (xy 219.379495 64.336507) (xy 219.212773 64.168618) (xy 219.016617 64.036309) (xy 218.798498 63.94462) - (xy 218.566724 63.897043) (xy 218.330123 63.895391) (xy 218.097707 63.939727) (xy 217.878329 64.028362) (xy 217.680344 64.157919) - (xy 217.511295 64.323464) (xy 217.37762 64.518692) (xy 217.284411 64.736165) (xy 217.235217 64.967602) (xy 217.231914 65.204186) - (xy 217.274626 65.436906) (xy 217.361727 65.656897) (xy 217.489899 65.855781) (xy 217.65426 66.025982) (xy 217.848549 66.161017) - (xy 218.065367 66.255742) (xy 218.296454 66.30655) (xy 218.533009 66.311505) (xy 218.766022 66.270419) (xy 218.986616 66.184856) - (xy 219.18639 66.058075) (xy 219.357734 65.894907) (xy 219.494122 65.701564) (xy 219.590358 65.485413) (xy 219.642778 65.254686) - (xy 219.646552 64.984437) (xy 219.646552 77.494676) (xy 210.321825 86.819405) (xy 210.277127 86.873819) (xy 210.231904 86.927715) - (xy 210.229975 86.931222) (xy 210.227429 86.934323) (xy 210.19415 86.996388) (xy 210.160259 87.058036) (xy 210.159047 87.061856) - (xy 210.157154 87.065387) (xy 210.136579 87.132684) (xy 210.115292 87.199791) (xy 210.114845 87.203774) (xy 210.113674 87.207605) - (xy 210.106564 87.277592) (xy 210.098714 87.347581) (xy 210.098659 87.355417) (xy 210.098645 87.35556) (xy 210.098657 87.355693) - (xy 210.09864 87.35822) (xy 210.09864 98.655469) (xy 209.892565 98.861545) (xy 209.847867 98.915959) (xy 209.802644 98.969855) - (xy 209.800715 98.973362) (xy 209.798169 98.976463) (xy 209.76489 99.038528) (xy 209.730999 99.100176) (xy 209.729787 99.103996) - (xy 209.727894 99.107527) (xy 209.707319 99.174824) (xy 209.686032 99.241931) (xy 209.685585 99.245914) (xy 209.684414 99.249745) - (xy 209.677304 99.319732) (xy 209.669454 99.389721) (xy 209.669399 99.397557) (xy 209.669385 99.3977) (xy 209.669397 99.397833) - (xy 209.66938 99.40036) (xy 209.66938 102.712296) (xy 209.600434 102.779813) (xy 209.48083 102.954491) (xy 209.397432 103.149072) - (xy 209.353417 103.356147) (xy 209.350461 103.567827) (xy 209.388677 103.77605) (xy 209.46661 103.972885) (xy 209.58129 104.150833) - (xy 209.728349 104.303118) (xy 209.791736 104.347173) (xy 208.701686 105.437223) (xy 208.701686 102.20027) (xy 208.660566 101.992601) - (xy 208.579894 101.796873) (xy 208.46274 101.620543) (xy 208.313568 101.470327) (xy 208.138061 101.351945) (xy 207.942901 101.269908) - (xy 207.735524 101.227339) (xy 207.523829 101.225861) (xy 207.315878 101.26553) (xy 207.119592 101.344835) (xy 206.942448 101.460754) - (xy 206.791194 101.608873) (xy 206.740806 101.682463) (xy 206.740806 78.63415) (xy 206.699686 78.426481) (xy 206.619014 78.230753) - (xy 206.50186 78.054423) (xy 206.352688 77.904207) (xy 206.177181 77.785825) (xy 205.982021 77.703788) (xy 205.774644 77.661219) - (xy 205.562949 77.659741) (xy 205.354998 77.69941) (xy 205.158712 77.778715) (xy 204.981568 77.894634) (xy 204.830314 78.042753) - (xy 204.71071 78.217431) (xy 204.627312 78.412012) (xy 204.583297 78.619087) (xy 204.580341 78.830767) (xy 204.618557 79.03899) - (xy 204.69649 79.235825) (xy 204.81117 79.413773) (xy 204.958229 79.566058) (xy 205.132067 79.686879) (xy 205.326062 79.771633) - (xy 205.532824 79.817093) (xy 205.744479 79.821526) (xy 205.952964 79.784765) (xy 206.150337 79.708208) (xy 206.329082 79.594773) - (xy 206.48239 79.44878) (xy 206.604421 79.27579) (xy 206.690528 79.082392) (xy 206.73743 78.875952) (xy 206.740806 78.63415) - (xy 206.740806 101.682463) (xy 206.67159 101.783551) (xy 206.588192 101.978132) (xy 206.544177 102.185207) (xy 206.541221 102.396887) - (xy 206.579437 102.60511) (xy 206.65737 102.801945) (xy 206.77205 102.979893) (xy 206.919109 103.132178) (xy 207.092947 103.252999) - (xy 207.286942 103.337753) (xy 207.493704 103.383213) (xy 207.705359 103.387646) (xy 207.913844 103.350885) (xy 208.111217 103.274328) - (xy 208.289962 103.160893) (xy 208.44327 103.0149) (xy 208.565301 102.84191) (xy 208.651408 102.648512) (xy 208.69831 102.442072) - (xy 208.701686 102.20027) (xy 208.701686 105.437223) (xy 207.233185 106.905725) (xy 207.188487 106.960139) (xy 207.143264 107.014035) - (xy 207.141335 107.017542) (xy 207.138789 107.020643) (xy 207.10551 107.082708) (xy 207.071619 107.144356) (xy 207.070407 107.148176) - (xy 207.068514 107.151707) (xy 207.047939 107.219004) (xy 207.026652 107.286111) (xy 207.026205 107.290094) (xy 207.025034 107.293925) - (xy 207.017924 107.363912) (xy 207.010074 107.433901) (xy 207.010019 107.441737) (xy 207.010005 107.44188) (xy 207.010017 107.442013) - (xy 207.01 107.44454) (xy 207.01 108.791346) (xy 206.961464 108.781383) (xy 206.724863 108.779731) (xy 206.492447 108.824067) - (xy 206.273069 108.912702) (xy 206.075084 109.042259) (xy 205.906035 109.207804) (xy 205.77236 109.403032) (xy 205.679151 109.620505) - (xy 205.646066 109.776155) (xy 205.646066 85.10607) (xy 205.604946 84.898401) (xy 205.524274 84.702673) (xy 205.40712 84.526343) - (xy 205.257948 84.376127) (xy 205.082441 84.257745) (xy 204.887281 84.175708) (xy 204.679904 84.133139) (xy 204.470109 84.131674) - (xy 204.470109 65.79094) (xy 204.373357 65.302307) (xy 204.183538 64.841772) (xy 203.907883 64.426878) (xy 203.556891 64.073427) - (xy 203.143931 63.794882) (xy 202.684733 63.601853) (xy 202.196787 63.501692) (xy 201.698679 63.498214) (xy 201.209383 63.591553) - (xy 200.747534 63.778151) (xy 200.330725 64.050904) (xy 199.974832 64.39942) (xy 199.693411 64.810425) (xy 199.497181 65.268264) - (xy 199.393616 65.755499) (xy 199.386661 66.25357) (xy 199.476581 66.743506) (xy 199.659951 67.206646) (xy 199.929787 67.625349) - (xy 200.27581 67.983667) (xy 200.684841 68.26795) (xy 201.141299 68.467372) (xy 201.627799 68.574336) (xy 202.125809 68.584768) - (xy 202.616361 68.49827) (xy 203.08077 68.318138) (xy 203.501347 68.051232) (xy 203.862071 67.707719) (xy 204.149203 67.300683) - (xy 204.351807 66.845628) (xy 204.462164 66.359887) (xy 204.470109 65.79094) (xy 204.470109 84.131674) (xy 204.468209 84.131661) - (xy 204.260258 84.17133) (xy 204.063972 84.250635) (xy 203.886828 84.366554) (xy 203.735574 84.514673) (xy 203.61597 84.689351) - (xy 203.532572 84.883932) (xy 203.488557 85.091007) (xy 203.485601 85.302687) (xy 203.523817 85.51091) (xy 203.60175 85.707745) - (xy 203.71643 85.885693) (xy 203.863489 86.037978) (xy 204.037327 86.158799) (xy 204.231322 86.243553) (xy 204.438084 86.289013) - (xy 204.649739 86.293446) (xy 204.858224 86.256685) (xy 205.055597 86.180128) (xy 205.234342 86.066693) (xy 205.38765 85.9207) - (xy 205.509681 85.74771) (xy 205.595788 85.554312) (xy 205.64269 85.347872) (xy 205.646066 85.10607) (xy 205.646066 109.776155) - (xy 205.629957 109.851942) (xy 205.626654 110.088526) (xy 205.669366 110.321246) (xy 205.756467 110.541237) (xy 205.884639 110.740121) - (xy 206.049 110.910322) (xy 206.243289 111.045357) (xy 206.460107 111.140082) (xy 206.691194 111.19089) (xy 206.927749 111.195845) - (xy 207.01 111.181342) (xy 207.01 112.25276) (xy 207.016874 112.322873) (xy 207.023004 112.39293) (xy 207.02412 112.396772) - (xy 207.024512 112.400767) (xy 207.044877 112.468219) (xy 207.064494 112.535742) (xy 207.066337 112.539297) (xy 207.067496 112.543136) - (xy 207.100556 112.605313) (xy 207.132933 112.667774) (xy 207.135431 112.670904) (xy 207.137314 112.674444) (xy 207.1818 112.72899) - (xy 207.225714 112.784) (xy 207.231212 112.789574) (xy 207.231307 112.789691) (xy 207.231414 112.78978) (xy 207.233185 112.791575) - (xy 208.300196 113.858586) (xy 208.298901 113.951347) (xy 208.337117 114.15957) (xy 208.41505 114.356405) (xy 208.52973 114.534353) - (xy 208.676789 114.686638) (xy 208.850627 114.807459) (xy 209.044622 114.892213) (xy 209.251384 114.937673) (xy 209.463039 114.942106) - (xy 209.671524 114.905345) (xy 209.868897 114.828788) (xy 210.047642 114.715353) (xy 210.20095 114.56936) (xy 210.322981 114.39637) - (xy 210.409088 114.202972) (xy 210.411617 114.191839) (xy 210.459179 114.265641) (xy 210.62354 114.435842) (xy 210.817829 114.570877) - (xy 211.034647 114.665602) (xy 211.265734 114.71641) (xy 211.502289 114.721365) (xy 211.735302 114.680279) (xy 211.955896 114.594716) - (xy 212.15567 114.467935) (xy 212.327014 114.304767) (xy 212.463402 114.111424) (xy 212.559638 113.895273) (xy 212.612058 113.664546) - (xy 212.615832 113.394297) (xy 212.615832 109.889097) (xy 212.569875 109.656996) (xy 212.479711 109.438242) (xy 212.348775 109.241167) - (xy 212.182053 109.073278) (xy 211.985897 108.940969) (xy 211.767778 108.84928) (xy 211.536004 108.801703) (xy 211.299403 108.800051) - (xy 211.066987 108.844387) (xy 210.847609 108.933022) (xy 210.649624 109.062579) (xy 210.480575 109.228124) (xy 210.3469 109.423352) - (xy 210.253691 109.640825) (xy 210.204497 109.872262) (xy 210.201194 110.108846) (xy 210.243906 110.341566) (xy 210.331007 110.561557) - (xy 210.459179 110.760441) (xy 210.62354 110.930642) (xy 210.817829 111.065677) (xy 211.034647 111.160402) (xy 211.265734 111.21121) - (xy 211.502289 111.216165) (xy 211.735302 111.175079) (xy 211.955896 111.089516) (xy 212.15567 110.962735) (xy 212.327014 110.799567) - (xy 212.463402 110.606224) (xy 212.559638 110.390073) (xy 212.612058 110.159346) (xy 212.615832 109.889097) (xy 212.615832 113.394297) - (xy 212.569875 113.162196) (xy 212.479711 112.943442) (xy 212.348775 112.746367) (xy 212.182053 112.578478) (xy 211.985897 112.446169) - (xy 211.767778 112.35448) (xy 211.536004 112.306903) (xy 211.299403 112.305251) (xy 211.066987 112.349587) (xy 210.847609 112.438222) - (xy 210.649624 112.567779) (xy 210.480575 112.733324) (xy 210.3469 112.928552) (xy 210.253691 113.146025) (xy 210.24096 113.205918) - (xy 210.22042 113.175003) (xy 210.071248 113.024787) (xy 209.895741 112.906405) (xy 209.700581 112.824368) (xy 209.493204 112.781799) - (xy 209.377863 112.780993) (xy 208.534 111.93713) (xy 208.534 107.76017) (xy 213.807376 102.486795) (xy 213.852097 102.43235) - (xy 213.897296 102.378485) (xy 213.899224 102.374977) (xy 213.901771 102.371877) (xy 213.935069 102.309776) (xy 213.968941 102.248164) - (xy 213.970151 102.244348) (xy 213.972047 102.240813) (xy 213.992648 102.173428) (xy 214.013908 102.106409) (xy 214.014354 102.102431) - (xy 214.015527 102.098595) (xy 214.02264 102.028557) (xy 214.030486 101.958619) (xy 214.03054 101.950782) (xy 214.030555 101.95064) - (xy 214.030542 101.950506) (xy 214.03056 101.94798) (xy 214.03056 86.76707) (xy 223.23079 77.56684) (xy 223.353789 77.593884) - (xy 223.627695 77.599622) (xy 223.897499 77.552048) (xy 224.152923 77.452975) (xy 224.38424 77.306177) (xy 224.582639 77.117245) - (xy 224.740561 76.893375) (xy 224.851993 76.643095) (xy 224.91269 76.375938) (xy 224.917059 76.063017) (xy 224.863846 75.794269) - (xy 224.759446 75.540975) (xy 224.721155 75.483343) (xy 224.726059 75.481862) (xy 224.793582 75.462246) (xy 224.797137 75.460402) - (xy 224.800976 75.459244) (xy 224.863153 75.426183) (xy 224.925614 75.393807) (xy 224.928744 75.391308) (xy 224.932284 75.389426) - (xy 224.98683 75.344939) (xy 225.04184 75.301026) (xy 225.047414 75.295527) (xy 225.047531 75.295433) (xy 225.04762 75.295325) - (xy 225.049415 75.293555) (xy 225.120535 75.222435) (xy 225.165232 75.16802) (xy 225.210456 75.114125) (xy 225.212384 75.110617) - (xy 225.214931 75.107517) (xy 225.248209 75.045451) (xy 225.282101 74.983804) (xy 225.283312 74.979983) (xy 225.285206 74.976453) - (xy 225.30578 74.909155) (xy 225.327068 74.842049) (xy 225.327514 74.838065) (xy 225.328686 74.834235) (xy 225.335795 74.764247) - (xy 225.343646 74.694259) (xy 225.3437 74.686422) (xy 225.343715 74.68628) (xy 225.343702 74.686146) (xy 225.34372 74.68362) - (xy 225.34372 87.616634) (xy 225.259952 87.577244) (xy 224.992865 87.510977) (xy 224.717983 87.49809) (xy 224.445867 87.539078) - (xy 224.186977 87.632364) (xy 224.07102 87.694344) (xy 224.00404 87.934435) (xy 224.79 88.720395) (xy 225.57596 87.934435) - (xy 225.57596 88.293645) (xy 224.969605 88.9) (xy 225.755565 89.68596) (xy 225.995656 89.61898) (xy 226.112756 89.369952) - (xy 226.179023 89.102865) (xy 226.19191 88.827983) (xy 226.19191 137.087983) (xy 226.187059 137.055777) (xy 226.187059 134.483017) - (xy 226.133846 134.214269) (xy 226.029446 133.960975) (xy 225.877835 133.732783) (xy 225.68479 133.538385) (xy 225.457662 133.385185) - (xy 225.376393 133.351022) (xy 225.422923 133.332975) (xy 225.65424 133.186177) (xy 225.852639 132.997245) (xy 226.010561 132.773375) - (xy 226.121993 132.523095) (xy 226.18269 132.255938) (xy 226.187059 131.943017) (xy 226.133846 131.674269) (xy 226.029446 131.420975) - (xy 225.877835 131.192783) (xy 225.68479 130.998385) (xy 225.457662 130.845185) (xy 225.376393 130.811022) (xy 225.422923 130.792975) - (xy 225.65424 130.646177) (xy 225.852639 130.457245) (xy 226.010561 130.233375) (xy 226.121993 129.983095) (xy 226.18269 129.715938) - (xy 226.187059 129.403017) (xy 226.133846 129.134269) (xy 226.029446 128.880975) (xy 225.877835 128.652783) (xy 225.68479 128.458385) - (xy 225.457662 128.305185) (xy 225.376393 128.271022) (xy 225.422923 128.252975) (xy 225.65424 128.106177) (xy 225.852639 127.917245) - (xy 226.010561 127.693375) (xy 226.121993 127.443095) (xy 226.18269 127.175938) (xy 226.187059 126.863017) (xy 226.133846 126.594269) - (xy 226.029446 126.340975) (xy 225.877835 126.112783) (xy 225.68479 125.918385) (xy 225.457662 125.765185) (xy 225.376393 125.731022) - (xy 225.422923 125.712975) (xy 225.65424 125.566177) (xy 225.852639 125.377245) (xy 226.010561 125.153375) (xy 226.121993 124.903095) - (xy 226.18269 124.635938) (xy 226.187059 124.323017) (xy 226.133846 124.054269) (xy 226.029446 123.800975) (xy 225.877835 123.572783) - (xy 225.68479 123.378385) (xy 225.457662 123.225185) (xy 225.376393 123.191022) (xy 225.422923 123.172975) (xy 225.65424 123.026177) - (xy 225.852639 122.837245) (xy 226.010561 122.613375) (xy 226.121993 122.363095) (xy 226.18269 122.095938) (xy 226.187059 121.783017) - (xy 226.133846 121.514269) (xy 226.029446 121.260975) (xy 225.877835 121.032783) (xy 225.68479 120.838385) (xy 225.457662 120.685185) - (xy 225.376393 120.651022) (xy 225.422923 120.632975) (xy 225.65424 120.486177) (xy 225.852639 120.297245) (xy 226.010561 120.073375) - (xy 226.121993 119.823095) (xy 226.18269 119.555938) (xy 226.187059 119.243017) (xy 226.133846 118.974269) (xy 226.029446 118.720975) - (xy 225.877835 118.492783) (xy 225.68479 118.298385) (xy 225.457662 118.145185) (xy 225.376393 118.111022) (xy 225.422923 118.092975) - (xy 225.65424 117.946177) (xy 225.852639 117.757245) (xy 226.010561 117.533375) (xy 226.121993 117.283095) (xy 226.18269 117.015938) - (xy 226.187059 116.703017) (xy 226.133846 116.434269) (xy 226.029446 116.180975) (xy 225.877835 115.952783) (xy 225.68479 115.758385) - (xy 225.457662 115.605185) (xy 225.376393 115.571022) (xy 225.422923 115.552975) (xy 225.65424 115.406177) (xy 225.852639 115.217245) - (xy 226.010561 114.993375) (xy 226.121993 114.743095) (xy 226.18269 114.475938) (xy 226.187059 114.163017) (xy 226.133846 113.894269) - (xy 226.029446 113.640975) (xy 225.877835 113.412783) (xy 225.68479 113.218385) (xy 225.457662 113.065185) (xy 225.376393 113.031022) - (xy 225.422923 113.012975) (xy 225.65424 112.866177) (xy 225.852639 112.677245) (xy 226.010561 112.453375) (xy 226.121993 112.203095) - (xy 226.18269 111.935938) (xy 226.187059 111.623017) (xy 226.133846 111.354269) (xy 226.029446 111.100975) (xy 225.877835 110.872783) - (xy 225.68479 110.678385) (xy 225.457662 110.525185) (xy 225.376393 110.491022) (xy 225.422923 110.472975) (xy 225.65424 110.326177) - (xy 225.852639 110.137245) (xy 226.010561 109.913375) (xy 226.121993 109.663095) (xy 226.18269 109.395938) (xy 226.187059 109.083017) - (xy 226.133846 108.814269) (xy 226.029446 108.560975) (xy 225.877835 108.332783) (xy 225.68479 108.138385) (xy 225.457662 107.985185) - (xy 225.376393 107.951022) (xy 225.422923 107.932975) (xy 225.65424 107.786177) (xy 225.852639 107.597245) (xy 226.010561 107.373375) - (xy 226.121993 107.123095) (xy 226.18269 106.855938) (xy 226.187059 106.543017) (xy 226.133846 106.274269) (xy 226.029446 106.020975) - (xy 225.877835 105.792783) (xy 225.68479 105.598385) (xy 225.457662 105.445185) (xy 225.376393 105.411022) (xy 225.422923 105.392975) - (xy 225.65424 105.246177) (xy 225.852639 105.057245) (xy 226.010561 104.833375) (xy 226.121993 104.583095) (xy 226.18269 104.315938) - (xy 226.187059 104.003017) (xy 226.133846 103.734269) (xy 226.029446 103.480975) (xy 225.877835 103.252783) (xy 225.68479 103.058385) - (xy 225.457662 102.905185) (xy 225.376393 102.871022) (xy 225.422923 102.852975) (xy 225.65424 102.706177) (xy 225.852639 102.517245) - (xy 226.010561 102.293375) (xy 226.121993 102.043095) (xy 226.18269 101.775938) (xy 226.187059 101.463017) (xy 226.133846 101.194269) - (xy 226.029446 100.940975) (xy 225.877835 100.712783) (xy 225.68479 100.518385) (xy 225.457662 100.365185) (xy 225.376393 100.331022) - (xy 225.422923 100.312975) (xy 225.65424 100.166177) (xy 225.852639 99.977245) (xy 226.010561 99.753375) (xy 226.121993 99.503095) - (xy 226.18269 99.235938) (xy 226.187059 98.923017) (xy 226.133846 98.654269) (xy 226.029446 98.400975) (xy 225.877835 98.172783) - (xy 225.68479 97.978385) (xy 225.457662 97.825185) (xy 225.376393 97.791022) (xy 225.422923 97.772975) (xy 225.65424 97.626177) - (xy 225.852639 97.437245) (xy 226.010561 97.213375) (xy 226.121993 96.963095) (xy 226.18269 96.695938) (xy 226.187059 96.383017) - (xy 226.133846 96.114269) (xy 226.029446 95.860975) (xy 225.877835 95.632783) (xy 225.68479 95.438385) (xy 225.457662 95.285185) - (xy 225.376393 95.251022) (xy 225.422923 95.232975) (xy 225.65424 95.086177) (xy 225.852639 94.897245) (xy 226.010561 94.673375) - (xy 226.121993 94.423095) (xy 226.18269 94.155938) (xy 226.187059 93.843017) (xy 226.133846 93.574269) (xy 226.029446 93.320975) - (xy 225.877835 93.092783) (xy 225.68479 92.898385) (xy 225.457662 92.745185) (xy 225.376393 92.711022) (xy 225.422923 92.692975) - (xy 225.65424 92.546177) (xy 225.852639 92.357245) (xy 226.010561 92.133375) (xy 226.121993 91.883095) (xy 226.18269 91.615938) - (xy 226.187059 91.303017) (xy 226.133846 91.034269) (xy 226.029446 90.780975) (xy 225.877835 90.552783) (xy 225.68479 90.358385) - (xy 225.457662 90.205185) (xy 225.37973 90.172425) (xy 225.393023 90.167636) (xy 225.50898 90.105656) (xy 225.57596 89.865565) - (xy 224.79 89.079605) (xy 224.00404 89.865565) (xy 224.07102 90.105656) (xy 224.206053 90.169152) (xy 224.139644 90.195984) - (xy 223.910399 90.345997) (xy 223.714658 90.537681) (xy 223.559877 90.763734) (xy 223.52035 90.855955) (xy 223.489446 90.780975) - (xy 223.337835 90.552783) (xy 223.14479 90.358385) (xy 223.053783 90.297) (xy 223.074542 90.297) (xy 223.197223 90.272597) - (xy 223.312785 90.22473) (xy 223.416789 90.155237) (xy 223.505237 90.066789) (xy 223.57473 89.962785) (xy 223.622597 89.847223) - (xy 223.647 89.724542) (xy 223.647 89.636459) (xy 223.824435 89.68596) (xy 224.610395 88.9) (xy 223.824435 88.11404) - (xy 223.647 88.16354) (xy 223.647 88.075458) (xy 223.622597 87.952777) (xy 223.57473 87.837215) (xy 223.505237 87.733211) - (xy 223.416789 87.644763) (xy 223.312785 87.57527) (xy 223.197223 87.527403) (xy 223.074542 87.503) (xy 222.949458 87.503) - (xy 221.425458 87.503) (xy 221.302777 87.527403) (xy 221.187215 87.57527) (xy 221.083211 87.644763) (xy 220.994763 87.733211) - (xy 220.92527 87.837215) (xy 220.877403 87.952777) (xy 220.853 88.075458) (xy 220.853 88.200542) (xy 220.853 89.724542) - (xy 220.877403 89.847223) (xy 220.92527 89.962785) (xy 220.994763 90.066789) (xy 221.083211 90.155237) (xy 221.187215 90.22473) - (xy 221.302777 90.272597) (xy 221.425458 90.297) (xy 221.445274 90.297) (xy 221.370399 90.345997) (xy 221.174658 90.537681) - (xy 221.019877 90.763734) (xy 220.91195 91.015546) (xy 220.854989 91.283524) (xy 220.851164 91.557464) (xy 220.90062 91.826928) - (xy 221.001474 92.081655) (xy 221.149883 92.311942) (xy 221.340196 92.509016) (xy 221.565163 92.665372) (xy 221.665699 92.709295) - (xy 221.599644 92.735984) (xy 221.370399 92.885997) (xy 221.174658 93.077681) (xy 221.019877 93.303734) (xy 220.91195 93.555546) - (xy 220.854989 93.823524) (xy 220.851164 94.097464) (xy 220.90062 94.366928) (xy 221.001474 94.621655) (xy 221.149883 94.851942) - (xy 221.340196 95.049016) (xy 221.565163 95.205372) (xy 221.665699 95.249295) (xy 221.599644 95.275984) (xy 221.370399 95.425997) - (xy 221.174658 95.617681) (xy 221.019877 95.843734) (xy 220.91195 96.095546) (xy 220.854989 96.363524) (xy 220.851164 96.637464) - (xy 220.90062 96.906928) (xy 221.001474 97.161655) (xy 221.149883 97.391942) (xy 221.340196 97.589016) (xy 221.565163 97.745372) - (xy 221.665699 97.789295) (xy 221.599644 97.815984) (xy 221.370399 97.965997) (xy 221.174658 98.157681) (xy 221.019877 98.383734) - (xy 220.91195 98.635546) (xy 220.854989 98.903524) (xy 220.851164 99.177464) (xy 220.90062 99.446928) (xy 221.001474 99.701655) - (xy 221.149883 99.931942) (xy 221.340196 100.129016) (xy 221.565163 100.285372) (xy 221.665699 100.329295) (xy 221.599644 100.355984) - (xy 221.370399 100.505997) (xy 221.174658 100.697681) (xy 221.019877 100.923734) (xy 220.91195 101.175546) (xy 220.854989 101.443524) - (xy 220.851164 101.717464) (xy 220.90062 101.986928) (xy 221.001474 102.241655) (xy 221.149883 102.471942) (xy 221.340196 102.669016) - (xy 221.565163 102.825372) (xy 221.665699 102.869295) (xy 221.599644 102.895984) (xy 221.370399 103.045997) (xy 221.174658 103.237681) - (xy 221.019877 103.463734) (xy 220.91195 103.715546) (xy 220.854989 103.983524) (xy 220.851164 104.257464) (xy 220.90062 104.526928) - (xy 221.001474 104.781655) (xy 221.149883 105.011942) (xy 221.340196 105.209016) (xy 221.565163 105.365372) (xy 221.665699 105.409295) - (xy 221.599644 105.435984) (xy 221.370399 105.585997) (xy 221.174658 105.777681) (xy 221.019877 106.003734) (xy 220.91195 106.255546) - (xy 220.854989 106.523524) (xy 220.851164 106.797464) (xy 220.90062 107.066928) (xy 221.001474 107.321655) (xy 221.149883 107.551942) - (xy 221.340196 107.749016) (xy 221.565163 107.905372) (xy 221.665699 107.949295) (xy 221.599644 107.975984) (xy 221.370399 108.125997) - (xy 221.174658 108.317681) (xy 221.019877 108.543734) (xy 220.91195 108.795546) (xy 220.854989 109.063524) (xy 220.851164 109.337464) - (xy 220.90062 109.606928) (xy 221.001474 109.861655) (xy 221.149883 110.091942) (xy 221.340196 110.289016) (xy 221.565163 110.445372) - (xy 221.665699 110.489295) (xy 221.599644 110.515984) (xy 221.370399 110.665997) (xy 221.174658 110.857681) (xy 221.019877 111.083734) - (xy 220.91195 111.335546) (xy 220.854989 111.603524) (xy 220.851164 111.877464) (xy 220.90062 112.146928) (xy 221.001474 112.401655) - (xy 221.149883 112.631942) (xy 221.340196 112.829016) (xy 221.565163 112.985372) (xy 221.665699 113.029295) (xy 221.599644 113.055984) - (xy 221.370399 113.205997) (xy 221.174658 113.397681) (xy 221.019877 113.623734) (xy 220.91195 113.875546) (xy 220.854989 114.143524) - (xy 220.851164 114.417464) (xy 220.90062 114.686928) (xy 221.001474 114.941655) (xy 221.149883 115.171942) (xy 221.340196 115.369016) - (xy 221.565163 115.525372) (xy 221.665699 115.569295) (xy 221.599644 115.595984) (xy 221.370399 115.745997) (xy 221.174658 115.937681) - (xy 221.081646 116.073522) (xy 221.081646 115.64957) (xy 221.040526 115.441901) (xy 220.959854 115.246173) (xy 220.8427 115.069843) - (xy 220.693528 114.919627) (xy 220.518021 114.801245) (xy 220.322861 114.719208) (xy 220.115484 114.676639) (xy 219.903789 114.675161) - (xy 219.695838 114.71483) (xy 219.499552 114.794135) (xy 219.322408 114.910054) (xy 219.171154 115.058173) (xy 219.05155 115.232851) - (xy 218.968152 115.427432) (xy 218.924137 115.634507) (xy 218.921181 115.846187) (xy 218.959397 116.05441) (xy 219.03733 116.251245) - (xy 219.15201 116.429193) (xy 219.299069 116.581478) (xy 219.472907 116.702299) (xy 219.666902 116.787053) (xy 219.873664 116.832513) - (xy 220.085319 116.836946) (xy 220.293804 116.800185) (xy 220.491177 116.723628) (xy 220.669922 116.610193) (xy 220.82323 116.4642) - (xy 220.945261 116.29121) (xy 221.031368 116.097812) (xy 221.07827 115.891372) (xy 221.081646 115.64957) (xy 221.081646 116.073522) - (xy 221.019877 116.163734) (xy 220.91195 116.415546) (xy 220.854989 116.683524) (xy 220.851164 116.957464) (xy 220.90062 117.226928) - (xy 221.001474 117.481655) (xy 221.149883 117.711942) (xy 221.340196 117.909016) (xy 221.565163 118.065372) (xy 221.665699 118.109295) - (xy 221.599644 118.135984) (xy 221.370399 118.285997) (xy 221.174658 118.477681) (xy 221.019877 118.703734) (xy 220.91195 118.955546) - (xy 220.854989 119.223524) (xy 220.851164 119.497464) (xy 220.90062 119.766928) (xy 221.001474 120.021655) (xy 221.149883 120.251942) - (xy 221.340196 120.449016) (xy 221.565163 120.605372) (xy 221.665699 120.649295) (xy 221.599644 120.675984) (xy 221.370399 120.825997) - (xy 221.174658 121.017681) (xy 221.019877 121.243734) (xy 220.91195 121.495546) (xy 220.854989 121.763524) (xy 220.851164 122.037464) - (xy 220.90062 122.306928) (xy 221.001474 122.561655) (xy 221.149883 122.791942) (xy 221.340196 122.989016) (xy 221.565163 123.145372) - (xy 221.665699 123.189295) (xy 221.599644 123.215984) (xy 221.370399 123.365997) (xy 221.174658 123.557681) (xy 221.019877 123.783734) - (xy 220.91195 124.035546) (xy 220.854989 124.303524) (xy 220.851164 124.577464) (xy 220.90062 124.846928) (xy 221.001474 125.101655) - (xy 221.149883 125.331942) (xy 221.340196 125.529016) (xy 221.565163 125.685372) (xy 221.665699 125.729295) (xy 221.599644 125.755984) - (xy 221.370399 125.905997) (xy 221.174658 126.097681) (xy 221.019877 126.323734) (xy 220.91195 126.575546) (xy 220.854989 126.843524) - (xy 220.851164 127.117464) (xy 220.90062 127.386928) (xy 221.001474 127.641655) (xy 221.149883 127.871942) (xy 221.340196 128.069016) - (xy 221.565163 128.225372) (xy 221.665699 128.269295) (xy 221.599644 128.295984) (xy 221.370399 128.445997) (xy 221.174658 128.637681) - (xy 221.019877 128.863734) (xy 220.91195 129.115546) (xy 220.854989 129.383524) (xy 220.851164 129.657464) (xy 220.90062 129.926928) - (xy 221.001474 130.181655) (xy 221.149883 130.411942) (xy 221.340196 130.609016) (xy 221.565163 130.765372) (xy 221.665699 130.809295) - (xy 221.599644 130.835984) (xy 221.370399 130.985997) (xy 221.174658 131.177681) (xy 221.07858 131.318) (xy 217.769486 131.318) - (xy 217.769486 115.17459) (xy 217.728366 114.966921) (xy 217.647694 114.771193) (xy 217.53054 114.594863) (xy 217.381368 114.444647) - (xy 217.205861 114.326265) (xy 217.010701 114.244228) (xy 216.803324 114.201659) (xy 216.591629 114.200181) (xy 216.383678 114.23985) - (xy 216.187392 114.319155) (xy 216.010248 114.435074) (xy 215.994026 114.450959) (xy 215.994026 107.90003) (xy 215.952906 107.692361) - (xy 215.872234 107.496633) (xy 215.75508 107.320303) (xy 215.605908 107.170087) (xy 215.430401 107.051705) (xy 215.235241 106.969668) - (xy 215.027864 106.927099) (xy 214.816169 106.925621) (xy 214.608218 106.96529) (xy 214.411932 107.044595) (xy 214.234788 107.160514) - (xy 214.083534 107.308633) (xy 213.96393 107.483311) (xy 213.880532 107.677892) (xy 213.836517 107.884967) (xy 213.833561 108.096647) - (xy 213.871777 108.30487) (xy 213.94971 108.501705) (xy 214.06439 108.679653) (xy 214.211449 108.831938) (xy 214.385287 108.952759) - (xy 214.579282 109.037513) (xy 214.786044 109.082973) (xy 214.997699 109.087406) (xy 215.206184 109.050645) (xy 215.403557 108.974088) - (xy 215.582302 108.860653) (xy 215.73561 108.71466) (xy 215.857641 108.54167) (xy 215.943748 108.348272) (xy 215.99065 108.141832) - (xy 215.994026 107.90003) (xy 215.994026 114.450959) (xy 215.858994 114.583193) (xy 215.73939 114.757871) (xy 215.655992 114.952452) - (xy 215.611977 115.159527) (xy 215.609021 115.371207) (xy 215.647237 115.57943) (xy 215.72517 115.776265) (xy 215.83985 115.954213) - (xy 215.986909 116.106498) (xy 216.160747 116.227319) (xy 216.354742 116.312073) (xy 216.561504 116.357533) (xy 216.773159 116.361966) - (xy 216.981644 116.325205) (xy 217.179017 116.248648) (xy 217.357762 116.135213) (xy 217.51107 115.98922) (xy 217.633101 115.81623) - (xy 217.719208 115.622832) (xy 217.76611 115.416392) (xy 217.769486 115.17459) (xy 217.769486 131.318) (xy 217.19353 131.318) - (xy 211.151302 125.275772) (xy 211.152786 125.16949) (xy 211.111666 124.961821) (xy 211.030994 124.766093) (xy 210.939432 124.628281) - (xy 210.939432 117.976457) (xy 210.893475 117.744356) (xy 210.803311 117.525602) (xy 210.672375 117.328527) (xy 210.505653 117.160638) - (xy 210.309497 117.028329) (xy 210.091378 116.93664) (xy 209.859604 116.889063) (xy 209.623003 116.887411) (xy 209.390587 116.931747) - (xy 209.171209 117.020382) (xy 208.973224 117.149939) (xy 208.804175 117.315484) (xy 208.6705 117.510712) (xy 208.577291 117.728185) - (xy 208.528097 117.959622) (xy 208.524794 118.196206) (xy 208.567506 118.428926) (xy 208.654607 118.648917) (xy 208.782779 118.847801) - (xy 208.94714 119.018002) (xy 209.141429 119.153037) (xy 209.358247 119.247762) (xy 209.589334 119.29857) (xy 209.825889 119.303525) - (xy 210.058902 119.262439) (xy 210.279496 119.176876) (xy 210.47927 119.050095) (xy 210.650614 118.886927) (xy 210.787002 118.693584) - (xy 210.883238 118.477433) (xy 210.935658 118.246706) (xy 210.939432 117.976457) (xy 210.939432 124.628281) (xy 210.91384 124.589763) - (xy 210.764668 124.439547) (xy 210.589161 124.321165) (xy 210.394001 124.239128) (xy 210.186624 124.196559) (xy 209.974929 124.195081) - (xy 209.766978 124.23475) (xy 209.570692 124.314055) (xy 209.393548 124.429974) (xy 209.242294 124.578093) (xy 209.12269 124.752771) - (xy 209.039292 124.947352) (xy 208.995277 125.154427) (xy 208.992321 125.366107) (xy 209.030537 125.57433) (xy 209.10847 125.771165) - (xy 209.22315 125.949113) (xy 209.370209 126.101398) (xy 209.544047 126.222219) (xy 209.738042 126.306973) (xy 209.944804 126.352433) - (xy 210.075439 126.355169) (xy 216.339084 132.618815) (xy 216.393497 132.66351) (xy 216.447395 132.708736) (xy 216.450906 132.710666) - (xy 216.454003 132.71321) (xy 216.516029 132.746468) (xy 216.577716 132.780381) (xy 216.581536 132.781592) (xy 216.585067 132.783486) - (xy 216.652364 132.80406) (xy 216.719471 132.825348) (xy 216.723454 132.825794) (xy 216.727285 132.826966) (xy 216.797272 132.834075) - (xy 216.867261 132.841926) (xy 216.875097 132.84198) (xy 216.87524 132.841995) (xy 216.875373 132.841982) (xy 216.8779 132.842) - (xy 221.07903 132.842) (xy 221.149883 132.951942) (xy 221.340196 133.149016) (xy 221.565163 133.305372) (xy 221.665699 133.349295) - (xy 221.599644 133.375984) (xy 221.370399 133.525997) (xy 221.174658 133.717681) (xy 221.019877 133.943734) (xy 220.91195 134.195546) - (xy 220.854989 134.463524) (xy 220.851164 134.737464) (xy 220.90062 135.006928) (xy 221.001474 135.261655) (xy 221.149883 135.491942) - (xy 221.340196 135.689016) (xy 221.565163 135.845372) (xy 221.665699 135.889295) (xy 221.599644 135.915984) (xy 221.370399 136.065997) - (xy 221.174658 136.257681) (xy 221.019877 136.483734) (xy 220.91195 136.735546) (xy 220.854989 137.003524) (xy 220.851164 137.277464) - (xy 220.90062 137.546928) (xy 221.001474 137.801655) (xy 221.149883 138.031942) (xy 221.340196 138.229016) (xy 221.565163 138.385372) - (xy 221.816215 138.495054) (xy 222.083789 138.553884) (xy 222.357695 138.559622) (xy 222.627499 138.512048) (xy 222.882923 138.412975) - (xy 223.11424 138.266177) (xy 223.312639 138.077245) (xy 223.470561 137.853375) (xy 223.517186 137.748653) (xy 223.522364 137.763023) - (xy 223.584344 137.87898) (xy 223.824435 137.94596) (xy 224.610395 137.16) (xy 223.824435 136.37404) (xy 223.584344 136.44102) - (xy 223.520604 136.57657) (xy 223.489446 136.500975) (xy 223.337835 136.272783) (xy 223.14479 136.078385) (xy 222.917662 135.925185) - (xy 222.836393 135.891022) (xy 222.882923 135.872975) (xy 223.11424 135.726177) (xy 223.312639 135.537245) (xy 223.470561 135.313375) - (xy 223.518934 135.204726) (xy 223.541474 135.261655) (xy 223.689883 135.491942) (xy 223.880196 135.689016) (xy 224.105163 135.845372) - (xy 224.201086 135.887279) (xy 224.186977 135.892364) (xy 224.07102 135.954344) (xy 224.00404 136.194435) (xy 224.79 136.980395) - (xy 225.57596 136.194435) (xy 225.50898 135.954344) (xy 225.375256 135.891463) (xy 225.422923 135.872975) (xy 225.65424 135.726177) - (xy 225.852639 135.537245) (xy 226.010561 135.313375) (xy 226.121993 135.063095) (xy 226.18269 134.795938) (xy 226.187059 134.483017) - (xy 226.187059 137.055777) (xy 226.150922 136.815867) (xy 226.057636 136.556977) (xy 225.995656 136.44102) (xy 225.755565 136.37404) - (xy 224.969605 137.16) (xy 225.755565 137.94596) (xy 225.995656 137.87898) (xy 226.112756 137.629952) (xy 226.179023 137.362865) - (xy 226.19191 137.087983) (xy 226.19191 145.927643) (xy 225.57596 145.930157) (xy 225.57596 138.125565) (xy 224.79 137.339605) - (xy 224.00404 138.125565) (xy 224.07102 138.365656) (xy 224.320048 138.482756) (xy 224.587135 138.549023) (xy 224.862017 138.56191) - (xy 225.134133 138.520922) (xy 225.393023 138.427636) (xy 225.50898 138.365656) (xy 225.57596 138.125565) (xy 225.57596 145.930157) - (xy 218.567059 145.958765) (xy 218.567059 134.483017) (xy 218.513846 134.214269) (xy 218.409446 133.960975) (xy 218.257835 133.732783) - (xy 218.06479 133.538385) (xy 217.837662 133.385185) (xy 217.585103 133.279019) (xy 217.316733 133.223931) (xy 217.042774 133.222018) - (xy 216.773661 133.273354) (xy 216.519644 133.375984) (xy 216.290399 133.525997) (xy 216.094658 133.717681) (xy 215.939877 133.943734) - (xy 215.83195 134.195546) (xy 215.774989 134.463524) (xy 215.771164 134.737464) (xy 215.82062 135.006928) (xy 215.921474 135.261655) - (xy 216.069883 135.491942) (xy 216.260196 135.689016) (xy 216.485163 135.845372) (xy 216.736215 135.955054) (xy 217.003789 136.013884) - (xy 217.277695 136.019622) (xy 217.547499 135.972048) (xy 217.802923 135.872975) (xy 218.03424 135.726177) (xy 218.232639 135.537245) - (xy 218.390561 135.313375) (xy 218.501993 135.063095) (xy 218.56269 134.795938) (xy 218.567059 134.483017) (xy 218.567059 145.958765) - (xy 208.407059 146.000235) (xy 208.407059 134.483017) (xy 208.353846 134.214269) (xy 208.249446 133.960975) (xy 208.097835 133.732783) - (xy 207.90479 133.538385) (xy 207.677662 133.385185) (xy 207.581546 133.344781) (xy 207.581546 126.13215) (xy 207.540426 125.924481) - (xy 207.459754 125.728753) (xy 207.3426 125.552423) (xy 207.193428 125.402207) (xy 207.017921 125.283825) (xy 206.857652 125.216454) - (xy 206.857652 121.110817) (xy 206.811695 120.878716) (xy 206.721531 120.659962) (xy 206.590595 120.462887) (xy 206.423873 120.294998) - (xy 206.227717 120.162689) (xy 206.009598 120.071) (xy 205.777824 120.023423) (xy 205.541223 120.021771) (xy 205.308807 120.066107) - (xy 205.224426 120.100199) (xy 205.224426 116.84845) (xy 205.183306 116.640781) (xy 205.102634 116.445053) (xy 204.98548 116.268723) - (xy 204.836308 116.118507) (xy 204.660801 116.000125) (xy 204.465641 115.918088) (xy 204.258264 115.875519) (xy 204.046569 115.874041) - (xy 203.838618 115.91371) (xy 203.687732 115.974672) (xy 203.687732 102.878697) (xy 203.641775 102.646596) (xy 203.551611 102.427842) - (xy 203.420675 102.230767) (xy 203.253953 102.062878) (xy 203.057797 101.930569) (xy 202.839678 101.83888) (xy 202.607904 101.791303) - (xy 202.371303 101.789651) (xy 202.138887 101.833987) (xy 201.919509 101.922622) (xy 201.721524 102.052179) (xy 201.552475 102.217724) - (xy 201.422059 102.408192) (xy 201.422059 89.398017) (xy 201.368846 89.129269) (xy 201.264446 88.875975) (xy 201.112835 88.647783) - (xy 200.91979 88.453385) (xy 200.692662 88.300185) (xy 200.611393 88.266022) (xy 200.657923 88.247975) (xy 200.88924 88.101177) - (xy 201.087639 87.912245) (xy 201.245561 87.688375) (xy 201.356993 87.438095) (xy 201.41769 87.170938) (xy 201.422059 86.858017) - (xy 201.422059 82.032017) (xy 201.368846 81.763269) (xy 201.264446 81.509975) (xy 201.112835 81.281783) (xy 200.91979 81.087385) - (xy 200.692662 80.934185) (xy 200.611393 80.900022) (xy 200.657923 80.881975) (xy 200.88924 80.735177) (xy 201.087639 80.546245) - (xy 201.245561 80.322375) (xy 201.356993 80.072095) (xy 201.41769 79.804938) (xy 201.422059 79.492017) (xy 201.368846 79.223269) - (xy 201.264446 78.969975) (xy 201.112835 78.741783) (xy 200.91979 78.547385) (xy 200.692662 78.394185) (xy 200.611393 78.360022) - (xy 200.657923 78.341975) (xy 200.88924 78.195177) (xy 201.087639 78.006245) (xy 201.245561 77.782375) (xy 201.356993 77.532095) - (xy 201.41769 77.264938) (xy 201.422059 76.952017) (xy 201.368846 76.683269) (xy 201.264446 76.429975) (xy 201.112835 76.201783) - (xy 200.91979 76.007385) (xy 200.692662 75.854185) (xy 200.611393 75.820022) (xy 200.657923 75.801975) (xy 200.88924 75.655177) - (xy 201.087639 75.466245) (xy 201.245561 75.242375) (xy 201.356993 74.992095) (xy 201.41769 74.724938) (xy 201.422059 74.412017) - (xy 201.368846 74.143269) (xy 201.264446 73.889975) (xy 201.112835 73.661783) (xy 200.91979 73.467385) (xy 200.692662 73.314185) - (xy 200.440103 73.208019) (xy 200.171733 73.152931) (xy 199.897774 73.151018) (xy 199.628661 73.202354) (xy 199.374644 73.304984) - (xy 199.145399 73.454997) (xy 198.949658 73.646681) (xy 198.882 73.745493) (xy 198.882 73.724458) (xy 198.857597 73.601777) - (xy 198.80973 73.486215) (xy 198.740237 73.382211) (xy 198.651789 73.293763) (xy 198.547785 73.22427) (xy 198.432223 73.176403) - (xy 198.309542 73.152) (xy 198.184458 73.152) (xy 196.660458 73.152) (xy 196.537777 73.176403) (xy 196.422215 73.22427) - (xy 196.318211 73.293763) (xy 196.229763 73.382211) (xy 196.16027 73.486215) (xy 196.112403 73.601777) (xy 196.09291 73.699773) - (xy 196.09291 68.507983) (xy 196.051922 68.235867) (xy 195.958636 67.976977) (xy 195.896656 67.86102) (xy 195.656565 67.79404) - (xy 195.47696 67.973645) (xy 195.47696 67.614435) (xy 195.40998 67.374344) (xy 195.160952 67.257244) (xy 194.893865 67.190977) - (xy 194.691059 67.181469) (xy 194.691059 65.903017) (xy 194.637846 65.634269) (xy 194.533446 65.380975) (xy 194.381835 65.152783) - (xy 194.18879 64.958385) (xy 193.961662 64.805185) (xy 193.709103 64.699019) (xy 193.440733 64.643931) (xy 193.166774 64.642018) - (xy 192.897661 64.693354) (xy 192.643644 64.795984) (xy 192.414399 64.945997) (xy 192.218658 65.137681) (xy 192.063877 65.363734) - (xy 191.95595 65.615546) (xy 191.898989 65.883524) (xy 191.897059 66.021747) (xy 191.897059 65.903017) (xy 191.843846 65.634269) - (xy 191.739446 65.380975) (xy 191.587835 65.152783) (xy 191.39479 64.958385) (xy 191.167662 64.805185) (xy 190.915103 64.699019) - (xy 190.646733 64.643931) (xy 190.372774 64.642018) (xy 190.103661 64.693354) (xy 189.849644 64.795984) (xy 189.620399 64.945997) - (xy 189.424658 65.137681) (xy 189.269877 65.363734) (xy 189.165609 65.607007) (xy 189.072446 65.380975) (xy 188.920835 65.152783) - (xy 188.72779 64.958385) (xy 188.500662 64.805185) (xy 188.248103 64.699019) (xy 187.979733 64.643931) (xy 187.705774 64.642018) - (xy 187.436661 64.693354) (xy 187.182644 64.795984) (xy 186.953399 64.945997) (xy 186.757658 65.137681) (xy 186.602877 65.363734) - (xy 186.49495 65.615546) (xy 186.437989 65.883524) (xy 186.434164 66.157464) (xy 186.48362 66.426928) (xy 186.584474 66.681655) - (xy 186.732883 66.911942) (xy 186.923196 67.109016) (xy 187.148163 67.265372) (xy 187.399215 67.375054) (xy 187.666789 67.433884) - (xy 187.940695 67.439622) (xy 188.210499 67.392048) (xy 188.465923 67.292975) (xy 188.69724 67.146177) (xy 188.895639 66.957245) - (xy 189.053561 66.733375) (xy 189.164993 66.483095) (xy 189.16786 66.470472) (xy 189.251474 66.681655) (xy 189.399883 66.911942) - (xy 189.590196 67.109016) (xy 189.815163 67.265372) (xy 190.066215 67.375054) (xy 190.333789 67.433884) (xy 190.607695 67.439622) - (xy 190.877499 67.392048) (xy 191.132923 67.292975) (xy 191.36424 67.146177) (xy 191.562639 66.957245) (xy 191.720561 66.733375) - (xy 191.831993 66.483095) (xy 191.89269 66.215938) (xy 191.897059 65.903017) (xy 191.897059 66.021747) (xy 191.895164 66.157464) - (xy 191.94462 66.426928) (xy 192.045474 66.681655) (xy 192.193883 66.911942) (xy 192.384196 67.109016) (xy 192.609163 67.265372) - (xy 192.860215 67.375054) (xy 193.127789 67.433884) (xy 193.401695 67.439622) (xy 193.671499 67.392048) (xy 193.926923 67.292975) - (xy 194.15824 67.146177) (xy 194.356639 66.957245) (xy 194.514561 66.733375) (xy 194.625993 66.483095) (xy 194.68669 66.215938) - (xy 194.691059 65.903017) (xy 194.691059 67.181469) (xy 194.618983 67.17809) (xy 194.346867 67.219078) (xy 194.087977 67.312364) - (xy 193.97202 67.374344) (xy 193.90504 67.614435) (xy 194.691 68.400395) (xy 195.47696 67.614435) (xy 195.47696 67.973645) - (xy 194.870605 68.58) (xy 195.656565 69.36596) (xy 195.896656 69.29898) (xy 196.013756 69.049952) (xy 196.080023 68.782865) - (xy 196.09291 68.507983) (xy 196.09291 73.699773) (xy 196.088 73.724458) (xy 196.088 73.849542) (xy 196.088 75.373542) - (xy 196.112403 75.496223) (xy 196.16027 75.611785) (xy 196.229763 75.715789) (xy 196.318211 75.804237) (xy 196.422215 75.87373) - (xy 196.537777 75.921597) (xy 196.660458 75.946) (xy 196.680274 75.946) (xy 196.605399 75.994997) (xy 196.409658 76.186681) - (xy 196.254877 76.412734) (xy 196.14695 76.664546) (xy 196.089989 76.932524) (xy 196.086164 77.206464) (xy 196.13562 77.475928) - (xy 196.236474 77.730655) (xy 196.384883 77.960942) (xy 196.575196 78.158016) (xy 196.800163 78.314372) (xy 196.900699 78.358295) - (xy 196.834644 78.384984) (xy 196.605399 78.534997) (xy 196.409658 78.726681) (xy 196.254877 78.952734) (xy 196.14695 79.204546) - (xy 196.089989 79.472524) (xy 196.086164 79.746464) (xy 196.13562 80.015928) (xy 196.236474 80.270655) (xy 196.384883 80.500942) - (xy 196.575196 80.698016) (xy 196.800163 80.854372) (xy 196.900699 80.898295) (xy 196.834644 80.924984) (xy 196.605399 81.074997) - (xy 196.409658 81.266681) (xy 196.254877 81.492734) (xy 196.14695 81.744546) (xy 196.089989 82.012524) (xy 196.086164 82.286464) - (xy 196.13562 82.555928) (xy 196.236474 82.810655) (xy 196.384883 83.040942) (xy 196.575196 83.238016) (xy 196.800163 83.394372) - (xy 197.051215 83.504054) (xy 197.318789 83.562884) (xy 197.592695 83.568622) (xy 197.862499 83.521048) (xy 198.117923 83.421975) - (xy 198.34924 83.275177) (xy 198.547639 83.086245) (xy 198.705561 82.862375) (xy 198.753934 82.753726) (xy 198.776474 82.810655) - (xy 198.924883 83.040942) (xy 199.115196 83.238016) (xy 199.340163 83.394372) (xy 199.591215 83.504054) (xy 199.858789 83.562884) - (xy 200.132695 83.568622) (xy 200.402499 83.521048) (xy 200.657923 83.421975) (xy 200.88924 83.275177) (xy 201.087639 83.086245) - (xy 201.245561 82.862375) (xy 201.356993 82.612095) (xy 201.41769 82.344938) (xy 201.422059 82.032017) (xy 201.422059 86.858017) - (xy 201.368846 86.589269) (xy 201.264446 86.335975) (xy 201.112835 86.107783) (xy 200.91979 85.913385) (xy 200.692662 85.760185) - (xy 200.440103 85.654019) (xy 200.171733 85.598931) (xy 199.897774 85.597018) (xy 199.628661 85.648354) (xy 199.374644 85.750984) - (xy 199.145399 85.900997) (xy 198.949658 86.092681) (xy 198.882 86.191493) (xy 198.882 86.170458) (xy 198.857597 86.047777) - (xy 198.80973 85.932215) (xy 198.740237 85.828211) (xy 198.651789 85.739763) (xy 198.547785 85.67027) (xy 198.432223 85.622403) - (xy 198.309542 85.598) (xy 198.184458 85.598) (xy 196.660458 85.598) (xy 196.537777 85.622403) (xy 196.422215 85.67027) - (xy 196.318211 85.739763) (xy 196.229763 85.828211) (xy 196.16027 85.932215) (xy 196.112403 86.047777) (xy 196.088 86.170458) - (xy 196.088 86.295542) (xy 196.088 87.819542) (xy 196.112403 87.942223) (xy 196.16027 88.057785) (xy 196.229763 88.161789) - (xy 196.318211 88.250237) (xy 196.422215 88.31973) (xy 196.537777 88.367597) (xy 196.660458 88.392) (xy 196.680274 88.392) - (xy 196.605399 88.440997) (xy 196.409658 88.632681) (xy 196.254877 88.858734) (xy 196.14695 89.110546) (xy 196.089989 89.378524) - (xy 196.086164 89.652464) (xy 196.13562 89.921928) (xy 196.236474 90.176655) (xy 196.384883 90.406942) (xy 196.575196 90.604016) - (xy 196.800163 90.760372) (xy 197.051215 90.870054) (xy 197.318789 90.928884) (xy 197.592695 90.934622) (xy 197.862499 90.887048) - (xy 198.117923 90.787975) (xy 198.34924 90.641177) (xy 198.547639 90.452245) (xy 198.705561 90.228375) (xy 198.753934 90.119726) - (xy 198.776474 90.176655) (xy 198.924883 90.406942) (xy 199.115196 90.604016) (xy 199.340163 90.760372) (xy 199.591215 90.870054) - (xy 199.858789 90.928884) (xy 200.132695 90.934622) (xy 200.402499 90.887048) (xy 200.657923 90.787975) (xy 200.88924 90.641177) - (xy 201.087639 90.452245) (xy 201.245561 90.228375) (xy 201.356993 89.978095) (xy 201.41769 89.710938) (xy 201.422059 89.398017) - (xy 201.422059 102.408192) (xy 201.4188 102.412952) (xy 201.325591 102.630425) (xy 201.276397 102.861862) (xy 201.273094 103.098446) - (xy 201.315806 103.331166) (xy 201.402907 103.551157) (xy 201.531079 103.750041) (xy 201.69544 103.920242) (xy 201.889729 104.055277) - (xy 202.106547 104.150002) (xy 202.337634 104.20081) (xy 202.574189 104.205765) (xy 202.807202 104.164679) (xy 203.027796 104.079116) - (xy 203.22757 103.952335) (xy 203.398914 103.789167) (xy 203.535302 103.595824) (xy 203.631538 103.379673) (xy 203.683958 103.148946) - (xy 203.687732 102.878697) (xy 203.687732 115.974672) (xy 203.642332 115.993015) (xy 203.465188 116.108934) (xy 203.313934 116.257053) - (xy 203.19433 116.431731) (xy 203.110932 116.626312) (xy 203.066917 116.833387) (xy 203.063961 117.045067) (xy 203.102177 117.25329) - (xy 203.18011 117.450125) (xy 203.29479 117.628073) (xy 203.441849 117.780358) (xy 203.615687 117.901179) (xy 203.809682 117.985933) - (xy 204.016444 118.031393) (xy 204.228099 118.035826) (xy 204.436584 117.999065) (xy 204.633957 117.922508) (xy 204.812702 117.809073) - (xy 204.96601 117.66308) (xy 205.088041 117.49009) (xy 205.174148 117.296692) (xy 205.22105 117.090252) (xy 205.224426 116.84845) - (xy 205.224426 120.100199) (xy 205.089429 120.154742) (xy 204.903899 120.276148) (xy 204.754517 120.175389) (xy 204.536398 120.0837) - (xy 204.304624 120.036123) (xy 204.068023 120.034471) (xy 203.835607 120.078807) (xy 203.616229 120.167442) (xy 203.418244 120.296999) - (xy 203.249195 120.462544) (xy 203.11552 120.657772) (xy 203.022311 120.875245) (xy 202.973117 121.106682) (xy 202.969814 121.343266) - (xy 203.012526 121.575986) (xy 203.099627 121.795977) (xy 203.227799 121.994861) (xy 203.39216 122.165062) (xy 203.586449 122.300097) - (xy 203.803267 122.394822) (xy 204.034354 122.44563) (xy 204.270909 122.450585) (xy 204.503922 122.409499) (xy 204.724516 122.323936) - (xy 204.92429 122.197155) (xy 204.926618 122.194937) (xy 205.059649 122.287397) (xy 205.276467 122.382122) (xy 205.507554 122.43293) - (xy 205.744109 122.437885) (xy 205.977122 122.396799) (xy 206.197716 122.311236) (xy 206.39749 122.184455) (xy 206.568834 122.021287) - (xy 206.705222 121.827944) (xy 206.801458 121.611793) (xy 206.853878 121.381066) (xy 206.857652 121.110817) (xy 206.857652 125.216454) - (xy 206.822761 125.201788) (xy 206.615384 125.159219) (xy 206.403689 125.157741) (xy 206.195738 125.19741) (xy 205.999452 125.276715) - (xy 205.822308 125.392634) (xy 205.671054 125.540753) (xy 205.55145 125.715431) (xy 205.468052 125.910012) (xy 205.424037 126.117087) - (xy 205.421081 126.328767) (xy 205.459297 126.53699) (xy 205.53723 126.733825) (xy 205.65191 126.911773) (xy 205.798969 127.064058) - (xy 205.972807 127.184879) (xy 206.166802 127.269633) (xy 206.373564 127.315093) (xy 206.585219 127.319526) (xy 206.793704 127.282765) - (xy 206.991077 127.206208) (xy 207.169822 127.092773) (xy 207.32313 126.94678) (xy 207.445161 126.77379) (xy 207.531268 126.580392) - (xy 207.57817 126.373952) (xy 207.581546 126.13215) (xy 207.581546 133.344781) (xy 207.425103 133.279019) (xy 207.156733 133.223931) - (xy 206.882774 133.222018) (xy 206.613661 133.273354) (xy 206.359644 133.375984) (xy 206.130399 133.525997) (xy 205.934658 133.717681) - (xy 205.779877 133.943734) (xy 205.67195 134.195546) (xy 205.614989 134.463524) (xy 205.611164 134.737464) (xy 205.66062 135.006928) - (xy 205.761474 135.261655) (xy 205.909883 135.491942) (xy 206.100196 135.689016) (xy 206.325163 135.845372) (xy 206.576215 135.955054) - (xy 206.843789 136.013884) (xy 207.117695 136.019622) (xy 207.387499 135.972048) (xy 207.642923 135.872975) (xy 207.87424 135.726177) - (xy 208.072639 135.537245) (xy 208.230561 135.313375) (xy 208.341993 135.063095) (xy 208.40269 134.795938) (xy 208.407059 134.483017) - (xy 208.407059 146.000235) (xy 201.770032 146.027325) (xy 201.770032 120.950797) (xy 201.724075 120.718696) (xy 201.633911 120.499942) - (xy 201.502975 120.302867) (xy 201.336253 120.134978) (xy 201.140097 120.002669) (xy 200.921978 119.91098) (xy 200.690204 119.863403) - (xy 200.469546 119.861862) (xy 200.469546 96.03315) (xy 200.428426 95.825481) (xy 200.347754 95.629753) (xy 200.2306 95.453423) - (xy 200.081428 95.303207) (xy 199.905921 95.184825) (xy 199.710761 95.102788) (xy 199.503384 95.060219) (xy 199.291689 95.058741) - (xy 199.083738 95.09841) (xy 198.887452 95.177715) (xy 198.710308 95.293634) (xy 198.559054 95.441753) (xy 198.43945 95.616431) - (xy 198.356052 95.811012) (xy 198.312037 96.018087) (xy 198.309081 96.229767) (xy 198.347297 96.43799) (xy 198.42523 96.634825) - (xy 198.53991 96.812773) (xy 198.686969 96.965058) (xy 198.860807 97.085879) (xy 199.054802 97.170633) (xy 199.261564 97.216093) - (xy 199.473219 97.220526) (xy 199.681704 97.183765) (xy 199.879077 97.107208) (xy 200.057822 96.993773) (xy 200.21113 96.84778) - (xy 200.333161 96.67479) (xy 200.419268 96.481392) (xy 200.46617 96.274952) (xy 200.469546 96.03315) (xy 200.469546 119.861862) - (xy 200.453603 119.861751) (xy 200.221187 119.906087) (xy 200.215552 119.908363) (xy 200.215552 102.858377) (xy 200.169595 102.626276) - (xy 200.079431 102.407522) (xy 199.948495 102.210447) (xy 199.781773 102.042558) (xy 199.585617 101.910249) (xy 199.367498 101.81856) - (xy 199.135724 101.770983) (xy 198.899123 101.769331) (xy 198.666707 101.813667) (xy 198.447329 101.902302) (xy 198.249344 102.031859) - (xy 198.183546 102.096293) (xy 198.183546 98.57315) (xy 198.142426 98.365481) (xy 198.061754 98.169753) (xy 197.9446 97.993423) - (xy 197.795428 97.843207) (xy 197.619921 97.724825) (xy 197.424761 97.642788) (xy 197.217384 97.600219) (xy 197.005689 97.598741) - (xy 196.797738 97.63841) (xy 196.601452 97.717715) (xy 196.424308 97.833634) (xy 196.273054 97.981753) (xy 196.15345 98.156431) - (xy 196.070052 98.351012) (xy 196.026037 98.558087) (xy 196.023081 98.769767) (xy 196.061297 98.97799) (xy 196.13923 99.174825) - (xy 196.25391 99.352773) (xy 196.400969 99.505058) (xy 196.574807 99.625879) (xy 196.768802 99.710633) (xy 196.975564 99.756093) - (xy 197.187219 99.760526) (xy 197.395704 99.723765) (xy 197.593077 99.647208) (xy 197.771822 99.533773) (xy 197.92513 99.38778) - (xy 198.047161 99.21479) (xy 198.133268 99.021392) (xy 198.18017 98.814952) (xy 198.183546 98.57315) (xy 198.183546 102.096293) - (xy 198.080295 102.197404) (xy 197.94662 102.392632) (xy 197.853411 102.610105) (xy 197.804217 102.841542) (xy 197.800914 103.078126) - (xy 197.843626 103.310846) (xy 197.930727 103.530837) (xy 198.058899 103.729721) (xy 198.22326 103.899922) (xy 198.417549 104.034957) - (xy 198.634367 104.129682) (xy 198.865454 104.18049) (xy 199.102009 104.185445) (xy 199.335022 104.144359) (xy 199.555616 104.058796) - (xy 199.75539 103.932015) (xy 199.926734 103.768847) (xy 200.063122 103.575504) (xy 200.159358 103.359353) (xy 200.211778 103.128626) - (xy 200.215552 102.858377) (xy 200.215552 119.908363) (xy 200.001809 119.994722) (xy 199.803824 120.124279) (xy 199.634775 120.289824) - (xy 199.5011 120.485052) (xy 199.407891 120.702525) (xy 199.358697 120.933962) (xy 199.355394 121.170546) (xy 199.398106 121.403266) - (xy 199.485207 121.623257) (xy 199.613379 121.822141) (xy 199.77774 121.992342) (xy 199.972029 122.127377) (xy 200.188847 122.222102) - (xy 200.419934 122.27291) (xy 200.656489 122.277865) (xy 200.889502 122.236779) (xy 201.110096 122.151216) (xy 201.30987 122.024435) - (xy 201.481214 121.861267) (xy 201.617602 121.667924) (xy 201.713838 121.451773) (xy 201.766258 121.221046) (xy 201.770032 120.950797) - (xy 201.770032 146.027325) (xy 195.897552 146.051294) (xy 195.897552 125.103697) (xy 195.851595 124.871596) (xy 195.761431 124.652842) - (xy 195.630495 124.455767) (xy 195.47696 124.301157) (xy 195.47696 69.545565) (xy 194.691 68.759605) (xy 194.511395 68.93921) - (xy 194.511395 68.58) (xy 193.725435 67.79404) (xy 193.485344 67.86102) (xy 193.368244 68.110048) (xy 193.301977 68.377135) - (xy 193.29201 68.589716) (xy 193.294059 68.443017) (xy 193.240846 68.174269) (xy 193.136446 67.920975) (xy 192.984835 67.692783) - (xy 192.79179 67.498385) (xy 192.564662 67.345185) (xy 192.312103 67.239019) (xy 192.043733 67.183931) (xy 191.769774 67.182018) - (xy 191.500661 67.233354) (xy 191.246644 67.335984) (xy 191.017399 67.485997) (xy 190.821658 67.677681) (xy 190.666877 67.903734) - (xy 190.55895 68.155546) (xy 190.501989 68.423524) (xy 190.500059 68.561747) (xy 190.500059 68.443017) (xy 190.446846 68.174269) - (xy 190.342446 67.920975) (xy 190.190835 67.692783) (xy 189.99779 67.498385) (xy 189.770662 67.345185) (xy 189.518103 67.239019) - (xy 189.249733 67.183931) (xy 188.975774 67.182018) (xy 188.706661 67.233354) (xy 188.452644 67.335984) (xy 188.223399 67.485997) - (xy 188.027658 67.677681) (xy 187.872877 67.903734) (xy 187.768609 68.147007) (xy 187.675446 67.920975) (xy 187.523835 67.692783) - (xy 187.33079 67.498385) (xy 187.103662 67.345185) (xy 186.851103 67.239019) (xy 186.582733 67.183931) (xy 186.308774 67.182018) - (xy 186.039661 67.233354) (xy 185.785644 67.335984) (xy 185.556399 67.485997) (xy 185.360658 67.677681) (xy 185.205877 67.903734) - (xy 185.09795 68.155546) (xy 185.040989 68.423524) (xy 185.039 68.565972) (xy 185.039 67.755458) (xy 185.014597 67.632777) - (xy 184.96673 67.517215) (xy 184.911593 67.434696) (xy 185.146695 67.439622) (xy 185.416499 67.392048) (xy 185.671923 67.292975) - (xy 185.90324 67.146177) (xy 186.101639 66.957245) (xy 186.259561 66.733375) (xy 186.370993 66.483095) (xy 186.43169 66.215938) - (xy 186.436059 65.903017) (xy 186.382846 65.634269) (xy 186.278446 65.380975) (xy 186.126835 65.152783) (xy 185.93379 64.958385) - (xy 185.706662 64.805185) (xy 185.454103 64.699019) (xy 185.185733 64.643931) (xy 184.911774 64.642018) (xy 184.642661 64.693354) - (xy 184.388644 64.795984) (xy 184.159399 64.945997) (xy 183.963658 65.137681) (xy 183.808877 65.363734) (xy 183.70095 65.615546) - (xy 183.643989 65.883524) (xy 183.640164 66.157464) (xy 183.68962 66.426928) (xy 183.790474 66.681655) (xy 183.938883 66.911942) - (xy 184.129196 67.109016) (xy 184.235645 67.183) (xy 182.817458 67.183) (xy 182.694777 67.207403) (xy 182.579215 67.25527) - (xy 182.475211 67.324763) (xy 182.386763 67.413211) (xy 182.31727 67.517215) (xy 182.269403 67.632777) (xy 182.245 67.755458) - (xy 182.245 67.880542) (xy 182.245 69.404542) (xy 182.269403 69.527223) (xy 182.31727 69.642785) (xy 182.386763 69.746789) - (xy 182.475211 69.835237) (xy 182.579215 69.90473) (xy 182.694777 69.952597) (xy 182.817458 69.977) (xy 182.942542 69.977) - (xy 184.466542 69.977) (xy 184.589223 69.952597) (xy 184.704785 69.90473) (xy 184.808789 69.835237) (xy 184.897237 69.746789) - (xy 184.96673 69.642785) (xy 185.014597 69.527223) (xy 185.039 69.404542) (xy 185.039 69.279458) (xy 185.039 68.707467) - (xy 185.08662 68.966928) (xy 185.187474 69.221655) (xy 185.335883 69.451942) (xy 185.526196 69.649016) (xy 185.751163 69.805372) - (xy 186.002215 69.915054) (xy 186.269789 69.973884) (xy 186.543695 69.979622) (xy 186.813499 69.932048) (xy 187.068923 69.832975) - (xy 187.30024 69.686177) (xy 187.498639 69.497245) (xy 187.656561 69.273375) (xy 187.767993 69.023095) (xy 187.77086 69.010472) - (xy 187.854474 69.221655) (xy 188.002883 69.451942) (xy 188.193196 69.649016) (xy 188.418163 69.805372) (xy 188.669215 69.915054) - (xy 188.936789 69.973884) (xy 189.210695 69.979622) (xy 189.480499 69.932048) (xy 189.735923 69.832975) (xy 189.96724 69.686177) - (xy 190.165639 69.497245) (xy 190.323561 69.273375) (xy 190.434993 69.023095) (xy 190.49569 68.755938) (xy 190.500059 68.443017) - (xy 190.500059 68.561747) (xy 190.498164 68.697464) (xy 190.54762 68.966928) (xy 190.648474 69.221655) (xy 190.796883 69.451942) - (xy 190.987196 69.649016) (xy 191.212163 69.805372) (xy 191.463215 69.915054) (xy 191.730789 69.973884) (xy 192.004695 69.979622) - (xy 192.274499 69.932048) (xy 192.529923 69.832975) (xy 192.76124 69.686177) (xy 192.959639 69.497245) (xy 193.117561 69.273375) - (xy 193.228993 69.023095) (xy 193.28969 68.755938) (xy 193.290966 68.664478) (xy 193.330078 68.924133) (xy 193.423364 69.183023) - (xy 193.485344 69.29898) (xy 193.725435 69.36596) (xy 194.511395 68.58) (xy 194.511395 68.93921) (xy 193.90504 69.545565) - (xy 193.97202 69.785656) (xy 194.221048 69.902756) (xy 194.488135 69.969023) (xy 194.763017 69.98191) (xy 195.035133 69.940922) - (xy 195.294023 69.847636) (xy 195.40998 69.785656) (xy 195.47696 69.545565) (xy 195.47696 124.301157) (xy 195.463773 124.287878) - (xy 195.267617 124.155569) (xy 195.049498 124.06388) (xy 194.881552 124.029405) (xy 194.881552 109.736697) (xy 194.835595 109.504596) - (xy 194.745431 109.285842) (xy 194.614495 109.088767) (xy 194.447773 108.920878) (xy 194.251617 108.788569) (xy 194.165921 108.752545) - (xy 194.20253 108.591412) (xy 194.205906 108.34961) (xy 194.164786 108.141941) (xy 194.084114 107.946213) (xy 194.07233 107.928478) - (xy 194.084734 107.916667) (xy 194.221122 107.723324) (xy 194.317358 107.507173) (xy 194.369778 107.276446) (xy 194.373552 107.006197) - (xy 194.327595 106.774096) (xy 194.237431 106.555342) (xy 194.106495 106.358267) (xy 193.98846 106.239405) (xy 194.11513 106.11878) - (xy 194.237161 105.94579) (xy 194.323268 105.752392) (xy 194.37017 105.545952) (xy 194.373546 105.30415) (xy 194.332426 105.096481) - (xy 194.251754 104.900753) (xy 194.1346 104.724423) (xy 193.985428 104.574207) (xy 193.809921 104.455825) (xy 193.614761 104.373788) - (xy 193.407384 104.331219) (xy 193.195689 104.329741) (xy 192.987738 104.36941) (xy 192.791452 104.448715) (xy 192.614308 104.564634) - (xy 192.463054 104.712753) (xy 192.34345 104.887431) (xy 192.260052 105.082012) (xy 192.216037 105.289087) (xy 192.214552 105.395428) - (xy 192.214552 72.906697) (xy 192.168595 72.674596) (xy 192.078431 72.455842) (xy 191.947495 72.258767) (xy 191.780773 72.090878) - (xy 191.584617 71.958569) (xy 191.366498 71.86688) (xy 191.134724 71.819303) (xy 190.898123 71.817651) (xy 190.665707 71.861987) - (xy 190.446329 71.950622) (xy 190.248344 72.080179) (xy 190.079295 72.245724) (xy 189.94562 72.440952) (xy 189.852411 72.658425) - (xy 189.803217 72.889862) (xy 189.799914 73.126446) (xy 189.842626 73.359166) (xy 189.929727 73.579157) (xy 190.057899 73.778041) - (xy 190.22226 73.948242) (xy 190.416549 74.083277) (xy 190.633367 74.178002) (xy 190.864454 74.22881) (xy 191.101009 74.233765) - (xy 191.334022 74.192679) (xy 191.554616 74.107116) (xy 191.75439 73.980335) (xy 191.925734 73.817167) (xy 192.062122 73.623824) - (xy 192.158358 73.407673) (xy 192.210778 73.176946) (xy 192.214552 72.906697) (xy 192.214552 105.395428) (xy 192.213081 105.500767) - (xy 192.251297 105.70899) (xy 192.32923 105.905825) (xy 192.44391 106.083773) (xy 192.486502 106.127879) (xy 192.407344 106.179679) - (xy 192.238295 106.345224) (xy 192.10462 106.540452) (xy 192.011411 106.757925) (xy 191.962217 106.989362) (xy 191.958914 107.225946) - (xy 192.001626 107.458666) (xy 192.088727 107.678657) (xy 192.215352 107.87514) (xy 192.17581 107.932891) (xy 192.092412 108.127472) - (xy 192.048397 108.334547) (xy 192.045441 108.546227) (xy 192.083657 108.75445) (xy 192.16159 108.951285) (xy 192.27627 109.129233) - (xy 192.423329 109.281518) (xy 192.565685 109.380458) (xy 192.519411 109.488425) (xy 192.470217 109.719862) (xy 192.466914 109.956446) - (xy 192.509626 110.189166) (xy 192.596727 110.409157) (xy 192.724899 110.608041) (xy 192.88926 110.778242) (xy 193.083549 110.913277) - (xy 193.300367 111.008002) (xy 193.531454 111.05881) (xy 193.768009 111.063765) (xy 194.001022 111.022679) (xy 194.221616 110.937116) - (xy 194.42139 110.810335) (xy 194.592734 110.647167) (xy 194.729122 110.453824) (xy 194.825358 110.237673) (xy 194.877778 110.006946) - (xy 194.881552 109.736697) (xy 194.881552 124.029405) (xy 194.817724 124.016303) (xy 194.581123 124.014651) (xy 194.348707 124.058987) - (xy 194.129329 124.147622) (xy 193.931344 124.277179) (xy 193.762295 124.442724) (xy 193.667432 124.581268) (xy 193.667432 113.394297) - (xy 193.621475 113.162196) (xy 193.531311 112.943442) (xy 193.400375 112.746367) (xy 193.233653 112.578478) (xy 193.037497 112.446169) - (xy 192.819378 112.35448) (xy 192.587604 112.306903) (xy 192.351003 112.305251) (xy 192.118587 112.349587) (xy 191.899209 112.438222) - (xy 191.701224 112.567779) (xy 191.532175 112.733324) (xy 191.3985 112.928552) (xy 191.305291 113.146025) (xy 191.256097 113.377462) - (xy 191.254432 113.49672) (xy 191.254432 101.087997) (xy 191.208475 100.855896) (xy 191.118311 100.637142) (xy 190.987375 100.440067) - (xy 190.820653 100.272178) (xy 190.624497 100.139869) (xy 190.567876 100.116067) (xy 190.567876 90.730467) (xy 190.563557 90.702611) - (xy 190.563557 88.134244) (xy 190.512762 87.877711) (xy 190.413107 87.635931) (xy 190.268388 87.418111) (xy 190.084118 87.232549) - (xy 189.867314 87.086313) (xy 189.626235 86.984973) (xy 189.370063 86.932388) (xy 189.108557 86.930563) (xy 188.851676 86.979565) - (xy 188.609206 87.07753) (xy 188.390381 87.220725) (xy 188.203537 87.403695) (xy 188.055791 87.619473) (xy 188.0235 87.694813) - (xy 188.0235 87.503958) (xy 187.999097 87.381277) (xy 187.95123 87.265715) (xy 187.881737 87.161711) (xy 187.793289 87.073263) - (xy 187.689285 87.00377) (xy 187.573723 86.955903) (xy 187.451042 86.9315) (xy 187.325958 86.9315) (xy 187.261546 86.9315) - (xy 187.261546 71.01415) (xy 187.220426 70.806481) (xy 187.139754 70.610753) (xy 187.0226 70.434423) (xy 186.873428 70.284207) - (xy 186.697921 70.165825) (xy 186.502761 70.083788) (xy 186.295384 70.041219) (xy 186.083689 70.039741) (xy 185.875738 70.07941) - (xy 185.679452 70.158715) (xy 185.502308 70.274634) (xy 185.351054 70.422753) (xy 185.23145 70.597431) (xy 185.148052 70.792012) - (xy 185.104037 70.999087) (xy 185.101081 71.210767) (xy 185.139297 71.41899) (xy 185.21723 71.615825) (xy 185.33191 71.793773) - (xy 185.3565 71.819236) (xy 185.3565 74.1956) (xy 185.343279 74.214909) (xy 185.269693 74.386599) (xy 185.230856 74.569312) - (xy 185.228248 74.756089) (xy 185.261968 74.939815) (xy 185.330732 75.113493) (xy 185.43192 75.270506) (xy 185.561679 75.404875) - (xy 185.715065 75.511482) (xy 185.886237 75.586265) (xy 186.068674 75.626376) (xy 186.255428 75.630288) (xy 186.439386 75.597852) - (xy 186.613539 75.530302) (xy 186.771255 75.430212) (xy 186.906527 75.301395) (xy 187.014201 75.148756) (xy 187.090178 74.978111) - (xy 187.131562 74.795958) (xy 187.134541 74.582603) (xy 187.098259 74.399365) (xy 187.027077 74.226665) (xy 187.0075 74.197199) - (xy 187.0075 71.822585) (xy 187.125161 71.65579) (xy 187.211268 71.462392) (xy 187.25817 71.255952) (xy 187.261546 71.01415) - (xy 187.261546 86.9315) (xy 185.928958 86.9315) (xy 185.806277 86.955903) (xy 185.690715 87.00377) (xy 185.586711 87.073263) - (xy 185.498263 87.161711) (xy 185.42877 87.265715) (xy 185.380903 87.381277) (xy 185.3565 87.503958) (xy 185.3565 87.629042) - (xy 185.3565 89.026042) (xy 185.380903 89.148723) (xy 185.42877 89.264285) (xy 185.498263 89.368289) (xy 185.586711 89.456737) - (xy 185.690715 89.52623) (xy 185.806277 89.574097) (xy 185.928958 89.5985) (xy 186.054042 89.5985) (xy 187.451042 89.5985) - (xy 187.573723 89.574097) (xy 187.689285 89.52623) (xy 187.793289 89.456737) (xy 187.881737 89.368289) (xy 187.95123 89.264285) - (xy 187.999097 89.148723) (xy 188.0235 89.026042) (xy 188.0235 88.900958) (xy 188.0235 88.840298) (xy 188.038225 88.877489) - (xy 188.179888 89.097308) (xy 188.36155 89.285425) (xy 188.576291 89.434674) (xy 188.812447 89.537847) (xy 188.649158 89.597486) - (xy 188.548686 89.651188) (xy 188.489408 89.884803) (xy 189.23 90.625395) (xy 189.970592 89.884803) (xy 189.911314 89.651188) - (xy 189.673125 89.540441) (xy 189.646265 89.533899) (xy 189.834154 89.461022) (xy 190.054957 89.320897) (xy 190.244337 89.140552) - (xy 190.395081 88.926858) (xy 190.501448 88.687955) (xy 190.559386 88.432941) (xy 190.563557 88.134244) (xy 190.563557 90.702611) - (xy 190.527629 90.470893) (xy 190.437514 90.224158) (xy 190.383812 90.123686) (xy 190.150197 90.064408) (xy 189.409605 90.805) - (xy 190.150197 91.545592) (xy 190.383812 91.486314) (xy 190.494559 91.248125) (xy 190.556711 90.992907) (xy 190.567876 90.730467) - (xy 190.567876 100.116067) (xy 190.406378 100.04818) (xy 190.174604 100.000603) (xy 189.970592 99.999178) (xy 189.970592 91.725197) - (xy 189.23 90.984605) (xy 189.050395 91.16421) (xy 189.050395 90.805) (xy 188.309803 90.064408) (xy 188.076188 90.123686) - (xy 187.965441 90.361875) (xy 187.903289 90.617093) (xy 187.892124 90.879533) (xy 187.932371 91.139107) (xy 188.022486 91.385842) - (xy 188.076188 91.486314) (xy 188.309803 91.545592) (xy 189.050395 90.805) (xy 189.050395 91.16421) (xy 188.489408 91.725197) - (xy 188.548686 91.958812) (xy 188.786875 92.069559) (xy 189.042093 92.131711) (xy 189.304533 92.142876) (xy 189.564107 92.102629) - (xy 189.810842 92.012514) (xy 189.911314 91.958812) (xy 189.970592 91.725197) (xy 189.970592 99.999178) (xy 189.938003 99.998951) - (xy 189.705587 100.043287) (xy 189.486209 100.131922) (xy 189.288224 100.261479) (xy 189.119175 100.427024) (xy 188.9855 100.622252) - (xy 188.892291 100.839725) (xy 188.843097 101.071162) (xy 188.839794 101.307746) (xy 188.882506 101.540466) (xy 188.969607 101.760457) - (xy 189.097779 101.959341) (xy 189.26214 102.129542) (xy 189.456429 102.264577) (xy 189.673247 102.359302) (xy 189.904334 102.41011) - (xy 190.140889 102.415065) (xy 190.373902 102.373979) (xy 190.594496 102.288416) (xy 190.79427 102.161635) (xy 190.965614 101.998467) - (xy 191.102002 101.805124) (xy 191.198238 101.588973) (xy 191.250658 101.358246) (xy 191.254432 101.087997) (xy 191.254432 113.49672) - (xy 191.252794 113.614046) (xy 191.295506 113.846766) (xy 191.382607 114.066757) (xy 191.510779 114.265641) (xy 191.67514 114.435842) - (xy 191.869429 114.570877) (xy 192.086247 114.665602) (xy 192.317334 114.71641) (xy 192.553889 114.721365) (xy 192.786902 114.680279) - (xy 193.007496 114.594716) (xy 193.20727 114.467935) (xy 193.378614 114.304767) (xy 193.515002 114.111424) (xy 193.611238 113.895273) - (xy 193.663658 113.664546) (xy 193.667432 113.394297) (xy 193.667432 124.581268) (xy 193.62862 124.637952) (xy 193.540432 124.84371) - (xy 193.540432 123.727017) (xy 193.494475 123.494916) (xy 193.404311 123.276162) (xy 193.273375 123.079087) (xy 193.106653 122.911198) - (xy 192.910497 122.778889) (xy 192.692378 122.6872) (xy 192.460604 122.639623) (xy 192.224003 122.637971) (xy 191.991587 122.682307) - (xy 191.772209 122.770942) (xy 191.574224 122.900499) (xy 191.405175 123.066044) (xy 191.2715 123.261272) (xy 191.178291 123.478745) - (xy 191.129097 123.710182) (xy 191.125794 123.946766) (xy 191.168506 124.179486) (xy 191.255607 124.399477) (xy 191.383779 124.598361) - (xy 191.54814 124.768562) (xy 191.742429 124.903597) (xy 191.959247 124.998322) (xy 192.190334 125.04913) (xy 192.426889 125.054085) - (xy 192.659902 125.012999) (xy 192.880496 124.927436) (xy 193.08027 124.800655) (xy 193.251614 124.637487) (xy 193.388002 124.444144) - (xy 193.484238 124.227993) (xy 193.536658 123.997266) (xy 193.540432 123.727017) (xy 193.540432 124.84371) (xy 193.535411 124.855425) - (xy 193.486217 125.086862) (xy 193.482914 125.323446) (xy 193.525626 125.556166) (xy 193.612727 125.776157) (xy 193.740899 125.975041) - (xy 193.90526 126.145242) (xy 194.099549 126.280277) (xy 194.316367 126.375002) (xy 194.547454 126.42581) (xy 194.784009 126.430765) - (xy 195.017022 126.389679) (xy 195.237616 126.304116) (xy 195.43739 126.177335) (xy 195.608734 126.014167) (xy 195.745122 125.820824) - (xy 195.841358 125.604673) (xy 195.893778 125.373946) (xy 195.897552 125.103697) (xy 195.897552 146.051294) (xy 189.877746 146.075865) - (xy 189.877746 105.21525) (xy 189.836626 105.007581) (xy 189.755954 104.811853) (xy 189.6388 104.635523) (xy 189.489628 104.485307) - (xy 189.314121 104.366925) (xy 189.118961 104.284888) (xy 188.911584 104.242319) (xy 188.699889 104.240841) (xy 188.491938 104.28051) - (xy 188.295652 104.359815) (xy 188.118508 104.475734) (xy 187.967254 104.623853) (xy 187.84765 104.798531) (xy 187.764252 104.993112) - (xy 187.720237 105.200187) (xy 187.717281 105.411867) (xy 187.755497 105.62009) (xy 187.83343 105.816925) (xy 187.94811 105.994873) - (xy 188.095169 106.147158) (xy 188.269007 106.267979) (xy 188.463002 106.352733) (xy 188.669764 106.398193) (xy 188.881419 106.402626) - (xy 189.089904 106.365865) (xy 189.287277 106.289308) (xy 189.466022 106.175873) (xy 189.61933 106.02988) (xy 189.741361 105.85689) - (xy 189.827468 105.663492) (xy 189.87437 105.457052) (xy 189.877746 105.21525) (xy 189.877746 146.075865) (xy 189.453566 146.077596) - (xy 189.453566 107.91527) (xy 189.412446 107.707601) (xy 189.331774 107.511873) (xy 189.21462 107.335543) (xy 189.065448 107.185327) - (xy 188.889941 107.066945) (xy 188.694781 106.984908) (xy 188.487404 106.942339) (xy 188.275709 106.940861) (xy 188.067758 106.98053) - (xy 187.871472 107.059835) (xy 187.694328 107.175754) (xy 187.543074 107.323873) (xy 187.42347 107.498551) (xy 187.340072 107.693132) - (xy 187.296057 107.900207) (xy 187.293101 108.111887) (xy 187.331317 108.32011) (xy 187.40925 108.516945) (xy 187.52393 108.694893) - (xy 187.670989 108.847178) (xy 187.844827 108.967999) (xy 188.038822 109.052753) (xy 188.245584 109.098213) (xy 188.457239 109.102646) - (xy 188.665724 109.065885) (xy 188.863097 108.989328) (xy 189.041842 108.875893) (xy 189.19515 108.7299) (xy 189.317181 108.55691) - (xy 189.403288 108.363512) (xy 189.45019 108.157072) (xy 189.453566 107.91527) (xy 189.453566 146.077596) (xy 187.198 146.086802) - (xy 187.198 122.936) (xy 187.198 105.918) (xy 187.191125 105.84789) (xy 187.184996 105.777829) (xy 187.183879 105.773985) - (xy 187.183488 105.769993) (xy 187.163126 105.702552) (xy 187.143506 105.635018) (xy 187.141662 105.631462) (xy 187.140504 105.627624) - (xy 187.107454 105.565467) (xy 187.075067 105.502985) (xy 187.072566 105.499852) (xy 187.070686 105.496316) (xy 187.026216 105.441791) - (xy 186.982286 105.38676) (xy 186.976787 105.381185) (xy 186.976693 105.381069) (xy 186.976585 105.380979) (xy 186.974815 105.379185) - (xy 183.896 102.30037) (xy 183.896 77.089) (xy 183.889121 77.018849) (xy 183.882996 76.948829) (xy 183.881879 76.944985) - (xy 183.881488 76.940993) (xy 183.861126 76.873552) (xy 183.841506 76.806018) (xy 183.839662 76.802462) (xy 183.838504 76.798624) - (xy 183.805454 76.736467) (xy 183.773067 76.673985) (xy 183.770566 76.670852) (xy 183.768686 76.667316) (xy 183.724216 76.612791) - (xy 183.680286 76.55776) (xy 183.674784 76.552181) (xy 183.674693 76.552069) (xy 183.674589 76.551983) (xy 183.672815 76.550184) - (xy 179.100815 71.978185) (xy 179.070109 71.952962) (xy 179.070109 65.79094) (xy 178.973357 65.302307) (xy 178.783538 64.841772) - (xy 178.507883 64.426878) (xy 178.156891 64.073427) (xy 177.743931 63.794882) (xy 177.284733 63.601853) (xy 176.796787 63.501692) - (xy 176.298679 63.498214) (xy 175.809383 63.591553) (xy 175.347534 63.778151) (xy 174.930725 64.050904) (xy 174.574832 64.39942) - (xy 174.293411 64.810425) (xy 174.097181 65.268264) (xy 173.993616 65.755499) (xy 173.986661 66.25357) (xy 174.076581 66.743506) - (xy 174.259951 67.206646) (xy 174.529787 67.625349) (xy 174.87581 67.983667) (xy 175.284841 68.26795) (xy 175.741299 68.467372) - (xy 176.227799 68.574336) (xy 176.725809 68.584768) (xy 177.216361 68.49827) (xy 177.68077 68.318138) (xy 178.101347 68.051232) - (xy 178.462071 67.707719) (xy 178.749203 67.300683) (xy 178.951807 66.845628) (xy 179.062164 66.359887) (xy 179.070109 65.79094) - (xy 179.070109 71.952962) (xy 179.0464 71.933487) (xy 178.992505 71.888264) (xy 178.988997 71.886335) (xy 178.985897 71.883789) - (xy 178.923831 71.85051) (xy 178.862184 71.816619) (xy 178.858363 71.815407) (xy 178.854833 71.813514) (xy 178.787535 71.792939) - (xy 178.720429 71.771652) (xy 178.716445 71.771205) (xy 178.712615 71.770034) (xy 178.642627 71.762924) (xy 178.572639 71.755074) - (xy 178.564802 71.755019) (xy 178.56466 71.755005) (xy 178.564526 71.755017) (xy 178.562 71.755) (xy 174.117 71.755) - (xy 174.046936 71.761869) (xy 173.97683 71.768003) (xy 173.972982 71.76912) (xy 173.968993 71.769512) (xy 173.901581 71.789864) - (xy 173.834018 71.809494) (xy 173.830462 71.811337) (xy 173.826624 71.812496) (xy 173.764446 71.845556) (xy 173.701986 71.877933) - (xy 173.698855 71.880431) (xy 173.695316 71.882314) (xy 173.640769 71.9268) (xy 173.58576 71.970714) (xy 173.580185 71.976212) - (xy 173.580069 71.976307) (xy 173.579979 71.976414) (xy 173.578185 71.978185) (xy 172.374195 73.182174) (xy 172.231733 73.152931) - (xy 171.957774 73.151018) (xy 171.688661 73.202354) (xy 171.434644 73.304984) (xy 171.205399 73.454997) (xy 171.009658 73.646681) - (xy 170.942109 73.745333) (xy 170.942109 65.79094) (xy 170.845357 65.302307) (xy 170.655538 64.841772) (xy 170.379883 64.426878) - (xy 170.028891 64.073427) (xy 169.615931 63.794882) (xy 169.156733 63.601853) (xy 168.668787 63.501692) (xy 168.170679 63.498214) - (xy 167.681383 63.591553) (xy 167.219534 63.778151) (xy 166.802725 64.050904) (xy 166.446832 64.39942) (xy 166.165411 64.810425) - (xy 165.969181 65.268264) (xy 165.865616 65.755499) (xy 165.858661 66.25357) (xy 165.948581 66.743506) (xy 166.131951 67.206646) - (xy 166.401787 67.625349) (xy 166.74781 67.983667) (xy 167.156841 68.26795) (xy 167.613299 68.467372) (xy 168.099799 68.574336) - (xy 168.597809 68.584768) (xy 169.088361 68.49827) (xy 169.55277 68.318138) (xy 169.973347 68.051232) (xy 170.334071 67.707719) - (xy 170.621203 67.300683) (xy 170.823807 66.845628) (xy 170.934164 66.359887) (xy 170.942109 65.79094) (xy 170.942109 73.745333) - (xy 170.942 73.745493) (xy 170.942 73.724458) (xy 170.917597 73.601777) (xy 170.86973 73.486215) (xy 170.800237 73.382211) - (xy 170.711789 73.293763) (xy 170.607785 73.22427) (xy 170.492223 73.176403) (xy 170.369542 73.152) (xy 170.244458 73.152) - (xy 168.720458 73.152) (xy 168.597777 73.176403) (xy 168.482215 73.22427) (xy 168.378211 73.293763) (xy 168.289763 73.382211) - (xy 168.22027 73.486215) (xy 168.172403 73.601777) (xy 168.148 73.724458) (xy 168.148 73.849542) (xy 168.148 75.373542) - (xy 168.172403 75.496223) (xy 168.22027 75.611785) (xy 168.289763 75.715789) (xy 168.378211 75.804237) (xy 168.482215 75.87373) - (xy 168.597777 75.921597) (xy 168.720458 75.946) (xy 168.740274 75.946) (xy 168.665399 75.994997) (xy 168.469658 76.186681) - (xy 168.314877 76.412734) (xy 168.20695 76.664546) (xy 168.149989 76.932524) (xy 168.146164 77.206464) (xy 168.19562 77.475928) - (xy 168.296474 77.730655) (xy 168.444883 77.960942) (xy 168.635196 78.158016) (xy 168.860163 78.314372) (xy 168.960699 78.358295) - (xy 168.894644 78.384984) (xy 168.665399 78.534997) (xy 168.469658 78.726681) (xy 168.314877 78.952734) (xy 168.20695 79.204546) - (xy 168.149989 79.472524) (xy 168.146164 79.746464) (xy 168.19562 80.015928) (xy 168.296474 80.270655) (xy 168.444883 80.500942) - (xy 168.635196 80.698016) (xy 168.860163 80.854372) (xy 168.960699 80.898295) (xy 168.894644 80.924984) (xy 168.665399 81.074997) - (xy 168.469658 81.266681) (xy 168.314877 81.492734) (xy 168.20695 81.744546) (xy 168.149989 82.012524) (xy 168.146164 82.286464) - (xy 168.19562 82.555928) (xy 168.296474 82.810655) (xy 168.444883 83.040942) (xy 168.635196 83.238016) (xy 168.860163 83.394372) - (xy 169.111215 83.504054) (xy 169.378789 83.562884) (xy 169.652695 83.568622) (xy 169.922499 83.521048) (xy 170.177923 83.421975) - (xy 170.40924 83.275177) (xy 170.607639 83.086245) (xy 170.765561 82.862375) (xy 170.813934 82.753726) (xy 170.836474 82.810655) - (xy 170.984883 83.040942) (xy 171.175196 83.238016) (xy 171.400163 83.394372) (xy 171.651215 83.504054) (xy 171.918789 83.562884) - (xy 172.192695 83.568622) (xy 172.462499 83.521048) (xy 172.717923 83.421975) (xy 172.94924 83.275177) (xy 173.147639 83.086245) - (xy 173.305561 82.862375) (xy 173.416993 82.612095) (xy 173.47769 82.344938) (xy 173.482059 82.032017) (xy 173.451904 81.879725) - (xy 174.528815 80.802815) (xy 174.573512 80.7484) (xy 174.618736 80.694505) (xy 174.620664 80.690997) (xy 174.623211 80.687897) - (xy 174.656509 80.625796) (xy 174.690381 80.564184) (xy 174.691591 80.560368) (xy 174.693487 80.556833) (xy 174.714088 80.489448) - (xy 174.735348 80.422429) (xy 174.735794 80.418451) (xy 174.736967 80.414615) (xy 174.74408 80.344577) (xy 174.751926 80.274639) - (xy 174.75198 80.266802) (xy 174.751995 80.26666) (xy 174.751982 80.266526) (xy 174.752 80.264) (xy 174.752 79.05563) - (xy 177.22663 76.581) (xy 177.865369 76.581) (xy 179.197 77.91263) (xy 179.197 85.407427) (xy 179.098689 85.406741) - (xy 178.890738 85.44641) (xy 178.694452 85.525715) (xy 178.517308 85.641634) (xy 178.366054 85.789753) (xy 178.24645 85.964431) - (xy 178.163052 86.159012) (xy 178.119037 86.366087) (xy 178.116081 86.577767) (xy 178.154297 86.78599) (xy 178.212318 86.932534) - (xy 178.037768 86.965832) (xy 177.864575 87.035807) (xy 177.732858 87.122) (xy 177.47874 87.122) (xy 177.446629 86.914893) - (xy 177.356514 86.668158) (xy 177.302812 86.567686) (xy 177.069197 86.508408) (xy 176.889592 86.688013) (xy 176.889592 86.328803) - (xy 176.830314 86.095188) (xy 176.592125 85.984441) (xy 176.336907 85.922289) (xy 176.074467 85.911124) (xy 175.814893 85.951371) - (xy 175.568158 86.041486) (xy 175.467686 86.095188) (xy 175.408408 86.328803) (xy 176.149 87.069395) (xy 176.889592 86.328803) - (xy 176.889592 86.688013) (xy 176.328605 87.249) (xy 176.342747 87.263142) (xy 176.163142 87.442747) (xy 176.149 87.428605) - (xy 175.969395 87.60821) (xy 175.969395 87.249) (xy 175.228803 86.508408) (xy 174.995188 86.567686) (xy 174.884441 86.805875) - (xy 174.822289 87.061093) (xy 174.811124 87.323533) (xy 174.851371 87.583107) (xy 174.941486 87.829842) (xy 174.995188 87.930314) - (xy 175.228803 87.989592) (xy 175.969395 87.249) (xy 175.969395 87.60821) (xy 175.408408 88.169197) (xy 175.467686 88.402812) - (xy 175.705875 88.513559) (xy 175.710648 88.514721) (xy 175.547929 88.67744) (xy 175.443428 88.572207) (xy 175.267921 88.453825) - (xy 175.072761 88.371788) (xy 174.865384 88.329219) (xy 174.653689 88.327741) (xy 174.445738 88.36741) (xy 174.249452 88.446715) - (xy 174.072308 88.562634) (xy 173.921054 88.710753) (xy 173.910221 88.726573) (xy 173.891446 88.736556) (xy 173.828986 88.768933) - (xy 173.825855 88.771431) (xy 173.822316 88.773314) (xy 173.767769 88.8178) (xy 173.71276 88.861714) (xy 173.707185 88.867212) - (xy 173.707069 88.867307) (xy 173.706979 88.867414) (xy 173.705185 88.869185) (xy 172.816185 89.758185) (xy 172.771487 89.812599) - (xy 172.726264 89.866495) (xy 172.724335 89.870002) (xy 172.721789 89.873103) (xy 172.68851 89.935168) (xy 172.654619 89.996816) - (xy 172.653407 90.000636) (xy 172.651514 90.004167) (xy 172.630939 90.071464) (xy 172.609652 90.138571) (xy 172.609205 90.142554) - (xy 172.608034 90.146385) (xy 172.600924 90.216372) (xy 172.593074 90.286361) (xy 172.593019 90.294197) (xy 172.593005 90.29434) - (xy 172.593017 90.294473) (xy 172.593 90.297) (xy 172.593 91.888014) (xy 172.579384 91.885219) (xy 172.367689 91.883741) - (xy 172.159738 91.92341) (xy 171.963452 92.002715) (xy 171.786308 92.118634) (xy 171.635054 92.266753) (xy 171.51545 92.441431) - (xy 171.432052 92.636012) (xy 171.388037 92.843087) (xy 171.385081 93.054767) (xy 171.423297 93.26299) (xy 171.50123 93.459825) - (xy 171.61591 93.637773) (xy 171.704 93.728993) (xy 171.704 107.95) (xy 171.710874 108.020113) (xy 171.717004 108.09017) - (xy 171.71812 108.094012) (xy 171.718512 108.098007) (xy 171.738877 108.165459) (xy 171.758494 108.232982) (xy 171.760337 108.236537) - (xy 171.761496 108.240376) (xy 171.794556 108.302553) (xy 171.826933 108.365014) (xy 171.829431 108.368144) (xy 171.831314 108.371684) - (xy 171.8758 108.42623) (xy 171.919714 108.48124) (xy 171.925212 108.486814) (xy 171.925307 108.486931) (xy 171.925414 108.48702) - (xy 171.927185 108.488815) (xy 175.102185 111.663815) (xy 175.156599 111.708512) (xy 175.210495 111.753736) (xy 175.214002 111.755664) - (xy 175.217103 111.758211) (xy 175.279168 111.791489) (xy 175.340816 111.825381) (xy 175.344636 111.826592) (xy 175.348167 111.828486) - (xy 175.415464 111.84906) (xy 175.482571 111.870348) (xy 175.486554 111.870794) (xy 175.490385 111.871966) (xy 175.560372 111.879075) - (xy 175.630361 111.886926) (xy 175.638197 111.88698) (xy 175.63834 111.886995) (xy 175.638473 111.886982) (xy 175.641 111.887) - (xy 175.739244 111.887) (xy 175.568158 111.949486) (xy 175.467686 112.003188) (xy 175.408408 112.236803) (xy 176.149 112.977395) - (xy 176.889592 112.236803) (xy 176.830314 112.003188) (xy 176.592125 111.892441) (xy 176.569782 111.887) (xy 178.562 111.887) - (xy 178.632113 111.880125) (xy 178.70217 111.873996) (xy 178.706012 111.872879) (xy 178.710007 111.872488) (xy 178.777459 111.852122) - (xy 178.844982 111.832506) (xy 178.848537 111.830662) (xy 178.852376 111.829504) (xy 178.914553 111.796443) (xy 178.977014 111.764067) - (xy 178.980144 111.761568) (xy 178.983684 111.759686) (xy 179.03823 111.715199) (xy 179.09324 111.671286) (xy 179.098814 111.665787) - (xy 179.098931 111.665693) (xy 179.09902 111.665585) (xy 179.100815 111.663815) (xy 179.726187 111.038442) (xy 179.687052 111.129752) - (xy 179.643037 111.336827) (xy 179.640081 111.548507) (xy 179.678297 111.75673) (xy 179.75623 111.953565) (xy 179.87091 112.131513) - (xy 180.017969 112.283798) (xy 180.191807 112.404619) (xy 180.385802 112.489373) (xy 180.592564 112.534833) (xy 180.804219 112.539266) - (xy 180.848 112.531546) (xy 180.848 118.234236) (xy 180.779054 118.301753) (xy 180.65945 118.476431) (xy 180.576052 118.671012) - (xy 180.532037 118.878087) (xy 180.530319 119.00105) (xy 179.895552 119.635817) (xy 179.895552 118.753697) (xy 179.849595 118.521596) - (xy 179.759431 118.302842) (xy 179.628495 118.105767) (xy 179.461773 117.937878) (xy 179.265617 117.805569) (xy 179.047498 117.71388) - (xy 178.815724 117.666303) (xy 178.579123 117.664651) (xy 178.346707 117.708987) (xy 178.127329 117.797622) (xy 177.929344 117.927179) - (xy 177.760295 118.092724) (xy 177.62662 118.287952) (xy 177.533411 118.505425) (xy 177.486876 118.724352) (xy 177.486876 113.082467) - (xy 177.446629 112.822893) (xy 177.356514 112.576158) (xy 177.302812 112.475686) (xy 177.069197 112.416408) (xy 176.328605 113.157) - (xy 177.069197 113.897592) (xy 177.302812 113.838314) (xy 177.413559 113.600125) (xy 177.475711 113.344907) (xy 177.486876 113.082467) - (xy 177.486876 118.724352) (xy 177.484217 118.736862) (xy 177.480914 118.973446) (xy 177.523626 119.206166) (xy 177.610727 119.426157) - (xy 177.738899 119.625041) (xy 177.90326 119.795242) (xy 178.097549 119.930277) (xy 178.314367 120.025002) (xy 178.545454 120.07581) - (xy 178.782009 120.080765) (xy 179.015022 120.039679) (xy 179.235616 119.954116) (xy 179.43539 119.827335) (xy 179.606734 119.664167) - (xy 179.743122 119.470824) (xy 179.839358 119.254673) (xy 179.891778 119.023946) (xy 179.895552 118.753697) (xy 179.895552 119.635817) - (xy 179.166185 120.365185) (xy 179.121487 120.419599) (xy 179.076264 120.473495) (xy 179.074335 120.477002) (xy 179.071789 120.480103) - (xy 179.03851 120.542168) (xy 179.004619 120.603816) (xy 179.003407 120.607636) (xy 179.001514 120.611167) (xy 178.980939 120.678464) - (xy 178.959652 120.745571) (xy 178.959205 120.749554) (xy 178.958034 120.753385) (xy 178.950924 120.823372) (xy 178.943074 120.893361) - (xy 178.943019 120.901197) (xy 178.943005 120.90134) (xy 178.943017 120.901473) (xy 178.943 120.904) (xy 178.943 123.001369) - (xy 177.609557 124.334812) (xy 177.609557 119.630244) (xy 177.558762 119.373711) (xy 177.459107 119.131931) (xy 177.314388 118.914111) - (xy 177.130118 118.728549) (xy 176.913314 118.582313) (xy 176.889592 118.572341) (xy 176.889592 114.077197) (xy 176.149 113.336605) - (xy 175.969395 113.51621) (xy 175.969395 113.157) (xy 175.228803 112.416408) (xy 174.995188 112.475686) (xy 174.884441 112.713875) - (xy 174.822289 112.969093) (xy 174.811124 113.231533) (xy 174.851371 113.491107) (xy 174.941486 113.737842) (xy 174.995188 113.838314) - (xy 175.228803 113.897592) (xy 175.969395 113.157) (xy 175.969395 113.51621) (xy 175.408408 114.077197) (xy 175.467686 114.310812) - (xy 175.705875 114.421559) (xy 175.961093 114.483711) (xy 176.223533 114.494876) (xy 176.483107 114.454629) (xy 176.729842 114.364514) - (xy 176.830314 114.310812) (xy 176.889592 114.077197) (xy 176.889592 118.572341) (xy 176.672235 118.480973) (xy 176.416063 118.428388) - (xy 176.154557 118.426563) (xy 175.897676 118.475565) (xy 175.655206 118.57353) (xy 175.436381 118.716725) (xy 175.249537 118.899695) - (xy 175.101791 119.115473) (xy 174.99877 119.355839) (xy 174.944399 119.611637) (xy 174.940747 119.873124) (xy 174.987955 120.130341) - (xy 175.084225 120.373489) (xy 175.225888 120.593308) (xy 175.40755 120.781425) (xy 175.622291 120.930674) (xy 175.861932 121.03537) - (xy 176.117344 121.091526) (xy 176.3788 121.097003) (xy 176.63634 121.051592) (xy 176.880154 120.957022) (xy 177.100957 120.816897) - (xy 177.290337 120.636552) (xy 177.441081 120.422858) (xy 177.547448 120.183955) (xy 177.605386 119.928941) (xy 177.609557 119.630244) - (xy 177.609557 124.334812) (xy 177.537205 124.407164) (xy 177.483514 124.260158) (xy 177.429812 124.159686) (xy 177.196197 124.100408) - (xy 177.016592 124.280013) (xy 177.016592 123.920803) (xy 176.957314 123.687188) (xy 176.719125 123.576441) (xy 176.463907 123.514289) - (xy 176.201467 123.503124) (xy 175.941893 123.543371) (xy 175.695158 123.633486) (xy 175.594686 123.687188) (xy 175.535408 123.920803) - (xy 176.276 124.661395) (xy 177.016592 123.920803) (xy 177.016592 124.280013) (xy 176.455605 124.841) (xy 176.469747 124.855142) - (xy 176.290142 125.034747) (xy 176.276 125.020605) (xy 176.096395 125.20021) (xy 176.096395 124.841) (xy 175.355803 124.100408) - (xy 175.122188 124.159686) (xy 175.011441 124.397875) (xy 174.949289 124.653093) (xy 174.938124 124.915533) (xy 174.978371 125.175107) - (xy 175.068486 125.421842) (xy 175.122188 125.522314) (xy 175.355803 125.581592) (xy 176.096395 124.841) (xy 176.096395 125.20021) - (xy 175.535408 125.761197) (xy 175.594686 125.994812) (xy 175.832875 126.105559) (xy 175.837648 126.106721) (xy 174.817369 127.127) - (xy 174.498 127.127) (xy 174.427936 127.133869) (xy 174.35783 127.140003) (xy 174.353982 127.14112) (xy 174.349993 127.141512) - (xy 174.282581 127.161864) (xy 174.215018 127.181494) (xy 174.211462 127.183337) (xy 174.207624 127.184496) (xy 174.145446 127.217556) - (xy 174.082986 127.249933) (xy 174.079855 127.252431) (xy 174.076316 127.254314) (xy 174.021769 127.2988) (xy 173.96676 127.342714) - (xy 173.961185 127.348212) (xy 173.961069 127.348307) (xy 173.960979 127.348414) (xy 173.959185 127.350185) (xy 169.895185 131.414185) - (xy 169.850487 131.468599) (xy 169.805264 131.522495) (xy 169.803335 131.526002) (xy 169.800789 131.529103) (xy 169.76751 131.591168) - (xy 169.733619 131.652816) (xy 169.732407 131.656636) (xy 169.730514 131.660167) (xy 169.709939 131.727464) (xy 169.688652 131.794571) - (xy 169.688205 131.798554) (xy 169.687034 131.802385) (xy 169.679924 131.872372) (xy 169.672074 131.942361) (xy 169.672019 131.950197) - (xy 169.672005 131.95034) (xy 169.672017 131.950473) (xy 169.672 131.953) (xy 169.672 135.604069) (xy 169.579103 135.565019) - (xy 169.310733 135.509931) (xy 169.036774 135.508018) (xy 168.767661 135.559354) (xy 168.513644 135.661984) (xy 168.284399 135.811997) - (xy 168.088658 136.003681) (xy 167.933877 136.229734) (xy 167.89435 136.321955) (xy 167.863446 136.246975) (xy 167.711835 136.018783) - (xy 167.51879 135.824385) (xy 167.291662 135.671185) (xy 167.039103 135.565019) (xy 166.770733 135.509931) (xy 166.496774 135.508018) - (xy 166.227661 135.559354) (xy 166.116 135.604468) (xy 166.116 135.31663) (xy 169.194815 132.237815) (xy 169.239489 132.183427) - (xy 169.284736 132.129505) (xy 169.286666 132.125993) (xy 169.28921 132.122897) (xy 169.322468 132.06087) (xy 169.356381 131.999184) - (xy 169.357592 131.995363) (xy 169.359486 131.991833) (xy 169.38006 131.924535) (xy 169.401348 131.857429) (xy 169.401794 131.853445) - (xy 169.402966 131.849615) (xy 169.410075 131.779627) (xy 169.417926 131.709639) (xy 169.41798 131.701802) (xy 169.417995 131.70166) - (xy 169.417982 131.701526) (xy 169.418 131.699) (xy 169.418 127.82363) (xy 170.464815 126.776816) (xy 170.50951 126.722402) - (xy 170.554736 126.668505) (xy 170.556666 126.664993) (xy 170.55921 126.661897) (xy 170.592468 126.59987) (xy 170.626381 126.538184) - (xy 170.627592 126.534363) (xy 170.629486 126.530833) (xy 170.65006 126.463535) (xy 170.671348 126.396429) (xy 170.671794 126.392445) - (xy 170.672966 126.388615) (xy 170.680075 126.318627) (xy 170.687926 126.248639) (xy 170.68798 126.240802) (xy 170.687995 126.24066) - (xy 170.687982 126.240526) (xy 170.688 126.238) (xy 170.688 118.491) (xy 170.681126 118.420894) (xy 170.674996 118.350829) - (xy 170.673879 118.346985) (xy 170.673488 118.342993) (xy 170.653126 118.275552) (xy 170.633506 118.208018) (xy 170.631662 118.204462) - (xy 170.630504 118.200624) (xy 170.597454 118.138467) (xy 170.565067 118.075985) (xy 170.562566 118.072852) (xy 170.560686 118.069316) - (xy 170.516216 118.014791) (xy 170.472286 117.95976) (xy 170.466784 117.954181) (xy 170.466693 117.954069) (xy 170.466589 117.953983) - (xy 170.464815 117.952184) (xy 169.866876 117.354245) (xy 169.866876 113.082467) (xy 169.866876 87.174467) (xy 169.826629 86.914893) - (xy 169.736514 86.668158) (xy 169.682812 86.567686) (xy 169.449197 86.508408) (xy 169.269592 86.688013) (xy 169.269592 86.328803) - (xy 169.210314 86.095188) (xy 168.972125 85.984441) (xy 168.716907 85.922289) (xy 168.454467 85.911124) (xy 168.194893 85.951371) - (xy 167.948158 86.041486) (xy 167.847686 86.095188) (xy 167.788408 86.328803) (xy 168.529 87.069395) (xy 169.269592 86.328803) - (xy 169.269592 86.688013) (xy 168.708605 87.249) (xy 169.449197 87.989592) (xy 169.682812 87.930314) (xy 169.793559 87.692125) - (xy 169.855711 87.436907) (xy 169.866876 87.174467) (xy 169.866876 113.082467) (xy 169.862557 113.054611) (xy 169.862557 107.946244) - (xy 169.862557 102.739244) (xy 169.862557 97.659244) (xy 169.862557 92.198244) (xy 169.811762 91.941711) (xy 169.712107 91.699931) - (xy 169.567388 91.482111) (xy 169.383118 91.296549) (xy 169.269592 91.219974) (xy 169.269592 88.169197) (xy 168.529 87.428605) - (xy 168.349395 87.60821) (xy 168.349395 87.249) (xy 167.608803 86.508408) (xy 167.375188 86.567686) (xy 167.264441 86.805875) - (xy 167.202289 87.061093) (xy 167.191124 87.323533) (xy 167.231371 87.583107) (xy 167.321486 87.829842) (xy 167.375188 87.930314) - (xy 167.608803 87.989592) (xy 168.349395 87.249) (xy 168.349395 87.60821) (xy 167.788408 88.169197) (xy 167.847686 88.402812) - (xy 168.085875 88.513559) (xy 168.341093 88.575711) (xy 168.603533 88.586876) (xy 168.863107 88.546629) (xy 169.109842 88.456514) - (xy 169.210314 88.402812) (xy 169.269592 88.169197) (xy 169.269592 91.219974) (xy 169.166314 91.150313) (xy 168.925235 91.048973) - (xy 168.669063 90.996388) (xy 168.407557 90.994563) (xy 168.150676 91.043565) (xy 167.908206 91.14153) (xy 167.689381 91.284725) - (xy 167.502537 91.467695) (xy 167.354791 91.683473) (xy 167.25177 91.923839) (xy 167.197399 92.179637) (xy 167.193747 92.441124) - (xy 167.240955 92.698341) (xy 167.337225 92.941489) (xy 167.478888 93.161308) (xy 167.66055 93.349425) (xy 167.875291 93.498674) - (xy 168.114932 93.60337) (xy 168.370344 93.659526) (xy 168.6318 93.665003) (xy 168.88934 93.619592) (xy 169.133154 93.525022) - (xy 169.353957 93.384897) (xy 169.543337 93.204552) (xy 169.694081 92.990858) (xy 169.800448 92.751955) (xy 169.858386 92.496941) - (xy 169.862557 92.198244) (xy 169.862557 97.659244) (xy 169.811762 97.402711) (xy 169.712107 97.160931) (xy 169.567388 96.943111) - (xy 169.383118 96.757549) (xy 169.166314 96.611313) (xy 168.925235 96.509973) (xy 168.669063 96.457388) (xy 168.407557 96.455563) - (xy 168.150676 96.504565) (xy 167.957546 96.582595) (xy 167.957546 95.65215) (xy 167.916426 95.444481) (xy 167.835754 95.248753) - (xy 167.7186 95.072423) (xy 167.569428 94.922207) (xy 167.393921 94.803825) (xy 167.198761 94.721788) (xy 166.991384 94.679219) - (xy 166.779689 94.677741) (xy 166.571738 94.71741) (xy 166.375452 94.796715) (xy 166.198308 94.912634) (xy 166.047054 95.060753) - (xy 165.92745 95.235431) (xy 165.844052 95.430012) (xy 165.800037 95.637087) (xy 165.798552 95.743428) (xy 165.798552 71.128697) - (xy 165.752595 70.896596) (xy 165.662431 70.677842) (xy 165.531495 70.480767) (xy 165.364773 70.312878) (xy 165.168617 70.180569) - (xy 164.950498 70.08888) (xy 164.718724 70.041303) (xy 164.482123 70.039651) (xy 164.249707 70.083987) (xy 164.030329 70.172622) - (xy 163.832344 70.302179) (xy 163.663295 70.467724) (xy 163.52962 70.662952) (xy 163.436411 70.880425) (xy 163.387217 71.111862) - (xy 163.383914 71.348446) (xy 163.426626 71.581166) (xy 163.513727 71.801157) (xy 163.641899 72.000041) (xy 163.80626 72.170242) - (xy 164.000549 72.305277) (xy 164.217367 72.400002) (xy 164.448454 72.45081) (xy 164.685009 72.455765) (xy 164.918022 72.414679) - (xy 165.138616 72.329116) (xy 165.33839 72.202335) (xy 165.509734 72.039167) (xy 165.646122 71.845824) (xy 165.742358 71.629673) - (xy 165.794778 71.398946) (xy 165.798552 71.128697) (xy 165.798552 95.743428) (xy 165.797081 95.848767) (xy 165.835297 96.05699) - (xy 165.91323 96.253825) (xy 166.02791 96.431773) (xy 166.174969 96.584058) (xy 166.348807 96.704879) (xy 166.542802 96.789633) - (xy 166.749564 96.835093) (xy 166.961219 96.839526) (xy 167.169704 96.802765) (xy 167.367077 96.726208) (xy 167.545822 96.612773) - (xy 167.69913 96.46678) (xy 167.821161 96.29379) (xy 167.907268 96.100392) (xy 167.95417 95.893952) (xy 167.957546 95.65215) - (xy 167.957546 96.582595) (xy 167.908206 96.60253) (xy 167.689381 96.745725) (xy 167.502537 96.928695) (xy 167.354791 97.144473) - (xy 167.25177 97.384839) (xy 167.197399 97.640637) (xy 167.193747 97.902124) (xy 167.240955 98.159341) (xy 167.337225 98.402489) - (xy 167.478888 98.622308) (xy 167.66055 98.810425) (xy 167.875291 98.959674) (xy 168.114932 99.06437) (xy 168.370344 99.120526) - (xy 168.6318 99.126003) (xy 168.88934 99.080592) (xy 169.133154 98.986022) (xy 169.353957 98.845897) (xy 169.543337 98.665552) - (xy 169.694081 98.451858) (xy 169.800448 98.212955) (xy 169.858386 97.957941) (xy 169.862557 97.659244) (xy 169.862557 102.739244) - (xy 169.811762 102.482711) (xy 169.712107 102.240931) (xy 169.567388 102.023111) (xy 169.383118 101.837549) (xy 169.166314 101.691313) - (xy 168.925235 101.589973) (xy 168.669063 101.537388) (xy 168.407557 101.535563) (xy 168.150676 101.584565) (xy 167.908206 101.68253) - (xy 167.689381 101.825725) (xy 167.502537 102.008695) (xy 167.354791 102.224473) (xy 167.25177 102.464839) (xy 167.197399 102.720637) - (xy 167.193747 102.982124) (xy 167.240955 103.239341) (xy 167.337225 103.482489) (xy 167.478888 103.702308) (xy 167.66055 103.890425) - (xy 167.875291 104.039674) (xy 168.114932 104.14437) (xy 168.370344 104.200526) (xy 168.6318 104.206003) (xy 168.88934 104.160592) - (xy 169.133154 104.066022) (xy 169.353957 103.925897) (xy 169.543337 103.745552) (xy 169.694081 103.531858) (xy 169.800448 103.292955) - (xy 169.858386 103.037941) (xy 169.862557 102.739244) (xy 169.862557 107.946244) (xy 169.811762 107.689711) (xy 169.712107 107.447931) - (xy 169.567388 107.230111) (xy 169.383118 107.044549) (xy 169.166314 106.898313) (xy 168.925235 106.796973) (xy 168.669063 106.744388) - (xy 168.407557 106.742563) (xy 168.150676 106.791565) (xy 167.908206 106.88953) (xy 167.830546 106.940349) (xy 167.830546 105.68515) - (xy 167.789426 105.477481) (xy 167.708754 105.281753) (xy 167.5916 105.105423) (xy 167.442428 104.955207) (xy 167.266921 104.836825) - (xy 167.071761 104.754788) (xy 166.864384 104.712219) (xy 166.652689 104.710741) (xy 166.444738 104.75041) (xy 166.248452 104.829715) - (xy 166.071308 104.945634) (xy 165.920054 105.093753) (xy 165.80045 105.268431) (xy 165.717052 105.463012) (xy 165.673037 105.670087) - (xy 165.670081 105.881767) (xy 165.708297 106.08999) (xy 165.78623 106.286825) (xy 165.90091 106.464773) (xy 166.047969 106.617058) - (xy 166.221807 106.737879) (xy 166.415802 106.822633) (xy 166.622564 106.868093) (xy 166.834219 106.872526) (xy 167.042704 106.835765) - (xy 167.240077 106.759208) (xy 167.418822 106.645773) (xy 167.57213 106.49978) (xy 167.694161 106.32679) (xy 167.780268 106.133392) - (xy 167.82717 105.926952) (xy 167.830546 105.68515) (xy 167.830546 106.940349) (xy 167.689381 107.032725) (xy 167.502537 107.215695) - (xy 167.354791 107.431473) (xy 167.25177 107.671839) (xy 167.197399 107.927637) (xy 167.193747 108.189124) (xy 167.240955 108.446341) - (xy 167.337225 108.689489) (xy 167.478888 108.909308) (xy 167.66055 109.097425) (xy 167.875291 109.246674) (xy 168.114932 109.35137) - (xy 168.370344 109.407526) (xy 168.6318 109.413003) (xy 168.88934 109.367592) (xy 169.133154 109.273022) (xy 169.353957 109.132897) - (xy 169.543337 108.952552) (xy 169.694081 108.738858) (xy 169.800448 108.499955) (xy 169.858386 108.244941) (xy 169.862557 107.946244) - (xy 169.862557 113.054611) (xy 169.826629 112.822893) (xy 169.736514 112.576158) (xy 169.682812 112.475686) (xy 169.449197 112.416408) - (xy 169.269592 112.596013) (xy 169.269592 112.236803) (xy 169.210314 112.003188) (xy 168.972125 111.892441) (xy 168.716907 111.830289) - (xy 168.454467 111.819124) (xy 168.194893 111.859371) (xy 167.948158 111.949486) (xy 167.847686 112.003188) (xy 167.788408 112.236803) - (xy 168.529 112.977395) (xy 169.269592 112.236803) (xy 169.269592 112.596013) (xy 168.708605 113.157) (xy 169.449197 113.897592) - (xy 169.682812 113.838314) (xy 169.793559 113.600125) (xy 169.855711 113.344907) (xy 169.866876 113.082467) (xy 169.866876 117.354245) - (xy 168.702823 116.190192) (xy 168.821616 116.144116) (xy 169.02139 116.017335) (xy 169.192734 115.854167) (xy 169.329122 115.660824) - (xy 169.425358 115.444673) (xy 169.477778 115.213946) (xy 169.481552 114.943697) (xy 169.435595 114.711596) (xy 169.345431 114.492842) - (xy 169.214495 114.295767) (xy 169.214205 114.295475) (xy 169.269592 114.077197) (xy 168.529 113.336605) (xy 168.514857 113.350747) - (xy 168.335252 113.171142) (xy 168.349395 113.157) (xy 167.608803 112.416408) (xy 167.375188 112.475686) (xy 167.264441 112.713875) - (xy 167.255744 112.749587) (xy 164.655552 110.149395) (xy 164.655552 100.211697) (xy 164.609595 99.979596) (xy 164.519431 99.760842) - (xy 164.401546 99.58341) (xy 164.401546 93.36615) (xy 164.360426 93.158481) (xy 164.279754 92.962753) (xy 164.1626 92.786423) - (xy 164.013428 92.636207) (xy 163.837921 92.517825) (xy 163.642761 92.435788) (xy 163.435384 92.393219) (xy 163.223689 92.391741) - (xy 163.015738 92.43141) (xy 162.819452 92.510715) (xy 162.642308 92.626634) (xy 162.56491 92.702427) (xy 162.56491 68.507983) - (xy 162.523922 68.235867) (xy 162.430636 67.976977) (xy 162.368656 67.86102) (xy 162.128565 67.79404) (xy 161.94896 67.973645) - (xy 161.94896 67.614435) (xy 161.88198 67.374344) (xy 161.632952 67.257244) (xy 161.365865 67.190977) (xy 161.163059 67.181469) - (xy 161.163059 65.903017) (xy 161.109846 65.634269) (xy 161.005446 65.380975) (xy 160.853835 65.152783) (xy 160.66079 64.958385) - (xy 160.433662 64.805185) (xy 160.181103 64.699019) (xy 159.912733 64.643931) (xy 159.638774 64.642018) (xy 159.369661 64.693354) - (xy 159.115644 64.795984) (xy 158.886399 64.945997) (xy 158.690658 65.137681) (xy 158.535877 65.363734) (xy 158.42795 65.615546) - (xy 158.370989 65.883524) (xy 158.369059 66.021747) (xy 158.369059 65.903017) (xy 158.315846 65.634269) (xy 158.211446 65.380975) - (xy 158.059835 65.152783) (xy 157.86679 64.958385) (xy 157.639662 64.805185) (xy 157.387103 64.699019) (xy 157.118733 64.643931) - (xy 156.844774 64.642018) (xy 156.575661 64.693354) (xy 156.321644 64.795984) (xy 156.092399 64.945997) (xy 155.896658 65.137681) - (xy 155.741877 65.363734) (xy 155.637609 65.607007) (xy 155.544446 65.380975) (xy 155.392835 65.152783) (xy 155.19979 64.958385) - (xy 154.972662 64.805185) (xy 154.720103 64.699019) (xy 154.451733 64.643931) (xy 154.177774 64.642018) (xy 153.908661 64.693354) - (xy 153.654644 64.795984) (xy 153.425399 64.945997) (xy 153.229658 65.137681) (xy 153.074877 65.363734) (xy 152.96695 65.615546) - (xy 152.909989 65.883524) (xy 152.906164 66.157464) (xy 152.95562 66.426928) (xy 153.056474 66.681655) (xy 153.204883 66.911942) - (xy 153.395196 67.109016) (xy 153.620163 67.265372) (xy 153.871215 67.375054) (xy 154.138789 67.433884) (xy 154.412695 67.439622) - (xy 154.682499 67.392048) (xy 154.937923 67.292975) (xy 155.16924 67.146177) (xy 155.367639 66.957245) (xy 155.525561 66.733375) - (xy 155.636993 66.483095) (xy 155.63986 66.470472) (xy 155.723474 66.681655) (xy 155.871883 66.911942) (xy 156.062196 67.109016) - (xy 156.287163 67.265372) (xy 156.538215 67.375054) (xy 156.805789 67.433884) (xy 157.079695 67.439622) (xy 157.349499 67.392048) - (xy 157.604923 67.292975) (xy 157.83624 67.146177) (xy 158.034639 66.957245) (xy 158.192561 66.733375) (xy 158.303993 66.483095) - (xy 158.36469 66.215938) (xy 158.369059 65.903017) (xy 158.369059 66.021747) (xy 158.367164 66.157464) (xy 158.41662 66.426928) - (xy 158.517474 66.681655) (xy 158.665883 66.911942) (xy 158.856196 67.109016) (xy 159.081163 67.265372) (xy 159.332215 67.375054) - (xy 159.599789 67.433884) (xy 159.873695 67.439622) (xy 160.143499 67.392048) (xy 160.398923 67.292975) (xy 160.63024 67.146177) - (xy 160.828639 66.957245) (xy 160.986561 66.733375) (xy 161.097993 66.483095) (xy 161.15869 66.215938) (xy 161.163059 65.903017) - (xy 161.163059 67.181469) (xy 161.090983 67.17809) (xy 160.818867 67.219078) (xy 160.559977 67.312364) (xy 160.44402 67.374344) - (xy 160.37704 67.614435) (xy 161.163 68.400395) (xy 161.94896 67.614435) (xy 161.94896 67.973645) (xy 161.342605 68.58) - (xy 162.128565 69.36596) (xy 162.368656 69.29898) (xy 162.485756 69.049952) (xy 162.552023 68.782865) (xy 162.56491 68.507983) - (xy 162.56491 92.702427) (xy 162.491054 92.774753) (xy 162.37145 92.949431) (xy 162.288052 93.144012) (xy 162.244037 93.351087) - (xy 162.241081 93.562767) (xy 162.279297 93.77099) (xy 162.35723 93.967825) (xy 162.47191 94.145773) (xy 162.618969 94.298058) - (xy 162.792807 94.418879) (xy 162.986802 94.503633) (xy 163.193564 94.549093) (xy 163.405219 94.553526) (xy 163.613704 94.516765) - (xy 163.811077 94.440208) (xy 163.989822 94.326773) (xy 164.14313 94.18078) (xy 164.265161 94.00779) (xy 164.351268 93.814392) - (xy 164.39817 93.607952) (xy 164.401546 93.36615) (xy 164.401546 99.58341) (xy 164.388495 99.563767) (xy 164.221773 99.395878) - (xy 164.025617 99.263569) (xy 163.807498 99.17188) (xy 163.575724 99.124303) (xy 163.339123 99.122651) (xy 163.106707 99.166987) - (xy 162.887329 99.255622) (xy 162.689344 99.385179) (xy 162.520295 99.550724) (xy 162.38662 99.745952) (xy 162.293411 99.963425) - (xy 162.244217 100.194862) (xy 162.240914 100.431446) (xy 162.283626 100.664166) (xy 162.370727 100.884157) (xy 162.498899 101.083041) - (xy 162.66326 101.253242) (xy 162.857549 101.388277) (xy 163.074367 101.483002) (xy 163.305454 101.53381) (xy 163.542009 101.538765) - (xy 163.775022 101.497679) (xy 163.995616 101.412116) (xy 164.19539 101.285335) (xy 164.366734 101.122167) (xy 164.503122 100.928824) - (xy 164.599358 100.712673) (xy 164.651778 100.481946) (xy 164.655552 100.211697) (xy 164.655552 110.149395) (xy 162.503497 107.997341) - (xy 162.632022 107.974679) (xy 162.852616 107.889116) (xy 163.05239 107.762335) (xy 163.223734 107.599167) (xy 163.360122 107.405824) - (xy 163.456358 107.189673) (xy 163.508778 106.958946) (xy 163.512552 106.688697) (xy 163.466595 106.456596) (xy 163.376431 106.237842) - (xy 163.245495 106.040767) (xy 163.078773 105.872878) (xy 162.882617 105.740569) (xy 162.664498 105.64888) (xy 162.432724 105.601303) - (xy 162.196123 105.599651) (xy 162.0774 105.622298) (xy 162.0774 93.124341) (xy 162.080734 93.121167) (xy 162.217122 92.927824) - (xy 162.313358 92.711673) (xy 162.365778 92.480946) (xy 162.369552 92.210697) (xy 162.323595 91.978596) (xy 162.233431 91.759842) - (xy 162.102495 91.562767) (xy 161.94896 91.408157) (xy 161.94896 69.545565) (xy 161.163 68.759605) (xy 160.983395 68.93921) - (xy 160.983395 68.58) (xy 160.197435 67.79404) (xy 159.957344 67.86102) (xy 159.840244 68.110048) (xy 159.773977 68.377135) - (xy 159.76401 68.589716) (xy 159.766059 68.443017) (xy 159.712846 68.174269) (xy 159.608446 67.920975) (xy 159.456835 67.692783) - (xy 159.26379 67.498385) (xy 159.036662 67.345185) (xy 158.784103 67.239019) (xy 158.515733 67.183931) (xy 158.241774 67.182018) - (xy 157.972661 67.233354) (xy 157.718644 67.335984) (xy 157.489399 67.485997) (xy 157.293658 67.677681) (xy 157.138877 67.903734) - (xy 157.03095 68.155546) (xy 156.973989 68.423524) (xy 156.972059 68.561747) (xy 156.972059 68.443017) (xy 156.918846 68.174269) - (xy 156.814446 67.920975) (xy 156.662835 67.692783) (xy 156.46979 67.498385) (xy 156.242662 67.345185) (xy 155.990103 67.239019) - (xy 155.721733 67.183931) (xy 155.447774 67.182018) (xy 155.178661 67.233354) (xy 154.924644 67.335984) (xy 154.695399 67.485997) - (xy 154.499658 67.677681) (xy 154.344877 67.903734) (xy 154.240609 68.147007) (xy 154.147446 67.920975) (xy 153.995835 67.692783) - (xy 153.80279 67.498385) (xy 153.575662 67.345185) (xy 153.323103 67.239019) (xy 153.054733 67.183931) (xy 152.780774 67.182018) - (xy 152.511661 67.233354) (xy 152.257644 67.335984) (xy 152.028399 67.485997) (xy 151.832658 67.677681) (xy 151.677877 67.903734) - (xy 151.56995 68.155546) (xy 151.512989 68.423524) (xy 151.511 68.565972) (xy 151.511 67.755458) (xy 151.486597 67.632777) - (xy 151.43873 67.517215) (xy 151.383593 67.434696) (xy 151.618695 67.439622) (xy 151.888499 67.392048) (xy 152.143923 67.292975) - (xy 152.37524 67.146177) (xy 152.573639 66.957245) (xy 152.731561 66.733375) (xy 152.842993 66.483095) (xy 152.90369 66.215938) - (xy 152.908059 65.903017) (xy 152.854846 65.634269) (xy 152.750446 65.380975) (xy 152.598835 65.152783) (xy 152.40579 64.958385) - (xy 152.178662 64.805185) (xy 151.926103 64.699019) (xy 151.657733 64.643931) (xy 151.383774 64.642018) (xy 151.114661 64.693354) - (xy 150.860644 64.795984) (xy 150.631399 64.945997) (xy 150.435658 65.137681) (xy 150.280877 65.363734) (xy 150.17295 65.615546) - (xy 150.115989 65.883524) (xy 150.112164 66.157464) (xy 150.16162 66.426928) (xy 150.262474 66.681655) (xy 150.410883 66.911942) - (xy 150.601196 67.109016) (xy 150.707645 67.183) (xy 149.289458 67.183) (xy 149.166777 67.207403) (xy 149.051215 67.25527) - (xy 148.947211 67.324763) (xy 148.858763 67.413211) (xy 148.78927 67.517215) (xy 148.741403 67.632777) (xy 148.717 67.755458) - (xy 148.717 67.880542) (xy 148.717 69.404542) (xy 148.741403 69.527223) (xy 148.78927 69.642785) (xy 148.858763 69.746789) - (xy 148.947211 69.835237) (xy 149.051215 69.90473) (xy 149.166777 69.952597) (xy 149.289458 69.977) (xy 149.414542 69.977) - (xy 150.938542 69.977) (xy 151.061223 69.952597) (xy 151.176785 69.90473) (xy 151.280789 69.835237) (xy 151.369237 69.746789) - (xy 151.43873 69.642785) (xy 151.486597 69.527223) (xy 151.511 69.404542) (xy 151.511 69.279458) (xy 151.511 68.707467) - (xy 151.55862 68.966928) (xy 151.659474 69.221655) (xy 151.807883 69.451942) (xy 151.998196 69.649016) (xy 152.223163 69.805372) - (xy 152.474215 69.915054) (xy 152.741789 69.973884) (xy 153.015695 69.979622) (xy 153.285499 69.932048) (xy 153.540923 69.832975) - (xy 153.77224 69.686177) (xy 153.970639 69.497245) (xy 154.128561 69.273375) (xy 154.239993 69.023095) (xy 154.24286 69.010472) - (xy 154.326474 69.221655) (xy 154.474883 69.451942) (xy 154.665196 69.649016) (xy 154.890163 69.805372) (xy 155.141215 69.915054) - (xy 155.408789 69.973884) (xy 155.682695 69.979622) (xy 155.952499 69.932048) (xy 156.207923 69.832975) (xy 156.43924 69.686177) - (xy 156.637639 69.497245) (xy 156.795561 69.273375) (xy 156.906993 69.023095) (xy 156.96769 68.755938) (xy 156.972059 68.443017) - (xy 156.972059 68.561747) (xy 156.970164 68.697464) (xy 157.01962 68.966928) (xy 157.120474 69.221655) (xy 157.268883 69.451942) - (xy 157.459196 69.649016) (xy 157.684163 69.805372) (xy 157.935215 69.915054) (xy 158.202789 69.973884) (xy 158.476695 69.979622) - (xy 158.746499 69.932048) (xy 159.001923 69.832975) (xy 159.23324 69.686177) (xy 159.431639 69.497245) (xy 159.589561 69.273375) - (xy 159.700993 69.023095) (xy 159.76169 68.755938) (xy 159.762966 68.664478) (xy 159.802078 68.924133) (xy 159.895364 69.183023) - (xy 159.957344 69.29898) (xy 160.197435 69.36596) (xy 160.983395 68.58) (xy 160.983395 68.93921) (xy 160.37704 69.545565) - (xy 160.44402 69.785656) (xy 160.693048 69.902756) (xy 160.960135 69.969023) (xy 161.235017 69.98191) (xy 161.507133 69.940922) - (xy 161.766023 69.847636) (xy 161.88198 69.785656) (xy 161.94896 69.545565) (xy 161.94896 91.408157) (xy 161.935773 91.394878) - (xy 161.739617 91.262569) (xy 161.521498 91.17088) (xy 161.289724 91.123303) (xy 161.053123 91.121651) (xy 161.036 91.124917) - (xy 161.036 89.916) (xy 161.029125 89.84589) (xy 161.022996 89.775829) (xy 161.021879 89.771985) (xy 161.021488 89.767993) - (xy 161.001126 89.700552) (xy 160.981506 89.633018) (xy 160.979662 89.629462) (xy 160.978504 89.625624) (xy 160.945454 89.563467) - (xy 160.913067 89.500985) (xy 160.910566 89.497852) (xy 160.908686 89.494316) (xy 160.864216 89.439791) (xy 160.820286 89.38476) - (xy 160.814784 89.379181) (xy 160.814693 89.379069) (xy 160.814589 89.378983) (xy 160.812815 89.377184) (xy 159.766 88.330369) - (xy 159.766 87.884) (xy 159.759125 87.81389) (xy 159.752996 87.743829) (xy 159.751879 87.739985) (xy 159.751488 87.735993) - (xy 159.731126 87.668552) (xy 159.711506 87.601018) (xy 159.709662 87.597462) (xy 159.708504 87.593624) (xy 159.675454 87.531467) - (xy 159.643067 87.468985) (xy 159.640566 87.465852) (xy 159.638686 87.462316) (xy 159.594216 87.407791) (xy 159.550286 87.35276) - (xy 159.544784 87.347181) (xy 159.544693 87.347069) (xy 159.544589 87.346983) (xy 159.542815 87.345184) (xy 159.194541 86.99691) - (xy 159.194541 74.582603) (xy 159.194541 71.153603) (xy 159.158259 70.970365) (xy 159.087077 70.797665) (xy 158.983706 70.642079) - (xy 158.852084 70.509535) (xy 158.697224 70.40508) (xy 158.525025 70.332694) (xy 158.342045 70.295134) (xy 158.155255 70.29383) - (xy 157.971768 70.328832) (xy 157.798575 70.398807) (xy 157.642272 70.501089) (xy 157.508812 70.631782) (xy 157.403279 70.785909) - (xy 157.329693 70.957599) (xy 157.290856 71.140312) (xy 157.288248 71.327089) (xy 157.321968 71.510815) (xy 157.390732 71.684493) - (xy 157.49192 71.841506) (xy 157.621679 71.975875) (xy 157.775065 72.082482) (xy 157.946237 72.157265) (xy 158.128674 72.197376) - (xy 158.315428 72.201288) (xy 158.499386 72.168852) (xy 158.673539 72.101302) (xy 158.831255 72.001212) (xy 158.966527 71.872395) - (xy 159.074201 71.719756) (xy 159.150178 71.549111) (xy 159.191562 71.366958) (xy 159.194541 71.153603) (xy 159.194541 74.582603) - (xy 159.158259 74.399365) (xy 159.087077 74.226665) (xy 158.983706 74.071079) (xy 158.852084 73.938535) (xy 158.697224 73.83408) - (xy 158.525025 73.761694) (xy 158.342045 73.724134) (xy 158.155255 73.72283) (xy 157.971768 73.757832) (xy 157.798575 73.827807) - (xy 157.642272 73.930089) (xy 157.508812 74.060782) (xy 157.403279 74.214909) (xy 157.329693 74.386599) (xy 157.290856 74.569312) - (xy 157.288248 74.756089) (xy 157.321968 74.939815) (xy 157.390732 75.113493) (xy 157.49192 75.270506) (xy 157.621679 75.404875) - (xy 157.775065 75.511482) (xy 157.946237 75.586265) (xy 158.128674 75.626376) (xy 158.315428 75.630288) (xy 158.499386 75.597852) - (xy 158.673539 75.530302) (xy 158.831255 75.430212) (xy 158.966527 75.301395) (xy 159.074201 75.148756) (xy 159.150178 74.978111) - (xy 159.191562 74.795958) (xy 159.194541 74.582603) (xy 159.194541 86.99691) (xy 158.272815 86.075185) (xy 158.2184 86.030487) - (xy 158.164505 85.985264) (xy 158.160997 85.983335) (xy 158.157897 85.980789) (xy 158.095831 85.94751) (xy 158.034184 85.913619) - (xy 158.030363 85.912407) (xy 158.026833 85.910514) (xy 157.959535 85.889939) (xy 157.892429 85.868652) (xy 157.888445 85.868205) - (xy 157.884615 85.867034) (xy 157.814627 85.859924) (xy 157.744639 85.852074) (xy 157.736802 85.852019) (xy 157.73666 85.852005) - (xy 157.736526 85.852017) (xy 157.734 85.852) (xy 155.194 85.852) (xy 155.123894 85.858873) (xy 155.053829 85.865004) - (xy 155.049985 85.86612) (xy 155.045993 85.866512) (xy 154.978552 85.886873) (xy 154.911018 85.906494) (xy 154.907462 85.908337) - (xy 154.903624 85.909496) (xy 154.841467 85.942545) (xy 154.778985 85.974933) (xy 154.775852 85.977433) (xy 154.772316 85.979314) - (xy 154.717791 86.023783) (xy 154.66276 86.067714) (xy 154.657181 86.073215) (xy 154.657069 86.073307) (xy 154.656983 86.07341) - (xy 154.655184 86.075185) (xy 154.274185 86.456185) (xy 154.229487 86.510599) (xy 154.184264 86.564495) (xy 154.182335 86.568002) - (xy 154.179789 86.571103) (xy 154.14651 86.633168) (xy 154.112619 86.694816) (xy 154.111407 86.698636) (xy 154.109514 86.702167) - (xy 154.088939 86.769464) (xy 154.067652 86.836571) (xy 154.067205 86.840554) (xy 154.066034 86.844385) (xy 154.058924 86.914372) - (xy 154.051074 86.984361) (xy 154.051019 86.992197) (xy 154.051017 86.992219) (xy 153.982054 87.059753) (xy 153.86245 87.234431) - (xy 153.779052 87.429012) (xy 153.747504 87.577431) (xy 153.726428 87.556207) (xy 153.550921 87.437825) (xy 153.479546 87.407821) - (xy 153.479546 84.73015) (xy 153.438426 84.522481) (xy 153.357754 84.326753) (xy 153.2406 84.150423) (xy 153.091428 84.000207) - (xy 152.915921 83.881825) (xy 152.720761 83.799788) (xy 152.576492 83.770173) (xy 152.549426 83.633481) (xy 152.468754 83.437753) - (xy 152.3516 83.261423) (xy 152.202428 83.111207) (xy 152.026921 82.992825) (xy 151.831761 82.910788) (xy 151.624384 82.868219) - (xy 151.412689 82.866741) (xy 151.204738 82.90641) (xy 151.008452 82.985715) (xy 150.831308 83.101634) (xy 150.680054 83.249753) - (xy 150.580769 83.394754) (xy 150.551428 83.365207) (xy 150.375921 83.246825) (xy 150.180761 83.164788) (xy 149.973384 83.122219) - (xy 149.761689 83.120741) (xy 149.553738 83.16041) (xy 149.357452 83.239715) (xy 149.180308 83.355634) (xy 149.029054 83.503753) - (xy 148.90945 83.678431) (xy 148.875924 83.75665) (xy 148.745689 83.755741) (xy 148.537738 83.79541) (xy 148.341452 83.874715) - (xy 148.164308 83.990634) (xy 148.013054 84.138753) (xy 147.89345 84.313431) (xy 147.810052 84.508012) (xy 147.766037 84.715087) - (xy 147.763081 84.926767) (xy 147.801297 85.13499) (xy 147.87923 85.331825) (xy 147.99391 85.509773) (xy 148.140969 85.662058) - (xy 148.314807 85.782879) (xy 148.508802 85.867633) (xy 148.715564 85.913093) (xy 148.927219 85.917526) (xy 149.135704 85.880765) - (xy 149.333077 85.804208) (xy 149.511822 85.690773) (xy 149.66513 85.54478) (xy 149.787161 85.37179) (xy 149.827978 85.280112) - (xy 149.943219 85.282526) (xy 150.151704 85.245765) (xy 150.349077 85.169208) (xy 150.527822 85.055773) (xy 150.68113 84.90978) - (xy 150.790406 84.754871) (xy 150.807969 84.773058) (xy 150.981807 84.893879) (xy 151.175802 84.978633) (xy 151.335025 85.01364) - (xy 151.357297 85.13499) (xy 151.43523 85.331825) (xy 151.54991 85.509773) (xy 151.696969 85.662058) (xy 151.870807 85.782879) - (xy 152.064802 85.867633) (xy 152.271564 85.913093) (xy 152.483219 85.917526) (xy 152.691704 85.880765) (xy 152.889077 85.804208) - (xy 153.067822 85.690773) (xy 153.22113 85.54478) (xy 153.343161 85.37179) (xy 153.429268 85.178392) (xy 153.47617 84.971952) - (xy 153.479546 84.73015) (xy 153.479546 87.407821) (xy 153.355761 87.355788) (xy 153.148384 87.313219) (xy 152.936689 87.311741) - (xy 152.728738 87.35141) (xy 152.532452 87.430715) (xy 152.355308 87.546634) (xy 152.204054 87.694753) (xy 152.08445 87.869431) - (xy 152.001052 88.064012) (xy 151.957037 88.271087) (xy 151.954081 88.482767) (xy 151.990875 88.683245) (xy 151.668815 88.361185) - (xy 151.6144 88.316487) (xy 151.560505 88.271264) (xy 151.556997 88.269335) (xy 151.553897 88.266789) (xy 151.491831 88.23351) - (xy 151.465757 88.219176) (xy 151.4626 88.214423) (xy 151.313428 88.064207) (xy 151.137921 87.945825) (xy 150.942761 87.863788) - (xy 150.735384 87.821219) (xy 150.523689 87.819741) (xy 150.315738 87.85941) (xy 150.119452 87.938715) (xy 149.942308 88.054634) - (xy 149.791054 88.202753) (xy 149.67145 88.377431) (xy 149.588052 88.572012) (xy 149.544037 88.779087) (xy 149.541081 88.990767) - (xy 149.579297 89.19899) (xy 149.65723 89.395825) (xy 149.77191 89.573773) (xy 149.918969 89.726058) (xy 150.092807 89.846879) - (xy 150.286802 89.931633) (xy 150.493564 89.977093) (xy 150.705219 89.981526) (xy 150.913704 89.944765) (xy 151.04587 89.8935) - (xy 152.908 91.75563) (xy 152.908 91.764509) (xy 152.764768 91.791832) (xy 152.591575 91.861807) (xy 152.435272 91.964089) - (xy 152.301812 92.094782) (xy 152.196279 92.248909) (xy 152.122693 92.420599) (xy 152.083856 92.603312) (xy 152.081248 92.790089) - (xy 152.114968 92.973815) (xy 152.183732 93.147493) (xy 152.28492 93.304506) (xy 152.414679 93.438875) (xy 152.568065 93.545482) - (xy 152.739237 93.620265) (xy 152.90382 93.65645) (xy 153.924 94.67663) (xy 153.924 130.748369) (xy 153.225552 131.446817) - (xy 153.225552 102.370697) (xy 153.179595 102.138596) (xy 153.089431 101.919842) (xy 152.958495 101.722767) (xy 152.791773 101.554878) - (xy 152.595617 101.422569) (xy 152.377498 101.33088) (xy 152.145724 101.283303) (xy 151.909123 101.281651) (xy 151.676707 101.325987) - (xy 151.457329 101.414622) (xy 151.259344 101.544179) (xy 151.090295 101.709724) (xy 150.95662 101.904952) (xy 150.863411 102.122425) - (xy 150.814217 102.353862) (xy 150.810914 102.590446) (xy 150.853626 102.823166) (xy 150.940727 103.043157) (xy 151.068899 103.242041) - (xy 151.23326 103.412242) (xy 151.427549 103.547277) (xy 151.644367 103.642002) (xy 151.875454 103.69281) (xy 152.112009 103.697765) - (xy 152.345022 103.656679) (xy 152.565616 103.571116) (xy 152.76539 103.444335) (xy 152.936734 103.281167) (xy 153.073122 103.087824) - (xy 153.169358 102.871673) (xy 153.221778 102.640946) (xy 153.225552 102.370697) (xy 153.225552 131.446817) (xy 149.133195 135.539174) - (xy 148.990733 135.509931) (xy 148.716774 135.508018) (xy 148.447661 135.559354) (xy 148.193644 135.661984) (xy 147.964399 135.811997) - (xy 147.768658 136.003681) (xy 147.613877 136.229734) (xy 147.57435 136.321955) (xy 147.543446 136.246975) (xy 147.391835 136.018783) - (xy 147.19879 135.824385) (xy 147.066 135.734816) (xy 147.066 135.509) (xy 147.059121 135.438849) (xy 147.052996 135.368829) - (xy 147.051879 135.364985) (xy 147.051488 135.360993) (xy 147.031126 135.293552) (xy 147.011506 135.226018) (xy 147.009662 135.222462) - (xy 147.008504 135.218624) (xy 146.975433 135.156427) (xy 146.943066 135.093985) (xy 146.940568 135.090856) (xy 146.938686 135.087316) - (xy 146.894194 135.032763) (xy 146.850286 134.97776) (xy 146.844784 134.972181) (xy 146.844693 134.972069) (xy 146.844589 134.971983) - (xy 146.842815 134.970184) (xy 146.558 134.685369) (xy 146.558 117.28263) (xy 148.435803 115.404826) (xy 148.491982 115.388506) - (xy 148.495537 115.386662) (xy 148.499376 115.385504) (xy 148.561553 115.352443) (xy 148.624014 115.320067) (xy 148.627144 115.317568) - (xy 148.630684 115.315686) (xy 148.68523 115.271199) (xy 148.74024 115.227286) (xy 148.745814 115.221787) (xy 148.745931 115.221693) - (xy 148.74602 115.221585) (xy 148.747815 115.219815) (xy 150.271815 113.695816) (xy 150.31651 113.641402) (xy 150.361736 113.587505) - (xy 150.363666 113.583993) (xy 150.36621 113.580897) (xy 150.399468 113.51887) (xy 150.433381 113.457184) (xy 150.434592 113.453363) - (xy 150.436486 113.449833) (xy 150.45706 113.382535) (xy 150.478348 113.315429) (xy 150.478794 113.311445) (xy 150.479966 113.307615) - (xy 150.487075 113.237627) (xy 150.494926 113.167639) (xy 150.49498 113.159802) (xy 150.494995 113.15966) (xy 150.494982 113.159526) - (xy 150.495 113.157) (xy 150.495 101.40763) (xy 151.795815 100.106816) (xy 151.84051 100.052402) (xy 151.885736 99.998505) - (xy 151.887666 99.994993) (xy 151.89021 99.991897) (xy 151.923468 99.92987) (xy 151.957381 99.868184) (xy 151.958592 99.864363) - (xy 151.960486 99.860833) (xy 151.98106 99.793535) (xy 152.002348 99.726429) (xy 152.002794 99.722445) (xy 152.003966 99.718615) - (xy 152.011075 99.648627) (xy 152.018926 99.578639) (xy 152.01898 99.570802) (xy 152.018995 99.57066) (xy 152.018982 99.570526) - (xy 152.019 99.568) (xy 152.019 94.869) (xy 152.012126 94.798894) (xy 152.005996 94.728829) (xy 152.004879 94.724985) - (xy 152.004488 94.720993) (xy 151.984126 94.653552) (xy 151.964506 94.586018) (xy 151.962662 94.582462) (xy 151.961504 94.578624) - (xy 151.928454 94.516467) (xy 151.896067 94.453985) (xy 151.893566 94.450852) (xy 151.891686 94.447316) (xy 151.847216 94.392791) - (xy 151.803286 94.33776) (xy 151.797784 94.332181) (xy 151.797693 94.332069) (xy 151.797589 94.331983) (xy 151.795815 94.330184) - (xy 151.414815 93.949185) (xy 151.3604 93.904487) (xy 151.306505 93.859264) (xy 151.302997 93.857335) (xy 151.299897 93.854789) - (xy 151.237831 93.82151) (xy 151.176184 93.787619) (xy 151.172363 93.786407) (xy 151.168833 93.784514) (xy 151.101535 93.763939) - (xy 151.034429 93.742652) (xy 151.030445 93.742205) (xy 151.026615 93.741034) (xy 150.956627 93.733924) (xy 150.886639 93.726074) - (xy 150.878802 93.726019) (xy 150.87866 93.726005) (xy 150.878526 93.726017) (xy 150.876 93.726) (xy 149.098 93.726) - (xy 149.027894 93.732873) (xy 148.957829 93.739004) (xy 148.953985 93.74012) (xy 148.949993 93.740512) (xy 148.882552 93.760873) - (xy 148.815018 93.780494) (xy 148.811462 93.782337) (xy 148.807624 93.783496) (xy 148.745467 93.816545) (xy 148.682985 93.848933) - (xy 148.679852 93.851433) (xy 148.676316 93.853314) (xy 148.621791 93.897783) (xy 148.56676 93.941714) (xy 148.561181 93.947215) - (xy 148.561069 93.947307) (xy 148.560983 93.94741) (xy 148.559184 93.949185) (xy 148.178185 94.330185) (xy 148.168916 94.341468) - (xy 148.019575 94.401807) (xy 148.017512 94.403156) (xy 147.857025 94.335694) (xy 147.674045 94.298134) (xy 147.487255 94.29683) - (xy 147.303768 94.331832) (xy 147.256552 94.350908) (xy 147.256552 74.557697) (xy 147.210595 74.325596) (xy 147.120431 74.106842) - (xy 146.989495 73.909767) (xy 146.822773 73.741878) (xy 146.626617 73.609569) (xy 146.408498 73.51788) (xy 146.176724 73.470303) - (xy 145.940123 73.468651) (xy 145.707707 73.512987) (xy 145.542109 73.579893) (xy 145.542109 65.79094) (xy 145.445357 65.302307) - (xy 145.255538 64.841772) (xy 144.979883 64.426878) (xy 144.628891 64.073427) (xy 144.215931 63.794882) (xy 143.756733 63.601853) - (xy 143.268787 63.501692) (xy 142.770679 63.498214) (xy 142.281383 63.591553) (xy 141.819534 63.778151) (xy 141.402725 64.050904) - (xy 141.046832 64.39942) (xy 140.765411 64.810425) (xy 140.569181 65.268264) (xy 140.465616 65.755499) (xy 140.458661 66.25357) - (xy 140.548581 66.743506) (xy 140.731951 67.206646) (xy 141.001787 67.625349) (xy 141.34781 67.983667) (xy 141.756841 68.26795) - (xy 142.213299 68.467372) (xy 142.699799 68.574336) (xy 143.197809 68.584768) (xy 143.688361 68.49827) (xy 144.15277 68.318138) - (xy 144.573347 68.051232) (xy 144.934071 67.707719) (xy 145.221203 67.300683) (xy 145.423807 66.845628) (xy 145.534164 66.359887) - (xy 145.542109 65.79094) (xy 145.542109 73.579893) (xy 145.488329 73.601622) (xy 145.290344 73.731179) (xy 145.121295 73.896724) - (xy 144.98762 74.091952) (xy 144.894411 74.309425) (xy 144.845217 74.540862) (xy 144.841914 74.777446) (xy 144.884626 75.010166) - (xy 144.971727 75.230157) (xy 145.099899 75.429041) (xy 145.26426 75.599242) (xy 145.458549 75.734277) (xy 145.675367 75.829002) - (xy 145.906454 75.87981) (xy 146.143009 75.884765) (xy 146.376022 75.843679) (xy 146.596616 75.758116) (xy 146.79639 75.631335) - (xy 146.967734 75.468167) (xy 147.104122 75.274824) (xy 147.200358 75.058673) (xy 147.252778 74.827946) (xy 147.256552 74.557697) - (xy 147.256552 94.350908) (xy 147.130575 94.401807) (xy 146.974272 94.504089) (xy 146.840812 94.634782) (xy 146.735279 94.788909) - (xy 146.661693 94.960599) (xy 146.622856 95.143312) (xy 146.620248 95.330089) (xy 146.653968 95.513815) (xy 146.722732 95.687493) - (xy 146.82392 95.844506) (xy 146.953679 95.978875) (xy 147.107065 96.085482) (xy 147.278237 96.160265) (xy 147.460674 96.200376) - (xy 147.647428 96.204288) (xy 147.831386 96.171852) (xy 148.005539 96.104302) (xy 148.01924 96.095606) (xy 148.167237 96.160265) - (xy 148.237627 96.175741) (xy 147.162185 97.251185) (xy 147.117487 97.305599) (xy 147.072264 97.359495) (xy 147.070335 97.363002) - (xy 147.067789 97.366103) (xy 147.03451 97.428168) (xy 147.002499 97.486394) (xy 146.938724 97.473303) (xy 146.702123 97.471651) - (xy 146.469707 97.515987) (xy 146.250329 97.604622) (xy 146.052344 97.734179) (xy 145.883295 97.899724) (xy 145.74962 98.094952) - (xy 145.656411 98.312425) (xy 145.607217 98.543862) (xy 145.603914 98.780446) (xy 145.646626 99.013166) (xy 145.733727 99.233157) - (xy 145.861899 99.432041) (xy 146.02626 99.602242) (xy 146.220549 99.737277) (xy 146.437367 99.832002) (xy 146.668454 99.88281) - (xy 146.905009 99.887765) (xy 146.939 99.881771) (xy 146.939 104.204359) (xy 146.938724 104.204303) (xy 146.702123 104.202651) - (xy 146.469707 104.246987) (xy 146.250329 104.335622) (xy 146.052344 104.465179) (xy 145.883295 104.630724) (xy 145.74962 104.825952) - (xy 145.656411 105.043425) (xy 145.607217 105.274862) (xy 145.603914 105.511446) (xy 145.646626 105.744166) (xy 145.733727 105.964157) - (xy 145.738492 105.971551) (xy 145.727054 105.982753) (xy 145.60745 106.157431) (xy 145.524052 106.352012) (xy 145.480037 106.559087) - (xy 145.477081 106.770767) (xy 145.515297 106.97899) (xy 145.59323 107.175825) (xy 145.683654 107.316136) (xy 145.60745 107.427431) - (xy 145.524052 107.622012) (xy 145.480037 107.829087) (xy 145.477081 108.040767) (xy 145.515297 108.24899) (xy 145.59323 108.445825) - (xy 145.70791 108.623773) (xy 145.854969 108.776058) (xy 146.028807 108.896879) (xy 146.11804 108.935864) (xy 146.005308 109.009634) - (xy 145.854054 109.157753) (xy 145.73445 109.332431) (xy 145.651052 109.527012) (xy 145.607037 109.734087) (xy 145.604081 109.945767) - (xy 145.642297 110.15399) (xy 145.72023 110.350825) (xy 145.83491 110.528773) (xy 145.981969 110.681058) (xy 146.155807 110.801879) - (xy 146.349802 110.886633) (xy 146.556564 110.932093) (xy 146.768219 110.936526) (xy 146.939 110.906413) (xy 146.939 111.698369) - (xy 146.750369 111.887) (xy 146.685 111.887) (xy 146.614936 111.893869) (xy 146.54483 111.900003) (xy 146.540982 111.90112) - (xy 146.536993 111.901512) (xy 146.469581 111.921864) (xy 146.402018 111.941494) (xy 146.398462 111.943337) (xy 146.394624 111.944496) - (xy 146.332446 111.977556) (xy 146.269986 112.009933) (xy 146.266855 112.012431) (xy 146.263316 112.014314) (xy 146.208769 112.0588) - (xy 146.15376 112.102714) (xy 146.148185 112.108212) (xy 146.148069 112.108307) (xy 146.147979 112.108414) (xy 146.146185 112.110185) - (xy 144.335552 113.920818) (xy 144.335552 93.734697) (xy 144.289595 93.502596) (xy 144.199431 93.283842) (xy 144.068495 93.086767) - (xy 143.901773 92.918878) (xy 143.705617 92.786569) (xy 143.487498 92.69488) (xy 143.255724 92.647303) (xy 143.019123 92.645651) - (xy 142.786707 92.689987) (xy 142.567329 92.778622) (xy 142.369344 92.908179) (xy 142.200295 93.073724) (xy 142.06662 93.268952) - (xy 141.973411 93.486425) (xy 141.924217 93.717862) (xy 141.920914 93.954446) (xy 141.963626 94.187166) (xy 142.050727 94.407157) - (xy 142.178899 94.606041) (xy 142.34326 94.776242) (xy 142.537549 94.911277) (xy 142.754367 95.006002) (xy 142.985454 95.05681) - (xy 143.222009 95.061765) (xy 143.455022 95.020679) (xy 143.675616 94.935116) (xy 143.87539 94.808335) (xy 144.046734 94.645167) - (xy 144.183122 94.451824) (xy 144.279358 94.235673) (xy 144.331778 94.004946) (xy 144.335552 93.734697) (xy 144.335552 113.920818) - (xy 143.225185 115.031185) (xy 143.180487 115.085599) (xy 143.135264 115.139495) (xy 143.133335 115.143002) (xy 143.130789 115.146103) - (xy 143.09751 115.208168) (xy 143.063619 115.269816) (xy 143.062407 115.273636) (xy 143.060514 115.277167) (xy 143.039939 115.344464) - (xy 143.038998 115.347431) (xy 142.904025 115.290694) (xy 142.721045 115.253134) (xy 142.684546 115.252879) (xy 142.684546 96.16015) - (xy 142.643426 95.952481) (xy 142.562754 95.756753) (xy 142.4456 95.580423) (xy 142.296428 95.430207) (xy 142.120921 95.311825) - (xy 141.925761 95.229788) (xy 141.718384 95.187219) (xy 141.506689 95.185741) (xy 141.298738 95.22541) (xy 141.287546 95.229931) - (xy 141.287546 82.06315) (xy 141.246426 81.855481) (xy 141.165754 81.659753) (xy 141.0486 81.483423) (xy 140.899428 81.333207) - (xy 140.723921 81.214825) (xy 140.528761 81.132788) (xy 140.321384 81.090219) (xy 140.109689 81.088741) (xy 139.901738 81.12841) - (xy 139.705452 81.207715) (xy 139.528308 81.323634) (xy 139.461868 81.388696) (xy 139.390835 81.281783) (xy 139.19779 81.087385) - (xy 138.970662 80.934185) (xy 138.889393 80.900022) (xy 138.935923 80.881975) (xy 139.16724 80.735177) (xy 139.365639 80.546245) - (xy 139.523561 80.322375) (xy 139.634993 80.072095) (xy 139.69569 79.804938) (xy 139.700059 79.492017) (xy 139.646846 79.223269) - (xy 139.542446 78.969975) (xy 139.390835 78.741783) (xy 139.19779 78.547385) (xy 138.970662 78.394185) (xy 138.889393 78.360022) - (xy 138.935923 78.341975) (xy 139.16724 78.195177) (xy 139.365639 78.006245) (xy 139.523561 77.782375) (xy 139.634993 77.532095) - (xy 139.69569 77.264938) (xy 139.700059 76.952017) (xy 139.646846 76.683269) (xy 139.542446 76.429975) (xy 139.390835 76.201783) - (xy 139.19779 76.007385) (xy 138.970662 75.854185) (xy 138.889393 75.820022) (xy 138.935923 75.801975) (xy 139.16724 75.655177) - (xy 139.365639 75.466245) (xy 139.523561 75.242375) (xy 139.634993 74.992095) (xy 139.69569 74.724938) (xy 139.700059 74.412017) - (xy 139.646846 74.143269) (xy 139.542446 73.889975) (xy 139.390835 73.661783) (xy 139.19779 73.467385) (xy 138.970662 73.314185) - (xy 138.718103 73.208019) (xy 138.449733 73.152931) (xy 138.175774 73.151018) (xy 137.906661 73.202354) (xy 137.652644 73.304984) - (xy 137.423399 73.454997) (xy 137.414109 73.464094) (xy 137.414109 65.79094) (xy 137.317357 65.302307) (xy 137.127538 64.841772) - (xy 136.851883 64.426878) (xy 136.500891 64.073427) (xy 136.087931 63.794882) (xy 135.628733 63.601853) (xy 135.140787 63.501692) - (xy 134.642679 63.498214) (xy 134.153383 63.591553) (xy 133.691534 63.778151) (xy 133.274725 64.050904) (xy 132.918832 64.39942) - (xy 132.637411 64.810425) (xy 132.441181 65.268264) (xy 132.337616 65.755499) (xy 132.330661 66.25357) (xy 132.420581 66.743506) - (xy 132.603951 67.206646) (xy 132.873787 67.625349) (xy 133.21981 67.983667) (xy 133.628841 68.26795) (xy 134.085299 68.467372) - (xy 134.571799 68.574336) (xy 135.069809 68.584768) (xy 135.560361 68.49827) (xy 136.02477 68.318138) (xy 136.445347 68.051232) - (xy 136.806071 67.707719) (xy 137.093203 67.300683) (xy 137.295807 66.845628) (xy 137.406164 66.359887) (xy 137.414109 65.79094) - (xy 137.414109 73.464094) (xy 137.227658 73.646681) (xy 137.16 73.745493) (xy 137.16 73.724458) (xy 137.135597 73.601777) - (xy 137.08773 73.486215) (xy 137.018237 73.382211) (xy 136.929789 73.293763) (xy 136.825785 73.22427) (xy 136.710223 73.176403) - (xy 136.587542 73.152) (xy 136.462458 73.152) (xy 134.938458 73.152) (xy 134.815777 73.176403) (xy 134.700215 73.22427) - (xy 134.596211 73.293763) (xy 134.507763 73.382211) (xy 134.43827 73.486215) (xy 134.390403 73.601777) (xy 134.366 73.724458) - (xy 134.366 73.849542) (xy 134.366 75.373542) (xy 134.390403 75.496223) (xy 134.43827 75.611785) (xy 134.507763 75.715789) - (xy 134.596211 75.804237) (xy 134.700215 75.87373) (xy 134.815777 75.921597) (xy 134.938458 75.946) (xy 134.958274 75.946) - (xy 134.883399 75.994997) (xy 134.687658 76.186681) (xy 134.532877 76.412734) (xy 134.42495 76.664546) (xy 134.367989 76.932524) - (xy 134.364164 77.206464) (xy 134.41362 77.475928) (xy 134.514474 77.730655) (xy 134.662883 77.960942) (xy 134.853196 78.158016) - (xy 135.078163 78.314372) (xy 135.178699 78.358295) (xy 135.112644 78.384984) (xy 134.883399 78.534997) (xy 134.687658 78.726681) - (xy 134.532877 78.952734) (xy 134.42495 79.204546) (xy 134.367989 79.472524) (xy 134.364164 79.746464) (xy 134.41362 80.015928) - (xy 134.514474 80.270655) (xy 134.662883 80.500942) (xy 134.853196 80.698016) (xy 135.078163 80.854372) (xy 135.178699 80.898295) - (xy 135.112644 80.924984) (xy 134.883399 81.074997) (xy 134.687658 81.266681) (xy 134.539201 81.483497) (xy 134.479384 81.471219) - (xy 134.267689 81.469741) (xy 134.059738 81.50941) (xy 133.863452 81.588715) (xy 133.686308 81.704634) (xy 133.535054 81.852753) - (xy 133.41545 82.027431) (xy 133.332052 82.222012) (xy 133.288037 82.429087) (xy 133.285081 82.640767) (xy 133.323297 82.84899) - (xy 133.40123 83.045825) (xy 133.51591 83.223773) (xy 133.662969 83.376058) (xy 133.836807 83.496879) (xy 134.030802 83.581633) - (xy 134.237564 83.627093) (xy 134.449219 83.631526) (xy 134.657704 83.594765) (xy 134.855077 83.518208) (xy 135.033822 83.404773) - (xy 135.058843 83.380944) (xy 135.078163 83.394372) (xy 135.329215 83.504054) (xy 135.596789 83.562884) (xy 135.870695 83.568622) - (xy 136.140499 83.521048) (xy 136.395923 83.421975) (xy 136.62724 83.275177) (xy 136.825639 83.086245) (xy 136.983561 82.862375) - (xy 137.031934 82.753726) (xy 137.054474 82.810655) (xy 137.202883 83.040942) (xy 137.393196 83.238016) (xy 137.618163 83.394372) - (xy 137.869215 83.504054) (xy 138.136789 83.562884) (xy 138.410695 83.568622) (xy 138.680499 83.521048) (xy 138.935923 83.421975) - (xy 139.16724 83.275177) (xy 139.365639 83.086245) (xy 139.461625 82.950174) (xy 139.504969 82.995058) (xy 139.678807 83.115879) - (xy 139.872802 83.200633) (xy 140.079564 83.246093) (xy 140.291219 83.250526) (xy 140.499704 83.213765) (xy 140.697077 83.137208) - (xy 140.875822 83.023773) (xy 141.02913 82.87778) (xy 141.151161 82.70479) (xy 141.237268 82.511392) (xy 141.28417 82.304952) - (xy 141.287546 82.06315) (xy 141.287546 95.229931) (xy 141.102452 95.304715) (xy 141.057279 95.334274) (xy 141.026428 95.303207) - (xy 140.906541 95.222341) (xy 140.906541 85.504603) (xy 140.870259 85.321365) (xy 140.799077 85.148665) (xy 140.695706 84.993079) - (xy 140.564084 84.860535) (xy 140.409224 84.75608) (xy 140.237025 84.683694) (xy 140.054045 84.646134) (xy 139.867255 84.64483) - (xy 139.683768 84.679832) (xy 139.510575 84.749807) (xy 139.508512 84.751156) (xy 139.348025 84.683694) (xy 139.165045 84.646134) - (xy 138.978255 84.64483) (xy 138.794768 84.679832) (xy 138.621575 84.749807) (xy 138.619512 84.751156) (xy 138.459025 84.683694) - (xy 138.276045 84.646134) (xy 138.089255 84.64483) (xy 138.002557 84.661368) (xy 138.0006 84.658423) (xy 137.851428 84.508207) - (xy 137.675921 84.389825) (xy 137.480761 84.307788) (xy 137.273384 84.265219) (xy 137.061689 84.263741) (xy 136.853738 84.30341) - (xy 136.657452 84.382715) (xy 136.588892 84.427578) (xy 136.532921 84.389825) (xy 136.337761 84.307788) (xy 136.130384 84.265219) - (xy 135.918689 84.263741) (xy 135.710738 84.30341) (xy 135.514452 84.382715) (xy 135.469279 84.412274) (xy 135.438428 84.381207) - (xy 135.262921 84.262825) (xy 135.067761 84.180788) (xy 134.860384 84.138219) (xy 134.648689 84.136741) (xy 134.440738 84.17641) - (xy 134.244452 84.255715) (xy 134.067308 84.371634) (xy 133.916054 84.519753) (xy 133.79645 84.694431) (xy 133.713052 84.889012) - (xy 133.669037 85.096087) (xy 133.666081 85.307767) (xy 133.704297 85.51599) (xy 133.78223 85.712825) (xy 133.89691 85.890773) - (xy 134.043969 86.043058) (xy 134.217807 86.163879) (xy 134.411802 86.248633) (xy 134.618564 86.294093) (xy 134.830219 86.298526) - (xy 135.038704 86.261765) (xy 135.236077 86.185208) (xy 135.293442 86.148802) (xy 135.313969 86.170058) (xy 135.487807 86.290879) - (xy 135.681802 86.375633) (xy 135.888564 86.421093) (xy 136.100219 86.425526) (xy 136.308704 86.388765) (xy 136.506077 86.312208) - (xy 136.587316 86.260652) (xy 136.630807 86.290879) (xy 136.824802 86.375633) (xy 137.031564 86.421093) (xy 137.243219 86.425526) - (xy 137.451704 86.388765) (xy 137.575588 86.340712) (xy 137.709065 86.433482) (xy 137.880237 86.508265) (xy 138.062674 86.548376) - (xy 138.249428 86.552288) (xy 138.433386 86.519852) (xy 138.607539 86.452302) (xy 138.62124 86.443606) (xy 138.769237 86.508265) - (xy 138.951674 86.548376) (xy 139.138428 86.552288) (xy 139.322386 86.519852) (xy 139.496539 86.452302) (xy 139.51024 86.443606) - (xy 139.658237 86.508265) (xy 139.840674 86.548376) (xy 140.027428 86.552288) (xy 140.211386 86.519852) (xy 140.385539 86.452302) - (xy 140.543255 86.352212) (xy 140.678527 86.223395) (xy 140.786201 86.070756) (xy 140.862178 85.900111) (xy 140.903562 85.717958) - (xy 140.906541 85.504603) (xy 140.906541 95.222341) (xy 140.850921 95.184825) (xy 140.655761 95.102788) (xy 140.448384 95.060219) - (xy 140.236689 95.058741) (xy 140.028738 95.09841) (xy 139.832452 95.177715) (xy 139.655308 95.293634) (xy 139.509042 95.436867) - (xy 139.502428 95.430207) (xy 139.326921 95.311825) (xy 139.131761 95.229788) (xy 138.924384 95.187219) (xy 138.712689 95.185741) - (xy 138.504738 95.22541) (xy 138.308452 95.304715) (xy 138.131308 95.420634) (xy 137.980054 95.568753) (xy 137.86045 95.743431) - (xy 137.777052 95.938012) (xy 137.733037 96.145087) (xy 137.730081 96.356767) (xy 137.768297 96.56499) (xy 137.84623 96.761825) - (xy 137.96091 96.939773) (xy 138.107969 97.092058) (xy 138.281807 97.212879) (xy 138.475802 97.297633) (xy 138.682564 97.343093) - (xy 138.894219 97.347526) (xy 139.102704 97.310765) (xy 139.300077 97.234208) (xy 139.478822 97.120773) (xy 139.63213 96.97478) - (xy 139.636678 96.968331) (xy 139.805807 97.085879) (xy 139.999802 97.170633) (xy 140.206564 97.216093) (xy 140.418219 97.220526) - (xy 140.626704 97.183765) (xy 140.824077 97.107208) (xy 140.881442 97.070802) (xy 140.901969 97.092058) (xy 141.075807 97.212879) - (xy 141.269802 97.297633) (xy 141.476564 97.343093) (xy 141.688219 97.347526) (xy 141.896704 97.310765) (xy 142.094077 97.234208) - (xy 142.272822 97.120773) (xy 142.42613 96.97478) (xy 142.548161 96.80179) (xy 142.634268 96.608392) (xy 142.68117 96.401952) - (xy 142.684546 96.16015) (xy 142.684546 115.252879) (xy 142.557546 115.251992) (xy 142.557546 106.32015) (xy 142.516426 106.112481) - (xy 142.435754 105.916753) (xy 142.3186 105.740423) (xy 142.317514 105.739329) (xy 142.386178 105.585111) (xy 142.427562 105.402958) - (xy 142.430541 105.189603) (xy 142.394259 105.006365) (xy 142.323077 104.833665) (xy 142.219706 104.678079) (xy 142.088084 104.545535) - (xy 142.049546 104.51954) (xy 142.049546 103.01815) (xy 142.008426 102.810481) (xy 141.927754 102.614753) (xy 141.843705 102.488249) - (xy 141.913161 102.38979) (xy 141.999268 102.196392) (xy 142.04617 101.989952) (xy 142.049546 101.74815) (xy 142.008426 101.540481) - (xy 141.927754 101.344753) (xy 141.8106 101.168423) (xy 141.661428 101.018207) (xy 141.485921 100.899825) (xy 141.290761 100.817788) - (xy 141.083384 100.775219) (xy 140.871689 100.773741) (xy 140.663738 100.81341) (xy 140.467452 100.892715) (xy 140.290308 101.008634) - (xy 140.139054 101.156753) (xy 140.01945 101.331431) (xy 139.936052 101.526012) (xy 139.906725 101.663984) (xy 139.890546 101.663871) - (xy 139.890546 98.82715) (xy 139.849426 98.619481) (xy 139.768754 98.423753) (xy 139.6516 98.247423) (xy 139.502428 98.097207) - (xy 139.326921 97.978825) (xy 139.131761 97.896788) (xy 138.924384 97.854219) (xy 138.712689 97.852741) (xy 138.504738 97.89241) - (xy 138.308452 97.971715) (xy 138.131308 98.087634) (xy 137.980054 98.235753) (xy 137.86045 98.410431) (xy 137.777052 98.605012) - (xy 137.733037 98.812087) (xy 137.730081 99.023767) (xy 137.768297 99.23199) (xy 137.84623 99.428825) (xy 137.96091 99.606773) - (xy 138.107969 99.759058) (xy 138.281807 99.879879) (xy 138.475802 99.964633) (xy 138.682564 100.010093) (xy 138.894219 100.014526) - (xy 139.102704 99.977765) (xy 139.300077 99.901208) (xy 139.478822 99.787773) (xy 139.63213 99.64178) (xy 139.754161 99.46879) - (xy 139.840268 99.275392) (xy 139.88717 99.068952) (xy 139.890546 98.82715) (xy 139.890546 101.663871) (xy 139.728689 101.662741) - (xy 139.520738 101.70241) (xy 139.324452 101.781715) (xy 139.147308 101.897634) (xy 138.996054 102.045753) (xy 138.87645 102.220431) - (xy 138.793052 102.415012) (xy 138.749037 102.622087) (xy 138.746081 102.833767) (xy 138.784297 103.04199) (xy 138.86223 103.238825) - (xy 138.97691 103.416773) (xy 139.123969 103.569058) (xy 139.297807 103.689879) (xy 139.491802 103.774633) (xy 139.698564 103.820093) - (xy 139.910219 103.824526) (xy 140.113995 103.788595) (xy 140.11991 103.797773) (xy 140.266969 103.950058) (xy 140.440807 104.070879) - (xy 140.634802 104.155633) (xy 140.841564 104.201093) (xy 141.053219 104.205526) (xy 141.261704 104.168765) (xy 141.459077 104.092208) - (xy 141.637822 103.978773) (xy 141.79113 103.83278) (xy 141.913161 103.65979) (xy 141.999268 103.466392) (xy 142.04617 103.259952) - (xy 142.049546 103.01815) (xy 142.049546 104.51954) (xy 141.933224 104.44108) (xy 141.761025 104.368694) (xy 141.578045 104.331134) - (xy 141.391255 104.32983) (xy 141.207768 104.364832) (xy 141.034575 104.434807) (xy 140.878272 104.537089) (xy 140.744812 104.667782) - (xy 140.639279 104.821909) (xy 140.565693 104.993599) (xy 140.526856 105.176312) (xy 140.524248 105.363089) (xy 140.557968 105.546815) - (xy 140.626732 105.720493) (xy 140.639327 105.740037) (xy 140.52745 105.903431) (xy 140.444052 106.098012) (xy 140.400037 106.305087) - (xy 140.397081 106.516767) (xy 140.435297 106.72499) (xy 140.51323 106.921825) (xy 140.62791 107.099773) (xy 140.774969 107.252058) - (xy 140.948807 107.372879) (xy 141.142802 107.457633) (xy 141.349564 107.503093) (xy 141.561219 107.507526) (xy 141.769704 107.470765) - (xy 141.967077 107.394208) (xy 142.145822 107.280773) (xy 142.29913 107.13478) (xy 142.421161 106.96179) (xy 142.507268 106.768392) - (xy 142.55417 106.561952) (xy 142.557546 106.32015) (xy 142.557546 115.251992) (xy 142.534255 115.25183) (xy 142.350768 115.286832) - (xy 142.177575 115.356807) (xy 142.021272 115.459089) (xy 141.887812 115.589782) (xy 141.782279 115.743909) (xy 141.708693 115.915599) - (xy 141.669856 116.098312) (xy 141.667248 116.285089) (xy 141.700968 116.468815) (xy 141.769732 116.642493) (xy 141.87092 116.799506) - (xy 142.000679 116.933875) (xy 142.154065 117.040482) (xy 142.325237 117.115265) (xy 142.507674 117.155376) (xy 142.694428 117.159288) - (xy 142.878386 117.126852) (xy 143.002 117.078904) (xy 143.002 118.859907) (xy 142.929431 118.683842) (xy 142.798495 118.486767) - (xy 142.631773 118.318878) (xy 142.435617 118.186569) (xy 142.217498 118.09488) (xy 141.985724 118.047303) (xy 141.749123 118.045651) - (xy 141.516707 118.089987) (xy 141.297329 118.178622) (xy 141.099344 118.308179) (xy 140.930295 118.473724) (xy 140.79662 118.668952) - (xy 140.703411 118.886425) (xy 140.654217 119.117862) (xy 140.650914 119.354446) (xy 140.693626 119.587166) (xy 140.780727 119.807157) - (xy 140.908899 120.006041) (xy 141.07326 120.176242) (xy 141.267549 120.311277) (xy 141.484367 120.406002) (xy 141.715454 120.45681) - (xy 141.952009 120.461765) (xy 142.185022 120.420679) (xy 142.405616 120.335116) (xy 142.60539 120.208335) (xy 142.776734 120.045167) - (xy 142.913122 119.851824) (xy 143.002 119.652199) (xy 143.002 131.002369) (xy 140.398541 133.605828) (xy 140.398541 116.111603) - (xy 140.362259 115.928365) (xy 140.291077 115.755665) (xy 140.187706 115.600079) (xy 140.056084 115.467535) (xy 139.901224 115.36308) - (xy 139.729025 115.290694) (xy 139.636552 115.271712) (xy 139.636552 110.498697) (xy 139.590595 110.266596) (xy 139.500431 110.047842) - (xy 139.369495 109.850767) (xy 139.202773 109.682878) (xy 139.006617 109.550569) (xy 138.788498 109.45888) (xy 138.556724 109.411303) - (xy 138.320123 109.409651) (xy 138.087707 109.453987) (xy 137.868329 109.542622) (xy 137.670344 109.672179) (xy 137.501295 109.837724) - (xy 137.36762 110.032952) (xy 137.274411 110.250425) (xy 137.225217 110.481862) (xy 137.221914 110.718446) (xy 137.264626 110.951166) - (xy 137.351727 111.171157) (xy 137.479899 111.370041) (xy 137.64426 111.540242) (xy 137.838549 111.675277) (xy 138.055367 111.770002) - (xy 138.286454 111.82081) (xy 138.523009 111.825765) (xy 138.756022 111.784679) (xy 138.976616 111.699116) (xy 139.17639 111.572335) - (xy 139.347734 111.409167) (xy 139.484122 111.215824) (xy 139.580358 110.999673) (xy 139.632778 110.768946) (xy 139.636552 110.498697) - (xy 139.636552 115.271712) (xy 139.546045 115.253134) (xy 139.359255 115.25183) (xy 139.175768 115.286832) (xy 139.002575 115.356807) - (xy 138.846272 115.459089) (xy 138.712812 115.589782) (xy 138.607279 115.743909) (xy 138.533693 115.915599) (xy 138.494856 116.098312) - (xy 138.492248 116.285089) (xy 138.525968 116.468815) (xy 138.594732 116.642493) (xy 138.69592 116.799506) (xy 138.825679 116.933875) - (xy 138.979065 117.040482) (xy 139.150237 117.115265) (xy 139.332674 117.155376) (xy 139.519428 117.159288) (xy 139.703386 117.126852) - (xy 139.877539 117.059302) (xy 140.035255 116.959212) (xy 140.170527 116.830395) (xy 140.278201 116.677756) (xy 140.354178 116.507111) - (xy 140.395562 116.324958) (xy 140.398541 116.111603) (xy 140.398541 133.605828) (xy 139.7 134.304369) (xy 139.7 133.223) - (xy 139.693125 133.15289) (xy 139.686996 133.082829) (xy 139.685879 133.078985) (xy 139.685488 133.074993) (xy 139.665126 133.007552) - (xy 139.645506 132.940018) (xy 139.643662 132.936462) (xy 139.642504 132.932624) (xy 139.609454 132.870467) (xy 139.577067 132.807985) - (xy 139.574566 132.804852) (xy 139.572686 132.801316) (xy 139.528216 132.746791) (xy 139.484286 132.69176) (xy 139.478784 132.686181) - (xy 139.478693 132.686069) (xy 139.478589 132.685983) (xy 139.476815 132.684184) (xy 139.446 132.653369) (xy 139.446 128.905) - (xy 139.439121 128.834849) (xy 139.432996 128.764829) (xy 139.431879 128.760985) (xy 139.431488 128.756993) (xy 139.411126 128.689552) - (xy 139.391506 128.622018) (xy 139.389662 128.618462) (xy 139.388504 128.614624) (xy 139.355454 128.552467) (xy 139.323067 128.489985) - (xy 139.320566 128.486852) (xy 139.318686 128.483316) (xy 139.274216 128.428791) (xy 139.230286 128.37376) (xy 139.224784 128.368181) - (xy 139.224693 128.368069) (xy 139.224589 128.367983) (xy 139.222815 128.366184) (xy 135.89 125.033369) (xy 135.89 111.443273) - (xy 135.960201 111.343756) (xy 136.036178 111.173111) (xy 136.077562 110.990958) (xy 136.080541 110.777603) (xy 136.044259 110.594365) - (xy 135.973077 110.421665) (xy 135.869706 110.266079) (xy 135.738084 110.133535) (xy 135.583224 110.02908) (xy 135.411025 109.956694) - (xy 135.228045 109.919134) (xy 135.041255 109.91783) (xy 134.857768 109.952832) (xy 134.684575 110.022807) (xy 134.682512 110.024156) - (xy 134.522025 109.956694) (xy 134.339045 109.919134) (xy 134.239 109.918435) (xy 134.239 109.91663) (xy 135.539815 108.615816) - (xy 135.58451 108.561402) (xy 135.629736 108.507505) (xy 135.631666 108.503993) (xy 135.63421 108.500897) (xy 135.667468 108.43887) - (xy 135.701381 108.377184) (xy 135.702592 108.373363) (xy 135.704486 108.369833) (xy 135.72506 108.302535) (xy 135.746348 108.235429) - (xy 135.746794 108.231445) (xy 135.747966 108.227615) (xy 135.755075 108.157627) (xy 135.762926 108.087639) (xy 135.76298 108.079802) - (xy 135.762995 108.07966) (xy 135.762982 108.079526) (xy 135.763 108.077) (xy 135.763 107.506273) (xy 135.833201 107.406756) - (xy 135.909178 107.236111) (xy 135.950562 107.053958) (xy 135.951328 106.999067) (xy 135.973219 106.999526) (xy 136.181704 106.962765) - (xy 136.379077 106.886208) (xy 136.527404 106.792076) (xy 136.610237 106.828265) (xy 136.792674 106.868376) (xy 136.979428 106.872288) - (xy 137.163386 106.839852) (xy 137.337539 106.772302) (xy 137.477316 106.683596) (xy 137.476248 106.760089) (xy 137.509968 106.943815) - (xy 137.578732 107.117493) (xy 137.67992 107.274506) (xy 137.809679 107.408875) (xy 137.963065 107.515482) (xy 138.122847 107.585289) - (xy 138.144968 107.705815) (xy 138.213732 107.879493) (xy 138.31492 108.036506) (xy 138.444679 108.170875) (xy 138.598065 108.277482) - (xy 138.769237 108.352265) (xy 138.951674 108.392376) (xy 139.138428 108.396288) (xy 139.322386 108.363852) (xy 139.496539 108.296302) - (xy 139.654255 108.196212) (xy 139.789527 108.067395) (xy 139.897201 107.914756) (xy 139.973178 107.744111) (xy 140.014562 107.561958) - (xy 140.017541 107.348603) (xy 139.981259 107.165365) (xy 139.910077 106.992665) (xy 139.806706 106.837079) (xy 139.675084 106.704535) - (xy 139.520224 106.60008) (xy 139.372951 106.538172) (xy 139.346259 106.403365) (xy 139.275077 106.230665) (xy 139.171706 106.075079) - (xy 139.040084 105.942535) (xy 138.885224 105.83808) (xy 138.713025 105.765694) (xy 138.530045 105.728134) (xy 138.343255 105.72683) - (xy 138.159768 105.761832) (xy 137.986575 105.831807) (xy 137.857258 105.916429) (xy 137.858541 105.824603) (xy 137.822259 105.641365) - (xy 137.751077 105.468665) (xy 137.647706 105.313079) (xy 137.516084 105.180535) (xy 137.477541 105.154537) (xy 137.477541 88.552603) - (xy 137.441259 88.369365) (xy 137.370077 88.196665) (xy 137.266706 88.041079) (xy 137.135084 87.908535) (xy 136.980224 87.80408) - (xy 136.808025 87.731694) (xy 136.625045 87.694134) (xy 136.438255 87.69283) (xy 136.254768 87.727832) (xy 136.081575 87.797807) - (xy 136.079512 87.799156) (xy 135.919025 87.731694) (xy 135.736045 87.694134) (xy 135.549255 87.69283) (xy 135.365768 87.727832) - (xy 135.192575 87.797807) (xy 135.036272 87.900089) (xy 134.902812 88.030782) (xy 134.797279 88.184909) (xy 134.723693 88.356599) - (xy 134.684856 88.539312) (xy 134.682248 88.726089) (xy 134.715968 88.909815) (xy 134.784732 89.083493) (xy 134.88592 89.240506) - (xy 135.015679 89.374875) (xy 135.169065 89.481482) (xy 135.340237 89.556265) (xy 135.522674 89.596376) (xy 135.709428 89.600288) - (xy 135.893386 89.567852) (xy 136.067539 89.500302) (xy 136.08124 89.491606) (xy 136.229237 89.556265) (xy 136.411674 89.596376) - (xy 136.598428 89.600288) (xy 136.782386 89.567852) (xy 136.956539 89.500302) (xy 137.114255 89.400212) (xy 137.249527 89.271395) - (xy 137.357201 89.118756) (xy 137.433178 88.948111) (xy 137.474562 88.765958) (xy 137.477541 88.552603) (xy 137.477541 105.154537) - (xy 137.361224 105.07608) (xy 137.189025 105.003694) (xy 137.006045 104.966134) (xy 136.819255 104.96483) (xy 136.635768 104.999832) - (xy 136.525407 105.04442) (xy 136.405921 104.963825) (xy 136.210761 104.881788) (xy 136.003384 104.839219) (xy 135.791689 104.837741) - (xy 135.583738 104.87741) (xy 135.387452 104.956715) (xy 135.210308 105.072634) (xy 135.062378 105.217497) (xy 135.064541 105.062603) - (xy 135.028259 104.879365) (xy 134.957077 104.706665) (xy 134.882147 104.593886) (xy 134.893178 104.569111) (xy 134.934562 104.386958) - (xy 134.937541 104.173603) (xy 134.901259 103.990365) (xy 134.830077 103.817665) (xy 134.726706 103.662079) (xy 134.595084 103.529535) - (xy 134.440224 103.42508) (xy 134.268025 103.352694) (xy 134.085045 103.315134) (xy 133.898255 103.31383) (xy 133.714768 103.348832) - (xy 133.541575 103.418807) (xy 133.385272 103.521089) (xy 133.35 103.555629) (xy 133.35 103.442273) (xy 133.420201 103.342756) - (xy 133.496178 103.172111) (xy 133.537562 102.989958) (xy 133.540541 102.776603) (xy 133.504259 102.593365) (xy 133.433077 102.420665) - (xy 133.329706 102.265079) (xy 133.198084 102.132535) (xy 133.043224 102.02808) (xy 132.871025 101.955694) (xy 132.688045 101.918134) - (xy 132.501255 101.91683) (xy 132.317768 101.951832) (xy 132.144575 102.021807) (xy 132.142512 102.023156) (xy 131.982025 101.955694) - (xy 131.799045 101.918134) (xy 131.612255 101.91683) (xy 131.428768 101.951832) (xy 131.255575 102.021807) (xy 131.099272 102.124089) - (xy 130.965812 102.254782) (xy 130.860279 102.408909) (xy 130.786693 102.580599) (xy 130.747856 102.763312) (xy 130.745248 102.950089) - (xy 130.778968 103.133815) (xy 130.847732 103.307493) (xy 130.94892 103.464506) (xy 131.078679 103.598875) (xy 131.232065 103.705482) - (xy 131.403237 103.780265) (xy 131.585674 103.820376) (xy 131.772428 103.824288) (xy 131.826 103.814842) (xy 131.826 104.095678) - (xy 131.773224 104.06008) (xy 131.601025 103.987694) (xy 131.418045 103.950134) (xy 131.231255 103.94883) (xy 131.047768 103.983832) - (xy 130.874575 104.053807) (xy 130.872512 104.055156) (xy 130.712025 103.987694) (xy 130.529045 103.950134) (xy 130.342255 103.94883) - (xy 130.158768 103.983832) (xy 129.985575 104.053807) (xy 129.829272 104.156089) (xy 129.695812 104.286782) (xy 129.590279 104.440909) - (xy 129.583066 104.457736) (xy 129.453255 104.45683) (xy 129.413 104.464509) (xy 129.413 100.111413) (xy 129.450704 100.104765) - (xy 129.648077 100.028208) (xy 129.826822 99.914773) (xy 129.98013 99.76878) (xy 130.102161 99.59579) (xy 130.188268 99.402392) - (xy 130.23517 99.195952) (xy 130.238546 98.95415) (xy 130.197426 98.746481) (xy 130.116754 98.550753) (xy 129.9996 98.374423) - (xy 129.850428 98.224207) (xy 129.674921 98.105825) (xy 129.479761 98.023788) (xy 129.272384 97.981219) (xy 129.060689 97.979741) - (xy 128.905 98.00944) (xy 128.905 96.169447) (xy 129.045674 96.200376) (xy 129.232428 96.204288) (xy 129.416386 96.171852) - (xy 129.590539 96.104302) (xy 129.60424 96.095606) (xy 129.752237 96.160265) (xy 129.934674 96.200376) (xy 130.121428 96.204288) - (xy 130.305386 96.171852) (xy 130.479539 96.104302) (xy 130.49324 96.095606) (xy 130.641237 96.160265) (xy 130.765975 96.18769) - (xy 130.748037 96.272087) (xy 130.745081 96.483767) (xy 130.783297 96.69199) (xy 130.86123 96.888825) (xy 130.97591 97.066773) - (xy 131.122969 97.219058) (xy 131.296807 97.339879) (xy 131.490802 97.424633) (xy 131.697564 97.470093) (xy 131.909219 97.474526) - (xy 132.117704 97.437765) (xy 132.315077 97.361208) (xy 132.493822 97.247773) (xy 132.64713 97.10178) (xy 132.769161 96.92879) - (xy 132.771135 96.924356) (xy 132.820807 96.958879) (xy 133.014802 97.043633) (xy 133.032077 97.047431) (xy 133.031081 97.118767) - (xy 133.069297 97.32699) (xy 133.14723 97.523825) (xy 133.26191 97.701773) (xy 133.408969 97.854058) (xy 133.582807 97.974879) - (xy 133.776802 98.059633) (xy 133.983564 98.105093) (xy 134.195219 98.109526) (xy 134.403704 98.072765) (xy 134.601077 97.996208) - (xy 134.779822 97.882773) (xy 134.93313 97.73678) (xy 135.055161 97.56379) (xy 135.141268 97.370392) (xy 135.18817 97.163952) - (xy 135.190908 96.967796) (xy 135.228559 96.993964) (xy 135.193037 97.161087) (xy 135.190081 97.372767) (xy 135.228297 97.58099) - (xy 135.30623 97.777825) (xy 135.42091 97.955773) (xy 135.567969 98.108058) (xy 135.741807 98.228879) (xy 135.935802 98.313633) - (xy 136.142564 98.359093) (xy 136.354219 98.363526) (xy 136.562704 98.326765) (xy 136.760077 98.250208) (xy 136.938822 98.136773) - (xy 137.09213 97.99078) (xy 137.214161 97.81779) (xy 137.300268 97.624392) (xy 137.34717 97.417952) (xy 137.350546 97.17615) - (xy 137.309426 96.968481) (xy 137.228754 96.772753) (xy 137.1116 96.596423) (xy 136.962428 96.446207) (xy 136.931934 96.425638) - (xy 136.96617 96.274952) (xy 136.969546 96.03315) (xy 136.928426 95.825481) (xy 136.847754 95.629753) (xy 136.7306 95.453423) - (xy 136.581428 95.303207) (xy 136.405921 95.184825) (xy 136.210761 95.102788) (xy 136.003384 95.060219) (xy 135.791689 95.058741) - (xy 135.583738 95.09841) (xy 135.387452 95.177715) (xy 135.210308 95.293634) (xy 135.059054 95.441753) (xy 134.93945 95.616431) - (xy 134.856052 95.811012) (xy 134.812037 96.018087) (xy 134.809519 96.198341) (xy 134.803428 96.192207) (xy 134.627921 96.073825) - (xy 134.432761 95.991788) (xy 134.428362 95.990885) (xy 134.429546 95.90615) (xy 134.388426 95.698481) (xy 134.307754 95.502753) - (xy 134.1906 95.326423) (xy 134.041428 95.176207) (xy 133.865921 95.057825) (xy 133.670761 94.975788) (xy 133.63266 94.967966) - (xy 133.626426 94.936481) (xy 133.545754 94.740753) (xy 133.4286 94.564423) (xy 133.413541 94.549258) (xy 133.413541 91.981603) - (xy 133.377259 91.798365) (xy 133.306077 91.625665) (xy 133.202706 91.470079) (xy 133.071084 91.337535) (xy 133.031269 91.310679) - (xy 133.032541 91.219603) (xy 132.996259 91.036365) (xy 132.925077 90.863665) (xy 132.821706 90.708079) (xy 132.778552 90.664622) - (xy 132.778552 71.128697) (xy 132.732595 70.896596) (xy 132.642431 70.677842) (xy 132.511495 70.480767) (xy 132.344773 70.312878) - (xy 132.148617 70.180569) (xy 131.930498 70.08888) (xy 131.698724 70.041303) (xy 131.462123 70.039651) (xy 131.229707 70.083987) - (xy 131.010329 70.172622) (xy 130.812344 70.302179) (xy 130.643295 70.467724) (xy 130.50962 70.662952) (xy 130.416411 70.880425) - (xy 130.367217 71.111862) (xy 130.363914 71.348446) (xy 130.406626 71.581166) (xy 130.493727 71.801157) (xy 130.621899 72.000041) - (xy 130.78626 72.170242) (xy 130.980549 72.305277) (xy 131.197367 72.400002) (xy 131.428454 72.45081) (xy 131.665009 72.455765) - (xy 131.898022 72.414679) (xy 132.118616 72.329116) (xy 132.31839 72.202335) (xy 132.489734 72.039167) (xy 132.626122 71.845824) - (xy 132.722358 71.629673) (xy 132.774778 71.398946) (xy 132.778552 71.128697) (xy 132.778552 90.664622) (xy 132.690084 90.575535) - (xy 132.535224 90.47108) (xy 132.363025 90.398694) (xy 132.180045 90.361134) (xy 132.059922 90.360295) (xy 132.087358 90.298673) - (xy 132.139778 90.067946) (xy 132.143552 89.797697) (xy 132.097595 89.565596) (xy 132.007431 89.346842) (xy 131.876495 89.149767) - (xy 131.709773 88.981878) (xy 131.513617 88.849569) (xy 131.295498 88.75788) (xy 131.063724 88.710303) (xy 130.827123 88.708651) - (xy 130.594707 88.752987) (xy 130.375329 88.841622) (xy 130.177344 88.971179) (xy 130.008295 89.136724) (xy 129.87462 89.331952) - (xy 129.781411 89.549425) (xy 129.732217 89.780862) (xy 129.728914 90.017446) (xy 129.771626 90.250166) (xy 129.858727 90.470157) - (xy 129.986899 90.669041) (xy 130.15126 90.839242) (xy 130.345549 90.974277) (xy 130.562367 91.069002) (xy 130.793454 91.11981) - (xy 131.030009 91.124765) (xy 131.150713 91.103481) (xy 131.128856 91.206312) (xy 131.126248 91.393089) (xy 131.159968 91.576815) - (xy 131.228732 91.750493) (xy 131.32992 91.907506) (xy 131.459679 92.041875) (xy 131.508356 92.075706) (xy 131.507248 92.155089) - (xy 131.540968 92.338815) (xy 131.609732 92.512493) (xy 131.71092 92.669506) (xy 131.840679 92.803875) (xy 131.994065 92.910482) - (xy 132.165237 92.985265) (xy 132.347674 93.025376) (xy 132.534428 93.029288) (xy 132.718386 92.996852) (xy 132.892539 92.929302) - (xy 133.050255 92.829212) (xy 133.185527 92.700395) (xy 133.293201 92.547756) (xy 133.369178 92.377111) (xy 133.410562 92.194958) - (xy 133.413541 91.981603) (xy 133.413541 94.549258) (xy 133.279428 94.414207) (xy 133.103921 94.295825) (xy 132.908761 94.213788) - (xy 132.701384 94.171219) (xy 132.489689 94.169741) (xy 132.281738 94.20941) (xy 132.085452 94.288715) (xy 131.908308 94.404634) - (xy 131.757054 94.552753) (xy 131.686157 94.656294) (xy 131.678706 94.645079) (xy 131.547084 94.512535) (xy 131.392224 94.40808) - (xy 131.220025 94.335694) (xy 131.037045 94.298134) (xy 130.850255 94.29683) (xy 130.666768 94.331832) (xy 130.493575 94.401807) - (xy 130.491512 94.403156) (xy 130.331025 94.335694) (xy 130.148045 94.298134) (xy 129.961255 94.29683) (xy 129.777768 94.331832) - (xy 129.604575 94.401807) (xy 129.602512 94.403156) (xy 129.442025 94.335694) (xy 129.259045 94.298134) (xy 129.072255 94.29683) - (xy 129.03691 94.303572) (xy 129.03691 68.507983) (xy 128.995922 68.235867) (xy 128.902636 67.976977) (xy 128.840656 67.86102) - (xy 128.600565 67.79404) (xy 128.42096 67.973645) (xy 128.42096 67.614435) (xy 128.35398 67.374344) (xy 128.104952 67.257244) - (xy 127.837865 67.190977) (xy 127.635059 67.181469) (xy 127.635059 65.903017) (xy 127.581846 65.634269) (xy 127.477446 65.380975) - (xy 127.325835 65.152783) (xy 127.13279 64.958385) (xy 126.905662 64.805185) (xy 126.653103 64.699019) (xy 126.384733 64.643931) - (xy 126.110774 64.642018) (xy 125.841661 64.693354) (xy 125.587644 64.795984) (xy 125.358399 64.945997) (xy 125.162658 65.137681) - (xy 125.007877 65.363734) (xy 124.89995 65.615546) (xy 124.842989 65.883524) (xy 124.841059 66.021747) (xy 124.841059 65.903017) - (xy 124.787846 65.634269) (xy 124.683446 65.380975) (xy 124.531835 65.152783) (xy 124.33879 64.958385) (xy 124.111662 64.805185) - (xy 123.859103 64.699019) (xy 123.590733 64.643931) (xy 123.316774 64.642018) (xy 123.047661 64.693354) (xy 122.793644 64.795984) - (xy 122.564399 64.945997) (xy 122.368658 65.137681) (xy 122.213877 65.363734) (xy 122.109609 65.607007) (xy 122.016446 65.380975) - (xy 121.864835 65.152783) (xy 121.67179 64.958385) (xy 121.444662 64.805185) (xy 121.192103 64.699019) (xy 120.923733 64.643931) - (xy 120.649774 64.642018) (xy 120.380661 64.693354) (xy 120.126644 64.795984) (xy 119.897399 64.945997) (xy 119.701658 65.137681) - (xy 119.546877 65.363734) (xy 119.43895 65.615546) (xy 119.381989 65.883524) (xy 119.378164 66.157464) (xy 119.42762 66.426928) - (xy 119.528474 66.681655) (xy 119.676883 66.911942) (xy 119.867196 67.109016) (xy 120.092163 67.265372) (xy 120.343215 67.375054) - (xy 120.610789 67.433884) (xy 120.884695 67.439622) (xy 121.154499 67.392048) (xy 121.409923 67.292975) (xy 121.64124 67.146177) - (xy 121.839639 66.957245) (xy 121.997561 66.733375) (xy 122.108993 66.483095) (xy 122.11186 66.470472) (xy 122.195474 66.681655) - (xy 122.343883 66.911942) (xy 122.534196 67.109016) (xy 122.759163 67.265372) (xy 123.010215 67.375054) (xy 123.277789 67.433884) - (xy 123.551695 67.439622) (xy 123.821499 67.392048) (xy 124.076923 67.292975) (xy 124.30824 67.146177) (xy 124.506639 66.957245) - (xy 124.664561 66.733375) (xy 124.775993 66.483095) (xy 124.83669 66.215938) (xy 124.841059 65.903017) (xy 124.841059 66.021747) - (xy 124.839164 66.157464) (xy 124.88862 66.426928) (xy 124.989474 66.681655) (xy 125.137883 66.911942) (xy 125.328196 67.109016) - (xy 125.553163 67.265372) (xy 125.804215 67.375054) (xy 126.071789 67.433884) (xy 126.345695 67.439622) (xy 126.615499 67.392048) - (xy 126.870923 67.292975) (xy 127.10224 67.146177) (xy 127.300639 66.957245) (xy 127.458561 66.733375) (xy 127.569993 66.483095) - (xy 127.63069 66.215938) (xy 127.635059 65.903017) (xy 127.635059 67.181469) (xy 127.562983 67.17809) (xy 127.290867 67.219078) - (xy 127.031977 67.312364) (xy 126.91602 67.374344) (xy 126.84904 67.614435) (xy 127.635 68.400395) (xy 128.42096 67.614435) - (xy 128.42096 67.973645) (xy 127.814605 68.58) (xy 128.600565 69.36596) (xy 128.840656 69.29898) (xy 128.957756 69.049952) - (xy 129.024023 68.782865) (xy 129.03691 68.507983) (xy 129.03691 94.303572) (xy 128.905 94.328735) (xy 128.905 88.9) - (xy 128.89813 88.829936) (xy 128.891997 88.75983) (xy 128.890879 88.755982) (xy 128.890488 88.751993) (xy 128.870135 88.684581) - (xy 128.850506 88.617018) (xy 128.848662 88.613462) (xy 128.847504 88.609624) (xy 128.814443 88.547446) (xy 128.782067 88.484986) - (xy 128.779568 88.481855) (xy 128.777686 88.478316) (xy 128.733199 88.423769) (xy 128.689286 88.36876) (xy 128.683787 88.363185) - (xy 128.683693 88.363069) (xy 128.683585 88.362979) (xy 128.681815 88.361185) (xy 128.42096 88.10033) (xy 128.42096 69.545565) - (xy 127.635 68.759605) (xy 127.455395 68.93921) (xy 127.455395 68.58) (xy 126.669435 67.79404) (xy 126.429344 67.86102) - (xy 126.312244 68.110048) (xy 126.245977 68.377135) (xy 126.23601 68.589716) (xy 126.238059 68.443017) (xy 126.184846 68.174269) - (xy 126.080446 67.920975) (xy 125.928835 67.692783) (xy 125.73579 67.498385) (xy 125.508662 67.345185) (xy 125.256103 67.239019) - (xy 124.987733 67.183931) (xy 124.713774 67.182018) (xy 124.444661 67.233354) (xy 124.190644 67.335984) (xy 123.961399 67.485997) - (xy 123.765658 67.677681) (xy 123.610877 67.903734) (xy 123.50295 68.155546) (xy 123.445989 68.423524) (xy 123.444059 68.561747) - (xy 123.444059 68.443017) (xy 123.390846 68.174269) (xy 123.286446 67.920975) (xy 123.134835 67.692783) (xy 122.94179 67.498385) - (xy 122.714662 67.345185) (xy 122.462103 67.239019) (xy 122.193733 67.183931) (xy 121.919774 67.182018) (xy 121.650661 67.233354) - (xy 121.396644 67.335984) (xy 121.167399 67.485997) (xy 120.971658 67.677681) (xy 120.816877 67.903734) (xy 120.712609 68.147007) - (xy 120.619446 67.920975) (xy 120.467835 67.692783) (xy 120.27479 67.498385) (xy 120.047662 67.345185) (xy 119.795103 67.239019) - (xy 119.526733 67.183931) (xy 119.252774 67.182018) (xy 118.983661 67.233354) (xy 118.729644 67.335984) (xy 118.500399 67.485997) - (xy 118.304658 67.677681) (xy 118.149877 67.903734) (xy 118.04195 68.155546) (xy 117.984989 68.423524) (xy 117.983 68.565972) - (xy 117.983 67.755458) (xy 117.958597 67.632777) (xy 117.91073 67.517215) (xy 117.855593 67.434696) (xy 118.090695 67.439622) - (xy 118.360499 67.392048) (xy 118.615923 67.292975) (xy 118.84724 67.146177) (xy 119.045639 66.957245) (xy 119.203561 66.733375) - (xy 119.314993 66.483095) (xy 119.37569 66.215938) (xy 119.380059 65.903017) (xy 119.326846 65.634269) (xy 119.222446 65.380975) - (xy 119.070835 65.152783) (xy 118.87779 64.958385) (xy 118.650662 64.805185) (xy 118.398103 64.699019) (xy 118.129733 64.643931) - (xy 117.855774 64.642018) (xy 117.586661 64.693354) (xy 117.332644 64.795984) (xy 117.103399 64.945997) (xy 116.907658 65.137681) - (xy 116.752877 65.363734) (xy 116.64495 65.615546) (xy 116.587989 65.883524) (xy 116.584164 66.157464) (xy 116.63362 66.426928) - (xy 116.734474 66.681655) (xy 116.882883 66.911942) (xy 117.073196 67.109016) (xy 117.179645 67.183) (xy 115.761458 67.183) - (xy 115.638777 67.207403) (xy 115.523215 67.25527) (xy 115.419211 67.324763) (xy 115.330763 67.413211) (xy 115.26127 67.517215) - (xy 115.213403 67.632777) (xy 115.189 67.755458) (xy 115.189 67.880542) (xy 115.189 69.404542) (xy 115.213403 69.527223) - (xy 115.26127 69.642785) (xy 115.330763 69.746789) (xy 115.419211 69.835237) (xy 115.523215 69.90473) (xy 115.638777 69.952597) - (xy 115.761458 69.977) (xy 115.886542 69.977) (xy 117.410542 69.977) (xy 117.533223 69.952597) (xy 117.648785 69.90473) - (xy 117.752789 69.835237) (xy 117.841237 69.746789) (xy 117.91073 69.642785) (xy 117.958597 69.527223) (xy 117.983 69.404542) - (xy 117.983 69.279458) (xy 117.983 68.707467) (xy 118.03062 68.966928) (xy 118.131474 69.221655) (xy 118.279883 69.451942) - (xy 118.470196 69.649016) (xy 118.695163 69.805372) (xy 118.946215 69.915054) (xy 119.213789 69.973884) (xy 119.487695 69.979622) - (xy 119.757499 69.932048) (xy 120.012923 69.832975) (xy 120.24424 69.686177) (xy 120.442639 69.497245) (xy 120.600561 69.273375) - (xy 120.711993 69.023095) (xy 120.71486 69.010472) (xy 120.798474 69.221655) (xy 120.946883 69.451942) (xy 121.137196 69.649016) - (xy 121.362163 69.805372) (xy 121.613215 69.915054) (xy 121.880789 69.973884) (xy 122.154695 69.979622) (xy 122.424499 69.932048) - (xy 122.679923 69.832975) (xy 122.91124 69.686177) (xy 123.109639 69.497245) (xy 123.267561 69.273375) (xy 123.378993 69.023095) - (xy 123.43969 68.755938) (xy 123.444059 68.443017) (xy 123.444059 68.561747) (xy 123.442164 68.697464) (xy 123.49162 68.966928) - (xy 123.592474 69.221655) (xy 123.740883 69.451942) (xy 123.931196 69.649016) (xy 124.156163 69.805372) (xy 124.407215 69.915054) - (xy 124.674789 69.973884) (xy 124.948695 69.979622) (xy 125.218499 69.932048) (xy 125.473923 69.832975) (xy 125.70524 69.686177) - (xy 125.903639 69.497245) (xy 126.061561 69.273375) (xy 126.172993 69.023095) (xy 126.23369 68.755938) (xy 126.234966 68.664478) - (xy 126.274078 68.924133) (xy 126.367364 69.183023) (xy 126.429344 69.29898) (xy 126.669435 69.36596) (xy 127.455395 68.58) - (xy 127.455395 68.93921) (xy 126.84904 69.545565) (xy 126.91602 69.785656) (xy 127.165048 69.902756) (xy 127.432135 69.969023) - (xy 127.707017 69.98191) (xy 127.979133 69.940922) (xy 128.238023 69.847636) (xy 128.35398 69.785656) (xy 128.42096 69.545565) - (xy 128.42096 88.10033) (xy 126.174541 85.853911) (xy 126.174541 74.582603) (xy 126.138259 74.399365) (xy 126.067077 74.226665) - (xy 126.0475 74.197199) (xy 126.0475 71.729255) (xy 126.054201 71.719756) (xy 126.130178 71.549111) (xy 126.171562 71.366958) - (xy 126.174541 71.153603) (xy 126.138259 70.970365) (xy 126.067077 70.797665) (xy 125.963706 70.642079) (xy 125.832084 70.509535) - (xy 125.677224 70.40508) (xy 125.505025 70.332694) (xy 125.322045 70.295134) (xy 125.135255 70.29383) (xy 124.951768 70.328832) - (xy 124.778575 70.398807) (xy 124.622272 70.501089) (xy 124.488812 70.631782) (xy 124.383279 70.785909) (xy 124.309693 70.957599) - (xy 124.270856 71.140312) (xy 124.268248 71.327089) (xy 124.301968 71.510815) (xy 124.370732 71.684493) (xy 124.3965 71.724477) - (xy 124.3965 74.1956) (xy 124.383279 74.214909) (xy 124.309693 74.386599) (xy 124.270856 74.569312) (xy 124.268248 74.756089) - (xy 124.301968 74.939815) (xy 124.370732 75.113493) (xy 124.47192 75.270506) (xy 124.601679 75.404875) (xy 124.755065 75.511482) - (xy 124.926237 75.586265) (xy 125.108674 75.626376) (xy 125.295428 75.630288) (xy 125.479386 75.597852) (xy 125.653539 75.530302) - (xy 125.811255 75.430212) (xy 125.946527 75.301395) (xy 126.054201 75.148756) (xy 126.130178 74.978111) (xy 126.171562 74.795958) - (xy 126.174541 74.582603) (xy 126.174541 85.853911) (xy 125.633815 85.313185) (xy 125.5794 85.268487) (xy 125.525505 85.223264) - (xy 125.521997 85.221335) (xy 125.518897 85.218789) (xy 125.456831 85.18551) (xy 125.430757 85.171176) (xy 125.4276 85.166423) - (xy 125.278428 85.016207) (xy 125.102921 84.897825) (xy 124.907761 84.815788) (xy 124.700384 84.773219) (xy 124.488689 84.771741) - (xy 124.280738 84.81141) (xy 124.084452 84.890715) (xy 124.036866 84.921854) (xy 124.0306 84.912423) (xy 123.881428 84.762207) - (xy 123.705921 84.643825) (xy 123.510761 84.561788) (xy 123.303384 84.519219) (xy 123.091689 84.517741) (xy 122.883738 84.55741) - (xy 122.687452 84.636715) (xy 122.510308 84.752634) (xy 122.492367 84.770202) (xy 122.484428 84.762207) (xy 122.308921 84.643825) - (xy 122.113761 84.561788) (xy 121.906384 84.519219) (xy 121.694689 84.517741) (xy 121.486738 84.55741) (xy 121.290452 84.636715) - (xy 121.113308 84.752634) (xy 121.030981 84.833254) (xy 120.960428 84.762207) (xy 120.784921 84.643825) (xy 120.589761 84.561788) - (xy 120.382384 84.519219) (xy 120.170689 84.517741) (xy 119.962738 84.55741) (xy 119.766452 84.636715) (xy 119.589308 84.752634) - (xy 119.438054 84.900753) (xy 119.31845 85.075431) (xy 119.235052 85.270012) (xy 119.191037 85.477087) (xy 119.188081 85.688767) - (xy 119.226297 85.89699) (xy 119.30423 86.093825) (xy 119.41891 86.271773) (xy 119.507 86.362993) (xy 119.507 86.487) - (xy 119.513874 86.557113) (xy 119.520004 86.62717) (xy 119.52112 86.631012) (xy 119.521512 86.635007) (xy 119.541877 86.702459) - (xy 119.561494 86.769982) (xy 119.563337 86.773537) (xy 119.564496 86.777376) (xy 119.597556 86.839553) (xy 119.629933 86.902014) - (xy 119.632431 86.905144) (xy 119.634314 86.908684) (xy 119.6788 86.96323) (xy 119.722714 87.01824) (xy 119.728212 87.023814) - (xy 119.728307 87.023931) (xy 119.728414 87.02402) (xy 119.730185 87.025815) (xy 121.635185 88.930815) (xy 121.689599 88.975512) - (xy 121.743495 89.020736) (xy 121.747002 89.022664) (xy 121.750103 89.025211) (xy 121.812203 89.058509) (xy 121.873816 89.092381) - (xy 121.877631 89.093591) (xy 121.881167 89.095487) (xy 121.948551 89.116088) (xy 122.015571 89.137348) (xy 122.019548 89.137794) - (xy 122.023385 89.138967) (xy 122.093422 89.14608) (xy 122.163361 89.153926) (xy 122.171197 89.15398) (xy 122.17134 89.153995) - (xy 122.171473 89.153982) (xy 122.174 89.154) (xy 122.322988 89.154) (xy 122.256308 89.197634) (xy 122.105054 89.345753) - (xy 121.98545 89.520431) (xy 121.902052 89.715012) (xy 121.858037 89.922087) (xy 121.855081 90.133767) (xy 121.893297 90.34199) - (xy 121.97123 90.538825) (xy 122.08591 90.716773) (xy 122.232969 90.869058) (xy 122.406807 90.989879) (xy 122.600802 91.074633) - (xy 122.807564 91.120093) (xy 123.019219 91.124526) (xy 123.227704 91.087765) (xy 123.425077 91.011208) (xy 123.603822 90.897773) - (xy 123.75713 90.75178) (xy 123.879161 90.57879) (xy 123.965268 90.385392) (xy 124.01217 90.178952) (xy 124.015546 89.93715) - (xy 123.974426 89.729481) (xy 123.893754 89.533753) (xy 123.7766 89.357423) (xy 123.627428 89.207207) (xy 123.548546 89.154) - (xy 124.14437 89.154) (xy 125.857 90.86663) (xy 125.857 92.090879) (xy 125.759025 92.049694) (xy 125.576045 92.012134) - (xy 125.389255 92.01083) (xy 125.205768 92.045832) (xy 125.032575 92.115807) (xy 124.876272 92.218089) (xy 124.769387 92.322757) - (xy 124.490815 92.044185) (xy 124.4364 91.999487) (xy 124.382505 91.954264) (xy 124.378997 91.952335) (xy 124.375897 91.949789) - (xy 124.313831 91.91651) (xy 124.252184 91.882619) (xy 124.248363 91.881407) (xy 124.244833 91.879514) (xy 124.177535 91.858939) - (xy 124.110429 91.837652) (xy 124.106445 91.837205) (xy 124.102615 91.836034) (xy 124.032627 91.828924) (xy 123.962639 91.821074) - (xy 123.954802 91.821019) (xy 123.95466 91.821005) (xy 123.954526 91.821017) (xy 123.952 91.821) (xy 121.666 91.821) - (xy 121.595936 91.827869) (xy 121.52583 91.834003) (xy 121.521982 91.83512) (xy 121.517993 91.835512) (xy 121.450581 91.855864) - (xy 121.383018 91.875494) (xy 121.379462 91.877337) (xy 121.375624 91.878496) (xy 121.313446 91.911556) (xy 121.250986 91.943933) - (xy 121.247855 91.946431) (xy 121.244316 91.948314) (xy 121.189769 91.9928) (xy 121.13476 92.036714) (xy 121.129181 92.042215) - (xy 121.129069 92.042307) (xy 121.128983 92.04241) (xy 121.127185 92.044184) (xy 120.365185 92.806185) (xy 120.320487 92.860599) - (xy 120.275264 92.914495) (xy 120.273335 92.918002) (xy 120.270789 92.921103) (xy 120.23751 92.983168) (xy 120.203619 93.044816) - (xy 120.202407 93.048636) (xy 120.200514 93.052167) (xy 120.179939 93.119464) (xy 120.158652 93.186571) (xy 120.158205 93.190554) - (xy 120.157034 93.194385) (xy 120.149924 93.264372) (xy 120.142074 93.334361) (xy 120.142019 93.342197) (xy 120.142005 93.34234) - (xy 120.142017 93.342473) (xy 120.142 93.345) (xy 120.142 94.996) (xy 120.148874 95.066113) (xy 120.155004 95.13617) - (xy 120.15612 95.140012) (xy 120.156512 95.144007) (xy 120.176877 95.211459) (xy 120.196494 95.278982) (xy 120.198337 95.282537) - (xy 120.199496 95.286376) (xy 120.232556 95.348553) (xy 120.264933 95.411014) (xy 120.267431 95.414144) (xy 120.269314 95.417684) - (xy 120.3138 95.47223) (xy 120.357714 95.52724) (xy 120.363212 95.532814) (xy 120.363307 95.532931) (xy 120.363414 95.53302) - (xy 120.365185 95.534815) (xy 121.635184 96.804815) (xy 121.689597 96.84951) (xy 121.743495 96.894736) (xy 121.747006 96.896666) - (xy 121.750103 96.89921) (xy 121.812129 96.932468) (xy 121.873816 96.966381) (xy 121.877636 96.967592) (xy 121.881167 96.969486) - (xy 121.948464 96.99006) (xy 122.015571 97.011348) (xy 122.019554 97.011794) (xy 122.023385 97.012966) (xy 122.093372 97.020075) - (xy 122.163361 97.027926) (xy 122.171197 97.02798) (xy 122.17134 97.027995) (xy 122.171473 97.027982) (xy 122.174 97.028) - (xy 123.636369 97.028) (xy 123.825 97.21663) (xy 123.825 101.03037) (xy 122.872552 101.982817) (xy 122.872552 98.306697) - (xy 122.826595 98.074596) (xy 122.736431 97.855842) (xy 122.605495 97.658767) (xy 122.438773 97.490878) (xy 122.242617 97.358569) - (xy 122.024498 97.26688) (xy 121.792724 97.219303) (xy 121.556123 97.217651) (xy 121.323707 97.261987) (xy 121.104329 97.350622) - (xy 120.906344 97.480179) (xy 120.737295 97.645724) (xy 120.60362 97.840952) (xy 120.510411 98.058425) (xy 120.461217 98.289862) - (xy 120.457914 98.526446) (xy 120.500626 98.759166) (xy 120.587727 98.979157) (xy 120.715899 99.178041) (xy 120.88026 99.348242) - (xy 121.074549 99.483277) (xy 121.291367 99.578002) (xy 121.522454 99.62881) (xy 121.759009 99.633765) (xy 121.992022 99.592679) - (xy 122.212616 99.507116) (xy 122.41239 99.380335) (xy 122.583734 99.217167) (xy 122.720122 99.023824) (xy 122.816358 98.807673) - (xy 122.868778 98.576946) (xy 122.872552 98.306697) (xy 122.872552 101.982817) (xy 119.948351 104.907018) (xy 119.910426 104.715481) - (xy 119.829754 104.519753) (xy 119.7126 104.343423) (xy 119.563428 104.193207) (xy 119.387921 104.074825) (xy 119.192761 103.992788) - (xy 118.985384 103.950219) (xy 118.773689 103.948741) (xy 118.565738 103.98841) (xy 118.369452 104.067715) (xy 118.192308 104.183634) - (xy 118.041054 104.331753) (xy 117.92145 104.506431) (xy 117.838052 104.701012) (xy 117.794037 104.908087) (xy 117.791081 105.119767) - (xy 117.829297 105.32799) (xy 117.90723 105.524825) (xy 118.02191 105.702773) (xy 118.0465 105.728236) (xy 118.0465 109.728) - (xy 117.664657 109.728) (xy 117.51399 109.681361) (xy 117.353763 109.66452) (xy 117.193317 109.679122) (xy 117.038762 109.72461) - (xy 116.895987 109.799251) (xy 116.770428 109.900203) (xy 116.666869 110.02362) (xy 116.589254 110.164801) (xy 116.540539 110.318369) - (xy 116.52258 110.478474) (xy 116.5225 110.49) (xy 116.5225 114.720066) (xy 116.459059 114.783507) (xy 116.459059 109.718017) - (xy 116.459059 98.288017) (xy 116.405846 98.019269) (xy 116.301446 97.765975) (xy 116.149835 97.537783) (xy 115.95679 97.343385) - (xy 115.729662 97.190185) (xy 115.648393 97.156022) (xy 115.694923 97.137975) (xy 115.92624 96.991177) (xy 116.124639 96.802245) - (xy 116.282561 96.578375) (xy 116.393993 96.328095) (xy 116.45469 96.060938) (xy 116.459059 95.748017) (xy 116.405846 95.479269) - (xy 116.301446 95.225975) (xy 116.149835 94.997783) (xy 115.95679 94.803385) (xy 115.729662 94.650185) (xy 115.648393 94.616022) - (xy 115.694923 94.597975) (xy 115.92624 94.451177) (xy 116.124639 94.262245) (xy 116.282561 94.038375) (xy 116.393993 93.788095) - (xy 116.45469 93.520938) (xy 116.459059 93.208017) (xy 116.405846 92.939269) (xy 116.301446 92.685975) (xy 116.149835 92.457783) - (xy 115.95679 92.263385) (xy 115.729662 92.110185) (xy 115.697059 92.096479) (xy 115.697059 88.890017) (xy 115.643846 88.621269) - (xy 115.539446 88.367975) (xy 115.387835 88.139783) (xy 115.19479 87.945385) (xy 114.967662 87.792185) (xy 114.886393 87.758022) - (xy 114.932923 87.739975) (xy 115.16424 87.593177) (xy 115.362639 87.404245) (xy 115.520561 87.180375) (xy 115.631993 86.930095) - (xy 115.69269 86.662938) (xy 115.697059 86.350017) (xy 115.643846 86.081269) (xy 115.539446 85.827975) (xy 115.387835 85.599783) - (xy 115.19479 85.405385) (xy 114.967662 85.252185) (xy 114.715103 85.146019) (xy 114.681059 85.13903) (xy 114.681059 75.936017) - (xy 114.627846 75.667269) (xy 114.523446 75.413975) (xy 114.371835 75.185783) (xy 114.17879 74.991385) (xy 113.951662 74.838185) - (xy 113.870393 74.804022) (xy 113.916923 74.785975) (xy 114.14824 74.639177) (xy 114.346639 74.450245) (xy 114.504561 74.226375) - (xy 114.615993 73.976095) (xy 114.67669 73.708938) (xy 114.681059 73.396017) (xy 114.627846 73.127269) (xy 114.523446 72.873975) - (xy 114.371835 72.645783) (xy 114.17879 72.451385) (xy 113.951662 72.298185) (xy 113.699103 72.192019) (xy 113.430733 72.136931) - (xy 113.156774 72.135018) (xy 112.949575 72.174543) (xy 112.957161 72.16379) (xy 113.043268 71.970392) (xy 113.09017 71.763952) - (xy 113.093546 71.52215) (xy 113.052426 71.314481) (xy 112.971754 71.118753) (xy 112.8546 70.942423) (xy 112.705428 70.792207) - (xy 112.529921 70.673825) (xy 112.334761 70.591788) (xy 112.127384 70.549219) (xy 112.014109 70.548428) (xy 112.014109 65.79094) - (xy 111.917357 65.302307) (xy 111.727538 64.841772) (xy 111.451883 64.426878) (xy 111.100891 64.073427) (xy 110.687931 63.794882) - (xy 110.228733 63.601853) (xy 109.740787 63.501692) (xy 109.242679 63.498214) (xy 108.753383 63.591553) (xy 108.291534 63.778151) - (xy 107.874725 64.050904) (xy 107.518832 64.39942) (xy 107.237411 64.810425) (xy 107.041181 65.268264) (xy 106.937616 65.755499) - (xy 106.930661 66.25357) (xy 107.020581 66.743506) (xy 107.203951 67.206646) (xy 107.473787 67.625349) (xy 107.81981 67.983667) - (xy 108.228841 68.26795) (xy 108.685299 68.467372) (xy 109.171799 68.574336) (xy 109.669809 68.584768) (xy 110.160361 68.49827) - (xy 110.62477 68.318138) (xy 111.045347 68.051232) (xy 111.406071 67.707719) (xy 111.693203 67.300683) (xy 111.895807 66.845628) - (xy 112.006164 66.359887) (xy 112.014109 65.79094) (xy 112.014109 70.548428) (xy 111.915689 70.547741) (xy 111.707738 70.58741) - (xy 111.511452 70.666715) (xy 111.334308 70.782634) (xy 111.183054 70.930753) (xy 111.06345 71.105431) (xy 110.980052 71.300012) - (xy 110.936037 71.507087) (xy 110.933081 71.718767) (xy 110.971297 71.92699) (xy 111.04923 72.123825) (xy 111.083127 72.176423) - (xy 110.890733 72.136931) (xy 110.616774 72.135018) (xy 110.347661 72.186354) (xy 110.2995 72.205812) (xy 110.2995 72.076585) - (xy 110.417161 71.90979) (xy 110.503268 71.716392) (xy 110.55017 71.509952) (xy 110.553546 71.26815) (xy 110.512426 71.060481) - (xy 110.431754 70.864753) (xy 110.3146 70.688423) (xy 110.165428 70.538207) (xy 109.989921 70.419825) (xy 109.794761 70.337788) - (xy 109.587384 70.295219) (xy 109.375689 70.293741) (xy 109.167738 70.33341) (xy 108.971452 70.412715) (xy 108.794308 70.528634) - (xy 108.643054 70.676753) (xy 108.52345 70.851431) (xy 108.440052 71.046012) (xy 108.396037 71.253087) (xy 108.393081 71.464767) - (xy 108.431297 71.67299) (xy 108.50923 71.869825) (xy 108.62391 72.047773) (xy 108.6485 72.073236) (xy 108.6485 72.204376) - (xy 108.619103 72.192019) (xy 108.350733 72.136931) (xy 108.076774 72.135018) (xy 107.807661 72.186354) (xy 107.553644 72.288984) - (xy 107.324399 72.438997) (xy 107.128658 72.630681) (xy 106.973877 72.856734) (xy 106.86595 73.108546) (xy 106.808989 73.376524) - (xy 106.805164 73.650464) (xy 106.85462 73.919928) (xy 106.955474 74.174655) (xy 107.103883 74.404942) (xy 107.294196 74.602016) - (xy 107.519163 74.758372) (xy 107.619699 74.802295) (xy 107.553644 74.828984) (xy 107.324399 74.978997) (xy 107.128658 75.170681) - (xy 106.973877 75.396734) (xy 106.86595 75.648546) (xy 106.808989 75.916524) (xy 106.805164 76.190464) (xy 106.85462 76.459928) - (xy 106.955474 76.714655) (xy 107.103883 76.944942) (xy 107.294196 77.142016) (xy 107.400645 77.216) (xy 107.379458 77.216) - (xy 107.256777 77.240403) (xy 107.141215 77.28827) (xy 107.037211 77.357763) (xy 106.948763 77.446211) (xy 106.87927 77.550215) - (xy 106.831403 77.665777) (xy 106.807 77.788458) (xy 106.807 77.913542) (xy 106.807 79.437542) (xy 106.831403 79.560223) - (xy 106.87927 79.675785) (xy 106.948763 79.779789) (xy 107.037211 79.868237) (xy 107.141215 79.93773) (xy 107.256777 79.985597) - (xy 107.379458 80.01) (xy 107.504542 80.01) (xy 109.028542 80.01) (xy 109.151223 79.985597) (xy 109.266785 79.93773) - (xy 109.370789 79.868237) (xy 109.459237 79.779789) (xy 109.474 79.757694) (xy 109.488763 79.779789) (xy 109.577211 79.868237) - (xy 109.681215 79.93773) (xy 109.796777 79.985597) (xy 109.919458 80.01) (xy 110.044542 80.01) (xy 110.45825 80.01) - (xy 110.617 79.85125) (xy 110.617 78.74) (xy 110.597 78.74) (xy 110.597 78.486) (xy 110.617 78.486) - (xy 110.617 78.466) (xy 110.871 78.466) (xy 110.871 78.486) (xy 110.891 78.486) (xy 110.891 78.74) - (xy 110.871 78.74) (xy 110.871 79.85125) (xy 111.02975 80.01) (xy 111.443458 80.01) (xy 111.568542 80.01) - (xy 111.691223 79.985597) (xy 111.806785 79.93773) (xy 111.910789 79.868237) (xy 111.999237 79.779789) (xy 112.014 79.757694) - (xy 112.028763 79.779789) (xy 112.117211 79.868237) (xy 112.221215 79.93773) (xy 112.336777 79.985597) (xy 112.459458 80.01) - (xy 112.584542 80.01) (xy 114.108542 80.01) (xy 114.231223 79.985597) (xy 114.346785 79.93773) (xy 114.450789 79.868237) - (xy 114.539237 79.779789) (xy 114.60873 79.675785) (xy 114.656597 79.560223) (xy 114.681 79.437542) (xy 114.681 79.312458) - (xy 114.681 77.788458) (xy 114.656597 77.665777) (xy 114.60873 77.550215) (xy 114.539237 77.446211) (xy 114.450789 77.357763) - (xy 114.346785 77.28827) (xy 114.231223 77.240403) (xy 114.108542 77.216) (xy 114.090216 77.216) (xy 114.14824 77.179177) - (xy 114.346639 76.990245) (xy 114.504561 76.766375) (xy 114.615993 76.516095) (xy 114.67669 76.248938) (xy 114.681059 75.936017) - (xy 114.681059 85.13903) (xy 114.446733 85.090931) (xy 114.172774 85.089018) (xy 113.903661 85.140354) (xy 113.649644 85.242984) - (xy 113.420399 85.392997) (xy 113.224658 85.584681) (xy 113.157 85.683493) (xy 113.157 85.662458) (xy 113.132597 85.539777) - (xy 113.08473 85.424215) (xy 113.015237 85.320211) (xy 112.926789 85.231763) (xy 112.822785 85.16227) (xy 112.707223 85.114403) - (xy 112.584542 85.09) (xy 112.459458 85.09) (xy 110.935458 85.09) (xy 110.812777 85.114403) (xy 110.697215 85.16227) - (xy 110.593211 85.231763) (xy 110.504763 85.320211) (xy 110.43527 85.424215) (xy 110.387403 85.539777) (xy 110.363 85.662458) - (xy 110.363 85.787542) (xy 110.363 87.311542) (xy 110.387403 87.434223) (xy 110.43527 87.549785) (xy 110.504763 87.653789) - (xy 110.593211 87.742237) (xy 110.697215 87.81173) (xy 110.812777 87.859597) (xy 110.935458 87.884) (xy 110.955274 87.884) - (xy 110.880399 87.932997) (xy 110.684658 88.124681) (xy 110.529877 88.350734) (xy 110.42195 88.602546) (xy 110.364989 88.870524) - (xy 110.361164 89.144464) (xy 110.41062 89.413928) (xy 110.511474 89.668655) (xy 110.659883 89.898942) (xy 110.850196 90.096016) - (xy 111.075163 90.252372) (xy 111.326215 90.362054) (xy 111.593789 90.420884) (xy 111.867695 90.426622) (xy 112.137499 90.379048) - (xy 112.392923 90.279975) (xy 112.62424 90.133177) (xy 112.822639 89.944245) (xy 112.980561 89.720375) (xy 113.028934 89.611726) - (xy 113.051474 89.668655) (xy 113.199883 89.898942) (xy 113.390196 90.096016) (xy 113.615163 90.252372) (xy 113.866215 90.362054) - (xy 114.133789 90.420884) (xy 114.407695 90.426622) (xy 114.677499 90.379048) (xy 114.932923 90.279975) (xy 115.16424 90.133177) - (xy 115.362639 89.944245) (xy 115.520561 89.720375) (xy 115.631993 89.470095) (xy 115.69269 89.202938) (xy 115.697059 88.890017) - (xy 115.697059 92.096479) (xy 115.477103 92.004019) (xy 115.208733 91.948931) (xy 114.934774 91.947018) (xy 114.665661 91.998354) - (xy 114.411644 92.100984) (xy 114.182399 92.250997) (xy 113.986658 92.442681) (xy 113.919 92.541493) (xy 113.919 92.520458) - (xy 113.894597 92.397777) (xy 113.84673 92.282215) (xy 113.777237 92.178211) (xy 113.688789 92.089763) (xy 113.584785 92.02027) - (xy 113.469223 91.972403) (xy 113.346542 91.948) (xy 112.80775 91.948) (xy 112.649 92.10675) (xy 112.649 93.218) - (xy 112.669 93.218) (xy 112.669 93.472) (xy 112.649 93.472) (xy 112.649 94.58325) (xy 112.68075 94.615) - (xy 112.649 94.64675) (xy 112.649 95.758) (xy 112.669 95.758) (xy 112.669 96.012) (xy 112.649 96.012) - (xy 112.649 97.12325) (xy 112.68075 97.155) (xy 112.649 97.18675) (xy 112.649 98.298) (xy 112.669 98.298) - (xy 112.669 98.552) (xy 112.649 98.552) (xy 112.649 99.66325) (xy 112.80775 99.822) (xy 113.346542 99.822) - (xy 113.469223 99.797597) (xy 113.584785 99.74973) (xy 113.688789 99.680237) (xy 113.777237 99.591789) (xy 113.84673 99.487785) - (xy 113.894597 99.372223) (xy 113.919 99.249542) (xy 113.919 99.2304) (xy 113.961883 99.296942) (xy 114.152196 99.494016) - (xy 114.377163 99.650372) (xy 114.628215 99.760054) (xy 114.895789 99.818884) (xy 115.169695 99.824622) (xy 115.439499 99.777048) - (xy 115.694923 99.677975) (xy 115.92624 99.531177) (xy 116.124639 99.342245) (xy 116.282561 99.118375) (xy 116.393993 98.868095) - (xy 116.45469 98.600938) (xy 116.459059 98.288017) (xy 116.459059 109.718017) (xy 116.405846 109.449269) (xy 116.301446 109.195975) - (xy 116.149835 108.967783) (xy 115.95679 108.773385) (xy 115.729662 108.620185) (xy 115.477103 108.514019) (xy 115.208733 108.458931) - (xy 114.934774 108.457018) (xy 114.665661 108.508354) (xy 114.411644 108.610984) (xy 114.182399 108.760997) (xy 113.986658 108.952681) - (xy 113.919 109.051493) (xy 113.919 109.030458) (xy 113.894597 108.907777) (xy 113.84673 108.792215) (xy 113.777237 108.688211) - (xy 113.688789 108.599763) (xy 113.584785 108.53027) (xy 113.469223 108.482403) (xy 113.346542 108.458) (xy 113.221458 108.458) - (xy 112.395 108.458) (xy 112.395 99.66325) (xy 112.395 98.552) (xy 112.395 98.298) (xy 112.395 97.18675) - (xy 112.36325 97.155) (xy 112.395 97.12325) (xy 112.395 96.012) (xy 112.395 95.758) (xy 112.395 94.64675) - (xy 112.36325 94.615) (xy 112.395 94.58325) (xy 112.395 93.472) (xy 112.395 93.218) (xy 112.395 92.10675) - (xy 112.23625 91.948) (xy 111.697458 91.948) (xy 111.574777 91.972403) (xy 111.459215 92.02027) (xy 111.355211 92.089763) - (xy 111.266763 92.178211) (xy 111.19727 92.282215) (xy 111.149403 92.397777) (xy 111.125 92.520458) (xy 111.125 92.645542) - (xy 111.125 93.05925) (xy 111.28375 93.218) (xy 112.395 93.218) (xy 112.395 93.472) (xy 111.28375 93.472) - (xy 111.125 93.63075) (xy 111.125 94.044458) (xy 111.125 94.169542) (xy 111.149403 94.292223) (xy 111.19727 94.407785) - (xy 111.266763 94.511789) (xy 111.355211 94.600237) (xy 111.377305 94.615) (xy 111.355211 94.629763) (xy 111.266763 94.718211) - (xy 111.19727 94.822215) (xy 111.149403 94.937777) (xy 111.125 95.060458) (xy 111.125 95.185542) (xy 111.125 95.59925) - (xy 111.28375 95.758) (xy 112.395 95.758) (xy 112.395 96.012) (xy 111.28375 96.012) (xy 111.125 96.17075) - (xy 111.125 96.584458) (xy 111.125 96.709542) (xy 111.149403 96.832223) (xy 111.19727 96.947785) (xy 111.266763 97.051789) - (xy 111.355211 97.140237) (xy 111.377305 97.155) (xy 111.355211 97.169763) (xy 111.266763 97.258211) (xy 111.19727 97.362215) - (xy 111.149403 97.477777) (xy 111.125 97.600458) (xy 111.125 97.725542) (xy 111.125 98.13925) (xy 111.28375 98.298) - (xy 112.395 98.298) (xy 112.395 98.552) (xy 111.28375 98.552) (xy 111.125 98.71075) (xy 111.125 99.124458) - (xy 111.125 99.249542) (xy 111.149403 99.372223) (xy 111.19727 99.487785) (xy 111.266763 99.591789) (xy 111.355211 99.680237) - (xy 111.459215 99.74973) (xy 111.574777 99.797597) (xy 111.697458 99.822) (xy 112.23625 99.822) (xy 112.395 99.66325) - (xy 112.395 108.458) (xy 111.697458 108.458) (xy 111.574777 108.482403) (xy 111.459215 108.53027) (xy 111.355211 108.599763) - (xy 111.266763 108.688211) (xy 111.19727 108.792215) (xy 111.149403 108.907777) (xy 111.125 109.030458) (xy 111.125 109.155542) - (xy 111.125 110.679542) (xy 111.149403 110.802223) (xy 111.19727 110.917785) (xy 111.266763 111.021789) (xy 111.355211 111.110237) - (xy 111.459215 111.17973) (xy 111.574777 111.227597) (xy 111.697458 111.252) (xy 111.822542 111.252) (xy 113.346542 111.252) - (xy 113.469223 111.227597) (xy 113.584785 111.17973) (xy 113.688789 111.110237) (xy 113.777237 111.021789) (xy 113.84673 110.917785) - (xy 113.894597 110.802223) (xy 113.919 110.679542) (xy 113.919 110.6604) (xy 113.961883 110.726942) (xy 114.152196 110.924016) - (xy 114.377163 111.080372) (xy 114.628215 111.190054) (xy 114.895789 111.248884) (xy 115.169695 111.254622) (xy 115.439499 111.207048) - (xy 115.694923 111.107975) (xy 115.92624 110.961177) (xy 116.124639 110.772245) (xy 116.282561 110.548375) (xy 116.393993 110.298095) - (xy 116.45469 110.030938) (xy 116.459059 109.718017) (xy 116.459059 114.783507) (xy 115.748283 115.494283) (xy 115.699867 115.553225) - (xy 115.650869 115.61162) (xy 115.648777 115.615424) (xy 115.646023 115.618778) (xy 115.60999 115.685977) (xy 115.573254 115.752801) - (xy 115.571941 115.756937) (xy 115.56989 115.760764) (xy 115.547592 115.833695) (xy 115.524539 115.906369) (xy 115.524055 115.910682) - (xy 115.522786 115.914834) (xy 115.515077 115.990715) (xy 115.50658 116.066474) (xy 115.506521 116.074949) (xy 115.506504 116.075119) - (xy 115.506518 116.075276) (xy 115.5065 116.078) (xy 115.5065 130.214066) (xy 113.970283 131.750283) (xy 113.921867 131.809225) - (xy 113.872869 131.86762) (xy 113.870777 131.871424) (xy 113.868023 131.874778) (xy 113.83199 131.941977) (xy 113.795254 132.008801) - (xy 113.793941 132.012937) (xy 113.79189 132.016764) (xy 113.769592 132.089695) (xy 113.746539 132.162369) (xy 113.746055 132.166682) - (xy 113.744786 132.170834) (xy 113.737077 132.246715) (xy 113.72858 132.322474) (xy 113.728521 132.330949) (xy 113.728504 132.331119) - (xy 113.728518 132.331276) (xy 113.7285 132.334) (xy 113.7285 135.577376) (xy 113.699103 135.565019) (xy 113.430733 135.509931) - (xy 113.156774 135.508018) (xy 112.887661 135.559354) (xy 112.633644 135.661984) (xy 112.404399 135.811997) (xy 112.208658 136.003681) - (xy 112.053877 136.229734) (xy 112.01435 136.321955) (xy 111.983446 136.246975) (xy 111.831835 136.018783) (xy 111.63879 135.824385) - (xy 111.411662 135.671185) (xy 111.159103 135.565019) (xy 110.890733 135.509931) (xy 110.616774 135.508018) (xy 110.347661 135.559354) - (xy 110.093644 135.661984) (xy 109.864399 135.811997) (xy 109.668658 136.003681) (xy 109.513877 136.229734) (xy 109.40595 136.481546) - (xy 109.348989 136.749524) (xy 109.345164 137.023464) (xy 109.39462 137.292928) (xy 109.495474 137.547655) (xy 109.643883 137.777942) - (xy 109.834196 137.975016) (xy 110.059163 138.131372) (xy 110.155086 138.173279) (xy 110.140977 138.178364) (xy 110.02502 138.240344) - (xy 109.95804 138.480435) (xy 110.744 139.266395) (xy 111.52996 138.480435) (xy 111.46298 138.240344) (xy 111.329256 138.177463) - (xy 111.376923 138.158975) (xy 111.60824 138.012177) (xy 111.806639 137.823245) (xy 111.964561 137.599375) (xy 112.012934 137.490726) - (xy 112.035474 137.547655) (xy 112.183883 137.777942) (xy 112.374196 137.975016) (xy 112.599163 138.131372) (xy 112.699699 138.175295) - (xy 112.633644 138.201984) (xy 112.404399 138.351997) (xy 112.208658 138.543681) (xy 112.053877 138.769734) (xy 112.016591 138.856728) - (xy 112.011636 138.842977) (xy 111.949656 138.72702) (xy 111.709565 138.66004) (xy 110.923605 139.446) (xy 110.937747 139.460142) - (xy 110.758142 139.639747) (xy 110.744 139.625605) (xy 110.729857 139.639747) (xy 110.550252 139.460142) (xy 110.564395 139.446) - (xy 109.778435 138.66004) (xy 109.538344 138.72702) (xy 109.429378 138.958748) (xy 107.061 136.590369) (xy 107.061 114.989313) - (xy 107.16426 115.096242) (xy 107.358549 115.231277) (xy 107.575367 115.326002) (xy 107.806454 115.37681) (xy 108.043009 115.381765) - (xy 108.276022 115.340679) (xy 108.496616 115.255116) (xy 108.69639 115.128335) (xy 108.867734 114.965167) (xy 109.004122 114.771824) - (xy 109.100358 114.555673) (xy 109.152778 114.324946) (xy 109.156552 114.054697) (xy 109.110595 113.822596) (xy 109.029552 113.625971) - (xy 109.029552 83.066697) (xy 108.983595 82.834596) (xy 108.893431 82.615842) (xy 108.762495 82.418767) (xy 108.595773 82.250878) - (xy 108.399617 82.118569) (xy 108.181498 82.02688) (xy 107.949724 81.979303) (xy 107.713123 81.977651) (xy 107.480707 82.021987) - (xy 107.261329 82.110622) (xy 107.063344 82.240179) (xy 106.894295 82.405724) (xy 106.76062 82.600952) (xy 106.667411 82.818425) - (xy 106.618217 83.049862) (xy 106.614914 83.286446) (xy 106.657626 83.519166) (xy 106.744727 83.739157) (xy 106.872899 83.938041) - (xy 107.03726 84.108242) (xy 107.231549 84.243277) (xy 107.448367 84.338002) (xy 107.679454 84.38881) (xy 107.916009 84.393765) - (xy 108.149022 84.352679) (xy 108.369616 84.267116) (xy 108.56939 84.140335) (xy 108.740734 83.977167) (xy 108.877122 83.783824) - (xy 108.973358 83.567673) (xy 109.025778 83.336946) (xy 109.029552 83.066697) (xy 109.029552 113.625971) (xy 109.020431 113.603842) - (xy 108.889495 113.406767) (xy 108.722773 113.238878) (xy 108.526617 113.106569) (xy 108.308498 113.01488) (xy 108.076724 112.967303) - (xy 107.840123 112.965651) (xy 107.607707 113.009987) (xy 107.388329 113.098622) (xy 107.190344 113.228179) (xy 107.061 113.354841) - (xy 107.061 101.6) (xy 107.05413 101.529936) (xy 107.047997 101.45983) (xy 107.046879 101.455982) (xy 107.046488 101.451993) - (xy 107.026149 101.384627) (xy 107.006507 101.317018) (xy 107.004661 101.313457) (xy 107.003504 101.309624) (xy 106.970462 101.247482) - (xy 106.938067 101.184986) (xy 106.935568 101.181855) (xy 106.933686 101.178316) (xy 106.889199 101.123769) (xy 106.845286 101.06876) - (xy 106.839784 101.063181) (xy 106.839693 101.063069) (xy 106.839589 101.062983) (xy 106.837816 101.061185) (xy 105.186815 99.410185) - (xy 105.1324 99.365487) (xy 105.078505 99.320264) (xy 105.074997 99.318335) (xy 105.071897 99.315789) (xy 105.009831 99.28251) - (xy 104.948184 99.248619) (xy 104.944363 99.247407) (xy 104.940833 99.245514) (xy 104.873535 99.224939) (xy 104.806429 99.203652) - (xy 104.802445 99.203205) (xy 104.798615 99.202034) (xy 104.728627 99.194924) (xy 104.658639 99.187074) (xy 104.650802 99.187019) - (xy 104.65066 99.187005) (xy 104.650526 99.187017) (xy 104.648 99.187) (xy 104.330552 99.187) (xy 104.330552 84.463697) - (xy 104.284595 84.231596) (xy 104.194431 84.012842) (xy 104.063495 83.815767) (xy 104.014979 83.766911) (xy 104.014979 60.825735) - (xy 103.954957 60.230853) (xy 103.780033 59.659112) (xy 103.505 59.144563) (xy 103.097242 58.880363) (xy 102.917637 59.059968) - (xy 102.917637 58.700758) (xy 102.653437 58.293) (xy 102.125465 58.012407) (xy 101.552896 57.840208) (xy 100.957735 57.783021) - (xy 100.362853 57.843043) (xy 99.791112 58.017967) (xy 99.276563 58.293) (xy 99.012363 58.700758) (xy 100.965 60.653395) - (xy 102.917637 58.700758) (xy 102.917637 59.059968) (xy 101.144605 60.833) (xy 103.097242 62.785637) (xy 103.505 62.521437) - (xy 103.785593 61.993465) (xy 103.957792 61.420896) (xy 104.014979 60.825735) (xy 104.014979 83.766911) (xy 104.0003 83.752129) - (xy 104.0003 69.391842) (xy 104.0003 67.21475) (xy 104.0003 66.64325) (xy 104.0003 64.466158) (xy 103.975897 64.343477) - (xy 103.92803 64.227915) (xy 103.858537 64.123911) (xy 103.770089 64.035463) (xy 103.666085 63.96597) (xy 103.550523 63.918103) - (xy 103.427842 63.8937) (xy 103.302758 63.8937) (xy 102.917637 63.8937) (xy 101.25075 63.8937) (xy 101.092 64.05245) - (xy 101.092 66.802) (xy 103.84155 66.802) (xy 104.0003 66.64325) (xy 104.0003 67.21475) (xy 103.84155 67.056) - (xy 101.092 67.056) (xy 101.092 69.80555) (xy 101.25075 69.9643) (xy 103.302758 69.9643) (xy 103.427842 69.9643) - (xy 103.550523 69.939897) (xy 103.666085 69.89203) (xy 103.770089 69.822537) (xy 103.858537 69.734089) (xy 103.92803 69.630085) - (xy 103.975897 69.514523) (xy 104.0003 69.391842) (xy 104.0003 83.752129) (xy 103.896773 83.647878) (xy 103.700617 83.515569) - (xy 103.482498 83.42388) (xy 103.250724 83.376303) (xy 103.014123 83.374651) (xy 102.781707 83.418987) (xy 102.562329 83.507622) - (xy 102.364344 83.637179) (xy 102.195295 83.802724) (xy 102.06162 83.997952) (xy 101.968411 84.215425) (xy 101.919217 84.446862) - (xy 101.915914 84.683446) (xy 101.958626 84.916166) (xy 102.045727 85.136157) (xy 102.173899 85.335041) (xy 102.33826 85.505242) - (xy 102.532549 85.640277) (xy 102.749367 85.735002) (xy 102.980454 85.78581) (xy 103.217009 85.790765) (xy 103.450022 85.749679) - (xy 103.670616 85.664116) (xy 103.87039 85.537335) (xy 104.041734 85.374167) (xy 104.178122 85.180824) (xy 104.274358 84.964673) - (xy 104.326778 84.733946) (xy 104.330552 84.463697) (xy 104.330552 99.187) (xy 103.505 99.187) (xy 103.434936 99.193869) - (xy 103.36483 99.200003) (xy 103.360982 99.20112) (xy 103.356993 99.201512) (xy 103.289627 99.22185) (xy 103.222018 99.241493) - (xy 103.218457 99.243338) (xy 103.214624 99.244496) (xy 103.152482 99.277537) (xy 103.089986 99.309933) (xy 103.086855 99.312431) - (xy 103.083316 99.314314) (xy 103.028769 99.3588) (xy 102.97376 99.402714) (xy 102.968181 99.408215) (xy 102.968069 99.408307) - (xy 102.967983 99.40841) (xy 102.966185 99.410184) (xy 102.739485 99.636884) (xy 102.563738 99.67041) (xy 102.367452 99.749715) - (xy 102.190308 99.865634) (xy 102.039054 100.013753) (xy 101.91945 100.188431) (xy 101.836052 100.383012) (xy 101.792037 100.590087) - (xy 101.789081 100.801767) (xy 101.827297 101.00999) (xy 101.90523 101.206825) (xy 102.01991 101.384773) (xy 102.166969 101.537058) - (xy 102.340807 101.657879) (xy 102.48903 101.722635) (xy 102.489019 101.724197) (xy 102.489005 101.72434) (xy 102.489017 101.724473) - (xy 102.489 101.727) (xy 102.489 103.886) (xy 102.495874 103.956113) (xy 102.502004 104.02617) (xy 102.50312 104.030012) - (xy 102.503512 104.034007) (xy 102.523877 104.101459) (xy 102.543494 104.168982) (xy 102.545337 104.172537) (xy 102.546496 104.176376) - (xy 102.579556 104.238553) (xy 102.611933 104.301014) (xy 102.614431 104.304144) (xy 102.616314 104.307684) (xy 102.6608 104.36223) - (xy 102.704714 104.41724) (xy 102.710212 104.422814) (xy 102.710307 104.422931) (xy 102.710414 104.42302) (xy 102.712185 104.424815) - (xy 103.505 105.21763) (xy 103.505 137.922) (xy 103.511874 137.992113) (xy 103.518004 138.06217) (xy 103.51912 138.066012) - (xy 103.519512 138.070007) (xy 103.539877 138.137459) (xy 103.559494 138.204982) (xy 103.561337 138.208537) (xy 103.562496 138.212376) - (xy 103.595556 138.274553) (xy 103.627933 138.337014) (xy 103.630431 138.340144) (xy 103.632314 138.343684) (xy 103.6768 138.39823) - (xy 103.720714 138.45324) (xy 103.726212 138.458814) (xy 103.726307 138.458931) (xy 103.726414 138.45902) (xy 103.728185 138.460815) - (xy 108.554185 143.286816) (xy 108.608629 143.331537) (xy 108.662495 143.376736) (xy 108.666002 143.378664) (xy 108.669103 143.381211) - (xy 108.731184 143.414498) (xy 108.792816 143.448381) (xy 108.796634 143.449592) (xy 108.800168 143.451487) (xy 108.867537 143.472083) - (xy 108.934571 143.493348) (xy 108.938549 143.493794) (xy 108.942385 143.494967) (xy 109.012422 143.50208) (xy 109.082361 143.509926) - (xy 109.090197 143.50998) (xy 109.09034 143.509995) (xy 109.090473 143.509982) (xy 109.093 143.51) (xy 140.462 143.51) - (xy 140.532113 143.503125) (xy 140.60217 143.496996) (xy 140.606012 143.495879) (xy 140.610007 143.495488) (xy 140.677459 143.475122) - (xy 140.744982 143.455506) (xy 140.748537 143.453662) (xy 140.752376 143.452504) (xy 140.814553 143.419443) (xy 140.877014 143.387067) - (xy 140.880144 143.384568) (xy 140.883684 143.382686) (xy 140.93823 143.338199) (xy 140.99324 143.294286) (xy 140.998814 143.288787) - (xy 140.998931 143.288693) (xy 140.99902 143.288585) (xy 141.000815 143.286815) (xy 143.474789 140.81284) (xy 143.597789 140.839884) - (xy 143.871695 140.845622) (xy 144.141499 140.798048) (xy 144.396923 140.698975) (xy 144.62824 140.552177) (xy 144.826639 140.363245) - (xy 144.984561 140.139375) (xy 145.032934 140.030726) (xy 145.055474 140.087655) (xy 145.203883 140.317942) (xy 145.394196 140.515016) - (xy 145.619163 140.671372) (xy 145.870215 140.781054) (xy 146.137789 140.839884) (xy 146.411695 140.845622) (xy 146.681499 140.798048) - (xy 146.936923 140.698975) (xy 147.16824 140.552177) (xy 147.366639 140.363245) (xy 147.524561 140.139375) (xy 147.572934 140.030726) - (xy 147.595474 140.087655) (xy 147.743883 140.317942) (xy 147.934196 140.515016) (xy 148.159163 140.671372) (xy 148.410215 140.781054) - (xy 148.677789 140.839884) (xy 148.951695 140.845622) (xy 149.221499 140.798048) (xy 149.476923 140.698975) (xy 149.70824 140.552177) - (xy 149.906639 140.363245) (xy 150.064561 140.139375) (xy 150.112934 140.030726) (xy 150.135474 140.087655) (xy 150.283883 140.317942) - (xy 150.474196 140.515016) (xy 150.699163 140.671372) (xy 150.950215 140.781054) (xy 151.217789 140.839884) (xy 151.491695 140.845622) - (xy 151.761499 140.798048) (xy 152.016923 140.698975) (xy 152.24824 140.552177) (xy 152.446639 140.363245) (xy 152.604561 140.139375) - (xy 152.652934 140.030726) (xy 152.675474 140.087655) (xy 152.823883 140.317942) (xy 153.014196 140.515016) (xy 153.239163 140.671372) - (xy 153.490215 140.781054) (xy 153.757789 140.839884) (xy 154.031695 140.845622) (xy 154.301499 140.798048) (xy 154.556923 140.698975) - (xy 154.78824 140.552177) (xy 154.986639 140.363245) (xy 155.144561 140.139375) (xy 155.192934 140.030726) (xy 155.215474 140.087655) - (xy 155.363883 140.317942) (xy 155.554196 140.515016) (xy 155.779163 140.671372) (xy 156.030215 140.781054) (xy 156.297789 140.839884) - (xy 156.571695 140.845622) (xy 156.841499 140.798048) (xy 157.096923 140.698975) (xy 157.32824 140.552177) (xy 157.526639 140.363245) - (xy 157.684561 140.139375) (xy 157.732934 140.030726) (xy 157.755474 140.087655) (xy 157.903883 140.317942) (xy 158.094196 140.515016) - (xy 158.319163 140.671372) (xy 158.570215 140.781054) (xy 158.837789 140.839884) (xy 159.111695 140.845622) (xy 159.381499 140.798048) - (xy 159.636923 140.698975) (xy 159.86824 140.552177) (xy 160.066639 140.363245) (xy 160.224561 140.139375) (xy 160.272934 140.030726) - (xy 160.295474 140.087655) (xy 160.443883 140.317942) (xy 160.634196 140.515016) (xy 160.859163 140.671372) (xy 161.110215 140.781054) - (xy 161.377789 140.839884) (xy 161.651695 140.845622) (xy 161.921499 140.798048) (xy 162.176923 140.698975) (xy 162.40824 140.552177) - (xy 162.606639 140.363245) (xy 162.764561 140.139375) (xy 162.812934 140.030726) (xy 162.835474 140.087655) (xy 162.983883 140.317942) - (xy 163.174196 140.515016) (xy 163.399163 140.671372) (xy 163.650215 140.781054) (xy 163.917789 140.839884) (xy 164.191695 140.845622) - (xy 164.461499 140.798048) (xy 164.716923 140.698975) (xy 164.94824 140.552177) (xy 165.146639 140.363245) (xy 165.304561 140.139375) - (xy 165.352934 140.030726) (xy 165.375474 140.087655) (xy 165.523883 140.317942) (xy 165.714196 140.515016) (xy 165.939163 140.671372) - (xy 166.190215 140.781054) (xy 166.457789 140.839884) (xy 166.731695 140.845622) (xy 167.001499 140.798048) (xy 167.256923 140.698975) - (xy 167.48824 140.552177) (xy 167.686639 140.363245) (xy 167.844561 140.139375) (xy 167.892934 140.030726) (xy 167.915474 140.087655) - (xy 168.063883 140.317942) (xy 168.254196 140.515016) (xy 168.479163 140.671372) (xy 168.730215 140.781054) (xy 168.997789 140.839884) - (xy 169.271695 140.845622) (xy 169.541499 140.798048) (xy 169.721614 140.728185) (xy 169.726494 140.744982) (xy 169.728337 140.748537) - (xy 169.729496 140.752376) (xy 169.762556 140.814553) (xy 169.794933 140.877014) (xy 169.797431 140.880144) (xy 169.799314 140.883684) - (xy 169.8438 140.93823) (xy 169.887714 140.99324) (xy 169.893212 140.998814) (xy 169.893307 140.998931) (xy 169.893414 140.99902) - (xy 169.895185 141.000815) (xy 170.784185 141.889815) (xy 170.838599 141.934512) (xy 170.892495 141.979736) (xy 170.896002 141.981664) - (xy 170.899103 141.984211) (xy 170.961168 142.017489) (xy 171.022816 142.051381) (xy 171.026636 142.052592) (xy 171.030167 142.054486) - (xy 171.097464 142.07506) (xy 171.164571 142.096348) (xy 171.168554 142.096794) (xy 171.172385 142.097966) (xy 171.242372 142.105075) - (xy 171.312361 142.112926) (xy 171.320197 142.11298) (xy 171.32034 142.112995) (xy 171.320473 142.112982) (xy 171.323 142.113) - (xy 182.499 142.113) (xy 182.569113 142.106125) (xy 182.63917 142.099996) (xy 182.643012 142.098879) (xy 182.647007 142.098488) - (xy 182.714459 142.078122) (xy 182.781982 142.058506) (xy 182.785537 142.056662) (xy 182.789376 142.055504) (xy 182.851553 142.022443) - (xy 182.914014 141.990067) (xy 182.917144 141.987568) (xy 182.920684 141.985686) (xy 182.97523 141.941199) (xy 183.03024 141.897286) - (xy 183.035814 141.891787) (xy 183.035931 141.891693) (xy 183.03602 141.891585) (xy 183.037815 141.889815) (xy 184.114789 140.81284) - (xy 184.237789 140.839884) (xy 184.511695 140.845622) (xy 184.781499 140.798048) (xy 185.036923 140.698975) (xy 185.26824 140.552177) - (xy 185.466639 140.363245) (xy 185.624561 140.139375) (xy 185.735993 139.889095) (xy 185.79669 139.621938) (xy 185.801059 139.309017) - (xy 185.747846 139.040269) (xy 185.643446 138.786975) (xy 185.491835 138.558783) (xy 185.29879 138.364385) (xy 185.207783 138.303) - (xy 185.228542 138.303) (xy 185.351223 138.278597) (xy 185.466785 138.23073) (xy 185.570789 138.161237) (xy 185.659237 138.072789) - (xy 185.72873 137.968785) (xy 185.776597 137.853223) (xy 185.801 137.730542) (xy 185.801 137.605458) (xy 185.801 136.081458) - (xy 185.776597 135.958777) (xy 185.72873 135.843215) (xy 185.659237 135.739211) (xy 185.570789 135.650763) (xy 185.466785 135.58127) - (xy 185.351223 135.533403) (xy 185.2549 135.514242) (xy 185.2549 131.416642) (xy 185.26824 131.408177) (xy 185.466639 131.219245) - (xy 185.624561 130.995375) (xy 185.735993 130.745095) (xy 185.79669 130.477938) (xy 185.801059 130.165017) (xy 185.747846 129.896269) - (xy 185.643446 129.642975) (xy 185.491835 129.414783) (xy 185.29879 129.220385) (xy 185.071662 129.067185) (xy 184.819103 128.961019) - (xy 184.550733 128.905931) (xy 184.276774 128.904018) (xy 184.007661 128.955354) (xy 183.753644 129.057984) (xy 183.524399 129.207997) - (xy 183.328658 129.399681) (xy 183.261 129.498493) (xy 183.261 129.477458) (xy 183.236597 129.354777) (xy 183.18873 129.239215) - (xy 183.119237 129.135211) (xy 183.030789 129.046763) (xy 182.926785 128.97727) (xy 182.811223 128.929403) (xy 182.688542 128.905) - (xy 182.563458 128.905) (xy 181.54463 128.905) (xy 186.974815 123.474815) (xy 187.019512 123.4204) (xy 187.064736 123.366505) - (xy 187.066664 123.362997) (xy 187.069211 123.359897) (xy 187.102489 123.297831) (xy 187.136381 123.236184) (xy 187.137592 123.232363) - (xy 187.139486 123.228833) (xy 187.16006 123.161535) (xy 187.181348 123.094429) (xy 187.181794 123.090445) (xy 187.182966 123.086615) - (xy 187.190075 123.016627) (xy 187.197926 122.946639) (xy 187.19798 122.938802) (xy 187.197995 122.93866) (xy 187.197982 122.938526) - (xy 187.198 122.936) (xy 187.198 146.086802) (xy 102.171546 146.43385) (xy 102.171546 118.76615) (xy 102.130426 118.558481) - (xy 102.049754 118.362753) (xy 101.9326 118.186423) (xy 101.854 118.107272) (xy 101.854 115.827088) (xy 101.91313 115.77078) - (xy 102.035161 115.59779) (xy 102.121268 115.404392) (xy 102.16817 115.197952) (xy 102.171546 114.95615) (xy 102.130426 114.748481) - (xy 102.049754 114.552753) (xy 101.9326 114.376423) (xy 101.783428 114.226207) (xy 101.607921 114.107825) (xy 101.477659 114.053068) - (xy 101.58439 113.985335) (xy 101.755734 113.822167) (xy 101.892122 113.628824) (xy 101.988358 113.412673) (xy 102.040778 113.181946) - (xy 102.044552 112.911697) (xy 101.998595 112.679596) (xy 101.908431 112.460842) (xy 101.777495 112.263767) (xy 101.663552 112.149026) - (xy 101.663552 95.639697) (xy 101.617595 95.407596) (xy 101.527431 95.188842) (xy 101.396495 94.991767) (xy 101.229773 94.823878) - (xy 101.033617 94.691569) (xy 100.838 94.609338) (xy 100.838 69.80555) (xy 100.838 67.056) (xy 98.08845 67.056) - (xy 97.9297 67.21475) (xy 97.9297 69.391842) (xy 97.954103 69.514523) (xy 98.00197 69.630085) (xy 98.071463 69.734089) - (xy 98.159911 69.822537) (xy 98.263915 69.89203) (xy 98.379477 69.939897) (xy 98.502158 69.9643) (xy 98.627242 69.9643) - (xy 100.67925 69.9643) (xy 100.838 69.80555) (xy 100.838 94.609338) (xy 100.815498 94.59988) (xy 100.583724 94.552303) - (xy 100.347123 94.550651) (xy 100.114707 94.594987) (xy 99.895329 94.683622) (xy 99.697344 94.813179) (xy 99.528295 94.978724) - (xy 99.39462 95.173952) (xy 99.301411 95.391425) (xy 99.252217 95.622862) (xy 99.248914 95.859446) (xy 99.291626 96.092166) - (xy 99.378727 96.312157) (xy 99.506899 96.511041) (xy 99.67126 96.681242) (xy 99.865549 96.816277) (xy 100.082367 96.911002) - (xy 100.313454 96.96181) (xy 100.550009 96.966765) (xy 100.783022 96.925679) (xy 101.003616 96.840116) (xy 101.20339 96.713335) - (xy 101.374734 96.550167) (xy 101.511122 96.356824) (xy 101.607358 96.140673) (xy 101.659778 95.909946) (xy 101.663552 95.639697) - (xy 101.663552 112.149026) (xy 101.610773 112.095878) (xy 101.414617 111.963569) (xy 101.196498 111.87188) (xy 100.964724 111.824303) - (xy 100.728123 111.822651) (xy 100.495707 111.866987) (xy 100.276329 111.955622) (xy 100.078344 112.085179) (xy 99.909295 112.250724) - (xy 99.77562 112.445952) (xy 99.682411 112.663425) (xy 99.633217 112.894862) (xy 99.629914 113.131446) (xy 99.672626 113.364166) - (xy 99.759727 113.584157) (xy 99.887899 113.783041) (xy 100.05226 113.953242) (xy 100.246549 114.088277) (xy 100.463367 114.183002) - (xy 100.463618 114.183057) (xy 100.420764 114.2111) (xy 99.504552 114.2111) (xy 99.504552 100.465697) (xy 99.458595 100.233596) - (xy 99.368431 100.014842) (xy 99.237495 99.817767) (xy 99.187059 99.766977) (xy 99.187059 93.081017) (xy 99.133846 92.812269) - (xy 99.029446 92.558975) (xy 98.877835 92.330783) (xy 98.68479 92.136385) (xy 98.457662 91.983185) (xy 98.361552 91.942784) - (xy 98.361552 87.638697) (xy 98.315595 87.406596) (xy 98.225431 87.187842) (xy 98.094495 86.990767) (xy 97.927773 86.822878) - (xy 97.731617 86.690569) (xy 97.513498 86.59888) (xy 97.281724 86.551303) (xy 97.045123 86.549651) (xy 96.812707 86.593987) - (xy 96.593329 86.682622) (xy 96.395344 86.812179) (xy 96.226295 86.977724) (xy 96.09262 87.172952) (xy 95.999411 87.390425) - (xy 95.950217 87.621862) (xy 95.946914 87.858446) (xy 95.989626 88.091166) (xy 96.076727 88.311157) (xy 96.204899 88.510041) - (xy 96.36926 88.680242) (xy 96.563549 88.815277) (xy 96.780367 88.910002) (xy 97.011454 88.96081) (xy 97.248009 88.965765) - (xy 97.481022 88.924679) (xy 97.701616 88.839116) (xy 97.90139 88.712335) (xy 98.072734 88.549167) (xy 98.209122 88.355824) - (xy 98.305358 88.139673) (xy 98.357778 87.908946) (xy 98.361552 87.638697) (xy 98.361552 91.942784) (xy 98.205103 91.877019) - (xy 97.936733 91.821931) (xy 97.662774 91.820018) (xy 97.393661 91.871354) (xy 97.139644 91.973984) (xy 96.910399 92.123997) - (xy 96.714658 92.315681) (xy 96.559877 92.541734) (xy 96.45195 92.793546) (xy 96.394989 93.061524) (xy 96.391164 93.335464) - (xy 96.44062 93.604928) (xy 96.541474 93.859655) (xy 96.689883 94.089942) (xy 96.880196 94.287016) (xy 96.986645 94.361) - (xy 96.965458 94.361) (xy 96.842777 94.385403) (xy 96.727215 94.43327) (xy 96.623211 94.502763) (xy 96.534763 94.591211) - (xy 96.46527 94.695215) (xy 96.417403 94.810777) (xy 96.393 94.933458) (xy 96.393 95.058542) (xy 96.393 96.582542) - (xy 96.417403 96.705223) (xy 96.46527 96.820785) (xy 96.534763 96.924789) (xy 96.623211 97.013237) (xy 96.727215 97.08273) - (xy 96.842777 97.130597) (xy 96.965458 97.155) (xy 97.090542 97.155) (xy 98.614542 97.155) (xy 98.737223 97.130597) - (xy 98.852785 97.08273) (xy 98.956789 97.013237) (xy 99.045237 96.924789) (xy 99.11473 96.820785) (xy 99.162597 96.705223) - (xy 99.187 96.582542) (xy 99.187 96.457458) (xy 99.187 94.933458) (xy 99.162597 94.810777) (xy 99.11473 94.695215) - (xy 99.045237 94.591211) (xy 98.956789 94.502763) (xy 98.852785 94.43327) (xy 98.737223 94.385403) (xy 98.614542 94.361) - (xy 98.596216 94.361) (xy 98.65424 94.324177) (xy 98.852639 94.135245) (xy 99.010561 93.911375) (xy 99.121993 93.661095) - (xy 99.18269 93.393938) (xy 99.187059 93.081017) (xy 99.187059 99.766977) (xy 99.070773 99.649878) (xy 98.874617 99.517569) - (xy 98.656498 99.42588) (xy 98.424724 99.378303) (xy 98.188123 99.376651) (xy 97.955707 99.420987) (xy 97.736329 99.509622) - (xy 97.538344 99.639179) (xy 97.369295 99.804724) (xy 97.23562 99.999952) (xy 97.142411 100.217425) (xy 97.093217 100.448862) - (xy 97.089914 100.685446) (xy 97.132626 100.918166) (xy 97.219727 101.138157) (xy 97.347899 101.337041) (xy 97.51226 101.507242) - (xy 97.706549 101.642277) (xy 97.923367 101.737002) (xy 98.154454 101.78781) (xy 98.391009 101.792765) (xy 98.624022 101.751679) - (xy 98.844616 101.666116) (xy 99.04439 101.539335) (xy 99.215734 101.376167) (xy 99.352122 101.182824) (xy 99.448358 100.966673) - (xy 99.500778 100.735946) (xy 99.504552 100.465697) (xy 99.504552 114.2111) (xy 98.615552 114.2111) (xy 98.615552 112.022697) - (xy 98.569595 111.790596) (xy 98.479431 111.571842) (xy 98.348495 111.374767) (xy 98.181773 111.206878) (xy 97.985617 111.074569) - (xy 97.767498 110.98288) (xy 97.535724 110.935303) (xy 97.299123 110.933651) (xy 97.066707 110.977987) (xy 96.847329 111.066622) - (xy 96.649344 111.196179) (xy 96.480295 111.361724) (xy 96.34662 111.556952) (xy 96.253411 111.774425) (xy 96.204217 112.005862) - (xy 96.200914 112.242446) (xy 96.243626 112.475166) (xy 96.330727 112.695157) (xy 96.458899 112.894041) (xy 96.62326 113.064242) - (xy 96.817549 113.199277) (xy 97.034367 113.294002) (xy 97.265454 113.34481) (xy 97.502009 113.349765) (xy 97.735022 113.308679) - (xy 97.955616 113.223116) (xy 98.15539 113.096335) (xy 98.326734 112.933167) (xy 98.463122 112.739824) (xy 98.559358 112.523673) - (xy 98.611778 112.292946) (xy 98.615552 112.022697) (xy 98.615552 114.2111) (xy 96.427031 114.2111) (xy 96.273921 114.107825) - (xy 96.078761 114.025788) (xy 95.871384 113.983219) (xy 95.659689 113.981741) (xy 95.631059 113.987202) (xy 95.631059 112.766017) - (xy 95.577846 112.497269) (xy 95.473446 112.243975) (xy 95.321835 112.015783) (xy 95.12879 111.821385) (xy 94.996 111.731816) - (xy 94.996 78.040542) (xy 94.996 77.915458) (xy 94.996 76.137458) (xy 94.971597 76.014777) (xy 94.92373 75.899215) - (xy 94.854237 75.795211) (xy 94.765789 75.706763) (xy 94.661785 75.63727) (xy 94.546223 75.589403) (xy 94.423542 75.565) - (xy 94.298458 75.565) (xy 92.520458 75.565) (xy 92.397777 75.589403) (xy 92.282215 75.63727) (xy 92.178211 75.706763) - (xy 92.089763 75.795211) (xy 92.02027 75.899215) (xy 91.972403 76.014777) (xy 91.948 76.137458) (xy 91.948 76.262542) - (xy 91.948 78.040542) (xy 91.972403 78.163223) (xy 92.02027 78.278785) (xy 92.089763 78.382789) (xy 92.178211 78.471237) - (xy 92.282215 78.54073) (xy 92.397777 78.588597) (xy 92.520458 78.613) (xy 92.645542 78.613) (xy 94.423542 78.613) - (xy 94.546223 78.588597) (xy 94.661785 78.54073) (xy 94.765789 78.471237) (xy 94.854237 78.382789) (xy 94.92373 78.278785) - (xy 94.971597 78.163223) (xy 94.996 78.040542) (xy 94.996 111.731816) (xy 94.901662 111.668185) (xy 94.649103 111.562019) - (xy 94.380733 111.506931) (xy 94.106774 111.505018) (xy 93.837661 111.556354) (xy 93.583644 111.658984) (xy 93.354399 111.808997) - (xy 93.158658 112.000681) (xy 93.091 112.099493) (xy 93.091 112.078458) (xy 93.066597 111.955777) (xy 93.01873 111.840215) - (xy 92.949237 111.736211) (xy 92.860789 111.647763) (xy 92.756785 111.57827) (xy 92.641223 111.530403) (xy 92.518542 111.506) - (xy 91.97975 111.506) (xy 91.821 111.66475) (xy 91.821 112.776) (xy 91.841 112.776) (xy 91.841 113.03) - (xy 91.821 113.03) (xy 91.821 114.14125) (xy 91.97975 114.3) (xy 92.518542 114.3) (xy 92.641223 114.275597) - (xy 92.756785 114.22773) (xy 92.860789 114.158237) (xy 92.949237 114.069789) (xy 93.01873 113.965785) (xy 93.066597 113.850223) - (xy 93.091 113.727542) (xy 93.091 113.7084) (xy 93.133883 113.774942) (xy 93.324196 113.972016) (xy 93.549163 114.128372) - (xy 93.800215 114.238054) (xy 94.067789 114.296884) (xy 94.341695 114.302622) (xy 94.611499 114.255048) (xy 94.866923 114.155975) - (xy 95.09824 114.009177) (xy 95.296639 113.820245) (xy 95.454561 113.596375) (xy 95.565993 113.346095) (xy 95.62669 113.078938) - (xy 95.631059 112.766017) (xy 95.631059 113.987202) (xy 95.451738 114.02141) (xy 95.255452 114.100715) (xy 95.078308 114.216634) - (xy 94.927054 114.364753) (xy 94.80745 114.539431) (xy 94.724052 114.734012) (xy 94.680037 114.941087) (xy 94.677081 115.152767) - (xy 94.715297 115.36099) (xy 94.79323 115.557825) (xy 94.90791 115.735773) (xy 94.996 115.826993) (xy 94.996 116.837236) - (xy 94.927054 116.904753) (xy 94.80745 117.079431) (xy 94.724052 117.274012) (xy 94.680037 117.481087) (xy 94.677081 117.692767) - (xy 94.715297 117.90099) (xy 94.79323 118.097825) (xy 94.90791 118.275773) (xy 95.054969 118.428058) (xy 95.228807 118.548879) - (xy 95.422802 118.633633) (xy 95.629564 118.679093) (xy 95.841219 118.683526) (xy 96.049704 118.646765) (xy 96.247077 118.570208) - (xy 96.425822 118.456773) (xy 96.57913 118.31078) (xy 96.701161 118.13779) (xy 96.787268 117.944392) (xy 96.83417 117.737952) - (xy 96.837546 117.49615) (xy 96.796426 117.288481) (xy 96.715754 117.092753) (xy 96.5986 116.916423) (xy 96.52 116.837272) - (xy 96.52 115.9129) (xy 100.33 115.9129) (xy 100.33 118.107236) (xy 100.261054 118.174753) (xy 100.14145 118.349431) - (xy 100.058052 118.544012) (xy 100.014037 118.751087) (xy 100.011081 118.962767) (xy 100.049297 119.17099) (xy 100.12723 119.367825) - (xy 100.24191 119.545773) (xy 100.388969 119.698058) (xy 100.562807 119.818879) (xy 100.756802 119.903633) (xy 100.963564 119.949093) - (xy 101.175219 119.953526) (xy 101.383704 119.916765) (xy 101.581077 119.840208) (xy 101.759822 119.726773) (xy 101.91313 119.58078) - (xy 102.035161 119.40779) (xy 102.121268 119.214392) (xy 102.16817 119.007952) (xy 102.171546 118.76615) (xy 102.171546 146.43385) - (xy 92.837 146.47195) (xy 92.837 135.444542) (xy 92.837 135.319458) (xy 92.837 133.795458) (xy 92.812597 133.672777) - (xy 92.76473 133.557215) (xy 92.695237 133.453211) (xy 92.606789 133.364763) (xy 92.502785 133.29527) (xy 92.387223 133.247403) - (xy 92.264542 133.223) (xy 92.139458 133.223) (xy 91.567 133.223) (xy 91.567 114.14125) (xy 91.567 113.03) - (xy 91.567 112.776) (xy 91.567 111.66475) (xy 91.40825 111.506) (xy 90.869458 111.506) (xy 90.746777 111.530403) - (xy 90.631215 111.57827) (xy 90.527211 111.647763) (xy 90.438763 111.736211) (xy 90.429908 111.749463) (xy 90.429908 95.183012) - (xy 90.429908 82.483012) (xy 90.387443 82.185829) (xy 90.287816 81.902641) (xy 90.209289 81.755727) (xy 89.956231 81.673374) - (xy 89.776626 81.852979) (xy 89.776626 81.493769) (xy 89.694273 81.240711) (xy 89.423582 81.110914) (xy 89.13277 81.03642) - (xy 88.833012 81.020092) (xy 88.535829 81.062557) (xy 88.252641 81.162184) (xy 88.105727 81.240711) (xy 88.023374 81.493769) - (xy 88.9 82.370395) (xy 89.776626 81.493769) (xy 89.776626 81.852979) (xy 89.079605 82.55) (xy 89.956231 83.426626) - (xy 90.209289 83.344273) (xy 90.339086 83.073582) (xy 90.41358 82.78277) (xy 90.429908 82.483012) (xy 90.429908 95.183012) - (xy 90.424 95.141666) (xy 90.424 88.581542) (xy 90.424 88.456458) (xy 90.424 86.678458) (xy 90.399597 86.555777) - (xy 90.35173 86.440215) (xy 90.282237 86.336211) (xy 90.193789 86.247763) (xy 90.089785 86.17827) (xy 89.974223 86.130403) - (xy 89.851542 86.106) (xy 89.776626 86.106) (xy 89.776626 83.606231) (xy 88.9 82.729605) (xy 88.720395 82.90921) - (xy 88.720395 82.55) (xy 87.843769 81.673374) (xy 87.590711 81.755727) (xy 87.460914 82.026418) (xy 87.38642 82.31723) - (xy 87.370092 82.616988) (xy 87.412557 82.914171) (xy 87.512184 83.197359) (xy 87.590711 83.344273) (xy 87.843769 83.426626) - (xy 88.720395 82.55) (xy 88.720395 82.90921) (xy 88.023374 83.606231) (xy 88.105727 83.859289) (xy 88.376418 83.989086) - (xy 88.66723 84.06358) (xy 88.966988 84.079908) (xy 89.264171 84.037443) (xy 89.547359 83.937816) (xy 89.694273 83.859289) - (xy 89.776626 83.606231) (xy 89.776626 86.106) (xy 89.726458 86.106) (xy 87.948458 86.106) (xy 87.825777 86.130403) - (xy 87.710215 86.17827) (xy 87.606211 86.247763) (xy 87.517763 86.336211) (xy 87.44827 86.440215) (xy 87.400403 86.555777) - (xy 87.376 86.678458) (xy 87.376 86.803542) (xy 87.376 88.581542) (xy 87.400403 88.704223) (xy 87.44827 88.819785) - (xy 87.517763 88.923789) (xy 87.606211 89.012237) (xy 87.710215 89.08173) (xy 87.825777 89.129597) (xy 87.948458 89.154) - (xy 88.073542 89.154) (xy 89.851542 89.154) (xy 89.974223 89.129597) (xy 90.089785 89.08173) (xy 90.193789 89.012237) - (xy 90.282237 88.923789) (xy 90.35173 88.819785) (xy 90.399597 88.704223) (xy 90.424 88.581542) (xy 90.424 95.141666) - (xy 90.387443 94.885829) (xy 90.287816 94.602641) (xy 90.209289 94.455727) (xy 89.956231 94.373374) (xy 89.776626 94.552979) - (xy 89.776626 94.193769) (xy 89.694273 93.940711) (xy 89.423582 93.810914) (xy 89.13277 93.73642) (xy 88.833012 93.720092) - (xy 88.535829 93.762557) (xy 88.252641 93.862184) (xy 88.105727 93.940711) (xy 88.023374 94.193769) (xy 88.9 95.070395) - (xy 89.776626 94.193769) (xy 89.776626 94.552979) (xy 89.079605 95.25) (xy 89.956231 96.126626) (xy 90.209289 96.044273) - (xy 90.339086 95.773582) (xy 90.41358 95.48277) (xy 90.429908 95.183012) (xy 90.429908 111.749463) (xy 90.424 111.758305) - (xy 90.424 101.281542) (xy 90.424 101.156458) (xy 90.424 99.378458) (xy 90.399597 99.255777) (xy 90.35173 99.140215) - (xy 90.282237 99.036211) (xy 90.193789 98.947763) (xy 90.089785 98.87827) (xy 89.974223 98.830403) (xy 89.851542 98.806) - (xy 89.776626 98.806) (xy 89.776626 96.306231) (xy 88.9 95.429605) (xy 88.720395 95.60921) (xy 88.720395 95.25) - (xy 87.843769 94.373374) (xy 87.590711 94.455727) (xy 87.460914 94.726418) (xy 87.38642 95.01723) (xy 87.370092 95.316988) - (xy 87.412557 95.614171) (xy 87.512184 95.897359) (xy 87.590711 96.044273) (xy 87.843769 96.126626) (xy 88.720395 95.25) - (xy 88.720395 95.60921) (xy 88.023374 96.306231) (xy 88.105727 96.559289) (xy 88.376418 96.689086) (xy 88.66723 96.76358) - (xy 88.966988 96.779908) (xy 89.264171 96.737443) (xy 89.547359 96.637816) (xy 89.694273 96.559289) (xy 89.776626 96.306231) - (xy 89.776626 98.806) (xy 89.726458 98.806) (xy 87.948458 98.806) (xy 87.825777 98.830403) (xy 87.710215 98.87827) - (xy 87.606211 98.947763) (xy 87.517763 99.036211) (xy 87.44827 99.140215) (xy 87.400403 99.255777) (xy 87.376 99.378458) - (xy 87.376 99.503542) (xy 87.376 101.281542) (xy 87.400403 101.404223) (xy 87.44827 101.519785) (xy 87.517763 101.623789) - (xy 87.606211 101.712237) (xy 87.710215 101.78173) (xy 87.825777 101.829597) (xy 87.948458 101.854) (xy 88.073542 101.854) - (xy 89.851542 101.854) (xy 89.974223 101.829597) (xy 90.089785 101.78173) (xy 90.193789 101.712237) (xy 90.282237 101.623789) - (xy 90.35173 101.519785) (xy 90.399597 101.404223) (xy 90.424 101.281542) (xy 90.424 111.758305) (xy 90.36927 111.840215) - (xy 90.321403 111.955777) (xy 90.297 112.078458) (xy 90.297 112.203542) (xy 90.297 112.61725) (xy 90.45575 112.776) - (xy 91.567 112.776) (xy 91.567 113.03) (xy 90.45575 113.03) (xy 90.297 113.18875) (xy 90.297 113.602458) - (xy 90.297 113.727542) (xy 90.321403 113.850223) (xy 90.36927 113.965785) (xy 90.438763 114.069789) (xy 90.527211 114.158237) - (xy 90.631215 114.22773) (xy 90.746777 114.275597) (xy 90.869458 114.3) (xy 91.40825 114.3) (xy 91.567 114.14125) - (xy 91.567 133.223) (xy 90.615458 133.223) (xy 90.492777 133.247403) (xy 90.377215 133.29527) (xy 90.273211 133.364763) - (xy 90.184763 133.453211) (xy 90.11527 133.557215) (xy 90.067403 133.672777) (xy 90.043 133.795458) (xy 90.043 133.815812) - (xy 89.987835 133.732783) (xy 89.79479 133.538385) (xy 89.567662 133.385185) (xy 89.315103 133.279019) (xy 89.046733 133.223931) - (xy 88.772774 133.222018) (xy 88.709546 133.234079) (xy 88.709546 112.03515) (xy 88.668426 111.827481) (xy 88.587754 111.631753) - (xy 88.4706 111.455423) (xy 88.321428 111.305207) (xy 88.145921 111.186825) (xy 87.950761 111.104788) (xy 87.743384 111.062219) - (xy 87.628043 111.061413) (xy 87.249 110.68237) (xy 87.249 109.22) (xy 87.24213 109.149936) (xy 87.235997 109.07983) - (xy 87.234879 109.075982) (xy 87.234488 109.071993) (xy 87.214135 109.004581) (xy 87.194506 108.937018) (xy 87.192662 108.933462) - (xy 87.191504 108.929624) (xy 87.158443 108.867446) (xy 87.126067 108.804986) (xy 87.123568 108.801855) (xy 87.121686 108.798316) - (xy 87.077199 108.743769) (xy 87.033286 108.68876) (xy 87.027787 108.683185) (xy 87.027693 108.683069) (xy 87.027585 108.682979) - (xy 87.025815 108.681185) (xy 85.788552 107.443922) (xy 85.788552 102.116697) (xy 85.742595 101.884596) (xy 85.652431 101.665842) - (xy 85.521495 101.468767) (xy 85.354773 101.300878) (xy 85.158617 101.168569) (xy 84.940498 101.07688) (xy 84.708724 101.029303) - (xy 84.472123 101.027651) (xy 84.239707 101.071987) (xy 84.020329 101.160622) (xy 83.822344 101.290179) (xy 83.653295 101.455724) - (xy 83.51962 101.650952) (xy 83.426411 101.868425) (xy 83.377217 102.099862) (xy 83.373914 102.336446) (xy 83.416626 102.569166) - (xy 83.503727 102.789157) (xy 83.631899 102.988041) (xy 83.79626 103.158242) (xy 83.990549 103.293277) (xy 84.207367 103.388002) - (xy 84.438454 103.43881) (xy 84.675009 103.443765) (xy 84.908022 103.402679) (xy 85.128616 103.317116) (xy 85.32839 103.190335) - (xy 85.499734 103.027167) (xy 85.636122 102.833824) (xy 85.732358 102.617673) (xy 85.784778 102.386946) (xy 85.788552 102.116697) - (xy 85.788552 107.443922) (xy 84.104815 105.760185) (xy 84.0504 105.715487) (xy 83.996505 105.670264) (xy 83.992997 105.668335) - (xy 83.989897 105.665789) (xy 83.927831 105.63251) (xy 83.866184 105.598619) (xy 83.862363 105.597407) (xy 83.858833 105.595514) - (xy 83.791535 105.574939) (xy 83.724429 105.553652) (xy 83.720445 105.553205) (xy 83.716615 105.552034) (xy 83.646627 105.544924) - (xy 83.576639 105.537074) (xy 83.568802 105.537019) (xy 83.56866 105.537005) (xy 83.568526 105.537017) (xy 83.566 105.537) - (xy 82.301908 105.537) (xy 82.301908 77.022012) (xy 82.259443 76.724829) (xy 82.159816 76.441641) (xy 82.081289 76.294727) - (xy 81.828231 76.212374) (xy 81.648626 76.391979) (xy 81.648626 76.032769) (xy 81.566273 75.779711) (xy 81.295582 75.649914) - (xy 81.00477 75.57542) (xy 80.705012 75.559092) (xy 80.407829 75.601557) (xy 80.124641 75.701184) (xy 79.977727 75.779711) - (xy 79.895374 76.032769) (xy 80.772 76.909395) (xy 81.648626 76.032769) (xy 81.648626 76.391979) (xy 80.951605 77.089) - (xy 81.828231 77.965626) (xy 82.081289 77.883273) (xy 82.211086 77.612582) (xy 82.28558 77.32177) (xy 82.301908 77.022012) - (xy 82.301908 105.537) (xy 81.648626 105.537) (xy 81.648626 78.145231) (xy 80.772 77.268605) (xy 80.592395 77.44821) - (xy 80.592395 77.089) (xy 79.715769 76.212374) (xy 79.462711 76.294727) (xy 79.332914 76.565418) (xy 79.25842 76.85623) - (xy 79.242092 77.155988) (xy 79.284557 77.453171) (xy 79.384184 77.736359) (xy 79.462711 77.883273) (xy 79.715769 77.965626) - (xy 80.592395 77.089) (xy 80.592395 77.44821) (xy 79.895374 78.145231) (xy 79.977727 78.398289) (xy 80.248418 78.528086) - (xy 80.53923 78.60258) (xy 80.838988 78.618908) (xy 81.136171 78.576443) (xy 81.419359 78.476816) (xy 81.566273 78.398289) - (xy 81.648626 78.145231) (xy 81.648626 105.537) (xy 80.038029 105.537) (xy 79.954835 105.411783) (xy 79.76179 105.217385) - (xy 79.534662 105.064185) (xy 79.282103 104.958019) (xy 79.013733 104.902931) (xy 78.739774 104.901018) (xy 78.470661 104.952354) - (xy 78.216644 105.054984) (xy 77.987399 105.204997) (xy 77.791658 105.396681) (xy 77.724 105.495493) (xy 77.724 105.474458) - (xy 77.699597 105.351777) (xy 77.65173 105.236215) (xy 77.582237 105.132211) (xy 77.493789 105.043763) (xy 77.389785 104.97427) - (xy 77.351514 104.958417) (xy 77.351514 72.973084) (xy 77.304618 72.600773) (xy 77.185988 72.244765) (xy 77.057871 72.005076) - (xy 76.765852 71.876753) (xy 75.617605 73.025) (xy 76.765852 74.173247) (xy 77.057871 74.044924) (xy 77.225723 73.709305) - (xy 77.324874 73.347389) (xy 77.351514 72.973084) (xy 77.351514 104.958417) (xy 77.274223 104.926403) (xy 77.151542 104.902) - (xy 77.026458 104.902) (xy 76.586247 104.902) (xy 76.586247 74.352852) (xy 75.438 73.204605) (xy 75.258395 73.38421) - (xy 75.258395 73.025) (xy 74.110148 71.876753) (xy 73.818129 72.005076) (xy 73.650277 72.340695) (xy 73.551126 72.702611) - (xy 73.524486 73.076916) (xy 73.571382 73.449227) (xy 73.690012 73.805235) (xy 73.818129 74.044924) (xy 74.110148 74.173247) - (xy 75.258395 73.025) (xy 75.258395 73.38421) (xy 74.289753 74.352852) (xy 74.418076 74.644871) (xy 74.753695 74.812723) - (xy 75.115611 74.911874) (xy 75.489916 74.938514) (xy 75.862227 74.891618) (xy 76.218235 74.772988) (xy 76.457924 74.644871) - (xy 76.586247 74.352852) (xy 76.586247 104.902) (xy 75.502458 104.902) (xy 75.379777 104.926403) (xy 75.264215 104.97427) - (xy 75.160211 105.043763) (xy 75.071763 105.132211) (xy 75.00227 105.236215) (xy 74.954403 105.351777) (xy 74.93 105.474458) - (xy 74.93 105.599542) (xy 74.93 107.123542) (xy 74.954403 107.246223) (xy 75.00227 107.361785) (xy 75.071763 107.465789) - (xy 75.160211 107.554237) (xy 75.264215 107.62373) (xy 75.379777 107.671597) (xy 75.502458 107.696) (xy 75.59054 107.696) - (xy 75.54104 107.873435) (xy 76.327 108.659395) (xy 77.11296 107.873435) (xy 77.063459 107.696) (xy 77.151542 107.696) - (xy 77.274223 107.671597) (xy 77.389785 107.62373) (xy 77.493789 107.554237) (xy 77.582237 107.465789) (xy 77.65173 107.361785) - (xy 77.699597 107.246223) (xy 77.724 107.123542) (xy 77.724 107.1044) (xy 77.766883 107.170942) (xy 77.957196 107.368016) - (xy 78.182163 107.524372) (xy 78.282699 107.568295) (xy 78.216644 107.594984) (xy 77.987399 107.744997) (xy 77.791658 107.936681) - (xy 77.636877 108.162734) (xy 77.599591 108.249728) (xy 77.594636 108.235977) (xy 77.532656 108.12002) (xy 77.292565 108.05304) - (xy 76.506605 108.839) (xy 77.292565 109.62496) (xy 77.532656 109.55798) (xy 77.595866 109.423555) (xy 77.618474 109.480655) - (xy 77.766883 109.710942) (xy 77.957196 109.908016) (xy 78.182163 110.064372) (xy 78.282699 110.108295) (xy 78.216644 110.134984) - (xy 77.987399 110.284997) (xy 77.791658 110.476681) (xy 77.636877 110.702734) (xy 77.599591 110.789728) (xy 77.594636 110.775977) - (xy 77.532656 110.66002) (xy 77.292565 110.59304) (xy 77.11296 110.772645) (xy 77.11296 110.413435) (xy 77.04598 110.173344) - (xy 76.915356 110.11192) (xy 76.930023 110.106636) (xy 77.04598 110.044656) (xy 77.11296 109.804565) (xy 76.327 109.018605) - (xy 76.147395 109.19821) (xy 76.147395 108.839) (xy 75.361435 108.05304) (xy 75.121344 108.12002) (xy 75.004244 108.369048) - (xy 74.937977 108.636135) (xy 74.92509 108.911017) (xy 74.966078 109.183133) (xy 75.059364 109.442023) (xy 75.121344 109.55798) - (xy 75.361435 109.62496) (xy 76.147395 108.839) (xy 76.147395 109.19821) (xy 75.54104 109.804565) (xy 75.60802 110.044656) - (xy 75.738643 110.106079) (xy 75.723977 110.111364) (xy 75.60802 110.173344) (xy 75.54104 110.413435) (xy 76.327 111.199395) - (xy 77.11296 110.413435) (xy 77.11296 110.772645) (xy 76.506605 111.379) (xy 77.292565 112.16496) (xy 77.532656 112.09798) - (xy 77.595866 111.963555) (xy 77.618474 112.020655) (xy 77.766883 112.250942) (xy 77.957196 112.448016) (xy 78.182163 112.604372) - (xy 78.282699 112.648295) (xy 78.216644 112.674984) (xy 77.987399 112.824997) (xy 77.791658 113.016681) (xy 77.636877 113.242734) - (xy 77.59735 113.334955) (xy 77.566446 113.259975) (xy 77.414835 113.031783) (xy 77.22179 112.837385) (xy 76.994662 112.684185) - (xy 76.91673 112.651425) (xy 76.930023 112.646636) (xy 77.04598 112.584656) (xy 77.11296 112.344565) (xy 76.327 111.558605) - (xy 76.147395 111.73821) (xy 76.147395 111.379) (xy 75.361435 110.59304) (xy 75.121344 110.66002) (xy 75.004244 110.909048) - (xy 74.937977 111.176135) (xy 74.92509 111.451017) (xy 74.966078 111.723133) (xy 75.059364 111.982023) (xy 75.121344 112.09798) - (xy 75.361435 112.16496) (xy 76.147395 111.379) (xy 76.147395 111.73821) (xy 75.54104 112.344565) (xy 75.60802 112.584656) - (xy 75.743053 112.648152) (xy 75.676644 112.674984) (xy 75.447399 112.824997) (xy 75.251658 113.016681) (xy 75.096877 113.242734) - (xy 74.98895 113.494546) (xy 74.931989 113.762524) (xy 74.928164 114.036464) (xy 74.97762 114.305928) (xy 75.078474 114.560655) - (xy 75.226883 114.790942) (xy 75.417196 114.988016) (xy 75.642163 115.144372) (xy 75.742699 115.188295) (xy 75.676644 115.214984) - (xy 75.447399 115.364997) (xy 75.251658 115.556681) (xy 75.096877 115.782734) (xy 74.98895 116.034546) (xy 74.931989 116.302524) - (xy 74.928164 116.576464) (xy 74.97762 116.845928) (xy 75.078474 117.100655) (xy 75.226883 117.330942) (xy 75.417196 117.528016) - (xy 75.642163 117.684372) (xy 75.738086 117.726279) (xy 75.723977 117.731364) (xy 75.60802 117.793344) (xy 75.54104 118.033435) - (xy 76.327 118.819395) (xy 77.11296 118.033435) (xy 77.04598 117.793344) (xy 76.912256 117.730463) (xy 76.959923 117.711975) - (xy 77.19124 117.565177) (xy 77.389639 117.376245) (xy 77.547561 117.152375) (xy 77.595934 117.043726) (xy 77.618474 117.100655) - (xy 77.766883 117.330942) (xy 77.957196 117.528016) (xy 78.182163 117.684372) (xy 78.282699 117.728295) (xy 78.216644 117.754984) - (xy 77.987399 117.904997) (xy 77.791658 118.096681) (xy 77.636877 118.322734) (xy 77.599591 118.409728) (xy 77.594636 118.395977) - (xy 77.532656 118.28002) (xy 77.292565 118.21304) (xy 76.506605 118.999) (xy 77.292565 119.78496) (xy 77.532656 119.71798) - (xy 77.595866 119.583555) (xy 77.618474 119.640655) (xy 77.766883 119.870942) (xy 77.957196 120.068016) (xy 78.182163 120.224372) - (xy 78.282699 120.268295) (xy 78.216644 120.294984) (xy 77.987399 120.444997) (xy 77.791658 120.636681) (xy 77.636877 120.862734) - (xy 77.59735 120.954955) (xy 77.566446 120.879975) (xy 77.414835 120.651783) (xy 77.22179 120.457385) (xy 76.994662 120.304185) - (xy 76.91673 120.271425) (xy 76.930023 120.266636) (xy 77.04598 120.204656) (xy 77.11296 119.964565) (xy 76.327 119.178605) - (xy 76.147395 119.35821) (xy 76.147395 118.999) (xy 75.361435 118.21304) (xy 75.121344 118.28002) (xy 75.004244 118.529048) - (xy 74.937977 118.796135) (xy 74.92509 119.071017) (xy 74.966078 119.343133) (xy 75.059364 119.602023) (xy 75.121344 119.71798) - (xy 75.361435 119.78496) (xy 76.147395 118.999) (xy 76.147395 119.35821) (xy 75.54104 119.964565) (xy 75.60802 120.204656) - (xy 75.743053 120.268152) (xy 75.676644 120.294984) (xy 75.447399 120.444997) (xy 75.251658 120.636681) (xy 75.096877 120.862734) - (xy 74.98895 121.114546) (xy 74.931989 121.382524) (xy 74.928164 121.656464) (xy 74.97762 121.925928) (xy 75.078474 122.180655) - (xy 75.226883 122.410942) (xy 75.417196 122.608016) (xy 75.642163 122.764372) (xy 75.742699 122.808295) (xy 75.676644 122.834984) - (xy 75.447399 122.984997) (xy 75.251658 123.176681) (xy 75.096877 123.402734) (xy 74.98895 123.654546) (xy 74.931989 123.922524) - (xy 74.928164 124.196464) (xy 74.97762 124.465928) (xy 75.078474 124.720655) (xy 75.226883 124.950942) (xy 75.417196 125.148016) - (xy 75.642163 125.304372) (xy 75.742699 125.348295) (xy 75.676644 125.374984) (xy 75.447399 125.524997) (xy 75.251658 125.716681) - (xy 75.096877 125.942734) (xy 74.98895 126.194546) (xy 74.931989 126.462524) (xy 74.928164 126.736464) (xy 74.97762 127.005928) - (xy 75.078474 127.260655) (xy 75.226883 127.490942) (xy 75.417196 127.688016) (xy 75.642163 127.844372) (xy 75.742699 127.888295) - (xy 75.676644 127.914984) (xy 75.447399 128.064997) (xy 75.251658 128.256681) (xy 75.096877 128.482734) (xy 74.98895 128.734546) - (xy 74.931989 129.002524) (xy 74.928164 129.276464) (xy 74.97762 129.545928) (xy 75.078474 129.800655) (xy 75.226883 130.030942) - (xy 75.417196 130.228016) (xy 75.642163 130.384372) (xy 75.742699 130.428295) (xy 75.676644 130.454984) (xy 75.447399 130.604997) - (xy 75.251658 130.796681) (xy 75.096877 131.022734) (xy 74.98895 131.274546) (xy 74.931989 131.542524) (xy 74.928164 131.816464) - (xy 74.97762 132.085928) (xy 75.078474 132.340655) (xy 75.226883 132.570942) (xy 75.417196 132.768016) (xy 75.642163 132.924372) - (xy 75.738086 132.966279) (xy 75.723977 132.971364) (xy 75.60802 133.033344) (xy 75.54104 133.273435) (xy 76.327 134.059395) - (xy 77.11296 133.273435) (xy 77.04598 133.033344) (xy 76.912256 132.970463) (xy 76.959923 132.951975) (xy 77.19124 132.805177) - (xy 77.389639 132.616245) (xy 77.547561 132.392375) (xy 77.595934 132.283726) (xy 77.618474 132.340655) (xy 77.766883 132.570942) - (xy 77.957196 132.768016) (xy 78.182163 132.924372) (xy 78.282699 132.968295) (xy 78.216644 132.994984) (xy 77.987399 133.144997) - (xy 77.791658 133.336681) (xy 77.636877 133.562734) (xy 77.599591 133.649728) (xy 77.594636 133.635977) (xy 77.532656 133.52002) - (xy 77.292565 133.45304) (xy 76.506605 134.239) (xy 77.292565 135.02496) (xy 77.532656 134.95798) (xy 77.595866 134.823555) - (xy 77.618474 134.880655) (xy 77.766883 135.110942) (xy 77.957196 135.308016) (xy 78.182163 135.464372) (xy 78.282699 135.508295) - (xy 78.216644 135.534984) (xy 77.987399 135.684997) (xy 77.791658 135.876681) (xy 77.636877 136.102734) (xy 77.59735 136.194955) - (xy 77.566446 136.119975) (xy 77.414835 135.891783) (xy 77.22179 135.697385) (xy 76.994662 135.544185) (xy 76.91673 135.511425) - (xy 76.930023 135.506636) (xy 77.04598 135.444656) (xy 77.11296 135.204565) (xy 76.327 134.418605) (xy 76.147395 134.59821) - (xy 76.147395 134.239) (xy 75.361435 133.45304) (xy 75.121344 133.52002) (xy 75.004244 133.769048) (xy 74.937977 134.036135) - (xy 74.92509 134.311017) (xy 74.966078 134.583133) (xy 75.059364 134.842023) (xy 75.121344 134.95798) (xy 75.361435 135.02496) - (xy 76.147395 134.239) (xy 76.147395 134.59821) (xy 75.54104 135.204565) (xy 75.60802 135.444656) (xy 75.743053 135.508152) - (xy 75.676644 135.534984) (xy 75.447399 135.684997) (xy 75.251658 135.876681) (xy 75.096877 136.102734) (xy 74.98895 136.354546) - (xy 74.931989 136.622524) (xy 74.928164 136.896464) (xy 74.97762 137.165928) (xy 75.078474 137.420655) (xy 75.226883 137.650942) - (xy 75.417196 137.848016) (xy 75.642163 138.004372) (xy 75.893215 138.114054) (xy 76.160789 138.172884) (xy 76.434695 138.178622) - (xy 76.704499 138.131048) (xy 76.959923 138.031975) (xy 77.19124 137.885177) (xy 77.389639 137.696245) (xy 77.547561 137.472375) - (xy 77.595934 137.363726) (xy 77.618474 137.420655) (xy 77.766883 137.650942) (xy 77.957196 137.848016) (xy 78.182163 138.004372) - (xy 78.433215 138.114054) (xy 78.700789 138.172884) (xy 78.974695 138.178622) (xy 79.244499 138.131048) (xy 79.499923 138.031975) - (xy 79.73124 137.885177) (xy 79.929639 137.696245) (xy 80.087561 137.472375) (xy 80.198993 137.222095) (xy 80.25969 136.954938) - (xy 80.264059 136.642017) (xy 80.210846 136.373269) (xy 80.106446 136.119975) (xy 79.954835 135.891783) (xy 79.76179 135.697385) - (xy 79.534662 135.544185) (xy 79.453393 135.510022) (xy 79.499923 135.491975) (xy 79.73124 135.345177) (xy 79.929639 135.156245) - (xy 80.087561 134.932375) (xy 80.198993 134.682095) (xy 80.25969 134.414938) (xy 80.264059 134.102017) (xy 80.210846 133.833269) - (xy 80.106446 133.579975) (xy 79.954835 133.351783) (xy 79.76179 133.157385) (xy 79.534662 133.004185) (xy 79.453393 132.970022) - (xy 79.499923 132.951975) (xy 79.73124 132.805177) (xy 79.929639 132.616245) (xy 80.087561 132.392375) (xy 80.198993 132.142095) - (xy 80.25969 131.874938) (xy 80.264059 131.562017) (xy 80.210846 131.293269) (xy 80.106446 131.039975) (xy 79.954835 130.811783) - (xy 79.76179 130.617385) (xy 79.534662 130.464185) (xy 79.45673 130.431425) (xy 79.470023 130.426636) (xy 79.58598 130.364656) - (xy 79.65296 130.124565) (xy 78.867 129.338605) (xy 78.08104 130.124565) (xy 78.14802 130.364656) (xy 78.283053 130.428152) - (xy 78.216644 130.454984) (xy 77.987399 130.604997) (xy 77.791658 130.796681) (xy 77.636877 131.022734) (xy 77.59735 131.114955) - (xy 77.566446 131.039975) (xy 77.414835 130.811783) (xy 77.22179 130.617385) (xy 76.994662 130.464185) (xy 76.913393 130.430022) - (xy 76.959923 130.411975) (xy 77.19124 130.265177) (xy 77.389639 130.076245) (xy 77.547561 129.852375) (xy 77.594186 129.747653) - (xy 77.599364 129.762023) (xy 77.661344 129.87798) (xy 77.901435 129.94496) (xy 78.687395 129.159) (xy 78.673252 129.144857) - (xy 78.852857 128.965252) (xy 78.867 128.979395) (xy 78.881142 128.965252) (xy 79.060747 129.144857) (xy 79.046605 129.159) - (xy 79.832565 129.94496) (xy 80.072656 129.87798) (xy 80.189756 129.628952) (xy 80.256023 129.361865) (xy 80.26891 129.086983) - (xy 80.227922 128.814867) (xy 80.150826 128.600909) (xy 80.165982 128.596506) (xy 80.169537 128.594662) (xy 80.173376 128.593504) - (xy 80.235553 128.560443) (xy 80.298014 128.528067) (xy 80.301144 128.525568) (xy 80.304684 128.523686) (xy 80.35923 128.479199) - (xy 80.41424 128.435286) (xy 80.419814 128.429787) (xy 80.419931 128.429693) (xy 80.42002 128.429585) (xy 80.421815 128.427815) - (xy 82.326815 126.522815) (xy 82.371512 126.4684) (xy 82.416736 126.414505) (xy 82.418664 126.410997) (xy 82.421211 126.407897) - (xy 82.454509 126.345796) (xy 82.488381 126.284184) (xy 82.489591 126.280368) (xy 82.491487 126.276833) (xy 82.512088 126.209448) - (xy 82.533348 126.142429) (xy 82.533794 126.138451) (xy 82.534967 126.134615) (xy 82.54208 126.064577) (xy 82.549926 125.994639) - (xy 82.54998 125.986802) (xy 82.549995 125.98666) (xy 82.549982 125.986526) (xy 82.55 125.984) (xy 82.55 116.080993) - (xy 82.608969 116.142058) (xy 82.782807 116.262879) (xy 82.976802 116.347633) (xy 83.183564 116.393093) (xy 83.395219 116.397526) - (xy 83.603704 116.360765) (xy 83.801077 116.284208) (xy 83.979822 116.170773) (xy 84.13313 116.02478) (xy 84.255161 115.85179) - (xy 84.341268 115.658392) (xy 84.38817 115.451952) (xy 84.391546 115.21015) (xy 84.350426 115.002481) (xy 84.269754 114.806753) - (xy 84.1526 114.630423) (xy 84.003428 114.480207) (xy 83.827921 114.361825) (xy 83.632761 114.279788) (xy 83.425384 114.237219) - (xy 83.213689 114.235741) (xy 83.005738 114.27541) (xy 82.809452 114.354715) (xy 82.632308 114.470634) (xy 82.55 114.551236) - (xy 82.55 111.94863) (xy 84.970026 109.528603) (xy 85.093386 109.506852) (xy 85.267539 109.439302) (xy 85.425255 109.339212) - (xy 85.478181 109.288811) (xy 85.725 109.53563) (xy 85.725 110.998) (xy 85.731874 111.068113) (xy 85.738004 111.13817) - (xy 85.73912 111.142012) (xy 85.739512 111.146007) (xy 85.759877 111.213459) (xy 85.779494 111.280982) (xy 85.781337 111.284537) - (xy 85.782496 111.288376) (xy 85.815556 111.350553) (xy 85.847933 111.413014) (xy 85.850431 111.416144) (xy 85.852314 111.419684) - (xy 85.8968 111.47423) (xy 85.940714 111.52924) (xy 85.946212 111.534814) (xy 85.946307 111.534931) (xy 85.946414 111.53502) - (xy 85.948185 111.536815) (xy 86.550376 112.139006) (xy 86.549081 112.231767) (xy 86.587297 112.43999) (xy 86.66523 112.636825) - (xy 86.77991 112.814773) (xy 86.926969 112.967058) (xy 87.100807 113.087879) (xy 87.294802 113.172633) (xy 87.501564 113.218093) - (xy 87.713219 113.222526) (xy 87.921704 113.185765) (xy 88.119077 113.109208) (xy 88.297822 112.995773) (xy 88.45113 112.84978) - (xy 88.573161 112.67679) (xy 88.659268 112.483392) (xy 88.70617 112.276952) (xy 88.709546 112.03515) (xy 88.709546 133.234079) - (xy 88.503661 133.273354) (xy 88.249644 133.375984) (xy 88.020399 133.525997) (xy 87.824658 133.717681) (xy 87.669877 133.943734) - (xy 87.56195 134.195546) (xy 87.504989 134.463524) (xy 87.501164 134.737464) (xy 87.55062 135.006928) (xy 87.651474 135.261655) - (xy 87.799883 135.491942) (xy 87.990196 135.689016) (xy 88.215163 135.845372) (xy 88.466215 135.955054) (xy 88.733789 136.013884) - (xy 89.007695 136.019622) (xy 89.277499 135.972048) (xy 89.532923 135.872975) (xy 89.76424 135.726177) (xy 89.962639 135.537245) - (xy 90.043 135.423325) (xy 90.043 135.444542) (xy 90.067403 135.567223) (xy 90.11527 135.682785) (xy 90.184763 135.786789) - (xy 90.273211 135.875237) (xy 90.377215 135.94473) (xy 90.492777 135.992597) (xy 90.615458 136.017) (xy 90.740542 136.017) - (xy 92.264542 136.017) (xy 92.387223 135.992597) (xy 92.502785 135.94473) (xy 92.606789 135.875237) (xy 92.695237 135.786789) - (xy 92.76473 135.682785) (xy 92.812597 135.567223) (xy 92.837 135.444542) (xy 92.837 146.47195) (xy 90.744723 146.48049) - (xy 90.744723 140.890433) (xy 90.705956 140.655957) (xy 90.622189 140.433549) (xy 90.585054 140.364071) (xy 90.36437 140.320235) - (xy 90.184765 140.49984) (xy 90.184765 140.14063) (xy 90.140929 139.919946) (xy 89.924431 139.821912) (xy 89.692967 139.767998) - (xy 89.455433 139.760277) (xy 89.220957 139.799044) (xy 88.998549 139.882811) (xy 88.929071 139.919946) (xy 88.885235 140.14063) - (xy 89.535 140.790395) (xy 90.184765 140.14063) (xy 90.184765 140.49984) (xy 89.714605 140.97) (xy 90.36437 141.619765) - (xy 90.585054 141.575929) (xy 90.683088 141.359431) (xy 90.737002 141.127967) (xy 90.744723 140.890433) (xy 90.744723 146.48049) - (xy 90.184765 146.482775) (xy 90.184765 141.79937) (xy 89.535 141.149605) (xy 89.355395 141.32921) (xy 89.355395 140.97) - (xy 88.70563 140.320235) (xy 88.484946 140.364071) (xy 88.386912 140.580569) (xy 88.332998 140.812033) (xy 88.325277 141.049567) - (xy 88.364044 141.284043) (xy 88.447811 141.506451) (xy 88.484946 141.575929) (xy 88.70563 141.619765) (xy 89.355395 140.97) - (xy 89.355395 141.32921) (xy 88.885235 141.79937) (xy 88.929071 142.020054) (xy 89.145569 142.118088) (xy 89.377033 142.172002) - (xy 89.614567 142.179723) (xy 89.849043 142.140956) (xy 90.071451 142.057189) (xy 90.140929 142.020054) (xy 90.184765 141.79937) - (xy 90.184765 146.482775) (xy 87.312327 146.4945) (xy 86.296552 146.4945) (xy 86.296552 119.007697) (xy 86.250595 118.775596) - (xy 86.160431 118.556842) (xy 86.029495 118.359767) (xy 85.862773 118.191878) (xy 85.666617 118.059569) (xy 85.448498 117.96788) - (xy 85.216724 117.920303) (xy 84.980123 117.918651) (xy 84.747707 117.962987) (xy 84.528329 118.051622) (xy 84.330344 118.181179) - (xy 84.161295 118.346724) (xy 84.02762 118.541952) (xy 83.934411 118.759425) (xy 83.885217 118.990862) (xy 83.881914 119.227446) - (xy 83.924626 119.460166) (xy 84.011727 119.680157) (xy 84.139899 119.879041) (xy 84.30426 120.049242) (xy 84.498549 120.184277) - (xy 84.715367 120.279002) (xy 84.946454 120.32981) (xy 85.183009 120.334765) (xy 85.416022 120.293679) (xy 85.636616 120.208116) - (xy 85.83639 120.081335) (xy 86.007734 119.918167) (xy 86.144122 119.724824) (xy 86.240358 119.508673) (xy 86.292778 119.277946) - (xy 86.296552 119.007697) (xy 86.296552 146.4945) (xy 84.645552 146.4945) (xy 84.645552 138.438697) (xy 84.645552 134.120697) - (xy 84.599595 133.888596) (xy 84.509431 133.669842) (xy 84.378495 133.472767) (xy 84.211773 133.304878) (xy 84.015617 133.172569) - (xy 83.797498 133.08088) (xy 83.565724 133.033303) (xy 83.329123 133.031651) (xy 83.096707 133.075987) (xy 82.877329 133.164622) - (xy 82.679344 133.294179) (xy 82.510295 133.459724) (xy 82.37662 133.654952) (xy 82.283411 133.872425) (xy 82.234217 134.103862) - (xy 82.230914 134.340446) (xy 82.273626 134.573166) (xy 82.360727 134.793157) (xy 82.488899 134.992041) (xy 82.65326 135.162242) - (xy 82.847549 135.297277) (xy 83.064367 135.392002) (xy 83.295454 135.44281) (xy 83.532009 135.447765) (xy 83.765022 135.406679) - (xy 83.985616 135.321116) (xy 84.18539 135.194335) (xy 84.356734 135.031167) (xy 84.493122 134.837824) (xy 84.589358 134.621673) - (xy 84.641778 134.390946) (xy 84.645552 134.120697) (xy 84.645552 138.438697) (xy 84.599595 138.206596) (xy 84.509431 137.987842) - (xy 84.378495 137.790767) (xy 84.211773 137.622878) (xy 84.015617 137.490569) (xy 83.797498 137.39888) (xy 83.565724 137.351303) - (xy 83.329123 137.349651) (xy 83.096707 137.393987) (xy 82.877329 137.482622) (xy 82.679344 137.612179) (xy 82.510295 137.777724) - (xy 82.37662 137.972952) (xy 82.283411 138.190425) (xy 82.234217 138.421862) (xy 82.230914 138.658446) (xy 82.273626 138.891166) - (xy 82.360727 139.111157) (xy 82.488899 139.310041) (xy 82.65326 139.480242) (xy 82.847549 139.615277) (xy 83.064367 139.710002) - (xy 83.295454 139.76081) (xy 83.532009 139.765765) (xy 83.765022 139.724679) (xy 83.985616 139.639116) (xy 84.18539 139.512335) - (xy 84.356734 139.349167) (xy 84.493122 139.155824) (xy 84.589358 138.939673) (xy 84.641778 138.708946) (xy 84.645552 138.438697) - (xy 84.645552 146.4945) (xy 71.9455 146.4945) (xy 71.9455 71.247) (xy 74.74783 71.247) (xy 74.657765 71.277012) - (xy 74.418076 71.405129) (xy 74.289753 71.697148) (xy 75.438 72.845395) (xy 76.586247 71.697148) (xy 76.457924 71.405129) - (xy 76.141746 71.247) (xy 79.248 71.247) (xy 79.248 75.057) (xy 97.282 75.057) (xy 97.282 65.827521) - (xy 97.762759 65.522423) (xy 97.9297 65.363447) (xy 97.9297 66.64325) (xy 98.08845 66.802) (xy 100.838 66.802) - (xy 100.838 64.05245) (xy 100.67925 63.8937) (xy 98.821778 63.8937) (xy 98.910937 63.501265) (xy 98.917091 63.060516) - (xy 99.012364 62.965243) (xy 99.276563 63.373) (xy 99.804535 63.653593) (xy 100.377104 63.825792) (xy 100.972265 63.882979) - (xy 101.567147 63.822957) (xy 102.138888 63.648033) (xy 102.653437 63.373) (xy 102.917637 62.965242) (xy 100.965 61.012605) - (xy 100.950857 61.026747) (xy 100.771252 60.847142) (xy 100.785395 60.833) (xy 98.832758 58.880363) (xy 98.425 59.144563) - (xy 98.144407 59.672535) (xy 97.972208 60.245104) (xy 97.915021 60.840265) (xy 97.916724 60.857147) (xy 97.829135 60.768945) - (xy 97.335648 60.436083) (xy 97.282 60.413531) (xy 97.282 56.7055) (xy 227.203 56.7055) (xy 227.203 145.923517) + (xy 227.203 145.923517) (xy 226.199144 145.927614) (xy 226.199144 137.367698) (xy 226.199144 89.107698) (xy 226.171362 88.552632) + (xy 226.012397 88.168857) (xy 225.770213 88.099392) (xy 225.590608 88.278997) (xy 225.590608 87.919787) (xy 225.521143 87.677603) + (xy 225.34372 87.614304) (xy 225.34372 74.68362) (xy 225.34372 72.18172) (xy 225.285716 71.890116) (xy 225.285716 71.890115) + (xy 225.120535 71.642905) (xy 224.929144 71.451514) (xy 224.929144 66.247698) (xy 224.917 66.005068) (xy 224.917 64.38831) + (xy 224.917 64.135691) (xy 224.917 62.611691) (xy 224.820327 62.378302) (xy 224.641699 62.199673) (xy 224.40831 62.103) + (xy 224.155691 62.103) (xy 222.631691 62.103) (xy 222.398302 62.199673) (xy 222.219673 62.378301) (xy 222.123 62.61169) + (xy 222.123 62.864309) (xy 222.123 64.388309) (xy 222.219673 64.621698) (xy 222.398301 64.800327) (xy 222.63169 64.897) + (xy 222.766083 64.897) (xy 222.719392 65.059787) (xy 223.52 65.860395) (xy 224.320608 65.059787) (xy 224.273916 64.897) + (xy 224.408309 64.897) (xy 224.641698 64.800327) (xy 224.820327 64.621699) (xy 224.917 64.38831) (xy 224.917 66.005068) + (xy 224.901362 65.692632) (xy 224.742397 65.308857) (xy 224.500213 65.239392) (xy 223.699605 66.04) (xy 224.500213 66.840608) + (xy 224.742397 66.771143) (xy 224.929144 66.247698) (xy 224.929144 71.451514) (xy 224.905012 71.427382) (xy 224.916757 71.3991) + (xy 224.917242 70.843339) (xy 224.70501 70.329697) (xy 224.31237 69.936371) (xy 224.104487 69.85005) (xy 224.310303 69.76501) + (xy 224.703629 69.37237) (xy 224.916757 68.8591) (xy 224.917242 68.303339) (xy 224.70501 67.789697) (xy 224.31237 67.396371) + (xy 224.120272 67.316605) (xy 224.251143 67.262397) (xy 224.320608 67.020213) (xy 223.52 66.219605) (xy 223.340395 66.39921) + (xy 223.340395 66.04) (xy 222.539787 65.239392) (xy 222.297603 65.308857) (xy 222.110856 65.832302) (xy 222.138638 66.387368) + (xy 222.297603 66.771143) (xy 222.539787 66.840608) (xy 223.340395 66.04) (xy 223.340395 66.39921) (xy 222.719392 67.020213) + (xy 222.788857 67.262397) (xy 222.929317 67.312508) (xy 222.729697 67.39499) (xy 222.336371 67.78763) (xy 222.123243 68.3009) + (xy 222.122758 68.856661) (xy 222.33499 69.370303) (xy 222.72763 69.763629) (xy 222.935512 69.849949) (xy 222.729697 69.93499) + (xy 222.336371 70.32763) (xy 222.123243 70.8409) (xy 222.122758 71.396661) (xy 222.33499 71.910303) (xy 222.72763 72.303629) + (xy 222.935512 72.389949) (xy 222.729697 72.47499) (xy 222.336371 72.86763) (xy 222.123243 73.3809) (xy 222.122758 73.936661) + (xy 222.33499 74.450303) (xy 222.512802 74.628426) (xy 219.646709 77.494519) (xy 219.646709 64.863805) (xy 219.463418 64.420205) + (xy 219.12432 64.080515) (xy 218.681041 63.89645) (xy 218.201065 63.896031) (xy 217.757465 64.079322) (xy 217.417775 64.41842) + (xy 217.23371 64.861699) (xy 217.233291 65.341675) (xy 217.416582 65.785275) (xy 217.75568 66.124965) (xy 218.198959 66.30903) + (xy 218.678935 66.309449) (xy 219.122535 66.126158) (xy 219.462225 65.78706) (xy 219.64629 65.343781) (xy 219.646709 64.863805) + (xy 219.646709 77.494519) (xy 210.321825 86.819405) (xy 210.156644 87.066615) (xy 210.09864 87.35822) (xy 210.09864 98.655469) + (xy 209.892565 98.861545) (xy 209.727384 99.108755) (xy 209.66938 99.40036) (xy 209.66938 102.712418) (xy 209.516758 102.864774) + (xy 209.352067 103.261392) (xy 209.351693 103.690844) (xy 209.515691 104.087749) (xy 209.783192 104.355717) (xy 208.701827 105.437082) + (xy 208.701827 102.092336) (xy 208.537829 101.695431) (xy 208.234426 101.391498) (xy 207.837808 101.226807) (xy 207.408356 101.226433) + (xy 207.011451 101.390431) (xy 206.740947 101.660463) (xy 206.740947 78.526216) (xy 206.576949 78.129311) (xy 206.273546 77.825378) + (xy 205.876928 77.660687) (xy 205.447476 77.660313) (xy 205.050571 77.824311) (xy 204.746638 78.127714) (xy 204.581947 78.524332) + (xy 204.581573 78.953784) (xy 204.745571 79.350689) (xy 205.048974 79.654622) (xy 205.445592 79.819313) (xy 205.875044 79.819687) + (xy 206.271949 79.655689) (xy 206.575882 79.352286) (xy 206.740573 78.955668) (xy 206.740947 78.526216) (xy 206.740947 101.660463) + (xy 206.707518 101.693834) (xy 206.542827 102.090452) (xy 206.542453 102.519904) (xy 206.706451 102.916809) (xy 207.009854 103.220742) + (xy 207.406472 103.385433) (xy 207.835924 103.385807) (xy 208.232829 103.221809) (xy 208.536762 102.918406) (xy 208.701453 102.521788) + (xy 208.701827 102.092336) (xy 208.701827 105.437082) (xy 207.233185 106.905725) (xy 207.068004 107.152935) (xy 207.01 107.44454) + (xy 207.01 108.780732) (xy 206.595805 108.780371) (xy 206.152205 108.963662) (xy 205.812515 109.30276) (xy 205.646207 109.703275) + (xy 205.646207 84.998136) (xy 205.482209 84.601231) (xy 205.178806 84.297298) (xy 204.782188 84.132607) (xy 204.47044 84.132335) + (xy 204.47044 65.536979) (xy 204.084563 64.603085) (xy 203.370673 63.887948) (xy 202.437454 63.500441) (xy 201.426979 63.49956) + (xy 200.493085 63.885437) (xy 199.777948 64.599327) (xy 199.390441 65.532546) (xy 199.38956 66.543021) (xy 199.775437 67.476915) + (xy 200.489327 68.192052) (xy 201.422546 68.579559) (xy 202.433021 68.58044) (xy 203.366915 68.194563) (xy 204.082052 67.480673) + (xy 204.469559 66.547454) (xy 204.47044 65.536979) (xy 204.47044 84.132335) (xy 204.352736 84.132233) (xy 203.955831 84.296231) + (xy 203.651898 84.599634) (xy 203.487207 84.996252) (xy 203.486833 85.425704) (xy 203.650831 85.822609) (xy 203.954234 86.126542) + (xy 204.350852 86.291233) (xy 204.780304 86.291607) (xy 205.177209 86.127609) (xy 205.481142 85.824206) (xy 205.645833 85.427588) + (xy 205.646207 84.998136) (xy 205.646207 109.703275) (xy 205.62845 109.746039) (xy 205.628031 110.226015) (xy 205.811322 110.669615) + (xy 206.15042 111.009305) (xy 206.593699 111.19337) (xy 207.01 111.193733) (xy 207.01 112.25276) (xy 207.068004 112.544365) + (xy 207.233185 112.791575) (xy 208.30032 113.85871) (xy 208.300133 114.074364) (xy 208.464131 114.471269) (xy 208.767534 114.775202) + (xy 209.164152 114.939893) (xy 209.593604 114.940267) (xy 209.990509 114.776269) (xy 210.294442 114.472866) (xy 210.402744 114.212046) + (xy 210.72496 114.534825) (xy 211.168239 114.71889) (xy 211.648215 114.719309) (xy 212.091815 114.536018) (xy 212.431505 114.19692) + (xy 212.61557 113.753641) (xy 212.615989 113.273665) (xy 212.615989 109.768465) (xy 212.432698 109.324865) (xy 212.0936 108.985175) + (xy 211.650321 108.80111) (xy 211.170345 108.800691) (xy 210.726745 108.983982) (xy 210.387055 109.32308) (xy 210.20299 109.766359) + (xy 210.202571 110.246335) (xy 210.385862 110.689935) (xy 210.72496 111.029625) (xy 211.168239 111.21369) (xy 211.648215 111.214109) + (xy 212.091815 111.030818) (xy 212.431505 110.69172) (xy 212.61557 110.248441) (xy 212.615989 109.768465) (xy 212.615989 113.273665) + (xy 212.432698 112.830065) (xy 212.0936 112.490375) (xy 211.650321 112.30631) (xy 211.170345 112.305891) (xy 210.726745 112.489182) + (xy 210.387055 112.82828) (xy 210.236523 113.190802) (xy 209.992106 112.945958) (xy 209.595488 112.781267) (xy 209.377947 112.781077) + (xy 208.534 111.93713) (xy 208.534 107.76017) (xy 213.807375 102.486795) (xy 213.807376 102.486795) (xy 213.906394 102.338603) + (xy 213.972556 102.239585) (xy 213.972556 102.239584) (xy 214.03056 101.94798) (xy 214.03056 86.76707) (xy 223.212617 77.585013) + (xy 223.2409 77.596757) (xy 223.796661 77.597242) (xy 224.310303 77.38501) (xy 224.703629 76.99237) (xy 224.916757 76.4791) + (xy 224.917242 75.923339) (xy 224.731115 75.472876) (xy 224.802204 75.458736) (xy 224.802205 75.458736) (xy 225.049415 75.293555) + (xy 225.120535 75.222435) (xy 225.285716 74.975225) (xy 225.285716 74.975224) (xy 225.34372 74.68362) (xy 225.34372 87.614304) + (xy 224.997698 87.490856) (xy 224.442632 87.518638) (xy 224.058857 87.677603) (xy 223.989392 87.919787) (xy 224.79 88.720395) + (xy 225.590608 87.919787) (xy 225.590608 88.278997) (xy 224.969605 88.9) (xy 225.770213 89.700608) (xy 226.012397 89.631143) + (xy 226.199144 89.107698) (xy 226.199144 137.367698) (xy 226.187242 137.129903) (xy 226.187242 134.343339) (xy 225.97501 133.829697) + (xy 225.58237 133.436371) (xy 225.374487 133.35005) (xy 225.580303 133.26501) (xy 225.973629 132.87237) (xy 226.186757 132.3591) + (xy 226.187242 131.803339) (xy 225.97501 131.289697) (xy 225.58237 130.896371) (xy 225.374487 130.81005) (xy 225.580303 130.72501) + (xy 225.973629 130.33237) (xy 226.186757 129.8191) (xy 226.187242 129.263339) (xy 225.97501 128.749697) (xy 225.58237 128.356371) + (xy 225.374487 128.27005) (xy 225.580303 128.18501) (xy 225.973629 127.79237) (xy 226.186757 127.2791) (xy 226.187242 126.723339) + (xy 225.97501 126.209697) (xy 225.58237 125.816371) (xy 225.374487 125.73005) (xy 225.580303 125.64501) (xy 225.973629 125.25237) + (xy 226.186757 124.7391) (xy 226.187242 124.183339) (xy 225.97501 123.669697) (xy 225.58237 123.276371) (xy 225.374487 123.19005) + (xy 225.580303 123.10501) (xy 225.973629 122.71237) (xy 226.186757 122.1991) (xy 226.187242 121.643339) (xy 225.97501 121.129697) + (xy 225.58237 120.736371) (xy 225.374487 120.65005) (xy 225.580303 120.56501) (xy 225.973629 120.17237) (xy 226.186757 119.6591) + (xy 226.187242 119.103339) (xy 225.97501 118.589697) (xy 225.58237 118.196371) (xy 225.374487 118.11005) (xy 225.580303 118.02501) + (xy 225.973629 117.63237) (xy 226.186757 117.1191) (xy 226.187242 116.563339) (xy 225.97501 116.049697) (xy 225.58237 115.656371) + (xy 225.374487 115.57005) (xy 225.580303 115.48501) (xy 225.973629 115.09237) (xy 226.186757 114.5791) (xy 226.187242 114.023339) + (xy 225.97501 113.509697) (xy 225.58237 113.116371) (xy 225.374487 113.03005) (xy 225.580303 112.94501) (xy 225.973629 112.55237) + (xy 226.186757 112.0391) (xy 226.187242 111.483339) (xy 225.97501 110.969697) (xy 225.58237 110.576371) (xy 225.374487 110.49005) + (xy 225.580303 110.40501) (xy 225.973629 110.01237) (xy 226.186757 109.4991) (xy 226.187242 108.943339) (xy 225.97501 108.429697) + (xy 225.58237 108.036371) (xy 225.374487 107.95005) (xy 225.580303 107.86501) (xy 225.973629 107.47237) (xy 226.186757 106.9591) + (xy 226.187242 106.403339) (xy 225.97501 105.889697) (xy 225.58237 105.496371) (xy 225.374487 105.41005) (xy 225.580303 105.32501) + (xy 225.973629 104.93237) (xy 226.186757 104.4191) (xy 226.187242 103.863339) (xy 225.97501 103.349697) (xy 225.58237 102.956371) + (xy 225.374487 102.87005) (xy 225.580303 102.78501) (xy 225.973629 102.39237) (xy 226.186757 101.8791) (xy 226.187242 101.323339) + (xy 225.97501 100.809697) (xy 225.58237 100.416371) (xy 225.374487 100.33005) (xy 225.580303 100.24501) (xy 225.973629 99.85237) + (xy 226.186757 99.3391) (xy 226.187242 98.783339) (xy 225.97501 98.269697) (xy 225.58237 97.876371) (xy 225.374487 97.79005) + (xy 225.580303 97.70501) (xy 225.973629 97.31237) (xy 226.186757 96.7991) (xy 226.187242 96.243339) (xy 225.97501 95.729697) + (xy 225.58237 95.336371) (xy 225.374487 95.25005) (xy 225.580303 95.16501) (xy 225.973629 94.77237) (xy 226.186757 94.2591) + (xy 226.187242 93.703339) (xy 225.97501 93.189697) (xy 225.58237 92.796371) (xy 225.374487 92.71005) (xy 225.580303 92.62501) + (xy 225.973629 92.23237) (xy 226.186757 91.7191) (xy 226.187242 91.163339) (xy 225.97501 90.649697) (xy 225.58237 90.256371) + (xy 225.390272 90.176605) (xy 225.521143 90.122397) (xy 225.590608 89.880213) (xy 224.79 89.079605) (xy 223.989392 89.880213) + (xy 224.058857 90.122397) (xy 224.199317 90.172508) (xy 223.999697 90.25499) (xy 223.606371 90.64763) (xy 223.52005 90.855512) + (xy 223.43501 90.649697) (xy 223.082928 90.297) (xy 223.138309 90.297) (xy 223.371698 90.200327) (xy 223.550327 90.021699) + (xy 223.647 89.78831) (xy 223.647 89.653916) (xy 223.809787 89.700608) (xy 224.610395 88.9) (xy 223.809787 88.099392) + (xy 223.647 88.146083) (xy 223.647 88.011691) (xy 223.550327 87.778302) (xy 223.371699 87.599673) (xy 223.13831 87.503) + (xy 222.885691 87.503) (xy 221.361691 87.503) (xy 221.128302 87.599673) (xy 220.949673 87.778301) (xy 220.853 88.01169) + (xy 220.853 88.264309) (xy 220.853 89.788309) (xy 220.949673 90.021698) (xy 221.128301 90.200327) (xy 221.36169 90.297) + (xy 221.417613 90.297) (xy 221.066371 90.64763) (xy 220.853243 91.1609) (xy 220.852758 91.716661) (xy 221.06499 92.230303) + (xy 221.45763 92.623629) (xy 221.665512 92.709949) (xy 221.459697 92.79499) (xy 221.066371 93.18763) (xy 220.853243 93.7009) + (xy 220.852758 94.256661) (xy 221.06499 94.770303) (xy 221.45763 95.163629) (xy 221.665512 95.249949) (xy 221.459697 95.33499) + (xy 221.066371 95.72763) (xy 220.853243 96.2409) (xy 220.852758 96.796661) (xy 221.06499 97.310303) (xy 221.45763 97.703629) + (xy 221.665512 97.789949) (xy 221.459697 97.87499) (xy 221.066371 98.26763) (xy 220.853243 98.7809) (xy 220.852758 99.336661) + (xy 221.06499 99.850303) (xy 221.45763 100.243629) (xy 221.665512 100.329949) (xy 221.459697 100.41499) (xy 221.066371 100.80763) + (xy 220.853243 101.3209) (xy 220.852758 101.876661) (xy 221.06499 102.390303) (xy 221.45763 102.783629) (xy 221.665512 102.869949) + (xy 221.459697 102.95499) (xy 221.066371 103.34763) (xy 220.853243 103.8609) (xy 220.852758 104.416661) (xy 221.06499 104.930303) + (xy 221.45763 105.323629) (xy 221.665512 105.409949) (xy 221.459697 105.49499) (xy 221.066371 105.88763) (xy 220.853243 106.4009) + (xy 220.852758 106.956661) (xy 221.06499 107.470303) (xy 221.45763 107.863629) (xy 221.665512 107.949949) (xy 221.459697 108.03499) + (xy 221.066371 108.42763) (xy 220.853243 108.9409) (xy 220.852758 109.496661) (xy 221.06499 110.010303) (xy 221.45763 110.403629) + (xy 221.665512 110.489949) (xy 221.459697 110.57499) (xy 221.066371 110.96763) (xy 220.853243 111.4809) (xy 220.852758 112.036661) + (xy 221.06499 112.550303) (xy 221.45763 112.943629) (xy 221.665512 113.029949) (xy 221.459697 113.11499) (xy 221.066371 113.50763) + (xy 220.853243 114.0209) (xy 220.852758 114.576661) (xy 221.06499 115.090303) (xy 221.45763 115.483629) (xy 221.665512 115.569949) + (xy 221.459697 115.65499) (xy 221.081787 116.03224) (xy 221.081787 115.541636) (xy 220.917789 115.144731) (xy 220.614386 114.840798) + (xy 220.217768 114.676107) (xy 219.788316 114.675733) (xy 219.391411 114.839731) (xy 219.087478 115.143134) (xy 218.922787 115.539752) + (xy 218.922413 115.969204) (xy 219.086411 116.366109) (xy 219.389814 116.670042) (xy 219.786432 116.834733) (xy 220.215884 116.835107) + (xy 220.612789 116.671109) (xy 220.916722 116.367706) (xy 221.081413 115.971088) (xy 221.081787 115.541636) (xy 221.081787 116.03224) + (xy 221.066371 116.04763) (xy 220.853243 116.5609) (xy 220.852758 117.116661) (xy 221.06499 117.630303) (xy 221.45763 118.023629) + (xy 221.665512 118.109949) (xy 221.459697 118.19499) (xy 221.066371 118.58763) (xy 220.853243 119.1009) (xy 220.852758 119.656661) + (xy 221.06499 120.170303) (xy 221.45763 120.563629) (xy 221.665512 120.649949) (xy 221.459697 120.73499) (xy 221.066371 121.12763) + (xy 220.853243 121.6409) (xy 220.852758 122.196661) (xy 221.06499 122.710303) (xy 221.45763 123.103629) (xy 221.665512 123.189949) + (xy 221.459697 123.27499) (xy 221.066371 123.66763) (xy 220.853243 124.1809) (xy 220.852758 124.736661) (xy 221.06499 125.250303) + (xy 221.45763 125.643629) (xy 221.665512 125.729949) (xy 221.459697 125.81499) (xy 221.066371 126.20763) (xy 220.853243 126.7209) + (xy 220.852758 127.276661) (xy 221.06499 127.790303) (xy 221.45763 128.183629) (xy 221.665512 128.269949) (xy 221.459697 128.35499) + (xy 221.066371 128.74763) (xy 220.853243 129.2609) (xy 220.852758 129.816661) (xy 221.06499 130.330303) (xy 221.45763 130.723629) + (xy 221.665512 130.809949) (xy 221.459697 130.89499) (xy 221.066371 131.28763) (xy 221.05376 131.318) (xy 217.769627 131.318) + (xy 217.769627 115.066656) (xy 217.605629 114.669751) (xy 217.302226 114.365818) (xy 216.905608 114.201127) (xy 216.476156 114.200753) + (xy 216.079251 114.364751) (xy 215.994167 114.449686) (xy 215.994167 107.792096) (xy 215.830169 107.395191) (xy 215.526766 107.091258) + (xy 215.130148 106.926567) (xy 214.700696 106.926193) (xy 214.303791 107.090191) (xy 213.999858 107.393594) (xy 213.835167 107.790212) + (xy 213.834793 108.219664) (xy 213.998791 108.616569) (xy 214.302194 108.920502) (xy 214.698812 109.085193) (xy 215.128264 109.085567) + (xy 215.525169 108.921569) (xy 215.829102 108.618166) (xy 215.993793 108.221548) (xy 215.994167 107.792096) (xy 215.994167 114.449686) + (xy 215.775318 114.668154) (xy 215.610627 115.064772) (xy 215.610253 115.494224) (xy 215.774251 115.891129) (xy 216.077654 116.195062) + (xy 216.474272 116.359753) (xy 216.903724 116.360127) (xy 217.300629 116.196129) (xy 217.604562 115.892726) (xy 217.769253 115.496108) + (xy 217.769627 115.066656) (xy 217.769627 131.318) (xy 217.19353 131.318) (xy 211.152739 125.277209) (xy 211.152927 125.061556) + (xy 210.988929 124.664651) (xy 210.939589 124.615224) (xy 210.939589 117.855825) (xy 210.756298 117.412225) (xy 210.4172 117.072535) + (xy 209.973921 116.88847) (xy 209.493945 116.888051) (xy 209.050345 117.071342) (xy 208.710655 117.41044) (xy 208.52659 117.853719) + (xy 208.526171 118.333695) (xy 208.709462 118.777295) (xy 209.04856 119.116985) (xy 209.491839 119.30105) (xy 209.971815 119.301469) + (xy 210.415415 119.118178) (xy 210.755105 118.77908) (xy 210.93917 118.335801) (xy 210.939589 117.855825) (xy 210.939589 124.615224) + (xy 210.685526 124.360718) (xy 210.288908 124.196027) (xy 209.859456 124.195653) (xy 209.462551 124.359651) (xy 209.158618 124.663054) + (xy 208.993927 125.059672) (xy 208.993553 125.489124) (xy 209.157551 125.886029) (xy 209.460954 126.189962) (xy 209.857572 126.354653) + (xy 210.075112 126.354842) (xy 216.339084 132.618815) (xy 216.339085 132.618815) (xy 216.586295 132.783996) (xy 216.8779 132.842) + (xy 221.053295 132.842) (xy 221.06499 132.870303) (xy 221.45763 133.263629) (xy 221.665512 133.349949) (xy 221.459697 133.43499) + (xy 221.066371 133.82763) (xy 220.853243 134.3409) (xy 220.852758 134.896661) (xy 221.06499 135.410303) (xy 221.45763 135.803629) + (xy 221.665512 135.889949) (xy 221.459697 135.97499) (xy 221.066371 136.36763) (xy 220.853243 136.8809) (xy 220.852758 137.436661) + (xy 221.06499 137.950303) (xy 221.45763 138.343629) (xy 221.9709 138.556757) (xy 222.526661 138.557242) (xy 223.040303 138.34501) + (xy 223.433629 137.95237) (xy 223.513394 137.760272) (xy 223.567603 137.891143) (xy 223.809787 137.960608) (xy 224.610395 137.16) + (xy 223.809787 136.359392) (xy 223.567603 136.428857) (xy 223.517491 136.569317) (xy 223.43501 136.369697) (xy 223.04237 135.976371) + (xy 222.834487 135.89005) (xy 223.040303 135.80501) (xy 223.433629 135.41237) (xy 223.519949 135.204487) (xy 223.60499 135.410303) + (xy 223.99763 135.803629) (xy 224.189727 135.883394) (xy 224.058857 135.937603) (xy 223.989392 136.179787) (xy 224.79 136.980395) + (xy 225.590608 136.179787) (xy 225.521143 135.937603) (xy 225.380682 135.887491) (xy 225.580303 135.80501) (xy 225.973629 135.41237) + (xy 226.186757 134.8991) (xy 226.187242 134.343339) (xy 226.187242 137.129903) (xy 226.171362 136.812632) (xy 226.012397 136.428857) + (xy 225.770213 136.359392) (xy 224.969605 137.16) (xy 225.770213 137.960608) (xy 226.012397 137.891143) (xy 226.199144 137.367698) + (xy 226.199144 145.927614) (xy 225.590608 145.930098) (xy 225.590608 138.140213) (xy 224.79 137.339605) (xy 223.989392 138.140213) + (xy 224.058857 138.382397) (xy 224.582302 138.569144) (xy 225.137368 138.541362) (xy 225.521143 138.382397) (xy 225.590608 138.140213) + (xy 225.590608 145.930098) (xy 218.567242 145.958765) (xy 218.567242 134.343339) (xy 218.35501 133.829697) (xy 217.96237 133.436371) + (xy 217.4491 133.223243) (xy 216.893339 133.222758) (xy 216.379697 133.43499) (xy 215.986371 133.82763) (xy 215.773243 134.3409) + (xy 215.772758 134.896661) (xy 215.98499 135.410303) (xy 216.37763 135.803629) (xy 216.8909 136.016757) (xy 217.446661 136.017242) + (xy 217.960303 135.80501) (xy 218.353629 135.41237) (xy 218.566757 134.8991) (xy 218.567242 134.343339) (xy 218.567242 145.958765) + (xy 208.407242 146.000234) (xy 208.407242 134.343339) (xy 208.19501 133.829697) (xy 207.80237 133.436371) (xy 207.581687 133.344735) + (xy 207.581687 126.024216) (xy 207.417689 125.627311) (xy 207.114286 125.323378) (xy 206.857809 125.216878) (xy 206.857809 120.990185) + (xy 206.674518 120.546585) (xy 206.33542 120.206895) (xy 205.892141 120.02283) (xy 205.412165 120.022411) (xy 205.224567 120.099924) + (xy 205.224567 116.740516) (xy 205.060569 116.343611) (xy 204.757166 116.039678) (xy 204.360548 115.874987) (xy 203.931096 115.874613) + (xy 203.687889 115.975104) (xy 203.687889 102.758065) (xy 203.504598 102.314465) (xy 203.1655 101.974775) (xy 202.722221 101.79071) + (xy 202.242245 101.790291) (xy 201.798645 101.973582) (xy 201.458955 102.31268) (xy 201.422242 102.401094) (xy 201.422242 89.258339) + (xy 201.21001 88.744697) (xy 200.81737 88.351371) (xy 200.609487 88.26505) (xy 200.815303 88.18001) (xy 201.208629 87.78737) + (xy 201.421757 87.2741) (xy 201.422242 86.718339) (xy 201.422242 81.892339) (xy 201.21001 81.378697) (xy 200.81737 80.985371) + (xy 200.609487 80.89905) (xy 200.815303 80.81401) (xy 201.208629 80.42137) (xy 201.421757 79.9081) (xy 201.422242 79.352339) + (xy 201.21001 78.838697) (xy 200.81737 78.445371) (xy 200.609487 78.35905) (xy 200.815303 78.27401) (xy 201.208629 77.88137) + (xy 201.421757 77.3681) (xy 201.422242 76.812339) (xy 201.21001 76.298697) (xy 200.81737 75.905371) (xy 200.609487 75.81905) + (xy 200.815303 75.73401) (xy 201.208629 75.34137) (xy 201.421757 74.8281) (xy 201.422242 74.272339) (xy 201.21001 73.758697) + (xy 200.81737 73.365371) (xy 200.3041 73.152243) (xy 199.748339 73.151758) (xy 199.234697 73.36399) (xy 198.882 73.716071) + (xy 198.882 73.660691) (xy 198.785327 73.427302) (xy 198.606699 73.248673) (xy 198.37331 73.152) (xy 198.120691 73.152) + (xy 196.596691 73.152) (xy 196.363302 73.248673) (xy 196.184673 73.427301) (xy 196.100144 73.631371) (xy 196.100144 68.787698) + (xy 196.072362 68.232632) (xy 195.913397 67.848857) (xy 195.671213 67.779392) (xy 195.491608 67.958997) (xy 195.491608 67.599787) + (xy 195.422143 67.357603) (xy 194.898698 67.170856) (xy 194.691242 67.181239) (xy 194.691242 65.763339) (xy 194.47901 65.249697) + (xy 194.08637 64.856371) (xy 193.5731 64.643243) (xy 193.017339 64.642758) (xy 192.503697 64.85499) (xy 192.110371 65.24763) + (xy 191.897243 65.7609) (xy 191.89724 65.763336) (xy 191.68501 65.249697) (xy 191.29237 64.856371) (xy 190.7791 64.643243) + (xy 190.223339 64.642758) (xy 189.709697 64.85499) (xy 189.316371 65.24763) (xy 189.166394 65.608814) (xy 189.01801 65.249697) + (xy 188.62537 64.856371) (xy 188.1121 64.643243) (xy 187.556339 64.642758) (xy 187.042697 64.85499) (xy 186.649371 65.24763) + (xy 186.436243 65.7609) (xy 186.43624 65.763336) (xy 186.22401 65.249697) (xy 185.83137 64.856371) (xy 185.3181 64.643243) + (xy 184.762339 64.642758) (xy 184.248697 64.85499) (xy 183.855371 65.24763) (xy 183.642243 65.7609) (xy 183.641758 66.316661) + (xy 183.85399 66.830303) (xy 184.206071 67.183) (xy 182.753691 67.183) (xy 182.520302 67.279673) (xy 182.341673 67.458301) + (xy 182.245 67.69169) (xy 182.245 67.944309) (xy 182.245 69.468309) (xy 182.341673 69.701698) (xy 182.520301 69.880327) + (xy 182.75369 69.977) (xy 183.006309 69.977) (xy 184.530309 69.977) (xy 184.763698 69.880327) (xy 184.942327 69.701699) + (xy 185.039 69.46831) (xy 185.039 69.215691) (xy 185.039 68.857246) (xy 185.25099 69.370303) (xy 185.64363 69.763629) + (xy 186.1569 69.976757) (xy 186.712661 69.977242) (xy 187.226303 69.76501) (xy 187.619629 69.37237) (xy 187.769605 69.011185) + (xy 187.91799 69.370303) (xy 188.31063 69.763629) (xy 188.8239 69.976757) (xy 189.379661 69.977242) (xy 189.893303 69.76501) + (xy 190.286629 69.37237) (xy 190.499757 68.8591) (xy 190.499759 68.856663) (xy 190.71199 69.370303) (xy 191.10463 69.763629) + (xy 191.6179 69.976757) (xy 192.173661 69.977242) (xy 192.687303 69.76501) (xy 193.080629 69.37237) (xy 193.293757 68.8591) + (xy 193.29397 68.614343) (xy 193.309638 68.927368) (xy 193.468603 69.311143) (xy 193.710787 69.380608) (xy 194.511395 68.58) + (xy 193.710787 67.779392) (xy 193.468603 67.848857) (xy 193.294212 68.337668) (xy 193.294242 68.303339) (xy 193.08201 67.789697) + (xy 192.68937 67.396371) (xy 192.1761 67.183243) (xy 191.620339 67.182758) (xy 191.106697 67.39499) (xy 190.713371 67.78763) + (xy 190.500243 68.3009) (xy 190.50024 68.303336) (xy 190.28801 67.789697) (xy 189.89537 67.396371) (xy 189.3821 67.183243) + (xy 188.826339 67.182758) (xy 188.312697 67.39499) (xy 187.919371 67.78763) (xy 187.769394 68.148814) (xy 187.62101 67.789697) + (xy 187.22837 67.396371) (xy 186.7151 67.183243) (xy 186.159339 67.182758) (xy 185.645697 67.39499) (xy 185.252371 67.78763) + (xy 185.039243 68.3009) (xy 185.039 68.579353) (xy 185.039 67.691691) (xy 184.942327 67.458302) (xy 184.920922 67.436897) + (xy 185.315661 67.437242) (xy 185.829303 67.22501) (xy 186.222629 66.83237) (xy 186.435757 66.3191) (xy 186.435759 66.316663) + (xy 186.64799 66.830303) (xy 187.04063 67.223629) (xy 187.5539 67.436757) (xy 188.109661 67.437242) (xy 188.623303 67.22501) + (xy 189.016629 66.83237) (xy 189.166605 66.471185) (xy 189.31499 66.830303) (xy 189.70763 67.223629) (xy 190.2209 67.436757) + (xy 190.776661 67.437242) (xy 191.290303 67.22501) (xy 191.683629 66.83237) (xy 191.896757 66.3191) (xy 191.896759 66.316663) + (xy 192.10899 66.830303) (xy 192.50163 67.223629) (xy 193.0149 67.436757) (xy 193.570661 67.437242) (xy 194.084303 67.22501) + (xy 194.477629 66.83237) (xy 194.690757 66.3191) (xy 194.691242 65.763339) (xy 194.691242 67.181239) (xy 194.343632 67.198638) + (xy 193.959857 67.357603) (xy 193.890392 67.599787) (xy 194.691 68.400395) (xy 195.491608 67.599787) (xy 195.491608 67.958997) + (xy 194.870605 68.58) (xy 195.671213 69.380608) (xy 195.913397 69.311143) (xy 196.100144 68.787698) (xy 196.100144 73.631371) + (xy 196.088 73.66069) (xy 196.088 73.913309) (xy 196.088 75.437309) (xy 196.184673 75.670698) (xy 196.363301 75.849327) + (xy 196.59669 75.946) (xy 196.652613 75.946) (xy 196.301371 76.29663) (xy 196.088243 76.8099) (xy 196.087758 77.365661) + (xy 196.29999 77.879303) (xy 196.69263 78.272629) (xy 196.900512 78.358949) (xy 196.694697 78.44399) (xy 196.301371 78.83663) + (xy 196.088243 79.3499) (xy 196.087758 79.905661) (xy 196.29999 80.419303) (xy 196.69263 80.812629) (xy 196.900512 80.898949) + (xy 196.694697 80.98399) (xy 196.301371 81.37663) (xy 196.088243 81.8899) (xy 196.087758 82.445661) (xy 196.29999 82.959303) + (xy 196.69263 83.352629) (xy 197.2059 83.565757) (xy 197.761661 83.566242) (xy 198.275303 83.35401) (xy 198.668629 82.96137) + (xy 198.754949 82.753487) (xy 198.83999 82.959303) (xy 199.23263 83.352629) (xy 199.7459 83.565757) (xy 200.301661 83.566242) + (xy 200.815303 83.35401) (xy 201.208629 82.96137) (xy 201.421757 82.4481) (xy 201.422242 81.892339) (xy 201.422242 86.718339) + (xy 201.21001 86.204697) (xy 200.81737 85.811371) (xy 200.3041 85.598243) (xy 199.748339 85.597758) (xy 199.234697 85.80999) + (xy 198.882 86.162071) (xy 198.882 86.106691) (xy 198.785327 85.873302) (xy 198.606699 85.694673) (xy 198.37331 85.598) + (xy 198.120691 85.598) (xy 196.596691 85.598) (xy 196.363302 85.694673) (xy 196.184673 85.873301) (xy 196.088 86.10669) + (xy 196.088 86.359309) (xy 196.088 87.883309) (xy 196.184673 88.116698) (xy 196.363301 88.295327) (xy 196.59669 88.392) + (xy 196.652613 88.392) (xy 196.301371 88.74263) (xy 196.088243 89.2559) (xy 196.087758 89.811661) (xy 196.29999 90.325303) + (xy 196.69263 90.718629) (xy 197.2059 90.931757) (xy 197.761661 90.932242) (xy 198.275303 90.72001) (xy 198.668629 90.32737) + (xy 198.754949 90.119487) (xy 198.83999 90.325303) (xy 199.23263 90.718629) (xy 199.7459 90.931757) (xy 200.301661 90.932242) + (xy 200.815303 90.72001) (xy 201.208629 90.32737) (xy 201.421757 89.8141) (xy 201.422242 89.258339) (xy 201.422242 102.401094) + (xy 201.27489 102.755959) (xy 201.274471 103.235935) (xy 201.457762 103.679535) (xy 201.79686 104.019225) (xy 202.240139 104.20329) + (xy 202.720115 104.203709) (xy 203.163715 104.020418) (xy 203.503405 103.68132) (xy 203.68747 103.238041) (xy 203.687889 102.758065) + (xy 203.687889 115.975104) (xy 203.534191 116.038611) (xy 203.230258 116.342014) (xy 203.065567 116.738632) (xy 203.065193 117.168084) + (xy 203.229191 117.564989) (xy 203.532594 117.868922) (xy 203.929212 118.033613) (xy 204.358664 118.033987) (xy 204.755569 117.869989) + (xy 205.059502 117.566586) (xy 205.224193 117.169968) (xy 205.224567 116.740516) (xy 205.224567 120.099924) (xy 204.968565 120.205702) + (xy 204.908353 120.265808) (xy 204.86222 120.219595) (xy 204.418941 120.03553) (xy 203.938965 120.035111) (xy 203.495365 120.218402) + (xy 203.155675 120.5575) (xy 202.97161 121.000779) (xy 202.971191 121.480755) (xy 203.154482 121.924355) (xy 203.49358 122.264045) + (xy 203.936859 122.44811) (xy 204.416835 122.448529) (xy 204.860435 122.265238) (xy 204.920646 122.205131) (xy 204.96678 122.251345) + (xy 205.410059 122.43541) (xy 205.890035 122.435829) (xy 206.333635 122.252538) (xy 206.673325 121.91344) (xy 206.85739 121.470161) + (xy 206.857809 120.990185) (xy 206.857809 125.216878) (xy 206.717668 125.158687) (xy 206.288216 125.158313) (xy 205.891311 125.322311) + (xy 205.587378 125.625714) (xy 205.422687 126.022332) (xy 205.422313 126.451784) (xy 205.586311 126.848689) (xy 205.889714 127.152622) + (xy 206.286332 127.317313) (xy 206.715784 127.317687) (xy 207.112689 127.153689) (xy 207.416622 126.850286) (xy 207.581313 126.453668) + (xy 207.581687 126.024216) (xy 207.581687 133.344735) (xy 207.2891 133.223243) (xy 206.733339 133.222758) (xy 206.219697 133.43499) + (xy 205.826371 133.82763) (xy 205.613243 134.3409) (xy 205.612758 134.896661) (xy 205.82499 135.410303) (xy 206.21763 135.803629) + (xy 206.7309 136.016757) (xy 207.286661 136.017242) (xy 207.800303 135.80501) (xy 208.193629 135.41237) (xy 208.406757 134.8991) + (xy 208.407242 134.343339) (xy 208.407242 146.000234) (xy 201.770189 146.027324) (xy 201.770189 120.830165) (xy 201.586898 120.386565) + (xy 201.2478 120.046875) (xy 200.804521 119.86281) (xy 200.469687 119.862517) (xy 200.469687 95.925216) (xy 200.305689 95.528311) + (xy 200.002286 95.224378) (xy 199.605668 95.059687) (xy 199.176216 95.059313) (xy 198.779311 95.223311) (xy 198.475378 95.526714) + (xy 198.310687 95.923332) (xy 198.310313 96.352784) (xy 198.474311 96.749689) (xy 198.777714 97.053622) (xy 199.174332 97.218313) + (xy 199.603784 97.218687) (xy 200.000689 97.054689) (xy 200.304622 96.751286) (xy 200.469313 96.354668) (xy 200.469687 95.925216) + (xy 200.469687 119.862517) (xy 200.324545 119.862391) (xy 200.215709 119.90736) (xy 200.215709 102.737745) (xy 200.032418 102.294145) + (xy 199.69332 101.954455) (xy 199.250041 101.77039) (xy 198.770065 101.769971) (xy 198.326465 101.953262) (xy 198.183687 102.095791) + (xy 198.183687 98.465216) (xy 198.019689 98.068311) (xy 197.716286 97.764378) (xy 197.319668 97.599687) (xy 196.890216 97.599313) + (xy 196.493311 97.763311) (xy 196.189378 98.066714) (xy 196.024687 98.463332) (xy 196.024313 98.892784) (xy 196.188311 99.289689) + (xy 196.491714 99.593622) (xy 196.888332 99.758313) (xy 197.317784 99.758687) (xy 197.714689 99.594689) (xy 198.018622 99.291286) + (xy 198.183313 98.894668) (xy 198.183687 98.465216) (xy 198.183687 102.095791) (xy 197.986775 102.29236) (xy 197.80271 102.735639) + (xy 197.802291 103.215615) (xy 197.985582 103.659215) (xy 198.32468 103.998905) (xy 198.767959 104.18297) (xy 199.247935 104.183389) + (xy 199.691535 104.000098) (xy 200.031225 103.661) (xy 200.21529 103.217721) (xy 200.215709 102.737745) (xy 200.215709 119.90736) + (xy 199.880945 120.045682) (xy 199.541255 120.38478) (xy 199.35719 120.828059) (xy 199.356771 121.308035) (xy 199.540062 121.751635) + (xy 199.87916 122.091325) (xy 200.322439 122.27539) (xy 200.802415 122.275809) (xy 201.246015 122.092518) (xy 201.585705 121.75342) + (xy 201.76977 121.310141) (xy 201.770189 120.830165) (xy 201.770189 146.027324) (xy 195.897709 146.051293) (xy 195.897709 124.983065) + (xy 195.714418 124.539465) (xy 195.491608 124.316266) (xy 195.491608 69.560213) (xy 194.691 68.759605) (xy 193.890392 69.560213) + (xy 193.959857 69.802397) (xy 194.483302 69.989144) (xy 195.038368 69.961362) (xy 195.422143 69.802397) (xy 195.491608 69.560213) + (xy 195.491608 124.316266) (xy 195.37532 124.199775) (xy 194.932041 124.01571) (xy 194.881709 124.015666) (xy 194.881709 109.616065) + (xy 194.698418 109.172465) (xy 194.35932 108.832775) (xy 194.171018 108.754585) (xy 194.205673 108.671128) (xy 194.206047 108.241676) + (xy 194.07451 107.923334) (xy 194.189225 107.80882) (xy 194.37329 107.365541) (xy 194.373709 106.885565) (xy 194.190418 106.441965) + (xy 193.989664 106.240861) (xy 194.208622 106.022286) (xy 194.373313 105.625668) (xy 194.373687 105.196216) (xy 194.209689 104.799311) + (xy 193.906286 104.495378) (xy 193.509668 104.330687) (xy 193.080216 104.330313) (xy 192.683311 104.494311) (xy 192.379378 104.797714) + (xy 192.214709 105.194279) (xy 192.214709 72.786065) (xy 192.031418 72.342465) (xy 191.69232 72.002775) (xy 191.249041 71.81871) + (xy 190.769065 71.818291) (xy 190.325465 72.001582) (xy 189.985775 72.34068) (xy 189.80171 72.783959) (xy 189.801291 73.263935) + (xy 189.984582 73.707535) (xy 190.32368 74.047225) (xy 190.766959 74.23129) (xy 191.246935 74.231709) (xy 191.690535 74.048418) + (xy 192.030225 73.70932) (xy 192.21429 73.266041) (xy 192.214709 72.786065) (xy 192.214709 105.194279) (xy 192.214687 105.194332) + (xy 192.214313 105.623784) (xy 192.378311 106.020689) (xy 192.471491 106.114032) (xy 192.144775 106.44018) (xy 191.96071 106.883459) + (xy 191.960291 107.363435) (xy 192.143582 107.807035) (xy 192.202313 107.865869) (xy 192.047047 108.239792) (xy 192.046673 108.669244) + (xy 192.210671 109.066149) (xy 192.514074 109.370082) (xy 192.561755 109.389881) (xy 192.46871 109.613959) (xy 192.468291 110.093935) + (xy 192.651582 110.537535) (xy 192.99068 110.877225) (xy 193.433959 111.06129) (xy 193.913935 111.061709) (xy 194.357535 110.878418) + (xy 194.697225 110.53932) (xy 194.88129 110.096041) (xy 194.881709 109.616065) (xy 194.881709 124.015666) (xy 194.452065 124.015291) + (xy 194.008465 124.198582) (xy 193.668775 124.53768) (xy 193.667589 124.540536) (xy 193.667589 113.273665) (xy 193.484298 112.830065) + (xy 193.1452 112.490375) (xy 192.701921 112.30631) (xy 192.221945 112.305891) (xy 191.778345 112.489182) (xy 191.438655 112.82828) + (xy 191.25459 113.271559) (xy 191.254589 113.272704) (xy 191.254589 100.967365) (xy 191.071298 100.523765) (xy 190.7322 100.184075) + (xy 190.575927 100.119184) (xy 190.575927 90.99752) (xy 190.563731 90.773035) (xy 190.563731 88.000914) (xy 190.361146 87.51062) + (xy 189.986353 87.135173) (xy 189.496413 86.931732) (xy 188.965914 86.931269) (xy 188.47562 87.133854) (xy 188.100173 87.508647) + (xy 188.0235 87.693295) (xy 188.0235 87.440191) (xy 187.926827 87.206802) (xy 187.748199 87.028173) (xy 187.51481 86.9315) + (xy 187.262191 86.9315) (xy 187.261687 86.9315) (xy 187.261687 70.906216) (xy 187.097689 70.509311) (xy 186.794286 70.205378) + (xy 186.397668 70.040687) (xy 185.968216 70.040313) (xy 185.571311 70.204311) (xy 185.267378 70.507714) (xy 185.102687 70.904332) + (xy 185.102313 71.333784) (xy 185.266311 71.730689) (xy 185.3565 71.821035) (xy 185.3565 74.180251) (xy 185.229665 74.485705) + (xy 185.229335 74.864633) (xy 185.374039 75.214843) (xy 185.641747 75.48302) (xy 185.991705 75.628335) (xy 186.370633 75.628665) + (xy 186.720843 75.483961) (xy 186.98902 75.216253) (xy 187.134335 74.866295) (xy 187.134665 74.487367) (xy 187.0075 74.179604) + (xy 187.0075 71.821252) (xy 187.096622 71.732286) (xy 187.261313 71.335668) (xy 187.261687 70.906216) (xy 187.261687 86.9315) + (xy 185.865191 86.9315) (xy 185.631802 87.028173) (xy 185.453173 87.206801) (xy 185.3565 87.44019) (xy 185.3565 87.692809) + (xy 185.3565 89.089809) (xy 185.453173 89.323198) (xy 185.631801 89.501827) (xy 185.86519 89.5985) (xy 186.117809 89.5985) + (xy 187.514809 89.5985) (xy 187.748198 89.501827) (xy 187.926827 89.323199) (xy 188.0235 89.08981) (xy 188.0235 88.837191) + (xy 188.0235 88.837009) (xy 188.098854 89.01938) (xy 188.473647 89.394827) (xy 188.795118 89.528313) (xy 188.537071 89.6352) + (xy 188.475417 89.870812) (xy 189.23 90.625395) (xy 189.984583 89.870812) (xy 189.922929 89.6352) (xy 189.643688 89.536916) + (xy 189.98438 89.396146) (xy 190.359827 89.021353) (xy 190.563268 88.531413) (xy 190.563731 88.000914) (xy 190.563731 90.773035) + (xy 190.547148 90.467801) (xy 190.3998 90.112071) (xy 190.164188 90.050417) (xy 189.409605 90.805) (xy 190.164188 91.559583) + (xy 190.3998 91.497929) (xy 190.575927 90.99752) (xy 190.575927 100.119184) (xy 190.288921 100.00001) (xy 189.984583 99.999744) + (xy 189.984583 91.739188) (xy 189.23 90.984605) (xy 189.050395 91.16421) (xy 189.050395 90.805) (xy 188.295812 90.050417) + (xy 188.0602 90.112071) (xy 187.884073 90.61248) (xy 187.912852 91.142199) (xy 188.0602 91.497929) (xy 188.295812 91.559583) + (xy 189.050395 90.805) (xy 189.050395 91.16421) (xy 188.475417 91.739188) (xy 188.537071 91.9748) (xy 189.03748 92.150927) + (xy 189.567199 92.122148) (xy 189.922929 91.9748) (xy 189.984583 91.739188) (xy 189.984583 99.999744) (xy 189.808945 99.999591) + (xy 189.365345 100.182882) (xy 189.025655 100.52198) (xy 188.84159 100.965259) (xy 188.841171 101.445235) (xy 189.024462 101.888835) + (xy 189.36356 102.228525) (xy 189.806839 102.41259) (xy 190.286815 102.413009) (xy 190.730415 102.229718) (xy 191.070105 101.89062) + (xy 191.25417 101.447341) (xy 191.254589 100.967365) (xy 191.254589 113.272704) (xy 191.254171 113.751535) (xy 191.437462 114.195135) + (xy 191.77656 114.534825) (xy 192.219839 114.71889) (xy 192.699815 114.719309) (xy 193.143415 114.536018) (xy 193.483105 114.19692) + (xy 193.66717 113.753641) (xy 193.667589 113.273665) (xy 193.667589 124.540536) (xy 193.540589 124.846387) (xy 193.540589 123.606385) + (xy 193.357298 123.162785) (xy 193.0182 122.823095) (xy 192.574921 122.63903) (xy 192.094945 122.638611) (xy 191.651345 122.821902) + (xy 191.311655 123.161) (xy 191.12759 123.604279) (xy 191.127171 124.084255) (xy 191.310462 124.527855) (xy 191.64956 124.867545) + (xy 192.092839 125.05161) (xy 192.572815 125.052029) (xy 193.016415 124.868738) (xy 193.356105 124.52964) (xy 193.54017 124.086361) + (xy 193.540589 123.606385) (xy 193.540589 124.846387) (xy 193.48471 124.980959) (xy 193.484291 125.460935) (xy 193.667582 125.904535) + (xy 194.00668 126.244225) (xy 194.449959 126.42829) (xy 194.929935 126.428709) (xy 195.373535 126.245418) (xy 195.713225 125.90632) + (xy 195.89729 125.463041) (xy 195.897709 124.983065) (xy 195.897709 146.051293) (xy 189.877887 146.075864) (xy 189.877887 105.107316) + (xy 189.713889 104.710411) (xy 189.410486 104.406478) (xy 189.013868 104.241787) (xy 188.584416 104.241413) (xy 188.187511 104.405411) + (xy 187.883578 104.708814) (xy 187.718887 105.105432) (xy 187.718513 105.534884) (xy 187.882511 105.931789) (xy 188.185914 106.235722) + (xy 188.582532 106.400413) (xy 189.011984 106.400787) (xy 189.408889 106.236789) (xy 189.712822 105.933386) (xy 189.877513 105.536768) + (xy 189.877887 105.107316) (xy 189.877887 146.075864) (xy 189.453707 146.077595) (xy 189.453707 107.807336) (xy 189.289709 107.410431) + (xy 188.986306 107.106498) (xy 188.589688 106.941807) (xy 188.160236 106.941433) (xy 187.763331 107.105431) (xy 187.459398 107.408834) + (xy 187.294707 107.805452) (xy 187.294333 108.234904) (xy 187.458331 108.631809) (xy 187.761734 108.935742) (xy 188.158352 109.100433) + (xy 188.587804 109.100807) (xy 188.984709 108.936809) (xy 189.288642 108.633406) (xy 189.453333 108.236788) (xy 189.453707 107.807336) + (xy 189.453707 146.077595) (xy 187.198 146.086802) (xy 187.198 122.936) (xy 187.198 105.918) (xy 187.139996 105.626395) + (xy 186.974815 105.379185) (xy 183.896 102.30037) (xy 183.896 77.089) (xy 183.837996 76.797395) (xy 183.672815 76.550185) + (xy 183.672815 76.550184) (xy 179.100815 71.978185) (xy 179.07044 71.957889) (xy 179.07044 65.536979) (xy 178.684563 64.603085) + (xy 177.970673 63.887948) (xy 177.037454 63.500441) (xy 176.026979 63.49956) (xy 175.093085 63.885437) (xy 174.377948 64.599327) + (xy 173.990441 65.532546) (xy 173.98956 66.543021) (xy 174.375437 67.476915) (xy 175.089327 68.192052) (xy 176.022546 68.579559) + (xy 177.033021 68.58044) (xy 177.966915 68.194563) (xy 178.682052 67.480673) (xy 179.069559 66.547454) (xy 179.07044 65.536979) + (xy 179.07044 71.957889) (xy 178.853605 71.813004) (xy 178.562 71.755) (xy 174.117 71.755) (xy 173.825395 71.813004) + (xy 173.578185 71.978185) (xy 172.392382 73.163987) (xy 172.3641 73.152243) (xy 171.808339 73.151758) (xy 171.294697 73.36399) + (xy 170.94244 73.715631) (xy 170.94244 65.536979) (xy 170.556563 64.603085) (xy 169.842673 63.887948) (xy 168.909454 63.500441) + (xy 167.898979 63.49956) (xy 166.965085 63.885437) (xy 166.249948 64.599327) (xy 165.862441 65.532546) (xy 165.86156 66.543021) + (xy 166.247437 67.476915) (xy 166.961327 68.192052) (xy 167.894546 68.579559) (xy 168.905021 68.58044) (xy 169.838915 68.194563) + (xy 170.554052 67.480673) (xy 170.941559 66.547454) (xy 170.94244 65.536979) (xy 170.94244 73.715631) (xy 170.942 73.716071) + (xy 170.942 73.660691) (xy 170.845327 73.427302) (xy 170.666699 73.248673) (xy 170.43331 73.152) (xy 170.180691 73.152) + (xy 168.656691 73.152) (xy 168.423302 73.248673) (xy 168.244673 73.427301) (xy 168.148 73.66069) (xy 168.148 73.913309) + (xy 168.148 75.437309) (xy 168.244673 75.670698) (xy 168.423301 75.849327) (xy 168.65669 75.946) (xy 168.712613 75.946) + (xy 168.361371 76.29663) (xy 168.148243 76.8099) (xy 168.147758 77.365661) (xy 168.35999 77.879303) (xy 168.75263 78.272629) + (xy 168.960512 78.358949) (xy 168.754697 78.44399) (xy 168.361371 78.83663) (xy 168.148243 79.3499) (xy 168.147758 79.905661) + (xy 168.35999 80.419303) (xy 168.75263 80.812629) (xy 168.960512 80.898949) (xy 168.754697 80.98399) (xy 168.361371 81.37663) + (xy 168.148243 81.8899) (xy 168.147758 82.445661) (xy 168.35999 82.959303) (xy 168.75263 83.352629) (xy 169.2659 83.565757) + (xy 169.821661 83.566242) (xy 170.335303 83.35401) (xy 170.728629 82.96137) (xy 170.814949 82.753487) (xy 170.89999 82.959303) + (xy 171.29263 83.352629) (xy 171.8059 83.565757) (xy 172.361661 83.566242) (xy 172.875303 83.35401) (xy 173.268629 82.96137) + (xy 173.481757 82.4481) (xy 173.482242 81.892339) (xy 173.469683 81.861946) (xy 174.528815 80.802815) (xy 174.693996 80.555605) + (xy 174.693996 80.555604) (xy 174.752 80.264) (xy 174.752 79.05563) (xy 177.22663 76.581) (xy 177.865369 76.581) + (xy 179.197 77.91263) (xy 179.197 85.407499) (xy 178.983216 85.407313) (xy 178.586311 85.571311) (xy 178.282378 85.874714) + (xy 178.117687 86.271332) (xy 178.117313 86.700784) (xy 178.212608 86.931416) (xy 178.119367 86.931335) (xy 177.769157 87.076039) + (xy 177.723115 87.122) (xy 177.477567 87.122) (xy 177.466148 86.911801) (xy 177.3188 86.556071) (xy 177.083188 86.494417) + (xy 176.903583 86.674022) (xy 176.903583 86.314812) (xy 176.841929 86.0792) (xy 176.34152 85.903073) (xy 175.811801 85.931852) + (xy 175.456071 86.0792) (xy 175.394417 86.314812) (xy 176.149 87.069395) (xy 176.903583 86.314812) (xy 176.903583 86.674022) + (xy 176.328605 87.249) (xy 176.342747 87.263142) (xy 176.163142 87.442747) (xy 176.149 87.428605) (xy 175.969395 87.60821) + (xy 175.969395 87.249) (xy 175.214812 86.494417) (xy 174.9792 86.556071) (xy 174.803073 87.05648) (xy 174.831852 87.586199) + (xy 174.9792 87.941929) (xy 175.214812 88.003583) (xy 175.969395 87.249) (xy 175.969395 87.60821) (xy 175.394417 88.183188) + (xy 175.456071 88.4188) (xy 175.715322 88.510047) (xy 175.547978 88.677391) (xy 175.364286 88.493378) (xy 174.967668 88.328687) + (xy 174.538216 88.328313) (xy 174.141311 88.492311) (xy 173.882391 88.750779) (xy 173.88239 88.75078) (xy 173.705185 88.869185) + (xy 172.816185 89.758185) (xy 172.651004 90.005395) (xy 172.593 90.297) (xy 172.593 91.884609) (xy 172.252216 91.884313) + (xy 171.855311 92.048311) (xy 171.551378 92.351714) (xy 171.386687 92.748332) (xy 171.386313 93.177784) (xy 171.550311 93.574689) + (xy 171.704 93.728646) (xy 171.704 107.95) (xy 171.762004 108.241605) (xy 171.927185 108.488815) (xy 175.102185 111.663815) + (xy 175.349395 111.828996) (xy 175.641 111.887) (xy 175.697975 111.887) (xy 175.456071 111.9872) (xy 175.394417 112.222812) + (xy 176.149 112.977395) (xy 176.903583 112.222812) (xy 176.841929 111.9872) (xy 176.557242 111.887) (xy 178.562 111.887) + (xy 178.562 111.886999) (xy 178.853604 111.828996) (xy 178.853605 111.828996) (xy 179.100815 111.663815) (xy 179.72628 111.038349) + (xy 179.641687 111.242072) (xy 179.641313 111.671524) (xy 179.805311 112.068429) (xy 180.108714 112.372362) (xy 180.505332 112.537053) + (xy 180.848 112.537351) (xy 180.848 118.234358) (xy 180.695378 118.386714) (xy 180.530687 118.783332) (xy 180.530497 119.000872) + (xy 179.895709 119.63566) (xy 179.895709 118.633065) (xy 179.712418 118.189465) (xy 179.37332 117.849775) (xy 178.930041 117.66571) + (xy 178.450065 117.665291) (xy 178.006465 117.848582) (xy 177.666775 118.18768) (xy 177.494927 118.601537) (xy 177.494927 113.34952) + (xy 177.466148 112.819801) (xy 177.3188 112.464071) (xy 177.083188 112.402417) (xy 176.328605 113.157) (xy 177.083188 113.911583) + (xy 177.3188 113.849929) (xy 177.494927 113.34952) (xy 177.494927 118.601537) (xy 177.48271 118.630959) (xy 177.482291 119.110935) + (xy 177.665582 119.554535) (xy 178.00468 119.894225) (xy 178.447959 120.07829) (xy 178.927935 120.078709) (xy 179.371535 119.895418) + (xy 179.711225 119.55632) (xy 179.89529 119.113041) (xy 179.895709 118.633065) (xy 179.895709 119.63566) (xy 179.166185 120.365185) + (xy 179.001004 120.612395) (xy 178.943 120.904) (xy 178.943 123.001369) (xy 177.609731 124.334637) (xy 177.609731 119.496914) + (xy 177.407146 119.00662) (xy 177.032353 118.631173) (xy 176.903583 118.577702) (xy 176.903583 114.091188) (xy 176.149 113.336605) + (xy 175.969395 113.51621) (xy 175.969395 113.157) (xy 175.214812 112.402417) (xy 174.9792 112.464071) (xy 174.803073 112.96448) + (xy 174.831852 113.494199) (xy 174.9792 113.849929) (xy 175.214812 113.911583) (xy 175.969395 113.157) (xy 175.969395 113.51621) + (xy 175.394417 114.091188) (xy 175.456071 114.3268) (xy 175.95648 114.502927) (xy 176.486199 114.474148) (xy 176.841929 114.3268) + (xy 176.903583 114.091188) (xy 176.903583 118.577702) (xy 176.542413 118.427732) (xy 176.011914 118.427269) (xy 175.52162 118.629854) + (xy 175.146173 119.004647) (xy 174.942732 119.494587) (xy 174.942269 120.025086) (xy 175.144854 120.51538) (xy 175.519647 120.890827) + (xy 176.009587 121.094268) (xy 176.540086 121.094731) (xy 177.03038 120.892146) (xy 177.405827 120.517353) (xy 177.609268 120.027413) + (xy 177.609731 119.496914) (xy 177.609731 124.334637) (xy 177.548458 124.39591) (xy 177.4458 124.148071) (xy 177.210188 124.086417) + (xy 177.030583 124.266022) (xy 177.030583 123.906812) (xy 176.968929 123.6712) (xy 176.46852 123.495073) (xy 175.938801 123.523852) + (xy 175.583071 123.6712) (xy 175.521417 123.906812) (xy 176.276 124.661395) (xy 177.030583 123.906812) (xy 177.030583 124.266022) + (xy 176.455605 124.841) (xy 176.469747 124.855142) (xy 176.290142 125.034747) (xy 176.276 125.020605) (xy 176.096395 125.20021) + (xy 176.096395 124.841) (xy 175.341812 124.086417) (xy 175.1062 124.148071) (xy 174.930073 124.64848) (xy 174.958852 125.178199) + (xy 175.1062 125.533929) (xy 175.341812 125.595583) (xy 176.096395 124.841) (xy 176.096395 125.20021) (xy 175.521417 125.775188) + (xy 175.583071 126.0108) (xy 175.842322 126.102047) (xy 174.817369 127.127) (xy 174.498 127.127) (xy 174.206395 127.185004) + (xy 173.959185 127.350185) (xy 169.895185 131.414185) (xy 169.730004 131.661395) (xy 169.672 131.953) (xy 169.672 135.60429) + (xy 169.4431 135.509243) (xy 168.887339 135.508758) (xy 168.373697 135.72099) (xy 167.980371 136.11363) (xy 167.89405 136.321512) + (xy 167.80901 136.115697) (xy 167.41637 135.722371) (xy 166.9031 135.509243) (xy 166.347339 135.508758) (xy 166.116 135.604345) + (xy 166.116 135.31663) (xy 169.194815 132.237815) (xy 169.359996 131.990605) (xy 169.417999 131.699) (xy 169.418 131.699) + (xy 169.418 127.82363) (xy 170.464815 126.776816) (xy 170.464815 126.776815) (xy 170.629996 126.529605) (xy 170.687999 126.238) + (xy 170.688 126.238) (xy 170.688 118.491) (xy 170.629996 118.199395) (xy 170.464815 117.952185) (xy 170.464815 117.952184) + (xy 169.874927 117.362296) (xy 169.874927 113.34952) (xy 169.874927 87.44152) (xy 169.846148 86.911801) (xy 169.6988 86.556071) + (xy 169.463188 86.494417) (xy 169.283583 86.674022) (xy 169.283583 86.314812) (xy 169.221929 86.0792) (xy 168.72152 85.903073) + (xy 168.191801 85.931852) (xy 167.836071 86.0792) (xy 167.774417 86.314812) (xy 168.529 87.069395) (xy 169.283583 86.314812) + (xy 169.283583 86.674022) (xy 168.708605 87.249) (xy 169.463188 88.003583) (xy 169.6988 87.941929) (xy 169.874927 87.44152) + (xy 169.874927 113.34952) (xy 169.862731 113.125035) (xy 169.862731 107.812914) (xy 169.862731 102.605914) (xy 169.862731 97.525914) + (xy 169.862731 92.064914) (xy 169.660146 91.57462) (xy 169.285353 91.199173) (xy 169.283583 91.198438) (xy 169.283583 88.183188) + (xy 168.529 87.428605) (xy 168.349395 87.60821) (xy 168.349395 87.249) (xy 167.594812 86.494417) (xy 167.3592 86.556071) + (xy 167.183073 87.05648) (xy 167.211852 87.586199) (xy 167.3592 87.941929) (xy 167.594812 88.003583) (xy 168.349395 87.249) + (xy 168.349395 87.60821) (xy 167.774417 88.183188) (xy 167.836071 88.4188) (xy 168.33648 88.594927) (xy 168.866199 88.566148) + (xy 169.221929 88.4188) (xy 169.283583 88.183188) (xy 169.283583 91.198438) (xy 168.795413 90.995732) (xy 168.264914 90.995269) + (xy 167.77462 91.197854) (xy 167.399173 91.572647) (xy 167.195732 92.062587) (xy 167.195269 92.593086) (xy 167.397854 93.08338) + (xy 167.772647 93.458827) (xy 168.262587 93.662268) (xy 168.793086 93.662731) (xy 169.28338 93.460146) (xy 169.658827 93.085353) + (xy 169.862268 92.595413) (xy 169.862731 92.064914) (xy 169.862731 97.525914) (xy 169.660146 97.03562) (xy 169.285353 96.660173) + (xy 168.795413 96.456732) (xy 168.264914 96.456269) (xy 167.957687 96.583212) (xy 167.957687 95.544216) (xy 167.793689 95.147311) + (xy 167.490286 94.843378) (xy 167.093668 94.678687) (xy 166.664216 94.678313) (xy 166.267311 94.842311) (xy 165.963378 95.145714) + (xy 165.798709 95.542279) (xy 165.798709 71.008065) (xy 165.615418 70.564465) (xy 165.27632 70.224775) (xy 164.833041 70.04071) + (xy 164.353065 70.040291) (xy 163.909465 70.223582) (xy 163.569775 70.56268) (xy 163.38571 71.005959) (xy 163.385291 71.485935) + (xy 163.568582 71.929535) (xy 163.90768 72.269225) (xy 164.350959 72.45329) (xy 164.830935 72.453709) (xy 165.274535 72.270418) + (xy 165.614225 71.93132) (xy 165.79829 71.488041) (xy 165.798709 71.008065) (xy 165.798709 95.542279) (xy 165.798687 95.542332) + (xy 165.798313 95.971784) (xy 165.962311 96.368689) (xy 166.265714 96.672622) (xy 166.662332 96.837313) (xy 167.091784 96.837687) + (xy 167.488689 96.673689) (xy 167.792622 96.370286) (xy 167.957313 95.973668) (xy 167.957687 95.544216) (xy 167.957687 96.583212) + (xy 167.77462 96.658854) (xy 167.399173 97.033647) (xy 167.195732 97.523587) (xy 167.195269 98.054086) (xy 167.397854 98.54438) + (xy 167.772647 98.919827) (xy 168.262587 99.123268) (xy 168.793086 99.123731) (xy 169.28338 98.921146) (xy 169.658827 98.546353) + (xy 169.862268 98.056413) (xy 169.862731 97.525914) (xy 169.862731 102.605914) (xy 169.660146 102.11562) (xy 169.285353 101.740173) + (xy 168.795413 101.536732) (xy 168.264914 101.536269) (xy 167.77462 101.738854) (xy 167.399173 102.113647) (xy 167.195732 102.603587) + (xy 167.195269 103.134086) (xy 167.397854 103.62438) (xy 167.772647 103.999827) (xy 168.262587 104.203268) (xy 168.793086 104.203731) + (xy 169.28338 104.001146) (xy 169.658827 103.626353) (xy 169.862268 103.136413) (xy 169.862731 102.605914) (xy 169.862731 107.812914) + (xy 169.660146 107.32262) (xy 169.285353 106.947173) (xy 168.795413 106.743732) (xy 168.264914 106.743269) (xy 167.830687 106.922687) + (xy 167.830687 105.577216) (xy 167.666689 105.180311) (xy 167.363286 104.876378) (xy 166.966668 104.711687) (xy 166.537216 104.711313) + (xy 166.140311 104.875311) (xy 165.836378 105.178714) (xy 165.671687 105.575332) (xy 165.671313 106.004784) (xy 165.835311 106.401689) + (xy 166.138714 106.705622) (xy 166.535332 106.870313) (xy 166.964784 106.870687) (xy 167.361689 106.706689) (xy 167.665622 106.403286) + (xy 167.830313 106.006668) (xy 167.830687 105.577216) (xy 167.830687 106.922687) (xy 167.77462 106.945854) (xy 167.399173 107.320647) + (xy 167.195732 107.810587) (xy 167.195269 108.341086) (xy 167.397854 108.83138) (xy 167.772647 109.206827) (xy 168.262587 109.410268) + (xy 168.793086 109.410731) (xy 169.28338 109.208146) (xy 169.658827 108.833353) (xy 169.862268 108.343413) (xy 169.862731 107.812914) + (xy 169.862731 113.125035) (xy 169.846148 112.819801) (xy 169.6988 112.464071) (xy 169.463188 112.402417) (xy 169.283583 112.582022) + (xy 169.283583 112.222812) (xy 169.221929 111.9872) (xy 168.72152 111.811073) (xy 168.191801 111.839852) (xy 167.836071 111.9872) + (xy 167.774417 112.222812) (xy 168.529 112.977395) (xy 169.283583 112.222812) (xy 169.283583 112.582022) (xy 168.708605 113.157) + (xy 169.463188 113.911583) (xy 169.6988 113.849929) (xy 169.874927 113.34952) (xy 169.874927 117.362296) (xy 168.703155 116.190524) + (xy 168.957535 116.085418) (xy 169.297225 115.74632) (xy 169.48129 115.303041) (xy 169.481709 114.823065) (xy 169.298418 114.379465) + (xy 169.226896 114.307818) (xy 169.283583 114.091188) (xy 168.529 113.336605) (xy 168.514857 113.350747) (xy 168.335252 113.171142) + (xy 168.349395 113.157) (xy 167.594812 112.402417) (xy 167.3592 112.464071) (xy 167.257936 112.751779) (xy 164.655709 110.149552) + (xy 164.655709 100.091065) (xy 164.472418 99.647465) (xy 164.401687 99.57661) (xy 164.401687 93.258216) (xy 164.237689 92.861311) + (xy 163.934286 92.557378) (xy 163.537668 92.392687) (xy 163.108216 92.392313) (xy 162.711311 92.556311) (xy 162.572144 92.695235) + (xy 162.572144 68.787698) (xy 162.544362 68.232632) (xy 162.385397 67.848857) (xy 162.143213 67.779392) (xy 161.963608 67.958997) + (xy 161.963608 67.599787) (xy 161.894143 67.357603) (xy 161.370698 67.170856) (xy 161.163242 67.181239) (xy 161.163242 65.763339) + (xy 160.95101 65.249697) (xy 160.55837 64.856371) (xy 160.0451 64.643243) (xy 159.489339 64.642758) (xy 158.975697 64.85499) + (xy 158.582371 65.24763) (xy 158.369243 65.7609) (xy 158.36924 65.763336) (xy 158.15701 65.249697) (xy 157.76437 64.856371) + (xy 157.2511 64.643243) (xy 156.695339 64.642758) (xy 156.181697 64.85499) (xy 155.788371 65.24763) (xy 155.638394 65.608814) + (xy 155.49001 65.249697) (xy 155.09737 64.856371) (xy 154.5841 64.643243) (xy 154.028339 64.642758) (xy 153.514697 64.85499) + (xy 153.121371 65.24763) (xy 152.908243 65.7609) (xy 152.90824 65.763336) (xy 152.69601 65.249697) (xy 152.30337 64.856371) + (xy 151.7901 64.643243) (xy 151.234339 64.642758) (xy 150.720697 64.85499) (xy 150.327371 65.24763) (xy 150.114243 65.7609) + (xy 150.113758 66.316661) (xy 150.32599 66.830303) (xy 150.678071 67.183) (xy 149.225691 67.183) (xy 148.992302 67.279673) + (xy 148.813673 67.458301) (xy 148.717 67.69169) (xy 148.717 67.944309) (xy 148.717 69.468309) (xy 148.813673 69.701698) + (xy 148.992301 69.880327) (xy 149.22569 69.977) (xy 149.478309 69.977) (xy 151.002309 69.977) (xy 151.235698 69.880327) + (xy 151.414327 69.701699) (xy 151.511 69.46831) (xy 151.511 69.215691) (xy 151.511 68.857246) (xy 151.72299 69.370303) + (xy 152.11563 69.763629) (xy 152.6289 69.976757) (xy 153.184661 69.977242) (xy 153.698303 69.76501) (xy 154.091629 69.37237) + (xy 154.241605 69.011185) (xy 154.38999 69.370303) (xy 154.78263 69.763629) (xy 155.2959 69.976757) (xy 155.851661 69.977242) + (xy 156.365303 69.76501) (xy 156.758629 69.37237) (xy 156.971757 68.8591) (xy 156.971759 68.856663) (xy 157.18399 69.370303) + (xy 157.57663 69.763629) (xy 158.0899 69.976757) (xy 158.645661 69.977242) (xy 159.159303 69.76501) (xy 159.552629 69.37237) + (xy 159.765757 68.8591) (xy 159.76597 68.614343) (xy 159.781638 68.927368) (xy 159.940603 69.311143) (xy 160.182787 69.380608) + (xy 160.983395 68.58) (xy 160.182787 67.779392) (xy 159.940603 67.848857) (xy 159.766212 68.337668) (xy 159.766242 68.303339) + (xy 159.55401 67.789697) (xy 159.16137 67.396371) (xy 158.6481 67.183243) (xy 158.092339 67.182758) (xy 157.578697 67.39499) + (xy 157.185371 67.78763) (xy 156.972243 68.3009) (xy 156.97224 68.303336) (xy 156.76001 67.789697) (xy 156.36737 67.396371) + (xy 155.8541 67.183243) (xy 155.298339 67.182758) (xy 154.784697 67.39499) (xy 154.391371 67.78763) (xy 154.241394 68.148814) + (xy 154.09301 67.789697) (xy 153.70037 67.396371) (xy 153.1871 67.183243) (xy 152.631339 67.182758) (xy 152.117697 67.39499) + (xy 151.724371 67.78763) (xy 151.511243 68.3009) (xy 151.511 68.579353) (xy 151.511 67.691691) (xy 151.414327 67.458302) + (xy 151.392922 67.436897) (xy 151.787661 67.437242) (xy 152.301303 67.22501) (xy 152.694629 66.83237) (xy 152.907757 66.3191) + (xy 152.907759 66.316663) (xy 153.11999 66.830303) (xy 153.51263 67.223629) (xy 154.0259 67.436757) (xy 154.581661 67.437242) + (xy 155.095303 67.22501) (xy 155.488629 66.83237) (xy 155.638605 66.471185) (xy 155.78699 66.830303) (xy 156.17963 67.223629) + (xy 156.6929 67.436757) (xy 157.248661 67.437242) (xy 157.762303 67.22501) (xy 158.155629 66.83237) (xy 158.368757 66.3191) + (xy 158.368759 66.316663) (xy 158.58099 66.830303) (xy 158.97363 67.223629) (xy 159.4869 67.436757) (xy 160.042661 67.437242) + (xy 160.556303 67.22501) (xy 160.949629 66.83237) (xy 161.162757 66.3191) (xy 161.163242 65.763339) (xy 161.163242 67.181239) + (xy 160.815632 67.198638) (xy 160.431857 67.357603) (xy 160.362392 67.599787) (xy 161.163 68.400395) (xy 161.963608 67.599787) + (xy 161.963608 67.958997) (xy 161.342605 68.58) (xy 162.143213 69.380608) (xy 162.385397 69.311143) (xy 162.572144 68.787698) + (xy 162.572144 92.695235) (xy 162.407378 92.859714) (xy 162.242687 93.256332) (xy 162.242313 93.685784) (xy 162.406311 94.082689) + (xy 162.709714 94.386622) (xy 163.106332 94.551313) (xy 163.535784 94.551687) (xy 163.932689 94.387689) (xy 164.236622 94.084286) + (xy 164.401313 93.687668) (xy 164.401687 93.258216) (xy 164.401687 99.57661) (xy 164.13332 99.307775) (xy 163.690041 99.12371) + (xy 163.210065 99.123291) (xy 162.766465 99.306582) (xy 162.426775 99.64568) (xy 162.24271 100.088959) (xy 162.242291 100.568935) + (xy 162.425582 101.012535) (xy 162.76468 101.352225) (xy 163.207959 101.53629) (xy 163.687935 101.536709) (xy 164.131535 101.353418) + (xy 164.471225 101.01432) (xy 164.65529 100.571041) (xy 164.655709 100.091065) (xy 164.655709 110.149552) (xy 162.519843 108.013687) + (xy 162.544935 108.013709) (xy 162.988535 107.830418) (xy 163.328225 107.49132) (xy 163.51229 107.048041) (xy 163.512709 106.568065) + (xy 163.329418 106.124465) (xy 162.99032 105.784775) (xy 162.547041 105.60071) (xy 162.0774 105.6003) (xy 162.0774 93.120957) + (xy 162.185225 93.01332) (xy 162.36929 92.570041) (xy 162.369709 92.090065) (xy 162.186418 91.646465) (xy 161.963608 91.423266) + (xy 161.963608 69.560213) (xy 161.163 68.759605) (xy 160.362392 69.560213) (xy 160.431857 69.802397) (xy 160.955302 69.989144) + (xy 161.510368 69.961362) (xy 161.894143 69.802397) (xy 161.963608 69.560213) (xy 161.963608 91.423266) (xy 161.84732 91.306775) + (xy 161.404041 91.12271) (xy 161.036 91.122388) (xy 161.036 89.916) (xy 160.977996 89.624395) (xy 160.812815 89.377185) + (xy 160.812815 89.377184) (xy 159.766 88.330369) (xy 159.766 87.884) (xy 159.707996 87.592395) (xy 159.542815 87.345185) + (xy 159.542815 87.345184) (xy 159.194665 86.997034) (xy 159.194665 74.487367) (xy 159.194665 71.058367) (xy 159.049961 70.708157) + (xy 158.782253 70.43998) (xy 158.432295 70.294665) (xy 158.053367 70.294335) (xy 157.703157 70.439039) (xy 157.43498 70.706747) + (xy 157.289665 71.056705) (xy 157.289335 71.435633) (xy 157.434039 71.785843) (xy 157.701747 72.05402) (xy 158.051705 72.199335) + (xy 158.430633 72.199665) (xy 158.780843 72.054961) (xy 159.04902 71.787253) (xy 159.194335 71.437295) (xy 159.194665 71.058367) + (xy 159.194665 74.487367) (xy 159.049961 74.137157) (xy 158.782253 73.86898) (xy 158.432295 73.723665) (xy 158.053367 73.723335) + (xy 157.703157 73.868039) (xy 157.43498 74.135747) (xy 157.289665 74.485705) (xy 157.289335 74.864633) (xy 157.434039 75.214843) + (xy 157.701747 75.48302) (xy 158.051705 75.628335) (xy 158.430633 75.628665) (xy 158.780843 75.483961) (xy 159.04902 75.216253) + (xy 159.194335 74.866295) (xy 159.194665 74.487367) (xy 159.194665 86.997034) (xy 158.272815 86.075185) (xy 158.025605 85.910004) + (xy 157.734 85.852) (xy 155.194 85.852) (xy 154.902395 85.910004) (xy 154.655184 86.075185) (xy 154.274185 86.456185) + (xy 154.109004 86.703395) (xy 154.051656 86.991702) (xy 154.051655 86.991703) (xy 153.898378 87.144714) (xy 153.733687 87.541332) + (xy 153.733667 87.56391) (xy 153.647286 87.477378) (xy 153.479687 87.407784) (xy 153.479687 84.622216) (xy 153.315689 84.225311) + (xy 153.012286 83.921378) (xy 152.615668 83.756687) (xy 152.590666 83.756665) (xy 152.590687 83.733216) (xy 152.426689 83.336311) + (xy 152.123286 83.032378) (xy 151.726668 82.867687) (xy 151.297216 82.867313) (xy 150.900311 83.031311) (xy 150.596378 83.334714) + (xy 150.574098 83.388368) (xy 150.472286 83.286378) (xy 150.075668 83.121687) (xy 149.646216 83.121313) (xy 149.249311 83.285311) + (xy 148.945378 83.588714) (xy 148.875695 83.756526) (xy 148.630216 83.756313) (xy 148.233311 83.920311) (xy 147.929378 84.223714) + (xy 147.764687 84.620332) (xy 147.764313 85.049784) (xy 147.928311 85.446689) (xy 148.231714 85.750622) (xy 148.628332 85.915313) + (xy 149.057784 85.915687) (xy 149.454689 85.751689) (xy 149.758622 85.448286) (xy 149.828304 85.280473) (xy 150.073784 85.280687) + (xy 150.470689 85.116689) (xy 150.774622 84.813286) (xy 150.796901 84.759631) (xy 150.898714 84.861622) (xy 151.295332 85.026313) + (xy 151.320333 85.026334) (xy 151.320313 85.049784) (xy 151.484311 85.446689) (xy 151.787714 85.750622) (xy 152.184332 85.915313) + (xy 152.613784 85.915687) (xy 153.010689 85.751689) (xy 153.314622 85.448286) (xy 153.479313 85.051668) (xy 153.479687 84.622216) + (xy 153.479687 87.407784) (xy 153.250668 87.312687) (xy 152.821216 87.312313) (xy 152.424311 87.476311) (xy 152.120378 87.779714) + (xy 151.955687 88.176332) (xy 151.955313 88.605784) (xy 151.984815 88.677185) (xy 151.668815 88.361185) (xy 151.490496 88.242035) + (xy 151.234286 87.985378) (xy 150.837668 87.820687) (xy 150.408216 87.820313) (xy 150.011311 87.984311) (xy 149.707378 88.287714) + (xy 149.542687 88.684332) (xy 149.542313 89.113784) (xy 149.706311 89.510689) (xy 150.009714 89.814622) (xy 150.406332 89.979313) + (xy 150.835784 89.979687) (xy 151.045431 89.893062) (xy 152.908 91.75563) (xy 152.908 91.757388) (xy 152.846367 91.757335) + (xy 152.496157 91.902039) (xy 152.22798 92.169747) (xy 152.082665 92.519705) (xy 152.082335 92.898633) (xy 152.227039 93.248843) + (xy 152.494747 93.51702) (xy 152.844705 93.662335) (xy 152.909761 93.662391) (xy 153.924 94.67663) (xy 153.924 130.748369) + (xy 153.225709 131.44666) (xy 153.225709 102.250065) (xy 153.042418 101.806465) (xy 152.70332 101.466775) (xy 152.260041 101.28271) + (xy 151.780065 101.282291) (xy 151.336465 101.465582) (xy 150.996775 101.80468) (xy 150.81271 102.247959) (xy 150.812291 102.727935) + (xy 150.995582 103.171535) (xy 151.33468 103.511225) (xy 151.777959 103.69529) (xy 152.257935 103.695709) (xy 152.701535 103.512418) + (xy 153.041225 103.17332) (xy 153.22529 102.730041) (xy 153.225709 102.250065) (xy 153.225709 131.44666) (xy 149.151382 135.520987) + (xy 149.1231 135.509243) (xy 148.567339 135.508758) (xy 148.053697 135.72099) (xy 147.660371 136.11363) (xy 147.57405 136.321512) + (xy 147.48901 136.115697) (xy 147.09637 135.722371) (xy 147.066 135.70976) (xy 147.066 135.509) (xy 147.007996 135.217395) + (xy 146.842815 134.970185) (xy 146.842815 134.970184) (xy 146.558 134.685369) (xy 146.558 117.28263) (xy 148.444468 115.396162) + (xy 148.444469 115.396161) (xy 148.500604 115.384996) (xy 148.500605 115.384996) (xy 148.747815 115.219815) (xy 150.571815 113.395815) + (xy 150.571816 113.395815) (xy 150.736996 113.148605) (xy 150.736997 113.148604) (xy 150.795 112.857) (xy 150.795 101.10763) + (xy 151.795815 100.106816) (xy 151.795815 100.106815) (xy 151.960996 99.859605) (xy 152.018999 99.568) (xy 152.019 99.568) + (xy 152.019 94.869) (xy 151.960996 94.577395) (xy 151.795815 94.330185) (xy 151.795815 94.330184) (xy 151.414815 93.949185) + (xy 151.167605 93.784004) (xy 150.876 93.726) (xy 149.098 93.726) (xy 148.806395 93.784004) (xy 148.559184 93.949185) + (xy 148.178185 94.330185) (xy 148.171823 94.339704) (xy 148.018303 94.403138) (xy 147.764295 94.297665) (xy 147.385367 94.297335) + (xy 147.256709 94.350495) (xy 147.256709 74.437065) (xy 147.073418 73.993465) (xy 146.73432 73.653775) (xy 146.291041 73.46971) + (xy 145.811065 73.469291) (xy 145.54244 73.580284) (xy 145.54244 65.536979) (xy 145.156563 64.603085) (xy 144.442673 63.887948) + (xy 143.509454 63.500441) (xy 142.498979 63.49956) (xy 141.565085 63.885437) (xy 140.849948 64.599327) (xy 140.462441 65.532546) + (xy 140.46156 66.543021) (xy 140.847437 67.476915) (xy 141.561327 68.192052) (xy 142.494546 68.579559) (xy 143.505021 68.58044) + (xy 144.438915 68.194563) (xy 145.154052 67.480673) (xy 145.541559 66.547454) (xy 145.54244 65.536979) (xy 145.54244 73.580284) + (xy 145.367465 73.652582) (xy 145.027775 73.99168) (xy 144.84371 74.434959) (xy 144.843291 74.914935) (xy 145.026582 75.358535) + (xy 145.36568 75.698225) (xy 145.808959 75.88229) (xy 146.288935 75.882709) (xy 146.732535 75.699418) (xy 147.072225 75.36032) + (xy 147.25629 74.917041) (xy 147.256709 74.437065) (xy 147.256709 94.350495) (xy 147.035157 94.442039) (xy 146.76698 94.709747) + (xy 146.621665 95.059705) (xy 146.621335 95.438633) (xy 146.766039 95.788843) (xy 147.033747 96.05702) (xy 147.383705 96.202335) + (xy 147.762633 96.202665) (xy 148.018696 96.096861) (xy 148.229129 96.18424) (xy 147.262185 97.151185) (xy 147.097004 97.398395) + (xy 147.079995 97.483902) (xy 147.053041 97.47271) (xy 146.573065 97.472291) (xy 146.129465 97.655582) (xy 145.789775 97.99468) + (xy 145.60571 98.437959) (xy 145.605291 98.917935) (xy 145.788582 99.361535) (xy 146.12768 99.701225) (xy 146.570959 99.88529) + (xy 147.039 99.885698) (xy 147.039 104.203697) (xy 146.573065 104.203291) (xy 146.129465 104.386582) (xy 145.789775 104.72568) + (xy 145.60571 105.168959) (xy 145.605291 105.648935) (xy 145.738918 105.972339) (xy 145.643378 106.067714) (xy 145.478687 106.464332) + (xy 145.478313 106.893784) (xy 145.642311 107.290689) (xy 145.666356 107.314776) (xy 145.643378 107.337714) (xy 145.478687 107.734332) + (xy 145.478313 108.163784) (xy 145.642311 108.560689) (xy 145.945714 108.864622) (xy 146.10001 108.928691) (xy 146.074311 108.939311) + (xy 145.770378 109.242714) (xy 145.605687 109.639332) (xy 145.605313 110.068784) (xy 145.769311 110.465689) (xy 146.072714 110.769622) + (xy 146.469332 110.934313) (xy 146.898784 110.934687) (xy 147.039 110.87675) (xy 147.039 111.59837) (xy 146.75037 111.887) + (xy 146.685 111.887) (xy 146.393395 111.945004) (xy 146.146185 112.110185) (xy 144.306709 113.949661) (xy 144.306709 93.761065) + (xy 144.123418 93.317465) (xy 143.78432 92.977775) (xy 143.341041 92.79371) (xy 142.861065 92.793291) (xy 142.417465 92.976582) + (xy 142.077775 93.31568) (xy 141.89371 93.758959) (xy 141.893291 94.238935) (xy 142.076582 94.682535) (xy 142.41568 95.022225) + (xy 142.858959 95.20629) (xy 143.338935 95.206709) (xy 143.782535 95.023418) (xy 144.122225 94.68432) (xy 144.30629 94.241041) + (xy 144.306709 93.761065) (xy 144.306709 113.949661) (xy 143.225185 115.031185) (xy 143.091372 115.231449) (xy 143.091371 115.231449) + (xy 142.836668 115.125687) (xy 142.684687 115.125554) (xy 142.684687 96.052216) (xy 142.520689 95.655311) (xy 142.217286 95.351378) + (xy 141.820668 95.186687) (xy 141.391216 95.186313) (xy 141.287687 95.22909) (xy 141.287687 81.955216) (xy 141.123689 81.558311) + (xy 140.820286 81.254378) (xy 140.423668 81.089687) (xy 139.994216 81.089313) (xy 139.597311 81.253311) (xy 139.479872 81.370544) + (xy 139.09537 80.985371) (xy 138.887487 80.89905) (xy 139.093303 80.81401) (xy 139.486629 80.42137) (xy 139.699757 79.9081) + (xy 139.700242 79.352339) (xy 139.48801 78.838697) (xy 139.09537 78.445371) (xy 138.887487 78.35905) (xy 139.093303 78.27401) + (xy 139.486629 77.88137) (xy 139.699757 77.3681) (xy 139.700242 76.812339) (xy 139.48801 76.298697) (xy 139.09537 75.905371) + (xy 138.887487 75.81905) (xy 139.093303 75.73401) (xy 139.486629 75.34137) (xy 139.699757 74.8281) (xy 139.700242 74.272339) + (xy 139.48801 73.758697) (xy 139.09537 73.365371) (xy 138.5821 73.152243) (xy 138.026339 73.151758) (xy 137.512697 73.36399) + (xy 137.41444 73.462075) (xy 137.41444 65.536979) (xy 137.028563 64.603085) (xy 136.314673 63.887948) (xy 135.381454 63.500441) + (xy 134.370979 63.49956) (xy 133.437085 63.885437) (xy 132.721948 64.599327) (xy 132.334441 65.532546) (xy 132.33356 66.543021) + (xy 132.719437 67.476915) (xy 133.433327 68.192052) (xy 134.366546 68.579559) (xy 135.377021 68.58044) (xy 136.310915 68.194563) + (xy 137.026052 67.480673) (xy 137.413559 66.547454) (xy 137.41444 65.536979) (xy 137.41444 73.462075) (xy 137.16 73.716071) + (xy 137.16 73.660691) (xy 137.063327 73.427302) (xy 136.884699 73.248673) (xy 136.65131 73.152) (xy 136.398691 73.152) + (xy 134.874691 73.152) (xy 134.641302 73.248673) (xy 134.462673 73.427301) (xy 134.366 73.66069) (xy 134.366 73.913309) + (xy 134.366 75.437309) (xy 134.462673 75.670698) (xy 134.641301 75.849327) (xy 134.87469 75.946) (xy 134.930613 75.946) + (xy 134.579371 76.29663) (xy 134.366243 76.8099) (xy 134.365758 77.365661) (xy 134.57799 77.879303) (xy 134.97063 78.272629) + (xy 135.178512 78.358949) (xy 134.972697 78.44399) (xy 134.579371 78.83663) (xy 134.366243 79.3499) (xy 134.365758 79.905661) + (xy 134.57799 80.419303) (xy 134.97063 80.812629) (xy 135.178512 80.898949) (xy 134.972697 80.98399) (xy 134.579371 81.37663) + (xy 134.54033 81.47065) (xy 134.152216 81.470313) (xy 133.755311 81.634311) (xy 133.451378 81.937714) (xy 133.286687 82.334332) + (xy 133.286313 82.763784) (xy 133.450311 83.160689) (xy 133.753714 83.464622) (xy 134.150332 83.629313) (xy 134.579784 83.629687) + (xy 134.976689 83.465689) (xy 135.054895 83.387618) (xy 135.4839 83.565757) (xy 136.039661 83.566242) (xy 136.553303 83.35401) + (xy 136.946629 82.96137) (xy 137.032949 82.753487) (xy 137.11799 82.959303) (xy 137.51063 83.352629) (xy 138.0239 83.565757) + (xy 138.579661 83.566242) (xy 139.093303 83.35401) (xy 139.48014 82.967846) (xy 139.595714 83.083622) (xy 139.992332 83.248313) + (xy 140.421784 83.248687) (xy 140.818689 83.084689) (xy 141.122622 82.781286) (xy 141.287313 82.384668) (xy 141.287687 81.955216) + (xy 141.287687 95.22909) (xy 141.05002 95.327292) (xy 140.947286 95.224378) (xy 140.906665 95.20751) (xy 140.906665 85.409367) + (xy 140.761961 85.059157) (xy 140.494253 84.79098) (xy 140.144295 84.645665) (xy 139.765367 84.645335) (xy 139.509303 84.751138) + (xy 139.255295 84.645665) (xy 138.876367 84.645335) (xy 138.620303 84.751138) (xy 138.366295 84.645665) (xy 137.987866 84.645335) + (xy 137.772286 84.429378) (xy 137.375668 84.264687) (xy 136.946216 84.264313) (xy 136.588109 84.412279) (xy 136.232668 84.264687) + (xy 135.803216 84.264313) (xy 135.46202 84.405292) (xy 135.359286 84.302378) (xy 134.962668 84.137687) (xy 134.533216 84.137313) + (xy 134.136311 84.301311) (xy 133.832378 84.604714) (xy 133.667687 85.001332) (xy 133.667313 85.430784) (xy 133.831311 85.827689) + (xy 134.134714 86.131622) (xy 134.531332 86.296313) (xy 134.960784 86.296687) (xy 135.301979 86.155707) (xy 135.404714 86.258622) + (xy 135.801332 86.423313) (xy 136.230784 86.423687) (xy 136.58889 86.27572) (xy 136.944332 86.423313) (xy 137.373784 86.423687) + (xy 137.572441 86.341603) (xy 137.635747 86.40502) (xy 137.985705 86.550335) (xy 138.364633 86.550665) (xy 138.620696 86.444861) + (xy 138.874705 86.550335) (xy 139.253633 86.550665) (xy 139.509696 86.444861) (xy 139.763705 86.550335) (xy 140.142633 86.550665) + (xy 140.492843 86.405961) (xy 140.76102 86.138253) (xy 140.906335 85.788295) (xy 140.906665 85.409367) (xy 140.906665 95.20751) + (xy 140.550668 95.059687) (xy 140.121216 95.059313) (xy 139.724311 95.223311) (xy 139.509502 95.437745) (xy 139.423286 95.351378) + (xy 139.026668 95.186687) (xy 138.597216 95.186313) (xy 138.200311 95.350311) (xy 137.896378 95.653714) (xy 137.731687 96.050332) + (xy 137.731313 96.479784) (xy 137.895311 96.876689) (xy 138.198714 97.180622) (xy 138.595332 97.345313) (xy 139.024784 97.345687) + (xy 139.421689 97.181689) (xy 139.636497 96.967254) (xy 139.722714 97.053622) (xy 140.119332 97.218313) (xy 140.548784 97.218687) + (xy 140.889979 97.077707) (xy 140.992714 97.180622) (xy 141.389332 97.345313) (xy 141.818784 97.345687) (xy 142.215689 97.181689) + (xy 142.519622 96.878286) (xy 142.684313 96.481668) (xy 142.684687 96.052216) (xy 142.684687 115.125554) (xy 142.557687 115.125444) + (xy 142.557687 106.212216) (xy 142.393689 105.815311) (xy 142.319272 105.740764) (xy 142.430335 105.473295) (xy 142.430665 105.094367) + (xy 142.285961 104.744157) (xy 142.049687 104.507469) (xy 142.049687 102.910216) (xy 141.885689 102.513311) (xy 141.861643 102.489223) + (xy 141.884622 102.466286) (xy 142.049313 102.069668) (xy 142.049687 101.640216) (xy 141.885689 101.243311) (xy 141.582286 100.939378) + (xy 141.185668 100.774687) (xy 140.756216 100.774313) (xy 140.359311 100.938311) (xy 140.055378 101.241714) (xy 139.890687 101.638332) + (xy 139.890687 98.719216) (xy 139.726689 98.322311) (xy 139.423286 98.018378) (xy 139.026668 97.853687) (xy 138.597216 97.853313) + (xy 138.200311 98.017311) (xy 137.896378 98.320714) (xy 137.731687 98.717332) (xy 137.731313 99.146784) (xy 137.895311 99.543689) + (xy 138.198714 99.847622) (xy 138.595332 100.012313) (xy 139.024784 100.012687) (xy 139.421689 99.848689) (xy 139.725622 99.545286) + (xy 139.890313 99.148668) (xy 139.890687 98.719216) (xy 139.890687 101.638332) (xy 139.890665 101.663554) (xy 139.613216 101.663313) + (xy 139.216311 101.827311) (xy 138.912378 102.130714) (xy 138.747687 102.527332) (xy 138.747313 102.956784) (xy 138.911311 103.353689) + (xy 139.214714 103.657622) (xy 139.611332 103.822313) (xy 140.040784 103.822687) (xy 140.112552 103.793032) (xy 140.357714 104.038622) + (xy 140.754332 104.203313) (xy 141.183784 104.203687) (xy 141.580689 104.039689) (xy 141.884622 103.736286) (xy 142.049313 103.339668) + (xy 142.049687 102.910216) (xy 142.049687 104.507469) (xy 142.018253 104.47598) (xy 141.668295 104.330665) (xy 141.289367 104.330335) + (xy 140.939157 104.475039) (xy 140.67098 104.742747) (xy 140.525665 105.092705) (xy 140.525335 105.471633) (xy 140.636513 105.740705) + (xy 140.563378 105.813714) (xy 140.398687 106.210332) (xy 140.398313 106.639784) (xy 140.562311 107.036689) (xy 140.865714 107.340622) + (xy 141.262332 107.505313) (xy 141.691784 107.505687) (xy 142.088689 107.341689) (xy 142.392622 107.038286) (xy 142.557313 106.641668) + (xy 142.557687 106.212216) (xy 142.557687 115.125444) (xy 142.407216 115.125313) (xy 142.010311 115.289311) (xy 141.706378 115.592714) + (xy 141.541687 115.989332) (xy 141.541313 116.418784) (xy 141.705311 116.815689) (xy 142.008714 117.119622) (xy 142.405332 117.284313) + (xy 142.834784 117.284687) (xy 143.002 117.215594) (xy 143.002 118.859876) (xy 142.882418 118.570465) (xy 142.54332 118.230775) + (xy 142.100041 118.04671) (xy 141.620065 118.046291) (xy 141.176465 118.229582) (xy 140.836775 118.56868) (xy 140.65271 119.011959) + (xy 140.652291 119.491935) (xy 140.835582 119.935535) (xy 141.17468 120.275225) (xy 141.617959 120.45929) (xy 142.097935 120.459709) + (xy 142.541535 120.276418) (xy 142.881225 119.93732) (xy 143.002 119.64646) (xy 143.002 131.002369) (xy 140.525687 133.478682) + (xy 140.525687 115.991216) (xy 140.361689 115.594311) (xy 140.058286 115.290378) (xy 140.006709 115.268961) (xy 140.006709 112.961065) + (xy 139.823418 112.517465) (xy 139.48432 112.177775) (xy 139.041041 111.99371) (xy 138.561065 111.993291) (xy 138.117465 112.176582) + (xy 137.777775 112.51568) (xy 137.59371 112.958959) (xy 137.593291 113.438935) (xy 137.776582 113.882535) (xy 138.11568 114.222225) + (xy 138.558959 114.40629) (xy 139.038935 114.406709) (xy 139.482535 114.223418) (xy 139.822225 113.88432) (xy 140.00629 113.441041) + (xy 140.006709 112.961065) (xy 140.006709 115.268961) (xy 139.661668 115.125687) (xy 139.232216 115.125313) (xy 138.835311 115.289311) + (xy 138.531378 115.592714) (xy 138.366687 115.989332) (xy 138.366313 116.418784) (xy 138.530311 116.815689) (xy 138.833714 117.119622) + (xy 139.230332 117.284313) (xy 139.659784 117.284687) (xy 140.056689 117.120689) (xy 140.360622 116.817286) (xy 140.525313 116.420668) + (xy 140.525687 115.991216) (xy 140.525687 133.478682) (xy 139.7 134.304369) (xy 139.7 133.223) (xy 139.641996 132.931395) + (xy 139.476815 132.684185) (xy 139.476815 132.684184) (xy 139.446 132.653369) (xy 139.446 128.905) (xy 139.387996 128.613395) + (xy 139.222815 128.366185) (xy 139.222815 128.366184) (xy 135.89 125.033369) (xy 135.89 111.456194) (xy 135.93502 111.411253) + (xy 136.080335 111.061295) (xy 136.080665 110.682367) (xy 135.935961 110.332157) (xy 135.668253 110.06398) (xy 135.318295 109.918665) + (xy 134.939367 109.918335) (xy 134.683303 110.024138) (xy 134.429295 109.918665) (xy 134.239 109.918499) (xy 134.239 109.91663) + (xy 135.539815 108.615816) (xy 135.539815 108.615815) (xy 135.704996 108.368605) (xy 135.762999 108.077) (xy 135.763 108.077) + (xy 135.763 107.519194) (xy 135.80802 107.474253) (xy 135.953335 107.124295) (xy 135.953665 106.745367) (xy 135.924668 106.675189) + (xy 136.201725 106.560711) (xy 136.365747 106.72502) (xy 136.715705 106.870335) (xy 137.094633 106.870665) (xy 137.444843 106.725961) + (xy 137.71302 106.458253) (xy 137.747608 106.374955) (xy 137.747335 106.688633) (xy 137.892039 107.038843) (xy 138.112657 107.259848) + (xy 138.112335 107.630633) (xy 138.257039 107.980843) (xy 138.524747 108.24902) (xy 138.874705 108.394335) (xy 139.253633 108.394665) + (xy 139.603843 108.249961) (xy 139.87202 107.982253) (xy 140.017335 107.632295) (xy 140.017665 107.253367) (xy 139.872961 106.903157) + (xy 139.652342 106.682151) (xy 139.652665 106.311367) (xy 139.507961 105.961157) (xy 139.240253 105.69298) (xy 138.890295 105.547665) + (xy 138.511367 105.547335) (xy 138.161157 105.692039) (xy 137.89298 105.959747) (xy 137.858391 106.043044) (xy 137.858665 105.729367) + (xy 137.713961 105.379157) (xy 137.477665 105.142447) (xy 137.477665 88.457367) (xy 137.332961 88.107157) (xy 137.065253 87.83898) + (xy 136.715295 87.693665) (xy 136.336367 87.693335) (xy 136.080303 87.799138) (xy 135.826295 87.693665) (xy 135.447367 87.693335) + (xy 135.097157 87.838039) (xy 134.82898 88.105747) (xy 134.683665 88.455705) (xy 134.683335 88.834633) (xy 134.828039 89.184843) + (xy 135.095747 89.45302) (xy 135.445705 89.598335) (xy 135.824633 89.598665) (xy 136.080696 89.492861) (xy 136.334705 89.598335) + (xy 136.713633 89.598665) (xy 137.063843 89.453961) (xy 137.33202 89.186253) (xy 137.477335 88.836295) (xy 137.477665 88.457367) + (xy 137.477665 105.142447) (xy 137.446253 105.11098) (xy 137.096295 104.965665) (xy 136.717367 104.965335) (xy 136.622054 105.004717) + (xy 136.615689 104.989311) (xy 136.312286 104.685378) (xy 135.915668 104.520687) (xy 135.486216 104.520313) (xy 135.089311 104.684311) + (xy 134.989059 104.784387) (xy 134.919961 104.617157) (xy 134.885351 104.582486) (xy 134.937335 104.457295) (xy 134.937665 104.078367) + (xy 134.792961 103.728157) (xy 134.525253 103.45998) (xy 134.175295 103.314665) (xy 133.796367 103.314335) (xy 133.446157 103.459039) + (xy 133.35 103.555027) (xy 133.35 103.455194) (xy 133.39502 103.410253) (xy 133.540335 103.060295) (xy 133.540665 102.681367) + (xy 133.395961 102.331157) (xy 133.128253 102.06298) (xy 132.778295 101.917665) (xy 132.399367 101.917335) (xy 132.143303 102.023138) + (xy 131.889295 101.917665) (xy 131.510367 101.917335) (xy 131.160157 102.062039) (xy 130.89198 102.329747) (xy 130.746665 102.679705) + (xy 130.746335 103.058633) (xy 130.891039 103.408843) (xy 131.158747 103.67702) (xy 131.508705 103.822335) (xy 131.826 103.822611) + (xy 131.826 104.081587) (xy 131.508295 103.949665) (xy 131.129367 103.949335) (xy 130.873303 104.055138) (xy 130.619295 103.949665) + (xy 130.240367 103.949335) (xy 129.890157 104.094039) (xy 129.62198 104.361747) (xy 129.582204 104.457536) (xy 129.413 104.457388) + (xy 129.413 100.12307) (xy 129.769689 99.975689) (xy 130.073622 99.672286) (xy 130.238313 99.275668) (xy 130.238687 98.846216) + (xy 130.074689 98.449311) (xy 129.771286 98.145378) (xy 129.374668 97.980687) (xy 128.945216 97.980313) (xy 128.905 97.996929) + (xy 128.905 96.175882) (xy 128.968705 96.202335) (xy 129.347633 96.202665) (xy 129.603696 96.096861) (xy 129.857705 96.202335) + (xy 130.236633 96.202665) (xy 130.492696 96.096861) (xy 130.746665 96.202318) (xy 130.746313 96.606784) (xy 130.910311 97.003689) + (xy 131.213714 97.307622) (xy 131.610332 97.472313) (xy 132.039784 97.472687) (xy 132.436689 97.308689) (xy 132.740622 97.005286) + (xy 132.768054 96.93922) (xy 133.03248 97.04902) (xy 133.032313 97.241784) (xy 133.196311 97.638689) (xy 133.499714 97.942622) + (xy 133.896332 98.107313) (xy 134.325784 98.107687) (xy 134.722689 97.943689) (xy 135.026622 97.640286) (xy 135.191313 97.243668) + (xy 135.191553 96.967311) (xy 135.220686 96.996494) (xy 135.191687 97.066332) (xy 135.191313 97.495784) (xy 135.355311 97.892689) + (xy 135.658714 98.196622) (xy 136.055332 98.361313) (xy 136.484784 98.361687) (xy 136.881689 98.197689) (xy 137.185622 97.894286) + (xy 137.350313 97.497668) (xy 137.350687 97.068216) (xy 137.186689 96.671311) (xy 136.940313 96.424505) (xy 136.969313 96.354668) + (xy 136.969687 95.925216) (xy 136.805689 95.528311) (xy 136.502286 95.224378) (xy 136.105668 95.059687) (xy 135.676216 95.059313) + (xy 135.279311 95.223311) (xy 134.975378 95.526714) (xy 134.810687 95.923332) (xy 134.810446 96.199688) (xy 134.724286 96.113378) + (xy 134.429519 95.990979) (xy 134.429687 95.798216) (xy 134.265689 95.401311) (xy 133.962286 95.097378) (xy 133.637179 94.962381) + (xy 133.503689 94.639311) (xy 133.413665 94.549129) (xy 133.413665 91.886367) (xy 133.268961 91.536157) (xy 133.032512 91.299294) + (xy 133.032665 91.124367) (xy 132.887961 90.774157) (xy 132.778709 90.664713) (xy 132.778709 71.008065) (xy 132.595418 70.564465) + (xy 132.25632 70.224775) (xy 131.813041 70.04071) (xy 131.333065 70.040291) (xy 130.889465 70.223582) (xy 130.549775 70.56268) + (xy 130.36571 71.005959) (xy 130.365291 71.485935) (xy 130.548582 71.929535) (xy 130.88768 72.269225) (xy 131.330959 72.45329) + (xy 131.810935 72.453709) (xy 132.254535 72.270418) (xy 132.594225 71.93132) (xy 132.77829 71.488041) (xy 132.778709 71.008065) + (xy 132.778709 90.664713) (xy 132.620253 90.50598) (xy 132.270295 90.360665) (xy 132.058814 90.36048) (xy 132.14329 90.157041) + (xy 132.143709 89.677065) (xy 131.960418 89.233465) (xy 131.62132 88.893775) (xy 131.178041 88.70971) (xy 130.698065 88.709291) + (xy 130.254465 88.892582) (xy 129.914775 89.23168) (xy 129.73071 89.674959) (xy 129.730291 90.154935) (xy 129.913582 90.598535) + (xy 130.25268 90.938225) (xy 130.695959 91.12229) (xy 131.12768 91.122666) (xy 131.127665 91.122705) (xy 131.127335 91.501633) + (xy 131.272039 91.851843) (xy 131.508487 92.088705) (xy 131.508335 92.263633) (xy 131.653039 92.613843) (xy 131.920747 92.88202) + (xy 132.270705 93.027335) (xy 132.649633 93.027665) (xy 132.999843 92.882961) (xy 133.26802 92.615253) (xy 133.413335 92.265295) + (xy 133.413665 91.886367) (xy 133.413665 94.549129) (xy 133.200286 94.335378) (xy 132.803668 94.170687) (xy 132.374216 94.170313) + (xy 131.977311 94.334311) (xy 131.673378 94.637714) (xy 131.672869 94.638939) (xy 131.477253 94.44298) (xy 131.127295 94.297665) + (xy 130.748367 94.297335) (xy 130.492303 94.403138) (xy 130.238295 94.297665) (xy 129.859367 94.297335) (xy 129.603303 94.403138) + (xy 129.349295 94.297665) (xy 129.044144 94.297399) (xy 129.044144 68.787698) (xy 129.016362 68.232632) (xy 128.857397 67.848857) + (xy 128.615213 67.779392) (xy 128.435608 67.958997) (xy 128.435608 67.599787) (xy 128.366143 67.357603) (xy 127.842698 67.170856) + (xy 127.635242 67.181239) (xy 127.635242 65.763339) (xy 127.42301 65.249697) (xy 127.03037 64.856371) (xy 126.5171 64.643243) + (xy 125.961339 64.642758) (xy 125.447697 64.85499) (xy 125.054371 65.24763) (xy 124.841243 65.7609) (xy 124.84124 65.763336) + (xy 124.62901 65.249697) (xy 124.23637 64.856371) (xy 123.7231 64.643243) (xy 123.167339 64.642758) (xy 122.653697 64.85499) + (xy 122.260371 65.24763) (xy 122.110394 65.608814) (xy 121.96201 65.249697) (xy 121.56937 64.856371) (xy 121.0561 64.643243) + (xy 120.500339 64.642758) (xy 119.986697 64.85499) (xy 119.593371 65.24763) (xy 119.380243 65.7609) (xy 119.38024 65.763336) + (xy 119.16801 65.249697) (xy 118.77537 64.856371) (xy 118.2621 64.643243) (xy 117.706339 64.642758) (xy 117.192697 64.85499) + (xy 116.799371 65.24763) (xy 116.586243 65.7609) (xy 116.585758 66.316661) (xy 116.79799 66.830303) (xy 117.150071 67.183) + (xy 115.697691 67.183) (xy 115.464302 67.279673) (xy 115.285673 67.458301) (xy 115.189 67.69169) (xy 115.189 67.944309) + (xy 115.189 69.468309) (xy 115.285673 69.701698) (xy 115.464301 69.880327) (xy 115.69769 69.977) (xy 115.950309 69.977) + (xy 117.474309 69.977) (xy 117.707698 69.880327) (xy 117.886327 69.701699) (xy 117.983 69.46831) (xy 117.983 69.215691) + (xy 117.983 68.857246) (xy 118.19499 69.370303) (xy 118.58763 69.763629) (xy 119.1009 69.976757) (xy 119.656661 69.977242) + (xy 120.170303 69.76501) (xy 120.563629 69.37237) (xy 120.713605 69.011185) (xy 120.86199 69.370303) (xy 121.25463 69.763629) + (xy 121.7679 69.976757) (xy 122.323661 69.977242) (xy 122.837303 69.76501) (xy 123.230629 69.37237) (xy 123.443757 68.8591) + (xy 123.443759 68.856663) (xy 123.65599 69.370303) (xy 124.04863 69.763629) (xy 124.5619 69.976757) (xy 125.117661 69.977242) + (xy 125.631303 69.76501) (xy 126.024629 69.37237) (xy 126.237757 68.8591) (xy 126.23797 68.614343) (xy 126.253638 68.927368) + (xy 126.412603 69.311143) (xy 126.654787 69.380608) (xy 127.455395 68.58) (xy 126.654787 67.779392) (xy 126.412603 67.848857) + (xy 126.238212 68.337668) (xy 126.238242 68.303339) (xy 126.02601 67.789697) (xy 125.63337 67.396371) (xy 125.1201 67.183243) + (xy 124.564339 67.182758) (xy 124.050697 67.39499) (xy 123.657371 67.78763) (xy 123.444243 68.3009) (xy 123.44424 68.303336) + (xy 123.23201 67.789697) (xy 122.83937 67.396371) (xy 122.3261 67.183243) (xy 121.770339 67.182758) (xy 121.256697 67.39499) + (xy 120.863371 67.78763) (xy 120.713394 68.148814) (xy 120.56501 67.789697) (xy 120.17237 67.396371) (xy 119.6591 67.183243) + (xy 119.103339 67.182758) (xy 118.589697 67.39499) (xy 118.196371 67.78763) (xy 117.983243 68.3009) (xy 117.983 68.579353) + (xy 117.983 67.691691) (xy 117.886327 67.458302) (xy 117.864922 67.436897) (xy 118.259661 67.437242) (xy 118.773303 67.22501) + (xy 119.166629 66.83237) (xy 119.379757 66.3191) (xy 119.379759 66.316663) (xy 119.59199 66.830303) (xy 119.98463 67.223629) + (xy 120.4979 67.436757) (xy 121.053661 67.437242) (xy 121.567303 67.22501) (xy 121.960629 66.83237) (xy 122.110605 66.471185) + (xy 122.25899 66.830303) (xy 122.65163 67.223629) (xy 123.1649 67.436757) (xy 123.720661 67.437242) (xy 124.234303 67.22501) + (xy 124.627629 66.83237) (xy 124.840757 66.3191) (xy 124.840759 66.316663) (xy 125.05299 66.830303) (xy 125.44563 67.223629) + (xy 125.9589 67.436757) (xy 126.514661 67.437242) (xy 127.028303 67.22501) (xy 127.421629 66.83237) (xy 127.634757 66.3191) + (xy 127.635242 65.763339) (xy 127.635242 67.181239) (xy 127.287632 67.198638) (xy 126.903857 67.357603) (xy 126.834392 67.599787) + (xy 127.635 68.400395) (xy 128.435608 67.599787) (xy 128.435608 67.958997) (xy 127.814605 68.58) (xy 128.615213 69.380608) + (xy 128.857397 69.311143) (xy 129.044144 68.787698) (xy 129.044144 94.297399) (xy 128.970367 94.297335) (xy 128.905 94.324344) + (xy 128.905 90.8) (xy 128.905 90.2) (xy 128.846996 89.908395) (xy 128.681815 89.661185) (xy 128.552226 89.574596) + (xy 128.435608 89.457978) (xy 128.435608 69.560213) (xy 127.635 68.759605) (xy 126.834392 69.560213) (xy 126.903857 69.802397) + (xy 127.427302 69.989144) (xy 127.982368 69.961362) (xy 128.366143 69.802397) (xy 128.435608 69.560213) (xy 128.435608 89.457978) + (xy 128.262 89.28437) (xy 128.262 88.257) (xy 128.203996 87.965396) (xy 128.203996 87.965395) (xy 128.137834 87.866376) + (xy 128.038816 87.718185) (xy 126.174665 85.854034) (xy 126.174665 74.487367) (xy 126.0475 74.179604) (xy 126.0475 71.742748) + (xy 126.174335 71.437295) (xy 126.174665 71.058367) (xy 126.029961 70.708157) (xy 125.762253 70.43998) (xy 125.412295 70.294665) + (xy 125.033367 70.294335) (xy 124.683157 70.439039) (xy 124.41498 70.706747) (xy 124.269665 71.056705) (xy 124.269335 71.435633) + (xy 124.3965 71.743395) (xy 124.3965 74.180251) (xy 124.269665 74.485705) (xy 124.269335 74.864633) (xy 124.414039 75.214843) + (xy 124.681747 75.48302) (xy 125.031705 75.628335) (xy 125.410633 75.628665) (xy 125.760843 75.483961) (xy 126.02902 75.216253) + (xy 126.174335 74.866295) (xy 126.174665 74.487367) (xy 126.174665 85.854034) (xy 125.633815 85.313185) (xy 125.455496 85.194035) + (xy 125.199286 84.937378) (xy 124.802668 84.772687) (xy 124.373216 84.772313) (xy 124.031863 84.913356) (xy 123.802286 84.683378) + (xy 123.405668 84.518687) (xy 122.976216 84.518313) (xy 122.579311 84.682311) (xy 122.491613 84.769855) (xy 122.405286 84.683378) + (xy 122.008668 84.518687) (xy 121.579216 84.518313) (xy 121.182311 84.682311) (xy 121.031002 84.833355) (xy 120.881286 84.683378) + (xy 120.484668 84.518687) (xy 120.055216 84.518313) (xy 119.658311 84.682311) (xy 119.354378 84.985714) (xy 119.189687 85.382332) + (xy 119.189313 85.811784) (xy 119.353311 86.208689) (xy 119.507 86.362646) (xy 119.507 86.487) (xy 119.565004 86.778605) + (xy 119.730185 87.025815) (xy 121.635185 88.930815) (xy 121.882395 89.095996) (xy 121.882396 89.095996) (xy 122.174 89.154) + (xy 122.298575 89.154) (xy 122.021378 89.430714) (xy 121.856687 89.827332) (xy 121.856313 90.256784) (xy 122.020311 90.653689) + (xy 122.323714 90.957622) (xy 122.720332 91.122313) (xy 123.149784 91.122687) (xy 123.546689 90.958689) (xy 123.850622 90.655286) + (xy 124.015313 90.258668) (xy 124.015687 89.829216) (xy 123.919995 89.597626) (xy 125.857 91.53463) (xy 125.857 92.090852) + (xy 125.666295 92.011665) (xy 125.287367 92.011335) (xy 124.937157 92.156039) (xy 124.769766 92.323136) (xy 124.490815 92.044185) + (xy 124.243605 91.879004) (xy 123.952 91.821) (xy 121.666 91.821) (xy 121.374395 91.879004) (xy 121.275376 91.945165) + (xy 121.127185 92.044184) (xy 120.365185 92.806185) (xy 120.200004 93.053395) (xy 120.142 93.345) (xy 120.142 94.996) + (xy 120.200004 95.287605) (xy 120.365185 95.534815) (xy 121.635184 96.804815) (xy 121.635185 96.804815) (xy 121.882395 96.969996) + (xy 122.174 97.028) (xy 123.636369 97.028) (xy 123.825 97.21663) (xy 123.825 101.03037) (xy 122.872709 101.98266) + (xy 122.872709 98.186065) (xy 122.689418 97.742465) (xy 122.35032 97.402775) (xy 121.907041 97.21871) (xy 121.427065 97.218291) + (xy 120.983465 97.401582) (xy 120.643775 97.74068) (xy 120.45971 98.183959) (xy 120.459291 98.663935) (xy 120.642582 99.107535) + (xy 120.98168 99.447225) (xy 121.424959 99.63129) (xy 121.904935 99.631709) (xy 122.348535 99.448418) (xy 122.688225 99.10932) + (xy 122.87229 98.666041) (xy 122.872709 98.186065) (xy 122.872709 101.98266) (xy 119.90707 104.948299) (xy 119.907179 104.824029) + (xy 119.749942 104.443485) (xy 119.459046 104.152081) (xy 119.078777 103.99418) (xy 118.667029 103.993821) (xy 118.286485 104.151058) + (xy 117.995081 104.441954) (xy 117.83718 104.822223) (xy 117.836821 105.233971) (xy 117.994058 105.614515) (xy 118.037 105.657531) + (xy 118.037 113.792) (xy 118.100561 114.111541) (xy 118.281566 114.382434) (xy 118.545 114.645868) (xy 118.545 115.621447) + (xy 118.341286 115.417378) (xy 117.944668 115.252687) (xy 117.515216 115.252313) (xy 117.118311 115.416311) (xy 116.814378 115.719714) + (xy 116.649687 116.116332) (xy 116.649313 116.545784) (xy 116.813311 116.942689) (xy 116.9035 117.033035) (xy 116.9035 131.033068) + (xy 116.839337 131.129095) (xy 116.829868 131.176698) (xy 116.459242 131.547324) (xy 116.459242 109.578339) (xy 116.459242 98.148339) + (xy 116.24701 97.634697) (xy 115.85437 97.241371) (xy 115.646487 97.15505) (xy 115.852303 97.07001) (xy 116.245629 96.67737) + (xy 116.458757 96.1641) (xy 116.459242 95.608339) (xy 116.24701 95.094697) (xy 115.85437 94.701371) (xy 115.646487 94.61505) + (xy 115.852303 94.53001) (xy 116.245629 94.13737) (xy 116.458757 93.6241) (xy 116.459242 93.068339) (xy 116.24701 92.554697) + (xy 115.85437 92.161371) (xy 115.697242 92.096125) (xy 115.697242 88.750339) (xy 115.48501 88.236697) (xy 115.09237 87.843371) + (xy 114.884487 87.75705) (xy 115.090303 87.67201) (xy 115.483629 87.27937) (xy 115.696757 86.7661) (xy 115.697242 86.210339) + (xy 115.48501 85.696697) (xy 115.09237 85.303371) (xy 114.681242 85.132655) (xy 114.681242 75.796339) (xy 114.46901 75.282697) + (xy 114.07637 74.889371) (xy 113.868487 74.80305) (xy 114.074303 74.71801) (xy 114.467629 74.32537) (xy 114.680757 73.8121) + (xy 114.681242 73.256339) (xy 114.46901 72.742697) (xy 114.07637 72.349371) (xy 113.5631 72.136243) (xy 113.007339 72.135758) + (xy 112.964712 72.15337) (xy 113.093313 71.843668) (xy 113.093687 71.414216) (xy 112.929689 71.017311) (xy 112.626286 70.713378) + (xy 112.229668 70.548687) (xy 112.01444 70.548499) (xy 112.01444 65.536979) (xy 111.628563 64.603085) (xy 110.914673 63.887948) + (xy 109.981454 63.500441) (xy 108.970979 63.49956) (xy 108.037085 63.885437) (xy 107.321948 64.599327) (xy 106.934441 65.532546) + (xy 106.93356 66.543021) (xy 107.319437 67.476915) (xy 108.033327 68.192052) (xy 108.966546 68.579559) (xy 109.977021 68.58044) + (xy 110.910915 68.194563) (xy 111.626052 67.480673) (xy 112.013559 66.547454) (xy 112.01444 65.536979) (xy 112.01444 70.548499) + (xy 111.800216 70.548313) (xy 111.403311 70.712311) (xy 111.099378 71.015714) (xy 110.934687 71.412332) (xy 110.934313 71.841784) + (xy 111.06279 72.152724) (xy 111.0231 72.136243) (xy 110.467339 72.135758) (xy 110.2995 72.205107) (xy 110.2995 72.075252) + (xy 110.388622 71.986286) (xy 110.553313 71.589668) (xy 110.553687 71.160216) (xy 110.389689 70.763311) (xy 110.086286 70.459378) + (xy 109.689668 70.294687) (xy 109.260216 70.294313) (xy 108.863311 70.458311) (xy 108.559378 70.761714) (xy 108.394687 71.158332) + (xy 108.394313 71.587784) (xy 108.558311 71.984689) (xy 108.6485 72.075035) (xy 108.6485 72.204922) (xy 108.4831 72.136243) + (xy 107.927339 72.135758) (xy 107.413697 72.34799) (xy 107.020371 72.74063) (xy 106.807243 73.2539) (xy 106.806758 73.809661) + (xy 107.01899 74.323303) (xy 107.41163 74.716629) (xy 107.619512 74.802949) (xy 107.413697 74.88799) (xy 107.020371 75.28063) + (xy 106.807243 75.7939) (xy 106.806758 76.349661) (xy 107.01899 76.863303) (xy 107.371071 77.216) (xy 107.315691 77.216) + (xy 107.082302 77.312673) (xy 106.903673 77.491301) (xy 106.807 77.72469) (xy 106.807 77.977309) (xy 106.807 79.501309) + (xy 106.903673 79.734698) (xy 107.082301 79.913327) (xy 107.31569 80.01) (xy 107.568309 80.01) (xy 109.092309 80.01) + (xy 109.325698 79.913327) (xy 109.474 79.765025) (xy 109.622301 79.913327) (xy 109.85569 80.01) (xy 110.108309 80.01) + (xy 110.45825 80.01) (xy 110.617 79.85125) (xy 110.617 78.74) (xy 110.597 78.74) (xy 110.597 78.486) + (xy 110.617 78.486) (xy 110.617 78.466) (xy 110.871 78.466) (xy 110.871 78.486) (xy 110.891 78.486) + (xy 110.891 78.74) (xy 110.871 78.74) (xy 110.871 79.85125) (xy 111.02975 80.01) (xy 111.379691 80.01) + (xy 111.63231 80.01) (xy 111.865699 79.913327) (xy 112.014 79.765025) (xy 112.162301 79.913327) (xy 112.39569 80.01) + (xy 112.648309 80.01) (xy 114.172309 80.01) (xy 114.405698 79.913327) (xy 114.584327 79.734699) (xy 114.681 79.50131) + (xy 114.681 79.248691) (xy 114.681 77.724691) (xy 114.584327 77.491302) (xy 114.405699 77.312673) (xy 114.17231 77.216) + (xy 114.116386 77.216) (xy 114.467629 76.86537) (xy 114.680757 76.3521) (xy 114.681242 75.796339) (xy 114.681242 85.132655) + (xy 114.5791 85.090243) (xy 114.023339 85.089758) (xy 113.509697 85.30199) (xy 113.157 85.654071) (xy 113.157 85.598691) + (xy 113.060327 85.365302) (xy 112.881699 85.186673) (xy 112.64831 85.09) (xy 112.395691 85.09) (xy 110.871691 85.09) + (xy 110.638302 85.186673) (xy 110.459673 85.365301) (xy 110.363 85.59869) (xy 110.363 85.851309) (xy 110.363 87.375309) + (xy 110.459673 87.608698) (xy 110.638301 87.787327) (xy 110.87169 87.884) (xy 110.927613 87.884) (xy 110.576371 88.23463) + (xy 110.363243 88.7479) (xy 110.362758 89.303661) (xy 110.57499 89.817303) (xy 110.96763 90.210629) (xy 111.4809 90.423757) + (xy 112.036661 90.424242) (xy 112.550303 90.21201) (xy 112.943629 89.81937) (xy 113.029949 89.611487) (xy 113.11499 89.817303) + (xy 113.50763 90.210629) (xy 114.0209 90.423757) (xy 114.576661 90.424242) (xy 115.090303 90.21201) (xy 115.483629 89.81937) + (xy 115.696757 89.3061) (xy 115.697242 88.750339) (xy 115.697242 92.096125) (xy 115.3411 91.948243) (xy 114.785339 91.947758) + (xy 114.271697 92.15999) (xy 113.919 92.512071) (xy 113.919 92.45669) (xy 113.822327 92.223301) (xy 113.643698 92.044673) + (xy 113.410309 91.948) (xy 112.80775 91.948) (xy 112.649 92.10675) (xy 112.649 93.218) (xy 112.669 93.218) + (xy 112.669 93.472) (xy 112.649 93.472) (xy 112.649 94.58325) (xy 112.68075 94.615) (xy 112.649 94.64675) + (xy 112.649 95.758) (xy 112.669 95.758) (xy 112.669 96.012) (xy 112.649 96.012) (xy 112.649 97.12325) + (xy 112.68075 97.155) (xy 112.649 97.18675) (xy 112.649 98.298) (xy 112.669 98.298) (xy 112.669 98.552) + (xy 112.649 98.552) (xy 112.649 99.66325) (xy 112.80775 99.822) (xy 113.410309 99.822) (xy 113.643698 99.725327) + (xy 113.822327 99.546699) (xy 113.919 99.31331) (xy 113.919 99.257386) (xy 114.26963 99.608629) (xy 114.7829 99.821757) + (xy 115.338661 99.822242) (xy 115.852303 99.61001) (xy 116.245629 99.21737) (xy 116.458757 98.7041) (xy 116.459242 98.148339) + (xy 116.459242 109.578339) (xy 116.24701 109.064697) (xy 115.85437 108.671371) (xy 115.3411 108.458243) (xy 114.785339 108.457758) + (xy 114.271697 108.66999) (xy 113.919 109.022071) (xy 113.919 108.966691) (xy 113.822327 108.733302) (xy 113.643699 108.554673) + (xy 113.41031 108.458) (xy 113.157691 108.458) (xy 112.395 108.458) (xy 112.395 99.66325) (xy 112.395 98.552) + (xy 112.395 98.298) (xy 112.395 97.18675) (xy 112.36325 97.155) (xy 112.395 97.12325) (xy 112.395 96.012) + (xy 112.395 95.758) (xy 112.395 94.64675) (xy 112.36325 94.615) (xy 112.395 94.58325) (xy 112.395 93.472) + (xy 112.395 93.218) (xy 112.395 92.10675) (xy 112.23625 91.948) (xy 111.633691 91.948) (xy 111.400302 92.044673) + (xy 111.221673 92.223301) (xy 111.125 92.45669) (xy 111.125 92.709309) (xy 111.125 93.05925) (xy 111.28375 93.218) + (xy 112.395 93.218) (xy 112.395 93.472) (xy 111.28375 93.472) (xy 111.125 93.63075) (xy 111.125 93.980691) + (xy 111.125 94.23331) (xy 111.221673 94.466699) (xy 111.369974 94.615) (xy 111.221673 94.763301) (xy 111.125 94.99669) + (xy 111.125 95.249309) (xy 111.125 95.59925) (xy 111.28375 95.758) (xy 112.395 95.758) (xy 112.395 96.012) + (xy 111.28375 96.012) (xy 111.125 96.17075) (xy 111.125 96.520691) (xy 111.125 96.77331) (xy 111.221673 97.006699) + (xy 111.369974 97.155) (xy 111.221673 97.303301) (xy 111.125 97.53669) (xy 111.125 97.789309) (xy 111.125 98.13925) + (xy 111.28375 98.298) (xy 112.395 98.298) (xy 112.395 98.552) (xy 111.28375 98.552) (xy 111.125 98.71075) + (xy 111.125 99.060691) (xy 111.125 99.31331) (xy 111.221673 99.546699) (xy 111.400302 99.725327) (xy 111.633691 99.822) + (xy 112.23625 99.822) (xy 112.395 99.66325) (xy 112.395 108.458) (xy 111.633691 108.458) (xy 111.400302 108.554673) + (xy 111.221673 108.733301) (xy 111.125 108.96669) (xy 111.125 109.219309) (xy 111.125 110.743309) (xy 111.221673 110.976698) + (xy 111.400301 111.155327) (xy 111.63369 111.252) (xy 111.886309 111.252) (xy 113.410309 111.252) (xy 113.643698 111.155327) + (xy 113.822327 110.976699) (xy 113.919 110.74331) (xy 113.919 110.687386) (xy 114.26963 111.038629) (xy 114.7829 111.251757) + (xy 115.338661 111.252242) (xy 115.852303 111.04001) (xy 116.245629 110.64737) (xy 116.458757 110.1341) (xy 116.459242 109.578339) + (xy 116.459242 131.547324) (xy 115.240283 132.766283) (xy 115.061337 133.034094) (xy 114.9985 133.35) (xy 114.9985 135.756125) + (xy 114.640371 136.11363) (xy 114.55405 136.321512) (xy 114.46901 136.115697) (xy 114.07637 135.722371) (xy 113.5631 135.509243) + (xy 113.007339 135.508758) (xy 112.493697 135.72099) (xy 112.100371 136.11363) (xy 112.01405 136.321512) (xy 111.92901 136.115697) + (xy 111.53637 135.722371) (xy 111.0231 135.509243) (xy 110.467339 135.508758) (xy 109.953697 135.72099) (xy 109.560371 136.11363) + (xy 109.347243 136.6269) (xy 109.346758 137.182661) (xy 109.55899 137.696303) (xy 109.95163 138.089629) (xy 110.143727 138.169394) + (xy 110.012857 138.223603) (xy 109.943392 138.465787) (xy 110.744 139.266395) (xy 111.544608 138.465787) (xy 111.475143 138.223603) + (xy 111.334682 138.173491) (xy 111.534303 138.09101) (xy 111.927629 137.69837) (xy 112.013949 137.490487) (xy 112.09899 137.696303) + (xy 112.49163 138.089629) (xy 112.699512 138.175949) (xy 112.493697 138.26099) (xy 112.100371 138.65363) (xy 112.020605 138.845727) + (xy 111.966397 138.714857) (xy 111.724213 138.645392) (xy 110.923605 139.446) (xy 110.937747 139.460142) (xy 110.758142 139.639747) + (xy 110.744 139.625605) (xy 110.729857 139.639747) (xy 110.550252 139.460142) (xy 110.564395 139.446) (xy 109.763787 138.645392) + (xy 109.521603 138.714857) (xy 109.43322 138.962589) (xy 107.461 136.990369) (xy 107.461 115.276328) (xy 107.708959 115.37929) + (xy 108.188935 115.379709) (xy 108.632535 115.196418) (xy 108.972225 114.85732) (xy 109.15629 114.414041) (xy 109.156709 113.934065) + (xy 109.029709 113.6267) (xy 109.029709 82.946065) (xy 108.846418 82.502465) (xy 108.50732 82.162775) (xy 108.064041 81.97871) + (xy 107.584065 81.978291) (xy 107.140465 82.161582) (xy 106.800775 82.50068) (xy 106.61671 82.943959) (xy 106.616291 83.423935) + (xy 106.799582 83.867535) (xy 107.13868 84.207225) (xy 107.581959 84.39129) (xy 108.061935 84.391709) (xy 108.505535 84.208418) + (xy 108.845225 83.86932) (xy 109.02929 83.426041) (xy 109.029709 82.946065) (xy 109.029709 113.6267) (xy 108.973418 113.490465) + (xy 108.63432 113.150775) (xy 108.191041 112.96671) (xy 107.711065 112.966291) (xy 107.461 113.069615) (xy 107.461 102) + (xy 107.402996 101.708396) (xy 107.402996 101.708395) (xy 107.237815 101.461185) (xy 105.186815 99.410185) (xy 104.939605 99.245004) + (xy 104.648 99.187) (xy 104.330709 99.187) (xy 104.330709 84.343065) (xy 104.147418 83.899465) (xy 104.001369 83.753161) + (xy 104.001369 61.431358) (xy 103.999221 60.223843) (xy 103.541257 59.118221) (xy 103.128936 58.84867) (xy 102.94933 59.028275) + (xy 102.94933 58.669064) (xy 102.679779 58.256743) (xy 101.563358 57.796631) (xy 100.355843 57.798779) (xy 99.250221 58.256743) + (xy 98.98067 58.669064) (xy 100.965 60.653395) (xy 102.94933 58.669064) (xy 102.94933 59.028275) (xy 101.144605 60.833) + (xy 103.128936 62.81733) (xy 103.541257 62.547779) (xy 104.001369 61.431358) (xy 104.001369 83.753161) (xy 104.0003 83.75209) + (xy 104.0003 69.455609) (xy 104.0003 67.21475) (xy 104.0003 66.64325) (xy 104.0003 64.402391) (xy 103.903627 64.169002) + (xy 103.724999 63.990373) (xy 103.49161 63.8937) (xy 103.238991 63.8937) (xy 102.94933 63.8937) (xy 101.25075 63.8937) + (xy 101.092 64.05245) (xy 101.092 66.802) (xy 103.84155 66.802) (xy 104.0003 66.64325) (xy 104.0003 67.21475) + (xy 103.84155 67.056) (xy 101.092 67.056) (xy 101.092 69.80555) (xy 101.25075 69.9643) (xy 103.238991 69.9643) + (xy 103.49161 69.9643) (xy 103.724999 69.867627) (xy 103.903627 69.688998) (xy 104.0003 69.455609) (xy 104.0003 83.75209) + (xy 103.80832 83.559775) (xy 103.365041 83.37571) (xy 102.885065 83.375291) (xy 102.441465 83.558582) (xy 102.101775 83.89768) + (xy 101.91771 84.340959) (xy 101.917291 84.820935) (xy 102.100582 85.264535) (xy 102.43968 85.604225) (xy 102.882959 85.78829) + (xy 103.362935 85.788709) (xy 103.806535 85.605418) (xy 104.146225 85.26632) (xy 104.33029 84.823041) (xy 104.330709 84.343065) + (xy 104.330709 99.187) (xy 103.505 99.187) (xy 103.213395 99.245004) (xy 103.114376 99.311165) (xy 102.966185 99.410184) + (xy 102.744979 99.63139) (xy 102.656216 99.631313) (xy 102.259311 99.795311) (xy 101.955378 100.098714) (xy 101.790687 100.495332) + (xy 101.790313 100.924784) (xy 101.954311 101.321689) (xy 102.257714 101.625622) (xy 102.489981 101.722068) (xy 102.489 101.727) + (xy 102.489 103.886) (xy 102.547004 104.177605) (xy 102.712185 104.424815) (xy 103.705 105.41763) (xy 103.705 138.122) + (xy 103.763004 138.413605) (xy 103.928185 138.660815) (xy 108.554185 143.286815) (xy 108.801395 143.451996) (xy 108.801396 143.451996) + (xy 109.093 143.51) (xy 140.462 143.51) (xy 140.462 143.509999) (xy 140.753604 143.451996) (xy 140.753605 143.451996) + (xy 141.000815 143.286815) (xy 143.456617 140.831012) (xy 143.4849 140.842757) (xy 144.040661 140.843242) (xy 144.554303 140.63101) + (xy 144.947629 140.23837) (xy 145.033949 140.030487) (xy 145.11899 140.236303) (xy 145.51163 140.629629) (xy 146.0249 140.842757) + (xy 146.580661 140.843242) (xy 147.094303 140.63101) (xy 147.487629 140.23837) (xy 147.573949 140.030487) (xy 147.65899 140.236303) + (xy 148.05163 140.629629) (xy 148.5649 140.842757) (xy 149.120661 140.843242) (xy 149.634303 140.63101) (xy 150.027629 140.23837) + (xy 150.113949 140.030487) (xy 150.19899 140.236303) (xy 150.59163 140.629629) (xy 151.1049 140.842757) (xy 151.660661 140.843242) + (xy 152.174303 140.63101) (xy 152.567629 140.23837) (xy 152.653949 140.030487) (xy 152.73899 140.236303) (xy 153.13163 140.629629) + (xy 153.6449 140.842757) (xy 154.200661 140.843242) (xy 154.714303 140.63101) (xy 155.107629 140.23837) (xy 155.193949 140.030487) + (xy 155.27899 140.236303) (xy 155.67163 140.629629) (xy 156.1849 140.842757) (xy 156.740661 140.843242) (xy 157.254303 140.63101) + (xy 157.647629 140.23837) (xy 157.733949 140.030487) (xy 157.81899 140.236303) (xy 158.21163 140.629629) (xy 158.7249 140.842757) + (xy 159.280661 140.843242) (xy 159.794303 140.63101) (xy 160.187629 140.23837) (xy 160.273949 140.030487) (xy 160.35899 140.236303) + (xy 160.75163 140.629629) (xy 161.2649 140.842757) (xy 161.820661 140.843242) (xy 162.334303 140.63101) (xy 162.727629 140.23837) + (xy 162.813949 140.030487) (xy 162.89899 140.236303) (xy 163.29163 140.629629) (xy 163.8049 140.842757) (xy 164.360661 140.843242) + (xy 164.874303 140.63101) (xy 165.267629 140.23837) (xy 165.353949 140.030487) (xy 165.43899 140.236303) (xy 165.83163 140.629629) + (xy 166.3449 140.842757) (xy 166.900661 140.843242) (xy 167.414303 140.63101) (xy 167.807629 140.23837) (xy 167.893949 140.030487) + (xy 167.97899 140.236303) (xy 168.37163 140.629629) (xy 168.8849 140.842757) (xy 169.440661 140.843242) (xy 169.724505 140.72596) + (xy 169.730004 140.753605) (xy 169.895185 141.000815) (xy 170.784185 141.889815) (xy 171.031395 142.054996) (xy 171.031396 142.054996) + (xy 171.323 142.113) (xy 182.499 142.113) (xy 182.499 142.112999) (xy 182.790604 142.054996) (xy 182.790605 142.054996) + (xy 183.037815 141.889815) (xy 184.096617 140.831012) (xy 184.1249 140.842757) (xy 184.680661 140.843242) (xy 185.194303 140.63101) + (xy 185.587629 140.23837) (xy 185.800757 139.7251) (xy 185.801242 139.169339) (xy 185.58901 138.655697) (xy 185.236928 138.303) + (xy 185.292309 138.303) (xy 185.525698 138.206327) (xy 185.704327 138.027699) (xy 185.801 137.79431) (xy 185.801 137.541691) + (xy 185.801 136.017691) (xy 185.704327 135.784302) (xy 185.525699 135.605673) (xy 185.29231 135.509) (xy 185.2549 135.509) + (xy 185.2549 131.426518) (xy 185.587629 131.09437) (xy 185.800757 130.5811) (xy 185.801242 130.025339) (xy 185.58901 129.511697) + (xy 185.19637 129.118371) (xy 184.6831 128.905243) (xy 184.127339 128.904758) (xy 183.613697 129.11699) (xy 183.261 129.469071) + (xy 183.261 129.413691) (xy 183.164327 129.180302) (xy 182.985699 129.001673) (xy 182.75231 128.905) (xy 182.499691 128.905) + (xy 181.54463 128.905) (xy 186.974815 123.474815) (xy 187.139996 123.227605) (xy 187.139996 123.227604) (xy 187.198 122.936) + (xy 187.198 146.086802) (xy 102.171687 146.433849) (xy 102.171687 118.658216) (xy 102.007689 118.261311) (xy 101.854 118.107353) + (xy 101.854 115.826641) (xy 102.006622 115.674286) (xy 102.171313 115.277668) (xy 102.171687 114.848216) (xy 102.007689 114.451311) + (xy 101.704286 114.147378) (xy 101.499218 114.062225) (xy 101.520535 114.053418) (xy 101.860225 113.71432) (xy 102.04429 113.271041) + (xy 102.044709 112.791065) (xy 101.861418 112.347465) (xy 101.663709 112.14941) (xy 101.663709 95.519065) (xy 101.480418 95.075465) + (xy 101.14132 94.735775) (xy 100.838 94.609825) (xy 100.838 69.80555) (xy 100.838 67.056) (xy 98.08845 67.056) + (xy 97.9297 67.21475) (xy 97.9297 69.455609) (xy 98.026373 69.688998) (xy 98.205001 69.867627) (xy 98.43839 69.9643) + (xy 98.691009 69.9643) (xy 100.67925 69.9643) (xy 100.838 69.80555) (xy 100.838 94.609825) (xy 100.698041 94.55171) + (xy 100.218065 94.551291) (xy 99.774465 94.734582) (xy 99.434775 95.07368) (xy 99.25071 95.516959) (xy 99.250291 95.996935) + (xy 99.433582 96.440535) (xy 99.77268 96.780225) (xy 100.215959 96.96429) (xy 100.695935 96.964709) (xy 101.139535 96.781418) + (xy 101.479225 96.44232) (xy 101.66329 95.999041) (xy 101.663709 95.519065) (xy 101.663709 112.14941) (xy 101.52232 112.007775) + (xy 101.079041 111.82371) (xy 100.599065 111.823291) (xy 100.155465 112.006582) (xy 99.815775 112.34568) (xy 99.63171 112.788959) + (xy 99.631291 113.268935) (xy 99.814582 113.712535) (xy 100.15368 114.052225) (xy 100.451627 114.175943) (xy 100.416408 114.2111) + (xy 99.504709 114.2111) (xy 99.504709 100.345065) (xy 99.321418 99.901465) (xy 99.187242 99.767054) (xy 99.187242 92.941339) + (xy 98.97501 92.427697) (xy 98.58237 92.034371) (xy 98.361709 91.942744) (xy 98.361709 87.518065) (xy 98.178418 87.074465) + (xy 97.83932 86.734775) (xy 97.396041 86.55071) (xy 96.916065 86.550291) (xy 96.472465 86.733582) (xy 96.132775 87.07268) + (xy 95.94871 87.515959) (xy 95.948291 87.995935) (xy 96.131582 88.439535) (xy 96.47068 88.779225) (xy 96.913959 88.96329) + (xy 97.393935 88.963709) (xy 97.837535 88.780418) (xy 98.177225 88.44132) (xy 98.36129 87.998041) (xy 98.361709 87.518065) + (xy 98.361709 91.942744) (xy 98.0691 91.821243) (xy 97.513339 91.820758) (xy 96.999697 92.03299) (xy 96.606371 92.42563) + (xy 96.393243 92.9389) (xy 96.392758 93.494661) (xy 96.60499 94.008303) (xy 96.957071 94.361) (xy 96.901691 94.361) + (xy 96.668302 94.457673) (xy 96.489673 94.636301) (xy 96.393 94.86969) (xy 96.393 95.122309) (xy 96.393 96.646309) + (xy 96.489673 96.879698) (xy 96.668301 97.058327) (xy 96.90169 97.155) (xy 97.154309 97.155) (xy 98.678309 97.155) + (xy 98.911698 97.058327) (xy 99.090327 96.879699) (xy 99.187 96.64631) (xy 99.187 96.393691) (xy 99.187 94.869691) + (xy 99.090327 94.636302) (xy 98.911699 94.457673) (xy 98.67831 94.361) (xy 98.622386 94.361) (xy 98.973629 94.01037) + (xy 99.186757 93.4971) (xy 99.187242 92.941339) (xy 99.187242 99.767054) (xy 98.98232 99.561775) (xy 98.539041 99.37771) + (xy 98.059065 99.377291) (xy 97.615465 99.560582) (xy 97.275775 99.89968) (xy 97.09171 100.342959) (xy 97.091291 100.822935) + (xy 97.274582 101.266535) (xy 97.61368 101.606225) (xy 98.056959 101.79029) (xy 98.536935 101.790709) (xy 98.980535 101.607418) + (xy 99.320225 101.26832) (xy 99.50429 100.825041) (xy 99.504709 100.345065) (xy 99.504709 114.2111) (xy 98.615709 114.2111) + (xy 98.615709 111.902065) (xy 98.432418 111.458465) (xy 98.09332 111.118775) (xy 97.650041 110.93471) (xy 97.170065 110.934291) + (xy 96.726465 111.117582) (xy 96.386775 111.45668) (xy 96.20271 111.899959) (xy 96.202291 112.379935) (xy 96.385582 112.823535) + (xy 96.72468 113.163225) (xy 97.167959 113.34729) (xy 97.647935 113.347709) (xy 98.091535 113.164418) (xy 98.431225 112.82532) + (xy 98.61529 112.382041) (xy 98.615709 111.902065) (xy 98.615709 114.2111) (xy 96.433896 114.2111) (xy 96.370286 114.147378) + (xy 95.973668 113.982687) (xy 95.631242 113.982388) (xy 95.631242 112.626339) (xy 95.41901 112.112697) (xy 95.02637 111.719371) + (xy 94.996 111.70676) (xy 94.996 78.10431) (xy 94.996 77.851691) (xy 94.996 76.073691) (xy 94.899327 75.840302) + (xy 94.720699 75.661673) (xy 94.48731 75.565) (xy 94.234691 75.565) (xy 92.456691 75.565) (xy 92.223302 75.661673) + (xy 92.044673 75.840301) (xy 91.948 76.07369) (xy 91.948 76.326309) (xy 91.948 78.104309) (xy 92.044673 78.337698) + (xy 92.223301 78.516327) (xy 92.45669 78.613) (xy 92.709309 78.613) (xy 94.487309 78.613) (xy 94.720698 78.516327) + (xy 94.899327 78.337699) (xy 94.996 78.10431) (xy 94.996 111.70676) (xy 94.5131 111.506243) (xy 93.957339 111.505758) + (xy 93.443697 111.71799) (xy 93.091 112.070071) (xy 93.091 112.01469) (xy 92.994327 111.781301) (xy 92.815698 111.602673) + (xy 92.582309 111.506) (xy 91.97975 111.506) (xy 91.821 111.66475) (xy 91.821 112.776) (xy 91.841 112.776) + (xy 91.841 113.03) (xy 91.821 113.03) (xy 91.821 114.14125) (xy 91.97975 114.3) (xy 92.582309 114.3) + (xy 92.815698 114.203327) (xy 92.994327 114.024699) (xy 93.091 113.79131) (xy 93.091 113.735386) (xy 93.44163 114.086629) + (xy 93.9549 114.299757) (xy 94.510661 114.300242) (xy 95.024303 114.08801) (xy 95.417629 113.69537) (xy 95.630757 113.1821) + (xy 95.631242 112.626339) (xy 95.631242 113.982388) (xy 95.544216 113.982313) (xy 95.147311 114.146311) (xy 94.843378 114.449714) + (xy 94.678687 114.846332) (xy 94.678313 115.275784) (xy 94.842311 115.672689) (xy 94.996 115.826646) (xy 94.996 116.837358) + (xy 94.843378 116.989714) (xy 94.678687 117.386332) (xy 94.678313 117.815784) (xy 94.842311 118.212689) (xy 95.145714 118.516622) + (xy 95.542332 118.681313) (xy 95.971784 118.681687) (xy 96.368689 118.517689) (xy 96.672622 118.214286) (xy 96.837313 117.817668) + (xy 96.837687 117.388216) (xy 96.673689 116.991311) (xy 96.52 116.837353) (xy 96.52 115.9129) (xy 100.33 115.9129) + (xy 100.33 118.107358) (xy 100.177378 118.259714) (xy 100.012687 118.656332) (xy 100.012313 119.085784) (xy 100.176311 119.482689) + (xy 100.479714 119.786622) (xy 100.876332 119.951313) (xy 101.305784 119.951687) (xy 101.702689 119.787689) (xy 102.006622 119.484286) + (xy 102.171313 119.087668) (xy 102.171687 118.658216) (xy 102.171687 146.433849) (xy 92.837 146.47195) (xy 92.837 135.50831) + (xy 92.837 135.255691) (xy 92.837 133.731691) (xy 92.740327 133.498302) (xy 92.561699 133.319673) (xy 92.32831 133.223) + (xy 92.075691 133.223) (xy 91.567 133.223) (xy 91.567 114.14125) (xy 91.567 113.03) (xy 91.567 112.776) + (xy 91.567 111.66475) (xy 91.40825 111.506) (xy 90.805691 111.506) (xy 90.572302 111.602673) (xy 90.435516 111.739458) + (xy 90.435516 95.488035) (xy 90.435516 82.788035) (xy 90.409723 82.1823) (xy 90.227539 81.742467) (xy 89.972196 81.657409) + (xy 89.792591 81.837014) (xy 89.792591 81.477804) (xy 89.707533 81.222461) (xy 89.138035 81.014484) (xy 88.5323 81.040277) + (xy 88.092467 81.222461) (xy 88.007409 81.477804) (xy 88.9 82.370395) (xy 89.792591 81.477804) (xy 89.792591 81.837014) + (xy 89.079605 82.55) (xy 89.972196 83.442591) (xy 90.227539 83.357533) (xy 90.435516 82.788035) (xy 90.435516 95.488035) + (xy 90.424 95.217587) (xy 90.424 88.64531) (xy 90.424 88.392691) (xy 90.424 86.614691) (xy 90.327327 86.381302) + (xy 90.148699 86.202673) (xy 89.91531 86.106) (xy 89.792591 86.106) (xy 89.792591 83.622196) (xy 88.9 82.729605) + (xy 88.720395 82.90921) (xy 88.720395 82.55) (xy 87.827804 81.657409) (xy 87.572461 81.742467) (xy 87.364484 82.311965) + (xy 87.390277 82.9177) (xy 87.572461 83.357533) (xy 87.827804 83.442591) (xy 88.720395 82.55) (xy 88.720395 82.90921) + (xy 88.007409 83.622196) (xy 88.092467 83.877539) (xy 88.661965 84.085516) (xy 89.2677 84.059723) (xy 89.707533 83.877539) + (xy 89.792591 83.622196) (xy 89.792591 86.106) (xy 89.662691 86.106) (xy 87.884691 86.106) (xy 87.651302 86.202673) + (xy 87.472673 86.381301) (xy 87.376 86.61469) (xy 87.376 86.867309) (xy 87.376 88.645309) (xy 87.472673 88.878698) + (xy 87.651301 89.057327) (xy 87.88469 89.154) (xy 88.137309 89.154) (xy 89.915309 89.154) (xy 90.148698 89.057327) + (xy 90.327327 88.878699) (xy 90.424 88.64531) (xy 90.424 95.217587) (xy 90.409723 94.8823) (xy 90.227539 94.442467) + (xy 89.972196 94.357409) (xy 89.792591 94.537014) (xy 89.792591 94.177804) (xy 89.707533 93.922461) (xy 89.138035 93.714484) + (xy 88.5323 93.740277) (xy 88.092467 93.922461) (xy 88.007409 94.177804) (xy 88.9 95.070395) (xy 89.792591 94.177804) + (xy 89.792591 94.537014) (xy 89.079605 95.25) (xy 89.972196 96.142591) (xy 90.227539 96.057533) (xy 90.435516 95.488035) + (xy 90.435516 111.739458) (xy 90.424 111.750974) (xy 90.424 101.34531) (xy 90.424 101.092691) (xy 90.424 99.314691) + (xy 90.327327 99.081302) (xy 90.148699 98.902673) (xy 89.91531 98.806) (xy 89.792591 98.806) (xy 89.792591 96.322196) + (xy 88.9 95.429605) (xy 88.720395 95.60921) (xy 88.720395 95.25) (xy 87.827804 94.357409) (xy 87.572461 94.442467) + (xy 87.364484 95.011965) (xy 87.390277 95.6177) (xy 87.572461 96.057533) (xy 87.827804 96.142591) (xy 88.720395 95.25) + (xy 88.720395 95.60921) (xy 88.007409 96.322196) (xy 88.092467 96.577539) (xy 88.661965 96.785516) (xy 89.2677 96.759723) + (xy 89.707533 96.577539) (xy 89.792591 96.322196) (xy 89.792591 98.806) (xy 89.662691 98.806) (xy 87.884691 98.806) + (xy 87.651302 98.902673) (xy 87.472673 99.081301) (xy 87.376 99.31469) (xy 87.376 99.567309) (xy 87.376 101.345309) + (xy 87.472673 101.578698) (xy 87.651301 101.757327) (xy 87.88469 101.854) (xy 88.137309 101.854) (xy 89.915309 101.854) + (xy 90.148698 101.757327) (xy 90.327327 101.578699) (xy 90.424 101.34531) (xy 90.424 111.750974) (xy 90.393673 111.781301) + (xy 90.297 112.01469) (xy 90.297 112.267309) (xy 90.297 112.61725) (xy 90.45575 112.776) (xy 91.567 112.776) + (xy 91.567 113.03) (xy 90.45575 113.03) (xy 90.297 113.18875) (xy 90.297 113.538691) (xy 90.297 113.79131) + (xy 90.393673 114.024699) (xy 90.572302 114.203327) (xy 90.805691 114.3) (xy 91.40825 114.3) (xy 91.567 114.14125) + (xy 91.567 133.223) (xy 90.551691 133.223) (xy 90.318302 133.319673) (xy 90.139673 133.498301) (xy 90.043 133.73169) + (xy 90.043 133.787613) (xy 89.69237 133.436371) (xy 89.1791 133.223243) (xy 88.709687 133.222833) (xy 88.709687 111.927216) + (xy 88.545689 111.530311) (xy 88.242286 111.226378) (xy 87.845668 111.061687) (xy 87.628127 111.061497) (xy 87.249 110.68237) + (xy 87.249 109.22) (xy 87.190996 108.928396) (xy 87.190996 108.928395) (xy 87.025815 108.681185) (xy 85.788709 107.444079) + (xy 85.788709 101.996065) (xy 85.605418 101.552465) (xy 85.26632 101.212775) (xy 84.823041 101.02871) (xy 84.343065 101.028291) + (xy 83.899465 101.211582) (xy 83.559775 101.55068) (xy 83.37571 101.993959) (xy 83.375291 102.473935) (xy 83.558582 102.917535) + (xy 83.89768 103.257225) (xy 84.340959 103.44129) (xy 84.820935 103.441709) (xy 85.264535 103.258418) (xy 85.604225 102.91932) + (xy 85.78829 102.476041) (xy 85.788709 101.996065) (xy 85.788709 107.444079) (xy 84.104815 105.760185) (xy 83.857605 105.595004) + (xy 83.566 105.537) (xy 82.307516 105.537) (xy 82.307516 77.327035) (xy 82.281723 76.7213) (xy 82.099539 76.281467) + (xy 81.844196 76.196409) (xy 81.664591 76.376014) (xy 81.664591 76.016804) (xy 81.579533 75.761461) (xy 81.010035 75.553484) + (xy 80.4043 75.579277) (xy 79.964467 75.761461) (xy 79.879409 76.016804) (xy 80.772 76.909395) (xy 81.664591 76.016804) + (xy 81.664591 76.376014) (xy 80.951605 77.089) (xy 81.844196 77.981591) (xy 82.099539 77.896533) (xy 82.307516 77.327035) + (xy 82.307516 105.537) (xy 81.664591 105.537) (xy 81.664591 78.161196) (xy 80.772 77.268605) (xy 80.592395 77.44821) + (xy 80.592395 77.089) (xy 79.699804 76.196409) (xy 79.444461 76.281467) (xy 79.236484 76.850965) (xy 79.262277 77.4567) + (xy 79.444461 77.896533) (xy 79.699804 77.981591) (xy 80.592395 77.089) (xy 80.592395 77.44821) (xy 79.879409 78.161196) + (xy 79.964467 78.416539) (xy 80.533965 78.624516) (xy 81.1397 78.598723) (xy 81.579533 78.416539) (xy 81.664591 78.161196) + (xy 81.664591 105.537) (xy 80.063704 105.537) (xy 80.05201 105.508697) (xy 79.65937 105.115371) (xy 79.1461 104.902243) + (xy 78.590339 104.901758) (xy 78.076697 105.11399) (xy 77.724 105.466071) (xy 77.724 105.410691) (xy 77.627327 105.177302) + (xy 77.448699 104.998673) (xy 77.352261 104.958727) (xy 77.352261 73.353964) (xy 77.332436 72.596368) (xy 77.080657 71.98852) + (xy 76.785777 71.856828) (xy 75.617605 73.025) (xy 76.785777 74.193172) (xy 77.080657 74.06148) (xy 77.352261 73.353964) + (xy 77.352261 104.958727) (xy 77.21531 104.902) (xy 76.962691 104.902) (xy 76.606172 104.902) (xy 76.606172 74.372777) + (xy 75.438 73.204605) (xy 75.258395 73.38421) (xy 75.258395 73.025) (xy 74.090223 71.856828) (xy 73.795343 71.98852) + (xy 73.523739 72.696036) (xy 73.543564 73.453632) (xy 73.795343 74.06148) (xy 74.090223 74.193172) (xy 75.258395 73.025) + (xy 75.258395 73.38421) (xy 74.269828 74.372777) (xy 74.40152 74.667657) (xy 75.109036 74.939261) (xy 75.866632 74.919436) + (xy 76.47448 74.667657) (xy 76.606172 74.372777) (xy 76.606172 104.902) (xy 75.438691 104.902) (xy 75.205302 104.998673) + (xy 75.026673 105.177301) (xy 74.93 105.41069) (xy 74.93 105.663309) (xy 74.93 107.187309) (xy 75.026673 107.420698) + (xy 75.205301 107.599327) (xy 75.43869 107.696) (xy 75.573083 107.696) (xy 75.526392 107.858787) (xy 76.327 108.659395) + (xy 77.127608 107.858787) (xy 77.080916 107.696) (xy 77.215309 107.696) (xy 77.448698 107.599327) (xy 77.627327 107.420699) + (xy 77.724 107.18731) (xy 77.724 107.131386) (xy 78.07463 107.482629) (xy 78.282512 107.568949) (xy 78.076697 107.65399) + (xy 77.683371 108.04663) (xy 77.603605 108.238727) (xy 77.549397 108.107857) (xy 77.307213 108.038392) (xy 76.506605 108.839) + (xy 77.307213 109.639608) (xy 77.549397 109.570143) (xy 77.599508 109.429682) (xy 77.68199 109.629303) (xy 78.07463 110.022629) + (xy 78.282512 110.108949) (xy 78.076697 110.19399) (xy 77.683371 110.58663) (xy 77.603605 110.778727) (xy 77.549397 110.647857) + (xy 77.307213 110.578392) (xy 77.127608 110.757997) (xy 77.127608 110.398787) (xy 77.058143 110.156603) (xy 76.934655 110.112547) + (xy 77.058143 110.061397) (xy 77.127608 109.819213) (xy 76.327 109.018605) (xy 76.147395 109.19821) (xy 76.147395 108.839) + (xy 75.346787 108.038392) (xy 75.104603 108.107857) (xy 74.917856 108.631302) (xy 74.945638 109.186368) (xy 75.104603 109.570143) + (xy 75.346787 109.639608) (xy 76.147395 108.839) (xy 76.147395 109.19821) (xy 75.526392 109.819213) (xy 75.595857 110.061397) + (xy 75.719344 110.105452) (xy 75.595857 110.156603) (xy 75.526392 110.398787) (xy 76.327 111.199395) (xy 77.127608 110.398787) + (xy 77.127608 110.757997) (xy 76.506605 111.379) (xy 77.307213 112.179608) (xy 77.549397 112.110143) (xy 77.599508 111.969682) + (xy 77.68199 112.169303) (xy 78.07463 112.562629) (xy 78.282512 112.648949) (xy 78.076697 112.73399) (xy 77.683371 113.12663) + (xy 77.59705 113.334512) (xy 77.51201 113.128697) (xy 77.11937 112.735371) (xy 76.927272 112.655605) (xy 77.058143 112.601397) + (xy 77.127608 112.359213) (xy 76.327 111.558605) (xy 76.147395 111.73821) (xy 76.147395 111.379) (xy 75.346787 110.578392) + (xy 75.104603 110.647857) (xy 74.917856 111.171302) (xy 74.945638 111.726368) (xy 75.104603 112.110143) (xy 75.346787 112.179608) + (xy 76.147395 111.379) (xy 76.147395 111.73821) (xy 75.526392 112.359213) (xy 75.595857 112.601397) (xy 75.736317 112.651508) + (xy 75.536697 112.73399) (xy 75.143371 113.12663) (xy 74.930243 113.6399) (xy 74.929758 114.195661) (xy 75.14199 114.709303) + (xy 75.53463 115.102629) (xy 75.742512 115.188949) (xy 75.536697 115.27399) (xy 75.143371 115.66663) (xy 74.930243 116.1799) + (xy 74.929758 116.735661) (xy 75.14199 117.249303) (xy 75.53463 117.642629) (xy 75.726727 117.722394) (xy 75.595857 117.776603) + (xy 75.526392 118.018787) (xy 76.327 118.819395) (xy 77.127608 118.018787) (xy 77.058143 117.776603) (xy 76.917682 117.726491) + (xy 77.117303 117.64401) (xy 77.510629 117.25137) (xy 77.596949 117.043487) (xy 77.68199 117.249303) (xy 78.07463 117.642629) + (xy 78.282512 117.728949) (xy 78.076697 117.81399) (xy 77.683371 118.20663) (xy 77.603605 118.398727) (xy 77.549397 118.267857) + (xy 77.307213 118.198392) (xy 76.506605 118.999) (xy 77.307213 119.799608) (xy 77.549397 119.730143) (xy 77.599508 119.589682) + (xy 77.68199 119.789303) (xy 78.07463 120.182629) (xy 78.282512 120.268949) (xy 78.076697 120.35399) (xy 77.683371 120.74663) + (xy 77.59705 120.954512) (xy 77.51201 120.748697) (xy 77.11937 120.355371) (xy 76.927272 120.275605) (xy 77.058143 120.221397) + (xy 77.127608 119.979213) (xy 76.327 119.178605) (xy 76.147395 119.35821) (xy 76.147395 118.999) (xy 75.346787 118.198392) + (xy 75.104603 118.267857) (xy 74.917856 118.791302) (xy 74.945638 119.346368) (xy 75.104603 119.730143) (xy 75.346787 119.799608) + (xy 76.147395 118.999) (xy 76.147395 119.35821) (xy 75.526392 119.979213) (xy 75.595857 120.221397) (xy 75.736317 120.271508) + (xy 75.536697 120.35399) (xy 75.143371 120.74663) (xy 74.930243 121.2599) (xy 74.929758 121.815661) (xy 75.14199 122.329303) + (xy 75.53463 122.722629) (xy 75.742512 122.808949) (xy 75.536697 122.89399) (xy 75.143371 123.28663) (xy 74.930243 123.7999) + (xy 74.929758 124.355661) (xy 75.14199 124.869303) (xy 75.53463 125.262629) (xy 75.742512 125.348949) (xy 75.536697 125.43399) + (xy 75.143371 125.82663) (xy 74.930243 126.3399) (xy 74.929758 126.895661) (xy 75.14199 127.409303) (xy 75.53463 127.802629) + (xy 75.742512 127.888949) (xy 75.536697 127.97399) (xy 75.143371 128.36663) (xy 74.930243 128.8799) (xy 74.929758 129.435661) + (xy 75.14199 129.949303) (xy 75.53463 130.342629) (xy 75.742512 130.428949) (xy 75.536697 130.51399) (xy 75.143371 130.90663) + (xy 74.930243 131.4199) (xy 74.929758 131.975661) (xy 75.14199 132.489303) (xy 75.53463 132.882629) (xy 75.726727 132.962394) + (xy 75.595857 133.016603) (xy 75.526392 133.258787) (xy 76.327 134.059395) (xy 77.127608 133.258787) (xy 77.058143 133.016603) + (xy 76.917682 132.966491) (xy 77.117303 132.88401) (xy 77.510629 132.49137) (xy 77.596949 132.283487) (xy 77.68199 132.489303) + (xy 78.07463 132.882629) (xy 78.282512 132.968949) (xy 78.076697 133.05399) (xy 77.683371 133.44663) (xy 77.603605 133.638727) + (xy 77.549397 133.507857) (xy 77.307213 133.438392) (xy 76.506605 134.239) (xy 77.307213 135.039608) (xy 77.549397 134.970143) + (xy 77.599508 134.829682) (xy 77.68199 135.029303) (xy 78.07463 135.422629) (xy 78.282512 135.508949) (xy 78.076697 135.59399) + (xy 77.683371 135.98663) (xy 77.59705 136.194512) (xy 77.51201 135.988697) (xy 77.11937 135.595371) (xy 76.927272 135.515605) + (xy 77.058143 135.461397) (xy 77.127608 135.219213) (xy 76.327 134.418605) (xy 76.147395 134.59821) (xy 76.147395 134.239) + (xy 75.346787 133.438392) (xy 75.104603 133.507857) (xy 74.917856 134.031302) (xy 74.945638 134.586368) (xy 75.104603 134.970143) + (xy 75.346787 135.039608) (xy 76.147395 134.239) (xy 76.147395 134.59821) (xy 75.526392 135.219213) (xy 75.595857 135.461397) + (xy 75.736317 135.511508) (xy 75.536697 135.59399) (xy 75.143371 135.98663) (xy 74.930243 136.4999) (xy 74.929758 137.055661) + (xy 75.14199 137.569303) (xy 75.53463 137.962629) (xy 76.0479 138.175757) (xy 76.603661 138.176242) (xy 77.117303 137.96401) + (xy 77.510629 137.57137) (xy 77.596949 137.363487) (xy 77.68199 137.569303) (xy 78.07463 137.962629) (xy 78.5879 138.175757) + (xy 79.143661 138.176242) (xy 79.657303 137.96401) (xy 80.050629 137.57137) (xy 80.263757 137.0581) (xy 80.264242 136.502339) + (xy 80.05201 135.988697) (xy 79.65937 135.595371) (xy 79.451487 135.50905) (xy 79.657303 135.42401) (xy 80.050629 135.03137) + (xy 80.263757 134.5181) (xy 80.264242 133.962339) (xy 80.05201 133.448697) (xy 79.65937 133.055371) (xy 79.451487 132.96905) + (xy 79.657303 132.88401) (xy 80.050629 132.49137) (xy 80.263757 131.9781) (xy 80.264242 131.422339) (xy 80.05201 130.908697) + (xy 79.65937 130.515371) (xy 79.467272 130.435605) (xy 79.598143 130.381397) (xy 79.667608 130.139213) (xy 78.867 129.338605) + (xy 78.066392 130.139213) (xy 78.135857 130.381397) (xy 78.276317 130.431508) (xy 78.076697 130.51399) (xy 77.683371 130.90663) + (xy 77.59705 131.114512) (xy 77.51201 130.908697) (xy 77.11937 130.515371) (xy 76.911487 130.42905) (xy 77.117303 130.34401) + (xy 77.510629 129.95137) (xy 77.590394 129.759272) (xy 77.644603 129.890143) (xy 77.886787 129.959608) (xy 78.687395 129.159) + (xy 78.673252 129.144857) (xy 78.852857 128.965252) (xy 78.867 128.979395) (xy 78.881142 128.965252) (xy 79.060747 129.144857) + (xy 79.046605 129.159) (xy 79.847213 129.959608) (xy 80.089397 129.890143) (xy 80.276144 129.366698) (xy 80.248362 128.811632) + (xy 80.159079 128.596084) (xy 80.174604 128.592996) (xy 80.174605 128.592996) (xy 80.421815 128.427815) (xy 82.326815 126.522815) + (xy 82.491996 126.275605) (xy 82.491996 126.275604) (xy 82.55 125.984) (xy 82.55 116.080646) (xy 82.699714 116.230622) + (xy 83.096332 116.395313) (xy 83.525784 116.395687) (xy 83.922689 116.231689) (xy 84.226622 115.928286) (xy 84.391313 115.531668) + (xy 84.391687 115.102216) (xy 84.227689 114.705311) (xy 83.924286 114.401378) (xy 83.527668 114.236687) (xy 83.098216 114.236313) + (xy 82.701311 114.400311) (xy 82.55 114.551358) (xy 82.55 111.94863) (xy 84.96102 109.537609) (xy 85.024633 109.537665) + (xy 85.374843 109.392961) (xy 85.478677 109.289307) (xy 85.725 109.53563) (xy 85.725 110.998) (xy 85.783004 111.289605) + (xy 85.948185 111.536815) (xy 86.5505 112.13913) (xy 86.550313 112.354784) (xy 86.714311 112.751689) (xy 87.017714 113.055622) + (xy 87.414332 113.220313) (xy 87.843784 113.220687) (xy 88.240689 113.056689) (xy 88.544622 112.753286) (xy 88.709313 112.356668) + (xy 88.709687 111.927216) (xy 88.709687 133.222833) (xy 88.623339 133.222758) (xy 88.109697 133.43499) (xy 87.716371 133.82763) + (xy 87.503243 134.3409) (xy 87.502758 134.896661) (xy 87.71499 135.410303) (xy 88.10763 135.803629) (xy 88.6209 136.016757) + (xy 89.176661 136.017242) (xy 89.690303 135.80501) (xy 90.043 135.452928) (xy 90.043 135.508309) (xy 90.139673 135.741698) + (xy 90.318301 135.920327) (xy 90.55169 136.017) (xy 90.804309 136.017) (xy 92.328309 136.017) (xy 92.561698 135.920327) + (xy 92.740327 135.741699) (xy 92.837 135.50831) (xy 92.837 146.47195) (xy 90.754405 146.48045) (xy 90.754405 141.132145) + (xy 90.723633 140.653156) (xy 90.599533 140.353552) (xy 90.377046 140.307559) (xy 90.197441 140.487164) (xy 90.197441 140.127954) + (xy 90.151448 139.905467) (xy 89.697145 139.750595) (xy 89.218156 139.781367) (xy 88.918552 139.905467) (xy 88.872559 140.127954) + (xy 89.535 140.790395) (xy 90.197441 140.127954) (xy 90.197441 140.487164) (xy 89.714605 140.97) (xy 90.377046 141.632441) + (xy 90.599533 141.586448) (xy 90.754405 141.132145) (xy 90.754405 146.48045) (xy 90.197441 146.482724) (xy 90.197441 141.812046) + (xy 89.535 141.149605) (xy 89.355395 141.32921) (xy 89.355395 140.97) (xy 88.692954 140.307559) (xy 88.470467 140.353552) + (xy 88.315595 140.807855) (xy 88.346367 141.286844) (xy 88.470467 141.586448) (xy 88.692954 141.632441) (xy 89.355395 140.97) + (xy 89.355395 141.32921) (xy 88.872559 141.812046) (xy 88.918552 142.034533) (xy 89.372855 142.189405) (xy 89.851844 142.158633) + (xy 90.151448 142.034533) (xy 90.197441 141.812046) (xy 90.197441 146.482724) (xy 87.312327 146.4945) (xy 86.296709 146.4945) + (xy 86.296709 118.887065) (xy 86.113418 118.443465) (xy 85.77432 118.103775) (xy 85.331041 117.91971) (xy 84.851065 117.919291) + (xy 84.407465 118.102582) (xy 84.067775 118.44168) (xy 83.88371 118.884959) (xy 83.883291 119.364935) (xy 84.066582 119.808535) + (xy 84.40568 120.148225) (xy 84.848959 120.33229) (xy 85.328935 120.332709) (xy 85.772535 120.149418) (xy 86.112225 119.81032) + (xy 86.29629 119.367041) (xy 86.296709 118.887065) (xy 86.296709 146.4945) (xy 84.645709 146.4945) (xy 84.645709 138.318065) + (xy 84.645709 134.000065) (xy 84.462418 133.556465) (xy 84.12332 133.216775) (xy 83.680041 133.03271) (xy 83.200065 133.032291) + (xy 82.756465 133.215582) (xy 82.416775 133.55468) (xy 82.23271 133.997959) (xy 82.232291 134.477935) (xy 82.415582 134.921535) + (xy 82.75468 135.261225) (xy 83.197959 135.44529) (xy 83.677935 135.445709) (xy 84.121535 135.262418) (xy 84.461225 134.92332) + (xy 84.64529 134.480041) (xy 84.645709 134.000065) (xy 84.645709 138.318065) (xy 84.462418 137.874465) (xy 84.12332 137.534775) + (xy 83.680041 137.35071) (xy 83.200065 137.350291) (xy 82.756465 137.533582) (xy 82.416775 137.87268) (xy 82.23271 138.315959) + (xy 82.232291 138.795935) (xy 82.415582 139.239535) (xy 82.75468 139.579225) (xy 83.197959 139.76329) (xy 83.677935 139.763709) + (xy 84.121535 139.580418) (xy 84.461225 139.24132) (xy 84.64529 138.798041) (xy 84.645709 138.318065) (xy 84.645709 146.4945) + (xy 71.9455 146.4945) (xy 71.9455 71.247) (xy 74.728266 71.247) (xy 74.40152 71.382343) (xy 74.269828 71.677223) + (xy 75.438 72.845395) (xy 76.606172 71.677223) (xy 76.47448 71.382343) (xy 76.121917 71.247) (xy 79.248 71.247) + (xy 79.248 75.057) (xy 97.282 75.057) (xy 97.282 65.82597) (xy 97.602113 65.693702) (xy 97.9297 65.366686) + (xy 97.9297 66.64325) (xy 98.08845 66.802) (xy 100.838 66.802) (xy 100.838 64.05245) (xy 100.67925 63.8937) + (xy 98.84989 63.8937) (xy 98.919772 63.725407) (xy 98.920355 63.057252) (xy 98.98067 62.996937) (xy 99.250221 63.409257) + (xy 100.366642 63.869369) (xy 101.574157 63.867221) (xy 102.679779 63.409257) (xy 102.94933 62.996936) (xy 100.965 61.012605) + (xy 100.950857 61.026747) (xy 100.771252 60.847142) (xy 100.785395 60.833) (xy 98.801064 58.84867) (xy 98.388743 59.118221) + (xy 97.928631 60.234642) (xy 97.929763 60.871021) (xy 97.606604 60.547298) (xy 97.282 60.41251) (xy 97.282 56.7055) + (xy 227.203 56.7055) (xy 227.203 145.923517) + ) + ) + ) + (zone (net 103) (net_name GND) (layer Cuivre) (tstamp 53CD1A96) (hatch edge 0.508) + (connect_pads (clearance 0.381)) + (min_thickness 0.254) + (fill yes (arc_segments 16) (thermal_gap 0.381) (thermal_bridge_width 0.381)) + (polygon + (pts + (xy 71.7 56.3) (xy 228.2 56.3) (xy 228.2 146.7) (xy 71.7 146.7) (xy 71.7 146.4) + ) + ) + (filled_polygon + (pts + (xy 76.430945 111.393142) (xy 76.341142 111.482945) (xy 76.327 111.468803) (xy 76.312858 111.482945) (xy 76.223055 111.393142) + (xy 76.237197 111.379) (xy 76.223055 111.364858) (xy 76.312858 111.275055) (xy 76.327 111.289197) (xy 76.341141 111.275054) + (xy 76.430945 111.364858) (xy 76.416803 111.379) (xy 76.430945 111.393142) + ) + ) + (filled_polygon + (pts + (xy 76.430945 119.013142) (xy 76.341142 119.102945) (xy 76.327 119.088803) (xy 76.312857 119.102944) (xy 76.223054 119.013141) + (xy 76.237197 118.999) (xy 76.223055 118.984858) (xy 76.312858 118.895055) (xy 76.327 118.909197) (xy 76.341141 118.895054) + (xy 76.430945 118.984858) (xy 76.416803 118.999) (xy 76.430945 119.013142) + ) + ) + (filled_polygon + (pts + (xy 78.615487 107.56878) (xy 78.148542 107.761718) (xy 77.790974 108.118663) (xy 77.597221 108.585273) (xy 77.597004 108.833262) + (xy 77.594466 108.573962) (xy 77.410645 108.130177) (xy 77.196496 108.059307) (xy 76.416803 108.839) (xy 77.196496 109.618693) + (xy 77.410645 109.547823) (xy 77.596784 109.085697) (xy 77.59678 109.09051) (xy 77.789718 109.557458) (xy 77.848422 109.616264) + (xy 77.782987 109.659987) (xy 77.147987 110.294987) (xy 77.072893 110.407371) (xy 77.035823 110.295355) (xy 76.567468 110.106706) + (xy 76.592038 110.106466) (xy 77.035823 109.922645) (xy 77.106693 109.708496) (xy 76.327 108.928803) (xy 76.312858 108.942945) + (xy 76.223055 108.853142) (xy 76.237197 108.839) (xy 76.223055 108.824858) (xy 76.312858 108.735055) (xy 76.327 108.749197) + (xy 77.106693 107.969504) (xy 77.035823 107.755355) (xy 76.573162 107.569) (xy 77.190047 107.569) (xy 77.376758 107.491662) + (xy 77.519661 107.348759) (xy 77.597 107.162048) (xy 77.597 106.959953) (xy 77.597 106.551042) (xy 77.789718 107.017458) + (xy 78.146663 107.375026) (xy 78.613273 107.568779) (xy 78.615487 107.56878) + ) + ) + (filled_polygon + (pts + (xy 96.771136 113.03) (xy 95.503889 113.03) (xy 95.50422 112.65149) (xy 95.311282 112.184542) (xy 94.954337 111.826974) + (xy 94.487727 111.633221) (xy 93.98249 111.63278) (xy 93.515542 111.825718) (xy 93.157974 112.182663) (xy 92.964221 112.649273) + (xy 92.964 112.902204) (xy 92.964 112.839498) (xy 92.837002 112.839498) (xy 92.964 112.7125) (xy 92.964 112.242047) + (xy 92.964 112.039952) (xy 92.886661 111.853241) (xy 92.743758 111.710338) (xy 92.557047 111.633) (xy 91.8845 111.633) + (xy 91.7575 111.76) (xy 91.7575 112.8395) (xy 91.7775 112.8395) (xy 91.7775 112.9665) (xy 91.7575 112.9665) + (xy 91.7575 112.9865) (xy 91.6305 112.9865) (xy 91.6305 112.9665) (xy 91.6305 112.8395) (xy 91.6305 111.76) + (xy 91.5035 111.633) (xy 90.830953 111.633) (xy 90.644242 111.710338) (xy 90.501339 111.853241) (xy 90.424 112.039952) + (xy 90.424 112.242047) (xy 90.424 112.7125) (xy 90.551 112.8395) (xy 91.6305 112.8395) (xy 91.6305 112.9665) + (xy 90.551 112.9665) (xy 90.424 113.0935) (xy 90.424 113.563953) (xy 90.424 113.766048) (xy 90.501339 113.952759) + (xy 90.59458 114.046) (xy 90.433025 114.046) (xy 88.582453 112.195427) (xy 88.582665 111.952367) (xy 88.437961 111.602157) + (xy 88.215194 111.379) (xy 96.644353 111.379) (xy 96.494378 111.528714) (xy 96.329687 111.925332) (xy 96.329313 112.354784) + (xy 96.493311 112.751689) (xy 96.771136 113.03) + ) + ) + (filled_polygon + (pts + (xy 109.884074 114.4651) (xy 108.997575 114.4651) (xy 109.029313 114.388668) (xy 109.029687 113.959216) (xy 108.865689 113.562311) + (xy 108.562286 113.258378) (xy 108.165668 113.093687) (xy 107.736216 113.093313) (xy 107.339311 113.257311) (xy 107.035378 113.560714) + (xy 106.870687 113.957332) (xy 106.870313 114.386784) (xy 106.902672 114.4651) (xy 106.045 114.4651) (xy 105.767975 114.520204) + (xy 105.533125 114.677125) (xy 105.533122 114.677128) (xy 104.47515 115.7351) (xy 101.76594 115.7351) (xy 101.89902 115.602253) + (xy 102.044335 115.252295) (xy 102.044665 114.873367) (xy 101.899961 114.523157) (xy 101.632253 114.25498) (xy 101.282295 114.109665) + (xy 101.052321 114.109464) (xy 101.448689 113.945689) (xy 101.752622 113.642286) (xy 101.917313 113.245668) (xy 101.917687 112.816216) + (xy 101.753689 112.419311) (xy 101.450286 112.115378) (xy 101.206141 112.014) (xy 107.432974 112.014) (xy 109.884074 114.4651) + ) + ) + (filled_polygon + (pts + (xy 112.6055 93.4085) (xy 112.5855 93.4085) (xy 112.5855 93.4285) (xy 112.4585 93.4285) (xy 112.4585 93.4085) + (xy 111.379 93.4085) (xy 111.252 93.5355) (xy 111.252 94.005953) (xy 111.252 94.120542) (xy 111.183987 94.165987) + (xy 110.617 94.732974) (xy 110.617 93.735026) (xy 111.252 93.100026) (xy 111.252 93.1545) (xy 111.379 93.2815) + (xy 112.4585 93.2815) (xy 112.4585 93.2615) (xy 112.5855 93.2615) (xy 112.5855 93.2815) (xy 112.6055 93.2815) + (xy 112.6055 93.4085) + ) + ) + (filled_polygon + (pts + (xy 112.6055 95.9485) (xy 112.5855 95.9485) (xy 112.5855 95.9685) (xy 112.4585 95.9685) (xy 112.4585 95.9485) + (xy 112.4385 95.9485) (xy 112.4385 95.8215) (xy 112.4585 95.8215) (xy 112.4585 95.8015) (xy 112.5855 95.8015) + (xy 112.5855 95.8215) (xy 112.6055 95.8215) (xy 112.6055 95.9485) + ) + ) + (filled_polygon + (pts + (xy 112.6055 98.4885) (xy 112.5855 98.4885) (xy 112.5855 98.5085) (xy 112.4585 98.5085) (xy 112.4585 98.4885) + (xy 112.4385 98.4885) (xy 112.4385 98.3615) (xy 112.4585 98.3615) (xy 112.4585 98.3415) (xy 112.5855 98.3415) + (xy 112.5855 98.3615) (xy 112.6055 98.3615) (xy 112.6055 98.4885) + ) + ) + (filled_polygon + (pts + (xy 113.283464 77.343) (xy 112.420953 77.343) (xy 112.234242 77.420338) (xy 112.091339 77.563241) (xy 112.014 77.749952) + (xy 112.014 77.749953) (xy 111.936662 77.563242) (xy 111.793759 77.420339) (xy 111.607048 77.343) (xy 111.404953 77.343) + (xy 110.996042 77.343) (xy 111.462458 77.150282) (xy 111.820026 76.793337) (xy 112.013779 76.326727) (xy 112.01378 76.324512) + (xy 112.206718 76.791458) (xy 112.563663 77.149026) (xy 113.030273 77.342779) (xy 113.283464 77.343) + ) + ) + (filled_polygon + (pts + (xy 127.498974 99.695) (xy 118.754026 99.695) (xy 120.659025 97.79) (xy 120.774131 97.79) (xy 120.751378 97.812714) + (xy 120.586687 98.209332) (xy 120.586313 98.638784) (xy 120.750311 99.035689) (xy 121.053714 99.339622) (xy 121.450332 99.504313) + (xy 121.879784 99.504687) (xy 122.276689 99.340689) (xy 122.580622 99.037286) (xy 122.745313 98.640668) (xy 122.745687 98.211216) + (xy 122.581689 97.814311) (xy 122.55742 97.79) (xy 125.593974 97.79) (xy 127.498974 99.695) + ) + ) + (filled_polygon + (pts + (xy 130.873609 102.743) (xy 130.873388 102.997) (xy 122.936 102.997) (xy 122.692996 103.045336) (xy 122.486987 103.182987) + (xy 122.418974 103.251) (xy 120.786026 103.251) (xy 120.337013 102.801987) (xy 120.131004 102.664336) (xy 119.888 102.616) + (xy 117.357026 102.616) (xy 118.500026 101.473) (xy 127.117974 101.473) (xy 128.201987 102.557013) (xy 128.407996 102.694664) + (xy 128.651 102.743) (xy 130.873609 102.743) + ) + ) + (filled_polygon + (pts + (xy 133.975974 92.71) (xy 133.340974 93.345) (xy 132.588 93.345) (xy 132.344996 93.393336) (xy 132.138987 93.530987) + (xy 131.376987 94.292987) (xy 131.248381 94.485458) (xy 131.101923 94.424643) (xy 130.773518 94.424357) (xy 130.492182 94.540602) + (xy 130.489524 94.539498) (xy 128.596526 92.6465) (xy 128.778 92.6465) (xy 128.905 92.5195) (xy 128.905 91.5035) + (xy 128.905 91.3765) (xy 128.905 90.3605) (xy 128.778 90.2335) (xy 128.422953 90.2335) (xy 128.236242 90.310838) + (xy 128.093339 90.453741) (xy 128.016 90.640452) (xy 128.016 90.842547) (xy 128.016 91.2495) (xy 128.143 91.3765) + (xy 128.905 91.3765) (xy 128.905 91.5035) (xy 128.143 91.5035) (xy 128.016 91.6305) (xy 128.016 92.037453) + (xy 128.016 92.065974) (xy 126.687013 90.736987) (xy 126.481004 90.599336) (xy 126.238 90.551) (xy 123.756412 90.551) + (xy 123.888335 90.233295) (xy 123.888665 89.854367) (xy 123.861655 89.789) (xy 126.873 89.789) (xy 127.116004 89.740664) + (xy 127.322013 89.603013) (xy 127.771026 89.154) (xy 130.172353 89.154) (xy 130.022378 89.303714) (xy 129.857687 89.700332) + (xy 129.857313 90.129784) (xy 129.994749 90.462406) (xy 129.921 90.640452) (xy 129.843661 90.453741) (xy 129.700758 90.310838) + (xy 129.514047 90.2335) (xy 129.159 90.2335) (xy 129.032 90.3605) (xy 129.032 91.3765) (xy 129.052 91.3765) + (xy 129.052 91.5035) (xy 129.032 91.5035) (xy 129.032 92.5195) (xy 129.159 92.6465) (xy 129.514047 92.6465) + (xy 129.700758 92.569162) (xy 129.843661 92.426259) (xy 129.921 92.239548) (xy 129.998338 92.426258) (xy 130.141241 92.569161) + (xy 130.327952 92.6465) (xy 130.530047 92.6465) (xy 131.419047 92.6465) (xy 131.605758 92.569162) (xy 131.723387 92.451532) + (xy 131.760767 92.541998) (xy 131.992781 92.774417) (xy 132.296077 92.900357) (xy 132.624482 92.900643) (xy 132.927998 92.775233) + (xy 132.993344 92.71) (xy 133.975974 92.71) + ) + ) + (filled_polygon + (pts + (xy 135.924612 89.999361) (xy 134.483974 91.44) (xy 132.993523 91.44) (xy 132.929219 91.375583) (xy 132.905454 91.365715) + (xy 132.905643 91.149518) (xy 132.780233 90.846002) (xy 132.715 90.780655) (xy 132.715 89.535) (xy 132.666664 89.291996) + (xy 132.529013 89.085987) (xy 131.962026 88.519) (xy 134.810609 88.519) (xy 134.810357 88.809482) (xy 134.935767 89.112998) + (xy 135.007047 89.184402) (xy 135.020855 89.253823) (xy 135.033586 89.354805) (xy 135.044884 89.374626) (xy 135.049336 89.397004) + (xy 135.105878 89.481626) (xy 135.156286 89.570054) (xy 135.174312 89.584044) (xy 135.186987 89.603013) (xy 135.271611 89.659557) + (xy 135.352019 89.721961) (xy 135.860019 89.975961) (xy 135.882023 89.981987) (xy 135.900996 89.994664) (xy 135.924612 89.999361) + ) + ) + (filled_polygon + (pts + (xy 146.496096 108.902446) (xy 146.146157 109.047039) (xy 145.972892 109.22) (xy 143.637 109.22) (xy 143.393996 109.268336) + (xy 143.187987 109.405987) (xy 141.468974 111.125) (xy 135.916368 111.125) (xy 135.953357 111.035923) (xy 135.953643 110.707518) + (xy 135.828233 110.404002) (xy 135.787302 110.363) (xy 136.779 110.363) (xy 137.022004 110.314664) (xy 137.228013 110.177013) + (xy 139.137462 108.267563) (xy 139.228482 108.267643) (xy 139.531998 108.142233) (xy 139.764417 107.910219) (xy 139.880246 107.631272) + (xy 140.520987 108.272013) (xy 140.726996 108.409664) (xy 140.97 108.458001) (xy 140.97 108.458) (xy 140.970005 108.458) + (xy 144.292267 108.458) (xy 144.409996 108.536664) (xy 144.653 108.585) (xy 145.846027 108.585) (xy 146.017747 108.75702) + (xy 146.367705 108.902335) (xy 146.496096 108.902446) + ) + ) + (filled_polygon + (pts + (xy 149.748819 89.281) (xy 140.852026 89.281) (xy 141.360026 88.773) (xy 149.596974 88.773) (xy 149.669546 88.845572) + (xy 149.669335 89.088633) (xy 149.748819 89.281) + ) + ) + (filled_polygon + (pts + (xy 168.632945 87.263142) (xy 168.543142 87.352945) (xy 168.529 87.338803) (xy 168.514858 87.352945) (xy 168.425055 87.263142) + (xy 168.439197 87.249) (xy 168.425055 87.234858) (xy 168.514857 87.145055) (xy 168.529 87.159197) (xy 168.543142 87.145055) + (xy 168.632945 87.234858) (xy 168.618803 87.249) (xy 168.632945 87.263142) + ) + ) + (filled_polygon + (pts + (xy 177.519758 88.138) (xy 176.862965 88.138) (xy 176.882841 88.072644) (xy 176.149 87.338803) (xy 176.134857 87.352944) + (xy 176.045054 87.263141) (xy 176.059197 87.249) (xy 176.045055 87.234858) (xy 176.134858 87.145054) (xy 176.149 87.159197) + (xy 176.163141 87.145054) (xy 176.252944 87.234857) (xy 176.238803 87.249) (xy 176.972644 87.982841) (xy 177.180199 87.91972) + (xy 177.32857 87.548596) (xy 177.4825 87.702526) (xy 177.4825 87.757) (xy 177.482609 87.75755) (xy 177.482357 88.047482) + (xy 177.519758 88.138) + ) + ) + (filled_polygon + (pts + (xy 227.9015 146.573) (xy 226.062412 146.573) (xy 226.062412 137.400174) (xy 226.062412 89.140174) (xy 226.057466 88.634962) + (xy 225.873645 88.191177) (xy 225.659496 88.120307) (xy 225.569693 88.21011) (xy 225.569693 88.030504) (xy 225.498823 87.816355) + (xy 225.030174 87.627588) (xy 224.792412 87.629915) (xy 224.792412 66.280174) (xy 224.79 66.033798) (xy 224.79 64.363048) + (xy 224.79 64.160953) (xy 224.79 62.636953) (xy 224.712662 62.450242) (xy 224.569759 62.307339) (xy 224.383048 62.23) + (xy 224.180953 62.23) (xy 222.656953 62.23) (xy 222.470242 62.307338) (xy 222.327339 62.450241) (xy 222.25 62.636952) + (xy 222.25 62.839047) (xy 222.25 64.363047) (xy 222.327338 64.549758) (xy 222.470241 64.692661) (xy 222.656952 64.77) + (xy 222.859047 64.77) (xy 223.513798 64.77) (xy 223.254962 64.772534) (xy 222.811177 64.956355) (xy 222.740307 65.170504) + (xy 223.52 65.950197) (xy 224.299693 65.170504) (xy 224.228823 64.956355) (xy 223.766162 64.77) (xy 224.383047 64.77) + (xy 224.569758 64.692662) (xy 224.712661 64.549759) (xy 224.79 64.363048) (xy 224.79 66.033798) (xy 224.787466 65.774962) + (xy 224.603645 65.331177) (xy 224.389496 65.260307) (xy 223.609803 66.04) (xy 224.389496 66.819693) (xy 224.603645 66.748823) + (xy 224.792412 66.280174) (xy 224.792412 87.629915) (xy 224.79022 87.629937) (xy 224.79022 75.94849) (xy 224.597282 75.481542) + (xy 224.240337 75.123974) (xy 223.773727 74.930221) (xy 223.771512 74.930219) (xy 224.238458 74.737282) (xy 224.596026 74.380337) + (xy 224.789779 73.913727) (xy 224.79022 73.40849) (xy 224.597282 72.941542) (xy 224.240337 72.583974) (xy 223.773727 72.390221) + (xy 223.771512 72.390219) (xy 224.238458 72.197282) (xy 224.596026 71.840337) (xy 224.789779 71.373727) (xy 224.79022 70.86849) + (xy 224.597282 70.401542) (xy 224.240337 70.043974) (xy 223.773727 69.850221) (xy 223.771512 69.850219) (xy 224.238458 69.657282) + (xy 224.596026 69.300337) (xy 224.789779 68.833727) (xy 224.79022 68.32849) (xy 224.597282 67.861542) (xy 224.240337 67.503974) + (xy 223.773727 67.310221) (xy 223.525737 67.310004) (xy 223.785038 67.307466) (xy 224.228823 67.123645) (xy 224.299693 66.909496) + (xy 223.52 66.129803) (xy 223.430197 66.219606) (xy 223.430197 66.04) (xy 222.650504 65.260307) (xy 222.436355 65.331177) + (xy 222.247588 65.799826) (xy 222.252534 66.305038) (xy 222.436355 66.748823) (xy 222.650504 66.819693) (xy 223.430197 66.04) + (xy 223.430197 66.219606) (xy 222.740307 66.909496) (xy 222.811177 67.123645) (xy 223.273302 67.309784) (xy 223.26849 67.30978) + (xy 222.801542 67.502718) (xy 222.443974 67.859663) (xy 222.250221 68.326273) (xy 222.24978 68.83151) (xy 222.442718 69.298458) + (xy 222.799663 69.656026) (xy 223.266273 69.849779) (xy 223.268487 69.84978) (xy 222.801542 70.042718) (xy 222.443974 70.399663) + (xy 222.250221 70.866273) (xy 222.24978 71.37151) (xy 222.442718 71.838458) (xy 222.799663 72.196026) (xy 223.266273 72.389779) + (xy 223.268487 72.38978) (xy 222.801542 72.582718) (xy 222.443974 72.939663) (xy 222.250221 73.406273) (xy 222.24978 73.91151) + (xy 222.285065 73.996908) (xy 219.519687 76.762286) (xy 219.519687 64.888956) (xy 219.355689 64.492051) (xy 219.052286 64.188118) + (xy 218.655668 64.023427) (xy 218.226216 64.023053) (xy 217.829311 64.187051) (xy 217.525378 64.490454) (xy 217.360687 64.887072) + (xy 217.360313 65.316524) (xy 217.524311 65.713429) (xy 217.827714 66.017362) (xy 218.224332 66.182053) (xy 218.653784 66.182427) + (xy 219.050689 66.018429) (xy 219.354622 65.715026) (xy 219.519313 65.318408) (xy 219.519687 64.888956) (xy 219.519687 76.762286) + (xy 206.613925 89.668048) (xy 206.613925 78.551367) (xy 206.469221 78.201157) (xy 206.201513 77.93298) (xy 205.851555 77.787665) + (xy 205.472627 77.787335) (xy 205.122417 77.932039) (xy 204.85424 78.199747) (xy 204.708925 78.549705) (xy 204.708711 78.794522) + (xy 204.343417 79.159816) (xy 204.343417 65.56213) (xy 203.976834 64.674931) (xy 203.298639 63.995551) (xy 202.412081 63.62742) + (xy 201.45213 63.626583) (xy 200.564931 63.993166) (xy 199.885551 64.671361) (xy 199.51742 65.557919) (xy 199.516583 66.51787) + (xy 199.883166 67.405069) (xy 200.561361 68.084449) (xy 201.447919 68.45258) (xy 202.40787 68.453417) (xy 203.295069 68.086834) + (xy 203.974449 67.408639) (xy 204.34258 66.522081) (xy 204.343417 65.56213) (xy 204.343417 79.159816) (xy 202.369987 81.133247) + (xy 202.311001 81.221525) (xy 202.311001 77.978) (xy 202.311 77.977994) (xy 202.311 73.533) (xy 202.262664 73.289996) + (xy 202.262664 73.289995) (xy 202.207528 73.207479) (xy 202.125013 73.083987) (xy 202.125009 73.083984) (xy 201.617013 72.575987) + (xy 201.411004 72.438336) (xy 201.168 72.39) (xy 196.723005 72.39) (xy 196.723 72.389999) (xy 196.479996 72.438336) + (xy 196.273987 72.575987) (xy 196.273984 72.57599) (xy 195.963412 72.886562) (xy 195.963412 68.820174) (xy 195.958466 68.314962) + (xy 195.774645 67.871177) (xy 195.560496 67.800307) (xy 195.470693 67.89011) (xy 195.470693 67.710504) (xy 195.399823 67.496355) + (xy 194.931174 67.307588) (xy 194.56422 67.31118) (xy 194.56422 65.78849) (xy 194.371282 65.321542) (xy 194.014337 64.963974) + (xy 193.547727 64.770221) (xy 193.04249 64.76978) (xy 192.575542 64.962718) (xy 192.503456 65.034677) (xy 192.408875 64.893126) + (xy 192.408875 64.893125) (xy 192.408871 64.893122) (xy 191.519875 64.004125) (xy 191.285025 63.847204) (xy 191.239062 63.838061) + (xy 191.008 63.792099) (xy 191.007994 63.7921) (xy 186.69 63.7921) (xy 186.412975 63.847204) (xy 186.178125 64.004125) + (xy 186.178122 64.004128) (xy 185.377025 64.805224) (xy 185.292727 64.770221) (xy 184.78749 64.76978) (xy 184.320542 64.962718) + (xy 183.962974 65.319663) (xy 183.769221 65.786273) (xy 183.76878 66.29151) (xy 183.961718 66.758458) (xy 184.318663 67.116026) + (xy 184.785273 67.309779) (xy 185.29051 67.31022) (xy 185.757458 67.117282) (xy 186.115026 66.760337) (xy 186.308779 66.293727) + (xy 186.309104 65.920644) (xy 186.64825 65.581498) (xy 186.563221 65.786273) (xy 186.56278 66.29151) (xy 186.755718 66.758458) + (xy 187.112663 67.116026) (xy 187.579273 67.309779) (xy 188.08451 67.31022) (xy 188.551458 67.117282) (xy 188.909026 66.760337) + (xy 189.102779 66.293727) (xy 189.10322 65.78849) (xy 188.910282 65.321542) (xy 188.828782 65.2399) (xy 189.503876 65.2399) + (xy 189.423974 65.319663) (xy 189.230221 65.786273) (xy 189.22978 66.29151) (xy 189.422718 66.758458) (xy 189.779663 67.116026) + (xy 190.246273 67.309779) (xy 190.75151 67.31022) (xy 191.1731 67.136023) (xy 191.1731 67.50815) (xy 190.820974 67.859663) + (xy 190.627221 68.326273) (xy 190.62678 68.83151) (xy 190.819718 69.298458) (xy 191.176663 69.656026) (xy 191.643273 69.849779) + (xy 192.14851 69.85022) (xy 192.615458 69.657282) (xy 192.973026 69.300337) (xy 193.166779 68.833727) (xy 193.16722 68.32849) + (xy 192.974282 67.861542) (xy 192.6209 67.507543) (xy 192.6209 67.13564) (xy 193.040273 67.309779) (xy 193.54551 67.31022) + (xy 194.012458 67.117282) (xy 194.370026 66.760337) (xy 194.563779 66.293727) (xy 194.56422 65.78849) (xy 194.56422 67.31118) + (xy 194.425962 67.312534) (xy 193.982177 67.496355) (xy 193.911307 67.710504) (xy 194.691 68.490197) (xy 195.470693 67.710504) + (xy 195.470693 67.89011) (xy 194.780803 68.58) (xy 195.560496 69.359693) (xy 195.774645 69.288823) (xy 195.963412 68.820174) + (xy 195.963412 72.886562) (xy 195.470693 73.379281) (xy 195.470693 69.449496) (xy 194.691 68.669803) (xy 194.601197 68.759606) + (xy 194.601197 68.58) (xy 193.821504 67.800307) (xy 193.607355 67.871177) (xy 193.418588 68.339826) (xy 193.423534 68.845038) + (xy 193.607355 69.288823) (xy 193.821504 69.359693) (xy 194.601197 68.58) (xy 194.601197 68.759606) (xy 193.911307 69.449496) + (xy 193.982177 69.663645) (xy 194.450826 69.852412) (xy 194.956038 69.847466) (xy 195.399823 69.663645) (xy 195.470693 69.449496) + (xy 195.470693 73.379281) (xy 192.087687 76.762287) (xy 192.087687 72.811216) (xy 191.923689 72.414311) (xy 191.620286 72.110378) + (xy 191.223668 71.945687) (xy 190.794216 71.945313) (xy 190.397311 72.109311) (xy 190.37322 72.133359) (xy 190.37322 68.32849) + (xy 190.180282 67.861542) (xy 189.823337 67.503974) (xy 189.356727 67.310221) (xy 188.85149 67.30978) (xy 188.384542 67.502718) + (xy 188.026974 67.859663) (xy 187.833221 68.326273) (xy 187.83278 68.83151) (xy 188.025718 69.298458) (xy 188.382663 69.656026) + (xy 188.849273 69.849779) (xy 189.35451 69.85022) (xy 189.821458 69.657282) (xy 190.179026 69.300337) (xy 190.372779 68.833727) + (xy 190.37322 68.32849) (xy 190.37322 72.133359) (xy 190.093378 72.412714) (xy 189.928687 72.809332) (xy 189.928313 73.238784) + (xy 190.092311 73.635689) (xy 190.395714 73.939622) (xy 190.792332 74.104313) (xy 191.221784 74.104687) (xy 191.618689 73.940689) + (xy 191.922622 73.637286) (xy 192.087313 73.240668) (xy 192.087687 72.811216) (xy 192.087687 76.762287) (xy 187.70622 81.143754) + (xy 187.70622 68.32849) (xy 187.513282 67.861542) (xy 187.156337 67.503974) (xy 186.689727 67.310221) (xy 186.18449 67.30978) + (xy 185.717542 67.502718) (xy 185.359974 67.859663) (xy 185.166221 68.326273) (xy 185.16578 68.83151) (xy 185.358718 69.298458) + (xy 185.715663 69.656026) (xy 186.182273 69.849779) (xy 186.68751 69.85022) (xy 187.154458 69.657282) (xy 187.512026 69.300337) + (xy 187.705779 68.833727) (xy 187.70622 68.32849) (xy 187.70622 81.143754) (xy 187.134665 81.715309) (xy 187.134665 70.931367) + (xy 186.989961 70.581157) (xy 186.722253 70.31298) (xy 186.372295 70.167665) (xy 185.993367 70.167335) (xy 185.643157 70.312039) + (xy 185.37498 70.579747) (xy 185.229665 70.929705) (xy 185.229335 71.308633) (xy 185.374039 71.658843) (xy 185.641747 71.92702) + (xy 185.991705 72.072335) (xy 186.370633 72.072665) (xy 186.720843 71.927961) (xy 186.98902 71.660253) (xy 187.134335 71.310295) + (xy 187.134665 70.931367) (xy 187.134665 81.715309) (xy 187.007643 81.842331) (xy 187.007643 74.512518) (xy 186.882233 74.209002) + (xy 186.650219 73.976583) (xy 186.346923 73.850643) (xy 186.018518 73.850357) (xy 185.715002 73.975767) (xy 185.482583 74.207781) + (xy 185.356643 74.511077) (xy 185.356357 74.839482) (xy 185.481767 75.142998) (xy 185.713781 75.375417) (xy 186.017077 75.501357) + (xy 186.345482 75.501643) (xy 186.648998 75.376233) (xy 186.881417 75.144219) (xy 187.007357 74.840923) (xy 187.007643 74.512518) + (xy 187.007643 81.842331) (xy 185.537974 83.312) (xy 184.912 83.312) (xy 184.912 69.443048) (xy 184.912 69.240953) + (xy 184.912 67.716953) (xy 184.834662 67.530242) (xy 184.691759 67.387339) (xy 184.505048 67.31) (xy 184.302953 67.31) + (xy 182.778953 67.31) (xy 182.592242 67.387338) (xy 182.449339 67.530241) (xy 182.372 67.716952) (xy 182.372 67.919047) + (xy 182.372 69.443047) (xy 182.449338 69.629758) (xy 182.592241 69.772661) (xy 182.778952 69.85) (xy 182.981047 69.85) + (xy 184.505047 69.85) (xy 184.691758 69.772662) (xy 184.834661 69.629759) (xy 184.912 69.443048) (xy 184.912 83.312) + (xy 179.460026 83.312) (xy 178.943417 82.795391) (xy 178.943417 65.56213) (xy 178.576834 64.674931) (xy 177.898639 63.995551) + (xy 177.012081 63.62742) (xy 176.05213 63.626583) (xy 175.164931 63.993166) (xy 174.485551 64.671361) (xy 174.11742 65.557919) + (xy 174.116583 66.51787) (xy 174.483166 67.405069) (xy 175.161361 68.084449) (xy 176.047919 68.45258) (xy 177.00787 68.453417) + (xy 177.895069 68.086834) (xy 178.574449 67.408639) (xy 178.94258 66.522081) (xy 178.943417 65.56213) (xy 178.943417 82.795391) + (xy 178.503013 82.354987) (xy 178.297004 82.217336) (xy 178.054 82.169) (xy 173.736 82.169) (xy 173.492996 82.217336) + (xy 173.354877 82.309623) (xy 173.35522 81.91749) (xy 173.162282 81.450542) (xy 172.805337 81.092974) (xy 172.338727 80.899221) + (xy 172.336512 80.899219) (xy 172.803458 80.706282) (xy 173.161026 80.349337) (xy 173.354779 79.882727) (xy 173.35522 79.37749) + (xy 173.162282 78.910542) (xy 172.805337 78.552974) (xy 172.338727 78.359221) (xy 172.336512 78.359219) (xy 172.803458 78.166282) + (xy 173.161026 77.809337) (xy 173.354779 77.342727) (xy 173.35522 76.83749) (xy 173.162282 76.370542) (xy 172.805337 76.012974) + (xy 172.338727 75.819221) (xy 172.336512 75.819219) (xy 172.803458 75.626282) (xy 173.161026 75.269337) (xy 173.354779 74.802727) + (xy 173.35522 74.29749) (xy 173.162282 73.830542) (xy 172.805337 73.472974) (xy 172.338727 73.279221) (xy 171.83349 73.27878) + (xy 171.366542 73.471718) (xy 171.008974 73.828663) (xy 170.815417 74.2948) (xy 170.815417 65.56213) (xy 170.448834 64.674931) + (xy 169.770639 63.995551) (xy 168.884081 63.62742) (xy 167.92413 63.626583) (xy 167.036931 63.993166) (xy 166.357551 64.671361) + (xy 165.98942 65.557919) (xy 165.988583 66.51787) (xy 166.355166 67.405069) (xy 167.033361 68.084449) (xy 167.919919 68.45258) + (xy 168.87987 68.453417) (xy 169.767069 68.086834) (xy 170.446449 67.408639) (xy 170.81458 66.522081) (xy 170.815417 65.56213) + (xy 170.815417 74.2948) (xy 170.815221 74.295273) (xy 170.815 74.548464) (xy 170.815 73.685953) (xy 170.737662 73.499242) + (xy 170.594759 73.356339) (xy 170.408048 73.279) (xy 170.205953 73.279) (xy 168.681953 73.279) (xy 168.495242 73.356338) + (xy 168.352339 73.499241) (xy 168.275 73.685952) (xy 168.275 73.888047) (xy 168.275 75.412047) (xy 168.317155 75.513818) + (xy 165.671687 78.159286) (xy 165.671687 71.033216) (xy 165.507689 70.636311) (xy 165.204286 70.332378) (xy 164.807668 70.167687) + (xy 164.378216 70.167313) (xy 163.981311 70.331311) (xy 163.677378 70.634714) (xy 163.512687 71.031332) (xy 163.512313 71.460784) + (xy 163.676311 71.857689) (xy 163.979714 72.161622) (xy 164.376332 72.326313) (xy 164.805784 72.326687) (xy 165.202689 72.162689) + (xy 165.506622 71.859286) (xy 165.671313 71.462668) (xy 165.671687 71.033216) (xy 165.671687 78.159286) (xy 164.455974 79.375) + (xy 162.435412 79.375) (xy 162.435412 68.820174) (xy 162.430466 68.314962) (xy 162.246645 67.871177) (xy 162.032496 67.800307) + (xy 161.942693 67.89011) (xy 161.942693 67.710504) (xy 161.871823 67.496355) (xy 161.403174 67.307588) (xy 161.03622 67.31118) + (xy 161.03622 65.78849) (xy 160.843282 65.321542) (xy 160.486337 64.963974) (xy 160.019727 64.770221) (xy 159.51449 64.76978) + (xy 159.0675 64.954471) (xy 159.0675 64.897) (xy 159.01433 64.629696) (xy 158.862914 64.403086) (xy 158.227914 63.768086) + (xy 158.001305 63.61667) (xy 157.734 63.5635) (xy 150.876 63.5635) (xy 150.608695 63.61667) (xy 150.382086 63.768086) + (xy 149.493086 64.657086) (xy 149.34167 64.883695) (xy 149.2885 65.151) (xy 149.2885 67.31) (xy 149.250953 67.31) + (xy 149.064242 67.387338) (xy 148.921339 67.530241) (xy 148.844 67.716952) (xy 148.844 67.919047) (xy 148.844 69.443047) + (xy 148.921338 69.629758) (xy 149.064241 69.772661) (xy 149.250952 69.85) (xy 149.453047 69.85) (xy 150.977047 69.85) + (xy 151.163758 69.772662) (xy 151.306661 69.629759) (xy 151.384 69.443048) (xy 151.384 69.240953) (xy 151.384 67.716953) + (xy 151.306662 67.530242) (xy 151.163759 67.387339) (xy 150.977048 67.31) (xy 150.774953 67.31) (xy 150.6855 67.31) + (xy 150.6855 67.010679) (xy 150.790663 67.116026) (xy 151.257273 67.309779) (xy 151.76251 67.31022) (xy 152.229458 67.117282) + (xy 152.587026 66.760337) (xy 152.780779 66.293727) (xy 152.78122 65.78849) (xy 152.588282 65.321542) (xy 152.231337 64.963974) + (xy 152.22297 64.9605) (xy 153.591909 64.9605) (xy 153.586542 64.962718) (xy 153.228974 65.319663) (xy 153.035221 65.786273) + (xy 153.03478 66.29151) (xy 153.227718 66.758458) (xy 153.584663 67.116026) (xy 154.051273 67.309779) (xy 154.55651 67.31022) + (xy 155.023458 67.117282) (xy 155.381026 66.760337) (xy 155.574779 66.293727) (xy 155.57522 65.78849) (xy 155.382282 65.321542) + (xy 155.025337 64.963974) (xy 155.01697 64.9605) (xy 156.258909 64.9605) (xy 156.253542 64.962718) (xy 155.895974 65.319663) + (xy 155.702221 65.786273) (xy 155.70178 66.29151) (xy 155.894718 66.758458) (xy 156.251663 67.116026) (xy 156.718273 67.309779) + (xy 157.22351 67.31022) (xy 157.6705 67.125528) (xy 157.6705 67.494471) (xy 157.650542 67.502718) (xy 157.292974 67.859663) + (xy 157.099221 68.326273) (xy 157.09878 68.83151) (xy 157.291718 69.298458) (xy 157.648663 69.656026) (xy 158.115273 69.849779) + (xy 158.62051 69.85022) (xy 159.087458 69.657282) (xy 159.445026 69.300337) (xy 159.638779 68.833727) (xy 159.63922 68.32849) + (xy 159.446282 67.861542) (xy 159.089337 67.503974) (xy 159.0675 67.494906) (xy 159.0675 67.125093) (xy 159.512273 67.309779) + (xy 160.01751 67.31022) (xy 160.484458 67.117282) (xy 160.842026 66.760337) (xy 161.035779 66.293727) (xy 161.03622 65.78849) + (xy 161.03622 67.31118) (xy 160.897962 67.312534) (xy 160.454177 67.496355) (xy 160.383307 67.710504) (xy 161.163 68.490197) + (xy 161.942693 67.710504) (xy 161.942693 67.89011) (xy 161.252803 68.58) (xy 162.032496 69.359693) (xy 162.246645 69.288823) + (xy 162.435412 68.820174) (xy 162.435412 79.375) (xy 161.942693 79.375) (xy 161.942693 69.449496) (xy 161.163 68.669803) + (xy 161.073197 68.759606) (xy 161.073197 68.58) (xy 160.293504 67.800307) (xy 160.079355 67.871177) (xy 159.890588 68.339826) + (xy 159.895534 68.845038) (xy 160.079355 69.288823) (xy 160.293504 69.359693) (xy 161.073197 68.58) (xy 161.073197 68.759606) + (xy 160.383307 69.449496) (xy 160.454177 69.663645) (xy 160.922826 69.852412) (xy 161.428038 69.847466) (xy 161.871823 69.663645) + (xy 161.942693 69.449496) (xy 161.942693 79.375) (xy 159.067643 79.375) (xy 159.067643 74.512518) (xy 158.942233 74.209002) + (xy 158.9405 74.207265) (xy 158.9405 71.716134) (xy 158.941417 71.715219) (xy 159.067357 71.411923) (xy 159.067643 71.083518) + (xy 158.942233 70.780002) (xy 158.710219 70.547583) (xy 158.406923 70.421643) (xy 158.078518 70.421357) (xy 157.775002 70.546767) + (xy 157.542583 70.778781) (xy 157.416643 71.082077) (xy 157.416357 71.410482) (xy 157.541767 71.713998) (xy 157.5435 71.715734) + (xy 157.5435 74.206865) (xy 157.542583 74.207781) (xy 157.416643 74.511077) (xy 157.416357 74.839482) (xy 157.541767 75.142998) + (xy 157.773781 75.375417) (xy 158.077077 75.501357) (xy 158.405482 75.501643) (xy 158.708998 75.376233) (xy 158.941417 75.144219) + (xy 159.067357 74.840923) (xy 159.067643 74.512518) (xy 159.067643 79.375) (xy 156.84522 79.375) (xy 156.84522 68.32849) + (xy 156.652282 67.861542) (xy 156.295337 67.503974) (xy 155.828727 67.310221) (xy 155.32349 67.30978) (xy 154.856542 67.502718) + (xy 154.498974 67.859663) (xy 154.305221 68.326273) (xy 154.30478 68.83151) (xy 154.497718 69.298458) (xy 154.854663 69.656026) + (xy 155.321273 69.849779) (xy 155.82651 69.85022) (xy 156.293458 69.657282) (xy 156.651026 69.300337) (xy 156.844779 68.833727) + (xy 156.84522 68.32849) (xy 156.84522 79.375) (xy 154.17822 79.375) (xy 154.17822 68.32849) (xy 153.985282 67.861542) + (xy 153.628337 67.503974) (xy 153.161727 67.310221) (xy 152.65649 67.30978) (xy 152.189542 67.502718) (xy 151.831974 67.859663) + (xy 151.638221 68.326273) (xy 151.63778 68.83151) (xy 151.830718 69.298458) (xy 152.187663 69.656026) (xy 152.654273 69.849779) + (xy 153.15951 69.85022) (xy 153.626458 69.657282) (xy 153.984026 69.300337) (xy 154.177779 68.833727) (xy 154.17822 68.32849) + (xy 154.17822 79.375) (xy 152.654 79.375) (xy 152.410996 79.423336) (xy 152.204987 79.560987) (xy 149.410987 82.354987) + (xy 149.273336 82.560996) (xy 149.225 82.804) (xy 149.225 83.489027) (xy 149.05298 83.660747) (xy 148.960443 83.8836) + (xy 148.655367 83.883335) (xy 148.305157 84.028039) (xy 148.03698 84.295747) (xy 147.891665 84.645705) (xy 147.891388 84.963) + (xy 147.129687 84.963) (xy 147.129687 74.462216) (xy 146.965689 74.065311) (xy 146.662286 73.761378) (xy 146.265668 73.596687) + (xy 145.836216 73.596313) (xy 145.439311 73.760311) (xy 145.415417 73.784163) (xy 145.415417 65.56213) (xy 145.048834 64.674931) + (xy 144.370639 63.995551) (xy 143.484081 63.62742) (xy 142.52413 63.626583) (xy 141.636931 63.993166) (xy 140.957551 64.671361) + (xy 140.58942 65.557919) (xy 140.588583 66.51787) (xy 140.955166 67.405069) (xy 141.633361 68.084449) (xy 142.519919 68.45258) + (xy 143.47987 68.453417) (xy 144.367069 68.086834) (xy 145.046449 67.408639) (xy 145.41458 66.522081) (xy 145.415417 65.56213) + (xy 145.415417 73.784163) (xy 145.135378 74.063714) (xy 144.970687 74.460332) (xy 144.970313 74.889784) (xy 145.134311 75.286689) + (xy 145.437714 75.590622) (xy 145.834332 75.755313) (xy 146.263784 75.755687) (xy 146.660689 75.591689) (xy 146.964622 75.288286) + (xy 147.129313 74.891668) (xy 147.129687 74.462216) (xy 147.129687 84.963) (xy 143.900026 84.963) (xy 142.308013 83.370987) + (xy 142.102004 83.233336) (xy 141.859 83.185) (xy 139.082846 83.185) (xy 139.379026 82.889337) (xy 139.41446 82.804) + (xy 139.496027 82.804) (xy 139.667747 82.97602) (xy 140.017705 83.121335) (xy 140.396633 83.121665) (xy 140.746843 82.976961) + (xy 141.01502 82.709253) (xy 141.160335 82.359295) (xy 141.160665 81.980367) (xy 141.015961 81.630157) (xy 140.748253 81.36198) + (xy 140.398295 81.216665) (xy 140.019367 81.216335) (xy 139.669157 81.361039) (xy 139.495892 81.534) (xy 139.414765 81.534) + (xy 139.380282 81.450542) (xy 139.023337 81.092974) (xy 138.556727 80.899221) (xy 138.554512 80.899219) (xy 139.021458 80.706282) + (xy 139.379026 80.349337) (xy 139.572779 79.882727) (xy 139.57322 79.37749) (xy 139.380282 78.910542) (xy 139.023337 78.552974) + (xy 138.556727 78.359221) (xy 138.554512 78.359219) (xy 139.021458 78.166282) (xy 139.379026 77.809337) (xy 139.572779 77.342727) + (xy 139.57322 76.83749) (xy 139.380282 76.370542) (xy 139.023337 76.012974) (xy 138.556727 75.819221) (xy 138.554512 75.819219) + (xy 139.021458 75.626282) (xy 139.379026 75.269337) (xy 139.572779 74.802727) (xy 139.57322 74.29749) (xy 139.380282 73.830542) + (xy 139.023337 73.472974) (xy 138.556727 73.279221) (xy 138.05149 73.27878) (xy 137.584542 73.471718) (xy 137.287417 73.768325) + (xy 137.287417 65.56213) (xy 136.920834 64.674931) (xy 136.242639 63.995551) (xy 135.356081 63.62742) (xy 134.39613 63.626583) + (xy 133.508931 63.993166) (xy 132.829551 64.671361) (xy 132.46142 65.557919) (xy 132.460583 66.51787) (xy 132.827166 67.405069) + (xy 133.505361 68.084449) (xy 134.391919 68.45258) (xy 135.35187 68.453417) (xy 136.239069 68.086834) (xy 136.918449 67.408639) + (xy 137.28658 66.522081) (xy 137.287417 65.56213) (xy 137.287417 73.768325) (xy 137.226974 73.828663) (xy 137.033221 74.295273) + (xy 137.033 74.548464) (xy 137.033 73.685953) (xy 136.955662 73.499242) (xy 136.812759 73.356339) (xy 136.626048 73.279) + (xy 136.423953 73.279) (xy 134.899953 73.279) (xy 134.713242 73.356338) (xy 134.570339 73.499241) (xy 134.493 73.685952) + (xy 134.493 73.888047) (xy 134.493 75.412047) (xy 134.570338 75.598758) (xy 134.713241 75.741661) (xy 134.899952 75.819) + (xy 135.102047 75.819) (xy 135.510957 75.819) (xy 135.044542 76.011718) (xy 134.686974 76.368663) (xy 134.493221 76.835273) + (xy 134.49278 77.34051) (xy 134.685718 77.807458) (xy 135.042663 78.165026) (xy 135.509273 78.358779) (xy 135.511487 78.35878) + (xy 135.044542 78.551718) (xy 134.686974 78.908663) (xy 134.493221 79.375273) (xy 134.49278 79.88051) (xy 134.685718 80.347458) + (xy 134.744422 80.406264) (xy 134.678987 80.449987) (xy 133.916987 81.211987) (xy 133.779336 81.417996) (xy 133.731 81.661) + (xy 133.731 81.838027) (xy 133.55898 82.009747) (xy 133.413665 82.359705) (xy 133.413335 82.738633) (xy 133.558039 83.088843) + (xy 133.825747 83.35702) (xy 134.175705 83.502335) (xy 134.554633 83.502665) (xy 134.904843 83.357961) (xy 135.03034 83.232682) + (xy 135.042663 83.245026) (xy 135.509273 83.438779) (xy 136.01451 83.43922) (xy 136.481458 83.246282) (xy 136.839026 82.889337) + (xy 137.032779 82.422727) (xy 137.03278 82.420512) (xy 137.225718 82.887458) (xy 137.582663 83.245026) (xy 137.631284 83.265215) + (xy 137.472987 83.370987) (xy 136.710987 84.132987) (xy 136.573336 84.338996) (xy 136.560826 84.401885) (xy 136.466013 84.259987) + (xy 136.212013 84.005987) (xy 136.006004 83.868336) (xy 135.763 83.82) (xy 132.651687 83.82) (xy 132.651687 71.033216) + (xy 132.487689 70.636311) (xy 132.184286 70.332378) (xy 131.787668 70.167687) (xy 131.358216 70.167313) (xy 130.961311 70.331311) + (xy 130.657378 70.634714) (xy 130.492687 71.031332) (xy 130.492313 71.460784) (xy 130.656311 71.857689) (xy 130.959714 72.161622) + (xy 131.356332 72.326313) (xy 131.785784 72.326687) (xy 132.182689 72.162689) (xy 132.486622 71.859286) (xy 132.651313 71.462668) + (xy 132.651687 71.033216) (xy 132.651687 83.82) (xy 128.907412 83.82) (xy 128.907412 68.820174) (xy 128.902466 68.314962) + (xy 128.718645 67.871177) (xy 128.504496 67.800307) (xy 128.414693 67.89011) (xy 128.414693 67.710504) (xy 128.343823 67.496355) + (xy 127.875174 67.307588) (xy 127.50822 67.31118) (xy 127.50822 65.78849) (xy 127.315282 65.321542) (xy 126.958337 64.963974) + (xy 126.491727 64.770221) (xy 125.98649 64.76978) (xy 125.519542 64.962718) (xy 125.504946 64.977287) (xy 125.48633 64.883696) + (xy 125.334914 64.657086) (xy 124.699914 64.022086) (xy 124.473305 63.87067) (xy 124.206 63.8175) (xy 119.507 63.8175) + (xy 119.239696 63.87067) (xy 119.013086 64.022086) (xy 118.256669 64.778502) (xy 118.236727 64.770221) (xy 117.73149 64.76978) + (xy 117.264542 64.962718) (xy 116.906974 65.319663) (xy 116.713221 65.786273) (xy 116.71278 66.29151) (xy 116.905718 66.758458) + (xy 117.162491 67.01568) (xy 116.868172 67.31) (xy 115.722953 67.31) (xy 115.536242 67.387338) (xy 115.393339 67.530241) + (xy 115.316 67.716952) (xy 115.316 67.919047) (xy 115.316 69.443047) (xy 115.393338 69.629758) (xy 115.536241 69.772661) + (xy 115.722952 69.85) (xy 115.925047 69.85) (xy 117.449047 69.85) (xy 117.635758 69.772662) (xy 117.778661 69.629759) + (xy 117.856 69.443048) (xy 117.856 69.240953) (xy 117.856 68.297828) (xy 118.476914 67.676914) (xy 118.628329 67.450305) + (xy 118.62833 67.450304) (xy 118.6815 67.183) (xy 118.6815 67.125528) (xy 118.701458 67.117282) (xy 119.059026 66.760337) + (xy 119.252779 66.293727) (xy 119.25322 65.78849) (xy 119.24419 65.766637) (xy 119.796328 65.2145) (xy 119.80632 65.2145) + (xy 119.700974 65.319663) (xy 119.507221 65.786273) (xy 119.50678 66.29151) (xy 119.699718 66.758458) (xy 120.056663 67.116026) + (xy 120.523273 67.309779) (xy 121.02851 67.31022) (xy 121.495458 67.117282) (xy 121.853026 66.760337) (xy 122.046779 66.293727) + (xy 122.04722 65.78849) (xy 121.854282 65.321542) (xy 121.747426 65.2145) (xy 122.47332 65.2145) (xy 122.367974 65.319663) + (xy 122.174221 65.786273) (xy 122.17378 66.29151) (xy 122.366718 66.758458) (xy 122.723663 67.116026) (xy 123.190273 67.309779) + (xy 123.69551 67.31022) (xy 124.1425 67.125528) (xy 124.1425 67.494471) (xy 124.122542 67.502718) (xy 123.764974 67.859663) + (xy 123.571221 68.326273) (xy 123.57078 68.83151) (xy 123.763718 69.298458) (xy 124.120663 69.656026) (xy 124.587273 69.849779) + (xy 125.09251 69.85022) (xy 125.559458 69.657282) (xy 125.917026 69.300337) (xy 126.110779 68.833727) (xy 126.11122 68.32849) + (xy 125.918282 67.861542) (xy 125.561337 67.503974) (xy 125.5395 67.494906) (xy 125.5395 67.125093) (xy 125.984273 67.309779) + (xy 126.48951 67.31022) (xy 126.956458 67.117282) (xy 127.314026 66.760337) (xy 127.507779 66.293727) (xy 127.50822 65.78849) + (xy 127.50822 67.31118) (xy 127.369962 67.312534) (xy 126.926177 67.496355) (xy 126.855307 67.710504) (xy 127.635 68.490197) + (xy 128.414693 67.710504) (xy 128.414693 67.89011) (xy 127.724803 68.58) (xy 128.504496 69.359693) (xy 128.718645 69.288823) + (xy 128.907412 68.820174) (xy 128.907412 83.82) (xy 128.414693 83.82) (xy 128.414693 69.449496) (xy 127.635 68.669803) + (xy 127.545197 68.759606) (xy 127.545197 68.58) (xy 126.765504 67.800307) (xy 126.551355 67.871177) (xy 126.362588 68.339826) + (xy 126.367534 68.845038) (xy 126.551355 69.288823) (xy 126.765504 69.359693) (xy 127.545197 68.58) (xy 127.545197 68.759606) + (xy 126.855307 69.449496) (xy 126.926177 69.663645) (xy 127.394826 69.852412) (xy 127.900038 69.847466) (xy 128.343823 69.663645) + (xy 128.414693 69.449496) (xy 128.414693 83.82) (xy 127.390026 83.82) (xy 126.814013 83.243987) (xy 126.608004 83.106336) + (xy 126.365 83.058) (xy 126.047643 83.058) (xy 126.047643 74.512518) (xy 126.047643 71.083518) (xy 125.922233 70.780002) + (xy 125.690219 70.547583) (xy 125.386923 70.421643) (xy 125.058518 70.421357) (xy 124.755002 70.546767) (xy 124.522583 70.778781) + (xy 124.396643 71.082077) (xy 124.396357 71.410482) (xy 124.521767 71.713998) (xy 124.753781 71.946417) (xy 125.057077 72.072357) + (xy 125.385482 72.072643) (xy 125.688998 71.947233) (xy 125.921417 71.715219) (xy 126.047357 71.411923) (xy 126.047643 71.083518) + (xy 126.047643 74.512518) (xy 125.922233 74.209002) (xy 125.690219 73.976583) (xy 125.386923 73.850643) (xy 125.058518 73.850357) + (xy 124.755002 73.975767) (xy 124.522583 74.207781) (xy 124.396643 74.511077) (xy 124.396357 74.839482) (xy 124.521767 75.142998) + (xy 124.753781 75.375417) (xy 125.057077 75.501357) (xy 125.385482 75.501643) (xy 125.688998 75.376233) (xy 125.921417 75.144219) + (xy 126.047357 74.840923) (xy 126.047643 74.512518) (xy 126.047643 83.058) (xy 123.31722 83.058) (xy 123.31722 68.32849) + (xy 123.124282 67.861542) (xy 122.767337 67.503974) (xy 122.300727 67.310221) (xy 121.79549 67.30978) (xy 121.328542 67.502718) + (xy 120.970974 67.859663) (xy 120.777221 68.326273) (xy 120.77678 68.83151) (xy 120.969718 69.298458) (xy 121.326663 69.656026) + (xy 121.793273 69.849779) (xy 122.29851 69.85022) (xy 122.765458 69.657282) (xy 123.123026 69.300337) (xy 123.316779 68.833727) + (xy 123.31722 68.32849) (xy 123.31722 83.058) (xy 120.65022 83.058) (xy 120.65022 68.32849) (xy 120.457282 67.861542) + (xy 120.100337 67.503974) (xy 119.633727 67.310221) (xy 119.12849 67.30978) (xy 118.661542 67.502718) (xy 118.303974 67.859663) + (xy 118.110221 68.326273) (xy 118.10978 68.83151) (xy 118.302718 69.298458) (xy 118.659663 69.656026) (xy 119.126273 69.849779) + (xy 119.63151 69.85022) (xy 120.098458 69.657282) (xy 120.456026 69.300337) (xy 120.649779 68.833727) (xy 120.65022 68.32849) + (xy 120.65022 83.058) (xy 114.55422 83.058) (xy 114.55422 75.82149) (xy 114.361282 75.354542) (xy 114.004337 74.996974) + (xy 113.537727 74.803221) (xy 113.535512 74.803219) (xy 114.002458 74.610282) (xy 114.360026 74.253337) (xy 114.553779 73.786727) + (xy 114.55422 73.28149) (xy 114.361282 72.814542) (xy 114.004337 72.456974) (xy 113.537727 72.263221) (xy 113.03249 72.26278) + (xy 112.966665 72.289978) (xy 112.966665 71.439367) (xy 112.821961 71.089157) (xy 112.554253 70.82098) (xy 112.204295 70.675665) + (xy 111.887417 70.675389) (xy 111.887417 65.56213) (xy 111.520834 64.674931) (xy 110.842639 63.995551) (xy 109.956081 63.62742) + (xy 108.99613 63.626583) (xy 108.108931 63.993166) (xy 107.429551 64.671361) (xy 107.06142 65.557919) (xy 107.060583 66.51787) + (xy 107.427166 67.405069) (xy 108.105361 68.084449) (xy 108.991919 68.45258) (xy 109.95187 68.453417) (xy 110.839069 68.086834) + (xy 111.518449 67.408639) (xy 111.88658 66.522081) (xy 111.887417 65.56213) (xy 111.887417 70.675389) (xy 111.825367 70.675335) + (xy 111.475157 70.820039) (xy 111.20698 71.087747) (xy 111.061665 71.437705) (xy 111.061335 71.816633) (xy 111.206039 72.166843) + (xy 111.473747 72.43502) (xy 111.823705 72.580335) (xy 112.202633 72.580665) (xy 112.552843 72.435961) (xy 112.82102 72.168253) + (xy 112.966335 71.818295) (xy 112.966665 71.439367) (xy 112.966665 72.289978) (xy 112.565542 72.455718) (xy 112.207974 72.812663) + (xy 112.014221 73.279273) (xy 112.014219 73.281487) (xy 111.821282 72.814542) (xy 111.464337 72.456974) (xy 110.997727 72.263221) + (xy 110.49249 72.26278) (xy 110.426665 72.289978) (xy 110.426665 71.185367) (xy 110.281961 70.835157) (xy 110.014253 70.56698) + (xy 109.664295 70.421665) (xy 109.285367 70.421335) (xy 108.935157 70.566039) (xy 108.66698 70.833747) (xy 108.521665 71.183705) + (xy 108.521335 71.562633) (xy 108.666039 71.912843) (xy 108.933747 72.18102) (xy 109.283705 72.326335) (xy 109.662633 72.326665) + (xy 110.012843 72.181961) (xy 110.28102 71.914253) (xy 110.426335 71.564295) (xy 110.426665 71.185367) (xy 110.426665 72.289978) + (xy 110.025542 72.455718) (xy 109.667974 72.812663) (xy 109.474221 73.279273) (xy 109.474219 73.281487) (xy 109.281282 72.814542) + (xy 108.924337 72.456974) (xy 108.457727 72.263221) (xy 107.95249 72.26278) (xy 107.485542 72.455718) (xy 107.127974 72.812663) + (xy 106.934221 73.279273) (xy 106.93378 73.78451) (xy 107.126718 74.251458) (xy 107.483663 74.609026) (xy 107.950273 74.802779) + (xy 107.952487 74.80278) (xy 107.485542 74.995718) (xy 107.127974 75.352663) (xy 106.934221 75.819273) (xy 106.93378 76.32451) + (xy 107.126718 76.791458) (xy 107.483663 77.149026) (xy 107.950273 77.342779) (xy 108.203464 77.343) (xy 107.340953 77.343) + (xy 107.154242 77.420338) (xy 107.011339 77.563241) (xy 106.934 77.749952) (xy 106.934 77.952047) (xy 106.934 79.476047) + (xy 107.011338 79.662758) (xy 107.154241 79.805661) (xy 107.340952 79.883) (xy 107.543047 79.883) (xy 109.067047 79.883) + (xy 109.253758 79.805662) (xy 109.396661 79.662759) (xy 109.474 79.476048) (xy 109.551338 79.662758) (xy 109.694241 79.805661) + (xy 109.880952 79.883) (xy 110.083047 79.883) (xy 110.5535 79.883) (xy 110.6805 79.756) (xy 110.6805 78.6765) + (xy 109.601 78.6765) (xy 109.474 78.8035) (xy 109.474 78.4225) (xy 109.601 78.5495) (xy 110.6805 78.5495) + (xy 110.6805 78.5295) (xy 110.8075 78.5295) (xy 110.8075 78.5495) (xy 110.8275 78.5495) (xy 110.8275 78.6765) + (xy 110.8075 78.6765) (xy 110.8075 79.756) (xy 110.9345 79.883) (xy 111.404953 79.883) (xy 111.607048 79.883) + (xy 111.793759 79.805661) (xy 111.936662 79.662758) (xy 112.014 79.476047) (xy 112.091338 79.662758) (xy 112.234241 79.805661) + (xy 112.420952 79.883) (xy 112.623047 79.883) (xy 114.147047 79.883) (xy 114.333758 79.805662) (xy 114.476661 79.662759) + (xy 114.554 79.476048) (xy 114.554 79.273953) (xy 114.554 77.749953) (xy 114.476662 77.563242) (xy 114.333759 77.420339) + (xy 114.147048 77.343) (xy 113.944953 77.343) (xy 113.536042 77.343) (xy 114.002458 77.150282) (xy 114.360026 76.793337) + (xy 114.553779 76.326727) (xy 114.55422 75.82149) (xy 114.55422 83.058) (xy 113.919 83.058) (xy 113.675996 83.106336) + (xy 113.469987 83.243987) (xy 111.496974 85.217) (xy 110.896953 85.217) (xy 110.710242 85.294338) (xy 110.567339 85.437241) + (xy 110.49 85.623952) (xy 110.49 85.826047) (xy 110.49 87.350047) (xy 110.567338 87.536758) (xy 110.710241 87.679661) + (xy 110.896952 87.757) (xy 111.099047 87.757) (xy 111.507957 87.757) (xy 111.041542 87.949718) (xy 110.683974 88.306663) + (xy 110.490221 88.773273) (xy 110.48978 89.27851) (xy 110.595758 89.535) (xy 110.236 89.535) (xy 109.992996 89.583336) + (xy 109.786987 89.720987) (xy 108.902687 90.605287) (xy 108.902687 82.971216) (xy 108.738689 82.574311) (xy 108.435286 82.270378) + (xy 108.038668 82.105687) (xy 107.609216 82.105313) (xy 107.212311 82.269311) (xy 106.908378 82.572714) (xy 106.743687 82.969332) + (xy 106.743313 83.398784) (xy 106.907311 83.795689) (xy 107.210714 84.099622) (xy 107.607332 84.264313) (xy 108.036784 84.264687) + (xy 108.433689 84.100689) (xy 108.737622 83.797286) (xy 108.902313 83.400668) (xy 108.902687 82.971216) (xy 108.902687 90.605287) + (xy 107.500987 92.006987) (xy 107.363336 92.212996) (xy 107.315 92.456) (xy 107.315 95.494974) (xy 104.203687 98.606286) + (xy 104.203687 84.368216) (xy 104.039689 83.971311) (xy 103.883164 83.814512) (xy 103.883164 60.306517) (xy 103.459555 59.22986) + (xy 103.400733 59.141826) (xy 103.016364 58.871438) (xy 102.926562 58.96124) (xy 102.926562 58.781636) (xy 102.656174 58.397267) + (xy 101.595326 57.935491) (xy 100.438517 57.914836) (xy 99.36186 58.338445) (xy 99.273826 58.397267) (xy 99.003438 58.781636) + (xy 100.965 60.743197) (xy 102.926562 58.781636) (xy 102.926562 58.96124) (xy 101.054803 60.833) (xy 103.016364 62.794562) + (xy 103.400733 62.524174) (xy 103.862509 61.463326) (xy 103.883164 60.306517) (xy 103.883164 83.814512) (xy 103.8733 83.804631) + (xy 103.8733 69.430347) (xy 103.8733 67.1195) (xy 103.8733 66.7385) (xy 103.8733 64.427653) (xy 103.795962 64.240942) + (xy 103.653059 64.098039) (xy 103.466348 64.0207) (xy 103.264253 64.0207) (xy 102.926562 64.0207) (xy 102.926562 62.884364) + (xy 100.965 60.922803) (xy 99.003438 62.884364) (xy 99.273826 63.268733) (xy 100.334674 63.730509) (xy 101.491483 63.751164) + (xy 102.56814 63.327555) (xy 102.656174 63.268733) (xy 102.926562 62.884364) (xy 102.926562 64.0207) (xy 101.1555 64.0207) + (xy 101.0285 64.1477) (xy 101.0285 66.8655) (xy 103.7463 66.8655) (xy 103.8733 66.7385) (xy 103.8733 67.1195) + (xy 103.7463 66.9925) (xy 101.0285 66.9925) (xy 101.0285 69.7103) (xy 101.1555 69.8373) (xy 103.264253 69.8373) + (xy 103.466348 69.8373) (xy 103.653059 69.759961) (xy 103.795962 69.617058) (xy 103.8733 69.430347) (xy 103.8733 83.804631) + (xy 103.736286 83.667378) (xy 103.339668 83.502687) (xy 102.910216 83.502313) (xy 102.513311 83.666311) (xy 102.209378 83.969714) + (xy 102.044687 84.366332) (xy 102.044313 84.795784) (xy 102.208311 85.192689) (xy 102.511714 85.496622) (xy 102.908332 85.661313) + (xy 103.337784 85.661687) (xy 103.734689 85.497689) (xy 104.038622 85.194286) (xy 104.203313 84.797668) (xy 104.203687 84.368216) + (xy 104.203687 98.606286) (xy 103.051316 99.758657) (xy 102.681367 99.758335) (xy 102.331157 99.903039) (xy 102.06298 100.170747) + (xy 101.917665 100.520705) (xy 101.917335 100.899633) (xy 102.062039 101.249843) (xy 102.329747 101.51802) (xy 102.679705 101.663335) + (xy 103.058633 101.663665) (xy 103.18749 101.610422) (xy 103.187357 101.763482) (xy 103.303602 102.044817) (xy 103.187643 102.324077) + (xy 103.187357 102.652482) (xy 103.303602 102.933817) (xy 103.187643 103.213077) (xy 103.187388 103.505) (xy 101.536687 103.505) + (xy 101.536687 95.544216) (xy 101.372689 95.147311) (xy 101.069286 94.843378) (xy 100.9015 94.773706) (xy 100.9015 69.7103) + (xy 100.9015 66.9925) (xy 100.9015 66.8655) (xy 100.9015 64.1477) (xy 100.7745 64.0207) (xy 98.665747 64.0207) + (xy 98.659642 64.0207) (xy 98.792794 63.700035) (xy 98.793658 62.710162) (xy 98.913636 62.794562) (xy 100.875197 60.833) + (xy 98.913636 58.871438) (xy 98.529267 59.141826) (xy 98.067491 60.202674) (xy 98.050193 61.171425) (xy 97.534571 60.654901) + (xy 96.466035 60.211206) (xy 95.309041 60.210196) (xy 94.239733 60.652026) (xy 93.420901 61.469429) (xy 92.977206 62.537965) + (xy 92.976196 63.694959) (xy 93.418026 64.764267) (xy 94.235429 65.583099) (xy 95.303965 66.026794) (xy 96.460959 66.027804) + (xy 97.530267 65.585974) (xy 98.0567 65.060459) (xy 98.0567 66.7385) (xy 98.1837 66.8655) (xy 100.9015 66.8655) + (xy 100.9015 66.9925) (xy 98.1837 66.9925) (xy 98.0567 67.1195) (xy 98.0567 69.430347) (xy 98.134038 69.617058) + (xy 98.276941 69.759961) (xy 98.463652 69.8373) (xy 98.665747 69.8373) (xy 100.7745 69.8373) (xy 100.9015 69.7103) + (xy 100.9015 94.773706) (xy 100.672668 94.678687) (xy 100.243216 94.678313) (xy 99.846311 94.842311) (xy 99.542378 95.145714) + (xy 99.377687 95.542332) (xy 99.377313 95.971784) (xy 99.541311 96.368689) (xy 99.844714 96.672622) (xy 100.241332 96.837313) + (xy 100.670784 96.837687) (xy 101.067689 96.673689) (xy 101.371622 96.370286) (xy 101.536313 95.973668) (xy 101.536687 95.544216) + (xy 101.536687 103.505) (xy 99.377687 103.505) (xy 99.377687 100.370216) (xy 99.213689 99.973311) (xy 99.06022 99.819573) + (xy 99.06022 92.96649) (xy 98.867282 92.499542) (xy 98.510337 92.141974) (xy 98.234687 92.027514) (xy 98.234687 87.543216) + (xy 98.070689 87.146311) (xy 97.767286 86.842378) (xy 97.370668 86.677687) (xy 96.941216 86.677313) (xy 96.544311 86.841311) + (xy 96.240378 87.144714) (xy 96.075687 87.541332) (xy 96.075313 87.970784) (xy 96.239311 88.367689) (xy 96.542714 88.671622) + (xy 96.939332 88.836313) (xy 97.368784 88.836687) (xy 97.765689 88.672689) (xy 98.069622 88.369286) (xy 98.234313 87.972668) + (xy 98.234687 87.543216) (xy 98.234687 92.027514) (xy 98.043727 91.948221) (xy 97.53849 91.94778) (xy 97.071542 92.140718) + (xy 96.713974 92.497663) (xy 96.520221 92.964273) (xy 96.51978 93.46951) (xy 96.712718 93.936458) (xy 97.069663 94.294026) + (xy 97.536273 94.487779) (xy 97.789464 94.488) (xy 96.926953 94.488) (xy 96.740242 94.565338) (xy 96.597339 94.708241) + (xy 96.52 94.894952) (xy 96.52 95.097047) (xy 96.52 96.621047) (xy 96.597338 96.807758) (xy 96.740241 96.950661) + (xy 96.926952 97.028) (xy 97.129047 97.028) (xy 98.653047 97.028) (xy 98.839758 96.950662) (xy 98.982661 96.807759) + (xy 99.06 96.621048) (xy 99.06 96.418953) (xy 99.06 94.894953) (xy 98.982662 94.708242) (xy 98.839759 94.565339) + (xy 98.653048 94.488) (xy 98.450953 94.488) (xy 98.042042 94.488) (xy 98.508458 94.295282) (xy 98.866026 93.938337) + (xy 99.059779 93.471727) (xy 99.06022 92.96649) (xy 99.06022 99.819573) (xy 98.910286 99.669378) (xy 98.513668 99.504687) + (xy 98.084216 99.504313) (xy 97.687311 99.668311) (xy 97.383378 99.971714) (xy 97.218687 100.368332) (xy 97.218313 100.797784) + (xy 97.382311 101.194689) (xy 97.685714 101.498622) (xy 98.082332 101.663313) (xy 98.511784 101.663687) (xy 98.908689 101.499689) + (xy 99.212622 101.196286) (xy 99.377313 100.799668) (xy 99.377687 100.370216) (xy 99.377687 103.505) (xy 94.869 103.505) + (xy 94.869 78.079048) (xy 94.869 77.876953) (xy 94.869 76.098953) (xy 94.791662 75.912242) (xy 94.648759 75.769339) + (xy 94.462048 75.692) (xy 94.259953 75.692) (xy 93.472 75.692) (xy 93.472 73.380048) (xy 93.472 73.177953) + (xy 93.472 69.367953) (xy 93.394662 69.181242) (xy 93.251759 69.038339) (xy 93.065048 68.961) (xy 92.862953 68.961) + (xy 90.322953 68.961) (xy 90.136242 69.038338) (xy 89.993339 69.181241) (xy 89.916 69.367952) (xy 89.916 69.570047) + (xy 89.916 73.380047) (xy 89.993338 73.566758) (xy 90.136241 73.709661) (xy 90.322952 73.787) (xy 90.525047 73.787) + (xy 93.065047 73.787) (xy 93.251758 73.709662) (xy 93.394661 73.566759) (xy 93.472 73.380048) (xy 93.472 75.692) + (xy 92.481953 75.692) (xy 92.295242 75.769338) (xy 92.152339 75.912241) (xy 92.075 76.098952) (xy 92.075 76.301047) + (xy 92.075 78.079047) (xy 92.152338 78.265758) (xy 92.295241 78.408661) (xy 92.481952 78.486) (xy 92.684047 78.486) + (xy 94.462047 78.486) (xy 94.648758 78.408662) (xy 94.791661 78.265759) (xy 94.869 78.079048) (xy 94.869 103.505) + (xy 90.29846 103.505) (xy 90.29846 95.520437) (xy 90.29846 82.820437) (xy 90.2955 82.264683) (xy 90.088517 81.764982) + (xy 89.86118 81.678622) (xy 89.771378 81.768424) (xy 89.771378 81.58882) (xy 89.685018 81.361483) (xy 89.170437 81.15154) + (xy 88.614683 81.1545) (xy 88.392 81.246738) (xy 88.392 73.380048) (xy 88.392 73.177953) (xy 88.392 69.367953) + (xy 88.314662 69.181242) (xy 88.171759 69.038339) (xy 87.985048 68.961) (xy 87.782953 68.961) (xy 85.242953 68.961) + (xy 85.056242 69.038338) (xy 84.913339 69.181241) (xy 84.836 69.367952) (xy 84.836 69.570047) (xy 84.836 73.380047) + (xy 84.913338 73.566758) (xy 85.056241 73.709661) (xy 85.242952 73.787) (xy 85.445047 73.787) (xy 87.985047 73.787) + (xy 88.171758 73.709662) (xy 88.314661 73.566759) (xy 88.392 73.380048) (xy 88.392 81.246738) (xy 88.114982 81.361483) + (xy 88.028622 81.58882) (xy 88.9 82.460197) (xy 89.771378 81.58882) (xy 89.771378 81.768424) (xy 88.989803 82.55) + (xy 89.86118 83.421378) (xy 90.088517 83.335018) (xy 90.29846 82.820437) (xy 90.29846 95.520437) (xy 90.297 95.246315) + (xy 90.297 88.620048) (xy 90.297 88.417953) (xy 90.297 86.639953) (xy 90.219662 86.453242) (xy 90.076759 86.310339) + (xy 89.890048 86.233) (xy 89.771378 86.233) (xy 89.771378 83.51118) (xy 88.9 82.639803) (xy 88.810197 82.729605) + (xy 88.810197 82.55) (xy 87.93882 81.678622) (xy 87.711483 81.764982) (xy 87.50154 82.279563) (xy 87.5045 82.835317) + (xy 87.711483 83.335018) (xy 87.93882 83.421378) (xy 88.810197 82.55) (xy 88.810197 82.729605) (xy 88.028622 83.51118) + (xy 88.114982 83.738517) (xy 88.629563 83.94846) (xy 89.185317 83.9455) (xy 89.685018 83.738517) (xy 89.771378 83.51118) + (xy 89.771378 86.233) (xy 89.687953 86.233) (xy 87.909953 86.233) (xy 87.723242 86.310338) (xy 87.580339 86.453241) + (xy 87.503 86.639952) (xy 87.503 86.842047) (xy 87.503 88.620047) (xy 87.580338 88.806758) (xy 87.723241 88.949661) + (xy 87.909952 89.027) (xy 88.112047 89.027) (xy 89.890047 89.027) (xy 90.076758 88.949662) (xy 90.219661 88.806759) + (xy 90.297 88.620048) (xy 90.297 95.246315) (xy 90.2955 94.964683) (xy 90.088517 94.464982) (xy 89.86118 94.378622) + (xy 89.771378 94.468424) (xy 89.771378 94.28882) (xy 89.685018 94.061483) (xy 89.170437 93.85154) (xy 88.614683 93.8545) + (xy 88.114982 94.061483) (xy 88.028622 94.28882) (xy 88.9 95.160197) (xy 89.771378 94.28882) (xy 89.771378 94.468424) + (xy 88.989803 95.25) (xy 89.86118 96.121378) (xy 90.088517 96.035018) (xy 90.29846 95.520437) (xy 90.29846 103.505) + (xy 90.297 103.505) (xy 90.297 101.320048) (xy 90.297 101.117953) (xy 90.297 99.339953) (xy 90.219662 99.153242) + (xy 90.076759 99.010339) (xy 89.890048 98.933) (xy 89.771378 98.933) (xy 89.771378 96.21118) (xy 88.9 95.339803) + (xy 88.810197 95.429605) (xy 88.810197 95.25) (xy 87.93882 94.378622) (xy 87.711483 94.464982) (xy 87.50154 94.979563) + (xy 87.5045 95.535317) (xy 87.711483 96.035018) (xy 87.93882 96.121378) (xy 88.810197 95.25) (xy 88.810197 95.429605) + (xy 88.028622 96.21118) (xy 88.114982 96.438517) (xy 88.629563 96.64846) (xy 89.185317 96.6455) (xy 89.685018 96.438517) + (xy 89.771378 96.21118) (xy 89.771378 98.933) (xy 89.687953 98.933) (xy 87.909953 98.933) (xy 87.723242 99.010338) + (xy 87.580339 99.153241) (xy 87.503 99.339952) (xy 87.503 99.542047) (xy 87.503 101.320047) (xy 87.580338 101.506758) + (xy 87.723241 101.649661) (xy 87.909952 101.727) (xy 88.112047 101.727) (xy 89.890047 101.727) (xy 90.076758 101.649662) + (xy 90.219661 101.506759) (xy 90.297 101.320048) (xy 90.297 103.505) (xy 85.661687 103.505) (xy 85.661687 102.021216) + (xy 85.497689 101.624311) (xy 85.194286 101.320378) (xy 84.797668 101.155687) (xy 84.368216 101.155313) (xy 83.971311 101.319311) + (xy 83.667378 101.622714) (xy 83.502687 102.019332) (xy 83.502313 102.448784) (xy 83.666311 102.845689) (xy 83.969714 103.149622) + (xy 84.366332 103.314313) (xy 84.795784 103.314687) (xy 85.192689 103.150689) (xy 85.496622 102.847286) (xy 85.661313 102.450668) + (xy 85.661687 102.021216) (xy 85.661687 103.505) (xy 83.312 103.505) (xy 83.312 73.380048) (xy 83.312 73.177953) + (xy 83.312 69.367953) (xy 83.234662 69.181242) (xy 83.091759 69.038339) (xy 82.905048 68.961) (xy 82.702953 68.961) + (xy 80.162953 68.961) (xy 79.976242 69.038338) (xy 79.833339 69.181241) (xy 79.756 69.367952) (xy 79.756 69.570047) + (xy 79.756 73.380047) (xy 79.833338 73.566758) (xy 79.976241 73.709661) (xy 80.162952 73.787) (xy 80.365047 73.787) + (xy 82.905047 73.787) (xy 83.091758 73.709662) (xy 83.234661 73.566759) (xy 83.312 73.380048) (xy 83.312 103.505) + (xy 82.17046 103.505) (xy 82.17046 77.359437) (xy 82.1675 76.803683) (xy 81.960517 76.303982) (xy 81.73318 76.217622) + (xy 81.643378 76.307424) (xy 81.643378 76.12782) (xy 81.557018 75.900483) (xy 81.042437 75.69054) (xy 80.486683 75.6935) + (xy 79.986982 75.900483) (xy 79.900622 76.12782) (xy 80.772 76.999197) (xy 81.643378 76.12782) (xy 81.643378 76.307424) + (xy 80.861803 77.089) (xy 81.73318 77.960378) (xy 81.960517 77.874018) (xy 82.17046 77.359437) (xy 82.17046 103.505) + (xy 81.643378 103.505) (xy 81.643378 78.05018) (xy 80.772 77.178803) (xy 80.682197 77.268605) (xy 80.682197 77.089) + (xy 79.81082 76.217622) (xy 79.583483 76.303982) (xy 79.37354 76.818563) (xy 79.3765 77.374317) (xy 79.583483 77.874018) + (xy 79.81082 77.960378) (xy 80.682197 77.089) (xy 80.682197 77.268605) (xy 79.900622 78.05018) (xy 79.986982 78.277517) + (xy 80.501563 78.48746) (xy 81.057317 78.4845) (xy 81.557018 78.277517) (xy 81.643378 78.05018) (xy 81.643378 103.505) + (xy 77.217482 103.505) (xy 77.217482 72.678866) (xy 77.216 72.675244) (xy 77.216 69.316048) (xy 77.216 69.113953) + (xy 77.216 66.573953) (xy 77.138662 66.387242) (xy 76.995759 66.244339) (xy 76.809048 66.167) (xy 76.606953 66.167) + (xy 74.066953 66.167) (xy 73.880242 66.244338) (xy 73.737339 66.387241) (xy 73.66 66.573952) (xy 73.66 66.776047) + (xy 73.66 69.316047) (xy 73.737338 69.502758) (xy 73.880241 69.645661) (xy 74.066952 69.723) (xy 74.269047 69.723) + (xy 76.809047 69.723) (xy 76.995758 69.645662) (xy 77.138661 69.502759) (xy 77.216 69.316048) (xy 77.216 72.675244) + (xy 76.949567 72.024236) (xy 76.941037 72.01147) (xy 76.67412 71.878683) (xy 76.584317 71.968486) (xy 76.584317 71.78888) + (xy 76.45153 71.521963) (xy 75.799192 71.248514) (xy 75.091866 71.245518) (xy 74.437236 71.513433) (xy 74.42447 71.521963) + (xy 74.291683 71.78888) (xy 75.438 72.935197) (xy 76.584317 71.78888) (xy 76.584317 71.968486) (xy 75.527803 73.025) + (xy 76.67412 74.171317) (xy 76.941037 74.03853) (xy 77.214486 73.386192) (xy 77.217482 72.678866) (xy 77.217482 103.505) + (xy 76.584317 103.505) (xy 76.584317 74.26112) (xy 75.438 73.114803) (xy 75.348197 73.204606) (xy 75.348197 73.025) + (xy 74.20188 71.878683) (xy 73.934963 72.01147) (xy 73.661514 72.663808) (xy 73.658518 73.371134) (xy 73.926433 74.025764) + (xy 73.934963 74.03853) (xy 74.20188 74.171317) (xy 75.348197 73.025) (xy 75.348197 73.204606) (xy 74.291683 74.26112) + (xy 74.42447 74.528037) (xy 75.076808 74.801486) (xy 75.784134 74.804482) (xy 76.438764 74.536567) (xy 76.45153 74.528037) + (xy 76.584317 74.26112) (xy 76.584317 103.505) (xy 76.2 103.505) (xy 75.956996 103.553336) (xy 75.750987 103.690987) + (xy 74.480987 104.960987) (xy 74.343336 105.166996) (xy 74.295 105.41) (xy 74.295 112.522) (xy 74.343336 112.765004) + (xy 74.480987 112.971013) (xy 75.09185 113.581876) (xy 75.057221 113.665273) (xy 75.05678 114.17051) (xy 75.249718 114.637458) + (xy 75.606663 114.995026) (xy 76.073273 115.188779) (xy 76.075487 115.18878) (xy 75.608542 115.381718) (xy 75.250974 115.738663) + (xy 75.057221 116.205273) (xy 75.05678 116.71051) (xy 75.232152 117.134945) (xy 75.194996 117.142336) (xy 74.988987 117.279987) + (xy 74.226987 118.041987) (xy 74.089336 118.247996) (xy 74.041 118.491) (xy 74.041 122.428) (xy 74.089336 122.671004) + (xy 74.226987 122.877013) (xy 75.09185 123.741876) (xy 75.057221 123.825273) (xy 75.05678 124.33051) (xy 75.249718 124.797458) + (xy 75.606663 125.155026) (xy 76.073273 125.348779) (xy 76.075487 125.34878) (xy 75.608542 125.541718) (xy 75.250974 125.898663) + (xy 75.057221 126.365273) (xy 75.05678 126.87051) (xy 75.249718 127.337458) (xy 75.606663 127.695026) (xy 76.073273 127.888779) + (xy 76.075487 127.88878) (xy 75.608542 128.081718) (xy 75.250974 128.438663) (xy 75.057221 128.905273) (xy 75.05678 129.41051) + (xy 75.249718 129.877458) (xy 75.606663 130.235026) (xy 76.073273 130.428779) (xy 76.075487 130.42878) (xy 75.608542 130.621718) + (xy 75.250974 130.978663) (xy 75.057221 131.445273) (xy 75.05678 131.95051) (xy 75.249718 132.417458) (xy 75.606663 132.775026) + (xy 76.073273 132.968779) (xy 76.321262 132.968995) (xy 76.061962 132.971534) (xy 75.618177 133.155355) (xy 75.547307 133.369504) + (xy 76.327 134.149197) (xy 77.106693 133.369504) (xy 77.035823 133.155355) (xy 76.573697 132.969215) (xy 76.57851 132.96922) + (xy 77.045458 132.776282) (xy 77.403026 132.419337) (xy 77.596779 131.952727) (xy 77.59678 131.950512) (xy 77.789718 132.417458) + (xy 78.146663 132.775026) (xy 78.613273 132.968779) (xy 78.615487 132.96878) (xy 78.148542 133.161718) (xy 77.790974 133.518663) + (xy 77.597221 133.985273) (xy 77.597004 134.233262) (xy 77.594466 133.973962) (xy 77.410645 133.530177) (xy 77.196496 133.459307) + (xy 76.416803 134.239) (xy 77.196496 135.018693) (xy 77.410645 134.947823) (xy 77.596784 134.485697) (xy 77.59678 134.49051) + (xy 77.789718 134.957458) (xy 78.146663 135.315026) (xy 78.613273 135.508779) (xy 78.615487 135.50878) (xy 78.148542 135.701718) + (xy 77.790974 136.058663) (xy 77.597221 136.525273) (xy 77.597219 136.527487) (xy 77.404282 136.060542) (xy 77.047337 135.702974) + (xy 76.580727 135.509221) (xy 76.332737 135.509004) (xy 76.592038 135.506466) (xy 77.035823 135.322645) (xy 77.106693 135.108496) + (xy 76.327 134.328803) (xy 76.237197 134.418606) (xy 76.237197 134.239) (xy 75.457504 133.459307) (xy 75.243355 133.530177) + (xy 75.054588 133.998826) (xy 75.059534 134.504038) (xy 75.243355 134.947823) (xy 75.457504 135.018693) (xy 76.237197 134.239) + (xy 76.237197 134.418606) (xy 75.547307 135.108496) (xy 75.618177 135.322645) (xy 76.080302 135.508784) (xy 76.07549 135.50878) + (xy 75.608542 135.701718) (xy 75.250974 136.058663) (xy 75.057221 136.525273) (xy 75.05678 137.03051) (xy 75.249718 137.497458) + (xy 75.606663 137.855026) (xy 76.073273 138.048779) (xy 76.57851 138.04922) (xy 77.045458 137.856282) (xy 77.403026 137.499337) + (xy 77.596779 137.032727) (xy 77.59678 137.030512) (xy 77.789718 137.497458) (xy 78.146663 137.855026) (xy 78.613273 138.048779) + (xy 79.11851 138.04922) (xy 79.140362 138.04019) (xy 80.151086 139.050914) (xy 80.377695 139.20233) (xy 80.377696 139.20233) + (xy 80.645 139.2555) (xy 82.610968 139.2555) (xy 82.826714 139.471622) (xy 83.223332 139.636313) (xy 83.652784 139.636687) + (xy 84.049689 139.472689) (xy 84.353622 139.169286) (xy 84.518313 138.772668) (xy 84.518687 138.343216) (xy 84.354689 137.946311) + (xy 84.051286 137.642378) (xy 83.654668 137.477687) (xy 83.225216 137.477313) (xy 82.828311 137.641311) (xy 82.610742 137.8585) + (xy 80.934328 137.8585) (xy 80.128497 137.052669) (xy 80.136779 137.032727) (xy 80.13722 136.52749) (xy 79.944282 136.060542) + (xy 79.587337 135.702974) (xy 79.120727 135.509221) (xy 79.118512 135.509219) (xy 79.585458 135.316282) (xy 79.939456 134.9629) + (xy 82.636324 134.9629) (xy 82.826714 135.153622) (xy 83.223332 135.318313) (xy 83.652784 135.318687) (xy 84.049689 135.154689) + (xy 84.241813 134.9629) (xy 87.667541 134.9629) (xy 87.822718 135.338458) (xy 88.179663 135.696026) (xy 88.646273 135.889779) + (xy 89.15151 135.89022) (xy 89.618458 135.697282) (xy 89.976026 135.340337) (xy 90.169779 134.873727) (xy 90.17 134.620535) + (xy 90.17 135.483047) (xy 90.247338 135.669758) (xy 90.390241 135.812661) (xy 90.576952 135.89) (xy 90.779047 135.89) + (xy 92.303047 135.89) (xy 92.489758 135.812662) (xy 92.632661 135.669759) (xy 92.71 135.483048) (xy 92.71 135.280953) + (xy 92.71 133.756953) (xy 92.632662 133.570242) (xy 92.489759 133.427339) (xy 92.303048 133.35) (xy 92.100953 133.35) + (xy 90.576953 133.35) (xy 90.390242 133.427338) (xy 90.247339 133.570241) (xy 90.17 133.756952) (xy 90.17 133.959047) + (xy 90.17 134.367957) (xy 89.977282 133.901542) (xy 89.620337 133.543974) (xy 89.153727 133.350221) (xy 88.64849 133.34978) + (xy 88.248383 133.5151) (xy 86.169687 133.5151) (xy 86.169687 118.912216) (xy 86.005689 118.515311) (xy 85.702286 118.211378) + (xy 85.305668 118.046687) (xy 84.876216 118.046313) (xy 84.479311 118.210311) (xy 84.175378 118.513714) (xy 84.010687 118.910332) + (xy 84.010313 119.339784) (xy 84.174311 119.736689) (xy 84.477714 120.040622) (xy 84.874332 120.205313) (xy 85.303784 120.205687) + (xy 85.700689 120.041689) (xy 86.004622 119.738286) (xy 86.169313 119.341668) (xy 86.169687 118.912216) (xy 86.169687 133.5151) + (xy 84.241675 133.5151) (xy 84.051286 133.324378) (xy 83.654668 133.159687) (xy 83.225216 133.159313) (xy 82.828311 133.323311) + (xy 82.636186 133.5151) (xy 80.139412 133.5151) (xy 80.139412 129.399174) (xy 80.134466 128.893962) (xy 79.950645 128.450177) + (xy 79.736496 128.379307) (xy 78.956803 129.159) (xy 79.736496 129.938693) (xy 79.950645 129.867823) (xy 80.139412 129.399174) + (xy 80.139412 133.5151) (xy 79.938849 133.5151) (xy 79.587337 133.162974) (xy 79.120727 132.969221) (xy 79.118512 132.969219) + (xy 79.585458 132.776282) (xy 79.943026 132.419337) (xy 80.136779 131.952727) (xy 80.13722 131.44749) (xy 79.944282 130.980542) + (xy 79.587337 130.622974) (xy 79.120727 130.429221) (xy 78.872737 130.429004) (xy 79.132038 130.426466) (xy 79.575823 130.242645) + (xy 79.646693 130.028496) (xy 78.867 129.248803) (xy 78.087307 130.028496) (xy 78.158177 130.242645) (xy 78.620302 130.428784) + (xy 78.61549 130.42878) (xy 78.148542 130.621718) (xy 77.790974 130.978663) (xy 77.597221 131.445273) (xy 77.597219 131.447487) + (xy 77.404282 130.980542) (xy 77.047337 130.622974) (xy 76.580727 130.429221) (xy 76.578512 130.429219) (xy 77.045458 130.236282) + (xy 77.403026 129.879337) (xy 77.596779 129.412727) (xy 77.596995 129.164737) (xy 77.599534 129.424038) (xy 77.783355 129.867823) + (xy 77.997504 129.938693) (xy 78.777197 129.159) (xy 77.997504 128.379307) (xy 77.783355 128.450177) (xy 77.597215 128.912302) + (xy 77.59722 128.90749) (xy 77.404282 128.440542) (xy 77.047337 128.082974) (xy 76.580727 127.889221) (xy 76.578512 127.889219) + (xy 77.045458 127.696282) (xy 77.403026 127.339337) (xy 77.596779 126.872727) (xy 77.59678 126.870512) (xy 77.789718 127.337458) + (xy 78.146663 127.695026) (xy 78.613273 127.888779) (xy 78.861262 127.888995) (xy 78.601962 127.891534) (xy 78.158177 128.075355) + (xy 78.087307 128.289504) (xy 78.867 129.069197) (xy 79.646693 128.289504) (xy 79.575823 128.075355) (xy 79.113697 127.889215) + (xy 79.11851 127.88922) (xy 79.585458 127.696282) (xy 79.943026 127.339337) (xy 80.136779 126.872727) (xy 80.13722 126.36749) + (xy 79.944282 125.900542) (xy 79.936393 125.89264) (xy 80.078013 125.798013) (xy 81.983013 123.893013) (xy 82.120664 123.687004) + (xy 82.169 123.444) (xy 82.169 114.944026) (xy 84.083026 113.03) (xy 85.598 113.03) (xy 85.841004 112.981664) + (xy 86.047013 112.844013) (xy 86.677436 112.213589) (xy 86.677335 112.329633) (xy 86.822039 112.679843) (xy 87.089747 112.94802) + (xy 87.439705 113.093335) (xy 87.684522 113.093548) (xy 89.720984 115.130009) (xy 89.720987 115.130013) (xy 89.844479 115.212528) + (xy 89.926995 115.267664) (xy 89.926996 115.267664) (xy 90.17 115.316) (xy 94.361 115.316) (xy 94.604004 115.267664) + (xy 94.805437 115.13307) (xy 94.805335 115.250633) (xy 94.950039 115.600843) (xy 95.084061 115.7351) (xy 93.853 115.7351) + (xy 93.575975 115.790204) (xy 93.341125 115.947125) (xy 93.341122 115.947128) (xy 93.04515 116.2431) (xy 85.389849 116.2431) + (xy 84.258009 115.111259) (xy 84.119961 114.777157) (xy 83.852253 114.50898) (xy 83.502295 114.363665) (xy 83.123367 114.363335) + (xy 82.773157 114.508039) (xy 82.50498 114.775747) (xy 82.359665 115.125705) (xy 82.359335 115.504633) (xy 82.504039 115.854843) + (xy 82.771747 116.12302) (xy 83.121705 116.268335) (xy 83.367799 116.268549) (xy 84.578122 117.478871) (xy 84.578125 117.478875) + (xy 84.578126 117.478875) (xy 84.735047 117.583726) (xy 84.812975 117.635796) (xy 84.812976 117.635797) (xy 85.09 117.690901) + (xy 85.09 117.6909) (xy 85.090005 117.6909) (xy 93.344994 117.6909) (xy 93.345 117.690901) (xy 93.345 117.6909) + (xy 93.576062 117.644938) (xy 93.622024 117.635796) (xy 93.622025 117.635796) (xy 93.856875 117.478875) (xy 94.152849 117.1829) + (xy 94.900672 117.1829) (xy 94.805665 117.411705) (xy 94.805335 117.790633) (xy 94.950039 118.140843) (xy 95.217747 118.40902) + (xy 95.567705 118.554335) (xy 95.946633 118.554665) (xy 96.296843 118.409961) (xy 96.56502 118.142253) (xy 96.710335 117.792295) + (xy 96.710665 117.413367) (xy 96.615437 117.1829) (xy 104.774994 117.1829) (xy 104.775 117.182901) (xy 104.775 117.1829) + (xy 105.006062 117.136938) (xy 105.052024 117.127796) (xy 105.052025 117.127796) (xy 105.286875 116.970875) (xy 106.344849 115.9129) + (xy 116.871672 115.9129) (xy 116.776665 116.141705) (xy 116.776335 116.520633) (xy 116.921039 116.870843) (xy 117.188747 117.13902) + (xy 117.538705 117.284335) (xy 117.917633 117.284665) (xy 118.267843 117.139961) (xy 118.53602 116.872253) (xy 118.681335 116.522295) + (xy 118.681665 116.143367) (xy 118.586437 115.9129) (xy 121.677994 115.9129) (xy 121.887747 116.12302) (xy 122.237705 116.268335) + (xy 122.616633 116.268665) (xy 122.966843 116.123961) (xy 123.23502 115.856253) (xy 123.380335 115.506295) (xy 123.380665 115.127367) + (xy 123.235961 114.777157) (xy 122.968253 114.50898) (xy 122.618295 114.363665) (xy 122.239367 114.363335) (xy 121.993077 114.4651) + (xy 118.334925 114.4651) (xy 119.516025 113.284) (xy 125.476 113.284) (xy 125.719004 113.235664) (xy 125.925013 113.098013) + (xy 127.771026 111.252) (xy 128.574115 111.252) (xy 128.35198 111.473747) (xy 128.206665 111.823705) (xy 128.206335 112.202633) + (xy 128.351039 112.552843) (xy 128.510514 112.712598) (xy 128.208367 112.712335) (xy 127.858157 112.857039) (xy 127.58998 113.124747) + (xy 127.444665 113.474705) (xy 127.444335 113.853633) (xy 127.589039 114.203843) (xy 127.762 114.377107) (xy 127.762 124.333) + (xy 127.810336 124.576004) (xy 127.947987 124.782013) (xy 134.737974 131.572) (xy 124.841242 131.572) (xy 124.841242 125.580339) + (xy 124.841242 120.500339) (xy 124.62901 119.986697) (xy 124.23637 119.593371) (xy 123.7231 119.380243) (xy 123.167339 119.379758) + (xy 122.653697 119.59199) (xy 122.260371 119.98463) (xy 122.047243 120.4979) (xy 122.046758 121.053661) (xy 122.25899 121.567303) + (xy 122.65163 121.960629) (xy 123.1649 122.173757) (xy 123.720661 122.174242) (xy 124.234303 121.96201) (xy 124.627629 121.56937) + (xy 124.840757 121.0561) (xy 124.841242 120.500339) (xy 124.841242 125.580339) (xy 124.62901 125.066697) (xy 124.23637 124.673371) + (xy 123.7231 124.460243) (xy 123.167339 124.459758) (xy 122.653697 124.67199) (xy 122.260371 125.06463) (xy 122.047243 125.5779) + (xy 122.046758 126.133661) (xy 122.25899 126.647303) (xy 122.65163 127.040629) (xy 123.1649 127.253757) (xy 123.720661 127.254242) + (xy 124.234303 127.04201) (xy 124.627629 126.64937) (xy 124.840757 126.1361) (xy 124.841242 125.580339) (xy 124.841242 131.572) + (xy 123.825 131.572) (xy 123.581996 131.620336) (xy 123.375987 131.757987) (xy 119.194072 135.939901) (xy 119.084337 135.829974) + (xy 118.617727 135.636221) (xy 118.11249 135.63578) (xy 117.645542 135.828718) (xy 117.287974 136.185663) (xy 117.094221 136.652273) + (xy 117.094219 136.654487) (xy 116.901282 136.187542) (xy 116.544337 135.829974) (xy 116.077727 135.636221) (xy 115.57249 135.63578) + (xy 115.105542 135.828718) (xy 114.747974 136.185663) (xy 114.554221 136.652273) (xy 114.554219 136.654487) (xy 114.361282 136.187542) + (xy 114.004337 135.829974) (xy 113.537727 135.636221) (xy 113.03249 135.63578) (xy 112.565542 135.828718) (xy 112.207974 136.185663) + (xy 112.014221 136.652273) (xy 112.014219 136.654487) (xy 111.821282 136.187542) (xy 111.464337 135.829974) (xy 110.997727 135.636221) + (xy 110.49249 135.63578) (xy 110.025542 135.828718) (xy 109.667974 136.185663) (xy 109.474221 136.652273) (xy 109.47378 137.15751) + (xy 109.666718 137.624458) (xy 110.023663 137.982026) (xy 110.490273 138.175779) (xy 110.738262 138.175995) (xy 110.478962 138.178534) + (xy 110.035177 138.362355) (xy 109.964307 138.576504) (xy 110.744 139.356197) (xy 111.523693 138.576504) (xy 111.452823 138.362355) + (xy 110.990697 138.176215) (xy 110.99551 138.17622) (xy 111.462458 137.983282) (xy 111.820026 137.626337) (xy 112.013779 137.159727) + (xy 112.01378 137.157512) (xy 112.206718 137.624458) (xy 112.563663 137.982026) (xy 113.030273 138.175779) (xy 113.032487 138.17578) + (xy 112.565542 138.368718) (xy 112.207974 138.725663) (xy 112.014221 139.192273) (xy 112.014004 139.440262) (xy 112.011466 139.180962) + (xy 111.827645 138.737177) (xy 111.613496 138.666307) (xy 110.833803 139.446) (xy 111.613496 140.225693) (xy 111.827645 140.154823) + (xy 112.013784 139.692697) (xy 112.01378 139.69751) (xy 112.206718 140.164458) (xy 112.563663 140.522026) (xy 113.030273 140.715779) + (xy 113.53551 140.71622) (xy 114.002458 140.523282) (xy 114.360026 140.166337) (xy 114.553779 139.699727) (xy 114.55378 139.697512) + (xy 114.746718 140.164458) (xy 115.103663 140.522026) (xy 115.570273 140.715779) (xy 116.07551 140.71622) (xy 116.542458 140.523282) + (xy 116.900026 140.166337) (xy 117.093779 139.699727) (xy 117.093995 139.451737) (xy 117.096534 139.711038) (xy 117.280355 140.154823) + (xy 117.494504 140.225693) (xy 118.274197 139.446) (xy 117.494504 138.666307) (xy 117.280355 138.737177) (xy 117.094215 139.199302) + (xy 117.09422 139.19449) (xy 116.901282 138.727542) (xy 116.544337 138.369974) (xy 116.077727 138.176221) (xy 116.075512 138.176219) + (xy 116.542458 137.983282) (xy 116.900026 137.626337) (xy 117.093779 137.159727) (xy 117.09378 137.157512) (xy 117.286718 137.624458) + (xy 117.643663 137.982026) (xy 118.110273 138.175779) (xy 118.358262 138.175995) (xy 118.098962 138.178534) (xy 117.655177 138.362355) + (xy 117.584307 138.576504) (xy 118.364 139.356197) (xy 118.378142 139.342055) (xy 118.467944 139.431857) (xy 118.453803 139.446) + (xy 119.233496 140.225693) (xy 119.447645 140.154823) (xy 119.633784 139.692697) (xy 119.63378 139.69751) (xy 119.826718 140.164458) + (xy 120.183663 140.522026) (xy 120.650273 140.715779) (xy 121.15551 140.71622) (xy 121.622458 140.523282) (xy 121.980026 140.166337) + (xy 122.173779 139.699727) (xy 122.17378 139.697512) (xy 122.366718 140.164458) (xy 122.723663 140.522026) (xy 123.190273 140.715779) + (xy 123.69551 140.71622) (xy 124.162458 140.523282) (xy 124.520026 140.166337) (xy 124.713779 139.699727) (xy 124.71378 139.697512) + (xy 124.906718 140.164458) (xy 125.263663 140.522026) (xy 125.730273 140.715779) (xy 126.23551 140.71622) (xy 126.702458 140.523282) + (xy 127.060026 140.166337) (xy 127.253779 139.699727) (xy 127.25378 139.697512) (xy 127.446718 140.164458) (xy 127.803663 140.522026) + (xy 128.270273 140.715779) (xy 128.77551 140.71622) (xy 129.242458 140.523282) (xy 129.600026 140.166337) (xy 129.793779 139.699727) + (xy 129.79378 139.697512) (xy 129.986718 140.164458) (xy 130.343663 140.522026) (xy 130.810273 140.715779) (xy 131.31551 140.71622) + (xy 131.782458 140.523282) (xy 131.893954 140.41198) (xy 133.154987 141.673013) (xy 133.360996 141.810664) (xy 133.604 141.859) + (xy 166.878 141.859) (xy 167.121004 141.810664) (xy 167.327013 141.673013) (xy 168.343013 140.657013) (xy 168.4374 140.515752) + (xy 168.443663 140.522026) (xy 168.910273 140.715779) (xy 169.41551 140.71622) (xy 169.882458 140.523282) (xy 170.240026 140.166337) + (xy 170.433779 139.699727) (xy 170.43378 139.697512) (xy 170.626718 140.164458) (xy 170.983663 140.522026) (xy 171.450273 140.715779) + (xy 171.95551 140.71622) (xy 172.422458 140.523282) (xy 172.780026 140.166337) (xy 172.973779 139.699727) (xy 172.97378 139.697512) + (xy 173.166718 140.164458) (xy 173.523663 140.522026) (xy 173.990273 140.715779) (xy 174.49551 140.71622) (xy 174.962458 140.523282) + (xy 175.320026 140.166337) (xy 175.513779 139.699727) (xy 175.51378 139.697512) (xy 175.706718 140.164458) (xy 176.063663 140.522026) + (xy 176.530273 140.715779) (xy 177.03551 140.71622) (xy 177.502458 140.523282) (xy 177.860026 140.166337) (xy 178.053779 139.699727) + (xy 178.05378 139.697512) (xy 178.246718 140.164458) (xy 178.603663 140.522026) (xy 179.070273 140.715779) (xy 179.57551 140.71622) + (xy 180.042458 140.523282) (xy 180.400026 140.166337) (xy 180.593779 139.699727) (xy 180.59378 139.697512) (xy 180.786718 140.164458) + (xy 181.143663 140.522026) (xy 181.610273 140.715779) (xy 182.11551 140.71622) (xy 182.582458 140.523282) (xy 182.940026 140.166337) + (xy 183.133779 139.699727) (xy 183.13378 139.697512) (xy 183.326718 140.164458) (xy 183.683663 140.522026) (xy 184.150273 140.715779) + (xy 184.65551 140.71622) (xy 185.122458 140.523282) (xy 185.480026 140.166337) (xy 185.673779 139.699727) (xy 185.67422 139.19449) + (xy 185.67422 130.05049) (xy 185.483665 129.589309) (xy 185.483665 118.683367) (xy 185.338961 118.333157) (xy 185.071253 118.06498) + (xy 184.721295 117.919665) (xy 184.342367 117.919335) (xy 183.992157 118.064039) (xy 183.72398 118.331747) (xy 183.578665 118.681705) + (xy 183.578335 119.060633) (xy 183.723039 119.410843) (xy 183.990747 119.67902) (xy 184.340705 119.824335) (xy 184.719633 119.824665) + (xy 185.069843 119.679961) (xy 185.33802 119.412253) (xy 185.483335 119.062295) (xy 185.483665 118.683367) (xy 185.483665 129.589309) + (xy 185.481282 129.583542) (xy 185.124337 129.225974) (xy 184.657727 129.032221) (xy 184.15249 129.03178) (xy 183.685542 129.224718) + (xy 183.327974 129.581663) (xy 183.134221 130.048273) (xy 183.134 130.301464) (xy 183.134 129.438953) (xy 183.056662 129.252242) + (xy 182.913759 129.109339) (xy 182.727048 129.032) (xy 182.562665 129.032) (xy 182.562665 118.810367) (xy 182.417961 118.460157) + (xy 182.150253 118.19198) (xy 181.800295 118.046665) (xy 181.421367 118.046335) (xy 181.071157 118.191039) (xy 180.80298 118.458747) + (xy 180.657665 118.808705) (xy 180.657335 119.187633) (xy 180.802039 119.537843) (xy 181.069747 119.80602) (xy 181.419705 119.951335) + (xy 181.798633 119.951665) (xy 182.148843 119.806961) (xy 182.41702 119.539253) (xy 182.562335 119.189295) (xy 182.562665 118.810367) + (xy 182.562665 129.032) (xy 182.524953 129.032) (xy 181.000953 129.032) (xy 180.814242 129.109338) (xy 180.671339 129.252241) + (xy 180.594 129.438952) (xy 180.594 129.641047) (xy 180.594 131.165047) (xy 180.671338 131.351758) (xy 180.814241 131.494661) + (xy 181.000952 131.572) (xy 181.203047 131.572) (xy 182.727047 131.572) (xy 182.913758 131.494662) (xy 183.056661 131.351759) + (xy 183.134 131.165048) (xy 183.134 130.962953) (xy 183.134 130.554042) (xy 183.326718 131.020458) (xy 183.683663 131.378026) + (xy 184.150273 131.571779) (xy 184.65551 131.57222) (xy 185.122458 131.379282) (xy 185.480026 131.022337) (xy 185.673779 130.555727) + (xy 185.67422 130.05049) (xy 185.67422 139.19449) (xy 185.481282 138.727542) (xy 185.124337 138.369974) (xy 184.657727 138.176221) + (xy 184.404535 138.176) (xy 185.267047 138.176) (xy 185.453758 138.098662) (xy 185.596661 137.955759) (xy 185.674 137.769048) + (xy 185.674 137.566953) (xy 185.674 136.042953) (xy 185.596662 135.856242) (xy 185.453759 135.713339) (xy 185.267048 135.636) + (xy 185.064953 135.636) (xy 183.540953 135.636) (xy 183.354242 135.713338) (xy 183.211339 135.856241) (xy 183.134 136.042952) + (xy 183.134 136.245047) (xy 183.134 136.899798) (xy 183.131466 136.640962) (xy 182.947645 136.197177) (xy 182.733496 136.126307) + (xy 182.643693 136.21611) (xy 182.643693 136.036504) (xy 182.572823 135.822355) (xy 182.104174 135.633588) (xy 181.598962 135.638534) + (xy 181.155177 135.822355) (xy 181.084307 136.036504) (xy 181.864 136.816197) (xy 182.643693 136.036504) (xy 182.643693 136.21611) + (xy 181.953803 136.906) (xy 182.733496 137.685693) (xy 182.947645 137.614823) (xy 183.134 137.152162) (xy 183.134 137.769047) + (xy 183.211338 137.955758) (xy 183.354241 138.098661) (xy 183.540952 138.176) (xy 183.743047 138.176) (xy 184.151957 138.176) + (xy 183.685542 138.368718) (xy 183.327974 138.725663) (xy 183.134221 139.192273) (xy 183.134219 139.194487) (xy 182.941282 138.727542) + (xy 182.584337 138.369974) (xy 182.117727 138.176221) (xy 181.869737 138.176004) (xy 182.129038 138.173466) (xy 182.572823 137.989645) + (xy 182.643693 137.775496) (xy 181.864 136.995803) (xy 181.084307 137.775496) (xy 181.155177 137.989645) (xy 181.617302 138.175784) + (xy 181.61249 138.17578) (xy 181.145542 138.368718) (xy 180.787974 138.725663) (xy 180.594221 139.192273) (xy 180.594219 139.194487) + (xy 180.401282 138.727542) (xy 180.044337 138.369974) (xy 179.577727 138.176221) (xy 179.575512 138.176219) (xy 180.042458 137.983282) + (xy 180.400026 137.626337) (xy 180.593779 137.159727) (xy 180.593995 136.911737) (xy 180.596534 137.171038) (xy 180.780355 137.614823) + (xy 180.994504 137.685693) (xy 181.774197 136.906) (xy 180.994504 136.126307) (xy 180.780355 136.197177) (xy 180.594215 136.659302) + (xy 180.59422 136.65449) (xy 180.401282 136.187542) (xy 180.044337 135.829974) (xy 179.768687 135.715514) (xy 179.768687 118.658216) + (xy 179.604689 118.261311) (xy 179.301286 117.957378) (xy 179.006665 117.83504) (xy 179.006665 110.174367) (xy 178.861961 109.824157) + (xy 178.594253 109.55598) (xy 178.244295 109.410665) (xy 177.865367 109.410335) (xy 177.515157 109.555039) (xy 177.355709 109.714208) + (xy 177.355709 107.838065) (xy 177.172418 107.394465) (xy 176.83332 107.054775) (xy 176.390041 106.87071) (xy 175.910065 106.870291) + (xy 175.577665 107.007635) (xy 175.577665 105.856367) (xy 175.432961 105.506157) (xy 175.165253 105.23798) (xy 174.815295 105.092665) + (xy 174.436367 105.092335) (xy 174.086157 105.237039) (xy 173.81798 105.504747) (xy 173.672665 105.854705) (xy 173.672335 106.233633) + (xy 173.817039 106.583843) (xy 174.084747 106.85202) (xy 174.434705 106.997335) (xy 174.813633 106.997665) (xy 175.163843 106.852961) + (xy 175.43202 106.585253) (xy 175.577335 106.235295) (xy 175.577665 105.856367) (xy 175.577665 107.007635) (xy 175.466465 107.053582) + (xy 175.126775 107.39268) (xy 174.94271 107.835959) (xy 174.942291 108.315935) (xy 175.125582 108.759535) (xy 175.46468 109.099225) + (xy 175.907959 109.28329) (xy 176.387935 109.283709) (xy 176.831535 109.100418) (xy 177.171225 108.76132) (xy 177.35529 108.318041) + (xy 177.355709 107.838065) (xy 177.355709 109.714208) (xy 177.24698 109.822747) (xy 177.101665 110.172705) (xy 177.101335 110.551633) + (xy 177.246039 110.901843) (xy 177.513747 111.17002) (xy 177.863705 111.315335) (xy 178.242633 111.315665) (xy 178.592843 111.170961) + (xy 178.86102 110.903253) (xy 179.006335 110.553295) (xy 179.006665 110.174367) (xy 179.006665 117.83504) (xy 178.904668 117.792687) + (xy 178.475216 117.792313) (xy 178.078311 117.956311) (xy 177.774378 118.259714) (xy 177.609687 118.656332) (xy 177.609313 119.085784) + (xy 177.773311 119.482689) (xy 178.076714 119.786622) (xy 178.473332 119.951313) (xy 178.902784 119.951687) (xy 179.299689 119.787689) + (xy 179.603622 119.484286) (xy 179.768313 119.087668) (xy 179.768687 118.658216) (xy 179.768687 135.715514) (xy 179.577727 135.636221) + (xy 179.07249 135.63578) (xy 178.605542 135.828718) (xy 178.247974 136.185663) (xy 178.054221 136.652273) (xy 178.054219 136.654487) + (xy 177.861282 136.187542) (xy 177.504337 135.829974) (xy 177.485377 135.822101) (xy 177.485377 125.066042) (xy 177.482709 124.850401) + (xy 177.482709 119.522065) (xy 177.358377 119.221157) (xy 177.358377 113.382042) (xy 177.352439 112.902104) (xy 177.180199 112.48628) + (xy 176.972644 112.423159) (xy 176.882841 112.512962) (xy 176.882841 112.333356) (xy 176.81972 112.125801) (xy 176.374042 111.947623) + (xy 175.894104 111.953561) (xy 175.47828 112.125801) (xy 175.415159 112.333356) (xy 176.149 113.067197) (xy 176.882841 112.333356) + (xy 176.882841 112.512962) (xy 176.238803 113.157) (xy 176.972644 113.890841) (xy 177.180199 113.82772) (xy 177.358377 113.382042) + (xy 177.358377 119.221157) (xy 177.299418 119.078465) (xy 176.96032 118.738775) (xy 176.882841 118.706602) (xy 176.882841 113.980644) + (xy 176.149 113.246803) (xy 176.059197 113.336606) (xy 176.059197 113.157) (xy 175.325356 112.423159) (xy 175.117801 112.48628) + (xy 174.939623 112.931958) (xy 174.945561 113.411896) (xy 175.117801 113.82772) (xy 175.325356 113.890841) (xy 176.059197 113.157) + (xy 176.059197 113.336606) (xy 175.415159 113.980644) (xy 175.47828 114.188199) (xy 175.923958 114.366377) (xy 176.403896 114.360439) + (xy 176.81972 114.188199) (xy 176.882841 113.980644) (xy 176.882841 118.706602) (xy 176.517041 118.55471) (xy 176.037065 118.554291) + (xy 175.593465 118.737582) (xy 175.253775 119.07668) (xy 175.06971 119.519959) (xy 175.069291 119.999935) (xy 175.252582 120.443535) + (xy 175.59168 120.783225) (xy 176.034959 120.96729) (xy 176.514935 120.967709) (xy 176.958535 120.784418) (xy 177.298225 120.44532) + (xy 177.48229 120.002041) (xy 177.482709 119.522065) (xy 177.482709 124.850401) (xy 177.479439 124.586104) (xy 177.307199 124.17028) + (xy 177.099644 124.107159) (xy 177.009841 124.196962) (xy 177.009841 124.017356) (xy 176.94672 123.809801) (xy 176.501042 123.631623) + (xy 176.021104 123.637561) (xy 175.60528 123.809801) (xy 175.542159 124.017356) (xy 176.276 124.751197) (xy 177.009841 124.017356) + (xy 177.009841 124.196962) (xy 176.365803 124.841) (xy 177.099644 125.574841) (xy 177.307199 125.51172) (xy 177.485377 125.066042) + (xy 177.485377 135.822101) (xy 177.037727 135.636221) (xy 177.009841 135.636196) (xy 177.009841 125.664644) (xy 176.276 124.930803) + (xy 176.186197 125.020606) (xy 176.186197 124.841) (xy 175.452356 124.107159) (xy 175.244801 124.17028) (xy 175.066623 124.615958) + (xy 175.072561 125.095896) (xy 175.244801 125.51172) (xy 175.452356 125.574841) (xy 176.186197 124.841) (xy 176.186197 125.020606) + (xy 175.542159 125.664644) (xy 175.60528 125.872199) (xy 176.050958 126.050377) (xy 176.530896 126.044439) (xy 176.94672 125.872199) + (xy 177.009841 125.664644) (xy 177.009841 135.636196) (xy 176.53249 135.63578) (xy 176.065542 135.828718) (xy 175.707974 136.185663) + (xy 175.514221 136.652273) (xy 175.514219 136.654487) (xy 175.321282 136.187542) (xy 174.964337 135.829974) (xy 174.497727 135.636221) + (xy 173.99249 135.63578) (xy 173.525542 135.828718) (xy 173.167974 136.185663) (xy 172.974221 136.652273) (xy 172.974219 136.654487) + (xy 172.781282 136.187542) (xy 172.424337 135.829974) (xy 171.957727 135.636221) (xy 171.45249 135.63578) (xy 170.985542 135.828718) + (xy 170.627974 136.185663) (xy 170.434221 136.652273) (xy 170.434219 136.654487) (xy 170.241282 136.187542) (xy 169.884337 135.829974) + (xy 169.865377 135.822101) (xy 169.865377 125.066042) (xy 169.862709 124.850401) (xy 169.862709 119.522065) (xy 169.738377 119.221157) + (xy 169.738377 113.382042) (xy 169.735709 113.166401) (xy 169.735709 107.838065) (xy 169.735709 102.631065) (xy 169.552418 102.187465) + (xy 169.21332 101.847775) (xy 168.770041 101.66371) (xy 168.290065 101.663291) (xy 167.8559 101.842683) (xy 167.8559 99.486849) + (xy 168.346408 98.996341) (xy 168.767935 98.996709) (xy 169.211535 98.813418) (xy 169.551225 98.47432) (xy 169.73529 98.031041) + (xy 169.735709 97.551065) (xy 169.552418 97.107465) (xy 169.21332 96.767775) (xy 168.770041 96.58371) (xy 168.290065 96.583291) + (xy 167.846465 96.766582) (xy 167.506775 97.10568) (xy 167.32271 97.548959) (xy 167.322339 97.97291) (xy 166.620125 98.675125) + (xy 166.463204 98.909975) (xy 166.454061 98.955937) (xy 166.408099 99.187) (xy 166.4081 99.187005) (xy 166.4081 104.902076) + (xy 166.212157 104.983039) (xy 165.94398 105.250747) (xy 165.798665 105.600705) (xy 165.798335 105.979633) (xy 165.943039 106.329843) + (xy 166.210747 106.59802) (xy 166.560705 106.743335) (xy 166.939633 106.743665) (xy 167.289843 106.598961) (xy 167.55802 106.331253) + (xy 167.703335 105.981295) (xy 167.703464 105.832692) (xy 167.800796 105.687025) (xy 167.8559 105.41) (xy 167.8559 103.896883) + (xy 168.287959 104.07629) (xy 168.767935 104.076709) (xy 169.211535 103.893418) (xy 169.551225 103.55432) (xy 169.73529 103.111041) + (xy 169.735709 102.631065) (xy 169.735709 107.838065) (xy 169.552418 107.394465) (xy 169.21332 107.054775) (xy 168.770041 106.87071) + (xy 168.290065 106.870291) (xy 167.846465 107.053582) (xy 167.506775 107.39268) (xy 167.32271 107.835959) (xy 167.322291 108.315935) + (xy 167.505582 108.759535) (xy 167.84468 109.099225) (xy 168.287959 109.28329) (xy 168.767935 109.283709) (xy 169.211535 109.100418) + (xy 169.551225 108.76132) (xy 169.73529 108.318041) (xy 169.735709 107.838065) (xy 169.735709 113.166401) (xy 169.732439 112.902104) + (xy 169.560199 112.48628) (xy 169.352644 112.423159) (xy 169.262841 112.512962) (xy 169.262841 112.333356) (xy 169.19972 112.125801) + (xy 168.754042 111.947623) (xy 168.274104 111.953561) (xy 167.85828 112.125801) (xy 167.795159 112.333356) (xy 168.529 113.067197) + (xy 169.262841 112.333356) (xy 169.262841 112.512962) (xy 168.618803 113.157) (xy 169.352644 113.890841) (xy 169.560199 113.82772) + (xy 169.738377 113.382042) (xy 169.738377 119.221157) (xy 169.679418 119.078465) (xy 169.354687 118.753167) (xy 169.354687 114.848216) + (xy 169.190689 114.451311) (xy 169.007512 114.267814) (xy 169.19972 114.188199) (xy 169.262841 113.980644) (xy 168.529 113.246803) + (xy 168.439197 113.336606) (xy 168.439197 113.157) (xy 167.705356 112.423159) (xy 167.497801 112.48628) (xy 167.319623 112.931958) + (xy 167.325561 113.411896) (xy 167.497801 113.82772) (xy 167.705356 113.890841) (xy 168.439197 113.157) (xy 168.439197 113.336606) + (xy 167.795159 113.980644) (xy 167.82531 114.079787) (xy 167.664311 114.146311) (xy 167.360378 114.449714) (xy 167.195687 114.846332) + (xy 167.195313 115.275784) (xy 167.359311 115.672689) (xy 167.662714 115.976622) (xy 168.059332 116.141313) (xy 168.488784 116.141687) + (xy 168.885689 115.977689) (xy 169.189622 115.674286) (xy 169.354313 115.277668) (xy 169.354687 114.848216) (xy 169.354687 118.753167) + (xy 169.34032 118.738775) (xy 168.897041 118.55471) (xy 168.417065 118.554291) (xy 167.973465 118.737582) (xy 167.633775 119.07668) + (xy 167.44971 119.519959) (xy 167.449291 119.999935) (xy 167.632582 120.443535) (xy 167.97168 120.783225) (xy 168.414959 120.96729) + (xy 168.894935 120.967709) (xy 169.338535 120.784418) (xy 169.678225 120.44532) (xy 169.86229 120.002041) (xy 169.862709 119.522065) + (xy 169.862709 124.850401) (xy 169.859439 124.586104) (xy 169.687199 124.17028) (xy 169.479644 124.107159) (xy 169.389841 124.196962) + (xy 169.389841 124.017356) (xy 169.32672 123.809801) (xy 168.881042 123.631623) (xy 168.401104 123.637561) (xy 167.98528 123.809801) + (xy 167.922159 124.017356) (xy 168.656 124.751197) (xy 169.389841 124.017356) (xy 169.389841 124.196962) (xy 168.745803 124.841) + (xy 169.479644 125.574841) (xy 169.687199 125.51172) (xy 169.865377 125.066042) (xy 169.865377 135.822101) (xy 169.417727 135.636221) + (xy 169.389841 135.636196) (xy 169.389841 125.664644) (xy 168.656 124.930803) (xy 168.566197 125.020606) (xy 168.566197 124.841) + (xy 167.832356 124.107159) (xy 167.624801 124.17028) (xy 167.446623 124.615958) (xy 167.452561 125.095896) (xy 167.624801 125.51172) + (xy 167.832356 125.574841) (xy 168.566197 124.841) (xy 168.566197 125.020606) (xy 167.922159 125.664644) (xy 167.98528 125.872199) + (xy 168.430958 126.050377) (xy 168.910896 126.044439) (xy 169.32672 125.872199) (xy 169.389841 125.664644) (xy 169.389841 135.636196) + (xy 168.91249 135.63578) (xy 168.445542 135.828718) (xy 168.087974 136.185663) (xy 167.894221 136.652273) (xy 167.894219 136.654487) + (xy 167.701282 136.187542) (xy 167.344337 135.829974) (xy 166.877727 135.636221) (xy 166.49722 135.635888) (xy 166.49722 120.27149) + (xy 166.304282 119.804542) (xy 165.947337 119.446974) (xy 165.480727 119.253221) (xy 165.227535 119.253) (xy 166.090047 119.253) + (xy 166.276758 119.175662) (xy 166.419661 119.032759) (xy 166.497 118.846048) (xy 166.497 118.643953) (xy 166.497 117.119953) + (xy 166.419662 116.933242) (xy 166.276759 116.790339) (xy 166.090048 116.713) (xy 165.887953 116.713) (xy 164.528687 116.713) + (xy 164.528687 100.116216) (xy 164.364689 99.719311) (xy 164.061286 99.415378) (xy 163.664668 99.250687) (xy 163.235216 99.250313) + (xy 162.838311 99.414311) (xy 162.534378 99.717714) (xy 162.369687 100.114332) (xy 162.369313 100.543784) (xy 162.533311 100.940689) + (xy 162.836714 101.244622) (xy 163.233332 101.409313) (xy 163.662784 101.409687) (xy 164.059689 101.245689) (xy 164.363622 100.942286) + (xy 164.528313 100.545668) (xy 164.528687 100.116216) (xy 164.528687 116.713) (xy 164.363953 116.713) (xy 164.177242 116.790338) + (xy 164.034339 116.933241) (xy 163.957 117.119952) (xy 163.957 117.322047) (xy 163.957 117.730957) (xy 163.764282 117.264542) + (xy 163.407337 116.906974) (xy 163.385687 116.897984) (xy 163.385687 106.593216) (xy 163.221689 106.196311) (xy 162.918286 105.892378) + (xy 162.521668 105.727687) (xy 162.092216 105.727313) (xy 161.695311 105.891311) (xy 161.391378 106.194714) (xy 161.226687 106.591332) + (xy 161.226313 107.020784) (xy 161.390311 107.417689) (xy 161.693714 107.721622) (xy 162.090332 107.886313) (xy 162.519784 107.886687) + (xy 162.916689 107.722689) (xy 163.220622 107.419286) (xy 163.385313 107.022668) (xy 163.385687 106.593216) (xy 163.385687 116.897984) + (xy 162.940727 116.713221) (xy 162.43549 116.71278) (xy 161.968542 116.905718) (xy 161.610974 117.262663) (xy 161.417221 117.729273) + (xy 161.417219 117.731487) (xy 161.224282 117.264542) (xy 160.867337 116.906974) (xy 160.400727 116.713221) (xy 159.89549 116.71278) + (xy 159.428542 116.905718) (xy 159.070974 117.262663) (xy 158.877221 117.729273) (xy 158.877219 117.731487) (xy 158.684282 117.264542) + (xy 158.327337 116.906974) (xy 157.860727 116.713221) (xy 157.35549 116.71278) (xy 156.888542 116.905718) (xy 156.530974 117.262663) + (xy 156.337221 117.729273) (xy 156.33678 118.23451) (xy 156.529718 118.701458) (xy 156.886663 119.059026) (xy 157.353273 119.252779) + (xy 157.355487 119.25278) (xy 156.888542 119.445718) (xy 156.530974 119.802663) (xy 156.337221 120.269273) (xy 156.33678 120.77451) + (xy 156.529718 121.241458) (xy 156.886663 121.599026) (xy 157.353273 121.792779) (xy 157.85851 121.79322) (xy 158.325458 121.600282) + (xy 158.683026 121.243337) (xy 158.876779 120.776727) (xy 158.87678 120.774512) (xy 159.069718 121.241458) (xy 159.426663 121.599026) + (xy 159.893273 121.792779) (xy 160.39851 121.79322) (xy 160.865458 121.600282) (xy 161.223026 121.243337) (xy 161.416779 120.776727) + (xy 161.41678 120.774512) (xy 161.609718 121.241458) (xy 161.966663 121.599026) (xy 162.433273 121.792779) (xy 162.93851 121.79322) + (xy 163.405458 121.600282) (xy 163.763026 121.243337) (xy 163.956779 120.776727) (xy 163.95678 120.774512) (xy 164.149718 121.241458) + (xy 164.506663 121.599026) (xy 164.973273 121.792779) (xy 165.47851 121.79322) (xy 165.945458 121.600282) (xy 166.303026 121.243337) + (xy 166.496779 120.776727) (xy 166.49722 120.27149) (xy 166.49722 135.635888) (xy 166.37249 135.63578) (xy 165.905542 135.828718) + (xy 165.547974 136.185663) (xy 165.354221 136.652273) (xy 165.354219 136.654487) (xy 165.161282 136.187542) (xy 164.804337 135.829974) + (xy 164.337727 135.636221) (xy 163.83249 135.63578) (xy 163.365542 135.828718) (xy 163.007974 136.185663) (xy 162.814221 136.652273) + (xy 162.814219 136.654487) (xy 162.621282 136.187542) (xy 162.264337 135.829974) (xy 161.797727 135.636221) (xy 161.29249 135.63578) + (xy 160.825542 135.828718) (xy 160.467974 136.185663) (xy 160.274221 136.652273) (xy 160.274219 136.654487) (xy 160.081282 136.187542) + (xy 159.724337 135.829974) (xy 159.257727 135.636221) (xy 158.75249 135.63578) (xy 158.328054 135.811152) (xy 158.320664 135.773996) + (xy 158.320664 135.773995) (xy 158.183013 135.567987) (xy 154.627013 132.011987) (xy 154.421004 131.874336) (xy 154.178 131.826) + (xy 153.098687 131.826) (xy 153.098687 102.275216) (xy 152.934689 101.878311) (xy 152.631286 101.574378) (xy 152.234668 101.409687) + (xy 151.805216 101.409313) (xy 151.408311 101.573311) (xy 151.104378 101.876714) (xy 150.939687 102.273332) (xy 150.939313 102.702784) + (xy 151.103311 103.099689) (xy 151.406714 103.403622) (xy 151.803332 103.568313) (xy 152.232784 103.568687) (xy 152.629689 103.404689) + (xy 152.933622 103.101286) (xy 153.098313 102.704668) (xy 153.098687 102.275216) (xy 153.098687 131.826) (xy 143.573665 131.826) + (xy 143.573665 116.016367) (xy 143.428961 115.666157) (xy 143.161253 115.39798) (xy 142.811295 115.252665) (xy 142.432367 115.252335) + (xy 142.082157 115.397039) (xy 141.972504 115.5065) (xy 140.094583 115.5065) (xy 139.986253 115.39798) (xy 139.636295 115.252665) + (xy 139.257367 115.252335) (xy 138.907157 115.397039) (xy 138.63898 115.664747) (xy 138.493665 116.014705) (xy 138.493335 116.393633) + (xy 138.638039 116.743843) (xy 138.905747 117.01202) (xy 139.255705 117.157335) (xy 139.634633 117.157665) (xy 139.984843 117.012961) + (xy 140.094495 116.9035) (xy 141.972416 116.9035) (xy 142.080747 117.01202) (xy 142.430705 117.157335) (xy 142.809633 117.157665) + (xy 143.159843 117.012961) (xy 143.42802 116.745253) (xy 143.573335 116.395295) (xy 143.573665 116.016367) (xy 143.573665 131.826) + (xy 142.938687 131.826) (xy 142.938687 119.039216) (xy 142.774689 118.642311) (xy 142.471286 118.338378) (xy 142.074668 118.173687) + (xy 141.645216 118.173313) (xy 141.248311 118.337311) (xy 140.944378 118.640714) (xy 140.779687 119.037332) (xy 140.779313 119.466784) + (xy 140.943311 119.863689) (xy 141.246714 120.167622) (xy 141.643332 120.332313) (xy 142.072784 120.332687) (xy 142.469689 120.168689) + (xy 142.773622 119.865286) (xy 142.938313 119.468668) (xy 142.938687 119.039216) (xy 142.938687 131.826) (xy 138.693026 131.826) + (xy 129.794 122.926974) (xy 129.794 112.725972) (xy 129.96602 112.554253) (xy 130.111335 112.204295) (xy 130.111665 111.825367) + (xy 129.966961 111.475157) (xy 129.744194 111.252) (xy 132.197974 111.252) (xy 133.154987 112.209013) (xy 133.360996 112.346664) + (xy 133.604 112.395) (xy 138.078428 112.395) (xy 137.885378 112.587714) (xy 137.720687 112.984332) (xy 137.720313 113.413784) + (xy 137.884311 113.810689) (xy 138.187714 114.114622) (xy 138.584332 114.279313) (xy 139.013784 114.279687) (xy 139.410689 114.115689) + (xy 139.714622 113.812286) (xy 139.879313 113.415668) (xy 139.879687 112.986216) (xy 139.715689 112.589311) (xy 139.521716 112.395) + (xy 141.732 112.395) (xy 141.975004 112.346664) (xy 142.181013 112.209013) (xy 143.900026 110.49) (xy 145.973027 110.49) + (xy 146.144747 110.66202) (xy 146.494705 110.807335) (xy 146.873633 110.807665) (xy 147.223843 110.662961) (xy 147.49202 110.395253) + (xy 147.637335 110.045295) (xy 147.637665 109.666367) (xy 147.492961 109.316157) (xy 147.225253 109.04798) (xy 146.875295 108.902665) + (xy 146.746903 108.902553) (xy 147.096843 108.757961) (xy 147.36502 108.490253) (xy 147.510335 108.140295) (xy 147.510665 107.761367) + (xy 147.365961 107.411157) (xy 147.270039 107.315067) (xy 147.36502 107.220253) (xy 147.510335 106.870295) (xy 147.510665 106.491367) + (xy 147.436508 106.311893) (xy 147.726622 106.022286) (xy 147.891313 105.625668) (xy 147.891687 105.196216) (xy 147.727689 104.799311) + (xy 147.424286 104.495378) (xy 147.027668 104.330687) (xy 146.6215 104.330333) (xy 146.6215 100.812047) (xy 146.6215 100.457) + (xy 146.4945 100.33) (xy 145.4785 100.33) (xy 145.4785 101.092) (xy 145.6055 101.219) (xy 146.012453 101.219) + (xy 146.214548 101.219) (xy 146.401259 101.141661) (xy 146.544162 100.998758) (xy 146.6215 100.812047) (xy 146.6215 104.330333) + (xy 146.598216 104.330313) (xy 146.491941 104.374224) (xy 146.4945 104.368047) (xy 146.4945 104.013) (xy 146.4945 103.632) + (xy 146.4945 103.276953) (xy 146.417162 103.090242) (xy 146.274259 102.947339) (xy 146.087548 102.87) (xy 145.885453 102.87) + (xy 145.4785 102.87) (xy 145.3515 102.997) (xy 145.3515 101.092) (xy 145.3515 100.33) (xy 144.3355 100.33) + (xy 144.2085 100.457) (xy 144.2085 100.812047) (xy 144.285838 100.998758) (xy 144.428741 101.141661) (xy 144.615452 101.219) + (xy 144.817547 101.219) (xy 145.2245 101.219) (xy 145.3515 101.092) (xy 145.3515 102.997) (xy 145.3515 103.759) + (xy 146.3675 103.759) (xy 146.4945 103.632) (xy 146.4945 104.013) (xy 146.3675 103.886) (xy 145.3515 103.886) + (xy 145.3515 103.906) (xy 145.2245 103.906) (xy 145.2245 103.886) (xy 145.2245 103.759) (xy 145.2245 102.997) + (xy 145.0975 102.87) (xy 144.690547 102.87) (xy 144.488452 102.87) (xy 144.301741 102.947339) (xy 144.158838 103.090242) + (xy 144.0815 103.276953) (xy 144.0815 103.632) (xy 144.2085 103.759) (xy 145.2245 103.759) (xy 145.2245 103.886) + (xy 144.2085 103.886) (xy 144.0815 104.013) (xy 144.0815 104.368047) (xy 144.158838 104.554758) (xy 144.301741 104.697661) + (xy 144.488452 104.775) (xy 144.301742 104.852338) (xy 144.158839 104.995241) (xy 144.0815 105.181952) (xy 144.0815 105.384047) + (xy 144.0815 106.273047) (xy 144.158838 106.459758) (xy 144.25208 106.553) (xy 142.43039 106.553) (xy 142.430665 106.237367) + (xy 142.285961 105.887157) (xy 142.163815 105.764797) (xy 142.177417 105.751219) (xy 142.303357 105.447923) (xy 142.303643 105.119518) + (xy 142.178233 104.816002) (xy 141.946219 104.583583) (xy 141.642923 104.457643) (xy 141.314518 104.457357) (xy 141.211817 104.499791) + (xy 140.788368 104.076342) (xy 141.158633 104.076665) (xy 141.508843 103.931961) (xy 141.682107 103.759) (xy 142.113 103.759) + (xy 142.356004 103.710664) (xy 142.562013 103.573013) (xy 142.816013 103.319013) (xy 142.953664 103.113004) (xy 143.002 102.87) + (xy 143.002 101.854) (xy 142.953664 101.610996) (xy 142.953664 101.610995) (xy 142.816013 101.404987) (xy 141.863513 100.452487) + (xy 141.657504 100.314836) (xy 141.4145 100.2665) (xy 139.645526 100.2665) (xy 139.187192 99.808166) (xy 139.349843 99.740961) + (xy 139.523107 99.568) (xy 142.494 99.568) (xy 142.737004 99.519664) (xy 142.943013 99.382013) (xy 144.154026 98.171) + (xy 144.2085 98.171) (xy 144.2085 98.907047) (xy 144.285838 99.093758) (xy 144.428741 99.236661) (xy 144.615452 99.314) + (xy 144.428741 99.391339) (xy 144.285838 99.534242) (xy 144.2085 99.720953) (xy 144.2085 100.076) (xy 144.3355 100.203) + (xy 145.3515 100.203) (xy 145.3515 99.441) (xy 145.2245 99.314) (xy 145.6055 99.314) (xy 145.4785 99.441) + (xy 145.4785 100.203) (xy 146.4945 100.203) (xy 146.6215 100.076) (xy 146.6215 99.758334) (xy 147.025784 99.758687) + (xy 147.422689 99.594689) (xy 147.551202 99.4664) (xy 147.755848 99.4664) (xy 148.922224 100.632776) (xy 149.177675 100.803463) + (xy 149.479 100.8634) (xy 155.194 100.8634) (xy 155.495325 100.803463) (xy 155.750776 100.632776) (xy 157.768021 98.61553) + (xy 157.947784 98.615687) (xy 158.344689 98.451689) (xy 158.648622 98.148286) (xy 158.813313 97.751668) (xy 158.813687 97.322216) + (xy 158.649689 96.925311) (xy 158.5214 96.796797) (xy 158.5214 96.084152) (xy 161.197021 93.40853) (xy 161.376784 93.408687) + (xy 161.773689 93.244689) (xy 162.077622 92.941286) (xy 162.242313 92.544668) (xy 162.242687 92.115216) (xy 162.22607 92.075) + (xy 163.312974 92.075) (xy 165.217974 93.98) (xy 164.728025 93.98) (xy 164.274453 93.526427) (xy 164.274665 93.283367) + (xy 164.129961 92.933157) (xy 163.862253 92.66498) (xy 163.512295 92.519665) (xy 163.133367 92.519335) (xy 162.783157 92.664039) + (xy 162.51498 92.931747) (xy 162.369665 93.281705) (xy 162.369335 93.660633) (xy 162.514039 94.010843) (xy 162.781747 94.27902) + (xy 163.131705 94.424335) (xy 163.376522 94.424548) (xy 164.015987 95.064013) (xy 164.221996 95.201664) (xy 164.465 95.25) + (xy 166.057587 95.25) (xy 165.925665 95.567705) (xy 165.925335 95.946633) (xy 166.070039 96.296843) (xy 166.337747 96.56502) + (xy 166.687705 96.710335) (xy 167.066633 96.710665) (xy 167.416843 96.565961) (xy 167.68502 96.298253) (xy 167.830335 95.948295) + (xy 167.830665 95.569367) (xy 167.698705 95.25) (xy 178.816 95.25) (xy 179.059004 95.201664) (xy 179.265013 95.064013) + (xy 179.646013 94.683013) (xy 179.783664 94.477005) (xy 179.783664 94.477004) (xy 179.825913 94.264599) (xy 179.896417 94.194219) + (xy 180.022357 93.890923) (xy 180.022555 93.6625) (xy 183.134 93.6625) (xy 183.401304 93.60933) (xy 183.401305 93.60933) + (xy 183.627914 93.457914) (xy 187.183914 89.901914) (xy 187.335329 89.675305) (xy 187.33533 89.675304) (xy 187.375868 89.4715) + (xy 187.375869 89.4715) (xy 187.489547 89.4715) (xy 187.676258 89.394162) (xy 187.819161 89.251259) (xy 187.8965 89.064548) + (xy 187.8965 88.862453) (xy 187.8965 87.465453) (xy 187.819162 87.278742) (xy 187.676259 87.135839) (xy 187.489548 87.0585) + (xy 187.287453 87.0585) (xy 185.890453 87.0585) (xy 185.703742 87.135838) (xy 185.560839 87.278741) (xy 185.4835 87.465452) + (xy 185.4835 87.667547) (xy 185.4835 89.064547) (xy 185.560838 89.251258) (xy 185.703741 89.394161) (xy 185.712417 89.397754) + (xy 182.844672 92.2655) (xy 180.530445 92.2655) (xy 180.530643 92.038518) (xy 180.465311 91.880402) (xy 180.497843 91.866961) + (xy 180.76602 91.599253) (xy 180.911335 91.249295) (xy 180.911665 90.870367) (xy 180.884655 90.805) (xy 181.279027 90.805) + (xy 181.450747 90.97702) (xy 181.800705 91.122335) (xy 182.179633 91.122665) (xy 182.529843 90.977961) (xy 182.79802 90.710253) + (xy 182.943335 90.360295) (xy 182.943665 89.981367) (xy 182.798961 89.631157) (xy 182.531253 89.36298) (xy 182.181295 89.217665) + (xy 181.802367 89.217335) (xy 181.452157 89.362039) (xy 181.278892 89.535) (xy 178.62551 89.535) (xy 178.774998 89.473233) + (xy 179.007417 89.241219) (xy 179.133357 88.937923) (xy 179.133643 88.609518) (xy 179.017397 88.328182) (xy 179.133357 88.048923) + (xy 179.133643 87.720518) (xy 179.017464 87.439344) (xy 179.385633 87.439665) (xy 179.735843 87.294961) (xy 180.00402 87.027253) + (xy 180.149335 86.677295) (xy 180.149665 86.298367) (xy 180.07018 86.106) (xy 187.96 86.106) (xy 188.203004 86.057664) + (xy 188.409013 85.920013) (xy 192.668026 81.661) (xy 196.320804 81.661) (xy 196.215221 81.915273) (xy 196.21478 82.42051) + (xy 196.407718 82.887458) (xy 196.764663 83.245026) (xy 197.231273 83.438779) (xy 197.73651 83.43922) (xy 198.203458 83.246282) + (xy 198.561026 82.889337) (xy 198.754779 82.422727) (xy 198.75478 82.420512) (xy 198.947718 82.887458) (xy 199.304663 83.245026) + (xy 199.771273 83.438779) (xy 200.27651 83.43922) (xy 200.743458 83.246282) (xy 201.101026 82.889337) (xy 201.294779 82.422727) + (xy 201.29522 81.91749) (xy 201.102282 81.450542) (xy 200.745337 81.092974) (xy 200.278727 80.899221) (xy 200.276512 80.899219) + (xy 200.743458 80.706282) (xy 201.101026 80.349337) (xy 201.294779 79.882727) (xy 201.29522 79.37749) (xy 201.259934 79.292091) + (xy 202.125013 78.427013) (xy 202.262664 78.221004) (xy 202.311 77.978) (xy 202.311001 77.978) (xy 202.311001 81.221525) + (xy 202.232336 81.339256) (xy 202.184 81.58226) (xy 202.184 91.176974) (xy 201.29522 92.065754) (xy 201.29522 89.28349) + (xy 201.102282 88.816542) (xy 200.745337 88.458974) (xy 200.278727 88.265221) (xy 200.276512 88.265219) (xy 200.743458 88.072282) + (xy 201.101026 87.715337) (xy 201.294779 87.248727) (xy 201.29522 86.74349) (xy 201.102282 86.276542) (xy 200.745337 85.918974) + (xy 200.278727 85.725221) (xy 199.77349 85.72478) (xy 199.306542 85.917718) (xy 198.948974 86.274663) (xy 198.755221 86.741273) + (xy 198.755 86.994464) (xy 198.755 86.131953) (xy 198.677662 85.945242) (xy 198.534759 85.802339) (xy 198.348048 85.725) + (xy 198.145953 85.725) (xy 196.621953 85.725) (xy 196.435242 85.802338) (xy 196.292339 85.945241) (xy 196.215 86.131952) + (xy 196.215 86.334047) (xy 196.215 87.461114) (xy 196.182816 87.467516) (xy 195.976807 87.605167) (xy 190.439377 93.142597) + (xy 190.439377 91.030042) (xy 190.436709 90.814401) (xy 190.436709 88.026065) (xy 190.253418 87.582465) (xy 189.91432 87.242775) + (xy 189.471041 87.05871) (xy 188.991065 87.058291) (xy 188.547465 87.241582) (xy 188.207775 87.58068) (xy 188.02371 88.023959) + (xy 188.023291 88.503935) (xy 188.206582 88.947535) (xy 188.54568 89.287225) (xy 188.988959 89.47129) (xy 189.468935 89.471709) + (xy 189.912535 89.288418) (xy 190.252225 88.94932) (xy 190.43629 88.506041) (xy 190.436709 88.026065) (xy 190.436709 90.814401) + (xy 190.433439 90.550104) (xy 190.261199 90.13428) (xy 190.053644 90.071159) (xy 189.963841 90.160962) (xy 189.963841 89.981356) + (xy 189.90072 89.773801) (xy 189.455042 89.595623) (xy 188.975104 89.601561) (xy 188.55928 89.773801) (xy 188.496159 89.981356) + (xy 189.23 90.715197) (xy 189.963841 89.981356) (xy 189.963841 90.160962) (xy 189.319803 90.805) (xy 190.053644 91.538841) + (xy 190.261199 91.47572) (xy 190.439377 91.030042) (xy 190.439377 93.142597) (xy 189.963841 93.618133) (xy 189.963841 91.628644) + (xy 189.23 90.894803) (xy 189.140197 90.984606) (xy 189.140197 90.805) (xy 188.406356 90.071159) (xy 188.198801 90.13428) + (xy 188.020623 90.579958) (xy 188.026561 91.059896) (xy 188.198801 91.47572) (xy 188.406356 91.538841) (xy 189.140197 90.805) + (xy 189.140197 90.984606) (xy 188.496159 91.628644) (xy 188.55928 91.836199) (xy 189.004958 92.014377) (xy 189.484896 92.008439) + (xy 189.90072 91.836199) (xy 189.963841 91.628644) (xy 189.963841 93.618133) (xy 183.210767 100.371207) (xy 183.073116 100.577216) + (xy 183.02478 100.82022) (xy 183.02478 105.256194) (xy 182.435643 105.84533) (xy 182.435643 104.738518) (xy 182.319397 104.457182) + (xy 182.435357 104.177923) (xy 182.435643 103.849518) (xy 182.310233 103.546002) (xy 182.078219 103.313583) (xy 181.774923 103.187643) + (xy 181.446518 103.187357) (xy 181.143002 103.312767) (xy 180.910583 103.544781) (xy 180.784643 103.848077) (xy 180.784357 104.176482) + (xy 180.900602 104.457817) (xy 180.784643 104.737077) (xy 180.784357 105.065482) (xy 180.909767 105.368998) (xy 181.141781 105.601417) + (xy 181.445077 105.727357) (xy 181.773482 105.727643) (xy 182.076998 105.602233) (xy 182.309417 105.370219) (xy 182.435357 105.066923) + (xy 182.435643 104.738518) (xy 182.435643 105.84533) (xy 181.537537 106.743436) (xy 181.446518 106.743357) (xy 181.143002 106.868767) + (xy 180.910583 107.100781) (xy 180.784643 107.404077) (xy 180.784562 107.496536) (xy 180.657665 107.369639) (xy 180.657665 102.681367) + (xy 180.512961 102.331157) (xy 180.245253 102.06298) (xy 179.895295 101.917665) (xy 179.516367 101.917335) (xy 179.166157 102.062039) + (xy 178.89798 102.329747) (xy 178.752665 102.679705) (xy 178.752335 103.058633) (xy 178.897039 103.408843) (xy 179.164747 103.67702) + (xy 179.514705 103.822335) (xy 179.893633 103.822665) (xy 180.243843 103.677961) (xy 180.51202 103.410253) (xy 180.657335 103.060295) + (xy 180.657665 102.681367) (xy 180.657665 107.369639) (xy 179.006453 105.718427) (xy 179.006665 105.475367) (xy 178.861961 105.125157) + (xy 178.594253 104.85698) (xy 178.244295 104.711665) (xy 177.865367 104.711335) (xy 177.515157 104.856039) (xy 177.355709 105.015208) + (xy 177.355709 102.631065) (xy 177.355709 97.551065) (xy 177.172418 97.107465) (xy 176.83332 96.767775) (xy 176.390041 96.58371) + (xy 175.910065 96.583291) (xy 175.466465 96.766582) (xy 175.126775 97.10568) (xy 174.94271 97.548959) (xy 174.942291 98.028935) + (xy 175.125582 98.472535) (xy 175.46468 98.812225) (xy 175.907959 98.99629) (xy 176.387935 98.996709) (xy 176.831535 98.813418) + (xy 177.171225 98.47432) (xy 177.35529 98.031041) (xy 177.355709 97.551065) (xy 177.355709 102.631065) (xy 177.172418 102.187465) + (xy 176.83332 101.847775) (xy 176.390041 101.66371) (xy 175.910065 101.663291) (xy 175.466465 101.846582) (xy 175.126775 102.18568) + (xy 174.94271 102.628959) (xy 174.942291 103.108935) (xy 175.125582 103.552535) (xy 175.46468 103.892225) (xy 175.907959 104.07629) + (xy 176.387935 104.076709) (xy 176.831535 103.893418) (xy 177.171225 103.55432) (xy 177.35529 103.111041) (xy 177.355709 102.631065) + (xy 177.355709 105.015208) (xy 177.24698 105.123747) (xy 177.101665 105.473705) (xy 177.101335 105.852633) (xy 177.246039 106.202843) + (xy 177.513747 106.47102) (xy 177.863705 106.616335) (xy 178.108522 106.616548) (xy 180.086 108.594026) (xy 180.086 110.745767) + (xy 179.91398 110.917487) (xy 179.768665 111.267445) (xy 179.768335 111.646373) (xy 179.913039 111.996583) (xy 180.180747 112.26476) + (xy 180.530705 112.410075) (xy 180.909633 112.410405) (xy 181.259843 112.265701) (xy 181.52802 111.997993) (xy 181.673335 111.648035) + (xy 181.673665 111.269107) (xy 181.587875 111.061481) (xy 181.773482 111.061643) (xy 182.076998 110.936233) (xy 182.309417 110.704219) + (xy 182.435357 110.400923) (xy 182.435643 110.072518) (xy 182.398241 109.982) (xy 187.04814 109.982) (xy 187.291144 109.933664) + (xy 187.497153 109.796013) (xy 188.319592 108.973573) (xy 188.562653 108.973785) (xy 188.912863 108.829081) (xy 189.18104 108.561373) + (xy 189.257152 108.378072) (xy 189.323242 108.444162) (xy 189.509953 108.5215) (xy 189.865 108.5215) (xy 189.992 108.3945) + (xy 189.992 107.3785) (xy 189.23 107.3785) (xy 189.154126 107.454373) (xy 188.914273 107.2141) (xy 188.564315 107.068785) + (xy 188.185387 107.068455) (xy 187.835177 107.213159) (xy 187.567 107.480867) (xy 187.421685 107.830825) (xy 187.421471 108.075642) + (xy 186.785114 108.712) (xy 182.398368 108.712) (xy 182.435357 108.622923) (xy 182.435437 108.530588) (xy 184.077746 106.88828) + (xy 189.103 106.88828) (xy 189.103 107.1245) (xy 189.23 107.2515) (xy 189.992 107.2515) (xy 189.992 107.2315) + (xy 190.119 107.2315) (xy 190.119 107.2515) (xy 190.139 107.2515) (xy 190.139 107.3785) (xy 190.119 107.3785) + (xy 190.119 108.3945) (xy 190.246 108.5215) (xy 190.601047 108.5215) (xy 190.787758 108.444162) (xy 190.930661 108.301259) + (xy 191.008 108.114548) (xy 191.085338 108.301258) (xy 191.228241 108.444161) (xy 191.414952 108.5215) (xy 191.617047 108.5215) + (xy 192.173801 108.5215) (xy 192.173695 108.644093) (xy 192.318399 108.994303) (xy 192.586107 109.26248) (xy 192.727748 109.321294) + (xy 192.595687 109.639332) (xy 192.595313 110.068784) (xy 192.759311 110.465689) (xy 193.062714 110.769622) (xy 193.459332 110.934313) + (xy 193.888784 110.934687) (xy 194.285689 110.770689) (xy 194.589622 110.467286) (xy 194.754313 110.070668) (xy 194.754687 109.641216) + (xy 194.590689 109.244311) (xy 194.287286 108.940378) (xy 194.005024 108.823172) (xy 194.078695 108.645755) (xy 194.079025 108.266827) + (xy 193.934321 107.916617) (xy 193.917927 107.900194) (xy 194.081622 107.736786) (xy 194.246313 107.340168) (xy 194.246687 106.910716) + (xy 194.082689 106.513811) (xy 193.800638 106.231267) (xy 193.832843 106.217961) (xy 194.10102 105.950253) (xy 194.246335 105.600295) + (xy 194.246665 105.221367) (xy 194.101961 104.871157) (xy 193.834253 104.60298) (xy 193.484295 104.457665) (xy 193.105367 104.457335) + (xy 192.755157 104.602039) (xy 192.48698 104.869747) (xy 192.341665 105.219705) (xy 192.341474 105.4383) (xy 192.151736 105.61828) + (xy 191.7065 105.61828) (xy 191.7065 100.558048) (xy 191.7065 100.355953) (xy 191.7065 99.466953) (xy 191.629162 99.280242) + (xy 191.486259 99.137339) (xy 191.299548 99.06) (xy 191.486259 98.982661) (xy 191.629162 98.839758) (xy 191.7065 98.653047) + (xy 191.7065 98.298) (xy 191.7065 97.917) (xy 191.7065 97.561953) (xy 191.629162 97.375242) (xy 191.486259 97.232339) + (xy 191.299548 97.155) (xy 191.097453 97.155) (xy 190.6905 97.155) (xy 190.5635 97.282) (xy 190.5635 98.044) + (xy 191.5795 98.044) (xy 191.7065 97.917) (xy 191.7065 98.298) (xy 191.5795 98.171) (xy 190.5635 98.171) + (xy 190.5635 98.191) (xy 190.4365 98.191) (xy 190.4365 98.171) (xy 190.4365 98.044) (xy 190.4365 97.282) + (xy 190.3095 97.155) (xy 189.902547 97.155) (xy 189.700452 97.155) (xy 189.513741 97.232339) (xy 189.370838 97.375242) + (xy 189.2935 97.561953) (xy 189.2935 97.917) (xy 189.4205 98.044) (xy 190.4365 98.044) (xy 190.4365 98.171) + (xy 189.4205 98.171) (xy 189.2935 98.298) (xy 189.2935 98.653047) (xy 189.370838 98.839758) (xy 189.513741 98.982661) + (xy 189.700452 99.06) (xy 189.513742 99.137338) (xy 189.370839 99.280241) (xy 189.2935 99.466952) (xy 189.2935 99.669047) + (xy 189.2935 100.434051) (xy 189.133258 100.594014) (xy 188.968567 100.990632) (xy 188.968193 101.420084) (xy 189.132191 101.816989) + (xy 189.435594 102.120922) (xy 189.832212 102.285613) (xy 190.261664 102.285987) (xy 190.658569 102.121989) (xy 190.962502 101.818586) + (xy 191.127193 101.421968) (xy 191.127381 101.205287) (xy 191.227463 101.055505) (xy 191.245465 100.965) (xy 191.299547 100.965) + (xy 191.486258 100.887662) (xy 191.629161 100.744759) (xy 191.7065 100.558048) (xy 191.7065 105.61828) (xy 189.706152 105.61828) + (xy 189.750535 105.511395) (xy 189.750865 105.132467) (xy 189.606161 104.782257) (xy 189.338453 104.51408) (xy 188.988495 104.368765) + (xy 188.609567 104.368435) (xy 188.259357 104.513139) (xy 187.99118 104.780847) (xy 187.845865 105.130805) (xy 187.845535 105.509733) + (xy 187.890385 105.61828) (xy 184.275076 105.61828) (xy 184.29478 105.51922) (xy 184.294781 105.51922) (xy 184.29478 105.519214) + (xy 184.29478 101.083246) (xy 196.299343 89.078682) (xy 196.215221 89.281273) (xy 196.21478 89.78651) (xy 196.407718 90.253458) + (xy 196.764663 90.611026) (xy 197.231273 90.804779) (xy 197.73651 90.80522) (xy 198.203458 90.612282) (xy 198.561026 90.255337) + (xy 198.754779 89.788727) (xy 198.75478 89.786512) (xy 198.947718 90.253458) (xy 199.304663 90.611026) (xy 199.771273 90.804779) + (xy 200.27651 90.80522) (xy 200.743458 90.612282) (xy 201.101026 90.255337) (xy 201.294779 89.788727) (xy 201.29522 89.28349) + (xy 201.29522 92.065754) (xy 198.872974 94.488) (xy 198.628 94.488) (xy 198.384995 94.536336) (xy 198.302479 94.591471) + (xy 198.178987 94.673987) (xy 198.178984 94.67399) (xy 196.654987 96.197987) (xy 196.517336 96.403996) (xy 196.469 96.647) + (xy 196.469 97.967027) (xy 196.29698 98.138747) (xy 196.151665 98.488705) (xy 196.151335 98.867633) (xy 196.296039 99.217843) + (xy 196.563747 99.48602) (xy 196.913705 99.631335) (xy 197.292633 99.631665) (xy 197.642843 99.486961) (xy 197.811235 99.318862) + (xy 197.8025 99.339953) (xy 197.8025 99.695) (xy 197.9295 99.822) (xy 198.9455 99.822) (xy 198.9455 99.06) + (xy 198.8185 98.933) (xy 198.411547 98.933) (xy 198.209452 98.933) (xy 198.022741 99.010339) (xy 197.980035 99.053044) + (xy 198.056335 98.869295) (xy 198.056665 98.490367) (xy 197.911961 98.140157) (xy 197.739 97.966892) (xy 197.739 96.910025) + (xy 198.437436 96.211589) (xy 198.437335 96.327633) (xy 198.582039 96.677843) (xy 198.849747 96.94602) (xy 199.199705 97.091335) + (xy 199.578633 97.091665) (xy 199.928843 96.946961) (xy 200.19702 96.679253) (xy 200.342335 96.329295) (xy 200.342548 96.084477) + (xy 205.015533 91.411493) (xy 205.153184 91.205484) (xy 205.20152 90.96248) (xy 205.20152 85.923892) (xy 205.37354 85.752173) + (xy 205.518855 85.402215) (xy 205.519185 85.023287) (xy 205.374481 84.673077) (xy 205.106773 84.4049) (xy 204.756815 84.259585) + (xy 204.377887 84.259255) (xy 204.027677 84.403959) (xy 203.7595 84.671667) (xy 203.614185 85.021625) (xy 203.613855 85.400553) + (xy 203.758559 85.750763) (xy 203.93152 85.924027) (xy 203.93152 90.699454) (xy 203.454 91.176974) (xy 203.454 81.845286) + (xy 205.606832 79.692453) (xy 205.849893 79.692665) (xy 206.200103 79.547961) (xy 206.46828 79.280253) (xy 206.613595 78.930295) + (xy 206.613925 78.551367) (xy 206.613925 89.668048) (xy 205.417987 90.863987) (xy 205.280336 91.069996) (xy 205.232 91.313) + (xy 205.232 115.052974) (xy 204.6605 115.624473) (xy 204.6605 102.336048) (xy 204.6605 102.133953) (xy 204.6605 101.244953) + (xy 204.583162 101.058242) (xy 204.440259 100.915339) (xy 204.253548 100.838) (xy 204.440259 100.760661) (xy 204.583162 100.617758) + (xy 204.6605 100.431047) (xy 204.6605 100.076) (xy 204.6605 99.695) (xy 204.6605 99.339953) (xy 204.583162 99.153242) + (xy 204.440259 99.010339) (xy 204.253548 98.933) (xy 204.051453 98.933) (xy 203.6445 98.933) (xy 203.5175 99.06) + (xy 203.5175 99.822) (xy 204.5335 99.822) (xy 204.6605 99.695) (xy 204.6605 100.076) (xy 204.5335 99.949) + (xy 203.5175 99.949) (xy 203.5175 99.969) (xy 203.3905 99.969) (xy 203.3905 99.949) (xy 203.3905 99.822) + (xy 203.3905 99.06) (xy 203.2635 98.933) (xy 202.856547 98.933) (xy 202.654452 98.933) (xy 202.467741 99.010339) + (xy 202.324838 99.153242) (xy 202.2475 99.339953) (xy 202.2475 99.695) (xy 202.3745 99.822) (xy 203.3905 99.822) + (xy 203.3905 99.949) (xy 202.3745 99.949) (xy 202.2475 100.076) (xy 202.2475 100.431047) (xy 202.324838 100.617758) + (xy 202.467741 100.760661) (xy 202.654452 100.838) (xy 202.467742 100.915338) (xy 202.324839 101.058241) (xy 202.2475 101.244952) + (xy 202.2475 101.447047) (xy 202.2475 101.925533) (xy 201.870491 102.081311) (xy 201.566558 102.384714) (xy 201.401867 102.781332) + (xy 201.401493 103.210784) (xy 201.565491 103.607689) (xy 201.868894 103.911622) (xy 202.265512 104.076313) (xy 202.694964 104.076687) + (xy 203.091869 103.912689) (xy 203.395802 103.609286) (xy 203.521689 103.306115) (xy 203.755325 103.259643) (xy 204.010776 103.088956) + (xy 204.181463 102.833505) (xy 204.199465 102.743) (xy 204.253547 102.743) (xy 204.440258 102.665662) (xy 204.583161 102.522759) + (xy 204.6605 102.336048) (xy 204.6605 115.624473) (xy 204.283054 116.001919) (xy 203.956247 116.001635) (xy 203.606037 116.146339) + (xy 203.33786 116.414047) (xy 203.192545 116.764005) (xy 203.192215 117.142933) (xy 203.336919 117.493143) (xy 203.604627 117.76132) + (xy 203.954585 117.906635) (xy 204.333513 117.906965) (xy 204.683723 117.762261) (xy 204.9519 117.494553) (xy 205.097215 117.144595) + (xy 205.097355 116.98367) (xy 206.316013 115.765013) (xy 206.453664 115.559004) (xy 206.502 115.316) (xy 206.502 111.01778) + (xy 206.619072 111.066393) (xy 207.048524 111.066767) (xy 207.0735 111.056447) (xy 207.0735 111.252) (xy 207.2005 111.379) + (xy 208.2165 111.379) (xy 208.2165 110.617) (xy 208.0895 110.49) (xy 208.4705 110.49) (xy 208.3435 110.617) + (xy 208.3435 111.379) (xy 209.3595 111.379) (xy 209.4865 111.252) (xy 209.4865 110.896953) (xy 209.409162 110.710242) + (xy 209.266259 110.567339) (xy 209.079548 110.49) (xy 209.079547 110.49) (xy 209.266258 110.412662) (xy 209.409161 110.269759) + (xy 209.4865 110.083048) (xy 209.4865 109.880953) (xy 209.4865 108.991953) (xy 209.409162 108.805242) (xy 209.266259 108.662339) + (xy 209.079548 108.585) (xy 208.877453 108.585) (xy 207.480453 108.585) (xy 207.293742 108.662338) (xy 207.186528 108.769551) + (xy 206.982995 108.810037) (xy 206.837009 108.907581) (xy 206.620956 108.907393) (xy 206.502 108.956544) (xy 206.502 91.576026) + (xy 222.334343 75.743682) (xy 222.250221 75.946273) (xy 222.24978 76.45151) (xy 222.442718 76.918458) (xy 222.799663 77.276026) + (xy 223.266273 77.469779) (xy 223.77151 77.47022) (xy 224.238458 77.277282) (xy 224.596026 76.920337) (xy 224.789779 76.453727) + (xy 224.79022 75.94849) (xy 224.79022 87.629937) (xy 224.524962 87.632534) (xy 224.081177 87.816355) (xy 224.010307 88.030504) + (xy 224.79 88.810197) (xy 225.569693 88.030504) (xy 225.569693 88.21011) (xy 224.879803 88.9) (xy 225.659496 89.679693) + (xy 225.873645 89.608823) (xy 226.062412 89.140174) (xy 226.062412 137.400174) (xy 226.06022 137.17627) (xy 226.06022 134.36849) + (xy 225.867282 133.901542) (xy 225.510337 133.543974) (xy 225.043727 133.350221) (xy 225.041512 133.350219) (xy 225.508458 133.157282) + (xy 225.866026 132.800337) (xy 226.059779 132.333727) (xy 226.06022 131.82849) (xy 225.867282 131.361542) (xy 225.510337 131.003974) + (xy 225.043727 130.810221) (xy 225.041512 130.810219) (xy 225.508458 130.617282) (xy 225.866026 130.260337) (xy 226.059779 129.793727) + (xy 226.06022 129.28849) (xy 225.867282 128.821542) (xy 225.510337 128.463974) (xy 225.043727 128.270221) (xy 225.041512 128.270219) + (xy 225.508458 128.077282) (xy 225.866026 127.720337) (xy 226.059779 127.253727) (xy 226.06022 126.74849) (xy 225.867282 126.281542) + (xy 225.510337 125.923974) (xy 225.043727 125.730221) (xy 225.041512 125.730219) (xy 225.508458 125.537282) (xy 225.866026 125.180337) + (xy 226.059779 124.713727) (xy 226.06022 124.20849) (xy 225.867282 123.741542) (xy 225.510337 123.383974) (xy 225.043727 123.190221) + (xy 225.041512 123.190219) (xy 225.508458 122.997282) (xy 225.866026 122.640337) (xy 226.059779 122.173727) (xy 226.06022 121.66849) + (xy 225.867282 121.201542) (xy 225.510337 120.843974) (xy 225.043727 120.650221) (xy 225.041512 120.650219) (xy 225.508458 120.457282) + (xy 225.866026 120.100337) (xy 226.059779 119.633727) (xy 226.06022 119.12849) (xy 225.867282 118.661542) (xy 225.510337 118.303974) + (xy 225.043727 118.110221) (xy 225.041512 118.110219) (xy 225.508458 117.917282) (xy 225.866026 117.560337) (xy 226.059779 117.093727) + (xy 226.06022 116.58849) (xy 225.867282 116.121542) (xy 225.510337 115.763974) (xy 225.043727 115.570221) (xy 225.041512 115.570219) + (xy 225.508458 115.377282) (xy 225.866026 115.020337) (xy 226.059779 114.553727) (xy 226.06022 114.04849) (xy 225.867282 113.581542) + (xy 225.510337 113.223974) (xy 225.043727 113.030221) (xy 225.041512 113.030219) (xy 225.508458 112.837282) (xy 225.866026 112.480337) + (xy 226.059779 112.013727) (xy 226.06022 111.50849) (xy 225.867282 111.041542) (xy 225.510337 110.683974) (xy 225.043727 110.490221) + (xy 225.041512 110.490219) (xy 225.508458 110.297282) (xy 225.866026 109.940337) (xy 226.059779 109.473727) (xy 226.06022 108.96849) + (xy 225.867282 108.501542) (xy 225.510337 108.143974) (xy 225.043727 107.950221) (xy 225.041512 107.950219) (xy 225.508458 107.757282) + (xy 225.866026 107.400337) (xy 226.059779 106.933727) (xy 226.06022 106.42849) (xy 225.867282 105.961542) (xy 225.510337 105.603974) + (xy 225.043727 105.410221) (xy 225.041512 105.410219) (xy 225.508458 105.217282) (xy 225.866026 104.860337) (xy 226.059779 104.393727) + (xy 226.06022 103.88849) (xy 225.867282 103.421542) (xy 225.510337 103.063974) (xy 225.043727 102.870221) (xy 225.041512 102.870219) + (xy 225.508458 102.677282) (xy 225.866026 102.320337) (xy 226.059779 101.853727) (xy 226.06022 101.34849) (xy 225.867282 100.881542) + (xy 225.510337 100.523974) (xy 225.043727 100.330221) (xy 225.041512 100.330219) (xy 225.508458 100.137282) (xy 225.866026 99.780337) + (xy 226.059779 99.313727) (xy 226.06022 98.80849) (xy 225.867282 98.341542) (xy 225.510337 97.983974) (xy 225.043727 97.790221) + (xy 225.041512 97.790219) (xy 225.508458 97.597282) (xy 225.866026 97.240337) (xy 226.059779 96.773727) (xy 226.06022 96.26849) + (xy 225.867282 95.801542) (xy 225.510337 95.443974) (xy 225.043727 95.250221) (xy 225.041512 95.250219) (xy 225.508458 95.057282) + (xy 225.866026 94.700337) (xy 226.059779 94.233727) (xy 226.06022 93.72849) (xy 225.867282 93.261542) (xy 225.510337 92.903974) + (xy 225.043727 92.710221) (xy 225.041512 92.710219) (xy 225.508458 92.517282) (xy 225.866026 92.160337) (xy 226.059779 91.693727) + (xy 226.06022 91.18849) (xy 225.867282 90.721542) (xy 225.510337 90.363974) (xy 225.043727 90.170221) (xy 224.795737 90.170004) + (xy 225.055038 90.167466) (xy 225.498823 89.983645) (xy 225.569693 89.769496) (xy 224.79 88.989803) (xy 224.010307 89.769496) + (xy 224.081177 89.983645) (xy 224.543302 90.169784) (xy 224.53849 90.16978) (xy 224.071542 90.362718) (xy 223.713974 90.719663) + (xy 223.520221 91.186273) (xy 223.520219 91.188487) (xy 223.327282 90.721542) (xy 222.970337 90.363974) (xy 222.503727 90.170221) + (xy 222.250535 90.17) (xy 223.113047 90.17) (xy 223.299758 90.092662) (xy 223.442661 89.949759) (xy 223.52 89.763048) + (xy 223.52 89.560953) (xy 223.52 88.906201) (xy 223.522534 89.165038) (xy 223.706355 89.608823) (xy 223.920504 89.679693) + (xy 224.700197 88.9) (xy 223.920504 88.120307) (xy 223.706355 88.191177) (xy 223.52 88.653837) (xy 223.52 88.036953) + (xy 223.442662 87.850242) (xy 223.299759 87.707339) (xy 223.113048 87.63) (xy 222.910953 87.63) (xy 221.386953 87.63) + (xy 221.200242 87.707338) (xy 221.057339 87.850241) (xy 220.98 88.036952) (xy 220.98 88.239047) (xy 220.98 89.763047) + (xy 221.057338 89.949758) (xy 221.200241 90.092661) (xy 221.386952 90.17) (xy 221.589047 90.17) (xy 221.997957 90.17) + (xy 221.531542 90.362718) (xy 221.173974 90.719663) (xy 220.980221 91.186273) (xy 220.97978 91.69151) (xy 221.172718 92.158458) + (xy 221.529663 92.516026) (xy 221.996273 92.709779) (xy 221.998487 92.70978) (xy 221.531542 92.902718) (xy 221.173974 93.259663) + (xy 220.980221 93.726273) (xy 220.97978 94.23151) (xy 221.172718 94.698458) (xy 221.529663 95.056026) (xy 221.996273 95.249779) + (xy 221.998487 95.24978) (xy 221.531542 95.442718) (xy 221.173974 95.799663) (xy 220.980221 96.266273) (xy 220.97978 96.77151) + (xy 221.172718 97.238458) (xy 221.529663 97.596026) (xy 221.996273 97.789779) (xy 221.998487 97.78978) (xy 221.531542 97.982718) + (xy 221.173974 98.339663) (xy 220.980221 98.806273) (xy 220.97978 99.31151) (xy 221.172718 99.778458) (xy 221.529663 100.136026) + (xy 221.996273 100.329779) (xy 221.998487 100.32978) (xy 221.531542 100.522718) (xy 221.173974 100.879663) (xy 220.980221 101.346273) + (xy 220.97978 101.85151) (xy 221.172718 102.318458) (xy 221.529663 102.676026) (xy 221.996273 102.869779) (xy 221.998487 102.86978) + (xy 221.531542 103.062718) (xy 221.173974 103.419663) (xy 220.980221 103.886273) (xy 220.97978 104.39151) (xy 221.172718 104.858458) + (xy 221.529663 105.216026) (xy 221.996273 105.409779) (xy 221.998487 105.40978) (xy 221.531542 105.602718) (xy 221.173974 105.959663) + (xy 220.980221 106.426273) (xy 220.97978 106.93151) (xy 221.172718 107.398458) (xy 221.529663 107.756026) (xy 221.996273 107.949779) + (xy 221.998487 107.94978) (xy 221.531542 108.142718) (xy 221.173974 108.499663) (xy 220.980221 108.966273) (xy 220.97978 109.47151) + (xy 221.172718 109.938458) (xy 221.529663 110.296026) (xy 221.996273 110.489779) (xy 221.998487 110.48978) (xy 221.531542 110.682718) + (xy 221.173974 111.039663) (xy 220.980221 111.506273) (xy 220.97978 112.01151) (xy 221.172718 112.478458) (xy 221.529663 112.836026) + (xy 221.996273 113.029779) (xy 221.998487 113.02978) (xy 221.531542 113.222718) (xy 221.173974 113.579663) (xy 220.980221 114.046273) + (xy 220.97978 114.55151) (xy 221.172718 115.018458) (xy 221.529663 115.376026) (xy 221.996273 115.569779) (xy 221.998487 115.56978) + (xy 221.531542 115.762718) (xy 221.173974 116.119663) (xy 220.980221 116.586273) (xy 220.97978 117.09151) (xy 221.172718 117.558458) + (xy 221.529663 117.916026) (xy 221.996273 118.109779) (xy 221.998487 118.10978) (xy 221.531542 118.302718) (xy 221.173974 118.659663) + (xy 220.980221 119.126273) (xy 220.97978 119.63151) (xy 221.172718 120.098458) (xy 221.529663 120.456026) (xy 221.996273 120.649779) + (xy 221.998487 120.64978) (xy 221.531542 120.842718) (xy 221.173974 121.199663) (xy 220.980221 121.666273) (xy 220.97978 122.17151) + (xy 221.172718 122.638458) (xy 221.529663 122.996026) (xy 221.996273 123.189779) (xy 221.998487 123.18978) (xy 221.531542 123.382718) + (xy 221.173974 123.739663) (xy 220.980221 124.206273) (xy 220.97978 124.71151) (xy 221.172718 125.178458) (xy 221.529663 125.536026) + (xy 221.996273 125.729779) (xy 221.998487 125.72978) (xy 221.531542 125.922718) (xy 221.173974 126.279663) (xy 220.980221 126.746273) + (xy 220.97978 127.25151) (xy 221.172718 127.718458) (xy 221.529663 128.076026) (xy 221.996273 128.269779) (xy 221.998487 128.26978) + (xy 221.531542 128.462718) (xy 221.173974 128.819663) (xy 220.980221 129.286273) (xy 220.97978 129.79151) (xy 221.172718 130.258458) + (xy 221.529663 130.616026) (xy 221.996273 130.809779) (xy 221.998487 130.80978) (xy 221.531542 131.002718) (xy 221.173974 131.359663) + (xy 220.980221 131.826273) (xy 220.97978 132.33151) (xy 221.172718 132.798458) (xy 221.529663 133.156026) (xy 221.996273 133.349779) + (xy 221.998487 133.34978) (xy 221.531542 133.542718) (xy 221.173974 133.899663) (xy 220.980221 134.366273) (xy 220.97978 134.87151) + (xy 221.172718 135.338458) (xy 221.529663 135.696026) (xy 221.996273 135.889779) (xy 221.998487 135.88978) (xy 221.531542 136.082718) + (xy 221.173974 136.439663) (xy 220.980221 136.906273) (xy 220.97978 137.41151) (xy 221.172718 137.878458) (xy 221.529663 138.236026) + (xy 221.996273 138.429779) (xy 222.50151 138.43022) (xy 222.968458 138.237282) (xy 223.326026 137.880337) (xy 223.519779 137.413727) + (xy 223.519995 137.165737) (xy 223.522534 137.425038) (xy 223.706355 137.868823) (xy 223.920504 137.939693) (xy 224.700197 137.16) + (xy 223.920504 136.380307) (xy 223.706355 136.451177) (xy 223.520215 136.913302) (xy 223.52022 136.90849) (xy 223.327282 136.441542) + (xy 222.970337 136.083974) (xy 222.503727 135.890221) (xy 222.501512 135.890219) (xy 222.968458 135.697282) (xy 223.326026 135.340337) + (xy 223.519779 134.873727) (xy 223.51978 134.871512) (xy 223.712718 135.338458) (xy 224.069663 135.696026) (xy 224.536273 135.889779) + (xy 224.784262 135.889995) (xy 224.524962 135.892534) (xy 224.081177 136.076355) (xy 224.010307 136.290504) (xy 224.79 137.070197) + (xy 225.569693 136.290504) (xy 225.498823 136.076355) (xy 225.036697 135.890215) (xy 225.04151 135.89022) (xy 225.508458 135.697282) + (xy 225.866026 135.340337) (xy 226.059779 134.873727) (xy 226.06022 134.36849) (xy 226.06022 137.17627) (xy 226.057466 136.894962) + (xy 225.873645 136.451177) (xy 225.659496 136.380307) (xy 224.879803 137.16) (xy 225.659496 137.939693) (xy 225.873645 137.868823) + (xy 226.062412 137.400174) (xy 226.062412 146.573) (xy 225.569693 146.573) (xy 225.569693 138.029496) (xy 224.79 137.249803) + (xy 224.010307 138.029496) (xy 224.081177 138.243645) (xy 224.549826 138.432412) (xy 225.055038 138.427466) (xy 225.498823 138.243645) + (xy 225.569693 138.029496) (xy 225.569693 146.573) (xy 220.954765 146.573) (xy 220.954765 115.566787) (xy 220.810061 115.216577) + (xy 220.542353 114.9484) (xy 220.192395 114.803085) (xy 219.813467 114.802755) (xy 219.463257 114.947459) (xy 219.19508 115.215167) + (xy 219.049765 115.565125) (xy 219.049435 115.944053) (xy 219.194139 116.294263) (xy 219.461847 116.56244) (xy 219.811805 116.707755) + (xy 220.190733 116.708085) (xy 220.540943 116.563381) (xy 220.80912 116.295673) (xy 220.954435 115.945715) (xy 220.954765 115.566787) + (xy 220.954765 146.573) (xy 218.44022 146.573) (xy 218.44022 134.36849) (xy 218.247282 133.901542) (xy 217.890337 133.543974) + (xy 217.642605 133.441106) (xy 217.642605 115.091807) (xy 217.497901 114.741597) (xy 217.230193 114.47342) (xy 216.880235 114.328105) + (xy 216.501307 114.327775) (xy 216.151097 114.472479) (xy 215.88292 114.740187) (xy 215.867145 114.778177) (xy 215.867145 107.817247) + (xy 215.722441 107.467037) (xy 215.454733 107.19886) (xy 215.104775 107.053545) (xy 214.725847 107.053215) (xy 214.375637 107.197919) + (xy 214.10746 107.465627) (xy 213.962145 107.815585) (xy 213.961815 108.194513) (xy 214.106519 108.544723) (xy 214.374227 108.8129) + (xy 214.724185 108.958215) (xy 215.103113 108.958545) (xy 215.453323 108.813841) (xy 215.7215 108.546133) (xy 215.866815 108.196175) + (xy 215.867145 107.817247) (xy 215.867145 114.778177) (xy 215.737605 115.090145) (xy 215.737275 115.469073) (xy 215.881979 115.819283) + (xy 216.149687 116.08746) (xy 216.499645 116.232775) (xy 216.878573 116.233105) (xy 217.228783 116.088401) (xy 217.49696 115.820693) + (xy 217.642275 115.470735) (xy 217.642605 115.091807) (xy 217.642605 133.441106) (xy 217.423727 133.350221) (xy 216.91849 133.34978) + (xy 216.451542 133.542718) (xy 216.093974 133.899663) (xy 215.900221 134.366273) (xy 215.89978 134.87151) (xy 216.092718 135.338458) + (xy 216.449663 135.696026) (xy 216.916273 135.889779) (xy 217.42151 135.89022) (xy 217.888458 135.697282) (xy 218.246026 135.340337) + (xy 218.439779 134.873727) (xy 218.44022 134.36849) (xy 218.44022 146.573) (xy 212.494047 146.573) (xy 212.494047 102.353956) + (xy 212.330049 101.957051) (xy 212.026646 101.653118) (xy 211.630028 101.488427) (xy 211.200576 101.488053) (xy 210.803671 101.652051) + (xy 210.675157 101.78034) (xy 210.5025 101.78034) (xy 210.5025 101.244953) (xy 210.425162 101.058242) (xy 210.282259 100.915339) + (xy 210.095548 100.838) (xy 210.282259 100.760661) (xy 210.425162 100.617758) (xy 210.5025 100.431047) (xy 210.5025 100.076) + (xy 210.5025 99.695) (xy 210.5025 99.339953) (xy 210.425162 99.153242) (xy 210.282259 99.010339) (xy 210.095548 98.933) + (xy 209.893453 98.933) (xy 209.4865 98.933) (xy 209.3595 99.06) (xy 209.3595 99.822) (xy 210.3755 99.822) + (xy 210.5025 99.695) (xy 210.5025 100.076) (xy 210.3755 99.949) (xy 209.3595 99.949) (xy 209.3595 99.969) + (xy 209.2325 99.969) (xy 209.2325 99.949) (xy 209.2325 99.822) (xy 209.2325 99.06) (xy 209.1055 98.933) + (xy 208.698547 98.933) (xy 208.496452 98.933) (xy 208.309741 99.010339) (xy 208.166838 99.153242) (xy 208.0895 99.339953) + (xy 208.0895 99.695) (xy 208.2165 99.822) (xy 209.2325 99.822) (xy 209.2325 99.949) (xy 208.2165 99.949) + (xy 208.0895 100.076) (xy 208.0895 100.431047) (xy 208.166838 100.617758) (xy 208.309741 100.760661) (xy 208.496452 100.838) + (xy 208.309742 100.915338) (xy 208.166839 101.058241) (xy 208.0895 101.244952) (xy 208.0895 101.447047) (xy 208.0895 101.468832) + (xy 207.812435 101.353785) (xy 207.433507 101.353455) (xy 207.083297 101.498159) (xy 206.81512 101.765867) (xy 206.669805 102.115825) + (xy 206.669475 102.494753) (xy 206.814179 102.844963) (xy 207.081887 103.11314) (xy 207.431845 103.258455) (xy 207.810773 103.258785) + (xy 208.160983 103.114081) (xy 208.42916 102.846373) (xy 208.47566 102.734387) (xy 208.496452 102.743) (xy 208.550534 102.743) + (xy 208.568537 102.833505) (xy 208.739224 103.088956) (xy 208.774784 103.124516) (xy 209.030235 103.295203) (xy 209.33156 103.35514) + (xy 209.478985 103.35514) (xy 209.478715 103.665693) (xy 209.623419 104.015903) (xy 209.891127 104.28408) (xy 210.241085 104.429395) + (xy 210.620013 104.429725) (xy 210.970223 104.285021) (xy 211.2384 104.017313) (xy 211.383715 103.667355) (xy 211.383732 103.647214) + (xy 211.628144 103.647427) (xy 212.025049 103.483429) (xy 212.328982 103.180026) (xy 212.493673 102.783408) (xy 212.494047 102.353956) + (xy 212.494047 146.573) (xy 212.488967 146.573) (xy 212.488967 113.298816) (xy 212.488967 109.793616) (xy 212.324969 109.396711) + (xy 212.021566 109.092778) (xy 211.624948 108.928087) (xy 211.195496 108.927713) (xy 210.798591 109.091711) (xy 210.494658 109.395114) + (xy 210.329967 109.791732) (xy 210.329593 110.221184) (xy 210.493591 110.618089) (xy 210.796994 110.922022) (xy 211.193612 111.086713) + (xy 211.623064 111.087087) (xy 212.019969 110.923089) (xy 212.323902 110.619686) (xy 212.488593 110.223068) (xy 212.488967 109.793616) + (xy 212.488967 113.298816) (xy 212.324969 112.901911) (xy 212.021566 112.597978) (xy 211.624948 112.433287) (xy 211.195496 112.432913) + (xy 210.798591 112.596911) (xy 210.494658 112.900314) (xy 210.329967 113.296932) (xy 210.329646 113.665077) (xy 210.187781 113.321737) + (xy 209.920073 113.05356) (xy 209.570115 112.908245) (xy 209.4865 112.908172) (xy 209.4865 111.988047) (xy 209.4865 111.633) + (xy 209.3595 111.506) (xy 208.3435 111.506) (xy 208.3435 112.268) (xy 208.4705 112.395) (xy 208.877453 112.395) + (xy 209.079548 112.395) (xy 209.266259 112.317661) (xy 209.409162 112.174758) (xy 209.4865 111.988047) (xy 209.4865 112.908172) + (xy 209.191187 112.907915) (xy 208.840977 113.052619) (xy 208.5728 113.320327) (xy 208.427485 113.670285) (xy 208.427155 114.049213) + (xy 208.571859 114.399423) (xy 208.839567 114.6676) (xy 209.189525 114.812915) (xy 209.568453 114.813245) (xy 209.918663 114.668541) + (xy 210.18684 114.400833) (xy 210.332155 114.050875) (xy 210.332431 113.733253) (xy 210.493591 114.123289) (xy 210.796994 114.427222) + (xy 211.193612 114.591913) (xy 211.623064 114.592287) (xy 212.019969 114.428289) (xy 212.323902 114.124886) (xy 212.488593 113.728268) + (xy 212.488967 113.298816) (xy 212.488967 146.573) (xy 211.025905 146.573) (xy 211.025905 125.086707) (xy 210.881201 124.736497) + (xy 210.812567 124.667742) (xy 210.812567 117.880976) (xy 210.648569 117.484071) (xy 210.345166 117.180138) (xy 209.948548 117.015447) + (xy 209.519096 117.015073) (xy 209.122191 117.179071) (xy 208.825745 117.475) (xy 208.2165 117.475) (xy 208.2165 112.268) + (xy 208.2165 111.506) (xy 207.2005 111.506) (xy 207.0735 111.633) (xy 207.0735 111.988047) (xy 207.150838 112.174758) + (xy 207.293741 112.317661) (xy 207.480452 112.395) (xy 207.682547 112.395) (xy 208.0895 112.395) (xy 208.2165 112.268) + (xy 208.2165 117.475) (xy 207.480453 117.475) (xy 207.293742 117.552338) (xy 207.150839 117.695241) (xy 207.0735 117.881952) + (xy 207.0735 118.084047) (xy 207.0735 118.973047) (xy 207.150838 119.159758) (xy 207.293741 119.302661) (xy 207.480452 119.38) + (xy 207.293741 119.457339) (xy 207.150838 119.600242) (xy 207.0735 119.786953) (xy 207.0735 120.142) (xy 207.2005 120.269) + (xy 208.2165 120.269) (xy 208.2165 119.507) (xy 208.0895 119.38) (xy 208.4705 119.38) (xy 208.3435 119.507) + (xy 208.3435 120.269) (xy 209.3595 120.269) (xy 209.4865 120.142) (xy 209.4865 119.786953) (xy 209.409162 119.600242) + (xy 209.266259 119.457339) (xy 209.079548 119.38) (xy 209.079547 119.38) (xy 209.266258 119.302662) (xy 209.373471 119.195448) + (xy 209.505461 119.169193) (xy 209.517212 119.174073) (xy 209.946664 119.174447) (xy 210.343569 119.010449) (xy 210.647502 118.707046) + (xy 210.812193 118.310428) (xy 210.812567 117.880976) (xy 210.812567 124.667742) (xy 210.613493 124.46832) (xy 210.263535 124.323005) + (xy 209.884607 124.322675) (xy 209.534397 124.467379) (xy 209.4865 124.515192) (xy 209.4865 120.878047) (xy 209.4865 120.523) + (xy 209.3595 120.396) (xy 208.3435 120.396) (xy 208.3435 121.158) (xy 208.4705 121.285) (xy 208.877453 121.285) + (xy 209.079548 121.285) (xy 209.266259 121.207661) (xy 209.409162 121.064758) (xy 209.4865 120.878047) (xy 209.4865 124.515192) + (xy 209.26622 124.735087) (xy 209.120905 125.085045) (xy 209.120575 125.463973) (xy 209.265279 125.814183) (xy 209.532987 126.08236) + (xy 209.882945 126.227675) (xy 210.261873 126.228005) (xy 210.612083 126.083301) (xy 210.88026 125.815593) (xy 211.025575 125.465635) + (xy 211.025905 125.086707) (xy 211.025905 146.573) (xy 208.28022 146.573) (xy 208.28022 134.36849) (xy 208.2165 134.214275) + (xy 208.2165 121.158) (xy 208.2165 120.396) (xy 207.2005 120.396) (xy 207.0735 120.523) (xy 207.0735 120.878047) + (xy 207.150838 121.064758) (xy 207.293741 121.207661) (xy 207.480452 121.285) (xy 207.682547 121.285) (xy 208.0895 121.285) + (xy 208.2165 121.158) (xy 208.2165 134.214275) (xy 208.087282 133.901542) (xy 207.730337 133.543974) (xy 207.454665 133.429505) + (xy 207.454665 126.049367) (xy 207.309961 125.699157) (xy 207.042253 125.43098) (xy 206.730787 125.301648) (xy 206.730787 121.015336) + (xy 206.566789 120.618431) (xy 206.263386 120.314498) (xy 205.866768 120.149807) (xy 205.437316 120.149433) (xy 205.040411 120.313431) + (xy 204.908196 120.445414) (xy 204.790186 120.327198) (xy 204.393568 120.162507) (xy 203.964116 120.162133) (xy 203.567211 120.326131) + (xy 203.263278 120.629534) (xy 203.098587 121.026152) (xy 203.098213 121.455604) (xy 203.262211 121.852509) (xy 203.565614 122.156442) + (xy 203.962232 122.321133) (xy 204.1525 122.321298) (xy 204.1525 123.037047) (xy 204.229838 123.223758) (xy 204.372741 123.366661) + (xy 204.559452 123.444) (xy 204.372741 123.521339) (xy 204.229838 123.664242) (xy 204.1525 123.850953) (xy 204.1525 124.206) + (xy 204.2795 124.333) (xy 205.2955 124.333) (xy 205.2955 123.571) (xy 205.1685 123.444) (xy 205.5495 123.444) + (xy 205.4225 123.571) (xy 205.4225 124.333) (xy 206.4385 124.333) (xy 206.5655 124.206) (xy 206.5655 123.850953) + (xy 206.488162 123.664242) (xy 206.345259 123.521339) (xy 206.158548 123.444) (xy 206.158547 123.444) (xy 206.345258 123.366662) + (xy 206.488161 123.223759) (xy 206.5655 123.037048) (xy 206.5655 122.834953) (xy 206.5655 121.945953) (xy 206.534928 121.872146) + (xy 206.565722 121.841406) (xy 206.730413 121.444788) (xy 206.730787 121.015336) (xy 206.730787 125.301648) (xy 206.692295 125.285665) + (xy 206.5655 125.285554) (xy 206.5655 124.942047) (xy 206.5655 124.587) (xy 206.4385 124.46) (xy 205.4225 124.46) + (xy 205.4225 125.222) (xy 205.5495 125.349) (xy 205.956453 125.349) (xy 206.158548 125.349) (xy 206.345259 125.271661) + (xy 206.488162 125.128758) (xy 206.5655 124.942047) (xy 206.5655 125.285554) (xy 206.313367 125.285335) (xy 205.963157 125.430039) + (xy 205.69498 125.697747) (xy 205.549665 126.047705) (xy 205.549335 126.426633) (xy 205.694039 126.776843) (xy 205.961747 127.04502) + (xy 206.311705 127.190335) (xy 206.690633 127.190665) (xy 207.040843 127.045961) (xy 207.30902 126.778253) (xy 207.454335 126.428295) + (xy 207.454665 126.049367) (xy 207.454665 133.429505) (xy 207.263727 133.350221) (xy 206.75849 133.34978) (xy 206.291542 133.542718) + (xy 205.933974 133.899663) (xy 205.740221 134.366273) (xy 205.73978 134.87151) (xy 205.932718 135.338458) (xy 206.289663 135.696026) + (xy 206.756273 135.889779) (xy 207.26151 135.89022) (xy 207.728458 135.697282) (xy 208.086026 135.340337) (xy 208.279779 134.873727) + (xy 208.28022 134.36849) (xy 208.28022 146.573) (xy 205.2955 146.573) (xy 205.2955 125.222) (xy 205.2955 124.46) + (xy 204.2795 124.46) (xy 204.1525 124.587) (xy 204.1525 124.942047) (xy 204.229838 125.128758) (xy 204.372741 125.271661) + (xy 204.559452 125.349) (xy 204.761547 125.349) (xy 205.1685 125.349) (xy 205.2955 125.222) (xy 205.2955 146.573) + (xy 202.6285 146.573) (xy 202.6285 124.942047) (xy 202.6285 124.587) (xy 202.6285 124.206) (xy 202.6285 123.850953) + (xy 202.551162 123.664242) (xy 202.408259 123.521339) (xy 202.221548 123.444) (xy 202.221547 123.444) (xy 202.408258 123.366662) + (xy 202.551161 123.223759) (xy 202.6285 123.037048) (xy 202.6285 122.834953) (xy 202.6285 121.945953) (xy 202.551162 121.759242) + (xy 202.408259 121.616339) (xy 202.221548 121.539) (xy 202.167465 121.539) (xy 202.149463 121.448495) (xy 201.978776 121.193044) + (xy 201.723325 121.022357) (xy 201.643035 121.006386) (xy 201.643167 120.855316) (xy 201.479169 120.458411) (xy 201.175766 120.154478) + (xy 200.779148 119.989787) (xy 200.349696 119.989413) (xy 200.2155 120.044861) (xy 200.2155 102.336048) (xy 200.2155 102.133953) + (xy 200.2155 101.244953) (xy 200.138162 101.058242) (xy 199.995259 100.915339) (xy 199.808548 100.838) (xy 199.995259 100.760661) + (xy 200.138162 100.617758) (xy 200.2155 100.431047) (xy 200.2155 100.076) (xy 200.2155 99.695) (xy 200.2155 99.339953) + (xy 200.138162 99.153242) (xy 199.995259 99.010339) (xy 199.808548 98.933) (xy 199.606453 98.933) (xy 199.1995 98.933) + (xy 199.0725 99.06) (xy 199.0725 99.822) (xy 200.0885 99.822) (xy 200.2155 99.695) (xy 200.2155 100.076) + (xy 200.0885 99.949) (xy 199.0725 99.949) (xy 199.0725 99.969) (xy 198.9455 99.969) (xy 198.9455 99.949) + (xy 197.9295 99.949) (xy 197.8025 100.076) (xy 197.8025 100.431047) (xy 197.879838 100.617758) (xy 198.022741 100.760661) + (xy 198.209452 100.838) (xy 198.022742 100.915338) (xy 197.879839 101.058241) (xy 197.8025 101.244952) (xy 197.8025 101.447047) + (xy 197.8025 102.336047) (xy 197.879838 102.522758) (xy 197.984966 102.627886) (xy 197.929687 102.761012) (xy 197.929313 103.190464) + (xy 198.093311 103.587369) (xy 198.396714 103.891302) (xy 198.793332 104.055993) (xy 199.222784 104.056367) (xy 199.619689 103.892369) + (xy 199.923622 103.588966) (xy 200.088313 103.192348) (xy 200.088687 102.762896) (xy 200.03294 102.627979) (xy 200.138161 102.522759) + (xy 200.2155 102.336048) (xy 200.2155 120.044861) (xy 199.952791 120.153411) (xy 199.648858 120.456814) (xy 199.484167 120.853432) + (xy 199.483793 121.282884) (xy 199.647791 121.679789) (xy 199.951194 121.983722) (xy 200.2155 122.093471) (xy 200.2155 122.148047) + (xy 200.2155 123.037047) (xy 200.292838 123.223758) (xy 200.435741 123.366661) (xy 200.622452 123.444) (xy 200.435741 123.521339) + (xy 200.292838 123.664242) (xy 200.2155 123.850953) (xy 200.2155 124.206) (xy 200.3425 124.333) (xy 201.3585 124.333) + (xy 201.3585 123.571) (xy 201.2315 123.444) (xy 201.6125 123.444) (xy 201.4855 123.571) (xy 201.4855 124.333) + (xy 202.5015 124.333) (xy 202.6285 124.206) (xy 202.6285 124.587) (xy 202.5015 124.46) (xy 201.4855 124.46) + (xy 201.4855 125.222) (xy 201.6125 125.349) (xy 202.019453 125.349) (xy 202.221548 125.349) (xy 202.408259 125.271661) + (xy 202.551162 125.128758) (xy 202.6285 124.942047) (xy 202.6285 146.573) (xy 201.3585 146.573) (xy 201.3585 125.222) + (xy 201.3585 124.46) (xy 200.3425 124.46) (xy 200.2155 124.587) (xy 200.2155 124.942047) (xy 200.292838 125.128758) + (xy 200.435741 125.271661) (xy 200.622452 125.349) (xy 200.824547 125.349) (xy 201.2315 125.349) (xy 201.3585 125.222) + (xy 201.3585 146.573) (xy 198.6915 146.573) (xy 198.6915 124.942047) (xy 198.6915 124.587) (xy 198.6915 124.206) + (xy 198.6915 123.850953) (xy 198.614162 123.664242) (xy 198.471259 123.521339) (xy 198.284548 123.444) (xy 198.284547 123.444) + (xy 198.471258 123.366662) (xy 198.614161 123.223759) (xy 198.6915 123.037048) (xy 198.6915 122.834953) (xy 198.6915 121.945953) + (xy 198.614162 121.759242) (xy 198.471259 121.616339) (xy 198.284548 121.539) (xy 198.082453 121.539) (xy 196.685453 121.539) + (xy 196.498742 121.616338) (xy 196.41098 121.7041) (xy 196.4055 121.7041) (xy 196.104175 121.764037) (xy 195.848724 121.934724) + (xy 194.134224 123.649224) (xy 193.963537 123.904675) (xy 193.9036 124.206) (xy 193.9036 124.482713) (xy 193.776378 124.609714) + (xy 193.611687 125.006332) (xy 193.611313 125.435784) (xy 193.775311 125.832689) (xy 194.078714 126.136622) (xy 194.475332 126.301313) + (xy 194.904784 126.301687) (xy 195.301689 126.137689) (xy 195.605622 125.834286) (xy 195.770313 125.437668) (xy 195.770687 125.008216) + (xy 195.606689 124.611311) (xy 195.503055 124.507496) (xy 196.601377 123.409174) (xy 196.685452 123.444) (xy 196.498741 123.521339) + (xy 196.355838 123.664242) (xy 196.2785 123.850953) (xy 196.2785 124.206) (xy 196.4055 124.333) (xy 197.4215 124.333) + (xy 197.4215 123.571) (xy 197.2945 123.444) (xy 197.6755 123.444) (xy 197.5485 123.571) (xy 197.5485 124.333) + (xy 198.5645 124.333) (xy 198.6915 124.206) (xy 198.6915 124.587) (xy 198.5645 124.46) (xy 197.5485 124.46) + (xy 197.5485 125.222) (xy 197.6755 125.349) (xy 198.082453 125.349) (xy 198.284548 125.349) (xy 198.471259 125.271661) + (xy 198.614162 125.128758) (xy 198.6915 124.942047) (xy 198.6915 146.573) (xy 197.4215 146.573) (xy 197.4215 125.222) + (xy 197.4215 124.46) (xy 196.4055 124.46) (xy 196.2785 124.587) (xy 196.2785 124.942047) (xy 196.355838 125.128758) + (xy 196.498741 125.271661) (xy 196.685452 125.349) (xy 196.887547 125.349) (xy 197.2945 125.349) (xy 197.4215 125.222) + (xy 197.4215 146.573) (xy 193.540567 146.573) (xy 193.540567 113.298816) (xy 193.376569 112.901911) (xy 193.073166 112.597978) + (xy 192.676548 112.433287) (xy 192.247096 112.432913) (xy 191.850191 112.596911) (xy 191.546258 112.900314) (xy 191.381567 113.296932) + (xy 191.381399 113.489615) (xy 191.233037 113.711655) (xy 191.1731 114.01298) (xy 191.1731 114.11498) (xy 191.085339 114.202741) + (xy 191.008 114.389452) (xy 190.930661 114.202741) (xy 190.787758 114.059838) (xy 190.601047 113.9825) (xy 190.246 113.9825) + (xy 190.119 114.1095) (xy 190.119 115.1255) (xy 190.139 115.1255) (xy 190.139 115.2525) (xy 190.119 115.2525) + (xy 190.119 116.2685) (xy 190.246 116.3955) (xy 190.601047 116.3955) (xy 190.787758 116.318162) (xy 190.930661 116.175259) + (xy 191.008 115.988548) (xy 191.085338 116.175258) (xy 191.228241 116.318161) (xy 191.414952 116.3955) (xy 191.617047 116.3955) + (xy 192.506047 116.3955) (xy 192.692758 116.318162) (xy 192.835661 116.175259) (xy 192.913 115.988548) (xy 192.913 115.786453) + (xy 192.913 114.493808) (xy 193.071569 114.428289) (xy 193.375502 114.124886) (xy 193.540193 113.728268) (xy 193.540567 113.298816) + (xy 193.540567 146.573) (xy 193.413567 146.573) (xy 193.413567 123.631536) (xy 193.249569 123.234631) (xy 192.946166 122.930698) + (xy 192.549548 122.766007) (xy 192.120096 122.765633) (xy 191.723191 122.929631) (xy 191.419258 123.233034) (xy 191.254567 123.629652) + (xy 191.254193 124.059104) (xy 191.418191 124.456009) (xy 191.721594 124.759942) (xy 192.118212 124.924633) (xy 192.547664 124.925007) + (xy 192.944569 124.761009) (xy 193.248502 124.457606) (xy 193.413193 124.060988) (xy 193.413567 123.631536) (xy 193.413567 146.573) + (xy 189.992 146.573) (xy 189.992 116.2685) (xy 189.992 115.2525) (xy 189.992 115.1255) (xy 189.992 114.1095) + (xy 189.865 113.9825) (xy 189.509953 113.9825) (xy 189.323242 114.059838) (xy 189.180339 114.202741) (xy 189.103 114.389452) + (xy 189.103 114.591547) (xy 189.103 114.9985) (xy 189.23 115.1255) (xy 189.992 115.1255) (xy 189.992 115.2525) + (xy 189.23 115.2525) (xy 189.103 115.3795) (xy 189.103 115.786453) (xy 189.103 115.988548) (xy 189.180339 116.175259) + (xy 189.323242 116.318162) (xy 189.509953 116.3955) (xy 189.865 116.3955) (xy 189.992 116.2685) (xy 189.992 146.573) + (xy 119.143693 146.573) (xy 119.143693 140.315496) (xy 118.364 139.535803) (xy 117.584307 140.315496) (xy 117.655177 140.529645) + (xy 118.123826 140.718412) (xy 118.629038 140.713466) (xy 119.072823 140.529645) (xy 119.143693 140.315496) (xy 119.143693 146.573) + (xy 111.523693 146.573) (xy 111.523693 140.315496) (xy 110.744 139.535803) (xy 110.654197 139.625606) (xy 110.654197 139.446) + (xy 109.874504 138.666307) (xy 109.660355 138.737177) (xy 109.471588 139.205826) (xy 109.476534 139.711038) (xy 109.660355 140.154823) + (xy 109.874504 140.225693) (xy 110.654197 139.446) (xy 110.654197 139.625606) (xy 109.964307 140.315496) (xy 110.035177 140.529645) + (xy 110.503826 140.718412) (xy 111.009038 140.713466) (xy 111.452823 140.529645) (xy 111.523693 140.315496) (xy 111.523693 146.573) + (xy 102.044665 146.573) (xy 102.044665 118.683367) (xy 101.899961 118.333157) (xy 101.632253 118.06498) (xy 101.282295 117.919665) + (xy 100.903367 117.919335) (xy 100.553157 118.064039) (xy 100.28498 118.331747) (xy 100.139665 118.681705) (xy 100.139335 119.060633) + (xy 100.284039 119.410843) (xy 100.551747 119.67902) (xy 100.901705 119.824335) (xy 101.280633 119.824665) (xy 101.630843 119.679961) + (xy 101.89902 119.412253) (xy 102.044335 119.062295) (xy 102.044665 118.683367) (xy 102.044665 146.573) (xy 90.618279 146.573) + (xy 90.618279 141.164768) (xy 90.610354 140.735389) (xy 90.461285 140.375505) (xy 90.266909 140.327893) (xy 90.177107 140.417695) + (xy 90.177107 140.238091) (xy 90.129495 140.043715) (xy 89.729768 139.886721) (xy 89.300389 139.894646) (xy 88.940505 140.043715) + (xy 88.892893 140.238091) (xy 89.535 140.880197) (xy 90.177107 140.238091) (xy 90.177107 140.417695) (xy 89.624803 140.97) + (xy 90.266909 141.612107) (xy 90.461285 141.564495) (xy 90.618279 141.164768) (xy 90.618279 146.573) (xy 90.177107 146.573) + (xy 90.177107 141.701909) (xy 89.535 141.059803) (xy 89.445197 141.149605) (xy 89.445197 140.97) (xy 88.803091 140.327893) + (xy 88.608715 140.375505) (xy 88.451721 140.775232) (xy 88.459646 141.204611) (xy 88.608715 141.564495) (xy 88.803091 141.612107) + (xy 89.445197 140.97) (xy 89.445197 141.149605) (xy 88.892893 141.701909) (xy 88.940505 141.896285) (xy 89.340232 142.053279) + (xy 89.769611 142.045354) (xy 90.129495 141.896285) (xy 90.177107 141.701909) (xy 90.177107 146.573) (xy 71.827 146.573) + (xy 71.827 146.4) (xy 71.827 56.5785) (xy 203.900315 56.5785) (xy 203.900315 60.5028) (xy 224.089686 60.5028) + (xy 224.089686 56.5785) (xy 227.9015 56.5785) (xy 227.9015 146.573) ) ) ) diff --git a/demos/kit-dev-coldfire-xilinx_5213/kit-dev-coldfire-xilinx_5213.net b/demos/kit-dev-coldfire-xilinx_5213/kit-dev-coldfire-xilinx_5213.net index b48594a220..fc5096bd8d 100644 --- a/demos/kit-dev-coldfire-xilinx_5213/kit-dev-coldfire-xilinx_5213.net +++ b/demos/kit-dev-coldfire-xilinx_5213/kit-dev-coldfire-xilinx_5213.net @@ -1,1209 +1,982 @@ (export (version D) (design (source F:/kicad-launchpad/testing/demos/kit-dev-coldfire-xilinx_5213/kit-dev-coldfire-xilinx_5213.sch) - (date "24/01/2014 13:22:55") - (tool "eeschema (2014-01-22 BZR 4630)-product")) + (date "30/07/2014 13:09:29") + (tool "Eeschema (2014-07-29 BZR 5035)-product")) (components (comp (ref U1) (value MCF5213-LQFP100) + (footprint lib_smd:VQFP100) (libsource (lib motorola) (part MCF5213-LQFP100)) (sheetpath (names /) (tstamps /)) (tstamp 46161C39)) (comp (ref C18) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /) (tstamps /)) (tstamp 46238286)) (comp (ref GND1) (value CONN_1) + (footprint connect:PINTST) (libsource (lib conn) (part CONN_1)) (sheetpath (names /) (tstamps /)) (tstamp 465FE6C5)) (comp (ref U2) (value 74AHC1G14) + (footprint lib_smd:SOT353) (libsource (lib 74xx) (part 74AHC1G14)) (sheetpath (names /) (tstamps /)) (tstamp 46554FB5)) (comp (ref CT1) (value JUMPER) + (footprint pin_array:PIN_ARRAY_2X1) (libsource (lib device) (part JUMPER)) (sheetpath (names /) (tstamps /)) (tstamp 46545507)) (comp (ref RST_SW1) (value SW_PUSH) + (footprint discret:SW_PUSH_SMALL) (libsource (lib device) (part SW_PUSH)) (sheetpath (names /) (tstamps /)) (tstamp 465451D4)) (comp (ref Y1) (value 8MHz) + (footprint discret:HC-18UH) (libsource (lib device) (part CRYSTAL)) (sheetpath (names /) (tstamps /)) (tstamp 462389C7)) (comp (ref C2) (value 10pF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /) (tstamps /)) (tstamp 462389C0)) (comp (ref C1) (value 10pF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /) (tstamps /)) (tstamp 462389BC)) (comp (ref R1) (value 1M) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /) (tstamps /)) (tstamp 462389B6)) (comp (ref ALLPST1) (value CONN_1) + (footprint connect:PINTST) (libsource (lib conn) (part CONN_1)) (sheetpath (names /) (tstamps /)) (tstamp 46238965)) (comp (ref RED1) (value LED_RESET1) + (footprint lib_smd:SM1206POL) (libsource (lib device) (part LED)) (sheetpath (names /) (tstamps /)) (tstamp 46238597)) (comp (ref R22) (value 270) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /) (tstamps /)) (tstamp 4623857F)) (comp (ref R21) (value 4,7K) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /) (tstamps /)) (tstamp 46238545)) (comp (ref Q1) (value 3906) + (footprint lib_smd:SOT23EBC) (libsource (lib device) (part PNP)) (sheetpath (names /) (tstamps /)) (tstamp 46238519)) (comp (ref R15) (value 4,7K) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /) (tstamps /)) (tstamp 4623847B)) (comp (ref D3) (value BAT54) + (footprint lib_smd:ST23AK#1) (libsource (lib device) (part DIODE)) (sheetpath (names /) (tstamps /)) (tstamp 4623846D)) (comp (ref C3) (value 1nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /) (tstamps /)) (tstamp 46238468)) (comp (ref LV1) (value DS1818) + (footprint discret:TO92-INVERT) (libsource (lib special) (part MC34064P)) (sheetpath (names /) (tstamps /)) (tstamp 462383E5)) (comp (ref C16) (value 10uF) + (footprint lib_smd:SM1206POL) (libsource (lib device) (part CP)) (sheetpath (names /) (tstamps /)) (tstamp 462382CE)) (comp (ref FB1) (value BEAD) + (footprint lib_smd:SM1206) (libsource (lib device) (part INDUCTOR)) (sheetpath (names /) (tstamps /)) (tstamp 462380B8)) (comp (ref L1) (value 10uH) + (footprint lib_smd:SM1206) (libsource (lib device) (part INDUCTOR)) (sheetpath (names /) (tstamps /)) (tstamp 46238092)) (comp (ref VDDA1) (value JUMPER) + (footprint pin_array:PIN_ARRAY_2X1) (libsource (lib device) (part JUMPER)) (sheetpath (names /) (tstamps /)) (tstamp 46238079)) (comp (ref D1) (value BAT54) + (footprint lib_smd:ST23AK#1) (libsource (lib device) (part DIODE)) (sheetpath (names /) (tstamps /)) (tstamp 46237F86)) (comp (ref ABRT_SW1) (value SW_PUSH) + (footprint discret:SW_PUSH_SMALL) (libsource (lib device) (part SW_PUSH)) (sheetpath (names /) (tstamps /)) (tstamp 46237F50)) (comp (ref LEDABRT1) (value RED) + (footprint lib_smd:SM1206POL) (libsource (lib device) (part LED)) (sheetpath (names /) (tstamps /)) (tstamp 46237E52)) (comp (ref R14) (value 270) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /) (tstamps /)) (tstamp 46237E3D)) (comp (ref C15) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /) (tstamps /)) (tstamp 46237E36)) (comp (ref R12) (value 20K) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /) (tstamps /)) (tstamp 46237E2F)) (comp (ref R7) (value 1K) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /) (tstamps /)) (tstamp 46237E28)) (comp (ref C14) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /) (tstamps /)) (tstamp 46237DF9)) (comp (ref R45) (value 4,7K) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /) (tstamps /)) (tstamp 461BE50C)) (comp (ref C20) (value 1nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /) (tstamps /)) (tstamp 461BE364)) (comp (ref C21) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /) (tstamps /)) (tstamp 461BE35C)) (comp (ref L2) (value 10uH) + (footprint lib_smd:SM1206) (libsource (lib device) (part INDUCTOR)) (sheetpath (names /) (tstamps /)) (tstamp 461BE327)) (comp (ref R9) (value 0) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /) (tstamps /)) (tstamp 461BE230)) (comp (ref R13) (value 10K) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /) (tstamps /)) (tstamp 461BE054)) (comp (ref R11) (value 10K) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /) (tstamps /)) (tstamp 461BE051)) (comp (ref R10) (value 10K) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /) (tstamps /)) (tstamp 461BE04B)) (comp (ref R8) (value 10K) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /) (tstamps /)) (tstamp 461BE047)) (comp (ref R6) (value 10K) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /) (tstamps /)) (tstamp 461BE046)) (comp (ref R5) (value 10K) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /) (tstamps /)) (tstamp 461BE041)) (comp (ref R4) (value 10K) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /) (tstamps /)) (tstamp 461BE039)) (comp (ref TA-1) (value CONN_1) + (footprint connect:PINTST) (libsource (lib conn) (part CONN_1)) (sheetpath (names /) (tstamps /)) (tstamp 461BBA34)) (comp (ref R26) (value 10K) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /) (tstamps /)) (tstamp 461BB8C0)) (comp (ref CLKOUT1) (value CONN_1) + (footprint connect:PINTST) (libsource (lib conn) (part CONN_1)) (sheetpath (names /) (tstamps /)) (tstamp 461BB894)) (comp (ref R20) (value 4,7K) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /) (tstamps /)) (tstamp 461BB799)) (comp (ref R19) (value 4,7K) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /) (tstamps /)) (tstamp 461BB798)) (comp (ref R18) (value 4,7K) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /) (tstamps /)) (tstamp 461BB795)) (comp (ref R17) (value 4,7K) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /) (tstamps /)) (tstamp 461BB790)) (comp (ref R46) (value 22) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /) (tstamps /)) (tstamp 461BB742)) (comp (ref R2) (value 4,7K) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /) (tstamps /)) (tstamp 461BB661)) (comp (ref R25) (value 4,7K) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /) (tstamps /)) (tstamp 461BB65F)) (comp (ref CLK1) (value JUMPER) + (footprint pin_array:PIN_ARRAY_2X1) (libsource (lib device) (part JUMPER)) (sheetpath (names /) (tstamps /)) (tstamp 461BB648)) (comp (ref CLK0) (value JUMPER) + (footprint pin_array:PIN_ARRAY_2X1) (libsource (lib device) (part JUMPER)) (sheetpath (names /) (tstamps /)) (tstamp 461BB62E)) (comp (ref C6) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /) (tstamps /)) (tstamp 461BB5E5)) (comp (ref R16) (value 4,7K) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /) (tstamps /)) (tstamp 461BAF5C)) (comp (ref BDM_EN1) (value JUMPER) + (footprint pin_array:PIN_ARRAY_2X1) (libsource (lib device) (part JUMPER)) (sheetpath (names /) (tstamps /)) (tstamp 461BAF4F)) (comp (ref BDM_PORT1) (value CONN_13X2) + (footprint pin_array:pin_array_13x2) (libsource (lib conn) (part CONN_13X2)) (sheetpath (names /) (tstamps /)) (tstamp 461BAEE7)) (comp (ref C17) (value 100uF) + (footprint lib_smd:SM1206POL) (libsource (lib device) (part CP)) (sheetpath (names /) (tstamps /)) (tstamp 46161D3C)) (comp (ref C12) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /) (tstamps /)) (tstamp 46161CDA)) (comp (ref C11) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /) (tstamps /)) (tstamp 46161CD9)) (comp (ref C10) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /) (tstamps /)) (tstamp 46161CD8)) (comp (ref C9) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /) (tstamps /)) (tstamp 46161CD7)) (comp (ref C8) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /) (tstamps /)) (tstamp 46161CD4)) (comp (ref C7) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /) (tstamps /)) (tstamp 46161CD3)) (comp (ref C5) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /) (tstamps /)) (tstamp 46161CB8)) (comp (ref C4) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /) (tstamps /)) (tstamp 46161CB5)) (comp (ref VR1) (value LT1129_QPACK) + (footprint lib_smd:DPAK5) (libsource (lib regul) (part LT1129_QPACK)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 46603376)) (comp (ref C26) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 46546CA6)) (comp (ref RCAN1) (value R) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4654018B)) (comp (ref RCAN2) (value R) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 46540184)) (comp (ref R38) (value 62) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 46540164)) (comp (ref CAN_TERM1) (value JUMPER) + (footprint pin_array:PIN_ARRAY_2X1) (libsource (lib device) (part JUMPER)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 46540159)) (comp (ref RS1) (value CONN_1) + (footprint connect:PINTST) (libsource (lib conn) (part CONN_1)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4654007F)) (comp (ref R36) (value 1K) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 46540063)) (comp (ref VREF1) (value CONN_1) + (footprint connect:PINTST) (libsource (lib conn) (part CONN_1)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4654003D)) (comp (ref C34) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4653FFFE)) (comp (ref U7) (value PCA82C251) + (footprint lib_smd:SO8E) (libsource (lib kit-dev-coldfire-xilinx_5213-cache) (part PCA82C251)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4653FF97)) (comp (ref TB1) (value CONN_2) + (footprint connect:bornier2) (libsource (lib conn) (part CONN_2)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 46530806)) (comp (ref J1) (value JACK_2P) + (footprint connect:JACK_ALIM) (libsource (lib device) (part JACK_2P)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 465307C6)) (comp (ref SW_ONOFF1) (value SWITCH_INV) + (footprint discret:SW_SPDT) (libsource (lib device) (part SWITCH_INV)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 46530763)) (comp (ref F1) (value FUSE) + (footprint lib_smd:FSUPCMS) (libsource (lib device) (part FUSE)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 46530747)) (comp (ref C41) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 465306F6)) (comp (ref D7) (value 1N4004) + (footprint discret:D5) (libsource (lib device) (part DIODE)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 465306C8)) (comp (ref C38) (value 10uF) + (footprint discret:C2V8) (libsource (lib device) (part CP)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 465306B1)) (comp (ref LED5) (value LED) + (footprint lib_smd:SM1206POL) (libsource (lib device) (part LED)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 46530639)) (comp (ref R53) (value 270) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 46530638)) (comp (ref C40) (value 220uF) + (footprint discret:C2V8) (libsource (lib device) (part CP)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 465305FE)) (comp (ref SW2) (value SW_PUSH) + (footprint discret:SW_PUSH_SMALL) (libsource (lib device) (part SW_PUSH)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652DDE7)) (comp (ref SW1) (value SW_PUSH) + (footprint discret:SW_PUSH_SMALL) (libsource (lib device) (part SW_PUSH)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652DDDF)) (comp (ref CAN_EN1) (value CONN_2X2) + (footprint pin_array:PIN_ARRAY_2X2) (libsource (lib conn) (part CONN_2X2)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652BFF1)) (comp (ref R47) (value 4,7K) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652BF65)) (comp (ref R48) (value 4,7K) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652BF62)) (comp (ref R49) (value 4,7K) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652BF5C)) (comp (ref R50) (value 4,7K) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652BF48)) (comp (ref PULUPEN1) (value CONN_4X2) + (footprint pin_array:pin_array_4x2) (libsource (lib conn) (part CONN_4X2)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652BF26)) (comp (ref COM_SEL1) (value CONN_3) + (footprint pin_array:PIN_ARRAY_3X1) (libsource (lib conn) (part CONN_3)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652BADD)) (comp (ref COM_SEL2) (value CONN_3) + (footprint pin_array:PIN_ARRAY_3X1) (libsource (lib conn) (part CONN_3)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652BAD4)) (comp (ref COM_SEL3) (value CONN_3) + (footprint pin_array:PIN_ARRAY_3X1) (libsource (lib conn) (part CONN_3)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652BA65)) (comp (ref R30) (value 10K) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652B9D5)) (comp (ref R35) (value 10K) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652B9CC)) (comp (ref R23) (value 10K) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652B5F4)) (comp (ref C45) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652B4DC)) (comp (ref C46) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652B4D9)) (comp (ref C36) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652B4D8)) (comp (ref C44) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652B4D7)) (comp (ref C35) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652B4D6)) (comp (ref UART_EN2) (value CONN_4X2) + (footprint pin_array:pin_array_4x2) (libsource (lib conn) (part CONN_4X2)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652B4D5)) (comp (ref UARTCAN2) (value DB9) + (footprint connect:DB9FC) (libsource (lib conn) (part DB9)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652B4D4)) (comp (ref U8) (value MAX202) + (footprint lib_smd:SO16E) (libsource (lib special) (part MAX202)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652B4D3)) (comp (ref C33) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652B4CA)) (comp (ref C28) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652B4C7)) (comp (ref C32) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652B4C6)) (comp (ref C31) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652B4C5)) (comp (ref C30) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652B4C4)) (comp (ref UART_EN1) (value CONN_4X2) + (footprint pin_array:pin_array_4x2) (libsource (lib conn) (part CONN_4X2)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652B4C3)) (comp (ref UARTCAN1) (value DB9) + (footprint connect:DB9FC) (libsource (lib conn) (part DB9)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652B4C2)) (comp (ref U5) (value MAX202) + (footprint lib_smd:SO16E) (libsource (lib special) (part MAX202)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652B4C1)) (comp (ref C27) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652B486)) (comp (ref C22) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652B365)) (comp (ref C25) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652B35B)) (comp (ref C24) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652B354)) (comp (ref C23) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652B33B)) (comp (ref UART_EN0) (value CONN_4X2) + (footprint pin_array:pin_array_4x2) (libsource (lib conn) (part CONN_4X2)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652B289)) (comp (ref UARTCAN0) (value DB9) + (footprint connect:DB9FC) (libsource (lib conn) (part DB9)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652B26D)) (comp (ref U3) (value MAX202) + (footprint lib_smd:SO16E) (libsource (lib special) (part MAX202)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652B22B)) (comp (ref R34) (value 10K) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652B111)) (comp (ref LED_EN1) (value JUMPER) + (footprint pin_array:PIN_ARRAY_2X1) (libsource (lib device) (part JUMPER)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652B108)) (comp (ref LED4) (value LED) + (footprint lib_smd:SM1206POL) (libsource (lib device) (part LED)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652B0BC)) (comp (ref LED3) (value LED) + (footprint lib_smd:SM1206POL) (libsource (lib device) (part LED)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652B0BB)) (comp (ref LED2) (value LED) + (footprint lib_smd:SM1206POL) (libsource (lib device) (part LED)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652B0B7)) (comp (ref LED1) (value LED) + (footprint lib_smd:SM1206POL) (libsource (lib device) (part LED)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652B0AE)) (comp (ref R33) (value 270) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652B06A)) (comp (ref R32) (value 270) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652B069)) (comp (ref R31) (value 270) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652B067)) (comp (ref R28) (value 270) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652B061)) (comp (ref U4) (value 74HC125) + (footprint lib_smd:SO14E) (libsource (lib 74xx) (part 74LS125)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652B03E)) (comp (ref C43) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652A9D3)) (comp (ref VX_EN1) (value JUMPER) + (footprint pin_array:PIN_ARRAY_2X1) (libsource (lib device) (part JUMPER)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652A9C4)) (comp (ref MCU_PORT1) (value CONN_30X2) + (footprint pin_array:PIN_ARRAY_30X2) (libsource (lib conn) (part CONN_30X2)) (sheetpath (names /inout_user/) (tstamps /47D80202/)) (tstamp 4652A4FB)) (comp (ref R64) (value 3,3) + (footprint discret:R4) (libsource (lib device) (part R)) (sheetpath (names /xilinx/) (tstamps /47D80204/)) (tstamp 4791D59D)) (comp (ref P3) (value CONN_2X2) + (footprint pin_array:PIN_ARRAY_2X2) (libsource (lib conn) (part CONN_2X2)) (sheetpath (names /xilinx/) (tstamps /47D80204/)) (tstamp 46A76EB2)) (comp (ref U9) (value XCR3256-TQ144) + (footprint lib_smd:TQFP144) (libsource (lib xilinx) (part XCR3256-TQ144)) (sheetpath (names /xilinx/) (tstamps /47D80204/)) (tstamp 470F38BE)) (comp (ref P4) (value CONN_20X2) + (footprint pin_array:PIN_ARRAY_20X2) (libsource (lib conn) (part CONN_20X2)) (sheetpath (names /xilinx/) (tstamps /47D80204/)) (tstamp 46ADE55A)) (comp (ref R57) (value 4K7) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /xilinx/) (tstamps /47D80204/)) (tstamp 46A76BCA)) (comp (ref D8) (value LED) + (footprint lib_smd:SM1206POL) (libsource (lib device) (part LED)) (sheetpath (names /xilinx/) (tstamps /47D80204/)) (tstamp 46A76BC4)) (comp (ref R62) (value 1K) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /xilinx/) (tstamps /47D80204/)) (tstamp 46A76BC3)) (comp (ref C61) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /xilinx/) (tstamps /47D80204/)) (tstamp 46A76BBC)) (comp (ref C60) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /xilinx/) (tstamps /47D80204/)) (tstamp 46A76BBB)) (comp (ref C59) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /xilinx/) (tstamps /47D80204/)) (tstamp 46A76BBA)) (comp (ref C54) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /xilinx/) (tstamps /47D80204/)) (tstamp 46A76BB5)) (comp (ref C53) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /xilinx/) (tstamps /47D80204/)) (tstamp 46A76BB4)) (comp (ref C52) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /xilinx/) (tstamps /47D80204/)) (tstamp 46A76BB3)) (comp (ref C51) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /xilinx/) (tstamps /47D80204/)) (tstamp 46A76BB2)) (comp (ref C58) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /xilinx/) (tstamps /47D80204/)) (tstamp 46A76BB1)) (comp (ref C57) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /xilinx/) (tstamps /47D80204/)) (tstamp 46A76BB0)) (comp (ref C56) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /xilinx/) (tstamps /47D80204/)) (tstamp 46A76BAF)) (comp (ref C55) (value 100nF) + (footprint lib_smd:SM0805) (libsource (lib device) (part C)) (sheetpath (names /xilinx/) (tstamps /47D80204/)) (tstamp 46A76BAE)) (comp (ref D9) (value LED) + (footprint lib_smd:SM1206POL) (libsource (lib device) (part LED)) (sheetpath (names /xilinx/) (tstamps /47D80204/)) (tstamp 46A76BA8)) (comp (ref R63) (value 1K) + (footprint lib_smd:SM0805) (libsource (lib device) (part R)) (sheetpath (names /xilinx/) (tstamps /47D80204/)) (tstamp 46A76BA7)) (comp (ref P1) (value CONN_6) + (footprint pin_array:PIN_ARRAY-6X1) (libsource (lib conn) (part CONN_6)) (sheetpath (names /xilinx/) (tstamps /47D80204/)) (tstamp 46A76BA6))) (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) - (aliases - (alias CAPAPOL)) - (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 DIODE) - (description "Diode simple") - (footprints - (fp D?) - (fp S*)) - (fields - (field (name Reference) D) - (field (name Value) DIODE)) - (pins - (pin (num 1) (name A) (type passive)) - (pin (num 2) (name K) (type passive)))) - (libpart (lib device) (part FUSE) - (fields - (field (name Reference) F) - (field (name Value) FUSE)) - (pins - (pin (num 1) (name ~) (type input)) - (pin (num 2) (name ~) (type input)))) - (libpart (lib device) (part INDUCTOR) - (fields - (field (name Reference) L) - (field (name Value) INDUCTOR)) - (pins - (pin (num 1) (name 1) (type passive)) - (pin (num 2) (name 2) (type passive)))) - (libpart (lib device) (part JACK_2P) - (fields - (field (name Reference) J) - (field (name Value) JACK_2P)) - (pins - (pin (num 1) (name ~) (type passive)) - (pin (num 2) (name ~) (type passive)) - (pin (num 3) (name ~) (type passive)))) - (libpart (lib device) (part JUMPER) - (fields - (field (name Reference) JP) - (field (name Value) JUMPER)) - (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 PNP) - (docs transistors/bipolar/*.*) - (fields - (field (name Reference) Q) - (field (name Value) PNP)) - (pins - (pin (num 1) (name E) (type passive)) - (pin (num 2) (name B) (type input)) - (pin (num 3) (name C) (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 SW_PUSH) - (description "Push Button") - (fields - (field (name Reference) SW) - (field (name Value) SW_PUSH)) - (pins - (pin (num 1) (name 1) (type passive)) - (pin (num 2) (name 2) (type passive)))) - (libpart (lib device) (part SWITCH_INV) - (description "Switch inverseur") - (fields - (field (name Reference) SW) - (field (name Value) SWITCH_INV)) - (pins - (pin (num 1) (name 1) (type passive)) - (pin (num 2) (name 2) (type passive)) - (pin (num 3) (name 3) (type passive)))) - (libpart (lib conn) (part CONN_1) - (description "1 pin") - (fields - (field (name Reference) P) - (field (name Value) CONN_1)) - (pins - (pin (num 1) (name 1) (type passive)))) - (libpart (lib conn) (part CONN_13X2) - (fields - (field (name Reference) P) - (field (name Value) CONN_13X2)) - (pins - (pin (num 1) (name P1) (type passive)) - (pin (num 2) (name P2) (type passive)) - (pin (num 3) (name P3) (type passive)) - (pin (num 4) (name P4) (type passive)) - (pin (num 5) (name P5) (type passive)) - (pin (num 6) (name P6) (type passive)) - (pin (num 7) (name P7) (type passive)) - (pin (num 8) (name P8) (type passive)) - (pin (num 9) (name P9) (type passive)) - (pin (num 10) (name P10) (type passive)) - (pin (num 11) (name P11) (type passive)) - (pin (num 12) (name P12) (type passive)) - (pin (num 13) (name P13) (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 P20) (type passive)) - (pin (num 25) (name P24) (type passive)) - (pin (num 26) (name P22) (type passive)))) - (libpart (lib conn) (part CONN_2) - (description "Symbole general de connecteur") - (fields - (field (name Reference) P) - (field (name Value) CONN_2)) - (pins - (pin (num 1) (name P1) (type passive)) - (pin (num 2) (name PM) (type passive)))) - (libpart (lib conn) (part CONN_20X2) - (fields - (field (name Reference) P) - (field (name Value) CONN_20X2)) - (pins - (pin (num 1) (name P1) (type passive)) - (pin (num 2) (name P2) (type passive)) - (pin (num 3) (name P3) (type passive)) - (pin (num 4) (name P4) (type passive)) - (pin (num 5) (name P5) (type passive)) - (pin (num 6) (name P6) (type passive)) - (pin (num 7) (name P7) (type passive)) - (pin (num 8) (name P8) (type passive)) - (pin (num 9) (name P9) (type passive)) - (pin (num 10) (name P10) (type passive)) - (pin (num 11) (name P11) (type passive)) - (pin (num 12) (name P12) (type passive)) - (pin (num 13) (name P13) (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 ~) (type passive)) - (pin (num 26) (name P26) (type passive)) - (pin (num 27) (name P27) (type passive)) - (pin (num 28) (name P28) (type passive)) - (pin (num 29) (name P29) (type passive)) - (pin (num 30) (name P30) (type passive)) - (pin (num 31) (name P31) (type passive)) - (pin (num 32) (name P32) (type passive)) - (pin (num 33) (name P33) (type passive)) - (pin (num 34) (name P34) (type passive)) - (pin (num 35) (name P35) (type passive)) - (pin (num 36) (name P36) (type passive)) - (pin (num 37) (name P37) (type passive)) - (pin (num 38) (name P38) (type passive)) - (pin (num 39) (name P39) (type passive)) - (pin (num 40) (name P40) (type passive)))) - (libpart (lib conn) (part CONN_2X2) - (description "Symbole general de connecteur") - (fields - (field (name Reference) P) - (field (name Value) CONN_2X2)) - (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)))) - (libpart (lib conn) (part CONN_3) - (description "Symbole general de connecteur") - (fields - (field (name Reference) K) - (field (name Value) CONN_3)) - (pins - (pin (num 1) (name P1) (type passive)) - (pin (num 2) (name PM) (type passive)) - (pin (num 3) (name P3) (type passive)))) - (libpart (lib conn) (part CONN_30X2) - (fields - (field (name Reference) P) - (field (name Value) CONN_30X2)) - (pins - (pin (num 1) (name P1) (type passive)) - (pin (num 2) (name P2) (type passive)) - (pin (num 3) (name P3) (type passive)) - (pin (num 4) (name P4) (type passive)) - (pin (num 5) (name P5) (type passive)) - (pin (num 6) (name P6) (type passive)) - (pin (num 7) (name P7) (type passive)) - (pin (num 8) (name P8) (type passive)) - (pin (num 9) (name P9) (type passive)) - (pin (num 10) (name P10) (type passive)) - (pin (num 11) (name P11) (type passive)) - (pin (num 12) (name P12) (type passive)) - (pin (num 13) (name P13) (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 ~) (type passive)) - (pin (num 26) (name P26) (type passive)) - (pin (num 27) (name P27) (type passive)) - (pin (num 28) (name P28) (type passive)) - (pin (num 29) (name P29) (type passive)) - (pin (num 30) (name P30) (type passive)) - (pin (num 31) (name P31) (type passive)) - (pin (num 32) (name P32) (type passive)) - (pin (num 33) (name P33) (type passive)) - (pin (num 34) (name P34) (type passive)) - (pin (num 35) (name P35) (type passive)) - (pin (num 36) (name P36) (type passive)) - (pin (num 37) (name P37) (type passive)) - (pin (num 38) (name P38) (type passive)) - (pin (num 39) (name P39) (type passive)) - (pin (num 40) (name P40) (type passive)) - (pin (num 41) (name P41) (type passive)) - (pin (num 42) (name P42) (type passive)) - (pin (num 43) (name P43) (type passive)) - (pin (num 44) (name P44) (type passive)) - (pin (num 45) (name P45) (type passive)) - (pin (num 46) (name P46) (type passive)) - (pin (num 47) (name P47) (type passive)) - (pin (num 48) (name P48) (type passive)) - (pin (num 49) (name P49) (type passive)) - (pin (num 50) (name P50) (type passive)) - (pin (num 51) (name P51) (type passive)) - (pin (num 52) (name P52) (type passive)) - (pin (num 53) (name P53) (type passive)) - (pin (num 54) (name P54) (type passive)) - (pin (num 55) (name P55) (type passive)) - (pin (num 56) (name P56) (type passive)) - (pin (num 57) (name P57) (type passive)) - (pin (num 58) (name P58) (type passive)) - (pin (num 59) (name P59) (type passive)) - (pin (num 60) (name P60) (type passive)))) - (libpart (lib conn) (part CONN_4X2) - (description "Symbole general de connecteur") - (fields - (field (name Reference) P) - (field (name Value) CONN_4X2)) - (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)))) - (libpart (lib conn) (part CONN_6) - (description "ymbole general de connecteur") - (fields - (field (name Reference) P) - (field (name Value) CONN_6)) - (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)))) - (libpart (lib conn) (part DB9) - (footprints - (fp DB9*)) - (fields - (field (name Reference) J) - (field (name Value) DB9)) - (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 P6) (type passive)) - (pin (num 7) (name P7) (type passive)) - (pin (num 8) (name P8) (type passive)) - (pin (num 9) (name P9) (type passive)))) - (libpart (lib regul) (part LT1129_QPACK) - (aliases - (alias LT_1129_QP)) - (description "LowDrop Linear Regulator (QPACK 5 pins)") - (docs linear-tec/lt1129.pdf) - (fields - (field (name Reference) U) - (field (name Value) LT1129_QPACK)) - (pins - (pin (num 1) (name OUT) (type power_out)) - (pin (num 2) (name SENSE) (type input)) - (pin (num 3) (name GND) (type power_in)) - (pin (num 4) (name SHDN) (type input)) - (pin (num 5) (name IN) (type input)))) - (libpart (lib 74xx) (part 74AHC1G14) - (description "inverting buffer with Schmitt trigger.") - (docs 74xx/74ahc_ahct1g14.pdf) - (fields - (field (name Reference) U) - (field (name Value) 74AHC1G14)) - (pins - (pin (num 2) (name ~) (type input)) - (pin (num 3) (name GND) (type power_in)) - (pin (num 4) (name ~) (type output)) - (pin (num 5) (name VCC) (type power_in)))) - (libpart (lib 74xx) (part 74LS125) - (description "Quad buffer 3 State out") - (fields - (field (name Reference) U) - (field (name Value) 74LS125)) - (pins - (pin (num 1) (name E) (type input)) - (pin (num 2) (name D) (type input)) - (pin (num 3) (name O) (type 3state)) - (pin (num 4) (name E) (type input)) - (pin (num 5) (name D) (type input)) - (pin (num 6) (name O) (type 3state)) - (pin (num 7) (name GND) (type power_in)) - (pin (num 8) (name O) (type 3state)) - (pin (num 9) (name D) (type input)) - (pin (num 10) (name E) (type input)) - (pin (num 11) (name O) (type 3state)) - (pin (num 12) (name D) (type input)) - (pin (num 13) (name E) (type input)) - (pin (num 14) (name VCC) (type power_in)))) (libpart (lib xilinx) (part XCR3256-TQ144) (fields (field (name Reference) U) @@ -1497,7 +1270,6 @@ (pin (num 99) (name UTXD1/PUB0) (type BiDi)) (pin (num 100) (name URXD1/PUB1) (type BiDi)))) (libpart (lib kit-dev-coldfire-xilinx_5213-cache) (part PCA82C251) - (description "CAN Transceiver") (fields (field (name Reference) U) (field (name Value) PCA82C251)) @@ -1509,24 +1281,413 @@ (pin (num 5) (name Vref) (type output)) (pin (num 6) (name CAN-) (type BiDi)) (pin (num 7) (name CAN+) (type BiDi)) - (pin (num 8) (name Rsl) (type input))))) + (pin (num 8) (name Rsl) (type input)))) + (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 JUMPER) + (fields + (field (name Reference) JP) + (field (name Value) JUMPER)) + (pins + (pin (num 1) (name 1) (type passive)) + (pin (num 2) (name 2) (type passive)))) + (libpart (lib device) (part JACK_2P) + (fields + (field (name Reference) J) + (field (name Value) JACK_2P)) + (pins + (pin (num 1) (name ~) (type passive)) + (pin (num 2) (name ~) (type passive)) + (pin (num 3) (name ~) (type passive)))) + (libpart (lib device) (part INDUCTOR) + (fields + (field (name Reference) L) + (field (name Value) INDUCTOR)) + (pins + (pin (num 1) (name 1) (type passive)) + (pin (num 2) (name 2) (type passive)))) + (libpart (lib device) (part FUSE) + (fields + (field (name Reference) F) + (field (name Value) FUSE)) + (pins + (pin (num 1) (name ~) (type input)) + (pin (num 2) (name ~) (type input)))) + (libpart (lib device) (part SWITCH_INV) + (description "Switch inverseur") + (fields + (field (name Reference) SW) + (field (name Value) SWITCH_INV)) + (pins + (pin (num 1) (name 1) (type passive)) + (pin (num 2) (name 2) (type passive)) + (pin (num 3) (name 3) (type passive)))) + (libpart (lib device) (part SW_PUSH) + (description "Push Button") + (fields + (field (name Reference) SW) + (field (name Value) SW_PUSH)) + (pins + (pin (num 1) (name 1) (type passive)) + (pin (num 2) (name 2) (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 PNP) + (docs transistors/bipolar/*.*) + (fields + (field (name Reference) Q) + (field (name Value) PNP)) + (pins + (pin (num 1) (name E) (type passive)) + (pin (num 2) (name B) (type input)) + (pin (num 3) (name C) (type passive)))) + (libpart (lib device) (part DIODE) + (description "Diode simple") + (footprints + (fp D?) + (fp S*)) + (fields + (field (name Reference) D) + (field (name Value) DIODE)) + (pins + (pin (num 1) (name A) (type passive)) + (pin (num 2) (name K) (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 CP) + (aliases + (alias CAPAPOL)) + (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 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 regul) (part LT1129_QPACK) + (aliases + (alias LT_1129_QP)) + (description "LowDrop Linear Regulator (QPACK 5 pins)") + (docs linear-tec/lt1129.pdf) + (fields + (field (name Reference) U) + (field (name Value) LT1129_QPACK)) + (pins + (pin (num 1) (name OUT) (type power_out)) + (pin (num 2) (name SENSE) (type input)) + (pin (num 3) (name GND) (type power_in)) + (pin (num 4) (name SHDN) (type input)) + (pin (num 5) (name IN) (type input)))) + (libpart (lib 74xx) (part 74AHC1G14) + (description "inverting buffer with Schmitt trigger.") + (docs 74xx/74ahc_ahct1g14.pdf) + (fields + (field (name Reference) U) + (field (name Value) 74AHC1G14)) + (pins + (pin (num 2) (name ~) (type input)) + (pin (num 3) (name GND) (type power_in)) + (pin (num 4) (name ~) (type output)) + (pin (num 5) (name VCC) (type power_in)))) + (libpart (lib 74xx) (part 74LS125) + (description "Quad buffer 3 State out") + (fields + (field (name Reference) U) + (field (name Value) 74LS125)) + (pins + (pin (num 1) (name E) (type input)) + (pin (num 2) (name D) (type input)) + (pin (num 3) (name O) (type 3state)) + (pin (num 4) (name E) (type input)) + (pin (num 5) (name D) (type input)) + (pin (num 6) (name O) (type 3state)) + (pin (num 7) (name GND) (type power_in)) + (pin (num 8) (name O) (type 3state)) + (pin (num 9) (name D) (type input)) + (pin (num 10) (name E) (type input)) + (pin (num 11) (name O) (type 3state)) + (pin (num 12) (name D) (type input)) + (pin (num 13) (name E) (type input)) + (pin (num 14) (name VCC) (type power_in)))) + (libpart (lib conn) (part CONN_1) + (description "1 pin") + (fields + (field (name Reference) P) + (field (name Value) CONN_1)) + (pins + (pin (num 1) (name 1) (type passive)))) + (libpart (lib conn) (part CONN_13X2) + (fields + (field (name Reference) P) + (field (name Value) CONN_13X2)) + (pins + (pin (num 1) (name P1) (type passive)) + (pin (num 2) (name P2) (type passive)) + (pin (num 3) (name P3) (type passive)) + (pin (num 4) (name P4) (type passive)) + (pin (num 5) (name P5) (type passive)) + (pin (num 6) (name P6) (type passive)) + (pin (num 7) (name P7) (type passive)) + (pin (num 8) (name P8) (type passive)) + (pin (num 9) (name P9) (type passive)) + (pin (num 10) (name P10) (type passive)) + (pin (num 11) (name P11) (type passive)) + (pin (num 12) (name P12) (type passive)) + (pin (num 13) (name P13) (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 P20) (type passive)) + (pin (num 25) (name P24) (type passive)) + (pin (num 26) (name P22) (type passive)))) + (libpart (lib conn) (part CONN_2) + (description "Symbole general de connecteur") + (fields + (field (name Reference) P) + (field (name Value) CONN_2)) + (pins + (pin (num 1) (name P1) (type passive)) + (pin (num 2) (name PM) (type passive)))) + (libpart (lib conn) (part CONN_20X2) + (fields + (field (name Reference) P) + (field (name Value) CONN_20X2)) + (pins + (pin (num 1) (name P1) (type passive)) + (pin (num 2) (name P2) (type passive)) + (pin (num 3) (name P3) (type passive)) + (pin (num 4) (name P4) (type passive)) + (pin (num 5) (name P5) (type passive)) + (pin (num 6) (name P6) (type passive)) + (pin (num 7) (name P7) (type passive)) + (pin (num 8) (name P8) (type passive)) + (pin (num 9) (name P9) (type passive)) + (pin (num 10) (name P10) (type passive)) + (pin (num 11) (name P11) (type passive)) + (pin (num 12) (name P12) (type passive)) + (pin (num 13) (name P13) (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 ~) (type passive)) + (pin (num 26) (name P26) (type passive)) + (pin (num 27) (name P27) (type passive)) + (pin (num 28) (name P28) (type passive)) + (pin (num 29) (name P29) (type passive)) + (pin (num 30) (name P30) (type passive)) + (pin (num 31) (name P31) (type passive)) + (pin (num 32) (name P32) (type passive)) + (pin (num 33) (name P33) (type passive)) + (pin (num 34) (name P34) (type passive)) + (pin (num 35) (name P35) (type passive)) + (pin (num 36) (name P36) (type passive)) + (pin (num 37) (name P37) (type passive)) + (pin (num 38) (name P38) (type passive)) + (pin (num 39) (name P39) (type passive)) + (pin (num 40) (name P40) (type passive)))) + (libpart (lib conn) (part CONN_2X2) + (description "Symbole general de connecteur") + (fields + (field (name Reference) P) + (field (name Value) CONN_2X2)) + (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)))) + (libpart (lib conn) (part CONN_3) + (description "Symbole general de connecteur") + (fields + (field (name Reference) K) + (field (name Value) CONN_3)) + (pins + (pin (num 1) (name P1) (type passive)) + (pin (num 2) (name PM) (type passive)) + (pin (num 3) (name P3) (type passive)))) + (libpart (lib conn) (part CONN_30X2) + (fields + (field (name Reference) P) + (field (name Value) CONN_30X2)) + (pins + (pin (num 1) (name P1) (type passive)) + (pin (num 2) (name P2) (type passive)) + (pin (num 3) (name P3) (type passive)) + (pin (num 4) (name P4) (type passive)) + (pin (num 5) (name P5) (type passive)) + (pin (num 6) (name P6) (type passive)) + (pin (num 7) (name P7) (type passive)) + (pin (num 8) (name P8) (type passive)) + (pin (num 9) (name P9) (type passive)) + (pin (num 10) (name P10) (type passive)) + (pin (num 11) (name P11) (type passive)) + (pin (num 12) (name P12) (type passive)) + (pin (num 13) (name P13) (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 ~) (type passive)) + (pin (num 26) (name P26) (type passive)) + (pin (num 27) (name P27) (type passive)) + (pin (num 28) (name P28) (type passive)) + (pin (num 29) (name P29) (type passive)) + (pin (num 30) (name P30) (type passive)) + (pin (num 31) (name P31) (type passive)) + (pin (num 32) (name P32) (type passive)) + (pin (num 33) (name P33) (type passive)) + (pin (num 34) (name P34) (type passive)) + (pin (num 35) (name P35) (type passive)) + (pin (num 36) (name P36) (type passive)) + (pin (num 37) (name P37) (type passive)) + (pin (num 38) (name P38) (type passive)) + (pin (num 39) (name P39) (type passive)) + (pin (num 40) (name P40) (type passive)) + (pin (num 41) (name P41) (type passive)) + (pin (num 42) (name P42) (type passive)) + (pin (num 43) (name P43) (type passive)) + (pin (num 44) (name P44) (type passive)) + (pin (num 45) (name P45) (type passive)) + (pin (num 46) (name P46) (type passive)) + (pin (num 47) (name P47) (type passive)) + (pin (num 48) (name P48) (type passive)) + (pin (num 49) (name P49) (type passive)) + (pin (num 50) (name P50) (type passive)) + (pin (num 51) (name P51) (type passive)) + (pin (num 52) (name P52) (type passive)) + (pin (num 53) (name P53) (type passive)) + (pin (num 54) (name P54) (type passive)) + (pin (num 55) (name P55) (type passive)) + (pin (num 56) (name P56) (type passive)) + (pin (num 57) (name P57) (type passive)) + (pin (num 58) (name P58) (type passive)) + (pin (num 59) (name P59) (type passive)) + (pin (num 60) (name P60) (type passive)))) + (libpart (lib conn) (part CONN_4X2) + (description "Symbole general de connecteur") + (fields + (field (name Reference) P) + (field (name Value) CONN_4X2)) + (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)))) + (libpart (lib conn) (part CONN_6) + (description "ymbole general de connecteur") + (fields + (field (name Reference) P) + (field (name Value) CONN_6)) + (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)))) + (libpart (lib conn) (part DB9) + (footprints + (fp DB9*)) + (fields + (field (name Reference) J) + (field (name Value) DB9)) + (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 P6) (type passive)) + (pin (num 7) (name P7) (type passive)) + (pin (num 8) (name P8) (type passive)) + (pin (num 9) (name P9) (type passive))))) (libraries (library (logical device) - (uri F:\kicad\share\library\device.lib)) - (library (logical conn) - (uri F:\kicad\share\library\conn.lib)) - (library (logical regul) - (uri F:\kicad\share\library\regul.lib)) - (library (logical 74xx) - (uri F:\kicad\share\library\74xx.lib)) - (library (logical xilinx) - (uri F:\kicad\share\library\xilinx.lib)) + (uri f:\kicad\share\library\device.lib)) (library (logical special) - (uri F:\kicad\share\library\special.lib)) + (uri f:\kicad\share\library\special.lib)) (library (logical motorola) - (uri F:\kicad\share\library\motorola.lib)) + (uri f:\kicad\share\library\motorola.lib)) (library (logical kit-dev-coldfire-xilinx_5213-cache) - (uri F:\kicad-launchpad\testing\demos\kit-dev-coldfire-xilinx_5213\kit-dev-coldfire-xilinx_5213-cache.lib))) + (uri F:\kicad-launchpad\testing\demos\kit-dev-coldfire-xilinx_5213\kit-dev-coldfire-xilinx_5213-cache.lib)) + (library (logical 74xx) + (uri f:\kicad\share\library\74xx.lib)) + (library (logical regul) + (uri f:\kicad\share\library\regul.lib)) + (library (logical conn) + (uri f:\kicad\share\library\conn.lib)) + (library (logical xilinx) + (uri f:\kicad\share\library\xilinx.lib))) (nets (net (code 1) (name /inout_user/UCTS2) (node (ref MCU_PORT1) (pin 48)) diff --git a/demos/kit-dev-coldfire-xilinx_5213/kit-dev-coldfire-xilinx_5213.sch b/demos/kit-dev-coldfire-xilinx_5213/kit-dev-coldfire-xilinx_5213.sch index cb638719cb..7cc314f841 100644 --- a/demos/kit-dev-coldfire-xilinx_5213/kit-dev-coldfire-xilinx_5213.sch +++ b/demos/kit-dev-coldfire-xilinx_5213/kit-dev-coldfire-xilinx_5213.sch @@ -664,7 +664,7 @@ U 1 1 46161C39 P 8150 4600 F 0 "U1" H 9100 7300 60 0000 L CNN F 1 "MCF5213-LQFP100" H 8750 1950 60 0000 L CNN -F 2 "" H 8150 4600 60 0001 C CNN +F 2 "lib_smd:VQFP100" H 8150 4600 60 0001 C CNN F 3 "" H 8150 4600 60 0001 C CNN 1 8150 4600 1 0 0 -1 @@ -686,7 +686,7 @@ U 1 1 46238286 P 6450 8750 F 0 "C18" H 6500 8850 50 0000 L CNN F 1 "100nF" H 6500 8650 50 0000 L CNN -F 2 "" H 6450 8750 60 0001 C CNN +F 2 "lib_smd:SM0805" H 6450 8750 60 0001 C CNN F 3 "" H 6450 8750 60 0001 C CNN 1 6450 8750 1 0 0 -1 @@ -712,7 +712,7 @@ U 1 1 465FE6C5 P 10150 10350 F 0 "GND1" H 10230 10350 40 0000 L CNN F 1 "CONN_1" H 10150 10405 30 0001 C CNN -F 2 "" H 10150 10350 60 0001 C CNN +F 2 "connect:PINTST" H 10150 10350 60 0001 C CNN F 3 "" H 10150 10350 60 0001 C CNN 1 10150 10350 1 0 0 -1 @@ -756,7 +756,7 @@ U 1 1 46554FB5 P 13350 1900 F 0 "U2" H 13545 2015 60 0000 C CNN F 1 "74AHC1G14" H 13650 1750 60 0000 C CNN -F 2 "" H 13350 1900 60 0001 C CNN +F 2 "lib_smd:SOT353" H 13350 1900 60 0001 C CNN F 3 "" H 13350 1900 60 0001 C CNN 1 13350 1900 -1 0 0 -1 @@ -767,7 +767,7 @@ U 1 1 46545507 P 14150 4650 F 0 "CT1" H 14550 4700 60 0000 C CNN F 1 "JUMPER" H 14150 4570 40 0000 C CNN -F 2 "" H 14150 4650 60 0001 C CNN +F 2 "pin_array:PIN_ARRAY_2X1" H 14150 4650 60 0001 C CNN F 3 "" H 14150 4650 60 0001 C CNN 1 14150 4650 1 0 0 -1 @@ -789,7 +789,7 @@ U 1 1 465451D4 P 2600 3350 F 0 "RST_SW1" H 2750 3460 50 0000 C CNN F 1 "SW_PUSH" H 2600 3270 50 0000 C CNN -F 2 "" H 2600 3350 60 0001 C CNN +F 2 "discret:SW_PUSH_SMALL" H 2600 3350 60 0001 C CNN F 3 "" H 2600 3350 60 0001 C CNN 1 2600 3350 0 1 1 0 @@ -996,7 +996,7 @@ U 1 1 462389C7 P 2100 8850 F 0 "Y1" H 2100 9000 60 0000 C CNN F 1 "8MHz" H 2100 8700 60 0000 C CNN -F 2 "" H 2100 8850 60 0001 C CNN +F 2 "discret:HC-18UH" H 2100 8850 60 0001 C CNN F 3 "" H 2100 8850 60 0001 C CNN 1 2100 8850 1 0 0 -1 @@ -1007,7 +1007,7 @@ U 1 1 462389C0 P 2500 9200 F 0 "C2" H 2550 9300 50 0000 L CNN F 1 "10pF" H 2550 9100 50 0000 L CNN -F 2 "" H 2500 9200 60 0001 C CNN +F 2 "lib_smd:SM0805" H 2500 9200 60 0001 C CNN F 3 "" H 2500 9200 60 0001 C CNN 1 2500 9200 1 0 0 -1 @@ -1018,7 +1018,7 @@ U 1 1 462389BC P 1700 9250 F 0 "C1" H 1750 9350 50 0000 L CNN F 1 "10pF" H 1750 9150 50 0000 L CNN -F 2 "" H 1700 9250 60 0001 C CNN +F 2 "lib_smd:SM0805" H 1700 9250 60 0001 C CNN F 3 "" H 1700 9250 60 0001 C CNN 1 1700 9250 1 0 0 -1 @@ -1029,7 +1029,7 @@ U 1 1 462389B6 P 2150 8450 F 0 "R1" V 2230 8450 50 0000 C CNN F 1 "1M" V 2150 8450 50 0000 C CNN -F 2 "" H 2150 8450 60 0001 C CNN +F 2 "lib_smd:SM0805" H 2150 8450 60 0001 C CNN F 3 "" H 2150 8450 60 0001 C CNN 1 2150 8450 0 1 1 0 @@ -1040,7 +1040,7 @@ U 1 1 46238965 P 14450 5600 F 0 "ALLPST1" H 14450 5700 40 0000 C CNN F 1 "CONN_1" H 14400 5640 30 0001 C CNN -F 2 "" H 14450 5600 60 0001 C CNN +F 2 "connect:PINTST" H 14450 5600 60 0001 C CNN F 3 "" H 14450 5600 60 0001 C CNN 1 14450 5600 -1 0 0 1 @@ -1106,7 +1106,7 @@ U 1 1 46238597 P 2150 4600 F 0 "RED1" H 2150 4700 50 0000 C CNN F 1 "LED_RESET1" H 2150 4500 50 0000 C CNN -F 2 "" H 2150 4600 60 0001 C CNN +F 2 "lib_smd:SM1206POL" H 2150 4600 60 0001 C CNN F 3 "" H 2150 4600 60 0001 C CNN 1 2150 4600 -1 0 0 1 @@ -1117,7 +1117,7 @@ U 1 1 4623857F P 2650 4600 F 0 "R22" V 2750 4600 50 0000 C CNN F 1 "270" V 2650 4600 50 0000 C CNN -F 2 "" H 2650 4600 60 0001 C CNN +F 2 "lib_smd:SM0805" H 2650 4600 60 0001 C CNN F 3 "" H 2650 4600 60 0001 C CNN 1 2650 4600 0 1 1 0 @@ -1130,7 +1130,7 @@ U 1 1 46238545 P 3500 4300 F 0 "R21" V 3600 4300 50 0000 C CNN F 1 "4,7K" V 3500 4300 50 0000 C CNN -F 2 "" H 3500 4300 60 0001 C CNN +F 2 "lib_smd:SM0805" H 3500 4300 60 0001 C CNN F 3 "" H 3500 4300 60 0001 C CNN 1 3500 4300 0 1 1 0 @@ -1163,7 +1163,7 @@ U 1 1 46238519 P 3000 4300 F 0 "Q1" H 3150 4300 60 0000 C CNN F 1 "3906" H 2904 4450 60 0000 C CNN -F 2 "" H 3000 4300 60 0001 C CNN +F 2 "lib_smd:SOT23EBC" H 3000 4300 60 0001 C CNN F 3 "" H 3000 4300 60 0001 C CNN 1 3000 4300 -1 0 0 1 @@ -1198,7 +1198,7 @@ U 1 1 4623847B P 3250 2650 F 0 "R15" V 3330 2650 50 0000 C CNN F 1 "4,7K" V 3250 2650 50 0000 C CNN -F 2 "" H 3250 2650 60 0001 C CNN +F 2 "lib_smd:SM0805" H 3250 2650 60 0001 C CNN F 3 "" H 3250 2650 60 0001 C CNN 1 3250 2650 1 0 0 -1 @@ -1209,7 +1209,7 @@ U 1 1 4623846D P 2850 3000 F 0 "D3" H 2850 3100 40 0000 C CNN F 1 "BAT54" H 2850 2900 40 0000 C CNN -F 2 "" H 2850 3000 60 0001 C CNN +F 2 "lib_smd:ST23AK#1" H 2850 3000 60 0001 C CNN F 3 "" H 2850 3000 60 0001 C CNN 1 2850 3000 -1 0 0 1 @@ -1220,7 +1220,7 @@ U 1 1 46238468 P 2200 3300 F 0 "C3" H 2250 3400 50 0000 L CNN F 1 "1nF" H 2250 3200 50 0000 L CNN -F 2 "" H 2200 3300 60 0001 C CNN +F 2 "lib_smd:SM0805" H 2200 3300 60 0001 C CNN F 3 "" H 2200 3300 60 0001 C CNN 1 2200 3300 1 0 0 -1 @@ -1253,7 +1253,7 @@ U 1 1 462383E5 P 1550 3050 F 0 "LV1" H 1600 3250 60 0000 C CNN F 1 "DS1818" H 1850 2860 60 0000 C CNN -F 2 "" H 1550 3050 60 0001 C CNN +F 2 "discret:TO92-INVERT" H 1550 3050 60 0001 C CNN F 3 "" H 1550 3050 60 0001 C CNN 1 1550 3050 1 0 0 -1 @@ -1278,7 +1278,7 @@ U 1 1 462382CE P 6150 8750 F 0 "C16" H 6200 8850 50 0000 L CNN F 1 "10uF" H 6200 8650 50 0000 L CNN -F 2 "" H 6150 8750 60 0001 C CNN +F 2 "lib_smd:SM1206POL" H 6150 8750 60 0001 C CNN F 3 "" H 6150 8750 60 0001 C CNN 1 6150 8750 1 0 0 -1 @@ -1311,7 +1311,7 @@ U 1 1 462380B8 P 5700 8950 F 0 "FB1" V 5650 8950 40 0000 C CNN F 1 "BEAD" V 5800 8950 40 0000 C CNN -F 2 "" H 5700 8950 60 0001 C CNN +F 2 "lib_smd:SM1206" H 5700 8950 60 0001 C CNN F 3 "" H 5700 8950 60 0001 C CNN 1 5700 8950 0 -1 -1 0 @@ -1322,7 +1322,7 @@ U 1 1 46238092 P 5700 8500 F 0 "L1" V 5650 8500 40 0000 C CNN F 1 "10uH" V 5800 8500 40 0000 C CNN -F 2 "" H 5700 8500 60 0001 C CNN +F 2 "lib_smd:SM1206" H 5700 8500 60 0001 C CNN F 3 "" H 5700 8500 60 0001 C CNN 1 5700 8500 0 -1 -1 0 @@ -1333,7 +1333,7 @@ U 1 1 46238079 P 4950 8500 F 0 "VDDA1" H 4950 8650 60 0000 C CNN F 1 "JUMPER" H 4950 8420 40 0000 C CNN -F 2 "" H 4950 8500 60 0001 C CNN +F 2 "pin_array:PIN_ARRAY_2X1" H 4950 8500 60 0001 C CNN F 3 "" H 4950 8500 60 0001 C CNN 1 4950 8500 1 0 0 -1 @@ -1367,7 +1367,7 @@ U 1 1 46237F86 P 12500 1900 F 0 "D1" H 12500 2000 40 0000 C CNN F 1 "BAT54" H 12500 1800 40 0000 C CNN -F 2 "" H 12500 1900 60 0001 C CNN +F 2 "lib_smd:ST23AK#1" H 12500 1900 60 0001 C CNN F 3 "" H 12500 1900 60 0001 C CNN 1 12500 1900 1 0 0 -1 @@ -1389,7 +1389,7 @@ U 1 1 46237F50 P 15050 1900 F 0 "ABRT_SW1" H 15050 2050 50 0000 C CNN F 1 "SW_PUSH" H 15050 1820 50 0000 C CNN -F 2 "" H 15050 1900 60 0001 C CNN +F 2 "discret:SW_PUSH_SMALL" H 15050 1900 60 0001 C CNN F 3 "" H 15050 1900 60 0001 C CNN 1 15050 1900 1 0 0 -1 @@ -1433,7 +1433,7 @@ U 1 1 46237E52 P 12800 1100 F 0 "LEDABRT1" H 12800 1200 50 0000 C CNN F 1 "RED" H 12800 1000 50 0000 C CNN -F 2 "" H 12800 1100 60 0001 C CNN +F 2 "lib_smd:SM1206POL" H 12800 1100 60 0001 C CNN F 3 "" H 12800 1100 60 0001 C CNN 1 12800 1100 0 1 1 0 @@ -1444,7 +1444,7 @@ U 1 1 46237E3D P 12800 1600 F 0 "R14" V 12880 1600 50 0000 C CNN F 1 "270" V 12800 1600 50 0000 C CNN -F 2 "" H 12800 1600 60 0001 C CNN +F 2 "lib_smd:SM0805" H 12800 1600 60 0001 C CNN F 3 "" H 12800 1600 60 0001 C CNN 1 12800 1600 1 0 0 -1 @@ -1455,7 +1455,7 @@ U 1 1 46237E36 P 13950 2250 F 0 "C15" H 13700 2350 50 0000 L CNN F 1 "100nF" H 13650 2150 50 0000 L CNN -F 2 "" H 13950 2250 60 0001 C CNN +F 2 "lib_smd:SM0805" H 13950 2250 60 0001 C CNN F 3 "" H 13950 2250 60 0001 C CNN 1 13950 2250 1 0 0 -1 @@ -1466,7 +1466,7 @@ U 1 1 46237E2F P 14200 2250 F 0 "R12" V 14280 2250 50 0000 C CNN F 1 "20K" V 14200 2250 50 0000 C CNN -F 2 "" H 14200 2250 60 0001 C CNN +F 2 "lib_smd:SM0805" H 14200 2250 60 0001 C CNN F 3 "" H 14200 2250 60 0001 C CNN 1 14200 2250 1 0 0 -1 @@ -1477,7 +1477,7 @@ U 1 1 46237E28 P 14450 1900 F 0 "R7" V 14530 1900 50 0000 C CNN F 1 "1K" V 14450 1900 50 0000 C CNN -F 2 "" H 14450 1900 60 0001 C CNN +F 2 "lib_smd:SM0805" H 14450 1900 60 0001 C CNN F 3 "" H 14450 1900 60 0001 C CNN 1 14450 1900 0 1 1 0 @@ -1510,7 +1510,7 @@ U 1 1 46237DF9 P 13550 1450 F 0 "C14" H 13600 1550 50 0000 L CNN F 1 "100nF" V 13350 1450 50 0000 L CNN -F 2 "" H 13550 1450 60 0001 C CNN +F 2 "lib_smd:SM0805" H 13550 1450 60 0001 C CNN F 3 "" H 13550 1450 60 0001 C CNN 1 13550 1450 0 1 1 0 @@ -1534,7 +1534,7 @@ U 1 1 461BE50C P 5500 3050 F 0 "R45" V 5600 2950 50 0000 C CNN F 1 "4,7K" V 5500 3050 50 0000 C CNN -F 2 "" H 5500 3050 60 0001 C CNN +F 2 "lib_smd:SM0805" H 5500 3050 60 0001 C CNN F 3 "" H 5500 3050 60 0001 C CNN 1 5500 3050 0 1 1 0 @@ -1603,7 +1603,7 @@ U 1 1 461BE364 P 6750 1650 F 0 "C20" H 6800 1750 50 0000 L CNN F 1 "1nF" H 6800 1550 50 0000 L CNN -F 2 "" H 6750 1650 60 0001 C CNN +F 2 "lib_smd:SM0805" H 6750 1650 60 0001 C CNN F 3 "" H 6750 1650 60 0001 C CNN 1 6750 1650 1 0 0 -1 @@ -1614,7 +1614,7 @@ U 1 1 461BE35C P 7100 1650 F 0 "C21" H 7150 1750 50 0000 L CNN F 1 "100nF" H 7150 1550 50 0000 L CNN -F 2 "" H 7100 1650 60 0001 C CNN +F 2 "lib_smd:SM0805" H 7100 1650 60 0001 C CNN F 3 "" H 7100 1650 60 0001 C CNN 1 7100 1650 1 0 0 -1 @@ -1625,7 +1625,7 @@ U 1 1 461BE327 P 6600 1200 F 0 "L2" V 6550 1200 40 0000 C CNN F 1 "10uH" V 6700 1200 40 0000 C CNN -F 2 "" H 6600 1200 60 0001 C CNN +F 2 "lib_smd:SM1206" H 6600 1200 60 0001 C CNN F 3 "" H 6600 1200 60 0001 C CNN 1 6600 1200 0 -1 -1 0 @@ -1662,7 +1662,7 @@ U 1 1 461BE230 P 5850 3150 F 0 "R9" V 5930 3150 50 0000 C CNN F 1 "0" V 5850 3150 50 0000 C CNN -F 2 "" H 5850 3150 60 0001 C CNN +F 2 "lib_smd:SM0805" H 5850 3150 60 0001 C CNN F 3 "" H 5850 3150 60 0001 C CNN 1 5850 3150 0 1 1 0 @@ -1738,7 +1738,7 @@ U 1 1 461BE054 P 5050 5650 F 0 "R13" V 5130 5650 50 0000 C CNN F 1 "10K" V 5050 5650 50 0000 C CNN -F 2 "" H 5050 5650 60 0001 C CNN +F 2 "lib_smd:SM0805" H 5050 5650 60 0001 C CNN F 3 "" H 5050 5650 60 0001 C CNN 1 5050 5650 0 1 1 0 @@ -1749,7 +1749,7 @@ U 1 1 461BE051 P 4450 5550 F 0 "R11" V 4530 5550 50 0000 C CNN F 1 "10K" V 4450 5550 50 0000 C CNN -F 2 "" H 4450 5550 60 0001 C CNN +F 2 "lib_smd:SM0805" H 4450 5550 60 0001 C CNN F 3 "" H 4450 5550 60 0001 C CNN 1 4450 5550 0 1 1 0 @@ -1760,7 +1760,7 @@ U 1 1 461BE04B P 5050 5450 F 0 "R10" V 5130 5450 50 0000 C CNN F 1 "10K" V 5050 5450 50 0000 C CNN -F 2 "" H 5050 5450 60 0001 C CNN +F 2 "lib_smd:SM0805" H 5050 5450 60 0001 C CNN F 3 "" H 5050 5450 60 0001 C CNN 1 5050 5450 0 1 1 0 @@ -1771,7 +1771,7 @@ U 1 1 461BE047 P 4450 5350 F 0 "R8" V 4530 5350 50 0000 C CNN F 1 "10K" V 4450 5350 50 0000 C CNN -F 2 "" H 4450 5350 60 0001 C CNN +F 2 "lib_smd:SM0805" H 4450 5350 60 0001 C CNN F 3 "" H 4450 5350 60 0001 C CNN 1 4450 5350 0 1 1 0 @@ -1782,7 +1782,7 @@ U 1 1 461BE046 P 5050 5250 F 0 "R6" V 5130 5250 50 0000 C CNN F 1 "10K" V 5050 5250 50 0000 C CNN -F 2 "" H 5050 5250 60 0001 C CNN +F 2 "lib_smd:SM0805" H 5050 5250 60 0001 C CNN F 3 "" H 5050 5250 60 0001 C CNN 1 5050 5250 0 1 1 0 @@ -1793,7 +1793,7 @@ U 1 1 461BE041 P 4450 5150 F 0 "R5" V 4530 5150 50 0000 C CNN F 1 "10K" V 4450 5150 50 0000 C CNN -F 2 "" H 4450 5150 60 0001 C CNN +F 2 "lib_smd:SM0805" H 4450 5150 60 0001 C CNN F 3 "" H 4450 5150 60 0001 C CNN 1 4450 5150 0 1 1 0 @@ -1804,7 +1804,7 @@ U 1 1 461BE039 P 5050 5050 F 0 "R4" V 5130 5050 50 0000 C CNN F 1 "10K" V 5050 5050 50 0000 C CNN -F 2 "" H 5050 5050 60 0001 C CNN +F 2 "lib_smd:SM0805" H 5050 5050 60 0001 C CNN F 3 "" H 5050 5050 60 0001 C CNN 1 5050 5050 0 1 1 0 @@ -1829,7 +1829,7 @@ U 1 1 461BBA34 P 13700 5000 F 0 "TA-1" H 13750 4900 40 0000 C CNN F 1 "CONN_1" H 13650 5040 30 0001 C CNN -F 2 "" H 13700 5000 60 0001 C CNN +F 2 "connect:PINTST" H 13700 5000 60 0001 C CNN F 3 "" H 13700 5000 60 0001 C CNN 1 13700 5000 1 0 0 -1 @@ -1899,7 +1899,7 @@ U 1 1 461BB8C0 P 14050 5150 F 0 "R26" V 14130 5150 50 0000 C CNN F 1 "10K" V 14050 5150 50 0000 C CNN -F 2 "" H 14050 5150 60 0001 C CNN +F 2 "lib_smd:SM0805" H 14050 5150 60 0001 C CNN F 3 "" H 14050 5150 60 0001 C CNN 1 14050 5150 1 0 0 -1 @@ -1910,7 +1910,7 @@ U 1 1 461BB894 P 14650 4950 F 0 "CLKOUT1" H 14700 4850 40 0000 C CNN F 1 "CONN_1" H 14600 4990 30 0001 C CNN -F 2 "" H 14650 4950 60 0001 C CNN +F 2 "connect:PINTST" H 14650 4950 60 0001 C CNN F 3 "" H 14650 4950 60 0001 C CNN 1 14650 4950 1 0 0 -1 @@ -1936,7 +1936,7 @@ U 1 1 461BB799 P 14550 3200 F 0 "R20" V 14630 3200 50 0000 C CNN F 1 "4,7K" V 14550 3200 50 0000 C CNN -F 2 "" H 14550 3200 60 0001 C CNN +F 2 "lib_smd:SM0805" H 14550 3200 60 0001 C CNN F 3 "" H 14550 3200 60 0001 C CNN 1 14550 3200 1 0 0 -1 @@ -1947,7 +1947,7 @@ U 1 1 461BB798 P 14300 3200 F 0 "R19" V 14380 3200 50 0000 C CNN F 1 "4,7K" V 14300 3200 50 0000 C CNN -F 2 "" H 14300 3200 60 0001 C CNN +F 2 "lib_smd:SM0805" H 14300 3200 60 0001 C CNN F 3 "" H 14300 3200 60 0001 C CNN 1 14300 3200 1 0 0 -1 @@ -1958,7 +1958,7 @@ U 1 1 461BB795 P 14050 3200 F 0 "R18" V 14130 3200 50 0000 C CNN F 1 "4,7K" V 14050 3200 50 0000 C CNN -F 2 "" H 14050 3200 60 0001 C CNN +F 2 "lib_smd:SM0805" H 14050 3200 60 0001 C CNN F 3 "" H 14050 3200 60 0001 C CNN 1 14050 3200 1 0 0 -1 @@ -1969,7 +1969,7 @@ U 1 1 461BB790 P 13800 3200 F 0 "R17" V 13880 3200 50 0000 C CNN F 1 "4,7K" V 13800 3200 50 0000 C CNN -F 2 "" H 13800 3200 60 0001 C CNN +F 2 "lib_smd:SM0805" H 13800 3200 60 0001 C CNN F 3 "" H 13800 3200 60 0001 C CNN 1 13800 3200 1 0 0 -1 @@ -1990,7 +1990,7 @@ U 1 1 461BB742 P 5400 3750 F 0 "R46" V 5480 3750 50 0000 C CNN F 1 "22" V 5400 3750 50 0000 C CNN -F 2 "" H 5400 3750 60 0001 C CNN +F 2 "lib_smd:SM0805" H 5400 3750 60 0001 C CNN F 3 "" H 5400 3750 60 0001 C CNN 1 5400 3750 0 1 1 0 @@ -2050,7 +2050,7 @@ U 1 1 461BB661 P 4650 1350 F 0 "R2" V 4730 1350 50 0000 C CNN F 1 "4,7K" V 4650 1350 50 0000 C CNN -F 2 "" H 4650 1350 60 0001 C CNN +F 2 "lib_smd:SM0805" H 4650 1350 60 0001 C CNN F 3 "" H 4650 1350 60 0001 C CNN 1 4650 1350 1 0 0 -1 @@ -2072,7 +2072,7 @@ U 1 1 461BB65F P 4450 1350 F 0 "R25" V 4530 1350 50 0000 C CNN F 1 "4,7K" V 4450 1350 50 0000 C CNN -F 2 "" H 4450 1350 60 0001 C CNN +F 2 "lib_smd:SM0805" H 4450 1350 60 0001 C CNN F 3 "" H 4450 1350 60 0001 C CNN 1 4450 1350 1 0 0 -1 @@ -2083,7 +2083,7 @@ U 1 1 461BB648 P 4050 2000 F 0 "CLK1" H 4050 2150 60 0000 C CNN F 1 "JUMPER" H 4050 1920 40 0000 C CNN -F 2 "" H 4050 2000 60 0001 C CNN +F 2 "pin_array:PIN_ARRAY_2X1" H 4050 2000 60 0001 C CNN F 3 "" H 4050 2000 60 0001 C CNN 1 4050 2000 1 0 0 -1 @@ -2094,7 +2094,7 @@ U 1 1 461BB62E P 4050 1650 F 0 "CLK0" H 4050 1800 60 0000 C CNN F 1 "JUMPER" H 4050 1570 40 0000 C CNN -F 2 "" H 4050 1650 60 0001 C CNN +F 2 "pin_array:PIN_ARRAY_2X1" H 4050 1650 60 0001 C CNN F 3 "" H 4050 1650 60 0001 C CNN 1 4050 1650 1 0 0 -1 @@ -2116,7 +2116,7 @@ U 1 1 461BB5E5 P 7050 10100 F 0 "C6" H 7100 10200 50 0000 L CNN F 1 "100nF" H 7100 10000 50 0000 L CNN -F 2 "" H 7050 10100 60 0001 C CNN +F 2 "lib_smd:SM0805" H 7050 10100 60 0001 C CNN F 3 "" H 7050 10100 60 0001 C CNN 1 7050 10100 1 0 0 -1 @@ -2149,7 +2149,7 @@ U 1 1 461BAF5C P 5050 3050 F 0 "R16" V 5130 3050 50 0000 C CNN F 1 "4,7K" V 5050 3050 50 0000 C CNN -F 2 "" H 5050 3050 60 0001 C CNN +F 2 "lib_smd:SM0805" H 5050 3050 60 0001 C CNN F 3 "" H 5050 3050 60 0001 C CNN 1 5050 3050 1 0 0 -1 @@ -2160,7 +2160,7 @@ U 1 1 461BAF4F P 4700 3350 F 0 "BDM_EN1" H 4700 3500 60 0000 C CNN F 1 "JUMPER" H 4700 3270 40 0000 C CNN -F 2 "" H 4700 3350 60 0001 C CNN +F 2 "pin_array:PIN_ARRAY_2X1" H 4700 3350 60 0001 C CNN F 3 "" H 4700 3350 60 0001 C CNN 1 4700 3350 1 0 0 -1 @@ -2193,7 +2193,7 @@ U 1 1 461BAEE7 P 13150 4300 F 0 "BDM_PORT1" H 13150 5000 60 0000 C CNN F 1 "CONN_13X2" V 13150 4300 50 0000 C CNN -F 2 "" H 13150 4300 60 0001 C CNN +F 2 "pin_array:pin_array_13x2" H 13150 4300 60 0001 C CNN F 3 "" H 13150 4300 60 0001 C CNN 1 13150 4300 1 0 0 -1 @@ -2226,7 +2226,7 @@ U 1 1 46161D3C P 9650 10100 F 0 "C17" H 9700 10200 50 0000 L CNN F 1 "100uF" H 9700 10000 50 0000 L CNN -F 2 "" H 9650 10100 60 0001 C CNN +F 2 "lib_smd:SM1206POL" H 9650 10100 60 0001 C CNN F 3 "" H 9650 10100 60 0001 C CNN 1 9650 10100 1 0 0 -1 @@ -2248,7 +2248,7 @@ U 1 1 46161CDA P 9250 10100 F 0 "C12" H 9300 10200 50 0000 L CNN F 1 "100nF" H 9300 10000 50 0000 L CNN -F 2 "" H 9250 10100 60 0001 C CNN +F 2 "lib_smd:SM0805" H 9250 10100 60 0001 C CNN F 3 "" H 9250 10100 60 0001 C CNN 1 9250 10100 1 0 0 -1 @@ -2259,7 +2259,7 @@ U 1 1 46161CD9 P 8900 10100 F 0 "C11" H 8950 10200 50 0000 L CNN F 1 "100nF" H 8950 10000 50 0000 L CNN -F 2 "" H 8900 10100 60 0001 C CNN +F 2 "lib_smd:SM0805" H 8900 10100 60 0001 C CNN F 3 "" H 8900 10100 60 0001 C CNN 1 8900 10100 1 0 0 -1 @@ -2270,7 +2270,7 @@ U 1 1 46161CD8 P 8500 10100 F 0 "C10" H 8550 10200 50 0000 L CNN F 1 "100nF" H 8550 10000 50 0000 L CNN -F 2 "" H 8500 10100 60 0001 C CNN +F 2 "lib_smd:SM0805" H 8500 10100 60 0001 C CNN F 3 "" H 8500 10100 60 0001 C CNN 1 8500 10100 1 0 0 -1 @@ -2281,7 +2281,7 @@ U 1 1 46161CD7 P 8150 10100 F 0 "C9" H 8200 10200 50 0000 L CNN F 1 "100nF" H 8200 10000 50 0000 L CNN -F 2 "" H 8150 10100 60 0001 C CNN +F 2 "lib_smd:SM0805" H 8150 10100 60 0001 C CNN F 3 "" H 8150 10100 60 0001 C CNN 1 8150 10100 1 0 0 -1 @@ -2292,7 +2292,7 @@ U 1 1 46161CD4 P 7800 10100 F 0 "C8" H 7850 10200 50 0000 L CNN F 1 "100nF" H 7850 10000 50 0000 L CNN -F 2 "" H 7800 10100 60 0001 C CNN +F 2 "lib_smd:SM0805" H 7800 10100 60 0001 C CNN F 3 "" H 7800 10100 60 0001 C CNN 1 7800 10100 1 0 0 -1 @@ -2303,7 +2303,7 @@ U 1 1 46161CD3 P 7450 10100 F 0 "C7" H 7500 10200 50 0000 L CNN F 1 "100nF" H 7500 10000 50 0000 L CNN -F 2 "" H 7450 10100 60 0001 C CNN +F 2 "lib_smd:SM0805" H 7450 10100 60 0001 C CNN F 3 "" H 7450 10100 60 0001 C CNN 1 7450 10100 1 0 0 -1 @@ -2314,7 +2314,7 @@ U 1 1 46161CB8 P 6650 10100 F 0 "C5" H 6700 10200 50 0000 L CNN F 1 "100nF" H 6700 10000 50 0000 L CNN -F 2 "" H 6650 10100 60 0001 C CNN +F 2 "lib_smd:SM0805" H 6650 10100 60 0001 C CNN F 3 "" H 6650 10100 60 0001 C CNN 1 6650 10100 1 0 0 -1 @@ -2325,7 +2325,7 @@ U 1 1 46161CB5 P 6300 10100 F 0 "C4" H 6350 10200 50 0000 L CNN F 1 "100nF" H 6350 10000 50 0000 L CNN -F 2 "" H 6300 10100 60 0001 C CNN +F 2 "lib_smd:SM0805" H 6300 10100 60 0001 C CNN F 3 "" H 6300 10100 60 0001 C CNN 1 6300 10100 1 0 0 -1 diff --git a/demos/kit-dev-coldfire-xilinx_5213/xilinx.sch b/demos/kit-dev-coldfire-xilinx_5213/xilinx.sch index 4fd9403305..300fec8af0 100644 --- a/demos/kit-dev-coldfire-xilinx_5213/xilinx.sch +++ b/demos/kit-dev-coldfire-xilinx_5213/xilinx.sch @@ -385,7 +385,7 @@ U 1 1 4791D59D P 10450 3900 F 0 "R64" V 10530 3900 50 0000 C CNN F 1 "3,3" V 10450 3900 50 0000 C CNN -F 2 "" H 10450 3900 60 0001 C CNN +F 2 "discret:R4" H 10450 3900 60 0001 C CNN F 3 "" H 10450 3900 60 0001 C CNN 1 10450 3900 0 1 1 0 @@ -470,7 +470,7 @@ U 1 1 46A76EB2 P 6600 1250 F 0 "P3" H 6600 1400 50 0000 C CNN F 1 "CONN_2X2" H 6610 1120 40 0000 C CNN -F 2 "" H 6600 1250 60 0001 C CNN +F 2 "pin_array:PIN_ARRAY_2X2" H 6600 1250 60 0001 C CNN F 3 "" H 6600 1250 60 0001 C CNN 1 6600 1250 -1 0 0 -1 @@ -481,7 +481,7 @@ U 1 1 470F38BE P 4550 4100 F 0 "U9" H 4600 4150 70 0000 C CNN F 1 "XCR3256-TQ144" H 4550 500 60 0000 C CNN -F 2 "" H 4550 4100 60 0001 C CNN +F 2 "lib_smd:TQFP144" H 4550 4100 60 0001 C CNN F 3 "" H 4550 4100 60 0001 C CNN 1 4550 4100 1 0 0 -1 @@ -662,7 +662,7 @@ U 1 1 46ADE55A P 9200 3050 F 0 "P4" H 9250 3100 60 0000 C CNN F 1 "CONN_20X2" V 9200 3050 50 0000 C CNN -F 2 "" H 9200 3050 60 0001 C CNN +F 2 "pin_array:PIN_ARRAY_20X2" H 9200 3050 60 0001 C CNN F 3 "" H 9200 3050 60 0001 C CNN 1 9200 3050 1 0 0 -1 @@ -725,7 +725,7 @@ U 1 1 46A76BCA P 3300 650 F 0 "R57" V 3380 650 50 0000 C CNN F 1 "4K7" V 3300 650 50 0000 C CNN -F 2 "" H 3300 650 60 0001 C CNN +F 2 "lib_smd:SM0805" H 3300 650 60 0001 C CNN F 3 "" H 3300 650 60 0001 C CNN 1 3300 650 0 1 1 0 @@ -749,7 +749,7 @@ U 1 1 46A76BC4 P 9300 4950 F 0 "D8" H 9300 5050 50 0000 C CNN F 1 "LED" H 9300 4850 50 0000 C CNN -F 2 "" H 9300 4950 60 0001 C CNN +F 2 "lib_smd:SM1206POL" H 9300 4950 60 0001 C CNN F 3 "" H 9300 4950 60 0001 C CNN 1 9300 4950 1 0 0 -1 @@ -760,7 +760,7 @@ U 1 1 46A76BC3 P 8800 4950 F 0 "R62" V 8880 4950 50 0000 C CNN F 1 "1K" V 8800 4950 50 0000 C CNN -F 2 "" H 8800 4950 60 0001 C CNN +F 2 "lib_smd:SM0805" H 8800 4950 60 0001 C CNN F 3 "" H 8800 4950 60 0001 C CNN 1 8800 4950 0 -1 -1 0 @@ -793,7 +793,7 @@ U 1 1 46A76BBC P 10650 6350 F 0 "C61" H 10700 6450 50 0000 L CNN F 1 "100nF" H 10650 6250 50 0000 L CNN -F 2 "" H 10650 6350 60 0001 C CNN +F 2 "lib_smd:SM0805" H 10650 6350 60 0001 C CNN F 3 "" H 10650 6350 60 0001 C CNN 1 10650 6350 1 0 0 -1 @@ -804,7 +804,7 @@ U 1 1 46A76BBB P 10350 6350 F 0 "C60" H 10400 6450 50 0000 L CNN F 1 "100nF" H 10350 6250 50 0000 L CNN -F 2 "" H 10350 6350 60 0001 C CNN +F 2 "lib_smd:SM0805" H 10350 6350 60 0001 C CNN F 3 "" H 10350 6350 60 0001 C CNN 1 10350 6350 1 0 0 -1 @@ -815,7 +815,7 @@ U 1 1 46A76BBA P 10050 6350 F 0 "C59" H 10100 6450 50 0000 L CNN F 1 "100nF" H 10050 6250 50 0000 L CNN -F 2 "" H 10050 6350 60 0001 C CNN +F 2 "lib_smd:SM0805" H 10050 6350 60 0001 C CNN F 3 "" H 10050 6350 60 0001 C CNN 1 10050 6350 1 0 0 -1 @@ -826,7 +826,7 @@ U 1 1 46A76BB5 P 8550 6350 F 0 "C54" H 8600 6450 50 0000 L CNN F 1 "100nF" H 8550 6250 50 0000 L CNN -F 2 "" H 8550 6350 60 0001 C CNN +F 2 "lib_smd:SM0805" H 8550 6350 60 0001 C CNN F 3 "" H 8550 6350 60 0001 C CNN 1 8550 6350 1 0 0 -1 @@ -837,7 +837,7 @@ U 1 1 46A76BB4 P 8250 6350 F 0 "C53" H 8300 6450 50 0000 L CNN F 1 "100nF" H 8250 6250 50 0000 L CNN -F 2 "" H 8250 6350 60 0001 C CNN +F 2 "lib_smd:SM0805" H 8250 6350 60 0001 C CNN F 3 "" H 8250 6350 60 0001 C CNN 1 8250 6350 1 0 0 -1 @@ -848,7 +848,7 @@ U 1 1 46A76BB3 P 7950 6350 F 0 "C52" H 8000 6450 50 0000 L CNN F 1 "100nF" H 7950 6250 50 0000 L CNN -F 2 "" H 7950 6350 60 0001 C CNN +F 2 "lib_smd:SM0805" H 7950 6350 60 0001 C CNN F 3 "" H 7950 6350 60 0001 C CNN 1 7950 6350 1 0 0 -1 @@ -859,7 +859,7 @@ U 1 1 46A76BB2 P 7650 6350 F 0 "C51" H 7700 6450 50 0000 L CNN F 1 "100nF" H 7650 6250 50 0000 L CNN -F 2 "" H 7650 6350 60 0001 C CNN +F 2 "lib_smd:SM0805" H 7650 6350 60 0001 C CNN F 3 "" H 7650 6350 60 0001 C CNN 1 7650 6350 1 0 0 -1 @@ -870,7 +870,7 @@ U 1 1 46A76BB1 P 9750 6350 F 0 "C58" H 9800 6450 50 0000 L CNN F 1 "100nF" H 9750 6250 50 0000 L CNN -F 2 "" H 9750 6350 60 0001 C CNN +F 2 "lib_smd:SM0805" H 9750 6350 60 0001 C CNN F 3 "" H 9750 6350 60 0001 C CNN 1 9750 6350 1 0 0 -1 @@ -881,7 +881,7 @@ U 1 1 46A76BB0 P 9450 6350 F 0 "C57" H 9500 6450 50 0000 L CNN F 1 "100nF" H 9450 6250 50 0000 L CNN -F 2 "" H 9450 6350 60 0001 C CNN +F 2 "lib_smd:SM0805" H 9450 6350 60 0001 C CNN F 3 "" H 9450 6350 60 0001 C CNN 1 9450 6350 1 0 0 -1 @@ -892,7 +892,7 @@ U 1 1 46A76BAF P 9150 6350 F 0 "C56" H 9200 6450 50 0000 L CNN F 1 "100nF" H 9150 6250 50 0000 L CNN -F 2 "" H 9150 6350 60 0001 C CNN +F 2 "lib_smd:SM0805" H 9150 6350 60 0001 C CNN F 3 "" H 9150 6350 60 0001 C CNN 1 9150 6350 1 0 0 -1 @@ -903,7 +903,7 @@ U 1 1 46A76BAE P 8850 6350 F 0 "C55" H 8900 6450 50 0000 L CNN F 1 "100nF" H 8850 6250 50 0000 L CNN -F 2 "" H 8850 6350 60 0001 C CNN +F 2 "lib_smd:SM0805" H 8850 6350 60 0001 C CNN F 3 "" H 8850 6350 60 0001 C CNN 1 8850 6350 1 0 0 -1 @@ -929,7 +929,7 @@ U 1 1 46A76BA8 P 9300 5250 F 0 "D9" H 9300 5350 50 0000 C CNN F 1 "LED" H 9300 5150 50 0000 C CNN -F 2 "" H 9300 5250 60 0001 C CNN +F 2 "lib_smd:SM1206POL" H 9300 5250 60 0001 C CNN F 3 "" H 9300 5250 60 0001 C CNN 1 9300 5250 1 0 0 -1 @@ -940,7 +940,7 @@ U 1 1 46A76BA7 P 8800 5250 F 0 "R63" V 8880 5250 50 0000 C CNN F 1 "1K" V 8800 5250 50 0000 C CNN -F 2 "" H 8800 5250 60 0001 C CNN +F 2 "lib_smd:SM0805" H 8800 5250 60 0001 C CNN F 3 "" H 8800 5250 60 0001 C CNN 1 8800 5250 0 -1 -1 0 @@ -957,7 +957,7 @@ U 1 1 46A76BA6 P 2350 1050 F 0 "P1" V 2300 1050 60 0000 C CNN F 1 "CONN_6" V 2400 1050 60 0000 C CNN -F 2 "" H 2350 1050 60 0001 C CNN +F 2 "pin_array:PIN_ARRAY-6X1" H 2350 1050 60 0001 C CNN F 3 "" H 2350 1050 60 0001 C CNN 1 2350 1050 -1 0 0 1 diff --git a/pcbnew/dialogs/dialog_track_via_size.cpp b/pcbnew/dialogs/dialog_track_via_size.cpp index 07b681ad43..a7522aba70 100644 --- a/pcbnew/dialogs/dialog_track_via_size.cpp +++ b/pcbnew/dialogs/dialog_track_via_size.cpp @@ -38,6 +38,7 @@ DIALOG_TRACK_VIA_SIZE::DIALOG_TRACK_VIA_SIZE( wxWindow* aParent, PNS_ROUTING_SET m_viaDrill->SetValue( To_User_Unit( m_viaDrill->GetUnits(), m_settings.GetViaDrill() ) ); m_trackWidth->SetFocus(); + GetSizer()->SetSizeHints( this ); // Pressing ENTER when any of the text input fields is active applies changes #if wxCHECK_VERSION( 3, 0, 0 ) diff --git a/pcbnew/dialogs/dialog_track_via_size_base.cpp b/pcbnew/dialogs/dialog_track_via_size_base.cpp index a402009da1..0331d8f204 100644 --- a/pcbnew/dialogs/dialog_track_via_size_base.cpp +++ b/pcbnew/dialogs/dialog_track_via_size_base.cpp @@ -1,10 +1,12 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 30 2013) +// C++ code generated with wxFormBuilder (version Nov 6 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// +#include "dialog_shim.h" + #include "dialog_track_via_size_base.h" /////////////////////////////////////////////////////////////////////////// diff --git a/pcbnew/dialogs/dialog_track_via_size_base.fbp b/pcbnew/dialogs/dialog_track_via_size_base.fbp index 61462d3330..f442938f09 100644 --- a/pcbnew/dialogs/dialog_track_via_size_base.fbp +++ b/pcbnew/dialogs/dialog_track_via_size_base.fbp @@ -20,8 +20,10 @@ . 1 + 1 1 1 + UI 0 0 @@ -42,8 +44,8 @@ DIALOG_TRACK_VIA_SIZE_BASE - 388,164 - wxDEFAULT_DIALOG_STYLE + 388,162 + wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER Track width and via size @@ -93,7 +95,7 @@ none 5 - wxALL + wxALL|wxEXPAND 0 1 @@ -145,7 +147,7 @@ 1 - + DIALOG_SHIM; dialog_shim.h 0 @@ -178,7 +180,7 @@ 5 - wxALL + wxALL|wxEXPAND 0 1 @@ -263,7 +265,7 @@ 5 - wxALL + wxALL|wxEXPAND 0 1 diff --git a/pcbnew/dialogs/dialog_track_via_size_base.h b/pcbnew/dialogs/dialog_track_via_size_base.h index de4f0e43a1..0446af107e 100644 --- a/pcbnew/dialogs/dialog_track_via_size_base.h +++ b/pcbnew/dialogs/dialog_track_via_size_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 30 2013) +// C++ code generated with wxFormBuilder (version Nov 6 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -11,6 +11,8 @@ #include #include #include +class DIALOG_SHIM; + #include #include #include @@ -46,7 +48,7 @@ class DIALOG_TRACK_VIA_SIZE_BASE : public wxDialog public: - DIALOG_TRACK_VIA_SIZE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Track width and via size"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 388,164 ), long style = wxDEFAULT_DIALOG_STYLE ); + DIALOG_TRACK_VIA_SIZE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Track width and via size"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 388,162 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_TRACK_VIA_SIZE_BASE(); }; From 3aa390b57ad4d57603842af32f5c0f6cbaf26a9a Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Wed, 30 Jul 2014 21:56:25 -0500 Subject: [PATCH 735/741] WTF --- eeschema/schedit.cpp | 46 ++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/eeschema/schedit.cpp b/eeschema/schedit.cpp index d9accae049..a4dec01a55 100644 --- a/eeschema/schedit.cpp +++ b/eeschema/schedit.cpp @@ -974,34 +974,34 @@ void SCH_EDIT_FRAME::OnDragItem( wxCommandEvent& aEvent ) switch( item->Type() ) { - case SCH_BUS_BUS_ENTRY_T: - case SCH_BUS_WIRE_ENTRY_T: - case SCH_LINE_T: - case SCH_JUNCTION_T: - case SCH_COMPONENT_T: - case SCH_LABEL_T: - case SCH_GLOBAL_LABEL_T: - case SCH_HIERARCHICAL_LABEL_T: - case SCH_SHEET_T: - m_canvas->MoveCursorToCrossHair(); + case SCH_BUS_BUS_ENTRY_T: + case SCH_BUS_WIRE_ENTRY_T: + case SCH_LINE_T: + case SCH_JUNCTION_T: + case SCH_COMPONENT_T: + case SCH_LABEL_T: + case SCH_GLOBAL_LABEL_T: + case SCH_HIERARCHICAL_LABEL_T: + case SCH_SHEET_T: + m_canvas->MoveCursorToCrossHair(); - if( screen->m_BlockLocate.GetState() == STATE_NO_BLOCK ) - { - INSTALL_UNBUFFERED_DC( dc, m_canvas ); + if( screen->m_BlockLocate.GetState() == STATE_NO_BLOCK ) + { + INSTALL_UNBUFFERED_DC( dc, m_canvas ); - if( !HandleBlockBegin( &dc, dragType, GetCrossHairPosition() ) ) - break; + if( !HandleBlockBegin( &dc, dragType, GetCrossHairPosition() ) ) + break; - // Give a non null size to the search block: - screen->m_BlockLocate.Inflate( 1 ); - HandleBlockEnd( &dc ); - } + // Give a non null size to the search block: + screen->m_BlockLocate.Inflate( 1 ); + HandleBlockEnd( &dc ); + } - break; + break; - default: - wxFAIL_MSG( wxString::Format( wxT( "Cannot drag schematic item type %s." ), - GetChars( item->GetClass() ) ) ); + default: + wxFAIL_MSG( wxString::Format( wxT( "Cannot drag schematic item type %s." ), + GetChars( item->GetClass() ) ) ); } } From 34b645daedda887dadf70af32937b06b969e1a16 Mon Sep 17 00:00:00 2001 From: Michael Narigon Date: Wed, 30 Jul 2014 22:04:34 -0500 Subject: [PATCH 736/741] warnings --- cvpcb/class_footprints_listbox.cpp | 10 ++++++---- cvpcb/class_library_listbox.cpp | 10 ++++++---- pcb_calculator/datafile_read_write.h | 2 +- pcbnew/modview_frame.cpp | 4 ++-- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/cvpcb/class_footprints_listbox.cpp b/cvpcb/class_footprints_listbox.cpp index 2dfbf93bc5..fc486d128c 100644 --- a/cvpcb/class_footprints_listbox.cpp +++ b/cvpcb/class_footprints_listbox.cpp @@ -60,11 +60,13 @@ int FOOTPRINTS_LISTBOX::GetCount() void FOOTPRINTS_LISTBOX::SetString( unsigned linecount, const wxString& text ) { - if( linecount >= m_footprintList.Count() ) - linecount = m_footprintList.Count() - 1; - - if( linecount >= 0 ) + unsigned count = m_footprintList.Count(); + if( count > 0 ) + { + if( linecount >= count ) + linecount = count - 1; m_footprintList[linecount] = text; + } } diff --git a/cvpcb/class_library_listbox.cpp b/cvpcb/class_library_listbox.cpp index e543b81459..ee2ea62717 100644 --- a/cvpcb/class_library_listbox.cpp +++ b/cvpcb/class_library_listbox.cpp @@ -60,11 +60,13 @@ int LIBRARY_LISTBOX::GetCount() void LIBRARY_LISTBOX::SetString( unsigned linecount, const wxString& text ) { - if( linecount >= m_libraryList.Count() ) - linecount = m_libraryList.Count() - 1; - - if( linecount >= 0 ) + unsigned count = m_libraryList.Count(); + if( count > 0 ) + { + if( linecount >= count ) + linecount = count - 1; m_libraryList[linecount] = text; + } } diff --git a/pcb_calculator/datafile_read_write.h b/pcb_calculator/datafile_read_write.h index 0100ef2cc6..1f04bde37b 100644 --- a/pcb_calculator/datafile_read_write.h +++ b/pcb_calculator/datafile_read_write.h @@ -1,5 +1,5 @@ #ifndef DATAFILE_READ_WRITE_H_ -#define PDATAFILE_READ_WRITE_H_ +#define DATAFILE_READ_WRITE_H_ /* * This program source code file is part of KiCad, a free EDA CAD application. * diff --git a/pcbnew/modview_frame.cpp b/pcbnew/modview_frame.cpp index 29c194b75e..68f1bb5853 100644 --- a/pcbnew/modview_frame.cpp +++ b/pcbnew/modview_frame.cpp @@ -713,8 +713,8 @@ void FOOTPRINT_VIEWER_FRAME::OnIterateFootprintList( wxCommandEvent& event ) break; default: - wxFAIL_MSG( wxT( "FOOTPRINT_VIEWER_FRAME::OnIterateFootprintList error: id = " ) + - event.GetId() ); + wxString id = wxString::Format(wxT("%i"),event.GetId()); + wxFAIL_MSG( wxT( "FOOTPRINT_VIEWER_FRAME::OnIterateFootprintList error: id = " ) + id ); } } From 73005087d5ed70506a2c500db8ecc96b32358b7a Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 31 Jul 2014 09:01:30 +0200 Subject: [PATCH 737/741] 3d_viewer fix translation and rotation issues (patch from Mario Luzeiro) --- 3d-viewer/3d_draw.cpp | 19 +++++----- 3d-viewer/3d_draw_basic_functions.cpp | 11 ++++-- 3d-viewer/3d_material.cpp | 4 +-- 3d-viewer/3d_mesh_model.cpp | 17 +++++++-- 3d-viewer/3d_mesh_model.h | 1 + 3d-viewer/modelparsers.h | 1 + 3d-viewer/vrml_v1_modelparser.cpp | 12 +++---- 3d-viewer/vrml_v2_modelparser.cpp | 50 +++++++++++++++++++++------ 3d-viewer/vrmlmodelparser.cpp | 4 +-- 3d-viewer/x3dmodelparser.cpp | 24 +++++++------ 10 files changed, 100 insertions(+), 43 deletions(-) diff --git a/3d-viewer/3d_draw.cpp b/3d-viewer/3d_draw.cpp index a4dd5e5c98..879ce47310 100644 --- a/3d-viewer/3d_draw.cpp +++ b/3d-viewer/3d_draw.cpp @@ -424,7 +424,7 @@ void EDA_3D_CANVAS::Redraw() // Initialize Projection Matrix for Ortographic View glOrtho( -size.x / orthoReductionFactor, size.x / orthoReductionFactor, - -size.y / orthoReductionFactor, size.y / orthoReductionFactor, 1, 100 ); + -size.y / orthoReductionFactor, size.y / orthoReductionFactor, 1, 10 ); } else { @@ -432,7 +432,7 @@ void EDA_3D_CANVAS::Redraw() double ratio_HV = (double) size.x / size.y; // Initialize Projection Matrix for Perspective View - gluPerspective( 45.0 * g_Parm_3D_Visu.m_Zoom, ratio_HV, 1, 100 ); + gluPerspective( 45.0 * g_Parm_3D_Visu.m_Zoom, ratio_HV, 1, 10 ); } // position viewer @@ -979,7 +979,7 @@ void EDA_3D_CANVAS::BuildBoard3DView(GLuint aBoardList, GLuint aBodyOnlyList) if( g_Parm_3D_Visu.IsRealisticMode() ) { - SetGLEpoxyColor( 0.9 ); + SetGLEpoxyColor( 1.0 ); if( g_Parm_3D_Visu.HightQualityMode() ) { SetGLTexture( m_text_pcb, 35.0f ); @@ -1400,7 +1400,7 @@ void EDA_3D_CANVAS::CreateDrawGL_List() m_glLists[GL_ID_BOARD] = glGenLists( 1 ); m_glLists[GL_ID_BODY] = glGenLists( 1 ); BuildBoard3DView(m_glLists[GL_ID_BOARD], m_glLists[GL_ID_BODY]); - + CheckGLError( __FILE__, __LINE__ ); } if( ! m_glLists[GL_ID_TECH_LAYERS] ) @@ -1409,6 +1409,7 @@ void EDA_3D_CANVAS::CreateDrawGL_List() glNewList( m_glLists[GL_ID_TECH_LAYERS], GL_COMPILE ); BuildTechLayers3DView(); glEndList(); + CheckGLError( __FILE__, __LINE__ ); } if( ! m_glLists[GL_ID_AUX_LAYERS] ) @@ -1417,9 +1418,9 @@ void EDA_3D_CANVAS::CreateDrawGL_List() glNewList( m_glLists[GL_ID_AUX_LAYERS], GL_COMPILE ); BuildBoard3DAuxLayers(); glEndList(); + CheckGLError( __FILE__, __LINE__ ); } - // draw modules 3D shapes if( ! m_glLists[GL_ID_3DSHAPES_SOLID_FRONT] && g_Parm_3D_Visu.GetFlag( FL_MODULE ) ) { @@ -1434,14 +1435,16 @@ void EDA_3D_CANVAS::CreateDrawGL_List() BuildFootprintShape3DList( m_glLists[GL_ID_3DSHAPES_SOLID_FRONT], m_glLists[GL_ID_3DSHAPES_TRANSP_FRONT], false ); + CheckGLError( __FILE__, __LINE__ ); + m_glLists[GL_ID_SHADOW_FRONT] = glGenLists( 1 ); m_glLists[GL_ID_SHADOW_BACK] = glGenLists( 1 ); m_glLists[GL_ID_SHADOW_BOARD] = glGenLists( 1 ); BuildShadowList(m_glLists[GL_ID_SHADOW_FRONT], m_glLists[GL_ID_SHADOW_BACK], m_glLists[GL_ID_SHADOW_BOARD]); - } - // Test for errors - CheckGLError( __FILE__, __LINE__ ); + CheckGLError( __FILE__, __LINE__ ); + } + #ifdef PRINT_CALCULATION_TIME unsigned endtime = GetRunningMicroSecs(); diff --git a/3d-viewer/3d_draw_basic_functions.cpp b/3d-viewer/3d_draw_basic_functions.cpp index b5d76f9884..d098c3dc9a 100644 --- a/3d-viewer/3d_draw_basic_functions.cpp +++ b/3d-viewer/3d_draw_basic_functions.cpp @@ -51,12 +51,12 @@ static void CALLBACK tessCPolyPt2Vertex( const GLvoid* data ); // 2 helper functions to set the current normal vector for gle items static inline void SetNormalZpos() { - glNormal3f( 0.0, 0.0, 1.0 ); + //glNormal3f( 0.0, 0.0, 1.0 ); } static inline void SetNormalZneg() { - glNormal3f( 0.0, 0.0, -1.0 ); + //glNormal3f( 0.0, 0.0, -1.0 ); } void TransfertToGLlist( std::vector< S3D_VERTEX >& aVertices, double aBiuTo3DUnits ); @@ -185,6 +185,10 @@ void Draw3D_SolidHorizontalPolyPolygons( const CPOLYGONS_LIST& aPolysList, startContour = 0; } + // https://www.opengl.org/sdk/docs/man2/xhtml/gluTessNormal.xml + gluTessNormal( tess, 0.0, 0.0, 0.0 ); + + v_data[0] = polylist.GetX( ii ) * aBiuTo3DUnits; v_data[1] = -polylist.GetY( ii ) * aBiuTo3DUnits; // gluTessVertex store pointers on data, not data, so do not store @@ -193,6 +197,7 @@ void Draw3D_SolidHorizontalPolyPolygons( const CPOLYGONS_LIST& aPolysList, // before calling gluDeleteTess gluTessVertex( tess, v_data, &polylist[ii] ); + if( polylist.IsEndContour( ii ) ) { gluTessEndContour( tess ); @@ -215,7 +220,9 @@ void Draw3D_SolidHorizontalPolyPolygons( const CPOLYGONS_LIST& aPolysList, gluDeleteTess( tess ); if( aThickness == 0 ) + { return; + } // Build the 3D data : vertical side Draw3D_VerticalPolygonalCylinder( polylist, aThickness, aZpos - (aThickness / 2.0), false, aBiuTo3DUnits ); diff --git a/3d-viewer/3d_material.cpp b/3d-viewer/3d_material.cpp index ece265d25e..0d2a4eb472 100644 --- a/3d-viewer/3d_material.cpp +++ b/3d-viewer/3d_material.cpp @@ -54,10 +54,10 @@ S3D_MATERIAL::S3D_MATERIAL( S3D_MASTER* father, const wxString& name ) : void SetOpenGlDefaultMaterial() { - glm::vec4 ambient( 0.2, 0.2, 0.2, 1.0 ); + glm::vec4 ambient( 0.15, 0.15, 0.15, 1.0 ); glm::vec4 specular( 0.1, 0.1, 0.1, 1.0 ); glm::vec4 emissive( 0.1, 0.1, 0.1, 1.0 ); - GLint shininess_value = 100; + GLint shininess_value = 80; glColorMaterial( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE ); //glColor4f( 1.0, 1.0, 1.0, 1.0 ); diff --git a/3d-viewer/3d_mesh_model.cpp b/3d-viewer/3d_mesh_model.cpp index b951733d50..52b70b09a1 100644 --- a/3d-viewer/3d_mesh_model.cpp +++ b/3d-viewer/3d_mesh_model.cpp @@ -57,6 +57,8 @@ S3D_MESH::~S3D_MESH() void S3D_MESH::openGL_RenderAllChilds() { + //DBG( printf( "openGL_RenderAllChilds") ); + glPushMatrix(); glTranslatef( m_translation.x, m_translation.y, m_translation.z ); glRotatef( m_rotation[3], m_rotation[0], m_rotation[1], m_rotation[2] ); @@ -76,12 +78,13 @@ void S3D_MESH::openGL_RenderAllChilds() SetOpenGlDefaultMaterial(); glPopMatrix(); + } void S3D_MESH::openGL_Render() { - //DBG( printf( " render\n" ) ); + //DBG( printf( "openGL_Render" ) ); if( m_Materials ) { @@ -90,6 +93,7 @@ void S3D_MESH::openGL_Render() if( m_CoordIndex.size() == 0) { + return; } @@ -134,7 +138,7 @@ void S3D_MESH::openGL_Render() { for(unsigned int ii = 0; ii < m_CoordIndex[idx].size(); ii++ ) { - glm::vec3 normal = m_PerVertexNormalsNormalized[m_CoordIndex[idx][ii]]; + glm::vec3 normal = m_PerVertexNormalsNormalized[m_NormalIndex[idx][ii]]; glNormal3fv( &normal.x ); glm::vec3 point = m_Point[m_CoordIndex[idx][ii]]; @@ -176,6 +180,8 @@ void S3D_MESH::openGL_Render() void S3D_MESH::calcPointNormalized () { + //DBG( printf( "calcPointNormalized\n" ) ); + if( isPointNormalizedComputed == true ) { return; @@ -221,8 +227,11 @@ bool IsClockwise(glm::vec3 v0, glm::vec3 v1, glm::vec3 v2) void S3D_MESH::calcPerFaceNormals () { + //DBG( printf( "calcPerFaceNormals" ) ); + if( isPerFaceNormalsComputed == true ) { + return; } isPerFaceNormalsComputed = true; @@ -230,6 +239,7 @@ void S3D_MESH::calcPerFaceNormals () if( m_PerVertexNormalsNormalized.size() > 0 ) { + return; } @@ -317,12 +327,15 @@ void S3D_MESH::calcPerFaceNormals () } } + } // http://www.bytehazard.com/code/vertnorm.html // http://www.emeyex.com/site/tuts/VertexNormals.pdf void S3D_MESH::calcPerPointNormals () { + //DBG( printf( "calcPerPointNormals" ) ); + if( isPerPointNormalsComputed == true ) { return; diff --git a/3d-viewer/3d_mesh_model.h b/3d-viewer/3d_mesh_model.h index d8dda92122..ab92903f41 100644 --- a/3d-viewer/3d_mesh_model.h +++ b/3d-viewer/3d_mesh_model.h @@ -66,6 +66,7 @@ public: // Point and index list std::vector< glm::vec3 > m_Point; std::vector< std::vector > m_CoordIndex; + std::vector< std::vector > m_NormalIndex; std::vector< glm::vec3 > m_PerFaceNormalsNormalized; std::vector< glm::vec3 > m_PerVertexNormalsNormalized; diff --git a/3d-viewer/modelparsers.h b/3d-viewer/modelparsers.h index ba9f038be3..f571027bca 100644 --- a/3d-viewer/modelparsers.h +++ b/3d-viewer/modelparsers.h @@ -167,6 +167,7 @@ private: int read_IndexedFaceSet(); int read_Coordinate(); int read_Normal(); + int read_NormalIndex(); int read_Color(); int read_coordIndex(); int read_colorIndex(); diff --git a/3d-viewer/vrml_v1_modelparser.cpp b/3d-viewer/vrml_v1_modelparser.cpp index d95dac985f..213677d393 100644 --- a/3d-viewer/vrml_v1_modelparser.cpp +++ b/3d-viewer/vrml_v1_modelparser.cpp @@ -68,6 +68,9 @@ void VRML1_MODEL_PARSER::Load( const wxString aFilename ) glShadeModel( GL_SMOOTH ); glEnable( GL_NORMALIZE ); + float vrmlunits_to_3Dunits = g_Parm_3D_Visu.m_BiuTo3Dunits * UNITS3D_TO_UNITSPCB; + glScalef( vrmlunits_to_3Dunits, vrmlunits_to_3Dunits, vrmlunits_to_3Dunits ); + glm::vec3 matScale( GetMaster()->m_MatScale.x, GetMaster()->m_MatScale.y, GetMaster()->m_MatScale.z ); glm::vec3 matRot( GetMaster()->m_MatRotation.x, GetMaster()->m_MatRotation.y, GetMaster()->m_MatRotation.z ); glm::vec3 matPos( GetMaster()->m_MatPosition.x, GetMaster()->m_MatPosition.y, GetMaster()->m_MatPosition.z ); @@ -78,14 +81,11 @@ void VRML1_MODEL_PARSER::Load( const wxString aFilename ) //glPushMatrix(); glTranslatef( matPos.x * SCALE_3D_CONV, matPos.y * SCALE_3D_CONV, matPos.z * SCALE_3D_CONV ); - glRotatef( matRot.z, 0.0f, 0.0f, 1.0f ); - glRotatef( matRot.y, 0.0f, 1.0f, 0.0f ); - glRotatef( matRot.x, 1.0f, 0.0f, 0.0f ); + glRotatef(-matRot.z, 0.0f, 0.0f, 1.0f ); + glRotatef(-matRot.y, 0.0f, 1.0f, 0.0f ); + glRotatef(-matRot.x, 1.0f, 0.0f, 0.0f ); glScalef( matScale.x, matScale.y, matScale.z ); - - float vrmlunits_to_3Dunits = g_Parm_3D_Visu.m_BiuTo3Dunits * UNITS3D_TO_UNITSPCB; - glScalef( vrmlunits_to_3Dunits, vrmlunits_to_3Dunits, vrmlunits_to_3Dunits ); // Switch the locale to standard C (needed to print floating point numbers like 1.3) SetLocaleTo_C_standard(); diff --git a/3d-viewer/vrml_v2_modelparser.cpp b/3d-viewer/vrml_v2_modelparser.cpp index 9202610149..b59a2a2ad9 100644 --- a/3d-viewer/vrml_v2_modelparser.cpp +++ b/3d-viewer/vrml_v2_modelparser.cpp @@ -70,6 +70,9 @@ void VRML2_MODEL_PARSER::Load( const wxString aFilename ) glShadeModel(GL_SMOOTH); glEnable(GL_NORMALIZE); + float vrmlunits_to_3Dunits = g_Parm_3D_Visu.m_BiuTo3Dunits * UNITS3D_TO_UNITSPCB; + glScalef( vrmlunits_to_3Dunits, vrmlunits_to_3Dunits, vrmlunits_to_3Dunits ); + glm::vec3 matScale( GetMaster()->m_MatScale.x, GetMaster()->m_MatScale.y, GetMaster()->m_MatScale.z ); glm::vec3 matRot( GetMaster()->m_MatRotation.x, GetMaster()->m_MatRotation.y, GetMaster()->m_MatRotation.z ); glm::vec3 matPos( GetMaster()->m_MatPosition.x, GetMaster()->m_MatPosition.y, GetMaster()->m_MatPosition.z ); @@ -80,14 +83,11 @@ void VRML2_MODEL_PARSER::Load( const wxString aFilename ) //glPushMatrix(); glTranslatef( matPos.x * SCALE_3D_CONV, matPos.y * SCALE_3D_CONV, matPos.z * SCALE_3D_CONV ); - glRotatef( matRot.z, 0.0f, 0.0f, 1.0f ); - glRotatef( matRot.y, 0.0f, 1.0f, 0.0f ); - glRotatef( matRot.x, 1.0f, 0.0f, 0.0f ); + glRotatef(-matRot.z, 0.0f, 0.0f, 1.0f ); + glRotatef(-matRot.y, 0.0f, 1.0f, 0.0f ); + glRotatef(-matRot.x, 1.0f, 0.0f, 0.0f ); glScalef( matScale.x, matScale.y, matScale.z ); - - float vrmlunits_to_3Dunits = g_Parm_3D_Visu.m_BiuTo3Dunits * UNITS3D_TO_UNITSPCB; - glScalef( vrmlunits_to_3Dunits, vrmlunits_to_3Dunits, vrmlunits_to_3Dunits ); // Switch the locale to standard C (needed to print floating point numbers like 1.3) SetLocaleTo_C_standard(); @@ -546,12 +546,10 @@ int VRML2_MODEL_PARSER::read_IndexedFaceSet() read_Coordinate(); } else if( strcmp( text, "Normal" ) == 0 ) { - //read_Normal(); - read_NotImplemented( m_file, '}' ); + read_Normal(); } else if( strcmp( text, "normalIndex" ) == 0 ) { - //DBG( printf( " normalIndex NotImplemented\n" ) ); - read_NotImplemented( m_file, ']' ); + read_NormalIndex(); } else if( strcmp( text, "Color" ) == 0 ) { read_Color(); @@ -606,6 +604,38 @@ int VRML2_MODEL_PARSER::read_colorIndex() } +int VRML2_MODEL_PARSER::read_NormalIndex() +{ + //DBG( printf( " read_NormalIndex\n" ) ); + + m_model->m_NormalIndex.clear(); + + glm::ivec3 coord; + + int dummy; // should be -1 + + std::vector coord_list; + coord_list.clear(); + while( fscanf (m_file, "%d, ", &dummy ) == 1 ) + { + if( dummy == -1 ) + { + m_model->m_NormalIndex.push_back( coord_list ); + //DBG( printf( " size: %lu ", coord_list.size()) ); + coord_list.clear(); + } else + { + coord_list.push_back( dummy ); + //DBG( printf( "%d ", dummy) ); + } + } + + //DBG( printf( " m_NormalIndex.size: %ld\n", m_model->m_NormalIndex.size() ) ); + + return 0; +} + + int VRML2_MODEL_PARSER::read_coordIndex() { //DBG( printf( " read_coordIndex\n" ) ); diff --git a/3d-viewer/vrmlmodelparser.cpp b/3d-viewer/vrmlmodelparser.cpp index e7d1bcdec1..31382d56a5 100644 --- a/3d-viewer/vrmlmodelparser.cpp +++ b/3d-viewer/vrmlmodelparser.cpp @@ -64,7 +64,7 @@ void VRML_MODEL_PARSER::Load( const wxString aFilename ) char line[12]; FILE* file; - // DBG( printf( "Load %s\n", static_cast(aFilename.mb_str()) ) ); + //DBG( printf( "Load %s", static_cast(aFilename.mb_str()) ) ); file = wxFopen( aFilename, wxT( "rt" ) ); @@ -86,7 +86,7 @@ void VRML_MODEL_PARSER::Load( const wxString aFilename ) { //DBG( printf( "About to parser a #VRML V2.0 file\n" ) ); vrml2_parser->Load( aFilename ); - + return; } else if( stricmp( line, "#VRML V1.0" ) == 0) diff --git a/3d-viewer/x3dmodelparser.cpp b/3d-viewer/x3dmodelparser.cpp index 8d87e39c0b..5dc8b03ea8 100644 --- a/3d-viewer/x3dmodelparser.cpp +++ b/3d-viewer/x3dmodelparser.cpp @@ -69,18 +69,23 @@ void X3D_MODEL_PARSER::Load( const wxString aFilename ) glShadeModel(GL_SMOOTH); glEnable(GL_NORMALIZE); - glm::vec3 matScale(GetMaster()->m_MatScale.x, GetMaster()->m_MatScale.y, GetMaster()->m_MatScale.z ); - glm::vec3 matRot(GetMaster()->m_MatRotation.x, GetMaster()->m_MatRotation.y, GetMaster()->m_MatRotation.z ); - glm::vec3 matPos(GetMaster()->m_MatPosition.x, GetMaster()->m_MatPosition.y, GetMaster()->m_MatPosition.z ); + float vrmlunits_to_3Dunits = g_Parm_3D_Visu.m_BiuTo3Dunits * UNITS3D_TO_UNITSPCB; + glScalef( vrmlunits_to_3Dunits, vrmlunits_to_3Dunits, vrmlunits_to_3Dunits ); + glm::vec3 matScale( GetMaster()->m_MatScale.x, GetMaster()->m_MatScale.y, GetMaster()->m_MatScale.z ); + glm::vec3 matRot( GetMaster()->m_MatRotation.x, GetMaster()->m_MatRotation.y, GetMaster()->m_MatRotation.z ); + glm::vec3 matPos( GetMaster()->m_MatPosition.x, GetMaster()->m_MatPosition.y, GetMaster()->m_MatPosition.z ); + + +#define SCALE_3D_CONV ((IU_PER_MILS * 1000.0f) / UNITS3D_TO_UNITSPCB) //glPushMatrix(); - glTranslatef( matPos.x, matPos.y, matPos.z); - - glRotatef( matRot.z, 0.0f, 0.0f, 1.0f); - glRotatef( matRot.y, 0.0f, 1.0f, 0.0f); - glRotatef( matRot.x, 1.0f, 0.0f, 0.0f); + glTranslatef( matPos.x * SCALE_3D_CONV, matPos.y * SCALE_3D_CONV, matPos.z * SCALE_3D_CONV ); + glRotatef(-matRot.z, 0.0f, 0.0f, 1.0f ); + glRotatef(-matRot.y, 0.0f, 1.0f, 0.0f ); + glRotatef(-matRot.x, 1.0f, 0.0f, 0.0f ); + glScalef( matScale.x, matScale.y, matScale.z ); // Switch the locale to standard C (needed to print floating point numbers) @@ -502,9 +507,6 @@ void X3D_MODEL_PARSER::readIndexedFaceSet( wxXmlNode* aFaceNode, //triplets.push_back(point); - double vrmlunits_to_3Dunits = g_Parm_3D_Visu.m_BiuTo3Dunits * UNITS3D_TO_UNITSPCB; - point *= vrmlunits_to_3Dunits; - m_model->m_Point.push_back( point ); // VRML From 94a46bf2df9e7dcda1db24bcc8e4db084c74a42b Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 1 Aug 2014 11:28:08 +0200 Subject: [PATCH 738/741] Fixed pcbnew crash when a locked footprint is dragged from an edge of the screen. --- common/view/wx_view_controls.cpp | 2 +- pcbnew/tools/edit_tool.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/view/wx_view_controls.cpp b/common/view/wx_view_controls.cpp index 5dc14ca1cf..848814e460 100644 --- a/common/view/wx_view_controls.cpp +++ b/common/view/wx_view_controls.cpp @@ -240,7 +240,7 @@ void WX_VIEW_CONTROLS::onTimer( wxTimerEvent& aEvent ) #if wxCHECK_VERSION( 3, 0, 0 ) moveEvent.SetControlDown( wxGetKeyState( WXK_CONTROL ) ); moveEvent.SetShiftDown( wxGetKeyState( WXK_SHIFT ) ); - moveEvent.SetAltDown( wxGetKeyState( WXK_ALT) ); + moveEvent.SetAltDown( wxGetKeyState( WXK_ALT ) ); #else // wx <3.0 do not have accessors, but the fields are exposed moveEvent.m_controlDown = wxGetKeyState( WXK_CONTROL ); diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 664f59a499..aefd8dd248 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -102,7 +102,6 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) PCB_BASE_EDIT_FRAME* editFrame = getEditFrame(); controls->ShowCursor( true ); controls->SetSnapping( true ); - controls->SetAutoPan( true ); controls->ForceCursorPosition( false ); // Main loop: keep receiving events @@ -159,7 +158,7 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) } else // Prepare to start dragging { - if( m_selectionTool->CheckLock() ) + if( m_selectionTool->CheckLock() || selection.Empty() ) break; // Save items, so changes can be undone @@ -188,6 +187,7 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) wxPoint( origin.x, origin.y ); } + controls->SetAutoPan( true ); m_dragging = true; } From 7b936f4d0ca294275ba90ac240cefd0f74687e45 Mon Sep 17 00:00:00 2001 From: Brian Sidebotham Date: Fri, 1 Aug 2014 22:27:20 +0100 Subject: [PATCH 739/741] 3D-Viewer now requires GLEW include - add GLEW_INCLUDE_DIR --- 3d-viewer/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/3d-viewer/CMakeLists.txt b/3d-viewer/CMakeLists.txt index 31cf55bc5b..e8af17d1f4 100644 --- a/3d-viewer/CMakeLists.txt +++ b/3d-viewer/CMakeLists.txt @@ -5,6 +5,7 @@ include_directories( textures ../pcbnew ../polygon + ${GLEW_INCLUDE_DIR} ${INC_AFTER} ) From d9c76c0d49f836407057419c2d6e5918f1d9eb2d Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 2 Aug 2014 09:46:47 +0200 Subject: [PATCH 740/741] 3D viewer bug fixes --- 3d-viewer/3d_canvas.cpp | 4 +- 3d-viewer/3d_draw.cpp | 1 - 3d-viewer/3d_draw_basic_functions.cpp | 10 ++- 3d-viewer/3d_mesh_model.cpp | 30 +++++--- 3d-viewer/vrml_v2_modelparser.cpp | 17 ++--- 3d-viewer/x3dmodelparser.cpp | 103 ++++++++++++++------------ 6 files changed, 93 insertions(+), 72 deletions(-) diff --git a/3d-viewer/3d_canvas.cpp b/3d-viewer/3d_canvas.cpp index 17913c4ed3..6ab883c29e 100644 --- a/3d-viewer/3d_canvas.cpp +++ b/3d-viewer/3d_canvas.cpp @@ -52,8 +52,8 @@ void CheckGLError(const char *aFileName, int aLineNumber) } errLast = err; - - wxLogError( wxT( "OpenGL error %d\nAt: %s, line: %d" ), err, aFileName, aLineNumber ); + + wxLogError( wxT( "OpenGL error %d At: %s, line: %d" ), err, GetChars( FROM_UTF8( aFileName ) ), aLineNumber ); } } diff --git a/3d-viewer/3d_draw.cpp b/3d-viewer/3d_draw.cpp index 879ce47310..e9086e656f 100644 --- a/3d-viewer/3d_draw.cpp +++ b/3d-viewer/3d_draw.cpp @@ -531,7 +531,6 @@ void EDA_3D_CANVAS::Redraw() glBindTexture( GL_TEXTURE_2D, m_text_fake_shadow_back ); glCallList( m_glLists[GL_ID_SHADOW_BACK] ); } - glColor4f( 1.0, 1.0, 1.0, 1.0 ); glEnable( GL_DEPTH_TEST ); diff --git a/3d-viewer/3d_draw_basic_functions.cpp b/3d-viewer/3d_draw_basic_functions.cpp index d098c3dc9a..8f72f3def7 100644 --- a/3d-viewer/3d_draw_basic_functions.cpp +++ b/3d-viewer/3d_draw_basic_functions.cpp @@ -172,9 +172,11 @@ void Draw3D_SolidHorizontalPolyPolygons( const CPOLYGONS_LIST& aPolysList, // Draw solid areas contained in this list CPOLYGONS_LIST polylist = aPolysList; // temporary copy for gluTessVertex + int startContour; + for( int side = 0; side < 2; side++ ) { - int startContour = 1; + startContour = 1; for( unsigned ii = 0; ii < polylist.GetCornersCount(); ii++ ) { @@ -217,6 +219,12 @@ void Draw3D_SolidHorizontalPolyPolygons( const CPOLYGONS_LIST& aPolysList, SetNormalZneg(); } + if( startContour == 0 ) + { + gluTessEndContour( tess ); + gluTessEndPolygon( tess ); + } + gluDeleteTess( tess ); if( aThickness == 0 ) diff --git a/3d-viewer/3d_mesh_model.cpp b/3d-viewer/3d_mesh_model.cpp index 52b70b09a1..4b0b19ef00 100644 --- a/3d-viewer/3d_mesh_model.cpp +++ b/3d-viewer/3d_mesh_model.cpp @@ -121,7 +121,7 @@ void S3D_MESH::openGL_Render() { if( m_Materials ) { - m_Materials->SetOpenGLMaterial(m_MaterialIndex[idx]); + m_Materials->SetOpenGLMaterial( m_MaterialIndex[idx] ); } } @@ -136,7 +136,7 @@ void S3D_MESH::openGL_Render() if( m_PerVertexNormalsNormalized.size() > 0 ) { - for(unsigned int ii = 0; ii < m_CoordIndex[idx].size(); ii++ ) + for( unsigned int ii = 0; ii < m_CoordIndex[idx].size(); ii++ ) { glm::vec3 normal = m_PerVertexNormalsNormalized[m_NormalIndex[idx][ii]]; glNormal3fv( &normal.x ); @@ -211,9 +211,12 @@ void S3D_MESH::calcPointNormalized () p = m_Point[i] * biggerPoint; m_PointNormalized.push_back( p ); } + + //DBG( printf("m_Point.size %u\n", m_Point.size()) ); } -bool IsClockwise(glm::vec3 v0, glm::vec3 v1, glm::vec3 v2) + +bool IsClockwise( glm::vec3 v0, glm::vec3 v1, glm::vec3 v2 ) { double sum = 0.0; @@ -253,6 +256,9 @@ void S3D_MESH::calcPerFaceNormals () m_PerFaceNormalsRaw.clear(); m_PerFaceSquaredArea.clear(); + //DBG( printf("m_CoordIndex.size %u\n", m_CoordIndex.size()) ); + //DBG( printf("m_PointNormalized.size %u\n", m_PointNormalized.size()) ); + for( unsigned int idx = 0; idx < m_CoordIndex.size(); idx++ ) { @@ -289,7 +295,7 @@ void S3D_MESH::calcPerFaceNormals () area = -area; } - if (area < FLT_EPSILON) + if( area < FLT_EPSILON ) { area = FLT_EPSILON * 2.0f; } @@ -311,10 +317,10 @@ void S3D_MESH::calcPerFaceNormals () else { // Cannot calc normal - if( (cross_prod.x > cross_prod.y) && (cross_prod.x > cross_prod.z)) + if( ( cross_prod.x > cross_prod.y ) && ( cross_prod.x > cross_prod.z ) ) { cross_prod.x = 1.0; cross_prod.y = 0.0; cross_prod.z = 0.0; - } else if( (cross_prod.y > cross_prod.x) && (cross_prod.y > cross_prod.z)) + } else if( ( cross_prod.y > cross_prod.x ) && ( cross_prod.y > cross_prod.z )) { cross_prod.x = 0.0; cross_prod.y = 1.0; cross_prod.z = 0.0; } else @@ -363,17 +369,19 @@ void S3D_MESH::calcPerPointNormals () { face_A_normals[each_vert_A_idx] = m_PerFaceNormalsRaw[each_face_A_idx] * (m_PerFaceSquaredArea[each_face_A_idx]); - // for each face A in mesh + int vertexIndex = (int)(m_CoordIndex[each_face_A_idx][each_vert_A_idx]); + glm::vec3 vector_face_A = m_PerFaceNormalsNormalized[each_face_A_idx]; + + // for each face B in mesh for( unsigned int each_face_B_idx = 0; each_face_B_idx < m_CoordIndex.size(); each_face_B_idx++ ) { //if A != B { // ignore self if ( each_face_A_idx != each_face_B_idx) { - if( (m_CoordIndex[each_face_B_idx][0] == (int)(m_CoordIndex[each_face_A_idx][each_vert_A_idx])) || - (m_CoordIndex[each_face_B_idx][1] == (int)(m_CoordIndex[each_face_A_idx][each_vert_A_idx])) || - (m_CoordIndex[each_face_B_idx][2] == (int)(m_CoordIndex[each_face_A_idx][each_vert_A_idx])) ) + if( (m_CoordIndex[each_face_B_idx][0] == vertexIndex) || + (m_CoordIndex[each_face_B_idx][1] == vertexIndex) || + (m_CoordIndex[each_face_B_idx][2] == vertexIndex) ) { - glm::vec3 vector_face_A = m_PerFaceNormalsNormalized[each_face_A_idx]; glm::vec3 vector_face_B = m_PerFaceNormalsNormalized[each_face_B_idx]; float dot_prod = glm::dot(vector_face_A, vector_face_B); diff --git a/3d-viewer/vrml_v2_modelparser.cpp b/3d-viewer/vrml_v2_modelparser.cpp index b59a2a2ad9..8d0beb4682 100644 --- a/3d-viewer/vrml_v2_modelparser.cpp +++ b/3d-viewer/vrml_v2_modelparser.cpp @@ -80,7 +80,6 @@ void VRML2_MODEL_PARSER::Load( const wxString aFilename ) #define SCALE_3D_CONV ((IU_PER_MILS * 1000.0f) / UNITS3D_TO_UNITSPCB) - //glPushMatrix(); glTranslatef( matPos.x * SCALE_3D_CONV, matPos.y * SCALE_3D_CONV, matPos.z * SCALE_3D_CONV ); glRotatef(-matRot.z, 0.0f, 0.0f, 1.0f ); @@ -140,7 +139,7 @@ int VRML2_MODEL_PARSER::read_Transform() { char text[128]; - ///DBG( printf( "Transform\n" ) ); + //DBG( printf( "Transform\n" ) ); while( GetNextTag( m_file, text ) ) { @@ -204,7 +203,7 @@ int VRML2_MODEL_PARSER::read_Transform() read_DEF(); } else { - //DBG( printf( " %s NotImplemented\n", text ) ); + DBG( printf( " %s NotImplemented\n", text ) ); read_NotImplemented( m_file, '}' ); } } @@ -264,7 +263,7 @@ int VRML2_MODEL_PARSER::read_DEF() } } - //DBG( printf( " DEF failed\n" ) ); + DBG( printf( " DEF failed\n" ) ); return -1; } @@ -302,12 +301,12 @@ int VRML2_MODEL_PARSER::read_Shape() read_IndexedFaceSet(); } else { - //DBG( printf( " %s NotImplemented\n", text ) ); + DBG( printf( " %s NotImplemented\n", text ) ); read_NotImplemented( m_file, '}' ); } } - //DBG( printf( " Shape failed\n") ); + DBG( printf( " Shape failed\n") ); return -1; } @@ -336,7 +335,7 @@ int VRML2_MODEL_PARSER::read_Appearance() } } - //DBG( printf( " Appearance failed\n") ); + DBG( printf( " Appearance failed\n") ); return -1; } @@ -407,12 +406,12 @@ int VRML2_MODEL_PARSER::read_material() return 0; } } - //DBG( printf( " read_material error: material not found\n" ) ); + DBG( printf( " read_material error: material not found\n" ) ); } } } - //DBG( printf( " failed material\n") ); + DBG( printf( " failed material\n") ); return -1; } diff --git a/3d-viewer/x3dmodelparser.cpp b/3d-viewer/x3dmodelparser.cpp index 5dc8b03ea8..dee18f6b67 100644 --- a/3d-viewer/x3dmodelparser.cpp +++ b/3d-viewer/x3dmodelparser.cpp @@ -72,20 +72,23 @@ void X3D_MODEL_PARSER::Load( const wxString aFilename ) float vrmlunits_to_3Dunits = g_Parm_3D_Visu.m_BiuTo3Dunits * UNITS3D_TO_UNITSPCB; glScalef( vrmlunits_to_3Dunits, vrmlunits_to_3Dunits, vrmlunits_to_3Dunits ); - glm::vec3 matScale( GetMaster()->m_MatScale.x, GetMaster()->m_MatScale.y, GetMaster()->m_MatScale.z ); - glm::vec3 matRot( GetMaster()->m_MatRotation.x, GetMaster()->m_MatRotation.y, GetMaster()->m_MatRotation.z ); - glm::vec3 matPos( GetMaster()->m_MatPosition.x, GetMaster()->m_MatPosition.y, GetMaster()->m_MatPosition.z ); - + glm::vec3 matScale( GetMaster()->m_MatScale.x, GetMaster()->m_MatScale.y, + GetMaster()->m_MatScale.z ); + glm::vec3 matRot( GetMaster()->m_MatRotation.x, GetMaster()->m_MatRotation.y, + GetMaster()->m_MatRotation.z ); + glm::vec3 matPos( GetMaster()->m_MatPosition.x, GetMaster()->m_MatPosition.y, + GetMaster()->m_MatPosition.z ); + #define SCALE_3D_CONV ((IU_PER_MILS * 1000.0f) / UNITS3D_TO_UNITSPCB) - //glPushMatrix(); + glTranslatef( matPos.x * SCALE_3D_CONV, matPos.y * SCALE_3D_CONV, matPos.z * SCALE_3D_CONV ); glRotatef(-matRot.z, 0.0f, 0.0f, 1.0f ); glRotatef(-matRot.y, 0.0f, 1.0f, 0.0f ); glRotatef(-matRot.x, 1.0f, 0.0f, 0.0f ); - + glScalef( matScale.x, matScale.y, matScale.z ); // Switch the locale to standard C (needed to print floating point numbers) @@ -247,25 +250,26 @@ void X3D_MODEL_PARSER::readMaterial( wxXmlNode* aMatNode ) color ) ) { DBG( printf("diffuseColor parsing error") ); - } else + } + else { - // Do not use this diffuse color + m_model->m_Materials->m_DiffuseColor.push_back( color ); } - if( !parseDoubleTriplet( properties[ wxT( "specularColor" ) ], - color ) ) + if( !parseDoubleTriplet( properties[ wxT( "specularColor" ) ], color ) ) { DBG( printf("specularColor parsing error") ); - } else + } + else { m_model->m_Materials->m_SpecularColor.push_back( color ); } - if( !parseDoubleTriplet( properties[ wxT( "emissiveColor" ) ], - color ) ) + if( !parseDoubleTriplet( properties[ wxT( "emissiveColor" ) ], color ) ) { DBG( printf("emissiveColor parsing error") ); - } else + } + else { m_model->m_Materials->m_EmissiveColor.push_back( color ); } @@ -334,12 +338,12 @@ void X3D_MODEL_PARSER::readMaterial( wxXmlNode* aMatNode ) material->m_SpecularColor[0].x, material->m_SpecularColor[0].y, material->m_SpecularColor[0].z ) ); -/* + vrml_material.Append( wxString::Format( wxT( "diffuseColor %f %f %f\n" ), material->m_DiffuseColor[0].x, material->m_DiffuseColor[0].y, material->m_DiffuseColor[0].z ) ); -*/ + vrml_material.Append( wxString::Format( wxT( "emissiveColor %f %f %f\n" ), material->m_EmissiveColor[0].x, material->m_EmissiveColor[0].y, @@ -505,8 +509,6 @@ void X3D_MODEL_PARSER::readIndexedFaceSet( wxXmlNode* aFaceNode, point.y += translation.y; point.z += translation.z; - //triplets.push_back(point); - m_model->m_Point.push_back( point ); // VRML @@ -522,44 +524,49 @@ void X3D_MODEL_PARSER::readIndexedFaceSet( wxXmlNode* aFaceNode, NODE_LIST color; GetChildsByName( aFaceNode, wxT( "Color" ), color); - PROPERTY_MAP color_properties; - // IndexedFaceSet has one Coordinate child node - GetNodeProperties( color[0], color_properties ); - - // Save points to vector as doubles - wxStringTokenizer colorpoint_tokens( color_properties[ wxT("color") ] ); - double color_point = 0.0; - - while( colorpoint_tokens.HasMoreTokens() ) + // Some models lack color information, need to handle this safely + if( !color.empty() ) { - if( colorpoint_tokens.GetNextToken().ToDouble( &color_point ) ) + PROPERTY_MAP color_properties; + // IndexedFaceSet has one Coordinate child node + GetNodeProperties( color[0], color_properties ); + + // Save points to vector as doubles + wxStringTokenizer colorpoint_tokens( color_properties[ wxT("color") ] ); + double color_point = 0.0; + + while( colorpoint_tokens.HasMoreTokens() ) { - color_points.push_back( color_point ); + if( colorpoint_tokens.GetNextToken().ToDouble( &color_point ) ) + { + color_points.push_back( color_point ); + } + else + { + wxLogError( wxT( "Error converting to double" ) ); + } } - else + + if( color_points.size() % 3 != 0 ) { - wxLogError( wxT( "Error converting to double" ) ); + DBG( printf( "Number of points is incorrect" ) ); + return; } - } - if( color_points.size() % 3 != 0 ) - { - DBG( printf( "Number of points is incorrect" ) ); - return; - } + /* Create 3D face color from 3 color points + */ + m_model->m_Materials->m_DiffuseColor.clear(); + for( unsigned id = 0; id < color_points.size() / 3; id++ ) + { + m_model->m_MaterialIndex.push_back( id ); - /* Create 3D face color from 3 color points - */ - for( unsigned id = 0; id < color_points.size() / 3; id++ ) - { - m_model->m_MaterialIndex.push_back( id ); + int color_triplet_indx = id * 3; + glm::vec3 colorface( color_points[ color_triplet_indx + 0 ], + color_points[ color_triplet_indx + 1 ], + color_points[ color_triplet_indx + 2 ] ); - int color_triplet_indx = id * 3; - glm::vec3 colorface( color_points[ color_triplet_indx + 0 ], - color_points[ color_triplet_indx + 1 ], - color_points[ color_triplet_indx + 2 ] ); - - m_model->m_Materials->m_DiffuseColor.push_back( colorface ); + m_model->m_Materials->m_DiffuseColor.push_back( colorface ); + } } From 764369439ef97522333da83bfa7fa4e76f1d18be Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 2 Aug 2014 12:29:10 +0200 Subject: [PATCH 741/741] Add comments. Fix bug #1351507 (pad color does not reflect, whether the pad is on front or back layer) and bug #1351388 (Adding a keepout area appears on the opposite layer than selected) --- include/layers_id_colors_and_visibility.h | 17 +++++++++++++++++ pcbnew/class_pad_draw_functions.cpp | 4 ++-- .../dialogs/dialog_keepout_area_properties.cpp | 12 +++++++----- 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/include/layers_id_colors_and_visibility.h b/include/layers_id_colors_and_visibility.h index c3dfd4b0ab..17a0e3384b 100644 --- a/include/layers_id_colors_and_visibility.h +++ b/include/layers_id_colors_and_visibility.h @@ -298,12 +298,29 @@ public: static LSET AllLayersMask(); + /** + * Function FrontTechMask + * returns a mask holding all technical layers (no CU layer) on front side. + */ static LSET FrontTechMask(); + + /** + * Function BackTechMask + * returns a mask holding all technical layers (no CU layer) on back side. + */ static LSET BackTechMask(); static LSET AllTechMask(); + /** + * Function FrontMask + * returns a mask holding all technical layers and the external CU layer on front side. + */ static LSET FrontMask(); + /** + * Function BackMask + * returns a mask holding all technical layers and the external CU layer on back side. + */ static LSET BackMask(); static LSET UserMask(); diff --git a/pcbnew/class_pad_draw_functions.cpp b/pcbnew/class_pad_draw_functions.cpp index 2d4eca4ebc..ead126d9ce 100644 --- a/pcbnew/class_pad_draw_functions.cpp +++ b/pcbnew/class_pad_draw_functions.cpp @@ -126,12 +126,12 @@ void D_PAD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDraw_mode, drawInfo.m_ShowPadFilled = false; EDA_COLOR_T color = BLACK; - if( ( m_layerMask & LSET::FrontMask() ).any() ) + if( m_layerMask[F_Cu] ) { color = brd->GetVisibleElementColor( PAD_FR_VISIBLE ); } - if( ( m_layerMask & LSET::BackMask() ).any() ) + if( m_layerMask[B_Cu] ) { color = ColorMix( color, brd->GetVisibleElementColor( PAD_BK_VISIBLE ) ); } diff --git a/pcbnew/dialogs/dialog_keepout_area_properties.cpp b/pcbnew/dialogs/dialog_keepout_area_properties.cpp index 9c2141b7ff..76da0e5802 100644 --- a/pcbnew/dialogs/dialog_keepout_area_properties.cpp +++ b/pcbnew/dialogs/dialog_keepout_area_properties.cpp @@ -5,9 +5,9 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2013 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr - * Copyright (C) 2013 SoftPLC Corporation, Dick Hollenbeck - * Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2014 Jean-Pierre Charras, jp.charras at wanadoo.fr + * Copyright (C) 2014 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 1992-2014 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 @@ -154,8 +154,9 @@ void DIALOG_KEEPOUT_AREA_PROPERTIES::initDialog() // Build copper layer list and append to layer widget LSET show = LSET::AllCuMask( board->GetCopperLayerCount() ); + int imgIdx = 0; - for( LSEQ cu_stack = show.UIOrder(); cu_stack; ++cu_stack ) + for( LSEQ cu_stack = show.UIOrder(); cu_stack; ++cu_stack, imgIdx++ ) { LAYER_ID layer = *cu_stack; @@ -167,7 +168,8 @@ void DIALOG_KEEPOUT_AREA_PROPERTIES::initDialog() imageList->Add( makeLayerBitmap( layerColor ) ); - int itemIndex = m_LayerSelectionCtrl->InsertItem( 0, msg, layer ); + int itemIndex = m_LayerSelectionCtrl->InsertItem( + m_LayerSelectionCtrl->GetItemCount(), msg, imgIdx ); if( m_zonesettings.m_CurrentZone_Layer == layer ) m_LayerSelectionCtrl->Select( itemIndex );

  • +^HZD2Y8kSBjj|G9f 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